From b8493e44706f94feecb054544b1ab89940458a61 Mon Sep 17 00:00:00 2001 From: Nathaniel Cook Date: Fri, 10 Jun 2016 09:03:21 -0600 Subject: [PATCH] remove govend deps (#632) add scripts for new subrepo based deps git subrepo clone https://github.com/influxdata/wlog.git vendor/github.com/influxdata/wlog subrepo: subdir: "vendor/github.com/influxdata/wlog" merged: "7c63b0a" upstream: origin: "https://github.com/influxdata/wlog.git" branch: "master" commit: "7c63b0a" git-subrepo: version: "0.3.0" origin: "???" commit: "???" git subrepo clone http://github.com/boltdb/bolt.git vendor/github.com/boltdb/bolt subrepo: subdir: "vendor/github.com/boltdb/bolt" merged: "05e441d" upstream: origin: "http://github.com/boltdb/bolt.git" branch: "master" commit: "05e441d" git-subrepo: version: "0.3.0" origin: "???" commit: "???" git subrepo clone http://github.com/BurntSushi/toml.git vendor/github.com/BurntSushi/toml subrepo: subdir: "vendor/github.com/BurntSushi/toml" merged: "f0aeabc" upstream: origin: "http://github.com/BurntSushi/toml.git" branch: "datetimes" commit: "f0aeabc" git-subrepo: version: "0.3.0" origin: "???" commit: "???" git subrepo clone http://github.com/cenkalti/backoff.git vendor/github.com/cenkalti/backoff subrepo: subdir: "vendor/github.com/cenkalti/backoff" merged: "a603017" upstream: origin: "http://github.com/cenkalti/backoff.git" branch: "master" commit: "a603017" git-subrepo: version: "0.3.0" origin: "???" commit: "???" git subrepo clone http://github.com/dustin/go-humanize.git vendor/github.com/dustin/go-humanize subrepo: subdir: "vendor/github.com/dustin/go-humanize" merged: "499693e" upstream: origin: "http://github.com/dustin/go-humanize.git" branch: "master" commit: "499693e" git-subrepo: version: "0.3.0" origin: "???" commit: "???" git subrepo clone http://github.com/gogo/protobuf.git vendor/github.com/gogo/protobuf subrepo: subdir: "vendor/github.com/gogo/protobuf" merged: "318371c" upstream: origin: "http://github.com/gogo/protobuf.git" branch: "master" commit: "318371c" git-subrepo: version: "0.3.0" origin: "???" commit: "???" git subrepo clone http://github.com/golang/protobuf.git vendor/github.com/golang/protobuf subrepo: subdir: "vendor/github.com/golang/protobuf" merged: "8616e8e" upstream: origin: "http://github.com/golang/protobuf.git" branch: "master" commit: "8616e8e" git-subrepo: version: "0.3.0" origin: "???" commit: "???" git subrepo clone http://github.com/gorhill/cronexpr.git vendor/github.com/gorhill/cronexpr subrepo: subdir: "vendor/github.com/gorhill/cronexpr" merged: "f098431" upstream: origin: "http://github.com/gorhill/cronexpr.git" branch: "master" commit: "f098431" git-subrepo: version: "0.3.0" origin: "???" commit: "???" git subrepo clone http://github.com/influxdata/influxdb.git vendor/github.com/influxdata/influxdb subrepo: subdir: "vendor/github.com/influxdata/influxdb" merged: "c8e90fa" upstream: origin: "http://github.com/influxdata/influxdb.git" branch: "master" commit: "c8e90fa" git-subrepo: version: "0.3.0" origin: "???" commit: "???" git subrepo clone http://github.com/influxdb/usage-client.git vendor/github.com/influxdb/usage-client subrepo: subdir: "vendor/github.com/influxdb/usage-client" merged: "475977e" upstream: origin: "http://github.com/influxdb/usage-client.git" branch: "master" commit: "475977e" git-subrepo: version: "0.3.0" origin: "???" commit: "???" git subrepo clone http://github.com/kimor79/gollectd.git vendor/github.com/kimor79/gollectd subrepo: subdir: "vendor/github.com/kimor79/gollectd" merged: "b5dddb1" upstream: origin: "http://github.com/kimor79/gollectd.git" branch: "master" commit: "b5dddb1" git-subrepo: version: "0.3.0" origin: "???" commit: "???" git subrepo clone http://github.com/mattn/go-runewidth.git vendor/github.com/mattn/go-runewidth subrepo: subdir: "vendor/github.com/mattn/go-runewidth" merged: "d6bea18" upstream: origin: "http://github.com/mattn/go-runewidth.git" branch: "master" commit: "d6bea18" git-subrepo: version: "0.3.0" origin: "???" commit: "???" git subrepo clone http://github.com/pkg/errors.git vendor/github.com/pkg/errors subrepo: subdir: "vendor/github.com/pkg/errors" merged: "5776abf" upstream: origin: "http://github.com/pkg/errors.git" branch: "master" commit: "5776abf" git-subrepo: version: "0.3.0" origin: "???" commit: "???" git subrepo clone http://github.com/russross/blackfriday.git vendor/github.com/russross/blackfriday subrepo: subdir: "vendor/github.com/russross/blackfriday" merged: "1d6b8e9" upstream: origin: "http://github.com/russross/blackfriday.git" branch: "master" commit: "1d6b8e9" git-subrepo: version: "0.3.0" origin: "???" commit: "???" git subrepo clone http://github.com/serenize/snaker.git vendor/github.com/serenize/snaker subrepo: subdir: "vendor/github.com/serenize/snaker" merged: "8824b61" upstream: origin: "http://github.com/serenize/snaker.git" branch: "master" commit: "8824b61" git-subrepo: version: "0.3.0" origin: "???" commit: "???" git subrepo clone http://github.com/shurcooL/go.git vendor/github.com/shurcooL/go subrepo: subdir: "vendor/github.com/shurcooL/go" merged: "8b8a7a0" upstream: origin: "http://github.com/shurcooL/go.git" branch: "master" commit: "8b8a7a0" git-subrepo: version: "0.3.0" origin: "???" commit: "???" git subrepo clone http://github.com/shurcooL/markdownfmt.git vendor/github.com/shurcooL/markdownfmt subrepo: subdir: "vendor/github.com/shurcooL/markdownfmt" merged: "818f50d" upstream: origin: "http://github.com/shurcooL/markdownfmt.git" branch: "master" commit: "818f50d" git-subrepo: version: "0.3.0" origin: "???" commit: "???" git subrepo clone http://github.com/shurcooL/sanitized_anchor_name.git vendor/github.com/shurcooL/sanitized_anchor_name subrepo: subdir: "vendor/github.com/shurcooL/sanitized_anchor_name" merged: "10ef21a" upstream: origin: "http://github.com/shurcooL/sanitized_anchor_name.git" branch: "master" commit: "10ef21a" git-subrepo: version: "0.3.0" origin: "???" commit: "???" git subrepo clone http://github.com/twinj/uuid.git vendor/github.com/twinj/uuid subrepo: subdir: "vendor/github.com/twinj/uuid" merged: "efdcd76" upstream: origin: "http://github.com/twinj/uuid.git" branch: "master" commit: "efdcd76" git-subrepo: version: "0.3.0" origin: "???" commit: "???" git subrepo clone http://gopkg.in/gomail.v2.git vendor/gopkg.in/gomail.v2 subrepo: subdir: "vendor/gopkg.in/gomail.v2" merged: "81ebce5" upstream: origin: "http://gopkg.in/gomail.v2.git" branch: "master" commit: "81ebce5" git-subrepo: version: "0.3.0" origin: "???" commit: "???" git subrepo clone --branch=master https://github.com/golang/crypto.git vendor/golang.org/x/crypto subrepo: subdir: "vendor/golang.org/x/crypto" merged: "77f4136" upstream: origin: "https://github.com/golang/crypto.git" branch: "master" commit: "77f4136" git-subrepo: version: "0.3.0" origin: "???" commit: "???" git subrepo clone https://github.com/benbjohnson/tmpl vendor/github.com/benbjohnson/tmpl subrepo: subdir: "vendor/github.com/benbjohnson/tmpl" merged: "8e77bc5" upstream: origin: "https://github.com/benbjohnson/tmpl" branch: "master" commit: "8e77bc5" git-subrepo: version: "0.3.0" origin: "???" commit: "???" git subrepo pull vendor/github.com/pkg/errors subrepo: subdir: "vendor/github.com/pkg/errors" merged: "874c0ec" upstream: origin: "http://github.com/pkg/errors.git" branch: "master" commit: "874c0ec" git-subrepo: version: "0.3.0" origin: "???" commit: "???" git subrepo clone https://github.com/stretchr/testify.git vendor/github.com/stretchr/testify subrepo: subdir: "vendor/github.com/stretchr/testify" merged: "8d64eb7" upstream: origin: "https://github.com/stretchr/testify.git" branch: "master" commit: "8d64eb7" git-subrepo: version: "0.3.0" origin: "???" commit: "???" git subrepo clone https://github.com/influxdata/usage-client.git vendor/github.com/influxdata/usage-client subrepo: subdir: "vendor/github.com/influxdata/usage-client" merged: "475977e" upstream: origin: "https://github.com/influxdata/usage-client.git" branch: "master" commit: "475977e" git-subrepo: version: "0.3.0" origin: "???" commit: "???" --- CONTRIBUTING.md | 55 +- build.py | 18 +- cmd/kapacitord/run/server.go | 25 +- integrations/benchmark_test.go | 2 +- integrations/helpers_test.go | 25 - list-deps | 46 + metaclient.go | 37 + services/httpd/handler.go | 9 - services/reporting/config.go | 2 +- services/reporting/service.go | 2 +- udf/udf.pb.go | 2 + vendor.list | 24 + vendor.sh | 41 + vendor.yml | 53 - vendor/github.com/BurntSushi/toml/.gitignore | 5 + vendor/github.com/BurntSushi/toml/.gitrepo | 11 + vendor/github.com/BurntSushi/toml/.travis.yml | 12 + .../BurntSushi/toml/_examples/example.go | 61 + .../BurntSushi/toml/_examples/example.toml | 35 + .../BurntSushi/toml/_examples/hard.toml | 22 + .../BurntSushi/toml/_examples/implicit.toml | 4 + .../toml/_examples/invalid-apples.toml | 6 + .../BurntSushi/toml/_examples/invalid.toml | 35 + .../BurntSushi/toml/_examples/readme1.toml | 5 + .../BurntSushi/toml/_examples/readme2.toml | 1 + .../toml/cmd/toml-test-decoder/COPYING | 14 + .../toml/cmd/toml-test-decoder/README.md | 14 + .../toml/cmd/toml-test-decoder/main.go | 90 + .../toml/cmd/toml-test-encoder/COPYING | 14 + .../toml/cmd/toml-test-encoder/README.md | 14 + .../toml/cmd/toml-test-encoder/main.go | 131 + .../BurntSushi/toml/cmd/tomlv/COPYING | 14 + .../BurntSushi/toml/cmd/tomlv/README.md | 22 + .../BurntSushi/toml/cmd/tomlv/main.go | 61 + .../github.com/BurntSushi/toml/decode_test.go | 1278 + .../github.com/BurntSushi/toml/encode_test.go | 615 + vendor/github.com/benbjohnson/tmpl/.gitrepo | 11 + vendor/github.com/benbjohnson/tmpl/LICENSE | 22 + vendor/github.com/benbjohnson/tmpl/README.md | 36 + vendor/github.com/benbjohnson/tmpl/main.go | 209 + .../github.com/benbjohnson/tmpl/main_test.go | 223 + vendor/github.com/boltdb/bolt/.gitignore | 4 + vendor/github.com/boltdb/bolt/.gitrepo | 11 + vendor/github.com/boltdb/bolt/README.md | 5 +- vendor/github.com/boltdb/bolt/bucket_test.go | 1867 + .../github.com/boltdb/bolt/cmd/bolt/main.go | 1532 + .../boltdb/bolt/cmd/bolt/main_test.go | 185 + vendor/github.com/boltdb/bolt/cursor_test.go | 817 + vendor/github.com/boltdb/bolt/db_test.go | 1706 + .../github.com/boltdb/bolt/freelist_test.go | 158 + vendor/github.com/boltdb/bolt/node_test.go | 156 + vendor/github.com/boltdb/bolt/page_test.go | 72 + vendor/github.com/boltdb/bolt/quick_test.go | 79 + .../github.com/boltdb/bolt/simulation_test.go | 329 + vendor/github.com/boltdb/bolt/tx_test.go | 716 + vendor/github.com/cenkalti/backoff/.gitignore | 22 + vendor/github.com/cenkalti/backoff/.gitrepo | 11 + .../github.com/cenkalti/backoff/.travis.yml | 9 + .../cenkalti/backoff/backoff_test.go | 27 + .../cenkalti/backoff/example_test.go | 51 + .../cenkalti/backoff/exponential_test.go | 108 + .../github.com/cenkalti/backoff/retry_test.go | 34 + .../cenkalti/backoff/ticker_test.go | 45 + vendor/github.com/davecgh/go-spew/README.md | 194 - .../github.com/davecgh/go-spew/cov_report.sh | 22 - .../davecgh/go-spew/test_coverage.txt | 61 - .../github.com/dustin/go-humanize/.gitignore | 6 + vendor/github.com/dustin/go-humanize/.gitrepo | 11 + .../github.com/dustin/go-humanize/.travis.yml | 18 + .../dustin/go-humanize/bigbytes_test.go | 219 + .../dustin/go-humanize/bytes_test.go | 144 + .../dustin/go-humanize/comma_test.go | 134 + .../dustin/go-humanize/commaf_test.go | 44 + .../dustin/go-humanize/common_test.go | 18 + .../dustin/go-humanize/ftoa_test.go | 55 + .../dustin/go-humanize/number_test.go | 78 + .../dustin/go-humanize/ordinals_test.go | 22 + .../github.com/dustin/go-humanize/si_test.go | 101 + .../dustin/go-humanize/times_test.go | 71 + vendor/github.com/gogo/protobuf/.gitignore | 1 + vendor/github.com/gogo/protobuf/.gitrepo | 11 + vendor/github.com/gogo/protobuf/.mailmap | 8 + vendor/github.com/gogo/protobuf/.travis.yml | 21 + .../github.com/gogo/protobuf/codec/codec.go | 89 + .../gogo/protobuf/codec/codec_test.go | 52 + .../gogo/protobuf/gogoproto/Makefile | 36 + .../github.com/gogo/protobuf/gogoproto/doc.go | 168 + .../gogo/protobuf/gogoproto/gogo.pb.go | 661 + .../gogo/protobuf/gogoproto/gogo.pb.golden | 45 + .../gogo/protobuf/gogoproto/gogo.proto | 120 + .../gogo/protobuf/gogoproto/helper.go | 308 + vendor/github.com/gogo/protobuf/io/full.go | 102 + vendor/github.com/gogo/protobuf/io/io.go | 70 + vendor/github.com/gogo/protobuf/io/io_test.go | 221 + vendor/github.com/gogo/protobuf/io/uint32.go | 126 + vendor/github.com/gogo/protobuf/io/varint.go | 134 + .../github.com/gogo/protobuf/jsonpb/jsonpb.go | 617 + .../gogo/protobuf/jsonpb/jsonpb_test.go | 395 + .../jsonpb/jsonpb_test_proto/Makefile | 33 + .../jsonpb/jsonpb_test_proto/bytes.go | 7 + .../jsonpb_test_proto/more_test_objects.pb.go | 120 + .../jsonpb_test_proto/more_test_objects.proto | 46 + .../jsonpb_test_proto/test_objects.pb.go | 599 + .../jsonpb_test_proto/test_objects.proto | 113 + .../gogo/protobuf/plugin/compare/compare.go | 520 + .../protobuf/plugin/compare/comparetest.go | 105 + .../plugin/defaultcheck/defaultcheck.go | 131 + .../plugin/description/description.go | 199 + .../plugin/description/descriptiontest.go | 71 + .../protobuf/plugin/embedcheck/embedcheck.go | 197 + .../plugin/enumstringer/enumstringer.go | 102 + .../gogo/protobuf/plugin/equal/equal.go | 602 + .../gogo/protobuf/plugin/equal/equaltest.go | 94 + .../gogo/protobuf/plugin/face/face.go | 231 + .../gogo/protobuf/plugin/face/facetest.go | 80 + .../gogo/protobuf/plugin/gostring/gostring.go | 360 + .../protobuf/plugin/gostring/gostringtest.go | 88 + .../gogo/protobuf/plugin/grpc/grpc.go | 462 + .../protobuf/plugin/marshalto/marshalto.go | 1323 + .../protobuf/plugin/oneofcheck/oneofcheck.go | 91 + .../gogo/protobuf/plugin/populate/populate.go | 774 + .../gogo/protobuf/plugin/size/size.go | 599 + .../gogo/protobuf/plugin/size/sizetest.go | 132 + .../gogo/protobuf/plugin/stringer/stringer.go | 293 + .../protobuf/plugin/stringer/stringertest.go | 81 + .../gogo/protobuf/plugin/testgen/testgen.go | 606 + .../gogo/protobuf/plugin/union/union.go | 207 + .../gogo/protobuf/plugin/union/uniontest.go | 84 + .../protobuf/plugin/unmarshal/unmarshal.go | 1319 + .../gogo/protobuf/proto/all_test.go | 2169 + .../gogo/protobuf/proto/clone_test.go | 267 + .../gogo/protobuf/proto/equal_test.go | 212 + .../gogo/protobuf/proto/extensions_test.go | 430 + .../gogo/protobuf/proto/message_set_test.go | 66 + .../protobuf/proto/proto3_proto/proto3.pb.go | 176 + .../protobuf/proto/proto3_proto/proto3.proto | 68 + .../gogo/protobuf/proto/proto3_test.go | 125 + .../gogo/protobuf/proto/size2_test.go | 63 + .../gogo/protobuf/proto/size_test.go | 164 + .../gogo/protobuf/proto/testdata/Makefile | 37 + .../protobuf/proto/testdata/golden_test.go | 86 + .../gogo/protobuf/proto/testdata/test.pb.go | 3983 ++ .../protobuf/proto/testdata/test.pb.go.golden | 1737 + .../gogo/protobuf/proto/testdata/test.proto | 535 + .../gogo/protobuf/proto/text_parser_test.go | 557 + .../gogo/protobuf/proto/text_test.go | 474 + .../google/protobuf/compiler/plugin.proto | 150 + .../protobuf/google/protobuf/descriptor.proto | 779 + .../gogo/protobuf/protoc-gen-combo/combo.go | 172 + .../gogo/protobuf/protoc-gen-gofast/main.go | 48 + .../gogo/protobuf/protoc-gen-gogo/Makefile | 33 + .../protoc-gen-gogo/descriptor/Makefile | 33 + .../descriptor/descriptor.pb.go | 2017 + .../protoc-gen-gogo/descriptor/gostring.go | 635 + .../protoc-gen-gogo/descriptor/helper.go | 355 + .../gogo/protobuf/protoc-gen-gogo/doc.go | 51 + .../protoc-gen-gogo/generator/generator.go | 3129 ++ .../protoc-gen-gogo/generator/helper.go | 445 + .../protoc-gen-gogo/generator/name_test.go | 56 + .../gogo/protobuf/protoc-gen-gogo/main.go | 57 + .../protobuf/protoc-gen-gogo/plugin/Makefile | 37 + .../protoc-gen-gogo/plugin/plugin.pb.go | 226 + .../protoc-gen-gogo/testdata/Makefile | 67 + .../testdata/extension_base.proto | 46 + .../testdata/extension_extra.proto | 38 + .../testdata/extension_test.go | 210 + .../testdata/extension_user.proto | 100 + .../protoc-gen-gogo/testdata/grpc.proto | 59 + .../protoc-gen-gogo/testdata/imp.pb.go.golden | 113 + .../protoc-gen-gogo/testdata/imp.proto | 70 + .../protoc-gen-gogo/testdata/imp2.proto | 43 + .../protoc-gen-gogo/testdata/imp3.proto | 38 + .../protoc-gen-gogo/testdata/main_test.go | 46 + .../protoc-gen-gogo/testdata/multi/.gitignore | 1 + .../testdata/multi/multi1.proto | 44 + .../testdata/multi/multi2.proto | 46 + .../testdata/multi/multi3.proto | 43 + .../testdata/my_test/test.pb.go | 960 + .../testdata/my_test/test.proto | 156 + .../protoc-gen-gogo/testdata/proto3.proto | 52 + .../gogo/protobuf/protoc-gen-gogofast/main.go | 47 + .../protobuf/protoc-gen-gogofaster/main.go | 50 + .../protobuf/protoc-gen-gogoslick/main.go | 59 + .../protobuf/protoc-min-version/minversion.go | 65 + .../gogo/protobuf/sortkeys/sortkeys.go | 99 + .../github.com/gogo/protobuf/test/.gitignore | 1 + vendor/github.com/gogo/protobuf/test/Makefile | 44 + .../protobuf/test/asymetric-issue125/Makefile | 30 + .../test/asymetric-issue125/asym.pb.go | 621 + .../test/asymetric-issue125/asym.proto | 50 + .../test/asymetric-issue125/asym_test.go | 38 + .../test/asymetric-issue125/asympb_test.go | 186 + .../protobuf/test/asymetric-issue125/pop.go | 62 + .../github.com/gogo/protobuf/test/bug_test.go | 250 + .../gogo/protobuf/test/casttype/Makefile | 31 + .../protobuf/test/casttype/casttype.proto | 77 + .../test/casttype/combos/both/casttype.pb.go | 2418 + .../test/casttype/combos/both/casttype.proto | 77 + .../casttype/combos/both/casttypepb_test.go | 513 + .../casttype/combos/marshaler/casttype.pb.go | 1550 + .../casttype/combos/marshaler/casttype.proto | 77 + .../combos/marshaler/casttypepb_test.go | 513 + .../casttype/combos/neither/casttype.pb.go | 1346 + .../casttype/combos/neither/casttype.proto | 77 + .../combos/neither/casttypepb_test.go | 457 + .../combos/unmarshaler/casttype.pb.go | 2215 + .../combos/unmarshaler/casttype.proto | 77 + .../combos/unmarshaler/casttypepb_test.go | 457 + .../casttype/combos/unsafeboth/casttype.pb.go | 2418 + .../casttype/combos/unsafeboth/casttype.proto | 77 + .../combos/unsafeboth/casttypepb_test.go | 513 + .../combos/unsafemarshaler/casttype.pb.go | 1551 + .../combos/unsafemarshaler/casttype.proto | 77 + .../combos/unsafemarshaler/casttypepb_test.go | 513 + .../combos/unsafeunmarshaler/casttype.pb.go | 2215 + .../combos/unsafeunmarshaler/casttype.proto | 77 + .../unsafeunmarshaler/casttypepb_test.go | 457 + .../gogo/protobuf/test/casttype/mytypes.go | 57 + .../gogo/protobuf/test/castvalue/Makefile | 39 + .../protobuf/test/castvalue/castvalue.pb.go | 856 + .../protobuf/test/castvalue/castvalue.proto | 64 + .../test/castvalue/castvaluepb_test.go | 457 + .../castvalue/combos/both/castvalue.pb.go | 1417 + .../castvalue/combos/both/castvalue.proto | 64 + .../castvalue/combos/both/castvaluepb_test.go | 513 + .../test/castvalue/combos/both/mytypes.go | 31 + .../combos/marshaler/castvalue.pb.go | 978 + .../combos/marshaler/castvalue.proto | 64 + .../combos/marshaler/castvaluepb_test.go | 513 + .../castvalue/combos/marshaler/mytypes.go | 31 + .../combos/unmarshaler/castvalue.pb.go | 1297 + .../combos/unmarshaler/castvalue.proto | 64 + .../combos/unmarshaler/castvaluepb_test.go | 457 + .../castvalue/combos/unmarshaler/mytypes.go | 31 + .../combos/unsafeboth/castvalue.pb.go | 1418 + .../combos/unsafeboth/castvalue.proto | 64 + .../combos/unsafeboth/castvaluepb_test.go | 513 + .../castvalue/combos/unsafeboth/mytypes.go | 31 + .../combos/unsafemarshaler/castvalue.pb.go | 978 + .../combos/unsafemarshaler/castvalue.proto | 64 + .../unsafemarshaler/castvaluepb_test.go | 513 + .../combos/unsafemarshaler/mytypes.go | 31 + .../combos/unsafeunmarshaler/castvalue.pb.go | 1297 + .../combos/unsafeunmarshaler/castvalue.proto | 64 + .../unsafeunmarshaler/castvaluepb_test.go | 457 + .../combos/unsafeunmarshaler/mytypes.go | 31 + .../gogo/protobuf/test/castvalue/mytypes.go | 31 + .../protobuf/test/combos/both/bug_test.go | 250 + .../protobuf/test/combos/both/thetest.pb.go | 40312 ++++++++++++++++ .../protobuf/test/combos/both/thetest.proto | 624 + .../test/combos/both/thetestpb_test.go | 16373 +++++++ .../gogo/protobuf/test/combos/both/uuid.go | 126 + .../test/combos/marshaler/bug_test.go | 250 + .../test/combos/marshaler/thetest.pb.go | 28780 +++++++++++ .../test/combos/marshaler/thetest.proto | 624 + .../test/combos/marshaler/thetestpb_test.go | 16373 +++++++ .../protobuf/test/combos/marshaler/uuid.go | 126 + .../test/combos/unmarshaler/bug_test.go | 250 + .../test/combos/unmarshaler/thetest.pb.go | 36193 ++++++++++++++ .../test/combos/unmarshaler/thetest.proto | 624 + .../test/combos/unmarshaler/thetestpb_test.go | 14637 ++++++ .../protobuf/test/combos/unmarshaler/uuid.go | 126 + .../test/combos/unsafeboth/bug_test.go | 250 + .../test/combos/unsafeboth/thetest.pb.go | 39499 +++++++++++++++ .../test/combos/unsafeboth/thetest.proto | 624 + .../test/combos/unsafeboth/thetestpb_test.go | 16373 +++++++ .../protobuf/test/combos/unsafeboth/uuid.go | 126 + .../test/combos/unsafemarshaler/bug_test.go | 250 + .../test/combos/unsafemarshaler/thetest.pb.go | 28471 +++++++++++ .../test/combos/unsafemarshaler/thetest.proto | 624 + .../combos/unsafemarshaler/thetestpb_test.go | 16373 +++++++ .../test/combos/unsafemarshaler/uuid.go | 126 + .../test/combos/unsafeunmarshaler/bug_test.go | 250 + .../combos/unsafeunmarshaler/thetest.pb.go | 35689 ++++++++++++++ .../combos/unsafeunmarshaler/thetest.proto | 624 + .../unsafeunmarshaler/thetestpb_test.go | 14637 ++++++ .../test/combos/unsafeunmarshaler/uuid.go | 126 + .../test/custom-dash-type/customdash.go | 102 + .../gogo/protobuf/test/custom/custom.go | 145 + .../gogo/protobuf/test/custom/custom_test.go | 41 + .../test/custombytesnonstruct/Makefile | 30 + .../custombytesnonstruct_test.go | 6 + .../test/custombytesnonstruct/customtype.go | 8 + .../test/custombytesnonstruct/proto.pb.go | 278 + .../test/custombytesnonstruct/proto.proto | 11 + .../test/dashfilename/dash-filename.proto | 10 + .../protobuf/test/dashfilename/df_test.go | 20 + .../gogo/protobuf/test/dashfilename/doc.go | 1 + .../protobuf/test/defaultconflict/df.proto | 38 + .../protobuf/test/defaultconflict/dg.proto | 37 + .../gogo/protobuf/test/defaultconflict/doc.go | 1 + .../protobuf/test/defaultconflict/nc.proto | 35 + .../protobuf/test/defaultconflict/nc_test.go | 66 + .../protobuf/test/defaultconflict/ne.proto | 40 + .../protobuf/test/defaultconflict/nx.proto | 39 + .../protobuf/test/embedconflict/.gitignore | 1 + .../gogo/protobuf/test/embedconflict/doc.go | 1 + .../gogo/protobuf/test/embedconflict/eb.proto | 36 + .../gogo/protobuf/test/embedconflict/ec.proto | 38 + .../protobuf/test/embedconflict/ec_test.go | 117 + .../gogo/protobuf/test/embedconflict/ee.proto | 39 + .../gogo/protobuf/test/embedconflict/em.proto | 40 + .../gogo/protobuf/test/embedconflict/en.proto | 38 + .../gogo/protobuf/test/embedconflict/er.proto | 39 + .../gogo/protobuf/test/empty-issue70/Makefile | 30 + .../protobuf/test/empty-issue70/empty.pb.go | 208 + .../protobuf/test/empty-issue70/empty.proto | 11 + .../protobuf/test/empty-issue70/empty_test.go | 9 + .../protobuf/test/enumcustomname/Makefile | 30 + .../test/enumcustomname/enumcustomname.pb.go | 309 + .../test/enumcustomname/enumcustomname.proto | 47 + .../gogo/protobuf/test/enumprefix/Makefile | 30 + .../protobuf/test/enumprefix/enumprefix.pb.go | 64 + .../protobuf/test/enumprefix/enumprefix.proto | 35 + .../gogo/protobuf/test/enumstringer/Makefile | 30 + .../test/enumstringer/enumstringer.pb.go | 582 + .../test/enumstringer/enumstringer.proto | 60 + .../test/enumstringer/enumstringerpb_test.go | 451 + .../gogo/protobuf/test/enumstringer/string.go | 39 + .../gogo/protobuf/test/example/Makefile | 30 + .../gogo/protobuf/test/example/example.pb.go | 2526 + .../gogo/protobuf/test/example/example.proto | 81 + .../protobuf/test/example/example_test.go | 35 + .../protobuf/test/example/examplepb_test.go | 1672 + .../gogo/protobuf/test/extension_test.go | 162 + .../gogo/protobuf/test/filedotname/Makefile | 31 + .../protobuf/test/filedotname/file.dot.pb.go | 568 + .../protobuf/test/filedotname/file.dot.proto | 60 + .../test/filedotname/file.dotpb_test.go | 246 + .../gogo/protobuf/test/fuzztests/Makefile | 31 + .../gogo/protobuf/test/fuzztests/fuzz.pb.go | 2932 ++ .../gogo/protobuf/test/fuzztests/fuzz.proto | 84 + .../gogo/protobuf/test/fuzztests/fuzz_test.go | 134 + .../gogo/protobuf/test/group/Makefile | 30 + .../gogo/protobuf/test/group/group.pb.go | 964 + .../gogo/protobuf/test/group/group.proto | 63 + .../gogo/protobuf/test/group/grouppb_test.go | 541 + .../gogo/protobuf/test/importdedup/Makefile | 31 + .../test/importdedup/importdedup_test.go | 32 + .../protobuf/test/importdedup/proto.pb.go | 69 + .../protobuf/test/importdedup/proto.proto | 38 + .../test/importdedup/subpkg/customtype.go | 29 + .../test/importdedup/subpkg/subproto.pb.go | 51 + .../test/importdedup/subpkg/subproto.proto | 34 + .../test/indeximport-issue72/Makefile | 31 + .../indeximport-issue72/index/index.pb.go | 515 + .../indeximport-issue72/index/index.proto | 43 + .../indeximport-issue72/index/indexpb_test.go | 155 + .../indeximport-issue72/indeximport.pb.go | 468 + .../indeximport-issue72/indeximport.proto | 44 + .../indeximport-issue72/indeximportpb_test.go | 156 + .../gogo/protobuf/test/issue34/Makefile | 30 + .../protobuf/test/issue34/issue34_test.go | 80 + .../gogo/protobuf/test/issue34/proto.pb.go | 348 + .../gogo/protobuf/test/issue34/proto.proto | 15 + .../gogo/protobuf/test/issue42order/Makefile | 30 + .../protobuf/test/issue42order/issue42.pb.go | 623 + .../protobuf/test/issue42order/issue42.proto | 46 + .../protobuf/test/issue42order/order_test.go | 54 + .../gogo/protobuf/test/issue8/Makefile | 30 + .../gogo/protobuf/test/issue8/proto.pb.go | 366 + .../gogo/protobuf/test/issue8/proto.proto | 14 + .../gogo/protobuf/test/issue8/protopb_test.go | 108 + .../gogo/protobuf/test/mapsproto2/Makefile | 33 + .../mapsproto2/combos/both/mapsproto2.pb.go | 7436 +++ .../mapsproto2/combos/both/mapsproto2.proto | 115 + .../combos/both/mapsproto2pb_test.go | 752 + .../combos/marshaler/mapsproto2.pb.go | 3928 ++ .../combos/marshaler/mapsproto2.proto | 115 + .../combos/marshaler/mapsproto2pb_test.go | 752 + .../combos/neither/mapsproto2.pb.go | 3174 ++ .../combos/neither/mapsproto2.proto | 115 + .../combos/neither/mapsproto2pb_test.go | 668 + .../combos/unmarshaler/mapsproto2.pb.go | 6682 +++ .../combos/unmarshaler/mapsproto2.proto | 115 + .../combos/unmarshaler/mapsproto2pb_test.go | 668 + .../combos/unsafeboth/mapsproto2.pb.go | 7430 +++ .../combos/unsafeboth/mapsproto2.proto | 115 + .../combos/unsafeboth/mapsproto2pb_test.go | 752 + .../combos/unsafemarshaler/mapsproto2.pb.go | 3930 ++ .../combos/unsafemarshaler/mapsproto2.proto | 115 + .../unsafemarshaler/mapsproto2pb_test.go | 752 + .../combos/unsafeunmarshaler/mapsproto2.pb.go | 6675 +++ .../combos/unsafeunmarshaler/mapsproto2.proto | 115 + .../unsafeunmarshaler/mapsproto2pb_test.go | 668 + .../gogo/protobuf/test/mapsproto2/doc.go | 1 + .../protobuf/test/mapsproto2/header.proto | 67 + .../protobuf/test/mapsproto2/mapsproto2.proto | 115 + .../gogo/protobuf/test/mixbench/marshal.txt | 49 + .../gogo/protobuf/test/mixbench/marshaler.txt | 49 + .../gogo/protobuf/test/mixbench/mixbench.go | 136 + .../gogo/protobuf/test/mixbench/unmarshal.txt | 49 + .../protobuf/test/mixbench/unmarshaler.txt | 49 + .../test/mixbench/unsafe_marshaler.txt | 49 + .../test/mixbench/unsafe_unmarshaler.txt | 49 + .../gogo/protobuf/test/moredefaults/Makefile | 30 + .../gogo/protobuf/test/moredefaults/md.pb.go | 339 + .../gogo/protobuf/test/moredefaults/md.proto | 51 + .../protobuf/test/moredefaults/md_test.go | 59 + .../protobuf/test/moredefaults/mdpb_test.go | 187 + .../gogo/protobuf/test/nopackage/Makefile | 30 + .../protobuf/test/nopackage/nopackage.pb.go | 404 + .../protobuf/test/nopackage/nopackage.proto | 5 + .../protobuf/test/nopackage/nopackage_test.go | 10 + .../gogo/protobuf/test/oneof/Makefile | 31 + .../protobuf/test/oneof/combos/both/one.pb.go | 5657 +++ .../protobuf/test/oneof/combos/both/one.proto | 101 + .../test/oneof/combos/both/onepb_test.go | 743 + .../test/oneof/combos/marshaler/one.pb.go | 4741 ++ .../test/oneof/combos/marshaler/one.proto | 101 + .../test/oneof/combos/marshaler/onepb_test.go | 743 + .../test/oneof/combos/neither/one.pb.go | 4361 ++ .../test/oneof/combos/neither/one.proto | 101 + .../test/oneof/combos/neither/onepb_test.go | 631 + .../test/oneof/combos/unmarshaler/one.pb.go | 5277 ++ .../test/oneof/combos/unmarshaler/one.proto | 101 + .../oneof/combos/unmarshaler/onepb_test.go | 631 + .../test/oneof/combos/unsafeboth/one.pb.go | 5626 +++ .../test/oneof/combos/unsafeboth/one.proto | 101 + .../oneof/combos/unsafeboth/onepb_test.go | 743 + .../oneof/combos/unsafemarshaler/one.pb.go | 4752 ++ .../oneof/combos/unsafemarshaler/one.proto | 101 + .../combos/unsafemarshaler/onepb_test.go | 743 + .../oneof/combos/unsafeunmarshaler/one.pb.go | 5238 ++ .../oneof/combos/unsafeunmarshaler/one.proto | 101 + .../combos/unsafeunmarshaler/onepb_test.go | 631 + .../gogo/protobuf/test/oneof/doc.go | 1 + .../gogo/protobuf/test/oneof/one.proto | 101 + .../gogo/protobuf/test/oneof3/Makefile | 31 + .../test/oneof3/combos/both/one.pb.go | 3410 ++ .../test/oneof3/combos/both/one.proto | 80 + .../test/oneof3/combos/both/onepb_test.go | 389 + .../test/oneof3/combos/marshaler/one.pb.go | 2845 ++ .../test/oneof3/combos/marshaler/one.proto | 80 + .../oneof3/combos/marshaler/onepb_test.go | 389 + .../test/oneof3/combos/neither/one.pb.go | 2638 + .../test/oneof3/combos/neither/one.proto | 80 + .../test/oneof3/combos/neither/onepb_test.go | 333 + .../test/oneof3/combos/unmarshaler/one.pb.go | 3203 ++ .../test/oneof3/combos/unmarshaler/one.proto | 80 + .../oneof3/combos/unmarshaler/onepb_test.go | 333 + .../test/oneof3/combos/unsafeboth/one.pb.go | 3388 ++ .../test/oneof3/combos/unsafeboth/one.proto | 80 + .../oneof3/combos/unsafeboth/onepb_test.go | 389 + .../oneof3/combos/unsafemarshaler/one.pb.go | 2854 ++ .../oneof3/combos/unsafemarshaler/one.proto | 80 + .../combos/unsafemarshaler/onepb_test.go | 389 + .../oneof3/combos/unsafeunmarshaler/one.pb.go | 3175 ++ .../oneof3/combos/unsafeunmarshaler/one.proto | 80 + .../combos/unsafeunmarshaler/onepb_test.go | 333 + .../gogo/protobuf/test/oneof3/doc.go | 1 + .../gogo/protobuf/test/oneof3/one.proto | 80 + .../gogo/protobuf/test/oneofembed/Makefile | 34 + .../protobuf/test/oneofembed/oneofembed.pb.go | 411 + .../protobuf/test/oneofembed/oneofembed.proto | 18 + .../test/oneofembed/oneofembedpb_test.go | 186 + .../gogo/protobuf/test/packed/Makefile | 30 + .../gogo/protobuf/test/packed/doc.go | 1 + .../gogo/protobuf/test/packed/packed.pb.go | 3415 ++ .../gogo/protobuf/test/packed/packed.proto | 101 + .../gogo/protobuf/test/packed/packed_test.go | 321 + .../gogo/protobuf/test/protosize/Makefile | 30 + .../protobuf/test/protosize/protosize.pb.go | 616 + .../protobuf/test/protosize/protosize.proto | 18 + .../protobuf/test/protosize/protosize_test.go | 9 + .../test/protosize/protosizepb_test.go | 155 + .../gogo/protobuf/test/required/Makefile | 30 + .../test/required/requiredexample.pb.go | 2211 + .../test/required/requiredexample.proto | 55 + .../test/required/requiredexamplepb_test.go | 153 + .../protobuf/test/sizeunderscore/Makefile | 30 + .../test/sizeunderscore/sizeunderscore.pb.go | 563 + .../test/sizeunderscore/sizeunderscore.proto | 17 + .../sizeunderscore/sizeunderscorepb_test.go | 155 + .../gogo/protobuf/test/tags/Makefile | 30 + .../github.com/gogo/protobuf/test/tags/doc.go | 1 + .../gogo/protobuf/test/tags/tags.pb.go | 185 + .../gogo/protobuf/test/tags/tags.proto | 42 + .../gogo/protobuf/test/tags/tags_test.go | 117 + .../gogo/protobuf/test/theproto3/Makefile | 35 + .../test/theproto3/combos/both/proto3_test.go | 61 + .../theproto3/combos/both/theproto3.pb.go | 10578 ++++ .../theproto3/combos/both/theproto3.proto | 162 + .../theproto3/combos/both/theproto3pb_test.go | 2186 + .../theproto3/combos/marshaler/proto3_test.go | 61 + .../combos/marshaler/theproto3.pb.go | 5823 +++ .../combos/marshaler/theproto3.proto | 162 + .../combos/marshaler/theproto3pb_test.go | 2186 + .../theproto3/combos/neither/proto3_test.go | 61 + .../theproto3/combos/neither/theproto3.pb.go | 4752 ++ .../theproto3/combos/neither/theproto3.proto | 162 + .../combos/neither/theproto3pb_test.go | 1934 + .../combos/unmarshaler/proto3_test.go | 61 + .../combos/unmarshaler/theproto3.pb.go | 9508 ++++ .../combos/unmarshaler/theproto3.proto | 162 + .../combos/unmarshaler/theproto3pb_test.go | 1934 + .../combos/unsafeboth/proto3_test.go | 61 + .../combos/unsafeboth/theproto3.pb.go | 10568 ++++ .../combos/unsafeboth/theproto3.proto | 162 + .../combos/unsafeboth/theproto3pb_test.go | 2186 + .../combos/unsafemarshaler/proto3_test.go | 61 + .../combos/unsafemarshaler/theproto3.pb.go | 5827 +++ .../combos/unsafemarshaler/theproto3.proto | 162 + .../unsafemarshaler/theproto3pb_test.go | 2186 + .../combos/unsafeunmarshaler/proto3_test.go | 61 + .../combos/unsafeunmarshaler/theproto3.pb.go | 9496 ++++ .../combos/unsafeunmarshaler/theproto3.proto | 162 + .../unsafeunmarshaler/theproto3pb_test.go | 1934 + .../gogo/protobuf/test/theproto3/doc.go | 1 + .../gogo/protobuf/test/theproto3/footer.proto | 21 + .../gogo/protobuf/test/theproto3/header.proto | 93 + .../gogo/protobuf/test/theproto3/maps.proto | 48 + .../protobuf/test/theproto3/proto3_test.go.in | 61 + .../protobuf/test/theproto3/theproto3.proto | 162 + .../gogo/protobuf/test/thetest.pb.go | 24659 ++++++++++ .../gogo/protobuf/test/thetest.proto | 624 + .../gogo/protobuf/test/thetestpb_test.go | 14637 ++++++ .../protobuf/test/unmarshalmerge/Makefile | 30 + .../test/unmarshalmerge/unmarshalmerge.pb.go | 1685 + .../test/unmarshalmerge/unmarshalmerge.proto | 73 + .../unmarshalmerge/unmarshalmerge_test.go | 71 + .../unmarshalmerge/unmarshalmergepb_test.go | 700 + .../gogo/protobuf/test/unrecognized/Makefile | 30 + .../protobuf/test/unrecognized/oldnew_test.go | 198 + .../test/unrecognized/unrecognized.pb.go | 4060 ++ .../test/unrecognized/unrecognized.proto | 129 + .../test/unrecognized/unrecognizedpb_test.go | 1882 + .../protobuf/test/unrecognizedgroup/Makefile | 30 + .../test/unrecognizedgroup/oldnew_test.go | 126 + .../unrecognizedgroup/unrecognizedgroup.pb.go | 1717 + .../unrecognizedgroup/unrecognizedgroup.proto | 75 + .../unrecognizedgrouppb_test.go | 768 + vendor/github.com/gogo/protobuf/test/uuid.go | 126 + .../gogo/protobuf/test/uuid_test.go | 23 + .../gogo/protobuf/vanity/command/command.go | 152 + .../github.com/gogo/protobuf/vanity/enum.go | 78 + .../github.com/gogo/protobuf/vanity/field.go | 83 + .../github.com/gogo/protobuf/vanity/file.go | 175 + .../gogo/protobuf/vanity/foreach.go | 125 + vendor/github.com/gogo/protobuf/vanity/msg.go | 138 + .../gogo/protobuf/vanity/test/Makefile | 18 + .../gogo/protobuf/vanity/test/doc.go | 1 + .../vanity/test/fast/gogovanity.pb.go | 404 + .../protobuf/vanity/test/fast/proto3.pb.go | 308 + .../protobuf/vanity/test/fast/vanity.pb.go | 371 + .../vanity/test/faster/gogovanity.pb.go | 392 + .../protobuf/vanity/test/faster/proto3.pb.go | 309 + .../protobuf/vanity/test/faster/vanity.pb.go | 350 + .../protobuf/vanity/test/gofast/.gitignore | 1 + .../protobuf/vanity/test/gogovanity.proto | 37 + .../gogo/protobuf/vanity/test/proto3.proto | 33 + .../vanity/test/slick/gogovanity.pb.go | 507 + .../protobuf/vanity/test/slick/proto3.pb.go | 398 + .../protobuf/vanity/test/slick/vanity.pb.go | 444 + .../gogo/protobuf/vanity/test/vanity.proto | 34 + .../gogo/protobuf/vanity/test/vanity_test.go | 93 + .../gogo/protobuf/version/version.go | 78 + vendor/github.com/golang/protobuf/.gitignore | 15 + vendor/github.com/golang/protobuf/.gitrepo | 11 + .../golang/protobuf/jsonpb/jsonpb.go | 799 + .../golang/protobuf/jsonpb/jsonpb_test.go | 548 + .../jsonpb/jsonpb_test_proto/Makefile | 33 + .../jsonpb_test_proto/more_test_objects.pb.go | 163 + .../jsonpb_test_proto/more_test_objects.proto | 53 + .../jsonpb_test_proto/test_objects.pb.go | 739 + .../jsonpb_test_proto/test_objects.proto | 134 + .../golang/protobuf/proto/all_test.go | 2252 + .../golang/protobuf/proto/any_test.go | 272 + .../golang/protobuf/proto/clone_test.go | 267 + .../golang/protobuf/proto/equal_test.go | 212 + .../golang/protobuf/proto/extensions_test.go | 455 + .../golang/protobuf/proto/message_set_test.go | 66 + .../golang/protobuf/proto/properties.go | 14 + .../protobuf/proto/proto3_proto/proto3.pb.go | 198 + .../protobuf/proto/proto3_proto/proto3.proto | 73 + .../golang/protobuf/proto/proto3_test.go | 125 + .../golang/protobuf/proto/size2_test.go | 63 + .../golang/protobuf/proto/size_test.go | 164 + .../golang/protobuf/proto/testdata/Makefile | 50 + .../protobuf/proto/testdata/golden_test.go | 86 + .../golang/protobuf/proto/testdata/test.pb.go | 4004 ++ .../golang/protobuf/proto/testdata/test.proto | 540 + .../golang/protobuf/proto/text_parser_test.go | 573 + .../golang/protobuf/proto/text_test.go | 474 + .../golang/protobuf/protoc-gen-go/Makefile | 33 + .../protoc-gen-go/descriptor/Makefile | 39 + .../protoc-gen-go/descriptor/descriptor.pb.go | 2037 + .../golang/protobuf/protoc-gen-go/doc.go | 51 + .../protobuf/protoc-gen-go/generator/Makefile | 40 + .../protoc-gen-go/generator/generator.go | 2778 ++ .../protoc-gen-go/generator/name_test.go | 85 + .../protobuf/protoc-gen-go/grpc/grpc.go | 462 + .../protobuf/protoc-gen-go/link_grpc.go | 34 + .../golang/protobuf/protoc-gen-go/main.go | 98 + .../protobuf/protoc-gen-go/plugin/Makefile | 45 + .../protoc-gen-go/plugin/plugin.pb.go | 229 + .../protoc-gen-go/plugin/plugin.pb.golden | 83 + .../protobuf/protoc-gen-go/testdata/Makefile | 72 + .../testdata/extension_base.proto | 46 + .../testdata/extension_extra.proto | 38 + .../protoc-gen-go/testdata/extension_test.go | 210 + .../testdata/extension_user.proto | 100 + .../protoc-gen-go/testdata/grpc.proto | 59 + .../protoc-gen-go/testdata/imp.pb.go.golden | 113 + .../protobuf/protoc-gen-go/testdata/imp.proto | 70 + .../protoc-gen-go/testdata/imp2.proto | 43 + .../protoc-gen-go/testdata/imp3.proto | 38 + .../protoc-gen-go/testdata/main_test.go | 46 + .../protoc-gen-go/testdata/multi/multi1.proto | 44 + .../protoc-gen-go/testdata/multi/multi2.proto | 46 + .../protoc-gen-go/testdata/multi/multi3.proto | 43 + .../protoc-gen-go/testdata/my_test/test.pb.go | 882 + .../testdata/my_test/test.pb.go.golden | 882 + .../protoc-gen-go/testdata/my_test/test.proto | 156 + .../protoc-gen-go/testdata/proto3.proto | 52 + .../github.com/golang/protobuf/ptypes/any.go | 136 + .../golang/protobuf/ptypes/any/any.pb.go | 145 + .../golang/protobuf/ptypes/any/any.proto | 130 + .../golang/protobuf/ptypes/any_test.go | 113 + .../github.com/golang/protobuf/ptypes/doc.go | 35 + .../golang/protobuf/ptypes/duration.go | 102 + .../protobuf/ptypes/duration/duration.pb.go | 114 + .../protobuf/ptypes/duration/duration.proto | 98 + .../golang/protobuf/ptypes/duration_test.go | 121 + .../golang/protobuf/ptypes/empty/empty.pb.go | 69 + .../golang/protobuf/ptypes/empty/empty.proto | 53 + .../golang/protobuf/ptypes/regen.sh | 66 + .../protobuf/ptypes/struct/struct.pb.go | 382 + .../protobuf/ptypes/struct/struct.proto | 96 + .../golang/protobuf/ptypes/timestamp.go | 125 + .../protobuf/ptypes/timestamp/timestamp.pb.go | 126 + .../protobuf/ptypes/timestamp/timestamp.proto | 111 + .../golang/protobuf/ptypes/timestamp_test.go | 138 + .../protobuf/ptypes/wrappers/wrappers.pb.go | 200 + .../protobuf/ptypes/wrappers/wrappers.proto | 119 + vendor/github.com/gorhill/cronexpr/.gitrepo | 11 + .../gorhill/cronexpr/cronexpr/README.md | 122 + .../gorhill/cronexpr/cronexpr/main.go | 111 + .../gorhill/cronexpr/cronexpr_test.go | 321 + .../gorhill/cronexpr/example_test.go | 37 + .../influxdata/influxdb/.dockerignore | 1 + .../influxdata/influxdb/.gitattributes | 1 + .../influxdb/.github/ISSUE_TEMPLATE.md | 39 + .../influxdb/.github/PULL_REQUEST_TEMPLATE.md | 9 + .../github.com/influxdata/influxdb/.gitignore | 79 + .../github.com/influxdata/influxdb/.gitrepo | 11 + .../influxdata/influxdb/.hooks/pre-commit | 23 + .../influxdata/influxdb/.mention-bot | 6 + .../influxdata/influxdb/CHANGELOG.md | 6 +- .../influxdb/client/example_test.go | 113 + .../influxdb/client/influxdb_test.go | 831 + .../influxdb/client/v2/client_test.go | 418 + .../influxdb/client/v2/example_test.go | 265 + .../influxdata/influxdb/cmd/influx/cli/cli.go | 858 + .../influxdb/cmd/influx/cli/cli_test.go | 514 + .../influxdata/influxdb/cmd/influx/main.go | 116 + .../influxdb/cmd/influx_inspect/export.go | 92 + .../influxdb/cmd/influx_inspect/info.go | 100 + .../influxdb/cmd/influx_inspect/main.go | 154 + .../influxdb/cmd/influx_inspect/tsm.go | 654 + .../influxdb/cmd/influx_inspect/verify.go | 78 + .../influxdb/cmd/influx_stress/README.md | 43 + .../cmd/influx_stress/examples/template.toml | 92 + .../cmd/influx_stress/influx_stress.go | 70 + .../influxdb/cmd/influx_tsm/README.md | 152 + .../influxdb/cmd/influx_tsm/b1/reader.go | 268 + .../influxdb/cmd/influx_tsm/bz1/reader.go | 370 + .../influxdb/cmd/influx_tsm/converter.go | 118 + .../influxdb/cmd/influx_tsm/main.go | 413 + .../influxdb/cmd/influx_tsm/stats/stats.go | 47 + .../influxdb/cmd/influx_tsm/tracker.go | 130 + .../influxdb/cmd/influx_tsm/tsdb/codec.go | 119 + .../influxdb/cmd/influx_tsm/tsdb/database.go | 239 + .../cmd/influx_tsm/tsdb/internal/meta.pb.go | 122 + .../influxdb/cmd/influx_tsm/tsdb/types.go | 60 + .../influxdb/cmd/influxd/backup/backup.go | 377 + .../influxdb/cmd/influxd/help/help.go | 46 + .../influxdata/influxdb/cmd/influxd/main.go | 203 + .../influxdb/cmd/influxd/restore/restore.go | 387 + .../cmd/influxd/run/backup_restore_test.go | 106 + .../influxdb/cmd/influxd/run/command.go | 264 + .../influxdb/cmd/influxd/run/config.go | 291 + .../cmd/influxd/run/config_command.go | 78 + .../influxdb/cmd/influxd/run/config_test.go | 261 + .../influxdb/cmd/influxd/run/server.go | 522 + .../cmd/influxd/run/server_bench_test.go | 90 + .../cmd/influxd/run/server_dataonly.go | 27 + .../cmd/influxd/run/server_default.go | 149 + .../cmd/influxd/run/server_helpers_test.go | 481 + .../cmd/influxd/run/server_suite_test.go | 481 + .../influxdb/cmd/influxd/run/server_test.go | 6406 +++ .../influxdb/cmd/influxd/run/server_test.md | 150 + .../influxdata/influxdb/coordinator/config.go | 47 + .../influxdb/coordinator/config_test.go | 24 + .../influxdb/coordinator/meta_client.go | 36 + .../influxdb/coordinator/meta_client_test.go | 164 + .../influxdb/coordinator/points_writer.go | 299 + .../coordinator/points_writer_test.go | 513 + .../coordinator/statement_executor.go | 1256 + .../coordinator/statement_executor_test.go | 334 + .../influxdata/influxdb/etc/burn-in/.rvmrc | 1 + .../influxdata/influxdb/etc/burn-in/Gemfile | 4 + .../influxdb/etc/burn-in/Gemfile.lock | 14 + .../influxdb/etc/burn-in/burn-in.rb | 79 + .../influxdata/influxdb/etc/burn-in/log.rb | 23 + .../influxdb/etc/burn-in/random_gaussian.rb | 31 + .../influxdb/etc/burn-in/random_points.rb | 29 + .../influxdb/etc/config.sample.toml | 303 + .../influxdata/influxdb/importer/README.md | 193 + .../influxdb/importer/v8/importer.go | 248 + .../influxdata/influxdb/influxql/ast_test.go | 1321 + .../influxdb/influxql/call_iterator_test.go | 750 + .../influxdb/influxql/emitter_test.go | 124 + .../influxdb/influxql/functions_test.go | 386 + .../influxdb/influxql/internal/internal.pb.go | 52 - .../influxdb/influxql/internal/internal.proto | 10 - .../influxdb/influxql/iterator.gen.go | 208 + .../influxdb/influxql/iterator.gen.go.tmpl | 54 +- .../influxdata/influxdb/influxql/iterator.go | 135 +- .../influxdb/influxql/iterator_test.go | 1213 + .../influxql/neldermead/neldermead_test.go | 64 + .../influxdata/influxdb/influxql/parser.go | 4 +- .../influxdb/influxql/parser_test.go | 2874 ++ .../influxdb/influxql/point_test.go | 187 + .../influxdb/influxql/query_executor.go | 48 +- .../influxdb/influxql/query_executor_test.go | 280 + .../influxdb/influxql/sanitize_test.go | 49 + .../influxdb/influxql/scanner_test.go | 300 + .../influxdb/influxql/select_test.go | 2431 + .../influxql/statement_rewriter_test.go | 133 + .../influxdata/influxdb/models/points_test.go | 1848 + .../influxdb/monitor/config_test.go | 30 + .../influxdata/influxdb/monitor/service.go | 40 +- .../influxdata/influxdb/pkg/deep/equal.go | 184 + .../influxdb/pkg/escape/bytes_test.go | 45 + .../influxdata/influxdb/pkg/slices/strings.go | 40 + .../influxdb/scripts/influxdb.service | 21 + .../influxdata/influxdb/scripts/init.sh | 242 + .../influxdata/influxdb/scripts/logrotate | 8 + .../influxdb/scripts/post-install.sh | 73 + .../influxdb/scripts/post-uninstall.sh | 56 + .../influxdb/scripts/pre-install.sh | 16 + .../influxdb/services/admin/README.md | 23 + .../influxdb/services/admin/admin.go | 4 + .../influxdb/services/admin/assets/README.md | 4 + .../services/admin/assets/css/admin.css | 87 + .../services/admin/assets/css/bootstrap.css | 6584 +++ .../assets/css/dropdowns-enhancement.css | 294 + .../fonts/glyphicons-halflings-regular.eot | Bin 0 -> 20127 bytes .../fonts/glyphicons-halflings-regular.svg | 288 + .../fonts/glyphicons-halflings-regular.ttf | Bin 0 -> 45404 bytes .../fonts/glyphicons-halflings-regular.woff | Bin 0 -> 23424 bytes .../fonts/glyphicons-halflings-regular.woff2 | Bin 0 -> 18028 bytes .../admin/assets/img/influxdb-light400.png | Bin 0 -> 19775 bytes .../influxdb/services/admin/assets/index.html | 222 + .../services/admin/assets/js/admin.js | 521 + .../assets/js/vendor/bootstrap-3.3.5.min.js | 7 + .../assets/js/vendor/jquery-2.1.4.min.js | 4 + .../assets/js/vendor/react-0.13.3.min.js | 16 + .../influxdb/services/admin/config.go | 24 + .../influxdb/services/admin/config_test.go | 32 + .../influxdb/services/admin/service.go | 122 + .../influxdb/services/admin/service_test.go | 33 + .../influxdb/services/admin/statik/README.md | 3 + .../influxdb/services/admin/statik/statik.go | 10 + .../influxdb/services/collectd/config_test.go | 32 + .../services/collectd/service_test.go | 496 + .../services/collectd/test_client/README.md | 3 + .../services/collectd/test_client/client.go | 71 + .../services/continuous_querier/config.go | 36 + .../continuous_querier/config_test.go | 27 + .../continuous_querier/continuous_queries.md | 235 + .../services/continuous_querier/service.go | 444 + .../continuous_querier/service_test.go | 588 + .../influxdb/services/graphite/config.go | 3 +- .../influxdb/services/graphite/config_test.go | 170 + .../influxdb/services/graphite/parser_test.go | 709 + .../influxdb/services/graphite/service.go | 60 +- .../services/graphite/service_test.go | 202 + .../influxdb/services/httpd/config.go | 32 + .../influxdb/services/httpd/config_test.go | 52 + .../influxdb/services/httpd/handler.go | 991 + .../influxdb/services/httpd/handler_test.go | 547 + .../influxdb/services/httpd/listen.go | 51 + .../influxdb/services/httpd/listen_test.go | 96 + .../services/httpd/response_logger.go | 167 + .../influxdb/services/httpd/service.go | 170 + .../influxdb/services/meta/client.go | 21 +- .../influxdb/services/meta/client_test.go | 869 + .../influxdb/services/meta/config.go | 17 +- .../influxdb/services/meta/config_test.go | 26 + .../influxdata/influxdb/services/meta/data.go | 59 +- .../influxdb/services/meta/data_test.go | 31 + .../services/meta/internal/meta.pb.go | 8 + .../services/meta/internal/meta.proto | 1 + .../influxdb/services/meta/meta_test.go | 7 + .../influxdb/services/opentsdb/config_test.go | 41 + .../services/opentsdb/service_test.go | 170 + .../influxdb/services/precreator/README.md | 13 + .../influxdb/services/precreator/config.go | 32 + .../services/precreator/config_test.go | 31 + .../influxdb/services/precreator/service.go | 96 + .../services/precreator/service_test.go | 55 + .../influxdb/services/retention/config.go | 18 + .../services/retention/config_test.go | 27 + .../influxdb/services/retention/service.go | 135 + .../influxdb/services/snapshotter/client.go | 77 + .../influxdb/services/snapshotter/service.go | 286 + .../services/snapshotter/service_test.go | 1 + .../influxdb/services/subscriber/config.go | 35 + .../services/subscriber/config_test.go | 23 + .../influxdb/services/subscriber/http.go | 39 + .../influxdb/services/subscriber/service.go | 363 + .../services/subscriber/service_test.go | 443 + .../influxdb/services/subscriber/udp.go | 42 + .../influxdb/services/udp/config_test.go | 43 + .../influxdata/influxdb/stress/DESIGN.md | 47 + .../influxdata/influxdb/stress/README.md | 115 + .../influxdata/influxdb/stress/basic.go | 706 + .../influxdata/influxdb/stress/config.go | 147 + .../influxdata/influxdb/stress/run.go | 335 + .../influxdata/influxdb/stress/stress.toml | 54 + .../influxdata/influxdb/stress/stress_test.go | 599 + .../stress/stress_test_server/server.go | 73 + .../influxdata/influxdb/stress/template.go | 64 + .../influxdata/influxdb/stress/util.go | 132 + .../influxdata/influxdb/stress/v2/.gitignore | 3 + .../influxdata/influxdb/stress/v2/DESIGN.md | 164 + .../influxdata/influxdb/stress/v2/README.md | 159 + .../influxdata/influxdb/stress/v2/file.iql | 45 + .../influxdb/stress/v2/influx_stress_v2.png | Bin 0 -> 93150 bytes .../influxdata/influxdb/stress/v2/main.go | 59 + .../influxdb/stress/v2/ponyExpress/commune.go | 58 + .../stress/v2/ponyExpress/commune_test.go | 49 + .../stress/v2/ponyExpress/directive.go | 19 + .../stress/v2/ponyExpress/directive_test.go | 20 + .../influxdb/stress/v2/ponyExpress/package.go | 22 + .../stress/v2/ponyExpress/package_test.go | 16 + .../stress/v2/ponyExpress/ponyExpress.go | 172 + .../v2/ponyExpress/ponyExpress_query.go | 69 + .../v2/ponyExpress/ponyExpress_write.go | 107 + .../stress/v2/ponyExpress/reporting.go | 95 + .../stress/v2/ponyExpress/reporting_test.go | 92 + .../stress/v2/ponyExpress/response.go | 45 + .../stress/v2/ponyExpress/response_test.go | 17 + .../stress/v2/ponyExpress/storeFront.go | 209 + .../stress/v2/ponyExpress/storeFront_test.go | 33 + .../influxdb/stress/v2/ponyExpress/tracer.go | 19 + .../stress/v2/ponyExpress/tracer_test.go | 17 + .../influxdb/stress/v2/ponyExpress/util.go | 89 + .../influxdb/stress/v2/statement/exec.go | 32 + .../influxdb/stress/v2/statement/exec_test.go | 41 + .../influxdb/stress/v2/statement/function.go | 176 + .../stress/v2/statement/function_test.go | 143 + .../influxdb/stress/v2/statement/go.go | 33 + .../influxdb/stress/v2/statement/go_test.go | 41 + .../influxdb/stress/v2/statement/influxql.go | 69 + .../stress/v2/statement/influxql_test.go | 44 + .../influxdb/stress/v2/statement/insert.go | 214 + .../stress/v2/statement/insert_test.go | 50 + .../influxdb/stress/v2/statement/query.go | 158 + .../stress/v2/statement/query_test.go | 42 + .../influxdb/stress/v2/statement/report.go | 237 + .../stress/v2/statement/report_test.go | 210 + .../stress/v2/statement/response_time.go | 40 + .../stress/v2/statement/response_time_test.go | 45 + .../influxdb/stress/v2/statement/set.go | 87 + .../influxdb/stress/v2/statement/set_test.go | 96 + .../influxdb/stress/v2/statement/statement.go | 32 + .../influxdb/stress/v2/statement/template.go | 47 + .../stress/v2/statement/template_test.go | 72 + .../influxdb/stress/v2/statement/timestamp.go | 51 + .../stress/v2/statement/timestamp_test.go | 31 + .../influxdb/stress/v2/statement/wait.go | 32 + .../influxdb/stress/v2/statement/wait_test.go | 41 + .../influxdb/stress/v2/stressql/parser.go | 158 + .../stress/v2/stressql/parser_test.go | 16 + .../stress/v2/stressql/statement/parser.go | 725 + .../v2/stressql/statement/parser_test.go | 243 + .../github.com/influxdata/influxdb/tcp/mux.go | 236 + .../influxdata/influxdb/tcp/mux_test.go | 137 + .../influxdata/influxdb/tests/README.md | 4 + .../influxdb/tests/create_future_writes.sh | 22 + .../tests/create_write_multiple_query.sh | 14 + .../tests/create_write_single_query.sh | 19 + ..._with_multiple_measurements_values_tags.sh | 23 + ...e_write_single_with_multiple_tags_query.sh | 11 + .../influxdb/tests/distinct-data-scenarios.sh | 35 + .../influxdb/tests/read_write_gzip.sh | 15 + .../influxdb/tests/siege/.gitignore | 1 + .../influxdata/influxdb/tests/siege/README.md | 66 + .../influxdata/influxdb/tests/siege/urlgen | 107 + .../influxdata/influxdb/tests/tmux/3_shards | 28 + .../influxdata/influxdb/tests/tmux/README.md | 31 + .../influxdb/tests/tmux/sample.json | 16000 ++++++ .../influxdata/influxdb/tests/tmux/seed.sh | 13 + .../influxdb/tests/tmux/server_8086.toml | 7 + .../influxdb/tests/tmux/server_8087.toml | 7 + .../influxdb/tests/tmux/server_8088.toml | 7 + .../influxdb/tests/urlgen/urlgen.go | 58 + .../influxdata/influxdb/toml/toml_test.go | 45 + .../influxdata/influxdb/tsdb/batcher_test.go | 146 + .../influxdata/influxdb/tsdb/config_test.go | 48 + .../influxdata/influxdb/tsdb/cursor_test.go | 514 + .../influxdata/influxdb/tsdb/engine/engine.go | 6 + .../influxdb/tsdb/engine/tsm1/DESIGN.md | 451 + .../influxdb/tsdb/engine/tsm1/bit_reader.go | 132 + .../tsdb/engine/tsm1/bit_reader_test.go | 177 + .../influxdb/tsdb/engine/tsm1/bool.go | 134 + .../influxdb/tsdb/engine/tsm1/bool_test.go | 115 + .../influxdb/tsdb/engine/tsm1/cache.go | 600 + .../tsdb/engine/tsm1/cache_race_test.go | 180 + .../influxdb/tsdb/engine/tsm1/cache_test.go | 660 + .../influxdb/tsdb/engine/tsm1/compact.go | 1153 + .../influxdb/tsdb/engine/tsm1/compact_test.go | 1623 + .../influxdb/tsdb/engine/tsm1/cursor.go | 77 + .../influxdb/tsdb/engine/tsm1/encoding.gen.go | 752 + .../tsdb/engine/tsm1/encoding.gen.go.tmpl | 160 + .../tsdb/engine/tsm1/encoding.gen.go.tmpldata | 22 + .../influxdb/tsdb/engine/tsm1/encoding.go | 607 + .../tsdb/engine/tsm1/encoding_test.go | 1309 + .../influxdb/tsdb/engine/tsm1/engine.go | 1312 + .../influxdb/tsdb/engine/tsm1/engine_test.go | 795 + .../tsdb/engine/tsm1/file_store.gen.go | 547 + .../tsdb/engine/tsm1/file_store.gen.go.tmpl | 139 + .../engine/tsm1/file_store.gen.go.tmpldata | 18 + .../influxdb/tsdb/engine/tsm1/file_store.go | 957 + .../tsdb/engine/tsm1/file_store_test.go | 1696 + .../influxdb/tsdb/engine/tsm1/file_unix.go | 20 + .../influxdb/tsdb/engine/tsm1/file_windows.go | 18 + .../influxdb/tsdb/engine/tsm1/float.go | 257 + .../influxdb/tsdb/engine/tsm1/float_test.go | 275 + .../influxdb/tsdb/engine/tsm1/int.go | 282 + .../influxdb/tsdb/engine/tsm1/int_test.go | 539 + .../influxdb/tsdb/engine/tsm1/iterator.gen.go | 1750 + .../tsdb/engine/tsm1/iterator.gen.go.tmpl | 519 + .../tsdb/engine/tsm1/iterator.gen.go.tmpldata | 30 + .../influxdb/tsdb/engine/tsm1/iterator.go | 44 + .../influxdb/tsdb/engine/tsm1/mmap_solaris.go | 32 + .../influxdb/tsdb/engine/tsm1/mmap_unix.go | 31 + .../influxdb/tsdb/engine/tsm1/mmap_windows.go | 117 + .../influxdb/tsdb/engine/tsm1/pools.go | 147 + .../influxdb/tsdb/engine/tsm1/reader.go | 1127 + .../influxdb/tsdb/engine/tsm1/reader_test.go | 1269 + .../influxdb/tsdb/engine/tsm1/string.go | 92 + .../influxdb/tsdb/engine/tsm1/string_test.go | 127 + .../influxdb/tsdb/engine/tsm1/timestamp.go | 351 + .../tsdb/engine/tsm1/timestamp_test.go | 584 + .../influxdb/tsdb/engine/tsm1/tombstone.go | 296 + .../tsdb/engine/tsm1/tombstone_test.go | 203 + .../influxdb/tsdb/engine/tsm1/wal.go | 977 + .../influxdb/tsdb/engine/tsm1/wal_test.go | 732 + .../influxdb/tsdb/engine/tsm1/writer.go | 599 + .../influxdb/tsdb/engine/tsm1/writer_test.go | 632 + .../influxdata/influxdb/tsdb/meta.go | 35 +- .../influxdata/influxdb/tsdb/meta_test.go | 302 + .../influxdata/influxdb/tsdb/shard.go | 2 +- .../influxdata/influxdb/tsdb/shard_test.go | 583 + .../influxdata/influxdb/tsdb/store_test.go | 532 + .../influxdata/usage-client/.gitignore | 29 + .../influxdata/usage-client/.gitrepo | 11 + .../usage-client/LICENSE.txt | 0 .../usage-client/README.md | 0 .../usage-client/circle.yml | 0 .../usage-client/v1/client.go | 0 .../influxdata/usage-client/v1/client_test.go | 112 + .../usage-client/v1/errors.go | 0 .../usage-client/v1/registration.go | 0 .../usage-client/v1/registration_test.go | 55 + .../usage-client/v1/server.go | 0 .../influxdata/usage-client/v1/server_test.go | 35 + .../usage-client/v1/stats.go | 0 .../influxdata/usage-client/v1/stats_test.go | 49 + .../usage-client/v1/tags.go | 0 .../usage-client/v1/usage.go | 0 .../influxdata/usage-client/v1/usage_test.go | 48 + .../usage-client/v1/values.go | 0 vendor/github.com/influxdata/wlog/.gitrepo | 11 + vendor/github.com/kimor79/gollectd/.gitignore | 24 + vendor/github.com/kimor79/gollectd/.gitrepo | 11 + .../examples/parse_typesdb/parse_typesdb.go | 33 + .../kimor79/gollectd/examples/server.go | 59 + .../kimor79/gollectd/gollectd_test.go | 417 + vendor/github.com/mattn/go-runewidth/.gitrepo | 11 + .../github.com/mattn/go-runewidth/.travis.yml | 8 + .../mattn/go-runewidth/runewidth_test.go | 229 + vendor/github.com/pkg/errors/.gitignore | 24 + vendor/github.com/pkg/errors/.gitrepo | 11 + vendor/github.com/pkg/errors/.travis.yml | 10 + vendor/github.com/pkg/errors/README.md | 19 +- vendor/github.com/pkg/errors/appveyor.yml | 32 + vendor/github.com/pkg/errors/errors.go | 223 +- vendor/github.com/pkg/errors/errors_test.go | 211 + vendor/github.com/pkg/errors/example_test.go | 87 + vendor/github.com/pkg/errors/format_test.go | 86 + vendor/github.com/pkg/errors/stack.go | 144 + vendor/github.com/pkg/errors/stack_test.go | 225 + .../github.com/pmezard/go-difflib/README.md | 50 - .../russross/blackfriday/.gitignore | 8 + .../github.com/russross/blackfriday/.gitrepo | 11 + .../russross/blackfriday/.travis.yml | 30 + .../russross/blackfriday/block_test.go | 1638 + .../russross/blackfriday/inline_test.go | 1198 + .../russross/blackfriday/ref_test.go | 128 + .../testdata/Amps and angle encoding.html | 17 + .../testdata/Amps and angle encoding.text | 21 + .../blackfriday/testdata/Auto links.html | 18 + .../blackfriday/testdata/Auto links.text | 13 + .../testdata/Backslash escapes.html | 123 + .../testdata/Backslash escapes.text | 126 + .../Blockquotes with code blocks.html | 15 + .../Blockquotes with code blocks.text | 11 + .../blackfriday/testdata/Code Blocks.html | 18 + .../blackfriday/testdata/Code Blocks.text | 14 + .../blackfriday/testdata/Code Spans.html | 5 + .../blackfriday/testdata/Code Spans.text | 6 + ...like lines no empty line before block.html | 14 + ...like lines no empty line before block.text | 8 + ...apped paragraphs with list-like lines.html | 8 + ...apped paragraphs with list-like lines.text | 8 + .../testdata/Horizontal rules.html | 71 + .../testdata/Horizontal rules.text | 67 + .../testdata/Inline HTML (Advanced).html | 15 + .../testdata/Inline HTML (Advanced).text | 15 + .../testdata/Inline HTML (Simple).html | 72 + .../testdata/Inline HTML (Simple).text | 69 + .../testdata/Inline HTML comments.html | 13 + .../testdata/Inline HTML comments.text | 13 + .../testdata/Links, inline style.html | 11 + .../testdata/Links, inline style.text | 12 + .../testdata/Links, reference style.html | 52 + .../testdata/Links, reference style.text | 71 + .../testdata/Links, shortcut references.html | 9 + .../testdata/Links, shortcut references.text | 20 + .../testdata/Literal quotes in titles.html | 3 + .../testdata/Literal quotes in titles.text | 7 + .../Markdown Documentation - Basics.html | 314 + .../Markdown Documentation - Basics.text | 306 + .../Markdown Documentation - Syntax.html | 946 + .../Markdown Documentation - Syntax.text | 888 + .../testdata/Nested blockquotes.html | 9 + .../testdata/Nested blockquotes.text | 5 + .../testdata/Ordered and unordered lists.html | 166 + .../testdata/Ordered and unordered lists.text | 131 + .../testdata/Strong and em together.html | 7 + .../testdata/Strong and em together.text | 7 + .../russross/blackfriday/testdata/Tabs.html | 26 + .../russross/blackfriday/testdata/Tabs.text | 21 + .../blackfriday/testdata/Tidyness.html | 9 + .../blackfriday/testdata/Tidyness.text | 5 + vendor/github.com/serenize/snaker/.gitrepo | 11 + vendor/github.com/serenize/snaker/.travis.yml | 8 + .../serenize/snaker/snaker_suite_test.go | 13 + .../github.com/serenize/snaker/snaker_test.go | 82 + vendor/github.com/shurcooL/go/.gitrepo | 11 + vendor/github.com/shurcooL/go/.travis.yml | 16 + .../go/analysis/generated_detection.go | 44 + .../go/analysis/generated_detection_test.go | 28 + .../go/analysis/testdata/generated_0.go.txt | 32 + .../go/analysis/testdata/handcrafted_0.go.txt | 9 + .../go/analysis/testdata/handcrafted_1.go.txt | 1 + vendor/github.com/shurcooL/go/gddo/gddo.go | 52 + .../github.com/shurcooL/go/gfmutil/gfmutil.go | 38 + .../github.com/shurcooL/go/gopathutil/doc.go | 2 + .../shurcooL/go/gopathutil/gopathutil.go | 117 + .../github.com/shurcooL/go/gopathutil/stub.go | 12 + .../go/gopherjs_http/gopherjs_http.go | 301 + .../go/gopherjs_http/jsutil/jsutil.go | 70 + .../shurcooL/go/gopherjs_http/package.go | 28 + .../shurcooL/go/gopherjs_http/vfs.go | 231 + .../go/gzip_file_server/gzip_file_server.go | 224 + .../go/httpstoppable/httpstoppable.go | 52 + .../go/importgraphutil/importgraphutil.go | 82 + .../go/indentwriter/indentwriter_test.go | 31 + .../github.com/shurcooL/go/ioutil/ioutil.go | 22 + vendor/github.com/shurcooL/go/open/open.go | 27 + .../shurcooL/go/openutil/openutil.go | 44 + .../github.com/shurcooL/go/ospath/ospath.go | 49 + .../github.com/shurcooL/go/osutil/environ.go | 30 + .../shurcooL/go/parserutil/parserutil.go | 30 + .../shurcooL/go/parserutil/parserutil_test.go | 53 + vendor/github.com/shurcooL/go/pipeutil/dir.go | 28 + .../shurcooL/go/pipeutil/pipeutil.go | 72 + .../shurcooL/go/printerutil/printerutil.go | 36 + .../shurcooL/go/reflectfind/reflectfind.go | 112 + .../shurcooL/go/reflectsource/callername.go | 219 + .../go/reflectsource/callername_test.go | 39 + .../shurcooL/go/reflectsource/doc.go | 9 + .../shurcooL/go/reflectsource/funcsource.go | 82 + .../go/reflectsource/funcsource_test.go | 69 + .../shurcooL/go/reflectsource/indicies.go | 29 + .../go/reflectsource/indicies_test.go | 31 + .../shurcooL/go/timeutil/timeutil.go | 9 + vendor/github.com/shurcooL/go/trash/doc.go | 2 + vendor/github.com/shurcooL/go/trash/trash.go | 10 + .../shurcooL/go/trash/trash_darwin.go | 41 + vendor/github.com/shurcooL/go/trim/trim.go | 18 + .../github.com/shurcooL/go/trim/trim_test.go | 37 + .../go/vfs/godocfs/godocfs/godocfs.go | 37 + .../godocfs/html/vfstemplate/vfstemplate.go | 72 + .../go/vfs/godocfs/path/vfspath/match.go | 104 + .../shurcooL/go/vfs/godocfs/vfsutil/walk.go | 76 + .../go/vfs/godocfs/vfsutil/walk_test.go | 44 + .../github.com/shurcooL/markdownfmt/.gitrepo | 11 + .../shurcooL/markdownfmt/.travis.yml | 17 + .../markdownfmt/markdown/main_test.go | 447 + .../markdownfmt/markdown/stringwidth_test.go | 40 + .../shurcooL/sanitized_anchor_name/.gitrepo | 11 + .../sanitized_anchor_name/.travis.yml | 10 + .../sanitized_anchor_name/main_test.go | 35 + vendor/github.com/stretchr/testify/.gitignore | 24 + vendor/github.com/stretchr/testify/.gitrepo | 11 + .../github.com/stretchr/testify/.travis.yml | 15 + .../stretchr/testify/Godeps/Godeps.json | 21 + .../github.com/stretchr/testify/Godeps/Readme | 5 + .../stretchr/testify/_codegen/main.go | 287 + .../testify/assert/assertions_test.go | 1122 + .../testify/assert/forward_assertions_test.go | 611 + .../testify/assert/http_assertions_test.go | 86 + .../github.com/stretchr/testify/http/doc.go | 2 + .../testify/http/test_response_writer.go | 49 + .../testify/http/test_round_tripper.go | 17 + .../github.com/stretchr/testify/mock/doc.go | 44 + .../github.com/stretchr/testify/mock/mock.go | 693 + .../stretchr/testify/mock/mock_test.go | 1130 + .../stretchr/testify/package_test.go | 12 + .../stretchr/testify/require/doc.go | 28 + .../testify/require/forward_requirements.go | 16 + .../require/forward_requirements_test.go | 385 + .../stretchr/testify/require/require.go | 464 + .../stretchr/testify/require/require.go.tmpl | 6 + .../testify/require/require_forward.go | 388 + .../testify/require/require_forward.go.tmpl | 4 + .../stretchr/testify/require/requirements.go | 9 + .../testify/require/requirements_test.go | 369 + .../github.com/stretchr/testify/suite/doc.go | 65 + .../stretchr/testify/suite/interfaces.go | 34 + .../stretchr/testify/suite/suite.go | 115 + .../stretchr/testify/suite/suite_test.go | 239 + .../github.com}/davecgh/go-spew/LICENSE | 0 .../davecgh/go-spew/spew/bypass.go | 0 .../davecgh/go-spew/spew/bypasssafe.go | 0 .../davecgh/go-spew/spew/common.go | 0 .../davecgh/go-spew/spew/config.go | 0 .../github.com}/davecgh/go-spew/spew/doc.go | 0 .../github.com}/davecgh/go-spew/spew/dump.go | 0 .../davecgh/go-spew/spew/format.go | 0 .../github.com}/davecgh/go-spew/spew/spew.go | 0 .../github.com}/pmezard/go-difflib/LICENSE | 0 .../pmezard/go-difflib/difflib/difflib.go | 54 +- .../github.com/stretchr/objx/.gitignore | 22 + .../github.com/stretchr/objx/LICENSE.md | 23 + .../vendor/github.com/stretchr/objx/README.md | 3 + .../github.com/stretchr/objx/accessors.go | 179 + .../stretchr/objx/codegen/array-access.txt | 14 + .../stretchr/objx/codegen/index.html | 86 + .../stretchr/objx/codegen/template.txt | 286 + .../stretchr/objx/codegen/types_list.txt | 20 + .../github.com/stretchr/objx/constants.go | 13 + .../github.com/stretchr/objx/conversions.go | 117 + .../vendor/github.com/stretchr/objx/doc.go | 72 + .../vendor/github.com/stretchr/objx/map.go | 222 + .../github.com/stretchr/objx/mutations.go | 81 + .../github.com/stretchr/objx/security.go | 14 + .../vendor/github.com/stretchr/objx/tests.go | 17 + .../stretchr/objx/type_specific_codegen.go | 2881 ++ .../vendor/github.com/stretchr/objx/value.go | 13 + vendor/github.com/twinj/uuid/.gitignore | 4 + vendor/github.com/twinj/uuid/.gitrepo | 11 + vendor/github.com/twinj/uuid/.travis.yml | 13 + vendor/github.com/twinj/uuid/README.md | 18 +- vendor/github.com/twinj/uuid/appveyor.yml | 4 +- vendor/github.com/twinj/uuid/array.go | 50 +- vendor/github.com/twinj/uuid/array_test.go | 139 + .../github.com/twinj/uuid/benchmarks_test.go | 59 + .../twinj/uuid/{state.go => generator.go} | 149 +- .../github.com/twinj/uuid/generator_test.go | 215 + vendor/github.com/twinj/uuid/glide.lock | 12 + vendor/github.com/twinj/uuid/glide.yaml | 10 + .../github.com/twinj/uuid/integration_test.go | 87 + vendor/github.com/twinj/uuid/rfc4122.go | 55 +- vendor/github.com/twinj/uuid/rfc4122_test.go | 185 + .../twinj/uuid/savers/filesystem.go | 102 + .../twinj/uuid/savers/filesystem_test.go | 132 + vendor/github.com/twinj/uuid/savers/savers.go | 17 + vendor/github.com/twinj/uuid/struct.go | 57 +- vendor/github.com/twinj/uuid/struct_test.go | 147 + vendor/github.com/twinj/uuid/timestamp.go | 8 +- .../github.com/twinj/uuid/timestamp_test.go | 102 + vendor/github.com/twinj/uuid/uuid.go | 70 +- vendor/github.com/twinj/uuid/uuid_test.go | 330 + vendor/golang.org/x/crypto/.gitattributes | 10 + vendor/golang.org/x/crypto/.gitignore | 2 + vendor/golang.org/x/crypto/.gitrepo | 11 + .../x/crypto/acme/internal/acme/acme.go | 473 + .../x/crypto/acme/internal/acme/acme_test.go | 759 + .../x/crypto/acme/internal/acme/jws.go | 67 + .../x/crypto/acme/internal/acme/jws_test.go | 139 + .../x/crypto/acme/internal/acme/types.go | 181 + .../golang.org/x/crypto/bcrypt/bcrypt_test.go | 226 + .../x/crypto/blowfish/blowfish_test.go | 274 + vendor/golang.org/x/crypto/blowfish/cipher.go | 2 +- vendor/golang.org/x/crypto/bn256/bn256.go | 404 + .../golang.org/x/crypto/bn256/bn256_test.go | 304 + vendor/golang.org/x/crypto/bn256/constants.go | 44 + vendor/golang.org/x/crypto/bn256/curve.go | 278 + .../golang.org/x/crypto/bn256/example_test.go | 43 + vendor/golang.org/x/crypto/bn256/gfp12.go | 200 + vendor/golang.org/x/crypto/bn256/gfp2.go | 219 + vendor/golang.org/x/crypto/bn256/gfp6.go | 296 + vendor/golang.org/x/crypto/bn256/optate.go | 395 + vendor/golang.org/x/crypto/bn256/twist.go | 249 + vendor/golang.org/x/crypto/cast5/cast5.go | 526 + .../golang.org/x/crypto/cast5/cast5_test.go | 106 + .../x/crypto/curve25519/const_amd64.s | 20 + .../x/crypto/curve25519/cswap_amd64.s | 88 + .../x/crypto/curve25519/curve25519.go | 841 + .../x/crypto/curve25519/curve25519_test.go | 29 + vendor/golang.org/x/crypto/curve25519/doc.go | 23 + .../x/crypto/curve25519/freeze_amd64.s | 94 + .../x/crypto/curve25519/ladderstep_amd64.s | 1398 + .../x/crypto/curve25519/mont25519_amd64.go | 240 + .../x/crypto/curve25519/mul_amd64.s | 191 + .../x/crypto/curve25519/square_amd64.s | 153 + vendor/golang.org/x/crypto/ed25519/ed25519.go | 181 + .../x/crypto/ed25519/ed25519_test.go | 183 + .../ed25519/internal/edwards25519/const.go | 1422 + .../internal/edwards25519/edwards25519.go | 1771 + .../x/crypto/ed25519/testdata/sign.input.gz | Bin 0 -> 50330 bytes .../golang.org/x/crypto/hkdf/example_test.go | 61 + vendor/golang.org/x/crypto/hkdf/hkdf.go | 75 + vendor/golang.org/x/crypto/hkdf/hkdf_test.go | 370 + vendor/golang.org/x/crypto/md4/md4.go | 118 + vendor/golang.org/x/crypto/md4/md4_test.go | 71 + vendor/golang.org/x/crypto/md4/md4block.go | 89 + vendor/golang.org/x/crypto/nacl/box/box.go | 85 + .../golang.org/x/crypto/nacl/box/box_test.go | 78 + .../x/crypto/nacl/secretbox/secretbox.go | 149 + .../x/crypto/nacl/secretbox/secretbox_test.go | 91 + vendor/golang.org/x/crypto/ocsp/ocsp.go | 673 + vendor/golang.org/x/crypto/ocsp/ocsp_test.go | 584 + .../x/crypto/openpgp/armor/armor.go | 219 + .../x/crypto/openpgp/armor/armor_test.go | 95 + .../x/crypto/openpgp/armor/encode.go | 160 + .../x/crypto/openpgp/canonical_text.go | 59 + .../x/crypto/openpgp/canonical_text_test.go | 52 + .../x/crypto/openpgp/clearsign/clearsign.go | 376 + .../openpgp/clearsign/clearsign_test.go | 210 + .../x/crypto/openpgp/elgamal/elgamal.go | 122 + .../x/crypto/openpgp/elgamal/elgamal_test.go | 49 + .../x/crypto/openpgp/errors/errors.go | 72 + vendor/golang.org/x/crypto/openpgp/keys.go | 633 + .../golang.org/x/crypto/openpgp/keys_test.go | 370 + .../x/crypto/openpgp/packet/compressed.go | 123 + .../crypto/openpgp/packet/compressed_test.go | 41 + .../x/crypto/openpgp/packet/config.go | 91 + .../x/crypto/openpgp/packet/encrypted_key.go | 199 + .../openpgp/packet/encrypted_key_test.go | 146 + .../x/crypto/openpgp/packet/literal.go | 89 + .../x/crypto/openpgp/packet/ocfb.go | 143 + .../x/crypto/openpgp/packet/ocfb_test.go | 46 + .../openpgp/packet/one_pass_signature.go | 73 + .../x/crypto/openpgp/packet/opaque.go | 162 + .../x/crypto/openpgp/packet/opaque_test.go | 67 + .../x/crypto/openpgp/packet/packet.go | 539 + .../x/crypto/openpgp/packet/packet_test.go | 255 + .../x/crypto/openpgp/packet/private_key.go | 362 + .../crypto/openpgp/packet/private_key_test.go | 126 + .../x/crypto/openpgp/packet/public_key.go | 750 + .../crypto/openpgp/packet/public_key_test.go | 202 + .../x/crypto/openpgp/packet/public_key_v3.go | 280 + .../openpgp/packet/public_key_v3_test.go | 82 + .../x/crypto/openpgp/packet/reader.go | 76 + .../x/crypto/openpgp/packet/signature.go | 706 + .../x/crypto/openpgp/packet/signature_test.go | 42 + .../x/crypto/openpgp/packet/signature_v3.go | 146 + .../openpgp/packet/signature_v3_test.go | 92 + .../openpgp/packet/symmetric_key_encrypted.go | 155 + .../packet/symmetric_key_encrypted_test.go | 103 + .../openpgp/packet/symmetrically_encrypted.go | 290 + .../packet/symmetrically_encrypted_test.go | 123 + .../x/crypto/openpgp/packet/userattribute.go | 91 + .../openpgp/packet/userattribute_test.go | 109 + .../x/crypto/openpgp/packet/userid.go | 160 + .../x/crypto/openpgp/packet/userid_test.go | 87 + vendor/golang.org/x/crypto/openpgp/read.go | 442 + .../golang.org/x/crypto/openpgp/read_test.go | 613 + vendor/golang.org/x/crypto/openpgp/s2k/s2k.go | 273 + .../x/crypto/openpgp/s2k/s2k_test.go | 137 + vendor/golang.org/x/crypto/openpgp/write.go | 378 + .../golang.org/x/crypto/openpgp/write_test.go | 273 + .../x/crypto/otr/libotr_test_helper.c | 197 + vendor/golang.org/x/crypto/otr/otr.go | 1408 + vendor/golang.org/x/crypto/otr/otr_test.go | 470 + vendor/golang.org/x/crypto/otr/smp.go | 572 + vendor/golang.org/x/crypto/pbkdf2/pbkdf2.go | 77 + .../golang.org/x/crypto/pbkdf2/pbkdf2_test.go | 157 + .../golang.org/x/crypto/pkcs12/bmp-string.go | 50 + .../x/crypto/pkcs12/bmp-string_test.go | 63 + vendor/golang.org/x/crypto/pkcs12/crypto.go | 131 + .../golang.org/x/crypto/pkcs12/crypto_test.go | 125 + vendor/golang.org/x/crypto/pkcs12/errors.go | 23 + .../crypto/pkcs12/internal/rc2/bench_test.go | 27 + .../x/crypto/pkcs12/internal/rc2/rc2.go | 274 + .../x/crypto/pkcs12/internal/rc2/rc2_test.go | 93 + vendor/golang.org/x/crypto/pkcs12/mac.go | 45 + vendor/golang.org/x/crypto/pkcs12/mac_test.go | 42 + vendor/golang.org/x/crypto/pkcs12/pbkdf.go | 170 + .../golang.org/x/crypto/pkcs12/pbkdf_test.go | 34 + vendor/golang.org/x/crypto/pkcs12/pkcs12.go | 342 + .../golang.org/x/crypto/pkcs12/pkcs12_test.go | 138 + vendor/golang.org/x/crypto/pkcs12/safebags.go | 57 + .../x/crypto/poly1305/const_amd64.s | 45 + .../golang.org/x/crypto/poly1305/poly1305.go | 32 + .../x/crypto/poly1305/poly1305_amd64.s | 497 + .../x/crypto/poly1305/poly1305_arm.s | 379 + .../x/crypto/poly1305/poly1305_test.go | 86 + .../golang.org/x/crypto/poly1305/sum_amd64.go | 24 + .../golang.org/x/crypto/poly1305/sum_arm.go | 24 + .../golang.org/x/crypto/poly1305/sum_ref.go | 1531 + .../x/crypto/ripemd160/ripemd160.go | 120 + .../x/crypto/ripemd160/ripemd160_test.go | 64 + .../x/crypto/ripemd160/ripemd160block.go | 161 + .../x/crypto/salsa20/salsa/hsalsa20.go | 144 + .../x/crypto/salsa20/salsa/salsa2020_amd64.s | 902 + .../x/crypto/salsa20/salsa/salsa208.go | 199 + .../x/crypto/salsa20/salsa/salsa20_amd64.go | 23 + .../x/crypto/salsa20/salsa/salsa20_ref.go | 234 + .../x/crypto/salsa20/salsa/salsa_test.go | 35 + vendor/golang.org/x/crypto/salsa20/salsa20.go | 54 + .../x/crypto/salsa20/salsa20_test.go | 139 + vendor/golang.org/x/crypto/scrypt/scrypt.go | 243 + .../golang.org/x/crypto/scrypt/scrypt_test.go | 160 + vendor/golang.org/x/crypto/sha3/doc.go | 66 + vendor/golang.org/x/crypto/sha3/hashes.go | 65 + vendor/golang.org/x/crypto/sha3/keccakf.go | 410 + vendor/golang.org/x/crypto/sha3/register.go | 18 + vendor/golang.org/x/crypto/sha3/sha3.go | 193 + vendor/golang.org/x/crypto/sha3/sha3_test.go | 306 + vendor/golang.org/x/crypto/sha3/shake.go | 60 + .../sha3/testdata/keccakKats.json.deflate | Bin 0 -> 521342 bytes vendor/golang.org/x/crypto/sha3/xor.go | 16 + .../golang.org/x/crypto/sha3/xor_generic.go | 28 + .../golang.org/x/crypto/sha3/xor_unaligned.go | 58 + .../golang.org/x/crypto/ssh/agent/client.go | 659 + .../x/crypto/ssh/agent/client_test.go | 327 + .../x/crypto/ssh/agent/example_test.go | 40 + .../golang.org/x/crypto/ssh/agent/forward.go | 103 + .../golang.org/x/crypto/ssh/agent/keyring.go | 184 + .../x/crypto/ssh/agent/keyring_test.go | 78 + .../golang.org/x/crypto/ssh/agent/server.go | 420 + .../x/crypto/ssh/agent/server_test.go | 186 + .../x/crypto/ssh/agent/testdata_test.go | 64 + .../golang.org/x/crypto/ssh/benchmark_test.go | 122 + vendor/golang.org/x/crypto/ssh/buffer.go | 98 + vendor/golang.org/x/crypto/ssh/buffer_test.go | 87 + vendor/golang.org/x/crypto/ssh/certs.go | 503 + vendor/golang.org/x/crypto/ssh/certs_test.go | 216 + vendor/golang.org/x/crypto/ssh/channel.go | 631 + vendor/golang.org/x/crypto/ssh/cipher.go | 579 + vendor/golang.org/x/crypto/ssh/cipher_test.go | 127 + vendor/golang.org/x/crypto/ssh/client.go | 213 + vendor/golang.org/x/crypto/ssh/client_auth.go | 439 + .../x/crypto/ssh/client_auth_test.go | 393 + vendor/golang.org/x/crypto/ssh/client_test.go | 39 + vendor/golang.org/x/crypto/ssh/common.go | 356 + vendor/golang.org/x/crypto/ssh/connection.go | 144 + vendor/golang.org/x/crypto/ssh/doc.go | 18 + .../golang.org/x/crypto/ssh/example_test.go | 243 + vendor/golang.org/x/crypto/ssh/handshake.go | 451 + .../golang.org/x/crypto/ssh/handshake_test.go | 486 + vendor/golang.org/x/crypto/ssh/kex.go | 526 + vendor/golang.org/x/crypto/ssh/kex_test.go | 50 + vendor/golang.org/x/crypto/ssh/keys.go | 846 + vendor/golang.org/x/crypto/ssh/keys_test.go | 440 + vendor/golang.org/x/crypto/ssh/mac.go | 57 + .../golang.org/x/crypto/ssh/mempipe_test.go | 110 + vendor/golang.org/x/crypto/ssh/messages.go | 758 + .../golang.org/x/crypto/ssh/messages_test.go | 288 + vendor/golang.org/x/crypto/ssh/mux.go | 330 + vendor/golang.org/x/crypto/ssh/mux_test.go | 502 + vendor/golang.org/x/crypto/ssh/server.go | 489 + vendor/golang.org/x/crypto/ssh/session.go | 612 + .../golang.org/x/crypto/ssh/session_test.go | 774 + vendor/golang.org/x/crypto/ssh/tcpip.go | 407 + vendor/golang.org/x/crypto/ssh/tcpip_test.go | 20 + .../x/crypto/ssh/terminal/terminal.go | 892 + .../x/crypto/ssh/terminal/terminal_test.go | 291 + .../golang.org/x/crypto/ssh/terminal/util.go | 128 + .../x/crypto/ssh/terminal/util_bsd.go | 12 + .../x/crypto/ssh/terminal/util_linux.go | 11 + .../x/crypto/ssh/terminal/util_plan9.go | 58 + .../x/crypto/ssh/terminal/util_windows.go | 174 + .../x/crypto/ssh/test/agent_unix_test.go | 59 + .../golang.org/x/crypto/ssh/test/cert_test.go | 47 + vendor/golang.org/x/crypto/ssh/test/doc.go | 7 + .../x/crypto/ssh/test/forward_unix_test.go | 160 + .../x/crypto/ssh/test/session_test.go | 365 + .../x/crypto/ssh/test/tcpip_test.go | 46 + .../x/crypto/ssh/test/test_unix_test.go | 268 + .../x/crypto/ssh/test/testdata_test.go | 64 + .../golang.org/x/crypto/ssh/testdata/doc.go | 8 + .../golang.org/x/crypto/ssh/testdata/keys.go | 57 + .../golang.org/x/crypto/ssh/testdata_test.go | 63 + vendor/golang.org/x/crypto/ssh/transport.go | 333 + .../golang.org/x/crypto/ssh/transport_test.go | 109 + vendor/golang.org/x/crypto/tea/cipher.go | 109 + vendor/golang.org/x/crypto/tea/tea_test.go | 93 + vendor/golang.org/x/crypto/twofish/twofish.go | 342 + .../x/crypto/twofish/twofish_test.go | 129 + vendor/golang.org/x/crypto/xtea/block.go | 66 + vendor/golang.org/x/crypto/xtea/cipher.go | 82 + vendor/golang.org/x/crypto/xtea/xtea_test.go | 229 + vendor/golang.org/x/crypto/xts/xts.go | 138 + vendor/golang.org/x/crypto/xts/xts_test.go | 85 + vendor/golang.org/x/sys/AUTHORS | 3 - vendor/golang.org/x/sys/CONTRIBUTING.md | 31 - vendor/golang.org/x/sys/CONTRIBUTORS | 3 - vendor/golang.org/x/sys/LICENSE | 27 - vendor/golang.org/x/sys/PATENTS | 22 - vendor/golang.org/x/sys/README | 3 - vendor/golang.org/x/sys/codereview.cfg | 1 - vendor/golang.org/x/sys/unix/asm.s | 10 - vendor/golang.org/x/sys/unix/asm_darwin_386.s | 29 - .../golang.org/x/sys/unix/asm_darwin_amd64.s | 29 - vendor/golang.org/x/sys/unix/asm_darwin_arm.s | 30 - .../golang.org/x/sys/unix/asm_darwin_arm64.s | 30 - .../x/sys/unix/asm_dragonfly_amd64.s | 29 - .../golang.org/x/sys/unix/asm_freebsd_386.s | 29 - .../golang.org/x/sys/unix/asm_freebsd_amd64.s | 29 - .../golang.org/x/sys/unix/asm_freebsd_arm.s | 29 - vendor/golang.org/x/sys/unix/asm_linux_386.s | 35 - .../golang.org/x/sys/unix/asm_linux_amd64.s | 29 - vendor/golang.org/x/sys/unix/asm_linux_arm.s | 29 - .../golang.org/x/sys/unix/asm_linux_arm64.s | 24 - .../golang.org/x/sys/unix/asm_linux_mips64x.s | 28 - .../golang.org/x/sys/unix/asm_linux_ppc64x.s | 28 - .../golang.org/x/sys/unix/asm_linux_s390x.s | 28 - vendor/golang.org/x/sys/unix/asm_netbsd_386.s | 29 - .../golang.org/x/sys/unix/asm_netbsd_amd64.s | 29 - vendor/golang.org/x/sys/unix/asm_netbsd_arm.s | 29 - .../golang.org/x/sys/unix/asm_openbsd_386.s | 29 - .../golang.org/x/sys/unix/asm_openbsd_amd64.s | 29 - .../golang.org/x/sys/unix/asm_solaris_amd64.s | 17 - .../golang.org/x/sys/unix/bluetooth_linux.go | 35 - vendor/golang.org/x/sys/unix/constants.go | 13 - vendor/golang.org/x/sys/unix/env_unix.go | 27 - vendor/golang.org/x/sys/unix/env_unset.go | 14 - vendor/golang.org/x/sys/unix/flock.go | 24 - .../x/sys/unix/flock_linux_32bit.go | 13 - vendor/golang.org/x/sys/unix/gccgo.go | 46 - vendor/golang.org/x/sys/unix/gccgo_c.c | 41 - .../x/sys/unix/gccgo_linux_amd64.go | 20 - vendor/golang.org/x/sys/unix/mkall.sh | 285 - vendor/golang.org/x/sys/unix/mkerrors.sh | 476 - vendor/golang.org/x/sys/unix/mkpost.go | 62 - vendor/golang.org/x/sys/unix/mksyscall.pl | 323 - .../x/sys/unix/mksyscall_solaris.pl | 294 - .../golang.org/x/sys/unix/mksysctl_openbsd.pl | 264 - .../golang.org/x/sys/unix/mksysnum_darwin.pl | 39 - .../x/sys/unix/mksysnum_dragonfly.pl | 50 - .../golang.org/x/sys/unix/mksysnum_freebsd.pl | 63 - .../golang.org/x/sys/unix/mksysnum_linux.pl | 58 - .../golang.org/x/sys/unix/mksysnum_netbsd.pl | 58 - .../golang.org/x/sys/unix/mksysnum_openbsd.pl | 50 - vendor/golang.org/x/sys/unix/race.go | 30 - vendor/golang.org/x/sys/unix/race0.go | 25 - .../golang.org/x/sys/unix/sockcmsg_linux.go | 36 - vendor/golang.org/x/sys/unix/sockcmsg_unix.go | 103 - vendor/golang.org/x/sys/unix/str.go | 26 - vendor/golang.org/x/sys/unix/syscall.go | 76 - vendor/golang.org/x/sys/unix/syscall_bsd.go | 628 - .../golang.org/x/sys/unix/syscall_darwin.go | 509 - .../x/sys/unix/syscall_darwin_386.go | 77 - .../x/sys/unix/syscall_darwin_amd64.go | 79 - .../x/sys/unix/syscall_darwin_arm.go | 71 - .../x/sys/unix/syscall_darwin_arm64.go | 77 - .../x/sys/unix/syscall_dragonfly.go | 411 - .../x/sys/unix/syscall_dragonfly_amd64.go | 61 - .../golang.org/x/sys/unix/syscall_freebsd.go | 682 - .../x/sys/unix/syscall_freebsd_386.go | 61 - .../x/sys/unix/syscall_freebsd_amd64.go | 61 - .../x/sys/unix/syscall_freebsd_arm.go | 61 - vendor/golang.org/x/sys/unix/syscall_linux.go | 1108 - .../x/sys/unix/syscall_linux_386.go | 390 - .../x/sys/unix/syscall_linux_amd64.go | 148 - .../x/sys/unix/syscall_linux_arm.go | 254 - .../x/sys/unix/syscall_linux_arm64.go | 180 - .../x/sys/unix/syscall_linux_mips64x.go | 206 - .../x/sys/unix/syscall_linux_ppc64x.go | 126 - .../x/sys/unix/syscall_linux_s390x.go | 320 - .../golang.org/x/sys/unix/syscall_netbsd.go | 492 - .../x/sys/unix/syscall_netbsd_386.go | 42 - .../x/sys/unix/syscall_netbsd_amd64.go | 42 - .../x/sys/unix/syscall_netbsd_arm.go | 42 - .../golang.org/x/sys/unix/syscall_no_getwd.go | 11 - .../golang.org/x/sys/unix/syscall_openbsd.go | 303 - .../x/sys/unix/syscall_openbsd_386.go | 42 - .../x/sys/unix/syscall_openbsd_amd64.go | 42 - .../golang.org/x/sys/unix/syscall_solaris.go | 713 - .../x/sys/unix/syscall_solaris_amd64.go | 35 - vendor/golang.org/x/sys/unix/syscall_unix.go | 297 - vendor/golang.org/x/sys/unix/types_darwin.go | 250 - .../golang.org/x/sys/unix/types_dragonfly.go | 242 - vendor/golang.org/x/sys/unix/types_freebsd.go | 353 - vendor/golang.org/x/sys/unix/types_linux.go | 435 - vendor/golang.org/x/sys/unix/types_netbsd.go | 232 - vendor/golang.org/x/sys/unix/types_openbsd.go | 244 - vendor/golang.org/x/sys/unix/types_solaris.go | 260 - .../x/sys/unix/zerrors_darwin_386.go | 1576 - .../x/sys/unix/zerrors_darwin_amd64.go | 1576 - .../x/sys/unix/zerrors_darwin_arm.go | 1293 - .../x/sys/unix/zerrors_darwin_arm64.go | 1576 - .../x/sys/unix/zerrors_dragonfly_amd64.go | 1530 - .../x/sys/unix/zerrors_freebsd_386.go | 1743 - .../x/sys/unix/zerrors_freebsd_amd64.go | 1748 - .../x/sys/unix/zerrors_freebsd_arm.go | 1729 - .../x/sys/unix/zerrors_linux_386.go | 1818 - .../x/sys/unix/zerrors_linux_amd64.go | 1819 - .../x/sys/unix/zerrors_linux_arm.go | 1742 - .../x/sys/unix/zerrors_linux_arm64.go | 1896 - .../x/sys/unix/zerrors_linux_mips64.go | 1916 - .../x/sys/unix/zerrors_linux_mips64le.go | 1916 - .../x/sys/unix/zerrors_linux_ppc64.go | 1969 - .../x/sys/unix/zerrors_linux_ppc64le.go | 1968 - .../x/sys/unix/zerrors_linux_s390x.go | 2027 - .../x/sys/unix/zerrors_netbsd_386.go | 1712 - .../x/sys/unix/zerrors_netbsd_amd64.go | 1702 - .../x/sys/unix/zerrors_netbsd_arm.go | 1688 - .../x/sys/unix/zerrors_openbsd_386.go | 1584 - .../x/sys/unix/zerrors_openbsd_amd64.go | 1583 - .../x/sys/unix/zerrors_solaris_amd64.go | 1436 - .../x/sys/unix/zsyscall_darwin_386.go | 1427 - .../x/sys/unix/zsyscall_darwin_amd64.go | 1443 - .../x/sys/unix/zsyscall_darwin_arm.go | 1427 - .../x/sys/unix/zsyscall_darwin_arm64.go | 1427 - .../x/sys/unix/zsyscall_dragonfly_amd64.go | 1413 - .../x/sys/unix/zsyscall_freebsd_386.go | 1665 - .../x/sys/unix/zsyscall_freebsd_amd64.go | 1665 - .../x/sys/unix/zsyscall_freebsd_arm.go | 1665 - .../x/sys/unix/zsyscall_linux_386.go | 1638 - .../x/sys/unix/zsyscall_linux_amd64.go | 1832 - .../x/sys/unix/zsyscall_linux_arm.go | 1739 - .../x/sys/unix/zsyscall_linux_arm64.go | 1723 - .../x/sys/unix/zsyscall_linux_mips64.go | 1781 - .../x/sys/unix/zsyscall_linux_mips64le.go | 1781 - .../x/sys/unix/zsyscall_linux_ppc64.go | 1843 - .../x/sys/unix/zsyscall_linux_ppc64le.go | 1843 - .../x/sys/unix/zsyscall_linux_s390x.go | 1623 - .../x/sys/unix/zsyscall_netbsd_386.go | 1327 - .../x/sys/unix/zsyscall_netbsd_amd64.go | 1327 - .../x/sys/unix/zsyscall_netbsd_arm.go | 1327 - .../x/sys/unix/zsyscall_openbsd_386.go | 1387 - .../x/sys/unix/zsyscall_openbsd_amd64.go | 1387 - .../x/sys/unix/zsyscall_solaris_amd64.go | 1559 - .../golang.org/x/sys/unix/zsysctl_openbsd.go | 270 - .../x/sys/unix/zsysnum_darwin_386.go | 398 - .../x/sys/unix/zsysnum_darwin_amd64.go | 398 - .../x/sys/unix/zsysnum_darwin_arm.go | 358 - .../x/sys/unix/zsysnum_darwin_arm64.go | 398 - .../x/sys/unix/zsysnum_dragonfly_amd64.go | 304 - .../x/sys/unix/zsysnum_freebsd_386.go | 351 - .../x/sys/unix/zsysnum_freebsd_amd64.go | 351 - .../x/sys/unix/zsysnum_freebsd_arm.go | 351 - .../x/sys/unix/zsysnum_linux_386.go | 355 - .../x/sys/unix/zsysnum_linux_amd64.go | 321 - .../x/sys/unix/zsysnum_linux_arm.go | 356 - .../x/sys/unix/zsysnum_linux_arm64.go | 272 - .../x/sys/unix/zsysnum_linux_mips64.go | 327 - .../x/sys/unix/zsysnum_linux_mips64le.go | 327 - .../x/sys/unix/zsysnum_linux_ppc64.go | 360 - .../x/sys/unix/zsysnum_linux_ppc64le.go | 353 - .../x/sys/unix/zsysnum_linux_s390x.go | 328 - .../x/sys/unix/zsysnum_netbsd_386.go | 273 - .../x/sys/unix/zsysnum_netbsd_amd64.go | 273 - .../x/sys/unix/zsysnum_netbsd_arm.go | 273 - .../x/sys/unix/zsysnum_openbsd_386.go | 207 - .../x/sys/unix/zsysnum_openbsd_amd64.go | 207 - .../x/sys/unix/zsysnum_solaris_amd64.go | 13 - .../x/sys/unix/ztypes_darwin_386.go | 447 - .../x/sys/unix/ztypes_darwin_amd64.go | 462 - .../x/sys/unix/ztypes_darwin_arm.go | 449 - .../x/sys/unix/ztypes_darwin_arm64.go | 457 - .../x/sys/unix/ztypes_dragonfly_amd64.go | 443 - .../x/sys/unix/ztypes_freebsd_386.go | 502 - .../x/sys/unix/ztypes_freebsd_amd64.go | 505 - .../x/sys/unix/ztypes_freebsd_arm.go | 497 - .../golang.org/x/sys/unix/ztypes_linux_386.go | 607 - .../x/sys/unix/ztypes_linux_amd64.go | 625 - .../golang.org/x/sys/unix/ztypes_linux_arm.go | 587 - .../x/sys/unix/ztypes_linux_arm64.go | 604 - .../x/sys/unix/ztypes_linux_mips64.go | 607 - .../x/sys/unix/ztypes_linux_mips64le.go | 607 - .../x/sys/unix/ztypes_linux_ppc64.go | 614 - .../x/sys/unix/ztypes_linux_ppc64le.go | 614 - .../x/sys/unix/ztypes_linux_s390x.go | 629 - .../x/sys/unix/ztypes_netbsd_386.go | 396 - .../x/sys/unix/ztypes_netbsd_amd64.go | 403 - .../x/sys/unix/ztypes_netbsd_arm.go | 401 - .../x/sys/unix/ztypes_openbsd_386.go | 441 - .../x/sys/unix/ztypes_openbsd_amd64.go | 448 - .../x/sys/unix/ztypes_solaris_amd64.go | 422 - .../alexcesaro/quotedprintable.v3/LICENSE | 20 - .../alexcesaro/quotedprintable.v3/README.md | 16 - .../quotedprintable.v3/encodedword.go | 279 - .../alexcesaro/quotedprintable.v3/pool.go | 26 - .../quotedprintable.v3/pool_go12.go | 24 - .../alexcesaro/quotedprintable.v3/reader.go | 121 - .../alexcesaro/quotedprintable.v3/writer.go | 166 - vendor/gopkg.in/gomail.v2/.gitrepo | 11 + vendor/gopkg.in/gomail.v2/.travis.yml | 9 + vendor/gopkg.in/gomail.v2/auth_test.go | 100 + vendor/gopkg.in/gomail.v2/example_test.go | 223 + vendor/gopkg.in/gomail.v2/message_test.go | 745 + vendor/gopkg.in/gomail.v2/send_test.go | 80 + vendor/gopkg.in/gomail.v2/smtp_test.go | 292 + 1616 files changed, 860321 insertions(+), 109623 deletions(-) create mode 100755 list-deps create mode 100644 metaclient.go create mode 100644 vendor.list create mode 100755 vendor.sh delete mode 100644 vendor.yml create mode 100644 vendor/github.com/BurntSushi/toml/.gitignore create mode 100644 vendor/github.com/BurntSushi/toml/.gitrepo create mode 100644 vendor/github.com/BurntSushi/toml/.travis.yml create mode 100644 vendor/github.com/BurntSushi/toml/_examples/example.go create mode 100644 vendor/github.com/BurntSushi/toml/_examples/example.toml create mode 100644 vendor/github.com/BurntSushi/toml/_examples/hard.toml create mode 100644 vendor/github.com/BurntSushi/toml/_examples/implicit.toml create mode 100644 vendor/github.com/BurntSushi/toml/_examples/invalid-apples.toml create mode 100644 vendor/github.com/BurntSushi/toml/_examples/invalid.toml create mode 100644 vendor/github.com/BurntSushi/toml/_examples/readme1.toml create mode 100644 vendor/github.com/BurntSushi/toml/_examples/readme2.toml create mode 100644 vendor/github.com/BurntSushi/toml/cmd/toml-test-decoder/COPYING create mode 100644 vendor/github.com/BurntSushi/toml/cmd/toml-test-decoder/README.md create mode 100644 vendor/github.com/BurntSushi/toml/cmd/toml-test-decoder/main.go create mode 100644 vendor/github.com/BurntSushi/toml/cmd/toml-test-encoder/COPYING create mode 100644 vendor/github.com/BurntSushi/toml/cmd/toml-test-encoder/README.md create mode 100644 vendor/github.com/BurntSushi/toml/cmd/toml-test-encoder/main.go create mode 100644 vendor/github.com/BurntSushi/toml/cmd/tomlv/COPYING create mode 100644 vendor/github.com/BurntSushi/toml/cmd/tomlv/README.md create mode 100644 vendor/github.com/BurntSushi/toml/cmd/tomlv/main.go create mode 100644 vendor/github.com/BurntSushi/toml/decode_test.go create mode 100644 vendor/github.com/BurntSushi/toml/encode_test.go create mode 100644 vendor/github.com/benbjohnson/tmpl/.gitrepo create mode 100644 vendor/github.com/benbjohnson/tmpl/LICENSE create mode 100644 vendor/github.com/benbjohnson/tmpl/README.md create mode 100644 vendor/github.com/benbjohnson/tmpl/main.go create mode 100644 vendor/github.com/benbjohnson/tmpl/main_test.go create mode 100644 vendor/github.com/boltdb/bolt/.gitignore create mode 100644 vendor/github.com/boltdb/bolt/.gitrepo create mode 100644 vendor/github.com/boltdb/bolt/bucket_test.go create mode 100644 vendor/github.com/boltdb/bolt/cmd/bolt/main.go create mode 100644 vendor/github.com/boltdb/bolt/cmd/bolt/main_test.go create mode 100644 vendor/github.com/boltdb/bolt/cursor_test.go create mode 100644 vendor/github.com/boltdb/bolt/db_test.go create mode 100644 vendor/github.com/boltdb/bolt/freelist_test.go create mode 100644 vendor/github.com/boltdb/bolt/node_test.go create mode 100644 vendor/github.com/boltdb/bolt/page_test.go create mode 100644 vendor/github.com/boltdb/bolt/quick_test.go create mode 100644 vendor/github.com/boltdb/bolt/simulation_test.go create mode 100644 vendor/github.com/boltdb/bolt/tx_test.go create mode 100644 vendor/github.com/cenkalti/backoff/.gitignore create mode 100644 vendor/github.com/cenkalti/backoff/.gitrepo create mode 100644 vendor/github.com/cenkalti/backoff/.travis.yml create mode 100644 vendor/github.com/cenkalti/backoff/backoff_test.go create mode 100644 vendor/github.com/cenkalti/backoff/example_test.go create mode 100644 vendor/github.com/cenkalti/backoff/exponential_test.go create mode 100644 vendor/github.com/cenkalti/backoff/retry_test.go create mode 100644 vendor/github.com/cenkalti/backoff/ticker_test.go delete mode 100644 vendor/github.com/davecgh/go-spew/README.md delete mode 100644 vendor/github.com/davecgh/go-spew/cov_report.sh delete mode 100644 vendor/github.com/davecgh/go-spew/test_coverage.txt create mode 100644 vendor/github.com/dustin/go-humanize/.gitignore create mode 100644 vendor/github.com/dustin/go-humanize/.gitrepo create mode 100644 vendor/github.com/dustin/go-humanize/.travis.yml create mode 100644 vendor/github.com/dustin/go-humanize/bigbytes_test.go create mode 100644 vendor/github.com/dustin/go-humanize/bytes_test.go create mode 100644 vendor/github.com/dustin/go-humanize/comma_test.go create mode 100644 vendor/github.com/dustin/go-humanize/commaf_test.go create mode 100644 vendor/github.com/dustin/go-humanize/common_test.go create mode 100644 vendor/github.com/dustin/go-humanize/ftoa_test.go create mode 100644 vendor/github.com/dustin/go-humanize/number_test.go create mode 100644 vendor/github.com/dustin/go-humanize/ordinals_test.go create mode 100644 vendor/github.com/dustin/go-humanize/si_test.go create mode 100644 vendor/github.com/dustin/go-humanize/times_test.go create mode 100644 vendor/github.com/gogo/protobuf/.gitignore create mode 100644 vendor/github.com/gogo/protobuf/.gitrepo create mode 100644 vendor/github.com/gogo/protobuf/.mailmap create mode 100644 vendor/github.com/gogo/protobuf/.travis.yml create mode 100644 vendor/github.com/gogo/protobuf/codec/codec.go create mode 100644 vendor/github.com/gogo/protobuf/codec/codec_test.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/io/full.go create mode 100644 vendor/github.com/gogo/protobuf/io/io.go create mode 100644 vendor/github.com/gogo/protobuf/io/io_test.go create mode 100644 vendor/github.com/gogo/protobuf/io/uint32.go create mode 100644 vendor/github.com/gogo/protobuf/io/varint.go create mode 100644 vendor/github.com/gogo/protobuf/jsonpb/jsonpb.go create mode 100644 vendor/github.com/gogo/protobuf/jsonpb/jsonpb_test.go create mode 100644 vendor/github.com/gogo/protobuf/jsonpb/jsonpb_test_proto/Makefile create mode 100644 vendor/github.com/gogo/protobuf/jsonpb/jsonpb_test_proto/bytes.go create mode 100644 vendor/github.com/gogo/protobuf/jsonpb/jsonpb_test_proto/more_test_objects.pb.go create mode 100644 vendor/github.com/gogo/protobuf/jsonpb/jsonpb_test_proto/more_test_objects.proto create mode 100644 vendor/github.com/gogo/protobuf/jsonpb/jsonpb_test_proto/test_objects.pb.go create mode 100644 vendor/github.com/gogo/protobuf/jsonpb/jsonpb_test_proto/test_objects.proto create mode 100644 vendor/github.com/gogo/protobuf/plugin/compare/compare.go create mode 100644 vendor/github.com/gogo/protobuf/plugin/compare/comparetest.go create mode 100644 vendor/github.com/gogo/protobuf/plugin/defaultcheck/defaultcheck.go create mode 100644 vendor/github.com/gogo/protobuf/plugin/description/description.go create mode 100644 vendor/github.com/gogo/protobuf/plugin/description/descriptiontest.go create mode 100644 vendor/github.com/gogo/protobuf/plugin/embedcheck/embedcheck.go create mode 100644 vendor/github.com/gogo/protobuf/plugin/enumstringer/enumstringer.go create mode 100644 vendor/github.com/gogo/protobuf/plugin/equal/equal.go create mode 100644 vendor/github.com/gogo/protobuf/plugin/equal/equaltest.go create mode 100644 vendor/github.com/gogo/protobuf/plugin/face/face.go create mode 100644 vendor/github.com/gogo/protobuf/plugin/face/facetest.go create mode 100644 vendor/github.com/gogo/protobuf/plugin/gostring/gostring.go create mode 100644 vendor/github.com/gogo/protobuf/plugin/gostring/gostringtest.go create mode 100644 vendor/github.com/gogo/protobuf/plugin/grpc/grpc.go create mode 100644 vendor/github.com/gogo/protobuf/plugin/marshalto/marshalto.go create mode 100644 vendor/github.com/gogo/protobuf/plugin/oneofcheck/oneofcheck.go create mode 100644 vendor/github.com/gogo/protobuf/plugin/populate/populate.go create mode 100644 vendor/github.com/gogo/protobuf/plugin/size/size.go create mode 100644 vendor/github.com/gogo/protobuf/plugin/size/sizetest.go create mode 100644 vendor/github.com/gogo/protobuf/plugin/stringer/stringer.go create mode 100644 vendor/github.com/gogo/protobuf/plugin/stringer/stringertest.go create mode 100644 vendor/github.com/gogo/protobuf/plugin/testgen/testgen.go create mode 100644 vendor/github.com/gogo/protobuf/plugin/union/union.go create mode 100644 vendor/github.com/gogo/protobuf/plugin/union/uniontest.go create mode 100644 vendor/github.com/gogo/protobuf/plugin/unmarshal/unmarshal.go create mode 100644 vendor/github.com/gogo/protobuf/proto/all_test.go create mode 100644 vendor/github.com/gogo/protobuf/proto/clone_test.go create mode 100644 vendor/github.com/gogo/protobuf/proto/equal_test.go create mode 100644 vendor/github.com/gogo/protobuf/proto/extensions_test.go create mode 100644 vendor/github.com/gogo/protobuf/proto/message_set_test.go create mode 100644 vendor/github.com/gogo/protobuf/proto/proto3_proto/proto3.pb.go create mode 100644 vendor/github.com/gogo/protobuf/proto/proto3_proto/proto3.proto create mode 100644 vendor/github.com/gogo/protobuf/proto/proto3_test.go create mode 100644 vendor/github.com/gogo/protobuf/proto/size2_test.go create mode 100644 vendor/github.com/gogo/protobuf/proto/size_test.go create mode 100644 vendor/github.com/gogo/protobuf/proto/testdata/Makefile create mode 100644 vendor/github.com/gogo/protobuf/proto/testdata/golden_test.go create mode 100644 vendor/github.com/gogo/protobuf/proto/testdata/test.pb.go create mode 100644 vendor/github.com/gogo/protobuf/proto/testdata/test.pb.go.golden create mode 100644 vendor/github.com/gogo/protobuf/proto/testdata/test.proto create mode 100644 vendor/github.com/gogo/protobuf/proto/text_parser_test.go create mode 100644 vendor/github.com/gogo/protobuf/proto/text_test.go create mode 100644 vendor/github.com/gogo/protobuf/protobuf/google/protobuf/compiler/plugin.proto create mode 100644 vendor/github.com/gogo/protobuf/protobuf/google/protobuf/descriptor.proto create mode 100644 vendor/github.com/gogo/protobuf/protoc-gen-combo/combo.go create mode 100644 vendor/github.com/gogo/protobuf/protoc-gen-gofast/main.go create mode 100644 vendor/github.com/gogo/protobuf/protoc-gen-gogo/Makefile 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.pb.go create mode 100644 vendor/github.com/gogo/protobuf/protoc-gen-gogo/descriptor/gostring.go create mode 100644 vendor/github.com/gogo/protobuf/protoc-gen-gogo/descriptor/helper.go create mode 100644 vendor/github.com/gogo/protobuf/protoc-gen-gogo/doc.go create mode 100644 vendor/github.com/gogo/protobuf/protoc-gen-gogo/generator/generator.go create mode 100644 vendor/github.com/gogo/protobuf/protoc-gen-gogo/generator/helper.go create mode 100644 vendor/github.com/gogo/protobuf/protoc-gen-gogo/generator/name_test.go create mode 100644 vendor/github.com/gogo/protobuf/protoc-gen-gogo/main.go create mode 100644 vendor/github.com/gogo/protobuf/protoc-gen-gogo/plugin/Makefile create mode 100644 vendor/github.com/gogo/protobuf/protoc-gen-gogo/plugin/plugin.pb.go create mode 100644 vendor/github.com/gogo/protobuf/protoc-gen-gogo/testdata/Makefile create mode 100644 vendor/github.com/gogo/protobuf/protoc-gen-gogo/testdata/extension_base.proto create mode 100644 vendor/github.com/gogo/protobuf/protoc-gen-gogo/testdata/extension_extra.proto create mode 100644 vendor/github.com/gogo/protobuf/protoc-gen-gogo/testdata/extension_test.go create mode 100644 vendor/github.com/gogo/protobuf/protoc-gen-gogo/testdata/extension_user.proto create mode 100644 vendor/github.com/gogo/protobuf/protoc-gen-gogo/testdata/grpc.proto create mode 100644 vendor/github.com/gogo/protobuf/protoc-gen-gogo/testdata/imp.pb.go.golden create mode 100644 vendor/github.com/gogo/protobuf/protoc-gen-gogo/testdata/imp.proto create mode 100644 vendor/github.com/gogo/protobuf/protoc-gen-gogo/testdata/imp2.proto create mode 100644 vendor/github.com/gogo/protobuf/protoc-gen-gogo/testdata/imp3.proto create mode 100644 vendor/github.com/gogo/protobuf/protoc-gen-gogo/testdata/main_test.go create mode 100644 vendor/github.com/gogo/protobuf/protoc-gen-gogo/testdata/multi/.gitignore create mode 100644 vendor/github.com/gogo/protobuf/protoc-gen-gogo/testdata/multi/multi1.proto create mode 100644 vendor/github.com/gogo/protobuf/protoc-gen-gogo/testdata/multi/multi2.proto create mode 100644 vendor/github.com/gogo/protobuf/protoc-gen-gogo/testdata/multi/multi3.proto create mode 100644 vendor/github.com/gogo/protobuf/protoc-gen-gogo/testdata/my_test/test.pb.go create mode 100644 vendor/github.com/gogo/protobuf/protoc-gen-gogo/testdata/my_test/test.proto create mode 100644 vendor/github.com/gogo/protobuf/protoc-gen-gogo/testdata/proto3.proto create mode 100644 vendor/github.com/gogo/protobuf/protoc-gen-gogofast/main.go create mode 100644 vendor/github.com/gogo/protobuf/protoc-gen-gogofaster/main.go create mode 100644 vendor/github.com/gogo/protobuf/protoc-gen-gogoslick/main.go create mode 100644 vendor/github.com/gogo/protobuf/protoc-min-version/minversion.go create mode 100644 vendor/github.com/gogo/protobuf/sortkeys/sortkeys.go create mode 100644 vendor/github.com/gogo/protobuf/test/.gitignore create mode 100644 vendor/github.com/gogo/protobuf/test/Makefile create mode 100644 vendor/github.com/gogo/protobuf/test/asymetric-issue125/Makefile create mode 100644 vendor/github.com/gogo/protobuf/test/asymetric-issue125/asym.pb.go create mode 100644 vendor/github.com/gogo/protobuf/test/asymetric-issue125/asym.proto create mode 100644 vendor/github.com/gogo/protobuf/test/asymetric-issue125/asym_test.go create mode 100644 vendor/github.com/gogo/protobuf/test/asymetric-issue125/asympb_test.go create mode 100644 vendor/github.com/gogo/protobuf/test/asymetric-issue125/pop.go create mode 100644 vendor/github.com/gogo/protobuf/test/bug_test.go create mode 100644 vendor/github.com/gogo/protobuf/test/casttype/Makefile create mode 100644 vendor/github.com/gogo/protobuf/test/casttype/casttype.proto create mode 100644 vendor/github.com/gogo/protobuf/test/casttype/combos/both/casttype.pb.go create mode 100644 vendor/github.com/gogo/protobuf/test/casttype/combos/both/casttype.proto create mode 100644 vendor/github.com/gogo/protobuf/test/casttype/combos/both/casttypepb_test.go create mode 100644 vendor/github.com/gogo/protobuf/test/casttype/combos/marshaler/casttype.pb.go create mode 100644 vendor/github.com/gogo/protobuf/test/casttype/combos/marshaler/casttype.proto create mode 100644 vendor/github.com/gogo/protobuf/test/casttype/combos/marshaler/casttypepb_test.go create mode 100644 vendor/github.com/gogo/protobuf/test/casttype/combos/neither/casttype.pb.go create mode 100644 vendor/github.com/gogo/protobuf/test/casttype/combos/neither/casttype.proto create mode 100644 vendor/github.com/gogo/protobuf/test/casttype/combos/neither/casttypepb_test.go create mode 100644 vendor/github.com/gogo/protobuf/test/casttype/combos/unmarshaler/casttype.pb.go create mode 100644 vendor/github.com/gogo/protobuf/test/casttype/combos/unmarshaler/casttype.proto create mode 100644 vendor/github.com/gogo/protobuf/test/casttype/combos/unmarshaler/casttypepb_test.go create mode 100644 vendor/github.com/gogo/protobuf/test/casttype/combos/unsafeboth/casttype.pb.go create mode 100644 vendor/github.com/gogo/protobuf/test/casttype/combos/unsafeboth/casttype.proto create mode 100644 vendor/github.com/gogo/protobuf/test/casttype/combos/unsafeboth/casttypepb_test.go create mode 100644 vendor/github.com/gogo/protobuf/test/casttype/combos/unsafemarshaler/casttype.pb.go create mode 100644 vendor/github.com/gogo/protobuf/test/casttype/combos/unsafemarshaler/casttype.proto create mode 100644 vendor/github.com/gogo/protobuf/test/casttype/combos/unsafemarshaler/casttypepb_test.go create mode 100644 vendor/github.com/gogo/protobuf/test/casttype/combos/unsafeunmarshaler/casttype.pb.go create mode 100644 vendor/github.com/gogo/protobuf/test/casttype/combos/unsafeunmarshaler/casttype.proto create mode 100644 vendor/github.com/gogo/protobuf/test/casttype/combos/unsafeunmarshaler/casttypepb_test.go create mode 100644 vendor/github.com/gogo/protobuf/test/casttype/mytypes.go create mode 100644 vendor/github.com/gogo/protobuf/test/castvalue/Makefile create mode 100644 vendor/github.com/gogo/protobuf/test/castvalue/castvalue.pb.go create mode 100644 vendor/github.com/gogo/protobuf/test/castvalue/castvalue.proto create mode 100644 vendor/github.com/gogo/protobuf/test/castvalue/castvaluepb_test.go create mode 100644 vendor/github.com/gogo/protobuf/test/castvalue/combos/both/castvalue.pb.go create mode 100644 vendor/github.com/gogo/protobuf/test/castvalue/combos/both/castvalue.proto create mode 100644 vendor/github.com/gogo/protobuf/test/castvalue/combos/both/castvaluepb_test.go create mode 100644 vendor/github.com/gogo/protobuf/test/castvalue/combos/both/mytypes.go create mode 100644 vendor/github.com/gogo/protobuf/test/castvalue/combos/marshaler/castvalue.pb.go create mode 100644 vendor/github.com/gogo/protobuf/test/castvalue/combos/marshaler/castvalue.proto create mode 100644 vendor/github.com/gogo/protobuf/test/castvalue/combos/marshaler/castvaluepb_test.go create mode 100644 vendor/github.com/gogo/protobuf/test/castvalue/combos/marshaler/mytypes.go create mode 100644 vendor/github.com/gogo/protobuf/test/castvalue/combos/unmarshaler/castvalue.pb.go create mode 100644 vendor/github.com/gogo/protobuf/test/castvalue/combos/unmarshaler/castvalue.proto create mode 100644 vendor/github.com/gogo/protobuf/test/castvalue/combos/unmarshaler/castvaluepb_test.go create mode 100644 vendor/github.com/gogo/protobuf/test/castvalue/combos/unmarshaler/mytypes.go create mode 100644 vendor/github.com/gogo/protobuf/test/castvalue/combos/unsafeboth/castvalue.pb.go create mode 100644 vendor/github.com/gogo/protobuf/test/castvalue/combos/unsafeboth/castvalue.proto create mode 100644 vendor/github.com/gogo/protobuf/test/castvalue/combos/unsafeboth/castvaluepb_test.go create mode 100644 vendor/github.com/gogo/protobuf/test/castvalue/combos/unsafeboth/mytypes.go create mode 100644 vendor/github.com/gogo/protobuf/test/castvalue/combos/unsafemarshaler/castvalue.pb.go create mode 100644 vendor/github.com/gogo/protobuf/test/castvalue/combos/unsafemarshaler/castvalue.proto create mode 100644 vendor/github.com/gogo/protobuf/test/castvalue/combos/unsafemarshaler/castvaluepb_test.go create mode 100644 vendor/github.com/gogo/protobuf/test/castvalue/combos/unsafemarshaler/mytypes.go create mode 100644 vendor/github.com/gogo/protobuf/test/castvalue/combos/unsafeunmarshaler/castvalue.pb.go create mode 100644 vendor/github.com/gogo/protobuf/test/castvalue/combos/unsafeunmarshaler/castvalue.proto create mode 100644 vendor/github.com/gogo/protobuf/test/castvalue/combos/unsafeunmarshaler/castvaluepb_test.go create mode 100644 vendor/github.com/gogo/protobuf/test/castvalue/combos/unsafeunmarshaler/mytypes.go create mode 100644 vendor/github.com/gogo/protobuf/test/castvalue/mytypes.go create mode 100644 vendor/github.com/gogo/protobuf/test/combos/both/bug_test.go create mode 100644 vendor/github.com/gogo/protobuf/test/combos/both/thetest.pb.go create mode 100644 vendor/github.com/gogo/protobuf/test/combos/both/thetest.proto create mode 100644 vendor/github.com/gogo/protobuf/test/combos/both/thetestpb_test.go create mode 100644 vendor/github.com/gogo/protobuf/test/combos/both/uuid.go create mode 100644 vendor/github.com/gogo/protobuf/test/combos/marshaler/bug_test.go create mode 100644 vendor/github.com/gogo/protobuf/test/combos/marshaler/thetest.pb.go create mode 100644 vendor/github.com/gogo/protobuf/test/combos/marshaler/thetest.proto create mode 100644 vendor/github.com/gogo/protobuf/test/combos/marshaler/thetestpb_test.go create mode 100644 vendor/github.com/gogo/protobuf/test/combos/marshaler/uuid.go create mode 100644 vendor/github.com/gogo/protobuf/test/combos/unmarshaler/bug_test.go create mode 100644 vendor/github.com/gogo/protobuf/test/combos/unmarshaler/thetest.pb.go create mode 100644 vendor/github.com/gogo/protobuf/test/combos/unmarshaler/thetest.proto create mode 100644 vendor/github.com/gogo/protobuf/test/combos/unmarshaler/thetestpb_test.go create mode 100644 vendor/github.com/gogo/protobuf/test/combos/unmarshaler/uuid.go create mode 100644 vendor/github.com/gogo/protobuf/test/combos/unsafeboth/bug_test.go create mode 100644 vendor/github.com/gogo/protobuf/test/combos/unsafeboth/thetest.pb.go create mode 100644 vendor/github.com/gogo/protobuf/test/combos/unsafeboth/thetest.proto create mode 100644 vendor/github.com/gogo/protobuf/test/combos/unsafeboth/thetestpb_test.go create mode 100644 vendor/github.com/gogo/protobuf/test/combos/unsafeboth/uuid.go create mode 100644 vendor/github.com/gogo/protobuf/test/combos/unsafemarshaler/bug_test.go create mode 100644 vendor/github.com/gogo/protobuf/test/combos/unsafemarshaler/thetest.pb.go create mode 100644 vendor/github.com/gogo/protobuf/test/combos/unsafemarshaler/thetest.proto create mode 100644 vendor/github.com/gogo/protobuf/test/combos/unsafemarshaler/thetestpb_test.go create mode 100644 vendor/github.com/gogo/protobuf/test/combos/unsafemarshaler/uuid.go create mode 100644 vendor/github.com/gogo/protobuf/test/combos/unsafeunmarshaler/bug_test.go create mode 100644 vendor/github.com/gogo/protobuf/test/combos/unsafeunmarshaler/thetest.pb.go create mode 100644 vendor/github.com/gogo/protobuf/test/combos/unsafeunmarshaler/thetest.proto create mode 100644 vendor/github.com/gogo/protobuf/test/combos/unsafeunmarshaler/thetestpb_test.go create mode 100644 vendor/github.com/gogo/protobuf/test/combos/unsafeunmarshaler/uuid.go create mode 100644 vendor/github.com/gogo/protobuf/test/custom-dash-type/customdash.go create mode 100644 vendor/github.com/gogo/protobuf/test/custom/custom.go create mode 100644 vendor/github.com/gogo/protobuf/test/custom/custom_test.go create mode 100644 vendor/github.com/gogo/protobuf/test/custombytesnonstruct/Makefile create mode 100644 vendor/github.com/gogo/protobuf/test/custombytesnonstruct/custombytesnonstruct_test.go create mode 100644 vendor/github.com/gogo/protobuf/test/custombytesnonstruct/customtype.go create mode 100644 vendor/github.com/gogo/protobuf/test/custombytesnonstruct/proto.pb.go create mode 100644 vendor/github.com/gogo/protobuf/test/custombytesnonstruct/proto.proto create mode 100644 vendor/github.com/gogo/protobuf/test/dashfilename/dash-filename.proto create mode 100644 vendor/github.com/gogo/protobuf/test/dashfilename/df_test.go create mode 100644 vendor/github.com/gogo/protobuf/test/dashfilename/doc.go create mode 100644 vendor/github.com/gogo/protobuf/test/defaultconflict/df.proto create mode 100644 vendor/github.com/gogo/protobuf/test/defaultconflict/dg.proto create mode 100644 vendor/github.com/gogo/protobuf/test/defaultconflict/doc.go create mode 100644 vendor/github.com/gogo/protobuf/test/defaultconflict/nc.proto create mode 100644 vendor/github.com/gogo/protobuf/test/defaultconflict/nc_test.go create mode 100644 vendor/github.com/gogo/protobuf/test/defaultconflict/ne.proto create mode 100644 vendor/github.com/gogo/protobuf/test/defaultconflict/nx.proto create mode 100644 vendor/github.com/gogo/protobuf/test/embedconflict/.gitignore create mode 100644 vendor/github.com/gogo/protobuf/test/embedconflict/doc.go create mode 100644 vendor/github.com/gogo/protobuf/test/embedconflict/eb.proto create mode 100644 vendor/github.com/gogo/protobuf/test/embedconflict/ec.proto create mode 100644 vendor/github.com/gogo/protobuf/test/embedconflict/ec_test.go create mode 100644 vendor/github.com/gogo/protobuf/test/embedconflict/ee.proto create mode 100644 vendor/github.com/gogo/protobuf/test/embedconflict/em.proto create mode 100644 vendor/github.com/gogo/protobuf/test/embedconflict/en.proto create mode 100644 vendor/github.com/gogo/protobuf/test/embedconflict/er.proto create mode 100644 vendor/github.com/gogo/protobuf/test/empty-issue70/Makefile create mode 100644 vendor/github.com/gogo/protobuf/test/empty-issue70/empty.pb.go create mode 100644 vendor/github.com/gogo/protobuf/test/empty-issue70/empty.proto create mode 100644 vendor/github.com/gogo/protobuf/test/empty-issue70/empty_test.go create mode 100644 vendor/github.com/gogo/protobuf/test/enumcustomname/Makefile create mode 100644 vendor/github.com/gogo/protobuf/test/enumcustomname/enumcustomname.pb.go create mode 100644 vendor/github.com/gogo/protobuf/test/enumcustomname/enumcustomname.proto create mode 100644 vendor/github.com/gogo/protobuf/test/enumprefix/Makefile create mode 100644 vendor/github.com/gogo/protobuf/test/enumprefix/enumprefix.pb.go create mode 100644 vendor/github.com/gogo/protobuf/test/enumprefix/enumprefix.proto create mode 100644 vendor/github.com/gogo/protobuf/test/enumstringer/Makefile create mode 100644 vendor/github.com/gogo/protobuf/test/enumstringer/enumstringer.pb.go create mode 100644 vendor/github.com/gogo/protobuf/test/enumstringer/enumstringer.proto create mode 100644 vendor/github.com/gogo/protobuf/test/enumstringer/enumstringerpb_test.go create mode 100644 vendor/github.com/gogo/protobuf/test/enumstringer/string.go create mode 100644 vendor/github.com/gogo/protobuf/test/example/Makefile create mode 100644 vendor/github.com/gogo/protobuf/test/example/example.pb.go create mode 100644 vendor/github.com/gogo/protobuf/test/example/example.proto create mode 100644 vendor/github.com/gogo/protobuf/test/example/example_test.go create mode 100644 vendor/github.com/gogo/protobuf/test/example/examplepb_test.go create mode 100644 vendor/github.com/gogo/protobuf/test/extension_test.go create mode 100644 vendor/github.com/gogo/protobuf/test/filedotname/Makefile create mode 100644 vendor/github.com/gogo/protobuf/test/filedotname/file.dot.pb.go create mode 100644 vendor/github.com/gogo/protobuf/test/filedotname/file.dot.proto create mode 100644 vendor/github.com/gogo/protobuf/test/filedotname/file.dotpb_test.go create mode 100644 vendor/github.com/gogo/protobuf/test/fuzztests/Makefile create mode 100644 vendor/github.com/gogo/protobuf/test/fuzztests/fuzz.pb.go create mode 100644 vendor/github.com/gogo/protobuf/test/fuzztests/fuzz.proto create mode 100644 vendor/github.com/gogo/protobuf/test/fuzztests/fuzz_test.go create mode 100644 vendor/github.com/gogo/protobuf/test/group/Makefile create mode 100644 vendor/github.com/gogo/protobuf/test/group/group.pb.go create mode 100644 vendor/github.com/gogo/protobuf/test/group/group.proto create mode 100644 vendor/github.com/gogo/protobuf/test/group/grouppb_test.go create mode 100644 vendor/github.com/gogo/protobuf/test/importdedup/Makefile create mode 100644 vendor/github.com/gogo/protobuf/test/importdedup/importdedup_test.go create mode 100644 vendor/github.com/gogo/protobuf/test/importdedup/proto.pb.go create mode 100644 vendor/github.com/gogo/protobuf/test/importdedup/proto.proto create mode 100644 vendor/github.com/gogo/protobuf/test/importdedup/subpkg/customtype.go create mode 100644 vendor/github.com/gogo/protobuf/test/importdedup/subpkg/subproto.pb.go create mode 100644 vendor/github.com/gogo/protobuf/test/importdedup/subpkg/subproto.proto create mode 100644 vendor/github.com/gogo/protobuf/test/indeximport-issue72/Makefile create mode 100644 vendor/github.com/gogo/protobuf/test/indeximport-issue72/index/index.pb.go create mode 100644 vendor/github.com/gogo/protobuf/test/indeximport-issue72/index/index.proto create mode 100644 vendor/github.com/gogo/protobuf/test/indeximport-issue72/index/indexpb_test.go create mode 100644 vendor/github.com/gogo/protobuf/test/indeximport-issue72/indeximport.pb.go create mode 100644 vendor/github.com/gogo/protobuf/test/indeximport-issue72/indeximport.proto create mode 100644 vendor/github.com/gogo/protobuf/test/indeximport-issue72/indeximportpb_test.go create mode 100644 vendor/github.com/gogo/protobuf/test/issue34/Makefile create mode 100644 vendor/github.com/gogo/protobuf/test/issue34/issue34_test.go create mode 100644 vendor/github.com/gogo/protobuf/test/issue34/proto.pb.go create mode 100644 vendor/github.com/gogo/protobuf/test/issue34/proto.proto create mode 100644 vendor/github.com/gogo/protobuf/test/issue42order/Makefile create mode 100644 vendor/github.com/gogo/protobuf/test/issue42order/issue42.pb.go create mode 100644 vendor/github.com/gogo/protobuf/test/issue42order/issue42.proto create mode 100644 vendor/github.com/gogo/protobuf/test/issue42order/order_test.go create mode 100644 vendor/github.com/gogo/protobuf/test/issue8/Makefile create mode 100644 vendor/github.com/gogo/protobuf/test/issue8/proto.pb.go create mode 100644 vendor/github.com/gogo/protobuf/test/issue8/proto.proto create mode 100644 vendor/github.com/gogo/protobuf/test/issue8/protopb_test.go create mode 100644 vendor/github.com/gogo/protobuf/test/mapsproto2/Makefile create mode 100644 vendor/github.com/gogo/protobuf/test/mapsproto2/combos/both/mapsproto2.pb.go create mode 100644 vendor/github.com/gogo/protobuf/test/mapsproto2/combos/both/mapsproto2.proto create mode 100644 vendor/github.com/gogo/protobuf/test/mapsproto2/combos/both/mapsproto2pb_test.go create mode 100644 vendor/github.com/gogo/protobuf/test/mapsproto2/combos/marshaler/mapsproto2.pb.go create mode 100644 vendor/github.com/gogo/protobuf/test/mapsproto2/combos/marshaler/mapsproto2.proto create mode 100644 vendor/github.com/gogo/protobuf/test/mapsproto2/combos/marshaler/mapsproto2pb_test.go create mode 100644 vendor/github.com/gogo/protobuf/test/mapsproto2/combos/neither/mapsproto2.pb.go create mode 100644 vendor/github.com/gogo/protobuf/test/mapsproto2/combos/neither/mapsproto2.proto create mode 100644 vendor/github.com/gogo/protobuf/test/mapsproto2/combos/neither/mapsproto2pb_test.go create mode 100644 vendor/github.com/gogo/protobuf/test/mapsproto2/combos/unmarshaler/mapsproto2.pb.go create mode 100644 vendor/github.com/gogo/protobuf/test/mapsproto2/combos/unmarshaler/mapsproto2.proto create mode 100644 vendor/github.com/gogo/protobuf/test/mapsproto2/combos/unmarshaler/mapsproto2pb_test.go create mode 100644 vendor/github.com/gogo/protobuf/test/mapsproto2/combos/unsafeboth/mapsproto2.pb.go create mode 100644 vendor/github.com/gogo/protobuf/test/mapsproto2/combos/unsafeboth/mapsproto2.proto create mode 100644 vendor/github.com/gogo/protobuf/test/mapsproto2/combos/unsafeboth/mapsproto2pb_test.go create mode 100644 vendor/github.com/gogo/protobuf/test/mapsproto2/combos/unsafemarshaler/mapsproto2.pb.go create mode 100644 vendor/github.com/gogo/protobuf/test/mapsproto2/combos/unsafemarshaler/mapsproto2.proto create mode 100644 vendor/github.com/gogo/protobuf/test/mapsproto2/combos/unsafemarshaler/mapsproto2pb_test.go create mode 100644 vendor/github.com/gogo/protobuf/test/mapsproto2/combos/unsafeunmarshaler/mapsproto2.pb.go create mode 100644 vendor/github.com/gogo/protobuf/test/mapsproto2/combos/unsafeunmarshaler/mapsproto2.proto create mode 100644 vendor/github.com/gogo/protobuf/test/mapsproto2/combos/unsafeunmarshaler/mapsproto2pb_test.go create mode 100644 vendor/github.com/gogo/protobuf/test/mapsproto2/doc.go create mode 100644 vendor/github.com/gogo/protobuf/test/mapsproto2/header.proto create mode 100644 vendor/github.com/gogo/protobuf/test/mapsproto2/mapsproto2.proto create mode 100644 vendor/github.com/gogo/protobuf/test/mixbench/marshal.txt create mode 100644 vendor/github.com/gogo/protobuf/test/mixbench/marshaler.txt create mode 100644 vendor/github.com/gogo/protobuf/test/mixbench/mixbench.go create mode 100644 vendor/github.com/gogo/protobuf/test/mixbench/unmarshal.txt create mode 100644 vendor/github.com/gogo/protobuf/test/mixbench/unmarshaler.txt create mode 100644 vendor/github.com/gogo/protobuf/test/mixbench/unsafe_marshaler.txt create mode 100644 vendor/github.com/gogo/protobuf/test/mixbench/unsafe_unmarshaler.txt create mode 100644 vendor/github.com/gogo/protobuf/test/moredefaults/Makefile create mode 100644 vendor/github.com/gogo/protobuf/test/moredefaults/md.pb.go create mode 100644 vendor/github.com/gogo/protobuf/test/moredefaults/md.proto create mode 100644 vendor/github.com/gogo/protobuf/test/moredefaults/md_test.go create mode 100644 vendor/github.com/gogo/protobuf/test/moredefaults/mdpb_test.go create mode 100644 vendor/github.com/gogo/protobuf/test/nopackage/Makefile create mode 100644 vendor/github.com/gogo/protobuf/test/nopackage/nopackage.pb.go create mode 100644 vendor/github.com/gogo/protobuf/test/nopackage/nopackage.proto create mode 100644 vendor/github.com/gogo/protobuf/test/nopackage/nopackage_test.go create mode 100644 vendor/github.com/gogo/protobuf/test/oneof/Makefile create mode 100644 vendor/github.com/gogo/protobuf/test/oneof/combos/both/one.pb.go create mode 100644 vendor/github.com/gogo/protobuf/test/oneof/combos/both/one.proto create mode 100644 vendor/github.com/gogo/protobuf/test/oneof/combos/both/onepb_test.go create mode 100644 vendor/github.com/gogo/protobuf/test/oneof/combos/marshaler/one.pb.go create mode 100644 vendor/github.com/gogo/protobuf/test/oneof/combos/marshaler/one.proto create mode 100644 vendor/github.com/gogo/protobuf/test/oneof/combos/marshaler/onepb_test.go create mode 100644 vendor/github.com/gogo/protobuf/test/oneof/combos/neither/one.pb.go create mode 100644 vendor/github.com/gogo/protobuf/test/oneof/combos/neither/one.proto create mode 100644 vendor/github.com/gogo/protobuf/test/oneof/combos/neither/onepb_test.go create mode 100644 vendor/github.com/gogo/protobuf/test/oneof/combos/unmarshaler/one.pb.go create mode 100644 vendor/github.com/gogo/protobuf/test/oneof/combos/unmarshaler/one.proto create mode 100644 vendor/github.com/gogo/protobuf/test/oneof/combos/unmarshaler/onepb_test.go create mode 100644 vendor/github.com/gogo/protobuf/test/oneof/combos/unsafeboth/one.pb.go create mode 100644 vendor/github.com/gogo/protobuf/test/oneof/combos/unsafeboth/one.proto create mode 100644 vendor/github.com/gogo/protobuf/test/oneof/combos/unsafeboth/onepb_test.go create mode 100644 vendor/github.com/gogo/protobuf/test/oneof/combos/unsafemarshaler/one.pb.go create mode 100644 vendor/github.com/gogo/protobuf/test/oneof/combos/unsafemarshaler/one.proto create mode 100644 vendor/github.com/gogo/protobuf/test/oneof/combos/unsafemarshaler/onepb_test.go create mode 100644 vendor/github.com/gogo/protobuf/test/oneof/combos/unsafeunmarshaler/one.pb.go create mode 100644 vendor/github.com/gogo/protobuf/test/oneof/combos/unsafeunmarshaler/one.proto create mode 100644 vendor/github.com/gogo/protobuf/test/oneof/combos/unsafeunmarshaler/onepb_test.go create mode 100644 vendor/github.com/gogo/protobuf/test/oneof/doc.go create mode 100644 vendor/github.com/gogo/protobuf/test/oneof/one.proto create mode 100644 vendor/github.com/gogo/protobuf/test/oneof3/Makefile create mode 100644 vendor/github.com/gogo/protobuf/test/oneof3/combos/both/one.pb.go create mode 100644 vendor/github.com/gogo/protobuf/test/oneof3/combos/both/one.proto create mode 100644 vendor/github.com/gogo/protobuf/test/oneof3/combos/both/onepb_test.go create mode 100644 vendor/github.com/gogo/protobuf/test/oneof3/combos/marshaler/one.pb.go create mode 100644 vendor/github.com/gogo/protobuf/test/oneof3/combos/marshaler/one.proto create mode 100644 vendor/github.com/gogo/protobuf/test/oneof3/combos/marshaler/onepb_test.go create mode 100644 vendor/github.com/gogo/protobuf/test/oneof3/combos/neither/one.pb.go create mode 100644 vendor/github.com/gogo/protobuf/test/oneof3/combos/neither/one.proto create mode 100644 vendor/github.com/gogo/protobuf/test/oneof3/combos/neither/onepb_test.go create mode 100644 vendor/github.com/gogo/protobuf/test/oneof3/combos/unmarshaler/one.pb.go create mode 100644 vendor/github.com/gogo/protobuf/test/oneof3/combos/unmarshaler/one.proto create mode 100644 vendor/github.com/gogo/protobuf/test/oneof3/combos/unmarshaler/onepb_test.go create mode 100644 vendor/github.com/gogo/protobuf/test/oneof3/combos/unsafeboth/one.pb.go create mode 100644 vendor/github.com/gogo/protobuf/test/oneof3/combos/unsafeboth/one.proto create mode 100644 vendor/github.com/gogo/protobuf/test/oneof3/combos/unsafeboth/onepb_test.go create mode 100644 vendor/github.com/gogo/protobuf/test/oneof3/combos/unsafemarshaler/one.pb.go create mode 100644 vendor/github.com/gogo/protobuf/test/oneof3/combos/unsafemarshaler/one.proto create mode 100644 vendor/github.com/gogo/protobuf/test/oneof3/combos/unsafemarshaler/onepb_test.go create mode 100644 vendor/github.com/gogo/protobuf/test/oneof3/combos/unsafeunmarshaler/one.pb.go create mode 100644 vendor/github.com/gogo/protobuf/test/oneof3/combos/unsafeunmarshaler/one.proto create mode 100644 vendor/github.com/gogo/protobuf/test/oneof3/combos/unsafeunmarshaler/onepb_test.go create mode 100644 vendor/github.com/gogo/protobuf/test/oneof3/doc.go create mode 100644 vendor/github.com/gogo/protobuf/test/oneof3/one.proto create mode 100644 vendor/github.com/gogo/protobuf/test/oneofembed/Makefile create mode 100644 vendor/github.com/gogo/protobuf/test/oneofembed/oneofembed.pb.go create mode 100644 vendor/github.com/gogo/protobuf/test/oneofembed/oneofembed.proto create mode 100644 vendor/github.com/gogo/protobuf/test/oneofembed/oneofembedpb_test.go create mode 100644 vendor/github.com/gogo/protobuf/test/packed/Makefile create mode 100644 vendor/github.com/gogo/protobuf/test/packed/doc.go create mode 100644 vendor/github.com/gogo/protobuf/test/packed/packed.pb.go create mode 100644 vendor/github.com/gogo/protobuf/test/packed/packed.proto create mode 100644 vendor/github.com/gogo/protobuf/test/packed/packed_test.go create mode 100644 vendor/github.com/gogo/protobuf/test/protosize/Makefile create mode 100644 vendor/github.com/gogo/protobuf/test/protosize/protosize.pb.go create mode 100644 vendor/github.com/gogo/protobuf/test/protosize/protosize.proto create mode 100644 vendor/github.com/gogo/protobuf/test/protosize/protosize_test.go create mode 100644 vendor/github.com/gogo/protobuf/test/protosize/protosizepb_test.go create mode 100644 vendor/github.com/gogo/protobuf/test/required/Makefile create mode 100644 vendor/github.com/gogo/protobuf/test/required/requiredexample.pb.go create mode 100644 vendor/github.com/gogo/protobuf/test/required/requiredexample.proto create mode 100644 vendor/github.com/gogo/protobuf/test/required/requiredexamplepb_test.go create mode 100644 vendor/github.com/gogo/protobuf/test/sizeunderscore/Makefile create mode 100644 vendor/github.com/gogo/protobuf/test/sizeunderscore/sizeunderscore.pb.go create mode 100644 vendor/github.com/gogo/protobuf/test/sizeunderscore/sizeunderscore.proto create mode 100644 vendor/github.com/gogo/protobuf/test/sizeunderscore/sizeunderscorepb_test.go create mode 100644 vendor/github.com/gogo/protobuf/test/tags/Makefile create mode 100644 vendor/github.com/gogo/protobuf/test/tags/doc.go create mode 100644 vendor/github.com/gogo/protobuf/test/tags/tags.pb.go create mode 100644 vendor/github.com/gogo/protobuf/test/tags/tags.proto create mode 100644 vendor/github.com/gogo/protobuf/test/tags/tags_test.go create mode 100644 vendor/github.com/gogo/protobuf/test/theproto3/Makefile create mode 100644 vendor/github.com/gogo/protobuf/test/theproto3/combos/both/proto3_test.go create mode 100644 vendor/github.com/gogo/protobuf/test/theproto3/combos/both/theproto3.pb.go create mode 100644 vendor/github.com/gogo/protobuf/test/theproto3/combos/both/theproto3.proto create mode 100644 vendor/github.com/gogo/protobuf/test/theproto3/combos/both/theproto3pb_test.go create mode 100644 vendor/github.com/gogo/protobuf/test/theproto3/combos/marshaler/proto3_test.go create mode 100644 vendor/github.com/gogo/protobuf/test/theproto3/combos/marshaler/theproto3.pb.go create mode 100644 vendor/github.com/gogo/protobuf/test/theproto3/combos/marshaler/theproto3.proto create mode 100644 vendor/github.com/gogo/protobuf/test/theproto3/combos/marshaler/theproto3pb_test.go create mode 100644 vendor/github.com/gogo/protobuf/test/theproto3/combos/neither/proto3_test.go create mode 100644 vendor/github.com/gogo/protobuf/test/theproto3/combos/neither/theproto3.pb.go create mode 100644 vendor/github.com/gogo/protobuf/test/theproto3/combos/neither/theproto3.proto create mode 100644 vendor/github.com/gogo/protobuf/test/theproto3/combos/neither/theproto3pb_test.go create mode 100644 vendor/github.com/gogo/protobuf/test/theproto3/combos/unmarshaler/proto3_test.go create mode 100644 vendor/github.com/gogo/protobuf/test/theproto3/combos/unmarshaler/theproto3.pb.go create mode 100644 vendor/github.com/gogo/protobuf/test/theproto3/combos/unmarshaler/theproto3.proto create mode 100644 vendor/github.com/gogo/protobuf/test/theproto3/combos/unmarshaler/theproto3pb_test.go create mode 100644 vendor/github.com/gogo/protobuf/test/theproto3/combos/unsafeboth/proto3_test.go create mode 100644 vendor/github.com/gogo/protobuf/test/theproto3/combos/unsafeboth/theproto3.pb.go create mode 100644 vendor/github.com/gogo/protobuf/test/theproto3/combos/unsafeboth/theproto3.proto create mode 100644 vendor/github.com/gogo/protobuf/test/theproto3/combos/unsafeboth/theproto3pb_test.go create mode 100644 vendor/github.com/gogo/protobuf/test/theproto3/combos/unsafemarshaler/proto3_test.go create mode 100644 vendor/github.com/gogo/protobuf/test/theproto3/combos/unsafemarshaler/theproto3.pb.go create mode 100644 vendor/github.com/gogo/protobuf/test/theproto3/combos/unsafemarshaler/theproto3.proto create mode 100644 vendor/github.com/gogo/protobuf/test/theproto3/combos/unsafemarshaler/theproto3pb_test.go create mode 100644 vendor/github.com/gogo/protobuf/test/theproto3/combos/unsafeunmarshaler/proto3_test.go create mode 100644 vendor/github.com/gogo/protobuf/test/theproto3/combos/unsafeunmarshaler/theproto3.pb.go create mode 100644 vendor/github.com/gogo/protobuf/test/theproto3/combos/unsafeunmarshaler/theproto3.proto create mode 100644 vendor/github.com/gogo/protobuf/test/theproto3/combos/unsafeunmarshaler/theproto3pb_test.go create mode 100644 vendor/github.com/gogo/protobuf/test/theproto3/doc.go create mode 100644 vendor/github.com/gogo/protobuf/test/theproto3/footer.proto create mode 100644 vendor/github.com/gogo/protobuf/test/theproto3/header.proto create mode 100644 vendor/github.com/gogo/protobuf/test/theproto3/maps.proto create mode 100644 vendor/github.com/gogo/protobuf/test/theproto3/proto3_test.go.in create mode 100644 vendor/github.com/gogo/protobuf/test/theproto3/theproto3.proto create mode 100644 vendor/github.com/gogo/protobuf/test/thetest.pb.go create mode 100644 vendor/github.com/gogo/protobuf/test/thetest.proto create mode 100644 vendor/github.com/gogo/protobuf/test/thetestpb_test.go create mode 100644 vendor/github.com/gogo/protobuf/test/unmarshalmerge/Makefile create mode 100644 vendor/github.com/gogo/protobuf/test/unmarshalmerge/unmarshalmerge.pb.go create mode 100644 vendor/github.com/gogo/protobuf/test/unmarshalmerge/unmarshalmerge.proto create mode 100644 vendor/github.com/gogo/protobuf/test/unmarshalmerge/unmarshalmerge_test.go create mode 100644 vendor/github.com/gogo/protobuf/test/unmarshalmerge/unmarshalmergepb_test.go create mode 100644 vendor/github.com/gogo/protobuf/test/unrecognized/Makefile create mode 100644 vendor/github.com/gogo/protobuf/test/unrecognized/oldnew_test.go create mode 100644 vendor/github.com/gogo/protobuf/test/unrecognized/unrecognized.pb.go create mode 100644 vendor/github.com/gogo/protobuf/test/unrecognized/unrecognized.proto create mode 100644 vendor/github.com/gogo/protobuf/test/unrecognized/unrecognizedpb_test.go create mode 100644 vendor/github.com/gogo/protobuf/test/unrecognizedgroup/Makefile create mode 100644 vendor/github.com/gogo/protobuf/test/unrecognizedgroup/oldnew_test.go create mode 100644 vendor/github.com/gogo/protobuf/test/unrecognizedgroup/unrecognizedgroup.pb.go create mode 100644 vendor/github.com/gogo/protobuf/test/unrecognizedgroup/unrecognizedgroup.proto create mode 100644 vendor/github.com/gogo/protobuf/test/unrecognizedgroup/unrecognizedgrouppb_test.go create mode 100644 vendor/github.com/gogo/protobuf/test/uuid.go create mode 100644 vendor/github.com/gogo/protobuf/test/uuid_test.go create mode 100644 vendor/github.com/gogo/protobuf/vanity/command/command.go create mode 100644 vendor/github.com/gogo/protobuf/vanity/enum.go create mode 100644 vendor/github.com/gogo/protobuf/vanity/field.go create mode 100644 vendor/github.com/gogo/protobuf/vanity/file.go create mode 100644 vendor/github.com/gogo/protobuf/vanity/foreach.go create mode 100644 vendor/github.com/gogo/protobuf/vanity/msg.go create mode 100644 vendor/github.com/gogo/protobuf/vanity/test/Makefile create mode 100644 vendor/github.com/gogo/protobuf/vanity/test/doc.go create mode 100644 vendor/github.com/gogo/protobuf/vanity/test/fast/gogovanity.pb.go create mode 100644 vendor/github.com/gogo/protobuf/vanity/test/fast/proto3.pb.go create mode 100644 vendor/github.com/gogo/protobuf/vanity/test/fast/vanity.pb.go create mode 100644 vendor/github.com/gogo/protobuf/vanity/test/faster/gogovanity.pb.go create mode 100644 vendor/github.com/gogo/protobuf/vanity/test/faster/proto3.pb.go create mode 100644 vendor/github.com/gogo/protobuf/vanity/test/faster/vanity.pb.go create mode 100644 vendor/github.com/gogo/protobuf/vanity/test/gofast/.gitignore create mode 100644 vendor/github.com/gogo/protobuf/vanity/test/gogovanity.proto create mode 100644 vendor/github.com/gogo/protobuf/vanity/test/proto3.proto create mode 100644 vendor/github.com/gogo/protobuf/vanity/test/slick/gogovanity.pb.go create mode 100644 vendor/github.com/gogo/protobuf/vanity/test/slick/proto3.pb.go create mode 100644 vendor/github.com/gogo/protobuf/vanity/test/slick/vanity.pb.go create mode 100644 vendor/github.com/gogo/protobuf/vanity/test/vanity.proto create mode 100644 vendor/github.com/gogo/protobuf/vanity/test/vanity_test.go create mode 100644 vendor/github.com/gogo/protobuf/version/version.go create mode 100644 vendor/github.com/golang/protobuf/.gitignore create mode 100644 vendor/github.com/golang/protobuf/.gitrepo create mode 100644 vendor/github.com/golang/protobuf/jsonpb/jsonpb.go create mode 100644 vendor/github.com/golang/protobuf/jsonpb/jsonpb_test.go create mode 100644 vendor/github.com/golang/protobuf/jsonpb/jsonpb_test_proto/Makefile create mode 100644 vendor/github.com/golang/protobuf/jsonpb/jsonpb_test_proto/more_test_objects.pb.go create mode 100644 vendor/github.com/golang/protobuf/jsonpb/jsonpb_test_proto/more_test_objects.proto create mode 100644 vendor/github.com/golang/protobuf/jsonpb/jsonpb_test_proto/test_objects.pb.go create mode 100644 vendor/github.com/golang/protobuf/jsonpb/jsonpb_test_proto/test_objects.proto create mode 100644 vendor/github.com/golang/protobuf/proto/all_test.go create mode 100644 vendor/github.com/golang/protobuf/proto/any_test.go create mode 100644 vendor/github.com/golang/protobuf/proto/clone_test.go create mode 100644 vendor/github.com/golang/protobuf/proto/equal_test.go create mode 100644 vendor/github.com/golang/protobuf/proto/extensions_test.go create mode 100644 vendor/github.com/golang/protobuf/proto/message_set_test.go create mode 100644 vendor/github.com/golang/protobuf/proto/proto3_proto/proto3.pb.go create mode 100644 vendor/github.com/golang/protobuf/proto/proto3_proto/proto3.proto create mode 100644 vendor/github.com/golang/protobuf/proto/proto3_test.go create mode 100644 vendor/github.com/golang/protobuf/proto/size2_test.go create mode 100644 vendor/github.com/golang/protobuf/proto/size_test.go create mode 100644 vendor/github.com/golang/protobuf/proto/testdata/Makefile create mode 100644 vendor/github.com/golang/protobuf/proto/testdata/golden_test.go create mode 100644 vendor/github.com/golang/protobuf/proto/testdata/test.pb.go create mode 100644 vendor/github.com/golang/protobuf/proto/testdata/test.proto create mode 100644 vendor/github.com/golang/protobuf/proto/text_parser_test.go create mode 100644 vendor/github.com/golang/protobuf/proto/text_test.go create mode 100644 vendor/github.com/golang/protobuf/protoc-gen-go/Makefile create mode 100644 vendor/github.com/golang/protobuf/protoc-gen-go/descriptor/Makefile create mode 100644 vendor/github.com/golang/protobuf/protoc-gen-go/descriptor/descriptor.pb.go create mode 100644 vendor/github.com/golang/protobuf/protoc-gen-go/doc.go create mode 100644 vendor/github.com/golang/protobuf/protoc-gen-go/generator/Makefile create mode 100644 vendor/github.com/golang/protobuf/protoc-gen-go/generator/generator.go create mode 100644 vendor/github.com/golang/protobuf/protoc-gen-go/generator/name_test.go create mode 100644 vendor/github.com/golang/protobuf/protoc-gen-go/grpc/grpc.go create mode 100644 vendor/github.com/golang/protobuf/protoc-gen-go/link_grpc.go create mode 100644 vendor/github.com/golang/protobuf/protoc-gen-go/main.go create mode 100644 vendor/github.com/golang/protobuf/protoc-gen-go/plugin/Makefile create mode 100644 vendor/github.com/golang/protobuf/protoc-gen-go/plugin/plugin.pb.go create mode 100644 vendor/github.com/golang/protobuf/protoc-gen-go/plugin/plugin.pb.golden create mode 100644 vendor/github.com/golang/protobuf/protoc-gen-go/testdata/Makefile create mode 100644 vendor/github.com/golang/protobuf/protoc-gen-go/testdata/extension_base.proto create mode 100644 vendor/github.com/golang/protobuf/protoc-gen-go/testdata/extension_extra.proto create mode 100644 vendor/github.com/golang/protobuf/protoc-gen-go/testdata/extension_test.go create mode 100644 vendor/github.com/golang/protobuf/protoc-gen-go/testdata/extension_user.proto create mode 100644 vendor/github.com/golang/protobuf/protoc-gen-go/testdata/grpc.proto create mode 100644 vendor/github.com/golang/protobuf/protoc-gen-go/testdata/imp.pb.go.golden create mode 100644 vendor/github.com/golang/protobuf/protoc-gen-go/testdata/imp.proto create mode 100644 vendor/github.com/golang/protobuf/protoc-gen-go/testdata/imp2.proto create mode 100644 vendor/github.com/golang/protobuf/protoc-gen-go/testdata/imp3.proto create mode 100644 vendor/github.com/golang/protobuf/protoc-gen-go/testdata/main_test.go create mode 100644 vendor/github.com/golang/protobuf/protoc-gen-go/testdata/multi/multi1.proto create mode 100644 vendor/github.com/golang/protobuf/protoc-gen-go/testdata/multi/multi2.proto create mode 100644 vendor/github.com/golang/protobuf/protoc-gen-go/testdata/multi/multi3.proto create mode 100644 vendor/github.com/golang/protobuf/protoc-gen-go/testdata/my_test/test.pb.go create mode 100644 vendor/github.com/golang/protobuf/protoc-gen-go/testdata/my_test/test.pb.go.golden create mode 100644 vendor/github.com/golang/protobuf/protoc-gen-go/testdata/my_test/test.proto create mode 100644 vendor/github.com/golang/protobuf/protoc-gen-go/testdata/proto3.proto create mode 100644 vendor/github.com/golang/protobuf/ptypes/any.go create mode 100644 vendor/github.com/golang/protobuf/ptypes/any/any.pb.go create mode 100644 vendor/github.com/golang/protobuf/ptypes/any/any.proto create mode 100644 vendor/github.com/golang/protobuf/ptypes/any_test.go create mode 100644 vendor/github.com/golang/protobuf/ptypes/doc.go create mode 100644 vendor/github.com/golang/protobuf/ptypes/duration.go create mode 100644 vendor/github.com/golang/protobuf/ptypes/duration/duration.pb.go create mode 100644 vendor/github.com/golang/protobuf/ptypes/duration/duration.proto create mode 100644 vendor/github.com/golang/protobuf/ptypes/duration_test.go create mode 100644 vendor/github.com/golang/protobuf/ptypes/empty/empty.pb.go create mode 100644 vendor/github.com/golang/protobuf/ptypes/empty/empty.proto create mode 100755 vendor/github.com/golang/protobuf/ptypes/regen.sh create mode 100644 vendor/github.com/golang/protobuf/ptypes/struct/struct.pb.go create mode 100644 vendor/github.com/golang/protobuf/ptypes/struct/struct.proto create mode 100644 vendor/github.com/golang/protobuf/ptypes/timestamp.go create mode 100644 vendor/github.com/golang/protobuf/ptypes/timestamp/timestamp.pb.go create mode 100644 vendor/github.com/golang/protobuf/ptypes/timestamp/timestamp.proto create mode 100644 vendor/github.com/golang/protobuf/ptypes/timestamp_test.go create mode 100644 vendor/github.com/golang/protobuf/ptypes/wrappers/wrappers.pb.go create mode 100644 vendor/github.com/golang/protobuf/ptypes/wrappers/wrappers.proto create mode 100644 vendor/github.com/gorhill/cronexpr/.gitrepo create mode 100644 vendor/github.com/gorhill/cronexpr/cronexpr/README.md create mode 100644 vendor/github.com/gorhill/cronexpr/cronexpr/main.go create mode 100644 vendor/github.com/gorhill/cronexpr/cronexpr_test.go create mode 100644 vendor/github.com/gorhill/cronexpr/example_test.go create mode 100644 vendor/github.com/influxdata/influxdb/.dockerignore create mode 100644 vendor/github.com/influxdata/influxdb/.gitattributes create mode 100644 vendor/github.com/influxdata/influxdb/.github/ISSUE_TEMPLATE.md create mode 100644 vendor/github.com/influxdata/influxdb/.github/PULL_REQUEST_TEMPLATE.md create mode 100644 vendor/github.com/influxdata/influxdb/.gitignore create mode 100644 vendor/github.com/influxdata/influxdb/.gitrepo create mode 100755 vendor/github.com/influxdata/influxdb/.hooks/pre-commit create mode 100644 vendor/github.com/influxdata/influxdb/.mention-bot create mode 100644 vendor/github.com/influxdata/influxdb/client/example_test.go create mode 100644 vendor/github.com/influxdata/influxdb/client/influxdb_test.go create mode 100644 vendor/github.com/influxdata/influxdb/client/v2/client_test.go create mode 100644 vendor/github.com/influxdata/influxdb/client/v2/example_test.go create mode 100644 vendor/github.com/influxdata/influxdb/cmd/influx/cli/cli.go create mode 100644 vendor/github.com/influxdata/influxdb/cmd/influx/cli/cli_test.go create mode 100644 vendor/github.com/influxdata/influxdb/cmd/influx/main.go create mode 100644 vendor/github.com/influxdata/influxdb/cmd/influx_inspect/export.go create mode 100644 vendor/github.com/influxdata/influxdb/cmd/influx_inspect/info.go create mode 100644 vendor/github.com/influxdata/influxdb/cmd/influx_inspect/main.go create mode 100644 vendor/github.com/influxdata/influxdb/cmd/influx_inspect/tsm.go create mode 100644 vendor/github.com/influxdata/influxdb/cmd/influx_inspect/verify.go create mode 100644 vendor/github.com/influxdata/influxdb/cmd/influx_stress/README.md create mode 100644 vendor/github.com/influxdata/influxdb/cmd/influx_stress/examples/template.toml create mode 100644 vendor/github.com/influxdata/influxdb/cmd/influx_stress/influx_stress.go create mode 100644 vendor/github.com/influxdata/influxdb/cmd/influx_tsm/README.md create mode 100644 vendor/github.com/influxdata/influxdb/cmd/influx_tsm/b1/reader.go create mode 100644 vendor/github.com/influxdata/influxdb/cmd/influx_tsm/bz1/reader.go create mode 100644 vendor/github.com/influxdata/influxdb/cmd/influx_tsm/converter.go create mode 100644 vendor/github.com/influxdata/influxdb/cmd/influx_tsm/main.go create mode 100644 vendor/github.com/influxdata/influxdb/cmd/influx_tsm/stats/stats.go create mode 100644 vendor/github.com/influxdata/influxdb/cmd/influx_tsm/tracker.go create mode 100644 vendor/github.com/influxdata/influxdb/cmd/influx_tsm/tsdb/codec.go create mode 100644 vendor/github.com/influxdata/influxdb/cmd/influx_tsm/tsdb/database.go create mode 100644 vendor/github.com/influxdata/influxdb/cmd/influx_tsm/tsdb/internal/meta.pb.go create mode 100644 vendor/github.com/influxdata/influxdb/cmd/influx_tsm/tsdb/types.go create mode 100644 vendor/github.com/influxdata/influxdb/cmd/influxd/backup/backup.go create mode 100644 vendor/github.com/influxdata/influxdb/cmd/influxd/help/help.go create mode 100644 vendor/github.com/influxdata/influxdb/cmd/influxd/main.go create mode 100644 vendor/github.com/influxdata/influxdb/cmd/influxd/restore/restore.go create mode 100644 vendor/github.com/influxdata/influxdb/cmd/influxd/run/backup_restore_test.go create mode 100644 vendor/github.com/influxdata/influxdb/cmd/influxd/run/command.go create mode 100644 vendor/github.com/influxdata/influxdb/cmd/influxd/run/config.go create mode 100644 vendor/github.com/influxdata/influxdb/cmd/influxd/run/config_command.go create mode 100644 vendor/github.com/influxdata/influxdb/cmd/influxd/run/config_test.go create mode 100644 vendor/github.com/influxdata/influxdb/cmd/influxd/run/server.go create mode 100644 vendor/github.com/influxdata/influxdb/cmd/influxd/run/server_bench_test.go create mode 100644 vendor/github.com/influxdata/influxdb/cmd/influxd/run/server_dataonly.go create mode 100644 vendor/github.com/influxdata/influxdb/cmd/influxd/run/server_default.go create mode 100644 vendor/github.com/influxdata/influxdb/cmd/influxd/run/server_helpers_test.go create mode 100644 vendor/github.com/influxdata/influxdb/cmd/influxd/run/server_suite_test.go create mode 100644 vendor/github.com/influxdata/influxdb/cmd/influxd/run/server_test.go create mode 100644 vendor/github.com/influxdata/influxdb/cmd/influxd/run/server_test.md create mode 100644 vendor/github.com/influxdata/influxdb/coordinator/config.go create mode 100644 vendor/github.com/influxdata/influxdb/coordinator/config_test.go create mode 100644 vendor/github.com/influxdata/influxdb/coordinator/meta_client.go create mode 100644 vendor/github.com/influxdata/influxdb/coordinator/meta_client_test.go create mode 100644 vendor/github.com/influxdata/influxdb/coordinator/points_writer.go create mode 100644 vendor/github.com/influxdata/influxdb/coordinator/points_writer_test.go create mode 100644 vendor/github.com/influxdata/influxdb/coordinator/statement_executor.go create mode 100644 vendor/github.com/influxdata/influxdb/coordinator/statement_executor_test.go create mode 100644 vendor/github.com/influxdata/influxdb/etc/burn-in/.rvmrc create mode 100644 vendor/github.com/influxdata/influxdb/etc/burn-in/Gemfile create mode 100644 vendor/github.com/influxdata/influxdb/etc/burn-in/Gemfile.lock create mode 100644 vendor/github.com/influxdata/influxdb/etc/burn-in/burn-in.rb create mode 100644 vendor/github.com/influxdata/influxdb/etc/burn-in/log.rb create mode 100644 vendor/github.com/influxdata/influxdb/etc/burn-in/random_gaussian.rb create mode 100644 vendor/github.com/influxdata/influxdb/etc/burn-in/random_points.rb create mode 100644 vendor/github.com/influxdata/influxdb/etc/config.sample.toml create mode 100644 vendor/github.com/influxdata/influxdb/importer/README.md create mode 100644 vendor/github.com/influxdata/influxdb/importer/v8/importer.go create mode 100644 vendor/github.com/influxdata/influxdb/influxql/ast_test.go create mode 100644 vendor/github.com/influxdata/influxdb/influxql/call_iterator_test.go create mode 100644 vendor/github.com/influxdata/influxdb/influxql/emitter_test.go create mode 100644 vendor/github.com/influxdata/influxdb/influxql/functions_test.go create mode 100644 vendor/github.com/influxdata/influxdb/influxql/iterator_test.go create mode 100644 vendor/github.com/influxdata/influxdb/influxql/neldermead/neldermead_test.go create mode 100644 vendor/github.com/influxdata/influxdb/influxql/parser_test.go create mode 100644 vendor/github.com/influxdata/influxdb/influxql/point_test.go create mode 100644 vendor/github.com/influxdata/influxdb/influxql/query_executor_test.go create mode 100644 vendor/github.com/influxdata/influxdb/influxql/sanitize_test.go create mode 100644 vendor/github.com/influxdata/influxdb/influxql/scanner_test.go create mode 100644 vendor/github.com/influxdata/influxdb/influxql/select_test.go create mode 100644 vendor/github.com/influxdata/influxdb/influxql/statement_rewriter_test.go create mode 100644 vendor/github.com/influxdata/influxdb/models/points_test.go create mode 100644 vendor/github.com/influxdata/influxdb/monitor/config_test.go create mode 100644 vendor/github.com/influxdata/influxdb/pkg/deep/equal.go create mode 100644 vendor/github.com/influxdata/influxdb/pkg/escape/bytes_test.go create mode 100644 vendor/github.com/influxdata/influxdb/pkg/slices/strings.go create mode 100644 vendor/github.com/influxdata/influxdb/scripts/influxdb.service create mode 100755 vendor/github.com/influxdata/influxdb/scripts/init.sh create mode 100644 vendor/github.com/influxdata/influxdb/scripts/logrotate create mode 100644 vendor/github.com/influxdata/influxdb/scripts/post-install.sh create mode 100644 vendor/github.com/influxdata/influxdb/scripts/post-uninstall.sh create mode 100755 vendor/github.com/influxdata/influxdb/scripts/pre-install.sh create mode 100644 vendor/github.com/influxdata/influxdb/services/admin/README.md create mode 100644 vendor/github.com/influxdata/influxdb/services/admin/admin.go create mode 100644 vendor/github.com/influxdata/influxdb/services/admin/assets/README.md create mode 100644 vendor/github.com/influxdata/influxdb/services/admin/assets/css/admin.css create mode 100644 vendor/github.com/influxdata/influxdb/services/admin/assets/css/bootstrap.css create mode 100644 vendor/github.com/influxdata/influxdb/services/admin/assets/css/dropdowns-enhancement.css create mode 100644 vendor/github.com/influxdata/influxdb/services/admin/assets/fonts/glyphicons-halflings-regular.eot create mode 100644 vendor/github.com/influxdata/influxdb/services/admin/assets/fonts/glyphicons-halflings-regular.svg create mode 100644 vendor/github.com/influxdata/influxdb/services/admin/assets/fonts/glyphicons-halflings-regular.ttf create mode 100644 vendor/github.com/influxdata/influxdb/services/admin/assets/fonts/glyphicons-halflings-regular.woff create mode 100644 vendor/github.com/influxdata/influxdb/services/admin/assets/fonts/glyphicons-halflings-regular.woff2 create mode 100644 vendor/github.com/influxdata/influxdb/services/admin/assets/img/influxdb-light400.png create mode 100644 vendor/github.com/influxdata/influxdb/services/admin/assets/index.html create mode 100644 vendor/github.com/influxdata/influxdb/services/admin/assets/js/admin.js create mode 100644 vendor/github.com/influxdata/influxdb/services/admin/assets/js/vendor/bootstrap-3.3.5.min.js create mode 100644 vendor/github.com/influxdata/influxdb/services/admin/assets/js/vendor/jquery-2.1.4.min.js create mode 100644 vendor/github.com/influxdata/influxdb/services/admin/assets/js/vendor/react-0.13.3.min.js create mode 100644 vendor/github.com/influxdata/influxdb/services/admin/config.go create mode 100644 vendor/github.com/influxdata/influxdb/services/admin/config_test.go create mode 100644 vendor/github.com/influxdata/influxdb/services/admin/service.go create mode 100644 vendor/github.com/influxdata/influxdb/services/admin/service_test.go create mode 100644 vendor/github.com/influxdata/influxdb/services/admin/statik/README.md create mode 100644 vendor/github.com/influxdata/influxdb/services/admin/statik/statik.go create mode 100644 vendor/github.com/influxdata/influxdb/services/collectd/config_test.go create mode 100644 vendor/github.com/influxdata/influxdb/services/collectd/service_test.go create mode 100644 vendor/github.com/influxdata/influxdb/services/collectd/test_client/README.md create mode 100644 vendor/github.com/influxdata/influxdb/services/collectd/test_client/client.go create mode 100644 vendor/github.com/influxdata/influxdb/services/continuous_querier/config.go create mode 100644 vendor/github.com/influxdata/influxdb/services/continuous_querier/config_test.go create mode 100644 vendor/github.com/influxdata/influxdb/services/continuous_querier/continuous_queries.md create mode 100644 vendor/github.com/influxdata/influxdb/services/continuous_querier/service.go create mode 100644 vendor/github.com/influxdata/influxdb/services/continuous_querier/service_test.go create mode 100644 vendor/github.com/influxdata/influxdb/services/graphite/config_test.go create mode 100644 vendor/github.com/influxdata/influxdb/services/graphite/parser_test.go create mode 100644 vendor/github.com/influxdata/influxdb/services/graphite/service_test.go create mode 100644 vendor/github.com/influxdata/influxdb/services/httpd/config.go create mode 100644 vendor/github.com/influxdata/influxdb/services/httpd/config_test.go create mode 100644 vendor/github.com/influxdata/influxdb/services/httpd/handler.go create mode 100644 vendor/github.com/influxdata/influxdb/services/httpd/handler_test.go create mode 100644 vendor/github.com/influxdata/influxdb/services/httpd/listen.go create mode 100644 vendor/github.com/influxdata/influxdb/services/httpd/listen_test.go create mode 100644 vendor/github.com/influxdata/influxdb/services/httpd/response_logger.go create mode 100644 vendor/github.com/influxdata/influxdb/services/httpd/service.go create mode 100644 vendor/github.com/influxdata/influxdb/services/meta/client_test.go create mode 100644 vendor/github.com/influxdata/influxdb/services/meta/config_test.go create mode 100644 vendor/github.com/influxdata/influxdb/services/meta/data_test.go create mode 100644 vendor/github.com/influxdata/influxdb/services/meta/meta_test.go create mode 100644 vendor/github.com/influxdata/influxdb/services/opentsdb/config_test.go create mode 100644 vendor/github.com/influxdata/influxdb/services/opentsdb/service_test.go create mode 100644 vendor/github.com/influxdata/influxdb/services/precreator/README.md create mode 100644 vendor/github.com/influxdata/influxdb/services/precreator/config.go create mode 100644 vendor/github.com/influxdata/influxdb/services/precreator/config_test.go create mode 100644 vendor/github.com/influxdata/influxdb/services/precreator/service.go create mode 100644 vendor/github.com/influxdata/influxdb/services/precreator/service_test.go create mode 100644 vendor/github.com/influxdata/influxdb/services/retention/config.go create mode 100644 vendor/github.com/influxdata/influxdb/services/retention/config_test.go create mode 100644 vendor/github.com/influxdata/influxdb/services/retention/service.go create mode 100644 vendor/github.com/influxdata/influxdb/services/snapshotter/client.go create mode 100644 vendor/github.com/influxdata/influxdb/services/snapshotter/service.go create mode 100644 vendor/github.com/influxdata/influxdb/services/snapshotter/service_test.go create mode 100644 vendor/github.com/influxdata/influxdb/services/subscriber/config.go create mode 100644 vendor/github.com/influxdata/influxdb/services/subscriber/config_test.go create mode 100644 vendor/github.com/influxdata/influxdb/services/subscriber/http.go create mode 100644 vendor/github.com/influxdata/influxdb/services/subscriber/service.go create mode 100644 vendor/github.com/influxdata/influxdb/services/subscriber/service_test.go create mode 100644 vendor/github.com/influxdata/influxdb/services/subscriber/udp.go create mode 100644 vendor/github.com/influxdata/influxdb/services/udp/config_test.go create mode 100644 vendor/github.com/influxdata/influxdb/stress/DESIGN.md create mode 100644 vendor/github.com/influxdata/influxdb/stress/README.md create mode 100644 vendor/github.com/influxdata/influxdb/stress/basic.go create mode 100644 vendor/github.com/influxdata/influxdb/stress/config.go create mode 100644 vendor/github.com/influxdata/influxdb/stress/run.go create mode 100644 vendor/github.com/influxdata/influxdb/stress/stress.toml create mode 100644 vendor/github.com/influxdata/influxdb/stress/stress_test.go create mode 100644 vendor/github.com/influxdata/influxdb/stress/stress_test_server/server.go create mode 100644 vendor/github.com/influxdata/influxdb/stress/template.go create mode 100644 vendor/github.com/influxdata/influxdb/stress/util.go create mode 100644 vendor/github.com/influxdata/influxdb/stress/v2/.gitignore create mode 100644 vendor/github.com/influxdata/influxdb/stress/v2/DESIGN.md create mode 100644 vendor/github.com/influxdata/influxdb/stress/v2/README.md create mode 100644 vendor/github.com/influxdata/influxdb/stress/v2/file.iql create mode 100644 vendor/github.com/influxdata/influxdb/stress/v2/influx_stress_v2.png create mode 100644 vendor/github.com/influxdata/influxdb/stress/v2/main.go create mode 100644 vendor/github.com/influxdata/influxdb/stress/v2/ponyExpress/commune.go create mode 100644 vendor/github.com/influxdata/influxdb/stress/v2/ponyExpress/commune_test.go create mode 100644 vendor/github.com/influxdata/influxdb/stress/v2/ponyExpress/directive.go create mode 100644 vendor/github.com/influxdata/influxdb/stress/v2/ponyExpress/directive_test.go create mode 100644 vendor/github.com/influxdata/influxdb/stress/v2/ponyExpress/package.go create mode 100644 vendor/github.com/influxdata/influxdb/stress/v2/ponyExpress/package_test.go create mode 100644 vendor/github.com/influxdata/influxdb/stress/v2/ponyExpress/ponyExpress.go create mode 100644 vendor/github.com/influxdata/influxdb/stress/v2/ponyExpress/ponyExpress_query.go create mode 100644 vendor/github.com/influxdata/influxdb/stress/v2/ponyExpress/ponyExpress_write.go create mode 100644 vendor/github.com/influxdata/influxdb/stress/v2/ponyExpress/reporting.go create mode 100644 vendor/github.com/influxdata/influxdb/stress/v2/ponyExpress/reporting_test.go create mode 100644 vendor/github.com/influxdata/influxdb/stress/v2/ponyExpress/response.go create mode 100644 vendor/github.com/influxdata/influxdb/stress/v2/ponyExpress/response_test.go create mode 100644 vendor/github.com/influxdata/influxdb/stress/v2/ponyExpress/storeFront.go create mode 100644 vendor/github.com/influxdata/influxdb/stress/v2/ponyExpress/storeFront_test.go create mode 100644 vendor/github.com/influxdata/influxdb/stress/v2/ponyExpress/tracer.go create mode 100644 vendor/github.com/influxdata/influxdb/stress/v2/ponyExpress/tracer_test.go create mode 100644 vendor/github.com/influxdata/influxdb/stress/v2/ponyExpress/util.go create mode 100644 vendor/github.com/influxdata/influxdb/stress/v2/statement/exec.go create mode 100644 vendor/github.com/influxdata/influxdb/stress/v2/statement/exec_test.go create mode 100644 vendor/github.com/influxdata/influxdb/stress/v2/statement/function.go create mode 100644 vendor/github.com/influxdata/influxdb/stress/v2/statement/function_test.go create mode 100644 vendor/github.com/influxdata/influxdb/stress/v2/statement/go.go create mode 100644 vendor/github.com/influxdata/influxdb/stress/v2/statement/go_test.go create mode 100644 vendor/github.com/influxdata/influxdb/stress/v2/statement/influxql.go create mode 100644 vendor/github.com/influxdata/influxdb/stress/v2/statement/influxql_test.go create mode 100644 vendor/github.com/influxdata/influxdb/stress/v2/statement/insert.go create mode 100644 vendor/github.com/influxdata/influxdb/stress/v2/statement/insert_test.go create mode 100644 vendor/github.com/influxdata/influxdb/stress/v2/statement/query.go create mode 100644 vendor/github.com/influxdata/influxdb/stress/v2/statement/query_test.go create mode 100644 vendor/github.com/influxdata/influxdb/stress/v2/statement/report.go create mode 100644 vendor/github.com/influxdata/influxdb/stress/v2/statement/report_test.go create mode 100644 vendor/github.com/influxdata/influxdb/stress/v2/statement/response_time.go create mode 100644 vendor/github.com/influxdata/influxdb/stress/v2/statement/response_time_test.go create mode 100644 vendor/github.com/influxdata/influxdb/stress/v2/statement/set.go create mode 100644 vendor/github.com/influxdata/influxdb/stress/v2/statement/set_test.go create mode 100644 vendor/github.com/influxdata/influxdb/stress/v2/statement/statement.go create mode 100644 vendor/github.com/influxdata/influxdb/stress/v2/statement/template.go create mode 100644 vendor/github.com/influxdata/influxdb/stress/v2/statement/template_test.go create mode 100644 vendor/github.com/influxdata/influxdb/stress/v2/statement/timestamp.go create mode 100644 vendor/github.com/influxdata/influxdb/stress/v2/statement/timestamp_test.go create mode 100644 vendor/github.com/influxdata/influxdb/stress/v2/statement/wait.go create mode 100644 vendor/github.com/influxdata/influxdb/stress/v2/statement/wait_test.go create mode 100644 vendor/github.com/influxdata/influxdb/stress/v2/stressql/parser.go create mode 100644 vendor/github.com/influxdata/influxdb/stress/v2/stressql/parser_test.go create mode 100644 vendor/github.com/influxdata/influxdb/stress/v2/stressql/statement/parser.go create mode 100644 vendor/github.com/influxdata/influxdb/stress/v2/stressql/statement/parser_test.go create mode 100644 vendor/github.com/influxdata/influxdb/tcp/mux.go create mode 100644 vendor/github.com/influxdata/influxdb/tcp/mux_test.go create mode 100644 vendor/github.com/influxdata/influxdb/tests/README.md create mode 100755 vendor/github.com/influxdata/influxdb/tests/create_future_writes.sh create mode 100755 vendor/github.com/influxdata/influxdb/tests/create_write_multiple_query.sh create mode 100755 vendor/github.com/influxdata/influxdb/tests/create_write_single_query.sh create mode 100755 vendor/github.com/influxdata/influxdb/tests/create_write_single_with_multiple_measurements_values_tags.sh create mode 100755 vendor/github.com/influxdata/influxdb/tests/create_write_single_with_multiple_tags_query.sh create mode 100755 vendor/github.com/influxdata/influxdb/tests/distinct-data-scenarios.sh create mode 100755 vendor/github.com/influxdata/influxdb/tests/read_write_gzip.sh create mode 100644 vendor/github.com/influxdata/influxdb/tests/siege/.gitignore create mode 100644 vendor/github.com/influxdata/influxdb/tests/siege/README.md create mode 100755 vendor/github.com/influxdata/influxdb/tests/siege/urlgen create mode 100755 vendor/github.com/influxdata/influxdb/tests/tmux/3_shards create mode 100644 vendor/github.com/influxdata/influxdb/tests/tmux/README.md create mode 100644 vendor/github.com/influxdata/influxdb/tests/tmux/sample.json create mode 100755 vendor/github.com/influxdata/influxdb/tests/tmux/seed.sh create mode 100644 vendor/github.com/influxdata/influxdb/tests/tmux/server_8086.toml create mode 100644 vendor/github.com/influxdata/influxdb/tests/tmux/server_8087.toml create mode 100644 vendor/github.com/influxdata/influxdb/tests/tmux/server_8088.toml create mode 100644 vendor/github.com/influxdata/influxdb/tests/urlgen/urlgen.go create mode 100644 vendor/github.com/influxdata/influxdb/toml/toml_test.go create mode 100644 vendor/github.com/influxdata/influxdb/tsdb/batcher_test.go create mode 100644 vendor/github.com/influxdata/influxdb/tsdb/config_test.go create mode 100644 vendor/github.com/influxdata/influxdb/tsdb/cursor_test.go create mode 100644 vendor/github.com/influxdata/influxdb/tsdb/engine/engine.go create mode 100644 vendor/github.com/influxdata/influxdb/tsdb/engine/tsm1/DESIGN.md create mode 100644 vendor/github.com/influxdata/influxdb/tsdb/engine/tsm1/bit_reader.go create mode 100644 vendor/github.com/influxdata/influxdb/tsdb/engine/tsm1/bit_reader_test.go create mode 100644 vendor/github.com/influxdata/influxdb/tsdb/engine/tsm1/bool.go create mode 100644 vendor/github.com/influxdata/influxdb/tsdb/engine/tsm1/bool_test.go create mode 100644 vendor/github.com/influxdata/influxdb/tsdb/engine/tsm1/cache.go create mode 100644 vendor/github.com/influxdata/influxdb/tsdb/engine/tsm1/cache_race_test.go create mode 100644 vendor/github.com/influxdata/influxdb/tsdb/engine/tsm1/cache_test.go create mode 100644 vendor/github.com/influxdata/influxdb/tsdb/engine/tsm1/compact.go create mode 100644 vendor/github.com/influxdata/influxdb/tsdb/engine/tsm1/compact_test.go create mode 100644 vendor/github.com/influxdata/influxdb/tsdb/engine/tsm1/cursor.go create mode 100644 vendor/github.com/influxdata/influxdb/tsdb/engine/tsm1/encoding.gen.go create mode 100644 vendor/github.com/influxdata/influxdb/tsdb/engine/tsm1/encoding.gen.go.tmpl create mode 100644 vendor/github.com/influxdata/influxdb/tsdb/engine/tsm1/encoding.gen.go.tmpldata create mode 100644 vendor/github.com/influxdata/influxdb/tsdb/engine/tsm1/encoding.go create mode 100644 vendor/github.com/influxdata/influxdb/tsdb/engine/tsm1/encoding_test.go create mode 100644 vendor/github.com/influxdata/influxdb/tsdb/engine/tsm1/engine.go create mode 100644 vendor/github.com/influxdata/influxdb/tsdb/engine/tsm1/engine_test.go create mode 100644 vendor/github.com/influxdata/influxdb/tsdb/engine/tsm1/file_store.gen.go create mode 100644 vendor/github.com/influxdata/influxdb/tsdb/engine/tsm1/file_store.gen.go.tmpl create mode 100644 vendor/github.com/influxdata/influxdb/tsdb/engine/tsm1/file_store.gen.go.tmpldata create mode 100644 vendor/github.com/influxdata/influxdb/tsdb/engine/tsm1/file_store.go create mode 100644 vendor/github.com/influxdata/influxdb/tsdb/engine/tsm1/file_store_test.go create mode 100644 vendor/github.com/influxdata/influxdb/tsdb/engine/tsm1/file_unix.go create mode 100644 vendor/github.com/influxdata/influxdb/tsdb/engine/tsm1/file_windows.go create mode 100644 vendor/github.com/influxdata/influxdb/tsdb/engine/tsm1/float.go create mode 100644 vendor/github.com/influxdata/influxdb/tsdb/engine/tsm1/float_test.go create mode 100644 vendor/github.com/influxdata/influxdb/tsdb/engine/tsm1/int.go create mode 100644 vendor/github.com/influxdata/influxdb/tsdb/engine/tsm1/int_test.go create mode 100644 vendor/github.com/influxdata/influxdb/tsdb/engine/tsm1/iterator.gen.go create mode 100644 vendor/github.com/influxdata/influxdb/tsdb/engine/tsm1/iterator.gen.go.tmpl create mode 100644 vendor/github.com/influxdata/influxdb/tsdb/engine/tsm1/iterator.gen.go.tmpldata create mode 100644 vendor/github.com/influxdata/influxdb/tsdb/engine/tsm1/iterator.go create mode 100644 vendor/github.com/influxdata/influxdb/tsdb/engine/tsm1/mmap_solaris.go create mode 100644 vendor/github.com/influxdata/influxdb/tsdb/engine/tsm1/mmap_unix.go create mode 100644 vendor/github.com/influxdata/influxdb/tsdb/engine/tsm1/mmap_windows.go create mode 100644 vendor/github.com/influxdata/influxdb/tsdb/engine/tsm1/pools.go create mode 100644 vendor/github.com/influxdata/influxdb/tsdb/engine/tsm1/reader.go create mode 100644 vendor/github.com/influxdata/influxdb/tsdb/engine/tsm1/reader_test.go create mode 100644 vendor/github.com/influxdata/influxdb/tsdb/engine/tsm1/string.go create mode 100644 vendor/github.com/influxdata/influxdb/tsdb/engine/tsm1/string_test.go create mode 100644 vendor/github.com/influxdata/influxdb/tsdb/engine/tsm1/timestamp.go create mode 100644 vendor/github.com/influxdata/influxdb/tsdb/engine/tsm1/timestamp_test.go create mode 100644 vendor/github.com/influxdata/influxdb/tsdb/engine/tsm1/tombstone.go create mode 100644 vendor/github.com/influxdata/influxdb/tsdb/engine/tsm1/tombstone_test.go create mode 100644 vendor/github.com/influxdata/influxdb/tsdb/engine/tsm1/wal.go create mode 100644 vendor/github.com/influxdata/influxdb/tsdb/engine/tsm1/wal_test.go create mode 100644 vendor/github.com/influxdata/influxdb/tsdb/engine/tsm1/writer.go create mode 100644 vendor/github.com/influxdata/influxdb/tsdb/engine/tsm1/writer_test.go create mode 100644 vendor/github.com/influxdata/influxdb/tsdb/meta_test.go create mode 100644 vendor/github.com/influxdata/influxdb/tsdb/shard_test.go create mode 100644 vendor/github.com/influxdata/influxdb/tsdb/store_test.go create mode 100644 vendor/github.com/influxdata/usage-client/.gitignore create mode 100644 vendor/github.com/influxdata/usage-client/.gitrepo rename vendor/github.com/{influxdb => influxdata}/usage-client/LICENSE.txt (100%) rename vendor/github.com/{influxdb => influxdata}/usage-client/README.md (100%) rename vendor/github.com/{influxdb => influxdata}/usage-client/circle.yml (100%) rename vendor/github.com/{influxdb => influxdata}/usage-client/v1/client.go (100%) create mode 100644 vendor/github.com/influxdata/usage-client/v1/client_test.go rename vendor/github.com/{influxdb => influxdata}/usage-client/v1/errors.go (100%) rename vendor/github.com/{influxdb => influxdata}/usage-client/v1/registration.go (100%) create mode 100644 vendor/github.com/influxdata/usage-client/v1/registration_test.go rename vendor/github.com/{influxdb => influxdata}/usage-client/v1/server.go (100%) create mode 100644 vendor/github.com/influxdata/usage-client/v1/server_test.go rename vendor/github.com/{influxdb => influxdata}/usage-client/v1/stats.go (100%) create mode 100644 vendor/github.com/influxdata/usage-client/v1/stats_test.go rename vendor/github.com/{influxdb => influxdata}/usage-client/v1/tags.go (100%) rename vendor/github.com/{influxdb => influxdata}/usage-client/v1/usage.go (100%) create mode 100644 vendor/github.com/influxdata/usage-client/v1/usage_test.go rename vendor/github.com/{influxdb => influxdata}/usage-client/v1/values.go (100%) create mode 100644 vendor/github.com/influxdata/wlog/.gitrepo create mode 100644 vendor/github.com/kimor79/gollectd/.gitignore create mode 100644 vendor/github.com/kimor79/gollectd/.gitrepo create mode 100644 vendor/github.com/kimor79/gollectd/examples/parse_typesdb/parse_typesdb.go create mode 100644 vendor/github.com/kimor79/gollectd/examples/server.go create mode 100644 vendor/github.com/kimor79/gollectd/gollectd_test.go create mode 100644 vendor/github.com/mattn/go-runewidth/.gitrepo create mode 100644 vendor/github.com/mattn/go-runewidth/.travis.yml create mode 100644 vendor/github.com/mattn/go-runewidth/runewidth_test.go create mode 100644 vendor/github.com/pkg/errors/.gitignore create mode 100644 vendor/github.com/pkg/errors/.gitrepo create mode 100644 vendor/github.com/pkg/errors/.travis.yml create mode 100644 vendor/github.com/pkg/errors/appveyor.yml create mode 100644 vendor/github.com/pkg/errors/errors_test.go create mode 100644 vendor/github.com/pkg/errors/example_test.go create mode 100644 vendor/github.com/pkg/errors/format_test.go create mode 100644 vendor/github.com/pkg/errors/stack.go create mode 100644 vendor/github.com/pkg/errors/stack_test.go delete mode 100644 vendor/github.com/pmezard/go-difflib/README.md create mode 100644 vendor/github.com/russross/blackfriday/.gitignore create mode 100644 vendor/github.com/russross/blackfriday/.gitrepo create mode 100644 vendor/github.com/russross/blackfriday/.travis.yml create mode 100644 vendor/github.com/russross/blackfriday/block_test.go create mode 100644 vendor/github.com/russross/blackfriday/inline_test.go create mode 100644 vendor/github.com/russross/blackfriday/ref_test.go create mode 100644 vendor/github.com/russross/blackfriday/testdata/Amps and angle encoding.html create mode 100644 vendor/github.com/russross/blackfriday/testdata/Amps and angle encoding.text create mode 100644 vendor/github.com/russross/blackfriday/testdata/Auto links.html create mode 100644 vendor/github.com/russross/blackfriday/testdata/Auto links.text create mode 100644 vendor/github.com/russross/blackfriday/testdata/Backslash escapes.html create mode 100644 vendor/github.com/russross/blackfriday/testdata/Backslash escapes.text create mode 100644 vendor/github.com/russross/blackfriday/testdata/Blockquotes with code blocks.html create mode 100644 vendor/github.com/russross/blackfriday/testdata/Blockquotes with code blocks.text create mode 100644 vendor/github.com/russross/blackfriday/testdata/Code Blocks.html create mode 100644 vendor/github.com/russross/blackfriday/testdata/Code Blocks.text create mode 100644 vendor/github.com/russross/blackfriday/testdata/Code Spans.html create mode 100644 vendor/github.com/russross/blackfriday/testdata/Code Spans.text create mode 100644 vendor/github.com/russross/blackfriday/testdata/Hard-wrapped paragraphs with list-like lines no empty line before block.html create mode 100644 vendor/github.com/russross/blackfriday/testdata/Hard-wrapped paragraphs with list-like lines no empty line before block.text create mode 100644 vendor/github.com/russross/blackfriday/testdata/Hard-wrapped paragraphs with list-like lines.html create mode 100644 vendor/github.com/russross/blackfriday/testdata/Hard-wrapped paragraphs with list-like lines.text create mode 100644 vendor/github.com/russross/blackfriday/testdata/Horizontal rules.html create mode 100644 vendor/github.com/russross/blackfriday/testdata/Horizontal rules.text create mode 100644 vendor/github.com/russross/blackfriday/testdata/Inline HTML (Advanced).html create mode 100644 vendor/github.com/russross/blackfriday/testdata/Inline HTML (Advanced).text create mode 100644 vendor/github.com/russross/blackfriday/testdata/Inline HTML (Simple).html create mode 100644 vendor/github.com/russross/blackfriday/testdata/Inline HTML (Simple).text create mode 100644 vendor/github.com/russross/blackfriday/testdata/Inline HTML comments.html create mode 100644 vendor/github.com/russross/blackfriday/testdata/Inline HTML comments.text create mode 100644 vendor/github.com/russross/blackfriday/testdata/Links, inline style.html create mode 100644 vendor/github.com/russross/blackfriday/testdata/Links, inline style.text create mode 100644 vendor/github.com/russross/blackfriday/testdata/Links, reference style.html create mode 100644 vendor/github.com/russross/blackfriday/testdata/Links, reference style.text create mode 100644 vendor/github.com/russross/blackfriday/testdata/Links, shortcut references.html create mode 100644 vendor/github.com/russross/blackfriday/testdata/Links, shortcut references.text create mode 100644 vendor/github.com/russross/blackfriday/testdata/Literal quotes in titles.html create mode 100644 vendor/github.com/russross/blackfriday/testdata/Literal quotes in titles.text create mode 100644 vendor/github.com/russross/blackfriday/testdata/Markdown Documentation - Basics.html create mode 100644 vendor/github.com/russross/blackfriday/testdata/Markdown Documentation - Basics.text create mode 100644 vendor/github.com/russross/blackfriday/testdata/Markdown Documentation - Syntax.html create mode 100644 vendor/github.com/russross/blackfriday/testdata/Markdown Documentation - Syntax.text create mode 100644 vendor/github.com/russross/blackfriday/testdata/Nested blockquotes.html create mode 100644 vendor/github.com/russross/blackfriday/testdata/Nested blockquotes.text create mode 100644 vendor/github.com/russross/blackfriday/testdata/Ordered and unordered lists.html create mode 100644 vendor/github.com/russross/blackfriday/testdata/Ordered and unordered lists.text create mode 100644 vendor/github.com/russross/blackfriday/testdata/Strong and em together.html create mode 100644 vendor/github.com/russross/blackfriday/testdata/Strong and em together.text create mode 100644 vendor/github.com/russross/blackfriday/testdata/Tabs.html create mode 100644 vendor/github.com/russross/blackfriday/testdata/Tabs.text create mode 100644 vendor/github.com/russross/blackfriday/testdata/Tidyness.html create mode 100644 vendor/github.com/russross/blackfriday/testdata/Tidyness.text create mode 100644 vendor/github.com/serenize/snaker/.gitrepo create mode 100644 vendor/github.com/serenize/snaker/.travis.yml create mode 100644 vendor/github.com/serenize/snaker/snaker_suite_test.go create mode 100644 vendor/github.com/serenize/snaker/snaker_test.go create mode 100644 vendor/github.com/shurcooL/go/.gitrepo create mode 100644 vendor/github.com/shurcooL/go/.travis.yml create mode 100644 vendor/github.com/shurcooL/go/analysis/generated_detection.go create mode 100644 vendor/github.com/shurcooL/go/analysis/generated_detection_test.go create mode 100644 vendor/github.com/shurcooL/go/analysis/testdata/generated_0.go.txt create mode 100644 vendor/github.com/shurcooL/go/analysis/testdata/handcrafted_0.go.txt create mode 100644 vendor/github.com/shurcooL/go/analysis/testdata/handcrafted_1.go.txt create mode 100644 vendor/github.com/shurcooL/go/gddo/gddo.go create mode 100644 vendor/github.com/shurcooL/go/gfmutil/gfmutil.go create mode 100644 vendor/github.com/shurcooL/go/gopathutil/doc.go create mode 100644 vendor/github.com/shurcooL/go/gopathutil/gopathutil.go create mode 100644 vendor/github.com/shurcooL/go/gopathutil/stub.go create mode 100644 vendor/github.com/shurcooL/go/gopherjs_http/gopherjs_http.go create mode 100644 vendor/github.com/shurcooL/go/gopherjs_http/jsutil/jsutil.go create mode 100644 vendor/github.com/shurcooL/go/gopherjs_http/package.go create mode 100644 vendor/github.com/shurcooL/go/gopherjs_http/vfs.go create mode 100644 vendor/github.com/shurcooL/go/gzip_file_server/gzip_file_server.go create mode 100644 vendor/github.com/shurcooL/go/httpstoppable/httpstoppable.go create mode 100644 vendor/github.com/shurcooL/go/importgraphutil/importgraphutil.go create mode 100644 vendor/github.com/shurcooL/go/indentwriter/indentwriter_test.go create mode 100644 vendor/github.com/shurcooL/go/ioutil/ioutil.go create mode 100644 vendor/github.com/shurcooL/go/open/open.go create mode 100644 vendor/github.com/shurcooL/go/openutil/openutil.go create mode 100644 vendor/github.com/shurcooL/go/ospath/ospath.go create mode 100644 vendor/github.com/shurcooL/go/osutil/environ.go create mode 100644 vendor/github.com/shurcooL/go/parserutil/parserutil.go create mode 100644 vendor/github.com/shurcooL/go/parserutil/parserutil_test.go create mode 100644 vendor/github.com/shurcooL/go/pipeutil/dir.go create mode 100644 vendor/github.com/shurcooL/go/pipeutil/pipeutil.go create mode 100644 vendor/github.com/shurcooL/go/printerutil/printerutil.go create mode 100644 vendor/github.com/shurcooL/go/reflectfind/reflectfind.go create mode 100644 vendor/github.com/shurcooL/go/reflectsource/callername.go create mode 100644 vendor/github.com/shurcooL/go/reflectsource/callername_test.go create mode 100644 vendor/github.com/shurcooL/go/reflectsource/doc.go create mode 100644 vendor/github.com/shurcooL/go/reflectsource/funcsource.go create mode 100644 vendor/github.com/shurcooL/go/reflectsource/funcsource_test.go create mode 100644 vendor/github.com/shurcooL/go/reflectsource/indicies.go create mode 100644 vendor/github.com/shurcooL/go/reflectsource/indicies_test.go create mode 100644 vendor/github.com/shurcooL/go/timeutil/timeutil.go create mode 100644 vendor/github.com/shurcooL/go/trash/doc.go create mode 100644 vendor/github.com/shurcooL/go/trash/trash.go create mode 100644 vendor/github.com/shurcooL/go/trash/trash_darwin.go create mode 100644 vendor/github.com/shurcooL/go/trim/trim.go create mode 100644 vendor/github.com/shurcooL/go/trim/trim_test.go create mode 100644 vendor/github.com/shurcooL/go/vfs/godocfs/godocfs/godocfs.go create mode 100644 vendor/github.com/shurcooL/go/vfs/godocfs/html/vfstemplate/vfstemplate.go create mode 100644 vendor/github.com/shurcooL/go/vfs/godocfs/path/vfspath/match.go create mode 100644 vendor/github.com/shurcooL/go/vfs/godocfs/vfsutil/walk.go create mode 100644 vendor/github.com/shurcooL/go/vfs/godocfs/vfsutil/walk_test.go create mode 100644 vendor/github.com/shurcooL/markdownfmt/.gitrepo create mode 100644 vendor/github.com/shurcooL/markdownfmt/.travis.yml create mode 100644 vendor/github.com/shurcooL/markdownfmt/markdown/main_test.go create mode 100644 vendor/github.com/shurcooL/markdownfmt/markdown/stringwidth_test.go create mode 100644 vendor/github.com/shurcooL/sanitized_anchor_name/.gitrepo create mode 100644 vendor/github.com/shurcooL/sanitized_anchor_name/.travis.yml create mode 100644 vendor/github.com/shurcooL/sanitized_anchor_name/main_test.go create mode 100644 vendor/github.com/stretchr/testify/.gitignore create mode 100644 vendor/github.com/stretchr/testify/.gitrepo create mode 100644 vendor/github.com/stretchr/testify/.travis.yml create mode 100644 vendor/github.com/stretchr/testify/Godeps/Godeps.json create mode 100644 vendor/github.com/stretchr/testify/Godeps/Readme create mode 100644 vendor/github.com/stretchr/testify/_codegen/main.go create mode 100644 vendor/github.com/stretchr/testify/assert/assertions_test.go create mode 100644 vendor/github.com/stretchr/testify/assert/forward_assertions_test.go create mode 100644 vendor/github.com/stretchr/testify/assert/http_assertions_test.go create mode 100644 vendor/github.com/stretchr/testify/http/doc.go create mode 100644 vendor/github.com/stretchr/testify/http/test_response_writer.go create mode 100644 vendor/github.com/stretchr/testify/http/test_round_tripper.go create mode 100644 vendor/github.com/stretchr/testify/mock/doc.go create mode 100644 vendor/github.com/stretchr/testify/mock/mock.go create mode 100644 vendor/github.com/stretchr/testify/mock/mock_test.go create mode 100644 vendor/github.com/stretchr/testify/package_test.go create mode 100644 vendor/github.com/stretchr/testify/require/doc.go create mode 100644 vendor/github.com/stretchr/testify/require/forward_requirements.go create mode 100644 vendor/github.com/stretchr/testify/require/forward_requirements_test.go create mode 100644 vendor/github.com/stretchr/testify/require/require.go create mode 100644 vendor/github.com/stretchr/testify/require/require.go.tmpl create mode 100644 vendor/github.com/stretchr/testify/require/require_forward.go create mode 100644 vendor/github.com/stretchr/testify/require/require_forward.go.tmpl create mode 100644 vendor/github.com/stretchr/testify/require/requirements.go create mode 100644 vendor/github.com/stretchr/testify/require/requirements_test.go create mode 100644 vendor/github.com/stretchr/testify/suite/doc.go create mode 100644 vendor/github.com/stretchr/testify/suite/interfaces.go create mode 100644 vendor/github.com/stretchr/testify/suite/suite.go create mode 100644 vendor/github.com/stretchr/testify/suite/suite_test.go rename vendor/github.com/{ => stretchr/testify/vendor/github.com}/davecgh/go-spew/LICENSE (100%) rename vendor/github.com/{ => stretchr/testify/vendor/github.com}/davecgh/go-spew/spew/bypass.go (100%) rename vendor/github.com/{ => stretchr/testify/vendor/github.com}/davecgh/go-spew/spew/bypasssafe.go (100%) rename vendor/github.com/{ => stretchr/testify/vendor/github.com}/davecgh/go-spew/spew/common.go (100%) rename vendor/github.com/{ => stretchr/testify/vendor/github.com}/davecgh/go-spew/spew/config.go (100%) rename vendor/github.com/{ => stretchr/testify/vendor/github.com}/davecgh/go-spew/spew/doc.go (100%) rename vendor/github.com/{ => stretchr/testify/vendor/github.com}/davecgh/go-spew/spew/dump.go (100%) rename vendor/github.com/{ => stretchr/testify/vendor/github.com}/davecgh/go-spew/spew/format.go (100%) rename vendor/github.com/{ => stretchr/testify/vendor/github.com}/davecgh/go-spew/spew/spew.go (100%) rename vendor/github.com/{ => stretchr/testify/vendor/github.com}/pmezard/go-difflib/LICENSE (100%) rename vendor/github.com/{ => stretchr/testify/vendor/github.com}/pmezard/go-difflib/difflib/difflib.go (95%) create mode 100644 vendor/github.com/stretchr/testify/vendor/github.com/stretchr/objx/.gitignore create mode 100644 vendor/github.com/stretchr/testify/vendor/github.com/stretchr/objx/LICENSE.md create mode 100644 vendor/github.com/stretchr/testify/vendor/github.com/stretchr/objx/README.md create mode 100644 vendor/github.com/stretchr/testify/vendor/github.com/stretchr/objx/accessors.go create mode 100644 vendor/github.com/stretchr/testify/vendor/github.com/stretchr/objx/codegen/array-access.txt create mode 100644 vendor/github.com/stretchr/testify/vendor/github.com/stretchr/objx/codegen/index.html create mode 100644 vendor/github.com/stretchr/testify/vendor/github.com/stretchr/objx/codegen/template.txt create mode 100644 vendor/github.com/stretchr/testify/vendor/github.com/stretchr/objx/codegen/types_list.txt create mode 100644 vendor/github.com/stretchr/testify/vendor/github.com/stretchr/objx/constants.go create mode 100644 vendor/github.com/stretchr/testify/vendor/github.com/stretchr/objx/conversions.go create mode 100644 vendor/github.com/stretchr/testify/vendor/github.com/stretchr/objx/doc.go create mode 100644 vendor/github.com/stretchr/testify/vendor/github.com/stretchr/objx/map.go create mode 100644 vendor/github.com/stretchr/testify/vendor/github.com/stretchr/objx/mutations.go create mode 100644 vendor/github.com/stretchr/testify/vendor/github.com/stretchr/objx/security.go create mode 100644 vendor/github.com/stretchr/testify/vendor/github.com/stretchr/objx/tests.go create mode 100644 vendor/github.com/stretchr/testify/vendor/github.com/stretchr/objx/type_specific_codegen.go create mode 100644 vendor/github.com/stretchr/testify/vendor/github.com/stretchr/objx/value.go create mode 100644 vendor/github.com/twinj/uuid/.gitignore create mode 100644 vendor/github.com/twinj/uuid/.gitrepo create mode 100644 vendor/github.com/twinj/uuid/.travis.yml create mode 100644 vendor/github.com/twinj/uuid/array_test.go create mode 100644 vendor/github.com/twinj/uuid/benchmarks_test.go rename vendor/github.com/twinj/uuid/{state.go => generator.go} (62%) create mode 100644 vendor/github.com/twinj/uuid/generator_test.go create mode 100644 vendor/github.com/twinj/uuid/glide.lock create mode 100644 vendor/github.com/twinj/uuid/glide.yaml create mode 100644 vendor/github.com/twinj/uuid/integration_test.go create mode 100644 vendor/github.com/twinj/uuid/rfc4122_test.go create mode 100644 vendor/github.com/twinj/uuid/savers/filesystem.go create mode 100644 vendor/github.com/twinj/uuid/savers/filesystem_test.go create mode 100644 vendor/github.com/twinj/uuid/savers/savers.go create mode 100644 vendor/github.com/twinj/uuid/struct_test.go create mode 100644 vendor/github.com/twinj/uuid/timestamp_test.go create mode 100644 vendor/github.com/twinj/uuid/uuid_test.go create mode 100644 vendor/golang.org/x/crypto/.gitattributes create mode 100644 vendor/golang.org/x/crypto/.gitignore create mode 100644 vendor/golang.org/x/crypto/.gitrepo create mode 100644 vendor/golang.org/x/crypto/acme/internal/acme/acme.go create mode 100644 vendor/golang.org/x/crypto/acme/internal/acme/acme_test.go create mode 100644 vendor/golang.org/x/crypto/acme/internal/acme/jws.go create mode 100644 vendor/golang.org/x/crypto/acme/internal/acme/jws_test.go create mode 100644 vendor/golang.org/x/crypto/acme/internal/acme/types.go create mode 100644 vendor/golang.org/x/crypto/bcrypt/bcrypt_test.go create mode 100644 vendor/golang.org/x/crypto/blowfish/blowfish_test.go create mode 100644 vendor/golang.org/x/crypto/bn256/bn256.go create mode 100644 vendor/golang.org/x/crypto/bn256/bn256_test.go create mode 100644 vendor/golang.org/x/crypto/bn256/constants.go create mode 100644 vendor/golang.org/x/crypto/bn256/curve.go create mode 100644 vendor/golang.org/x/crypto/bn256/example_test.go create mode 100644 vendor/golang.org/x/crypto/bn256/gfp12.go create mode 100644 vendor/golang.org/x/crypto/bn256/gfp2.go create mode 100644 vendor/golang.org/x/crypto/bn256/gfp6.go create mode 100644 vendor/golang.org/x/crypto/bn256/optate.go create mode 100644 vendor/golang.org/x/crypto/bn256/twist.go create mode 100644 vendor/golang.org/x/crypto/cast5/cast5.go create mode 100644 vendor/golang.org/x/crypto/cast5/cast5_test.go create mode 100644 vendor/golang.org/x/crypto/curve25519/const_amd64.s create mode 100644 vendor/golang.org/x/crypto/curve25519/cswap_amd64.s create mode 100644 vendor/golang.org/x/crypto/curve25519/curve25519.go create mode 100644 vendor/golang.org/x/crypto/curve25519/curve25519_test.go create mode 100644 vendor/golang.org/x/crypto/curve25519/doc.go create mode 100644 vendor/golang.org/x/crypto/curve25519/freeze_amd64.s create mode 100644 vendor/golang.org/x/crypto/curve25519/ladderstep_amd64.s create mode 100644 vendor/golang.org/x/crypto/curve25519/mont25519_amd64.go create mode 100644 vendor/golang.org/x/crypto/curve25519/mul_amd64.s create mode 100644 vendor/golang.org/x/crypto/curve25519/square_amd64.s create mode 100644 vendor/golang.org/x/crypto/ed25519/ed25519.go create mode 100644 vendor/golang.org/x/crypto/ed25519/ed25519_test.go create mode 100644 vendor/golang.org/x/crypto/ed25519/internal/edwards25519/const.go create mode 100644 vendor/golang.org/x/crypto/ed25519/internal/edwards25519/edwards25519.go create mode 100644 vendor/golang.org/x/crypto/ed25519/testdata/sign.input.gz create mode 100644 vendor/golang.org/x/crypto/hkdf/example_test.go create mode 100644 vendor/golang.org/x/crypto/hkdf/hkdf.go create mode 100644 vendor/golang.org/x/crypto/hkdf/hkdf_test.go create mode 100644 vendor/golang.org/x/crypto/md4/md4.go create mode 100644 vendor/golang.org/x/crypto/md4/md4_test.go create mode 100644 vendor/golang.org/x/crypto/md4/md4block.go create mode 100644 vendor/golang.org/x/crypto/nacl/box/box.go create mode 100644 vendor/golang.org/x/crypto/nacl/box/box_test.go create mode 100644 vendor/golang.org/x/crypto/nacl/secretbox/secretbox.go create mode 100644 vendor/golang.org/x/crypto/nacl/secretbox/secretbox_test.go create mode 100644 vendor/golang.org/x/crypto/ocsp/ocsp.go create mode 100644 vendor/golang.org/x/crypto/ocsp/ocsp_test.go create mode 100644 vendor/golang.org/x/crypto/openpgp/armor/armor.go create mode 100644 vendor/golang.org/x/crypto/openpgp/armor/armor_test.go create mode 100644 vendor/golang.org/x/crypto/openpgp/armor/encode.go create mode 100644 vendor/golang.org/x/crypto/openpgp/canonical_text.go create mode 100644 vendor/golang.org/x/crypto/openpgp/canonical_text_test.go create mode 100644 vendor/golang.org/x/crypto/openpgp/clearsign/clearsign.go create mode 100644 vendor/golang.org/x/crypto/openpgp/clearsign/clearsign_test.go create mode 100644 vendor/golang.org/x/crypto/openpgp/elgamal/elgamal.go create mode 100644 vendor/golang.org/x/crypto/openpgp/elgamal/elgamal_test.go create mode 100644 vendor/golang.org/x/crypto/openpgp/errors/errors.go create mode 100644 vendor/golang.org/x/crypto/openpgp/keys.go create mode 100644 vendor/golang.org/x/crypto/openpgp/keys_test.go create mode 100644 vendor/golang.org/x/crypto/openpgp/packet/compressed.go create mode 100644 vendor/golang.org/x/crypto/openpgp/packet/compressed_test.go create mode 100644 vendor/golang.org/x/crypto/openpgp/packet/config.go create mode 100644 vendor/golang.org/x/crypto/openpgp/packet/encrypted_key.go create mode 100644 vendor/golang.org/x/crypto/openpgp/packet/encrypted_key_test.go create mode 100644 vendor/golang.org/x/crypto/openpgp/packet/literal.go create mode 100644 vendor/golang.org/x/crypto/openpgp/packet/ocfb.go create mode 100644 vendor/golang.org/x/crypto/openpgp/packet/ocfb_test.go create mode 100644 vendor/golang.org/x/crypto/openpgp/packet/one_pass_signature.go create mode 100644 vendor/golang.org/x/crypto/openpgp/packet/opaque.go create mode 100644 vendor/golang.org/x/crypto/openpgp/packet/opaque_test.go create mode 100644 vendor/golang.org/x/crypto/openpgp/packet/packet.go create mode 100644 vendor/golang.org/x/crypto/openpgp/packet/packet_test.go create mode 100644 vendor/golang.org/x/crypto/openpgp/packet/private_key.go create mode 100644 vendor/golang.org/x/crypto/openpgp/packet/private_key_test.go create mode 100644 vendor/golang.org/x/crypto/openpgp/packet/public_key.go create mode 100644 vendor/golang.org/x/crypto/openpgp/packet/public_key_test.go create mode 100644 vendor/golang.org/x/crypto/openpgp/packet/public_key_v3.go create mode 100644 vendor/golang.org/x/crypto/openpgp/packet/public_key_v3_test.go create mode 100644 vendor/golang.org/x/crypto/openpgp/packet/reader.go create mode 100644 vendor/golang.org/x/crypto/openpgp/packet/signature.go create mode 100644 vendor/golang.org/x/crypto/openpgp/packet/signature_test.go create mode 100644 vendor/golang.org/x/crypto/openpgp/packet/signature_v3.go create mode 100644 vendor/golang.org/x/crypto/openpgp/packet/signature_v3_test.go create mode 100644 vendor/golang.org/x/crypto/openpgp/packet/symmetric_key_encrypted.go create mode 100644 vendor/golang.org/x/crypto/openpgp/packet/symmetric_key_encrypted_test.go create mode 100644 vendor/golang.org/x/crypto/openpgp/packet/symmetrically_encrypted.go create mode 100644 vendor/golang.org/x/crypto/openpgp/packet/symmetrically_encrypted_test.go create mode 100644 vendor/golang.org/x/crypto/openpgp/packet/userattribute.go create mode 100644 vendor/golang.org/x/crypto/openpgp/packet/userattribute_test.go create mode 100644 vendor/golang.org/x/crypto/openpgp/packet/userid.go create mode 100644 vendor/golang.org/x/crypto/openpgp/packet/userid_test.go create mode 100644 vendor/golang.org/x/crypto/openpgp/read.go create mode 100644 vendor/golang.org/x/crypto/openpgp/read_test.go create mode 100644 vendor/golang.org/x/crypto/openpgp/s2k/s2k.go create mode 100644 vendor/golang.org/x/crypto/openpgp/s2k/s2k_test.go create mode 100644 vendor/golang.org/x/crypto/openpgp/write.go create mode 100644 vendor/golang.org/x/crypto/openpgp/write_test.go create mode 100644 vendor/golang.org/x/crypto/otr/libotr_test_helper.c create mode 100644 vendor/golang.org/x/crypto/otr/otr.go create mode 100644 vendor/golang.org/x/crypto/otr/otr_test.go create mode 100644 vendor/golang.org/x/crypto/otr/smp.go create mode 100644 vendor/golang.org/x/crypto/pbkdf2/pbkdf2.go create mode 100644 vendor/golang.org/x/crypto/pbkdf2/pbkdf2_test.go create mode 100644 vendor/golang.org/x/crypto/pkcs12/bmp-string.go create mode 100644 vendor/golang.org/x/crypto/pkcs12/bmp-string_test.go create mode 100644 vendor/golang.org/x/crypto/pkcs12/crypto.go create mode 100644 vendor/golang.org/x/crypto/pkcs12/crypto_test.go create mode 100644 vendor/golang.org/x/crypto/pkcs12/errors.go create mode 100644 vendor/golang.org/x/crypto/pkcs12/internal/rc2/bench_test.go create mode 100644 vendor/golang.org/x/crypto/pkcs12/internal/rc2/rc2.go create mode 100644 vendor/golang.org/x/crypto/pkcs12/internal/rc2/rc2_test.go create mode 100644 vendor/golang.org/x/crypto/pkcs12/mac.go create mode 100644 vendor/golang.org/x/crypto/pkcs12/mac_test.go create mode 100644 vendor/golang.org/x/crypto/pkcs12/pbkdf.go create mode 100644 vendor/golang.org/x/crypto/pkcs12/pbkdf_test.go create mode 100644 vendor/golang.org/x/crypto/pkcs12/pkcs12.go create mode 100644 vendor/golang.org/x/crypto/pkcs12/pkcs12_test.go create mode 100644 vendor/golang.org/x/crypto/pkcs12/safebags.go create mode 100644 vendor/golang.org/x/crypto/poly1305/const_amd64.s create mode 100644 vendor/golang.org/x/crypto/poly1305/poly1305.go create mode 100644 vendor/golang.org/x/crypto/poly1305/poly1305_amd64.s create mode 100644 vendor/golang.org/x/crypto/poly1305/poly1305_arm.s create mode 100644 vendor/golang.org/x/crypto/poly1305/poly1305_test.go create mode 100644 vendor/golang.org/x/crypto/poly1305/sum_amd64.go create mode 100644 vendor/golang.org/x/crypto/poly1305/sum_arm.go create mode 100644 vendor/golang.org/x/crypto/poly1305/sum_ref.go create mode 100644 vendor/golang.org/x/crypto/ripemd160/ripemd160.go create mode 100644 vendor/golang.org/x/crypto/ripemd160/ripemd160_test.go create mode 100644 vendor/golang.org/x/crypto/ripemd160/ripemd160block.go create mode 100644 vendor/golang.org/x/crypto/salsa20/salsa/hsalsa20.go create mode 100644 vendor/golang.org/x/crypto/salsa20/salsa/salsa2020_amd64.s create mode 100644 vendor/golang.org/x/crypto/salsa20/salsa/salsa208.go create mode 100644 vendor/golang.org/x/crypto/salsa20/salsa/salsa20_amd64.go create mode 100644 vendor/golang.org/x/crypto/salsa20/salsa/salsa20_ref.go create mode 100644 vendor/golang.org/x/crypto/salsa20/salsa/salsa_test.go create mode 100644 vendor/golang.org/x/crypto/salsa20/salsa20.go create mode 100644 vendor/golang.org/x/crypto/salsa20/salsa20_test.go create mode 100644 vendor/golang.org/x/crypto/scrypt/scrypt.go create mode 100644 vendor/golang.org/x/crypto/scrypt/scrypt_test.go create mode 100644 vendor/golang.org/x/crypto/sha3/doc.go create mode 100644 vendor/golang.org/x/crypto/sha3/hashes.go create mode 100644 vendor/golang.org/x/crypto/sha3/keccakf.go create mode 100644 vendor/golang.org/x/crypto/sha3/register.go create mode 100644 vendor/golang.org/x/crypto/sha3/sha3.go create mode 100644 vendor/golang.org/x/crypto/sha3/sha3_test.go create mode 100644 vendor/golang.org/x/crypto/sha3/shake.go create mode 100644 vendor/golang.org/x/crypto/sha3/testdata/keccakKats.json.deflate create mode 100644 vendor/golang.org/x/crypto/sha3/xor.go create mode 100644 vendor/golang.org/x/crypto/sha3/xor_generic.go create mode 100644 vendor/golang.org/x/crypto/sha3/xor_unaligned.go create mode 100644 vendor/golang.org/x/crypto/ssh/agent/client.go create mode 100644 vendor/golang.org/x/crypto/ssh/agent/client_test.go create mode 100644 vendor/golang.org/x/crypto/ssh/agent/example_test.go create mode 100644 vendor/golang.org/x/crypto/ssh/agent/forward.go create mode 100644 vendor/golang.org/x/crypto/ssh/agent/keyring.go create mode 100644 vendor/golang.org/x/crypto/ssh/agent/keyring_test.go create mode 100644 vendor/golang.org/x/crypto/ssh/agent/server.go create mode 100644 vendor/golang.org/x/crypto/ssh/agent/server_test.go create mode 100644 vendor/golang.org/x/crypto/ssh/agent/testdata_test.go create mode 100644 vendor/golang.org/x/crypto/ssh/benchmark_test.go create mode 100644 vendor/golang.org/x/crypto/ssh/buffer.go create mode 100644 vendor/golang.org/x/crypto/ssh/buffer_test.go create mode 100644 vendor/golang.org/x/crypto/ssh/certs.go create mode 100644 vendor/golang.org/x/crypto/ssh/certs_test.go create mode 100644 vendor/golang.org/x/crypto/ssh/channel.go create mode 100644 vendor/golang.org/x/crypto/ssh/cipher.go create mode 100644 vendor/golang.org/x/crypto/ssh/cipher_test.go create mode 100644 vendor/golang.org/x/crypto/ssh/client.go create mode 100644 vendor/golang.org/x/crypto/ssh/client_auth.go create mode 100644 vendor/golang.org/x/crypto/ssh/client_auth_test.go create mode 100644 vendor/golang.org/x/crypto/ssh/client_test.go create mode 100644 vendor/golang.org/x/crypto/ssh/common.go create mode 100644 vendor/golang.org/x/crypto/ssh/connection.go create mode 100644 vendor/golang.org/x/crypto/ssh/doc.go create mode 100644 vendor/golang.org/x/crypto/ssh/example_test.go create mode 100644 vendor/golang.org/x/crypto/ssh/handshake.go create mode 100644 vendor/golang.org/x/crypto/ssh/handshake_test.go create mode 100644 vendor/golang.org/x/crypto/ssh/kex.go create mode 100644 vendor/golang.org/x/crypto/ssh/kex_test.go create mode 100644 vendor/golang.org/x/crypto/ssh/keys.go create mode 100644 vendor/golang.org/x/crypto/ssh/keys_test.go create mode 100644 vendor/golang.org/x/crypto/ssh/mac.go create mode 100644 vendor/golang.org/x/crypto/ssh/mempipe_test.go create mode 100644 vendor/golang.org/x/crypto/ssh/messages.go create mode 100644 vendor/golang.org/x/crypto/ssh/messages_test.go create mode 100644 vendor/golang.org/x/crypto/ssh/mux.go create mode 100644 vendor/golang.org/x/crypto/ssh/mux_test.go create mode 100644 vendor/golang.org/x/crypto/ssh/server.go create mode 100644 vendor/golang.org/x/crypto/ssh/session.go create mode 100644 vendor/golang.org/x/crypto/ssh/session_test.go create mode 100644 vendor/golang.org/x/crypto/ssh/tcpip.go create mode 100644 vendor/golang.org/x/crypto/ssh/tcpip_test.go create mode 100644 vendor/golang.org/x/crypto/ssh/terminal/terminal.go create mode 100644 vendor/golang.org/x/crypto/ssh/terminal/terminal_test.go create mode 100644 vendor/golang.org/x/crypto/ssh/terminal/util.go create mode 100644 vendor/golang.org/x/crypto/ssh/terminal/util_bsd.go create mode 100644 vendor/golang.org/x/crypto/ssh/terminal/util_linux.go create mode 100644 vendor/golang.org/x/crypto/ssh/terminal/util_plan9.go create mode 100644 vendor/golang.org/x/crypto/ssh/terminal/util_windows.go create mode 100644 vendor/golang.org/x/crypto/ssh/test/agent_unix_test.go create mode 100644 vendor/golang.org/x/crypto/ssh/test/cert_test.go create mode 100644 vendor/golang.org/x/crypto/ssh/test/doc.go create mode 100644 vendor/golang.org/x/crypto/ssh/test/forward_unix_test.go create mode 100644 vendor/golang.org/x/crypto/ssh/test/session_test.go create mode 100644 vendor/golang.org/x/crypto/ssh/test/tcpip_test.go create mode 100644 vendor/golang.org/x/crypto/ssh/test/test_unix_test.go create mode 100644 vendor/golang.org/x/crypto/ssh/test/testdata_test.go create mode 100644 vendor/golang.org/x/crypto/ssh/testdata/doc.go create mode 100644 vendor/golang.org/x/crypto/ssh/testdata/keys.go create mode 100644 vendor/golang.org/x/crypto/ssh/testdata_test.go create mode 100644 vendor/golang.org/x/crypto/ssh/transport.go create mode 100644 vendor/golang.org/x/crypto/ssh/transport_test.go create mode 100644 vendor/golang.org/x/crypto/tea/cipher.go create mode 100644 vendor/golang.org/x/crypto/tea/tea_test.go create mode 100644 vendor/golang.org/x/crypto/twofish/twofish.go create mode 100644 vendor/golang.org/x/crypto/twofish/twofish_test.go create mode 100644 vendor/golang.org/x/crypto/xtea/block.go create mode 100644 vendor/golang.org/x/crypto/xtea/cipher.go create mode 100644 vendor/golang.org/x/crypto/xtea/xtea_test.go create mode 100644 vendor/golang.org/x/crypto/xts/xts.go create mode 100644 vendor/golang.org/x/crypto/xts/xts_test.go delete mode 100644 vendor/golang.org/x/sys/AUTHORS delete mode 100644 vendor/golang.org/x/sys/CONTRIBUTING.md delete mode 100644 vendor/golang.org/x/sys/CONTRIBUTORS delete mode 100644 vendor/golang.org/x/sys/LICENSE delete mode 100644 vendor/golang.org/x/sys/PATENTS delete mode 100644 vendor/golang.org/x/sys/README delete mode 100644 vendor/golang.org/x/sys/codereview.cfg delete mode 100644 vendor/golang.org/x/sys/unix/asm.s delete mode 100644 vendor/golang.org/x/sys/unix/asm_darwin_386.s delete mode 100644 vendor/golang.org/x/sys/unix/asm_darwin_amd64.s delete mode 100644 vendor/golang.org/x/sys/unix/asm_darwin_arm.s delete mode 100644 vendor/golang.org/x/sys/unix/asm_darwin_arm64.s delete mode 100644 vendor/golang.org/x/sys/unix/asm_dragonfly_amd64.s delete mode 100644 vendor/golang.org/x/sys/unix/asm_freebsd_386.s delete mode 100644 vendor/golang.org/x/sys/unix/asm_freebsd_amd64.s delete mode 100644 vendor/golang.org/x/sys/unix/asm_freebsd_arm.s delete mode 100644 vendor/golang.org/x/sys/unix/asm_linux_386.s delete mode 100644 vendor/golang.org/x/sys/unix/asm_linux_amd64.s delete mode 100644 vendor/golang.org/x/sys/unix/asm_linux_arm.s delete mode 100644 vendor/golang.org/x/sys/unix/asm_linux_arm64.s delete mode 100644 vendor/golang.org/x/sys/unix/asm_linux_mips64x.s delete mode 100644 vendor/golang.org/x/sys/unix/asm_linux_ppc64x.s delete mode 100644 vendor/golang.org/x/sys/unix/asm_linux_s390x.s delete mode 100644 vendor/golang.org/x/sys/unix/asm_netbsd_386.s delete mode 100644 vendor/golang.org/x/sys/unix/asm_netbsd_amd64.s delete mode 100644 vendor/golang.org/x/sys/unix/asm_netbsd_arm.s delete mode 100644 vendor/golang.org/x/sys/unix/asm_openbsd_386.s delete mode 100644 vendor/golang.org/x/sys/unix/asm_openbsd_amd64.s delete mode 100644 vendor/golang.org/x/sys/unix/asm_solaris_amd64.s delete mode 100644 vendor/golang.org/x/sys/unix/bluetooth_linux.go delete mode 100644 vendor/golang.org/x/sys/unix/constants.go delete mode 100644 vendor/golang.org/x/sys/unix/env_unix.go delete mode 100644 vendor/golang.org/x/sys/unix/env_unset.go delete mode 100644 vendor/golang.org/x/sys/unix/flock.go delete mode 100644 vendor/golang.org/x/sys/unix/flock_linux_32bit.go delete mode 100644 vendor/golang.org/x/sys/unix/gccgo.go delete mode 100644 vendor/golang.org/x/sys/unix/gccgo_c.c delete mode 100644 vendor/golang.org/x/sys/unix/gccgo_linux_amd64.go delete mode 100755 vendor/golang.org/x/sys/unix/mkall.sh delete mode 100755 vendor/golang.org/x/sys/unix/mkerrors.sh delete mode 100644 vendor/golang.org/x/sys/unix/mkpost.go delete mode 100755 vendor/golang.org/x/sys/unix/mksyscall.pl delete mode 100755 vendor/golang.org/x/sys/unix/mksyscall_solaris.pl delete mode 100755 vendor/golang.org/x/sys/unix/mksysctl_openbsd.pl delete mode 100755 vendor/golang.org/x/sys/unix/mksysnum_darwin.pl delete mode 100755 vendor/golang.org/x/sys/unix/mksysnum_dragonfly.pl delete mode 100755 vendor/golang.org/x/sys/unix/mksysnum_freebsd.pl delete mode 100755 vendor/golang.org/x/sys/unix/mksysnum_linux.pl delete mode 100755 vendor/golang.org/x/sys/unix/mksysnum_netbsd.pl delete mode 100755 vendor/golang.org/x/sys/unix/mksysnum_openbsd.pl delete mode 100644 vendor/golang.org/x/sys/unix/race.go delete mode 100644 vendor/golang.org/x/sys/unix/race0.go delete mode 100644 vendor/golang.org/x/sys/unix/sockcmsg_linux.go delete mode 100644 vendor/golang.org/x/sys/unix/sockcmsg_unix.go delete mode 100644 vendor/golang.org/x/sys/unix/str.go delete mode 100644 vendor/golang.org/x/sys/unix/syscall.go delete mode 100644 vendor/golang.org/x/sys/unix/syscall_bsd.go delete mode 100644 vendor/golang.org/x/sys/unix/syscall_darwin.go delete mode 100644 vendor/golang.org/x/sys/unix/syscall_darwin_386.go delete mode 100644 vendor/golang.org/x/sys/unix/syscall_darwin_amd64.go delete mode 100644 vendor/golang.org/x/sys/unix/syscall_darwin_arm.go delete mode 100644 vendor/golang.org/x/sys/unix/syscall_darwin_arm64.go delete mode 100644 vendor/golang.org/x/sys/unix/syscall_dragonfly.go delete mode 100644 vendor/golang.org/x/sys/unix/syscall_dragonfly_amd64.go delete mode 100644 vendor/golang.org/x/sys/unix/syscall_freebsd.go delete mode 100644 vendor/golang.org/x/sys/unix/syscall_freebsd_386.go delete mode 100644 vendor/golang.org/x/sys/unix/syscall_freebsd_amd64.go delete mode 100644 vendor/golang.org/x/sys/unix/syscall_freebsd_arm.go delete mode 100644 vendor/golang.org/x/sys/unix/syscall_linux.go delete mode 100644 vendor/golang.org/x/sys/unix/syscall_linux_386.go delete mode 100644 vendor/golang.org/x/sys/unix/syscall_linux_amd64.go delete mode 100644 vendor/golang.org/x/sys/unix/syscall_linux_arm.go delete mode 100644 vendor/golang.org/x/sys/unix/syscall_linux_arm64.go delete mode 100644 vendor/golang.org/x/sys/unix/syscall_linux_mips64x.go delete mode 100644 vendor/golang.org/x/sys/unix/syscall_linux_ppc64x.go delete mode 100644 vendor/golang.org/x/sys/unix/syscall_linux_s390x.go delete mode 100644 vendor/golang.org/x/sys/unix/syscall_netbsd.go delete mode 100644 vendor/golang.org/x/sys/unix/syscall_netbsd_386.go delete mode 100644 vendor/golang.org/x/sys/unix/syscall_netbsd_amd64.go delete mode 100644 vendor/golang.org/x/sys/unix/syscall_netbsd_arm.go delete mode 100644 vendor/golang.org/x/sys/unix/syscall_no_getwd.go delete mode 100644 vendor/golang.org/x/sys/unix/syscall_openbsd.go delete mode 100644 vendor/golang.org/x/sys/unix/syscall_openbsd_386.go delete mode 100644 vendor/golang.org/x/sys/unix/syscall_openbsd_amd64.go delete mode 100644 vendor/golang.org/x/sys/unix/syscall_solaris.go delete mode 100644 vendor/golang.org/x/sys/unix/syscall_solaris_amd64.go delete mode 100644 vendor/golang.org/x/sys/unix/syscall_unix.go delete mode 100644 vendor/golang.org/x/sys/unix/types_darwin.go delete mode 100644 vendor/golang.org/x/sys/unix/types_dragonfly.go delete mode 100644 vendor/golang.org/x/sys/unix/types_freebsd.go delete mode 100644 vendor/golang.org/x/sys/unix/types_linux.go delete mode 100644 vendor/golang.org/x/sys/unix/types_netbsd.go delete mode 100644 vendor/golang.org/x/sys/unix/types_openbsd.go delete mode 100644 vendor/golang.org/x/sys/unix/types_solaris.go delete mode 100644 vendor/golang.org/x/sys/unix/zerrors_darwin_386.go delete mode 100644 vendor/golang.org/x/sys/unix/zerrors_darwin_amd64.go delete mode 100644 vendor/golang.org/x/sys/unix/zerrors_darwin_arm.go delete mode 100644 vendor/golang.org/x/sys/unix/zerrors_darwin_arm64.go delete mode 100644 vendor/golang.org/x/sys/unix/zerrors_dragonfly_amd64.go delete mode 100644 vendor/golang.org/x/sys/unix/zerrors_freebsd_386.go delete mode 100644 vendor/golang.org/x/sys/unix/zerrors_freebsd_amd64.go delete mode 100644 vendor/golang.org/x/sys/unix/zerrors_freebsd_arm.go delete mode 100644 vendor/golang.org/x/sys/unix/zerrors_linux_386.go delete mode 100644 vendor/golang.org/x/sys/unix/zerrors_linux_amd64.go delete mode 100644 vendor/golang.org/x/sys/unix/zerrors_linux_arm.go delete mode 100644 vendor/golang.org/x/sys/unix/zerrors_linux_arm64.go delete mode 100644 vendor/golang.org/x/sys/unix/zerrors_linux_mips64.go delete mode 100644 vendor/golang.org/x/sys/unix/zerrors_linux_mips64le.go delete mode 100644 vendor/golang.org/x/sys/unix/zerrors_linux_ppc64.go delete mode 100644 vendor/golang.org/x/sys/unix/zerrors_linux_ppc64le.go delete mode 100644 vendor/golang.org/x/sys/unix/zerrors_linux_s390x.go delete mode 100644 vendor/golang.org/x/sys/unix/zerrors_netbsd_386.go delete mode 100644 vendor/golang.org/x/sys/unix/zerrors_netbsd_amd64.go delete mode 100644 vendor/golang.org/x/sys/unix/zerrors_netbsd_arm.go delete mode 100644 vendor/golang.org/x/sys/unix/zerrors_openbsd_386.go delete mode 100644 vendor/golang.org/x/sys/unix/zerrors_openbsd_amd64.go delete mode 100644 vendor/golang.org/x/sys/unix/zerrors_solaris_amd64.go delete mode 100644 vendor/golang.org/x/sys/unix/zsyscall_darwin_386.go delete mode 100644 vendor/golang.org/x/sys/unix/zsyscall_darwin_amd64.go delete mode 100644 vendor/golang.org/x/sys/unix/zsyscall_darwin_arm.go delete mode 100644 vendor/golang.org/x/sys/unix/zsyscall_darwin_arm64.go delete mode 100644 vendor/golang.org/x/sys/unix/zsyscall_dragonfly_amd64.go delete mode 100644 vendor/golang.org/x/sys/unix/zsyscall_freebsd_386.go delete mode 100644 vendor/golang.org/x/sys/unix/zsyscall_freebsd_amd64.go delete mode 100644 vendor/golang.org/x/sys/unix/zsyscall_freebsd_arm.go delete mode 100644 vendor/golang.org/x/sys/unix/zsyscall_linux_386.go delete mode 100644 vendor/golang.org/x/sys/unix/zsyscall_linux_amd64.go delete mode 100644 vendor/golang.org/x/sys/unix/zsyscall_linux_arm.go delete mode 100644 vendor/golang.org/x/sys/unix/zsyscall_linux_arm64.go delete mode 100644 vendor/golang.org/x/sys/unix/zsyscall_linux_mips64.go delete mode 100644 vendor/golang.org/x/sys/unix/zsyscall_linux_mips64le.go delete mode 100644 vendor/golang.org/x/sys/unix/zsyscall_linux_ppc64.go delete mode 100644 vendor/golang.org/x/sys/unix/zsyscall_linux_ppc64le.go delete mode 100644 vendor/golang.org/x/sys/unix/zsyscall_linux_s390x.go delete mode 100644 vendor/golang.org/x/sys/unix/zsyscall_netbsd_386.go delete mode 100644 vendor/golang.org/x/sys/unix/zsyscall_netbsd_amd64.go delete mode 100644 vendor/golang.org/x/sys/unix/zsyscall_netbsd_arm.go delete mode 100644 vendor/golang.org/x/sys/unix/zsyscall_openbsd_386.go delete mode 100644 vendor/golang.org/x/sys/unix/zsyscall_openbsd_amd64.go delete mode 100644 vendor/golang.org/x/sys/unix/zsyscall_solaris_amd64.go delete mode 100644 vendor/golang.org/x/sys/unix/zsysctl_openbsd.go delete mode 100644 vendor/golang.org/x/sys/unix/zsysnum_darwin_386.go delete mode 100644 vendor/golang.org/x/sys/unix/zsysnum_darwin_amd64.go delete mode 100644 vendor/golang.org/x/sys/unix/zsysnum_darwin_arm.go delete mode 100644 vendor/golang.org/x/sys/unix/zsysnum_darwin_arm64.go delete mode 100644 vendor/golang.org/x/sys/unix/zsysnum_dragonfly_amd64.go delete mode 100644 vendor/golang.org/x/sys/unix/zsysnum_freebsd_386.go delete mode 100644 vendor/golang.org/x/sys/unix/zsysnum_freebsd_amd64.go delete mode 100644 vendor/golang.org/x/sys/unix/zsysnum_freebsd_arm.go delete mode 100644 vendor/golang.org/x/sys/unix/zsysnum_linux_386.go delete mode 100644 vendor/golang.org/x/sys/unix/zsysnum_linux_amd64.go delete mode 100644 vendor/golang.org/x/sys/unix/zsysnum_linux_arm.go delete mode 100644 vendor/golang.org/x/sys/unix/zsysnum_linux_arm64.go delete mode 100644 vendor/golang.org/x/sys/unix/zsysnum_linux_mips64.go delete mode 100644 vendor/golang.org/x/sys/unix/zsysnum_linux_mips64le.go delete mode 100644 vendor/golang.org/x/sys/unix/zsysnum_linux_ppc64.go delete mode 100644 vendor/golang.org/x/sys/unix/zsysnum_linux_ppc64le.go delete mode 100644 vendor/golang.org/x/sys/unix/zsysnum_linux_s390x.go delete mode 100644 vendor/golang.org/x/sys/unix/zsysnum_netbsd_386.go delete mode 100644 vendor/golang.org/x/sys/unix/zsysnum_netbsd_amd64.go delete mode 100644 vendor/golang.org/x/sys/unix/zsysnum_netbsd_arm.go delete mode 100644 vendor/golang.org/x/sys/unix/zsysnum_openbsd_386.go delete mode 100644 vendor/golang.org/x/sys/unix/zsysnum_openbsd_amd64.go delete mode 100644 vendor/golang.org/x/sys/unix/zsysnum_solaris_amd64.go delete mode 100644 vendor/golang.org/x/sys/unix/ztypes_darwin_386.go delete mode 100644 vendor/golang.org/x/sys/unix/ztypes_darwin_amd64.go delete mode 100644 vendor/golang.org/x/sys/unix/ztypes_darwin_arm.go delete mode 100644 vendor/golang.org/x/sys/unix/ztypes_darwin_arm64.go delete mode 100644 vendor/golang.org/x/sys/unix/ztypes_dragonfly_amd64.go delete mode 100644 vendor/golang.org/x/sys/unix/ztypes_freebsd_386.go delete mode 100644 vendor/golang.org/x/sys/unix/ztypes_freebsd_amd64.go delete mode 100644 vendor/golang.org/x/sys/unix/ztypes_freebsd_arm.go delete mode 100644 vendor/golang.org/x/sys/unix/ztypes_linux_386.go delete mode 100644 vendor/golang.org/x/sys/unix/ztypes_linux_amd64.go delete mode 100644 vendor/golang.org/x/sys/unix/ztypes_linux_arm.go delete mode 100644 vendor/golang.org/x/sys/unix/ztypes_linux_arm64.go delete mode 100644 vendor/golang.org/x/sys/unix/ztypes_linux_mips64.go delete mode 100644 vendor/golang.org/x/sys/unix/ztypes_linux_mips64le.go delete mode 100644 vendor/golang.org/x/sys/unix/ztypes_linux_ppc64.go delete mode 100644 vendor/golang.org/x/sys/unix/ztypes_linux_ppc64le.go delete mode 100644 vendor/golang.org/x/sys/unix/ztypes_linux_s390x.go delete mode 100644 vendor/golang.org/x/sys/unix/ztypes_netbsd_386.go delete mode 100644 vendor/golang.org/x/sys/unix/ztypes_netbsd_amd64.go delete mode 100644 vendor/golang.org/x/sys/unix/ztypes_netbsd_arm.go delete mode 100644 vendor/golang.org/x/sys/unix/ztypes_openbsd_386.go delete mode 100644 vendor/golang.org/x/sys/unix/ztypes_openbsd_amd64.go delete mode 100644 vendor/golang.org/x/sys/unix/ztypes_solaris_amd64.go delete mode 100644 vendor/gopkg.in/alexcesaro/quotedprintable.v3/LICENSE delete mode 100644 vendor/gopkg.in/alexcesaro/quotedprintable.v3/README.md delete mode 100644 vendor/gopkg.in/alexcesaro/quotedprintable.v3/encodedword.go delete mode 100644 vendor/gopkg.in/alexcesaro/quotedprintable.v3/pool.go delete mode 100644 vendor/gopkg.in/alexcesaro/quotedprintable.v3/pool_go12.go delete mode 100644 vendor/gopkg.in/alexcesaro/quotedprintable.v3/reader.go delete mode 100644 vendor/gopkg.in/alexcesaro/quotedprintable.v3/writer.go create mode 100644 vendor/gopkg.in/gomail.v2/.gitrepo create mode 100644 vendor/gopkg.in/gomail.v2/.travis.yml create mode 100644 vendor/gopkg.in/gomail.v2/auth_test.go create mode 100644 vendor/gopkg.in/gomail.v2/example_test.go create mode 100644 vendor/gopkg.in/gomail.v2/message_test.go create mode 100644 vendor/gopkg.in/gomail.v2/send_test.go create mode 100644 vendor/gopkg.in/gomail.v2/smtp_test.go diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index a7ff9553b..5bdf85e6a 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -141,23 +141,58 @@ go test ./... Dependencies ------------ -All dependencies should be vendored and locked -Kapacitor uses the `github.com/govend/govend` utility to vendor dependencies. +Kapacitor vendors all dependencies. +Kapacitor does not use a dependency manager tool, but rather uses git subrepos to place +dependencies in the vendor directory. +This give complete control over how dependency are managed and keeps the workflow simple. +A few helper scripts are provided to make this process fast and easy. -The workflow is simple: +To manage the subrepo you must first install [git-subrepo](https://github.com/ingydotnet/git-subrepo#installation). -```bash -# Download and lock all deps -govend -l --prune +First list all dependencies, including dependencies of dependencies. + +``` +./list-deps ``` -To update an existing dependency use: +To add a new dependency add a new entry to the `vendor.list` file, of the form: -```bash -govend -u --prune package +``` + [branch] +``` + +The `branch` column is optional. +If `branch` is left empty the default branch will be used. + +For example, to add the `github.com/influxdata/foo/bar` dependency add this line to the `vendor.list`. + +``` +github.com/influxdata/foo https://github.com/influxdata/foo.git +``` + +Notice that `bar` part of the path was left off since its a subdirectory of the repo. + +Commit this change then run: + +``` +./vendor.sh github.com/influxdata/foo +``` + +This will add the subrepo for the git repo under `vendor/github.com/influxdata/foo`. + +Later to update the dependency use the same command. + +``` +./vendor.sh github.com/influxdata/foo +``` + +Or to update all dependencies at once use + +``` +./vendor.sh ``` -> NOTE: The use of prune removes uneeded files from dependencies so only the minimum set of files are committed to the repo. +These scripts are really simple, we may formalize them later but currently simplicity is key. Generating Code diff --git a/build.py b/build.py index 212ca1430..40771a42f 100755 --- a/build.py +++ b/build.py @@ -151,8 +151,8 @@ def run_generate(): """Run 'go generate' to rebuild any static assets. """ logging.info("Running generate...") - run("go get github.com/golang/protobuf/protoc-gen-go") - run("go get github.com/benbjohnson/tmpl") + run("go install ./vendor/github.com/golang/protobuf/protoc-gen-go") + run("go install ./vendor/github.com/benbjohnson/tmpl") generate_cmd = ["go", "generate"] generate_cmd.extend(go_list()) p = subprocess.Popen(generate_cmd) @@ -165,17 +165,11 @@ def run_generate(): return False def go_get(branch, update=False, no_uncommitted=False): - """Retrieve build dependencies or restore pinned dependencies. """ - run("go get github.com/govend/govend") - get_command = "" - if update: - get_command += "{}/bin/govend -v -u --prune".format(os.environ.get("GOPATH")) - else: - get_command += "{}/bin/govend -v --prune".format(os.environ.get("GOPATH")) - - logging.info("Retrieving Go dependencies...") - run(get_command, shell=True) + Retrieve build dependencies or restore pinned dependencies. + """ + # All Kapacitor deps should be vendored so do not go get them + logging.info("Pretending to retrieve Go dependencies...") # Check for uncommitted changes if no_uncommitted was given. if no_uncommitted: diff --git a/cmd/kapacitord/run/server.go b/cmd/kapacitord/run/server.go index d4b88b359..fd138889f 100644 --- a/cmd/kapacitord/run/server.go +++ b/cmd/kapacitord/run/server.go @@ -10,7 +10,6 @@ import ( "runtime" "runtime/pprof" "strings" - "time" "github.com/influxdata/influxdb/influxql" "github.com/influxdata/influxdb/services/collectd" @@ -71,7 +70,7 @@ type Server struct { ReplayService *replay.Service InfluxDBService *influxdb.Service - MetaClient *metaclient + MetaClient *kapacitor.NoopMetaClient QueryExecutor *queryexecutor Services []Service @@ -99,7 +98,7 @@ func NewServer(c *Config, buildInfo *BuildInfo, logService logging.Interface) (* hostname: c.Hostname, err: make(chan error), LogService: logService, - MetaClient: &metaclient{}, + MetaClient: &kapacitor.NoopMetaClient{}, QueryExecutor: &queryexecutor{}, Logger: l, } @@ -583,26 +582,6 @@ type tcpaddr struct{ host string } func (a *tcpaddr) Network() string { return "tcp" } func (a *tcpaddr) String() string { return a.host } -type metaclient struct{} - -func (m *metaclient) WaitForLeader(d time.Duration) error { - return nil -} -func (m *metaclient) CreateDatabase(name string) (*meta.DatabaseInfo, error) { - return nil, nil -} -func (m *metaclient) Database(name string) (*meta.DatabaseInfo, error) { - return &meta.DatabaseInfo{ - Name: name, - }, nil -} -func (m *metaclient) Authenticate(username, password string) (ui *meta.UserInfo, err error) { - return nil, errors.New("not authenticated") -} -func (m *metaclient) Users() ([]meta.UserInfo, error) { - return nil, errors.New("no user") -} - type queryexecutor struct{} func (qe *queryexecutor) Authorize(u *meta.UserInfo, q *influxql.Query, db string) error { diff --git a/integrations/benchmark_test.go b/integrations/benchmark_test.go index 10275f2f1..41c40daea 100644 --- a/integrations/benchmark_test.go +++ b/integrations/benchmark_test.go @@ -128,7 +128,7 @@ func Bench(b *testing.B, tasksCount, pointCount int, db, rp, measurement, tickSc config.BindAddress = ":0" // Choose port dynamically httpdService := httpd.NewService(config, logService.NewLogger("[http] ", log.LstdFlags)) - httpdService.Handler.MetaClient = &metaclient{} + httpdService.Handler.MetaClient = &kapacitor.NoopMetaClient{} err := httpdService.Open() if err != nil { b.Fatal(err) diff --git a/integrations/helpers_test.go b/integrations/helpers_test.go index 80c7b00c1..83ca4dc0c 100644 --- a/integrations/helpers_test.go +++ b/integrations/helpers_test.go @@ -12,7 +12,6 @@ import ( client "github.com/influxdata/influxdb/client/v2" "github.com/influxdata/influxdb/influxql" - "github.com/influxdata/influxdb/services/meta" "github.com/influxdata/kapacitor" "github.com/influxdata/kapacitor/udf" "github.com/influxdata/wlog" @@ -168,27 +167,3 @@ func (d deadman) Threshold() float64 { return d.threshold } func (d deadman) Id() string { return d.id } func (d deadman) Message() string { return d.message } func (d deadman) Global() bool { return d.global } - -type metaclient struct{} - -func (m *metaclient) WaitForLeader(d time.Duration) error { - return nil -} - -func (m *metaclient) CreateDatabase(name string) (*meta.DatabaseInfo, error) { - return nil, nil -} - -func (m *metaclient) Database(name string) (*meta.DatabaseInfo, error) { - return &meta.DatabaseInfo{ - Name: name, - }, nil -} - -func (m *metaclient) Authenticate(username, password string) (ui *meta.UserInfo, err error) { - return nil, errors.New("not authenticated") -} - -func (m *metaclient) Users() ([]meta.UserInfo, error) { - return nil, errors.New("no user") -} diff --git a/list-deps b/list-deps new file mode 100755 index 000000000..174b512fc --- /dev/null +++ b/list-deps @@ -0,0 +1,46 @@ +#!/bin/bash + +# Make sure we are in the dir of the script +DIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd) +cd $DIR + +# List all dependent packages and whether they have been vendored. +deps() { + local package packages allDeps paths + + # Get the current package + package=$(go list .) + # Get the sub packages excluding vendored packages + packages=$(go list ./... | grep -v "^$package/vendor") + allDeps=$(go list -f '{{ join .Deps "\n"}}' $packages) + + for dep in $allDeps + do + # Skip standard lib deps + paths=(${dep//\// }) + if ! [[ "${paths[0]}" =~ .*\..* ]] + then + continue + fi + # Skip deps from within current package + if [[ "$dep" =~ ^$package ]] + then + if [[ "$dep" =~ ^$package/vendor ]] + then + # Rewrite vendored deps as normal deps + dep="v ${dep/$package\/vendor\//}" + else + continue + fi + else + dep="n $dep" + fi + + echo $dep + done +} + + +# Deduplicate and sort the output +deps | sort -k 2 -u + diff --git a/metaclient.go b/metaclient.go new file mode 100644 index 000000000..70cf4141c --- /dev/null +++ b/metaclient.go @@ -0,0 +1,37 @@ +package kapacitor + +import ( + "errors" + "time" + + "github.com/influxdata/influxdb/services/meta" +) + +type NoopMetaClient struct{} + +func (m *NoopMetaClient) WaitForLeader(d time.Duration) error { + return nil +} +func (m *NoopMetaClient) CreateDatabase(name string) (*meta.DatabaseInfo, error) { + return nil, nil +} +func (m *NoopMetaClient) CreateDatabaseWithRetentionPolicy(name string, rpi *meta.RetentionPolicyInfo) (*meta.DatabaseInfo, error) { + return nil, nil +} +func (m *NoopMetaClient) CreateRetentionPolicy(database string, rpi *meta.RetentionPolicyInfo) (*meta.RetentionPolicyInfo, error) { + return nil, nil +} +func (m *NoopMetaClient) Database(name string) *meta.DatabaseInfo { + return &meta.DatabaseInfo{ + Name: name, + } +} +func (m *NoopMetaClient) RetentionPolicy(database, name string) (*meta.RetentionPolicyInfo, error) { + return nil, nil +} +func (m *NoopMetaClient) Authenticate(username, password string) (ui *meta.UserInfo, err error) { + return nil, errors.New("not authenticated") +} +func (m *NoopMetaClient) Users() ([]meta.UserInfo, error) { + return nil, errors.New("no user") +} diff --git a/services/httpd/handler.go b/services/httpd/handler.go index 009502f73..259c7b4b7 100644 --- a/services/httpd/handler.go +++ b/services/httpd/handler.go @@ -50,7 +50,6 @@ type Handler struct { Version string MetaClient interface { - Database(name string) (*meta.DatabaseInfo, error) Authenticate(username, password string) (ui *meta.UserInfo, err error) Users() ([]meta.UserInfo, error) } @@ -406,14 +405,6 @@ func (h *Handler) serveWriteLine(w http.ResponseWriter, r *http.Request, body [] return } - if di, err := h.MetaClient.Database(database); err != nil { - h.writeError(w, influxql.Result{Err: fmt.Errorf("metastore database error: %s", err)}, http.StatusInternalServerError) - return - } else if di == nil { - h.writeError(w, influxql.Result{Err: fmt.Errorf("database not found: %q", database)}, http.StatusNotFound) - return - } - if h.requireAuthentication && user == nil { h.writeError(w, influxql.Result{Err: fmt.Errorf("user is required to write to database %q", database)}, http.StatusUnauthorized) return diff --git a/services/reporting/config.go b/services/reporting/config.go index e4d9eca96..bd1514272 100644 --- a/services/reporting/config.go +++ b/services/reporting/config.go @@ -1,7 +1,7 @@ package reporting import ( - "github.com/influxdb/usage-client/v1" + client "github.com/influxdata/usage-client/v1" ) type Config struct { diff --git a/services/reporting/service.go b/services/reporting/service.go index baf0860ff..ab2b2727c 100644 --- a/services/reporting/service.go +++ b/services/reporting/service.go @@ -8,7 +8,7 @@ import ( "time" "github.com/influxdata/kapacitor" - "github.com/influxdb/usage-client/v1" + client "github.com/influxdata/usage-client/v1" ) const reportingInterval = time.Hour * 12 diff --git a/udf/udf.pb.go b/udf/udf.pb.go index ce3235f7c..d97d6b9ee 100644 --- a/udf/udf.pb.go +++ b/udf/udf.pb.go @@ -1218,6 +1218,8 @@ func init() { proto.RegisterEnum("udf.ValueType", ValueType_name, ValueType_value) } +func init() { proto.RegisterFile("udf.proto", fileDescriptor0) } + var fileDescriptor0 = []byte{ // 1064 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xc4, 0x56, 0xef, 0x72, 0xdb, 0x44, diff --git a/vendor.list b/vendor.list new file mode 100644 index 000000000..a0eacca22 --- /dev/null +++ b/vendor.list @@ -0,0 +1,24 @@ +github.com/boltdb/bolt +github.com/BurntSushi/toml +github.com/cenkalti/backoff +github.com/dustin/go-humanize +github.com/gogo/protobuf +github.com/golang/protobuf +github.com/gorhill/cronexpr +github.com/influxdata/influxdb +github.com/influxdata/usage-client +github.com/kimor79/gollectd +github.com/mattn/go-runewidth +github.com/pkg/errors +github.com/russross/blackfriday +github.com/serenize/snaker +github.com/shurcooL/go +github.com/shurcooL/markdownfmt +github.com/shurcooL/sanitized_anchor_name +github.com/twinj/uuid +golang.org/x/crypto master +gopkg.in/gomail.v2 +# Generate deps +github.com/benbjohnson/tmpl +# Testing deps +github.com/stretchr/testify diff --git a/vendor.sh b/vendor.sh new file mode 100755 index 000000000..a0c8e8aeb --- /dev/null +++ b/vendor.sh @@ -0,0 +1,41 @@ +#!/bin/bash + +# Make sure we are in the dir of the script +DIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd) +cd $DIR + +match=$1 + +while read line +do + spec=($line) + package=${spec[0]} + # Skip empty lines and comments + if [[ -z "$package" || "$package" =~ ^# ]] + then + continue + fi + uri="https://$package.git" + dir="vendor/$package" + + if [[ -n "$match" && "$package" != "$match" ]] + then + continue + fi + + # Determine an upstream branch + branch=${spec[1]} + barg="" + if [ -n "$branch" ] + then + barg="-b $branch" + fi + + if [ -d "$dir" ] + then + git subrepo pull "$dir" $barg + else + git subrepo clone "$uri" "$dir" $barg + fi +done < vendor.list + diff --git a/vendor.yml b/vendor.yml deleted file mode 100644 index f3b9f59b3..000000000 --- a/vendor.yml +++ /dev/null @@ -1,53 +0,0 @@ -vendors: -- path: github.com/BurntSushi/toml - rev: f0aeabca5a127c4078abb8c8d64298b147264b55 -- path: github.com/boltdb/bolt - rev: dfb21201d9270c1082d5fb0f07f500311ff72f18 -- path: github.com/cenkalti/backoff - rev: a6030178a585d5972d4d33ce61f4a1fa40eaaed0 -- path: github.com/davecgh/go-spew - rev: 5215b55f46b2b919f50a1df0eaa5886afe4e3b3d -- path: github.com/dustin/go-humanize - rev: 499693e27ee0d14ffab67c31ad065fdb3d34ea75 -- path: github.com/gogo/protobuf - rev: 7883e1468d48d969e1c3ce4bcde89b6a7dd4adc4 -- path: github.com/golang/protobuf - rev: 3b06fc7a4cad73efce5fe6217ab6c33e7231ab4a -- path: github.com/gorhill/cronexpr - rev: f0984319b44273e83de132089ae42b1810f4933b -- path: github.com/influxdata/influxdb - rev: 128b07e352a324c90b48d386cad4efb75f56a0d0 -- path: github.com/influxdata/wlog - rev: 7c63b0a71ef8300adc255344d275e10e5c3a71ec -- path: github.com/influxdb/usage-client - rev: 475977e68d79883d9c8d67131c84e4241523f452 -- path: github.com/kimor79/gollectd - rev: b5dddb1667dcc1e6355b9305e2c1608a2db6983c -- path: github.com/mattn/go-runewidth - rev: d6bea18f789704b5f83375793155289da36a3c7f -- path: github.com/pkg/errors - rev: 431554f80b8ecf5058547f6c65b87fad81d90b03 -- path: github.com/pmezard/go-difflib - rev: 792786c7400a136282c1664665ae0a8db921c6c2 -- path: github.com/russross/blackfriday - rev: 1d6b8e9301e720b08a8938b8c25c018285885438 -- path: github.com/serenize/snaker - rev: 8824b61eca66d308fcb2d515287d3d7a28dba8d6 -- path: github.com/shurcooL/go - rev: 9c848044360eb2b7fc1a1ff45755017df0873470 -- path: github.com/shurcooL/markdownfmt - rev: 818f50da77ed6ad125554fbb38f56e6ca4498963 -- path: github.com/shurcooL/sanitized_anchor_name - rev: 10ef21a441db47d8b13ebcc5fd2310f636973c77 -- path: github.com/stretchr/testify - rev: 8d64eb7173c7753d6419fd4a9caf057398611364 -- path: github.com/twinj/uuid - rev: 5a4b9dcb2a5e9eaba079cd853d275582fc764505 -- path: golang.org/x/crypto - rev: 5bcd134fee4dd1475da17714aac19c0aa0142e2f -- path: golang.org/x/sys - rev: 076b546753157f758b316e59bcb51e6807c04057 -- path: gopkg.in/alexcesaro/quotedprintable.v3 - rev: 2caba252f4dc53eaf6b553000885530023f54623 -- path: gopkg.in/gomail.v2 - rev: 81ebce5c23dfd25c6c67194b37d3dd3f338c98b1 diff --git a/vendor/github.com/BurntSushi/toml/.gitignore b/vendor/github.com/BurntSushi/toml/.gitignore new file mode 100644 index 000000000..0cd380037 --- /dev/null +++ b/vendor/github.com/BurntSushi/toml/.gitignore @@ -0,0 +1,5 @@ +TAGS +tags +.*.swp +tomlcheck/tomlcheck +toml.test diff --git a/vendor/github.com/BurntSushi/toml/.gitrepo b/vendor/github.com/BurntSushi/toml/.gitrepo new file mode 100644 index 000000000..53c39317b --- /dev/null +++ b/vendor/github.com/BurntSushi/toml/.gitrepo @@ -0,0 +1,11 @@ +; DO NOT EDIT (unless you know what you are doing) +; +; This subdirectory is a git "subrepo", and this file is maintained by the +; git-subrepo command. See https://github.com/git-commands/git-subrepo#readme +; +[subrepo] + remote = http://github.com/BurntSushi/toml.git + branch = datetimes + commit = f0aeabca5a127c4078abb8c8d64298b147264b55 + parent = db57a2908e5de95a495f97d92e09d628d33d2071 + cmdver = 0.3.0 diff --git a/vendor/github.com/BurntSushi/toml/.travis.yml b/vendor/github.com/BurntSushi/toml/.travis.yml new file mode 100644 index 000000000..43caf6d02 --- /dev/null +++ b/vendor/github.com/BurntSushi/toml/.travis.yml @@ -0,0 +1,12 @@ +language: go +go: + - 1.1 + - 1.2 + - tip +install: + - go install ./... + - go get github.com/BurntSushi/toml-test +script: + - export PATH="$PATH:$HOME/gopath/bin" + - make test + diff --git a/vendor/github.com/BurntSushi/toml/_examples/example.go b/vendor/github.com/BurntSushi/toml/_examples/example.go new file mode 100644 index 000000000..79f31f275 --- /dev/null +++ b/vendor/github.com/BurntSushi/toml/_examples/example.go @@ -0,0 +1,61 @@ +package main + +import ( + "fmt" + "time" + + "github.com/BurntSushi/toml" +) + +type tomlConfig struct { + Title string + Owner ownerInfo + DB database `toml:"database"` + Servers map[string]server + Clients clients +} + +type ownerInfo struct { + Name string + Org string `toml:"organization"` + Bio string + DOB time.Time +} + +type database struct { + Server string + Ports []int + ConnMax int `toml:"connection_max"` + Enabled bool +} + +type server struct { + IP string + DC string +} + +type clients struct { + Data [][]interface{} + Hosts []string +} + +func main() { + var config tomlConfig + if _, err := toml.DecodeFile("example.toml", &config); err != nil { + fmt.Println(err) + return + } + + fmt.Printf("Title: %s\n", config.Title) + fmt.Printf("Owner: %s (%s, %s), Born: %s\n", + config.Owner.Name, config.Owner.Org, config.Owner.Bio, + config.Owner.DOB) + fmt.Printf("Database: %s %v (Max conn. %d), Enabled? %v\n", + config.DB.Server, config.DB.Ports, config.DB.ConnMax, + config.DB.Enabled) + for serverName, server := range config.Servers { + fmt.Printf("Server: %s (%s, %s)\n", serverName, server.IP, server.DC) + } + fmt.Printf("Client data: %v\n", config.Clients.Data) + fmt.Printf("Client hosts: %v\n", config.Clients.Hosts) +} diff --git a/vendor/github.com/BurntSushi/toml/_examples/example.toml b/vendor/github.com/BurntSushi/toml/_examples/example.toml new file mode 100644 index 000000000..32c7a4faa --- /dev/null +++ b/vendor/github.com/BurntSushi/toml/_examples/example.toml @@ -0,0 +1,35 @@ +# This is a TOML document. Boom. + +title = "TOML Example" + +[owner] +name = "Tom Preston-Werner" +organization = "GitHub" +bio = "GitHub Cofounder & CEO\nLikes tater tots and beer." +dob = 1979-05-27T07:32:00Z # First class dates? Why not? + +[database] +server = "192.168.1.1" +ports = [ 8001, 8001, 8002 ] +connection_max = 5000 +enabled = true + +[servers] + + # You can indent as you please. Tabs or spaces. TOML don't care. + [servers.alpha] + ip = "10.0.0.1" + dc = "eqdc10" + + [servers.beta] + ip = "10.0.0.2" + dc = "eqdc10" + +[clients] +data = [ ["gamma", "delta"], [1, 2] ] # just an update to make sure parsers support it + +# Line breaks are OK when inside arrays +hosts = [ + "alpha", + "omega" +] diff --git a/vendor/github.com/BurntSushi/toml/_examples/hard.toml b/vendor/github.com/BurntSushi/toml/_examples/hard.toml new file mode 100644 index 000000000..26145d2b4 --- /dev/null +++ b/vendor/github.com/BurntSushi/toml/_examples/hard.toml @@ -0,0 +1,22 @@ +# Test file for TOML +# Only this one tries to emulate a TOML file written by a user of the kind of parser writers probably hate +# This part you'll really hate + +[the] +test_string = "You'll hate me after this - #" # " Annoying, isn't it? + + [the.hard] + test_array = [ "] ", " # "] # ] There you go, parse this! + test_array2 = [ "Test #11 ]proved that", "Experiment #9 was a success" ] + # You didn't think it'd as easy as chucking out the last #, did you? + another_test_string = " Same thing, but with a string #" + harder_test_string = " And when \"'s are in the string, along with # \"" # "and comments are there too" + # Things will get harder + + [the.hard.bit#] + what? = "You don't think some user won't do that?" + multi_line_array = [ + "]", + # ] Oh yes I did + ] + diff --git a/vendor/github.com/BurntSushi/toml/_examples/implicit.toml b/vendor/github.com/BurntSushi/toml/_examples/implicit.toml new file mode 100644 index 000000000..1dea5ceb4 --- /dev/null +++ b/vendor/github.com/BurntSushi/toml/_examples/implicit.toml @@ -0,0 +1,4 @@ +# [x] you +# [x.y] don't +# [x.y.z] need these +[x.y.z.w] # for this to work diff --git a/vendor/github.com/BurntSushi/toml/_examples/invalid-apples.toml b/vendor/github.com/BurntSushi/toml/_examples/invalid-apples.toml new file mode 100644 index 000000000..74e9e337e --- /dev/null +++ b/vendor/github.com/BurntSushi/toml/_examples/invalid-apples.toml @@ -0,0 +1,6 @@ +# DO NOT WANT +[fruit] +type = "apple" + +[fruit.type] +apple = "yes" diff --git a/vendor/github.com/BurntSushi/toml/_examples/invalid.toml b/vendor/github.com/BurntSushi/toml/_examples/invalid.toml new file mode 100644 index 000000000..beb1dba54 --- /dev/null +++ b/vendor/github.com/BurntSushi/toml/_examples/invalid.toml @@ -0,0 +1,35 @@ +# This is an INVALID TOML document. Boom. +# Can you spot the error without help? + +title = "TOML Example" + +[owner] +name = "Tom Preston-Werner" +organization = "GitHub" +bio = "GitHub Cofounder & CEO\nLikes tater tots and beer." +dob = 1979-05-27T7:32:00Z # First class dates? Why not? + +[database] +server = "192.168.1.1" +ports = [ 8001, 8001, 8002 ] +connection_max = 5000 +enabled = true + +[servers] + # You can indent as you please. Tabs or spaces. TOML don't care. + [servers.alpha] + ip = "10.0.0.1" + dc = "eqdc10" + + [servers.beta] + ip = "10.0.0.2" + dc = "eqdc10" + +[clients] +data = [ ["gamma", "delta"], [1, 2] ] # just an update to make sure parsers support it + +# Line breaks are OK when inside arrays +hosts = [ + "alpha", + "omega" +] diff --git a/vendor/github.com/BurntSushi/toml/_examples/readme1.toml b/vendor/github.com/BurntSushi/toml/_examples/readme1.toml new file mode 100644 index 000000000..3e1261d4c --- /dev/null +++ b/vendor/github.com/BurntSushi/toml/_examples/readme1.toml @@ -0,0 +1,5 @@ +Age = 25 +Cats = [ "Cauchy", "Plato" ] +Pi = 3.14 +Perfection = [ 6, 28, 496, 8128 ] +DOB = 1987-07-05T05:45:00Z diff --git a/vendor/github.com/BurntSushi/toml/_examples/readme2.toml b/vendor/github.com/BurntSushi/toml/_examples/readme2.toml new file mode 100644 index 000000000..b51cd9340 --- /dev/null +++ b/vendor/github.com/BurntSushi/toml/_examples/readme2.toml @@ -0,0 +1 @@ +some_key_NAME = "wat" diff --git a/vendor/github.com/BurntSushi/toml/cmd/toml-test-decoder/COPYING b/vendor/github.com/BurntSushi/toml/cmd/toml-test-decoder/COPYING new file mode 100644 index 000000000..5a8e33254 --- /dev/null +++ b/vendor/github.com/BurntSushi/toml/cmd/toml-test-decoder/COPYING @@ -0,0 +1,14 @@ + DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE + Version 2, December 2004 + + Copyright (C) 2004 Sam Hocevar + + Everyone is permitted to copy and distribute verbatim or modified + copies of this license document, and changing it is allowed as long + as the name is changed. + + DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. You just DO WHAT THE FUCK YOU WANT TO. + diff --git a/vendor/github.com/BurntSushi/toml/cmd/toml-test-decoder/README.md b/vendor/github.com/BurntSushi/toml/cmd/toml-test-decoder/README.md new file mode 100644 index 000000000..24421eb70 --- /dev/null +++ b/vendor/github.com/BurntSushi/toml/cmd/toml-test-decoder/README.md @@ -0,0 +1,14 @@ +# Implements the TOML test suite interface + +This is an implementation of the interface expected by +[toml-test](https://github.com/BurntSushi/toml-test) for my +[toml parser written in Go](https://github.com/BurntSushi/toml). +In particular, it maps TOML data on `stdin` to a JSON format on `stdout`. + + +Compatible with TOML version +[v0.2.0](https://github.com/mojombo/toml/blob/master/versions/toml-v0.2.0.md) + +Compatible with `toml-test` version +[v0.2.0](https://github.com/BurntSushi/toml-test/tree/v0.2.0) + diff --git a/vendor/github.com/BurntSushi/toml/cmd/toml-test-decoder/main.go b/vendor/github.com/BurntSushi/toml/cmd/toml-test-decoder/main.go new file mode 100644 index 000000000..14e755700 --- /dev/null +++ b/vendor/github.com/BurntSushi/toml/cmd/toml-test-decoder/main.go @@ -0,0 +1,90 @@ +// Command toml-test-decoder satisfies the toml-test interface for testing +// TOML decoders. Namely, it accepts TOML on stdin and outputs JSON on stdout. +package main + +import ( + "encoding/json" + "flag" + "fmt" + "log" + "os" + "path" + "time" + + "github.com/BurntSushi/toml" +) + +func init() { + log.SetFlags(0) + + flag.Usage = usage + flag.Parse() +} + +func usage() { + log.Printf("Usage: %s < toml-file\n", path.Base(os.Args[0])) + flag.PrintDefaults() + + os.Exit(1) +} + +func main() { + if flag.NArg() != 0 { + flag.Usage() + } + + var tmp interface{} + if _, err := toml.DecodeReader(os.Stdin, &tmp); err != nil { + log.Fatalf("Error decoding TOML: %s", err) + } + + typedTmp := translate(tmp) + if err := json.NewEncoder(os.Stdout).Encode(typedTmp); err != nil { + log.Fatalf("Error encoding JSON: %s", err) + } +} + +func translate(tomlData interface{}) interface{} { + switch orig := tomlData.(type) { + case map[string]interface{}: + typed := make(map[string]interface{}, len(orig)) + for k, v := range orig { + typed[k] = translate(v) + } + return typed + case []map[string]interface{}: + typed := make([]map[string]interface{}, len(orig)) + for i, v := range orig { + typed[i] = translate(v).(map[string]interface{}) + } + return typed + case []interface{}: + typed := make([]interface{}, len(orig)) + for i, v := range orig { + typed[i] = translate(v) + } + + // We don't really need to tag arrays, but let's be future proof. + // (If TOML ever supports tuples, we'll need this.) + return tag("array", typed) + case time.Time: + return tag("datetime", orig.Format("2006-01-02T15:04:05Z")) + case bool: + return tag("bool", fmt.Sprintf("%v", orig)) + case int64: + return tag("integer", fmt.Sprintf("%d", orig)) + case float64: + return tag("float", fmt.Sprintf("%v", orig)) + case string: + return tag("string", orig) + } + + panic(fmt.Sprintf("Unknown type: %T", tomlData)) +} + +func tag(typeName string, data interface{}) map[string]interface{} { + return map[string]interface{}{ + "type": typeName, + "value": data, + } +} diff --git a/vendor/github.com/BurntSushi/toml/cmd/toml-test-encoder/COPYING b/vendor/github.com/BurntSushi/toml/cmd/toml-test-encoder/COPYING new file mode 100644 index 000000000..5a8e33254 --- /dev/null +++ b/vendor/github.com/BurntSushi/toml/cmd/toml-test-encoder/COPYING @@ -0,0 +1,14 @@ + DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE + Version 2, December 2004 + + Copyright (C) 2004 Sam Hocevar + + Everyone is permitted to copy and distribute verbatim or modified + copies of this license document, and changing it is allowed as long + as the name is changed. + + DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. You just DO WHAT THE FUCK YOU WANT TO. + diff --git a/vendor/github.com/BurntSushi/toml/cmd/toml-test-encoder/README.md b/vendor/github.com/BurntSushi/toml/cmd/toml-test-encoder/README.md new file mode 100644 index 000000000..45a603f29 --- /dev/null +++ b/vendor/github.com/BurntSushi/toml/cmd/toml-test-encoder/README.md @@ -0,0 +1,14 @@ +# Implements the TOML test suite interface for TOML encoders + +This is an implementation of the interface expected by +[toml-test](https://github.com/BurntSushi/toml-test) for the +[TOML encoder](https://github.com/BurntSushi/toml). +In particular, it maps JSON data on `stdin` to a TOML format on `stdout`. + + +Compatible with TOML version +[v0.2.0](https://github.com/mojombo/toml/blob/master/versions/toml-v0.2.0.md) + +Compatible with `toml-test` version +[v0.2.0](https://github.com/BurntSushi/toml-test/tree/v0.2.0) + diff --git a/vendor/github.com/BurntSushi/toml/cmd/toml-test-encoder/main.go b/vendor/github.com/BurntSushi/toml/cmd/toml-test-encoder/main.go new file mode 100644 index 000000000..092cc6844 --- /dev/null +++ b/vendor/github.com/BurntSushi/toml/cmd/toml-test-encoder/main.go @@ -0,0 +1,131 @@ +// Command toml-test-encoder satisfies the toml-test interface for testing +// TOML encoders. Namely, it accepts JSON on stdin and outputs TOML on stdout. +package main + +import ( + "encoding/json" + "flag" + "log" + "os" + "path" + "strconv" + "time" + + "github.com/BurntSushi/toml" +) + +func init() { + log.SetFlags(0) + + flag.Usage = usage + flag.Parse() +} + +func usage() { + log.Printf("Usage: %s < json-file\n", path.Base(os.Args[0])) + flag.PrintDefaults() + + os.Exit(1) +} + +func main() { + if flag.NArg() != 0 { + flag.Usage() + } + + var tmp interface{} + if err := json.NewDecoder(os.Stdin).Decode(&tmp); err != nil { + log.Fatalf("Error decoding JSON: %s", err) + } + + tomlData := translate(tmp) + if err := toml.NewEncoder(os.Stdout).Encode(tomlData); err != nil { + log.Fatalf("Error encoding TOML: %s", err) + } +} + +func translate(typedJson interface{}) interface{} { + switch v := typedJson.(type) { + case map[string]interface{}: + if len(v) == 2 && in("type", v) && in("value", v) { + return untag(v) + } + m := make(map[string]interface{}, len(v)) + for k, v2 := range v { + m[k] = translate(v2) + } + return m + case []interface{}: + tabArray := make([]map[string]interface{}, len(v)) + for i := range v { + if m, ok := translate(v[i]).(map[string]interface{}); ok { + tabArray[i] = m + } else { + log.Fatalf("JSON arrays may only contain objects. This " + + "corresponds to only tables being allowed in " + + "TOML table arrays.") + } + } + return tabArray + } + log.Fatalf("Unrecognized JSON format '%T'.", typedJson) + panic("unreachable") +} + +func untag(typed map[string]interface{}) interface{} { + t := typed["type"].(string) + v := typed["value"] + switch t { + case "string": + return v.(string) + case "integer": + v := v.(string) + n, err := strconv.Atoi(v) + if err != nil { + log.Fatalf("Could not parse '%s' as integer: %s", v, err) + } + return n + case "float": + v := v.(string) + f, err := strconv.ParseFloat(v, 64) + if err != nil { + log.Fatalf("Could not parse '%s' as float64: %s", v, err) + } + return f + case "datetime": + v := v.(string) + t, err := time.Parse("2006-01-02T15:04:05Z", v) + if err != nil { + log.Fatalf("Could not parse '%s' as a datetime: %s", v, err) + } + return t + case "bool": + v := v.(string) + switch v { + case "true": + return true + case "false": + return false + } + log.Fatalf("Could not parse '%s' as a boolean.", v) + case "array": + v := v.([]interface{}) + array := make([]interface{}, len(v)) + for i := range v { + if m, ok := v[i].(map[string]interface{}); ok { + array[i] = untag(m) + } else { + log.Fatalf("Arrays may only contain other arrays or "+ + "primitive values, but found a '%T'.", m) + } + } + return array + } + log.Fatalf("Unrecognized tag type '%s'.", t) + panic("unreachable") +} + +func in(key string, m map[string]interface{}) bool { + _, ok := m[key] + return ok +} diff --git a/vendor/github.com/BurntSushi/toml/cmd/tomlv/COPYING b/vendor/github.com/BurntSushi/toml/cmd/tomlv/COPYING new file mode 100644 index 000000000..5a8e33254 --- /dev/null +++ b/vendor/github.com/BurntSushi/toml/cmd/tomlv/COPYING @@ -0,0 +1,14 @@ + DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE + Version 2, December 2004 + + Copyright (C) 2004 Sam Hocevar + + Everyone is permitted to copy and distribute verbatim or modified + copies of this license document, and changing it is allowed as long + as the name is changed. + + DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. You just DO WHAT THE FUCK YOU WANT TO. + diff --git a/vendor/github.com/BurntSushi/toml/cmd/tomlv/README.md b/vendor/github.com/BurntSushi/toml/cmd/tomlv/README.md new file mode 100644 index 000000000..5df0dc32b --- /dev/null +++ b/vendor/github.com/BurntSushi/toml/cmd/tomlv/README.md @@ -0,0 +1,22 @@ +# TOML Validator + +If Go is installed, it's simple to try it out: + +```bash +go get github.com/BurntSushi/toml/cmd/tomlv +tomlv some-toml-file.toml +``` + +You can see the types of every key in a TOML file with: + +```bash +tomlv -types some-toml-file.toml +``` + +At the moment, only one error message is reported at a time. Error messages +include line numbers. No output means that the files given are valid TOML, or +there is a bug in `tomlv`. + +Compatible with TOML version +[v0.1.0](https://github.com/mojombo/toml/blob/master/versions/toml-v0.1.0.md) + diff --git a/vendor/github.com/BurntSushi/toml/cmd/tomlv/main.go b/vendor/github.com/BurntSushi/toml/cmd/tomlv/main.go new file mode 100644 index 000000000..c7d689a7e --- /dev/null +++ b/vendor/github.com/BurntSushi/toml/cmd/tomlv/main.go @@ -0,0 +1,61 @@ +// Command tomlv validates TOML documents and prints each key's type. +package main + +import ( + "flag" + "fmt" + "log" + "os" + "path" + "strings" + "text/tabwriter" + + "github.com/BurntSushi/toml" +) + +var ( + flagTypes = false +) + +func init() { + log.SetFlags(0) + + flag.BoolVar(&flagTypes, "types", flagTypes, + "When set, the types of every defined key will be shown.") + + flag.Usage = usage + flag.Parse() +} + +func usage() { + log.Printf("Usage: %s toml-file [ toml-file ... ]\n", + path.Base(os.Args[0])) + flag.PrintDefaults() + + os.Exit(1) +} + +func main() { + if flag.NArg() < 1 { + flag.Usage() + } + for _, f := range flag.Args() { + var tmp interface{} + md, err := toml.DecodeFile(f, &tmp) + if err != nil { + log.Fatalf("Error in '%s': %s", f, err) + } + if flagTypes { + printTypes(md) + } + } +} + +func printTypes(md toml.MetaData) { + tabw := tabwriter.NewWriter(os.Stdout, 0, 0, 2, ' ', 0) + for _, key := range md.Keys() { + fmt.Fprintf(tabw, "%s%s\t%s\n", + strings.Repeat(" ", len(key)-1), key, md.Type(key...)) + } + tabw.Flush() +} diff --git a/vendor/github.com/BurntSushi/toml/decode_test.go b/vendor/github.com/BurntSushi/toml/decode_test.go new file mode 100644 index 000000000..d746527a1 --- /dev/null +++ b/vendor/github.com/BurntSushi/toml/decode_test.go @@ -0,0 +1,1278 @@ +package toml + +import ( + "fmt" + "log" + "math" + "reflect" + "strings" + "testing" + "time" +) + +func TestDecodeSimple(t *testing.T) { + var testSimple = ` +age = 250 +andrew = "gallant" +kait = "brady" +now = 1987-07-05T05:45:00Z +yesOrNo = true +pi = 3.14 +colors = [ + ["red", "green", "blue"], + ["cyan", "magenta", "yellow", "black"], +] + +[My.Cats] +plato = "cat 1" +cauchy = "cat 2" +` + + type cats struct { + Plato string + Cauchy string + } + type simple struct { + Age int + Colors [][]string + Pi float64 + YesOrNo bool + Now time.Time + Andrew string + Kait string + My map[string]cats + } + + var val simple + _, err := Decode(testSimple, &val) + if err != nil { + t.Fatal(err) + } + + now, err := time.Parse("2006-01-02T15:04:05", "1987-07-05T05:45:00") + if err != nil { + panic(err) + } + var answer = simple{ + Age: 250, + Andrew: "gallant", + Kait: "brady", + Now: now, + YesOrNo: true, + Pi: 3.14, + Colors: [][]string{ + {"red", "green", "blue"}, + {"cyan", "magenta", "yellow", "black"}, + }, + My: map[string]cats{ + "Cats": {Plato: "cat 1", Cauchy: "cat 2"}, + }, + } + if !reflect.DeepEqual(val, answer) { + t.Fatalf("Expected\n-----\n%#v\n-----\nbut got\n-----\n%#v\n", + answer, val) + } +} + +func TestDecodeEmbedded(t *testing.T) { + type Dog struct{ Name string } + type Age int + + tests := map[string]struct { + input string + decodeInto interface{} + wantDecoded interface{} + }{ + "embedded struct": { + input: `Name = "milton"`, + decodeInto: &struct{ Dog }{}, + wantDecoded: &struct{ Dog }{Dog{"milton"}}, + }, + "embedded non-nil pointer to struct": { + input: `Name = "milton"`, + decodeInto: &struct{ *Dog }{}, + wantDecoded: &struct{ *Dog }{&Dog{"milton"}}, + }, + "embedded nil pointer to struct": { + input: ``, + decodeInto: &struct{ *Dog }{}, + wantDecoded: &struct{ *Dog }{nil}, + }, + "embedded int": { + input: `Age = -5`, + decodeInto: &struct{ Age }{}, + wantDecoded: &struct{ Age }{-5}, + }, + } + + for label, test := range tests { + _, err := Decode(test.input, test.decodeInto) + if err != nil { + t.Fatal(err) + } + if !reflect.DeepEqual(test.wantDecoded, test.decodeInto) { + t.Errorf("%s: want decoded == %+v, got %+v", + label, test.wantDecoded, test.decodeInto) + } + } +} + +func TestDecodeIgnoredFields(t *testing.T) { + type simple struct { + Number int `toml:"-"` + } + const input = ` +Number = 123 +- = 234 +` + var s simple + if _, err := Decode(input, &s); err != nil { + t.Fatal(err) + } + if s.Number != 0 { + t.Errorf("got: %d; want 0", s.Number) + } +} + +func TestTableArrays(t *testing.T) { + var tomlTableArrays = ` +[[albums]] +name = "Born to Run" + + [[albums.songs]] + name = "Jungleland" + + [[albums.songs]] + name = "Meeting Across the River" + +[[albums]] +name = "Born in the USA" + + [[albums.songs]] + name = "Glory Days" + + [[albums.songs]] + name = "Dancing in the Dark" +` + + type Song struct { + Name string + } + + type Album struct { + Name string + Songs []Song + } + + type Music struct { + Albums []Album + } + + expected := Music{[]Album{ + {"Born to Run", []Song{{"Jungleland"}, {"Meeting Across the River"}}}, + {"Born in the USA", []Song{{"Glory Days"}, {"Dancing in the Dark"}}}, + }} + var got Music + if _, err := Decode(tomlTableArrays, &got); err != nil { + t.Fatal(err) + } + if !reflect.DeepEqual(expected, got) { + t.Fatalf("\n%#v\n!=\n%#v\n", expected, got) + } +} + +func TestTableNesting(t *testing.T) { + for _, tt := range []struct { + t string + want []string + }{ + {"[a.b.c]", []string{"a", "b", "c"}}, + {`[a."b.c"]`, []string{"a", "b.c"}}, + {`[a.'b.c']`, []string{"a", "b.c"}}, + {`[a.' b ']`, []string{"a", " b "}}, + {"[ d.e.f ]", []string{"d", "e", "f"}}, + {"[ g . h . i ]", []string{"g", "h", "i"}}, + {`[ j . "ʞ" . 'l' ]`, []string{"j", "ʞ", "l"}}, + } { + var m map[string]interface{} + if _, err := Decode(tt.t, &m); err != nil { + t.Errorf("Decode(%q): got error: %s", tt.t, err) + continue + } + if keys := extractNestedKeys(m); !reflect.DeepEqual(keys, tt.want) { + t.Errorf("Decode(%q): got nested keys %#v; want %#v", + tt.t, keys, tt.want) + } + } +} + +func extractNestedKeys(v map[string]interface{}) []string { + var result []string + for { + if len(v) != 1 { + return result + } + for k, m := range v { + result = append(result, k) + var ok bool + v, ok = m.(map[string]interface{}) + if !ok { + return result + } + } + + } +} + +// Case insensitive matching tests. +// A bit more comprehensive than needed given the current implementation, +// but implementations change. +// Probably still missing demonstrations of some ugly corner cases regarding +// case insensitive matching and multiple fields. +func TestCase(t *testing.T) { + var caseToml = ` +tOpString = "string" +tOpInt = 1 +tOpFloat = 1.1 +tOpBool = true +tOpdate = 2006-01-02T15:04:05Z +tOparray = [ "array" ] +Match = "i should be in Match only" +MatcH = "i should be in MatcH only" +once = "just once" +[nEst.eD] +nEstedString = "another string" +` + + type InsensitiveEd struct { + NestedString string + } + + type InsensitiveNest struct { + Ed InsensitiveEd + } + + type Insensitive struct { + TopString string + TopInt int + TopFloat float64 + TopBool bool + TopDate time.Time + TopArray []string + Match string + MatcH string + Once string + OncE string + Nest InsensitiveNest + } + + tme, err := time.Parse(time.RFC3339, time.RFC3339[:len(time.RFC3339)-5]) + if err != nil { + panic(err) + } + expected := Insensitive{ + TopString: "string", + TopInt: 1, + TopFloat: 1.1, + TopBool: true, + TopDate: tme, + TopArray: []string{"array"}, + MatcH: "i should be in MatcH only", + Match: "i should be in Match only", + Once: "just once", + OncE: "", + Nest: InsensitiveNest{ + Ed: InsensitiveEd{NestedString: "another string"}, + }, + } + var got Insensitive + if _, err := Decode(caseToml, &got); err != nil { + t.Fatal(err) + } + if !reflect.DeepEqual(expected, got) { + t.Fatalf("\n%#v\n!=\n%#v\n", expected, got) + } +} + +func TestPointers(t *testing.T) { + type Object struct { + Type string + Description string + } + + type Dict struct { + NamedObject map[string]*Object + BaseObject *Object + Strptr *string + Strptrs []*string + } + s1, s2, s3 := "blah", "abc", "def" + expected := &Dict{ + Strptr: &s1, + Strptrs: []*string{&s2, &s3}, + NamedObject: map[string]*Object{ + "foo": {"FOO", "fooooo!!!"}, + "bar": {"BAR", "ba-ba-ba-ba-barrrr!!!"}, + }, + BaseObject: &Object{"BASE", "da base"}, + } + + ex1 := ` +Strptr = "blah" +Strptrs = ["abc", "def"] + +[NamedObject.foo] +Type = "FOO" +Description = "fooooo!!!" + +[NamedObject.bar] +Type = "BAR" +Description = "ba-ba-ba-ba-barrrr!!!" + +[BaseObject] +Type = "BASE" +Description = "da base" +` + dict := new(Dict) + _, err := Decode(ex1, dict) + if err != nil { + t.Errorf("Decode error: %v", err) + } + if !reflect.DeepEqual(expected, dict) { + t.Fatalf("\n%#v\n!=\n%#v\n", expected, dict) + } +} + +func TestDecodeDatetime(t *testing.T) { + const noTimestamp = "2006-01-02T15:04:05" + for _, tt := range []struct { + s string + t string + format string + }{ + {"1979-05-27T07:32:00Z", "1979-05-27T07:32:00Z", time.RFC3339}, + {"1979-05-27T00:32:00-07:00", "1979-05-27T00:32:00-07:00", time.RFC3339}, + { + "1979-05-27T00:32:00.999999-07:00", + "1979-05-27T00:32:00.999999-07:00", + time.RFC3339, + }, + {"1979-05-27T07:32:00", "1979-05-27T07:32:00", noTimestamp}, + { + "1979-05-27T00:32:00.999999", + "1979-05-27T00:32:00.999999", + noTimestamp, + }, + {"1979-05-27", "1979-05-27T00:00:00", noTimestamp}, + } { + var x struct{ D time.Time } + input := "d = " + tt.s + if _, err := Decode(input, &x); err != nil { + t.Errorf("Decode(%q): got error: %s", input, err) + continue + } + want, err := time.ParseInLocation(tt.format, tt.t, time.Local) + if err != nil { + panic(err) + } + if !x.D.Equal(want) { + t.Errorf("Decode(%q): got %s; want %s", input, x.D, want) + } + } +} + +func TestDecodeBadDatetime(t *testing.T) { + var x struct{ T time.Time } + for _, s := range []string{ + "123", + "2006-01-50T00:00:00Z", + "2006-01-30T00:00", + "2006-01-30T", + } { + input := "T = " + s + if _, err := Decode(input, &x); err == nil { + t.Errorf("Expected invalid DateTime error for %q", s) + } + } +} + +func TestDecodeMultilineStrings(t *testing.T) { + var x struct { + S string + } + const s0 = `s = """ +a b \n c +d e f +"""` + if _, err := Decode(s0, &x); err != nil { + t.Fatal(err) + } + if want := "a b \n c\nd e f\n"; x.S != want { + t.Errorf("got: %q; want: %q", x.S, want) + } + const s1 = `s = """a b c\ +"""` + if _, err := Decode(s1, &x); err != nil { + t.Fatal(err) + } + if want := "a b c"; x.S != want { + t.Errorf("got: %q; want: %q", x.S, want) + } +} + +type sphere struct { + Center [3]float64 + Radius float64 +} + +func TestDecodeSimpleArray(t *testing.T) { + var s1 sphere + if _, err := Decode(`center = [0.0, 1.5, 0.0]`, &s1); err != nil { + t.Fatal(err) + } +} + +func TestDecodeArrayWrongSize(t *testing.T) { + var s1 sphere + if _, err := Decode(`center = [0.1, 2.3]`, &s1); err == nil { + t.Fatal("Expected array type mismatch error") + } +} + +func TestDecodeLargeIntoSmallInt(t *testing.T) { + type table struct { + Value int8 + } + var tab table + if _, err := Decode(`value = 500`, &tab); err == nil { + t.Fatal("Expected integer out-of-bounds error.") + } +} + +func TestDecodeSizedInts(t *testing.T) { + type table struct { + U8 uint8 + U16 uint16 + U32 uint32 + U64 uint64 + U uint + I8 int8 + I16 int16 + I32 int32 + I64 int64 + I int + } + answer := table{1, 1, 1, 1, 1, -1, -1, -1, -1, -1} + toml := ` + u8 = 1 + u16 = 1 + u32 = 1 + u64 = 1 + u = 1 + i8 = -1 + i16 = -1 + i32 = -1 + i64 = -1 + i = -1 + ` + var tab table + if _, err := Decode(toml, &tab); err != nil { + t.Fatal(err.Error()) + } + if answer != tab { + t.Fatalf("Expected %#v but got %#v", answer, tab) + } +} + +func TestDecodeInts(t *testing.T) { + for _, tt := range []struct { + s string + want int64 + }{ + {"0", 0}, + {"+99", 99}, + {"-10", -10}, + {"1_234_567", 1234567}, + {"1_2_3_4", 1234}, + {"-9_223_372_036_854_775_808", math.MinInt64}, + {"9_223_372_036_854_775_807", math.MaxInt64}, + } { + var x struct{ N int64 } + input := "n = " + tt.s + if _, err := Decode(input, &x); err != nil { + t.Errorf("Decode(%q): got error: %s", input, err) + continue + } + if x.N != tt.want { + t.Errorf("Decode(%q): got %d; want %d", input, x.N, tt.want) + } + } +} + +func TestDecodeFloats(t *testing.T) { + for _, tt := range []struct { + s string + want float64 + }{ + {"+1.0", 1}, + {"3.1415", 3.1415}, + {"-0.01", -0.01}, + {"5e+22", 5e22}, + {"1e6", 1e6}, + {"-2E-2", -2e-2}, + {"6.626e-34", 6.626e-34}, + {"9_224_617.445_991_228_313", 9224617.445991228313}, + {"9_876.54_32e1_0", 9876.5432e10}, + } { + var x struct{ N float64 } + input := "n = " + tt.s + if _, err := Decode(input, &x); err != nil { + t.Errorf("Decode(%q): got error: %s", input, err) + continue + } + if x.N != tt.want { + t.Errorf("Decode(%q): got %d; want %d", input, x.N, tt.want) + } + } +} + +func TestDecodeMalformedNumbers(t *testing.T) { + for _, tt := range []struct { + s string + want string + }{ + {"++99", "Expected a digit"}, + {"0..1", "must be followed by one or more digits"}, + {"0.1.2", "Invalid float value"}, + {"1e2.3", "Invalid float value"}, + {"1e2e3", "Invalid float value"}, + {"_123", "Expected value"}, + {"123_", "surrounded by digits"}, + {"1._23", "surrounded by digits"}, + {"1e__23", "surrounded by digits"}, + {"123.", "must be followed by one or more digits"}, + {"1.e2", "must be followed by one or more digits"}, + } { + var x struct{ N interface{} } + input := "n = " + tt.s + _, err := Decode(input, &x) + if err == nil { + t.Errorf("Decode(%q): got nil, want error containing %q", + input, tt.want) + continue + } + if !strings.Contains(err.Error(), tt.want) { + t.Errorf("Decode(%q): got %q, want error containing %q", + input, err, tt.want) + } + } +} + +func TestDecodeBadValues(t *testing.T) { + for _, tt := range []struct { + v interface{} + want string + }{ + {3, "non-pointer type"}, + {(*int)(nil), "nil"}, + } { + _, err := Decode(`x = 3`, tt.v) + if err == nil { + t.Errorf("Decode(%v): got nil; want error containing %q", + tt.v, tt.want) + continue + } + if !strings.Contains(err.Error(), tt.want) { + t.Errorf("Decode(%v): got %q; want error containing %q", + tt.v, err, tt.want) + } + } +} + +func TestUnmarshaler(t *testing.T) { + + var tomlBlob = ` +[dishes.hamboogie] +name = "Hamboogie with fries" +price = 10.99 + +[[dishes.hamboogie.ingredients]] +name = "Bread Bun" + +[[dishes.hamboogie.ingredients]] +name = "Lettuce" + +[[dishes.hamboogie.ingredients]] +name = "Real Beef Patty" + +[[dishes.hamboogie.ingredients]] +name = "Tomato" + +[dishes.eggsalad] +name = "Egg Salad with rice" +price = 3.99 + +[[dishes.eggsalad.ingredients]] +name = "Egg" + +[[dishes.eggsalad.ingredients]] +name = "Mayo" + +[[dishes.eggsalad.ingredients]] +name = "Rice" +` + m := &menu{} + if _, err := Decode(tomlBlob, m); err != nil { + t.Fatal(err) + } + + if len(m.Dishes) != 2 { + t.Log("two dishes should be loaded with UnmarshalTOML()") + t.Errorf("expected %d but got %d", 2, len(m.Dishes)) + } + + eggSalad := m.Dishes["eggsalad"] + if _, ok := interface{}(eggSalad).(dish); !ok { + t.Errorf("expected a dish") + } + + if eggSalad.Name != "Egg Salad with rice" { + t.Errorf("expected the dish to be named 'Egg Salad with rice'") + } + + if len(eggSalad.Ingredients) != 3 { + t.Log("dish should be loaded with UnmarshalTOML()") + t.Errorf("expected %d but got %d", 3, len(eggSalad.Ingredients)) + } + + found := false + for _, i := range eggSalad.Ingredients { + if i.Name == "Rice" { + found = true + break + } + } + if !found { + t.Error("Rice was not loaded in UnmarshalTOML()") + } + + // test on a value - must be passed as * + o := menu{} + if _, err := Decode(tomlBlob, &o); err != nil { + t.Fatal(err) + } + +} + +type menu struct { + Dishes map[string]dish +} + +func (m *menu) UnmarshalTOML(p interface{}) error { + m.Dishes = make(map[string]dish) + data, _ := p.(map[string]interface{}) + dishes := data["dishes"].(map[string]interface{}) + for n, v := range dishes { + if d, ok := v.(map[string]interface{}); ok { + nd := dish{} + nd.UnmarshalTOML(d) + m.Dishes[n] = nd + } else { + return fmt.Errorf("not a dish") + } + } + return nil +} + +type dish struct { + Name string + Price float32 + Ingredients []ingredient +} + +func (d *dish) UnmarshalTOML(p interface{}) error { + data, _ := p.(map[string]interface{}) + d.Name, _ = data["name"].(string) + d.Price, _ = data["price"].(float32) + ingredients, _ := data["ingredients"].([]map[string]interface{}) + for _, e := range ingredients { + n, _ := interface{}(e).(map[string]interface{}) + name, _ := n["name"].(string) + i := ingredient{name} + d.Ingredients = append(d.Ingredients, i) + } + return nil +} + +type ingredient struct { + Name string +} + +func TestDecodeSlices(t *testing.T) { + type T struct { + S []string + } + for i, tt := range []struct { + v T + input string + want T + }{ + {T{}, "", T{}}, + {T{[]string{}}, "", T{[]string{}}}, + {T{[]string{"a", "b"}}, "", T{[]string{"a", "b"}}}, + {T{}, "S = []", T{[]string{}}}, + {T{[]string{}}, "S = []", T{[]string{}}}, + {T{[]string{"a", "b"}}, "S = []", T{[]string{}}}, + {T{}, `S = ["x"]`, T{[]string{"x"}}}, + {T{[]string{}}, `S = ["x"]`, T{[]string{"x"}}}, + {T{[]string{"a", "b"}}, `S = ["x"]`, T{[]string{"x"}}}, + } { + if _, err := Decode(tt.input, &tt.v); err != nil { + t.Errorf("[%d] %s", i, err) + continue + } + if !reflect.DeepEqual(tt.v, tt.want) { + t.Errorf("[%d] got %#v; want %#v", i, tt.v, tt.want) + } + } +} + +func TestDecodePrimitive(t *testing.T) { + type S struct { + P Primitive + } + type T struct { + S []int + } + slicep := func(s []int) *[]int { return &s } + arrayp := func(a [2]int) *[2]int { return &a } + mapp := func(m map[string]int) *map[string]int { return &m } + for i, tt := range []struct { + v interface{} + input string + want interface{} + }{ + // slices + {slicep(nil), "", slicep(nil)}, + {slicep([]int{}), "", slicep([]int{})}, + {slicep([]int{1, 2, 3}), "", slicep([]int{1, 2, 3})}, + {slicep(nil), "P = [1,2]", slicep([]int{1, 2})}, + {slicep([]int{}), "P = [1,2]", slicep([]int{1, 2})}, + {slicep([]int{1, 2, 3}), "P = [1,2]", slicep([]int{1, 2})}, + + // arrays + {arrayp([2]int{2, 3}), "", arrayp([2]int{2, 3})}, + {arrayp([2]int{2, 3}), "P = [3,4]", arrayp([2]int{3, 4})}, + + // maps + {mapp(nil), "", mapp(nil)}, + {mapp(map[string]int{}), "", mapp(map[string]int{})}, + {mapp(map[string]int{"a": 1}), "", mapp(map[string]int{"a": 1})}, + {mapp(nil), "[P]\na = 2", mapp(map[string]int{"a": 2})}, + {mapp(map[string]int{}), "[P]\na = 2", mapp(map[string]int{"a": 2})}, + {mapp(map[string]int{"a": 1, "b": 3}), "[P]\na = 2", mapp(map[string]int{"a": 2, "b": 3})}, + + // structs + {&T{nil}, "[P]", &T{nil}}, + {&T{[]int{}}, "[P]", &T{[]int{}}}, + {&T{[]int{1, 2, 3}}, "[P]", &T{[]int{1, 2, 3}}}, + {&T{nil}, "[P]\nS = [1,2]", &T{[]int{1, 2}}}, + {&T{[]int{}}, "[P]\nS = [1,2]", &T{[]int{1, 2}}}, + {&T{[]int{1, 2, 3}}, "[P]\nS = [1,2]", &T{[]int{1, 2}}}, + } { + var s S + md, err := Decode(tt.input, &s) + if err != nil { + t.Errorf("[%d] Decode error: %s", i, err) + continue + } + if err := md.PrimitiveDecode(s.P, tt.v); err != nil { + t.Errorf("[%d] PrimitiveDecode error: %s", i, err) + continue + } + if !reflect.DeepEqual(tt.v, tt.want) { + t.Errorf("[%d] got %#v; want %#v", i, tt.v, tt.want) + } + } +} + +func ExampleMetaData_PrimitiveDecode() { + var md MetaData + var err error + + var tomlBlob = ` +ranking = ["Springsteen", "J Geils"] + +[bands.Springsteen] +started = 1973 +albums = ["Greetings", "WIESS", "Born to Run", "Darkness"] + +[bands."J Geils"] +started = 1970 +albums = ["The J. Geils Band", "Full House", "Blow Your Face Out"] +` + + type band struct { + Started int + Albums []string + } + type classics struct { + Ranking []string + Bands map[string]Primitive + } + + // Do the initial decode. Reflection is delayed on Primitive values. + var music classics + if md, err = Decode(tomlBlob, &music); err != nil { + log.Fatal(err) + } + + // MetaData still includes information on Primitive values. + fmt.Printf("Is `bands.Springsteen` defined? %v\n", + md.IsDefined("bands", "Springsteen")) + + // Decode primitive data into Go values. + for _, artist := range music.Ranking { + // A band is a primitive value, so we need to decode it to get a + // real `band` value. + primValue := music.Bands[artist] + + var aBand band + if err = md.PrimitiveDecode(primValue, &aBand); err != nil { + log.Fatal(err) + } + fmt.Printf("%s started in %d.\n", artist, aBand.Started) + } + // Check to see if there were any fields left undecoded. + // Note that this won't be empty before decoding the Primitive value! + fmt.Printf("Undecoded: %q\n", md.Undecoded()) + + // Output: + // Is `bands.Springsteen` defined? true + // Springsteen started in 1973. + // J Geils started in 1970. + // Undecoded: [] +} + +func ExampleDecode() { + var tomlBlob = ` +# Some comments. +[alpha] +ip = "10.0.0.1" + + [alpha.config] + Ports = [ 8001, 8002 ] + Location = "Toronto" + Created = 1987-07-05T05:45:00Z + +[beta] +ip = "10.0.0.2" + + [beta.config] + Ports = [ 9001, 9002 ] + Location = "New Jersey" + Created = 1887-01-05T05:55:00Z +` + + type serverConfig struct { + Ports []int + Location string + Created time.Time + } + + type server struct { + IP string `toml:"ip,omitempty"` + Config serverConfig `toml:"config"` + } + + type servers map[string]server + + var config servers + if _, err := Decode(tomlBlob, &config); err != nil { + log.Fatal(err) + } + + for _, name := range []string{"alpha", "beta"} { + s := config[name] + fmt.Printf("Server: %s (ip: %s) in %s created on %s\n", + name, s.IP, s.Config.Location, + s.Config.Created.Format("2006-01-02")) + fmt.Printf("Ports: %v\n", s.Config.Ports) + } + + // Output: + // Server: alpha (ip: 10.0.0.1) in Toronto created on 1987-07-05 + // Ports: [8001 8002] + // Server: beta (ip: 10.0.0.2) in New Jersey created on 1887-01-05 + // Ports: [9001 9002] +} + +type duration struct { + time.Duration +} + +func (d *duration) UnmarshalText(text []byte) error { + var err error + d.Duration, err = time.ParseDuration(string(text)) + return err +} + +// Example Unmarshaler shows how to decode TOML strings into your own +// custom data type. +func Example_unmarshaler() { + blob := ` +[[song]] +name = "Thunder Road" +duration = "4m49s" + +[[song]] +name = "Stairway to Heaven" +duration = "8m03s" +` + type song struct { + Name string + Duration duration + } + type songs struct { + Song []song + } + var favorites songs + if _, err := Decode(blob, &favorites); err != nil { + log.Fatal(err) + } + + // Code to implement the TextUnmarshaler interface for `duration`: + // + // type duration struct { + // time.Duration + // } + // + // func (d *duration) UnmarshalText(text []byte) error { + // var err error + // d.Duration, err = time.ParseDuration(string(text)) + // return err + // } + + for _, s := range favorites.Song { + fmt.Printf("%s (%s)\n", s.Name, s.Duration) + } + // Output: + // Thunder Road (4m49s) + // Stairway to Heaven (8m3s) +} + +// Example StrictDecoding shows how to detect whether there are keys in the +// TOML document that weren't decoded into the value given. This is useful +// for returning an error to the user if they've included extraneous fields +// in their configuration. +func Example_strictDecoding() { + var blob = ` +key1 = "value1" +key2 = "value2" +key3 = "value3" +` + type config struct { + Key1 string + Key3 string + } + + var conf config + md, err := Decode(blob, &conf) + if err != nil { + log.Fatal(err) + } + fmt.Printf("Undecoded keys: %q\n", md.Undecoded()) + // Output: + // Undecoded keys: ["key2"] +} + +// Example UnmarshalTOML shows how to implement a struct type that knows how to +// unmarshal itself. The struct must take full responsibility for mapping the +// values passed into the struct. The method may be used with interfaces in a +// struct in cases where the actual type is not known until the data is +// examined. +func Example_unmarshalTOML() { + + var blob = ` +[[parts]] +type = "valve" +id = "valve-1" +size = 1.2 +rating = 4 + +[[parts]] +type = "valve" +id = "valve-2" +size = 2.1 +rating = 5 + +[[parts]] +type = "pipe" +id = "pipe-1" +length = 2.1 +diameter = 12 + +[[parts]] +type = "cable" +id = "cable-1" +length = 12 +rating = 3.1 +` + o := &order{} + err := Unmarshal([]byte(blob), o) + if err != nil { + log.Fatal(err) + } + + fmt.Println(len(o.parts)) + + for _, part := range o.parts { + fmt.Println(part.Name()) + } + + // Code to implement UmarshalJSON. + + // type order struct { + // // NOTE `order.parts` is a private slice of type `part` which is an + // // interface and may only be loaded from toml using the + // // UnmarshalTOML() method of the Umarshaler interface. + // parts parts + // } + + // func (o *order) UnmarshalTOML(data interface{}) error { + + // // NOTE the example below contains detailed type casting to show how + // // the 'data' is retrieved. In operational use, a type cast wrapper + // // may be prefered e.g. + // // + // // func AsMap(v interface{}) (map[string]interface{}, error) { + // // return v.(map[string]interface{}) + // // } + // // + // // resulting in: + // // d, _ := AsMap(data) + // // + + // d, _ := data.(map[string]interface{}) + // parts, _ := d["parts"].([]map[string]interface{}) + + // for _, p := range parts { + + // typ, _ := p["type"].(string) + // id, _ := p["id"].(string) + + // // detect the type of part and handle each case + // switch p["type"] { + // case "valve": + + // size := float32(p["size"].(float64)) + // rating := int(p["rating"].(int64)) + + // valve := &valve{ + // Type: typ, + // ID: id, + // Size: size, + // Rating: rating, + // } + + // o.parts = append(o.parts, valve) + + // case "pipe": + + // length := float32(p["length"].(float64)) + // diameter := int(p["diameter"].(int64)) + + // pipe := &pipe{ + // Type: typ, + // ID: id, + // Length: length, + // Diameter: diameter, + // } + + // o.parts = append(o.parts, pipe) + + // case "cable": + + // length := int(p["length"].(int64)) + // rating := float32(p["rating"].(float64)) + + // cable := &cable{ + // Type: typ, + // ID: id, + // Length: length, + // Rating: rating, + // } + + // o.parts = append(o.parts, cable) + + // } + // } + + // return nil + // } + + // type parts []part + + // type part interface { + // Name() string + // } + + // type valve struct { + // Type string + // ID string + // Size float32 + // Rating int + // } + + // func (v *valve) Name() string { + // return fmt.Sprintf("VALVE: %s", v.ID) + // } + + // type pipe struct { + // Type string + // ID string + // Length float32 + // Diameter int + // } + + // func (p *pipe) Name() string { + // return fmt.Sprintf("PIPE: %s", p.ID) + // } + + // type cable struct { + // Type string + // ID string + // Length int + // Rating float32 + // } + + // func (c *cable) Name() string { + // return fmt.Sprintf("CABLE: %s", c.ID) + // } + + // Output: + // 4 + // VALVE: valve-1 + // VALVE: valve-2 + // PIPE: pipe-1 + // CABLE: cable-1 + +} + +type order struct { + // NOTE `order.parts` is a private slice of type `part` which is an + // interface and may only be loaded from toml using the UnmarshalTOML() + // method of the Umarshaler interface. + parts parts +} + +func (o *order) UnmarshalTOML(data interface{}) error { + + // NOTE the example below contains detailed type casting to show how + // the 'data' is retrieved. In operational use, a type cast wrapper + // may be prefered e.g. + // + // func AsMap(v interface{}) (map[string]interface{}, error) { + // return v.(map[string]interface{}) + // } + // + // resulting in: + // d, _ := AsMap(data) + // + + d, _ := data.(map[string]interface{}) + parts, _ := d["parts"].([]map[string]interface{}) + + for _, p := range parts { + + typ, _ := p["type"].(string) + id, _ := p["id"].(string) + + // detect the type of part and handle each case + switch p["type"] { + case "valve": + + size := float32(p["size"].(float64)) + rating := int(p["rating"].(int64)) + + valve := &valve{ + Type: typ, + ID: id, + Size: size, + Rating: rating, + } + + o.parts = append(o.parts, valve) + + case "pipe": + + length := float32(p["length"].(float64)) + diameter := int(p["diameter"].(int64)) + + pipe := &pipe{ + Type: typ, + ID: id, + Length: length, + Diameter: diameter, + } + + o.parts = append(o.parts, pipe) + + case "cable": + + length := int(p["length"].(int64)) + rating := float32(p["rating"].(float64)) + + cable := &cable{ + Type: typ, + ID: id, + Length: length, + Rating: rating, + } + + o.parts = append(o.parts, cable) + + } + } + + return nil +} + +type parts []part + +type part interface { + Name() string +} + +type valve struct { + Type string + ID string + Size float32 + Rating int +} + +func (v *valve) Name() string { + return fmt.Sprintf("VALVE: %s", v.ID) +} + +type pipe struct { + Type string + ID string + Length float32 + Diameter int +} + +func (p *pipe) Name() string { + return fmt.Sprintf("PIPE: %s", p.ID) +} + +type cable struct { + Type string + ID string + Length int + Rating float32 +} + +func (c *cable) Name() string { + return fmt.Sprintf("CABLE: %s", c.ID) +} diff --git a/vendor/github.com/BurntSushi/toml/encode_test.go b/vendor/github.com/BurntSushi/toml/encode_test.go new file mode 100644 index 000000000..673b7b009 --- /dev/null +++ b/vendor/github.com/BurntSushi/toml/encode_test.go @@ -0,0 +1,615 @@ +package toml + +import ( + "bytes" + "fmt" + "log" + "net" + "testing" + "time" +) + +func TestEncodeRoundTrip(t *testing.T) { + type Config struct { + Age int + Cats []string + Pi float64 + Perfection []int + DOB time.Time + Ipaddress net.IP + } + + var inputs = Config{ + 13, + []string{"one", "two", "three"}, + 3.145, + []int{11, 2, 3, 4}, + time.Now(), + net.ParseIP("192.168.59.254"), + } + + var firstBuffer bytes.Buffer + e := NewEncoder(&firstBuffer) + err := e.Encode(inputs) + if err != nil { + t.Fatal(err) + } + var outputs Config + if _, err := Decode(firstBuffer.String(), &outputs); err != nil { + t.Logf("Could not decode:\n-----\n%s\n-----\n", + firstBuffer.String()) + t.Fatal(err) + } + + // could test each value individually, but I'm lazy + var secondBuffer bytes.Buffer + e2 := NewEncoder(&secondBuffer) + err = e2.Encode(outputs) + if err != nil { + t.Fatal(err) + } + if firstBuffer.String() != secondBuffer.String() { + t.Error( + firstBuffer.String(), + "\n\n is not identical to\n\n", + secondBuffer.String()) + } +} + +// XXX(burntsushi) +// I think these tests probably should be removed. They are good, but they +// ought to be obsolete by toml-test. +func TestEncode(t *testing.T) { + type Embedded struct { + Int int `toml:"_int"` + } + type NonStruct int + + date := time.Date(2014, 5, 11, 20, 30, 40, 0, time.FixedZone("IST", 3600)) + dateStr := "2014-05-11T19:30:40Z" + + tests := map[string]struct { + input interface{} + wantOutput string + wantError error + }{ + "bool field": { + input: struct { + BoolTrue bool + BoolFalse bool + }{true, false}, + wantOutput: "BoolTrue = true\nBoolFalse = false\n", + }, + "int fields": { + input: struct { + Int int + Int8 int8 + Int16 int16 + Int32 int32 + Int64 int64 + }{1, 2, 3, 4, 5}, + wantOutput: "Int = 1\nInt8 = 2\nInt16 = 3\nInt32 = 4\nInt64 = 5\n", + }, + "uint fields": { + input: struct { + Uint uint + Uint8 uint8 + Uint16 uint16 + Uint32 uint32 + Uint64 uint64 + }{1, 2, 3, 4, 5}, + wantOutput: "Uint = 1\nUint8 = 2\nUint16 = 3\nUint32 = 4" + + "\nUint64 = 5\n", + }, + "float fields": { + input: struct { + Float32 float32 + Float64 float64 + }{1.5, 2.5}, + wantOutput: "Float32 = 1.5\nFloat64 = 2.5\n", + }, + "string field": { + input: struct{ String string }{"foo"}, + wantOutput: "String = \"foo\"\n", + }, + "string field and unexported field": { + input: struct { + String string + unexported int + }{"foo", 0}, + wantOutput: "String = \"foo\"\n", + }, + "datetime field in UTC": { + input: struct{ Date time.Time }{date}, + wantOutput: fmt.Sprintf("Date = %s\n", dateStr), + }, + "datetime field as primitive": { + // Using a map here to fail if isStructOrMap() returns true for + // time.Time. + input: map[string]interface{}{ + "Date": date, + "Int": 1, + }, + wantOutput: fmt.Sprintf("Date = %s\nInt = 1\n", dateStr), + }, + "array fields": { + input: struct { + IntArray0 [0]int + IntArray3 [3]int + }{[0]int{}, [3]int{1, 2, 3}}, + wantOutput: "IntArray0 = []\nIntArray3 = [1, 2, 3]\n", + }, + "slice fields": { + input: struct{ IntSliceNil, IntSlice0, IntSlice3 []int }{ + nil, []int{}, []int{1, 2, 3}, + }, + wantOutput: "IntSlice0 = []\nIntSlice3 = [1, 2, 3]\n", + }, + "datetime slices": { + input: struct{ DatetimeSlice []time.Time }{ + []time.Time{date, date}, + }, + wantOutput: fmt.Sprintf("DatetimeSlice = [%s, %s]\n", + dateStr, dateStr), + }, + "nested arrays and slices": { + input: struct { + SliceOfArrays [][2]int + ArrayOfSlices [2][]int + SliceOfArraysOfSlices [][2][]int + ArrayOfSlicesOfArrays [2][][2]int + SliceOfMixedArrays [][2]interface{} + ArrayOfMixedSlices [2][]interface{} + }{ + [][2]int{{1, 2}, {3, 4}}, + [2][]int{{1, 2}, {3, 4}}, + [][2][]int{ + { + {1, 2}, {3, 4}, + }, + { + {5, 6}, {7, 8}, + }, + }, + [2][][2]int{ + { + {1, 2}, {3, 4}, + }, + { + {5, 6}, {7, 8}, + }, + }, + [][2]interface{}{ + {1, 2}, {"a", "b"}, + }, + [2][]interface{}{ + {1, 2}, {"a", "b"}, + }, + }, + wantOutput: `SliceOfArrays = [[1, 2], [3, 4]] +ArrayOfSlices = [[1, 2], [3, 4]] +SliceOfArraysOfSlices = [[[1, 2], [3, 4]], [[5, 6], [7, 8]]] +ArrayOfSlicesOfArrays = [[[1, 2], [3, 4]], [[5, 6], [7, 8]]] +SliceOfMixedArrays = [[1, 2], ["a", "b"]] +ArrayOfMixedSlices = [[1, 2], ["a", "b"]] +`, + }, + "empty slice": { + input: struct{ Empty []interface{} }{[]interface{}{}}, + wantOutput: "Empty = []\n", + }, + "(error) slice with element type mismatch (string and integer)": { + input: struct{ Mixed []interface{} }{[]interface{}{1, "a"}}, + wantError: errArrayMixedElementTypes, + }, + "(error) slice with element type mismatch (integer and float)": { + input: struct{ Mixed []interface{} }{[]interface{}{1, 2.5}}, + wantError: errArrayMixedElementTypes, + }, + "slice with elems of differing Go types, same TOML types": { + input: struct { + MixedInts []interface{} + MixedFloats []interface{} + }{ + []interface{}{ + int(1), int8(2), int16(3), int32(4), int64(5), + uint(1), uint8(2), uint16(3), uint32(4), uint64(5), + }, + []interface{}{float32(1.5), float64(2.5)}, + }, + wantOutput: "MixedInts = [1, 2, 3, 4, 5, 1, 2, 3, 4, 5]\n" + + "MixedFloats = [1.5, 2.5]\n", + }, + "(error) slice w/ element type mismatch (one is nested array)": { + input: struct{ Mixed []interface{} }{ + []interface{}{1, []interface{}{2}}, + }, + wantError: errArrayMixedElementTypes, + }, + "(error) slice with 1 nil element": { + input: struct{ NilElement1 []interface{} }{[]interface{}{nil}}, + wantError: errArrayNilElement, + }, + "(error) slice with 1 nil element (and other non-nil elements)": { + input: struct{ NilElement []interface{} }{ + []interface{}{1, nil}, + }, + wantError: errArrayNilElement, + }, + "simple map": { + input: map[string]int{"a": 1, "b": 2}, + wantOutput: "a = 1\nb = 2\n", + }, + "map with interface{} value type": { + input: map[string]interface{}{"a": 1, "b": "c"}, + wantOutput: "a = 1\nb = \"c\"\n", + }, + "map with interface{} value type, some of which are structs": { + input: map[string]interface{}{ + "a": struct{ Int int }{2}, + "b": 1, + }, + wantOutput: "b = 1\n\n[a]\n Int = 2\n", + }, + "nested map": { + input: map[string]map[string]int{ + "a": {"b": 1}, + "c": {"d": 2}, + }, + wantOutput: "[a]\n b = 1\n\n[c]\n d = 2\n", + }, + "nested struct": { + input: struct{ Struct struct{ Int int } }{ + struct{ Int int }{1}, + }, + wantOutput: "[Struct]\n Int = 1\n", + }, + "nested struct and non-struct field": { + input: struct { + Struct struct{ Int int } + Bool bool + }{struct{ Int int }{1}, true}, + wantOutput: "Bool = true\n\n[Struct]\n Int = 1\n", + }, + "2 nested structs": { + input: struct{ Struct1, Struct2 struct{ Int int } }{ + struct{ Int int }{1}, struct{ Int int }{2}, + }, + wantOutput: "[Struct1]\n Int = 1\n\n[Struct2]\n Int = 2\n", + }, + "deeply nested structs": { + input: struct { + Struct1, Struct2 struct{ Struct3 *struct{ Int int } } + }{ + struct{ Struct3 *struct{ Int int } }{&struct{ Int int }{1}}, + struct{ Struct3 *struct{ Int int } }{nil}, + }, + wantOutput: "[Struct1]\n [Struct1.Struct3]\n Int = 1" + + "\n\n[Struct2]\n", + }, + "nested struct with nil struct elem": { + input: struct { + Struct struct{ Inner *struct{ Int int } } + }{ + struct{ Inner *struct{ Int int } }{nil}, + }, + wantOutput: "[Struct]\n", + }, + "nested struct with no fields": { + input: struct { + Struct struct{ Inner struct{} } + }{ + struct{ Inner struct{} }{struct{}{}}, + }, + wantOutput: "[Struct]\n [Struct.Inner]\n", + }, + "struct with tags": { + input: struct { + Struct struct { + Int int `toml:"_int"` + } `toml:"_struct"` + Bool bool `toml:"_bool"` + }{ + struct { + Int int `toml:"_int"` + }{1}, true, + }, + wantOutput: "_bool = true\n\n[_struct]\n _int = 1\n", + }, + "embedded struct": { + input: struct{ Embedded }{Embedded{1}}, + wantOutput: "_int = 1\n", + }, + "embedded *struct": { + input: struct{ *Embedded }{&Embedded{1}}, + wantOutput: "_int = 1\n", + }, + "nested embedded struct": { + input: struct { + Struct struct{ Embedded } `toml:"_struct"` + }{struct{ Embedded }{Embedded{1}}}, + wantOutput: "[_struct]\n _int = 1\n", + }, + "nested embedded *struct": { + input: struct { + Struct struct{ *Embedded } `toml:"_struct"` + }{struct{ *Embedded }{&Embedded{1}}}, + wantOutput: "[_struct]\n _int = 1\n", + }, + "embedded non-struct": { + input: struct{ NonStruct }{5}, + wantOutput: "NonStruct = 5\n", + }, + "array of tables": { + input: struct { + Structs []*struct{ Int int } `toml:"struct"` + }{ + []*struct{ Int int }{{1}, {3}}, + }, + wantOutput: "[[struct]]\n Int = 1\n\n[[struct]]\n Int = 3\n", + }, + "array of tables order": { + input: map[string]interface{}{ + "map": map[string]interface{}{ + "zero": 5, + "arr": []map[string]int{ + { + "friend": 5, + }, + }, + }, + }, + wantOutput: "[map]\n zero = 5\n\n [[map.arr]]\n friend = 5\n", + }, + "(error) top-level slice": { + input: []struct{ Int int }{{1}, {2}, {3}}, + wantError: errNoKey, + }, + "(error) slice of slice": { + input: struct { + Slices [][]struct{ Int int } + }{ + [][]struct{ Int int }{{{1}}, {{2}}, {{3}}}, + }, + wantError: errArrayNoTable, + }, + "(error) map no string key": { + input: map[int]string{1: ""}, + wantError: errNonString, + }, + "(error) empty key name": { + input: map[string]int{"": 1}, + wantError: errAnything, + }, + "(error) empty map name": { + input: map[string]interface{}{ + "": map[string]int{"v": 1}, + }, + wantError: errAnything, + }, + } + for label, test := range tests { + encodeExpected(t, label, test.input, test.wantOutput, test.wantError) + } +} + +func TestEncodeNestedTableArrays(t *testing.T) { + type song struct { + Name string `toml:"name"` + } + type album struct { + Name string `toml:"name"` + Songs []song `toml:"songs"` + } + type springsteen struct { + Albums []album `toml:"albums"` + } + value := springsteen{ + []album{ + {"Born to Run", + []song{{"Jungleland"}, {"Meeting Across the River"}}}, + {"Born in the USA", + []song{{"Glory Days"}, {"Dancing in the Dark"}}}, + }, + } + expected := `[[albums]] + name = "Born to Run" + + [[albums.songs]] + name = "Jungleland" + + [[albums.songs]] + name = "Meeting Across the River" + +[[albums]] + name = "Born in the USA" + + [[albums.songs]] + name = "Glory Days" + + [[albums.songs]] + name = "Dancing in the Dark" +` + encodeExpected(t, "nested table arrays", value, expected, nil) +} + +func TestEncodeArrayHashWithNormalHashOrder(t *testing.T) { + type Alpha struct { + V int + } + type Beta struct { + V int + } + type Conf struct { + V int + A Alpha + B []Beta + } + + val := Conf{ + V: 1, + A: Alpha{2}, + B: []Beta{{3}}, + } + expected := "V = 1\n\n[A]\n V = 2\n\n[[B]]\n V = 3\n" + encodeExpected(t, "array hash with normal hash order", val, expected, nil) +} + +func TestEncodeWithOmitEmpty(t *testing.T) { + type simple struct { + Bool bool `toml:"bool,omitempty"` + String string `toml:"string,omitempty"` + Array [0]byte `toml:"array,omitempty"` + Slice []int `toml:"slice,omitempty"` + Map map[string]string `toml:"map,omitempty"` + } + + var v simple + encodeExpected(t, "fields with omitempty are omitted when empty", v, "", nil) + v = simple{ + Bool: true, + String: " ", + Slice: []int{2, 3, 4}, + Map: map[string]string{"foo": "bar"}, + } + expected := `bool = true +string = " " +slice = [2, 3, 4] + +[map] + foo = "bar" +` + encodeExpected(t, "fields with omitempty are not omitted when non-empty", + v, expected, nil) +} + +func TestEncodeWithOmitZero(t *testing.T) { + type simple struct { + Number int `toml:"number,omitzero"` + Real float64 `toml:"real,omitzero"` + Unsigned uint `toml:"unsigned,omitzero"` + } + + value := simple{0, 0.0, uint(0)} + expected := "" + + encodeExpected(t, "simple with omitzero, all zero", value, expected, nil) + + value.Number = 10 + value.Real = 20 + value.Unsigned = 5 + expected = `number = 10 +real = 20.0 +unsigned = 5 +` + encodeExpected(t, "simple with omitzero, non-zero", value, expected, nil) +} + +func TestEncodeOmitemptyWithEmptyName(t *testing.T) { + type simple struct { + S []int `toml:",omitempty"` + } + v := simple{[]int{1, 2, 3}} + expected := "S = [1, 2, 3]\n" + encodeExpected(t, "simple with omitempty, no name, non-empty field", + v, expected, nil) +} + +func TestEncodeAnonymousStruct(t *testing.T) { + type Inner struct{ N int } + type Outer0 struct{ Inner } + type Outer1 struct { + Inner `toml:"inner"` + } + + v0 := Outer0{Inner{3}} + expected := "N = 3\n" + encodeExpected(t, "embedded anonymous untagged struct", v0, expected, nil) + + v1 := Outer1{Inner{3}} + expected = "[inner]\n N = 3\n" + encodeExpected(t, "embedded anonymous tagged struct", v1, expected, nil) +} + +func TestEncodeAnonymousStructPointerField(t *testing.T) { + type Inner struct{ N int } + type Outer0 struct{ *Inner } + type Outer1 struct { + *Inner `toml:"inner"` + } + + v0 := Outer0{} + expected := "" + encodeExpected(t, "nil anonymous untagged struct pointer field", v0, expected, nil) + + v0 = Outer0{&Inner{3}} + expected = "N = 3\n" + encodeExpected(t, "non-nil anonymous untagged struct pointer field", v0, expected, nil) + + v1 := Outer1{} + expected = "" + encodeExpected(t, "nil anonymous tagged struct pointer field", v1, expected, nil) + + v1 = Outer1{&Inner{3}} + expected = "[inner]\n N = 3\n" + encodeExpected(t, "non-nil anonymous tagged struct pointer field", v1, expected, nil) +} + +func TestEncodeIgnoredFields(t *testing.T) { + type simple struct { + Number int `toml:"-"` + } + value := simple{} + expected := "" + encodeExpected(t, "ignored field", value, expected, nil) +} + +func encodeExpected( + t *testing.T, label string, val interface{}, wantStr string, wantErr error, +) { + var buf bytes.Buffer + enc := NewEncoder(&buf) + err := enc.Encode(val) + if err != wantErr { + if wantErr != nil { + if wantErr == errAnything && err != nil { + return + } + t.Errorf("%s: want Encode error %v, got %v", label, wantErr, err) + } else { + t.Errorf("%s: Encode failed: %s", label, err) + } + } + if err != nil { + return + } + if got := buf.String(); wantStr != got { + t.Errorf("%s: want\n-----\n%q\n-----\nbut got\n-----\n%q\n-----\n", + label, wantStr, got) + } +} + +func ExampleEncoder_Encode() { + date, _ := time.Parse(time.RFC822, "14 Mar 10 18:00 UTC") + var config = map[string]interface{}{ + "date": date, + "counts": []int{1, 1, 2, 3, 5, 8}, + "hash": map[string]string{ + "key1": "val1", + "key2": "val2", + }, + } + buf := new(bytes.Buffer) + if err := NewEncoder(buf).Encode(config); err != nil { + log.Fatal(err) + } + fmt.Println(buf.String()) + + // Output: + // counts = [1, 1, 2, 3, 5, 8] + // date = 2010-03-14T18:00:00Z + // + // [hash] + // key1 = "val1" + // key2 = "val2" +} diff --git a/vendor/github.com/benbjohnson/tmpl/.gitrepo b/vendor/github.com/benbjohnson/tmpl/.gitrepo new file mode 100644 index 000000000..885384354 --- /dev/null +++ b/vendor/github.com/benbjohnson/tmpl/.gitrepo @@ -0,0 +1,11 @@ +; DO NOT EDIT (unless you know what you are doing) +; +; This subdirectory is a git "subrepo", and this file is maintained by the +; git-subrepo command. See https://github.com/git-commands/git-subrepo#readme +; +[subrepo] + remote = https://github.com/benbjohnson/tmpl.git + branch = master + commit = 8e77bc5fc07968736bb74f4b40b4c577028a61b6 + parent = 5b36be83a0b2ac09c301df5042e59fa9448ac54a + cmdver = 0.3.0 diff --git a/vendor/github.com/benbjohnson/tmpl/LICENSE b/vendor/github.com/benbjohnson/tmpl/LICENSE new file mode 100644 index 000000000..12c9e83ef --- /dev/null +++ b/vendor/github.com/benbjohnson/tmpl/LICENSE @@ -0,0 +1,22 @@ +The MIT License (MIT) + +Copyright (c) 2015 Ben Johnson + +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/benbjohnson/tmpl/README.md b/vendor/github.com/benbjohnson/tmpl/README.md new file mode 100644 index 000000000..e1a717857 --- /dev/null +++ b/vendor/github.com/benbjohnson/tmpl/README.md @@ -0,0 +1,36 @@ +# tmpl + +This program is a command line interface to Go's `text/template` library. It +can be used by passing in a set of JSON-encoded data and a list of template +paths ending in a `.tmpl` extension. The templates are processed and their +results are saved to the filename with the `.tmpl` extension removed. + + +## Getting Started + +To install `tmpl`, simply run: + +```sh +$ go get github.com/benbjohnson/tmpl +``` + +Then run `tmpl` against your desired templates: + +```sh +$ tmpl -data '["foo","bar","baz"]' a.go.tmpl b.go.tmpl +``` + +You will now have templates generated at `a.go` and `b.go`. + + +### Template data files + +Once your data set gets larger, it may be useful to move it to its own file +instead of specifying it on the command line. To use a data file instead +of raw JSON on the command line, use the `-data` argument but prefix your +path with an `@` symbol. + +```sh +$ echo '["foo","bar","baz"]' > tmpldata +$ tmpl -data=@tmpldata my.tmpl +``` diff --git a/vendor/github.com/benbjohnson/tmpl/main.go b/vendor/github.com/benbjohnson/tmpl/main.go new file mode 100644 index 000000000..25bdae48f --- /dev/null +++ b/vendor/github.com/benbjohnson/tmpl/main.go @@ -0,0 +1,209 @@ +package main + +import ( + "bytes" + "encoding/json" + "errors" + "flag" + "fmt" + "go/format" + "io" + "io/ioutil" + "os" + "path/filepath" + "strings" + "text/template" +) + +// Extension is the required file extension for processed files. +const Extension = ".tmpl" + +func main() { + m := NewMain() + if err := m.ParseFlags(os.Args[1:]); err != nil { + fmt.Fprintln(m.Stderr, err) + os.Exit(2) + } + + if err := m.Run(); err != nil { + fmt.Fprintln(m.Stderr, err) + os.Exit(1) + } +} + +type Main struct { + // Files to be processed. + Paths []string + + // Data to be applied to the files during generation. + Data interface{} + + OS interface { + Stat(filename string) (os.FileInfo, error) + } + + FileReadWriter interface { + ReadFile(filename string) ([]byte, error) + WriteFile(filename string, data []byte, perm os.FileMode) error + } + + // Standard input/output + Stdin io.Reader + Stdout io.Writer + Stderr io.Writer +} + +// NewMain returns a new instance of Main. +func NewMain() *Main { + return &Main{ + OS: &mainOS{}, + FileReadWriter: &fileReadWriter{}, + + Stdin: os.Stdin, + Stdout: os.Stdout, + Stderr: os.Stderr, + } +} + +// ParseFlags parses the command line flags from args. +func (m *Main) ParseFlags(args []string) error { + fs := flag.NewFlagSet("tmp", flag.ContinueOnError) + fs.SetOutput(m.Stderr) + data := fs.String("data", "", "json data") + if err := fs.Parse(args); err != nil { + return err + } + + // Parse JSON data. + if *data != "" { + // If the data has a @-prefix then read from a file. + buf := []byte(*data) + if strings.HasPrefix(*data, "@") { + b, err := m.FileReadWriter.ReadFile(strings.TrimPrefix(*data, "@")) + if err != nil { + return err + } + buf = b + } + + if err := json.Unmarshal(buf, &m.Data); err != nil { + return err + } + } + + // All arguments are considered paths to process. + m.Paths = fs.Args() + + return nil +} + +// Run executes the program. +func (m *Main) Run() error { + // Verify we have at least one path. + if len(m.Paths) == 0 { + return errors.New("path required") + } + + // Process each path. + for _, path := range m.Paths { + if err := m.process(path); err != nil { + return err + } + } + + return nil +} + +// process reads a template file from path, processes it, and writes it to its generated path. +func (m *Main) process(path string) error { + // Validate that we have a prefix we can strip off for the generated path. + if !strings.HasSuffix(path, Extension) { + return fmt.Errorf("path must have %s extension: %s", Extension, path) + } + outputPath := strings.TrimSuffix(path, Extension) + + // Stat the file to retrieve the mode. + fi, err := m.OS.Stat(path) + if os.IsNotExist(err) { + return fmt.Errorf("file not found") + } else if err != nil { + return err + } + + // Read in template file. + source, err := m.FileReadWriter.ReadFile(path) + if os.IsNotExist(err) { + return fmt.Errorf("file not found") + } else if err != nil { + return err + } + + // Parse file into template. + tmpl, err := template.New("main").Funcs(FuncMap).Parse(string(source)) + if err != nil { + return err + } + + // Create a comment at the top if generating to a .go file. + var buf bytes.Buffer + switch filepath.Ext(outputPath) { + case ".go": + fmt.Fprintln(&buf, "// Generated by tmpl") + fmt.Fprintln(&buf, "// https://github.com/benbjohnson/tmpl") + fmt.Fprintln(&buf, "//") + fmt.Fprintln(&buf, "// DO NOT EDIT!") + fmt.Fprintln(&buf, "// Source:", path) + fmt.Fprintln(&buf, "") + } + + // Execute template. + if err := tmpl.Execute(&buf, m.Data); err != nil { + return err + } + + // Format output if it's a Go file. + output := buf.Bytes() + switch filepath.Ext(outputPath) { + case ".go": + formatted, err := format.Source(output) + if err != nil { + return err + } + output = formatted + } + + // Write buffer to file. + if err := m.FileReadWriter.WriteFile(outputPath, output, fi.Mode()); err != nil { + return err + } + + return nil +} + +var FuncMap = template.FuncMap{ + "upcase": strings.ToUpper, + "downcase": strings.ToLower, + "camel": camelCase, +} + +func camelCase(s string) string { + if s == "" { + return s + } + return strings.ToLower(string(s[0])) + s[1:] +} + +// fileReadWriter implements Main.FileReadWriter. +type fileReadWriter struct{} + +func (*fileReadWriter) ReadFile(filename string) ([]byte, error) { + return ioutil.ReadFile(filename) +} +func (*fileReadWriter) WriteFile(filename string, data []byte, perm os.FileMode) error { + return ioutil.WriteFile(filename, data, perm) +} + +// mainOS implements Main.OS. +type mainOS struct{} + +func (*mainOS) Stat(name string) (os.FileInfo, error) { return os.Stat(name) } diff --git a/vendor/github.com/benbjohnson/tmpl/main_test.go b/vendor/github.com/benbjohnson/tmpl/main_test.go new file mode 100644 index 000000000..b65ae5da7 --- /dev/null +++ b/vendor/github.com/benbjohnson/tmpl/main_test.go @@ -0,0 +1,223 @@ +package main_test + +import ( + "bytes" + "io" + "io/ioutil" + "os" + "reflect" + "testing" + "time" + + main "github.com/benbjohnson/tmpl" +) + +// Ensure paths can be parsed from command line flags. +func TestMain_ParseFlags_Paths(t *testing.T) { + m := NewMain() + if err := m.ParseFlags([]string{"a", "b", "c"}); err != nil { + t.Fatal(err) + } else if !reflect.DeepEqual(m.Paths, []string{"a", "b", "c"}) { + t.Fatalf("unexpected paths: %+v", m.Paths) + } +} + +// Ensure data can be parsed from command line flags as JSON. +func TestMain_ParseFlags_Data_JSON(t *testing.T) { + m := NewMain() + if err := m.ParseFlags([]string{"-data", `{"foo":"bar"}`}); err != nil { + t.Fatal(err) + } else if !reflect.DeepEqual(m.Data, map[string]interface{}{"foo": "bar"}) { + t.Fatalf("unexpected data: %#v", m.Data) + } +} + +// Ensure data can be parsed from command line flags as a filename. +func TestMain_ParseFlags_Data_File(t *testing.T) { + m := NewMain() + m.FileReadWriter.ReadFileFn = func(filename string) ([]byte, error) { + if filename != "path/to/data" { + t.Fatalf("unexpected filename: %s", filename) + } + return []byte(`{"foo":"bar"}`), nil + } + + if err := m.ParseFlags([]string{"-data", `@path/to/data`}); err != nil { + t.Fatal(err) + } else if !reflect.DeepEqual(m.Data, map[string]interface{}{"foo": "bar"}) { + t.Fatalf("unexpected data: %#v", m.Data) + } +} + +// Ensure a basic template file can be processed. +func TestMain_Run(t *testing.T) { + m := NewMain() + m.OS.StatFn = func(filename string) (os.FileInfo, error) { + if filename != "a.tmpl" { + t.Fatalf("unexpected filename: %s", filename) + } + return &fileInfo{mode: 0666}, nil + } + m.FileReadWriter.ReadFileFn = func(filename string) ([]byte, error) { + if filename != "a.tmpl" { + t.Fatalf("unexpected filename: %s", filename) + } + return []byte(`hi {{.name}}, you are {{.age}}`), nil + } + m.FileReadWriter.WriteFileFn = func(filename string, data []byte, perm os.FileMode) error { + if filename != "a" { + t.Fatalf("unexpected filename: %s", filename) + } else if string(data) != `hi bob, you are 12` { + t.Fatalf("unexpected data: %s", data) + } else if perm != 0666 { + t.Fatalf("unexpected perm: %s", perm) + } + return nil + } + m.Paths = []string{"a.tmpl"} + m.Data = map[string]interface{}{"name": "bob", "age": 12} + if err := m.Run(); err != nil { + t.Fatal(err) + } +} + +// Ensure a file can be processed against array data. +func TestMain_Run_Array(t *testing.T) { + m := NewMain() + m.FileReadWriter.ReadFileFn = func(filename string) ([]byte, error) { + return []byte(`I like{{range .}} ({{.}}){{end}}`), nil + } + m.FileReadWriter.WriteFileFn = func(filename string, data []byte, perm os.FileMode) error { + if string(data) != `I like (apple) (pear)` { + t.Fatalf("unexpected data: %s", data) + } + return nil + } + + m.Paths = []string{"a.tmpl"} + m.Data = []interface{}{"apple", "pear"} + if err := m.Run(); err != nil { + t.Fatal(err) + } +} + +// Ensure a file will add a comment header if generating a Go file. +func TestMain_Run_Header_Go(t *testing.T) { + m := NewMain() + m.FileReadWriter.ReadFileFn = func(filename string) ([]byte, error) { + return []byte("\n\n\n\n\n\npackage foo"), nil + } + m.FileReadWriter.WriteFileFn = func(filename string, data []byte, perm os.FileMode) error { + if string(data) != "// Generated by tmpl\n// https://github.com/benbjohnson/tmpl\n//\n// DO NOT EDIT!\n// Source: x.go.tmpl\n\npackage foo\n" { + t.Fatalf("unexpected data: %s", data) + } + return nil + } + + m.Paths = []string{"x.go.tmpl"} + m.Data = []interface{}{"apple", "pear"} + if err := m.Run(); err != nil { + t.Fatal(err) + } +} + +// Main is a test wrapper for main.Main. +type Main struct { + *main.Main + + OS MainOS + FileReadWriter MainFileReadWriter + + Stdin bytes.Buffer + Stdout bytes.Buffer + Stderr bytes.Buffer +} + +// NewMain returns a new instance of Main. +// If the verbose command line flag is set then stdout/stderr also go to the terminal. +func NewMain() *Main { + m := &Main{Main: main.NewMain()} + m.Main.OS = &m.OS + m.Main.FileReadWriter = &m.FileReadWriter + m.Main.Stdin = &m.Stdin + m.Main.Stdout = &m.Stdout + m.Main.Stderr = &m.Stderr + + if testing.Verbose() { + m.Main.Stdout = io.MultiWriter(os.Stdout, m.Main.Stdout) + m.Main.Stderr = io.MultiWriter(os.Stderr, m.Main.Stderr) + } + + // Default stat() to use 0666. + m.OS.StatFn = DefaultOSStat + + return m +} + +// MainOS is a mockable implementation of Main.OS. +type MainOS struct { + StatFn func(filename string) (os.FileInfo, error) +} + +func (os *MainOS) Stat(filename string) (os.FileInfo, error) { + return os.StatFn(filename) +} + +func DefaultOSStat(filename string) (os.FileInfo, error) { return &fileInfo{mode: 0666}, nil } + +// MainFileReadWriter is a mockable implementation of Main.FileReadWriter. +type MainFileReadWriter struct { + ReadFileFn func(filename string) ([]byte, error) + WriteFileFn func(filename string, data []byte, perm os.FileMode) error +} + +func (r *MainFileReadWriter) ReadFile(filename string) ([]byte, error) { + return r.ReadFileFn(filename) +} + +func (r *MainFileReadWriter) WriteFile(filename string, data []byte, perm os.FileMode) error { + return r.WriteFileFn(filename, data, perm) +} + +type fileInfo struct { + mode os.FileMode +} + +func (fi *fileInfo) Name() string { return "" } +func (fi *fileInfo) Size() int64 { return 0 } +func (fi *fileInfo) Mode() os.FileMode { return fi.mode } +func (fi *fileInfo) ModTime() time.Time { return time.Time{} } +func (fi *fileInfo) IsDir() bool { return false } +func (fi *fileInfo) Sys() interface{} { return nil } + +// MustTempDir returns a temporary directory. Panic on error. +func MustTempDir() string { + path, err := ioutil.TempDir("", "tmpl-") + if err != nil { + panic(err) + } + return path +} + +// MustRemoveAll recursively removes a path. Panic on error. +func MustRemoveAll(path string) { + if err := os.RemoveAll(path); err != nil { + panic(err) + } +} + +// MustWriteFile writes data to filename. Panic on error. +func MustWriteFile(filename string, data []byte, perm os.FileMode) { + if err := ioutil.WriteFile(filename, data, perm); err != nil { + panic(err) + } +} + +// MustReadFile reads all data from filename. Panic on error. +func MustReadFile(filename string) []byte { + data, err := ioutil.ReadFile(filename) + if err != nil { + panic(err) + } + return data +} diff --git a/vendor/github.com/boltdb/bolt/.gitignore b/vendor/github.com/boltdb/bolt/.gitignore new file mode 100644 index 000000000..c7bd2b7a5 --- /dev/null +++ b/vendor/github.com/boltdb/bolt/.gitignore @@ -0,0 +1,4 @@ +*.prof +*.test +*.swp +/bin/ diff --git a/vendor/github.com/boltdb/bolt/.gitrepo b/vendor/github.com/boltdb/bolt/.gitrepo new file mode 100644 index 000000000..c482d5515 --- /dev/null +++ b/vendor/github.com/boltdb/bolt/.gitrepo @@ -0,0 +1,11 @@ +; DO NOT EDIT (unless you know what you are doing) +; +; This subdirectory is a git "subrepo", and this file is maintained by the +; git-subrepo command. See https://github.com/git-commands/git-subrepo#readme +; +[subrepo] + remote = http://github.com/boltdb/bolt.git + branch = master + commit = 05e441d7b3ded9164c5b912521504e7711dd0ba2 + parent = 99c9d17eb5416a4fdce216714d4585bb0847a582 + cmdver = 0.3.0 diff --git a/vendor/github.com/boltdb/bolt/README.md b/vendor/github.com/boltdb/bolt/README.md index 3bff3cce4..36967f431 100644 --- a/vendor/github.com/boltdb/bolt/README.md +++ b/vendor/github.com/boltdb/bolt/README.md @@ -1,4 +1,4 @@ -Bolt [![Coverage Status](https://coveralls.io/repos/boltdb/bolt/badge.svg?branch=master)](https://coveralls.io/r/boltdb/bolt?branch=master) [![GoDoc](https://godoc.org/github.com/boltdb/bolt?status.svg)](https://godoc.org/github.com/boltdb/bolt) ![Version](https://img.shields.io/badge/version-1.0-green.svg) +Bolt [![Coverage Status](https://coveralls.io/repos/boltdb/bolt/badge.svg?branch=master)](https://coveralls.io/r/boltdb/bolt?branch=master) [![GoDoc](https://godoc.org/github.com/boltdb/bolt?status.svg)](https://godoc.org/github.com/boltdb/bolt) ![Version](https://img.shields.io/badge/version-1.2.1-green.svg) ==== Bolt is a pure Go key/value store inspired by [Howard Chu's][hyc_symas] @@ -557,7 +557,7 @@ if err != nil { Bolt is able to run on mobile devices by leveraging the binding feature of the [gomobile](https://github.com/golang/mobile) tool. Create a struct that will contain your database logic and a reference to a `*bolt.DB` with a initializing -contstructor that takes in a filepath where the database file will be stored. +constructor that takes in a filepath where the database file will be stored. Neither Android nor iOS require extra permissions or cleanup from using this method. ```go @@ -846,5 +846,6 @@ Below is a list of public, open source projects that use Bolt: * [GoWebApp](https://github.com/josephspurrier/gowebapp) - A basic MVC web application in Go using BoltDB. * [SimpleBolt](https://github.com/xyproto/simplebolt) - A simple way to use BoltDB. Deals mainly with strings. * [Algernon](https://github.com/xyproto/algernon) - A HTTP/2 web server with built-in support for Lua. Uses BoltDB as the default database backend. +* [MuLiFS](https://github.com/dankomiocevic/mulifs) - Music Library Filesystem creates a filesystem to organise your music files. If you are using Bolt in a project please send a pull request to add it to the list. diff --git a/vendor/github.com/boltdb/bolt/bucket_test.go b/vendor/github.com/boltdb/bolt/bucket_test.go new file mode 100644 index 000000000..528fec24d --- /dev/null +++ b/vendor/github.com/boltdb/bolt/bucket_test.go @@ -0,0 +1,1867 @@ +package bolt_test + +import ( + "bytes" + "encoding/binary" + "errors" + "fmt" + "log" + "math/rand" + "os" + "strconv" + "strings" + "testing" + "testing/quick" + + "github.com/boltdb/bolt" +) + +// Ensure that a bucket that gets a non-existent key returns nil. +func TestBucket_Get_NonExistent(t *testing.T) { + db := MustOpenDB() + defer db.MustClose() + + if err := db.Update(func(tx *bolt.Tx) error { + b, err := tx.CreateBucket([]byte("widgets")) + if err != nil { + t.Fatal(err) + } + if v := b.Get([]byte("foo")); v != nil { + t.Fatal("expected nil value") + } + return nil + }); err != nil { + t.Fatal(err) + } +} + +// Ensure that a bucket can read a value that is not flushed yet. +func TestBucket_Get_FromNode(t *testing.T) { + db := MustOpenDB() + defer db.MustClose() + + if err := db.Update(func(tx *bolt.Tx) error { + b, err := tx.CreateBucket([]byte("widgets")) + if err != nil { + t.Fatal(err) + } + if err := b.Put([]byte("foo"), []byte("bar")); err != nil { + t.Fatal(err) + } + if v := b.Get([]byte("foo")); !bytes.Equal(v, []byte("bar")) { + t.Fatalf("unexpected value: %v", v) + } + return nil + }); err != nil { + t.Fatal(err) + } +} + +// Ensure that a bucket retrieved via Get() returns a nil. +func TestBucket_Get_IncompatibleValue(t *testing.T) { + db := MustOpenDB() + defer db.MustClose() + if err := db.Update(func(tx *bolt.Tx) error { + _, err := tx.CreateBucket([]byte("widgets")) + if err != nil { + t.Fatal(err) + } + + if _, err := tx.Bucket([]byte("widgets")).CreateBucket([]byte("foo")); err != nil { + t.Fatal(err) + } + + if tx.Bucket([]byte("widgets")).Get([]byte("foo")) != nil { + t.Fatal("expected nil value") + } + return nil + }); err != nil { + t.Fatal(err) + } +} + +// Ensure that a slice returned from a bucket has a capacity equal to its length. +// This also allows slices to be appended to since it will require a realloc by Go. +// +// https://github.com/boltdb/bolt/issues/544 +func TestBucket_Get_Capacity(t *testing.T) { + db := MustOpenDB() + defer db.MustClose() + + // Write key to a bucket. + if err := db.Update(func(tx *bolt.Tx) error { + b, err := tx.CreateBucket([]byte("bucket")) + if err != nil { + return err + } + return b.Put([]byte("key"), []byte("val")) + }); err != nil { + t.Fatal(err) + } + + // Retrieve value and attempt to append to it. + if err := db.Update(func(tx *bolt.Tx) error { + k, v := tx.Bucket([]byte("bucket")).Cursor().First() + + // Verify capacity. + if len(k) != cap(k) { + t.Fatalf("unexpected key slice capacity: %d", cap(k)) + } else if len(v) != cap(v) { + t.Fatalf("unexpected value slice capacity: %d", cap(v)) + } + + // Ensure slice can be appended to without a segfault. + k = append(k, []byte("123")...) + v = append(v, []byte("123")...) + + return nil + }); err != nil { + t.Fatal(err) + } +} + +// Ensure that a bucket can write a key/value. +func TestBucket_Put(t *testing.T) { + db := MustOpenDB() + defer db.MustClose() + if err := db.Update(func(tx *bolt.Tx) error { + b, err := tx.CreateBucket([]byte("widgets")) + if err != nil { + t.Fatal(err) + } + if err := b.Put([]byte("foo"), []byte("bar")); err != nil { + t.Fatal(err) + } + + v := tx.Bucket([]byte("widgets")).Get([]byte("foo")) + if !bytes.Equal([]byte("bar"), v) { + t.Fatalf("unexpected value: %v", v) + } + return nil + }); err != nil { + t.Fatal(err) + } +} + +// Ensure that a bucket can rewrite a key in the same transaction. +func TestBucket_Put_Repeat(t *testing.T) { + db := MustOpenDB() + defer db.MustClose() + if err := db.Update(func(tx *bolt.Tx) error { + b, err := tx.CreateBucket([]byte("widgets")) + if err != nil { + t.Fatal(err) + } + if err := b.Put([]byte("foo"), []byte("bar")); err != nil { + t.Fatal(err) + } + if err := b.Put([]byte("foo"), []byte("baz")); err != nil { + t.Fatal(err) + } + + value := tx.Bucket([]byte("widgets")).Get([]byte("foo")) + if !bytes.Equal([]byte("baz"), value) { + t.Fatalf("unexpected value: %v", value) + } + return nil + }); err != nil { + t.Fatal(err) + } +} + +// Ensure that a bucket can write a bunch of large values. +func TestBucket_Put_Large(t *testing.T) { + db := MustOpenDB() + defer db.MustClose() + + count, factor := 100, 200 + if err := db.Update(func(tx *bolt.Tx) error { + b, err := tx.CreateBucket([]byte("widgets")) + if err != nil { + t.Fatal(err) + } + for i := 1; i < count; i++ { + if err := b.Put([]byte(strings.Repeat("0", i*factor)), []byte(strings.Repeat("X", (count-i)*factor))); err != nil { + t.Fatal(err) + } + } + return nil + }); err != nil { + t.Fatal(err) + } + + if err := db.View(func(tx *bolt.Tx) error { + b := tx.Bucket([]byte("widgets")) + for i := 1; i < count; i++ { + value := b.Get([]byte(strings.Repeat("0", i*factor))) + if !bytes.Equal(value, []byte(strings.Repeat("X", (count-i)*factor))) { + t.Fatalf("unexpected value: %v", value) + } + } + return nil + }); err != nil { + t.Fatal(err) + } +} + +// Ensure that a database can perform multiple large appends safely. +func TestDB_Put_VeryLarge(t *testing.T) { + if testing.Short() { + t.Skip("skipping test in short mode.") + } + + n, batchN := 400000, 200000 + ksize, vsize := 8, 500 + + db := MustOpenDB() + defer db.MustClose() + + for i := 0; i < n; i += batchN { + if err := db.Update(func(tx *bolt.Tx) error { + b, err := tx.CreateBucketIfNotExists([]byte("widgets")) + if err != nil { + t.Fatal(err) + } + for j := 0; j < batchN; j++ { + k, v := make([]byte, ksize), make([]byte, vsize) + binary.BigEndian.PutUint32(k, uint32(i+j)) + if err := b.Put(k, v); err != nil { + t.Fatal(err) + } + } + return nil + }); err != nil { + t.Fatal(err) + } + } +} + +// Ensure that a setting a value on a key with a bucket value returns an error. +func TestBucket_Put_IncompatibleValue(t *testing.T) { + db := MustOpenDB() + defer db.MustClose() + + if err := db.Update(func(tx *bolt.Tx) error { + b0, err := tx.CreateBucket([]byte("widgets")) + if err != nil { + t.Fatal(err) + } + + if _, err := tx.Bucket([]byte("widgets")).CreateBucket([]byte("foo")); err != nil { + t.Fatal(err) + } + if err := b0.Put([]byte("foo"), []byte("bar")); err != bolt.ErrIncompatibleValue { + t.Fatalf("unexpected error: %s", err) + } + return nil + }); err != nil { + t.Fatal(err) + } +} + +// Ensure that a setting a value while the transaction is closed returns an error. +func TestBucket_Put_Closed(t *testing.T) { + db := MustOpenDB() + defer db.MustClose() + tx, err := db.Begin(true) + if err != nil { + t.Fatal(err) + } + + b, err := tx.CreateBucket([]byte("widgets")) + if err != nil { + t.Fatal(err) + } + + if err := tx.Rollback(); err != nil { + t.Fatal(err) + } + + if err := b.Put([]byte("foo"), []byte("bar")); err != bolt.ErrTxClosed { + t.Fatalf("unexpected error: %s", err) + } +} + +// Ensure that setting a value on a read-only bucket returns an error. +func TestBucket_Put_ReadOnly(t *testing.T) { + db := MustOpenDB() + defer db.MustClose() + + if err := db.Update(func(tx *bolt.Tx) error { + if _, err := tx.CreateBucket([]byte("widgets")); err != nil { + t.Fatal(err) + } + return nil + }); err != nil { + t.Fatal(err) + } + + if err := db.View(func(tx *bolt.Tx) error { + b := tx.Bucket([]byte("widgets")) + if err := b.Put([]byte("foo"), []byte("bar")); err != bolt.ErrTxNotWritable { + t.Fatalf("unexpected error: %s", err) + } + return nil + }); err != nil { + t.Fatal(err) + } +} + +// Ensure that a bucket can delete an existing key. +func TestBucket_Delete(t *testing.T) { + db := MustOpenDB() + defer db.MustClose() + + if err := db.Update(func(tx *bolt.Tx) error { + b, err := tx.CreateBucket([]byte("widgets")) + if err != nil { + t.Fatal(err) + } + if err := b.Put([]byte("foo"), []byte("bar")); err != nil { + t.Fatal(err) + } + if err := b.Delete([]byte("foo")); err != nil { + t.Fatal(err) + } + if v := b.Get([]byte("foo")); v != nil { + t.Fatalf("unexpected value: %v", v) + } + return nil + }); err != nil { + t.Fatal(err) + } +} + +// Ensure that deleting a large set of keys will work correctly. +func TestBucket_Delete_Large(t *testing.T) { + db := MustOpenDB() + defer db.MustClose() + + if err := db.Update(func(tx *bolt.Tx) error { + b, err := tx.CreateBucket([]byte("widgets")) + if err != nil { + t.Fatal(err) + } + + for i := 0; i < 100; i++ { + if err := b.Put([]byte(strconv.Itoa(i)), []byte(strings.Repeat("*", 1024))); err != nil { + t.Fatal(err) + } + } + + return nil + }); err != nil { + t.Fatal(err) + } + + if err := db.Update(func(tx *bolt.Tx) error { + b := tx.Bucket([]byte("widgets")) + for i := 0; i < 100; i++ { + if err := b.Delete([]byte(strconv.Itoa(i))); err != nil { + t.Fatal(err) + } + } + return nil + }); err != nil { + t.Fatal(err) + } + + if err := db.View(func(tx *bolt.Tx) error { + b := tx.Bucket([]byte("widgets")) + for i := 0; i < 100; i++ { + if v := b.Get([]byte(strconv.Itoa(i))); v != nil { + t.Fatalf("unexpected value: %v, i=%d", v, i) + } + } + return nil + }); err != nil { + t.Fatal(err) + } +} + +// Deleting a very large list of keys will cause the freelist to use overflow. +func TestBucket_Delete_FreelistOverflow(t *testing.T) { + if testing.Short() { + t.Skip("skipping test in short mode.") + } + + db := MustOpenDB() + defer db.MustClose() + + k := make([]byte, 16) + for i := uint64(0); i < 10000; i++ { + if err := db.Update(func(tx *bolt.Tx) error { + b, err := tx.CreateBucketIfNotExists([]byte("0")) + if err != nil { + t.Fatalf("bucket error: %s", err) + } + + for j := uint64(0); j < 1000; j++ { + binary.BigEndian.PutUint64(k[:8], i) + binary.BigEndian.PutUint64(k[8:], j) + if err := b.Put(k, nil); err != nil { + t.Fatalf("put error: %s", err) + } + } + + return nil + }); err != nil { + t.Fatal(err) + } + } + + // Delete all of them in one large transaction + if err := db.Update(func(tx *bolt.Tx) error { + b := tx.Bucket([]byte("0")) + c := b.Cursor() + for k, _ := c.First(); k != nil; k, _ = c.Next() { + if err := c.Delete(); err != nil { + t.Fatal(err) + } + } + return nil + }); err != nil { + t.Fatal(err) + } +} + +// Ensure that accessing and updating nested buckets is ok across transactions. +func TestBucket_Nested(t *testing.T) { + db := MustOpenDB() + defer db.MustClose() + + if err := db.Update(func(tx *bolt.Tx) error { + // Create a widgets bucket. + b, err := tx.CreateBucket([]byte("widgets")) + if err != nil { + t.Fatal(err) + } + + // Create a widgets/foo bucket. + _, err = b.CreateBucket([]byte("foo")) + if err != nil { + t.Fatal(err) + } + + // Create a widgets/bar key. + if err := b.Put([]byte("bar"), []byte("0000")); err != nil { + t.Fatal(err) + } + + return nil + }); err != nil { + t.Fatal(err) + } + db.MustCheck() + + // Update widgets/bar. + if err := db.Update(func(tx *bolt.Tx) error { + b := tx.Bucket([]byte("widgets")) + if err := b.Put([]byte("bar"), []byte("xxxx")); err != nil { + t.Fatal(err) + } + return nil + }); err != nil { + t.Fatal(err) + } + db.MustCheck() + + // Cause a split. + if err := db.Update(func(tx *bolt.Tx) error { + var b = tx.Bucket([]byte("widgets")) + for i := 0; i < 10000; i++ { + if err := b.Put([]byte(strconv.Itoa(i)), []byte(strconv.Itoa(i))); err != nil { + t.Fatal(err) + } + } + return nil + }); err != nil { + t.Fatal(err) + } + db.MustCheck() + + // Insert into widgets/foo/baz. + if err := db.Update(func(tx *bolt.Tx) error { + var b = tx.Bucket([]byte("widgets")) + if err := b.Bucket([]byte("foo")).Put([]byte("baz"), []byte("yyyy")); err != nil { + t.Fatal(err) + } + return nil + }); err != nil { + t.Fatal(err) + } + db.MustCheck() + + // Verify. + if err := db.View(func(tx *bolt.Tx) error { + var b = tx.Bucket([]byte("widgets")) + if v := b.Bucket([]byte("foo")).Get([]byte("baz")); !bytes.Equal(v, []byte("yyyy")) { + t.Fatalf("unexpected value: %v", v) + } + if v := b.Get([]byte("bar")); !bytes.Equal(v, []byte("xxxx")) { + t.Fatalf("unexpected value: %v", v) + } + for i := 0; i < 10000; i++ { + if v := b.Get([]byte(strconv.Itoa(i))); !bytes.Equal(v, []byte(strconv.Itoa(i))) { + t.Fatalf("unexpected value: %v", v) + } + } + return nil + }); err != nil { + t.Fatal(err) + } +} + +// Ensure that deleting a bucket using Delete() returns an error. +func TestBucket_Delete_Bucket(t *testing.T) { + db := MustOpenDB() + defer db.MustClose() + if err := db.Update(func(tx *bolt.Tx) error { + b, err := tx.CreateBucket([]byte("widgets")) + if err != nil { + t.Fatal(err) + } + if _, err := b.CreateBucket([]byte("foo")); err != nil { + t.Fatal(err) + } + if err := b.Delete([]byte("foo")); err != bolt.ErrIncompatibleValue { + t.Fatalf("unexpected error: %s", err) + } + return nil + }); err != nil { + t.Fatal(err) + } +} + +// Ensure that deleting a key on a read-only bucket returns an error. +func TestBucket_Delete_ReadOnly(t *testing.T) { + db := MustOpenDB() + defer db.MustClose() + + if err := db.Update(func(tx *bolt.Tx) error { + if _, err := tx.CreateBucket([]byte("widgets")); err != nil { + t.Fatal(err) + } + return nil + }); err != nil { + t.Fatal(err) + } + + if err := db.View(func(tx *bolt.Tx) error { + if err := tx.Bucket([]byte("widgets")).Delete([]byte("foo")); err != bolt.ErrTxNotWritable { + t.Fatalf("unexpected error: %s", err) + } + return nil + }); err != nil { + t.Fatal(err) + } +} + +// Ensure that a deleting value while the transaction is closed returns an error. +func TestBucket_Delete_Closed(t *testing.T) { + db := MustOpenDB() + defer db.MustClose() + + tx, err := db.Begin(true) + if err != nil { + t.Fatal(err) + } + + b, err := tx.CreateBucket([]byte("widgets")) + if err != nil { + t.Fatal(err) + } + + if err := tx.Rollback(); err != nil { + t.Fatal(err) + } + if err := b.Delete([]byte("foo")); err != bolt.ErrTxClosed { + t.Fatalf("unexpected error: %s", err) + } +} + +// Ensure that deleting a bucket causes nested buckets to be deleted. +func TestBucket_DeleteBucket_Nested(t *testing.T) { + db := MustOpenDB() + defer db.MustClose() + + if err := db.Update(func(tx *bolt.Tx) error { + widgets, err := tx.CreateBucket([]byte("widgets")) + if err != nil { + t.Fatal(err) + } + + foo, err := widgets.CreateBucket([]byte("foo")) + if err != nil { + t.Fatal(err) + } + + bar, err := foo.CreateBucket([]byte("bar")) + if err != nil { + t.Fatal(err) + } + if err := bar.Put([]byte("baz"), []byte("bat")); err != nil { + t.Fatal(err) + } + if err := tx.Bucket([]byte("widgets")).DeleteBucket([]byte("foo")); err != nil { + t.Fatal(err) + } + return nil + }); err != nil { + t.Fatal(err) + } +} + +// Ensure that deleting a bucket causes nested buckets to be deleted after they have been committed. +func TestBucket_DeleteBucket_Nested2(t *testing.T) { + db := MustOpenDB() + defer db.MustClose() + + if err := db.Update(func(tx *bolt.Tx) error { + widgets, err := tx.CreateBucket([]byte("widgets")) + if err != nil { + t.Fatal(err) + } + + foo, err := widgets.CreateBucket([]byte("foo")) + if err != nil { + t.Fatal(err) + } + + bar, err := foo.CreateBucket([]byte("bar")) + if err != nil { + t.Fatal(err) + } + + if err := bar.Put([]byte("baz"), []byte("bat")); err != nil { + t.Fatal(err) + } + return nil + }); err != nil { + t.Fatal(err) + } + + if err := db.Update(func(tx *bolt.Tx) error { + widgets := tx.Bucket([]byte("widgets")) + if widgets == nil { + t.Fatal("expected widgets bucket") + } + + foo := widgets.Bucket([]byte("foo")) + if foo == nil { + t.Fatal("expected foo bucket") + } + + bar := foo.Bucket([]byte("bar")) + if bar == nil { + t.Fatal("expected bar bucket") + } + + if v := bar.Get([]byte("baz")); !bytes.Equal(v, []byte("bat")) { + t.Fatalf("unexpected value: %v", v) + } + if err := tx.DeleteBucket([]byte("widgets")); err != nil { + t.Fatal(err) + } + return nil + }); err != nil { + t.Fatal(err) + } + + if err := db.View(func(tx *bolt.Tx) error { + if tx.Bucket([]byte("widgets")) != nil { + t.Fatal("expected bucket to be deleted") + } + return nil + }); err != nil { + t.Fatal(err) + } +} + +// Ensure that deleting a child bucket with multiple pages causes all pages to get collected. +// NOTE: Consistency check in bolt_test.DB.Close() will panic if pages not freed properly. +func TestBucket_DeleteBucket_Large(t *testing.T) { + db := MustOpenDB() + defer db.MustClose() + + if err := db.Update(func(tx *bolt.Tx) error { + widgets, err := tx.CreateBucket([]byte("widgets")) + if err != nil { + t.Fatal(err) + } + + foo, err := widgets.CreateBucket([]byte("foo")) + if err != nil { + t.Fatal(err) + } + + for i := 0; i < 1000; i++ { + if err := foo.Put([]byte(fmt.Sprintf("%d", i)), []byte(fmt.Sprintf("%0100d", i))); err != nil { + t.Fatal(err) + } + } + return nil + }); err != nil { + t.Fatal(err) + } + + if err := db.Update(func(tx *bolt.Tx) error { + if err := tx.DeleteBucket([]byte("widgets")); err != nil { + t.Fatal(err) + } + return nil + }); err != nil { + t.Fatal(err) + } +} + +// Ensure that a simple value retrieved via Bucket() returns a nil. +func TestBucket_Bucket_IncompatibleValue(t *testing.T) { + db := MustOpenDB() + defer db.MustClose() + + if err := db.Update(func(tx *bolt.Tx) error { + widgets, err := tx.CreateBucket([]byte("widgets")) + if err != nil { + t.Fatal(err) + } + + if err := widgets.Put([]byte("foo"), []byte("bar")); err != nil { + t.Fatal(err) + } + if b := tx.Bucket([]byte("widgets")).Bucket([]byte("foo")); b != nil { + t.Fatal("expected nil bucket") + } + return nil + }); err != nil { + t.Fatal(err) + } +} + +// Ensure that creating a bucket on an existing non-bucket key returns an error. +func TestBucket_CreateBucket_IncompatibleValue(t *testing.T) { + db := MustOpenDB() + defer db.MustClose() + if err := db.Update(func(tx *bolt.Tx) error { + widgets, err := tx.CreateBucket([]byte("widgets")) + if err != nil { + t.Fatal(err) + } + + if err := widgets.Put([]byte("foo"), []byte("bar")); err != nil { + t.Fatal(err) + } + if _, err := widgets.CreateBucket([]byte("foo")); err != bolt.ErrIncompatibleValue { + t.Fatalf("unexpected error: %s", err) + } + return nil + }); err != nil { + t.Fatal(err) + } +} + +// Ensure that deleting a bucket on an existing non-bucket key returns an error. +func TestBucket_DeleteBucket_IncompatibleValue(t *testing.T) { + db := MustOpenDB() + defer db.MustClose() + + if err := db.Update(func(tx *bolt.Tx) error { + widgets, err := tx.CreateBucket([]byte("widgets")) + if err != nil { + t.Fatal(err) + } + if err := widgets.Put([]byte("foo"), []byte("bar")); err != nil { + t.Fatal(err) + } + if err := tx.Bucket([]byte("widgets")).DeleteBucket([]byte("foo")); err != bolt.ErrIncompatibleValue { + t.Fatalf("unexpected error: %s", err) + } + return nil + }); err != nil { + t.Fatal(err) + } +} + +// Ensure that a bucket can return an autoincrementing sequence. +func TestBucket_NextSequence(t *testing.T) { + db := MustOpenDB() + defer db.MustClose() + + if err := db.Update(func(tx *bolt.Tx) error { + widgets, err := tx.CreateBucket([]byte("widgets")) + if err != nil { + t.Fatal(err) + } + woojits, err := tx.CreateBucket([]byte("woojits")) + if err != nil { + t.Fatal(err) + } + + // Make sure sequence increments. + if seq, err := widgets.NextSequence(); err != nil { + t.Fatal(err) + } else if seq != 1 { + t.Fatalf("unexpecte sequence: %d", seq) + } + + if seq, err := widgets.NextSequence(); err != nil { + t.Fatal(err) + } else if seq != 2 { + t.Fatalf("unexpected sequence: %d", seq) + } + + // Buckets should be separate. + if seq, err := woojits.NextSequence(); err != nil { + t.Fatal(err) + } else if seq != 1 { + t.Fatalf("unexpected sequence: %d", 1) + } + + return nil + }); err != nil { + t.Fatal(err) + } +} + +// Ensure that a bucket will persist an autoincrementing sequence even if its +// the only thing updated on the bucket. +// https://github.com/boltdb/bolt/issues/296 +func TestBucket_NextSequence_Persist(t *testing.T) { + db := MustOpenDB() + defer db.MustClose() + + if err := db.Update(func(tx *bolt.Tx) error { + if _, err := tx.CreateBucket([]byte("widgets")); err != nil { + t.Fatal(err) + } + return nil + }); err != nil { + t.Fatal(err) + } + + if err := db.Update(func(tx *bolt.Tx) error { + if _, err := tx.Bucket([]byte("widgets")).NextSequence(); err != nil { + t.Fatal(err) + } + return nil + }); err != nil { + t.Fatal(err) + } + + if err := db.Update(func(tx *bolt.Tx) error { + seq, err := tx.Bucket([]byte("widgets")).NextSequence() + if err != nil { + t.Fatalf("unexpected error: %s", err) + } else if seq != 2 { + t.Fatalf("unexpected sequence: %d", seq) + } + return nil + }); err != nil { + t.Fatal(err) + } +} + +// Ensure that retrieving the next sequence on a read-only bucket returns an error. +func TestBucket_NextSequence_ReadOnly(t *testing.T) { + db := MustOpenDB() + defer db.MustClose() + + if err := db.Update(func(tx *bolt.Tx) error { + if _, err := tx.CreateBucket([]byte("widgets")); err != nil { + t.Fatal(err) + } + return nil + }); err != nil { + t.Fatal(err) + } + + if err := db.View(func(tx *bolt.Tx) error { + _, err := tx.Bucket([]byte("widgets")).NextSequence() + if err != bolt.ErrTxNotWritable { + t.Fatalf("unexpected error: %s", err) + } + return nil + }); err != nil { + t.Fatal(err) + } +} + +// Ensure that retrieving the next sequence for a bucket on a closed database return an error. +func TestBucket_NextSequence_Closed(t *testing.T) { + db := MustOpenDB() + defer db.MustClose() + tx, err := db.Begin(true) + if err != nil { + t.Fatal(err) + } + b, err := tx.CreateBucket([]byte("widgets")) + if err != nil { + t.Fatal(err) + } + if err := tx.Rollback(); err != nil { + t.Fatal(err) + } + if _, err := b.NextSequence(); err != bolt.ErrTxClosed { + t.Fatal(err) + } +} + +// Ensure a user can loop over all key/value pairs in a bucket. +func TestBucket_ForEach(t *testing.T) { + db := MustOpenDB() + defer db.MustClose() + + if err := db.Update(func(tx *bolt.Tx) error { + b, err := tx.CreateBucket([]byte("widgets")) + if err != nil { + t.Fatal(err) + } + if err := b.Put([]byte("foo"), []byte("0000")); err != nil { + t.Fatal(err) + } + if err := b.Put([]byte("baz"), []byte("0001")); err != nil { + t.Fatal(err) + } + if err := b.Put([]byte("bar"), []byte("0002")); err != nil { + t.Fatal(err) + } + + var index int + if err := b.ForEach(func(k, v []byte) error { + switch index { + case 0: + if !bytes.Equal(k, []byte("bar")) { + t.Fatalf("unexpected key: %v", k) + } else if !bytes.Equal(v, []byte("0002")) { + t.Fatalf("unexpected value: %v", v) + } + case 1: + if !bytes.Equal(k, []byte("baz")) { + t.Fatalf("unexpected key: %v", k) + } else if !bytes.Equal(v, []byte("0001")) { + t.Fatalf("unexpected value: %v", v) + } + case 2: + if !bytes.Equal(k, []byte("foo")) { + t.Fatalf("unexpected key: %v", k) + } else if !bytes.Equal(v, []byte("0000")) { + t.Fatalf("unexpected value: %v", v) + } + } + index++ + return nil + }); err != nil { + t.Fatal(err) + } + + if index != 3 { + t.Fatalf("unexpected index: %d", index) + } + + return nil + }); err != nil { + t.Fatal(err) + } +} + +// Ensure a database can stop iteration early. +func TestBucket_ForEach_ShortCircuit(t *testing.T) { + db := MustOpenDB() + defer db.MustClose() + if err := db.Update(func(tx *bolt.Tx) error { + b, err := tx.CreateBucket([]byte("widgets")) + if err != nil { + t.Fatal(err) + } + if err := b.Put([]byte("bar"), []byte("0000")); err != nil { + t.Fatal(err) + } + if err := b.Put([]byte("baz"), []byte("0000")); err != nil { + t.Fatal(err) + } + if err := b.Put([]byte("foo"), []byte("0000")); err != nil { + t.Fatal(err) + } + + var index int + if err := tx.Bucket([]byte("widgets")).ForEach(func(k, v []byte) error { + index++ + if bytes.Equal(k, []byte("baz")) { + return errors.New("marker") + } + return nil + }); err == nil || err.Error() != "marker" { + t.Fatalf("unexpected error: %s", err) + } + if index != 2 { + t.Fatalf("unexpected index: %d", index) + } + + return nil + }); err != nil { + t.Fatal(err) + } +} + +// Ensure that looping over a bucket on a closed database returns an error. +func TestBucket_ForEach_Closed(t *testing.T) { + db := MustOpenDB() + defer db.MustClose() + + tx, err := db.Begin(true) + if err != nil { + t.Fatal(err) + } + + b, err := tx.CreateBucket([]byte("widgets")) + if err != nil { + t.Fatal(err) + } + + if err := tx.Rollback(); err != nil { + t.Fatal(err) + } + + if err := b.ForEach(func(k, v []byte) error { return nil }); err != bolt.ErrTxClosed { + t.Fatalf("unexpected error: %s", err) + } +} + +// Ensure that an error is returned when inserting with an empty key. +func TestBucket_Put_EmptyKey(t *testing.T) { + db := MustOpenDB() + defer db.MustClose() + + if err := db.Update(func(tx *bolt.Tx) error { + b, err := tx.CreateBucket([]byte("widgets")) + if err != nil { + t.Fatal(err) + } + if err := b.Put([]byte(""), []byte("bar")); err != bolt.ErrKeyRequired { + t.Fatalf("unexpected error: %s", err) + } + if err := b.Put(nil, []byte("bar")); err != bolt.ErrKeyRequired { + t.Fatalf("unexpected error: %s", err) + } + return nil + }); err != nil { + t.Fatal(err) + } +} + +// Ensure that an error is returned when inserting with a key that's too large. +func TestBucket_Put_KeyTooLarge(t *testing.T) { + db := MustOpenDB() + defer db.MustClose() + if err := db.Update(func(tx *bolt.Tx) error { + b, err := tx.CreateBucket([]byte("widgets")) + if err != nil { + t.Fatal(err) + } + if err := b.Put(make([]byte, 32769), []byte("bar")); err != bolt.ErrKeyTooLarge { + t.Fatalf("unexpected error: %s", err) + } + return nil + }); err != nil { + t.Fatal(err) + } +} + +// Ensure that an error is returned when inserting a value that's too large. +func TestBucket_Put_ValueTooLarge(t *testing.T) { + // Skip this test on DroneCI because the machine is resource constrained. + if os.Getenv("DRONE") == "true" { + t.Skip("not enough RAM for test") + } + + db := MustOpenDB() + defer db.MustClose() + + if err := db.Update(func(tx *bolt.Tx) error { + b, err := tx.CreateBucket([]byte("widgets")) + if err != nil { + t.Fatal(err) + } + if err := b.Put([]byte("foo"), make([]byte, bolt.MaxValueSize+1)); err != bolt.ErrValueTooLarge { + t.Fatalf("unexpected error: %s", err) + } + return nil + }); err != nil { + t.Fatal(err) + } +} + +// Ensure a bucket can calculate stats. +func TestBucket_Stats(t *testing.T) { + db := MustOpenDB() + defer db.MustClose() + + // Add bucket with fewer keys but one big value. + bigKey := []byte("really-big-value") + for i := 0; i < 500; i++ { + if err := db.Update(func(tx *bolt.Tx) error { + b, err := tx.CreateBucketIfNotExists([]byte("woojits")) + if err != nil { + t.Fatal(err) + } + + if err := b.Put([]byte(fmt.Sprintf("%03d", i)), []byte(strconv.Itoa(i))); err != nil { + t.Fatal(err) + } + return nil + }); err != nil { + t.Fatal(err) + } + } + if err := db.Update(func(tx *bolt.Tx) error { + if err := tx.Bucket([]byte("woojits")).Put(bigKey, []byte(strings.Repeat("*", 10000))); err != nil { + t.Fatal(err) + } + return nil + }); err != nil { + t.Fatal(err) + } + + db.MustCheck() + + if err := db.View(func(tx *bolt.Tx) error { + stats := tx.Bucket([]byte("woojits")).Stats() + if stats.BranchPageN != 1 { + t.Fatalf("unexpected BranchPageN: %d", stats.BranchPageN) + } else if stats.BranchOverflowN != 0 { + t.Fatalf("unexpected BranchOverflowN: %d", stats.BranchOverflowN) + } else if stats.LeafPageN != 7 { + t.Fatalf("unexpected LeafPageN: %d", stats.LeafPageN) + } else if stats.LeafOverflowN != 2 { + t.Fatalf("unexpected LeafOverflowN: %d", stats.LeafOverflowN) + } else if stats.KeyN != 501 { + t.Fatalf("unexpected KeyN: %d", stats.KeyN) + } else if stats.Depth != 2 { + t.Fatalf("unexpected Depth: %d", stats.Depth) + } + + branchInuse := 16 // branch page header + branchInuse += 7 * 16 // branch elements + branchInuse += 7 * 3 // branch keys (6 3-byte keys) + if stats.BranchInuse != branchInuse { + t.Fatalf("unexpected BranchInuse: %d", stats.BranchInuse) + } + + leafInuse := 7 * 16 // leaf page header + leafInuse += 501 * 16 // leaf elements + leafInuse += 500*3 + len(bigKey) // leaf keys + leafInuse += 1*10 + 2*90 + 3*400 + 10000 // leaf values + if stats.LeafInuse != leafInuse { + t.Fatalf("unexpected LeafInuse: %d", stats.LeafInuse) + } + + // Only check allocations for 4KB pages. + if os.Getpagesize() == 4096 { + if stats.BranchAlloc != 4096 { + t.Fatalf("unexpected BranchAlloc: %d", stats.BranchAlloc) + } else if stats.LeafAlloc != 36864 { + t.Fatalf("unexpected LeafAlloc: %d", stats.LeafAlloc) + } + } + + if stats.BucketN != 1 { + t.Fatalf("unexpected BucketN: %d", stats.BucketN) + } else if stats.InlineBucketN != 0 { + t.Fatalf("unexpected InlineBucketN: %d", stats.InlineBucketN) + } else if stats.InlineBucketInuse != 0 { + t.Fatalf("unexpected InlineBucketInuse: %d", stats.InlineBucketInuse) + } + + return nil + }); err != nil { + t.Fatal(err) + } +} + +// Ensure a bucket with random insertion utilizes fill percentage correctly. +func TestBucket_Stats_RandomFill(t *testing.T) { + if testing.Short() { + t.Skip("skipping test in short mode.") + } else if os.Getpagesize() != 4096 { + t.Skip("invalid page size for test") + } + + db := MustOpenDB() + defer db.MustClose() + + // Add a set of values in random order. It will be the same random + // order so we can maintain consistency between test runs. + var count int + rand := rand.New(rand.NewSource(42)) + for _, i := range rand.Perm(1000) { + if err := db.Update(func(tx *bolt.Tx) error { + b, err := tx.CreateBucketIfNotExists([]byte("woojits")) + if err != nil { + t.Fatal(err) + } + b.FillPercent = 0.9 + for _, j := range rand.Perm(100) { + index := (j * 10000) + i + if err := b.Put([]byte(fmt.Sprintf("%d000000000000000", index)), []byte("0000000000")); err != nil { + t.Fatal(err) + } + count++ + } + return nil + }); err != nil { + t.Fatal(err) + } + } + + db.MustCheck() + + if err := db.View(func(tx *bolt.Tx) error { + stats := tx.Bucket([]byte("woojits")).Stats() + if stats.KeyN != 100000 { + t.Fatalf("unexpected KeyN: %d", stats.KeyN) + } + + if stats.BranchPageN != 98 { + t.Fatalf("unexpected BranchPageN: %d", stats.BranchPageN) + } else if stats.BranchOverflowN != 0 { + t.Fatalf("unexpected BranchOverflowN: %d", stats.BranchOverflowN) + } else if stats.BranchInuse != 130984 { + t.Fatalf("unexpected BranchInuse: %d", stats.BranchInuse) + } else if stats.BranchAlloc != 401408 { + t.Fatalf("unexpected BranchAlloc: %d", stats.BranchAlloc) + } + + if stats.LeafPageN != 3412 { + t.Fatalf("unexpected LeafPageN: %d", stats.LeafPageN) + } else if stats.LeafOverflowN != 0 { + t.Fatalf("unexpected LeafOverflowN: %d", stats.LeafOverflowN) + } else if stats.LeafInuse != 4742482 { + t.Fatalf("unexpected LeafInuse: %d", stats.LeafInuse) + } else if stats.LeafAlloc != 13975552 { + t.Fatalf("unexpected LeafAlloc: %d", stats.LeafAlloc) + } + return nil + }); err != nil { + t.Fatal(err) + } +} + +// Ensure a bucket can calculate stats. +func TestBucket_Stats_Small(t *testing.T) { + db := MustOpenDB() + defer db.MustClose() + + if err := db.Update(func(tx *bolt.Tx) error { + // Add a bucket that fits on a single root leaf. + b, err := tx.CreateBucket([]byte("whozawhats")) + if err != nil { + t.Fatal(err) + } + if err := b.Put([]byte("foo"), []byte("bar")); err != nil { + t.Fatal(err) + } + + return nil + }); err != nil { + t.Fatal(err) + } + + db.MustCheck() + + if err := db.View(func(tx *bolt.Tx) error { + b := tx.Bucket([]byte("whozawhats")) + stats := b.Stats() + if stats.BranchPageN != 0 { + t.Fatalf("unexpected BranchPageN: %d", stats.BranchPageN) + } else if stats.BranchOverflowN != 0 { + t.Fatalf("unexpected BranchOverflowN: %d", stats.BranchOverflowN) + } else if stats.LeafPageN != 0 { + t.Fatalf("unexpected LeafPageN: %d", stats.LeafPageN) + } else if stats.LeafOverflowN != 0 { + t.Fatalf("unexpected LeafOverflowN: %d", stats.LeafOverflowN) + } else if stats.KeyN != 1 { + t.Fatalf("unexpected KeyN: %d", stats.KeyN) + } else if stats.Depth != 1 { + t.Fatalf("unexpected Depth: %d", stats.Depth) + } else if stats.BranchInuse != 0 { + t.Fatalf("unexpected BranchInuse: %d", stats.BranchInuse) + } else if stats.LeafInuse != 0 { + t.Fatalf("unexpected LeafInuse: %d", stats.LeafInuse) + } + + if os.Getpagesize() == 4096 { + if stats.BranchAlloc != 0 { + t.Fatalf("unexpected BranchAlloc: %d", stats.BranchAlloc) + } else if stats.LeafAlloc != 0 { + t.Fatalf("unexpected LeafAlloc: %d", stats.LeafAlloc) + } + } + + if stats.BucketN != 1 { + t.Fatalf("unexpected BucketN: %d", stats.BucketN) + } else if stats.InlineBucketN != 1 { + t.Fatalf("unexpected InlineBucketN: %d", stats.InlineBucketN) + } else if stats.InlineBucketInuse != 16+16+6 { + t.Fatalf("unexpected InlineBucketInuse: %d", stats.InlineBucketInuse) + } + + return nil + }); err != nil { + t.Fatal(err) + } +} + +func TestBucket_Stats_EmptyBucket(t *testing.T) { + db := MustOpenDB() + defer db.MustClose() + + if err := db.Update(func(tx *bolt.Tx) error { + // Add a bucket that fits on a single root leaf. + if _, err := tx.CreateBucket([]byte("whozawhats")); err != nil { + t.Fatal(err) + } + return nil + }); err != nil { + t.Fatal(err) + } + + db.MustCheck() + + if err := db.View(func(tx *bolt.Tx) error { + b := tx.Bucket([]byte("whozawhats")) + stats := b.Stats() + if stats.BranchPageN != 0 { + t.Fatalf("unexpected BranchPageN: %d", stats.BranchPageN) + } else if stats.BranchOverflowN != 0 { + t.Fatalf("unexpected BranchOverflowN: %d", stats.BranchOverflowN) + } else if stats.LeafPageN != 0 { + t.Fatalf("unexpected LeafPageN: %d", stats.LeafPageN) + } else if stats.LeafOverflowN != 0 { + t.Fatalf("unexpected LeafOverflowN: %d", stats.LeafOverflowN) + } else if stats.KeyN != 0 { + t.Fatalf("unexpected KeyN: %d", stats.KeyN) + } else if stats.Depth != 1 { + t.Fatalf("unexpected Depth: %d", stats.Depth) + } else if stats.BranchInuse != 0 { + t.Fatalf("unexpected BranchInuse: %d", stats.BranchInuse) + } else if stats.LeafInuse != 0 { + t.Fatalf("unexpected LeafInuse: %d", stats.LeafInuse) + } + + if os.Getpagesize() == 4096 { + if stats.BranchAlloc != 0 { + t.Fatalf("unexpected BranchAlloc: %d", stats.BranchAlloc) + } else if stats.LeafAlloc != 0 { + t.Fatalf("unexpected LeafAlloc: %d", stats.LeafAlloc) + } + } + + if stats.BucketN != 1 { + t.Fatalf("unexpected BucketN: %d", stats.BucketN) + } else if stats.InlineBucketN != 1 { + t.Fatalf("unexpected InlineBucketN: %d", stats.InlineBucketN) + } else if stats.InlineBucketInuse != 16 { + t.Fatalf("unexpected InlineBucketInuse: %d", stats.InlineBucketInuse) + } + + return nil + }); err != nil { + t.Fatal(err) + } +} + +// Ensure a bucket can calculate stats. +func TestBucket_Stats_Nested(t *testing.T) { + db := MustOpenDB() + defer db.MustClose() + + if err := db.Update(func(tx *bolt.Tx) error { + b, err := tx.CreateBucket([]byte("foo")) + if err != nil { + t.Fatal(err) + } + for i := 0; i < 100; i++ { + if err := b.Put([]byte(fmt.Sprintf("%02d", i)), []byte(fmt.Sprintf("%02d", i))); err != nil { + t.Fatal(err) + } + } + + bar, err := b.CreateBucket([]byte("bar")) + if err != nil { + t.Fatal(err) + } + for i := 0; i < 10; i++ { + if err := bar.Put([]byte(strconv.Itoa(i)), []byte(strconv.Itoa(i))); err != nil { + t.Fatal(err) + } + } + + baz, err := bar.CreateBucket([]byte("baz")) + if err != nil { + t.Fatal(err) + } + for i := 0; i < 10; i++ { + if err := baz.Put([]byte(strconv.Itoa(i)), []byte(strconv.Itoa(i))); err != nil { + t.Fatal(err) + } + } + + return nil + }); err != nil { + t.Fatal(err) + } + + db.MustCheck() + + if err := db.View(func(tx *bolt.Tx) error { + b := tx.Bucket([]byte("foo")) + stats := b.Stats() + if stats.BranchPageN != 0 { + t.Fatalf("unexpected BranchPageN: %d", stats.BranchPageN) + } else if stats.BranchOverflowN != 0 { + t.Fatalf("unexpected BranchOverflowN: %d", stats.BranchOverflowN) + } else if stats.LeafPageN != 2 { + t.Fatalf("unexpected LeafPageN: %d", stats.LeafPageN) + } else if stats.LeafOverflowN != 0 { + t.Fatalf("unexpected LeafOverflowN: %d", stats.LeafOverflowN) + } else if stats.KeyN != 122 { + t.Fatalf("unexpected KeyN: %d", stats.KeyN) + } else if stats.Depth != 3 { + t.Fatalf("unexpected Depth: %d", stats.Depth) + } else if stats.BranchInuse != 0 { + t.Fatalf("unexpected BranchInuse: %d", stats.BranchInuse) + } + + foo := 16 // foo (pghdr) + foo += 101 * 16 // foo leaf elements + foo += 100*2 + 100*2 // foo leaf key/values + foo += 3 + 16 // foo -> bar key/value + + bar := 16 // bar (pghdr) + bar += 11 * 16 // bar leaf elements + bar += 10 + 10 // bar leaf key/values + bar += 3 + 16 // bar -> baz key/value + + baz := 16 // baz (inline) (pghdr) + baz += 10 * 16 // baz leaf elements + baz += 10 + 10 // baz leaf key/values + + if stats.LeafInuse != foo+bar+baz { + t.Fatalf("unexpected LeafInuse: %d", stats.LeafInuse) + } + + if os.Getpagesize() == 4096 { + if stats.BranchAlloc != 0 { + t.Fatalf("unexpected BranchAlloc: %d", stats.BranchAlloc) + } else if stats.LeafAlloc != 8192 { + t.Fatalf("unexpected LeafAlloc: %d", stats.LeafAlloc) + } + } + + if stats.BucketN != 3 { + t.Fatalf("unexpected BucketN: %d", stats.BucketN) + } else if stats.InlineBucketN != 1 { + t.Fatalf("unexpected InlineBucketN: %d", stats.InlineBucketN) + } else if stats.InlineBucketInuse != baz { + t.Fatalf("unexpected InlineBucketInuse: %d", stats.InlineBucketInuse) + } + + return nil + }); err != nil { + t.Fatal(err) + } +} + +// Ensure a large bucket can calculate stats. +func TestBucket_Stats_Large(t *testing.T) { + if testing.Short() { + t.Skip("skipping test in short mode.") + } + + db := MustOpenDB() + defer db.MustClose() + + var index int + for i := 0; i < 100; i++ { + // Add bucket with lots of keys. + if err := db.Update(func(tx *bolt.Tx) error { + b, err := tx.CreateBucketIfNotExists([]byte("widgets")) + if err != nil { + t.Fatal(err) + } + for i := 0; i < 1000; i++ { + if err := b.Put([]byte(strconv.Itoa(index)), []byte(strconv.Itoa(index))); err != nil { + t.Fatal(err) + } + index++ + } + return nil + }); err != nil { + t.Fatal(err) + } + } + + db.MustCheck() + + if err := db.View(func(tx *bolt.Tx) error { + stats := tx.Bucket([]byte("widgets")).Stats() + if stats.BranchPageN != 13 { + t.Fatalf("unexpected BranchPageN: %d", stats.BranchPageN) + } else if stats.BranchOverflowN != 0 { + t.Fatalf("unexpected BranchOverflowN: %d", stats.BranchOverflowN) + } else if stats.LeafPageN != 1196 { + t.Fatalf("unexpected LeafPageN: %d", stats.LeafPageN) + } else if stats.LeafOverflowN != 0 { + t.Fatalf("unexpected LeafOverflowN: %d", stats.LeafOverflowN) + } else if stats.KeyN != 100000 { + t.Fatalf("unexpected KeyN: %d", stats.KeyN) + } else if stats.Depth != 3 { + t.Fatalf("unexpected Depth: %d", stats.Depth) + } else if stats.BranchInuse != 25257 { + t.Fatalf("unexpected BranchInuse: %d", stats.BranchInuse) + } else if stats.LeafInuse != 2596916 { + t.Fatalf("unexpected LeafInuse: %d", stats.LeafInuse) + } + + if os.Getpagesize() == 4096 { + if stats.BranchAlloc != 53248 { + t.Fatalf("unexpected BranchAlloc: %d", stats.BranchAlloc) + } else if stats.LeafAlloc != 4898816 { + t.Fatalf("unexpected LeafAlloc: %d", stats.LeafAlloc) + } + } + + if stats.BucketN != 1 { + t.Fatalf("unexpected BucketN: %d", stats.BucketN) + } else if stats.InlineBucketN != 0 { + t.Fatalf("unexpected InlineBucketN: %d", stats.InlineBucketN) + } else if stats.InlineBucketInuse != 0 { + t.Fatalf("unexpected InlineBucketInuse: %d", stats.InlineBucketInuse) + } + + return nil + }); err != nil { + t.Fatal(err) + } +} + +// Ensure that a bucket can write random keys and values across multiple transactions. +func TestBucket_Put_Single(t *testing.T) { + if testing.Short() { + t.Skip("skipping test in short mode.") + } + + index := 0 + if err := quick.Check(func(items testdata) bool { + db := MustOpenDB() + defer db.MustClose() + + m := make(map[string][]byte) + + if err := db.Update(func(tx *bolt.Tx) error { + if _, err := tx.CreateBucket([]byte("widgets")); err != nil { + t.Fatal(err) + } + return nil + }); err != nil { + t.Fatal(err) + } + + for _, item := range items { + if err := db.Update(func(tx *bolt.Tx) error { + if err := tx.Bucket([]byte("widgets")).Put(item.Key, item.Value); err != nil { + panic("put error: " + err.Error()) + } + m[string(item.Key)] = item.Value + return nil + }); err != nil { + t.Fatal(err) + } + + // Verify all key/values so far. + if err := db.View(func(tx *bolt.Tx) error { + i := 0 + for k, v := range m { + value := tx.Bucket([]byte("widgets")).Get([]byte(k)) + if !bytes.Equal(value, v) { + t.Logf("value mismatch [run %d] (%d of %d):\nkey: %x\ngot: %x\nexp: %x", index, i, len(m), []byte(k), value, v) + db.CopyTempFile() + t.FailNow() + } + i++ + } + return nil + }); err != nil { + t.Fatal(err) + } + } + + index++ + return true + }, nil); err != nil { + t.Error(err) + } +} + +// Ensure that a transaction can insert multiple key/value pairs at once. +func TestBucket_Put_Multiple(t *testing.T) { + if testing.Short() { + t.Skip("skipping test in short mode.") + } + + if err := quick.Check(func(items testdata) bool { + db := MustOpenDB() + defer db.MustClose() + + // Bulk insert all values. + if err := db.Update(func(tx *bolt.Tx) error { + if _, err := tx.CreateBucket([]byte("widgets")); err != nil { + t.Fatal(err) + } + return nil + }); err != nil { + t.Fatal(err) + } + + if err := db.Update(func(tx *bolt.Tx) error { + b := tx.Bucket([]byte("widgets")) + for _, item := range items { + if err := b.Put(item.Key, item.Value); err != nil { + t.Fatal(err) + } + } + return nil + }); err != nil { + t.Fatal(err) + } + + // Verify all items exist. + if err := db.View(func(tx *bolt.Tx) error { + b := tx.Bucket([]byte("widgets")) + for _, item := range items { + value := b.Get(item.Key) + if !bytes.Equal(item.Value, value) { + db.CopyTempFile() + t.Fatalf("exp=%x; got=%x", item.Value, value) + } + } + return nil + }); err != nil { + t.Fatal(err) + } + + return true + }, qconfig()); err != nil { + t.Error(err) + } +} + +// Ensure that a transaction can delete all key/value pairs and return to a single leaf page. +func TestBucket_Delete_Quick(t *testing.T) { + if testing.Short() { + t.Skip("skipping test in short mode.") + } + + if err := quick.Check(func(items testdata) bool { + db := MustOpenDB() + defer db.MustClose() + + // Bulk insert all values. + if err := db.Update(func(tx *bolt.Tx) error { + if _, err := tx.CreateBucket([]byte("widgets")); err != nil { + t.Fatal(err) + } + return nil + }); err != nil { + t.Fatal(err) + } + + if err := db.Update(func(tx *bolt.Tx) error { + b := tx.Bucket([]byte("widgets")) + for _, item := range items { + if err := b.Put(item.Key, item.Value); err != nil { + t.Fatal(err) + } + } + return nil + }); err != nil { + t.Fatal(err) + } + + // Remove items one at a time and check consistency. + for _, item := range items { + if err := db.Update(func(tx *bolt.Tx) error { + return tx.Bucket([]byte("widgets")).Delete(item.Key) + }); err != nil { + t.Fatal(err) + } + } + + // Anything before our deletion index should be nil. + if err := db.View(func(tx *bolt.Tx) error { + if err := tx.Bucket([]byte("widgets")).ForEach(func(k, v []byte) error { + t.Fatalf("bucket should be empty; found: %06x", trunc(k, 3)) + return nil + }); err != nil { + t.Fatal(err) + } + return nil + }); err != nil { + t.Fatal(err) + } + + return true + }, qconfig()); err != nil { + t.Error(err) + } +} + +func ExampleBucket_Put() { + // Open the database. + db, err := bolt.Open(tempfile(), 0666, nil) + if err != nil { + log.Fatal(err) + } + defer os.Remove(db.Path()) + + // Start a write transaction. + if err := db.Update(func(tx *bolt.Tx) error { + // Create a bucket. + b, err := tx.CreateBucket([]byte("widgets")) + if err != nil { + return err + } + + // Set the value "bar" for the key "foo". + if err := b.Put([]byte("foo"), []byte("bar")); err != nil { + return err + } + return nil + }); err != nil { + log.Fatal(err) + } + + // Read value back in a different read-only transaction. + if err := db.View(func(tx *bolt.Tx) error { + value := tx.Bucket([]byte("widgets")).Get([]byte("foo")) + fmt.Printf("The value of 'foo' is: %s\n", value) + return nil + }); err != nil { + log.Fatal(err) + } + + // Close database to release file lock. + if err := db.Close(); err != nil { + log.Fatal(err) + } + + // Output: + // The value of 'foo' is: bar +} + +func ExampleBucket_Delete() { + // Open the database. + db, err := bolt.Open(tempfile(), 0666, nil) + if err != nil { + log.Fatal(err) + } + defer os.Remove(db.Path()) + + // Start a write transaction. + if err := db.Update(func(tx *bolt.Tx) error { + // Create a bucket. + b, err := tx.CreateBucket([]byte("widgets")) + if err != nil { + return err + } + + // Set the value "bar" for the key "foo". + if err := b.Put([]byte("foo"), []byte("bar")); err != nil { + return err + } + + // Retrieve the key back from the database and verify it. + value := b.Get([]byte("foo")) + fmt.Printf("The value of 'foo' was: %s\n", value) + + return nil + }); err != nil { + log.Fatal(err) + } + + // Delete the key in a different write transaction. + if err := db.Update(func(tx *bolt.Tx) error { + return tx.Bucket([]byte("widgets")).Delete([]byte("foo")) + }); err != nil { + log.Fatal(err) + } + + // Retrieve the key again. + if err := db.View(func(tx *bolt.Tx) error { + value := tx.Bucket([]byte("widgets")).Get([]byte("foo")) + if value == nil { + fmt.Printf("The value of 'foo' is now: nil\n") + } + return nil + }); err != nil { + log.Fatal(err) + } + + // Close database to release file lock. + if err := db.Close(); err != nil { + log.Fatal(err) + } + + // Output: + // The value of 'foo' was: bar + // The value of 'foo' is now: nil +} + +func ExampleBucket_ForEach() { + // Open the database. + db, err := bolt.Open(tempfile(), 0666, nil) + if err != nil { + log.Fatal(err) + } + defer os.Remove(db.Path()) + + // Insert data into a bucket. + if err := db.Update(func(tx *bolt.Tx) error { + b, err := tx.CreateBucket([]byte("animals")) + if err != nil { + return err + } + + if err := b.Put([]byte("dog"), []byte("fun")); err != nil { + return err + } + if err := b.Put([]byte("cat"), []byte("lame")); err != nil { + return err + } + if err := b.Put([]byte("liger"), []byte("awesome")); err != nil { + return err + } + + // Iterate over items in sorted key order. + if err := b.ForEach(func(k, v []byte) error { + fmt.Printf("A %s is %s.\n", k, v) + return nil + }); err != nil { + return err + } + + return nil + }); err != nil { + log.Fatal(err) + } + + // Close database to release file lock. + if err := db.Close(); err != nil { + log.Fatal(err) + } + + // Output: + // A cat is lame. + // A dog is fun. + // A liger is awesome. +} diff --git a/vendor/github.com/boltdb/bolt/cmd/bolt/main.go b/vendor/github.com/boltdb/bolt/cmd/bolt/main.go new file mode 100644 index 000000000..b96e6f735 --- /dev/null +++ b/vendor/github.com/boltdb/bolt/cmd/bolt/main.go @@ -0,0 +1,1532 @@ +package main + +import ( + "bytes" + "encoding/binary" + "errors" + "flag" + "fmt" + "io" + "io/ioutil" + "math/rand" + "os" + "runtime" + "runtime/pprof" + "strconv" + "strings" + "time" + "unicode" + "unicode/utf8" + "unsafe" + + "github.com/boltdb/bolt" +) + +var ( + // ErrUsage is returned when a usage message was printed and the process + // should simply exit with an error. + ErrUsage = errors.New("usage") + + // ErrUnknownCommand is returned when a CLI command is not specified. + ErrUnknownCommand = errors.New("unknown command") + + // ErrPathRequired is returned when the path to a Bolt database is not specified. + ErrPathRequired = errors.New("path required") + + // ErrFileNotFound is returned when a Bolt database does not exist. + ErrFileNotFound = errors.New("file not found") + + // ErrInvalidValue is returned when a benchmark reads an unexpected value. + ErrInvalidValue = errors.New("invalid value") + + // ErrCorrupt is returned when a checking a data file finds errors. + ErrCorrupt = errors.New("invalid value") + + // ErrNonDivisibleBatchSize is returned when the batch size can't be evenly + // divided by the iteration count. + ErrNonDivisibleBatchSize = errors.New("number of iterations must be divisible by the batch size") + + // ErrPageIDRequired is returned when a required page id is not specified. + ErrPageIDRequired = errors.New("page id required") + + // ErrPageNotFound is returned when specifying a page above the high water mark. + ErrPageNotFound = errors.New("page not found") + + // ErrPageFreed is returned when reading a page that has already been freed. + ErrPageFreed = errors.New("page freed") +) + +// PageHeaderSize represents the size of the bolt.page header. +const PageHeaderSize = 16 + +func main() { + m := NewMain() + if err := m.Run(os.Args[1:]...); err == ErrUsage { + os.Exit(2) + } else if err != nil { + fmt.Println(err.Error()) + os.Exit(1) + } +} + +// Main represents the main program execution. +type Main struct { + Stdin io.Reader + Stdout io.Writer + Stderr io.Writer +} + +// NewMain returns a new instance of Main connect to the standard input/output. +func NewMain() *Main { + return &Main{ + Stdin: os.Stdin, + Stdout: os.Stdout, + Stderr: os.Stderr, + } +} + +// Run executes the program. +func (m *Main) Run(args ...string) error { + // Require a command at the beginning. + if len(args) == 0 || strings.HasPrefix(args[0], "-") { + fmt.Fprintln(m.Stderr, m.Usage()) + return ErrUsage + } + + // Execute command. + switch args[0] { + case "help": + fmt.Fprintln(m.Stderr, m.Usage()) + return ErrUsage + case "bench": + return newBenchCommand(m).Run(args[1:]...) + case "check": + return newCheckCommand(m).Run(args[1:]...) + case "dump": + return newDumpCommand(m).Run(args[1:]...) + case "info": + return newInfoCommand(m).Run(args[1:]...) + case "page": + return newPageCommand(m).Run(args[1:]...) + case "pages": + return newPagesCommand(m).Run(args[1:]...) + case "stats": + return newStatsCommand(m).Run(args[1:]...) + default: + return ErrUnknownCommand + } +} + +// Usage returns the help message. +func (m *Main) Usage() string { + return strings.TrimLeft(` +Bolt is a tool for inspecting bolt databases. + +Usage: + + bolt command [arguments] + +The commands are: + + bench run synthetic benchmark against bolt + check verifies integrity of bolt database + info print basic info + help print this screen + pages print list of pages with their types + stats iterate over all pages and generate usage stats + +Use "bolt [command] -h" for more information about a command. +`, "\n") +} + +// CheckCommand represents the "check" command execution. +type CheckCommand struct { + Stdin io.Reader + Stdout io.Writer + Stderr io.Writer +} + +// NewCheckCommand returns a CheckCommand. +func newCheckCommand(m *Main) *CheckCommand { + return &CheckCommand{ + Stdin: m.Stdin, + Stdout: m.Stdout, + Stderr: m.Stderr, + } +} + +// Run executes the command. +func (cmd *CheckCommand) Run(args ...string) error { + // Parse flags. + fs := flag.NewFlagSet("", flag.ContinueOnError) + help := fs.Bool("h", false, "") + if err := fs.Parse(args); err != nil { + return err + } else if *help { + fmt.Fprintln(cmd.Stderr, cmd.Usage()) + return ErrUsage + } + + // Require database path. + path := fs.Arg(0) + if path == "" { + return ErrPathRequired + } else if _, err := os.Stat(path); os.IsNotExist(err) { + return ErrFileNotFound + } + + // Open database. + db, err := bolt.Open(path, 0666, nil) + if err != nil { + return err + } + defer db.Close() + + // Perform consistency check. + return db.View(func(tx *bolt.Tx) error { + var count int + ch := tx.Check() + loop: + for { + select { + case err, ok := <-ch: + if !ok { + break loop + } + fmt.Fprintln(cmd.Stdout, err) + count++ + } + } + + // Print summary of errors. + if count > 0 { + fmt.Fprintf(cmd.Stdout, "%d errors found\n", count) + return ErrCorrupt + } + + // Notify user that database is valid. + fmt.Fprintln(cmd.Stdout, "OK") + return nil + }) +} + +// Usage returns the help message. +func (cmd *CheckCommand) Usage() string { + return strings.TrimLeft(` +usage: bolt check PATH + +Check opens a database at PATH and runs an exhaustive check to verify that +all pages are accessible or are marked as freed. It also verifies that no +pages are double referenced. + +Verification errors will stream out as they are found and the process will +return after all pages have been checked. +`, "\n") +} + +// InfoCommand represents the "info" command execution. +type InfoCommand struct { + Stdin io.Reader + Stdout io.Writer + Stderr io.Writer +} + +// NewInfoCommand returns a InfoCommand. +func newInfoCommand(m *Main) *InfoCommand { + return &InfoCommand{ + Stdin: m.Stdin, + Stdout: m.Stdout, + Stderr: m.Stderr, + } +} + +// Run executes the command. +func (cmd *InfoCommand) Run(args ...string) error { + // Parse flags. + fs := flag.NewFlagSet("", flag.ContinueOnError) + help := fs.Bool("h", false, "") + if err := fs.Parse(args); err != nil { + return err + } else if *help { + fmt.Fprintln(cmd.Stderr, cmd.Usage()) + return ErrUsage + } + + // Require database path. + path := fs.Arg(0) + if path == "" { + return ErrPathRequired + } else if _, err := os.Stat(path); os.IsNotExist(err) { + return ErrFileNotFound + } + + // Open the database. + db, err := bolt.Open(path, 0666, nil) + if err != nil { + return err + } + defer db.Close() + + // Print basic database info. + info := db.Info() + fmt.Fprintf(cmd.Stdout, "Page Size: %d\n", info.PageSize) + + return nil +} + +// Usage returns the help message. +func (cmd *InfoCommand) Usage() string { + return strings.TrimLeft(` +usage: bolt info PATH + +Info prints basic information about the Bolt database at PATH. +`, "\n") +} + +// DumpCommand represents the "dump" command execution. +type DumpCommand struct { + Stdin io.Reader + Stdout io.Writer + Stderr io.Writer +} + +// newDumpCommand returns a DumpCommand. +func newDumpCommand(m *Main) *DumpCommand { + return &DumpCommand{ + Stdin: m.Stdin, + Stdout: m.Stdout, + Stderr: m.Stderr, + } +} + +// Run executes the command. +func (cmd *DumpCommand) Run(args ...string) error { + // Parse flags. + fs := flag.NewFlagSet("", flag.ContinueOnError) + help := fs.Bool("h", false, "") + if err := fs.Parse(args); err != nil { + return err + } else if *help { + fmt.Fprintln(cmd.Stderr, cmd.Usage()) + return ErrUsage + } + + // Require database path and page id. + path := fs.Arg(0) + if path == "" { + return ErrPathRequired + } else if _, err := os.Stat(path); os.IsNotExist(err) { + return ErrFileNotFound + } + + // Read page ids. + pageIDs, err := atois(fs.Args()[1:]) + if err != nil { + return err + } else if len(pageIDs) == 0 { + return ErrPageIDRequired + } + + // Open database to retrieve page size. + pageSize, err := ReadPageSize(path) + if err != nil { + return err + } + + // Open database file handler. + f, err := os.Open(path) + if err != nil { + return err + } + defer func() { _ = f.Close() }() + + // Print each page listed. + for i, pageID := range pageIDs { + // Print a separator. + if i > 0 { + fmt.Fprintln(cmd.Stdout, "===============================================") + } + + // Print page to stdout. + if err := cmd.PrintPage(cmd.Stdout, f, pageID, pageSize); err != nil { + return err + } + } + + return nil +} + +// PrintPage prints a given page as hexidecimal. +func (cmd *DumpCommand) PrintPage(w io.Writer, r io.ReaderAt, pageID int, pageSize int) error { + const bytesPerLineN = 16 + + // Read page into buffer. + buf := make([]byte, pageSize) + addr := pageID * pageSize + if n, err := r.ReadAt(buf, int64(addr)); err != nil { + return err + } else if n != pageSize { + return io.ErrUnexpectedEOF + } + + // Write out to writer in 16-byte lines. + var prev []byte + var skipped bool + for offset := 0; offset < pageSize; offset += bytesPerLineN { + // Retrieve current 16-byte line. + line := buf[offset : offset+bytesPerLineN] + isLastLine := (offset == (pageSize - bytesPerLineN)) + + // If it's the same as the previous line then print a skip. + if bytes.Equal(line, prev) && !isLastLine { + if !skipped { + fmt.Fprintf(w, "%07x *\n", addr+offset) + skipped = true + } + } else { + // Print line as hexadecimal in 2-byte groups. + fmt.Fprintf(w, "%07x %04x %04x %04x %04x %04x %04x %04x %04x\n", addr+offset, + line[0:2], line[2:4], line[4:6], line[6:8], + line[8:10], line[10:12], line[12:14], line[14:16], + ) + + skipped = false + } + + // Save the previous line. + prev = line + } + fmt.Fprint(w, "\n") + + return nil +} + +// Usage returns the help message. +func (cmd *DumpCommand) Usage() string { + return strings.TrimLeft(` +usage: bolt dump -page PAGEID PATH + +Dump prints a hexidecimal dump of a single page. +`, "\n") +} + +// PageCommand represents the "page" command execution. +type PageCommand struct { + Stdin io.Reader + Stdout io.Writer + Stderr io.Writer +} + +// newPageCommand returns a PageCommand. +func newPageCommand(m *Main) *PageCommand { + return &PageCommand{ + Stdin: m.Stdin, + Stdout: m.Stdout, + Stderr: m.Stderr, + } +} + +// Run executes the command. +func (cmd *PageCommand) Run(args ...string) error { + // Parse flags. + fs := flag.NewFlagSet("", flag.ContinueOnError) + help := fs.Bool("h", false, "") + if err := fs.Parse(args); err != nil { + return err + } else if *help { + fmt.Fprintln(cmd.Stderr, cmd.Usage()) + return ErrUsage + } + + // Require database path and page id. + path := fs.Arg(0) + if path == "" { + return ErrPathRequired + } else if _, err := os.Stat(path); os.IsNotExist(err) { + return ErrFileNotFound + } + + // Read page ids. + pageIDs, err := atois(fs.Args()[1:]) + if err != nil { + return err + } else if len(pageIDs) == 0 { + return ErrPageIDRequired + } + + // Open database file handler. + f, err := os.Open(path) + if err != nil { + return err + } + defer func() { _ = f.Close() }() + + // Print each page listed. + for i, pageID := range pageIDs { + // Print a separator. + if i > 0 { + fmt.Fprintln(cmd.Stdout, "===============================================") + } + + // Retrieve page info and page size. + p, buf, err := ReadPage(path, pageID) + if err != nil { + return err + } + + // Print basic page info. + fmt.Fprintf(cmd.Stdout, "Page ID: %d\n", p.id) + fmt.Fprintf(cmd.Stdout, "Page Type: %s\n", p.Type()) + fmt.Fprintf(cmd.Stdout, "Total Size: %d bytes\n", len(buf)) + + // Print type-specific data. + switch p.Type() { + case "meta": + err = cmd.PrintMeta(cmd.Stdout, buf) + case "leaf": + err = cmd.PrintLeaf(cmd.Stdout, buf) + case "branch": + err = cmd.PrintBranch(cmd.Stdout, buf) + case "freelist": + err = cmd.PrintFreelist(cmd.Stdout, buf) + } + if err != nil { + return err + } + } + + return nil +} + +// PrintMeta prints the data from the meta page. +func (cmd *PageCommand) PrintMeta(w io.Writer, buf []byte) error { + m := (*meta)(unsafe.Pointer(&buf[PageHeaderSize])) + fmt.Fprintf(w, "Version: %d\n", m.version) + fmt.Fprintf(w, "Page Size: %d bytes\n", m.pageSize) + fmt.Fprintf(w, "Flags: %08x\n", m.flags) + fmt.Fprintf(w, "Root: \n", m.root.root) + fmt.Fprintf(w, "Freelist: \n", m.freelist) + fmt.Fprintf(w, "HWM: \n", m.pgid) + fmt.Fprintf(w, "Txn ID: %d\n", m.txid) + fmt.Fprintf(w, "Checksum: %016x\n", m.checksum) + fmt.Fprintf(w, "\n") + return nil +} + +// PrintLeaf prints the data for a leaf page. +func (cmd *PageCommand) PrintLeaf(w io.Writer, buf []byte) error { + p := (*page)(unsafe.Pointer(&buf[0])) + + // Print number of items. + fmt.Fprintf(w, "Item Count: %d\n", p.count) + fmt.Fprintf(w, "\n") + + // Print each key/value. + for i := uint16(0); i < p.count; i++ { + e := p.leafPageElement(i) + + // Format key as string. + var k string + if isPrintable(string(e.key())) { + k = fmt.Sprintf("%q", string(e.key())) + } else { + k = fmt.Sprintf("%x", string(e.key())) + } + + // Format value as string. + var v string + if (e.flags & uint32(bucketLeafFlag)) != 0 { + b := (*bucket)(unsafe.Pointer(&e.value()[0])) + v = fmt.Sprintf("", b.root, b.sequence) + } else if isPrintable(string(e.value())) { + k = fmt.Sprintf("%q", string(e.value())) + } else { + k = fmt.Sprintf("%x", string(e.value())) + } + + fmt.Fprintf(w, "%s: %s\n", k, v) + } + fmt.Fprintf(w, "\n") + return nil +} + +// PrintBranch prints the data for a leaf page. +func (cmd *PageCommand) PrintBranch(w io.Writer, buf []byte) error { + p := (*page)(unsafe.Pointer(&buf[0])) + + // Print number of items. + fmt.Fprintf(w, "Item Count: %d\n", p.count) + fmt.Fprintf(w, "\n") + + // Print each key/value. + for i := uint16(0); i < p.count; i++ { + e := p.branchPageElement(i) + + // Format key as string. + var k string + if isPrintable(string(e.key())) { + k = fmt.Sprintf("%q", string(e.key())) + } else { + k = fmt.Sprintf("%x", string(e.key())) + } + + fmt.Fprintf(w, "%s: \n", k, e.pgid) + } + fmt.Fprintf(w, "\n") + return nil +} + +// PrintFreelist prints the data for a freelist page. +func (cmd *PageCommand) PrintFreelist(w io.Writer, buf []byte) error { + p := (*page)(unsafe.Pointer(&buf[0])) + + // Print number of items. + fmt.Fprintf(w, "Item Count: %d\n", p.count) + fmt.Fprintf(w, "\n") + + // Print each page in the freelist. + ids := (*[maxAllocSize]pgid)(unsafe.Pointer(&p.ptr)) + for i := uint16(0); i < p.count; i++ { + fmt.Fprintf(w, "%d\n", ids[i]) + } + fmt.Fprintf(w, "\n") + return nil +} + +// PrintPage prints a given page as hexidecimal. +func (cmd *PageCommand) PrintPage(w io.Writer, r io.ReaderAt, pageID int, pageSize int) error { + const bytesPerLineN = 16 + + // Read page into buffer. + buf := make([]byte, pageSize) + addr := pageID * pageSize + if n, err := r.ReadAt(buf, int64(addr)); err != nil { + return err + } else if n != pageSize { + return io.ErrUnexpectedEOF + } + + // Write out to writer in 16-byte lines. + var prev []byte + var skipped bool + for offset := 0; offset < pageSize; offset += bytesPerLineN { + // Retrieve current 16-byte line. + line := buf[offset : offset+bytesPerLineN] + isLastLine := (offset == (pageSize - bytesPerLineN)) + + // If it's the same as the previous line then print a skip. + if bytes.Equal(line, prev) && !isLastLine { + if !skipped { + fmt.Fprintf(w, "%07x *\n", addr+offset) + skipped = true + } + } else { + // Print line as hexadecimal in 2-byte groups. + fmt.Fprintf(w, "%07x %04x %04x %04x %04x %04x %04x %04x %04x\n", addr+offset, + line[0:2], line[2:4], line[4:6], line[6:8], + line[8:10], line[10:12], line[12:14], line[14:16], + ) + + skipped = false + } + + // Save the previous line. + prev = line + } + fmt.Fprint(w, "\n") + + return nil +} + +// Usage returns the help message. +func (cmd *PageCommand) Usage() string { + return strings.TrimLeft(` +usage: bolt page -page PATH pageid [pageid...] + +Page prints one or more pages in human readable format. +`, "\n") +} + +// PagesCommand represents the "pages" command execution. +type PagesCommand struct { + Stdin io.Reader + Stdout io.Writer + Stderr io.Writer +} + +// NewPagesCommand returns a PagesCommand. +func newPagesCommand(m *Main) *PagesCommand { + return &PagesCommand{ + Stdin: m.Stdin, + Stdout: m.Stdout, + Stderr: m.Stderr, + } +} + +// Run executes the command. +func (cmd *PagesCommand) Run(args ...string) error { + // Parse flags. + fs := flag.NewFlagSet("", flag.ContinueOnError) + help := fs.Bool("h", false, "") + if err := fs.Parse(args); err != nil { + return err + } else if *help { + fmt.Fprintln(cmd.Stderr, cmd.Usage()) + return ErrUsage + } + + // Require database path. + path := fs.Arg(0) + if path == "" { + return ErrPathRequired + } else if _, err := os.Stat(path); os.IsNotExist(err) { + return ErrFileNotFound + } + + // Open database. + db, err := bolt.Open(path, 0666, nil) + if err != nil { + return err + } + defer func() { _ = db.Close() }() + + // Write header. + fmt.Fprintln(cmd.Stdout, "ID TYPE ITEMS OVRFLW") + fmt.Fprintln(cmd.Stdout, "======== ========== ====== ======") + + return db.Update(func(tx *bolt.Tx) error { + var id int + for { + p, err := tx.Page(id) + if err != nil { + return &PageError{ID: id, Err: err} + } else if p == nil { + break + } + + // Only display count and overflow if this is a non-free page. + var count, overflow string + if p.Type != "free" { + count = strconv.Itoa(p.Count) + if p.OverflowCount > 0 { + overflow = strconv.Itoa(p.OverflowCount) + } + } + + // Print table row. + fmt.Fprintf(cmd.Stdout, "%-8d %-10s %-6s %-6s\n", p.ID, p.Type, count, overflow) + + // Move to the next non-overflow page. + id += 1 + if p.Type != "free" { + id += p.OverflowCount + } + } + return nil + }) +} + +// Usage returns the help message. +func (cmd *PagesCommand) Usage() string { + return strings.TrimLeft(` +usage: bolt pages PATH + +Pages prints a table of pages with their type (meta, leaf, branch, freelist). +Leaf and branch pages will show a key count in the "items" column while the +freelist will show the number of free pages in the "items" column. + +The "overflow" column shows the number of blocks that the page spills over +into. Normally there is no overflow but large keys and values can cause +a single page to take up multiple blocks. +`, "\n") +} + +// StatsCommand represents the "stats" command execution. +type StatsCommand struct { + Stdin io.Reader + Stdout io.Writer + Stderr io.Writer +} + +// NewStatsCommand returns a StatsCommand. +func newStatsCommand(m *Main) *StatsCommand { + return &StatsCommand{ + Stdin: m.Stdin, + Stdout: m.Stdout, + Stderr: m.Stderr, + } +} + +// Run executes the command. +func (cmd *StatsCommand) Run(args ...string) error { + // Parse flags. + fs := flag.NewFlagSet("", flag.ContinueOnError) + help := fs.Bool("h", false, "") + if err := fs.Parse(args); err != nil { + return err + } else if *help { + fmt.Fprintln(cmd.Stderr, cmd.Usage()) + return ErrUsage + } + + // Require database path. + path, prefix := fs.Arg(0), fs.Arg(1) + if path == "" { + return ErrPathRequired + } else if _, err := os.Stat(path); os.IsNotExist(err) { + return ErrFileNotFound + } + + // Open database. + db, err := bolt.Open(path, 0666, nil) + if err != nil { + return err + } + defer db.Close() + + return db.View(func(tx *bolt.Tx) error { + var s bolt.BucketStats + var count int + if err := tx.ForEach(func(name []byte, b *bolt.Bucket) error { + if bytes.HasPrefix(name, []byte(prefix)) { + s.Add(b.Stats()) + count += 1 + } + return nil + }); err != nil { + return err + } + + fmt.Fprintf(cmd.Stdout, "Aggregate statistics for %d buckets\n\n", count) + + fmt.Fprintln(cmd.Stdout, "Page count statistics") + fmt.Fprintf(cmd.Stdout, "\tNumber of logical branch pages: %d\n", s.BranchPageN) + fmt.Fprintf(cmd.Stdout, "\tNumber of physical branch overflow pages: %d\n", s.BranchOverflowN) + fmt.Fprintf(cmd.Stdout, "\tNumber of logical leaf pages: %d\n", s.LeafPageN) + fmt.Fprintf(cmd.Stdout, "\tNumber of physical leaf overflow pages: %d\n", s.LeafOverflowN) + + fmt.Fprintln(cmd.Stdout, "Tree statistics") + fmt.Fprintf(cmd.Stdout, "\tNumber of keys/value pairs: %d\n", s.KeyN) + fmt.Fprintf(cmd.Stdout, "\tNumber of levels in B+tree: %d\n", s.Depth) + + fmt.Fprintln(cmd.Stdout, "Page size utilization") + fmt.Fprintf(cmd.Stdout, "\tBytes allocated for physical branch pages: %d\n", s.BranchAlloc) + var percentage int + if s.BranchAlloc != 0 { + percentage = int(float32(s.BranchInuse) * 100.0 / float32(s.BranchAlloc)) + } + fmt.Fprintf(cmd.Stdout, "\tBytes actually used for branch data: %d (%d%%)\n", s.BranchInuse, percentage) + fmt.Fprintf(cmd.Stdout, "\tBytes allocated for physical leaf pages: %d\n", s.LeafAlloc) + percentage = 0 + if s.LeafAlloc != 0 { + percentage = int(float32(s.LeafInuse) * 100.0 / float32(s.LeafAlloc)) + } + fmt.Fprintf(cmd.Stdout, "\tBytes actually used for leaf data: %d (%d%%)\n", s.LeafInuse, percentage) + + fmt.Fprintln(cmd.Stdout, "Bucket statistics") + fmt.Fprintf(cmd.Stdout, "\tTotal number of buckets: %d\n", s.BucketN) + percentage = 0 + if s.BucketN != 0 { + percentage = int(float32(s.InlineBucketN) * 100.0 / float32(s.BucketN)) + } + fmt.Fprintf(cmd.Stdout, "\tTotal number on inlined buckets: %d (%d%%)\n", s.InlineBucketN, percentage) + percentage = 0 + if s.LeafInuse != 0 { + percentage = int(float32(s.InlineBucketInuse) * 100.0 / float32(s.LeafInuse)) + } + fmt.Fprintf(cmd.Stdout, "\tBytes used for inlined buckets: %d (%d%%)\n", s.InlineBucketInuse, percentage) + + return nil + }) +} + +// Usage returns the help message. +func (cmd *StatsCommand) Usage() string { + return strings.TrimLeft(` +usage: bolt stats PATH + +Stats performs an extensive search of the database to track every page +reference. It starts at the current meta page and recursively iterates +through every accessible bucket. + +The following errors can be reported: + + already freed + The page is referenced more than once in the freelist. + + unreachable unfreed + The page is not referenced by a bucket or in the freelist. + + reachable freed + The page is referenced by a bucket but is also in the freelist. + + out of bounds + A page is referenced that is above the high water mark. + + multiple references + A page is referenced by more than one other page. + + invalid type + The page type is not "meta", "leaf", "branch", or "freelist". + +No errors should occur in your database. However, if for some reason you +experience corruption, please submit a ticket to the Bolt project page: + + https://github.com/boltdb/bolt/issues +`, "\n") +} + +var benchBucketName = []byte("bench") + +// BenchCommand represents the "bench" command execution. +type BenchCommand struct { + Stdin io.Reader + Stdout io.Writer + Stderr io.Writer +} + +// NewBenchCommand returns a BenchCommand using the +func newBenchCommand(m *Main) *BenchCommand { + return &BenchCommand{ + Stdin: m.Stdin, + Stdout: m.Stdout, + Stderr: m.Stderr, + } +} + +// Run executes the "bench" command. +func (cmd *BenchCommand) Run(args ...string) error { + // Parse CLI arguments. + options, err := cmd.ParseFlags(args) + if err != nil { + return err + } + + // Remove path if "-work" is not set. Otherwise keep path. + if options.Work { + fmt.Fprintf(cmd.Stdout, "work: %s\n", options.Path) + } else { + defer os.Remove(options.Path) + } + + // Create database. + db, err := bolt.Open(options.Path, 0666, nil) + if err != nil { + return err + } + db.NoSync = options.NoSync + defer db.Close() + + // Write to the database. + var results BenchResults + if err := cmd.runWrites(db, options, &results); err != nil { + return fmt.Errorf("write: %v", err) + } + + // Read from the database. + if err := cmd.runReads(db, options, &results); err != nil { + return fmt.Errorf("bench: read: %s", err) + } + + // Print results. + fmt.Fprintf(os.Stderr, "# Write\t%v\t(%v/op)\t(%v op/sec)\n", results.WriteDuration, results.WriteOpDuration(), results.WriteOpsPerSecond()) + fmt.Fprintf(os.Stderr, "# Read\t%v\t(%v/op)\t(%v op/sec)\n", results.ReadDuration, results.ReadOpDuration(), results.ReadOpsPerSecond()) + fmt.Fprintln(os.Stderr, "") + return nil +} + +// ParseFlags parses the command line flags. +func (cmd *BenchCommand) ParseFlags(args []string) (*BenchOptions, error) { + var options BenchOptions + + // Parse flagset. + fs := flag.NewFlagSet("", flag.ContinueOnError) + fs.StringVar(&options.ProfileMode, "profile-mode", "rw", "") + fs.StringVar(&options.WriteMode, "write-mode", "seq", "") + fs.StringVar(&options.ReadMode, "read-mode", "seq", "") + fs.IntVar(&options.Iterations, "count", 1000, "") + fs.IntVar(&options.BatchSize, "batch-size", 0, "") + fs.IntVar(&options.KeySize, "key-size", 8, "") + fs.IntVar(&options.ValueSize, "value-size", 32, "") + fs.StringVar(&options.CPUProfile, "cpuprofile", "", "") + fs.StringVar(&options.MemProfile, "memprofile", "", "") + fs.StringVar(&options.BlockProfile, "blockprofile", "", "") + fs.Float64Var(&options.FillPercent, "fill-percent", bolt.DefaultFillPercent, "") + fs.BoolVar(&options.NoSync, "no-sync", false, "") + fs.BoolVar(&options.Work, "work", false, "") + fs.StringVar(&options.Path, "path", "", "") + fs.SetOutput(cmd.Stderr) + if err := fs.Parse(args); err != nil { + return nil, err + } + + // Set batch size to iteration size if not set. + // Require that batch size can be evenly divided by the iteration count. + if options.BatchSize == 0 { + options.BatchSize = options.Iterations + } else if options.Iterations%options.BatchSize != 0 { + return nil, ErrNonDivisibleBatchSize + } + + // Generate temp path if one is not passed in. + if options.Path == "" { + f, err := ioutil.TempFile("", "bolt-bench-") + if err != nil { + return nil, fmt.Errorf("temp file: %s", err) + } + f.Close() + os.Remove(f.Name()) + options.Path = f.Name() + } + + return &options, nil +} + +// Writes to the database. +func (cmd *BenchCommand) runWrites(db *bolt.DB, options *BenchOptions, results *BenchResults) error { + // Start profiling for writes. + if options.ProfileMode == "rw" || options.ProfileMode == "w" { + cmd.startProfiling(options) + } + + t := time.Now() + + var err error + switch options.WriteMode { + case "seq": + err = cmd.runWritesSequential(db, options, results) + case "rnd": + err = cmd.runWritesRandom(db, options, results) + case "seq-nest": + err = cmd.runWritesSequentialNested(db, options, results) + case "rnd-nest": + err = cmd.runWritesRandomNested(db, options, results) + default: + return fmt.Errorf("invalid write mode: %s", options.WriteMode) + } + + // Save time to write. + results.WriteDuration = time.Since(t) + + // Stop profiling for writes only. + if options.ProfileMode == "w" { + cmd.stopProfiling() + } + + return err +} + +func (cmd *BenchCommand) runWritesSequential(db *bolt.DB, options *BenchOptions, results *BenchResults) error { + var i = uint32(0) + return cmd.runWritesWithSource(db, options, results, func() uint32 { i++; return i }) +} + +func (cmd *BenchCommand) runWritesRandom(db *bolt.DB, options *BenchOptions, results *BenchResults) error { + r := rand.New(rand.NewSource(time.Now().UnixNano())) + return cmd.runWritesWithSource(db, options, results, func() uint32 { return r.Uint32() }) +} + +func (cmd *BenchCommand) runWritesSequentialNested(db *bolt.DB, options *BenchOptions, results *BenchResults) error { + var i = uint32(0) + return cmd.runWritesWithSource(db, options, results, func() uint32 { i++; return i }) +} + +func (cmd *BenchCommand) runWritesRandomNested(db *bolt.DB, options *BenchOptions, results *BenchResults) error { + r := rand.New(rand.NewSource(time.Now().UnixNano())) + return cmd.runWritesWithSource(db, options, results, func() uint32 { return r.Uint32() }) +} + +func (cmd *BenchCommand) runWritesWithSource(db *bolt.DB, options *BenchOptions, results *BenchResults, keySource func() uint32) error { + results.WriteOps = options.Iterations + + for i := 0; i < options.Iterations; i += options.BatchSize { + if err := db.Update(func(tx *bolt.Tx) error { + b, _ := tx.CreateBucketIfNotExists(benchBucketName) + b.FillPercent = options.FillPercent + + for j := 0; j < options.BatchSize; j++ { + key := make([]byte, options.KeySize) + value := make([]byte, options.ValueSize) + + // Write key as uint32. + binary.BigEndian.PutUint32(key, keySource()) + + // Insert key/value. + if err := b.Put(key, value); err != nil { + return err + } + } + + return nil + }); err != nil { + return err + } + } + return nil +} + +func (cmd *BenchCommand) runWritesNestedWithSource(db *bolt.DB, options *BenchOptions, results *BenchResults, keySource func() uint32) error { + results.WriteOps = options.Iterations + + for i := 0; i < options.Iterations; i += options.BatchSize { + if err := db.Update(func(tx *bolt.Tx) error { + top, err := tx.CreateBucketIfNotExists(benchBucketName) + if err != nil { + return err + } + top.FillPercent = options.FillPercent + + // Create bucket key. + name := make([]byte, options.KeySize) + binary.BigEndian.PutUint32(name, keySource()) + + // Create bucket. + b, err := top.CreateBucketIfNotExists(name) + if err != nil { + return err + } + b.FillPercent = options.FillPercent + + for j := 0; j < options.BatchSize; j++ { + var key = make([]byte, options.KeySize) + var value = make([]byte, options.ValueSize) + + // Generate key as uint32. + binary.BigEndian.PutUint32(key, keySource()) + + // Insert value into subbucket. + if err := b.Put(key, value); err != nil { + return err + } + } + + return nil + }); err != nil { + return err + } + } + return nil +} + +// Reads from the database. +func (cmd *BenchCommand) runReads(db *bolt.DB, options *BenchOptions, results *BenchResults) error { + // Start profiling for reads. + if options.ProfileMode == "r" { + cmd.startProfiling(options) + } + + t := time.Now() + + var err error + switch options.ReadMode { + case "seq": + switch options.WriteMode { + case "seq-nest", "rnd-nest": + err = cmd.runReadsSequentialNested(db, options, results) + default: + err = cmd.runReadsSequential(db, options, results) + } + default: + return fmt.Errorf("invalid read mode: %s", options.ReadMode) + } + + // Save read time. + results.ReadDuration = time.Since(t) + + // Stop profiling for reads. + if options.ProfileMode == "rw" || options.ProfileMode == "r" { + cmd.stopProfiling() + } + + return err +} + +func (cmd *BenchCommand) runReadsSequential(db *bolt.DB, options *BenchOptions, results *BenchResults) error { + return db.View(func(tx *bolt.Tx) error { + t := time.Now() + + for { + var count int + + c := tx.Bucket(benchBucketName).Cursor() + for k, v := c.First(); k != nil; k, v = c.Next() { + if v == nil { + return errors.New("invalid value") + } + count++ + } + + if options.WriteMode == "seq" && count != options.Iterations { + return fmt.Errorf("read seq: iter mismatch: expected %d, got %d", options.Iterations, count) + } + + results.ReadOps += count + + // Make sure we do this for at least a second. + if time.Since(t) >= time.Second { + break + } + } + + return nil + }) +} + +func (cmd *BenchCommand) runReadsSequentialNested(db *bolt.DB, options *BenchOptions, results *BenchResults) error { + return db.View(func(tx *bolt.Tx) error { + t := time.Now() + + for { + var count int + var top = tx.Bucket(benchBucketName) + if err := top.ForEach(func(name, _ []byte) error { + c := top.Bucket(name).Cursor() + for k, v := c.First(); k != nil; k, v = c.Next() { + if v == nil { + return ErrInvalidValue + } + count++ + } + return nil + }); err != nil { + return err + } + + if options.WriteMode == "seq-nest" && count != options.Iterations { + return fmt.Errorf("read seq-nest: iter mismatch: expected %d, got %d", options.Iterations, count) + } + + results.ReadOps += count + + // Make sure we do this for at least a second. + if time.Since(t) >= time.Second { + break + } + } + + return nil + }) +} + +// File handlers for the various profiles. +var cpuprofile, memprofile, blockprofile *os.File + +// Starts all profiles set on the options. +func (cmd *BenchCommand) startProfiling(options *BenchOptions) { + var err error + + // Start CPU profiling. + if options.CPUProfile != "" { + cpuprofile, err = os.Create(options.CPUProfile) + if err != nil { + fmt.Fprintf(cmd.Stderr, "bench: could not create cpu profile %q: %v\n", options.CPUProfile, err) + os.Exit(1) + } + pprof.StartCPUProfile(cpuprofile) + } + + // Start memory profiling. + if options.MemProfile != "" { + memprofile, err = os.Create(options.MemProfile) + if err != nil { + fmt.Fprintf(cmd.Stderr, "bench: could not create memory profile %q: %v\n", options.MemProfile, err) + os.Exit(1) + } + runtime.MemProfileRate = 4096 + } + + // Start fatal profiling. + if options.BlockProfile != "" { + blockprofile, err = os.Create(options.BlockProfile) + if err != nil { + fmt.Fprintf(cmd.Stderr, "bench: could not create block profile %q: %v\n", options.BlockProfile, err) + os.Exit(1) + } + runtime.SetBlockProfileRate(1) + } +} + +// Stops all profiles. +func (cmd *BenchCommand) stopProfiling() { + if cpuprofile != nil { + pprof.StopCPUProfile() + cpuprofile.Close() + cpuprofile = nil + } + + if memprofile != nil { + pprof.Lookup("heap").WriteTo(memprofile, 0) + memprofile.Close() + memprofile = nil + } + + if blockprofile != nil { + pprof.Lookup("block").WriteTo(blockprofile, 0) + blockprofile.Close() + blockprofile = nil + runtime.SetBlockProfileRate(0) + } +} + +// BenchOptions represents the set of options that can be passed to "bolt bench". +type BenchOptions struct { + ProfileMode string + WriteMode string + ReadMode string + Iterations int + BatchSize int + KeySize int + ValueSize int + CPUProfile string + MemProfile string + BlockProfile string + StatsInterval time.Duration + FillPercent float64 + NoSync bool + Work bool + Path string +} + +// BenchResults represents the performance results of the benchmark. +type BenchResults struct { + WriteOps int + WriteDuration time.Duration + ReadOps int + ReadDuration time.Duration +} + +// Returns the duration for a single write operation. +func (r *BenchResults) WriteOpDuration() time.Duration { + if r.WriteOps == 0 { + return 0 + } + return r.WriteDuration / time.Duration(r.WriteOps) +} + +// Returns average number of write operations that can be performed per second. +func (r *BenchResults) WriteOpsPerSecond() int { + var op = r.WriteOpDuration() + if op == 0 { + return 0 + } + return int(time.Second) / int(op) +} + +// Returns the duration for a single read operation. +func (r *BenchResults) ReadOpDuration() time.Duration { + if r.ReadOps == 0 { + return 0 + } + return r.ReadDuration / time.Duration(r.ReadOps) +} + +// Returns average number of read operations that can be performed per second. +func (r *BenchResults) ReadOpsPerSecond() int { + var op = r.ReadOpDuration() + if op == 0 { + return 0 + } + return int(time.Second) / int(op) +} + +type PageError struct { + ID int + Err error +} + +func (e *PageError) Error() string { + return fmt.Sprintf("page error: id=%d, err=%s", e.ID, e.Err) +} + +// isPrintable returns true if the string is valid unicode and contains only printable runes. +func isPrintable(s string) bool { + if !utf8.ValidString(s) { + return false + } + for _, ch := range s { + if !unicode.IsPrint(ch) { + return false + } + } + return true +} + +// ReadPage reads page info & full page data from a path. +// This is not transactionally safe. +func ReadPage(path string, pageID int) (*page, []byte, error) { + // Find page size. + pageSize, err := ReadPageSize(path) + if err != nil { + return nil, nil, fmt.Errorf("read page size: %s", err) + } + + // Open database file. + f, err := os.Open(path) + if err != nil { + return nil, nil, err + } + defer f.Close() + + // Read one block into buffer. + buf := make([]byte, pageSize) + if n, err := f.ReadAt(buf, int64(pageID*pageSize)); err != nil { + return nil, nil, err + } else if n != len(buf) { + return nil, nil, io.ErrUnexpectedEOF + } + + // Determine total number of blocks. + p := (*page)(unsafe.Pointer(&buf[0])) + overflowN := p.overflow + + // Re-read entire page (with overflow) into buffer. + buf = make([]byte, (int(overflowN)+1)*pageSize) + if n, err := f.ReadAt(buf, int64(pageID*pageSize)); err != nil { + return nil, nil, err + } else if n != len(buf) { + return nil, nil, io.ErrUnexpectedEOF + } + p = (*page)(unsafe.Pointer(&buf[0])) + + return p, buf, nil +} + +// ReadPageSize reads page size a path. +// This is not transactionally safe. +func ReadPageSize(path string) (int, error) { + // Open database file. + f, err := os.Open(path) + if err != nil { + return 0, err + } + defer f.Close() + + // Read 4KB chunk. + buf := make([]byte, 4096) + if _, err := io.ReadFull(f, buf); err != nil { + return 0, err + } + + // Read page size from metadata. + m := (*meta)(unsafe.Pointer(&buf[PageHeaderSize])) + return int(m.pageSize), nil +} + +// atois parses a slice of strings into integers. +func atois(strs []string) ([]int, error) { + var a []int + for _, str := range strs { + i, err := strconv.Atoi(str) + if err != nil { + return nil, err + } + a = append(a, i) + } + return a, nil +} + +// DO NOT EDIT. Copied from the "bolt" package. +const maxAllocSize = 0xFFFFFFF + +// DO NOT EDIT. Copied from the "bolt" package. +const ( + branchPageFlag = 0x01 + leafPageFlag = 0x02 + metaPageFlag = 0x04 + freelistPageFlag = 0x10 +) + +// DO NOT EDIT. Copied from the "bolt" package. +const bucketLeafFlag = 0x01 + +// DO NOT EDIT. Copied from the "bolt" package. +type pgid uint64 + +// DO NOT EDIT. Copied from the "bolt" package. +type txid uint64 + +// DO NOT EDIT. Copied from the "bolt" package. +type meta struct { + magic uint32 + version uint32 + pageSize uint32 + flags uint32 + root bucket + freelist pgid + pgid pgid + txid txid + checksum uint64 +} + +// DO NOT EDIT. Copied from the "bolt" package. +type bucket struct { + root pgid + sequence uint64 +} + +// DO NOT EDIT. Copied from the "bolt" package. +type page struct { + id pgid + flags uint16 + count uint16 + overflow uint32 + ptr uintptr +} + +// DO NOT EDIT. Copied from the "bolt" package. +func (p *page) Type() string { + if (p.flags & branchPageFlag) != 0 { + return "branch" + } else if (p.flags & leafPageFlag) != 0 { + return "leaf" + } else if (p.flags & metaPageFlag) != 0 { + return "meta" + } else if (p.flags & freelistPageFlag) != 0 { + return "freelist" + } + return fmt.Sprintf("unknown<%02x>", p.flags) +} + +// DO NOT EDIT. Copied from the "bolt" package. +func (p *page) leafPageElement(index uint16) *leafPageElement { + n := &((*[0x7FFFFFF]leafPageElement)(unsafe.Pointer(&p.ptr)))[index] + return n +} + +// DO NOT EDIT. Copied from the "bolt" package. +func (p *page) branchPageElement(index uint16) *branchPageElement { + return &((*[0x7FFFFFF]branchPageElement)(unsafe.Pointer(&p.ptr)))[index] +} + +// DO NOT EDIT. Copied from the "bolt" package. +type branchPageElement struct { + pos uint32 + ksize uint32 + pgid pgid +} + +// DO NOT EDIT. Copied from the "bolt" package. +func (n *branchPageElement) key() []byte { + buf := (*[maxAllocSize]byte)(unsafe.Pointer(n)) + return buf[n.pos : n.pos+n.ksize] +} + +// DO NOT EDIT. Copied from the "bolt" package. +type leafPageElement struct { + flags uint32 + pos uint32 + ksize uint32 + vsize uint32 +} + +// DO NOT EDIT. Copied from the "bolt" package. +func (n *leafPageElement) key() []byte { + buf := (*[maxAllocSize]byte)(unsafe.Pointer(n)) + return buf[n.pos : n.pos+n.ksize] +} + +// DO NOT EDIT. Copied from the "bolt" package. +func (n *leafPageElement) value() []byte { + buf := (*[maxAllocSize]byte)(unsafe.Pointer(n)) + return buf[n.pos+n.ksize : n.pos+n.ksize+n.vsize] +} diff --git a/vendor/github.com/boltdb/bolt/cmd/bolt/main_test.go b/vendor/github.com/boltdb/bolt/cmd/bolt/main_test.go new file mode 100644 index 000000000..c378b790d --- /dev/null +++ b/vendor/github.com/boltdb/bolt/cmd/bolt/main_test.go @@ -0,0 +1,185 @@ +package main_test + +import ( + "bytes" + "io/ioutil" + "os" + "strconv" + "testing" + + "github.com/boltdb/bolt" + "github.com/boltdb/bolt/cmd/bolt" +) + +// Ensure the "info" command can print information about a database. +func TestInfoCommand_Run(t *testing.T) { + db := MustOpen(0666, nil) + db.DB.Close() + defer db.Close() + + // Run the info command. + m := NewMain() + if err := m.Run("info", db.Path); err != nil { + t.Fatal(err) + } +} + +// Ensure the "stats" command executes correctly with an empty database. +func TestStatsCommand_Run_EmptyDatabase(t *testing.T) { + // Ignore + if os.Getpagesize() != 4096 { + t.Skip("system does not use 4KB page size") + } + + db := MustOpen(0666, nil) + defer db.Close() + db.DB.Close() + + // Generate expected result. + exp := "Aggregate statistics for 0 buckets\n\n" + + "Page count statistics\n" + + "\tNumber of logical branch pages: 0\n" + + "\tNumber of physical branch overflow pages: 0\n" + + "\tNumber of logical leaf pages: 0\n" + + "\tNumber of physical leaf overflow pages: 0\n" + + "Tree statistics\n" + + "\tNumber of keys/value pairs: 0\n" + + "\tNumber of levels in B+tree: 0\n" + + "Page size utilization\n" + + "\tBytes allocated for physical branch pages: 0\n" + + "\tBytes actually used for branch data: 0 (0%)\n" + + "\tBytes allocated for physical leaf pages: 0\n" + + "\tBytes actually used for leaf data: 0 (0%)\n" + + "Bucket statistics\n" + + "\tTotal number of buckets: 0\n" + + "\tTotal number on inlined buckets: 0 (0%)\n" + + "\tBytes used for inlined buckets: 0 (0%)\n" + + // Run the command. + m := NewMain() + if err := m.Run("stats", db.Path); err != nil { + t.Fatal(err) + } else if m.Stdout.String() != exp { + t.Fatalf("unexpected stdout:\n\n%s", m.Stdout.String()) + } +} + +// Ensure the "stats" command can execute correctly. +func TestStatsCommand_Run(t *testing.T) { + // Ignore + if os.Getpagesize() != 4096 { + t.Skip("system does not use 4KB page size") + } + + db := MustOpen(0666, nil) + defer db.Close() + + if err := db.Update(func(tx *bolt.Tx) error { + // Create "foo" bucket. + b, err := tx.CreateBucket([]byte("foo")) + if err != nil { + return err + } + for i := 0; i < 10; i++ { + if err := b.Put([]byte(strconv.Itoa(i)), []byte(strconv.Itoa(i))); err != nil { + return err + } + } + + // Create "bar" bucket. + b, err = tx.CreateBucket([]byte("bar")) + if err != nil { + return err + } + for i := 0; i < 100; i++ { + if err := b.Put([]byte(strconv.Itoa(i)), []byte(strconv.Itoa(i))); err != nil { + return err + } + } + + // Create "baz" bucket. + b, err = tx.CreateBucket([]byte("baz")) + if err != nil { + return err + } + if err := b.Put([]byte("key"), []byte("value")); err != nil { + return err + } + + return nil + }); err != nil { + t.Fatal(err) + } + db.DB.Close() + + // Generate expected result. + exp := "Aggregate statistics for 3 buckets\n\n" + + "Page count statistics\n" + + "\tNumber of logical branch pages: 0\n" + + "\tNumber of physical branch overflow pages: 0\n" + + "\tNumber of logical leaf pages: 1\n" + + "\tNumber of physical leaf overflow pages: 0\n" + + "Tree statistics\n" + + "\tNumber of keys/value pairs: 111\n" + + "\tNumber of levels in B+tree: 1\n" + + "Page size utilization\n" + + "\tBytes allocated for physical branch pages: 0\n" + + "\tBytes actually used for branch data: 0 (0%)\n" + + "\tBytes allocated for physical leaf pages: 4096\n" + + "\tBytes actually used for leaf data: 1996 (48%)\n" + + "Bucket statistics\n" + + "\tTotal number of buckets: 3\n" + + "\tTotal number on inlined buckets: 2 (66%)\n" + + "\tBytes used for inlined buckets: 236 (11%)\n" + + // Run the command. + m := NewMain() + if err := m.Run("stats", db.Path); err != nil { + t.Fatal(err) + } else if m.Stdout.String() != exp { + t.Fatalf("unexpected stdout:\n\n%s", m.Stdout.String()) + } +} + +// Main represents a test wrapper for main.Main that records output. +type Main struct { + *main.Main + Stdin bytes.Buffer + Stdout bytes.Buffer + Stderr bytes.Buffer +} + +// NewMain returns a new instance of Main. +func NewMain() *Main { + m := &Main{Main: main.NewMain()} + m.Main.Stdin = &m.Stdin + m.Main.Stdout = &m.Stdout + m.Main.Stderr = &m.Stderr + return m +} + +// MustOpen creates a Bolt database in a temporary location. +func MustOpen(mode os.FileMode, options *bolt.Options) *DB { + // Create temporary path. + f, _ := ioutil.TempFile("", "bolt-") + f.Close() + os.Remove(f.Name()) + + db, err := bolt.Open(f.Name(), mode, options) + if err != nil { + panic(err.Error()) + } + return &DB{DB: db, Path: f.Name()} +} + +// DB is a test wrapper for bolt.DB. +type DB struct { + *bolt.DB + Path string +} + +// Close closes and removes the database. +func (db *DB) Close() error { + defer os.Remove(db.Path) + return db.DB.Close() +} diff --git a/vendor/github.com/boltdb/bolt/cursor_test.go b/vendor/github.com/boltdb/bolt/cursor_test.go new file mode 100644 index 000000000..562d60f9a --- /dev/null +++ b/vendor/github.com/boltdb/bolt/cursor_test.go @@ -0,0 +1,817 @@ +package bolt_test + +import ( + "bytes" + "encoding/binary" + "fmt" + "log" + "os" + "reflect" + "sort" + "testing" + "testing/quick" + + "github.com/boltdb/bolt" +) + +// Ensure that a cursor can return a reference to the bucket that created it. +func TestCursor_Bucket(t *testing.T) { + db := MustOpenDB() + defer db.MustClose() + if err := db.Update(func(tx *bolt.Tx) error { + b, err := tx.CreateBucket([]byte("widgets")) + if err != nil { + t.Fatal(err) + } + if cb := b.Cursor().Bucket(); !reflect.DeepEqual(cb, b) { + t.Fatal("cursor bucket mismatch") + } + return nil + }); err != nil { + t.Fatal(err) + } +} + +// Ensure that a Tx cursor can seek to the appropriate keys. +func TestCursor_Seek(t *testing.T) { + db := MustOpenDB() + defer db.MustClose() + if err := db.Update(func(tx *bolt.Tx) error { + b, err := tx.CreateBucket([]byte("widgets")) + if err != nil { + t.Fatal(err) + } + if err := b.Put([]byte("foo"), []byte("0001")); err != nil { + t.Fatal(err) + } + if err := b.Put([]byte("bar"), []byte("0002")); err != nil { + t.Fatal(err) + } + if err := b.Put([]byte("baz"), []byte("0003")); err != nil { + t.Fatal(err) + } + + if _, err := b.CreateBucket([]byte("bkt")); err != nil { + t.Fatal(err) + } + return nil + }); err != nil { + t.Fatal(err) + } + + if err := db.View(func(tx *bolt.Tx) error { + c := tx.Bucket([]byte("widgets")).Cursor() + + // Exact match should go to the key. + if k, v := c.Seek([]byte("bar")); !bytes.Equal(k, []byte("bar")) { + t.Fatalf("unexpected key: %v", k) + } else if !bytes.Equal(v, []byte("0002")) { + t.Fatalf("unexpected value: %v", v) + } + + // Inexact match should go to the next key. + if k, v := c.Seek([]byte("bas")); !bytes.Equal(k, []byte("baz")) { + t.Fatalf("unexpected key: %v", k) + } else if !bytes.Equal(v, []byte("0003")) { + t.Fatalf("unexpected value: %v", v) + } + + // Low key should go to the first key. + if k, v := c.Seek([]byte("")); !bytes.Equal(k, []byte("bar")) { + t.Fatalf("unexpected key: %v", k) + } else if !bytes.Equal(v, []byte("0002")) { + t.Fatalf("unexpected value: %v", v) + } + + // High key should return no key. + if k, v := c.Seek([]byte("zzz")); k != nil { + t.Fatalf("expected nil key: %v", k) + } else if v != nil { + t.Fatalf("expected nil value: %v", v) + } + + // Buckets should return their key but no value. + if k, v := c.Seek([]byte("bkt")); !bytes.Equal(k, []byte("bkt")) { + t.Fatalf("unexpected key: %v", k) + } else if v != nil { + t.Fatalf("expected nil value: %v", v) + } + + return nil + }); err != nil { + t.Fatal(err) + } +} + +func TestCursor_Delete(t *testing.T) { + db := MustOpenDB() + defer db.MustClose() + + const count = 1000 + + // Insert every other key between 0 and $count. + if err := db.Update(func(tx *bolt.Tx) error { + b, err := tx.CreateBucket([]byte("widgets")) + if err != nil { + t.Fatal(err) + } + for i := 0; i < count; i += 1 { + k := make([]byte, 8) + binary.BigEndian.PutUint64(k, uint64(i)) + if err := b.Put(k, make([]byte, 100)); err != nil { + t.Fatal(err) + } + } + if _, err := b.CreateBucket([]byte("sub")); err != nil { + t.Fatal(err) + } + return nil + }); err != nil { + t.Fatal(err) + } + + if err := db.Update(func(tx *bolt.Tx) error { + c := tx.Bucket([]byte("widgets")).Cursor() + bound := make([]byte, 8) + binary.BigEndian.PutUint64(bound, uint64(count/2)) + for key, _ := c.First(); bytes.Compare(key, bound) < 0; key, _ = c.Next() { + if err := c.Delete(); err != nil { + t.Fatal(err) + } + } + + c.Seek([]byte("sub")) + if err := c.Delete(); err != bolt.ErrIncompatibleValue { + t.Fatalf("unexpected error: %s", err) + } + + return nil + }); err != nil { + t.Fatal(err) + } + + if err := db.View(func(tx *bolt.Tx) error { + stats := tx.Bucket([]byte("widgets")).Stats() + if stats.KeyN != count/2+1 { + t.Fatalf("unexpected KeyN: %d", stats.KeyN) + } + return nil + }); err != nil { + t.Fatal(err) + } +} + +// Ensure that a Tx cursor can seek to the appropriate keys when there are a +// large number of keys. This test also checks that seek will always move +// forward to the next key. +// +// Related: https://github.com/boltdb/bolt/pull/187 +func TestCursor_Seek_Large(t *testing.T) { + db := MustOpenDB() + defer db.MustClose() + + var count = 10000 + + // Insert every other key between 0 and $count. + if err := db.Update(func(tx *bolt.Tx) error { + b, err := tx.CreateBucket([]byte("widgets")) + if err != nil { + t.Fatal(err) + } + + for i := 0; i < count; i += 100 { + for j := i; j < i+100; j += 2 { + k := make([]byte, 8) + binary.BigEndian.PutUint64(k, uint64(j)) + if err := b.Put(k, make([]byte, 100)); err != nil { + t.Fatal(err) + } + } + } + return nil + }); err != nil { + t.Fatal(err) + } + + if err := db.View(func(tx *bolt.Tx) error { + c := tx.Bucket([]byte("widgets")).Cursor() + for i := 0; i < count; i++ { + seek := make([]byte, 8) + binary.BigEndian.PutUint64(seek, uint64(i)) + + k, _ := c.Seek(seek) + + // The last seek is beyond the end of the the range so + // it should return nil. + if i == count-1 { + if k != nil { + t.Fatal("expected nil key") + } + continue + } + + // Otherwise we should seek to the exact key or the next key. + num := binary.BigEndian.Uint64(k) + if i%2 == 0 { + if num != uint64(i) { + t.Fatalf("unexpected num: %d", num) + } + } else { + if num != uint64(i+1) { + t.Fatalf("unexpected num: %d", num) + } + } + } + + return nil + }); err != nil { + t.Fatal(err) + } +} + +// Ensure that a cursor can iterate over an empty bucket without error. +func TestCursor_EmptyBucket(t *testing.T) { + db := MustOpenDB() + defer db.MustClose() + if err := db.Update(func(tx *bolt.Tx) error { + _, err := tx.CreateBucket([]byte("widgets")) + return err + }); err != nil { + t.Fatal(err) + } + + if err := db.View(func(tx *bolt.Tx) error { + c := tx.Bucket([]byte("widgets")).Cursor() + k, v := c.First() + if k != nil { + t.Fatalf("unexpected key: %v", k) + } else if v != nil { + t.Fatalf("unexpected value: %v", v) + } + return nil + }); err != nil { + t.Fatal(err) + } +} + +// Ensure that a Tx cursor can reverse iterate over an empty bucket without error. +func TestCursor_EmptyBucketReverse(t *testing.T) { + db := MustOpenDB() + defer db.MustClose() + + if err := db.Update(func(tx *bolt.Tx) error { + _, err := tx.CreateBucket([]byte("widgets")) + return err + }); err != nil { + t.Fatal(err) + } + if err := db.View(func(tx *bolt.Tx) error { + c := tx.Bucket([]byte("widgets")).Cursor() + k, v := c.Last() + if k != nil { + t.Fatalf("unexpected key: %v", k) + } else if v != nil { + t.Fatalf("unexpected value: %v", v) + } + return nil + }); err != nil { + t.Fatal(err) + } +} + +// Ensure that a Tx cursor can iterate over a single root with a couple elements. +func TestCursor_Iterate_Leaf(t *testing.T) { + db := MustOpenDB() + defer db.MustClose() + + if err := db.Update(func(tx *bolt.Tx) error { + b, err := tx.CreateBucket([]byte("widgets")) + if err != nil { + t.Fatal(err) + } + if err := b.Put([]byte("baz"), []byte{}); err != nil { + t.Fatal(err) + } + if err := b.Put([]byte("foo"), []byte{0}); err != nil { + t.Fatal(err) + } + if err := b.Put([]byte("bar"), []byte{1}); err != nil { + t.Fatal(err) + } + return nil + }); err != nil { + t.Fatal(err) + } + tx, err := db.Begin(false) + if err != nil { + t.Fatal(err) + } + defer func() { _ = tx.Rollback() }() + + c := tx.Bucket([]byte("widgets")).Cursor() + + k, v := c.First() + if !bytes.Equal(k, []byte("bar")) { + t.Fatalf("unexpected key: %v", k) + } else if !bytes.Equal(v, []byte{1}) { + t.Fatalf("unexpected value: %v", v) + } + + k, v = c.Next() + if !bytes.Equal(k, []byte("baz")) { + t.Fatalf("unexpected key: %v", k) + } else if !bytes.Equal(v, []byte{}) { + t.Fatalf("unexpected value: %v", v) + } + + k, v = c.Next() + if !bytes.Equal(k, []byte("foo")) { + t.Fatalf("unexpected key: %v", k) + } else if !bytes.Equal(v, []byte{0}) { + t.Fatalf("unexpected value: %v", v) + } + + k, v = c.Next() + if k != nil { + t.Fatalf("expected nil key: %v", k) + } else if v != nil { + t.Fatalf("expected nil value: %v", v) + } + + k, v = c.Next() + if k != nil { + t.Fatalf("expected nil key: %v", k) + } else if v != nil { + t.Fatalf("expected nil value: %v", v) + } + + if err := tx.Rollback(); err != nil { + t.Fatal(err) + } +} + +// Ensure that a Tx cursor can iterate in reverse over a single root with a couple elements. +func TestCursor_LeafRootReverse(t *testing.T) { + db := MustOpenDB() + defer db.MustClose() + + if err := db.Update(func(tx *bolt.Tx) error { + b, err := tx.CreateBucket([]byte("widgets")) + if err != nil { + t.Fatal(err) + } + if err := b.Put([]byte("baz"), []byte{}); err != nil { + t.Fatal(err) + } + if err := b.Put([]byte("foo"), []byte{0}); err != nil { + t.Fatal(err) + } + if err := b.Put([]byte("bar"), []byte{1}); err != nil { + t.Fatal(err) + } + return nil + }); err != nil { + t.Fatal(err) + } + tx, err := db.Begin(false) + if err != nil { + t.Fatal(err) + } + c := tx.Bucket([]byte("widgets")).Cursor() + + if k, v := c.Last(); !bytes.Equal(k, []byte("foo")) { + t.Fatalf("unexpected key: %v", k) + } else if !bytes.Equal(v, []byte{0}) { + t.Fatalf("unexpected value: %v", v) + } + + if k, v := c.Prev(); !bytes.Equal(k, []byte("baz")) { + t.Fatalf("unexpected key: %v", k) + } else if !bytes.Equal(v, []byte{}) { + t.Fatalf("unexpected value: %v", v) + } + + if k, v := c.Prev(); !bytes.Equal(k, []byte("bar")) { + t.Fatalf("unexpected key: %v", k) + } else if !bytes.Equal(v, []byte{1}) { + t.Fatalf("unexpected value: %v", v) + } + + if k, v := c.Prev(); k != nil { + t.Fatalf("expected nil key: %v", k) + } else if v != nil { + t.Fatalf("expected nil value: %v", v) + } + + if k, v := c.Prev(); k != nil { + t.Fatalf("expected nil key: %v", k) + } else if v != nil { + t.Fatalf("expected nil value: %v", v) + } + + if err := tx.Rollback(); err != nil { + t.Fatal(err) + } +} + +// Ensure that a Tx cursor can restart from the beginning. +func TestCursor_Restart(t *testing.T) { + db := MustOpenDB() + defer db.MustClose() + + if err := db.Update(func(tx *bolt.Tx) error { + b, err := tx.CreateBucket([]byte("widgets")) + if err != nil { + t.Fatal(err) + } + if err := b.Put([]byte("bar"), []byte{}); err != nil { + t.Fatal(err) + } + if err := b.Put([]byte("foo"), []byte{}); err != nil { + t.Fatal(err) + } + return nil + }); err != nil { + t.Fatal(err) + } + + tx, err := db.Begin(false) + if err != nil { + t.Fatal(err) + } + c := tx.Bucket([]byte("widgets")).Cursor() + + if k, _ := c.First(); !bytes.Equal(k, []byte("bar")) { + t.Fatalf("unexpected key: %v", k) + } + if k, _ := c.Next(); !bytes.Equal(k, []byte("foo")) { + t.Fatalf("unexpected key: %v", k) + } + + if k, _ := c.First(); !bytes.Equal(k, []byte("bar")) { + t.Fatalf("unexpected key: %v", k) + } + if k, _ := c.Next(); !bytes.Equal(k, []byte("foo")) { + t.Fatalf("unexpected key: %v", k) + } + + if err := tx.Rollback(); err != nil { + t.Fatal(err) + } +} + +// Ensure that a cursor can skip over empty pages that have been deleted. +func TestCursor_First_EmptyPages(t *testing.T) { + db := MustOpenDB() + defer db.MustClose() + + // Create 1000 keys in the "widgets" bucket. + if err := db.Update(func(tx *bolt.Tx) error { + b, err := tx.CreateBucket([]byte("widgets")) + if err != nil { + t.Fatal(err) + } + + for i := 0; i < 1000; i++ { + if err := b.Put(u64tob(uint64(i)), []byte{}); err != nil { + t.Fatal(err) + } + } + + return nil + }); err != nil { + t.Fatal(err) + } + + // Delete half the keys and then try to iterate. + if err := db.Update(func(tx *bolt.Tx) error { + b := tx.Bucket([]byte("widgets")) + for i := 0; i < 600; i++ { + if err := b.Delete(u64tob(uint64(i))); err != nil { + t.Fatal(err) + } + } + + c := b.Cursor() + var n int + for k, _ := c.First(); k != nil; k, _ = c.Next() { + n++ + } + if n != 400 { + t.Fatalf("unexpected key count: %d", n) + } + + return nil + }); err != nil { + t.Fatal(err) + } +} + +// Ensure that a Tx can iterate over all elements in a bucket. +func TestCursor_QuickCheck(t *testing.T) { + f := func(items testdata) bool { + db := MustOpenDB() + defer db.MustClose() + + // Bulk insert all values. + tx, err := db.Begin(true) + if err != nil { + t.Fatal(err) + } + b, err := tx.CreateBucket([]byte("widgets")) + if err != nil { + t.Fatal(err) + } + for _, item := range items { + if err := b.Put(item.Key, item.Value); err != nil { + t.Fatal(err) + } + } + if err := tx.Commit(); err != nil { + t.Fatal(err) + } + + // Sort test data. + sort.Sort(items) + + // Iterate over all items and check consistency. + var index = 0 + tx, err = db.Begin(false) + if err != nil { + t.Fatal(err) + } + + c := tx.Bucket([]byte("widgets")).Cursor() + for k, v := c.First(); k != nil && index < len(items); k, v = c.Next() { + if !bytes.Equal(k, items[index].Key) { + t.Fatalf("unexpected key: %v", k) + } else if !bytes.Equal(v, items[index].Value) { + t.Fatalf("unexpected value: %v", v) + } + index++ + } + if len(items) != index { + t.Fatalf("unexpected item count: %v, expected %v", len(items), index) + } + + if err := tx.Rollback(); err != nil { + t.Fatal(err) + } + + return true + } + if err := quick.Check(f, qconfig()); err != nil { + t.Error(err) + } +} + +// Ensure that a transaction can iterate over all elements in a bucket in reverse. +func TestCursor_QuickCheck_Reverse(t *testing.T) { + f := func(items testdata) bool { + db := MustOpenDB() + defer db.MustClose() + + // Bulk insert all values. + tx, err := db.Begin(true) + if err != nil { + t.Fatal(err) + } + b, err := tx.CreateBucket([]byte("widgets")) + if err != nil { + t.Fatal(err) + } + for _, item := range items { + if err := b.Put(item.Key, item.Value); err != nil { + t.Fatal(err) + } + } + if err := tx.Commit(); err != nil { + t.Fatal(err) + } + + // Sort test data. + sort.Sort(revtestdata(items)) + + // Iterate over all items and check consistency. + var index = 0 + tx, err = db.Begin(false) + if err != nil { + t.Fatal(err) + } + c := tx.Bucket([]byte("widgets")).Cursor() + for k, v := c.Last(); k != nil && index < len(items); k, v = c.Prev() { + if !bytes.Equal(k, items[index].Key) { + t.Fatalf("unexpected key: %v", k) + } else if !bytes.Equal(v, items[index].Value) { + t.Fatalf("unexpected value: %v", v) + } + index++ + } + if len(items) != index { + t.Fatalf("unexpected item count: %v, expected %v", len(items), index) + } + + if err := tx.Rollback(); err != nil { + t.Fatal(err) + } + + return true + } + if err := quick.Check(f, qconfig()); err != nil { + t.Error(err) + } +} + +// Ensure that a Tx cursor can iterate over subbuckets. +func TestCursor_QuickCheck_BucketsOnly(t *testing.T) { + db := MustOpenDB() + defer db.MustClose() + + if err := db.Update(func(tx *bolt.Tx) error { + b, err := tx.CreateBucket([]byte("widgets")) + if err != nil { + t.Fatal(err) + } + if _, err := b.CreateBucket([]byte("foo")); err != nil { + t.Fatal(err) + } + if _, err := b.CreateBucket([]byte("bar")); err != nil { + t.Fatal(err) + } + if _, err := b.CreateBucket([]byte("baz")); err != nil { + t.Fatal(err) + } + return nil + }); err != nil { + t.Fatal(err) + } + + if err := db.View(func(tx *bolt.Tx) error { + var names []string + c := tx.Bucket([]byte("widgets")).Cursor() + for k, v := c.First(); k != nil; k, v = c.Next() { + names = append(names, string(k)) + if v != nil { + t.Fatalf("unexpected value: %v", v) + } + } + if !reflect.DeepEqual(names, []string{"bar", "baz", "foo"}) { + t.Fatalf("unexpected names: %+v", names) + } + return nil + }); err != nil { + t.Fatal(err) + } +} + +// Ensure that a Tx cursor can reverse iterate over subbuckets. +func TestCursor_QuickCheck_BucketsOnly_Reverse(t *testing.T) { + db := MustOpenDB() + defer db.MustClose() + + if err := db.Update(func(tx *bolt.Tx) error { + b, err := tx.CreateBucket([]byte("widgets")) + if err != nil { + t.Fatal(err) + } + if _, err := b.CreateBucket([]byte("foo")); err != nil { + t.Fatal(err) + } + if _, err := b.CreateBucket([]byte("bar")); err != nil { + t.Fatal(err) + } + if _, err := b.CreateBucket([]byte("baz")); err != nil { + t.Fatal(err) + } + return nil + }); err != nil { + t.Fatal(err) + } + + if err := db.View(func(tx *bolt.Tx) error { + var names []string + c := tx.Bucket([]byte("widgets")).Cursor() + for k, v := c.Last(); k != nil; k, v = c.Prev() { + names = append(names, string(k)) + if v != nil { + t.Fatalf("unexpected value: %v", v) + } + } + if !reflect.DeepEqual(names, []string{"foo", "baz", "bar"}) { + t.Fatalf("unexpected names: %+v", names) + } + return nil + }); err != nil { + t.Fatal(err) + } +} + +func ExampleCursor() { + // Open the database. + db, err := bolt.Open(tempfile(), 0666, nil) + if err != nil { + log.Fatal(err) + } + defer os.Remove(db.Path()) + + // Start a read-write transaction. + if err := db.Update(func(tx *bolt.Tx) error { + // Create a new bucket. + b, err := tx.CreateBucket([]byte("animals")) + if err != nil { + return err + } + + // Insert data into a bucket. + if err := b.Put([]byte("dog"), []byte("fun")); err != nil { + log.Fatal(err) + } + if err := b.Put([]byte("cat"), []byte("lame")); err != nil { + log.Fatal(err) + } + if err := b.Put([]byte("liger"), []byte("awesome")); err != nil { + log.Fatal(err) + } + + // Create a cursor for iteration. + c := b.Cursor() + + // Iterate over items in sorted key order. This starts from the + // first key/value pair and updates the k/v variables to the + // next key/value on each iteration. + // + // The loop finishes at the end of the cursor when a nil key is returned. + for k, v := c.First(); k != nil; k, v = c.Next() { + fmt.Printf("A %s is %s.\n", k, v) + } + + return nil + }); err != nil { + log.Fatal(err) + } + + if err := db.Close(); err != nil { + log.Fatal(err) + } + + // Output: + // A cat is lame. + // A dog is fun. + // A liger is awesome. +} + +func ExampleCursor_reverse() { + // Open the database. + db, err := bolt.Open(tempfile(), 0666, nil) + if err != nil { + log.Fatal(err) + } + defer os.Remove(db.Path()) + + // Start a read-write transaction. + if err := db.Update(func(tx *bolt.Tx) error { + // Create a new bucket. + b, err := tx.CreateBucket([]byte("animals")) + if err != nil { + return err + } + + // Insert data into a bucket. + if err := b.Put([]byte("dog"), []byte("fun")); err != nil { + log.Fatal(err) + } + if err := b.Put([]byte("cat"), []byte("lame")); err != nil { + log.Fatal(err) + } + if err := b.Put([]byte("liger"), []byte("awesome")); err != nil { + log.Fatal(err) + } + + // Create a cursor for iteration. + c := b.Cursor() + + // Iterate over items in reverse sorted key order. This starts + // from the last key/value pair and updates the k/v variables to + // the previous key/value on each iteration. + // + // The loop finishes at the beginning of the cursor when a nil key + // is returned. + for k, v := c.Last(); k != nil; k, v = c.Prev() { + fmt.Printf("A %s is %s.\n", k, v) + } + + return nil + }); err != nil { + log.Fatal(err) + } + + // Close the database to release the file lock. + if err := db.Close(); err != nil { + log.Fatal(err) + } + + // Output: + // A liger is awesome. + // A dog is fun. + // A cat is lame. +} diff --git a/vendor/github.com/boltdb/bolt/db_test.go b/vendor/github.com/boltdb/bolt/db_test.go new file mode 100644 index 000000000..74ff93a9f --- /dev/null +++ b/vendor/github.com/boltdb/bolt/db_test.go @@ -0,0 +1,1706 @@ +package bolt_test + +import ( + "bytes" + "encoding/binary" + "errors" + "flag" + "fmt" + "hash/fnv" + "io/ioutil" + "log" + "os" + "path/filepath" + "regexp" + "runtime" + "sort" + "strings" + "sync" + "testing" + "time" + "unsafe" + + "github.com/boltdb/bolt" +) + +var statsFlag = flag.Bool("stats", false, "show performance stats") + +// version is the data file format version. +const version = 2 + +// magic is the marker value to indicate that a file is a Bolt DB. +const magic uint32 = 0xED0CDAED + +// pageSize is the size of one page in the data file. +const pageSize = 4096 + +// pageHeaderSize is the size of a page header. +const pageHeaderSize = 16 + +// meta represents a simplified version of a database meta page for testing. +type meta struct { + magic uint32 + version uint32 + _ uint32 + _ uint32 + _ [16]byte + _ uint64 + pgid uint64 + _ uint64 + checksum uint64 +} + +// Ensure that a database can be opened without error. +func TestOpen(t *testing.T) { + path := tempfile() + db, err := bolt.Open(path, 0666, nil) + if err != nil { + t.Fatal(err) + } else if db == nil { + t.Fatal("expected db") + } + + if s := db.Path(); s != path { + t.Fatalf("unexpected path: %s", s) + } + + if err := db.Close(); err != nil { + t.Fatal(err) + } +} + +// Ensure that opening a database with a blank path returns an error. +func TestOpen_ErrPathRequired(t *testing.T) { + _, err := bolt.Open("", 0666, nil) + if err == nil { + t.Fatalf("expected error") + } +} + +// Ensure that opening a database with a bad path returns an error. +func TestOpen_ErrNotExists(t *testing.T) { + _, err := bolt.Open(filepath.Join(tempfile(), "bad-path"), 0666, nil) + if err == nil { + t.Fatal("expected error") + } +} + +// Ensure that opening a file that is not a Bolt database returns ErrInvalid. +func TestOpen_ErrInvalid(t *testing.T) { + path := tempfile() + + f, err := os.Create(path) + if err != nil { + t.Fatal(err) + } + if _, err := fmt.Fprintln(f, "this is not a bolt database"); err != nil { + t.Fatal(err) + } + if err := f.Close(); err != nil { + t.Fatal(err) + } + defer os.Remove(path) + + if _, err := bolt.Open(path, 0666, nil); err != bolt.ErrInvalid { + t.Fatalf("unexpected error: %s", err) + } +} + +// Ensure that opening a file with two invalid versions returns ErrVersionMismatch. +func TestOpen_ErrVersionMismatch(t *testing.T) { + if pageSize != os.Getpagesize() { + t.Skip("page size mismatch") + } + + // Create empty database. + db := MustOpenDB() + path := db.Path() + defer db.MustClose() + + // Close database. + if err := db.DB.Close(); err != nil { + t.Fatal(err) + } + + // Read data file. + buf, err := ioutil.ReadFile(path) + if err != nil { + t.Fatal(err) + } + + // Rewrite meta pages. + meta0 := (*meta)(unsafe.Pointer(&buf[pageHeaderSize])) + meta0.version++ + meta1 := (*meta)(unsafe.Pointer(&buf[pageSize+pageHeaderSize])) + meta1.version++ + if err := ioutil.WriteFile(path, buf, 0666); err != nil { + t.Fatal(err) + } + + // Reopen data file. + if _, err := bolt.Open(path, 0666, nil); err != bolt.ErrVersionMismatch { + t.Fatalf("unexpected error: %s", err) + } +} + +// Ensure that opening a file with two invalid checksums returns ErrChecksum. +func TestOpen_ErrChecksum(t *testing.T) { + if pageSize != os.Getpagesize() { + t.Skip("page size mismatch") + } + + // Create empty database. + db := MustOpenDB() + path := db.Path() + defer db.MustClose() + + // Close database. + if err := db.DB.Close(); err != nil { + t.Fatal(err) + } + + // Read data file. + buf, err := ioutil.ReadFile(path) + if err != nil { + t.Fatal(err) + } + + // Rewrite meta pages. + meta0 := (*meta)(unsafe.Pointer(&buf[pageHeaderSize])) + meta0.pgid++ + meta1 := (*meta)(unsafe.Pointer(&buf[pageSize+pageHeaderSize])) + meta1.pgid++ + if err := ioutil.WriteFile(path, buf, 0666); err != nil { + t.Fatal(err) + } + + // Reopen data file. + if _, err := bolt.Open(path, 0666, nil); err != bolt.ErrChecksum { + t.Fatalf("unexpected error: %s", err) + } +} + +// Ensure that opening an already open database file will timeout. +func TestOpen_Timeout(t *testing.T) { + if runtime.GOOS == "solaris" { + t.Skip("solaris fcntl locks don't support intra-process locking") + } + + path := tempfile() + + // Open a data file. + db0, err := bolt.Open(path, 0666, nil) + if err != nil { + t.Fatal(err) + } else if db0 == nil { + t.Fatal("expected database") + } + + // Attempt to open the database again. + start := time.Now() + db1, err := bolt.Open(path, 0666, &bolt.Options{Timeout: 100 * time.Millisecond}) + if err != bolt.ErrTimeout { + t.Fatalf("unexpected timeout: %s", err) + } else if db1 != nil { + t.Fatal("unexpected database") + } else if time.Since(start) <= 100*time.Millisecond { + t.Fatal("expected to wait at least timeout duration") + } + + if err := db0.Close(); err != nil { + t.Fatal(err) + } +} + +// Ensure that opening an already open database file will wait until its closed. +func TestOpen_Wait(t *testing.T) { + if runtime.GOOS == "solaris" { + t.Skip("solaris fcntl locks don't support intra-process locking") + } + + path := tempfile() + + // Open a data file. + db0, err := bolt.Open(path, 0666, nil) + if err != nil { + t.Fatal(err) + } + + // Close it in just a bit. + time.AfterFunc(100*time.Millisecond, func() { _ = db0.Close() }) + + // Attempt to open the database again. + start := time.Now() + db1, err := bolt.Open(path, 0666, &bolt.Options{Timeout: 200 * time.Millisecond}) + if err != nil { + t.Fatal(err) + } else if time.Since(start) <= 100*time.Millisecond { + t.Fatal("expected to wait at least timeout duration") + } + + if err := db1.Close(); err != nil { + t.Fatal(err) + } +} + +// Ensure that opening a database does not increase its size. +// https://github.com/boltdb/bolt/issues/291 +func TestOpen_Size(t *testing.T) { + // Open a data file. + db := MustOpenDB() + path := db.Path() + defer db.MustClose() + + pagesize := db.Info().PageSize + + // Insert until we get above the minimum 4MB size. + if err := db.Update(func(tx *bolt.Tx) error { + b, _ := tx.CreateBucketIfNotExists([]byte("data")) + for i := 0; i < 10000; i++ { + if err := b.Put([]byte(fmt.Sprintf("%04d", i)), make([]byte, 1000)); err != nil { + t.Fatal(err) + } + } + return nil + }); err != nil { + t.Fatal(err) + } + + // Close database and grab the size. + if err := db.DB.Close(); err != nil { + t.Fatal(err) + } + sz := fileSize(path) + if sz == 0 { + t.Fatalf("unexpected new file size: %d", sz) + } + + // Reopen database, update, and check size again. + db0, err := bolt.Open(path, 0666, nil) + if err != nil { + t.Fatal(err) + } + if err := db0.Update(func(tx *bolt.Tx) error { + if err := tx.Bucket([]byte("data")).Put([]byte{0}, []byte{0}); err != nil { + t.Fatal(err) + } + return nil + }); err != nil { + t.Fatal(err) + } + if err := db0.Close(); err != nil { + t.Fatal(err) + } + newSz := fileSize(path) + if newSz == 0 { + t.Fatalf("unexpected new file size: %d", newSz) + } + + // Compare the original size with the new size. + // db size might increase by a few page sizes due to the new small update. + if sz < newSz-5*int64(pagesize) { + t.Fatalf("unexpected file growth: %d => %d", sz, newSz) + } +} + +// Ensure that opening a database beyond the max step size does not increase its size. +// https://github.com/boltdb/bolt/issues/303 +func TestOpen_Size_Large(t *testing.T) { + if testing.Short() { + t.Skip("short mode") + } + + // Open a data file. + db := MustOpenDB() + path := db.Path() + defer db.MustClose() + + pagesize := db.Info().PageSize + + // Insert until we get above the minimum 4MB size. + var index uint64 + for i := 0; i < 10000; i++ { + if err := db.Update(func(tx *bolt.Tx) error { + b, _ := tx.CreateBucketIfNotExists([]byte("data")) + for j := 0; j < 1000; j++ { + if err := b.Put(u64tob(index), make([]byte, 50)); err != nil { + t.Fatal(err) + } + index++ + } + return nil + }); err != nil { + t.Fatal(err) + } + } + + // Close database and grab the size. + if err := db.DB.Close(); err != nil { + t.Fatal(err) + } + sz := fileSize(path) + if sz == 0 { + t.Fatalf("unexpected new file size: %d", sz) + } else if sz < (1 << 30) { + t.Fatalf("expected larger initial size: %d", sz) + } + + // Reopen database, update, and check size again. + db0, err := bolt.Open(path, 0666, nil) + if err != nil { + t.Fatal(err) + } + if err := db0.Update(func(tx *bolt.Tx) error { + return tx.Bucket([]byte("data")).Put([]byte{0}, []byte{0}) + }); err != nil { + t.Fatal(err) + } + if err := db0.Close(); err != nil { + t.Fatal(err) + } + + newSz := fileSize(path) + if newSz == 0 { + t.Fatalf("unexpected new file size: %d", newSz) + } + + // Compare the original size with the new size. + // db size might increase by a few page sizes due to the new small update. + if sz < newSz-5*int64(pagesize) { + t.Fatalf("unexpected file growth: %d => %d", sz, newSz) + } +} + +// Ensure that a re-opened database is consistent. +func TestOpen_Check(t *testing.T) { + path := tempfile() + + db, err := bolt.Open(path, 0666, nil) + if err != nil { + t.Fatal(err) + } + if err := db.View(func(tx *bolt.Tx) error { return <-tx.Check() }); err != nil { + t.Fatal(err) + } + if err := db.Close(); err != nil { + t.Fatal(err) + } + + db, err = bolt.Open(path, 0666, nil) + if err != nil { + t.Fatal(err) + } + if err := db.View(func(tx *bolt.Tx) error { return <-tx.Check() }); err != nil { + t.Fatal(err) + } + if err := db.Close(); err != nil { + t.Fatal(err) + } +} + +// Ensure that write errors to the meta file handler during initialization are returned. +func TestOpen_MetaInitWriteError(t *testing.T) { + t.Skip("pending") +} + +// Ensure that a database that is too small returns an error. +func TestOpen_FileTooSmall(t *testing.T) { + path := tempfile() + + db, err := bolt.Open(path, 0666, nil) + if err != nil { + t.Fatal(err) + } + if err := db.Close(); err != nil { + t.Fatal(err) + } + + // corrupt the database + if err := os.Truncate(path, int64(os.Getpagesize())); err != nil { + t.Fatal(err) + } + + db, err = bolt.Open(path, 0666, nil) + if err == nil || err.Error() != "file size too small" { + t.Fatalf("unexpected error: %s", err) + } +} + +// Ensure that a database can be opened in read-only mode by multiple processes +// and that a database can not be opened in read-write mode and in read-only +// mode at the same time. +func TestOpen_ReadOnly(t *testing.T) { + if runtime.GOOS == "solaris" { + t.Skip("solaris fcntl locks don't support intra-process locking") + } + + bucket, key, value := []byte(`bucket`), []byte(`key`), []byte(`value`) + + path := tempfile() + + // Open in read-write mode. + db, err := bolt.Open(path, 0666, nil) + if err != nil { + t.Fatal(err) + } else if db.IsReadOnly() { + t.Fatal("db should not be in read only mode") + } + if err := db.Update(func(tx *bolt.Tx) error { + b, err := tx.CreateBucket(bucket) + if err != nil { + return err + } + if err := b.Put(key, value); err != nil { + t.Fatal(err) + } + return nil + }); err != nil { + t.Fatal(err) + } + if err := db.Close(); err != nil { + t.Fatal(err) + } + + // Open in read-only mode. + db0, err := bolt.Open(path, 0666, &bolt.Options{ReadOnly: true}) + if err != nil { + t.Fatal(err) + } + + // Opening in read-write mode should return an error. + if _, err = bolt.Open(path, 0666, &bolt.Options{Timeout: time.Millisecond * 100}); err == nil { + t.Fatal("expected error") + } + + // And again (in read-only mode). + db1, err := bolt.Open(path, 0666, &bolt.Options{ReadOnly: true}) + if err != nil { + t.Fatal(err) + } + + // Verify both read-only databases are accessible. + for _, db := range []*bolt.DB{db0, db1} { + // Verify is is in read only mode indeed. + if !db.IsReadOnly() { + t.Fatal("expected read only mode") + } + + // Read-only databases should not allow updates. + if err := db.Update(func(*bolt.Tx) error { + panic(`should never get here`) + }); err != bolt.ErrDatabaseReadOnly { + t.Fatalf("unexpected error: %s", err) + } + + // Read-only databases should not allow beginning writable txns. + if _, err := db.Begin(true); err != bolt.ErrDatabaseReadOnly { + t.Fatalf("unexpected error: %s", err) + } + + // Verify the data. + if err := db.View(func(tx *bolt.Tx) error { + b := tx.Bucket(bucket) + if b == nil { + return fmt.Errorf("expected bucket `%s`", string(bucket)) + } + + got := string(b.Get(key)) + expected := string(value) + if got != expected { + return fmt.Errorf("expected `%s`, got `%s`", expected, got) + } + return nil + }); err != nil { + t.Fatal(err) + } + } + + if err := db0.Close(); err != nil { + t.Fatal(err) + } + if err := db1.Close(); err != nil { + t.Fatal(err) + } +} + +// TestDB_Open_InitialMmapSize tests if having InitialMmapSize large enough +// to hold data from concurrent write transaction resolves the issue that +// read transaction blocks the write transaction and causes deadlock. +// This is a very hacky test since the mmap size is not exposed. +func TestDB_Open_InitialMmapSize(t *testing.T) { + path := tempfile() + defer os.Remove(path) + + initMmapSize := 1 << 31 // 2GB + testWriteSize := 1 << 27 // 134MB + + db, err := bolt.Open(path, 0666, &bolt.Options{InitialMmapSize: initMmapSize}) + if err != nil { + t.Fatal(err) + } + + // create a long-running read transaction + // that never gets closed while writing + rtx, err := db.Begin(false) + if err != nil { + t.Fatal(err) + } + + // create a write transaction + wtx, err := db.Begin(true) + if err != nil { + t.Fatal(err) + } + + b, err := wtx.CreateBucket([]byte("test")) + if err != nil { + t.Fatal(err) + } + + // and commit a large write + err = b.Put([]byte("foo"), make([]byte, testWriteSize)) + if err != nil { + t.Fatal(err) + } + + done := make(chan struct{}) + + go func() { + if err := wtx.Commit(); err != nil { + t.Fatal(err) + } + done <- struct{}{} + }() + + select { + case <-time.After(5 * time.Second): + t.Errorf("unexpected that the reader blocks writer") + case <-done: + } + + if err := rtx.Rollback(); err != nil { + t.Fatal(err) + } +} + +// Ensure that a database cannot open a transaction when it's not open. +func TestDB_Begin_ErrDatabaseNotOpen(t *testing.T) { + var db bolt.DB + if _, err := db.Begin(false); err != bolt.ErrDatabaseNotOpen { + t.Fatalf("unexpected error: %s", err) + } +} + +// Ensure that a read-write transaction can be retrieved. +func TestDB_BeginRW(t *testing.T) { + db := MustOpenDB() + defer db.MustClose() + + tx, err := db.Begin(true) + if err != nil { + t.Fatal(err) + } else if tx == nil { + t.Fatal("expected tx") + } + + if tx.DB() != db.DB { + t.Fatal("unexpected tx database") + } else if !tx.Writable() { + t.Fatal("expected writable tx") + } + + if err := tx.Commit(); err != nil { + t.Fatal(err) + } +} + +// Ensure that opening a transaction while the DB is closed returns an error. +func TestDB_BeginRW_Closed(t *testing.T) { + var db bolt.DB + if _, err := db.Begin(true); err != bolt.ErrDatabaseNotOpen { + t.Fatalf("unexpected error: %s", err) + } +} + +func TestDB_Close_PendingTx_RW(t *testing.T) { testDB_Close_PendingTx(t, true) } +func TestDB_Close_PendingTx_RO(t *testing.T) { testDB_Close_PendingTx(t, false) } + +// Ensure that a database cannot close while transactions are open. +func testDB_Close_PendingTx(t *testing.T, writable bool) { + db := MustOpenDB() + defer db.MustClose() + + // Start transaction. + tx, err := db.Begin(true) + if err != nil { + t.Fatal(err) + } + + // Open update in separate goroutine. + done := make(chan struct{}) + go func() { + if err := db.Close(); err != nil { + t.Fatal(err) + } + close(done) + }() + + // Ensure database hasn't closed. + time.Sleep(100 * time.Millisecond) + select { + case <-done: + t.Fatal("database closed too early") + default: + } + + // Commit transaction. + if err := tx.Commit(); err != nil { + t.Fatal(err) + } + + // Ensure database closed now. + time.Sleep(100 * time.Millisecond) + select { + case <-done: + default: + t.Fatal("database did not close") + } +} + +// Ensure a database can provide a transactional block. +func TestDB_Update(t *testing.T) { + db := MustOpenDB() + defer db.MustClose() + if err := db.Update(func(tx *bolt.Tx) error { + b, err := tx.CreateBucket([]byte("widgets")) + if err != nil { + t.Fatal(err) + } + if err := b.Put([]byte("foo"), []byte("bar")); err != nil { + t.Fatal(err) + } + if err := b.Put([]byte("baz"), []byte("bat")); err != nil { + t.Fatal(err) + } + if err := b.Delete([]byte("foo")); err != nil { + t.Fatal(err) + } + return nil + }); err != nil { + t.Fatal(err) + } + if err := db.View(func(tx *bolt.Tx) error { + b := tx.Bucket([]byte("widgets")) + if v := b.Get([]byte("foo")); v != nil { + t.Fatalf("expected nil value, got: %v", v) + } + if v := b.Get([]byte("baz")); !bytes.Equal(v, []byte("bat")) { + t.Fatalf("unexpected value: %v", v) + } + return nil + }); err != nil { + t.Fatal(err) + } +} + +// Ensure a closed database returns an error while running a transaction block +func TestDB_Update_Closed(t *testing.T) { + var db bolt.DB + if err := db.Update(func(tx *bolt.Tx) error { + if _, err := tx.CreateBucket([]byte("widgets")); err != nil { + t.Fatal(err) + } + return nil + }); err != bolt.ErrDatabaseNotOpen { + t.Fatalf("unexpected error: %s", err) + } +} + +// Ensure a panic occurs while trying to commit a managed transaction. +func TestDB_Update_ManualCommit(t *testing.T) { + db := MustOpenDB() + defer db.MustClose() + + var panicked bool + if err := db.Update(func(tx *bolt.Tx) error { + func() { + defer func() { + if r := recover(); r != nil { + panicked = true + } + }() + + if err := tx.Commit(); err != nil { + t.Fatal(err) + } + }() + return nil + }); err != nil { + t.Fatal(err) + } else if !panicked { + t.Fatal("expected panic") + } +} + +// Ensure a panic occurs while trying to rollback a managed transaction. +func TestDB_Update_ManualRollback(t *testing.T) { + db := MustOpenDB() + defer db.MustClose() + + var panicked bool + if err := db.Update(func(tx *bolt.Tx) error { + func() { + defer func() { + if r := recover(); r != nil { + panicked = true + } + }() + + if err := tx.Rollback(); err != nil { + t.Fatal(err) + } + }() + return nil + }); err != nil { + t.Fatal(err) + } else if !panicked { + t.Fatal("expected panic") + } +} + +// Ensure a panic occurs while trying to commit a managed transaction. +func TestDB_View_ManualCommit(t *testing.T) { + db := MustOpenDB() + defer db.MustClose() + + var panicked bool + if err := db.View(func(tx *bolt.Tx) error { + func() { + defer func() { + if r := recover(); r != nil { + panicked = true + } + }() + + if err := tx.Commit(); err != nil { + t.Fatal(err) + } + }() + return nil + }); err != nil { + t.Fatal(err) + } else if !panicked { + t.Fatal("expected panic") + } +} + +// Ensure a panic occurs while trying to rollback a managed transaction. +func TestDB_View_ManualRollback(t *testing.T) { + db := MustOpenDB() + defer db.MustClose() + + var panicked bool + if err := db.View(func(tx *bolt.Tx) error { + func() { + defer func() { + if r := recover(); r != nil { + panicked = true + } + }() + + if err := tx.Rollback(); err != nil { + t.Fatal(err) + } + }() + return nil + }); err != nil { + t.Fatal(err) + } else if !panicked { + t.Fatal("expected panic") + } +} + +// Ensure a write transaction that panics does not hold open locks. +func TestDB_Update_Panic(t *testing.T) { + db := MustOpenDB() + defer db.MustClose() + + // Panic during update but recover. + func() { + defer func() { + if r := recover(); r != nil { + t.Log("recover: update", r) + } + }() + + if err := db.Update(func(tx *bolt.Tx) error { + if _, err := tx.CreateBucket([]byte("widgets")); err != nil { + t.Fatal(err) + } + panic("omg") + }); err != nil { + t.Fatal(err) + } + }() + + // Verify we can update again. + if err := db.Update(func(tx *bolt.Tx) error { + if _, err := tx.CreateBucket([]byte("widgets")); err != nil { + t.Fatal(err) + } + return nil + }); err != nil { + t.Fatal(err) + } + + // Verify that our change persisted. + if err := db.Update(func(tx *bolt.Tx) error { + if tx.Bucket([]byte("widgets")) == nil { + t.Fatal("expected bucket") + } + return nil + }); err != nil { + t.Fatal(err) + } +} + +// Ensure a database can return an error through a read-only transactional block. +func TestDB_View_Error(t *testing.T) { + db := MustOpenDB() + defer db.MustClose() + + if err := db.View(func(tx *bolt.Tx) error { + return errors.New("xxx") + }); err == nil || err.Error() != "xxx" { + t.Fatalf("unexpected error: %s", err) + } +} + +// Ensure a read transaction that panics does not hold open locks. +func TestDB_View_Panic(t *testing.T) { + db := MustOpenDB() + defer db.MustClose() + + if err := db.Update(func(tx *bolt.Tx) error { + if _, err := tx.CreateBucket([]byte("widgets")); err != nil { + t.Fatal(err) + } + return nil + }); err != nil { + t.Fatal(err) + } + + // Panic during view transaction but recover. + func() { + defer func() { + if r := recover(); r != nil { + t.Log("recover: view", r) + } + }() + + if err := db.View(func(tx *bolt.Tx) error { + if tx.Bucket([]byte("widgets")) == nil { + t.Fatal("expected bucket") + } + panic("omg") + }); err != nil { + t.Fatal(err) + } + }() + + // Verify that we can still use read transactions. + if err := db.View(func(tx *bolt.Tx) error { + if tx.Bucket([]byte("widgets")) == nil { + t.Fatal("expected bucket") + } + return nil + }); err != nil { + t.Fatal(err) + } +} + +// Ensure that DB stats can be returned. +func TestDB_Stats(t *testing.T) { + db := MustOpenDB() + defer db.MustClose() + if err := db.Update(func(tx *bolt.Tx) error { + _, err := tx.CreateBucket([]byte("widgets")) + return err + }); err != nil { + t.Fatal(err) + } + + stats := db.Stats() + if stats.TxStats.PageCount != 2 { + t.Fatalf("unexpected TxStats.PageCount: %d", stats.TxStats.PageCount) + } else if stats.FreePageN != 0 { + t.Fatalf("unexpected FreePageN != 0: %d", stats.FreePageN) + } else if stats.PendingPageN != 2 { + t.Fatalf("unexpected PendingPageN != 2: %d", stats.PendingPageN) + } +} + +// Ensure that database pages are in expected order and type. +func TestDB_Consistency(t *testing.T) { + db := MustOpenDB() + defer db.MustClose() + if err := db.Update(func(tx *bolt.Tx) error { + _, err := tx.CreateBucket([]byte("widgets")) + return err + }); err != nil { + t.Fatal(err) + } + + for i := 0; i < 10; i++ { + if err := db.Update(func(tx *bolt.Tx) error { + if err := tx.Bucket([]byte("widgets")).Put([]byte("foo"), []byte("bar")); err != nil { + t.Fatal(err) + } + return nil + }); err != nil { + t.Fatal(err) + } + } + + if err := db.Update(func(tx *bolt.Tx) error { + if p, _ := tx.Page(0); p == nil { + t.Fatal("expected page") + } else if p.Type != "meta" { + t.Fatalf("unexpected page type: %s", p.Type) + } + + if p, _ := tx.Page(1); p == nil { + t.Fatal("expected page") + } else if p.Type != "meta" { + t.Fatalf("unexpected page type: %s", p.Type) + } + + if p, _ := tx.Page(2); p == nil { + t.Fatal("expected page") + } else if p.Type != "free" { + t.Fatalf("unexpected page type: %s", p.Type) + } + + if p, _ := tx.Page(3); p == nil { + t.Fatal("expected page") + } else if p.Type != "free" { + t.Fatalf("unexpected page type: %s", p.Type) + } + + if p, _ := tx.Page(4); p == nil { + t.Fatal("expected page") + } else if p.Type != "leaf" { + t.Fatalf("unexpected page type: %s", p.Type) + } + + if p, _ := tx.Page(5); p == nil { + t.Fatal("expected page") + } else if p.Type != "freelist" { + t.Fatalf("unexpected page type: %s", p.Type) + } + + if p, _ := tx.Page(6); p != nil { + t.Fatal("unexpected page") + } + return nil + }); err != nil { + t.Fatal(err) + } +} + +// Ensure that DB stats can be subtracted from one another. +func TestDBStats_Sub(t *testing.T) { + var a, b bolt.Stats + a.TxStats.PageCount = 3 + a.FreePageN = 4 + b.TxStats.PageCount = 10 + b.FreePageN = 14 + diff := b.Sub(&a) + if diff.TxStats.PageCount != 7 { + t.Fatalf("unexpected TxStats.PageCount: %d", diff.TxStats.PageCount) + } + + // free page stats are copied from the receiver and not subtracted + if diff.FreePageN != 14 { + t.Fatalf("unexpected FreePageN: %d", diff.FreePageN) + } +} + +// Ensure two functions can perform updates in a single batch. +func TestDB_Batch(t *testing.T) { + db := MustOpenDB() + defer db.MustClose() + + if err := db.Update(func(tx *bolt.Tx) error { + if _, err := tx.CreateBucket([]byte("widgets")); err != nil { + t.Fatal(err) + } + return nil + }); err != nil { + t.Fatal(err) + } + + // Iterate over multiple updates in separate goroutines. + n := 2 + ch := make(chan error) + for i := 0; i < n; i++ { + go func(i int) { + ch <- db.Batch(func(tx *bolt.Tx) error { + return tx.Bucket([]byte("widgets")).Put(u64tob(uint64(i)), []byte{}) + }) + }(i) + } + + // Check all responses to make sure there's no error. + for i := 0; i < n; i++ { + if err := <-ch; err != nil { + t.Fatal(err) + } + } + + // Ensure data is correct. + if err := db.View(func(tx *bolt.Tx) error { + b := tx.Bucket([]byte("widgets")) + for i := 0; i < n; i++ { + if v := b.Get(u64tob(uint64(i))); v == nil { + t.Errorf("key not found: %d", i) + } + } + return nil + }); err != nil { + t.Fatal(err) + } +} + +func TestDB_Batch_Panic(t *testing.T) { + db := MustOpenDB() + defer db.MustClose() + + var sentinel int + var bork = &sentinel + var problem interface{} + var err error + + // Execute a function inside a batch that panics. + func() { + defer func() { + if p := recover(); p != nil { + problem = p + } + }() + err = db.Batch(func(tx *bolt.Tx) error { + panic(bork) + }) + }() + + // Verify there is no error. + if g, e := err, error(nil); g != e { + t.Fatalf("wrong error: %v != %v", g, e) + } + // Verify the panic was captured. + if g, e := problem, bork; g != e { + t.Fatalf("wrong error: %v != %v", g, e) + } +} + +func TestDB_BatchFull(t *testing.T) { + db := MustOpenDB() + defer db.MustClose() + if err := db.Update(func(tx *bolt.Tx) error { + _, err := tx.CreateBucket([]byte("widgets")) + return err + }); err != nil { + t.Fatal(err) + } + + const size = 3 + // buffered so we never leak goroutines + ch := make(chan error, size) + put := func(i int) { + ch <- db.Batch(func(tx *bolt.Tx) error { + return tx.Bucket([]byte("widgets")).Put(u64tob(uint64(i)), []byte{}) + }) + } + + db.MaxBatchSize = size + // high enough to never trigger here + db.MaxBatchDelay = 1 * time.Hour + + go put(1) + go put(2) + + // Give the batch a chance to exhibit bugs. + time.Sleep(10 * time.Millisecond) + + // not triggered yet + select { + case <-ch: + t.Fatalf("batch triggered too early") + default: + } + + go put(3) + + // Check all responses to make sure there's no error. + for i := 0; i < size; i++ { + if err := <-ch; err != nil { + t.Fatal(err) + } + } + + // Ensure data is correct. + if err := db.View(func(tx *bolt.Tx) error { + b := tx.Bucket([]byte("widgets")) + for i := 1; i <= size; i++ { + if v := b.Get(u64tob(uint64(i))); v == nil { + t.Errorf("key not found: %d", i) + } + } + return nil + }); err != nil { + t.Fatal(err) + } +} + +func TestDB_BatchTime(t *testing.T) { + db := MustOpenDB() + defer db.MustClose() + if err := db.Update(func(tx *bolt.Tx) error { + _, err := tx.CreateBucket([]byte("widgets")) + return err + }); err != nil { + t.Fatal(err) + } + + const size = 1 + // buffered so we never leak goroutines + ch := make(chan error, size) + put := func(i int) { + ch <- db.Batch(func(tx *bolt.Tx) error { + return tx.Bucket([]byte("widgets")).Put(u64tob(uint64(i)), []byte{}) + }) + } + + db.MaxBatchSize = 1000 + db.MaxBatchDelay = 0 + + go put(1) + + // Batch must trigger by time alone. + + // Check all responses to make sure there's no error. + for i := 0; i < size; i++ { + if err := <-ch; err != nil { + t.Fatal(err) + } + } + + // Ensure data is correct. + if err := db.View(func(tx *bolt.Tx) error { + b := tx.Bucket([]byte("widgets")) + for i := 1; i <= size; i++ { + if v := b.Get(u64tob(uint64(i))); v == nil { + t.Errorf("key not found: %d", i) + } + } + return nil + }); err != nil { + t.Fatal(err) + } +} + +func ExampleDB_Update() { + // Open the database. + db, err := bolt.Open(tempfile(), 0666, nil) + if err != nil { + log.Fatal(err) + } + defer os.Remove(db.Path()) + + // Execute several commands within a read-write transaction. + if err := db.Update(func(tx *bolt.Tx) error { + b, err := tx.CreateBucket([]byte("widgets")) + if err != nil { + return err + } + if err := b.Put([]byte("foo"), []byte("bar")); err != nil { + return err + } + return nil + }); err != nil { + log.Fatal(err) + } + + // Read the value back from a separate read-only transaction. + if err := db.View(func(tx *bolt.Tx) error { + value := tx.Bucket([]byte("widgets")).Get([]byte("foo")) + fmt.Printf("The value of 'foo' is: %s\n", value) + return nil + }); err != nil { + log.Fatal(err) + } + + // Close database to release the file lock. + if err := db.Close(); err != nil { + log.Fatal(err) + } + + // Output: + // The value of 'foo' is: bar +} + +func ExampleDB_View() { + // Open the database. + db, err := bolt.Open(tempfile(), 0666, nil) + if err != nil { + log.Fatal(err) + } + defer os.Remove(db.Path()) + + // Insert data into a bucket. + if err := db.Update(func(tx *bolt.Tx) error { + b, err := tx.CreateBucket([]byte("people")) + if err != nil { + return err + } + if err := b.Put([]byte("john"), []byte("doe")); err != nil { + return err + } + if err := b.Put([]byte("susy"), []byte("que")); err != nil { + return err + } + return nil + }); err != nil { + log.Fatal(err) + } + + // Access data from within a read-only transactional block. + if err := db.View(func(tx *bolt.Tx) error { + v := tx.Bucket([]byte("people")).Get([]byte("john")) + fmt.Printf("John's last name is %s.\n", v) + return nil + }); err != nil { + log.Fatal(err) + } + + // Close database to release the file lock. + if err := db.Close(); err != nil { + log.Fatal(err) + } + + // Output: + // John's last name is doe. +} + +func ExampleDB_Begin_ReadOnly() { + // Open the database. + db, err := bolt.Open(tempfile(), 0666, nil) + if err != nil { + log.Fatal(err) + } + defer os.Remove(db.Path()) + + // Create a bucket using a read-write transaction. + if err := db.Update(func(tx *bolt.Tx) error { + _, err := tx.CreateBucket([]byte("widgets")) + return err + }); err != nil { + log.Fatal(err) + } + + // Create several keys in a transaction. + tx, err := db.Begin(true) + if err != nil { + log.Fatal(err) + } + b := tx.Bucket([]byte("widgets")) + if err := b.Put([]byte("john"), []byte("blue")); err != nil { + log.Fatal(err) + } + if err := b.Put([]byte("abby"), []byte("red")); err != nil { + log.Fatal(err) + } + if err := b.Put([]byte("zephyr"), []byte("purple")); err != nil { + log.Fatal(err) + } + if err := tx.Commit(); err != nil { + log.Fatal(err) + } + + // Iterate over the values in sorted key order. + tx, err = db.Begin(false) + if err != nil { + log.Fatal(err) + } + c := tx.Bucket([]byte("widgets")).Cursor() + for k, v := c.First(); k != nil; k, v = c.Next() { + fmt.Printf("%s likes %s\n", k, v) + } + + if err := tx.Rollback(); err != nil { + log.Fatal(err) + } + + if err := db.Close(); err != nil { + log.Fatal(err) + } + + // Output: + // abby likes red + // john likes blue + // zephyr likes purple +} + +func BenchmarkDBBatchAutomatic(b *testing.B) { + db := MustOpenDB() + defer db.MustClose() + if err := db.Update(func(tx *bolt.Tx) error { + _, err := tx.CreateBucket([]byte("bench")) + return err + }); err != nil { + b.Fatal(err) + } + + b.ResetTimer() + for i := 0; i < b.N; i++ { + start := make(chan struct{}) + var wg sync.WaitGroup + + for round := 0; round < 1000; round++ { + wg.Add(1) + + go func(id uint32) { + defer wg.Done() + <-start + + h := fnv.New32a() + buf := make([]byte, 4) + binary.LittleEndian.PutUint32(buf, id) + _, _ = h.Write(buf[:]) + k := h.Sum(nil) + insert := func(tx *bolt.Tx) error { + b := tx.Bucket([]byte("bench")) + return b.Put(k, []byte("filler")) + } + if err := db.Batch(insert); err != nil { + b.Error(err) + return + } + }(uint32(round)) + } + close(start) + wg.Wait() + } + + b.StopTimer() + validateBatchBench(b, db) +} + +func BenchmarkDBBatchSingle(b *testing.B) { + db := MustOpenDB() + defer db.MustClose() + if err := db.Update(func(tx *bolt.Tx) error { + _, err := tx.CreateBucket([]byte("bench")) + return err + }); err != nil { + b.Fatal(err) + } + + b.ResetTimer() + for i := 0; i < b.N; i++ { + start := make(chan struct{}) + var wg sync.WaitGroup + + for round := 0; round < 1000; round++ { + wg.Add(1) + go func(id uint32) { + defer wg.Done() + <-start + + h := fnv.New32a() + buf := make([]byte, 4) + binary.LittleEndian.PutUint32(buf, id) + _, _ = h.Write(buf[:]) + k := h.Sum(nil) + insert := func(tx *bolt.Tx) error { + b := tx.Bucket([]byte("bench")) + return b.Put(k, []byte("filler")) + } + if err := db.Update(insert); err != nil { + b.Error(err) + return + } + }(uint32(round)) + } + close(start) + wg.Wait() + } + + b.StopTimer() + validateBatchBench(b, db) +} + +func BenchmarkDBBatchManual10x100(b *testing.B) { + db := MustOpenDB() + defer db.MustClose() + if err := db.Update(func(tx *bolt.Tx) error { + _, err := tx.CreateBucket([]byte("bench")) + return err + }); err != nil { + b.Fatal(err) + } + + b.ResetTimer() + for i := 0; i < b.N; i++ { + start := make(chan struct{}) + var wg sync.WaitGroup + + for major := 0; major < 10; major++ { + wg.Add(1) + go func(id uint32) { + defer wg.Done() + <-start + + insert100 := func(tx *bolt.Tx) error { + h := fnv.New32a() + buf := make([]byte, 4) + for minor := uint32(0); minor < 100; minor++ { + binary.LittleEndian.PutUint32(buf, uint32(id*100+minor)) + h.Reset() + _, _ = h.Write(buf[:]) + k := h.Sum(nil) + b := tx.Bucket([]byte("bench")) + if err := b.Put(k, []byte("filler")); err != nil { + return err + } + } + return nil + } + if err := db.Update(insert100); err != nil { + b.Fatal(err) + } + }(uint32(major)) + } + close(start) + wg.Wait() + } + + b.StopTimer() + validateBatchBench(b, db) +} + +func validateBatchBench(b *testing.B, db *DB) { + var rollback = errors.New("sentinel error to cause rollback") + validate := func(tx *bolt.Tx) error { + bucket := tx.Bucket([]byte("bench")) + h := fnv.New32a() + buf := make([]byte, 4) + for id := uint32(0); id < 1000; id++ { + binary.LittleEndian.PutUint32(buf, id) + h.Reset() + _, _ = h.Write(buf[:]) + k := h.Sum(nil) + v := bucket.Get(k) + if v == nil { + b.Errorf("not found id=%d key=%x", id, k) + continue + } + if g, e := v, []byte("filler"); !bytes.Equal(g, e) { + b.Errorf("bad value for id=%d key=%x: %s != %q", id, k, g, e) + } + if err := bucket.Delete(k); err != nil { + return err + } + } + // should be empty now + c := bucket.Cursor() + for k, v := c.First(); k != nil; k, v = c.Next() { + b.Errorf("unexpected key: %x = %q", k, v) + } + return rollback + } + if err := db.Update(validate); err != nil && err != rollback { + b.Error(err) + } +} + +// DB is a test wrapper for bolt.DB. +type DB struct { + *bolt.DB +} + +// MustOpenDB returns a new, open DB at a temporary location. +func MustOpenDB() *DB { + db, err := bolt.Open(tempfile(), 0666, nil) + if err != nil { + panic(err) + } + return &DB{db} +} + +// Close closes the database and deletes the underlying file. +func (db *DB) Close() error { + // Log statistics. + if *statsFlag { + db.PrintStats() + } + + // Check database consistency after every test. + db.MustCheck() + + // Close database and remove file. + defer os.Remove(db.Path()) + return db.DB.Close() +} + +// MustClose closes the database and deletes the underlying file. Panic on error. +func (db *DB) MustClose() { + if err := db.Close(); err != nil { + panic(err) + } +} + +// PrintStats prints the database stats +func (db *DB) PrintStats() { + var stats = db.Stats() + fmt.Printf("[db] %-20s %-20s %-20s\n", + fmt.Sprintf("pg(%d/%d)", stats.TxStats.PageCount, stats.TxStats.PageAlloc), + fmt.Sprintf("cur(%d)", stats.TxStats.CursorCount), + fmt.Sprintf("node(%d/%d)", stats.TxStats.NodeCount, stats.TxStats.NodeDeref), + ) + fmt.Printf(" %-20s %-20s %-20s\n", + fmt.Sprintf("rebal(%d/%v)", stats.TxStats.Rebalance, truncDuration(stats.TxStats.RebalanceTime)), + fmt.Sprintf("spill(%d/%v)", stats.TxStats.Spill, truncDuration(stats.TxStats.SpillTime)), + fmt.Sprintf("w(%d/%v)", stats.TxStats.Write, truncDuration(stats.TxStats.WriteTime)), + ) +} + +// MustCheck runs a consistency check on the database and panics if any errors are found. +func (db *DB) MustCheck() { + if err := db.Update(func(tx *bolt.Tx) error { + // Collect all the errors. + var errors []error + for err := range tx.Check() { + errors = append(errors, err) + if len(errors) > 10 { + break + } + } + + // If errors occurred, copy the DB and print the errors. + if len(errors) > 0 { + var path = tempfile() + if err := tx.CopyFile(path, 0600); err != nil { + panic(err) + } + + // Print errors. + fmt.Print("\n\n") + fmt.Printf("consistency check failed (%d errors)\n", len(errors)) + for _, err := range errors { + fmt.Println(err) + } + fmt.Println("") + fmt.Println("db saved to:") + fmt.Println(path) + fmt.Print("\n\n") + os.Exit(-1) + } + + return nil + }); err != nil && err != bolt.ErrDatabaseNotOpen { + panic(err) + } +} + +// CopyTempFile copies a database to a temporary file. +func (db *DB) CopyTempFile() { + path := tempfile() + if err := db.View(func(tx *bolt.Tx) error { + return tx.CopyFile(path, 0600) + }); err != nil { + panic(err) + } + fmt.Println("db copied to: ", path) +} + +// tempfile returns a temporary file path. +func tempfile() string { + f, err := ioutil.TempFile("", "bolt-") + if err != nil { + panic(err) + } + if err := f.Close(); err != nil { + panic(err) + } + if err := os.Remove(f.Name()); err != nil { + panic(err) + } + return f.Name() +} + +// mustContainKeys checks that a bucket contains a given set of keys. +func mustContainKeys(b *bolt.Bucket, m map[string]string) { + found := make(map[string]string) + if err := b.ForEach(func(k, _ []byte) error { + found[string(k)] = "" + return nil + }); err != nil { + panic(err) + } + + // Check for keys found in bucket that shouldn't be there. + var keys []string + for k, _ := range found { + if _, ok := m[string(k)]; !ok { + keys = append(keys, k) + } + } + if len(keys) > 0 { + sort.Strings(keys) + panic(fmt.Sprintf("keys found(%d): %s", len(keys), strings.Join(keys, ","))) + } + + // Check for keys not found in bucket that should be there. + for k, _ := range m { + if _, ok := found[string(k)]; !ok { + keys = append(keys, k) + } + } + if len(keys) > 0 { + sort.Strings(keys) + panic(fmt.Sprintf("keys not found(%d): %s", len(keys), strings.Join(keys, ","))) + } +} + +func trunc(b []byte, length int) []byte { + if length < len(b) { + return b[:length] + } + return b +} + +func truncDuration(d time.Duration) string { + return regexp.MustCompile(`^(\d+)(\.\d+)`).ReplaceAllString(d.String(), "$1") +} + +func fileSize(path string) int64 { + fi, err := os.Stat(path) + if err != nil { + return 0 + } + return fi.Size() +} + +func warn(v ...interface{}) { fmt.Fprintln(os.Stderr, v...) } +func warnf(msg string, v ...interface{}) { fmt.Fprintf(os.Stderr, msg+"\n", v...) } + +// u64tob converts a uint64 into an 8-byte slice. +func u64tob(v uint64) []byte { + b := make([]byte, 8) + binary.BigEndian.PutUint64(b, v) + return b +} + +// btou64 converts an 8-byte slice into an uint64. +func btou64(b []byte) uint64 { return binary.BigEndian.Uint64(b) } diff --git a/vendor/github.com/boltdb/bolt/freelist_test.go b/vendor/github.com/boltdb/bolt/freelist_test.go new file mode 100644 index 000000000..4e9b3a8db --- /dev/null +++ b/vendor/github.com/boltdb/bolt/freelist_test.go @@ -0,0 +1,158 @@ +package bolt + +import ( + "math/rand" + "reflect" + "sort" + "testing" + "unsafe" +) + +// Ensure that a page is added to a transaction's freelist. +func TestFreelist_free(t *testing.T) { + f := newFreelist() + f.free(100, &page{id: 12}) + if !reflect.DeepEqual([]pgid{12}, f.pending[100]) { + t.Fatalf("exp=%v; got=%v", []pgid{12}, f.pending[100]) + } +} + +// Ensure that a page and its overflow is added to a transaction's freelist. +func TestFreelist_free_overflow(t *testing.T) { + f := newFreelist() + f.free(100, &page{id: 12, overflow: 3}) + if exp := []pgid{12, 13, 14, 15}; !reflect.DeepEqual(exp, f.pending[100]) { + t.Fatalf("exp=%v; got=%v", exp, f.pending[100]) + } +} + +// Ensure that a transaction's free pages can be released. +func TestFreelist_release(t *testing.T) { + f := newFreelist() + f.free(100, &page{id: 12, overflow: 1}) + f.free(100, &page{id: 9}) + f.free(102, &page{id: 39}) + f.release(100) + f.release(101) + if exp := []pgid{9, 12, 13}; !reflect.DeepEqual(exp, f.ids) { + t.Fatalf("exp=%v; got=%v", exp, f.ids) + } + + f.release(102) + if exp := []pgid{9, 12, 13, 39}; !reflect.DeepEqual(exp, f.ids) { + t.Fatalf("exp=%v; got=%v", exp, f.ids) + } +} + +// Ensure that a freelist can find contiguous blocks of pages. +func TestFreelist_allocate(t *testing.T) { + f := &freelist{ids: []pgid{3, 4, 5, 6, 7, 9, 12, 13, 18}} + if id := int(f.allocate(3)); id != 3 { + t.Fatalf("exp=3; got=%v", id) + } + if id := int(f.allocate(1)); id != 6 { + t.Fatalf("exp=6; got=%v", id) + } + if id := int(f.allocate(3)); id != 0 { + t.Fatalf("exp=0; got=%v", id) + } + if id := int(f.allocate(2)); id != 12 { + t.Fatalf("exp=12; got=%v", id) + } + if id := int(f.allocate(1)); id != 7 { + t.Fatalf("exp=7; got=%v", id) + } + if id := int(f.allocate(0)); id != 0 { + t.Fatalf("exp=0; got=%v", id) + } + if id := int(f.allocate(0)); id != 0 { + t.Fatalf("exp=0; got=%v", id) + } + if exp := []pgid{9, 18}; !reflect.DeepEqual(exp, f.ids) { + t.Fatalf("exp=%v; got=%v", exp, f.ids) + } + + if id := int(f.allocate(1)); id != 9 { + t.Fatalf("exp=9; got=%v", id) + } + if id := int(f.allocate(1)); id != 18 { + t.Fatalf("exp=18; got=%v", id) + } + if id := int(f.allocate(1)); id != 0 { + t.Fatalf("exp=0; got=%v", id) + } + if exp := []pgid{}; !reflect.DeepEqual(exp, f.ids) { + t.Fatalf("exp=%v; got=%v", exp, f.ids) + } +} + +// Ensure that a freelist can deserialize from a freelist page. +func TestFreelist_read(t *testing.T) { + // Create a page. + var buf [4096]byte + page := (*page)(unsafe.Pointer(&buf[0])) + page.flags = freelistPageFlag + page.count = 2 + + // Insert 2 page ids. + ids := (*[3]pgid)(unsafe.Pointer(&page.ptr)) + ids[0] = 23 + ids[1] = 50 + + // Deserialize page into a freelist. + f := newFreelist() + f.read(page) + + // Ensure that there are two page ids in the freelist. + if exp := []pgid{23, 50}; !reflect.DeepEqual(exp, f.ids) { + t.Fatalf("exp=%v; got=%v", exp, f.ids) + } +} + +// Ensure that a freelist can serialize into a freelist page. +func TestFreelist_write(t *testing.T) { + // Create a freelist and write it to a page. + var buf [4096]byte + f := &freelist{ids: []pgid{12, 39}, pending: make(map[txid][]pgid)} + f.pending[100] = []pgid{28, 11} + f.pending[101] = []pgid{3} + p := (*page)(unsafe.Pointer(&buf[0])) + if err := f.write(p); err != nil { + t.Fatal(err) + } + + // Read the page back out. + f2 := newFreelist() + f2.read(p) + + // Ensure that the freelist is correct. + // All pages should be present and in reverse order. + if exp := []pgid{3, 11, 12, 28, 39}; !reflect.DeepEqual(exp, f2.ids) { + t.Fatalf("exp=%v; got=%v", exp, f2.ids) + } +} + +func Benchmark_FreelistRelease10K(b *testing.B) { benchmark_FreelistRelease(b, 10000) } +func Benchmark_FreelistRelease100K(b *testing.B) { benchmark_FreelistRelease(b, 100000) } +func Benchmark_FreelistRelease1000K(b *testing.B) { benchmark_FreelistRelease(b, 1000000) } +func Benchmark_FreelistRelease10000K(b *testing.B) { benchmark_FreelistRelease(b, 10000000) } + +func benchmark_FreelistRelease(b *testing.B, size int) { + ids := randomPgids(size) + pending := randomPgids(len(ids) / 400) + b.ResetTimer() + for i := 0; i < b.N; i++ { + f := &freelist{ids: ids, pending: map[txid][]pgid{1: pending}} + f.release(1) + } +} + +func randomPgids(n int) []pgid { + rand.Seed(42) + pgids := make(pgids, n) + for i := range pgids { + pgids[i] = pgid(rand.Int63()) + } + sort.Sort(pgids) + return pgids +} diff --git a/vendor/github.com/boltdb/bolt/node_test.go b/vendor/github.com/boltdb/bolt/node_test.go new file mode 100644 index 000000000..fa5d10f99 --- /dev/null +++ b/vendor/github.com/boltdb/bolt/node_test.go @@ -0,0 +1,156 @@ +package bolt + +import ( + "testing" + "unsafe" +) + +// Ensure that a node can insert a key/value. +func TestNode_put(t *testing.T) { + n := &node{inodes: make(inodes, 0), bucket: &Bucket{tx: &Tx{meta: &meta{pgid: 1}}}} + n.put([]byte("baz"), []byte("baz"), []byte("2"), 0, 0) + n.put([]byte("foo"), []byte("foo"), []byte("0"), 0, 0) + n.put([]byte("bar"), []byte("bar"), []byte("1"), 0, 0) + n.put([]byte("foo"), []byte("foo"), []byte("3"), 0, leafPageFlag) + + if len(n.inodes) != 3 { + t.Fatalf("exp=3; got=%d", len(n.inodes)) + } + if k, v := n.inodes[0].key, n.inodes[0].value; string(k) != "bar" || string(v) != "1" { + t.Fatalf("exp=; got=<%s,%s>", k, v) + } + if k, v := n.inodes[1].key, n.inodes[1].value; string(k) != "baz" || string(v) != "2" { + t.Fatalf("exp=; got=<%s,%s>", k, v) + } + if k, v := n.inodes[2].key, n.inodes[2].value; string(k) != "foo" || string(v) != "3" { + t.Fatalf("exp=; got=<%s,%s>", k, v) + } + if n.inodes[2].flags != uint32(leafPageFlag) { + t.Fatalf("not a leaf: %d", n.inodes[2].flags) + } +} + +// Ensure that a node can deserialize from a leaf page. +func TestNode_read_LeafPage(t *testing.T) { + // Create a page. + var buf [4096]byte + page := (*page)(unsafe.Pointer(&buf[0])) + page.flags = leafPageFlag + page.count = 2 + + // Insert 2 elements at the beginning. sizeof(leafPageElement) == 16 + nodes := (*[3]leafPageElement)(unsafe.Pointer(&page.ptr)) + nodes[0] = leafPageElement{flags: 0, pos: 32, ksize: 3, vsize: 4} // pos = sizeof(leafPageElement) * 2 + nodes[1] = leafPageElement{flags: 0, pos: 23, ksize: 10, vsize: 3} // pos = sizeof(leafPageElement) + 3 + 4 + + // Write data for the nodes at the end. + data := (*[4096]byte)(unsafe.Pointer(&nodes[2])) + copy(data[:], []byte("barfooz")) + copy(data[7:], []byte("helloworldbye")) + + // Deserialize page into a leaf. + n := &node{} + n.read(page) + + // Check that there are two inodes with correct data. + if !n.isLeaf { + t.Fatal("expected leaf") + } + if len(n.inodes) != 2 { + t.Fatalf("exp=2; got=%d", len(n.inodes)) + } + if k, v := n.inodes[0].key, n.inodes[0].value; string(k) != "bar" || string(v) != "fooz" { + t.Fatalf("exp=; got=<%s,%s>", k, v) + } + if k, v := n.inodes[1].key, n.inodes[1].value; string(k) != "helloworld" || string(v) != "bye" { + t.Fatalf("exp=; got=<%s,%s>", k, v) + } +} + +// Ensure that a node can serialize into a leaf page. +func TestNode_write_LeafPage(t *testing.T) { + // Create a node. + n := &node{isLeaf: true, inodes: make(inodes, 0), bucket: &Bucket{tx: &Tx{db: &DB{}, meta: &meta{pgid: 1}}}} + n.put([]byte("susy"), []byte("susy"), []byte("que"), 0, 0) + n.put([]byte("ricki"), []byte("ricki"), []byte("lake"), 0, 0) + n.put([]byte("john"), []byte("john"), []byte("johnson"), 0, 0) + + // Write it to a page. + var buf [4096]byte + p := (*page)(unsafe.Pointer(&buf[0])) + n.write(p) + + // Read the page back in. + n2 := &node{} + n2.read(p) + + // Check that the two pages are the same. + if len(n2.inodes) != 3 { + t.Fatalf("exp=3; got=%d", len(n2.inodes)) + } + if k, v := n2.inodes[0].key, n2.inodes[0].value; string(k) != "john" || string(v) != "johnson" { + t.Fatalf("exp=; got=<%s,%s>", k, v) + } + if k, v := n2.inodes[1].key, n2.inodes[1].value; string(k) != "ricki" || string(v) != "lake" { + t.Fatalf("exp=; got=<%s,%s>", k, v) + } + if k, v := n2.inodes[2].key, n2.inodes[2].value; string(k) != "susy" || string(v) != "que" { + t.Fatalf("exp=; got=<%s,%s>", k, v) + } +} + +// Ensure that a node can split into appropriate subgroups. +func TestNode_split(t *testing.T) { + // Create a node. + n := &node{inodes: make(inodes, 0), bucket: &Bucket{tx: &Tx{db: &DB{}, meta: &meta{pgid: 1}}}} + n.put([]byte("00000001"), []byte("00000001"), []byte("0123456701234567"), 0, 0) + n.put([]byte("00000002"), []byte("00000002"), []byte("0123456701234567"), 0, 0) + n.put([]byte("00000003"), []byte("00000003"), []byte("0123456701234567"), 0, 0) + n.put([]byte("00000004"), []byte("00000004"), []byte("0123456701234567"), 0, 0) + n.put([]byte("00000005"), []byte("00000005"), []byte("0123456701234567"), 0, 0) + + // Split between 2 & 3. + n.split(100) + + var parent = n.parent + if len(parent.children) != 2 { + t.Fatalf("exp=2; got=%d", len(parent.children)) + } + if len(parent.children[0].inodes) != 2 { + t.Fatalf("exp=2; got=%d", len(parent.children[0].inodes)) + } + if len(parent.children[1].inodes) != 3 { + t.Fatalf("exp=3; got=%d", len(parent.children[1].inodes)) + } +} + +// Ensure that a page with the minimum number of inodes just returns a single node. +func TestNode_split_MinKeys(t *testing.T) { + // Create a node. + n := &node{inodes: make(inodes, 0), bucket: &Bucket{tx: &Tx{db: &DB{}, meta: &meta{pgid: 1}}}} + n.put([]byte("00000001"), []byte("00000001"), []byte("0123456701234567"), 0, 0) + n.put([]byte("00000002"), []byte("00000002"), []byte("0123456701234567"), 0, 0) + + // Split. + n.split(20) + if n.parent != nil { + t.Fatalf("expected nil parent") + } +} + +// Ensure that a node that has keys that all fit on a page just returns one leaf. +func TestNode_split_SinglePage(t *testing.T) { + // Create a node. + n := &node{inodes: make(inodes, 0), bucket: &Bucket{tx: &Tx{db: &DB{}, meta: &meta{pgid: 1}}}} + n.put([]byte("00000001"), []byte("00000001"), []byte("0123456701234567"), 0, 0) + n.put([]byte("00000002"), []byte("00000002"), []byte("0123456701234567"), 0, 0) + n.put([]byte("00000003"), []byte("00000003"), []byte("0123456701234567"), 0, 0) + n.put([]byte("00000004"), []byte("00000004"), []byte("0123456701234567"), 0, 0) + n.put([]byte("00000005"), []byte("00000005"), []byte("0123456701234567"), 0, 0) + + // Split. + n.split(4096) + if n.parent != nil { + t.Fatalf("expected nil parent") + } +} diff --git a/vendor/github.com/boltdb/bolt/page_test.go b/vendor/github.com/boltdb/bolt/page_test.go new file mode 100644 index 000000000..59f4a30ed --- /dev/null +++ b/vendor/github.com/boltdb/bolt/page_test.go @@ -0,0 +1,72 @@ +package bolt + +import ( + "reflect" + "sort" + "testing" + "testing/quick" +) + +// Ensure that the page type can be returned in human readable format. +func TestPage_typ(t *testing.T) { + if typ := (&page{flags: branchPageFlag}).typ(); typ != "branch" { + t.Fatalf("exp=branch; got=%v", typ) + } + if typ := (&page{flags: leafPageFlag}).typ(); typ != "leaf" { + t.Fatalf("exp=leaf; got=%v", typ) + } + if typ := (&page{flags: metaPageFlag}).typ(); typ != "meta" { + t.Fatalf("exp=meta; got=%v", typ) + } + if typ := (&page{flags: freelistPageFlag}).typ(); typ != "freelist" { + t.Fatalf("exp=freelist; got=%v", typ) + } + if typ := (&page{flags: 20000}).typ(); typ != "unknown<4e20>" { + t.Fatalf("exp=unknown<4e20>; got=%v", typ) + } +} + +// Ensure that the hexdump debugging function doesn't blow up. +func TestPage_dump(t *testing.T) { + (&page{id: 256}).hexdump(16) +} + +func TestPgids_merge(t *testing.T) { + a := pgids{4, 5, 6, 10, 11, 12, 13, 27} + b := pgids{1, 3, 8, 9, 25, 30} + c := a.merge(b) + if !reflect.DeepEqual(c, pgids{1, 3, 4, 5, 6, 8, 9, 10, 11, 12, 13, 25, 27, 30}) { + t.Errorf("mismatch: %v", c) + } + + a = pgids{4, 5, 6, 10, 11, 12, 13, 27, 35, 36} + b = pgids{8, 9, 25, 30} + c = a.merge(b) + if !reflect.DeepEqual(c, pgids{4, 5, 6, 8, 9, 10, 11, 12, 13, 25, 27, 30, 35, 36}) { + t.Errorf("mismatch: %v", c) + } +} + +func TestPgids_merge_quick(t *testing.T) { + if err := quick.Check(func(a, b pgids) bool { + // Sort incoming lists. + sort.Sort(a) + sort.Sort(b) + + // Merge the two lists together. + got := a.merge(b) + + // The expected value should be the two lists combined and sorted. + exp := append(a, b...) + sort.Sort(exp) + + if !reflect.DeepEqual(exp, got) { + t.Errorf("\nexp=%+v\ngot=%+v\n", exp, got) + return false + } + + return true + }, nil); err != nil { + t.Fatal(err) + } +} diff --git a/vendor/github.com/boltdb/bolt/quick_test.go b/vendor/github.com/boltdb/bolt/quick_test.go new file mode 100644 index 000000000..4da581775 --- /dev/null +++ b/vendor/github.com/boltdb/bolt/quick_test.go @@ -0,0 +1,79 @@ +package bolt_test + +import ( + "bytes" + "flag" + "fmt" + "math/rand" + "os" + "reflect" + "testing/quick" + "time" +) + +// testing/quick defaults to 5 iterations and a random seed. +// You can override these settings from the command line: +// +// -quick.count The number of iterations to perform. +// -quick.seed The seed to use for randomizing. +// -quick.maxitems The maximum number of items to insert into a DB. +// -quick.maxksize The maximum size of a key. +// -quick.maxvsize The maximum size of a value. +// + +var qcount, qseed, qmaxitems, qmaxksize, qmaxvsize int + +func init() { + flag.IntVar(&qcount, "quick.count", 5, "") + flag.IntVar(&qseed, "quick.seed", int(time.Now().UnixNano())%100000, "") + flag.IntVar(&qmaxitems, "quick.maxitems", 1000, "") + flag.IntVar(&qmaxksize, "quick.maxksize", 1024, "") + flag.IntVar(&qmaxvsize, "quick.maxvsize", 1024, "") + flag.Parse() + fmt.Fprintln(os.Stderr, "seed:", qseed) + fmt.Fprintf(os.Stderr, "quick settings: count=%v, items=%v, ksize=%v, vsize=%v\n", qcount, qmaxitems, qmaxksize, qmaxvsize) +} + +func qconfig() *quick.Config { + return &quick.Config{ + MaxCount: qcount, + Rand: rand.New(rand.NewSource(int64(qseed))), + } +} + +type testdata []testdataitem + +func (t testdata) Len() int { return len(t) } +func (t testdata) Swap(i, j int) { t[i], t[j] = t[j], t[i] } +func (t testdata) Less(i, j int) bool { return bytes.Compare(t[i].Key, t[j].Key) == -1 } + +func (t testdata) Generate(rand *rand.Rand, size int) reflect.Value { + n := rand.Intn(qmaxitems-1) + 1 + items := make(testdata, n) + for i := 0; i < n; i++ { + item := &items[i] + item.Key = randByteSlice(rand, 1, qmaxksize) + item.Value = randByteSlice(rand, 0, qmaxvsize) + } + return reflect.ValueOf(items) +} + +type revtestdata []testdataitem + +func (t revtestdata) Len() int { return len(t) } +func (t revtestdata) Swap(i, j int) { t[i], t[j] = t[j], t[i] } +func (t revtestdata) Less(i, j int) bool { return bytes.Compare(t[i].Key, t[j].Key) == 1 } + +type testdataitem struct { + Key []byte + Value []byte +} + +func randByteSlice(rand *rand.Rand, minSize, maxSize int) []byte { + n := rand.Intn(maxSize-minSize) + minSize + b := make([]byte, n) + for i := 0; i < n; i++ { + b[i] = byte(rand.Intn(255)) + } + return b +} diff --git a/vendor/github.com/boltdb/bolt/simulation_test.go b/vendor/github.com/boltdb/bolt/simulation_test.go new file mode 100644 index 000000000..383101655 --- /dev/null +++ b/vendor/github.com/boltdb/bolt/simulation_test.go @@ -0,0 +1,329 @@ +package bolt_test + +import ( + "bytes" + "fmt" + "math/rand" + "sync" + "testing" + + "github.com/boltdb/bolt" +) + +func TestSimulate_1op_1p(t *testing.T) { testSimulate(t, 1, 1) } +func TestSimulate_10op_1p(t *testing.T) { testSimulate(t, 10, 1) } +func TestSimulate_100op_1p(t *testing.T) { testSimulate(t, 100, 1) } +func TestSimulate_1000op_1p(t *testing.T) { testSimulate(t, 1000, 1) } +func TestSimulate_10000op_1p(t *testing.T) { testSimulate(t, 10000, 1) } + +func TestSimulate_10op_10p(t *testing.T) { testSimulate(t, 10, 10) } +func TestSimulate_100op_10p(t *testing.T) { testSimulate(t, 100, 10) } +func TestSimulate_1000op_10p(t *testing.T) { testSimulate(t, 1000, 10) } +func TestSimulate_10000op_10p(t *testing.T) { testSimulate(t, 10000, 10) } + +func TestSimulate_100op_100p(t *testing.T) { testSimulate(t, 100, 100) } +func TestSimulate_1000op_100p(t *testing.T) { testSimulate(t, 1000, 100) } +func TestSimulate_10000op_100p(t *testing.T) { testSimulate(t, 10000, 100) } + +func TestSimulate_10000op_1000p(t *testing.T) { testSimulate(t, 10000, 1000) } + +// Randomly generate operations on a given database with multiple clients to ensure consistency and thread safety. +func testSimulate(t *testing.T, threadCount, parallelism int) { + if testing.Short() { + t.Skip("skipping test in short mode.") + } + + rand.Seed(int64(qseed)) + + // A list of operations that readers and writers can perform. + var readerHandlers = []simulateHandler{simulateGetHandler} + var writerHandlers = []simulateHandler{simulateGetHandler, simulatePutHandler} + + var versions = make(map[int]*QuickDB) + versions[1] = NewQuickDB() + + db := MustOpenDB() + defer db.MustClose() + + var mutex sync.Mutex + + // Run n threads in parallel, each with their own operation. + var wg sync.WaitGroup + var threads = make(chan bool, parallelism) + var i int + for { + threads <- true + wg.Add(1) + writable := ((rand.Int() % 100) < 20) // 20% writers + + // Choose an operation to execute. + var handler simulateHandler + if writable { + handler = writerHandlers[rand.Intn(len(writerHandlers))] + } else { + handler = readerHandlers[rand.Intn(len(readerHandlers))] + } + + // Execute a thread for the given operation. + go func(writable bool, handler simulateHandler) { + defer wg.Done() + + // Start transaction. + tx, err := db.Begin(writable) + if err != nil { + t.Fatal("tx begin: ", err) + } + + // Obtain current state of the dataset. + mutex.Lock() + var qdb = versions[tx.ID()] + if writable { + qdb = versions[tx.ID()-1].Copy() + } + mutex.Unlock() + + // Make sure we commit/rollback the tx at the end and update the state. + if writable { + defer func() { + mutex.Lock() + versions[tx.ID()] = qdb + mutex.Unlock() + + if err := tx.Commit(); err != nil { + t.Fatal(err) + } + }() + } else { + defer func() { _ = tx.Rollback() }() + } + + // Ignore operation if we don't have data yet. + if qdb == nil { + return + } + + // Execute handler. + handler(tx, qdb) + + // Release a thread back to the scheduling loop. + <-threads + }(writable, handler) + + i++ + if i > threadCount { + break + } + } + + // Wait until all threads are done. + wg.Wait() +} + +type simulateHandler func(tx *bolt.Tx, qdb *QuickDB) + +// Retrieves a key from the database and verifies that it is what is expected. +func simulateGetHandler(tx *bolt.Tx, qdb *QuickDB) { + // Randomly retrieve an existing exist. + keys := qdb.Rand() + if len(keys) == 0 { + return + } + + // Retrieve root bucket. + b := tx.Bucket(keys[0]) + if b == nil { + panic(fmt.Sprintf("bucket[0] expected: %08x\n", trunc(keys[0], 4))) + } + + // Drill into nested buckets. + for _, key := range keys[1 : len(keys)-1] { + b = b.Bucket(key) + if b == nil { + panic(fmt.Sprintf("bucket[n] expected: %v -> %v\n", keys, key)) + } + } + + // Verify key/value on the final bucket. + expected := qdb.Get(keys) + actual := b.Get(keys[len(keys)-1]) + if !bytes.Equal(actual, expected) { + fmt.Println("=== EXPECTED ===") + fmt.Println(expected) + fmt.Println("=== ACTUAL ===") + fmt.Println(actual) + fmt.Println("=== END ===") + panic("value mismatch") + } +} + +// Inserts a key into the database. +func simulatePutHandler(tx *bolt.Tx, qdb *QuickDB) { + var err error + keys, value := randKeys(), randValue() + + // Retrieve root bucket. + b := tx.Bucket(keys[0]) + if b == nil { + b, err = tx.CreateBucket(keys[0]) + if err != nil { + panic("create bucket: " + err.Error()) + } + } + + // Create nested buckets, if necessary. + for _, key := range keys[1 : len(keys)-1] { + child := b.Bucket(key) + if child != nil { + b = child + } else { + b, err = b.CreateBucket(key) + if err != nil { + panic("create bucket: " + err.Error()) + } + } + } + + // Insert into database. + if err := b.Put(keys[len(keys)-1], value); err != nil { + panic("put: " + err.Error()) + } + + // Insert into in-memory database. + qdb.Put(keys, value) +} + +// QuickDB is an in-memory database that replicates the functionality of the +// Bolt DB type except that it is entirely in-memory. It is meant for testing +// that the Bolt database is consistent. +type QuickDB struct { + sync.RWMutex + m map[string]interface{} +} + +// NewQuickDB returns an instance of QuickDB. +func NewQuickDB() *QuickDB { + return &QuickDB{m: make(map[string]interface{})} +} + +// Get retrieves the value at a key path. +func (db *QuickDB) Get(keys [][]byte) []byte { + db.RLock() + defer db.RUnlock() + + m := db.m + for _, key := range keys[:len(keys)-1] { + value := m[string(key)] + if value == nil { + return nil + } + switch value := value.(type) { + case map[string]interface{}: + m = value + case []byte: + return nil + } + } + + // Only return if it's a simple value. + if value, ok := m[string(keys[len(keys)-1])].([]byte); ok { + return value + } + return nil +} + +// Put inserts a value into a key path. +func (db *QuickDB) Put(keys [][]byte, value []byte) { + db.Lock() + defer db.Unlock() + + // Build buckets all the way down the key path. + m := db.m + for _, key := range keys[:len(keys)-1] { + if _, ok := m[string(key)].([]byte); ok { + return // Keypath intersects with a simple value. Do nothing. + } + + if m[string(key)] == nil { + m[string(key)] = make(map[string]interface{}) + } + m = m[string(key)].(map[string]interface{}) + } + + // Insert value into the last key. + m[string(keys[len(keys)-1])] = value +} + +// Rand returns a random key path that points to a simple value. +func (db *QuickDB) Rand() [][]byte { + db.RLock() + defer db.RUnlock() + if len(db.m) == 0 { + return nil + } + var keys [][]byte + db.rand(db.m, &keys) + return keys +} + +func (db *QuickDB) rand(m map[string]interface{}, keys *[][]byte) { + i, index := 0, rand.Intn(len(m)) + for k, v := range m { + if i == index { + *keys = append(*keys, []byte(k)) + if v, ok := v.(map[string]interface{}); ok { + db.rand(v, keys) + } + return + } + i++ + } + panic("quickdb rand: out-of-range") +} + +// Copy copies the entire database. +func (db *QuickDB) Copy() *QuickDB { + db.RLock() + defer db.RUnlock() + return &QuickDB{m: db.copy(db.m)} +} + +func (db *QuickDB) copy(m map[string]interface{}) map[string]interface{} { + clone := make(map[string]interface{}, len(m)) + for k, v := range m { + switch v := v.(type) { + case map[string]interface{}: + clone[k] = db.copy(v) + default: + clone[k] = v + } + } + return clone +} + +func randKey() []byte { + var min, max = 1, 1024 + n := rand.Intn(max-min) + min + b := make([]byte, n) + for i := 0; i < n; i++ { + b[i] = byte(rand.Intn(255)) + } + return b +} + +func randKeys() [][]byte { + var keys [][]byte + var count = rand.Intn(2) + 2 + for i := 0; i < count; i++ { + keys = append(keys, randKey()) + } + return keys +} + +func randValue() []byte { + n := rand.Intn(8192) + b := make([]byte, n) + for i := 0; i < n; i++ { + b[i] = byte(rand.Intn(255)) + } + return b +} diff --git a/vendor/github.com/boltdb/bolt/tx_test.go b/vendor/github.com/boltdb/bolt/tx_test.go new file mode 100644 index 000000000..2201e7928 --- /dev/null +++ b/vendor/github.com/boltdb/bolt/tx_test.go @@ -0,0 +1,716 @@ +package bolt_test + +import ( + "bytes" + "errors" + "fmt" + "log" + "os" + "testing" + + "github.com/boltdb/bolt" +) + +// Ensure that committing a closed transaction returns an error. +func TestTx_Commit_ErrTxClosed(t *testing.T) { + db := MustOpenDB() + defer db.MustClose() + tx, err := db.Begin(true) + if err != nil { + t.Fatal(err) + } + + if _, err := tx.CreateBucket([]byte("foo")); err != nil { + t.Fatal(err) + } + + if err := tx.Commit(); err != nil { + t.Fatal(err) + } + + if err := tx.Commit(); err != bolt.ErrTxClosed { + t.Fatalf("unexpected error: %s", err) + } +} + +// Ensure that rolling back a closed transaction returns an error. +func TestTx_Rollback_ErrTxClosed(t *testing.T) { + db := MustOpenDB() + defer db.MustClose() + + tx, err := db.Begin(true) + if err != nil { + t.Fatal(err) + } + + if err := tx.Rollback(); err != nil { + t.Fatal(err) + } + if err := tx.Rollback(); err != bolt.ErrTxClosed { + t.Fatalf("unexpected error: %s", err) + } +} + +// Ensure that committing a read-only transaction returns an error. +func TestTx_Commit_ErrTxNotWritable(t *testing.T) { + db := MustOpenDB() + defer db.MustClose() + tx, err := db.Begin(false) + if err != nil { + t.Fatal(err) + } + if err := tx.Commit(); err != bolt.ErrTxNotWritable { + t.Fatal(err) + } +} + +// Ensure that a transaction can retrieve a cursor on the root bucket. +func TestTx_Cursor(t *testing.T) { + db := MustOpenDB() + defer db.MustClose() + if err := db.Update(func(tx *bolt.Tx) error { + if _, err := tx.CreateBucket([]byte("widgets")); err != nil { + t.Fatal(err) + } + + if _, err := tx.CreateBucket([]byte("woojits")); err != nil { + t.Fatal(err) + } + + c := tx.Cursor() + if k, v := c.First(); !bytes.Equal(k, []byte("widgets")) { + t.Fatalf("unexpected key: %v", k) + } else if v != nil { + t.Fatalf("unexpected value: %v", v) + } + + if k, v := c.Next(); !bytes.Equal(k, []byte("woojits")) { + t.Fatalf("unexpected key: %v", k) + } else if v != nil { + t.Fatalf("unexpected value: %v", v) + } + + if k, v := c.Next(); k != nil { + t.Fatalf("unexpected key: %v", k) + } else if v != nil { + t.Fatalf("unexpected value: %v", k) + } + + return nil + }); err != nil { + t.Fatal(err) + } +} + +// Ensure that creating a bucket with a read-only transaction returns an error. +func TestTx_CreateBucket_ErrTxNotWritable(t *testing.T) { + db := MustOpenDB() + defer db.MustClose() + if err := db.View(func(tx *bolt.Tx) error { + _, err := tx.CreateBucket([]byte("foo")) + if err != bolt.ErrTxNotWritable { + t.Fatalf("unexpected error: %s", err) + } + return nil + }); err != nil { + t.Fatal(err) + } +} + +// Ensure that creating a bucket on a closed transaction returns an error. +func TestTx_CreateBucket_ErrTxClosed(t *testing.T) { + db := MustOpenDB() + defer db.MustClose() + tx, err := db.Begin(true) + if err != nil { + t.Fatal(err) + } + if err := tx.Commit(); err != nil { + t.Fatal(err) + } + + if _, err := tx.CreateBucket([]byte("foo")); err != bolt.ErrTxClosed { + t.Fatalf("unexpected error: %s", err) + } +} + +// Ensure that a Tx can retrieve a bucket. +func TestTx_Bucket(t *testing.T) { + db := MustOpenDB() + defer db.MustClose() + if err := db.Update(func(tx *bolt.Tx) error { + if _, err := tx.CreateBucket([]byte("widgets")); err != nil { + t.Fatal(err) + } + if tx.Bucket([]byte("widgets")) == nil { + t.Fatal("expected bucket") + } + return nil + }); err != nil { + t.Fatal(err) + } +} + +// Ensure that a Tx retrieving a non-existent key returns nil. +func TestTx_Get_NotFound(t *testing.T) { + db := MustOpenDB() + defer db.MustClose() + if err := db.Update(func(tx *bolt.Tx) error { + b, err := tx.CreateBucket([]byte("widgets")) + if err != nil { + t.Fatal(err) + } + + if err := b.Put([]byte("foo"), []byte("bar")); err != nil { + t.Fatal(err) + } + if b.Get([]byte("no_such_key")) != nil { + t.Fatal("expected nil value") + } + return nil + }); err != nil { + t.Fatal(err) + } +} + +// Ensure that a bucket can be created and retrieved. +func TestTx_CreateBucket(t *testing.T) { + db := MustOpenDB() + defer db.MustClose() + + // Create a bucket. + if err := db.Update(func(tx *bolt.Tx) error { + b, err := tx.CreateBucket([]byte("widgets")) + if err != nil { + t.Fatal(err) + } else if b == nil { + t.Fatal("expected bucket") + } + return nil + }); err != nil { + t.Fatal(err) + } + + // Read the bucket through a separate transaction. + if err := db.View(func(tx *bolt.Tx) error { + if tx.Bucket([]byte("widgets")) == nil { + t.Fatal("expected bucket") + } + return nil + }); err != nil { + t.Fatal(err) + } +} + +// Ensure that a bucket can be created if it doesn't already exist. +func TestTx_CreateBucketIfNotExists(t *testing.T) { + db := MustOpenDB() + defer db.MustClose() + if err := db.Update(func(tx *bolt.Tx) error { + // Create bucket. + if b, err := tx.CreateBucketIfNotExists([]byte("widgets")); err != nil { + t.Fatal(err) + } else if b == nil { + t.Fatal("expected bucket") + } + + // Create bucket again. + if b, err := tx.CreateBucketIfNotExists([]byte("widgets")); err != nil { + t.Fatal(err) + } else if b == nil { + t.Fatal("expected bucket") + } + + return nil + }); err != nil { + t.Fatal(err) + } + + // Read the bucket through a separate transaction. + if err := db.View(func(tx *bolt.Tx) error { + if tx.Bucket([]byte("widgets")) == nil { + t.Fatal("expected bucket") + } + return nil + }); err != nil { + t.Fatal(err) + } +} + +// Ensure transaction returns an error if creating an unnamed bucket. +func TestTx_CreateBucketIfNotExists_ErrBucketNameRequired(t *testing.T) { + db := MustOpenDB() + defer db.MustClose() + if err := db.Update(func(tx *bolt.Tx) error { + if _, err := tx.CreateBucketIfNotExists([]byte{}); err != bolt.ErrBucketNameRequired { + t.Fatalf("unexpected error: %s", err) + } + + if _, err := tx.CreateBucketIfNotExists(nil); err != bolt.ErrBucketNameRequired { + t.Fatalf("unexpected error: %s", err) + } + + return nil + }); err != nil { + t.Fatal(err) + } +} + +// Ensure that a bucket cannot be created twice. +func TestTx_CreateBucket_ErrBucketExists(t *testing.T) { + db := MustOpenDB() + defer db.MustClose() + + // Create a bucket. + if err := db.Update(func(tx *bolt.Tx) error { + if _, err := tx.CreateBucket([]byte("widgets")); err != nil { + t.Fatal(err) + } + return nil + }); err != nil { + t.Fatal(err) + } + + // Create the same bucket again. + if err := db.Update(func(tx *bolt.Tx) error { + if _, err := tx.CreateBucket([]byte("widgets")); err != bolt.ErrBucketExists { + t.Fatalf("unexpected error: %s", err) + } + return nil + }); err != nil { + t.Fatal(err) + } +} + +// Ensure that a bucket is created with a non-blank name. +func TestTx_CreateBucket_ErrBucketNameRequired(t *testing.T) { + db := MustOpenDB() + defer db.MustClose() + if err := db.Update(func(tx *bolt.Tx) error { + if _, err := tx.CreateBucket(nil); err != bolt.ErrBucketNameRequired { + t.Fatalf("unexpected error: %s", err) + } + return nil + }); err != nil { + t.Fatal(err) + } +} + +// Ensure that a bucket can be deleted. +func TestTx_DeleteBucket(t *testing.T) { + db := MustOpenDB() + defer db.MustClose() + + // Create a bucket and add a value. + if err := db.Update(func(tx *bolt.Tx) error { + b, err := tx.CreateBucket([]byte("widgets")) + if err != nil { + t.Fatal(err) + } + if err := b.Put([]byte("foo"), []byte("bar")); err != nil { + t.Fatal(err) + } + return nil + }); err != nil { + t.Fatal(err) + } + + // Delete the bucket and make sure we can't get the value. + if err := db.Update(func(tx *bolt.Tx) error { + if err := tx.DeleteBucket([]byte("widgets")); err != nil { + t.Fatal(err) + } + if tx.Bucket([]byte("widgets")) != nil { + t.Fatal("unexpected bucket") + } + return nil + }); err != nil { + t.Fatal(err) + } + + if err := db.Update(func(tx *bolt.Tx) error { + // Create the bucket again and make sure there's not a phantom value. + b, err := tx.CreateBucket([]byte("widgets")) + if err != nil { + t.Fatal(err) + } + if v := b.Get([]byte("foo")); v != nil { + t.Fatalf("unexpected phantom value: %v", v) + } + return nil + }); err != nil { + t.Fatal(err) + } +} + +// Ensure that deleting a bucket on a closed transaction returns an error. +func TestTx_DeleteBucket_ErrTxClosed(t *testing.T) { + db := MustOpenDB() + defer db.MustClose() + tx, err := db.Begin(true) + if err != nil { + t.Fatal(err) + } + if err := tx.Commit(); err != nil { + t.Fatal(err) + } + if err := tx.DeleteBucket([]byte("foo")); err != bolt.ErrTxClosed { + t.Fatalf("unexpected error: %s", err) + } +} + +// Ensure that deleting a bucket with a read-only transaction returns an error. +func TestTx_DeleteBucket_ReadOnly(t *testing.T) { + db := MustOpenDB() + defer db.MustClose() + if err := db.View(func(tx *bolt.Tx) error { + if err := tx.DeleteBucket([]byte("foo")); err != bolt.ErrTxNotWritable { + t.Fatalf("unexpected error: %s", err) + } + return nil + }); err != nil { + t.Fatal(err) + } +} + +// Ensure that nothing happens when deleting a bucket that doesn't exist. +func TestTx_DeleteBucket_NotFound(t *testing.T) { + db := MustOpenDB() + defer db.MustClose() + if err := db.Update(func(tx *bolt.Tx) error { + if err := tx.DeleteBucket([]byte("widgets")); err != bolt.ErrBucketNotFound { + t.Fatalf("unexpected error: %s", err) + } + return nil + }); err != nil { + t.Fatal(err) + } +} + +// Ensure that no error is returned when a tx.ForEach function does not return +// an error. +func TestTx_ForEach_NoError(t *testing.T) { + db := MustOpenDB() + defer db.MustClose() + if err := db.Update(func(tx *bolt.Tx) error { + b, err := tx.CreateBucket([]byte("widgets")) + if err != nil { + t.Fatal(err) + } + if err := b.Put([]byte("foo"), []byte("bar")); err != nil { + t.Fatal(err) + } + + if err := tx.ForEach(func(name []byte, b *bolt.Bucket) error { + return nil + }); err != nil { + t.Fatal(err) + } + return nil + }); err != nil { + t.Fatal(err) + } +} + +// Ensure that an error is returned when a tx.ForEach function returns an error. +func TestTx_ForEach_WithError(t *testing.T) { + db := MustOpenDB() + defer db.MustClose() + if err := db.Update(func(tx *bolt.Tx) error { + b, err := tx.CreateBucket([]byte("widgets")) + if err != nil { + t.Fatal(err) + } + if err := b.Put([]byte("foo"), []byte("bar")); err != nil { + t.Fatal(err) + } + + marker := errors.New("marker") + if err := tx.ForEach(func(name []byte, b *bolt.Bucket) error { + return marker + }); err != marker { + t.Fatalf("unexpected error: %s", err) + } + return nil + }); err != nil { + t.Fatal(err) + } +} + +// Ensure that Tx commit handlers are called after a transaction successfully commits. +func TestTx_OnCommit(t *testing.T) { + db := MustOpenDB() + defer db.MustClose() + + var x int + if err := db.Update(func(tx *bolt.Tx) error { + tx.OnCommit(func() { x += 1 }) + tx.OnCommit(func() { x += 2 }) + if _, err := tx.CreateBucket([]byte("widgets")); err != nil { + t.Fatal(err) + } + return nil + }); err != nil { + t.Fatal(err) + } else if x != 3 { + t.Fatalf("unexpected x: %d", x) + } +} + +// Ensure that Tx commit handlers are NOT called after a transaction rolls back. +func TestTx_OnCommit_Rollback(t *testing.T) { + db := MustOpenDB() + defer db.MustClose() + + var x int + if err := db.Update(func(tx *bolt.Tx) error { + tx.OnCommit(func() { x += 1 }) + tx.OnCommit(func() { x += 2 }) + if _, err := tx.CreateBucket([]byte("widgets")); err != nil { + t.Fatal(err) + } + return errors.New("rollback this commit") + }); err == nil || err.Error() != "rollback this commit" { + t.Fatalf("unexpected error: %s", err) + } else if x != 0 { + t.Fatalf("unexpected x: %d", x) + } +} + +// Ensure that the database can be copied to a file path. +func TestTx_CopyFile(t *testing.T) { + db := MustOpenDB() + defer db.MustClose() + + path := tempfile() + if err := db.Update(func(tx *bolt.Tx) error { + b, err := tx.CreateBucket([]byte("widgets")) + if err != nil { + t.Fatal(err) + } + if err := b.Put([]byte("foo"), []byte("bar")); err != nil { + t.Fatal(err) + } + if err := b.Put([]byte("baz"), []byte("bat")); err != nil { + t.Fatal(err) + } + return nil + }); err != nil { + t.Fatal(err) + } + + if err := db.View(func(tx *bolt.Tx) error { + return tx.CopyFile(path, 0600) + }); err != nil { + t.Fatal(err) + } + + db2, err := bolt.Open(path, 0600, nil) + if err != nil { + t.Fatal(err) + } + + if err := db2.View(func(tx *bolt.Tx) error { + if v := tx.Bucket([]byte("widgets")).Get([]byte("foo")); !bytes.Equal(v, []byte("bar")) { + t.Fatalf("unexpected value: %v", v) + } + if v := tx.Bucket([]byte("widgets")).Get([]byte("baz")); !bytes.Equal(v, []byte("bat")) { + t.Fatalf("unexpected value: %v", v) + } + return nil + }); err != nil { + t.Fatal(err) + } + + if err := db2.Close(); err != nil { + t.Fatal(err) + } +} + +type failWriterError struct{} + +func (failWriterError) Error() string { + return "error injected for tests" +} + +type failWriter struct { + // fail after this many bytes + After int +} + +func (f *failWriter) Write(p []byte) (n int, err error) { + n = len(p) + if n > f.After { + n = f.After + err = failWriterError{} + } + f.After -= n + return n, err +} + +// Ensure that Copy handles write errors right. +func TestTx_CopyFile_Error_Meta(t *testing.T) { + db := MustOpenDB() + defer db.MustClose() + if err := db.Update(func(tx *bolt.Tx) error { + b, err := tx.CreateBucket([]byte("widgets")) + if err != nil { + t.Fatal(err) + } + if err := b.Put([]byte("foo"), []byte("bar")); err != nil { + t.Fatal(err) + } + if err := b.Put([]byte("baz"), []byte("bat")); err != nil { + t.Fatal(err) + } + return nil + }); err != nil { + t.Fatal(err) + } + + if err := db.View(func(tx *bolt.Tx) error { + return tx.Copy(&failWriter{}) + }); err == nil || err.Error() != "meta 0 copy: error injected for tests" { + t.Fatalf("unexpected error: %v", err) + } +} + +// Ensure that Copy handles write errors right. +func TestTx_CopyFile_Error_Normal(t *testing.T) { + db := MustOpenDB() + defer db.MustClose() + if err := db.Update(func(tx *bolt.Tx) error { + b, err := tx.CreateBucket([]byte("widgets")) + if err != nil { + t.Fatal(err) + } + if err := b.Put([]byte("foo"), []byte("bar")); err != nil { + t.Fatal(err) + } + if err := b.Put([]byte("baz"), []byte("bat")); err != nil { + t.Fatal(err) + } + return nil + }); err != nil { + t.Fatal(err) + } + + if err := db.View(func(tx *bolt.Tx) error { + return tx.Copy(&failWriter{3 * db.Info().PageSize}) + }); err == nil || err.Error() != "error injected for tests" { + t.Fatalf("unexpected error: %v", err) + } +} + +func ExampleTx_Rollback() { + // Open the database. + db, err := bolt.Open(tempfile(), 0666, nil) + if err != nil { + log.Fatal(err) + } + defer os.Remove(db.Path()) + + // Create a bucket. + if err := db.Update(func(tx *bolt.Tx) error { + _, err := tx.CreateBucket([]byte("widgets")) + return err + }); err != nil { + log.Fatal(err) + } + + // Set a value for a key. + if err := db.Update(func(tx *bolt.Tx) error { + return tx.Bucket([]byte("widgets")).Put([]byte("foo"), []byte("bar")) + }); err != nil { + log.Fatal(err) + } + + // Update the key but rollback the transaction so it never saves. + tx, err := db.Begin(true) + if err != nil { + log.Fatal(err) + } + b := tx.Bucket([]byte("widgets")) + if err := b.Put([]byte("foo"), []byte("baz")); err != nil { + log.Fatal(err) + } + if err := tx.Rollback(); err != nil { + log.Fatal(err) + } + + // Ensure that our original value is still set. + if err := db.View(func(tx *bolt.Tx) error { + value := tx.Bucket([]byte("widgets")).Get([]byte("foo")) + fmt.Printf("The value for 'foo' is still: %s\n", value) + return nil + }); err != nil { + log.Fatal(err) + } + + // Close database to release file lock. + if err := db.Close(); err != nil { + log.Fatal(err) + } + + // Output: + // The value for 'foo' is still: bar +} + +func ExampleTx_CopyFile() { + // Open the database. + db, err := bolt.Open(tempfile(), 0666, nil) + if err != nil { + log.Fatal(err) + } + defer os.Remove(db.Path()) + + // Create a bucket and a key. + if err := db.Update(func(tx *bolt.Tx) error { + b, err := tx.CreateBucket([]byte("widgets")) + if err != nil { + return err + } + if err := b.Put([]byte("foo"), []byte("bar")); err != nil { + return err + } + return nil + }); err != nil { + log.Fatal(err) + } + + // Copy the database to another file. + toFile := tempfile() + if err := db.View(func(tx *bolt.Tx) error { + return tx.CopyFile(toFile, 0666) + }); err != nil { + log.Fatal(err) + } + defer os.Remove(toFile) + + // Open the cloned database. + db2, err := bolt.Open(toFile, 0666, nil) + if err != nil { + log.Fatal(err) + } + + // Ensure that the key exists in the copy. + if err := db2.View(func(tx *bolt.Tx) error { + value := tx.Bucket([]byte("widgets")).Get([]byte("foo")) + fmt.Printf("The value for 'foo' in the clone is: %s\n", value) + return nil + }); err != nil { + log.Fatal(err) + } + + // Close database to release file lock. + if err := db.Close(); err != nil { + log.Fatal(err) + } + + if err := db2.Close(); err != nil { + log.Fatal(err) + } + + // Output: + // The value for 'foo' in the clone is: bar +} diff --git a/vendor/github.com/cenkalti/backoff/.gitignore b/vendor/github.com/cenkalti/backoff/.gitignore new file mode 100644 index 000000000..00268614f --- /dev/null +++ b/vendor/github.com/cenkalti/backoff/.gitignore @@ -0,0 +1,22 @@ +# Compiled Object files, Static and Dynamic libs (Shared Objects) +*.o +*.a +*.so + +# Folders +_obj +_test + +# Architecture specific extensions/prefixes +*.[568vq] +[568vq].out + +*.cgo1.go +*.cgo2.c +_cgo_defun.c +_cgo_gotypes.go +_cgo_export.* + +_testmain.go + +*.exe diff --git a/vendor/github.com/cenkalti/backoff/.gitrepo b/vendor/github.com/cenkalti/backoff/.gitrepo new file mode 100644 index 000000000..9b94b5745 --- /dev/null +++ b/vendor/github.com/cenkalti/backoff/.gitrepo @@ -0,0 +1,11 @@ +; DO NOT EDIT (unless you know what you are doing) +; +; This subdirectory is a git "subrepo", and this file is maintained by the +; git-subrepo command. See https://github.com/git-commands/git-subrepo#readme +; +[subrepo] + remote = http://github.com/cenkalti/backoff.git + branch = master + commit = a6030178a585d5972d4d33ce61f4a1fa40eaaed0 + parent = d5b36c0d0a0def93ec852155578d4ff9f4fd6e7c + cmdver = 0.3.0 diff --git a/vendor/github.com/cenkalti/backoff/.travis.yml b/vendor/github.com/cenkalti/backoff/.travis.yml new file mode 100644 index 000000000..1040404bf --- /dev/null +++ b/vendor/github.com/cenkalti/backoff/.travis.yml @@ -0,0 +1,9 @@ +language: go +go: + - 1.3.3 + - tip +before_install: + - go get github.com/mattn/goveralls + - go get golang.org/x/tools/cmd/cover +script: + - $HOME/gopath/bin/goveralls -service=travis-ci diff --git a/vendor/github.com/cenkalti/backoff/backoff_test.go b/vendor/github.com/cenkalti/backoff/backoff_test.go new file mode 100644 index 000000000..91f27c4f1 --- /dev/null +++ b/vendor/github.com/cenkalti/backoff/backoff_test.go @@ -0,0 +1,27 @@ +package backoff + +import ( + "testing" + "time" +) + +func TestNextBackOffMillis(t *testing.T) { + subtestNextBackOff(t, 0, new(ZeroBackOff)) + subtestNextBackOff(t, Stop, new(StopBackOff)) +} + +func subtestNextBackOff(t *testing.T, expectedValue time.Duration, backOffPolicy BackOff) { + for i := 0; i < 10; i++ { + next := backOffPolicy.NextBackOff() + if next != expectedValue { + t.Errorf("got: %d expected: %d", next, expectedValue) + } + } +} + +func TestConstantBackOff(t *testing.T) { + backoff := NewConstantBackOff(time.Second) + if backoff.NextBackOff() != time.Second { + t.Error("invalid interval") + } +} diff --git a/vendor/github.com/cenkalti/backoff/example_test.go b/vendor/github.com/cenkalti/backoff/example_test.go new file mode 100644 index 000000000..0d1852e45 --- /dev/null +++ b/vendor/github.com/cenkalti/backoff/example_test.go @@ -0,0 +1,51 @@ +package backoff + +import "log" + +func ExampleRetry() error { + operation := func() error { + // An operation that might fail. + return nil // or return errors.New("some error") + } + + err := Retry(operation, NewExponentialBackOff()) + if err != nil { + // Handle error. + return err + } + + // Operation is successful. + return nil +} + +func ExampleTicker() error { + operation := func() error { + // An operation that might fail + return nil // or return errors.New("some error") + } + + b := NewExponentialBackOff() + ticker := NewTicker(b) + + var err error + + // Ticks will continue to arrive when the previous operation is still running, + // so operations that take a while to fail could run in quick succession. + for _ = range ticker.C { + if err = operation(); err != nil { + log.Println(err, "will retry...") + continue + } + + ticker.Stop() + break + } + + if err != nil { + // Operation has failed. + return err + } + + // Operation is successful. + return nil +} diff --git a/vendor/github.com/cenkalti/backoff/exponential_test.go b/vendor/github.com/cenkalti/backoff/exponential_test.go new file mode 100644 index 000000000..11b95e4f6 --- /dev/null +++ b/vendor/github.com/cenkalti/backoff/exponential_test.go @@ -0,0 +1,108 @@ +package backoff + +import ( + "math" + "testing" + "time" +) + +func TestBackOff(t *testing.T) { + var ( + testInitialInterval = 500 * time.Millisecond + testRandomizationFactor = 0.1 + testMultiplier = 2.0 + testMaxInterval = 5 * time.Second + testMaxElapsedTime = 15 * time.Minute + ) + + exp := NewExponentialBackOff() + exp.InitialInterval = testInitialInterval + exp.RandomizationFactor = testRandomizationFactor + exp.Multiplier = testMultiplier + exp.MaxInterval = testMaxInterval + exp.MaxElapsedTime = testMaxElapsedTime + exp.Reset() + + var expectedResults = []time.Duration{500, 1000, 2000, 4000, 5000, 5000, 5000, 5000, 5000, 5000} + for i, d := range expectedResults { + expectedResults[i] = d * time.Millisecond + } + + for _, expected := range expectedResults { + assertEquals(t, expected, exp.currentInterval) + // Assert that the next backoff falls in the expected range. + var minInterval = expected - time.Duration(testRandomizationFactor*float64(expected)) + var maxInterval = expected + time.Duration(testRandomizationFactor*float64(expected)) + var actualInterval = exp.NextBackOff() + if !(minInterval <= actualInterval && actualInterval <= maxInterval) { + t.Error("error") + } + } +} + +func TestGetRandomizedInterval(t *testing.T) { + // 33% chance of being 1. + assertEquals(t, 1, getRandomValueFromInterval(0.5, 0, 2)) + assertEquals(t, 1, getRandomValueFromInterval(0.5, 0.33, 2)) + // 33% chance of being 2. + assertEquals(t, 2, getRandomValueFromInterval(0.5, 0.34, 2)) + assertEquals(t, 2, getRandomValueFromInterval(0.5, 0.66, 2)) + // 33% chance of being 3. + assertEquals(t, 3, getRandomValueFromInterval(0.5, 0.67, 2)) + assertEquals(t, 3, getRandomValueFromInterval(0.5, 0.99, 2)) +} + +type TestClock struct { + i time.Duration + start time.Time +} + +func (c *TestClock) Now() time.Time { + t := c.start.Add(c.i) + c.i += time.Second + return t +} + +func TestGetElapsedTime(t *testing.T) { + var exp = NewExponentialBackOff() + exp.Clock = &TestClock{} + exp.Reset() + + var elapsedTime = exp.GetElapsedTime() + if elapsedTime != time.Second { + t.Errorf("elapsedTime=%d", elapsedTime) + } +} + +func TestMaxElapsedTime(t *testing.T) { + var exp = NewExponentialBackOff() + exp.Clock = &TestClock{start: time.Time{}.Add(10000 * time.Second)} + // Change the currentElapsedTime to be 0 ensuring that the elapsed time will be greater + // than the max elapsed time. + exp.startTime = time.Time{} + assertEquals(t, Stop, exp.NextBackOff()) +} + +func TestBackOffOverflow(t *testing.T) { + var ( + testInitialInterval time.Duration = math.MaxInt64 / 2 + testMaxInterval time.Duration = math.MaxInt64 + testMultiplier = 2.1 + ) + + exp := NewExponentialBackOff() + exp.InitialInterval = testInitialInterval + exp.Multiplier = testMultiplier + exp.MaxInterval = testMaxInterval + exp.Reset() + + exp.NextBackOff() + // Assert that when an overflow is possible the current varerval time.Duration is set to the max varerval time.Duration . + assertEquals(t, testMaxInterval, exp.currentInterval) +} + +func assertEquals(t *testing.T, expected, value time.Duration) { + if expected != value { + t.Errorf("got: %d, expected: %d", value, expected) + } +} diff --git a/vendor/github.com/cenkalti/backoff/retry_test.go b/vendor/github.com/cenkalti/backoff/retry_test.go new file mode 100644 index 000000000..4d54b9ae0 --- /dev/null +++ b/vendor/github.com/cenkalti/backoff/retry_test.go @@ -0,0 +1,34 @@ +package backoff + +import ( + "errors" + "log" + "testing" +) + +func TestRetry(t *testing.T) { + const successOn = 3 + var i = 0 + + // This function is successful on "successOn" calls. + f := func() error { + i++ + log.Printf("function is called %d. time\n", i) + + if i == successOn { + log.Println("OK") + return nil + } + + log.Println("error") + return errors.New("error") + } + + err := Retry(f, NewExponentialBackOff()) + if err != nil { + t.Errorf("unexpected error: %s", err.Error()) + } + if i != successOn { + t.Errorf("invalid number of retries: %d", i) + } +} diff --git a/vendor/github.com/cenkalti/backoff/ticker_test.go b/vendor/github.com/cenkalti/backoff/ticker_test.go new file mode 100644 index 000000000..562718c50 --- /dev/null +++ b/vendor/github.com/cenkalti/backoff/ticker_test.go @@ -0,0 +1,45 @@ +package backoff + +import ( + "errors" + "log" + "testing" +) + +func TestTicker(t *testing.T) { + const successOn = 3 + var i = 0 + + // This function is successful on "successOn" calls. + f := func() error { + i++ + log.Printf("function is called %d. time\n", i) + + if i == successOn { + log.Println("OK") + return nil + } + + log.Println("error") + return errors.New("error") + } + + b := NewExponentialBackOff() + ticker := NewTicker(b) + + var err error + for _ = range ticker.C { + if err = f(); err != nil { + t.Log(err) + continue + } + + break + } + if err != nil { + t.Errorf("unexpected error: %s", err.Error()) + } + if i != successOn { + t.Errorf("invalid number of retries: %d", i) + } +} diff --git a/vendor/github.com/davecgh/go-spew/README.md b/vendor/github.com/davecgh/go-spew/README.md deleted file mode 100644 index 777a8e1d4..000000000 --- a/vendor/github.com/davecgh/go-spew/README.md +++ /dev/null @@ -1,194 +0,0 @@ -go-spew -======= - -[![Build Status](https://travis-ci.org/davecgh/go-spew.png?branch=master)] -(https://travis-ci.org/davecgh/go-spew) [![Coverage Status] -(https://coveralls.io/repos/davecgh/go-spew/badge.png?branch=master)] -(https://coveralls.io/r/davecgh/go-spew?branch=master) - -Go-spew implements a deep pretty printer for Go data structures to aid in -debugging. A comprehensive suite of tests with 100% test coverage is provided -to ensure proper functionality. See `test_coverage.txt` for the gocov coverage -report. Go-spew is licensed under the liberal ISC license, so it may be used in -open source or commercial projects. - -If you're interested in reading about how this package came to life and some -of the challenges involved in providing a deep pretty printer, there is a blog -post about it -[here](https://blog.cyphertite.com/go-spew-a-journey-into-dumping-go-data-structures/). - -## Documentation - -[![GoDoc](https://godoc.org/github.com/davecgh/go-spew/spew?status.png)] -(http://godoc.org/github.com/davecgh/go-spew/spew) - -Full `go doc` style documentation for the project can be viewed online without -installing this package by using the excellent GoDoc site here: -http://godoc.org/github.com/davecgh/go-spew/spew - -You can also view the documentation locally once the package is installed with -the `godoc` tool by running `godoc -http=":6060"` and pointing your browser to -http://localhost:6060/pkg/github.com/davecgh/go-spew/spew - -## Installation - -```bash -$ go get -u github.com/davecgh/go-spew/spew -``` - -## Quick Start - -Add this import line to the file you're working in: - -```Go -import "github.com/davecgh/go-spew/spew" -``` - -To dump a variable with full newlines, indentation, type, and pointer -information use Dump, Fdump, or Sdump: - -```Go -spew.Dump(myVar1, myVar2, ...) -spew.Fdump(someWriter, myVar1, myVar2, ...) -str := spew.Sdump(myVar1, myVar2, ...) -``` - -Alternatively, if you would prefer to use format strings with a compacted inline -printing style, use the convenience wrappers Printf, Fprintf, etc with %v (most -compact), %+v (adds pointer addresses), %#v (adds types), or %#+v (adds types -and pointer addresses): - -```Go -spew.Printf("myVar1: %v -- myVar2: %+v", myVar1, myVar2) -spew.Printf("myVar3: %#v -- myVar4: %#+v", myVar3, myVar4) -spew.Fprintf(someWriter, "myVar1: %v -- myVar2: %+v", myVar1, myVar2) -spew.Fprintf(someWriter, "myVar3: %#v -- myVar4: %#+v", myVar3, myVar4) -``` - -## Debugging a Web Application Example - -Here is an example of how you can use `spew.Sdump()` to help debug a web application. Please be sure to wrap your output using the `html.EscapeString()` function for safety reasons. You should also only use this debugging technique in a development environment, never in production. - -```Go -package main - -import ( - "fmt" - "html" - "net/http" - - "github.com/davecgh/go-spew/spew" -) - -func handler(w http.ResponseWriter, r *http.Request) { - w.Header().Set("Content-Type", "text/html") - fmt.Fprintf(w, "Hi there, %s!", r.URL.Path[1:]) - fmt.Fprintf(w, "") -} - -func main() { - http.HandleFunc("/", handler) - http.ListenAndServe(":8080", nil) -} -``` - -## Sample Dump Output - -``` -(main.Foo) { - unexportedField: (*main.Bar)(0xf84002e210)({ - flag: (main.Flag) flagTwo, - data: (uintptr) - }), - ExportedField: (map[interface {}]interface {}) { - (string) "one": (bool) true - } -} -([]uint8) { - 00000000 11 12 13 14 15 16 17 18 19 1a 1b 1c 1d 1e 1f 20 |............... | - 00000010 21 22 23 24 25 26 27 28 29 2a 2b 2c 2d 2e 2f 30 |!"#$%&'()*+,-./0| - 00000020 31 32 |12| -} -``` - -## Sample Formatter Output - -Double pointer to a uint8: -``` - %v: <**>5 - %+v: <**>(0xf8400420d0->0xf8400420c8)5 - %#v: (**uint8)5 - %#+v: (**uint8)(0xf8400420d0->0xf8400420c8)5 -``` - -Pointer to circular struct with a uint8 field and a pointer to itself: -``` - %v: <*>{1 <*>} - %+v: <*>(0xf84003e260){ui8:1 c:<*>(0xf84003e260)} - %#v: (*main.circular){ui8:(uint8)1 c:(*main.circular)} - %#+v: (*main.circular)(0xf84003e260){ui8:(uint8)1 c:(*main.circular)(0xf84003e260)} -``` - -## Configuration Options - -Configuration of spew is handled by fields in the ConfigState type. For -convenience, all of the top-level functions use a global state available via the -spew.Config global. - -It is also possible to create a ConfigState instance that provides methods -equivalent to the top-level functions. This allows concurrent configuration -options. See the ConfigState documentation for more details. - -``` -* Indent - String to use for each indentation level for Dump functions. - It is a single space by default. A popular alternative is "\t". - -* MaxDepth - Maximum number of levels to descend into nested data structures. - There is no limit by default. - -* DisableMethods - Disables invocation of error and Stringer interface methods. - Method invocation is enabled by default. - -* DisablePointerMethods - Disables invocation of error and Stringer interface methods on types - which only accept pointer receivers from non-pointer variables. This option - relies on access to the unsafe package, so it will not have any effect when - running in environments without access to the unsafe package such as Google - App Engine or with the "disableunsafe" build tag specified. - Pointer method invocation is enabled by default. - -* ContinueOnMethod - Enables recursion into types after invoking error and Stringer interface - methods. Recursion after method invocation is disabled by default. - -* SortKeys - Specifies map keys should be sorted before being printed. Use - this to have a more deterministic, diffable output. Note that - only native types (bool, int, uint, floats, uintptr and string) - and types which implement error or Stringer interfaces are supported, - with other types sorted according to the reflect.Value.String() output - which guarantees display stability. Natural map order is used by - default. - -* SpewKeys - SpewKeys specifies that, as a last resort attempt, map keys should be - spewed to strings and sorted by those strings. This is only considered - if SortKeys is true. - -``` - -## Unsafe Package Dependency - -This package relies on the unsafe package to perform some of the more advanced -features, however it also supports a "limited" mode which allows it to work in -environments where the unsafe package is not available. By default, it will -operate in this mode on Google App Engine. The "disableunsafe" build tag may -also be specified to force the package to build without using the unsafe -package. - -## License - -Go-spew is licensed under the liberal ISC License. diff --git a/vendor/github.com/davecgh/go-spew/cov_report.sh b/vendor/github.com/davecgh/go-spew/cov_report.sh deleted file mode 100644 index 9579497e4..000000000 --- a/vendor/github.com/davecgh/go-spew/cov_report.sh +++ /dev/null @@ -1,22 +0,0 @@ -#!/bin/sh - -# This script uses gocov to generate a test coverage report. -# The gocov tool my be obtained with the following command: -# go get github.com/axw/gocov/gocov -# -# It will be installed to $GOPATH/bin, so ensure that location is in your $PATH. - -# Check for gocov. -if ! type gocov >/dev/null 2>&1; then - echo >&2 "This script requires the gocov tool." - echo >&2 "You may obtain it with the following command:" - echo >&2 "go get github.com/axw/gocov/gocov" - exit 1 -fi - -# Only run the cgo tests if gcc is installed. -if type gcc >/dev/null 2>&1; then - (cd spew && gocov test -tags testcgo | gocov report) -else - (cd spew && gocov test | gocov report) -fi diff --git a/vendor/github.com/davecgh/go-spew/test_coverage.txt b/vendor/github.com/davecgh/go-spew/test_coverage.txt deleted file mode 100644 index 2cd087a2a..000000000 --- a/vendor/github.com/davecgh/go-spew/test_coverage.txt +++ /dev/null @@ -1,61 +0,0 @@ - -github.com/davecgh/go-spew/spew/dump.go dumpState.dump 100.00% (88/88) -github.com/davecgh/go-spew/spew/format.go formatState.format 100.00% (82/82) -github.com/davecgh/go-spew/spew/format.go formatState.formatPtr 100.00% (52/52) -github.com/davecgh/go-spew/spew/dump.go dumpState.dumpPtr 100.00% (44/44) -github.com/davecgh/go-spew/spew/dump.go dumpState.dumpSlice 100.00% (39/39) -github.com/davecgh/go-spew/spew/common.go handleMethods 100.00% (30/30) -github.com/davecgh/go-spew/spew/common.go printHexPtr 100.00% (18/18) -github.com/davecgh/go-spew/spew/common.go unsafeReflectValue 100.00% (13/13) -github.com/davecgh/go-spew/spew/format.go formatState.constructOrigFormat 100.00% (12/12) -github.com/davecgh/go-spew/spew/dump.go fdump 100.00% (11/11) -github.com/davecgh/go-spew/spew/format.go formatState.Format 100.00% (11/11) -github.com/davecgh/go-spew/spew/common.go init 100.00% (10/10) -github.com/davecgh/go-spew/spew/common.go printComplex 100.00% (9/9) -github.com/davecgh/go-spew/spew/common.go valuesSorter.Less 100.00% (8/8) -github.com/davecgh/go-spew/spew/format.go formatState.buildDefaultFormat 100.00% (7/7) -github.com/davecgh/go-spew/spew/format.go formatState.unpackValue 100.00% (5/5) -github.com/davecgh/go-spew/spew/dump.go dumpState.indent 100.00% (4/4) -github.com/davecgh/go-spew/spew/common.go catchPanic 100.00% (4/4) -github.com/davecgh/go-spew/spew/config.go ConfigState.convertArgs 100.00% (4/4) -github.com/davecgh/go-spew/spew/spew.go convertArgs 100.00% (4/4) -github.com/davecgh/go-spew/spew/format.go newFormatter 100.00% (3/3) -github.com/davecgh/go-spew/spew/dump.go Sdump 100.00% (3/3) -github.com/davecgh/go-spew/spew/common.go printBool 100.00% (3/3) -github.com/davecgh/go-spew/spew/common.go sortValues 100.00% (3/3) -github.com/davecgh/go-spew/spew/config.go ConfigState.Sdump 100.00% (3/3) -github.com/davecgh/go-spew/spew/dump.go dumpState.unpackValue 100.00% (3/3) -github.com/davecgh/go-spew/spew/spew.go Printf 100.00% (1/1) -github.com/davecgh/go-spew/spew/spew.go Println 100.00% (1/1) -github.com/davecgh/go-spew/spew/spew.go Sprint 100.00% (1/1) -github.com/davecgh/go-spew/spew/spew.go Sprintf 100.00% (1/1) -github.com/davecgh/go-spew/spew/spew.go Sprintln 100.00% (1/1) -github.com/davecgh/go-spew/spew/common.go printFloat 100.00% (1/1) -github.com/davecgh/go-spew/spew/config.go NewDefaultConfig 100.00% (1/1) -github.com/davecgh/go-spew/spew/common.go printInt 100.00% (1/1) -github.com/davecgh/go-spew/spew/common.go printUint 100.00% (1/1) -github.com/davecgh/go-spew/spew/common.go valuesSorter.Len 100.00% (1/1) -github.com/davecgh/go-spew/spew/common.go valuesSorter.Swap 100.00% (1/1) -github.com/davecgh/go-spew/spew/config.go ConfigState.Errorf 100.00% (1/1) -github.com/davecgh/go-spew/spew/config.go ConfigState.Fprint 100.00% (1/1) -github.com/davecgh/go-spew/spew/config.go ConfigState.Fprintf 100.00% (1/1) -github.com/davecgh/go-spew/spew/config.go ConfigState.Fprintln 100.00% (1/1) -github.com/davecgh/go-spew/spew/config.go ConfigState.Print 100.00% (1/1) -github.com/davecgh/go-spew/spew/config.go ConfigState.Printf 100.00% (1/1) -github.com/davecgh/go-spew/spew/config.go ConfigState.Println 100.00% (1/1) -github.com/davecgh/go-spew/spew/config.go ConfigState.Sprint 100.00% (1/1) -github.com/davecgh/go-spew/spew/config.go ConfigState.Sprintf 100.00% (1/1) -github.com/davecgh/go-spew/spew/config.go ConfigState.Sprintln 100.00% (1/1) -github.com/davecgh/go-spew/spew/config.go ConfigState.NewFormatter 100.00% (1/1) -github.com/davecgh/go-spew/spew/config.go ConfigState.Fdump 100.00% (1/1) -github.com/davecgh/go-spew/spew/config.go ConfigState.Dump 100.00% (1/1) -github.com/davecgh/go-spew/spew/dump.go Fdump 100.00% (1/1) -github.com/davecgh/go-spew/spew/dump.go Dump 100.00% (1/1) -github.com/davecgh/go-spew/spew/spew.go Fprintln 100.00% (1/1) -github.com/davecgh/go-spew/spew/format.go NewFormatter 100.00% (1/1) -github.com/davecgh/go-spew/spew/spew.go Errorf 100.00% (1/1) -github.com/davecgh/go-spew/spew/spew.go Fprint 100.00% (1/1) -github.com/davecgh/go-spew/spew/spew.go Fprintf 100.00% (1/1) -github.com/davecgh/go-spew/spew/spew.go Print 100.00% (1/1) -github.com/davecgh/go-spew/spew ------------------------------- 100.00% (505/505) - diff --git a/vendor/github.com/dustin/go-humanize/.gitignore b/vendor/github.com/dustin/go-humanize/.gitignore new file mode 100644 index 000000000..05b40514a --- /dev/null +++ b/vendor/github.com/dustin/go-humanize/.gitignore @@ -0,0 +1,6 @@ +#* +*.[568] +*.a +*~ +[568].out +_* diff --git a/vendor/github.com/dustin/go-humanize/.gitrepo b/vendor/github.com/dustin/go-humanize/.gitrepo new file mode 100644 index 000000000..a08acf355 --- /dev/null +++ b/vendor/github.com/dustin/go-humanize/.gitrepo @@ -0,0 +1,11 @@ +; DO NOT EDIT (unless you know what you are doing) +; +; This subdirectory is a git "subrepo", and this file is maintained by the +; git-subrepo command. See https://github.com/git-commands/git-subrepo#readme +; +[subrepo] + remote = http://github.com/dustin/go-humanize.git + branch = master + commit = 499693e27ee0d14ffab67c31ad065fdb3d34ea75 + parent = 272d308886c4fa516a52c468f3fb266dfb141cf8 + cmdver = 0.3.0 diff --git a/vendor/github.com/dustin/go-humanize/.travis.yml b/vendor/github.com/dustin/go-humanize/.travis.yml new file mode 100644 index 000000000..ffa87400a --- /dev/null +++ b/vendor/github.com/dustin/go-humanize/.travis.yml @@ -0,0 +1,18 @@ +sudo: false +language: go +go: + - 1.3.3 + - 1.5.4 + - 1.6.2 + - tip +matrix: + allow_failures: + - go: tip + fast_finish: true +install: + - # Do nothing. This is needed to prevent default install action "go get -t -v ./..." from happening here (we want it to happen inside script step). +script: + - go get -t -v ./... + - diff -u <(echo -n) <(gofmt -d -s .) + - go tool vet . + - go test -v -race ./... diff --git a/vendor/github.com/dustin/go-humanize/bigbytes_test.go b/vendor/github.com/dustin/go-humanize/bigbytes_test.go new file mode 100644 index 000000000..88eed45ac --- /dev/null +++ b/vendor/github.com/dustin/go-humanize/bigbytes_test.go @@ -0,0 +1,219 @@ +package humanize + +import ( + "math/big" + "testing" +) + +func TestBigByteParsing(t *testing.T) { + tests := []struct { + in string + exp uint64 + }{ + {"42", 42}, + {"42MB", 42000000}, + {"42MiB", 44040192}, + {"42mb", 42000000}, + {"42mib", 44040192}, + {"42MIB", 44040192}, + {"42 MB", 42000000}, + {"42 MiB", 44040192}, + {"42 mb", 42000000}, + {"42 mib", 44040192}, + {"42 MIB", 44040192}, + {"42.5MB", 42500000}, + {"42.5MiB", 44564480}, + {"42.5 MB", 42500000}, + {"42.5 MiB", 44564480}, + // No need to say B + {"42M", 42000000}, + {"42Mi", 44040192}, + {"42m", 42000000}, + {"42mi", 44040192}, + {"42MI", 44040192}, + {"42 M", 42000000}, + {"42 Mi", 44040192}, + {"42 m", 42000000}, + {"42 mi", 44040192}, + {"42 MI", 44040192}, + {"42.5M", 42500000}, + {"42.5Mi", 44564480}, + {"42.5 M", 42500000}, + {"42.5 Mi", 44564480}, + // Large testing, breaks when too much larger than + // this. + {"12.5 EB", uint64(12.5 * float64(EByte))}, + {"12.5 E", uint64(12.5 * float64(EByte))}, + {"12.5 EiB", uint64(12.5 * float64(EiByte))}, + } + + for _, p := range tests { + got, err := ParseBigBytes(p.in) + if err != nil { + t.Errorf("Couldn't parse %v: %v", p.in, err) + } else { + if got.Uint64() != p.exp { + t.Errorf("Expected %v for %v, got %v", + p.exp, p.in, got) + } + } + } +} + +func TestBigByteErrors(t *testing.T) { + got, err := ParseBigBytes("84 JB") + if err == nil { + t.Errorf("Expected error, got %v", got) + } + got, err = ParseBigBytes("") + if err == nil { + t.Errorf("Expected error parsing nothing") + } +} + +func bbyte(in uint64) string { + return BigBytes((&big.Int{}).SetUint64(in)) +} + +func bibyte(in uint64) string { + return BigIBytes((&big.Int{}).SetUint64(in)) +} + +func TestBigBytes(t *testing.T) { + testList{ + {"bytes(0)", bbyte(0), "0 B"}, + {"bytes(1)", bbyte(1), "1 B"}, + {"bytes(803)", bbyte(803), "803 B"}, + {"bytes(999)", bbyte(999), "999 B"}, + + {"bytes(1024)", bbyte(1024), "1.0 kB"}, + {"bytes(1MB - 1)", bbyte(MByte - Byte), "1000 kB"}, + + {"bytes(1MB)", bbyte(1024 * 1024), "1.0 MB"}, + {"bytes(1GB - 1K)", bbyte(GByte - KByte), "1000 MB"}, + + {"bytes(1GB)", bbyte(GByte), "1.0 GB"}, + {"bytes(1TB - 1M)", bbyte(TByte - MByte), "1000 GB"}, + + {"bytes(1TB)", bbyte(TByte), "1.0 TB"}, + {"bytes(1PB - 1T)", bbyte(PByte - TByte), "999 TB"}, + + {"bytes(1PB)", bbyte(PByte), "1.0 PB"}, + {"bytes(1PB - 1T)", bbyte(EByte - PByte), "999 PB"}, + + {"bytes(1EB)", bbyte(EByte), "1.0 EB"}, + // Overflows. + // {"bytes(1EB - 1P)", Bytes((KByte*EByte)-PByte), "1023EB"}, + + {"bytes(0)", bibyte(0), "0 B"}, + {"bytes(1)", bibyte(1), "1 B"}, + {"bytes(803)", bibyte(803), "803 B"}, + {"bytes(1023)", bibyte(1023), "1023 B"}, + + {"bytes(1024)", bibyte(1024), "1.0 KiB"}, + {"bytes(1MB - 1)", bibyte(MiByte - IByte), "1024 KiB"}, + + {"bytes(1MB)", bibyte(1024 * 1024), "1.0 MiB"}, + {"bytes(1GB - 1K)", bibyte(GiByte - KiByte), "1024 MiB"}, + + {"bytes(1GB)", bibyte(GiByte), "1.0 GiB"}, + {"bytes(1TB - 1M)", bibyte(TiByte - MiByte), "1024 GiB"}, + + {"bytes(1TB)", bibyte(TiByte), "1.0 TiB"}, + {"bytes(1PB - 1T)", bibyte(PiByte - TiByte), "1023 TiB"}, + + {"bytes(1PB)", bibyte(PiByte), "1.0 PiB"}, + {"bytes(1PB - 1T)", bibyte(EiByte - PiByte), "1023 PiB"}, + + {"bytes(1EiB)", bibyte(EiByte), "1.0 EiB"}, + // Overflows. + // {"bytes(1EB - 1P)", bibyte((KIByte*EIByte)-PiByte), "1023EB"}, + + {"bytes(5.5GiB)", bibyte(5.5 * GiByte), "5.5 GiB"}, + + {"bytes(5.5GB)", bbyte(5.5 * GByte), "5.5 GB"}, + }.validate(t) +} + +func TestVeryBigBytes(t *testing.T) { + b, _ := (&big.Int{}).SetString("15347691069326346944512", 10) + s := BigBytes(b) + if s != "15 ZB" { + t.Errorf("Expected 15 ZB, got %v", s) + } + s = BigIBytes(b) + if s != "13 ZiB" { + t.Errorf("Expected 13 ZiB, got %v", s) + } + + b, _ = (&big.Int{}).SetString("15716035654990179271180288", 10) + s = BigBytes(b) + if s != "16 YB" { + t.Errorf("Expected 16 YB, got %v", s) + } + s = BigIBytes(b) + if s != "13 YiB" { + t.Errorf("Expected 13 YiB, got %v", s) + } +} + +func TestVeryVeryBigBytes(t *testing.T) { + b, _ := (&big.Int{}).SetString("16093220510709943573688614912", 10) + s := BigBytes(b) + if s != "16093 YB" { + t.Errorf("Expected 16093 YB, got %v", s) + } + s = BigIBytes(b) + if s != "13312 YiB" { + t.Errorf("Expected 13312 YiB, got %v", s) + } +} + +func TestParseVeryBig(t *testing.T) { + tests := []struct { + in string + out string + }{ + {"16 ZB", "16000000000000000000000"}, + {"16 ZiB", "18889465931478580854784"}, + {"16.5 ZB", "16500000000000000000000"}, + {"16.5 ZiB", "19479761741837286506496"}, + {"16 Z", "16000000000000000000000"}, + {"16 Zi", "18889465931478580854784"}, + {"16.5 Z", "16500000000000000000000"}, + {"16.5 Zi", "19479761741837286506496"}, + + {"16 YB", "16000000000000000000000000"}, + {"16 YiB", "19342813113834066795298816"}, + {"16.5 YB", "16500000000000000000000000"}, + {"16.5 YiB", "19947276023641381382651904"}, + {"16 Y", "16000000000000000000000000"}, + {"16 Yi", "19342813113834066795298816"}, + {"16.5 Y", "16500000000000000000000000"}, + {"16.5 Yi", "19947276023641381382651904"}, + } + + for _, test := range tests { + x, err := ParseBigBytes(test.in) + if err != nil { + t.Errorf("Error parsing %q: %v", test.in, err) + continue + } + + if x.String() != test.out { + t.Errorf("Expected %q for %q, got %v", test.out, test.in, x) + } + } +} + +func BenchmarkParseBigBytes(b *testing.B) { + for i := 0; i < b.N; i++ { + ParseBigBytes("16.5 Z") + } +} + +func BenchmarkBigBytes(b *testing.B) { + for i := 0; i < b.N; i++ { + bibyte(16.5 * GByte) + } +} diff --git a/vendor/github.com/dustin/go-humanize/bytes_test.go b/vendor/github.com/dustin/go-humanize/bytes_test.go new file mode 100644 index 000000000..99cad9251 --- /dev/null +++ b/vendor/github.com/dustin/go-humanize/bytes_test.go @@ -0,0 +1,144 @@ +package humanize + +import ( + "testing" +) + +func TestByteParsing(t *testing.T) { + tests := []struct { + in string + exp uint64 + }{ + {"42", 42}, + {"42MB", 42000000}, + {"42MiB", 44040192}, + {"42mb", 42000000}, + {"42mib", 44040192}, + {"42MIB", 44040192}, + {"42 MB", 42000000}, + {"42 MiB", 44040192}, + {"42 mb", 42000000}, + {"42 mib", 44040192}, + {"42 MIB", 44040192}, + {"42.5MB", 42500000}, + {"42.5MiB", 44564480}, + {"42.5 MB", 42500000}, + {"42.5 MiB", 44564480}, + // No need to say B + {"42M", 42000000}, + {"42Mi", 44040192}, + {"42m", 42000000}, + {"42mi", 44040192}, + {"42MI", 44040192}, + {"42 M", 42000000}, + {"42 Mi", 44040192}, + {"42 m", 42000000}, + {"42 mi", 44040192}, + {"42 MI", 44040192}, + {"42.5M", 42500000}, + {"42.5Mi", 44564480}, + {"42.5 M", 42500000}, + {"42.5 Mi", 44564480}, + // Large testing, breaks when too much larger than + // this. + {"12.5 EB", uint64(12.5 * float64(EByte))}, + {"12.5 E", uint64(12.5 * float64(EByte))}, + {"12.5 EiB", uint64(12.5 * float64(EiByte))}, + } + + for _, p := range tests { + got, err := ParseBytes(p.in) + if err != nil { + t.Errorf("Couldn't parse %v: %v", p.in, err) + } + if got != p.exp { + t.Errorf("Expected %v for %v, got %v", + p.exp, p.in, got) + } + } +} + +func TestByteErrors(t *testing.T) { + got, err := ParseBytes("84 JB") + if err == nil { + t.Errorf("Expected error, got %v", got) + } + got, err = ParseBytes("") + if err == nil { + t.Errorf("Expected error parsing nothing") + } + got, err = ParseBytes("16 EiB") + if err == nil { + t.Errorf("Expected error, got %v", got) + } +} + +func TestBytes(t *testing.T) { + testList{ + {"bytes(0)", Bytes(0), "0 B"}, + {"bytes(1)", Bytes(1), "1 B"}, + {"bytes(803)", Bytes(803), "803 B"}, + {"bytes(999)", Bytes(999), "999 B"}, + + {"bytes(1024)", Bytes(1024), "1.0 kB"}, + {"bytes(9999)", Bytes(9999), "10 kB"}, + {"bytes(1MB - 1)", Bytes(MByte - Byte), "1000 kB"}, + + {"bytes(1MB)", Bytes(1024 * 1024), "1.0 MB"}, + {"bytes(1GB - 1K)", Bytes(GByte - KByte), "1000 MB"}, + + {"bytes(1GB)", Bytes(GByte), "1.0 GB"}, + {"bytes(1TB - 1M)", Bytes(TByte - MByte), "1000 GB"}, + {"bytes(10MB)", Bytes(9999 * 1000), "10 MB"}, + + {"bytes(1TB)", Bytes(TByte), "1.0 TB"}, + {"bytes(1PB - 1T)", Bytes(PByte - TByte), "999 TB"}, + + {"bytes(1PB)", Bytes(PByte), "1.0 PB"}, + {"bytes(1PB - 1T)", Bytes(EByte - PByte), "999 PB"}, + + {"bytes(1EB)", Bytes(EByte), "1.0 EB"}, + // Overflows. + // {"bytes(1EB - 1P)", Bytes((KByte*EByte)-PByte), "1023EB"}, + + {"bytes(0)", IBytes(0), "0 B"}, + {"bytes(1)", IBytes(1), "1 B"}, + {"bytes(803)", IBytes(803), "803 B"}, + {"bytes(1023)", IBytes(1023), "1023 B"}, + + {"bytes(1024)", IBytes(1024), "1.0 KiB"}, + {"bytes(1MB - 1)", IBytes(MiByte - IByte), "1024 KiB"}, + + {"bytes(1MB)", IBytes(1024 * 1024), "1.0 MiB"}, + {"bytes(1GB - 1K)", IBytes(GiByte - KiByte), "1024 MiB"}, + + {"bytes(1GB)", IBytes(GiByte), "1.0 GiB"}, + {"bytes(1TB - 1M)", IBytes(TiByte - MiByte), "1024 GiB"}, + + {"bytes(1TB)", IBytes(TiByte), "1.0 TiB"}, + {"bytes(1PB - 1T)", IBytes(PiByte - TiByte), "1023 TiB"}, + + {"bytes(1PB)", IBytes(PiByte), "1.0 PiB"}, + {"bytes(1PB - 1T)", IBytes(EiByte - PiByte), "1023 PiB"}, + + {"bytes(1EiB)", IBytes(EiByte), "1.0 EiB"}, + // Overflows. + // {"bytes(1EB - 1P)", IBytes((KIByte*EIByte)-PiByte), "1023EB"}, + + {"bytes(5.5GiB)", IBytes(5.5 * GiByte), "5.5 GiB"}, + + {"bytes(5.5GB)", Bytes(5.5 * GByte), "5.5 GB"}, + }.validate(t) +} + +func BenchmarkParseBytes(b *testing.B) { + for i := 0; i < b.N; i++ { + ParseBytes("16.5 GB") + } +} + +func BenchmarkBytes(b *testing.B) { + for i := 0; i < b.N; i++ { + Bytes(16.5 * GByte) + } +} diff --git a/vendor/github.com/dustin/go-humanize/comma_test.go b/vendor/github.com/dustin/go-humanize/comma_test.go new file mode 100644 index 000000000..49040fb71 --- /dev/null +++ b/vendor/github.com/dustin/go-humanize/comma_test.go @@ -0,0 +1,134 @@ +package humanize + +import ( + "math" + "math/big" + "testing" +) + +func TestCommas(t *testing.T) { + testList{ + {"0", Comma(0), "0"}, + {"10", Comma(10), "10"}, + {"100", Comma(100), "100"}, + {"1,000", Comma(1000), "1,000"}, + {"10,000", Comma(10000), "10,000"}, + {"100,000", Comma(100000), "100,000"}, + {"10,000,000", Comma(10000000), "10,000,000"}, + {"10,100,000", Comma(10100000), "10,100,000"}, + {"10,010,000", Comma(10010000), "10,010,000"}, + {"10,001,000", Comma(10001000), "10,001,000"}, + {"123,456,789", Comma(123456789), "123,456,789"}, + {"maxint", Comma(9.223372e+18), "9,223,372,000,000,000,000"}, + {"minint", Comma(-9.223372e+18), "-9,223,372,000,000,000,000"}, + {"-123,456,789", Comma(-123456789), "-123,456,789"}, + {"-10,100,000", Comma(-10100000), "-10,100,000"}, + {"-10,010,000", Comma(-10010000), "-10,010,000"}, + {"-10,001,000", Comma(-10001000), "-10,001,000"}, + {"-10,000,000", Comma(-10000000), "-10,000,000"}, + {"-100,000", Comma(-100000), "-100,000"}, + {"-10,000", Comma(-10000), "-10,000"}, + {"-1,000", Comma(-1000), "-1,000"}, + {"-100", Comma(-100), "-100"}, + {"-10", Comma(-10), "-10"}, + }.validate(t) +} + +func TestCommafs(t *testing.T) { + testList{ + {"0", Commaf(0), "0"}, + {"10.11", Commaf(10.11), "10.11"}, + {"100", Commaf(100), "100"}, + {"1,000", Commaf(1000), "1,000"}, + {"10,000", Commaf(10000), "10,000"}, + {"100,000", Commaf(100000), "100,000"}, + {"834,142.32", Commaf(834142.32), "834,142.32"}, + {"10,000,000", Commaf(10000000), "10,000,000"}, + {"10,100,000", Commaf(10100000), "10,100,000"}, + {"10,010,000", Commaf(10010000), "10,010,000"}, + {"10,001,000", Commaf(10001000), "10,001,000"}, + {"123,456,789", Commaf(123456789), "123,456,789"}, + {"maxf64", Commaf(math.MaxFloat64), "179,769,313,486,231,570,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000"}, + {"minf64", Commaf(math.SmallestNonzeroFloat64), "0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005"}, + {"-123,456,789", Commaf(-123456789), "-123,456,789"}, + {"-10,100,000", Commaf(-10100000), "-10,100,000"}, + {"-10,010,000", Commaf(-10010000), "-10,010,000"}, + {"-10,001,000", Commaf(-10001000), "-10,001,000"}, + {"-10,000,000", Commaf(-10000000), "-10,000,000"}, + {"-100,000", Commaf(-100000), "-100,000"}, + {"-10,000", Commaf(-10000), "-10,000"}, + {"-1,000", Commaf(-1000), "-1,000"}, + {"-100.11", Commaf(-100.11), "-100.11"}, + {"-10", Commaf(-10), "-10"}, + }.validate(t) +} + +func BenchmarkCommas(b *testing.B) { + for i := 0; i < b.N; i++ { + Comma(1234567890) + } +} + +func BenchmarkCommaf(b *testing.B) { + for i := 0; i < b.N; i++ { + Commaf(1234567890.83584) + } +} + +func BenchmarkBigCommas(b *testing.B) { + for i := 0; i < b.N; i++ { + BigComma(big.NewInt(1234567890)) + } +} + +func bigComma(i int64) string { + return BigComma(big.NewInt(i)) +} + +func TestBigCommas(t *testing.T) { + testList{ + {"0", bigComma(0), "0"}, + {"10", bigComma(10), "10"}, + {"100", bigComma(100), "100"}, + {"1,000", bigComma(1000), "1,000"}, + {"10,000", bigComma(10000), "10,000"}, + {"100,000", bigComma(100000), "100,000"}, + {"10,000,000", bigComma(10000000), "10,000,000"}, + {"10,100,000", bigComma(10100000), "10,100,000"}, + {"10,010,000", bigComma(10010000), "10,010,000"}, + {"10,001,000", bigComma(10001000), "10,001,000"}, + {"123,456,789", bigComma(123456789), "123,456,789"}, + {"maxint", bigComma(9.223372e+18), "9,223,372,000,000,000,000"}, + {"minint", bigComma(-9.223372e+18), "-9,223,372,000,000,000,000"}, + {"-123,456,789", bigComma(-123456789), "-123,456,789"}, + {"-10,100,000", bigComma(-10100000), "-10,100,000"}, + {"-10,010,000", bigComma(-10010000), "-10,010,000"}, + {"-10,001,000", bigComma(-10001000), "-10,001,000"}, + {"-10,000,000", bigComma(-10000000), "-10,000,000"}, + {"-100,000", bigComma(-100000), "-100,000"}, + {"-10,000", bigComma(-10000), "-10,000"}, + {"-1,000", bigComma(-1000), "-1,000"}, + {"-100", bigComma(-100), "-100"}, + {"-10", bigComma(-10), "-10"}, + }.validate(t) +} + +func TestVeryBigCommas(t *testing.T) { + tests := []struct{ in, exp string }{ + { + "84889279597249724975972597249849757294578485", + "84,889,279,597,249,724,975,972,597,249,849,757,294,578,485", + }, + { + "-84889279597249724975972597249849757294578485", + "-84,889,279,597,249,724,975,972,597,249,849,757,294,578,485", + }, + } + for _, test := range tests { + n, _ := (&big.Int{}).SetString(test.in, 10) + got := BigComma(n) + if test.exp != got { + t.Errorf("Expected %q, got %q", test.exp, got) + } + } +} diff --git a/vendor/github.com/dustin/go-humanize/commaf_test.go b/vendor/github.com/dustin/go-humanize/commaf_test.go new file mode 100644 index 000000000..21f7f9e5f --- /dev/null +++ b/vendor/github.com/dustin/go-humanize/commaf_test.go @@ -0,0 +1,44 @@ +// +build go1.6 + +package humanize + +import ( + "math" + "math/big" + "testing" +) + +func BenchmarkBigCommaf(b *testing.B) { + for i := 0; i < b.N; i++ { + Commaf(1234567890.83584) + } +} + +func TestBigCommafs(t *testing.T) { + testList{ + {"0", BigCommaf(big.NewFloat(0)), "0"}, + {"10.11", BigCommaf(big.NewFloat(10.11)), "10.11"}, + {"100", BigCommaf(big.NewFloat(100)), "100"}, + {"1,000", BigCommaf(big.NewFloat(1000)), "1,000"}, + {"10,000", BigCommaf(big.NewFloat(10000)), "10,000"}, + {"100,000", BigCommaf(big.NewFloat(100000)), "100,000"}, + {"834,142.32", BigCommaf(big.NewFloat(834142.32)), "834,142.32"}, + {"10,000,000", BigCommaf(big.NewFloat(10000000)), "10,000,000"}, + {"10,100,000", BigCommaf(big.NewFloat(10100000)), "10,100,000"}, + {"10,010,000", BigCommaf(big.NewFloat(10010000)), "10,010,000"}, + {"10,001,000", BigCommaf(big.NewFloat(10001000)), "10,001,000"}, + {"123,456,789", BigCommaf(big.NewFloat(123456789)), "123,456,789"}, + {"maxf64", BigCommaf(big.NewFloat(math.MaxFloat64)), "179,769,313,486,231,570,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000"}, + {"minf64", BigCommaf(big.NewFloat(math.SmallestNonzeroFloat64)), "0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004940656458412465"}, + {"-123,456,789", BigCommaf(big.NewFloat(-123456789)), "-123,456,789"}, + {"-10,100,000", BigCommaf(big.NewFloat(-10100000)), "-10,100,000"}, + {"-10,010,000", BigCommaf(big.NewFloat(-10010000)), "-10,010,000"}, + {"-10,001,000", BigCommaf(big.NewFloat(-10001000)), "-10,001,000"}, + {"-10,000,000", BigCommaf(big.NewFloat(-10000000)), "-10,000,000"}, + {"-100,000", BigCommaf(big.NewFloat(-100000)), "-100,000"}, + {"-10,000", BigCommaf(big.NewFloat(-10000)), "-10,000"}, + {"-1,000", BigCommaf(big.NewFloat(-1000)), "-1,000"}, + {"-100.11", BigCommaf(big.NewFloat(-100.11)), "-100.11"}, + {"-10", BigCommaf(big.NewFloat(-10)), "-10"}, + }.validate(t) +} diff --git a/vendor/github.com/dustin/go-humanize/common_test.go b/vendor/github.com/dustin/go-humanize/common_test.go new file mode 100644 index 000000000..fc7db1516 --- /dev/null +++ b/vendor/github.com/dustin/go-humanize/common_test.go @@ -0,0 +1,18 @@ +package humanize + +import ( + "testing" +) + +type testList []struct { + name, got, exp string +} + +func (tl testList) validate(t *testing.T) { + for _, test := range tl { + if test.got != test.exp { + t.Errorf("On %v, expected '%v', but got '%v'", + test.name, test.exp, test.got) + } + } +} diff --git a/vendor/github.com/dustin/go-humanize/ftoa_test.go b/vendor/github.com/dustin/go-humanize/ftoa_test.go new file mode 100644 index 000000000..276d411b7 --- /dev/null +++ b/vendor/github.com/dustin/go-humanize/ftoa_test.go @@ -0,0 +1,55 @@ +package humanize + +import ( + "fmt" + "regexp" + "strconv" + "testing" +) + +func TestFtoa(t *testing.T) { + testList{ + {"200", Ftoa(200), "200"}, + {"2", Ftoa(2), "2"}, + {"2.2", Ftoa(2.2), "2.2"}, + {"2.02", Ftoa(2.02), "2.02"}, + {"200.02", Ftoa(200.02), "200.02"}, + }.validate(t) +} + +func BenchmarkFtoaRegexTrailing(b *testing.B) { + trailingZerosRegex := regexp.MustCompile(`\.?0+$`) + + b.ResetTimer() + for i := 0; i < b.N; i++ { + trailingZerosRegex.ReplaceAllString("2.00000", "") + trailingZerosRegex.ReplaceAllString("2.0000", "") + trailingZerosRegex.ReplaceAllString("2.000", "") + trailingZerosRegex.ReplaceAllString("2.00", "") + trailingZerosRegex.ReplaceAllString("2.0", "") + trailingZerosRegex.ReplaceAllString("2", "") + } +} + +func BenchmarkFtoaFunc(b *testing.B) { + for i := 0; i < b.N; i++ { + stripTrailingZeros("2.00000") + stripTrailingZeros("2.0000") + stripTrailingZeros("2.000") + stripTrailingZeros("2.00") + stripTrailingZeros("2.0") + stripTrailingZeros("2") + } +} + +func BenchmarkFmtF(b *testing.B) { + for i := 0; i < b.N; i++ { + _ = fmt.Sprintf("%f", 2.03584) + } +} + +func BenchmarkStrconvF(b *testing.B) { + for i := 0; i < b.N; i++ { + strconv.FormatFloat(2.03584, 'f', 6, 64) + } +} diff --git a/vendor/github.com/dustin/go-humanize/number_test.go b/vendor/github.com/dustin/go-humanize/number_test.go new file mode 100644 index 000000000..dd38a5bb9 --- /dev/null +++ b/vendor/github.com/dustin/go-humanize/number_test.go @@ -0,0 +1,78 @@ +package humanize + +import ( + "math" + "testing" +) + +type TestStruct struct { + name string + format string + num float64 + formatted string +} + +func TestFormatFloat(t *testing.T) { + tests := []TestStruct{ + {"default", "", 12345.6789, "12,345.68"}, + {"#", "#", 12345.6789, "12345.678900000"}, + {"#.", "#.", 12345.6789, "12346"}, + {"#,#", "#,#", 12345.6789, "12345,7"}, + {"#,##", "#,##", 12345.6789, "12345,68"}, + {"#,###", "#,###", 12345.6789, "12345,679"}, + {"#,###.", "#,###.", 12345.6789, "12,346"}, + {"#,###.##", "#,###.##", 12345.6789, "12,345.68"}, + {"#,###.###", "#,###.###", 12345.6789, "12,345.679"}, + {"#,###.####", "#,###.####", 12345.6789, "12,345.6789"}, + {"#.###,######", "#.###,######", 12345.6789, "12.345,678900"}, + {"#\u202f###,##", "#\u202f###,##", 12345.6789, "12 345,68"}, + + // special cases + {"NaN", "#", math.NaN(), "NaN"}, + {"+Inf", "#", math.Inf(1), "Infinity"}, + {"-Inf", "#", math.Inf(-1), "-Infinity"}, + {"signStr <= -0.000000001", "", -0.000000002, "-0.00"}, + {"signStr = 0", "", 0, "0.00"}, + {"Format directive must start with +", "+000", 12345.6789, "+12345.678900000"}, + } + + for _, test := range tests { + got := FormatFloat(test.format, test.num) + if got != test.formatted { + t.Errorf("On %v (%v, %v), got %v, wanted %v", + test.name, test.format, test.num, got, test.formatted) + } + } + // Test a single integer + got := FormatInteger("#", 12345) + if got != "12345.000000000" { + t.Errorf("On %v (%v, %v), got %v, wanted %v", + "integerTest", "#", 12345, got, "12345.000000000") + } + // Test the things that could panic + panictests := []TestStruct{ + {"RenderFloat(): invalid positive sign directive", "-", 12345.6789, "12,345.68"}, + {"RenderFloat(): thousands separator directive must be followed by 3 digit-specifiers", "0.01", 12345.6789, "12,345.68"}, + } + for _, test := range panictests { + didPanic := false + var message interface{} + func() { + + defer func() { + if message = recover(); message != nil { + didPanic = true + } + }() + + // call the target function + _ = FormatFloat(test.format, test.num) + + }() + if didPanic != true { + t.Errorf("On %v, should have panic and did not.", + test.name) + } + } + +} diff --git a/vendor/github.com/dustin/go-humanize/ordinals_test.go b/vendor/github.com/dustin/go-humanize/ordinals_test.go new file mode 100644 index 000000000..51d85ee7a --- /dev/null +++ b/vendor/github.com/dustin/go-humanize/ordinals_test.go @@ -0,0 +1,22 @@ +package humanize + +import ( + "testing" +) + +func TestOrdinals(t *testing.T) { + testList{ + {"0", Ordinal(0), "0th"}, + {"1", Ordinal(1), "1st"}, + {"2", Ordinal(2), "2nd"}, + {"3", Ordinal(3), "3rd"}, + {"4", Ordinal(4), "4th"}, + {"10", Ordinal(10), "10th"}, + {"11", Ordinal(11), "11th"}, + {"12", Ordinal(12), "12th"}, + {"13", Ordinal(13), "13th"}, + {"101", Ordinal(101), "101st"}, + {"102", Ordinal(102), "102nd"}, + {"103", Ordinal(103), "103rd"}, + }.validate(t) +} diff --git a/vendor/github.com/dustin/go-humanize/si_test.go b/vendor/github.com/dustin/go-humanize/si_test.go new file mode 100644 index 000000000..bc5bac669 --- /dev/null +++ b/vendor/github.com/dustin/go-humanize/si_test.go @@ -0,0 +1,101 @@ +package humanize + +import ( + "math" + "testing" +) + +func TestSI(t *testing.T) { + tests := []struct { + name string + num float64 + formatted string + }{ + {"e-24", 1e-24, "1 yF"}, + {"e-21", 1e-21, "1 zF"}, + {"e-18", 1e-18, "1 aF"}, + {"e-15", 1e-15, "1 fF"}, + {"e-12", 1e-12, "1 pF"}, + {"e-12", 2.2345e-12, "2.2345 pF"}, + {"e-12", 2.23e-12, "2.23 pF"}, + {"e-11", 2.23e-11, "22.3 pF"}, + {"e-10", 2.2e-10, "220 pF"}, + {"e-9", 2.2e-9, "2.2 nF"}, + {"e-8", 2.2e-8, "22 nF"}, + {"e-7", 2.2e-7, "220 nF"}, + {"e-6", 2.2e-6, "2.2 µF"}, + {"e-6", 1e-6, "1 µF"}, + {"e-5", 2.2e-5, "22 µF"}, + {"e-4", 2.2e-4, "220 µF"}, + {"e-3", 2.2e-3, "2.2 mF"}, + {"e-2", 2.2e-2, "22 mF"}, + {"e-1", 2.2e-1, "220 mF"}, + {"e+0", 2.2e-0, "2.2 F"}, + {"e+0", 2.2, "2.2 F"}, + {"e+1", 2.2e+1, "22 F"}, + {"0", 0, "0 F"}, + {"e+1", 22, "22 F"}, + {"e+2", 2.2e+2, "220 F"}, + {"e+2", 220, "220 F"}, + {"e+3", 2.2e+3, "2.2 kF"}, + {"e+3", 2200, "2.2 kF"}, + {"e+4", 2.2e+4, "22 kF"}, + {"e+4", 22000, "22 kF"}, + {"e+5", 2.2e+5, "220 kF"}, + {"e+6", 2.2e+6, "2.2 MF"}, + {"e+6", 1e+6, "1 MF"}, + {"e+7", 2.2e+7, "22 MF"}, + {"e+8", 2.2e+8, "220 MF"}, + {"e+9", 2.2e+9, "2.2 GF"}, + {"e+10", 2.2e+10, "22 GF"}, + {"e+11", 2.2e+11, "220 GF"}, + {"e+12", 2.2e+12, "2.2 TF"}, + {"e+15", 2.2e+15, "2.2 PF"}, + {"e+18", 2.2e+18, "2.2 EF"}, + {"e+21", 2.2e+21, "2.2 ZF"}, + {"e+24", 2.2e+24, "2.2 YF"}, + + // special case + {"1F", 1000 * 1000, "1 MF"}, + {"1F", 1e6, "1 MF"}, + + // negative number + {"-100 F", -100, "-100 F"}, + } + + for _, test := range tests { + got := SI(test.num, "F") + if got != test.formatted { + t.Errorf("On %v (%v), got %v, wanted %v", + test.name, test.num, got, test.formatted) + } + + gotf, gotu, err := ParseSI(test.formatted) + if err != nil { + t.Errorf("Error parsing %v (%v): %v", test.name, test.formatted, err) + continue + } + + if math.Abs(1-(gotf/test.num)) > 0.01 { + t.Errorf("On %v (%v), got %v, wanted %v (±%v)", + test.name, test.formatted, gotf, test.num, + math.Abs(1-(gotf/test.num))) + } + if gotu != "F" { + t.Errorf("On %v (%v), expected unit F, got %v", + test.name, test.formatted, gotu) + } + } + + // Parse error + gotf, gotu, err := ParseSI("x1.21JW") // 1.21 jigga whats + if err == nil { + t.Errorf("Expected error on x1.21JW, got %v %v", gotf, gotu) + } +} + +func BenchmarkParseSI(b *testing.B) { + for i := 0; i < b.N; i++ { + ParseSI("2.2346ZB") + } +} diff --git a/vendor/github.com/dustin/go-humanize/times_test.go b/vendor/github.com/dustin/go-humanize/times_test.go new file mode 100644 index 000000000..528daa4ec --- /dev/null +++ b/vendor/github.com/dustin/go-humanize/times_test.go @@ -0,0 +1,71 @@ +package humanize + +import ( + "math" + "testing" + "time" +) + +func TestPast(t *testing.T) { + now := time.Now().Unix() + testList{ + {"now", Time(time.Unix(now, 0)), "now"}, + {"1 second ago", Time(time.Unix(now-1, 0)), "1 second ago"}, + {"12 seconds ago", Time(time.Unix(now-12, 0)), "12 seconds ago"}, + {"30 seconds ago", Time(time.Unix(now-30, 0)), "30 seconds ago"}, + {"45 seconds ago", Time(time.Unix(now-45, 0)), "45 seconds ago"}, + {"1 minute ago", Time(time.Unix(now-63, 0)), "1 minute ago"}, + {"15 minutes ago", Time(time.Unix(now-15*Minute, 0)), "15 minutes ago"}, + {"1 hour ago", Time(time.Unix(now-63*Minute, 0)), "1 hour ago"}, + {"2 hours ago", Time(time.Unix(now-2*Hour, 0)), "2 hours ago"}, + {"21 hours ago", Time(time.Unix(now-21*Hour, 0)), "21 hours ago"}, + {"1 day ago", Time(time.Unix(now-26*Hour, 0)), "1 day ago"}, + {"2 days ago", Time(time.Unix(now-49*Hour, 0)), "2 days ago"}, + {"3 days ago", Time(time.Unix(now-3*Day, 0)), "3 days ago"}, + {"1 week ago (1)", Time(time.Unix(now-7*Day, 0)), "1 week ago"}, + {"1 week ago (2)", Time(time.Unix(now-12*Day, 0)), "1 week ago"}, + {"2 weeks ago", Time(time.Unix(now-15*Day, 0)), "2 weeks ago"}, + {"1 month ago", Time(time.Unix(now-39*Day, 0)), "1 month ago"}, + {"3 months ago", Time(time.Unix(now-99*Day, 0)), "3 months ago"}, + {"1 year ago (1)", Time(time.Unix(now-365*Day, 0)), "1 year ago"}, + {"1 year ago (1)", Time(time.Unix(now-400*Day, 0)), "1 year ago"}, + {"2 years ago (1)", Time(time.Unix(now-548*Day, 0)), "2 years ago"}, + {"2 years ago (2)", Time(time.Unix(now-725*Day, 0)), "2 years ago"}, + {"2 years ago (3)", Time(time.Unix(now-800*Day, 0)), "2 years ago"}, + {"3 years ago", Time(time.Unix(now-3*Year, 0)), "3 years ago"}, + {"long ago", Time(time.Unix(now-LongTime, 0)), "a long while ago"}, + }.validate(t) +} + +func TestFuture(t *testing.T) { + now := time.Now().Unix() + testList{ + {"now", Time(time.Unix(now, 0)), "now"}, + {"1 second from now", Time(time.Unix(now+1, 0)), "1 second from now"}, + {"12 seconds from now", Time(time.Unix(now+12, 0)), "12 seconds from now"}, + {"30 seconds from now", Time(time.Unix(now+30, 0)), "30 seconds from now"}, + {"45 seconds from now", Time(time.Unix(now+45, 0)), "45 seconds from now"}, + {"15 minutes from now", Time(time.Unix(now+15*Minute, 0)), "15 minutes from now"}, + {"2 hours from now", Time(time.Unix(now+2*Hour, 0)), "2 hours from now"}, + {"21 hours from now", Time(time.Unix(now+21*Hour, 0)), "21 hours from now"}, + {"1 day from now", Time(time.Unix(now+26*Hour, 0)), "1 day from now"}, + {"2 days from now", Time(time.Unix(now+49*Hour, 0)), "2 days from now"}, + {"3 days from now", Time(time.Unix(now+3*Day, 0)), "3 days from now"}, + {"1 week from now (1)", Time(time.Unix(now+7*Day, 0)), "1 week from now"}, + {"1 week from now (2)", Time(time.Unix(now+12*Day, 0)), "1 week from now"}, + {"2 weeks from now", Time(time.Unix(now+15*Day, 0)), "2 weeks from now"}, + {"1 month from now", Time(time.Unix(now+30*Day, 0)), "1 month from now"}, + {"1 year from now", Time(time.Unix(now+365*Day, 0)), "1 year from now"}, + {"2 years from now", Time(time.Unix(now+2*Year, 0)), "2 years from now"}, + {"a while from now", Time(time.Unix(now+LongTime, 0)), "a long while from now"}, + }.validate(t) +} + +func TestRange(t *testing.T) { + start := time.Time{} + end := time.Unix(math.MaxInt64, math.MaxInt64) + x := RelTime(start, end, "ago", "from now") + if x != "a long while from now" { + t.Errorf("Expected a long while from now, got %q", x) + } +} diff --git a/vendor/github.com/gogo/protobuf/.gitignore b/vendor/github.com/gogo/protobuf/.gitignore new file mode 100644 index 000000000..ea050e9b8 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/.gitignore @@ -0,0 +1 @@ +._* diff --git a/vendor/github.com/gogo/protobuf/.gitrepo b/vendor/github.com/gogo/protobuf/.gitrepo new file mode 100644 index 000000000..c815493c0 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/.gitrepo @@ -0,0 +1,11 @@ +; DO NOT EDIT (unless you know what you are doing) +; +; This subdirectory is a git "subrepo", and this file is maintained by the +; git-subrepo command. See https://github.com/git-commands/git-subrepo#readme +; +[subrepo] + remote = http://github.com/gogo/protobuf.git + branch = master + commit = 318371cbef6bab80e8d1c69b470fffa79eebfb54 + parent = b28ebd2c48bdc0103d2d5442cb1c76f0f4145923 + cmdver = 0.3.0 diff --git a/vendor/github.com/gogo/protobuf/.mailmap b/vendor/github.com/gogo/protobuf/.mailmap new file mode 100644 index 000000000..bc0010219 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/.mailmap @@ -0,0 +1,8 @@ +Walter Schulze Walter Schulze +Walter Schulze +Walter Schulze awalterschulze +Walter Schulze awalterschulze@gmail.com +John Tuley +Anton Povarov +Denis Smirnov dennwc +DongYun Kang \ No newline at end of file diff --git a/vendor/github.com/gogo/protobuf/.travis.yml b/vendor/github.com/gogo/protobuf/.travis.yml new file mode 100644 index 000000000..5cebf1091 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/.travis.yml @@ -0,0 +1,21 @@ +env: + - PROTOBUF_VERSION=2.5.0 + - PROTOBUF_VERSION=2.6.1 + - PROTOBUF_VERSION=3.0.0-beta-2 + +before_install: + - ./install-protobuf.sh + - PATH=/home/travis/bin:$PATH protoc --version + +script: + - PATH=/home/travis/bin:$PATH make buildserverall + - echo $TRAVIS_GO_VERSION + - if [ "$TRAVIS_GO_VERSION" == 1.6 ] && [[ "$PROTOBUF_VERSION" == 3.0.0* ]]; then ! git status --porcelain | read || (git status; git diff; exit 1); fi + +language: go + +go: + - 1.3.3 + - 1.4.2 + - 1.5.3 + - 1.6 diff --git a/vendor/github.com/gogo/protobuf/codec/codec.go b/vendor/github.com/gogo/protobuf/codec/codec.go new file mode 100644 index 000000000..a7fd69745 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/codec/codec.go @@ -0,0 +1,89 @@ +// Copyright (c) 2015, Vastech SA (PTY) LTD. All rights reserved. +// http://github.com/gogo/protobuf/gogoproto +// +// 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 codec + +import ( + "github.com/gogo/protobuf/proto" +) + +type Codec interface { + Marshal(v interface{}) ([]byte, error) + Unmarshal(data []byte, v interface{}) error + String() string +} + +type marshaler interface { + MarshalTo(data []byte) (n int, err error) +} + +func getSize(v interface{}) (int, bool) { + if sz, ok := v.(interface { + Size() (n int) + }); ok { + return sz.Size(), true + } else if sz, ok := v.(interface { + ProtoSize() (n int) + }); ok { + return sz.ProtoSize(), true + } else { + return 0, false + } +} + +type codec struct { + buf []byte +} + +func (this *codec) String() string { + return "proto" +} + +func New(size int) Codec { + return &codec{make([]byte, size)} +} + +func (this *codec) Marshal(v interface{}) ([]byte, error) { + if m, ok := v.(marshaler); ok { + n, ok := getSize(v) + if !ok { + return proto.Marshal(v.(proto.Message)) + } + if n > len(this.buf) { + this.buf = make([]byte, n) + } + _, err := m.MarshalTo(this.buf) + if err != nil { + return nil, err + } + return this.buf[:n], nil + } + return proto.Marshal(v.(proto.Message)) +} + +func (this *codec) Unmarshal(data []byte, v interface{}) error { + return proto.Unmarshal(data, v.(proto.Message)) +} diff --git a/vendor/github.com/gogo/protobuf/codec/codec_test.go b/vendor/github.com/gogo/protobuf/codec/codec_test.go new file mode 100644 index 000000000..ce108cfd3 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/codec/codec_test.go @@ -0,0 +1,52 @@ +// Copyright (c) 2015, Vastech SA (PTY) LTD. All rights reserved. +// http://github.com/gogo/protobuf/gogoproto +// +// 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 codec + +import ( + "github.com/gogo/protobuf/test" + "math/rand" + "testing" + "time" +) + +func TestCodec(t *testing.T) { + r := rand.New(rand.NewSource(time.Now().UnixNano())) + in := test.NewPopulatedNinOptStruct(r, true) + c := New(r.Intn(1024)) + data, err := c.Marshal(in) + if err != nil { + t.Fatal(err) + } + out := &test.NinOptStruct{} + err = c.Unmarshal(data, out) + if err != nil { + t.Fatal(err) + } + if err := in.VerboseEqual(out); err != nil { + t.Fatal(err) + } +} diff --git a/vendor/github.com/gogo/protobuf/gogoproto/Makefile b/vendor/github.com/gogo/protobuf/gogoproto/Makefile new file mode 100644 index 000000000..557f29493 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/gogoproto/Makefile @@ -0,0 +1,36 @@ +# Extensions for Protocol Buffers to create more go like structures. +# +# Copyright (c) 2013, Vastech SA (PTY) LTD. All rights reserved. +# http://github.com/gogo/protobuf/gogoproto +# +# 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: + 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 000000000..f0424d4f8 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/gogoproto/doc.go @@ -0,0 +1,168 @@ +// Extensions for Protocol Buffers to create more go like structures. +// +// Copyright (c) 2013, Vastech SA (PTY) LTD. All rights reserved. +// http://github.com/gogo/protobuf/gogoproto +// +// 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. + +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 000000000..f97c2338e --- /dev/null +++ b/vendor/github.com/gogo/protobuf/gogoproto/gogo.pb.go @@ -0,0 +1,661 @@ +// 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. +const _ = proto.GoGoProtoPackageIsVersion1 + +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", +} + +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", +} + +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", +} + +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", +} + +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", +} + +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", +} + +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", +} + +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", +} + +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", +} + +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", +} + +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", +} + +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", +} + +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", +} + +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", +} + +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", +} + +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", +} + +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", +} + +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", +} + +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", +} + +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", +} + +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", +} + +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", +} + +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", +} + +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", +} + +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", +} + +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", +} + +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", +} + +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", +} + +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", +} + +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", +} + +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", +} + +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", +} + +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", +} + +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", +} + +var E_Face = &proto.ExtensionDesc{ + ExtendedType: (*google_protobuf.MessageOptions)(nil), + ExtensionType: (*bool)(nil), + Field: 64005, + Name: "gogoproto.face", + Tag: "varint,64005,opt,name=face", +} + +var E_Gostring = &proto.ExtensionDesc{ + ExtendedType: (*google_protobuf.MessageOptions)(nil), + ExtensionType: (*bool)(nil), + Field: 64006, + Name: "gogoproto.gostring", + Tag: "varint,64006,opt,name=gostring", +} + +var E_Populate = &proto.ExtensionDesc{ + ExtendedType: (*google_protobuf.MessageOptions)(nil), + ExtensionType: (*bool)(nil), + Field: 64007, + Name: "gogoproto.populate", + Tag: "varint,64007,opt,name=populate", +} + +var E_Stringer = &proto.ExtensionDesc{ + ExtendedType: (*google_protobuf.MessageOptions)(nil), + ExtensionType: (*bool)(nil), + Field: 67008, + Name: "gogoproto.stringer", + Tag: "varint,67008,opt,name=stringer", +} + +var E_Onlyone = &proto.ExtensionDesc{ + ExtendedType: (*google_protobuf.MessageOptions)(nil), + ExtensionType: (*bool)(nil), + Field: 64009, + Name: "gogoproto.onlyone", + Tag: "varint,64009,opt,name=onlyone", +} + +var E_Equal = &proto.ExtensionDesc{ + ExtendedType: (*google_protobuf.MessageOptions)(nil), + ExtensionType: (*bool)(nil), + Field: 64013, + Name: "gogoproto.equal", + Tag: "varint,64013,opt,name=equal", +} + +var E_Description = &proto.ExtensionDesc{ + ExtendedType: (*google_protobuf.MessageOptions)(nil), + ExtensionType: (*bool)(nil), + Field: 64014, + Name: "gogoproto.description", + Tag: "varint,64014,opt,name=description", +} + +var E_Testgen = &proto.ExtensionDesc{ + ExtendedType: (*google_protobuf.MessageOptions)(nil), + ExtensionType: (*bool)(nil), + Field: 64015, + Name: "gogoproto.testgen", + Tag: "varint,64015,opt,name=testgen", +} + +var E_Benchgen = &proto.ExtensionDesc{ + ExtendedType: (*google_protobuf.MessageOptions)(nil), + ExtensionType: (*bool)(nil), + Field: 64016, + Name: "gogoproto.benchgen", + Tag: "varint,64016,opt,name=benchgen", +} + +var E_Marshaler = &proto.ExtensionDesc{ + ExtendedType: (*google_protobuf.MessageOptions)(nil), + ExtensionType: (*bool)(nil), + Field: 64017, + Name: "gogoproto.marshaler", + Tag: "varint,64017,opt,name=marshaler", +} + +var E_Unmarshaler = &proto.ExtensionDesc{ + ExtendedType: (*google_protobuf.MessageOptions)(nil), + ExtensionType: (*bool)(nil), + Field: 64018, + Name: "gogoproto.unmarshaler", + Tag: "varint,64018,opt,name=unmarshaler", +} + +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", +} + +var E_Sizer = &proto.ExtensionDesc{ + ExtendedType: (*google_protobuf.MessageOptions)(nil), + ExtensionType: (*bool)(nil), + Field: 64020, + Name: "gogoproto.sizer", + Tag: "varint,64020,opt,name=sizer", +} + +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", +} + +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", +} + +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", +} + +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", +} + +var E_Protosizer = &proto.ExtensionDesc{ + ExtendedType: (*google_protobuf.MessageOptions)(nil), + ExtensionType: (*bool)(nil), + Field: 64028, + Name: "gogoproto.protosizer", + Tag: "varint,64028,opt,name=protosizer", +} + +var E_Compare = &proto.ExtensionDesc{ + ExtendedType: (*google_protobuf.MessageOptions)(nil), + ExtensionType: (*bool)(nil), + Field: 64029, + Name: "gogoproto.compare", + Tag: "varint,64029,opt,name=compare", +} + +var E_Nullable = &proto.ExtensionDesc{ + ExtendedType: (*google_protobuf.FieldOptions)(nil), + ExtensionType: (*bool)(nil), + Field: 65001, + Name: "gogoproto.nullable", + Tag: "varint,65001,opt,name=nullable", +} + +var E_Embed = &proto.ExtensionDesc{ + ExtendedType: (*google_protobuf.FieldOptions)(nil), + ExtensionType: (*bool)(nil), + Field: 65002, + Name: "gogoproto.embed", + Tag: "varint,65002,opt,name=embed", +} + +var E_Customtype = &proto.ExtensionDesc{ + ExtendedType: (*google_protobuf.FieldOptions)(nil), + ExtensionType: (*string)(nil), + Field: 65003, + Name: "gogoproto.customtype", + Tag: "bytes,65003,opt,name=customtype", +} + +var E_Customname = &proto.ExtensionDesc{ + ExtendedType: (*google_protobuf.FieldOptions)(nil), + ExtensionType: (*string)(nil), + Field: 65004, + Name: "gogoproto.customname", + Tag: "bytes,65004,opt,name=customname", +} + +var E_Jsontag = &proto.ExtensionDesc{ + ExtendedType: (*google_protobuf.FieldOptions)(nil), + ExtensionType: (*string)(nil), + Field: 65005, + Name: "gogoproto.jsontag", + Tag: "bytes,65005,opt,name=jsontag", +} + +var E_Moretags = &proto.ExtensionDesc{ + ExtendedType: (*google_protobuf.FieldOptions)(nil), + ExtensionType: (*string)(nil), + Field: 65006, + Name: "gogoproto.moretags", + Tag: "bytes,65006,opt,name=moretags", +} + +var E_Casttype = &proto.ExtensionDesc{ + ExtendedType: (*google_protobuf.FieldOptions)(nil), + ExtensionType: (*string)(nil), + Field: 65007, + Name: "gogoproto.casttype", + Tag: "bytes,65007,opt,name=casttype", +} + +var E_Castkey = &proto.ExtensionDesc{ + ExtendedType: (*google_protobuf.FieldOptions)(nil), + ExtensionType: (*string)(nil), + Field: 65008, + Name: "gogoproto.castkey", + Tag: "bytes,65008,opt,name=castkey", +} + +var E_Castvalue = &proto.ExtensionDesc{ + ExtendedType: (*google_protobuf.FieldOptions)(nil), + ExtensionType: (*string)(nil), + Field: 65009, + Name: "gogoproto.castvalue", + Tag: "bytes,65009,opt,name=castvalue", +} + +func init() { + proto.RegisterExtension(E_GoprotoEnumPrefix) + proto.RegisterExtension(E_GoprotoEnumStringer) + proto.RegisterExtension(E_EnumStringer) + proto.RegisterExtension(E_EnumCustomname) + 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_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_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) +} + +var fileDescriptorGogo = []byte{ + // 1096 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0x94, 0x97, 0xcb, 0x6f, 0xdc, 0x54, + 0x14, 0x87, 0x85, 0x48, 0x95, 0x99, 0x93, 0x17, 0x99, 0x84, 0x50, 0x2a, 0x10, 0xed, 0x8e, 0x55, + 0xba, 0x42, 0xa8, 0xae, 0x10, 0x6a, 0xab, 0x34, 0x2a, 0x22, 0x10, 0x05, 0x52, 0x40, 0x2c, 0x46, + 0x9e, 0xc9, 0x8d, 0x3b, 0xe0, 0xf1, 0x35, 0xbe, 0x76, 0xd5, 0xb0, 0x43, 0xe5, 0x21, 0x84, 0x78, + 0x23, 0x41, 0x4b, 0xcb, 0x63, 0xc1, 0xfb, 0x59, 0x1e, 0x7b, 0x36, 0xc0, 0x9a, 0xff, 0x81, 0x0d, + 0x10, 0x5e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0xf2, 0xb7, 0x8b, 0x13, 0xb9, 0x72, 0xa1, 0x14, 0x18, 0x5e, + 0xa3, 0x13, 0x81, 0x48, 0x53, 0x91, 0xa8, 0xb6, 0x1f, 0x86, 0x23, 0x36, 0x79, 0xba, 0x17, 0x96, + 0xc6, 0x4b, 0xbb, 0xd5, 0x4e, 0xac, 0x16, 0xe4, 0x89, 0x30, 0xf4, 0x36, 0xe1, 0x96, 0x11, 0x9d, + 0x75, 0x70, 0x5e, 0x26, 0xe7, 0xe2, 0x50, 0x77, 0x51, 0xbb, 0x0e, 0xfc, 0xff, 0xb2, 0x1f, 0x0e, + 0xce, 0x77, 0xc9, 0xd9, 0x22, 0x96, 0xdb, 0x82, 0xc6, 0xfb, 0x60, 0xfe, 0xbc, 0x48, 0x3a, 0x52, + 0x89, 0xb6, 0x78, 0x2a, 0xf3, 0x43, 0x07, 0xdd, 0x15, 0xd2, 0xcd, 0x11, 0xb8, 0x82, 0x1c, 0xba, + 0x8e, 0x41, 0x63, 0xdb, 0xef, 0x0a, 0x07, 0xc5, 0x55, 0x52, 0x4c, 0xe2, 0x7a, 0x44, 0x4f, 0xc0, + 0x74, 0x20, 0x8b, 0x5b, 0x72, 0xc0, 0xdf, 0x23, 0x7c, 0x8a, 0x19, 0x52, 0xc4, 0x32, 0xce, 0x42, + 0x3f, 0x75, 0xd9, 0xc1, 0xfb, 0xac, 0x60, 0x86, 0x14, 0x63, 0x94, 0xf5, 0x03, 0x56, 0x28, 0xa3, + 0x9e, 0xf7, 0xc2, 0x94, 0x8c, 0xc2, 0x1d, 0x19, 0xb9, 0x6c, 0xe2, 0x43, 0x32, 0x00, 0x21, 0x28, + 0x38, 0x0e, 0x4d, 0xd7, 0x46, 0x7c, 0x44, 0x78, 0x43, 0x70, 0x07, 0xf4, 0x39, 0xe3, 0x21, 0xa3, + 0x57, 0x38, 0x28, 0x3e, 0x26, 0xc5, 0xac, 0x81, 0xd1, 0x6d, 0xa4, 0x42, 0xa5, 0x81, 0x70, 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 0xc8, + 0x40, 0x90, 0xbf, 0x75, 0x5a, 0x04, 0xbb, 0x55, 0x41, 0xfe, 0xa2, 0x79, 0x0c, 0x26, 0x9f, 0x50, + 0x32, 0x4a, 0xfd, 0xc0, 0x46, 0xff, 0x4d, 0x34, 0xaf, 0xc7, 0x82, 0xf5, 0x65, 0x22, 0xf4, 0xa5, + 0xb2, 0xb1, 0xff, 0x10, 0x5b, 0x02, 0x08, 0x77, 0x7d, 0x95, 0xba, 0xdc, 0xf7, 0xbf, 0x0c, 0x33, + 0x80, 0x9b, 0xc6, 0xeb, 0x27, 0xc5, 0x8e, 0x8d, 0xfd, 0x8f, 0x37, 0x4d, 0xeb, 0xf5, 0x00, 0x6c, + 0xe2, 0x65, 0xfe, 0xbe, 0x6d, 0x83, 0xff, 0x27, 0x78, 0x40, 0x9c, 0x3c, 0x02, 0x0b, 0xfa, 0x79, + 0xa9, 0x63, 0x27, 0x61, 0x55, 0xae, 0xca, 0xf5, 0xfc, 0x41, 0xbc, 0x1e, 0x00, 0x00, 0xff, 0xff, + 0x87, 0x5c, 0xee, 0x2b, 0x7e, 0x11, 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 000000000..f6502e4b9 --- /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 000000000..e8e3edb61 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/gogoproto/gogo.proto @@ -0,0 +1,120 @@ +// Copyright (c) 2013, Vastech SA (PTY) LTD. All rights reserved. +// http://github.com/gogo/protobuf/gogoproto +// +// 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; +} + +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; +} + +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; +} + +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; +} 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 000000000..8c29dbc0e --- /dev/null +++ b/vendor/github.com/gogo/protobuf/gogoproto/helper.go @@ -0,0 +1,308 @@ +// Copyright (c) 2013, Vastech SA (PTY) LTD. 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 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 GetCustomType(field *google_protobuf.FieldDescriptorProto) string { + 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.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.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.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.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.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.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.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.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)) +} diff --git a/vendor/github.com/gogo/protobuf/io/full.go b/vendor/github.com/gogo/protobuf/io/full.go new file mode 100644 index 000000000..4a0841c2c --- /dev/null +++ b/vendor/github.com/gogo/protobuf/io/full.go @@ -0,0 +1,102 @@ +// Extensions for Protocol Buffers to create more go like structures. +// +// Copyright (c) 2013, Vastech SA (PTY) LTD. All rights reserved. +// http://github.com/gogo/protobuf/gogoproto +// +// 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 io + +import ( + "github.com/gogo/protobuf/proto" + "io" +) + +func NewFullWriter(w io.Writer) WriteCloser { + return &fullWriter{w, nil} +} + +type fullWriter struct { + w io.Writer + buffer []byte +} + +func (this *fullWriter) WriteMsg(msg proto.Message) (err error) { + var data []byte + if m, ok := msg.(marshaler); ok { + n, ok := getSize(m) + if !ok { + data, err = proto.Marshal(msg) + if err != nil { + return err + } + } + if n >= len(this.buffer) { + this.buffer = make([]byte, n) + } + _, err = m.MarshalTo(this.buffer) + if err != nil { + return err + } + data = this.buffer[:n] + } else { + data, err = proto.Marshal(msg) + if err != nil { + return err + } + } + _, err = this.w.Write(data) + return err +} + +func (this *fullWriter) Close() error { + if closer, ok := this.w.(io.Closer); ok { + return closer.Close() + } + return nil +} + +type fullReader struct { + r io.Reader + buf []byte +} + +func NewFullReader(r io.Reader, maxSize int) ReadCloser { + return &fullReader{r, make([]byte, maxSize)} +} + +func (this *fullReader) ReadMsg(msg proto.Message) error { + length, err := this.r.Read(this.buf) + if err != nil { + return err + } + return proto.Unmarshal(this.buf[:length], msg) +} + +func (this *fullReader) Close() error { + if closer, ok := this.r.(io.Closer); ok { + return closer.Close() + } + return nil +} diff --git a/vendor/github.com/gogo/protobuf/io/io.go b/vendor/github.com/gogo/protobuf/io/io.go new file mode 100644 index 000000000..037b09dac --- /dev/null +++ b/vendor/github.com/gogo/protobuf/io/io.go @@ -0,0 +1,70 @@ +// Extensions for Protocol Buffers to create more go like structures. +// +// Copyright (c) 2013, Vastech SA (PTY) LTD. All rights reserved. +// http://github.com/gogo/protobuf/gogoproto +// +// 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 io + +import ( + "github.com/gogo/protobuf/proto" + "io" +) + +type Writer interface { + WriteMsg(proto.Message) error +} + +type WriteCloser interface { + Writer + io.Closer +} + +type Reader interface { + ReadMsg(msg proto.Message) error +} + +type ReadCloser interface { + Reader + io.Closer +} + +type marshaler interface { + MarshalTo(data []byte) (n int, err error) +} + +func getSize(v interface{}) (int, bool) { + if sz, ok := v.(interface { + Size() (n int) + }); ok { + return sz.Size(), true + } else if sz, ok := v.(interface { + ProtoSize() (n int) + }); ok { + return sz.ProtoSize(), true + } else { + return 0, false + } +} diff --git a/vendor/github.com/gogo/protobuf/io/io_test.go b/vendor/github.com/gogo/protobuf/io/io_test.go new file mode 100644 index 000000000..603c10c6e --- /dev/null +++ b/vendor/github.com/gogo/protobuf/io/io_test.go @@ -0,0 +1,221 @@ +// Extensions for Protocol Buffers to create more go like structures. +// +// Copyright (c) 2013, Vastech SA (PTY) LTD. All rights reserved. +// http://github.com/gogo/protobuf/gogoproto +// +// 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 io_test + +import ( + "bytes" + "encoding/binary" + "github.com/gogo/protobuf/io" + "github.com/gogo/protobuf/test" + goio "io" + "math/rand" + "testing" + "time" +) + +func iotest(writer io.WriteCloser, reader io.ReadCloser) error { + size := 1000 + msgs := make([]*test.NinOptNative, size) + r := rand.New(rand.NewSource(time.Now().UnixNano())) + for i := range msgs { + msgs[i] = test.NewPopulatedNinOptNative(r, true) + //issue 31 + if i == 5 { + msgs[i] = &test.NinOptNative{} + } + //issue 31 + if i == 999 { + msgs[i] = &test.NinOptNative{} + } + err := writer.WriteMsg(msgs[i]) + if err != nil { + return err + } + } + if err := writer.Close(); err != nil { + return err + } + i := 0 + for { + msg := &test.NinOptNative{} + if err := reader.ReadMsg(msg); err != nil { + if err == goio.EOF { + break + } + return err + } + if err := msg.VerboseEqual(msgs[i]); err != nil { + return err + } + i++ + } + if i != size { + panic("not enough messages read") + } + if err := reader.Close(); err != nil { + return err + } + return nil +} + +type buffer struct { + *bytes.Buffer + closed bool +} + +func (this *buffer) Close() error { + this.closed = true + return nil +} + +func newBuffer() *buffer { + return &buffer{bytes.NewBuffer(nil), false} +} + +func TestBigUint32Normal(t *testing.T) { + buf := newBuffer() + writer := io.NewUint32DelimitedWriter(buf, binary.BigEndian) + reader := io.NewUint32DelimitedReader(buf, binary.BigEndian, 1024*1024) + if err := iotest(writer, reader); err != nil { + t.Error(err) + } + if !buf.closed { + t.Fatalf("did not close buffer") + } +} + +func TestBigUint32MaxSize(t *testing.T) { + buf := newBuffer() + writer := io.NewUint32DelimitedWriter(buf, binary.BigEndian) + reader := io.NewUint32DelimitedReader(buf, binary.BigEndian, 20) + if err := iotest(writer, reader); err != goio.ErrShortBuffer { + t.Error(err) + } else { + t.Logf("%s", err) + } +} + +func TestLittleUint32Normal(t *testing.T) { + buf := newBuffer() + writer := io.NewUint32DelimitedWriter(buf, binary.LittleEndian) + reader := io.NewUint32DelimitedReader(buf, binary.LittleEndian, 1024*1024) + if err := iotest(writer, reader); err != nil { + t.Error(err) + } + if !buf.closed { + t.Fatalf("did not close buffer") + } +} + +func TestLittleUint32MaxSize(t *testing.T) { + buf := newBuffer() + writer := io.NewUint32DelimitedWriter(buf, binary.LittleEndian) + reader := io.NewUint32DelimitedReader(buf, binary.LittleEndian, 20) + if err := iotest(writer, reader); err != goio.ErrShortBuffer { + t.Error(err) + } else { + t.Logf("%s", err) + } +} + +func TestVarintNormal(t *testing.T) { + buf := newBuffer() + writer := io.NewDelimitedWriter(buf) + reader := io.NewDelimitedReader(buf, 1024*1024) + if err := iotest(writer, reader); err != nil { + t.Error(err) + } + if !buf.closed { + t.Fatalf("did not close buffer") + } +} + +func TestVarintNoClose(t *testing.T) { + buf := bytes.NewBuffer(nil) + writer := io.NewDelimitedWriter(buf) + reader := io.NewDelimitedReader(buf, 1024*1024) + if err := iotest(writer, reader); err != nil { + t.Error(err) + } +} + +//issue 32 +func TestVarintMaxSize(t *testing.T) { + buf := newBuffer() + writer := io.NewDelimitedWriter(buf) + reader := io.NewDelimitedReader(buf, 20) + if err := iotest(writer, reader); err != goio.ErrShortBuffer { + t.Error(err) + } else { + t.Logf("%s", err) + } +} + +func TestVarintError(t *testing.T) { + buf := newBuffer() + buf.Write([]byte{0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x7f}) + reader := io.NewDelimitedReader(buf, 1024*1024) + msg := &test.NinOptNative{} + err := reader.ReadMsg(msg) + if err == nil { + t.Fatalf("Expected error") + } +} + +func TestFull(t *testing.T) { + buf := newBuffer() + writer := io.NewFullWriter(buf) + reader := io.NewFullReader(buf, 1024*1024) + r := rand.New(rand.NewSource(time.Now().UnixNano())) + msgIn := test.NewPopulatedNinOptNative(r, true) + if err := writer.WriteMsg(msgIn); err != nil { + panic(err) + } + if err := writer.Close(); err != nil { + panic(err) + } + msgOut := &test.NinOptNative{} + if err := reader.ReadMsg(msgOut); err != nil { + panic(err) + } + if err := msgIn.VerboseEqual(msgOut); err != nil { + panic(err) + } + if err := reader.ReadMsg(msgOut); err != nil { + if err != goio.EOF { + panic(err) + } + } + if err := reader.Close(); err != nil { + panic(err) + } + if !buf.closed { + t.Fatalf("did not close buffer") + } +} diff --git a/vendor/github.com/gogo/protobuf/io/uint32.go b/vendor/github.com/gogo/protobuf/io/uint32.go new file mode 100644 index 000000000..609eb2731 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/io/uint32.go @@ -0,0 +1,126 @@ +// Extensions for Protocol Buffers to create more go like structures. +// +// Copyright (c) 2013, Vastech SA (PTY) LTD. All rights reserved. +// http://github.com/gogo/protobuf/gogoproto +// +// 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 io + +import ( + "encoding/binary" + "github.com/gogo/protobuf/proto" + "io" +) + +func NewUint32DelimitedWriter(w io.Writer, byteOrder binary.ByteOrder) WriteCloser { + return &uint32Writer{w, byteOrder, nil} +} + +func NewSizeUint32DelimitedWriter(w io.Writer, byteOrder binary.ByteOrder, size int) WriteCloser { + return &uint32Writer{w, byteOrder, make([]byte, size)} +} + +type uint32Writer struct { + w io.Writer + byteOrder binary.ByteOrder + buffer []byte +} + +func (this *uint32Writer) WriteMsg(msg proto.Message) (err error) { + var data []byte + if m, ok := msg.(marshaler); ok { + n, ok := getSize(m) + if !ok { + data, err = proto.Marshal(msg) + if err != nil { + return err + } + } + if n >= len(this.buffer) { + this.buffer = make([]byte, n) + } + _, err = m.MarshalTo(this.buffer) + if err != nil { + return err + } + data = this.buffer[:n] + } else { + data, err = proto.Marshal(msg) + if err != nil { + return err + } + } + length := uint32(len(data)) + if err = binary.Write(this.w, this.byteOrder, &length); err != nil { + return err + } + _, err = this.w.Write(data) + return err +} + +func (this *uint32Writer) Close() error { + if closer, ok := this.w.(io.Closer); ok { + return closer.Close() + } + return nil +} + +type uint32Reader struct { + r io.Reader + byteOrder binary.ByteOrder + lenBuf []byte + buf []byte + maxSize int +} + +func NewUint32DelimitedReader(r io.Reader, byteOrder binary.ByteOrder, maxSize int) ReadCloser { + return &uint32Reader{r, byteOrder, make([]byte, 4), nil, maxSize} +} + +func (this *uint32Reader) ReadMsg(msg proto.Message) error { + if _, err := io.ReadFull(this.r, this.lenBuf); err != nil { + return err + } + length32 := this.byteOrder.Uint32(this.lenBuf) + length := int(length32) + if length < 0 || length > this.maxSize { + return io.ErrShortBuffer + } + if length >= len(this.buf) { + this.buf = make([]byte, length) + } + _, err := io.ReadFull(this.r, this.buf[:length]) + if err != nil { + return err + } + return proto.Unmarshal(this.buf[:length], msg) +} + +func (this *uint32Reader) Close() error { + if closer, ok := this.r.(io.Closer); ok { + return closer.Close() + } + return nil +} diff --git a/vendor/github.com/gogo/protobuf/io/varint.go b/vendor/github.com/gogo/protobuf/io/varint.go new file mode 100644 index 000000000..2d9de82ee --- /dev/null +++ b/vendor/github.com/gogo/protobuf/io/varint.go @@ -0,0 +1,134 @@ +// Extensions for Protocol Buffers to create more go like structures. +// +// Copyright (c) 2013, Vastech SA (PTY) LTD. All rights reserved. +// http://github.com/gogo/protobuf/gogoproto +// +// 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 io + +import ( + "bufio" + "encoding/binary" + "errors" + "github.com/gogo/protobuf/proto" + "io" +) + +var ( + errSmallBuffer = errors.New("Buffer Too Small") + errLargeValue = errors.New("Value is Larger than 64 bits") +) + +func NewDelimitedWriter(w io.Writer) WriteCloser { + return &varintWriter{w, make([]byte, 10), nil} +} + +type varintWriter struct { + w io.Writer + lenBuf []byte + buffer []byte +} + +func (this *varintWriter) WriteMsg(msg proto.Message) (err error) { + var data []byte + if m, ok := msg.(marshaler); ok { + n, ok := getSize(m) + if !ok { + data, err = proto.Marshal(msg) + if err != nil { + return err + } + } + if n >= len(this.buffer) { + this.buffer = make([]byte, n) + } + _, err = m.MarshalTo(this.buffer) + if err != nil { + return err + } + data = this.buffer[:n] + } else { + data, err = proto.Marshal(msg) + if err != nil { + return err + } + } + length := uint64(len(data)) + n := binary.PutUvarint(this.lenBuf, length) + _, err = this.w.Write(this.lenBuf[:n]) + if err != nil { + return err + } + _, err = this.w.Write(data) + return err +} + +func (this *varintWriter) Close() error { + if closer, ok := this.w.(io.Closer); ok { + return closer.Close() + } + return nil +} + +func NewDelimitedReader(r io.Reader, maxSize int) ReadCloser { + var closer io.Closer + if c, ok := r.(io.Closer); ok { + closer = c + } + return &varintReader{bufio.NewReader(r), nil, maxSize, closer} +} + +type varintReader struct { + r *bufio.Reader + buf []byte + maxSize int + closer io.Closer +} + +func (this *varintReader) ReadMsg(msg proto.Message) error { + length64, err := binary.ReadUvarint(this.r) + if err != nil { + return err + } + length := int(length64) + if length < 0 || length > this.maxSize { + return io.ErrShortBuffer + } + if len(this.buf) < length { + this.buf = make([]byte, length) + } + buf := this.buf[:length] + if _, err := io.ReadFull(this.r, buf); err != nil { + return err + } + return proto.Unmarshal(buf, msg) +} + +func (this *varintReader) Close() error { + if this.closer != nil { + return this.closer.Close() + } + return nil +} diff --git a/vendor/github.com/gogo/protobuf/jsonpb/jsonpb.go b/vendor/github.com/gogo/protobuf/jsonpb/jsonpb.go new file mode 100644 index 000000000..b9684fd85 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/jsonpb/jsonpb.go @@ -0,0 +1,617 @@ +// Go support for Protocol Buffers - Google's data interchange format +// +// Copyright 2015 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 jsonpb provides marshaling and unmarshaling between protocol buffers and JSON. +It follows the specification at https://developers.google.com/protocol-buffers/docs/proto3#json. + +This package produces a different output than the standard "encoding/json" package, +which does not operate correctly on protocol buffers. +*/ +package jsonpb + +import ( + "bytes" + "encoding/json" + "fmt" + "io" + "reflect" + "sort" + "strconv" + "strings" + + "github.com/gogo/protobuf/proto" +) + +// Marshaler is a configurable object for converting between +// protocol buffer objects and a JSON representation for them. +type Marshaler struct { + // Whether to render enum values as integers, as opposed to string values. + EnumsAsInts bool + + // Whether to render fields with zero values. + EmitDefaults bool + + // A string to indent each level by. The presence of this field will + // also cause a space to appear between the field separator and + // value, and for newlines to be appear between fields and array + // elements. + Indent string +} + +// Marshal marshals a protocol buffer into JSON. +func (m *Marshaler) Marshal(out io.Writer, pb proto.Message) error { + writer := &errWriter{writer: out} + return m.marshalObject(writer, pb, "") +} + +// MarshalToString converts a protocol buffer object to JSON string. +func (m *Marshaler) MarshalToString(pb proto.Message) (string, error) { + var buf bytes.Buffer + if err := m.Marshal(&buf, pb); err != nil { + return "", err + } + return buf.String(), nil +} + +type int32Slice []int32 + +// For sorting extensions ids to ensure stable output. +func (s int32Slice) Len() int { return len(s) } +func (s int32Slice) Less(i, j int) bool { return s[i] < s[j] } +func (s int32Slice) Swap(i, j int) { s[i], s[j] = s[j], s[i] } + +// marshalObject writes a struct to the Writer. +func (m *Marshaler) marshalObject(out *errWriter, v proto.Message, indent string) error { + out.write("{") + if m.Indent != "" { + out.write("\n") + } + + s := reflect.ValueOf(v).Elem() + firstField := true + for i := 0; i < s.NumField(); i++ { + value := s.Field(i) + valueField := s.Type().Field(i) + if strings.HasPrefix(valueField.Name, "XXX_") { + continue + } + + // IsNil will panic on most value kinds. + switch value.Kind() { + case reflect.Chan, reflect.Func, reflect.Interface, reflect.Map, reflect.Ptr, reflect.Slice: + if value.IsNil() { + continue + } + } + + if !m.EmitDefaults { + switch value.Kind() { + case reflect.Bool: + if !value.Bool() { + continue + } + case reflect.Int32, reflect.Int64: + if value.Int() == 0 { + continue + } + case reflect.Uint32, reflect.Uint64: + if value.Uint() == 0 { + continue + } + case reflect.Float32, reflect.Float64: + if value.Float() == 0 { + continue + } + case reflect.String: + if value.Len() == 0 { + continue + } + } + } + + // Oneof fields need special handling. + if valueField.Tag.Get("protobuf_oneof") != "" { + // value is an interface containing &T{real_value}. + sv := value.Elem().Elem() // interface -> *T -> T + value = sv.Field(0) + valueField = sv.Type().Field(0) + } + prop := jsonProperties(valueField) + if !firstField { + m.writeSep(out) + } + // If the map value is a cast type, it may not implement proto.Message, therefore + // allow the struct tag to declare the underlying message type. Instead of changing + // the signatures of the child types (and because prop.mvalue is not public), use + // CustomType as a passer. + if value.Kind() == reflect.Map { + if tag := valueField.Tag.Get("protobuf"); tag != "" { + for _, v := range strings.Split(tag, ",") { + if !strings.HasPrefix(v, "castvaluetype=") { + continue + } + v = strings.TrimPrefix(v, "castvaluetype=") + prop.CustomType = v + break + } + } + } + if err := m.marshalField(out, prop, value, indent); err != nil { + return err + } + firstField = false + } + + // Handle proto2 extensions. + if ep, ok := v.(extendableProto); ok { + extensions := proto.RegisteredExtensions(v) + extensionMap := ep.ExtensionMap() + // Sort extensions for stable output. + ids := make([]int32, 0, len(extensionMap)) + for id := range extensionMap { + ids = append(ids, id) + } + sort.Sort(int32Slice(ids)) + for _, id := range ids { + desc := extensions[id] + if desc == nil { + // unknown extension + continue + } + ext, extErr := proto.GetExtension(ep, desc) + if extErr != nil { + return extErr + } + value := reflect.ValueOf(ext) + var prop proto.Properties + prop.Parse(desc.Tag) + prop.OrigName = fmt.Sprintf("[%s]", desc.Name) + if !firstField { + m.writeSep(out) + } + if err := m.marshalField(out, &prop, value, indent); err != nil { + return err + } + firstField = false + } + + } + + if m.Indent != "" { + out.write("\n") + out.write(indent) + } + out.write("}") + return out.err +} + +func (m *Marshaler) writeSep(out *errWriter) { + if m.Indent != "" { + out.write(",\n") + } else { + out.write(",") + } +} + +// marshalField writes field description and value to the Writer. +func (m *Marshaler) marshalField(out *errWriter, prop *proto.Properties, v reflect.Value, indent string) error { + if m.Indent != "" { + out.write(indent) + out.write(m.Indent) + } + out.write(`"`) + out.write(prop.OrigName) + out.write(`":`) + if m.Indent != "" { + out.write(" ") + } + if err := m.marshalValue(out, prop, v, indent); err != nil { + return err + } + return nil +} + +// marshalValue writes the value to the Writer. +func (m *Marshaler) marshalValue(out *errWriter, prop *proto.Properties, v reflect.Value, indent string) error { + + v = reflect.Indirect(v) + + // Handle repeated elements. + if v.Kind() == reflect.Slice && v.Type().Elem().Kind() != reflect.Uint8 { + out.write("[") + comma := "" + for i := 0; i < v.Len(); i++ { + sliceVal := v.Index(i) + out.write(comma) + if m.Indent != "" { + out.write("\n") + out.write(indent) + out.write(m.Indent) + out.write(m.Indent) + } + m.marshalValue(out, prop, sliceVal, indent+m.Indent) + comma = "," + } + if m.Indent != "" { + out.write("\n") + out.write(indent) + out.write(m.Indent) + } + out.write("]") + return out.err + } + + // Handle enumerations. + if !m.EnumsAsInts && prop.Enum != "" { + // Unknown enum values will are stringified by the proto library as their + // value. Such values should _not_ be quoted or they will be interpreted + // as an enum string instead of their value. + enumStr := v.Interface().(fmt.Stringer).String() + var valStr string + if v.Kind() == reflect.Ptr { + valStr = strconv.Itoa(int(v.Elem().Int())) + } else { + valStr = strconv.Itoa(int(v.Int())) + } + + if m, ok := v.Interface().(interface { + MarshalJSON() ([]byte, error) + }); ok { + data, err := m.MarshalJSON() + if err != nil { + return err + } + enumStr = string(data) + enumStr, err = strconv.Unquote(enumStr) + if err != nil { + return err + } + } + + isKnownEnum := enumStr != valStr + + if isKnownEnum { + out.write(`"`) + } + out.write(enumStr) + if isKnownEnum { + out.write(`"`) + } + return out.err + } + + // Handle nested messages. + if v.Kind() == reflect.Struct { + i := v + if v.CanAddr() { + i = v.Addr() + } else { + i = reflect.New(v.Type()) + i.Elem().Set(v) + } + iface := i.Interface() + if iface == nil { + out.write(`null`) + return out.err + } + pm, ok := iface.(proto.Message) + if !ok { + if prop.CustomType == "" { + return fmt.Errorf("%v does not implement proto.Message", v.Type()) + } + t := proto.MessageType(prop.CustomType) + if t == nil || !i.Type().ConvertibleTo(t) { + return fmt.Errorf("%v declared custom type %s but it is not convertible to %v", v.Type(), prop.CustomType, t) + } + pm = i.Convert(t).Interface().(proto.Message) + } + return m.marshalObject(out, pm, indent+m.Indent) + } + + // Handle maps. + // Since Go randomizes map iteration, we sort keys for stable output. + if v.Kind() == reflect.Map { + out.write(`{`) + keys := v.MapKeys() + sort.Sort(mapKeys(keys)) + for i, k := range keys { + if i > 0 { + out.write(`,`) + } + if m.Indent != "" { + out.write("\n") + out.write(indent) + out.write(m.Indent) + out.write(m.Indent) + } + + b, err := json.Marshal(k.Interface()) + if err != nil { + return err + } + s := string(b) + + // If the JSON is not a string value, encode it again to make it one. + if !strings.HasPrefix(s, `"`) { + b, err := json.Marshal(s) + if err != nil { + return err + } + s = string(b) + } + + out.write(s) + out.write(`:`) + if m.Indent != "" { + out.write(` `) + } + + if err := m.marshalValue(out, prop, v.MapIndex(k), indent+m.Indent); err != nil { + return err + } + } + if m.Indent != "" { + out.write("\n") + out.write(indent) + out.write(m.Indent) + } + out.write(`}`) + return out.err + } + + // Default handling defers to the encoding/json library. + b, err := json.Marshal(v.Interface()) + if err != nil { + return err + } + needToQuote := string(b[0]) != `"` && (v.Kind() == reflect.Int64 || v.Kind() == reflect.Uint64) + if needToQuote { + out.write(`"`) + } + out.write(string(b)) + if needToQuote { + out.write(`"`) + } + return out.err +} + +// Unmarshal unmarshals a JSON object stream into a protocol +// buffer. This function is lenient and will decode any options +// permutations of the related Marshaler. +func Unmarshal(r io.Reader, pb proto.Message) error { + inputValue := json.RawMessage{} + if err := json.NewDecoder(r).Decode(&inputValue); err != nil { + return err + } + return unmarshalValue(reflect.ValueOf(pb).Elem(), inputValue) +} + +// UnmarshalString will populate the fields of a protocol buffer based +// on a JSON string. This function is lenient and will decode any options +// permutations of the related Marshaler. +func UnmarshalString(str string, pb proto.Message) error { + return Unmarshal(strings.NewReader(str), pb) +} + +// unmarshalValue converts/copies a value into the target. +func unmarshalValue(target reflect.Value, inputValue json.RawMessage) error { + targetType := target.Type() + + // Allocate memory for pointer fields. + if targetType.Kind() == reflect.Ptr { + target.Set(reflect.New(targetType.Elem())) + return unmarshalValue(target.Elem(), inputValue) + } + + // Handle nested messages. + if targetType.Kind() == reflect.Struct { + var jsonFields map[string]json.RawMessage + if err := json.Unmarshal(inputValue, &jsonFields); err != nil { + return err + } + + sprops := proto.GetProperties(targetType) + for i := 0; i < target.NumField(); i++ { + ft := target.Type().Field(i) + if strings.HasPrefix(ft.Name, "XXX_") { + continue + } + fieldName := jsonProperties(ft).OrigName + + valueForField, ok := jsonFields[fieldName] + if !ok { + continue + } + delete(jsonFields, fieldName) + + // Handle enums, which have an underlying type of int32, + // and may appear as strings. We do this while handling + // the struct so we have access to the enum info. + // The case of an enum appearing as a number is handled + // by the recursive call to unmarshalValue. + if enum := sprops.Prop[i].Enum; valueForField[0] == '"' && enum != "" { + vmap := proto.EnumValueMap(enum) + // Don't need to do unquoting; valid enum names + // are from a limited character set. + s := valueForField[1 : len(valueForField)-1] + n, ok := vmap[string(s)] + if !ok { + return fmt.Errorf("unknown value %q for enum %s", s, enum) + } + f := target.Field(i) + if f.Kind() == reflect.Ptr { // proto2 + f.Set(reflect.New(f.Type().Elem())) + f = f.Elem() + } + f.SetInt(int64(n)) + continue + } + + if err := unmarshalValue(target.Field(i), valueForField); err != nil { + return err + } + } + // Check for any oneof fields. + for fname, raw := range jsonFields { + if oop, ok := sprops.OneofTypes[fname]; ok { + nv := reflect.New(oop.Type.Elem()) + target.Field(oop.Field).Set(nv) + if err := unmarshalValue(nv.Elem().Field(0), raw); err != nil { + return err + } + delete(jsonFields, fname) + } + } + if len(jsonFields) > 0 { + // Pick any field to be the scapegoat. + var f string + for fname := range jsonFields { + f = fname + break + } + return fmt.Errorf("unknown field %q in %v", f, targetType) + } + return nil + } + + // Handle arrays + if targetType.Kind() == reflect.Slice { + // Special case for encoded bytes. Pre-go1.5 doesn't support unmarshalling + // strings into aliased []byte types. + // https://github.com/golang/go/commit/4302fd0409da5e4f1d71471a6770dacdc3301197 + // https://github.com/golang/go/commit/c60707b14d6be26bf4213114d13070bff00d0b0a + if targetType.Elem().Kind() == reflect.Uint8 { + var out []byte + if err := json.Unmarshal(inputValue, &out); err != nil { + return err + } + target.SetBytes(out) + return nil + } + + var slc []json.RawMessage + if err := json.Unmarshal(inputValue, &slc); err != nil { + return err + } + len := len(slc) + target.Set(reflect.MakeSlice(targetType, len, len)) + for i := 0; i < len; i++ { + if err := unmarshalValue(target.Index(i), slc[i]); err != nil { + return err + } + } + return nil + } + + // Handle maps (whose keys are always strings) + if targetType.Kind() == reflect.Map { + var mp map[string]json.RawMessage + if err := json.Unmarshal(inputValue, &mp); err != nil { + return err + } + target.Set(reflect.MakeMap(targetType)) + for ks, raw := range mp { + // Unmarshal map key. The core json library already decoded the key into a + // string, so we handle that specially. Other types were quoted post-serialization. + var k reflect.Value + if targetType.Key().Kind() == reflect.String { + k = reflect.ValueOf(ks) + } else { + k = reflect.New(targetType.Key()).Elem() + if err := unmarshalValue(k, json.RawMessage(ks)); err != nil { + return err + } + } + + if !k.Type().AssignableTo(targetType.Key()) { + k = k.Convert(targetType.Key()) + } + + // Unmarshal map value. + v := reflect.New(targetType.Elem()).Elem() + if err := unmarshalValue(v, raw); err != nil { + return err + } + target.SetMapIndex(k, v) + } + return nil + } + + // 64-bit integers can be encoded as strings. In this case we drop + // the quotes and proceed as normal. + isNum := targetType.Kind() == reflect.Int64 || targetType.Kind() == reflect.Uint64 + if isNum && strings.HasPrefix(string(inputValue), `"`) { + inputValue = inputValue[1 : len(inputValue)-1] + } + + // Use the encoding/json for parsing other value types. + return json.Unmarshal(inputValue, target.Addr().Interface()) +} + +// jsonProperties returns parsed proto.Properties for the field. +func jsonProperties(f reflect.StructField) *proto.Properties { + var prop proto.Properties + prop.Init(f.Type, f.Name, f.Tag.Get("protobuf"), &f) + return &prop +} + +// extendableProto is an interface implemented by any protocol buffer that may be extended. +type extendableProto interface { + proto.Message + ExtensionRangeArray() []proto.ExtensionRange + ExtensionMap() map[int32]proto.Extension +} + +// Writer wrapper inspired by https://blog.golang.org/errors-are-values +type errWriter struct { + writer io.Writer + err error +} + +func (w *errWriter) write(str string) { + if w.err != nil { + return + } + _, w.err = w.writer.Write([]byte(str)) +} + +// Map fields may have key types of non-float scalars, strings and enums. +// The easiest way to sort them in some deterministic order is to use fmt. +// If this turns out to be inefficient we can always consider other options, +// such as doing a Schwartzian transform. +type mapKeys []reflect.Value + +func (s mapKeys) Len() int { return len(s) } +func (s mapKeys) Swap(i, j int) { s[i], s[j] = s[j], s[i] } +func (s mapKeys) Less(i, j int) bool { + return fmt.Sprint(s[i].Interface()) < fmt.Sprint(s[j].Interface()) +} diff --git a/vendor/github.com/gogo/protobuf/jsonpb/jsonpb_test.go b/vendor/github.com/gogo/protobuf/jsonpb/jsonpb_test.go new file mode 100644 index 000000000..ca7c82079 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/jsonpb/jsonpb_test.go @@ -0,0 +1,395 @@ +// Go support for Protocol Buffers - Google's data interchange format +// +// Copyright 2015 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 jsonpb + +import ( + "reflect" + "testing" + + pb "github.com/gogo/protobuf/jsonpb/jsonpb_test_proto" + "github.com/gogo/protobuf/proto" + proto3pb "github.com/gogo/protobuf/proto/proto3_proto" +) + +var ( + marshaler = Marshaler{} + + marshalerAllOptions = Marshaler{ + Indent: " ", + } + + simpleObject = &pb.Simple{ + OInt32: proto.Int32(-32), + OInt64: proto.Int64(-6400000000), + OUint32: proto.Uint32(32), + OUint64: proto.Uint64(6400000000), + OSint32: proto.Int32(-13), + OSint64: proto.Int64(-2600000000), + OFloat: proto.Float32(3.14), + ODouble: proto.Float64(6.02214179e23), + OBool: proto.Bool(true), + OString: proto.String("hello \"there\""), + OBytes: []byte("beep boop"), + OCastBytes: pb.Bytes("wow"), + } + + simpleObjectJSON = `{` + + `"o_bool":true,` + + `"o_int32":-32,` + + `"o_int64":"-6400000000",` + + `"o_uint32":32,` + + `"o_uint64":"6400000000",` + + `"o_sint32":-13,` + + `"o_sint64":"-2600000000",` + + `"o_float":3.14,` + + `"o_double":6.02214179e+23,` + + `"o_string":"hello \"there\"",` + + `"o_bytes":"YmVlcCBib29w",` + + `"o_cast_bytes":"d293"` + + `}` + + simpleObjectPrettyJSON = `{ + "o_bool": true, + "o_int32": -32, + "o_int64": "-6400000000", + "o_uint32": 32, + "o_uint64": "6400000000", + "o_sint32": -13, + "o_sint64": "-2600000000", + "o_float": 3.14, + "o_double": 6.02214179e+23, + "o_string": "hello \"there\"", + "o_bytes": "YmVlcCBib29w", + "o_cast_bytes": "d293" +}` + + repeatsObject = &pb.Repeats{ + RBool: []bool{true, false, true}, + RInt32: []int32{-3, -4, -5}, + RInt64: []int64{-123456789, -987654321}, + RUint32: []uint32{1, 2, 3}, + RUint64: []uint64{6789012345, 3456789012}, + RSint32: []int32{-1, -2, -3}, + RSint64: []int64{-6789012345, -3456789012}, + RFloat: []float32{3.14, 6.28}, + RDouble: []float64{299792458, 6.62606957e-34}, + RString: []string{"happy", "days"}, + RBytes: [][]byte{[]byte("skittles"), []byte("m&m's")}, + } + + repeatsObjectJSON = `{` + + `"r_bool":[true,false,true],` + + `"r_int32":[-3,-4,-5],` + + `"r_int64":["-123456789","-987654321"],` + + `"r_uint32":[1,2,3],` + + `"r_uint64":["6789012345","3456789012"],` + + `"r_sint32":[-1,-2,-3],` + + `"r_sint64":["-6789012345","-3456789012"],` + + `"r_float":[3.14,6.28],` + + `"r_double":[2.99792458e+08,6.62606957e-34],` + + `"r_string":["happy","days"],` + + `"r_bytes":["c2tpdHRsZXM=","bSZtJ3M="]` + + `}` + + repeatsObjectPrettyJSON = `{ + "r_bool": [ + true, + false, + true + ], + "r_int32": [ + -3, + -4, + -5 + ], + "r_int64": [ + "-123456789", + "-987654321" + ], + "r_uint32": [ + 1, + 2, + 3 + ], + "r_uint64": [ + "6789012345", + "3456789012" + ], + "r_sint32": [ + -1, + -2, + -3 + ], + "r_sint64": [ + "-6789012345", + "-3456789012" + ], + "r_float": [ + 3.14, + 6.28 + ], + "r_double": [ + 2.99792458e+08, + 6.62606957e-34 + ], + "r_string": [ + "happy", + "days" + ], + "r_bytes": [ + "c2tpdHRsZXM=", + "bSZtJ3M=" + ] +}` + + innerSimple = &pb.Simple{OInt32: proto.Int32(-32)} + innerSimple2 = &pb.Simple{OInt64: proto.Int64(25)} + innerRepeats = &pb.Repeats{RString: []string{"roses", "red"}} + innerRepeats2 = &pb.Repeats{RString: []string{"violets", "blue"}} + complexObject = &pb.Widget{ + Color: pb.Widget_GREEN.Enum(), + RColor: []pb.Widget_Color{pb.Widget_RED, pb.Widget_GREEN, pb.Widget_BLUE}, + Simple: innerSimple, + RSimple: []*pb.Simple{innerSimple, innerSimple2}, + Repeats: innerRepeats, + RRepeats: []*pb.Repeats{innerRepeats, innerRepeats2}, + } + + complexObjectJSON = `{"color":"GREEN",` + + `"r_color":["RED","GREEN","BLUE"],` + + `"simple":{"o_int32":-32},` + + `"r_simple":[{"o_int32":-32},{"o_int64":"25"}],` + + `"repeats":{"r_string":["roses","red"]},` + + `"r_repeats":[{"r_string":["roses","red"]},{"r_string":["violets","blue"]}]` + + `}` + + complexObjectPrettyJSON = `{ + "color": "GREEN", + "r_color": [ + "RED", + "GREEN", + "BLUE" + ], + "simple": { + "o_int32": -32 + }, + "r_simple": [ + { + "o_int32": -32 + }, + { + "o_int64": "25" + } + ], + "repeats": { + "r_string": [ + "roses", + "red" + ] + }, + "r_repeats": [ + { + "r_string": [ + "roses", + "red" + ] + }, + { + "r_string": [ + "violets", + "blue" + ] + } + ] +}` + + colorPrettyJSON = `{ + "color": 2 +}` + + colorListPrettyJSON = `{ + "color": 1000, + "r_color": [ + "RED" + ] +}` + + nummyPrettyJSON = `{ + "nummy": { + "1": 2, + "3": 4 + } +}` + + objjyPrettyJSON = `{ + "objjy": { + "1": { + "dub": 1 + } + } +}` + realNumber = &pb.Real{Value: proto.Float64(3.14159265359)} + realNumberName = "Pi" + complexNumber = &pb.Complex{Imaginary: proto.Float64(0.5772156649)} + realNumberJSON = `{` + + `"value":3.14159265359,` + + `"[jsonpb.Complex.real_extension]":{"imaginary":0.5772156649},` + + `"[jsonpb.name]":"Pi"` + + `}` +) + +func init() { + if err := proto.SetExtension(realNumber, pb.E_Name, &realNumberName); err != nil { + panic(err) + } + if err := proto.SetExtension(realNumber, pb.E_Complex_RealExtension, complexNumber); err != nil { + panic(err) + } +} + +var marshalingTests = []struct { + desc string + marshaler Marshaler + pb proto.Message + json string +}{ + {"simple flat object", marshaler, simpleObject, simpleObjectJSON}, + {"simple pretty object", marshalerAllOptions, simpleObject, simpleObjectPrettyJSON}, + {"repeated fields flat object", marshaler, repeatsObject, repeatsObjectJSON}, + {"repeated fields pretty object", marshalerAllOptions, repeatsObject, repeatsObjectPrettyJSON}, + {"nested message/enum flat object", marshaler, complexObject, complexObjectJSON}, + {"nested message/enum pretty object", marshalerAllOptions, complexObject, complexObjectPrettyJSON}, + {"enum-string flat object", Marshaler{}, + &pb.Widget{Color: pb.Widget_BLUE.Enum()}, `{"color":"BLUE"}`}, + {"enum-value pretty object", Marshaler{EnumsAsInts: true, Indent: " "}, + &pb.Widget{Color: pb.Widget_BLUE.Enum()}, colorPrettyJSON}, + {"unknown enum value object", marshalerAllOptions, + &pb.Widget{Color: pb.Widget_Color(1000).Enum(), RColor: []pb.Widget_Color{pb.Widget_RED}}, colorListPrettyJSON}, + {"empty value", marshaler, &pb.Simple3{}, `{}`}, + {"empty value emitted", Marshaler{EmitDefaults: true}, &pb.Simple3{}, `{"dub":0}`}, + {"map", marshaler, &pb.Mappy{Nummy: map[int64]int32{1: 2, 3: 4}}, `{"nummy":{"1":2,"3":4}}`}, + {"map", marshalerAllOptions, &pb.Mappy{Nummy: map[int64]int32{1: 2, 3: 4}}, nummyPrettyJSON}, + {"map", marshaler, + &pb.Mappy{Strry: map[string]string{`"one"`: "two", "three": "four"}}, + `{"strry":{"\"one\"":"two","three":"four"}}`}, + {"map", marshaler, + &pb.Mappy{Objjy: map[int32]*pb.Simple3{1: {Dub: 1}}}, `{"objjy":{"1":{"dub":1}}}`}, + {"map", marshalerAllOptions, + &pb.Mappy{Objjy: map[int32]*pb.Simple3{1: {Dub: 1}}}, objjyPrettyJSON}, + {"map", marshaler, &pb.Mappy{Buggy: map[int64]string{1234: "yup"}}, + `{"buggy":{"1234":"yup"}}`}, + {"map", marshaler, &pb.Mappy{Booly: map[bool]bool{false: true}}, `{"booly":{"false":true}}`}, + {"proto2 map", marshaler, &pb.Maps{MInt64Str: map[int64]string{213: "cat"}}, + `{"m_int64_str":{"213":"cat"}}`}, + {"proto2 map", marshaler, + &pb.Maps{MBoolSimple: map[bool]*pb.Simple{true: {OInt32: proto.Int32(1)}}}, + `{"m_bool_simple":{"true":{"o_int32":1}}}`}, + {"oneof, not set", marshaler, &pb.MsgWithOneof{}, `{}`}, + {"oneof, set", marshaler, &pb.MsgWithOneof{Union: &pb.MsgWithOneof_Title{Title: "Grand Poobah"}}, `{"title":"Grand Poobah"}`}, + {"proto2 extension", marshaler, realNumber, realNumberJSON}, +} + +func TestMarshaling(t *testing.T) { + for _, tt := range marshalingTests { + json, err := tt.marshaler.MarshalToString(tt.pb) + if err != nil { + t.Errorf("%s: marshaling error: %v", tt.desc, err) + } else if tt.json != json { + t.Errorf("%s: got [%v] want [%v]", tt.desc, json, tt.json) + } + } +} + +var unmarshalingTests = []struct { + desc string + json string + pb proto.Message +}{ + {"simple flat object", simpleObjectJSON, simpleObject}, + {"simple pretty object", simpleObjectPrettyJSON, simpleObject}, + {"repeated fields flat object", repeatsObjectJSON, repeatsObject}, + {"repeated fields pretty object", repeatsObjectPrettyJSON, repeatsObject}, + {"nested message/enum flat object", complexObjectJSON, complexObject}, + {"nested message/enum pretty object", complexObjectPrettyJSON, complexObject}, + {"enum-string object", `{"color":"BLUE"}`, &pb.Widget{Color: pb.Widget_BLUE.Enum()}}, + {"enum-value object", "{\n \"color\": 2\n}", &pb.Widget{Color: pb.Widget_BLUE.Enum()}}, + {"proto3 enum string", `{"hilarity":"PUNS"}`, &proto3pb.Message{Hilarity: proto3pb.Message_PUNS}}, + {"proto3 enum value", `{"hilarity":1}`, &proto3pb.Message{Hilarity: proto3pb.Message_PUNS}}, + {"unknown enum value object", + "{\n \"color\": 1000,\n \"r_color\": [\n \"RED\"\n ]\n}", + &pb.Widget{Color: pb.Widget_Color(1000).Enum(), RColor: []pb.Widget_Color{pb.Widget_RED}}}, + {"unquoted int64 object", `{"o_int64":-314}`, &pb.Simple{OInt64: proto.Int64(-314)}}, + {"unquoted uint64 object", `{"o_uint64":123}`, &pb.Simple{OUint64: proto.Uint64(123)}}, + {"map", `{"nummy":{"1":2,"3":4}}`, &pb.Mappy{Nummy: map[int64]int32{1: 2, 3: 4}}}, + {"map", `{"strry":{"\"one\"":"two","three":"four"}}`, &pb.Mappy{Strry: map[string]string{`"one"`: "two", "three": "four"}}}, + {"map", `{"objjy":{"1":{"dub":1}}}`, &pb.Mappy{Objjy: map[int32]*pb.Simple3{1: {Dub: 1}}}}, + {"oneof", `{"salary":31000}`, &pb.MsgWithOneof{Union: &pb.MsgWithOneof_Salary{Salary: 31000}}}, +} + +func TestUnmarshaling(t *testing.T) { + for _, tt := range unmarshalingTests { + // Make a new instance of the type of our expected object. + p := reflect.New(reflect.TypeOf(tt.pb).Elem()).Interface().(proto.Message) + + err := UnmarshalString(tt.json, p) + if err != nil { + t.Error(err) + continue + } + + // For easier diffs, compare text strings of the protos. + exp := proto.MarshalTextString(tt.pb) + act := proto.MarshalTextString(p) + if string(exp) != string(act) { + t.Errorf("%s: got [%s] want [%s]", tt.desc, act, exp) + } + } +} + +var unmarshalingShouldError = []struct { + desc string + in string + pb proto.Message +}{ + {"a value", "666", new(pb.Simple)}, + {"gibberish", "{adskja123;l23=-=", new(pb.Simple)}, + {"unknown enum name", `{"hilarity":"DAVE"}`, new(proto3pb.Message)}, +} + +func TestUnmarshalingBadInput(t *testing.T) { + for _, tt := range unmarshalingShouldError { + err := UnmarshalString(tt.in, tt.pb) + if err == nil { + t.Errorf("an error was expected when parsing %q instead of an object", tt.desc) + } + } +} diff --git a/vendor/github.com/gogo/protobuf/jsonpb/jsonpb_test_proto/Makefile b/vendor/github.com/gogo/protobuf/jsonpb/jsonpb_test_proto/Makefile new file mode 100644 index 000000000..079b3df70 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/jsonpb/jsonpb_test_proto/Makefile @@ -0,0 +1,33 @@ +# Go support for Protocol Buffers - Google's data interchange format +# +# Copyright 2015 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: + protoc-min-version --version="3.0.0" --gogo_out=. *.proto -I . -I ../../ -I ../../protobuf/ diff --git a/vendor/github.com/gogo/protobuf/jsonpb/jsonpb_test_proto/bytes.go b/vendor/github.com/gogo/protobuf/jsonpb/jsonpb_test_proto/bytes.go new file mode 100644 index 000000000..bee5f0ed6 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/jsonpb/jsonpb_test_proto/bytes.go @@ -0,0 +1,7 @@ +package jsonpb + +// Byte is used to test that []byte type aliases are serialized to base64. +type Byte byte + +// Bytes is used to test that []byte type aliases are serialized to base64. +type Bytes []Byte diff --git a/vendor/github.com/gogo/protobuf/jsonpb/jsonpb_test_proto/more_test_objects.pb.go b/vendor/github.com/gogo/protobuf/jsonpb/jsonpb_test_proto/more_test_objects.pb.go new file mode 100644 index 000000000..5a74a2945 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/jsonpb/jsonpb_test_proto/more_test_objects.pb.go @@ -0,0 +1,120 @@ +// Code generated by protoc-gen-gogo. +// source: more_test_objects.proto +// DO NOT EDIT! + +/* +Package jsonpb is a generated protocol buffer package. + +It is generated from these files: + more_test_objects.proto + test_objects.proto + +It has these top-level messages: + Simple3 + Mappy + Simple + Repeats + Widget + Maps + MsgWithOneof + Real + Complex +*/ +package jsonpb + +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. +const _ = proto.GoGoProtoPackageIsVersion1 + +type Simple3 struct { + Dub float64 `protobuf:"fixed64,1,opt,name=dub,proto3" json:"dub,omitempty"` +} + +func (m *Simple3) Reset() { *m = Simple3{} } +func (m *Simple3) String() string { return proto.CompactTextString(m) } +func (*Simple3) ProtoMessage() {} +func (*Simple3) Descriptor() ([]byte, []int) { return fileDescriptorMoreTestObjects, []int{0} } + +type Mappy struct { + Nummy map[int64]int32 `protobuf:"bytes,1,rep,name=nummy" json:"nummy,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` + Strry map[string]string `protobuf:"bytes,2,rep,name=strry" json:"strry,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + Objjy map[int32]*Simple3 `protobuf:"bytes,3,rep,name=objjy" json:"objjy,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value"` + Buggy map[int64]string `protobuf:"bytes,4,rep,name=buggy" json:"buggy,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + Booly map[bool]bool `protobuf:"bytes,5,rep,name=booly" json:"booly,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` +} + +func (m *Mappy) Reset() { *m = Mappy{} } +func (m *Mappy) String() string { return proto.CompactTextString(m) } +func (*Mappy) ProtoMessage() {} +func (*Mappy) Descriptor() ([]byte, []int) { return fileDescriptorMoreTestObjects, []int{1} } + +func (m *Mappy) GetNummy() map[int64]int32 { + if m != nil { + return m.Nummy + } + return nil +} + +func (m *Mappy) GetStrry() map[string]string { + if m != nil { + return m.Strry + } + return nil +} + +func (m *Mappy) GetObjjy() map[int32]*Simple3 { + if m != nil { + return m.Objjy + } + return nil +} + +func (m *Mappy) GetBuggy() map[int64]string { + if m != nil { + return m.Buggy + } + return nil +} + +func (m *Mappy) GetBooly() map[bool]bool { + if m != nil { + return m.Booly + } + return nil +} + +func init() { + proto.RegisterType((*Simple3)(nil), "jsonpb.Simple3") + proto.RegisterType((*Mappy)(nil), "jsonpb.Mappy") +} + +var fileDescriptorMoreTestObjects = []byte{ + // 288 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0x84, 0x92, 0x41, 0x4b, 0xc3, 0x30, + 0x14, 0xc7, 0xe9, 0xba, 0xcc, 0xf5, 0xed, 0xa0, 0x14, 0xc1, 0xa0, 0x17, 0x19, 0x08, 0x3d, 0xe5, + 0xb0, 0x5d, 0x86, 0x47, 0xc1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, 0x7f, 0x3c, 0x4e, 0x36, + 0x11, 0x9a, 0x63, 0x3d, 0xdf, 0x4c, 0x02, 0x66, 0xe2, 0x9b, 0x2f, 0x00, 0x63, 0x51, 0xdf, 0x24, + 0xbd, 0xf9, 0xe0, 0x9b, 0x8b, 0xd5, 0xe5, 0xb1, 0xc3, 0xf0, 0xff, 0x4e, 0x96, 0x18, 0x6f, 0x70, + 0x6e, 0xfd, 0xe4, 0xd4, 0xfc, 0xbf, 0x86, 0x6f, 0xce, 0x03, 0xe6, 0xdc, 0x33, 0xf9, 0xcc, 0x3d, + 0xac, 0xf5, 0x5f, 0x00, 0x00, 0x00, 0xff, 0xff, 0x39, 0x61, 0xe7, 0x9b, 0x73, 0x02, 0x00, 0x00, +} diff --git a/vendor/github.com/gogo/protobuf/jsonpb/jsonpb_test_proto/more_test_objects.proto b/vendor/github.com/gogo/protobuf/jsonpb/jsonpb_test_proto/more_test_objects.proto new file mode 100644 index 000000000..653579163 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/jsonpb/jsonpb_test_proto/more_test_objects.proto @@ -0,0 +1,46 @@ +// Go support for Protocol Buffers - Google's data interchange format +// +// Copyright 2015 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. + +syntax = "proto3"; + +package jsonpb; + +message Simple3 { + double dub = 1; +} + +message Mappy { + map nummy = 1; + map strry = 2; + map objjy = 3; + map buggy = 4; + map booly = 5; +} diff --git a/vendor/github.com/gogo/protobuf/jsonpb/jsonpb_test_proto/test_objects.pb.go b/vendor/github.com/gogo/protobuf/jsonpb/jsonpb_test_proto/test_objects.pb.go new file mode 100644 index 000000000..cda24f3a2 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/jsonpb/jsonpb_test_proto/test_objects.pb.go @@ -0,0 +1,599 @@ +// Code generated by protoc-gen-gogo. +// source: test_objects.proto +// DO NOT EDIT! + +package jsonpb + +import proto "github.com/gogo/protobuf/proto" +import fmt "fmt" +import math "math" + +// skipping weak import gogoproto "gogoproto" + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +type Widget_Color int32 + +const ( + Widget_RED Widget_Color = 0 + Widget_GREEN Widget_Color = 1 + Widget_BLUE Widget_Color = 2 +) + +var Widget_Color_name = map[int32]string{ + 0: "RED", + 1: "GREEN", + 2: "BLUE", +} +var Widget_Color_value = map[string]int32{ + "RED": 0, + "GREEN": 1, + "BLUE": 2, +} + +func (x Widget_Color) Enum() *Widget_Color { + p := new(Widget_Color) + *p = x + return p +} +func (x Widget_Color) String() string { + return proto.EnumName(Widget_Color_name, int32(x)) +} +func (x *Widget_Color) UnmarshalJSON(data []byte) error { + value, err := proto.UnmarshalJSONEnum(Widget_Color_value, data, "Widget_Color") + if err != nil { + return err + } + *x = Widget_Color(value) + return nil +} +func (Widget_Color) EnumDescriptor() ([]byte, []int) { return fileDescriptorTestObjects, []int{2, 0} } + +// Test message for holding primitive types. +type Simple struct { + OBool *bool `protobuf:"varint,1,opt,name=o_bool,json=oBool" json:"o_bool,omitempty"` + OInt32 *int32 `protobuf:"varint,2,opt,name=o_int32,json=oInt32" json:"o_int32,omitempty"` + OInt64 *int64 `protobuf:"varint,3,opt,name=o_int64,json=oInt64" json:"o_int64,omitempty"` + OUint32 *uint32 `protobuf:"varint,4,opt,name=o_uint32,json=oUint32" json:"o_uint32,omitempty"` + OUint64 *uint64 `protobuf:"varint,5,opt,name=o_uint64,json=oUint64" json:"o_uint64,omitempty"` + OSint32 *int32 `protobuf:"zigzag32,6,opt,name=o_sint32,json=oSint32" json:"o_sint32,omitempty"` + OSint64 *int64 `protobuf:"zigzag64,7,opt,name=o_sint64,json=oSint64" json:"o_sint64,omitempty"` + OFloat *float32 `protobuf:"fixed32,8,opt,name=o_float,json=oFloat" json:"o_float,omitempty"` + ODouble *float64 `protobuf:"fixed64,9,opt,name=o_double,json=oDouble" json:"o_double,omitempty"` + OString *string `protobuf:"bytes,10,opt,name=o_string,json=oString" json:"o_string,omitempty"` + OBytes []byte `protobuf:"bytes,11,opt,name=o_bytes,json=oBytes" json:"o_bytes,omitempty"` + OCastBytes Bytes `protobuf:"bytes,12,opt,name=o_cast_bytes,json=oCastBytes,casttype=Bytes" json:"o_cast_bytes,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *Simple) Reset() { *m = Simple{} } +func (m *Simple) String() string { return proto.CompactTextString(m) } +func (*Simple) ProtoMessage() {} +func (*Simple) Descriptor() ([]byte, []int) { return fileDescriptorTestObjects, []int{0} } + +func (m *Simple) GetOBool() bool { + if m != nil && m.OBool != nil { + return *m.OBool + } + return false +} + +func (m *Simple) GetOInt32() int32 { + if m != nil && m.OInt32 != nil { + return *m.OInt32 + } + return 0 +} + +func (m *Simple) GetOInt64() int64 { + if m != nil && m.OInt64 != nil { + return *m.OInt64 + } + return 0 +} + +func (m *Simple) GetOUint32() uint32 { + if m != nil && m.OUint32 != nil { + return *m.OUint32 + } + return 0 +} + +func (m *Simple) GetOUint64() uint64 { + if m != nil && m.OUint64 != nil { + return *m.OUint64 + } + return 0 +} + +func (m *Simple) GetOSint32() int32 { + if m != nil && m.OSint32 != nil { + return *m.OSint32 + } + return 0 +} + +func (m *Simple) GetOSint64() int64 { + if m != nil && m.OSint64 != nil { + return *m.OSint64 + } + return 0 +} + +func (m *Simple) GetOFloat() float32 { + if m != nil && m.OFloat != nil { + return *m.OFloat + } + return 0 +} + +func (m *Simple) GetODouble() float64 { + if m != nil && m.ODouble != nil { + return *m.ODouble + } + return 0 +} + +func (m *Simple) GetOString() string { + if m != nil && m.OString != nil { + return *m.OString + } + return "" +} + +func (m *Simple) GetOBytes() []byte { + if m != nil { + return m.OBytes + } + return nil +} + +func (m *Simple) GetOCastBytes() Bytes { + if m != nil { + return m.OCastBytes + } + return nil +} + +// Test message for holding repeated primitives. +type Repeats struct { + RBool []bool `protobuf:"varint,1,rep,name=r_bool,json=rBool" json:"r_bool,omitempty"` + RInt32 []int32 `protobuf:"varint,2,rep,name=r_int32,json=rInt32" json:"r_int32,omitempty"` + RInt64 []int64 `protobuf:"varint,3,rep,name=r_int64,json=rInt64" json:"r_int64,omitempty"` + RUint32 []uint32 `protobuf:"varint,4,rep,name=r_uint32,json=rUint32" json:"r_uint32,omitempty"` + RUint64 []uint64 `protobuf:"varint,5,rep,name=r_uint64,json=rUint64" json:"r_uint64,omitempty"` + RSint32 []int32 `protobuf:"zigzag32,6,rep,name=r_sint32,json=rSint32" json:"r_sint32,omitempty"` + RSint64 []int64 `protobuf:"zigzag64,7,rep,name=r_sint64,json=rSint64" json:"r_sint64,omitempty"` + RFloat []float32 `protobuf:"fixed32,8,rep,name=r_float,json=rFloat" json:"r_float,omitempty"` + RDouble []float64 `protobuf:"fixed64,9,rep,name=r_double,json=rDouble" json:"r_double,omitempty"` + RString []string `protobuf:"bytes,10,rep,name=r_string,json=rString" json:"r_string,omitempty"` + RBytes [][]byte `protobuf:"bytes,11,rep,name=r_bytes,json=rBytes" json:"r_bytes,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *Repeats) Reset() { *m = Repeats{} } +func (m *Repeats) String() string { return proto.CompactTextString(m) } +func (*Repeats) ProtoMessage() {} +func (*Repeats) Descriptor() ([]byte, []int) { return fileDescriptorTestObjects, []int{1} } + +func (m *Repeats) GetRBool() []bool { + if m != nil { + return m.RBool + } + return nil +} + +func (m *Repeats) GetRInt32() []int32 { + if m != nil { + return m.RInt32 + } + return nil +} + +func (m *Repeats) GetRInt64() []int64 { + if m != nil { + return m.RInt64 + } + return nil +} + +func (m *Repeats) GetRUint32() []uint32 { + if m != nil { + return m.RUint32 + } + return nil +} + +func (m *Repeats) GetRUint64() []uint64 { + if m != nil { + return m.RUint64 + } + return nil +} + +func (m *Repeats) GetRSint32() []int32 { + if m != nil { + return m.RSint32 + } + return nil +} + +func (m *Repeats) GetRSint64() []int64 { + if m != nil { + return m.RSint64 + } + return nil +} + +func (m *Repeats) GetRFloat() []float32 { + if m != nil { + return m.RFloat + } + return nil +} + +func (m *Repeats) GetRDouble() []float64 { + if m != nil { + return m.RDouble + } + return nil +} + +func (m *Repeats) GetRString() []string { + if m != nil { + return m.RString + } + return nil +} + +func (m *Repeats) GetRBytes() [][]byte { + if m != nil { + return m.RBytes + } + return nil +} + +// Test message for holding enums and nested messages. +type Widget struct { + Color *Widget_Color `protobuf:"varint,1,opt,name=color,enum=jsonpb.Widget_Color" json:"color,omitempty"` + RColor []Widget_Color `protobuf:"varint,2,rep,name=r_color,json=rColor,enum=jsonpb.Widget_Color" json:"r_color,omitempty"` + Simple *Simple `protobuf:"bytes,10,opt,name=simple" json:"simple,omitempty"` + RSimple []*Simple `protobuf:"bytes,11,rep,name=r_simple,json=rSimple" json:"r_simple,omitempty"` + Repeats *Repeats `protobuf:"bytes,20,opt,name=repeats" json:"repeats,omitempty"` + RRepeats []*Repeats `protobuf:"bytes,21,rep,name=r_repeats,json=rRepeats" json:"r_repeats,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *Widget) Reset() { *m = Widget{} } +func (m *Widget) String() string { return proto.CompactTextString(m) } +func (*Widget) ProtoMessage() {} +func (*Widget) Descriptor() ([]byte, []int) { return fileDescriptorTestObjects, []int{2} } + +func (m *Widget) GetColor() Widget_Color { + if m != nil && m.Color != nil { + return *m.Color + } + return Widget_RED +} + +func (m *Widget) GetRColor() []Widget_Color { + if m != nil { + return m.RColor + } + return nil +} + +func (m *Widget) GetSimple() *Simple { + if m != nil { + return m.Simple + } + return nil +} + +func (m *Widget) GetRSimple() []*Simple { + if m != nil { + return m.RSimple + } + return nil +} + +func (m *Widget) GetRepeats() *Repeats { + if m != nil { + return m.Repeats + } + return nil +} + +func (m *Widget) GetRRepeats() []*Repeats { + if m != nil { + return m.RRepeats + } + return nil +} + +type Maps struct { + MInt64Str map[int64]string `protobuf:"bytes,1,rep,name=m_int64_str,json=mInt64Str" json:"m_int64_str,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + MBoolSimple map[bool]*Simple `protobuf:"bytes,2,rep,name=m_bool_simple,json=mBoolSimple" json:"m_bool_simple,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *Maps) Reset() { *m = Maps{} } +func (m *Maps) String() string { return proto.CompactTextString(m) } +func (*Maps) ProtoMessage() {} +func (*Maps) Descriptor() ([]byte, []int) { return fileDescriptorTestObjects, []int{3} } + +func (m *Maps) GetMInt64Str() map[int64]string { + if m != nil { + return m.MInt64Str + } + return nil +} + +func (m *Maps) GetMBoolSimple() map[bool]*Simple { + if m != nil { + return m.MBoolSimple + } + return nil +} + +type MsgWithOneof struct { + // Types that are valid to be assigned to Union: + // *MsgWithOneof_Title + // *MsgWithOneof_Salary + Union isMsgWithOneof_Union `protobuf_oneof:"union"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *MsgWithOneof) Reset() { *m = MsgWithOneof{} } +func (m *MsgWithOneof) String() string { return proto.CompactTextString(m) } +func (*MsgWithOneof) ProtoMessage() {} +func (*MsgWithOneof) Descriptor() ([]byte, []int) { return fileDescriptorTestObjects, []int{4} } + +type isMsgWithOneof_Union interface { + isMsgWithOneof_Union() +} + +type MsgWithOneof_Title struct { + Title string `protobuf:"bytes,1,opt,name=title,oneof"` +} +type MsgWithOneof_Salary struct { + Salary int64 `protobuf:"varint,2,opt,name=salary,oneof"` +} + +func (*MsgWithOneof_Title) isMsgWithOneof_Union() {} +func (*MsgWithOneof_Salary) isMsgWithOneof_Union() {} + +func (m *MsgWithOneof) GetUnion() isMsgWithOneof_Union { + if m != nil { + return m.Union + } + return nil +} + +func (m *MsgWithOneof) GetTitle() string { + if x, ok := m.GetUnion().(*MsgWithOneof_Title); ok { + return x.Title + } + return "" +} + +func (m *MsgWithOneof) GetSalary() int64 { + if x, ok := m.GetUnion().(*MsgWithOneof_Salary); ok { + return x.Salary + } + return 0 +} + +// XXX_OneofFuncs is for the internal use of the proto package. +func (*MsgWithOneof) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{}) { + return _MsgWithOneof_OneofMarshaler, _MsgWithOneof_OneofUnmarshaler, _MsgWithOneof_OneofSizer, []interface{}{ + (*MsgWithOneof_Title)(nil), + (*MsgWithOneof_Salary)(nil), + } +} + +func _MsgWithOneof_OneofMarshaler(msg proto.Message, b *proto.Buffer) error { + m := msg.(*MsgWithOneof) + // union + switch x := m.Union.(type) { + case *MsgWithOneof_Title: + _ = b.EncodeVarint(1<<3 | proto.WireBytes) + _ = b.EncodeStringBytes(x.Title) + case *MsgWithOneof_Salary: + _ = b.EncodeVarint(2<<3 | proto.WireVarint) + _ = b.EncodeVarint(uint64(x.Salary)) + case nil: + default: + return fmt.Errorf("MsgWithOneof.Union has unexpected type %T", x) + } + return nil +} + +func _MsgWithOneof_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) { + m := msg.(*MsgWithOneof) + switch tag { + case 1: // union.title + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeStringBytes() + m.Union = &MsgWithOneof_Title{x} + return true, err + case 2: // union.salary + if wire != proto.WireVarint { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeVarint() + m.Union = &MsgWithOneof_Salary{int64(x)} + return true, err + default: + return false, nil + } +} + +func _MsgWithOneof_OneofSizer(msg proto.Message) (n int) { + m := msg.(*MsgWithOneof) + // union + switch x := m.Union.(type) { + case *MsgWithOneof_Title: + n += proto.SizeVarint(1<<3 | proto.WireBytes) + n += proto.SizeVarint(uint64(len(x.Title))) + n += len(x.Title) + case *MsgWithOneof_Salary: + n += proto.SizeVarint(2<<3 | proto.WireVarint) + n += proto.SizeVarint(uint64(x.Salary)) + case nil: + default: + panic(fmt.Sprintf("proto: unexpected type %T in oneof", x)) + } + return n +} + +type Real struct { + Value *float64 `protobuf:"fixed64,1,opt,name=value" json:"value,omitempty"` + XXX_extensions map[int32]proto.Extension `json:"-"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *Real) Reset() { *m = Real{} } +func (m *Real) String() string { return proto.CompactTextString(m) } +func (*Real) ProtoMessage() {} +func (*Real) Descriptor() ([]byte, []int) { return fileDescriptorTestObjects, []int{5} } + +var extRange_Real = []proto.ExtensionRange{ + {100, 536870911}, +} + +func (*Real) ExtensionRangeArray() []proto.ExtensionRange { + return extRange_Real +} +func (m *Real) ExtensionMap() map[int32]proto.Extension { + if m.XXX_extensions == nil { + m.XXX_extensions = make(map[int32]proto.Extension) + } + return m.XXX_extensions +} + +func (m *Real) GetValue() float64 { + if m != nil && m.Value != nil { + return *m.Value + } + return 0 +} + +type Complex struct { + Imaginary *float64 `protobuf:"fixed64,1,opt,name=imaginary" json:"imaginary,omitempty"` + XXX_extensions map[int32]proto.Extension `json:"-"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *Complex) Reset() { *m = Complex{} } +func (m *Complex) String() string { return proto.CompactTextString(m) } +func (*Complex) ProtoMessage() {} +func (*Complex) Descriptor() ([]byte, []int) { return fileDescriptorTestObjects, []int{6} } + +var extRange_Complex = []proto.ExtensionRange{ + {100, 536870911}, +} + +func (*Complex) ExtensionRangeArray() []proto.ExtensionRange { + return extRange_Complex +} +func (m *Complex) ExtensionMap() map[int32]proto.Extension { + if m.XXX_extensions == nil { + m.XXX_extensions = make(map[int32]proto.Extension) + } + return m.XXX_extensions +} + +func (m *Complex) GetImaginary() float64 { + if m != nil && m.Imaginary != nil { + return *m.Imaginary + } + return 0 +} + +var E_Complex_RealExtension = &proto.ExtensionDesc{ + ExtendedType: (*Real)(nil), + ExtensionType: (*Complex)(nil), + Field: 123, + Name: "jsonpb.Complex.real_extension", + Tag: "bytes,123,opt,name=real_extension,json=realExtension", +} + +var E_Name = &proto.ExtensionDesc{ + ExtendedType: (*Real)(nil), + ExtensionType: (*string)(nil), + Field: 124, + Name: "jsonpb.name", + Tag: "bytes,124,opt,name=name", +} + +func init() { + proto.RegisterType((*Simple)(nil), "jsonpb.Simple") + proto.RegisterType((*Repeats)(nil), "jsonpb.Repeats") + proto.RegisterType((*Widget)(nil), "jsonpb.Widget") + proto.RegisterType((*Maps)(nil), "jsonpb.Maps") + proto.RegisterType((*MsgWithOneof)(nil), "jsonpb.MsgWithOneof") + proto.RegisterType((*Real)(nil), "jsonpb.Real") + proto.RegisterType((*Complex)(nil), "jsonpb.Complex") + proto.RegisterEnum("jsonpb.Widget_Color", Widget_Color_name, Widget_Color_value) + proto.RegisterExtension(E_Complex_RealExtension) + proto.RegisterExtension(E_Name) +} + +var fileDescriptorTestObjects = []byte{ + // 769 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0x74, 0x94, 0x51, 0x6e, 0xd3, 0x4a, + 0x14, 0x86, 0x1b, 0x4f, 0x1c, 0xdb, 0x93, 0x34, 0x37, 0x77, 0x94, 0xde, 0xeb, 0xdb, 0x0b, 0xa2, + 0x8a, 0xa0, 0x82, 0x02, 0x41, 0x0a, 0x55, 0x85, 0x0a, 0x2f, 0xa4, 0x0d, 0x50, 0x89, 0x16, 0x69, + 0xaa, 0xaa, 0xbc, 0x45, 0x4e, 0xeb, 0x06, 0x17, 0xc7, 0x13, 0x1d, 0x3b, 0xd0, 0x08, 0x1e, 0x58, + 0x04, 0x6b, 0x60, 0x09, 0x2c, 0x84, 0x05, 0xb0, 0x10, 0x9e, 0x98, 0x33, 0x63, 0x7b, 0xd2, 0x56, + 0xf4, 0xa5, 0x73, 0xe6, 0x3f, 0xff, 0x9f, 0x99, 0x6f, 0x8e, 0x4c, 0x59, 0x16, 0xa6, 0xd9, 0x50, + 0x8c, 0xce, 0xc3, 0x93, 0x2c, 0xed, 0x4e, 0x41, 0x64, 0x82, 0xd5, 0xce, 0x53, 0x91, 0x4c, 0x47, + 0xab, 0xed, 0xb1, 0x18, 0x0b, 0xb5, 0xf5, 0x08, 0x57, 0x5a, 0xed, 0xfc, 0xb0, 0x68, 0xed, 0x30, + 0x9a, 0x4c, 0xe3, 0x90, 0xad, 0xd0, 0x9a, 0x18, 0x8e, 0x84, 0x88, 0xfd, 0xca, 0x5a, 0xe5, 0xae, + 0xcb, 0x6d, 0xd1, 0x97, 0x05, 0xfb, 0x97, 0x3a, 0x62, 0x18, 0x25, 0xd9, 0xe3, 0x9e, 0x6f, 0xc9, + 0x7d, 0x9b, 0xd7, 0xc4, 0x1e, 0x56, 0xa5, 0xb0, 0xb5, 0x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 0x3d, 0x0c, 0x2f, 0xb2, 0x30, + 0x49, 0xe5, 0x8f, 0xb1, 0x86, 0x19, 0x88, 0x20, 0xf6, 0x3f, 0x5d, 0x9e, 0xa8, 0x3c, 0x9e, 0x2f, + 0xa3, 0x69, 0x50, 0x78, 0xb6, 0xd7, 0x68, 0x35, 0x09, 0x26, 0xe1, 0x15, 0xef, 0x67, 0x85, 0x58, + 0x29, 0x6f, 0x97, 0x7e, 0x07, 0x00, 0x00, 0xff, 0xff, 0x14, 0x11, 0xc4, 0x75, 0x10, 0x06, 0x00, + 0x00, +} diff --git a/vendor/github.com/gogo/protobuf/jsonpb/jsonpb_test_proto/test_objects.proto b/vendor/github.com/gogo/protobuf/jsonpb/jsonpb_test_proto/test_objects.proto new file mode 100644 index 000000000..6a3ca3971 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/jsonpb/jsonpb_test_proto/test_objects.proto @@ -0,0 +1,113 @@ +// Go support for Protocol Buffers - Google's data interchange format +// +// Copyright 2015 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. + +syntax = "proto2"; + +package jsonpb; + +import weak "gogoproto/gogo.proto"; + +// Test message for holding primitive types. +message Simple { + optional bool o_bool = 1; + optional int32 o_int32 = 2; + optional int64 o_int64 = 3; + optional uint32 o_uint32 = 4; + optional uint64 o_uint64 = 5; + optional sint32 o_sint32 = 6; + optional sint64 o_sint64 = 7; + optional float o_float = 8; + optional double o_double = 9; + optional string o_string = 10; + optional bytes o_bytes = 11; + optional bytes o_cast_bytes = 12 [(gogoproto.casttype) = "Bytes"]; +} + +// Test message for holding repeated primitives. +message Repeats { + repeated bool r_bool = 1; + repeated int32 r_int32 = 2; + repeated int64 r_int64 = 3; + repeated uint32 r_uint32 = 4; + repeated uint64 r_uint64 = 5; + repeated sint32 r_sint32 = 6; + repeated sint64 r_sint64 = 7; + repeated float r_float = 8; + repeated double r_double = 9; + repeated string r_string = 10; + repeated bytes r_bytes = 11; +} + +// Test message for holding enums and nested messages. +message Widget { + enum Color { + RED = 0; + GREEN = 1; + BLUE = 2; + }; + optional Color color = 1; + repeated Color r_color = 2; + + optional Simple simple = 10; + repeated Simple r_simple = 11; + + optional Repeats repeats = 20; + repeated Repeats r_repeats = 21; +} + +message Maps { + map m_int64_str = 1; + map m_bool_simple = 2; +} + +message MsgWithOneof { + oneof union { + string title = 1; + int64 salary = 2; + } +} + +message Real { + optional double value = 1; + extensions 100 to max; +} + +extend Real { + optional string name = 124; +} + +message Complex { + extend Real { + optional Complex real_extension = 123; + } + optional double imaginary = 1; + extensions 100 to max; +} diff --git a/vendor/github.com/gogo/protobuf/plugin/compare/compare.go b/vendor/github.com/gogo/protobuf/plugin/compare/compare.go new file mode 100644 index 000000000..9f54d1944 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/plugin/compare/compare.go @@ -0,0 +1,520 @@ +// Copyright (c) 2013, Vastech SA (PTY) LTD. 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 compare + +import ( + "github.com/gogo/protobuf/gogoproto" + "github.com/gogo/protobuf/proto" + descriptor "github.com/gogo/protobuf/protoc-gen-gogo/descriptor" + "github.com/gogo/protobuf/protoc-gen-gogo/generator" + "github.com/gogo/protobuf/vanity" +) + +type plugin struct { + *generator.Generator + generator.PluginImports + fmtPkg generator.Single + bytesPkg generator.Single + sortkeysPkg generator.Single +} + +func NewPlugin() *plugin { + return &plugin{} +} + +func (p *plugin) Name() string { + return "compare" +} + +func (p *plugin) Init(g *generator.Generator) { + p.Generator = g +} + +func (p *plugin) Generate(file *generator.FileDescriptor) { + p.PluginImports = generator.NewPluginImports(p.Generator) + p.fmtPkg = p.NewImport("fmt") + p.bytesPkg = p.NewImport("bytes") + p.sortkeysPkg = p.NewImport("github.com/gogo/protobuf/sortkeys") + + for _, msg := range file.Messages() { + if msg.DescriptorProto.GetOptions().GetMapEntry() { + continue + } + if gogoproto.HasCompare(file.FileDescriptorProto, msg.DescriptorProto) { + p.generateMessage(file, msg) + } + } +} + +func (p *plugin) generateNullableField(fieldname string) { + p.P(`if this.`, fieldname, ` != nil && that1.`, fieldname, ` != nil {`) + p.In() + p.P(`if *this.`, fieldname, ` != *that1.`, fieldname, `{`) + p.In() + p.P(`if *this.`, fieldname, ` < *that1.`, fieldname, `{`) + p.In() + p.P(`return -1`) + p.Out() + p.P(`}`) + p.P(`return 1`) + p.Out() + p.P(`}`) + p.Out() + p.P(`} else if this.`, fieldname, ` != nil {`) + p.In() + p.P(`return 1`) + p.Out() + p.P(`} else if that1.`, fieldname, ` != nil {`) + p.In() + p.P(`return -1`) + p.Out() + p.P(`}`) +} + +func (p *plugin) generateMsgNullAndTypeCheck(ccTypeName string) { + p.P(`if that == nil {`) + p.In() + p.P(`if this == nil {`) + p.In() + p.P(`return 0`) + p.Out() + p.P(`}`) + p.P(`return 1`) + p.Out() + p.P(`}`) + p.P(``) + p.P(`that1, ok := that.(*`, ccTypeName, `)`) + p.P(`if !ok {`) + p.In() + p.P(`that2, ok := that.(`, ccTypeName, `)`) + p.P(`if ok {`) + p.In() + p.P(`that1 = &that2`) + p.Out() + p.P(`} else {`) + p.In() + p.P(`return 1`) + p.Out() + p.P(`}`) + p.Out() + p.P(`}`) + p.P(`if that1 == nil {`) + p.In() + p.P(`if this == nil {`) + p.In() + p.P(`return 0`) + p.Out() + p.P(`}`) + p.P(`return 1`) + p.Out() + p.P(`} else if this == nil {`) + p.In() + p.P(`return -1`) + p.Out() + p.P(`}`) +} + +func (p *plugin) generateField(file *generator.FileDescriptor, message *generator.Descriptor, field *descriptor.FieldDescriptorProto) { + proto3 := gogoproto.IsProto3(file.FileDescriptorProto) + fieldname := p.GetOneOfFieldName(message, field) + repeated := field.IsRepeated() + ctype := gogoproto.IsCustomType(field) + nullable := gogoproto.IsNullable(field) + // oneof := field.OneofIndex != nil + if !repeated { + if ctype { + if nullable { + p.P(`if that1.`, fieldname, ` == nil {`) + p.In() + p.P(`if this.`, fieldname, ` != nil {`) + p.In() + p.P(`return 1`) + p.Out() + p.P(`}`) + p.Out() + p.P(`} else if this.`, fieldname, ` == nil {`) + p.In() + p.P(`return -1`) + p.Out() + p.P(`} else if c := this.`, fieldname, `.Compare(*that1.`, fieldname, `); c != 0 {`) + } else { + p.P(`if c := this.`, fieldname, `.Compare(that1.`, fieldname, `); c != 0 {`) + } + p.In() + p.P(`return c`) + p.Out() + p.P(`}`) + } else { + if field.IsMessage() || p.IsGroup(field) { + if nullable { + p.P(`if c := this.`, fieldname, `.Compare(that1.`, fieldname, `); c != 0 {`) + } else { + p.P(`if c := this.`, fieldname, `.Compare(&that1.`, fieldname, `); c != 0 {`) + } + p.In() + p.P(`return c`) + p.Out() + p.P(`}`) + } else if field.IsBytes() { + p.P(`if c := `, p.bytesPkg.Use(), `.Compare(this.`, fieldname, `, that1.`, fieldname, `); c != 0 {`) + p.In() + p.P(`return c`) + p.Out() + p.P(`}`) + } else if field.IsString() { + if nullable && !proto3 { + p.generateNullableField(fieldname) + } else { + p.P(`if this.`, fieldname, ` != that1.`, fieldname, `{`) + p.In() + p.P(`if this.`, fieldname, ` < that1.`, fieldname, `{`) + p.In() + p.P(`return -1`) + p.Out() + p.P(`}`) + p.P(`return 1`) + p.Out() + p.P(`}`) + } + } else if field.IsBool() { + if nullable && !proto3 { + p.P(`if this.`, fieldname, ` != nil && that1.`, fieldname, ` != nil {`) + p.In() + p.P(`if *this.`, fieldname, ` != *that1.`, fieldname, `{`) + p.In() + p.P(`if !*this.`, fieldname, ` {`) + p.In() + p.P(`return -1`) + p.Out() + p.P(`}`) + p.P(`return 1`) + p.Out() + p.P(`}`) + p.Out() + p.P(`} else if this.`, fieldname, ` != nil {`) + p.In() + p.P(`return 1`) + p.Out() + p.P(`} else if that1.`, fieldname, ` != nil {`) + p.In() + p.P(`return -1`) + p.Out() + p.P(`}`) + } else { + p.P(`if this.`, fieldname, ` != that1.`, fieldname, `{`) + p.In() + p.P(`if !this.`, fieldname, ` {`) + p.In() + p.P(`return -1`) + p.Out() + p.P(`}`) + p.P(`return 1`) + p.Out() + p.P(`}`) + } + } else { + if nullable && !proto3 { + p.generateNullableField(fieldname) + } else { + p.P(`if this.`, fieldname, ` != that1.`, fieldname, `{`) + p.In() + p.P(`if this.`, fieldname, ` < that1.`, fieldname, `{`) + p.In() + p.P(`return -1`) + p.Out() + p.P(`}`) + p.P(`return 1`) + p.Out() + p.P(`}`) + } + } + } + } else { + p.P(`if len(this.`, fieldname, `) != len(that1.`, fieldname, `) {`) + p.In() + p.P(`if len(this.`, fieldname, `) < len(that1.`, fieldname, `) {`) + p.In() + p.P(`return -1`) + p.Out() + p.P(`}`) + p.P(`return 1`) + p.Out() + p.P(`}`) + p.P(`for i := range this.`, fieldname, ` {`) + p.In() + if ctype { + p.P(`if c := this.`, fieldname, `[i].Compare(that1.`, fieldname, `[i]); c != 0 {`) + p.In() + p.P(`return c`) + p.Out() + p.P(`}`) + } else { + if p.IsMap(field) { + m := p.GoMapType(nil, field) + valuegoTyp, _ := p.GoType(nil, m.ValueField) + valuegoAliasTyp, _ := p.GoType(nil, m.ValueAliasField) + nullable, valuegoTyp, valuegoAliasTyp = generator.GoMapValueTypes(field, m.ValueField, valuegoTyp, valuegoAliasTyp) + + mapValue := m.ValueAliasField + if mapValue.IsMessage() || p.IsGroup(mapValue) { + if nullable && valuegoTyp == valuegoAliasTyp { + p.P(`if c := this.`, fieldname, `[i].Compare(that1.`, fieldname, `[i]); c != 0 {`) + } else { + // Compare() has a pointer receiver, but map value is a value type + a := `this.` + fieldname + `[i]` + b := `that1.` + fieldname + `[i]` + if valuegoTyp != valuegoAliasTyp { + // cast back to the type that has the generated methods on it + a = `(` + valuegoTyp + `)(` + a + `)` + b = `(` + valuegoTyp + `)(` + b + `)` + } + p.P(`a := `, a) + p.P(`b := `, b) + if nullable { + p.P(`if c := a.Compare(b); c != 0 {`) + } else { + p.P(`if c := (&a).Compare(&b); c != 0 {`) + } + } + p.In() + p.P(`return c`) + p.Out() + p.P(`}`) + } else if mapValue.IsBytes() { + p.P(`if c := `, p.bytesPkg.Use(), `.Compare(this.`, fieldname, `[i], that1.`, fieldname, `[i]); c != 0 {`) + p.In() + p.P(`return c`) + p.Out() + p.P(`}`) + } else if mapValue.IsString() { + p.P(`if this.`, fieldname, `[i] != that1.`, fieldname, `[i] {`) + p.In() + p.P(`if this.`, fieldname, `[i] < that1.`, fieldname, `[i] {`) + p.In() + p.P(`return -1`) + p.Out() + p.P(`}`) + p.P(`return 1`) + p.Out() + p.P(`}`) + } else { + p.P(`if this.`, fieldname, `[i] != that1.`, fieldname, `[i] {`) + p.In() + p.P(`if this.`, fieldname, `[i] < that1.`, fieldname, `[i] {`) + p.In() + p.P(`return -1`) + p.Out() + p.P(`}`) + p.P(`return 1`) + p.Out() + p.P(`}`) + } + } else if field.IsMessage() || p.IsGroup(field) { + if nullable { + p.P(`if c := this.`, fieldname, `[i].Compare(that1.`, fieldname, `[i]); c != 0 {`) + p.In() + p.P(`return c`) + p.Out() + p.P(`}`) + } else { + p.P(`if c := this.`, fieldname, `[i].Compare(&that1.`, fieldname, `[i]); c != 0 {`) + p.In() + p.P(`return c`) + p.Out() + p.P(`}`) + } + } else if field.IsBytes() { + p.P(`if c := `, p.bytesPkg.Use(), `.Compare(this.`, fieldname, `[i], that1.`, fieldname, `[i]); c != 0 {`) + p.In() + p.P(`return c`) + p.Out() + p.P(`}`) + } else if field.IsString() { + p.P(`if this.`, fieldname, `[i] != that1.`, fieldname, `[i] {`) + p.In() + p.P(`if this.`, fieldname, `[i] < that1.`, fieldname, `[i] {`) + p.In() + p.P(`return -1`) + p.Out() + p.P(`}`) + p.P(`return 1`) + p.Out() + p.P(`}`) + } else if field.IsBool() { + p.P(`if this.`, fieldname, `[i] != that1.`, fieldname, `[i] {`) + p.In() + p.P(`if !this.`, fieldname, `[i] {`) + p.In() + p.P(`return -1`) + p.Out() + p.P(`}`) + p.P(`return 1`) + p.Out() + p.P(`}`) + } else { + p.P(`if this.`, fieldname, `[i] != that1.`, fieldname, `[i] {`) + p.In() + p.P(`if this.`, fieldname, `[i] < that1.`, fieldname, `[i] {`) + p.In() + p.P(`return -1`) + p.Out() + p.P(`}`) + p.P(`return 1`) + p.Out() + p.P(`}`) + } + } + p.Out() + p.P(`}`) + } +} + +func (p *plugin) generateMessage(file *generator.FileDescriptor, message *generator.Descriptor) { + ccTypeName := generator.CamelCaseSlice(message.TypeName()) + p.P(`func (this *`, ccTypeName, `) Compare(that interface{}) int {`) + p.In() + p.generateMsgNullAndTypeCheck(ccTypeName) + oneofs := make(map[string]struct{}) + + for _, field := range message.Field { + oneof := field.OneofIndex != nil + if oneof { + fieldname := p.GetFieldName(message, field) + if _, ok := oneofs[fieldname]; ok { + continue + } else { + oneofs[fieldname] = struct{}{} + } + p.P(`if that1.`, fieldname, ` == nil {`) + p.In() + p.P(`if this.`, fieldname, ` != nil {`) + p.In() + p.P(`return 1`) + p.Out() + p.P(`}`) + p.Out() + p.P(`} else if this.`, fieldname, ` == nil {`) + p.In() + p.P(`return -1`) + p.Out() + p.P(`} else if c := this.`, fieldname, `.Compare(that1.`, fieldname, `); c != 0 {`) + p.In() + p.P(`return c`) + p.Out() + p.P(`}`) + } else { + p.generateField(file, message, field) + } + } + if message.DescriptorProto.HasExtension() { + fieldname := "XXX_extensions" + if gogoproto.HasExtensionsMap(file.FileDescriptorProto, message.DescriptorProto) { + p.P(`extkeys := make([]int32, 0, len(this.`, fieldname, `)+len(that1.`, fieldname, `))`) + p.P(`for k, _ := range this.`, fieldname, ` {`) + p.In() + p.P(`extkeys = append(extkeys, k)`) + p.Out() + p.P(`}`) + p.P(`for k, _ := range that1.`, fieldname, ` {`) + p.In() + p.P(`if _, ok := this.`, fieldname, `[k]; !ok {`) + p.In() + p.P(`extkeys = append(extkeys, k)`) + p.Out() + p.P(`}`) + p.Out() + p.P(`}`) + p.P(p.sortkeysPkg.Use(), `.Int32s(extkeys)`) + p.P(`for _, k := range extkeys {`) + p.In() + p.P(`if v, ok := this.`, fieldname, `[k]; ok {`) + p.In() + p.P(`if v2, ok := that1.`, fieldname, `[k]; ok {`) + p.In() + p.P(`if c := v.Compare(&v2); c != 0 {`) + p.In() + p.P(`return c`) + p.Out() + p.P(`}`) + p.Out() + p.P(`} else {`) + p.In() + p.P(`return 1`) + p.Out() + p.P(`}`) + p.Out() + p.P(`} else {`) + p.In() + p.P(`return -1`) + p.Out() + p.P(`}`) + p.Out() + p.P(`}`) + } else { + p.P(`if c := `, p.bytesPkg.Use(), `.Compare(this.`, fieldname, `, that1.`, fieldname, `); c != 0 {`) + p.In() + p.P(`return c`) + p.Out() + p.P(`}`) + } + } + if gogoproto.HasUnrecognized(file.FileDescriptorProto, message.DescriptorProto) { + fieldname := "XXX_unrecognized" + p.P(`if c := `, p.bytesPkg.Use(), `.Compare(this.`, fieldname, `, that1.`, fieldname, `); c != 0 {`) + p.In() + p.P(`return c`) + p.Out() + p.P(`}`) + } + p.P(`return 0`) + p.Out() + p.P(`}`) + + //Generate Compare methods for oneof fields + m := proto.Clone(message.DescriptorProto).(*descriptor.DescriptorProto) + for _, field := range m.Field { + oneof := field.OneofIndex != nil + if !oneof { + continue + } + ccTypeName := p.OneOfTypeName(message, field) + p.P(`func (this *`, ccTypeName, `) Compare(that interface{}) int {`) + p.In() + + p.generateMsgNullAndTypeCheck(ccTypeName) + vanity.TurnOffNullableForNativeTypesWithoutDefaultsOnly(field) + p.generateField(file, message, field) + + p.P(`return 0`) + p.Out() + p.P(`}`) + } +} + +func init() { + generator.RegisterPlugin(NewPlugin()) +} diff --git a/vendor/github.com/gogo/protobuf/plugin/compare/comparetest.go b/vendor/github.com/gogo/protobuf/plugin/compare/comparetest.go new file mode 100644 index 000000000..db7157179 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/plugin/compare/comparetest.go @@ -0,0 +1,105 @@ +// Copyright (c) 2013, Vastech SA (PTY) LTD. 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 compare + +import ( + "github.com/gogo/protobuf/gogoproto" + "github.com/gogo/protobuf/plugin/testgen" + "github.com/gogo/protobuf/protoc-gen-gogo/generator" +) + +type test struct { + *generator.Generator +} + +func NewTest(g *generator.Generator) testgen.TestPlugin { + return &test{g} +} + +func (p *test) Generate(imports generator.PluginImports, file *generator.FileDescriptor) bool { + used := false + randPkg := imports.NewImport("math/rand") + timePkg := imports.NewImport("time") + testingPkg := imports.NewImport("testing") + protoPkg := imports.NewImport("github.com/gogo/protobuf/proto") + if !gogoproto.ImportsGoGoProto(file.FileDescriptorProto) { + protoPkg = imports.NewImport("github.com/golang/protobuf/proto") + } + for _, message := range file.Messages() { + ccTypeName := generator.CamelCaseSlice(message.TypeName()) + if !gogoproto.HasCompare(file.FileDescriptorProto, message.DescriptorProto) { + continue + } + if message.DescriptorProto.GetOptions().GetMapEntry() { + continue + } + + if gogoproto.HasTestGen(file.FileDescriptorProto, message.DescriptorProto) { + used = true + p.P(`func Test`, ccTypeName, `Compare(t *`, testingPkg.Use(), `.T) {`) + p.In() + p.P(`popr := `, randPkg.Use(), `.New(`, randPkg.Use(), `.NewSource(`, timePkg.Use(), `.Now().UnixNano()))`) + p.P(`p := NewPopulated`, ccTypeName, `(popr, false)`) + p.P(`data, err := `, protoPkg.Use(), `.Marshal(p)`) + p.P(`if err != nil {`) + p.In() + p.P(`panic(err)`) + p.Out() + p.P(`}`) + p.P(`msg := &`, ccTypeName, `{}`) + p.P(`if err := `, protoPkg.Use(), `.Unmarshal(data, msg); err != nil {`) + p.In() + p.P(`panic(err)`) + p.Out() + p.P(`}`) + p.P(`if c := p.Compare(msg); c != 0 {`) + p.In() + p.P(`t.Fatalf("%#v !Compare %#v, since %d", msg, p, c)`) + p.Out() + p.P(`}`) + p.P(`p2 := NewPopulated`, ccTypeName, `(popr, false)`) + p.P(`c := p.Compare(p2)`) + p.P(`c2 := p2.Compare(p)`) + p.P(`if c != (-1 * c2) {`) + p.In() + p.P(`t.Errorf("p.Compare(p2) = %d", c)`) + p.P(`t.Errorf("p2.Compare(p) = %d", c2)`) + p.P(`t.Errorf("p = %#v", p)`) + p.P(`t.Errorf("p2 = %#v", p2)`) + p.Out() + p.P(`}`) + p.Out() + p.P(`}`) + } + + } + return used +} + +func init() { + testgen.RegisterTestPlugin(NewTest) +} diff --git a/vendor/github.com/gogo/protobuf/plugin/defaultcheck/defaultcheck.go b/vendor/github.com/gogo/protobuf/plugin/defaultcheck/defaultcheck.go new file mode 100644 index 000000000..690ad0df3 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/plugin/defaultcheck/defaultcheck.go @@ -0,0 +1,131 @@ +// Copyright (c) 2013, Vastech SA (PTY) LTD. 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. + +/* +The defaultcheck plugin is used to check whether nullable is not used incorrectly. +For instance: +An error is caused if a nullable field: + - has a default value, + - is an enum which does not start at zero, + - is used for an extension, + - is used for a native proto3 type, + - is used for a repeated native type. + +An error is also caused if a field with a default value is used in a message: + - which is a face. + - without getters. + +It is enabled by the following extensions: + + - nullable + +For incorrect usage of nullable with tests see: + + github.com/gogo/protobuf/test/nullableconflict + +*/ +package defaultcheck + +import ( + "fmt" + "github.com/gogo/protobuf/gogoproto" + "github.com/gogo/protobuf/protoc-gen-gogo/generator" + "os" +) + +type plugin struct { + *generator.Generator +} + +func NewPlugin() *plugin { + return &plugin{} +} + +func (p *plugin) Name() string { + return "defaultcheck" +} + +func (p *plugin) Init(g *generator.Generator) { + p.Generator = g +} + +func (p *plugin) Generate(file *generator.FileDescriptor) { + proto3 := gogoproto.IsProto3(file.FileDescriptorProto) + for _, msg := range file.Messages() { + getters := gogoproto.HasGoGetters(file.FileDescriptorProto, msg.DescriptorProto) + face := gogoproto.IsFace(file.FileDescriptorProto, msg.DescriptorProto) + for _, field := range msg.GetField() { + if len(field.GetDefaultValue()) > 0 { + if !getters { + fmt.Fprintf(os.Stderr, "ERROR: field %v.%v cannot have a default value and not have a getter method", generator.CamelCase(*msg.Name), generator.CamelCase(*field.Name)) + os.Exit(1) + } + if face { + fmt.Fprintf(os.Stderr, "ERROR: field %v.%v cannot have a default value be in a face", generator.CamelCase(*msg.Name), generator.CamelCase(*field.Name)) + os.Exit(1) + } + } + if gogoproto.IsNullable(field) { + continue + } + if len(field.GetDefaultValue()) > 0 { + fmt.Fprintf(os.Stderr, "ERROR: field %v.%v cannot be non-nullable and have a default value", generator.CamelCase(*msg.Name), generator.CamelCase(*field.Name)) + os.Exit(1) + } + if !field.IsMessage() && !gogoproto.IsCustomType(field) { + if field.IsRepeated() { + fmt.Fprintf(os.Stderr, "WARNING: field %v.%v is a repeated non-nullable native type, nullable=false has no effect\n", generator.CamelCase(*msg.Name), generator.CamelCase(*field.Name)) + } else if proto3 { + fmt.Fprintf(os.Stderr, "ERROR: field %v.%v is a native type and in proto3 syntax with nullable=false there exists conflicting implementations when encoding zero values", generator.CamelCase(*msg.Name), generator.CamelCase(*field.Name)) + os.Exit(1) + } + if field.IsBytes() { + fmt.Fprintf(os.Stderr, "WARNING: field %v.%v is a non-nullable bytes type, nullable=false has no effect\n", generator.CamelCase(*msg.Name), generator.CamelCase(*field.Name)) + } + } + if !field.IsEnum() { + continue + } + enum := p.ObjectNamed(field.GetTypeName()).(*generator.EnumDescriptor) + if len(enum.Value) == 0 || enum.Value[0].GetNumber() != 0 { + fmt.Fprintf(os.Stderr, "ERROR: field %v.%v cannot be non-nullable and be an enum type %v which does not start with zero", generator.CamelCase(*msg.Name), generator.CamelCase(*field.Name), enum.GetName()) + os.Exit(1) + } + } + } + for _, e := range file.GetExtension() { + if !gogoproto.IsNullable(e) { + fmt.Fprintf(os.Stderr, "ERROR: extended field %v cannot be nullable %v", generator.CamelCase(e.GetName()), generator.CamelCase(*e.Name)) + os.Exit(1) + } + } +} + +func (p *plugin) GenerateImports(*generator.FileDescriptor) {} + +func init() { + generator.RegisterPlugin(NewPlugin()) +} diff --git a/vendor/github.com/gogo/protobuf/plugin/description/description.go b/vendor/github.com/gogo/protobuf/plugin/description/description.go new file mode 100644 index 000000000..a2f08aa07 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/plugin/description/description.go @@ -0,0 +1,199 @@ +// Copyright (c) 2013, Vastech SA (PTY) LTD. 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. + +/* +The description (experimental) plugin generates a Description method for each message. +The Description method returns a populated google_protobuf.FileDescriptorSet struct. +This contains the description of the files used to generate this message. + +It is enabled by the following extensions: + + - description + - description_all + +The description plugin also generates a test given it is enabled using one of the following extensions: + + - testgen + - testgen_all + +Let us look at: + + github.com/gogo/protobuf/test/example/example.proto + +Btw all the output can be seen at: + + github.com/gogo/protobuf/test/example/* + +The following message: + + message B { + option (gogoproto.description) = true; + 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]; + } + +given to the description plugin, will generate the following code: + + func (this *B) Description() (desc *google_protobuf.FileDescriptorSet) { + return ExampleDescription() + } + +and the following test code: + + func TestDescription(t *testing9.T) { + ExampleDescription() + } + +The hope is to use this struct in some way instead of reflect. +This package is subject to change, since a use has not been figured out yet. + +*/ +package description + +import ( + "bytes" + "compress/gzip" + "fmt" + "github.com/gogo/protobuf/gogoproto" + "github.com/gogo/protobuf/proto" + descriptor "github.com/gogo/protobuf/protoc-gen-gogo/descriptor" + "github.com/gogo/protobuf/protoc-gen-gogo/generator" +) + +type plugin struct { + *generator.Generator + generator.PluginImports +} + +func NewPlugin() *plugin { + return &plugin{} +} + +func (p *plugin) Name() string { + return "description" +} + +func (p *plugin) Init(g *generator.Generator) { + p.Generator = g +} + +func (p *plugin) Generate(file *generator.FileDescriptor) { + used := false + localName := generator.FileName(file) + + p.PluginImports = generator.NewPluginImports(p.Generator) + descriptorPkg := p.NewImport("github.com/gogo/protobuf/protoc-gen-gogo/descriptor") + protoPkg := p.NewImport("github.com/gogo/protobuf/proto") + gzipPkg := p.NewImport("compress/gzip") + bytesPkg := p.NewImport("bytes") + ioutilPkg := p.NewImport("io/ioutil") + + for _, message := range file.Messages() { + if !gogoproto.HasDescription(file.FileDescriptorProto, message.DescriptorProto) { + continue + } + if message.DescriptorProto.GetOptions().GetMapEntry() { + continue + } + used = true + ccTypeName := generator.CamelCaseSlice(message.TypeName()) + p.P(`func (this *`, ccTypeName, `) Description() (desc *`, descriptorPkg.Use(), `.FileDescriptorSet) {`) + p.In() + p.P(`return `, localName, `Description()`) + p.Out() + p.P(`}`) + } + + if used { + + p.P(`func `, localName, `Description() (desc *`, descriptorPkg.Use(), `.FileDescriptorSet) {`) + p.In() + //Don't generate SourceCodeInfo, since it will create too much code. + + ss := make([]*descriptor.SourceCodeInfo, 0) + for _, f := range p.Generator.AllFiles().GetFile() { + ss = append(ss, f.SourceCodeInfo) + f.SourceCodeInfo = nil + } + b, err := proto.Marshal(p.Generator.AllFiles()) + if err != nil { + panic(err) + } + for i, f := range p.Generator.AllFiles().GetFile() { + f.SourceCodeInfo = ss[i] + } + p.P(`d := &`, descriptorPkg.Use(), `.FileDescriptorSet{}`) + var buf bytes.Buffer + w, _ := gzip.NewWriterLevel(&buf, gzip.BestCompression) + w.Write(b) + w.Close() + b = buf.Bytes() + p.P("var gzipped = []byte{") + p.In() + p.P("// ", len(b), " bytes of a gzipped FileDescriptorSet") + for len(b) > 0 { + n := 16 + if n > len(b) { + n = len(b) + } + + s := "" + for _, c := range b[:n] { + s += fmt.Sprintf("0x%02x,", c) + } + p.P(s) + + b = b[n:] + } + p.Out() + p.P("}") + p.P(`r := `, bytesPkg.Use(), `.NewReader(gzipped)`) + p.P(`gzipr, err := `, gzipPkg.Use(), `.NewReader(r)`) + p.P(`if err != nil {`) + p.In() + p.P(`panic(err)`) + p.Out() + p.P(`}`) + p.P(`ungzipped, err := `, ioutilPkg.Use(), `.ReadAll(gzipr)`) + p.P(`if err != nil {`) + p.In() + p.P(`panic(err)`) + p.Out() + p.P(`}`) + p.P(`if err := `, protoPkg.Use(), `.Unmarshal(ungzipped, d); err != nil {`) + p.In() + p.P(`panic(err)`) + p.Out() + p.P(`}`) + p.P(`return d`) + p.Out() + p.P(`}`) + } +} + +func init() { + generator.RegisterPlugin(NewPlugin()) +} diff --git a/vendor/github.com/gogo/protobuf/plugin/description/descriptiontest.go b/vendor/github.com/gogo/protobuf/plugin/description/descriptiontest.go new file mode 100644 index 000000000..7feaf3209 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/plugin/description/descriptiontest.go @@ -0,0 +1,71 @@ +// Copyright (c) 2013, Vastech SA (PTY) LTD. 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 description + +import ( + "github.com/gogo/protobuf/gogoproto" + "github.com/gogo/protobuf/plugin/testgen" + "github.com/gogo/protobuf/protoc-gen-gogo/generator" +) + +type test struct { + *generator.Generator +} + +func NewTest(g *generator.Generator) testgen.TestPlugin { + return &test{g} +} + +func (p *test) Generate(imports generator.PluginImports, file *generator.FileDescriptor) bool { + used := false + testingPkg := imports.NewImport("testing") + for _, message := range file.Messages() { + if !gogoproto.HasDescription(file.FileDescriptorProto, message.DescriptorProto) || + !gogoproto.HasTestGen(file.FileDescriptorProto, message.DescriptorProto) { + continue + } + if message.DescriptorProto.GetOptions().GetMapEntry() { + continue + } + used = true + } + + if used { + localName := generator.FileName(file) + p.P(`func Test`, localName, `Description(t *`, testingPkg.Use(), `.T) {`) + p.In() + p.P(localName, `Description()`) + p.Out() + p.P(`}`) + + } + return used +} + +func init() { + testgen.RegisterTestPlugin(NewTest) +} diff --git a/vendor/github.com/gogo/protobuf/plugin/embedcheck/embedcheck.go b/vendor/github.com/gogo/protobuf/plugin/embedcheck/embedcheck.go new file mode 100644 index 000000000..af8fd9681 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/plugin/embedcheck/embedcheck.go @@ -0,0 +1,197 @@ +// Copyright (c) 2013, Vastech SA (PTY) LTD. 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. + +/* +The embedcheck plugin is used to check whether embed is not used incorrectly. +For instance: +An embedded message has a generated string method, but the is a member of a message which does not. +This causes a warning. +An error is caused by a namespace conflict. + +It is enabled by the following extensions: + + - embed + - embed_all + +For incorrect usage of embed with tests see: + + github.com/gogo/protobuf/test/embedconflict + +*/ +package embedcheck + +import ( + "fmt" + "github.com/gogo/protobuf/gogoproto" + "github.com/gogo/protobuf/protoc-gen-gogo/generator" + "os" +) + +type plugin struct { + *generator.Generator +} + +func NewPlugin() *plugin { + return &plugin{} +} + +func (p *plugin) Name() string { + return "embedcheck" +} + +func (p *plugin) Init(g *generator.Generator) { + p.Generator = g +} + +var overwriters []map[string]gogoproto.EnableFunc = []map[string]gogoproto.EnableFunc{ + { + "stringer": gogoproto.IsStringer, + }, + { + "gostring": gogoproto.HasGoString, + }, + { + "equal": gogoproto.HasEqual, + }, + { + "verboseequal": gogoproto.HasVerboseEqual, + }, + { + "size": gogoproto.IsSizer, + "protosizer": gogoproto.IsProtoSizer, + }, + { + "unmarshaler": gogoproto.IsUnmarshaler, + "unsafe_unmarshaler": gogoproto.IsUnsafeUnmarshaler, + }, + { + "marshaler": gogoproto.IsMarshaler, + "unsafe_marshaler": gogoproto.IsUnsafeMarshaler, + }, +} + +func (p *plugin) Generate(file *generator.FileDescriptor) { + for _, msg := range file.Messages() { + for _, os := range overwriters { + possible := true + for _, overwriter := range os { + if overwriter(file.FileDescriptorProto, msg.DescriptorProto) { + possible = false + } + } + if possible { + p.checkOverwrite(msg, os) + } + } + p.checkNameSpace(msg) + for _, field := range msg.GetField() { + if gogoproto.IsEmbed(field) && gogoproto.IsCustomName(field) { + fmt.Fprintf(os.Stderr, "ERROR: field %v with custom name %v cannot be embedded", *field.Name, gogoproto.GetCustomName(field)) + os.Exit(1) + } + } + p.checkRepeated(msg) + } + for _, e := range file.GetExtension() { + if gogoproto.IsEmbed(e) { + fmt.Fprintf(os.Stderr, "ERROR: extended field %v cannot be embedded", generator.CamelCase(*e.Name)) + os.Exit(1) + } + } +} + +func (p *plugin) checkNameSpace(message *generator.Descriptor) map[string]bool { + ccTypeName := generator.CamelCaseSlice(message.TypeName()) + names := make(map[string]bool) + for _, field := range message.Field { + fieldname := generator.CamelCase(*field.Name) + if field.IsMessage() && gogoproto.IsEmbed(field) { + desc := p.ObjectNamed(field.GetTypeName()) + moreNames := p.checkNameSpace(desc.(*generator.Descriptor)) + for another := range moreNames { + if names[another] { + fmt.Fprintf(os.Stderr, "ERROR: duplicate embedded fieldname %v in type %v\n", fieldname, ccTypeName) + os.Exit(1) + } + names[another] = true + } + } else { + if names[fieldname] { + fmt.Fprintf(os.Stderr, "ERROR: duplicate embedded fieldname %v in type %v\n", fieldname, ccTypeName) + os.Exit(1) + } + names[fieldname] = true + } + } + return names +} + +func (p *plugin) checkOverwrite(message *generator.Descriptor, enablers map[string]gogoproto.EnableFunc) { + ccTypeName := generator.CamelCaseSlice(message.TypeName()) + names := []string{} + for name := range enablers { + names = append(names, name) + } + for _, field := range message.Field { + if field.IsMessage() && gogoproto.IsEmbed(field) { + fieldname := generator.CamelCase(*field.Name) + desc := p.ObjectNamed(field.GetTypeName()) + msg := desc.(*generator.Descriptor) + for errStr, enabled := range enablers { + if enabled(msg.File(), msg.DescriptorProto) { + fmt.Fprintf(os.Stderr, "WARNING: found non-%v %v with embedded %v %v\n", names, ccTypeName, errStr, fieldname) + } + } + p.checkOverwrite(msg, enablers) + } + } +} + +func (p *plugin) checkRepeated(message *generator.Descriptor) { + ccTypeName := generator.CamelCaseSlice(message.TypeName()) + for _, field := range message.Field { + if !gogoproto.IsEmbed(field) { + continue + } + if field.IsBytes() { + fieldname := generator.CamelCase(*field.Name) + fmt.Fprintf(os.Stderr, "ERROR: found embedded bytes field %s in message %s\n", fieldname, ccTypeName) + os.Exit(1) + } + if !field.IsRepeated() { + continue + } + fieldname := generator.CamelCase(*field.Name) + fmt.Fprintf(os.Stderr, "ERROR: found repeated embedded field %s in message %s\n", fieldname, ccTypeName) + os.Exit(1) + } +} + +func (p *plugin) GenerateImports(*generator.FileDescriptor) {} + +func init() { + generator.RegisterPlugin(NewPlugin()) +} diff --git a/vendor/github.com/gogo/protobuf/plugin/enumstringer/enumstringer.go b/vendor/github.com/gogo/protobuf/plugin/enumstringer/enumstringer.go new file mode 100644 index 000000000..7feb8be18 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/plugin/enumstringer/enumstringer.go @@ -0,0 +1,102 @@ +// Copyright (c) 2013, Vastech SA (PTY) LTD. 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. + +/* +The enumstringer (experimental) plugin generates a String method for each enum. + +It is enabled by the following extensions: + + - enum_stringer + - enum_stringer_all + +This package is subject to change. + +*/ +package enumstringer + +import ( + "github.com/gogo/protobuf/gogoproto" + "github.com/gogo/protobuf/protoc-gen-gogo/generator" +) + +type enumstringer struct { + *generator.Generator + generator.PluginImports + atleastOne bool + localName string +} + +func NewEnumStringer() *enumstringer { + return &enumstringer{} +} + +func (p *enumstringer) Name() string { + return "enumstringer" +} + +func (p *enumstringer) Init(g *generator.Generator) { + p.Generator = g +} + +func (p *enumstringer) Generate(file *generator.FileDescriptor) { + p.PluginImports = generator.NewPluginImports(p.Generator) + p.atleastOne = false + + p.localName = generator.FileName(file) + + strconvPkg := p.NewImport("strconv") + + for _, enum := range file.Enums() { + if !gogoproto.IsEnumStringer(file.FileDescriptorProto, enum.EnumDescriptorProto) { + continue + } + if gogoproto.IsGoEnumStringer(file.FileDescriptorProto, enum.EnumDescriptorProto) { + panic("old enum string method needs to be disabled, please use gogoproto.old_enum_stringer or gogoproto.old_enum_string_all and set it to false") + } + p.atleastOne = true + ccTypeName := generator.CamelCaseSlice(enum.TypeName()) + p.P("func (x ", ccTypeName, ") String() string {") + p.In() + p.P(`s, ok := `, ccTypeName, `_name[int32(x)]`) + p.P(`if ok {`) + p.In() + p.P(`return s`) + p.Out() + p.P(`}`) + p.P(`return `, strconvPkg.Use(), `.Itoa(int(x))`) + p.Out() + p.P(`}`) + } + + if !p.atleastOne { + return + } + +} + +func init() { + generator.RegisterPlugin(NewEnumStringer()) +} diff --git a/vendor/github.com/gogo/protobuf/plugin/equal/equal.go b/vendor/github.com/gogo/protobuf/plugin/equal/equal.go new file mode 100644 index 000000000..8c7cd6bee --- /dev/null +++ b/vendor/github.com/gogo/protobuf/plugin/equal/equal.go @@ -0,0 +1,602 @@ +// Copyright (c) 2013, Vastech SA (PTY) LTD. 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. + +/* +The equal plugin generates an Equal and a VerboseEqual method for each message. +These equal methods are quite obvious. +The only difference is that VerboseEqual returns a non nil error if it is not equal. +This error contains more detail on exactly which part of the message was not equal to the other message. +The idea is that this is useful for debugging. + +Equal is enabled using the following extensions: + + - equal + - equal_all + +While VerboseEqual is enable dusing the following extensions: + + - verbose_equal + - verbose_equal_all + +The equal plugin also generates a test given it is enabled using one of the following extensions: + + - testgen + - testgen_all + +Let us look at: + + github.com/gogo/protobuf/test/example/example.proto + +Btw all the output can be seen at: + + github.com/gogo/protobuf/test/example/* + +The following message: + + option (gogoproto.equal_all) = true; + option (gogoproto.verbose_equal_all) = true; + + 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]; + } + +given to the equal plugin, will generate the following code: + + func (this *B) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt2.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*B) + if !ok { + return fmt2.Errorf("that is not of type *B") + } + if that1 == nil { + if this == nil { + return nil + } + return fmt2.Errorf("that is type *B but is nil && this != nil") + } else if this == nil { + return fmt2.Errorf("that is type *B but is not nil && this == nil") + } + if !this.A.Equal(&that1.A) { + return fmt2.Errorf("A this(%v) Not Equal that(%v)", this.A, that1.A) + } + if len(this.G) != len(that1.G) { + return fmt2.Errorf("G this(%v) Not Equal that(%v)", len(this.G), len(that1.G)) + } + for i := range this.G { + if !this.G[i].Equal(that1.G[i]) { + return fmt2.Errorf("G this[%v](%v) Not Equal that[%v](%v)", i, this.G[i], i, that1.G[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt2.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil + } + + func (this *B) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*B) + if !ok { + return false + } + if that1 == nil { + if this == nil { + return true + } + return false + } else if this == nil { + return false + } + if !this.A.Equal(&that1.A) { + return false + } + if len(this.G) != len(that1.G) { + return false + } + for i := range this.G { + if !this.G[i].Equal(that1.G[i]) { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true + } + +and the following test code: + + func TestBVerboseEqual(t *testing8.T) { + popr := math_rand8.New(math_rand8.NewSource(time8.Now().UnixNano())) + p := NewPopulatedB(popr, false) + data, err := github_com_gogo_protobuf_proto2.Marshal(p) + if err != nil { + panic(err) + } + msg := &B{} + if err := github_com_gogo_protobuf_proto2.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } + +*/ +package equal + +import ( + "github.com/gogo/protobuf/gogoproto" + "github.com/gogo/protobuf/proto" + descriptor "github.com/gogo/protobuf/protoc-gen-gogo/descriptor" + "github.com/gogo/protobuf/protoc-gen-gogo/generator" + "github.com/gogo/protobuf/vanity" +) + +type plugin struct { + *generator.Generator + generator.PluginImports + fmtPkg generator.Single + bytesPkg generator.Single +} + +func NewPlugin() *plugin { + return &plugin{} +} + +func (p *plugin) Name() string { + return "equal" +} + +func (p *plugin) Init(g *generator.Generator) { + p.Generator = g +} + +func (p *plugin) Generate(file *generator.FileDescriptor) { + p.PluginImports = generator.NewPluginImports(p.Generator) + p.fmtPkg = p.NewImport("fmt") + p.bytesPkg = p.NewImport("bytes") + + for _, msg := range file.Messages() { + if msg.DescriptorProto.GetOptions().GetMapEntry() { + continue + } + if gogoproto.HasVerboseEqual(file.FileDescriptorProto, msg.DescriptorProto) { + p.generateMessage(file, msg, true) + } + if gogoproto.HasEqual(file.FileDescriptorProto, msg.DescriptorProto) { + p.generateMessage(file, msg, false) + } + } +} + +func (p *plugin) generateNullableField(fieldname string, verbose bool) { + p.P(`if this.`, fieldname, ` != nil && that1.`, fieldname, ` != nil {`) + p.In() + p.P(`if *this.`, fieldname, ` != *that1.`, fieldname, `{`) + p.In() + if verbose { + p.P(`return `, p.fmtPkg.Use(), `.Errorf("`, fieldname, ` this(%v) Not Equal that(%v)", *this.`, fieldname, `, *that1.`, fieldname, `)`) + } else { + p.P(`return false`) + } + p.Out() + p.P(`}`) + p.Out() + p.P(`} else if this.`, fieldname, ` != nil {`) + p.In() + if verbose { + p.P(`return `, p.fmtPkg.Use(), `.Errorf("this.`, fieldname, ` == nil && that.`, fieldname, ` != nil")`) + } else { + p.P(`return false`) + } + p.Out() + p.P(`} else if that1.`, fieldname, ` != nil {`) +} + +func (p *plugin) generateMsgNullAndTypeCheck(ccTypeName string, verbose bool) { + p.P(`if that == nil {`) + p.In() + p.P(`if this == nil {`) + p.In() + if verbose { + p.P(`return nil`) + } else { + p.P(`return true`) + } + p.Out() + p.P(`}`) + if verbose { + p.P(`return `, p.fmtPkg.Use(), `.Errorf("that == nil && this != nil")`) + } else { + p.P(`return false`) + } + p.Out() + p.P(`}`) + p.P(``) + p.P(`that1, ok := that.(*`, ccTypeName, `)`) + p.P(`if !ok {`) + p.In() + p.P(`that2, ok := that.(`, ccTypeName, `)`) + p.P(`if ok {`) + p.In() + p.P(`that1 = &that2`) + p.Out() + p.P(`} else {`) + p.In() + if verbose { + p.P(`return `, p.fmtPkg.Use(), `.Errorf("that is not of type *`, ccTypeName, `")`) + } else { + p.P(`return false`) + } + p.Out() + p.P(`}`) + p.Out() + p.P(`}`) + p.P(`if that1 == nil {`) + p.In() + p.P(`if this == nil {`) + p.In() + if verbose { + p.P(`return nil`) + } else { + p.P(`return true`) + } + p.Out() + p.P(`}`) + if verbose { + p.P(`return `, p.fmtPkg.Use(), `.Errorf("that is type *`, ccTypeName, ` but is nil && this != nil")`) + } else { + p.P(`return false`) + } + p.Out() + p.P(`} else if this == nil {`) + p.In() + if verbose { + p.P(`return `, p.fmtPkg.Use(), `.Errorf("that is type *`, ccTypeName, ` but is not nil && this == nil")`) + } else { + p.P(`return false`) + } + p.Out() + p.P(`}`) +} + +func (p *plugin) generateField(file *generator.FileDescriptor, message *generator.Descriptor, field *descriptor.FieldDescriptorProto, verbose bool) { + proto3 := gogoproto.IsProto3(file.FileDescriptorProto) + fieldname := p.GetOneOfFieldName(message, field) + repeated := field.IsRepeated() + ctype := gogoproto.IsCustomType(field) + nullable := gogoproto.IsNullable(field) + // oneof := field.OneofIndex != nil + if !repeated { + if ctype { + if nullable { + p.P(`if that1.`, fieldname, ` == nil {`) + p.In() + p.P(`if this.`, fieldname, ` != nil {`) + p.In() + if verbose { + p.P(`return `, p.fmtPkg.Use(), `.Errorf("this.`, fieldname, ` != nil && that1.`, fieldname, ` == nil")`) + } else { + p.P(`return false`) + } + p.Out() + p.P(`}`) + p.Out() + p.P(`} else if !this.`, fieldname, `.Equal(*that1.`, fieldname, `) {`) + } else { + p.P(`if !this.`, fieldname, `.Equal(that1.`, fieldname, `) {`) + } + p.In() + if verbose { + p.P(`return `, p.fmtPkg.Use(), `.Errorf("`, fieldname, ` this(%v) Not Equal that(%v)", this.`, fieldname, `, that1.`, fieldname, `)`) + } else { + p.P(`return false`) + } + p.Out() + p.P(`}`) + } else { + if field.IsMessage() || p.IsGroup(field) { + if nullable { + p.P(`if !this.`, fieldname, `.Equal(that1.`, fieldname, `) {`) + } else { + p.P(`if !this.`, fieldname, `.Equal(&that1.`, fieldname, `) {`) + } + } else if field.IsBytes() { + p.P(`if !`, p.bytesPkg.Use(), `.Equal(this.`, fieldname, `, that1.`, fieldname, `) {`) + } else if field.IsString() { + if nullable && !proto3 { + p.generateNullableField(fieldname, verbose) + } else { + p.P(`if this.`, fieldname, ` != that1.`, fieldname, `{`) + } + } else { + if nullable && !proto3 { + p.generateNullableField(fieldname, verbose) + } else { + p.P(`if this.`, fieldname, ` != that1.`, fieldname, `{`) + } + } + p.In() + if verbose { + p.P(`return `, p.fmtPkg.Use(), `.Errorf("`, fieldname, ` this(%v) Not Equal that(%v)", this.`, fieldname, `, that1.`, fieldname, `)`) + } else { + p.P(`return false`) + } + p.Out() + p.P(`}`) + } + } else { + p.P(`if len(this.`, fieldname, `) != len(that1.`, fieldname, `) {`) + p.In() + if verbose { + p.P(`return `, p.fmtPkg.Use(), `.Errorf("`, fieldname, ` this(%v) Not Equal that(%v)", len(this.`, fieldname, `), len(that1.`, fieldname, `))`) + } else { + p.P(`return false`) + } + p.Out() + p.P(`}`) + p.P(`for i := range this.`, fieldname, ` {`) + p.In() + if ctype { + p.P(`if !this.`, fieldname, `[i].Equal(that1.`, fieldname, `[i]) {`) + } else { + if p.IsMap(field) { + m := p.GoMapType(nil, field) + valuegoTyp, _ := p.GoType(nil, m.ValueField) + valuegoAliasTyp, _ := p.GoType(nil, m.ValueAliasField) + nullable, valuegoTyp, valuegoAliasTyp = generator.GoMapValueTypes(field, m.ValueField, valuegoTyp, valuegoAliasTyp) + + mapValue := m.ValueAliasField + if mapValue.IsMessage() || p.IsGroup(mapValue) { + if nullable && valuegoTyp == valuegoAliasTyp { + p.P(`if !this.`, fieldname, `[i].Equal(that1.`, fieldname, `[i]) {`) + } else { + // Equal() has a pointer receiver, but map value is a value type + a := `this.` + fieldname + `[i]` + b := `that1.` + fieldname + `[i]` + if valuegoTyp != valuegoAliasTyp { + // cast back to the type that has the generated methods on it + a = `(` + valuegoTyp + `)(` + a + `)` + b = `(` + valuegoTyp + `)(` + b + `)` + } + p.P(`a := `, a) + p.P(`b := `, b) + if nullable { + p.P(`if !a.Equal(b) {`) + } else { + p.P(`if !(&a).Equal(&b) {`) + } + } + } else if mapValue.IsBytes() { + p.P(`if !`, p.bytesPkg.Use(), `.Equal(this.`, fieldname, `[i], that1.`, fieldname, `[i]) {`) + } else if mapValue.IsString() { + p.P(`if this.`, fieldname, `[i] != that1.`, fieldname, `[i] {`) + } else { + p.P(`if this.`, fieldname, `[i] != that1.`, fieldname, `[i] {`) + } + } else if field.IsMessage() || p.IsGroup(field) { + if nullable { + p.P(`if !this.`, fieldname, `[i].Equal(that1.`, fieldname, `[i]) {`) + } else { + p.P(`if !this.`, fieldname, `[i].Equal(&that1.`, fieldname, `[i]) {`) + } + } else if field.IsBytes() { + p.P(`if !`, p.bytesPkg.Use(), `.Equal(this.`, fieldname, `[i], that1.`, fieldname, `[i]) {`) + } else if field.IsString() { + p.P(`if this.`, fieldname, `[i] != that1.`, fieldname, `[i] {`) + } else { + p.P(`if this.`, fieldname, `[i] != that1.`, fieldname, `[i] {`) + } + } + p.In() + if verbose { + p.P(`return `, p.fmtPkg.Use(), `.Errorf("`, fieldname, ` this[%v](%v) Not Equal that[%v](%v)", i, this.`, fieldname, `[i], i, that1.`, fieldname, `[i])`) + } else { + p.P(`return false`) + } + p.Out() + p.P(`}`) + p.Out() + p.P(`}`) + } +} + +func (p *plugin) generateMessage(file *generator.FileDescriptor, message *generator.Descriptor, verbose bool) { + ccTypeName := generator.CamelCaseSlice(message.TypeName()) + if verbose { + p.P(`func (this *`, ccTypeName, `) VerboseEqual(that interface{}) error {`) + } else { + p.P(`func (this *`, ccTypeName, `) Equal(that interface{}) bool {`) + } + p.In() + p.generateMsgNullAndTypeCheck(ccTypeName, verbose) + oneofs := make(map[string]struct{}) + + for _, field := range message.Field { + oneof := field.OneofIndex != nil + if oneof { + fieldname := p.GetFieldName(message, field) + if _, ok := oneofs[fieldname]; ok { + continue + } else { + oneofs[fieldname] = struct{}{} + } + p.P(`if that1.`, fieldname, ` == nil {`) + p.In() + p.P(`if this.`, fieldname, ` != nil {`) + p.In() + if verbose { + p.P(`return `, p.fmtPkg.Use(), `.Errorf("this.`, fieldname, ` != nil && that1.`, fieldname, ` == nil")`) + } else { + p.P(`return false`) + } + p.Out() + p.P(`}`) + p.Out() + p.P(`} else if this.`, fieldname, ` == nil {`) + p.In() + if verbose { + p.P(`return `, p.fmtPkg.Use(), `.Errorf("this.`, fieldname, ` == nil && that1.`, fieldname, ` != nil")`) + } else { + p.P(`return false`) + } + p.Out() + if verbose { + p.P(`} else if err := this.`, fieldname, `.VerboseEqual(that1.`, fieldname, `); err != nil {`) + } else { + p.P(`} else if !this.`, fieldname, `.Equal(that1.`, fieldname, `) {`) + } + p.In() + if verbose { + p.P(`return err`) + } else { + p.P(`return false`) + } + p.Out() + p.P(`}`) + } else { + p.generateField(file, message, field, verbose) + } + } + if message.DescriptorProto.HasExtension() { + fieldname := "XXX_extensions" + if gogoproto.HasExtensionsMap(file.FileDescriptorProto, message.DescriptorProto) { + p.P(`for k, v := range this.`, fieldname, ` {`) + p.In() + p.P(`if v2, ok := that1.`, fieldname, `[k]; ok {`) + p.In() + p.P(`if !v.Equal(&v2) {`) + p.In() + if verbose { + p.P(`return `, p.fmtPkg.Use(), `.Errorf("`, fieldname, ` this[%v](%v) Not Equal that[%v](%v)", k, this.`, fieldname, `[k], k, that1.`, fieldname, `[k])`) + } else { + p.P(`return false`) + } + p.Out() + p.P(`}`) + p.Out() + p.P(`} else {`) + p.In() + if verbose { + p.P(`return `, p.fmtPkg.Use(), `.Errorf("`, fieldname, `[%v] Not In that", k)`) + } else { + p.P(`return false`) + } + p.Out() + p.P(`}`) + p.Out() + p.P(`}`) + + p.P(`for k, _ := range that1.`, fieldname, ` {`) + p.In() + p.P(`if _, ok := this.`, fieldname, `[k]; !ok {`) + p.In() + if verbose { + p.P(`return `, p.fmtPkg.Use(), `.Errorf("`, fieldname, `[%v] Not In this", k)`) + } else { + p.P(`return false`) + } + p.Out() + p.P(`}`) + p.Out() + p.P(`}`) + } else { + p.P(`if !`, p.bytesPkg.Use(), `.Equal(this.`, fieldname, `, that1.`, fieldname, `) {`) + p.In() + if verbose { + p.P(`return `, p.fmtPkg.Use(), `.Errorf("`, fieldname, ` this(%v) Not Equal that(%v)", this.`, fieldname, `, that1.`, fieldname, `)`) + } else { + p.P(`return false`) + } + p.Out() + p.P(`}`) + } + } + if gogoproto.HasUnrecognized(file.FileDescriptorProto, message.DescriptorProto) { + fieldname := "XXX_unrecognized" + p.P(`if !`, p.bytesPkg.Use(), `.Equal(this.`, fieldname, `, that1.`, fieldname, `) {`) + p.In() + if verbose { + p.P(`return `, p.fmtPkg.Use(), `.Errorf("`, fieldname, ` this(%v) Not Equal that(%v)", this.`, fieldname, `, that1.`, fieldname, `)`) + } else { + p.P(`return false`) + } + p.Out() + p.P(`}`) + } + if verbose { + p.P(`return nil`) + } else { + p.P(`return true`) + } + p.Out() + p.P(`}`) + + //Generate Equal methods for oneof fields + m := proto.Clone(message.DescriptorProto).(*descriptor.DescriptorProto) + for _, field := range m.Field { + oneof := field.OneofIndex != nil + if !oneof { + continue + } + ccTypeName := p.OneOfTypeName(message, field) + if verbose { + p.P(`func (this *`, ccTypeName, `) VerboseEqual(that interface{}) error {`) + } else { + p.P(`func (this *`, ccTypeName, `) Equal(that interface{}) bool {`) + } + p.In() + + p.generateMsgNullAndTypeCheck(ccTypeName, verbose) + vanity.TurnOffNullableForNativeTypesWithoutDefaultsOnly(field) + p.generateField(file, message, field, verbose) + + if verbose { + p.P(`return nil`) + } else { + p.P(`return true`) + } + p.Out() + p.P(`}`) + } +} + +func init() { + generator.RegisterPlugin(NewPlugin()) +} diff --git a/vendor/github.com/gogo/protobuf/plugin/equal/equaltest.go b/vendor/github.com/gogo/protobuf/plugin/equal/equaltest.go new file mode 100644 index 000000000..2fec83551 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/plugin/equal/equaltest.go @@ -0,0 +1,94 @@ +// Copyright (c) 2013, Vastech SA (PTY) LTD. 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 equal + +import ( + "github.com/gogo/protobuf/gogoproto" + "github.com/gogo/protobuf/plugin/testgen" + "github.com/gogo/protobuf/protoc-gen-gogo/generator" +) + +type test struct { + *generator.Generator +} + +func NewTest(g *generator.Generator) testgen.TestPlugin { + return &test{g} +} + +func (p *test) Generate(imports generator.PluginImports, file *generator.FileDescriptor) bool { + used := false + randPkg := imports.NewImport("math/rand") + timePkg := imports.NewImport("time") + testingPkg := imports.NewImport("testing") + protoPkg := imports.NewImport("github.com/gogo/protobuf/proto") + if !gogoproto.ImportsGoGoProto(file.FileDescriptorProto) { + protoPkg = imports.NewImport("github.com/golang/protobuf/proto") + } + for _, message := range file.Messages() { + ccTypeName := generator.CamelCaseSlice(message.TypeName()) + if !gogoproto.HasVerboseEqual(file.FileDescriptorProto, message.DescriptorProto) { + continue + } + if message.DescriptorProto.GetOptions().GetMapEntry() { + continue + } + + if gogoproto.HasTestGen(file.FileDescriptorProto, message.DescriptorProto) { + used = true + p.P(`func Test`, ccTypeName, `VerboseEqual(t *`, testingPkg.Use(), `.T) {`) + p.In() + p.P(`popr := `, randPkg.Use(), `.New(`, randPkg.Use(), `.NewSource(`, timePkg.Use(), `.Now().UnixNano()))`) + p.P(`p := NewPopulated`, ccTypeName, `(popr, false)`) + p.P(`data, err := `, protoPkg.Use(), `.Marshal(p)`) + p.P(`if err != nil {`) + p.In() + p.P(`panic(err)`) + p.Out() + p.P(`}`) + p.P(`msg := &`, ccTypeName, `{}`) + p.P(`if err := `, protoPkg.Use(), `.Unmarshal(data, msg); err != nil {`) + p.In() + p.P(`panic(err)`) + p.Out() + p.P(`}`) + p.P(`if err := p.VerboseEqual(msg); err != nil {`) + p.In() + p.P(`t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err)`) + p.Out() + p.P(`}`) + p.Out() + p.P(`}`) + } + + } + return used +} + +func init() { + testgen.RegisterTestPlugin(NewTest) +} diff --git a/vendor/github.com/gogo/protobuf/plugin/face/face.go b/vendor/github.com/gogo/protobuf/plugin/face/face.go new file mode 100644 index 000000000..3c0c25b3e --- /dev/null +++ b/vendor/github.com/gogo/protobuf/plugin/face/face.go @@ -0,0 +1,231 @@ +// Copyright (c) 2013, Vastech SA (PTY) LTD. 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. + +/* +The face plugin generates a function will be generated which can convert a structure which satisfies an interface (face) to the specified structure. +This interface contains getters for each of the fields in the struct. +The specified struct is also generated with the getters. +This means that getters should be turned off so as not to conflict with face getters. +This allows it to satisfy its own face. + +It is enabled by the following extensions: + + - face + - face_all + +Turn off getters by using the following extensions: + + - getters + - getters_all + +The face plugin also generates a test given it is enabled using one of the following extensions: + + - testgen + - testgen_all + +Let us look at: + + github.com/gogo/protobuf/test/example/example.proto + +Btw all the output can be seen at: + + github.com/gogo/protobuf/test/example/* + +The following message: + + message A { + option (gogoproto.face) = true; + option (gogoproto.goproto_getters) = false; + 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]; + } + +given to the face plugin, will generate the following code: + + type AFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetDescription() string + GetNumber() int64 + GetId() github_com_gogo_protobuf_test_custom.Uuid + } + + func (this *A) Proto() github_com_gogo_protobuf_proto.Message { + return this + } + + func (this *A) TestProto() github_com_gogo_protobuf_proto.Message { + return NewAFromFace(this) + } + + func (this *A) GetDescription() string { + return this.Description + } + + func (this *A) GetNumber() int64 { + return this.Number + } + + func (this *A) GetId() github_com_gogo_protobuf_test_custom.Uuid { + return this.Id + } + + func NewAFromFace(that AFace) *A { + this := &A{} + this.Description = that.GetDescription() + this.Number = that.GetNumber() + this.Id = that.GetId() + return this + } + +and the following test code: + + func TestAFace(t *testing7.T) { + popr := math_rand7.New(math_rand7.NewSource(time7.Now().UnixNano())) + p := NewPopulatedA(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } + } + +The struct A, representing the message, will also be generated just like always. +As you can see A satisfies its own Face, AFace. + +Creating another struct which satisfies AFace is very easy. +Simply create all these methods specified in AFace. +Implementing The Proto method is done with the helper function NewAFromFace: + + func (this *MyStruct) Proto() proto.Message { + return NewAFromFace(this) + } + +just the like TestProto method which is used to test the NewAFromFace function. + +*/ +package face + +import ( + "github.com/gogo/protobuf/gogoproto" + "github.com/gogo/protobuf/protoc-gen-gogo/generator" +) + +type plugin struct { + *generator.Generator + generator.PluginImports +} + +func NewPlugin() *plugin { + return &plugin{} +} + +func (p *plugin) Name() string { + return "face" +} + +func (p *plugin) Init(g *generator.Generator) { + p.Generator = g +} + +func (p *plugin) Generate(file *generator.FileDescriptor) { + p.PluginImports = generator.NewPluginImports(p.Generator) + protoPkg := p.NewImport("github.com/gogo/protobuf/proto") + if !gogoproto.ImportsGoGoProto(file.FileDescriptorProto) { + protoPkg = p.NewImport("github.com/golang/protobuf/proto") + } + for _, message := range file.Messages() { + if !gogoproto.IsFace(file.FileDescriptorProto, message.DescriptorProto) { + continue + } + if message.DescriptorProto.GetOptions().GetMapEntry() { + continue + } + if message.DescriptorProto.HasExtension() { + panic("face does not support message with extensions") + } + if gogoproto.HasGoGetters(file.FileDescriptorProto, message.DescriptorProto) { + panic("face requires getters to be disabled please use gogoproto.getters or gogoproto.getters_all and set it to false") + } + ccTypeName := generator.CamelCaseSlice(message.TypeName()) + p.P(`type `, ccTypeName, `Face interface{`) + p.In() + p.P(`Proto() `, protoPkg.Use(), `.Message`) + for _, field := range message.Field { + fieldname := p.GetFieldName(message, field) + goTyp, _ := p.GoType(message, field) + if p.IsMap(field) { + m := p.GoMapType(nil, field) + goTyp = m.GoType + } + p.P(`Get`, fieldname, `() `, goTyp) + } + p.Out() + p.P(`}`) + p.P(``) + p.P(`func (this *`, ccTypeName, `) Proto() `, protoPkg.Use(), `.Message {`) + p.In() + p.P(`return this`) + p.Out() + p.P(`}`) + p.P(``) + p.P(`func (this *`, ccTypeName, `) TestProto() `, protoPkg.Use(), `.Message {`) + p.In() + p.P(`return New`, ccTypeName, `FromFace(this)`) + p.Out() + p.P(`}`) + p.P(``) + for _, field := range message.Field { + fieldname := p.GetFieldName(message, field) + goTyp, _ := p.GoType(message, field) + if p.IsMap(field) { + m := p.GoMapType(nil, field) + goTyp = m.GoType + } + p.P(`func (this *`, ccTypeName, `) Get`, fieldname, `() `, goTyp, `{`) + p.In() + p.P(` return this.`, fieldname) + p.Out() + p.P(`}`) + p.P(``) + } + p.P(``) + p.P(`func New`, ccTypeName, `FromFace(that `, ccTypeName, `Face) *`, ccTypeName, ` {`) + p.In() + p.P(`this := &`, ccTypeName, `{}`) + for _, field := range message.Field { + fieldname := p.GetFieldName(message, field) + p.P(`this.`, fieldname, ` = that.Get`, fieldname, `()`) + } + p.P(`return this`) + p.Out() + p.P(`}`) + p.P(``) + } +} + +func init() { + generator.RegisterPlugin(NewPlugin()) +} diff --git a/vendor/github.com/gogo/protobuf/plugin/face/facetest.go b/vendor/github.com/gogo/protobuf/plugin/face/facetest.go new file mode 100644 index 000000000..305e092ef --- /dev/null +++ b/vendor/github.com/gogo/protobuf/plugin/face/facetest.go @@ -0,0 +1,80 @@ +// Copyright (c) 2013, Vastech SA (PTY) LTD. 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 face + +import ( + "github.com/gogo/protobuf/gogoproto" + "github.com/gogo/protobuf/plugin/testgen" + "github.com/gogo/protobuf/protoc-gen-gogo/generator" +) + +type test struct { + *generator.Generator +} + +func NewTest(g *generator.Generator) testgen.TestPlugin { + return &test{g} +} + +func (p *test) Generate(imports generator.PluginImports, file *generator.FileDescriptor) bool { + used := false + randPkg := imports.NewImport("math/rand") + timePkg := imports.NewImport("time") + testingPkg := imports.NewImport("testing") + for _, message := range file.Messages() { + ccTypeName := generator.CamelCaseSlice(message.TypeName()) + if !gogoproto.IsFace(file.FileDescriptorProto, message.DescriptorProto) { + continue + } + if message.DescriptorProto.GetOptions().GetMapEntry() { + continue + } + + if gogoproto.HasTestGen(file.FileDescriptorProto, message.DescriptorProto) { + used = true + + p.P(`func Test`, ccTypeName, `Face(t *`, testingPkg.Use(), `.T) {`) + p.In() + p.P(`popr := `, randPkg.Use(), `.New(`, randPkg.Use(), `.NewSource(`, timePkg.Use(), `.Now().UnixNano()))`) + p.P(`p := NewPopulated`, ccTypeName, `(popr, true)`) + p.P(`msg := p.TestProto()`) + p.P(`if !p.Equal(msg) {`) + p.In() + p.P(`t.Fatalf("%#v !Face Equal %#v", msg, p)`) + p.Out() + p.P(`}`) + p.Out() + p.P(`}`) + } + + } + return used +} + +func init() { + testgen.RegisterTestPlugin(NewTest) +} diff --git a/vendor/github.com/gogo/protobuf/plugin/gostring/gostring.go b/vendor/github.com/gogo/protobuf/plugin/gostring/gostring.go new file mode 100644 index 000000000..0b355fb1e --- /dev/null +++ b/vendor/github.com/gogo/protobuf/plugin/gostring/gostring.go @@ -0,0 +1,360 @@ +// Copyright (c) 2013, Vastech SA (PTY) LTD. 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. + +/* +The gostring plugin generates a GoString method for each message. +The GoString method is called whenever you use a fmt.Printf as such: + + fmt.Printf("%#v", mymessage) + +or whenever you actually call GoString() +The output produced by the GoString method can be copied from the output into code and used to set a variable. +It is totally valid Go Code and is populated exactly as the struct that was printed out. + +It is enabled by the following extensions: + + - gostring + - gostring_all + +The gostring plugin also generates a test given it is enabled using one of the following extensions: + + - testgen + - testgen_all + +Let us look at: + + github.com/gogo/protobuf/test/example/example.proto + +Btw all the output can be seen at: + + github.com/gogo/protobuf/test/example/* + +The following message: + + option (gogoproto.gostring_all) = true; + + 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]; + } + +given to the gostring plugin, will generate the following code: + + func (this *A) GoString() string { + if this == nil { + return "nil" + } + s := strings1.Join([]string{`&test.A{` + `Description:` + fmt1.Sprintf("%#v", this.Description), `Number:` + fmt1.Sprintf("%#v", this.Number), `Id:` + fmt1.Sprintf("%#v", this.Id), `XXX_unrecognized:` + fmt1.Sprintf("%#v", this.XXX_unrecognized) + `}`}, ", ") + return s + } + +and the following test code: + + func TestAGoString(t *testing6.T) { + popr := math_rand6.New(math_rand6.NewSource(time6.Now().UnixNano())) + p := NewPopulatedA(popr, false) + s1 := p.GoString() + s2 := fmt2.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } + } + +Typically fmt.Printf("%#v") will stop to print when it reaches a pointer and +not print their values, while the generated GoString method will always print all values, recursively. + +*/ +package gostring + +import ( + "github.com/gogo/protobuf/gogoproto" + "github.com/gogo/protobuf/protoc-gen-gogo/generator" + "strconv" + "strings" +) + +type gostring struct { + *generator.Generator + generator.PluginImports + atleastOne bool + localName string +} + +func NewGoString() *gostring { + return &gostring{} +} + +func (p *gostring) Name() string { + return "gostring" +} + +func (p *gostring) Init(g *generator.Generator) { + p.Generator = g +} + +func (p *gostring) Generate(file *generator.FileDescriptor) { + proto3 := gogoproto.IsProto3(file.FileDescriptorProto) + p.PluginImports = generator.NewPluginImports(p.Generator) + p.atleastOne = false + + p.localName = generator.FileName(file) + + fmtPkg := p.NewImport("fmt") + stringsPkg := p.NewImport("strings") + protoPkg := p.NewImport("github.com/gogo/protobuf/proto") + if !gogoproto.ImportsGoGoProto(file.FileDescriptorProto) { + protoPkg = p.NewImport("github.com/golang/protobuf/proto") + } + sortPkg := p.NewImport("sort") + strconvPkg := p.NewImport("strconv") + reflectPkg := p.NewImport("reflect") + sortKeysPkg := p.NewImport("github.com/gogo/protobuf/sortkeys") + + for _, message := range file.Messages() { + if !gogoproto.HasGoString(file.FileDescriptorProto, message.DescriptorProto) { + continue + } + if message.DescriptorProto.GetOptions().GetMapEntry() { + continue + } + p.atleastOne = true + packageName := file.PackageName() + + ccTypeName := generator.CamelCaseSlice(message.TypeName()) + p.P(`func (this *`, ccTypeName, `) GoString() string {`) + p.In() + p.P(`if this == nil {`) + p.In() + p.P(`return "nil"`) + p.Out() + p.P(`}`) + + p.P(`s := make([]string, 0, `, strconv.Itoa(len(message.Field)+4), `)`) + p.P(`s = append(s, "&`, packageName, ".", ccTypeName, `{")`) + + oneofs := make(map[string]struct{}) + for _, field := range message.Field { + nullable := gogoproto.IsNullable(field) + repeated := field.IsRepeated() + fieldname := p.GetFieldName(message, field) + oneof := field.OneofIndex != nil + if oneof { + if _, ok := oneofs[fieldname]; ok { + continue + } else { + oneofs[fieldname] = struct{}{} + } + p.P(`if this.`, fieldname, ` != nil {`) + p.In() + p.P(`s = append(s, "`, fieldname, `: " + `, fmtPkg.Use(), `.Sprintf("%#v", this.`, fieldname, `) + ",\n")`) + p.Out() + p.P(`}`) + } else if p.IsMap(field) { + m := p.GoMapType(nil, field) + mapgoTyp, keyField, keyAliasField := m.GoType, m.KeyField, m.KeyAliasField + keysName := `keysFor` + fieldname + keygoTyp, _ := p.GoType(nil, keyField) + keygoTyp = strings.Replace(keygoTyp, "*", "", 1) + keygoAliasTyp, _ := p.GoType(nil, keyAliasField) + keygoAliasTyp = strings.Replace(keygoAliasTyp, "*", "", 1) + keyCapTyp := generator.CamelCase(keygoTyp) + p.P(keysName, ` := make([]`, keygoTyp, `, 0, len(this.`, fieldname, `))`) + p.P(`for k, _ := range this.`, fieldname, ` {`) + p.In() + if keygoAliasTyp == keygoTyp { + p.P(keysName, ` = append(`, keysName, `, k)`) + } else { + p.P(keysName, ` = append(`, keysName, `, `, keygoTyp, `(k))`) + } + p.Out() + p.P(`}`) + p.P(sortKeysPkg.Use(), `.`, keyCapTyp, `s(`, keysName, `)`) + mapName := `mapStringFor` + fieldname + p.P(mapName, ` := "`, mapgoTyp, `{"`) + p.P(`for _, k := range `, keysName, ` {`) + p.In() + if keygoAliasTyp == keygoTyp { + p.P(mapName, ` += fmt.Sprintf("%#v: %#v,", k, this.`, fieldname, `[k])`) + } else { + p.P(mapName, ` += fmt.Sprintf("%#v: %#v,", k, this.`, fieldname, `[`, keygoAliasTyp, `(k)])`) + } + p.Out() + p.P(`}`) + p.P(mapName, ` += "}"`) + p.P(`if this.`, fieldname, ` != nil {`) + p.In() + p.P(`s = append(s, "`, fieldname, `: " + `, mapName, `+ ",\n")`) + p.Out() + p.P(`}`) + } else if field.IsMessage() || p.IsGroup(field) { + if nullable || repeated { + p.P(`if this.`, fieldname, ` != nil {`) + p.In() + } + if nullable || repeated { + p.P(`s = append(s, "`, fieldname, `: " + `, fmtPkg.Use(), `.Sprintf("%#v", this.`, fieldname, `) + ",\n")`) + } else { + p.P(`s = append(s, "`, fieldname, `: " + `, stringsPkg.Use(), `.Replace(this.`, fieldname, `.GoString()`, ",`&`,``,1)", ` + ",\n")`) + } + if nullable || repeated { + p.Out() + p.P(`}`) + } + } else { + if !proto3 && (nullable || repeated) { + p.P(`if this.`, fieldname, ` != nil {`) + p.In() + } + if field.IsEnum() { + if nullable && !repeated && !proto3 { + goTyp, _ := p.GoType(message, field) + p.P(`s = append(s, "`, fieldname, `: " + valueToGoString`, p.localName, `(this.`, fieldname, `,"`, packageName, ".", generator.GoTypeToName(goTyp), `"`, `) + ",\n")`) + } else { + p.P(`s = append(s, "`, fieldname, `: " + `, fmtPkg.Use(), `.Sprintf("%#v", this.`, fieldname, `) + ",\n")`) + } + } else { + if nullable && !repeated && !proto3 { + goTyp, _ := p.GoType(message, field) + p.P(`s = append(s, "`, fieldname, `: " + valueToGoString`, p.localName, `(this.`, fieldname, `,"`, generator.GoTypeToName(goTyp), `"`, `) + ",\n")`) + } else { + p.P(`s = append(s, "`, fieldname, `: " + `, fmtPkg.Use(), `.Sprintf("%#v", this.`, fieldname, `) + ",\n")`) + } + } + if !proto3 && (nullable || repeated) { + p.Out() + p.P(`}`) + } + } + } + if message.DescriptorProto.HasExtension() { + p.P(`if this.XXX_extensions != nil {`) + p.In() + if gogoproto.HasExtensionsMap(file.FileDescriptorProto, message.DescriptorProto) { + p.P(`s = append(s, "XXX_extensions: " + extensionToGoString`, p.localName, `(this.XXX_extensions) + ",\n")`) + } else { + p.P(`s = append(s, "XXX_extensions: " + `, fmtPkg.Use(), `.Sprintf("%#v", this.XXX_extensions) + ",\n")`) + } + p.Out() + p.P(`}`) + } + if gogoproto.HasUnrecognized(file.FileDescriptorProto, message.DescriptorProto) { + p.P(`if this.XXX_unrecognized != nil {`) + p.In() + p.P(`s = append(s, "XXX_unrecognized:" + `, fmtPkg.Use(), `.Sprintf("%#v", this.XXX_unrecognized) + ",\n")`) + p.Out() + p.P(`}`) + } + + p.P(`s = append(s, "}")`) + //outStr += strings.Join([]string{" + `}`", `}`, `,", "`, ")"}, "") + p.P(`return `, stringsPkg.Use(), `.Join(s, "")`) + p.Out() + p.P(`}`) + + //Generate GoString methods for oneof fields + for _, field := range message.Field { + oneof := field.OneofIndex != nil + if !oneof { + continue + } + ccTypeName := p.OneOfTypeName(message, field) + p.P(`func (this *`, ccTypeName, `) GoString() string {`) + p.In() + p.P(`if this == nil {`) + p.In() + p.P(`return "nil"`) + p.Out() + p.P(`}`) + outFlds := []string{} + fieldname := p.GetOneOfFieldName(message, field) + if field.IsMessage() || p.IsGroup(field) { + tmp := strings.Join([]string{"`", fieldname, ":` + "}, "") + tmp += strings.Join([]string{fmtPkg.Use(), `.Sprintf("%#v", this.`, fieldname, `)`}, "") + outFlds = append(outFlds, tmp) + } else { + tmp := strings.Join([]string{"`", fieldname, ":` + "}, "") + tmp += strings.Join([]string{fmtPkg.Use(), `.Sprintf("%#v", this.`, fieldname, ")"}, "") + outFlds = append(outFlds, tmp) + } + outStr := strings.Join([]string{"s := ", stringsPkg.Use(), ".Join([]string{`&", packageName, ".", ccTypeName, "{` + \n"}, "") + outStr += strings.Join(outFlds, ",\n") + outStr += strings.Join([]string{" + `}`", `}`, `,", "`, ")"}, "") + p.P(outStr) + p.P(`return s`) + p.Out() + p.P(`}`) + } + } + + if !p.atleastOne { + return + } + + p.P(`func valueToGoString`, p.localName, `(v interface{}, typ string) string {`) + p.In() + p.P(`rv := `, reflectPkg.Use(), `.ValueOf(v)`) + p.P(`if rv.IsNil() {`) + p.In() + p.P(`return "nil"`) + p.Out() + p.P(`}`) + p.P(`pv := `, reflectPkg.Use(), `.Indirect(rv).Interface()`) + p.P(`return `, fmtPkg.Use(), `.Sprintf("func(v %v) *%v { return &v } ( %#v )", typ, typ, pv)`) + p.Out() + p.P(`}`) + + p.P(`func extensionToGoString`, p.localName, `(e map[int32]`, protoPkg.Use(), `.Extension) string {`) + p.In() + p.P(`if e == nil { return "nil" }`) + p.P(`s := "map[int32]proto.Extension{"`) + p.P(`keys := make([]int, 0, len(e))`) + p.P(`for k := range e {`) + p.In() + p.P(`keys = append(keys, int(k))`) + p.Out() + p.P(`}`) + p.P(sortPkg.Use(), `.Ints(keys)`) + p.P(`ss := []string{}`) + p.P(`for _, k := range keys {`) + p.In() + p.P(`ss = append(ss, `, strconvPkg.Use(), `.Itoa(k) + ": " + e[int32(k)].GoString())`) + p.Out() + p.P(`}`) + p.P(`s+=`, stringsPkg.Use(), `.Join(ss, ",") + "}"`) + p.P(`return s`) + p.Out() + p.P(`}`) + +} + +func init() { + generator.RegisterPlugin(NewGoString()) +} diff --git a/vendor/github.com/gogo/protobuf/plugin/gostring/gostringtest.go b/vendor/github.com/gogo/protobuf/plugin/gostring/gostringtest.go new file mode 100644 index 000000000..539774905 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/plugin/gostring/gostringtest.go @@ -0,0 +1,88 @@ +// Copyright (c) 2013, Vastech SA (PTY) LTD. 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 gostring + +import ( + "github.com/gogo/protobuf/gogoproto" + "github.com/gogo/protobuf/plugin/testgen" + "github.com/gogo/protobuf/protoc-gen-gogo/generator" +) + +type test struct { + *generator.Generator +} + +func NewTest(g *generator.Generator) testgen.TestPlugin { + return &test{g} +} + +func (p *test) Generate(imports generator.PluginImports, file *generator.FileDescriptor) bool { + used := false + randPkg := imports.NewImport("math/rand") + timePkg := imports.NewImport("time") + testingPkg := imports.NewImport("testing") + fmtPkg := imports.NewImport("fmt") + parserPkg := imports.NewImport("go/parser") + for _, message := range file.Messages() { + ccTypeName := generator.CamelCaseSlice(message.TypeName()) + if !gogoproto.HasGoString(file.FileDescriptorProto, message.DescriptorProto) { + continue + } + if message.DescriptorProto.GetOptions().GetMapEntry() { + continue + } + + if gogoproto.HasTestGen(file.FileDescriptorProto, message.DescriptorProto) { + used = true + p.P(`func Test`, ccTypeName, `GoString(t *`, testingPkg.Use(), `.T) {`) + p.In() + p.P(`popr := `, randPkg.Use(), `.New(`, randPkg.Use(), `.NewSource(`, timePkg.Use(), `.Now().UnixNano()))`) + p.P(`p := NewPopulated`, ccTypeName, `(popr, false)`) + p.P(`s1 := p.GoString()`) + p.P(`s2 := `, fmtPkg.Use(), `.Sprintf("%#v", p)`) + p.P(`if s1 != s2 {`) + p.In() + p.P(`t.Fatalf("GoString want %v got %v", s1, s2)`) + p.Out() + p.P(`}`) + p.P(`_, err := `, parserPkg.Use(), `.ParseExpr(s1)`) + p.P(`if err != nil {`) + p.In() + p.P(`panic(err)`) + p.Out() + p.P(`}`) + p.Out() + p.P(`}`) + } + + } + return used +} + +func init() { + testgen.RegisterTestPlugin(NewTest) +} diff --git a/vendor/github.com/gogo/protobuf/plugin/grpc/grpc.go b/vendor/github.com/gogo/protobuf/plugin/grpc/grpc.go new file mode 100644 index 000000000..dab022ffe --- /dev/null +++ b/vendor/github.com/gogo/protobuf/plugin/grpc/grpc.go @@ -0,0 +1,462 @@ +// Go support for Protocol Buffers - Google's data interchange format +// +// Copyright 2015 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 grpc outputs gRPC service descriptions in Go code. +// It runs as a plugin for the Go protocol buffer compiler plugin. +// It is linked in to protoc-gen-go. +package grpc + +import ( + "fmt" + "path" + "strconv" + "strings" + + pb "github.com/gogo/protobuf/protoc-gen-gogo/descriptor" + "github.com/gogo/protobuf/protoc-gen-gogo/generator" +) + +// generatedCodeVersion indicates a version of the generated code. +// It is incremented whenever an incompatibility between the generated code and +// the grpc package is introduced; the generated code references +// a constant, grpc.SupportPackageIsVersionN (where N is generatedCodeVersion). +const generatedCodeVersion = 2 + +// Paths for packages used by code generated in this file, +// relative to the import_prefix of the generator.Generator. +const ( + contextPkgPath = "golang.org/x/net/context" + grpcPkgPath = "google.golang.org/grpc" +) + +func init() { + generator.RegisterPlugin(new(grpc)) +} + +// grpc is an implementation of the Go protocol buffer compiler's +// plugin architecture. It generates bindings for gRPC support. +type grpc struct { + gen *generator.Generator +} + +// Name returns the name of this plugin, "grpc". +func (g *grpc) Name() string { + return "grpc" +} + +// The names for packages imported in the generated code. +// They may vary from the final path component of the import path +// if the name is used by other packages. +var ( + contextPkg string + grpcPkg string +) + +// Init initializes the plugin. +func (g *grpc) Init(gen *generator.Generator) { + g.gen = gen + contextPkg = generator.RegisterUniquePackageName("context", nil) + grpcPkg = generator.RegisterUniquePackageName("grpc", nil) +} + +// Given a type name defined in a .proto, return its object. +// Also record that we're using it, to guarantee the associated import. +func (g *grpc) objectNamed(name string) generator.Object { + g.gen.RecordTypeUse(name) + return g.gen.ObjectNamed(name) +} + +// Given a type name defined in a .proto, return its name as we will print it. +func (g *grpc) typeName(str string) string { + return g.gen.TypeName(g.objectNamed(str)) +} + +// P forwards to g.gen.P. +func (g *grpc) P(args ...interface{}) { g.gen.P(args...) } + +// Generate generates code for the services in the given file. +func (g *grpc) Generate(file *generator.FileDescriptor) { + if len(file.FileDescriptorProto.Service) == 0 { + return + } + + g.P("// Reference imports to suppress errors if they are not otherwise used.") + g.P("var _ ", contextPkg, ".Context") + g.P("var _ ", grpcPkg, ".ClientConn") + g.P() + + // Assert version compatibility. + g.P("// This is a compile-time assertion to ensure that this generated file") + g.P("// is compatible with the grpc package it is being compiled against.") + g.P("const _ = ", grpcPkg, ".SupportPackageIsVersion", generatedCodeVersion) + g.P() + + for i, service := range file.FileDescriptorProto.Service { + g.generateService(file, service, i) + } +} + +// GenerateImports generates the import declaration for this file. +func (g *grpc) GenerateImports(file *generator.FileDescriptor) { + if len(file.FileDescriptorProto.Service) == 0 { + return + } + g.P("import (") + g.P(contextPkg, " ", strconv.Quote(path.Join(g.gen.ImportPrefix, contextPkgPath))) + g.P(grpcPkg, " ", strconv.Quote(path.Join(g.gen.ImportPrefix, grpcPkgPath))) + g.P(")") + g.P() +} + +// reservedClientName records whether a client name is reserved on the client side. +var reservedClientName = map[string]bool{ +// TODO: do we need any in gRPC? +} + +func unexport(s string) string { return strings.ToLower(s[:1]) + s[1:] } + +// generateService generates all the code for the named service. +func (g *grpc) generateService(file *generator.FileDescriptor, service *pb.ServiceDescriptorProto, index int) { + path := fmt.Sprintf("6,%d", index) // 6 means service. + + origServName := service.GetName() + fullServName := origServName + if pkg := file.GetPackage(); pkg != "" { + fullServName = pkg + "." + fullServName + } + servName := generator.CamelCase(origServName) + + g.P() + g.P("// Client API for ", servName, " service") + g.P() + + // Client interface. + g.P("type ", servName, "Client interface {") + for i, method := range service.Method { + g.gen.PrintComments(fmt.Sprintf("%s,2,%d", path, i)) // 2 means method in a service. + g.P(g.generateClientSignature(servName, method)) + } + g.P("}") + g.P() + + // Client structure. + g.P("type ", unexport(servName), "Client struct {") + g.P("cc *", grpcPkg, ".ClientConn") + g.P("}") + g.P() + + // NewClient factory. + g.P("func New", servName, "Client (cc *", grpcPkg, ".ClientConn) ", servName, "Client {") + g.P("return &", unexport(servName), "Client{cc}") + g.P("}") + g.P() + + var methodIndex, streamIndex int + serviceDescVar := "_" + servName + "_serviceDesc" + // Client method implementations. + for _, method := range service.Method { + var descExpr string + if !method.GetServerStreaming() && !method.GetClientStreaming() { + // Unary RPC method + descExpr = fmt.Sprintf("&%s.Methods[%d]", serviceDescVar, methodIndex) + methodIndex++ + } else { + // Streaming RPC method + descExpr = fmt.Sprintf("&%s.Streams[%d]", serviceDescVar, streamIndex) + streamIndex++ + } + g.generateClientMethod(servName, fullServName, serviceDescVar, method, descExpr) + } + + g.P("// Server API for ", servName, " service") + g.P() + + // Server interface. + serverType := servName + "Server" + g.P("type ", serverType, " interface {") + for i, method := range service.Method { + g.gen.PrintComments(fmt.Sprintf("%s,2,%d", path, i)) // 2 means method in a service. + g.P(g.generateServerSignature(servName, method)) + } + g.P("}") + g.P() + + // Server registration. + g.P("func Register", servName, "Server(s *", grpcPkg, ".Server, srv ", serverType, ") {") + g.P("s.RegisterService(&", serviceDescVar, `, srv)`) + g.P("}") + g.P() + + // Server handler implementations. + var handlerNames []string + for _, method := range service.Method { + hname := g.generateServerMethod(servName, fullServName, method) + handlerNames = append(handlerNames, hname) + } + + // Service descriptor. + g.P("var ", serviceDescVar, " = ", grpcPkg, ".ServiceDesc {") + g.P("ServiceName: ", strconv.Quote(fullServName), ",") + g.P("HandlerType: (*", serverType, ")(nil),") + g.P("Methods: []", grpcPkg, ".MethodDesc{") + for i, method := range service.Method { + if method.GetServerStreaming() || method.GetClientStreaming() { + continue + } + g.P("{") + g.P("MethodName: ", strconv.Quote(method.GetName()), ",") + g.P("Handler: ", handlerNames[i], ",") + g.P("},") + } + g.P("},") + g.P("Streams: []", grpcPkg, ".StreamDesc{") + for i, method := range service.Method { + if !method.GetServerStreaming() && !method.GetClientStreaming() { + continue + } + g.P("{") + g.P("StreamName: ", strconv.Quote(method.GetName()), ",") + g.P("Handler: ", handlerNames[i], ",") + if method.GetServerStreaming() { + g.P("ServerStreams: true,") + } + if method.GetClientStreaming() { + g.P("ClientStreams: true,") + } + g.P("},") + } + g.P("},") + g.P("}") + g.P() +} + +// generateClientSignature returns the client-side signature for a method. +func (g *grpc) generateClientSignature(servName string, method *pb.MethodDescriptorProto) string { + origMethName := method.GetName() + methName := generator.CamelCase(origMethName) + if reservedClientName[methName] { + methName += "_" + } + reqArg := ", in *" + g.typeName(method.GetInputType()) + if method.GetClientStreaming() { + reqArg = "" + } + respName := "*" + g.typeName(method.GetOutputType()) + if method.GetServerStreaming() || method.GetClientStreaming() { + respName = servName + "_" + generator.CamelCase(origMethName) + "Client" + } + return fmt.Sprintf("%s(ctx %s.Context%s, opts ...%s.CallOption) (%s, error)", methName, contextPkg, reqArg, grpcPkg, respName) +} + +func (g *grpc) generateClientMethod(servName, fullServName, serviceDescVar string, method *pb.MethodDescriptorProto, descExpr string) { + sname := fmt.Sprintf("/%s/%s", fullServName, method.GetName()) + methName := generator.CamelCase(method.GetName()) + inType := g.typeName(method.GetInputType()) + outType := g.typeName(method.GetOutputType()) + + g.P("func (c *", unexport(servName), "Client) ", g.generateClientSignature(servName, method), "{") + if !method.GetServerStreaming() && !method.GetClientStreaming() { + g.P("out := new(", outType, ")") + // TODO: Pass descExpr to Invoke. + g.P("err := ", grpcPkg, `.Invoke(ctx, "`, sname, `", in, out, c.cc, opts...)`) + g.P("if err != nil { return nil, err }") + g.P("return out, nil") + g.P("}") + g.P() + return + } + streamType := unexport(servName) + methName + "Client" + g.P("stream, err := ", grpcPkg, ".NewClientStream(ctx, ", descExpr, `, c.cc, "`, sname, `", opts...)`) + g.P("if err != nil { return nil, err }") + g.P("x := &", streamType, "{stream}") + if !method.GetClientStreaming() { + g.P("if err := x.ClientStream.SendMsg(in); err != nil { return nil, err }") + g.P("if err := x.ClientStream.CloseSend(); err != nil { return nil, err }") + } + g.P("return x, nil") + g.P("}") + g.P() + + genSend := method.GetClientStreaming() + genRecv := method.GetServerStreaming() + genCloseAndRecv := !method.GetServerStreaming() + + // Stream auxiliary types and methods. + g.P("type ", servName, "_", methName, "Client interface {") + if genSend { + g.P("Send(*", inType, ") error") + } + if genRecv { + g.P("Recv() (*", outType, ", error)") + } + if genCloseAndRecv { + g.P("CloseAndRecv() (*", outType, ", error)") + } + g.P(grpcPkg, ".ClientStream") + g.P("}") + g.P() + + g.P("type ", streamType, " struct {") + g.P(grpcPkg, ".ClientStream") + g.P("}") + g.P() + + if genSend { + g.P("func (x *", streamType, ") Send(m *", inType, ") error {") + g.P("return x.ClientStream.SendMsg(m)") + g.P("}") + g.P() + } + if genRecv { + g.P("func (x *", streamType, ") Recv() (*", outType, ", error) {") + g.P("m := new(", outType, ")") + g.P("if err := x.ClientStream.RecvMsg(m); err != nil { return nil, err }") + g.P("return m, nil") + g.P("}") + g.P() + } + if genCloseAndRecv { + g.P("func (x *", streamType, ") CloseAndRecv() (*", outType, ", error) {") + g.P("if err := x.ClientStream.CloseSend(); err != nil { return nil, err }") + g.P("m := new(", outType, ")") + g.P("if err := x.ClientStream.RecvMsg(m); err != nil { return nil, err }") + g.P("return m, nil") + g.P("}") + g.P() + } +} + +// generateServerSignature returns the server-side signature for a method. +func (g *grpc) generateServerSignature(servName string, method *pb.MethodDescriptorProto) string { + origMethName := method.GetName() + methName := generator.CamelCase(origMethName) + if reservedClientName[methName] { + methName += "_" + } + + var reqArgs []string + ret := "error" + if !method.GetServerStreaming() && !method.GetClientStreaming() { + reqArgs = append(reqArgs, contextPkg+".Context") + ret = "(*" + g.typeName(method.GetOutputType()) + ", error)" + } + if !method.GetClientStreaming() { + reqArgs = append(reqArgs, "*"+g.typeName(method.GetInputType())) + } + if method.GetServerStreaming() || method.GetClientStreaming() { + reqArgs = append(reqArgs, servName+"_"+generator.CamelCase(origMethName)+"Server") + } + + return methName + "(" + strings.Join(reqArgs, ", ") + ") " + ret +} + +func (g *grpc) generateServerMethod(servName, fullServName string, method *pb.MethodDescriptorProto) string { + methName := generator.CamelCase(method.GetName()) + hname := fmt.Sprintf("_%s_%s_Handler", servName, methName) + inType := g.typeName(method.GetInputType()) + outType := g.typeName(method.GetOutputType()) + + if !method.GetServerStreaming() && !method.GetClientStreaming() { + g.P("func ", hname, "(srv interface{}, ctx ", contextPkg, ".Context, dec func(interface{}) error, interceptor ", grpcPkg, ".UnaryServerInterceptor) (interface{}, error) {") + g.P("in := new(", inType, ")") + g.P("if err := dec(in); err != nil { return nil, err }") + g.P("if interceptor == nil { return srv.(", servName, "Server).", methName, "(ctx, in) }") + g.P("info := &", grpcPkg, ".UnaryServerInfo{") + g.P("Server: srv,") + g.P("FullMethod: ", strconv.Quote(fmt.Sprintf("/%s/%s", fullServName, methName)), ",") + g.P("}") + g.P("handler := func(ctx ", contextPkg, ".Context, req interface{}) (interface{}, error) {") + g.P("return srv.(", servName, "Server).", methName, "(ctx, req.(*", inType, "))") + g.P("}") + g.P("return interceptor(ctx, in, info, handler)") + g.P("}") + g.P() + return hname + } + streamType := unexport(servName) + methName + "Server" + g.P("func ", hname, "(srv interface{}, stream ", grpcPkg, ".ServerStream) error {") + if !method.GetClientStreaming() { + g.P("m := new(", inType, ")") + g.P("if err := stream.RecvMsg(m); err != nil { return err }") + g.P("return srv.(", servName, "Server).", methName, "(m, &", streamType, "{stream})") + } else { + g.P("return srv.(", servName, "Server).", methName, "(&", streamType, "{stream})") + } + g.P("}") + g.P() + + genSend := method.GetServerStreaming() + genSendAndClose := !method.GetServerStreaming() + genRecv := method.GetClientStreaming() + + // Stream auxiliary types and methods. + g.P("type ", servName, "_", methName, "Server interface {") + if genSend { + g.P("Send(*", outType, ") error") + } + if genSendAndClose { + g.P("SendAndClose(*", outType, ") error") + } + if genRecv { + g.P("Recv() (*", inType, ", error)") + } + g.P(grpcPkg, ".ServerStream") + g.P("}") + g.P() + + g.P("type ", streamType, " struct {") + g.P(grpcPkg, ".ServerStream") + g.P("}") + g.P() + + if genSend { + g.P("func (x *", streamType, ") Send(m *", outType, ") error {") + g.P("return x.ServerStream.SendMsg(m)") + g.P("}") + g.P() + } + if genSendAndClose { + g.P("func (x *", streamType, ") SendAndClose(m *", outType, ") error {") + g.P("return x.ServerStream.SendMsg(m)") + g.P("}") + g.P() + } + if genRecv { + g.P("func (x *", streamType, ") Recv() (*", inType, ", error) {") + g.P("m := new(", inType, ")") + g.P("if err := x.ServerStream.RecvMsg(m); err != nil { return nil, err }") + g.P("return m, nil") + g.P("}") + g.P() + } + + return hname +} diff --git a/vendor/github.com/gogo/protobuf/plugin/marshalto/marshalto.go b/vendor/github.com/gogo/protobuf/plugin/marshalto/marshalto.go new file mode 100644 index 000000000..27a4dfb64 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/plugin/marshalto/marshalto.go @@ -0,0 +1,1323 @@ +// Copyright (c) 2013, Vastech SA (PTY) LTD. 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. + +/* +The marshalto plugin generates a Marshal and MarshalTo method for each message. +The `Marshal() ([]byte, error)` method results in the fact that the message +implements the Marshaler interface. +This allows proto.Marshal to be faster by calling the generated Marshal method rather than using reflect to Marshal the struct. + +If is enabled by the following extensions: + + - marshaler + - marshaler_all + +Or the following extensions: + + - unsafe_marshaler + - unsafe_marshaler_all + +That is if you want to use the unsafe package in your generated code. +The speed up using the unsafe package is not very significant. + +The generation of marshalling tests are enabled using one of the following extensions: + + - testgen + - testgen_all + +And benchmarks given it is enabled using one of the following extensions: + + - benchgen + - benchgen_all + +Let us look at: + + github.com/gogo/protobuf/test/example/example.proto + +Btw all the output can be seen at: + + github.com/gogo/protobuf/test/example/* + +The following message: + +option (gogoproto.marshaler_all) = true; + +message B { + option (gogoproto.description) = true; + 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]; +} + +given to the marshalto plugin, will generate the following code: + + func (m *B) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil + } + + func (m *B) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + data[i] = 0xa + i++ + i = encodeVarintExample(data, i, uint64(m.A.Size())) + n2, err := m.A.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n2 + if len(m.G) > 0 { + for _, msg := range m.G { + data[i] = 0x12 + i++ + i = encodeVarintExample(data, i, uint64(msg.Size())) + n, err := msg.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n + } + } + if m.XXX_unrecognized != nil { + i += copy(data[i:], m.XXX_unrecognized) + } + return i, nil + } + +As shown above Marshal calculates the size of the not yet marshalled message +and allocates the appropriate buffer. +This is followed by calling the MarshalTo method which requires a preallocated buffer. +The MarshalTo method allows a user to rather preallocated a reusable buffer. + +The Size method is generated using the size plugin and the gogoproto.sizer, gogoproto.sizer_all extensions. +The user can also using the generated Size method to check that his reusable buffer is still big enough. + +The generated tests and benchmarks will keep you safe and show that this is really a significant speed improvement. + +An additional message-level option `stable_marshaler` (and the file-level +option `stable_marshaler_all`) exists which causes the generated marshalling +code to behave deterministically. Today, this only changes the serialization of +maps; they are serialized in sort order. +*/ +package marshalto + +import ( + "fmt" + "sort" + "strconv" + "strings" + + "github.com/gogo/protobuf/gogoproto" + "github.com/gogo/protobuf/proto" + descriptor "github.com/gogo/protobuf/protoc-gen-gogo/descriptor" + "github.com/gogo/protobuf/protoc-gen-gogo/generator" + "github.com/gogo/protobuf/vanity" +) + +type NumGen interface { + Next() string + Current() string +} + +type numGen struct { + index int +} + +func NewNumGen() NumGen { + return &numGen{0} +} + +func (this *numGen) Next() string { + this.index++ + return this.Current() +} + +func (this *numGen) Current() string { + return strconv.Itoa(this.index) +} + +type marshalto struct { + *generator.Generator + generator.PluginImports + atleastOne bool + unsafePkg generator.Single + errorsPkg generator.Single + protoPkg generator.Single + sortKeysPkg generator.Single + mathPkg generator.Single + localName string + unsafe bool +} + +func NewMarshal() *marshalto { + return &marshalto{} +} + +func NewUnsafeMarshal() *marshalto { + return &marshalto{unsafe: true} +} + +func (p *marshalto) Name() string { + if p.unsafe { + return "unsafemarshaler" + } + return "marshalto" +} + +func (p *marshalto) Init(g *generator.Generator) { + p.Generator = g +} + +func (p *marshalto) callFixed64(varName ...string) { + p.P(`i = encodeFixed64`, p.localName, `(data, i, uint64(`, strings.Join(varName, ""), `))`) +} + +func (p *marshalto) callFixed32(varName ...string) { + p.P(`i = encodeFixed32`, p.localName, `(data, i, uint32(`, strings.Join(varName, ""), `))`) +} + +func (p *marshalto) callVarint(varName ...string) { + p.P(`i = encodeVarint`, p.localName, `(data, i, uint64(`, strings.Join(varName, ""), `))`) +} + +func (p *marshalto) encodeVarint(varName string) { + p.P(`for `, varName, ` >= 1<<7 {`) + p.In() + p.P(`data[i] = uint8(uint64(`, varName, `)&0x7f|0x80)`) + p.P(varName, ` >>= 7`) + p.P(`i++`) + p.Out() + p.P(`}`) + p.P(`data[i] = uint8(`, varName, `)`) + p.P(`i++`) +} + +func (p *marshalto) encodeFixed64(varName string) { + p.P(`data[i] = uint8(`, varName, `)`) + p.P(`i++`) + p.P(`data[i] = uint8(`, varName, ` >> 8)`) + p.P(`i++`) + p.P(`data[i] = uint8(`, varName, ` >> 16)`) + p.P(`i++`) + p.P(`data[i] = uint8(`, varName, ` >> 24)`) + p.P(`i++`) + p.P(`data[i] = uint8(`, varName, ` >> 32)`) + p.P(`i++`) + p.P(`data[i] = uint8(`, varName, ` >> 40)`) + p.P(`i++`) + p.P(`data[i] = uint8(`, varName, ` >> 48)`) + p.P(`i++`) + p.P(`data[i] = uint8(`, varName, ` >> 56)`) + p.P(`i++`) +} + +func (p *marshalto) unsafeFixed64(varName string, someType string) { + p.P(`*(*`, someType, `)(`, p.unsafePkg.Use(), `.Pointer(&data[i])) = `, varName) + p.P(`i+=8`) +} + +func (p *marshalto) encodeFixed32(varName string) { + p.P(`data[i] = uint8(`, varName, `)`) + p.P(`i++`) + p.P(`data[i] = uint8(`, varName, ` >> 8)`) + p.P(`i++`) + p.P(`data[i] = uint8(`, varName, ` >> 16)`) + p.P(`i++`) + p.P(`data[i] = uint8(`, varName, ` >> 24)`) + p.P(`i++`) +} + +func (p *marshalto) unsafeFixed32(varName string, someType string) { + p.P(`*(*`, someType, `)(`, p.unsafePkg.Use(), `.Pointer(&data[i])) = `, varName) + p.P(`i+=4`) +} + +func (p *marshalto) encodeKey(fieldNumber int32, wireType int) { + x := uint32(fieldNumber)<<3 | uint32(wireType) + 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)) + for _, b := range keybuf { + p.P(`data[i] = `, fmt.Sprintf("%#v", b)) + p.P(`i++`) + } +} + +func keySize(fieldNumber int32, wireType int) int { + x := uint32(fieldNumber)<<3 | uint32(wireType) + size := 0 + for size = 0; x > 127; size++ { + x >>= 7 + } + size++ + return size +} + +func wireToType(wire string) int { + switch wire { + case "fixed64": + return proto.WireFixed64 + case "fixed32": + return proto.WireFixed32 + case "varint": + return proto.WireVarint + case "bytes": + return proto.WireBytes + case "group": + return proto.WireBytes + case "zigzag32": + return proto.WireVarint + case "zigzag64": + return proto.WireVarint + } + panic("unreachable") +} + +func (p *marshalto) mapField(numGen NumGen, fieldTyp descriptor.FieldDescriptorProto_Type, varName string, protoSizer bool) { + switch fieldTyp { + case descriptor.FieldDescriptorProto_TYPE_DOUBLE: + p.callFixed64(p.mathPkg.Use(), `.Float64bits(float64(`, varName, `))`) + case descriptor.FieldDescriptorProto_TYPE_FLOAT: + p.callFixed32(p.mathPkg.Use(), `.Float32bits(float32(`, varName, `))`) + case descriptor.FieldDescriptorProto_TYPE_INT64, + descriptor.FieldDescriptorProto_TYPE_UINT64, + descriptor.FieldDescriptorProto_TYPE_INT32, + descriptor.FieldDescriptorProto_TYPE_UINT32, + descriptor.FieldDescriptorProto_TYPE_ENUM: + p.callVarint(varName) + case descriptor.FieldDescriptorProto_TYPE_FIXED64, + descriptor.FieldDescriptorProto_TYPE_SFIXED64: + p.callFixed64(varName) + case descriptor.FieldDescriptorProto_TYPE_FIXED32, + descriptor.FieldDescriptorProto_TYPE_SFIXED32: + p.callFixed32(varName) + case descriptor.FieldDescriptorProto_TYPE_BOOL: + p.P(`if `, varName, ` {`) + p.In() + p.P(`data[i] = 1`) + p.Out() + p.P(`} else {`) + p.In() + p.P(`data[i] = 0`) + p.Out() + p.P(`}`) + p.P(`i++`) + case descriptor.FieldDescriptorProto_TYPE_STRING, + descriptor.FieldDescriptorProto_TYPE_BYTES: + p.callVarint(`len(`, varName, `)`) + p.P(`i+=copy(data[i:], `, varName, `)`) + case descriptor.FieldDescriptorProto_TYPE_SINT32: + p.callVarint(`(uint32(`, varName, `) << 1) ^ uint32((`, varName, ` >> 31))`) + case descriptor.FieldDescriptorProto_TYPE_SINT64: + p.callVarint(`(uint64(`, varName, `) << 1) ^ uint64((`, varName, ` >> 63))`) + case descriptor.FieldDescriptorProto_TYPE_MESSAGE: + if protoSizer { + p.callVarint(varName, `.ProtoSize()`) + } else { + p.callVarint(varName, `.Size()`) + } + p.P(`n`, numGen.Next(), `, err := `, varName, `.MarshalTo(data[i:])`) + p.P(`if err != nil {`) + p.In() + p.P(`return 0, err`) + p.Out() + p.P(`}`) + p.P(`i+=n`, numGen.Current()) + } +} + +type orderFields []*descriptor.FieldDescriptorProto + +func (this orderFields) Len() int { + return len(this) +} + +func (this orderFields) Less(i, j int) bool { + return this[i].GetNumber() < this[j].GetNumber() +} + +func (this orderFields) Swap(i, j int) { + this[i], this[j] = this[j], this[i] +} + +func (p *marshalto) generateField(proto3 bool, numGen NumGen, file *generator.FileDescriptor, message *generator.Descriptor, field *descriptor.FieldDescriptorProto) { + fieldname := p.GetOneOfFieldName(message, field) + nullable := gogoproto.IsNullable(field) + repeated := field.IsRepeated() + required := field.IsRequired() + + protoSizer := gogoproto.IsProtoSizer(file.FileDescriptorProto, message.DescriptorProto) + doNilCheck := gogoproto.NeedsNilCheck(proto3, field) + if required && nullable { + p.P(`if m.`, fieldname, `== nil {`) + p.In() + if !gogoproto.ImportsGoGoProto(file.FileDescriptorProto) { + p.P(`return 0, new(`, p.protoPkg.Use(), `.RequiredNotSetError)`) + } else { + p.P(`return 0, `, p.protoPkg.Use(), `.NewRequiredNotSetError("`, field.GetName(), `")`) + } + p.Out() + p.P(`} else {`) + } else if repeated { + p.P(`if len(m.`, fieldname, `) > 0 {`) + p.In() + } else if doNilCheck { + p.P(`if m.`, fieldname, ` != nil {`) + p.In() + } + packed := field.IsPacked() + wireType := field.WireType() + fieldNumber := field.GetNumber() + if packed { + wireType = proto.WireBytes + } + switch *field.Type { + case descriptor.FieldDescriptorProto_TYPE_DOUBLE: + if !p.unsafe || gogoproto.IsCastType(field) { + if packed { + p.encodeKey(fieldNumber, wireType) + p.callVarint(`len(m.`, fieldname, `) * 8`) + p.P(`for _, num := range m.`, fieldname, ` {`) + p.In() + p.P(`f`, numGen.Next(), ` := `, p.mathPkg.Use(), `.Float64bits(float64(num))`) + p.encodeFixed64("f" + numGen.Current()) + p.Out() + p.P(`}`) + } else if repeated { + p.P(`for _, num := range m.`, fieldname, ` {`) + p.In() + p.encodeKey(fieldNumber, wireType) + p.P(`f`, numGen.Next(), ` := `, p.mathPkg.Use(), `.Float64bits(float64(num))`) + p.encodeFixed64("f" + numGen.Current()) + p.Out() + p.P(`}`) + } else if proto3 { + p.P(`if m.`, fieldname, ` != 0 {`) + p.In() + p.encodeKey(fieldNumber, wireType) + p.callFixed64(p.mathPkg.Use(), `.Float64bits(float64(m.`+fieldname, `))`) + p.Out() + p.P(`}`) + } else if !nullable { + p.encodeKey(fieldNumber, wireType) + p.callFixed64(p.mathPkg.Use(), `.Float64bits(float64(m.`+fieldname, `))`) + } else { + p.encodeKey(fieldNumber, wireType) + p.callFixed64(p.mathPkg.Use(), `.Float64bits(float64(*m.`+fieldname, `))`) + } + } else { + if packed { + p.encodeKey(fieldNumber, wireType) + p.callVarint(`len(m.`, fieldname, `) * 8`) + p.P(`for _, num := range m.`, fieldname, ` {`) + p.In() + p.unsafeFixed64("num", "float64") + p.Out() + p.P(`}`) + } else if repeated { + p.P(`for _, num := range m.`, fieldname, ` {`) + p.In() + p.encodeKey(fieldNumber, wireType) + p.unsafeFixed64("num", "float64") + p.Out() + p.P(`}`) + } else if proto3 { + p.P(`if m.`, fieldname, ` != 0 {`) + p.In() + p.encodeKey(fieldNumber, wireType) + p.unsafeFixed64(`m.`+fieldname, "float64") + p.Out() + p.P(`}`) + } else if !nullable { + p.encodeKey(fieldNumber, wireType) + p.unsafeFixed64(`m.`+fieldname, "float64") + } else { + p.encodeKey(fieldNumber, wireType) + p.unsafeFixed64(`*m.`+fieldname, `float64`) + } + } + case descriptor.FieldDescriptorProto_TYPE_FLOAT: + if !p.unsafe || gogoproto.IsCastType(field) { + if packed { + p.encodeKey(fieldNumber, wireType) + p.callVarint(`len(m.`, fieldname, `) * 4`) + p.P(`for _, num := range m.`, fieldname, ` {`) + p.In() + p.P(`f`, numGen.Next(), ` := `, p.mathPkg.Use(), `.Float32bits(float32(num))`) + p.encodeFixed32("f" + numGen.Current()) + p.Out() + p.P(`}`) + } else if repeated { + p.P(`for _, num := range m.`, fieldname, ` {`) + p.In() + p.encodeKey(fieldNumber, wireType) + p.P(`f`, numGen.Next(), ` := `, p.mathPkg.Use(), `.Float32bits(float32(num))`) + p.encodeFixed32("f" + numGen.Current()) + p.Out() + p.P(`}`) + } else if proto3 { + p.P(`if m.`, fieldname, ` != 0 {`) + p.In() + p.encodeKey(fieldNumber, wireType) + p.callFixed32(p.mathPkg.Use(), `.Float32bits(float32(m.`+fieldname, `))`) + p.Out() + p.P(`}`) + } else if !nullable { + p.encodeKey(fieldNumber, wireType) + p.callFixed32(p.mathPkg.Use(), `.Float32bits(float32(m.`+fieldname, `))`) + } else { + p.encodeKey(fieldNumber, wireType) + p.callFixed32(p.mathPkg.Use(), `.Float32bits(float32(*m.`+fieldname, `))`) + } + } else { + if packed { + p.encodeKey(fieldNumber, wireType) + p.callVarint(`len(m.`, fieldname, `) * 4`) + p.P(`for _, num := range m.`, fieldname, ` {`) + p.In() + p.unsafeFixed32("num", "float32") + p.Out() + p.P(`}`) + } else if repeated { + p.P(`for _, num := range m.`, fieldname, ` {`) + p.In() + p.encodeKey(fieldNumber, wireType) + p.unsafeFixed32("num", "float32") + p.Out() + p.P(`}`) + } else if proto3 { + p.P(`if m.`, fieldname, ` != 0 {`) + p.In() + p.encodeKey(fieldNumber, wireType) + p.unsafeFixed32(`m.`+fieldname, `float32`) + p.Out() + p.P(`}`) + } else if !nullable { + p.encodeKey(fieldNumber, wireType) + p.unsafeFixed32(`m.`+fieldname, `float32`) + } else { + p.encodeKey(fieldNumber, wireType) + p.unsafeFixed32(`*m.`+fieldname, "float32") + } + } + case descriptor.FieldDescriptorProto_TYPE_INT64, + descriptor.FieldDescriptorProto_TYPE_UINT64, + descriptor.FieldDescriptorProto_TYPE_INT32, + descriptor.FieldDescriptorProto_TYPE_UINT32, + descriptor.FieldDescriptorProto_TYPE_ENUM: + if packed { + jvar := "j" + numGen.Next() + p.P(`data`, numGen.Next(), ` := make([]byte, len(m.`, fieldname, `)*10)`) + p.P(`var `, jvar, ` int`) + if *field.Type == descriptor.FieldDescriptorProto_TYPE_INT64 || + *field.Type == descriptor.FieldDescriptorProto_TYPE_INT32 { + p.P(`for _, num1 := range m.`, fieldname, ` {`) + p.In() + p.P(`num := uint64(num1)`) + } else { + p.P(`for _, num := range m.`, fieldname, ` {`) + p.In() + } + p.P(`for num >= 1<<7 {`) + p.In() + p.P(`data`, numGen.Current(), `[`, jvar, `] = uint8(uint64(num)&0x7f|0x80)`) + p.P(`num >>= 7`) + p.P(jvar, `++`) + p.Out() + p.P(`}`) + p.P(`data`, numGen.Current(), `[`, jvar, `] = uint8(num)`) + p.P(jvar, `++`) + p.Out() + p.P(`}`) + p.encodeKey(fieldNumber, wireType) + p.callVarint(jvar) + p.P(`i += copy(data[i:], data`, numGen.Current(), `[:`, jvar, `])`) + } else if repeated { + p.P(`for _, num := range m.`, fieldname, ` {`) + p.In() + p.encodeKey(fieldNumber, wireType) + p.callVarint("num") + p.Out() + p.P(`}`) + } else if proto3 { + p.P(`if m.`, fieldname, ` != 0 {`) + p.In() + p.encodeKey(fieldNumber, wireType) + p.callVarint(`m.`, fieldname) + p.Out() + p.P(`}`) + } else if !nullable { + p.encodeKey(fieldNumber, wireType) + p.callVarint(`m.`, fieldname) + } else { + p.encodeKey(fieldNumber, wireType) + p.callVarint(`*m.`, fieldname) + } + case descriptor.FieldDescriptorProto_TYPE_FIXED64, + descriptor.FieldDescriptorProto_TYPE_SFIXED64: + if !p.unsafe { + if packed { + p.encodeKey(fieldNumber, wireType) + p.callVarint(`len(m.`, fieldname, `) * 8`) + p.P(`for _, num := range m.`, fieldname, ` {`) + p.In() + p.encodeFixed64("num") + p.Out() + p.P(`}`) + } else if repeated { + p.P(`for _, num := range m.`, fieldname, ` {`) + p.In() + p.encodeKey(fieldNumber, wireType) + p.encodeFixed64("num") + p.Out() + p.P(`}`) + } else if proto3 { + p.P(`if m.`, fieldname, ` != 0 {`) + p.In() + p.encodeKey(fieldNumber, wireType) + p.callFixed64("m." + fieldname) + p.Out() + p.P(`}`) + } else if !nullable { + p.encodeKey(fieldNumber, wireType) + p.callFixed64("m." + fieldname) + } else { + p.encodeKey(fieldNumber, wireType) + p.callFixed64("*m." + fieldname) + } + } else { + typeName := "int64" + if *field.Type == descriptor.FieldDescriptorProto_TYPE_FIXED64 { + typeName = "uint64" + } + if packed { + p.encodeKey(fieldNumber, wireType) + p.callVarint(`len(m.`, fieldname, `) * 8`) + p.P(`for _, num := range m.`, fieldname, ` {`) + p.In() + p.unsafeFixed64("num", typeName) + p.Out() + p.P(`}`) + } else if repeated { + p.P(`for _, num := range m.`, fieldname, ` {`) + p.In() + p.encodeKey(fieldNumber, wireType) + p.unsafeFixed64("num", typeName) + p.Out() + p.P(`}`) + } else if proto3 { + p.P(`if m.`, fieldname, ` != 0 {`) + p.In() + p.encodeKey(fieldNumber, wireType) + p.unsafeFixed64("m."+fieldname, typeName) + p.Out() + p.P(`}`) + } else if !nullable { + p.encodeKey(fieldNumber, wireType) + p.unsafeFixed64("m."+fieldname, typeName) + } else { + p.encodeKey(fieldNumber, wireType) + p.unsafeFixed64("*m."+fieldname, typeName) + } + } + case descriptor.FieldDescriptorProto_TYPE_FIXED32, + descriptor.FieldDescriptorProto_TYPE_SFIXED32: + if !p.unsafe { + if packed { + p.encodeKey(fieldNumber, wireType) + p.callVarint(`len(m.`, fieldname, `) * 4`) + p.P(`for _, num := range m.`, fieldname, ` {`) + p.In() + p.encodeFixed32("num") + p.Out() + p.P(`}`) + } else if repeated { + p.P(`for _, num := range m.`, fieldname, ` {`) + p.In() + p.encodeKey(fieldNumber, wireType) + p.encodeFixed32("num") + p.Out() + p.P(`}`) + } else if proto3 { + p.P(`if m.`, fieldname, ` != 0 {`) + p.In() + p.encodeKey(fieldNumber, wireType) + p.callFixed32("m." + fieldname) + p.Out() + p.P(`}`) + } else if !nullable { + p.encodeKey(fieldNumber, wireType) + p.callFixed32("m." + fieldname) + } else { + p.encodeKey(fieldNumber, wireType) + p.callFixed32("*m." + fieldname) + } + } else { + typeName := "int32" + if *field.Type == descriptor.FieldDescriptorProto_TYPE_FIXED32 { + typeName = "uint32" + } + if packed { + p.encodeKey(fieldNumber, wireType) + p.callVarint(`len(m.`, fieldname, `) * 4`) + p.P(`for _, num := range m.`, fieldname, ` {`) + p.In() + p.unsafeFixed32("num", typeName) + p.Out() + p.P(`}`) + } else if repeated { + p.P(`for _, num := range m.`, fieldname, ` {`) + p.In() + p.encodeKey(fieldNumber, wireType) + p.unsafeFixed32("num", typeName) + p.Out() + p.P(`}`) + } else if proto3 { + p.P(`if m.`, fieldname, ` != 0 {`) + p.In() + p.encodeKey(fieldNumber, wireType) + p.unsafeFixed32("m."+fieldname, typeName) + p.Out() + p.P(`}`) + } else if !nullable { + p.encodeKey(fieldNumber, wireType) + p.unsafeFixed32("m."+fieldname, typeName) + } else { + p.encodeKey(fieldNumber, wireType) + p.unsafeFixed32("*m."+fieldname, typeName) + } + } + case descriptor.FieldDescriptorProto_TYPE_BOOL: + if packed { + p.encodeKey(fieldNumber, wireType) + p.callVarint(`len(m.`, fieldname, `)`) + p.P(`for _, b := range m.`, fieldname, ` {`) + p.In() + p.P(`if b {`) + p.In() + p.P(`data[i] = 1`) + p.Out() + p.P(`} else {`) + p.In() + p.P(`data[i] = 0`) + p.Out() + p.P(`}`) + p.P(`i++`) + p.Out() + p.P(`}`) + } else if repeated { + p.P(`for _, b := range m.`, fieldname, ` {`) + p.In() + p.encodeKey(fieldNumber, wireType) + p.P(`if b {`) + p.In() + p.P(`data[i] = 1`) + p.Out() + p.P(`} else {`) + p.In() + p.P(`data[i] = 0`) + p.Out() + p.P(`}`) + p.P(`i++`) + p.Out() + p.P(`}`) + } else if proto3 { + p.P(`if m.`, fieldname, ` {`) + p.In() + p.encodeKey(fieldNumber, wireType) + p.P(`if m.`, fieldname, ` {`) + p.In() + p.P(`data[i] = 1`) + p.Out() + p.P(`} else {`) + p.In() + p.P(`data[i] = 0`) + p.Out() + p.P(`}`) + p.P(`i++`) + p.Out() + p.P(`}`) + } else if !nullable { + p.encodeKey(fieldNumber, wireType) + p.P(`if m.`, fieldname, ` {`) + p.In() + p.P(`data[i] = 1`) + p.Out() + p.P(`} else {`) + p.In() + p.P(`data[i] = 0`) + p.Out() + p.P(`}`) + p.P(`i++`) + } else { + p.encodeKey(fieldNumber, wireType) + p.P(`if *m.`, fieldname, ` {`) + p.In() + p.P(`data[i] = 1`) + p.Out() + p.P(`} else {`) + p.In() + p.P(`data[i] = 0`) + p.Out() + p.P(`}`) + p.P(`i++`) + } + case descriptor.FieldDescriptorProto_TYPE_STRING: + if repeated { + p.P(`for _, s := range m.`, fieldname, ` {`) + p.In() + p.encodeKey(fieldNumber, wireType) + p.P(`l = len(s)`) + p.encodeVarint("l") + p.P(`i+=copy(data[i:], s)`) + p.Out() + p.P(`}`) + } else if proto3 { + p.P(`if len(m.`, fieldname, `) > 0 {`) + p.In() + p.encodeKey(fieldNumber, wireType) + p.callVarint(`len(m.`, fieldname, `)`) + p.P(`i+=copy(data[i:], m.`, fieldname, `)`) + p.Out() + p.P(`}`) + } else if !nullable { + p.encodeKey(fieldNumber, wireType) + p.callVarint(`len(m.`, fieldname, `)`) + p.P(`i+=copy(data[i:], m.`, fieldname, `)`) + } else { + p.encodeKey(fieldNumber, wireType) + p.callVarint(`len(*m.`, fieldname, `)`) + p.P(`i+=copy(data[i:], *m.`, fieldname, `)`) + } + case descriptor.FieldDescriptorProto_TYPE_GROUP: + panic(fmt.Errorf("marshaler does not support group %v", fieldname)) + case descriptor.FieldDescriptorProto_TYPE_MESSAGE: + if p.IsMap(field) { + m := p.GoMapType(nil, field) + keygoTyp, keywire := p.GoType(nil, m.KeyField) + keygoAliasTyp, _ := p.GoType(nil, m.KeyAliasField) + // keys may not be pointers + keygoTyp = strings.Replace(keygoTyp, "*", "", 1) + keygoAliasTyp = strings.Replace(keygoAliasTyp, "*", "", 1) + keyCapTyp := generator.CamelCase(keygoTyp) + valuegoTyp, valuewire := p.GoType(nil, m.ValueField) + valuegoAliasTyp, _ := p.GoType(nil, m.ValueAliasField) + nullable, valuegoTyp, valuegoAliasTyp = generator.GoMapValueTypes(field, m.ValueField, valuegoTyp, valuegoAliasTyp) + keyKeySize := keySize(1, wireToType(keywire)) + valueKeySize := keySize(2, wireToType(valuewire)) + if gogoproto.IsStableMarshaler(file.FileDescriptorProto, message.DescriptorProto) { + keysName := `keysFor` + fieldname + p.P(keysName, ` := make([]`, keygoTyp, `, 0, len(m.`, fieldname, `))`) + p.P(`for k, _ := range m.`, fieldname, ` {`) + p.In() + p.P(keysName, ` = append(`, keysName, `, `, keygoTyp, `(k))`) + p.Out() + p.P(`}`) + p.P(p.sortKeysPkg.Use(), `.`, keyCapTyp, `s(`, keysName, `)`) + p.P(`for _, k := range `, keysName, ` {`) + } else { + p.P(`for k, _ := range m.`, fieldname, ` {`) + } + p.In() + p.encodeKey(fieldNumber, wireType) + sum := []string{strconv.Itoa(keyKeySize)} + switch m.KeyField.GetType() { + case descriptor.FieldDescriptorProto_TYPE_DOUBLE, + descriptor.FieldDescriptorProto_TYPE_FIXED64, + descriptor.FieldDescriptorProto_TYPE_SFIXED64: + sum = append(sum, `8`) + case descriptor.FieldDescriptorProto_TYPE_FLOAT, + descriptor.FieldDescriptorProto_TYPE_FIXED32, + descriptor.FieldDescriptorProto_TYPE_SFIXED32: + sum = append(sum, `4`) + case descriptor.FieldDescriptorProto_TYPE_INT64, + descriptor.FieldDescriptorProto_TYPE_UINT64, + descriptor.FieldDescriptorProto_TYPE_UINT32, + descriptor.FieldDescriptorProto_TYPE_ENUM, + descriptor.FieldDescriptorProto_TYPE_INT32: + sum = append(sum, `sov`+p.localName+`(uint64(k))`) + case descriptor.FieldDescriptorProto_TYPE_BOOL: + sum = append(sum, `1`) + case descriptor.FieldDescriptorProto_TYPE_STRING, + descriptor.FieldDescriptorProto_TYPE_BYTES: + sum = append(sum, `len(k)+sov`+p.localName+`(uint64(len(k)))`) + case descriptor.FieldDescriptorProto_TYPE_SINT32, + descriptor.FieldDescriptorProto_TYPE_SINT64: + sum = append(sum, `soz`+p.localName+`(uint64(k))`) + } + if gogoproto.IsStableMarshaler(file.FileDescriptorProto, message.DescriptorProto) { + p.P(`v := m.`, fieldname, `[`, keygoAliasTyp, `(k)]`) + } else { + p.P(`v := m.`, fieldname, `[k]`) + } + accessor := `v` + sum = append(sum, strconv.Itoa(valueKeySize)) + switch m.ValueField.GetType() { + case descriptor.FieldDescriptorProto_TYPE_DOUBLE, + descriptor.FieldDescriptorProto_TYPE_FIXED64, + descriptor.FieldDescriptorProto_TYPE_SFIXED64: + sum = append(sum, strconv.Itoa(8)) + case descriptor.FieldDescriptorProto_TYPE_FLOAT, + descriptor.FieldDescriptorProto_TYPE_FIXED32, + descriptor.FieldDescriptorProto_TYPE_SFIXED32: + sum = append(sum, strconv.Itoa(4)) + case descriptor.FieldDescriptorProto_TYPE_INT64, + descriptor.FieldDescriptorProto_TYPE_UINT64, + descriptor.FieldDescriptorProto_TYPE_UINT32, + descriptor.FieldDescriptorProto_TYPE_ENUM, + descriptor.FieldDescriptorProto_TYPE_INT32: + sum = append(sum, `sov`+p.localName+`(uint64(v))`) + case descriptor.FieldDescriptorProto_TYPE_BOOL: + sum = append(sum, `1`) + case descriptor.FieldDescriptorProto_TYPE_STRING, + descriptor.FieldDescriptorProto_TYPE_BYTES: + sum = append(sum, `len(v)+sov`+p.localName+`(uint64(len(v)))`) + case descriptor.FieldDescriptorProto_TYPE_SINT32, + descriptor.FieldDescriptorProto_TYPE_SINT64: + sum = append(sum, `soz`+p.localName+`(uint64(v))`) + case descriptor.FieldDescriptorProto_TYPE_MESSAGE: + if nullable { + p.P(`if v == nil {`) + p.In() + p.P(`return 0, `, p.errorsPkg.Use(), `.New("proto: map has nil element")`) + p.Out() + p.P(`}`) + } + if valuegoTyp != valuegoAliasTyp { + if nullable { + // cast back to the type that has the generated methods on it + accessor = `((` + valuegoTyp + `)(` + accessor + `))` + } else { + accessor = `((*` + valuegoTyp + `)(&` + accessor + `))` + } + } else if !nullable { + accessor = `(&v)` + } + if protoSizer { + p.P(`msgSize := `, accessor, `.ProtoSize()`) + } else { + p.P(`msgSize := `, accessor, `.Size()`) + } + sum = append(sum, `msgSize + sov`+p.localName+`(uint64(msgSize))`) + } + p.P(`mapSize := `, strings.Join(sum, " + ")) + p.callVarint("mapSize") + p.encodeKey(1, wireToType(keywire)) + p.mapField(numGen, m.KeyField.GetType(), "k", protoSizer) + p.encodeKey(2, wireToType(valuewire)) + p.mapField(numGen, m.ValueField.GetType(), accessor, protoSizer) + p.Out() + p.P(`}`) + } else if repeated { + p.P(`for _, msg := range m.`, fieldname, ` {`) + p.In() + p.encodeKey(fieldNumber, wireType) + if protoSizer { + p.callVarint("msg.ProtoSize()") + } else { + p.callVarint("msg.Size()") + } + p.P(`n, err := msg.MarshalTo(data[i:])`) + p.P(`if err != nil {`) + p.In() + p.P(`return 0, err`) + p.Out() + p.P(`}`) + p.P(`i+=n`) + p.Out() + p.P(`}`) + } else { + p.encodeKey(fieldNumber, wireType) + if protoSizer { + p.callVarint(`m.`, fieldname, `.ProtoSize()`) + } else { + p.callVarint(`m.`, fieldname, `.Size()`) + } + p.P(`n`, numGen.Next(), `, err := m.`, fieldname, `.MarshalTo(data[i:])`) + p.P(`if err != nil {`) + p.In() + p.P(`return 0, err`) + p.Out() + p.P(`}`) + p.P(`i+=n`, numGen.Current()) + } + case descriptor.FieldDescriptorProto_TYPE_BYTES: + if !gogoproto.IsCustomType(field) { + if repeated { + p.P(`for _, b := range m.`, fieldname, ` {`) + p.In() + p.encodeKey(fieldNumber, wireType) + p.callVarint("len(b)") + p.P(`i+=copy(data[i:], b)`) + p.Out() + p.P(`}`) + } else if proto3 { + p.P(`if len(m.`, fieldname, `) > 0 {`) + p.In() + p.encodeKey(fieldNumber, wireType) + p.callVarint(`len(m.`, fieldname, `)`) + p.P(`i+=copy(data[i:], m.`, fieldname, `)`) + p.Out() + p.P(`}`) + } else { + p.encodeKey(fieldNumber, wireType) + p.callVarint(`len(m.`, fieldname, `)`) + p.P(`i+=copy(data[i:], m.`, fieldname, `)`) + } + } else { + if repeated { + p.P(`for _, msg := range m.`, fieldname, ` {`) + p.In() + p.encodeKey(fieldNumber, wireType) + if protoSizer { + p.callVarint(`msg.ProtoSize()`) + } else { + p.callVarint(`msg.Size()`) + } + p.P(`n, err := msg.MarshalTo(data[i:])`) + p.P(`if err != nil {`) + p.In() + p.P(`return 0, err`) + p.Out() + p.P(`}`) + p.P(`i+=n`) + p.Out() + p.P(`}`) + } else { + p.encodeKey(fieldNumber, wireType) + if protoSizer { + p.callVarint(`m.`, fieldname, `.ProtoSize()`) + } else { + p.callVarint(`m.`, fieldname, `.Size()`) + } + p.P(`n`, numGen.Next(), `, err := m.`, fieldname, `.MarshalTo(data[i:])`) + p.P(`if err != nil {`) + p.In() + p.P(`return 0, err`) + p.Out() + p.P(`}`) + p.P(`i+=n`, numGen.Current()) + } + } + case descriptor.FieldDescriptorProto_TYPE_SINT32: + if packed { + datavar := "data" + numGen.Next() + jvar := "j" + numGen.Next() + p.P(datavar, ` := make([]byte, len(m.`, fieldname, ")*5)") + p.P(`var `, jvar, ` int`) + p.P(`for _, num := range m.`, fieldname, ` {`) + p.In() + xvar := "x" + numGen.Next() + p.P(xvar, ` := (uint32(num) << 1) ^ uint32((num >> 31))`) + p.P(`for `, xvar, ` >= 1<<7 {`) + p.In() + p.P(datavar, `[`, jvar, `] = uint8(uint64(`, xvar, `)&0x7f|0x80)`) + p.P(jvar, `++`) + p.P(xvar, ` >>= 7`) + p.Out() + p.P(`}`) + p.P(datavar, `[`, jvar, `] = uint8(`, xvar, `)`) + p.P(jvar, `++`) + p.Out() + p.P(`}`) + p.encodeKey(fieldNumber, wireType) + p.callVarint(jvar) + p.P(`i+=copy(data[i:], `, datavar, `[:`, jvar, `])`) + } else if repeated { + p.P(`for _, num := range m.`, fieldname, ` {`) + p.In() + p.encodeKey(fieldNumber, wireType) + p.P(`x`, numGen.Next(), ` := (uint32(num) << 1) ^ uint32((num >> 31))`) + p.encodeVarint("x" + numGen.Current()) + p.Out() + p.P(`}`) + } else if proto3 { + p.P(`if m.`, fieldname, ` != 0 {`) + p.In() + p.encodeKey(fieldNumber, wireType) + p.callVarint(`(uint32(m.`, fieldname, `) << 1) ^ uint32((m.`, fieldname, ` >> 31))`) + p.Out() + p.P(`}`) + } else if !nullable { + p.encodeKey(fieldNumber, wireType) + p.callVarint(`(uint32(m.`, fieldname, `) << 1) ^ uint32((m.`, fieldname, ` >> 31))`) + } else { + p.encodeKey(fieldNumber, wireType) + p.callVarint(`(uint32(*m.`, fieldname, `) << 1) ^ uint32((*m.`, fieldname, ` >> 31))`) + } + case descriptor.FieldDescriptorProto_TYPE_SINT64: + if packed { + jvar := "j" + numGen.Next() + xvar := "x" + numGen.Next() + datavar := "data" + numGen.Next() + p.P(`var `, jvar, ` int`) + p.P(datavar, ` := make([]byte, len(m.`, fieldname, `)*10)`) + p.P(`for _, num := range m.`, fieldname, ` {`) + p.In() + p.P(xvar, ` := (uint64(num) << 1) ^ uint64((num >> 63))`) + p.P(`for `, xvar, ` >= 1<<7 {`) + p.In() + p.P(datavar, `[`, jvar, `] = uint8(uint64(`, xvar, `)&0x7f|0x80)`) + p.P(jvar, `++`) + p.P(xvar, ` >>= 7`) + p.Out() + p.P(`}`) + p.P(datavar, `[`, jvar, `] = uint8(`, xvar, `)`) + p.P(jvar, `++`) + p.Out() + p.P(`}`) + p.encodeKey(fieldNumber, wireType) + p.callVarint(jvar) + p.P(`i+=copy(data[i:], `, datavar, `[:`, jvar, `])`) + } else if repeated { + p.P(`for _, num := range m.`, fieldname, ` {`) + p.In() + p.encodeKey(fieldNumber, wireType) + p.P(`x`, numGen.Next(), ` := (uint64(num) << 1) ^ uint64((num >> 63))`) + p.encodeVarint("x" + numGen.Current()) + p.Out() + p.P(`}`) + } else if proto3 { + p.P(`if m.`, fieldname, ` != 0 {`) + p.In() + p.encodeKey(fieldNumber, wireType) + p.callVarint(`(uint64(m.`, fieldname, `) << 1) ^ uint64((m.`, fieldname, ` >> 63))`) + p.Out() + p.P(`}`) + } else if !nullable { + p.encodeKey(fieldNumber, wireType) + p.callVarint(`(uint64(m.`, fieldname, `) << 1) ^ uint64((m.`, fieldname, ` >> 63))`) + } else { + p.encodeKey(fieldNumber, wireType) + p.callVarint(`(uint64(*m.`, fieldname, `) << 1) ^ uint64((*m.`, fieldname, ` >> 63))`) + } + default: + panic("not implemented") + } + if (required && nullable) || repeated || doNilCheck { + p.Out() + p.P(`}`) + } +} + +func (p *marshalto) Generate(file *generator.FileDescriptor) { + numGen := NewNumGen() + p.PluginImports = generator.NewPluginImports(p.Generator) + p.atleastOne = false + p.localName = generator.FileName(file) + + p.mathPkg = p.NewImport("math") + p.sortKeysPkg = p.NewImport("github.com/gogo/protobuf/sortkeys") + p.protoPkg = p.NewImport("github.com/gogo/protobuf/proto") + if !gogoproto.ImportsGoGoProto(file.FileDescriptorProto) { + p.protoPkg = p.NewImport("github.com/golang/protobuf/proto") + } + p.unsafePkg = p.NewImport("unsafe") + p.errorsPkg = p.NewImport("errors") + + for _, message := range file.Messages() { + if message.DescriptorProto.GetOptions().GetMapEntry() { + continue + } + ccTypeName := generator.CamelCaseSlice(message.TypeName()) + if p.unsafe { + if !gogoproto.IsUnsafeMarshaler(file.FileDescriptorProto, message.DescriptorProto) { + continue + } + if gogoproto.IsMarshaler(file.FileDescriptorProto, message.DescriptorProto) { + panic(fmt.Sprintf("unsafe_marshaler and marshalto enabled for %v", ccTypeName)) + } + } + if !p.unsafe { + if !gogoproto.IsMarshaler(file.FileDescriptorProto, message.DescriptorProto) { + continue + } + if gogoproto.IsUnsafeMarshaler(file.FileDescriptorProto, message.DescriptorProto) { + panic(fmt.Sprintf("unsafe_marshaler and marshalto enabled for %v", ccTypeName)) + } + } + p.atleastOne = true + + p.P(`func (m *`, ccTypeName, `) Marshal() (data []byte, err error) {`) + p.In() + if gogoproto.IsProtoSizer(file.FileDescriptorProto, message.DescriptorProto) { + p.P(`size := m.ProtoSize()`) + } else { + p.P(`size := m.Size()`) + } + p.P(`data = make([]byte, size)`) + p.P(`n, err := m.MarshalTo(data)`) + p.P(`if err != nil {`) + p.In() + p.P(`return nil, err`) + p.Out() + p.P(`}`) + p.P(`return data[:n], nil`) + p.Out() + p.P(`}`) + p.P(``) + p.P(`func (m *`, ccTypeName, `) MarshalTo(data []byte) (int, error) {`) + p.In() + p.P(`var i int`) + p.P(`_ = i`) + p.P(`var l int`) + p.P(`_ = l`) + fields := orderFields(message.GetField()) + sort.Sort(fields) + oneofs := make(map[string]struct{}) + for _, field := range message.Field { + oneof := field.OneofIndex != nil + if !oneof { + proto3 := gogoproto.IsProto3(file.FileDescriptorProto) + p.generateField(proto3, numGen, file, message, field) + } else { + fieldname := p.GetFieldName(message, field) + if _, ok := oneofs[fieldname]; !ok { + oneofs[fieldname] = struct{}{} + p.P(`if m.`, fieldname, ` != nil {`) + p.In() + p.P(`nn`, numGen.Next(), `, err := m.`, fieldname, `.MarshalTo(data[i:])`) + p.P(`if err != nil {`) + p.In() + p.P(`return 0, err`) + p.Out() + p.P(`}`) + p.P(`i+=nn`, numGen.Current()) + p.Out() + p.P(`}`) + } + } + } + if message.DescriptorProto.HasExtension() { + if gogoproto.HasExtensionsMap(file.FileDescriptorProto, message.DescriptorProto) { + p.P(`if len(m.XXX_extensions) > 0 {`) + p.In() + p.P(`n, err := `, p.protoPkg.Use(), `.EncodeExtensionMap(m.XXX_extensions, data[i:])`) + p.P(`if err != nil {`) + p.In() + p.P(`return 0, err`) + p.Out() + p.P(`}`) + p.P(`i+=n`) + p.Out() + p.P(`}`) + } else { + p.P(`if m.XXX_extensions != nil {`) + p.In() + p.P(`i+=copy(data[i:], m.XXX_extensions)`) + p.Out() + p.P(`}`) + } + } + if gogoproto.HasUnrecognized(file.FileDescriptorProto, message.DescriptorProto) { + p.P(`if m.XXX_unrecognized != nil {`) + p.In() + p.P(`i+=copy(data[i:], m.XXX_unrecognized)`) + p.Out() + p.P(`}`) + } + + p.P(`return i, nil`) + p.Out() + p.P(`}`) + p.P() + + //Generate MarshalTo methods for oneof fields + m := proto.Clone(message.DescriptorProto).(*descriptor.DescriptorProto) + for _, field := range m.Field { + oneof := field.OneofIndex != nil + if !oneof { + continue + } + ccTypeName := p.OneOfTypeName(message, field) + p.P(`func (m *`, ccTypeName, `) MarshalTo(data []byte) (int, error) {`) + p.In() + p.P(`i := 0`) + vanity.TurnOffNullableForNativeTypesWithoutDefaultsOnly(field) + p.generateField(false, numGen, file, message, field) + p.P(`return i, nil`) + p.Out() + p.P(`}`) + } + } + + if p.atleastOne { + p.P(`func encodeFixed64`, p.localName, `(data []byte, offset int, v uint64) int {`) + p.In() + p.P(`data[offset] = uint8(v)`) + p.P(`data[offset+1] = uint8(v >> 8)`) + p.P(`data[offset+2] = uint8(v >> 16)`) + p.P(`data[offset+3] = uint8(v >> 24)`) + p.P(`data[offset+4] = uint8(v >> 32)`) + p.P(`data[offset+5] = uint8(v >> 40)`) + p.P(`data[offset+6] = uint8(v >> 48)`) + p.P(`data[offset+7] = uint8(v >> 56)`) + p.P(`return offset+8`) + p.Out() + p.P(`}`) + + p.P(`func encodeFixed32`, p.localName, `(data []byte, offset int, v uint32) int {`) + p.In() + p.P(`data[offset] = uint8(v)`) + p.P(`data[offset+1] = uint8(v >> 8)`) + p.P(`data[offset+2] = uint8(v >> 16)`) + p.P(`data[offset+3] = uint8(v >> 24)`) + p.P(`return offset+4`) + p.Out() + p.P(`}`) + + p.P(`func encodeVarint`, p.localName, `(data []byte, offset int, v uint64) int {`) + p.In() + p.P(`for v >= 1<<7 {`) + p.In() + p.P(`data[offset] = uint8(v&0x7f|0x80)`) + p.P(`v >>= 7`) + p.P(`offset++`) + p.Out() + p.P(`}`) + p.P(`data[offset] = uint8(v)`) + p.P(`return offset+1`) + p.Out() + p.P(`}`) + } + +} + +func init() { + generator.RegisterPlugin(NewMarshal()) + generator.RegisterPlugin(NewUnsafeMarshal()) +} diff --git a/vendor/github.com/gogo/protobuf/plugin/oneofcheck/oneofcheck.go b/vendor/github.com/gogo/protobuf/plugin/oneofcheck/oneofcheck.go new file mode 100644 index 000000000..cd0d19a77 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/plugin/oneofcheck/oneofcheck.go @@ -0,0 +1,91 @@ +// Copyright (c) 2013, Vastech SA (PTY) LTD. 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. + +/* +The oneofcheck plugin is used to check whether oneof is not used incorrectly. +For instance: +An error is caused if a oneof field: + - is used in a face + - is an embedded field + +*/ +package oneofcheck + +import ( + "fmt" + "github.com/gogo/protobuf/gogoproto" + "github.com/gogo/protobuf/protoc-gen-gogo/generator" + "os" +) + +type plugin struct { + *generator.Generator +} + +func NewPlugin() *plugin { + return &plugin{} +} + +func (p *plugin) Name() string { + return "oneofcheck" +} + +func (p *plugin) Init(g *generator.Generator) { + p.Generator = g +} + +func (p *plugin) Generate(file *generator.FileDescriptor) { + for _, msg := range file.Messages() { + face := gogoproto.IsFace(file.FileDescriptorProto, msg.DescriptorProto) + for _, field := range msg.GetField() { + if field.OneofIndex == nil { + continue + } + if face { + fmt.Fprintf(os.Stderr, "ERROR: field %v.%v cannot be in a face and oneof\n", generator.CamelCase(*msg.Name), generator.CamelCase(*field.Name)) + os.Exit(1) + } + if gogoproto.IsEmbed(field) { + fmt.Fprintf(os.Stderr, "ERROR: field %v.%v cannot be in an oneof and an embedded field\n", generator.CamelCase(*msg.Name), generator.CamelCase(*field.Name)) + os.Exit(1) + } + if !gogoproto.IsNullable(field) { + fmt.Fprintf(os.Stderr, "ERROR: field %v.%v cannot be in an oneof and a non-nullable field\n", generator.CamelCase(*msg.Name), generator.CamelCase(*field.Name)) + os.Exit(1) + } + if gogoproto.IsUnion(file.FileDescriptorProto, msg.DescriptorProto) { + fmt.Fprintf(os.Stderr, "ERROR: field %v.%v cannot be in an oneof and in an union (deprecated)\n", generator.CamelCase(*msg.Name), generator.CamelCase(*field.Name)) + os.Exit(1) + } + } + } +} + +func (p *plugin) GenerateImports(*generator.FileDescriptor) {} + +func init() { + generator.RegisterPlugin(NewPlugin()) +} diff --git a/vendor/github.com/gogo/protobuf/plugin/populate/populate.go b/vendor/github.com/gogo/protobuf/plugin/populate/populate.go new file mode 100644 index 000000000..c95d9f28e --- /dev/null +++ b/vendor/github.com/gogo/protobuf/plugin/populate/populate.go @@ -0,0 +1,774 @@ +// Copyright (c) 2013, Vastech SA (PTY) LTD. 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. + +/* +The populate plugin generates a NewPopulated function. +This function returns a newly populated structure. + +It is enabled by the following extensions: + + - populate + - populate_all + +Let us look at: + + github.com/gogo/protobuf/test/example/example.proto + +Btw all the output can be seen at: + + github.com/gogo/protobuf/test/example/* + +The following message: + + option (gogoproto.populate_all) = true; + + 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]; + } + +given to the populate plugin, will generate code the following code: + + func NewPopulatedB(r randyExample, easy bool) *B { + this := &B{} + v2 := NewPopulatedA(r, easy) + this.A = *v2 + if r.Intn(10) != 0 { + v3 := r.Intn(10) + this.G = make([]github_com_gogo_protobuf_test_custom.Uint128, v3) + for i := 0; i < v3; i++ { + v4 := github_com_gogo_protobuf_test_custom.NewPopulatedUint128(r) + this.G[i] = *v4 + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedExample(r, 3) + } + return this + } + +The idea that is useful for testing. +Most of the other plugins' generated test code uses it. +You will still be able to use the generated test code of other packages +if you turn off the popluate plugin and write your own custom NewPopulated function. + +If the easy flag is not set the XXX_unrecognized and XXX_extensions fields are also populated. +These have caused problems with JSON marshalling and unmarshalling tests. + +*/ +package populate + +import ( + "fmt" + "github.com/gogo/protobuf/gogoproto" + "github.com/gogo/protobuf/proto" + descriptor "github.com/gogo/protobuf/protoc-gen-gogo/descriptor" + "github.com/gogo/protobuf/protoc-gen-gogo/generator" + "github.com/gogo/protobuf/vanity" + "math" + "strconv" + "strings" +) + +type VarGen interface { + Next() string + Current() string +} + +type varGen struct { + index int64 +} + +func NewVarGen() VarGen { + return &varGen{0} +} + +func (this *varGen) Next() string { + this.index++ + return fmt.Sprintf("v%d", this.index) +} + +func (this *varGen) Current() string { + return fmt.Sprintf("v%d", this.index) +} + +type plugin struct { + *generator.Generator + generator.PluginImports + varGen VarGen + atleastOne bool + localName string +} + +func NewPlugin() *plugin { + return &plugin{} +} + +func (p *plugin) Name() string { + return "populate" +} + +func (p *plugin) Init(g *generator.Generator) { + p.Generator = g +} + +func value(typeName string, fieldType descriptor.FieldDescriptorProto_Type) string { + switch fieldType { + case descriptor.FieldDescriptorProto_TYPE_DOUBLE: + return typeName + "(r.Float64())" + case descriptor.FieldDescriptorProto_TYPE_FLOAT: + return typeName + "(r.Float32())" + case descriptor.FieldDescriptorProto_TYPE_INT64, + descriptor.FieldDescriptorProto_TYPE_SFIXED64, + descriptor.FieldDescriptorProto_TYPE_SINT64: + return typeName + "(r.Int63())" + case descriptor.FieldDescriptorProto_TYPE_UINT64, + descriptor.FieldDescriptorProto_TYPE_FIXED64: + return typeName + "(uint64(r.Uint32()))" + case descriptor.FieldDescriptorProto_TYPE_INT32, + descriptor.FieldDescriptorProto_TYPE_SINT32, + descriptor.FieldDescriptorProto_TYPE_SFIXED32, + descriptor.FieldDescriptorProto_TYPE_ENUM: + return typeName + "(r.Int31())" + case descriptor.FieldDescriptorProto_TYPE_UINT32, + descriptor.FieldDescriptorProto_TYPE_FIXED32: + return typeName + "(r.Uint32())" + case descriptor.FieldDescriptorProto_TYPE_BOOL: + return typeName + `(bool(r.Intn(2) == 0))` + case descriptor.FieldDescriptorProto_TYPE_STRING, + descriptor.FieldDescriptorProto_TYPE_GROUP, + descriptor.FieldDescriptorProto_TYPE_MESSAGE, + descriptor.FieldDescriptorProto_TYPE_BYTES: + } + panic(fmt.Errorf("unexpected type %v", typeName)) +} + +func negative(fieldType descriptor.FieldDescriptorProto_Type) bool { + switch fieldType { + case descriptor.FieldDescriptorProto_TYPE_UINT64, + descriptor.FieldDescriptorProto_TYPE_FIXED64, + descriptor.FieldDescriptorProto_TYPE_UINT32, + descriptor.FieldDescriptorProto_TYPE_FIXED32, + descriptor.FieldDescriptorProto_TYPE_BOOL: + return false + } + return true +} + +func getFuncName(goTypName string) string { + funcName := "NewPopulated" + goTypName + goTypNames := strings.Split(goTypName, ".") + if len(goTypNames) == 2 { + funcName = goTypNames[0] + ".NewPopulated" + goTypNames[1] + } else if len(goTypNames) != 1 { + panic(fmt.Errorf("unreachable: too many dots in %v", goTypName)) + } + return funcName +} + +func getFuncCall(goTypName string) string { + funcName := getFuncName(goTypName) + funcCall := funcName + "(r, easy)" + return funcCall +} + +func getCustomFuncCall(goTypName string) string { + funcName := getFuncName(goTypName) + funcCall := funcName + "(r)" + return funcCall +} + +func (p *plugin) getEnumVal(field *descriptor.FieldDescriptorProto, goTyp string) string { + enum := p.ObjectNamed(field.GetTypeName()).(*generator.EnumDescriptor) + l := len(enum.Value) + values := make([]string, l) + for i := range enum.Value { + values[i] = strconv.Itoa(int(*enum.Value[i].Number)) + } + arr := "[]int32{" + strings.Join(values, ",") + "}" + val := strings.Join([]string{generator.GoTypeToName(goTyp), `(`, arr, `[r.Intn(`, fmt.Sprintf("%d", l), `)])`}, "") + return val +} + +func (p *plugin) GenerateField(file *generator.FileDescriptor, message *generator.Descriptor, field *descriptor.FieldDescriptorProto) { + proto3 := gogoproto.IsProto3(file.FileDescriptorProto) + goTyp, _ := p.GoType(message, field) + fieldname := p.GetOneOfFieldName(message, field) + goTypName := generator.GoTypeToName(goTyp) + if p.IsMap(field) { + m := p.GoMapType(nil, field) + keygoTyp, _ := p.GoType(nil, m.KeyField) + keygoTyp = strings.Replace(keygoTyp, "*", "", 1) + keygoAliasTyp, _ := p.GoType(nil, m.KeyAliasField) + keygoAliasTyp = strings.Replace(keygoAliasTyp, "*", "", 1) + + valuegoTyp, _ := p.GoType(nil, m.ValueField) + valuegoAliasTyp, _ := p.GoType(nil, m.ValueAliasField) + keytypName := generator.GoTypeToName(keygoTyp) + keygoAliasTyp = generator.GoTypeToName(keygoAliasTyp) + valuetypAliasName := generator.GoTypeToName(valuegoAliasTyp) + + nullable, valuegoTyp, valuegoAliasTyp := generator.GoMapValueTypes(field, m.ValueField, valuegoTyp, valuegoAliasTyp) + + p.P(p.varGen.Next(), ` := r.Intn(10)`) + p.P(`this.`, fieldname, ` = make(`, m.GoType, `)`) + p.P(`for i := 0; i < `, p.varGen.Current(), `; i++ {`) + p.In() + keyval := "" + if m.KeyField.IsString() { + keyval = fmt.Sprintf("randString%v(r)", p.localName) + } else { + keyval = value(keytypName, m.KeyField.GetType()) + } + if keygoAliasTyp != keygoTyp { + keyval = keygoAliasTyp + `(` + keyval + `)` + } + if m.ValueField.IsMessage() || p.IsGroup(field) { + s := `this.` + fieldname + `[` + keyval + `] = ` + goTypName = generator.GoTypeToName(valuegoTyp) + funcCall := getFuncCall(goTypName) + if !nullable { + funcCall = `*` + funcCall + } + if valuegoTyp != valuegoAliasTyp { + funcCall = `(` + valuegoAliasTyp + `)(` + funcCall + `)` + } + s += funcCall + p.P(s) + } else if m.ValueField.IsEnum() { + s := `this.` + fieldname + `[` + keyval + `]` + ` = ` + p.getEnumVal(m.ValueField, valuegoTyp) + p.P(s) + } else if m.ValueField.IsBytes() { + count := p.varGen.Next() + p.P(count, ` := r.Intn(100)`) + p.P(p.varGen.Next(), ` := `, keyval) + p.P(`this.`, fieldname, `[`, p.varGen.Current(), `] = make(`, valuegoTyp, `, `, count, `)`) + p.P(`for i := 0; i < `, count, `; i++ {`) + p.In() + p.P(`this.`, fieldname, `[`, p.varGen.Current(), `][i] = byte(r.Intn(256))`) + p.Out() + p.P(`}`) + } else if m.ValueField.IsString() { + s := `this.` + fieldname + `[` + keyval + `]` + ` = ` + fmt.Sprintf("randString%v(r)", p.localName) + p.P(s) + } else { + p.P(p.varGen.Next(), ` := `, keyval) + p.P(`this.`, fieldname, `[`, p.varGen.Current(), `] = `, value(valuetypAliasName, m.ValueField.GetType())) + if negative(m.ValueField.GetType()) { + p.P(`if r.Intn(2) == 0 {`) + p.In() + p.P(`this.`, fieldname, `[`, p.varGen.Current(), `] *= -1`) + p.Out() + p.P(`}`) + } + } + p.Out() + p.P(`}`) + } else if field.IsMessage() || p.IsGroup(field) { + funcCall := getFuncCall(goTypName) + if field.IsRepeated() { + p.P(p.varGen.Next(), ` := r.Intn(5)`) + p.P(`this.`, fieldname, ` = make(`, goTyp, `, `, p.varGen.Current(), `)`) + p.P(`for i := 0; i < `, p.varGen.Current(), `; i++ {`) + p.In() + if gogoproto.IsNullable(field) { + p.P(`this.`, fieldname, `[i] = `, funcCall) + } else { + p.P(p.varGen.Next(), `:= `, funcCall) + p.P(`this.`, fieldname, `[i] = *`, p.varGen.Current()) + } + p.Out() + p.P(`}`) + } else { + if gogoproto.IsNullable(field) { + p.P(`this.`, fieldname, ` = `, funcCall) + } else { + p.P(p.varGen.Next(), `:= `, funcCall) + p.P(`this.`, fieldname, ` = *`, p.varGen.Current()) + } + } + } else { + if field.IsEnum() { + val := p.getEnumVal(field, goTyp) + if field.IsRepeated() { + p.P(p.varGen.Next(), ` := r.Intn(10)`) + p.P(`this.`, fieldname, ` = make(`, goTyp, `, `, p.varGen.Current(), `)`) + p.P(`for i := 0; i < `, p.varGen.Current(), `; i++ {`) + p.In() + p.P(`this.`, fieldname, `[i] = `, val) + p.Out() + p.P(`}`) + } else if !gogoproto.IsNullable(field) || proto3 { + p.P(`this.`, fieldname, ` = `, val) + } else { + p.P(p.varGen.Next(), ` := `, val) + p.P(`this.`, fieldname, ` = &`, p.varGen.Current()) + } + } else if gogoproto.IsCustomType(field) { + funcCall := getCustomFuncCall(goTypName) + if field.IsRepeated() { + p.P(p.varGen.Next(), ` := r.Intn(10)`) + p.P(`this.`, fieldname, ` = make(`, goTyp, `, `, p.varGen.Current(), `)`) + p.P(`for i := 0; i < `, p.varGen.Current(), `; i++ {`) + p.In() + p.P(p.varGen.Next(), `:= `, funcCall) + p.P(`this.`, fieldname, `[i] = *`, p.varGen.Current()) + p.Out() + p.P(`}`) + } else if gogoproto.IsNullable(field) { + p.P(`this.`, fieldname, ` = `, funcCall) + } else { + p.P(p.varGen.Next(), `:= `, funcCall) + p.P(`this.`, fieldname, ` = *`, p.varGen.Current()) + } + } else if field.IsBytes() { + if field.IsRepeated() { + p.P(p.varGen.Next(), ` := r.Intn(10)`) + p.P(`this.`, fieldname, ` = make(`, goTyp, `, `, p.varGen.Current(), `)`) + p.P(`for i := 0; i < `, p.varGen.Current(), `; i++ {`) + p.In() + p.P(p.varGen.Next(), ` := r.Intn(100)`) + p.P(`this.`, fieldname, `[i] = make([]byte,`, p.varGen.Current(), `)`) + p.P(`for j := 0; j < `, p.varGen.Current(), `; j++ {`) + p.In() + p.P(`this.`, fieldname, `[i][j] = byte(r.Intn(256))`) + p.Out() + p.P(`}`) + p.Out() + p.P(`}`) + } else { + p.P(p.varGen.Next(), ` := r.Intn(100)`) + p.P(`this.`, fieldname, ` = make(`, goTyp, `, `, p.varGen.Current(), `)`) + p.P(`for i := 0; i < `, p.varGen.Current(), `; i++ {`) + p.In() + p.P(`this.`, fieldname, `[i] = byte(r.Intn(256))`) + p.Out() + p.P(`}`) + } + } else if field.IsString() { + val := fmt.Sprintf("randString%v(r)", p.localName) + if field.IsRepeated() { + p.P(p.varGen.Next(), ` := r.Intn(10)`) + p.P(`this.`, fieldname, ` = make(`, goTyp, `, `, p.varGen.Current(), `)`) + p.P(`for i := 0; i < `, p.varGen.Current(), `; i++ {`) + p.In() + p.P(`this.`, fieldname, `[i] = `, val) + p.Out() + p.P(`}`) + } else if !gogoproto.IsNullable(field) || proto3 { + p.P(`this.`, fieldname, ` = `, val) + } else { + p.P(p.varGen.Next(), `:= `, val) + p.P(`this.`, fieldname, ` = &`, p.varGen.Current()) + } + } else { + typName := generator.GoTypeToName(goTyp) + if field.IsRepeated() { + p.P(p.varGen.Next(), ` := r.Intn(10)`) + p.P(`this.`, fieldname, ` = make(`, goTyp, `, `, p.varGen.Current(), `)`) + p.P(`for i := 0; i < `, p.varGen.Current(), `; i++ {`) + p.In() + p.P(`this.`, fieldname, `[i] = `, value(typName, field.GetType())) + if negative(field.GetType()) { + p.P(`if r.Intn(2) == 0 {`) + p.In() + p.P(`this.`, fieldname, `[i] *= -1`) + p.Out() + p.P(`}`) + } + p.Out() + p.P(`}`) + } else if !gogoproto.IsNullable(field) || proto3 { + p.P(`this.`, fieldname, ` = `, value(typName, field.GetType())) + if negative(field.GetType()) { + p.P(`if r.Intn(2) == 0 {`) + p.In() + p.P(`this.`, fieldname, ` *= -1`) + p.Out() + p.P(`}`) + } + } else { + p.P(p.varGen.Next(), ` := `, value(typName, field.GetType())) + if negative(field.GetType()) { + p.P(`if r.Intn(2) == 0 {`) + p.In() + p.P(p.varGen.Current(), ` *= -1`) + p.Out() + p.P(`}`) + } + p.P(`this.`, fieldname, ` = &`, p.varGen.Current()) + } + } + } +} + +func (p *plugin) hasLoop(field *descriptor.FieldDescriptorProto, visited []*generator.Descriptor, excludes []*generator.Descriptor) *generator.Descriptor { + if field.IsMessage() || p.IsGroup(field) || p.IsMap(field) { + var fieldMessage *generator.Descriptor + if p.IsMap(field) { + m := p.GoMapType(nil, field) + if !m.ValueField.IsMessage() { + return nil + } + fieldMessage = p.ObjectNamed(m.ValueField.GetTypeName()).(*generator.Descriptor) + } else { + fieldMessage = p.ObjectNamed(field.GetTypeName()).(*generator.Descriptor) + } + fieldTypeName := generator.CamelCaseSlice(fieldMessage.TypeName()) + for _, message := range visited { + messageTypeName := generator.CamelCaseSlice(message.TypeName()) + if fieldTypeName == messageTypeName { + for _, e := range excludes { + if fieldTypeName == generator.CamelCaseSlice(e.TypeName()) { + return nil + } + } + return fieldMessage + } + } + for _, f := range fieldMessage.Field { + visited = append(visited, fieldMessage) + loopTo := p.hasLoop(f, visited, excludes) + if loopTo != nil { + return loopTo + } + } + } + return nil +} + +func (p *plugin) loops(field *descriptor.FieldDescriptorProto, message *generator.Descriptor) int { + //fmt.Fprintf(os.Stderr, "loops %v %v\n", field.GetTypeName(), generator.CamelCaseSlice(message.TypeName())) + excludes := []*generator.Descriptor{} + loops := 0 + for { + visited := []*generator.Descriptor{} + loopTo := p.hasLoop(field, visited, excludes) + if loopTo == nil { + break + } + //fmt.Fprintf(os.Stderr, "loopTo %v\n", generator.CamelCaseSlice(loopTo.TypeName())) + excludes = append(excludes, loopTo) + loops++ + } + return loops +} + +func (p *plugin) Generate(file *generator.FileDescriptor) { + p.atleastOne = false + p.PluginImports = generator.NewPluginImports(p.Generator) + p.varGen = NewVarGen() + proto3 := gogoproto.IsProto3(file.FileDescriptorProto) + + p.localName = generator.FileName(file) + protoPkg := p.NewImport("github.com/gogo/protobuf/proto") + if !gogoproto.ImportsGoGoProto(file.FileDescriptorProto) { + protoPkg = p.NewImport("github.com/golang/protobuf/proto") + } + + for _, message := range file.Messages() { + if !gogoproto.HasPopulate(file.FileDescriptorProto, message.DescriptorProto) { + continue + } + if message.DescriptorProto.GetOptions().GetMapEntry() { + continue + } + p.atleastOne = true + ccTypeName := generator.CamelCaseSlice(message.TypeName()) + loopLevels := make([]int, len(message.Field)) + maxLoopLevel := 0 + for i, field := range message.Field { + loopLevels[i] = p.loops(field, message) + if loopLevels[i] > maxLoopLevel { + maxLoopLevel = loopLevels[i] + } + } + ranTotal := 0 + for i := range loopLevels { + ranTotal += int(math.Pow10(maxLoopLevel - loopLevels[i])) + } + p.P(`func NewPopulated`, ccTypeName, `(r randy`, p.localName, `, easy bool) *`, ccTypeName, ` {`) + p.In() + p.P(`this := &`, ccTypeName, `{}`) + if gogoproto.IsUnion(message.File(), message.DescriptorProto) && len(message.Field) > 0 { + p.P(`fieldNum := r.Intn(`, fmt.Sprintf("%d", ranTotal), `)`) + p.P(`switch fieldNum {`) + k := 0 + for i, field := range message.Field { + is := []string{} + ran := int(math.Pow10(maxLoopLevel - loopLevels[i])) + for j := 0; j < ran; j++ { + is = append(is, fmt.Sprintf("%d", j+k)) + } + k += ran + p.P(`case `, strings.Join(is, ","), `:`) + p.In() + p.GenerateField(file, message, field) + p.Out() + } + p.P(`}`) + } else { + var maxFieldNumber int32 + oneofs := make(map[string]struct{}) + for fieldIndex, field := range message.Field { + if field.GetNumber() > maxFieldNumber { + maxFieldNumber = field.GetNumber() + } + oneof := field.OneofIndex != nil + if !oneof { + if field.IsRequired() || (!gogoproto.IsNullable(field) && !field.IsRepeated()) || (proto3 && !field.IsMessage()) { + p.GenerateField(file, message, field) + } else { + if loopLevels[fieldIndex] > 0 { + p.P(`if r.Intn(10) == 0 {`) + } else { + p.P(`if r.Intn(10) != 0 {`) + } + p.In() + p.GenerateField(file, message, field) + p.Out() + p.P(`}`) + } + } else { + fieldname := p.GetFieldName(message, field) + if _, ok := oneofs[fieldname]; ok { + continue + } else { + oneofs[fieldname] = struct{}{} + } + fieldNumbers := []int32{} + for _, f := range message.Field { + fname := p.GetFieldName(message, f) + if fname == fieldname { + fieldNumbers = append(fieldNumbers, f.GetNumber()) + } + } + + p.P(`oneofNumber_`, fieldname, ` := `, fmt.Sprintf("%#v", fieldNumbers), `[r.Intn(`, strconv.Itoa(len(fieldNumbers)), `)]`) + p.P(`switch oneofNumber_`, fieldname, ` {`) + for _, f := range message.Field { + fname := p.GetFieldName(message, f) + if fname != fieldname { + continue + } + p.P(`case `, strconv.Itoa(int(f.GetNumber())), `:`) + p.In() + ccTypeName := p.OneOfTypeName(message, f) + p.P(`this.`, fname, ` = NewPopulated`, ccTypeName, `(r, easy)`) + p.Out() + } + p.P(`}`) + } + } + if message.DescriptorProto.HasExtension() { + p.P(`if !easy && r.Intn(10) != 0 {`) + p.In() + p.P(`l := r.Intn(5)`) + p.P(`for i := 0; i < l; i++ {`) + p.In() + if len(message.DescriptorProto.GetExtensionRange()) > 1 { + p.P(`eIndex := r.Intn(`, strconv.Itoa(len(message.DescriptorProto.GetExtensionRange())), `)`) + p.P(`fieldNumber := 0`) + p.P(`switch eIndex {`) + for i, e := range message.DescriptorProto.GetExtensionRange() { + p.P(`case `, strconv.Itoa(i), `:`) + p.In() + p.P(`fieldNumber = r.Intn(`, strconv.Itoa(int(e.GetEnd()-e.GetStart())), `) + `, strconv.Itoa(int(e.GetStart()))) + p.Out() + if e.GetEnd() > maxFieldNumber { + maxFieldNumber = e.GetEnd() + } + } + p.P(`}`) + } else { + e := message.DescriptorProto.GetExtensionRange()[0] + p.P(`fieldNumber := r.Intn(`, strconv.Itoa(int(e.GetEnd()-e.GetStart())), `) + `, strconv.Itoa(int(e.GetStart()))) + if e.GetEnd() > maxFieldNumber { + maxFieldNumber = e.GetEnd() + } + } + p.P(`wire := r.Intn(4)`) + p.P(`if wire == 3 { wire = 5 }`) + p.P(`data := randField`, p.localName, `(nil, r, fieldNumber, wire)`) + p.P(protoPkg.Use(), `.SetRawExtension(this, int32(fieldNumber), data)`) + p.Out() + p.P(`}`) + p.Out() + p.P(`}`) + } + + if maxFieldNumber < (1 << 10) { + p.P(`if !easy && r.Intn(10) != 0 {`) + p.In() + if gogoproto.HasUnrecognized(file.FileDescriptorProto, message.DescriptorProto) { + p.P(`this.XXX_unrecognized = randUnrecognized`, p.localName, `(r, `, strconv.Itoa(int(maxFieldNumber+1)), `)`) + } + p.Out() + p.P(`}`) + } + } + p.P(`return this`) + p.Out() + p.P(`}`) + p.P(``) + + //Generate NewPopulated functions for oneof fields + m := proto.Clone(message.DescriptorProto).(*descriptor.DescriptorProto) + for _, f := range m.Field { + oneof := f.OneofIndex != nil + if !oneof { + continue + } + ccTypeName := p.OneOfTypeName(message, f) + p.P(`func NewPopulated`, ccTypeName, `(r randy`, p.localName, `, easy bool) *`, ccTypeName, ` {`) + p.In() + p.P(`this := &`, ccTypeName, `{}`) + vanity.TurnOffNullableForNativeTypesWithoutDefaultsOnly(f) + p.GenerateField(file, message, f) + p.P(`return this`) + p.Out() + p.P(`}`) + } + } + + if !p.atleastOne { + return + } + + p.P(`type randy`, p.localName, ` interface {`) + p.In() + p.P(`Float32() float32`) + p.P(`Float64() float64`) + p.P(`Int63() int64`) + p.P(`Int31() int32`) + p.P(`Uint32() uint32`) + p.P(`Intn(n int) int`) + p.Out() + p.P(`}`) + + p.P(`func randUTF8Rune`, p.localName, `(r randy`, p.localName, `) rune {`) + p.In() + p.P(`ru := r.Intn(62)`) + p.P(`if ru < 10 {`) + p.In() + p.P(`return rune(ru+48)`) + p.Out() + p.P(`} else if ru < 36 {`) + p.In() + p.P(`return rune(ru+55)`) + p.Out() + p.P(`}`) + p.P(`return rune(ru+61)`) + p.Out() + p.P(`}`) + + p.P(`func randString`, p.localName, `(r randy`, p.localName, `) string {`) + p.In() + p.P(p.varGen.Next(), ` := r.Intn(100)`) + p.P(`tmps := make([]rune, `, p.varGen.Current(), `)`) + p.P(`for i := 0; i < `, p.varGen.Current(), `; i++ {`) + p.In() + p.P(`tmps[i] = randUTF8Rune`, p.localName, `(r)`) + p.Out() + p.P(`}`) + p.P(`return string(tmps)`) + p.Out() + p.P(`}`) + + p.P(`func randUnrecognized`, p.localName, `(r randy`, p.localName, `, maxFieldNumber int) (data []byte) {`) + p.In() + p.P(`l := r.Intn(5)`) + p.P(`for i := 0; i < l; i++ {`) + p.In() + p.P(`wire := r.Intn(4)`) + p.P(`if wire == 3 { wire = 5 }`) + p.P(`fieldNumber := maxFieldNumber + r.Intn(100)`) + p.P(`data = randField`, p.localName, `(data, r, fieldNumber, wire)`) + p.Out() + p.P(`}`) + p.P(`return data`) + p.Out() + p.P(`}`) + + p.P(`func randField`, p.localName, `(data []byte, r randy`, p.localName, `, fieldNumber int, wire int) []byte {`) + p.In() + p.P(`key := uint32(fieldNumber)<<3 | uint32(wire)`) + p.P(`switch wire {`) + p.P(`case 0:`) + p.In() + p.P(`data = encodeVarintPopulate`, p.localName, `(data, uint64(key))`) + p.P(p.varGen.Next(), ` := r.Int63()`) + p.P(`if r.Intn(2) == 0 {`) + p.In() + p.P(p.varGen.Current(), ` *= -1`) + p.Out() + p.P(`}`) + p.P(`data = encodeVarintPopulate`, p.localName, `(data, uint64(`, p.varGen.Current(), `))`) + p.Out() + p.P(`case 1:`) + p.In() + p.P(`data = encodeVarintPopulate`, p.localName, `(data, uint64(key))`) + p.P(`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)))`) + p.Out() + p.P(`case 2:`) + p.In() + p.P(`data = encodeVarintPopulate`, p.localName, `(data, uint64(key))`) + p.P(`ll := r.Intn(100)`) + p.P(`data = encodeVarintPopulate`, p.localName, `(data, uint64(ll))`) + p.P(`for j := 0; j < ll; j++ {`) + p.In() + p.P(`data = append(data, byte(r.Intn(256)))`) + p.Out() + p.P(`}`) + p.Out() + p.P(`default:`) + p.In() + p.P(`data = encodeVarintPopulate`, p.localName, `(data, uint64(key))`) + p.P(`data = append(data, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)))`) + p.Out() + p.P(`}`) + p.P(`return data`) + p.Out() + p.P(`}`) + + p.P(`func encodeVarintPopulate`, p.localName, `(data []byte, v uint64) []byte {`) + p.In() + p.P(`for v >= 1<<7 {`) + p.In() + p.P(`data = append(data, uint8(uint64(v)&0x7f|0x80))`) + p.P(`v >>= 7`) + p.Out() + p.P(`}`) + p.P(`data = append(data, uint8(v))`) + p.P(`return data`) + p.Out() + p.P(`}`) + +} + +func init() { + generator.RegisterPlugin(NewPlugin()) +} diff --git a/vendor/github.com/gogo/protobuf/plugin/size/size.go b/vendor/github.com/gogo/protobuf/plugin/size/size.go new file mode 100644 index 000000000..7e507c31a --- /dev/null +++ b/vendor/github.com/gogo/protobuf/plugin/size/size.go @@ -0,0 +1,599 @@ +// Copyright (c) 2013, Vastech SA (PTY) LTD. 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. + +/* +The size plugin generates a Size or ProtoSize method for each message. +This is useful with the MarshalTo method generated by the marshalto plugin and the +gogoproto.marshaler and gogoproto.marshaler_all extensions. + +It is enabled by the following extensions: + + - sizer + - sizer_all + - protosizer + - protosizer_all + +The size plugin also generates a test given it is enabled using one of the following extensions: + + - testgen + - testgen_all + +And a benchmark given it is enabled using one of the following extensions: + + - benchgen + - benchgen_all + +Let us look at: + + github.com/gogo/protobuf/test/example/example.proto + +Btw all the output can be seen at: + + github.com/gogo/protobuf/test/example/* + +The following message: + + option (gogoproto.sizer_all) = true; + + message B { + option (gogoproto.description) = true; + 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]; + } + +given to the size plugin, will generate the following code: + + func (m *B) Size() (n int) { + var l int + _ = l + l = m.A.Size() + n += 1 + l + sovExample(uint64(l)) + if len(m.G) > 0 { + for _, e := range m.G { + l = e.Size() + n += 1 + l + sovExample(uint64(l)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n + } + +and the following test code: + + func TestBSize(t *testing5.T) { + popr := math_rand5.New(math_rand5.NewSource(time5.Now().UnixNano())) + p := NewPopulatedB(popr, true) + data, err := github_com_gogo_protobuf_proto2.Marshal(p) + if err != nil { + panic(err) + } + size := p.Size() + if len(data) != size { + t.Fatalf("size %v != marshalled size %v", size, len(data)) + } + } + + func BenchmarkBSize(b *testing5.B) { + popr := math_rand5.New(math_rand5.NewSource(616)) + total := 0 + pops := make([]*B, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedB(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) + } + +The sovExample function is a size of varint function for the example.pb.go file. + +*/ +package size + +import ( + "fmt" + "strconv" + "strings" + + "github.com/gogo/protobuf/gogoproto" + "github.com/gogo/protobuf/proto" + descriptor "github.com/gogo/protobuf/protoc-gen-gogo/descriptor" + "github.com/gogo/protobuf/protoc-gen-gogo/generator" + "github.com/gogo/protobuf/vanity" +) + +type size struct { + *generator.Generator + generator.PluginImports + atleastOne bool + localName string +} + +func NewSize() *size { + return &size{} +} + +func (p *size) Name() string { + return "size" +} + +func (p *size) Init(g *generator.Generator) { + p.Generator = g +} + +func wireToType(wire string) int { + switch wire { + case "fixed64": + return proto.WireFixed64 + case "fixed32": + return proto.WireFixed32 + case "varint": + return proto.WireVarint + case "bytes": + return proto.WireBytes + case "group": + return proto.WireBytes + case "zigzag32": + return proto.WireVarint + case "zigzag64": + return proto.WireVarint + } + panic("unreachable") +} + +func keySize(fieldNumber int32, wireType int) int { + x := uint32(fieldNumber)<<3 | uint32(wireType) + size := 0 + for size = 0; x > 127; size++ { + x >>= 7 + } + size++ + return size +} + +func (p *size) sizeVarint() { + p.P(` + func sov`, p.localName, `(x uint64) (n int) { + for { + n++ + x >>= 7 + if x == 0 { + break + } + } + return n + }`) +} + +func (p *size) sizeZigZag() { + p.P(`func soz`, p.localName, `(x uint64) (n int) { + return sov`, p.localName, `(uint64((x << 1) ^ uint64((int64(x) >> 63)))) + }`) +} + +func (p *size) generateField(proto3 bool, file *generator.FileDescriptor, message *generator.Descriptor, field *descriptor.FieldDescriptorProto, sizeName string) { + fieldname := p.GetOneOfFieldName(message, field) + nullable := gogoproto.IsNullable(field) + repeated := field.IsRepeated() + doNilCheck := gogoproto.NeedsNilCheck(proto3, field) + if repeated { + p.P(`if len(m.`, fieldname, `) > 0 {`) + p.In() + } else if doNilCheck { + p.P(`if m.`, fieldname, ` != nil {`) + p.In() + } + packed := field.IsPacked() + _, wire := p.GoType(message, field) + wireType := wireToType(wire) + fieldNumber := field.GetNumber() + if packed { + wireType = proto.WireBytes + } + key := keySize(fieldNumber, wireType) + switch *field.Type { + case descriptor.FieldDescriptorProto_TYPE_DOUBLE, + descriptor.FieldDescriptorProto_TYPE_FIXED64, + descriptor.FieldDescriptorProto_TYPE_SFIXED64: + if packed { + p.P(`n+=`, strconv.Itoa(key), `+sov`, p.localName, `(uint64(len(m.`, fieldname, `)*8))`, `+len(m.`, fieldname, `)*8`) + } else if repeated { + p.P(`n+=`, strconv.Itoa(key+8), `*len(m.`, fieldname, `)`) + } else if proto3 { + p.P(`if m.`, fieldname, ` != 0 {`) + p.In() + p.P(`n+=`, strconv.Itoa(key+8)) + p.Out() + p.P(`}`) + } else if nullable { + p.P(`n+=`, strconv.Itoa(key+8)) + } else { + p.P(`n+=`, strconv.Itoa(key+8)) + } + case descriptor.FieldDescriptorProto_TYPE_FLOAT, + descriptor.FieldDescriptorProto_TYPE_FIXED32, + descriptor.FieldDescriptorProto_TYPE_SFIXED32: + if packed { + p.P(`n+=`, strconv.Itoa(key), `+sov`, p.localName, `(uint64(len(m.`, fieldname, `)*4))`, `+len(m.`, fieldname, `)*4`) + } else if repeated { + p.P(`n+=`, strconv.Itoa(key+4), `*len(m.`, fieldname, `)`) + } else if proto3 { + p.P(`if m.`, fieldname, ` != 0 {`) + p.In() + p.P(`n+=`, strconv.Itoa(key+4)) + p.Out() + p.P(`}`) + } else if nullable { + p.P(`n+=`, strconv.Itoa(key+4)) + } else { + p.P(`n+=`, strconv.Itoa(key+4)) + } + case descriptor.FieldDescriptorProto_TYPE_INT64, + descriptor.FieldDescriptorProto_TYPE_UINT64, + descriptor.FieldDescriptorProto_TYPE_UINT32, + descriptor.FieldDescriptorProto_TYPE_ENUM, + descriptor.FieldDescriptorProto_TYPE_INT32: + if packed { + p.P(`l = 0`) + p.P(`for _, e := range m.`, fieldname, ` {`) + p.In() + p.P(`l+=sov`, p.localName, `(uint64(e))`) + p.Out() + p.P(`}`) + p.P(`n+=`, strconv.Itoa(key), `+sov`, p.localName, `(uint64(l))+l`) + } else if repeated { + p.P(`for _, e := range m.`, fieldname, ` {`) + p.In() + p.P(`n+=`, strconv.Itoa(key), `+sov`, p.localName, `(uint64(e))`) + p.Out() + p.P(`}`) + } else if proto3 { + p.P(`if m.`, fieldname, ` != 0 {`) + p.In() + p.P(`n+=`, strconv.Itoa(key), `+sov`, p.localName, `(uint64(m.`, fieldname, `))`) + p.Out() + p.P(`}`) + } else if nullable { + p.P(`n+=`, strconv.Itoa(key), `+sov`, p.localName, `(uint64(*m.`, fieldname, `))`) + } else { + p.P(`n+=`, strconv.Itoa(key), `+sov`, p.localName, `(uint64(m.`, fieldname, `))`) + } + case descriptor.FieldDescriptorProto_TYPE_BOOL: + if packed { + p.P(`n+=`, strconv.Itoa(key), `+sov`, p.localName, `(uint64(len(m.`, fieldname, `)))`, `+len(m.`, fieldname, `)*1`) + } else if repeated { + p.P(`n+=`, strconv.Itoa(key+1), `*len(m.`, fieldname, `)`) + } else if proto3 { + p.P(`if m.`, fieldname, ` {`) + p.In() + p.P(`n+=`, strconv.Itoa(key+1)) + p.Out() + p.P(`}`) + } else if nullable { + p.P(`n+=`, strconv.Itoa(key+1)) + } else { + p.P(`n+=`, strconv.Itoa(key+1)) + } + case descriptor.FieldDescriptorProto_TYPE_STRING: + if repeated { + p.P(`for _, s := range m.`, fieldname, ` { `) + p.In() + p.P(`l = len(s)`) + p.P(`n+=`, strconv.Itoa(key), `+l+sov`, p.localName, `(uint64(l))`) + p.Out() + p.P(`}`) + } else if proto3 { + p.P(`l=len(m.`, fieldname, `)`) + p.P(`if l > 0 {`) + p.In() + p.P(`n+=`, strconv.Itoa(key), `+l+sov`, p.localName, `(uint64(l))`) + p.Out() + p.P(`}`) + } else if nullable { + p.P(`l=len(*m.`, fieldname, `)`) + p.P(`n+=`, strconv.Itoa(key), `+l+sov`, p.localName, `(uint64(l))`) + } else { + p.P(`l=len(m.`, fieldname, `)`) + p.P(`n+=`, strconv.Itoa(key), `+l+sov`, p.localName, `(uint64(l))`) + } + case descriptor.FieldDescriptorProto_TYPE_GROUP: + panic(fmt.Errorf("size does not support group %v", fieldname)) + case descriptor.FieldDescriptorProto_TYPE_MESSAGE: + if p.IsMap(field) { + m := p.GoMapType(nil, field) + _, keywire := p.GoType(nil, m.KeyAliasField) + valuegoTyp, _ := p.GoType(nil, m.ValueField) + valuegoAliasTyp, valuewire := p.GoType(nil, m.ValueAliasField) + _, fieldwire := p.GoType(nil, field) + + nullable, valuegoTyp, valuegoAliasTyp = generator.GoMapValueTypes(field, m.ValueField, valuegoTyp, valuegoAliasTyp) + + fieldKeySize := keySize(field.GetNumber(), wireToType(fieldwire)) + keyKeySize := keySize(1, wireToType(keywire)) + valueKeySize := keySize(2, wireToType(valuewire)) + p.P(`for k, v := range m.`, fieldname, ` { `) + p.In() + p.P(`_ = k`) + p.P(`_ = v`) + sum := []string{strconv.Itoa(keyKeySize)} + switch m.KeyField.GetType() { + case descriptor.FieldDescriptorProto_TYPE_DOUBLE, + descriptor.FieldDescriptorProto_TYPE_FIXED64, + descriptor.FieldDescriptorProto_TYPE_SFIXED64: + sum = append(sum, `8`) + case descriptor.FieldDescriptorProto_TYPE_FLOAT, + descriptor.FieldDescriptorProto_TYPE_FIXED32, + descriptor.FieldDescriptorProto_TYPE_SFIXED32: + sum = append(sum, `4`) + case descriptor.FieldDescriptorProto_TYPE_INT64, + descriptor.FieldDescriptorProto_TYPE_UINT64, + descriptor.FieldDescriptorProto_TYPE_UINT32, + descriptor.FieldDescriptorProto_TYPE_ENUM, + descriptor.FieldDescriptorProto_TYPE_INT32: + sum = append(sum, `sov`+p.localName+`(uint64(k))`) + case descriptor.FieldDescriptorProto_TYPE_BOOL: + sum = append(sum, `1`) + case descriptor.FieldDescriptorProto_TYPE_STRING, + descriptor.FieldDescriptorProto_TYPE_BYTES: + sum = append(sum, `len(k)+sov`+p.localName+`(uint64(len(k)))`) + case descriptor.FieldDescriptorProto_TYPE_SINT32, + descriptor.FieldDescriptorProto_TYPE_SINT64: + sum = append(sum, `soz`+p.localName+`(uint64(k))`) + } + sum = append(sum, strconv.Itoa(valueKeySize)) + switch m.ValueField.GetType() { + case descriptor.FieldDescriptorProto_TYPE_DOUBLE, + descriptor.FieldDescriptorProto_TYPE_FIXED64, + descriptor.FieldDescriptorProto_TYPE_SFIXED64: + sum = append(sum, strconv.Itoa(8)) + case descriptor.FieldDescriptorProto_TYPE_FLOAT, + descriptor.FieldDescriptorProto_TYPE_FIXED32, + descriptor.FieldDescriptorProto_TYPE_SFIXED32: + sum = append(sum, strconv.Itoa(4)) + case descriptor.FieldDescriptorProto_TYPE_INT64, + descriptor.FieldDescriptorProto_TYPE_UINT64, + descriptor.FieldDescriptorProto_TYPE_UINT32, + descriptor.FieldDescriptorProto_TYPE_ENUM, + descriptor.FieldDescriptorProto_TYPE_INT32: + sum = append(sum, `sov`+p.localName+`(uint64(v))`) + case descriptor.FieldDescriptorProto_TYPE_BOOL: + sum = append(sum, `1`) + case descriptor.FieldDescriptorProto_TYPE_STRING, + descriptor.FieldDescriptorProto_TYPE_BYTES: + sum = append(sum, `len(v)+sov`+p.localName+`(uint64(len(v)))`) + case descriptor.FieldDescriptorProto_TYPE_SINT32, + descriptor.FieldDescriptorProto_TYPE_SINT64: + sum = append(sum, `soz`+p.localName+`(uint64(v))`) + case descriptor.FieldDescriptorProto_TYPE_MESSAGE: + if nullable { + p.P(`l = 0`) + p.P(`if v != nil {`) + p.In() + if valuegoTyp != valuegoAliasTyp { + p.P(`l = ((`, valuegoTyp, `)(v)).`, sizeName, `()`) + } else { + p.P(`l = v.`, sizeName, `()`) + } + p.Out() + p.P(`}`) + } else { + if valuegoTyp != valuegoAliasTyp { + p.P(`l = ((*`, valuegoTyp, `)(&v)).`, sizeName, `()`) + } else { + p.P(`l = v.`, sizeName, `()`) + } + } + sum = append(sum, `l+sov`+p.localName+`(uint64(l))`) + } + p.P(`mapEntrySize := `, strings.Join(sum, "+")) + p.P(`n+=mapEntrySize+`, fieldKeySize, `+sov`, p.localName, `(uint64(mapEntrySize))`) + p.Out() + p.P(`}`) + } else if repeated { + p.P(`for _, e := range m.`, fieldname, ` { `) + p.In() + p.P(`l=e.`, sizeName, `()`) + p.P(`n+=`, strconv.Itoa(key), `+l+sov`, p.localName, `(uint64(l))`) + p.Out() + p.P(`}`) + } else { + p.P(`l=m.`, fieldname, `.`, sizeName, `()`) + p.P(`n+=`, strconv.Itoa(key), `+l+sov`, p.localName, `(uint64(l))`) + } + case descriptor.FieldDescriptorProto_TYPE_BYTES: + if !gogoproto.IsCustomType(field) { + if repeated { + p.P(`for _, b := range m.`, fieldname, ` { `) + p.In() + p.P(`l = len(b)`) + p.P(`n+=`, strconv.Itoa(key), `+l+sov`, p.localName, `(uint64(l))`) + p.Out() + p.P(`}`) + } else if proto3 { + p.P(`l=len(m.`, fieldname, `)`) + p.P(`if l > 0 {`) + p.In() + p.P(`n+=`, strconv.Itoa(key), `+l+sov`, p.localName, `(uint64(l))`) + p.Out() + p.P(`}`) + } else { + p.P(`l=len(m.`, fieldname, `)`) + p.P(`n+=`, strconv.Itoa(key), `+l+sov`, p.localName, `(uint64(l))`) + } + } else { + if repeated { + p.P(`for _, e := range m.`, fieldname, ` { `) + p.In() + p.P(`l=e.`, sizeName, `()`) + p.P(`n+=`, strconv.Itoa(key), `+l+sov`, p.localName, `(uint64(l))`) + p.Out() + p.P(`}`) + } else { + p.P(`l=m.`, fieldname, `.`, sizeName, `()`) + p.P(`n+=`, strconv.Itoa(key), `+l+sov`, p.localName, `(uint64(l))`) + } + } + case descriptor.FieldDescriptorProto_TYPE_SINT32, + descriptor.FieldDescriptorProto_TYPE_SINT64: + if packed { + p.P(`l = 0`) + p.P(`for _, e := range m.`, fieldname, ` {`) + p.In() + p.P(`l+=soz`, p.localName, `(uint64(e))`) + p.Out() + p.P(`}`) + p.P(`n+=`, strconv.Itoa(key), `+sov`, p.localName, `(uint64(l))+l`) + } else if repeated { + p.P(`for _, e := range m.`, fieldname, ` {`) + p.In() + p.P(`n+=`, strconv.Itoa(key), `+soz`, p.localName, `(uint64(e))`) + p.Out() + p.P(`}`) + } else if proto3 { + p.P(`if m.`, fieldname, ` != 0 {`) + p.In() + p.P(`n+=`, strconv.Itoa(key), `+soz`, p.localName, `(uint64(m.`, fieldname, `))`) + p.Out() + p.P(`}`) + } else if nullable { + p.P(`n+=`, strconv.Itoa(key), `+soz`, p.localName, `(uint64(*m.`, fieldname, `))`) + } else { + p.P(`n+=`, strconv.Itoa(key), `+soz`, p.localName, `(uint64(m.`, fieldname, `))`) + } + default: + panic("not implemented") + } + if repeated || doNilCheck { + p.Out() + p.P(`}`) + } +} + +func (p *size) Generate(file *generator.FileDescriptor) { + p.PluginImports = generator.NewPluginImports(p.Generator) + p.atleastOne = false + p.localName = generator.FileName(file) + protoPkg := p.NewImport("github.com/gogo/protobuf/proto") + if !gogoproto.ImportsGoGoProto(file.FileDescriptorProto) { + protoPkg = p.NewImport("github.com/golang/protobuf/proto") + } + for _, message := range file.Messages() { + sizeName := "" + if gogoproto.IsSizer(file.FileDescriptorProto, message.DescriptorProto) { + sizeName = "Size" + } else if gogoproto.IsProtoSizer(file.FileDescriptorProto, message.DescriptorProto) { + sizeName = "ProtoSize" + } else { + continue + } + if message.DescriptorProto.GetOptions().GetMapEntry() { + continue + } + p.atleastOne = true + ccTypeName := generator.CamelCaseSlice(message.TypeName()) + p.P(`func (m *`, ccTypeName, `) `, sizeName, `() (n int) {`) + p.In() + p.P(`var l int`) + p.P(`_ = l`) + oneofs := make(map[string]struct{}) + for _, field := range message.Field { + oneof := field.OneofIndex != nil + if !oneof { + proto3 := gogoproto.IsProto3(file.FileDescriptorProto) + p.generateField(proto3, file, message, field, sizeName) + } else { + fieldname := p.GetFieldName(message, field) + if _, ok := oneofs[fieldname]; ok { + continue + } else { + oneofs[fieldname] = struct{}{} + } + p.P(`if m.`, fieldname, ` != nil {`) + p.In() + p.P(`n+=m.`, fieldname, `.`, sizeName, `()`) + p.Out() + p.P(`}`) + } + } + if message.DescriptorProto.HasExtension() { + p.P(`if m.XXX_extensions != nil {`) + p.In() + if gogoproto.HasExtensionsMap(file.FileDescriptorProto, message.DescriptorProto) { + p.P(`n += `, protoPkg.Use(), `.SizeOfExtensionMap(m.XXX_extensions)`) + } else { + p.P(`n+=len(m.XXX_extensions)`) + } + p.Out() + p.P(`}`) + } + if gogoproto.HasUnrecognized(file.FileDescriptorProto, message.DescriptorProto) { + p.P(`if m.XXX_unrecognized != nil {`) + p.In() + p.P(`n+=len(m.XXX_unrecognized)`) + p.Out() + p.P(`}`) + } + p.P(`return n`) + p.Out() + p.P(`}`) + p.P() + + //Generate Size methods for oneof fields + m := proto.Clone(message.DescriptorProto).(*descriptor.DescriptorProto) + for _, f := range m.Field { + oneof := f.OneofIndex != nil + if !oneof { + continue + } + ccTypeName := p.OneOfTypeName(message, f) + p.P(`func (m *`, ccTypeName, `) `, sizeName, `() (n int) {`) + p.In() + p.P(`var l int`) + p.P(`_ = l`) + vanity.TurnOffNullableForNativeTypesWithoutDefaultsOnly(f) + p.generateField(false, file, message, f, sizeName) + p.P(`return n`) + p.Out() + p.P(`}`) + } + } + + if !p.atleastOne { + return + } + + p.sizeVarint() + p.sizeZigZag() + +} + +func init() { + generator.RegisterPlugin(NewSize()) +} diff --git a/vendor/github.com/gogo/protobuf/plugin/size/sizetest.go b/vendor/github.com/gogo/protobuf/plugin/size/sizetest.go new file mode 100644 index 000000000..4fa946e57 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/plugin/size/sizetest.go @@ -0,0 +1,132 @@ +// Copyright (c) 2013, Vastech SA (PTY) LTD. 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 size + +import ( + "github.com/gogo/protobuf/gogoproto" + "github.com/gogo/protobuf/plugin/testgen" + "github.com/gogo/protobuf/protoc-gen-gogo/generator" +) + +type test struct { + *generator.Generator +} + +func NewTest(g *generator.Generator) testgen.TestPlugin { + return &test{g} +} + +func (p *test) Generate(imports generator.PluginImports, file *generator.FileDescriptor) bool { + used := false + randPkg := imports.NewImport("math/rand") + timePkg := imports.NewImport("time") + testingPkg := imports.NewImport("testing") + protoPkg := imports.NewImport("github.com/gogo/protobuf/proto") + if !gogoproto.ImportsGoGoProto(file.FileDescriptorProto) { + protoPkg = imports.NewImport("github.com/golang/protobuf/proto") + } + for _, message := range file.Messages() { + ccTypeName := generator.CamelCaseSlice(message.TypeName()) + sizeName := "" + if gogoproto.IsSizer(file.FileDescriptorProto, message.DescriptorProto) { + sizeName = "Size" + } else if gogoproto.IsProtoSizer(file.FileDescriptorProto, message.DescriptorProto) { + sizeName = "ProtoSize" + } else { + continue + } + if message.DescriptorProto.GetOptions().GetMapEntry() { + continue + } + + if gogoproto.HasTestGen(file.FileDescriptorProto, message.DescriptorProto) { + used = true + p.P(`func Test`, ccTypeName, sizeName, `(t *`, testingPkg.Use(), `.T) {`) + p.In() + p.P(`seed := `, timePkg.Use(), `.Now().UnixNano()`) + p.P(`popr := `, randPkg.Use(), `.New(`, randPkg.Use(), `.NewSource(seed))`) + p.P(`p := NewPopulated`, ccTypeName, `(popr, true)`) + p.P(`size2 := `, protoPkg.Use(), `.Size(p)`) + p.P(`data, err := `, protoPkg.Use(), `.Marshal(p)`) + p.P(`if err != nil {`) + p.In() + p.P(`t.Fatalf("seed = %d, err = %v", seed, err)`) + p.Out() + p.P(`}`) + p.P(`size := p.`, sizeName, `()`) + p.P(`if len(data) != size {`) + p.In() + p.P(`t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data))`) + p.Out() + p.P(`}`) + p.P(`if size2 != size {`) + p.In() + p.P(`t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2)`) + p.Out() + p.P(`}`) + p.P(`size3 := `, protoPkg.Use(), `.Size(p)`) + p.P(`if size3 != size {`) + p.In() + p.P(`t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3)`) + p.Out() + p.P(`}`) + p.Out() + p.P(`}`) + p.P() + } + + if gogoproto.HasBenchGen(file.FileDescriptorProto, message.DescriptorProto) { + used = true + p.P(`func Benchmark`, ccTypeName, sizeName, `(b *`, testingPkg.Use(), `.B) {`) + p.In() + p.P(`popr := `, randPkg.Use(), `.New(`, randPkg.Use(), `.NewSource(616))`) + p.P(`total := 0`) + p.P(`pops := make([]*`, ccTypeName, `, 1000)`) + p.P(`for i := 0; i < 1000; i++ {`) + p.In() + p.P(`pops[i] = NewPopulated`, ccTypeName, `(popr, false)`) + p.Out() + p.P(`}`) + p.P(`b.ResetTimer()`) + p.P(`for i := 0; i < b.N; i++ {`) + p.In() + p.P(`total += pops[i%1000].`, sizeName, `()`) + p.Out() + p.P(`}`) + p.P(`b.SetBytes(int64(total / b.N))`) + p.Out() + p.P(`}`) + p.P() + } + + } + return used +} + +func init() { + testgen.RegisterTestPlugin(NewTest) +} diff --git a/vendor/github.com/gogo/protobuf/plugin/stringer/stringer.go b/vendor/github.com/gogo/protobuf/plugin/stringer/stringer.go new file mode 100644 index 000000000..1bd17bbc3 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/plugin/stringer/stringer.go @@ -0,0 +1,293 @@ +// Copyright (c) 2013, Vastech SA (PTY) LTD. 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. + +/* +The stringer plugin generates a String method for each message. + +It is enabled by the following extensions: + + - stringer + - stringer_all + +The stringer plugin also generates a test given it is enabled using one of the following extensions: + + - testgen + - testgen_all + +Let us look at: + + github.com/gogo/protobuf/test/example/example.proto + +Btw all the output can be seen at: + + github.com/gogo/protobuf/test/example/* + +The following message: + + option (gogoproto.goproto_stringer_all) = false; + option (gogoproto.stringer_all) = true; + + 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]; + } + +given to the stringer stringer, will generate the following code: + + func (this *A) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&A{`, + `Description:` + fmt.Sprintf("%v", this.Description) + `,`, + `Number:` + fmt.Sprintf("%v", this.Number) + `,`, + `Id:` + fmt.Sprintf("%v", this.Id) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s + } + +and the following test code: + + func TestAStringer(t *testing4.T) { + popr := math_rand4.New(math_rand4.NewSource(time4.Now().UnixNano())) + p := NewPopulatedA(popr, false) + s1 := p.String() + s2 := fmt1.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } + } + +Typically fmt.Printf("%v") will stop to print when it reaches a pointer and +not print their values, while the generated String method will always print all values, recursively. + +*/ +package stringer + +import ( + "github.com/gogo/protobuf/gogoproto" + "github.com/gogo/protobuf/protoc-gen-gogo/generator" + "strings" +) + +type stringer struct { + *generator.Generator + generator.PluginImports + atleastOne bool + localName string +} + +func NewStringer() *stringer { + return &stringer{} +} + +func (p *stringer) Name() string { + return "stringer" +} + +func (p *stringer) Init(g *generator.Generator) { + p.Generator = g +} + +func (p *stringer) Generate(file *generator.FileDescriptor) { + proto3 := gogoproto.IsProto3(file.FileDescriptorProto) + p.PluginImports = generator.NewPluginImports(p.Generator) + p.atleastOne = false + + p.localName = generator.FileName(file) + + fmtPkg := p.NewImport("fmt") + stringsPkg := p.NewImport("strings") + reflectPkg := p.NewImport("reflect") + sortKeysPkg := p.NewImport("github.com/gogo/protobuf/sortkeys") + for _, message := range file.Messages() { + if !gogoproto.IsStringer(file.FileDescriptorProto, message.DescriptorProto) { + continue + } + if gogoproto.EnabledGoStringer(file.FileDescriptorProto, message.DescriptorProto) { + panic("old string method needs to be disabled, please use gogoproto.goproto_stringer or gogoproto.goproto_stringer_all and set it to false") + } + if message.DescriptorProto.GetOptions().GetMapEntry() { + continue + } + p.atleastOne = true + ccTypeName := generator.CamelCaseSlice(message.TypeName()) + p.P(`func (this *`, ccTypeName, `) String() string {`) + p.In() + p.P(`if this == nil {`) + p.In() + p.P(`return "nil"`) + p.Out() + p.P(`}`) + for _, field := range message.Field { + if !p.IsMap(field) { + continue + } + fieldname := p.GetFieldName(message, field) + + m := p.GoMapType(nil, field) + mapgoTyp, keyField, keyAliasField := m.GoType, m.KeyField, m.KeyAliasField + keysName := `keysFor` + fieldname + keygoTyp, _ := p.GoType(nil, keyField) + keygoTyp = strings.Replace(keygoTyp, "*", "", 1) + keygoAliasTyp, _ := p.GoType(nil, keyAliasField) + keygoAliasTyp = strings.Replace(keygoAliasTyp, "*", "", 1) + keyCapTyp := generator.CamelCase(keygoTyp) + p.P(keysName, ` := make([]`, keygoTyp, `, 0, len(this.`, fieldname, `))`) + p.P(`for k, _ := range this.`, fieldname, ` {`) + p.In() + if keygoAliasTyp == keygoTyp { + p.P(keysName, ` = append(`, keysName, `, k)`) + } else { + p.P(keysName, ` = append(`, keysName, `, `, keygoTyp, `(k))`) + } + p.Out() + p.P(`}`) + p.P(sortKeysPkg.Use(), `.`, keyCapTyp, `s(`, keysName, `)`) + mapName := `mapStringFor` + fieldname + p.P(mapName, ` := "`, mapgoTyp, `{"`) + p.P(`for _, k := range `, keysName, ` {`) + p.In() + if keygoAliasTyp == keygoTyp { + p.P(mapName, ` += fmt.Sprintf("%v: %v,", k, this.`, fieldname, `[k])`) + } else { + p.P(mapName, ` += fmt.Sprintf("%v: %v,", k, this.`, fieldname, `[`, keygoAliasTyp, `(k)])`) + } + p.Out() + p.P(`}`) + p.P(mapName, ` += "}"`) + } + p.P("s := ", stringsPkg.Use(), ".Join([]string{`&", ccTypeName, "{`,") + oneofs := make(map[string]struct{}) + for _, field := range message.Field { + nullable := gogoproto.IsNullable(field) + repeated := field.IsRepeated() + fieldname := p.GetFieldName(message, field) + oneof := field.OneofIndex != nil + if oneof { + if _, ok := oneofs[fieldname]; ok { + continue + } else { + oneofs[fieldname] = struct{}{} + } + p.P("`", fieldname, ":`", ` + `, fmtPkg.Use(), `.Sprintf("%v", this.`, fieldname, ") + `,", "`,") + } else if p.IsMap(field) { + mapName := `mapStringFor` + fieldname + p.P("`", fieldname, ":`", ` + `, mapName, " + `,", "`,") + } else if field.IsMessage() || p.IsGroup(field) { + desc := p.ObjectNamed(field.GetTypeName()) + msgname := p.TypeName(desc) + msgnames := strings.Split(msgname, ".") + typeName := msgnames[len(msgnames)-1] + if nullable { + p.P("`", fieldname, ":`", ` + `, stringsPkg.Use(), `.Replace(`, fmtPkg.Use(), `.Sprintf("%v", this.`, fieldname, `), "`, typeName, `","`, msgname, `"`, ", 1) + `,", "`,") + } else if repeated { + p.P("`", fieldname, ":`", ` + `, stringsPkg.Use(), `.Replace(`, stringsPkg.Use(), `.Replace(`, fmtPkg.Use(), `.Sprintf("%v", this.`, fieldname, `), "`, typeName, `","`, msgname, `"`, ", 1),`&`,``,1) + `,", "`,") + } else { + p.P("`", fieldname, ":`", ` + `, stringsPkg.Use(), `.Replace(`, stringsPkg.Use(), `.Replace(this.`, fieldname, `.String(), "`, typeName, `","`, msgname, `"`, ", 1),`&`,``,1) + `,", "`,") + } + } else { + if nullable && !repeated && !proto3 { + p.P("`", fieldname, ":`", ` + valueToString`, p.localName, `(this.`, fieldname, ") + `,", "`,") + } else { + p.P("`", fieldname, ":`", ` + `, fmtPkg.Use(), `.Sprintf("%v", this.`, fieldname, ") + `,", "`,") + } + } + } + if message.DescriptorProto.HasExtension() { + if gogoproto.HasExtensionsMap(file.FileDescriptorProto, message.DescriptorProto) { + p.P("`XXX_extensions:` + proto.StringFromExtensionsMap(this.XXX_extensions) + `,`,") + } else { + p.P("`XXX_extensions:` + proto.StringFromExtensionsBytes(this.XXX_extensions) + `,`,") + } + } + if gogoproto.HasUnrecognized(file.FileDescriptorProto, message.DescriptorProto) { + p.P("`XXX_unrecognized:` + ", fmtPkg.Use(), `.Sprintf("%v", this.XXX_unrecognized) + `, "`,`,") + } + p.P("`}`,") + p.P(`}`, `,""`, ")") + p.P(`return s`) + p.Out() + p.P(`}`) + + //Generate String methods for oneof fields + for _, field := range message.Field { + oneof := field.OneofIndex != nil + if !oneof { + continue + } + ccTypeName := p.OneOfTypeName(message, field) + p.P(`func (this *`, ccTypeName, `) String() string {`) + p.In() + p.P(`if this == nil {`) + p.In() + p.P(`return "nil"`) + p.Out() + p.P(`}`) + p.P("s := ", stringsPkg.Use(), ".Join([]string{`&", ccTypeName, "{`,") + fieldname := p.GetOneOfFieldName(message, field) + if field.IsMessage() || p.IsGroup(field) { + desc := p.ObjectNamed(field.GetTypeName()) + msgname := p.TypeName(desc) + msgnames := strings.Split(msgname, ".") + typeName := msgnames[len(msgnames)-1] + p.P("`", fieldname, ":`", ` + `, stringsPkg.Use(), `.Replace(`, fmtPkg.Use(), `.Sprintf("%v", this.`, fieldname, `), "`, typeName, `","`, msgname, `"`, ", 1) + `,", "`,") + } else { + p.P("`", fieldname, ":`", ` + `, fmtPkg.Use(), `.Sprintf("%v", this.`, fieldname, ") + `,", "`,") + } + p.P("`}`,") + p.P(`}`, `,""`, ")") + p.P(`return s`) + p.Out() + p.P(`}`) + } + } + + if !p.atleastOne { + return + } + + p.P(`func valueToString`, p.localName, `(v interface{}) string {`) + p.In() + p.P(`rv := `, reflectPkg.Use(), `.ValueOf(v)`) + p.P(`if rv.IsNil() {`) + p.In() + p.P(`return "nil"`) + p.Out() + p.P(`}`) + p.P(`pv := `, reflectPkg.Use(), `.Indirect(rv).Interface()`) + p.P(`return `, fmtPkg.Use(), `.Sprintf("*%v", pv)`) + p.Out() + p.P(`}`) + +} + +func init() { + generator.RegisterPlugin(NewStringer()) +} diff --git a/vendor/github.com/gogo/protobuf/plugin/stringer/stringertest.go b/vendor/github.com/gogo/protobuf/plugin/stringer/stringertest.go new file mode 100644 index 000000000..df615ba78 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/plugin/stringer/stringertest.go @@ -0,0 +1,81 @@ +// Copyright (c) 2013, Vastech SA (PTY) LTD. 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 stringer + +import ( + "github.com/gogo/protobuf/gogoproto" + "github.com/gogo/protobuf/plugin/testgen" + "github.com/gogo/protobuf/protoc-gen-gogo/generator" +) + +type test struct { + *generator.Generator +} + +func NewTest(g *generator.Generator) testgen.TestPlugin { + return &test{g} +} + +func (p *test) Generate(imports generator.PluginImports, file *generator.FileDescriptor) bool { + used := false + randPkg := imports.NewImport("math/rand") + timePkg := imports.NewImport("time") + testingPkg := imports.NewImport("testing") + fmtPkg := imports.NewImport("fmt") + for _, message := range file.Messages() { + ccTypeName := generator.CamelCaseSlice(message.TypeName()) + if !gogoproto.IsStringer(file.FileDescriptorProto, message.DescriptorProto) { + continue + } + if message.DescriptorProto.GetOptions().GetMapEntry() { + continue + } + + if gogoproto.HasTestGen(file.FileDescriptorProto, message.DescriptorProto) { + used = true + p.P(`func Test`, ccTypeName, `Stringer(t *`, testingPkg.Use(), `.T) {`) + p.In() + p.P(`popr := `, randPkg.Use(), `.New(`, randPkg.Use(), `.NewSource(`, timePkg.Use(), `.Now().UnixNano()))`) + p.P(`p := NewPopulated`, ccTypeName, `(popr, false)`) + p.P(`s1 := p.String()`) + p.P(`s2 := `, fmtPkg.Use(), `.Sprintf("%v", p)`) + p.P(`if s1 != s2 {`) + p.In() + p.P(`t.Fatalf("String want %v got %v", s1, s2)`) + p.Out() + p.P(`}`) + p.Out() + p.P(`}`) + } + + } + return used +} + +func init() { + testgen.RegisterTestPlugin(NewTest) +} diff --git a/vendor/github.com/gogo/protobuf/plugin/testgen/testgen.go b/vendor/github.com/gogo/protobuf/plugin/testgen/testgen.go new file mode 100644 index 000000000..a48a1c2cc --- /dev/null +++ b/vendor/github.com/gogo/protobuf/plugin/testgen/testgen.go @@ -0,0 +1,606 @@ +// Copyright (c) 2013, Vastech SA (PTY) LTD. 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. + +/* +The testgen plugin generates Test and Benchmark functions for each message. + +Tests are enabled using the following extensions: + + - testgen + - testgen_all + +Benchmarks are enabled using the following extensions: + + - benchgen + - benchgen_all + +Let us look at: + + github.com/gogo/protobuf/test/example/example.proto + +Btw all the output can be seen at: + + github.com/gogo/protobuf/test/example/* + +The following message: + + option (gogoproto.testgen_all) = true; + option (gogoproto.benchgen_all) = true; + + 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]; + } + +given to the testgen plugin, will generate the following test code: + + func TestAProto(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedA(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &A{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseProto %#v, since %v", msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("%#v !Proto %#v", msg, p) + } + } + + func BenchmarkAProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*A, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedA(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) + } + + func BenchmarkAProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedA(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &A{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) + } + + + func TestAJSON(t *testing1.T) { + popr := math_rand1.New(math_rand1.NewSource(time1.Now().UnixNano())) + p := NewPopulatedA(popr, true) + jsondata, err := encoding_json.Marshal(p) + if err != nil { + panic(err) + } + msg := &A{} + err = encoding_json.Unmarshal(jsondata, msg) + if err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseProto %#v, since %v", msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("%#v !Json Equal %#v", msg, p) + } + } + + func TestAProtoText(t *testing2.T) { + popr := math_rand2.New(math_rand2.NewSource(time2.Now().UnixNano())) + p := NewPopulatedA(popr, true) + data := github_com_gogo_protobuf_proto1.MarshalTextString(p) + msg := &A{} + if err := github_com_gogo_protobuf_proto1.UnmarshalText(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseProto %#v, since %v", msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("%#v !Proto %#v", msg, p) + } + } + + func TestAProtoCompactText(t *testing2.T) { + popr := math_rand2.New(math_rand2.NewSource(time2.Now().UnixNano())) + p := NewPopulatedA(popr, true) + data := github_com_gogo_protobuf_proto1.CompactTextString(p) + msg := &A{} + if err := github_com_gogo_protobuf_proto1.UnmarshalText(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseProto %#v, since %v", msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("%#v !Proto %#v", msg, p) + } + } + +Other registered tests are also generated. +Tests are registered to this test plugin by calling the following function. + + func RegisterTestPlugin(newFunc NewTestPlugin) + +where NewTestPlugin is: + + type NewTestPlugin func(g *generator.Generator) TestPlugin + +and TestPlugin is an interface: + + type TestPlugin interface { + Generate(imports generator.PluginImports, file *generator.FileDescriptor) (used bool) + } + +Plugins that use this interface include: + + - populate + - gostring + - equal + - union + - and more + +Please look at these plugins as examples of how to create your own. +A good idea is to let each plugin generate its own tests. + +*/ +package testgen + +import ( + "github.com/gogo/protobuf/gogoproto" + "github.com/gogo/protobuf/protoc-gen-gogo/generator" +) + +type TestPlugin interface { + Generate(imports generator.PluginImports, file *generator.FileDescriptor) (used bool) +} + +type NewTestPlugin func(g *generator.Generator) TestPlugin + +var testplugins = make([]NewTestPlugin, 0) + +func RegisterTestPlugin(newFunc NewTestPlugin) { + testplugins = append(testplugins, newFunc) +} + +type plugin struct { + *generator.Generator + generator.PluginImports + tests []TestPlugin +} + +func NewPlugin() *plugin { + return &plugin{} +} + +func (p *plugin) Name() string { + return "testgen" +} + +func (p *plugin) Init(g *generator.Generator) { + p.Generator = g + p.tests = make([]TestPlugin, 0, len(testplugins)) + for i := range testplugins { + p.tests = append(p.tests, testplugins[i](g)) + } +} + +func (p *plugin) Generate(file *generator.FileDescriptor) { + p.PluginImports = generator.NewPluginImports(p.Generator) + atLeastOne := false + for i := range p.tests { + used := p.tests[i].Generate(p.PluginImports, file) + if used { + atLeastOne = true + } + } + if atLeastOne { + p.P(`//These tests are generated by github.com/gogo/protobuf/plugin/testgen`) + } +} + +type testProto struct { + *generator.Generator +} + +func newProto(g *generator.Generator) TestPlugin { + return &testProto{g} +} + +func (p *testProto) Generate(imports generator.PluginImports, file *generator.FileDescriptor) bool { + used := false + testingPkg := imports.NewImport("testing") + randPkg := imports.NewImport("math/rand") + timePkg := imports.NewImport("time") + protoPkg := imports.NewImport("github.com/gogo/protobuf/proto") + if !gogoproto.ImportsGoGoProto(file.FileDescriptorProto) { + protoPkg = imports.NewImport("github.com/golang/protobuf/proto") + } + for _, message := range file.Messages() { + ccTypeName := generator.CamelCaseSlice(message.TypeName()) + if message.DescriptorProto.GetOptions().GetMapEntry() { + continue + } + if gogoproto.HasTestGen(file.FileDescriptorProto, message.DescriptorProto) { + used = true + + p.P(`func Test`, ccTypeName, `Proto(t *`, testingPkg.Use(), `.T) {`) + p.In() + p.P(`seed := `, timePkg.Use(), `.Now().UnixNano()`) + p.P(`popr := `, randPkg.Use(), `.New(`, randPkg.Use(), `.NewSource(seed))`) + p.P(`p := NewPopulated`, ccTypeName, `(popr, false)`) + p.P(`data, err := `, protoPkg.Use(), `.Marshal(p)`) + p.P(`if err != nil {`) + p.In() + p.P(`t.Fatalf("seed = %d, err = %v", seed, err)`) + p.Out() + p.P(`}`) + p.P(`msg := &`, ccTypeName, `{}`) + p.P(`if err := `, protoPkg.Use(), `.Unmarshal(data, msg); err != nil {`) + p.In() + p.P(`t.Fatalf("seed = %d, err = %v", seed, err)`) + p.Out() + p.P(`}`) + p.P(`littlefuzz := make([]byte, len(data))`) + p.P(`copy(littlefuzz, data)`) + p.P(`for i := range data {`) + p.In() + p.P(`data[i] = byte(popr.Intn(256))`) + p.Out() + p.P(`}`) + if gogoproto.HasVerboseEqual(file.FileDescriptorProto, message.DescriptorProto) { + p.P(`if err := p.VerboseEqual(msg); err != nil {`) + p.In() + p.P(`t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err)`) + p.Out() + p.P(`}`) + } + p.P(`if !p.Equal(msg) {`) + p.In() + p.P(`t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p)`) + p.Out() + p.P(`}`) + p.P(`if len(littlefuzz) > 0 {`) + p.In() + p.P(`fuzzamount := 100`) + p.P(`for i := 0; i < fuzzamount; i++ {`) + p.In() + p.P(`littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256))`) + p.P(`littlefuzz = append(littlefuzz, byte(popr.Intn(256)))`) + p.Out() + p.P(`}`) + p.P(`// shouldn't panic`) + p.P(`_ = `, protoPkg.Use(), `.Unmarshal(littlefuzz, msg)`) + p.Out() + p.P(`}`) + p.Out() + p.P(`}`) + p.P() + } + + if gogoproto.HasTestGen(file.FileDescriptorProto, message.DescriptorProto) { + if gogoproto.IsMarshaler(file.FileDescriptorProto, message.DescriptorProto) || gogoproto.IsUnsafeMarshaler(file.FileDescriptorProto, message.DescriptorProto) { + p.P(`func Test`, ccTypeName, `MarshalTo(t *`, testingPkg.Use(), `.T) {`) + p.In() + p.P(`seed := `, timePkg.Use(), `.Now().UnixNano()`) + p.P(`popr := `, randPkg.Use(), `.New(`, randPkg.Use(), `.NewSource(seed))`) + p.P(`p := NewPopulated`, ccTypeName, `(popr, false)`) + if gogoproto.IsProtoSizer(file.FileDescriptorProto, message.DescriptorProto) { + p.P(`size := p.ProtoSize()`) + } else { + p.P(`size := p.Size()`) + } + p.P(`data := make([]byte, size)`) + p.P(`for i := range data {`) + p.In() + p.P(`data[i] = byte(popr.Intn(256))`) + p.Out() + p.P(`}`) + p.P(`_, err := p.MarshalTo(data)`) + p.P(`if err != nil {`) + p.In() + p.P(`t.Fatalf("seed = %d, err = %v", seed, err)`) + p.Out() + p.P(`}`) + p.P(`msg := &`, ccTypeName, `{}`) + p.P(`if err := `, protoPkg.Use(), `.Unmarshal(data, msg); err != nil {`) + p.In() + p.P(`t.Fatalf("seed = %d, err = %v", seed, err)`) + p.Out() + p.P(`}`) + p.P(`for i := range data {`) + p.In() + p.P(`data[i] = byte(popr.Intn(256))`) + p.Out() + p.P(`}`) + if gogoproto.HasVerboseEqual(file.FileDescriptorProto, message.DescriptorProto) { + p.P(`if err := p.VerboseEqual(msg); err != nil {`) + p.In() + p.P(`t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err)`) + p.Out() + p.P(`}`) + } + p.P(`if !p.Equal(msg) {`) + p.In() + p.P(`t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p)`) + p.Out() + p.P(`}`) + p.Out() + p.P(`}`) + p.P() + } + } + + if gogoproto.HasBenchGen(file.FileDescriptorProto, message.DescriptorProto) { + used = true + p.P(`func Benchmark`, ccTypeName, `ProtoMarshal(b *`, testingPkg.Use(), `.B) {`) + p.In() + p.P(`popr := `, randPkg.Use(), `.New(`, randPkg.Use(), `.NewSource(616))`) + p.P(`total := 0`) + p.P(`pops := make([]*`, ccTypeName, `, 10000)`) + p.P(`for i := 0; i < 10000; i++ {`) + p.In() + p.P(`pops[i] = NewPopulated`, ccTypeName, `(popr, false)`) + p.Out() + p.P(`}`) + p.P(`b.ResetTimer()`) + p.P(`for i := 0; i < b.N; i++ {`) + p.In() + p.P(`data, err := `, protoPkg.Use(), `.Marshal(pops[i%10000])`) + p.P(`if err != nil {`) + p.In() + p.P(`panic(err)`) + p.Out() + p.P(`}`) + p.P(`total += len(data)`) + p.Out() + p.P(`}`) + p.P(`b.SetBytes(int64(total / b.N))`) + p.Out() + p.P(`}`) + p.P() + + p.P(`func Benchmark`, ccTypeName, `ProtoUnmarshal(b *`, testingPkg.Use(), `.B) {`) + p.In() + p.P(`popr := `, randPkg.Use(), `.New(`, randPkg.Use(), `.NewSource(616))`) + p.P(`total := 0`) + p.P(`datas := make([][]byte, 10000)`) + p.P(`for i := 0; i < 10000; i++ {`) + p.In() + p.P(`data, err := `, protoPkg.Use(), `.Marshal(NewPopulated`, ccTypeName, `(popr, false))`) + p.P(`if err != nil {`) + p.In() + p.P(`panic(err)`) + p.Out() + p.P(`}`) + p.P(`datas[i] = data`) + p.Out() + p.P(`}`) + p.P(`msg := &`, ccTypeName, `{}`) + p.P(`b.ResetTimer()`) + p.P(`for i := 0; i < b.N; i++ {`) + p.In() + p.P(`total += len(datas[i%10000])`) + p.P(`if err := `, protoPkg.Use(), `.Unmarshal(datas[i%10000], msg); err != nil {`) + p.In() + p.P(`panic(err)`) + p.Out() + p.P(`}`) + p.Out() + p.P(`}`) + p.P(`b.SetBytes(int64(total / b.N))`) + p.Out() + p.P(`}`) + p.P() + } + } + return used +} + +type testJson struct { + *generator.Generator +} + +func newJson(g *generator.Generator) TestPlugin { + return &testJson{g} +} + +func (p *testJson) Generate(imports generator.PluginImports, file *generator.FileDescriptor) bool { + used := false + testingPkg := imports.NewImport("testing") + randPkg := imports.NewImport("math/rand") + timePkg := imports.NewImport("time") + jsonPkg := imports.NewImport("github.com/gogo/protobuf/jsonpb") + for _, message := range file.Messages() { + ccTypeName := generator.CamelCaseSlice(message.TypeName()) + if message.DescriptorProto.GetOptions().GetMapEntry() { + continue + } + if gogoproto.HasTestGen(file.FileDescriptorProto, message.DescriptorProto) { + used = true + p.P(`func Test`, ccTypeName, `JSON(t *`, testingPkg.Use(), `.T) {`) + p.In() + p.P(`seed := `, timePkg.Use(), `.Now().UnixNano()`) + p.P(`popr := `, randPkg.Use(), `.New(`, randPkg.Use(), `.NewSource(seed))`) + p.P(`p := NewPopulated`, ccTypeName, `(popr, true)`) + p.P(`marshaler := `, jsonPkg.Use(), `.Marshaler{}`) + p.P(`jsondata, err := marshaler.MarshalToString(p)`) + p.P(`if err != nil {`) + p.In() + p.P(`t.Fatalf("seed = %d, err = %v", seed, err)`) + p.Out() + p.P(`}`) + p.P(`msg := &`, ccTypeName, `{}`) + p.P(`err = `, jsonPkg.Use(), `.UnmarshalString(jsondata, msg)`) + p.P(`if err != nil {`) + p.In() + p.P(`t.Fatalf("seed = %d, err = %v", seed, err)`) + p.Out() + p.P(`}`) + if gogoproto.HasVerboseEqual(file.FileDescriptorProto, message.DescriptorProto) { + p.P(`if err := p.VerboseEqual(msg); err != nil {`) + p.In() + p.P(`t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err)`) + p.Out() + p.P(`}`) + } + p.P(`if !p.Equal(msg) {`) + p.In() + p.P(`t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p)`) + p.Out() + p.P(`}`) + p.Out() + p.P(`}`) + } + } + return used +} + +type testText struct { + *generator.Generator +} + +func newText(g *generator.Generator) TestPlugin { + return &testText{g} +} + +func (p *testText) Generate(imports generator.PluginImports, file *generator.FileDescriptor) bool { + used := false + testingPkg := imports.NewImport("testing") + randPkg := imports.NewImport("math/rand") + timePkg := imports.NewImport("time") + protoPkg := imports.NewImport("github.com/gogo/protobuf/proto") + if !gogoproto.ImportsGoGoProto(file.FileDescriptorProto) { + protoPkg = imports.NewImport("github.com/golang/protobuf/proto") + } + //fmtPkg := imports.NewImport("fmt") + for _, message := range file.Messages() { + ccTypeName := generator.CamelCaseSlice(message.TypeName()) + if message.DescriptorProto.GetOptions().GetMapEntry() { + continue + } + if gogoproto.HasTestGen(file.FileDescriptorProto, message.DescriptorProto) { + used = true + + p.P(`func Test`, ccTypeName, `ProtoText(t *`, testingPkg.Use(), `.T) {`) + p.In() + p.P(`seed := `, timePkg.Use(), `.Now().UnixNano()`) + p.P(`popr := `, randPkg.Use(), `.New(`, randPkg.Use(), `.NewSource(seed))`) + p.P(`p := NewPopulated`, ccTypeName, `(popr, true)`) + p.P(`data := `, protoPkg.Use(), `.MarshalTextString(p)`) + p.P(`msg := &`, ccTypeName, `{}`) + p.P(`if err := `, protoPkg.Use(), `.UnmarshalText(data, msg); err != nil {`) + p.In() + p.P(`t.Fatalf("seed = %d, err = %v", seed, err)`) + p.Out() + p.P(`}`) + if gogoproto.HasVerboseEqual(file.FileDescriptorProto, message.DescriptorProto) { + p.P(`if err := p.VerboseEqual(msg); err != nil {`) + p.In() + p.P(`t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err)`) + p.Out() + p.P(`}`) + } + p.P(`if !p.Equal(msg) {`) + p.In() + p.P(`t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p)`) + p.Out() + p.P(`}`) + p.Out() + p.P(`}`) + p.P() + + p.P(`func Test`, ccTypeName, `ProtoCompactText(t *`, testingPkg.Use(), `.T) {`) + p.In() + p.P(`seed := `, timePkg.Use(), `.Now().UnixNano()`) + p.P(`popr := `, randPkg.Use(), `.New(`, randPkg.Use(), `.NewSource(seed))`) + p.P(`p := NewPopulated`, ccTypeName, `(popr, true)`) + p.P(`data := `, protoPkg.Use(), `.CompactTextString(p)`) + p.P(`msg := &`, ccTypeName, `{}`) + p.P(`if err := `, protoPkg.Use(), `.UnmarshalText(data, msg); err != nil {`) + p.In() + p.P(`t.Fatalf("seed = %d, err = %v", seed, err)`) + p.Out() + p.P(`}`) + if gogoproto.HasVerboseEqual(file.FileDescriptorProto, message.DescriptorProto) { + p.P(`if err := p.VerboseEqual(msg); err != nil {`) + p.In() + p.P(`t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err)`) + p.Out() + p.P(`}`) + } + p.P(`if !p.Equal(msg) {`) + p.In() + p.P(`t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p)`) + p.Out() + p.P(`}`) + p.Out() + p.P(`}`) + p.P() + + } + } + return used +} + +func init() { + RegisterTestPlugin(newProto) + RegisterTestPlugin(newJson) + RegisterTestPlugin(newText) +} diff --git a/vendor/github.com/gogo/protobuf/plugin/union/union.go b/vendor/github.com/gogo/protobuf/plugin/union/union.go new file mode 100644 index 000000000..684047770 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/plugin/union/union.go @@ -0,0 +1,207 @@ +// Copyright (c) 2013, Vastech SA (PTY) LTD. 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. + +/* +The onlyone plugin generates code for the onlyone extension. +All fields must be nullable and only one of the fields may be set, like a union. +Two methods are generated + + GetValue() interface{} + +and + + SetValue(v interface{}) (set bool) + +These provide easier interaction with a onlyone. + +The onlyone extension is not called union as this causes compile errors in the C++ generated code. +There can only be one ;) + +It is enabled by the following extensions: + + - onlyone + - onlyone_all + +The onlyone plugin also generates a test given it is enabled using one of the following extensions: + + - testgen + - testgen_all + +Lets look at: + + github.com/gogo/protobuf/test/example/example.proto + +Btw all the output can be seen at: + + github.com/gogo/protobuf/test/example/* + +The following message: + + message U { + option (gogoproto.onlyone) = true; + optional A A = 1; + optional B B = 2; + } + +given to the onlyone plugin, will generate code which looks a lot like this: + + func (this *U) GetValue() interface{} { + if this.A != nil { + return this.A + } + if this.B != nil { + return this.B + } + return nil + } + + func (this *U) SetValue(value interface{}) bool { + switch vt := value.(type) { + case *A: + this.A = vt + case *B: + this.B = vt + default: + return false + } + return true + } + +and the following test code: + + func TestUUnion(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedU(popr) + v := p.GetValue() + msg := &U{} + if !msg.SetValue(v) { + t.Fatalf("Union: Could not set Value") + } + if !p.Equal(msg) { + t.Fatalf("%#v !Union Equal %#v", msg, p) + } + } + +*/ +package union + +import ( + "github.com/gogo/protobuf/gogoproto" + "github.com/gogo/protobuf/protoc-gen-gogo/generator" +) + +type union struct { + *generator.Generator + generator.PluginImports +} + +func NewUnion() *union { + return &union{} +} + +func (p *union) Name() string { + return "union" +} + +func (p *union) Init(g *generator.Generator) { + p.Generator = g +} + +func (p *union) Generate(file *generator.FileDescriptor) { + p.PluginImports = generator.NewPluginImports(p.Generator) + + for _, message := range file.Messages() { + if !gogoproto.IsUnion(file.FileDescriptorProto, message.DescriptorProto) { + continue + } + if message.DescriptorProto.HasExtension() { + panic("onlyone does not currently support extensions") + } + if message.DescriptorProto.GetOptions().GetMapEntry() { + continue + } + + ccTypeName := generator.CamelCaseSlice(message.TypeName()) + p.P(`func (this *`, ccTypeName, `) GetValue() interface{} {`) + p.In() + for _, field := range message.Field { + fieldname := p.GetFieldName(message, field) + if fieldname == "Value" { + panic("cannot have a onlyone message " + ccTypeName + " with a field named Value") + } + p.P(`if this.`, fieldname, ` != nil {`) + p.In() + p.P(`return this.`, fieldname) + p.Out() + p.P(`}`) + } + p.P(`return nil`) + p.Out() + p.P(`}`) + p.P(``) + p.P(`func (this *`, ccTypeName, `) SetValue(value interface{}) bool {`) + p.In() + p.P(`switch vt := value.(type) {`) + p.In() + for _, field := range message.Field { + fieldname := p.GetFieldName(message, field) + goTyp, _ := p.GoType(message, field) + p.P(`case `, goTyp, `:`) + p.In() + p.P(`this.`, fieldname, ` = vt`) + p.Out() + } + p.P(`default:`) + p.In() + for _, field := range message.Field { + fieldname := p.GetFieldName(message, field) + if field.IsMessage() { + goTyp, _ := p.GoType(message, field) + obj := p.ObjectNamed(field.GetTypeName()).(*generator.Descriptor) + + if gogoproto.IsUnion(obj.File(), obj.DescriptorProto) { + p.P(`this.`, fieldname, ` = new(`, generator.GoTypeToName(goTyp), `)`) + p.P(`if set := this.`, fieldname, `.SetValue(value); set {`) + p.In() + p.P(`return true`) + p.Out() + p.P(`}`) + p.P(`this.`, fieldname, ` = nil`) + } + } + } + p.P(`return false`) + p.Out() + p.P(`}`) + p.P(`return true`) + p.Out() + p.P(`}`) + } +} + +func init() { + generator.RegisterPlugin(NewUnion()) +} diff --git a/vendor/github.com/gogo/protobuf/plugin/union/uniontest.go b/vendor/github.com/gogo/protobuf/plugin/union/uniontest.go new file mode 100644 index 000000000..75e68ed57 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/plugin/union/uniontest.go @@ -0,0 +1,84 @@ +// Copyright (c) 2013, Vastech SA (PTY) LTD. 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 union + +import ( + "github.com/gogo/protobuf/gogoproto" + "github.com/gogo/protobuf/plugin/testgen" + "github.com/gogo/protobuf/protoc-gen-gogo/generator" +) + +type test struct { + *generator.Generator +} + +func NewTest(g *generator.Generator) testgen.TestPlugin { + return &test{g} +} + +func (p *test) Generate(imports generator.PluginImports, file *generator.FileDescriptor) bool { + used := false + randPkg := imports.NewImport("math/rand") + timePkg := imports.NewImport("time") + testingPkg := imports.NewImport("testing") + for _, message := range file.Messages() { + if !gogoproto.IsUnion(file.FileDescriptorProto, message.DescriptorProto) || + !gogoproto.HasTestGen(file.FileDescriptorProto, message.DescriptorProto) { + continue + } + if message.DescriptorProto.GetOptions().GetMapEntry() { + continue + } + used = true + ccTypeName := generator.CamelCaseSlice(message.TypeName()) + + p.P(`func Test`, ccTypeName, `OnlyOne(t *`, testingPkg.Use(), `.T) {`) + p.In() + p.P(`popr := `, randPkg.Use(), `.New(`, randPkg.Use(), `.NewSource(`, timePkg.Use(), `.Now().UnixNano()))`) + p.P(`p := NewPopulated`, ccTypeName, `(popr, true)`) + p.P(`v := p.GetValue()`) + p.P(`msg := &`, ccTypeName, `{}`) + p.P(`if !msg.SetValue(v) {`) + p.In() + p.P(`t.Fatalf("OnlyOne: Could not set Value")`) + p.Out() + p.P(`}`) + p.P(`if !p.Equal(msg) {`) + p.In() + p.P(`t.Fatalf("%#v !OnlyOne Equal %#v", msg, p)`) + p.Out() + p.P(`}`) + p.Out() + p.P(`}`) + + } + return used +} + +func init() { + testgen.RegisterTestPlugin(NewTest) +} diff --git a/vendor/github.com/gogo/protobuf/plugin/unmarshal/unmarshal.go b/vendor/github.com/gogo/protobuf/plugin/unmarshal/unmarshal.go new file mode 100644 index 000000000..e87f4726a --- /dev/null +++ b/vendor/github.com/gogo/protobuf/plugin/unmarshal/unmarshal.go @@ -0,0 +1,1319 @@ +// Copyright (c) 2013, Vastech SA (PTY) LTD. 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. + +/* +The unmarshal plugin generates a Unmarshal method for each message. +The `Unmarshal([]byte) error` method results in the fact that the message +implements the Unmarshaler interface. +The allows proto.Unmarshal to be faster by calling the generated Unmarshal method rather than using reflect. + +If is enabled by the following extensions: + + - unmarshaler + - unmarshaler_all + +Or the following extensions: + + - unsafe_unmarshaler + - unsafe_unmarshaler_all + +That is if you want to use the unsafe package in your generated code. +The speed up using the unsafe package is not very significant. + +The generation of unmarshalling tests are enabled using one of the following extensions: + + - testgen + - testgen_all + +And benchmarks given it is enabled using one of the following extensions: + + - benchgen + - benchgen_all + +Let us look at: + + github.com/gogo/protobuf/test/example/example.proto + +Btw all the output can be seen at: + + github.com/gogo/protobuf/test/example/* + +The following message: + + option (gogoproto.unmarshaler_all) = true; + + message B { + option (gogoproto.description) = true; + 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]; + } + +given to the unmarshal plugin, will generate the following code: + + func (m *B) Unmarshal(data []byte) error { + l := len(data) + iNdEx := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + 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) + switch fieldNum { + case 1: + if wireType != 2 { + return proto.ErrWrongType + } + var msglen int + for shift := uint(0); ; shift += 7 { + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.A.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return proto.ErrWrongType + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + postIndex := iNdEx + byteLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.G = append(m.G, github_com_gogo_protobuf_test_custom.Uint128{}) + if err := m.G[len(m.G)-1].Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + var sizeOfWire int + for { + sizeOfWire++ + wire >>= 7 + if wire == 0 { + break + } + } + iNdEx -= sizeOfWire + skippy, err := skip(data[iNdEx:]) + if err != nil { + return err + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + return nil + } + +Remember when using this code to call proto.Unmarshal. +This will call m.Reset and invoke the generated Unmarshal method for you. +If you call m.Unmarshal without m.Reset you could be merging protocol buffers. + +*/ +package unmarshal + +import ( + "fmt" + "strconv" + "strings" + + "github.com/gogo/protobuf/gogoproto" + "github.com/gogo/protobuf/proto" + descriptor "github.com/gogo/protobuf/protoc-gen-gogo/descriptor" + "github.com/gogo/protobuf/protoc-gen-gogo/generator" +) + +type unmarshal struct { + *generator.Generator + unsafe bool + generator.PluginImports + atleastOne bool + ioPkg generator.Single + mathPkg generator.Single + unsafePkg generator.Single + localName string +} + +func NewUnmarshal() *unmarshal { + return &unmarshal{} +} + +func NewUnsafeUnmarshal() *unmarshal { + return &unmarshal{unsafe: true} +} + +func (p *unmarshal) Name() string { + if p.unsafe { + return "unsafeunmarshaler" + } + return "unmarshal" +} + +func (p *unmarshal) Init(g *generator.Generator) { + p.Generator = g +} + +func (p *unmarshal) decodeVarint(varName string, typName string) { + p.P(`for shift := uint(0); ; shift += 7 {`) + p.In() + p.P(`if shift >= 64 {`) + p.In() + p.P(`return ErrIntOverflow` + p.localName) + p.Out() + p.P(`}`) + p.P(`if iNdEx >= l {`) + p.In() + p.P(`return `, p.ioPkg.Use(), `.ErrUnexpectedEOF`) + p.Out() + p.P(`}`) + p.P(`b := data[iNdEx]`) + p.P(`iNdEx++`) + p.P(varName, ` |= (`, typName, `(b) & 0x7F) << shift`) + p.P(`if b < 0x80 {`) + p.In() + p.P(`break`) + p.Out() + p.P(`}`) + p.Out() + p.P(`}`) +} + +func (p *unmarshal) decodeFixed32(varName string, typeName string) { + p.P(`if (iNdEx+4) > l {`) + p.In() + p.P(`return `, p.ioPkg.Use(), `.ErrUnexpectedEOF`) + p.Out() + p.P(`}`) + p.P(`iNdEx += 4`) + p.P(varName, ` = `, typeName, `(data[iNdEx-4])`) + p.P(varName, ` |= `, typeName, `(data[iNdEx-3]) << 8`) + p.P(varName, ` |= `, typeName, `(data[iNdEx-2]) << 16`) + p.P(varName, ` |= `, typeName, `(data[iNdEx-1]) << 24`) +} + +func (p *unmarshal) unsafeFixed32(varName string, typeName string) { + p.P(`if iNdEx + 4 > l {`) + p.In() + p.P(`return `, p.ioPkg.Use(), `.ErrUnexpectedEOF`) + p.Out() + p.P(`}`) + p.P(varName, ` = *(*`, typeName, `)(`, p.unsafePkg.Use(), `.Pointer(&data[iNdEx]))`) + p.P(`iNdEx += 4`) +} + +func (p *unmarshal) decodeFixed64(varName string, typeName string) { + p.P(`if (iNdEx+8) > l {`) + p.In() + p.P(`return `, p.ioPkg.Use(), `.ErrUnexpectedEOF`) + p.Out() + p.P(`}`) + p.P(`iNdEx += 8`) + p.P(varName, ` = `, typeName, `(data[iNdEx-8])`) + p.P(varName, ` |= `, typeName, `(data[iNdEx-7]) << 8`) + p.P(varName, ` |= `, typeName, `(data[iNdEx-6]) << 16`) + p.P(varName, ` |= `, typeName, `(data[iNdEx-5]) << 24`) + p.P(varName, ` |= `, typeName, `(data[iNdEx-4]) << 32`) + p.P(varName, ` |= `, typeName, `(data[iNdEx-3]) << 40`) + p.P(varName, ` |= `, typeName, `(data[iNdEx-2]) << 48`) + p.P(varName, ` |= `, typeName, `(data[iNdEx-1]) << 56`) +} + +func (p *unmarshal) unsafeFixed64(varName string, typeName string) { + p.P(`if iNdEx + 8 > l {`) + p.In() + p.P(`return `, p.ioPkg.Use(), `.ErrUnexpectedEOF`) + p.Out() + p.P(`}`) + p.P(varName, ` = *(*`, typeName, `)(`, p.unsafePkg.Use(), `.Pointer(&data[iNdEx]))`) + p.P(`iNdEx += 8`) +} + +func (p *unmarshal) mapField(varName string, field *descriptor.FieldDescriptorProto) { + switch field.GetType() { + case descriptor.FieldDescriptorProto_TYPE_DOUBLE: + p.P(`var `, varName, `temp uint64`) + p.decodeFixed64(varName+"temp", "uint64") + p.P(varName, ` := `, p.mathPkg.Use(), `.Float64frombits(`, varName, `temp)`) + case descriptor.FieldDescriptorProto_TYPE_FLOAT: + p.P(`var `, varName, `temp uint32`) + p.decodeFixed32(varName+"temp", "uint32") + p.P(varName, ` := `, p.mathPkg.Use(), `.Float32frombits(`, varName, `temp)`) + case descriptor.FieldDescriptorProto_TYPE_INT64: + p.P(`var `, varName, ` int64`) + p.decodeVarint(varName, "int64") + case descriptor.FieldDescriptorProto_TYPE_UINT64: + p.P(`var `, varName, ` uint64`) + p.decodeVarint(varName, "uint64") + case descriptor.FieldDescriptorProto_TYPE_INT32: + p.P(`var `, varName, ` int32`) + p.decodeVarint(varName, "int32") + case descriptor.FieldDescriptorProto_TYPE_FIXED64: + p.P(`var `, varName, ` uint64`) + p.decodeFixed64(varName, "uint64") + case descriptor.FieldDescriptorProto_TYPE_FIXED32: + p.P(`var `, varName, ` uint32`) + p.decodeFixed32(varName, "uint32") + case descriptor.FieldDescriptorProto_TYPE_BOOL: + p.P(`var `, varName, `temp int`) + p.decodeVarint(varName+"temp", "int") + p.P(varName, ` := bool(`, varName, `temp != 0)`) + case descriptor.FieldDescriptorProto_TYPE_STRING: + p.P(`var stringLen`, varName, ` uint64`) + p.decodeVarint("stringLen"+varName, "uint64") + p.P(`intStringLen`, varName, ` := int(stringLen`, varName, `)`) + p.P(`if intStringLen`, varName, ` < 0 {`) + p.In() + p.P(`return ErrInvalidLength` + p.localName) + p.Out() + p.P(`}`) + p.P(`postStringIndex`, varName, ` := iNdEx + intStringLen`, varName) + p.P(`if postStringIndex`, varName, ` > l {`) + p.In() + p.P(`return `, p.ioPkg.Use(), `.ErrUnexpectedEOF`) + p.Out() + p.P(`}`) + cast, _ := p.GoType(nil, field) + cast = strings.Replace(cast, "*", "", 1) + p.P(varName, ` := `, cast, `(data[iNdEx:postStringIndex`, varName, `])`) + p.P(`iNdEx = postStringIndex`, varName) + case descriptor.FieldDescriptorProto_TYPE_MESSAGE: + p.P(`var mapmsglen int`) + p.decodeVarint("mapmsglen", "int") + p.P(`if mapmsglen < 0 {`) + p.In() + p.P(`return ErrInvalidLength` + p.localName) + p.Out() + p.P(`}`) + p.P(`postmsgIndex := iNdEx + mapmsglen`) + p.P(`if mapmsglen < 0 {`) + p.In() + p.P(`return ErrInvalidLength` + p.localName) + p.Out() + p.P(`}`) + p.P(`if postmsgIndex > l {`) + p.In() + p.P(`return `, p.ioPkg.Use(), `.ErrUnexpectedEOF`) + p.Out() + p.P(`}`) + desc := p.ObjectNamed(field.GetTypeName()) + msgname := p.TypeName(desc) + p.P(varName, ` := &`, msgname, `{}`) + p.P(`if err := `, varName, `.Unmarshal(data[iNdEx:postmsgIndex]); err != nil {`) + p.In() + p.P(`return err`) + p.Out() + p.P(`}`) + p.P(`iNdEx = postmsgIndex`) + case descriptor.FieldDescriptorProto_TYPE_BYTES: + p.P(`var mapbyteLen uint64`) + p.decodeVarint("mapbyteLen", "uint64") + p.P(`intMapbyteLen := int(mapbyteLen)`) + p.P(`if intMapbyteLen < 0 {`) + p.In() + p.P(`return ErrInvalidLength` + p.localName) + p.Out() + p.P(`}`) + p.P(`postbytesIndex := iNdEx + intMapbyteLen`) + p.P(`if postbytesIndex > l {`) + p.In() + p.P(`return `, p.ioPkg.Use(), `.ErrUnexpectedEOF`) + p.Out() + p.P(`}`) + p.P(varName, ` := make([]byte, mapbyteLen)`) + p.P(`copy(`, varName, `, data[iNdEx:postbytesIndex])`) + p.P(`iNdEx = postbytesIndex`) + case descriptor.FieldDescriptorProto_TYPE_UINT32: + p.P(`var `, varName, ` uint32`) + p.decodeVarint(varName, "uint32") + case descriptor.FieldDescriptorProto_TYPE_ENUM: + typName := p.TypeName(p.ObjectNamed(field.GetTypeName())) + p.P(`var `, varName, ` `, typName) + p.decodeVarint(varName, typName) + case descriptor.FieldDescriptorProto_TYPE_SFIXED32: + p.P(`var `, varName, ` int32`) + p.decodeFixed32(varName, "int32") + case descriptor.FieldDescriptorProto_TYPE_SFIXED64: + p.P(`var `, varName, ` int64`) + p.decodeFixed64(varName, "int64") + case descriptor.FieldDescriptorProto_TYPE_SINT32: + p.P(`var `, varName, `temp int32`) + p.decodeVarint(varName+"temp", "int32") + p.P(varName, `temp = int32((uint32(`, varName, `temp) >> 1) ^ uint32(((`, varName, `temp&1)<<31)>>31))`) + p.P(varName, ` := int32(`, varName, `temp)`) + case descriptor.FieldDescriptorProto_TYPE_SINT64: + p.P(`var `, varName, `temp uint64`) + p.decodeVarint(varName+"temp", "uint64") + p.P(varName, `temp = (`, varName, `temp >> 1) ^ uint64((int64(`, varName, `temp&1)<<63)>>63)`) + p.P(varName, ` := int64(`, varName, `temp)`) + } +} + +func (p *unmarshal) noStarOrSliceType(msg *generator.Descriptor, field *descriptor.FieldDescriptorProto) string { + typ, _ := p.GoType(msg, field) + if typ[0] == '*' { + return typ[1:] + } + if typ[0] == '[' && typ[1] == ']' { + return typ[2:] + } + return typ +} + +func (p *unmarshal) field(file *generator.FileDescriptor, msg *generator.Descriptor, field *descriptor.FieldDescriptorProto, fieldname string, proto3 bool) { + repeated := field.IsRepeated() + nullable := gogoproto.IsNullable(field) + typ := p.noStarOrSliceType(msg, field) + oneof := field.OneofIndex != nil + switch *field.Type { + case descriptor.FieldDescriptorProto_TYPE_DOUBLE: + if !p.unsafe || gogoproto.IsCastType(field) { + p.P(`var v uint64`) + p.decodeFixed64("v", "uint64") + if oneof { + p.P(`m.`, fieldname, ` = &`, p.OneOfTypeName(msg, field), `{`, typ, "(", p.mathPkg.Use(), `.Float64frombits(v))}`) + } else if repeated { + p.P(`v2 := `, typ, "(", p.mathPkg.Use(), `.Float64frombits(v))`) + p.P(`m.`, fieldname, ` = append(m.`, fieldname, `, v2)`) + } else if proto3 || !nullable { + p.P(`m.`, fieldname, ` = `, typ, "(", p.mathPkg.Use(), `.Float64frombits(v))`) + } else { + p.P(`v2 := `, typ, "(", p.mathPkg.Use(), `.Float64frombits(v))`) + p.P(`m.`, fieldname, ` = &v2`) + } + } else { + if oneof { + p.P(`var v float64`) + p.unsafeFixed64("v", "float64") + p.P(`m.`, fieldname, ` = &`, p.OneOfTypeName(msg, field), `{v}`) + } else if repeated { + p.P(`var v float64`) + p.unsafeFixed64("v", "float64") + p.P(`m.`, fieldname, ` = append(m.`, fieldname, `, v)`) + } else if proto3 || !nullable { + p.unsafeFixed64(`m.`+fieldname, "float64") + } else { + p.P(`var v float64`) + p.unsafeFixed64("v", "float64") + p.P(`m.`, fieldname, ` = &v`) + } + } + case descriptor.FieldDescriptorProto_TYPE_FLOAT: + if !p.unsafe || gogoproto.IsCastType(field) { + p.P(`var v uint32`) + p.decodeFixed32("v", "uint32") + if oneof { + p.P(`m.`, fieldname, ` = &`, p.OneOfTypeName(msg, field), `{`, typ, "(", p.mathPkg.Use(), `.Float32frombits(v))}`) + } else if repeated { + p.P(`v2 := `, typ, "(", p.mathPkg.Use(), `.Float32frombits(v))`) + p.P(`m.`, fieldname, ` = append(m.`, fieldname, `, v2)`) + } else if proto3 || !nullable { + p.P(`m.`, fieldname, ` = `, typ, "(", p.mathPkg.Use(), `.Float32frombits(v))`) + } else { + p.P(`v2 := `, typ, "(", p.mathPkg.Use(), `.Float32frombits(v))`) + p.P(`m.`, fieldname, ` = &v2`) + } + } else { + if oneof { + p.P(`var v float32`) + p.unsafeFixed32("v", "float32") + p.P(`m.`, fieldname, ` = &`, p.OneOfTypeName(msg, field), `{v}`) + } else if repeated { + p.P(`var v float32`) + p.unsafeFixed32("v", "float32") + p.P(`m.`, fieldname, ` = append(m.`, fieldname, `, v)`) + } else if proto3 || !nullable { + p.unsafeFixed32("m."+fieldname, "float32") + } else { + p.P(`var v float32`) + p.unsafeFixed32("v", "float32") + p.P(`m.`, fieldname, ` = &v`) + } + } + case descriptor.FieldDescriptorProto_TYPE_INT64: + if oneof { + p.P(`var v `, typ) + p.decodeVarint("v", typ) + p.P(`m.`, fieldname, ` = &`, p.OneOfTypeName(msg, field), `{v}`) + } else if repeated { + p.P(`var v `, typ) + p.decodeVarint("v", typ) + p.P(`m.`, fieldname, ` = append(m.`, fieldname, `, v)`) + } else if proto3 || !nullable { + p.P(`m.`, fieldname, ` = 0`) + p.decodeVarint("m."+fieldname, typ) + } else { + p.P(`var v `, typ) + p.decodeVarint("v", typ) + p.P(`m.`, fieldname, ` = &v`) + } + case descriptor.FieldDescriptorProto_TYPE_UINT64: + if oneof { + p.P(`var v `, typ) + p.decodeVarint("v", typ) + p.P(`m.`, fieldname, ` = &`, p.OneOfTypeName(msg, field), `{v}`) + } else if repeated { + p.P(`var v `, typ) + p.decodeVarint("v", typ) + p.P(`m.`, fieldname, ` = append(m.`, fieldname, `, v)`) + } else if proto3 || !nullable { + p.P(`m.`, fieldname, ` = 0`) + p.decodeVarint("m."+fieldname, typ) + } else { + p.P(`var v `, typ) + p.decodeVarint("v", typ) + p.P(`m.`, fieldname, ` = &v`) + } + case descriptor.FieldDescriptorProto_TYPE_INT32: + if oneof { + p.P(`var v `, typ) + p.decodeVarint("v", typ) + p.P(`m.`, fieldname, ` = &`, p.OneOfTypeName(msg, field), `{v}`) + } else if repeated { + p.P(`var v `, typ) + p.decodeVarint("v", typ) + p.P(`m.`, fieldname, ` = append(m.`, fieldname, `, v)`) + } else if proto3 || !nullable { + p.P(`m.`, fieldname, ` = 0`) + p.decodeVarint("m."+fieldname, typ) + } else { + p.P(`var v `, typ) + p.decodeVarint("v", typ) + p.P(`m.`, fieldname, ` = &v`) + } + case descriptor.FieldDescriptorProto_TYPE_FIXED64: + if !p.unsafe || gogoproto.IsCastType(field) { + if oneof { + p.P(`var v `, typ) + p.decodeFixed64("v", typ) + p.P(`m.`, fieldname, ` = &`, p.OneOfTypeName(msg, field), `{v}`) + } else if repeated { + p.P(`var v `, typ) + p.decodeFixed64("v", typ) + p.P(`m.`, fieldname, ` = append(m.`, fieldname, `, v)`) + } else if proto3 || !nullable { + p.P(`m.`, fieldname, ` = 0`) + p.decodeFixed64("m."+fieldname, typ) + } else { + p.P(`var v `, typ) + p.decodeFixed64("v", typ) + p.P(`m.`, fieldname, ` = &v`) + } + } else { + if oneof { + p.P(`var v uint64`) + p.unsafeFixed64("v", "uint64") + p.P(`m.`, fieldname, ` = &`, p.OneOfTypeName(msg, field), `{v}`) + } else if repeated { + p.P(`var v uint64`) + p.unsafeFixed64("v", "uint64") + p.P(`m.`, fieldname, ` = append(m.`, fieldname, `, v)`) + } else if proto3 || !nullable { + p.unsafeFixed64("m."+fieldname, "uint64") + } else { + p.P(`var v uint64`) + p.unsafeFixed64("v", "uint64") + p.P(`m.`, fieldname, ` = &v`) + } + } + case descriptor.FieldDescriptorProto_TYPE_FIXED32: + if !p.unsafe || gogoproto.IsCastType(field) { + if oneof { + p.P(`var v `, typ) + p.decodeFixed32("v", typ) + p.P(`m.`, fieldname, ` = &`, p.OneOfTypeName(msg, field), `{v}`) + } else if repeated { + p.P(`var v `, typ) + p.decodeFixed32("v", typ) + p.P(`m.`, fieldname, ` = append(m.`, fieldname, `, v)`) + } else if proto3 || !nullable { + p.P(`m.`, fieldname, ` = 0`) + p.decodeFixed32("m."+fieldname, typ) + } else { + p.P(`var v `, typ) + p.decodeFixed32("v", typ) + p.P(`m.`, fieldname, ` = &v`) + } + } else { + if oneof { + p.P(`var v uint32`) + p.unsafeFixed32("v", "uint32") + p.P(`m.`, fieldname, ` = &`, p.OneOfTypeName(msg, field), `{v}`) + } else if repeated { + p.P(`var v uint32`) + p.unsafeFixed32("v", "uint32") + p.P(`m.`, fieldname, ` = append(m.`, fieldname, `, v)`) + } else if proto3 || !nullable { + p.unsafeFixed32("m."+fieldname, "uint32") + } else { + p.P(`var v uint32`) + p.unsafeFixed32("v", "uint32") + p.P(`m.`, fieldname, ` = &v`) + } + } + case descriptor.FieldDescriptorProto_TYPE_BOOL: + p.P(`var v int`) + p.decodeVarint("v", "int") + if oneof { + p.P(`b := `, typ, `(v != 0)`) + p.P(`m.`, fieldname, ` = &`, p.OneOfTypeName(msg, field), `{b}`) + } else if repeated { + p.P(`m.`, fieldname, ` = append(m.`, fieldname, `, `, typ, `(v != 0))`) + } else if proto3 || !nullable { + p.P(`m.`, fieldname, ` = `, typ, `(v != 0)`) + } else { + p.P(`b := `, typ, `(v != 0)`) + p.P(`m.`, fieldname, ` = &b`) + } + case descriptor.FieldDescriptorProto_TYPE_STRING: + p.P(`var stringLen uint64`) + p.decodeVarint("stringLen", "uint64") + p.P(`intStringLen := int(stringLen)`) + p.P(`if intStringLen < 0 {`) + p.In() + p.P(`return ErrInvalidLength` + p.localName) + p.Out() + p.P(`}`) + p.P(`postIndex := iNdEx + intStringLen`) + p.P(`if postIndex > l {`) + p.In() + p.P(`return `, p.ioPkg.Use(), `.ErrUnexpectedEOF`) + p.Out() + p.P(`}`) + if oneof { + p.P(`m.`, fieldname, ` = &`, p.OneOfTypeName(msg, field), `{`, typ, `(data[iNdEx:postIndex])}`) + } else if repeated { + p.P(`m.`, fieldname, ` = append(m.`, fieldname, `, `, typ, `(data[iNdEx:postIndex]))`) + } else if proto3 || !nullable { + p.P(`m.`, fieldname, ` = `, typ, `(data[iNdEx:postIndex])`) + } else { + p.P(`s := `, typ, `(data[iNdEx:postIndex])`) + p.P(`m.`, fieldname, ` = &s`) + } + p.P(`iNdEx = postIndex`) + case descriptor.FieldDescriptorProto_TYPE_GROUP: + panic(fmt.Errorf("unmarshaler does not support group %v", fieldname)) + case descriptor.FieldDescriptorProto_TYPE_MESSAGE: + desc := p.ObjectNamed(field.GetTypeName()) + msgname := p.TypeName(desc) + p.P(`var msglen int`) + p.decodeVarint("msglen", "int") + p.P(`if msglen < 0 {`) + p.In() + p.P(`return ErrInvalidLength` + p.localName) + p.Out() + p.P(`}`) + p.P(`postIndex := iNdEx + msglen`) + p.P(`if postIndex > l {`) + p.In() + p.P(`return `, p.ioPkg.Use(), `.ErrUnexpectedEOF`) + p.Out() + p.P(`}`) + if oneof { + p.P(`v := &`, msgname, `{}`) + p.P(`if err := v.Unmarshal(data[iNdEx:postIndex]); err != nil {`) + p.In() + p.P(`return err`) + p.Out() + p.P(`}`) + p.P(`m.`, fieldname, ` = &`, p.OneOfTypeName(msg, field), `{v}`) + } else if p.IsMap(field) { + m := p.GoMapType(nil, field) + + keygoTyp, _ := p.GoType(nil, m.KeyField) + keygoAliasTyp, _ := p.GoType(nil, m.KeyAliasField) + // keys may not be pointers + keygoTyp = strings.Replace(keygoTyp, "*", "", 1) + keygoAliasTyp = strings.Replace(keygoAliasTyp, "*", "", 1) + + valuegoTyp, _ := p.GoType(nil, m.ValueField) + valuegoAliasTyp, _ := p.GoType(nil, m.ValueAliasField) + + // if the map type is an alias and key or values are aliases (type Foo map[Bar]Baz), + // we need to explicitly record their use here. + p.RecordTypeUse(m.KeyAliasField.GetTypeName()) + p.RecordTypeUse(m.ValueAliasField.GetTypeName()) + + nullable, valuegoTyp, valuegoAliasTyp = generator.GoMapValueTypes(field, m.ValueField, valuegoTyp, valuegoAliasTyp) + + p.P(`var keykey uint64`) + p.decodeVarint("keykey", "uint64") + p.mapField("mapkey", m.KeyAliasField) + p.P(`var valuekey uint64`) + p.decodeVarint("valuekey", "uint64") + p.mapField("mapvalue", m.ValueAliasField) + p.P(`if m.`, fieldname, ` == nil {`) + p.In() + p.P(`m.`, fieldname, ` = make(`, m.GoType, `)`) + p.Out() + p.P(`}`) + s := `m.` + fieldname + if keygoTyp == keygoAliasTyp { + s += `[mapkey]` + } else { + s += `[` + keygoAliasTyp + `(mapkey)]` + } + v := `mapvalue` + if m.ValueField.IsMessage() && !nullable { + v = `*` + v + } + if valuegoTyp != valuegoAliasTyp { + v = `((` + valuegoAliasTyp + `)(` + v + `))` + } + p.P(s, ` = `, v) + } else if repeated { + if nullable { + p.P(`m.`, fieldname, ` = append(m.`, fieldname, `, &`, msgname, `{})`) + } else { + p.P(`m.`, fieldname, ` = append(m.`, fieldname, `, `, msgname, `{})`) + } + p.P(`if err := m.`, fieldname, `[len(m.`, fieldname, `)-1].Unmarshal(data[iNdEx:postIndex]); err != nil {`) + p.In() + p.P(`return err`) + p.Out() + p.P(`}`) + } else if nullable { + p.P(`if m.`, fieldname, ` == nil {`) + p.In() + p.P(`m.`, fieldname, ` = &`, msgname, `{}`) + p.Out() + p.P(`}`) + p.P(`if err := m.`, fieldname, `.Unmarshal(data[iNdEx:postIndex]); err != nil {`) + p.In() + p.P(`return err`) + p.Out() + p.P(`}`) + } else { + p.P(`if err := m.`, fieldname, `.Unmarshal(data[iNdEx:postIndex]); err != nil {`) + p.In() + p.P(`return err`) + p.Out() + p.P(`}`) + } + p.P(`iNdEx = postIndex`) + case descriptor.FieldDescriptorProto_TYPE_BYTES: + p.P(`var byteLen int`) + p.decodeVarint("byteLen", "int") + p.P(`if byteLen < 0 {`) + p.In() + p.P(`return ErrInvalidLength` + p.localName) + p.Out() + p.P(`}`) + p.P(`postIndex := iNdEx + byteLen`) + p.P(`if postIndex > l {`) + p.In() + p.P(`return `, p.ioPkg.Use(), `.ErrUnexpectedEOF`) + p.Out() + p.P(`}`) + if !gogoproto.IsCustomType(field) { + if oneof { + p.P(`v := make([]byte, postIndex-iNdEx)`) + p.P(`copy(v, data[iNdEx:postIndex])`) + p.P(`m.`, fieldname, ` = &`, p.OneOfTypeName(msg, field), `{v}`) + } else if repeated { + p.P(`m.`, fieldname, ` = append(m.`, fieldname, `, make([]byte, postIndex-iNdEx))`) + p.P(`copy(m.`, fieldname, `[len(m.`, fieldname, `)-1], data[iNdEx:postIndex])`) + } else { + p.P(`m.`, fieldname, ` = append(m.`, fieldname, `[:0] , data[iNdEx:postIndex]...)`) + p.P(`if m.`, fieldname, ` == nil {`) + p.In() + p.P(`m.`, fieldname, ` = []byte{}`) + p.Out() + p.P(`}`) + } + } else { + _, ctyp, err := generator.GetCustomType(field) + if err != nil { + panic(err) + } + if oneof { + p.P(`var vv `, ctyp) + p.P(`v := &vv`) + p.P(`if err := v.Unmarshal(data[iNdEx:postIndex]); err != nil {`) + p.In() + p.P(`return err`) + p.Out() + p.P(`}`) + p.P(`m.`, fieldname, ` = &`, p.OneOfTypeName(msg, field), `{*v}`) + } else if repeated { + p.P(`var v `, ctyp) + p.P(`m.`, fieldname, ` = append(m.`, fieldname, `, v)`) + p.P(`if err := m.`, fieldname, `[len(m.`, fieldname, `)-1].Unmarshal(data[iNdEx:postIndex]); err != nil {`) + p.In() + p.P(`return err`) + p.Out() + p.P(`}`) + } else if nullable { + p.P(`var v `, ctyp) + p.P(`m.`, fieldname, ` = &v`) + p.P(`if err := m.`, fieldname, `.Unmarshal(data[iNdEx:postIndex]); err != nil {`) + p.In() + p.P(`return err`) + p.Out() + p.P(`}`) + } else { + p.P(`if err := m.`, fieldname, `.Unmarshal(data[iNdEx:postIndex]); err != nil {`) + p.In() + p.P(`return err`) + p.Out() + p.P(`}`) + } + } + p.P(`iNdEx = postIndex`) + case descriptor.FieldDescriptorProto_TYPE_UINT32: + if oneof { + p.P(`var v `, typ) + p.decodeVarint("v", typ) + p.P(`m.`, fieldname, ` = &`, p.OneOfTypeName(msg, field), `{v}`) + } else if repeated { + p.P(`var v `, typ) + p.decodeVarint("v", typ) + p.P(`m.`, fieldname, ` = append(m.`, fieldname, `, v)`) + } else if proto3 || !nullable { + p.P(`m.`, fieldname, ` = 0`) + p.decodeVarint("m."+fieldname, typ) + } else { + p.P(`var v `, typ) + p.decodeVarint("v", typ) + p.P(`m.`, fieldname, ` = &v`) + } + case descriptor.FieldDescriptorProto_TYPE_ENUM: + typName := p.TypeName(p.ObjectNamed(field.GetTypeName())) + if oneof { + p.P(`var v `, typName) + p.decodeVarint("v", typName) + p.P(`m.`, fieldname, ` = &`, p.OneOfTypeName(msg, field), `{v}`) + } else if repeated { + p.P(`var v `, typName) + p.decodeVarint("v", typName) + p.P(`m.`, fieldname, ` = append(m.`, fieldname, `, v)`) + } else if proto3 || !nullable { + p.P(`m.`, fieldname, ` = 0`) + p.decodeVarint("m."+fieldname, typName) + } else { + p.P(`var v `, typName) + p.decodeVarint("v", typName) + p.P(`m.`, fieldname, ` = &v`) + } + case descriptor.FieldDescriptorProto_TYPE_SFIXED32: + if !p.unsafe || gogoproto.IsCastType(field) { + if oneof { + p.P(`var v `, typ) + p.decodeFixed32("v", typ) + p.P(`m.`, fieldname, ` = &`, p.OneOfTypeName(msg, field), `{v}`) + } else if repeated { + p.P(`var v `, typ) + p.decodeFixed32("v", typ) + p.P(`m.`, fieldname, ` = append(m.`, fieldname, `, v)`) + } else if proto3 || !nullable { + p.P(`m.`, fieldname, ` = 0`) + p.decodeFixed32("m."+fieldname, typ) + } else { + p.P(`var v `, typ) + p.decodeFixed32("v", typ) + p.P(`m.`, fieldname, ` = &v`) + } + } else { + if oneof { + p.P(`var v int32`) + p.unsafeFixed32("v", "int32") + p.P(`m.`, fieldname, ` = &`, p.OneOfTypeName(msg, field), `{v}`) + } else if repeated { + p.P(`var v int32`) + p.unsafeFixed32("v", "int32") + p.P(`m.`, fieldname, ` = append(m.`, fieldname, `, v)`) + } else if proto3 || !nullable { + p.unsafeFixed32("m."+fieldname, "int32") + } else { + p.P(`var v int32`) + p.unsafeFixed32("v", "int32") + p.P(`m.`, fieldname, ` = &v`) + } + } + case descriptor.FieldDescriptorProto_TYPE_SFIXED64: + if !p.unsafe || gogoproto.IsCastType(field) { + if oneof { + p.P(`var v `, typ) + p.decodeFixed64("v", typ) + p.P(`m.`, fieldname, ` = &`, p.OneOfTypeName(msg, field), `{v}`) + } else if repeated { + p.P(`var v `, typ) + p.decodeFixed64("v", typ) + p.P(`m.`, fieldname, ` = append(m.`, fieldname, `, v)`) + } else if proto3 || !nullable { + p.P(`m.`, fieldname, ` = 0`) + p.decodeFixed64("m."+fieldname, typ) + } else { + p.P(`var v `, typ) + p.decodeFixed64("v", typ) + p.P(`m.`, fieldname, ` = &v`) + } + } else { + if oneof { + p.P(`var v int64`) + p.unsafeFixed64("v", "int64") + p.P(`m.`, fieldname, ` = &`, p.OneOfTypeName(msg, field), `{v}`) + } else if repeated { + p.P(`var v int64`) + p.unsafeFixed64("v", "int64") + p.P(`m.`, fieldname, ` = append(m.`, fieldname, `, v)`) + } else if proto3 || !nullable { + p.unsafeFixed64("m."+fieldname, "int64") + } else { + p.P(`var v int64`) + p.unsafeFixed64("v", "int64") + p.P(`m.`, fieldname, ` = &v`) + } + } + case descriptor.FieldDescriptorProto_TYPE_SINT32: + p.P(`var v `, typ) + p.decodeVarint("v", typ) + p.P(`v = `, typ, `((uint32(v) >> 1) ^ uint32(((v&1)<<31)>>31))`) + if oneof { + p.P(`m.`, fieldname, ` = &`, p.OneOfTypeName(msg, field), `{v}`) + } else if repeated { + p.P(`m.`, fieldname, ` = append(m.`, fieldname, `, v)`) + } else if proto3 || !nullable { + p.P(`m.`, fieldname, ` = v`) + } else { + p.P(`m.`, fieldname, ` = &v`) + } + case descriptor.FieldDescriptorProto_TYPE_SINT64: + p.P(`var v uint64`) + p.decodeVarint("v", "uint64") + p.P(`v = (v >> 1) ^ uint64((int64(v&1)<<63)>>63)`) + if oneof { + p.P(`m.`, fieldname, ` = &`, p.OneOfTypeName(msg, field), `{`, typ, `(v)}`) + } else if repeated { + p.P(`m.`, fieldname, ` = append(m.`, fieldname, `, `, typ, `(v))`) + } else if proto3 || !nullable { + p.P(`m.`, fieldname, ` = `, typ, `(v)`) + } else { + p.P(`v2 := `, typ, `(v)`) + p.P(`m.`, fieldname, ` = &v2`) + } + default: + panic("not implemented") + } +} + +func (p *unmarshal) Generate(file *generator.FileDescriptor) { + proto3 := gogoproto.IsProto3(file.FileDescriptorProto) + p.PluginImports = generator.NewPluginImports(p.Generator) + p.atleastOne = false + p.localName = generator.FileName(file) + if p.unsafe { + p.localName += "Unsafe" + } + + p.ioPkg = p.NewImport("io") + p.mathPkg = p.NewImport("math") + p.unsafePkg = p.NewImport("unsafe") + fmtPkg := p.NewImport("fmt") + protoPkg := p.NewImport("github.com/gogo/protobuf/proto") + if !gogoproto.ImportsGoGoProto(file.FileDescriptorProto) { + protoPkg = p.NewImport("github.com/golang/protobuf/proto") + } + + for _, message := range file.Messages() { + ccTypeName := generator.CamelCaseSlice(message.TypeName()) + if p.unsafe { + if !gogoproto.IsUnsafeUnmarshaler(file.FileDescriptorProto, message.DescriptorProto) { + continue + } + if gogoproto.IsUnmarshaler(file.FileDescriptorProto, message.DescriptorProto) { + panic(fmt.Sprintf("unsafe_unmarshaler and unmarshaler enabled for %v", ccTypeName)) + } + } + if !p.unsafe { + if !gogoproto.IsUnmarshaler(file.FileDescriptorProto, message.DescriptorProto) { + continue + } + if gogoproto.IsUnsafeUnmarshaler(file.FileDescriptorProto, message.DescriptorProto) { + panic(fmt.Sprintf("unsafe_unmarshaler and unmarshaler enabled for %v", ccTypeName)) + } + } + if message.DescriptorProto.GetOptions().GetMapEntry() { + continue + } + p.atleastOne = true + + // build a map required field_id -> bitmask offset + rfMap := make(map[int32]uint) + rfNextId := uint(0) + for _, field := range message.Field { + if field.IsRequired() { + rfMap[field.GetNumber()] = rfNextId + rfNextId++ + } + } + rfCount := len(rfMap) + + p.P(`func (m *`, ccTypeName, `) Unmarshal(data []byte) error {`) + p.In() + if rfCount > 0 { + p.P(`var hasFields [`, strconv.Itoa(1+(rfCount-1)/64), `]uint64`) + } + p.P(`l := len(data)`) + p.P(`iNdEx := 0`) + p.P(`for iNdEx < l {`) + p.In() + p.P(`preIndex := iNdEx`) + p.P(`var wire uint64`) + p.decodeVarint("wire", "uint64") + p.P(`fieldNum := int32(wire >> 3)`) + if len(message.Field) > 0 || !message.IsGroup() { + p.P(`wireType := int(wire & 0x7)`) + } + if !message.IsGroup() { + p.P(`if wireType == `, strconv.Itoa(proto.WireEndGroup), ` {`) + p.In() + p.P(`return `, fmtPkg.Use(), `.Errorf("proto: `+message.GetName()+`: wiretype end group for non-group")`) + p.Out() + p.P(`}`) + } + p.P(`if fieldNum <= 0 {`) + p.In() + p.P(`return `, fmtPkg.Use(), `.Errorf("proto: `+message.GetName()+`: illegal tag %d (wire type %d)", fieldNum, wire)`) + p.Out() + p.P(`}`) + p.P(`switch fieldNum {`) + p.In() + for _, field := range message.Field { + fieldname := p.GetFieldName(message, field) + errFieldname := fieldname + if field.OneofIndex != nil { + errFieldname = p.GetOneOfFieldName(message, field) + } + packed := field.IsPacked() + p.P(`case `, strconv.Itoa(int(field.GetNumber())), `:`) + p.In() + wireType := field.WireType() + if packed { + p.P(`if wireType == `, strconv.Itoa(proto.WireBytes), `{`) + p.In() + p.P(`var packedLen int`) + p.decodeVarint("packedLen", "int") + p.P(`if packedLen < 0 {`) + p.In() + p.P(`return ErrInvalidLength` + p.localName) + p.Out() + p.P(`}`) + p.P(`postIndex := iNdEx + packedLen`) + p.P(`if postIndex > l {`) + p.In() + p.P(`return `, p.ioPkg.Use(), `.ErrUnexpectedEOF`) + p.Out() + p.P(`}`) + p.P(`for iNdEx < postIndex {`) + p.In() + p.field(file, message, field, fieldname, false) + p.Out() + p.P(`}`) + p.Out() + p.P(`} else if wireType == `, strconv.Itoa(wireType), `{`) + p.In() + p.field(file, message, field, fieldname, false) + p.Out() + p.P(`} else {`) + p.In() + p.P(`return ` + fmtPkg.Use() + `.Errorf("proto: wrong wireType = %d for field ` + errFieldname + `", wireType)`) + p.Out() + p.P(`}`) + } else { + p.P(`if wireType != `, strconv.Itoa(wireType), `{`) + p.In() + p.P(`return ` + fmtPkg.Use() + `.Errorf("proto: wrong wireType = %d for field ` + errFieldname + `", wireType)`) + p.Out() + p.P(`}`) + p.field(file, message, field, fieldname, proto3) + } + + if field.IsRequired() { + fieldBit, ok := rfMap[field.GetNumber()] + if !ok { + panic("field is required, but no bit registered") + } + p.P(`hasFields[`, strconv.Itoa(int(fieldBit/64)), `] |= uint64(`, fmt.Sprintf("0x%08x", 1<<(fieldBit%64)), `)`) + } + } + p.Out() + p.P(`default:`) + p.In() + if message.DescriptorProto.HasExtension() { + c := []string{} + for _, erange := range message.GetExtensionRange() { + c = append(c, `((fieldNum >= `+strconv.Itoa(int(erange.GetStart()))+") && (fieldNum<"+strconv.Itoa(int(erange.GetEnd()))+`))`) + } + p.P(`if `, strings.Join(c, "||"), `{`) + p.In() + p.P(`var sizeOfWire int`) + p.P(`for {`) + p.In() + p.P(`sizeOfWire++`) + p.P(`wire >>= 7`) + p.P(`if wire == 0 {`) + p.In() + p.P(`break`) + p.Out() + p.P(`}`) + p.Out() + p.P(`}`) + p.P(`iNdEx-=sizeOfWire`) + p.P(`skippy, err := skip`, p.localName+`(data[iNdEx:])`) + p.P(`if err != nil {`) + p.In() + p.P(`return err`) + p.Out() + p.P(`}`) + p.P(`if skippy < 0 {`) + p.In() + p.P(`return ErrInvalidLength`, p.localName) + p.Out() + p.P(`}`) + p.P(`if (iNdEx + skippy) > l {`) + p.In() + p.P(`return `, p.ioPkg.Use(), `.ErrUnexpectedEOF`) + p.Out() + p.P(`}`) + p.P(protoPkg.Use(), `.AppendExtension(m, int32(fieldNum), data[iNdEx:iNdEx+skippy])`) + p.P(`iNdEx += skippy`) + p.Out() + p.P(`} else {`) + p.In() + } + p.P(`iNdEx=preIndex`) + p.P(`skippy, err := skip`, p.localName, `(data[iNdEx:])`) + p.P(`if err != nil {`) + p.In() + p.P(`return err`) + p.Out() + p.P(`}`) + p.P(`if skippy < 0 {`) + p.In() + p.P(`return ErrInvalidLength`, p.localName) + p.Out() + p.P(`}`) + p.P(`if (iNdEx + skippy) > l {`) + p.In() + p.P(`return `, p.ioPkg.Use(), `.ErrUnexpectedEOF`) + p.Out() + p.P(`}`) + if gogoproto.HasUnrecognized(file.FileDescriptorProto, message.DescriptorProto) { + p.P(`m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...)`) + } + p.P(`iNdEx += skippy`) + p.Out() + if message.DescriptorProto.HasExtension() { + p.Out() + p.P(`}`) + } + p.Out() + p.P(`}`) + p.Out() + p.P(`}`) + + for _, field := range message.Field { + if !field.IsRequired() { + continue + } + + fieldBit, ok := rfMap[field.GetNumber()] + if !ok { + panic("field is required, but no bit registered") + } + + p.P(`if hasFields[`, strconv.Itoa(int(fieldBit/64)), `] & uint64(`, fmt.Sprintf("0x%08x", 1<<(fieldBit%64)), `) == 0 {`) + p.In() + if !gogoproto.ImportsGoGoProto(file.FileDescriptorProto) { + p.P(`return new(`, protoPkg.Use(), `.RequiredNotSetError)`) + } else { + p.P(`return `, protoPkg.Use(), `.NewRequiredNotSetError("`, field.GetName(), `")`) + } + p.Out() + p.P(`}`) + } + p.P() + p.P(`if iNdEx > l {`) + p.In() + p.P(`return ` + p.ioPkg.Use() + `.ErrUnexpectedEOF`) + p.Out() + p.P(`}`) + p.P(`return nil`) + p.Out() + p.P(`}`) + } + if !p.atleastOne { + return + } + + p.P(`func skip` + p.localName + `(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, ErrIntOverflow` + p.localName + ` + } + if iNdEx >= l { + return 0, ` + p.ioPkg.Use() + `.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, ErrIntOverflow` + p.localName + ` + } + if iNdEx >= l { + return 0, ` + p.ioPkg.Use() + `.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, ErrIntOverflow` + p.localName + ` + } + if iNdEx >= l { + return 0, ` + p.ioPkg.Use() + `.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + length |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + iNdEx += length + if length < 0 { + return 0, ErrInvalidLength` + p.localName + ` + } + return iNdEx, nil + case 3: + for { + var innerWire uint64 + var start int = iNdEx + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflow` + p.localName + ` + } + if iNdEx >= l { + return 0, ` + p.ioPkg.Use() + `.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + innerWire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + innerWireType := int(innerWire & 0x7) + if innerWireType == 4 { + break + } + next, err := skip` + p.localName + `(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, ` + fmtPkg.Use() + `.Errorf("proto: illegal wireType %d", wireType) + } + } + panic("unreachable") + } + + var ( + ErrInvalidLength` + p.localName + ` = ` + fmtPkg.Use() + `.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflow` + p.localName + ` = ` + fmtPkg.Use() + `.Errorf("proto: integer overflow") + ) + `) +} + +func init() { + generator.RegisterPlugin(NewUnmarshal()) + generator.RegisterPlugin(NewUnsafeUnmarshal()) +} diff --git a/vendor/github.com/gogo/protobuf/proto/all_test.go b/vendor/github.com/gogo/protobuf/proto/all_test.go new file mode 100644 index 000000000..3b872786c --- /dev/null +++ b/vendor/github.com/gogo/protobuf/proto/all_test.go @@ -0,0 +1,2169 @@ +// 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. + +package proto_test + +import ( + "bytes" + "encoding/json" + "errors" + "fmt" + "math" + "math/rand" + "reflect" + "runtime/debug" + "strings" + "testing" + "time" + + . "github.com/gogo/protobuf/proto" + . "github.com/gogo/protobuf/proto/testdata" +) + +var globalO *Buffer + +func old() *Buffer { + if globalO == nil { + globalO = NewBuffer(nil) + } + globalO.Reset() + return globalO +} + +func equalbytes(b1, b2 []byte, t *testing.T) { + if len(b1) != len(b2) { + t.Errorf("wrong lengths: 2*%d != %d", len(b1), len(b2)) + return + } + for i := 0; i < len(b1); i++ { + if b1[i] != b2[i] { + t.Errorf("bad byte[%d]:%x %x: %s %s", i, b1[i], b2[i], b1, b2) + } + } +} + +func initGoTestField() *GoTestField { + f := new(GoTestField) + f.Label = String("label") + f.Type = String("type") + return f +} + +// These are all structurally equivalent but the tag numbers differ. +// (It's remarkable that required, optional, and repeated all have +// 8 letters.) +func initGoTest_RequiredGroup() *GoTest_RequiredGroup { + return &GoTest_RequiredGroup{ + RequiredField: String("required"), + } +} + +func initGoTest_OptionalGroup() *GoTest_OptionalGroup { + return &GoTest_OptionalGroup{ + RequiredField: String("optional"), + } +} + +func initGoTest_RepeatedGroup() *GoTest_RepeatedGroup { + return &GoTest_RepeatedGroup{ + RequiredField: String("repeated"), + } +} + +func initGoTest(setdefaults bool) *GoTest { + pb := new(GoTest) + if setdefaults { + pb.F_BoolDefaulted = Bool(Default_GoTest_F_BoolDefaulted) + pb.F_Int32Defaulted = Int32(Default_GoTest_F_Int32Defaulted) + pb.F_Int64Defaulted = Int64(Default_GoTest_F_Int64Defaulted) + pb.F_Fixed32Defaulted = Uint32(Default_GoTest_F_Fixed32Defaulted) + pb.F_Fixed64Defaulted = Uint64(Default_GoTest_F_Fixed64Defaulted) + pb.F_Uint32Defaulted = Uint32(Default_GoTest_F_Uint32Defaulted) + pb.F_Uint64Defaulted = Uint64(Default_GoTest_F_Uint64Defaulted) + pb.F_FloatDefaulted = Float32(Default_GoTest_F_FloatDefaulted) + pb.F_DoubleDefaulted = Float64(Default_GoTest_F_DoubleDefaulted) + pb.F_StringDefaulted = String(Default_GoTest_F_StringDefaulted) + pb.F_BytesDefaulted = Default_GoTest_F_BytesDefaulted + pb.F_Sint32Defaulted = Int32(Default_GoTest_F_Sint32Defaulted) + pb.F_Sint64Defaulted = Int64(Default_GoTest_F_Sint64Defaulted) + } + + pb.Kind = GoTest_TIME.Enum() + pb.RequiredField = initGoTestField() + pb.F_BoolRequired = Bool(true) + pb.F_Int32Required = Int32(3) + pb.F_Int64Required = Int64(6) + pb.F_Fixed32Required = Uint32(32) + pb.F_Fixed64Required = Uint64(64) + pb.F_Uint32Required = Uint32(3232) + pb.F_Uint64Required = Uint64(6464) + pb.F_FloatRequired = Float32(3232) + pb.F_DoubleRequired = Float64(6464) + pb.F_StringRequired = String("string") + pb.F_BytesRequired = []byte("bytes") + pb.F_Sint32Required = Int32(-32) + pb.F_Sint64Required = Int64(-64) + pb.Requiredgroup = initGoTest_RequiredGroup() + + return pb +} + +func fail(msg string, b *bytes.Buffer, s string, t *testing.T) { + data := b.Bytes() + ld := len(data) + ls := len(s) / 2 + + fmt.Printf("fail %s ld=%d ls=%d\n", msg, ld, ls) + + // find the interesting spot - n + n := ls + if ld < ls { + n = ld + } + j := 0 + for i := 0; i < n; i++ { + bs := hex(s[j])*16 + hex(s[j+1]) + j += 2 + if data[i] == bs { + continue + } + n = i + break + } + l := n - 10 + if l < 0 { + l = 0 + } + h := n + 10 + + // find the interesting spot - n + fmt.Printf("is[%d]:", l) + for i := l; i < h; i++ { + if i >= ld { + fmt.Printf(" --") + continue + } + fmt.Printf(" %.2x", data[i]) + } + fmt.Printf("\n") + + fmt.Printf("sb[%d]:", l) + for i := l; i < h; i++ { + if i >= ls { + fmt.Printf(" --") + continue + } + bs := hex(s[j])*16 + hex(s[j+1]) + j += 2 + fmt.Printf(" %.2x", bs) + } + fmt.Printf("\n") + + t.Fail() + + // t.Errorf("%s: \ngood: %s\nbad: %x", msg, s, b.Bytes()) + // Print the output in a partially-decoded format; can + // be helpful when updating the test. It produces the output + // that is pasted, with minor edits, into the argument to verify(). + // data := b.Bytes() + // nesting := 0 + // for b.Len() > 0 { + // start := len(data) - b.Len() + // var u uint64 + // u, err := DecodeVarint(b) + // if err != nil { + // fmt.Printf("decode error on varint:", err) + // return + // } + // wire := u & 0x7 + // tag := u >> 3 + // switch wire { + // case WireVarint: + // v, err := DecodeVarint(b) + // if err != nil { + // fmt.Printf("decode error on varint:", err) + // return + // } + // fmt.Printf("\t\t\"%x\" // field %d, encoding %d, value %d\n", + // data[start:len(data)-b.Len()], tag, wire, v) + // case WireFixed32: + // v, err := DecodeFixed32(b) + // if err != nil { + // fmt.Printf("decode error on fixed32:", err) + // return + // } + // fmt.Printf("\t\t\"%x\" // field %d, encoding %d, value %d\n", + // data[start:len(data)-b.Len()], tag, wire, v) + // case WireFixed64: + // v, err := DecodeFixed64(b) + // if err != nil { + // fmt.Printf("decode error on fixed64:", err) + // return + // } + // fmt.Printf("\t\t\"%x\" // field %d, encoding %d, value %d\n", + // data[start:len(data)-b.Len()], tag, wire, v) + // case WireBytes: + // nb, err := DecodeVarint(b) + // if err != nil { + // fmt.Printf("decode error on bytes:", err) + // return + // } + // after_tag := len(data) - b.Len() + // str := make([]byte, nb) + // _, err = b.Read(str) + // if err != nil { + // fmt.Printf("decode error on bytes:", err) + // return + // } + // fmt.Printf("\t\t\"%x\" \"%x\" // field %d, encoding %d (FIELD)\n", + // data[start:after_tag], str, tag, wire) + // case WireStartGroup: + // nesting++ + // fmt.Printf("\t\t\"%x\"\t\t// start group field %d level %d\n", + // data[start:len(data)-b.Len()], tag, nesting) + // case WireEndGroup: + // fmt.Printf("\t\t\"%x\"\t\t// end group field %d level %d\n", + // data[start:len(data)-b.Len()], tag, nesting) + // nesting-- + // default: + // fmt.Printf("unrecognized wire type %d\n", wire) + // return + // } + // } +} + +func hex(c uint8) uint8 { + if '0' <= c && c <= '9' { + return c - '0' + } + if 'a' <= c && c <= 'f' { + return 10 + c - 'a' + } + if 'A' <= c && c <= 'F' { + return 10 + c - 'A' + } + return 0 +} + +func equal(b []byte, s string, t *testing.T) bool { + if 2*len(b) != len(s) { + // fail(fmt.Sprintf("wrong lengths: 2*%d != %d", len(b), len(s)), b, s, t) + fmt.Printf("wrong lengths: 2*%d != %d\n", len(b), len(s)) + return false + } + for i, j := 0, 0; i < len(b); i, j = i+1, j+2 { + x := hex(s[j])*16 + hex(s[j+1]) + if b[i] != x { + // fail(fmt.Sprintf("bad byte[%d]:%x %x", i, b[i], x), b, s, t) + fmt.Printf("bad byte[%d]:%x %x", i, b[i], x) + return false + } + } + return true +} + +func overify(t *testing.T, pb *GoTest, expected string) { + o := old() + err := o.Marshal(pb) + if err != nil { + fmt.Printf("overify marshal-1 err = %v", err) + o.DebugPrint("", o.Bytes()) + t.Fatalf("expected = %s", expected) + } + if !equal(o.Bytes(), expected, t) { + o.DebugPrint("overify neq 1", o.Bytes()) + t.Fatalf("expected = %s", expected) + } + + // Now test Unmarshal by recreating the original buffer. + pbd := new(GoTest) + err = o.Unmarshal(pbd) + if err != nil { + t.Fatalf("overify unmarshal err = %v", err) + o.DebugPrint("", o.Bytes()) + t.Fatalf("string = %s", expected) + } + o.Reset() + err = o.Marshal(pbd) + if err != nil { + t.Errorf("overify marshal-2 err = %v", err) + o.DebugPrint("", o.Bytes()) + t.Fatalf("string = %s", expected) + } + if !equal(o.Bytes(), expected, t) { + o.DebugPrint("overify neq 2", o.Bytes()) + t.Fatalf("string = %s", expected) + } +} + +// Simple tests for numeric encode/decode primitives (varint, etc.) +func TestNumericPrimitives(t *testing.T) { + for i := uint64(0); i < 1e6; i += 111 { + o := old() + if o.EncodeVarint(i) != nil { + t.Error("EncodeVarint") + break + } + x, e := o.DecodeVarint() + if e != nil { + t.Fatal("DecodeVarint") + } + if x != i { + t.Fatal("varint decode fail:", i, x) + } + + o = old() + if o.EncodeFixed32(i) != nil { + t.Fatal("encFixed32") + } + x, e = o.DecodeFixed32() + if e != nil { + t.Fatal("decFixed32") + } + if x != i { + t.Fatal("fixed32 decode fail:", i, x) + } + + o = old() + if o.EncodeFixed64(i*1234567) != nil { + t.Error("encFixed64") + break + } + x, e = o.DecodeFixed64() + if e != nil { + t.Error("decFixed64") + break + } + if x != i*1234567 { + t.Error("fixed64 decode fail:", i*1234567, x) + break + } + + o = old() + i32 := int32(i - 12345) + if o.EncodeZigzag32(uint64(i32)) != nil { + t.Fatal("EncodeZigzag32") + } + x, e = o.DecodeZigzag32() + if e != nil { + t.Fatal("DecodeZigzag32") + } + if x != uint64(uint32(i32)) { + t.Fatal("zigzag32 decode fail:", i32, x) + } + + o = old() + i64 := int64(i - 12345) + if o.EncodeZigzag64(uint64(i64)) != nil { + t.Fatal("EncodeZigzag64") + } + x, e = o.DecodeZigzag64() + if e != nil { + t.Fatal("DecodeZigzag64") + } + if x != uint64(i64) { + t.Fatal("zigzag64 decode fail:", i64, x) + } + } +} + +// fakeMarshaler is a simple struct implementing Marshaler and Message interfaces. +type fakeMarshaler struct { + b []byte + err error +} + +func (f *fakeMarshaler) Marshal() ([]byte, error) { return f.b, f.err } +func (f *fakeMarshaler) String() string { return fmt.Sprintf("Bytes: %v Error: %v", f.b, f.err) } +func (f *fakeMarshaler) ProtoMessage() {} +func (f *fakeMarshaler) Reset() {} + +type msgWithFakeMarshaler struct { + M *fakeMarshaler `protobuf:"bytes,1,opt,name=fake"` +} + +func (m *msgWithFakeMarshaler) String() string { return CompactTextString(m) } +func (m *msgWithFakeMarshaler) ProtoMessage() {} +func (m *msgWithFakeMarshaler) Reset() {} + +// Simple tests for proto messages that implement the Marshaler interface. +func TestMarshalerEncoding(t *testing.T) { + tests := []struct { + name string + m Message + want []byte + wantErr error + }{ + { + name: "Marshaler that fails", + m: &fakeMarshaler{ + err: errors.New("some marshal err"), + b: []byte{5, 6, 7}, + }, + // Since there's an error, nothing should be written to buffer. + want: nil, + wantErr: errors.New("some marshal err"), + }, + { + name: "Marshaler that fails with RequiredNotSetError", + m: &msgWithFakeMarshaler{ + M: &fakeMarshaler{ + err: &RequiredNotSetError{}, + b: []byte{5, 6, 7}, + }, + }, + // Since there's an error that can be continued after, + // the buffer should be written. + want: []byte{ + 10, 3, // for &msgWithFakeMarshaler + 5, 6, 7, // for &fakeMarshaler + }, + wantErr: &RequiredNotSetError{}, + }, + { + name: "Marshaler that succeeds", + m: &fakeMarshaler{ + b: []byte{0, 1, 2, 3, 4, 127, 255}, + }, + want: []byte{0, 1, 2, 3, 4, 127, 255}, + wantErr: nil, + }, + } + for _, test := range tests { + b := NewBuffer(nil) + err := b.Marshal(test.m) + if _, ok := err.(*RequiredNotSetError); ok { + // We're not in package proto, so we can only assert the type in this case. + err = &RequiredNotSetError{} + } + if !reflect.DeepEqual(test.wantErr, err) { + t.Errorf("%s: got err %v wanted %v", test.name, err, test.wantErr) + } + if !reflect.DeepEqual(test.want, b.Bytes()) { + t.Errorf("%s: got bytes %v wanted %v", test.name, b.Bytes(), test.want) + } + } +} + +// Simple tests for bytes +func TestBytesPrimitives(t *testing.T) { + o := old() + bytes := []byte{'n', 'o', 'w', ' ', 'i', 's', ' ', 't', 'h', 'e', ' ', 't', 'i', 'm', 'e'} + if o.EncodeRawBytes(bytes) != nil { + t.Error("EncodeRawBytes") + } + decb, e := o.DecodeRawBytes(false) + if e != nil { + t.Error("DecodeRawBytes") + } + equalbytes(bytes, decb, t) +} + +// Simple tests for strings +func TestStringPrimitives(t *testing.T) { + o := old() + s := "now is the time" + if o.EncodeStringBytes(s) != nil { + t.Error("enc_string") + } + decs, e := o.DecodeStringBytes() + if e != nil { + t.Error("dec_string") + } + if s != decs { + t.Error("string encode/decode fail:", s, decs) + } +} + +// Do we catch the "required bit not set" case? +func TestRequiredBit(t *testing.T) { + o := old() + pb := new(GoTest) + err := o.Marshal(pb) + if err == nil { + t.Error("did not catch missing required fields") + } else if strings.Index(err.Error(), "Kind") < 0 { + t.Error("wrong error type:", err) + } +} + +// Check that all fields are nil. +// Clearly silly, and a residue from a more interesting test with an earlier, +// different initialization property, but it once caught a compiler bug so +// it lives. +func checkInitialized(pb *GoTest, t *testing.T) { + if pb.F_BoolDefaulted != nil { + t.Error("New or Reset did not set boolean:", *pb.F_BoolDefaulted) + } + if pb.F_Int32Defaulted != nil { + t.Error("New or Reset did not set int32:", *pb.F_Int32Defaulted) + } + if pb.F_Int64Defaulted != nil { + t.Error("New or Reset did not set int64:", *pb.F_Int64Defaulted) + } + if pb.F_Fixed32Defaulted != nil { + t.Error("New or Reset did not set fixed32:", *pb.F_Fixed32Defaulted) + } + if pb.F_Fixed64Defaulted != nil { + t.Error("New or Reset did not set fixed64:", *pb.F_Fixed64Defaulted) + } + if pb.F_Uint32Defaulted != nil { + t.Error("New or Reset did not set uint32:", *pb.F_Uint32Defaulted) + } + if pb.F_Uint64Defaulted != nil { + t.Error("New or Reset did not set uint64:", *pb.F_Uint64Defaulted) + } + if pb.F_FloatDefaulted != nil { + t.Error("New or Reset did not set float:", *pb.F_FloatDefaulted) + } + if pb.F_DoubleDefaulted != nil { + t.Error("New or Reset did not set double:", *pb.F_DoubleDefaulted) + } + if pb.F_StringDefaulted != nil { + t.Error("New or Reset did not set string:", *pb.F_StringDefaulted) + } + if pb.F_BytesDefaulted != nil { + t.Error("New or Reset did not set bytes:", string(pb.F_BytesDefaulted)) + } + if pb.F_Sint32Defaulted != nil { + t.Error("New or Reset did not set int32:", *pb.F_Sint32Defaulted) + } + if pb.F_Sint64Defaulted != nil { + t.Error("New or Reset did not set int64:", *pb.F_Sint64Defaulted) + } +} + +// Does Reset() reset? +func TestReset(t *testing.T) { + pb := initGoTest(true) + // muck with some values + pb.F_BoolDefaulted = Bool(false) + pb.F_Int32Defaulted = Int32(237) + pb.F_Int64Defaulted = Int64(12346) + pb.F_Fixed32Defaulted = Uint32(32000) + pb.F_Fixed64Defaulted = Uint64(666) + pb.F_Uint32Defaulted = Uint32(323232) + pb.F_Uint64Defaulted = nil + pb.F_FloatDefaulted = nil + pb.F_DoubleDefaulted = Float64(0) + pb.F_StringDefaulted = String("gotcha") + pb.F_BytesDefaulted = []byte("asdfasdf") + pb.F_Sint32Defaulted = Int32(123) + pb.F_Sint64Defaulted = Int64(789) + pb.Reset() + checkInitialized(pb, t) +} + +// All required fields set, no defaults provided. +func TestEncodeDecode1(t *testing.T) { + pb := initGoTest(false) + overify(t, pb, + "0807"+ // field 1, encoding 0, value 7 + "220d"+"0a056c6162656c120474797065"+ // field 4, encoding 2 (GoTestField) + "5001"+ // field 10, encoding 0, value 1 + "5803"+ // field 11, encoding 0, value 3 + "6006"+ // field 12, encoding 0, value 6 + "6d20000000"+ // field 13, encoding 5, value 0x20 + "714000000000000000"+ // field 14, encoding 1, value 0x40 + "78a019"+ // field 15, encoding 0, value 0xca0 = 3232 + "8001c032"+ // field 16, encoding 0, value 0x1940 = 6464 + "8d0100004a45"+ // field 17, encoding 5, value 3232.0 + "9101000000000040b940"+ // field 18, encoding 1, value 6464.0 + "9a0106"+"737472696e67"+ // field 19, encoding 2, string "string" + "b304"+ // field 70, encoding 3, start group + "ba0408"+"7265717569726564"+ // field 71, encoding 2, string "required" + "b404"+ // field 70, encoding 4, end group + "aa0605"+"6279746573"+ // field 101, encoding 2, string "bytes" + "b0063f"+ // field 102, encoding 0, 0x3f zigzag32 + "b8067f") // field 103, encoding 0, 0x7f zigzag64 +} + +// All required fields set, defaults provided. +func TestEncodeDecode2(t *testing.T) { + pb := initGoTest(true) + overify(t, pb, + "0807"+ // field 1, encoding 0, value 7 + "220d"+"0a056c6162656c120474797065"+ // field 4, encoding 2 (GoTestField) + "5001"+ // field 10, encoding 0, value 1 + "5803"+ // field 11, encoding 0, value 3 + "6006"+ // field 12, encoding 0, value 6 + "6d20000000"+ // field 13, encoding 5, value 32 + "714000000000000000"+ // field 14, encoding 1, value 64 + "78a019"+ // field 15, encoding 0, value 3232 + "8001c032"+ // field 16, encoding 0, value 6464 + "8d0100004a45"+ // field 17, encoding 5, value 3232.0 + "9101000000000040b940"+ // field 18, encoding 1, value 6464.0 + "9a0106"+"737472696e67"+ // field 19, encoding 2 string "string" + "c00201"+ // field 40, encoding 0, value 1 + "c80220"+ // field 41, encoding 0, value 32 + "d00240"+ // field 42, encoding 0, value 64 + "dd0240010000"+ // field 43, encoding 5, value 320 + "e1028002000000000000"+ // field 44, encoding 1, value 640 + "e8028019"+ // field 45, encoding 0, value 3200 + "f0028032"+ // field 46, encoding 0, value 6400 + "fd02e0659948"+ // field 47, encoding 5, value 314159.0 + "81030000000050971041"+ // field 48, encoding 1, value 271828.0 + "8a0310"+"68656c6c6f2c2022776f726c6421220a"+ // field 49, encoding 2 string "hello, \"world!\"\n" + "b304"+ // start group field 70 level 1 + "ba0408"+"7265717569726564"+ // field 71, encoding 2, string "required" + "b404"+ // end group field 70 level 1 + "aa0605"+"6279746573"+ // field 101, encoding 2 string "bytes" + "b0063f"+ // field 102, encoding 0, 0x3f zigzag32 + "b8067f"+ // field 103, encoding 0, 0x7f zigzag64 + "8a1907"+"4269676e6f7365"+ // field 401, encoding 2, string "Bignose" + "90193f"+ // field 402, encoding 0, value 63 + "98197f") // field 403, encoding 0, value 127 + +} + +// All default fields set to their default value by hand +func TestEncodeDecode3(t *testing.T) { + pb := initGoTest(false) + pb.F_BoolDefaulted = Bool(true) + pb.F_Int32Defaulted = Int32(32) + pb.F_Int64Defaulted = Int64(64) + pb.F_Fixed32Defaulted = Uint32(320) + pb.F_Fixed64Defaulted = Uint64(640) + pb.F_Uint32Defaulted = Uint32(3200) + pb.F_Uint64Defaulted = Uint64(6400) + pb.F_FloatDefaulted = Float32(314159) + pb.F_DoubleDefaulted = Float64(271828) + pb.F_StringDefaulted = String("hello, \"world!\"\n") + pb.F_BytesDefaulted = []byte("Bignose") + pb.F_Sint32Defaulted = Int32(-32) + pb.F_Sint64Defaulted = Int64(-64) + + overify(t, pb, + "0807"+ // field 1, encoding 0, value 7 + "220d"+"0a056c6162656c120474797065"+ // field 4, encoding 2 (GoTestField) + "5001"+ // field 10, encoding 0, value 1 + "5803"+ // field 11, encoding 0, value 3 + "6006"+ // field 12, encoding 0, value 6 + "6d20000000"+ // field 13, encoding 5, value 32 + "714000000000000000"+ // field 14, encoding 1, value 64 + "78a019"+ // field 15, encoding 0, value 3232 + "8001c032"+ // field 16, encoding 0, value 6464 + "8d0100004a45"+ // field 17, encoding 5, value 3232.0 + "9101000000000040b940"+ // field 18, encoding 1, value 6464.0 + "9a0106"+"737472696e67"+ // field 19, encoding 2 string "string" + "c00201"+ // field 40, encoding 0, value 1 + "c80220"+ // field 41, encoding 0, value 32 + "d00240"+ // field 42, encoding 0, value 64 + "dd0240010000"+ // field 43, encoding 5, value 320 + "e1028002000000000000"+ // field 44, encoding 1, value 640 + "e8028019"+ // field 45, encoding 0, value 3200 + "f0028032"+ // field 46, encoding 0, value 6400 + "fd02e0659948"+ // field 47, encoding 5, value 314159.0 + "81030000000050971041"+ // field 48, encoding 1, value 271828.0 + "8a0310"+"68656c6c6f2c2022776f726c6421220a"+ // field 49, encoding 2 string "hello, \"world!\"\n" + "b304"+ // start group field 70 level 1 + "ba0408"+"7265717569726564"+ // field 71, encoding 2, string "required" + "b404"+ // end group field 70 level 1 + "aa0605"+"6279746573"+ // field 101, encoding 2 string "bytes" + "b0063f"+ // field 102, encoding 0, 0x3f zigzag32 + "b8067f"+ // field 103, encoding 0, 0x7f zigzag64 + "8a1907"+"4269676e6f7365"+ // field 401, encoding 2, string "Bignose" + "90193f"+ // field 402, encoding 0, value 63 + "98197f") // field 403, encoding 0, value 127 + +} + +// All required fields set, defaults provided, all non-defaulted optional fields have values. +func TestEncodeDecode4(t *testing.T) { + pb := initGoTest(true) + pb.Table = String("hello") + pb.Param = Int32(7) + pb.OptionalField = initGoTestField() + pb.F_BoolOptional = Bool(true) + pb.F_Int32Optional = Int32(32) + pb.F_Int64Optional = Int64(64) + pb.F_Fixed32Optional = Uint32(3232) + pb.F_Fixed64Optional = Uint64(6464) + pb.F_Uint32Optional = Uint32(323232) + pb.F_Uint64Optional = Uint64(646464) + pb.F_FloatOptional = Float32(32.) + pb.F_DoubleOptional = Float64(64.) + pb.F_StringOptional = String("hello") + pb.F_BytesOptional = []byte("Bignose") + pb.F_Sint32Optional = Int32(-32) + pb.F_Sint64Optional = Int64(-64) + pb.Optionalgroup = initGoTest_OptionalGroup() + + overify(t, pb, + "0807"+ // field 1, encoding 0, value 7 + "1205"+"68656c6c6f"+ // field 2, encoding 2, string "hello" + "1807"+ // field 3, encoding 0, value 7 + "220d"+"0a056c6162656c120474797065"+ // field 4, encoding 2 (GoTestField) + "320d"+"0a056c6162656c120474797065"+ // field 6, encoding 2 (GoTestField) + "5001"+ // field 10, encoding 0, value 1 + "5803"+ // field 11, encoding 0, value 3 + "6006"+ // field 12, encoding 0, value 6 + "6d20000000"+ // field 13, encoding 5, value 32 + "714000000000000000"+ // field 14, encoding 1, value 64 + "78a019"+ // field 15, encoding 0, value 3232 + "8001c032"+ // field 16, encoding 0, value 6464 + "8d0100004a45"+ // field 17, encoding 5, value 3232.0 + "9101000000000040b940"+ // field 18, encoding 1, value 6464.0 + "9a0106"+"737472696e67"+ // field 19, encoding 2 string "string" + "f00101"+ // field 30, encoding 0, value 1 + "f80120"+ // field 31, encoding 0, value 32 + "800240"+ // field 32, encoding 0, value 64 + "8d02a00c0000"+ // field 33, encoding 5, value 3232 + "91024019000000000000"+ // field 34, encoding 1, value 6464 + "9802a0dd13"+ // field 35, encoding 0, value 323232 + "a002c0ba27"+ // field 36, encoding 0, value 646464 + "ad0200000042"+ // field 37, encoding 5, value 32.0 + "b1020000000000005040"+ // field 38, encoding 1, value 64.0 + "ba0205"+"68656c6c6f"+ // field 39, encoding 2, string "hello" + "c00201"+ // field 40, encoding 0, value 1 + "c80220"+ // field 41, encoding 0, value 32 + "d00240"+ // field 42, encoding 0, value 64 + "dd0240010000"+ // field 43, encoding 5, value 320 + "e1028002000000000000"+ // field 44, encoding 1, value 640 + "e8028019"+ // field 45, encoding 0, value 3200 + "f0028032"+ // field 46, encoding 0, value 6400 + "fd02e0659948"+ // field 47, encoding 5, value 314159.0 + "81030000000050971041"+ // field 48, encoding 1, value 271828.0 + "8a0310"+"68656c6c6f2c2022776f726c6421220a"+ // field 49, encoding 2 string "hello, \"world!\"\n" + "b304"+ // start group field 70 level 1 + "ba0408"+"7265717569726564"+ // field 71, encoding 2, string "required" + "b404"+ // end group field 70 level 1 + "d305"+ // start group field 90 level 1 + "da0508"+"6f7074696f6e616c"+ // field 91, encoding 2, string "optional" + "d405"+ // end group field 90 level 1 + "aa0605"+"6279746573"+ // field 101, encoding 2 string "bytes" + "b0063f"+ // field 102, encoding 0, 0x3f zigzag32 + "b8067f"+ // field 103, encoding 0, 0x7f zigzag64 + "ea1207"+"4269676e6f7365"+ // field 301, encoding 2, string "Bignose" + "f0123f"+ // field 302, encoding 0, value 63 + "f8127f"+ // field 303, encoding 0, value 127 + "8a1907"+"4269676e6f7365"+ // field 401, encoding 2, string "Bignose" + "90193f"+ // field 402, encoding 0, value 63 + "98197f") // field 403, encoding 0, value 127 + +} + +// All required fields set, defaults provided, all repeated fields given two values. +func TestEncodeDecode5(t *testing.T) { + pb := initGoTest(true) + pb.RepeatedField = []*GoTestField{initGoTestField(), initGoTestField()} + pb.F_BoolRepeated = []bool{false, true} + pb.F_Int32Repeated = []int32{32, 33} + pb.F_Int64Repeated = []int64{64, 65} + pb.F_Fixed32Repeated = []uint32{3232, 3333} + pb.F_Fixed64Repeated = []uint64{6464, 6565} + pb.F_Uint32Repeated = []uint32{323232, 333333} + pb.F_Uint64Repeated = []uint64{646464, 656565} + pb.F_FloatRepeated = []float32{32., 33.} + pb.F_DoubleRepeated = []float64{64., 65.} + pb.F_StringRepeated = []string{"hello", "sailor"} + pb.F_BytesRepeated = [][]byte{[]byte("big"), []byte("nose")} + pb.F_Sint32Repeated = []int32{32, -32} + pb.F_Sint64Repeated = []int64{64, -64} + pb.Repeatedgroup = []*GoTest_RepeatedGroup{initGoTest_RepeatedGroup(), initGoTest_RepeatedGroup()} + + overify(t, pb, + "0807"+ // field 1, encoding 0, value 7 + "220d"+"0a056c6162656c120474797065"+ // field 4, encoding 2 (GoTestField) + "2a0d"+"0a056c6162656c120474797065"+ // field 5, encoding 2 (GoTestField) + "2a0d"+"0a056c6162656c120474797065"+ // field 5, encoding 2 (GoTestField) + "5001"+ // field 10, encoding 0, value 1 + "5803"+ // field 11, encoding 0, value 3 + "6006"+ // field 12, encoding 0, value 6 + "6d20000000"+ // field 13, encoding 5, value 32 + "714000000000000000"+ // field 14, encoding 1, value 64 + "78a019"+ // field 15, encoding 0, value 3232 + "8001c032"+ // field 16, encoding 0, value 6464 + "8d0100004a45"+ // field 17, encoding 5, value 3232.0 + "9101000000000040b940"+ // field 18, encoding 1, value 6464.0 + "9a0106"+"737472696e67"+ // field 19, encoding 2 string "string" + "a00100"+ // field 20, encoding 0, value 0 + "a00101"+ // field 20, encoding 0, value 1 + "a80120"+ // field 21, encoding 0, value 32 + "a80121"+ // field 21, encoding 0, value 33 + "b00140"+ // field 22, encoding 0, value 64 + "b00141"+ // field 22, encoding 0, value 65 + "bd01a00c0000"+ // field 23, encoding 5, value 3232 + "bd01050d0000"+ // field 23, encoding 5, value 3333 + "c1014019000000000000"+ // field 24, encoding 1, value 6464 + "c101a519000000000000"+ // field 24, encoding 1, value 6565 + "c801a0dd13"+ // field 25, encoding 0, value 323232 + "c80195ac14"+ // field 25, encoding 0, value 333333 + "d001c0ba27"+ // field 26, encoding 0, value 646464 + "d001b58928"+ // field 26, encoding 0, value 656565 + "dd0100000042"+ // field 27, encoding 5, value 32.0 + "dd0100000442"+ // field 27, encoding 5, value 33.0 + "e1010000000000005040"+ // field 28, encoding 1, value 64.0 + "e1010000000000405040"+ // field 28, encoding 1, value 65.0 + "ea0105"+"68656c6c6f"+ // field 29, encoding 2, string "hello" + "ea0106"+"7361696c6f72"+ // field 29, encoding 2, string "sailor" + "c00201"+ // field 40, encoding 0, value 1 + "c80220"+ // field 41, encoding 0, value 32 + "d00240"+ // field 42, encoding 0, value 64 + "dd0240010000"+ // field 43, encoding 5, value 320 + "e1028002000000000000"+ // field 44, encoding 1, value 640 + "e8028019"+ // field 45, encoding 0, value 3200 + "f0028032"+ // field 46, encoding 0, value 6400 + "fd02e0659948"+ // field 47, encoding 5, value 314159.0 + "81030000000050971041"+ // field 48, encoding 1, value 271828.0 + "8a0310"+"68656c6c6f2c2022776f726c6421220a"+ // field 49, encoding 2 string "hello, \"world!\"\n" + "b304"+ // start group field 70 level 1 + "ba0408"+"7265717569726564"+ // field 71, encoding 2, string "required" + "b404"+ // end group field 70 level 1 + "8305"+ // start group field 80 level 1 + "8a0508"+"7265706561746564"+ // field 81, encoding 2, string "repeated" + "8405"+ // end group field 80 level 1 + "8305"+ // start group field 80 level 1 + "8a0508"+"7265706561746564"+ // field 81, encoding 2, string "repeated" + "8405"+ // end group field 80 level 1 + "aa0605"+"6279746573"+ // field 101, encoding 2 string "bytes" + "b0063f"+ // field 102, encoding 0, 0x3f zigzag32 + "b8067f"+ // field 103, encoding 0, 0x7f zigzag64 + "ca0c03"+"626967"+ // field 201, encoding 2, string "big" + "ca0c04"+"6e6f7365"+ // field 201, encoding 2, string "nose" + "d00c40"+ // field 202, encoding 0, value 32 + "d00c3f"+ // field 202, encoding 0, value -32 + "d80c8001"+ // field 203, encoding 0, value 64 + "d80c7f"+ // field 203, encoding 0, value -64 + "8a1907"+"4269676e6f7365"+ // field 401, encoding 2, string "Bignose" + "90193f"+ // field 402, encoding 0, value 63 + "98197f") // field 403, encoding 0, value 127 + +} + +// All required fields set, all packed repeated fields given two values. +func TestEncodeDecode6(t *testing.T) { + pb := initGoTest(false) + pb.F_BoolRepeatedPacked = []bool{false, true} + pb.F_Int32RepeatedPacked = []int32{32, 33} + pb.F_Int64RepeatedPacked = []int64{64, 65} + pb.F_Fixed32RepeatedPacked = []uint32{3232, 3333} + pb.F_Fixed64RepeatedPacked = []uint64{6464, 6565} + pb.F_Uint32RepeatedPacked = []uint32{323232, 333333} + pb.F_Uint64RepeatedPacked = []uint64{646464, 656565} + pb.F_FloatRepeatedPacked = []float32{32., 33.} + pb.F_DoubleRepeatedPacked = []float64{64., 65.} + pb.F_Sint32RepeatedPacked = []int32{32, -32} + pb.F_Sint64RepeatedPacked = []int64{64, -64} + + overify(t, pb, + "0807"+ // field 1, encoding 0, value 7 + "220d"+"0a056c6162656c120474797065"+ // field 4, encoding 2 (GoTestField) + "5001"+ // field 10, encoding 0, value 1 + "5803"+ // field 11, encoding 0, value 3 + "6006"+ // field 12, encoding 0, value 6 + "6d20000000"+ // field 13, encoding 5, value 32 + "714000000000000000"+ // field 14, encoding 1, value 64 + "78a019"+ // field 15, encoding 0, value 3232 + "8001c032"+ // field 16, encoding 0, value 6464 + "8d0100004a45"+ // field 17, encoding 5, value 3232.0 + "9101000000000040b940"+ // field 18, encoding 1, value 6464.0 + "9a0106"+"737472696e67"+ // field 19, encoding 2 string "string" + "9203020001"+ // field 50, encoding 2, 2 bytes, value 0, value 1 + "9a03022021"+ // field 51, encoding 2, 2 bytes, value 32, value 33 + "a203024041"+ // field 52, encoding 2, 2 bytes, value 64, value 65 + "aa0308"+ // field 53, encoding 2, 8 bytes + "a00c0000050d0000"+ // value 3232, value 3333 + "b20310"+ // field 54, encoding 2, 16 bytes + "4019000000000000a519000000000000"+ // value 6464, value 6565 + "ba0306"+ // field 55, encoding 2, 6 bytes + "a0dd1395ac14"+ // value 323232, value 333333 + "c20306"+ // field 56, encoding 2, 6 bytes + "c0ba27b58928"+ // value 646464, value 656565 + "ca0308"+ // field 57, encoding 2, 8 bytes + "0000004200000442"+ // value 32.0, value 33.0 + "d20310"+ // field 58, encoding 2, 16 bytes + "00000000000050400000000000405040"+ // value 64.0, value 65.0 + "b304"+ // start group field 70 level 1 + "ba0408"+"7265717569726564"+ // field 71, encoding 2, string "required" + "b404"+ // end group field 70 level 1 + "aa0605"+"6279746573"+ // field 101, encoding 2 string "bytes" + "b0063f"+ // field 102, encoding 0, 0x3f zigzag32 + "b8067f"+ // field 103, encoding 0, 0x7f zigzag64 + "b21f02"+ // field 502, encoding 2, 2 bytes + "403f"+ // value 32, value -32 + "ba1f03"+ // field 503, encoding 2, 3 bytes + "80017f") // value 64, value -64 +} + +// Test that we can encode empty bytes fields. +func TestEncodeDecodeBytes1(t *testing.T) { + pb := initGoTest(false) + + // Create our bytes + pb.F_BytesRequired = []byte{} + pb.F_BytesRepeated = [][]byte{{}} + pb.F_BytesOptional = []byte{} + + d, err := Marshal(pb) + if err != nil { + t.Error(err) + } + + pbd := new(GoTest) + if err := Unmarshal(d, pbd); err != nil { + t.Error(err) + } + + if pbd.F_BytesRequired == nil || len(pbd.F_BytesRequired) != 0 { + t.Error("required empty bytes field is incorrect") + } + if pbd.F_BytesRepeated == nil || len(pbd.F_BytesRepeated) == 1 && pbd.F_BytesRepeated[0] == nil { + t.Error("repeated empty bytes field is incorrect") + } + if pbd.F_BytesOptional == nil || len(pbd.F_BytesOptional) != 0 { + t.Error("optional empty bytes field is incorrect") + } +} + +// Test that we encode nil-valued fields of a repeated bytes field correctly. +// Since entries in a repeated field cannot be nil, nil must mean empty value. +func TestEncodeDecodeBytes2(t *testing.T) { + pb := initGoTest(false) + + // Create our bytes + pb.F_BytesRepeated = [][]byte{nil} + + d, err := Marshal(pb) + if err != nil { + t.Error(err) + } + + pbd := new(GoTest) + if err := Unmarshal(d, pbd); err != nil { + t.Error(err) + } + + if len(pbd.F_BytesRepeated) != 1 || pbd.F_BytesRepeated[0] == nil { + t.Error("Unexpected value for repeated bytes field") + } +} + +// All required fields set, defaults provided, all repeated fields given two values. +func TestSkippingUnrecognizedFields(t *testing.T) { + o := old() + pb := initGoTestField() + + // Marshal it normally. + o.Marshal(pb) + + // Now new a GoSkipTest record. + skip := &GoSkipTest{ + SkipInt32: Int32(32), + SkipFixed32: Uint32(3232), + SkipFixed64: Uint64(6464), + SkipString: String("skipper"), + Skipgroup: &GoSkipTest_SkipGroup{ + GroupInt32: Int32(75), + GroupString: String("wxyz"), + }, + } + + // Marshal it into same buffer. + o.Marshal(skip) + + pbd := new(GoTestField) + o.Unmarshal(pbd) + + // The __unrecognized field should be a marshaling of GoSkipTest + skipd := new(GoSkipTest) + + o.SetBuf(pbd.XXX_unrecognized) + o.Unmarshal(skipd) + + if *skipd.SkipInt32 != *skip.SkipInt32 { + t.Error("skip int32", skipd.SkipInt32) + } + if *skipd.SkipFixed32 != *skip.SkipFixed32 { + t.Error("skip fixed32", skipd.SkipFixed32) + } + if *skipd.SkipFixed64 != *skip.SkipFixed64 { + t.Error("skip fixed64", skipd.SkipFixed64) + } + if *skipd.SkipString != *skip.SkipString { + t.Error("skip string", *skipd.SkipString) + } + if *skipd.Skipgroup.GroupInt32 != *skip.Skipgroup.GroupInt32 { + t.Error("skip group int32", skipd.Skipgroup.GroupInt32) + } + if *skipd.Skipgroup.GroupString != *skip.Skipgroup.GroupString { + t.Error("skip group string", *skipd.Skipgroup.GroupString) + } +} + +// Check that unrecognized fields of a submessage are preserved. +func TestSubmessageUnrecognizedFields(t *testing.T) { + nm := &NewMessage{ + Nested: &NewMessage_Nested{ + Name: String("Nigel"), + FoodGroup: String("carbs"), + }, + } + b, err := Marshal(nm) + if err != nil { + t.Fatalf("Marshal of NewMessage: %v", err) + } + + // Unmarshal into an OldMessage. + om := new(OldMessage) + if err = Unmarshal(b, om); err != nil { + t.Fatalf("Unmarshal to OldMessage: %v", err) + } + exp := &OldMessage{ + Nested: &OldMessage_Nested{ + Name: String("Nigel"), + // normal protocol buffer users should not do this + XXX_unrecognized: []byte("\x12\x05carbs"), + }, + } + if !Equal(om, exp) { + t.Errorf("om = %v, want %v", om, exp) + } + + // Clone the OldMessage. + om = Clone(om).(*OldMessage) + if !Equal(om, exp) { + t.Errorf("Clone(om) = %v, want %v", om, exp) + } + + // Marshal the OldMessage, then unmarshal it into an empty NewMessage. + if b, err = Marshal(om); err != nil { + t.Fatalf("Marshal of OldMessage: %v", err) + } + t.Logf("Marshal(%v) -> %q", om, b) + nm2 := new(NewMessage) + if err := Unmarshal(b, nm2); err != nil { + t.Fatalf("Unmarshal to NewMessage: %v", err) + } + if !Equal(nm, nm2) { + t.Errorf("NewMessage round-trip: %v => %v", nm, nm2) + } +} + +// Check that an int32 field can be upgraded to an int64 field. +func TestNegativeInt32(t *testing.T) { + om := &OldMessage{ + Num: Int32(-1), + } + b, err := Marshal(om) + if err != nil { + t.Fatalf("Marshal of OldMessage: %v", err) + } + + // Check the size. It should be 11 bytes; + // 1 for the field/wire type, and 10 for the negative number. + if len(b) != 11 { + t.Errorf("%v marshaled as %q, wanted 11 bytes", om, b) + } + + // Unmarshal into a NewMessage. + nm := new(NewMessage) + if err := Unmarshal(b, nm); err != nil { + t.Fatalf("Unmarshal to NewMessage: %v", err) + } + want := &NewMessage{ + Num: Int64(-1), + } + if !Equal(nm, want) { + t.Errorf("nm = %v, want %v", nm, want) + } +} + +// Check that we can grow an array (repeated field) to have many elements. +// This test doesn't depend only on our encoding; for variety, it makes sure +// we create, encode, and decode the correct contents explicitly. It's therefore +// a bit messier. +// This test also uses (and hence tests) the Marshal/Unmarshal functions +// instead of the methods. +func TestBigRepeated(t *testing.T) { + pb := initGoTest(true) + + // Create the arrays + const N = 50 // Internally the library starts much smaller. + pb.Repeatedgroup = make([]*GoTest_RepeatedGroup, N) + pb.F_Sint64Repeated = make([]int64, N) + pb.F_Sint32Repeated = make([]int32, N) + pb.F_BytesRepeated = make([][]byte, N) + pb.F_StringRepeated = make([]string, N) + pb.F_DoubleRepeated = make([]float64, N) + pb.F_FloatRepeated = make([]float32, N) + pb.F_Uint64Repeated = make([]uint64, N) + pb.F_Uint32Repeated = make([]uint32, N) + pb.F_Fixed64Repeated = make([]uint64, N) + pb.F_Fixed32Repeated = make([]uint32, N) + pb.F_Int64Repeated = make([]int64, N) + pb.F_Int32Repeated = make([]int32, N) + pb.F_BoolRepeated = make([]bool, N) + pb.RepeatedField = make([]*GoTestField, N) + + // Fill in the arrays with checkable values. + igtf := initGoTestField() + igtrg := initGoTest_RepeatedGroup() + for i := 0; i < N; i++ { + pb.Repeatedgroup[i] = igtrg + pb.F_Sint64Repeated[i] = int64(i) + pb.F_Sint32Repeated[i] = int32(i) + s := fmt.Sprint(i) + pb.F_BytesRepeated[i] = []byte(s) + pb.F_StringRepeated[i] = s + pb.F_DoubleRepeated[i] = float64(i) + pb.F_FloatRepeated[i] = float32(i) + pb.F_Uint64Repeated[i] = uint64(i) + pb.F_Uint32Repeated[i] = uint32(i) + pb.F_Fixed64Repeated[i] = uint64(i) + pb.F_Fixed32Repeated[i] = uint32(i) + pb.F_Int64Repeated[i] = int64(i) + pb.F_Int32Repeated[i] = int32(i) + pb.F_BoolRepeated[i] = i%2 == 0 + pb.RepeatedField[i] = igtf + } + + // Marshal. + buf, _ := Marshal(pb) + + // Now test Unmarshal by recreating the original buffer. + pbd := new(GoTest) + Unmarshal(buf, pbd) + + // Check the checkable values + for i := uint64(0); i < N; i++ { + if pbd.Repeatedgroup[i] == nil { // TODO: more checking? + t.Error("pbd.Repeatedgroup bad") + } + var x uint64 + x = uint64(pbd.F_Sint64Repeated[i]) + if x != i { + t.Error("pbd.F_Sint64Repeated bad", x, i) + } + x = uint64(pbd.F_Sint32Repeated[i]) + if x != i { + t.Error("pbd.F_Sint32Repeated bad", x, i) + } + s := fmt.Sprint(i) + equalbytes(pbd.F_BytesRepeated[i], []byte(s), t) + if pbd.F_StringRepeated[i] != s { + t.Error("pbd.F_Sint32Repeated bad", pbd.F_StringRepeated[i], i) + } + x = uint64(pbd.F_DoubleRepeated[i]) + if x != i { + t.Error("pbd.F_DoubleRepeated bad", x, i) + } + x = uint64(pbd.F_FloatRepeated[i]) + if x != i { + t.Error("pbd.F_FloatRepeated bad", x, i) + } + x = pbd.F_Uint64Repeated[i] + if x != i { + t.Error("pbd.F_Uint64Repeated bad", x, i) + } + x = uint64(pbd.F_Uint32Repeated[i]) + if x != i { + t.Error("pbd.F_Uint32Repeated bad", x, i) + } + x = pbd.F_Fixed64Repeated[i] + if x != i { + t.Error("pbd.F_Fixed64Repeated bad", x, i) + } + x = uint64(pbd.F_Fixed32Repeated[i]) + if x != i { + t.Error("pbd.F_Fixed32Repeated bad", x, i) + } + x = uint64(pbd.F_Int64Repeated[i]) + if x != i { + t.Error("pbd.F_Int64Repeated bad", x, i) + } + x = uint64(pbd.F_Int32Repeated[i]) + if x != i { + t.Error("pbd.F_Int32Repeated bad", x, i) + } + if pbd.F_BoolRepeated[i] != (i%2 == 0) { + t.Error("pbd.F_BoolRepeated bad", x, i) + } + if pbd.RepeatedField[i] == nil { // TODO: more checking? + t.Error("pbd.RepeatedField bad") + } + } +} + +// Verify we give a useful message when decoding to the wrong structure type. +func TestTypeMismatch(t *testing.T) { + pb1 := initGoTest(true) + + // Marshal + o := old() + o.Marshal(pb1) + + // Now Unmarshal it to the wrong type. + pb2 := initGoTestField() + err := o.Unmarshal(pb2) + if err == nil { + t.Error("expected error, got no error") + } else if !strings.Contains(err.Error(), "bad wiretype") { + t.Error("expected bad wiretype error, got", err) + } +} + +func encodeDecode(t *testing.T, in, out Message, msg string) { + buf, err := Marshal(in) + if err != nil { + t.Fatalf("failed marshaling %v: %v", msg, err) + } + if err := Unmarshal(buf, out); err != nil { + t.Fatalf("failed unmarshaling %v: %v", msg, err) + } +} + +func TestPackedNonPackedDecoderSwitching(t *testing.T) { + np, p := new(NonPackedTest), new(PackedTest) + + // non-packed -> packed + np.A = []int32{0, 1, 1, 2, 3, 5} + encodeDecode(t, np, p, "non-packed -> packed") + if !reflect.DeepEqual(np.A, p.B) { + t.Errorf("failed non-packed -> packed; np.A=%+v, p.B=%+v", np.A, p.B) + } + + // packed -> non-packed + np.Reset() + p.B = []int32{3, 1, 4, 1, 5, 9} + encodeDecode(t, p, np, "packed -> non-packed") + if !reflect.DeepEqual(p.B, np.A) { + t.Errorf("failed packed -> non-packed; p.B=%+v, np.A=%+v", p.B, np.A) + } +} + +func TestProto1RepeatedGroup(t *testing.T) { + pb := &MessageList{ + Message: []*MessageList_Message{ + { + Name: String("blah"), + Count: Int32(7), + }, + // NOTE: pb.Message[1] is a nil + nil, + }, + } + + o := old() + err := o.Marshal(pb) + if err == nil || !strings.Contains(err.Error(), "repeated field Message has nil") { + t.Fatalf("unexpected or no error when marshaling: %v", err) + } +} + +// Test that enums work. Checks for a bug introduced by making enums +// named types instead of int32: newInt32FromUint64 would crash with +// a type mismatch in reflect.PointTo. +func TestEnum(t *testing.T) { + pb := new(GoEnum) + pb.Foo = FOO_FOO1.Enum() + o := old() + if err := o.Marshal(pb); err != nil { + t.Fatal("error encoding enum:", err) + } + pb1 := new(GoEnum) + if err := o.Unmarshal(pb1); err != nil { + t.Fatal("error decoding enum:", err) + } + if *pb1.Foo != FOO_FOO1 { + t.Error("expected 7 but got ", *pb1.Foo) + } +} + +// Enum types have String methods. Check that enum fields can be printed. +// We don't care what the value actually is, just as long as it doesn't crash. +func TestPrintingNilEnumFields(t *testing.T) { + pb := new(GoEnum) + _ = fmt.Sprintf("%+v", pb) +} + +// Verify that absent required fields cause Marshal/Unmarshal to return errors. +func TestRequiredFieldEnforcement(t *testing.T) { + pb := new(GoTestField) + _, err := Marshal(pb) + if err == nil { + t.Error("marshal: expected error, got nil") + } else if strings.Index(err.Error(), "Label") < 0 { + t.Errorf("marshal: bad error type: %v", err) + } + + // A slightly sneaky, yet valid, proto. It encodes the same required field twice, + // so simply counting the required fields is insufficient. + // field 1, encoding 2, value "hi" + buf := []byte("\x0A\x02hi\x0A\x02hi") + err = Unmarshal(buf, pb) + if err == nil { + t.Error("unmarshal: expected error, got nil") + } else if strings.Index(err.Error(), "{Unknown}") < 0 { + t.Errorf("unmarshal: bad error type: %v", err) + } +} + +func TestTypedNilMarshal(t *testing.T) { + // A typed nil should return ErrNil and not crash. + _, err := Marshal((*GoEnum)(nil)) + if err != ErrNil { + t.Errorf("Marshal: got err %v, want ErrNil", err) + } +} + +// A type that implements the Marshaler interface, but is not nillable. +type nonNillableInt uint64 + +func (nni nonNillableInt) Marshal() ([]byte, error) { + return EncodeVarint(uint64(nni)), nil +} + +type NNIMessage struct { + nni nonNillableInt +} + +func (*NNIMessage) Reset() {} +func (*NNIMessage) String() string { return "" } +func (*NNIMessage) ProtoMessage() {} + +// A type that implements the Marshaler interface and is nillable. +type nillableMessage struct { + x uint64 +} + +func (nm *nillableMessage) Marshal() ([]byte, error) { + return EncodeVarint(nm.x), nil +} + +type NMMessage struct { + nm *nillableMessage +} + +func (*NMMessage) Reset() {} +func (*NMMessage) String() string { return "" } +func (*NMMessage) ProtoMessage() {} + +// Verify a type that uses the Marshaler interface, but has a nil pointer. +func TestNilMarshaler(t *testing.T) { + // Try a struct with a Marshaler field that is nil. + // It should be directly marshable. + nmm := new(NMMessage) + if _, err := Marshal(nmm); err != nil { + t.Error("unexpected error marshaling nmm: ", err) + } + + // Try a struct with a Marshaler field that is not nillable. + nnim := new(NNIMessage) + nnim.nni = 7 + var _ Marshaler = nnim.nni // verify it is truly a Marshaler + if _, err := Marshal(nnim); err != nil { + t.Error("unexpected error marshaling nnim: ", err) + } +} + +func TestAllSetDefaults(t *testing.T) { + // Exercise SetDefaults with all scalar field types. + m := &Defaults{ + // NaN != NaN, so override that here. + F_Nan: Float32(1.7), + } + expected := &Defaults{ + F_Bool: Bool(true), + F_Int32: Int32(32), + F_Int64: Int64(64), + F_Fixed32: Uint32(320), + F_Fixed64: Uint64(640), + F_Uint32: Uint32(3200), + F_Uint64: Uint64(6400), + F_Float: Float32(314159), + F_Double: Float64(271828), + F_String: String(`hello, "world!"` + "\n"), + F_Bytes: []byte("Bignose"), + F_Sint32: Int32(-32), + F_Sint64: Int64(-64), + F_Enum: Defaults_GREEN.Enum(), + F_Pinf: Float32(float32(math.Inf(1))), + F_Ninf: Float32(float32(math.Inf(-1))), + F_Nan: Float32(1.7), + StrZero: String(""), + } + SetDefaults(m) + if !Equal(m, expected) { + t.Errorf("SetDefaults failed\n got %v\nwant %v", m, expected) + } +} + +func TestSetDefaultsWithSetField(t *testing.T) { + // Check that a set value is not overridden. + m := &Defaults{ + F_Int32: Int32(12), + } + SetDefaults(m) + if v := m.GetF_Int32(); v != 12 { + t.Errorf("m.FInt32 = %v, want 12", v) + } +} + +func TestSetDefaultsWithSubMessage(t *testing.T) { + m := &OtherMessage{ + Key: Int64(123), + Inner: &InnerMessage{ + Host: String("gopher"), + }, + } + expected := &OtherMessage{ + Key: Int64(123), + Inner: &InnerMessage{ + Host: String("gopher"), + Port: Int32(4000), + }, + } + SetDefaults(m) + if !Equal(m, expected) { + t.Errorf("\n got %v\nwant %v", m, expected) + } +} + +func TestSetDefaultsWithRepeatedSubMessage(t *testing.T) { + m := &MyMessage{ + RepInner: []*InnerMessage{{}}, + } + expected := &MyMessage{ + RepInner: []*InnerMessage{{ + Port: Int32(4000), + }}, + } + SetDefaults(m) + if !Equal(m, expected) { + t.Errorf("\n got %v\nwant %v", m, expected) + } +} + +func TestSetDefaultWithRepeatedNonMessage(t *testing.T) { + m := &MyMessage{ + Pet: []string{"turtle", "wombat"}, + } + expected := Clone(m) + SetDefaults(m) + if !Equal(m, expected) { + t.Errorf("\n got %v\nwant %v", m, expected) + } +} + +func TestMaximumTagNumber(t *testing.T) { + m := &MaxTag{ + LastField: String("natural goat essence"), + } + buf, err := Marshal(m) + if err != nil { + t.Fatalf("proto.Marshal failed: %v", err) + } + m2 := new(MaxTag) + if err := Unmarshal(buf, m2); err != nil { + t.Fatalf("proto.Unmarshal failed: %v", err) + } + if got, want := m2.GetLastField(), *m.LastField; got != want { + t.Errorf("got %q, want %q", got, want) + } +} + +func TestJSON(t *testing.T) { + m := &MyMessage{ + Count: Int32(4), + Pet: []string{"bunny", "kitty"}, + Inner: &InnerMessage{ + Host: String("cauchy"), + }, + Bikeshed: MyMessage_GREEN.Enum(), + } + const expected = `{"count":4,"pet":["bunny","kitty"],"inner":{"host":"cauchy"},"bikeshed":1}` + + b, err := json.Marshal(m) + if err != nil { + t.Fatalf("json.Marshal failed: %v", err) + } + s := string(b) + if s != expected { + t.Errorf("got %s\nwant %s", s, expected) + } + + received := new(MyMessage) + if err := json.Unmarshal(b, received); err != nil { + t.Fatalf("json.Unmarshal failed: %v", err) + } + if !Equal(received, m) { + t.Fatalf("got %s, want %s", received, m) + } + + // Test unmarshalling of JSON with symbolic enum name. + const old = `{"count":4,"pet":["bunny","kitty"],"inner":{"host":"cauchy"},"bikeshed":"GREEN"}` + received.Reset() + if err := json.Unmarshal([]byte(old), received); err != nil { + t.Fatalf("json.Unmarshal failed: %v", err) + } + if !Equal(received, m) { + t.Fatalf("got %s, want %s", received, m) + } +} + +func TestBadWireType(t *testing.T) { + b := []byte{7<<3 | 6} // field 7, wire type 6 + pb := new(OtherMessage) + if err := Unmarshal(b, pb); err == nil { + t.Errorf("Unmarshal did not fail") + } else if !strings.Contains(err.Error(), "unknown wire type") { + t.Errorf("wrong error: %v", err) + } +} + +func TestBytesWithInvalidLength(t *testing.T) { + // If a byte sequence has an invalid (negative) length, Unmarshal should not panic. + b := []byte{2<<3 | WireBytes, 0xff, 0xff, 0xff, 0xff, 0xff, 0} + Unmarshal(b, new(MyMessage)) +} + +func TestLengthOverflow(t *testing.T) { + // Overflowing a length should not panic. + b := []byte{2<<3 | WireBytes, 1, 1, 3<<3 | WireBytes, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x7f, 0x01} + Unmarshal(b, new(MyMessage)) +} + +func TestVarintOverflow(t *testing.T) { + // Overflowing a 64-bit length should not be allowed. + b := []byte{1<<3 | WireVarint, 0x01, 3<<3 | WireBytes, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x01} + if err := Unmarshal(b, new(MyMessage)); err == nil { + t.Fatalf("Overflowed uint64 length without error") + } +} + +func TestUnmarshalFuzz(t *testing.T) { + const N = 1000 + seed := time.Now().UnixNano() + t.Logf("RNG seed is %d", seed) + rng := rand.New(rand.NewSource(seed)) + buf := make([]byte, 20) + for i := 0; i < N; i++ { + for j := range buf { + buf[j] = byte(rng.Intn(256)) + } + fuzzUnmarshal(t, buf) + } +} + +func TestMergeMessages(t *testing.T) { + pb := &MessageList{Message: []*MessageList_Message{{Name: String("x"), Count: Int32(1)}}} + data, err := Marshal(pb) + if err != nil { + t.Fatalf("Marshal: %v", err) + } + + pb1 := new(MessageList) + if err := Unmarshal(data, pb1); err != nil { + t.Fatalf("first Unmarshal: %v", err) + } + if err := Unmarshal(data, pb1); err != nil { + t.Fatalf("second Unmarshal: %v", err) + } + if len(pb1.Message) != 1 { + t.Errorf("two Unmarshals produced %d Messages, want 1", len(pb1.Message)) + } + + pb2 := new(MessageList) + if err := UnmarshalMerge(data, pb2); err != nil { + t.Fatalf("first UnmarshalMerge: %v", err) + } + if err := UnmarshalMerge(data, pb2); err != nil { + t.Fatalf("second UnmarshalMerge: %v", err) + } + if len(pb2.Message) != 2 { + t.Errorf("two UnmarshalMerges produced %d Messages, want 2", len(pb2.Message)) + } +} + +func TestExtensionMarshalOrder(t *testing.T) { + m := &MyMessage{Count: Int(123)} + if err := SetExtension(m, E_Ext_More, &Ext{Data: String("alpha")}); err != nil { + t.Fatalf("SetExtension: %v", err) + } + if err := SetExtension(m, E_Ext_Text, String("aleph")); err != nil { + t.Fatalf("SetExtension: %v", err) + } + if err := SetExtension(m, E_Ext_Number, Int32(1)); err != nil { + t.Fatalf("SetExtension: %v", err) + } + + // Serialize m several times, and check we get the same bytes each time. + var orig []byte + for i := 0; i < 100; i++ { + b, err := Marshal(m) + if err != nil { + t.Fatalf("Marshal: %v", err) + } + if i == 0 { + orig = b + continue + } + if !bytes.Equal(b, orig) { + t.Errorf("Bytes differ on attempt #%d", i) + } + } +} + +// Many extensions, because small maps might not iterate differently on each iteration. +var exts = []*ExtensionDesc{ + E_X201, + E_X202, + E_X203, + E_X204, + E_X205, + E_X206, + E_X207, + E_X208, + E_X209, + E_X210, + E_X211, + E_X212, + E_X213, + E_X214, + E_X215, + E_X216, + E_X217, + E_X218, + E_X219, + E_X220, + E_X221, + E_X222, + E_X223, + E_X224, + E_X225, + E_X226, + E_X227, + E_X228, + E_X229, + E_X230, + E_X231, + E_X232, + E_X233, + E_X234, + E_X235, + E_X236, + E_X237, + E_X238, + E_X239, + E_X240, + E_X241, + E_X242, + E_X243, + E_X244, + E_X245, + E_X246, + E_X247, + E_X248, + E_X249, + E_X250, +} + +func TestMessageSetMarshalOrder(t *testing.T) { + m := &MyMessageSet{} + for _, x := range exts { + if err := SetExtension(m, x, &Empty{}); err != nil { + t.Fatalf("SetExtension: %v", err) + } + } + + buf, err := Marshal(m) + if err != nil { + t.Fatalf("Marshal: %v", err) + } + + // Serialize m several times, and check we get the same bytes each time. + for i := 0; i < 10; i++ { + b1, err := Marshal(m) + if err != nil { + t.Fatalf("Marshal: %v", err) + } + if !bytes.Equal(b1, buf) { + t.Errorf("Bytes differ on re-Marshal #%d", i) + } + + m2 := &MyMessageSet{} + if err = Unmarshal(buf, m2); err != nil { + t.Errorf("Unmarshal: %v", err) + } + b2, err := Marshal(m2) + if err != nil { + t.Errorf("re-Marshal: %v", err) + } + if !bytes.Equal(b2, buf) { + t.Errorf("Bytes differ on round-trip #%d", i) + } + } +} + +func TestUnmarshalMergesMessages(t *testing.T) { + // If a nested message occurs twice in the input, + // the fields should be merged when decoding. + a := &OtherMessage{ + Key: Int64(123), + Inner: &InnerMessage{ + Host: String("polhode"), + Port: Int32(1234), + }, + } + aData, err := Marshal(a) + if err != nil { + t.Fatalf("Marshal(a): %v", err) + } + b := &OtherMessage{ + Weight: Float32(1.2), + Inner: &InnerMessage{ + Host: String("herpolhode"), + Connected: Bool(true), + }, + } + bData, err := Marshal(b) + if err != nil { + t.Fatalf("Marshal(b): %v", err) + } + want := &OtherMessage{ + Key: Int64(123), + Weight: Float32(1.2), + Inner: &InnerMessage{ + Host: String("herpolhode"), + Port: Int32(1234), + Connected: Bool(true), + }, + } + got := new(OtherMessage) + if err := Unmarshal(append(aData, bData...), got); err != nil { + t.Fatalf("Unmarshal: %v", err) + } + if !Equal(got, want) { + t.Errorf("\n got %v\nwant %v", got, want) + } +} + +func TestEncodingSizes(t *testing.T) { + tests := []struct { + m Message + n int + }{ + {&Defaults{F_Int32: Int32(math.MaxInt32)}, 6}, + {&Defaults{F_Int32: Int32(math.MinInt32)}, 11}, + {&Defaults{F_Uint32: Uint32(uint32(math.MaxInt32) + 1)}, 6}, + {&Defaults{F_Uint32: Uint32(math.MaxUint32)}, 6}, + } + for _, test := range tests { + b, err := Marshal(test.m) + if err != nil { + t.Errorf("Marshal(%v): %v", test.m, err) + continue + } + if len(b) != test.n { + t.Errorf("Marshal(%v) yielded %d bytes, want %d bytes", test.m, len(b), test.n) + } + } +} + +func TestRequiredNotSetError(t *testing.T) { + pb := initGoTest(false) + pb.RequiredField.Label = nil + pb.F_Int32Required = nil + pb.F_Int64Required = nil + + expected := "0807" + // field 1, encoding 0, value 7 + "2206" + "120474797065" + // field 4, encoding 2 (GoTestField) + "5001" + // field 10, encoding 0, value 1 + "6d20000000" + // field 13, encoding 5, value 0x20 + "714000000000000000" + // field 14, encoding 1, value 0x40 + "78a019" + // field 15, encoding 0, value 0xca0 = 3232 + "8001c032" + // field 16, encoding 0, value 0x1940 = 6464 + "8d0100004a45" + // field 17, encoding 5, value 3232.0 + "9101000000000040b940" + // field 18, encoding 1, value 6464.0 + "9a0106" + "737472696e67" + // field 19, encoding 2, string "string" + "b304" + // field 70, encoding 3, start group + "ba0408" + "7265717569726564" + // field 71, encoding 2, string "required" + "b404" + // field 70, encoding 4, end group + "aa0605" + "6279746573" + // field 101, encoding 2, string "bytes" + "b0063f" + // field 102, encoding 0, 0x3f zigzag32 + "b8067f" // field 103, encoding 0, 0x7f zigzag64 + + o := old() + bytes, err := Marshal(pb) + if _, ok := err.(*RequiredNotSetError); !ok { + fmt.Printf("marshal-1 err = %v, want *RequiredNotSetError", err) + o.DebugPrint("", bytes) + t.Fatalf("expected = %s", expected) + } + if strings.Index(err.Error(), "RequiredField.Label") < 0 { + t.Errorf("marshal-1 wrong err msg: %v", err) + } + if !equal(bytes, expected, t) { + o.DebugPrint("neq 1", bytes) + t.Fatalf("expected = %s", expected) + } + + // Now test Unmarshal by recreating the original buffer. + pbd := new(GoTest) + err = Unmarshal(bytes, pbd) + if _, ok := err.(*RequiredNotSetError); !ok { + t.Fatalf("unmarshal err = %v, want *RequiredNotSetError", err) + o.DebugPrint("", bytes) + t.Fatalf("string = %s", expected) + } + if strings.Index(err.Error(), "RequiredField.{Unknown}") < 0 { + t.Errorf("unmarshal wrong err msg: %v", err) + } + bytes, err = Marshal(pbd) + if _, ok := err.(*RequiredNotSetError); !ok { + t.Errorf("marshal-2 err = %v, want *RequiredNotSetError", err) + o.DebugPrint("", bytes) + t.Fatalf("string = %s", expected) + } + if strings.Index(err.Error(), "RequiredField.Label") < 0 { + t.Errorf("marshal-2 wrong err msg: %v", err) + } + if !equal(bytes, expected, t) { + o.DebugPrint("neq 2", bytes) + t.Fatalf("string = %s", expected) + } +} + +func fuzzUnmarshal(t *testing.T, data []byte) { + defer func() { + if e := recover(); e != nil { + t.Errorf("These bytes caused a panic: %+v", data) + t.Logf("Stack:\n%s", debug.Stack()) + t.FailNow() + } + }() + + pb := new(MyMessage) + Unmarshal(data, pb) +} + +func TestMapFieldMarshal(t *testing.T) { + m := &MessageWithMap{ + NameMapping: map[int32]string{ + 1: "Rob", + 4: "Ian", + 8: "Dave", + }, + } + b, err := Marshal(m) + if err != nil { + t.Fatalf("Marshal: %v", err) + } + + // b should be the concatenation of these three byte sequences in some order. + parts := []string{ + "\n\a\b\x01\x12\x03Rob", + "\n\a\b\x04\x12\x03Ian", + "\n\b\b\x08\x12\x04Dave", + } + ok := false + for i := range parts { + for j := range parts { + if j == i { + continue + } + for k := range parts { + if k == i || k == j { + continue + } + try := parts[i] + parts[j] + parts[k] + if bytes.Equal(b, []byte(try)) { + ok = true + break + } + } + } + } + if !ok { + t.Fatalf("Incorrect Marshal output.\n got %q\nwant %q (or a permutation of that)", b, parts[0]+parts[1]+parts[2]) + } + t.Logf("FYI b: %q", b) + + (new(Buffer)).DebugPrint("Dump of b", b) +} + +func TestMapFieldRoundTrips(t *testing.T) { + m := &MessageWithMap{ + NameMapping: map[int32]string{ + 1: "Rob", + 4: "Ian", + 8: "Dave", + }, + MsgMapping: map[int64]*FloatingPoint{ + 0x7001: {F: Float64(2.0)}, + }, + ByteMapping: map[bool][]byte{ + false: []byte("that's not right!"), + true: []byte("aye, 'tis true!"), + }, + } + b, err := Marshal(m) + if err != nil { + t.Fatalf("Marshal: %v", err) + } + t.Logf("FYI b: %q", b) + m2 := new(MessageWithMap) + if err := Unmarshal(b, m2); err != nil { + t.Fatalf("Unmarshal: %v", err) + } + for _, pair := range [][2]interface{}{ + {m.NameMapping, m2.NameMapping}, + {m.MsgMapping, m2.MsgMapping}, + {m.ByteMapping, m2.ByteMapping}, + } { + if !reflect.DeepEqual(pair[0], pair[1]) { + t.Errorf("Map did not survive a round trip.\ninitial: %v\n final: %v", pair[0], pair[1]) + } + } +} + +func TestMapFieldWithNil(t *testing.T) { + m := &MessageWithMap{ + MsgMapping: map[int64]*FloatingPoint{ + 1: nil, + }, + } + b, err := Marshal(m) + if err == nil { + t.Fatalf("Marshal of bad map should have failed, got these bytes: %v", b) + } +} + +func TestOneof(t *testing.T) { + m := &Communique{} + b, err := Marshal(m) + if err != nil { + t.Fatalf("Marshal of empty message with oneof: %v", err) + } + if len(b) != 0 { + t.Errorf("Marshal of empty message yielded too many bytes: %v", b) + } + + m = &Communique{ + Union: &Communique_Name{"Barry"}, + } + + // Round-trip. + b, err = Marshal(m) + if err != nil { + t.Fatalf("Marshal of message with oneof: %v", err) + } + if len(b) != 7 { // name tag/wire (1) + name len (1) + name (5) + t.Errorf("Incorrect marshal of message with oneof: %v", b) + } + m.Reset() + if err = Unmarshal(b, m); err != nil { + t.Fatalf("Unmarshal of message with oneof: %v", err) + } + if x, ok := m.Union.(*Communique_Name); !ok || x.Name != "Barry" { + t.Errorf("After round trip, Union = %+v", m.Union) + } + if name := m.GetName(); name != "Barry" { + t.Errorf("After round trip, GetName = %q, want %q", name, "Barry") + } + + // Let's try with a message in the oneof. + m.Union = &Communique_Msg{&Strings{StringField: String("deep deep string")}} + b, err = Marshal(m) + if err != nil { + t.Fatalf("Marshal of message with oneof set to message: %v", err) + } + if len(b) != 20 { // msg tag/wire (1) + msg len (1) + msg (1 + 1 + 16) + t.Errorf("Incorrect marshal of message with oneof set to message: %v", b) + } + m.Reset() + if err := Unmarshal(b, m); err != nil { + t.Fatalf("Unmarshal of message with oneof set to message: %v", err) + } + ss, ok := m.Union.(*Communique_Msg) + if !ok || ss.Msg.GetStringField() != "deep deep string" { + t.Errorf("After round trip with oneof set to message, Union = %+v", m.Union) + } +} + +func TestInefficientPackedBool(t *testing.T) { + // https://github.com/golang/protobuf/issues/76 + inp := []byte{ + 0x12, 0x02, // 0x12 = 2<<3|2; 2 bytes + // Usually a bool should take a single byte, + // but it is permitted to be any varint. + 0xb9, 0x30, + } + if err := Unmarshal(inp, new(MoreRepeated)); err != nil { + t.Error(err) + } +} + +// Benchmarks + +func testMsg() *GoTest { + pb := initGoTest(true) + const N = 1000 // Internally the library starts much smaller. + pb.F_Int32Repeated = make([]int32, N) + pb.F_DoubleRepeated = make([]float64, N) + for i := 0; i < N; i++ { + pb.F_Int32Repeated[i] = int32(i) + pb.F_DoubleRepeated[i] = float64(i) + } + return pb +} + +func bytesMsg() *GoTest { + pb := initGoTest(true) + buf := make([]byte, 4000) + for i := range buf { + buf[i] = byte(i) + } + pb.F_BytesDefaulted = buf + return pb +} + +func benchmarkMarshal(b *testing.B, pb Message, marshal func(Message) ([]byte, error)) { + d, _ := marshal(pb) + b.SetBytes(int64(len(d))) + b.ResetTimer() + for i := 0; i < b.N; i++ { + marshal(pb) + } +} + +func benchmarkBufferMarshal(b *testing.B, pb Message) { + p := NewBuffer(nil) + benchmarkMarshal(b, pb, func(pb0 Message) ([]byte, error) { + p.Reset() + err := p.Marshal(pb0) + return p.Bytes(), err + }) +} + +func benchmarkSize(b *testing.B, pb Message) { + benchmarkMarshal(b, pb, func(pb0 Message) ([]byte, error) { + Size(pb) + return nil, nil + }) +} + +func newOf(pb Message) Message { + in := reflect.ValueOf(pb) + if in.IsNil() { + return pb + } + return reflect.New(in.Type().Elem()).Interface().(Message) +} + +func benchmarkUnmarshal(b *testing.B, pb Message, unmarshal func([]byte, Message) error) { + d, _ := Marshal(pb) + b.SetBytes(int64(len(d))) + pbd := newOf(pb) + + b.ResetTimer() + for i := 0; i < b.N; i++ { + unmarshal(d, pbd) + } +} + +func benchmarkBufferUnmarshal(b *testing.B, pb Message) { + p := NewBuffer(nil) + benchmarkUnmarshal(b, pb, func(d []byte, pb0 Message) error { + p.SetBuf(d) + return p.Unmarshal(pb0) + }) +} + +// Benchmark{Marshal,BufferMarshal,Size,Unmarshal,BufferUnmarshal}{,Bytes} + +func BenchmarkMarshal(b *testing.B) { + benchmarkMarshal(b, testMsg(), Marshal) +} + +func BenchmarkBufferMarshal(b *testing.B) { + benchmarkBufferMarshal(b, testMsg()) +} + +func BenchmarkSize(b *testing.B) { + benchmarkSize(b, testMsg()) +} + +func BenchmarkUnmarshal(b *testing.B) { + benchmarkUnmarshal(b, testMsg(), Unmarshal) +} + +func BenchmarkBufferUnmarshal(b *testing.B) { + benchmarkBufferUnmarshal(b, testMsg()) +} + +func BenchmarkMarshalBytes(b *testing.B) { + benchmarkMarshal(b, bytesMsg(), Marshal) +} + +func BenchmarkBufferMarshalBytes(b *testing.B) { + benchmarkBufferMarshal(b, bytesMsg()) +} + +func BenchmarkSizeBytes(b *testing.B) { + benchmarkSize(b, bytesMsg()) +} + +func BenchmarkUnmarshalBytes(b *testing.B) { + benchmarkUnmarshal(b, bytesMsg(), Unmarshal) +} + +func BenchmarkBufferUnmarshalBytes(b *testing.B) { + benchmarkBufferUnmarshal(b, bytesMsg()) +} + +func BenchmarkUnmarshalUnrecognizedFields(b *testing.B) { + b.StopTimer() + pb := initGoTestField() + skip := &GoSkipTest{ + SkipInt32: Int32(32), + SkipFixed32: Uint32(3232), + SkipFixed64: Uint64(6464), + SkipString: String("skipper"), + Skipgroup: &GoSkipTest_SkipGroup{ + GroupInt32: Int32(75), + GroupString: String("wxyz"), + }, + } + + pbd := new(GoTestField) + p := NewBuffer(nil) + p.Marshal(pb) + p.Marshal(skip) + p2 := NewBuffer(nil) + + b.StartTimer() + for i := 0; i < b.N; i++ { + p2.SetBuf(p.Bytes()) + p2.Unmarshal(pbd) + } +} diff --git a/vendor/github.com/gogo/protobuf/proto/clone_test.go b/vendor/github.com/gogo/protobuf/proto/clone_test.go new file mode 100644 index 000000000..f065210b8 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/proto/clone_test.go @@ -0,0 +1,267 @@ +// Go support for Protocol Buffers - Google's data interchange format +// +// Copyright 2011 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 proto_test + +import ( + "testing" + + "github.com/gogo/protobuf/proto" + + proto3pb "github.com/gogo/protobuf/proto/proto3_proto" + pb "github.com/gogo/protobuf/proto/testdata" +) + +var cloneTestMessage = &pb.MyMessage{ + Count: proto.Int32(42), + Name: proto.String("Dave"), + Pet: []string{"bunny", "kitty", "horsey"}, + Inner: &pb.InnerMessage{ + Host: proto.String("niles"), + Port: proto.Int32(9099), + Connected: proto.Bool(true), + }, + Others: []*pb.OtherMessage{ + { + Value: []byte("some bytes"), + }, + }, + Somegroup: &pb.MyMessage_SomeGroup{ + GroupField: proto.Int32(6), + }, + RepBytes: [][]byte{[]byte("sham"), []byte("wow")}, +} + +func init() { + ext := &pb.Ext{ + Data: proto.String("extension"), + } + if err := proto.SetExtension(cloneTestMessage, pb.E_Ext_More, ext); err != nil { + panic("SetExtension: " + err.Error()) + } +} + +func TestClone(t *testing.T) { + m := proto.Clone(cloneTestMessage).(*pb.MyMessage) + if !proto.Equal(m, cloneTestMessage) { + t.Errorf("Clone(%v) = %v", cloneTestMessage, m) + } + + // Verify it was a deep copy. + *m.Inner.Port++ + if proto.Equal(m, cloneTestMessage) { + t.Error("Mutating clone changed the original") + } + // Byte fields and repeated fields should be copied. + if &m.Pet[0] == &cloneTestMessage.Pet[0] { + t.Error("Pet: repeated field not copied") + } + if &m.Others[0] == &cloneTestMessage.Others[0] { + t.Error("Others: repeated field not copied") + } + if &m.Others[0].Value[0] == &cloneTestMessage.Others[0].Value[0] { + t.Error("Others[0].Value: bytes field not copied") + } + if &m.RepBytes[0] == &cloneTestMessage.RepBytes[0] { + t.Error("RepBytes: repeated field not copied") + } + if &m.RepBytes[0][0] == &cloneTestMessage.RepBytes[0][0] { + t.Error("RepBytes[0]: bytes field not copied") + } +} + +func TestCloneNil(t *testing.T) { + var m *pb.MyMessage + if c := proto.Clone(m); !proto.Equal(m, c) { + t.Errorf("Clone(%v) = %v", m, c) + } +} + +var mergeTests = []struct { + src, dst, want proto.Message +}{ + { + src: &pb.MyMessage{ + Count: proto.Int32(42), + }, + dst: &pb.MyMessage{ + Name: proto.String("Dave"), + }, + want: &pb.MyMessage{ + Count: proto.Int32(42), + Name: proto.String("Dave"), + }, + }, + { + src: &pb.MyMessage{ + Inner: &pb.InnerMessage{ + Host: proto.String("hey"), + Connected: proto.Bool(true), + }, + Pet: []string{"horsey"}, + Others: []*pb.OtherMessage{ + { + Value: []byte("some bytes"), + }, + }, + }, + dst: &pb.MyMessage{ + Inner: &pb.InnerMessage{ + Host: proto.String("niles"), + Port: proto.Int32(9099), + }, + Pet: []string{"bunny", "kitty"}, + Others: []*pb.OtherMessage{ + { + Key: proto.Int64(31415926535), + }, + { + // Explicitly test a src=nil field + Inner: nil, + }, + }, + }, + want: &pb.MyMessage{ + Inner: &pb.InnerMessage{ + Host: proto.String("hey"), + Connected: proto.Bool(true), + Port: proto.Int32(9099), + }, + Pet: []string{"bunny", "kitty", "horsey"}, + Others: []*pb.OtherMessage{ + { + Key: proto.Int64(31415926535), + }, + {}, + { + Value: []byte("some bytes"), + }, + }, + }, + }, + { + src: &pb.MyMessage{ + RepBytes: [][]byte{[]byte("wow")}, + }, + dst: &pb.MyMessage{ + Somegroup: &pb.MyMessage_SomeGroup{ + GroupField: proto.Int32(6), + }, + RepBytes: [][]byte{[]byte("sham")}, + }, + want: &pb.MyMessage{ + Somegroup: &pb.MyMessage_SomeGroup{ + GroupField: proto.Int32(6), + }, + RepBytes: [][]byte{[]byte("sham"), []byte("wow")}, + }, + }, + // Check that a scalar bytes field replaces rather than appends. + { + src: &pb.OtherMessage{Value: []byte("foo")}, + dst: &pb.OtherMessage{Value: []byte("bar")}, + want: &pb.OtherMessage{Value: []byte("foo")}, + }, + { + src: &pb.MessageWithMap{ + NameMapping: map[int32]string{6: "Nigel"}, + MsgMapping: map[int64]*pb.FloatingPoint{ + 0x4001: {F: proto.Float64(2.0)}, + }, + ByteMapping: map[bool][]byte{true: []byte("wowsa")}, + }, + dst: &pb.MessageWithMap{ + NameMapping: map[int32]string{ + 6: "Bruce", // should be overwritten + 7: "Andrew", + }, + }, + want: &pb.MessageWithMap{ + NameMapping: map[int32]string{ + 6: "Nigel", + 7: "Andrew", + }, + MsgMapping: map[int64]*pb.FloatingPoint{ + 0x4001: {F: proto.Float64(2.0)}, + }, + ByteMapping: map[bool][]byte{true: []byte("wowsa")}, + }, + }, + // proto3 shouldn't merge zero values, + // in the same way that proto2 shouldn't merge nils. + { + src: &proto3pb.Message{ + Name: "Aaron", + Data: []byte(""), // zero value, but not nil + }, + dst: &proto3pb.Message{ + HeightInCm: 176, + Data: []byte("texas!"), + }, + want: &proto3pb.Message{ + Name: "Aaron", + HeightInCm: 176, + Data: []byte("texas!"), + }, + }, + // Oneof fields should merge by assignment. + { + src: &pb.Communique{ + Union: &pb.Communique_Number{Number: 41}, + }, + dst: &pb.Communique{ + Union: &pb.Communique_Name{Name: "Bobby Tables"}, + }, + want: &pb.Communique{ + Union: &pb.Communique_Number{Number: 41}, + }, + }, + // Oneof nil is the same as not set. + { + src: &pb.Communique{}, + dst: &pb.Communique{ + Union: &pb.Communique_Name{Name: "Bobby Tables"}, + }, + want: &pb.Communique{ + Union: &pb.Communique_Name{Name: "Bobby Tables"}, + }, + }, +} + +func TestMerge(t *testing.T) { + for _, m := range mergeTests { + got := proto.Clone(m.dst) + proto.Merge(got, m.src) + if !proto.Equal(got, m.want) { + t.Errorf("Merge(%v, %v)\n got %v\nwant %v\n", m.dst, m.src, got, m.want) + } + } +} diff --git a/vendor/github.com/gogo/protobuf/proto/equal_test.go b/vendor/github.com/gogo/protobuf/proto/equal_test.go new file mode 100644 index 000000000..02ecaf1b9 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/proto/equal_test.go @@ -0,0 +1,212 @@ +// Go support for Protocol Buffers - Google's data interchange format +// +// Copyright 2011 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 proto_test + +import ( + "testing" + + . "github.com/gogo/protobuf/proto" + proto3pb "github.com/gogo/protobuf/proto/proto3_proto" + pb "github.com/gogo/protobuf/proto/testdata" +) + +// Four identical base messages. +// The init function adds extensions to some of them. +var messageWithoutExtension = &pb.MyMessage{Count: Int32(7)} +var messageWithExtension1a = &pb.MyMessage{Count: Int32(7)} +var messageWithExtension1b = &pb.MyMessage{Count: Int32(7)} +var messageWithExtension2 = &pb.MyMessage{Count: Int32(7)} + +// Two messages with non-message extensions. +var messageWithInt32Extension1 = &pb.MyMessage{Count: Int32(8)} +var messageWithInt32Extension2 = &pb.MyMessage{Count: Int32(8)} + +func init() { + ext1 := &pb.Ext{Data: String("Kirk")} + ext2 := &pb.Ext{Data: String("Picard")} + + // messageWithExtension1a has ext1, but never marshals it. + if err := SetExtension(messageWithExtension1a, pb.E_Ext_More, ext1); err != nil { + panic("SetExtension on 1a failed: " + err.Error()) + } + + // messageWithExtension1b is the unmarshaled form of messageWithExtension1a. + if err := SetExtension(messageWithExtension1b, pb.E_Ext_More, ext1); err != nil { + panic("SetExtension on 1b failed: " + err.Error()) + } + buf, err := Marshal(messageWithExtension1b) + if err != nil { + panic("Marshal of 1b failed: " + err.Error()) + } + messageWithExtension1b.Reset() + if err := Unmarshal(buf, messageWithExtension1b); err != nil { + panic("Unmarshal of 1b failed: " + err.Error()) + } + + // messageWithExtension2 has ext2. + if err := SetExtension(messageWithExtension2, pb.E_Ext_More, ext2); err != nil { + panic("SetExtension on 2 failed: " + err.Error()) + } + + if err := SetExtension(messageWithInt32Extension1, pb.E_Ext_Number, Int32(23)); err != nil { + panic("SetExtension on Int32-1 failed: " + err.Error()) + } + if err := SetExtension(messageWithInt32Extension1, pb.E_Ext_Number, Int32(24)); err != nil { + panic("SetExtension on Int32-2 failed: " + err.Error()) + } +} + +var EqualTests = []struct { + desc string + a, b Message + exp bool +}{ + {"different types", &pb.GoEnum{}, &pb.GoTestField{}, false}, + {"equal empty", &pb.GoEnum{}, &pb.GoEnum{}, true}, + {"nil vs nil", nil, nil, true}, + {"typed nil vs typed nil", (*pb.GoEnum)(nil), (*pb.GoEnum)(nil), true}, + {"typed nil vs empty", (*pb.GoEnum)(nil), &pb.GoEnum{}, false}, + {"different typed nil", (*pb.GoEnum)(nil), (*pb.GoTestField)(nil), false}, + + {"one set field, one unset field", &pb.GoTestField{Label: String("foo")}, &pb.GoTestField{}, false}, + {"one set field zero, one unset field", &pb.GoTest{Param: Int32(0)}, &pb.GoTest{}, false}, + {"different set fields", &pb.GoTestField{Label: String("foo")}, &pb.GoTestField{Label: String("bar")}, false}, + {"equal set", &pb.GoTestField{Label: String("foo")}, &pb.GoTestField{Label: String("foo")}, true}, + + {"repeated, one set", &pb.GoTest{F_Int32Repeated: []int32{2, 3}}, &pb.GoTest{}, false}, + {"repeated, different length", &pb.GoTest{F_Int32Repeated: []int32{2, 3}}, &pb.GoTest{F_Int32Repeated: []int32{2}}, false}, + {"repeated, different value", &pb.GoTest{F_Int32Repeated: []int32{2}}, &pb.GoTest{F_Int32Repeated: []int32{3}}, false}, + {"repeated, equal", &pb.GoTest{F_Int32Repeated: []int32{2, 4}}, &pb.GoTest{F_Int32Repeated: []int32{2, 4}}, true}, + {"repeated, nil equal nil", &pb.GoTest{F_Int32Repeated: nil}, &pb.GoTest{F_Int32Repeated: nil}, true}, + {"repeated, nil equal empty", &pb.GoTest{F_Int32Repeated: nil}, &pb.GoTest{F_Int32Repeated: []int32{}}, true}, + {"repeated, empty equal nil", &pb.GoTest{F_Int32Repeated: []int32{}}, &pb.GoTest{F_Int32Repeated: nil}, true}, + + { + "nested, different", + &pb.GoTest{RequiredField: &pb.GoTestField{Label: String("foo")}}, + &pb.GoTest{RequiredField: &pb.GoTestField{Label: String("bar")}}, + false, + }, + { + "nested, equal", + &pb.GoTest{RequiredField: &pb.GoTestField{Label: String("wow")}}, + &pb.GoTest{RequiredField: &pb.GoTestField{Label: String("wow")}}, + true, + }, + + {"bytes", &pb.OtherMessage{Value: []byte("foo")}, &pb.OtherMessage{Value: []byte("foo")}, true}, + {"bytes, empty", &pb.OtherMessage{Value: []byte{}}, &pb.OtherMessage{Value: []byte{}}, true}, + {"bytes, empty vs nil", &pb.OtherMessage{Value: []byte{}}, &pb.OtherMessage{Value: nil}, false}, + { + "repeated bytes", + &pb.MyMessage{RepBytes: [][]byte{[]byte("sham"), []byte("wow")}}, + &pb.MyMessage{RepBytes: [][]byte{[]byte("sham"), []byte("wow")}}, + true, + }, + // In proto3, []byte{} and []byte(nil) are equal. + {"proto3 bytes, empty vs nil", &proto3pb.Message{Data: []byte{}}, &proto3pb.Message{Data: nil}, true}, + + {"extension vs. no extension", messageWithoutExtension, messageWithExtension1a, false}, + {"extension vs. same extension", messageWithExtension1a, messageWithExtension1b, true}, + {"extension vs. different extension", messageWithExtension1a, messageWithExtension2, false}, + + {"int32 extension vs. itself", messageWithInt32Extension1, messageWithInt32Extension1, true}, + {"int32 extension vs. a different int32", messageWithInt32Extension1, messageWithInt32Extension2, false}, + + { + "message with group", + &pb.MyMessage{ + Count: Int32(1), + Somegroup: &pb.MyMessage_SomeGroup{ + GroupField: Int32(5), + }, + }, + &pb.MyMessage{ + Count: Int32(1), + Somegroup: &pb.MyMessage_SomeGroup{ + GroupField: Int32(5), + }, + }, + true, + }, + + { + "map same", + &pb.MessageWithMap{NameMapping: map[int32]string{1: "Ken"}}, + &pb.MessageWithMap{NameMapping: map[int32]string{1: "Ken"}}, + true, + }, + { + "map different entry", + &pb.MessageWithMap{NameMapping: map[int32]string{1: "Ken"}}, + &pb.MessageWithMap{NameMapping: map[int32]string{2: "Rob"}}, + false, + }, + { + "map different key only", + &pb.MessageWithMap{NameMapping: map[int32]string{1: "Ken"}}, + &pb.MessageWithMap{NameMapping: map[int32]string{2: "Ken"}}, + false, + }, + { + "map different value only", + &pb.MessageWithMap{NameMapping: map[int32]string{1: "Ken"}}, + &pb.MessageWithMap{NameMapping: map[int32]string{1: "Rob"}}, + false, + }, + { + "oneof same", + &pb.Communique{Union: &pb.Communique_Number{Number: 41}}, + &pb.Communique{Union: &pb.Communique_Number{Number: 41}}, + true, + }, + { + "oneof one nil", + &pb.Communique{Union: &pb.Communique_Number{Number: 41}}, + &pb.Communique{}, + false, + }, + { + "oneof different", + &pb.Communique{Union: &pb.Communique_Number{Number: 41}}, + &pb.Communique{Union: &pb.Communique_Name{Name: "Bobby Tables"}}, + false, + }, +} + +func TestEqual(t *testing.T) { + for _, tc := range EqualTests { + if res := Equal(tc.a, tc.b); res != tc.exp { + t.Errorf("%v: Equal(%v, %v) = %v, want %v", tc.desc, tc.a, tc.b, res, tc.exp) + } + } +} diff --git a/vendor/github.com/gogo/protobuf/proto/extensions_test.go b/vendor/github.com/gogo/protobuf/proto/extensions_test.go new file mode 100644 index 000000000..49ea43ee7 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/proto/extensions_test.go @@ -0,0 +1,430 @@ +// Go support for Protocol Buffers - Google's data interchange format +// +// Copyright 2014 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 proto_test + +import ( + "bytes" + "fmt" + "reflect" + "testing" + + "github.com/gogo/protobuf/proto" + pb "github.com/gogo/protobuf/proto/testdata" +) + +func TestGetExtensionsWithMissingExtensions(t *testing.T) { + msg := &pb.MyMessage{} + ext1 := &pb.Ext{} + if err := proto.SetExtension(msg, pb.E_Ext_More, ext1); err != nil { + t.Fatalf("Could not set ext1: %s", ext1) + } + exts, err := proto.GetExtensions(msg, []*proto.ExtensionDesc{ + pb.E_Ext_More, + pb.E_Ext_Text, + }) + if err != nil { + t.Fatalf("GetExtensions() failed: %s", err) + } + if exts[0] != ext1 { + t.Errorf("ext1 not in returned extensions: %T %v", exts[0], exts[0]) + } + if exts[1] != nil { + t.Errorf("ext2 in returned extensions: %T %v", exts[1], exts[1]) + } +} + +func TestGetExtensionStability(t *testing.T) { + check := func(m *pb.MyMessage) bool { + ext1, err := proto.GetExtension(m, pb.E_Ext_More) + if err != nil { + t.Fatalf("GetExtension() failed: %s", err) + } + ext2, err := proto.GetExtension(m, pb.E_Ext_More) + if err != nil { + t.Fatalf("GetExtension() failed: %s", err) + } + return ext1 == ext2 + } + msg := &pb.MyMessage{Count: proto.Int32(4)} + ext0 := &pb.Ext{} + if err := proto.SetExtension(msg, pb.E_Ext_More, ext0); err != nil { + t.Fatalf("Could not set ext1: %s", ext0) + } + if !check(msg) { + t.Errorf("GetExtension() not stable before marshaling") + } + bb, err := proto.Marshal(msg) + if err != nil { + t.Fatalf("Marshal() failed: %s", err) + } + msg1 := &pb.MyMessage{} + err = proto.Unmarshal(bb, msg1) + if err != nil { + t.Fatalf("Unmarshal() failed: %s", err) + } + if !check(msg1) { + t.Errorf("GetExtension() not stable after unmarshaling") + } +} + +func TestGetExtensionDefaults(t *testing.T) { + var setFloat64 float64 = 1 + var setFloat32 float32 = 2 + var setInt32 int32 = 3 + var setInt64 int64 = 4 + var setUint32 uint32 = 5 + var setUint64 uint64 = 6 + var setBool = true + var setBool2 = false + var setString = "Goodnight string" + var setBytes = []byte("Goodnight bytes") + var setEnum = pb.DefaultsMessage_TWO + + type testcase struct { + ext *proto.ExtensionDesc // Extension we are testing. + want interface{} // Expected value of extension, or nil (meaning that GetExtension will fail). + def interface{} // Expected value of extension after ClearExtension(). + } + tests := []testcase{ + {pb.E_NoDefaultDouble, setFloat64, nil}, + {pb.E_NoDefaultFloat, setFloat32, nil}, + {pb.E_NoDefaultInt32, setInt32, nil}, + {pb.E_NoDefaultInt64, setInt64, nil}, + {pb.E_NoDefaultUint32, setUint32, nil}, + {pb.E_NoDefaultUint64, setUint64, nil}, + {pb.E_NoDefaultSint32, setInt32, nil}, + {pb.E_NoDefaultSint64, setInt64, nil}, + {pb.E_NoDefaultFixed32, setUint32, nil}, + {pb.E_NoDefaultFixed64, setUint64, nil}, + {pb.E_NoDefaultSfixed32, setInt32, nil}, + {pb.E_NoDefaultSfixed64, setInt64, nil}, + {pb.E_NoDefaultBool, setBool, nil}, + {pb.E_NoDefaultBool, setBool2, nil}, + {pb.E_NoDefaultString, setString, nil}, + {pb.E_NoDefaultBytes, setBytes, nil}, + {pb.E_NoDefaultEnum, setEnum, nil}, + {pb.E_DefaultDouble, setFloat64, float64(3.1415)}, + {pb.E_DefaultFloat, setFloat32, float32(3.14)}, + {pb.E_DefaultInt32, setInt32, int32(42)}, + {pb.E_DefaultInt64, setInt64, int64(43)}, + {pb.E_DefaultUint32, setUint32, uint32(44)}, + {pb.E_DefaultUint64, setUint64, uint64(45)}, + {pb.E_DefaultSint32, setInt32, int32(46)}, + {pb.E_DefaultSint64, setInt64, int64(47)}, + {pb.E_DefaultFixed32, setUint32, uint32(48)}, + {pb.E_DefaultFixed64, setUint64, uint64(49)}, + {pb.E_DefaultSfixed32, setInt32, int32(50)}, + {pb.E_DefaultSfixed64, setInt64, int64(51)}, + {pb.E_DefaultBool, setBool, true}, + {pb.E_DefaultBool, setBool2, true}, + {pb.E_DefaultString, setString, "Hello, string"}, + {pb.E_DefaultBytes, setBytes, []byte("Hello, bytes")}, + {pb.E_DefaultEnum, setEnum, pb.DefaultsMessage_ONE}, + } + + checkVal := func(test testcase, msg *pb.DefaultsMessage, valWant interface{}) error { + val, err := proto.GetExtension(msg, test.ext) + if err != nil { + if valWant != nil { + return fmt.Errorf("GetExtension(): %s", err) + } + if want := proto.ErrMissingExtension; err != want { + return fmt.Errorf("Unexpected error: got %v, want %v", err, want) + } + return nil + } + + // All proto2 extension values are either a pointer to a value or a slice of values. + ty := reflect.TypeOf(val) + tyWant := reflect.TypeOf(test.ext.ExtensionType) + if got, want := ty, tyWant; got != want { + return fmt.Errorf("unexpected reflect.TypeOf(): got %v want %v", got, want) + } + tye := ty.Elem() + tyeWant := tyWant.Elem() + if got, want := tye, tyeWant; got != want { + return fmt.Errorf("unexpected reflect.TypeOf().Elem(): got %v want %v", got, want) + } + + // Check the name of the type of the value. + // If it is an enum it will be type int32 with the name of the enum. + if got, want := tye.Name(), tye.Name(); got != want { + return fmt.Errorf("unexpected reflect.TypeOf().Elem().Name(): got %v want %v", got, want) + } + + // Check that value is what we expect. + // If we have a pointer in val, get the value it points to. + valExp := val + if ty.Kind() == reflect.Ptr { + valExp = reflect.ValueOf(val).Elem().Interface() + } + if got, want := valExp, valWant; !reflect.DeepEqual(got, want) { + return fmt.Errorf("unexpected reflect.DeepEqual(): got %v want %v", got, want) + } + + return nil + } + + setTo := func(test testcase) interface{} { + setTo := reflect.ValueOf(test.want) + if typ := reflect.TypeOf(test.ext.ExtensionType); typ.Kind() == reflect.Ptr { + setTo = reflect.New(typ).Elem() + setTo.Set(reflect.New(setTo.Type().Elem())) + setTo.Elem().Set(reflect.ValueOf(test.want)) + } + return setTo.Interface() + } + + for _, test := range tests { + msg := &pb.DefaultsMessage{} + name := test.ext.Name + + // Check the initial value. + if err := checkVal(test, msg, test.def); err != nil { + t.Errorf("%s: %v", name, err) + } + + // Set the per-type value and check value. + name = fmt.Sprintf("%s (set to %T %v)", name, test.want, test.want) + if err := proto.SetExtension(msg, test.ext, setTo(test)); err != nil { + t.Errorf("%s: SetExtension(): %v", name, err) + continue + } + if err := checkVal(test, msg, test.want); err != nil { + t.Errorf("%s: %v", name, err) + continue + } + + // Set and check the value. + name += " (cleared)" + proto.ClearExtension(msg, test.ext) + if err := checkVal(test, msg, test.def); err != nil { + t.Errorf("%s: %v", name, err) + } + } +} + +func TestExtensionsRoundTrip(t *testing.T) { + msg := &pb.MyMessage{} + ext1 := &pb.Ext{ + Data: proto.String("hi"), + } + ext2 := &pb.Ext{ + Data: proto.String("there"), + } + exists := proto.HasExtension(msg, pb.E_Ext_More) + if exists { + t.Error("Extension More present unexpectedly") + } + if err := proto.SetExtension(msg, pb.E_Ext_More, ext1); err != nil { + t.Error(err) + } + if err := proto.SetExtension(msg, pb.E_Ext_More, ext2); err != nil { + t.Error(err) + } + e, err := proto.GetExtension(msg, pb.E_Ext_More) + if err != nil { + t.Error(err) + } + x, ok := e.(*pb.Ext) + if !ok { + t.Errorf("e has type %T, expected testdata.Ext", e) + } else if *x.Data != "there" { + t.Errorf("SetExtension failed to overwrite, got %+v, not 'there'", x) + } + proto.ClearExtension(msg, pb.E_Ext_More) + if _, err = proto.GetExtension(msg, pb.E_Ext_More); err != proto.ErrMissingExtension { + t.Errorf("got %v, expected ErrMissingExtension", e) + } + if _, err := proto.GetExtension(msg, pb.E_X215); err == nil { + t.Error("expected bad extension error, got nil") + } + if err := proto.SetExtension(msg, pb.E_X215, 12); err == nil { + t.Error("expected extension err") + } + if err := proto.SetExtension(msg, pb.E_Ext_More, 12); err == nil { + t.Error("expected some sort of type mismatch error, got nil") + } +} + +func TestNilExtension(t *testing.T) { + msg := &pb.MyMessage{ + Count: proto.Int32(1), + } + if err := proto.SetExtension(msg, pb.E_Ext_Text, proto.String("hello")); err != nil { + t.Fatal(err) + } + if err := proto.SetExtension(msg, pb.E_Ext_More, (*pb.Ext)(nil)); err == nil { + t.Error("expected SetExtension to fail due to a nil extension") + } else if want := "proto: SetExtension called with nil value of type *testdata.Ext"; err.Error() != want { + t.Errorf("expected error %v, got %v", want, err) + } + // Note: if the behavior of Marshal is ever changed to ignore nil extensions, update + // this test to verify that E_Ext_Text is properly propagated through marshal->unmarshal. +} + +func TestMarshalUnmarshalRepeatedExtension(t *testing.T) { + // Add a repeated extension to the result. + tests := []struct { + name string + ext []*pb.ComplexExtension + }{ + { + "two fields", + []*pb.ComplexExtension{ + {First: proto.Int32(7)}, + {Second: proto.Int32(11)}, + }, + }, + { + "repeated field", + []*pb.ComplexExtension{ + {Third: []int32{1000}}, + {Third: []int32{2000}}, + }, + }, + { + "two fields and repeated field", + []*pb.ComplexExtension{ + {Third: []int32{1000}}, + {First: proto.Int32(9)}, + {Second: proto.Int32(21)}, + {Third: []int32{2000}}, + }, + }, + } + for _, test := range tests { + // Marshal message with a repeated extension. + msg1 := new(pb.OtherMessage) + err := proto.SetExtension(msg1, pb.E_RComplex, test.ext) + if err != nil { + t.Fatalf("[%s] Error setting extension: %v", test.name, err) + } + b, err := proto.Marshal(msg1) + if err != nil { + t.Fatalf("[%s] Error marshaling message: %v", test.name, err) + } + + // Unmarshal and read the merged proto. + msg2 := new(pb.OtherMessage) + err = proto.Unmarshal(b, msg2) + if err != nil { + t.Fatalf("[%s] Error unmarshaling message: %v", test.name, err) + } + e, err := proto.GetExtension(msg2, pb.E_RComplex) + if err != nil { + t.Fatalf("[%s] Error getting extension: %v", test.name, err) + } + ext := e.([]*pb.ComplexExtension) + if ext == nil { + t.Fatalf("[%s] Invalid extension", test.name) + } + if !reflect.DeepEqual(ext, test.ext) { + t.Errorf("[%s] Wrong value for ComplexExtension: got: %v want: %v\n", test.name, ext, test.ext) + } + } +} + +func TestUnmarshalRepeatingNonRepeatedExtension(t *testing.T) { + // We may see multiple instances of the same extension in the wire + // format. For example, the proto compiler may encode custom options in + // this way. Here, we verify that we merge the extensions together. + tests := []struct { + name string + ext []*pb.ComplexExtension + }{ + { + "two fields", + []*pb.ComplexExtension{ + {First: proto.Int32(7)}, + {Second: proto.Int32(11)}, + }, + }, + { + "repeated field", + []*pb.ComplexExtension{ + {Third: []int32{1000}}, + {Third: []int32{2000}}, + }, + }, + { + "two fields and repeated field", + []*pb.ComplexExtension{ + {Third: []int32{1000}}, + {First: proto.Int32(9)}, + {Second: proto.Int32(21)}, + {Third: []int32{2000}}, + }, + }, + } + for _, test := range tests { + var buf bytes.Buffer + var want pb.ComplexExtension + + // Generate a serialized representation of a repeated extension + // by catenating bytes together. + for i, e := range test.ext { + // Merge to create the wanted proto. + proto.Merge(&want, e) + + // serialize the message + msg := new(pb.OtherMessage) + err := proto.SetExtension(msg, pb.E_Complex, e) + if err != nil { + t.Fatalf("[%s] Error setting extension %d: %v", test.name, i, err) + } + b, err := proto.Marshal(msg) + if err != nil { + t.Fatalf("[%s] Error marshaling message %d: %v", test.name, i, err) + } + buf.Write(b) + } + + // Unmarshal and read the merged proto. + msg2 := new(pb.OtherMessage) + err := proto.Unmarshal(buf.Bytes(), msg2) + if err != nil { + t.Fatalf("[%s] Error unmarshaling message: %v", test.name, err) + } + e, err := proto.GetExtension(msg2, pb.E_Complex) + if err != nil { + t.Fatalf("[%s] Error getting extension: %v", test.name, err) + } + ext := e.(*pb.ComplexExtension) + if ext == nil { + t.Fatalf("[%s] Invalid extension", test.name) + } + if !reflect.DeepEqual(*ext, want) { + t.Errorf("[%s] Wrong value for ComplexExtension: got: %v want: %v\n", test.name, ext, want) + } + } +} diff --git a/vendor/github.com/gogo/protobuf/proto/message_set_test.go b/vendor/github.com/gogo/protobuf/proto/message_set_test.go new file mode 100644 index 000000000..ab8ac2f0e --- /dev/null +++ b/vendor/github.com/gogo/protobuf/proto/message_set_test.go @@ -0,0 +1,66 @@ +// Go support for Protocol Buffers - Google's data interchange format +// +// Copyright 2014 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 proto + +import ( + "bytes" + "testing" +) + +func TestUnmarshalMessageSetWithDuplicate(t *testing.T) { + // Check that a repeated message set entry will be concatenated. + in := &messageSet{ + Item: []*_MessageSet_Item{ + {TypeId: Int32(12345), Message: []byte("hoo")}, + {TypeId: Int32(12345), Message: []byte("hah")}, + }, + } + b, err := Marshal(in) + if err != nil { + t.Fatalf("Marshal: %v", err) + } + t.Logf("Marshaled bytes: %q", b) + + m := make(map[int32]Extension) + if err := UnmarshalMessageSet(b, m); err != nil { + t.Fatalf("UnmarshalMessageSet: %v", err) + } + ext, ok := m[12345] + if !ok { + t.Fatalf("Didn't retrieve extension 12345; map is %v", m) + } + // Skip wire type/field number and length varints. + got := skipVarint(skipVarint(ext.enc)) + if want := []byte("hoohah"); !bytes.Equal(got, want) { + t.Errorf("Combined extension is %q, want %q", got, want) + } +} diff --git a/vendor/github.com/gogo/protobuf/proto/proto3_proto/proto3.pb.go b/vendor/github.com/gogo/protobuf/proto/proto3_proto/proto3.pb.go new file mode 100644 index 000000000..28303e17f --- /dev/null +++ b/vendor/github.com/gogo/protobuf/proto/proto3_proto/proto3.pb.go @@ -0,0 +1,176 @@ +// Code generated by protoc-gen-gogo. +// source: proto3_proto/proto3.proto +// DO NOT EDIT! + +/* +Package proto3_proto is a generated protocol buffer package. + +It is generated from these files: + proto3_proto/proto3.proto + +It has these top-level messages: + Message + Nested + MessageWithMap +*/ +package proto3_proto + +import proto "github.com/gogo/protobuf/proto" +import fmt "fmt" +import math "math" +import testdata "github.com/gogo/protobuf/proto/testdata" + +// 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. +const _ = proto.GoGoProtoPackageIsVersion1 + +type Message_Humour int32 + +const ( + Message_UNKNOWN Message_Humour = 0 + Message_PUNS Message_Humour = 1 + Message_SLAPSTICK Message_Humour = 2 + Message_BILL_BAILEY Message_Humour = 3 +) + +var Message_Humour_name = map[int32]string{ + 0: "UNKNOWN", + 1: "PUNS", + 2: "SLAPSTICK", + 3: "BILL_BAILEY", +} +var Message_Humour_value = map[string]int32{ + "UNKNOWN": 0, + "PUNS": 1, + "SLAPSTICK": 2, + "BILL_BAILEY": 3, +} + +func (x Message_Humour) String() string { + return proto.EnumName(Message_Humour_name, int32(x)) +} +func (Message_Humour) EnumDescriptor() ([]byte, []int) { return fileDescriptorProto3, []int{0, 0} } + +type Message struct { + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + Hilarity Message_Humour `protobuf:"varint,2,opt,name=hilarity,proto3,enum=proto3_proto.Message_Humour" json:"hilarity,omitempty"` + HeightInCm uint32 `protobuf:"varint,3,opt,name=height_in_cm,json=heightInCm,proto3" json:"height_in_cm,omitempty"` + Data []byte `protobuf:"bytes,4,opt,name=data,proto3" json:"data,omitempty"` + ResultCount int64 `protobuf:"varint,7,opt,name=result_count,json=resultCount,proto3" json:"result_count,omitempty"` + TrueScotsman bool `protobuf:"varint,8,opt,name=true_scotsman,json=trueScotsman,proto3" json:"true_scotsman,omitempty"` + Score float32 `protobuf:"fixed32,9,opt,name=score,proto3" json:"score,omitempty"` + Key []uint64 `protobuf:"varint,5,rep,name=key" json:"key,omitempty"` + Nested *Nested `protobuf:"bytes,6,opt,name=nested" json:"nested,omitempty"` + Terrain map[string]*Nested `protobuf:"bytes,10,rep,name=terrain" json:"terrain,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value"` + Proto2Field *testdata.SubDefaults `protobuf:"bytes,11,opt,name=proto2_field,json=proto2Field" json:"proto2_field,omitempty"` + Proto2Value map[string]*testdata.SubDefaults `protobuf:"bytes,13,rep,name=proto2_value,json=proto2Value" json:"proto2_value,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value"` +} + +func (m *Message) Reset() { *m = Message{} } +func (m *Message) String() string { return proto.CompactTextString(m) } +func (*Message) ProtoMessage() {} +func (*Message) Descriptor() ([]byte, []int) { return fileDescriptorProto3, []int{0} } + +func (m *Message) GetNested() *Nested { + if m != nil { + return m.Nested + } + return nil +} + +func (m *Message) GetTerrain() map[string]*Nested { + if m != nil { + return m.Terrain + } + return nil +} + +func (m *Message) GetProto2Field() *testdata.SubDefaults { + if m != nil { + return m.Proto2Field + } + return nil +} + +func (m *Message) GetProto2Value() map[string]*testdata.SubDefaults { + if m != nil { + return m.Proto2Value + } + return nil +} + +type Nested struct { + Bunny string `protobuf:"bytes,1,opt,name=bunny,proto3" json:"bunny,omitempty"` +} + +func (m *Nested) Reset() { *m = Nested{} } +func (m *Nested) String() string { return proto.CompactTextString(m) } +func (*Nested) ProtoMessage() {} +func (*Nested) Descriptor() ([]byte, []int) { return fileDescriptorProto3, []int{1} } + +type MessageWithMap struct { + ByteMapping map[bool][]byte `protobuf:"bytes,1,rep,name=byte_mapping,json=byteMapping" json:"byte_mapping,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` +} + +func (m *MessageWithMap) Reset() { *m = MessageWithMap{} } +func (m *MessageWithMap) String() string { return proto.CompactTextString(m) } +func (*MessageWithMap) ProtoMessage() {} +func (*MessageWithMap) Descriptor() ([]byte, []int) { return fileDescriptorProto3, []int{2} } + +func (m *MessageWithMap) GetByteMapping() map[bool][]byte { + if m != nil { + return m.ByteMapping + } + return nil +} + +func init() { + proto.RegisterType((*Message)(nil), "proto3_proto.Message") + proto.RegisterType((*Nested)(nil), "proto3_proto.Nested") + proto.RegisterType((*MessageWithMap)(nil), "proto3_proto.MessageWithMap") + proto.RegisterEnum("proto3_proto.Message_Humour", Message_Humour_name, Message_Humour_value) +} + +var fileDescriptorProto3 = []byte{ + // 550 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0x7c, 0x53, 0x6d, 0x8f, 0xd2, 0x40, + 0x10, 0x96, 0x77, 0x98, 0x96, 0xb3, 0xd9, 0x60, 0xb2, 0x12, 0x63, 0x10, 0x13, 0x73, 0xf1, 0xa5, + 0x24, 0xf8, 0xe5, 0x62, 0x8c, 0xe6, 0xc0, 0x33, 0x92, 0x03, 0x24, 0xcb, 0xe1, 0xc5, 0x4f, 0xcd, + 0x16, 0x96, 0xd2, 0x48, 0xb7, 0xa4, 0xdd, 0x9a, 0xf0, 0x77, 0xfc, 0x55, 0xfe, 0x1c, 0xb7, 0xbb, + 0xe5, 0xae, 0x77, 0xc1, 0xfb, 0xd4, 0xd9, 0x67, 0x9e, 0x99, 0x67, 0xf6, 0x99, 0x2d, 0x3c, 0xdd, + 0x45, 0xa1, 0x08, 0xdf, 0x3b, 0xea, 0xd3, 0xd3, 0x07, 0x5b, 0x7d, 0x90, 0x99, 0x4f, 0xb5, 0xfb, + 0x9e, 0x2f, 0x36, 0x89, 0x6b, 0x2f, 0xc3, 0xa0, 0xe7, 0x85, 0x5e, 0xc6, 0x75, 0x93, 0xb5, 0x0e, + 0x7a, 0x82, 0xc5, 0x62, 0x45, 0x05, 0x55, 0x81, 0xee, 0xd0, 0xfd, 0x5b, 0x81, 0xda, 0x84, 0xc5, + 0x31, 0xf5, 0x18, 0x42, 0x50, 0xe6, 0x34, 0x60, 0xb8, 0xd0, 0x29, 0x9c, 0x36, 0x88, 0x8a, 0xd1, + 0x19, 0xd4, 0x37, 0xfe, 0x96, 0x46, 0xbe, 0xd8, 0xe3, 0xa2, 0xc4, 0x4f, 0xfa, 0xcf, 0xec, 0xbc, + 0xa8, 0x9d, 0x15, 0xdb, 0xdf, 0x92, 0x20, 0x4c, 0x22, 0x72, 0xc3, 0x46, 0x1d, 0x30, 0x37, 0xcc, + 0xf7, 0x36, 0xc2, 0xf1, 0xb9, 0xb3, 0x0c, 0x70, 0x49, 0x56, 0x37, 0x09, 0x68, 0x6c, 0xc4, 0x87, + 0x41, 0xaa, 0x97, 0x8e, 0x83, 0xcb, 0x32, 0x63, 0x12, 0x15, 0xa3, 0x17, 0x60, 0x46, 0x2c, 0x4e, + 0xb6, 0xc2, 0x59, 0x86, 0x09, 0x17, 0xb8, 0x26, 0x73, 0x25, 0x62, 0x68, 0x6c, 0x98, 0x42, 0xe8, + 0x25, 0x34, 0x45, 0x94, 0x30, 0x27, 0x5e, 0x86, 0x22, 0x0e, 0x28, 0xc7, 0x75, 0xc9, 0xa9, 0x13, + 0x33, 0x05, 0xe7, 0x19, 0x86, 0x5a, 0x50, 0x91, 0xf9, 0x88, 0xe1, 0x86, 0x4c, 0x16, 0x89, 0x3e, + 0x20, 0x0b, 0x4a, 0xbf, 0xd8, 0x1e, 0x57, 0x3a, 0xa5, 0xd3, 0x32, 0x49, 0x43, 0xf4, 0x16, 0xaa, + 0x5c, 0xba, 0xc1, 0x56, 0xb8, 0x2a, 0x89, 0x46, 0xbf, 0x75, 0xf7, 0x76, 0x53, 0x95, 0x23, 0x19, + 0x07, 0x7d, 0x84, 0x9a, 0x60, 0x51, 0x44, 0x7d, 0x8e, 0x41, 0xf6, 0x30, 0xfa, 0xdd, 0xe3, 0x66, + 0x5c, 0x69, 0xd2, 0x05, 0x17, 0xd1, 0x9e, 0x1c, 0x4a, 0xa4, 0x97, 0x7a, 0x5f, 0x7d, 0x67, 0xed, + 0xb3, 0xed, 0x0a, 0x1b, 0x4a, 0xf1, 0x89, 0x7d, 0xd8, 0x8b, 0x3d, 0x4f, 0xdc, 0x2f, 0x6c, 0x4d, + 0xe5, 0x4d, 0x63, 0x62, 0x68, 0xea, 0xd7, 0x94, 0x89, 0x46, 0x37, 0x95, 0xbf, 0xe9, 0x36, 0x61, + 0x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xb7, 0xaa, 0xa5, 0xff, 0x05, 0x00, 0x00, 0xff, 0xff, 0x9d, 0xf0, + 0x9a, 0xf4, 0x05, 0x04, 0x00, 0x00, +} diff --git a/vendor/github.com/gogo/protobuf/proto/proto3_proto/proto3.proto b/vendor/github.com/gogo/protobuf/proto/proto3_proto/proto3.proto new file mode 100644 index 000000000..ca670015a --- /dev/null +++ b/vendor/github.com/gogo/protobuf/proto/proto3_proto/proto3.proto @@ -0,0 +1,68 @@ +// Go support for Protocol Buffers - Google's data interchange format +// +// Copyright 2014 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. + +syntax = "proto3"; + +package proto3_proto; + +import "github.com/gogo/protobuf/proto/testdata/test.proto"; + +message Message { + enum Humour { + UNKNOWN = 0; + PUNS = 1; + SLAPSTICK = 2; + BILL_BAILEY = 3; + } + + string name = 1; + Humour hilarity = 2; + uint32 height_in_cm = 3; + bytes data = 4; + int64 result_count = 7; + bool true_scotsman = 8; + float score = 9; + + repeated uint64 key = 5; + Nested nested = 6; + + map terrain = 10; + testdata.SubDefaults proto2_field = 11; + map proto2_value = 13; +} + +message Nested { + string bunny = 1; +} + +message MessageWithMap { + map byte_mapping = 1; +} diff --git a/vendor/github.com/gogo/protobuf/proto/proto3_test.go b/vendor/github.com/gogo/protobuf/proto/proto3_test.go new file mode 100644 index 000000000..6f9cddc3f --- /dev/null +++ b/vendor/github.com/gogo/protobuf/proto/proto3_test.go @@ -0,0 +1,125 @@ +// Go support for Protocol Buffers - Google's data interchange format +// +// Copyright 2014 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 proto_test + +import ( + "testing" + + "github.com/gogo/protobuf/proto" + pb "github.com/gogo/protobuf/proto/proto3_proto" + tpb "github.com/gogo/protobuf/proto/testdata" +) + +func TestProto3ZeroValues(t *testing.T) { + tests := []struct { + desc string + m proto.Message + }{ + {"zero message", &pb.Message{}}, + {"empty bytes field", &pb.Message{Data: []byte{}}}, + } + for _, test := range tests { + b, err := proto.Marshal(test.m) + if err != nil { + t.Errorf("%s: proto.Marshal: %v", test.desc, err) + continue + } + if len(b) > 0 { + t.Errorf("%s: Encoding is non-empty: %q", test.desc, b) + } + } +} + +func TestRoundTripProto3(t *testing.T) { + m := &pb.Message{ + Name: "David", // (2 | 1<<3): 0x0a 0x05 "David" + Hilarity: pb.Message_PUNS, // (0 | 2<<3): 0x10 0x01 + HeightInCm: 178, // (0 | 3<<3): 0x18 0xb2 0x01 + Data: []byte("roboto"), // (2 | 4<<3): 0x20 0x06 "roboto" + ResultCount: 47, // (0 | 7<<3): 0x38 0x2f + TrueScotsman: true, // (0 | 8<<3): 0x40 0x01 + Score: 8.1, // (5 | 9<<3): 0x4d <8.1> + + Key: []uint64{1, 0xdeadbeef}, + Nested: &pb.Nested{ + Bunny: "Monty", + }, + } + t.Logf(" m: %v", m) + + b, err := proto.Marshal(m) + if err != nil { + t.Fatalf("proto.Marshal: %v", err) + } + t.Logf(" b: %q", b) + + m2 := new(pb.Message) + if err := proto.Unmarshal(b, m2); err != nil { + t.Fatalf("proto.Unmarshal: %v", err) + } + t.Logf("m2: %v", m2) + + if !proto.Equal(m, m2) { + t.Errorf("proto.Equal returned false:\n m: %v\nm2: %v", m, m2) + } +} + +func TestProto3SetDefaults(t *testing.T) { + in := &pb.Message{ + Terrain: map[string]*pb.Nested{ + "meadow": new(pb.Nested), + }, + Proto2Field: new(tpb.SubDefaults), + Proto2Value: map[string]*tpb.SubDefaults{ + "badlands": new(tpb.SubDefaults), + }, + } + + got := proto.Clone(in).(*pb.Message) + proto.SetDefaults(got) + + // There are no defaults in proto3. Everything should be the zero value, but + // we need to remember to set defaults for nested proto2 messages. + want := &pb.Message{ + Terrain: map[string]*pb.Nested{ + "meadow": new(pb.Nested), + }, + Proto2Field: &tpb.SubDefaults{N: proto.Int64(7)}, + Proto2Value: map[string]*tpb.SubDefaults{ + "badlands": {N: proto.Int64(7)}, + }, + } + + if !proto.Equal(got, want) { + t.Errorf("with in = %v\nproto.SetDefaults(in) =>\ngot %v\nwant %v", in, got, want) + } +} diff --git a/vendor/github.com/gogo/protobuf/proto/size2_test.go b/vendor/github.com/gogo/protobuf/proto/size2_test.go new file mode 100644 index 000000000..a2729c39a --- /dev/null +++ b/vendor/github.com/gogo/protobuf/proto/size2_test.go @@ -0,0 +1,63 @@ +// Go support for Protocol Buffers - Google's data interchange format +// +// Copyright 2012 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 proto + +import ( + "testing" +) + +// This is a separate file and package from size_test.go because that one uses +// generated messages and thus may not be in package proto without having a circular +// dependency, whereas this file tests unexported details of size.go. + +func TestVarintSize(t *testing.T) { + // Check the edge cases carefully. + testCases := []struct { + n uint64 + size int + }{ + {0, 1}, + {1, 1}, + {127, 1}, + {128, 2}, + {16383, 2}, + {16384, 3}, + {1<<63 - 1, 9}, + {1 << 63, 10}, + } + for _, tc := range testCases { + size := sizeVarint(tc.n) + if size != tc.size { + t.Errorf("sizeVarint(%d) = %d, want %d", tc.n, size, tc.size) + } + } +} diff --git a/vendor/github.com/gogo/protobuf/proto/size_test.go b/vendor/github.com/gogo/protobuf/proto/size_test.go new file mode 100644 index 000000000..0a6c1772b --- /dev/null +++ b/vendor/github.com/gogo/protobuf/proto/size_test.go @@ -0,0 +1,164 @@ +// Go support for Protocol Buffers - Google's data interchange format +// +// Copyright 2012 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 proto_test + +import ( + "log" + "strings" + "testing" + + . "github.com/gogo/protobuf/proto" + proto3pb "github.com/gogo/protobuf/proto/proto3_proto" + pb "github.com/gogo/protobuf/proto/testdata" +) + +var messageWithExtension1 = &pb.MyMessage{Count: Int32(7)} + +// messageWithExtension2 is in equal_test.go. +var messageWithExtension3 = &pb.MyMessage{Count: Int32(8)} + +func init() { + if err := SetExtension(messageWithExtension1, pb.E_Ext_More, &pb.Ext{Data: String("Abbott")}); err != nil { + log.Panicf("SetExtension: %v", err) + } + if err := SetExtension(messageWithExtension3, pb.E_Ext_More, &pb.Ext{Data: String("Costello")}); err != nil { + log.Panicf("SetExtension: %v", err) + } + + // Force messageWithExtension3 to have the extension encoded. + Marshal(messageWithExtension3) + +} + +var SizeTests = []struct { + desc string + pb Message +}{ + {"empty", &pb.OtherMessage{}}, + // Basic types. + {"bool", &pb.Defaults{F_Bool: Bool(true)}}, + {"int32", &pb.Defaults{F_Int32: Int32(12)}}, + {"negative int32", &pb.Defaults{F_Int32: Int32(-1)}}, + {"small int64", &pb.Defaults{F_Int64: Int64(1)}}, + {"big int64", &pb.Defaults{F_Int64: Int64(1 << 20)}}, + {"negative int64", &pb.Defaults{F_Int64: Int64(-1)}}, + {"fixed32", &pb.Defaults{F_Fixed32: Uint32(71)}}, + {"fixed64", &pb.Defaults{F_Fixed64: Uint64(72)}}, + {"uint32", &pb.Defaults{F_Uint32: Uint32(123)}}, + {"uint64", &pb.Defaults{F_Uint64: Uint64(124)}}, + {"float", &pb.Defaults{F_Float: Float32(12.6)}}, + {"double", &pb.Defaults{F_Double: Float64(13.9)}}, + {"string", &pb.Defaults{F_String: String("niles")}}, + {"bytes", &pb.Defaults{F_Bytes: []byte("wowsa")}}, + {"bytes, empty", &pb.Defaults{F_Bytes: []byte{}}}, + {"sint32", &pb.Defaults{F_Sint32: Int32(65)}}, + {"sint64", &pb.Defaults{F_Sint64: Int64(67)}}, + {"enum", &pb.Defaults{F_Enum: pb.Defaults_BLUE.Enum()}}, + // Repeated. + {"empty repeated bool", &pb.MoreRepeated{Bools: []bool{}}}, + {"repeated bool", &pb.MoreRepeated{Bools: []bool{false, true, true, false}}}, + {"packed repeated bool", &pb.MoreRepeated{BoolsPacked: []bool{false, true, true, false, true, true, true}}}, + {"repeated int32", &pb.MoreRepeated{Ints: []int32{1, 12203, 1729, -1}}}, + {"repeated int32 packed", &pb.MoreRepeated{IntsPacked: []int32{1, 12203, 1729}}}, + {"repeated int64 packed", &pb.MoreRepeated{Int64SPacked: []int64{ + // Need enough large numbers to verify that the header is counting the number of bytes + // for the field, not the number of elements. + 1 << 62, 1 << 62, 1 << 62, 1 << 62, 1 << 62, 1 << 62, 1 << 62, 1 << 62, 1 << 62, 1 << 62, + 1 << 62, 1 << 62, 1 << 62, 1 << 62, 1 << 62, 1 << 62, 1 << 62, 1 << 62, 1 << 62, 1 << 62, + }}}, + {"repeated string", &pb.MoreRepeated{Strings: []string{"r", "ken", "gri"}}}, + {"repeated fixed", &pb.MoreRepeated{Fixeds: []uint32{1, 2, 3, 4}}}, + // Nested. + {"nested", &pb.OldMessage{Nested: &pb.OldMessage_Nested{Name: String("whatever")}}}, + {"group", &pb.GroupOld{G: &pb.GroupOld_G{X: Int32(12345)}}}, + // Other things. + {"unrecognized", &pb.MoreRepeated{XXX_unrecognized: []byte{13<<3 | 0, 4}}}, + {"extension (unencoded)", messageWithExtension1}, + {"extension (encoded)", messageWithExtension3}, + // proto3 message + {"proto3 empty", &proto3pb.Message{}}, + {"proto3 bool", &proto3pb.Message{TrueScotsman: true}}, + {"proto3 int64", &proto3pb.Message{ResultCount: 1}}, + {"proto3 uint32", &proto3pb.Message{HeightInCm: 123}}, + {"proto3 float", &proto3pb.Message{Score: 12.6}}, + {"proto3 string", &proto3pb.Message{Name: "Snezana"}}, + {"proto3 bytes", &proto3pb.Message{Data: []byte("wowsa")}}, + {"proto3 bytes, empty", &proto3pb.Message{Data: []byte{}}}, + {"proto3 enum", &proto3pb.Message{Hilarity: proto3pb.Message_PUNS}}, + {"proto3 map field with empty bytes", &proto3pb.MessageWithMap{ByteMapping: map[bool][]byte{false: {}}}}, + + {"map field", &pb.MessageWithMap{NameMapping: map[int32]string{1: "Rob", 7: "Andrew"}}}, + {"map field with message", &pb.MessageWithMap{MsgMapping: map[int64]*pb.FloatingPoint{0x7001: {F: Float64(2.0)}}}}, + {"map field with bytes", &pb.MessageWithMap{ByteMapping: map[bool][]byte{true: []byte("this time for sure")}}}, + {"map field with empty bytes", &pb.MessageWithMap{ByteMapping: map[bool][]byte{true: {}}}}, + + {"map field with big entry", &pb.MessageWithMap{NameMapping: map[int32]string{8: strings.Repeat("x", 125)}}}, + {"map field with big key and val", &pb.MessageWithMap{StrToStr: map[string]string{strings.Repeat("x", 70): strings.Repeat("y", 70)}}}, + {"map field with big numeric key", &pb.MessageWithMap{NameMapping: map[int32]string{0xf00d: "om nom nom"}}}, + + {"oneof not set", &pb.Oneof{}}, + {"oneof bool", &pb.Oneof{Union: &pb.Oneof_F_Bool{F_Bool: true}}}, + {"oneof zero int32", &pb.Oneof{Union: &pb.Oneof_F_Int32{F_Int32: 0}}}, + {"oneof big int32", &pb.Oneof{Union: &pb.Oneof_F_Int32{F_Int32: 1 << 20}}}, + {"oneof int64", &pb.Oneof{Union: &pb.Oneof_F_Int64{F_Int64: 42}}}, + {"oneof fixed32", &pb.Oneof{Union: &pb.Oneof_F_Fixed32{F_Fixed32: 43}}}, + {"oneof fixed64", &pb.Oneof{Union: &pb.Oneof_F_Fixed64{F_Fixed64: 44}}}, + {"oneof uint32", &pb.Oneof{Union: &pb.Oneof_F_Uint32{F_Uint32: 45}}}, + {"oneof uint64", &pb.Oneof{Union: &pb.Oneof_F_Uint64{F_Uint64: 46}}}, + {"oneof float", &pb.Oneof{Union: &pb.Oneof_F_Float{F_Float: 47.1}}}, + {"oneof double", &pb.Oneof{Union: &pb.Oneof_F_Double{F_Double: 48.9}}}, + {"oneof string", &pb.Oneof{Union: &pb.Oneof_F_String{F_String: "Rhythmic Fman"}}}, + {"oneof bytes", &pb.Oneof{Union: &pb.Oneof_F_Bytes{F_Bytes: []byte("let go")}}}, + {"oneof sint32", &pb.Oneof{Union: &pb.Oneof_F_Sint32{F_Sint32: 50}}}, + {"oneof sint64", &pb.Oneof{Union: &pb.Oneof_F_Sint64{F_Sint64: 51}}}, + {"oneof enum", &pb.Oneof{Union: &pb.Oneof_F_Enum{F_Enum: pb.MyMessage_BLUE}}}, + {"message for oneof", &pb.GoTestField{Label: String("k"), Type: String("v")}}, + {"oneof message", &pb.Oneof{Union: &pb.Oneof_F_Message{F_Message: &pb.GoTestField{Label: String("k"), Type: String("v")}}}}, + {"oneof group", &pb.Oneof{Union: &pb.Oneof_FGroup{FGroup: &pb.Oneof_F_Group{X: Int32(52)}}}}, + {"oneof largest tag", &pb.Oneof{Union: &pb.Oneof_F_Largest_Tag{F_Largest_Tag: 1}}}, + {"multiple oneofs", &pb.Oneof{Union: &pb.Oneof_F_Int32{F_Int32: 1}, Tormato: &pb.Oneof_Value{Value: 2}}}, +} + +func TestSize(t *testing.T) { + for _, tc := range SizeTests { + size := Size(tc.pb) + b, err := Marshal(tc.pb) + if err != nil { + t.Errorf("%v: Marshal failed: %v", tc.desc, err) + continue + } + if size != len(b) { + t.Errorf("%v: Size(%v) = %d, want %d", tc.desc, tc.pb, size, len(b)) + t.Logf("%v: bytes: %#v", tc.desc, b) + } + } +} diff --git a/vendor/github.com/gogo/protobuf/proto/testdata/Makefile b/vendor/github.com/gogo/protobuf/proto/testdata/Makefile new file mode 100644 index 000000000..31d83277c --- /dev/null +++ b/vendor/github.com/gogo/protobuf/proto/testdata/Makefile @@ -0,0 +1,37 @@ +# 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. + +all: regenerate + +regenerate: + go install github.com/gogo/protobuf/protoc-min-version + protoc-min-version --version="3.0.0" --gogo_out=. test.proto + diff --git a/vendor/github.com/gogo/protobuf/proto/testdata/golden_test.go b/vendor/github.com/gogo/protobuf/proto/testdata/golden_test.go new file mode 100644 index 000000000..8e8451537 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/proto/testdata/golden_test.go @@ -0,0 +1,86 @@ +// Go support for Protocol Buffers - Google's data interchange format +// +// Copyright 2012 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. + +// Verify that the compiler output for test.proto is unchanged. + +package testdata + +import ( + "crypto/sha1" + "fmt" + "io/ioutil" + "os" + "os/exec" + "path/filepath" + "testing" +) + +// sum returns in string form (for easy comparison) the SHA-1 hash of the named file. +func sum(t *testing.T, name string) string { + data, err := ioutil.ReadFile(name) + if err != nil { + t.Fatal(err) + } + t.Logf("sum(%q): length is %d", name, len(data)) + hash := sha1.New() + _, err = hash.Write(data) + if err != nil { + t.Fatal(err) + } + return fmt.Sprintf("% x", hash.Sum(nil)) +} + +func run(t *testing.T, name string, args ...string) { + cmd := exec.Command(name, args...) + cmd.Stdin = os.Stdin + cmd.Stdout = os.Stdout + cmd.Stderr = os.Stderr + err := cmd.Run() + if err != nil { + t.Fatal(err) + } +} + +func TestGolden(t *testing.T) { + // Compute the original checksum. + goldenSum := sum(t, "test.pb.go") + // Run the proto compiler. + run(t, "protoc", "--gogo_out="+os.TempDir(), "test.proto") + newFile := filepath.Join(os.TempDir(), "test.pb.go") + defer os.Remove(newFile) + // Compute the new checksum. + newSum := sum(t, newFile) + // Verify + if newSum != goldenSum { + run(t, "diff", "-u", "test.pb.go", newFile) + t.Fatal("Code generated by protoc-gen-go has changed; update test.pb.go") + } +} diff --git a/vendor/github.com/gogo/protobuf/proto/testdata/test.pb.go b/vendor/github.com/gogo/protobuf/proto/testdata/test.pb.go new file mode 100644 index 000000000..edfa95796 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/proto/testdata/test.pb.go @@ -0,0 +1,3983 @@ +// Code generated by protoc-gen-gogo. +// source: test.proto +// DO NOT EDIT! + +/* +Package testdata is a generated protocol buffer package. + +It is generated from these files: + test.proto + +It has these top-level messages: + GoEnum + GoTestField + GoTest + GoSkipTest + NonPackedTest + PackedTest + MaxTag + OldMessage + NewMessage + InnerMessage + OtherMessage + MyMessage + Ext + ComplexExtension + DefaultsMessage + MyMessageSet + Empty + MessageList + Strings + Defaults + SubDefaults + RepeatedEnum + MoreRepeated + GroupOld + GroupNew + FloatingPoint + MessageWithMap + Oneof + Communique +*/ +package testdata + +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. +const _ = proto.GoGoProtoPackageIsVersion1 + +type FOO int32 + +const ( + FOO_FOO1 FOO = 1 +) + +var FOO_name = map[int32]string{ + 1: "FOO1", +} +var FOO_value = map[string]int32{ + "FOO1": 1, +} + +func (x FOO) Enum() *FOO { + p := new(FOO) + *p = x + return p +} +func (x FOO) String() string { + return proto.EnumName(FOO_name, int32(x)) +} +func (x *FOO) UnmarshalJSON(data []byte) error { + value, err := proto.UnmarshalJSONEnum(FOO_value, data, "FOO") + if err != nil { + return err + } + *x = FOO(value) + return nil +} +func (FOO) EnumDescriptor() ([]byte, []int) { return fileDescriptorTest, []int{0} } + +// An enum, for completeness. +type GoTest_KIND int32 + +const ( + GoTest_VOID GoTest_KIND = 0 + // Basic types + GoTest_BOOL GoTest_KIND = 1 + GoTest_BYTES GoTest_KIND = 2 + GoTest_FINGERPRINT GoTest_KIND = 3 + GoTest_FLOAT GoTest_KIND = 4 + GoTest_INT GoTest_KIND = 5 + GoTest_STRING GoTest_KIND = 6 + GoTest_TIME GoTest_KIND = 7 + // Groupings + GoTest_TUPLE GoTest_KIND = 8 + GoTest_ARRAY GoTest_KIND = 9 + GoTest_MAP GoTest_KIND = 10 + // Table types + GoTest_TABLE GoTest_KIND = 11 + // Functions + GoTest_FUNCTION GoTest_KIND = 12 +) + +var GoTest_KIND_name = map[int32]string{ + 0: "VOID", + 1: "BOOL", + 2: "BYTES", + 3: "FINGERPRINT", + 4: "FLOAT", + 5: "INT", + 6: "STRING", + 7: "TIME", + 8: "TUPLE", + 9: "ARRAY", + 10: "MAP", + 11: "TABLE", + 12: "FUNCTION", +} +var GoTest_KIND_value = map[string]int32{ + "VOID": 0, + "BOOL": 1, + "BYTES": 2, + "FINGERPRINT": 3, + "FLOAT": 4, + "INT": 5, + "STRING": 6, + "TIME": 7, + "TUPLE": 8, + "ARRAY": 9, + "MAP": 10, + "TABLE": 11, + "FUNCTION": 12, +} + +func (x GoTest_KIND) Enum() *GoTest_KIND { + p := new(GoTest_KIND) + *p = x + return p +} +func (x GoTest_KIND) String() string { + return proto.EnumName(GoTest_KIND_name, int32(x)) +} +func (x *GoTest_KIND) UnmarshalJSON(data []byte) error { + value, err := proto.UnmarshalJSONEnum(GoTest_KIND_value, data, "GoTest_KIND") + if err != nil { + return err + } + *x = GoTest_KIND(value) + return nil +} +func (GoTest_KIND) EnumDescriptor() ([]byte, []int) { return fileDescriptorTest, []int{2, 0} } + +type MyMessage_Color int32 + +const ( + MyMessage_RED MyMessage_Color = 0 + MyMessage_GREEN MyMessage_Color = 1 + MyMessage_BLUE MyMessage_Color = 2 +) + +var MyMessage_Color_name = map[int32]string{ + 0: "RED", + 1: "GREEN", + 2: "BLUE", +} +var MyMessage_Color_value = map[string]int32{ + "RED": 0, + "GREEN": 1, + "BLUE": 2, +} + +func (x MyMessage_Color) Enum() *MyMessage_Color { + p := new(MyMessage_Color) + *p = x + return p +} +func (x MyMessage_Color) String() string { + return proto.EnumName(MyMessage_Color_name, int32(x)) +} +func (x *MyMessage_Color) UnmarshalJSON(data []byte) error { + value, err := proto.UnmarshalJSONEnum(MyMessage_Color_value, data, "MyMessage_Color") + if err != nil { + return err + } + *x = MyMessage_Color(value) + return nil +} +func (MyMessage_Color) EnumDescriptor() ([]byte, []int) { return fileDescriptorTest, []int{11, 0} } + +type DefaultsMessage_DefaultsEnum int32 + +const ( + DefaultsMessage_ZERO DefaultsMessage_DefaultsEnum = 0 + DefaultsMessage_ONE DefaultsMessage_DefaultsEnum = 1 + DefaultsMessage_TWO DefaultsMessage_DefaultsEnum = 2 +) + +var DefaultsMessage_DefaultsEnum_name = map[int32]string{ + 0: "ZERO", + 1: "ONE", + 2: "TWO", +} +var DefaultsMessage_DefaultsEnum_value = map[string]int32{ + "ZERO": 0, + "ONE": 1, + "TWO": 2, +} + +func (x DefaultsMessage_DefaultsEnum) Enum() *DefaultsMessage_DefaultsEnum { + p := new(DefaultsMessage_DefaultsEnum) + *p = x + return p +} +func (x DefaultsMessage_DefaultsEnum) String() string { + return proto.EnumName(DefaultsMessage_DefaultsEnum_name, int32(x)) +} +func (x *DefaultsMessage_DefaultsEnum) UnmarshalJSON(data []byte) error { + value, err := proto.UnmarshalJSONEnum(DefaultsMessage_DefaultsEnum_value, data, "DefaultsMessage_DefaultsEnum") + if err != nil { + return err + } + *x = DefaultsMessage_DefaultsEnum(value) + return nil +} +func (DefaultsMessage_DefaultsEnum) EnumDescriptor() ([]byte, []int) { + return fileDescriptorTest, []int{14, 0} +} + +type Defaults_Color int32 + +const ( + Defaults_RED Defaults_Color = 0 + Defaults_GREEN Defaults_Color = 1 + Defaults_BLUE Defaults_Color = 2 +) + +var Defaults_Color_name = map[int32]string{ + 0: "RED", + 1: "GREEN", + 2: "BLUE", +} +var Defaults_Color_value = map[string]int32{ + "RED": 0, + "GREEN": 1, + "BLUE": 2, +} + +func (x Defaults_Color) Enum() *Defaults_Color { + p := new(Defaults_Color) + *p = x + return p +} +func (x Defaults_Color) String() string { + return proto.EnumName(Defaults_Color_name, int32(x)) +} +func (x *Defaults_Color) UnmarshalJSON(data []byte) error { + value, err := proto.UnmarshalJSONEnum(Defaults_Color_value, data, "Defaults_Color") + if err != nil { + return err + } + *x = Defaults_Color(value) + return nil +} +func (Defaults_Color) EnumDescriptor() ([]byte, []int) { return fileDescriptorTest, []int{19, 0} } + +type RepeatedEnum_Color int32 + +const ( + RepeatedEnum_RED RepeatedEnum_Color = 1 +) + +var RepeatedEnum_Color_name = map[int32]string{ + 1: "RED", +} +var RepeatedEnum_Color_value = map[string]int32{ + "RED": 1, +} + +func (x RepeatedEnum_Color) Enum() *RepeatedEnum_Color { + p := new(RepeatedEnum_Color) + *p = x + return p +} +func (x RepeatedEnum_Color) String() string { + return proto.EnumName(RepeatedEnum_Color_name, int32(x)) +} +func (x *RepeatedEnum_Color) UnmarshalJSON(data []byte) error { + value, err := proto.UnmarshalJSONEnum(RepeatedEnum_Color_value, data, "RepeatedEnum_Color") + if err != nil { + return err + } + *x = RepeatedEnum_Color(value) + return nil +} +func (RepeatedEnum_Color) EnumDescriptor() ([]byte, []int) { return fileDescriptorTest, []int{21, 0} } + +type GoEnum struct { + Foo *FOO `protobuf:"varint,1,req,name=foo,enum=testdata.FOO" json:"foo,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *GoEnum) Reset() { *m = GoEnum{} } +func (m *GoEnum) String() string { return proto.CompactTextString(m) } +func (*GoEnum) ProtoMessage() {} +func (*GoEnum) Descriptor() ([]byte, []int) { return fileDescriptorTest, []int{0} } + +func (m *GoEnum) GetFoo() FOO { + if m != nil && m.Foo != nil { + return *m.Foo + } + return FOO_FOO1 +} + +type GoTestField struct { + Label *string `protobuf:"bytes,1,req,name=Label,json=label" json:"Label,omitempty"` + Type *string `protobuf:"bytes,2,req,name=Type,json=type" json:"Type,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *GoTestField) Reset() { *m = GoTestField{} } +func (m *GoTestField) String() string { return proto.CompactTextString(m) } +func (*GoTestField) ProtoMessage() {} +func (*GoTestField) Descriptor() ([]byte, []int) { return fileDescriptorTest, []int{1} } + +func (m *GoTestField) GetLabel() string { + if m != nil && m.Label != nil { + return *m.Label + } + return "" +} + +func (m *GoTestField) GetType() string { + if m != nil && m.Type != nil { + return *m.Type + } + return "" +} + +type GoTest struct { + // Some typical parameters + Kind *GoTest_KIND `protobuf:"varint,1,req,name=Kind,json=kind,enum=testdata.GoTest_KIND" json:"Kind,omitempty"` + Table *string `protobuf:"bytes,2,opt,name=Table,json=table" json:"Table,omitempty"` + Param *int32 `protobuf:"varint,3,opt,name=Param,json=param" json:"Param,omitempty"` + // Required, repeated and optional foreign fields. + RequiredField *GoTestField `protobuf:"bytes,4,req,name=RequiredField,json=requiredField" json:"RequiredField,omitempty"` + RepeatedField []*GoTestField `protobuf:"bytes,5,rep,name=RepeatedField,json=repeatedField" json:"RepeatedField,omitempty"` + OptionalField *GoTestField `protobuf:"bytes,6,opt,name=OptionalField,json=optionalField" json:"OptionalField,omitempty"` + // Required fields of all basic types + F_BoolRequired *bool `protobuf:"varint,10,req,name=F_Bool_required,json=fBoolRequired" json:"F_Bool_required,omitempty"` + F_Int32Required *int32 `protobuf:"varint,11,req,name=F_Int32_required,json=fInt32Required" json:"F_Int32_required,omitempty"` + F_Int64Required *int64 `protobuf:"varint,12,req,name=F_Int64_required,json=fInt64Required" json:"F_Int64_required,omitempty"` + F_Fixed32Required *uint32 `protobuf:"fixed32,13,req,name=F_Fixed32_required,json=fFixed32Required" json:"F_Fixed32_required,omitempty"` + F_Fixed64Required *uint64 `protobuf:"fixed64,14,req,name=F_Fixed64_required,json=fFixed64Required" json:"F_Fixed64_required,omitempty"` + F_Uint32Required *uint32 `protobuf:"varint,15,req,name=F_Uint32_required,json=fUint32Required" json:"F_Uint32_required,omitempty"` + F_Uint64Required *uint64 `protobuf:"varint,16,req,name=F_Uint64_required,json=fUint64Required" json:"F_Uint64_required,omitempty"` + F_FloatRequired *float32 `protobuf:"fixed32,17,req,name=F_Float_required,json=fFloatRequired" json:"F_Float_required,omitempty"` + F_DoubleRequired *float64 `protobuf:"fixed64,18,req,name=F_Double_required,json=fDoubleRequired" json:"F_Double_required,omitempty"` + F_StringRequired *string `protobuf:"bytes,19,req,name=F_String_required,json=fStringRequired" json:"F_String_required,omitempty"` + F_BytesRequired []byte `protobuf:"bytes,101,req,name=F_Bytes_required,json=fBytesRequired" json:"F_Bytes_required,omitempty"` + F_Sint32Required *int32 `protobuf:"zigzag32,102,req,name=F_Sint32_required,json=fSint32Required" json:"F_Sint32_required,omitempty"` + F_Sint64Required *int64 `protobuf:"zigzag64,103,req,name=F_Sint64_required,json=fSint64Required" json:"F_Sint64_required,omitempty"` + // Repeated fields of all basic types + F_BoolRepeated []bool `protobuf:"varint,20,rep,name=F_Bool_repeated,json=fBoolRepeated" json:"F_Bool_repeated,omitempty"` + F_Int32Repeated []int32 `protobuf:"varint,21,rep,name=F_Int32_repeated,json=fInt32Repeated" json:"F_Int32_repeated,omitempty"` + F_Int64Repeated []int64 `protobuf:"varint,22,rep,name=F_Int64_repeated,json=fInt64Repeated" json:"F_Int64_repeated,omitempty"` + F_Fixed32Repeated []uint32 `protobuf:"fixed32,23,rep,name=F_Fixed32_repeated,json=fFixed32Repeated" json:"F_Fixed32_repeated,omitempty"` + F_Fixed64Repeated []uint64 `protobuf:"fixed64,24,rep,name=F_Fixed64_repeated,json=fFixed64Repeated" json:"F_Fixed64_repeated,omitempty"` + F_Uint32Repeated []uint32 `protobuf:"varint,25,rep,name=F_Uint32_repeated,json=fUint32Repeated" json:"F_Uint32_repeated,omitempty"` + F_Uint64Repeated []uint64 `protobuf:"varint,26,rep,name=F_Uint64_repeated,json=fUint64Repeated" json:"F_Uint64_repeated,omitempty"` + F_FloatRepeated []float32 `protobuf:"fixed32,27,rep,name=F_Float_repeated,json=fFloatRepeated" json:"F_Float_repeated,omitempty"` + F_DoubleRepeated []float64 `protobuf:"fixed64,28,rep,name=F_Double_repeated,json=fDoubleRepeated" json:"F_Double_repeated,omitempty"` + F_StringRepeated []string `protobuf:"bytes,29,rep,name=F_String_repeated,json=fStringRepeated" json:"F_String_repeated,omitempty"` + F_BytesRepeated [][]byte `protobuf:"bytes,201,rep,name=F_Bytes_repeated,json=fBytesRepeated" json:"F_Bytes_repeated,omitempty"` + F_Sint32Repeated []int32 `protobuf:"zigzag32,202,rep,name=F_Sint32_repeated,json=fSint32Repeated" json:"F_Sint32_repeated,omitempty"` + F_Sint64Repeated []int64 `protobuf:"zigzag64,203,rep,name=F_Sint64_repeated,json=fSint64Repeated" json:"F_Sint64_repeated,omitempty"` + // Optional fields of all basic types + F_BoolOptional *bool `protobuf:"varint,30,opt,name=F_Bool_optional,json=fBoolOptional" json:"F_Bool_optional,omitempty"` + F_Int32Optional *int32 `protobuf:"varint,31,opt,name=F_Int32_optional,json=fInt32Optional" json:"F_Int32_optional,omitempty"` + F_Int64Optional *int64 `protobuf:"varint,32,opt,name=F_Int64_optional,json=fInt64Optional" json:"F_Int64_optional,omitempty"` + F_Fixed32Optional *uint32 `protobuf:"fixed32,33,opt,name=F_Fixed32_optional,json=fFixed32Optional" json:"F_Fixed32_optional,omitempty"` + F_Fixed64Optional *uint64 `protobuf:"fixed64,34,opt,name=F_Fixed64_optional,json=fFixed64Optional" json:"F_Fixed64_optional,omitempty"` + F_Uint32Optional *uint32 `protobuf:"varint,35,opt,name=F_Uint32_optional,json=fUint32Optional" json:"F_Uint32_optional,omitempty"` + F_Uint64Optional *uint64 `protobuf:"varint,36,opt,name=F_Uint64_optional,json=fUint64Optional" json:"F_Uint64_optional,omitempty"` + F_FloatOptional *float32 `protobuf:"fixed32,37,opt,name=F_Float_optional,json=fFloatOptional" json:"F_Float_optional,omitempty"` + F_DoubleOptional *float64 `protobuf:"fixed64,38,opt,name=F_Double_optional,json=fDoubleOptional" json:"F_Double_optional,omitempty"` + F_StringOptional *string `protobuf:"bytes,39,opt,name=F_String_optional,json=fStringOptional" json:"F_String_optional,omitempty"` + F_BytesOptional []byte `protobuf:"bytes,301,opt,name=F_Bytes_optional,json=fBytesOptional" json:"F_Bytes_optional,omitempty"` + F_Sint32Optional *int32 `protobuf:"zigzag32,302,opt,name=F_Sint32_optional,json=fSint32Optional" json:"F_Sint32_optional,omitempty"` + F_Sint64Optional *int64 `protobuf:"zigzag64,303,opt,name=F_Sint64_optional,json=fSint64Optional" json:"F_Sint64_optional,omitempty"` + // Default-valued fields of all basic types + F_BoolDefaulted *bool `protobuf:"varint,40,opt,name=F_Bool_defaulted,json=fBoolDefaulted,def=1" json:"F_Bool_defaulted,omitempty"` + F_Int32Defaulted *int32 `protobuf:"varint,41,opt,name=F_Int32_defaulted,json=fInt32Defaulted,def=32" json:"F_Int32_defaulted,omitempty"` + F_Int64Defaulted *int64 `protobuf:"varint,42,opt,name=F_Int64_defaulted,json=fInt64Defaulted,def=64" json:"F_Int64_defaulted,omitempty"` + F_Fixed32Defaulted *uint32 `protobuf:"fixed32,43,opt,name=F_Fixed32_defaulted,json=fFixed32Defaulted,def=320" json:"F_Fixed32_defaulted,omitempty"` + F_Fixed64Defaulted *uint64 `protobuf:"fixed64,44,opt,name=F_Fixed64_defaulted,json=fFixed64Defaulted,def=640" json:"F_Fixed64_defaulted,omitempty"` + F_Uint32Defaulted *uint32 `protobuf:"varint,45,opt,name=F_Uint32_defaulted,json=fUint32Defaulted,def=3200" json:"F_Uint32_defaulted,omitempty"` + F_Uint64Defaulted *uint64 `protobuf:"varint,46,opt,name=F_Uint64_defaulted,json=fUint64Defaulted,def=6400" json:"F_Uint64_defaulted,omitempty"` + F_FloatDefaulted *float32 `protobuf:"fixed32,47,opt,name=F_Float_defaulted,json=fFloatDefaulted,def=314159" json:"F_Float_defaulted,omitempty"` + F_DoubleDefaulted *float64 `protobuf:"fixed64,48,opt,name=F_Double_defaulted,json=fDoubleDefaulted,def=271828" json:"F_Double_defaulted,omitempty"` + F_StringDefaulted *string `protobuf:"bytes,49,opt,name=F_String_defaulted,json=fStringDefaulted,def=hello, \"world!\"\n" json:"F_String_defaulted,omitempty"` + F_BytesDefaulted []byte `protobuf:"bytes,401,opt,name=F_Bytes_defaulted,json=fBytesDefaulted,def=Bignose" json:"F_Bytes_defaulted,omitempty"` + F_Sint32Defaulted *int32 `protobuf:"zigzag32,402,opt,name=F_Sint32_defaulted,json=fSint32Defaulted,def=-32" json:"F_Sint32_defaulted,omitempty"` + F_Sint64Defaulted *int64 `protobuf:"zigzag64,403,opt,name=F_Sint64_defaulted,json=fSint64Defaulted,def=-64" json:"F_Sint64_defaulted,omitempty"` + // Packed repeated fields (no string or bytes). + F_BoolRepeatedPacked []bool `protobuf:"varint,50,rep,packed,name=F_Bool_repeated_packed,json=fBoolRepeatedPacked" json:"F_Bool_repeated_packed,omitempty"` + F_Int32RepeatedPacked []int32 `protobuf:"varint,51,rep,packed,name=F_Int32_repeated_packed,json=fInt32RepeatedPacked" json:"F_Int32_repeated_packed,omitempty"` + F_Int64RepeatedPacked []int64 `protobuf:"varint,52,rep,packed,name=F_Int64_repeated_packed,json=fInt64RepeatedPacked" json:"F_Int64_repeated_packed,omitempty"` + F_Fixed32RepeatedPacked []uint32 `protobuf:"fixed32,53,rep,packed,name=F_Fixed32_repeated_packed,json=fFixed32RepeatedPacked" json:"F_Fixed32_repeated_packed,omitempty"` + F_Fixed64RepeatedPacked []uint64 `protobuf:"fixed64,54,rep,packed,name=F_Fixed64_repeated_packed,json=fFixed64RepeatedPacked" json:"F_Fixed64_repeated_packed,omitempty"` + F_Uint32RepeatedPacked []uint32 `protobuf:"varint,55,rep,packed,name=F_Uint32_repeated_packed,json=fUint32RepeatedPacked" json:"F_Uint32_repeated_packed,omitempty"` + F_Uint64RepeatedPacked []uint64 `protobuf:"varint,56,rep,packed,name=F_Uint64_repeated_packed,json=fUint64RepeatedPacked" json:"F_Uint64_repeated_packed,omitempty"` + F_FloatRepeatedPacked []float32 `protobuf:"fixed32,57,rep,packed,name=F_Float_repeated_packed,json=fFloatRepeatedPacked" json:"F_Float_repeated_packed,omitempty"` + F_DoubleRepeatedPacked []float64 `protobuf:"fixed64,58,rep,packed,name=F_Double_repeated_packed,json=fDoubleRepeatedPacked" json:"F_Double_repeated_packed,omitempty"` + F_Sint32RepeatedPacked []int32 `protobuf:"zigzag32,502,rep,packed,name=F_Sint32_repeated_packed,json=fSint32RepeatedPacked" json:"F_Sint32_repeated_packed,omitempty"` + F_Sint64RepeatedPacked []int64 `protobuf:"zigzag64,503,rep,packed,name=F_Sint64_repeated_packed,json=fSint64RepeatedPacked" json:"F_Sint64_repeated_packed,omitempty"` + Requiredgroup *GoTest_RequiredGroup `protobuf:"group,70,req,name=RequiredGroup,json=requiredgroup" json:"requiredgroup,omitempty"` + Repeatedgroup []*GoTest_RepeatedGroup `protobuf:"group,80,rep,name=RepeatedGroup,json=repeatedgroup" json:"repeatedgroup,omitempty"` + Optionalgroup *GoTest_OptionalGroup `protobuf:"group,90,opt,name=OptionalGroup,json=optionalgroup" json:"optionalgroup,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *GoTest) Reset() { *m = GoTest{} } +func (m *GoTest) String() string { return proto.CompactTextString(m) } +func (*GoTest) ProtoMessage() {} +func (*GoTest) Descriptor() ([]byte, []int) { return fileDescriptorTest, []int{2} } + +const Default_GoTest_F_BoolDefaulted bool = true +const Default_GoTest_F_Int32Defaulted int32 = 32 +const Default_GoTest_F_Int64Defaulted int64 = 64 +const Default_GoTest_F_Fixed32Defaulted uint32 = 320 +const Default_GoTest_F_Fixed64Defaulted uint64 = 640 +const Default_GoTest_F_Uint32Defaulted uint32 = 3200 +const Default_GoTest_F_Uint64Defaulted uint64 = 6400 +const Default_GoTest_F_FloatDefaulted float32 = 314159 +const Default_GoTest_F_DoubleDefaulted float64 = 271828 +const Default_GoTest_F_StringDefaulted string = "hello, \"world!\"\n" + +var Default_GoTest_F_BytesDefaulted []byte = []byte("Bignose") + +const Default_GoTest_F_Sint32Defaulted int32 = -32 +const Default_GoTest_F_Sint64Defaulted int64 = -64 + +func (m *GoTest) GetKind() GoTest_KIND { + if m != nil && m.Kind != nil { + return *m.Kind + } + return GoTest_VOID +} + +func (m *GoTest) GetTable() string { + if m != nil && m.Table != nil { + return *m.Table + } + return "" +} + +func (m *GoTest) GetParam() int32 { + if m != nil && m.Param != nil { + return *m.Param + } + return 0 +} + +func (m *GoTest) GetRequiredField() *GoTestField { + if m != nil { + return m.RequiredField + } + return nil +} + +func (m *GoTest) GetRepeatedField() []*GoTestField { + if m != nil { + return m.RepeatedField + } + return nil +} + +func (m *GoTest) GetOptionalField() *GoTestField { + if m != nil { + return m.OptionalField + } + return nil +} + +func (m *GoTest) GetF_BoolRequired() bool { + if m != nil && m.F_BoolRequired != nil { + return *m.F_BoolRequired + } + return false +} + +func (m *GoTest) GetF_Int32Required() int32 { + if m != nil && m.F_Int32Required != nil { + return *m.F_Int32Required + } + return 0 +} + +func (m *GoTest) GetF_Int64Required() int64 { + if m != nil && m.F_Int64Required != nil { + return *m.F_Int64Required + } + return 0 +} + +func (m *GoTest) GetF_Fixed32Required() uint32 { + if m != nil && m.F_Fixed32Required != nil { + return *m.F_Fixed32Required + } + return 0 +} + +func (m *GoTest) GetF_Fixed64Required() uint64 { + if m != nil && m.F_Fixed64Required != nil { + return *m.F_Fixed64Required + } + return 0 +} + +func (m *GoTest) GetF_Uint32Required() uint32 { + if m != nil && m.F_Uint32Required != nil { + return *m.F_Uint32Required + } + return 0 +} + +func (m *GoTest) GetF_Uint64Required() uint64 { + if m != nil && m.F_Uint64Required != nil { + return *m.F_Uint64Required + } + return 0 +} + +func (m *GoTest) GetF_FloatRequired() float32 { + if m != nil && m.F_FloatRequired != nil { + return *m.F_FloatRequired + } + return 0 +} + +func (m *GoTest) GetF_DoubleRequired() float64 { + if m != nil && m.F_DoubleRequired != nil { + return *m.F_DoubleRequired + } + return 0 +} + +func (m *GoTest) GetF_StringRequired() string { + if m != nil && m.F_StringRequired != nil { + return *m.F_StringRequired + } + return "" +} + +func (m *GoTest) GetF_BytesRequired() []byte { + if m != nil { + return m.F_BytesRequired + } + return nil +} + +func (m *GoTest) GetF_Sint32Required() int32 { + if m != nil && m.F_Sint32Required != nil { + return *m.F_Sint32Required + } + return 0 +} + +func (m *GoTest) GetF_Sint64Required() int64 { + if m != nil && m.F_Sint64Required != nil { + return *m.F_Sint64Required + } + return 0 +} + +func (m *GoTest) GetF_BoolRepeated() []bool { + if m != nil { + return m.F_BoolRepeated + } + return nil +} + +func (m *GoTest) GetF_Int32Repeated() []int32 { + if m != nil { + return m.F_Int32Repeated + } + return nil +} + +func (m *GoTest) GetF_Int64Repeated() []int64 { + if m != nil { + return m.F_Int64Repeated + } + return nil +} + +func (m *GoTest) GetF_Fixed32Repeated() []uint32 { + if m != nil { + return m.F_Fixed32Repeated + } + return nil +} + +func (m *GoTest) GetF_Fixed64Repeated() []uint64 { + if m != nil { + return m.F_Fixed64Repeated + } + return nil +} + +func (m *GoTest) GetF_Uint32Repeated() []uint32 { + if m != nil { + return m.F_Uint32Repeated + } + return nil +} + +func (m *GoTest) GetF_Uint64Repeated() []uint64 { + if m != nil { + return m.F_Uint64Repeated + } + return nil +} + +func (m *GoTest) GetF_FloatRepeated() []float32 { + if m != nil { + return m.F_FloatRepeated + } + return nil +} + +func (m *GoTest) GetF_DoubleRepeated() []float64 { + if m != nil { + return m.F_DoubleRepeated + } + return nil +} + +func (m *GoTest) GetF_StringRepeated() []string { + if m != nil { + return m.F_StringRepeated + } + return nil +} + +func (m *GoTest) GetF_BytesRepeated() [][]byte { + if m != nil { + return m.F_BytesRepeated + } + return nil +} + +func (m *GoTest) GetF_Sint32Repeated() []int32 { + if m != nil { + return m.F_Sint32Repeated + } + return nil +} + +func (m *GoTest) GetF_Sint64Repeated() []int64 { + if m != nil { + return m.F_Sint64Repeated + } + return nil +} + +func (m *GoTest) GetF_BoolOptional() bool { + if m != nil && m.F_BoolOptional != nil { + return *m.F_BoolOptional + } + return false +} + +func (m *GoTest) GetF_Int32Optional() int32 { + if m != nil && m.F_Int32Optional != nil { + return *m.F_Int32Optional + } + return 0 +} + +func (m *GoTest) GetF_Int64Optional() int64 { + if m != nil && m.F_Int64Optional != nil { + return *m.F_Int64Optional + } + return 0 +} + +func (m *GoTest) GetF_Fixed32Optional() uint32 { + if m != nil && m.F_Fixed32Optional != nil { + return *m.F_Fixed32Optional + } + return 0 +} + +func (m *GoTest) GetF_Fixed64Optional() uint64 { + if m != nil && m.F_Fixed64Optional != nil { + return *m.F_Fixed64Optional + } + return 0 +} + +func (m *GoTest) GetF_Uint32Optional() uint32 { + if m != nil && m.F_Uint32Optional != nil { + return *m.F_Uint32Optional + } + return 0 +} + +func (m *GoTest) GetF_Uint64Optional() uint64 { + if m != nil && m.F_Uint64Optional != nil { + return *m.F_Uint64Optional + } + return 0 +} + +func (m *GoTest) GetF_FloatOptional() float32 { + if m != nil && m.F_FloatOptional != nil { + return *m.F_FloatOptional + } + return 0 +} + +func (m *GoTest) GetF_DoubleOptional() float64 { + if m != nil && m.F_DoubleOptional != nil { + return *m.F_DoubleOptional + } + return 0 +} + +func (m *GoTest) GetF_StringOptional() string { + if m != nil && m.F_StringOptional != nil { + return *m.F_StringOptional + } + return "" +} + +func (m *GoTest) GetF_BytesOptional() []byte { + if m != nil { + return m.F_BytesOptional + } + return nil +} + +func (m *GoTest) GetF_Sint32Optional() int32 { + if m != nil && m.F_Sint32Optional != nil { + return *m.F_Sint32Optional + } + return 0 +} + +func (m *GoTest) GetF_Sint64Optional() int64 { + if m != nil && m.F_Sint64Optional != nil { + return *m.F_Sint64Optional + } + return 0 +} + +func (m *GoTest) GetF_BoolDefaulted() bool { + if m != nil && m.F_BoolDefaulted != nil { + return *m.F_BoolDefaulted + } + return Default_GoTest_F_BoolDefaulted +} + +func (m *GoTest) GetF_Int32Defaulted() int32 { + if m != nil && m.F_Int32Defaulted != nil { + return *m.F_Int32Defaulted + } + return Default_GoTest_F_Int32Defaulted +} + +func (m *GoTest) GetF_Int64Defaulted() int64 { + if m != nil && m.F_Int64Defaulted != nil { + return *m.F_Int64Defaulted + } + return Default_GoTest_F_Int64Defaulted +} + +func (m *GoTest) GetF_Fixed32Defaulted() uint32 { + if m != nil && m.F_Fixed32Defaulted != nil { + return *m.F_Fixed32Defaulted + } + return Default_GoTest_F_Fixed32Defaulted +} + +func (m *GoTest) GetF_Fixed64Defaulted() uint64 { + if m != nil && m.F_Fixed64Defaulted != nil { + return *m.F_Fixed64Defaulted + } + return Default_GoTest_F_Fixed64Defaulted +} + +func (m *GoTest) GetF_Uint32Defaulted() uint32 { + if m != nil && m.F_Uint32Defaulted != nil { + return *m.F_Uint32Defaulted + } + return Default_GoTest_F_Uint32Defaulted +} + +func (m *GoTest) GetF_Uint64Defaulted() uint64 { + if m != nil && m.F_Uint64Defaulted != nil { + return *m.F_Uint64Defaulted + } + return Default_GoTest_F_Uint64Defaulted +} + +func (m *GoTest) GetF_FloatDefaulted() float32 { + if m != nil && m.F_FloatDefaulted != nil { + return *m.F_FloatDefaulted + } + return Default_GoTest_F_FloatDefaulted +} + +func (m *GoTest) GetF_DoubleDefaulted() float64 { + if m != nil && m.F_DoubleDefaulted != nil { + return *m.F_DoubleDefaulted + } + return Default_GoTest_F_DoubleDefaulted +} + +func (m *GoTest) GetF_StringDefaulted() string { + if m != nil && m.F_StringDefaulted != nil { + return *m.F_StringDefaulted + } + return Default_GoTest_F_StringDefaulted +} + +func (m *GoTest) GetF_BytesDefaulted() []byte { + if m != nil && m.F_BytesDefaulted != nil { + return m.F_BytesDefaulted + } + return append([]byte(nil), Default_GoTest_F_BytesDefaulted...) +} + +func (m *GoTest) GetF_Sint32Defaulted() int32 { + if m != nil && m.F_Sint32Defaulted != nil { + return *m.F_Sint32Defaulted + } + return Default_GoTest_F_Sint32Defaulted +} + +func (m *GoTest) GetF_Sint64Defaulted() int64 { + if m != nil && m.F_Sint64Defaulted != nil { + return *m.F_Sint64Defaulted + } + return Default_GoTest_F_Sint64Defaulted +} + +func (m *GoTest) GetF_BoolRepeatedPacked() []bool { + if m != nil { + return m.F_BoolRepeatedPacked + } + return nil +} + +func (m *GoTest) GetF_Int32RepeatedPacked() []int32 { + if m != nil { + return m.F_Int32RepeatedPacked + } + return nil +} + +func (m *GoTest) GetF_Int64RepeatedPacked() []int64 { + if m != nil { + return m.F_Int64RepeatedPacked + } + return nil +} + +func (m *GoTest) GetF_Fixed32RepeatedPacked() []uint32 { + if m != nil { + return m.F_Fixed32RepeatedPacked + } + return nil +} + +func (m *GoTest) GetF_Fixed64RepeatedPacked() []uint64 { + if m != nil { + return m.F_Fixed64RepeatedPacked + } + return nil +} + +func (m *GoTest) GetF_Uint32RepeatedPacked() []uint32 { + if m != nil { + return m.F_Uint32RepeatedPacked + } + return nil +} + +func (m *GoTest) GetF_Uint64RepeatedPacked() []uint64 { + if m != nil { + return m.F_Uint64RepeatedPacked + } + return nil +} + +func (m *GoTest) GetF_FloatRepeatedPacked() []float32 { + if m != nil { + return m.F_FloatRepeatedPacked + } + return nil +} + +func (m *GoTest) GetF_DoubleRepeatedPacked() []float64 { + if m != nil { + return m.F_DoubleRepeatedPacked + } + return nil +} + +func (m *GoTest) GetF_Sint32RepeatedPacked() []int32 { + if m != nil { + return m.F_Sint32RepeatedPacked + } + return nil +} + +func (m *GoTest) GetF_Sint64RepeatedPacked() []int64 { + if m != nil { + return m.F_Sint64RepeatedPacked + } + return nil +} + +func (m *GoTest) GetRequiredgroup() *GoTest_RequiredGroup { + if m != nil { + return m.Requiredgroup + } + return nil +} + +func (m *GoTest) GetRepeatedgroup() []*GoTest_RepeatedGroup { + if m != nil { + return m.Repeatedgroup + } + return nil +} + +func (m *GoTest) GetOptionalgroup() *GoTest_OptionalGroup { + if m != nil { + return m.Optionalgroup + } + return nil +} + +// Required, repeated, and optional groups. +type GoTest_RequiredGroup struct { + RequiredField *string `protobuf:"bytes,71,req,name=RequiredField,json=requiredField" json:"RequiredField,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *GoTest_RequiredGroup) Reset() { *m = GoTest_RequiredGroup{} } +func (m *GoTest_RequiredGroup) String() string { return proto.CompactTextString(m) } +func (*GoTest_RequiredGroup) ProtoMessage() {} + +func (m *GoTest_RequiredGroup) GetRequiredField() string { + if m != nil && m.RequiredField != nil { + return *m.RequiredField + } + return "" +} + +type GoTest_RepeatedGroup struct { + RequiredField *string `protobuf:"bytes,81,req,name=RequiredField,json=requiredField" json:"RequiredField,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *GoTest_RepeatedGroup) Reset() { *m = GoTest_RepeatedGroup{} } +func (m *GoTest_RepeatedGroup) String() string { return proto.CompactTextString(m) } +func (*GoTest_RepeatedGroup) ProtoMessage() {} + +func (m *GoTest_RepeatedGroup) GetRequiredField() string { + if m != nil && m.RequiredField != nil { + return *m.RequiredField + } + return "" +} + +type GoTest_OptionalGroup struct { + RequiredField *string `protobuf:"bytes,91,req,name=RequiredField,json=requiredField" json:"RequiredField,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *GoTest_OptionalGroup) Reset() { *m = GoTest_OptionalGroup{} } +func (m *GoTest_OptionalGroup) String() string { return proto.CompactTextString(m) } +func (*GoTest_OptionalGroup) ProtoMessage() {} + +func (m *GoTest_OptionalGroup) GetRequiredField() string { + if m != nil && m.RequiredField != nil { + return *m.RequiredField + } + return "" +} + +// For testing skipping of unrecognized fields. +// Numbers are all big, larger than tag numbers in GoTestField, +// the message used in the corresponding test. +type GoSkipTest struct { + SkipInt32 *int32 `protobuf:"varint,11,req,name=skip_int32,json=skipInt32" json:"skip_int32,omitempty"` + SkipFixed32 *uint32 `protobuf:"fixed32,12,req,name=skip_fixed32,json=skipFixed32" json:"skip_fixed32,omitempty"` + SkipFixed64 *uint64 `protobuf:"fixed64,13,req,name=skip_fixed64,json=skipFixed64" json:"skip_fixed64,omitempty"` + SkipString *string `protobuf:"bytes,14,req,name=skip_string,json=skipString" json:"skip_string,omitempty"` + Skipgroup *GoSkipTest_SkipGroup `protobuf:"group,15,req,name=SkipGroup,json=skipgroup" json:"skipgroup,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *GoSkipTest) Reset() { *m = GoSkipTest{} } +func (m *GoSkipTest) String() string { return proto.CompactTextString(m) } +func (*GoSkipTest) ProtoMessage() {} +func (*GoSkipTest) Descriptor() ([]byte, []int) { return fileDescriptorTest, []int{3} } + +func (m *GoSkipTest) GetSkipInt32() int32 { + if m != nil && m.SkipInt32 != nil { + return *m.SkipInt32 + } + return 0 +} + +func (m *GoSkipTest) GetSkipFixed32() uint32 { + if m != nil && m.SkipFixed32 != nil { + return *m.SkipFixed32 + } + return 0 +} + +func (m *GoSkipTest) GetSkipFixed64() uint64 { + if m != nil && m.SkipFixed64 != nil { + return *m.SkipFixed64 + } + return 0 +} + +func (m *GoSkipTest) GetSkipString() string { + if m != nil && m.SkipString != nil { + return *m.SkipString + } + return "" +} + +func (m *GoSkipTest) GetSkipgroup() *GoSkipTest_SkipGroup { + if m != nil { + return m.Skipgroup + } + return nil +} + +type GoSkipTest_SkipGroup struct { + GroupInt32 *int32 `protobuf:"varint,16,req,name=group_int32,json=groupInt32" json:"group_int32,omitempty"` + GroupString *string `protobuf:"bytes,17,req,name=group_string,json=groupString" json:"group_string,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *GoSkipTest_SkipGroup) Reset() { *m = GoSkipTest_SkipGroup{} } +func (m *GoSkipTest_SkipGroup) String() string { return proto.CompactTextString(m) } +func (*GoSkipTest_SkipGroup) ProtoMessage() {} + +func (m *GoSkipTest_SkipGroup) GetGroupInt32() int32 { + if m != nil && m.GroupInt32 != nil { + return *m.GroupInt32 + } + return 0 +} + +func (m *GoSkipTest_SkipGroup) GetGroupString() string { + if m != nil && m.GroupString != nil { + return *m.GroupString + } + return "" +} + +// For testing packed/non-packed decoder switching. +// A serialized instance of one should be deserializable as the other. +type NonPackedTest struct { + A []int32 `protobuf:"varint,1,rep,name=a" json:"a,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *NonPackedTest) Reset() { *m = NonPackedTest{} } +func (m *NonPackedTest) String() string { return proto.CompactTextString(m) } +func (*NonPackedTest) ProtoMessage() {} +func (*NonPackedTest) Descriptor() ([]byte, []int) { return fileDescriptorTest, []int{4} } + +func (m *NonPackedTest) GetA() []int32 { + if m != nil { + return m.A + } + return nil +} + +type PackedTest struct { + B []int32 `protobuf:"varint,1,rep,packed,name=b" json:"b,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *PackedTest) Reset() { *m = PackedTest{} } +func (m *PackedTest) String() string { return proto.CompactTextString(m) } +func (*PackedTest) ProtoMessage() {} +func (*PackedTest) Descriptor() ([]byte, []int) { return fileDescriptorTest, []int{5} } + +func (m *PackedTest) GetB() []int32 { + if m != nil { + return m.B + } + return nil +} + +type MaxTag struct { + // Maximum possible tag number. + LastField *string `protobuf:"bytes,536870911,opt,name=last_field,json=lastField" json:"last_field,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *MaxTag) Reset() { *m = MaxTag{} } +func (m *MaxTag) String() string { return proto.CompactTextString(m) } +func (*MaxTag) ProtoMessage() {} +func (*MaxTag) Descriptor() ([]byte, []int) { return fileDescriptorTest, []int{6} } + +func (m *MaxTag) GetLastField() string { + if m != nil && m.LastField != nil { + return *m.LastField + } + return "" +} + +type OldMessage struct { + Nested *OldMessage_Nested `protobuf:"bytes,1,opt,name=nested" json:"nested,omitempty"` + Num *int32 `protobuf:"varint,2,opt,name=num" json:"num,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *OldMessage) Reset() { *m = OldMessage{} } +func (m *OldMessage) String() string { return proto.CompactTextString(m) } +func (*OldMessage) ProtoMessage() {} +func (*OldMessage) Descriptor() ([]byte, []int) { return fileDescriptorTest, []int{7} } + +func (m *OldMessage) GetNested() *OldMessage_Nested { + if m != nil { + return m.Nested + } + return nil +} + +func (m *OldMessage) GetNum() int32 { + if m != nil && m.Num != nil { + return *m.Num + } + return 0 +} + +type OldMessage_Nested struct { + Name *string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *OldMessage_Nested) Reset() { *m = OldMessage_Nested{} } +func (m *OldMessage_Nested) String() string { return proto.CompactTextString(m) } +func (*OldMessage_Nested) ProtoMessage() {} +func (*OldMessage_Nested) Descriptor() ([]byte, []int) { return fileDescriptorTest, []int{7, 0} } + +func (m *OldMessage_Nested) GetName() string { + if m != nil && m.Name != nil { + return *m.Name + } + return "" +} + +// NewMessage is wire compatible with OldMessage; +// imagine it as a future version. +type NewMessage struct { + Nested *NewMessage_Nested `protobuf:"bytes,1,opt,name=nested" json:"nested,omitempty"` + // This is an int32 in OldMessage. + Num *int64 `protobuf:"varint,2,opt,name=num" json:"num,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *NewMessage) Reset() { *m = NewMessage{} } +func (m *NewMessage) String() string { return proto.CompactTextString(m) } +func (*NewMessage) ProtoMessage() {} +func (*NewMessage) Descriptor() ([]byte, []int) { return fileDescriptorTest, []int{8} } + +func (m *NewMessage) GetNested() *NewMessage_Nested { + if m != nil { + return m.Nested + } + return nil +} + +func (m *NewMessage) GetNum() int64 { + if m != nil && m.Num != nil { + return *m.Num + } + return 0 +} + +type NewMessage_Nested struct { + Name *string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"` + FoodGroup *string `protobuf:"bytes,2,opt,name=food_group,json=foodGroup" json:"food_group,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *NewMessage_Nested) Reset() { *m = NewMessage_Nested{} } +func (m *NewMessage_Nested) String() string { return proto.CompactTextString(m) } +func (*NewMessage_Nested) ProtoMessage() {} +func (*NewMessage_Nested) Descriptor() ([]byte, []int) { return fileDescriptorTest, []int{8, 0} } + +func (m *NewMessage_Nested) GetName() string { + if m != nil && m.Name != nil { + return *m.Name + } + return "" +} + +func (m *NewMessage_Nested) GetFoodGroup() string { + if m != nil && m.FoodGroup != nil { + return *m.FoodGroup + } + return "" +} + +type InnerMessage struct { + Host *string `protobuf:"bytes,1,req,name=host" json:"host,omitempty"` + Port *int32 `protobuf:"varint,2,opt,name=port,def=4000" json:"port,omitempty"` + Connected *bool `protobuf:"varint,3,opt,name=connected" json:"connected,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *InnerMessage) Reset() { *m = InnerMessage{} } +func (m *InnerMessage) String() string { return proto.CompactTextString(m) } +func (*InnerMessage) ProtoMessage() {} +func (*InnerMessage) Descriptor() ([]byte, []int) { return fileDescriptorTest, []int{9} } + +const Default_InnerMessage_Port int32 = 4000 + +func (m *InnerMessage) GetHost() string { + if m != nil && m.Host != nil { + return *m.Host + } + return "" +} + +func (m *InnerMessage) GetPort() int32 { + if m != nil && m.Port != nil { + return *m.Port + } + return Default_InnerMessage_Port +} + +func (m *InnerMessage) GetConnected() bool { + if m != nil && m.Connected != nil { + return *m.Connected + } + return false +} + +type OtherMessage struct { + Key *int64 `protobuf:"varint,1,opt,name=key" json:"key,omitempty"` + Value []byte `protobuf:"bytes,2,opt,name=value" json:"value,omitempty"` + Weight *float32 `protobuf:"fixed32,3,opt,name=weight" json:"weight,omitempty"` + Inner *InnerMessage `protobuf:"bytes,4,opt,name=inner" json:"inner,omitempty"` + XXX_extensions map[int32]proto.Extension `json:"-"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *OtherMessage) Reset() { *m = OtherMessage{} } +func (m *OtherMessage) String() string { return proto.CompactTextString(m) } +func (*OtherMessage) ProtoMessage() {} +func (*OtherMessage) Descriptor() ([]byte, []int) { return fileDescriptorTest, []int{10} } + +var extRange_OtherMessage = []proto.ExtensionRange{ + {100, 536870911}, +} + +func (*OtherMessage) ExtensionRangeArray() []proto.ExtensionRange { + return extRange_OtherMessage +} +func (m *OtherMessage) ExtensionMap() map[int32]proto.Extension { + if m.XXX_extensions == nil { + m.XXX_extensions = make(map[int32]proto.Extension) + } + return m.XXX_extensions +} + +func (m *OtherMessage) GetKey() int64 { + if m != nil && m.Key != nil { + return *m.Key + } + return 0 +} + +func (m *OtherMessage) GetValue() []byte { + if m != nil { + return m.Value + } + return nil +} + +func (m *OtherMessage) GetWeight() float32 { + if m != nil && m.Weight != nil { + return *m.Weight + } + return 0 +} + +func (m *OtherMessage) GetInner() *InnerMessage { + if m != nil { + return m.Inner + } + return nil +} + +type MyMessage struct { + Count *int32 `protobuf:"varint,1,req,name=count" json:"count,omitempty"` + Name *string `protobuf:"bytes,2,opt,name=name" json:"name,omitempty"` + Quote *string `protobuf:"bytes,3,opt,name=quote" json:"quote,omitempty"` + Pet []string `protobuf:"bytes,4,rep,name=pet" json:"pet,omitempty"` + Inner *InnerMessage `protobuf:"bytes,5,opt,name=inner" json:"inner,omitempty"` + Others []*OtherMessage `protobuf:"bytes,6,rep,name=others" json:"others,omitempty"` + RepInner []*InnerMessage `protobuf:"bytes,12,rep,name=rep_inner,json=repInner" json:"rep_inner,omitempty"` + Bikeshed *MyMessage_Color `protobuf:"varint,7,opt,name=bikeshed,enum=testdata.MyMessage_Color" json:"bikeshed,omitempty"` + Somegroup *MyMessage_SomeGroup `protobuf:"group,8,opt,name=SomeGroup,json=somegroup" json:"somegroup,omitempty"` + // This field becomes [][]byte in the generated code. + RepBytes [][]byte `protobuf:"bytes,10,rep,name=rep_bytes,json=repBytes" json:"rep_bytes,omitempty"` + Bigfloat *float64 `protobuf:"fixed64,11,opt,name=bigfloat" json:"bigfloat,omitempty"` + XXX_extensions map[int32]proto.Extension `json:"-"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *MyMessage) Reset() { *m = MyMessage{} } +func (m *MyMessage) String() string { return proto.CompactTextString(m) } +func (*MyMessage) ProtoMessage() {} +func (*MyMessage) Descriptor() ([]byte, []int) { return fileDescriptorTest, []int{11} } + +var extRange_MyMessage = []proto.ExtensionRange{ + {100, 536870911}, +} + +func (*MyMessage) ExtensionRangeArray() []proto.ExtensionRange { + return extRange_MyMessage +} +func (m *MyMessage) ExtensionMap() map[int32]proto.Extension { + if m.XXX_extensions == nil { + m.XXX_extensions = make(map[int32]proto.Extension) + } + return m.XXX_extensions +} + +func (m *MyMessage) GetCount() int32 { + if m != nil && m.Count != nil { + return *m.Count + } + return 0 +} + +func (m *MyMessage) GetName() string { + if m != nil && m.Name != nil { + return *m.Name + } + return "" +} + +func (m *MyMessage) GetQuote() string { + if m != nil && m.Quote != nil { + return *m.Quote + } + return "" +} + +func (m *MyMessage) GetPet() []string { + if m != nil { + return m.Pet + } + return nil +} + +func (m *MyMessage) GetInner() *InnerMessage { + if m != nil { + return m.Inner + } + return nil +} + +func (m *MyMessage) GetOthers() []*OtherMessage { + if m != nil { + return m.Others + } + return nil +} + +func (m *MyMessage) GetRepInner() []*InnerMessage { + if m != nil { + return m.RepInner + } + return nil +} + +func (m *MyMessage) GetBikeshed() MyMessage_Color { + if m != nil && m.Bikeshed != nil { + return *m.Bikeshed + } + return MyMessage_RED +} + +func (m *MyMessage) GetSomegroup() *MyMessage_SomeGroup { + if m != nil { + return m.Somegroup + } + return nil +} + +func (m *MyMessage) GetRepBytes() [][]byte { + if m != nil { + return m.RepBytes + } + return nil +} + +func (m *MyMessage) GetBigfloat() float64 { + if m != nil && m.Bigfloat != nil { + return *m.Bigfloat + } + return 0 +} + +type MyMessage_SomeGroup struct { + GroupField *int32 `protobuf:"varint,9,opt,name=group_field,json=groupField" json:"group_field,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *MyMessage_SomeGroup) Reset() { *m = MyMessage_SomeGroup{} } +func (m *MyMessage_SomeGroup) String() string { return proto.CompactTextString(m) } +func (*MyMessage_SomeGroup) ProtoMessage() {} + +func (m *MyMessage_SomeGroup) GetGroupField() int32 { + if m != nil && m.GroupField != nil { + return *m.GroupField + } + return 0 +} + +type Ext struct { + Data *string `protobuf:"bytes,1,opt,name=data" json:"data,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *Ext) Reset() { *m = Ext{} } +func (m *Ext) String() string { return proto.CompactTextString(m) } +func (*Ext) ProtoMessage() {} +func (*Ext) Descriptor() ([]byte, []int) { return fileDescriptorTest, []int{12} } + +func (m *Ext) GetData() string { + if m != nil && m.Data != nil { + return *m.Data + } + return "" +} + +var E_Ext_More = &proto.ExtensionDesc{ + ExtendedType: (*MyMessage)(nil), + ExtensionType: (*Ext)(nil), + Field: 103, + Name: "testdata.Ext.more", + Tag: "bytes,103,opt,name=more", +} + +var E_Ext_Text = &proto.ExtensionDesc{ + ExtendedType: (*MyMessage)(nil), + ExtensionType: (*string)(nil), + Field: 104, + Name: "testdata.Ext.text", + Tag: "bytes,104,opt,name=text", +} + +var E_Ext_Number = &proto.ExtensionDesc{ + ExtendedType: (*MyMessage)(nil), + ExtensionType: (*int32)(nil), + Field: 105, + Name: "testdata.Ext.number", + Tag: "varint,105,opt,name=number", +} + +type ComplexExtension struct { + First *int32 `protobuf:"varint,1,opt,name=first" json:"first,omitempty"` + Second *int32 `protobuf:"varint,2,opt,name=second" json:"second,omitempty"` + Third []int32 `protobuf:"varint,3,rep,name=third" json:"third,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *ComplexExtension) Reset() { *m = ComplexExtension{} } +func (m *ComplexExtension) String() string { return proto.CompactTextString(m) } +func (*ComplexExtension) ProtoMessage() {} +func (*ComplexExtension) Descriptor() ([]byte, []int) { return fileDescriptorTest, []int{13} } + +func (m *ComplexExtension) GetFirst() int32 { + if m != nil && m.First != nil { + return *m.First + } + return 0 +} + +func (m *ComplexExtension) GetSecond() int32 { + if m != nil && m.Second != nil { + return *m.Second + } + return 0 +} + +func (m *ComplexExtension) GetThird() []int32 { + if m != nil { + return m.Third + } + return nil +} + +type DefaultsMessage struct { + XXX_extensions map[int32]proto.Extension `json:"-"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *DefaultsMessage) Reset() { *m = DefaultsMessage{} } +func (m *DefaultsMessage) String() string { return proto.CompactTextString(m) } +func (*DefaultsMessage) ProtoMessage() {} +func (*DefaultsMessage) Descriptor() ([]byte, []int) { return fileDescriptorTest, []int{14} } + +var extRange_DefaultsMessage = []proto.ExtensionRange{ + {100, 536870911}, +} + +func (*DefaultsMessage) ExtensionRangeArray() []proto.ExtensionRange { + return extRange_DefaultsMessage +} +func (m *DefaultsMessage) ExtensionMap() map[int32]proto.Extension { + if m.XXX_extensions == nil { + m.XXX_extensions = make(map[int32]proto.Extension) + } + return m.XXX_extensions +} + +type MyMessageSet struct { + XXX_extensions map[int32]proto.Extension `json:"-"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *MyMessageSet) Reset() { *m = MyMessageSet{} } +func (m *MyMessageSet) String() string { return proto.CompactTextString(m) } +func (*MyMessageSet) ProtoMessage() {} +func (*MyMessageSet) Descriptor() ([]byte, []int) { return fileDescriptorTest, []int{15} } + +func (m *MyMessageSet) Marshal() ([]byte, error) { + return proto.MarshalMessageSet(m.ExtensionMap()) +} +func (m *MyMessageSet) Unmarshal(buf []byte) error { + return proto.UnmarshalMessageSet(buf, m.ExtensionMap()) +} +func (m *MyMessageSet) MarshalJSON() ([]byte, error) { + return proto.MarshalMessageSetJSON(m.XXX_extensions) +} +func (m *MyMessageSet) UnmarshalJSON(buf []byte) error { + return proto.UnmarshalMessageSetJSON(buf, m.XXX_extensions) +} + +// ensure MyMessageSet satisfies proto.Marshaler and proto.Unmarshaler +var _ proto.Marshaler = (*MyMessageSet)(nil) +var _ proto.Unmarshaler = (*MyMessageSet)(nil) + +var extRange_MyMessageSet = []proto.ExtensionRange{ + {100, 2147483646}, +} + +func (*MyMessageSet) ExtensionRangeArray() []proto.ExtensionRange { + return extRange_MyMessageSet +} +func (m *MyMessageSet) ExtensionMap() map[int32]proto.Extension { + if m.XXX_extensions == nil { + m.XXX_extensions = make(map[int32]proto.Extension) + } + return m.XXX_extensions +} + +type Empty struct { + XXX_unrecognized []byte `json:"-"` +} + +func (m *Empty) Reset() { *m = Empty{} } +func (m *Empty) String() string { return proto.CompactTextString(m) } +func (*Empty) ProtoMessage() {} +func (*Empty) Descriptor() ([]byte, []int) { return fileDescriptorTest, []int{16} } + +type MessageList struct { + Message []*MessageList_Message `protobuf:"group,1,rep,name=Message,json=message" json:"message,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *MessageList) Reset() { *m = MessageList{} } +func (m *MessageList) String() string { return proto.CompactTextString(m) } +func (*MessageList) ProtoMessage() {} +func (*MessageList) Descriptor() ([]byte, []int) { return fileDescriptorTest, []int{17} } + +func (m *MessageList) GetMessage() []*MessageList_Message { + if m != nil { + return m.Message + } + return nil +} + +type MessageList_Message struct { + Name *string `protobuf:"bytes,2,req,name=name" json:"name,omitempty"` + Count *int32 `protobuf:"varint,3,req,name=count" json:"count,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *MessageList_Message) Reset() { *m = MessageList_Message{} } +func (m *MessageList_Message) String() string { return proto.CompactTextString(m) } +func (*MessageList_Message) ProtoMessage() {} + +func (m *MessageList_Message) GetName() string { + if m != nil && m.Name != nil { + return *m.Name + } + return "" +} + +func (m *MessageList_Message) GetCount() int32 { + if m != nil && m.Count != nil { + return *m.Count + } + return 0 +} + +type Strings struct { + StringField *string `protobuf:"bytes,1,opt,name=string_field,json=stringField" json:"string_field,omitempty"` + BytesField []byte `protobuf:"bytes,2,opt,name=bytes_field,json=bytesField" json:"bytes_field,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *Strings) Reset() { *m = Strings{} } +func (m *Strings) String() string { return proto.CompactTextString(m) } +func (*Strings) ProtoMessage() {} +func (*Strings) Descriptor() ([]byte, []int) { return fileDescriptorTest, []int{18} } + +func (m *Strings) GetStringField() string { + if m != nil && m.StringField != nil { + return *m.StringField + } + return "" +} + +func (m *Strings) GetBytesField() []byte { + if m != nil { + return m.BytesField + } + return nil +} + +type Defaults struct { + // Default-valued fields of all basic types. + // Same as GoTest, but copied here to make testing easier. + F_Bool *bool `protobuf:"varint,1,opt,name=F_Bool,json=fBool,def=1" json:"F_Bool,omitempty"` + F_Int32 *int32 `protobuf:"varint,2,opt,name=F_Int32,json=fInt32,def=32" json:"F_Int32,omitempty"` + F_Int64 *int64 `protobuf:"varint,3,opt,name=F_Int64,json=fInt64,def=64" json:"F_Int64,omitempty"` + F_Fixed32 *uint32 `protobuf:"fixed32,4,opt,name=F_Fixed32,json=fFixed32,def=320" json:"F_Fixed32,omitempty"` + F_Fixed64 *uint64 `protobuf:"fixed64,5,opt,name=F_Fixed64,json=fFixed64,def=640" json:"F_Fixed64,omitempty"` + F_Uint32 *uint32 `protobuf:"varint,6,opt,name=F_Uint32,json=fUint32,def=3200" json:"F_Uint32,omitempty"` + F_Uint64 *uint64 `protobuf:"varint,7,opt,name=F_Uint64,json=fUint64,def=6400" json:"F_Uint64,omitempty"` + F_Float *float32 `protobuf:"fixed32,8,opt,name=F_Float,json=fFloat,def=314159" json:"F_Float,omitempty"` + F_Double *float64 `protobuf:"fixed64,9,opt,name=F_Double,json=fDouble,def=271828" json:"F_Double,omitempty"` + F_String *string `protobuf:"bytes,10,opt,name=F_String,json=fString,def=hello, \"world!\"\n" json:"F_String,omitempty"` + F_Bytes []byte `protobuf:"bytes,11,opt,name=F_Bytes,json=fBytes,def=Bignose" json:"F_Bytes,omitempty"` + F_Sint32 *int32 `protobuf:"zigzag32,12,opt,name=F_Sint32,json=fSint32,def=-32" json:"F_Sint32,omitempty"` + F_Sint64 *int64 `protobuf:"zigzag64,13,opt,name=F_Sint64,json=fSint64,def=-64" json:"F_Sint64,omitempty"` + F_Enum *Defaults_Color `protobuf:"varint,14,opt,name=F_Enum,json=fEnum,enum=testdata.Defaults_Color,def=1" json:"F_Enum,omitempty"` + // More fields with crazy defaults. + F_Pinf *float32 `protobuf:"fixed32,15,opt,name=F_Pinf,json=fPinf,def=inf" json:"F_Pinf,omitempty"` + F_Ninf *float32 `protobuf:"fixed32,16,opt,name=F_Ninf,json=fNinf,def=-inf" json:"F_Ninf,omitempty"` + F_Nan *float32 `protobuf:"fixed32,17,opt,name=F_Nan,json=fNan,def=nan" json:"F_Nan,omitempty"` + // Sub-message. + Sub *SubDefaults `protobuf:"bytes,18,opt,name=sub" json:"sub,omitempty"` + // Redundant but explicit defaults. + StrZero *string `protobuf:"bytes,19,opt,name=str_zero,json=strZero,def=" json:"str_zero,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *Defaults) Reset() { *m = Defaults{} } +func (m *Defaults) String() string { return proto.CompactTextString(m) } +func (*Defaults) ProtoMessage() {} +func (*Defaults) Descriptor() ([]byte, []int) { return fileDescriptorTest, []int{19} } + +const Default_Defaults_F_Bool bool = true +const Default_Defaults_F_Int32 int32 = 32 +const Default_Defaults_F_Int64 int64 = 64 +const Default_Defaults_F_Fixed32 uint32 = 320 +const Default_Defaults_F_Fixed64 uint64 = 640 +const Default_Defaults_F_Uint32 uint32 = 3200 +const Default_Defaults_F_Uint64 uint64 = 6400 +const Default_Defaults_F_Float float32 = 314159 +const Default_Defaults_F_Double float64 = 271828 +const Default_Defaults_F_String string = "hello, \"world!\"\n" + +var Default_Defaults_F_Bytes []byte = []byte("Bignose") + +const Default_Defaults_F_Sint32 int32 = -32 +const Default_Defaults_F_Sint64 int64 = -64 +const Default_Defaults_F_Enum Defaults_Color = Defaults_GREEN + +var Default_Defaults_F_Pinf float32 = float32(math.Inf(1)) +var Default_Defaults_F_Ninf float32 = float32(math.Inf(-1)) +var Default_Defaults_F_Nan float32 = float32(math.NaN()) + +func (m *Defaults) GetF_Bool() bool { + if m != nil && m.F_Bool != nil { + return *m.F_Bool + } + return Default_Defaults_F_Bool +} + +func (m *Defaults) GetF_Int32() int32 { + if m != nil && m.F_Int32 != nil { + return *m.F_Int32 + } + return Default_Defaults_F_Int32 +} + +func (m *Defaults) GetF_Int64() int64 { + if m != nil && m.F_Int64 != nil { + return *m.F_Int64 + } + return Default_Defaults_F_Int64 +} + +func (m *Defaults) GetF_Fixed32() uint32 { + if m != nil && m.F_Fixed32 != nil { + return *m.F_Fixed32 + } + return Default_Defaults_F_Fixed32 +} + +func (m *Defaults) GetF_Fixed64() uint64 { + if m != nil && m.F_Fixed64 != nil { + return *m.F_Fixed64 + } + return Default_Defaults_F_Fixed64 +} + +func (m *Defaults) GetF_Uint32() uint32 { + if m != nil && m.F_Uint32 != nil { + return *m.F_Uint32 + } + return Default_Defaults_F_Uint32 +} + +func (m *Defaults) GetF_Uint64() uint64 { + if m != nil && m.F_Uint64 != nil { + return *m.F_Uint64 + } + return Default_Defaults_F_Uint64 +} + +func (m *Defaults) GetF_Float() float32 { + if m != nil && m.F_Float != nil { + return *m.F_Float + } + return Default_Defaults_F_Float +} + +func (m *Defaults) GetF_Double() float64 { + if m != nil && m.F_Double != nil { + return *m.F_Double + } + return Default_Defaults_F_Double +} + +func (m *Defaults) GetF_String() string { + if m != nil && m.F_String != nil { + return *m.F_String + } + return Default_Defaults_F_String +} + +func (m *Defaults) GetF_Bytes() []byte { + if m != nil && m.F_Bytes != nil { + return m.F_Bytes + } + return append([]byte(nil), Default_Defaults_F_Bytes...) +} + +func (m *Defaults) GetF_Sint32() int32 { + if m != nil && m.F_Sint32 != nil { + return *m.F_Sint32 + } + return Default_Defaults_F_Sint32 +} + +func (m *Defaults) GetF_Sint64() int64 { + if m != nil && m.F_Sint64 != nil { + return *m.F_Sint64 + } + return Default_Defaults_F_Sint64 +} + +func (m *Defaults) GetF_Enum() Defaults_Color { + if m != nil && m.F_Enum != nil { + return *m.F_Enum + } + return Default_Defaults_F_Enum +} + +func (m *Defaults) GetF_Pinf() float32 { + if m != nil && m.F_Pinf != nil { + return *m.F_Pinf + } + return Default_Defaults_F_Pinf +} + +func (m *Defaults) GetF_Ninf() float32 { + if m != nil && m.F_Ninf != nil { + return *m.F_Ninf + } + return Default_Defaults_F_Ninf +} + +func (m *Defaults) GetF_Nan() float32 { + if m != nil && m.F_Nan != nil { + return *m.F_Nan + } + return Default_Defaults_F_Nan +} + +func (m *Defaults) GetSub() *SubDefaults { + if m != nil { + return m.Sub + } + return nil +} + +func (m *Defaults) GetStrZero() string { + if m != nil && m.StrZero != nil { + return *m.StrZero + } + return "" +} + +type SubDefaults struct { + N *int64 `protobuf:"varint,1,opt,name=n,def=7" json:"n,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *SubDefaults) Reset() { *m = SubDefaults{} } +func (m *SubDefaults) String() string { return proto.CompactTextString(m) } +func (*SubDefaults) ProtoMessage() {} +func (*SubDefaults) Descriptor() ([]byte, []int) { return fileDescriptorTest, []int{20} } + +const Default_SubDefaults_N int64 = 7 + +func (m *SubDefaults) GetN() int64 { + if m != nil && m.N != nil { + return *m.N + } + return Default_SubDefaults_N +} + +type RepeatedEnum struct { + Color []RepeatedEnum_Color `protobuf:"varint,1,rep,name=color,enum=testdata.RepeatedEnum_Color" json:"color,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *RepeatedEnum) Reset() { *m = RepeatedEnum{} } +func (m *RepeatedEnum) String() string { return proto.CompactTextString(m) } +func (*RepeatedEnum) ProtoMessage() {} +func (*RepeatedEnum) Descriptor() ([]byte, []int) { return fileDescriptorTest, []int{21} } + +func (m *RepeatedEnum) GetColor() []RepeatedEnum_Color { + if m != nil { + return m.Color + } + return nil +} + +type MoreRepeated struct { + Bools []bool `protobuf:"varint,1,rep,name=bools" json:"bools,omitempty"` + BoolsPacked []bool `protobuf:"varint,2,rep,packed,name=bools_packed,json=boolsPacked" json:"bools_packed,omitempty"` + Ints []int32 `protobuf:"varint,3,rep,name=ints" json:"ints,omitempty"` + IntsPacked []int32 `protobuf:"varint,4,rep,packed,name=ints_packed,json=intsPacked" json:"ints_packed,omitempty"` + Int64SPacked []int64 `protobuf:"varint,7,rep,packed,name=int64s_packed,json=int64sPacked" json:"int64s_packed,omitempty"` + Strings []string `protobuf:"bytes,5,rep,name=strings" json:"strings,omitempty"` + Fixeds []uint32 `protobuf:"fixed32,6,rep,name=fixeds" json:"fixeds,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *MoreRepeated) Reset() { *m = MoreRepeated{} } +func (m *MoreRepeated) String() string { return proto.CompactTextString(m) } +func (*MoreRepeated) ProtoMessage() {} +func (*MoreRepeated) Descriptor() ([]byte, []int) { return fileDescriptorTest, []int{22} } + +func (m *MoreRepeated) GetBools() []bool { + if m != nil { + return m.Bools + } + return nil +} + +func (m *MoreRepeated) GetBoolsPacked() []bool { + if m != nil { + return m.BoolsPacked + } + return nil +} + +func (m *MoreRepeated) GetInts() []int32 { + if m != nil { + return m.Ints + } + return nil +} + +func (m *MoreRepeated) GetIntsPacked() []int32 { + if m != nil { + return m.IntsPacked + } + return nil +} + +func (m *MoreRepeated) GetInt64SPacked() []int64 { + if m != nil { + return m.Int64SPacked + } + return nil +} + +func (m *MoreRepeated) GetStrings() []string { + if m != nil { + return m.Strings + } + return nil +} + +func (m *MoreRepeated) GetFixeds() []uint32 { + if m != nil { + return m.Fixeds + } + return nil +} + +type GroupOld struct { + G *GroupOld_G `protobuf:"group,101,opt,name=G,json=g" json:"g,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *GroupOld) Reset() { *m = GroupOld{} } +func (m *GroupOld) String() string { return proto.CompactTextString(m) } +func (*GroupOld) ProtoMessage() {} +func (*GroupOld) Descriptor() ([]byte, []int) { return fileDescriptorTest, []int{23} } + +func (m *GroupOld) GetG() *GroupOld_G { + if m != nil { + return m.G + } + return nil +} + +type GroupOld_G struct { + X *int32 `protobuf:"varint,2,opt,name=x" json:"x,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *GroupOld_G) Reset() { *m = GroupOld_G{} } +func (m *GroupOld_G) String() string { return proto.CompactTextString(m) } +func (*GroupOld_G) ProtoMessage() {} + +func (m *GroupOld_G) GetX() int32 { + if m != nil && m.X != nil { + return *m.X + } + return 0 +} + +type GroupNew struct { + G *GroupNew_G `protobuf:"group,101,opt,name=G,json=g" json:"g,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *GroupNew) Reset() { *m = GroupNew{} } +func (m *GroupNew) String() string { return proto.CompactTextString(m) } +func (*GroupNew) ProtoMessage() {} +func (*GroupNew) Descriptor() ([]byte, []int) { return fileDescriptorTest, []int{24} } + +func (m *GroupNew) GetG() *GroupNew_G { + if m != nil { + return m.G + } + return nil +} + +type GroupNew_G struct { + X *int32 `protobuf:"varint,2,opt,name=x" json:"x,omitempty"` + Y *int32 `protobuf:"varint,3,opt,name=y" json:"y,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *GroupNew_G) Reset() { *m = GroupNew_G{} } +func (m *GroupNew_G) String() string { return proto.CompactTextString(m) } +func (*GroupNew_G) ProtoMessage() {} + +func (m *GroupNew_G) GetX() int32 { + if m != nil && m.X != nil { + return *m.X + } + return 0 +} + +func (m *GroupNew_G) GetY() int32 { + if m != nil && m.Y != nil { + return *m.Y + } + return 0 +} + +type FloatingPoint struct { + F *float64 `protobuf:"fixed64,1,req,name=f" json:"f,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *FloatingPoint) Reset() { *m = FloatingPoint{} } +func (m *FloatingPoint) String() string { return proto.CompactTextString(m) } +func (*FloatingPoint) ProtoMessage() {} +func (*FloatingPoint) Descriptor() ([]byte, []int) { return fileDescriptorTest, []int{25} } + +func (m *FloatingPoint) GetF() float64 { + if m != nil && m.F != nil { + return *m.F + } + return 0 +} + +type MessageWithMap struct { + NameMapping map[int32]string `protobuf:"bytes,1,rep,name=name_mapping,json=nameMapping" json:"name_mapping,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + MsgMapping map[int64]*FloatingPoint `protobuf:"bytes,2,rep,name=msg_mapping,json=msgMapping" json:"msg_mapping,omitempty" protobuf_key:"zigzag64,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + ByteMapping map[bool][]byte `protobuf:"bytes,3,rep,name=byte_mapping,json=byteMapping" json:"byte_mapping,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + StrToStr map[string]string `protobuf:"bytes,4,rep,name=str_to_str,json=strToStr" json:"str_to_str,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *MessageWithMap) Reset() { *m = MessageWithMap{} } +func (m *MessageWithMap) String() string { return proto.CompactTextString(m) } +func (*MessageWithMap) ProtoMessage() {} +func (*MessageWithMap) Descriptor() ([]byte, []int) { return fileDescriptorTest, []int{26} } + +func (m *MessageWithMap) GetNameMapping() map[int32]string { + if m != nil { + return m.NameMapping + } + return nil +} + +func (m *MessageWithMap) GetMsgMapping() map[int64]*FloatingPoint { + if m != nil { + return m.MsgMapping + } + return nil +} + +func (m *MessageWithMap) GetByteMapping() map[bool][]byte { + if m != nil { + return m.ByteMapping + } + return nil +} + +func (m *MessageWithMap) GetStrToStr() map[string]string { + if m != nil { + return m.StrToStr + } + return nil +} + +type Oneof struct { + // Types that are valid to be assigned to Union: + // *Oneof_F_Bool + // *Oneof_F_Int32 + // *Oneof_F_Int64 + // *Oneof_F_Fixed32 + // *Oneof_F_Fixed64 + // *Oneof_F_Uint32 + // *Oneof_F_Uint64 + // *Oneof_F_Float + // *Oneof_F_Double + // *Oneof_F_String + // *Oneof_F_Bytes + // *Oneof_F_Sint32 + // *Oneof_F_Sint64 + // *Oneof_F_Enum + // *Oneof_F_Message + // *Oneof_FGroup + // *Oneof_F_Largest_Tag + Union isOneof_Union `protobuf_oneof:"union"` + // Types that are valid to be assigned to Tormato: + // *Oneof_Value + Tormato isOneof_Tormato `protobuf_oneof:"tormato"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *Oneof) Reset() { *m = Oneof{} } +func (m *Oneof) String() string { return proto.CompactTextString(m) } +func (*Oneof) ProtoMessage() {} +func (*Oneof) Descriptor() ([]byte, []int) { return fileDescriptorTest, []int{27} } + +type isOneof_Union interface { + isOneof_Union() +} +type isOneof_Tormato interface { + isOneof_Tormato() +} + +type Oneof_F_Bool struct { + F_Bool bool `protobuf:"varint,1,opt,name=F_Bool,json=fBool,oneof"` +} +type Oneof_F_Int32 struct { + F_Int32 int32 `protobuf:"varint,2,opt,name=F_Int32,json=fInt32,oneof"` +} +type Oneof_F_Int64 struct { + F_Int64 int64 `protobuf:"varint,3,opt,name=F_Int64,json=fInt64,oneof"` +} +type Oneof_F_Fixed32 struct { + F_Fixed32 uint32 `protobuf:"fixed32,4,opt,name=F_Fixed32,json=fFixed32,oneof"` +} +type Oneof_F_Fixed64 struct { + F_Fixed64 uint64 `protobuf:"fixed64,5,opt,name=F_Fixed64,json=fFixed64,oneof"` +} +type Oneof_F_Uint32 struct { + F_Uint32 uint32 `protobuf:"varint,6,opt,name=F_Uint32,json=fUint32,oneof"` +} +type Oneof_F_Uint64 struct { + F_Uint64 uint64 `protobuf:"varint,7,opt,name=F_Uint64,json=fUint64,oneof"` +} +type Oneof_F_Float struct { + F_Float float32 `protobuf:"fixed32,8,opt,name=F_Float,json=fFloat,oneof"` +} +type Oneof_F_Double struct { + F_Double float64 `protobuf:"fixed64,9,opt,name=F_Double,json=fDouble,oneof"` +} +type Oneof_F_String struct { + F_String string `protobuf:"bytes,10,opt,name=F_String,json=fString,oneof"` +} +type Oneof_F_Bytes struct { + F_Bytes []byte `protobuf:"bytes,11,opt,name=F_Bytes,json=fBytes,oneof"` +} +type Oneof_F_Sint32 struct { + F_Sint32 int32 `protobuf:"zigzag32,12,opt,name=F_Sint32,json=fSint32,oneof"` +} +type Oneof_F_Sint64 struct { + F_Sint64 int64 `protobuf:"zigzag64,13,opt,name=F_Sint64,json=fSint64,oneof"` +} +type Oneof_F_Enum struct { + F_Enum MyMessage_Color `protobuf:"varint,14,opt,name=F_Enum,json=fEnum,enum=testdata.MyMessage_Color,oneof"` +} +type Oneof_F_Message struct { + F_Message *GoTestField `protobuf:"bytes,15,opt,name=F_Message,json=fMessage,oneof"` +} +type Oneof_FGroup struct { + FGroup *Oneof_F_Group `protobuf:"group,16,opt,name=F_Group,json=fGroup,oneof"` +} +type Oneof_F_Largest_Tag struct { + F_Largest_Tag int32 `protobuf:"varint,536870911,opt,name=F_Largest_Tag,json=fLargestTag,oneof"` +} +type Oneof_Value struct { + Value int32 `protobuf:"varint,100,opt,name=value,oneof"` +} + +func (*Oneof_F_Bool) isOneof_Union() {} +func (*Oneof_F_Int32) isOneof_Union() {} +func (*Oneof_F_Int64) isOneof_Union() {} +func (*Oneof_F_Fixed32) isOneof_Union() {} +func (*Oneof_F_Fixed64) isOneof_Union() {} +func (*Oneof_F_Uint32) isOneof_Union() {} +func (*Oneof_F_Uint64) isOneof_Union() {} +func (*Oneof_F_Float) isOneof_Union() {} +func (*Oneof_F_Double) isOneof_Union() {} +func (*Oneof_F_String) isOneof_Union() {} +func (*Oneof_F_Bytes) isOneof_Union() {} +func (*Oneof_F_Sint32) isOneof_Union() {} +func (*Oneof_F_Sint64) isOneof_Union() {} +func (*Oneof_F_Enum) isOneof_Union() {} +func (*Oneof_F_Message) isOneof_Union() {} +func (*Oneof_FGroup) isOneof_Union() {} +func (*Oneof_F_Largest_Tag) isOneof_Union() {} +func (*Oneof_Value) isOneof_Tormato() {} + +func (m *Oneof) GetUnion() isOneof_Union { + if m != nil { + return m.Union + } + return nil +} +func (m *Oneof) GetTormato() isOneof_Tormato { + if m != nil { + return m.Tormato + } + return nil +} + +func (m *Oneof) GetF_Bool() bool { + if x, ok := m.GetUnion().(*Oneof_F_Bool); ok { + return x.F_Bool + } + return false +} + +func (m *Oneof) GetF_Int32() int32 { + if x, ok := m.GetUnion().(*Oneof_F_Int32); ok { + return x.F_Int32 + } + return 0 +} + +func (m *Oneof) GetF_Int64() int64 { + if x, ok := m.GetUnion().(*Oneof_F_Int64); ok { + return x.F_Int64 + } + return 0 +} + +func (m *Oneof) GetF_Fixed32() uint32 { + if x, ok := m.GetUnion().(*Oneof_F_Fixed32); ok { + return x.F_Fixed32 + } + return 0 +} + +func (m *Oneof) GetF_Fixed64() uint64 { + if x, ok := m.GetUnion().(*Oneof_F_Fixed64); ok { + return x.F_Fixed64 + } + return 0 +} + +func (m *Oneof) GetF_Uint32() uint32 { + if x, ok := m.GetUnion().(*Oneof_F_Uint32); ok { + return x.F_Uint32 + } + return 0 +} + +func (m *Oneof) GetF_Uint64() uint64 { + if x, ok := m.GetUnion().(*Oneof_F_Uint64); ok { + return x.F_Uint64 + } + return 0 +} + +func (m *Oneof) GetF_Float() float32 { + if x, ok := m.GetUnion().(*Oneof_F_Float); ok { + return x.F_Float + } + return 0 +} + +func (m *Oneof) GetF_Double() float64 { + if x, ok := m.GetUnion().(*Oneof_F_Double); ok { + return x.F_Double + } + return 0 +} + +func (m *Oneof) GetF_String() string { + if x, ok := m.GetUnion().(*Oneof_F_String); ok { + return x.F_String + } + return "" +} + +func (m *Oneof) GetF_Bytes() []byte { + if x, ok := m.GetUnion().(*Oneof_F_Bytes); ok { + return x.F_Bytes + } + return nil +} + +func (m *Oneof) GetF_Sint32() int32 { + if x, ok := m.GetUnion().(*Oneof_F_Sint32); ok { + return x.F_Sint32 + } + return 0 +} + +func (m *Oneof) GetF_Sint64() int64 { + if x, ok := m.GetUnion().(*Oneof_F_Sint64); ok { + return x.F_Sint64 + } + return 0 +} + +func (m *Oneof) GetF_Enum() MyMessage_Color { + if x, ok := m.GetUnion().(*Oneof_F_Enum); ok { + return x.F_Enum + } + return MyMessage_RED +} + +func (m *Oneof) GetF_Message() *GoTestField { + if x, ok := m.GetUnion().(*Oneof_F_Message); ok { + return x.F_Message + } + return nil +} + +func (m *Oneof) GetFGroup() *Oneof_F_Group { + if x, ok := m.GetUnion().(*Oneof_FGroup); ok { + return x.FGroup + } + return nil +} + +func (m *Oneof) GetF_Largest_Tag() int32 { + if x, ok := m.GetUnion().(*Oneof_F_Largest_Tag); ok { + return x.F_Largest_Tag + } + return 0 +} + +func (m *Oneof) GetValue() int32 { + if x, ok := m.GetTormato().(*Oneof_Value); ok { + return x.Value + } + return 0 +} + +// XXX_OneofFuncs is for the internal use of the proto package. +func (*Oneof) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{}) { + return _Oneof_OneofMarshaler, _Oneof_OneofUnmarshaler, _Oneof_OneofSizer, []interface{}{ + (*Oneof_F_Bool)(nil), + (*Oneof_F_Int32)(nil), + (*Oneof_F_Int64)(nil), + (*Oneof_F_Fixed32)(nil), + (*Oneof_F_Fixed64)(nil), + (*Oneof_F_Uint32)(nil), + (*Oneof_F_Uint64)(nil), + (*Oneof_F_Float)(nil), + (*Oneof_F_Double)(nil), + (*Oneof_F_String)(nil), + (*Oneof_F_Bytes)(nil), + (*Oneof_F_Sint32)(nil), + (*Oneof_F_Sint64)(nil), + (*Oneof_F_Enum)(nil), + (*Oneof_F_Message)(nil), + (*Oneof_FGroup)(nil), + (*Oneof_F_Largest_Tag)(nil), + (*Oneof_Value)(nil), + } +} + +func _Oneof_OneofMarshaler(msg proto.Message, b *proto.Buffer) error { + m := msg.(*Oneof) + // union + switch x := m.Union.(type) { + case *Oneof_F_Bool: + t := uint64(0) + if x.F_Bool { + t = 1 + } + _ = b.EncodeVarint(1<<3 | proto.WireVarint) + _ = b.EncodeVarint(t) + case *Oneof_F_Int32: + _ = b.EncodeVarint(2<<3 | proto.WireVarint) + _ = b.EncodeVarint(uint64(x.F_Int32)) + case *Oneof_F_Int64: + _ = b.EncodeVarint(3<<3 | proto.WireVarint) + _ = b.EncodeVarint(uint64(x.F_Int64)) + case *Oneof_F_Fixed32: + _ = b.EncodeVarint(4<<3 | proto.WireFixed32) + _ = b.EncodeFixed32(uint64(x.F_Fixed32)) + case *Oneof_F_Fixed64: + _ = b.EncodeVarint(5<<3 | proto.WireFixed64) + _ = b.EncodeFixed64(uint64(x.F_Fixed64)) + case *Oneof_F_Uint32: + _ = b.EncodeVarint(6<<3 | proto.WireVarint) + _ = b.EncodeVarint(uint64(x.F_Uint32)) + case *Oneof_F_Uint64: + _ = b.EncodeVarint(7<<3 | proto.WireVarint) + _ = b.EncodeVarint(uint64(x.F_Uint64)) + case *Oneof_F_Float: + _ = b.EncodeVarint(8<<3 | proto.WireFixed32) + _ = b.EncodeFixed32(uint64(math.Float32bits(x.F_Float))) + case *Oneof_F_Double: + _ = b.EncodeVarint(9<<3 | proto.WireFixed64) + _ = b.EncodeFixed64(math.Float64bits(x.F_Double)) + case *Oneof_F_String: + _ = b.EncodeVarint(10<<3 | proto.WireBytes) + _ = b.EncodeStringBytes(x.F_String) + case *Oneof_F_Bytes: + _ = b.EncodeVarint(11<<3 | proto.WireBytes) + _ = b.EncodeRawBytes(x.F_Bytes) + case *Oneof_F_Sint32: + _ = b.EncodeVarint(12<<3 | proto.WireVarint) + _ = b.EncodeZigzag32(uint64(x.F_Sint32)) + case *Oneof_F_Sint64: + _ = b.EncodeVarint(13<<3 | proto.WireVarint) + _ = b.EncodeZigzag64(uint64(x.F_Sint64)) + case *Oneof_F_Enum: + _ = b.EncodeVarint(14<<3 | proto.WireVarint) + _ = b.EncodeVarint(uint64(x.F_Enum)) + case *Oneof_F_Message: + _ = b.EncodeVarint(15<<3 | proto.WireBytes) + if err := b.EncodeMessage(x.F_Message); err != nil { + return err + } + case *Oneof_FGroup: + _ = b.EncodeVarint(16<<3 | proto.WireStartGroup) + if err := b.Marshal(x.FGroup); err != nil { + return err + } + _ = b.EncodeVarint(16<<3 | proto.WireEndGroup) + case *Oneof_F_Largest_Tag: + _ = b.EncodeVarint(536870911<<3 | proto.WireVarint) + _ = b.EncodeVarint(uint64(x.F_Largest_Tag)) + case nil: + default: + return fmt.Errorf("Oneof.Union has unexpected type %T", x) + } + // tormato + switch x := m.Tormato.(type) { + case *Oneof_Value: + _ = b.EncodeVarint(100<<3 | proto.WireVarint) + _ = b.EncodeVarint(uint64(x.Value)) + case nil: + default: + return fmt.Errorf("Oneof.Tormato has unexpected type %T", x) + } + return nil +} + +func _Oneof_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) { + m := msg.(*Oneof) + switch tag { + case 1: // union.F_Bool + if wire != proto.WireVarint { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeVarint() + m.Union = &Oneof_F_Bool{x != 0} + return true, err + case 2: // union.F_Int32 + if wire != proto.WireVarint { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeVarint() + m.Union = &Oneof_F_Int32{int32(x)} + return true, err + case 3: // union.F_Int64 + if wire != proto.WireVarint { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeVarint() + m.Union = &Oneof_F_Int64{int64(x)} + return true, err + case 4: // union.F_Fixed32 + if wire != proto.WireFixed32 { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeFixed32() + m.Union = &Oneof_F_Fixed32{uint32(x)} + return true, err + case 5: // union.F_Fixed64 + if wire != proto.WireFixed64 { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeFixed64() + m.Union = &Oneof_F_Fixed64{x} + return true, err + case 6: // union.F_Uint32 + if wire != proto.WireVarint { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeVarint() + m.Union = &Oneof_F_Uint32{uint32(x)} + return true, err + case 7: // union.F_Uint64 + if wire != proto.WireVarint { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeVarint() + m.Union = &Oneof_F_Uint64{x} + return true, err + case 8: // union.F_Float + if wire != proto.WireFixed32 { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeFixed32() + m.Union = &Oneof_F_Float{math.Float32frombits(uint32(x))} + return true, err + case 9: // union.F_Double + if wire != proto.WireFixed64 { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeFixed64() + m.Union = &Oneof_F_Double{math.Float64frombits(x)} + return true, err + case 10: // union.F_String + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeStringBytes() + m.Union = &Oneof_F_String{x} + return true, err + case 11: // union.F_Bytes + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeRawBytes(true) + m.Union = &Oneof_F_Bytes{x} + return true, err + case 12: // union.F_Sint32 + if wire != proto.WireVarint { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeZigzag32() + m.Union = &Oneof_F_Sint32{int32(x)} + return true, err + case 13: // union.F_Sint64 + if wire != proto.WireVarint { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeZigzag64() + m.Union = &Oneof_F_Sint64{int64(x)} + return true, err + case 14: // union.F_Enum + if wire != proto.WireVarint { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeVarint() + m.Union = &Oneof_F_Enum{MyMessage_Color(x)} + return true, err + case 15: // union.F_Message + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + msg := new(GoTestField) + err := b.DecodeMessage(msg) + m.Union = &Oneof_F_Message{msg} + return true, err + case 16: // union.f_group + if wire != proto.WireStartGroup { + return true, proto.ErrInternalBadWireType + } + msg := new(Oneof_F_Group) + err := b.DecodeGroup(msg) + m.Union = &Oneof_FGroup{msg} + return true, err + case 536870911: // union.F_Largest_Tag + if wire != proto.WireVarint { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeVarint() + m.Union = &Oneof_F_Largest_Tag{int32(x)} + return true, err + case 100: // tormato.value + if wire != proto.WireVarint { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeVarint() + m.Tormato = &Oneof_Value{int32(x)} + return true, err + default: + return false, nil + } +} + +func _Oneof_OneofSizer(msg proto.Message) (n int) { + m := msg.(*Oneof) + // union + switch x := m.Union.(type) { + case *Oneof_F_Bool: + n += proto.SizeVarint(1<<3 | proto.WireVarint) + n += 1 + case *Oneof_F_Int32: + n += proto.SizeVarint(2<<3 | proto.WireVarint) + n += proto.SizeVarint(uint64(x.F_Int32)) + case *Oneof_F_Int64: + n += proto.SizeVarint(3<<3 | proto.WireVarint) + n += proto.SizeVarint(uint64(x.F_Int64)) + case *Oneof_F_Fixed32: + n += proto.SizeVarint(4<<3 | proto.WireFixed32) + n += 4 + case *Oneof_F_Fixed64: + n += proto.SizeVarint(5<<3 | proto.WireFixed64) + n += 8 + case *Oneof_F_Uint32: + n += proto.SizeVarint(6<<3 | proto.WireVarint) + n += proto.SizeVarint(uint64(x.F_Uint32)) + case *Oneof_F_Uint64: + n += proto.SizeVarint(7<<3 | proto.WireVarint) + n += proto.SizeVarint(uint64(x.F_Uint64)) + case *Oneof_F_Float: + n += proto.SizeVarint(8<<3 | proto.WireFixed32) + n += 4 + case *Oneof_F_Double: + n += proto.SizeVarint(9<<3 | proto.WireFixed64) + n += 8 + case *Oneof_F_String: + n += proto.SizeVarint(10<<3 | proto.WireBytes) + n += proto.SizeVarint(uint64(len(x.F_String))) + n += len(x.F_String) + case *Oneof_F_Bytes: + n += proto.SizeVarint(11<<3 | proto.WireBytes) + n += proto.SizeVarint(uint64(len(x.F_Bytes))) + n += len(x.F_Bytes) + case *Oneof_F_Sint32: + n += proto.SizeVarint(12<<3 | proto.WireVarint) + n += proto.SizeVarint(uint64((uint32(x.F_Sint32) << 1) ^ uint32((int32(x.F_Sint32) >> 31)))) + case *Oneof_F_Sint64: + n += proto.SizeVarint(13<<3 | proto.WireVarint) + n += proto.SizeVarint(uint64(uint64(x.F_Sint64<<1) ^ uint64((int64(x.F_Sint64) >> 63)))) + case *Oneof_F_Enum: + n += proto.SizeVarint(14<<3 | proto.WireVarint) + n += proto.SizeVarint(uint64(x.F_Enum)) + case *Oneof_F_Message: + s := proto.Size(x.F_Message) + n += proto.SizeVarint(15<<3 | proto.WireBytes) + n += proto.SizeVarint(uint64(s)) + n += s + case *Oneof_FGroup: + n += proto.SizeVarint(16<<3 | proto.WireStartGroup) + n += proto.Size(x.FGroup) + n += proto.SizeVarint(16<<3 | proto.WireEndGroup) + case *Oneof_F_Largest_Tag: + n += proto.SizeVarint(536870911<<3 | proto.WireVarint) + n += proto.SizeVarint(uint64(x.F_Largest_Tag)) + case nil: + default: + panic(fmt.Sprintf("proto: unexpected type %T in oneof", x)) + } + // tormato + switch x := m.Tormato.(type) { + case *Oneof_Value: + n += proto.SizeVarint(100<<3 | proto.WireVarint) + n += proto.SizeVarint(uint64(x.Value)) + case nil: + default: + panic(fmt.Sprintf("proto: unexpected type %T in oneof", x)) + } + return n +} + +type Oneof_F_Group struct { + X *int32 `protobuf:"varint,17,opt,name=x" json:"x,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *Oneof_F_Group) Reset() { *m = Oneof_F_Group{} } +func (m *Oneof_F_Group) String() string { return proto.CompactTextString(m) } +func (*Oneof_F_Group) ProtoMessage() {} + +func (m *Oneof_F_Group) GetX() int32 { + if m != nil && m.X != nil { + return *m.X + } + return 0 +} + +type Communique struct { + MakeMeCry *bool `protobuf:"varint,1,opt,name=make_me_cry,json=makeMeCry" json:"make_me_cry,omitempty"` + // This is a oneof, called "union". + // + // Types that are valid to be assigned to Union: + // *Communique_Number + // *Communique_Name + // *Communique_Data + // *Communique_TempC + // *Communique_Col + // *Communique_Msg + Union isCommunique_Union `protobuf_oneof:"union"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *Communique) Reset() { *m = Communique{} } +func (m *Communique) String() string { return proto.CompactTextString(m) } +func (*Communique) ProtoMessage() {} +func (*Communique) Descriptor() ([]byte, []int) { return fileDescriptorTest, []int{28} } + +type isCommunique_Union interface { + isCommunique_Union() +} + +type Communique_Number struct { + Number int32 `protobuf:"varint,5,opt,name=number,oneof"` +} +type Communique_Name struct { + Name string `protobuf:"bytes,6,opt,name=name,oneof"` +} +type Communique_Data struct { + Data []byte `protobuf:"bytes,7,opt,name=data,oneof"` +} +type Communique_TempC struct { + TempC float64 `protobuf:"fixed64,8,opt,name=temp_c,json=tempC,oneof"` +} +type Communique_Col struct { + Col MyMessage_Color `protobuf:"varint,9,opt,name=col,enum=testdata.MyMessage_Color,oneof"` +} +type Communique_Msg struct { + Msg *Strings `protobuf:"bytes,10,opt,name=msg,oneof"` +} + +func (*Communique_Number) isCommunique_Union() {} +func (*Communique_Name) isCommunique_Union() {} +func (*Communique_Data) isCommunique_Union() {} +func (*Communique_TempC) isCommunique_Union() {} +func (*Communique_Col) isCommunique_Union() {} +func (*Communique_Msg) isCommunique_Union() {} + +func (m *Communique) GetUnion() isCommunique_Union { + if m != nil { + return m.Union + } + return nil +} + +func (m *Communique) GetMakeMeCry() bool { + if m != nil && m.MakeMeCry != nil { + return *m.MakeMeCry + } + return false +} + +func (m *Communique) GetNumber() int32 { + if x, ok := m.GetUnion().(*Communique_Number); ok { + return x.Number + } + return 0 +} + +func (m *Communique) GetName() string { + if x, ok := m.GetUnion().(*Communique_Name); ok { + return x.Name + } + return "" +} + +func (m *Communique) GetData() []byte { + if x, ok := m.GetUnion().(*Communique_Data); ok { + return x.Data + } + return nil +} + +func (m *Communique) GetTempC() float64 { + if x, ok := m.GetUnion().(*Communique_TempC); ok { + return x.TempC + } + return 0 +} + +func (m *Communique) GetCol() MyMessage_Color { + if x, ok := m.GetUnion().(*Communique_Col); ok { + return x.Col + } + return MyMessage_RED +} + +func (m *Communique) GetMsg() *Strings { + if x, ok := m.GetUnion().(*Communique_Msg); ok { + return x.Msg + } + return nil +} + +// XXX_OneofFuncs is for the internal use of the proto package. +func (*Communique) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{}) { + return _Communique_OneofMarshaler, _Communique_OneofUnmarshaler, _Communique_OneofSizer, []interface{}{ + (*Communique_Number)(nil), + (*Communique_Name)(nil), + (*Communique_Data)(nil), + (*Communique_TempC)(nil), + (*Communique_Col)(nil), + (*Communique_Msg)(nil), + } +} + +func _Communique_OneofMarshaler(msg proto.Message, b *proto.Buffer) error { + m := msg.(*Communique) + // union + switch x := m.Union.(type) { + case *Communique_Number: + _ = b.EncodeVarint(5<<3 | proto.WireVarint) + _ = b.EncodeVarint(uint64(x.Number)) + case *Communique_Name: + _ = b.EncodeVarint(6<<3 | proto.WireBytes) + _ = b.EncodeStringBytes(x.Name) + case *Communique_Data: + _ = b.EncodeVarint(7<<3 | proto.WireBytes) + _ = b.EncodeRawBytes(x.Data) + case *Communique_TempC: + _ = b.EncodeVarint(8<<3 | proto.WireFixed64) + _ = b.EncodeFixed64(math.Float64bits(x.TempC)) + case *Communique_Col: + _ = b.EncodeVarint(9<<3 | proto.WireVarint) + _ = b.EncodeVarint(uint64(x.Col)) + case *Communique_Msg: + _ = b.EncodeVarint(10<<3 | proto.WireBytes) + if err := b.EncodeMessage(x.Msg); err != nil { + return err + } + case nil: + default: + return fmt.Errorf("Communique.Union has unexpected type %T", x) + } + return nil +} + +func _Communique_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) { + m := msg.(*Communique) + switch tag { + case 5: // union.number + if wire != proto.WireVarint { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeVarint() + m.Union = &Communique_Number{int32(x)} + return true, err + case 6: // union.name + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeStringBytes() + m.Union = &Communique_Name{x} + return true, err + case 7: // union.data + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeRawBytes(true) + m.Union = &Communique_Data{x} + return true, err + case 8: // union.temp_c + if wire != proto.WireFixed64 { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeFixed64() + m.Union = &Communique_TempC{math.Float64frombits(x)} + return true, err + case 9: // union.col + if wire != proto.WireVarint { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeVarint() + m.Union = &Communique_Col{MyMessage_Color(x)} + return true, err + case 10: // union.msg + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + msg := new(Strings) + err := b.DecodeMessage(msg) + m.Union = &Communique_Msg{msg} + return true, err + default: + return false, nil + } +} + +func _Communique_OneofSizer(msg proto.Message) (n int) { + m := msg.(*Communique) + // union + switch x := m.Union.(type) { + case *Communique_Number: + n += proto.SizeVarint(5<<3 | proto.WireVarint) + n += proto.SizeVarint(uint64(x.Number)) + case *Communique_Name: + n += proto.SizeVarint(6<<3 | proto.WireBytes) + n += proto.SizeVarint(uint64(len(x.Name))) + n += len(x.Name) + case *Communique_Data: + n += proto.SizeVarint(7<<3 | proto.WireBytes) + n += proto.SizeVarint(uint64(len(x.Data))) + n += len(x.Data) + case *Communique_TempC: + n += proto.SizeVarint(8<<3 | proto.WireFixed64) + n += 8 + case *Communique_Col: + n += proto.SizeVarint(9<<3 | proto.WireVarint) + n += proto.SizeVarint(uint64(x.Col)) + case *Communique_Msg: + s := proto.Size(x.Msg) + n += proto.SizeVarint(10<<3 | proto.WireBytes) + n += proto.SizeVarint(uint64(s)) + n += s + case nil: + default: + panic(fmt.Sprintf("proto: unexpected type %T in oneof", x)) + } + return n +} + +var E_Greeting = &proto.ExtensionDesc{ + ExtendedType: (*MyMessage)(nil), + ExtensionType: ([]string)(nil), + Field: 106, + Name: "testdata.greeting", + Tag: "bytes,106,rep,name=greeting", +} + +var E_Complex = &proto.ExtensionDesc{ + ExtendedType: (*OtherMessage)(nil), + ExtensionType: (*ComplexExtension)(nil), + Field: 200, + Name: "testdata.complex", + Tag: "bytes,200,opt,name=complex", +} + +var E_RComplex = &proto.ExtensionDesc{ + ExtendedType: (*OtherMessage)(nil), + ExtensionType: ([]*ComplexExtension)(nil), + Field: 201, + Name: "testdata.r_complex", + Tag: "bytes,201,rep,name=r_complex,json=rComplex", +} + +var E_NoDefaultDouble = &proto.ExtensionDesc{ + ExtendedType: (*DefaultsMessage)(nil), + ExtensionType: (*float64)(nil), + Field: 101, + Name: "testdata.no_default_double", + Tag: "fixed64,101,opt,name=no_default_double,json=noDefaultDouble", +} + +var E_NoDefaultFloat = &proto.ExtensionDesc{ + ExtendedType: (*DefaultsMessage)(nil), + ExtensionType: (*float32)(nil), + Field: 102, + Name: "testdata.no_default_float", + Tag: "fixed32,102,opt,name=no_default_float,json=noDefaultFloat", +} + +var E_NoDefaultInt32 = &proto.ExtensionDesc{ + ExtendedType: (*DefaultsMessage)(nil), + ExtensionType: (*int32)(nil), + Field: 103, + Name: "testdata.no_default_int32", + Tag: "varint,103,opt,name=no_default_int32,json=noDefaultInt32", +} + +var E_NoDefaultInt64 = &proto.ExtensionDesc{ + ExtendedType: (*DefaultsMessage)(nil), + ExtensionType: (*int64)(nil), + Field: 104, + Name: "testdata.no_default_int64", + Tag: "varint,104,opt,name=no_default_int64,json=noDefaultInt64", +} + +var E_NoDefaultUint32 = &proto.ExtensionDesc{ + ExtendedType: (*DefaultsMessage)(nil), + ExtensionType: (*uint32)(nil), + Field: 105, + Name: "testdata.no_default_uint32", + Tag: "varint,105,opt,name=no_default_uint32,json=noDefaultUint32", +} + +var E_NoDefaultUint64 = &proto.ExtensionDesc{ + ExtendedType: (*DefaultsMessage)(nil), + ExtensionType: (*uint64)(nil), + Field: 106, + Name: "testdata.no_default_uint64", + Tag: "varint,106,opt,name=no_default_uint64,json=noDefaultUint64", +} + +var E_NoDefaultSint32 = &proto.ExtensionDesc{ + ExtendedType: (*DefaultsMessage)(nil), + ExtensionType: (*int32)(nil), + Field: 107, + Name: "testdata.no_default_sint32", + Tag: "zigzag32,107,opt,name=no_default_sint32,json=noDefaultSint32", +} + +var E_NoDefaultSint64 = &proto.ExtensionDesc{ + ExtendedType: (*DefaultsMessage)(nil), + ExtensionType: (*int64)(nil), + Field: 108, + Name: "testdata.no_default_sint64", + Tag: "zigzag64,108,opt,name=no_default_sint64,json=noDefaultSint64", +} + +var E_NoDefaultFixed32 = &proto.ExtensionDesc{ + ExtendedType: (*DefaultsMessage)(nil), + ExtensionType: (*uint32)(nil), + Field: 109, + Name: "testdata.no_default_fixed32", + Tag: "fixed32,109,opt,name=no_default_fixed32,json=noDefaultFixed32", +} + +var E_NoDefaultFixed64 = &proto.ExtensionDesc{ + ExtendedType: (*DefaultsMessage)(nil), + ExtensionType: (*uint64)(nil), + Field: 110, + Name: "testdata.no_default_fixed64", + Tag: "fixed64,110,opt,name=no_default_fixed64,json=noDefaultFixed64", +} + +var E_NoDefaultSfixed32 = &proto.ExtensionDesc{ + ExtendedType: (*DefaultsMessage)(nil), + ExtensionType: (*int32)(nil), + Field: 111, + Name: "testdata.no_default_sfixed32", + Tag: "fixed32,111,opt,name=no_default_sfixed32,json=noDefaultSfixed32", +} + +var E_NoDefaultSfixed64 = &proto.ExtensionDesc{ + ExtendedType: (*DefaultsMessage)(nil), + ExtensionType: (*int64)(nil), + Field: 112, + Name: "testdata.no_default_sfixed64", + Tag: "fixed64,112,opt,name=no_default_sfixed64,json=noDefaultSfixed64", +} + +var E_NoDefaultBool = &proto.ExtensionDesc{ + ExtendedType: (*DefaultsMessage)(nil), + ExtensionType: (*bool)(nil), + Field: 113, + Name: "testdata.no_default_bool", + Tag: "varint,113,opt,name=no_default_bool,json=noDefaultBool", +} + +var E_NoDefaultString = &proto.ExtensionDesc{ + ExtendedType: (*DefaultsMessage)(nil), + ExtensionType: (*string)(nil), + Field: 114, + Name: "testdata.no_default_string", + Tag: "bytes,114,opt,name=no_default_string,json=noDefaultString", +} + +var E_NoDefaultBytes = &proto.ExtensionDesc{ + ExtendedType: (*DefaultsMessage)(nil), + ExtensionType: ([]byte)(nil), + Field: 115, + Name: "testdata.no_default_bytes", + Tag: "bytes,115,opt,name=no_default_bytes,json=noDefaultBytes", +} + +var E_NoDefaultEnum = &proto.ExtensionDesc{ + ExtendedType: (*DefaultsMessage)(nil), + ExtensionType: (*DefaultsMessage_DefaultsEnum)(nil), + Field: 116, + Name: "testdata.no_default_enum", + Tag: "varint,116,opt,name=no_default_enum,json=noDefaultEnum,enum=testdata.DefaultsMessage_DefaultsEnum", +} + +var E_DefaultDouble = &proto.ExtensionDesc{ + ExtendedType: (*DefaultsMessage)(nil), + ExtensionType: (*float64)(nil), + Field: 201, + Name: "testdata.default_double", + Tag: "fixed64,201,opt,name=default_double,json=defaultDouble,def=3.1415", +} + +var E_DefaultFloat = &proto.ExtensionDesc{ + ExtendedType: (*DefaultsMessage)(nil), + ExtensionType: (*float32)(nil), + Field: 202, + Name: "testdata.default_float", + Tag: "fixed32,202,opt,name=default_float,json=defaultFloat,def=3.14", +} + +var E_DefaultInt32 = &proto.ExtensionDesc{ + ExtendedType: (*DefaultsMessage)(nil), + ExtensionType: (*int32)(nil), + Field: 203, + Name: "testdata.default_int32", + Tag: "varint,203,opt,name=default_int32,json=defaultInt32,def=42", +} + +var E_DefaultInt64 = &proto.ExtensionDesc{ + ExtendedType: (*DefaultsMessage)(nil), + ExtensionType: (*int64)(nil), + Field: 204, + Name: "testdata.default_int64", + Tag: "varint,204,opt,name=default_int64,json=defaultInt64,def=43", +} + +var E_DefaultUint32 = &proto.ExtensionDesc{ + ExtendedType: (*DefaultsMessage)(nil), + ExtensionType: (*uint32)(nil), + Field: 205, + Name: "testdata.default_uint32", + Tag: "varint,205,opt,name=default_uint32,json=defaultUint32,def=44", +} + +var E_DefaultUint64 = &proto.ExtensionDesc{ + ExtendedType: (*DefaultsMessage)(nil), + ExtensionType: (*uint64)(nil), + Field: 206, + Name: "testdata.default_uint64", + Tag: "varint,206,opt,name=default_uint64,json=defaultUint64,def=45", +} + +var E_DefaultSint32 = &proto.ExtensionDesc{ + ExtendedType: (*DefaultsMessage)(nil), + ExtensionType: (*int32)(nil), + Field: 207, + Name: "testdata.default_sint32", + Tag: "zigzag32,207,opt,name=default_sint32,json=defaultSint32,def=46", +} + +var E_DefaultSint64 = &proto.ExtensionDesc{ + ExtendedType: (*DefaultsMessage)(nil), + ExtensionType: (*int64)(nil), + Field: 208, + Name: "testdata.default_sint64", + Tag: "zigzag64,208,opt,name=default_sint64,json=defaultSint64,def=47", +} + +var E_DefaultFixed32 = &proto.ExtensionDesc{ + ExtendedType: (*DefaultsMessage)(nil), + ExtensionType: (*uint32)(nil), + Field: 209, + Name: "testdata.default_fixed32", + Tag: "fixed32,209,opt,name=default_fixed32,json=defaultFixed32,def=48", +} + +var E_DefaultFixed64 = &proto.ExtensionDesc{ + ExtendedType: (*DefaultsMessage)(nil), + ExtensionType: (*uint64)(nil), + Field: 210, + Name: "testdata.default_fixed64", + Tag: "fixed64,210,opt,name=default_fixed64,json=defaultFixed64,def=49", +} + +var E_DefaultSfixed32 = &proto.ExtensionDesc{ + ExtendedType: (*DefaultsMessage)(nil), + ExtensionType: (*int32)(nil), + Field: 211, + Name: "testdata.default_sfixed32", + Tag: "fixed32,211,opt,name=default_sfixed32,json=defaultSfixed32,def=50", +} + +var E_DefaultSfixed64 = &proto.ExtensionDesc{ + ExtendedType: (*DefaultsMessage)(nil), + ExtensionType: (*int64)(nil), + Field: 212, + Name: "testdata.default_sfixed64", + Tag: "fixed64,212,opt,name=default_sfixed64,json=defaultSfixed64,def=51", +} + +var E_DefaultBool = &proto.ExtensionDesc{ + ExtendedType: (*DefaultsMessage)(nil), + ExtensionType: (*bool)(nil), + Field: 213, + Name: "testdata.default_bool", + Tag: "varint,213,opt,name=default_bool,json=defaultBool,def=1", +} + +var E_DefaultString = &proto.ExtensionDesc{ + ExtendedType: (*DefaultsMessage)(nil), + ExtensionType: (*string)(nil), + Field: 214, + Name: "testdata.default_string", + Tag: "bytes,214,opt,name=default_string,json=defaultString,def=Hello, string", +} + +var E_DefaultBytes = &proto.ExtensionDesc{ + ExtendedType: (*DefaultsMessage)(nil), + ExtensionType: ([]byte)(nil), + Field: 215, + Name: "testdata.default_bytes", + Tag: "bytes,215,opt,name=default_bytes,json=defaultBytes,def=Hello, bytes", +} + +var E_DefaultEnum = &proto.ExtensionDesc{ + ExtendedType: (*DefaultsMessage)(nil), + ExtensionType: (*DefaultsMessage_DefaultsEnum)(nil), + Field: 216, + Name: "testdata.default_enum", + Tag: "varint,216,opt,name=default_enum,json=defaultEnum,enum=testdata.DefaultsMessage_DefaultsEnum,def=1", +} + +var E_X201 = &proto.ExtensionDesc{ + ExtendedType: (*MyMessageSet)(nil), + ExtensionType: (*Empty)(nil), + Field: 201, + Name: "testdata.x201", + Tag: "bytes,201,opt,name=x201", +} + +var E_X202 = &proto.ExtensionDesc{ + ExtendedType: (*MyMessageSet)(nil), + ExtensionType: (*Empty)(nil), + Field: 202, + Name: "testdata.x202", + Tag: "bytes,202,opt,name=x202", +} + +var E_X203 = &proto.ExtensionDesc{ + ExtendedType: (*MyMessageSet)(nil), + ExtensionType: (*Empty)(nil), + Field: 203, + Name: "testdata.x203", + Tag: "bytes,203,opt,name=x203", +} + +var E_X204 = &proto.ExtensionDesc{ + ExtendedType: (*MyMessageSet)(nil), + ExtensionType: (*Empty)(nil), + Field: 204, + Name: "testdata.x204", + Tag: "bytes,204,opt,name=x204", +} + +var E_X205 = &proto.ExtensionDesc{ + ExtendedType: (*MyMessageSet)(nil), + ExtensionType: (*Empty)(nil), + Field: 205, + Name: "testdata.x205", + Tag: "bytes,205,opt,name=x205", +} + +var E_X206 = &proto.ExtensionDesc{ + ExtendedType: (*MyMessageSet)(nil), + ExtensionType: (*Empty)(nil), + Field: 206, + Name: "testdata.x206", + Tag: "bytes,206,opt,name=x206", +} + +var E_X207 = &proto.ExtensionDesc{ + ExtendedType: (*MyMessageSet)(nil), + ExtensionType: (*Empty)(nil), + Field: 207, + Name: "testdata.x207", + Tag: "bytes,207,opt,name=x207", +} + +var E_X208 = &proto.ExtensionDesc{ + ExtendedType: (*MyMessageSet)(nil), + ExtensionType: (*Empty)(nil), + Field: 208, + Name: "testdata.x208", + Tag: "bytes,208,opt,name=x208", +} + +var E_X209 = &proto.ExtensionDesc{ + ExtendedType: (*MyMessageSet)(nil), + ExtensionType: (*Empty)(nil), + Field: 209, + Name: "testdata.x209", + Tag: "bytes,209,opt,name=x209", +} + +var E_X210 = &proto.ExtensionDesc{ + ExtendedType: (*MyMessageSet)(nil), + ExtensionType: (*Empty)(nil), + Field: 210, + Name: "testdata.x210", + Tag: "bytes,210,opt,name=x210", +} + +var E_X211 = &proto.ExtensionDesc{ + ExtendedType: (*MyMessageSet)(nil), + ExtensionType: (*Empty)(nil), + Field: 211, + Name: "testdata.x211", + Tag: "bytes,211,opt,name=x211", +} + +var E_X212 = &proto.ExtensionDesc{ + ExtendedType: (*MyMessageSet)(nil), + ExtensionType: (*Empty)(nil), + Field: 212, + Name: "testdata.x212", + Tag: "bytes,212,opt,name=x212", +} + +var E_X213 = &proto.ExtensionDesc{ + ExtendedType: (*MyMessageSet)(nil), + ExtensionType: (*Empty)(nil), + Field: 213, + Name: "testdata.x213", + Tag: "bytes,213,opt,name=x213", +} + +var E_X214 = &proto.ExtensionDesc{ + ExtendedType: (*MyMessageSet)(nil), + ExtensionType: (*Empty)(nil), + Field: 214, + Name: "testdata.x214", + Tag: "bytes,214,opt,name=x214", +} + +var E_X215 = &proto.ExtensionDesc{ + ExtendedType: (*MyMessageSet)(nil), + ExtensionType: (*Empty)(nil), + Field: 215, + Name: "testdata.x215", + Tag: "bytes,215,opt,name=x215", +} + +var E_X216 = &proto.ExtensionDesc{ + ExtendedType: (*MyMessageSet)(nil), + ExtensionType: (*Empty)(nil), + Field: 216, + Name: "testdata.x216", + Tag: "bytes,216,opt,name=x216", +} + +var E_X217 = &proto.ExtensionDesc{ + ExtendedType: (*MyMessageSet)(nil), + ExtensionType: (*Empty)(nil), + Field: 217, + Name: "testdata.x217", + Tag: "bytes,217,opt,name=x217", +} + +var E_X218 = &proto.ExtensionDesc{ + ExtendedType: (*MyMessageSet)(nil), + ExtensionType: (*Empty)(nil), + Field: 218, + Name: "testdata.x218", + Tag: "bytes,218,opt,name=x218", +} + +var E_X219 = &proto.ExtensionDesc{ + ExtendedType: (*MyMessageSet)(nil), + ExtensionType: (*Empty)(nil), + Field: 219, + Name: "testdata.x219", + Tag: "bytes,219,opt,name=x219", +} + +var E_X220 = &proto.ExtensionDesc{ + ExtendedType: (*MyMessageSet)(nil), + ExtensionType: (*Empty)(nil), + Field: 220, + Name: "testdata.x220", + Tag: "bytes,220,opt,name=x220", +} + +var E_X221 = &proto.ExtensionDesc{ + ExtendedType: (*MyMessageSet)(nil), + ExtensionType: (*Empty)(nil), + Field: 221, + Name: "testdata.x221", + Tag: "bytes,221,opt,name=x221", +} + +var E_X222 = &proto.ExtensionDesc{ + ExtendedType: (*MyMessageSet)(nil), + ExtensionType: (*Empty)(nil), + Field: 222, + Name: "testdata.x222", + Tag: "bytes,222,opt,name=x222", +} + +var E_X223 = &proto.ExtensionDesc{ + ExtendedType: (*MyMessageSet)(nil), + ExtensionType: (*Empty)(nil), + Field: 223, + Name: "testdata.x223", + Tag: "bytes,223,opt,name=x223", +} + +var E_X224 = &proto.ExtensionDesc{ + ExtendedType: (*MyMessageSet)(nil), + ExtensionType: (*Empty)(nil), + Field: 224, + Name: "testdata.x224", + Tag: "bytes,224,opt,name=x224", +} + +var E_X225 = &proto.ExtensionDesc{ + ExtendedType: (*MyMessageSet)(nil), + ExtensionType: (*Empty)(nil), + Field: 225, + Name: "testdata.x225", + Tag: "bytes,225,opt,name=x225", +} + +var E_X226 = &proto.ExtensionDesc{ + ExtendedType: (*MyMessageSet)(nil), + ExtensionType: (*Empty)(nil), + Field: 226, + Name: "testdata.x226", + Tag: "bytes,226,opt,name=x226", +} + +var E_X227 = &proto.ExtensionDesc{ + ExtendedType: (*MyMessageSet)(nil), + ExtensionType: (*Empty)(nil), + Field: 227, + Name: "testdata.x227", + Tag: "bytes,227,opt,name=x227", +} + +var E_X228 = &proto.ExtensionDesc{ + ExtendedType: (*MyMessageSet)(nil), + ExtensionType: (*Empty)(nil), + Field: 228, + Name: "testdata.x228", + Tag: "bytes,228,opt,name=x228", +} + +var E_X229 = &proto.ExtensionDesc{ + ExtendedType: (*MyMessageSet)(nil), + ExtensionType: (*Empty)(nil), + Field: 229, + Name: "testdata.x229", + Tag: "bytes,229,opt,name=x229", +} + +var E_X230 = &proto.ExtensionDesc{ + ExtendedType: (*MyMessageSet)(nil), + ExtensionType: (*Empty)(nil), + Field: 230, + Name: "testdata.x230", + Tag: "bytes,230,opt,name=x230", +} + +var E_X231 = &proto.ExtensionDesc{ + ExtendedType: (*MyMessageSet)(nil), + ExtensionType: (*Empty)(nil), + Field: 231, + Name: "testdata.x231", + Tag: "bytes,231,opt,name=x231", +} + +var E_X232 = &proto.ExtensionDesc{ + ExtendedType: (*MyMessageSet)(nil), + ExtensionType: (*Empty)(nil), + Field: 232, + Name: "testdata.x232", + Tag: "bytes,232,opt,name=x232", +} + +var E_X233 = &proto.ExtensionDesc{ + ExtendedType: (*MyMessageSet)(nil), + ExtensionType: (*Empty)(nil), + Field: 233, + Name: "testdata.x233", + Tag: "bytes,233,opt,name=x233", +} + +var E_X234 = &proto.ExtensionDesc{ + ExtendedType: (*MyMessageSet)(nil), + ExtensionType: (*Empty)(nil), + Field: 234, + Name: "testdata.x234", + Tag: "bytes,234,opt,name=x234", +} + +var E_X235 = &proto.ExtensionDesc{ + ExtendedType: (*MyMessageSet)(nil), + ExtensionType: (*Empty)(nil), + Field: 235, + Name: "testdata.x235", + Tag: "bytes,235,opt,name=x235", +} + +var E_X236 = &proto.ExtensionDesc{ + ExtendedType: (*MyMessageSet)(nil), + ExtensionType: (*Empty)(nil), + Field: 236, + Name: "testdata.x236", + Tag: "bytes,236,opt,name=x236", +} + +var E_X237 = &proto.ExtensionDesc{ + ExtendedType: (*MyMessageSet)(nil), + ExtensionType: (*Empty)(nil), + Field: 237, + Name: "testdata.x237", + Tag: "bytes,237,opt,name=x237", +} + +var E_X238 = &proto.ExtensionDesc{ + ExtendedType: (*MyMessageSet)(nil), + ExtensionType: (*Empty)(nil), + Field: 238, + Name: "testdata.x238", + Tag: "bytes,238,opt,name=x238", +} + +var E_X239 = &proto.ExtensionDesc{ + ExtendedType: (*MyMessageSet)(nil), + ExtensionType: (*Empty)(nil), + Field: 239, + Name: "testdata.x239", + Tag: "bytes,239,opt,name=x239", +} + +var E_X240 = &proto.ExtensionDesc{ + ExtendedType: (*MyMessageSet)(nil), + ExtensionType: (*Empty)(nil), + Field: 240, + Name: "testdata.x240", + Tag: "bytes,240,opt,name=x240", +} + +var E_X241 = &proto.ExtensionDesc{ + ExtendedType: (*MyMessageSet)(nil), + ExtensionType: (*Empty)(nil), + Field: 241, + Name: "testdata.x241", + Tag: "bytes,241,opt,name=x241", +} + +var E_X242 = &proto.ExtensionDesc{ + ExtendedType: (*MyMessageSet)(nil), + ExtensionType: (*Empty)(nil), + Field: 242, + Name: "testdata.x242", + Tag: "bytes,242,opt,name=x242", +} + +var E_X243 = &proto.ExtensionDesc{ + ExtendedType: (*MyMessageSet)(nil), + ExtensionType: (*Empty)(nil), + Field: 243, + Name: "testdata.x243", + Tag: "bytes,243,opt,name=x243", +} + +var E_X244 = &proto.ExtensionDesc{ + ExtendedType: (*MyMessageSet)(nil), + ExtensionType: (*Empty)(nil), + Field: 244, + Name: "testdata.x244", + Tag: "bytes,244,opt,name=x244", +} + +var E_X245 = &proto.ExtensionDesc{ + ExtendedType: (*MyMessageSet)(nil), + ExtensionType: (*Empty)(nil), + Field: 245, + Name: "testdata.x245", + Tag: "bytes,245,opt,name=x245", +} + +var E_X246 = &proto.ExtensionDesc{ + ExtendedType: (*MyMessageSet)(nil), + ExtensionType: (*Empty)(nil), + Field: 246, + Name: "testdata.x246", + Tag: "bytes,246,opt,name=x246", +} + +var E_X247 = &proto.ExtensionDesc{ + ExtendedType: (*MyMessageSet)(nil), + ExtensionType: (*Empty)(nil), + Field: 247, + Name: "testdata.x247", + Tag: "bytes,247,opt,name=x247", +} + +var E_X248 = &proto.ExtensionDesc{ + ExtendedType: (*MyMessageSet)(nil), + ExtensionType: (*Empty)(nil), + Field: 248, + Name: "testdata.x248", + Tag: "bytes,248,opt,name=x248", +} + +var E_X249 = &proto.ExtensionDesc{ + ExtendedType: (*MyMessageSet)(nil), + ExtensionType: (*Empty)(nil), + Field: 249, + Name: "testdata.x249", + Tag: "bytes,249,opt,name=x249", +} + +var E_X250 = &proto.ExtensionDesc{ + ExtendedType: (*MyMessageSet)(nil), + ExtensionType: (*Empty)(nil), + Field: 250, + Name: "testdata.x250", + Tag: "bytes,250,opt,name=x250", +} + +func init() { + proto.RegisterType((*GoEnum)(nil), "testdata.GoEnum") + proto.RegisterType((*GoTestField)(nil), "testdata.GoTestField") + proto.RegisterType((*GoTest)(nil), "testdata.GoTest") + proto.RegisterType((*GoTest_RequiredGroup)(nil), "testdata.GoTest.RequiredGroup") + proto.RegisterType((*GoTest_RepeatedGroup)(nil), "testdata.GoTest.RepeatedGroup") + proto.RegisterType((*GoTest_OptionalGroup)(nil), "testdata.GoTest.OptionalGroup") + proto.RegisterType((*GoSkipTest)(nil), "testdata.GoSkipTest") + proto.RegisterType((*GoSkipTest_SkipGroup)(nil), "testdata.GoSkipTest.SkipGroup") + proto.RegisterType((*NonPackedTest)(nil), "testdata.NonPackedTest") + proto.RegisterType((*PackedTest)(nil), "testdata.PackedTest") + proto.RegisterType((*MaxTag)(nil), "testdata.MaxTag") + proto.RegisterType((*OldMessage)(nil), "testdata.OldMessage") + proto.RegisterType((*OldMessage_Nested)(nil), "testdata.OldMessage.Nested") + proto.RegisterType((*NewMessage)(nil), "testdata.NewMessage") + proto.RegisterType((*NewMessage_Nested)(nil), "testdata.NewMessage.Nested") + proto.RegisterType((*InnerMessage)(nil), "testdata.InnerMessage") + proto.RegisterType((*OtherMessage)(nil), "testdata.OtherMessage") + proto.RegisterType((*MyMessage)(nil), "testdata.MyMessage") + proto.RegisterType((*MyMessage_SomeGroup)(nil), "testdata.MyMessage.SomeGroup") + proto.RegisterType((*Ext)(nil), "testdata.Ext") + proto.RegisterType((*ComplexExtension)(nil), "testdata.ComplexExtension") + proto.RegisterType((*DefaultsMessage)(nil), "testdata.DefaultsMessage") + proto.RegisterType((*MyMessageSet)(nil), "testdata.MyMessageSet") + proto.RegisterType((*Empty)(nil), "testdata.Empty") + proto.RegisterType((*MessageList)(nil), "testdata.MessageList") + proto.RegisterType((*MessageList_Message)(nil), "testdata.MessageList.Message") + proto.RegisterType((*Strings)(nil), "testdata.Strings") + proto.RegisterType((*Defaults)(nil), "testdata.Defaults") + proto.RegisterType((*SubDefaults)(nil), "testdata.SubDefaults") + proto.RegisterType((*RepeatedEnum)(nil), "testdata.RepeatedEnum") + proto.RegisterType((*MoreRepeated)(nil), "testdata.MoreRepeated") + proto.RegisterType((*GroupOld)(nil), "testdata.GroupOld") + proto.RegisterType((*GroupOld_G)(nil), "testdata.GroupOld.G") + proto.RegisterType((*GroupNew)(nil), "testdata.GroupNew") + proto.RegisterType((*GroupNew_G)(nil), "testdata.GroupNew.G") + proto.RegisterType((*FloatingPoint)(nil), "testdata.FloatingPoint") + proto.RegisterType((*MessageWithMap)(nil), "testdata.MessageWithMap") + proto.RegisterType((*Oneof)(nil), "testdata.Oneof") + proto.RegisterType((*Oneof_F_Group)(nil), "testdata.Oneof.F_Group") + proto.RegisterType((*Communique)(nil), "testdata.Communique") + proto.RegisterEnum("testdata.FOO", FOO_name, FOO_value) + proto.RegisterEnum("testdata.GoTest_KIND", GoTest_KIND_name, GoTest_KIND_value) + proto.RegisterEnum("testdata.MyMessage_Color", MyMessage_Color_name, MyMessage_Color_value) + proto.RegisterEnum("testdata.DefaultsMessage_DefaultsEnum", DefaultsMessage_DefaultsEnum_name, DefaultsMessage_DefaultsEnum_value) + proto.RegisterEnum("testdata.Defaults_Color", Defaults_Color_name, Defaults_Color_value) + proto.RegisterEnum("testdata.RepeatedEnum_Color", RepeatedEnum_Color_name, RepeatedEnum_Color_value) + proto.RegisterExtension(E_Ext_More) + proto.RegisterExtension(E_Ext_Text) + proto.RegisterExtension(E_Ext_Number) + proto.RegisterExtension(E_Greeting) + proto.RegisterExtension(E_Complex) + proto.RegisterExtension(E_RComplex) + proto.RegisterExtension(E_NoDefaultDouble) + proto.RegisterExtension(E_NoDefaultFloat) + proto.RegisterExtension(E_NoDefaultInt32) + proto.RegisterExtension(E_NoDefaultInt64) + proto.RegisterExtension(E_NoDefaultUint32) + proto.RegisterExtension(E_NoDefaultUint64) + proto.RegisterExtension(E_NoDefaultSint32) + proto.RegisterExtension(E_NoDefaultSint64) + proto.RegisterExtension(E_NoDefaultFixed32) + proto.RegisterExtension(E_NoDefaultFixed64) + proto.RegisterExtension(E_NoDefaultSfixed32) + proto.RegisterExtension(E_NoDefaultSfixed64) + proto.RegisterExtension(E_NoDefaultBool) + proto.RegisterExtension(E_NoDefaultString) + proto.RegisterExtension(E_NoDefaultBytes) + proto.RegisterExtension(E_NoDefaultEnum) + proto.RegisterExtension(E_DefaultDouble) + proto.RegisterExtension(E_DefaultFloat) + proto.RegisterExtension(E_DefaultInt32) + proto.RegisterExtension(E_DefaultInt64) + proto.RegisterExtension(E_DefaultUint32) + proto.RegisterExtension(E_DefaultUint64) + proto.RegisterExtension(E_DefaultSint32) + proto.RegisterExtension(E_DefaultSint64) + proto.RegisterExtension(E_DefaultFixed32) + proto.RegisterExtension(E_DefaultFixed64) + proto.RegisterExtension(E_DefaultSfixed32) + proto.RegisterExtension(E_DefaultSfixed64) + proto.RegisterExtension(E_DefaultBool) + proto.RegisterExtension(E_DefaultString) + proto.RegisterExtension(E_DefaultBytes) + proto.RegisterExtension(E_DefaultEnum) + proto.RegisterExtension(E_X201) + proto.RegisterExtension(E_X202) + proto.RegisterExtension(E_X203) + proto.RegisterExtension(E_X204) + proto.RegisterExtension(E_X205) + proto.RegisterExtension(E_X206) + proto.RegisterExtension(E_X207) + proto.RegisterExtension(E_X208) + proto.RegisterExtension(E_X209) + proto.RegisterExtension(E_X210) + proto.RegisterExtension(E_X211) + proto.RegisterExtension(E_X212) + proto.RegisterExtension(E_X213) + proto.RegisterExtension(E_X214) + proto.RegisterExtension(E_X215) + proto.RegisterExtension(E_X216) + proto.RegisterExtension(E_X217) + proto.RegisterExtension(E_X218) + proto.RegisterExtension(E_X219) + proto.RegisterExtension(E_X220) + proto.RegisterExtension(E_X221) + proto.RegisterExtension(E_X222) + proto.RegisterExtension(E_X223) + proto.RegisterExtension(E_X224) + proto.RegisterExtension(E_X225) + proto.RegisterExtension(E_X226) + proto.RegisterExtension(E_X227) + proto.RegisterExtension(E_X228) + proto.RegisterExtension(E_X229) + proto.RegisterExtension(E_X230) + proto.RegisterExtension(E_X231) + proto.RegisterExtension(E_X232) + proto.RegisterExtension(E_X233) + proto.RegisterExtension(E_X234) + proto.RegisterExtension(E_X235) + proto.RegisterExtension(E_X236) + proto.RegisterExtension(E_X237) + proto.RegisterExtension(E_X238) + proto.RegisterExtension(E_X239) + proto.RegisterExtension(E_X240) + proto.RegisterExtension(E_X241) + proto.RegisterExtension(E_X242) + proto.RegisterExtension(E_X243) + proto.RegisterExtension(E_X244) + proto.RegisterExtension(E_X245) + proto.RegisterExtension(E_X246) + proto.RegisterExtension(E_X247) + proto.RegisterExtension(E_X248) + proto.RegisterExtension(E_X249) + proto.RegisterExtension(E_X250) +} + +var fileDescriptorTest = []byte{ + // 4253 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0x94, 0x7a, 0xd9, 0x77, 0x1b, 0x47, + 0x76, 0xbe, 0x1b, 0x3b, 0x0a, 0x20, 0xd1, 0x6c, 0xc9, 0x12, 0x44, 0x2d, 0x96, 0x31, 0x63, 0x5b, + 0x92, 0x6d, 0x0e, 0xd1, 0x00, 0x49, 0x09, 0x9e, 0xdf, 0x9c, 0x23, 0x4a, 0x24, 0x87, 0x67, 0x44, + 0x82, 0xbf, 0x26, 0xed, 0x39, 0xe3, 0x3c, 0xe0, 0x80, 0x62, 0x83, 0x84, 0x05, 0xa0, 0x21, 0x00, + 0x8c, 0xa5, 0xe4, 0x25, 0x2f, 0xc9, 0x6b, 0xb6, 0x97, 0xbc, 0xe6, 0x29, 0x4f, 0x49, 0xce, 0xc9, + 0x5f, 0x11, 0xdb, 0xb3, 0x7a, 0xd6, 0xac, 0x93, 0x7d, 0x99, 0xec, 0xdb, 0x4c, 0x92, 0x93, 0x73, + 0x92, 0x7b, 0x6f, 0xdd, 0xee, 0xae, 0x6e, 0xa0, 0x9b, 0x94, 0x1e, 0x4c, 0x74, 0xd5, 0xf7, 0xdd, + 0xba, 0x55, 0xfd, 0xd5, 0xbd, 0x75, 0xab, 0x2d, 0xc4, 0xc4, 0x1e, 0x4f, 0x96, 0x86, 0x23, 0x67, + 0xe2, 0x18, 0x39, 0xfc, 0x7d, 0xd4, 0x9e, 0xb4, 0x2b, 0xb7, 0x45, 0x66, 0xcb, 0xd9, 0x18, 0x9c, + 0xf6, 0x8d, 0x57, 0x44, 0xb2, 0xe3, 0x38, 0x65, 0xed, 0x66, 0xe2, 0xd6, 0xbc, 0x39, 0xb7, 0xe4, + 0x22, 0x96, 0x36, 0x9b, 0x4d, 0x0b, 0x7b, 0x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 0x0f, 0x2c, 0x00, + 0x30, 0x6d, 0xcd, 0x77, 0xa8, 0x79, 0x0a, 0xb9, 0x5a, 0xf7, 0x91, 0x45, 0x40, 0x26, 0x25, 0x72, + 0xb5, 0xee, 0x21, 0xdf, 0x12, 0xc6, 0x66, 0x6b, 0xb3, 0xfb, 0xcc, 0x3e, 0x52, 0xad, 0xce, 0x01, + 0x36, 0x6b, 0xe9, 0x1d, 0xee, 0x98, 0x81, 0x56, 0x2d, 0xcf, 0x03, 0x3a, 0xe3, 0xa2, 0x15, 0xdb, + 0x77, 0xc4, 0xc2, 0x66, 0xeb, 0xdd, 0x6e, 0xd0, 0xe1, 0x12, 0x80, 0xe7, 0xac, 0x52, 0x47, 0xb6, + 0x4f, 0x63, 0x55, 0xc3, 0x3a, 0x60, 0x53, 0x8c, 0x55, 0xec, 0xd2, 0xec, 0x36, 0x7b, 0x4e, 0x7b, + 0xe2, 0x43, 0x17, 0x00, 0x9a, 0x80, 0xd9, 0x51, 0x73, 0xd0, 0xea, 0x43, 0xe7, 0x14, 0x24, 0xe3, + 0x43, 0x0d, 0x80, 0x6a, 0x60, 0x55, 0xb6, 0x07, 0xb1, 0xfb, 0x93, 0x51, 0x77, 0x70, 0xec, 0x63, + 0x2f, 0x90, 0x7e, 0x4b, 0x1d, 0xd9, 0x1e, 0xf4, 0x60, 0xfd, 0x39, 0xbc, 0x5c, 0x1f, 0x6a, 0x03, + 0xb4, 0x08, 0x1e, 0x50, 0x73, 0xc8, 0x6a, 0x68, 0x0d, 0x3a, 0x00, 0x5d, 0x40, 0xab, 0x33, 0xd6, + 0x60, 0x3f, 0xb4, 0x06, 0xc7, 0x80, 0x35, 0x18, 0xab, 0xac, 0x81, 0xaa, 0x19, 0x29, 0xc4, 0xf2, + 0x45, 0xd0, 0xab, 0xaf, 0x19, 0xd9, 0x18, 0xd4, 0x0c, 0x03, 0x5f, 0x06, 0xa0, 0xa2, 0x99, 0x10, + 0x92, 0x06, 0x67, 0xe4, 0x25, 0x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0x6f, 0x31, + 0x6c, 0xd6, 0x5a, 0x3d, 0x5a, 0x6b, 0xff, 0x1e, 0xc3, 0x66, 0xad, 0xd5, 0xa3, 0xb5, 0xf6, 0x1f, + 0x31, 0x6c, 0xd6, 0x5a, 0x3d, 0x5a, 0x6b, 0x3f, 0x8e, 0x61, 0xb3, 0xd6, 0xea, 0xd1, 0x5a, 0xfb, + 0x49, 0x0c, 0x9b, 0xb5, 0x56, 0x8f, 0xd6, 0xda, 0x7f, 0xc6, 0xb0, 0x59, 0x6b, 0xf5, 0x68, 0xad, + 0xfd, 0x57, 0x0c, 0x9b, 0xb5, 0xb6, 0x12, 0xad, 0xb5, 0xff, 0x8e, 0x66, 0xaf, 0x2c, 0xff, 0x5f, + 0x00, 0x00, 0x00, 0xff, 0xff, 0x53, 0x6a, 0x15, 0xef, 0x13, 0x38, 0x00, 0x00, +} diff --git a/vendor/github.com/gogo/protobuf/proto/testdata/test.pb.go.golden b/vendor/github.com/gogo/protobuf/proto/testdata/test.pb.go.golden new file mode 100644 index 000000000..0387853d5 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/proto/testdata/test.pb.go.golden @@ -0,0 +1,1737 @@ +// Code generated by protoc-gen-gogo. +// source: test.proto +// DO NOT EDIT! + +package testdata + +import proto "github.com/gogo/protobuf/proto" +import json "encoding/json" +import math "math" + +import () + +// Reference proto, json, and math imports to suppress error if they are not otherwise used. +var _ = proto.Marshal +var _ = &json.SyntaxError{} +var _ = math.Inf + +type FOO int32 + +const ( + FOO_FOO1 FOO = 1 +) + +var FOO_name = map[int32]string{ + 1: "FOO1", +} +var FOO_value = map[string]int32{ + "FOO1": 1, +} + +func (x FOO) Enum() *FOO { + p := new(FOO) + *p = x + return p +} +func (x FOO) String() string { + return proto.EnumName(FOO_name, int32(x)) +} +func (x FOO) MarshalJSON() ([]byte, error) { + return json.Marshal(x.String()) +} +func (x *FOO) UnmarshalJSON(data []byte) error { + value, err := proto.UnmarshalJSONEnum(FOO_value, data, "FOO") + if err != nil { + return err + } + *x = FOO(value) + return nil +} + +type GoTest_KIND int32 + +const ( + GoTest_VOID GoTest_KIND = 0 + GoTest_BOOL GoTest_KIND = 1 + GoTest_BYTES GoTest_KIND = 2 + GoTest_FINGERPRINT GoTest_KIND = 3 + GoTest_FLOAT GoTest_KIND = 4 + GoTest_INT GoTest_KIND = 5 + GoTest_STRING GoTest_KIND = 6 + GoTest_TIME GoTest_KIND = 7 + GoTest_TUPLE GoTest_KIND = 8 + GoTest_ARRAY GoTest_KIND = 9 + GoTest_MAP GoTest_KIND = 10 + GoTest_TABLE GoTest_KIND = 11 + GoTest_FUNCTION GoTest_KIND = 12 +) + +var GoTest_KIND_name = map[int32]string{ + 0: "VOID", + 1: "BOOL", + 2: "BYTES", + 3: "FINGERPRINT", + 4: "FLOAT", + 5: "INT", + 6: "STRING", + 7: "TIME", + 8: "TUPLE", + 9: "ARRAY", + 10: "MAP", + 11: "TABLE", + 12: "FUNCTION", +} +var GoTest_KIND_value = map[string]int32{ + "VOID": 0, + "BOOL": 1, + "BYTES": 2, + "FINGERPRINT": 3, + "FLOAT": 4, + "INT": 5, + "STRING": 6, + "TIME": 7, + "TUPLE": 8, + "ARRAY": 9, + "MAP": 10, + "TABLE": 11, + "FUNCTION": 12, +} + +func (x GoTest_KIND) Enum() *GoTest_KIND { + p := new(GoTest_KIND) + *p = x + return p +} +func (x GoTest_KIND) String() string { + return proto.EnumName(GoTest_KIND_name, int32(x)) +} +func (x GoTest_KIND) MarshalJSON() ([]byte, error) { + return json.Marshal(x.String()) +} +func (x *GoTest_KIND) UnmarshalJSON(data []byte) error { + value, err := proto.UnmarshalJSONEnum(GoTest_KIND_value, data, "GoTest_KIND") + if err != nil { + return err + } + *x = GoTest_KIND(value) + return nil +} + +type MyMessage_Color int32 + +const ( + MyMessage_RED MyMessage_Color = 0 + MyMessage_GREEN MyMessage_Color = 1 + MyMessage_BLUE MyMessage_Color = 2 +) + +var MyMessage_Color_name = map[int32]string{ + 0: "RED", + 1: "GREEN", + 2: "BLUE", +} +var MyMessage_Color_value = map[string]int32{ + "RED": 0, + "GREEN": 1, + "BLUE": 2, +} + +func (x MyMessage_Color) Enum() *MyMessage_Color { + p := new(MyMessage_Color) + *p = x + return p +} +func (x MyMessage_Color) String() string { + return proto.EnumName(MyMessage_Color_name, int32(x)) +} +func (x MyMessage_Color) MarshalJSON() ([]byte, error) { + return json.Marshal(x.String()) +} +func (x *MyMessage_Color) UnmarshalJSON(data []byte) error { + value, err := proto.UnmarshalJSONEnum(MyMessage_Color_value, data, "MyMessage_Color") + if err != nil { + return err + } + *x = MyMessage_Color(value) + return nil +} + +type Defaults_Color int32 + +const ( + Defaults_RED Defaults_Color = 0 + Defaults_GREEN Defaults_Color = 1 + Defaults_BLUE Defaults_Color = 2 +) + +var Defaults_Color_name = map[int32]string{ + 0: "RED", + 1: "GREEN", + 2: "BLUE", +} +var Defaults_Color_value = map[string]int32{ + "RED": 0, + "GREEN": 1, + "BLUE": 2, +} + +func (x Defaults_Color) Enum() *Defaults_Color { + p := new(Defaults_Color) + *p = x + return p +} +func (x Defaults_Color) String() string { + return proto.EnumName(Defaults_Color_name, int32(x)) +} +func (x Defaults_Color) MarshalJSON() ([]byte, error) { + return json.Marshal(x.String()) +} +func (x *Defaults_Color) UnmarshalJSON(data []byte) error { + value, err := proto.UnmarshalJSONEnum(Defaults_Color_value, data, "Defaults_Color") + if err != nil { + return err + } + *x = Defaults_Color(value) + return nil +} + +type RepeatedEnum_Color int32 + +const ( + RepeatedEnum_RED RepeatedEnum_Color = 1 +) + +var RepeatedEnum_Color_name = map[int32]string{ + 1: "RED", +} +var RepeatedEnum_Color_value = map[string]int32{ + "RED": 1, +} + +func (x RepeatedEnum_Color) Enum() *RepeatedEnum_Color { + p := new(RepeatedEnum_Color) + *p = x + return p +} +func (x RepeatedEnum_Color) String() string { + return proto.EnumName(RepeatedEnum_Color_name, int32(x)) +} +func (x RepeatedEnum_Color) MarshalJSON() ([]byte, error) { + return json.Marshal(x.String()) +} +func (x *RepeatedEnum_Color) UnmarshalJSON(data []byte) error { + value, err := proto.UnmarshalJSONEnum(RepeatedEnum_Color_value, data, "RepeatedEnum_Color") + if err != nil { + return err + } + *x = RepeatedEnum_Color(value) + return nil +} + +type GoEnum struct { + Foo *FOO `protobuf:"varint,1,req,name=foo,enum=testdata.FOO" json:"foo,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *GoEnum) Reset() { *m = GoEnum{} } +func (m *GoEnum) String() string { return proto.CompactTextString(m) } +func (*GoEnum) ProtoMessage() {} + +func (m *GoEnum) GetFoo() FOO { + if m != nil && m.Foo != nil { + return *m.Foo + } + return 0 +} + +type GoTestField struct { + Label *string `protobuf:"bytes,1,req" json:"Label,omitempty"` + Type *string `protobuf:"bytes,2,req" json:"Type,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *GoTestField) Reset() { *m = GoTestField{} } +func (m *GoTestField) String() string { return proto.CompactTextString(m) } +func (*GoTestField) ProtoMessage() {} + +func (m *GoTestField) GetLabel() string { + if m != nil && m.Label != nil { + return *m.Label + } + return "" +} + +func (m *GoTestField) GetType() string { + if m != nil && m.Type != nil { + return *m.Type + } + return "" +} + +type GoTest struct { + Kind *GoTest_KIND `protobuf:"varint,1,req,enum=testdata.GoTest_KIND" json:"Kind,omitempty"` + Table *string `protobuf:"bytes,2,opt" json:"Table,omitempty"` + Param *int32 `protobuf:"varint,3,opt" json:"Param,omitempty"` + RequiredField *GoTestField `protobuf:"bytes,4,req" json:"RequiredField,omitempty"` + RepeatedField []*GoTestField `protobuf:"bytes,5,rep" json:"RepeatedField,omitempty"` + OptionalField *GoTestField `protobuf:"bytes,6,opt" json:"OptionalField,omitempty"` + F_BoolRequired *bool `protobuf:"varint,10,req,name=F_Bool_required" json:"F_Bool_required,omitempty"` + F_Int32Required *int32 `protobuf:"varint,11,req,name=F_Int32_required" json:"F_Int32_required,omitempty"` + F_Int64Required *int64 `protobuf:"varint,12,req,name=F_Int64_required" json:"F_Int64_required,omitempty"` + F_Fixed32Required *uint32 `protobuf:"fixed32,13,req,name=F_Fixed32_required" json:"F_Fixed32_required,omitempty"` + F_Fixed64Required *uint64 `protobuf:"fixed64,14,req,name=F_Fixed64_required" json:"F_Fixed64_required,omitempty"` + F_Uint32Required *uint32 `protobuf:"varint,15,req,name=F_Uint32_required" json:"F_Uint32_required,omitempty"` + F_Uint64Required *uint64 `protobuf:"varint,16,req,name=F_Uint64_required" json:"F_Uint64_required,omitempty"` + F_FloatRequired *float32 `protobuf:"fixed32,17,req,name=F_Float_required" json:"F_Float_required,omitempty"` + F_DoubleRequired *float64 `protobuf:"fixed64,18,req,name=F_Double_required" json:"F_Double_required,omitempty"` + F_StringRequired *string `protobuf:"bytes,19,req,name=F_String_required" json:"F_String_required,omitempty"` + F_BytesRequired []byte `protobuf:"bytes,101,req,name=F_Bytes_required" json:"F_Bytes_required,omitempty"` + F_Sint32Required *int32 `protobuf:"zigzag32,102,req,name=F_Sint32_required" json:"F_Sint32_required,omitempty"` + F_Sint64Required *int64 `protobuf:"zigzag64,103,req,name=F_Sint64_required" json:"F_Sint64_required,omitempty"` + F_BoolRepeated []bool `protobuf:"varint,20,rep,name=F_Bool_repeated" json:"F_Bool_repeated,omitempty"` + F_Int32Repeated []int32 `protobuf:"varint,21,rep,name=F_Int32_repeated" json:"F_Int32_repeated,omitempty"` + F_Int64Repeated []int64 `protobuf:"varint,22,rep,name=F_Int64_repeated" json:"F_Int64_repeated,omitempty"` + F_Fixed32Repeated []uint32 `protobuf:"fixed32,23,rep,name=F_Fixed32_repeated" json:"F_Fixed32_repeated,omitempty"` + F_Fixed64Repeated []uint64 `protobuf:"fixed64,24,rep,name=F_Fixed64_repeated" json:"F_Fixed64_repeated,omitempty"` + F_Uint32Repeated []uint32 `protobuf:"varint,25,rep,name=F_Uint32_repeated" json:"F_Uint32_repeated,omitempty"` + F_Uint64Repeated []uint64 `protobuf:"varint,26,rep,name=F_Uint64_repeated" json:"F_Uint64_repeated,omitempty"` + F_FloatRepeated []float32 `protobuf:"fixed32,27,rep,name=F_Float_repeated" json:"F_Float_repeated,omitempty"` + F_DoubleRepeated []float64 `protobuf:"fixed64,28,rep,name=F_Double_repeated" json:"F_Double_repeated,omitempty"` + F_StringRepeated []string `protobuf:"bytes,29,rep,name=F_String_repeated" json:"F_String_repeated,omitempty"` + F_BytesRepeated [][]byte `protobuf:"bytes,201,rep,name=F_Bytes_repeated" json:"F_Bytes_repeated,omitempty"` + F_Sint32Repeated []int32 `protobuf:"zigzag32,202,rep,name=F_Sint32_repeated" json:"F_Sint32_repeated,omitempty"` + F_Sint64Repeated []int64 `protobuf:"zigzag64,203,rep,name=F_Sint64_repeated" json:"F_Sint64_repeated,omitempty"` + F_BoolOptional *bool `protobuf:"varint,30,opt,name=F_Bool_optional" json:"F_Bool_optional,omitempty"` + F_Int32Optional *int32 `protobuf:"varint,31,opt,name=F_Int32_optional" json:"F_Int32_optional,omitempty"` + F_Int64Optional *int64 `protobuf:"varint,32,opt,name=F_Int64_optional" json:"F_Int64_optional,omitempty"` + F_Fixed32Optional *uint32 `protobuf:"fixed32,33,opt,name=F_Fixed32_optional" json:"F_Fixed32_optional,omitempty"` + F_Fixed64Optional *uint64 `protobuf:"fixed64,34,opt,name=F_Fixed64_optional" json:"F_Fixed64_optional,omitempty"` + F_Uint32Optional *uint32 `protobuf:"varint,35,opt,name=F_Uint32_optional" json:"F_Uint32_optional,omitempty"` + F_Uint64Optional *uint64 `protobuf:"varint,36,opt,name=F_Uint64_optional" json:"F_Uint64_optional,omitempty"` + F_FloatOptional *float32 `protobuf:"fixed32,37,opt,name=F_Float_optional" json:"F_Float_optional,omitempty"` + F_DoubleOptional *float64 `protobuf:"fixed64,38,opt,name=F_Double_optional" json:"F_Double_optional,omitempty"` + F_StringOptional *string `protobuf:"bytes,39,opt,name=F_String_optional" json:"F_String_optional,omitempty"` + F_BytesOptional []byte `protobuf:"bytes,301,opt,name=F_Bytes_optional" json:"F_Bytes_optional,omitempty"` + F_Sint32Optional *int32 `protobuf:"zigzag32,302,opt,name=F_Sint32_optional" json:"F_Sint32_optional,omitempty"` + F_Sint64Optional *int64 `protobuf:"zigzag64,303,opt,name=F_Sint64_optional" json:"F_Sint64_optional,omitempty"` + F_BoolDefaulted *bool `protobuf:"varint,40,opt,name=F_Bool_defaulted,def=1" json:"F_Bool_defaulted,omitempty"` + F_Int32Defaulted *int32 `protobuf:"varint,41,opt,name=F_Int32_defaulted,def=32" json:"F_Int32_defaulted,omitempty"` + F_Int64Defaulted *int64 `protobuf:"varint,42,opt,name=F_Int64_defaulted,def=64" json:"F_Int64_defaulted,omitempty"` + F_Fixed32Defaulted *uint32 `protobuf:"fixed32,43,opt,name=F_Fixed32_defaulted,def=320" json:"F_Fixed32_defaulted,omitempty"` + F_Fixed64Defaulted *uint64 `protobuf:"fixed64,44,opt,name=F_Fixed64_defaulted,def=640" json:"F_Fixed64_defaulted,omitempty"` + F_Uint32Defaulted *uint32 `protobuf:"varint,45,opt,name=F_Uint32_defaulted,def=3200" json:"F_Uint32_defaulted,omitempty"` + F_Uint64Defaulted *uint64 `protobuf:"varint,46,opt,name=F_Uint64_defaulted,def=6400" json:"F_Uint64_defaulted,omitempty"` + F_FloatDefaulted *float32 `protobuf:"fixed32,47,opt,name=F_Float_defaulted,def=314159" json:"F_Float_defaulted,omitempty"` + F_DoubleDefaulted *float64 `protobuf:"fixed64,48,opt,name=F_Double_defaulted,def=271828" json:"F_Double_defaulted,omitempty"` + F_StringDefaulted *string `protobuf:"bytes,49,opt,name=F_String_defaulted,def=hello, \"world!\"\n" json:"F_String_defaulted,omitempty"` + F_BytesDefaulted []byte `protobuf:"bytes,401,opt,name=F_Bytes_defaulted,def=Bignose" json:"F_Bytes_defaulted,omitempty"` + F_Sint32Defaulted *int32 `protobuf:"zigzag32,402,opt,name=F_Sint32_defaulted,def=-32" json:"F_Sint32_defaulted,omitempty"` + F_Sint64Defaulted *int64 `protobuf:"zigzag64,403,opt,name=F_Sint64_defaulted,def=-64" json:"F_Sint64_defaulted,omitempty"` + F_BoolRepeatedPacked []bool `protobuf:"varint,50,rep,packed,name=F_Bool_repeated_packed" json:"F_Bool_repeated_packed,omitempty"` + F_Int32RepeatedPacked []int32 `protobuf:"varint,51,rep,packed,name=F_Int32_repeated_packed" json:"F_Int32_repeated_packed,omitempty"` + F_Int64RepeatedPacked []int64 `protobuf:"varint,52,rep,packed,name=F_Int64_repeated_packed" json:"F_Int64_repeated_packed,omitempty"` + F_Fixed32RepeatedPacked []uint32 `protobuf:"fixed32,53,rep,packed,name=F_Fixed32_repeated_packed" json:"F_Fixed32_repeated_packed,omitempty"` + F_Fixed64RepeatedPacked []uint64 `protobuf:"fixed64,54,rep,packed,name=F_Fixed64_repeated_packed" json:"F_Fixed64_repeated_packed,omitempty"` + F_Uint32RepeatedPacked []uint32 `protobuf:"varint,55,rep,packed,name=F_Uint32_repeated_packed" json:"F_Uint32_repeated_packed,omitempty"` + F_Uint64RepeatedPacked []uint64 `protobuf:"varint,56,rep,packed,name=F_Uint64_repeated_packed" json:"F_Uint64_repeated_packed,omitempty"` + F_FloatRepeatedPacked []float32 `protobuf:"fixed32,57,rep,packed,name=F_Float_repeated_packed" json:"F_Float_repeated_packed,omitempty"` + F_DoubleRepeatedPacked []float64 `protobuf:"fixed64,58,rep,packed,name=F_Double_repeated_packed" json:"F_Double_repeated_packed,omitempty"` + F_Sint32RepeatedPacked []int32 `protobuf:"zigzag32,502,rep,packed,name=F_Sint32_repeated_packed" json:"F_Sint32_repeated_packed,omitempty"` + F_Sint64RepeatedPacked []int64 `protobuf:"zigzag64,503,rep,packed,name=F_Sint64_repeated_packed" json:"F_Sint64_repeated_packed,omitempty"` + Requiredgroup *GoTest_RequiredGroup `protobuf:"group,70,req,name=RequiredGroup" json:"requiredgroup,omitempty"` + Repeatedgroup []*GoTest_RepeatedGroup `protobuf:"group,80,rep,name=RepeatedGroup" json:"repeatedgroup,omitempty"` + Optionalgroup *GoTest_OptionalGroup `protobuf:"group,90,opt,name=OptionalGroup" json:"optionalgroup,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *GoTest) Reset() { *m = GoTest{} } +func (m *GoTest) String() string { return proto.CompactTextString(m) } +func (*GoTest) ProtoMessage() {} + +const Default_GoTest_F_BoolDefaulted bool = true +const Default_GoTest_F_Int32Defaulted int32 = 32 +const Default_GoTest_F_Int64Defaulted int64 = 64 +const Default_GoTest_F_Fixed32Defaulted uint32 = 320 +const Default_GoTest_F_Fixed64Defaulted uint64 = 640 +const Default_GoTest_F_Uint32Defaulted uint32 = 3200 +const Default_GoTest_F_Uint64Defaulted uint64 = 6400 +const Default_GoTest_F_FloatDefaulted float32 = 314159 +const Default_GoTest_F_DoubleDefaulted float64 = 271828 +const Default_GoTest_F_StringDefaulted string = "hello, \"world!\"\n" + +var Default_GoTest_F_BytesDefaulted []byte = []byte("Bignose") + +const Default_GoTest_F_Sint32Defaulted int32 = -32 +const Default_GoTest_F_Sint64Defaulted int64 = -64 + +func (m *GoTest) GetKind() GoTest_KIND { + if m != nil && m.Kind != nil { + return *m.Kind + } + return 0 +} + +func (m *GoTest) GetTable() string { + if m != nil && m.Table != nil { + return *m.Table + } + return "" +} + +func (m *GoTest) GetParam() int32 { + if m != nil && m.Param != nil { + return *m.Param + } + return 0 +} + +func (m *GoTest) GetRequiredField() *GoTestField { + if m != nil { + return m.RequiredField + } + return nil +} + +func (m *GoTest) GetRepeatedField() []*GoTestField { + if m != nil { + return m.RepeatedField + } + return nil +} + +func (m *GoTest) GetOptionalField() *GoTestField { + if m != nil { + return m.OptionalField + } + return nil +} + +func (m *GoTest) GetF_BoolRequired() bool { + if m != nil && m.F_BoolRequired != nil { + return *m.F_BoolRequired + } + return false +} + +func (m *GoTest) GetF_Int32Required() int32 { + if m != nil && m.F_Int32Required != nil { + return *m.F_Int32Required + } + return 0 +} + +func (m *GoTest) GetF_Int64Required() int64 { + if m != nil && m.F_Int64Required != nil { + return *m.F_Int64Required + } + return 0 +} + +func (m *GoTest) GetF_Fixed32Required() uint32 { + if m != nil && m.F_Fixed32Required != nil { + return *m.F_Fixed32Required + } + return 0 +} + +func (m *GoTest) GetF_Fixed64Required() uint64 { + if m != nil && m.F_Fixed64Required != nil { + return *m.F_Fixed64Required + } + return 0 +} + +func (m *GoTest) GetF_Uint32Required() uint32 { + if m != nil && m.F_Uint32Required != nil { + return *m.F_Uint32Required + } + return 0 +} + +func (m *GoTest) GetF_Uint64Required() uint64 { + if m != nil && m.F_Uint64Required != nil { + return *m.F_Uint64Required + } + return 0 +} + +func (m *GoTest) GetF_FloatRequired() float32 { + if m != nil && m.F_FloatRequired != nil { + return *m.F_FloatRequired + } + return 0 +} + +func (m *GoTest) GetF_DoubleRequired() float64 { + if m != nil && m.F_DoubleRequired != nil { + return *m.F_DoubleRequired + } + return 0 +} + +func (m *GoTest) GetF_StringRequired() string { + if m != nil && m.F_StringRequired != nil { + return *m.F_StringRequired + } + return "" +} + +func (m *GoTest) GetF_BytesRequired() []byte { + if m != nil { + return m.F_BytesRequired + } + return nil +} + +func (m *GoTest) GetF_Sint32Required() int32 { + if m != nil && m.F_Sint32Required != nil { + return *m.F_Sint32Required + } + return 0 +} + +func (m *GoTest) GetF_Sint64Required() int64 { + if m != nil && m.F_Sint64Required != nil { + return *m.F_Sint64Required + } + return 0 +} + +func (m *GoTest) GetF_BoolRepeated() []bool { + if m != nil { + return m.F_BoolRepeated + } + return nil +} + +func (m *GoTest) GetF_Int32Repeated() []int32 { + if m != nil { + return m.F_Int32Repeated + } + return nil +} + +func (m *GoTest) GetF_Int64Repeated() []int64 { + if m != nil { + return m.F_Int64Repeated + } + return nil +} + +func (m *GoTest) GetF_Fixed32Repeated() []uint32 { + if m != nil { + return m.F_Fixed32Repeated + } + return nil +} + +func (m *GoTest) GetF_Fixed64Repeated() []uint64 { + if m != nil { + return m.F_Fixed64Repeated + } + return nil +} + +func (m *GoTest) GetF_Uint32Repeated() []uint32 { + if m != nil { + return m.F_Uint32Repeated + } + return nil +} + +func (m *GoTest) GetF_Uint64Repeated() []uint64 { + if m != nil { + return m.F_Uint64Repeated + } + return nil +} + +func (m *GoTest) GetF_FloatRepeated() []float32 { + if m != nil { + return m.F_FloatRepeated + } + return nil +} + +func (m *GoTest) GetF_DoubleRepeated() []float64 { + if m != nil { + return m.F_DoubleRepeated + } + return nil +} + +func (m *GoTest) GetF_StringRepeated() []string { + if m != nil { + return m.F_StringRepeated + } + return nil +} + +func (m *GoTest) GetF_BytesRepeated() [][]byte { + if m != nil { + return m.F_BytesRepeated + } + return nil +} + +func (m *GoTest) GetF_Sint32Repeated() []int32 { + if m != nil { + return m.F_Sint32Repeated + } + return nil +} + +func (m *GoTest) GetF_Sint64Repeated() []int64 { + if m != nil { + return m.F_Sint64Repeated + } + return nil +} + +func (m *GoTest) GetF_BoolOptional() bool { + if m != nil && m.F_BoolOptional != nil { + return *m.F_BoolOptional + } + return false +} + +func (m *GoTest) GetF_Int32Optional() int32 { + if m != nil && m.F_Int32Optional != nil { + return *m.F_Int32Optional + } + return 0 +} + +func (m *GoTest) GetF_Int64Optional() int64 { + if m != nil && m.F_Int64Optional != nil { + return *m.F_Int64Optional + } + return 0 +} + +func (m *GoTest) GetF_Fixed32Optional() uint32 { + if m != nil && m.F_Fixed32Optional != nil { + return *m.F_Fixed32Optional + } + return 0 +} + +func (m *GoTest) GetF_Fixed64Optional() uint64 { + if m != nil && m.F_Fixed64Optional != nil { + return *m.F_Fixed64Optional + } + return 0 +} + +func (m *GoTest) GetF_Uint32Optional() uint32 { + if m != nil && m.F_Uint32Optional != nil { + return *m.F_Uint32Optional + } + return 0 +} + +func (m *GoTest) GetF_Uint64Optional() uint64 { + if m != nil && m.F_Uint64Optional != nil { + return *m.F_Uint64Optional + } + return 0 +} + +func (m *GoTest) GetF_FloatOptional() float32 { + if m != nil && m.F_FloatOptional != nil { + return *m.F_FloatOptional + } + return 0 +} + +func (m *GoTest) GetF_DoubleOptional() float64 { + if m != nil && m.F_DoubleOptional != nil { + return *m.F_DoubleOptional + } + return 0 +} + +func (m *GoTest) GetF_StringOptional() string { + if m != nil && m.F_StringOptional != nil { + return *m.F_StringOptional + } + return "" +} + +func (m *GoTest) GetF_BytesOptional() []byte { + if m != nil { + return m.F_BytesOptional + } + return nil +} + +func (m *GoTest) GetF_Sint32Optional() int32 { + if m != nil && m.F_Sint32Optional != nil { + return *m.F_Sint32Optional + } + return 0 +} + +func (m *GoTest) GetF_Sint64Optional() int64 { + if m != nil && m.F_Sint64Optional != nil { + return *m.F_Sint64Optional + } + return 0 +} + +func (m *GoTest) GetF_BoolDefaulted() bool { + if m != nil && m.F_BoolDefaulted != nil { + return *m.F_BoolDefaulted + } + return Default_GoTest_F_BoolDefaulted +} + +func (m *GoTest) GetF_Int32Defaulted() int32 { + if m != nil && m.F_Int32Defaulted != nil { + return *m.F_Int32Defaulted + } + return Default_GoTest_F_Int32Defaulted +} + +func (m *GoTest) GetF_Int64Defaulted() int64 { + if m != nil && m.F_Int64Defaulted != nil { + return *m.F_Int64Defaulted + } + return Default_GoTest_F_Int64Defaulted +} + +func (m *GoTest) GetF_Fixed32Defaulted() uint32 { + if m != nil && m.F_Fixed32Defaulted != nil { + return *m.F_Fixed32Defaulted + } + return Default_GoTest_F_Fixed32Defaulted +} + +func (m *GoTest) GetF_Fixed64Defaulted() uint64 { + if m != nil && m.F_Fixed64Defaulted != nil { + return *m.F_Fixed64Defaulted + } + return Default_GoTest_F_Fixed64Defaulted +} + +func (m *GoTest) GetF_Uint32Defaulted() uint32 { + if m != nil && m.F_Uint32Defaulted != nil { + return *m.F_Uint32Defaulted + } + return Default_GoTest_F_Uint32Defaulted +} + +func (m *GoTest) GetF_Uint64Defaulted() uint64 { + if m != nil && m.F_Uint64Defaulted != nil { + return *m.F_Uint64Defaulted + } + return Default_GoTest_F_Uint64Defaulted +} + +func (m *GoTest) GetF_FloatDefaulted() float32 { + if m != nil && m.F_FloatDefaulted != nil { + return *m.F_FloatDefaulted + } + return Default_GoTest_F_FloatDefaulted +} + +func (m *GoTest) GetF_DoubleDefaulted() float64 { + if m != nil && m.F_DoubleDefaulted != nil { + return *m.F_DoubleDefaulted + } + return Default_GoTest_F_DoubleDefaulted +} + +func (m *GoTest) GetF_StringDefaulted() string { + if m != nil && m.F_StringDefaulted != nil { + return *m.F_StringDefaulted + } + return Default_GoTest_F_StringDefaulted +} + +func (m *GoTest) GetF_BytesDefaulted() []byte { + if m != nil && m.F_BytesDefaulted != nil { + return m.F_BytesDefaulted + } + return append([]byte(nil), Default_GoTest_F_BytesDefaulted...) +} + +func (m *GoTest) GetF_Sint32Defaulted() int32 { + if m != nil && m.F_Sint32Defaulted != nil { + return *m.F_Sint32Defaulted + } + return Default_GoTest_F_Sint32Defaulted +} + +func (m *GoTest) GetF_Sint64Defaulted() int64 { + if m != nil && m.F_Sint64Defaulted != nil { + return *m.F_Sint64Defaulted + } + return Default_GoTest_F_Sint64Defaulted +} + +func (m *GoTest) GetF_BoolRepeatedPacked() []bool { + if m != nil { + return m.F_BoolRepeatedPacked + } + return nil +} + +func (m *GoTest) GetF_Int32RepeatedPacked() []int32 { + if m != nil { + return m.F_Int32RepeatedPacked + } + return nil +} + +func (m *GoTest) GetF_Int64RepeatedPacked() []int64 { + if m != nil { + return m.F_Int64RepeatedPacked + } + return nil +} + +func (m *GoTest) GetF_Fixed32RepeatedPacked() []uint32 { + if m != nil { + return m.F_Fixed32RepeatedPacked + } + return nil +} + +func (m *GoTest) GetF_Fixed64RepeatedPacked() []uint64 { + if m != nil { + return m.F_Fixed64RepeatedPacked + } + return nil +} + +func (m *GoTest) GetF_Uint32RepeatedPacked() []uint32 { + if m != nil { + return m.F_Uint32RepeatedPacked + } + return nil +} + +func (m *GoTest) GetF_Uint64RepeatedPacked() []uint64 { + if m != nil { + return m.F_Uint64RepeatedPacked + } + return nil +} + +func (m *GoTest) GetF_FloatRepeatedPacked() []float32 { + if m != nil { + return m.F_FloatRepeatedPacked + } + return nil +} + +func (m *GoTest) GetF_DoubleRepeatedPacked() []float64 { + if m != nil { + return m.F_DoubleRepeatedPacked + } + return nil +} + +func (m *GoTest) GetF_Sint32RepeatedPacked() []int32 { + if m != nil { + return m.F_Sint32RepeatedPacked + } + return nil +} + +func (m *GoTest) GetF_Sint64RepeatedPacked() []int64 { + if m != nil { + return m.F_Sint64RepeatedPacked + } + return nil +} + +func (m *GoTest) GetRequiredgroup() *GoTest_RequiredGroup { + if m != nil { + return m.Requiredgroup + } + return nil +} + +func (m *GoTest) GetRepeatedgroup() []*GoTest_RepeatedGroup { + if m != nil { + return m.Repeatedgroup + } + return nil +} + +func (m *GoTest) GetOptionalgroup() *GoTest_OptionalGroup { + if m != nil { + return m.Optionalgroup + } + return nil +} + +type GoTest_RequiredGroup struct { + RequiredField *string `protobuf:"bytes,71,req" json:"RequiredField,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *GoTest_RequiredGroup) Reset() { *m = GoTest_RequiredGroup{} } + +func (m *GoTest_RequiredGroup) GetRequiredField() string { + if m != nil && m.RequiredField != nil { + return *m.RequiredField + } + return "" +} + +type GoTest_RepeatedGroup struct { + RequiredField *string `protobuf:"bytes,81,req" json:"RequiredField,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *GoTest_RepeatedGroup) Reset() { *m = GoTest_RepeatedGroup{} } + +func (m *GoTest_RepeatedGroup) GetRequiredField() string { + if m != nil && m.RequiredField != nil { + return *m.RequiredField + } + return "" +} + +type GoTest_OptionalGroup struct { + RequiredField *string `protobuf:"bytes,91,req" json:"RequiredField,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *GoTest_OptionalGroup) Reset() { *m = GoTest_OptionalGroup{} } + +func (m *GoTest_OptionalGroup) GetRequiredField() string { + if m != nil && m.RequiredField != nil { + return *m.RequiredField + } + return "" +} + +type GoSkipTest struct { + SkipInt32 *int32 `protobuf:"varint,11,req,name=skip_int32" json:"skip_int32,omitempty"` + SkipFixed32 *uint32 `protobuf:"fixed32,12,req,name=skip_fixed32" json:"skip_fixed32,omitempty"` + SkipFixed64 *uint64 `protobuf:"fixed64,13,req,name=skip_fixed64" json:"skip_fixed64,omitempty"` + SkipString *string `protobuf:"bytes,14,req,name=skip_string" json:"skip_string,omitempty"` + Skipgroup *GoSkipTest_SkipGroup `protobuf:"group,15,req,name=SkipGroup" json:"skipgroup,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *GoSkipTest) Reset() { *m = GoSkipTest{} } +func (m *GoSkipTest) String() string { return proto.CompactTextString(m) } +func (*GoSkipTest) ProtoMessage() {} + +func (m *GoSkipTest) GetSkipInt32() int32 { + if m != nil && m.SkipInt32 != nil { + return *m.SkipInt32 + } + return 0 +} + +func (m *GoSkipTest) GetSkipFixed32() uint32 { + if m != nil && m.SkipFixed32 != nil { + return *m.SkipFixed32 + } + return 0 +} + +func (m *GoSkipTest) GetSkipFixed64() uint64 { + if m != nil && m.SkipFixed64 != nil { + return *m.SkipFixed64 + } + return 0 +} + +func (m *GoSkipTest) GetSkipString() string { + if m != nil && m.SkipString != nil { + return *m.SkipString + } + return "" +} + +func (m *GoSkipTest) GetSkipgroup() *GoSkipTest_SkipGroup { + if m != nil { + return m.Skipgroup + } + return nil +} + +type GoSkipTest_SkipGroup struct { + GroupInt32 *int32 `protobuf:"varint,16,req,name=group_int32" json:"group_int32,omitempty"` + GroupString *string `protobuf:"bytes,17,req,name=group_string" json:"group_string,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *GoSkipTest_SkipGroup) Reset() { *m = GoSkipTest_SkipGroup{} } + +func (m *GoSkipTest_SkipGroup) GetGroupInt32() int32 { + if m != nil && m.GroupInt32 != nil { + return *m.GroupInt32 + } + return 0 +} + +func (m *GoSkipTest_SkipGroup) GetGroupString() string { + if m != nil && m.GroupString != nil { + return *m.GroupString + } + return "" +} + +type NonPackedTest struct { + A []int32 `protobuf:"varint,1,rep,name=a" json:"a,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *NonPackedTest) Reset() { *m = NonPackedTest{} } +func (m *NonPackedTest) String() string { return proto.CompactTextString(m) } +func (*NonPackedTest) ProtoMessage() {} + +func (m *NonPackedTest) GetA() []int32 { + if m != nil { + return m.A + } + return nil +} + +type PackedTest struct { + B []int32 `protobuf:"varint,1,rep,packed,name=b" json:"b,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *PackedTest) Reset() { *m = PackedTest{} } +func (m *PackedTest) String() string { return proto.CompactTextString(m) } +func (*PackedTest) ProtoMessage() {} + +func (m *PackedTest) GetB() []int32 { + if m != nil { + return m.B + } + return nil +} + +type MaxTag struct { + LastField *string `protobuf:"bytes,536870911,opt,name=last_field" json:"last_field,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *MaxTag) Reset() { *m = MaxTag{} } +func (m *MaxTag) String() string { return proto.CompactTextString(m) } +func (*MaxTag) ProtoMessage() {} + +func (m *MaxTag) GetLastField() string { + if m != nil && m.LastField != nil { + return *m.LastField + } + return "" +} + +type OldMessage struct { + Nested *OldMessage_Nested `protobuf:"bytes,1,opt,name=nested" json:"nested,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *OldMessage) Reset() { *m = OldMessage{} } +func (m *OldMessage) String() string { return proto.CompactTextString(m) } +func (*OldMessage) ProtoMessage() {} + +func (m *OldMessage) GetNested() *OldMessage_Nested { + if m != nil { + return m.Nested + } + return nil +} + +type OldMessage_Nested struct { + Name *string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *OldMessage_Nested) Reset() { *m = OldMessage_Nested{} } +func (m *OldMessage_Nested) String() string { return proto.CompactTextString(m) } +func (*OldMessage_Nested) ProtoMessage() {} + +func (m *OldMessage_Nested) GetName() string { + if m != nil && m.Name != nil { + return *m.Name + } + return "" +} + +type NewMessage struct { + Nested *NewMessage_Nested `protobuf:"bytes,1,opt,name=nested" json:"nested,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *NewMessage) Reset() { *m = NewMessage{} } +func (m *NewMessage) String() string { return proto.CompactTextString(m) } +func (*NewMessage) ProtoMessage() {} + +func (m *NewMessage) GetNested() *NewMessage_Nested { + if m != nil { + return m.Nested + } + return nil +} + +type NewMessage_Nested struct { + Name *string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"` + FoodGroup *string `protobuf:"bytes,2,opt,name=food_group" json:"food_group,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *NewMessage_Nested) Reset() { *m = NewMessage_Nested{} } +func (m *NewMessage_Nested) String() string { return proto.CompactTextString(m) } +func (*NewMessage_Nested) ProtoMessage() {} + +func (m *NewMessage_Nested) GetName() string { + if m != nil && m.Name != nil { + return *m.Name + } + return "" +} + +func (m *NewMessage_Nested) GetFoodGroup() string { + if m != nil && m.FoodGroup != nil { + return *m.FoodGroup + } + return "" +} + +type InnerMessage struct { + Host *string `protobuf:"bytes,1,req,name=host" json:"host,omitempty"` + Port *int32 `protobuf:"varint,2,opt,name=port,def=4000" json:"port,omitempty"` + Connected *bool `protobuf:"varint,3,opt,name=connected" json:"connected,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *InnerMessage) Reset() { *m = InnerMessage{} } +func (m *InnerMessage) String() string { return proto.CompactTextString(m) } +func (*InnerMessage) ProtoMessage() {} + +const Default_InnerMessage_Port int32 = 4000 + +func (m *InnerMessage) GetHost() string { + if m != nil && m.Host != nil { + return *m.Host + } + return "" +} + +func (m *InnerMessage) GetPort() int32 { + if m != nil && m.Port != nil { + return *m.Port + } + return Default_InnerMessage_Port +} + +func (m *InnerMessage) GetConnected() bool { + if m != nil && m.Connected != nil { + return *m.Connected + } + return false +} + +type OtherMessage struct { + Key *int64 `protobuf:"varint,1,opt,name=key" json:"key,omitempty"` + Value []byte `protobuf:"bytes,2,opt,name=value" json:"value,omitempty"` + Weight *float32 `protobuf:"fixed32,3,opt,name=weight" json:"weight,omitempty"` + Inner *InnerMessage `protobuf:"bytes,4,opt,name=inner" json:"inner,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *OtherMessage) Reset() { *m = OtherMessage{} } +func (m *OtherMessage) String() string { return proto.CompactTextString(m) } +func (*OtherMessage) ProtoMessage() {} + +func (m *OtherMessage) GetKey() int64 { + if m != nil && m.Key != nil { + return *m.Key + } + return 0 +} + +func (m *OtherMessage) GetValue() []byte { + if m != nil { + return m.Value + } + return nil +} + +func (m *OtherMessage) GetWeight() float32 { + if m != nil && m.Weight != nil { + return *m.Weight + } + return 0 +} + +func (m *OtherMessage) GetInner() *InnerMessage { + if m != nil { + return m.Inner + } + return nil +} + +type MyMessage struct { + Count *int32 `protobuf:"varint,1,req,name=count" json:"count,omitempty"` + Name *string `protobuf:"bytes,2,opt,name=name" json:"name,omitempty"` + Quote *string `protobuf:"bytes,3,opt,name=quote" json:"quote,omitempty"` + Pet []string `protobuf:"bytes,4,rep,name=pet" json:"pet,omitempty"` + Inner *InnerMessage `protobuf:"bytes,5,opt,name=inner" json:"inner,omitempty"` + Others []*OtherMessage `protobuf:"bytes,6,rep,name=others" json:"others,omitempty"` + Bikeshed *MyMessage_Color `protobuf:"varint,7,opt,name=bikeshed,enum=testdata.MyMessage_Color" json:"bikeshed,omitempty"` + Somegroup *MyMessage_SomeGroup `protobuf:"group,8,opt,name=SomeGroup" json:"somegroup,omitempty"` + RepBytes [][]byte `protobuf:"bytes,10,rep,name=rep_bytes" json:"rep_bytes,omitempty"` + Bigfloat *float64 `protobuf:"fixed64,11,opt,name=bigfloat" json:"bigfloat,omitempty"` + XXX_extensions map[int32]proto.Extension `json:"-"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *MyMessage) Reset() { *m = MyMessage{} } +func (m *MyMessage) String() string { return proto.CompactTextString(m) } +func (*MyMessage) ProtoMessage() {} + +var extRange_MyMessage = []proto.ExtensionRange{ + {100, 536870911}, +} + +func (*MyMessage) ExtensionRangeArray() []proto.ExtensionRange { + return extRange_MyMessage +} +func (m *MyMessage) ExtensionMap() map[int32]proto.Extension { + if m.XXX_extensions == nil { + m.XXX_extensions = make(map[int32]proto.Extension) + } + return m.XXX_extensions +} + +func (m *MyMessage) GetCount() int32 { + if m != nil && m.Count != nil { + return *m.Count + } + return 0 +} + +func (m *MyMessage) GetName() string { + if m != nil && m.Name != nil { + return *m.Name + } + return "" +} + +func (m *MyMessage) GetQuote() string { + if m != nil && m.Quote != nil { + return *m.Quote + } + return "" +} + +func (m *MyMessage) GetPet() []string { + if m != nil { + return m.Pet + } + return nil +} + +func (m *MyMessage) GetInner() *InnerMessage { + if m != nil { + return m.Inner + } + return nil +} + +func (m *MyMessage) GetOthers() []*OtherMessage { + if m != nil { + return m.Others + } + return nil +} + +func (m *MyMessage) GetBikeshed() MyMessage_Color { + if m != nil && m.Bikeshed != nil { + return *m.Bikeshed + } + return 0 +} + +func (m *MyMessage) GetSomegroup() *MyMessage_SomeGroup { + if m != nil { + return m.Somegroup + } + return nil +} + +func (m *MyMessage) GetRepBytes() [][]byte { + if m != nil { + return m.RepBytes + } + return nil +} + +func (m *MyMessage) GetBigfloat() float64 { + if m != nil && m.Bigfloat != nil { + return *m.Bigfloat + } + return 0 +} + +type MyMessage_SomeGroup struct { + GroupField *int32 `protobuf:"varint,9,opt,name=group_field" json:"group_field,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *MyMessage_SomeGroup) Reset() { *m = MyMessage_SomeGroup{} } + +func (m *MyMessage_SomeGroup) GetGroupField() int32 { + if m != nil && m.GroupField != nil { + return *m.GroupField + } + return 0 +} + +type Ext struct { + Data *string `protobuf:"bytes,1,opt,name=data" json:"data,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *Ext) Reset() { *m = Ext{} } +func (m *Ext) String() string { return proto.CompactTextString(m) } +func (*Ext) ProtoMessage() {} + +func (m *Ext) GetData() string { + if m != nil && m.Data != nil { + return *m.Data + } + return "" +} + +var E_Ext_More = &proto.ExtensionDesc{ + ExtendedType: (*MyMessage)(nil), + ExtensionType: (*Ext)(nil), + Field: 103, + Name: "testdata.Ext.more", + Tag: "bytes,103,opt,name=more", +} + +var E_Ext_Text = &proto.ExtensionDesc{ + ExtendedType: (*MyMessage)(nil), + ExtensionType: (*string)(nil), + Field: 104, + Name: "testdata.Ext.text", + Tag: "bytes,104,opt,name=text", +} + +var E_Ext_Number = &proto.ExtensionDesc{ + ExtendedType: (*MyMessage)(nil), + ExtensionType: (*int32)(nil), + Field: 105, + Name: "testdata.Ext.number", + Tag: "varint,105,opt,name=number", +} + +type MessageList struct { + Message []*MessageList_Message `protobuf:"group,1,rep" json:"message,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *MessageList) Reset() { *m = MessageList{} } +func (m *MessageList) String() string { return proto.CompactTextString(m) } +func (*MessageList) ProtoMessage() {} + +func (m *MessageList) GetMessage() []*MessageList_Message { + if m != nil { + return m.Message + } + return nil +} + +type MessageList_Message struct { + Name *string `protobuf:"bytes,2,req,name=name" json:"name,omitempty"` + Count *int32 `protobuf:"varint,3,req,name=count" json:"count,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *MessageList_Message) Reset() { *m = MessageList_Message{} } + +func (m *MessageList_Message) GetName() string { + if m != nil && m.Name != nil { + return *m.Name + } + return "" +} + +func (m *MessageList_Message) GetCount() int32 { + if m != nil && m.Count != nil { + return *m.Count + } + return 0 +} + +type Strings struct { + StringField *string `protobuf:"bytes,1,opt,name=string_field" json:"string_field,omitempty"` + BytesField []byte `protobuf:"bytes,2,opt,name=bytes_field" json:"bytes_field,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *Strings) Reset() { *m = Strings{} } +func (m *Strings) String() string { return proto.CompactTextString(m) } +func (*Strings) ProtoMessage() {} + +func (m *Strings) GetStringField() string { + if m != nil && m.StringField != nil { + return *m.StringField + } + return "" +} + +func (m *Strings) GetBytesField() []byte { + if m != nil { + return m.BytesField + } + return nil +} + +type Defaults struct { + F_Bool *bool `protobuf:"varint,1,opt,def=1" json:"F_Bool,omitempty"` + F_Int32 *int32 `protobuf:"varint,2,opt,def=32" json:"F_Int32,omitempty"` + F_Int64 *int64 `protobuf:"varint,3,opt,def=64" json:"F_Int64,omitempty"` + F_Fixed32 *uint32 `protobuf:"fixed32,4,opt,def=320" json:"F_Fixed32,omitempty"` + F_Fixed64 *uint64 `protobuf:"fixed64,5,opt,def=640" json:"F_Fixed64,omitempty"` + F_Uint32 *uint32 `protobuf:"varint,6,opt,def=3200" json:"F_Uint32,omitempty"` + F_Uint64 *uint64 `protobuf:"varint,7,opt,def=6400" json:"F_Uint64,omitempty"` + F_Float *float32 `protobuf:"fixed32,8,opt,def=314159" json:"F_Float,omitempty"` + F_Double *float64 `protobuf:"fixed64,9,opt,def=271828" json:"F_Double,omitempty"` + F_String *string `protobuf:"bytes,10,opt,def=hello, \"world!\"\n" json:"F_String,omitempty"` + F_Bytes []byte `protobuf:"bytes,11,opt,def=Bignose" json:"F_Bytes,omitempty"` + F_Sint32 *int32 `protobuf:"zigzag32,12,opt,def=-32" json:"F_Sint32,omitempty"` + F_Sint64 *int64 `protobuf:"zigzag64,13,opt,def=-64" json:"F_Sint64,omitempty"` + F_Enum *Defaults_Color `protobuf:"varint,14,opt,enum=testdata.Defaults_Color,def=1" json:"F_Enum,omitempty"` + F_Pinf *float32 `protobuf:"fixed32,15,opt,def=inf" json:"F_Pinf,omitempty"` + F_Ninf *float32 `protobuf:"fixed32,16,opt,def=-inf" json:"F_Ninf,omitempty"` + F_Nan *float32 `protobuf:"fixed32,17,opt,def=nan" json:"F_Nan,omitempty"` + Sub *SubDefaults `protobuf:"bytes,18,opt,name=sub" json:"sub,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *Defaults) Reset() { *m = Defaults{} } +func (m *Defaults) String() string { return proto.CompactTextString(m) } +func (*Defaults) ProtoMessage() {} + +const Default_Defaults_F_Bool bool = true +const Default_Defaults_F_Int32 int32 = 32 +const Default_Defaults_F_Int64 int64 = 64 +const Default_Defaults_F_Fixed32 uint32 = 320 +const Default_Defaults_F_Fixed64 uint64 = 640 +const Default_Defaults_F_Uint32 uint32 = 3200 +const Default_Defaults_F_Uint64 uint64 = 6400 +const Default_Defaults_F_Float float32 = 314159 +const Default_Defaults_F_Double float64 = 271828 +const Default_Defaults_F_String string = "hello, \"world!\"\n" + +var Default_Defaults_F_Bytes []byte = []byte("Bignose") + +const Default_Defaults_F_Sint32 int32 = -32 +const Default_Defaults_F_Sint64 int64 = -64 +const Default_Defaults_F_Enum Defaults_Color = Defaults_GREEN + +var Default_Defaults_F_Pinf float32 = float32(math.Inf(1)) +var Default_Defaults_F_Ninf float32 = float32(math.Inf(-1)) +var Default_Defaults_F_Nan float32 = float32(math.NaN()) + +func (m *Defaults) GetF_Bool() bool { + if m != nil && m.F_Bool != nil { + return *m.F_Bool + } + return Default_Defaults_F_Bool +} + +func (m *Defaults) GetF_Int32() int32 { + if m != nil && m.F_Int32 != nil { + return *m.F_Int32 + } + return Default_Defaults_F_Int32 +} + +func (m *Defaults) GetF_Int64() int64 { + if m != nil && m.F_Int64 != nil { + return *m.F_Int64 + } + return Default_Defaults_F_Int64 +} + +func (m *Defaults) GetF_Fixed32() uint32 { + if m != nil && m.F_Fixed32 != nil { + return *m.F_Fixed32 + } + return Default_Defaults_F_Fixed32 +} + +func (m *Defaults) GetF_Fixed64() uint64 { + if m != nil && m.F_Fixed64 != nil { + return *m.F_Fixed64 + } + return Default_Defaults_F_Fixed64 +} + +func (m *Defaults) GetF_Uint32() uint32 { + if m != nil && m.F_Uint32 != nil { + return *m.F_Uint32 + } + return Default_Defaults_F_Uint32 +} + +func (m *Defaults) GetF_Uint64() uint64 { + if m != nil && m.F_Uint64 != nil { + return *m.F_Uint64 + } + return Default_Defaults_F_Uint64 +} + +func (m *Defaults) GetF_Float() float32 { + if m != nil && m.F_Float != nil { + return *m.F_Float + } + return Default_Defaults_F_Float +} + +func (m *Defaults) GetF_Double() float64 { + if m != nil && m.F_Double != nil { + return *m.F_Double + } + return Default_Defaults_F_Double +} + +func (m *Defaults) GetF_String() string { + if m != nil && m.F_String != nil { + return *m.F_String + } + return Default_Defaults_F_String +} + +func (m *Defaults) GetF_Bytes() []byte { + if m != nil && m.F_Bytes != nil { + return m.F_Bytes + } + return append([]byte(nil), Default_Defaults_F_Bytes...) +} + +func (m *Defaults) GetF_Sint32() int32 { + if m != nil && m.F_Sint32 != nil { + return *m.F_Sint32 + } + return Default_Defaults_F_Sint32 +} + +func (m *Defaults) GetF_Sint64() int64 { + if m != nil && m.F_Sint64 != nil { + return *m.F_Sint64 + } + return Default_Defaults_F_Sint64 +} + +func (m *Defaults) GetF_Enum() Defaults_Color { + if m != nil && m.F_Enum != nil { + return *m.F_Enum + } + return Default_Defaults_F_Enum +} + +func (m *Defaults) GetF_Pinf() float32 { + if m != nil && m.F_Pinf != nil { + return *m.F_Pinf + } + return Default_Defaults_F_Pinf +} + +func (m *Defaults) GetF_Ninf() float32 { + if m != nil && m.F_Ninf != nil { + return *m.F_Ninf + } + return Default_Defaults_F_Ninf +} + +func (m *Defaults) GetF_Nan() float32 { + if m != nil && m.F_Nan != nil { + return *m.F_Nan + } + return Default_Defaults_F_Nan +} + +func (m *Defaults) GetSub() *SubDefaults { + if m != nil { + return m.Sub + } + return nil +} + +type SubDefaults struct { + N *int64 `protobuf:"varint,1,opt,name=n,def=7" json:"n,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *SubDefaults) Reset() { *m = SubDefaults{} } +func (m *SubDefaults) String() string { return proto.CompactTextString(m) } +func (*SubDefaults) ProtoMessage() {} + +const Default_SubDefaults_N int64 = 7 + +func (m *SubDefaults) GetN() int64 { + if m != nil && m.N != nil { + return *m.N + } + return Default_SubDefaults_N +} + +type RepeatedEnum struct { + Color []RepeatedEnum_Color `protobuf:"varint,1,rep,name=color,enum=testdata.RepeatedEnum_Color" json:"color,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *RepeatedEnum) Reset() { *m = RepeatedEnum{} } +func (m *RepeatedEnum) String() string { return proto.CompactTextString(m) } +func (*RepeatedEnum) ProtoMessage() {} + +func (m *RepeatedEnum) GetColor() []RepeatedEnum_Color { + if m != nil { + return m.Color + } + return nil +} + +type MoreRepeated struct { + Bools []bool `protobuf:"varint,1,rep,name=bools" json:"bools,omitempty"` + BoolsPacked []bool `protobuf:"varint,2,rep,packed,name=bools_packed" json:"bools_packed,omitempty"` + Ints []int32 `protobuf:"varint,3,rep,name=ints" json:"ints,omitempty"` + IntsPacked []int32 `protobuf:"varint,4,rep,packed,name=ints_packed" json:"ints_packed,omitempty"` + Strings []string `protobuf:"bytes,5,rep,name=strings" json:"strings,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *MoreRepeated) Reset() { *m = MoreRepeated{} } +func (m *MoreRepeated) String() string { return proto.CompactTextString(m) } +func (*MoreRepeated) ProtoMessage() {} + +func (m *MoreRepeated) GetBools() []bool { + if m != nil { + return m.Bools + } + return nil +} + +func (m *MoreRepeated) GetBoolsPacked() []bool { + if m != nil { + return m.BoolsPacked + } + return nil +} + +func (m *MoreRepeated) GetInts() []int32 { + if m != nil { + return m.Ints + } + return nil +} + +func (m *MoreRepeated) GetIntsPacked() []int32 { + if m != nil { + return m.IntsPacked + } + return nil +} + +func (m *MoreRepeated) GetStrings() []string { + if m != nil { + return m.Strings + } + return nil +} + +type GroupOld struct { + G *GroupOld_G `protobuf:"group,1,opt" json:"g,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *GroupOld) Reset() { *m = GroupOld{} } +func (m *GroupOld) String() string { return proto.CompactTextString(m) } +func (*GroupOld) ProtoMessage() {} + +func (m *GroupOld) GetG() *GroupOld_G { + if m != nil { + return m.G + } + return nil +} + +type GroupOld_G struct { + X *int32 `protobuf:"varint,2,opt,name=x" json:"x,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *GroupOld_G) Reset() { *m = GroupOld_G{} } + +func (m *GroupOld_G) GetX() int32 { + if m != nil && m.X != nil { + return *m.X + } + return 0 +} + +type GroupNew struct { + G *GroupNew_G `protobuf:"group,1,opt" json:"g,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *GroupNew) Reset() { *m = GroupNew{} } +func (m *GroupNew) String() string { return proto.CompactTextString(m) } +func (*GroupNew) ProtoMessage() {} + +func (m *GroupNew) GetG() *GroupNew_G { + if m != nil { + return m.G + } + return nil +} + +type GroupNew_G struct { + X *int32 `protobuf:"varint,2,opt,name=x" json:"x,omitempty"` + Y *int32 `protobuf:"varint,3,opt,name=y" json:"y,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *GroupNew_G) Reset() { *m = GroupNew_G{} } + +func (m *GroupNew_G) GetX() int32 { + if m != nil && m.X != nil { + return *m.X + } + return 0 +} + +func (m *GroupNew_G) GetY() int32 { + if m != nil && m.Y != nil { + return *m.Y + } + return 0 +} + +var E_Greeting = &proto.ExtensionDesc{ + ExtendedType: (*MyMessage)(nil), + ExtensionType: ([]string)(nil), + Field: 106, + Name: "testdata.greeting", + Tag: "bytes,106,rep,name=greeting", +} + +func init() { + proto.RegisterEnum("testdata.FOO", FOO_name, FOO_value) + proto.RegisterEnum("testdata.GoTest_KIND", GoTest_KIND_name, GoTest_KIND_value) + proto.RegisterEnum("testdata.MyMessage_Color", MyMessage_Color_name, MyMessage_Color_value) + proto.RegisterEnum("testdata.Defaults_Color", Defaults_Color_name, Defaults_Color_value) + proto.RegisterEnum("testdata.RepeatedEnum_Color", RepeatedEnum_Color_name, RepeatedEnum_Color_value) + proto.RegisterExtension(E_Ext_More) + proto.RegisterExtension(E_Ext_Text) + proto.RegisterExtension(E_Ext_Number) + proto.RegisterExtension(E_Greeting) +} diff --git a/vendor/github.com/gogo/protobuf/proto/testdata/test.proto b/vendor/github.com/gogo/protobuf/proto/testdata/test.proto new file mode 100644 index 000000000..698c8ce24 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/proto/testdata/test.proto @@ -0,0 +1,535 @@ +// 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. + +// A feature-rich test file for the protocol compiler and libraries. + +syntax = "proto2"; + +package testdata; + +enum FOO { FOO1 = 1; }; + +message GoEnum { + required FOO foo = 1; +} + +message GoTestField { + required string Label = 1; + required string Type = 2; +} + +message GoTest { + // An enum, for completeness. + enum KIND { + VOID = 0; + + // Basic types + BOOL = 1; + BYTES = 2; + FINGERPRINT = 3; + FLOAT = 4; + INT = 5; + STRING = 6; + TIME = 7; + + // Groupings + TUPLE = 8; + ARRAY = 9; + MAP = 10; + + // Table types + TABLE = 11; + + // Functions + FUNCTION = 12; // last tag + }; + + // Some typical parameters + required KIND Kind = 1; + optional string Table = 2; + optional int32 Param = 3; + + // Required, repeated and optional foreign fields. + required GoTestField RequiredField = 4; + repeated GoTestField RepeatedField = 5; + optional GoTestField OptionalField = 6; + + // Required fields of all basic types + required bool F_Bool_required = 10; + required int32 F_Int32_required = 11; + required int64 F_Int64_required = 12; + required fixed32 F_Fixed32_required = 13; + required fixed64 F_Fixed64_required = 14; + required uint32 F_Uint32_required = 15; + required uint64 F_Uint64_required = 16; + required float F_Float_required = 17; + required double F_Double_required = 18; + required string F_String_required = 19; + required bytes F_Bytes_required = 101; + required sint32 F_Sint32_required = 102; + required sint64 F_Sint64_required = 103; + + // Repeated fields of all basic types + repeated bool F_Bool_repeated = 20; + repeated int32 F_Int32_repeated = 21; + repeated int64 F_Int64_repeated = 22; + repeated fixed32 F_Fixed32_repeated = 23; + repeated fixed64 F_Fixed64_repeated = 24; + repeated uint32 F_Uint32_repeated = 25; + repeated uint64 F_Uint64_repeated = 26; + repeated float F_Float_repeated = 27; + repeated double F_Double_repeated = 28; + repeated string F_String_repeated = 29; + repeated bytes F_Bytes_repeated = 201; + repeated sint32 F_Sint32_repeated = 202; + repeated sint64 F_Sint64_repeated = 203; + + // Optional fields of all basic types + optional bool F_Bool_optional = 30; + optional int32 F_Int32_optional = 31; + optional int64 F_Int64_optional = 32; + optional fixed32 F_Fixed32_optional = 33; + optional fixed64 F_Fixed64_optional = 34; + optional uint32 F_Uint32_optional = 35; + optional uint64 F_Uint64_optional = 36; + optional float F_Float_optional = 37; + optional double F_Double_optional = 38; + optional string F_String_optional = 39; + optional bytes F_Bytes_optional = 301; + optional sint32 F_Sint32_optional = 302; + optional sint64 F_Sint64_optional = 303; + + // Default-valued fields of all basic types + optional bool F_Bool_defaulted = 40 [default=true]; + optional int32 F_Int32_defaulted = 41 [default=32]; + optional int64 F_Int64_defaulted = 42 [default=64]; + optional fixed32 F_Fixed32_defaulted = 43 [default=320]; + optional fixed64 F_Fixed64_defaulted = 44 [default=640]; + optional uint32 F_Uint32_defaulted = 45 [default=3200]; + optional uint64 F_Uint64_defaulted = 46 [default=6400]; + optional float F_Float_defaulted = 47 [default=314159.]; + optional double F_Double_defaulted = 48 [default=271828.]; + optional string F_String_defaulted = 49 [default="hello, \"world!\"\n"]; + optional bytes F_Bytes_defaulted = 401 [default="Bignose"]; + optional sint32 F_Sint32_defaulted = 402 [default = -32]; + optional sint64 F_Sint64_defaulted = 403 [default = -64]; + + // Packed repeated fields (no string or bytes). + repeated bool F_Bool_repeated_packed = 50 [packed=true]; + repeated int32 F_Int32_repeated_packed = 51 [packed=true]; + repeated int64 F_Int64_repeated_packed = 52 [packed=true]; + repeated fixed32 F_Fixed32_repeated_packed = 53 [packed=true]; + repeated fixed64 F_Fixed64_repeated_packed = 54 [packed=true]; + repeated uint32 F_Uint32_repeated_packed = 55 [packed=true]; + repeated uint64 F_Uint64_repeated_packed = 56 [packed=true]; + repeated float F_Float_repeated_packed = 57 [packed=true]; + repeated double F_Double_repeated_packed = 58 [packed=true]; + repeated sint32 F_Sint32_repeated_packed = 502 [packed=true]; + repeated sint64 F_Sint64_repeated_packed = 503 [packed=true]; + + // Required, repeated, and optional groups. + required group RequiredGroup = 70 { + required string RequiredField = 71; + }; + + repeated group RepeatedGroup = 80 { + required string RequiredField = 81; + }; + + optional group OptionalGroup = 90 { + required string RequiredField = 91; + }; +} + +// For testing skipping of unrecognized fields. +// Numbers are all big, larger than tag numbers in GoTestField, +// the message used in the corresponding test. +message GoSkipTest { + required int32 skip_int32 = 11; + required fixed32 skip_fixed32 = 12; + required fixed64 skip_fixed64 = 13; + required string skip_string = 14; + required group SkipGroup = 15 { + required int32 group_int32 = 16; + required string group_string = 17; + } +} + +// For testing packed/non-packed decoder switching. +// A serialized instance of one should be deserializable as the other. +message NonPackedTest { + repeated int32 a = 1; +} + +message PackedTest { + repeated int32 b = 1 [packed=true]; +} + +message MaxTag { + // Maximum possible tag number. + optional string last_field = 536870911; +} + +message OldMessage { + message Nested { + optional string name = 1; + } + optional Nested nested = 1; + + optional int32 num = 2; +} + +// NewMessage is wire compatible with OldMessage; +// imagine it as a future version. +message NewMessage { + message Nested { + optional string name = 1; + optional string food_group = 2; + } + optional Nested nested = 1; + + // This is an int32 in OldMessage. + optional int64 num = 2; +} + +// Smaller tests for ASCII formatting. + +message InnerMessage { + required string host = 1; + optional int32 port = 2 [default=4000]; + optional bool connected = 3; +} + +message OtherMessage { + optional int64 key = 1; + optional bytes value = 2; + optional float weight = 3; + optional InnerMessage inner = 4; + + extensions 100 to max; +} + +message MyMessage { + required int32 count = 1; + optional string name = 2; + optional string quote = 3; + repeated string pet = 4; + optional InnerMessage inner = 5; + repeated OtherMessage others = 6; + repeated InnerMessage rep_inner = 12; + + enum Color { + RED = 0; + GREEN = 1; + BLUE = 2; + }; + optional Color bikeshed = 7; + + optional group SomeGroup = 8 { + optional int32 group_field = 9; + } + + // This field becomes [][]byte in the generated code. + repeated bytes rep_bytes = 10; + + optional double bigfloat = 11; + + extensions 100 to max; +} + +message Ext { + extend MyMessage { + optional Ext more = 103; + optional string text = 104; + optional int32 number = 105; + } + + optional string data = 1; +} + +extend MyMessage { + repeated string greeting = 106; +} + +message ComplexExtension { + optional int32 first = 1; + optional int32 second = 2; + repeated int32 third = 3; +} + +extend OtherMessage { + optional ComplexExtension complex = 200; + repeated ComplexExtension r_complex = 201; +} + +message DefaultsMessage { + enum DefaultsEnum { + ZERO = 0; + ONE = 1; + TWO = 2; + }; + extensions 100 to max; +} + +extend DefaultsMessage { + optional double no_default_double = 101; + optional float no_default_float = 102; + optional int32 no_default_int32 = 103; + optional int64 no_default_int64 = 104; + optional uint32 no_default_uint32 = 105; + optional uint64 no_default_uint64 = 106; + optional sint32 no_default_sint32 = 107; + optional sint64 no_default_sint64 = 108; + optional fixed32 no_default_fixed32 = 109; + optional fixed64 no_default_fixed64 = 110; + optional sfixed32 no_default_sfixed32 = 111; + optional sfixed64 no_default_sfixed64 = 112; + optional bool no_default_bool = 113; + optional string no_default_string = 114; + optional bytes no_default_bytes = 115; + optional DefaultsMessage.DefaultsEnum no_default_enum = 116; + + optional double default_double = 201 [default = 3.1415]; + optional float default_float = 202 [default = 3.14]; + optional int32 default_int32 = 203 [default = 42]; + optional int64 default_int64 = 204 [default = 43]; + optional uint32 default_uint32 = 205 [default = 44]; + optional uint64 default_uint64 = 206 [default = 45]; + optional sint32 default_sint32 = 207 [default = 46]; + optional sint64 default_sint64 = 208 [default = 47]; + optional fixed32 default_fixed32 = 209 [default = 48]; + optional fixed64 default_fixed64 = 210 [default = 49]; + optional sfixed32 default_sfixed32 = 211 [default = 50]; + optional sfixed64 default_sfixed64 = 212 [default = 51]; + optional bool default_bool = 213 [default = true]; + optional string default_string = 214 [default = "Hello, string"]; + optional bytes default_bytes = 215 [default = "Hello, bytes"]; + optional DefaultsMessage.DefaultsEnum default_enum = 216 [default = ONE]; +} + +message MyMessageSet { + option message_set_wire_format = true; + extensions 100 to max; +} + +message Empty { +} + +extend MyMessageSet { + optional Empty x201 = 201; + optional Empty x202 = 202; + optional Empty x203 = 203; + optional Empty x204 = 204; + optional Empty x205 = 205; + optional Empty x206 = 206; + optional Empty x207 = 207; + optional Empty x208 = 208; + optional Empty x209 = 209; + optional Empty x210 = 210; + optional Empty x211 = 211; + optional Empty x212 = 212; + optional Empty x213 = 213; + optional Empty x214 = 214; + optional Empty x215 = 215; + optional Empty x216 = 216; + optional Empty x217 = 217; + optional Empty x218 = 218; + optional Empty x219 = 219; + optional Empty x220 = 220; + optional Empty x221 = 221; + optional Empty x222 = 222; + optional Empty x223 = 223; + optional Empty x224 = 224; + optional Empty x225 = 225; + optional Empty x226 = 226; + optional Empty x227 = 227; + optional Empty x228 = 228; + optional Empty x229 = 229; + optional Empty x230 = 230; + optional Empty x231 = 231; + optional Empty x232 = 232; + optional Empty x233 = 233; + optional Empty x234 = 234; + optional Empty x235 = 235; + optional Empty x236 = 236; + optional Empty x237 = 237; + optional Empty x238 = 238; + optional Empty x239 = 239; + optional Empty x240 = 240; + optional Empty x241 = 241; + optional Empty x242 = 242; + optional Empty x243 = 243; + optional Empty x244 = 244; + optional Empty x245 = 245; + optional Empty x246 = 246; + optional Empty x247 = 247; + optional Empty x248 = 248; + optional Empty x249 = 249; + optional Empty x250 = 250; +} + +message MessageList { + repeated group Message = 1 { + required string name = 2; + required int32 count = 3; + } +} + +message Strings { + optional string string_field = 1; + optional bytes bytes_field = 2; +} + +message Defaults { + enum Color { + RED = 0; + GREEN = 1; + BLUE = 2; + } + + // Default-valued fields of all basic types. + // Same as GoTest, but copied here to make testing easier. + optional bool F_Bool = 1 [default=true]; + optional int32 F_Int32 = 2 [default=32]; + optional int64 F_Int64 = 3 [default=64]; + optional fixed32 F_Fixed32 = 4 [default=320]; + optional fixed64 F_Fixed64 = 5 [default=640]; + optional uint32 F_Uint32 = 6 [default=3200]; + optional uint64 F_Uint64 = 7 [default=6400]; + optional float F_Float = 8 [default=314159.]; + optional double F_Double = 9 [default=271828.]; + optional string F_String = 10 [default="hello, \"world!\"\n"]; + optional bytes F_Bytes = 11 [default="Bignose"]; + optional sint32 F_Sint32 = 12 [default=-32]; + optional sint64 F_Sint64 = 13 [default=-64]; + optional Color F_Enum = 14 [default=GREEN]; + + // More fields with crazy defaults. + optional float F_Pinf = 15 [default=inf]; + optional float F_Ninf = 16 [default=-inf]; + optional float F_Nan = 17 [default=nan]; + + // Sub-message. + optional SubDefaults sub = 18; + + // Redundant but explicit defaults. + optional string str_zero = 19 [default=""]; +} + +message SubDefaults { + optional int64 n = 1 [default=7]; +} + +message RepeatedEnum { + enum Color { + RED = 1; + } + repeated Color color = 1; +} + +message MoreRepeated { + repeated bool bools = 1; + repeated bool bools_packed = 2 [packed=true]; + repeated int32 ints = 3; + repeated int32 ints_packed = 4 [packed=true]; + repeated int64 int64s_packed = 7 [packed=true]; + repeated string strings = 5; + repeated fixed32 fixeds = 6; +} + +// GroupOld and GroupNew have the same wire format. +// GroupNew has a new field inside a group. + +message GroupOld { + optional group G = 101 { + optional int32 x = 2; + } +} + +message GroupNew { + optional group G = 101 { + optional int32 x = 2; + optional int32 y = 3; + } +} + +message FloatingPoint { + required double f = 1; +} + +message MessageWithMap { + map name_mapping = 1; + map msg_mapping = 2; + map byte_mapping = 3; + map str_to_str = 4; +} + +message Oneof { + oneof union { + bool F_Bool = 1; + int32 F_Int32 = 2; + int64 F_Int64 = 3; + fixed32 F_Fixed32 = 4; + fixed64 F_Fixed64 = 5; + uint32 F_Uint32 = 6; + uint64 F_Uint64 = 7; + float F_Float = 8; + double F_Double = 9; + string F_String = 10; + bytes F_Bytes = 11; + sint32 F_Sint32 = 12; + sint64 F_Sint64 = 13; + MyMessage.Color F_Enum = 14; + GoTestField F_Message = 15; + group F_Group = 16 { + optional int32 x = 17; + } + int32 F_Largest_Tag = 536870911; + } + + oneof tormato { + int32 value = 100; + } +} + +message Communique { + optional bool make_me_cry = 1; + + // This is a oneof, called "union". + oneof union { + int32 number = 5; + string name = 6; + bytes data = 7; + double temp_c = 8; + MyMessage.Color col = 9; + Strings msg = 10; + } +} diff --git a/vendor/github.com/gogo/protobuf/proto/text_parser_test.go b/vendor/github.com/gogo/protobuf/proto/text_parser_test.go new file mode 100644 index 000000000..72fe40808 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/proto/text_parser_test.go @@ -0,0 +1,557 @@ +// 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. + +package proto_test + +import ( + "math" + "reflect" + "testing" + + . "github.com/gogo/protobuf/proto" + proto3pb "github.com/gogo/protobuf/proto/proto3_proto" + . "github.com/gogo/protobuf/proto/testdata" +) + +type UnmarshalTextTest struct { + in string + err string // if "", no error expected + out *MyMessage +} + +func buildExtStructTest(text string) UnmarshalTextTest { + msg := &MyMessage{ + Count: Int32(42), + } + SetExtension(msg, E_Ext_More, &Ext{ + Data: String("Hello, world!"), + }) + return UnmarshalTextTest{in: text, out: msg} +} + +func buildExtDataTest(text string) UnmarshalTextTest { + msg := &MyMessage{ + Count: Int32(42), + } + SetExtension(msg, E_Ext_Text, String("Hello, world!")) + SetExtension(msg, E_Ext_Number, Int32(1729)) + return UnmarshalTextTest{in: text, out: msg} +} + +func buildExtRepStringTest(text string) UnmarshalTextTest { + msg := &MyMessage{ + Count: Int32(42), + } + if err := SetExtension(msg, E_Greeting, []string{"bula", "hola"}); err != nil { + panic(err) + } + return UnmarshalTextTest{in: text, out: msg} +} + +var unMarshalTextTests = []UnmarshalTextTest{ + // Basic + { + in: " count:42\n name:\"Dave\" ", + out: &MyMessage{ + Count: Int32(42), + Name: String("Dave"), + }, + }, + + // Empty quoted string + { + in: `count:42 name:""`, + out: &MyMessage{ + Count: Int32(42), + Name: String(""), + }, + }, + + // Quoted string concatenation with double quotes + { + in: `count:42 name: "My name is "` + "\n" + `"elsewhere"`, + out: &MyMessage{ + Count: Int32(42), + Name: String("My name is elsewhere"), + }, + }, + + // Quoted string concatenation with single quotes + { + in: "count:42 name: 'My name is '\n'elsewhere'", + out: &MyMessage{ + Count: Int32(42), + Name: String("My name is elsewhere"), + }, + }, + + // Quoted string concatenations with mixed quotes + { + in: "count:42 name: 'My name is '\n\"elsewhere\"", + out: &MyMessage{ + Count: Int32(42), + Name: String("My name is elsewhere"), + }, + }, + { + in: "count:42 name: \"My name is \"\n'elsewhere'", + out: &MyMessage{ + Count: Int32(42), + Name: String("My name is elsewhere"), + }, + }, + + // Quoted string with escaped apostrophe + { + in: `count:42 name: "HOLIDAY - New Year\'s Day"`, + out: &MyMessage{ + Count: Int32(42), + Name: String("HOLIDAY - New Year's Day"), + }, + }, + + // Quoted string with single quote + { + in: `count:42 name: 'Roger "The Ramster" Ramjet'`, + out: &MyMessage{ + Count: Int32(42), + Name: String(`Roger "The Ramster" Ramjet`), + }, + }, + + // Quoted string with all the accepted special characters from the C++ test + { + in: `count:42 name: ` + "\"\\\"A string with \\' characters \\n and \\r newlines and \\t tabs and \\001 slashes \\\\ and multiple spaces\"", + out: &MyMessage{ + Count: Int32(42), + Name: String("\"A string with ' characters \n and \r newlines and \t tabs and \001 slashes \\ and multiple spaces"), + }, + }, + + // Quoted string with quoted backslash + { + in: `count:42 name: "\\'xyz"`, + out: &MyMessage{ + Count: Int32(42), + Name: String(`\'xyz`), + }, + }, + + // Quoted string with UTF-8 bytes. + { + in: "count:42 name: '\303\277\302\201\xAB'", + out: &MyMessage{ + Count: Int32(42), + Name: String("\303\277\302\201\xAB"), + }, + }, + + // Bad quoted string + { + in: `inner: < host: "\0" >` + "\n", + err: `line 1.15: invalid quoted string "\0": \0 requires 2 following digits`, + }, + + // Number too large for int64 + { + in: "count: 1 others { key: 123456789012345678901 }", + err: "line 1.23: invalid int64: 123456789012345678901", + }, + + // Number too large for int32 + { + in: "count: 1234567890123", + err: "line 1.7: invalid int32: 1234567890123", + }, + + // Number in hexadecimal + { + in: "count: 0x2beef", + out: &MyMessage{ + Count: Int32(0x2beef), + }, + }, + + // Number in octal + { + in: "count: 024601", + out: &MyMessage{ + Count: Int32(024601), + }, + }, + + // Floating point number with "f" suffix + { + in: "count: 4 others:< weight: 17.0f >", + out: &MyMessage{ + Count: Int32(4), + Others: []*OtherMessage{ + { + Weight: Float32(17), + }, + }, + }, + }, + + // Floating point positive infinity + { + in: "count: 4 bigfloat: inf", + out: &MyMessage{ + Count: Int32(4), + Bigfloat: Float64(math.Inf(1)), + }, + }, + + // Floating point negative infinity + { + in: "count: 4 bigfloat: -inf", + out: &MyMessage{ + Count: Int32(4), + Bigfloat: Float64(math.Inf(-1)), + }, + }, + + // Number too large for float32 + { + in: "others:< weight: 12345678901234567890123456789012345678901234567890 >", + err: "line 1.17: invalid float32: 12345678901234567890123456789012345678901234567890", + }, + + // Number posing as a quoted string + { + in: `inner: < host: 12 >` + "\n", + err: `line 1.15: invalid string: 12`, + }, + + // Quoted string posing as int32 + { + in: `count: "12"`, + err: `line 1.7: invalid int32: "12"`, + }, + + // Quoted string posing a float32 + { + in: `others:< weight: "17.4" >`, + err: `line 1.17: invalid float32: "17.4"`, + }, + + // Enum + { + in: `count:42 bikeshed: BLUE`, + out: &MyMessage{ + Count: Int32(42), + Bikeshed: MyMessage_BLUE.Enum(), + }, + }, + + // Repeated field + { + in: `count:42 pet: "horsey" pet:"bunny"`, + out: &MyMessage{ + Count: Int32(42), + Pet: []string{"horsey", "bunny"}, + }, + }, + + // Repeated field with list notation + { + in: `count:42 pet: ["horsey", "bunny"]`, + out: &MyMessage{ + Count: Int32(42), + Pet: []string{"horsey", "bunny"}, + }, + }, + + // Repeated message with/without colon and <>/{} + { + in: `count:42 others:{} others{} others:<> others:{}`, + out: &MyMessage{ + Count: Int32(42), + Others: []*OtherMessage{ + {}, + {}, + {}, + {}, + }, + }, + }, + + // Missing colon for inner message + { + in: `count:42 inner < host: "cauchy.syd" >`, + out: &MyMessage{ + Count: Int32(42), + Inner: &InnerMessage{ + Host: String("cauchy.syd"), + }, + }, + }, + + // Missing colon for string field + { + in: `name "Dave"`, + err: `line 1.5: expected ':', found "\"Dave\""`, + }, + + // Missing colon for int32 field + { + in: `count 42`, + err: `line 1.6: expected ':', found "42"`, + }, + + // Missing required field + { + in: `name: "Pawel"`, + err: `proto: required field "testdata.MyMessage.count" not set`, + out: &MyMessage{ + Name: String("Pawel"), + }, + }, + + // Repeated non-repeated field + { + in: `name: "Rob" name: "Russ"`, + err: `line 1.12: non-repeated field "name" was repeated`, + }, + + // Group + { + in: `count: 17 SomeGroup { group_field: 12 }`, + out: &MyMessage{ + Count: Int32(17), + Somegroup: &MyMessage_SomeGroup{ + GroupField: Int32(12), + }, + }, + }, + + // Semicolon between fields + { + in: `count:3;name:"Calvin"`, + out: &MyMessage{ + Count: Int32(3), + Name: String("Calvin"), + }, + }, + // Comma between fields + { + in: `count:4,name:"Ezekiel"`, + out: &MyMessage{ + Count: Int32(4), + Name: String("Ezekiel"), + }, + }, + + // Extension + buildExtStructTest(`count: 42 [testdata.Ext.more]:`), + buildExtStructTest(`count: 42 [testdata.Ext.more] {data:"Hello, world!"}`), + buildExtDataTest(`count: 42 [testdata.Ext.text]:"Hello, world!" [testdata.Ext.number]:1729`), + buildExtRepStringTest(`count: 42 [testdata.greeting]:"bula" [testdata.greeting]:"hola"`), + + // Big all-in-one + { + in: "count:42 # Meaning\n" + + `name:"Dave" ` + + `quote:"\"I didn't want to go.\"" ` + + `pet:"bunny" ` + + `pet:"kitty" ` + + `pet:"horsey" ` + + `inner:<` + + ` host:"footrest.syd" ` + + ` port:7001 ` + + ` connected:true ` + + `> ` + + `others:<` + + ` key:3735928559 ` + + ` value:"\x01A\a\f" ` + + `> ` + + `others:<` + + " weight:58.9 # Atomic weight of Co\n" + + ` inner:<` + + ` host:"lesha.mtv" ` + + ` port:8002 ` + + ` >` + + `>`, + out: &MyMessage{ + Count: Int32(42), + Name: String("Dave"), + Quote: String(`"I didn't want to go."`), + Pet: []string{"bunny", "kitty", "horsey"}, + Inner: &InnerMessage{ + Host: String("footrest.syd"), + Port: Int32(7001), + Connected: Bool(true), + }, + Others: []*OtherMessage{ + { + Key: Int64(3735928559), + Value: []byte{0x1, 'A', '\a', '\f'}, + }, + { + Weight: Float32(58.9), + Inner: &InnerMessage{ + Host: String("lesha.mtv"), + Port: Int32(8002), + }, + }, + }, + }, + }, +} + +func TestUnmarshalText(t *testing.T) { + for i, test := range unMarshalTextTests { + pb := new(MyMessage) + err := UnmarshalText(test.in, pb) + if test.err == "" { + // We don't expect failure. + if err != nil { + t.Errorf("Test %d: Unexpected error: %v", i, err) + } else if !reflect.DeepEqual(pb, test.out) { + t.Errorf("Test %d: Incorrect populated \nHave: %v\nWant: %v", + i, pb, test.out) + } + } else { + // We do expect failure. + if err == nil { + t.Errorf("Test %d: Didn't get expected error: %v", i, test.err) + } else if err.Error() != test.err { + t.Errorf("Test %d: Incorrect error.\nHave: %v\nWant: %v", + i, err.Error(), test.err) + } else if _, ok := err.(*RequiredNotSetError); ok && test.out != nil && !reflect.DeepEqual(pb, test.out) { + t.Errorf("Test %d: Incorrect populated \nHave: %v\nWant: %v", + i, pb, test.out) + } + } + } +} + +func TestUnmarshalTextCustomMessage(t *testing.T) { + msg := &textMessage{} + if err := UnmarshalText("custom", msg); err != nil { + t.Errorf("Unexpected error from custom unmarshal: %v", err) + } + if UnmarshalText("not custom", msg) == nil { + t.Errorf("Didn't get expected error from custom unmarshal") + } +} + +// Regression test; this caused a panic. +func TestRepeatedEnum(t *testing.T) { + pb := new(RepeatedEnum) + if err := UnmarshalText("color: RED", pb); err != nil { + t.Fatal(err) + } + exp := &RepeatedEnum{ + Color: []RepeatedEnum_Color{RepeatedEnum_RED}, + } + if !Equal(pb, exp) { + t.Errorf("Incorrect populated \nHave: %v\nWant: %v", pb, exp) + } +} + +func TestProto3TextParsing(t *testing.T) { + m := new(proto3pb.Message) + const in = `name: "Wallace" true_scotsman: true` + want := &proto3pb.Message{ + Name: "Wallace", + TrueScotsman: true, + } + if err := UnmarshalText(in, m); err != nil { + t.Fatal(err) + } + if !Equal(m, want) { + t.Errorf("\n got %v\nwant %v", m, want) + } +} + +func TestMapParsing(t *testing.T) { + m := new(MessageWithMap) + const in = `name_mapping: name_mapping:` + + `msg_mapping:,>` + // separating commas are okay + `msg_mapping>` + // no colon after "value" + `byte_mapping:` + want := &MessageWithMap{ + NameMapping: map[int32]string{ + 1: "Beatles", + 1234: "Feist", + }, + MsgMapping: map[int64]*FloatingPoint{ + -4: {F: Float64(2.0)}, + -2: {F: Float64(4.0)}, + }, + ByteMapping: map[bool][]byte{ + true: []byte("so be it"), + }, + } + if err := UnmarshalText(in, m); err != nil { + t.Fatal(err) + } + if !Equal(m, want) { + t.Errorf("\n got %v\nwant %v", m, want) + } +} + +func TestOneofParsing(t *testing.T) { + const in = `name:"Shrek"` + m := new(Communique) + want := &Communique{Union: &Communique_Name{"Shrek"}} + if err := UnmarshalText(in, m); err != nil { + t.Fatal(err) + } + if !Equal(m, want) { + t.Errorf("\n got %v\nwant %v", m, want) + } +} + +var benchInput string + +func init() { + benchInput = "count: 4\n" + for i := 0; i < 1000; i++ { + benchInput += "pet: \"fido\"\n" + } + + // Check it is valid input. + pb := new(MyMessage) + err := UnmarshalText(benchInput, pb) + if err != nil { + panic("Bad benchmark input: " + err.Error()) + } +} + +func BenchmarkUnmarshalText(b *testing.B) { + pb := new(MyMessage) + for i := 0; i < b.N; i++ { + UnmarshalText(benchInput, pb) + } + b.SetBytes(int64(len(benchInput))) +} diff --git a/vendor/github.com/gogo/protobuf/proto/text_test.go b/vendor/github.com/gogo/protobuf/proto/text_test.go new file mode 100644 index 000000000..652404842 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/proto/text_test.go @@ -0,0 +1,474 @@ +// 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. + +package proto_test + +import ( + "bytes" + "errors" + "io/ioutil" + "math" + "strings" + "testing" + + "github.com/gogo/protobuf/proto" + + proto3pb "github.com/gogo/protobuf/proto/proto3_proto" + pb "github.com/gogo/protobuf/proto/testdata" +) + +// textMessage implements the methods that allow it to marshal and unmarshal +// itself as text. +type textMessage struct { +} + +func (*textMessage) MarshalText() ([]byte, error) { + return []byte("custom"), nil +} + +func (*textMessage) UnmarshalText(bytes []byte) error { + if string(bytes) != "custom" { + return errors.New("expected 'custom'") + } + return nil +} + +func (*textMessage) Reset() {} +func (*textMessage) String() string { return "" } +func (*textMessage) ProtoMessage() {} + +func newTestMessage() *pb.MyMessage { + msg := &pb.MyMessage{ + Count: proto.Int32(42), + Name: proto.String("Dave"), + Quote: proto.String(`"I didn't want to go."`), + Pet: []string{"bunny", "kitty", "horsey"}, + Inner: &pb.InnerMessage{ + Host: proto.String("footrest.syd"), + Port: proto.Int32(7001), + Connected: proto.Bool(true), + }, + Others: []*pb.OtherMessage{ + { + Key: proto.Int64(0xdeadbeef), + Value: []byte{1, 65, 7, 12}, + }, + { + Weight: proto.Float32(6.022), + Inner: &pb.InnerMessage{ + Host: proto.String("lesha.mtv"), + Port: proto.Int32(8002), + }, + }, + }, + Bikeshed: pb.MyMessage_BLUE.Enum(), + Somegroup: &pb.MyMessage_SomeGroup{ + GroupField: proto.Int32(8), + }, + // One normally wouldn't do this. + // This is an undeclared tag 13, as a varint (wire type 0) with value 4. + XXX_unrecognized: []byte{13<<3 | 0, 4}, + } + ext := &pb.Ext{ + Data: proto.String("Big gobs for big rats"), + } + if err := proto.SetExtension(msg, pb.E_Ext_More, ext); err != nil { + panic(err) + } + greetings := []string{"adg", "easy", "cow"} + if err := proto.SetExtension(msg, pb.E_Greeting, greetings); err != nil { + panic(err) + } + + // Add an unknown extension. We marshal a pb.Ext, and fake the ID. + b, err := proto.Marshal(&pb.Ext{Data: proto.String("3G skiing")}) + if err != nil { + panic(err) + } + b = append(proto.EncodeVarint(201<<3|proto.WireBytes), b...) + proto.SetRawExtension(msg, 201, b) + + // Extensions can be plain fields, too, so let's test that. + b = append(proto.EncodeVarint(202<<3|proto.WireVarint), 19) + proto.SetRawExtension(msg, 202, b) + + return msg +} + +const text = `count: 42 +name: "Dave" +quote: "\"I didn't want to go.\"" +pet: "bunny" +pet: "kitty" +pet: "horsey" +inner: < + host: "footrest.syd" + port: 7001 + connected: true +> +others: < + key: 3735928559 + value: "\001A\007\014" +> +others: < + weight: 6.022 + inner: < + host: "lesha.mtv" + port: 8002 + > +> +bikeshed: BLUE +SomeGroup { + group_field: 8 +} +/* 2 unknown bytes */ +13: 4 +[testdata.Ext.more]: < + data: "Big gobs for big rats" +> +[testdata.greeting]: "adg" +[testdata.greeting]: "easy" +[testdata.greeting]: "cow" +/* 13 unknown bytes */ +201: "\t3G skiing" +/* 3 unknown bytes */ +202: 19 +` + +func TestMarshalText(t *testing.T) { + buf := new(bytes.Buffer) + if err := proto.MarshalText(buf, newTestMessage()); err != nil { + t.Fatalf("proto.MarshalText: %v", err) + } + s := buf.String() + if s != text { + t.Errorf("Got:\n===\n%v===\nExpected:\n===\n%v===\n", s, text) + } +} + +func TestMarshalTextCustomMessage(t *testing.T) { + buf := new(bytes.Buffer) + if err := proto.MarshalText(buf, &textMessage{}); err != nil { + t.Fatalf("proto.MarshalText: %v", err) + } + s := buf.String() + if s != "custom" { + t.Errorf("Got %q, expected %q", s, "custom") + } +} +func TestMarshalTextNil(t *testing.T) { + want := "" + tests := []proto.Message{nil, (*pb.MyMessage)(nil)} + for i, test := range tests { + buf := new(bytes.Buffer) + if err := proto.MarshalText(buf, test); err != nil { + t.Fatal(err) + } + if got := buf.String(); got != want { + t.Errorf("%d: got %q want %q", i, got, want) + } + } +} + +func TestMarshalTextUnknownEnum(t *testing.T) { + // The Color enum only specifies values 0-2. + m := &pb.MyMessage{Bikeshed: pb.MyMessage_Color(3).Enum()} + got := m.String() + const want = `bikeshed:3 ` + if got != want { + t.Errorf("\n got %q\nwant %q", got, want) + } +} + +func TestTextOneof(t *testing.T) { + tests := []struct { + m proto.Message + want string + }{ + // zero message + {&pb.Communique{}, ``}, + // scalar field + {&pb.Communique{Union: &pb.Communique_Number{Number: 4}}, `number:4`}, + // message field + {&pb.Communique{Union: &pb.Communique_Msg{ + Msg: &pb.Strings{StringField: proto.String("why hello!")}, + }}, `msg:`}, + // bad oneof (should not panic) + {&pb.Communique{Union: &pb.Communique_Msg{Msg: nil}}, `msg:/* nil */`}, + } + for _, test := range tests { + got := strings.TrimSpace(test.m.String()) + if got != test.want { + t.Errorf("\n got %s\nwant %s", got, test.want) + } + } +} + +func BenchmarkMarshalTextBuffered(b *testing.B) { + buf := new(bytes.Buffer) + m := newTestMessage() + for i := 0; i < b.N; i++ { + buf.Reset() + proto.MarshalText(buf, m) + } +} + +func BenchmarkMarshalTextUnbuffered(b *testing.B) { + w := ioutil.Discard + m := newTestMessage() + for i := 0; i < b.N; i++ { + proto.MarshalText(w, m) + } +} + +func compact(src string) string { + // s/[ \n]+/ /g; s/ $//; + dst := make([]byte, len(src)) + space, comment := false, false + j := 0 + for i := 0; i < len(src); i++ { + if strings.HasPrefix(src[i:], "/*") { + comment = true + i++ + continue + } + if comment && strings.HasPrefix(src[i:], "*/") { + comment = false + i++ + continue + } + if comment { + continue + } + c := src[i] + if c == ' ' || c == '\n' { + space = true + continue + } + if j > 0 && (dst[j-1] == ':' || dst[j-1] == '<' || dst[j-1] == '{') { + space = false + } + if c == '{' { + space = false + } + if space { + dst[j] = ' ' + j++ + space = false + } + dst[j] = c + j++ + } + if space { + dst[j] = ' ' + j++ + } + return string(dst[0:j]) +} + +var compactText = compact(text) + +func TestCompactText(t *testing.T) { + s := proto.CompactTextString(newTestMessage()) + if s != compactText { + t.Errorf("Got:\n===\n%v===\nExpected:\n===\n%v\n===\n", s, compactText) + } +} + +func TestStringEscaping(t *testing.T) { + testCases := []struct { + in *pb.Strings + out string + }{ + { + // Test data from C++ test (TextFormatTest.StringEscape). + // Single divergence: we don't escape apostrophes. + &pb.Strings{StringField: proto.String("\"A string with ' characters \n and \r newlines and \t tabs and \001 slashes \\ and multiple spaces")}, + "string_field: \"\\\"A string with ' characters \\n and \\r newlines and \\t tabs and \\001 slashes \\\\ and multiple spaces\"\n", + }, + { + // Test data from the same C++ test. + &pb.Strings{StringField: proto.String("\350\260\267\346\255\214")}, + "string_field: \"\\350\\260\\267\\346\\255\\214\"\n", + }, + { + // Some UTF-8. + &pb.Strings{StringField: proto.String("\x00\x01\xff\x81")}, + `string_field: "\000\001\377\201"` + "\n", + }, + } + + for i, tc := range testCases { + var buf bytes.Buffer + if err := proto.MarshalText(&buf, tc.in); err != nil { + t.Errorf("proto.MarsalText: %v", err) + continue + } + s := buf.String() + if s != tc.out { + t.Errorf("#%d: Got:\n%s\nExpected:\n%s\n", i, s, tc.out) + continue + } + + // Check round-trip. + pb := new(pb.Strings) + if err := proto.UnmarshalText(s, pb); err != nil { + t.Errorf("#%d: UnmarshalText: %v", i, err) + continue + } + if !proto.Equal(pb, tc.in) { + t.Errorf("#%d: Round-trip failed:\nstart: %v\n end: %v", i, tc.in, pb) + } + } +} + +// A limitedWriter accepts some output before it fails. +// This is a proxy for something like a nearly-full or imminently-failing disk, +// or a network connection that is about to die. +type limitedWriter struct { + b bytes.Buffer + limit int +} + +var outOfSpace = errors.New("proto: insufficient space") + +func (w *limitedWriter) Write(p []byte) (n int, err error) { + var avail = w.limit - w.b.Len() + if avail <= 0 { + return 0, outOfSpace + } + if len(p) <= avail { + return w.b.Write(p) + } + n, _ = w.b.Write(p[:avail]) + return n, outOfSpace +} + +func TestMarshalTextFailing(t *testing.T) { + // Try lots of different sizes to exercise more error code-paths. + for lim := 0; lim < len(text); lim++ { + buf := new(limitedWriter) + buf.limit = lim + err := proto.MarshalText(buf, newTestMessage()) + // We expect a certain error, but also some partial results in the buffer. + if err != outOfSpace { + t.Errorf("Got:\n===\n%v===\nExpected:\n===\n%v===\n", err, outOfSpace) + } + s := buf.b.String() + x := text[:buf.limit] + if s != x { + t.Errorf("Got:\n===\n%v===\nExpected:\n===\n%v===\n", s, x) + } + } +} + +func TestFloats(t *testing.T) { + tests := []struct { + f float64 + want string + }{ + {0, "0"}, + {4.7, "4.7"}, + {math.Inf(1), "inf"}, + {math.Inf(-1), "-inf"}, + {math.NaN(), "nan"}, + } + for _, test := range tests { + msg := &pb.FloatingPoint{F: &test.f} + got := strings.TrimSpace(msg.String()) + want := `f:` + test.want + if got != want { + t.Errorf("f=%f: got %q, want %q", test.f, got, want) + } + } +} + +func TestRepeatedNilText(t *testing.T) { + m := &pb.MessageList{ + Message: []*pb.MessageList_Message{ + nil, + { + Name: proto.String("Horse"), + }, + nil, + }, + } + want := `Message +Message { + name: "Horse" +} +Message +` + if s := proto.MarshalTextString(m); s != want { + t.Errorf(" got: %s\nwant: %s", s, want) + } +} + +func TestProto3Text(t *testing.T) { + tests := []struct { + m proto.Message + want string + }{ + // zero message + {&proto3pb.Message{}, ``}, + // zero message except for an empty byte slice + {&proto3pb.Message{Data: []byte{}}, ``}, + // trivial case + {&proto3pb.Message{Name: "Rob", HeightInCm: 175}, `name:"Rob" height_in_cm:175`}, + // empty map + {&pb.MessageWithMap{}, ``}, + // non-empty map; map format is the same as a repeated struct, + // and they are sorted by key (numerically for numeric keys). + { + &pb.MessageWithMap{NameMapping: map[int32]string{ + -1: "Negatory", + 7: "Lucky", + 1234: "Feist", + 6345789: "Otis", + }}, + `name_mapping: ` + + `name_mapping: ` + + `name_mapping: ` + + `name_mapping:`, + }, + // map with nil value; not well-defined, but we shouldn't crash + { + &pb.MessageWithMap{MsgMapping: map[int64]*pb.FloatingPoint{7: nil}}, + `msg_mapping:`, + }, + } + for _, test := range tests { + got := strings.TrimSpace(test.m.String()) + if got != test.want { + t.Errorf("\n got %s\nwant %s", got, test.want) + } + } +} diff --git a/vendor/github.com/gogo/protobuf/protobuf/google/protobuf/compiler/plugin.proto b/vendor/github.com/gogo/protobuf/protobuf/google/protobuf/compiler/plugin.proto new file mode 100644 index 000000000..5116167e0 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/protobuf/google/protobuf/compiler/plugin.proto @@ -0,0 +1,150 @@ +// Protocol Buffers - Google's data interchange format +// Copyright 2008 Google Inc. All rights reserved. +// https://developers.google.com/protocol-buffers/ +// +// 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. + +// Author: kenton@google.com (Kenton Varda) +// +// WARNING: The plugin interface is currently EXPERIMENTAL and is subject to +// change. +// +// protoc (aka the Protocol Compiler) can be extended via plugins. A plugin is +// just a program that reads a CodeGeneratorRequest from stdin and writes a +// CodeGeneratorResponse to stdout. +// +// Plugins written using C++ can use google/protobuf/compiler/plugin.h instead +// of dealing with the raw protocol defined here. +// +// A plugin executable needs only to be placed somewhere in the path. The +// plugin should be named "protoc-gen-$NAME", and will then be used when the +// flag "--${NAME}_out" is passed to protoc. + +syntax = "proto2"; +package google.protobuf.compiler; +option java_package = "com.google.protobuf.compiler"; +option java_outer_classname = "PluginProtos"; + +option go_package = "plugin_go"; + +import "google/protobuf/descriptor.proto"; + +// An encoded CodeGeneratorRequest is written to the plugin's stdin. +message CodeGeneratorRequest { + // The .proto files that were explicitly listed on the command-line. The + // code generator should generate code only for these files. Each file's + // descriptor will be included in proto_file, below. + repeated string file_to_generate = 1; + + // The generator parameter passed on the command-line. + optional string parameter = 2; + + // FileDescriptorProtos for all files in files_to_generate and everything + // they import. The files will appear in topological order, so each file + // appears before any file that imports it. + // + // protoc guarantees that all proto_files will be written after + // the fields above, even though this is not technically guaranteed by the + // protobuf wire format. This theoretically could allow a plugin to stream + // in the FileDescriptorProtos and handle them one by one rather than read + // the entire set into memory at once. However, as of this writing, this + // is not similarly optimized on protoc's end -- it will store all fields in + // memory at once before sending them to the plugin. + repeated FileDescriptorProto proto_file = 15; +} + +// The plugin writes an encoded CodeGeneratorResponse to stdout. +message CodeGeneratorResponse { + // Error message. If non-empty, code generation failed. The plugin process + // should exit with status code zero even if it reports an error in this way. + // + // This should be used to indicate errors in .proto files which prevent the + // code generator from generating correct code. Errors which indicate a + // problem in protoc itself -- such as the input CodeGeneratorRequest being + // unparseable -- should be reported by writing a message to stderr and + // exiting with a non-zero status code. + optional string error = 1; + + // Represents a single generated file. + message File { + // The file name, relative to the output directory. The name must not + // contain "." or ".." components and must be relative, not be absolute (so, + // the file cannot lie outside the output directory). "/" must be used as + // the path separator, not "\". + // + // If the name is omitted, the content will be appended to the previous + // file. This allows the generator to break large files into small chunks, + // and allows the generated text to be streamed back to protoc so that large + // files need not reside completely in memory at one time. Note that as of + // this writing protoc does not optimize for this -- it will read the entire + // CodeGeneratorResponse before writing files to disk. + optional string name = 1; + + // If non-empty, indicates that the named file should already exist, and the + // content here is to be inserted into that file at a defined insertion + // point. This feature allows a code generator to extend the output + // produced by another code generator. The original generator may provide + // insertion points by placing special annotations in the file that look + // like: + // @@protoc_insertion_point(NAME) + // The annotation can have arbitrary text before and after it on the line, + // which allows it to be placed in a comment. NAME should be replaced with + // an identifier naming the point -- this is what other generators will use + // as the insertion_point. Code inserted at this point will be placed + // immediately above the line containing the insertion point (thus multiple + // insertions to the same point will come out in the order they were added). + // The double-@ is intended to make it unlikely that the generated code + // could contain things that look like insertion points by accident. + // + // For example, the C++ code generator places the following line in the + // .pb.h files that it generates: + // // @@protoc_insertion_point(namespace_scope) + // This line appears within the scope of the file's package namespace, but + // outside of any particular class. Another plugin can then specify the + // insertion_point "namespace_scope" to generate additional classes or + // other declarations that should be placed in this scope. + // + // Note that if the line containing the insertion point begins with + // whitespace, the same whitespace will be added to every line of the + // inserted text. This is useful for languages like Python, where + // indentation matters. In these languages, the insertion point comment + // should be indented the same amount as any inserted code will need to be + // in order to work correctly in that context. + // + // The code generator that generates the initial file and the one which + // inserts into it must both run as part of a single invocation of protoc. + // Code generators are executed in the order in which they appear on the + // command line. + // + // If |insertion_point| is present, |name| must also be present. + optional string insertion_point = 2; + + // The file contents. + optional string content = 15; + } + repeated File file = 15; +} \ No newline at end of file diff --git a/vendor/github.com/gogo/protobuf/protobuf/google/protobuf/descriptor.proto b/vendor/github.com/gogo/protobuf/protobuf/google/protobuf/descriptor.proto new file mode 100644 index 000000000..14594a8c6 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/protobuf/google/protobuf/descriptor.proto @@ -0,0 +1,779 @@ +// Protocol Buffers - Google's data interchange format +// Copyright 2008 Google Inc. All rights reserved. +// https://developers.google.com/protocol-buffers/ +// +// 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. + +// Author: kenton@google.com (Kenton Varda) +// Based on original Protocol Buffers design by +// Sanjay Ghemawat, Jeff Dean, and others. +// +// The messages in this file describe the definitions found in .proto files. +// A valid .proto file can be translated directly to a FileDescriptorProto +// without any other information (e.g. without reading its imports). + + +syntax = "proto2"; + +package google.protobuf; +option go_package = "descriptor"; +option java_package = "com.google.protobuf"; +option java_outer_classname = "DescriptorProtos"; +option csharp_namespace = "Google.Protobuf.Reflection"; +option objc_class_prefix = "GPB"; + +// descriptor.proto must be optimized for speed because reflection-based +// algorithms don't work during bootstrapping. +option optimize_for = SPEED; + +// The protocol compiler can output a FileDescriptorSet containing the .proto +// files it parses. +message FileDescriptorSet { + repeated FileDescriptorProto file = 1; +} + +// Describes a complete .proto file. +message FileDescriptorProto { + optional string name = 1; // file name, relative to root of source tree + optional string package = 2; // e.g. "foo", "foo.bar", etc. + + // Names of files imported by this file. + repeated string dependency = 3; + // Indexes of the public imported files in the dependency list above. + repeated int32 public_dependency = 10; + // Indexes of the weak imported files in the dependency list. + // For Google-internal migration only. Do not use. + repeated int32 weak_dependency = 11; + + // All top-level definitions in this file. + repeated DescriptorProto message_type = 4; + repeated EnumDescriptorProto enum_type = 5; + repeated ServiceDescriptorProto service = 6; + repeated FieldDescriptorProto extension = 7; + + optional FileOptions options = 8; + + // 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. + optional SourceCodeInfo source_code_info = 9; + + // The syntax of the proto file. + // The supported values are "proto2" and "proto3". + optional string syntax = 12; +} + +// Describes a message type. +message DescriptorProto { + optional string name = 1; + + repeated FieldDescriptorProto field = 2; + repeated FieldDescriptorProto extension = 6; + + repeated DescriptorProto nested_type = 3; + repeated EnumDescriptorProto enum_type = 4; + + message ExtensionRange { + optional int32 start = 1; + optional int32 end = 2; + } + repeated ExtensionRange extension_range = 5; + + repeated OneofDescriptorProto oneof_decl = 8; + + optional MessageOptions options = 7; + + // 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. + message ReservedRange { + optional int32 start = 1; // Inclusive. + optional int32 end = 2; // Exclusive. + } + repeated ReservedRange reserved_range = 9; + // Reserved field names, which may not be used by fields in the same message. + // A given name may only be reserved once. + repeated string reserved_name = 10; +} + +// Describes a field within a message. +message FieldDescriptorProto { + enum Type { + // 0 is reserved for errors. + // Order is weird for historical reasons. + TYPE_DOUBLE = 1; + TYPE_FLOAT = 2; + // Not ZigZag encoded. Negative numbers take 10 bytes. Use TYPE_SINT64 if + // negative values are likely. + TYPE_INT64 = 3; + TYPE_UINT64 = 4; + // Not ZigZag encoded. Negative numbers take 10 bytes. Use TYPE_SINT32 if + // negative values are likely. + TYPE_INT32 = 5; + TYPE_FIXED64 = 6; + TYPE_FIXED32 = 7; + TYPE_BOOL = 8; + TYPE_STRING = 9; + TYPE_GROUP = 10; // Tag-delimited aggregate. + TYPE_MESSAGE = 11; // Length-delimited aggregate. + + // New in version 2. + TYPE_BYTES = 12; + TYPE_UINT32 = 13; + TYPE_ENUM = 14; + TYPE_SFIXED32 = 15; + TYPE_SFIXED64 = 16; + TYPE_SINT32 = 17; // Uses ZigZag encoding. + TYPE_SINT64 = 18; // Uses ZigZag encoding. + }; + + enum Label { + // 0 is reserved for errors + LABEL_OPTIONAL = 1; + LABEL_REQUIRED = 2; + LABEL_REPEATED = 3; + // TODO(sanjay): Should we add LABEL_MAP? + }; + + optional string name = 1; + optional int32 number = 3; + optional Label label = 4; + + // 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. + optional Type type = 5; + + // 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). + optional string type_name = 6; + + // For extensions, this is the name of the type being extended. It is + // resolved in the same manner as type_name. + optional string extendee = 2; + + // 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? + optional string default_value = 7; + + // If set, gives the index of a oneof in the containing type's oneof_decl + // list. This field is a member of that oneof. + optional int32 oneof_index = 9; + + // 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. + optional string json_name = 10; + + optional FieldOptions options = 8; +} + +// Describes a oneof. +message OneofDescriptorProto { + optional string name = 1; +} + +// Describes an enum type. +message EnumDescriptorProto { + optional string name = 1; + + repeated EnumValueDescriptorProto value = 2; + + optional EnumOptions options = 3; +} + +// Describes a value within an enum. +message EnumValueDescriptorProto { + optional string name = 1; + optional int32 number = 2; + + optional EnumValueOptions options = 3; +} + +// Describes a service. +message ServiceDescriptorProto { + optional string name = 1; + repeated MethodDescriptorProto method = 2; + + optional ServiceOptions options = 3; +} + +// Describes a method of a service. +message MethodDescriptorProto { + optional string name = 1; + + // Input and output type names. These are resolved in the same way as + // FieldDescriptorProto.type_name, but must refer to a message type. + optional string input_type = 2; + optional string output_type = 3; + + optional MethodOptions options = 4; + + // Identifies if client streams multiple client messages + optional bool client_streaming = 5 [default=false]; + // Identifies if server streams multiple server messages + optional bool server_streaming = 6 [default=false]; +} + + +// =================================================================== +// Options + +// Each of the definitions above may have "options" attached. These are +// just annotations which may cause code to be generated slightly differently +// or may contain hints for code that manipulates protocol messages. +// +// Clients may define custom options as extensions of the *Options messages. +// These extensions may not yet be known at parsing time, so the parser cannot +// store the values in them. Instead it stores them in a field in the *Options +// message called uninterpreted_option. This field must have the same name +// across all *Options messages. We then use this field to populate the +// extensions when we build a descriptor, at which point all protos have been +// parsed and so all extensions are known. +// +// Extension numbers for custom options may be chosen as follows: +// * For options which will only be used within a single application or +// organization, or for experimental options, use field numbers 50000 +// through 99999. It is up to you to ensure that you do not use the +// same number for multiple options. +// * For options which will be published and used publicly by multiple +// independent entities, e-mail protobuf-global-extension-registry@google.com +// to reserve extension numbers. Simply provide your project name (e.g. +// Objective-C plugin) and your project website (if available) -- there's no +// need to explain how you intend to use them. Usually you only need one +// extension number. You can declare multiple options with only one extension +// number by putting them in a sub-message. See the Custom Options section of +// the docs for examples: +// https://developers.google.com/protocol-buffers/docs/proto#options +// If this turns out to be popular, a web service will be set up +// to automatically assign option numbers. + + +message FileOptions { + + // 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. + optional string java_package = 1; + + + // 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). + optional string java_outer_classname = 8; + + // 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. + optional bool java_multiple_files = 10 [default=false]; + + // If set true, then the Java code generator will generate equals() and + // hashCode() methods for all messages defined in the .proto file. + // This increases generated code size, potentially substantially for large + // protos, which may harm a memory-constrained application. + // - In the full runtime this is a speed optimization, as the + // AbstractMessage base class includes reflection-based implementations of + // these methods. + // - In the lite runtime, setting this option changes the semantics of + // equals() and hashCode() to more closely match those of the full runtime; + // the generated methods compute their results based on field values rather + // than object identity. (Implementations should not assume that hashcodes + // will be consistent across runtimes or versions of the protocol compiler.) + optional bool java_generate_equals_and_hash = 20 [default=false]; + + // 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. + optional bool java_string_check_utf8 = 27 [default=false]; + + + // Generated classes can be optimized for speed or code size. + enum OptimizeMode { + SPEED = 1; // Generate complete code for parsing, serialization, + // etc. + CODE_SIZE = 2; // Use ReflectionOps to implement these methods. + LITE_RUNTIME = 3; // Generate code using MessageLite and the lite runtime. + } + optional OptimizeMode optimize_for = 9 [default=SPEED]; + + // 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. + optional string go_package = 11; + + + + // 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. + optional bool cc_generic_services = 16 [default=false]; + optional bool java_generic_services = 17 [default=false]; + optional bool py_generic_services = 18 [default=false]; + + // 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. + optional bool deprecated = 23 [default=false]; + + // Enables the use of arenas for the proto messages in this file. This applies + // only to generated classes for C++. + optional bool cc_enable_arenas = 31 [default=false]; + + + // Sets the objective c class prefix which is prepended to all objective c + // generated classes from this .proto. There is no default. + optional string objc_class_prefix = 36; + + // Namespace for generated classes; defaults to the package. + optional string csharp_namespace = 37; + + // Whether the nano proto compiler should generate in the deprecated non-nano + // suffixed package. + optional bool javanano_use_deprecated_package = 38; + + // The parser stores options it doesn't recognize here. See above. + repeated UninterpretedOption uninterpreted_option = 999; + + // Clients can define custom options in extensions of this message. See above. + extensions 1000 to max; +} + +message MessageOptions { + // 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. + optional bool message_set_wire_format = 1 [default=false]; + + // 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". + optional bool no_standard_descriptor_accessor = 2 [default=false]; + + // 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. + optional bool deprecated = 3 [default=false]; + + // 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. + optional bool map_entry = 7; + + // The parser stores options it doesn't recognize here. See above. + repeated UninterpretedOption uninterpreted_option = 999; + + // Clients can define custom options in extensions of this message. See above. + extensions 1000 to max; +} + +message FieldOptions { + // 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! + optional CType ctype = 1 [default = STRING]; + enum CType { + // Default mode. + STRING = 0; + + CORD = 1; + + STRING_PIECE = 2; + } + // 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. + optional bool packed = 2; + + + // 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. + optional JSType jstype = 6 [default = JS_NORMAL]; + enum JSType { + // Use the default type. + JS_NORMAL = 0; + + // Use JavaScript strings. + JS_STRING = 1; + + // Use JavaScript numbers. + JS_NUMBER = 2; + } + + // 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 outher 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. + optional bool lazy = 5 [default=false]; + + // 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. + optional bool deprecated = 3 [default=false]; + + // For Google-internal migration only. Do not use. + optional bool weak = 10 [default=false]; + + + // The parser stores options it doesn't recognize here. See above. + repeated UninterpretedOption uninterpreted_option = 999; + + // Clients can define custom options in extensions of this message. See above. + extensions 1000 to max; +} + +message EnumOptions { + + // Set this option to true to allow mapping different tag names to the same + // value. + optional bool allow_alias = 2; + + // 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. + optional bool deprecated = 3 [default=false]; + + // The parser stores options it doesn't recognize here. See above. + repeated UninterpretedOption uninterpreted_option = 999; + + // Clients can define custom options in extensions of this message. See above. + extensions 1000 to max; +} + +message EnumValueOptions { + // 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. + optional bool deprecated = 1 [default=false]; + + // The parser stores options it doesn't recognize here. See above. + repeated UninterpretedOption uninterpreted_option = 999; + + // Clients can define custom options in extensions of this message. See above. + extensions 1000 to max; +} + +message ServiceOptions { + + // Note: Field numbers 1 through 32 are reserved for Google's internal RPC + // framework. We apologize for hoarding these numbers to ourselves, but + // we were already using them long before we decided to release Protocol + // Buffers. + + // 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. + optional bool deprecated = 33 [default=false]; + + // The parser stores options it doesn't recognize here. See above. + repeated UninterpretedOption uninterpreted_option = 999; + + // Clients can define custom options in extensions of this message. See above. + extensions 1000 to max; +} + +message MethodOptions { + + // Note: Field numbers 1 through 32 are reserved for Google's internal RPC + // framework. We apologize for hoarding these numbers to ourselves, but + // we were already using them long before we decided to release Protocol + // Buffers. + + // 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. + optional bool deprecated = 33 [default=false]; + + // The parser stores options it doesn't recognize here. See above. + repeated UninterpretedOption uninterpreted_option = 999; + + // Clients can define custom options in extensions of this message. See above. + extensions 1000 to max; +} + + +// 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. +message UninterpretedOption { + // 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". + message NamePart { + required string name_part = 1; + required bool is_extension = 2; + } + repeated NamePart name = 2; + + // The value of the uninterpreted option, in whatever type the tokenizer + // identified it as during parsing. Exactly one of these should be set. + optional string identifier_value = 3; + optional uint64 positive_int_value = 4; + optional int64 negative_int_value = 5; + optional double double_value = 6; + optional bytes string_value = 7; + optional string aggregate_value = 8; +} + +// =================================================================== +// Optional source code info + +// Encapsulates information about the original source file from which a +// FileDescriptorProto was generated. +message SourceCodeInfo { + // 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. + repeated Location location = 1; + message Location { + // 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). + repeated int32 path = 1 [packed=true]; + + // 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. + repeated int32 span = 2 [packed=true]; + + // 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. + optional string leading_comments = 3; + optional string trailing_comments = 4; + repeated string leading_detached_comments = 6; + } +} \ No newline at end of file diff --git a/vendor/github.com/gogo/protobuf/protoc-gen-combo/combo.go b/vendor/github.com/gogo/protobuf/protoc-gen-combo/combo.go new file mode 100644 index 000000000..24068b2ee --- /dev/null +++ b/vendor/github.com/gogo/protobuf/protoc-gen-combo/combo.go @@ -0,0 +1,172 @@ +// Copyright (c) 2013, Vastech SA (PTY) LTD. All rights reserved. +// http://github.com/gogo/protobuf/gogoproto +// +// 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 main + +import ( + "bufio" + "bytes" + "flag" + "fmt" + "io/ioutil" + "os" + "os/exec" + "path/filepath" + "strings" + + "github.com/gogo/protobuf/version" +) + +type MixMatch struct { + Old []string + Filename string + Args []string + Plugins string +} + +func (this MixMatch) Gen(folder string, news []string) { + if err := os.MkdirAll(folder, 0777); err != nil { + panic(err) + } + data, err := ioutil.ReadFile(this.Filename) + if err != nil { + panic(err) + } + content := string(data) + for i, old := range this.Old { + if !strings.Contains(content, old) { + panic(fmt.Errorf("could not find string {%s} to replace with {%s}", old, news[i])) + } + content = strings.Replace(content, old, news[i], 1) + if strings.Contains(content, old) && old != news[i] { + panic(fmt.Errorf("found another string {%s} after it was replaced with {%s}", old, news[i])) + } + } + if err = ioutil.WriteFile(filepath.Join(folder, this.Filename), []byte(content), 0666); err != nil { + panic(err) + } + args := append([]string{"--gogo_out=" + this.Plugins + "."}, this.Args...) + args = append(args, filepath.Join(folder, this.Filename)) + var regenerate = exec.Command("protoc", args...) + out, err := regenerate.CombinedOutput() + + failed := false + scanner := bufio.NewScanner(bytes.NewReader(out)) + for scanner.Scan() { + text := scanner.Text() + fmt.Println("protoc-gen-combo: ", text) + if !strings.Contains(text, "WARNING") { + failed = true + } + } + + if err != nil { + fmt.Print("protoc-gen-combo: error: ", err) + failed = true + } + + if failed { + os.Exit(1) + } +} + +var min = flag.String("version", "2.3.0", "minimum protoc version") +var proto_path = flag.String("proto_path", ".", "") +var def = flag.Bool("default", true, "generate the case where everything is false") +var plugins = flag.String("plugins", "", "--gogo_out=plugins=:.") + +func main() { + flag.Parse() + if !version.AtLeast(*min) { + fmt.Printf("protoc version not high enough to parse this proto file\n") + return + } + args := flag.Args() + filename := args[0] + args = append([]string{"--proto_path=" + *proto_path}) + if _, err := exec.LookPath("protoc"); err != nil { + panic("cannot find protoc in PATH") + } + pluginStr := "" + if len(*plugins) > 0 { + pluginStr = "plugins=" + *plugins + ":" + } + m := MixMatch{ + Old: []string{ + "option (gogoproto.unmarshaler_all) = false;", + "option (gogoproto.marshaler_all) = false;", + "option (gogoproto.unsafe_unmarshaler_all) = false;", + "option (gogoproto.unsafe_marshaler_all) = false;", + }, + Filename: filename, + Args: args, + Plugins: pluginStr, + } + if *def { + m.Gen("./combos/neither/", []string{ + "option (gogoproto.unmarshaler_all) = false;", + "option (gogoproto.marshaler_all) = false;", + "option (gogoproto.unsafe_unmarshaler_all) = false;", + "option (gogoproto.unsafe_marshaler_all) = false;", + }) + } + m.Gen("./combos/marshaler/", []string{ + "option (gogoproto.unmarshaler_all) = false;", + "option (gogoproto.marshaler_all) = true;", + "option (gogoproto.unsafe_unmarshaler_all) = false;", + "option (gogoproto.unsafe_marshaler_all) = false;", + }) + m.Gen("./combos/unmarshaler/", []string{ + "option (gogoproto.unmarshaler_all) = true;", + "option (gogoproto.marshaler_all) = false;", + "option (gogoproto.unsafe_unmarshaler_all) = false;", + "option (gogoproto.unsafe_marshaler_all) = false;", + }) + m.Gen("./combos/both/", []string{ + "option (gogoproto.unmarshaler_all) = true;", + "option (gogoproto.marshaler_all) = true;", + "option (gogoproto.unsafe_unmarshaler_all) = false;", + "option (gogoproto.unsafe_marshaler_all) = false;", + }) + m.Gen("./combos/unsafemarshaler/", []string{ + "option (gogoproto.unmarshaler_all) = false;", + "option (gogoproto.marshaler_all) = false;", + "option (gogoproto.unsafe_unmarshaler_all) = false;", + "option (gogoproto.unsafe_marshaler_all) = true;", + }) + m.Gen("./combos/unsafeunmarshaler/", []string{ + "option (gogoproto.unmarshaler_all) = false;", + "option (gogoproto.marshaler_all) = false;", + "option (gogoproto.unsafe_unmarshaler_all) = true;", + "option (gogoproto.unsafe_marshaler_all) = false;", + }) + m.Gen("./combos/unsafeboth/", []string{ + "option (gogoproto.unmarshaler_all) = false;", + "option (gogoproto.marshaler_all) = false;", + "option (gogoproto.unsafe_unmarshaler_all) = true;", + "option (gogoproto.unsafe_marshaler_all) = true;", + }) +} diff --git a/vendor/github.com/gogo/protobuf/protoc-gen-gofast/main.go b/vendor/github.com/gogo/protobuf/protoc-gen-gofast/main.go new file mode 100644 index 000000000..b8ee60f7a --- /dev/null +++ b/vendor/github.com/gogo/protobuf/protoc-gen-gofast/main.go @@ -0,0 +1,48 @@ +// Extensions for Protocol Buffers to create more go like structures. +// +// Copyright (c) 2015, Vastech SA (PTY) LTD. All rights reserved. +// http://github.com/gogo/protobuf/gogoproto +// +// 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 main + +import ( + "github.com/gogo/protobuf/vanity" + "github.com/gogo/protobuf/vanity/command" +) + +func main() { + req := command.Read() + files := req.GetProtoFile() + + vanity.ForEachFile(files, vanity.TurnOffGogoImport) + + vanity.ForEachFile(files, vanity.TurnOnMarshalerAll) + vanity.ForEachFile(files, vanity.TurnOnSizerAll) + vanity.ForEachFile(files, vanity.TurnOnUnmarshalerAll) + + resp := command.Generate(req) + command.Write(resp) +} diff --git a/vendor/github.com/gogo/protobuf/protoc-gen-gogo/Makefile b/vendor/github.com/gogo/protobuf/protoc-gen-gogo/Makefile new file mode 100644 index 000000000..a42cc3717 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/protoc-gen-gogo/Makefile @@ -0,0 +1,33 @@ +# 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. + +test: + cd testdata && make test 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 000000000..d80ceffee --- /dev/null +++ b/vendor/github.com/gogo/protobuf/protoc-gen-gogo/descriptor/Makefile @@ -0,0 +1,33 @@ +# 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: + protoc --gogo_out=. -I=../../protobuf/google/protobuf ../../protobuf/google/protobuf/descriptor.proto 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 000000000..342d65a42 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/protoc-gen-gogo/descriptor/descriptor.pb.go @@ -0,0 +1,2017 @@ +// 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 + EnumOptions + EnumValueOptions + ServiceOptions + MethodOptions + UninterpretedOption + SourceCodeInfo +*/ +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. +const _ = proto.GoGoProtoPackageIsVersion1 + +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 + 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} +} + +// 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"` + 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 "" +} + +// 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"` + // If set true, then the Java code generator will generate equals() and + // hashCode() methods for all messages defined in the .proto file. + // This increases generated code size, potentially substantially for large + // protos, which may harm a memory-constrained application. + // - In the full runtime this is a speed optimization, as the + // AbstractMessage base class includes reflection-based implementations of + // these methods. + // - In the lite runtime, setting this option changes the semantics of + // equals() and hashCode() to more closely match those of the full runtime; + // the generated methods compute their results based on field values rather + // than object identity. (Implementations should not assume that hashcodes + // will be consistent across runtimes or versions of the protocol compiler.) + JavaGenerateEqualsAndHash *bool `protobuf:"varint,20,opt,name=java_generate_equals_and_hash,json=javaGenerateEqualsAndHash,def=0" 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"` + // Whether the nano proto compiler should generate in the deprecated non-nano + // suffixed package. + JavananoUseDeprecatedPackage *bool `protobuf:"varint,38,opt,name=javanano_use_deprecated_package,json=javananoUseDeprecatedPackage" json:"javanano_use_deprecated_package,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"` + XXX_extensions map[int32]proto.Extension `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{ + {1000, 536870911}, +} + +func (*FileOptions) ExtensionRangeArray() []proto.ExtensionRange { + return extRange_FileOptions +} +func (m *FileOptions) ExtensionMap() map[int32]proto.Extension { + if m.XXX_extensions == nil { + m.XXX_extensions = make(map[int32]proto.Extension) + } + return m.XXX_extensions +} + +const Default_FileOptions_JavaMultipleFiles bool = false +const Default_FileOptions_JavaGenerateEqualsAndHash 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 Default_FileOptions_JavaGenerateEqualsAndHash +} + +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) GetJavananoUseDeprecatedPackage() bool { + if m != nil && m.JavananoUseDeprecatedPackage != nil { + return *m.JavananoUseDeprecatedPackage + } + return false +} + +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"` + XXX_extensions map[int32]proto.Extension `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{ + {1000, 536870911}, +} + +func (*MessageOptions) ExtensionRangeArray() []proto.ExtensionRange { + return extRange_MessageOptions +} +func (m *MessageOptions) ExtensionMap() map[int32]proto.Extension { + if m.XXX_extensions == nil { + m.XXX_extensions = make(map[int32]proto.Extension) + } + return m.XXX_extensions +} + +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 outher 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"` + XXX_extensions map[int32]proto.Extension `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{ + {1000, 536870911}, +} + +func (*FieldOptions) ExtensionRangeArray() []proto.ExtensionRange { + return extRange_FieldOptions +} +func (m *FieldOptions) ExtensionMap() map[int32]proto.Extension { + if m.XXX_extensions == nil { + m.XXX_extensions = make(map[int32]proto.Extension) + } + return m.XXX_extensions +} + +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 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"` + XXX_extensions map[int32]proto.Extension `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{12} } + +var extRange_EnumOptions = []proto.ExtensionRange{ + {1000, 536870911}, +} + +func (*EnumOptions) ExtensionRangeArray() []proto.ExtensionRange { + return extRange_EnumOptions +} +func (m *EnumOptions) ExtensionMap() map[int32]proto.Extension { + if m.XXX_extensions == nil { + m.XXX_extensions = make(map[int32]proto.Extension) + } + return m.XXX_extensions +} + +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"` + XXX_extensions map[int32]proto.Extension `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{13} } + +var extRange_EnumValueOptions = []proto.ExtensionRange{ + {1000, 536870911}, +} + +func (*EnumValueOptions) ExtensionRangeArray() []proto.ExtensionRange { + return extRange_EnumValueOptions +} +func (m *EnumValueOptions) ExtensionMap() map[int32]proto.Extension { + if m.XXX_extensions == nil { + m.XXX_extensions = make(map[int32]proto.Extension) + } + return m.XXX_extensions +} + +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"` + XXX_extensions map[int32]proto.Extension `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{14} } + +var extRange_ServiceOptions = []proto.ExtensionRange{ + {1000, 536870911}, +} + +func (*ServiceOptions) ExtensionRangeArray() []proto.ExtensionRange { + return extRange_ServiceOptions +} +func (m *ServiceOptions) ExtensionMap() map[int32]proto.Extension { + if m.XXX_extensions == nil { + m.XXX_extensions = make(map[int32]proto.Extension) + } + return m.XXX_extensions +} + +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"` + // 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"` + XXX_extensions map[int32]proto.Extension `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{15} } + +var extRange_MethodOptions = []proto.ExtensionRange{ + {1000, 536870911}, +} + +func (*MethodOptions) ExtensionRangeArray() []proto.ExtensionRange { + return extRange_MethodOptions +} +func (m *MethodOptions) ExtensionMap() map[int32]proto.Extension { + if m.XXX_extensions == nil { + m.XXX_extensions = make(map[int32]proto.Extension) + } + return m.XXX_extensions +} + +const Default_MethodOptions_Deprecated bool = false + +func (m *MethodOptions) GetDeprecated() bool { + if m != nil && m.Deprecated != nil { + return *m.Deprecated + } + return Default_MethodOptions_Deprecated +} + +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{16} } + +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{16, 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{17} } + +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{17, 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 +} + +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((*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.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) +} + +var fileDescriptorDescriptor = []byte{ + // 2192 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xcc, 0x58, 0x4f, 0x73, 0xdb, 0xd6, + 0x11, 0x2f, 0xff, 0x8a, 0x5c, 0x52, 0x24, 0xf4, 0xac, 0xd8, 0xb4, 0x62, 0xc7, 0x31, 0x63, 0xc7, + 0x8e, 0xd3, 0xd2, 0x19, 0xb7, 0x49, 0x5c, 0xa5, 0x93, 0x0e, 0x45, 0xc2, 0x0a, 0x3d, 0x94, 0xc8, + 0x3e, 0x92, 0xad, 0x93, 0x0b, 0x06, 0x02, 0x1f, 0x29, 0xd8, 0x20, 0xc0, 0x02, 0xa0, 0x6d, 0xe5, + 0xd4, 0x99, 0x9e, 0xfa, 0x0d, 0x3a, 0x6d, 0xa7, 0x87, 0x5c, 0x32, 0xd3, 0x0f, 0xd0, 0x43, 0xef, + 0xbd, 0xf6, 0xd0, 0x73, 0x8f, 0x9d, 0x69, 0xb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b, 0x37, 0xd7, + 0x76, 0xbf, 0xba, 0xf3, 0x52, 0x60, 0x35, 0x44, 0x23, 0xd2, 0x84, 0x22, 0xb3, 0x17, 0x33, 0xe9, + 0x21, 0x77, 0x4e, 0xfe, 0x54, 0x44, 0xac, 0x7a, 0x29, 0x70, 0xb3, 0xc0, 0xc5, 0x96, 0xc7, 0xdc, + 0xe7, 0xa6, 0xc1, 0x6a, 0x79, 0xe1, 0xe0, 0xce, 0x9a, 0x83, 0x81, 0xd4, 0xaf, 0xfa, 0x08, 0xed, + 0x70, 0x2b, 0x45, 0xf6, 0xd2, 0x67, 0xb6, 0x67, 0x3a, 0x76, 0x6d, 0x4b, 0x38, 0xb9, 0xbd, 0xe1, + 0x14, 0x99, 0x35, 0x5e, 0x75, 0xb1, 0xb4, 0x23, 0x1f, 0xc0, 0x96, 0x33, 0xf7, 0xf1, 0x97, 0x57, + 0x2b, 0xe0, 0xf9, 0x94, 0x1e, 0x5c, 0xdb, 0x48, 0x84, 0x9e, 0xc4, 0xd0, 0x10, 0x4c, 0x3a, 0xa0, + 0x78, 0xce, 0xc2, 0x35, 0x98, 0x66, 0x38, 0x63, 0xa6, 0x99, 0xf6, 0xc4, 0xa9, 0x15, 0x85, 0x83, + 0x1b, 0xeb, 0x1b, 0x11, 0xc0, 0x16, 0xe2, 0x3a, 0x08, 0xa3, 0x15, 0x2f, 0xb1, 0x26, 0x97, 0x21, + 0xef, 0x9d, 0xd9, 0xbe, 0xfe, 0xb2, 0x56, 0x16, 0x0c, 0x09, 0x56, 0xf5, 0xff, 0xe4, 0xa0, 0x7a, + 0x11, 0x8a, 0x7d, 0x04, 0xb9, 0x09, 0xdf, 0x25, 0x12, 0xec, 0x7f, 0xc8, 0x81, 0xb4, 0x49, 0x26, + 0x31, 0xff, 0x35, 0x93, 0xd8, 0x84, 0x92, 0xcd, 0x3c, 0x9f, 0x8d, 0x25, 0x23, 0x32, 0x17, 0xe4, + 0x14, 0x48, 0xa3, 0x75, 0x4a, 0x65, 0xbf, 0x16, 0xa5, 0x9e, 0x40, 0x35, 0x0a, 0x49, 0x73, 0x75, + 0x7b, 0x1a, 0x72, 0xf3, 0xfe, 0xab, 0x22, 0x69, 0xa8, 0xa1, 0x1d, 0xe5, 0x66, 0xb4, 0xc2, 0x12, + 0x6b, 0xd2, 0x06, 0x70, 0x6c, 0xe6, 0x4c, 0xf0, 0x7a, 0x19, 0x16, 0xf2, 0x64, 0x73, 0x96, 0x7a, + 0x1c, 0xb2, 0x96, 0x25, 0x47, 0x4a, 0x0d, 0x8b, 0xfc, 0x78, 0x49, 0xb5, 0xad, 0x73, 0x98, 0x72, + 0x24, 0x2f, 0xd9, 0x1a, 0xdb, 0x46, 0x50, 0x71, 0x19, 0xe7, 0x3d, 0xa6, 0x58, 0xee, 0xac, 0x28, + 0x82, 0x68, 0xbc, 0x72, 0x67, 0x34, 0x30, 0x93, 0x1b, 0xdb, 0x76, 0xe3, 0x4b, 0xf2, 0x16, 0x44, + 0x02, 0x4d, 0xd0, 0x0a, 0x44, 0x15, 0x2a, 0x87, 0xc2, 0x63, 0x94, 0xed, 0x3d, 0x84, 0x4a, 0x32, + 0x3d, 0x64, 0x17, 0x72, 0x9e, 0xaf, 0xbb, 0xbe, 0x60, 0x61, 0x8e, 0xca, 0x05, 0x51, 0x20, 0x83, + 0x45, 0x46, 0x54, 0xb9, 0x1c, 0xe5, 0x3f, 0xf7, 0x3e, 0x84, 0xed, 0xc4, 0xe3, 0x2f, 0x6a, 0x58, + 0xff, 0x6d, 0x1e, 0x76, 0x37, 0x71, 0x6e, 0x23, 0xfd, 0xf1, 0xfa, 0x20, 0x03, 0x4e, 0x98, 0x8b, + 0xbc, 0xe3, 0x1e, 0x82, 0x15, 0x32, 0x2a, 0x67, 0xe9, 0x27, 0xcc, 0x42, 0x36, 0xa5, 0xee, 0x56, + 0x1e, 0xbc, 0x7b, 0x21, 0x56, 0x37, 0xba, 0xdc, 0x84, 0x4a, 0x4b, 0xf2, 0x31, 0x64, 0x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 0x02, 0x00, 0x8f, 0xc8, 0x23, 0x87, 0x70, 0x5d, 0x98, 0x4d, 0x99, 0xcd, 0x5c, 0xdd, 0x67, 0x1a, + 0xfb, 0xe5, 0x02, 0xb1, 0x9a, 0x6e, 0x8f, 0xb5, 0x53, 0xdd, 0x3b, 0xad, 0xed, 0xc6, 0x1d, 0x5c, + 0xe5, 0xd8, 0xc3, 0x00, 0xaa, 0x0a, 0x64, 0xd3, 0x1e, 0x7f, 0x82, 0x38, 0xb2, 0x0f, 0x97, 0x85, + 0x23, 0x4c, 0x0a, 0xee, 0x59, 0x33, 0x4e, 0x99, 0xf1, 0x4c, 0x5b, 0xf8, 0x93, 0x87, 0xb5, 0xd7, + 0xe3, 0x1e, 0x44, 0x90, 0x03, 0x81, 0x69, 0x71, 0xc8, 0x08, 0x11, 0x64, 0x00, 0x65, 0x7e, 0x1e, + 0x33, 0xf3, 0x73, 0x0c, 0xdb, 0x71, 0x45, 0x8f, 0xa8, 0x6c, 0xb8, 0xdc, 0xb1, 0x24, 0x36, 0x7a, + 0x81, 0xc1, 0x11, 0xce, 0xa7, 0xfb, 0xb9, 0x41, 0x5f, 0x55, 0xdb, 0xb4, 0x14, 0x7a, 0x79, 0xe4, + 0xb8, 0x9c, 0x53, 0x53, 0x27, 0xca, 0x71, 0x49, 0x72, 0x6a, 0xea, 0x84, 0x19, 0xc6, 0x7c, 0x19, + 0x86, 0xdc, 0x36, 0xbe, 0xbb, 0x04, 0xc3, 0xba, 0x57, 0x53, 0x12, 0xf9, 0x32, 0x8c, 0x43, 0x09, + 0x08, 0x68, 0xee, 0xe1, 0x95, 0x78, 0x6d, 0x99, 0xaf, 0xb8, 0xe1, 0xce, 0xda, 0x2e, 0x57, 0x4d, + 0xf1, 0x89, 0xf3, 0xb3, 0x75, 0x43, 0x92, 0x78, 0xe2, 0xfc, 0x6c, 0xd5, 0xec, 0xb6, 0x78, 0x01, + 0x73, 0x99, 0x81, 0x29, 0x1f, 0xd7, 0xae, 0xc4, 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+ 0x6f, 0x05, 0x62, 0xfe, 0x5d, 0xdc, 0x77, 0x75, 0xd3, 0x4a, 0x60, 0xb3, 0x02, 0xab, 0x84, 0x8a, + 0x08, 0xbc, 0x0f, 0x57, 0x43, 0xbf, 0x63, 0xe6, 0xeb, 0x38, 0x3c, 0x8f, 0x97, 0x46, 0x79, 0xf1, + 0xb5, 0xeb, 0x4a, 0x00, 0x68, 0x07, 0xfa, 0xd0, 0xf6, 0xe0, 0x09, 0x0e, 0xb2, 0xce, 0x6c, 0x35, + 0x13, 0x07, 0xca, 0xca, 0x7b, 0x97, 0xf7, 0x49, 0xea, 0x33, 0x58, 0x0e, 0x15, 0x5f, 0xa4, 0x33, + 0x87, 0xfd, 0x83, 0x3f, 0xa5, 0xf7, 0x0e, 0xa5, 0x5d, 0x3f, 0xcc, 0x20, 0x65, 0x13, 0x8b, 0x19, + 0x3c, 0x3b, 0xff, 0x0d, 0x00, 0x00, 0xff, 0xff, 0x78, 0x42, 0x69, 0x71, 0xb3, 0x18, 0x00, 0x00, +} diff --git a/vendor/github.com/gogo/protobuf/protoc-gen-gogo/descriptor/gostring.go b/vendor/github.com/gogo/protobuf/protoc-gen-gogo/descriptor/gostring.go new file mode 100644 index 000000000..76e2c95f9 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/protoc-gen-gogo/descriptor/gostring.go @@ -0,0 +1,635 @@ +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" + +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, 5) + s = append(s, "&descriptor.OneofDescriptorProto{") + if this.Name != nil { + s = append(s, "Name: "+valueToGoStringDescriptor(this.Name, "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 *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.JavananoUseDeprecatedPackage != nil { + s = append(s, "JavananoUseDeprecatedPackage: "+valueToGoStringDescriptor(this.JavananoUseDeprecatedPackage, "bool")+",\n") + } + if this.UninterpretedOption != nil { + s = append(s, "UninterpretedOption: "+fmt.Sprintf("%#v", this.UninterpretedOption)+",\n") + } + if this.XXX_extensions != nil { + s = append(s, "XXX_extensions: "+extensionToGoStringDescriptor(this.XXX_extensions)+",\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") + } + if this.XXX_extensions != nil { + s = append(s, "XXX_extensions: "+extensionToGoStringDescriptor(this.XXX_extensions)+",\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") + } + if this.XXX_extensions != nil { + s = append(s, "XXX_extensions: "+extensionToGoStringDescriptor(this.XXX_extensions)+",\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") + } + if this.XXX_extensions != nil { + s = append(s, "XXX_extensions: "+extensionToGoStringDescriptor(this.XXX_extensions)+",\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") + } + if this.XXX_extensions != nil { + s = append(s, "XXX_extensions: "+extensionToGoStringDescriptor(this.XXX_extensions)+",\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") + } + if this.XXX_extensions != nil { + s = append(s, "XXX_extensions: "+extensionToGoStringDescriptor(this.XXX_extensions)+",\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, 6) + s = append(s, "&descriptor.MethodOptions{") + 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") + } + if this.XXX_extensions != nil { + s = append(s, "XXX_extensions: "+extensionToGoStringDescriptor(this.XXX_extensions)+",\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 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(e map[int32]github_com_gogo_protobuf_proto.Extension) string { + if e == nil { + return "nil" + } + s := "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 000000000..ab170f913 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/protoc-gen-gogo/descriptor/helper.go @@ -0,0 +1,355 @@ +// Copyright (c) 2013, Vastech SA (PTY) LTD. 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) 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 (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 (m *DescriptorProto) HasExtension() bool { + return len(m.ExtensionRange) > 0 +} diff --git a/vendor/github.com/gogo/protobuf/protoc-gen-gogo/doc.go b/vendor/github.com/gogo/protobuf/protoc-gen-gogo/doc.go new file mode 100644 index 000000000..15c7cf43c --- /dev/null +++ b/vendor/github.com/gogo/protobuf/protoc-gen-gogo/doc.go @@ -0,0 +1,51 @@ +// 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. + +/* + A plugin for the Google protocol buffer compiler to generate Go code. + Run it by building this program and putting it in your path with the name + protoc-gen-gogo + That word 'gogo' at the end becomes part of the option string set for the + protocol compiler, so once the protocol compiler (protoc) is installed + you can run + protoc --gogo_out=output_directory input_directory/file.proto + to generate Go bindings for the protocol defined by file.proto. + With that input, the output will be written to + output_directory/go_package/file.pb.go + + The generated code is documented in the package comment for + the library. + + See the README and documentation for protocol buffers to learn more: + https://developers.google.com/protocol-buffers/ + +*/ +package documentation diff --git a/vendor/github.com/gogo/protobuf/protoc-gen-gogo/generator/generator.go b/vendor/github.com/gogo/protobuf/protoc-gen-gogo/generator/generator.go new file mode 100644 index 000000000..cbd5c465d --- /dev/null +++ b/vendor/github.com/gogo/protobuf/protoc-gen-gogo/generator/generator.go @@ -0,0 +1,3129 @@ +// Extensions for Protocol Buffers to create more go like structures. +// +// Copyright (c) 2013, Vastech SA (PTY) LTD. All rights reserved. +// http://github.com/gogo/protobuf/gogoproto +// +// 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. + +/* + The code generator for the plugin for the Google protocol buffer compiler. + It generates Go code from the protocol buffer description files read by the + main routine. +*/ +package generator + +import ( + "bufio" + "bytes" + "compress/gzip" + "fmt" + "go/parser" + "go/printer" + "go/token" + "log" + "os" + "path" + "sort" + "strconv" + "strings" + "unicode" + "unicode/utf8" + + "github.com/gogo/protobuf/gogoproto" + "github.com/gogo/protobuf/proto" + descriptor "github.com/gogo/protobuf/protoc-gen-gogo/descriptor" + plugin "github.com/gogo/protobuf/protoc-gen-gogo/plugin" +) + +// generatedCodeVersion indicates a version of the generated code. +// It is incremented whenever an incompatibility between the generated code and +// proto package is introduced; the generated code references +// a constant, proto.ProtoPackageIsVersionN (where N is generatedCodeVersion). +const generatedCodeVersion = 1 + +// A Plugin provides functionality to add to the output during Go code generation, +// such as to produce RPC stubs. +type Plugin interface { + // Name identifies the plugin. + Name() string + // Init is called once after data structures are built but before + // code generation begins. + Init(g *Generator) + // Generate produces the code generated by the plugin for this file, + // except for the imports, by calling the generator's methods P, In, and Out. + Generate(file *FileDescriptor) + // GenerateImports produces the import declarations for this file. + // It is called after Generate. + GenerateImports(file *FileDescriptor) +} + +type pluginSlice []Plugin + +func (ps pluginSlice) Len() int { + return len(ps) +} + +func (ps pluginSlice) Less(i, j int) bool { + return ps[i].Name() < ps[j].Name() +} + +func (ps pluginSlice) Swap(i, j int) { + ps[i], ps[j] = ps[j], ps[i] +} + +var plugins pluginSlice + +// RegisterPlugin installs a (second-order) plugin to be run when the Go output is generated. +// It is typically called during initialization. +func RegisterPlugin(p Plugin) { + plugins = append(plugins, p) +} + +// Each type we import as a protocol buffer (other than FileDescriptorProto) needs +// a pointer to the FileDescriptorProto that represents it. These types achieve that +// wrapping by placing each Proto inside a struct with the pointer to its File. The +// structs have the same names as their contents, with "Proto" removed. +// FileDescriptor is used to store the things that it points to. + +// The file and package name method are common to messages and enums. +type common struct { + file *descriptor.FileDescriptorProto // File this object comes from. +} + +// PackageName is name in the package clause in the generated file. +func (c *common) PackageName() string { return uniquePackageOf(c.file) } + +func (c *common) File() *descriptor.FileDescriptorProto { return c.file } + +func fileIsProto3(file *descriptor.FileDescriptorProto) bool { + return file.GetSyntax() == "proto3" +} + +func (c *common) proto3() bool { return fileIsProto3(c.file) } + +// Descriptor represents a protocol buffer message. +type Descriptor struct { + common + *descriptor.DescriptorProto + parent *Descriptor // The containing message, if any. + nested []*Descriptor // Inner messages, if any. + enums []*EnumDescriptor // Inner enums, if any. + ext []*ExtensionDescriptor // Extensions, if any. + typename []string // Cached typename vector. + index int // The index into the container, whether the file or another message. + path string // The SourceCodeInfo path as comma-separated integers. + group bool +} + +// TypeName returns the elements of the dotted type name. +// The package name is not part of this name. +func (d *Descriptor) TypeName() []string { + if d.typename != nil { + return d.typename + } + n := 0 + for parent := d; parent != nil; parent = parent.parent { + n++ + } + s := make([]string, n, n) + for parent := d; parent != nil; parent = parent.parent { + n-- + s[n] = parent.GetName() + } + d.typename = s + return s +} + +func (d *Descriptor) allowOneof() bool { + return true +} + +// EnumDescriptor describes an enum. If it's at top level, its parent will be nil. +// Otherwise it will be the descriptor of the message in which it is defined. +type EnumDescriptor struct { + common + *descriptor.EnumDescriptorProto + parent *Descriptor // The containing message, if any. + typename []string // Cached typename vector. + index int // The index into the container, whether the file or a message. + path string // The SourceCodeInfo path as comma-separated integers. +} + +// TypeName returns the elements of the dotted type name. +// The package name is not part of this name. +func (e *EnumDescriptor) TypeName() (s []string) { + if e.typename != nil { + return e.typename + } + name := e.GetName() + if e.parent == nil { + s = make([]string, 1) + } else { + pname := e.parent.TypeName() + s = make([]string, len(pname)+1) + copy(s, pname) + } + s[len(s)-1] = name + e.typename = s + return s +} + +// alias provides the TypeName corrected for the application of any naming +// extensions on the enum type. It should be used for generating references to +// the Go types and for calculating prefixes. +func (e *EnumDescriptor) alias() (s []string) { + s = e.TypeName() + if gogoproto.IsEnumCustomName(e.EnumDescriptorProto) { + s[len(s)-1] = gogoproto.GetEnumCustomName(e.EnumDescriptorProto) + } + + return +} + +// Everything but the last element of the full type name, CamelCased. +// The values of type Foo.Bar are call Foo_value1... not Foo_Bar_value1... . +func (e *EnumDescriptor) prefix() string { + typeName := e.alias() + if e.parent == nil { + // If the enum is not part of a message, the prefix is just the type name. + return CamelCase(typeName[len(typeName)-1]) + "_" + } + return CamelCaseSlice(typeName[0:len(typeName)-1]) + "_" +} + +// The integer value of the named constant in this enumerated type. +func (e *EnumDescriptor) integerValueAsString(name string) string { + for _, c := range e.Value { + if c.GetName() == name { + return fmt.Sprint(c.GetNumber()) + } + } + log.Fatal("cannot find value for enum constant") + return "" +} + +// ExtensionDescriptor describes an extension. If it's at top level, its parent will be nil. +// Otherwise it will be the descriptor of the message in which it is defined. +type ExtensionDescriptor struct { + common + *descriptor.FieldDescriptorProto + parent *Descriptor // The containing message, if any. +} + +// TypeName returns the elements of the dotted type name. +// The package name is not part of this name. +func (e *ExtensionDescriptor) TypeName() (s []string) { + name := e.GetName() + if e.parent == nil { + // top-level extension + s = make([]string, 1) + } else { + pname := e.parent.TypeName() + s = make([]string, len(pname)+1) + copy(s, pname) + } + s[len(s)-1] = name + return s +} + +// DescName returns the variable name used for the generated descriptor. +func (e *ExtensionDescriptor) DescName() string { + // The full type name. + typeName := e.TypeName() + // Each scope of the extension is individually CamelCased, and all are joined with "_" with an "E_" prefix. + for i, s := range typeName { + typeName[i] = CamelCase(s) + } + return "E_" + strings.Join(typeName, "_") +} + +// ImportedDescriptor describes a type that has been publicly imported from another file. +type ImportedDescriptor struct { + common + o Object +} + +func (id *ImportedDescriptor) TypeName() []string { return id.o.TypeName() } + +// FileDescriptor describes an protocol buffer descriptor file (.proto). +// It includes slices of all the messages and enums defined within it. +// Those slices are constructed by WrapTypes. +type FileDescriptor struct { + *descriptor.FileDescriptorProto + desc []*Descriptor // All the messages defined in this file. + enum []*EnumDescriptor // All the enums defined in this file. + ext []*ExtensionDescriptor // All the top-level extensions defined in this file. + imp []*ImportedDescriptor // All types defined in files publicly imported by this file. + + // Comments, stored as a map of path (comma-separated integers) to the comment. + comments map[string]*descriptor.SourceCodeInfo_Location + + // The full list of symbols that are exported, + // as a map from the exported object to its symbols. + // This is used for supporting public imports. + exported map[Object][]symbol + + index int // The index of this file in the list of files to generate code for + + proto3 bool // whether to generate proto3 code for this file +} + +// PackageName is the package name we'll use in the generated code to refer to this file. +func (d *FileDescriptor) PackageName() string { return uniquePackageOf(d.FileDescriptorProto) } + +// goPackageName returns the Go package name to use in the +// generated Go file. The result explicit reports whether the name +// came from an option go_package statement. If explicit is false, +// the name was derived from the protocol buffer's package statement +// or the input file name. +func (d *FileDescriptor) goPackageName() (name string, explicit bool) { + // Does the file have a "go_package" option? + if opts := d.Options; opts != nil { + if pkg := opts.GetGoPackage(); pkg != "" { + return pkg, true + } + } + + // Does the file have a package clause? + if pkg := d.GetPackage(); pkg != "" { + return pkg, false + } + // Use the file base name. + return baseName(d.GetName()), false +} + +func (d *FileDescriptor) addExport(obj Object, sym symbol) { + d.exported[obj] = append(d.exported[obj], sym) +} + +// symbol is an interface representing an exported Go symbol. +type symbol interface { + // GenerateAlias should generate an appropriate alias + // for the symbol from the named package. + GenerateAlias(g *Generator, pkg string) +} + +type messageSymbol struct { + sym string + hasExtensions, isMessageSet bool + hasOneof bool + getters []getterSymbol +} + +type getterSymbol struct { + name string + typ string + typeName string // canonical name in proto world; empty for proto.Message and similar + genType bool // whether typ contains a generated type (message/group/enum) +} + +func (ms *messageSymbol) GenerateAlias(g *Generator, pkg string) { + remoteSym := pkg + "." + ms.sym + + g.P("type ", ms.sym, " ", remoteSym) + g.P("func (m *", ms.sym, ") Reset() { (*", remoteSym, ")(m).Reset() }") + g.P("func (m *", ms.sym, ") String() string { return (*", remoteSym, ")(m).String() }") + g.P("func (*", ms.sym, ") ProtoMessage() {}") + if ms.hasExtensions { + g.P("func (*", ms.sym, ") ExtensionRangeArray() []", g.Pkg["proto"], ".ExtensionRange ", + "{ return (*", remoteSym, ")(nil).ExtensionRangeArray() }") + g.P("func (m *", ms.sym, ") ExtensionMap() map[int32]", g.Pkg["proto"], ".Extension ", + "{ return (*", remoteSym, ")(m).ExtensionMap() }") + if ms.isMessageSet { + g.P("func (m *", ms.sym, ") Marshal() ([]byte, error) ", + "{ return (*", remoteSym, ")(m).Marshal() }") + g.P("func (m *", ms.sym, ") Unmarshal(buf []byte) error ", + "{ return (*", remoteSym, ")(m).Unmarshal(buf) }") + } + } + if ms.hasOneof { + // Oneofs and public imports do not mix well. + // We can make them work okay for the binary format, + // but they're going to break weirdly for text/JSON. + enc := "_" + ms.sym + "_OneofMarshaler" + dec := "_" + ms.sym + "_OneofUnmarshaler" + size := "_" + ms.sym + "_OneofSizer" + encSig := "(msg " + g.Pkg["proto"] + ".Message, b *" + g.Pkg["proto"] + ".Buffer) error" + decSig := "(msg " + g.Pkg["proto"] + ".Message, tag, wire int, b *" + g.Pkg["proto"] + ".Buffer) (bool, error)" + sizeSig := "(msg " + g.Pkg["proto"] + ".Message) int" + g.P("func (m *", ms.sym, ") XXX_OneofFuncs() (func", encSig, ", func", decSig, ", func", sizeSig, ", []interface{}) {") + g.P("return ", enc, ", ", dec, ", ", size, ", nil") + g.P("}") + + g.P("func ", enc, encSig, " {") + g.P("m := msg.(*", ms.sym, ")") + g.P("m0 := (*", remoteSym, ")(m)") + g.P("enc, _, _, _ := m0.XXX_OneofFuncs()") + g.P("return enc(m0, b)") + g.P("}") + + g.P("func ", dec, decSig, " {") + g.P("m := msg.(*", ms.sym, ")") + g.P("m0 := (*", remoteSym, ")(m)") + g.P("_, dec, _, _ := m0.XXX_OneofFuncs()") + g.P("return dec(m0, tag, wire, b)") + g.P("}") + + g.P("func ", size, sizeSig, " {") + g.P("m := msg.(*", ms.sym, ")") + g.P("m0 := (*", remoteSym, ")(m)") + g.P("_, _, size, _ := m0.XXX_OneofFuncs()") + g.P("return size(m0)") + g.P("}") + } + for _, get := range ms.getters { + + if get.typeName != "" { + g.RecordTypeUse(get.typeName) + } + typ := get.typ + val := "(*" + remoteSym + ")(m)." + get.name + "()" + if get.genType { + // typ will be "*pkg.T" (message/group) or "pkg.T" (enum) + // or "map[t]*pkg.T" (map to message/enum). + // The first two of those might have a "[]" prefix if it is repeated. + // Drop any package qualifier since we have hoisted the type into this package. + rep := strings.HasPrefix(typ, "[]") + if rep { + typ = typ[2:] + } + isMap := strings.HasPrefix(typ, "map[") + star := typ[0] == '*' + if !isMap { // map types handled lower down + typ = typ[strings.Index(typ, ".")+1:] + } + if star { + typ = "*" + typ + } + if rep { + // Go does not permit conversion between slice types where both + // element types are named. That means we need to generate a bit + // of code in this situation. + // typ is the element type. + // val is the expression to get the slice from the imported type. + + ctyp := typ // conversion type expression; "Foo" or "(*Foo)" + if star { + ctyp = "(" + typ + ")" + } + + g.P("func (m *", ms.sym, ") ", get.name, "() []", typ, " {") + g.In() + g.P("o := ", val) + g.P("if o == nil {") + g.In() + g.P("return nil") + g.Out() + g.P("}") + g.P("s := make([]", typ, ", len(o))") + g.P("for i, x := range o {") + g.In() + g.P("s[i] = ", ctyp, "(x)") + g.Out() + g.P("}") + g.P("return s") + g.Out() + g.P("}") + continue + } + if isMap { + // Split map[keyTyp]valTyp. + bra, ket := strings.Index(typ, "["), strings.Index(typ, "]") + keyTyp, valTyp := typ[bra+1:ket], typ[ket+1:] + // Drop any package qualifier. + // Only the value type may be foreign. + star := valTyp[0] == '*' + valTyp = valTyp[strings.Index(valTyp, ".")+1:] + if star { + valTyp = "*" + valTyp + } + + maptyp := "map[" + keyTyp + "]" + valTyp + g.P("func (m *", ms.sym, ") ", get.name, "() ", typ, " {") + g.P("o := ", val) + g.P("if o == nil { return nil }") + g.P("s := make(", maptyp, ", len(o))") + g.P("for k, v := range o {") + g.P("s[k] = (", valTyp, ")(v)") + g.P("}") + g.P("return s") + g.P("}") + continue + } + // Convert imported type into the forwarding type. + val = "(" + typ + ")(" + val + ")" + } + + g.P("func (m *", ms.sym, ") ", get.name, "() ", typ, " { return ", val, " }") + } + +} + +type enumSymbol struct { + name string + proto3 bool // Whether this came from a proto3 file. +} + +func (es enumSymbol) GenerateAlias(g *Generator, pkg string) { + s := es.name + g.P("type ", s, " ", pkg, ".", s) + g.P("var ", s, "_name = ", pkg, ".", s, "_name") + g.P("var ", s, "_value = ", pkg, ".", s, "_value") + g.P("func (x ", s, ") String() string { return (", pkg, ".", s, ")(x).String() }") + if !es.proto3 { + g.P("func (x ", s, ") Enum() *", s, "{ return (*", s, ")((", pkg, ".", s, ")(x).Enum()) }") + g.P("func (x *", s, ") UnmarshalJSON(data []byte) error { return (*", pkg, ".", s, ")(x).UnmarshalJSON(data) }") + } +} + +type constOrVarSymbol struct { + sym string + typ string // either "const" or "var" + cast string // if non-empty, a type cast is required (used for enums) +} + +func (cs constOrVarSymbol) GenerateAlias(g *Generator, pkg string) { + v := pkg + "." + cs.sym + if cs.cast != "" { + v = cs.cast + "(" + v + ")" + } + g.P(cs.typ, " ", cs.sym, " = ", v) +} + +// Object is an interface abstracting the abilities shared by enums, messages, extensions and imported objects. +type Object interface { + PackageName() string // The name we use in our output (a_b_c), possibly renamed for uniqueness. + TypeName() []string + File() *descriptor.FileDescriptorProto +} + +// Each package name we generate must be unique. The package we're generating +// gets its own name but every other package must have a unique name that does +// not conflict in the code we generate. These names are chosen globally (although +// they don't have to be, it simplifies things to do them globally). +func uniquePackageOf(fd *descriptor.FileDescriptorProto) string { + s, ok := uniquePackageName[fd] + if !ok { + log.Fatal("internal error: no package name defined for " + fd.GetName()) + } + return s +} + +// Generator is the type whose methods generate the output, stored in the associated response structure. +type Generator struct { + *bytes.Buffer + + Request *plugin.CodeGeneratorRequest // The input. + Response *plugin.CodeGeneratorResponse // The output. + + Param map[string]string // Command-line parameters. + PackageImportPath string // Go import path of the package we're generating code for + ImportPrefix string // String to prefix to imported package file names. + ImportMap map[string]string // Mapping from import name to generated name + + Pkg map[string]string // The names under which we import support packages + + packageName string // What we're calling ourselves. + allFiles []*FileDescriptor // All files in the tree + allFilesByName map[string]*FileDescriptor // All files by filename. + genFiles []*FileDescriptor // Those files we will generate output for. + file *FileDescriptor // The file we are compiling now. + usedPackages map[string]bool // Names of packages used in current file. + typeNameToObject map[string]Object // Key is a fully-qualified name in input syntax. + init []string // Lines to emit in the init function. + indent string + writeOutput bool + + customImports []string + writtenImports map[string]bool // For de-duplicating written imports +} + +// New creates a new generator and allocates the request and response protobufs. +func New() *Generator { + g := new(Generator) + g.Buffer = new(bytes.Buffer) + g.Request = new(plugin.CodeGeneratorRequest) + g.Response = new(plugin.CodeGeneratorResponse) + g.writtenImports = make(map[string]bool) + uniquePackageName = make(map[*descriptor.FileDescriptorProto]string) + pkgNamesInUse = make(map[string][]*FileDescriptor) + return g +} + +// Error reports a problem, including an error, and exits the program. +func (g *Generator) Error(err error, msgs ...string) { + s := strings.Join(msgs, " ") + ":" + err.Error() + log.Print("protoc-gen-gogo: error:", s) + os.Exit(1) +} + +// Fail reports a problem and exits the program. +func (g *Generator) Fail(msgs ...string) { + s := strings.Join(msgs, " ") + log.Print("protoc-gen-gogo: error:", s) + os.Exit(1) +} + +// CommandLineParameters breaks the comma-separated list of key=value pairs +// in the parameter (a member of the request protobuf) into a key/value map. +// It then sets file name mappings defined by those entries. +func (g *Generator) CommandLineParameters(parameter string) { + g.Param = make(map[string]string) + for _, p := range strings.Split(parameter, ",") { + if i := strings.Index(p, "="); i < 0 { + g.Param[p] = "" + } else { + g.Param[p[0:i]] = p[i+1:] + } + } + + g.ImportMap = make(map[string]string) + pluginList := "none" // Default list of plugin names to enable (empty means all). + for k, v := range g.Param { + switch k { + case "import_prefix": + g.ImportPrefix = v + case "import_path": + g.PackageImportPath = v + case "plugins": + pluginList = v + default: + if len(k) > 0 && k[0] == 'M' { + g.ImportMap[k[1:]] = v + } + } + } + + if pluginList == "" { + return + } + if pluginList == "none" { + pluginList = "" + } + gogoPluginNames := []string{"unmarshal", "unsafeunmarshaler", "union", "stringer", "size", "protosizer", "populate", "marshalto", "unsafemarshaler", "gostring", "face", "equal", "enumstringer", "embedcheck", "description", "defaultcheck", "oneofcheck", "compare"} + pluginList = strings.Join(append(gogoPluginNames, pluginList), "+") + if pluginList != "" { + // Amend the set of plugins. + enabled := make(map[string]bool) + for _, name := range strings.Split(pluginList, "+") { + enabled[name] = true + } + var nplugins pluginSlice + for _, p := range plugins { + if enabled[p.Name()] { + nplugins = append(nplugins, p) + } + } + sort.Sort(nplugins) + plugins = nplugins + } +} + +// DefaultPackageName returns the package name printed for the object. +// If its file is in a different package, it returns the package name we're using for this file, plus ".". +// Otherwise it returns the empty string. +func (g *Generator) DefaultPackageName(obj Object) string { + pkg := obj.PackageName() + if pkg == g.packageName { + return "" + } + return pkg + "." +} + +// For each input file, the unique package name to use, underscored. +var uniquePackageName = make(map[*descriptor.FileDescriptorProto]string) + +// Package names already registered. Key is the name from the .proto file; +// value is the name that appears in the generated code. +var pkgNamesInUse = make(map[string][]*FileDescriptor) + +// Create and remember a guaranteed unique package name for this file descriptor. +// Pkg is the candidate name. If f is nil, it's a builtin package like "proto" and +// has no file descriptor. +func RegisterUniquePackageName(pkg string, f *FileDescriptor) string { + // Convert dots to underscores before finding a unique alias. + pkg = strings.Map(badToUnderscore, pkg) + + var i = -1 + var ptr *FileDescriptor = nil + for i, ptr = range pkgNamesInUse[pkg] { + if ptr == f { + if i == 0 { + return pkg + } + return pkg + strconv.Itoa(i) + } + } + + pkgNamesInUse[pkg] = append(pkgNamesInUse[pkg], f) + i += 1 + + if i > 0 { + pkg = pkg + strconv.Itoa(i) + } + + if f != nil { + uniquePackageName[f.FileDescriptorProto] = pkg + } + return pkg +} + +var isGoKeyword = map[string]bool{ + "break": true, + "case": true, + "chan": true, + "const": true, + "continue": true, + "default": true, + "else": true, + "defer": true, + "fallthrough": true, + "for": true, + "func": true, + "go": true, + "goto": true, + "if": true, + "import": true, + "interface": true, + "map": true, + "package": true, + "range": true, + "return": true, + "select": true, + "struct": true, + "switch": true, + "type": true, + "var": true, +} + +// defaultGoPackage returns the package name to use, +// derived from the import path of the package we're building code for. +func (g *Generator) defaultGoPackage() string { + p := g.PackageImportPath + if i := strings.LastIndex(p, "/"); i >= 0 { + p = p[i+1:] + } + if p == "" { + return "" + } + + p = strings.Map(badToUnderscore, p) + // Identifier must not be keyword: insert _. + if isGoKeyword[p] { + p = "_" + p + } + // Identifier must not begin with digit: insert _. + if r, _ := utf8.DecodeRuneInString(p); unicode.IsDigit(r) { + p = "_" + p + } + return p +} + +// SetPackageNames sets the package name for this run. +// The package name must agree across all files being generated. +// It also defines unique package names for all imported files. +func (g *Generator) SetPackageNames() { + // Register the name for this package. It will be the first name + // registered so is guaranteed to be unmodified. + pkg, explicit := g.genFiles[0].goPackageName() + + // Check all files for an explicit go_package option. + for _, f := range g.genFiles { + thisPkg, thisExplicit := f.goPackageName() + if thisExplicit { + if !explicit { + // Let this file's go_package option serve for all input files. + pkg, explicit = thisPkg, true + } else if thisPkg != pkg { + g.Fail("inconsistent package names:", thisPkg, pkg) + } + } + } + + // If we don't have an explicit go_package option but we have an + // import path, use that. + if !explicit { + p := g.defaultGoPackage() + if p != "" { + pkg, explicit = p, true + } + } + + // If there was no go_package and no import path to use, + // double-check that all the inputs have the same implicit + // Go package name. + if !explicit { + for _, f := range g.genFiles { + thisPkg, _ := f.goPackageName() + if thisPkg != pkg { + g.Fail("inconsistent package names:", thisPkg, pkg) + } + } + } + + g.packageName = RegisterUniquePackageName(pkg, g.genFiles[0]) + + // Register the support package names. They might collide with the + // name of a package we import. + g.Pkg = map[string]string{ + "fmt": RegisterUniquePackageName("fmt", nil), + "math": RegisterUniquePackageName("math", nil), + "proto": RegisterUniquePackageName("proto", nil), + } + +AllFiles: + for _, f := range g.allFiles { + for _, genf := range g.genFiles { + if f == genf { + // In this package already. + uniquePackageName[f.FileDescriptorProto] = g.packageName + continue AllFiles + } + } + // The file is a dependency, so we want to ignore its go_package option + // because that is only relevant for its specific generated output. + pkg := f.GetPackage() + if pkg == "" { + pkg = baseName(*f.Name) + } + RegisterUniquePackageName(pkg, f) + } +} + +// WrapTypes walks the incoming data, wrapping DescriptorProtos, EnumDescriptorProtos +// and FileDescriptorProtos into file-referenced objects within the Generator. +// It also creates the list of files to generate and so should be called before GenerateAllFiles. +func (g *Generator) WrapTypes() { + g.allFiles = make([]*FileDescriptor, len(g.Request.ProtoFile)) + g.allFilesByName = make(map[string]*FileDescriptor, len(g.allFiles)) + for i, f := range g.Request.ProtoFile { + // We must wrap the descriptors before we wrap the enums + descs := wrapDescriptors(f) + g.buildNestedDescriptors(descs) + enums := wrapEnumDescriptors(f, descs) + g.buildNestedEnums(descs, enums) + exts := wrapExtensions(f) + fd := &FileDescriptor{ + FileDescriptorProto: f, + desc: descs, + enum: enums, + ext: exts, + exported: make(map[Object][]symbol), + proto3: fileIsProto3(f), + } + extractComments(fd) + g.allFiles[i] = fd + g.allFilesByName[f.GetName()] = fd + } + for _, fd := range g.allFiles { + fd.imp = wrapImported(fd.FileDescriptorProto, g) + } + + g.genFiles = make([]*FileDescriptor, len(g.Request.FileToGenerate)) + for i, fileName := range g.Request.FileToGenerate { + g.genFiles[i] = g.allFilesByName[fileName] + if g.genFiles[i] == nil { + g.Fail("could not find file named", fileName) + } + g.genFiles[i].index = i + } + g.Response.File = make([]*plugin.CodeGeneratorResponse_File, len(g.genFiles)) +} + +// Scan the descriptors in this file. For each one, build the slice of nested descriptors +func (g *Generator) buildNestedDescriptors(descs []*Descriptor) { + for _, desc := range descs { + if len(desc.NestedType) != 0 { + for _, nest := range descs { + if nest.parent == desc { + desc.nested = append(desc.nested, nest) + } + } + if len(desc.nested) != len(desc.NestedType) { + g.Fail("internal error: nesting failure for", desc.GetName()) + } + } + } +} + +func (g *Generator) buildNestedEnums(descs []*Descriptor, enums []*EnumDescriptor) { + for _, desc := range descs { + if len(desc.EnumType) != 0 { + for _, enum := range enums { + if enum.parent == desc { + desc.enums = append(desc.enums, enum) + } + } + if len(desc.enums) != len(desc.EnumType) { + g.Fail("internal error: enum nesting failure for", desc.GetName()) + } + } + } +} + +// Construct the Descriptor +func newDescriptor(desc *descriptor.DescriptorProto, parent *Descriptor, file *descriptor.FileDescriptorProto, index int) *Descriptor { + d := &Descriptor{ + common: common{file}, + DescriptorProto: desc, + parent: parent, + index: index, + } + if parent == nil { + d.path = fmt.Sprintf("%d,%d", messagePath, index) + } else { + d.path = fmt.Sprintf("%s,%d,%d", parent.path, messageMessagePath, index) + } + + // The only way to distinguish a group from a message is whether + // the containing message has a TYPE_GROUP field that matches. + if parent != nil { + parts := d.TypeName() + if file.Package != nil { + parts = append([]string{*file.Package}, parts...) + } + exp := "." + strings.Join(parts, ".") + for _, field := range parent.Field { + if field.GetType() == descriptor.FieldDescriptorProto_TYPE_GROUP && field.GetTypeName() == exp { + d.group = true + break + } + } + } + + d.ext = make([]*ExtensionDescriptor, len(desc.Extension)) + for i, field := range desc.Extension { + d.ext[i] = &ExtensionDescriptor{common{file}, field, d} + } + + return d +} + +// Return a slice of all the Descriptors defined within this file +func wrapDescriptors(file *descriptor.FileDescriptorProto) []*Descriptor { + sl := make([]*Descriptor, 0, len(file.MessageType)+10) + for i, desc := range file.MessageType { + sl = wrapThisDescriptor(sl, desc, nil, file, i) + } + return sl +} + +// Wrap this Descriptor, recursively +func wrapThisDescriptor(sl []*Descriptor, desc *descriptor.DescriptorProto, parent *Descriptor, file *descriptor.FileDescriptorProto, index int) []*Descriptor { + sl = append(sl, newDescriptor(desc, parent, file, index)) + me := sl[len(sl)-1] + for i, nested := range desc.NestedType { + sl = wrapThisDescriptor(sl, nested, me, file, i) + } + return sl +} + +// Construct the EnumDescriptor +func newEnumDescriptor(desc *descriptor.EnumDescriptorProto, parent *Descriptor, file *descriptor.FileDescriptorProto, index int) *EnumDescriptor { + ed := &EnumDescriptor{ + common: common{file}, + EnumDescriptorProto: desc, + parent: parent, + index: index, + } + if parent == nil { + ed.path = fmt.Sprintf("%d,%d", enumPath, index) + } else { + ed.path = fmt.Sprintf("%s,%d,%d", parent.path, messageEnumPath, index) + } + return ed +} + +// Return a slice of all the EnumDescriptors defined within this file +func wrapEnumDescriptors(file *descriptor.FileDescriptorProto, descs []*Descriptor) []*EnumDescriptor { + sl := make([]*EnumDescriptor, 0, len(file.EnumType)+10) + // Top-level enums. + for i, enum := range file.EnumType { + sl = append(sl, newEnumDescriptor(enum, nil, file, i)) + } + // Enums within messages. Enums within embedded messages appear in the outer-most message. + for _, nested := range descs { + for i, enum := range nested.EnumType { + sl = append(sl, newEnumDescriptor(enum, nested, file, i)) + } + } + return sl +} + +// Return a slice of all the top-level ExtensionDescriptors defined within this file. +func wrapExtensions(file *descriptor.FileDescriptorProto) []*ExtensionDescriptor { + sl := make([]*ExtensionDescriptor, len(file.Extension)) + for i, field := range file.Extension { + sl[i] = &ExtensionDescriptor{common{file}, field, nil} + } + return sl +} + +// Return a slice of all the types that are publicly imported into this file. +func wrapImported(file *descriptor.FileDescriptorProto, g *Generator) (sl []*ImportedDescriptor) { + for _, index := range file.PublicDependency { + df := g.fileByName(file.Dependency[index]) + for _, d := range df.desc { + if d.GetOptions().GetMapEntry() { + continue + } + sl = append(sl, &ImportedDescriptor{common{file}, d}) + } + for _, e := range df.enum { + sl = append(sl, &ImportedDescriptor{common{file}, e}) + } + for _, ext := range df.ext { + sl = append(sl, &ImportedDescriptor{common{file}, ext}) + } + } + return +} + +func extractComments(file *FileDescriptor) { + file.comments = make(map[string]*descriptor.SourceCodeInfo_Location) + for _, loc := range file.GetSourceCodeInfo().GetLocation() { + if loc.LeadingComments == nil { + continue + } + var p []string + for _, n := range loc.Path { + p = append(p, strconv.Itoa(int(n))) + } + file.comments[strings.Join(p, ",")] = loc + } +} + +// BuildTypeNameMap builds the map from fully qualified type names to objects. +// The key names for the map come from the input data, which puts a period at the beginning. +// It should be called after SetPackageNames and before GenerateAllFiles. +func (g *Generator) BuildTypeNameMap() { + g.typeNameToObject = make(map[string]Object) + for _, f := range g.allFiles { + // The names in this loop are defined by the proto world, not us, so the + // package name may be empty. If so, the dotted package name of X will + // be ".X"; otherwise it will be ".pkg.X". + dottedPkg := "." + f.GetPackage() + if dottedPkg != "." { + dottedPkg += "." + } + for _, enum := range f.enum { + name := dottedPkg + dottedSlice(enum.TypeName()) + g.typeNameToObject[name] = enum + } + for _, desc := range f.desc { + name := dottedPkg + dottedSlice(desc.TypeName()) + g.typeNameToObject[name] = desc + } + } +} + +// ObjectNamed, given a fully-qualified input type name as it appears in the input data, +// returns the descriptor for the message or enum with that name. +func (g *Generator) ObjectNamed(typeName string) Object { + o, ok := g.typeNameToObject[typeName] + if !ok { + g.Fail("can't find object with type", typeName) + } + + // If the file of this object isn't a direct dependency of the current file, + // or in the current file, then this object has been publicly imported into + // a dependency of the current file. + // We should return the ImportedDescriptor object for it instead. + direct := *o.File().Name == *g.file.Name + if !direct { + for _, dep := range g.file.Dependency { + if *g.fileByName(dep).Name == *o.File().Name { + direct = true + break + } + } + } + if !direct { + found := false + Loop: + for _, dep := range g.file.Dependency { + df := g.fileByName(*g.fileByName(dep).Name) + for _, td := range df.imp { + if td.o == o { + // Found it! + o = td + found = true + break Loop + } + } + } + if !found { + log.Printf("protoc-gen-gogo: WARNING: failed finding publicly imported dependency for %v, used in %v", typeName, *g.file.Name) + } + } + + return o +} + +// P prints the arguments to the generated output. It handles strings and int32s, plus +// handling indirections because they may be *string, etc. +func (g *Generator) P(str ...interface{}) { + if !g.writeOutput { + return + } + g.WriteString(g.indent) + for _, v := range str { + switch s := v.(type) { + case string: + g.WriteString(s) + case *string: + g.WriteString(*s) + case bool: + fmt.Fprintf(g, "%t", s) + case *bool: + fmt.Fprintf(g, "%t", *s) + case int: + fmt.Fprintf(g, "%d", s) + case *int32: + fmt.Fprintf(g, "%d", *s) + case *int64: + fmt.Fprintf(g, "%d", *s) + case float64: + fmt.Fprintf(g, "%g", s) + case *float64: + fmt.Fprintf(g, "%g", *s) + default: + g.Fail(fmt.Sprintf("unknown type in printer: %T", v)) + } + } + g.WriteByte('\n') +} + +// addInitf stores the given statement to be printed inside the file's init function. +// The statement is given as a format specifier and arguments. +func (g *Generator) addInitf(stmt string, a ...interface{}) { + g.init = append(g.init, fmt.Sprintf(stmt, a...)) +} + +func (g *Generator) PrintImport(alias, pkg string) { + statement := "import " + alias + " " + strconv.Quote(pkg) + if g.writtenImports[statement] { + return + } + g.P(statement) + g.writtenImports[statement] = true +} + +// In Indents the output one tab stop. +func (g *Generator) In() { g.indent += "\t" } + +// Out unindents the output one tab stop. +func (g *Generator) Out() { + if len(g.indent) > 0 { + g.indent = g.indent[1:] + } +} + +// GenerateAllFiles generates the output for all the files we're outputting. +func (g *Generator) GenerateAllFiles() { + // Initialize the plugins + for _, p := range plugins { + p.Init(g) + } + // Generate the output. The generator runs for every file, even the files + // that we don't generate output for, so that we can collate the full list + // of exported symbols to support public imports. + genFileMap := make(map[*FileDescriptor]bool, len(g.genFiles)) + for _, file := range g.genFiles { + genFileMap[file] = true + } + i := 0 + for _, file := range g.allFiles { + g.Reset() + g.writeOutput = genFileMap[file] + g.generate(file) + if !g.writeOutput { + continue + } + g.Response.File[i] = new(plugin.CodeGeneratorResponse_File) + g.Response.File[i].Name = proto.String(goFileName(*file.Name)) + g.Response.File[i].Content = proto.String(g.String()) + i++ + } +} + +// Run all the plugins associated with the file. +func (g *Generator) runPlugins(file *FileDescriptor) { + for _, p := range plugins { + p.Generate(file) + } +} + +// FileOf return the FileDescriptor for this FileDescriptorProto. +func (g *Generator) FileOf(fd *descriptor.FileDescriptorProto) *FileDescriptor { + for _, file := range g.allFiles { + if file.FileDescriptorProto == fd { + return file + } + } + g.Fail("could not find file in table:", fd.GetName()) + return nil +} + +// Fill the response protocol buffer with the generated output for all the files we're +// supposed to generate. +func (g *Generator) generate(file *FileDescriptor) { + g.customImports = make([]string, 0) + g.file = g.FileOf(file.FileDescriptorProto) + g.usedPackages = make(map[string]bool) + + if g.file.index == 0 { + // For one file in the package, assert version compatibility. + g.P("// This is a compile-time assertion to ensure that this generated file") + g.P("// is compatible with the proto package it is being compiled against.") + if gogoproto.ImportsGoGoProto(file.FileDescriptorProto) { + g.P("const _ = ", g.Pkg["proto"], ".GoGoProtoPackageIsVersion", generatedCodeVersion) + } else { + g.P("const _ = ", g.Pkg["proto"], ".ProtoPackageIsVersion", generatedCodeVersion) + } + g.P() + } + + // Reset on each file + g.writtenImports = make(map[string]bool) + + for _, td := range g.file.imp { + g.generateImported(td) + } + for _, enum := range g.file.enum { + g.generateEnum(enum) + } + for _, desc := range g.file.desc { + // Don't generate virtual messages for maps. + if desc.GetOptions().GetMapEntry() { + continue + } + g.generateMessage(desc) + } + for _, ext := range g.file.ext { + g.generateExtension(ext) + } + g.generateInitFunction() + + // Run the plugins before the imports so we know which imports are necessary. + g.runPlugins(file) + + g.generateFileDescriptor(file) + + // Generate header and imports last, though they appear first in the output. + rem := g.Buffer + g.Buffer = new(bytes.Buffer) + g.generateHeader() + g.generateImports() + if !g.writeOutput { + return + } + g.Write(rem.Bytes()) + + // Reformat generated code. + fset := token.NewFileSet() + raw := g.Bytes() + ast, err := parser.ParseFile(fset, "", g, parser.ParseComments) + if err != nil { + // Print out the bad code with line numbers. + // This should never happen in practice, but it can while changing generated code, + // so consider this a debugging aid. + var src bytes.Buffer + s := bufio.NewScanner(bytes.NewReader(raw)) + for line := 1; s.Scan(); line++ { + fmt.Fprintf(&src, "%5d\t%s\n", line, s.Bytes()) + } + if serr := s.Err(); serr != nil { + g.Fail("bad Go source code was generated:", err.Error(), "\n"+string(raw)) + } else { + g.Fail("bad Go source code was generated:", err.Error(), "\n"+src.String()) + } + } + g.Reset() + err = (&printer.Config{Mode: printer.TabIndent | printer.UseSpaces, Tabwidth: 8}).Fprint(g, fset, ast) + if err != nil { + g.Fail("generated Go source code could not be reformatted:", err.Error()) + } +} + +// Generate the header, including package definition +func (g *Generator) generateHeader() { + g.P("// Code generated by protoc-gen-gogo.") + g.P("// source: ", *g.file.Name) + g.P("// DO NOT EDIT!") + g.P() + + name := g.file.PackageName() + + if g.file.index == 0 { + // Generate package docs for the first file in the package. + g.P("/*") + g.P("Package ", name, " is a generated protocol buffer package.") + g.P() + if loc, ok := g.file.comments[strconv.Itoa(packagePath)]; ok { + // not using g.PrintComments because this is a /* */ comment block. + text := strings.TrimSuffix(loc.GetLeadingComments(), "\n") + for _, line := range strings.Split(text, "\n") { + line = strings.TrimPrefix(line, " ") + // ensure we don't escape from the block comment + line = strings.Replace(line, "*/", "* /", -1) + g.P(line) + } + g.P() + } + var topMsgs []string + g.P("It is generated from these files:") + for _, f := range g.genFiles { + g.P("\t", f.Name) + for _, msg := range f.desc { + if msg.parent != nil { + continue + } + topMsgs = append(topMsgs, CamelCaseSlice(msg.TypeName())) + } + } + g.P() + g.P("It has these top-level messages:") + for _, msg := range topMsgs { + g.P("\t", msg) + } + g.P("*/") + } + + g.P("package ", name) + g.P() +} + +// PrintComments prints any comments from the source .proto file. +// The path is a comma-separated list of integers. +// It returns an indication of whether any comments were printed. +// See descriptor.proto for its format. +func (g *Generator) PrintComments(path string) bool { + if !g.writeOutput { + return false + } + if loc, ok := g.file.comments[path]; ok { + text := strings.TrimSuffix(loc.GetLeadingComments(), "\n") + for _, line := range strings.Split(text, "\n") { + g.P("// ", strings.TrimPrefix(line, " ")) + } + return true + } + return false +} + +// Comments returns any comments from the source .proto file and empty string if comments not found. +// The path is a comma-separated list of intergers. +// See descriptor.proto for its format. +func (g *Generator) Comments(path string) string { + loc, ok := g.file.comments[path] + if !ok { + return "" + } + text := strings.TrimSuffix(loc.GetLeadingComments(), "\n") + return text +} + +func (g *Generator) fileByName(filename string) *FileDescriptor { + return g.allFilesByName[filename] +} + +// weak returns whether the ith import of the current file is a weak import. +func (g *Generator) weak(i int32) bool { + for _, j := range g.file.WeakDependency { + if j == i { + return true + } + } + return false +} + +// Generate the imports +func (g *Generator) generateImports() { + // We almost always need a proto import. Rather than computing when we + // do, which is tricky when there's a plugin, just import it and + // reference it later. The same argument applies to the fmt and math packages. + if gogoproto.ImportsGoGoProto(g.file.FileDescriptorProto) { + g.PrintImport(g.Pkg["proto"], g.ImportPrefix+"github.com/gogo/protobuf/proto") + } else { + g.PrintImport(g.Pkg["proto"], g.ImportPrefix+"github.com/golang/protobuf/proto") + } + g.PrintImport(g.Pkg["fmt"], "fmt") + g.PrintImport(g.Pkg["math"], "math") + + for i, s := range g.file.Dependency { + fd := g.fileByName(s) + // Do not import our own package. + if fd.PackageName() == g.packageName { + continue + } + filename := goFileName(s) + // By default, import path is the dirname of the Go filename. + importPath := path.Dir(filename) + if substitution, ok := g.ImportMap[s]; ok { + importPath = substitution + } + importPath = g.ImportPrefix + importPath + // Skip weak imports. + if g.weak(int32(i)) { + g.P("// skipping weak import ", fd.PackageName(), " ", strconv.Quote(importPath)) + continue + } + // We need to import all the dependencies, even if we don't reference them, + // because other code and tools depend on having the full transitive closure + // of protocol buffer types in the binary. + if _, ok := g.usedPackages[fd.PackageName()]; ok { + g.PrintImport(fd.PackageName(), importPath) + } else { + g.P("import _ ", strconv.Quote(importPath)) + } + } + g.P() + for _, s := range g.customImports { + s1 := strings.Map(badToUnderscore, s) + g.PrintImport(s1, s) + } + g.P() + // TODO: may need to worry about uniqueness across plugins + for _, p := range plugins { + p.GenerateImports(g.file) + g.P() + } + g.P("// Reference imports to suppress errors if they are not otherwise used.") + g.P("var _ = ", g.Pkg["proto"], ".Marshal") + g.P("var _ = ", g.Pkg["fmt"], ".Errorf") + g.P("var _ = ", g.Pkg["math"], ".Inf") + g.P() +} + +func (g *Generator) generateImported(id *ImportedDescriptor) { + // Don't generate public import symbols for files that we are generating + // code for, since those symbols will already be in this package. + // We can't simply avoid creating the ImportedDescriptor objects, + // because g.genFiles isn't populated at that stage. + tn := id.TypeName() + sn := tn[len(tn)-1] + df := g.FileOf(id.o.File()) + filename := *df.Name + for _, fd := range g.genFiles { + if *fd.Name == filename { + g.P("// Ignoring public import of ", sn, " from ", filename) + g.P() + return + } + } + g.P("// ", sn, " from public import ", filename) + g.usedPackages[df.PackageName()] = true + + for _, sym := range df.exported[id.o] { + sym.GenerateAlias(g, df.PackageName()) + } + + g.P() +} + +// Generate the enum definitions for this EnumDescriptor. +func (g *Generator) generateEnum(enum *EnumDescriptor) { + // The full type name + typeName := enum.alias() + // The full type name, CamelCased. + ccTypeName := CamelCaseSlice(typeName) + ccPrefix := enum.prefix() + + g.PrintComments(enum.path) + if !gogoproto.EnabledGoEnumPrefix(enum.file, enum.EnumDescriptorProto) { + ccPrefix = "" + } + g.P("type ", ccTypeName, " int32") + g.file.addExport(enum, enumSymbol{ccTypeName, enum.proto3()}) + g.P("const (") + g.In() + for i, e := range enum.Value { + g.PrintComments(fmt.Sprintf("%s,%d,%d", enum.path, enumValuePath, i)) + name := *e.Name + if gogoproto.IsEnumValueCustomName(e) { + name = gogoproto.GetEnumValueCustomName(e) + } + name = ccPrefix + name + + g.P(name, " ", ccTypeName, " = ", e.Number) + g.file.addExport(enum, constOrVarSymbol{name, "const", ccTypeName}) + } + g.Out() + g.P(")") + g.P("var ", ccTypeName, "_name = map[int32]string{") + g.In() + generated := make(map[int32]bool) // avoid duplicate values + for _, e := range enum.Value { + duplicate := "" + if _, present := generated[*e.Number]; present { + duplicate = "// Duplicate value: " + } + g.P(duplicate, e.Number, ": ", strconv.Quote(*e.Name), ",") + generated[*e.Number] = true + } + g.Out() + g.P("}") + g.P("var ", ccTypeName, "_value = map[string]int32{") + g.In() + for _, e := range enum.Value { + g.P(strconv.Quote(*e.Name), ": ", e.Number, ",") + } + g.Out() + g.P("}") + + if !enum.proto3() { + g.P("func (x ", ccTypeName, ") Enum() *", ccTypeName, " {") + g.In() + g.P("p := new(", ccTypeName, ")") + g.P("*p = x") + g.P("return p") + g.Out() + g.P("}") + } + + if gogoproto.IsGoEnumStringer(g.file.FileDescriptorProto, enum.EnumDescriptorProto) { + g.P("func (x ", ccTypeName, ") String() string {") + g.In() + g.P("return ", g.Pkg["proto"], ".EnumName(", ccTypeName, "_name, int32(x))") + g.Out() + g.P("}") + } + + if !enum.proto3() && !gogoproto.IsGoEnumStringer(g.file.FileDescriptorProto, enum.EnumDescriptorProto) { + g.P("func (x ", ccTypeName, ") MarshalJSON() ([]byte, error) {") + g.In() + g.P("return ", g.Pkg["proto"], ".MarshalJSONEnum(", ccTypeName, "_name, int32(x))") + g.Out() + g.P("}") + } + if !enum.proto3() { + g.P("func (x *", ccTypeName, ") UnmarshalJSON(data []byte) error {") + g.In() + g.P("value, err := ", g.Pkg["proto"], ".UnmarshalJSONEnum(", ccTypeName, `_value, data, "`, ccTypeName, `")`) + g.P("if err != nil {") + g.In() + g.P("return err") + g.Out() + g.P("}") + g.P("*x = ", ccTypeName, "(value)") + g.P("return nil") + g.Out() + g.P("}") + } + + var indexes []string + for m := enum.parent; m != nil; m = m.parent { + // XXX: skip groups? + indexes = append([]string{strconv.Itoa(m.index)}, indexes...) + } + indexes = append(indexes, strconv.Itoa(enum.index)) + g.P("func (", ccTypeName, ") EnumDescriptor() ([]byte, []int) { return fileDescriptor", FileName(g.file), ", []int{", strings.Join(indexes, ", "), "} }") + + g.P() +} + +// The tag is a string like "varint,2,opt,name=fieldname,def=7" that +// identifies details of the field for the protocol buffer marshaling and unmarshaling +// code. The fields are: +// wire encoding +// protocol tag number +// opt,req,rep for optional, required, or repeated +// packed whether the encoding is "packed" (optional; repeated primitives only) +// name= the original declared name +// enum= the name of the enum type if it is an enum-typed field. +// proto3 if this field is in a proto3 message +// def= string representation of the default value, if any. +// The default value must be in a representation that can be used at run-time +// to generate the default value. Thus bools become 0 and 1, for instance. +func (g *Generator) goTag(message *Descriptor, field *descriptor.FieldDescriptorProto, wiretype string) string { + optrepreq := "" + switch { + case isOptional(field): + optrepreq = "opt" + case isRequired(field): + optrepreq = "req" + case isRepeated(field): + optrepreq = "rep" + } + var defaultValue string + if dv := field.DefaultValue; dv != nil { // set means an explicit default + defaultValue = *dv + // Some types need tweaking. + switch *field.Type { + case descriptor.FieldDescriptorProto_TYPE_BOOL: + if defaultValue == "true" { + defaultValue = "1" + } else { + defaultValue = "0" + } + case descriptor.FieldDescriptorProto_TYPE_STRING, + descriptor.FieldDescriptorProto_TYPE_BYTES: + // Nothing to do. Quoting is done for the whole tag. + case descriptor.FieldDescriptorProto_TYPE_ENUM: + // For enums we need to provide the integer constant. + obj := g.ObjectNamed(field.GetTypeName()) + if id, ok := obj.(*ImportedDescriptor); ok { + // It is an enum that was publicly imported. + // We need the underlying type. + obj = id.o + } + enum, ok := obj.(*EnumDescriptor) + if !ok { + log.Printf("obj is a %T", obj) + if id, ok := obj.(*ImportedDescriptor); ok { + log.Printf("id.o is a %T", id.o) + } + g.Fail("unknown enum type", CamelCaseSlice(obj.TypeName())) + } + defaultValue = enum.integerValueAsString(defaultValue) + } + defaultValue = ",def=" + defaultValue + } + enum := "" + if *field.Type == descriptor.FieldDescriptorProto_TYPE_ENUM { + // We avoid using obj.PackageName(), because we want to use the + // original (proto-world) package name. + obj := g.ObjectNamed(field.GetTypeName()) + if id, ok := obj.(*ImportedDescriptor); ok { + obj = id.o + } + enum = ",enum=" + if pkg := obj.File().GetPackage(); pkg != "" { + enum += pkg + "." + } + enum += CamelCaseSlice(obj.TypeName()) + } + packed := "" + if field.Options != nil && field.Options.GetPacked() { + packed = ",packed" + } + fieldName := field.GetName() + name := fieldName + if *field.Type == descriptor.FieldDescriptorProto_TYPE_GROUP { + // We must use the type name for groups instead of + // the field name to preserve capitalization. + // type_name in FieldDescriptorProto is fully-qualified, + // but we only want the local part. + name = *field.TypeName + if i := strings.LastIndex(name, "."); i >= 0 { + name = name[i+1:] + } + } + if json := field.GetJsonName(); json != "" && json != name { + // TODO: escaping might be needed, in which case + // perhaps this should be in its own "json" tag. + name += ",json=" + json + } + name = ",name=" + name + + embed := "" + if gogoproto.IsEmbed(field) { + embed = ",embedded=" + fieldName + } + + ctype := "" + if gogoproto.IsCustomType(field) { + ctype = ",customtype=" + gogoproto.GetCustomType(field) + } + + casttype := "" + if gogoproto.IsCastType(field) { + casttype = ",casttype=" + gogoproto.GetCastType(field) + } + + castkey := "" + if gogoproto.IsCastKey(field) { + castkey = ",castkey=" + gogoproto.GetCastKey(field) + } + + castvalue := "" + if gogoproto.IsCastValue(field) { + castvalue = ",castvalue=" + gogoproto.GetCastValue(field) + // record the original message type for jsonpb reconstruction + desc := g.ObjectNamed(field.GetTypeName()) + if d, ok := desc.(*Descriptor); ok && d.GetOptions().GetMapEntry() { + valueField := d.Field[1] + if valueField.IsMessage() { + castvalue += ",castvaluetype=" + strings.TrimPrefix(valueField.GetTypeName(), ".") + } + } + } + + if message.proto3() { + // We only need the extra tag for []byte fields; + // no need to add noise for the others. + if *field.Type != descriptor.FieldDescriptorProto_TYPE_MESSAGE && + *field.Type != descriptor.FieldDescriptorProto_TYPE_GROUP && + !field.IsRepeated() { + name += ",proto3" + } + } + oneof := "" + if field.OneofIndex != nil { + oneof = ",oneof" + } + return strconv.Quote(fmt.Sprintf("%s,%d,%s%s%s%s%s%s%s%s%s%s%s", + wiretype, + field.GetNumber(), + optrepreq, + packed, + name, + enum, + oneof, + defaultValue, + embed, + ctype, + casttype, + castkey, + castvalue)) +} + +func needsStar(field *descriptor.FieldDescriptorProto, proto3 bool, allowOneOf bool) bool { + if isRepeated(field) && + (*field.Type != descriptor.FieldDescriptorProto_TYPE_MESSAGE) && + (*field.Type != descriptor.FieldDescriptorProto_TYPE_GROUP) { + return false + } + if *field.Type == descriptor.FieldDescriptorProto_TYPE_BYTES && !gogoproto.IsCustomType(field) { + return false + } + if !gogoproto.IsNullable(field) { + return false + } + if field.OneofIndex != nil && allowOneOf && + (*field.Type != descriptor.FieldDescriptorProto_TYPE_MESSAGE) && + (*field.Type != descriptor.FieldDescriptorProto_TYPE_GROUP) { + return false + } + if proto3 && + (*field.Type != descriptor.FieldDescriptorProto_TYPE_MESSAGE) && + (*field.Type != descriptor.FieldDescriptorProto_TYPE_GROUP) && + !gogoproto.IsCustomType(field) { + return false + } + return true +} + +// TypeName is the printed name appropriate for an item. If the object is in the current file, +// TypeName drops the package name and underscores the rest. +// Otherwise the object is from another package; and the result is the underscored +// package name followed by the item name. +// The result always has an initial capital. +func (g *Generator) TypeName(obj Object) string { + return g.DefaultPackageName(obj) + CamelCaseSlice(obj.TypeName()) +} + +// TypeNameWithPackage is like TypeName, but always includes the package +// name even if the object is in our own package. +func (g *Generator) TypeNameWithPackage(obj Object) string { + return obj.PackageName() + CamelCaseSlice(obj.TypeName()) +} + +// GoType returns a string representing the type name, and the wire type +func (g *Generator) GoType(message *Descriptor, field *descriptor.FieldDescriptorProto) (typ string, wire string) { + // TODO: Options. + switch *field.Type { + case descriptor.FieldDescriptorProto_TYPE_DOUBLE: + typ, wire = "float64", "fixed64" + case descriptor.FieldDescriptorProto_TYPE_FLOAT: + typ, wire = "float32", "fixed32" + case descriptor.FieldDescriptorProto_TYPE_INT64: + typ, wire = "int64", "varint" + case descriptor.FieldDescriptorProto_TYPE_UINT64: + typ, wire = "uint64", "varint" + case descriptor.FieldDescriptorProto_TYPE_INT32: + typ, wire = "int32", "varint" + case descriptor.FieldDescriptorProto_TYPE_UINT32: + typ, wire = "uint32", "varint" + case descriptor.FieldDescriptorProto_TYPE_FIXED64: + typ, wire = "uint64", "fixed64" + case descriptor.FieldDescriptorProto_TYPE_FIXED32: + typ, wire = "uint32", "fixed32" + case descriptor.FieldDescriptorProto_TYPE_BOOL: + typ, wire = "bool", "varint" + case descriptor.FieldDescriptorProto_TYPE_STRING: + typ, wire = "string", "bytes" + case descriptor.FieldDescriptorProto_TYPE_GROUP: + desc := g.ObjectNamed(field.GetTypeName()) + typ, wire = g.TypeName(desc), "group" + case descriptor.FieldDescriptorProto_TYPE_MESSAGE: + desc := g.ObjectNamed(field.GetTypeName()) + typ, wire = g.TypeName(desc), "bytes" + case descriptor.FieldDescriptorProto_TYPE_BYTES: + typ, wire = "[]byte", "bytes" + case descriptor.FieldDescriptorProto_TYPE_ENUM: + desc := g.ObjectNamed(field.GetTypeName()) + typ, wire = g.TypeName(desc), "varint" + case descriptor.FieldDescriptorProto_TYPE_SFIXED32: + typ, wire = "int32", "fixed32" + case descriptor.FieldDescriptorProto_TYPE_SFIXED64: + typ, wire = "int64", "fixed64" + case descriptor.FieldDescriptorProto_TYPE_SINT32: + typ, wire = "int32", "zigzag32" + case descriptor.FieldDescriptorProto_TYPE_SINT64: + typ, wire = "int64", "zigzag64" + default: + g.Fail("unknown type for", field.GetName()) + } + switch { + case gogoproto.IsCustomType(field) && gogoproto.IsCastType(field): + g.Fail(field.GetName() + " cannot be custom type and cast type") + case gogoproto.IsCustomType(field): + var packageName string + var err error + packageName, typ, err = getCustomType(field) + if err != nil { + g.Fail(err.Error()) + } + if len(packageName) > 0 { + g.customImports = append(g.customImports, packageName) + } + case gogoproto.IsCastType(field): + var packageName string + var err error + packageName, typ, err = getCastType(field) + if err != nil { + g.Fail(err.Error()) + } + if len(packageName) > 0 { + g.customImports = append(g.customImports, packageName) + } + } + if needsStar(field, g.file.proto3, message != nil && message.allowOneof()) { + typ = "*" + typ + } + if isRepeated(field) { + typ = "[]" + typ + } + return +} + +// GoMapDescriptor is a full description of the map output struct. +type GoMapDescriptor struct { + GoType string + + KeyField *descriptor.FieldDescriptorProto + KeyAliasField *descriptor.FieldDescriptorProto + KeyTag string + + ValueField *descriptor.FieldDescriptorProto + ValueAliasField *descriptor.FieldDescriptorProto + ValueTag string +} + +func (g *Generator) GoMapType(d *Descriptor, field *descriptor.FieldDescriptorProto) *GoMapDescriptor { + if d == nil { + byName := g.ObjectNamed(field.GetTypeName()) + desc, ok := byName.(*Descriptor) + if byName == nil || !ok || !desc.GetOptions().GetMapEntry() { + g.Fail(fmt.Sprintf("field %s is not a map", field.GetTypeName())) + return nil + } + d = desc + } + + m := &GoMapDescriptor{ + KeyField: d.Field[0], + ValueField: d.Field[1], + } + + // Figure out the Go types and tags for the key and value types. + m.KeyAliasField, m.ValueAliasField = g.GetMapKeyField(field, m.KeyField), g.GetMapValueField(field, m.ValueField) + keyType, keyWire := g.GoType(d, m.KeyAliasField) + valType, valWire := g.GoType(d, m.ValueAliasField) + + m.KeyTag, m.ValueTag = g.goTag(d, m.KeyField, keyWire), g.goTag(d, m.ValueField, valWire) + + if gogoproto.IsCastType(field) { + var packageName string + var err error + packageName, typ, err := getCastType(field) + if err != nil { + g.Fail(err.Error()) + } + if len(packageName) > 0 { + g.customImports = append(g.customImports, packageName) + } + m.GoType = typ + return m + } + + // We don't use stars, except for message-typed values. + // Message and enum types are the only two possibly foreign types used in maps, + // so record their use. They are not permitted as map keys. + keyType = strings.TrimPrefix(keyType, "*") + switch *m.ValueAliasField.Type { + case descriptor.FieldDescriptorProto_TYPE_ENUM: + valType = strings.TrimPrefix(valType, "*") + g.RecordTypeUse(m.ValueAliasField.GetTypeName()) + case descriptor.FieldDescriptorProto_TYPE_MESSAGE: + if !gogoproto.IsNullable(m.ValueAliasField) { + valType = strings.TrimPrefix(valType, "*") + } + g.RecordTypeUse(m.ValueAliasField.GetTypeName()) + default: + valType = strings.TrimPrefix(valType, "*") + } + + m.GoType = fmt.Sprintf("map[%s]%s", keyType, valType) + return m +} + +func (g *Generator) RecordTypeUse(t string) { + if obj, ok := g.typeNameToObject[t]; ok { + // Call ObjectNamed to get the true object to record the use. + obj = g.ObjectNamed(t) + g.usedPackages[obj.PackageName()] = true + } +} + +// Method names that may be generated. Fields with these names get an +// underscore appended. +var methodNames = [...]string{ + "Reset", + "String", + "ProtoMessage", + "Marshal", + "Unmarshal", + "ExtensionRangeArray", + "ExtensionMap", + "Descriptor", + "MarshalTo", + "Equal", + "VerboseEqual", + "GoString", + "ProtoSize", +} + +// Generate the type and default constant definitions for this Descriptor. +func (g *Generator) generateMessage(message *Descriptor) { + // The full type name + typeName := message.TypeName() + // The full type name, CamelCased. + ccTypeName := CamelCaseSlice(typeName) + + usedNames := make(map[string]bool) + for _, n := range methodNames { + usedNames[n] = true + } + if !gogoproto.IsProtoSizer(message.file, message.DescriptorProto) { + usedNames["Size"] = true + } + fieldNames := make(map[*descriptor.FieldDescriptorProto]string) + fieldGetterNames := make(map[*descriptor.FieldDescriptorProto]string) + fieldTypes := make(map[*descriptor.FieldDescriptorProto]string) + mapFieldTypes := make(map[*descriptor.FieldDescriptorProto]string) + + oneofFieldName := make(map[int32]string) // indexed by oneof_index field of FieldDescriptorProto + oneofDisc := make(map[int32]string) // name of discriminator method + oneofTypeName := make(map[*descriptor.FieldDescriptorProto]string) // without star + oneofInsertPoints := make(map[int32]int) // oneof_index => offset of g.Buffer + + g.PrintComments(message.path) + g.P("type ", ccTypeName, " struct {") + g.In() + + // allocNames finds a conflict-free variation of the given strings, + // consistently mutating their suffixes. + // It returns the same number of strings. + allocNames := func(ns ...string) []string { + Loop: + for { + for _, n := range ns { + if usedNames[n] { + for i := range ns { + ns[i] += "_" + } + continue Loop + } + } + for _, n := range ns { + usedNames[n] = true + } + return ns + } + } + + for i, field := range message.Field { + // Allocate the getter and the field at the same time so name + // collisions create field/method consistent names. + // TODO: This allocation occurs based on the order of the fields + // in the proto file, meaning that a change in the field + // ordering can change generated Method/Field names. + base := CamelCase(*field.Name) + if gogoproto.IsCustomName(field) { + base = gogoproto.GetCustomName(field) + } + ns := allocNames(base, "Get"+base) + fieldName, fieldGetterName := ns[0], ns[1] + typename, wiretype := g.GoType(message, field) + jsonName := *field.Name + jsonTag := jsonName + ",omitempty" + repeatedNativeType := (!field.IsMessage() && !gogoproto.IsCustomType(field) && field.IsRepeated()) + if !gogoproto.IsNullable(field) && !repeatedNativeType { + jsonTag = jsonName + } + gogoJsonTag := gogoproto.GetJsonTag(field) + if gogoJsonTag != nil { + jsonTag = *gogoJsonTag + } + gogoMoreTags := gogoproto.GetMoreTags(field) + moreTags := "" + if gogoMoreTags != nil { + moreTags = " " + *gogoMoreTags + } + tag := fmt.Sprintf("protobuf:%s json:%q%s", g.goTag(message, field, wiretype), jsonTag, moreTags) + fieldNames[field] = fieldName + fieldGetterNames[field] = fieldGetterName + if *field.Type == descriptor.FieldDescriptorProto_TYPE_MESSAGE && gogoproto.IsEmbed(field) { + fieldName = "" + } + + oneof := field.OneofIndex != nil && message.allowOneof() + if oneof && oneofFieldName[*field.OneofIndex] == "" { + odp := message.OneofDecl[int(*field.OneofIndex)] + fname := allocNames(CamelCase(odp.GetName()))[0] + + // This is the first field of a oneof we haven't seen before. + // Generate the union field. + com := g.PrintComments(fmt.Sprintf("%s,%d,%d", message.path, messageOneofPath, *field.OneofIndex)) + if com { + g.P("//") + } + g.P("// Types that are valid to be assigned to ", fname, ":") + // Generate the rest of this comment later, + // when we've computed any disambiguation. + oneofInsertPoints[*field.OneofIndex] = g.Buffer.Len() + + dname := "is" + ccTypeName + "_" + fname + oneofFieldName[*field.OneofIndex] = fname + oneofDisc[*field.OneofIndex] = dname + otag := `protobuf_oneof:"` + odp.GetName() + `"` + g.P(fname, " ", dname, " `", otag, "`") + } + + if *field.Type == descriptor.FieldDescriptorProto_TYPE_MESSAGE { + desc := g.ObjectNamed(field.GetTypeName()) + if d, ok := desc.(*Descriptor); ok && d.GetOptions().GetMapEntry() { + m := g.GoMapType(d, field) + typename = m.GoType + mapFieldTypes[field] = typename // record for the getter generation + + tag += fmt.Sprintf(" protobuf_key:%s protobuf_val:%s", m.KeyTag, m.ValueTag) + } + } + + fieldTypes[field] = typename + + if oneof { + tname := ccTypeName + "_" + fieldName + // It is possible for this to collide with a message or enum + // nested in this message. Check for collisions. + for { + ok := true + for _, desc := range message.nested { + if CamelCaseSlice(desc.TypeName()) == tname { + ok = false + break + } + } + for _, enum := range message.enums { + if CamelCaseSlice(enum.TypeName()) == tname { + ok = false + break + } + } + if !ok { + tname += "_" + continue + } + break + } + + oneofTypeName[field] = tname + continue + } + + g.PrintComments(fmt.Sprintf("%s,%d,%d", message.path, messageFieldPath, i)) + g.P(fieldName, "\t", typename, "\t`", tag, "`") + g.RecordTypeUse(field.GetTypeName()) + } + if len(message.ExtensionRange) > 0 { + if gogoproto.HasExtensionsMap(g.file.FileDescriptorProto, message.DescriptorProto) { + g.P("XXX_extensions\t\tmap[int32]", g.Pkg["proto"], ".Extension `json:\"-\"`") + } else { + g.P("XXX_extensions\t\t[]byte `protobuf:\"bytes,0,opt\" json:\"-\"`") + } + } + if gogoproto.HasUnrecognized(g.file.FileDescriptorProto, message.DescriptorProto) && !message.proto3() { + g.P("XXX_unrecognized\t[]byte `json:\"-\"`") + } + g.Out() + g.P("}") + + // Update g.Buffer to list valid oneof types. + // We do this down here, after we've disambiguated the oneof type names. + // We go in reverse order of insertion point to avoid invalidating offsets. + for oi := int32(len(message.OneofDecl)); oi >= 0; oi-- { + ip := oneofInsertPoints[oi] + all := g.Buffer.Bytes() + rem := all[ip:] + g.Buffer = bytes.NewBuffer(all[:ip:ip]) // set cap so we don't scribble on rem + for _, field := range message.Field { + if field.OneofIndex == nil || *field.OneofIndex != oi { + continue + } + g.P("//\t*", oneofTypeName[field]) + } + g.Buffer.Write(rem) + } + + // Reset, String and ProtoMessage methods. + g.P("func (m *", ccTypeName, ") Reset() { *m = ", ccTypeName, "{} }") + if gogoproto.EnabledGoStringer(g.file.FileDescriptorProto, message.DescriptorProto) { + g.P("func (m *", ccTypeName, ") String() string { return ", g.Pkg["proto"], ".CompactTextString(m) }") + } + g.P("func (*", ccTypeName, ") ProtoMessage() {}") + if !message.group { + var indexes []string + for m := message; m != nil; m = m.parent { + // XXX: skip groups? + indexes = append([]string{strconv.Itoa(m.index)}, indexes...) + } + g.P("func (*", ccTypeName, ") Descriptor() ([]byte, []int) { return fileDescriptor", FileName(g.file), ", []int{", strings.Join(indexes, ", "), "} }") + } + + // Extension support methods + var hasExtensions, isMessageSet bool + if len(message.ExtensionRange) > 0 { + hasExtensions = true + // message_set_wire_format only makes sense when extensions are defined. + if opts := message.Options; opts != nil && opts.GetMessageSetWireFormat() { + isMessageSet = true + g.P() + g.P("func (m *", ccTypeName, ") Marshal() ([]byte, error) {") + g.In() + g.P("return ", g.Pkg["proto"], ".MarshalMessageSet(m.ExtensionMap())") + g.Out() + g.P("}") + g.P("func (m *", ccTypeName, ") Unmarshal(buf []byte) error {") + g.In() + g.P("return ", g.Pkg["proto"], ".UnmarshalMessageSet(buf, m.ExtensionMap())") + g.Out() + g.P("}") + g.P("func (m *", ccTypeName, ") MarshalJSON() ([]byte, error) {") + g.In() + g.P("return ", g.Pkg["proto"], ".MarshalMessageSetJSON(m.XXX_extensions)") + g.Out() + g.P("}") + g.P("func (m *", ccTypeName, ") UnmarshalJSON(buf []byte) error {") + g.In() + g.P("return ", g.Pkg["proto"], ".UnmarshalMessageSetJSON(buf, m.XXX_extensions)") + g.Out() + g.P("}") + g.P("// ensure ", ccTypeName, " satisfies proto.Marshaler and proto.Unmarshaler") + g.P("var _ ", g.Pkg["proto"], ".Marshaler = (*", ccTypeName, ")(nil)") + g.P("var _ ", g.Pkg["proto"], ".Unmarshaler = (*", ccTypeName, ")(nil)") + } + + g.P() + g.P("var extRange_", ccTypeName, " = []", g.Pkg["proto"], ".ExtensionRange{") + g.In() + for _, r := range message.ExtensionRange { + end := fmt.Sprint(*r.End - 1) // make range inclusive on both ends + g.P("{", r.Start, ", ", end, "},") + } + g.Out() + g.P("}") + g.P("func (*", ccTypeName, ") ExtensionRangeArray() []", g.Pkg["proto"], ".ExtensionRange {") + g.In() + g.P("return extRange_", ccTypeName) + g.Out() + g.P("}") + if gogoproto.HasExtensionsMap(g.file.FileDescriptorProto, message.DescriptorProto) { + g.P("func (m *", ccTypeName, ") ExtensionMap() map[int32]", g.Pkg["proto"], ".Extension {") + g.In() + g.P("if m.XXX_extensions == nil {") + g.In() + g.P("m.XXX_extensions = make(map[int32]", g.Pkg["proto"], ".Extension)") + g.Out() + g.P("}") + g.P("return m.XXX_extensions") + g.Out() + g.P("}") + } else { + g.P("func (m *", ccTypeName, ") GetExtensions() *[]byte {") + g.In() + g.P("if m.XXX_extensions == nil {") + g.In() + g.P("m.XXX_extensions = make([]byte, 0)") + g.Out() + g.P("}") + g.P("return &m.XXX_extensions") + g.Out() + g.P("}") + } + } + + // Default constants + defNames := make(map[*descriptor.FieldDescriptorProto]string) + for _, field := range message.Field { + def := field.GetDefaultValue() + if def == "" { + continue + } + if !gogoproto.IsNullable(field) { + g.Fail("illegal default value: ", field.GetName(), " in ", message.GetName(), " is not nullable and is thus not allowed to have a default value") + } + fieldname := "Default_" + ccTypeName + "_" + CamelCase(*field.Name) + defNames[field] = fieldname + typename, _ := g.GoType(message, field) + if typename[0] == '*' { + typename = typename[1:] + } + kind := "const " + switch { + case typename == "bool": + case typename == "string": + def = strconv.Quote(def) + case typename == "[]byte": + def = "[]byte(" + strconv.Quote(def) + ")" + kind = "var " + case def == "inf", def == "-inf", def == "nan": + // These names are known to, and defined by, the protocol language. + switch def { + case "inf": + def = "math.Inf(1)" + case "-inf": + def = "math.Inf(-1)" + case "nan": + def = "math.NaN()" + } + if *field.Type == descriptor.FieldDescriptorProto_TYPE_FLOAT { + def = "float32(" + def + ")" + } + kind = "var " + case *field.Type == descriptor.FieldDescriptorProto_TYPE_ENUM: + // Must be an enum. Need to construct the prefixed name. + obj := g.ObjectNamed(field.GetTypeName()) + var enum *EnumDescriptor + if id, ok := obj.(*ImportedDescriptor); ok { + // The enum type has been publicly imported. + enum, _ = id.o.(*EnumDescriptor) + } else { + enum, _ = obj.(*EnumDescriptor) + } + if enum == nil { + log.Printf("don't know how to generate constant for %s", fieldname) + continue + } + + // hunt down the actual enum corresponding to the default + var enumValue *descriptor.EnumValueDescriptorProto + for _, ev := range enum.Value { + if def == ev.GetName() { + enumValue = ev + } + } + + if enumValue != nil { + if gogoproto.IsEnumValueCustomName(enumValue) { + def = gogoproto.GetEnumValueCustomName(enumValue) + } + } else { + g.Fail(fmt.Sprintf("could not resolve default enum value for %v.%v", + g.DefaultPackageName(obj), def)) + + } + + if gogoproto.EnabledGoEnumPrefix(enum.file, enum.EnumDescriptorProto) { + def = g.DefaultPackageName(obj) + enum.prefix() + def + } else { + def = g.DefaultPackageName(obj) + def + } + } + g.P(kind, fieldname, " ", typename, " = ", def) + g.file.addExport(message, constOrVarSymbol{fieldname, kind, ""}) + } + g.P() + + // Oneof per-field types, discriminants and getters. + if message.allowOneof() { + // Generate unexported named types for the discriminant interfaces. + // We shouldn't have to do this, but there was (~19 Aug 2015) a compiler/linker bug + // that was triggered by using anonymous interfaces here. + // TODO: Revisit this and consider reverting back to anonymous interfaces. + for oi := range message.OneofDecl { + dname := oneofDisc[int32(oi)] + g.P("type ", dname, " interface {") + g.In() + g.P(dname, "()") + if gogoproto.HasEqual(g.file.FileDescriptorProto, message.DescriptorProto) { + g.P(`Equal(interface{}) bool`) + } + if gogoproto.HasVerboseEqual(g.file.FileDescriptorProto, message.DescriptorProto) { + g.P(`VerboseEqual(interface{}) error`) + } + if gogoproto.IsMarshaler(g.file.FileDescriptorProto, message.DescriptorProto) || + gogoproto.IsUnsafeMarshaler(g.file.FileDescriptorProto, message.DescriptorProto) { + g.P(`MarshalTo([]byte) (int, error)`) + } + if gogoproto.IsSizer(g.file.FileDescriptorProto, message.DescriptorProto) { + g.P(`Size() int`) + } + if gogoproto.IsProtoSizer(g.file.FileDescriptorProto, message.DescriptorProto) { + g.P(`ProtoSize() int`) + } + g.Out() + g.P("}") + } + g.P() + for _, field := range message.Field { + if field.OneofIndex == nil { + continue + } + _, wiretype := g.GoType(message, field) + tag := "protobuf:" + g.goTag(message, field, wiretype) + g.P("type ", oneofTypeName[field], " struct{ ", fieldNames[field], " ", fieldTypes[field], " `", tag, "` }") + g.RecordTypeUse(field.GetTypeName()) + } + g.P() + for _, field := range message.Field { + if field.OneofIndex == nil { + continue + } + g.P("func (*", oneofTypeName[field], ") ", oneofDisc[*field.OneofIndex], "() {}") + } + g.P() + for oi := range message.OneofDecl { + fname := oneofFieldName[int32(oi)] + g.P("func (m *", ccTypeName, ") Get", fname, "() ", oneofDisc[int32(oi)], " {") + g.P("if m != nil { return m.", fname, " }") + g.P("return nil") + g.P("}") + } + g.P() + } + + // Field getters + var getters []getterSymbol + for _, field := range message.Field { + oneof := field.OneofIndex != nil && message.allowOneof() + if !oneof && !gogoproto.HasGoGetters(g.file.FileDescriptorProto, message.DescriptorProto) { + continue + } + if gogoproto.IsEmbed(field) || gogoproto.IsCustomType(field) { + continue + } + fname := fieldNames[field] + typename, _ := g.GoType(message, field) + if t, ok := mapFieldTypes[field]; ok { + typename = t + } + mname := fieldGetterNames[field] + star := "" + if (*field.Type != descriptor.FieldDescriptorProto_TYPE_MESSAGE) && + (*field.Type != descriptor.FieldDescriptorProto_TYPE_GROUP) && + needsStar(field, g.file.proto3, message != nil && message.allowOneof()) && typename[0] == '*' { + typename = typename[1:] + star = "*" + } + + // In proto3, only generate getters for message fields and oneof fields. + if message.proto3() && *field.Type != descriptor.FieldDescriptorProto_TYPE_MESSAGE && !oneof { + continue + } + + // Only export getter symbols for basic types, + // and for messages and enums in the same package. + // Groups are not exported. + // Foreign types can't be hoisted through a public import because + // the importer may not already be importing the defining .proto. + // As an example, imagine we have an import tree like this: + // A.proto -> B.proto -> C.proto + // If A publicly imports B, we need to generate the getters from B in A's output, + // but if one such getter returns something from C then we cannot do that + // because A is not importing C already. + var getter, genType bool + switch *field.Type { + case descriptor.FieldDescriptorProto_TYPE_GROUP: + getter = false + case descriptor.FieldDescriptorProto_TYPE_MESSAGE, descriptor.FieldDescriptorProto_TYPE_ENUM: + // Only export getter if its return type is in this package. + getter = g.ObjectNamed(field.GetTypeName()).PackageName() == message.PackageName() + genType = true + default: + getter = true + } + if getter { + getters = append(getters, getterSymbol{ + name: mname, + typ: typename, + typeName: field.GetTypeName(), + genType: genType, + }) + } + + g.P("func (m *", ccTypeName, ") "+mname+"() "+typename+" {") + g.In() + def, hasDef := defNames[field] + typeDefaultIsNil := false // whether this field type's default value is a literal nil unless specified + switch *field.Type { + case descriptor.FieldDescriptorProto_TYPE_BYTES: + typeDefaultIsNil = !hasDef + case descriptor.FieldDescriptorProto_TYPE_GROUP, descriptor.FieldDescriptorProto_TYPE_MESSAGE: + typeDefaultIsNil = gogoproto.IsNullable(field) + } + if isRepeated(field) { + typeDefaultIsNil = true + } + if typeDefaultIsNil && !oneof { + // A bytes field with no explicit default needs less generated code, + // as does a message or group field, or a repeated field. + g.P("if m != nil {") + g.In() + g.P("return m." + fname) + g.Out() + g.P("}") + g.P("return nil") + g.Out() + g.P("}") + g.P() + continue + } + if !gogoproto.IsNullable(field) { + g.P("if m != nil {") + g.In() + g.P("return m." + fname) + g.Out() + g.P("}") + } else if !oneof { + g.P("if m != nil && m." + fname + " != nil {") + g.In() + g.P("return " + star + "m." + fname) + g.Out() + g.P("}") + } else { + uname := oneofFieldName[*field.OneofIndex] + tname := oneofTypeName[field] + g.P("if x, ok := m.Get", uname, "().(*", tname, "); ok {") + g.P("return x.", fname) + g.P("}") + } + if hasDef { + if *field.Type != descriptor.FieldDescriptorProto_TYPE_BYTES { + g.P("return " + def) + } else { + // The default is a []byte var. + // Make a copy when returning it to be safe. + g.P("return append([]byte(nil), ", def, "...)") + } + } else { + switch *field.Type { + case descriptor.FieldDescriptorProto_TYPE_GROUP, + descriptor.FieldDescriptorProto_TYPE_MESSAGE: + if field.OneofIndex != nil { + g.P(`return nil`) + } else { + goTyp, _ := g.GoType(message, field) + goTypName := GoTypeToName(goTyp) + g.P("return ", goTypName, "{}") + } + case descriptor.FieldDescriptorProto_TYPE_BOOL: + g.P("return false") + case descriptor.FieldDescriptorProto_TYPE_STRING: + g.P(`return ""`) + case descriptor.FieldDescriptorProto_TYPE_BYTES: + // This is only possible for oneof fields. + g.P("return nil") + case descriptor.FieldDescriptorProto_TYPE_ENUM: + // The default default for an enum is the first value in the enum, + // not zero. + obj := g.ObjectNamed(field.GetTypeName()) + var enum *EnumDescriptor + if id, ok := obj.(*ImportedDescriptor); ok { + // The enum type has been publicly imported. + enum, _ = id.o.(*EnumDescriptor) + } else { + enum, _ = obj.(*EnumDescriptor) + } + if enum == nil { + log.Printf("don't know how to generate getter for %s", field.GetName()) + continue + } + if len(enum.Value) == 0 { + g.P("return 0 // empty enum") + } else { + first := enum.Value[0].GetName() + if gogoproto.IsEnumValueCustomName(enum.Value[0]) { + first = gogoproto.GetEnumValueCustomName(enum.Value[0]) + } + + if gogoproto.EnabledGoEnumPrefix(enum.file, enum.EnumDescriptorProto) { + g.P("return ", g.DefaultPackageName(obj)+enum.prefix()+first) + } else { + g.P("return ", g.DefaultPackageName(obj)+first) + } + } + default: + g.P("return 0") + } + } + g.Out() + g.P("}") + g.P() + } + + if !message.group { + ms := &messageSymbol{ + sym: ccTypeName, + hasExtensions: hasExtensions, + isMessageSet: isMessageSet, + hasOneof: len(message.OneofDecl) > 0, + getters: getters, + } + g.file.addExport(message, ms) + } + + // Oneof functions + if len(message.OneofDecl) > 0 && message.allowOneof() { + fieldWire := make(map[*descriptor.FieldDescriptorProto]string) + + // method + enc := "_" + ccTypeName + "_OneofMarshaler" + dec := "_" + ccTypeName + "_OneofUnmarshaler" + size := "_" + ccTypeName + "_OneofSizer" + encSig := "(msg " + g.Pkg["proto"] + ".Message, b *" + g.Pkg["proto"] + ".Buffer) error" + decSig := "(msg " + g.Pkg["proto"] + ".Message, tag, wire int, b *" + g.Pkg["proto"] + ".Buffer) (bool, error)" + sizeSig := "(msg " + g.Pkg["proto"] + ".Message) (n int)" + + g.P("// XXX_OneofFuncs is for the internal use of the proto package.") + g.P("func (*", ccTypeName, ") XXX_OneofFuncs() (func", encSig, ", func", decSig, ", func", sizeSig, ", []interface{}) {") + g.P("return ", enc, ", ", dec, ", ", size, ", []interface{}{") + for _, field := range message.Field { + if field.OneofIndex == nil { + continue + } + g.P("(*", oneofTypeName[field], ")(nil),") + } + g.P("}") + g.P("}") + g.P() + + // marshaler + g.P("func ", enc, encSig, " {") + g.P("m := msg.(*", ccTypeName, ")") + for oi, odp := range message.OneofDecl { + g.P("// ", odp.GetName()) + fname := oneofFieldName[int32(oi)] + g.P("switch x := m.", fname, ".(type) {") + for _, field := range message.Field { + if field.OneofIndex == nil || int(*field.OneofIndex) != oi { + continue + } + g.P("case *", oneofTypeName[field], ":") + var wire, pre, post string + val := "x." + fieldNames[field] // overridden for TYPE_BOOL + canFail := false // only TYPE_MESSAGE and TYPE_GROUP can fail + switch *field.Type { + case descriptor.FieldDescriptorProto_TYPE_DOUBLE: + wire = "WireFixed64" + pre = "b.EncodeFixed64(" + g.Pkg["math"] + ".Float64bits(" + post = "))" + case descriptor.FieldDescriptorProto_TYPE_FLOAT: + wire = "WireFixed32" + pre = "b.EncodeFixed32(uint64(" + g.Pkg["math"] + ".Float32bits(" + post = ")))" + case descriptor.FieldDescriptorProto_TYPE_INT64, + descriptor.FieldDescriptorProto_TYPE_UINT64: + wire = "WireVarint" + pre, post = "b.EncodeVarint(uint64(", "))" + case descriptor.FieldDescriptorProto_TYPE_INT32, + descriptor.FieldDescriptorProto_TYPE_UINT32, + descriptor.FieldDescriptorProto_TYPE_ENUM: + wire = "WireVarint" + pre, post = "b.EncodeVarint(uint64(", "))" + case descriptor.FieldDescriptorProto_TYPE_FIXED64, + descriptor.FieldDescriptorProto_TYPE_SFIXED64: + wire = "WireFixed64" + pre, post = "b.EncodeFixed64(uint64(", "))" + case descriptor.FieldDescriptorProto_TYPE_FIXED32, + descriptor.FieldDescriptorProto_TYPE_SFIXED32: + wire = "WireFixed32" + pre, post = "b.EncodeFixed32(uint64(", "))" + case descriptor.FieldDescriptorProto_TYPE_BOOL: + // bool needs special handling. + g.P("t := uint64(0)") + g.P("if ", val, " { t = 1 }") + val = "t" + wire = "WireVarint" + pre, post = "b.EncodeVarint(", ")" + case descriptor.FieldDescriptorProto_TYPE_STRING: + wire = "WireBytes" + pre, post = "b.EncodeStringBytes(", ")" + case descriptor.FieldDescriptorProto_TYPE_GROUP: + wire = "WireStartGroup" + pre, post = "b.Marshal(", ")" + canFail = true + case descriptor.FieldDescriptorProto_TYPE_MESSAGE: + wire = "WireBytes" + pre, post = "b.EncodeMessage(", ")" + canFail = true + case descriptor.FieldDescriptorProto_TYPE_BYTES: + wire = "WireBytes" + pre, post = "b.EncodeRawBytes(", ")" + case descriptor.FieldDescriptorProto_TYPE_SINT32: + wire = "WireVarint" + pre, post = "b.EncodeZigzag32(uint64(", "))" + case descriptor.FieldDescriptorProto_TYPE_SINT64: + wire = "WireVarint" + pre, post = "b.EncodeZigzag64(uint64(", "))" + default: + g.Fail("unhandled oneof field type ", field.Type.String()) + } + fieldWire[field] = wire + g.P("_ = b.EncodeVarint(", field.Number, "<<3|", g.Pkg["proto"], ".", wire, ")") + if *field.Type == descriptor.FieldDescriptorProto_TYPE_BYTES && gogoproto.IsCustomType(field) { + g.P(`data, err := `, val, `.Marshal()`) + g.P(`if err != nil {`) + g.In() + g.P(`return err`) + g.Out() + g.P(`}`) + val = "data" + } + if !canFail { + g.P("_ = ", pre, val, post) + } else { + g.P("if err := ", pre, val, post, "; err != nil {") + g.In() + g.P("return err") + g.Out() + g.P("}") + } + if *field.Type == descriptor.FieldDescriptorProto_TYPE_GROUP { + g.P("_ = b.EncodeVarint(", field.Number, "<<3|", g.Pkg["proto"], ".WireEndGroup)") + } + } + g.P("case nil:") + g.P("default: return ", g.Pkg["fmt"], `.Errorf("`, ccTypeName, ".", fname, ` has unexpected type %T", x)`) + g.P("}") + } + g.P("return nil") + g.P("}") + g.P() + + // unmarshaler + g.P("func ", dec, decSig, " {") + g.P("m := msg.(*", ccTypeName, ")") + g.P("switch tag {") + for _, field := range message.Field { + if field.OneofIndex == nil { + continue + } + odp := message.OneofDecl[int(*field.OneofIndex)] + g.P("case ", field.Number, ": // ", odp.GetName(), ".", *field.Name) + g.P("if wire != ", g.Pkg["proto"], ".", fieldWire[field], " {") + g.P("return true, ", g.Pkg["proto"], ".ErrInternalBadWireType") + g.P("}") + lhs := "x, err" // overridden for TYPE_MESSAGE and TYPE_GROUP + var dec, cast, cast2 string + switch *field.Type { + case descriptor.FieldDescriptorProto_TYPE_DOUBLE: + dec, cast = "b.DecodeFixed64()", g.Pkg["math"]+".Float64frombits" + case descriptor.FieldDescriptorProto_TYPE_FLOAT: + dec, cast, cast2 = "b.DecodeFixed32()", "uint32", g.Pkg["math"]+".Float32frombits" + case descriptor.FieldDescriptorProto_TYPE_INT64: + dec, cast = "b.DecodeVarint()", "int64" + case descriptor.FieldDescriptorProto_TYPE_UINT64: + dec = "b.DecodeVarint()" + case descriptor.FieldDescriptorProto_TYPE_INT32: + dec, cast = "b.DecodeVarint()", "int32" + case descriptor.FieldDescriptorProto_TYPE_FIXED64: + dec = "b.DecodeFixed64()" + case descriptor.FieldDescriptorProto_TYPE_FIXED32: + dec, cast = "b.DecodeFixed32()", "uint32" + case descriptor.FieldDescriptorProto_TYPE_BOOL: + dec = "b.DecodeVarint()" + // handled specially below + case descriptor.FieldDescriptorProto_TYPE_STRING: + dec = "b.DecodeStringBytes()" + case descriptor.FieldDescriptorProto_TYPE_GROUP: + g.P("msg := new(", fieldTypes[field][1:], ")") // drop star + lhs = "err" + dec = "b.DecodeGroup(msg)" + // handled specially below + case descriptor.FieldDescriptorProto_TYPE_MESSAGE: + g.P("msg := new(", fieldTypes[field][1:], ")") // drop star + lhs = "err" + dec = "b.DecodeMessage(msg)" + // handled specially below + case descriptor.FieldDescriptorProto_TYPE_BYTES: + dec = "b.DecodeRawBytes(true)" + case descriptor.FieldDescriptorProto_TYPE_UINT32: + dec, cast = "b.DecodeVarint()", "uint32" + case descriptor.FieldDescriptorProto_TYPE_ENUM: + dec, cast = "b.DecodeVarint()", fieldTypes[field] + case descriptor.FieldDescriptorProto_TYPE_SFIXED32: + dec, cast = "b.DecodeFixed32()", "int32" + case descriptor.FieldDescriptorProto_TYPE_SFIXED64: + dec, cast = "b.DecodeFixed64()", "int64" + case descriptor.FieldDescriptorProto_TYPE_SINT32: + dec, cast = "b.DecodeZigzag32()", "int32" + case descriptor.FieldDescriptorProto_TYPE_SINT64: + dec, cast = "b.DecodeZigzag64()", "int64" + default: + g.Fail("unhandled oneof field type ", field.Type.String()) + } + g.P(lhs, " := ", dec) + val := "x" + if *field.Type == descriptor.FieldDescriptorProto_TYPE_BYTES && gogoproto.IsCustomType(field) { + g.P(`if err != nil {`) + g.In() + g.P(`return true, err`) + g.Out() + g.P(`}`) + _, ctyp, err := GetCustomType(field) + if err != nil { + panic(err) + } + g.P(`var cc `, ctyp) + g.P(`c := &cc`) + g.P(`err = c.Unmarshal(`, val, `)`) + val = "*c" + } + if cast != "" { + val = cast + "(" + val + ")" + } + if cast2 != "" { + val = cast2 + "(" + val + ")" + } + switch *field.Type { + case descriptor.FieldDescriptorProto_TYPE_BOOL: + val += " != 0" + case descriptor.FieldDescriptorProto_TYPE_GROUP, + descriptor.FieldDescriptorProto_TYPE_MESSAGE: + val = "msg" + } + if gogoproto.IsCastType(field) { + _, typ, err := getCastType(field) + if err != nil { + g.Fail(err.Error()) + } + val = typ + "(" + val + ")" + } + g.P("m.", oneofFieldName[*field.OneofIndex], " = &", oneofTypeName[field], "{", val, "}") + g.P("return true, err") + } + g.P("default: return false, nil") + g.P("}") + g.P("}") + g.P() + + // sizer + g.P("func ", size, sizeSig, " {") + g.P("m := msg.(*", ccTypeName, ")") + for oi, odp := range message.OneofDecl { + g.P("// ", odp.GetName()) + fname := oneofFieldName[int32(oi)] + g.P("switch x := m.", fname, ".(type) {") + for _, field := range message.Field { + if field.OneofIndex == nil || int(*field.OneofIndex) != oi { + continue + } + g.P("case *", oneofTypeName[field], ":") + val := "x." + fieldNames[field] + var wire, varint, fixed string + switch *field.Type { + case descriptor.FieldDescriptorProto_TYPE_DOUBLE: + wire = "WireFixed64" + fixed = "8" + case descriptor.FieldDescriptorProto_TYPE_FLOAT: + wire = "WireFixed32" + fixed = "4" + case descriptor.FieldDescriptorProto_TYPE_INT64, + descriptor.FieldDescriptorProto_TYPE_UINT64, + descriptor.FieldDescriptorProto_TYPE_INT32, + descriptor.FieldDescriptorProto_TYPE_UINT32, + descriptor.FieldDescriptorProto_TYPE_ENUM: + wire = "WireVarint" + varint = val + case descriptor.FieldDescriptorProto_TYPE_FIXED64, + descriptor.FieldDescriptorProto_TYPE_SFIXED64: + wire = "WireFixed64" + fixed = "8" + case descriptor.FieldDescriptorProto_TYPE_FIXED32, + descriptor.FieldDescriptorProto_TYPE_SFIXED32: + wire = "WireFixed32" + fixed = "4" + case descriptor.FieldDescriptorProto_TYPE_BOOL: + wire = "WireVarint" + fixed = "1" + case descriptor.FieldDescriptorProto_TYPE_STRING: + wire = "WireBytes" + fixed = "len(" + val + ")" + varint = fixed + case descriptor.FieldDescriptorProto_TYPE_GROUP: + wire = "WireStartGroup" + fixed = g.Pkg["proto"] + ".Size(" + val + ")" + case descriptor.FieldDescriptorProto_TYPE_MESSAGE: + wire = "WireBytes" + g.P("s := ", g.Pkg["proto"], ".Size(", val, ")") + fixed = "s" + varint = fixed + case descriptor.FieldDescriptorProto_TYPE_BYTES: + wire = "WireBytes" + if gogoproto.IsCustomType(field) { + fixed = val + ".Size()" + } else { + fixed = "len(" + val + ")" + } + varint = fixed + case descriptor.FieldDescriptorProto_TYPE_SINT32: + wire = "WireVarint" + varint = "(uint32(" + val + ") << 1) ^ uint32((int32(" + val + ") >> 31))" + case descriptor.FieldDescriptorProto_TYPE_SINT64: + wire = "WireVarint" + varint = "uint64(" + val + " << 1) ^ uint64((int64(" + val + ") >> 63))" + default: + g.Fail("unhandled oneof field type ", field.Type.String()) + } + g.P("n += ", g.Pkg["proto"], ".SizeVarint(", field.Number, "<<3|", g.Pkg["proto"], ".", wire, ")") + if varint != "" { + g.P("n += ", g.Pkg["proto"], ".SizeVarint(uint64(", varint, "))") + } + if fixed != "" { + g.P("n += ", fixed) + } + if *field.Type == descriptor.FieldDescriptorProto_TYPE_GROUP { + g.P("n += ", g.Pkg["proto"], ".SizeVarint(", field.Number, "<<3|", g.Pkg["proto"], ".WireEndGroup)") + } + } + g.P("case nil:") + g.P("default:") + g.P("panic(", g.Pkg["fmt"], ".Sprintf(\"proto: unexpected type %T in oneof\", x))") + g.P("}") + } + g.P("return n") + g.P("}") + g.P() + } + + for _, ext := range message.ext { + g.generateExtension(ext) + } + + fullName := strings.Join(message.TypeName(), ".") + if g.file.Package != nil { + fullName = *g.file.Package + "." + fullName + } + + g.addInitf("%s.RegisterType((*%s)(nil), %q)", g.Pkg["proto"], ccTypeName, fullName) +} + +func (g *Generator) generateExtension(ext *ExtensionDescriptor) { + ccTypeName := ext.DescName() + + extObj := g.ObjectNamed(*ext.Extendee) + var extDesc *Descriptor + if id, ok := extObj.(*ImportedDescriptor); ok { + // This is extending a publicly imported message. + // We need the underlying type for goTag. + extDesc = id.o.(*Descriptor) + } else { + extDesc = extObj.(*Descriptor) + } + extendedType := "*" + g.TypeName(extObj) // always use the original + field := ext.FieldDescriptorProto + fieldType, wireType := g.GoType(ext.parent, field) + tag := g.goTag(extDesc, field, wireType) + g.RecordTypeUse(*ext.Extendee) + if n := ext.FieldDescriptorProto.TypeName; n != nil { + // foreign extension type + g.RecordTypeUse(*n) + } + + typeName := ext.TypeName() + + // Special case for proto2 message sets: If this extension is extending + // proto2_bridge.MessageSet, and its final name component is "message_set_extension", + // then drop that last component. + mset := false + if extendedType == "*proto2_bridge.MessageSet" && typeName[len(typeName)-1] == "message_set_extension" { + typeName = typeName[:len(typeName)-1] + mset = true + } + + // For text formatting, the package must be exactly what the .proto file declares, + // ignoring overrides such as the go_package option, and with no dot/underscore mapping. + extName := strings.Join(typeName, ".") + if g.file.Package != nil { + extName = *g.file.Package + "." + extName + } + + g.P("var ", ccTypeName, " = &", g.Pkg["proto"], ".ExtensionDesc{") + g.In() + g.P("ExtendedType: (", extendedType, ")(nil),") + g.P("ExtensionType: (", fieldType, ")(nil),") + g.P("Field: ", field.Number, ",") + g.P(`Name: "`, extName, `",`) + g.P("Tag: ", tag, ",") + + g.Out() + g.P("}") + g.P() + + if mset { + // Generate a bit more code to register with message_set.go. + g.addInitf("%s.RegisterMessageSetType((%s)(nil), %d, %q)", g.Pkg["proto"], fieldType, *field.Number, extName) + } + + g.file.addExport(ext, constOrVarSymbol{ccTypeName, "var", ""}) +} + +func (g *Generator) generateInitFunction() { + for _, enum := range g.file.enum { + g.generateEnumRegistration(enum) + } + for _, d := range g.file.desc { + for _, ext := range d.ext { + g.generateExtensionRegistration(ext) + } + } + for _, ext := range g.file.ext { + g.generateExtensionRegistration(ext) + } + if len(g.init) == 0 { + return + } + g.P("func init() {") + g.In() + for _, l := range g.init { + g.P(l) + } + g.Out() + g.P("}") + g.init = nil +} + +func (g *Generator) generateFileDescriptor(file *FileDescriptor) { + // Make a copy and trim source_code_info data. + // TODO: Trim this more when we know exactly what we need. + pb := proto.Clone(file.FileDescriptorProto).(*descriptor.FileDescriptorProto) + pb.SourceCodeInfo = nil + + b, err := proto.Marshal(pb) + if err != nil { + g.Fail(err.Error()) + } + + var buf bytes.Buffer + w, _ := gzip.NewWriterLevel(&buf, gzip.BestCompression) + w.Write(b) + w.Close() + b = buf.Bytes() + + v := fmt.Sprintf("fileDescriptor%v", FileName(file)) + g.P() + g.P("var ", v, " = []byte{") + g.In() + g.P("// ", len(b), " bytes of a gzipped FileDescriptorProto") + for len(b) > 0 { + n := 16 + if n > len(b) { + n = len(b) + } + + s := "" + for _, c := range b[:n] { + s += fmt.Sprintf("0x%02x,", c) + } + g.P(s) + + b = b[n:] + } + g.Out() + g.P("}") +} + +func (g *Generator) generateEnumRegistration(enum *EnumDescriptor) { + // // We always print the full (proto-world) package name here. + pkg := enum.File().GetPackage() + if pkg != "" { + pkg += "." + } + // The full type name + typeName := enum.TypeName() + // The full type name, CamelCased. + ccTypeName := CamelCaseSlice(typeName) + g.addInitf("%s.RegisterEnum(%q, %[3]s_name, %[3]s_value)", g.Pkg["proto"], pkg+ccTypeName, ccTypeName) +} + +func (g *Generator) generateExtensionRegistration(ext *ExtensionDescriptor) { + g.addInitf("%s.RegisterExtension(%s)", g.Pkg["proto"], ext.DescName()) +} + +// And now lots of helper functions. + +// Is c an ASCII lower-case letter? +func isASCIILower(c byte) bool { + return 'a' <= c && c <= 'z' +} + +// Is c an ASCII digit? +func isASCIIDigit(c byte) bool { + return '0' <= c && c <= '9' +} + +// CamelCase returns the CamelCased name. +// If there is an interior underscore followed by a lower case letter, +// drop the underscore and convert the letter to upper case. +// There is a remote possibility of this rewrite causing a name collision, +// but it's so remote we're prepared to pretend it's nonexistent - since the +// C++ generator lowercases names, it's extremely unlikely to have two fields +// with different capitalizations. +// In short, _my_field_name_2 becomes XMyFieldName_2. +func CamelCase(s string) string { + if s == "" { + return "" + } + t := make([]byte, 0, 32) + i := 0 + if s[0] == '_' { + // Need a capital letter; drop the '_'. + t = append(t, 'X') + i++ + } + // Invariant: if the next letter is lower case, it must be converted + // to upper case. + // That is, we process a word at a time, where words are marked by _ or + // upper case letter. Digits are treated as words. + for ; i < len(s); i++ { + c := s[i] + if c == '_' && i+1 < len(s) && isASCIILower(s[i+1]) { + continue // Skip the underscore in s. + } + if isASCIIDigit(c) { + t = append(t, c) + continue + } + // Assume we have a letter now - if not, it's a bogus identifier. + // The next word is a sequence of characters that must start upper case. + if isASCIILower(c) { + c ^= ' ' // Make it a capital letter. + } + t = append(t, c) // Guaranteed not lower case. + // Accept lower case sequence that follows. + for i+1 < len(s) && isASCIILower(s[i+1]) { + i++ + t = append(t, s[i]) + } + } + return string(t) +} + +// CamelCaseSlice is like CamelCase, but the argument is a slice of strings to +// be joined with "_". +func CamelCaseSlice(elem []string) string { return CamelCase(strings.Join(elem, "_")) } + +// dottedSlice turns a sliced name into a dotted name. +func dottedSlice(elem []string) string { return strings.Join(elem, ".") } + +// Given a .proto file name, return the output name for the generated Go program. +func goFileName(name string) string { + ext := path.Ext(name) + if ext == ".proto" || ext == ".protodevel" { + name = name[0 : len(name)-len(ext)] + } + return name + ".pb.go" +} + +// Is this field optional? +func isOptional(field *descriptor.FieldDescriptorProto) bool { + return field.Label != nil && *field.Label == descriptor.FieldDescriptorProto_LABEL_OPTIONAL +} + +// Is this field required? +func isRequired(field *descriptor.FieldDescriptorProto) bool { + return field.Label != nil && *field.Label == descriptor.FieldDescriptorProto_LABEL_REQUIRED +} + +// Is this field repeated? +func isRepeated(field *descriptor.FieldDescriptorProto) bool { + return field.Label != nil && *field.Label == descriptor.FieldDescriptorProto_LABEL_REPEATED +} + +// badToUnderscore is the mapping function used to generate Go names from package names, +// which can be dotted in the input .proto file. It replaces non-identifier characters such as +// dot or dash with underscore. +func badToUnderscore(r rune) rune { + if unicode.IsLetter(r) || unicode.IsDigit(r) || r == '_' { + return r + } + return '_' +} + +// baseName returns the last path element of the name, with the last dotted suffix removed. +func baseName(name string) string { + // First, find the last element + if i := strings.LastIndex(name, "/"); i >= 0 { + name = name[i+1:] + } + // Now drop the suffix + if i := strings.LastIndex(name, "."); i >= 0 { + name = name[0:i] + } + return name +} + +// The SourceCodeInfo message describes the location of elements of a parsed +// .proto file by way of a "path", which is a sequence of integers that +// describe the route from a FileDescriptorProto to the relevant submessage. +// The path alternates between a field number of a repeated field, and an index +// into that repeated field. The constants below define the field numbers that +// are used. +// +// See descriptor.proto for more information about this. +const ( + // tag numbers in FileDescriptorProto + packagePath = 2 // package + messagePath = 4 // message_type + enumPath = 5 // enum_type + // tag numbers in DescriptorProto + messageFieldPath = 2 // field + messageMessagePath = 3 // nested_type + messageEnumPath = 4 // enum_type + messageOneofPath = 8 // oneof_decl + // tag numbers in EnumDescriptorProto + enumValuePath = 2 // value +) diff --git a/vendor/github.com/gogo/protobuf/protoc-gen-gogo/generator/helper.go b/vendor/github.com/gogo/protobuf/protoc-gen-gogo/generator/helper.go new file mode 100644 index 000000000..d8efa5efa --- /dev/null +++ b/vendor/github.com/gogo/protobuf/protoc-gen-gogo/generator/helper.go @@ -0,0 +1,445 @@ +// Copyright (c) 2013, Vastech SA (PTY) LTD. All rights reserved. +// http://github.com/gogo/protobuf/gogoproto +// +// 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 generator + +import ( + "bytes" + "go/parser" + "go/printer" + "go/token" + "path" + "strings" + + "github.com/gogo/protobuf/gogoproto" + "github.com/gogo/protobuf/proto" + descriptor "github.com/gogo/protobuf/protoc-gen-gogo/descriptor" + plugin "github.com/gogo/protobuf/protoc-gen-gogo/plugin" +) + +func (d *FileDescriptor) Messages() []*Descriptor { + return d.desc +} + +func (d *FileDescriptor) Enums() []*EnumDescriptor { + return d.enum +} + +func (d *Descriptor) IsGroup() bool { + return d.group +} + +func (g *Generator) IsGroup(field *descriptor.FieldDescriptorProto) bool { + if d, ok := g.typeNameToObject[field.GetTypeName()].(*Descriptor); ok { + return d.IsGroup() + } + return false +} + +func (g *Generator) TypeNameByObject(typeName string) Object { + o, ok := g.typeNameToObject[typeName] + if !ok { + g.Fail("can't find object with type", typeName) + } + return o +} + +func (g *Generator) OneOfTypeName(message *Descriptor, field *descriptor.FieldDescriptorProto) string { + typeName := message.TypeName() + ccTypeName := CamelCaseSlice(typeName) + fieldName := g.GetOneOfFieldName(message, field) + tname := ccTypeName + "_" + fieldName + // It is possible for this to collide with a message or enum + // nested in this message. Check for collisions. + ok := true + for _, desc := range message.nested { + if strings.Join(desc.TypeName(), "_") == tname { + ok = false + break + } + } + for _, enum := range message.enums { + if strings.Join(enum.TypeName(), "_") == tname { + ok = false + break + } + } + if !ok { + tname += "_" + } + return tname +} + +type PluginImports interface { + NewImport(pkg string) Single + GenerateImports(file *FileDescriptor) +} + +type pluginImports struct { + generator *Generator + singles []Single +} + +func NewPluginImports(generator *Generator) *pluginImports { + return &pluginImports{generator, make([]Single, 0)} +} + +func (this *pluginImports) NewImport(pkg string) Single { + imp := newImportedPackage(this.generator.ImportPrefix, pkg) + this.singles = append(this.singles, imp) + return imp +} + +func (this *pluginImports) GenerateImports(file *FileDescriptor) { + for _, s := range this.singles { + if s.IsUsed() { + this.generator.PrintImport(s.Name(), s.Location()) + } + } +} + +type Single interface { + Use() string + IsUsed() bool + Name() string + Location() string +} + +type importedPackage struct { + used bool + pkg string + name string + importPrefix string +} + +func newImportedPackage(importPrefix, pkg string) *importedPackage { + return &importedPackage{ + pkg: pkg, + importPrefix: importPrefix, + } +} + +func (this *importedPackage) Use() string { + if !this.used { + this.name = RegisterUniquePackageName(this.pkg, nil) + this.used = true + } + return this.name +} + +func (this *importedPackage) IsUsed() bool { + return this.used +} + +func (this *importedPackage) Name() string { + return this.name +} + +func (this *importedPackage) Location() string { + return this.importPrefix + this.pkg +} + +func (g *Generator) GetFieldName(message *Descriptor, field *descriptor.FieldDescriptorProto) string { + goTyp, _ := g.GoType(message, field) + fieldname := CamelCase(*field.Name) + if gogoproto.IsCustomName(field) { + fieldname = gogoproto.GetCustomName(field) + } + if gogoproto.IsEmbed(field) { + fieldname = EmbedFieldName(goTyp) + } + if field.OneofIndex != nil { + fieldname = message.OneofDecl[int(*field.OneofIndex)].GetName() + fieldname = CamelCase(fieldname) + } + for _, f := range methodNames { + if f == fieldname { + return fieldname + "_" + } + } + if !gogoproto.IsProtoSizer(message.file, message.DescriptorProto) { + if fieldname == "Size" { + return fieldname + "_" + } + } + return fieldname +} + +func (g *Generator) GetOneOfFieldName(message *Descriptor, field *descriptor.FieldDescriptorProto) string { + goTyp, _ := g.GoType(message, field) + fieldname := CamelCase(*field.Name) + if gogoproto.IsCustomName(field) { + fieldname = gogoproto.GetCustomName(field) + } + if gogoproto.IsEmbed(field) { + fieldname = EmbedFieldName(goTyp) + } + for _, f := range methodNames { + if f == fieldname { + return fieldname + "_" + } + } + if !gogoproto.IsProtoSizer(message.file, message.DescriptorProto) { + if fieldname == "Size" { + return fieldname + "_" + } + } + return fieldname +} + +func (g *Generator) IsMap(field *descriptor.FieldDescriptorProto) bool { + if !field.IsMessage() { + return false + } + byName := g.ObjectNamed(field.GetTypeName()) + desc, ok := byName.(*Descriptor) + if byName == nil || !ok || !desc.GetOptions().GetMapEntry() { + return false + } + return true +} + +func (g *Generator) GetMapKeyField(field, keyField *descriptor.FieldDescriptorProto) *descriptor.FieldDescriptorProto { + if !gogoproto.IsCastKey(field) { + return keyField + } + keyField = proto.Clone(keyField).(*descriptor.FieldDescriptorProto) + if keyField.Options == nil { + keyField.Options = &descriptor.FieldOptions{} + } + keyType := gogoproto.GetCastKey(field) + if err := proto.SetExtension(keyField.Options, gogoproto.E_Casttype, &keyType); err != nil { + g.Fail(err.Error()) + } + return keyField +} + +func (g *Generator) GetMapValueField(field, valField *descriptor.FieldDescriptorProto) *descriptor.FieldDescriptorProto { + if !gogoproto.IsCastValue(field) && gogoproto.IsNullable(field) { + return valField + } + valField = proto.Clone(valField).(*descriptor.FieldDescriptorProto) + if valField.Options == nil { + valField.Options = &descriptor.FieldOptions{} + } + if valType := gogoproto.GetCastValue(field); len(valType) > 0 { + if err := proto.SetExtension(valField.Options, gogoproto.E_Casttype, &valType); err != nil { + g.Fail(err.Error()) + } + } + + nullable := gogoproto.IsNullable(field) + if err := proto.SetExtension(valField.Options, gogoproto.E_Nullable, &nullable); err != nil { + g.Fail(err.Error()) + } + return valField +} + +// GoMapValueTypes returns the map value Go type and the alias map value Go type (for casting), taking into +// account whether the map is nullable or the value is a message. +func GoMapValueTypes(mapField, valueField *descriptor.FieldDescriptorProto, goValueType, goValueAliasType string) (nullable bool, outGoType string, outGoAliasType string) { + nullable = gogoproto.IsNullable(mapField) && valueField.IsMessage() + if nullable { + // ensure the non-aliased Go value type is a pointer for consistency + if strings.HasPrefix(goValueType, "*") { + outGoType = goValueType + } else { + outGoType = "*" + goValueType + } + outGoAliasType = goValueAliasType + } else { + outGoType = strings.Replace(goValueType, "*", "", 1) + outGoAliasType = strings.Replace(goValueAliasType, "*", "", 1) + } + return +} + +func GoTypeToName(goTyp string) string { + return strings.Replace(strings.Replace(goTyp, "*", "", -1), "[]", "", -1) +} + +func EmbedFieldName(goTyp string) string { + goTyp = GoTypeToName(goTyp) + goTyps := strings.Split(goTyp, ".") + if len(goTyps) == 1 { + return goTyp + } + if len(goTyps) == 2 { + return goTyps[1] + } + panic("unreachable") +} + +func (g *Generator) GeneratePlugin(p Plugin) { + p.Init(g) + // Generate the output. The generator runs for every file, even the files + // that we don't generate output for, so that we can collate the full list + // of exported symbols to support public imports. + genFileMap := make(map[*FileDescriptor]bool, len(g.genFiles)) + for _, file := range g.genFiles { + genFileMap[file] = true + } + i := 0 + for _, file := range g.allFiles { + g.Reset() + g.writeOutput = genFileMap[file] + g.generatePlugin(file, p) + if !g.writeOutput { + continue + } + g.Response.File[i] = new(plugin.CodeGeneratorResponse_File) + g.Response.File[i].Name = proto.String(goFileName(*file.Name)) + g.Response.File[i].Content = proto.String(g.String()) + i++ + } +} + +func (g *Generator) SetFile(file *descriptor.FileDescriptorProto) { + g.file = g.FileOf(file) +} + +func (g *Generator) generatePlugin(file *FileDescriptor, p Plugin) { + g.writtenImports = make(map[string]bool) + g.file = g.FileOf(file.FileDescriptorProto) + g.usedPackages = make(map[string]bool) + + // Run the plugins before the imports so we know which imports are necessary. + p.Generate(file) + + // Generate header and imports last, though they appear first in the output. + rem := g.Buffer + g.Buffer = new(bytes.Buffer) + g.generateHeader() + p.GenerateImports(g.file) + g.generateImports() + if !g.writeOutput { + return + } + g.Write(rem.Bytes()) + + // Reformat generated code. + contents := string(g.Buffer.Bytes()) + fset := token.NewFileSet() + ast, err := parser.ParseFile(fset, "", g, parser.ParseComments) + if err != nil { + g.Fail("bad Go source code was generated:", contents, err.Error()) + return + } + g.Reset() + err = (&printer.Config{Mode: printer.TabIndent | printer.UseSpaces, Tabwidth: 8}).Fprint(g, fset, ast) + if err != nil { + g.Fail("generated Go source code could not be reformatted:", err.Error()) + } +} + +func GetCustomType(field *descriptor.FieldDescriptorProto) (packageName string, typ string, err error) { + return getCustomType(field) +} + +func getCustomType(field *descriptor.FieldDescriptorProto) (packageName string, typ string, err error) { + if field.Options != nil { + var v interface{} + v, err = proto.GetExtension(field.Options, gogoproto.E_Customtype) + if err == nil && v.(*string) != nil { + ctype := *(v.(*string)) + packageName, typ = splitCPackageType(ctype) + return packageName, typ, nil + } + } + return "", "", err +} + +func splitCPackageType(ctype string) (packageName string, typ string) { + ss := strings.Split(ctype, ".") + if len(ss) == 1 { + return "", ctype + } + packageName = strings.Join(ss[0:len(ss)-1], ".") + typeName := ss[len(ss)-1] + importStr := strings.Map(badToUnderscore, packageName) + typ = importStr + "." + typeName + return packageName, typ +} + +func getCastType(field *descriptor.FieldDescriptorProto) (packageName string, typ string, err error) { + if field.Options != nil { + var v interface{} + v, err = proto.GetExtension(field.Options, gogoproto.E_Casttype) + if err == nil && v.(*string) != nil { + ctype := *(v.(*string)) + packageName, typ = splitCPackageType(ctype) + return packageName, typ, nil + } + } + return "", "", err +} + +func getCastKey(field *descriptor.FieldDescriptorProto) (packageName string, typ string, err error) { + if field.Options != nil { + var v interface{} + v, err = proto.GetExtension(field.Options, gogoproto.E_Castkey) + if err == nil && v.(*string) != nil { + ctype := *(v.(*string)) + packageName, typ = splitCPackageType(ctype) + return packageName, typ, nil + } + } + return "", "", err +} + +func getCastValue(field *descriptor.FieldDescriptorProto) (packageName string, typ string, err error) { + if field.Options != nil { + var v interface{} + v, err = proto.GetExtension(field.Options, gogoproto.E_Castvalue) + if err == nil && v.(*string) != nil { + ctype := *(v.(*string)) + packageName, typ = splitCPackageType(ctype) + return packageName, typ, nil + } + } + return "", "", err +} + +func FileName(file *FileDescriptor) string { + fname := path.Base(file.FileDescriptorProto.GetName()) + fname = strings.Replace(fname, ".proto", "", -1) + fname = strings.Replace(fname, "-", "_", -1) + fname = strings.Replace(fname, ".", "_", -1) + return CamelCase(fname) +} + +func (g *Generator) AllFiles() *descriptor.FileDescriptorSet { + set := &descriptor.FileDescriptorSet{} + set.File = make([]*descriptor.FileDescriptorProto, len(g.allFiles)) + for i := range g.allFiles { + set.File[i] = g.allFiles[i].FileDescriptorProto + } + return set +} + +func (d *Descriptor) Path() string { + return d.path +} diff --git a/vendor/github.com/gogo/protobuf/protoc-gen-gogo/generator/name_test.go b/vendor/github.com/gogo/protobuf/protoc-gen-gogo/generator/name_test.go new file mode 100644 index 000000000..f926918e4 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/protoc-gen-gogo/generator/name_test.go @@ -0,0 +1,56 @@ +// Go support for Protocol Buffers - Google's data interchange format +// +// Copyright 2013 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 generator + +import ( + "testing" +) + +func TestCamelCase(t *testing.T) { + tests := []struct { + in, want string + }{ + {"one", "One"}, + {"one_two", "OneTwo"}, + {"_my_field_name_2", "XMyFieldName_2"}, + {"Something_Capped", "Something_Capped"}, + {"my_Name", "My_Name"}, + {"OneTwo", "OneTwo"}, + {"_", "X"}, + {"_a_", "XA_"}, + } + for _, tc := range tests { + if got := CamelCase(tc.in); got != tc.want { + t.Errorf("CamelCase(%q) = %q, want %q", tc.in, got, tc.want) + } + } +} diff --git a/vendor/github.com/gogo/protobuf/protoc-gen-gogo/main.go b/vendor/github.com/gogo/protobuf/protoc-gen-gogo/main.go new file mode 100644 index 000000000..dd8e79503 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/protoc-gen-gogo/main.go @@ -0,0 +1,57 @@ +// 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. + +// protoc-gen-go is a plugin for the Google protocol buffer compiler to generate +// Go code. Run it by building this program and putting it in your path with +// the name +// protoc-gen-gogo +// That word 'gogo' at the end becomes part of the option string set for the +// protocol compiler, so once the protocol compiler (protoc) is installed +// you can run +// protoc --gogo_out=output_directory input_directory/file.proto +// to generate Go bindings for the protocol defined by file.proto. +// With that input, the output will be written to +// output_directory/file.pb.go +// +// The generated code is documented in the package comment for +// the library. +// +// See the README and documentation for protocol buffers to learn more: +// https://developers.google.com/protocol-buffers/ +package main + +import ( + "github.com/gogo/protobuf/vanity/command" +) + +func main() { + command.Write(command.Generate(command.Read())) +} diff --git a/vendor/github.com/gogo/protobuf/protoc-gen-gogo/plugin/Makefile b/vendor/github.com/gogo/protobuf/protoc-gen-gogo/plugin/Makefile new file mode 100644 index 000000000..546287cef --- /dev/null +++ b/vendor/github.com/gogo/protobuf/protoc-gen-gogo/plugin/Makefile @@ -0,0 +1,37 @@ +# 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. + +# Not stored here, but plugin.proto is in https://github.com/google/protobuf/ +# at src/google/protobuf/compiler/plugin.proto +# Also we need to fix an import. +regenerate: + protoc --gogo_out=Mgoogle/protobuf/descriptor.proto=github.com/gogo/protobuf/protoc-gen-gogo/descriptor:. -I=../../protobuf/google/protobuf/compiler/:../../protobuf/ ../../protobuf/google/protobuf/compiler/plugin.proto + diff --git a/vendor/github.com/gogo/protobuf/protoc-gen-gogo/plugin/plugin.pb.go b/vendor/github.com/gogo/protobuf/protoc-gen-gogo/plugin/plugin.pb.go new file mode 100644 index 000000000..6195da80e --- /dev/null +++ b/vendor/github.com/gogo/protobuf/protoc-gen-gogo/plugin/plugin.pb.go @@ -0,0 +1,226 @@ +// Code generated by protoc-gen-gogo. +// source: plugin.proto +// DO NOT EDIT! + +/* +Package plugin_go is a generated protocol buffer package. + +It is generated from these files: + plugin.proto + +It has these top-level messages: + CodeGeneratorRequest + CodeGeneratorResponse +*/ +package plugin_go + +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. +const _ = proto.GoGoProtoPackageIsVersion1 + +// An encoded CodeGeneratorRequest is written to the plugin's stdin. +type CodeGeneratorRequest struct { + // The .proto files that were explicitly listed on the command-line. The + // code generator should generate code only for these files. Each file's + // descriptor will be included in proto_file, below. + FileToGenerate []string `protobuf:"bytes,1,rep,name=file_to_generate,json=fileToGenerate" json:"file_to_generate,omitempty"` + // The generator parameter passed on the command-line. + Parameter *string `protobuf:"bytes,2,opt,name=parameter" json:"parameter,omitempty"` + // FileDescriptorProtos for all files in files_to_generate and everything + // they import. The files will appear in topological order, so each file + // appears before any file that imports it. + // + // protoc guarantees that all proto_files will be written after + // the fields above, even though this is not technically guaranteed by the + // protobuf wire format. This theoretically could allow a plugin to stream + // in the FileDescriptorProtos and handle them one by one rather than read + // the entire set into memory at once. However, as of this writing, this + // is not similarly optimized on protoc's end -- it will store all fields in + // memory at once before sending them to the plugin. + ProtoFile []*google_protobuf.FileDescriptorProto `protobuf:"bytes,15,rep,name=proto_file,json=protoFile" json:"proto_file,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *CodeGeneratorRequest) Reset() { *m = CodeGeneratorRequest{} } +func (m *CodeGeneratorRequest) String() string { return proto.CompactTextString(m) } +func (*CodeGeneratorRequest) ProtoMessage() {} +func (*CodeGeneratorRequest) Descriptor() ([]byte, []int) { return fileDescriptorPlugin, []int{0} } + +func (m *CodeGeneratorRequest) GetFileToGenerate() []string { + if m != nil { + return m.FileToGenerate + } + return nil +} + +func (m *CodeGeneratorRequest) GetParameter() string { + if m != nil && m.Parameter != nil { + return *m.Parameter + } + return "" +} + +func (m *CodeGeneratorRequest) GetProtoFile() []*google_protobuf.FileDescriptorProto { + if m != nil { + return m.ProtoFile + } + return nil +} + +// The plugin writes an encoded CodeGeneratorResponse to stdout. +type CodeGeneratorResponse struct { + // Error message. If non-empty, code generation failed. The plugin process + // should exit with status code zero even if it reports an error in this way. + // + // This should be used to indicate errors in .proto files which prevent the + // code generator from generating correct code. Errors which indicate a + // problem in protoc itself -- such as the input CodeGeneratorRequest being + // unparseable -- should be reported by writing a message to stderr and + // exiting with a non-zero status code. + Error *string `protobuf:"bytes,1,opt,name=error" json:"error,omitempty"` + File []*CodeGeneratorResponse_File `protobuf:"bytes,15,rep,name=file" json:"file,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *CodeGeneratorResponse) Reset() { *m = CodeGeneratorResponse{} } +func (m *CodeGeneratorResponse) String() string { return proto.CompactTextString(m) } +func (*CodeGeneratorResponse) ProtoMessage() {} +func (*CodeGeneratorResponse) Descriptor() ([]byte, []int) { return fileDescriptorPlugin, []int{1} } + +func (m *CodeGeneratorResponse) GetError() string { + if m != nil && m.Error != nil { + return *m.Error + } + return "" +} + +func (m *CodeGeneratorResponse) GetFile() []*CodeGeneratorResponse_File { + if m != nil { + return m.File + } + return nil +} + +// Represents a single generated file. +type CodeGeneratorResponse_File struct { + // The file name, relative to the output directory. The name must not + // contain "." or ".." components and must be relative, not be absolute (so, + // the file cannot lie outside the output directory). "/" must be used as + // the path separator, not "\". + // + // If the name is omitted, the content will be appended to the previous + // file. This allows the generator to break large files into small chunks, + // and allows the generated text to be streamed back to protoc so that large + // files need not reside completely in memory at one time. Note that as of + // this writing protoc does not optimize for this -- it will read the entire + // CodeGeneratorResponse before writing files to disk. + Name *string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"` + // If non-empty, indicates that the named file should already exist, and the + // content here is to be inserted into that file at a defined insertion + // point. This feature allows a code generator to extend the output + // produced by another code generator. The original generator may provide + // insertion points by placing special annotations in the file that look + // like: + // @@protoc_insertion_point(NAME) + // The annotation can have arbitrary text before and after it on the line, + // which allows it to be placed in a comment. NAME should be replaced with + // an identifier naming the point -- this is what other generators will use + // as the insertion_point. Code inserted at this point will be placed + // immediately above the line containing the insertion point (thus multiple + // insertions to the same point will come out in the order they were added). + // The double-@ is intended to make it unlikely that the generated code + // could contain things that look like insertion points by accident. + // + // For example, the C++ code generator places the following line in the + // .pb.h files that it generates: + // // @@protoc_insertion_point(namespace_scope) + // This line appears within the scope of the file's package namespace, but + // outside of any particular class. Another plugin can then specify the + // insertion_point "namespace_scope" to generate additional classes or + // other declarations that should be placed in this scope. + // + // Note that if the line containing the insertion point begins with + // whitespace, the same whitespace will be added to every line of the + // inserted text. This is useful for languages like Python, where + // indentation matters. In these languages, the insertion point comment + // should be indented the same amount as any inserted code will need to be + // in order to work correctly in that context. + // + // The code generator that generates the initial file and the one which + // inserts into it must both run as part of a single invocation of protoc. + // Code generators are executed in the order in which they appear on the + // command line. + // + // If |insertion_point| is present, |name| must also be present. + InsertionPoint *string `protobuf:"bytes,2,opt,name=insertion_point,json=insertionPoint" json:"insertion_point,omitempty"` + // The file contents. + Content *string `protobuf:"bytes,15,opt,name=content" json:"content,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *CodeGeneratorResponse_File) Reset() { *m = CodeGeneratorResponse_File{} } +func (m *CodeGeneratorResponse_File) String() string { return proto.CompactTextString(m) } +func (*CodeGeneratorResponse_File) ProtoMessage() {} +func (*CodeGeneratorResponse_File) Descriptor() ([]byte, []int) { + return fileDescriptorPlugin, []int{1, 0} +} + +func (m *CodeGeneratorResponse_File) GetName() string { + if m != nil && m.Name != nil { + return *m.Name + } + return "" +} + +func (m *CodeGeneratorResponse_File) GetInsertionPoint() string { + if m != nil && m.InsertionPoint != nil { + return *m.InsertionPoint + } + return "" +} + +func (m *CodeGeneratorResponse_File) GetContent() string { + if m != nil && m.Content != nil { + return *m.Content + } + return "" +} + +func init() { + proto.RegisterType((*CodeGeneratorRequest)(nil), "google.protobuf.compiler.CodeGeneratorRequest") + proto.RegisterType((*CodeGeneratorResponse)(nil), "google.protobuf.compiler.CodeGeneratorResponse") + proto.RegisterType((*CodeGeneratorResponse_File)(nil), "google.protobuf.compiler.CodeGeneratorResponse.File") +} + +var fileDescriptorPlugin = []byte{ + // 304 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0x74, 0x51, 0x4f, 0x4b, 0xfb, 0x40, + 0x14, 0x24, 0xbf, 0x5f, 0x44, 0xf2, 0x2c, 0x8d, 0x2c, 0x15, 0x42, 0xe9, 0x21, 0x14, 0xc1, 0x9e, + 0x52, 0x10, 0xc1, 0x7b, 0x2b, 0xea, 0x31, 0x04, 0x4f, 0x82, 0x84, 0x98, 0xbe, 0x86, 0x85, 0x74, + 0xdf, 0xba, 0xd9, 0x7c, 0x22, 0xbf, 0x93, 0x9f, 0xc7, 0xfd, 0x93, 0x56, 0x29, 0xf6, 0x94, 0xbc, + 0x99, 0xd9, 0x99, 0xd9, 0x7d, 0x30, 0x92, 0x6d, 0xdf, 0x70, 0x91, 0x49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0x38, 0xb7, 0x28, 0x4b, 0xe0, 0xbc, 0x26, 0xa1, 0xd1, 0x08, 0x62, 0x27, 0xd8, 0x8f, 0xab, 0x7b, + 0x98, 0x99, 0x2e, 0x27, 0xfb, 0xad, 0x46, 0xb9, 0x5b, 0xb4, 0x7b, 0x90, 0xee, 0x35, 0xf2, 0x6b, + 0x2f, 0x1b, 0xfa, 0x0e, 0x00, 0x00, 0xff, 0xff, 0x70, 0xa2, 0xbd, 0x30, 0x02, 0x02, 0x00, 0x00, +} diff --git a/vendor/github.com/gogo/protobuf/protoc-gen-gogo/testdata/Makefile b/vendor/github.com/gogo/protobuf/protoc-gen-gogo/testdata/Makefile new file mode 100644 index 000000000..c65a2eadf --- /dev/null +++ b/vendor/github.com/gogo/protobuf/protoc-gen-gogo/testdata/Makefile @@ -0,0 +1,67 @@ +# 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. + +all: + @echo run make test + +test: regenerate testbuild + +#test: regenerate testbuild extension_test +# ./extension_test +# @echo PASS + +my_test/test.pb.go: my_test/test.proto + protoc --gogo_out=Mmulti/multi1.proto=github.com/gogo/protobuf/protoc-gen-gogo/testdata/multi:. $< + +regenerate: my_test/test.pb.go + go install github.com/gogo/protobuf/protoc-min-version + protoc-min-version --version="3.0.0" --gogo_out=. ./my_test/test.proto + +nuke: clean + +testbuild: buildprotos + go test + +buildprotos: + # Invoke protoc once to generate three independent .pb.go files in the same package. + protoc --gogo_out=. multi/multi{1,2,3}.proto + +#extension_test: extension_test.$O +# $(LD) -L. -o $@ $< + +#multi.a: multi3.pb.$O multi2.pb.$O multi1.pb.$O +# rm -f multi.a +# $(QUOTED_GOBIN)/gopack grc $@ $< + +#test.pb.go: imp.pb.go +#multi1.pb.go: multi2.pb.go multi3.pb.go +#main.$O: imp.pb.$O test.pb.$O multi.a +#extension_test.$O: extension_base.pb.$O extension_extra.pb.$O extension_user.pb.$O diff --git a/vendor/github.com/gogo/protobuf/protoc-gen-gogo/testdata/extension_base.proto b/vendor/github.com/gogo/protobuf/protoc-gen-gogo/testdata/extension_base.proto new file mode 100644 index 000000000..94acfc1bc --- /dev/null +++ b/vendor/github.com/gogo/protobuf/protoc-gen-gogo/testdata/extension_base.proto @@ -0,0 +1,46 @@ +// 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. + +syntax = "proto2"; + +package extension_base; + +message BaseMessage { + optional int32 height = 1; + extensions 4 to 9; + extensions 16 to max; +} + +// Another message that may be extended, using message_set_wire_format. +message OldStyleMessage { + option message_set_wire_format = true; + extensions 100 to max; +} diff --git a/vendor/github.com/gogo/protobuf/protoc-gen-gogo/testdata/extension_extra.proto b/vendor/github.com/gogo/protobuf/protoc-gen-gogo/testdata/extension_extra.proto new file mode 100644 index 000000000..fca7f600c --- /dev/null +++ b/vendor/github.com/gogo/protobuf/protoc-gen-gogo/testdata/extension_extra.proto @@ -0,0 +1,38 @@ +// Go support for Protocol Buffers - Google's data interchange format +// +// Copyright 2011 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. + +syntax = "proto2"; + +package extension_extra; + +message ExtraMessage { + optional int32 width = 1; +} diff --git a/vendor/github.com/gogo/protobuf/protoc-gen-gogo/testdata/extension_test.go b/vendor/github.com/gogo/protobuf/protoc-gen-gogo/testdata/extension_test.go new file mode 100644 index 000000000..86e9c118a --- /dev/null +++ b/vendor/github.com/gogo/protobuf/protoc-gen-gogo/testdata/extension_test.go @@ -0,0 +1,210 @@ +// 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. + +// Test that we can use protocol buffers that use extensions. + +package testdata + +/* + +import ( + "bytes" + "regexp" + "testing" + + "github.com/golang/protobuf/proto" + base "extension_base.pb" + user "extension_user.pb" +) + +func TestSingleFieldExtension(t *testing.T) { + bm := &base.BaseMessage{ + Height: proto.Int32(178), + } + + // Use extension within scope of another type. + vol := proto.Uint32(11) + err := proto.SetExtension(bm, user.E_LoudMessage_Volume, vol) + if err != nil { + t.Fatal("Failed setting extension:", err) + } + buf, err := proto.Marshal(bm) + if err != nil { + t.Fatal("Failed encoding message with extension:", err) + } + bm_new := new(base.BaseMessage) + if err := proto.Unmarshal(buf, bm_new); err != nil { + t.Fatal("Failed decoding message with extension:", err) + } + if !proto.HasExtension(bm_new, user.E_LoudMessage_Volume) { + t.Fatal("Decoded message didn't contain extension.") + } + vol_out, err := proto.GetExtension(bm_new, user.E_LoudMessage_Volume) + if err != nil { + t.Fatal("Failed getting extension:", err) + } + if v := vol_out.(*uint32); *v != *vol { + t.Errorf("vol_out = %v, expected %v", *v, *vol) + } + proto.ClearExtension(bm_new, user.E_LoudMessage_Volume) + if proto.HasExtension(bm_new, user.E_LoudMessage_Volume) { + t.Fatal("Failed clearing extension.") + } +} + +func TestMessageExtension(t *testing.T) { + bm := &base.BaseMessage{ + Height: proto.Int32(179), + } + + // Use extension that is itself a message. + um := &user.UserMessage{ + Name: proto.String("Dave"), + Rank: proto.String("Major"), + } + err := proto.SetExtension(bm, user.E_LoginMessage_UserMessage, um) + if err != nil { + t.Fatal("Failed setting extension:", err) + } + buf, err := proto.Marshal(bm) + if err != nil { + t.Fatal("Failed encoding message with extension:", err) + } + bm_new := new(base.BaseMessage) + if err := proto.Unmarshal(buf, bm_new); err != nil { + t.Fatal("Failed decoding message with extension:", err) + } + if !proto.HasExtension(bm_new, user.E_LoginMessage_UserMessage) { + t.Fatal("Decoded message didn't contain extension.") + } + um_out, err := proto.GetExtension(bm_new, user.E_LoginMessage_UserMessage) + if err != nil { + t.Fatal("Failed getting extension:", err) + } + if n := um_out.(*user.UserMessage).Name; *n != *um.Name { + t.Errorf("um_out.Name = %q, expected %q", *n, *um.Name) + } + if r := um_out.(*user.UserMessage).Rank; *r != *um.Rank { + t.Errorf("um_out.Rank = %q, expected %q", *r, *um.Rank) + } + proto.ClearExtension(bm_new, user.E_LoginMessage_UserMessage) + if proto.HasExtension(bm_new, user.E_LoginMessage_UserMessage) { + t.Fatal("Failed clearing extension.") + } +} + +func TestTopLevelExtension(t *testing.T) { + bm := &base.BaseMessage{ + Height: proto.Int32(179), + } + + width := proto.Int32(17) + err := proto.SetExtension(bm, user.E_Width, width) + if err != nil { + t.Fatal("Failed setting extension:", err) + } + buf, err := proto.Marshal(bm) + if err != nil { + t.Fatal("Failed encoding message with extension:", err) + } + bm_new := new(base.BaseMessage) + if err := proto.Unmarshal(buf, bm_new); err != nil { + t.Fatal("Failed decoding message with extension:", err) + } + if !proto.HasExtension(bm_new, user.E_Width) { + t.Fatal("Decoded message didn't contain extension.") + } + width_out, err := proto.GetExtension(bm_new, user.E_Width) + if err != nil { + t.Fatal("Failed getting extension:", err) + } + if w := width_out.(*int32); *w != *width { + t.Errorf("width_out = %v, expected %v", *w, *width) + } + proto.ClearExtension(bm_new, user.E_Width) + if proto.HasExtension(bm_new, user.E_Width) { + t.Fatal("Failed clearing extension.") + } +} + +func TestMessageSetWireFormat(t *testing.T) { + osm := new(base.OldStyleMessage) + osp := &user.OldStyleParcel{ + Name: proto.String("Dave"), + Height: proto.Int32(178), + } + + err := proto.SetExtension(osm, user.E_OldStyleParcel_MessageSetExtension, osp) + if err != nil { + t.Fatal("Failed setting extension:", err) + } + + buf, err := proto.Marshal(osm) + if err != nil { + t.Fatal("Failed encoding message:", err) + } + + // Data generated from Python implementation. + expected := []byte{ + 11, 16, 209, 15, 26, 9, 10, 4, 68, 97, 118, 101, 16, 178, 1, 12, + } + + if !bytes.Equal(expected, buf) { + t.Errorf("Encoding mismatch.\nwant %+v\n got %+v", expected, buf) + } + + // Check that it is restored correctly. + osm = new(base.OldStyleMessage) + if err := proto.Unmarshal(buf, osm); err != nil { + t.Fatal("Failed decoding message:", err) + } + osp_out, err := proto.GetExtension(osm, user.E_OldStyleParcel_MessageSetExtension) + if err != nil { + t.Fatal("Failed getting extension:", err) + } + osp = osp_out.(*user.OldStyleParcel) + if *osp.Name != "Dave" || *osp.Height != 178 { + t.Errorf("Retrieved extension from decoded message is not correct: %+v", osp) + } +} + +func main() { + // simpler than rigging up gotest + testing.Main(regexp.MatchString, []testing.InternalTest{ + {"TestSingleFieldExtension", TestSingleFieldExtension}, + {"TestMessageExtension", TestMessageExtension}, + {"TestTopLevelExtension", TestTopLevelExtension}, + }, + []testing.InternalBenchmark{}, + []testing.InternalExample{}) +} + +*/ diff --git a/vendor/github.com/gogo/protobuf/protoc-gen-gogo/testdata/extension_user.proto b/vendor/github.com/gogo/protobuf/protoc-gen-gogo/testdata/extension_user.proto new file mode 100644 index 000000000..ff65873dd --- /dev/null +++ b/vendor/github.com/gogo/protobuf/protoc-gen-gogo/testdata/extension_user.proto @@ -0,0 +1,100 @@ +// 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. + +syntax = "proto2"; + +import "extension_base.proto"; +import "extension_extra.proto"; + +package extension_user; + +message UserMessage { + optional string name = 1; + optional string rank = 2; +} + +// Extend with a message +extend extension_base.BaseMessage { + optional UserMessage user_message = 5; +} + +// Extend with a foreign message +extend extension_base.BaseMessage { + optional extension_extra.ExtraMessage extra_message = 9; +} + +// Extend with some primitive types +extend extension_base.BaseMessage { + optional int32 width = 6; + optional int64 area = 7; +} + +// Extend inside the scope of another type +message LoudMessage { + extend extension_base.BaseMessage { + optional uint32 volume = 8; + } + extensions 100 to max; +} + +// Extend inside the scope of another type, using a message. +message LoginMessage { + extend extension_base.BaseMessage { + optional UserMessage user_message = 16; + } +} + +// Extend with a repeated field +extend extension_base.BaseMessage { + repeated Detail detail = 17; +} + +message Detail { + optional string color = 1; +} + +// An extension of an extension +message Announcement { + optional string words = 1; + extend LoudMessage { + optional Announcement loud_ext = 100; + } +} + +// Something that can be put in a message set. +message OldStyleParcel { + extend extension_base.OldStyleMessage { + optional OldStyleParcel message_set_extension = 2001; + } + + required string name = 1; + optional int32 height = 2; +} diff --git a/vendor/github.com/gogo/protobuf/protoc-gen-gogo/testdata/grpc.proto b/vendor/github.com/gogo/protobuf/protoc-gen-gogo/testdata/grpc.proto new file mode 100644 index 000000000..b8bc41acd --- /dev/null +++ b/vendor/github.com/gogo/protobuf/protoc-gen-gogo/testdata/grpc.proto @@ -0,0 +1,59 @@ +// Go support for Protocol Buffers - Google's data interchange format +// +// Copyright 2015 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. + +syntax = "proto3"; + +package grpc.testing; + +message SimpleRequest { +} + +message SimpleResponse { +} + +message StreamMsg { +} + +message StreamMsg2 { +} + +service Test { + rpc UnaryCall(SimpleRequest) returns (SimpleResponse); + + // This RPC streams from the server only. + rpc Downstream(SimpleRequest) returns (stream StreamMsg); + + // This RPC streams from the client. + rpc Upstream(stream StreamMsg) returns (SimpleResponse); + + // This one streams in both directions. + rpc Bidi(stream StreamMsg) returns (stream StreamMsg2); +} diff --git a/vendor/github.com/gogo/protobuf/protoc-gen-gogo/testdata/imp.pb.go.golden b/vendor/github.com/gogo/protobuf/protoc-gen-gogo/testdata/imp.pb.go.golden new file mode 100644 index 000000000..784a4f865 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/protoc-gen-gogo/testdata/imp.pb.go.golden @@ -0,0 +1,113 @@ +// Code generated by protoc-gen-go. +// source: imp.proto +// DO NOT EDIT! + +package imp + +import proto "github.com/golang/protobuf/proto" +import "math" +import "os" +import imp1 "imp2.pb" + +// Reference proto & math imports to suppress error if they are not otherwise used. +var _ = proto.GetString +var _ = math.Inf + +// Types from public import imp2.proto +type PubliclyImportedMessage imp1.PubliclyImportedMessage + +func (this *PubliclyImportedMessage) Reset() { (*imp1.PubliclyImportedMessage)(this).Reset() } +func (this *PubliclyImportedMessage) String() string { + return (*imp1.PubliclyImportedMessage)(this).String() +} + +// PubliclyImportedMessage from public import imp.proto + +type ImportedMessage_Owner int32 + +const ( + ImportedMessage_DAVE ImportedMessage_Owner = 1 + ImportedMessage_MIKE ImportedMessage_Owner = 2 +) + +var ImportedMessage_Owner_name = map[int32]string{ + 1: "DAVE", + 2: "MIKE", +} +var ImportedMessage_Owner_value = map[string]int32{ + "DAVE": 1, + "MIKE": 2, +} + +// NewImportedMessage_Owner is deprecated. Use x.Enum() instead. +func NewImportedMessage_Owner(x ImportedMessage_Owner) *ImportedMessage_Owner { + e := ImportedMessage_Owner(x) + return &e +} +func (x ImportedMessage_Owner) Enum() *ImportedMessage_Owner { + p := new(ImportedMessage_Owner) + *p = x + return p +} +func (x ImportedMessage_Owner) String() string { + return proto.EnumName(ImportedMessage_Owner_name, int32(x)) +} + +type ImportedMessage struct { + Field *int64 `protobuf:"varint,1,req,name=field" json:"field,omitempty"` + XXX_extensions map[int32][]byte `json:",omitempty"` + XXX_unrecognized []byte `json:",omitempty"` +} + +func (this *ImportedMessage) Reset() { *this = ImportedMessage{} } +func (this *ImportedMessage) String() string { return proto.CompactTextString(this) } + +var extRange_ImportedMessage = []proto.ExtensionRange{ + proto.ExtensionRange{90, 100}, +} + +func (*ImportedMessage) ExtensionRangeArray() []proto.ExtensionRange { + return extRange_ImportedMessage +} +func (this *ImportedMessage) ExtensionMap() map[int32][]byte { + if this.XXX_extensions == nil { + this.XXX_extensions = make(map[int32][]byte) + } + return this.XXX_extensions +} + +type ImportedExtendable struct { + XXX_extensions map[int32][]byte `json:",omitempty"` + XXX_unrecognized []byte `json:",omitempty"` +} + +func (this *ImportedExtendable) Reset() { *this = ImportedExtendable{} } +func (this *ImportedExtendable) String() string { return proto.CompactTextString(this) } + +func (this *ImportedExtendable) Marshal() ([]byte, error) { + return proto.MarshalMessageSet(this.ExtensionMap()) +} +func (this *ImportedExtendable) Unmarshal(buf []byte) error { + return proto.UnmarshalMessageSet(buf, this.ExtensionMap()) +} +// ensure ImportedExtendable satisfies proto.Marshaler and proto.Unmarshaler +var _ proto.Marshaler = (*ImportedExtendable)(nil) +var _ proto.Unmarshaler = (*ImportedExtendable)(nil) + +var extRange_ImportedExtendable = []proto.ExtensionRange{ + proto.ExtensionRange{100, 536870911}, +} + +func (*ImportedExtendable) ExtensionRangeArray() []proto.ExtensionRange { + return extRange_ImportedExtendable +} +func (this *ImportedExtendable) ExtensionMap() map[int32][]byte { + if this.XXX_extensions == nil { + this.XXX_extensions = make(map[int32][]byte) + } + return this.XXX_extensions +} + +func init() { + proto.RegisterEnum("imp.ImportedMessage_Owner", ImportedMessage_Owner_name, ImportedMessage_Owner_value) +} diff --git a/vendor/github.com/gogo/protobuf/protoc-gen-gogo/testdata/imp.proto b/vendor/github.com/gogo/protobuf/protoc-gen-gogo/testdata/imp.proto new file mode 100644 index 000000000..156e078d1 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/protoc-gen-gogo/testdata/imp.proto @@ -0,0 +1,70 @@ +// 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. + +syntax = "proto2"; + +package imp; + +import "imp2.proto"; +import "imp3.proto"; + +message ImportedMessage { + required int64 field = 1; + + // The forwarded getters for these fields are fiddly to get right. + optional ImportedMessage2 local_msg = 2; + optional ForeignImportedMessage foreign_msg = 3; // in imp3.proto + optional Owner enum_field = 4; + oneof union { + int32 state = 9; + } + + repeated string name = 5; + repeated Owner boss = 6; + repeated ImportedMessage2 memo = 7; + + map msg_map = 8; + + enum Owner { + DAVE = 1; + MIKE = 2; + } + + extensions 90 to 100; +} + +message ImportedMessage2 { +} + +message ImportedExtendable { + option message_set_wire_format = true; + extensions 100 to max; +} diff --git a/vendor/github.com/gogo/protobuf/protoc-gen-gogo/testdata/imp2.proto b/vendor/github.com/gogo/protobuf/protoc-gen-gogo/testdata/imp2.proto new file mode 100644 index 000000000..3bb0632b2 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/protoc-gen-gogo/testdata/imp2.proto @@ -0,0 +1,43 @@ +// Go support for Protocol Buffers - Google's data interchange format +// +// Copyright 2011 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. + +syntax = "proto2"; + +package imp; + +message PubliclyImportedMessage { + optional int64 field = 1; +} + +enum PubliclyImportedEnum { + GLASSES = 1; + HAIR = 2; +} diff --git a/vendor/github.com/gogo/protobuf/protoc-gen-gogo/testdata/imp3.proto b/vendor/github.com/gogo/protobuf/protoc-gen-gogo/testdata/imp3.proto new file mode 100644 index 000000000..58fc7598b --- /dev/null +++ b/vendor/github.com/gogo/protobuf/protoc-gen-gogo/testdata/imp3.proto @@ -0,0 +1,38 @@ +// Go support for Protocol Buffers - Google's data interchange format +// +// Copyright 2012 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. + +syntax = "proto2"; + +package imp; + +message ForeignImportedMessage { + optional string tuber = 1; +} diff --git a/vendor/github.com/gogo/protobuf/protoc-gen-gogo/testdata/main_test.go b/vendor/github.com/gogo/protobuf/protoc-gen-gogo/testdata/main_test.go new file mode 100644 index 000000000..271d9639d --- /dev/null +++ b/vendor/github.com/gogo/protobuf/protoc-gen-gogo/testdata/main_test.go @@ -0,0 +1,46 @@ +// 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. + +// A simple binary to link together the protocol buffers in this test. + +package testdata + +import ( + "testing" + + mytestpb "./my_test" + multipb "github.com/gogo/protobuf/protoc-gen-gogo/testdata/multi" +) + +func TestLink(t *testing.T) { + _ = &multipb.Multi1{} + _ = &mytestpb.Request{} +} diff --git a/vendor/github.com/gogo/protobuf/protoc-gen-gogo/testdata/multi/.gitignore b/vendor/github.com/gogo/protobuf/protoc-gen-gogo/testdata/multi/.gitignore new file mode 100644 index 000000000..c61a5e8b0 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/protoc-gen-gogo/testdata/multi/.gitignore @@ -0,0 +1 @@ +*.pb.go diff --git a/vendor/github.com/gogo/protobuf/protoc-gen-gogo/testdata/multi/multi1.proto b/vendor/github.com/gogo/protobuf/protoc-gen-gogo/testdata/multi/multi1.proto new file mode 100644 index 000000000..0da6e0af4 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/protoc-gen-gogo/testdata/multi/multi1.proto @@ -0,0 +1,44 @@ +// 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. + +syntax = "proto2"; + +import "multi/multi2.proto"; +import "multi/multi3.proto"; + +package multitest; + +message Multi1 { + required Multi2 multi2 = 1; + optional Multi2.Color color = 2; + optional Multi3.HatType hat_type = 3; +} + diff --git a/vendor/github.com/gogo/protobuf/protoc-gen-gogo/testdata/multi/multi2.proto b/vendor/github.com/gogo/protobuf/protoc-gen-gogo/testdata/multi/multi2.proto new file mode 100644 index 000000000..e6bfc71b3 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/protoc-gen-gogo/testdata/multi/multi2.proto @@ -0,0 +1,46 @@ +// 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. + +syntax = "proto2"; + +package multitest; + +message Multi2 { + required int32 required_value = 1; + + enum Color { + BLUE = 1; + GREEN = 2; + RED = 3; + }; + optional Color color = 2; +} + diff --git a/vendor/github.com/gogo/protobuf/protoc-gen-gogo/testdata/multi/multi3.proto b/vendor/github.com/gogo/protobuf/protoc-gen-gogo/testdata/multi/multi3.proto new file mode 100644 index 000000000..146c255bd --- /dev/null +++ b/vendor/github.com/gogo/protobuf/protoc-gen-gogo/testdata/multi/multi3.proto @@ -0,0 +1,43 @@ +// 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. + +syntax = "proto2"; + +package multitest; + +message Multi3 { + enum HatType { + FEDORA = 1; + FEZ = 2; + }; + optional HatType hat_type = 1; +} + diff --git a/vendor/github.com/gogo/protobuf/protoc-gen-gogo/testdata/my_test/test.pb.go b/vendor/github.com/gogo/protobuf/protoc-gen-gogo/testdata/my_test/test.pb.go new file mode 100644 index 000000000..56c97834b --- /dev/null +++ b/vendor/github.com/gogo/protobuf/protoc-gen-gogo/testdata/my_test/test.pb.go @@ -0,0 +1,960 @@ +// Code generated by protoc-gen-gogo. +// source: my_test/test.proto +// DO NOT EDIT! + +/* +Package my_test is a generated protocol buffer package. + +This package holds interesting messages. + +It is generated from these files: + my_test/test.proto + +It has these top-level messages: + Request + Reply + OtherBase + ReplyExtensions + OtherReplyExtensions + OldReply + Communique +*/ +package my_test + +import proto "github.com/gogo/protobuf/proto" +import fmt "fmt" +import math "math" +import _ "multi" + +// 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. +const _ = proto.GoGoProtoPackageIsVersion1 + +type HatType int32 + +const ( + // deliberately skipping 0 + HatType_FEDORA HatType = 1 + HatType_FEZ HatType = 2 +) + +var HatType_name = map[int32]string{ + 1: "FEDORA", + 2: "FEZ", +} +var HatType_value = map[string]int32{ + "FEDORA": 1, + "FEZ": 2, +} + +func (x HatType) Enum() *HatType { + p := new(HatType) + *p = x + return p +} +func (x HatType) String() string { + return proto.EnumName(HatType_name, int32(x)) +} +func (x *HatType) UnmarshalJSON(data []byte) error { + value, err := proto.UnmarshalJSONEnum(HatType_value, data, "HatType") + if err != nil { + return err + } + *x = HatType(value) + return nil +} +func (HatType) EnumDescriptor() ([]byte, []int) { return fileDescriptorTest, []int{0} } + +// This enum represents days of the week. +type Days int32 + +const ( + Days_MONDAY Days = 1 + Days_TUESDAY Days = 2 + Days_LUNDI Days = 1 +) + +var Days_name = map[int32]string{ + 1: "MONDAY", + 2: "TUESDAY", + // Duplicate value: 1: "LUNDI", +} +var Days_value = map[string]int32{ + "MONDAY": 1, + "TUESDAY": 2, + "LUNDI": 1, +} + +func (x Days) Enum() *Days { + p := new(Days) + *p = x + return p +} +func (x Days) String() string { + return proto.EnumName(Days_name, int32(x)) +} +func (x *Days) UnmarshalJSON(data []byte) error { + value, err := proto.UnmarshalJSONEnum(Days_value, data, "Days") + if err != nil { + return err + } + *x = Days(value) + return nil +} +func (Days) EnumDescriptor() ([]byte, []int) { return fileDescriptorTest, []int{1} } + +type Request_Color int32 + +const ( + Request_RED Request_Color = 0 + Request_GREEN Request_Color = 1 + Request_BLUE Request_Color = 2 +) + +var Request_Color_name = map[int32]string{ + 0: "RED", + 1: "GREEN", + 2: "BLUE", +} +var Request_Color_value = map[string]int32{ + "RED": 0, + "GREEN": 1, + "BLUE": 2, +} + +func (x Request_Color) Enum() *Request_Color { + p := new(Request_Color) + *p = x + return p +} +func (x Request_Color) String() string { + return proto.EnumName(Request_Color_name, int32(x)) +} +func (x *Request_Color) UnmarshalJSON(data []byte) error { + value, err := proto.UnmarshalJSONEnum(Request_Color_value, data, "Request_Color") + if err != nil { + return err + } + *x = Request_Color(value) + return nil +} +func (Request_Color) EnumDescriptor() ([]byte, []int) { return fileDescriptorTest, []int{0, 0} } + +type Reply_Entry_Game int32 + +const ( + Reply_Entry_FOOTBALL Reply_Entry_Game = 1 + Reply_Entry_TENNIS Reply_Entry_Game = 2 +) + +var Reply_Entry_Game_name = map[int32]string{ + 1: "FOOTBALL", + 2: "TENNIS", +} +var Reply_Entry_Game_value = map[string]int32{ + "FOOTBALL": 1, + "TENNIS": 2, +} + +func (x Reply_Entry_Game) Enum() *Reply_Entry_Game { + p := new(Reply_Entry_Game) + *p = x + return p +} +func (x Reply_Entry_Game) String() string { + return proto.EnumName(Reply_Entry_Game_name, int32(x)) +} +func (x *Reply_Entry_Game) UnmarshalJSON(data []byte) error { + value, err := proto.UnmarshalJSONEnum(Reply_Entry_Game_value, data, "Reply_Entry_Game") + if err != nil { + return err + } + *x = Reply_Entry_Game(value) + return nil +} +func (Reply_Entry_Game) EnumDescriptor() ([]byte, []int) { return fileDescriptorTest, []int{1, 0, 0} } + +// This is a message that might be sent somewhere. +type Request struct { + Key []int64 `protobuf:"varint,1,rep,name=key" json:"key,omitempty"` + // optional imp.ImportedMessage imported_message = 2; + Hue *Request_Color `protobuf:"varint,3,opt,name=hue,enum=my.test.Request_Color" json:"hue,omitempty"` + Hat *HatType `protobuf:"varint,4,opt,name=hat,enum=my.test.HatType,def=1" json:"hat,omitempty"` + // optional imp.ImportedMessage.Owner owner = 6; + Deadline *float32 `protobuf:"fixed32,7,opt,name=deadline,def=inf" json:"deadline,omitempty"` + Somegroup *Request_SomeGroup `protobuf:"group,8,opt,name=SomeGroup,json=somegroup" json:"somegroup,omitempty"` + // This is a map field. It will generate map[int32]string. + NameMapping map[int32]string `protobuf:"bytes,14,rep,name=name_mapping,json=nameMapping" json:"name_mapping,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + // This is a map field whose value type is a message. + MsgMapping map[int64]*Reply `protobuf:"bytes,15,rep,name=msg_mapping,json=msgMapping" json:"msg_mapping,omitempty" protobuf_key:"zigzag64,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + Reset_ *int32 `protobuf:"varint,12,opt,name=reset" json:"reset,omitempty"` + // This field should not conflict with any getters. + GetKey_ *string `protobuf:"bytes,16,opt,name=get_key,json=getKey" json:"get_key,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *Request) Reset() { *m = Request{} } +func (m *Request) String() string { return proto.CompactTextString(m) } +func (*Request) ProtoMessage() {} +func (*Request) Descriptor() ([]byte, []int) { return fileDescriptorTest, []int{0} } + +const Default_Request_Hat HatType = HatType_FEDORA + +var Default_Request_Deadline float32 = float32(math.Inf(1)) + +func (m *Request) GetKey() []int64 { + if m != nil { + return m.Key + } + return nil +} + +func (m *Request) GetHue() Request_Color { + if m != nil && m.Hue != nil { + return *m.Hue + } + return Request_RED +} + +func (m *Request) GetHat() HatType { + if m != nil && m.Hat != nil { + return *m.Hat + } + return Default_Request_Hat +} + +func (m *Request) GetDeadline() float32 { + if m != nil && m.Deadline != nil { + return *m.Deadline + } + return Default_Request_Deadline +} + +func (m *Request) GetSomegroup() *Request_SomeGroup { + if m != nil { + return m.Somegroup + } + return nil +} + +func (m *Request) GetNameMapping() map[int32]string { + if m != nil { + return m.NameMapping + } + return nil +} + +func (m *Request) GetMsgMapping() map[int64]*Reply { + if m != nil { + return m.MsgMapping + } + return nil +} + +func (m *Request) GetReset_() int32 { + if m != nil && m.Reset_ != nil { + return *m.Reset_ + } + return 0 +} + +func (m *Request) GetGetKey_() string { + if m != nil && m.GetKey_ != nil { + return *m.GetKey_ + } + return "" +} + +type Request_SomeGroup struct { + GroupField *int32 `protobuf:"varint,9,opt,name=group_field,json=groupField" json:"group_field,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *Request_SomeGroup) Reset() { *m = Request_SomeGroup{} } +func (m *Request_SomeGroup) String() string { return proto.CompactTextString(m) } +func (*Request_SomeGroup) ProtoMessage() {} + +func (m *Request_SomeGroup) GetGroupField() int32 { + if m != nil && m.GroupField != nil { + return *m.GroupField + } + return 0 +} + +type Reply struct { + Found []*Reply_Entry `protobuf:"bytes,1,rep,name=found" json:"found,omitempty"` + CompactKeys []int32 `protobuf:"varint,2,rep,packed,name=compact_keys,json=compactKeys" json:"compact_keys,omitempty"` + XXX_extensions map[int32]proto.Extension `json:"-"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *Reply) Reset() { *m = Reply{} } +func (m *Reply) String() string { return proto.CompactTextString(m) } +func (*Reply) ProtoMessage() {} +func (*Reply) Descriptor() ([]byte, []int) { return fileDescriptorTest, []int{1} } + +var extRange_Reply = []proto.ExtensionRange{ + {100, 536870911}, +} + +func (*Reply) ExtensionRangeArray() []proto.ExtensionRange { + return extRange_Reply +} +func (m *Reply) ExtensionMap() map[int32]proto.Extension { + if m.XXX_extensions == nil { + m.XXX_extensions = make(map[int32]proto.Extension) + } + return m.XXX_extensions +} + +func (m *Reply) GetFound() []*Reply_Entry { + if m != nil { + return m.Found + } + return nil +} + +func (m *Reply) GetCompactKeys() []int32 { + if m != nil { + return m.CompactKeys + } + return nil +} + +type Reply_Entry struct { + KeyThatNeeds_1234Camel_CasIng *int64 `protobuf:"varint,1,req,name=key_that_needs_1234camel_CasIng,json=keyThatNeeds1234camelCasIng" json:"key_that_needs_1234camel_CasIng,omitempty"` + Value *int64 `protobuf:"varint,2,opt,name=value,def=7" json:"value,omitempty"` + XMyFieldName_2 *int64 `protobuf:"varint,3,opt,name=_my_field_name_2,json=myFieldName2" json:"_my_field_name_2,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *Reply_Entry) Reset() { *m = Reply_Entry{} } +func (m *Reply_Entry) String() string { return proto.CompactTextString(m) } +func (*Reply_Entry) ProtoMessage() {} +func (*Reply_Entry) Descriptor() ([]byte, []int) { return fileDescriptorTest, []int{1, 0} } + +const Default_Reply_Entry_Value int64 = 7 + +func (m *Reply_Entry) GetKeyThatNeeds_1234Camel_CasIng() int64 { + if m != nil && m.KeyThatNeeds_1234Camel_CasIng != nil { + return *m.KeyThatNeeds_1234Camel_CasIng + } + return 0 +} + +func (m *Reply_Entry) GetValue() int64 { + if m != nil && m.Value != nil { + return *m.Value + } + return Default_Reply_Entry_Value +} + +func (m *Reply_Entry) GetXMyFieldName_2() int64 { + if m != nil && m.XMyFieldName_2 != nil { + return *m.XMyFieldName_2 + } + return 0 +} + +type OtherBase struct { + Name *string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"` + XXX_extensions map[int32]proto.Extension `json:"-"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *OtherBase) Reset() { *m = OtherBase{} } +func (m *OtherBase) String() string { return proto.CompactTextString(m) } +func (*OtherBase) ProtoMessage() {} +func (*OtherBase) Descriptor() ([]byte, []int) { return fileDescriptorTest, []int{2} } + +var extRange_OtherBase = []proto.ExtensionRange{ + {100, 536870911}, +} + +func (*OtherBase) ExtensionRangeArray() []proto.ExtensionRange { + return extRange_OtherBase +} +func (m *OtherBase) ExtensionMap() map[int32]proto.Extension { + if m.XXX_extensions == nil { + m.XXX_extensions = make(map[int32]proto.Extension) + } + return m.XXX_extensions +} + +func (m *OtherBase) GetName() string { + if m != nil && m.Name != nil { + return *m.Name + } + return "" +} + +type ReplyExtensions struct { + XXX_unrecognized []byte `json:"-"` +} + +func (m *ReplyExtensions) Reset() { *m = ReplyExtensions{} } +func (m *ReplyExtensions) String() string { return proto.CompactTextString(m) } +func (*ReplyExtensions) ProtoMessage() {} +func (*ReplyExtensions) Descriptor() ([]byte, []int) { return fileDescriptorTest, []int{3} } + +var E_ReplyExtensions_Time = &proto.ExtensionDesc{ + ExtendedType: (*Reply)(nil), + ExtensionType: (*float64)(nil), + Field: 101, + Name: "my.test.ReplyExtensions.time", + Tag: "fixed64,101,opt,name=time", +} + +var E_ReplyExtensions_Carrot = &proto.ExtensionDesc{ + ExtendedType: (*Reply)(nil), + ExtensionType: (*ReplyExtensions)(nil), + Field: 105, + Name: "my.test.ReplyExtensions.carrot", + Tag: "bytes,105,opt,name=carrot", +} + +var E_ReplyExtensions_Donut = &proto.ExtensionDesc{ + ExtendedType: (*OtherBase)(nil), + ExtensionType: (*ReplyExtensions)(nil), + Field: 101, + Name: "my.test.ReplyExtensions.donut", + Tag: "bytes,101,opt,name=donut", +} + +type OtherReplyExtensions struct { + Key *int32 `protobuf:"varint,1,opt,name=key" json:"key,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *OtherReplyExtensions) Reset() { *m = OtherReplyExtensions{} } +func (m *OtherReplyExtensions) String() string { return proto.CompactTextString(m) } +func (*OtherReplyExtensions) ProtoMessage() {} +func (*OtherReplyExtensions) Descriptor() ([]byte, []int) { return fileDescriptorTest, []int{4} } + +func (m *OtherReplyExtensions) GetKey() int32 { + if m != nil && m.Key != nil { + return *m.Key + } + return 0 +} + +type OldReply struct { + XXX_extensions map[int32]proto.Extension `json:"-"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *OldReply) Reset() { *m = OldReply{} } +func (m *OldReply) String() string { return proto.CompactTextString(m) } +func (*OldReply) ProtoMessage() {} +func (*OldReply) Descriptor() ([]byte, []int) { return fileDescriptorTest, []int{5} } + +func (m *OldReply) Marshal() ([]byte, error) { + return proto.MarshalMessageSet(m.ExtensionMap()) +} +func (m *OldReply) Unmarshal(buf []byte) error { + return proto.UnmarshalMessageSet(buf, m.ExtensionMap()) +} +func (m *OldReply) MarshalJSON() ([]byte, error) { + return proto.MarshalMessageSetJSON(m.XXX_extensions) +} +func (m *OldReply) UnmarshalJSON(buf []byte) error { + return proto.UnmarshalMessageSetJSON(buf, m.XXX_extensions) +} + +// ensure OldReply satisfies proto.Marshaler and proto.Unmarshaler +var _ proto.Marshaler = (*OldReply)(nil) +var _ proto.Unmarshaler = (*OldReply)(nil) + +var extRange_OldReply = []proto.ExtensionRange{ + {100, 2147483646}, +} + +func (*OldReply) ExtensionRangeArray() []proto.ExtensionRange { + return extRange_OldReply +} +func (m *OldReply) ExtensionMap() map[int32]proto.Extension { + if m.XXX_extensions == nil { + m.XXX_extensions = make(map[int32]proto.Extension) + } + return m.XXX_extensions +} + +type Communique struct { + MakeMeCry *bool `protobuf:"varint,1,opt,name=make_me_cry,json=makeMeCry" json:"make_me_cry,omitempty"` + // This is a oneof, called "union". + // + // Types that are valid to be assigned to Union: + // *Communique_Number + // *Communique_Name + // *Communique_Data + // *Communique_TempC + // *Communique_Height + // *Communique_Today + // *Communique_Maybe + // *Communique_Delta_ + // *Communique_Msg + // *Communique_Somegroup + Union isCommunique_Union `protobuf_oneof:"union"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *Communique) Reset() { *m = Communique{} } +func (m *Communique) String() string { return proto.CompactTextString(m) } +func (*Communique) ProtoMessage() {} +func (*Communique) Descriptor() ([]byte, []int) { return fileDescriptorTest, []int{6} } + +type isCommunique_Union interface { + isCommunique_Union() +} + +type Communique_Number struct { + Number int32 `protobuf:"varint,5,opt,name=number,oneof"` +} +type Communique_Name struct { + Name string `protobuf:"bytes,6,opt,name=name,oneof"` +} +type Communique_Data struct { + Data []byte `protobuf:"bytes,7,opt,name=data,oneof"` +} +type Communique_TempC struct { + TempC float64 `protobuf:"fixed64,8,opt,name=temp_c,json=tempC,oneof"` +} +type Communique_Height struct { + Height float32 `protobuf:"fixed32,9,opt,name=height,oneof"` +} +type Communique_Today struct { + Today Days `protobuf:"varint,10,opt,name=today,enum=my.test.Days,oneof"` +} +type Communique_Maybe struct { + Maybe bool `protobuf:"varint,11,opt,name=maybe,oneof"` +} +type Communique_Delta_ struct { + Delta int32 `protobuf:"zigzag32,12,opt,name=delta,oneof"` +} +type Communique_Msg struct { + Msg *Reply `protobuf:"bytes,13,opt,name=msg,oneof"` +} +type Communique_Somegroup struct { + Somegroup *Communique_SomeGroup `protobuf:"group,14,opt,name=SomeGroup,json=somegroup,oneof"` +} + +func (*Communique_Number) isCommunique_Union() {} +func (*Communique_Name) isCommunique_Union() {} +func (*Communique_Data) isCommunique_Union() {} +func (*Communique_TempC) isCommunique_Union() {} +func (*Communique_Height) isCommunique_Union() {} +func (*Communique_Today) isCommunique_Union() {} +func (*Communique_Maybe) isCommunique_Union() {} +func (*Communique_Delta_) isCommunique_Union() {} +func (*Communique_Msg) isCommunique_Union() {} +func (*Communique_Somegroup) isCommunique_Union() {} + +func (m *Communique) GetUnion() isCommunique_Union { + if m != nil { + return m.Union + } + return nil +} + +func (m *Communique) GetMakeMeCry() bool { + if m != nil && m.MakeMeCry != nil { + return *m.MakeMeCry + } + return false +} + +func (m *Communique) GetNumber() int32 { + if x, ok := m.GetUnion().(*Communique_Number); ok { + return x.Number + } + return 0 +} + +func (m *Communique) GetName() string { + if x, ok := m.GetUnion().(*Communique_Name); ok { + return x.Name + } + return "" +} + +func (m *Communique) GetData() []byte { + if x, ok := m.GetUnion().(*Communique_Data); ok { + return x.Data + } + return nil +} + +func (m *Communique) GetTempC() float64 { + if x, ok := m.GetUnion().(*Communique_TempC); ok { + return x.TempC + } + return 0 +} + +func (m *Communique) GetHeight() float32 { + if x, ok := m.GetUnion().(*Communique_Height); ok { + return x.Height + } + return 0 +} + +func (m *Communique) GetToday() Days { + if x, ok := m.GetUnion().(*Communique_Today); ok { + return x.Today + } + return Days_MONDAY +} + +func (m *Communique) GetMaybe() bool { + if x, ok := m.GetUnion().(*Communique_Maybe); ok { + return x.Maybe + } + return false +} + +func (m *Communique) GetDelta() int32 { + if x, ok := m.GetUnion().(*Communique_Delta_); ok { + return x.Delta + } + return 0 +} + +func (m *Communique) GetMsg() *Reply { + if x, ok := m.GetUnion().(*Communique_Msg); ok { + return x.Msg + } + return nil +} + +func (m *Communique) GetSomegroup() *Communique_SomeGroup { + if x, ok := m.GetUnion().(*Communique_Somegroup); ok { + return x.Somegroup + } + return nil +} + +// XXX_OneofFuncs is for the internal use of the proto package. +func (*Communique) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{}) { + return _Communique_OneofMarshaler, _Communique_OneofUnmarshaler, _Communique_OneofSizer, []interface{}{ + (*Communique_Number)(nil), + (*Communique_Name)(nil), + (*Communique_Data)(nil), + (*Communique_TempC)(nil), + (*Communique_Height)(nil), + (*Communique_Today)(nil), + (*Communique_Maybe)(nil), + (*Communique_Delta_)(nil), + (*Communique_Msg)(nil), + (*Communique_Somegroup)(nil), + } +} + +func _Communique_OneofMarshaler(msg proto.Message, b *proto.Buffer) error { + m := msg.(*Communique) + // union + switch x := m.Union.(type) { + case *Communique_Number: + _ = b.EncodeVarint(5<<3 | proto.WireVarint) + _ = b.EncodeVarint(uint64(x.Number)) + case *Communique_Name: + _ = b.EncodeVarint(6<<3 | proto.WireBytes) + _ = b.EncodeStringBytes(x.Name) + case *Communique_Data: + _ = b.EncodeVarint(7<<3 | proto.WireBytes) + _ = b.EncodeRawBytes(x.Data) + case *Communique_TempC: + _ = b.EncodeVarint(8<<3 | proto.WireFixed64) + _ = b.EncodeFixed64(math.Float64bits(x.TempC)) + case *Communique_Height: + _ = b.EncodeVarint(9<<3 | proto.WireFixed32) + _ = b.EncodeFixed32(uint64(math.Float32bits(x.Height))) + case *Communique_Today: + _ = b.EncodeVarint(10<<3 | proto.WireVarint) + _ = b.EncodeVarint(uint64(x.Today)) + case *Communique_Maybe: + t := uint64(0) + if x.Maybe { + t = 1 + } + _ = b.EncodeVarint(11<<3 | proto.WireVarint) + _ = b.EncodeVarint(t) + case *Communique_Delta_: + _ = b.EncodeVarint(12<<3 | proto.WireVarint) + _ = b.EncodeZigzag32(uint64(x.Delta)) + case *Communique_Msg: + _ = b.EncodeVarint(13<<3 | proto.WireBytes) + if err := b.EncodeMessage(x.Msg); err != nil { + return err + } + case *Communique_Somegroup: + _ = b.EncodeVarint(14<<3 | proto.WireStartGroup) + if err := b.Marshal(x.Somegroup); err != nil { + return err + } + _ = b.EncodeVarint(14<<3 | proto.WireEndGroup) + case nil: + default: + return fmt.Errorf("Communique.Union has unexpected type %T", x) + } + return nil +} + +func _Communique_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) { + m := msg.(*Communique) + switch tag { + case 5: // union.number + if wire != proto.WireVarint { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeVarint() + m.Union = &Communique_Number{int32(x)} + return true, err + case 6: // union.name + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeStringBytes() + m.Union = &Communique_Name{x} + return true, err + case 7: // union.data + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeRawBytes(true) + m.Union = &Communique_Data{x} + return true, err + case 8: // union.temp_c + if wire != proto.WireFixed64 { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeFixed64() + m.Union = &Communique_TempC{math.Float64frombits(x)} + return true, err + case 9: // union.height + if wire != proto.WireFixed32 { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeFixed32() + m.Union = &Communique_Height{math.Float32frombits(uint32(x))} + return true, err + case 10: // union.today + if wire != proto.WireVarint { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeVarint() + m.Union = &Communique_Today{Days(x)} + return true, err + case 11: // union.maybe + if wire != proto.WireVarint { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeVarint() + m.Union = &Communique_Maybe{x != 0} + return true, err + case 12: // union.delta + if wire != proto.WireVarint { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeZigzag32() + m.Union = &Communique_Delta_{int32(x)} + return true, err + case 13: // union.msg + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + msg := new(Reply) + err := b.DecodeMessage(msg) + m.Union = &Communique_Msg{msg} + return true, err + case 14: // union.somegroup + if wire != proto.WireStartGroup { + return true, proto.ErrInternalBadWireType + } + msg := new(Communique_SomeGroup) + err := b.DecodeGroup(msg) + m.Union = &Communique_Somegroup{msg} + return true, err + default: + return false, nil + } +} + +func _Communique_OneofSizer(msg proto.Message) (n int) { + m := msg.(*Communique) + // union + switch x := m.Union.(type) { + case *Communique_Number: + n += proto.SizeVarint(5<<3 | proto.WireVarint) + n += proto.SizeVarint(uint64(x.Number)) + case *Communique_Name: + n += proto.SizeVarint(6<<3 | proto.WireBytes) + n += proto.SizeVarint(uint64(len(x.Name))) + n += len(x.Name) + case *Communique_Data: + n += proto.SizeVarint(7<<3 | proto.WireBytes) + n += proto.SizeVarint(uint64(len(x.Data))) + n += len(x.Data) + case *Communique_TempC: + n += proto.SizeVarint(8<<3 | proto.WireFixed64) + n += 8 + case *Communique_Height: + n += proto.SizeVarint(9<<3 | proto.WireFixed32) + n += 4 + case *Communique_Today: + n += proto.SizeVarint(10<<3 | proto.WireVarint) + n += proto.SizeVarint(uint64(x.Today)) + case *Communique_Maybe: + n += proto.SizeVarint(11<<3 | proto.WireVarint) + n += 1 + case *Communique_Delta_: + n += proto.SizeVarint(12<<3 | proto.WireVarint) + n += proto.SizeVarint(uint64((uint32(x.Delta) << 1) ^ uint32((int32(x.Delta) >> 31)))) + case *Communique_Msg: + s := proto.Size(x.Msg) + n += proto.SizeVarint(13<<3 | proto.WireBytes) + n += proto.SizeVarint(uint64(s)) + n += s + case *Communique_Somegroup: + n += proto.SizeVarint(14<<3 | proto.WireStartGroup) + n += proto.Size(x.Somegroup) + n += proto.SizeVarint(14<<3 | proto.WireEndGroup) + case nil: + default: + panic(fmt.Sprintf("proto: unexpected type %T in oneof", x)) + } + return n +} + +type Communique_SomeGroup struct { + Member *string `protobuf:"bytes,15,opt,name=member" json:"member,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *Communique_SomeGroup) Reset() { *m = Communique_SomeGroup{} } +func (m *Communique_SomeGroup) String() string { return proto.CompactTextString(m) } +func (*Communique_SomeGroup) ProtoMessage() {} + +func (m *Communique_SomeGroup) GetMember() string { + if m != nil && m.Member != nil { + return *m.Member + } + return "" +} + +type Communique_Delta struct { + XXX_unrecognized []byte `json:"-"` +} + +func (m *Communique_Delta) Reset() { *m = Communique_Delta{} } +func (m *Communique_Delta) String() string { return proto.CompactTextString(m) } +func (*Communique_Delta) ProtoMessage() {} +func (*Communique_Delta) Descriptor() ([]byte, []int) { return fileDescriptorTest, []int{6, 1} } + +var E_Tag = &proto.ExtensionDesc{ + ExtendedType: (*Reply)(nil), + ExtensionType: (*string)(nil), + Field: 103, + Name: "my.test.tag", + Tag: "bytes,103,opt,name=tag", +} + +var E_Donut = &proto.ExtensionDesc{ + ExtendedType: (*Reply)(nil), + ExtensionType: (*OtherReplyExtensions)(nil), + Field: 106, + Name: "my.test.donut", + Tag: "bytes,106,opt,name=donut", +} + +func init() { + proto.RegisterType((*Request)(nil), "my.test.Request") + proto.RegisterType((*Request_SomeGroup)(nil), "my.test.Request.SomeGroup") + proto.RegisterType((*Reply)(nil), "my.test.Reply") + proto.RegisterType((*Reply_Entry)(nil), "my.test.Reply.Entry") + proto.RegisterType((*OtherBase)(nil), "my.test.OtherBase") + proto.RegisterType((*ReplyExtensions)(nil), "my.test.ReplyExtensions") + proto.RegisterType((*OtherReplyExtensions)(nil), "my.test.OtherReplyExtensions") + proto.RegisterType((*OldReply)(nil), "my.test.OldReply") + proto.RegisterType((*Communique)(nil), "my.test.Communique") + proto.RegisterType((*Communique_SomeGroup)(nil), "my.test.Communique.SomeGroup") + proto.RegisterType((*Communique_Delta)(nil), "my.test.Communique.Delta") + proto.RegisterEnum("my.test.HatType", HatType_name, HatType_value) + proto.RegisterEnum("my.test.Days", Days_name, Days_value) + proto.RegisterEnum("my.test.Request_Color", Request_Color_name, Request_Color_value) + proto.RegisterEnum("my.test.Reply_Entry_Game", Reply_Entry_Game_name, Reply_Entry_Game_value) + proto.RegisterExtension(E_ReplyExtensions_Time) + proto.RegisterExtension(E_ReplyExtensions_Carrot) + proto.RegisterExtension(E_ReplyExtensions_Donut) + proto.RegisterExtension(E_Tag) + proto.RegisterExtension(E_Donut) +} + +var fileDescriptorTest = []byte{ + // 970 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0x7c, 0x54, 0xdd, 0x6e, 0xe3, 0x54, + 0x10, 0x5e, 0xdb, 0x71, 0x7e, 0x26, 0xd9, 0xd6, 0x1c, 0xad, 0x8a, 0x15, 0xb4, 0xbb, 0xc1, 0xb0, + 0xa8, 0x54, 0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e4, 0x3e, 0xe6, 0x27, 0xaa, 0xce, 0xd3, 0x87, 0x83, 0xfa, 0xfe, 0x99, 0xfc, 0x37, 0x00, 0x00, + 0xff, 0xff, 0xc7, 0xad, 0x0f, 0xe3, 0x33, 0x07, 0x00, 0x00, +} diff --git a/vendor/github.com/gogo/protobuf/protoc-gen-gogo/testdata/my_test/test.proto b/vendor/github.com/gogo/protobuf/protoc-gen-gogo/testdata/my_test/test.proto new file mode 100644 index 000000000..8e7094632 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/protoc-gen-gogo/testdata/my_test/test.proto @@ -0,0 +1,156 @@ +// 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. + +syntax = "proto2"; + +// This package holds interesting messages. +package my.test; // dotted package name + +//import "imp.proto"; +import "multi/multi1.proto"; // unused import + +enum HatType { + // deliberately skipping 0 + FEDORA = 1; + FEZ = 2; +} + +// This enum represents days of the week. +enum Days { + option allow_alias = true; + + MONDAY = 1; + TUESDAY = 2; + LUNDI = 1; // same value as MONDAY +} + +// This is a message that might be sent somewhere. +message Request { + enum Color { + RED = 0; + GREEN = 1; + BLUE = 2; + } + repeated int64 key = 1; +// optional imp.ImportedMessage imported_message = 2; + optional Color hue = 3; // no default + optional HatType hat = 4 [default=FEDORA]; +// optional imp.ImportedMessage.Owner owner = 6; + optional float deadline = 7 [default=inf]; + optional group SomeGroup = 8 { + optional int32 group_field = 9; + } + + // These foreign types are in imp2.proto, + // which is publicly imported by imp.proto. +// optional imp.PubliclyImportedMessage pub = 10; +// optional imp.PubliclyImportedEnum pub_enum = 13 [default=HAIR]; + + + // This is a map field. It will generate map[int32]string. + map name_mapping = 14; + // This is a map field whose value type is a message. + map msg_mapping = 15; + + optional int32 reset = 12; + // This field should not conflict with any getters. + optional string get_key = 16; +} + +message Reply { + message Entry { + required int64 key_that_needs_1234camel_CasIng = 1; + optional int64 value = 2 [default=7]; + optional int64 _my_field_name_2 = 3; + enum Game { + FOOTBALL = 1; + TENNIS = 2; + } + } + repeated Entry found = 1; + repeated int32 compact_keys = 2 [packed=true]; + extensions 100 to max; +} + +message OtherBase { + optional string name = 1; + extensions 100 to max; +} + +message ReplyExtensions { + extend Reply { + optional double time = 101; + optional ReplyExtensions carrot = 105; + } + extend OtherBase { + optional ReplyExtensions donut = 101; + } +} + +message OtherReplyExtensions { + optional int32 key = 1; +} + +// top-level extension +extend Reply { + optional string tag = 103; + optional OtherReplyExtensions donut = 106; +// optional imp.ImportedMessage elephant = 107; // extend with message from another file. +} + +message OldReply { + // Extensions will be encoded in MessageSet wire format. + option message_set_wire_format = true; + extensions 100 to max; +} + +message Communique { + optional bool make_me_cry = 1; + + // This is a oneof, called "union". + oneof union { + int32 number = 5; + string name = 6; + bytes data = 7; + double temp_c = 8; + float height = 9; + Days today = 10; + bool maybe = 11; + sint32 delta = 12; // name will conflict with Delta below + Reply msg = 13; + group SomeGroup = 14 { + optional string member = 15; + } + } + + message Delta {} +} + diff --git a/vendor/github.com/gogo/protobuf/protoc-gen-gogo/testdata/proto3.proto b/vendor/github.com/gogo/protobuf/protoc-gen-gogo/testdata/proto3.proto new file mode 100644 index 000000000..c994914e4 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/protoc-gen-gogo/testdata/proto3.proto @@ -0,0 +1,52 @@ +// Go support for Protocol Buffers - Google's data interchange format +// +// Copyright 2014 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. + +syntax = "proto3"; + +package proto3; + +message Request { + enum Flavour { + SWEET = 0; + SOUR = 1; + UMAMI = 2; + GOPHERLICIOUS = 3; + } + string name = 1; + repeated int64 key = 2; + Flavour taste = 3; + Book book = 4; +} + +message Book { + string title = 1; + bytes raw_data = 2; +} diff --git a/vendor/github.com/gogo/protobuf/protoc-gen-gogofast/main.go b/vendor/github.com/gogo/protobuf/protoc-gen-gogofast/main.go new file mode 100644 index 000000000..a3dff9b25 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/protoc-gen-gogofast/main.go @@ -0,0 +1,47 @@ +// Extensions for Protocol Buffers to create more go like structures. +// +// Copyright (c) 2015, Vastech SA (PTY) LTD. All rights reserved. +// http://github.com/gogo/protobuf/gogoproto +// +// 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 main + +import ( + "github.com/gogo/protobuf/vanity" + "github.com/gogo/protobuf/vanity/command" +) + +func main() { + req := command.Read() + files := req.GetProtoFile() + files = vanity.FilterFiles(files, vanity.NotInPackageGoogleProtobuf) + + vanity.ForEachFile(files, vanity.TurnOnMarshalerAll) + vanity.ForEachFile(files, vanity.TurnOnSizerAll) + vanity.ForEachFile(files, vanity.TurnOnUnmarshalerAll) + + resp := command.Generate(req) + command.Write(resp) +} diff --git a/vendor/github.com/gogo/protobuf/protoc-gen-gogofaster/main.go b/vendor/github.com/gogo/protobuf/protoc-gen-gogofaster/main.go new file mode 100644 index 000000000..f7dc56b5d --- /dev/null +++ b/vendor/github.com/gogo/protobuf/protoc-gen-gogofaster/main.go @@ -0,0 +1,50 @@ +// Extensions for Protocol Buffers to create more go like structures. +// +// Copyright (c) 2015, Vastech SA (PTY) LTD. All rights reserved. +// http://github.com/gogo/protobuf/gogoproto +// +// 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 main + +import ( + "github.com/gogo/protobuf/vanity" + "github.com/gogo/protobuf/vanity/command" +) + +func main() { + req := command.Read() + files := req.GetProtoFile() + files = vanity.FilterFiles(files, vanity.NotInPackageGoogleProtobuf) + + vanity.ForEachFile(files, vanity.TurnOnMarshalerAll) + vanity.ForEachFile(files, vanity.TurnOnSizerAll) + vanity.ForEachFile(files, vanity.TurnOnUnmarshalerAll) + + vanity.ForEachFieldInFilesExcludingExtensions(vanity.OnlyProto2(files), vanity.TurnOffNullableForNativeTypesWithoutDefaultsOnly) + vanity.ForEachFile(files, vanity.TurnOffGoUnrecognizedAll) + + resp := command.Generate(req) + command.Write(resp) +} diff --git a/vendor/github.com/gogo/protobuf/protoc-gen-gogoslick/main.go b/vendor/github.com/gogo/protobuf/protoc-gen-gogoslick/main.go new file mode 100644 index 000000000..192a974e6 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/protoc-gen-gogoslick/main.go @@ -0,0 +1,59 @@ +// Extensions for Protocol Buffers to create more go like structures. +// +// Copyright (c) 2015, Vastech SA (PTY) LTD. All rights reserved. +// http://github.com/gogo/protobuf/gogoproto +// +// 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 main + +import ( + "github.com/gogo/protobuf/vanity" + "github.com/gogo/protobuf/vanity/command" +) + +func main() { + req := command.Read() + files := req.GetProtoFile() + files = vanity.FilterFiles(files, vanity.NotInPackageGoogleProtobuf) + + vanity.ForEachFile(files, vanity.TurnOnMarshalerAll) + vanity.ForEachFile(files, vanity.TurnOnSizerAll) + vanity.ForEachFile(files, vanity.TurnOnUnmarshalerAll) + + vanity.ForEachFieldInFilesExcludingExtensions(vanity.OnlyProto2(files), vanity.TurnOffNullableForNativeTypesWithoutDefaultsOnly) + vanity.ForEachFile(files, vanity.TurnOffGoUnrecognizedAll) + + vanity.ForEachFile(files, vanity.TurnOffGoEnumPrefixAll) + vanity.ForEachFile(files, vanity.TurnOffGoEnumStringerAll) + vanity.ForEachFile(files, vanity.TurnOnEnumStringerAll) + + vanity.ForEachFile(files, vanity.TurnOnEqualAll) + vanity.ForEachFile(files, vanity.TurnOnGoStringAll) + vanity.ForEachFile(files, vanity.TurnOffGoStringerAll) + vanity.ForEachFile(files, vanity.TurnOnStringerAll) + + resp := command.Generate(req) + command.Write(resp) +} diff --git a/vendor/github.com/gogo/protobuf/protoc-min-version/minversion.go b/vendor/github.com/gogo/protobuf/protoc-min-version/minversion.go new file mode 100644 index 000000000..3f61d0da2 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/protoc-min-version/minversion.go @@ -0,0 +1,65 @@ +// Extensions for Protocol Buffers to create more go like structures. +// +// Copyright (c) 2013, Vastech SA (PTY) LTD. All rights reserved. +// http://github.com/gogo/protobuf/gogoproto +// +// 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 main + +import ( + "fmt" + "github.com/gogo/protobuf/version" + "os" + "os/exec" + "strings" +) + +func filter(ss []string, flag string) ([]string, string) { + s := make([]string, 0, len(ss)) + var v string + for i := range ss { + if strings.Contains(ss[i], flag) { + vs := strings.Split(ss[i], "=") + v = vs[1] + continue + } + s = append(s, ss[i]) + } + return s, v +} + +func main() { + args, min := filter(os.Args[1:], "-version") + if !version.AtLeast(min) { + fmt.Printf("protoc version not high enough to parse this proto file\n") + return + } + gen := exec.Command("protoc", args...) + out, err := gen.CombinedOutput() + if err != nil { + fmt.Printf("%s\n", string(out)) + panic(err) + } +} diff --git a/vendor/github.com/gogo/protobuf/sortkeys/sortkeys.go b/vendor/github.com/gogo/protobuf/sortkeys/sortkeys.go new file mode 100644 index 000000000..c52878dd5 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/sortkeys/sortkeys.go @@ -0,0 +1,99 @@ +// Copyright (c) 2013, Vastech SA (PTY) LTD. 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 sortkeys + +import ( + "sort" +) + +func Strings(l []string) { + sort.Strings(l) +} + +func Float64s(l []float64) { + sort.Float64s(l) +} + +func Float32s(l []float32) { + sort.Sort(Float32Slice(l)) +} + +func Int64s(l []int64) { + sort.Sort(Int64Slice(l)) +} + +func Int32s(l []int32) { + sort.Sort(Int32Slice(l)) +} + +func Uint64s(l []uint64) { + sort.Sort(Uint64Slice(l)) +} + +func Uint32s(l []uint32) { + sort.Sort(Uint32Slice(l)) +} + +func Bools(l []bool) { + sort.Sort(BoolSlice(l)) +} + +type BoolSlice []bool + +func (p BoolSlice) Len() int { return len(p) } +func (p BoolSlice) Less(i, j int) bool { return p[j] } +func (p BoolSlice) Swap(i, j int) { p[i], p[j] = p[j], p[i] } + +type Int64Slice []int64 + +func (p Int64Slice) Len() int { return len(p) } +func (p Int64Slice) Less(i, j int) bool { return p[i] < p[j] } +func (p Int64Slice) Swap(i, j int) { p[i], p[j] = p[j], p[i] } + +type Int32Slice []int32 + +func (p Int32Slice) Len() int { return len(p) } +func (p Int32Slice) Less(i, j int) bool { return p[i] < p[j] } +func (p Int32Slice) Swap(i, j int) { p[i], p[j] = p[j], p[i] } + +type Uint64Slice []uint64 + +func (p Uint64Slice) Len() int { return len(p) } +func (p Uint64Slice) Less(i, j int) bool { return p[i] < p[j] } +func (p Uint64Slice) Swap(i, j int) { p[i], p[j] = p[j], p[i] } + +type Uint32Slice []uint32 + +func (p Uint32Slice) Len() int { return len(p) } +func (p Uint32Slice) Less(i, j int) bool { return p[i] < p[j] } +func (p Uint32Slice) Swap(i, j int) { p[i], p[j] = p[j], p[i] } + +type Float32Slice []float32 + +func (p Float32Slice) Len() int { return len(p) } +func (p Float32Slice) Less(i, j int) bool { return p[i] < p[j] } +func (p Float32Slice) Swap(i, j int) { p[i], p[j] = p[j], p[i] } diff --git a/vendor/github.com/gogo/protobuf/test/.gitignore b/vendor/github.com/gogo/protobuf/test/.gitignore new file mode 100644 index 000000000..773a6df9b --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/.gitignore @@ -0,0 +1 @@ +*.dat diff --git a/vendor/github.com/gogo/protobuf/test/Makefile b/vendor/github.com/gogo/protobuf/test/Makefile new file mode 100644 index 000000000..edcbe5048 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/Makefile @@ -0,0 +1,44 @@ +# Extensions for Protocol Buffers to create more go like structures. +# +# Copyright (c) 2013, Vastech SA (PTY) LTD. All rights reserved. +# http://github.com/gogo/protobuf/gogoproto +# +# 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-combo + protoc --gogo_out=. --proto_path=../:../../../../:../protobuf/:. thetest.proto + protoc-gen-combo --default=false --proto_path=../:../../../../:../protobuf/:. thetest.proto + cp uuid.go ./combos/both/ + cp uuid.go ./combos/marshaler/ + cp uuid.go ./combos/unmarshaler/ + cp uuid.go ./combos/unsafeboth/ + cp uuid.go ./combos/unsafemarshaler/ + cp uuid.go ./combos/unsafeunmarshaler/ + cp bug_test.go ./combos/both/ + cp bug_test.go ./combos/marshaler/ + cp bug_test.go ./combos/unmarshaler/ + cp bug_test.go ./combos/unsafeboth/ + cp bug_test.go ./combos/unsafemarshaler/ + cp bug_test.go ./combos/unsafeunmarshaler/ diff --git a/vendor/github.com/gogo/protobuf/test/asymetric-issue125/Makefile b/vendor/github.com/gogo/protobuf/test/asymetric-issue125/Makefile new file mode 100644 index 000000000..9e101c880 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/asymetric-issue125/Makefile @@ -0,0 +1,30 @@ +# Extensions for Protocol Buffers to create more go like structures. +# +# Copyright (c) 2013, Vastech SA (PTY) LTD. 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: + (protoc --proto_path=../../../../../:../../protobuf/:. --gogo_out=. asym.proto) \ No newline at end of file diff --git a/vendor/github.com/gogo/protobuf/test/asymetric-issue125/asym.pb.go b/vendor/github.com/gogo/protobuf/test/asymetric-issue125/asym.pb.go new file mode 100644 index 000000000..5dd218535 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/asymetric-issue125/asym.pb.go @@ -0,0 +1,621 @@ +// Code generated by protoc-gen-gogo. +// source: asym.proto +// DO NOT EDIT! + +/* +Package asym is a generated protocol buffer package. + +It is generated from these files: + asym.proto + +It has these top-level messages: + M + MyType +*/ +package asym + +import proto "github.com/gogo/protobuf/proto" +import fmt "fmt" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" + +import bytes "bytes" + +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. +const _ = proto.GoGoProtoPackageIsVersion1 + +type M struct { + Arr []MyType `protobuf:"bytes,1,rep,name=arr,customtype=MyType" json:"arr"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *M) Reset() { *m = M{} } +func (m *M) String() string { return proto.CompactTextString(m) } +func (*M) ProtoMessage() {} +func (*M) Descriptor() ([]byte, []int) { return fileDescriptorAsym, []int{0} } + +type MyType struct { + XXX_unrecognized []byte `json:"-"` +} + +func (m *MyType) Reset() { *m = MyType{} } +func (m *MyType) String() string { return proto.CompactTextString(m) } +func (*MyType) ProtoMessage() {} +func (*MyType) Descriptor() ([]byte, []int) { return fileDescriptorAsym, []int{1} } + +func init() { + proto.RegisterType((*M)(nil), "asym.M") + proto.RegisterType((*MyType)(nil), "asym.MyType") +} +func (this *M) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*M) + if !ok { + that2, ok := that.(M) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *M") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *M but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *M but is not nil && this == nil") + } + if len(this.Arr) != len(that1.Arr) { + return fmt.Errorf("Arr this(%v) Not Equal that(%v)", len(this.Arr), len(that1.Arr)) + } + for i := range this.Arr { + if !this.Arr[i].Equal(that1.Arr[i]) { + return fmt.Errorf("Arr this[%v](%v) Not Equal that[%v](%v)", i, this.Arr[i], i, that1.Arr[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *M) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*M) + if !ok { + that2, ok := that.(M) + 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.Arr) != len(that1.Arr) { + return false + } + for i := range this.Arr { + if !this.Arr[i].Equal(that1.Arr[i]) { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *MyType) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*MyType) + if !ok { + that2, ok := that.(MyType) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *MyType") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *MyType but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *MyType but is not nil && this == nil") + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *MyType) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*MyType) + if !ok { + that2, ok := that.(MyType) + 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.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (m *M) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *M) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Arr) > 0 { + for _, msg := range m.Arr { + data[i] = 0xa + i++ + i = encodeVarintAsym(data, i, uint64(msg.Size())) + n, err := msg.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n + } + } + if m.XXX_unrecognized != nil { + i += copy(data[i:], m.XXX_unrecognized) + } + return i, nil +} + +func encodeFixed64Asym(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 encodeFixed32Asym(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 encodeVarintAsym(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 NewPopulatedM(r randyAsym, easy bool) *M { + this := &M{} + if r.Intn(10) != 0 { + v1 := r.Intn(10) + this.Arr = make([]MyType, v1) + for i := 0; i < v1; i++ { + v2 := NewPopulatedMyType(r) + this.Arr[i] = *v2 + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedAsym(r, 2) + } + return this +} + +type randyAsym interface { + Float32() float32 + Float64() float64 + Int63() int64 + Int31() int32 + Uint32() uint32 + Intn(n int) int +} + +func randUTF8RuneAsym(r randyAsym) 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 randStringAsym(r randyAsym) string { + v3 := r.Intn(100) + tmps := make([]rune, v3) + for i := 0; i < v3; i++ { + tmps[i] = randUTF8RuneAsym(r) + } + return string(tmps) +} +func randUnrecognizedAsym(r randyAsym, 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 = randFieldAsym(data, r, fieldNumber, wire) + } + return data +} +func randFieldAsym(data []byte, r randyAsym, fieldNumber int, wire int) []byte { + key := uint32(fieldNumber)<<3 | uint32(wire) + switch wire { + case 0: + data = encodeVarintPopulateAsym(data, uint64(key)) + v4 := r.Int63() + if r.Intn(2) == 0 { + v4 *= -1 + } + data = encodeVarintPopulateAsym(data, uint64(v4)) + case 1: + data = encodeVarintPopulateAsym(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 = encodeVarintPopulateAsym(data, uint64(key)) + ll := r.Intn(100) + data = encodeVarintPopulateAsym(data, uint64(ll)) + for j := 0; j < ll; j++ { + data = append(data, byte(r.Intn(256))) + } + default: + data = encodeVarintPopulateAsym(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 encodeVarintPopulateAsym(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 *M) Size() (n int) { + var l int + _ = l + if len(m.Arr) > 0 { + for _, e := range m.Arr { + l = e.Size() + n += 1 + l + sovAsym(uint64(l)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func sovAsym(x uint64) (n int) { + for { + n++ + x >>= 7 + if x == 0 { + break + } + } + return n +} +func sozAsym(x uint64) (n int) { + return sovAsym(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *M) 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 ErrIntOverflowAsym + } + 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: M: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: M: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Arr", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAsym + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthAsym + } + postIndex := iNdEx + byteLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var v MyType + m.Arr = append(m.Arr, v) + if err := m.Arr[len(m.Arr)-1].Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipAsym(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthAsym + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MyType) 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 ErrIntOverflowAsym + } + 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: MyType: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MyType: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipAsym(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthAsym + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipAsym(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, ErrIntOverflowAsym + } + 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, ErrIntOverflowAsym + } + 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, ErrIntOverflowAsym + } + 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, ErrInvalidLengthAsym + } + return iNdEx, nil + case 3: + for { + var innerWire uint64 + var start int = iNdEx + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowAsym + } + 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 := skipAsym(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 ( + ErrInvalidLengthAsym = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowAsym = fmt.Errorf("proto: integer overflow") +) + +var fileDescriptorAsym = []byte{ + // 151 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xe2, 0xe2, 0x4a, 0x2c, 0xae, 0xcc, + 0xd5, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x62, 0x01, 0xb1, 0xa5, 0x74, 0xd3, 0x33, 0x4b, 0x32, + 0x4a, 0x93, 0xf4, 0x92, 0xf3, 0x73, 0xf5, 0xd3, 0xf3, 0xd3, 0xf3, 0xf5, 0xc1, 0x92, 0x49, 0xa5, + 0x69, 0x60, 0x1e, 0x98, 0x03, 0x66, 0x41, 0x34, 0x29, 0xa9, 0x72, 0x31, 0xfa, 0x0a, 0x29, 0x70, + 0x31, 0x27, 0x16, 0x15, 0x49, 0x30, 0x2a, 0x30, 0x6b, 0xf0, 0x38, 0xf1, 0x9d, 0xb8, 0x27, 0xcf, + 0x70, 0xeb, 0x9e, 0x3c, 0x9b, 0x6f, 0x65, 0x48, 0x65, 0x41, 0x6a, 0x10, 0x48, 0x4a, 0x49, 0x8a, + 0x0b, 0xca, 0xb5, 0x12, 0xd8, 0xb1, 0x40, 0x9e, 0xe1, 0x07, 0x10, 0x77, 0x2c, 0x94, 0x67, 0x58, + 0x00, 0xc4, 0x4e, 0x32, 0x0f, 0x1e, 0xca, 0x31, 0xfe, 0x00, 0xe2, 0x15, 0x8f, 0xe4, 0x18, 0x77, + 0x00, 0xf1, 0x09, 0x20, 0xbe, 0x00, 0xc4, 0x0f, 0x80, 0x18, 0x10, 0x00, 0x00, 0xff, 0xff, 0x9c, + 0x0b, 0x12, 0x6c, 0xa2, 0x00, 0x00, 0x00, +} diff --git a/vendor/github.com/gogo/protobuf/test/asymetric-issue125/asym.proto b/vendor/github.com/gogo/protobuf/test/asymetric-issue125/asym.proto new file mode 100644 index 000000000..b73fe1eba --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/asymetric-issue125/asym.proto @@ -0,0 +1,50 @@ +// Copyright (c) 2015, Vastech SA (PTY) LTD. All rights reserved. +// http://github.com/gogo/protobuf/gogoproto +// +// 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 asym; + +import "github.com/gogo/protobuf/gogoproto/gogo.proto"; + +option (gogoproto.equal_all) = true; +option (gogoproto.verbose_equal_all) = true; +option (gogoproto.marshaler_all) = true; +option (gogoproto.sizer_all) = true; +option (gogoproto.unmarshaler_all) = true; +option (gogoproto.populate_all) = true; +option (gogoproto.testgen_all) = true; + +message M { + repeated bytes arr = 1 [(gogoproto.customtype) = "MyType", (gogoproto.nullable) = false]; +} + +message MyType { + option (gogoproto.marshaler) = false; + option (gogoproto.sizer) = false; + option (gogoproto.populate) = false; + option (gogoproto.testgen) = false; +} \ No newline at end of file diff --git a/vendor/github.com/gogo/protobuf/test/asymetric-issue125/asym_test.go b/vendor/github.com/gogo/protobuf/test/asymetric-issue125/asym_test.go new file mode 100644 index 000000000..bc7532ec1 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/asymetric-issue125/asym_test.go @@ -0,0 +1,38 @@ +// Copyright (c) 2013, Vastech SA (PTY) LTD. All rights reserved. +// http://github.com/gogo/protobuf/gogoproto +// +// 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 asym + +import ( + "testing" +) + +func TestAsym(t *testing.T) { + m := &M{[]MyType{{}, {}}, nil} + if err := m.VerboseEqual(m); err != nil { + t.Fatalf("should be equal: %v", err) + } +} diff --git a/vendor/github.com/gogo/protobuf/test/asymetric-issue125/asympb_test.go b/vendor/github.com/gogo/protobuf/test/asymetric-issue125/asympb_test.go new file mode 100644 index 000000000..39a886bb7 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/asymetric-issue125/asympb_test.go @@ -0,0 +1,186 @@ +// Code generated by protoc-gen-gogo. +// source: asym.proto +// DO NOT EDIT! + +/* +Package asym is a generated protocol buffer package. + +It is generated from these files: + asym.proto + +It has these top-level messages: + M + MyType +*/ +package asym + +import testing "testing" +import math_rand "math/rand" +import time "time" +import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" +import github_com_gogo_protobuf_jsonpb "github.com/gogo/protobuf/jsonpb" +import proto "github.com/gogo/protobuf/proto" +import fmt "fmt" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +func TestMProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedM(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &M{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestMMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedM(popr, false) + size := p.Size() + data := make([]byte, size) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(data) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &M{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestMJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedM(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &M{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestMProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedM(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &M{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestMProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedM(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &M{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestMVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedM(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &M{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestMSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedM(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +//These tests are generated by github.com/gogo/protobuf/plugin/testgen diff --git a/vendor/github.com/gogo/protobuf/test/asymetric-issue125/pop.go b/vendor/github.com/gogo/protobuf/test/asymetric-issue125/pop.go new file mode 100644 index 000000000..f745a7074 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/asymetric-issue125/pop.go @@ -0,0 +1,62 @@ +// Copyright (c) 2013, Vastech SA (PTY) LTD. All rights reserved. +// http://github.com/gogo/protobuf/gogoproto +// +// 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 asym + +func NewPopulatedMyType(r randyAsym) *MyType { + this := &MyType{} + return this +} + +func (m MyType) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *MyType) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.XXX_unrecognized != nil { + i += copy(data[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *MyType) Size() (n int) { + var l int + _ = l + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} diff --git a/vendor/github.com/gogo/protobuf/test/bug_test.go b/vendor/github.com/gogo/protobuf/test/bug_test.go new file mode 100644 index 000000000..2386c48e5 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/bug_test.go @@ -0,0 +1,250 @@ +// Copyright (c) 2013, Vastech SA (PTY) LTD. All rights reserved. +// http://github.com/gogo/protobuf/gogoproto +// +// 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 test + +import ( + "fmt" + "math" + "math/rand" + "testing" + "time" + + "github.com/gogo/protobuf/proto" +) + +//http://code.google.com/p/goprotobuf/issues/detail?id=39 +func TestBugUint32VarintSize(t *testing.T) { + temp := uint32(math.MaxUint32) + n := &NinOptNative{} + n.Field5 = &temp + data, err := proto.Marshal(n) + if err != nil { + panic(err) + } + if len(data) != 6 { + t.Fatalf("data should be length 6, but its %#v", data) + } +} + +func TestBugZeroLengthSliceSize(t *testing.T) { + n := &NinRepPackedNative{ + Field8: []int64{}, + } + size := n.Size() + data, err := proto.Marshal(n) + if err != nil { + panic(err) + } + if len(data) != size { + t.Fatalf("expected %v, but got %v", len(data), size) + } +} + +//http://code.google.com/p/goprotobuf/issues/detail?id=40 +func TestBugPackedProtoSize(t *testing.T) { + n := &NinRepPackedNative{ + Field4: []int64{172960727389894724, 2360337516664475010, 860833876131988189, 9068073014890763245, 7794843386260381831, 4023536436053141786, 8992311247496919020, 4330096163611305776, 4490411416244976467, 7873947349172707443, 2754969595834279669, 1360667855926938684, 4771480785172657389, 4875578924966668055, 8070579869808877481, 9128179594766551001, 4630419407064527516, 863844540220372892, 8208727650143073487, 7086117356301045838, 7779695211931506151, 5493835345187563535, 9119767633370806007, 9054342025895349248, 1887303228838508438, 7624573031734528281, 1874668389749611225, 3517684643468970593, 6677697606628877758, 7293473953189936168, 444475066704085538, 8594971141363049302, 1146643249094989673, 733393306232853371, 7721178528893916886, 7784452000911004429, 6436373110242711440, 6897422461738321237, 8772249155667732778, 6211871464311393541, 3061903718310406883, 7845488913176136641, 8342255034663902574, 3443058984649725748, 8410801047334832902, 7496541071517841153, 4305416923521577765, 7814967600020476457, 8671843803465481186, 3490266370361096855, 1447425664719091336, 653218597262334239, 8306243902880091940, 7851896059762409081, 5936760560798954978, 5755724498441478025, 7022701569985035966, 3707709584811468220, 529069456924666920, 7986469043681522462, 3092513330689518836, 5103541550470476202, 3577384161242626406, 3733428084624703294, 8388690542440473117, 3262468785346149388, 8788358556558007570, 5476276940198542020, 7277903243119461239, 5065861426928605020, 7533460976202697734, 1749213838654236956, 557497603941617931, 5496307611456481108, 6444547750062831720, 6992758776744205596, 7356719693428537399, 2896328872476734507, 381447079530132038, 598300737753233118, 3687980626612697715, 7240924191084283349, 8172414415307971170, 4847024388701257185, 2081764168600256551, 3394217778539123488, 6244660626429310923, 8301712215675381614, 5360615125359461174, 8410140945829785773, 3152963269026381373, 6197275282781459633, 4419829061407546410, 6262035523070047537, 2837207483933463885, 2158105736666826128, 8150764172235490711}, + Field7: []int32{249451845, 1409974015, 393609128, 435232428, 1817529040, 91769006, 861170933, 1556185603, 1568580279, 1236375273, 512276621, 693633711, 967580535, 1950715977, 853431462, 1362390253, 159591204, 111900629, 322985263, 279671129, 1592548430, 465651370, 733849989, 1172059400, 1574824441, 263541092, 1271612397, 1520584358, 467078791, 117698716, 1098255064, 2054264846, 1766452305, 1267576395, 1557505617, 1187833560, 956187431, 1970977586, 1160235159, 1610259028, 489585797, 459139078, 566263183, 954319278, 1545018565, 1753946743, 948214318, 422878159, 883926576, 1424009347, 824732372, 1290433180, 80297942, 417294230, 1402647904, 2078392782, 220505045, 787368129, 463781454, 293083578, 808156928, 293976361}, + Field9: []uint32{0xaa4976e8, 0x3da8cc4c, 0x8c470d83, 0x344d964e, 0x5b90925, 0xa4c4d34e, 0x666eff19, 0xc238e552, 0x9be53bb6, 0x56364245, 0x33ee079d, 0x96bf0ede, 0x7941b74f, 0xdb07cb47, 0x6d76d827, 0x9b211d5d, 0x2798adb6, 0xe48b0c3b, 0x87061b21, 0x48f4e4d2, 0x3e5d5c12, 0x5ee91288, 0x336d4f35, 0xe1d44941, 0xc065548d, 0x2953d73f, 0x873af451, 0xfc769db, 0x9f1bf8da, 0x9baafdfc, 0xf1d3d770, 0x5bb5d2b4, 0xc2c67c48, 0x6845c4c1, 0xa48f32b0, 0xbb04bb70, 0xa5b1ca36, 0x8d98356a, 0x2171f654, 0x5ae279b0, 0x6c4a3d6b, 0x4fff5468, 0xcf9bf851, 0x68513614, 0xdbecd9b0, 0x9553ed3c, 0xa494a736, 0x42205438, 0xbf8e5caa, 0xd3283c6, 0x76d20788, 0x9179826f, 0x96b24f85, 0xbc2eacf4, 0xe4afae0b, 0x4bca85cb, 0x35e63b5b, 0xd7ccee0c, 0x2b506bb9, 0xe78e9f44, 0x9ad232f1, 0x99a37335, 0xa5d6ffc8}, + Field11: []uint64{0x53c01ebc, 0x4fb85ba6, 0x8805eea1, 0xb20ec896, 0x93b63410, 0xec7c9492, 0x50765a28, 0x19592106, 0x2ecc59b3, 0x39cd474f, 0xe4c9e47, 0x444f48c5, 0xe7731d32, 0xf3f43975, 0x603caedd, 0xbb05a1af, 0xa808e34e, 0x88580b07, 0x4c96bbd1, 0x730b4ab9, 0xed126e2b, 0x6db48205, 0x154ba1b9, 0xc26bfb6a, 0x389aa052, 0x869d966c, 0x7c86b366, 0xcc8edbcd, 0xfa8d6dad, 0xcf5857d9, 0x2d9cda0f, 0x1218a0b8, 0x41bf997, 0xf0ca65ac, 0xa610d4b9, 0x8d362e28, 0xb7212d87, 0x8e0fe109, 0xbee041d9, 0x759be2f6, 0x35fef4f3, 0xaeacdb71, 0x10888852, 0xf4e28117, 0xe2a14812, 0x73b748dc, 0xd1c3c6b2, 0xfef41bf0, 0xc9b43b62, 0x810e4faa, 0xcaa41c06, 0x1893fe0d, 0xedc7c850, 0xd12b9eaa, 0x467ee1a9, 0xbe84756b, 0xda7b1680, 0xdc069ffe, 0xf1e7e9f9, 0xb3d95370, 0xa92b77df, 0x5693ac41, 0xd04b7287, 0x27aebf15, 0x837b316e, 0x4dbe2263, 0xbab70c67, 0x547dab21, 0x3c346c1f, 0xb8ef0e4e, 0xfe2d03ce, 0xe1d75955, 0xfec1306, 0xba35c23e, 0xb784ed04, 0x2a4e33aa, 0x7e19d09a, 0x3827c1fe, 0xf3a51561, 0xef765e2b, 0xb044256c, 0x62b322be, 0xf34d56be, 0xeb71b369, 0xffe1294f, 0x237fe8d0, 0x77a1473b, 0x239e1196, 0xdd19bf3d, 0x82c91fe1, 0x95361c57, 0xffea3f1b, 0x1a094c84}, + Field12: []int64{8308420747267165049, 3664160795077875961, 7868970059161834817, 7237335984251173739, 5254748003907196506, 3362259627111837480, 430460752854552122, 5119635556501066533, 1277716037866233522, 9185775384759813768, 833932430882717888, 7986528304451297640, 6792233378368656337, 2074207091120609721, 1788723326198279432, 7756514594746453657, 2283775964901597324, 3061497730110517191, 7733947890656120277, 626967303632386244, 7822928600388582821, 3489658753000061230, 168869995163005961, 248814782163480763, 477885608911386247, 4198422415674133867, 3379354662797976109, 9925112544736939, 1486335136459138480, 4561560414032850671, 1010864164014091267, 186722821683803084, 5106357936724819318, 1298160820191228988, 4675403242419953145, 7130634540106489752, 7101280006672440929, 7176058292431955718, 9109875054097770321, 6810974877085322872, 4736707874303993641, 8993135362721382187, 6857881554990254283, 3704748883307461680, 1099360832887634994, 5207691918707192633, 5984721695043995243}, + } + size := proto.Size(n) + data, err := proto.Marshal(n) + if err != nil { + panic(err) + } + if len(data) != size { + t.Fatalf("expected %v, but got %v diff is %v", len(data), size, len(data)-size) + } +} + +func testSize(m interface { + proto.Message + Size() int +}, desc string, expected int) ([]byte, error) { + data, err := proto.Marshal(m) + if err != nil { + return nil, err + } + protoSize := proto.Size(m) + mSize := m.Size() + lenData := len(data) + if protoSize != mSize || protoSize != lenData || mSize != lenData { + return nil, fmt.Errorf("%s proto.Size(m){%d} != m.Size(){%d} != len(data){%d}", desc, protoSize, mSize, lenData) + } + if got := protoSize; got != expected { + return nil, fmt.Errorf("%s proto.Size(m) got %d expected %d", desc, got, expected) + } + if got := mSize; got != expected { + return nil, fmt.Errorf("%s m.Size() got %d expected %d", desc, got, expected) + } + if got := lenData; got != expected { + return nil, fmt.Errorf("%s len(data) got %d expected %d", desc, got, expected) + } + return data, nil +} + +func TestInt32Int64Compatibility(t *testing.T) { + + //test nullable int32 and int64 + + data1, err := testSize(&NinOptNative{ + Field3: proto.Int32(-1), + }, "nullable", 11) + if err != nil { + t.Error(err) + } + //change marshaled data1 to unmarshal into 4th field which is an int64 + data1[0] = uint8(uint32(4 /*fieldNumber*/)<<3 | uint32(0 /*wireType*/)) + u1 := &NinOptNative{} + if err = proto.Unmarshal(data1, u1); err != nil { + t.Error(err) + } + if !u1.Equal(&NinOptNative{ + Field4: proto.Int64(-1), + }) { + t.Error("nullable unmarshaled int32 is not the same int64") + } + + //test non-nullable int32 and int64 + + data2, err := testSize(&NidOptNative{ + Field3: -1, + }, "non nullable", 67) + if err != nil { + t.Error(err) + } + //change marshaled data2 to unmarshal into 4th field which is an int64 + field3 := uint8(uint32(3 /*fieldNumber*/)<<3 | uint32(0 /*wireType*/)) + field4 := uint8(uint32(4 /*fieldNumber*/)<<3 | uint32(0 /*wireType*/)) + for i, c := range data2 { + if c == field4 { + data2[i] = field3 + } else if c == field3 { + data2[i] = field4 + } + } + u2 := &NidOptNative{} + if err = proto.Unmarshal(data2, u2); err != nil { + t.Error(err) + } + if !u2.Equal(&NidOptNative{ + Field4: -1, + }) { + t.Error("non nullable unmarshaled int32 is not the same int64") + } + + //test packed repeated int32 and int64 + + m4 := &NinRepPackedNative{ + Field3: []int32{-1}, + } + data4, err := testSize(m4, "packed", 12) + if err != nil { + t.Error(err) + } + u4 := &NinRepPackedNative{} + if err := proto.Unmarshal(data4, u4); err != nil { + t.Error(err) + } + if err := u4.VerboseEqual(m4); err != nil { + t.Fatalf("%#v", u4) + } + + //test repeated int32 and int64 + + if _, err := testSize(&NinRepNative{ + Field3: []int32{-1}, + }, "repeated", 11); err != nil { + t.Error(err) + } + + t.Logf("tested all") +} + +func TestRepeatedExtensionsMsgsIssue161(t *testing.T) { + r := rand.New(rand.NewSource(time.Now().UnixNano())) + rep := 10 + nins := make([]*NinOptNative, rep) + for i := range nins { + nins[i] = NewPopulatedNinOptNative(r, true) + } + input := &MyExtendable{} + if err := proto.SetExtension(input, E_FieldE, nins); err != nil { + t.Fatal(err) + } + data, err := proto.Marshal(input) + if err != nil { + t.Fatal(err) + } + output := &MyExtendable{} + if err := proto.Unmarshal(data, output); err != nil { + t.Fatal(err) + } + if !input.Equal(output) { + t.Fatal("expected equal") + } + data2, err2 := proto.Marshal(output) + if err2 != nil { + t.Fatal(err2) + } + if len(data) != len(data2) { + t.Fatal("expected equal length buffers") + } +} + +func TestRepeatedExtensionsFieldsIssue161(t *testing.T) { + r := rand.New(rand.NewSource(time.Now().UnixNano())) + rep := 10 + ints := make([]int64, rep) + for i := range ints { + ints[i] = r.Int63() + } + input := &MyExtendable{} + if err := proto.SetExtension(input, E_FieldD, ints); err != nil { + t.Fatal(err) + } + data, err := proto.Marshal(input) + if err != nil { + t.Fatal(err) + } + output := &MyExtendable{} + if err := proto.Unmarshal(data, output); err != nil { + t.Fatal(err) + } + if !input.Equal(output) { + t.Fatal("expected equal") + } + data2, err2 := proto.Marshal(output) + if err2 != nil { + t.Fatal(err2) + } + if len(data) != len(data2) { + t.Fatal("expected equal length buffers") + } +} diff --git a/vendor/github.com/gogo/protobuf/test/casttype/Makefile b/vendor/github.com/gogo/protobuf/test/casttype/Makefile new file mode 100644 index 000000000..f3f1a492c --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/casttype/Makefile @@ -0,0 +1,31 @@ +# Extensions for Protocol Buffers to create more go like structures. +# +# Copyright (c) 2015, Vastech SA (PTY) LTD. All rights reserved. +# http://github.com/gogo/protobuf/gogoproto +# +# 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-combo + protoc-gen-combo --version="3.0.0" --proto_path=../../../../../:../../protobuf/:. casttype.proto diff --git a/vendor/github.com/gogo/protobuf/test/casttype/casttype.proto b/vendor/github.com/gogo/protobuf/test/casttype/casttype.proto new file mode 100644 index 000000000..991958182 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/casttype/casttype.proto @@ -0,0 +1,77 @@ +// Copyright (c) 2015, Vastech SA (PTY) LTD. All rights reserved. +// http://github.com/gogo/protobuf/gogoproto +// +// 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 casttype; + +import "github.com/gogo/protobuf/gogoproto/gogo.proto"; + +option (gogoproto.goproto_stringer_all) = false; +option (gogoproto.goproto_enum_prefix_all) = false; +option (gogoproto.goproto_getters_all) = false; + +option (gogoproto.equal_all) = true; +option (gogoproto.verbose_equal_all) = true; +option (gogoproto.stringer_all) = true; +option (gogoproto.gostring_all) = true; +option (gogoproto.face_all) = true; +option (gogoproto.description_all) = true; + +option (gogoproto.testgen_all) = true; +option (gogoproto.populate_all) = true; +option (gogoproto.benchgen_all) = true; +option (gogoproto.unmarshaler_all) = false; +option (gogoproto.marshaler_all) = false; +option (gogoproto.sizer_all) = true; + +option (gogoproto.goproto_enum_stringer_all) = false; +option (gogoproto.enum_stringer_all) = true; + +option (gogoproto.unsafe_marshaler_all) = false; +option (gogoproto.unsafe_unmarshaler_all) = false; + +message Castaway { + optional int64 Int32Ptr = 1 [(gogoproto.casttype) = "int32"]; + optional int64 Int32 = 2 [(gogoproto.casttype) = "int32", (gogoproto.nullable) = false]; + optional uint64 MyUint64Ptr = 3 [(gogoproto.casttype) = "github.com/gogo/protobuf/test/casttype.MyUint64Type"]; + optional uint64 MyUint64 = 4 [(gogoproto.casttype) = "github.com/gogo/protobuf/test/casttype.MyUint64Type", (gogoproto.nullable) = false]; + optional float MyFloat32Ptr = 5 [(gogoproto.casttype) = "github.com/gogo/protobuf/test/casttype.MyFloat32Type"]; + optional float MyFloat32 = 6 [(gogoproto.casttype) = "github.com/gogo/protobuf/test/casttype.MyFloat32Type", (gogoproto.nullable) = false]; + optional double MyFloat64Ptr = 7 [(gogoproto.casttype) = "github.com/gogo/protobuf/test/casttype.MyFloat64Type"]; + optional double MyFloat64 = 8 [(gogoproto.casttype) = "github.com/gogo/protobuf/test/casttype.MyFloat64Type", (gogoproto.nullable) = false]; + optional bytes MyBytes = 9 [(gogoproto.casttype) = "github.com/gogo/protobuf/test/casttype.Bytes"]; + optional bytes NormalBytes = 10; + repeated uint64 MyUint64s = 11 [(gogoproto.casttype) = "github.com/gogo/protobuf/test/casttype.MyUint64Type"]; + map MyMap = 12 [(gogoproto.casttype) = "github.com/gogo/protobuf/test/casttype.MyMapType"]; + map MyCustomMap = 13 [(gogoproto.castkey) = "github.com/gogo/protobuf/test/casttype.MyStringType", (gogoproto.castvalue) = "github.com/gogo/protobuf/test/casttype.MyUint64Type"]; + map MyNullableMap = 14 [(gogoproto.castkey) = "github.com/gogo/protobuf/test/casttype.MyInt32Type"]; + map MyEmbeddedMap = 15 [(gogoproto.castkey) = "github.com/gogo/protobuf/test/casttype.MyInt32Type", (gogoproto.nullable) = false]; +} + +message Wilson { + optional int64 Int64 = 1; +} diff --git a/vendor/github.com/gogo/protobuf/test/casttype/combos/both/casttype.pb.go b/vendor/github.com/gogo/protobuf/test/casttype/combos/both/casttype.pb.go new file mode 100644 index 000000000..af2e9d237 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/casttype/combos/both/casttype.pb.go @@ -0,0 +1,2418 @@ +// Code generated by protoc-gen-gogo. +// source: combos/both/casttype.proto +// DO NOT EDIT! + +/* + Package casttype is a generated protocol buffer package. + + It is generated from these files: + combos/both/casttype.proto + + It has these top-level messages: + Castaway + Wilson +*/ +package casttype + +import proto "github.com/gogo/protobuf/proto" +import fmt "fmt" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" + +import github_com_gogo_protobuf_test_casttype "github.com/gogo/protobuf/test/casttype" + +import github_com_gogo_protobuf_protoc_gen_gogo_descriptor "github.com/gogo/protobuf/protoc-gen-gogo/descriptor" +import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" +import compress_gzip "compress/gzip" +import bytes "bytes" +import io_ioutil "io/ioutil" + +import strings "strings" +import sort "sort" +import strconv "strconv" +import reflect "reflect" +import github_com_gogo_protobuf_sortkeys "github.com/gogo/protobuf/sortkeys" + +import errors "errors" + +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. +const _ = proto.GoGoProtoPackageIsVersion1 + +type Castaway struct { + Int32Ptr *int32 `protobuf:"varint,1,opt,name=Int32Ptr,json=int32Ptr,casttype=int32" json:"Int32Ptr,omitempty"` + Int32 int32 `protobuf:"varint,2,opt,name=Int32,json=int32,casttype=int32" json:"Int32"` + MyUint64Ptr *github_com_gogo_protobuf_test_casttype.MyUint64Type `protobuf:"varint,3,opt,name=MyUint64Ptr,json=myUint64Ptr,casttype=github.com/gogo/protobuf/test/casttype.MyUint64Type" json:"MyUint64Ptr,omitempty"` + MyUint64 github_com_gogo_protobuf_test_casttype.MyUint64Type `protobuf:"varint,4,opt,name=MyUint64,json=myUint64,casttype=github.com/gogo/protobuf/test/casttype.MyUint64Type" json:"MyUint64"` + MyFloat32Ptr *github_com_gogo_protobuf_test_casttype.MyFloat32Type `protobuf:"fixed32,5,opt,name=MyFloat32Ptr,json=myFloat32Ptr,casttype=github.com/gogo/protobuf/test/casttype.MyFloat32Type" json:"MyFloat32Ptr,omitempty"` + MyFloat32 github_com_gogo_protobuf_test_casttype.MyFloat32Type `protobuf:"fixed32,6,opt,name=MyFloat32,json=myFloat32,casttype=github.com/gogo/protobuf/test/casttype.MyFloat32Type" json:"MyFloat32"` + MyFloat64Ptr *github_com_gogo_protobuf_test_casttype.MyFloat64Type `protobuf:"fixed64,7,opt,name=MyFloat64Ptr,json=myFloat64Ptr,casttype=github.com/gogo/protobuf/test/casttype.MyFloat64Type" json:"MyFloat64Ptr,omitempty"` + MyFloat64 github_com_gogo_protobuf_test_casttype.MyFloat64Type `protobuf:"fixed64,8,opt,name=MyFloat64,json=myFloat64,casttype=github.com/gogo/protobuf/test/casttype.MyFloat64Type" json:"MyFloat64"` + MyBytes github_com_gogo_protobuf_test_casttype.Bytes `protobuf:"bytes,9,opt,name=MyBytes,json=myBytes,casttype=github.com/gogo/protobuf/test/casttype.Bytes" json:"MyBytes,omitempty"` + NormalBytes []byte `protobuf:"bytes,10,opt,name=NormalBytes,json=normalBytes" json:"NormalBytes,omitempty"` + MyUint64S []github_com_gogo_protobuf_test_casttype.MyUint64Type `protobuf:"varint,11,rep,name=MyUint64s,json=myUint64s,casttype=github.com/gogo/protobuf/test/casttype.MyUint64Type" json:"MyUint64s,omitempty"` + MyMap github_com_gogo_protobuf_test_casttype.MyMapType `protobuf:"bytes,12,rep,name=MyMap,json=myMap,casttype=github.com/gogo/protobuf/test/casttype.MyMapType" json:"MyMap,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"varint,2,opt,name=value"` + MyCustomMap map[github_com_gogo_protobuf_test_casttype.MyStringType]github_com_gogo_protobuf_test_casttype.MyUint64Type `protobuf:"bytes,13,rep,name=MyCustomMap,json=myCustomMap,castkey=github.com/gogo/protobuf/test/casttype.MyStringType,castvalue=github.com/gogo/protobuf/test/casttype.MyUint64Type" json:"MyCustomMap,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"varint,2,opt,name=value"` + MyNullableMap map[github_com_gogo_protobuf_test_casttype.MyInt32Type]*Wilson `protobuf:"bytes,14,rep,name=MyNullableMap,json=myNullableMap,castkey=github.com/gogo/protobuf/test/casttype.MyInt32Type" json:"MyNullableMap,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + MyEmbeddedMap map[github_com_gogo_protobuf_test_casttype.MyInt32Type]Wilson `protobuf:"bytes,15,rep,name=MyEmbeddedMap,json=myEmbeddedMap,castkey=github.com/gogo/protobuf/test/casttype.MyInt32Type" json:"MyEmbeddedMap" protobuf_key:"varint,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *Castaway) Reset() { *m = Castaway{} } +func (*Castaway) ProtoMessage() {} +func (*Castaway) Descriptor() ([]byte, []int) { return fileDescriptorCasttype, []int{0} } + +type Wilson struct { + Int64 *int64 `protobuf:"varint,1,opt,name=Int64,json=int64" json:"Int64,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *Wilson) Reset() { *m = Wilson{} } +func (*Wilson) ProtoMessage() {} +func (*Wilson) Descriptor() ([]byte, []int) { return fileDescriptorCasttype, []int{1} } + +func init() { + proto.RegisterType((*Castaway)(nil), "casttype.Castaway") + proto.RegisterType((*Wilson)(nil), "casttype.Wilson") +} +func (this *Castaway) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return CasttypeDescription() +} +func (this *Wilson) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return CasttypeDescription() +} +func CasttypeDescription() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + d := &github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet{} + var gzipped = []byte{ + // 3791 bytes of a gzipped FileDescriptorSet + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xcc, 0x5a, 0x5b, 0x6c, 0x1b, 0x67, + 0x76, 0x36, 0x6f, 0x12, 0x79, 0x48, 0x51, 0xd4, 0x48, 0xb1, 0x69, 0x6d, 0x2c, 0xdb, 0x72, 0x2e, + 0x5e, 0xef, 0xae, 0xe4, 0x3a, 0x8e, 0xed, 0xd0, 0xdb, 0x2c, 0x44, 0x89, 0xd6, 0xd2, 0xd0, 0xad, + 0x23, 0x71, 0x6d,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, 0x64, 0xc3, 0x4c, 0x2c, 0x2f, 0x95, + 0x29, 0x80, 0x8a, 0xd1, 0x30, 0xac, 0x8a, 0x61, 0x95, 0x77, 0xb2, 0x11, 0xb4, 0x22, 0xa1, 0xfa, + 0x24, 0xca, 0x57, 0x60, 0xac, 0xd1, 0xda, 0x34, 0x6b, 0x65, 0xcd, 0xa7, 0x06, 0xa8, 0x16, 0x53, + 0x33, 0x7c, 0x60, 0xa1, 0xad, 0xfc, 0x28, 0x8c, 0xde, 0x31, 0xf4, 0x5b, 0x7e, 0xd5, 0x24, 0x53, + 0x4d, 0x93, 0xd8, 0xa7, 0x38, 0x0f, 0xa9, 0xba, 0xe1, 0x38, 0x68, 0x80, 0xe6, 0xee, 0x34, 0x8c, + 0x6c, 0x94, 0x3d, 0xfd, 0x89, 0x9e, 0xa7, 0xef, 0x7e, 0xf2, 0xa4, 0x40, 0x6d, 0x20, 0x48, 0x99, + 0x83, 0x84, 0x61, 0xb5, 0xea, 0x9c, 0x21, 0xb6, 0x8b, 0xff, 0x0a, 0xa8, 0xd1, 0xcd, 0x12, 0x27, + 0x98, 0xa0, 0x18, 0x76, 0x8c, 0xe6, 0xed, 0x5a, 0xd9, 0xc8, 0x0e, 0x31, 0x82, 0x47, 0x7b, 0x08, + 0xd6, 0xf9, 0x78, 0x37, 0x87, 0xc4, 0xe1, 0xa3, 0x24, 0x8c, 0xbb, 0xae, 0x61, 0x39, 0x35, 0xdb, + 0xca, 0x0e, 0x33, 0x92, 0x87, 0xfb, 0xcc, 0xa2, 0x61, 0x56, 0xba, 0x29, 0xda, 0x38, 0xe5, 0x02, + 0x0c, 0xdb, 0x0d, 0x17, 0xbf, 0x39, 0xd9, 0x38, 0xce, 0x4f, 0xf2, 0xdc, 0x83, 0x7d, 0x03, 0x61, + 0x95, 0xeb, 0xa8, 0x52, 0x59, 0x29, 0x42, 0xc6, 0xb1, 0x5b, 0xcd, 0xb2, 0xa1, 0x95, 0xed, 0x8a, + 0xa1, 0xd5, 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0x21, 0x4f, + 0x60, 0xcd, 0x67, 0xe7, 0x28, 0x61, 0xda, 0xd4, 0x5b, 0x72, 0x10, 0x6f, 0x5a, 0x73, 0xb4, 0xf6, + 0x81, 0x5e, 0x18, 0xc7, 0xe3, 0x6a, 0xb2, 0xe6, 0x78, 0x27, 0x38, 0xd3, 0x2f, 0x62, 0x79, 0xed, + 0x3c, 0x90, 0x54, 0x16, 0x20, 0x6e, 0xda, 0x18, 0x1f, 0x84, 0xe0, 0xa7, 0xe1, 0xa7, 0x03, 0xce, + 0x30, 0x67, 0x96, 0x84, 0xbe, 0xea, 0x21, 0x27, 0xff, 0x36, 0x04, 0x71, 0x29, 0xc6, 0x42, 0x11, + 0x6d, 0xe8, 0xee, 0x36, 0xa3, 0x8b, 0xe5, 0xc3, 0x99, 0x90, 0xca, 0xae, 0x49, 0x8e, 0xdd, 0x8c, + 0xc5, 0x42, 0x40, 0xc8, 0xe9, 0x9a, 0xe6, 0xd5, 0x34, 0xf4, 0x0a, 0x6b, 0x70, 0xed, 0x7a, 0x1d, + 0x67, 0xd2, 0x91, 0xf3, 0x2a, 0xe4, 0xf3, 0x42, 0x4c, 0xe7, 0xe2, 0x6e, 0x53, 0xaf, 0x99, 0x1d, + 0xba, 0x51, 0xa6, 0x9b, 0x91, 0x03, 0x9e, 0x72, 0x0e, 0x8e, 0x4a, 0xde, 0x8a, 0xe1, 0xea, 0xd8, + 0x3c, 0x57, 0xda, 0xa0, 0x21, 0x76, 0xda, 0x75, 0x44, 0x28, 0x2c, 0x88, 0x71, 0x89, 0xcd, 0x5f, + 0xc7, 0x46, 0xd6, 0xae, 0x77, 0x7b, 0x22, 0x9f, 0xe9, 0xda, 0x77, 0x39, 0xdf, 0x0c, 0x3d, 0x05, + 0xed, 0xa6, 0xe2, 0x85, 0x70, 0x64, 0x71, 0x2d, 0xff, 0x72, 0x78, 0x72, 0x91, 0xe3, 0xd6, 0xa4, + 0x07, 0x55, 0x63, 0xcb, 0x34, 0xca, 0xe4, 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0xd1, 0xae, 0x81, + 0x94, 0x7b, 0xf3, 0x31, 0x00, 0xe7, 0xf7, 0x05, 0xa7, 0x22, 0xb0, 0x72, 0x5a, 0x88, 0xf1, 0x2a, + 0x8c, 0xe1, 0x4e, 0x7d, 0xd3, 0x76, 0xc4, 0xbe, 0x77, 0x00, 0xba, 0xe7, 0x04, 0xdd, 0xa8, 0x00, + 0xb2, 0x5d, 0x30, 0x71, 0x3d, 0x01, 0xf1, 0x2d, 0xdc, 0x00, 0x0d, 0x40, 0xf1, 0x03, 0x41, 0x31, + 0x4c, 0xfa, 0x04, 0x9d, 0x83, 0x54, 0xd5, 0x16, 0x69, 0x38, 0x18, 0xfe, 0x43, 0x01, 0x4f, 0x4a, + 0x8c, 0xa0, 0x68, 0xd8, 0x8d, 0x96, 0x49, 0x39, 0x3a, 0x98, 0xe2, 0xb7, 0x24, 0x85, 0xc4, 0x08, + 0x8a, 0x7d, 0xb8, 0xf5, 0xb7, 0x25, 0x85, 0xe3, 0xf3, 0xe7, 0x37, 0xe8, 0xac, 0xd7, 0xdc, 0xb1, + 0xad, 0x41, 0x8c, 0x78, 0x5e, 0x30, 0x80, 0x80, 0x10, 0xc1, 0x65, 0x48, 0x0c, 0x3a, 0x11, 0xbf, + 0x23, 0xe0, 0x71, 0x43, 0xce, 0x00, 0xae, 0x33, 0x99, 0x64, 0xe8, 0xdd, 0x4a, 0x30, 0xc5, 0xef, + 0x0a, 0x8a, 0xb4, 0x0f, 0x26, 0x1e, 0xc3, 0x35, 0x1c, 0x17, 0xb7, 0xea, 0x03, 0x90, 0xbc, 0x28, + 0x1f, 0x43, 0x40, 0x84, 0x2b, 0x37, 0x0d, 0xab, 0xbc, 0x3d, 0x18, 0xc3, 0x4b, 0xd2, 0x95, 0x12, + 0x43, 0x14, 0x98, 0x79, 0xea, 0x7a, 0x13, 0x37, 0xd7, 0xe6, 0x40, 0xd3, 0xf1, 0x7b, 0x82, 0x23, + 0xe5, 0x81, 0x84, 0x47, 0x5a, 0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c, 0x45, 0x96, 0xed, 0x59, 0x51, 0x62, 0x15, 0xe6, + 0xc2, 0xf9, 0xfc, 0xd2, 0x9b, 0xef, 0x4d, 0x1d, 0x7a, 0x0b, 0x3f, 0xff, 0x80, 0x9f, 0x77, 0xdf, + 0x9b, 0x0a, 0x7d, 0x88, 0x9f, 0x8f, 0xf1, 0xf3, 0x09, 0x7e, 0x9e, 0x7e, 0x7f, 0x2a, 0xf4, 0x12, + 0x7e, 0x5e, 0xc1, 0xcf, 0x5f, 0xe0, 0xe7, 0x75, 0xfc, 0xbc, 0x89, 0x9f, 0xb7, 0xf0, 0xf3, 0x2e, + 0x7e, 0x3e, 0x7c, 0x7f, 0xea, 0xd0, 0xc7, 0xf8, 0xff, 0x13, 0xfc, 0xff, 0xf4, 0x3f, 0x4d, 0x1d, + 0xfa, 0xdf, 0x00, 0x00, 0x00, 0xff, 0xff, 0xf4, 0x74, 0xfe, 0x5d, 0xcb, 0x31, 0x00, 0x00, + } + r := bytes.NewReader(gzipped) + gzipr, err := compress_gzip.NewReader(r) + if err != nil { + panic(err) + } + ungzipped, err := io_ioutil.ReadAll(gzipr) + if err != nil { + panic(err) + } + if err := github_com_gogo_protobuf_proto.Unmarshal(ungzipped, d); err != nil { + panic(err) + } + return d +} +func (this *Castaway) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*Castaway) + if !ok { + that2, ok := that.(Castaway) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *Castaway") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *Castaway but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *Castaway but is not nil && this == nil") + } + if this.Int32Ptr != nil && that1.Int32Ptr != nil { + if *this.Int32Ptr != *that1.Int32Ptr { + return fmt.Errorf("Int32Ptr this(%v) Not Equal that(%v)", *this.Int32Ptr, *that1.Int32Ptr) + } + } else if this.Int32Ptr != nil { + return fmt.Errorf("this.Int32Ptr == nil && that.Int32Ptr != nil") + } else if that1.Int32Ptr != nil { + return fmt.Errorf("Int32Ptr this(%v) Not Equal that(%v)", this.Int32Ptr, that1.Int32Ptr) + } + if this.Int32 != that1.Int32 { + return fmt.Errorf("Int32 this(%v) Not Equal that(%v)", this.Int32, that1.Int32) + } + if this.MyUint64Ptr != nil && that1.MyUint64Ptr != nil { + if *this.MyUint64Ptr != *that1.MyUint64Ptr { + return fmt.Errorf("MyUint64Ptr this(%v) Not Equal that(%v)", *this.MyUint64Ptr, *that1.MyUint64Ptr) + } + } else if this.MyUint64Ptr != nil { + return fmt.Errorf("this.MyUint64Ptr == nil && that.MyUint64Ptr != nil") + } else if that1.MyUint64Ptr != nil { + return fmt.Errorf("MyUint64Ptr this(%v) Not Equal that(%v)", this.MyUint64Ptr, that1.MyUint64Ptr) + } + if this.MyUint64 != that1.MyUint64 { + return fmt.Errorf("MyUint64 this(%v) Not Equal that(%v)", this.MyUint64, that1.MyUint64) + } + if this.MyFloat32Ptr != nil && that1.MyFloat32Ptr != nil { + if *this.MyFloat32Ptr != *that1.MyFloat32Ptr { + return fmt.Errorf("MyFloat32Ptr this(%v) Not Equal that(%v)", *this.MyFloat32Ptr, *that1.MyFloat32Ptr) + } + } else if this.MyFloat32Ptr != nil { + return fmt.Errorf("this.MyFloat32Ptr == nil && that.MyFloat32Ptr != nil") + } else if that1.MyFloat32Ptr != nil { + return fmt.Errorf("MyFloat32Ptr this(%v) Not Equal that(%v)", this.MyFloat32Ptr, that1.MyFloat32Ptr) + } + if this.MyFloat32 != that1.MyFloat32 { + return fmt.Errorf("MyFloat32 this(%v) Not Equal that(%v)", this.MyFloat32, that1.MyFloat32) + } + if this.MyFloat64Ptr != nil && that1.MyFloat64Ptr != nil { + if *this.MyFloat64Ptr != *that1.MyFloat64Ptr { + return fmt.Errorf("MyFloat64Ptr this(%v) Not Equal that(%v)", *this.MyFloat64Ptr, *that1.MyFloat64Ptr) + } + } else if this.MyFloat64Ptr != nil { + return fmt.Errorf("this.MyFloat64Ptr == nil && that.MyFloat64Ptr != nil") + } else if that1.MyFloat64Ptr != nil { + return fmt.Errorf("MyFloat64Ptr this(%v) Not Equal that(%v)", this.MyFloat64Ptr, that1.MyFloat64Ptr) + } + if this.MyFloat64 != that1.MyFloat64 { + return fmt.Errorf("MyFloat64 this(%v) Not Equal that(%v)", this.MyFloat64, that1.MyFloat64) + } + if !bytes.Equal(this.MyBytes, that1.MyBytes) { + return fmt.Errorf("MyBytes this(%v) Not Equal that(%v)", this.MyBytes, that1.MyBytes) + } + if !bytes.Equal(this.NormalBytes, that1.NormalBytes) { + return fmt.Errorf("NormalBytes this(%v) Not Equal that(%v)", this.NormalBytes, that1.NormalBytes) + } + if len(this.MyUint64S) != len(that1.MyUint64S) { + return fmt.Errorf("MyUint64S this(%v) Not Equal that(%v)", len(this.MyUint64S), len(that1.MyUint64S)) + } + for i := range this.MyUint64S { + if this.MyUint64S[i] != that1.MyUint64S[i] { + return fmt.Errorf("MyUint64S this[%v](%v) Not Equal that[%v](%v)", i, this.MyUint64S[i], i, that1.MyUint64S[i]) + } + } + if len(this.MyMap) != len(that1.MyMap) { + return fmt.Errorf("MyMap this(%v) Not Equal that(%v)", len(this.MyMap), len(that1.MyMap)) + } + for i := range this.MyMap { + if this.MyMap[i] != that1.MyMap[i] { + return fmt.Errorf("MyMap this[%v](%v) Not Equal that[%v](%v)", i, this.MyMap[i], i, that1.MyMap[i]) + } + } + if len(this.MyCustomMap) != len(that1.MyCustomMap) { + return fmt.Errorf("MyCustomMap this(%v) Not Equal that(%v)", len(this.MyCustomMap), len(that1.MyCustomMap)) + } + for i := range this.MyCustomMap { + if this.MyCustomMap[i] != that1.MyCustomMap[i] { + return fmt.Errorf("MyCustomMap this[%v](%v) Not Equal that[%v](%v)", i, this.MyCustomMap[i], i, that1.MyCustomMap[i]) + } + } + if len(this.MyNullableMap) != len(that1.MyNullableMap) { + return fmt.Errorf("MyNullableMap this(%v) Not Equal that(%v)", len(this.MyNullableMap), len(that1.MyNullableMap)) + } + for i := range this.MyNullableMap { + if !this.MyNullableMap[i].Equal(that1.MyNullableMap[i]) { + return fmt.Errorf("MyNullableMap this[%v](%v) Not Equal that[%v](%v)", i, this.MyNullableMap[i], i, that1.MyNullableMap[i]) + } + } + if len(this.MyEmbeddedMap) != len(that1.MyEmbeddedMap) { + return fmt.Errorf("MyEmbeddedMap this(%v) Not Equal that(%v)", len(this.MyEmbeddedMap), len(that1.MyEmbeddedMap)) + } + for i := range this.MyEmbeddedMap { + a := this.MyEmbeddedMap[i] + b := that1.MyEmbeddedMap[i] + if !(&a).Equal(&b) { + return fmt.Errorf("MyEmbeddedMap this[%v](%v) Not Equal that[%v](%v)", i, this.MyEmbeddedMap[i], i, that1.MyEmbeddedMap[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *Castaway) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*Castaway) + if !ok { + that2, ok := that.(Castaway) + 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.Int32Ptr != nil && that1.Int32Ptr != nil { + if *this.Int32Ptr != *that1.Int32Ptr { + return false + } + } else if this.Int32Ptr != nil { + return false + } else if that1.Int32Ptr != nil { + return false + } + if this.Int32 != that1.Int32 { + return false + } + if this.MyUint64Ptr != nil && that1.MyUint64Ptr != nil { + if *this.MyUint64Ptr != *that1.MyUint64Ptr { + return false + } + } else if this.MyUint64Ptr != nil { + return false + } else if that1.MyUint64Ptr != nil { + return false + } + if this.MyUint64 != that1.MyUint64 { + return false + } + if this.MyFloat32Ptr != nil && that1.MyFloat32Ptr != nil { + if *this.MyFloat32Ptr != *that1.MyFloat32Ptr { + return false + } + } else if this.MyFloat32Ptr != nil { + return false + } else if that1.MyFloat32Ptr != nil { + return false + } + if this.MyFloat32 != that1.MyFloat32 { + return false + } + if this.MyFloat64Ptr != nil && that1.MyFloat64Ptr != nil { + if *this.MyFloat64Ptr != *that1.MyFloat64Ptr { + return false + } + } else if this.MyFloat64Ptr != nil { + return false + } else if that1.MyFloat64Ptr != nil { + return false + } + if this.MyFloat64 != that1.MyFloat64 { + return false + } + if !bytes.Equal(this.MyBytes, that1.MyBytes) { + return false + } + if !bytes.Equal(this.NormalBytes, that1.NormalBytes) { + return false + } + if len(this.MyUint64S) != len(that1.MyUint64S) { + return false + } + for i := range this.MyUint64S { + if this.MyUint64S[i] != that1.MyUint64S[i] { + return false + } + } + if len(this.MyMap) != len(that1.MyMap) { + return false + } + for i := range this.MyMap { + if this.MyMap[i] != that1.MyMap[i] { + return false + } + } + if len(this.MyCustomMap) != len(that1.MyCustomMap) { + return false + } + for i := range this.MyCustomMap { + if this.MyCustomMap[i] != that1.MyCustomMap[i] { + return false + } + } + if len(this.MyNullableMap) != len(that1.MyNullableMap) { + return false + } + for i := range this.MyNullableMap { + if !this.MyNullableMap[i].Equal(that1.MyNullableMap[i]) { + return false + } + } + if len(this.MyEmbeddedMap) != len(that1.MyEmbeddedMap) { + return false + } + for i := range this.MyEmbeddedMap { + a := this.MyEmbeddedMap[i] + b := that1.MyEmbeddedMap[i] + if !(&a).Equal(&b) { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *Wilson) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*Wilson) + if !ok { + that2, ok := that.(Wilson) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *Wilson") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *Wilson but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *Wilson but is not nil && this == nil") + } + if this.Int64 != nil && that1.Int64 != nil { + if *this.Int64 != *that1.Int64 { + return fmt.Errorf("Int64 this(%v) Not Equal that(%v)", *this.Int64, *that1.Int64) + } + } else if this.Int64 != nil { + return fmt.Errorf("this.Int64 == nil && that.Int64 != nil") + } else if that1.Int64 != nil { + return fmt.Errorf("Int64 this(%v) Not Equal that(%v)", this.Int64, that1.Int64) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *Wilson) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*Wilson) + if !ok { + that2, ok := that.(Wilson) + 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.Int64 != nil && that1.Int64 != nil { + if *this.Int64 != *that1.Int64 { + return false + } + } else if this.Int64 != nil { + return false + } else if that1.Int64 != nil { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} + +type CastawayFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetInt32Ptr() *int32 + GetInt32() int32 + GetMyUint64Ptr() *github_com_gogo_protobuf_test_casttype.MyUint64Type + GetMyUint64() github_com_gogo_protobuf_test_casttype.MyUint64Type + GetMyFloat32Ptr() *github_com_gogo_protobuf_test_casttype.MyFloat32Type + GetMyFloat32() github_com_gogo_protobuf_test_casttype.MyFloat32Type + GetMyFloat64Ptr() *github_com_gogo_protobuf_test_casttype.MyFloat64Type + GetMyFloat64() github_com_gogo_protobuf_test_casttype.MyFloat64Type + GetMyBytes() github_com_gogo_protobuf_test_casttype.Bytes + GetNormalBytes() []byte + GetMyUint64S() []github_com_gogo_protobuf_test_casttype.MyUint64Type + GetMyMap() github_com_gogo_protobuf_test_casttype.MyMapType + GetMyCustomMap() map[github_com_gogo_protobuf_test_casttype.MyStringType]github_com_gogo_protobuf_test_casttype.MyUint64Type + GetMyNullableMap() map[github_com_gogo_protobuf_test_casttype.MyInt32Type]*Wilson + GetMyEmbeddedMap() map[github_com_gogo_protobuf_test_casttype.MyInt32Type]Wilson +} + +func (this *Castaway) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *Castaway) TestProto() github_com_gogo_protobuf_proto.Message { + return NewCastawayFromFace(this) +} + +func (this *Castaway) GetInt32Ptr() *int32 { + return this.Int32Ptr +} + +func (this *Castaway) GetInt32() int32 { + return this.Int32 +} + +func (this *Castaway) GetMyUint64Ptr() *github_com_gogo_protobuf_test_casttype.MyUint64Type { + return this.MyUint64Ptr +} + +func (this *Castaway) GetMyUint64() github_com_gogo_protobuf_test_casttype.MyUint64Type { + return this.MyUint64 +} + +func (this *Castaway) GetMyFloat32Ptr() *github_com_gogo_protobuf_test_casttype.MyFloat32Type { + return this.MyFloat32Ptr +} + +func (this *Castaway) GetMyFloat32() github_com_gogo_protobuf_test_casttype.MyFloat32Type { + return this.MyFloat32 +} + +func (this *Castaway) GetMyFloat64Ptr() *github_com_gogo_protobuf_test_casttype.MyFloat64Type { + return this.MyFloat64Ptr +} + +func (this *Castaway) GetMyFloat64() github_com_gogo_protobuf_test_casttype.MyFloat64Type { + return this.MyFloat64 +} + +func (this *Castaway) GetMyBytes() github_com_gogo_protobuf_test_casttype.Bytes { + return this.MyBytes +} + +func (this *Castaway) GetNormalBytes() []byte { + return this.NormalBytes +} + +func (this *Castaway) GetMyUint64S() []github_com_gogo_protobuf_test_casttype.MyUint64Type { + return this.MyUint64S +} + +func (this *Castaway) GetMyMap() github_com_gogo_protobuf_test_casttype.MyMapType { + return this.MyMap +} + +func (this *Castaway) GetMyCustomMap() map[github_com_gogo_protobuf_test_casttype.MyStringType]github_com_gogo_protobuf_test_casttype.MyUint64Type { + return this.MyCustomMap +} + +func (this *Castaway) GetMyNullableMap() map[github_com_gogo_protobuf_test_casttype.MyInt32Type]*Wilson { + return this.MyNullableMap +} + +func (this *Castaway) GetMyEmbeddedMap() map[github_com_gogo_protobuf_test_casttype.MyInt32Type]Wilson { + return this.MyEmbeddedMap +} + +func NewCastawayFromFace(that CastawayFace) *Castaway { + this := &Castaway{} + this.Int32Ptr = that.GetInt32Ptr() + this.Int32 = that.GetInt32() + this.MyUint64Ptr = that.GetMyUint64Ptr() + this.MyUint64 = that.GetMyUint64() + this.MyFloat32Ptr = that.GetMyFloat32Ptr() + this.MyFloat32 = that.GetMyFloat32() + this.MyFloat64Ptr = that.GetMyFloat64Ptr() + this.MyFloat64 = that.GetMyFloat64() + this.MyBytes = that.GetMyBytes() + this.NormalBytes = that.GetNormalBytes() + this.MyUint64S = that.GetMyUint64S() + this.MyMap = that.GetMyMap() + this.MyCustomMap = that.GetMyCustomMap() + this.MyNullableMap = that.GetMyNullableMap() + this.MyEmbeddedMap = that.GetMyEmbeddedMap() + return this +} + +type WilsonFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetInt64() *int64 +} + +func (this *Wilson) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *Wilson) TestProto() github_com_gogo_protobuf_proto.Message { + return NewWilsonFromFace(this) +} + +func (this *Wilson) GetInt64() *int64 { + return this.Int64 +} + +func NewWilsonFromFace(that WilsonFace) *Wilson { + this := &Wilson{} + this.Int64 = that.GetInt64() + return this +} + +func (this *Castaway) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 19) + s = append(s, "&casttype.Castaway{") + if this.Int32Ptr != nil { + s = append(s, "Int32Ptr: "+valueToGoStringCasttype(this.Int32Ptr, "int32")+",\n") + } + s = append(s, "Int32: "+fmt.Sprintf("%#v", this.Int32)+",\n") + if this.MyUint64Ptr != nil { + s = append(s, "MyUint64Ptr: "+valueToGoStringCasttype(this.MyUint64Ptr, "github_com_gogo_protobuf_test_casttype.MyUint64Type")+",\n") + } + s = append(s, "MyUint64: "+fmt.Sprintf("%#v", this.MyUint64)+",\n") + if this.MyFloat32Ptr != nil { + s = append(s, "MyFloat32Ptr: "+valueToGoStringCasttype(this.MyFloat32Ptr, "github_com_gogo_protobuf_test_casttype.MyFloat32Type")+",\n") + } + s = append(s, "MyFloat32: "+fmt.Sprintf("%#v", this.MyFloat32)+",\n") + if this.MyFloat64Ptr != nil { + s = append(s, "MyFloat64Ptr: "+valueToGoStringCasttype(this.MyFloat64Ptr, "github_com_gogo_protobuf_test_casttype.MyFloat64Type")+",\n") + } + s = append(s, "MyFloat64: "+fmt.Sprintf("%#v", this.MyFloat64)+",\n") + if this.MyBytes != nil { + s = append(s, "MyBytes: "+valueToGoStringCasttype(this.MyBytes, "github_com_gogo_protobuf_test_casttype.Bytes")+",\n") + } + if this.NormalBytes != nil { + s = append(s, "NormalBytes: "+valueToGoStringCasttype(this.NormalBytes, "byte")+",\n") + } + if this.MyUint64S != nil { + s = append(s, "MyUint64S: "+fmt.Sprintf("%#v", this.MyUint64S)+",\n") + } + keysForMyMap := make([]string, 0, len(this.MyMap)) + for k := range this.MyMap { + keysForMyMap = append(keysForMyMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForMyMap) + mapStringForMyMap := "github_com_gogo_protobuf_test_casttype.MyMapType{" + for _, k := range keysForMyMap { + mapStringForMyMap += fmt.Sprintf("%#v: %#v,", k, this.MyMap[k]) + } + mapStringForMyMap += "}" + if this.MyMap != nil { + s = append(s, "MyMap: "+mapStringForMyMap+",\n") + } + keysForMyCustomMap := make([]string, 0, len(this.MyCustomMap)) + for k := range this.MyCustomMap { + keysForMyCustomMap = append(keysForMyCustomMap, string(k)) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForMyCustomMap) + mapStringForMyCustomMap := "map[github_com_gogo_protobuf_test_casttype.MyStringType]github_com_gogo_protobuf_test_casttype.MyUint64Type{" + for _, k := range keysForMyCustomMap { + mapStringForMyCustomMap += fmt.Sprintf("%#v: %#v,", k, this.MyCustomMap[github_com_gogo_protobuf_test_casttype.MyStringType(k)]) + } + mapStringForMyCustomMap += "}" + if this.MyCustomMap != nil { + s = append(s, "MyCustomMap: "+mapStringForMyCustomMap+",\n") + } + keysForMyNullableMap := make([]int32, 0, len(this.MyNullableMap)) + for k := range this.MyNullableMap { + keysForMyNullableMap = append(keysForMyNullableMap, int32(k)) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForMyNullableMap) + mapStringForMyNullableMap := "map[github_com_gogo_protobuf_test_casttype.MyInt32Type]*Wilson{" + for _, k := range keysForMyNullableMap { + mapStringForMyNullableMap += fmt.Sprintf("%#v: %#v,", k, this.MyNullableMap[github_com_gogo_protobuf_test_casttype.MyInt32Type(k)]) + } + mapStringForMyNullableMap += "}" + if this.MyNullableMap != nil { + s = append(s, "MyNullableMap: "+mapStringForMyNullableMap+",\n") + } + keysForMyEmbeddedMap := make([]int32, 0, len(this.MyEmbeddedMap)) + for k := range this.MyEmbeddedMap { + keysForMyEmbeddedMap = append(keysForMyEmbeddedMap, int32(k)) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForMyEmbeddedMap) + mapStringForMyEmbeddedMap := "map[github_com_gogo_protobuf_test_casttype.MyInt32Type]Wilson{" + for _, k := range keysForMyEmbeddedMap { + mapStringForMyEmbeddedMap += fmt.Sprintf("%#v: %#v,", k, this.MyEmbeddedMap[github_com_gogo_protobuf_test_casttype.MyInt32Type(k)]) + } + mapStringForMyEmbeddedMap += "}" + if this.MyEmbeddedMap != nil { + s = append(s, "MyEmbeddedMap: "+mapStringForMyEmbeddedMap+",\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 *Wilson) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&casttype.Wilson{") + if this.Int64 != nil { + s = append(s, "Int64: "+valueToGoStringCasttype(this.Int64, "int64")+",\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 valueToGoStringCasttype(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 extensionToGoStringCasttype(e map[int32]github_com_gogo_protobuf_proto.Extension) string { + if e == nil { + return "nil" + } + s := "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 +} +func (m *Castaway) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *Castaway) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Int32Ptr != nil { + data[i] = 0x8 + i++ + i = encodeVarintCasttype(data, i, uint64(*m.Int32Ptr)) + } + data[i] = 0x10 + i++ + i = encodeVarintCasttype(data, i, uint64(m.Int32)) + if m.MyUint64Ptr != nil { + data[i] = 0x18 + i++ + i = encodeVarintCasttype(data, i, uint64(*m.MyUint64Ptr)) + } + data[i] = 0x20 + i++ + i = encodeVarintCasttype(data, i, uint64(m.MyUint64)) + if m.MyFloat32Ptr != nil { + data[i] = 0x2d + i++ + i = encodeFixed32Casttype(data, i, uint32(math.Float32bits(float32(*m.MyFloat32Ptr)))) + } + data[i] = 0x35 + i++ + i = encodeFixed32Casttype(data, i, uint32(math.Float32bits(float32(m.MyFloat32)))) + if m.MyFloat64Ptr != nil { + data[i] = 0x39 + i++ + i = encodeFixed64Casttype(data, i, uint64(math.Float64bits(float64(*m.MyFloat64Ptr)))) + } + data[i] = 0x41 + i++ + i = encodeFixed64Casttype(data, i, uint64(math.Float64bits(float64(m.MyFloat64)))) + if m.MyBytes != nil { + data[i] = 0x4a + i++ + i = encodeVarintCasttype(data, i, uint64(len(m.MyBytes))) + i += copy(data[i:], m.MyBytes) + } + if m.NormalBytes != nil { + data[i] = 0x52 + i++ + i = encodeVarintCasttype(data, i, uint64(len(m.NormalBytes))) + i += copy(data[i:], m.NormalBytes) + } + if len(m.MyUint64S) > 0 { + for _, num := range m.MyUint64S { + data[i] = 0x58 + i++ + i = encodeVarintCasttype(data, i, uint64(num)) + } + } + if len(m.MyMap) > 0 { + for k := range m.MyMap { + data[i] = 0x62 + i++ + v := m.MyMap[k] + mapSize := 1 + len(k) + sovCasttype(uint64(len(k))) + 1 + sovCasttype(uint64(v)) + i = encodeVarintCasttype(data, i, uint64(mapSize)) + data[i] = 0xa + i++ + i = encodeVarintCasttype(data, i, uint64(len(k))) + i += copy(data[i:], k) + data[i] = 0x10 + i++ + i = encodeVarintCasttype(data, i, uint64(v)) + } + } + if len(m.MyCustomMap) > 0 { + for k := range m.MyCustomMap { + data[i] = 0x6a + i++ + v := m.MyCustomMap[k] + mapSize := 1 + len(k) + sovCasttype(uint64(len(k))) + 1 + sovCasttype(uint64(v)) + i = encodeVarintCasttype(data, i, uint64(mapSize)) + data[i] = 0xa + i++ + i = encodeVarintCasttype(data, i, uint64(len(k))) + i += copy(data[i:], k) + data[i] = 0x10 + i++ + i = encodeVarintCasttype(data, i, uint64(v)) + } + } + if len(m.MyNullableMap) > 0 { + for k := range m.MyNullableMap { + data[i] = 0x72 + i++ + v := m.MyNullableMap[k] + if v == nil { + return 0, errors.New("proto: map has nil element") + } + msgSize := v.Size() + mapSize := 1 + sovCasttype(uint64(k)) + 1 + msgSize + sovCasttype(uint64(msgSize)) + i = encodeVarintCasttype(data, i, uint64(mapSize)) + data[i] = 0x8 + i++ + i = encodeVarintCasttype(data, i, uint64(k)) + data[i] = 0x12 + i++ + i = encodeVarintCasttype(data, i, uint64(v.Size())) + n1, err := v.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n1 + } + } + if len(m.MyEmbeddedMap) > 0 { + for k := range m.MyEmbeddedMap { + data[i] = 0x7a + i++ + v := m.MyEmbeddedMap[k] + msgSize := (&v).Size() + mapSize := 1 + sovCasttype(uint64(k)) + 1 + msgSize + sovCasttype(uint64(msgSize)) + i = encodeVarintCasttype(data, i, uint64(mapSize)) + data[i] = 0x8 + i++ + i = encodeVarintCasttype(data, i, uint64(k)) + data[i] = 0x12 + i++ + i = encodeVarintCasttype(data, i, uint64((&v).Size())) + n2, err := (&v).MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n2 + } + } + if m.XXX_unrecognized != nil { + i += copy(data[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *Wilson) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *Wilson) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Int64 != nil { + data[i] = 0x8 + i++ + i = encodeVarintCasttype(data, i, uint64(*m.Int64)) + } + if m.XXX_unrecognized != nil { + i += copy(data[i:], m.XXX_unrecognized) + } + return i, nil +} + +func encodeFixed64Casttype(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 encodeFixed32Casttype(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 encodeVarintCasttype(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 NewPopulatedCastaway(r randyCasttype, easy bool) *Castaway { + this := &Castaway{} + if r.Intn(10) != 0 { + v1 := int32(r.Int63()) + if r.Intn(2) == 0 { + v1 *= -1 + } + this.Int32Ptr = &v1 + } + this.Int32 = int32(r.Int63()) + if r.Intn(2) == 0 { + this.Int32 *= -1 + } + if r.Intn(10) != 0 { + v2 := github_com_gogo_protobuf_test_casttype.MyUint64Type(uint64(r.Uint32())) + this.MyUint64Ptr = &v2 + } + this.MyUint64 = github_com_gogo_protobuf_test_casttype.MyUint64Type(uint64(r.Uint32())) + if r.Intn(10) != 0 { + v3 := github_com_gogo_protobuf_test_casttype.MyFloat32Type(r.Float32()) + if r.Intn(2) == 0 { + v3 *= -1 + } + this.MyFloat32Ptr = &v3 + } + this.MyFloat32 = github_com_gogo_protobuf_test_casttype.MyFloat32Type(r.Float32()) + if r.Intn(2) == 0 { + this.MyFloat32 *= -1 + } + if r.Intn(10) != 0 { + v4 := github_com_gogo_protobuf_test_casttype.MyFloat64Type(r.Float64()) + if r.Intn(2) == 0 { + v4 *= -1 + } + this.MyFloat64Ptr = &v4 + } + this.MyFloat64 = github_com_gogo_protobuf_test_casttype.MyFloat64Type(r.Float64()) + if r.Intn(2) == 0 { + this.MyFloat64 *= -1 + } + if r.Intn(10) != 0 { + v5 := r.Intn(100) + this.MyBytes = make(github_com_gogo_protobuf_test_casttype.Bytes, v5) + for i := 0; i < v5; i++ { + this.MyBytes[i] = byte(r.Intn(256)) + } + } + if r.Intn(10) != 0 { + v6 := r.Intn(100) + this.NormalBytes = make([]byte, v6) + for i := 0; i < v6; i++ { + this.NormalBytes[i] = byte(r.Intn(256)) + } + } + if r.Intn(10) != 0 { + v7 := r.Intn(10) + this.MyUint64S = make([]github_com_gogo_protobuf_test_casttype.MyUint64Type, v7) + for i := 0; i < v7; i++ { + this.MyUint64S[i] = github_com_gogo_protobuf_test_casttype.MyUint64Type(uint64(r.Uint32())) + } + } + if r.Intn(10) != 0 { + v8 := r.Intn(10) + this.MyMap = make(github_com_gogo_protobuf_test_casttype.MyMapType) + for i := 0; i < v8; i++ { + v9 := randStringCasttype(r) + this.MyMap[v9] = uint64(uint64(r.Uint32())) + } + } + if r.Intn(10) != 0 { + v10 := r.Intn(10) + this.MyCustomMap = make(map[github_com_gogo_protobuf_test_casttype.MyStringType]github_com_gogo_protobuf_test_casttype.MyUint64Type) + for i := 0; i < v10; i++ { + v11 := github_com_gogo_protobuf_test_casttype.MyStringType(randStringCasttype(r)) + this.MyCustomMap[v11] = github_com_gogo_protobuf_test_casttype.MyUint64Type(uint64(r.Uint32())) + } + } + if r.Intn(10) != 0 { + v12 := r.Intn(10) + this.MyNullableMap = make(map[github_com_gogo_protobuf_test_casttype.MyInt32Type]*Wilson) + for i := 0; i < v12; i++ { + this.MyNullableMap[github_com_gogo_protobuf_test_casttype.MyInt32Type(int32(r.Int31()))] = NewPopulatedWilson(r, easy) + } + } + if r.Intn(10) != 0 { + v13 := r.Intn(10) + this.MyEmbeddedMap = make(map[github_com_gogo_protobuf_test_casttype.MyInt32Type]Wilson) + for i := 0; i < v13; i++ { + this.MyEmbeddedMap[github_com_gogo_protobuf_test_casttype.MyInt32Type(int32(r.Int31()))] = *NewPopulatedWilson(r, easy) + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedCasttype(r, 16) + } + return this +} + +func NewPopulatedWilson(r randyCasttype, easy bool) *Wilson { + this := &Wilson{} + if r.Intn(10) != 0 { + v14 := int64(r.Int63()) + if r.Intn(2) == 0 { + v14 *= -1 + } + this.Int64 = &v14 + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedCasttype(r, 2) + } + return this +} + +type randyCasttype interface { + Float32() float32 + Float64() float64 + Int63() int64 + Int31() int32 + Uint32() uint32 + Intn(n int) int +} + +func randUTF8RuneCasttype(r randyCasttype) 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 randStringCasttype(r randyCasttype) string { + v15 := r.Intn(100) + tmps := make([]rune, v15) + for i := 0; i < v15; i++ { + tmps[i] = randUTF8RuneCasttype(r) + } + return string(tmps) +} +func randUnrecognizedCasttype(r randyCasttype, 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 = randFieldCasttype(data, r, fieldNumber, wire) + } + return data +} +func randFieldCasttype(data []byte, r randyCasttype, fieldNumber int, wire int) []byte { + key := uint32(fieldNumber)<<3 | uint32(wire) + switch wire { + case 0: + data = encodeVarintPopulateCasttype(data, uint64(key)) + v16 := r.Int63() + if r.Intn(2) == 0 { + v16 *= -1 + } + data = encodeVarintPopulateCasttype(data, uint64(v16)) + case 1: + data = encodeVarintPopulateCasttype(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 = encodeVarintPopulateCasttype(data, uint64(key)) + ll := r.Intn(100) + data = encodeVarintPopulateCasttype(data, uint64(ll)) + for j := 0; j < ll; j++ { + data = append(data, byte(r.Intn(256))) + } + default: + data = encodeVarintPopulateCasttype(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 encodeVarintPopulateCasttype(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 *Castaway) Size() (n int) { + var l int + _ = l + if m.Int32Ptr != nil { + n += 1 + sovCasttype(uint64(*m.Int32Ptr)) + } + n += 1 + sovCasttype(uint64(m.Int32)) + if m.MyUint64Ptr != nil { + n += 1 + sovCasttype(uint64(*m.MyUint64Ptr)) + } + n += 1 + sovCasttype(uint64(m.MyUint64)) + if m.MyFloat32Ptr != nil { + n += 5 + } + n += 5 + if m.MyFloat64Ptr != nil { + n += 9 + } + n += 9 + if m.MyBytes != nil { + l = len(m.MyBytes) + n += 1 + l + sovCasttype(uint64(l)) + } + if m.NormalBytes != nil { + l = len(m.NormalBytes) + n += 1 + l + sovCasttype(uint64(l)) + } + if len(m.MyUint64S) > 0 { + for _, e := range m.MyUint64S { + n += 1 + sovCasttype(uint64(e)) + } + } + if len(m.MyMap) > 0 { + for k, v := range m.MyMap { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovCasttype(uint64(len(k))) + 1 + sovCasttype(uint64(v)) + n += mapEntrySize + 1 + sovCasttype(uint64(mapEntrySize)) + } + } + if len(m.MyCustomMap) > 0 { + for k, v := range m.MyCustomMap { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovCasttype(uint64(len(k))) + 1 + sovCasttype(uint64(v)) + n += mapEntrySize + 1 + sovCasttype(uint64(mapEntrySize)) + } + } + if len(m.MyNullableMap) > 0 { + for k, v := range m.MyNullableMap { + _ = k + _ = v + l = 0 + if v != nil { + l = v.Size() + } + mapEntrySize := 1 + sovCasttype(uint64(k)) + 1 + l + sovCasttype(uint64(l)) + n += mapEntrySize + 1 + sovCasttype(uint64(mapEntrySize)) + } + } + if len(m.MyEmbeddedMap) > 0 { + for k, v := range m.MyEmbeddedMap { + _ = k + _ = v + l = v.Size() + mapEntrySize := 1 + sovCasttype(uint64(k)) + 1 + l + sovCasttype(uint64(l)) + n += mapEntrySize + 1 + sovCasttype(uint64(mapEntrySize)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *Wilson) Size() (n int) { + var l int + _ = l + if m.Int64 != nil { + n += 1 + sovCasttype(uint64(*m.Int64)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func sovCasttype(x uint64) (n int) { + for { + n++ + x >>= 7 + if x == 0 { + break + } + } + return n +} +func sozCasttype(x uint64) (n int) { + return sovCasttype(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (this *Castaway) String() string { + if this == nil { + return "nil" + } + keysForMyMap := make([]string, 0, len(this.MyMap)) + for k := range this.MyMap { + keysForMyMap = append(keysForMyMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForMyMap) + mapStringForMyMap := "github_com_gogo_protobuf_test_casttype.MyMapType{" + for _, k := range keysForMyMap { + mapStringForMyMap += fmt.Sprintf("%v: %v,", k, this.MyMap[k]) + } + mapStringForMyMap += "}" + keysForMyCustomMap := make([]string, 0, len(this.MyCustomMap)) + for k := range this.MyCustomMap { + keysForMyCustomMap = append(keysForMyCustomMap, string(k)) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForMyCustomMap) + mapStringForMyCustomMap := "map[github_com_gogo_protobuf_test_casttype.MyStringType]github_com_gogo_protobuf_test_casttype.MyUint64Type{" + for _, k := range keysForMyCustomMap { + mapStringForMyCustomMap += fmt.Sprintf("%v: %v,", k, this.MyCustomMap[github_com_gogo_protobuf_test_casttype.MyStringType(k)]) + } + mapStringForMyCustomMap += "}" + keysForMyNullableMap := make([]int32, 0, len(this.MyNullableMap)) + for k := range this.MyNullableMap { + keysForMyNullableMap = append(keysForMyNullableMap, int32(k)) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForMyNullableMap) + mapStringForMyNullableMap := "map[github_com_gogo_protobuf_test_casttype.MyInt32Type]*Wilson{" + for _, k := range keysForMyNullableMap { + mapStringForMyNullableMap += fmt.Sprintf("%v: %v,", k, this.MyNullableMap[github_com_gogo_protobuf_test_casttype.MyInt32Type(k)]) + } + mapStringForMyNullableMap += "}" + keysForMyEmbeddedMap := make([]int32, 0, len(this.MyEmbeddedMap)) + for k := range this.MyEmbeddedMap { + keysForMyEmbeddedMap = append(keysForMyEmbeddedMap, int32(k)) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForMyEmbeddedMap) + mapStringForMyEmbeddedMap := "map[github_com_gogo_protobuf_test_casttype.MyInt32Type]Wilson{" + for _, k := range keysForMyEmbeddedMap { + mapStringForMyEmbeddedMap += fmt.Sprintf("%v: %v,", k, this.MyEmbeddedMap[github_com_gogo_protobuf_test_casttype.MyInt32Type(k)]) + } + mapStringForMyEmbeddedMap += "}" + s := strings.Join([]string{`&Castaway{`, + `Int32Ptr:` + valueToStringCasttype(this.Int32Ptr) + `,`, + `Int32:` + fmt.Sprintf("%v", this.Int32) + `,`, + `MyUint64Ptr:` + valueToStringCasttype(this.MyUint64Ptr) + `,`, + `MyUint64:` + fmt.Sprintf("%v", this.MyUint64) + `,`, + `MyFloat32Ptr:` + valueToStringCasttype(this.MyFloat32Ptr) + `,`, + `MyFloat32:` + fmt.Sprintf("%v", this.MyFloat32) + `,`, + `MyFloat64Ptr:` + valueToStringCasttype(this.MyFloat64Ptr) + `,`, + `MyFloat64:` + fmt.Sprintf("%v", this.MyFloat64) + `,`, + `MyBytes:` + valueToStringCasttype(this.MyBytes) + `,`, + `NormalBytes:` + valueToStringCasttype(this.NormalBytes) + `,`, + `MyUint64S:` + fmt.Sprintf("%v", this.MyUint64S) + `,`, + `MyMap:` + mapStringForMyMap + `,`, + `MyCustomMap:` + mapStringForMyCustomMap + `,`, + `MyNullableMap:` + mapStringForMyNullableMap + `,`, + `MyEmbeddedMap:` + mapStringForMyEmbeddedMap + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *Wilson) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&Wilson{`, + `Int64:` + valueToStringCasttype(this.Int64) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func valueToStringCasttype(v interface{}) string { + rv := reflect.ValueOf(v) + if rv.IsNil() { + return "nil" + } + pv := reflect.Indirect(rv).Interface() + return fmt.Sprintf("*%v", pv) +} +func (m *Castaway) 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 ErrIntOverflowCasttype + } + 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: Castaway: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Castaway: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Int32Ptr", wireType) + } + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCasttype + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Int32Ptr = &v + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Int32", wireType) + } + m.Int32 = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCasttype + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + m.Int32 |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field MyUint64Ptr", wireType) + } + var v github_com_gogo_protobuf_test_casttype.MyUint64Type + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCasttype + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (github_com_gogo_protobuf_test_casttype.MyUint64Type(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.MyUint64Ptr = &v + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field MyUint64", wireType) + } + m.MyUint64 = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCasttype + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + m.MyUint64 |= (github_com_gogo_protobuf_test_casttype.MyUint64Type(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + case 5: + if wireType != 5 { + return fmt.Errorf("proto: wrong wireType = %d for field MyFloat32Ptr", wireType) + } + var v uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + iNdEx += 4 + v = uint32(data[iNdEx-4]) + v |= uint32(data[iNdEx-3]) << 8 + v |= uint32(data[iNdEx-2]) << 16 + v |= uint32(data[iNdEx-1]) << 24 + v2 := github_com_gogo_protobuf_test_casttype.MyFloat32Type(math.Float32frombits(v)) + m.MyFloat32Ptr = &v2 + case 6: + if wireType != 5 { + return fmt.Errorf("proto: wrong wireType = %d for field MyFloat32", wireType) + } + var v uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + iNdEx += 4 + v = uint32(data[iNdEx-4]) + v |= uint32(data[iNdEx-3]) << 8 + v |= uint32(data[iNdEx-2]) << 16 + v |= uint32(data[iNdEx-1]) << 24 + m.MyFloat32 = github_com_gogo_protobuf_test_casttype.MyFloat32Type(math.Float32frombits(v)) + case 7: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field MyFloat64Ptr", 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 := github_com_gogo_protobuf_test_casttype.MyFloat64Type(math.Float64frombits(v)) + m.MyFloat64Ptr = &v2 + case 8: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field MyFloat64", 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.MyFloat64 = github_com_gogo_protobuf_test_casttype.MyFloat64Type(math.Float64frombits(v)) + case 9: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MyBytes", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCasttype + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthCasttype + } + postIndex := iNdEx + byteLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.MyBytes = append(m.MyBytes[:0], data[iNdEx:postIndex]...) + if m.MyBytes == nil { + m.MyBytes = []byte{} + } + iNdEx = postIndex + case 10: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NormalBytes", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCasttype + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthCasttype + } + postIndex := iNdEx + byteLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.NormalBytes = append(m.NormalBytes[:0], data[iNdEx:postIndex]...) + if m.NormalBytes == nil { + m.NormalBytes = []byte{} + } + iNdEx = postIndex + case 11: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field MyUint64S", wireType) + } + var v github_com_gogo_protobuf_test_casttype.MyUint64Type + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCasttype + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (github_com_gogo_protobuf_test_casttype.MyUint64Type(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.MyUint64S = append(m.MyUint64S, v) + case 12: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MyMap", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCasttype + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthCasttype + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var keykey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCasttype + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + keykey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var stringLenmapkey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCasttype + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLenmapkey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapkey := int(stringLenmapkey) + if intStringLenmapkey < 0 { + return ErrInvalidLengthCasttype + } + postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey > l { + return io.ErrUnexpectedEOF + } + mapkey := string(data[iNdEx:postStringIndexmapkey]) + iNdEx = postStringIndexmapkey + var valuekey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCasttype + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + valuekey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapvalue uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCasttype + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + mapvalue |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if m.MyMap == nil { + m.MyMap = make(github_com_gogo_protobuf_test_casttype.MyMapType) + } + m.MyMap[mapkey] = mapvalue + iNdEx = postIndex + case 13: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MyCustomMap", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCasttype + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthCasttype + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var keykey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCasttype + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + keykey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var stringLenmapkey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCasttype + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLenmapkey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapkey := int(stringLenmapkey) + if intStringLenmapkey < 0 { + return ErrInvalidLengthCasttype + } + postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey > l { + return io.ErrUnexpectedEOF + } + mapkey := github_com_gogo_protobuf_test_casttype.MyStringType(data[iNdEx:postStringIndexmapkey]) + iNdEx = postStringIndexmapkey + var valuekey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCasttype + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + valuekey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapvalue uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCasttype + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + mapvalue |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if m.MyCustomMap == nil { + m.MyCustomMap = make(map[github_com_gogo_protobuf_test_casttype.MyStringType]github_com_gogo_protobuf_test_casttype.MyUint64Type) + } + m.MyCustomMap[github_com_gogo_protobuf_test_casttype.MyStringType(mapkey)] = ((github_com_gogo_protobuf_test_casttype.MyUint64Type)(mapvalue)) + iNdEx = postIndex + case 14: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MyNullableMap", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCasttype + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthCasttype + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var keykey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCasttype + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + keykey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapkey int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCasttype + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + mapkey |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var valuekey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCasttype + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + valuekey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapmsglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCasttype + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + mapmsglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if mapmsglen < 0 { + return ErrInvalidLengthCasttype + } + postmsgIndex := iNdEx + mapmsglen + if mapmsglen < 0 { + return ErrInvalidLengthCasttype + } + if postmsgIndex > l { + return io.ErrUnexpectedEOF + } + mapvalue := &Wilson{} + if err := mapvalue.Unmarshal(data[iNdEx:postmsgIndex]); err != nil { + return err + } + iNdEx = postmsgIndex + if m.MyNullableMap == nil { + m.MyNullableMap = make(map[github_com_gogo_protobuf_test_casttype.MyInt32Type]*Wilson) + } + m.MyNullableMap[github_com_gogo_protobuf_test_casttype.MyInt32Type(mapkey)] = mapvalue + iNdEx = postIndex + case 15: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MyEmbeddedMap", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCasttype + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthCasttype + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var keykey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCasttype + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + keykey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapkey int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCasttype + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + mapkey |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var valuekey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCasttype + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + valuekey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapmsglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCasttype + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + mapmsglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if mapmsglen < 0 { + return ErrInvalidLengthCasttype + } + postmsgIndex := iNdEx + mapmsglen + if mapmsglen < 0 { + return ErrInvalidLengthCasttype + } + if postmsgIndex > l { + return io.ErrUnexpectedEOF + } + mapvalue := &Wilson{} + if err := mapvalue.Unmarshal(data[iNdEx:postmsgIndex]); err != nil { + return err + } + iNdEx = postmsgIndex + if m.MyEmbeddedMap == nil { + m.MyEmbeddedMap = make(map[github_com_gogo_protobuf_test_casttype.MyInt32Type]Wilson) + } + m.MyEmbeddedMap[github_com_gogo_protobuf_test_casttype.MyInt32Type(mapkey)] = *mapvalue + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipCasttype(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthCasttype + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Wilson) 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 ErrIntOverflowCasttype + } + 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: Wilson: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Wilson: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Int64", wireType) + } + var v int64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCasttype + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Int64 = &v + default: + iNdEx = preIndex + skippy, err := skipCasttype(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthCasttype + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipCasttype(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, ErrIntOverflowCasttype + } + 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, ErrIntOverflowCasttype + } + 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, ErrIntOverflowCasttype + } + 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, ErrInvalidLengthCasttype + } + return iNdEx, nil + case 3: + for { + var innerWire uint64 + var start int = iNdEx + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowCasttype + } + 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 := skipCasttype(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 ( + ErrInvalidLengthCasttype = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowCasttype = fmt.Errorf("proto: integer overflow") +) + +var fileDescriptorCasttype = []byte{ + // 668 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xa4, 0x95, 0xcd, 0x4f, 0xd4, 0x4e, + 0x18, 0xc7, 0xb7, 0x2c, 0x85, 0x76, 0xba, 0xfb, 0xfb, 0x91, 0x89, 0x87, 0x66, 0x13, 0x0b, 0x81, + 0x60, 0x3c, 0xe8, 0x2e, 0x59, 0x36, 0x48, 0xd0, 0x78, 0x28, 0xc1, 0x04, 0x63, 0x89, 0xa9, 0x12, + 0xa2, 0xf1, 0xd2, 0x42, 0x5d, 0x1a, 0xfb, 0x42, 0xb6, 0xb3, 0x9a, 0xde, 0x88, 0x1e, 0x4c, 0xfc, + 0x0b, 0xfc, 0x13, 0x3c, 0x7a, 0x31, 0xf1, 0xe8, 0x71, 0x8f, 0x1c,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1, 0x04, 0xec, 0x14, 0xec, 0x0c, + 0x6c, 0xf7, 0x58, 0x13, 0xbe, 0x80, 0x7d, 0x05, 0xfb, 0x0e, 0xf6, 0x03, 0x6c, 0x00, 0xb6, 0x07, + 0x76, 0x08, 0x76, 0x72, 0xac, 0x55, 0x4e, 0xa1, 0x3d, 0x83, 0x76, 0xf7, 0x97, 0x56, 0xf9, 0x13, + 0x00, 0x00, 0xff, 0xff, 0x22, 0x3b, 0x52, 0x73, 0x5e, 0x07, 0x00, 0x00, +} diff --git a/vendor/github.com/gogo/protobuf/test/casttype/combos/both/casttype.proto b/vendor/github.com/gogo/protobuf/test/casttype/combos/both/casttype.proto new file mode 100644 index 000000000..02d207fa1 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/casttype/combos/both/casttype.proto @@ -0,0 +1,77 @@ +// Copyright (c) 2015, Vastech SA (PTY) LTD. All rights reserved. +// http://github.com/gogo/protobuf/gogoproto +// +// 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 casttype; + +import "github.com/gogo/protobuf/gogoproto/gogo.proto"; + +option (gogoproto.goproto_stringer_all) = false; +option (gogoproto.goproto_enum_prefix_all) = false; +option (gogoproto.goproto_getters_all) = false; + +option (gogoproto.equal_all) = true; +option (gogoproto.verbose_equal_all) = true; +option (gogoproto.stringer_all) = true; +option (gogoproto.gostring_all) = true; +option (gogoproto.face_all) = true; +option (gogoproto.description_all) = true; + +option (gogoproto.testgen_all) = true; +option (gogoproto.populate_all) = true; +option (gogoproto.benchgen_all) = true; +option (gogoproto.unmarshaler_all) = true; +option (gogoproto.marshaler_all) = true; +option (gogoproto.sizer_all) = true; + +option (gogoproto.goproto_enum_stringer_all) = false; +option (gogoproto.enum_stringer_all) = true; + +option (gogoproto.unsafe_marshaler_all) = false; +option (gogoproto.unsafe_unmarshaler_all) = false; + +message Castaway { + optional int64 Int32Ptr = 1 [(gogoproto.casttype) = "int32"]; + optional int64 Int32 = 2 [(gogoproto.casttype) = "int32", (gogoproto.nullable) = false]; + optional uint64 MyUint64Ptr = 3 [(gogoproto.casttype) = "github.com/gogo/protobuf/test/casttype.MyUint64Type"]; + optional uint64 MyUint64 = 4 [(gogoproto.casttype) = "github.com/gogo/protobuf/test/casttype.MyUint64Type", (gogoproto.nullable) = false]; + optional float MyFloat32Ptr = 5 [(gogoproto.casttype) = "github.com/gogo/protobuf/test/casttype.MyFloat32Type"]; + optional float MyFloat32 = 6 [(gogoproto.casttype) = "github.com/gogo/protobuf/test/casttype.MyFloat32Type", (gogoproto.nullable) = false]; + optional double MyFloat64Ptr = 7 [(gogoproto.casttype) = "github.com/gogo/protobuf/test/casttype.MyFloat64Type"]; + optional double MyFloat64 = 8 [(gogoproto.casttype) = "github.com/gogo/protobuf/test/casttype.MyFloat64Type", (gogoproto.nullable) = false]; + optional bytes MyBytes = 9 [(gogoproto.casttype) = "github.com/gogo/protobuf/test/casttype.Bytes"]; + optional bytes NormalBytes = 10; + repeated uint64 MyUint64s = 11 [(gogoproto.casttype) = "github.com/gogo/protobuf/test/casttype.MyUint64Type"]; + map MyMap = 12 [(gogoproto.casttype) = "github.com/gogo/protobuf/test/casttype.MyMapType"]; + map MyCustomMap = 13 [(gogoproto.castkey) = "github.com/gogo/protobuf/test/casttype.MyStringType", (gogoproto.castvalue) = "github.com/gogo/protobuf/test/casttype.MyUint64Type"]; + map MyNullableMap = 14 [(gogoproto.castkey) = "github.com/gogo/protobuf/test/casttype.MyInt32Type"]; + map MyEmbeddedMap = 15 [(gogoproto.castkey) = "github.com/gogo/protobuf/test/casttype.MyInt32Type", (gogoproto.nullable) = false]; +} + +message Wilson { + optional int64 Int64 = 1; +} diff --git a/vendor/github.com/gogo/protobuf/test/casttype/combos/both/casttypepb_test.go b/vendor/github.com/gogo/protobuf/test/casttype/combos/both/casttypepb_test.go new file mode 100644 index 000000000..813ff3188 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/casttype/combos/both/casttypepb_test.go @@ -0,0 +1,513 @@ +// Code generated by protoc-gen-gogo. +// source: combos/both/casttype.proto +// DO NOT EDIT! + +/* +Package casttype is a generated protocol buffer package. + +It is generated from these files: + combos/both/casttype.proto + +It has these top-level messages: + Castaway + Wilson +*/ +package casttype + +import testing "testing" +import math_rand "math/rand" +import time "time" +import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" +import github_com_gogo_protobuf_jsonpb "github.com/gogo/protobuf/jsonpb" +import fmt "fmt" +import go_parser "go/parser" +import proto "github.com/gogo/protobuf/proto" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +func TestCastawayProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCastaway(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Castaway{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestCastawayMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCastaway(popr, false) + size := p.Size() + data := make([]byte, size) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(data) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Castaway{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkCastawayProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Castaway, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedCastaway(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkCastawayProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedCastaway(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &Castaway{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestWilsonProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedWilson(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Wilson{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestWilsonMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedWilson(popr, false) + size := p.Size() + data := make([]byte, size) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(data) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Wilson{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkWilsonProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Wilson, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedWilson(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkWilsonProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedWilson(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &Wilson{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestCastawayJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCastaway(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Castaway{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestWilsonJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedWilson(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Wilson{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestCastawayProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCastaway(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &Castaway{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestCastawayProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCastaway(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &Castaway{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestWilsonProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedWilson(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &Wilson{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestWilsonProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedWilson(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &Wilson{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestCasttypeDescription(t *testing.T) { + CasttypeDescription() +} +func TestCastawayVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCastaway(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &Castaway{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestWilsonVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedWilson(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &Wilson{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestCastawayFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCastaway(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestWilsonFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedWilson(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestCastawayGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCastaway(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestWilsonGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedWilson(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestCastawaySize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCastaway(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkCastawaySize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Castaway, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedCastaway(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestWilsonSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedWilson(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkWilsonSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Wilson, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedWilson(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestCastawayStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCastaway(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestWilsonStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedWilson(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} + +//These tests are generated by github.com/gogo/protobuf/plugin/testgen diff --git a/vendor/github.com/gogo/protobuf/test/casttype/combos/marshaler/casttype.pb.go b/vendor/github.com/gogo/protobuf/test/casttype/combos/marshaler/casttype.pb.go new file mode 100644 index 000000000..95d3262c6 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/casttype/combos/marshaler/casttype.pb.go @@ -0,0 +1,1550 @@ +// Code generated by protoc-gen-gogo. +// source: combos/marshaler/casttype.proto +// DO NOT EDIT! + +/* +Package casttype is a generated protocol buffer package. + +It is generated from these files: + combos/marshaler/casttype.proto + +It has these top-level messages: + Castaway + Wilson +*/ +package casttype + +import proto "github.com/gogo/protobuf/proto" +import fmt "fmt" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" + +import github_com_gogo_protobuf_test_casttype "github.com/gogo/protobuf/test/casttype" + +import github_com_gogo_protobuf_protoc_gen_gogo_descriptor "github.com/gogo/protobuf/protoc-gen-gogo/descriptor" +import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" +import compress_gzip "compress/gzip" +import bytes "bytes" +import io_ioutil "io/ioutil" + +import strings "strings" +import sort "sort" +import strconv "strconv" +import reflect "reflect" +import github_com_gogo_protobuf_sortkeys "github.com/gogo/protobuf/sortkeys" + +import errors "errors" + +// 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. +const _ = proto.GoGoProtoPackageIsVersion1 + +type Castaway struct { + Int32Ptr *int32 `protobuf:"varint,1,opt,name=Int32Ptr,json=int32Ptr,casttype=int32" json:"Int32Ptr,omitempty"` + Int32 int32 `protobuf:"varint,2,opt,name=Int32,json=int32,casttype=int32" json:"Int32"` + MyUint64Ptr *github_com_gogo_protobuf_test_casttype.MyUint64Type `protobuf:"varint,3,opt,name=MyUint64Ptr,json=myUint64Ptr,casttype=github.com/gogo/protobuf/test/casttype.MyUint64Type" json:"MyUint64Ptr,omitempty"` + MyUint64 github_com_gogo_protobuf_test_casttype.MyUint64Type `protobuf:"varint,4,opt,name=MyUint64,json=myUint64,casttype=github.com/gogo/protobuf/test/casttype.MyUint64Type" json:"MyUint64"` + MyFloat32Ptr *github_com_gogo_protobuf_test_casttype.MyFloat32Type `protobuf:"fixed32,5,opt,name=MyFloat32Ptr,json=myFloat32Ptr,casttype=github.com/gogo/protobuf/test/casttype.MyFloat32Type" json:"MyFloat32Ptr,omitempty"` + MyFloat32 github_com_gogo_protobuf_test_casttype.MyFloat32Type `protobuf:"fixed32,6,opt,name=MyFloat32,json=myFloat32,casttype=github.com/gogo/protobuf/test/casttype.MyFloat32Type" json:"MyFloat32"` + MyFloat64Ptr *github_com_gogo_protobuf_test_casttype.MyFloat64Type `protobuf:"fixed64,7,opt,name=MyFloat64Ptr,json=myFloat64Ptr,casttype=github.com/gogo/protobuf/test/casttype.MyFloat64Type" json:"MyFloat64Ptr,omitempty"` + MyFloat64 github_com_gogo_protobuf_test_casttype.MyFloat64Type `protobuf:"fixed64,8,opt,name=MyFloat64,json=myFloat64,casttype=github.com/gogo/protobuf/test/casttype.MyFloat64Type" json:"MyFloat64"` + MyBytes github_com_gogo_protobuf_test_casttype.Bytes `protobuf:"bytes,9,opt,name=MyBytes,json=myBytes,casttype=github.com/gogo/protobuf/test/casttype.Bytes" json:"MyBytes,omitempty"` + NormalBytes []byte `protobuf:"bytes,10,opt,name=NormalBytes,json=normalBytes" json:"NormalBytes,omitempty"` + MyUint64S []github_com_gogo_protobuf_test_casttype.MyUint64Type `protobuf:"varint,11,rep,name=MyUint64s,json=myUint64s,casttype=github.com/gogo/protobuf/test/casttype.MyUint64Type" json:"MyUint64s,omitempty"` + MyMap github_com_gogo_protobuf_test_casttype.MyMapType `protobuf:"bytes,12,rep,name=MyMap,json=myMap,casttype=github.com/gogo/protobuf/test/casttype.MyMapType" json:"MyMap,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"varint,2,opt,name=value"` + MyCustomMap map[github_com_gogo_protobuf_test_casttype.MyStringType]github_com_gogo_protobuf_test_casttype.MyUint64Type `protobuf:"bytes,13,rep,name=MyCustomMap,json=myCustomMap,castkey=github.com/gogo/protobuf/test/casttype.MyStringType,castvalue=github.com/gogo/protobuf/test/casttype.MyUint64Type" json:"MyCustomMap,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"varint,2,opt,name=value"` + MyNullableMap map[github_com_gogo_protobuf_test_casttype.MyInt32Type]*Wilson `protobuf:"bytes,14,rep,name=MyNullableMap,json=myNullableMap,castkey=github.com/gogo/protobuf/test/casttype.MyInt32Type" json:"MyNullableMap,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + MyEmbeddedMap map[github_com_gogo_protobuf_test_casttype.MyInt32Type]Wilson `protobuf:"bytes,15,rep,name=MyEmbeddedMap,json=myEmbeddedMap,castkey=github.com/gogo/protobuf/test/casttype.MyInt32Type" json:"MyEmbeddedMap" protobuf_key:"varint,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *Castaway) Reset() { *m = Castaway{} } +func (*Castaway) ProtoMessage() {} +func (*Castaway) Descriptor() ([]byte, []int) { return fileDescriptorCasttype, []int{0} } + +type Wilson struct { + Int64 *int64 `protobuf:"varint,1,opt,name=Int64,json=int64" json:"Int64,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *Wilson) Reset() { *m = Wilson{} } +func (*Wilson) ProtoMessage() {} +func (*Wilson) Descriptor() ([]byte, []int) { return fileDescriptorCasttype, []int{1} } + +func init() { + proto.RegisterType((*Castaway)(nil), "casttype.Castaway") + proto.RegisterType((*Wilson)(nil), "casttype.Wilson") +} +func (this *Castaway) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return CasttypeDescription() +} +func (this *Wilson) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return CasttypeDescription() +} +func CasttypeDescription() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + d := &github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet{} + var gzipped = []byte{ + // 3789 bytes of a gzipped FileDescriptorSet + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xcc, 0x5a, 0x5b, 0x6c, 0x1b, 0x67, + 0x76, 0x36, 0x6f, 0x12, 0x79, 0x48, 0x51, 0xd4, 0x48, 0xb1, 0x69, 0x6d, 0x6c, 0xd9, 0x72, 0x2e, + 0x5e, 0xef, 0xae, 0xe4, 0x3a, 0x8e, 0xed, 0xd0, 0xdb, 0x2c, 0x44, 0x89, 0xd6, 0xd2, 0xd0, 0xad, + 0x23, 0x71, 0x6d, 0xa7, 0x05, 0x06, 0x23, 0x72, 0x44, 0xd1, 0x1e, 0xce, 0xb0, 0x9c, 0xa1, 0x6d, + 0xed, 0x53, 0x5a, 0xb7, 0x5d, 0x6c, 0x8b, 0xde, 0x0b, 0x34, 0x9b, 0xcd, 0x6e, 0x9b, 0x00, 0x6d, + 0xd2, 0xf4, 0x96, 0xb4, 0x4d, 0x51, 0xf4, 0x29, 0x40, 0x91, 0x36, 0x4f, 0x45, 0xda, 0xa7, 0x3e, + 0x14, 0x49, 0x73, 0x01, 0x9a, 0xb6, 0x69, 0x9b, 0x02, 0x06, 0x1a, 0x34, 0x2f, 0x3d, 0xe7, 0xbf, + 0x0c, 0x87, 0x17, 0x69, 0x28, 0x05, 0x69, 0x2a, 0x80, 0x10, 0xe7, 0xfc, 0xe7,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6, 0x80, 0x83, 0x7a, 0x43, 0x2a, + 0x7a, 0xa0, 0x90, 0xba, 0x0e, 0xa3, 0x9e, 0x49, 0x5a, 0x53, 0xb7, 0xaa, 0x32, 0x36, 0x67, 0x83, + 0x2c, 0x99, 0x29, 0x48, 0x9c, 0x4a, 0x30, 0x35, 0x6d, 0x74, 0x5c, 0x2b, 0x0b, 0x00, 0xb6, 0x65, + 0xd8, 0x5b, 0xb8, 0xbc, 0xca, 0x26, 0xc6, 0x49, 0x7f, 0x2f, 0xad, 0x92, 0x4a, 0x8f, 0x97, 0x6c, + 0x2e, 0x2d, 0x9b, 0xca, 0x13, 0xed, 0x50, 0x1b, 0xde, 0x25, 0x52, 0x96, 0xf9, 0x22, 0xeb, 0x89, + 0xb6, 0x12, 0xa4, 0x9b, 0x06, 0xc5, 0x3d, 0xba, 0x98, 0x3f, 0x59, 0x82, 0x19, 0x31, 0x13, 0xf8, + 0x64, 0xaa, 0x80, 0xf1, 0x07, 0x1b, 0x69, 0xfa, 0x2f, 0x95, 0x53, 0xe0, 0x09, 0x34, 0x16, 0x56, + 0xc0, 0xb2, 0x50, 0x4a, 0x0a, 0x57, 0x50, 0x36, 0x79, 0x09, 0xd2, 0x9d, 0xee, 0x51, 0x26, 0x20, + 0xe6, 0xb8, 0x7a, 0xd3, 0x65, 0x51, 0x18, 0x53, 0xf9, 0x85, 0x92, 0x81, 0x08, 0x26, 0x19, 0x96, + 0xe5, 0x62, 0x2a, 0x7d, 0x9d, 0xbc, 0x08, 0x23, 0x1d, 0xb7, 0x1f, 0x14, 0x38, 0xfd, 0xcc, 0x10, + 0x4c, 0xf4, 0x8b, 0xb9, 0xbe, 0xe1, 0x8f, 0xcb, 0x07, 0x23, 0x60, 0xd3, 0x68, 0x62, 0xdc, 0x11, + 0x83, 0xb8, 0xc2, 0x88, 0x8a, 0x99, 0xfa, 0xa6, 0x61, 0x62, 0x34, 0x85, 0x4e, 0xa7, 0xcf, 0x7d, + 0x65, 0xa0, 0xa8, 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xd8, 0x8d, 0x96, 0x49, 0x39, 0x3a, 0x98, 0xe2, 0xb7, 0x24, 0x85, 0xc4, 0x08, + 0x8a, 0x7d, 0xb8, 0xf5, 0xb7, 0x25, 0x85, 0xe3, 0xf3, 0xe7, 0x37, 0xe8, 0xac, 0xd7, 0xdc, 0xb1, + 0xad, 0x41, 0x8c, 0x78, 0x5e, 0x30, 0x80, 0x80, 0x10, 0xc1, 0x65, 0x48, 0x0c, 0x3a, 0x11, 0xbf, + 0x23, 0xe0, 0x71, 0x43, 0xce, 0x00, 0xae, 0x33, 0x99, 0x64, 0xe8, 0xdd, 0x4a, 0x30, 0xc5, 0xef, + 0x0a, 0x8a, 0xb4, 0x0f, 0x26, 0x1e, 0xc3, 0x35, 0x1c, 0x17, 0xb7, 0xea, 0x03, 0x90, 0xbc, 0x28, + 0x1f, 0x43, 0x40, 0x84, 0x2b, 0x37, 0x0d, 0xab, 0xbc, 0x3d, 0x18, 0xc3, 0x4b, 0xd2, 0x95, 0x12, + 0x43, 0x14, 0x98, 0x79, 0xea, 0x7a, 0x13, 0x37, 0xd7, 0xe6, 0x40, 0xd3, 0xf1, 0x7b, 0x82, 0x23, + 0xe5, 0x81, 0x84, 0x47, 0x5a, 0xd6, 0x7e, 0x68, 0x5e, 0x96, 0x1e, 0xf1, 0xc1, 0xc4, 0xd2, 0xc3, + 0x9d, 0x29, 0x75, 0x12, 0xfb, 0x61, 0xfb, 0x7d, 0xb9, 0xf4, 0x38, 0x76, 0xd9, 0xcf, 0x88, 0x33, + 0xed, 0xe0, 0x16, 0x7c, 0x10, 0x9a, 0x3f, 0x90, 0x33, 0xcd, 0x00, 0x04, 0xbe, 0x01, 0x47, 0xfb, + 0xa6, 0xfa, 0x01, 0xc8, 0xfe, 0x50, 0x90, 0x1d, 0xee, 0x93, 0xee, 0x45, 0x4a, 0xd8, 0x2f, 0xe5, + 0x1f, 0xc9, 0x94, 0x60, 0x74, 0x71, 0xad, 0x51, 0x1b, 0xeb, 0xe8, 0x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 0xfb, 0xc7, 0x0f, 0xfd, 0x6f, + 0x00, 0x00, 0x00, 0xff, 0xff, 0x89, 0x34, 0x8e, 0xb2, 0xd0, 0x31, 0x00, 0x00, + } + r := bytes.NewReader(gzipped) + gzipr, err := compress_gzip.NewReader(r) + if err != nil { + panic(err) + } + ungzipped, err := io_ioutil.ReadAll(gzipr) + if err != nil { + panic(err) + } + if err := github_com_gogo_protobuf_proto.Unmarshal(ungzipped, d); err != nil { + panic(err) + } + return d +} +func (this *Castaway) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*Castaway) + if !ok { + that2, ok := that.(Castaway) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *Castaway") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *Castaway but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *Castaway but is not nil && this == nil") + } + if this.Int32Ptr != nil && that1.Int32Ptr != nil { + if *this.Int32Ptr != *that1.Int32Ptr { + return fmt.Errorf("Int32Ptr this(%v) Not Equal that(%v)", *this.Int32Ptr, *that1.Int32Ptr) + } + } else if this.Int32Ptr != nil { + return fmt.Errorf("this.Int32Ptr == nil && that.Int32Ptr != nil") + } else if that1.Int32Ptr != nil { + return fmt.Errorf("Int32Ptr this(%v) Not Equal that(%v)", this.Int32Ptr, that1.Int32Ptr) + } + if this.Int32 != that1.Int32 { + return fmt.Errorf("Int32 this(%v) Not Equal that(%v)", this.Int32, that1.Int32) + } + if this.MyUint64Ptr != nil && that1.MyUint64Ptr != nil { + if *this.MyUint64Ptr != *that1.MyUint64Ptr { + return fmt.Errorf("MyUint64Ptr this(%v) Not Equal that(%v)", *this.MyUint64Ptr, *that1.MyUint64Ptr) + } + } else if this.MyUint64Ptr != nil { + return fmt.Errorf("this.MyUint64Ptr == nil && that.MyUint64Ptr != nil") + } else if that1.MyUint64Ptr != nil { + return fmt.Errorf("MyUint64Ptr this(%v) Not Equal that(%v)", this.MyUint64Ptr, that1.MyUint64Ptr) + } + if this.MyUint64 != that1.MyUint64 { + return fmt.Errorf("MyUint64 this(%v) Not Equal that(%v)", this.MyUint64, that1.MyUint64) + } + if this.MyFloat32Ptr != nil && that1.MyFloat32Ptr != nil { + if *this.MyFloat32Ptr != *that1.MyFloat32Ptr { + return fmt.Errorf("MyFloat32Ptr this(%v) Not Equal that(%v)", *this.MyFloat32Ptr, *that1.MyFloat32Ptr) + } + } else if this.MyFloat32Ptr != nil { + return fmt.Errorf("this.MyFloat32Ptr == nil && that.MyFloat32Ptr != nil") + } else if that1.MyFloat32Ptr != nil { + return fmt.Errorf("MyFloat32Ptr this(%v) Not Equal that(%v)", this.MyFloat32Ptr, that1.MyFloat32Ptr) + } + if this.MyFloat32 != that1.MyFloat32 { + return fmt.Errorf("MyFloat32 this(%v) Not Equal that(%v)", this.MyFloat32, that1.MyFloat32) + } + if this.MyFloat64Ptr != nil && that1.MyFloat64Ptr != nil { + if *this.MyFloat64Ptr != *that1.MyFloat64Ptr { + return fmt.Errorf("MyFloat64Ptr this(%v) Not Equal that(%v)", *this.MyFloat64Ptr, *that1.MyFloat64Ptr) + } + } else if this.MyFloat64Ptr != nil { + return fmt.Errorf("this.MyFloat64Ptr == nil && that.MyFloat64Ptr != nil") + } else if that1.MyFloat64Ptr != nil { + return fmt.Errorf("MyFloat64Ptr this(%v) Not Equal that(%v)", this.MyFloat64Ptr, that1.MyFloat64Ptr) + } + if this.MyFloat64 != that1.MyFloat64 { + return fmt.Errorf("MyFloat64 this(%v) Not Equal that(%v)", this.MyFloat64, that1.MyFloat64) + } + if !bytes.Equal(this.MyBytes, that1.MyBytes) { + return fmt.Errorf("MyBytes this(%v) Not Equal that(%v)", this.MyBytes, that1.MyBytes) + } + if !bytes.Equal(this.NormalBytes, that1.NormalBytes) { + return fmt.Errorf("NormalBytes this(%v) Not Equal that(%v)", this.NormalBytes, that1.NormalBytes) + } + if len(this.MyUint64S) != len(that1.MyUint64S) { + return fmt.Errorf("MyUint64S this(%v) Not Equal that(%v)", len(this.MyUint64S), len(that1.MyUint64S)) + } + for i := range this.MyUint64S { + if this.MyUint64S[i] != that1.MyUint64S[i] { + return fmt.Errorf("MyUint64S this[%v](%v) Not Equal that[%v](%v)", i, this.MyUint64S[i], i, that1.MyUint64S[i]) + } + } + if len(this.MyMap) != len(that1.MyMap) { + return fmt.Errorf("MyMap this(%v) Not Equal that(%v)", len(this.MyMap), len(that1.MyMap)) + } + for i := range this.MyMap { + if this.MyMap[i] != that1.MyMap[i] { + return fmt.Errorf("MyMap this[%v](%v) Not Equal that[%v](%v)", i, this.MyMap[i], i, that1.MyMap[i]) + } + } + if len(this.MyCustomMap) != len(that1.MyCustomMap) { + return fmt.Errorf("MyCustomMap this(%v) Not Equal that(%v)", len(this.MyCustomMap), len(that1.MyCustomMap)) + } + for i := range this.MyCustomMap { + if this.MyCustomMap[i] != that1.MyCustomMap[i] { + return fmt.Errorf("MyCustomMap this[%v](%v) Not Equal that[%v](%v)", i, this.MyCustomMap[i], i, that1.MyCustomMap[i]) + } + } + if len(this.MyNullableMap) != len(that1.MyNullableMap) { + return fmt.Errorf("MyNullableMap this(%v) Not Equal that(%v)", len(this.MyNullableMap), len(that1.MyNullableMap)) + } + for i := range this.MyNullableMap { + if !this.MyNullableMap[i].Equal(that1.MyNullableMap[i]) { + return fmt.Errorf("MyNullableMap this[%v](%v) Not Equal that[%v](%v)", i, this.MyNullableMap[i], i, that1.MyNullableMap[i]) + } + } + if len(this.MyEmbeddedMap) != len(that1.MyEmbeddedMap) { + return fmt.Errorf("MyEmbeddedMap this(%v) Not Equal that(%v)", len(this.MyEmbeddedMap), len(that1.MyEmbeddedMap)) + } + for i := range this.MyEmbeddedMap { + a := this.MyEmbeddedMap[i] + b := that1.MyEmbeddedMap[i] + if !(&a).Equal(&b) { + return fmt.Errorf("MyEmbeddedMap this[%v](%v) Not Equal that[%v](%v)", i, this.MyEmbeddedMap[i], i, that1.MyEmbeddedMap[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *Castaway) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*Castaway) + if !ok { + that2, ok := that.(Castaway) + 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.Int32Ptr != nil && that1.Int32Ptr != nil { + if *this.Int32Ptr != *that1.Int32Ptr { + return false + } + } else if this.Int32Ptr != nil { + return false + } else if that1.Int32Ptr != nil { + return false + } + if this.Int32 != that1.Int32 { + return false + } + if this.MyUint64Ptr != nil && that1.MyUint64Ptr != nil { + if *this.MyUint64Ptr != *that1.MyUint64Ptr { + return false + } + } else if this.MyUint64Ptr != nil { + return false + } else if that1.MyUint64Ptr != nil { + return false + } + if this.MyUint64 != that1.MyUint64 { + return false + } + if this.MyFloat32Ptr != nil && that1.MyFloat32Ptr != nil { + if *this.MyFloat32Ptr != *that1.MyFloat32Ptr { + return false + } + } else if this.MyFloat32Ptr != nil { + return false + } else if that1.MyFloat32Ptr != nil { + return false + } + if this.MyFloat32 != that1.MyFloat32 { + return false + } + if this.MyFloat64Ptr != nil && that1.MyFloat64Ptr != nil { + if *this.MyFloat64Ptr != *that1.MyFloat64Ptr { + return false + } + } else if this.MyFloat64Ptr != nil { + return false + } else if that1.MyFloat64Ptr != nil { + return false + } + if this.MyFloat64 != that1.MyFloat64 { + return false + } + if !bytes.Equal(this.MyBytes, that1.MyBytes) { + return false + } + if !bytes.Equal(this.NormalBytes, that1.NormalBytes) { + return false + } + if len(this.MyUint64S) != len(that1.MyUint64S) { + return false + } + for i := range this.MyUint64S { + if this.MyUint64S[i] != that1.MyUint64S[i] { + return false + } + } + if len(this.MyMap) != len(that1.MyMap) { + return false + } + for i := range this.MyMap { + if this.MyMap[i] != that1.MyMap[i] { + return false + } + } + if len(this.MyCustomMap) != len(that1.MyCustomMap) { + return false + } + for i := range this.MyCustomMap { + if this.MyCustomMap[i] != that1.MyCustomMap[i] { + return false + } + } + if len(this.MyNullableMap) != len(that1.MyNullableMap) { + return false + } + for i := range this.MyNullableMap { + if !this.MyNullableMap[i].Equal(that1.MyNullableMap[i]) { + return false + } + } + if len(this.MyEmbeddedMap) != len(that1.MyEmbeddedMap) { + return false + } + for i := range this.MyEmbeddedMap { + a := this.MyEmbeddedMap[i] + b := that1.MyEmbeddedMap[i] + if !(&a).Equal(&b) { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *Wilson) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*Wilson) + if !ok { + that2, ok := that.(Wilson) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *Wilson") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *Wilson but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *Wilson but is not nil && this == nil") + } + if this.Int64 != nil && that1.Int64 != nil { + if *this.Int64 != *that1.Int64 { + return fmt.Errorf("Int64 this(%v) Not Equal that(%v)", *this.Int64, *that1.Int64) + } + } else if this.Int64 != nil { + return fmt.Errorf("this.Int64 == nil && that.Int64 != nil") + } else if that1.Int64 != nil { + return fmt.Errorf("Int64 this(%v) Not Equal that(%v)", this.Int64, that1.Int64) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *Wilson) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*Wilson) + if !ok { + that2, ok := that.(Wilson) + 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.Int64 != nil && that1.Int64 != nil { + if *this.Int64 != *that1.Int64 { + return false + } + } else if this.Int64 != nil { + return false + } else if that1.Int64 != nil { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} + +type CastawayFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetInt32Ptr() *int32 + GetInt32() int32 + GetMyUint64Ptr() *github_com_gogo_protobuf_test_casttype.MyUint64Type + GetMyUint64() github_com_gogo_protobuf_test_casttype.MyUint64Type + GetMyFloat32Ptr() *github_com_gogo_protobuf_test_casttype.MyFloat32Type + GetMyFloat32() github_com_gogo_protobuf_test_casttype.MyFloat32Type + GetMyFloat64Ptr() *github_com_gogo_protobuf_test_casttype.MyFloat64Type + GetMyFloat64() github_com_gogo_protobuf_test_casttype.MyFloat64Type + GetMyBytes() github_com_gogo_protobuf_test_casttype.Bytes + GetNormalBytes() []byte + GetMyUint64S() []github_com_gogo_protobuf_test_casttype.MyUint64Type + GetMyMap() github_com_gogo_protobuf_test_casttype.MyMapType + GetMyCustomMap() map[github_com_gogo_protobuf_test_casttype.MyStringType]github_com_gogo_protobuf_test_casttype.MyUint64Type + GetMyNullableMap() map[github_com_gogo_protobuf_test_casttype.MyInt32Type]*Wilson + GetMyEmbeddedMap() map[github_com_gogo_protobuf_test_casttype.MyInt32Type]Wilson +} + +func (this *Castaway) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *Castaway) TestProto() github_com_gogo_protobuf_proto.Message { + return NewCastawayFromFace(this) +} + +func (this *Castaway) GetInt32Ptr() *int32 { + return this.Int32Ptr +} + +func (this *Castaway) GetInt32() int32 { + return this.Int32 +} + +func (this *Castaway) GetMyUint64Ptr() *github_com_gogo_protobuf_test_casttype.MyUint64Type { + return this.MyUint64Ptr +} + +func (this *Castaway) GetMyUint64() github_com_gogo_protobuf_test_casttype.MyUint64Type { + return this.MyUint64 +} + +func (this *Castaway) GetMyFloat32Ptr() *github_com_gogo_protobuf_test_casttype.MyFloat32Type { + return this.MyFloat32Ptr +} + +func (this *Castaway) GetMyFloat32() github_com_gogo_protobuf_test_casttype.MyFloat32Type { + return this.MyFloat32 +} + +func (this *Castaway) GetMyFloat64Ptr() *github_com_gogo_protobuf_test_casttype.MyFloat64Type { + return this.MyFloat64Ptr +} + +func (this *Castaway) GetMyFloat64() github_com_gogo_protobuf_test_casttype.MyFloat64Type { + return this.MyFloat64 +} + +func (this *Castaway) GetMyBytes() github_com_gogo_protobuf_test_casttype.Bytes { + return this.MyBytes +} + +func (this *Castaway) GetNormalBytes() []byte { + return this.NormalBytes +} + +func (this *Castaway) GetMyUint64S() []github_com_gogo_protobuf_test_casttype.MyUint64Type { + return this.MyUint64S +} + +func (this *Castaway) GetMyMap() github_com_gogo_protobuf_test_casttype.MyMapType { + return this.MyMap +} + +func (this *Castaway) GetMyCustomMap() map[github_com_gogo_protobuf_test_casttype.MyStringType]github_com_gogo_protobuf_test_casttype.MyUint64Type { + return this.MyCustomMap +} + +func (this *Castaway) GetMyNullableMap() map[github_com_gogo_protobuf_test_casttype.MyInt32Type]*Wilson { + return this.MyNullableMap +} + +func (this *Castaway) GetMyEmbeddedMap() map[github_com_gogo_protobuf_test_casttype.MyInt32Type]Wilson { + return this.MyEmbeddedMap +} + +func NewCastawayFromFace(that CastawayFace) *Castaway { + this := &Castaway{} + this.Int32Ptr = that.GetInt32Ptr() + this.Int32 = that.GetInt32() + this.MyUint64Ptr = that.GetMyUint64Ptr() + this.MyUint64 = that.GetMyUint64() + this.MyFloat32Ptr = that.GetMyFloat32Ptr() + this.MyFloat32 = that.GetMyFloat32() + this.MyFloat64Ptr = that.GetMyFloat64Ptr() + this.MyFloat64 = that.GetMyFloat64() + this.MyBytes = that.GetMyBytes() + this.NormalBytes = that.GetNormalBytes() + this.MyUint64S = that.GetMyUint64S() + this.MyMap = that.GetMyMap() + this.MyCustomMap = that.GetMyCustomMap() + this.MyNullableMap = that.GetMyNullableMap() + this.MyEmbeddedMap = that.GetMyEmbeddedMap() + return this +} + +type WilsonFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetInt64() *int64 +} + +func (this *Wilson) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *Wilson) TestProto() github_com_gogo_protobuf_proto.Message { + return NewWilsonFromFace(this) +} + +func (this *Wilson) GetInt64() *int64 { + return this.Int64 +} + +func NewWilsonFromFace(that WilsonFace) *Wilson { + this := &Wilson{} + this.Int64 = that.GetInt64() + return this +} + +func (this *Castaway) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 19) + s = append(s, "&casttype.Castaway{") + if this.Int32Ptr != nil { + s = append(s, "Int32Ptr: "+valueToGoStringCasttype(this.Int32Ptr, "int32")+",\n") + } + s = append(s, "Int32: "+fmt.Sprintf("%#v", this.Int32)+",\n") + if this.MyUint64Ptr != nil { + s = append(s, "MyUint64Ptr: "+valueToGoStringCasttype(this.MyUint64Ptr, "github_com_gogo_protobuf_test_casttype.MyUint64Type")+",\n") + } + s = append(s, "MyUint64: "+fmt.Sprintf("%#v", this.MyUint64)+",\n") + if this.MyFloat32Ptr != nil { + s = append(s, "MyFloat32Ptr: "+valueToGoStringCasttype(this.MyFloat32Ptr, "github_com_gogo_protobuf_test_casttype.MyFloat32Type")+",\n") + } + s = append(s, "MyFloat32: "+fmt.Sprintf("%#v", this.MyFloat32)+",\n") + if this.MyFloat64Ptr != nil { + s = append(s, "MyFloat64Ptr: "+valueToGoStringCasttype(this.MyFloat64Ptr, "github_com_gogo_protobuf_test_casttype.MyFloat64Type")+",\n") + } + s = append(s, "MyFloat64: "+fmt.Sprintf("%#v", this.MyFloat64)+",\n") + if this.MyBytes != nil { + s = append(s, "MyBytes: "+valueToGoStringCasttype(this.MyBytes, "github_com_gogo_protobuf_test_casttype.Bytes")+",\n") + } + if this.NormalBytes != nil { + s = append(s, "NormalBytes: "+valueToGoStringCasttype(this.NormalBytes, "byte")+",\n") + } + if this.MyUint64S != nil { + s = append(s, "MyUint64S: "+fmt.Sprintf("%#v", this.MyUint64S)+",\n") + } + keysForMyMap := make([]string, 0, len(this.MyMap)) + for k := range this.MyMap { + keysForMyMap = append(keysForMyMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForMyMap) + mapStringForMyMap := "github_com_gogo_protobuf_test_casttype.MyMapType{" + for _, k := range keysForMyMap { + mapStringForMyMap += fmt.Sprintf("%#v: %#v,", k, this.MyMap[k]) + } + mapStringForMyMap += "}" + if this.MyMap != nil { + s = append(s, "MyMap: "+mapStringForMyMap+",\n") + } + keysForMyCustomMap := make([]string, 0, len(this.MyCustomMap)) + for k := range this.MyCustomMap { + keysForMyCustomMap = append(keysForMyCustomMap, string(k)) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForMyCustomMap) + mapStringForMyCustomMap := "map[github_com_gogo_protobuf_test_casttype.MyStringType]github_com_gogo_protobuf_test_casttype.MyUint64Type{" + for _, k := range keysForMyCustomMap { + mapStringForMyCustomMap += fmt.Sprintf("%#v: %#v,", k, this.MyCustomMap[github_com_gogo_protobuf_test_casttype.MyStringType(k)]) + } + mapStringForMyCustomMap += "}" + if this.MyCustomMap != nil { + s = append(s, "MyCustomMap: "+mapStringForMyCustomMap+",\n") + } + keysForMyNullableMap := make([]int32, 0, len(this.MyNullableMap)) + for k := range this.MyNullableMap { + keysForMyNullableMap = append(keysForMyNullableMap, int32(k)) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForMyNullableMap) + mapStringForMyNullableMap := "map[github_com_gogo_protobuf_test_casttype.MyInt32Type]*Wilson{" + for _, k := range keysForMyNullableMap { + mapStringForMyNullableMap += fmt.Sprintf("%#v: %#v,", k, this.MyNullableMap[github_com_gogo_protobuf_test_casttype.MyInt32Type(k)]) + } + mapStringForMyNullableMap += "}" + if this.MyNullableMap != nil { + s = append(s, "MyNullableMap: "+mapStringForMyNullableMap+",\n") + } + keysForMyEmbeddedMap := make([]int32, 0, len(this.MyEmbeddedMap)) + for k := range this.MyEmbeddedMap { + keysForMyEmbeddedMap = append(keysForMyEmbeddedMap, int32(k)) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForMyEmbeddedMap) + mapStringForMyEmbeddedMap := "map[github_com_gogo_protobuf_test_casttype.MyInt32Type]Wilson{" + for _, k := range keysForMyEmbeddedMap { + mapStringForMyEmbeddedMap += fmt.Sprintf("%#v: %#v,", k, this.MyEmbeddedMap[github_com_gogo_protobuf_test_casttype.MyInt32Type(k)]) + } + mapStringForMyEmbeddedMap += "}" + if this.MyEmbeddedMap != nil { + s = append(s, "MyEmbeddedMap: "+mapStringForMyEmbeddedMap+",\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 *Wilson) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&casttype.Wilson{") + if this.Int64 != nil { + s = append(s, "Int64: "+valueToGoStringCasttype(this.Int64, "int64")+",\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 valueToGoStringCasttype(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 extensionToGoStringCasttype(e map[int32]github_com_gogo_protobuf_proto.Extension) string { + if e == nil { + return "nil" + } + s := "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 +} +func (m *Castaway) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *Castaway) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Int32Ptr != nil { + data[i] = 0x8 + i++ + i = encodeVarintCasttype(data, i, uint64(*m.Int32Ptr)) + } + data[i] = 0x10 + i++ + i = encodeVarintCasttype(data, i, uint64(m.Int32)) + if m.MyUint64Ptr != nil { + data[i] = 0x18 + i++ + i = encodeVarintCasttype(data, i, uint64(*m.MyUint64Ptr)) + } + data[i] = 0x20 + i++ + i = encodeVarintCasttype(data, i, uint64(m.MyUint64)) + if m.MyFloat32Ptr != nil { + data[i] = 0x2d + i++ + i = encodeFixed32Casttype(data, i, uint32(math.Float32bits(float32(*m.MyFloat32Ptr)))) + } + data[i] = 0x35 + i++ + i = encodeFixed32Casttype(data, i, uint32(math.Float32bits(float32(m.MyFloat32)))) + if m.MyFloat64Ptr != nil { + data[i] = 0x39 + i++ + i = encodeFixed64Casttype(data, i, uint64(math.Float64bits(float64(*m.MyFloat64Ptr)))) + } + data[i] = 0x41 + i++ + i = encodeFixed64Casttype(data, i, uint64(math.Float64bits(float64(m.MyFloat64)))) + if m.MyBytes != nil { + data[i] = 0x4a + i++ + i = encodeVarintCasttype(data, i, uint64(len(m.MyBytes))) + i += copy(data[i:], m.MyBytes) + } + if m.NormalBytes != nil { + data[i] = 0x52 + i++ + i = encodeVarintCasttype(data, i, uint64(len(m.NormalBytes))) + i += copy(data[i:], m.NormalBytes) + } + if len(m.MyUint64S) > 0 { + for _, num := range m.MyUint64S { + data[i] = 0x58 + i++ + i = encodeVarintCasttype(data, i, uint64(num)) + } + } + if len(m.MyMap) > 0 { + for k := range m.MyMap { + data[i] = 0x62 + i++ + v := m.MyMap[k] + mapSize := 1 + len(k) + sovCasttype(uint64(len(k))) + 1 + sovCasttype(uint64(v)) + i = encodeVarintCasttype(data, i, uint64(mapSize)) + data[i] = 0xa + i++ + i = encodeVarintCasttype(data, i, uint64(len(k))) + i += copy(data[i:], k) + data[i] = 0x10 + i++ + i = encodeVarintCasttype(data, i, uint64(v)) + } + } + if len(m.MyCustomMap) > 0 { + for k := range m.MyCustomMap { + data[i] = 0x6a + i++ + v := m.MyCustomMap[k] + mapSize := 1 + len(k) + sovCasttype(uint64(len(k))) + 1 + sovCasttype(uint64(v)) + i = encodeVarintCasttype(data, i, uint64(mapSize)) + data[i] = 0xa + i++ + i = encodeVarintCasttype(data, i, uint64(len(k))) + i += copy(data[i:], k) + data[i] = 0x10 + i++ + i = encodeVarintCasttype(data, i, uint64(v)) + } + } + if len(m.MyNullableMap) > 0 { + for k := range m.MyNullableMap { + data[i] = 0x72 + i++ + v := m.MyNullableMap[k] + if v == nil { + return 0, errors.New("proto: map has nil element") + } + msgSize := v.Size() + mapSize := 1 + sovCasttype(uint64(k)) + 1 + msgSize + sovCasttype(uint64(msgSize)) + i = encodeVarintCasttype(data, i, uint64(mapSize)) + data[i] = 0x8 + i++ + i = encodeVarintCasttype(data, i, uint64(k)) + data[i] = 0x12 + i++ + i = encodeVarintCasttype(data, i, uint64(v.Size())) + n1, err := v.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n1 + } + } + if len(m.MyEmbeddedMap) > 0 { + for k := range m.MyEmbeddedMap { + data[i] = 0x7a + i++ + v := m.MyEmbeddedMap[k] + msgSize := (&v).Size() + mapSize := 1 + sovCasttype(uint64(k)) + 1 + msgSize + sovCasttype(uint64(msgSize)) + i = encodeVarintCasttype(data, i, uint64(mapSize)) + data[i] = 0x8 + i++ + i = encodeVarintCasttype(data, i, uint64(k)) + data[i] = 0x12 + i++ + i = encodeVarintCasttype(data, i, uint64((&v).Size())) + n2, err := (&v).MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n2 + } + } + if m.XXX_unrecognized != nil { + i += copy(data[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *Wilson) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *Wilson) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Int64 != nil { + data[i] = 0x8 + i++ + i = encodeVarintCasttype(data, i, uint64(*m.Int64)) + } + if m.XXX_unrecognized != nil { + i += copy(data[i:], m.XXX_unrecognized) + } + return i, nil +} + +func encodeFixed64Casttype(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 encodeFixed32Casttype(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 encodeVarintCasttype(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 NewPopulatedCastaway(r randyCasttype, easy bool) *Castaway { + this := &Castaway{} + if r.Intn(10) != 0 { + v1 := int32(r.Int63()) + if r.Intn(2) == 0 { + v1 *= -1 + } + this.Int32Ptr = &v1 + } + this.Int32 = int32(r.Int63()) + if r.Intn(2) == 0 { + this.Int32 *= -1 + } + if r.Intn(10) != 0 { + v2 := github_com_gogo_protobuf_test_casttype.MyUint64Type(uint64(r.Uint32())) + this.MyUint64Ptr = &v2 + } + this.MyUint64 = github_com_gogo_protobuf_test_casttype.MyUint64Type(uint64(r.Uint32())) + if r.Intn(10) != 0 { + v3 := github_com_gogo_protobuf_test_casttype.MyFloat32Type(r.Float32()) + if r.Intn(2) == 0 { + v3 *= -1 + } + this.MyFloat32Ptr = &v3 + } + this.MyFloat32 = github_com_gogo_protobuf_test_casttype.MyFloat32Type(r.Float32()) + if r.Intn(2) == 0 { + this.MyFloat32 *= -1 + } + if r.Intn(10) != 0 { + v4 := github_com_gogo_protobuf_test_casttype.MyFloat64Type(r.Float64()) + if r.Intn(2) == 0 { + v4 *= -1 + } + this.MyFloat64Ptr = &v4 + } + this.MyFloat64 = github_com_gogo_protobuf_test_casttype.MyFloat64Type(r.Float64()) + if r.Intn(2) == 0 { + this.MyFloat64 *= -1 + } + if r.Intn(10) != 0 { + v5 := r.Intn(100) + this.MyBytes = make(github_com_gogo_protobuf_test_casttype.Bytes, v5) + for i := 0; i < v5; i++ { + this.MyBytes[i] = byte(r.Intn(256)) + } + } + if r.Intn(10) != 0 { + v6 := r.Intn(100) + this.NormalBytes = make([]byte, v6) + for i := 0; i < v6; i++ { + this.NormalBytes[i] = byte(r.Intn(256)) + } + } + if r.Intn(10) != 0 { + v7 := r.Intn(10) + this.MyUint64S = make([]github_com_gogo_protobuf_test_casttype.MyUint64Type, v7) + for i := 0; i < v7; i++ { + this.MyUint64S[i] = github_com_gogo_protobuf_test_casttype.MyUint64Type(uint64(r.Uint32())) + } + } + if r.Intn(10) != 0 { + v8 := r.Intn(10) + this.MyMap = make(github_com_gogo_protobuf_test_casttype.MyMapType) + for i := 0; i < v8; i++ { + v9 := randStringCasttype(r) + this.MyMap[v9] = uint64(uint64(r.Uint32())) + } + } + if r.Intn(10) != 0 { + v10 := r.Intn(10) + this.MyCustomMap = make(map[github_com_gogo_protobuf_test_casttype.MyStringType]github_com_gogo_protobuf_test_casttype.MyUint64Type) + for i := 0; i < v10; i++ { + v11 := github_com_gogo_protobuf_test_casttype.MyStringType(randStringCasttype(r)) + this.MyCustomMap[v11] = github_com_gogo_protobuf_test_casttype.MyUint64Type(uint64(r.Uint32())) + } + } + if r.Intn(10) != 0 { + v12 := r.Intn(10) + this.MyNullableMap = make(map[github_com_gogo_protobuf_test_casttype.MyInt32Type]*Wilson) + for i := 0; i < v12; i++ { + this.MyNullableMap[github_com_gogo_protobuf_test_casttype.MyInt32Type(int32(r.Int31()))] = NewPopulatedWilson(r, easy) + } + } + if r.Intn(10) != 0 { + v13 := r.Intn(10) + this.MyEmbeddedMap = make(map[github_com_gogo_protobuf_test_casttype.MyInt32Type]Wilson) + for i := 0; i < v13; i++ { + this.MyEmbeddedMap[github_com_gogo_protobuf_test_casttype.MyInt32Type(int32(r.Int31()))] = *NewPopulatedWilson(r, easy) + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedCasttype(r, 16) + } + return this +} + +func NewPopulatedWilson(r randyCasttype, easy bool) *Wilson { + this := &Wilson{} + if r.Intn(10) != 0 { + v14 := int64(r.Int63()) + if r.Intn(2) == 0 { + v14 *= -1 + } + this.Int64 = &v14 + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedCasttype(r, 2) + } + return this +} + +type randyCasttype interface { + Float32() float32 + Float64() float64 + Int63() int64 + Int31() int32 + Uint32() uint32 + Intn(n int) int +} + +func randUTF8RuneCasttype(r randyCasttype) 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 randStringCasttype(r randyCasttype) string { + v15 := r.Intn(100) + tmps := make([]rune, v15) + for i := 0; i < v15; i++ { + tmps[i] = randUTF8RuneCasttype(r) + } + return string(tmps) +} +func randUnrecognizedCasttype(r randyCasttype, 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 = randFieldCasttype(data, r, fieldNumber, wire) + } + return data +} +func randFieldCasttype(data []byte, r randyCasttype, fieldNumber int, wire int) []byte { + key := uint32(fieldNumber)<<3 | uint32(wire) + switch wire { + case 0: + data = encodeVarintPopulateCasttype(data, uint64(key)) + v16 := r.Int63() + if r.Intn(2) == 0 { + v16 *= -1 + } + data = encodeVarintPopulateCasttype(data, uint64(v16)) + case 1: + data = encodeVarintPopulateCasttype(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 = encodeVarintPopulateCasttype(data, uint64(key)) + ll := r.Intn(100) + data = encodeVarintPopulateCasttype(data, uint64(ll)) + for j := 0; j < ll; j++ { + data = append(data, byte(r.Intn(256))) + } + default: + data = encodeVarintPopulateCasttype(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 encodeVarintPopulateCasttype(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 *Castaway) Size() (n int) { + var l int + _ = l + if m.Int32Ptr != nil { + n += 1 + sovCasttype(uint64(*m.Int32Ptr)) + } + n += 1 + sovCasttype(uint64(m.Int32)) + if m.MyUint64Ptr != nil { + n += 1 + sovCasttype(uint64(*m.MyUint64Ptr)) + } + n += 1 + sovCasttype(uint64(m.MyUint64)) + if m.MyFloat32Ptr != nil { + n += 5 + } + n += 5 + if m.MyFloat64Ptr != nil { + n += 9 + } + n += 9 + if m.MyBytes != nil { + l = len(m.MyBytes) + n += 1 + l + sovCasttype(uint64(l)) + } + if m.NormalBytes != nil { + l = len(m.NormalBytes) + n += 1 + l + sovCasttype(uint64(l)) + } + if len(m.MyUint64S) > 0 { + for _, e := range m.MyUint64S { + n += 1 + sovCasttype(uint64(e)) + } + } + if len(m.MyMap) > 0 { + for k, v := range m.MyMap { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovCasttype(uint64(len(k))) + 1 + sovCasttype(uint64(v)) + n += mapEntrySize + 1 + sovCasttype(uint64(mapEntrySize)) + } + } + if len(m.MyCustomMap) > 0 { + for k, v := range m.MyCustomMap { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovCasttype(uint64(len(k))) + 1 + sovCasttype(uint64(v)) + n += mapEntrySize + 1 + sovCasttype(uint64(mapEntrySize)) + } + } + if len(m.MyNullableMap) > 0 { + for k, v := range m.MyNullableMap { + _ = k + _ = v + l = 0 + if v != nil { + l = v.Size() + } + mapEntrySize := 1 + sovCasttype(uint64(k)) + 1 + l + sovCasttype(uint64(l)) + n += mapEntrySize + 1 + sovCasttype(uint64(mapEntrySize)) + } + } + if len(m.MyEmbeddedMap) > 0 { + for k, v := range m.MyEmbeddedMap { + _ = k + _ = v + l = v.Size() + mapEntrySize := 1 + sovCasttype(uint64(k)) + 1 + l + sovCasttype(uint64(l)) + n += mapEntrySize + 1 + sovCasttype(uint64(mapEntrySize)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *Wilson) Size() (n int) { + var l int + _ = l + if m.Int64 != nil { + n += 1 + sovCasttype(uint64(*m.Int64)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func sovCasttype(x uint64) (n int) { + for { + n++ + x >>= 7 + if x == 0 { + break + } + } + return n +} +func sozCasttype(x uint64) (n int) { + return sovCasttype(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (this *Castaway) String() string { + if this == nil { + return "nil" + } + keysForMyMap := make([]string, 0, len(this.MyMap)) + for k := range this.MyMap { + keysForMyMap = append(keysForMyMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForMyMap) + mapStringForMyMap := "github_com_gogo_protobuf_test_casttype.MyMapType{" + for _, k := range keysForMyMap { + mapStringForMyMap += fmt.Sprintf("%v: %v,", k, this.MyMap[k]) + } + mapStringForMyMap += "}" + keysForMyCustomMap := make([]string, 0, len(this.MyCustomMap)) + for k := range this.MyCustomMap { + keysForMyCustomMap = append(keysForMyCustomMap, string(k)) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForMyCustomMap) + mapStringForMyCustomMap := "map[github_com_gogo_protobuf_test_casttype.MyStringType]github_com_gogo_protobuf_test_casttype.MyUint64Type{" + for _, k := range keysForMyCustomMap { + mapStringForMyCustomMap += fmt.Sprintf("%v: %v,", k, this.MyCustomMap[github_com_gogo_protobuf_test_casttype.MyStringType(k)]) + } + mapStringForMyCustomMap += "}" + keysForMyNullableMap := make([]int32, 0, len(this.MyNullableMap)) + for k := range this.MyNullableMap { + keysForMyNullableMap = append(keysForMyNullableMap, int32(k)) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForMyNullableMap) + mapStringForMyNullableMap := "map[github_com_gogo_protobuf_test_casttype.MyInt32Type]*Wilson{" + for _, k := range keysForMyNullableMap { + mapStringForMyNullableMap += fmt.Sprintf("%v: %v,", k, this.MyNullableMap[github_com_gogo_protobuf_test_casttype.MyInt32Type(k)]) + } + mapStringForMyNullableMap += "}" + keysForMyEmbeddedMap := make([]int32, 0, len(this.MyEmbeddedMap)) + for k := range this.MyEmbeddedMap { + keysForMyEmbeddedMap = append(keysForMyEmbeddedMap, int32(k)) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForMyEmbeddedMap) + mapStringForMyEmbeddedMap := "map[github_com_gogo_protobuf_test_casttype.MyInt32Type]Wilson{" + for _, k := range keysForMyEmbeddedMap { + mapStringForMyEmbeddedMap += fmt.Sprintf("%v: %v,", k, this.MyEmbeddedMap[github_com_gogo_protobuf_test_casttype.MyInt32Type(k)]) + } + mapStringForMyEmbeddedMap += "}" + s := strings.Join([]string{`&Castaway{`, + `Int32Ptr:` + valueToStringCasttype(this.Int32Ptr) + `,`, + `Int32:` + fmt.Sprintf("%v", this.Int32) + `,`, + `MyUint64Ptr:` + valueToStringCasttype(this.MyUint64Ptr) + `,`, + `MyUint64:` + fmt.Sprintf("%v", this.MyUint64) + `,`, + `MyFloat32Ptr:` + valueToStringCasttype(this.MyFloat32Ptr) + `,`, + `MyFloat32:` + fmt.Sprintf("%v", this.MyFloat32) + `,`, + `MyFloat64Ptr:` + valueToStringCasttype(this.MyFloat64Ptr) + `,`, + `MyFloat64:` + fmt.Sprintf("%v", this.MyFloat64) + `,`, + `MyBytes:` + valueToStringCasttype(this.MyBytes) + `,`, + `NormalBytes:` + valueToStringCasttype(this.NormalBytes) + `,`, + `MyUint64S:` + fmt.Sprintf("%v", this.MyUint64S) + `,`, + `MyMap:` + mapStringForMyMap + `,`, + `MyCustomMap:` + mapStringForMyCustomMap + `,`, + `MyNullableMap:` + mapStringForMyNullableMap + `,`, + `MyEmbeddedMap:` + mapStringForMyEmbeddedMap + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *Wilson) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&Wilson{`, + `Int64:` + valueToStringCasttype(this.Int64) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func valueToStringCasttype(v interface{}) string { + rv := reflect.ValueOf(v) + if rv.IsNil() { + return "nil" + } + pv := reflect.Indirect(rv).Interface() + return fmt.Sprintf("*%v", pv) +} + +var fileDescriptorCasttype = []byte{ + // 670 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xa4, 0x95, 0xbf, 0x6f, 0xd3, 0x40, + 0x14, 0xc7, 0xeb, 0xa6, 0x6e, 0xed, 0x73, 0x02, 0xd1, 0x89, 0xc1, 0x8a, 0x44, 0x12, 0xb5, 0x2a, + 0x62, 0x80, 0xa4, 0x4a, 0xa3, 0x10, 0x15, 0xc4, 0xe0, 0xaa, 0x48, 0x45, 0xb8, 0x42, 0x86, 0xaa, + 0x02, 0xb1, 0x38, 0x8d, 0x49, 0x2d, 0xfc, 0x23, 0xb2, 0x1d, 0x90, 0xb7, 0x0a, 0x06, 0x24, 0xfe, + 0x02, 0xfe, 0x04, 0x46, 0x16, 0x24, 0x46, 0xc6, 0x8c, 0x1d, 0x99, 0x5a, 0x5a, 0x96, 0x8e, 0x1d, + 0x2b, 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, 0x60, 0xbb, 0x47, 0x55, 0xee, 0x0b, 0xd8, 0x57, 0xb0, 0xef, 0x60, 0x3f, 0xc0, 0xc6, + 0x60, 0x7b, 0x47, 0xe0, 0x0b, 0xed, 0x31, 0xb4, 0x27, 0xd0, 0x9e, 0x42, 0xbb, 0xfb, 0xbb, 0x3a, + 0xf5, 0x37, 0x00, 0x00, 0xff, 0xff, 0xd3, 0xbd, 0x6b, 0x7d, 0x63, 0x07, 0x00, 0x00, +} diff --git a/vendor/github.com/gogo/protobuf/test/casttype/combos/marshaler/casttype.proto b/vendor/github.com/gogo/protobuf/test/casttype/combos/marshaler/casttype.proto new file mode 100644 index 000000000..c321f40a9 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/casttype/combos/marshaler/casttype.proto @@ -0,0 +1,77 @@ +// Copyright (c) 2015, Vastech SA (PTY) LTD. All rights reserved. +// http://github.com/gogo/protobuf/gogoproto +// +// 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 casttype; + +import "github.com/gogo/protobuf/gogoproto/gogo.proto"; + +option (gogoproto.goproto_stringer_all) = false; +option (gogoproto.goproto_enum_prefix_all) = false; +option (gogoproto.goproto_getters_all) = false; + +option (gogoproto.equal_all) = true; +option (gogoproto.verbose_equal_all) = true; +option (gogoproto.stringer_all) = true; +option (gogoproto.gostring_all) = true; +option (gogoproto.face_all) = true; +option (gogoproto.description_all) = true; + +option (gogoproto.testgen_all) = true; +option (gogoproto.populate_all) = true; +option (gogoproto.benchgen_all) = true; +option (gogoproto.unmarshaler_all) = false; +option (gogoproto.marshaler_all) = true; +option (gogoproto.sizer_all) = true; + +option (gogoproto.goproto_enum_stringer_all) = false; +option (gogoproto.enum_stringer_all) = true; + +option (gogoproto.unsafe_marshaler_all) = false; +option (gogoproto.unsafe_unmarshaler_all) = false; + +message Castaway { + optional int64 Int32Ptr = 1 [(gogoproto.casttype) = "int32"]; + optional int64 Int32 = 2 [(gogoproto.casttype) = "int32", (gogoproto.nullable) = false]; + optional uint64 MyUint64Ptr = 3 [(gogoproto.casttype) = "github.com/gogo/protobuf/test/casttype.MyUint64Type"]; + optional uint64 MyUint64 = 4 [(gogoproto.casttype) = "github.com/gogo/protobuf/test/casttype.MyUint64Type", (gogoproto.nullable) = false]; + optional float MyFloat32Ptr = 5 [(gogoproto.casttype) = "github.com/gogo/protobuf/test/casttype.MyFloat32Type"]; + optional float MyFloat32 = 6 [(gogoproto.casttype) = "github.com/gogo/protobuf/test/casttype.MyFloat32Type", (gogoproto.nullable) = false]; + optional double MyFloat64Ptr = 7 [(gogoproto.casttype) = "github.com/gogo/protobuf/test/casttype.MyFloat64Type"]; + optional double MyFloat64 = 8 [(gogoproto.casttype) = "github.com/gogo/protobuf/test/casttype.MyFloat64Type", (gogoproto.nullable) = false]; + optional bytes MyBytes = 9 [(gogoproto.casttype) = "github.com/gogo/protobuf/test/casttype.Bytes"]; + optional bytes NormalBytes = 10; + repeated uint64 MyUint64s = 11 [(gogoproto.casttype) = "github.com/gogo/protobuf/test/casttype.MyUint64Type"]; + map MyMap = 12 [(gogoproto.casttype) = "github.com/gogo/protobuf/test/casttype.MyMapType"]; + map MyCustomMap = 13 [(gogoproto.castkey) = "github.com/gogo/protobuf/test/casttype.MyStringType", (gogoproto.castvalue) = "github.com/gogo/protobuf/test/casttype.MyUint64Type"]; + map MyNullableMap = 14 [(gogoproto.castkey) = "github.com/gogo/protobuf/test/casttype.MyInt32Type"]; + map MyEmbeddedMap = 15 [(gogoproto.castkey) = "github.com/gogo/protobuf/test/casttype.MyInt32Type", (gogoproto.nullable) = false]; +} + +message Wilson { + optional int64 Int64 = 1; +} diff --git a/vendor/github.com/gogo/protobuf/test/casttype/combos/marshaler/casttypepb_test.go b/vendor/github.com/gogo/protobuf/test/casttype/combos/marshaler/casttypepb_test.go new file mode 100644 index 000000000..a7de05496 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/casttype/combos/marshaler/casttypepb_test.go @@ -0,0 +1,513 @@ +// Code generated by protoc-gen-gogo. +// source: combos/marshaler/casttype.proto +// DO NOT EDIT! + +/* +Package casttype is a generated protocol buffer package. + +It is generated from these files: + combos/marshaler/casttype.proto + +It has these top-level messages: + Castaway + Wilson +*/ +package casttype + +import testing "testing" +import math_rand "math/rand" +import time "time" +import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" +import github_com_gogo_protobuf_jsonpb "github.com/gogo/protobuf/jsonpb" +import fmt "fmt" +import go_parser "go/parser" +import proto "github.com/gogo/protobuf/proto" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +func TestCastawayProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCastaway(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Castaway{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestCastawayMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCastaway(popr, false) + size := p.Size() + data := make([]byte, size) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(data) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Castaway{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkCastawayProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Castaway, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedCastaway(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkCastawayProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedCastaway(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &Castaway{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestWilsonProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedWilson(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Wilson{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestWilsonMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedWilson(popr, false) + size := p.Size() + data := make([]byte, size) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(data) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Wilson{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkWilsonProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Wilson, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedWilson(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkWilsonProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedWilson(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &Wilson{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestCastawayJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCastaway(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Castaway{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestWilsonJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedWilson(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Wilson{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestCastawayProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCastaway(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &Castaway{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestCastawayProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCastaway(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &Castaway{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestWilsonProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedWilson(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &Wilson{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestWilsonProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedWilson(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &Wilson{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestCasttypeDescription(t *testing.T) { + CasttypeDescription() +} +func TestCastawayVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCastaway(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &Castaway{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestWilsonVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedWilson(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &Wilson{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestCastawayFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCastaway(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestWilsonFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedWilson(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestCastawayGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCastaway(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestWilsonGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedWilson(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestCastawaySize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCastaway(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkCastawaySize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Castaway, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedCastaway(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestWilsonSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedWilson(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkWilsonSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Wilson, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedWilson(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestCastawayStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCastaway(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestWilsonStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedWilson(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} + +//These tests are generated by github.com/gogo/protobuf/plugin/testgen diff --git a/vendor/github.com/gogo/protobuf/test/casttype/combos/neither/casttype.pb.go b/vendor/github.com/gogo/protobuf/test/casttype/combos/neither/casttype.pb.go new file mode 100644 index 000000000..4c3b7cc01 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/casttype/combos/neither/casttype.pb.go @@ -0,0 +1,1346 @@ +// Code generated by protoc-gen-gogo. +// source: combos/neither/casttype.proto +// DO NOT EDIT! + +/* +Package casttype is a generated protocol buffer package. + +It is generated from these files: + combos/neither/casttype.proto + +It has these top-level messages: + Castaway + Wilson +*/ +package casttype + +import proto "github.com/gogo/protobuf/proto" +import fmt "fmt" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" + +import github_com_gogo_protobuf_test_casttype "github.com/gogo/protobuf/test/casttype" + +import github_com_gogo_protobuf_protoc_gen_gogo_descriptor "github.com/gogo/protobuf/protoc-gen-gogo/descriptor" +import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" +import compress_gzip "compress/gzip" +import bytes "bytes" +import io_ioutil "io/ioutil" + +import strings "strings" +import sort "sort" +import strconv "strconv" +import reflect "reflect" +import github_com_gogo_protobuf_sortkeys "github.com/gogo/protobuf/sortkeys" + +// 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. +const _ = proto.GoGoProtoPackageIsVersion1 + +type Castaway struct { + Int32Ptr *int32 `protobuf:"varint,1,opt,name=Int32Ptr,json=int32Ptr,casttype=int32" json:"Int32Ptr,omitempty"` + Int32 int32 `protobuf:"varint,2,opt,name=Int32,json=int32,casttype=int32" json:"Int32"` + MyUint64Ptr *github_com_gogo_protobuf_test_casttype.MyUint64Type `protobuf:"varint,3,opt,name=MyUint64Ptr,json=myUint64Ptr,casttype=github.com/gogo/protobuf/test/casttype.MyUint64Type" json:"MyUint64Ptr,omitempty"` + MyUint64 github_com_gogo_protobuf_test_casttype.MyUint64Type `protobuf:"varint,4,opt,name=MyUint64,json=myUint64,casttype=github.com/gogo/protobuf/test/casttype.MyUint64Type" json:"MyUint64"` + MyFloat32Ptr *github_com_gogo_protobuf_test_casttype.MyFloat32Type `protobuf:"fixed32,5,opt,name=MyFloat32Ptr,json=myFloat32Ptr,casttype=github.com/gogo/protobuf/test/casttype.MyFloat32Type" json:"MyFloat32Ptr,omitempty"` + MyFloat32 github_com_gogo_protobuf_test_casttype.MyFloat32Type `protobuf:"fixed32,6,opt,name=MyFloat32,json=myFloat32,casttype=github.com/gogo/protobuf/test/casttype.MyFloat32Type" json:"MyFloat32"` + MyFloat64Ptr *github_com_gogo_protobuf_test_casttype.MyFloat64Type `protobuf:"fixed64,7,opt,name=MyFloat64Ptr,json=myFloat64Ptr,casttype=github.com/gogo/protobuf/test/casttype.MyFloat64Type" json:"MyFloat64Ptr,omitempty"` + MyFloat64 github_com_gogo_protobuf_test_casttype.MyFloat64Type `protobuf:"fixed64,8,opt,name=MyFloat64,json=myFloat64,casttype=github.com/gogo/protobuf/test/casttype.MyFloat64Type" json:"MyFloat64"` + MyBytes github_com_gogo_protobuf_test_casttype.Bytes `protobuf:"bytes,9,opt,name=MyBytes,json=myBytes,casttype=github.com/gogo/protobuf/test/casttype.Bytes" json:"MyBytes,omitempty"` + NormalBytes []byte `protobuf:"bytes,10,opt,name=NormalBytes,json=normalBytes" json:"NormalBytes,omitempty"` + MyUint64S []github_com_gogo_protobuf_test_casttype.MyUint64Type `protobuf:"varint,11,rep,name=MyUint64s,json=myUint64s,casttype=github.com/gogo/protobuf/test/casttype.MyUint64Type" json:"MyUint64s,omitempty"` + MyMap github_com_gogo_protobuf_test_casttype.MyMapType `protobuf:"bytes,12,rep,name=MyMap,json=myMap,casttype=github.com/gogo/protobuf/test/casttype.MyMapType" json:"MyMap,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"varint,2,opt,name=value"` + MyCustomMap map[github_com_gogo_protobuf_test_casttype.MyStringType]github_com_gogo_protobuf_test_casttype.MyUint64Type `protobuf:"bytes,13,rep,name=MyCustomMap,json=myCustomMap,castkey=github.com/gogo/protobuf/test/casttype.MyStringType,castvalue=github.com/gogo/protobuf/test/casttype.MyUint64Type" json:"MyCustomMap,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"varint,2,opt,name=value"` + MyNullableMap map[github_com_gogo_protobuf_test_casttype.MyInt32Type]*Wilson `protobuf:"bytes,14,rep,name=MyNullableMap,json=myNullableMap,castkey=github.com/gogo/protobuf/test/casttype.MyInt32Type" json:"MyNullableMap,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + MyEmbeddedMap map[github_com_gogo_protobuf_test_casttype.MyInt32Type]Wilson `protobuf:"bytes,15,rep,name=MyEmbeddedMap,json=myEmbeddedMap,castkey=github.com/gogo/protobuf/test/casttype.MyInt32Type" json:"MyEmbeddedMap" protobuf_key:"varint,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *Castaway) Reset() { *m = Castaway{} } +func (*Castaway) ProtoMessage() {} +func (*Castaway) Descriptor() ([]byte, []int) { return fileDescriptorCasttype, []int{0} } + +type Wilson struct { + Int64 *int64 `protobuf:"varint,1,opt,name=Int64,json=int64" json:"Int64,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *Wilson) Reset() { *m = Wilson{} } +func (*Wilson) ProtoMessage() {} +func (*Wilson) Descriptor() ([]byte, []int) { return fileDescriptorCasttype, []int{1} } + +func init() { + proto.RegisterType((*Castaway)(nil), "casttype.Castaway") + proto.RegisterType((*Wilson)(nil), "casttype.Wilson") +} +func (this *Castaway) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return CasttypeDescription() +} +func (this *Wilson) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return CasttypeDescription() +} +func CasttypeDescription() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + d := &github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet{} + var gzipped = []byte{ + // 3789 bytes of a gzipped FileDescriptorSet + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xcc, 0x5a, 0x5b, 0x6c, 0x1b, 0x67, + 0x76, 0x36, 0x6f, 0x12, 0x79, 0x48, 0x51, 0xd4, 0x48, 0xb1, 0x69, 0x6d, 0x7c, 0x93, 0x73, 0xf1, + 0x7a, 0x77, 0x25, 0xd7, 0x71, 0x6c, 0x87, 0xde, 0x66, 0x21, 0x4a, 0xb4, 0x96, 0x86, 0x6e, 0x1d, + 0x89, 0x6b, 0x3b, 0x2d, 0x30, 0x18, 0x91, 0x23, 0x8a, 0xf6, 0x70, 0x86, 0xe5, 0x0c, 0x6d, 0x6b, + 0x9f, 0xd2, 0xba, 0xed, 0x22, 0x2d, 0x7a, 0x2f, 0xd0, 0xdc, 0xdb, 0x04, 0x68, 0x93, 0xa6, 0xb7, + 0xa4, 0x6d, 0x8a, 0xa2, 0x4f, 0x01, 0x8a, 0xb4, 0x79, 0x2a, 0xda, 0x3e, 0xf5, 0xa1, 0xc8, 0xad, + 0x01, 0x9a, 0xb6, 0x69, 0x9b, 0x02, 0x06, 0x1a, 0x34, 0x2f, 0x3d, 0xe7, 0xbf, 0x0c, 0x87, 0x17, + 0x69, 0x28, 0x05, 0x69, 0x56, 0x00, 0x21, 0xce, 0xf9, 0xcf, 0xf7, 0xcd, 0x99, 0xf3, 0x9f, 0xff, + 0x9c, 0xf3, 0xff, 0x43, 0xf8, 0xab, 0x1f, 0x81, 0xe3, 0x55, 0xdb, 0xae, 0x9a, 0xc6, 0x4c, 0xa3, + 0x69, 0xbb, 0xf6, 0x46, 0x6b, 0x73, 0xa6, 0x62, 0x38, 0xe5, 0x66, 0xad, 0xe1, 0xda, 0xcd, 0x69, + 0x26, 0x53, 0x46, 0xb9, 0xc6, 0xb4, 0xd4, 0x98, 0x5a, 0x82, 0xb1, 0xcb, 0x35, 0xd3, 0x98, 0xf7, + 0x14, 0xd7, 0x0c, 0x57, 0xb9, 0x08, 0xd1, 0x4d, 0x14, 0x66, 0x43, 0xc7, 0x23, 0xa7, 0x92, 0x67, + 0x1f, 0x98, 0xee, 0x02, 0x4d, 0x77, 0x22, 0x56, 0x49, 0xac, 0x32, 0xc4, 0xd4, 0x47, 0x51, 0x18, + 0xef, 0x33, 0xaa, 0x28, 0x10, 0xb5, 0xf4, 0x3a, 0x31, 0x86, 0x4e, 0x25, 0x54, 0xf6, 0x5d, 0xc9, + 0xc2, 0x70, 0x43, 0x2f, 0xdf, 0xd4, 0xab, 0x46, 0x36, 0xcc, 0xc4, 0xf2, 0x52, 0x39, 0x0a, 0x50, + 0x31, 0x1a, 0x86, 0x55, 0x31, 0xac, 0xf2, 0x76, 0x36, 0x82, 0x56, 0x24, 0x54, 0x9f, 0x44, 0xf9, + 0x06, 0x8c, 0x35, 0x5a, 0x1b, 0x66, 0xad, 0xac, 0xf9, 0xd4, 0x00, 0xd5, 0x62, 0x6a, 0x86, 0x0f, + 0xcc, 0xb7, 0x95, 0x1f, 0x86, 0xd1, 0xdb, 0x86, 0x7e, 0xd3, 0xaf, 0x9a, 0x64, 0xaa, 0x69, 0x12, + 0xfb, 0x14, 0xe7, 0x20, 0x55, 0x37, 0x1c, 0x07, 0x0d, 0xd0, 0xdc, 0xed, 0x86, 0x91, 0x8d, 0xb2, + 0xa7, 0x3f, 0xde, 0xf3, 0xf4, 0xdd, 0x4f, 0x9e, 0x14, 0xa8, 0x75, 0x04, 0x29, 0xb3, 0x90, 0x30, + 0xac, 0x56, 0x9d, 0x33, 0xc4, 0x76, 0xf0, 0x5f, 0x01, 0x35, 0xba, 0x59, 0xe2, 0x04, 0x13, 0x14, + 0xc3, 0x8e, 0xd1, 0xbc, 0x55, 0x2b, 0x1b, 0xd9, 0x21, 0x46, 0xf0, 0x70, 0x0f, 0xc1, 0x1a, 0x1f, + 0xef, 0xe6, 0x90, 0x38, 0x7c, 0x94, 0x84, 0x71, 0xc7, 0x35, 0x2c, 0xa7, 0x66, 0x5b, 0xd9, 0x61, + 0x46, 0xf2, 0x60, 0x9f, 0x59, 0x34, 0xcc, 0x4a, 0x37, 0x45, 0x1b, 0xa7, 0x9c, 0x87, 0x61, 0xbb, + 0xe1, 0xe2, 0x37, 0x27, 0x1b, 0xc7, 0xf9, 0x49, 0x9e, 0xbd, 0xbf, 0x6f, 0x20, 0xac, 0x70, 0x1d, + 0x55, 0x2a, 0x2b, 0x45, 0xc8, 0x38, 0x76, 0xab, 0x59, 0x36, 0xb4, 0xb2, 0x5d, 0x31, 0xb4, 0x9a, + 0xb5, 0x69, 0x67, 0x13, 0x8c, 0xe0, 0x58, 0xef, 0x83, 0x30, 0xc5, 0x39, 0xd4, 0x2b, 0xa2, 0x9a, + 0x9a, 0x76, 0x3a, 0xae, 0x95, 0x83, 0x30, 0xe4, 0x6c, 0x5b, 0xae, 0x7e, 0x27, 0x9b, 0x62, 0x11, + 0x22, 0xae, 0xa6, 0xfe, 0x27, 0x06, 0xa3, 0x83, 0x84, 0xd8, 0x25, 0x88, 0x6d, 0xd2, 0x53, 0x62, + 0x80, 0xed, 0xc1, 0x07, 0x1c, 0xd3, 0xe9, 0xc4, 0xa1, 0x7d, 0x3a, 0x71, 0x16, 0x92, 0x96, 0xe1, + 0xb8, 0x46, 0x85, 0x47, 0x44, 0x64, 0xc0, 0x98, 0x02, 0x0e, 0xea, 0x0d, 0xa9, 0xe8, 0xbe, 0x42, + 0x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8f, 0x43, 0x54, 0xa4, 0x38, 0x62, 0x38, 0x3d, 0x18, + 0x03, 0xc5, 0xa2, 0xca, 0x70, 0xca, 0xd7, 0x20, 0x41, 0xff, 0xb9, 0x6f, 0x87, 0x98, 0xcd, 0x71, + 0x12, 0x90, 0x5f, 0x95, 0x49, 0x88, 0xb3, 0x30, 0xab, 0x18, 0xb2, 0x34, 0x78, 0xd7, 0x34, 0x31, + 0x15, 0x63, 0x53, 0x6f, 0x99, 0xae, 0x76, 0x4b, 0x37, 0x5b, 0x06, 0x0b, 0x18, 0x9c, 0x18, 0x21, + 0xfc, 0x1e, 0xc9, 0x94, 0x63, 0x90, 0xe4, 0x51, 0x59, 0x43, 0xcc, 0x1d, 0x96, 0x7d, 0x62, 0x2a, + 0x0f, 0xd4, 0x22, 0x49, 0xe8, 0xf6, 0x37, 0x1c, 0x5c, 0x0b, 0x62, 0x6a, 0xd9, 0x2d, 0x48, 0xc0, + 0x6e, 0x7f, 0xa1, 0x3b, 0xf1, 0x1d, 0xe9, 0xff, 0x78, 0xdd, 0xb1, 0x38, 0xf5, 0xe7, 0x61, 0x88, + 0xb2, 0xf5, 0x36, 0x0a, 0xc9, 0xf5, 0xeb, 0xab, 0x05, 0x6d, 0x7e, 0xa5, 0x94, 0x5f, 0x2c, 0x64, + 0x42, 0x4a, 0x1a, 0x80, 0x09, 0x2e, 0x2f, 0xae, 0xcc, 0xae, 0x67, 0xc2, 0xde, 0x75, 0x71, 0x79, + 0xfd, 0xfc, 0xb9, 0x4c, 0xc4, 0x03, 0x94, 0xb8, 0x20, 0xea, 0x57, 0x78, 0xe4, 0x6c, 0x26, 0x86, + 0x91, 0x90, 0xe2, 0x04, 0xc5, 0x6b, 0x85, 0x79, 0xd4, 0x18, 0xea, 0x94, 0xa0, 0xce, 0xb0, 0x32, + 0x02, 0x09, 0x26, 0xc9, 0xaf, 0xac, 0x2c, 0x66, 0xe2, 0x1e, 0xe7, 0xda, 0xba, 0x5a, 0x5c, 0x5e, + 0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, 0xff, + 0x02, 0x00, 0x00, 0xff, 0xff, 0x56, 0xee, 0xce, 0xcf, 0xce, 0x31, 0x00, 0x00, + } + r := bytes.NewReader(gzipped) + gzipr, err := compress_gzip.NewReader(r) + if err != nil { + panic(err) + } + ungzipped, err := io_ioutil.ReadAll(gzipr) + if err != nil { + panic(err) + } + if err := github_com_gogo_protobuf_proto.Unmarshal(ungzipped, d); err != nil { + panic(err) + } + return d +} +func (this *Castaway) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*Castaway) + if !ok { + that2, ok := that.(Castaway) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *Castaway") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *Castaway but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *Castaway but is not nil && this == nil") + } + if this.Int32Ptr != nil && that1.Int32Ptr != nil { + if *this.Int32Ptr != *that1.Int32Ptr { + return fmt.Errorf("Int32Ptr this(%v) Not Equal that(%v)", *this.Int32Ptr, *that1.Int32Ptr) + } + } else if this.Int32Ptr != nil { + return fmt.Errorf("this.Int32Ptr == nil && that.Int32Ptr != nil") + } else if that1.Int32Ptr != nil { + return fmt.Errorf("Int32Ptr this(%v) Not Equal that(%v)", this.Int32Ptr, that1.Int32Ptr) + } + if this.Int32 != that1.Int32 { + return fmt.Errorf("Int32 this(%v) Not Equal that(%v)", this.Int32, that1.Int32) + } + if this.MyUint64Ptr != nil && that1.MyUint64Ptr != nil { + if *this.MyUint64Ptr != *that1.MyUint64Ptr { + return fmt.Errorf("MyUint64Ptr this(%v) Not Equal that(%v)", *this.MyUint64Ptr, *that1.MyUint64Ptr) + } + } else if this.MyUint64Ptr != nil { + return fmt.Errorf("this.MyUint64Ptr == nil && that.MyUint64Ptr != nil") + } else if that1.MyUint64Ptr != nil { + return fmt.Errorf("MyUint64Ptr this(%v) Not Equal that(%v)", this.MyUint64Ptr, that1.MyUint64Ptr) + } + if this.MyUint64 != that1.MyUint64 { + return fmt.Errorf("MyUint64 this(%v) Not Equal that(%v)", this.MyUint64, that1.MyUint64) + } + if this.MyFloat32Ptr != nil && that1.MyFloat32Ptr != nil { + if *this.MyFloat32Ptr != *that1.MyFloat32Ptr { + return fmt.Errorf("MyFloat32Ptr this(%v) Not Equal that(%v)", *this.MyFloat32Ptr, *that1.MyFloat32Ptr) + } + } else if this.MyFloat32Ptr != nil { + return fmt.Errorf("this.MyFloat32Ptr == nil && that.MyFloat32Ptr != nil") + } else if that1.MyFloat32Ptr != nil { + return fmt.Errorf("MyFloat32Ptr this(%v) Not Equal that(%v)", this.MyFloat32Ptr, that1.MyFloat32Ptr) + } + if this.MyFloat32 != that1.MyFloat32 { + return fmt.Errorf("MyFloat32 this(%v) Not Equal that(%v)", this.MyFloat32, that1.MyFloat32) + } + if this.MyFloat64Ptr != nil && that1.MyFloat64Ptr != nil { + if *this.MyFloat64Ptr != *that1.MyFloat64Ptr { + return fmt.Errorf("MyFloat64Ptr this(%v) Not Equal that(%v)", *this.MyFloat64Ptr, *that1.MyFloat64Ptr) + } + } else if this.MyFloat64Ptr != nil { + return fmt.Errorf("this.MyFloat64Ptr == nil && that.MyFloat64Ptr != nil") + } else if that1.MyFloat64Ptr != nil { + return fmt.Errorf("MyFloat64Ptr this(%v) Not Equal that(%v)", this.MyFloat64Ptr, that1.MyFloat64Ptr) + } + if this.MyFloat64 != that1.MyFloat64 { + return fmt.Errorf("MyFloat64 this(%v) Not Equal that(%v)", this.MyFloat64, that1.MyFloat64) + } + if !bytes.Equal(this.MyBytes, that1.MyBytes) { + return fmt.Errorf("MyBytes this(%v) Not Equal that(%v)", this.MyBytes, that1.MyBytes) + } + if !bytes.Equal(this.NormalBytes, that1.NormalBytes) { + return fmt.Errorf("NormalBytes this(%v) Not Equal that(%v)", this.NormalBytes, that1.NormalBytes) + } + if len(this.MyUint64S) != len(that1.MyUint64S) { + return fmt.Errorf("MyUint64S this(%v) Not Equal that(%v)", len(this.MyUint64S), len(that1.MyUint64S)) + } + for i := range this.MyUint64S { + if this.MyUint64S[i] != that1.MyUint64S[i] { + return fmt.Errorf("MyUint64S this[%v](%v) Not Equal that[%v](%v)", i, this.MyUint64S[i], i, that1.MyUint64S[i]) + } + } + if len(this.MyMap) != len(that1.MyMap) { + return fmt.Errorf("MyMap this(%v) Not Equal that(%v)", len(this.MyMap), len(that1.MyMap)) + } + for i := range this.MyMap { + if this.MyMap[i] != that1.MyMap[i] { + return fmt.Errorf("MyMap this[%v](%v) Not Equal that[%v](%v)", i, this.MyMap[i], i, that1.MyMap[i]) + } + } + if len(this.MyCustomMap) != len(that1.MyCustomMap) { + return fmt.Errorf("MyCustomMap this(%v) Not Equal that(%v)", len(this.MyCustomMap), len(that1.MyCustomMap)) + } + for i := range this.MyCustomMap { + if this.MyCustomMap[i] != that1.MyCustomMap[i] { + return fmt.Errorf("MyCustomMap this[%v](%v) Not Equal that[%v](%v)", i, this.MyCustomMap[i], i, that1.MyCustomMap[i]) + } + } + if len(this.MyNullableMap) != len(that1.MyNullableMap) { + return fmt.Errorf("MyNullableMap this(%v) Not Equal that(%v)", len(this.MyNullableMap), len(that1.MyNullableMap)) + } + for i := range this.MyNullableMap { + if !this.MyNullableMap[i].Equal(that1.MyNullableMap[i]) { + return fmt.Errorf("MyNullableMap this[%v](%v) Not Equal that[%v](%v)", i, this.MyNullableMap[i], i, that1.MyNullableMap[i]) + } + } + if len(this.MyEmbeddedMap) != len(that1.MyEmbeddedMap) { + return fmt.Errorf("MyEmbeddedMap this(%v) Not Equal that(%v)", len(this.MyEmbeddedMap), len(that1.MyEmbeddedMap)) + } + for i := range this.MyEmbeddedMap { + a := this.MyEmbeddedMap[i] + b := that1.MyEmbeddedMap[i] + if !(&a).Equal(&b) { + return fmt.Errorf("MyEmbeddedMap this[%v](%v) Not Equal that[%v](%v)", i, this.MyEmbeddedMap[i], i, that1.MyEmbeddedMap[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *Castaway) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*Castaway) + if !ok { + that2, ok := that.(Castaway) + 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.Int32Ptr != nil && that1.Int32Ptr != nil { + if *this.Int32Ptr != *that1.Int32Ptr { + return false + } + } else if this.Int32Ptr != nil { + return false + } else if that1.Int32Ptr != nil { + return false + } + if this.Int32 != that1.Int32 { + return false + } + if this.MyUint64Ptr != nil && that1.MyUint64Ptr != nil { + if *this.MyUint64Ptr != *that1.MyUint64Ptr { + return false + } + } else if this.MyUint64Ptr != nil { + return false + } else if that1.MyUint64Ptr != nil { + return false + } + if this.MyUint64 != that1.MyUint64 { + return false + } + if this.MyFloat32Ptr != nil && that1.MyFloat32Ptr != nil { + if *this.MyFloat32Ptr != *that1.MyFloat32Ptr { + return false + } + } else if this.MyFloat32Ptr != nil { + return false + } else if that1.MyFloat32Ptr != nil { + return false + } + if this.MyFloat32 != that1.MyFloat32 { + return false + } + if this.MyFloat64Ptr != nil && that1.MyFloat64Ptr != nil { + if *this.MyFloat64Ptr != *that1.MyFloat64Ptr { + return false + } + } else if this.MyFloat64Ptr != nil { + return false + } else if that1.MyFloat64Ptr != nil { + return false + } + if this.MyFloat64 != that1.MyFloat64 { + return false + } + if !bytes.Equal(this.MyBytes, that1.MyBytes) { + return false + } + if !bytes.Equal(this.NormalBytes, that1.NormalBytes) { + return false + } + if len(this.MyUint64S) != len(that1.MyUint64S) { + return false + } + for i := range this.MyUint64S { + if this.MyUint64S[i] != that1.MyUint64S[i] { + return false + } + } + if len(this.MyMap) != len(that1.MyMap) { + return false + } + for i := range this.MyMap { + if this.MyMap[i] != that1.MyMap[i] { + return false + } + } + if len(this.MyCustomMap) != len(that1.MyCustomMap) { + return false + } + for i := range this.MyCustomMap { + if this.MyCustomMap[i] != that1.MyCustomMap[i] { + return false + } + } + if len(this.MyNullableMap) != len(that1.MyNullableMap) { + return false + } + for i := range this.MyNullableMap { + if !this.MyNullableMap[i].Equal(that1.MyNullableMap[i]) { + return false + } + } + if len(this.MyEmbeddedMap) != len(that1.MyEmbeddedMap) { + return false + } + for i := range this.MyEmbeddedMap { + a := this.MyEmbeddedMap[i] + b := that1.MyEmbeddedMap[i] + if !(&a).Equal(&b) { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *Wilson) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*Wilson) + if !ok { + that2, ok := that.(Wilson) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *Wilson") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *Wilson but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *Wilson but is not nil && this == nil") + } + if this.Int64 != nil && that1.Int64 != nil { + if *this.Int64 != *that1.Int64 { + return fmt.Errorf("Int64 this(%v) Not Equal that(%v)", *this.Int64, *that1.Int64) + } + } else if this.Int64 != nil { + return fmt.Errorf("this.Int64 == nil && that.Int64 != nil") + } else if that1.Int64 != nil { + return fmt.Errorf("Int64 this(%v) Not Equal that(%v)", this.Int64, that1.Int64) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *Wilson) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*Wilson) + if !ok { + that2, ok := that.(Wilson) + 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.Int64 != nil && that1.Int64 != nil { + if *this.Int64 != *that1.Int64 { + return false + } + } else if this.Int64 != nil { + return false + } else if that1.Int64 != nil { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} + +type CastawayFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetInt32Ptr() *int32 + GetInt32() int32 + GetMyUint64Ptr() *github_com_gogo_protobuf_test_casttype.MyUint64Type + GetMyUint64() github_com_gogo_protobuf_test_casttype.MyUint64Type + GetMyFloat32Ptr() *github_com_gogo_protobuf_test_casttype.MyFloat32Type + GetMyFloat32() github_com_gogo_protobuf_test_casttype.MyFloat32Type + GetMyFloat64Ptr() *github_com_gogo_protobuf_test_casttype.MyFloat64Type + GetMyFloat64() github_com_gogo_protobuf_test_casttype.MyFloat64Type + GetMyBytes() github_com_gogo_protobuf_test_casttype.Bytes + GetNormalBytes() []byte + GetMyUint64S() []github_com_gogo_protobuf_test_casttype.MyUint64Type + GetMyMap() github_com_gogo_protobuf_test_casttype.MyMapType + GetMyCustomMap() map[github_com_gogo_protobuf_test_casttype.MyStringType]github_com_gogo_protobuf_test_casttype.MyUint64Type + GetMyNullableMap() map[github_com_gogo_protobuf_test_casttype.MyInt32Type]*Wilson + GetMyEmbeddedMap() map[github_com_gogo_protobuf_test_casttype.MyInt32Type]Wilson +} + +func (this *Castaway) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *Castaway) TestProto() github_com_gogo_protobuf_proto.Message { + return NewCastawayFromFace(this) +} + +func (this *Castaway) GetInt32Ptr() *int32 { + return this.Int32Ptr +} + +func (this *Castaway) GetInt32() int32 { + return this.Int32 +} + +func (this *Castaway) GetMyUint64Ptr() *github_com_gogo_protobuf_test_casttype.MyUint64Type { + return this.MyUint64Ptr +} + +func (this *Castaway) GetMyUint64() github_com_gogo_protobuf_test_casttype.MyUint64Type { + return this.MyUint64 +} + +func (this *Castaway) GetMyFloat32Ptr() *github_com_gogo_protobuf_test_casttype.MyFloat32Type { + return this.MyFloat32Ptr +} + +func (this *Castaway) GetMyFloat32() github_com_gogo_protobuf_test_casttype.MyFloat32Type { + return this.MyFloat32 +} + +func (this *Castaway) GetMyFloat64Ptr() *github_com_gogo_protobuf_test_casttype.MyFloat64Type { + return this.MyFloat64Ptr +} + +func (this *Castaway) GetMyFloat64() github_com_gogo_protobuf_test_casttype.MyFloat64Type { + return this.MyFloat64 +} + +func (this *Castaway) GetMyBytes() github_com_gogo_protobuf_test_casttype.Bytes { + return this.MyBytes +} + +func (this *Castaway) GetNormalBytes() []byte { + return this.NormalBytes +} + +func (this *Castaway) GetMyUint64S() []github_com_gogo_protobuf_test_casttype.MyUint64Type { + return this.MyUint64S +} + +func (this *Castaway) GetMyMap() github_com_gogo_protobuf_test_casttype.MyMapType { + return this.MyMap +} + +func (this *Castaway) GetMyCustomMap() map[github_com_gogo_protobuf_test_casttype.MyStringType]github_com_gogo_protobuf_test_casttype.MyUint64Type { + return this.MyCustomMap +} + +func (this *Castaway) GetMyNullableMap() map[github_com_gogo_protobuf_test_casttype.MyInt32Type]*Wilson { + return this.MyNullableMap +} + +func (this *Castaway) GetMyEmbeddedMap() map[github_com_gogo_protobuf_test_casttype.MyInt32Type]Wilson { + return this.MyEmbeddedMap +} + +func NewCastawayFromFace(that CastawayFace) *Castaway { + this := &Castaway{} + this.Int32Ptr = that.GetInt32Ptr() + this.Int32 = that.GetInt32() + this.MyUint64Ptr = that.GetMyUint64Ptr() + this.MyUint64 = that.GetMyUint64() + this.MyFloat32Ptr = that.GetMyFloat32Ptr() + this.MyFloat32 = that.GetMyFloat32() + this.MyFloat64Ptr = that.GetMyFloat64Ptr() + this.MyFloat64 = that.GetMyFloat64() + this.MyBytes = that.GetMyBytes() + this.NormalBytes = that.GetNormalBytes() + this.MyUint64S = that.GetMyUint64S() + this.MyMap = that.GetMyMap() + this.MyCustomMap = that.GetMyCustomMap() + this.MyNullableMap = that.GetMyNullableMap() + this.MyEmbeddedMap = that.GetMyEmbeddedMap() + return this +} + +type WilsonFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetInt64() *int64 +} + +func (this *Wilson) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *Wilson) TestProto() github_com_gogo_protobuf_proto.Message { + return NewWilsonFromFace(this) +} + +func (this *Wilson) GetInt64() *int64 { + return this.Int64 +} + +func NewWilsonFromFace(that WilsonFace) *Wilson { + this := &Wilson{} + this.Int64 = that.GetInt64() + return this +} + +func (this *Castaway) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 19) + s = append(s, "&casttype.Castaway{") + if this.Int32Ptr != nil { + s = append(s, "Int32Ptr: "+valueToGoStringCasttype(this.Int32Ptr, "int32")+",\n") + } + s = append(s, "Int32: "+fmt.Sprintf("%#v", this.Int32)+",\n") + if this.MyUint64Ptr != nil { + s = append(s, "MyUint64Ptr: "+valueToGoStringCasttype(this.MyUint64Ptr, "github_com_gogo_protobuf_test_casttype.MyUint64Type")+",\n") + } + s = append(s, "MyUint64: "+fmt.Sprintf("%#v", this.MyUint64)+",\n") + if this.MyFloat32Ptr != nil { + s = append(s, "MyFloat32Ptr: "+valueToGoStringCasttype(this.MyFloat32Ptr, "github_com_gogo_protobuf_test_casttype.MyFloat32Type")+",\n") + } + s = append(s, "MyFloat32: "+fmt.Sprintf("%#v", this.MyFloat32)+",\n") + if this.MyFloat64Ptr != nil { + s = append(s, "MyFloat64Ptr: "+valueToGoStringCasttype(this.MyFloat64Ptr, "github_com_gogo_protobuf_test_casttype.MyFloat64Type")+",\n") + } + s = append(s, "MyFloat64: "+fmt.Sprintf("%#v", this.MyFloat64)+",\n") + if this.MyBytes != nil { + s = append(s, "MyBytes: "+valueToGoStringCasttype(this.MyBytes, "github_com_gogo_protobuf_test_casttype.Bytes")+",\n") + } + if this.NormalBytes != nil { + s = append(s, "NormalBytes: "+valueToGoStringCasttype(this.NormalBytes, "byte")+",\n") + } + if this.MyUint64S != nil { + s = append(s, "MyUint64S: "+fmt.Sprintf("%#v", this.MyUint64S)+",\n") + } + keysForMyMap := make([]string, 0, len(this.MyMap)) + for k := range this.MyMap { + keysForMyMap = append(keysForMyMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForMyMap) + mapStringForMyMap := "github_com_gogo_protobuf_test_casttype.MyMapType{" + for _, k := range keysForMyMap { + mapStringForMyMap += fmt.Sprintf("%#v: %#v,", k, this.MyMap[k]) + } + mapStringForMyMap += "}" + if this.MyMap != nil { + s = append(s, "MyMap: "+mapStringForMyMap+",\n") + } + keysForMyCustomMap := make([]string, 0, len(this.MyCustomMap)) + for k := range this.MyCustomMap { + keysForMyCustomMap = append(keysForMyCustomMap, string(k)) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForMyCustomMap) + mapStringForMyCustomMap := "map[github_com_gogo_protobuf_test_casttype.MyStringType]github_com_gogo_protobuf_test_casttype.MyUint64Type{" + for _, k := range keysForMyCustomMap { + mapStringForMyCustomMap += fmt.Sprintf("%#v: %#v,", k, this.MyCustomMap[github_com_gogo_protobuf_test_casttype.MyStringType(k)]) + } + mapStringForMyCustomMap += "}" + if this.MyCustomMap != nil { + s = append(s, "MyCustomMap: "+mapStringForMyCustomMap+",\n") + } + keysForMyNullableMap := make([]int32, 0, len(this.MyNullableMap)) + for k := range this.MyNullableMap { + keysForMyNullableMap = append(keysForMyNullableMap, int32(k)) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForMyNullableMap) + mapStringForMyNullableMap := "map[github_com_gogo_protobuf_test_casttype.MyInt32Type]*Wilson{" + for _, k := range keysForMyNullableMap { + mapStringForMyNullableMap += fmt.Sprintf("%#v: %#v,", k, this.MyNullableMap[github_com_gogo_protobuf_test_casttype.MyInt32Type(k)]) + } + mapStringForMyNullableMap += "}" + if this.MyNullableMap != nil { + s = append(s, "MyNullableMap: "+mapStringForMyNullableMap+",\n") + } + keysForMyEmbeddedMap := make([]int32, 0, len(this.MyEmbeddedMap)) + for k := range this.MyEmbeddedMap { + keysForMyEmbeddedMap = append(keysForMyEmbeddedMap, int32(k)) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForMyEmbeddedMap) + mapStringForMyEmbeddedMap := "map[github_com_gogo_protobuf_test_casttype.MyInt32Type]Wilson{" + for _, k := range keysForMyEmbeddedMap { + mapStringForMyEmbeddedMap += fmt.Sprintf("%#v: %#v,", k, this.MyEmbeddedMap[github_com_gogo_protobuf_test_casttype.MyInt32Type(k)]) + } + mapStringForMyEmbeddedMap += "}" + if this.MyEmbeddedMap != nil { + s = append(s, "MyEmbeddedMap: "+mapStringForMyEmbeddedMap+",\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 *Wilson) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&casttype.Wilson{") + if this.Int64 != nil { + s = append(s, "Int64: "+valueToGoStringCasttype(this.Int64, "int64")+",\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 valueToGoStringCasttype(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 extensionToGoStringCasttype(e map[int32]github_com_gogo_protobuf_proto.Extension) string { + if e == nil { + return "nil" + } + s := "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 +} +func NewPopulatedCastaway(r randyCasttype, easy bool) *Castaway { + this := &Castaway{} + if r.Intn(10) != 0 { + v1 := int32(r.Int63()) + if r.Intn(2) == 0 { + v1 *= -1 + } + this.Int32Ptr = &v1 + } + this.Int32 = int32(r.Int63()) + if r.Intn(2) == 0 { + this.Int32 *= -1 + } + if r.Intn(10) != 0 { + v2 := github_com_gogo_protobuf_test_casttype.MyUint64Type(uint64(r.Uint32())) + this.MyUint64Ptr = &v2 + } + this.MyUint64 = github_com_gogo_protobuf_test_casttype.MyUint64Type(uint64(r.Uint32())) + if r.Intn(10) != 0 { + v3 := github_com_gogo_protobuf_test_casttype.MyFloat32Type(r.Float32()) + if r.Intn(2) == 0 { + v3 *= -1 + } + this.MyFloat32Ptr = &v3 + } + this.MyFloat32 = github_com_gogo_protobuf_test_casttype.MyFloat32Type(r.Float32()) + if r.Intn(2) == 0 { + this.MyFloat32 *= -1 + } + if r.Intn(10) != 0 { + v4 := github_com_gogo_protobuf_test_casttype.MyFloat64Type(r.Float64()) + if r.Intn(2) == 0 { + v4 *= -1 + } + this.MyFloat64Ptr = &v4 + } + this.MyFloat64 = github_com_gogo_protobuf_test_casttype.MyFloat64Type(r.Float64()) + if r.Intn(2) == 0 { + this.MyFloat64 *= -1 + } + if r.Intn(10) != 0 { + v5 := r.Intn(100) + this.MyBytes = make(github_com_gogo_protobuf_test_casttype.Bytes, v5) + for i := 0; i < v5; i++ { + this.MyBytes[i] = byte(r.Intn(256)) + } + } + if r.Intn(10) != 0 { + v6 := r.Intn(100) + this.NormalBytes = make([]byte, v6) + for i := 0; i < v6; i++ { + this.NormalBytes[i] = byte(r.Intn(256)) + } + } + if r.Intn(10) != 0 { + v7 := r.Intn(10) + this.MyUint64S = make([]github_com_gogo_protobuf_test_casttype.MyUint64Type, v7) + for i := 0; i < v7; i++ { + this.MyUint64S[i] = github_com_gogo_protobuf_test_casttype.MyUint64Type(uint64(r.Uint32())) + } + } + if r.Intn(10) != 0 { + v8 := r.Intn(10) + this.MyMap = make(github_com_gogo_protobuf_test_casttype.MyMapType) + for i := 0; i < v8; i++ { + v9 := randStringCasttype(r) + this.MyMap[v9] = uint64(uint64(r.Uint32())) + } + } + if r.Intn(10) != 0 { + v10 := r.Intn(10) + this.MyCustomMap = make(map[github_com_gogo_protobuf_test_casttype.MyStringType]github_com_gogo_protobuf_test_casttype.MyUint64Type) + for i := 0; i < v10; i++ { + v11 := github_com_gogo_protobuf_test_casttype.MyStringType(randStringCasttype(r)) + this.MyCustomMap[v11] = github_com_gogo_protobuf_test_casttype.MyUint64Type(uint64(r.Uint32())) + } + } + if r.Intn(10) != 0 { + v12 := r.Intn(10) + this.MyNullableMap = make(map[github_com_gogo_protobuf_test_casttype.MyInt32Type]*Wilson) + for i := 0; i < v12; i++ { + this.MyNullableMap[github_com_gogo_protobuf_test_casttype.MyInt32Type(int32(r.Int31()))] = NewPopulatedWilson(r, easy) + } + } + if r.Intn(10) != 0 { + v13 := r.Intn(10) + this.MyEmbeddedMap = make(map[github_com_gogo_protobuf_test_casttype.MyInt32Type]Wilson) + for i := 0; i < v13; i++ { + this.MyEmbeddedMap[github_com_gogo_protobuf_test_casttype.MyInt32Type(int32(r.Int31()))] = *NewPopulatedWilson(r, easy) + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedCasttype(r, 16) + } + return this +} + +func NewPopulatedWilson(r randyCasttype, easy bool) *Wilson { + this := &Wilson{} + if r.Intn(10) != 0 { + v14 := int64(r.Int63()) + if r.Intn(2) == 0 { + v14 *= -1 + } + this.Int64 = &v14 + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedCasttype(r, 2) + } + return this +} + +type randyCasttype interface { + Float32() float32 + Float64() float64 + Int63() int64 + Int31() int32 + Uint32() uint32 + Intn(n int) int +} + +func randUTF8RuneCasttype(r randyCasttype) 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 randStringCasttype(r randyCasttype) string { + v15 := r.Intn(100) + tmps := make([]rune, v15) + for i := 0; i < v15; i++ { + tmps[i] = randUTF8RuneCasttype(r) + } + return string(tmps) +} +func randUnrecognizedCasttype(r randyCasttype, 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 = randFieldCasttype(data, r, fieldNumber, wire) + } + return data +} +func randFieldCasttype(data []byte, r randyCasttype, fieldNumber int, wire int) []byte { + key := uint32(fieldNumber)<<3 | uint32(wire) + switch wire { + case 0: + data = encodeVarintPopulateCasttype(data, uint64(key)) + v16 := r.Int63() + if r.Intn(2) == 0 { + v16 *= -1 + } + data = encodeVarintPopulateCasttype(data, uint64(v16)) + case 1: + data = encodeVarintPopulateCasttype(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 = encodeVarintPopulateCasttype(data, uint64(key)) + ll := r.Intn(100) + data = encodeVarintPopulateCasttype(data, uint64(ll)) + for j := 0; j < ll; j++ { + data = append(data, byte(r.Intn(256))) + } + default: + data = encodeVarintPopulateCasttype(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 encodeVarintPopulateCasttype(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 *Castaway) Size() (n int) { + var l int + _ = l + if m.Int32Ptr != nil { + n += 1 + sovCasttype(uint64(*m.Int32Ptr)) + } + n += 1 + sovCasttype(uint64(m.Int32)) + if m.MyUint64Ptr != nil { + n += 1 + sovCasttype(uint64(*m.MyUint64Ptr)) + } + n += 1 + sovCasttype(uint64(m.MyUint64)) + if m.MyFloat32Ptr != nil { + n += 5 + } + n += 5 + if m.MyFloat64Ptr != nil { + n += 9 + } + n += 9 + if m.MyBytes != nil { + l = len(m.MyBytes) + n += 1 + l + sovCasttype(uint64(l)) + } + if m.NormalBytes != nil { + l = len(m.NormalBytes) + n += 1 + l + sovCasttype(uint64(l)) + } + if len(m.MyUint64S) > 0 { + for _, e := range m.MyUint64S { + n += 1 + sovCasttype(uint64(e)) + } + } + if len(m.MyMap) > 0 { + for k, v := range m.MyMap { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovCasttype(uint64(len(k))) + 1 + sovCasttype(uint64(v)) + n += mapEntrySize + 1 + sovCasttype(uint64(mapEntrySize)) + } + } + if len(m.MyCustomMap) > 0 { + for k, v := range m.MyCustomMap { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovCasttype(uint64(len(k))) + 1 + sovCasttype(uint64(v)) + n += mapEntrySize + 1 + sovCasttype(uint64(mapEntrySize)) + } + } + if len(m.MyNullableMap) > 0 { + for k, v := range m.MyNullableMap { + _ = k + _ = v + l = 0 + if v != nil { + l = v.Size() + } + mapEntrySize := 1 + sovCasttype(uint64(k)) + 1 + l + sovCasttype(uint64(l)) + n += mapEntrySize + 1 + sovCasttype(uint64(mapEntrySize)) + } + } + if len(m.MyEmbeddedMap) > 0 { + for k, v := range m.MyEmbeddedMap { + _ = k + _ = v + l = v.Size() + mapEntrySize := 1 + sovCasttype(uint64(k)) + 1 + l + sovCasttype(uint64(l)) + n += mapEntrySize + 1 + sovCasttype(uint64(mapEntrySize)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *Wilson) Size() (n int) { + var l int + _ = l + if m.Int64 != nil { + n += 1 + sovCasttype(uint64(*m.Int64)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func sovCasttype(x uint64) (n int) { + for { + n++ + x >>= 7 + if x == 0 { + break + } + } + return n +} +func sozCasttype(x uint64) (n int) { + return sovCasttype(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (this *Castaway) String() string { + if this == nil { + return "nil" + } + keysForMyMap := make([]string, 0, len(this.MyMap)) + for k := range this.MyMap { + keysForMyMap = append(keysForMyMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForMyMap) + mapStringForMyMap := "github_com_gogo_protobuf_test_casttype.MyMapType{" + for _, k := range keysForMyMap { + mapStringForMyMap += fmt.Sprintf("%v: %v,", k, this.MyMap[k]) + } + mapStringForMyMap += "}" + keysForMyCustomMap := make([]string, 0, len(this.MyCustomMap)) + for k := range this.MyCustomMap { + keysForMyCustomMap = append(keysForMyCustomMap, string(k)) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForMyCustomMap) + mapStringForMyCustomMap := "map[github_com_gogo_protobuf_test_casttype.MyStringType]github_com_gogo_protobuf_test_casttype.MyUint64Type{" + for _, k := range keysForMyCustomMap { + mapStringForMyCustomMap += fmt.Sprintf("%v: %v,", k, this.MyCustomMap[github_com_gogo_protobuf_test_casttype.MyStringType(k)]) + } + mapStringForMyCustomMap += "}" + keysForMyNullableMap := make([]int32, 0, len(this.MyNullableMap)) + for k := range this.MyNullableMap { + keysForMyNullableMap = append(keysForMyNullableMap, int32(k)) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForMyNullableMap) + mapStringForMyNullableMap := "map[github_com_gogo_protobuf_test_casttype.MyInt32Type]*Wilson{" + for _, k := range keysForMyNullableMap { + mapStringForMyNullableMap += fmt.Sprintf("%v: %v,", k, this.MyNullableMap[github_com_gogo_protobuf_test_casttype.MyInt32Type(k)]) + } + mapStringForMyNullableMap += "}" + keysForMyEmbeddedMap := make([]int32, 0, len(this.MyEmbeddedMap)) + for k := range this.MyEmbeddedMap { + keysForMyEmbeddedMap = append(keysForMyEmbeddedMap, int32(k)) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForMyEmbeddedMap) + mapStringForMyEmbeddedMap := "map[github_com_gogo_protobuf_test_casttype.MyInt32Type]Wilson{" + for _, k := range keysForMyEmbeddedMap { + mapStringForMyEmbeddedMap += fmt.Sprintf("%v: %v,", k, this.MyEmbeddedMap[github_com_gogo_protobuf_test_casttype.MyInt32Type(k)]) + } + mapStringForMyEmbeddedMap += "}" + s := strings.Join([]string{`&Castaway{`, + `Int32Ptr:` + valueToStringCasttype(this.Int32Ptr) + `,`, + `Int32:` + fmt.Sprintf("%v", this.Int32) + `,`, + `MyUint64Ptr:` + valueToStringCasttype(this.MyUint64Ptr) + `,`, + `MyUint64:` + fmt.Sprintf("%v", this.MyUint64) + `,`, + `MyFloat32Ptr:` + valueToStringCasttype(this.MyFloat32Ptr) + `,`, + `MyFloat32:` + fmt.Sprintf("%v", this.MyFloat32) + `,`, + `MyFloat64Ptr:` + valueToStringCasttype(this.MyFloat64Ptr) + `,`, + `MyFloat64:` + fmt.Sprintf("%v", this.MyFloat64) + `,`, + `MyBytes:` + valueToStringCasttype(this.MyBytes) + `,`, + `NormalBytes:` + valueToStringCasttype(this.NormalBytes) + `,`, + `MyUint64S:` + fmt.Sprintf("%v", this.MyUint64S) + `,`, + `MyMap:` + mapStringForMyMap + `,`, + `MyCustomMap:` + mapStringForMyCustomMap + `,`, + `MyNullableMap:` + mapStringForMyNullableMap + `,`, + `MyEmbeddedMap:` + mapStringForMyEmbeddedMap + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *Wilson) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&Wilson{`, + `Int64:` + valueToStringCasttype(this.Int64) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func valueToStringCasttype(v interface{}) string { + rv := reflect.ValueOf(v) + if rv.IsNil() { + return "nil" + } + pv := reflect.Indirect(rv).Interface() + return fmt.Sprintf("*%v", pv) +} + +var fileDescriptorCasttype = []byte{ + // 668 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xa4, 0x95, 0xbf, 0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x0d, 0xe1, 0xf3, 0x05, 0xce, 0x12, 0x78, 0x46, 0xb8, 0x99, 0x25, 0x48, 0xad, 0x4a, 0x5a, 0xa2, + 0x6d, 0xd3, 0xf2, 0x5d, 0xe7, 0x1c, 0xf3, 0x6c, 0xb9, 0xae, 0xc6, 0x5c, 0xa8, 0xa1, 0x59, 0x36, + 0x49, 0xf6, 0xb2, 0x41, 0x5f, 0x7b, 0xfa, 0x53, 0xa2, 0x7f, 0x98, 0x4e, 0x5b, 0x79, 0x3c, 0x3e, + 0xac, 0x4d, 0xfd, 0x04, 0xfb, 0x05, 0x76, 0x70, 0x58, 0xe3, 0x8e, 0xc1, 0x4e, 0xc0, 0x4e, 0xc1, + 0x76, 0x8f, 0x6a, 0xdc, 0x17, 0xb0, 0xaf, 0x60, 0xdf, 0xc1, 0x7e, 0x80, 0x8d, 0x8f, 0xc0, 0x1f, + 0xec, 0x00, 0xfa, 0xc7, 0xd0, 0x9e, 0x40, 0x7b, 0x0a, 0xed, 0xee, 0xef, 0xda, 0xd4, 0xdf, 0x00, + 0x00, 0x00, 0xff, 0xff, 0xc5, 0x8d, 0x07, 0x8c, 0x61, 0x07, 0x00, 0x00, +} diff --git a/vendor/github.com/gogo/protobuf/test/casttype/combos/neither/casttype.proto b/vendor/github.com/gogo/protobuf/test/casttype/combos/neither/casttype.proto new file mode 100644 index 000000000..991958182 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/casttype/combos/neither/casttype.proto @@ -0,0 +1,77 @@ +// Copyright (c) 2015, Vastech SA (PTY) LTD. All rights reserved. +// http://github.com/gogo/protobuf/gogoproto +// +// 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 casttype; + +import "github.com/gogo/protobuf/gogoproto/gogo.proto"; + +option (gogoproto.goproto_stringer_all) = false; +option (gogoproto.goproto_enum_prefix_all) = false; +option (gogoproto.goproto_getters_all) = false; + +option (gogoproto.equal_all) = true; +option (gogoproto.verbose_equal_all) = true; +option (gogoproto.stringer_all) = true; +option (gogoproto.gostring_all) = true; +option (gogoproto.face_all) = true; +option (gogoproto.description_all) = true; + +option (gogoproto.testgen_all) = true; +option (gogoproto.populate_all) = true; +option (gogoproto.benchgen_all) = true; +option (gogoproto.unmarshaler_all) = false; +option (gogoproto.marshaler_all) = false; +option (gogoproto.sizer_all) = true; + +option (gogoproto.goproto_enum_stringer_all) = false; +option (gogoproto.enum_stringer_all) = true; + +option (gogoproto.unsafe_marshaler_all) = false; +option (gogoproto.unsafe_unmarshaler_all) = false; + +message Castaway { + optional int64 Int32Ptr = 1 [(gogoproto.casttype) = "int32"]; + optional int64 Int32 = 2 [(gogoproto.casttype) = "int32", (gogoproto.nullable) = false]; + optional uint64 MyUint64Ptr = 3 [(gogoproto.casttype) = "github.com/gogo/protobuf/test/casttype.MyUint64Type"]; + optional uint64 MyUint64 = 4 [(gogoproto.casttype) = "github.com/gogo/protobuf/test/casttype.MyUint64Type", (gogoproto.nullable) = false]; + optional float MyFloat32Ptr = 5 [(gogoproto.casttype) = "github.com/gogo/protobuf/test/casttype.MyFloat32Type"]; + optional float MyFloat32 = 6 [(gogoproto.casttype) = "github.com/gogo/protobuf/test/casttype.MyFloat32Type", (gogoproto.nullable) = false]; + optional double MyFloat64Ptr = 7 [(gogoproto.casttype) = "github.com/gogo/protobuf/test/casttype.MyFloat64Type"]; + optional double MyFloat64 = 8 [(gogoproto.casttype) = "github.com/gogo/protobuf/test/casttype.MyFloat64Type", (gogoproto.nullable) = false]; + optional bytes MyBytes = 9 [(gogoproto.casttype) = "github.com/gogo/protobuf/test/casttype.Bytes"]; + optional bytes NormalBytes = 10; + repeated uint64 MyUint64s = 11 [(gogoproto.casttype) = "github.com/gogo/protobuf/test/casttype.MyUint64Type"]; + map MyMap = 12 [(gogoproto.casttype) = "github.com/gogo/protobuf/test/casttype.MyMapType"]; + map MyCustomMap = 13 [(gogoproto.castkey) = "github.com/gogo/protobuf/test/casttype.MyStringType", (gogoproto.castvalue) = "github.com/gogo/protobuf/test/casttype.MyUint64Type"]; + map MyNullableMap = 14 [(gogoproto.castkey) = "github.com/gogo/protobuf/test/casttype.MyInt32Type"]; + map MyEmbeddedMap = 15 [(gogoproto.castkey) = "github.com/gogo/protobuf/test/casttype.MyInt32Type", (gogoproto.nullable) = false]; +} + +message Wilson { + optional int64 Int64 = 1; +} diff --git a/vendor/github.com/gogo/protobuf/test/casttype/combos/neither/casttypepb_test.go b/vendor/github.com/gogo/protobuf/test/casttype/combos/neither/casttypepb_test.go new file mode 100644 index 000000000..0f1fb9261 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/casttype/combos/neither/casttypepb_test.go @@ -0,0 +1,457 @@ +// Code generated by protoc-gen-gogo. +// source: combos/neither/casttype.proto +// DO NOT EDIT! + +/* +Package casttype is a generated protocol buffer package. + +It is generated from these files: + combos/neither/casttype.proto + +It has these top-level messages: + Castaway + Wilson +*/ +package casttype + +import testing "testing" +import math_rand "math/rand" +import time "time" +import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" +import github_com_gogo_protobuf_jsonpb "github.com/gogo/protobuf/jsonpb" +import fmt "fmt" +import go_parser "go/parser" +import proto "github.com/gogo/protobuf/proto" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +func TestCastawayProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCastaway(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Castaway{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkCastawayProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Castaway, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedCastaway(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkCastawayProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedCastaway(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &Castaway{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestWilsonProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedWilson(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Wilson{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkWilsonProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Wilson, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedWilson(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkWilsonProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedWilson(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &Wilson{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestCastawayJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCastaway(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Castaway{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestWilsonJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedWilson(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Wilson{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestCastawayProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCastaway(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &Castaway{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestCastawayProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCastaway(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &Castaway{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestWilsonProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedWilson(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &Wilson{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestWilsonProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedWilson(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &Wilson{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestCasttypeDescription(t *testing.T) { + CasttypeDescription() +} +func TestCastawayVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCastaway(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &Castaway{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestWilsonVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedWilson(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &Wilson{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestCastawayFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCastaway(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestWilsonFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedWilson(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestCastawayGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCastaway(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestWilsonGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedWilson(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestCastawaySize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCastaway(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkCastawaySize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Castaway, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedCastaway(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestWilsonSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedWilson(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkWilsonSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Wilson, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedWilson(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestCastawayStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCastaway(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestWilsonStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedWilson(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} + +//These tests are generated by github.com/gogo/protobuf/plugin/testgen diff --git a/vendor/github.com/gogo/protobuf/test/casttype/combos/unmarshaler/casttype.pb.go b/vendor/github.com/gogo/protobuf/test/casttype/combos/unmarshaler/casttype.pb.go new file mode 100644 index 000000000..1fc4553c0 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/casttype/combos/unmarshaler/casttype.pb.go @@ -0,0 +1,2215 @@ +// Code generated by protoc-gen-gogo. +// source: combos/unmarshaler/casttype.proto +// DO NOT EDIT! + +/* + Package casttype is a generated protocol buffer package. + + It is generated from these files: + combos/unmarshaler/casttype.proto + + It has these top-level messages: + Castaway + Wilson +*/ +package casttype + +import proto "github.com/gogo/protobuf/proto" +import fmt "fmt" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" + +import github_com_gogo_protobuf_test_casttype "github.com/gogo/protobuf/test/casttype" + +import github_com_gogo_protobuf_protoc_gen_gogo_descriptor "github.com/gogo/protobuf/protoc-gen-gogo/descriptor" +import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" +import compress_gzip "compress/gzip" +import bytes "bytes" +import io_ioutil "io/ioutil" + +import strings "strings" +import sort "sort" +import strconv "strconv" +import reflect "reflect" +import github_com_gogo_protobuf_sortkeys "github.com/gogo/protobuf/sortkeys" + +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. +const _ = proto.GoGoProtoPackageIsVersion1 + +type Castaway struct { + Int32Ptr *int32 `protobuf:"varint,1,opt,name=Int32Ptr,json=int32Ptr,casttype=int32" json:"Int32Ptr,omitempty"` + Int32 int32 `protobuf:"varint,2,opt,name=Int32,json=int32,casttype=int32" json:"Int32"` + MyUint64Ptr *github_com_gogo_protobuf_test_casttype.MyUint64Type `protobuf:"varint,3,opt,name=MyUint64Ptr,json=myUint64Ptr,casttype=github.com/gogo/protobuf/test/casttype.MyUint64Type" json:"MyUint64Ptr,omitempty"` + MyUint64 github_com_gogo_protobuf_test_casttype.MyUint64Type `protobuf:"varint,4,opt,name=MyUint64,json=myUint64,casttype=github.com/gogo/protobuf/test/casttype.MyUint64Type" json:"MyUint64"` + MyFloat32Ptr *github_com_gogo_protobuf_test_casttype.MyFloat32Type `protobuf:"fixed32,5,opt,name=MyFloat32Ptr,json=myFloat32Ptr,casttype=github.com/gogo/protobuf/test/casttype.MyFloat32Type" json:"MyFloat32Ptr,omitempty"` + MyFloat32 github_com_gogo_protobuf_test_casttype.MyFloat32Type `protobuf:"fixed32,6,opt,name=MyFloat32,json=myFloat32,casttype=github.com/gogo/protobuf/test/casttype.MyFloat32Type" json:"MyFloat32"` + MyFloat64Ptr *github_com_gogo_protobuf_test_casttype.MyFloat64Type `protobuf:"fixed64,7,opt,name=MyFloat64Ptr,json=myFloat64Ptr,casttype=github.com/gogo/protobuf/test/casttype.MyFloat64Type" json:"MyFloat64Ptr,omitempty"` + MyFloat64 github_com_gogo_protobuf_test_casttype.MyFloat64Type `protobuf:"fixed64,8,opt,name=MyFloat64,json=myFloat64,casttype=github.com/gogo/protobuf/test/casttype.MyFloat64Type" json:"MyFloat64"` + MyBytes github_com_gogo_protobuf_test_casttype.Bytes `protobuf:"bytes,9,opt,name=MyBytes,json=myBytes,casttype=github.com/gogo/protobuf/test/casttype.Bytes" json:"MyBytes,omitempty"` + NormalBytes []byte `protobuf:"bytes,10,opt,name=NormalBytes,json=normalBytes" json:"NormalBytes,omitempty"` + MyUint64S []github_com_gogo_protobuf_test_casttype.MyUint64Type `protobuf:"varint,11,rep,name=MyUint64s,json=myUint64s,casttype=github.com/gogo/protobuf/test/casttype.MyUint64Type" json:"MyUint64s,omitempty"` + MyMap github_com_gogo_protobuf_test_casttype.MyMapType `protobuf:"bytes,12,rep,name=MyMap,json=myMap,casttype=github.com/gogo/protobuf/test/casttype.MyMapType" json:"MyMap,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"varint,2,opt,name=value"` + MyCustomMap map[github_com_gogo_protobuf_test_casttype.MyStringType]github_com_gogo_protobuf_test_casttype.MyUint64Type `protobuf:"bytes,13,rep,name=MyCustomMap,json=myCustomMap,castkey=github.com/gogo/protobuf/test/casttype.MyStringType,castvalue=github.com/gogo/protobuf/test/casttype.MyUint64Type" json:"MyCustomMap,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"varint,2,opt,name=value"` + MyNullableMap map[github_com_gogo_protobuf_test_casttype.MyInt32Type]*Wilson `protobuf:"bytes,14,rep,name=MyNullableMap,json=myNullableMap,castkey=github.com/gogo/protobuf/test/casttype.MyInt32Type" json:"MyNullableMap,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + MyEmbeddedMap map[github_com_gogo_protobuf_test_casttype.MyInt32Type]Wilson `protobuf:"bytes,15,rep,name=MyEmbeddedMap,json=myEmbeddedMap,castkey=github.com/gogo/protobuf/test/casttype.MyInt32Type" json:"MyEmbeddedMap" protobuf_key:"varint,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *Castaway) Reset() { *m = Castaway{} } +func (*Castaway) ProtoMessage() {} +func (*Castaway) Descriptor() ([]byte, []int) { return fileDescriptorCasttype, []int{0} } + +type Wilson struct { + Int64 *int64 `protobuf:"varint,1,opt,name=Int64,json=int64" json:"Int64,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *Wilson) Reset() { *m = Wilson{} } +func (*Wilson) ProtoMessage() {} +func (*Wilson) Descriptor() ([]byte, []int) { return fileDescriptorCasttype, []int{1} } + +func init() { + proto.RegisterType((*Castaway)(nil), "casttype.Castaway") + proto.RegisterType((*Wilson)(nil), "casttype.Wilson") +} +func (this *Castaway) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return CasttypeDescription() +} +func (this *Wilson) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return CasttypeDescription() +} +func CasttypeDescription() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + d := &github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet{} + var gzipped = []byte{ + // 3786 bytes of a gzipped FileDescriptorSet + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xcc, 0x5a, 0x6b, 0x6c, 0x1c, 0xf7, + 0x56, 0xcf, 0xbe, 0xec, 0xdd, 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 0x8d, 0xe3, 0xfc, 0x24, 0xcf, 0xde, 0xdf, 0x37, 0x10, 0x56, 0xb8, 0x8e, + 0x2a, 0x95, 0x95, 0x22, 0x64, 0x1c, 0xbb, 0xd5, 0x2c, 0x1b, 0x5a, 0xd9, 0xae, 0x18, 0x5a, 0xcd, + 0xda, 0xb4, 0xb3, 0x09, 0x46, 0x70, 0xac, 0xf7, 0x41, 0x98, 0xe2, 0x1c, 0xea, 0x15, 0x51, 0x4d, + 0x4d, 0x3b, 0x1d, 0xd7, 0xca, 0x41, 0x18, 0x72, 0xb6, 0x2d, 0x57, 0xbf, 0x93, 0x4d, 0xb1, 0x08, + 0x11, 0x57, 0x53, 0xff, 0x1d, 0x83, 0xd1, 0x41, 0x42, 0xec, 0x12, 0xc4, 0x36, 0xe9, 0x29, 0x31, + 0xc0, 0xf6, 0xe0, 0x03, 0x8e, 0xe9, 0x74, 0xe2, 0xd0, 0x3e, 0x9d, 0x38, 0x0b, 0x49, 0xcb, 0x70, + 0x5c, 0xa3, 0xc2, 0x23, 0x22, 0x32, 0x60, 0x4c, 0x01, 0x07, 0xf5, 0x86, 0x54, 0x74, 0x5f, 0x21, + 0x75, 0x0d, 0x46, 0x3d, 0x93, 0xb4, 0xa6, 0x6e, 0x55, 0x65, 0x6c, 0xce, 0x04, 0x59, 0x32, 0x5d, + 0x90, 0x38, 0x95, 0x60, 0x6a, 0xda, 0xe8, 0xb8, 0x56, 0xe6, 0x01, 0x6c, 0xcb, 0xb0, 0x37, 0x71, + 0x79, 0x95, 0x4d, 0x8c, 0x93, 0xfe, 0x5e, 0x5a, 0x21, 0x95, 0x1e, 0x2f, 0xd9, 0x5c, 0x5a, 0x36, + 0x95, 0xc7, 0xda, 0xa1, 0x36, 0xbc, 0x43, 0xa4, 0x2c, 0xf1, 0x45, 0xd6, 0x13, 0x6d, 0x25, 0x48, + 0x37, 0x0d, 0x8a, 0x7b, 0x74, 0x31, 0x7f, 0xb2, 0x04, 0x33, 0x62, 0x3a, 0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, 0x5e, 0x07, 0xfb, 0x19, 0x62, 0x9c, 0xe1, 0x21, 0x3f, 0x43, 0xf2, 0x6c, 0xa6, 0xed, + 0xa2, 0xab, 0x35, 0x13, 0x8b, 0x76, 0x0f, 0x67, 0xb7, 0xbb, 0xbe, 0x18, 0xe7, 0xd4, 0x51, 0x18, + 0xe2, 0x42, 0x7a, 0x96, 0x22, 0xcb, 0xf6, 0xac, 0x28, 0xb1, 0x0a, 0x73, 0xfe, 0x5c, 0x7e, 0xf1, + 0x9d, 0x0f, 0x8e, 0x1e, 0xf8, 0x1b, 0xfc, 0xfc, 0x3d, 0x7e, 0xde, 0xff, 0xe0, 0x68, 0xe8, 0x63, + 0xfc, 0x7c, 0x8a, 0x9f, 0xcf, 0xf0, 0xf3, 0xe4, 0x87, 0x47, 0x43, 0xaf, 0xe2, 0xe7, 0x75, 0xfc, + 0xfc, 0x19, 0x7e, 0xde, 0xc2, 0xcf, 0x3b, 0x1f, 0xa2, 0x3e, 0xfe, 0x7f, 0x1f, 0x3f, 0x1f, 0xe3, + 0xf7, 0x4f, 0xf1, 0xff, 0x67, 0xf8, 0xff, 0xc9, 0x7f, 0x3c, 0x7a, 0xe0, 0x7f, 0x03, 0x00, 0x00, + 0xff, 0xff, 0x6f, 0xce, 0x5c, 0x69, 0xd2, 0x31, 0x00, 0x00, + } + r := bytes.NewReader(gzipped) + gzipr, err := compress_gzip.NewReader(r) + if err != nil { + panic(err) + } + ungzipped, err := io_ioutil.ReadAll(gzipr) + if err != nil { + panic(err) + } + if err := github_com_gogo_protobuf_proto.Unmarshal(ungzipped, d); err != nil { + panic(err) + } + return d +} +func (this *Castaway) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*Castaway) + if !ok { + that2, ok := that.(Castaway) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *Castaway") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *Castaway but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *Castaway but is not nil && this == nil") + } + if this.Int32Ptr != nil && that1.Int32Ptr != nil { + if *this.Int32Ptr != *that1.Int32Ptr { + return fmt.Errorf("Int32Ptr this(%v) Not Equal that(%v)", *this.Int32Ptr, *that1.Int32Ptr) + } + } else if this.Int32Ptr != nil { + return fmt.Errorf("this.Int32Ptr == nil && that.Int32Ptr != nil") + } else if that1.Int32Ptr != nil { + return fmt.Errorf("Int32Ptr this(%v) Not Equal that(%v)", this.Int32Ptr, that1.Int32Ptr) + } + if this.Int32 != that1.Int32 { + return fmt.Errorf("Int32 this(%v) Not Equal that(%v)", this.Int32, that1.Int32) + } + if this.MyUint64Ptr != nil && that1.MyUint64Ptr != nil { + if *this.MyUint64Ptr != *that1.MyUint64Ptr { + return fmt.Errorf("MyUint64Ptr this(%v) Not Equal that(%v)", *this.MyUint64Ptr, *that1.MyUint64Ptr) + } + } else if this.MyUint64Ptr != nil { + return fmt.Errorf("this.MyUint64Ptr == nil && that.MyUint64Ptr != nil") + } else if that1.MyUint64Ptr != nil { + return fmt.Errorf("MyUint64Ptr this(%v) Not Equal that(%v)", this.MyUint64Ptr, that1.MyUint64Ptr) + } + if this.MyUint64 != that1.MyUint64 { + return fmt.Errorf("MyUint64 this(%v) Not Equal that(%v)", this.MyUint64, that1.MyUint64) + } + if this.MyFloat32Ptr != nil && that1.MyFloat32Ptr != nil { + if *this.MyFloat32Ptr != *that1.MyFloat32Ptr { + return fmt.Errorf("MyFloat32Ptr this(%v) Not Equal that(%v)", *this.MyFloat32Ptr, *that1.MyFloat32Ptr) + } + } else if this.MyFloat32Ptr != nil { + return fmt.Errorf("this.MyFloat32Ptr == nil && that.MyFloat32Ptr != nil") + } else if that1.MyFloat32Ptr != nil { + return fmt.Errorf("MyFloat32Ptr this(%v) Not Equal that(%v)", this.MyFloat32Ptr, that1.MyFloat32Ptr) + } + if this.MyFloat32 != that1.MyFloat32 { + return fmt.Errorf("MyFloat32 this(%v) Not Equal that(%v)", this.MyFloat32, that1.MyFloat32) + } + if this.MyFloat64Ptr != nil && that1.MyFloat64Ptr != nil { + if *this.MyFloat64Ptr != *that1.MyFloat64Ptr { + return fmt.Errorf("MyFloat64Ptr this(%v) Not Equal that(%v)", *this.MyFloat64Ptr, *that1.MyFloat64Ptr) + } + } else if this.MyFloat64Ptr != nil { + return fmt.Errorf("this.MyFloat64Ptr == nil && that.MyFloat64Ptr != nil") + } else if that1.MyFloat64Ptr != nil { + return fmt.Errorf("MyFloat64Ptr this(%v) Not Equal that(%v)", this.MyFloat64Ptr, that1.MyFloat64Ptr) + } + if this.MyFloat64 != that1.MyFloat64 { + return fmt.Errorf("MyFloat64 this(%v) Not Equal that(%v)", this.MyFloat64, that1.MyFloat64) + } + if !bytes.Equal(this.MyBytes, that1.MyBytes) { + return fmt.Errorf("MyBytes this(%v) Not Equal that(%v)", this.MyBytes, that1.MyBytes) + } + if !bytes.Equal(this.NormalBytes, that1.NormalBytes) { + return fmt.Errorf("NormalBytes this(%v) Not Equal that(%v)", this.NormalBytes, that1.NormalBytes) + } + if len(this.MyUint64S) != len(that1.MyUint64S) { + return fmt.Errorf("MyUint64S this(%v) Not Equal that(%v)", len(this.MyUint64S), len(that1.MyUint64S)) + } + for i := range this.MyUint64S { + if this.MyUint64S[i] != that1.MyUint64S[i] { + return fmt.Errorf("MyUint64S this[%v](%v) Not Equal that[%v](%v)", i, this.MyUint64S[i], i, that1.MyUint64S[i]) + } + } + if len(this.MyMap) != len(that1.MyMap) { + return fmt.Errorf("MyMap this(%v) Not Equal that(%v)", len(this.MyMap), len(that1.MyMap)) + } + for i := range this.MyMap { + if this.MyMap[i] != that1.MyMap[i] { + return fmt.Errorf("MyMap this[%v](%v) Not Equal that[%v](%v)", i, this.MyMap[i], i, that1.MyMap[i]) + } + } + if len(this.MyCustomMap) != len(that1.MyCustomMap) { + return fmt.Errorf("MyCustomMap this(%v) Not Equal that(%v)", len(this.MyCustomMap), len(that1.MyCustomMap)) + } + for i := range this.MyCustomMap { + if this.MyCustomMap[i] != that1.MyCustomMap[i] { + return fmt.Errorf("MyCustomMap this[%v](%v) Not Equal that[%v](%v)", i, this.MyCustomMap[i], i, that1.MyCustomMap[i]) + } + } + if len(this.MyNullableMap) != len(that1.MyNullableMap) { + return fmt.Errorf("MyNullableMap this(%v) Not Equal that(%v)", len(this.MyNullableMap), len(that1.MyNullableMap)) + } + for i := range this.MyNullableMap { + if !this.MyNullableMap[i].Equal(that1.MyNullableMap[i]) { + return fmt.Errorf("MyNullableMap this[%v](%v) Not Equal that[%v](%v)", i, this.MyNullableMap[i], i, that1.MyNullableMap[i]) + } + } + if len(this.MyEmbeddedMap) != len(that1.MyEmbeddedMap) { + return fmt.Errorf("MyEmbeddedMap this(%v) Not Equal that(%v)", len(this.MyEmbeddedMap), len(that1.MyEmbeddedMap)) + } + for i := range this.MyEmbeddedMap { + a := this.MyEmbeddedMap[i] + b := that1.MyEmbeddedMap[i] + if !(&a).Equal(&b) { + return fmt.Errorf("MyEmbeddedMap this[%v](%v) Not Equal that[%v](%v)", i, this.MyEmbeddedMap[i], i, that1.MyEmbeddedMap[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *Castaway) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*Castaway) + if !ok { + that2, ok := that.(Castaway) + 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.Int32Ptr != nil && that1.Int32Ptr != nil { + if *this.Int32Ptr != *that1.Int32Ptr { + return false + } + } else if this.Int32Ptr != nil { + return false + } else if that1.Int32Ptr != nil { + return false + } + if this.Int32 != that1.Int32 { + return false + } + if this.MyUint64Ptr != nil && that1.MyUint64Ptr != nil { + if *this.MyUint64Ptr != *that1.MyUint64Ptr { + return false + } + } else if this.MyUint64Ptr != nil { + return false + } else if that1.MyUint64Ptr != nil { + return false + } + if this.MyUint64 != that1.MyUint64 { + return false + } + if this.MyFloat32Ptr != nil && that1.MyFloat32Ptr != nil { + if *this.MyFloat32Ptr != *that1.MyFloat32Ptr { + return false + } + } else if this.MyFloat32Ptr != nil { + return false + } else if that1.MyFloat32Ptr != nil { + return false + } + if this.MyFloat32 != that1.MyFloat32 { + return false + } + if this.MyFloat64Ptr != nil && that1.MyFloat64Ptr != nil { + if *this.MyFloat64Ptr != *that1.MyFloat64Ptr { + return false + } + } else if this.MyFloat64Ptr != nil { + return false + } else if that1.MyFloat64Ptr != nil { + return false + } + if this.MyFloat64 != that1.MyFloat64 { + return false + } + if !bytes.Equal(this.MyBytes, that1.MyBytes) { + return false + } + if !bytes.Equal(this.NormalBytes, that1.NormalBytes) { + return false + } + if len(this.MyUint64S) != len(that1.MyUint64S) { + return false + } + for i := range this.MyUint64S { + if this.MyUint64S[i] != that1.MyUint64S[i] { + return false + } + } + if len(this.MyMap) != len(that1.MyMap) { + return false + } + for i := range this.MyMap { + if this.MyMap[i] != that1.MyMap[i] { + return false + } + } + if len(this.MyCustomMap) != len(that1.MyCustomMap) { + return false + } + for i := range this.MyCustomMap { + if this.MyCustomMap[i] != that1.MyCustomMap[i] { + return false + } + } + if len(this.MyNullableMap) != len(that1.MyNullableMap) { + return false + } + for i := range this.MyNullableMap { + if !this.MyNullableMap[i].Equal(that1.MyNullableMap[i]) { + return false + } + } + if len(this.MyEmbeddedMap) != len(that1.MyEmbeddedMap) { + return false + } + for i := range this.MyEmbeddedMap { + a := this.MyEmbeddedMap[i] + b := that1.MyEmbeddedMap[i] + if !(&a).Equal(&b) { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *Wilson) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*Wilson) + if !ok { + that2, ok := that.(Wilson) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *Wilson") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *Wilson but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *Wilson but is not nil && this == nil") + } + if this.Int64 != nil && that1.Int64 != nil { + if *this.Int64 != *that1.Int64 { + return fmt.Errorf("Int64 this(%v) Not Equal that(%v)", *this.Int64, *that1.Int64) + } + } else if this.Int64 != nil { + return fmt.Errorf("this.Int64 == nil && that.Int64 != nil") + } else if that1.Int64 != nil { + return fmt.Errorf("Int64 this(%v) Not Equal that(%v)", this.Int64, that1.Int64) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *Wilson) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*Wilson) + if !ok { + that2, ok := that.(Wilson) + 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.Int64 != nil && that1.Int64 != nil { + if *this.Int64 != *that1.Int64 { + return false + } + } else if this.Int64 != nil { + return false + } else if that1.Int64 != nil { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} + +type CastawayFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetInt32Ptr() *int32 + GetInt32() int32 + GetMyUint64Ptr() *github_com_gogo_protobuf_test_casttype.MyUint64Type + GetMyUint64() github_com_gogo_protobuf_test_casttype.MyUint64Type + GetMyFloat32Ptr() *github_com_gogo_protobuf_test_casttype.MyFloat32Type + GetMyFloat32() github_com_gogo_protobuf_test_casttype.MyFloat32Type + GetMyFloat64Ptr() *github_com_gogo_protobuf_test_casttype.MyFloat64Type + GetMyFloat64() github_com_gogo_protobuf_test_casttype.MyFloat64Type + GetMyBytes() github_com_gogo_protobuf_test_casttype.Bytes + GetNormalBytes() []byte + GetMyUint64S() []github_com_gogo_protobuf_test_casttype.MyUint64Type + GetMyMap() github_com_gogo_protobuf_test_casttype.MyMapType + GetMyCustomMap() map[github_com_gogo_protobuf_test_casttype.MyStringType]github_com_gogo_protobuf_test_casttype.MyUint64Type + GetMyNullableMap() map[github_com_gogo_protobuf_test_casttype.MyInt32Type]*Wilson + GetMyEmbeddedMap() map[github_com_gogo_protobuf_test_casttype.MyInt32Type]Wilson +} + +func (this *Castaway) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *Castaway) TestProto() github_com_gogo_protobuf_proto.Message { + return NewCastawayFromFace(this) +} + +func (this *Castaway) GetInt32Ptr() *int32 { + return this.Int32Ptr +} + +func (this *Castaway) GetInt32() int32 { + return this.Int32 +} + +func (this *Castaway) GetMyUint64Ptr() *github_com_gogo_protobuf_test_casttype.MyUint64Type { + return this.MyUint64Ptr +} + +func (this *Castaway) GetMyUint64() github_com_gogo_protobuf_test_casttype.MyUint64Type { + return this.MyUint64 +} + +func (this *Castaway) GetMyFloat32Ptr() *github_com_gogo_protobuf_test_casttype.MyFloat32Type { + return this.MyFloat32Ptr +} + +func (this *Castaway) GetMyFloat32() github_com_gogo_protobuf_test_casttype.MyFloat32Type { + return this.MyFloat32 +} + +func (this *Castaway) GetMyFloat64Ptr() *github_com_gogo_protobuf_test_casttype.MyFloat64Type { + return this.MyFloat64Ptr +} + +func (this *Castaway) GetMyFloat64() github_com_gogo_protobuf_test_casttype.MyFloat64Type { + return this.MyFloat64 +} + +func (this *Castaway) GetMyBytes() github_com_gogo_protobuf_test_casttype.Bytes { + return this.MyBytes +} + +func (this *Castaway) GetNormalBytes() []byte { + return this.NormalBytes +} + +func (this *Castaway) GetMyUint64S() []github_com_gogo_protobuf_test_casttype.MyUint64Type { + return this.MyUint64S +} + +func (this *Castaway) GetMyMap() github_com_gogo_protobuf_test_casttype.MyMapType { + return this.MyMap +} + +func (this *Castaway) GetMyCustomMap() map[github_com_gogo_protobuf_test_casttype.MyStringType]github_com_gogo_protobuf_test_casttype.MyUint64Type { + return this.MyCustomMap +} + +func (this *Castaway) GetMyNullableMap() map[github_com_gogo_protobuf_test_casttype.MyInt32Type]*Wilson { + return this.MyNullableMap +} + +func (this *Castaway) GetMyEmbeddedMap() map[github_com_gogo_protobuf_test_casttype.MyInt32Type]Wilson { + return this.MyEmbeddedMap +} + +func NewCastawayFromFace(that CastawayFace) *Castaway { + this := &Castaway{} + this.Int32Ptr = that.GetInt32Ptr() + this.Int32 = that.GetInt32() + this.MyUint64Ptr = that.GetMyUint64Ptr() + this.MyUint64 = that.GetMyUint64() + this.MyFloat32Ptr = that.GetMyFloat32Ptr() + this.MyFloat32 = that.GetMyFloat32() + this.MyFloat64Ptr = that.GetMyFloat64Ptr() + this.MyFloat64 = that.GetMyFloat64() + this.MyBytes = that.GetMyBytes() + this.NormalBytes = that.GetNormalBytes() + this.MyUint64S = that.GetMyUint64S() + this.MyMap = that.GetMyMap() + this.MyCustomMap = that.GetMyCustomMap() + this.MyNullableMap = that.GetMyNullableMap() + this.MyEmbeddedMap = that.GetMyEmbeddedMap() + return this +} + +type WilsonFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetInt64() *int64 +} + +func (this *Wilson) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *Wilson) TestProto() github_com_gogo_protobuf_proto.Message { + return NewWilsonFromFace(this) +} + +func (this *Wilson) GetInt64() *int64 { + return this.Int64 +} + +func NewWilsonFromFace(that WilsonFace) *Wilson { + this := &Wilson{} + this.Int64 = that.GetInt64() + return this +} + +func (this *Castaway) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 19) + s = append(s, "&casttype.Castaway{") + if this.Int32Ptr != nil { + s = append(s, "Int32Ptr: "+valueToGoStringCasttype(this.Int32Ptr, "int32")+",\n") + } + s = append(s, "Int32: "+fmt.Sprintf("%#v", this.Int32)+",\n") + if this.MyUint64Ptr != nil { + s = append(s, "MyUint64Ptr: "+valueToGoStringCasttype(this.MyUint64Ptr, "github_com_gogo_protobuf_test_casttype.MyUint64Type")+",\n") + } + s = append(s, "MyUint64: "+fmt.Sprintf("%#v", this.MyUint64)+",\n") + if this.MyFloat32Ptr != nil { + s = append(s, "MyFloat32Ptr: "+valueToGoStringCasttype(this.MyFloat32Ptr, "github_com_gogo_protobuf_test_casttype.MyFloat32Type")+",\n") + } + s = append(s, "MyFloat32: "+fmt.Sprintf("%#v", this.MyFloat32)+",\n") + if this.MyFloat64Ptr != nil { + s = append(s, "MyFloat64Ptr: "+valueToGoStringCasttype(this.MyFloat64Ptr, "github_com_gogo_protobuf_test_casttype.MyFloat64Type")+",\n") + } + s = append(s, "MyFloat64: "+fmt.Sprintf("%#v", this.MyFloat64)+",\n") + if this.MyBytes != nil { + s = append(s, "MyBytes: "+valueToGoStringCasttype(this.MyBytes, "github_com_gogo_protobuf_test_casttype.Bytes")+",\n") + } + if this.NormalBytes != nil { + s = append(s, "NormalBytes: "+valueToGoStringCasttype(this.NormalBytes, "byte")+",\n") + } + if this.MyUint64S != nil { + s = append(s, "MyUint64S: "+fmt.Sprintf("%#v", this.MyUint64S)+",\n") + } + keysForMyMap := make([]string, 0, len(this.MyMap)) + for k := range this.MyMap { + keysForMyMap = append(keysForMyMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForMyMap) + mapStringForMyMap := "github_com_gogo_protobuf_test_casttype.MyMapType{" + for _, k := range keysForMyMap { + mapStringForMyMap += fmt.Sprintf("%#v: %#v,", k, this.MyMap[k]) + } + mapStringForMyMap += "}" + if this.MyMap != nil { + s = append(s, "MyMap: "+mapStringForMyMap+",\n") + } + keysForMyCustomMap := make([]string, 0, len(this.MyCustomMap)) + for k := range this.MyCustomMap { + keysForMyCustomMap = append(keysForMyCustomMap, string(k)) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForMyCustomMap) + mapStringForMyCustomMap := "map[github_com_gogo_protobuf_test_casttype.MyStringType]github_com_gogo_protobuf_test_casttype.MyUint64Type{" + for _, k := range keysForMyCustomMap { + mapStringForMyCustomMap += fmt.Sprintf("%#v: %#v,", k, this.MyCustomMap[github_com_gogo_protobuf_test_casttype.MyStringType(k)]) + } + mapStringForMyCustomMap += "}" + if this.MyCustomMap != nil { + s = append(s, "MyCustomMap: "+mapStringForMyCustomMap+",\n") + } + keysForMyNullableMap := make([]int32, 0, len(this.MyNullableMap)) + for k := range this.MyNullableMap { + keysForMyNullableMap = append(keysForMyNullableMap, int32(k)) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForMyNullableMap) + mapStringForMyNullableMap := "map[github_com_gogo_protobuf_test_casttype.MyInt32Type]*Wilson{" + for _, k := range keysForMyNullableMap { + mapStringForMyNullableMap += fmt.Sprintf("%#v: %#v,", k, this.MyNullableMap[github_com_gogo_protobuf_test_casttype.MyInt32Type(k)]) + } + mapStringForMyNullableMap += "}" + if this.MyNullableMap != nil { + s = append(s, "MyNullableMap: "+mapStringForMyNullableMap+",\n") + } + keysForMyEmbeddedMap := make([]int32, 0, len(this.MyEmbeddedMap)) + for k := range this.MyEmbeddedMap { + keysForMyEmbeddedMap = append(keysForMyEmbeddedMap, int32(k)) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForMyEmbeddedMap) + mapStringForMyEmbeddedMap := "map[github_com_gogo_protobuf_test_casttype.MyInt32Type]Wilson{" + for _, k := range keysForMyEmbeddedMap { + mapStringForMyEmbeddedMap += fmt.Sprintf("%#v: %#v,", k, this.MyEmbeddedMap[github_com_gogo_protobuf_test_casttype.MyInt32Type(k)]) + } + mapStringForMyEmbeddedMap += "}" + if this.MyEmbeddedMap != nil { + s = append(s, "MyEmbeddedMap: "+mapStringForMyEmbeddedMap+",\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 *Wilson) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&casttype.Wilson{") + if this.Int64 != nil { + s = append(s, "Int64: "+valueToGoStringCasttype(this.Int64, "int64")+",\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 valueToGoStringCasttype(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 extensionToGoStringCasttype(e map[int32]github_com_gogo_protobuf_proto.Extension) string { + if e == nil { + return "nil" + } + s := "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 +} +func NewPopulatedCastaway(r randyCasttype, easy bool) *Castaway { + this := &Castaway{} + if r.Intn(10) != 0 { + v1 := int32(r.Int63()) + if r.Intn(2) == 0 { + v1 *= -1 + } + this.Int32Ptr = &v1 + } + this.Int32 = int32(r.Int63()) + if r.Intn(2) == 0 { + this.Int32 *= -1 + } + if r.Intn(10) != 0 { + v2 := github_com_gogo_protobuf_test_casttype.MyUint64Type(uint64(r.Uint32())) + this.MyUint64Ptr = &v2 + } + this.MyUint64 = github_com_gogo_protobuf_test_casttype.MyUint64Type(uint64(r.Uint32())) + if r.Intn(10) != 0 { + v3 := github_com_gogo_protobuf_test_casttype.MyFloat32Type(r.Float32()) + if r.Intn(2) == 0 { + v3 *= -1 + } + this.MyFloat32Ptr = &v3 + } + this.MyFloat32 = github_com_gogo_protobuf_test_casttype.MyFloat32Type(r.Float32()) + if r.Intn(2) == 0 { + this.MyFloat32 *= -1 + } + if r.Intn(10) != 0 { + v4 := github_com_gogo_protobuf_test_casttype.MyFloat64Type(r.Float64()) + if r.Intn(2) == 0 { + v4 *= -1 + } + this.MyFloat64Ptr = &v4 + } + this.MyFloat64 = github_com_gogo_protobuf_test_casttype.MyFloat64Type(r.Float64()) + if r.Intn(2) == 0 { + this.MyFloat64 *= -1 + } + if r.Intn(10) != 0 { + v5 := r.Intn(100) + this.MyBytes = make(github_com_gogo_protobuf_test_casttype.Bytes, v5) + for i := 0; i < v5; i++ { + this.MyBytes[i] = byte(r.Intn(256)) + } + } + if r.Intn(10) != 0 { + v6 := r.Intn(100) + this.NormalBytes = make([]byte, v6) + for i := 0; i < v6; i++ { + this.NormalBytes[i] = byte(r.Intn(256)) + } + } + if r.Intn(10) != 0 { + v7 := r.Intn(10) + this.MyUint64S = make([]github_com_gogo_protobuf_test_casttype.MyUint64Type, v7) + for i := 0; i < v7; i++ { + this.MyUint64S[i] = github_com_gogo_protobuf_test_casttype.MyUint64Type(uint64(r.Uint32())) + } + } + if r.Intn(10) != 0 { + v8 := r.Intn(10) + this.MyMap = make(github_com_gogo_protobuf_test_casttype.MyMapType) + for i := 0; i < v8; i++ { + v9 := randStringCasttype(r) + this.MyMap[v9] = uint64(uint64(r.Uint32())) + } + } + if r.Intn(10) != 0 { + v10 := r.Intn(10) + this.MyCustomMap = make(map[github_com_gogo_protobuf_test_casttype.MyStringType]github_com_gogo_protobuf_test_casttype.MyUint64Type) + for i := 0; i < v10; i++ { + v11 := github_com_gogo_protobuf_test_casttype.MyStringType(randStringCasttype(r)) + this.MyCustomMap[v11] = github_com_gogo_protobuf_test_casttype.MyUint64Type(uint64(r.Uint32())) + } + } + if r.Intn(10) != 0 { + v12 := r.Intn(10) + this.MyNullableMap = make(map[github_com_gogo_protobuf_test_casttype.MyInt32Type]*Wilson) + for i := 0; i < v12; i++ { + this.MyNullableMap[github_com_gogo_protobuf_test_casttype.MyInt32Type(int32(r.Int31()))] = NewPopulatedWilson(r, easy) + } + } + if r.Intn(10) != 0 { + v13 := r.Intn(10) + this.MyEmbeddedMap = make(map[github_com_gogo_protobuf_test_casttype.MyInt32Type]Wilson) + for i := 0; i < v13; i++ { + this.MyEmbeddedMap[github_com_gogo_protobuf_test_casttype.MyInt32Type(int32(r.Int31()))] = *NewPopulatedWilson(r, easy) + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedCasttype(r, 16) + } + return this +} + +func NewPopulatedWilson(r randyCasttype, easy bool) *Wilson { + this := &Wilson{} + if r.Intn(10) != 0 { + v14 := int64(r.Int63()) + if r.Intn(2) == 0 { + v14 *= -1 + } + this.Int64 = &v14 + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedCasttype(r, 2) + } + return this +} + +type randyCasttype interface { + Float32() float32 + Float64() float64 + Int63() int64 + Int31() int32 + Uint32() uint32 + Intn(n int) int +} + +func randUTF8RuneCasttype(r randyCasttype) 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 randStringCasttype(r randyCasttype) string { + v15 := r.Intn(100) + tmps := make([]rune, v15) + for i := 0; i < v15; i++ { + tmps[i] = randUTF8RuneCasttype(r) + } + return string(tmps) +} +func randUnrecognizedCasttype(r randyCasttype, 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 = randFieldCasttype(data, r, fieldNumber, wire) + } + return data +} +func randFieldCasttype(data []byte, r randyCasttype, fieldNumber int, wire int) []byte { + key := uint32(fieldNumber)<<3 | uint32(wire) + switch wire { + case 0: + data = encodeVarintPopulateCasttype(data, uint64(key)) + v16 := r.Int63() + if r.Intn(2) == 0 { + v16 *= -1 + } + data = encodeVarintPopulateCasttype(data, uint64(v16)) + case 1: + data = encodeVarintPopulateCasttype(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 = encodeVarintPopulateCasttype(data, uint64(key)) + ll := r.Intn(100) + data = encodeVarintPopulateCasttype(data, uint64(ll)) + for j := 0; j < ll; j++ { + data = append(data, byte(r.Intn(256))) + } + default: + data = encodeVarintPopulateCasttype(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 encodeVarintPopulateCasttype(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 *Castaway) Size() (n int) { + var l int + _ = l + if m.Int32Ptr != nil { + n += 1 + sovCasttype(uint64(*m.Int32Ptr)) + } + n += 1 + sovCasttype(uint64(m.Int32)) + if m.MyUint64Ptr != nil { + n += 1 + sovCasttype(uint64(*m.MyUint64Ptr)) + } + n += 1 + sovCasttype(uint64(m.MyUint64)) + if m.MyFloat32Ptr != nil { + n += 5 + } + n += 5 + if m.MyFloat64Ptr != nil { + n += 9 + } + n += 9 + if m.MyBytes != nil { + l = len(m.MyBytes) + n += 1 + l + sovCasttype(uint64(l)) + } + if m.NormalBytes != nil { + l = len(m.NormalBytes) + n += 1 + l + sovCasttype(uint64(l)) + } + if len(m.MyUint64S) > 0 { + for _, e := range m.MyUint64S { + n += 1 + sovCasttype(uint64(e)) + } + } + if len(m.MyMap) > 0 { + for k, v := range m.MyMap { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovCasttype(uint64(len(k))) + 1 + sovCasttype(uint64(v)) + n += mapEntrySize + 1 + sovCasttype(uint64(mapEntrySize)) + } + } + if len(m.MyCustomMap) > 0 { + for k, v := range m.MyCustomMap { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovCasttype(uint64(len(k))) + 1 + sovCasttype(uint64(v)) + n += mapEntrySize + 1 + sovCasttype(uint64(mapEntrySize)) + } + } + if len(m.MyNullableMap) > 0 { + for k, v := range m.MyNullableMap { + _ = k + _ = v + l = 0 + if v != nil { + l = v.Size() + } + mapEntrySize := 1 + sovCasttype(uint64(k)) + 1 + l + sovCasttype(uint64(l)) + n += mapEntrySize + 1 + sovCasttype(uint64(mapEntrySize)) + } + } + if len(m.MyEmbeddedMap) > 0 { + for k, v := range m.MyEmbeddedMap { + _ = k + _ = v + l = v.Size() + mapEntrySize := 1 + sovCasttype(uint64(k)) + 1 + l + sovCasttype(uint64(l)) + n += mapEntrySize + 1 + sovCasttype(uint64(mapEntrySize)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *Wilson) Size() (n int) { + var l int + _ = l + if m.Int64 != nil { + n += 1 + sovCasttype(uint64(*m.Int64)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func sovCasttype(x uint64) (n int) { + for { + n++ + x >>= 7 + if x == 0 { + break + } + } + return n +} +func sozCasttype(x uint64) (n int) { + return sovCasttype(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (this *Castaway) String() string { + if this == nil { + return "nil" + } + keysForMyMap := make([]string, 0, len(this.MyMap)) + for k := range this.MyMap { + keysForMyMap = append(keysForMyMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForMyMap) + mapStringForMyMap := "github_com_gogo_protobuf_test_casttype.MyMapType{" + for _, k := range keysForMyMap { + mapStringForMyMap += fmt.Sprintf("%v: %v,", k, this.MyMap[k]) + } + mapStringForMyMap += "}" + keysForMyCustomMap := make([]string, 0, len(this.MyCustomMap)) + for k := range this.MyCustomMap { + keysForMyCustomMap = append(keysForMyCustomMap, string(k)) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForMyCustomMap) + mapStringForMyCustomMap := "map[github_com_gogo_protobuf_test_casttype.MyStringType]github_com_gogo_protobuf_test_casttype.MyUint64Type{" + for _, k := range keysForMyCustomMap { + mapStringForMyCustomMap += fmt.Sprintf("%v: %v,", k, this.MyCustomMap[github_com_gogo_protobuf_test_casttype.MyStringType(k)]) + } + mapStringForMyCustomMap += "}" + keysForMyNullableMap := make([]int32, 0, len(this.MyNullableMap)) + for k := range this.MyNullableMap { + keysForMyNullableMap = append(keysForMyNullableMap, int32(k)) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForMyNullableMap) + mapStringForMyNullableMap := "map[github_com_gogo_protobuf_test_casttype.MyInt32Type]*Wilson{" + for _, k := range keysForMyNullableMap { + mapStringForMyNullableMap += fmt.Sprintf("%v: %v,", k, this.MyNullableMap[github_com_gogo_protobuf_test_casttype.MyInt32Type(k)]) + } + mapStringForMyNullableMap += "}" + keysForMyEmbeddedMap := make([]int32, 0, len(this.MyEmbeddedMap)) + for k := range this.MyEmbeddedMap { + keysForMyEmbeddedMap = append(keysForMyEmbeddedMap, int32(k)) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForMyEmbeddedMap) + mapStringForMyEmbeddedMap := "map[github_com_gogo_protobuf_test_casttype.MyInt32Type]Wilson{" + for _, k := range keysForMyEmbeddedMap { + mapStringForMyEmbeddedMap += fmt.Sprintf("%v: %v,", k, this.MyEmbeddedMap[github_com_gogo_protobuf_test_casttype.MyInt32Type(k)]) + } + mapStringForMyEmbeddedMap += "}" + s := strings.Join([]string{`&Castaway{`, + `Int32Ptr:` + valueToStringCasttype(this.Int32Ptr) + `,`, + `Int32:` + fmt.Sprintf("%v", this.Int32) + `,`, + `MyUint64Ptr:` + valueToStringCasttype(this.MyUint64Ptr) + `,`, + `MyUint64:` + fmt.Sprintf("%v", this.MyUint64) + `,`, + `MyFloat32Ptr:` + valueToStringCasttype(this.MyFloat32Ptr) + `,`, + `MyFloat32:` + fmt.Sprintf("%v", this.MyFloat32) + `,`, + `MyFloat64Ptr:` + valueToStringCasttype(this.MyFloat64Ptr) + `,`, + `MyFloat64:` + fmt.Sprintf("%v", this.MyFloat64) + `,`, + `MyBytes:` + valueToStringCasttype(this.MyBytes) + `,`, + `NormalBytes:` + valueToStringCasttype(this.NormalBytes) + `,`, + `MyUint64S:` + fmt.Sprintf("%v", this.MyUint64S) + `,`, + `MyMap:` + mapStringForMyMap + `,`, + `MyCustomMap:` + mapStringForMyCustomMap + `,`, + `MyNullableMap:` + mapStringForMyNullableMap + `,`, + `MyEmbeddedMap:` + mapStringForMyEmbeddedMap + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *Wilson) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&Wilson{`, + `Int64:` + valueToStringCasttype(this.Int64) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func valueToStringCasttype(v interface{}) string { + rv := reflect.ValueOf(v) + if rv.IsNil() { + return "nil" + } + pv := reflect.Indirect(rv).Interface() + return fmt.Sprintf("*%v", pv) +} +func (m *Castaway) 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 ErrIntOverflowCasttype + } + 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: Castaway: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Castaway: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Int32Ptr", wireType) + } + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCasttype + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Int32Ptr = &v + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Int32", wireType) + } + m.Int32 = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCasttype + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + m.Int32 |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field MyUint64Ptr", wireType) + } + var v github_com_gogo_protobuf_test_casttype.MyUint64Type + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCasttype + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (github_com_gogo_protobuf_test_casttype.MyUint64Type(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.MyUint64Ptr = &v + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field MyUint64", wireType) + } + m.MyUint64 = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCasttype + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + m.MyUint64 |= (github_com_gogo_protobuf_test_casttype.MyUint64Type(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + case 5: + if wireType != 5 { + return fmt.Errorf("proto: wrong wireType = %d for field MyFloat32Ptr", wireType) + } + var v uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + iNdEx += 4 + v = uint32(data[iNdEx-4]) + v |= uint32(data[iNdEx-3]) << 8 + v |= uint32(data[iNdEx-2]) << 16 + v |= uint32(data[iNdEx-1]) << 24 + v2 := github_com_gogo_protobuf_test_casttype.MyFloat32Type(math.Float32frombits(v)) + m.MyFloat32Ptr = &v2 + case 6: + if wireType != 5 { + return fmt.Errorf("proto: wrong wireType = %d for field MyFloat32", wireType) + } + var v uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + iNdEx += 4 + v = uint32(data[iNdEx-4]) + v |= uint32(data[iNdEx-3]) << 8 + v |= uint32(data[iNdEx-2]) << 16 + v |= uint32(data[iNdEx-1]) << 24 + m.MyFloat32 = github_com_gogo_protobuf_test_casttype.MyFloat32Type(math.Float32frombits(v)) + case 7: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field MyFloat64Ptr", 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 := github_com_gogo_protobuf_test_casttype.MyFloat64Type(math.Float64frombits(v)) + m.MyFloat64Ptr = &v2 + case 8: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field MyFloat64", 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.MyFloat64 = github_com_gogo_protobuf_test_casttype.MyFloat64Type(math.Float64frombits(v)) + case 9: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MyBytes", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCasttype + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthCasttype + } + postIndex := iNdEx + byteLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.MyBytes = append(m.MyBytes[:0], data[iNdEx:postIndex]...) + if m.MyBytes == nil { + m.MyBytes = []byte{} + } + iNdEx = postIndex + case 10: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NormalBytes", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCasttype + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthCasttype + } + postIndex := iNdEx + byteLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.NormalBytes = append(m.NormalBytes[:0], data[iNdEx:postIndex]...) + if m.NormalBytes == nil { + m.NormalBytes = []byte{} + } + iNdEx = postIndex + case 11: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field MyUint64S", wireType) + } + var v github_com_gogo_protobuf_test_casttype.MyUint64Type + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCasttype + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (github_com_gogo_protobuf_test_casttype.MyUint64Type(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.MyUint64S = append(m.MyUint64S, v) + case 12: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MyMap", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCasttype + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthCasttype + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var keykey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCasttype + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + keykey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var stringLenmapkey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCasttype + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLenmapkey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapkey := int(stringLenmapkey) + if intStringLenmapkey < 0 { + return ErrInvalidLengthCasttype + } + postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey > l { + return io.ErrUnexpectedEOF + } + mapkey := string(data[iNdEx:postStringIndexmapkey]) + iNdEx = postStringIndexmapkey + var valuekey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCasttype + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + valuekey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapvalue uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCasttype + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + mapvalue |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if m.MyMap == nil { + m.MyMap = make(github_com_gogo_protobuf_test_casttype.MyMapType) + } + m.MyMap[mapkey] = mapvalue + iNdEx = postIndex + case 13: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MyCustomMap", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCasttype + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthCasttype + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var keykey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCasttype + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + keykey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var stringLenmapkey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCasttype + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLenmapkey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapkey := int(stringLenmapkey) + if intStringLenmapkey < 0 { + return ErrInvalidLengthCasttype + } + postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey > l { + return io.ErrUnexpectedEOF + } + mapkey := github_com_gogo_protobuf_test_casttype.MyStringType(data[iNdEx:postStringIndexmapkey]) + iNdEx = postStringIndexmapkey + var valuekey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCasttype + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + valuekey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapvalue uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCasttype + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + mapvalue |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if m.MyCustomMap == nil { + m.MyCustomMap = make(map[github_com_gogo_protobuf_test_casttype.MyStringType]github_com_gogo_protobuf_test_casttype.MyUint64Type) + } + m.MyCustomMap[github_com_gogo_protobuf_test_casttype.MyStringType(mapkey)] = ((github_com_gogo_protobuf_test_casttype.MyUint64Type)(mapvalue)) + iNdEx = postIndex + case 14: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MyNullableMap", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCasttype + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthCasttype + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var keykey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCasttype + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + keykey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapkey int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCasttype + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + mapkey |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var valuekey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCasttype + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + valuekey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapmsglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCasttype + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + mapmsglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if mapmsglen < 0 { + return ErrInvalidLengthCasttype + } + postmsgIndex := iNdEx + mapmsglen + if mapmsglen < 0 { + return ErrInvalidLengthCasttype + } + if postmsgIndex > l { + return io.ErrUnexpectedEOF + } + mapvalue := &Wilson{} + if err := mapvalue.Unmarshal(data[iNdEx:postmsgIndex]); err != nil { + return err + } + iNdEx = postmsgIndex + if m.MyNullableMap == nil { + m.MyNullableMap = make(map[github_com_gogo_protobuf_test_casttype.MyInt32Type]*Wilson) + } + m.MyNullableMap[github_com_gogo_protobuf_test_casttype.MyInt32Type(mapkey)] = mapvalue + iNdEx = postIndex + case 15: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MyEmbeddedMap", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCasttype + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthCasttype + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var keykey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCasttype + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + keykey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapkey int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCasttype + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + mapkey |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var valuekey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCasttype + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + valuekey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapmsglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCasttype + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + mapmsglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if mapmsglen < 0 { + return ErrInvalidLengthCasttype + } + postmsgIndex := iNdEx + mapmsglen + if mapmsglen < 0 { + return ErrInvalidLengthCasttype + } + if postmsgIndex > l { + return io.ErrUnexpectedEOF + } + mapvalue := &Wilson{} + if err := mapvalue.Unmarshal(data[iNdEx:postmsgIndex]); err != nil { + return err + } + iNdEx = postmsgIndex + if m.MyEmbeddedMap == nil { + m.MyEmbeddedMap = make(map[github_com_gogo_protobuf_test_casttype.MyInt32Type]Wilson) + } + m.MyEmbeddedMap[github_com_gogo_protobuf_test_casttype.MyInt32Type(mapkey)] = *mapvalue + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipCasttype(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthCasttype + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Wilson) 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 ErrIntOverflowCasttype + } + 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: Wilson: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Wilson: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Int64", wireType) + } + var v int64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCasttype + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Int64 = &v + default: + iNdEx = preIndex + skippy, err := skipCasttype(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthCasttype + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipCasttype(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, ErrIntOverflowCasttype + } + 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, ErrIntOverflowCasttype + } + 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, ErrIntOverflowCasttype + } + 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, ErrInvalidLengthCasttype + } + return iNdEx, nil + case 3: + for { + var innerWire uint64 + var start int = iNdEx + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowCasttype + } + 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 := skipCasttype(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 ( + ErrInvalidLengthCasttype = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowCasttype = fmt.Errorf("proto: integer overflow") +) + +var fileDescriptorCasttype = []byte{ + // 673 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xa4, 0x95, 0xbb, 0x6f, 0xd3, 0x5e, + 0x14, 0xc7, 0xeb, 0xa6, 0x6e, 0xed, 0xeb, 0xe4, 0xf7, 0xab, 0xae, 0x18, 0xac, 0x48, 0xa4, 0xa1, + 0x55, 0x11, 0x03, 0x24, 0x55, 0x1a, 0x85, 0xa8, 0x20, 0x06, 0x57, 0x45, 0x2a, 0xc2, 0x15, 0x32, + 0x54, 0x15, 0x88, 0xc5, 0x69, 0x4c, 0x6a, 0xe1, 0x47, 0xe4, 0x07, 0xc8, 0x5b, 0x05, 0x03, 0x12, + 0x7f, 0x01, 0x7f, 0x02, 0x23, 0x0b, 0x12, 0x23, 0x63, 0x46, 0x46, 0xa6, 0xbe, 0x58, 0x3a, 0x76, + 0xac, 0x98, 0x38, 0xf7, 0x5e, 0xbf, 0xd4, 0x16, 0x94, 0xba, 0xc3, 0xd1, 0x7d, 0x9d, 0xf3, 0x39, + 0xdf, 0x7b, 0x7c, 0xef, 0x35, 0xba, 0xb1, 0xed, 0xda, 0x3d, 0xd7, 0x6f, 0x86, 0x8e, 0xad, 0x7b, + 0xfe, 0x8e, 0x6e, 0x19, 0x5e, 0x73, 0x5b, 0xf7, 0x83, 0x20, 0x1a, 0x1a, 0x8d, 0xa1, 0xe7, 0x06, + 0x2e, 0x16, 0x92, 0x71, 0xf5, 0xce, 0xc0, 0x0c, 0x76, 0xc2, 0x5e, 0x03, 0x62, 0x9a, 0x03, 0x77, + 0xe0, 0x36, 0xa9, 0x43, 0x2f, 0x7c, 0x45, 0x47, 0x74, 0x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xbe, 0xb8, 0x92, 0x1c, 0xaf, 0xda, 0x45, 0x28, 0x3b, + 0x12, 0x78, 0x16, 0x95, 0x5e, 0x1b, 0x11, 0x7d, 0x74, 0x45, 0x8d, 0x74, 0xf1, 0x35, 0xc4, 0xbf, + 0xd1, 0xad, 0xd0, 0xa0, 0x8f, 0xec, 0x94, 0xc6, 0x06, 0x2b, 0x93, 0x5d, 0xae, 0xfa, 0x00, 0xcd, + 0x9e, 0xfd, 0xb4, 0x97, 0x8a, 0xd7, 0x10, 0x3e, 0x5f, 0xe0, 0x3c, 0x81, 0x67, 0x84, 0x9b, 0x79, + 0x82, 0xd4, 0x9a, 0xcd, 0x4a, 0xb4, 0x65, 0x5a, 0xbe, 0xeb, 0x9c, 0x63, 0x9e, 0x2d, 0xd7, 0xd5, + 0x98, 0xf3, 0x35, 0x34, 0xcd, 0x26, 0xc9, 0x5e, 0xd6, 0xe9, 0x6b, 0x4f, 0x7f, 0x4a, 0xf4, 0x0f, + 0xd3, 0x69, 0x2b, 0x8f, 0x47, 0x87, 0xb5, 0x89, 0x1f, 0x60, 0x3f, 0xc1, 0x0e, 0x0e, 0x6b, 0xdc, + 0x31, 0xd8, 0x09, 0xd8, 0x29, 0xd8, 0xee, 0x51, 0x8d, 0xfb, 0x0c, 0xf6, 0x05, 0xec, 0x1b, 0xd8, + 0x77, 0xb0, 0xd1, 0x11, 0xf8, 0x43, 0x7b, 0x00, 0x76, 0x0c, 0xfd, 0x13, 0x68, 0x4f, 0xa1, 0xdd, + 0xfd, 0x55, 0x9b, 0xf8, 0x13, 0x00, 0x00, 0xff, 0xff, 0x72, 0x82, 0xd6, 0x2b, 0x65, 0x07, 0x00, + 0x00, +} diff --git a/vendor/github.com/gogo/protobuf/test/casttype/combos/unmarshaler/casttype.proto b/vendor/github.com/gogo/protobuf/test/casttype/combos/unmarshaler/casttype.proto new file mode 100644 index 000000000..e42bf2b7e --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/casttype/combos/unmarshaler/casttype.proto @@ -0,0 +1,77 @@ +// Copyright (c) 2015, Vastech SA (PTY) LTD. All rights reserved. +// http://github.com/gogo/protobuf/gogoproto +// +// 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 casttype; + +import "github.com/gogo/protobuf/gogoproto/gogo.proto"; + +option (gogoproto.goproto_stringer_all) = false; +option (gogoproto.goproto_enum_prefix_all) = false; +option (gogoproto.goproto_getters_all) = false; + +option (gogoproto.equal_all) = true; +option (gogoproto.verbose_equal_all) = true; +option (gogoproto.stringer_all) = true; +option (gogoproto.gostring_all) = true; +option (gogoproto.face_all) = true; +option (gogoproto.description_all) = true; + +option (gogoproto.testgen_all) = true; +option (gogoproto.populate_all) = true; +option (gogoproto.benchgen_all) = true; +option (gogoproto.unmarshaler_all) = true; +option (gogoproto.marshaler_all) = false; +option (gogoproto.sizer_all) = true; + +option (gogoproto.goproto_enum_stringer_all) = false; +option (gogoproto.enum_stringer_all) = true; + +option (gogoproto.unsafe_marshaler_all) = false; +option (gogoproto.unsafe_unmarshaler_all) = false; + +message Castaway { + optional int64 Int32Ptr = 1 [(gogoproto.casttype) = "int32"]; + optional int64 Int32 = 2 [(gogoproto.casttype) = "int32", (gogoproto.nullable) = false]; + optional uint64 MyUint64Ptr = 3 [(gogoproto.casttype) = "github.com/gogo/protobuf/test/casttype.MyUint64Type"]; + optional uint64 MyUint64 = 4 [(gogoproto.casttype) = "github.com/gogo/protobuf/test/casttype.MyUint64Type", (gogoproto.nullable) = false]; + optional float MyFloat32Ptr = 5 [(gogoproto.casttype) = "github.com/gogo/protobuf/test/casttype.MyFloat32Type"]; + optional float MyFloat32 = 6 [(gogoproto.casttype) = "github.com/gogo/protobuf/test/casttype.MyFloat32Type", (gogoproto.nullable) = false]; + optional double MyFloat64Ptr = 7 [(gogoproto.casttype) = "github.com/gogo/protobuf/test/casttype.MyFloat64Type"]; + optional double MyFloat64 = 8 [(gogoproto.casttype) = "github.com/gogo/protobuf/test/casttype.MyFloat64Type", (gogoproto.nullable) = false]; + optional bytes MyBytes = 9 [(gogoproto.casttype) = "github.com/gogo/protobuf/test/casttype.Bytes"]; + optional bytes NormalBytes = 10; + repeated uint64 MyUint64s = 11 [(gogoproto.casttype) = "github.com/gogo/protobuf/test/casttype.MyUint64Type"]; + map MyMap = 12 [(gogoproto.casttype) = "github.com/gogo/protobuf/test/casttype.MyMapType"]; + map MyCustomMap = 13 [(gogoproto.castkey) = "github.com/gogo/protobuf/test/casttype.MyStringType", (gogoproto.castvalue) = "github.com/gogo/protobuf/test/casttype.MyUint64Type"]; + map MyNullableMap = 14 [(gogoproto.castkey) = "github.com/gogo/protobuf/test/casttype.MyInt32Type"]; + map MyEmbeddedMap = 15 [(gogoproto.castkey) = "github.com/gogo/protobuf/test/casttype.MyInt32Type", (gogoproto.nullable) = false]; +} + +message Wilson { + optional int64 Int64 = 1; +} diff --git a/vendor/github.com/gogo/protobuf/test/casttype/combos/unmarshaler/casttypepb_test.go b/vendor/github.com/gogo/protobuf/test/casttype/combos/unmarshaler/casttypepb_test.go new file mode 100644 index 000000000..4b331acdc --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/casttype/combos/unmarshaler/casttypepb_test.go @@ -0,0 +1,457 @@ +// Code generated by protoc-gen-gogo. +// source: combos/unmarshaler/casttype.proto +// DO NOT EDIT! + +/* +Package casttype is a generated protocol buffer package. + +It is generated from these files: + combos/unmarshaler/casttype.proto + +It has these top-level messages: + Castaway + Wilson +*/ +package casttype + +import testing "testing" +import math_rand "math/rand" +import time "time" +import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" +import github_com_gogo_protobuf_jsonpb "github.com/gogo/protobuf/jsonpb" +import fmt "fmt" +import go_parser "go/parser" +import proto "github.com/gogo/protobuf/proto" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +func TestCastawayProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCastaway(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Castaway{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkCastawayProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Castaway, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedCastaway(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkCastawayProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedCastaway(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &Castaway{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestWilsonProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedWilson(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Wilson{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkWilsonProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Wilson, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedWilson(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkWilsonProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedWilson(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &Wilson{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestCastawayJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCastaway(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Castaway{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestWilsonJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedWilson(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Wilson{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestCastawayProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCastaway(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &Castaway{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestCastawayProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCastaway(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &Castaway{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestWilsonProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedWilson(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &Wilson{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestWilsonProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedWilson(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &Wilson{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestCasttypeDescription(t *testing.T) { + CasttypeDescription() +} +func TestCastawayVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCastaway(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &Castaway{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestWilsonVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedWilson(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &Wilson{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestCastawayFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCastaway(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestWilsonFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedWilson(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestCastawayGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCastaway(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestWilsonGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedWilson(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestCastawaySize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCastaway(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkCastawaySize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Castaway, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedCastaway(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestWilsonSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedWilson(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkWilsonSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Wilson, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedWilson(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestCastawayStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCastaway(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestWilsonStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedWilson(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} + +//These tests are generated by github.com/gogo/protobuf/plugin/testgen diff --git a/vendor/github.com/gogo/protobuf/test/casttype/combos/unsafeboth/casttype.pb.go b/vendor/github.com/gogo/protobuf/test/casttype/combos/unsafeboth/casttype.pb.go new file mode 100644 index 000000000..3eba6c0dc --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/casttype/combos/unsafeboth/casttype.pb.go @@ -0,0 +1,2418 @@ +// Code generated by protoc-gen-gogo. +// source: combos/unsafeboth/casttype.proto +// DO NOT EDIT! + +/* + Package casttype is a generated protocol buffer package. + + It is generated from these files: + combos/unsafeboth/casttype.proto + + It has these top-level messages: + Castaway + Wilson +*/ +package casttype + +import proto "github.com/gogo/protobuf/proto" +import fmt "fmt" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" + +import github_com_gogo_protobuf_test_casttype "github.com/gogo/protobuf/test/casttype" + +import github_com_gogo_protobuf_protoc_gen_gogo_descriptor "github.com/gogo/protobuf/protoc-gen-gogo/descriptor" +import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" +import compress_gzip "compress/gzip" +import bytes "bytes" +import io_ioutil "io/ioutil" + +import strings "strings" +import sort "sort" +import strconv "strconv" +import reflect "reflect" +import github_com_gogo_protobuf_sortkeys "github.com/gogo/protobuf/sortkeys" + +import errors "errors" + +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. +const _ = proto.GoGoProtoPackageIsVersion1 + +type Castaway struct { + Int32Ptr *int32 `protobuf:"varint,1,opt,name=Int32Ptr,json=int32Ptr,casttype=int32" json:"Int32Ptr,omitempty"` + Int32 int32 `protobuf:"varint,2,opt,name=Int32,json=int32,casttype=int32" json:"Int32"` + MyUint64Ptr *github_com_gogo_protobuf_test_casttype.MyUint64Type `protobuf:"varint,3,opt,name=MyUint64Ptr,json=myUint64Ptr,casttype=github.com/gogo/protobuf/test/casttype.MyUint64Type" json:"MyUint64Ptr,omitempty"` + MyUint64 github_com_gogo_protobuf_test_casttype.MyUint64Type `protobuf:"varint,4,opt,name=MyUint64,json=myUint64,casttype=github.com/gogo/protobuf/test/casttype.MyUint64Type" json:"MyUint64"` + MyFloat32Ptr *github_com_gogo_protobuf_test_casttype.MyFloat32Type `protobuf:"fixed32,5,opt,name=MyFloat32Ptr,json=myFloat32Ptr,casttype=github.com/gogo/protobuf/test/casttype.MyFloat32Type" json:"MyFloat32Ptr,omitempty"` + MyFloat32 github_com_gogo_protobuf_test_casttype.MyFloat32Type `protobuf:"fixed32,6,opt,name=MyFloat32,json=myFloat32,casttype=github.com/gogo/protobuf/test/casttype.MyFloat32Type" json:"MyFloat32"` + MyFloat64Ptr *github_com_gogo_protobuf_test_casttype.MyFloat64Type `protobuf:"fixed64,7,opt,name=MyFloat64Ptr,json=myFloat64Ptr,casttype=github.com/gogo/protobuf/test/casttype.MyFloat64Type" json:"MyFloat64Ptr,omitempty"` + MyFloat64 github_com_gogo_protobuf_test_casttype.MyFloat64Type `protobuf:"fixed64,8,opt,name=MyFloat64,json=myFloat64,casttype=github.com/gogo/protobuf/test/casttype.MyFloat64Type" json:"MyFloat64"` + MyBytes github_com_gogo_protobuf_test_casttype.Bytes `protobuf:"bytes,9,opt,name=MyBytes,json=myBytes,casttype=github.com/gogo/protobuf/test/casttype.Bytes" json:"MyBytes,omitempty"` + NormalBytes []byte `protobuf:"bytes,10,opt,name=NormalBytes,json=normalBytes" json:"NormalBytes,omitempty"` + MyUint64S []github_com_gogo_protobuf_test_casttype.MyUint64Type `protobuf:"varint,11,rep,name=MyUint64s,json=myUint64s,casttype=github.com/gogo/protobuf/test/casttype.MyUint64Type" json:"MyUint64s,omitempty"` + MyMap github_com_gogo_protobuf_test_casttype.MyMapType `protobuf:"bytes,12,rep,name=MyMap,json=myMap,casttype=github.com/gogo/protobuf/test/casttype.MyMapType" json:"MyMap,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"varint,2,opt,name=value"` + MyCustomMap map[github_com_gogo_protobuf_test_casttype.MyStringType]github_com_gogo_protobuf_test_casttype.MyUint64Type `protobuf:"bytes,13,rep,name=MyCustomMap,json=myCustomMap,castkey=github.com/gogo/protobuf/test/casttype.MyStringType,castvalue=github.com/gogo/protobuf/test/casttype.MyUint64Type" json:"MyCustomMap,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"varint,2,opt,name=value"` + MyNullableMap map[github_com_gogo_protobuf_test_casttype.MyInt32Type]*Wilson `protobuf:"bytes,14,rep,name=MyNullableMap,json=myNullableMap,castkey=github.com/gogo/protobuf/test/casttype.MyInt32Type" json:"MyNullableMap,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + MyEmbeddedMap map[github_com_gogo_protobuf_test_casttype.MyInt32Type]Wilson `protobuf:"bytes,15,rep,name=MyEmbeddedMap,json=myEmbeddedMap,castkey=github.com/gogo/protobuf/test/casttype.MyInt32Type" json:"MyEmbeddedMap" protobuf_key:"varint,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *Castaway) Reset() { *m = Castaway{} } +func (*Castaway) ProtoMessage() {} +func (*Castaway) Descriptor() ([]byte, []int) { return fileDescriptorCasttype, []int{0} } + +type Wilson struct { + Int64 *int64 `protobuf:"varint,1,opt,name=Int64,json=int64" json:"Int64,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *Wilson) Reset() { *m = Wilson{} } +func (*Wilson) ProtoMessage() {} +func (*Wilson) Descriptor() ([]byte, []int) { return fileDescriptorCasttype, []int{1} } + +func init() { + proto.RegisterType((*Castaway)(nil), "casttype.Castaway") + proto.RegisterType((*Wilson)(nil), "casttype.Wilson") +} +func (this *Castaway) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return CasttypeDescription() +} +func (this *Wilson) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return CasttypeDescription() +} +func CasttypeDescription() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + d := &github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet{} + var gzipped = []byte{ + // 3788 bytes of a gzipped FileDescriptorSet + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xcc, 0x5a, 0x5b, 0x6c, 0x1b, 0x67, + 0x76, 0x0e, 0x6f, 0x12, 0x79, 0x48, 0x51, 0xd4, 0x48, 0xb1, 0x69, 0x6d, 0x7c, 0x93, 0x73, 0xf1, + 0x7a, 0x77, 0x25, 0xd7, 0x71, 0x6c, 0x87, 0xde, 0x66, 0x21, 0x4a, 0xb4, 0x96, 0x86, 0x6e, 0x1d, + 0x89, 0x6b, 0x3b, 0x2d, 0x30, 0x18, 0x91, 0x23, 0x8a, 0xf6, 0x70, 0x86, 0xe5, 0x0c, 0x6d, 0x6b, + 0x9f, 0xd2, 0xba, 0xed, 0x22, 0x2d, 0x7a, 0x2f, 0xd0, 0xdc, 0xdb, 0x04, 0x68, 0x93, 0xa6, 0xb7, + 0xa4, 0x6d, 0x8a, 0xa2, 0x4f, 0x01, 0x8a, 0xb4, 0x79, 0x2a, 0xda, 0x3e, 0xf5, 0xa1, 0xc8, 0xad, + 0x06, 0x9a, 0xb6, 0x69, 0x9b, 0x02, 0x06, 0x1a, 0x34, 0x2f, 0x3d, 0xe7, 0xbf, 0x0c, 0x87, 0x17, + 0x69, 0x28, 0x05, 0x69, 0x56, 0x00, 0x21, 0xce, 0xf9, 0xcf, 0xf7, 0xcd, 0x99, 0xf3, 0x9f, 0xff, + 0x9c, 0xf3, 0xff, 0x43, 0xf8, 0xab, 0x1f, 0x81, 0x63, 0x55, 0xdb, 0xae, 0x9a, 0xc6, 0x4c, 0xa3, + 0x69, 0xbb, 0xf6, 0x46, 0x6b, 0x73, 0xa6, 0x62, 0x38, 0xe5, 0x66, 0xad, 0xe1, 0xda, 0xcd, 0x69, + 0x26, 0x53, 0x46, 0xb9, 0xc6, 0xb4, 0xd4, 0x98, 0x5a, 0x82, 0xb1, 0x4b, 0x35, 0xd3, 0x98, 0xf7, + 0x14, 0xd7, 0x0c, 0x57, 0xb9, 0x00, 0xd1, 0x4d, 0x14, 0x66, 0x43, 0xc7, 0x22, 0x27, 0x93, 0x67, + 0x1e, 0x9c, 0xee, 0x02, 0x4d, 0x77, 0x22, 0x56, 0x49, 0xac, 0x32, 0xc4, 0xd4, 0xdd, 0x28, 0x8c, + 0xf7, 0x19, 0x55, 0x14, 0x88, 0x5a, 0x7a, 0x9d, 0x18, 0x43, 0x27, 0x13, 0x2a, 0xfb, 0xae, 0x64, + 0x61, 0xb8, 0xa1, 0x97, 0x6f, 0xe8, 0x55, 0x23, 0x1b, 0x66, 0x62, 0x79, 0xa9, 0x1c, 0x01, 0xa8, + 0x18, 0x0d, 0xc3, 0xaa, 0x18, 0x56, 0x79, 0x3b, 0x1b, 0x41, 0x2b, 0x12, 0xaa, 0x4f, 0xa2, 0x7c, + 0x03, 0xc6, 0x1a, 0xad, 0x0d, 0xb3, 0x56, 0xd6, 0x7c, 0x6a, 0x80, 0x6a, 0x31, 0x35, 0xc3, 0x07, + 0xe6, 0xdb, 0xca, 0x8f, 0xc0, 0xe8, 0x2d, 0x43, 0xbf, 0xe1, 0x57, 0x4d, 0x32, 0xd5, 0x34, 0x89, + 0x7d, 0x8a, 0x73, 0x90, 0xaa, 0x1b, 0x8e, 0x83, 0x06, 0x68, 0xee, 0x76, 0xc3, 0xc8, 0x46, 0xd9, + 0xd3, 0x1f, 0xeb, 0x79, 0xfa, 0xee, 0x27, 0x4f, 0x0a, 0xd4, 0x3a, 0x82, 0x94, 0x59, 0x48, 0x18, + 0x56, 0xab, 0xce, 0x19, 0x62, 0x3b, 0xf8, 0xaf, 0x80, 0x1a, 0xdd, 0x2c, 0x71, 0x82, 0x09, 0x8a, + 0x61, 0xc7, 0x68, 0xde, 0xac, 0x95, 0x8d, 0xec, 0x10, 0x23, 0x78, 0xa4, 0x87, 0x60, 0x8d, 0x8f, + 0x77, 0x73, 0x48, 0x1c, 0x3e, 0x4a, 0xc2, 0xb8, 0xed, 0x1a, 0x96, 0x53, 0xb3, 0xad, 0xec, 0x30, + 0x23, 0x79, 0xa8, 0xcf, 0x2c, 0x1a, 0x66, 0xa5, 0x9b, 0xa2, 0x8d, 0x53, 0xce, 0xc1, 0xb0, 0xdd, + 0x70, 0xf1, 0x9b, 0x93, 0x8d, 0xe3, 0xfc, 0x24, 0xcf, 0x3c, 0xd0, 0x37, 0x10, 0x56, 0xb8, 0x8e, + 0x2a, 0x95, 0x95, 0x22, 0x64, 0x1c, 0xbb, 0xd5, 0x2c, 0x1b, 0x5a, 0xd9, 0xae, 0x18, 0x5a, 0xcd, + 0xda, 0xb4, 0xb3, 0x09, 0x46, 0x70, 0xb4, 0xf7, 0x41, 0x98, 0xe2, 0x1c, 0xea, 0x15, 0x51, 0x4d, + 0x4d, 0x3b, 0x1d, 0xd7, 0xca, 0x01, 0x18, 0x72, 0xb6, 0x2d, 0x57, 0xbf, 0x9d, 0x4d, 0xb1, 0x08, + 0x11, 0x57, 0x53, 0xff, 0x13, 0x83, 0xd1, 0x41, 0x42, 0xec, 0x22, 0xc4, 0x36, 0xe9, 0x29, 0x31, + 0xc0, 0xf6, 0xe0, 0x03, 0x8e, 0xe9, 0x74, 0xe2, 0xd0, 0x3e, 0x9d, 0x38, 0x0b, 0x49, 0xcb, 0x70, + 0x5c, 0xa3, 0xc2, 0x23, 0x22, 0x32, 0x60, 0x4c, 0x01, 0x07, 0xf5, 0x86, 0x54, 0x74, 0x5f, 0x21, + 0x75, 0x15, 0x46, 0x3d, 0x93, 0xb4, 0xa6, 0x6e, 0x55, 0x65, 0x6c, 0xce, 0x04, 0x59, 0x32, 0x5d, + 0x90, 0x38, 0x95, 0x60, 0x6a, 0xda, 0xe8, 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x91, + 0xae, 0xa4, 0xef, 0xe8, 0x9d, 0x0f, 0xaf, 0x71, 0xc1, 0xe8, 0xa7, 0xc5, 0xcd, 0x25, 0x22, 0x77, + 0x1e, 0x62, 0x03, 0x3a, 0xfc, 0x17, 0x05, 0x94, 0xeb, 0x63, 0x05, 0x49, 0xfa, 0xea, 0x5a, 0x30, + 0xfc, 0x97, 0x04, 0xdc, 0x8f, 0x22, 0xd3, 0x45, 0x5d, 0x0b, 0x26, 0xf8, 0x65, 0x69, 0xba, 0x40, + 0x90, 0xdb, 0x64, 0x49, 0x0b, 0x46, 0xff, 0x8a, 0xf4, 0xba, 0x84, 0xe0, 0x6a, 0x4a, 0x78, 0x69, + 0x2a, 0x18, 0xff, 0xab, 0x02, 0xdf, 0xc6, 0x90, 0x07, 0x7c, 0x69, 0x32, 0x98, 0xe2, 0xd7, 0xa4, + 0x07, 0x7c, 0x28, 0x5a, 0x46, 0xdd, 0xa5, 0x2f, 0x98, 0xe9, 0xd7, 0xe5, 0x32, 0xea, 0xaa, 0x7c, + 0x34, 0x9b, 0x2c, 0x5b, 0x04, 0x53, 0xfc, 0x86, 0x9c, 0x4d, 0xa6, 0x4f, 0x66, 0x74, 0xd7, 0x92, + 0x60, 0x8e, 0xdf, 0x94, 0x66, 0x74, 0x95, 0x12, 0xac, 0x4c, 0x4a, 0x6f, 0x1d, 0x09, 0xe6, 0x7b, + 0x46, 0xf0, 0x8d, 0xf5, 0x94, 0x91, 0xdc, 0x15, 0x38, 0xd0, 0xbf, 0x86, 0x04, 0xb3, 0x3e, 0x7b, + 0xaf, 0xab, 0xeb, 0xf7, 0x97, 0x10, 0x2c, 0x79, 0x13, 0xfd, 0xea, 0x47, 0x30, 0xed, 0x73, 0xf7, + 0x3a, 0x37, 0x76, 0xfe, 0xf2, 0x81, 0x1d, 0x1a, 0xb4, 0x53, 0x77, 0x30, 0xd7, 0x0b, 0x82, 0xcb, + 0x07, 0xa2, 0xa5, 0x21, 0x32, 0x77, 0x30, 0xfe, 0x45, 0xb9, 0x34, 0x04, 0x02, 0xc1, 0x71, 0xab, + 0x65, 0x9a, 0x14, 0x1c, 0xca, 0xee, 0x3f, 0x69, 0xc8, 0xfe, 0xeb, 0xe7, 0x62, 0x61, 0x48, 0x00, + 0xe6, 0xd0, 0x98, 0x51, 0xdf, 0x40, 0x1f, 0x04, 0x20, 0xff, 0xed, 0x73, 0x99, 0x10, 0x48, 0x1b, + 0xd7, 0x13, 0xf0, 0x4d, 0x23, 0x3b, 0xc3, 0x0e, 0xc0, 0xfe, 0xfb, 0xe7, 0xe2, 0x35, 0x6b, 0x1b, + 0xd2, 0x26, 0xe0, 0x2f, 0x6d, 0x77, 0x27, 0xf8, 0xa4, 0x93, 0x80, 0x6d, 0x34, 0x1f, 0x87, 0x61, + 0xfa, 0x65, 0x87, 0xab, 0x57, 0x83, 0xd0, 0xff, 0x21, 0xd0, 0x52, 0x9f, 0x1c, 0x56, 0xb7, 0x9b, + 0x06, 0x7e, 0x75, 0x82, 0xb0, 0xff, 0x29, 0xb0, 0x1e, 0x80, 0xc0, 0x65, 0xdd, 0x71, 0x07, 0x79, + 0xee, 0xff, 0x92, 0x60, 0x09, 0x20, 0xa3, 0xe9, 0xfb, 0x0d, 0x63, 0x3b, 0x08, 0xfb, 0xa9, 0x34, + 0x5a, 0xe8, 0x63, 0x02, 0x4c, 0xd0, 0x57, 0xfe, 0xd3, 0x83, 0x00, 0xf0, 0x7f, 0x0b, 0x70, 0x1b, + 0x91, 0x3f, 0xde, 0xff, 0x68, 0x07, 0x16, 0xec, 0x05, 0x9b, 0x1f, 0xea, 0xc0, 0xdd, 0x34, 0x1c, + 0x43, 0x1d, 0xac, 0xaf, 0x33, 0x7c, 0x4d, 0x6e, 0xd8, 0xee, 0xd6, 0x8c, 0xb4, 0x5d, 0x1c, 0xcb, + 0x78, 0xcf, 0x32, 0xb9, 0xb7, 0xf3, 0x9c, 0xa9, 0x67, 0x46, 0x20, 0x3e, 0x87, 0x58, 0xfd, 0x96,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x2d, 0xf1, 0xf1, 0x4d, 0x5e, 0x00, + 0x68, 0x87, 0x04, 0xfd, 0xf4, 0x14, 0xab, 0x89, 0xf8, 0x9d, 0x10, 0x7d, 0xa5, 0x9f, 0xa8, 0xca, + 0xdf, 0xc1, 0xd1, 0x8b, 0x22, 0x7e, 0x91, 0x0b, 0x5f, 0x08, 0x4d, 0x3e, 0x01, 0x99, 0xee, 0xa9, + 0xdd, 0x13, 0x5e, 0x05, 0xa5, 0xd7, 0xc1, 0x7e, 0x86, 0x18, 0x67, 0x78, 0xd8, 0xcf, 0x90, 0x3c, + 0x93, 0x69, 0xbb, 0xe8, 0x4a, 0xcd, 0xc4, 0x9a, 0xdd, 0xc3, 0xd9, 0xed, 0xae, 0x2f, 0xc6, 0x39, + 0x75, 0x04, 0x86, 0xb8, 0x90, 0x9e, 0xa5, 0xc8, 0xb2, 0x3d, 0x2b, 0x4a, 0xac, 0xc2, 0x9c, 0x3b, + 0x9b, 0x5f, 0x7c, 0xf7, 0xc3, 0x23, 0xf7, 0xfd, 0x1d, 0x7e, 0xfe, 0x11, 0x3f, 0x1f, 0x7c, 0x78, + 0x24, 0xf4, 0x31, 0x7e, 0x3e, 0xc5, 0xcf, 0x67, 0xf8, 0x79, 0xea, 0xa3, 0x23, 0xa1, 0xd7, 0xf0, + 0xf3, 0x06, 0x7e, 0xfe, 0x02, 0x3f, 0x6f, 0xe3, 0xe7, 0xdd, 0x8f, 0x50, 0x1f, 0x3f, 0x1f, 0xe0, + 0xf7, 0x8f, 0xf1, 0xff, 0xa7, 0xf8, 0xff, 0x33, 0xfc, 0x3c, 0xf5, 0xcf, 0x47, 0x42, 0xff, 0x17, + 0x00, 0x00, 0xff, 0xff, 0x14, 0x3a, 0xfe, 0x24, 0xd1, 0x31, 0x00, 0x00, + } + r := bytes.NewReader(gzipped) + gzipr, err := compress_gzip.NewReader(r) + if err != nil { + panic(err) + } + ungzipped, err := io_ioutil.ReadAll(gzipr) + if err != nil { + panic(err) + } + if err := github_com_gogo_protobuf_proto.Unmarshal(ungzipped, d); err != nil { + panic(err) + } + return d +} +func (this *Castaway) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*Castaway) + if !ok { + that2, ok := that.(Castaway) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *Castaway") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *Castaway but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *Castaway but is not nil && this == nil") + } + if this.Int32Ptr != nil && that1.Int32Ptr != nil { + if *this.Int32Ptr != *that1.Int32Ptr { + return fmt.Errorf("Int32Ptr this(%v) Not Equal that(%v)", *this.Int32Ptr, *that1.Int32Ptr) + } + } else if this.Int32Ptr != nil { + return fmt.Errorf("this.Int32Ptr == nil && that.Int32Ptr != nil") + } else if that1.Int32Ptr != nil { + return fmt.Errorf("Int32Ptr this(%v) Not Equal that(%v)", this.Int32Ptr, that1.Int32Ptr) + } + if this.Int32 != that1.Int32 { + return fmt.Errorf("Int32 this(%v) Not Equal that(%v)", this.Int32, that1.Int32) + } + if this.MyUint64Ptr != nil && that1.MyUint64Ptr != nil { + if *this.MyUint64Ptr != *that1.MyUint64Ptr { + return fmt.Errorf("MyUint64Ptr this(%v) Not Equal that(%v)", *this.MyUint64Ptr, *that1.MyUint64Ptr) + } + } else if this.MyUint64Ptr != nil { + return fmt.Errorf("this.MyUint64Ptr == nil && that.MyUint64Ptr != nil") + } else if that1.MyUint64Ptr != nil { + return fmt.Errorf("MyUint64Ptr this(%v) Not Equal that(%v)", this.MyUint64Ptr, that1.MyUint64Ptr) + } + if this.MyUint64 != that1.MyUint64 { + return fmt.Errorf("MyUint64 this(%v) Not Equal that(%v)", this.MyUint64, that1.MyUint64) + } + if this.MyFloat32Ptr != nil && that1.MyFloat32Ptr != nil { + if *this.MyFloat32Ptr != *that1.MyFloat32Ptr { + return fmt.Errorf("MyFloat32Ptr this(%v) Not Equal that(%v)", *this.MyFloat32Ptr, *that1.MyFloat32Ptr) + } + } else if this.MyFloat32Ptr != nil { + return fmt.Errorf("this.MyFloat32Ptr == nil && that.MyFloat32Ptr != nil") + } else if that1.MyFloat32Ptr != nil { + return fmt.Errorf("MyFloat32Ptr this(%v) Not Equal that(%v)", this.MyFloat32Ptr, that1.MyFloat32Ptr) + } + if this.MyFloat32 != that1.MyFloat32 { + return fmt.Errorf("MyFloat32 this(%v) Not Equal that(%v)", this.MyFloat32, that1.MyFloat32) + } + if this.MyFloat64Ptr != nil && that1.MyFloat64Ptr != nil { + if *this.MyFloat64Ptr != *that1.MyFloat64Ptr { + return fmt.Errorf("MyFloat64Ptr this(%v) Not Equal that(%v)", *this.MyFloat64Ptr, *that1.MyFloat64Ptr) + } + } else if this.MyFloat64Ptr != nil { + return fmt.Errorf("this.MyFloat64Ptr == nil && that.MyFloat64Ptr != nil") + } else if that1.MyFloat64Ptr != nil { + return fmt.Errorf("MyFloat64Ptr this(%v) Not Equal that(%v)", this.MyFloat64Ptr, that1.MyFloat64Ptr) + } + if this.MyFloat64 != that1.MyFloat64 { + return fmt.Errorf("MyFloat64 this(%v) Not Equal that(%v)", this.MyFloat64, that1.MyFloat64) + } + if !bytes.Equal(this.MyBytes, that1.MyBytes) { + return fmt.Errorf("MyBytes this(%v) Not Equal that(%v)", this.MyBytes, that1.MyBytes) + } + if !bytes.Equal(this.NormalBytes, that1.NormalBytes) { + return fmt.Errorf("NormalBytes this(%v) Not Equal that(%v)", this.NormalBytes, that1.NormalBytes) + } + if len(this.MyUint64S) != len(that1.MyUint64S) { + return fmt.Errorf("MyUint64S this(%v) Not Equal that(%v)", len(this.MyUint64S), len(that1.MyUint64S)) + } + for i := range this.MyUint64S { + if this.MyUint64S[i] != that1.MyUint64S[i] { + return fmt.Errorf("MyUint64S this[%v](%v) Not Equal that[%v](%v)", i, this.MyUint64S[i], i, that1.MyUint64S[i]) + } + } + if len(this.MyMap) != len(that1.MyMap) { + return fmt.Errorf("MyMap this(%v) Not Equal that(%v)", len(this.MyMap), len(that1.MyMap)) + } + for i := range this.MyMap { + if this.MyMap[i] != that1.MyMap[i] { + return fmt.Errorf("MyMap this[%v](%v) Not Equal that[%v](%v)", i, this.MyMap[i], i, that1.MyMap[i]) + } + } + if len(this.MyCustomMap) != len(that1.MyCustomMap) { + return fmt.Errorf("MyCustomMap this(%v) Not Equal that(%v)", len(this.MyCustomMap), len(that1.MyCustomMap)) + } + for i := range this.MyCustomMap { + if this.MyCustomMap[i] != that1.MyCustomMap[i] { + return fmt.Errorf("MyCustomMap this[%v](%v) Not Equal that[%v](%v)", i, this.MyCustomMap[i], i, that1.MyCustomMap[i]) + } + } + if len(this.MyNullableMap) != len(that1.MyNullableMap) { + return fmt.Errorf("MyNullableMap this(%v) Not Equal that(%v)", len(this.MyNullableMap), len(that1.MyNullableMap)) + } + for i := range this.MyNullableMap { + if !this.MyNullableMap[i].Equal(that1.MyNullableMap[i]) { + return fmt.Errorf("MyNullableMap this[%v](%v) Not Equal that[%v](%v)", i, this.MyNullableMap[i], i, that1.MyNullableMap[i]) + } + } + if len(this.MyEmbeddedMap) != len(that1.MyEmbeddedMap) { + return fmt.Errorf("MyEmbeddedMap this(%v) Not Equal that(%v)", len(this.MyEmbeddedMap), len(that1.MyEmbeddedMap)) + } + for i := range this.MyEmbeddedMap { + a := this.MyEmbeddedMap[i] + b := that1.MyEmbeddedMap[i] + if !(&a).Equal(&b) { + return fmt.Errorf("MyEmbeddedMap this[%v](%v) Not Equal that[%v](%v)", i, this.MyEmbeddedMap[i], i, that1.MyEmbeddedMap[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *Castaway) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*Castaway) + if !ok { + that2, ok := that.(Castaway) + 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.Int32Ptr != nil && that1.Int32Ptr != nil { + if *this.Int32Ptr != *that1.Int32Ptr { + return false + } + } else if this.Int32Ptr != nil { + return false + } else if that1.Int32Ptr != nil { + return false + } + if this.Int32 != that1.Int32 { + return false + } + if this.MyUint64Ptr != nil && that1.MyUint64Ptr != nil { + if *this.MyUint64Ptr != *that1.MyUint64Ptr { + return false + } + } else if this.MyUint64Ptr != nil { + return false + } else if that1.MyUint64Ptr != nil { + return false + } + if this.MyUint64 != that1.MyUint64 { + return false + } + if this.MyFloat32Ptr != nil && that1.MyFloat32Ptr != nil { + if *this.MyFloat32Ptr != *that1.MyFloat32Ptr { + return false + } + } else if this.MyFloat32Ptr != nil { + return false + } else if that1.MyFloat32Ptr != nil { + return false + } + if this.MyFloat32 != that1.MyFloat32 { + return false + } + if this.MyFloat64Ptr != nil && that1.MyFloat64Ptr != nil { + if *this.MyFloat64Ptr != *that1.MyFloat64Ptr { + return false + } + } else if this.MyFloat64Ptr != nil { + return false + } else if that1.MyFloat64Ptr != nil { + return false + } + if this.MyFloat64 != that1.MyFloat64 { + return false + } + if !bytes.Equal(this.MyBytes, that1.MyBytes) { + return false + } + if !bytes.Equal(this.NormalBytes, that1.NormalBytes) { + return false + } + if len(this.MyUint64S) != len(that1.MyUint64S) { + return false + } + for i := range this.MyUint64S { + if this.MyUint64S[i] != that1.MyUint64S[i] { + return false + } + } + if len(this.MyMap) != len(that1.MyMap) { + return false + } + for i := range this.MyMap { + if this.MyMap[i] != that1.MyMap[i] { + return false + } + } + if len(this.MyCustomMap) != len(that1.MyCustomMap) { + return false + } + for i := range this.MyCustomMap { + if this.MyCustomMap[i] != that1.MyCustomMap[i] { + return false + } + } + if len(this.MyNullableMap) != len(that1.MyNullableMap) { + return false + } + for i := range this.MyNullableMap { + if !this.MyNullableMap[i].Equal(that1.MyNullableMap[i]) { + return false + } + } + if len(this.MyEmbeddedMap) != len(that1.MyEmbeddedMap) { + return false + } + for i := range this.MyEmbeddedMap { + a := this.MyEmbeddedMap[i] + b := that1.MyEmbeddedMap[i] + if !(&a).Equal(&b) { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *Wilson) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*Wilson) + if !ok { + that2, ok := that.(Wilson) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *Wilson") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *Wilson but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *Wilson but is not nil && this == nil") + } + if this.Int64 != nil && that1.Int64 != nil { + if *this.Int64 != *that1.Int64 { + return fmt.Errorf("Int64 this(%v) Not Equal that(%v)", *this.Int64, *that1.Int64) + } + } else if this.Int64 != nil { + return fmt.Errorf("this.Int64 == nil && that.Int64 != nil") + } else if that1.Int64 != nil { + return fmt.Errorf("Int64 this(%v) Not Equal that(%v)", this.Int64, that1.Int64) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *Wilson) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*Wilson) + if !ok { + that2, ok := that.(Wilson) + 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.Int64 != nil && that1.Int64 != nil { + if *this.Int64 != *that1.Int64 { + return false + } + } else if this.Int64 != nil { + return false + } else if that1.Int64 != nil { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} + +type CastawayFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetInt32Ptr() *int32 + GetInt32() int32 + GetMyUint64Ptr() *github_com_gogo_protobuf_test_casttype.MyUint64Type + GetMyUint64() github_com_gogo_protobuf_test_casttype.MyUint64Type + GetMyFloat32Ptr() *github_com_gogo_protobuf_test_casttype.MyFloat32Type + GetMyFloat32() github_com_gogo_protobuf_test_casttype.MyFloat32Type + GetMyFloat64Ptr() *github_com_gogo_protobuf_test_casttype.MyFloat64Type + GetMyFloat64() github_com_gogo_protobuf_test_casttype.MyFloat64Type + GetMyBytes() github_com_gogo_protobuf_test_casttype.Bytes + GetNormalBytes() []byte + GetMyUint64S() []github_com_gogo_protobuf_test_casttype.MyUint64Type + GetMyMap() github_com_gogo_protobuf_test_casttype.MyMapType + GetMyCustomMap() map[github_com_gogo_protobuf_test_casttype.MyStringType]github_com_gogo_protobuf_test_casttype.MyUint64Type + GetMyNullableMap() map[github_com_gogo_protobuf_test_casttype.MyInt32Type]*Wilson + GetMyEmbeddedMap() map[github_com_gogo_protobuf_test_casttype.MyInt32Type]Wilson +} + +func (this *Castaway) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *Castaway) TestProto() github_com_gogo_protobuf_proto.Message { + return NewCastawayFromFace(this) +} + +func (this *Castaway) GetInt32Ptr() *int32 { + return this.Int32Ptr +} + +func (this *Castaway) GetInt32() int32 { + return this.Int32 +} + +func (this *Castaway) GetMyUint64Ptr() *github_com_gogo_protobuf_test_casttype.MyUint64Type { + return this.MyUint64Ptr +} + +func (this *Castaway) GetMyUint64() github_com_gogo_protobuf_test_casttype.MyUint64Type { + return this.MyUint64 +} + +func (this *Castaway) GetMyFloat32Ptr() *github_com_gogo_protobuf_test_casttype.MyFloat32Type { + return this.MyFloat32Ptr +} + +func (this *Castaway) GetMyFloat32() github_com_gogo_protobuf_test_casttype.MyFloat32Type { + return this.MyFloat32 +} + +func (this *Castaway) GetMyFloat64Ptr() *github_com_gogo_protobuf_test_casttype.MyFloat64Type { + return this.MyFloat64Ptr +} + +func (this *Castaway) GetMyFloat64() github_com_gogo_protobuf_test_casttype.MyFloat64Type { + return this.MyFloat64 +} + +func (this *Castaway) GetMyBytes() github_com_gogo_protobuf_test_casttype.Bytes { + return this.MyBytes +} + +func (this *Castaway) GetNormalBytes() []byte { + return this.NormalBytes +} + +func (this *Castaway) GetMyUint64S() []github_com_gogo_protobuf_test_casttype.MyUint64Type { + return this.MyUint64S +} + +func (this *Castaway) GetMyMap() github_com_gogo_protobuf_test_casttype.MyMapType { + return this.MyMap +} + +func (this *Castaway) GetMyCustomMap() map[github_com_gogo_protobuf_test_casttype.MyStringType]github_com_gogo_protobuf_test_casttype.MyUint64Type { + return this.MyCustomMap +} + +func (this *Castaway) GetMyNullableMap() map[github_com_gogo_protobuf_test_casttype.MyInt32Type]*Wilson { + return this.MyNullableMap +} + +func (this *Castaway) GetMyEmbeddedMap() map[github_com_gogo_protobuf_test_casttype.MyInt32Type]Wilson { + return this.MyEmbeddedMap +} + +func NewCastawayFromFace(that CastawayFace) *Castaway { + this := &Castaway{} + this.Int32Ptr = that.GetInt32Ptr() + this.Int32 = that.GetInt32() + this.MyUint64Ptr = that.GetMyUint64Ptr() + this.MyUint64 = that.GetMyUint64() + this.MyFloat32Ptr = that.GetMyFloat32Ptr() + this.MyFloat32 = that.GetMyFloat32() + this.MyFloat64Ptr = that.GetMyFloat64Ptr() + this.MyFloat64 = that.GetMyFloat64() + this.MyBytes = that.GetMyBytes() + this.NormalBytes = that.GetNormalBytes() + this.MyUint64S = that.GetMyUint64S() + this.MyMap = that.GetMyMap() + this.MyCustomMap = that.GetMyCustomMap() + this.MyNullableMap = that.GetMyNullableMap() + this.MyEmbeddedMap = that.GetMyEmbeddedMap() + return this +} + +type WilsonFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetInt64() *int64 +} + +func (this *Wilson) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *Wilson) TestProto() github_com_gogo_protobuf_proto.Message { + return NewWilsonFromFace(this) +} + +func (this *Wilson) GetInt64() *int64 { + return this.Int64 +} + +func NewWilsonFromFace(that WilsonFace) *Wilson { + this := &Wilson{} + this.Int64 = that.GetInt64() + return this +} + +func (this *Castaway) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 19) + s = append(s, "&casttype.Castaway{") + if this.Int32Ptr != nil { + s = append(s, "Int32Ptr: "+valueToGoStringCasttype(this.Int32Ptr, "int32")+",\n") + } + s = append(s, "Int32: "+fmt.Sprintf("%#v", this.Int32)+",\n") + if this.MyUint64Ptr != nil { + s = append(s, "MyUint64Ptr: "+valueToGoStringCasttype(this.MyUint64Ptr, "github_com_gogo_protobuf_test_casttype.MyUint64Type")+",\n") + } + s = append(s, "MyUint64: "+fmt.Sprintf("%#v", this.MyUint64)+",\n") + if this.MyFloat32Ptr != nil { + s = append(s, "MyFloat32Ptr: "+valueToGoStringCasttype(this.MyFloat32Ptr, "github_com_gogo_protobuf_test_casttype.MyFloat32Type")+",\n") + } + s = append(s, "MyFloat32: "+fmt.Sprintf("%#v", this.MyFloat32)+",\n") + if this.MyFloat64Ptr != nil { + s = append(s, "MyFloat64Ptr: "+valueToGoStringCasttype(this.MyFloat64Ptr, "github_com_gogo_protobuf_test_casttype.MyFloat64Type")+",\n") + } + s = append(s, "MyFloat64: "+fmt.Sprintf("%#v", this.MyFloat64)+",\n") + if this.MyBytes != nil { + s = append(s, "MyBytes: "+valueToGoStringCasttype(this.MyBytes, "github_com_gogo_protobuf_test_casttype.Bytes")+",\n") + } + if this.NormalBytes != nil { + s = append(s, "NormalBytes: "+valueToGoStringCasttype(this.NormalBytes, "byte")+",\n") + } + if this.MyUint64S != nil { + s = append(s, "MyUint64S: "+fmt.Sprintf("%#v", this.MyUint64S)+",\n") + } + keysForMyMap := make([]string, 0, len(this.MyMap)) + for k := range this.MyMap { + keysForMyMap = append(keysForMyMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForMyMap) + mapStringForMyMap := "github_com_gogo_protobuf_test_casttype.MyMapType{" + for _, k := range keysForMyMap { + mapStringForMyMap += fmt.Sprintf("%#v: %#v,", k, this.MyMap[k]) + } + mapStringForMyMap += "}" + if this.MyMap != nil { + s = append(s, "MyMap: "+mapStringForMyMap+",\n") + } + keysForMyCustomMap := make([]string, 0, len(this.MyCustomMap)) + for k := range this.MyCustomMap { + keysForMyCustomMap = append(keysForMyCustomMap, string(k)) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForMyCustomMap) + mapStringForMyCustomMap := "map[github_com_gogo_protobuf_test_casttype.MyStringType]github_com_gogo_protobuf_test_casttype.MyUint64Type{" + for _, k := range keysForMyCustomMap { + mapStringForMyCustomMap += fmt.Sprintf("%#v: %#v,", k, this.MyCustomMap[github_com_gogo_protobuf_test_casttype.MyStringType(k)]) + } + mapStringForMyCustomMap += "}" + if this.MyCustomMap != nil { + s = append(s, "MyCustomMap: "+mapStringForMyCustomMap+",\n") + } + keysForMyNullableMap := make([]int32, 0, len(this.MyNullableMap)) + for k := range this.MyNullableMap { + keysForMyNullableMap = append(keysForMyNullableMap, int32(k)) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForMyNullableMap) + mapStringForMyNullableMap := "map[github_com_gogo_protobuf_test_casttype.MyInt32Type]*Wilson{" + for _, k := range keysForMyNullableMap { + mapStringForMyNullableMap += fmt.Sprintf("%#v: %#v,", k, this.MyNullableMap[github_com_gogo_protobuf_test_casttype.MyInt32Type(k)]) + } + mapStringForMyNullableMap += "}" + if this.MyNullableMap != nil { + s = append(s, "MyNullableMap: "+mapStringForMyNullableMap+",\n") + } + keysForMyEmbeddedMap := make([]int32, 0, len(this.MyEmbeddedMap)) + for k := range this.MyEmbeddedMap { + keysForMyEmbeddedMap = append(keysForMyEmbeddedMap, int32(k)) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForMyEmbeddedMap) + mapStringForMyEmbeddedMap := "map[github_com_gogo_protobuf_test_casttype.MyInt32Type]Wilson{" + for _, k := range keysForMyEmbeddedMap { + mapStringForMyEmbeddedMap += fmt.Sprintf("%#v: %#v,", k, this.MyEmbeddedMap[github_com_gogo_protobuf_test_casttype.MyInt32Type(k)]) + } + mapStringForMyEmbeddedMap += "}" + if this.MyEmbeddedMap != nil { + s = append(s, "MyEmbeddedMap: "+mapStringForMyEmbeddedMap+",\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 *Wilson) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&casttype.Wilson{") + if this.Int64 != nil { + s = append(s, "Int64: "+valueToGoStringCasttype(this.Int64, "int64")+",\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 valueToGoStringCasttype(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 extensionToGoStringCasttype(e map[int32]github_com_gogo_protobuf_proto.Extension) string { + if e == nil { + return "nil" + } + s := "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 +} +func NewPopulatedCastaway(r randyCasttype, easy bool) *Castaway { + this := &Castaway{} + if r.Intn(10) != 0 { + v1 := int32(r.Int63()) + if r.Intn(2) == 0 { + v1 *= -1 + } + this.Int32Ptr = &v1 + } + this.Int32 = int32(r.Int63()) + if r.Intn(2) == 0 { + this.Int32 *= -1 + } + if r.Intn(10) != 0 { + v2 := github_com_gogo_protobuf_test_casttype.MyUint64Type(uint64(r.Uint32())) + this.MyUint64Ptr = &v2 + } + this.MyUint64 = github_com_gogo_protobuf_test_casttype.MyUint64Type(uint64(r.Uint32())) + if r.Intn(10) != 0 { + v3 := github_com_gogo_protobuf_test_casttype.MyFloat32Type(r.Float32()) + if r.Intn(2) == 0 { + v3 *= -1 + } + this.MyFloat32Ptr = &v3 + } + this.MyFloat32 = github_com_gogo_protobuf_test_casttype.MyFloat32Type(r.Float32()) + if r.Intn(2) == 0 { + this.MyFloat32 *= -1 + } + if r.Intn(10) != 0 { + v4 := github_com_gogo_protobuf_test_casttype.MyFloat64Type(r.Float64()) + if r.Intn(2) == 0 { + v4 *= -1 + } + this.MyFloat64Ptr = &v4 + } + this.MyFloat64 = github_com_gogo_protobuf_test_casttype.MyFloat64Type(r.Float64()) + if r.Intn(2) == 0 { + this.MyFloat64 *= -1 + } + if r.Intn(10) != 0 { + v5 := r.Intn(100) + this.MyBytes = make(github_com_gogo_protobuf_test_casttype.Bytes, v5) + for i := 0; i < v5; i++ { + this.MyBytes[i] = byte(r.Intn(256)) + } + } + if r.Intn(10) != 0 { + v6 := r.Intn(100) + this.NormalBytes = make([]byte, v6) + for i := 0; i < v6; i++ { + this.NormalBytes[i] = byte(r.Intn(256)) + } + } + if r.Intn(10) != 0 { + v7 := r.Intn(10) + this.MyUint64S = make([]github_com_gogo_protobuf_test_casttype.MyUint64Type, v7) + for i := 0; i < v7; i++ { + this.MyUint64S[i] = github_com_gogo_protobuf_test_casttype.MyUint64Type(uint64(r.Uint32())) + } + } + if r.Intn(10) != 0 { + v8 := r.Intn(10) + this.MyMap = make(github_com_gogo_protobuf_test_casttype.MyMapType) + for i := 0; i < v8; i++ { + v9 := randStringCasttype(r) + this.MyMap[v9] = uint64(uint64(r.Uint32())) + } + } + if r.Intn(10) != 0 { + v10 := r.Intn(10) + this.MyCustomMap = make(map[github_com_gogo_protobuf_test_casttype.MyStringType]github_com_gogo_protobuf_test_casttype.MyUint64Type) + for i := 0; i < v10; i++ { + v11 := github_com_gogo_protobuf_test_casttype.MyStringType(randStringCasttype(r)) + this.MyCustomMap[v11] = github_com_gogo_protobuf_test_casttype.MyUint64Type(uint64(r.Uint32())) + } + } + if r.Intn(10) != 0 { + v12 := r.Intn(10) + this.MyNullableMap = make(map[github_com_gogo_protobuf_test_casttype.MyInt32Type]*Wilson) + for i := 0; i < v12; i++ { + this.MyNullableMap[github_com_gogo_protobuf_test_casttype.MyInt32Type(int32(r.Int31()))] = NewPopulatedWilson(r, easy) + } + } + if r.Intn(10) != 0 { + v13 := r.Intn(10) + this.MyEmbeddedMap = make(map[github_com_gogo_protobuf_test_casttype.MyInt32Type]Wilson) + for i := 0; i < v13; i++ { + this.MyEmbeddedMap[github_com_gogo_protobuf_test_casttype.MyInt32Type(int32(r.Int31()))] = *NewPopulatedWilson(r, easy) + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedCasttype(r, 16) + } + return this +} + +func NewPopulatedWilson(r randyCasttype, easy bool) *Wilson { + this := &Wilson{} + if r.Intn(10) != 0 { + v14 := int64(r.Int63()) + if r.Intn(2) == 0 { + v14 *= -1 + } + this.Int64 = &v14 + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedCasttype(r, 2) + } + return this +} + +type randyCasttype interface { + Float32() float32 + Float64() float64 + Int63() int64 + Int31() int32 + Uint32() uint32 + Intn(n int) int +} + +func randUTF8RuneCasttype(r randyCasttype) 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 randStringCasttype(r randyCasttype) string { + v15 := r.Intn(100) + tmps := make([]rune, v15) + for i := 0; i < v15; i++ { + tmps[i] = randUTF8RuneCasttype(r) + } + return string(tmps) +} +func randUnrecognizedCasttype(r randyCasttype, 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 = randFieldCasttype(data, r, fieldNumber, wire) + } + return data +} +func randFieldCasttype(data []byte, r randyCasttype, fieldNumber int, wire int) []byte { + key := uint32(fieldNumber)<<3 | uint32(wire) + switch wire { + case 0: + data = encodeVarintPopulateCasttype(data, uint64(key)) + v16 := r.Int63() + if r.Intn(2) == 0 { + v16 *= -1 + } + data = encodeVarintPopulateCasttype(data, uint64(v16)) + case 1: + data = encodeVarintPopulateCasttype(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 = encodeVarintPopulateCasttype(data, uint64(key)) + ll := r.Intn(100) + data = encodeVarintPopulateCasttype(data, uint64(ll)) + for j := 0; j < ll; j++ { + data = append(data, byte(r.Intn(256))) + } + default: + data = encodeVarintPopulateCasttype(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 encodeVarintPopulateCasttype(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 *Castaway) Size() (n int) { + var l int + _ = l + if m.Int32Ptr != nil { + n += 1 + sovCasttype(uint64(*m.Int32Ptr)) + } + n += 1 + sovCasttype(uint64(m.Int32)) + if m.MyUint64Ptr != nil { + n += 1 + sovCasttype(uint64(*m.MyUint64Ptr)) + } + n += 1 + sovCasttype(uint64(m.MyUint64)) + if m.MyFloat32Ptr != nil { + n += 5 + } + n += 5 + if m.MyFloat64Ptr != nil { + n += 9 + } + n += 9 + if m.MyBytes != nil { + l = len(m.MyBytes) + n += 1 + l + sovCasttype(uint64(l)) + } + if m.NormalBytes != nil { + l = len(m.NormalBytes) + n += 1 + l + sovCasttype(uint64(l)) + } + if len(m.MyUint64S) > 0 { + for _, e := range m.MyUint64S { + n += 1 + sovCasttype(uint64(e)) + } + } + if len(m.MyMap) > 0 { + for k, v := range m.MyMap { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovCasttype(uint64(len(k))) + 1 + sovCasttype(uint64(v)) + n += mapEntrySize + 1 + sovCasttype(uint64(mapEntrySize)) + } + } + if len(m.MyCustomMap) > 0 { + for k, v := range m.MyCustomMap { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovCasttype(uint64(len(k))) + 1 + sovCasttype(uint64(v)) + n += mapEntrySize + 1 + sovCasttype(uint64(mapEntrySize)) + } + } + if len(m.MyNullableMap) > 0 { + for k, v := range m.MyNullableMap { + _ = k + _ = v + l = 0 + if v != nil { + l = v.Size() + } + mapEntrySize := 1 + sovCasttype(uint64(k)) + 1 + l + sovCasttype(uint64(l)) + n += mapEntrySize + 1 + sovCasttype(uint64(mapEntrySize)) + } + } + if len(m.MyEmbeddedMap) > 0 { + for k, v := range m.MyEmbeddedMap { + _ = k + _ = v + l = v.Size() + mapEntrySize := 1 + sovCasttype(uint64(k)) + 1 + l + sovCasttype(uint64(l)) + n += mapEntrySize + 1 + sovCasttype(uint64(mapEntrySize)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *Wilson) Size() (n int) { + var l int + _ = l + if m.Int64 != nil { + n += 1 + sovCasttype(uint64(*m.Int64)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func sovCasttype(x uint64) (n int) { + for { + n++ + x >>= 7 + if x == 0 { + break + } + } + return n +} +func sozCasttype(x uint64) (n int) { + return sovCasttype(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (this *Castaway) String() string { + if this == nil { + return "nil" + } + keysForMyMap := make([]string, 0, len(this.MyMap)) + for k := range this.MyMap { + keysForMyMap = append(keysForMyMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForMyMap) + mapStringForMyMap := "github_com_gogo_protobuf_test_casttype.MyMapType{" + for _, k := range keysForMyMap { + mapStringForMyMap += fmt.Sprintf("%v: %v,", k, this.MyMap[k]) + } + mapStringForMyMap += "}" + keysForMyCustomMap := make([]string, 0, len(this.MyCustomMap)) + for k := range this.MyCustomMap { + keysForMyCustomMap = append(keysForMyCustomMap, string(k)) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForMyCustomMap) + mapStringForMyCustomMap := "map[github_com_gogo_protobuf_test_casttype.MyStringType]github_com_gogo_protobuf_test_casttype.MyUint64Type{" + for _, k := range keysForMyCustomMap { + mapStringForMyCustomMap += fmt.Sprintf("%v: %v,", k, this.MyCustomMap[github_com_gogo_protobuf_test_casttype.MyStringType(k)]) + } + mapStringForMyCustomMap += "}" + keysForMyNullableMap := make([]int32, 0, len(this.MyNullableMap)) + for k := range this.MyNullableMap { + keysForMyNullableMap = append(keysForMyNullableMap, int32(k)) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForMyNullableMap) + mapStringForMyNullableMap := "map[github_com_gogo_protobuf_test_casttype.MyInt32Type]*Wilson{" + for _, k := range keysForMyNullableMap { + mapStringForMyNullableMap += fmt.Sprintf("%v: %v,", k, this.MyNullableMap[github_com_gogo_protobuf_test_casttype.MyInt32Type(k)]) + } + mapStringForMyNullableMap += "}" + keysForMyEmbeddedMap := make([]int32, 0, len(this.MyEmbeddedMap)) + for k := range this.MyEmbeddedMap { + keysForMyEmbeddedMap = append(keysForMyEmbeddedMap, int32(k)) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForMyEmbeddedMap) + mapStringForMyEmbeddedMap := "map[github_com_gogo_protobuf_test_casttype.MyInt32Type]Wilson{" + for _, k := range keysForMyEmbeddedMap { + mapStringForMyEmbeddedMap += fmt.Sprintf("%v: %v,", k, this.MyEmbeddedMap[github_com_gogo_protobuf_test_casttype.MyInt32Type(k)]) + } + mapStringForMyEmbeddedMap += "}" + s := strings.Join([]string{`&Castaway{`, + `Int32Ptr:` + valueToStringCasttype(this.Int32Ptr) + `,`, + `Int32:` + fmt.Sprintf("%v", this.Int32) + `,`, + `MyUint64Ptr:` + valueToStringCasttype(this.MyUint64Ptr) + `,`, + `MyUint64:` + fmt.Sprintf("%v", this.MyUint64) + `,`, + `MyFloat32Ptr:` + valueToStringCasttype(this.MyFloat32Ptr) + `,`, + `MyFloat32:` + fmt.Sprintf("%v", this.MyFloat32) + `,`, + `MyFloat64Ptr:` + valueToStringCasttype(this.MyFloat64Ptr) + `,`, + `MyFloat64:` + fmt.Sprintf("%v", this.MyFloat64) + `,`, + `MyBytes:` + valueToStringCasttype(this.MyBytes) + `,`, + `NormalBytes:` + valueToStringCasttype(this.NormalBytes) + `,`, + `MyUint64S:` + fmt.Sprintf("%v", this.MyUint64S) + `,`, + `MyMap:` + mapStringForMyMap + `,`, + `MyCustomMap:` + mapStringForMyCustomMap + `,`, + `MyNullableMap:` + mapStringForMyNullableMap + `,`, + `MyEmbeddedMap:` + mapStringForMyEmbeddedMap + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *Wilson) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&Wilson{`, + `Int64:` + valueToStringCasttype(this.Int64) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func valueToStringCasttype(v interface{}) string { + rv := reflect.ValueOf(v) + if rv.IsNil() { + return "nil" + } + pv := reflect.Indirect(rv).Interface() + return fmt.Sprintf("*%v", pv) +} +func (m *Castaway) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *Castaway) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Int32Ptr != nil { + data[i] = 0x8 + i++ + i = encodeVarintCasttype(data, i, uint64(*m.Int32Ptr)) + } + data[i] = 0x10 + i++ + i = encodeVarintCasttype(data, i, uint64(m.Int32)) + if m.MyUint64Ptr != nil { + data[i] = 0x18 + i++ + i = encodeVarintCasttype(data, i, uint64(*m.MyUint64Ptr)) + } + data[i] = 0x20 + i++ + i = encodeVarintCasttype(data, i, uint64(m.MyUint64)) + if m.MyFloat32Ptr != nil { + data[i] = 0x2d + i++ + i = encodeFixed32Casttype(data, i, uint32(math.Float32bits(float32(*m.MyFloat32Ptr)))) + } + data[i] = 0x35 + i++ + i = encodeFixed32Casttype(data, i, uint32(math.Float32bits(float32(m.MyFloat32)))) + if m.MyFloat64Ptr != nil { + data[i] = 0x39 + i++ + i = encodeFixed64Casttype(data, i, uint64(math.Float64bits(float64(*m.MyFloat64Ptr)))) + } + data[i] = 0x41 + i++ + i = encodeFixed64Casttype(data, i, uint64(math.Float64bits(float64(m.MyFloat64)))) + if m.MyBytes != nil { + data[i] = 0x4a + i++ + i = encodeVarintCasttype(data, i, uint64(len(m.MyBytes))) + i += copy(data[i:], m.MyBytes) + } + if m.NormalBytes != nil { + data[i] = 0x52 + i++ + i = encodeVarintCasttype(data, i, uint64(len(m.NormalBytes))) + i += copy(data[i:], m.NormalBytes) + } + if len(m.MyUint64S) > 0 { + for _, num := range m.MyUint64S { + data[i] = 0x58 + i++ + i = encodeVarintCasttype(data, i, uint64(num)) + } + } + if len(m.MyMap) > 0 { + for k := range m.MyMap { + data[i] = 0x62 + i++ + v := m.MyMap[k] + mapSize := 1 + len(k) + sovCasttype(uint64(len(k))) + 1 + sovCasttype(uint64(v)) + i = encodeVarintCasttype(data, i, uint64(mapSize)) + data[i] = 0xa + i++ + i = encodeVarintCasttype(data, i, uint64(len(k))) + i += copy(data[i:], k) + data[i] = 0x10 + i++ + i = encodeVarintCasttype(data, i, uint64(v)) + } + } + if len(m.MyCustomMap) > 0 { + for k := range m.MyCustomMap { + data[i] = 0x6a + i++ + v := m.MyCustomMap[k] + mapSize := 1 + len(k) + sovCasttype(uint64(len(k))) + 1 + sovCasttype(uint64(v)) + i = encodeVarintCasttype(data, i, uint64(mapSize)) + data[i] = 0xa + i++ + i = encodeVarintCasttype(data, i, uint64(len(k))) + i += copy(data[i:], k) + data[i] = 0x10 + i++ + i = encodeVarintCasttype(data, i, uint64(v)) + } + } + if len(m.MyNullableMap) > 0 { + for k := range m.MyNullableMap { + data[i] = 0x72 + i++ + v := m.MyNullableMap[k] + if v == nil { + return 0, errors.New("proto: map has nil element") + } + msgSize := v.Size() + mapSize := 1 + sovCasttype(uint64(k)) + 1 + msgSize + sovCasttype(uint64(msgSize)) + i = encodeVarintCasttype(data, i, uint64(mapSize)) + data[i] = 0x8 + i++ + i = encodeVarintCasttype(data, i, uint64(k)) + data[i] = 0x12 + i++ + i = encodeVarintCasttype(data, i, uint64(v.Size())) + n1, err := v.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n1 + } + } + if len(m.MyEmbeddedMap) > 0 { + for k := range m.MyEmbeddedMap { + data[i] = 0x7a + i++ + v := m.MyEmbeddedMap[k] + msgSize := (&v).Size() + mapSize := 1 + sovCasttype(uint64(k)) + 1 + msgSize + sovCasttype(uint64(msgSize)) + i = encodeVarintCasttype(data, i, uint64(mapSize)) + data[i] = 0x8 + i++ + i = encodeVarintCasttype(data, i, uint64(k)) + data[i] = 0x12 + i++ + i = encodeVarintCasttype(data, i, uint64((&v).Size())) + n2, err := (&v).MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n2 + } + } + if m.XXX_unrecognized != nil { + i += copy(data[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *Wilson) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *Wilson) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Int64 != nil { + data[i] = 0x8 + i++ + i = encodeVarintCasttype(data, i, uint64(*m.Int64)) + } + if m.XXX_unrecognized != nil { + i += copy(data[i:], m.XXX_unrecognized) + } + return i, nil +} + +func encodeFixed64Casttype(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 encodeFixed32Casttype(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 encodeVarintCasttype(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 (m *Castaway) 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 ErrIntOverflowCasttypeUnsafe + } + 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: Castaway: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Castaway: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Int32Ptr", wireType) + } + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCasttypeUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Int32Ptr = &v + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Int32", wireType) + } + m.Int32 = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCasttypeUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + m.Int32 |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field MyUint64Ptr", wireType) + } + var v github_com_gogo_protobuf_test_casttype.MyUint64Type + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCasttypeUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (github_com_gogo_protobuf_test_casttype.MyUint64Type(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.MyUint64Ptr = &v + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field MyUint64", wireType) + } + m.MyUint64 = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCasttypeUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + m.MyUint64 |= (github_com_gogo_protobuf_test_casttype.MyUint64Type(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + case 5: + if wireType != 5 { + return fmt.Errorf("proto: wrong wireType = %d for field MyFloat32Ptr", wireType) + } + var v uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + iNdEx += 4 + v = uint32(data[iNdEx-4]) + v |= uint32(data[iNdEx-3]) << 8 + v |= uint32(data[iNdEx-2]) << 16 + v |= uint32(data[iNdEx-1]) << 24 + v2 := github_com_gogo_protobuf_test_casttype.MyFloat32Type(math.Float32frombits(v)) + m.MyFloat32Ptr = &v2 + case 6: + if wireType != 5 { + return fmt.Errorf("proto: wrong wireType = %d for field MyFloat32", wireType) + } + var v uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + iNdEx += 4 + v = uint32(data[iNdEx-4]) + v |= uint32(data[iNdEx-3]) << 8 + v |= uint32(data[iNdEx-2]) << 16 + v |= uint32(data[iNdEx-1]) << 24 + m.MyFloat32 = github_com_gogo_protobuf_test_casttype.MyFloat32Type(math.Float32frombits(v)) + case 7: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field MyFloat64Ptr", 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 := github_com_gogo_protobuf_test_casttype.MyFloat64Type(math.Float64frombits(v)) + m.MyFloat64Ptr = &v2 + case 8: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field MyFloat64", 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.MyFloat64 = github_com_gogo_protobuf_test_casttype.MyFloat64Type(math.Float64frombits(v)) + case 9: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MyBytes", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCasttypeUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthCasttypeUnsafe + } + postIndex := iNdEx + byteLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.MyBytes = append(m.MyBytes[:0], data[iNdEx:postIndex]...) + if m.MyBytes == nil { + m.MyBytes = []byte{} + } + iNdEx = postIndex + case 10: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NormalBytes", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCasttypeUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthCasttypeUnsafe + } + postIndex := iNdEx + byteLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.NormalBytes = append(m.NormalBytes[:0], data[iNdEx:postIndex]...) + if m.NormalBytes == nil { + m.NormalBytes = []byte{} + } + iNdEx = postIndex + case 11: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field MyUint64S", wireType) + } + var v github_com_gogo_protobuf_test_casttype.MyUint64Type + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCasttypeUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (github_com_gogo_protobuf_test_casttype.MyUint64Type(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.MyUint64S = append(m.MyUint64S, v) + case 12: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MyMap", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCasttypeUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthCasttypeUnsafe + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var keykey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCasttypeUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + keykey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var stringLenmapkey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCasttypeUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLenmapkey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapkey := int(stringLenmapkey) + if intStringLenmapkey < 0 { + return ErrInvalidLengthCasttypeUnsafe + } + postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey > l { + return io.ErrUnexpectedEOF + } + mapkey := string(data[iNdEx:postStringIndexmapkey]) + iNdEx = postStringIndexmapkey + var valuekey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCasttypeUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + valuekey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapvalue uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCasttypeUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + mapvalue |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if m.MyMap == nil { + m.MyMap = make(github_com_gogo_protobuf_test_casttype.MyMapType) + } + m.MyMap[mapkey] = mapvalue + iNdEx = postIndex + case 13: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MyCustomMap", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCasttypeUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthCasttypeUnsafe + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var keykey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCasttypeUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + keykey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var stringLenmapkey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCasttypeUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLenmapkey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapkey := int(stringLenmapkey) + if intStringLenmapkey < 0 { + return ErrInvalidLengthCasttypeUnsafe + } + postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey > l { + return io.ErrUnexpectedEOF + } + mapkey := github_com_gogo_protobuf_test_casttype.MyStringType(data[iNdEx:postStringIndexmapkey]) + iNdEx = postStringIndexmapkey + var valuekey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCasttypeUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + valuekey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapvalue uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCasttypeUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + mapvalue |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if m.MyCustomMap == nil { + m.MyCustomMap = make(map[github_com_gogo_protobuf_test_casttype.MyStringType]github_com_gogo_protobuf_test_casttype.MyUint64Type) + } + m.MyCustomMap[github_com_gogo_protobuf_test_casttype.MyStringType(mapkey)] = ((github_com_gogo_protobuf_test_casttype.MyUint64Type)(mapvalue)) + iNdEx = postIndex + case 14: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MyNullableMap", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCasttypeUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthCasttypeUnsafe + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var keykey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCasttypeUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + keykey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapkey int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCasttypeUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + mapkey |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var valuekey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCasttypeUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + valuekey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapmsglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCasttypeUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + mapmsglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if mapmsglen < 0 { + return ErrInvalidLengthCasttypeUnsafe + } + postmsgIndex := iNdEx + mapmsglen + if mapmsglen < 0 { + return ErrInvalidLengthCasttypeUnsafe + } + if postmsgIndex > l { + return io.ErrUnexpectedEOF + } + mapvalue := &Wilson{} + if err := mapvalue.Unmarshal(data[iNdEx:postmsgIndex]); err != nil { + return err + } + iNdEx = postmsgIndex + if m.MyNullableMap == nil { + m.MyNullableMap = make(map[github_com_gogo_protobuf_test_casttype.MyInt32Type]*Wilson) + } + m.MyNullableMap[github_com_gogo_protobuf_test_casttype.MyInt32Type(mapkey)] = mapvalue + iNdEx = postIndex + case 15: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MyEmbeddedMap", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCasttypeUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthCasttypeUnsafe + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var keykey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCasttypeUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + keykey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapkey int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCasttypeUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + mapkey |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var valuekey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCasttypeUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + valuekey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapmsglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCasttypeUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + mapmsglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if mapmsglen < 0 { + return ErrInvalidLengthCasttypeUnsafe + } + postmsgIndex := iNdEx + mapmsglen + if mapmsglen < 0 { + return ErrInvalidLengthCasttypeUnsafe + } + if postmsgIndex > l { + return io.ErrUnexpectedEOF + } + mapvalue := &Wilson{} + if err := mapvalue.Unmarshal(data[iNdEx:postmsgIndex]); err != nil { + return err + } + iNdEx = postmsgIndex + if m.MyEmbeddedMap == nil { + m.MyEmbeddedMap = make(map[github_com_gogo_protobuf_test_casttype.MyInt32Type]Wilson) + } + m.MyEmbeddedMap[github_com_gogo_protobuf_test_casttype.MyInt32Type(mapkey)] = *mapvalue + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipCasttypeUnsafe(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthCasttypeUnsafe + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Wilson) 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 ErrIntOverflowCasttypeUnsafe + } + 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: Wilson: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Wilson: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Int64", wireType) + } + var v int64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCasttypeUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Int64 = &v + default: + iNdEx = preIndex + skippy, err := skipCasttypeUnsafe(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthCasttypeUnsafe + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipCasttypeUnsafe(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, ErrIntOverflowCasttypeUnsafe + } + 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, ErrIntOverflowCasttypeUnsafe + } + 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, ErrIntOverflowCasttypeUnsafe + } + 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, ErrInvalidLengthCasttypeUnsafe + } + return iNdEx, nil + case 3: + for { + var innerWire uint64 + var start int = iNdEx + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowCasttypeUnsafe + } + 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 := skipCasttypeUnsafe(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 ( + ErrInvalidLengthCasttypeUnsafe = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowCasttypeUnsafe = fmt.Errorf("proto: integer overflow") +) + +var fileDescriptorCasttype = []byte{ + // 672 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xa4, 0x95, 0xcd, 0x4f, 0xd4, 0x4e, + 0x18, 0xc7, 0x29, 0x4b, 0xa1, 0x9d, 0xee, 0xfe, 0x7e, 0x64, 0xe2, 0xa1, 0x21, 0x71, 0xd9, 0x40, + 0x30, 0x1e, 0x74, 0x97, 0x2c, 0x1b, 0x24, 0x68, 0x3c, 0x94, 0x60, 0x82, 0xb1, 0xc4, 0x54, 0x09, + 0xd1, 0x78, 0x69, 0xa1, 0x2c, 0x8d, 0x7d, 0xd9, 0x6c, 0xa7, 0x9a, 0xde, 0x88, 0x1e, 0x4c, 0xfc, + 0x0b, 0xfc, 0x13, 0x3c, 0x7a, 0x31, 0xf1, 0xe8, 0x71, 0x8f, 0x1e, 0x3d, 0xf1, 0xe6, 0x85, 0x23, + 0x47, 0xe2, 0xc9, 0x67, 0x66, 0xfa, 0x16, 0x40, 0xb3, 0x94, 0xc3, 0x93, 0x79, 0x7b, 0x9e, 0xcf, + 0xf3, 0x9d, 0xa7, 0x33, 0x53, 0xd4, 0xd8, 0x0a, 0x3c, 0x2b, 0x08, 0x5b, 0x91, 0x1f, 0x9a, 0x3b, + 0xb6, 0x15, 0x90, 0xdd, 0xd6, 0x96, 0x19, 0x12, 0x12, 0xf7, 0xec, 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, 0x00, 0x00, +} diff --git a/vendor/github.com/gogo/protobuf/test/casttype/combos/unsafeboth/casttype.proto b/vendor/github.com/gogo/protobuf/test/casttype/combos/unsafeboth/casttype.proto new file mode 100644 index 000000000..305e135bd --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/casttype/combos/unsafeboth/casttype.proto @@ -0,0 +1,77 @@ +// Copyright (c) 2015, Vastech SA (PTY) LTD. All rights reserved. +// http://github.com/gogo/protobuf/gogoproto +// +// 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 casttype; + +import "github.com/gogo/protobuf/gogoproto/gogo.proto"; + +option (gogoproto.goproto_stringer_all) = false; +option (gogoproto.goproto_enum_prefix_all) = false; +option (gogoproto.goproto_getters_all) = false; + +option (gogoproto.equal_all) = true; +option (gogoproto.verbose_equal_all) = true; +option (gogoproto.stringer_all) = true; +option (gogoproto.gostring_all) = true; +option (gogoproto.face_all) = true; +option (gogoproto.description_all) = true; + +option (gogoproto.testgen_all) = true; +option (gogoproto.populate_all) = true; +option (gogoproto.benchgen_all) = true; +option (gogoproto.unmarshaler_all) = false; +option (gogoproto.marshaler_all) = false; +option (gogoproto.sizer_all) = true; + +option (gogoproto.goproto_enum_stringer_all) = false; +option (gogoproto.enum_stringer_all) = true; + +option (gogoproto.unsafe_marshaler_all) = true; +option (gogoproto.unsafe_unmarshaler_all) = true; + +message Castaway { + optional int64 Int32Ptr = 1 [(gogoproto.casttype) = "int32"]; + optional int64 Int32 = 2 [(gogoproto.casttype) = "int32", (gogoproto.nullable) = false]; + optional uint64 MyUint64Ptr = 3 [(gogoproto.casttype) = "github.com/gogo/protobuf/test/casttype.MyUint64Type"]; + optional uint64 MyUint64 = 4 [(gogoproto.casttype) = "github.com/gogo/protobuf/test/casttype.MyUint64Type", (gogoproto.nullable) = false]; + optional float MyFloat32Ptr = 5 [(gogoproto.casttype) = "github.com/gogo/protobuf/test/casttype.MyFloat32Type"]; + optional float MyFloat32 = 6 [(gogoproto.casttype) = "github.com/gogo/protobuf/test/casttype.MyFloat32Type", (gogoproto.nullable) = false]; + optional double MyFloat64Ptr = 7 [(gogoproto.casttype) = "github.com/gogo/protobuf/test/casttype.MyFloat64Type"]; + optional double MyFloat64 = 8 [(gogoproto.casttype) = "github.com/gogo/protobuf/test/casttype.MyFloat64Type", (gogoproto.nullable) = false]; + optional bytes MyBytes = 9 [(gogoproto.casttype) = "github.com/gogo/protobuf/test/casttype.Bytes"]; + optional bytes NormalBytes = 10; + repeated uint64 MyUint64s = 11 [(gogoproto.casttype) = "github.com/gogo/protobuf/test/casttype.MyUint64Type"]; + map MyMap = 12 [(gogoproto.casttype) = "github.com/gogo/protobuf/test/casttype.MyMapType"]; + map MyCustomMap = 13 [(gogoproto.castkey) = "github.com/gogo/protobuf/test/casttype.MyStringType", (gogoproto.castvalue) = "github.com/gogo/protobuf/test/casttype.MyUint64Type"]; + map MyNullableMap = 14 [(gogoproto.castkey) = "github.com/gogo/protobuf/test/casttype.MyInt32Type"]; + map MyEmbeddedMap = 15 [(gogoproto.castkey) = "github.com/gogo/protobuf/test/casttype.MyInt32Type", (gogoproto.nullable) = false]; +} + +message Wilson { + optional int64 Int64 = 1; +} diff --git a/vendor/github.com/gogo/protobuf/test/casttype/combos/unsafeboth/casttypepb_test.go b/vendor/github.com/gogo/protobuf/test/casttype/combos/unsafeboth/casttypepb_test.go new file mode 100644 index 000000000..5709d6ab6 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/casttype/combos/unsafeboth/casttypepb_test.go @@ -0,0 +1,513 @@ +// Code generated by protoc-gen-gogo. +// source: combos/unsafeboth/casttype.proto +// DO NOT EDIT! + +/* +Package casttype is a generated protocol buffer package. + +It is generated from these files: + combos/unsafeboth/casttype.proto + +It has these top-level messages: + Castaway + Wilson +*/ +package casttype + +import testing "testing" +import math_rand "math/rand" +import time "time" +import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" +import github_com_gogo_protobuf_jsonpb "github.com/gogo/protobuf/jsonpb" +import fmt "fmt" +import go_parser "go/parser" +import proto "github.com/gogo/protobuf/proto" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +func TestCastawayProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCastaway(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Castaway{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestCastawayMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCastaway(popr, false) + size := p.Size() + data := make([]byte, size) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(data) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Castaway{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkCastawayProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Castaway, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedCastaway(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkCastawayProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedCastaway(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &Castaway{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestWilsonProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedWilson(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Wilson{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestWilsonMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedWilson(popr, false) + size := p.Size() + data := make([]byte, size) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(data) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Wilson{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkWilsonProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Wilson, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedWilson(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkWilsonProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedWilson(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &Wilson{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestCastawayJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCastaway(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Castaway{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestWilsonJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedWilson(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Wilson{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestCastawayProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCastaway(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &Castaway{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestCastawayProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCastaway(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &Castaway{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestWilsonProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedWilson(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &Wilson{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestWilsonProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedWilson(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &Wilson{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestCasttypeDescription(t *testing.T) { + CasttypeDescription() +} +func TestCastawayVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCastaway(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &Castaway{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestWilsonVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedWilson(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &Wilson{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestCastawayFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCastaway(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestWilsonFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedWilson(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestCastawayGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCastaway(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestWilsonGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedWilson(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestCastawaySize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCastaway(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkCastawaySize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Castaway, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedCastaway(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestWilsonSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedWilson(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkWilsonSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Wilson, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedWilson(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestCastawayStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCastaway(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestWilsonStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedWilson(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} + +//These tests are generated by github.com/gogo/protobuf/plugin/testgen diff --git a/vendor/github.com/gogo/protobuf/test/casttype/combos/unsafemarshaler/casttype.pb.go b/vendor/github.com/gogo/protobuf/test/casttype/combos/unsafemarshaler/casttype.pb.go new file mode 100644 index 000000000..d2d2ef2cd --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/casttype/combos/unsafemarshaler/casttype.pb.go @@ -0,0 +1,1551 @@ +// Code generated by protoc-gen-gogo. +// source: combos/unsafemarshaler/casttype.proto +// DO NOT EDIT! + +/* +Package casttype is a generated protocol buffer package. + +It is generated from these files: + combos/unsafemarshaler/casttype.proto + +It has these top-level messages: + Castaway + Wilson +*/ +package casttype + +import proto "github.com/gogo/protobuf/proto" +import fmt "fmt" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" + +import github_com_gogo_protobuf_test_casttype "github.com/gogo/protobuf/test/casttype" + +import github_com_gogo_protobuf_protoc_gen_gogo_descriptor "github.com/gogo/protobuf/protoc-gen-gogo/descriptor" +import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" +import compress_gzip "compress/gzip" +import bytes "bytes" +import io_ioutil "io/ioutil" + +import strings "strings" +import sort "sort" +import strconv "strconv" +import reflect "reflect" +import github_com_gogo_protobuf_sortkeys "github.com/gogo/protobuf/sortkeys" + +import errors "errors" + +// 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. +const _ = proto.GoGoProtoPackageIsVersion1 + +type Castaway struct { + Int32Ptr *int32 `protobuf:"varint,1,opt,name=Int32Ptr,json=int32Ptr,casttype=int32" json:"Int32Ptr,omitempty"` + Int32 int32 `protobuf:"varint,2,opt,name=Int32,json=int32,casttype=int32" json:"Int32"` + MyUint64Ptr *github_com_gogo_protobuf_test_casttype.MyUint64Type `protobuf:"varint,3,opt,name=MyUint64Ptr,json=myUint64Ptr,casttype=github.com/gogo/protobuf/test/casttype.MyUint64Type" json:"MyUint64Ptr,omitempty"` + MyUint64 github_com_gogo_protobuf_test_casttype.MyUint64Type `protobuf:"varint,4,opt,name=MyUint64,json=myUint64,casttype=github.com/gogo/protobuf/test/casttype.MyUint64Type" json:"MyUint64"` + MyFloat32Ptr *github_com_gogo_protobuf_test_casttype.MyFloat32Type `protobuf:"fixed32,5,opt,name=MyFloat32Ptr,json=myFloat32Ptr,casttype=github.com/gogo/protobuf/test/casttype.MyFloat32Type" json:"MyFloat32Ptr,omitempty"` + MyFloat32 github_com_gogo_protobuf_test_casttype.MyFloat32Type `protobuf:"fixed32,6,opt,name=MyFloat32,json=myFloat32,casttype=github.com/gogo/protobuf/test/casttype.MyFloat32Type" json:"MyFloat32"` + MyFloat64Ptr *github_com_gogo_protobuf_test_casttype.MyFloat64Type `protobuf:"fixed64,7,opt,name=MyFloat64Ptr,json=myFloat64Ptr,casttype=github.com/gogo/protobuf/test/casttype.MyFloat64Type" json:"MyFloat64Ptr,omitempty"` + MyFloat64 github_com_gogo_protobuf_test_casttype.MyFloat64Type `protobuf:"fixed64,8,opt,name=MyFloat64,json=myFloat64,casttype=github.com/gogo/protobuf/test/casttype.MyFloat64Type" json:"MyFloat64"` + MyBytes github_com_gogo_protobuf_test_casttype.Bytes `protobuf:"bytes,9,opt,name=MyBytes,json=myBytes,casttype=github.com/gogo/protobuf/test/casttype.Bytes" json:"MyBytes,omitempty"` + NormalBytes []byte `protobuf:"bytes,10,opt,name=NormalBytes,json=normalBytes" json:"NormalBytes,omitempty"` + MyUint64S []github_com_gogo_protobuf_test_casttype.MyUint64Type `protobuf:"varint,11,rep,name=MyUint64s,json=myUint64s,casttype=github.com/gogo/protobuf/test/casttype.MyUint64Type" json:"MyUint64s,omitempty"` + MyMap github_com_gogo_protobuf_test_casttype.MyMapType `protobuf:"bytes,12,rep,name=MyMap,json=myMap,casttype=github.com/gogo/protobuf/test/casttype.MyMapType" json:"MyMap,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"varint,2,opt,name=value"` + MyCustomMap map[github_com_gogo_protobuf_test_casttype.MyStringType]github_com_gogo_protobuf_test_casttype.MyUint64Type `protobuf:"bytes,13,rep,name=MyCustomMap,json=myCustomMap,castkey=github.com/gogo/protobuf/test/casttype.MyStringType,castvalue=github.com/gogo/protobuf/test/casttype.MyUint64Type" json:"MyCustomMap,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"varint,2,opt,name=value"` + MyNullableMap map[github_com_gogo_protobuf_test_casttype.MyInt32Type]*Wilson `protobuf:"bytes,14,rep,name=MyNullableMap,json=myNullableMap,castkey=github.com/gogo/protobuf/test/casttype.MyInt32Type" json:"MyNullableMap,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + MyEmbeddedMap map[github_com_gogo_protobuf_test_casttype.MyInt32Type]Wilson `protobuf:"bytes,15,rep,name=MyEmbeddedMap,json=myEmbeddedMap,castkey=github.com/gogo/protobuf/test/casttype.MyInt32Type" json:"MyEmbeddedMap" protobuf_key:"varint,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *Castaway) Reset() { *m = Castaway{} } +func (*Castaway) ProtoMessage() {} +func (*Castaway) Descriptor() ([]byte, []int) { return fileDescriptorCasttype, []int{0} } + +type Wilson struct { + Int64 *int64 `protobuf:"varint,1,opt,name=Int64,json=int64" json:"Int64,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *Wilson) Reset() { *m = Wilson{} } +func (*Wilson) ProtoMessage() {} +func (*Wilson) Descriptor() ([]byte, []int) { return fileDescriptorCasttype, []int{1} } + +func init() { + proto.RegisterType((*Castaway)(nil), "casttype.Castaway") + proto.RegisterType((*Wilson)(nil), "casttype.Wilson") +} +func (this *Castaway) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return CasttypeDescription() +} +func (this *Wilson) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return CasttypeDescription() +} +func CasttypeDescription() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + d := &github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet{} + var gzipped = []byte{ + // 3790 bytes of a gzipped FileDescriptorSet + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xcc, 0x5a, 0x5b, 0x6c, 0x1b, 0x67, + 0x76, 0x36, 0x6f, 0x12, 0x79, 0x48, 0x51, 0xd4, 0x48, 0xb1, 0x69, 0x6d, 0x7c, 0x93, 0xe3, 0xc4, + 0xeb, 0xdd, 0x95, 0x5c, 0xc7, 0xb1, 0x1d, 0x7a, 0x9b, 0x85, 0x28, 0xd1, 0x5a, 0x1a, 0xba, 0x75, + 0x24, 0xae, 0xed, 0xb4, 0xc0, 0x60, 0x44, 0x8e, 0x28, 0xda, 0xc3, 0x19, 0x96, 0x33, 0xb4, 0xad, + 0x7d, 0x4a, 0xeb, 0xb6, 0x8b, 0x6d, 0xd1, 0x7b, 0x81, 0x66, 0xb3, 0x49, 0xda, 0x04, 0x68, 0x93, + 0xa6, 0xb7, 0xa4, 0x6d, 0x8a, 0xa2, 0x4f, 0x01, 0x8a, 0xb4, 0x79, 0x2a, 0xda, 0x3e, 0xf5, 0xa1, + 0xc8, 0xad, 0x01, 0x9a, 0xb4, 0x69, 0x9b, 0x02, 0x06, 0x1a, 0x34, 0x2f, 0x3d, 0xe7, 0xbf, 0x0c, + 0x87, 0x17, 0x69, 0x28, 0x05, 0x69, 0x2a, 0x80, 0x10, 0xe7, 0xfc, 0xe7, 0xfb, 0xe6, 0xfc, 0xe7, + 0x3f, 0xff, 0x39, 0x67, 0xfe, 0x21, 0xfc, 0xd5, 0x8f, 0xc0, 0xf1, 0xaa, 0x6d, 0x57, 0x4d, 0x63, + 0xa6, 0xd1, 0xb4, 0x5d, 0x7b, 0xa3, 0xb5, 0x39, 0x53, 0x31, 0x9c, 0x72, 0xb3, 0xd6, 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xbb, 0x4d, 0xbd, 0x66, 0x76, 0xe8, 0x46, + 0x99, 0x6e, 0x46, 0x0e, 0x78, 0xca, 0x39, 0x38, 0x2c, 0x79, 0x2b, 0x86, 0xab, 0x63, 0xf3, 0x5c, + 0x69, 0x83, 0x86, 0xd8, 0x69, 0xd7, 0x21, 0xa1, 0x30, 0x2f, 0xc6, 0x25, 0x36, 0x7f, 0x1d, 0x1b, + 0x59, 0xbb, 0xde, 0xed, 0x89, 0x7c, 0xa6, 0xeb, 0xb9, 0xcb, 0xf9, 0x76, 0xe8, 0x49, 0x68, 0x37, + 0x15, 0x2f, 0x86, 0x23, 0x0b, 0xab, 0xf9, 0x57, 0xc2, 0x93, 0x0b, 0x1c, 0xb7, 0x2a, 0x3d, 0xa8, + 0x1a, 0x9b, 0xa6, 0x51, 0x26, 0xef, 0xc0, 0x0b, 0x27, 0xe1, 0x1b, 0xd5, 0x9a, 0xbb, 0xd5, 0xda, + 0x98, 0xc6, 0x3b, 0xcc, 0x54, 0xed, 0xaa, 0xdd, 0x7e, 0x9d, 0x41, 0x57, 0xec, 0x82, 0x7d, 0x13, + 0xaf, 0x34, 0x12, 0x9e, 0x74, 0x32, 0xf0, 0xfd, 0x47, 0x6e, 0x19, 0xc6, 0x85, 0xb2, 0xc6, 0xce, + 0x54, 0x79, 0x0b, 0xaa, 0xec, 0xfa, 0x40, 0x9e, 0x7d, 0xed, 0x03, 0x56, 0x12, 0xd4, 0x31, 0x01, + 0xa5, 0x31, 0xde, 0xa4, 0xe6, 0x54, 0x78, 0xa0, 0x83, 0x8f, 0xc7, 0x30, 0x3e, 0x72, 0xef, 0xce, + 0xf8, 0xa6, 0x60, 0x1c, 0xf7, 0x31, 0xae, 0x09, 0x68, 0x6e, 0x0e, 0x46, 0xf6, 0xc2, 0xf5, 0xd7, + 0x82, 0x2b, 0x65, 0xf8, 0x49, 0x16, 0x60, 0x94, 0x91, 0x94, 0x5b, 0x8e, 0x6b, 0xd7, 0x59, 0x82, + 0xd8, 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b, 0xe9, 0x3b, 0x7a, 0xe7, 0xc3, 0x6b, 0x5c, 0x30, 0xfa, 0xfb, 0xe2, 0xe6, + 0x12, 0x91, 0xbb, 0x08, 0xb1, 0x01, 0x1d, 0xfe, 0x8b, 0x02, 0xca, 0xf5, 0xb1, 0x82, 0x24, 0x7d, + 0x75, 0x2d, 0x18, 0xfe, 0x4b, 0x02, 0xee, 0x47, 0x91, 0xe9, 0xa2, 0xae, 0x05, 0x13, 0xfc, 0xb2, + 0x34, 0x5d, 0x20, 0xc8, 0x6d, 0xb2, 0xa4, 0x05, 0xa3, 0x7f, 0x45, 0x7a, 0x5d, 0x42, 0x70, 0x37, + 0x25, 0xbc, 0x34, 0x15, 0x8c, 0xff, 0x55, 0x81, 0x6f, 0x63, 0xc8, 0x03, 0xbe, 0x34, 0x19, 0x4c, + 0xf1, 0x6b, 0xd2, 0x03, 0x3e, 0x14, 0x6d, 0xa3, 0xee, 0xd2, 0x17, 0xcc, 0xf4, 0xeb, 0x72, 0x1b, + 0x75, 0x55, 0x3e, 0x5a, 0x4d, 0x96, 0x2d, 0x82, 0x29, 0x7e, 0x43, 0xae, 0x26, 0xd3, 0x27, 0x33, + 0xba, 0x6b, 0x49, 0x30, 0xc7, 0x6f, 0x4a, 0x33, 0xba, 0x4a, 0x09, 0x56, 0x26, 0xa5, 0xb7, 0x8e, + 0x04, 0xf3, 0x3d, 0x2d, 0xf8, 0xc6, 0x7a, 0xca, 0x48, 0xee, 0x1a, 0x1c, 0xec, 0x5f, 0x43, 0x82, + 0x59, 0x7f, 0x70, 0xbf, 0xab, 0xeb, 0xf7, 0x97, 0x10, 0x2c, 0x79, 0x13, 0xfd, 0xea, 0x47, 0x30, + 0xed, 0x33, 0xf7, 0x3b, 0x1f, 0xec, 0xfc, 0xe5, 0x03, 0x3b, 0x34, 0x68, 0xa7, 0xee, 0x60, 0xae, + 0x67, 0x05, 0x97, 0x0f, 0x44, 0x5b, 0x43, 0x64, 0xee, 0x60, 0xfc, 0x73,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0x12, 0x1f, 0xdf, 0xe4, + 0x25, 0x80, 0x76, 0x48, 0xd0, 0xef, 0x4f, 0xb1, 0xa4, 0x88, 0x1f, 0x0b, 0xd1, 0x57, 0xfa, 0x9d, + 0xaa, 0xfc, 0x31, 0x1c, 0xbd, 0x2d, 0xe2, 0x17, 0xb9, 0xf0, 0xa5, 0xd0, 0xe4, 0x13, 0x90, 0xe9, + 0x5e, 0xda, 0x3d, 0xe1, 0x55, 0x50, 0x7a, 0x1d, 0xec, 0x67, 0x88, 0x71, 0x86, 0x87, 0xfd, 0x0c, + 0xc9, 0x73, 0x99, 0xb6, 0x8b, 0xae, 0xd5, 0x4c, 0x2c, 0xdc, 0x3d, 0x9c, 0xdd, 0xee, 0xfa, 0x7c, + 0x9c, 0x53, 0x47, 0x61, 0x88, 0x0b, 0x69, 0x2e, 0x45, 0x96, 0xed, 0x59, 0x51, 0x62, 0x15, 0xe6, + 0xc2, 0xf9, 0xfc, 0xe2, 0x5b, 0xef, 0x1d, 0x3d, 0xf0, 0x77, 0xf8, 0xf9, 0x47, 0xfc, 0xbc, 0xfb, + 0xde, 0xd1, 0xd0, 0x87, 0xf8, 0xf9, 0x04, 0x3f, 0x9f, 0xe2, 0xe7, 0xa9, 0xf7, 0x8f, 0x86, 0x5e, + 0xc6, 0xcf, 0xab, 0xf8, 0xf9, 0x0b, 0xfc, 0xbc, 0x81, 0x9f, 0xb7, 0xde, 0x47, 0x7d, 0xfc, 0xbc, + 0x8b, 0xdf, 0x3f, 0xc4, 0xff, 0x9f, 0xe0, 0xff, 0x4f, 0xf1, 0xf3, 0xd4, 0x3f, 0x1f, 0x3d, 0xf0, + 0xbf, 0x01, 0x00, 0x00, 0xff, 0xff, 0xca, 0x2d, 0xe1, 0xd1, 0xd6, 0x31, 0x00, 0x00, + } + r := bytes.NewReader(gzipped) + gzipr, err := compress_gzip.NewReader(r) + if err != nil { + panic(err) + } + ungzipped, err := io_ioutil.ReadAll(gzipr) + if err != nil { + panic(err) + } + if err := github_com_gogo_protobuf_proto.Unmarshal(ungzipped, d); err != nil { + panic(err) + } + return d +} +func (this *Castaway) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*Castaway) + if !ok { + that2, ok := that.(Castaway) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *Castaway") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *Castaway but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *Castaway but is not nil && this == nil") + } + if this.Int32Ptr != nil && that1.Int32Ptr != nil { + if *this.Int32Ptr != *that1.Int32Ptr { + return fmt.Errorf("Int32Ptr this(%v) Not Equal that(%v)", *this.Int32Ptr, *that1.Int32Ptr) + } + } else if this.Int32Ptr != nil { + return fmt.Errorf("this.Int32Ptr == nil && that.Int32Ptr != nil") + } else if that1.Int32Ptr != nil { + return fmt.Errorf("Int32Ptr this(%v) Not Equal that(%v)", this.Int32Ptr, that1.Int32Ptr) + } + if this.Int32 != that1.Int32 { + return fmt.Errorf("Int32 this(%v) Not Equal that(%v)", this.Int32, that1.Int32) + } + if this.MyUint64Ptr != nil && that1.MyUint64Ptr != nil { + if *this.MyUint64Ptr != *that1.MyUint64Ptr { + return fmt.Errorf("MyUint64Ptr this(%v) Not Equal that(%v)", *this.MyUint64Ptr, *that1.MyUint64Ptr) + } + } else if this.MyUint64Ptr != nil { + return fmt.Errorf("this.MyUint64Ptr == nil && that.MyUint64Ptr != nil") + } else if that1.MyUint64Ptr != nil { + return fmt.Errorf("MyUint64Ptr this(%v) Not Equal that(%v)", this.MyUint64Ptr, that1.MyUint64Ptr) + } + if this.MyUint64 != that1.MyUint64 { + return fmt.Errorf("MyUint64 this(%v) Not Equal that(%v)", this.MyUint64, that1.MyUint64) + } + if this.MyFloat32Ptr != nil && that1.MyFloat32Ptr != nil { + if *this.MyFloat32Ptr != *that1.MyFloat32Ptr { + return fmt.Errorf("MyFloat32Ptr this(%v) Not Equal that(%v)", *this.MyFloat32Ptr, *that1.MyFloat32Ptr) + } + } else if this.MyFloat32Ptr != nil { + return fmt.Errorf("this.MyFloat32Ptr == nil && that.MyFloat32Ptr != nil") + } else if that1.MyFloat32Ptr != nil { + return fmt.Errorf("MyFloat32Ptr this(%v) Not Equal that(%v)", this.MyFloat32Ptr, that1.MyFloat32Ptr) + } + if this.MyFloat32 != that1.MyFloat32 { + return fmt.Errorf("MyFloat32 this(%v) Not Equal that(%v)", this.MyFloat32, that1.MyFloat32) + } + if this.MyFloat64Ptr != nil && that1.MyFloat64Ptr != nil { + if *this.MyFloat64Ptr != *that1.MyFloat64Ptr { + return fmt.Errorf("MyFloat64Ptr this(%v) Not Equal that(%v)", *this.MyFloat64Ptr, *that1.MyFloat64Ptr) + } + } else if this.MyFloat64Ptr != nil { + return fmt.Errorf("this.MyFloat64Ptr == nil && that.MyFloat64Ptr != nil") + } else if that1.MyFloat64Ptr != nil { + return fmt.Errorf("MyFloat64Ptr this(%v) Not Equal that(%v)", this.MyFloat64Ptr, that1.MyFloat64Ptr) + } + if this.MyFloat64 != that1.MyFloat64 { + return fmt.Errorf("MyFloat64 this(%v) Not Equal that(%v)", this.MyFloat64, that1.MyFloat64) + } + if !bytes.Equal(this.MyBytes, that1.MyBytes) { + return fmt.Errorf("MyBytes this(%v) Not Equal that(%v)", this.MyBytes, that1.MyBytes) + } + if !bytes.Equal(this.NormalBytes, that1.NormalBytes) { + return fmt.Errorf("NormalBytes this(%v) Not Equal that(%v)", this.NormalBytes, that1.NormalBytes) + } + if len(this.MyUint64S) != len(that1.MyUint64S) { + return fmt.Errorf("MyUint64S this(%v) Not Equal that(%v)", len(this.MyUint64S), len(that1.MyUint64S)) + } + for i := range this.MyUint64S { + if this.MyUint64S[i] != that1.MyUint64S[i] { + return fmt.Errorf("MyUint64S this[%v](%v) Not Equal that[%v](%v)", i, this.MyUint64S[i], i, that1.MyUint64S[i]) + } + } + if len(this.MyMap) != len(that1.MyMap) { + return fmt.Errorf("MyMap this(%v) Not Equal that(%v)", len(this.MyMap), len(that1.MyMap)) + } + for i := range this.MyMap { + if this.MyMap[i] != that1.MyMap[i] { + return fmt.Errorf("MyMap this[%v](%v) Not Equal that[%v](%v)", i, this.MyMap[i], i, that1.MyMap[i]) + } + } + if len(this.MyCustomMap) != len(that1.MyCustomMap) { + return fmt.Errorf("MyCustomMap this(%v) Not Equal that(%v)", len(this.MyCustomMap), len(that1.MyCustomMap)) + } + for i := range this.MyCustomMap { + if this.MyCustomMap[i] != that1.MyCustomMap[i] { + return fmt.Errorf("MyCustomMap this[%v](%v) Not Equal that[%v](%v)", i, this.MyCustomMap[i], i, that1.MyCustomMap[i]) + } + } + if len(this.MyNullableMap) != len(that1.MyNullableMap) { + return fmt.Errorf("MyNullableMap this(%v) Not Equal that(%v)", len(this.MyNullableMap), len(that1.MyNullableMap)) + } + for i := range this.MyNullableMap { + if !this.MyNullableMap[i].Equal(that1.MyNullableMap[i]) { + return fmt.Errorf("MyNullableMap this[%v](%v) Not Equal that[%v](%v)", i, this.MyNullableMap[i], i, that1.MyNullableMap[i]) + } + } + if len(this.MyEmbeddedMap) != len(that1.MyEmbeddedMap) { + return fmt.Errorf("MyEmbeddedMap this(%v) Not Equal that(%v)", len(this.MyEmbeddedMap), len(that1.MyEmbeddedMap)) + } + for i := range this.MyEmbeddedMap { + a := this.MyEmbeddedMap[i] + b := that1.MyEmbeddedMap[i] + if !(&a).Equal(&b) { + return fmt.Errorf("MyEmbeddedMap this[%v](%v) Not Equal that[%v](%v)", i, this.MyEmbeddedMap[i], i, that1.MyEmbeddedMap[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *Castaway) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*Castaway) + if !ok { + that2, ok := that.(Castaway) + 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.Int32Ptr != nil && that1.Int32Ptr != nil { + if *this.Int32Ptr != *that1.Int32Ptr { + return false + } + } else if this.Int32Ptr != nil { + return false + } else if that1.Int32Ptr != nil { + return false + } + if this.Int32 != that1.Int32 { + return false + } + if this.MyUint64Ptr != nil && that1.MyUint64Ptr != nil { + if *this.MyUint64Ptr != *that1.MyUint64Ptr { + return false + } + } else if this.MyUint64Ptr != nil { + return false + } else if that1.MyUint64Ptr != nil { + return false + } + if this.MyUint64 != that1.MyUint64 { + return false + } + if this.MyFloat32Ptr != nil && that1.MyFloat32Ptr != nil { + if *this.MyFloat32Ptr != *that1.MyFloat32Ptr { + return false + } + } else if this.MyFloat32Ptr != nil { + return false + } else if that1.MyFloat32Ptr != nil { + return false + } + if this.MyFloat32 != that1.MyFloat32 { + return false + } + if this.MyFloat64Ptr != nil && that1.MyFloat64Ptr != nil { + if *this.MyFloat64Ptr != *that1.MyFloat64Ptr { + return false + } + } else if this.MyFloat64Ptr != nil { + return false + } else if that1.MyFloat64Ptr != nil { + return false + } + if this.MyFloat64 != that1.MyFloat64 { + return false + } + if !bytes.Equal(this.MyBytes, that1.MyBytes) { + return false + } + if !bytes.Equal(this.NormalBytes, that1.NormalBytes) { + return false + } + if len(this.MyUint64S) != len(that1.MyUint64S) { + return false + } + for i := range this.MyUint64S { + if this.MyUint64S[i] != that1.MyUint64S[i] { + return false + } + } + if len(this.MyMap) != len(that1.MyMap) { + return false + } + for i := range this.MyMap { + if this.MyMap[i] != that1.MyMap[i] { + return false + } + } + if len(this.MyCustomMap) != len(that1.MyCustomMap) { + return false + } + for i := range this.MyCustomMap { + if this.MyCustomMap[i] != that1.MyCustomMap[i] { + return false + } + } + if len(this.MyNullableMap) != len(that1.MyNullableMap) { + return false + } + for i := range this.MyNullableMap { + if !this.MyNullableMap[i].Equal(that1.MyNullableMap[i]) { + return false + } + } + if len(this.MyEmbeddedMap) != len(that1.MyEmbeddedMap) { + return false + } + for i := range this.MyEmbeddedMap { + a := this.MyEmbeddedMap[i] + b := that1.MyEmbeddedMap[i] + if !(&a).Equal(&b) { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *Wilson) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*Wilson) + if !ok { + that2, ok := that.(Wilson) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *Wilson") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *Wilson but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *Wilson but is not nil && this == nil") + } + if this.Int64 != nil && that1.Int64 != nil { + if *this.Int64 != *that1.Int64 { + return fmt.Errorf("Int64 this(%v) Not Equal that(%v)", *this.Int64, *that1.Int64) + } + } else if this.Int64 != nil { + return fmt.Errorf("this.Int64 == nil && that.Int64 != nil") + } else if that1.Int64 != nil { + return fmt.Errorf("Int64 this(%v) Not Equal that(%v)", this.Int64, that1.Int64) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *Wilson) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*Wilson) + if !ok { + that2, ok := that.(Wilson) + 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.Int64 != nil && that1.Int64 != nil { + if *this.Int64 != *that1.Int64 { + return false + } + } else if this.Int64 != nil { + return false + } else if that1.Int64 != nil { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} + +type CastawayFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetInt32Ptr() *int32 + GetInt32() int32 + GetMyUint64Ptr() *github_com_gogo_protobuf_test_casttype.MyUint64Type + GetMyUint64() github_com_gogo_protobuf_test_casttype.MyUint64Type + GetMyFloat32Ptr() *github_com_gogo_protobuf_test_casttype.MyFloat32Type + GetMyFloat32() github_com_gogo_protobuf_test_casttype.MyFloat32Type + GetMyFloat64Ptr() *github_com_gogo_protobuf_test_casttype.MyFloat64Type + GetMyFloat64() github_com_gogo_protobuf_test_casttype.MyFloat64Type + GetMyBytes() github_com_gogo_protobuf_test_casttype.Bytes + GetNormalBytes() []byte + GetMyUint64S() []github_com_gogo_protobuf_test_casttype.MyUint64Type + GetMyMap() github_com_gogo_protobuf_test_casttype.MyMapType + GetMyCustomMap() map[github_com_gogo_protobuf_test_casttype.MyStringType]github_com_gogo_protobuf_test_casttype.MyUint64Type + GetMyNullableMap() map[github_com_gogo_protobuf_test_casttype.MyInt32Type]*Wilson + GetMyEmbeddedMap() map[github_com_gogo_protobuf_test_casttype.MyInt32Type]Wilson +} + +func (this *Castaway) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *Castaway) TestProto() github_com_gogo_protobuf_proto.Message { + return NewCastawayFromFace(this) +} + +func (this *Castaway) GetInt32Ptr() *int32 { + return this.Int32Ptr +} + +func (this *Castaway) GetInt32() int32 { + return this.Int32 +} + +func (this *Castaway) GetMyUint64Ptr() *github_com_gogo_protobuf_test_casttype.MyUint64Type { + return this.MyUint64Ptr +} + +func (this *Castaway) GetMyUint64() github_com_gogo_protobuf_test_casttype.MyUint64Type { + return this.MyUint64 +} + +func (this *Castaway) GetMyFloat32Ptr() *github_com_gogo_protobuf_test_casttype.MyFloat32Type { + return this.MyFloat32Ptr +} + +func (this *Castaway) GetMyFloat32() github_com_gogo_protobuf_test_casttype.MyFloat32Type { + return this.MyFloat32 +} + +func (this *Castaway) GetMyFloat64Ptr() *github_com_gogo_protobuf_test_casttype.MyFloat64Type { + return this.MyFloat64Ptr +} + +func (this *Castaway) GetMyFloat64() github_com_gogo_protobuf_test_casttype.MyFloat64Type { + return this.MyFloat64 +} + +func (this *Castaway) GetMyBytes() github_com_gogo_protobuf_test_casttype.Bytes { + return this.MyBytes +} + +func (this *Castaway) GetNormalBytes() []byte { + return this.NormalBytes +} + +func (this *Castaway) GetMyUint64S() []github_com_gogo_protobuf_test_casttype.MyUint64Type { + return this.MyUint64S +} + +func (this *Castaway) GetMyMap() github_com_gogo_protobuf_test_casttype.MyMapType { + return this.MyMap +} + +func (this *Castaway) GetMyCustomMap() map[github_com_gogo_protobuf_test_casttype.MyStringType]github_com_gogo_protobuf_test_casttype.MyUint64Type { + return this.MyCustomMap +} + +func (this *Castaway) GetMyNullableMap() map[github_com_gogo_protobuf_test_casttype.MyInt32Type]*Wilson { + return this.MyNullableMap +} + +func (this *Castaway) GetMyEmbeddedMap() map[github_com_gogo_protobuf_test_casttype.MyInt32Type]Wilson { + return this.MyEmbeddedMap +} + +func NewCastawayFromFace(that CastawayFace) *Castaway { + this := &Castaway{} + this.Int32Ptr = that.GetInt32Ptr() + this.Int32 = that.GetInt32() + this.MyUint64Ptr = that.GetMyUint64Ptr() + this.MyUint64 = that.GetMyUint64() + this.MyFloat32Ptr = that.GetMyFloat32Ptr() + this.MyFloat32 = that.GetMyFloat32() + this.MyFloat64Ptr = that.GetMyFloat64Ptr() + this.MyFloat64 = that.GetMyFloat64() + this.MyBytes = that.GetMyBytes() + this.NormalBytes = that.GetNormalBytes() + this.MyUint64S = that.GetMyUint64S() + this.MyMap = that.GetMyMap() + this.MyCustomMap = that.GetMyCustomMap() + this.MyNullableMap = that.GetMyNullableMap() + this.MyEmbeddedMap = that.GetMyEmbeddedMap() + return this +} + +type WilsonFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetInt64() *int64 +} + +func (this *Wilson) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *Wilson) TestProto() github_com_gogo_protobuf_proto.Message { + return NewWilsonFromFace(this) +} + +func (this *Wilson) GetInt64() *int64 { + return this.Int64 +} + +func NewWilsonFromFace(that WilsonFace) *Wilson { + this := &Wilson{} + this.Int64 = that.GetInt64() + return this +} + +func (this *Castaway) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 19) + s = append(s, "&casttype.Castaway{") + if this.Int32Ptr != nil { + s = append(s, "Int32Ptr: "+valueToGoStringCasttype(this.Int32Ptr, "int32")+",\n") + } + s = append(s, "Int32: "+fmt.Sprintf("%#v", this.Int32)+",\n") + if this.MyUint64Ptr != nil { + s = append(s, "MyUint64Ptr: "+valueToGoStringCasttype(this.MyUint64Ptr, "github_com_gogo_protobuf_test_casttype.MyUint64Type")+",\n") + } + s = append(s, "MyUint64: "+fmt.Sprintf("%#v", this.MyUint64)+",\n") + if this.MyFloat32Ptr != nil { + s = append(s, "MyFloat32Ptr: "+valueToGoStringCasttype(this.MyFloat32Ptr, "github_com_gogo_protobuf_test_casttype.MyFloat32Type")+",\n") + } + s = append(s, "MyFloat32: "+fmt.Sprintf("%#v", this.MyFloat32)+",\n") + if this.MyFloat64Ptr != nil { + s = append(s, "MyFloat64Ptr: "+valueToGoStringCasttype(this.MyFloat64Ptr, "github_com_gogo_protobuf_test_casttype.MyFloat64Type")+",\n") + } + s = append(s, "MyFloat64: "+fmt.Sprintf("%#v", this.MyFloat64)+",\n") + if this.MyBytes != nil { + s = append(s, "MyBytes: "+valueToGoStringCasttype(this.MyBytes, "github_com_gogo_protobuf_test_casttype.Bytes")+",\n") + } + if this.NormalBytes != nil { + s = append(s, "NormalBytes: "+valueToGoStringCasttype(this.NormalBytes, "byte")+",\n") + } + if this.MyUint64S != nil { + s = append(s, "MyUint64S: "+fmt.Sprintf("%#v", this.MyUint64S)+",\n") + } + keysForMyMap := make([]string, 0, len(this.MyMap)) + for k := range this.MyMap { + keysForMyMap = append(keysForMyMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForMyMap) + mapStringForMyMap := "github_com_gogo_protobuf_test_casttype.MyMapType{" + for _, k := range keysForMyMap { + mapStringForMyMap += fmt.Sprintf("%#v: %#v,", k, this.MyMap[k]) + } + mapStringForMyMap += "}" + if this.MyMap != nil { + s = append(s, "MyMap: "+mapStringForMyMap+",\n") + } + keysForMyCustomMap := make([]string, 0, len(this.MyCustomMap)) + for k := range this.MyCustomMap { + keysForMyCustomMap = append(keysForMyCustomMap, string(k)) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForMyCustomMap) + mapStringForMyCustomMap := "map[github_com_gogo_protobuf_test_casttype.MyStringType]github_com_gogo_protobuf_test_casttype.MyUint64Type{" + for _, k := range keysForMyCustomMap { + mapStringForMyCustomMap += fmt.Sprintf("%#v: %#v,", k, this.MyCustomMap[github_com_gogo_protobuf_test_casttype.MyStringType(k)]) + } + mapStringForMyCustomMap += "}" + if this.MyCustomMap != nil { + s = append(s, "MyCustomMap: "+mapStringForMyCustomMap+",\n") + } + keysForMyNullableMap := make([]int32, 0, len(this.MyNullableMap)) + for k := range this.MyNullableMap { + keysForMyNullableMap = append(keysForMyNullableMap, int32(k)) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForMyNullableMap) + mapStringForMyNullableMap := "map[github_com_gogo_protobuf_test_casttype.MyInt32Type]*Wilson{" + for _, k := range keysForMyNullableMap { + mapStringForMyNullableMap += fmt.Sprintf("%#v: %#v,", k, this.MyNullableMap[github_com_gogo_protobuf_test_casttype.MyInt32Type(k)]) + } + mapStringForMyNullableMap += "}" + if this.MyNullableMap != nil { + s = append(s, "MyNullableMap: "+mapStringForMyNullableMap+",\n") + } + keysForMyEmbeddedMap := make([]int32, 0, len(this.MyEmbeddedMap)) + for k := range this.MyEmbeddedMap { + keysForMyEmbeddedMap = append(keysForMyEmbeddedMap, int32(k)) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForMyEmbeddedMap) + mapStringForMyEmbeddedMap := "map[github_com_gogo_protobuf_test_casttype.MyInt32Type]Wilson{" + for _, k := range keysForMyEmbeddedMap { + mapStringForMyEmbeddedMap += fmt.Sprintf("%#v: %#v,", k, this.MyEmbeddedMap[github_com_gogo_protobuf_test_casttype.MyInt32Type(k)]) + } + mapStringForMyEmbeddedMap += "}" + if this.MyEmbeddedMap != nil { + s = append(s, "MyEmbeddedMap: "+mapStringForMyEmbeddedMap+",\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 *Wilson) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&casttype.Wilson{") + if this.Int64 != nil { + s = append(s, "Int64: "+valueToGoStringCasttype(this.Int64, "int64")+",\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 valueToGoStringCasttype(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 extensionToGoStringCasttype(e map[int32]github_com_gogo_protobuf_proto.Extension) string { + if e == nil { + return "nil" + } + s := "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 +} +func NewPopulatedCastaway(r randyCasttype, easy bool) *Castaway { + this := &Castaway{} + if r.Intn(10) != 0 { + v1 := int32(r.Int63()) + if r.Intn(2) == 0 { + v1 *= -1 + } + this.Int32Ptr = &v1 + } + this.Int32 = int32(r.Int63()) + if r.Intn(2) == 0 { + this.Int32 *= -1 + } + if r.Intn(10) != 0 { + v2 := github_com_gogo_protobuf_test_casttype.MyUint64Type(uint64(r.Uint32())) + this.MyUint64Ptr = &v2 + } + this.MyUint64 = github_com_gogo_protobuf_test_casttype.MyUint64Type(uint64(r.Uint32())) + if r.Intn(10) != 0 { + v3 := github_com_gogo_protobuf_test_casttype.MyFloat32Type(r.Float32()) + if r.Intn(2) == 0 { + v3 *= -1 + } + this.MyFloat32Ptr = &v3 + } + this.MyFloat32 = github_com_gogo_protobuf_test_casttype.MyFloat32Type(r.Float32()) + if r.Intn(2) == 0 { + this.MyFloat32 *= -1 + } + if r.Intn(10) != 0 { + v4 := github_com_gogo_protobuf_test_casttype.MyFloat64Type(r.Float64()) + if r.Intn(2) == 0 { + v4 *= -1 + } + this.MyFloat64Ptr = &v4 + } + this.MyFloat64 = github_com_gogo_protobuf_test_casttype.MyFloat64Type(r.Float64()) + if r.Intn(2) == 0 { + this.MyFloat64 *= -1 + } + if r.Intn(10) != 0 { + v5 := r.Intn(100) + this.MyBytes = make(github_com_gogo_protobuf_test_casttype.Bytes, v5) + for i := 0; i < v5; i++ { + this.MyBytes[i] = byte(r.Intn(256)) + } + } + if r.Intn(10) != 0 { + v6 := r.Intn(100) + this.NormalBytes = make([]byte, v6) + for i := 0; i < v6; i++ { + this.NormalBytes[i] = byte(r.Intn(256)) + } + } + if r.Intn(10) != 0 { + v7 := r.Intn(10) + this.MyUint64S = make([]github_com_gogo_protobuf_test_casttype.MyUint64Type, v7) + for i := 0; i < v7; i++ { + this.MyUint64S[i] = github_com_gogo_protobuf_test_casttype.MyUint64Type(uint64(r.Uint32())) + } + } + if r.Intn(10) != 0 { + v8 := r.Intn(10) + this.MyMap = make(github_com_gogo_protobuf_test_casttype.MyMapType) + for i := 0; i < v8; i++ { + v9 := randStringCasttype(r) + this.MyMap[v9] = uint64(uint64(r.Uint32())) + } + } + if r.Intn(10) != 0 { + v10 := r.Intn(10) + this.MyCustomMap = make(map[github_com_gogo_protobuf_test_casttype.MyStringType]github_com_gogo_protobuf_test_casttype.MyUint64Type) + for i := 0; i < v10; i++ { + v11 := github_com_gogo_protobuf_test_casttype.MyStringType(randStringCasttype(r)) + this.MyCustomMap[v11] = github_com_gogo_protobuf_test_casttype.MyUint64Type(uint64(r.Uint32())) + } + } + if r.Intn(10) != 0 { + v12 := r.Intn(10) + this.MyNullableMap = make(map[github_com_gogo_protobuf_test_casttype.MyInt32Type]*Wilson) + for i := 0; i < v12; i++ { + this.MyNullableMap[github_com_gogo_protobuf_test_casttype.MyInt32Type(int32(r.Int31()))] = NewPopulatedWilson(r, easy) + } + } + if r.Intn(10) != 0 { + v13 := r.Intn(10) + this.MyEmbeddedMap = make(map[github_com_gogo_protobuf_test_casttype.MyInt32Type]Wilson) + for i := 0; i < v13; i++ { + this.MyEmbeddedMap[github_com_gogo_protobuf_test_casttype.MyInt32Type(int32(r.Int31()))] = *NewPopulatedWilson(r, easy) + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedCasttype(r, 16) + } + return this +} + +func NewPopulatedWilson(r randyCasttype, easy bool) *Wilson { + this := &Wilson{} + if r.Intn(10) != 0 { + v14 := int64(r.Int63()) + if r.Intn(2) == 0 { + v14 *= -1 + } + this.Int64 = &v14 + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedCasttype(r, 2) + } + return this +} + +type randyCasttype interface { + Float32() float32 + Float64() float64 + Int63() int64 + Int31() int32 + Uint32() uint32 + Intn(n int) int +} + +func randUTF8RuneCasttype(r randyCasttype) 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 randStringCasttype(r randyCasttype) string { + v15 := r.Intn(100) + tmps := make([]rune, v15) + for i := 0; i < v15; i++ { + tmps[i] = randUTF8RuneCasttype(r) + } + return string(tmps) +} +func randUnrecognizedCasttype(r randyCasttype, 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 = randFieldCasttype(data, r, fieldNumber, wire) + } + return data +} +func randFieldCasttype(data []byte, r randyCasttype, fieldNumber int, wire int) []byte { + key := uint32(fieldNumber)<<3 | uint32(wire) + switch wire { + case 0: + data = encodeVarintPopulateCasttype(data, uint64(key)) + v16 := r.Int63() + if r.Intn(2) == 0 { + v16 *= -1 + } + data = encodeVarintPopulateCasttype(data, uint64(v16)) + case 1: + data = encodeVarintPopulateCasttype(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 = encodeVarintPopulateCasttype(data, uint64(key)) + ll := r.Intn(100) + data = encodeVarintPopulateCasttype(data, uint64(ll)) + for j := 0; j < ll; j++ { + data = append(data, byte(r.Intn(256))) + } + default: + data = encodeVarintPopulateCasttype(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 encodeVarintPopulateCasttype(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 *Castaway) Size() (n int) { + var l int + _ = l + if m.Int32Ptr != nil { + n += 1 + sovCasttype(uint64(*m.Int32Ptr)) + } + n += 1 + sovCasttype(uint64(m.Int32)) + if m.MyUint64Ptr != nil { + n += 1 + sovCasttype(uint64(*m.MyUint64Ptr)) + } + n += 1 + sovCasttype(uint64(m.MyUint64)) + if m.MyFloat32Ptr != nil { + n += 5 + } + n += 5 + if m.MyFloat64Ptr != nil { + n += 9 + } + n += 9 + if m.MyBytes != nil { + l = len(m.MyBytes) + n += 1 + l + sovCasttype(uint64(l)) + } + if m.NormalBytes != nil { + l = len(m.NormalBytes) + n += 1 + l + sovCasttype(uint64(l)) + } + if len(m.MyUint64S) > 0 { + for _, e := range m.MyUint64S { + n += 1 + sovCasttype(uint64(e)) + } + } + if len(m.MyMap) > 0 { + for k, v := range m.MyMap { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovCasttype(uint64(len(k))) + 1 + sovCasttype(uint64(v)) + n += mapEntrySize + 1 + sovCasttype(uint64(mapEntrySize)) + } + } + if len(m.MyCustomMap) > 0 { + for k, v := range m.MyCustomMap { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovCasttype(uint64(len(k))) + 1 + sovCasttype(uint64(v)) + n += mapEntrySize + 1 + sovCasttype(uint64(mapEntrySize)) + } + } + if len(m.MyNullableMap) > 0 { + for k, v := range m.MyNullableMap { + _ = k + _ = v + l = 0 + if v != nil { + l = v.Size() + } + mapEntrySize := 1 + sovCasttype(uint64(k)) + 1 + l + sovCasttype(uint64(l)) + n += mapEntrySize + 1 + sovCasttype(uint64(mapEntrySize)) + } + } + if len(m.MyEmbeddedMap) > 0 { + for k, v := range m.MyEmbeddedMap { + _ = k + _ = v + l = v.Size() + mapEntrySize := 1 + sovCasttype(uint64(k)) + 1 + l + sovCasttype(uint64(l)) + n += mapEntrySize + 1 + sovCasttype(uint64(mapEntrySize)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *Wilson) Size() (n int) { + var l int + _ = l + if m.Int64 != nil { + n += 1 + sovCasttype(uint64(*m.Int64)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func sovCasttype(x uint64) (n int) { + for { + n++ + x >>= 7 + if x == 0 { + break + } + } + return n +} +func sozCasttype(x uint64) (n int) { + return sovCasttype(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (this *Castaway) String() string { + if this == nil { + return "nil" + } + keysForMyMap := make([]string, 0, len(this.MyMap)) + for k := range this.MyMap { + keysForMyMap = append(keysForMyMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForMyMap) + mapStringForMyMap := "github_com_gogo_protobuf_test_casttype.MyMapType{" + for _, k := range keysForMyMap { + mapStringForMyMap += fmt.Sprintf("%v: %v,", k, this.MyMap[k]) + } + mapStringForMyMap += "}" + keysForMyCustomMap := make([]string, 0, len(this.MyCustomMap)) + for k := range this.MyCustomMap { + keysForMyCustomMap = append(keysForMyCustomMap, string(k)) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForMyCustomMap) + mapStringForMyCustomMap := "map[github_com_gogo_protobuf_test_casttype.MyStringType]github_com_gogo_protobuf_test_casttype.MyUint64Type{" + for _, k := range keysForMyCustomMap { + mapStringForMyCustomMap += fmt.Sprintf("%v: %v,", k, this.MyCustomMap[github_com_gogo_protobuf_test_casttype.MyStringType(k)]) + } + mapStringForMyCustomMap += "}" + keysForMyNullableMap := make([]int32, 0, len(this.MyNullableMap)) + for k := range this.MyNullableMap { + keysForMyNullableMap = append(keysForMyNullableMap, int32(k)) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForMyNullableMap) + mapStringForMyNullableMap := "map[github_com_gogo_protobuf_test_casttype.MyInt32Type]*Wilson{" + for _, k := range keysForMyNullableMap { + mapStringForMyNullableMap += fmt.Sprintf("%v: %v,", k, this.MyNullableMap[github_com_gogo_protobuf_test_casttype.MyInt32Type(k)]) + } + mapStringForMyNullableMap += "}" + keysForMyEmbeddedMap := make([]int32, 0, len(this.MyEmbeddedMap)) + for k := range this.MyEmbeddedMap { + keysForMyEmbeddedMap = append(keysForMyEmbeddedMap, int32(k)) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForMyEmbeddedMap) + mapStringForMyEmbeddedMap := "map[github_com_gogo_protobuf_test_casttype.MyInt32Type]Wilson{" + for _, k := range keysForMyEmbeddedMap { + mapStringForMyEmbeddedMap += fmt.Sprintf("%v: %v,", k, this.MyEmbeddedMap[github_com_gogo_protobuf_test_casttype.MyInt32Type(k)]) + } + mapStringForMyEmbeddedMap += "}" + s := strings.Join([]string{`&Castaway{`, + `Int32Ptr:` + valueToStringCasttype(this.Int32Ptr) + `,`, + `Int32:` + fmt.Sprintf("%v", this.Int32) + `,`, + `MyUint64Ptr:` + valueToStringCasttype(this.MyUint64Ptr) + `,`, + `MyUint64:` + fmt.Sprintf("%v", this.MyUint64) + `,`, + `MyFloat32Ptr:` + valueToStringCasttype(this.MyFloat32Ptr) + `,`, + `MyFloat32:` + fmt.Sprintf("%v", this.MyFloat32) + `,`, + `MyFloat64Ptr:` + valueToStringCasttype(this.MyFloat64Ptr) + `,`, + `MyFloat64:` + fmt.Sprintf("%v", this.MyFloat64) + `,`, + `MyBytes:` + valueToStringCasttype(this.MyBytes) + `,`, + `NormalBytes:` + valueToStringCasttype(this.NormalBytes) + `,`, + `MyUint64S:` + fmt.Sprintf("%v", this.MyUint64S) + `,`, + `MyMap:` + mapStringForMyMap + `,`, + `MyCustomMap:` + mapStringForMyCustomMap + `,`, + `MyNullableMap:` + mapStringForMyNullableMap + `,`, + `MyEmbeddedMap:` + mapStringForMyEmbeddedMap + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *Wilson) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&Wilson{`, + `Int64:` + valueToStringCasttype(this.Int64) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func valueToStringCasttype(v interface{}) string { + rv := reflect.ValueOf(v) + if rv.IsNil() { + return "nil" + } + pv := reflect.Indirect(rv).Interface() + return fmt.Sprintf("*%v", pv) +} +func (m *Castaway) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *Castaway) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Int32Ptr != nil { + data[i] = 0x8 + i++ + i = encodeVarintCasttype(data, i, uint64(*m.Int32Ptr)) + } + data[i] = 0x10 + i++ + i = encodeVarintCasttype(data, i, uint64(m.Int32)) + if m.MyUint64Ptr != nil { + data[i] = 0x18 + i++ + i = encodeVarintCasttype(data, i, uint64(*m.MyUint64Ptr)) + } + data[i] = 0x20 + i++ + i = encodeVarintCasttype(data, i, uint64(m.MyUint64)) + if m.MyFloat32Ptr != nil { + data[i] = 0x2d + i++ + i = encodeFixed32Casttype(data, i, uint32(math.Float32bits(float32(*m.MyFloat32Ptr)))) + } + data[i] = 0x35 + i++ + i = encodeFixed32Casttype(data, i, uint32(math.Float32bits(float32(m.MyFloat32)))) + if m.MyFloat64Ptr != nil { + data[i] = 0x39 + i++ + i = encodeFixed64Casttype(data, i, uint64(math.Float64bits(float64(*m.MyFloat64Ptr)))) + } + data[i] = 0x41 + i++ + i = encodeFixed64Casttype(data, i, uint64(math.Float64bits(float64(m.MyFloat64)))) + if m.MyBytes != nil { + data[i] = 0x4a + i++ + i = encodeVarintCasttype(data, i, uint64(len(m.MyBytes))) + i += copy(data[i:], m.MyBytes) + } + if m.NormalBytes != nil { + data[i] = 0x52 + i++ + i = encodeVarintCasttype(data, i, uint64(len(m.NormalBytes))) + i += copy(data[i:], m.NormalBytes) + } + if len(m.MyUint64S) > 0 { + for _, num := range m.MyUint64S { + data[i] = 0x58 + i++ + i = encodeVarintCasttype(data, i, uint64(num)) + } + } + if len(m.MyMap) > 0 { + for k := range m.MyMap { + data[i] = 0x62 + i++ + v := m.MyMap[k] + mapSize := 1 + len(k) + sovCasttype(uint64(len(k))) + 1 + sovCasttype(uint64(v)) + i = encodeVarintCasttype(data, i, uint64(mapSize)) + data[i] = 0xa + i++ + i = encodeVarintCasttype(data, i, uint64(len(k))) + i += copy(data[i:], k) + data[i] = 0x10 + i++ + i = encodeVarintCasttype(data, i, uint64(v)) + } + } + if len(m.MyCustomMap) > 0 { + for k := range m.MyCustomMap { + data[i] = 0x6a + i++ + v := m.MyCustomMap[k] + mapSize := 1 + len(k) + sovCasttype(uint64(len(k))) + 1 + sovCasttype(uint64(v)) + i = encodeVarintCasttype(data, i, uint64(mapSize)) + data[i] = 0xa + i++ + i = encodeVarintCasttype(data, i, uint64(len(k))) + i += copy(data[i:], k) + data[i] = 0x10 + i++ + i = encodeVarintCasttype(data, i, uint64(v)) + } + } + if len(m.MyNullableMap) > 0 { + for k := range m.MyNullableMap { + data[i] = 0x72 + i++ + v := m.MyNullableMap[k] + if v == nil { + return 0, errors.New("proto: map has nil element") + } + msgSize := v.Size() + mapSize := 1 + sovCasttype(uint64(k)) + 1 + msgSize + sovCasttype(uint64(msgSize)) + i = encodeVarintCasttype(data, i, uint64(mapSize)) + data[i] = 0x8 + i++ + i = encodeVarintCasttype(data, i, uint64(k)) + data[i] = 0x12 + i++ + i = encodeVarintCasttype(data, i, uint64(v.Size())) + n1, err := v.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n1 + } + } + if len(m.MyEmbeddedMap) > 0 { + for k := range m.MyEmbeddedMap { + data[i] = 0x7a + i++ + v := m.MyEmbeddedMap[k] + msgSize := (&v).Size() + mapSize := 1 + sovCasttype(uint64(k)) + 1 + msgSize + sovCasttype(uint64(msgSize)) + i = encodeVarintCasttype(data, i, uint64(mapSize)) + data[i] = 0x8 + i++ + i = encodeVarintCasttype(data, i, uint64(k)) + data[i] = 0x12 + i++ + i = encodeVarintCasttype(data, i, uint64((&v).Size())) + n2, err := (&v).MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n2 + } + } + if m.XXX_unrecognized != nil { + i += copy(data[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *Wilson) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *Wilson) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Int64 != nil { + data[i] = 0x8 + i++ + i = encodeVarintCasttype(data, i, uint64(*m.Int64)) + } + if m.XXX_unrecognized != nil { + i += copy(data[i:], m.XXX_unrecognized) + } + return i, nil +} + +func encodeFixed64Casttype(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 encodeFixed32Casttype(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 encodeVarintCasttype(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 +} + +var fileDescriptorCasttype = []byte{ + // 676 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xa4, 0x95, 0xbb, 0x6f, 0xd3, 0x5e, + 0x14, 0xc7, 0xeb, 0xa6, 0x6e, 0xed, 0xeb, 0xe4, 0xf7, 0xab, 0xae, 0x18, 0xac, 0x4a, 0xa4, 0x51, + 0xab, 0x20, 0x06, 0x48, 0xaa, 0x34, 0x0a, 0x51, 0x41, 0x0c, 0xae, 0x8a, 0x54, 0x84, 0x2b, 0x64, + 0xa8, 0x2a, 0x10, 0x8b, 0xd3, 0xb8, 0xa9, 0x85, 0x1f, 0x91, 0x1f, 0x20, 0x6f, 0x15, 0x0c, 0x48, + 0xfc, 0x05, 0xfc, 0x09, 0x8c, 0x2c, 0x48, 0x8c, 0x8c, 0x19, 0x19, 0x99, 0xfa, 0x62, 0xe9, 0xd8, + 0xb1, 0x62, 0xe2, 0xdc, 0x7b, 0xfd, 0x52, 0x5b, 0x50, 0xea, 0x0e, 0x47, 0xf7, 0x75, 0xce, 0xe7, + 0x7c, 0xef, 0xf1, 0xbd, 0xd7, 0xa8, 0xbe, 0xed, 0xda, 0x3d, 0xd7, 0x6f, 0x86, 0x8e, 0xaf, 0xef, + 0x18, 0xb6, 0xee, 0xf9, 0xb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x00, 0x00, 0xff, 0xff, 0x2c, 0xe5, 0x25, 0x59, + 0x69, 0x07, 0x00, 0x00, +} diff --git a/vendor/github.com/gogo/protobuf/test/casttype/combos/unsafemarshaler/casttype.proto b/vendor/github.com/gogo/protobuf/test/casttype/combos/unsafemarshaler/casttype.proto new file mode 100644 index 000000000..45e8e5160 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/casttype/combos/unsafemarshaler/casttype.proto @@ -0,0 +1,77 @@ +// Copyright (c) 2015, Vastech SA (PTY) LTD. All rights reserved. +// http://github.com/gogo/protobuf/gogoproto +// +// 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 casttype; + +import "github.com/gogo/protobuf/gogoproto/gogo.proto"; + +option (gogoproto.goproto_stringer_all) = false; +option (gogoproto.goproto_enum_prefix_all) = false; +option (gogoproto.goproto_getters_all) = false; + +option (gogoproto.equal_all) = true; +option (gogoproto.verbose_equal_all) = true; +option (gogoproto.stringer_all) = true; +option (gogoproto.gostring_all) = true; +option (gogoproto.face_all) = true; +option (gogoproto.description_all) = true; + +option (gogoproto.testgen_all) = true; +option (gogoproto.populate_all) = true; +option (gogoproto.benchgen_all) = true; +option (gogoproto.unmarshaler_all) = false; +option (gogoproto.marshaler_all) = false; +option (gogoproto.sizer_all) = true; + +option (gogoproto.goproto_enum_stringer_all) = false; +option (gogoproto.enum_stringer_all) = true; + +option (gogoproto.unsafe_marshaler_all) = true; +option (gogoproto.unsafe_unmarshaler_all) = false; + +message Castaway { + optional int64 Int32Ptr = 1 [(gogoproto.casttype) = "int32"]; + optional int64 Int32 = 2 [(gogoproto.casttype) = "int32", (gogoproto.nullable) = false]; + optional uint64 MyUint64Ptr = 3 [(gogoproto.casttype) = "github.com/gogo/protobuf/test/casttype.MyUint64Type"]; + optional uint64 MyUint64 = 4 [(gogoproto.casttype) = "github.com/gogo/protobuf/test/casttype.MyUint64Type", (gogoproto.nullable) = false]; + optional float MyFloat32Ptr = 5 [(gogoproto.casttype) = "github.com/gogo/protobuf/test/casttype.MyFloat32Type"]; + optional float MyFloat32 = 6 [(gogoproto.casttype) = "github.com/gogo/protobuf/test/casttype.MyFloat32Type", (gogoproto.nullable) = false]; + optional double MyFloat64Ptr = 7 [(gogoproto.casttype) = "github.com/gogo/protobuf/test/casttype.MyFloat64Type"]; + optional double MyFloat64 = 8 [(gogoproto.casttype) = "github.com/gogo/protobuf/test/casttype.MyFloat64Type", (gogoproto.nullable) = false]; + optional bytes MyBytes = 9 [(gogoproto.casttype) = "github.com/gogo/protobuf/test/casttype.Bytes"]; + optional bytes NormalBytes = 10; + repeated uint64 MyUint64s = 11 [(gogoproto.casttype) = "github.com/gogo/protobuf/test/casttype.MyUint64Type"]; + map MyMap = 12 [(gogoproto.casttype) = "github.com/gogo/protobuf/test/casttype.MyMapType"]; + map MyCustomMap = 13 [(gogoproto.castkey) = "github.com/gogo/protobuf/test/casttype.MyStringType", (gogoproto.castvalue) = "github.com/gogo/protobuf/test/casttype.MyUint64Type"]; + map MyNullableMap = 14 [(gogoproto.castkey) = "github.com/gogo/protobuf/test/casttype.MyInt32Type"]; + map MyEmbeddedMap = 15 [(gogoproto.castkey) = "github.com/gogo/protobuf/test/casttype.MyInt32Type", (gogoproto.nullable) = false]; +} + +message Wilson { + optional int64 Int64 = 1; +} diff --git a/vendor/github.com/gogo/protobuf/test/casttype/combos/unsafemarshaler/casttypepb_test.go b/vendor/github.com/gogo/protobuf/test/casttype/combos/unsafemarshaler/casttypepb_test.go new file mode 100644 index 000000000..31bb75e7b --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/casttype/combos/unsafemarshaler/casttypepb_test.go @@ -0,0 +1,513 @@ +// Code generated by protoc-gen-gogo. +// source: combos/unsafemarshaler/casttype.proto +// DO NOT EDIT! + +/* +Package casttype is a generated protocol buffer package. + +It is generated from these files: + combos/unsafemarshaler/casttype.proto + +It has these top-level messages: + Castaway + Wilson +*/ +package casttype + +import testing "testing" +import math_rand "math/rand" +import time "time" +import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" +import github_com_gogo_protobuf_jsonpb "github.com/gogo/protobuf/jsonpb" +import fmt "fmt" +import go_parser "go/parser" +import proto "github.com/gogo/protobuf/proto" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +func TestCastawayProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCastaway(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Castaway{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestCastawayMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCastaway(popr, false) + size := p.Size() + data := make([]byte, size) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(data) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Castaway{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkCastawayProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Castaway, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedCastaway(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkCastawayProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedCastaway(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &Castaway{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestWilsonProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedWilson(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Wilson{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestWilsonMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedWilson(popr, false) + size := p.Size() + data := make([]byte, size) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(data) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Wilson{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkWilsonProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Wilson, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedWilson(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkWilsonProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedWilson(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &Wilson{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestCastawayJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCastaway(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Castaway{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestWilsonJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedWilson(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Wilson{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestCastawayProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCastaway(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &Castaway{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestCastawayProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCastaway(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &Castaway{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestWilsonProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedWilson(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &Wilson{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestWilsonProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedWilson(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &Wilson{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestCasttypeDescription(t *testing.T) { + CasttypeDescription() +} +func TestCastawayVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCastaway(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &Castaway{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestWilsonVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedWilson(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &Wilson{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestCastawayFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCastaway(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestWilsonFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedWilson(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestCastawayGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCastaway(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestWilsonGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedWilson(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestCastawaySize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCastaway(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkCastawaySize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Castaway, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedCastaway(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestWilsonSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedWilson(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkWilsonSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Wilson, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedWilson(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestCastawayStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCastaway(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestWilsonStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedWilson(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} + +//These tests are generated by github.com/gogo/protobuf/plugin/testgen diff --git a/vendor/github.com/gogo/protobuf/test/casttype/combos/unsafeunmarshaler/casttype.pb.go b/vendor/github.com/gogo/protobuf/test/casttype/combos/unsafeunmarshaler/casttype.pb.go new file mode 100644 index 000000000..38cc91501 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/casttype/combos/unsafeunmarshaler/casttype.pb.go @@ -0,0 +1,2215 @@ +// Code generated by protoc-gen-gogo. +// source: combos/unsafeunmarshaler/casttype.proto +// DO NOT EDIT! + +/* + Package casttype is a generated protocol buffer package. + + It is generated from these files: + combos/unsafeunmarshaler/casttype.proto + + It has these top-level messages: + Castaway + Wilson +*/ +package casttype + +import proto "github.com/gogo/protobuf/proto" +import fmt "fmt" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" + +import github_com_gogo_protobuf_test_casttype "github.com/gogo/protobuf/test/casttype" + +import github_com_gogo_protobuf_protoc_gen_gogo_descriptor "github.com/gogo/protobuf/protoc-gen-gogo/descriptor" +import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" +import compress_gzip "compress/gzip" +import bytes "bytes" +import io_ioutil "io/ioutil" + +import strings "strings" +import sort "sort" +import strconv "strconv" +import reflect "reflect" +import github_com_gogo_protobuf_sortkeys "github.com/gogo/protobuf/sortkeys" + +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. +const _ = proto.GoGoProtoPackageIsVersion1 + +type Castaway struct { + Int32Ptr *int32 `protobuf:"varint,1,opt,name=Int32Ptr,json=int32Ptr,casttype=int32" json:"Int32Ptr,omitempty"` + Int32 int32 `protobuf:"varint,2,opt,name=Int32,json=int32,casttype=int32" json:"Int32"` + MyUint64Ptr *github_com_gogo_protobuf_test_casttype.MyUint64Type `protobuf:"varint,3,opt,name=MyUint64Ptr,json=myUint64Ptr,casttype=github.com/gogo/protobuf/test/casttype.MyUint64Type" json:"MyUint64Ptr,omitempty"` + MyUint64 github_com_gogo_protobuf_test_casttype.MyUint64Type `protobuf:"varint,4,opt,name=MyUint64,json=myUint64,casttype=github.com/gogo/protobuf/test/casttype.MyUint64Type" json:"MyUint64"` + MyFloat32Ptr *github_com_gogo_protobuf_test_casttype.MyFloat32Type `protobuf:"fixed32,5,opt,name=MyFloat32Ptr,json=myFloat32Ptr,casttype=github.com/gogo/protobuf/test/casttype.MyFloat32Type" json:"MyFloat32Ptr,omitempty"` + MyFloat32 github_com_gogo_protobuf_test_casttype.MyFloat32Type `protobuf:"fixed32,6,opt,name=MyFloat32,json=myFloat32,casttype=github.com/gogo/protobuf/test/casttype.MyFloat32Type" json:"MyFloat32"` + MyFloat64Ptr *github_com_gogo_protobuf_test_casttype.MyFloat64Type `protobuf:"fixed64,7,opt,name=MyFloat64Ptr,json=myFloat64Ptr,casttype=github.com/gogo/protobuf/test/casttype.MyFloat64Type" json:"MyFloat64Ptr,omitempty"` + MyFloat64 github_com_gogo_protobuf_test_casttype.MyFloat64Type `protobuf:"fixed64,8,opt,name=MyFloat64,json=myFloat64,casttype=github.com/gogo/protobuf/test/casttype.MyFloat64Type" json:"MyFloat64"` + MyBytes github_com_gogo_protobuf_test_casttype.Bytes `protobuf:"bytes,9,opt,name=MyBytes,json=myBytes,casttype=github.com/gogo/protobuf/test/casttype.Bytes" json:"MyBytes,omitempty"` + NormalBytes []byte `protobuf:"bytes,10,opt,name=NormalBytes,json=normalBytes" json:"NormalBytes,omitempty"` + MyUint64S []github_com_gogo_protobuf_test_casttype.MyUint64Type `protobuf:"varint,11,rep,name=MyUint64s,json=myUint64s,casttype=github.com/gogo/protobuf/test/casttype.MyUint64Type" json:"MyUint64s,omitempty"` + MyMap github_com_gogo_protobuf_test_casttype.MyMapType `protobuf:"bytes,12,rep,name=MyMap,json=myMap,casttype=github.com/gogo/protobuf/test/casttype.MyMapType" json:"MyMap,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"varint,2,opt,name=value"` + MyCustomMap map[github_com_gogo_protobuf_test_casttype.MyStringType]github_com_gogo_protobuf_test_casttype.MyUint64Type `protobuf:"bytes,13,rep,name=MyCustomMap,json=myCustomMap,castkey=github.com/gogo/protobuf/test/casttype.MyStringType,castvalue=github.com/gogo/protobuf/test/casttype.MyUint64Type" json:"MyCustomMap,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"varint,2,opt,name=value"` + MyNullableMap map[github_com_gogo_protobuf_test_casttype.MyInt32Type]*Wilson `protobuf:"bytes,14,rep,name=MyNullableMap,json=myNullableMap,castkey=github.com/gogo/protobuf/test/casttype.MyInt32Type" json:"MyNullableMap,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + MyEmbeddedMap map[github_com_gogo_protobuf_test_casttype.MyInt32Type]Wilson `protobuf:"bytes,15,rep,name=MyEmbeddedMap,json=myEmbeddedMap,castkey=github.com/gogo/protobuf/test/casttype.MyInt32Type" json:"MyEmbeddedMap" protobuf_key:"varint,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *Castaway) Reset() { *m = Castaway{} } +func (*Castaway) ProtoMessage() {} +func (*Castaway) Descriptor() ([]byte, []int) { return fileDescriptorCasttype, []int{0} } + +type Wilson struct { + Int64 *int64 `protobuf:"varint,1,opt,name=Int64,json=int64" json:"Int64,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *Wilson) Reset() { *m = Wilson{} } +func (*Wilson) ProtoMessage() {} +func (*Wilson) Descriptor() ([]byte, []int) { return fileDescriptorCasttype, []int{1} } + +func init() { + proto.RegisterType((*Castaway)(nil), "casttype.Castaway") + proto.RegisterType((*Wilson)(nil), "casttype.Wilson") +} +func (this *Castaway) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return CasttypeDescription() +} +func (this *Wilson) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return CasttypeDescription() +} +func CasttypeDescription() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + d := &github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet{} + var gzipped = []byte{ + // 3788 bytes of a gzipped FileDescriptorSet + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xcc, 0x5a, 0x5b, 0x6c, 0x1b, 0x67, + 0x76, 0x0e, 0x6f, 0x12, 0x79, 0x48, 0x51, 0xd4, 0x48, 0xb1, 0x69, 0x6d, 0x7c, 0x93, 0x93, 0xd8, + 0xeb, 0xdd, 0x95, 0x5c, 0xc7, 0xb1, 0x1d, 0x7a, 0x9b, 0x85, 0x28, 0xd1, 0x5a, 0x1a, 0xba, 0x75, + 0x24, 0xae, 0xed, 0xb4, 0xc0, 0x60, 0x44, 0x8e, 0x28, 0xda, 0xc3, 0x19, 0x96, 0x33, 0xb4, 0xad, + 0x7d, 0x4a, 0xeb, 0xb6, 0x8b, 0x6d, 0xd1, 0x7b, 0x81, 0xe6, 0xde, 0x26, 0x40, 0x9b, 0x34, 0xbd, + 0x25, 0x6d, 0x53, 0x14, 0x7d, 0x0a, 0x50, 0xa4, 0xcd, 0x53, 0xd1, 0xf6, 0xa9, 0x0f, 0x45, 0x6e, + 0x0d, 0xd0, 0xb4, 0x49, 0xdb, 0x14, 0x30, 0xd0, 0xa0, 0x79, 0xe9, 0x39, 0xff, 0x65, 0x38, 0xbc, + 0x48, 0x43, 0x29, 0x48, 0x53, 0x01, 0x84, 0x38, 0xe7, 0x3f, 0xdf, 0x37, 0x67, 0xce, 0x7f, 0xfe, + 0x73, 0xce, 0xff, 0x0f, 0xe1, 0xaf, 0x7e, 0x04, 0x8e, 0x55, 0x6d, 0xbb, 0x6a, 0x1a, 0x33, 0x8d, + 0xa6, 0xed, 0xda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x6a, 0x74, 0xb3, 0xc4, 0x09, 0x26, 0x28, + 0x86, 0x1d, 0xa3, 0x79, 0xab, 0x56, 0x36, 0xb2, 0x43, 0x8c, 0xe0, 0x64, 0x0f, 0xc1, 0x1a, 0x1f, + 0xef, 0xe6, 0x90, 0x38, 0x7c, 0x94, 0x84, 0x71, 0xc7, 0x35, 0x2c, 0xa7, 0x66, 0x5b, 0xd9, 0x61, + 0x46, 0xf2, 0x50, 0x9f, 0x59, 0x34, 0xcc, 0x4a, 0x37, 0x45, 0x1b, 0xa7, 0x9c, 0x87, 0x61, 0xbb, + 0xe1, 0xe2, 0x37, 0x27, 0x1b, 0xc7, 0xf9, 0x49, 0x9e, 0x7d, 0xa0, 0x6f, 0x20, 0xac, 0x70, 0x1d, + 0x55, 0x2a, 0x2b, 0x45, 0xc8, 0x38, 0x76, 0xab, 0x59, 0x36, 0xb4, 0xb2, 0x5d, 0x31, 0xb4, 0x9a, + 0xb5, 0x69, 0x67, 0x13, 0x8c, 0xe0, 0x68, 0xef, 0x83, 0x30, 0xc5, 0x39, 0xd4, 0x2b, 0xa2, 0x9a, + 0x9a, 0x76, 0x3a, 0xae, 0x95, 0x03, 0x30, 0xe4, 0x6c, 0x5b, 0xae, 0x7e, 0x27, 0x9b, 0x62, 0x11, + 0x22, 0xae, 0xa6, 0xfe, 0x3b, 0x06, 0xa3, 0x83, 0x84, 0xd8, 0x25, 0x88, 0x6d, 0xd2, 0x53, 0x62, + 0x80, 0xed, 0xc1, 0x07, 0x1c, 0xd3, 0xe9, 0xc4, 0xa1, 0x7d, 0x3a, 0x71, 0x16, 0x92, 0x96, 0xe1, + 0xb8, 0x46, 0x85, 0x47, 0x44, 0x64, 0xc0, 0x98, 0x02, 0x0e, 0xea, 0x0d, 0xa9, 0xe8, 0xbe, 0x42, + 0xea, 0x1a, 0x8c, 0x7a, 0x26, 0x69, 0x4d, 0xdd, 0xaa, 0xca, 0xd8, 0x9c, 0x09, 0xb2, 0x64, 0xba, + 0x20, 0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0xff, 0xb9, 0x6f, 0x87, 0x98, 0xcd, 0x71, + 0x12, 0x90, 0x5f, 0x95, 0x49, 0x88, 0xb3, 0x30, 0xab, 0x18, 0xb2, 0x34, 0x78, 0xd7, 0x34, 0x31, + 0x15, 0x63, 0x53, 0x6f, 0x99, 0xae, 0x76, 0x4b, 0x37, 0x5b, 0x06, 0x0b, 0x18, 0x9c, 0x18, 0x21, + 0xfc, 0x1e, 0xc9, 0x94, 0xa3, 0x90, 0xe4, 0x51, 0x59, 0x43, 0xcc, 0x1d, 0x96, 0x7d, 0x62, 0x2a, + 0x0f, 0xd4, 0x22, 0x49, 0xe8, 0xf6, 0x37, 0x1c, 0x5c, 0x0b, 0x62, 0x6a, 0xd9, 0x2d, 0x48, 0xc0, + 0x6e, 0x7f, 0xa1, 0x3b, 0xf1, 0x1d, 0xee, 0xff, 0x78, 0xdd, 0xb1, 0x38, 0xf5, 0xe7, 0x61, 0x88, + 0xb2, 0xf5, 0x36, 0x0a, 0xc9, 0xf5, 0xeb, 0xab, 0x05, 0x6d, 0x7e, 0xa5, 0x94, 0x5f, 0x2c, 0x64, + 0x42, 0x4a, 0x1a, 0x80, 0x09, 0x2e, 0x2f, 0xae, 0xcc, 0xae, 0x67, 0xc2, 0xde, 0x75, 0x71, 0x79, + 0xfd, 0xfc, 0xb9, 0x4c, 0xc4, 0x03, 0x94, 0xb8, 0x20, 0xea, 0x57, 0x78, 0xe4, 0x6c, 0x26, 0x86, + 0x91, 0x90, 0xe2, 0x04, 0xc5, 0x6b, 0x85, 0x79, 0xd4, 0x18, 0xea, 0x94, 0xa0, 0xce, 0xb0, 0x32, + 0x02, 0x09, 0x26, 0xc9, 0xaf, 0xac, 0x2c, 0x66, 0xe2, 0x1e, 0xe7, 0xda, 0xba, 0x5a, 0x5c, 0x5e, + 0xc8, 0x24, 0x3c, 0xce, 0x05, 0x75, 0xa5, 0xb4, 0x9a, 0x01, 0x8f, 0x61, 0xa9, 0xb0, 0xb6, 0x36, + 0xbb, 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x50, 0xfe, 0x52, 0x10, 0xd9, 0xa9, 0x69, 0xe0, + 0xd6, 0xf4, 0x58, 0xfa, 0xc3, 0x30, 0xdc, 0xdf, 0x97, 0xbc, 0xaf, 0xa1, 0x87, 0x01, 0x6a, 0x56, + 0xa3, 0xe5, 0xf2, 0xba, 0xca, 0xd3, 0x4c, 0x82, 0x49, 0xd8, 0x12, 0xa6, 0x14, 0xd2, 0x72, 0xbd, + 0xf1, 0x08, 0x1b, 0x07, 0x2e, 0x62, 0x0a, 0x17, 0xdb, 0x86, 0x46, 0x99, 0xa1, 0x47, 0x76, 0x78, + 0xd2, 0x9e, 0x92, 0x75, 0x06, 0x32, 0x65, 0xb3, 0x66, 0x58, 0xae, 0xe6, 0xb8, 0x4d, 0x43, 0xaf, + 0xd7, 0xac, 0x2a, 0xcb, 0xa3, 0xf1, 0x5c, 0x6c, 0x53, 0x37, 0x1d, 0x43, 0x1d, 0xe5, 0xc3, 0x6b, + 0x72, 0x94, 0x10, 0xac, 0x58, 0x34, 0x7d, 0x88, 0xa1, 0x0e, 0x04, 0x1f, 0xf6, 0x10, 0x53, 0xff, + 0x30, 0x0c, 0x49, 0x5f, 0x77, 0xa6, 0x1c, 0x87, 0xd4, 0x0d, 0xfd, 0x96, 0xae, 0xc9, 0x8e, 0x9b, + 0x7b, 0x22, 0x49, 0xb2, 0x55, 0xd1, 0x75, 0x9f, 0x81, 0x09, 0xa6, 0x82, 0xcf, 0x88, 0x37, 0x2a, + 0x9b, 0xba, 0xe3, 0x30, 0xa7, 0xc5, 0x99, 0xaa, 0x42, 0x63, 0x2b, 0x34, 0x34, 0x27, 0x47, 0x94, + 0x47, 0x61, 0x9c, 0x21, 0xea, 0x98, 0x78, 0x6b, 0x0d, 0xd3, 0xd0, 0x68, 0x0f, 0xe0, 0xb0, 0x7c, + 0xea, 0x59, 0x36, 0x46, 0x1a, 0x4b, 0x42, 0x81, 0x2c, 0x72, 0x94, 0x05, 0x38, 0xcc, 0x60, 0x55, + 0xc3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zipr, err := compress_gzip.NewReader(r) + if err != nil { + panic(err) + } + ungzipped, err := io_ioutil.ReadAll(gzipr) + if err != nil { + panic(err) + } + if err := github_com_gogo_protobuf_proto.Unmarshal(ungzipped, d); err != nil { + panic(err) + } + return d +} +func (this *Castaway) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*Castaway) + if !ok { + that2, ok := that.(Castaway) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *Castaway") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *Castaway but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *Castaway but is not nil && this == nil") + } + if this.Int32Ptr != nil && that1.Int32Ptr != nil { + if *this.Int32Ptr != *that1.Int32Ptr { + return fmt.Errorf("Int32Ptr this(%v) Not Equal that(%v)", *this.Int32Ptr, *that1.Int32Ptr) + } + } else if this.Int32Ptr != nil { + return fmt.Errorf("this.Int32Ptr == nil && that.Int32Ptr != nil") + } else if that1.Int32Ptr != nil { + return fmt.Errorf("Int32Ptr this(%v) Not Equal that(%v)", this.Int32Ptr, that1.Int32Ptr) + } + if this.Int32 != that1.Int32 { + return fmt.Errorf("Int32 this(%v) Not Equal that(%v)", this.Int32, that1.Int32) + } + if this.MyUint64Ptr != nil && that1.MyUint64Ptr != nil { + if *this.MyUint64Ptr != *that1.MyUint64Ptr { + return fmt.Errorf("MyUint64Ptr this(%v) Not Equal that(%v)", *this.MyUint64Ptr, *that1.MyUint64Ptr) + } + } else if this.MyUint64Ptr != nil { + return fmt.Errorf("this.MyUint64Ptr == nil && that.MyUint64Ptr != nil") + } else if that1.MyUint64Ptr != nil { + return fmt.Errorf("MyUint64Ptr this(%v) Not Equal that(%v)", this.MyUint64Ptr, that1.MyUint64Ptr) + } + if this.MyUint64 != that1.MyUint64 { + return fmt.Errorf("MyUint64 this(%v) Not Equal that(%v)", this.MyUint64, that1.MyUint64) + } + if this.MyFloat32Ptr != nil && that1.MyFloat32Ptr != nil { + if *this.MyFloat32Ptr != *that1.MyFloat32Ptr { + return fmt.Errorf("MyFloat32Ptr this(%v) Not Equal that(%v)", *this.MyFloat32Ptr, *that1.MyFloat32Ptr) + } + } else if this.MyFloat32Ptr != nil { + return fmt.Errorf("this.MyFloat32Ptr == nil && that.MyFloat32Ptr != nil") + } else if that1.MyFloat32Ptr != nil { + return fmt.Errorf("MyFloat32Ptr this(%v) Not Equal that(%v)", this.MyFloat32Ptr, that1.MyFloat32Ptr) + } + if this.MyFloat32 != that1.MyFloat32 { + return fmt.Errorf("MyFloat32 this(%v) Not Equal that(%v)", this.MyFloat32, that1.MyFloat32) + } + if this.MyFloat64Ptr != nil && that1.MyFloat64Ptr != nil { + if *this.MyFloat64Ptr != *that1.MyFloat64Ptr { + return fmt.Errorf("MyFloat64Ptr this(%v) Not Equal that(%v)", *this.MyFloat64Ptr, *that1.MyFloat64Ptr) + } + } else if this.MyFloat64Ptr != nil { + return fmt.Errorf("this.MyFloat64Ptr == nil && that.MyFloat64Ptr != nil") + } else if that1.MyFloat64Ptr != nil { + return fmt.Errorf("MyFloat64Ptr this(%v) Not Equal that(%v)", this.MyFloat64Ptr, that1.MyFloat64Ptr) + } + if this.MyFloat64 != that1.MyFloat64 { + return fmt.Errorf("MyFloat64 this(%v) Not Equal that(%v)", this.MyFloat64, that1.MyFloat64) + } + if !bytes.Equal(this.MyBytes, that1.MyBytes) { + return fmt.Errorf("MyBytes this(%v) Not Equal that(%v)", this.MyBytes, that1.MyBytes) + } + if !bytes.Equal(this.NormalBytes, that1.NormalBytes) { + return fmt.Errorf("NormalBytes this(%v) Not Equal that(%v)", this.NormalBytes, that1.NormalBytes) + } + if len(this.MyUint64S) != len(that1.MyUint64S) { + return fmt.Errorf("MyUint64S this(%v) Not Equal that(%v)", len(this.MyUint64S), len(that1.MyUint64S)) + } + for i := range this.MyUint64S { + if this.MyUint64S[i] != that1.MyUint64S[i] { + return fmt.Errorf("MyUint64S this[%v](%v) Not Equal that[%v](%v)", i, this.MyUint64S[i], i, that1.MyUint64S[i]) + } + } + if len(this.MyMap) != len(that1.MyMap) { + return fmt.Errorf("MyMap this(%v) Not Equal that(%v)", len(this.MyMap), len(that1.MyMap)) + } + for i := range this.MyMap { + if this.MyMap[i] != that1.MyMap[i] { + return fmt.Errorf("MyMap this[%v](%v) Not Equal that[%v](%v)", i, this.MyMap[i], i, that1.MyMap[i]) + } + } + if len(this.MyCustomMap) != len(that1.MyCustomMap) { + return fmt.Errorf("MyCustomMap this(%v) Not Equal that(%v)", len(this.MyCustomMap), len(that1.MyCustomMap)) + } + for i := range this.MyCustomMap { + if this.MyCustomMap[i] != that1.MyCustomMap[i] { + return fmt.Errorf("MyCustomMap this[%v](%v) Not Equal that[%v](%v)", i, this.MyCustomMap[i], i, that1.MyCustomMap[i]) + } + } + if len(this.MyNullableMap) != len(that1.MyNullableMap) { + return fmt.Errorf("MyNullableMap this(%v) Not Equal that(%v)", len(this.MyNullableMap), len(that1.MyNullableMap)) + } + for i := range this.MyNullableMap { + if !this.MyNullableMap[i].Equal(that1.MyNullableMap[i]) { + return fmt.Errorf("MyNullableMap this[%v](%v) Not Equal that[%v](%v)", i, this.MyNullableMap[i], i, that1.MyNullableMap[i]) + } + } + if len(this.MyEmbeddedMap) != len(that1.MyEmbeddedMap) { + return fmt.Errorf("MyEmbeddedMap this(%v) Not Equal that(%v)", len(this.MyEmbeddedMap), len(that1.MyEmbeddedMap)) + } + for i := range this.MyEmbeddedMap { + a := this.MyEmbeddedMap[i] + b := that1.MyEmbeddedMap[i] + if !(&a).Equal(&b) { + return fmt.Errorf("MyEmbeddedMap this[%v](%v) Not Equal that[%v](%v)", i, this.MyEmbeddedMap[i], i, that1.MyEmbeddedMap[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *Castaway) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*Castaway) + if !ok { + that2, ok := that.(Castaway) + 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.Int32Ptr != nil && that1.Int32Ptr != nil { + if *this.Int32Ptr != *that1.Int32Ptr { + return false + } + } else if this.Int32Ptr != nil { + return false + } else if that1.Int32Ptr != nil { + return false + } + if this.Int32 != that1.Int32 { + return false + } + if this.MyUint64Ptr != nil && that1.MyUint64Ptr != nil { + if *this.MyUint64Ptr != *that1.MyUint64Ptr { + return false + } + } else if this.MyUint64Ptr != nil { + return false + } else if that1.MyUint64Ptr != nil { + return false + } + if this.MyUint64 != that1.MyUint64 { + return false + } + if this.MyFloat32Ptr != nil && that1.MyFloat32Ptr != nil { + if *this.MyFloat32Ptr != *that1.MyFloat32Ptr { + return false + } + } else if this.MyFloat32Ptr != nil { + return false + } else if that1.MyFloat32Ptr != nil { + return false + } + if this.MyFloat32 != that1.MyFloat32 { + return false + } + if this.MyFloat64Ptr != nil && that1.MyFloat64Ptr != nil { + if *this.MyFloat64Ptr != *that1.MyFloat64Ptr { + return false + } + } else if this.MyFloat64Ptr != nil { + return false + } else if that1.MyFloat64Ptr != nil { + return false + } + if this.MyFloat64 != that1.MyFloat64 { + return false + } + if !bytes.Equal(this.MyBytes, that1.MyBytes) { + return false + } + if !bytes.Equal(this.NormalBytes, that1.NormalBytes) { + return false + } + if len(this.MyUint64S) != len(that1.MyUint64S) { + return false + } + for i := range this.MyUint64S { + if this.MyUint64S[i] != that1.MyUint64S[i] { + return false + } + } + if len(this.MyMap) != len(that1.MyMap) { + return false + } + for i := range this.MyMap { + if this.MyMap[i] != that1.MyMap[i] { + return false + } + } + if len(this.MyCustomMap) != len(that1.MyCustomMap) { + return false + } + for i := range this.MyCustomMap { + if this.MyCustomMap[i] != that1.MyCustomMap[i] { + return false + } + } + if len(this.MyNullableMap) != len(that1.MyNullableMap) { + return false + } + for i := range this.MyNullableMap { + if !this.MyNullableMap[i].Equal(that1.MyNullableMap[i]) { + return false + } + } + if len(this.MyEmbeddedMap) != len(that1.MyEmbeddedMap) { + return false + } + for i := range this.MyEmbeddedMap { + a := this.MyEmbeddedMap[i] + b := that1.MyEmbeddedMap[i] + if !(&a).Equal(&b) { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *Wilson) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*Wilson) + if !ok { + that2, ok := that.(Wilson) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *Wilson") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *Wilson but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *Wilson but is not nil && this == nil") + } + if this.Int64 != nil && that1.Int64 != nil { + if *this.Int64 != *that1.Int64 { + return fmt.Errorf("Int64 this(%v) Not Equal that(%v)", *this.Int64, *that1.Int64) + } + } else if this.Int64 != nil { + return fmt.Errorf("this.Int64 == nil && that.Int64 != nil") + } else if that1.Int64 != nil { + return fmt.Errorf("Int64 this(%v) Not Equal that(%v)", this.Int64, that1.Int64) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *Wilson) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*Wilson) + if !ok { + that2, ok := that.(Wilson) + 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.Int64 != nil && that1.Int64 != nil { + if *this.Int64 != *that1.Int64 { + return false + } + } else if this.Int64 != nil { + return false + } else if that1.Int64 != nil { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} + +type CastawayFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetInt32Ptr() *int32 + GetInt32() int32 + GetMyUint64Ptr() *github_com_gogo_protobuf_test_casttype.MyUint64Type + GetMyUint64() github_com_gogo_protobuf_test_casttype.MyUint64Type + GetMyFloat32Ptr() *github_com_gogo_protobuf_test_casttype.MyFloat32Type + GetMyFloat32() github_com_gogo_protobuf_test_casttype.MyFloat32Type + GetMyFloat64Ptr() *github_com_gogo_protobuf_test_casttype.MyFloat64Type + GetMyFloat64() github_com_gogo_protobuf_test_casttype.MyFloat64Type + GetMyBytes() github_com_gogo_protobuf_test_casttype.Bytes + GetNormalBytes() []byte + GetMyUint64S() []github_com_gogo_protobuf_test_casttype.MyUint64Type + GetMyMap() github_com_gogo_protobuf_test_casttype.MyMapType + GetMyCustomMap() map[github_com_gogo_protobuf_test_casttype.MyStringType]github_com_gogo_protobuf_test_casttype.MyUint64Type + GetMyNullableMap() map[github_com_gogo_protobuf_test_casttype.MyInt32Type]*Wilson + GetMyEmbeddedMap() map[github_com_gogo_protobuf_test_casttype.MyInt32Type]Wilson +} + +func (this *Castaway) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *Castaway) TestProto() github_com_gogo_protobuf_proto.Message { + return NewCastawayFromFace(this) +} + +func (this *Castaway) GetInt32Ptr() *int32 { + return this.Int32Ptr +} + +func (this *Castaway) GetInt32() int32 { + return this.Int32 +} + +func (this *Castaway) GetMyUint64Ptr() *github_com_gogo_protobuf_test_casttype.MyUint64Type { + return this.MyUint64Ptr +} + +func (this *Castaway) GetMyUint64() github_com_gogo_protobuf_test_casttype.MyUint64Type { + return this.MyUint64 +} + +func (this *Castaway) GetMyFloat32Ptr() *github_com_gogo_protobuf_test_casttype.MyFloat32Type { + return this.MyFloat32Ptr +} + +func (this *Castaway) GetMyFloat32() github_com_gogo_protobuf_test_casttype.MyFloat32Type { + return this.MyFloat32 +} + +func (this *Castaway) GetMyFloat64Ptr() *github_com_gogo_protobuf_test_casttype.MyFloat64Type { + return this.MyFloat64Ptr +} + +func (this *Castaway) GetMyFloat64() github_com_gogo_protobuf_test_casttype.MyFloat64Type { + return this.MyFloat64 +} + +func (this *Castaway) GetMyBytes() github_com_gogo_protobuf_test_casttype.Bytes { + return this.MyBytes +} + +func (this *Castaway) GetNormalBytes() []byte { + return this.NormalBytes +} + +func (this *Castaway) GetMyUint64S() []github_com_gogo_protobuf_test_casttype.MyUint64Type { + return this.MyUint64S +} + +func (this *Castaway) GetMyMap() github_com_gogo_protobuf_test_casttype.MyMapType { + return this.MyMap +} + +func (this *Castaway) GetMyCustomMap() map[github_com_gogo_protobuf_test_casttype.MyStringType]github_com_gogo_protobuf_test_casttype.MyUint64Type { + return this.MyCustomMap +} + +func (this *Castaway) GetMyNullableMap() map[github_com_gogo_protobuf_test_casttype.MyInt32Type]*Wilson { + return this.MyNullableMap +} + +func (this *Castaway) GetMyEmbeddedMap() map[github_com_gogo_protobuf_test_casttype.MyInt32Type]Wilson { + return this.MyEmbeddedMap +} + +func NewCastawayFromFace(that CastawayFace) *Castaway { + this := &Castaway{} + this.Int32Ptr = that.GetInt32Ptr() + this.Int32 = that.GetInt32() + this.MyUint64Ptr = that.GetMyUint64Ptr() + this.MyUint64 = that.GetMyUint64() + this.MyFloat32Ptr = that.GetMyFloat32Ptr() + this.MyFloat32 = that.GetMyFloat32() + this.MyFloat64Ptr = that.GetMyFloat64Ptr() + this.MyFloat64 = that.GetMyFloat64() + this.MyBytes = that.GetMyBytes() + this.NormalBytes = that.GetNormalBytes() + this.MyUint64S = that.GetMyUint64S() + this.MyMap = that.GetMyMap() + this.MyCustomMap = that.GetMyCustomMap() + this.MyNullableMap = that.GetMyNullableMap() + this.MyEmbeddedMap = that.GetMyEmbeddedMap() + return this +} + +type WilsonFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetInt64() *int64 +} + +func (this *Wilson) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *Wilson) TestProto() github_com_gogo_protobuf_proto.Message { + return NewWilsonFromFace(this) +} + +func (this *Wilson) GetInt64() *int64 { + return this.Int64 +} + +func NewWilsonFromFace(that WilsonFace) *Wilson { + this := &Wilson{} + this.Int64 = that.GetInt64() + return this +} + +func (this *Castaway) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 19) + s = append(s, "&casttype.Castaway{") + if this.Int32Ptr != nil { + s = append(s, "Int32Ptr: "+valueToGoStringCasttype(this.Int32Ptr, "int32")+",\n") + } + s = append(s, "Int32: "+fmt.Sprintf("%#v", this.Int32)+",\n") + if this.MyUint64Ptr != nil { + s = append(s, "MyUint64Ptr: "+valueToGoStringCasttype(this.MyUint64Ptr, "github_com_gogo_protobuf_test_casttype.MyUint64Type")+",\n") + } + s = append(s, "MyUint64: "+fmt.Sprintf("%#v", this.MyUint64)+",\n") + if this.MyFloat32Ptr != nil { + s = append(s, "MyFloat32Ptr: "+valueToGoStringCasttype(this.MyFloat32Ptr, "github_com_gogo_protobuf_test_casttype.MyFloat32Type")+",\n") + } + s = append(s, "MyFloat32: "+fmt.Sprintf("%#v", this.MyFloat32)+",\n") + if this.MyFloat64Ptr != nil { + s = append(s, "MyFloat64Ptr: "+valueToGoStringCasttype(this.MyFloat64Ptr, "github_com_gogo_protobuf_test_casttype.MyFloat64Type")+",\n") + } + s = append(s, "MyFloat64: "+fmt.Sprintf("%#v", this.MyFloat64)+",\n") + if this.MyBytes != nil { + s = append(s, "MyBytes: "+valueToGoStringCasttype(this.MyBytes, "github_com_gogo_protobuf_test_casttype.Bytes")+",\n") + } + if this.NormalBytes != nil { + s = append(s, "NormalBytes: "+valueToGoStringCasttype(this.NormalBytes, "byte")+",\n") + } + if this.MyUint64S != nil { + s = append(s, "MyUint64S: "+fmt.Sprintf("%#v", this.MyUint64S)+",\n") + } + keysForMyMap := make([]string, 0, len(this.MyMap)) + for k := range this.MyMap { + keysForMyMap = append(keysForMyMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForMyMap) + mapStringForMyMap := "github_com_gogo_protobuf_test_casttype.MyMapType{" + for _, k := range keysForMyMap { + mapStringForMyMap += fmt.Sprintf("%#v: %#v,", k, this.MyMap[k]) + } + mapStringForMyMap += "}" + if this.MyMap != nil { + s = append(s, "MyMap: "+mapStringForMyMap+",\n") + } + keysForMyCustomMap := make([]string, 0, len(this.MyCustomMap)) + for k := range this.MyCustomMap { + keysForMyCustomMap = append(keysForMyCustomMap, string(k)) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForMyCustomMap) + mapStringForMyCustomMap := "map[github_com_gogo_protobuf_test_casttype.MyStringType]github_com_gogo_protobuf_test_casttype.MyUint64Type{" + for _, k := range keysForMyCustomMap { + mapStringForMyCustomMap += fmt.Sprintf("%#v: %#v,", k, this.MyCustomMap[github_com_gogo_protobuf_test_casttype.MyStringType(k)]) + } + mapStringForMyCustomMap += "}" + if this.MyCustomMap != nil { + s = append(s, "MyCustomMap: "+mapStringForMyCustomMap+",\n") + } + keysForMyNullableMap := make([]int32, 0, len(this.MyNullableMap)) + for k := range this.MyNullableMap { + keysForMyNullableMap = append(keysForMyNullableMap, int32(k)) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForMyNullableMap) + mapStringForMyNullableMap := "map[github_com_gogo_protobuf_test_casttype.MyInt32Type]*Wilson{" + for _, k := range keysForMyNullableMap { + mapStringForMyNullableMap += fmt.Sprintf("%#v: %#v,", k, this.MyNullableMap[github_com_gogo_protobuf_test_casttype.MyInt32Type(k)]) + } + mapStringForMyNullableMap += "}" + if this.MyNullableMap != nil { + s = append(s, "MyNullableMap: "+mapStringForMyNullableMap+",\n") + } + keysForMyEmbeddedMap := make([]int32, 0, len(this.MyEmbeddedMap)) + for k := range this.MyEmbeddedMap { + keysForMyEmbeddedMap = append(keysForMyEmbeddedMap, int32(k)) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForMyEmbeddedMap) + mapStringForMyEmbeddedMap := "map[github_com_gogo_protobuf_test_casttype.MyInt32Type]Wilson{" + for _, k := range keysForMyEmbeddedMap { + mapStringForMyEmbeddedMap += fmt.Sprintf("%#v: %#v,", k, this.MyEmbeddedMap[github_com_gogo_protobuf_test_casttype.MyInt32Type(k)]) + } + mapStringForMyEmbeddedMap += "}" + if this.MyEmbeddedMap != nil { + s = append(s, "MyEmbeddedMap: "+mapStringForMyEmbeddedMap+",\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 *Wilson) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&casttype.Wilson{") + if this.Int64 != nil { + s = append(s, "Int64: "+valueToGoStringCasttype(this.Int64, "int64")+",\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 valueToGoStringCasttype(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 extensionToGoStringCasttype(e map[int32]github_com_gogo_protobuf_proto.Extension) string { + if e == nil { + return "nil" + } + s := "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 +} +func NewPopulatedCastaway(r randyCasttype, easy bool) *Castaway { + this := &Castaway{} + if r.Intn(10) != 0 { + v1 := int32(r.Int63()) + if r.Intn(2) == 0 { + v1 *= -1 + } + this.Int32Ptr = &v1 + } + this.Int32 = int32(r.Int63()) + if r.Intn(2) == 0 { + this.Int32 *= -1 + } + if r.Intn(10) != 0 { + v2 := github_com_gogo_protobuf_test_casttype.MyUint64Type(uint64(r.Uint32())) + this.MyUint64Ptr = &v2 + } + this.MyUint64 = github_com_gogo_protobuf_test_casttype.MyUint64Type(uint64(r.Uint32())) + if r.Intn(10) != 0 { + v3 := github_com_gogo_protobuf_test_casttype.MyFloat32Type(r.Float32()) + if r.Intn(2) == 0 { + v3 *= -1 + } + this.MyFloat32Ptr = &v3 + } + this.MyFloat32 = github_com_gogo_protobuf_test_casttype.MyFloat32Type(r.Float32()) + if r.Intn(2) == 0 { + this.MyFloat32 *= -1 + } + if r.Intn(10) != 0 { + v4 := github_com_gogo_protobuf_test_casttype.MyFloat64Type(r.Float64()) + if r.Intn(2) == 0 { + v4 *= -1 + } + this.MyFloat64Ptr = &v4 + } + this.MyFloat64 = github_com_gogo_protobuf_test_casttype.MyFloat64Type(r.Float64()) + if r.Intn(2) == 0 { + this.MyFloat64 *= -1 + } + if r.Intn(10) != 0 { + v5 := r.Intn(100) + this.MyBytes = make(github_com_gogo_protobuf_test_casttype.Bytes, v5) + for i := 0; i < v5; i++ { + this.MyBytes[i] = byte(r.Intn(256)) + } + } + if r.Intn(10) != 0 { + v6 := r.Intn(100) + this.NormalBytes = make([]byte, v6) + for i := 0; i < v6; i++ { + this.NormalBytes[i] = byte(r.Intn(256)) + } + } + if r.Intn(10) != 0 { + v7 := r.Intn(10) + this.MyUint64S = make([]github_com_gogo_protobuf_test_casttype.MyUint64Type, v7) + for i := 0; i < v7; i++ { + this.MyUint64S[i] = github_com_gogo_protobuf_test_casttype.MyUint64Type(uint64(r.Uint32())) + } + } + if r.Intn(10) != 0 { + v8 := r.Intn(10) + this.MyMap = make(github_com_gogo_protobuf_test_casttype.MyMapType) + for i := 0; i < v8; i++ { + v9 := randStringCasttype(r) + this.MyMap[v9] = uint64(uint64(r.Uint32())) + } + } + if r.Intn(10) != 0 { + v10 := r.Intn(10) + this.MyCustomMap = make(map[github_com_gogo_protobuf_test_casttype.MyStringType]github_com_gogo_protobuf_test_casttype.MyUint64Type) + for i := 0; i < v10; i++ { + v11 := github_com_gogo_protobuf_test_casttype.MyStringType(randStringCasttype(r)) + this.MyCustomMap[v11] = github_com_gogo_protobuf_test_casttype.MyUint64Type(uint64(r.Uint32())) + } + } + if r.Intn(10) != 0 { + v12 := r.Intn(10) + this.MyNullableMap = make(map[github_com_gogo_protobuf_test_casttype.MyInt32Type]*Wilson) + for i := 0; i < v12; i++ { + this.MyNullableMap[github_com_gogo_protobuf_test_casttype.MyInt32Type(int32(r.Int31()))] = NewPopulatedWilson(r, easy) + } + } + if r.Intn(10) != 0 { + v13 := r.Intn(10) + this.MyEmbeddedMap = make(map[github_com_gogo_protobuf_test_casttype.MyInt32Type]Wilson) + for i := 0; i < v13; i++ { + this.MyEmbeddedMap[github_com_gogo_protobuf_test_casttype.MyInt32Type(int32(r.Int31()))] = *NewPopulatedWilson(r, easy) + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedCasttype(r, 16) + } + return this +} + +func NewPopulatedWilson(r randyCasttype, easy bool) *Wilson { + this := &Wilson{} + if r.Intn(10) != 0 { + v14 := int64(r.Int63()) + if r.Intn(2) == 0 { + v14 *= -1 + } + this.Int64 = &v14 + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedCasttype(r, 2) + } + return this +} + +type randyCasttype interface { + Float32() float32 + Float64() float64 + Int63() int64 + Int31() int32 + Uint32() uint32 + Intn(n int) int +} + +func randUTF8RuneCasttype(r randyCasttype) 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 randStringCasttype(r randyCasttype) string { + v15 := r.Intn(100) + tmps := make([]rune, v15) + for i := 0; i < v15; i++ { + tmps[i] = randUTF8RuneCasttype(r) + } + return string(tmps) +} +func randUnrecognizedCasttype(r randyCasttype, 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 = randFieldCasttype(data, r, fieldNumber, wire) + } + return data +} +func randFieldCasttype(data []byte, r randyCasttype, fieldNumber int, wire int) []byte { + key := uint32(fieldNumber)<<3 | uint32(wire) + switch wire { + case 0: + data = encodeVarintPopulateCasttype(data, uint64(key)) + v16 := r.Int63() + if r.Intn(2) == 0 { + v16 *= -1 + } + data = encodeVarintPopulateCasttype(data, uint64(v16)) + case 1: + data = encodeVarintPopulateCasttype(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 = encodeVarintPopulateCasttype(data, uint64(key)) + ll := r.Intn(100) + data = encodeVarintPopulateCasttype(data, uint64(ll)) + for j := 0; j < ll; j++ { + data = append(data, byte(r.Intn(256))) + } + default: + data = encodeVarintPopulateCasttype(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 encodeVarintPopulateCasttype(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 *Castaway) Size() (n int) { + var l int + _ = l + if m.Int32Ptr != nil { + n += 1 + sovCasttype(uint64(*m.Int32Ptr)) + } + n += 1 + sovCasttype(uint64(m.Int32)) + if m.MyUint64Ptr != nil { + n += 1 + sovCasttype(uint64(*m.MyUint64Ptr)) + } + n += 1 + sovCasttype(uint64(m.MyUint64)) + if m.MyFloat32Ptr != nil { + n += 5 + } + n += 5 + if m.MyFloat64Ptr != nil { + n += 9 + } + n += 9 + if m.MyBytes != nil { + l = len(m.MyBytes) + n += 1 + l + sovCasttype(uint64(l)) + } + if m.NormalBytes != nil { + l = len(m.NormalBytes) + n += 1 + l + sovCasttype(uint64(l)) + } + if len(m.MyUint64S) > 0 { + for _, e := range m.MyUint64S { + n += 1 + sovCasttype(uint64(e)) + } + } + if len(m.MyMap) > 0 { + for k, v := range m.MyMap { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovCasttype(uint64(len(k))) + 1 + sovCasttype(uint64(v)) + n += mapEntrySize + 1 + sovCasttype(uint64(mapEntrySize)) + } + } + if len(m.MyCustomMap) > 0 { + for k, v := range m.MyCustomMap { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovCasttype(uint64(len(k))) + 1 + sovCasttype(uint64(v)) + n += mapEntrySize + 1 + sovCasttype(uint64(mapEntrySize)) + } + } + if len(m.MyNullableMap) > 0 { + for k, v := range m.MyNullableMap { + _ = k + _ = v + l = 0 + if v != nil { + l = v.Size() + } + mapEntrySize := 1 + sovCasttype(uint64(k)) + 1 + l + sovCasttype(uint64(l)) + n += mapEntrySize + 1 + sovCasttype(uint64(mapEntrySize)) + } + } + if len(m.MyEmbeddedMap) > 0 { + for k, v := range m.MyEmbeddedMap { + _ = k + _ = v + l = v.Size() + mapEntrySize := 1 + sovCasttype(uint64(k)) + 1 + l + sovCasttype(uint64(l)) + n += mapEntrySize + 1 + sovCasttype(uint64(mapEntrySize)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *Wilson) Size() (n int) { + var l int + _ = l + if m.Int64 != nil { + n += 1 + sovCasttype(uint64(*m.Int64)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func sovCasttype(x uint64) (n int) { + for { + n++ + x >>= 7 + if x == 0 { + break + } + } + return n +} +func sozCasttype(x uint64) (n int) { + return sovCasttype(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (this *Castaway) String() string { + if this == nil { + return "nil" + } + keysForMyMap := make([]string, 0, len(this.MyMap)) + for k := range this.MyMap { + keysForMyMap = append(keysForMyMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForMyMap) + mapStringForMyMap := "github_com_gogo_protobuf_test_casttype.MyMapType{" + for _, k := range keysForMyMap { + mapStringForMyMap += fmt.Sprintf("%v: %v,", k, this.MyMap[k]) + } + mapStringForMyMap += "}" + keysForMyCustomMap := make([]string, 0, len(this.MyCustomMap)) + for k := range this.MyCustomMap { + keysForMyCustomMap = append(keysForMyCustomMap, string(k)) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForMyCustomMap) + mapStringForMyCustomMap := "map[github_com_gogo_protobuf_test_casttype.MyStringType]github_com_gogo_protobuf_test_casttype.MyUint64Type{" + for _, k := range keysForMyCustomMap { + mapStringForMyCustomMap += fmt.Sprintf("%v: %v,", k, this.MyCustomMap[github_com_gogo_protobuf_test_casttype.MyStringType(k)]) + } + mapStringForMyCustomMap += "}" + keysForMyNullableMap := make([]int32, 0, len(this.MyNullableMap)) + for k := range this.MyNullableMap { + keysForMyNullableMap = append(keysForMyNullableMap, int32(k)) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForMyNullableMap) + mapStringForMyNullableMap := "map[github_com_gogo_protobuf_test_casttype.MyInt32Type]*Wilson{" + for _, k := range keysForMyNullableMap { + mapStringForMyNullableMap += fmt.Sprintf("%v: %v,", k, this.MyNullableMap[github_com_gogo_protobuf_test_casttype.MyInt32Type(k)]) + } + mapStringForMyNullableMap += "}" + keysForMyEmbeddedMap := make([]int32, 0, len(this.MyEmbeddedMap)) + for k := range this.MyEmbeddedMap { + keysForMyEmbeddedMap = append(keysForMyEmbeddedMap, int32(k)) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForMyEmbeddedMap) + mapStringForMyEmbeddedMap := "map[github_com_gogo_protobuf_test_casttype.MyInt32Type]Wilson{" + for _, k := range keysForMyEmbeddedMap { + mapStringForMyEmbeddedMap += fmt.Sprintf("%v: %v,", k, this.MyEmbeddedMap[github_com_gogo_protobuf_test_casttype.MyInt32Type(k)]) + } + mapStringForMyEmbeddedMap += "}" + s := strings.Join([]string{`&Castaway{`, + `Int32Ptr:` + valueToStringCasttype(this.Int32Ptr) + `,`, + `Int32:` + fmt.Sprintf("%v", this.Int32) + `,`, + `MyUint64Ptr:` + valueToStringCasttype(this.MyUint64Ptr) + `,`, + `MyUint64:` + fmt.Sprintf("%v", this.MyUint64) + `,`, + `MyFloat32Ptr:` + valueToStringCasttype(this.MyFloat32Ptr) + `,`, + `MyFloat32:` + fmt.Sprintf("%v", this.MyFloat32) + `,`, + `MyFloat64Ptr:` + valueToStringCasttype(this.MyFloat64Ptr) + `,`, + `MyFloat64:` + fmt.Sprintf("%v", this.MyFloat64) + `,`, + `MyBytes:` + valueToStringCasttype(this.MyBytes) + `,`, + `NormalBytes:` + valueToStringCasttype(this.NormalBytes) + `,`, + `MyUint64S:` + fmt.Sprintf("%v", this.MyUint64S) + `,`, + `MyMap:` + mapStringForMyMap + `,`, + `MyCustomMap:` + mapStringForMyCustomMap + `,`, + `MyNullableMap:` + mapStringForMyNullableMap + `,`, + `MyEmbeddedMap:` + mapStringForMyEmbeddedMap + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *Wilson) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&Wilson{`, + `Int64:` + valueToStringCasttype(this.Int64) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func valueToStringCasttype(v interface{}) string { + rv := reflect.ValueOf(v) + if rv.IsNil() { + return "nil" + } + pv := reflect.Indirect(rv).Interface() + return fmt.Sprintf("*%v", pv) +} +func (m *Castaway) 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 ErrIntOverflowCasttypeUnsafe + } + 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: Castaway: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Castaway: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Int32Ptr", wireType) + } + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCasttypeUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Int32Ptr = &v + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Int32", wireType) + } + m.Int32 = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCasttypeUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + m.Int32 |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field MyUint64Ptr", wireType) + } + var v github_com_gogo_protobuf_test_casttype.MyUint64Type + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCasttypeUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (github_com_gogo_protobuf_test_casttype.MyUint64Type(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.MyUint64Ptr = &v + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field MyUint64", wireType) + } + m.MyUint64 = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCasttypeUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + m.MyUint64 |= (github_com_gogo_protobuf_test_casttype.MyUint64Type(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + case 5: + if wireType != 5 { + return fmt.Errorf("proto: wrong wireType = %d for field MyFloat32Ptr", wireType) + } + var v uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + iNdEx += 4 + v = uint32(data[iNdEx-4]) + v |= uint32(data[iNdEx-3]) << 8 + v |= uint32(data[iNdEx-2]) << 16 + v |= uint32(data[iNdEx-1]) << 24 + v2 := github_com_gogo_protobuf_test_casttype.MyFloat32Type(math.Float32frombits(v)) + m.MyFloat32Ptr = &v2 + case 6: + if wireType != 5 { + return fmt.Errorf("proto: wrong wireType = %d for field MyFloat32", wireType) + } + var v uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + iNdEx += 4 + v = uint32(data[iNdEx-4]) + v |= uint32(data[iNdEx-3]) << 8 + v |= uint32(data[iNdEx-2]) << 16 + v |= uint32(data[iNdEx-1]) << 24 + m.MyFloat32 = github_com_gogo_protobuf_test_casttype.MyFloat32Type(math.Float32frombits(v)) + case 7: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field MyFloat64Ptr", 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 := github_com_gogo_protobuf_test_casttype.MyFloat64Type(math.Float64frombits(v)) + m.MyFloat64Ptr = &v2 + case 8: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field MyFloat64", 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.MyFloat64 = github_com_gogo_protobuf_test_casttype.MyFloat64Type(math.Float64frombits(v)) + case 9: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MyBytes", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCasttypeUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthCasttypeUnsafe + } + postIndex := iNdEx + byteLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.MyBytes = append(m.MyBytes[:0], data[iNdEx:postIndex]...) + if m.MyBytes == nil { + m.MyBytes = []byte{} + } + iNdEx = postIndex + case 10: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NormalBytes", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCasttypeUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthCasttypeUnsafe + } + postIndex := iNdEx + byteLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.NormalBytes = append(m.NormalBytes[:0], data[iNdEx:postIndex]...) + if m.NormalBytes == nil { + m.NormalBytes = []byte{} + } + iNdEx = postIndex + case 11: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field MyUint64S", wireType) + } + var v github_com_gogo_protobuf_test_casttype.MyUint64Type + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCasttypeUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (github_com_gogo_protobuf_test_casttype.MyUint64Type(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.MyUint64S = append(m.MyUint64S, v) + case 12: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MyMap", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCasttypeUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthCasttypeUnsafe + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var keykey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCasttypeUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + keykey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var stringLenmapkey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCasttypeUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLenmapkey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapkey := int(stringLenmapkey) + if intStringLenmapkey < 0 { + return ErrInvalidLengthCasttypeUnsafe + } + postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey > l { + return io.ErrUnexpectedEOF + } + mapkey := string(data[iNdEx:postStringIndexmapkey]) + iNdEx = postStringIndexmapkey + var valuekey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCasttypeUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + valuekey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapvalue uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCasttypeUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + mapvalue |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if m.MyMap == nil { + m.MyMap = make(github_com_gogo_protobuf_test_casttype.MyMapType) + } + m.MyMap[mapkey] = mapvalue + iNdEx = postIndex + case 13: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MyCustomMap", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCasttypeUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthCasttypeUnsafe + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var keykey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCasttypeUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + keykey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var stringLenmapkey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCasttypeUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLenmapkey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapkey := int(stringLenmapkey) + if intStringLenmapkey < 0 { + return ErrInvalidLengthCasttypeUnsafe + } + postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey > l { + return io.ErrUnexpectedEOF + } + mapkey := github_com_gogo_protobuf_test_casttype.MyStringType(data[iNdEx:postStringIndexmapkey]) + iNdEx = postStringIndexmapkey + var valuekey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCasttypeUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + valuekey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapvalue uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCasttypeUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + mapvalue |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if m.MyCustomMap == nil { + m.MyCustomMap = make(map[github_com_gogo_protobuf_test_casttype.MyStringType]github_com_gogo_protobuf_test_casttype.MyUint64Type) + } + m.MyCustomMap[github_com_gogo_protobuf_test_casttype.MyStringType(mapkey)] = ((github_com_gogo_protobuf_test_casttype.MyUint64Type)(mapvalue)) + iNdEx = postIndex + case 14: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MyNullableMap", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCasttypeUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthCasttypeUnsafe + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var keykey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCasttypeUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + keykey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapkey int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCasttypeUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + mapkey |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var valuekey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCasttypeUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + valuekey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapmsglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCasttypeUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + mapmsglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if mapmsglen < 0 { + return ErrInvalidLengthCasttypeUnsafe + } + postmsgIndex := iNdEx + mapmsglen + if mapmsglen < 0 { + return ErrInvalidLengthCasttypeUnsafe + } + if postmsgIndex > l { + return io.ErrUnexpectedEOF + } + mapvalue := &Wilson{} + if err := mapvalue.Unmarshal(data[iNdEx:postmsgIndex]); err != nil { + return err + } + iNdEx = postmsgIndex + if m.MyNullableMap == nil { + m.MyNullableMap = make(map[github_com_gogo_protobuf_test_casttype.MyInt32Type]*Wilson) + } + m.MyNullableMap[github_com_gogo_protobuf_test_casttype.MyInt32Type(mapkey)] = mapvalue + iNdEx = postIndex + case 15: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MyEmbeddedMap", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCasttypeUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthCasttypeUnsafe + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var keykey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCasttypeUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + keykey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapkey int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCasttypeUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + mapkey |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var valuekey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCasttypeUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + valuekey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapmsglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCasttypeUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + mapmsglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if mapmsglen < 0 { + return ErrInvalidLengthCasttypeUnsafe + } + postmsgIndex := iNdEx + mapmsglen + if mapmsglen < 0 { + return ErrInvalidLengthCasttypeUnsafe + } + if postmsgIndex > l { + return io.ErrUnexpectedEOF + } + mapvalue := &Wilson{} + if err := mapvalue.Unmarshal(data[iNdEx:postmsgIndex]); err != nil { + return err + } + iNdEx = postmsgIndex + if m.MyEmbeddedMap == nil { + m.MyEmbeddedMap = make(map[github_com_gogo_protobuf_test_casttype.MyInt32Type]Wilson) + } + m.MyEmbeddedMap[github_com_gogo_protobuf_test_casttype.MyInt32Type(mapkey)] = *mapvalue + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipCasttypeUnsafe(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthCasttypeUnsafe + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Wilson) 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 ErrIntOverflowCasttypeUnsafe + } + 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: Wilson: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Wilson: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Int64", wireType) + } + var v int64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCasttypeUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Int64 = &v + default: + iNdEx = preIndex + skippy, err := skipCasttypeUnsafe(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthCasttypeUnsafe + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipCasttypeUnsafe(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, ErrIntOverflowCasttypeUnsafe + } + 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, ErrIntOverflowCasttypeUnsafe + } + 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, ErrIntOverflowCasttypeUnsafe + } + 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, ErrInvalidLengthCasttypeUnsafe + } + return iNdEx, nil + case 3: + for { + var innerWire uint64 + var start int = iNdEx + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowCasttypeUnsafe + } + 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 := skipCasttypeUnsafe(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 ( + ErrInvalidLengthCasttypeUnsafe = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowCasttypeUnsafe = fmt.Errorf("proto: integer overflow") +) + +var fileDescriptorCasttype = []byte{ + // 676 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xa4, 0x95, 0x3b, 0x6f, 0xd3, 0x50, + 0x14, 0xc7, 0xeb, 0xa6, 0x6e, 0xed, 0xeb, 0x04, 0xaa, 0x2b, 0x06, 0xab, 0x12, 0x69, 0xd4, 0xaa, + 0xc0, 0x00, 0x49, 0x95, 0x46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 0xfa, 0xed, 0x16, 0xc1, 0x95, + 0xc0, 0x75, 0x42, 0xb9, 0x0f, 0x6e, 0x4b, 0xff, 0x14, 0x18, 0x18, 0x7e, 0x90, 0x6d, 0x2c, 0x89, + 0x7e, 0x01, 0x03, 0x4d, 0xb2, 0x33, 0x16, 0xde, 0x44, 0x42, 0xb2, 0x28, 0x4f, 0x50, 0xee, 0x83, + 0x58, 0x42, 0x21, 0xb6, 0x90, 0xb0, 0xf1, 0x6b, 0x54, 0x56, 0xa3, 0xc7, 0x96, 0xab, 0xc7, 0x35, + 0xe0, 0x01, 0x3e, 0xae, 0x74, 0x00, 0xdc, 0x1a, 0x19, 0x1c, 0x87, 0x53, 0x72, 0xd9, 0xce, 0xd1, + 0xf0, 0x2b, 0x24, 0xa6, 0xcb, 0xf2, 0x24, 0x45, 0x3f, 0x8c, 0x75, 0x17, 0xc3, 0x8b, 0x29, 0x3e, + 0xa7, 0x9c, 0x95, 0x7b, 0x0a, 0xf0, 0x5c, 0x11, 0xe5, 0x71, 0x4d, 0x12, 0xe5, 0xac, 0xe0, 0x99, + 0x72, 0xa8, 0xb8, 0x40, 0xd1, 0x05, 0x95, 0xc7, 0x78, 0x31, 0xc5, 0xe3, 0x27, 0x68, 0x4a, 0x8d, + 0x94, 0x08, 0xbc, 0x65, 0x11, 0xc8, 0x65, 0x65, 0x11, 0xa8, 0x77, 0x47, 0xa4, 0xd2, 0x38, 0x6d, + 0xca, 0x66, 0x00, 0x5c, 0x43, 0xd2, 0xba, 0xeb, 0xd9, 0xba, 0xc5, 0x78, 0x88, 0xf0, 0x34, 0xc9, + 0xc9, 0xa6, 0xf0, 0x06, 0xd9, 0x09, 0xfb, 0xda, 0xbe, 0x2c, 0xd5, 0x4a, 0x57, 0x39, 0x93, 0x62, + 0x72, 0x6e, 0x7c, 0x6c, 0x22, 0x5e, 0x8d, 0x54, 0x7d, 0x20, 0x97, 0x01, 0x29, 0x35, 0x6f, 0xd6, + 0xd3, 0x88, 0xe4, 0x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4d, 0xd3, 0xf2, 0x5d, 0xe7, 0x1c, 0xf3, + 0x6c, 0xb9, 0xae, 0xc6, 0x9c, 0xab, 0xa2, 0x49, 0x36, 0x49, 0xf6, 0xb2, 0x46, 0x5f, 0x7b, 0xfa, + 0x53, 0xa2, 0x7f, 0x98, 0x76, 0x4b, 0x79, 0x3a, 0x3c, 0xac, 0x8e, 0xfd, 0x04, 0xfb, 0x05, 0x76, + 0x70, 0x58, 0xe5, 0x8e, 0xc1, 0x4e, 0xc0, 0x4e, 0xc1, 0x76, 0x8f, 0xaa, 0xdc, 0x17, 0xb0, 0xaf, + 0x60, 0xdf, 0xc1, 0x7e, 0x80, 0x0d, 0x8f, 0xc0, 0x1f, 0xec, 0x00, 0xfa, 0xc7, 0xd0, 0x9e, 0x40, + 0x7b, 0x0a, 0xed, 0xee, 0xef, 0x2a, 0xf7, 0x37, 0x00, 0x00, 0xff, 0xff, 0x32, 0x04, 0x75, 0xf8, + 0x6b, 0x07, 0x00, 0x00, +} diff --git a/vendor/github.com/gogo/protobuf/test/casttype/combos/unsafeunmarshaler/casttype.proto b/vendor/github.com/gogo/protobuf/test/casttype/combos/unsafeunmarshaler/casttype.proto new file mode 100644 index 000000000..753b839cd --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/casttype/combos/unsafeunmarshaler/casttype.proto @@ -0,0 +1,77 @@ +// Copyright (c) 2015, Vastech SA (PTY) LTD. All rights reserved. +// http://github.com/gogo/protobuf/gogoproto +// +// 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 casttype; + +import "github.com/gogo/protobuf/gogoproto/gogo.proto"; + +option (gogoproto.goproto_stringer_all) = false; +option (gogoproto.goproto_enum_prefix_all) = false; +option (gogoproto.goproto_getters_all) = false; + +option (gogoproto.equal_all) = true; +option (gogoproto.verbose_equal_all) = true; +option (gogoproto.stringer_all) = true; +option (gogoproto.gostring_all) = true; +option (gogoproto.face_all) = true; +option (gogoproto.description_all) = true; + +option (gogoproto.testgen_all) = true; +option (gogoproto.populate_all) = true; +option (gogoproto.benchgen_all) = true; +option (gogoproto.unmarshaler_all) = false; +option (gogoproto.marshaler_all) = false; +option (gogoproto.sizer_all) = true; + +option (gogoproto.goproto_enum_stringer_all) = false; +option (gogoproto.enum_stringer_all) = true; + +option (gogoproto.unsafe_marshaler_all) = false; +option (gogoproto.unsafe_unmarshaler_all) = true; + +message Castaway { + optional int64 Int32Ptr = 1 [(gogoproto.casttype) = "int32"]; + optional int64 Int32 = 2 [(gogoproto.casttype) = "int32", (gogoproto.nullable) = false]; + optional uint64 MyUint64Ptr = 3 [(gogoproto.casttype) = "github.com/gogo/protobuf/test/casttype.MyUint64Type"]; + optional uint64 MyUint64 = 4 [(gogoproto.casttype) = "github.com/gogo/protobuf/test/casttype.MyUint64Type", (gogoproto.nullable) = false]; + optional float MyFloat32Ptr = 5 [(gogoproto.casttype) = "github.com/gogo/protobuf/test/casttype.MyFloat32Type"]; + optional float MyFloat32 = 6 [(gogoproto.casttype) = "github.com/gogo/protobuf/test/casttype.MyFloat32Type", (gogoproto.nullable) = false]; + optional double MyFloat64Ptr = 7 [(gogoproto.casttype) = "github.com/gogo/protobuf/test/casttype.MyFloat64Type"]; + optional double MyFloat64 = 8 [(gogoproto.casttype) = "github.com/gogo/protobuf/test/casttype.MyFloat64Type", (gogoproto.nullable) = false]; + optional bytes MyBytes = 9 [(gogoproto.casttype) = "github.com/gogo/protobuf/test/casttype.Bytes"]; + optional bytes NormalBytes = 10; + repeated uint64 MyUint64s = 11 [(gogoproto.casttype) = "github.com/gogo/protobuf/test/casttype.MyUint64Type"]; + map MyMap = 12 [(gogoproto.casttype) = "github.com/gogo/protobuf/test/casttype.MyMapType"]; + map MyCustomMap = 13 [(gogoproto.castkey) = "github.com/gogo/protobuf/test/casttype.MyStringType", (gogoproto.castvalue) = "github.com/gogo/protobuf/test/casttype.MyUint64Type"]; + map MyNullableMap = 14 [(gogoproto.castkey) = "github.com/gogo/protobuf/test/casttype.MyInt32Type"]; + map MyEmbeddedMap = 15 [(gogoproto.castkey) = "github.com/gogo/protobuf/test/casttype.MyInt32Type", (gogoproto.nullable) = false]; +} + +message Wilson { + optional int64 Int64 = 1; +} diff --git a/vendor/github.com/gogo/protobuf/test/casttype/combos/unsafeunmarshaler/casttypepb_test.go b/vendor/github.com/gogo/protobuf/test/casttype/combos/unsafeunmarshaler/casttypepb_test.go new file mode 100644 index 000000000..94f855845 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/casttype/combos/unsafeunmarshaler/casttypepb_test.go @@ -0,0 +1,457 @@ +// Code generated by protoc-gen-gogo. +// source: combos/unsafeunmarshaler/casttype.proto +// DO NOT EDIT! + +/* +Package casttype is a generated protocol buffer package. + +It is generated from these files: + combos/unsafeunmarshaler/casttype.proto + +It has these top-level messages: + Castaway + Wilson +*/ +package casttype + +import testing "testing" +import math_rand "math/rand" +import time "time" +import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" +import github_com_gogo_protobuf_jsonpb "github.com/gogo/protobuf/jsonpb" +import fmt "fmt" +import go_parser "go/parser" +import proto "github.com/gogo/protobuf/proto" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +func TestCastawayProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCastaway(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Castaway{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkCastawayProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Castaway, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedCastaway(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkCastawayProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedCastaway(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &Castaway{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestWilsonProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedWilson(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Wilson{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkWilsonProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Wilson, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedWilson(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkWilsonProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedWilson(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &Wilson{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestCastawayJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCastaway(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Castaway{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestWilsonJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedWilson(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Wilson{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestCastawayProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCastaway(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &Castaway{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestCastawayProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCastaway(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &Castaway{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestWilsonProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedWilson(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &Wilson{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestWilsonProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedWilson(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &Wilson{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestCasttypeDescription(t *testing.T) { + CasttypeDescription() +} +func TestCastawayVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCastaway(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &Castaway{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestWilsonVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedWilson(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &Wilson{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestCastawayFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCastaway(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestWilsonFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedWilson(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestCastawayGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCastaway(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestWilsonGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedWilson(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestCastawaySize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCastaway(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkCastawaySize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Castaway, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedCastaway(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestWilsonSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedWilson(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkWilsonSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Wilson, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedWilson(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestCastawayStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCastaway(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestWilsonStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedWilson(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} + +//These tests are generated by github.com/gogo/protobuf/plugin/testgen diff --git a/vendor/github.com/gogo/protobuf/test/casttype/mytypes.go b/vendor/github.com/gogo/protobuf/test/casttype/mytypes.go new file mode 100644 index 000000000..ce7587859 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/casttype/mytypes.go @@ -0,0 +1,57 @@ +// Copyright (c) 2013, Vastech SA (PTY) LTD. All rights reserved. +// http://github.com/gogo/protobuf/gogoproto +// +// 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 casttype + +import ( + "encoding/json" +) + +type MyInt32Type int32 +type MyFloat32Type float32 + +type MyUint64Type uint64 +type MyFloat64Type float64 + +type Bytes []byte + +func (this Bytes) MarshalJSON() ([]byte, error) { + return json.Marshal([]byte(this)) +} + +func (this *Bytes) UnmarshalJSON(data []byte) error { + v := new([]byte) + err := json.Unmarshal(data, v) + if err != nil { + return err + } + *this = *v + return nil +} + +type MyStringType string + +type MyMapType map[string]uint64 diff --git a/vendor/github.com/gogo/protobuf/test/castvalue/Makefile b/vendor/github.com/gogo/protobuf/test/castvalue/Makefile new file mode 100644 index 000000000..e9894788c --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/castvalue/Makefile @@ -0,0 +1,39 @@ +# Extensions for Protocol Buffers to create more go like structures. +# +# Copyright (c) 2013, Vastech SA (PTY) LTD. 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: + rm -rf combos + go install github.com/gogo/protobuf/protoc-gen-combo + protoc-min-version --version="3.0.0" --gogo_out=. --proto_path=../../../../../:../../protobuf/:. castvalue.proto + protoc-gen-combo --default=false --version="3.0.0" --proto_path=../../../../../:../../protobuf/:. castvalue.proto + cp mytypes.go ./combos/both/ || true + cp mytypes.go ./combos/marshaler/ || true + cp mytypes.go ./combos/unmarshaler/ || true + cp mytypes.go ./combos/unsafeboth/ || true + cp mytypes.go ./combos/unsafemarshaler/ || true + cp mytypes.go ./combos/unsafeunmarshaler/ || true diff --git a/vendor/github.com/gogo/protobuf/test/castvalue/castvalue.pb.go b/vendor/github.com/gogo/protobuf/test/castvalue/castvalue.pb.go new file mode 100644 index 000000000..b1b3c9bc1 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/castvalue/castvalue.pb.go @@ -0,0 +1,856 @@ +// Code generated by protoc-gen-gogo. +// source: castvalue.proto +// DO NOT EDIT! + +/* +Package castvalue is a generated protocol buffer package. + +It is generated from these files: + castvalue.proto + +It has these top-level messages: + Castaway + Wilson +*/ +package castvalue + +import proto "github.com/gogo/protobuf/proto" +import fmt "fmt" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" + +import github_com_gogo_protobuf_protoc_gen_gogo_descriptor "github.com/gogo/protobuf/protoc-gen-gogo/descriptor" +import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" +import compress_gzip "compress/gzip" +import bytes "bytes" +import io_ioutil "io/ioutil" + +import strings "strings" +import sort "sort" +import strconv "strconv" +import reflect "reflect" +import github_com_gogo_protobuf_sortkeys "github.com/gogo/protobuf/sortkeys" + +// 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. +const _ = proto.GoGoProtoPackageIsVersion1 + +type Castaway struct { + CastMapValueMessage map[int32]MyWilson `protobuf:"bytes,1,rep,name=CastMapValueMessage,json=castMapValueMessage,castvalue=MyWilson,castvaluetype=castvalue.Wilson" json:"CastMapValueMessage" protobuf_key:"varint,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + CastMapValueMessageNullable map[int32]*MyWilson `protobuf:"bytes,2,rep,name=CastMapValueMessageNullable,json=castMapValueMessageNullable,castvalue=MyWilson,castvaluetype=castvalue.Wilson" json:"CastMapValueMessageNullable,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *Castaway) Reset() { *m = Castaway{} } +func (*Castaway) ProtoMessage() {} +func (*Castaway) Descriptor() ([]byte, []int) { return fileDescriptorCastvalue, []int{0} } + +type Wilson struct { + Int64 *int64 `protobuf:"varint,1,opt,name=Int64,json=int64" json:"Int64,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *Wilson) Reset() { *m = Wilson{} } +func (*Wilson) ProtoMessage() {} +func (*Wilson) Descriptor() ([]byte, []int) { return fileDescriptorCastvalue, []int{1} } + +func init() { + proto.RegisterType((*Castaway)(nil), "castvalue.Castaway") + proto.RegisterType((*Wilson)(nil), "castvalue.Wilson") +} +func (this *Castaway) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return CastvalueDescription() +} +func (this *Wilson) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return CastvalueDescription() +} +func CastvalueDescription() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + d := &github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet{} + var gzipped = []byte{ + // 3462 bytes of a gzipped FileDescriptorSet + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xcc, 0x5a, 0x6b, 0x6c, 0x23, 0x57, + 0xf5, 0x5f, 0xc7, 0x76, 0x62, 0x1f, 0x3b, 0x8e, 0x33, 0x49, 0x77, 0xbd, 0xd9, 0x76, 0x1f, 0xee, + 0x63, 0xb7, 0xdb, 0x36, 0xdb, 0xff, 0xfe, 0xfb, 0xd8, 0xba, 0xff, 0x7f, 0xab, 0x3c, 0xbc, 0xa9, + 0x57, 0x79, 0x31, 0x89, 0xdb, 0xdd, 0xf2, 0x61, 0x34, 0x19, 0xdf, 0x38, 0xde, 0x1d, 0xcf, 0x18, + 0xcf, 0x78, 0x77, 0xd3, 0x4f, 0x45, 0x2d, 0xa0, 0x82, 0x78, 0x23, 0xd1, 0x37, 0xb4, 0x12, 0xb4, +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03, 0x54, 0x8b, 0xab, 0x59, 0xde, 0x30, 0xdb, 0x56, + 0x3e, 0x0c, 0x23, 0x17, 0x88, 0x7e, 0xce, 0xaf, 0x9a, 0x62, 0xaa, 0x19, 0x2a, 0xf6, 0x29, 0xce, + 0x40, 0xba, 0x4e, 0x1c, 0x07, 0x3b, 0xa0, 0xb9, 0x9b, 0x0d, 0x92, 0x8b, 0xb1, 0xd1, 0x1f, 0xec, + 0x1a, 0x7d, 0xe7, 0xc8, 0x53, 0x02, 0xb5, 0x8a, 0x20, 0x65, 0x0a, 0x92, 0xc4, 0x6a, 0xd5, 0x39, + 0x43, 0x7c, 0x0b, 0xfb, 0x15, 0x51, 0xa3, 0x93, 0x25, 0x41, 0x61, 0x82, 0x62, 0xc8, 0x21, 0xcd, + 0xf3, 0x35, 0x83, 0xe4, 0x06, 0x19, 0xc1, 0xe1, 0x2e, 0x82, 0x15, 0xde, 0xde, 0xc9, 0x21, 0x71, + 0x38, 0x94, 0x24, 0xb9, 0xe8, 0x12, 0xcb, 0xa9, 0xd9, 0x56, 0x6e, 0x88, 0x91, 0x5c, 0xdd, 0x63, + 0x16, 0x89, 0x59, 0xe9, 0xa4, 0x68, 0xe3, 0x94, 0x5b, 0x60, 0xc8, 0x6e, 0xb8, 0x78, 0xe7, 0xe4, + 0x12, 0x38, 0x3f, 0xa9, 0xe3, 0x97, 0xf7, 0x74, 0x84, 0x25, 0xae, 0xa3, 0x4a, 0x65, 0xa5, 0x04, + 0x59, 0xc7, 0x6e, 0x35, 0x0d, 0xa2, 0x19, 0x76, 0x85, 0x68, 0x35, 0x6b, 0xdd, 0xce, 0x25, 0x19, + 0xc1, 0x81, 0xee, 0x81, 0x30, 0xc5, 0x19, 0xd4, 0x2b, 0xa1, 0x9a, 0x9a, 0x71, 0x02, 0xcf, 0xca, + 0x6e, 0x18, 0x74, 0x36, 0x2d, 0x57, 0xbf, 0x98, 0x4b, 0x33, 0x0f, 0x11, 0x4f, 0xf9, 0x7f, 0xc4, +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c, 0x45, 0x7e, 0x3f, 0x0c, 0x72, 0x21, 0xfd, 0x1d, 0x5b, + 0xc9, 0x72, 0x6f, 0xb9, 0x89, 0x51, 0x45, 0xd5, 0x78, 0x8d, 0x3e, 0x4c, 0xcf, 0xbf, 0xfc, 0xea, + 0xfe, 0x5d, 0xbf, 0xc0, 0xeb, 0xd7, 0x78, 0xbd, 0xf2, 0xea, 0xfe, 0xc8, 0x1b, 0x78, 0xbd, 0x85, + 0xd7, 0xdb, 0x78, 0xdd, 0xff, 0xda, 0xfe, 0xc8, 0xb3, 0x78, 0x3d, 0x8f, 0xd7, 0x0f, 0xf1, 0x7a, + 0x11, 0xaf, 0x97, 0x5f, 0x43, 0x7d, 0xbc, 0x5e, 0xc1, 0xfb, 0x37, 0xf0, 0xff, 0x5b, 0xf8, 0xff, + 0x6d, 0xfc, 0x7f, 0xff, 0xef, 0xf7, 0xef, 0xfa, 0x57, 0x00, 0x00, 0x00, 0xff, 0xff, 0xf8, 0x6d, + 0x34, 0xdd, 0xea, 0x2c, 0x00, 0x00, + } + r := bytes.NewReader(gzipped) + gzipr, err := compress_gzip.NewReader(r) + if err != nil { + panic(err) + } + ungzipped, err := io_ioutil.ReadAll(gzipr) + if err != nil { + panic(err) + } + if err := github_com_gogo_protobuf_proto.Unmarshal(ungzipped, d); err != nil { + panic(err) + } + return d +} +func (this *Castaway) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*Castaway) + if !ok { + that2, ok := that.(Castaway) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *Castaway") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *Castaway but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *Castaway but is not nil && this == nil") + } + if len(this.CastMapValueMessage) != len(that1.CastMapValueMessage) { + return fmt.Errorf("CastMapValueMessage this(%v) Not Equal that(%v)", len(this.CastMapValueMessage), len(that1.CastMapValueMessage)) + } + for i := range this.CastMapValueMessage { + a := (Wilson)(this.CastMapValueMessage[i]) + b := (Wilson)(that1.CastMapValueMessage[i]) + if !(&a).Equal(&b) { + return fmt.Errorf("CastMapValueMessage this[%v](%v) Not Equal that[%v](%v)", i, this.CastMapValueMessage[i], i, that1.CastMapValueMessage[i]) + } + } + if len(this.CastMapValueMessageNullable) != len(that1.CastMapValueMessageNullable) { + return fmt.Errorf("CastMapValueMessageNullable this(%v) Not Equal that(%v)", len(this.CastMapValueMessageNullable), len(that1.CastMapValueMessageNullable)) + } + for i := range this.CastMapValueMessageNullable { + a := (*Wilson)(this.CastMapValueMessageNullable[i]) + b := (*Wilson)(that1.CastMapValueMessageNullable[i]) + if !a.Equal(b) { + return fmt.Errorf("CastMapValueMessageNullable this[%v](%v) Not Equal that[%v](%v)", i, this.CastMapValueMessageNullable[i], i, that1.CastMapValueMessageNullable[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *Castaway) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*Castaway) + if !ok { + that2, ok := that.(Castaway) + 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.CastMapValueMessage) != len(that1.CastMapValueMessage) { + return false + } + for i := range this.CastMapValueMessage { + a := (Wilson)(this.CastMapValueMessage[i]) + b := (Wilson)(that1.CastMapValueMessage[i]) + if !(&a).Equal(&b) { + return false + } + } + if len(this.CastMapValueMessageNullable) != len(that1.CastMapValueMessageNullable) { + return false + } + for i := range this.CastMapValueMessageNullable { + a := (*Wilson)(this.CastMapValueMessageNullable[i]) + b := (*Wilson)(that1.CastMapValueMessageNullable[i]) + if !a.Equal(b) { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *Wilson) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*Wilson) + if !ok { + that2, ok := that.(Wilson) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *Wilson") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *Wilson but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *Wilson but is not nil && this == nil") + } + if this.Int64 != nil && that1.Int64 != nil { + if *this.Int64 != *that1.Int64 { + return fmt.Errorf("Int64 this(%v) Not Equal that(%v)", *this.Int64, *that1.Int64) + } + } else if this.Int64 != nil { + return fmt.Errorf("this.Int64 == nil && that.Int64 != nil") + } else if that1.Int64 != nil { + return fmt.Errorf("Int64 this(%v) Not Equal that(%v)", this.Int64, that1.Int64) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *Wilson) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*Wilson) + if !ok { + that2, ok := that.(Wilson) + 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.Int64 != nil && that1.Int64 != nil { + if *this.Int64 != *that1.Int64 { + return false + } + } else if this.Int64 != nil { + return false + } else if that1.Int64 != nil { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} + +type CastawayFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetCastMapValueMessage() map[int32]MyWilson + GetCastMapValueMessageNullable() map[int32]*MyWilson +} + +func (this *Castaway) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *Castaway) TestProto() github_com_gogo_protobuf_proto.Message { + return NewCastawayFromFace(this) +} + +func (this *Castaway) GetCastMapValueMessage() map[int32]MyWilson { + return this.CastMapValueMessage +} + +func (this *Castaway) GetCastMapValueMessageNullable() map[int32]*MyWilson { + return this.CastMapValueMessageNullable +} + +func NewCastawayFromFace(that CastawayFace) *Castaway { + this := &Castaway{} + this.CastMapValueMessage = that.GetCastMapValueMessage() + this.CastMapValueMessageNullable = that.GetCastMapValueMessageNullable() + return this +} + +type WilsonFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetInt64() *int64 +} + +func (this *Wilson) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *Wilson) TestProto() github_com_gogo_protobuf_proto.Message { + return NewWilsonFromFace(this) +} + +func (this *Wilson) GetInt64() *int64 { + return this.Int64 +} + +func NewWilsonFromFace(that WilsonFace) *Wilson { + this := &Wilson{} + this.Int64 = that.GetInt64() + return this +} + +func (this *Castaway) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 6) + s = append(s, "&castvalue.Castaway{") + keysForCastMapValueMessage := make([]int32, 0, len(this.CastMapValueMessage)) + for k := range this.CastMapValueMessage { + keysForCastMapValueMessage = append(keysForCastMapValueMessage, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForCastMapValueMessage) + mapStringForCastMapValueMessage := "map[int32]MyWilson{" + for _, k := range keysForCastMapValueMessage { + mapStringForCastMapValueMessage += fmt.Sprintf("%#v: %#v,", k, this.CastMapValueMessage[k]) + } + mapStringForCastMapValueMessage += "}" + if this.CastMapValueMessage != nil { + s = append(s, "CastMapValueMessage: "+mapStringForCastMapValueMessage+",\n") + } + keysForCastMapValueMessageNullable := make([]int32, 0, len(this.CastMapValueMessageNullable)) + for k := range this.CastMapValueMessageNullable { + keysForCastMapValueMessageNullable = append(keysForCastMapValueMessageNullable, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForCastMapValueMessageNullable) + mapStringForCastMapValueMessageNullable := "map[int32]*MyWilson{" + for _, k := range keysForCastMapValueMessageNullable { + mapStringForCastMapValueMessageNullable += fmt.Sprintf("%#v: %#v,", k, this.CastMapValueMessageNullable[k]) + } + mapStringForCastMapValueMessageNullable += "}" + if this.CastMapValueMessageNullable != nil { + s = append(s, "CastMapValueMessageNullable: "+mapStringForCastMapValueMessageNullable+",\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 *Wilson) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&castvalue.Wilson{") + if this.Int64 != nil { + s = append(s, "Int64: "+valueToGoStringCastvalue(this.Int64, "int64")+",\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 valueToGoStringCastvalue(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 extensionToGoStringCastvalue(e map[int32]github_com_gogo_protobuf_proto.Extension) string { + if e == nil { + return "nil" + } + s := "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 +} +func NewPopulatedCastaway(r randyCastvalue, easy bool) *Castaway { + this := &Castaway{} + if r.Intn(10) != 0 { + v1 := r.Intn(10) + this.CastMapValueMessage = make(map[int32]MyWilson) + for i := 0; i < v1; i++ { + this.CastMapValueMessage[int32(r.Int31())] = (MyWilson)(*NewPopulatedWilson(r, easy)) + } + } + if r.Intn(10) != 0 { + v2 := r.Intn(10) + this.CastMapValueMessageNullable = make(map[int32]*MyWilson) + for i := 0; i < v2; i++ { + this.CastMapValueMessageNullable[int32(r.Int31())] = (*MyWilson)(NewPopulatedWilson(r, easy)) + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedCastvalue(r, 3) + } + return this +} + +func NewPopulatedWilson(r randyCastvalue, easy bool) *Wilson { + this := &Wilson{} + if r.Intn(10) != 0 { + v3 := int64(r.Int63()) + if r.Intn(2) == 0 { + v3 *= -1 + } + this.Int64 = &v3 + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedCastvalue(r, 2) + } + return this +} + +type randyCastvalue interface { + Float32() float32 + Float64() float64 + Int63() int64 + Int31() int32 + Uint32() uint32 + Intn(n int) int +} + +func randUTF8RuneCastvalue(r randyCastvalue) 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 randStringCastvalue(r randyCastvalue) string { + v4 := r.Intn(100) + tmps := make([]rune, v4) + for i := 0; i < v4; i++ { + tmps[i] = randUTF8RuneCastvalue(r) + } + return string(tmps) +} +func randUnrecognizedCastvalue(r randyCastvalue, 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 = randFieldCastvalue(data, r, fieldNumber, wire) + } + return data +} +func randFieldCastvalue(data []byte, r randyCastvalue, fieldNumber int, wire int) []byte { + key := uint32(fieldNumber)<<3 | uint32(wire) + switch wire { + case 0: + data = encodeVarintPopulateCastvalue(data, uint64(key)) + v5 := r.Int63() + if r.Intn(2) == 0 { + v5 *= -1 + } + data = encodeVarintPopulateCastvalue(data, uint64(v5)) + case 1: + data = encodeVarintPopulateCastvalue(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 = encodeVarintPopulateCastvalue(data, uint64(key)) + ll := r.Intn(100) + data = encodeVarintPopulateCastvalue(data, uint64(ll)) + for j := 0; j < ll; j++ { + data = append(data, byte(r.Intn(256))) + } + default: + data = encodeVarintPopulateCastvalue(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 encodeVarintPopulateCastvalue(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 *Castaway) Size() (n int) { + var l int + _ = l + if len(m.CastMapValueMessage) > 0 { + for k, v := range m.CastMapValueMessage { + _ = k + _ = v + l = ((*Wilson)(&v)).Size() + mapEntrySize := 1 + sovCastvalue(uint64(k)) + 1 + l + sovCastvalue(uint64(l)) + n += mapEntrySize + 1 + sovCastvalue(uint64(mapEntrySize)) + } + } + if len(m.CastMapValueMessageNullable) > 0 { + for k, v := range m.CastMapValueMessageNullable { + _ = k + _ = v + l = 0 + if v != nil { + l = ((*Wilson)(v)).Size() + } + mapEntrySize := 1 + sovCastvalue(uint64(k)) + 1 + l + sovCastvalue(uint64(l)) + n += mapEntrySize + 1 + sovCastvalue(uint64(mapEntrySize)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *Wilson) Size() (n int) { + var l int + _ = l + if m.Int64 != nil { + n += 1 + sovCastvalue(uint64(*m.Int64)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func sovCastvalue(x uint64) (n int) { + for { + n++ + x >>= 7 + if x == 0 { + break + } + } + return n +} +func sozCastvalue(x uint64) (n int) { + return sovCastvalue(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (this *Castaway) String() string { + if this == nil { + return "nil" + } + keysForCastMapValueMessage := make([]int32, 0, len(this.CastMapValueMessage)) + for k := range this.CastMapValueMessage { + keysForCastMapValueMessage = append(keysForCastMapValueMessage, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForCastMapValueMessage) + mapStringForCastMapValueMessage := "map[int32]MyWilson{" + for _, k := range keysForCastMapValueMessage { + mapStringForCastMapValueMessage += fmt.Sprintf("%v: %v,", k, this.CastMapValueMessage[k]) + } + mapStringForCastMapValueMessage += "}" + keysForCastMapValueMessageNullable := make([]int32, 0, len(this.CastMapValueMessageNullable)) + for k := range this.CastMapValueMessageNullable { + keysForCastMapValueMessageNullable = append(keysForCastMapValueMessageNullable, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForCastMapValueMessageNullable) + mapStringForCastMapValueMessageNullable := "map[int32]*MyWilson{" + for _, k := range keysForCastMapValueMessageNullable { + mapStringForCastMapValueMessageNullable += fmt.Sprintf("%v: %v,", k, this.CastMapValueMessageNullable[k]) + } + mapStringForCastMapValueMessageNullable += "}" + s := strings.Join([]string{`&Castaway{`, + `CastMapValueMessage:` + mapStringForCastMapValueMessage + `,`, + `CastMapValueMessageNullable:` + mapStringForCastMapValueMessageNullable + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *Wilson) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&Wilson{`, + `Int64:` + valueToStringCastvalue(this.Int64) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func valueToStringCastvalue(v interface{}) string { + rv := reflect.ValueOf(v) + if rv.IsNil() { + return "nil" + } + pv := reflect.Indirect(rv).Interface() + return fmt.Sprintf("*%v", pv) +} + +var fileDescriptorCastvalue = []byte{ + // 322 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xe2, 0xe2, 0x4f, 0x4e, 0x2c, 0x2e, + 0x29, 0x4b, 0xcc, 0x29, 0x4d, 0xd5, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0xe2, 0x84, 0x0b, 0x48, + 0xe9, 0xa6, 0x67, 0x96, 0x64, 0x94, 0x26, 0xe9, 0x25, 0xe7, 0xe7, 0xea, 0xa7, 0xe7, 0xa7, 0xe7, + 0xeb, 0x83, 0x55, 0x24, 0x95, 0xa6, 0x81, 0x79, 0x60, 0x0e, 0x98, 0x05, 0xd1, 0xa9, 0x74, 0x90, + 0x99, 0x8b, 0xc3, 0x19, 0xa8, 0x39, 0xb1, 0x3c, 0xb1, 0x52, 0xa8, 0x80, 0x4b, 0x18, 0xc4, 0xf6, + 0x4d, 0x2c, 0x08, 0x03, 0x99, 0xe5, 0x9b, 0x5a, 0x5c, 0x9c, 0x98, 0x9e, 0x2a, 0xc1, 0xa8, 0xc0, + 0xac, 0xc1, 0x6d, 0xa4, 0xa3, 0x87, 0xb0, 0x15, 0xa6, 0x43, 0x0f, 0x8b, 0x72, 0xd7, 0xbc, 0x92, + 0xa2, 0x4a, 0x27, 0x81, 0x13, 0xf7, 0xe4, 0x19, 0xba, 0xee, 0xcb, 0x73, 0xf8, 0x56, 0x86, 0x67, + 0xe6, 0x14, 0xe7, 0xe7, 0x05, 0x09, 0x27, 0x63, 0xaa, 0x15, 0x6a, 0x61, 0xe4, 0x92, 0xc6, 0x62, + 0x86, 0x5f, 0x69, 0x4e, 0x4e, 0x62, 0x52, 0x4e, 0xaa, 0x04, 0x13, 0xd8, 0x6a, 0x13, 0x22, 0xad, + 0x86, 0x69, 0x83, 0x38, 0x81, 0x07, 0xc5, 0x7a, 0xe9, 0x64, 0xdc, 0xea, 0xa5, 0x22, 0xb9, 0x24, + 0x70, 0xf9, 0x44, 0x48, 0x80, 0x8b, 0x39, 0x3b, 0xb5, 0x12, 0x18, 0x08, 0x8c, 0x1a, 0xac, 0x41, + 0x20, 0xa6, 0x90, 0x3a, 0x17, 0x2b, 0xd8, 0x2d, 0x40, 0xd7, 0x31, 0x02, 0x5d, 0x27, 0x88, 0xe4, + 0x3a, 0xa8, 0x65, 0x10, 0x79, 0x2b, 0x26, 0x0b, 0x46, 0xa9, 0x44, 0x2e, 0x05, 0x42, 0x2e, 0xa5, + 0xd0, 0x0a, 0x25, 0x39, 0x2e, 0x36, 0x88, 0xa0, 0x90, 0x08, 0x17, 0xab, 0x67, 0x5e, 0x89, 0x99, + 0x09, 0xd8, 0x28, 0xe6, 0x20, 0xd6, 0x4c, 0x10, 0xc7, 0xc9, 0xe7, 0xc4, 0x43, 0x39, 0x86, 0x0b, + 0x40, 0x7c, 0x03, 0x88, 0x1f, 0x3c, 0x94, 0x63, 0x7c, 0x01, 0xc4, 0x1f, 0x80, 0xf8, 0x07, 0x10, + 0x37, 0x3c, 0x92, 0x63, 0x5c, 0x01, 0xc4, 0x1b, 0x80, 0x78, 0x07, 0x10, 0x1f, 0x00, 0xe2, 0x13, + 0x8f, 0x80, 0xea, 0x81, 0xf8, 0x01, 0x90, 0xfd, 0x02, 0x48, 0x7f, 0x00, 0xd2, 0x3f, 0x80, 0x74, + 0xc3, 0x63, 0x39, 0x06, 0x40, 0x00, 0x00, 0x00, 0xff, 0xff, 0xad, 0x1f, 0x01, 0x78, 0x7d, 0x02, + 0x00, 0x00, +} diff --git a/vendor/github.com/gogo/protobuf/test/castvalue/castvalue.proto b/vendor/github.com/gogo/protobuf/test/castvalue/castvalue.proto new file mode 100644 index 000000000..15997ce0a --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/castvalue/castvalue.proto @@ -0,0 +1,64 @@ +// Copyright (c) 2015, Vastech SA (PTY) LTD. All rights reserved. +// http://github.com/gogo/protobuf/gogoproto +// +// 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 castvalue; + +import "github.com/gogo/protobuf/gogoproto/gogo.proto"; + +option (gogoproto.goproto_stringer_all) = false; +option (gogoproto.goproto_enum_prefix_all) = false; +option (gogoproto.goproto_getters_all) = false; + +option (gogoproto.equal_all) = true; +option (gogoproto.verbose_equal_all) = true; +option (gogoproto.stringer_all) = true; +option (gogoproto.gostring_all) = true; +option (gogoproto.face_all) = true; +option (gogoproto.description_all) = true; + +option (gogoproto.testgen_all) = true; +option (gogoproto.populate_all) = true; +option (gogoproto.benchgen_all) = true; +option (gogoproto.unmarshaler_all) = false; +option (gogoproto.marshaler_all) = false; +option (gogoproto.sizer_all) = true; + +option (gogoproto.goproto_enum_stringer_all) = false; +option (gogoproto.enum_stringer_all) = true; + +option (gogoproto.unsafe_marshaler_all) = false; +option (gogoproto.unsafe_unmarshaler_all) = false; + +message Castaway { + map CastMapValueMessage = 1 [(gogoproto.castvalue) = "MyWilson", (gogoproto.nullable) = false]; + map CastMapValueMessageNullable = 2 [(gogoproto.castvalue) = "MyWilson"]; +} + +message Wilson { + optional int64 Int64 = 1; +} diff --git a/vendor/github.com/gogo/protobuf/test/castvalue/castvaluepb_test.go b/vendor/github.com/gogo/protobuf/test/castvalue/castvaluepb_test.go new file mode 100644 index 000000000..2c97a9d05 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/castvalue/castvaluepb_test.go @@ -0,0 +1,457 @@ +// Code generated by protoc-gen-gogo. +// source: castvalue.proto +// DO NOT EDIT! + +/* +Package castvalue is a generated protocol buffer package. + +It is generated from these files: + castvalue.proto + +It has these top-level messages: + Castaway + Wilson +*/ +package castvalue + +import testing "testing" +import math_rand "math/rand" +import time "time" +import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" +import github_com_gogo_protobuf_jsonpb "github.com/gogo/protobuf/jsonpb" +import fmt "fmt" +import go_parser "go/parser" +import proto "github.com/gogo/protobuf/proto" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +func TestCastawayProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCastaway(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Castaway{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkCastawayProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Castaway, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedCastaway(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkCastawayProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedCastaway(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &Castaway{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestWilsonProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedWilson(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Wilson{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkWilsonProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Wilson, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedWilson(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkWilsonProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedWilson(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &Wilson{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestCastawayJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCastaway(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Castaway{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestWilsonJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedWilson(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Wilson{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestCastawayProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCastaway(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &Castaway{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestCastawayProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCastaway(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &Castaway{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestWilsonProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedWilson(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &Wilson{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestWilsonProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedWilson(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &Wilson{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestCastvalueDescription(t *testing.T) { + CastvalueDescription() +} +func TestCastawayVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCastaway(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &Castaway{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestWilsonVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedWilson(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &Wilson{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestCastawayFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCastaway(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestWilsonFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedWilson(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestCastawayGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCastaway(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestWilsonGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedWilson(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestCastawaySize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCastaway(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkCastawaySize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Castaway, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedCastaway(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestWilsonSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedWilson(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkWilsonSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Wilson, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedWilson(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestCastawayStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCastaway(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestWilsonStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedWilson(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} + +//These tests are generated by github.com/gogo/protobuf/plugin/testgen diff --git a/vendor/github.com/gogo/protobuf/test/castvalue/combos/both/castvalue.pb.go b/vendor/github.com/gogo/protobuf/test/castvalue/combos/both/castvalue.pb.go new file mode 100644 index 000000000..c422d779f --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/castvalue/combos/both/castvalue.pb.go @@ -0,0 +1,1417 @@ +// Code generated by protoc-gen-gogo. +// source: combos/both/castvalue.proto +// DO NOT EDIT! + +/* + Package castvalue is a generated protocol buffer package. + + It is generated from these files: + combos/both/castvalue.proto + + It has these top-level messages: + Castaway + Wilson +*/ +package castvalue + +import proto "github.com/gogo/protobuf/proto" +import fmt "fmt" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" + +import github_com_gogo_protobuf_protoc_gen_gogo_descriptor "github.com/gogo/protobuf/protoc-gen-gogo/descriptor" +import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" +import compress_gzip "compress/gzip" +import bytes "bytes" +import io_ioutil "io/ioutil" + +import strings "strings" +import sort "sort" +import strconv "strconv" +import reflect "reflect" +import github_com_gogo_protobuf_sortkeys "github.com/gogo/protobuf/sortkeys" + +import errors "errors" + +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. +const _ = proto.GoGoProtoPackageIsVersion1 + +type Castaway struct { + CastMapValueMessage map[int32]MyWilson `protobuf:"bytes,1,rep,name=CastMapValueMessage,json=castMapValueMessage,castvalue=MyWilson,castvaluetype=castvalue.Wilson" json:"CastMapValueMessage" protobuf_key:"varint,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + CastMapValueMessageNullable map[int32]*MyWilson `protobuf:"bytes,2,rep,name=CastMapValueMessageNullable,json=castMapValueMessageNullable,castvalue=MyWilson,castvaluetype=castvalue.Wilson" json:"CastMapValueMessageNullable,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *Castaway) Reset() { *m = Castaway{} } +func (*Castaway) ProtoMessage() {} +func (*Castaway) Descriptor() ([]byte, []int) { return fileDescriptorCastvalue, []int{0} } + +type Wilson struct { + Int64 *int64 `protobuf:"varint,1,opt,name=Int64,json=int64" json:"Int64,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *Wilson) Reset() { *m = Wilson{} } +func (*Wilson) ProtoMessage() {} +func (*Wilson) Descriptor() ([]byte, []int) { return fileDescriptorCastvalue, []int{1} } + +func init() { + proto.RegisterType((*Castaway)(nil), "castvalue.Castaway") + proto.RegisterType((*Wilson)(nil), "castvalue.Wilson") +} +func (this *Castaway) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return CastvalueDescription() +} +func (this *Wilson) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return CastvalueDescription() +} +func CastvalueDescription() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + d := &github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet{} + var gzipped = []byte{ + // 3472 bytes of a gzipped FileDescriptorSet + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xcc, 0x5a, 0x6b, 0x6c, 0x23, 0xd5, + 0xf5, 0x5f, 0xc7, 0x76, 0x62, 0x1f, 0x3b, 0x8e, 0x33, 0x09, 0xbb, 0xde, 0x2c, 0x64, 0x77, 0xcd, + 0x63, 0x97, 0x05, 0x12, 0xfe, 0xfb, 0xe7, 0xb1, 0x98, 0xff, 0x1f, 0x94, 0x87, 0x37, 0x78, 0x95, + 0x57, 0x27, 0x09, 0xec, 0xd2, 0x0f, 0xa3, 0xc9, 0xf8, 0xc6, 0xf1, 0xee, 0x78, 0xc6, 0xf5, 0x8c, + 0x77, 0x37, 0x7c, 0xa2, 0x82, 0xb6, 0xa2, 0x55, 0xdf, 0x95, 0xca, 0xbb, 0x05, 0xa9, 0x85, 0xd2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99, 0x76, 0x70, 0x0b, 0xde, 0x0b, 0xcd, + 0xb7, 0xe4, 0x4c, 0x33, 0x00, 0x05, 0x9f, 0x81, 0xfd, 0x5d, 0x43, 0x7d, 0x0f, 0x64, 0xdf, 0x16, + 0x64, 0x7b, 0xbb, 0x84, 0x7b, 0x11, 0x12, 0x76, 0x4b, 0xf9, 0x1d, 0x19, 0x12, 0x48, 0x1b, 0xd7, + 0x32, 0x2d, 0x63, 0x1d, 0x7d, 0x63, 0x77, 0x56, 0xfb, 0xae, 0xb4, 0x1a, 0xc7, 0x06, 0xac, 0xb6, + 0x0a, 0x7b, 0x05, 0xe3, 0xee, 0xe6, 0xf5, 0x79, 0x19, 0x58, 0x39, 0x7a, 0x2d, 0x38, 0xbb, 0x1f, + 0x86, 0x31, 0xcf, 0x9c, 0xb2, 0x02, 0x73, 0x34, 0x7a, 0x30, 0x10, 0xce, 0xfc, 0x82, 0x60, 0x96, + 0x11, 0xdf, 0x2b, 0xe1, 0x9c, 0x05, 0xbd, 0x4e, 0xc9, 0x4f, 0x43, 0x4e, 0x92, 0x37, 0x2d, 0x2c, + 0xf0, 0xed, 0x8a, 0x85, 0xd3, 0x58, 0xee, 0x81, 0xfa, 0x7b, 0x6d, 0x53, 0xb5, 0xe6, 0x83, 0x53, + 0xe6, 0x12, 0x64, 0xbd, 0x7a, 0x43, 0xab, 0xd6, 0xea, 0x36, 0x96, 0x96, 0x3b, 0x33, 0x7e, 0x5f, + 0xce, 0x94, 0x87, 0x2b, 0x31, 0x58, 0xa1, 0x08, 0x19, 0xf6, 0xd8, 0xab, 0x4b, 0xfe, 0x40, 0x10, + 0x0d, 0xb6, 0x50, 0x22, 0x70, 0x60, 0xa5, 0x84, 0x35, 0x6f, 0x2f, 0xf1, 0xef, 0x87, 0x32, 0x70, + 0x08, 0x08, 0xf7, 0xbe, 0xa1, 0xb6, 0x4c, 0xac, 0x84, 0x7d, 0x7e, 0xcd, 0x7d, 0xf4, 0x92, 0x58, + 0xb3, 0xc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0x27, 0x5e, 0xc6, 0xdb, 0x0b, 0x7d, 0x27, 0x22, 0x63, 0x3a, 0x1c, 0x0a, 0xeb, 0xe9, 0xbf, + 0xf9, 0x8a, 0xfc, 0x38, 0xf4, 0x73, 0x21, 0xfd, 0x4d, 0x5b, 0xc9, 0x72, 0x6f, 0xb9, 0x89, 0x51, + 0x45, 0xd5, 0x78, 0x95, 0x3e, 0x4c, 0xcf, 0xbf, 0xfc, 0xda, 0xf8, 0x9e, 0x57, 0xf0, 0xfa, 0x0d, + 0x5e, 0xaf, 0xbe, 0x36, 0x1e, 0x79, 0x13, 0xaf, 0xb7, 0xf1, 0x7a, 0x07, 0xaf, 0xfb, 0x5f, 0x1f, + 0x8f, 0x3c, 0x8b, 0xd7, 0xf3, 0x78, 0xfd, 0x18, 0xaf, 0x17, 0xf1, 0x7a, 0x19, 0xaf, 0x57, 0xf0, + 0x7a, 0x15, 0xaf, 0x37, 0x5f, 0x1f, 0xdf, 0xf3, 0x36, 0xfe, 0x7f, 0x07, 0xff, 0xdf, 0xff, 0x87, + 0xf1, 0x3d, 0xff, 0x0a, 0x00, 0x00, 0xff, 0xff, 0x19, 0x45, 0x03, 0x58, 0xf6, 0x2c, 0x00, 0x00, + } + r := bytes.NewReader(gzipped) + gzipr, err := compress_gzip.NewReader(r) + if err != nil { + panic(err) + } + ungzipped, err := io_ioutil.ReadAll(gzipr) + if err != nil { + panic(err) + } + if err := github_com_gogo_protobuf_proto.Unmarshal(ungzipped, d); err != nil { + panic(err) + } + return d +} +func (this *Castaway) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*Castaway) + if !ok { + that2, ok := that.(Castaway) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *Castaway") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *Castaway but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *Castaway but is not nil && this == nil") + } + if len(this.CastMapValueMessage) != len(that1.CastMapValueMessage) { + return fmt.Errorf("CastMapValueMessage this(%v) Not Equal that(%v)", len(this.CastMapValueMessage), len(that1.CastMapValueMessage)) + } + for i := range this.CastMapValueMessage { + a := (Wilson)(this.CastMapValueMessage[i]) + b := (Wilson)(that1.CastMapValueMessage[i]) + if !(&a).Equal(&b) { + return fmt.Errorf("CastMapValueMessage this[%v](%v) Not Equal that[%v](%v)", i, this.CastMapValueMessage[i], i, that1.CastMapValueMessage[i]) + } + } + if len(this.CastMapValueMessageNullable) != len(that1.CastMapValueMessageNullable) { + return fmt.Errorf("CastMapValueMessageNullable this(%v) Not Equal that(%v)", len(this.CastMapValueMessageNullable), len(that1.CastMapValueMessageNullable)) + } + for i := range this.CastMapValueMessageNullable { + a := (*Wilson)(this.CastMapValueMessageNullable[i]) + b := (*Wilson)(that1.CastMapValueMessageNullable[i]) + if !a.Equal(b) { + return fmt.Errorf("CastMapValueMessageNullable this[%v](%v) Not Equal that[%v](%v)", i, this.CastMapValueMessageNullable[i], i, that1.CastMapValueMessageNullable[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *Castaway) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*Castaway) + if !ok { + that2, ok := that.(Castaway) + 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.CastMapValueMessage) != len(that1.CastMapValueMessage) { + return false + } + for i := range this.CastMapValueMessage { + a := (Wilson)(this.CastMapValueMessage[i]) + b := (Wilson)(that1.CastMapValueMessage[i]) + if !(&a).Equal(&b) { + return false + } + } + if len(this.CastMapValueMessageNullable) != len(that1.CastMapValueMessageNullable) { + return false + } + for i := range this.CastMapValueMessageNullable { + a := (*Wilson)(this.CastMapValueMessageNullable[i]) + b := (*Wilson)(that1.CastMapValueMessageNullable[i]) + if !a.Equal(b) { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *Wilson) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*Wilson) + if !ok { + that2, ok := that.(Wilson) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *Wilson") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *Wilson but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *Wilson but is not nil && this == nil") + } + if this.Int64 != nil && that1.Int64 != nil { + if *this.Int64 != *that1.Int64 { + return fmt.Errorf("Int64 this(%v) Not Equal that(%v)", *this.Int64, *that1.Int64) + } + } else if this.Int64 != nil { + return fmt.Errorf("this.Int64 == nil && that.Int64 != nil") + } else if that1.Int64 != nil { + return fmt.Errorf("Int64 this(%v) Not Equal that(%v)", this.Int64, that1.Int64) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *Wilson) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*Wilson) + if !ok { + that2, ok := that.(Wilson) + 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.Int64 != nil && that1.Int64 != nil { + if *this.Int64 != *that1.Int64 { + return false + } + } else if this.Int64 != nil { + return false + } else if that1.Int64 != nil { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} + +type CastawayFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetCastMapValueMessage() map[int32]MyWilson + GetCastMapValueMessageNullable() map[int32]*MyWilson +} + +func (this *Castaway) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *Castaway) TestProto() github_com_gogo_protobuf_proto.Message { + return NewCastawayFromFace(this) +} + +func (this *Castaway) GetCastMapValueMessage() map[int32]MyWilson { + return this.CastMapValueMessage +} + +func (this *Castaway) GetCastMapValueMessageNullable() map[int32]*MyWilson { + return this.CastMapValueMessageNullable +} + +func NewCastawayFromFace(that CastawayFace) *Castaway { + this := &Castaway{} + this.CastMapValueMessage = that.GetCastMapValueMessage() + this.CastMapValueMessageNullable = that.GetCastMapValueMessageNullable() + return this +} + +type WilsonFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetInt64() *int64 +} + +func (this *Wilson) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *Wilson) TestProto() github_com_gogo_protobuf_proto.Message { + return NewWilsonFromFace(this) +} + +func (this *Wilson) GetInt64() *int64 { + return this.Int64 +} + +func NewWilsonFromFace(that WilsonFace) *Wilson { + this := &Wilson{} + this.Int64 = that.GetInt64() + return this +} + +func (this *Castaway) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 6) + s = append(s, "&castvalue.Castaway{") + keysForCastMapValueMessage := make([]int32, 0, len(this.CastMapValueMessage)) + for k := range this.CastMapValueMessage { + keysForCastMapValueMessage = append(keysForCastMapValueMessage, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForCastMapValueMessage) + mapStringForCastMapValueMessage := "map[int32]MyWilson{" + for _, k := range keysForCastMapValueMessage { + mapStringForCastMapValueMessage += fmt.Sprintf("%#v: %#v,", k, this.CastMapValueMessage[k]) + } + mapStringForCastMapValueMessage += "}" + if this.CastMapValueMessage != nil { + s = append(s, "CastMapValueMessage: "+mapStringForCastMapValueMessage+",\n") + } + keysForCastMapValueMessageNullable := make([]int32, 0, len(this.CastMapValueMessageNullable)) + for k := range this.CastMapValueMessageNullable { + keysForCastMapValueMessageNullable = append(keysForCastMapValueMessageNullable, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForCastMapValueMessageNullable) + mapStringForCastMapValueMessageNullable := "map[int32]*MyWilson{" + for _, k := range keysForCastMapValueMessageNullable { + mapStringForCastMapValueMessageNullable += fmt.Sprintf("%#v: %#v,", k, this.CastMapValueMessageNullable[k]) + } + mapStringForCastMapValueMessageNullable += "}" + if this.CastMapValueMessageNullable != nil { + s = append(s, "CastMapValueMessageNullable: "+mapStringForCastMapValueMessageNullable+",\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 *Wilson) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&castvalue.Wilson{") + if this.Int64 != nil { + s = append(s, "Int64: "+valueToGoStringCastvalue(this.Int64, "int64")+",\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 valueToGoStringCastvalue(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 extensionToGoStringCastvalue(e map[int32]github_com_gogo_protobuf_proto.Extension) string { + if e == nil { + return "nil" + } + s := "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 +} +func (m *Castaway) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *Castaway) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.CastMapValueMessage) > 0 { + for k := range m.CastMapValueMessage { + data[i] = 0xa + i++ + v := m.CastMapValueMessage[k] + msgSize := ((*Wilson)(&v)).Size() + mapSize := 1 + sovCastvalue(uint64(k)) + 1 + msgSize + sovCastvalue(uint64(msgSize)) + i = encodeVarintCastvalue(data, i, uint64(mapSize)) + data[i] = 0x8 + i++ + i = encodeVarintCastvalue(data, i, uint64(k)) + data[i] = 0x12 + i++ + i = encodeVarintCastvalue(data, i, uint64(((*Wilson)(&v)).Size())) + n1, err := ((*Wilson)(&v)).MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n1 + } + } + if len(m.CastMapValueMessageNullable) > 0 { + for k := range m.CastMapValueMessageNullable { + data[i] = 0x12 + i++ + v := m.CastMapValueMessageNullable[k] + if v == nil { + return 0, errors.New("proto: map has nil element") + } + msgSize := ((*Wilson)(v)).Size() + mapSize := 1 + sovCastvalue(uint64(k)) + 1 + msgSize + sovCastvalue(uint64(msgSize)) + i = encodeVarintCastvalue(data, i, uint64(mapSize)) + data[i] = 0x8 + i++ + i = encodeVarintCastvalue(data, i, uint64(k)) + data[i] = 0x12 + i++ + i = encodeVarintCastvalue(data, i, uint64(((*Wilson)(v)).Size())) + n2, err := ((*Wilson)(v)).MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n2 + } + } + if m.XXX_unrecognized != nil { + i += copy(data[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *Wilson) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *Wilson) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Int64 != nil { + data[i] = 0x8 + i++ + i = encodeVarintCastvalue(data, i, uint64(*m.Int64)) + } + if m.XXX_unrecognized != nil { + i += copy(data[i:], m.XXX_unrecognized) + } + return i, nil +} + +func encodeFixed64Castvalue(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 encodeFixed32Castvalue(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 encodeVarintCastvalue(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 NewPopulatedCastaway(r randyCastvalue, easy bool) *Castaway { + this := &Castaway{} + if r.Intn(10) != 0 { + v1 := r.Intn(10) + this.CastMapValueMessage = make(map[int32]MyWilson) + for i := 0; i < v1; i++ { + this.CastMapValueMessage[int32(r.Int31())] = (MyWilson)(*NewPopulatedWilson(r, easy)) + } + } + if r.Intn(10) != 0 { + v2 := r.Intn(10) + this.CastMapValueMessageNullable = make(map[int32]*MyWilson) + for i := 0; i < v2; i++ { + this.CastMapValueMessageNullable[int32(r.Int31())] = (*MyWilson)(NewPopulatedWilson(r, easy)) + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedCastvalue(r, 3) + } + return this +} + +func NewPopulatedWilson(r randyCastvalue, easy bool) *Wilson { + this := &Wilson{} + if r.Intn(10) != 0 { + v3 := int64(r.Int63()) + if r.Intn(2) == 0 { + v3 *= -1 + } + this.Int64 = &v3 + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedCastvalue(r, 2) + } + return this +} + +type randyCastvalue interface { + Float32() float32 + Float64() float64 + Int63() int64 + Int31() int32 + Uint32() uint32 + Intn(n int) int +} + +func randUTF8RuneCastvalue(r randyCastvalue) 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 randStringCastvalue(r randyCastvalue) string { + v4 := r.Intn(100) + tmps := make([]rune, v4) + for i := 0; i < v4; i++ { + tmps[i] = randUTF8RuneCastvalue(r) + } + return string(tmps) +} +func randUnrecognizedCastvalue(r randyCastvalue, 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 = randFieldCastvalue(data, r, fieldNumber, wire) + } + return data +} +func randFieldCastvalue(data []byte, r randyCastvalue, fieldNumber int, wire int) []byte { + key := uint32(fieldNumber)<<3 | uint32(wire) + switch wire { + case 0: + data = encodeVarintPopulateCastvalue(data, uint64(key)) + v5 := r.Int63() + if r.Intn(2) == 0 { + v5 *= -1 + } + data = encodeVarintPopulateCastvalue(data, uint64(v5)) + case 1: + data = encodeVarintPopulateCastvalue(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 = encodeVarintPopulateCastvalue(data, uint64(key)) + ll := r.Intn(100) + data = encodeVarintPopulateCastvalue(data, uint64(ll)) + for j := 0; j < ll; j++ { + data = append(data, byte(r.Intn(256))) + } + default: + data = encodeVarintPopulateCastvalue(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 encodeVarintPopulateCastvalue(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 *Castaway) Size() (n int) { + var l int + _ = l + if len(m.CastMapValueMessage) > 0 { + for k, v := range m.CastMapValueMessage { + _ = k + _ = v + l = ((*Wilson)(&v)).Size() + mapEntrySize := 1 + sovCastvalue(uint64(k)) + 1 + l + sovCastvalue(uint64(l)) + n += mapEntrySize + 1 + sovCastvalue(uint64(mapEntrySize)) + } + } + if len(m.CastMapValueMessageNullable) > 0 { + for k, v := range m.CastMapValueMessageNullable { + _ = k + _ = v + l = 0 + if v != nil { + l = ((*Wilson)(v)).Size() + } + mapEntrySize := 1 + sovCastvalue(uint64(k)) + 1 + l + sovCastvalue(uint64(l)) + n += mapEntrySize + 1 + sovCastvalue(uint64(mapEntrySize)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *Wilson) Size() (n int) { + var l int + _ = l + if m.Int64 != nil { + n += 1 + sovCastvalue(uint64(*m.Int64)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func sovCastvalue(x uint64) (n int) { + for { + n++ + x >>= 7 + if x == 0 { + break + } + } + return n +} +func sozCastvalue(x uint64) (n int) { + return sovCastvalue(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (this *Castaway) String() string { + if this == nil { + return "nil" + } + keysForCastMapValueMessage := make([]int32, 0, len(this.CastMapValueMessage)) + for k := range this.CastMapValueMessage { + keysForCastMapValueMessage = append(keysForCastMapValueMessage, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForCastMapValueMessage) + mapStringForCastMapValueMessage := "map[int32]MyWilson{" + for _, k := range keysForCastMapValueMessage { + mapStringForCastMapValueMessage += fmt.Sprintf("%v: %v,", k, this.CastMapValueMessage[k]) + } + mapStringForCastMapValueMessage += "}" + keysForCastMapValueMessageNullable := make([]int32, 0, len(this.CastMapValueMessageNullable)) + for k := range this.CastMapValueMessageNullable { + keysForCastMapValueMessageNullable = append(keysForCastMapValueMessageNullable, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForCastMapValueMessageNullable) + mapStringForCastMapValueMessageNullable := "map[int32]*MyWilson{" + for _, k := range keysForCastMapValueMessageNullable { + mapStringForCastMapValueMessageNullable += fmt.Sprintf("%v: %v,", k, this.CastMapValueMessageNullable[k]) + } + mapStringForCastMapValueMessageNullable += "}" + s := strings.Join([]string{`&Castaway{`, + `CastMapValueMessage:` + mapStringForCastMapValueMessage + `,`, + `CastMapValueMessageNullable:` + mapStringForCastMapValueMessageNullable + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *Wilson) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&Wilson{`, + `Int64:` + valueToStringCastvalue(this.Int64) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func valueToStringCastvalue(v interface{}) string { + rv := reflect.ValueOf(v) + if rv.IsNil() { + return "nil" + } + pv := reflect.Indirect(rv).Interface() + return fmt.Sprintf("*%v", pv) +} +func (m *Castaway) 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 ErrIntOverflowCastvalue + } + 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: Castaway: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Castaway: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field CastMapValueMessage", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCastvalue + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthCastvalue + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var keykey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCastvalue + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + keykey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapkey int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCastvalue + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + mapkey |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var valuekey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCastvalue + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + valuekey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapmsglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCastvalue + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + mapmsglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if mapmsglen < 0 { + return ErrInvalidLengthCastvalue + } + postmsgIndex := iNdEx + mapmsglen + if mapmsglen < 0 { + return ErrInvalidLengthCastvalue + } + if postmsgIndex > l { + return io.ErrUnexpectedEOF + } + mapvalue := &Wilson{} + if err := mapvalue.Unmarshal(data[iNdEx:postmsgIndex]); err != nil { + return err + } + iNdEx = postmsgIndex + if m.CastMapValueMessage == nil { + m.CastMapValueMessage = make(map[int32]MyWilson) + } + m.CastMapValueMessage[mapkey] = ((MyWilson)(*mapvalue)) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field CastMapValueMessageNullable", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCastvalue + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthCastvalue + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var keykey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCastvalue + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + keykey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapkey int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCastvalue + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + mapkey |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var valuekey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCastvalue + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + valuekey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapmsglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCastvalue + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + mapmsglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if mapmsglen < 0 { + return ErrInvalidLengthCastvalue + } + postmsgIndex := iNdEx + mapmsglen + if mapmsglen < 0 { + return ErrInvalidLengthCastvalue + } + if postmsgIndex > l { + return io.ErrUnexpectedEOF + } + mapvalue := &Wilson{} + if err := mapvalue.Unmarshal(data[iNdEx:postmsgIndex]); err != nil { + return err + } + iNdEx = postmsgIndex + if m.CastMapValueMessageNullable == nil { + m.CastMapValueMessageNullable = make(map[int32]*MyWilson) + } + m.CastMapValueMessageNullable[mapkey] = ((*MyWilson)(mapvalue)) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipCastvalue(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthCastvalue + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Wilson) 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 ErrIntOverflowCastvalue + } + 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: Wilson: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Wilson: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Int64", wireType) + } + var v int64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCastvalue + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Int64 = &v + default: + iNdEx = preIndex + skippy, err := skipCastvalue(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthCastvalue + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipCastvalue(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, ErrIntOverflowCastvalue + } + 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, ErrIntOverflowCastvalue + } + 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, ErrIntOverflowCastvalue + } + 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, ErrInvalidLengthCastvalue + } + return iNdEx, nil + case 3: + for { + var innerWire uint64 + var start int = iNdEx + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowCastvalue + } + 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 := skipCastvalue(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 ( + ErrInvalidLengthCastvalue = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowCastvalue = fmt.Errorf("proto: integer overflow") +) + +var fileDescriptorCastvalue = []byte{ + // 333 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xe2, 0x92, 0x4e, 0xce, 0xcf, 0x4d, + 0xca, 0x2f, 0xd6, 0x4f, 0xca, 0x2f, 0xc9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, 0x17, + 0x2b, 0xd8, 0x2d, 0x40, 0xd7, 0x31, 0x02, 0x5d, 0x27, 0x88, 0xe4, 0x3a, 0xa8, 0x65, 0x10, 0x79, + 0x2b, 0x26, 0x0b, 0x46, 0xa9, 0x44, 0x2e, 0x05, 0x42, 0x2e, 0xa5, 0xd0, 0x0a, 0x25, 0x39, 0x2e, + 0x36, 0x88, 0xa0, 0x90, 0x08, 0x17, 0xab, 0x67, 0x5e, 0x89, 0x99, 0x09, 0xd8, 0x28, 0xe6, 0x20, + 0xd6, 0x4c, 0x10, 0xc7, 0xc9, 0xe7, 0xc4, 0x43, 0x39, 0x86, 0x0b, 0x40, 0x7c, 0x03, 0x88, 0x1f, + 0x3c, 0x94, 0x63, 0x7c, 0x01, 0xc4, 0x1f, 0x80, 0xf8, 0x07, 0x10, 0x37, 0x3c, 0x92, 0x63, 0x5c, + 0x01, 0xc4, 0x1b, 0x80, 0x78, 0x07, 0x10, 0x1f, 0x00, 0xe2, 0x13, 0x40, 0x7c, 0x01, 0x88, 0x1f, + 0x00, 0xf1, 0x8b, 0x47, 0x72, 0x0c, 0x1f, 0x80, 0xf4, 0x0f, 0x20, 0xdd, 0xf0, 0x58, 0x8e, 0x01, + 0x10, 0x00, 0x00, 0xff, 0xff, 0x05, 0x74, 0x6c, 0x99, 0x89, 0x02, 0x00, 0x00, +} diff --git a/vendor/github.com/gogo/protobuf/test/castvalue/combos/both/castvalue.proto b/vendor/github.com/gogo/protobuf/test/castvalue/combos/both/castvalue.proto new file mode 100644 index 000000000..557d20f18 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/castvalue/combos/both/castvalue.proto @@ -0,0 +1,64 @@ +// Copyright (c) 2015, Vastech SA (PTY) LTD. All rights reserved. +// http://github.com/gogo/protobuf/gogoproto +// +// 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 castvalue; + +import "github.com/gogo/protobuf/gogoproto/gogo.proto"; + +option (gogoproto.goproto_stringer_all) = false; +option (gogoproto.goproto_enum_prefix_all) = false; +option (gogoproto.goproto_getters_all) = false; + +option (gogoproto.equal_all) = true; +option (gogoproto.verbose_equal_all) = true; +option (gogoproto.stringer_all) = true; +option (gogoproto.gostring_all) = true; +option (gogoproto.face_all) = true; +option (gogoproto.description_all) = true; + +option (gogoproto.testgen_all) = true; +option (gogoproto.populate_all) = true; +option (gogoproto.benchgen_all) = true; +option (gogoproto.unmarshaler_all) = true; +option (gogoproto.marshaler_all) = true; +option (gogoproto.sizer_all) = true; + +option (gogoproto.goproto_enum_stringer_all) = false; +option (gogoproto.enum_stringer_all) = true; + +option (gogoproto.unsafe_marshaler_all) = false; +option (gogoproto.unsafe_unmarshaler_all) = false; + +message Castaway { + map CastMapValueMessage = 1 [(gogoproto.castvalue) = "MyWilson", (gogoproto.nullable) = false]; + map CastMapValueMessageNullable = 2 [(gogoproto.castvalue) = "MyWilson"]; +} + +message Wilson { + optional int64 Int64 = 1; +} diff --git a/vendor/github.com/gogo/protobuf/test/castvalue/combos/both/castvaluepb_test.go b/vendor/github.com/gogo/protobuf/test/castvalue/combos/both/castvaluepb_test.go new file mode 100644 index 000000000..2ce3ed65b --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/castvalue/combos/both/castvaluepb_test.go @@ -0,0 +1,513 @@ +// Code generated by protoc-gen-gogo. +// source: combos/both/castvalue.proto +// DO NOT EDIT! + +/* +Package castvalue is a generated protocol buffer package. + +It is generated from these files: + combos/both/castvalue.proto + +It has these top-level messages: + Castaway + Wilson +*/ +package castvalue + +import testing "testing" +import math_rand "math/rand" +import time "time" +import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" +import github_com_gogo_protobuf_jsonpb "github.com/gogo/protobuf/jsonpb" +import fmt "fmt" +import go_parser "go/parser" +import proto "github.com/gogo/protobuf/proto" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +func TestCastawayProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCastaway(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Castaway{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestCastawayMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCastaway(popr, false) + size := p.Size() + data := make([]byte, size) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(data) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Castaway{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkCastawayProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Castaway, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedCastaway(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkCastawayProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedCastaway(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &Castaway{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestWilsonProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedWilson(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Wilson{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestWilsonMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedWilson(popr, false) + size := p.Size() + data := make([]byte, size) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(data) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Wilson{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkWilsonProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Wilson, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedWilson(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkWilsonProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedWilson(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &Wilson{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestCastawayJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCastaway(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Castaway{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestWilsonJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedWilson(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Wilson{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestCastawayProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCastaway(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &Castaway{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestCastawayProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCastaway(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &Castaway{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestWilsonProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedWilson(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &Wilson{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestWilsonProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedWilson(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &Wilson{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestCastvalueDescription(t *testing.T) { + CastvalueDescription() +} +func TestCastawayVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCastaway(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &Castaway{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestWilsonVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedWilson(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &Wilson{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestCastawayFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCastaway(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestWilsonFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedWilson(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestCastawayGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCastaway(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestWilsonGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedWilson(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestCastawaySize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCastaway(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkCastawaySize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Castaway, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedCastaway(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestWilsonSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedWilson(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkWilsonSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Wilson, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedWilson(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestCastawayStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCastaway(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestWilsonStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedWilson(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} + +//These tests are generated by github.com/gogo/protobuf/plugin/testgen diff --git a/vendor/github.com/gogo/protobuf/test/castvalue/combos/both/mytypes.go b/vendor/github.com/gogo/protobuf/test/castvalue/combos/both/mytypes.go new file mode 100644 index 000000000..9892212c4 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/castvalue/combos/both/mytypes.go @@ -0,0 +1,31 @@ +// Extensions for Protocol Buffers to create more go like structures. +// +// Copyright (c) 2013, Vastech SA (PTY) LTD. All rights reserved. +// http://github.com/gogo/protobuf/gogoproto +// +// 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 castvalue + +type MyWilson Wilson diff --git a/vendor/github.com/gogo/protobuf/test/castvalue/combos/marshaler/castvalue.pb.go b/vendor/github.com/gogo/protobuf/test/castvalue/combos/marshaler/castvalue.pb.go new file mode 100644 index 000000000..9a61ad019 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/castvalue/combos/marshaler/castvalue.pb.go @@ -0,0 +1,978 @@ +// Code generated by protoc-gen-gogo. +// source: combos/marshaler/castvalue.proto +// DO NOT EDIT! + +/* +Package castvalue is a generated protocol buffer package. + +It is generated from these files: + combos/marshaler/castvalue.proto + +It has these top-level messages: + Castaway + Wilson +*/ +package castvalue + +import proto "github.com/gogo/protobuf/proto" +import fmt "fmt" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" + +import github_com_gogo_protobuf_protoc_gen_gogo_descriptor "github.com/gogo/protobuf/protoc-gen-gogo/descriptor" +import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" +import compress_gzip "compress/gzip" +import bytes "bytes" +import io_ioutil "io/ioutil" + +import strings "strings" +import sort "sort" +import strconv "strconv" +import reflect "reflect" +import github_com_gogo_protobuf_sortkeys "github.com/gogo/protobuf/sortkeys" + +import errors "errors" + +// 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. +const _ = proto.GoGoProtoPackageIsVersion1 + +type Castaway struct { + CastMapValueMessage map[int32]MyWilson `protobuf:"bytes,1,rep,name=CastMapValueMessage,json=castMapValueMessage,castvalue=MyWilson,castvaluetype=castvalue.Wilson" json:"CastMapValueMessage" protobuf_key:"varint,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + CastMapValueMessageNullable map[int32]*MyWilson `protobuf:"bytes,2,rep,name=CastMapValueMessageNullable,json=castMapValueMessageNullable,castvalue=MyWilson,castvaluetype=castvalue.Wilson" json:"CastMapValueMessageNullable,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *Castaway) Reset() { *m = Castaway{} } +func (*Castaway) ProtoMessage() {} +func (*Castaway) Descriptor() ([]byte, []int) { return fileDescriptorCastvalue, []int{0} } + +type Wilson struct { + Int64 *int64 `protobuf:"varint,1,opt,name=Int64,json=int64" json:"Int64,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *Wilson) Reset() { *m = Wilson{} } +func (*Wilson) ProtoMessage() {} +func (*Wilson) Descriptor() ([]byte, []int) { return fileDescriptorCastvalue, []int{1} } + +func init() { + proto.RegisterType((*Castaway)(nil), "castvalue.Castaway") + proto.RegisterType((*Wilson)(nil), "castvalue.Wilson") +} +func (this *Castaway) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return CastvalueDescription() +} +func (this *Wilson) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return CastvalueDescription() +} +func CastvalueDescription() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + d := &github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet{} + var gzipped = []byte{ + // 3470 bytes of a gzipped FileDescriptorSet + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xcc, 0x5a, 0x6b, 0x6c, 0x23, 0x57, + 0xf5, 0x5f, 0xc7, 0x76, 0x62, 0x1f, 0x3b, 0x8e, 0x33, 0x49, 0x77, 0xbd, 0xd9, 0x76, 0xb3, 0xeb, + 0x3e, 0x76, 0xbb, 0x6d, 0x93, 0xfe, 0xf7, 0xdf, 0xc7, 0xd6, 0xfd, 0xff, 0x5b, 0xe5, 0xe1, 0x4d, + 0xbd, 0xca, 0x8b, 0x49, 0xd2, 0xee, 0x96, 0x0f, 0xa3, 0xc9, 0xf8, 0xc6, 0xf1, 0xee, 0x78, 0xc6, + 0x78, 0xc6, 0xbb, 0x9b, 0x7e, 0x2a, 0x6a, 0x01, 0x15, 0x44, 0x79, 0x4a, 0xf4, 0x0d, 0xad, 0x04, + 0x2d, 0xe5, 0xd5, 0xf2, 0x12, 0xe2, 0x53, 0x11, 0x2a, 0xf4, 0x13, 0x2a, 0x7c, 0xe2, 0x03, 0x02, + 0x5a, 0x2a, 0x51, 0xa0, 0x40, 0x91, 0x56, 0xa2, 0x52, 0xbf, 0x70, 0x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1a, 0x71, 0x1c, 0xec, 0x80, 0xe6, 0x6e, 0xd5, 0x49, 0x2e, 0xc6, 0x46, 0x7f, 0xa8, + 0x63, 0xf4, 0xed, 0x23, 0x4f, 0x09, 0xd4, 0x2a, 0x82, 0x94, 0x29, 0x48, 0x12, 0xab, 0x59, 0xe3, + 0x0c, 0xf1, 0x6d, 0xec, 0x57, 0x44, 0x8d, 0x76, 0x96, 0x04, 0x85, 0x09, 0x8a, 0x01, 0x87, 0x34, + 0xce, 0x57, 0x0d, 0x92, 0xeb, 0x67, 0x04, 0x47, 0x3a, 0x08, 0x56, 0x78, 0x7b, 0x3b, 0x87, 0xc4, + 0xe1, 0x50, 0x92, 0xe4, 0xa2, 0x4b, 0x2c, 0xa7, 0x6a, 0x5b, 0xb9, 0x01, 0x46, 0x72, 0x75, 0x97, + 0x59, 0x24, 0x66, 0xb9, 0x9d, 0xa2, 0x85, 0x53, 0x6e, 0x81, 0x01, 0xbb, 0xee, 0xe2, 0x9d, 0x93, + 0x4b, 0xe0, 0xfc, 0xa4, 0x8e, 0x5f, 0xde, 0xd5, 0x11, 0x96, 0xb8, 0x8e, 0x2a, 0x95, 0x95, 0x12, + 0x64, 0x1d, 0xbb, 0xd9, 0x30, 0x88, 0x66, 0xd8, 0x65, 0xa2, 0x55, 0xad, 0x0d, 0x3b, 0x97, 0x64, + 0x04, 0xe3, 0x9d, 0x03, 0x61, 0x8a, 0x33, 0xa8, 0x57, 0x42, 0x35, 0x35, 0xe3, 0x04, 0x9e, 0x95, + 0xbd, 0xd0, 0xef, 0x6c, 0x59, 0xae, 0x7e, 0x31, 0x97, 0x66, 0x1e, 0x22, 0x9e, 0xf2, 0xff, 0x8c, + 0xc3, 0x50, 0x2f, 0x2e, 0x76, 0x3b, 0xc4, 0x37, 0xe8, 0x28, 0xd1, 0xc1, 0x76, 0x61, 0x03, 0x8e, + 0x09, 0x1a, 0xb1, 0xff, 0x3d, 0x1a, 0x71, 0x0a, 0x52, 0x16, 0x71, 0x5c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4a, 0x50, 0x67, 0x40, 0x19, 0x84, 0x24, 0x93, 0x4c, + 0x2f, 0x2d, 0xcd, 0x67, 0x13, 0x1e, 0xe7, 0xca, 0xaa, 0x5a, 0x5a, 0x9c, 0xcb, 0x26, 0x3d, 0xce, + 0x39, 0x75, 0x69, 0x6d, 0x39, 0x0b, 0x1e, 0xc3, 0x42, 0x71, 0x65, 0x65, 0x6a, 0xae, 0x98, 0x4d, + 0x79, 0x1a, 0xd3, 0x67, 0x56, 0x8b, 0x2b, 0xd9, 0x74, 0xa0, 0x5b, 0xf8, 0x8a, 0x41, 0xef, 0x15, + 0xc5, 0xc5, 0xb5, 0x85, 0x6c, 0x46, 0x19, 0x86, 0x41, 0xfe, 0x0a, 0xd9, 0x89, 0xa1, 0x36, 0x11, + 0xf6, 0x34, 0xdb, 0xea, 0x08, 0x67, 0x19, 0x0e, 0x08, 0x50, 0x43, 0xc9, 0xcf, 0x40, 0x9c, 0x79, + 0x17, 0x7a, 0x71, 0x66, 0x7e, 0x6a, 0xba, 0x38, 0xaf, 0x2d, 0x2d, 0xaf, 0x96, 0x96, 0x16, 0xa7, + 0xe6, 0xd1, 0x76, 0x9e, 0x4c, 0x2d, 0x7e, 0x68, 0xad, 0xa4, 0x16, 0x67, 0xd1, 0x7e, 0x3e, 0xd9, + 0x72, 0x71, 0x6a, 0x15, 0x65, 0xd1, 0xfc, 0x31, 0x18, 0xed, 0x16, 0x67, 0xba, 0xad, 0x8c, 0xfc, + 0x33, 0x11, 0x18, 0xe9, 0x12, 0x32, 0xbb, 0xae, 0xa2, 0x3b, 0x21, 0xce, 0x3d, 0x8d, 0x27, 0x91, + 0x6b, 0xbb, 0xc6, 0x5e, 0xe6, 0x77, 0x1d, 0x89, 0x84, 0xe1, 0xfc, 0x89, 0x34, 0xba, 0x4d, 0x22, + 0xa5, 0x14, 0x1d, 0xee, 0xf4, 0x40, 0x04, 0x72, 0xdb, 0x71, 0x87, 0xac, 0xf7, 0xbe, 0xc0, 0x7a, + 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, 0x99, 0xa5, 0x59, 0x9a, 0x0b, 0xef, 0x2d, 0x62, 0x62, 0xc3, 0x9c, 0x3c, 0x5f, + 0x5a, 0x2d, 0x6a, 0xea, 0xda, 0xe2, 0x6a, 0x69, 0xa1, 0x98, 0x8d, 0x1e, 0x4b, 0x26, 0xde, 0x1c, + 0xc8, 0xde, 0x8f, 0x7f, 0x7d, 0xf9, 0x97, 0xfb, 0x20, 0x13, 0xac, 0x83, 0x95, 0xff, 0x83, 0x7d, + 0x72, 0xd3, 0xea, 0x10, 0x57, 0xbb, 0x50, 0x6d, 0x30, 0x77, 0xae, 0xe9, 0xbc, 0x92, 0xf4, 0x66, + 0x62, 0x54, 0x68, 0xe1, 0xf6, 0xfe, 0x1e, 0xd4, 0x39, 0xc9, 0x54, 0x94, 0x79, 0x18, 0x47, 0x93, + 0x61, 0xad, 0x69, 0x95, 0xf5, 0x46, 0x59, 0x6b, 0x1d, 0x17, 0x68, 0xba, 0x81, 0x7e, 0xe0, 0xd8, + 0x3c, 0x93, 0x78, 0x2c, 0x97, 0x5b, 0xf6, 0x8a, 0x50, 0x6e, 0x85, 0xd8, 0x29, 0xa1, 0xda, 0xe6, + 0x35, 0xd1, 0xed, 0xbc, 0x06, 0x6b, 0xaf, 0x9a, 0x5e, 0x47, 0xb7, 0x71, 0x1b, 0x5b, 0xac, 0x7a, + 0x4b, 0xa8, 0x09, 0x14, 0x14, 0xe9, 0xf3, 0xfb, 0x37, 0x07, 0x7e, 0x3b, 0xfe, 0x26, 0x0a, 0x69, + 0x7f, 0x05, 0x47, 0x0b, 0x62, 0x83, 0x85, 0xf9, 0x08, 0x8b, 0x02, 0x57, 0xee, 0x58, 0xef, 0x4d, + 0xcc, 0xd0, 0xf8, 0x5f, 0xe8, 0xe7, 0x75, 0x95, 0xca, 0x91, 0x34, 0xf7, 0x52, 0x5f, 0x23, 0xbc, + 0x5a, 0x4f, 0xa8, 0xe2, 0x09, 0x83, 0x5d, 0xff, 0x59, 0x87, 0x71, 0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 0x6d, 0x19, 0x12, 0x48, 0x1b, 0xd7, + 0x32, 0x2d, 0x63, 0x1d, 0x7d, 0x63, 0x77, 0x56, 0xfb, 0x8e, 0xb4, 0x1a, 0xc7, 0x06, 0xac, 0xb6, + 0x0a, 0x7b, 0x05, 0xe3, 0xee, 0xe6, 0xf5, 0x05, 0x19, 0x58, 0x39, 0x7a, 0x2d, 0x38, 0xbb, 0x1f, + 0x86, 0x31, 0xcf, 0x9c, 0xb2, 0x02, 0x73, 0x34, 0x7a, 0x30, 0x10, 0xce, 0xfc, 0xa2, 0x60, 0x96, + 0x11, 0xdf, 0x2b, 0xe1, 0x9c, 0x05, 0xbd, 0x4e, 0xc9, 0x4f, 0x43, 0x4e, 0x92, 0x37, 0x2d, 0x2c, + 0xf0, 0xed, 0x8a, 0x85, 0xd3, 0x58, 0xee, 0x81, 0xfa, 0xbb, 0x6d, 0x53, 0xb5, 0xe6, 0x83, 0x53, + 0xe6, 0x12, 0x64, 0xbd, 0x7a, 0x43, 0xab, 0xd6, 0xea, 0x36, 0x96, 0x96, 0x3b, 0x33, 0x7e, 0x4f, + 0xce, 0x94, 0x87, 0x2b, 0x31, 0x58, 0xa1, 0x08, 0x19, 0xf6, 0xd8, 0xab, 0x4b, 0x7e, 0x5f, 0x10, + 0x0d, 0xb6, 0x50, 0x22, 0x70, 0x60, 0xa5, 0x84, 0x35, 0x6f, 0x2f, 0xf1, 0xef, 0x07, 0x32, 0x70, + 0x08, 0x08, 0xf7, 0xbe, 0xa1, 0xb6, 0x4c, 0xac, 0x84, 0x7d, 0x7e, 0xcd, 0x7d, 0xf4, 0x92, 0x58, + 0xb3, 0xc1, 0x44, 0x5c, 0x98, 0xa7, 0xe6, 0x09, 0xa6, 0xcb, 0x70, 0xb2, 0x07, 0x2e, 0x79, 0x16, + 0x0a, 0x64, 0xcb, 0xc2, 0x49, 0x18, 0x0c, 0xa4, 0xca, 0x70, 0xaa, 0x07, 0x05, 0x55, 0xda, 0x9f, + 0x29, 0x0b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5, 0x0f, 0xd3, 0xf3, 0xaf, 0xbc, 0x76, 0x70, 0xcf, 0xab, 0x78, 0xfd, 0x1a, 0xaf, + 0xdf, 0xbf, 0x76, 0x30, 0xf2, 0x26, 0x5e, 0x6f, 0xe3, 0xf5, 0x0e, 0x5e, 0xf7, 0xbf, 0x7e, 0x30, + 0xf2, 0x1c, 0x5e, 0x2f, 0xe0, 0xf5, 0x23, 0xbc, 0x5e, 0xc2, 0xeb, 0x15, 0xbc, 0x5e, 0x7d, 0x1d, + 0x75, 0xf1, 0xff, 0x9b, 0xf8, 0xff, 0x6d, 0xfc, 0xff, 0x0e, 0xfe, 0xbf, 0xff, 0x0f, 0x07, 0xf7, + 0xfc, 0x2b, 0x00, 0x00, 0xff, 0xff, 0xda, 0x83, 0xc0, 0xc0, 0xfb, 0x2c, 0x00, 0x00, + } + r := bytes.NewReader(gzipped) + gzipr, err := compress_gzip.NewReader(r) + if err != nil { + panic(err) + } + ungzipped, err := io_ioutil.ReadAll(gzipr) + if err != nil { + panic(err) + } + if err := github_com_gogo_protobuf_proto.Unmarshal(ungzipped, d); err != nil { + panic(err) + } + return d +} +func (this *Castaway) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*Castaway) + if !ok { + that2, ok := that.(Castaway) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *Castaway") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *Castaway but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *Castaway but is not nil && this == nil") + } + if len(this.CastMapValueMessage) != len(that1.CastMapValueMessage) { + return fmt.Errorf("CastMapValueMessage this(%v) Not Equal that(%v)", len(this.CastMapValueMessage), len(that1.CastMapValueMessage)) + } + for i := range this.CastMapValueMessage { + a := (Wilson)(this.CastMapValueMessage[i]) + b := (Wilson)(that1.CastMapValueMessage[i]) + if !(&a).Equal(&b) { + return fmt.Errorf("CastMapValueMessage this[%v](%v) Not Equal that[%v](%v)", i, this.CastMapValueMessage[i], i, that1.CastMapValueMessage[i]) + } + } + if len(this.CastMapValueMessageNullable) != len(that1.CastMapValueMessageNullable) { + return fmt.Errorf("CastMapValueMessageNullable this(%v) Not Equal that(%v)", len(this.CastMapValueMessageNullable), len(that1.CastMapValueMessageNullable)) + } + for i := range this.CastMapValueMessageNullable { + a := (*Wilson)(this.CastMapValueMessageNullable[i]) + b := (*Wilson)(that1.CastMapValueMessageNullable[i]) + if !a.Equal(b) { + return fmt.Errorf("CastMapValueMessageNullable this[%v](%v) Not Equal that[%v](%v)", i, this.CastMapValueMessageNullable[i], i, that1.CastMapValueMessageNullable[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *Castaway) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*Castaway) + if !ok { + that2, ok := that.(Castaway) + 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.CastMapValueMessage) != len(that1.CastMapValueMessage) { + return false + } + for i := range this.CastMapValueMessage { + a := (Wilson)(this.CastMapValueMessage[i]) + b := (Wilson)(that1.CastMapValueMessage[i]) + if !(&a).Equal(&b) { + return false + } + } + if len(this.CastMapValueMessageNullable) != len(that1.CastMapValueMessageNullable) { + return false + } + for i := range this.CastMapValueMessageNullable { + a := (*Wilson)(this.CastMapValueMessageNullable[i]) + b := (*Wilson)(that1.CastMapValueMessageNullable[i]) + if !a.Equal(b) { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *Wilson) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*Wilson) + if !ok { + that2, ok := that.(Wilson) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *Wilson") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *Wilson but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *Wilson but is not nil && this == nil") + } + if this.Int64 != nil && that1.Int64 != nil { + if *this.Int64 != *that1.Int64 { + return fmt.Errorf("Int64 this(%v) Not Equal that(%v)", *this.Int64, *that1.Int64) + } + } else if this.Int64 != nil { + return fmt.Errorf("this.Int64 == nil && that.Int64 != nil") + } else if that1.Int64 != nil { + return fmt.Errorf("Int64 this(%v) Not Equal that(%v)", this.Int64, that1.Int64) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *Wilson) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*Wilson) + if !ok { + that2, ok := that.(Wilson) + 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.Int64 != nil && that1.Int64 != nil { + if *this.Int64 != *that1.Int64 { + return false + } + } else if this.Int64 != nil { + return false + } else if that1.Int64 != nil { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} + +type CastawayFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetCastMapValueMessage() map[int32]MyWilson + GetCastMapValueMessageNullable() map[int32]*MyWilson +} + +func (this *Castaway) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *Castaway) TestProto() github_com_gogo_protobuf_proto.Message { + return NewCastawayFromFace(this) +} + +func (this *Castaway) GetCastMapValueMessage() map[int32]MyWilson { + return this.CastMapValueMessage +} + +func (this *Castaway) GetCastMapValueMessageNullable() map[int32]*MyWilson { + return this.CastMapValueMessageNullable +} + +func NewCastawayFromFace(that CastawayFace) *Castaway { + this := &Castaway{} + this.CastMapValueMessage = that.GetCastMapValueMessage() + this.CastMapValueMessageNullable = that.GetCastMapValueMessageNullable() + return this +} + +type WilsonFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetInt64() *int64 +} + +func (this *Wilson) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *Wilson) TestProto() github_com_gogo_protobuf_proto.Message { + return NewWilsonFromFace(this) +} + +func (this *Wilson) GetInt64() *int64 { + return this.Int64 +} + +func NewWilsonFromFace(that WilsonFace) *Wilson { + this := &Wilson{} + this.Int64 = that.GetInt64() + return this +} + +func (this *Castaway) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 6) + s = append(s, "&castvalue.Castaway{") + keysForCastMapValueMessage := make([]int32, 0, len(this.CastMapValueMessage)) + for k := range this.CastMapValueMessage { + keysForCastMapValueMessage = append(keysForCastMapValueMessage, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForCastMapValueMessage) + mapStringForCastMapValueMessage := "map[int32]MyWilson{" + for _, k := range keysForCastMapValueMessage { + mapStringForCastMapValueMessage += fmt.Sprintf("%#v: %#v,", k, this.CastMapValueMessage[k]) + } + mapStringForCastMapValueMessage += "}" + if this.CastMapValueMessage != nil { + s = append(s, "CastMapValueMessage: "+mapStringForCastMapValueMessage+",\n") + } + keysForCastMapValueMessageNullable := make([]int32, 0, len(this.CastMapValueMessageNullable)) + for k := range this.CastMapValueMessageNullable { + keysForCastMapValueMessageNullable = append(keysForCastMapValueMessageNullable, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForCastMapValueMessageNullable) + mapStringForCastMapValueMessageNullable := "map[int32]*MyWilson{" + for _, k := range keysForCastMapValueMessageNullable { + mapStringForCastMapValueMessageNullable += fmt.Sprintf("%#v: %#v,", k, this.CastMapValueMessageNullable[k]) + } + mapStringForCastMapValueMessageNullable += "}" + if this.CastMapValueMessageNullable != nil { + s = append(s, "CastMapValueMessageNullable: "+mapStringForCastMapValueMessageNullable+",\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 *Wilson) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&castvalue.Wilson{") + if this.Int64 != nil { + s = append(s, "Int64: "+valueToGoStringCastvalue(this.Int64, "int64")+",\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 valueToGoStringCastvalue(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 extensionToGoStringCastvalue(e map[int32]github_com_gogo_protobuf_proto.Extension) string { + if e == nil { + return "nil" + } + s := "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 +} +func (m *Castaway) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *Castaway) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.CastMapValueMessage) > 0 { + for k := range m.CastMapValueMessage { + data[i] = 0xa + i++ + v := m.CastMapValueMessage[k] + msgSize := ((*Wilson)(&v)).Size() + mapSize := 1 + sovCastvalue(uint64(k)) + 1 + msgSize + sovCastvalue(uint64(msgSize)) + i = encodeVarintCastvalue(data, i, uint64(mapSize)) + data[i] = 0x8 + i++ + i = encodeVarintCastvalue(data, i, uint64(k)) + data[i] = 0x12 + i++ + i = encodeVarintCastvalue(data, i, uint64(((*Wilson)(&v)).Size())) + n1, err := ((*Wilson)(&v)).MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n1 + } + } + if len(m.CastMapValueMessageNullable) > 0 { + for k := range m.CastMapValueMessageNullable { + data[i] = 0x12 + i++ + v := m.CastMapValueMessageNullable[k] + if v == nil { + return 0, errors.New("proto: map has nil element") + } + msgSize := ((*Wilson)(v)).Size() + mapSize := 1 + sovCastvalue(uint64(k)) + 1 + msgSize + sovCastvalue(uint64(msgSize)) + i = encodeVarintCastvalue(data, i, uint64(mapSize)) + data[i] = 0x8 + i++ + i = encodeVarintCastvalue(data, i, uint64(k)) + data[i] = 0x12 + i++ + i = encodeVarintCastvalue(data, i, uint64(((*Wilson)(v)).Size())) + n2, err := ((*Wilson)(v)).MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n2 + } + } + if m.XXX_unrecognized != nil { + i += copy(data[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *Wilson) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *Wilson) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Int64 != nil { + data[i] = 0x8 + i++ + i = encodeVarintCastvalue(data, i, uint64(*m.Int64)) + } + if m.XXX_unrecognized != nil { + i += copy(data[i:], m.XXX_unrecognized) + } + return i, nil +} + +func encodeFixed64Castvalue(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 encodeFixed32Castvalue(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 encodeVarintCastvalue(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 NewPopulatedCastaway(r randyCastvalue, easy bool) *Castaway { + this := &Castaway{} + if r.Intn(10) != 0 { + v1 := r.Intn(10) + this.CastMapValueMessage = make(map[int32]MyWilson) + for i := 0; i < v1; i++ { + this.CastMapValueMessage[int32(r.Int31())] = (MyWilson)(*NewPopulatedWilson(r, easy)) + } + } + if r.Intn(10) != 0 { + v2 := r.Intn(10) + this.CastMapValueMessageNullable = make(map[int32]*MyWilson) + for i := 0; i < v2; i++ { + this.CastMapValueMessageNullable[int32(r.Int31())] = (*MyWilson)(NewPopulatedWilson(r, easy)) + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedCastvalue(r, 3) + } + return this +} + +func NewPopulatedWilson(r randyCastvalue, easy bool) *Wilson { + this := &Wilson{} + if r.Intn(10) != 0 { + v3 := int64(r.Int63()) + if r.Intn(2) == 0 { + v3 *= -1 + } + this.Int64 = &v3 + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedCastvalue(r, 2) + } + return this +} + +type randyCastvalue interface { + Float32() float32 + Float64() float64 + Int63() int64 + Int31() int32 + Uint32() uint32 + Intn(n int) int +} + +func randUTF8RuneCastvalue(r randyCastvalue) 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 randStringCastvalue(r randyCastvalue) string { + v4 := r.Intn(100) + tmps := make([]rune, v4) + for i := 0; i < v4; i++ { + tmps[i] = randUTF8RuneCastvalue(r) + } + return string(tmps) +} +func randUnrecognizedCastvalue(r randyCastvalue, 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 = randFieldCastvalue(data, r, fieldNumber, wire) + } + return data +} +func randFieldCastvalue(data []byte, r randyCastvalue, fieldNumber int, wire int) []byte { + key := uint32(fieldNumber)<<3 | uint32(wire) + switch wire { + case 0: + data = encodeVarintPopulateCastvalue(data, uint64(key)) + v5 := r.Int63() + if r.Intn(2) == 0 { + v5 *= -1 + } + data = encodeVarintPopulateCastvalue(data, uint64(v5)) + case 1: + data = encodeVarintPopulateCastvalue(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 = encodeVarintPopulateCastvalue(data, uint64(key)) + ll := r.Intn(100) + data = encodeVarintPopulateCastvalue(data, uint64(ll)) + for j := 0; j < ll; j++ { + data = append(data, byte(r.Intn(256))) + } + default: + data = encodeVarintPopulateCastvalue(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 encodeVarintPopulateCastvalue(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 *Castaway) Size() (n int) { + var l int + _ = l + if len(m.CastMapValueMessage) > 0 { + for k, v := range m.CastMapValueMessage { + _ = k + _ = v + l = ((*Wilson)(&v)).Size() + mapEntrySize := 1 + sovCastvalue(uint64(k)) + 1 + l + sovCastvalue(uint64(l)) + n += mapEntrySize + 1 + sovCastvalue(uint64(mapEntrySize)) + } + } + if len(m.CastMapValueMessageNullable) > 0 { + for k, v := range m.CastMapValueMessageNullable { + _ = k + _ = v + l = 0 + if v != nil { + l = ((*Wilson)(v)).Size() + } + mapEntrySize := 1 + sovCastvalue(uint64(k)) + 1 + l + sovCastvalue(uint64(l)) + n += mapEntrySize + 1 + sovCastvalue(uint64(mapEntrySize)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *Wilson) Size() (n int) { + var l int + _ = l + if m.Int64 != nil { + n += 1 + sovCastvalue(uint64(*m.Int64)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func sovCastvalue(x uint64) (n int) { + for { + n++ + x >>= 7 + if x == 0 { + break + } + } + return n +} +func sozCastvalue(x uint64) (n int) { + return sovCastvalue(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (this *Castaway) String() string { + if this == nil { + return "nil" + } + keysForCastMapValueMessage := make([]int32, 0, len(this.CastMapValueMessage)) + for k := range this.CastMapValueMessage { + keysForCastMapValueMessage = append(keysForCastMapValueMessage, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForCastMapValueMessage) + mapStringForCastMapValueMessage := "map[int32]MyWilson{" + for _, k := range keysForCastMapValueMessage { + mapStringForCastMapValueMessage += fmt.Sprintf("%v: %v,", k, this.CastMapValueMessage[k]) + } + mapStringForCastMapValueMessage += "}" + keysForCastMapValueMessageNullable := make([]int32, 0, len(this.CastMapValueMessageNullable)) + for k := range this.CastMapValueMessageNullable { + keysForCastMapValueMessageNullable = append(keysForCastMapValueMessageNullable, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForCastMapValueMessageNullable) + mapStringForCastMapValueMessageNullable := "map[int32]*MyWilson{" + for _, k := range keysForCastMapValueMessageNullable { + mapStringForCastMapValueMessageNullable += fmt.Sprintf("%v: %v,", k, this.CastMapValueMessageNullable[k]) + } + mapStringForCastMapValueMessageNullable += "}" + s := strings.Join([]string{`&Castaway{`, + `CastMapValueMessage:` + mapStringForCastMapValueMessage + `,`, + `CastMapValueMessageNullable:` + mapStringForCastMapValueMessageNullable + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *Wilson) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&Wilson{`, + `Int64:` + valueToStringCastvalue(this.Int64) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func valueToStringCastvalue(v interface{}) string { + rv := reflect.ValueOf(v) + if rv.IsNil() { + return "nil" + } + pv := reflect.Indirect(rv).Interface() + return fmt.Sprintf("*%v", pv) +} + +var fileDescriptorCastvalue = []byte{ + // 337 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xe2, 0x52, 0x48, 0xce, 0xcf, 0x4d, + 0xca, 0x2f, 0xd6, 0xcf, 0x4d, 0x2c, 0x2a, 0xce, 0x48, 0xcc, 0x49, 0x2d, 0xd2, 0x4f, 0x4e, 0x2c, + 0x2e, 0x29, 0x4b, 0xcc, 0x29, 0x4d, 0xd5, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0xe2, 0x84, 0x0b, + 0x48, 0xe9, 0xa6, 0x67, 0x96, 0x64, 0x94, 0x26, 0xe9, 0x01, 0xf5, 0xe8, 0xa7, 0xe7, 0xa7, 0xe7, + 0xeb, 0x83, 0x55, 0x24, 0x95, 0xa6, 0x81, 0x79, 0x60, 0x0e, 0x98, 0x05, 0xd1, 0xa9, 0x74, 0x90, + 0x99, 0x8b, 0xc3, 0x19, 0xa8, 0x39, 0xb1, 0x3c, 0xb1, 0x52, 0xa8, 0x80, 0x4b, 0x18, 0xc4, 0xf6, + 0x4d, 0x2c, 0x08, 0x03, 0x99, 0xe5, 0x9b, 0x5a, 0x5c, 0x9c, 0x98, 0x9e, 0x2a, 0xc1, 0xa8, 0xc0, + 0xac, 0xc1, 0x6d, 0xa4, 0xa3, 0x87, 0xb0, 0x15, 0xa6, 0x43, 0x0f, 0x8b, 0x72, 0xd7, 0xbc, 0x92, + 0xa2, 0x4a, 0x27, 0x81, 0x13, 0xf7, 0xe4, 0x19, 0xba, 0xee, 0xcb, 0x73, 0xf8, 0x56, 0x86, 0x67, + 0xe6, 0x14, 0xe7, 0xe7, 0x05, 0x09, 0x27, 0x63, 0xaa, 0x15, 0x6a, 0x61, 0xe4, 0x92, 0xc6, 0x62, + 0x86, 0x5f, 0x69, 0x4e, 0x4e, 0x62, 0x52, 0x4e, 0xaa, 0x04, 0x13, 0xd8, 0x6a, 0x13, 0x22, 0xad, + 0x86, 0x69, 0x83, 0x38, 0x81, 0x07, 0xc5, 0x7a, 0xe9, 0x64, 0xdc, 0xea, 0xa5, 0x22, 0xb9, 0x24, + 0x70, 0xf9, 0x44, 0x48, 0x80, 0x8b, 0x39, 0x3b, 0xb5, 0x12, 0x18, 0x08, 0x8c, 0x1a, 0xac, 0x41, + 0x20, 0xa6, 0x90, 0x3a, 0x17, 0x2b, 0xd8, 0x2d, 0x40, 0xd7, 0x31, 0x02, 0x5d, 0x27, 0x88, 0xe4, + 0x3a, 0xa8, 0x65, 0x10, 0x79, 0x2b, 0x26, 0x0b, 0x46, 0xa9, 0x44, 0x2e, 0x05, 0x42, 0x2e, 0xa5, + 0xd0, 0x0a, 0x25, 0x39, 0x2e, 0x36, 0x88, 0xa0, 0x90, 0x08, 0x17, 0xab, 0x67, 0x5e, 0x89, 0x99, + 0x09, 0xd8, 0x28, 0xe6, 0x20, 0xd6, 0x4c, 0x10, 0xc7, 0xc9, 0xe7, 0xc4, 0x43, 0x39, 0x86, 0x0b, + 0x40, 0x7c, 0x03, 0x88, 0x1f, 0x3c, 0x94, 0x63, 0x7c, 0x01, 0xc4, 0x1f, 0x80, 0xf8, 0x07, 0x10, + 0x37, 0x3c, 0x92, 0x63, 0x5c, 0x01, 0xc4, 0x1b, 0x80, 0x78, 0x07, 0x10, 0x1f, 0x00, 0xe2, 0x13, + 0x40, 0x7c, 0xe1, 0x11, 0x50, 0x2d, 0x90, 0x7e, 0x01, 0xa4, 0x3f, 0x00, 0xe9, 0x1f, 0x40, 0xba, + 0xe1, 0xb1, 0x1c, 0x03, 0x20, 0x00, 0x00, 0xff, 0xff, 0x15, 0xb6, 0x94, 0x56, 0x8e, 0x02, 0x00, + 0x00, +} diff --git a/vendor/github.com/gogo/protobuf/test/castvalue/combos/marshaler/castvalue.proto b/vendor/github.com/gogo/protobuf/test/castvalue/combos/marshaler/castvalue.proto new file mode 100644 index 000000000..5660ae6af --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/castvalue/combos/marshaler/castvalue.proto @@ -0,0 +1,64 @@ +// Copyright (c) 2015, Vastech SA (PTY) LTD. All rights reserved. +// http://github.com/gogo/protobuf/gogoproto +// +// 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 castvalue; + +import "github.com/gogo/protobuf/gogoproto/gogo.proto"; + +option (gogoproto.goproto_stringer_all) = false; +option (gogoproto.goproto_enum_prefix_all) = false; +option (gogoproto.goproto_getters_all) = false; + +option (gogoproto.equal_all) = true; +option (gogoproto.verbose_equal_all) = true; +option (gogoproto.stringer_all) = true; +option (gogoproto.gostring_all) = true; +option (gogoproto.face_all) = true; +option (gogoproto.description_all) = true; + +option (gogoproto.testgen_all) = true; +option (gogoproto.populate_all) = true; +option (gogoproto.benchgen_all) = true; +option (gogoproto.unmarshaler_all) = false; +option (gogoproto.marshaler_all) = true; +option (gogoproto.sizer_all) = true; + +option (gogoproto.goproto_enum_stringer_all) = false; +option (gogoproto.enum_stringer_all) = true; + +option (gogoproto.unsafe_marshaler_all) = false; +option (gogoproto.unsafe_unmarshaler_all) = false; + +message Castaway { + map CastMapValueMessage = 1 [(gogoproto.castvalue) = "MyWilson", (gogoproto.nullable) = false]; + map CastMapValueMessageNullable = 2 [(gogoproto.castvalue) = "MyWilson"]; +} + +message Wilson { + optional int64 Int64 = 1; +} diff --git a/vendor/github.com/gogo/protobuf/test/castvalue/combos/marshaler/castvaluepb_test.go b/vendor/github.com/gogo/protobuf/test/castvalue/combos/marshaler/castvaluepb_test.go new file mode 100644 index 000000000..302a1f3af --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/castvalue/combos/marshaler/castvaluepb_test.go @@ -0,0 +1,513 @@ +// Code generated by protoc-gen-gogo. +// source: combos/marshaler/castvalue.proto +// DO NOT EDIT! + +/* +Package castvalue is a generated protocol buffer package. + +It is generated from these files: + combos/marshaler/castvalue.proto + +It has these top-level messages: + Castaway + Wilson +*/ +package castvalue + +import testing "testing" +import math_rand "math/rand" +import time "time" +import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" +import github_com_gogo_protobuf_jsonpb "github.com/gogo/protobuf/jsonpb" +import fmt "fmt" +import go_parser "go/parser" +import proto "github.com/gogo/protobuf/proto" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +func TestCastawayProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCastaway(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Castaway{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestCastawayMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCastaway(popr, false) + size := p.Size() + data := make([]byte, size) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(data) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Castaway{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkCastawayProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Castaway, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedCastaway(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkCastawayProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedCastaway(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &Castaway{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestWilsonProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedWilson(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Wilson{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestWilsonMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedWilson(popr, false) + size := p.Size() + data := make([]byte, size) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(data) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Wilson{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkWilsonProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Wilson, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedWilson(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkWilsonProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedWilson(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &Wilson{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestCastawayJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCastaway(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Castaway{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestWilsonJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedWilson(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Wilson{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestCastawayProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCastaway(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &Castaway{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestCastawayProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCastaway(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &Castaway{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestWilsonProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedWilson(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &Wilson{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestWilsonProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedWilson(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &Wilson{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestCastvalueDescription(t *testing.T) { + CastvalueDescription() +} +func TestCastawayVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCastaway(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &Castaway{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestWilsonVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedWilson(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &Wilson{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestCastawayFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCastaway(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestWilsonFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedWilson(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestCastawayGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCastaway(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestWilsonGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedWilson(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestCastawaySize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCastaway(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkCastawaySize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Castaway, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedCastaway(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestWilsonSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedWilson(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkWilsonSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Wilson, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedWilson(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestCastawayStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCastaway(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestWilsonStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedWilson(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} + +//These tests are generated by github.com/gogo/protobuf/plugin/testgen diff --git a/vendor/github.com/gogo/protobuf/test/castvalue/combos/marshaler/mytypes.go b/vendor/github.com/gogo/protobuf/test/castvalue/combos/marshaler/mytypes.go new file mode 100644 index 000000000..9892212c4 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/castvalue/combos/marshaler/mytypes.go @@ -0,0 +1,31 @@ +// Extensions for Protocol Buffers to create more go like structures. +// +// Copyright (c) 2013, Vastech SA (PTY) LTD. All rights reserved. +// http://github.com/gogo/protobuf/gogoproto +// +// 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 castvalue + +type MyWilson Wilson diff --git a/vendor/github.com/gogo/protobuf/test/castvalue/combos/unmarshaler/castvalue.pb.go b/vendor/github.com/gogo/protobuf/test/castvalue/combos/unmarshaler/castvalue.pb.go new file mode 100644 index 000000000..4871694a1 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/castvalue/combos/unmarshaler/castvalue.pb.go @@ -0,0 +1,1297 @@ +// Code generated by protoc-gen-gogo. +// source: combos/unmarshaler/castvalue.proto +// DO NOT EDIT! + +/* + Package castvalue is a generated protocol buffer package. + + It is generated from these files: + combos/unmarshaler/castvalue.proto + + It has these top-level messages: + Castaway + Wilson +*/ +package castvalue + +import proto "github.com/gogo/protobuf/proto" +import fmt "fmt" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" + +import github_com_gogo_protobuf_protoc_gen_gogo_descriptor "github.com/gogo/protobuf/protoc-gen-gogo/descriptor" +import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" +import compress_gzip "compress/gzip" +import bytes "bytes" +import io_ioutil "io/ioutil" + +import strings "strings" +import sort "sort" +import strconv "strconv" +import reflect "reflect" +import github_com_gogo_protobuf_sortkeys "github.com/gogo/protobuf/sortkeys" + +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. +const _ = proto.GoGoProtoPackageIsVersion1 + +type Castaway struct { + CastMapValueMessage map[int32]MyWilson `protobuf:"bytes,1,rep,name=CastMapValueMessage,json=castMapValueMessage,castvalue=MyWilson,castvaluetype=castvalue.Wilson" json:"CastMapValueMessage" protobuf_key:"varint,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + CastMapValueMessageNullable map[int32]*MyWilson `protobuf:"bytes,2,rep,name=CastMapValueMessageNullable,json=castMapValueMessageNullable,castvalue=MyWilson,castvaluetype=castvalue.Wilson" json:"CastMapValueMessageNullable,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *Castaway) Reset() { *m = Castaway{} } +func (*Castaway) ProtoMessage() {} +func (*Castaway) Descriptor() ([]byte, []int) { return fileDescriptorCastvalue, []int{0} } + +type Wilson struct { + Int64 *int64 `protobuf:"varint,1,opt,name=Int64,json=int64" json:"Int64,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *Wilson) Reset() { *m = Wilson{} } +func (*Wilson) ProtoMessage() {} +func (*Wilson) Descriptor() ([]byte, []int) { return fileDescriptorCastvalue, []int{1} } + +func init() { + proto.RegisterType((*Castaway)(nil), "castvalue.Castaway") + proto.RegisterType((*Wilson)(nil), "castvalue.Wilson") +} +func (this *Castaway) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return CastvalueDescription() +} +func (this *Wilson) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return CastvalueDescription() +} +func CastvalueDescription() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + d := &github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet{} + var gzipped = []byte{ + // 3471 bytes of a gzipped FileDescriptorSet + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xcc, 0x5a, 0x6b, 0x6c, 0x23, 0x57, + 0xf5, 0x5f, 0xc7, 0x76, 0x62, 0x1f, 0x3b, 0x8e, 0x33, 0x49, 0x77, 0xbd, 0xd9, 0x76, 0xb3, 0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xbd, 0x46, 0x19, 0x23, 0x47, 0x93, 0x2a, 0xbb, 0x57, 0x72, 0x30, + 0x50, 0xd7, 0x8d, 0x73, 0x7a, 0x85, 0xe4, 0xfa, 0x98, 0x58, 0x3e, 0x2a, 0x07, 0x01, 0xca, 0xa4, + 0x4e, 0xac, 0x32, 0xb1, 0x8c, 0xad, 0x5c, 0x14, 0x7b, 0x91, 0x54, 0x7d, 0x12, 0xe5, 0x3a, 0x18, + 0xae, 0x37, 0xd7, 0xcd, 0xaa, 0xa1, 0xf9, 0xd4, 0x00, 0xd5, 0xe2, 0x6a, 0x96, 0x37, 0xcc, 0xb6, + 0x94, 0x8f, 0xc0, 0xd0, 0x05, 0xa2, 0x9f, 0xf3, 0xab, 0xa6, 0x98, 0x6a, 0x86, 0x8a, 0x7d, 0x8a, + 0x33, 0x90, 0xae, 0x11, 0xc7, 0xc1, 0x0e, 0x68, 0xee, 0x56, 0x9d, 0xe4, 0x62, 0x6c, 0xf4, 0x87, + 0x3a, 0x46, 0xdf, 0x3e, 0xf2, 0x94, 0x40, 0xad, 0x22, 0x48, 0x99, 0x82, 0x24, 0xb1, 0x9a, 0x35, + 0xce, 0x10, 0xdf, 0xc6, 0x7e, 0x45, 0xd4, 0x68, 0x67, 0x49, 0x50, 0x98, 0xa0, 0x18, 0x70, 0x48, + 0xe3, 0x7c, 0xd5, 0x20, 0xb9, 0x7e, 0x46, 0x70, 0xa4, 0x83, 0x60, 0x85, 0xb7, 0xb7, 0x73, 0x48, + 0x1c, 0x0e, 0x25, 0x49, 0x2e, 0xba, 0xc4, 0x72, 0xaa, 0xb6, 0x95, 0x1b, 0x60, 0x24, 0x57, 0x77, + 0x99, 0x45, 0x62, 0x96, 0xdb, 0x29, 0x5a, 0x38, 0xe5, 0x16, 0x18, 0xb0, 0xeb, 0x2e, 0xde, 0x39, + 0xb9, 0x04, 0xce, 0x4f, 0xea, 0xf8, 0xe5, 0x5d, 0x1d, 0x61, 0x89, 0xeb, 0xa8, 0x52, 0x59, 0x29, + 0x41, 0xd6, 0xb1, 0x9b, 0x0d, 0x83, 0x68, 0x86, 0x5d, 0x26, 0x5a, 0xd5, 0xda, 0xb0, 0x73, 0x49, + 0x46, 0x30, 0xde, 0x39, 0x10, 0xa6, 0x38, 0x83, 0x7a, 0x25, 0x54, 0x53, 0x33, 0x4e, 0xe0, 0x59, + 0xd9, 0x0b, 0xfd, 0xce, 0x96, 0xe5, 0xea, 0x17, 0x73, 0x69, 0xe6, 0x21, 0xe2, 0x29, 0xff, 0xcf, + 0x38, 0x0c, 0xf5, 0xe2, 0x62, 0xb7, 0x43, 0x7c, 0x83, 0x8e, 0x12, 0x1d, 0x6c, 0x17, 0x36, 0xe0, + 0x98, 0xa0, 0x11, 0xfb, 0xdf, 0xa3, 0x11, 0xa7, 0x20, 0x65, 0x11, 0xc7, 0x25, 0x65, 0xee, 0x11, + 0xd1, 0x1e, 0x7d, 0x0a, 0x38, 0xa8, 0xd3, 0xa5, 0x62, 0xef, 0xc9, 0xa5, 0x4e, 0xc3, 0x90, 0xd7, + 0x25, 0xad, 0xa1, 0x5b, 0x15, 0xe9, 0x9b, 0x93, 0x61, 0x3d, 0x99, 0x28, 0x4a, 0x9c, 0x4a, 0x61, + 0x6a, 0x86, 0x04, 0x9e, 0x95, 0x59, 0x00, 0xdb, 0x22, 0xf6, 0x06, 0x2e, 0x2f, 0xc3, 0x44, 0x3f, + 0xe9, 0x6e, 0xa5, 0x25, 0xaa, 0xd2, 0x61, 0x25, 0x9b, 0x4b, 0x0d, 0x53, 0xb9, 0xad, 0xe5, 0x6a, + 0x03, 0xdb, 0x78, 0xca, 0x02, 0x5f, 0x64, 0x1d, 0xde, 0xb6, 0x06, 0x99, 0x06, 0xa1, 0x7e, 0x8f, + 0x26, 0xe6, 0x23, 0x4b, 0xb2, 0x4e, 0x4c, 0x84, 0x8e, 0x4c, 0x15, 0x30, 0x3e, 0xb0, 0xc1, 0x86, + 0xff, 0x51, 0xb9, 0x12, 0x3c, 0x81, 0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0x06, 0xd1, 0x6b, 0x55, 0xab, + 0xc2, 0xe2, 0x68, 0xa2, 0x10, 0xdf, 0xd0, 0x4d, 0x87, 0xa8, 0x43, 0xbc, 0x79, 0x45, 0xb6, 0x52, + 0x04, 0x4b, 0x16, 0x0d, 0x1f, 0xa2, 0x3f, 0x80, 0xe0, 0xcd, 0x1e, 0x22, 0xff, 0xeb, 0x01, 0x48, + 0xf9, 0xaa, 0x33, 0xe5, 0x30, 0xa4, 0xcf, 0xea, 0xe7, 0x75, 0x4d, 0x56, 0xdc, 0xdc, 0x12, 0x29, + 0x2a, 0x5b, 0x16, 0x55, 0xf7, 0x8d, 0x30, 0xca, 0x54, 0x70, 0x8c, 0xf8, 0x22, 0xc3, 0xd4, 0x1d, + 0x87, 0x19, 0x2d, 0xc1, 0x54, 0x15, 0xda, 0xb6, 0x44, 0x9b, 0x66, 0x64, 0x8b, 0x72, 0x33, 0x8c, + 0x30, 0x44, 0x0d, 0x03, 0x6f, 0xb5, 0x6e, 0x12, 0x8d, 0xee, 0x01, 0x1c, 0x16, 0x4f, 0xbd, 0x9e, + 0x0d, 0x53, 0x8d, 0x05, 0xa1, 0x40, 0x7b, 0xe4, 0x28, 0x73, 0x70, 0x05, 0x83, 0x55, 0x88, 0x45, + 0x1a, 0xba, 0x4b, 0x34, 0xf2, 0x91, 0x26, 0xea, 0x6a, 0xba, 0x55, 0xd6, 0x36, 0x75, 0x67, 0x33, + 0x37, 0xea, 0x27, 0xd8, 0x4f, 0x75, 0xe7, 0x84, 0x6a, 0x91, 0x69, 0x4e, 0x59, 0xe5, 0xbb, 0x50, + 0x4f, 0x29, 0xc0, 0x5e, 0x46, 0x84, 0x46, 0xc1, 0x31, 0x6b, 0xc6, 0x26, 0x31, 0xce, 0x69, 0x4d, + 0x77, 0xe3, 0x44, 0xee, 0x80, 0x9f, 0x81, 0x75, 0x72, 0x85, 0xe9, 0xcc, 0x50, 0x95, 0x35, 0xd4, + 0x50, 0x56, 0x20, 0x4d, 0xe7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, 0xff, + 0x39, 0x81, 0x6f, 0x61, 0xa8, 0x05, 0x7c, 0x61, 0x32, 0x9c, 0xe2, 0xf3, 0xd2, 0x02, 0x3e, 0x14, + 0x5d, 0x46, 0xed, 0xa9, 0x2f, 0x9c, 0xe9, 0x0b, 0x72, 0x19, 0xb5, 0x65, 0x3e, 0x3a, 0x9b, 0x2c, + 0x5a, 0x84, 0x53, 0x7c, 0x51, 0xce, 0x26, 0xd3, 0xa7, 0xdd, 0x68, 0xcf, 0x25, 0xe1, 0x1c, 0x5f, + 0x92, 0xdd, 0x68, 0x4b, 0x25, 0x98, 0x99, 0x94, 0xce, 0x3c, 0x12, 0xce, 0xf7, 0x88, 0xe0, 0x1b, + 0xee, 0x48, 0x23, 0x85, 0x7b, 0x60, 0x6f, 0xf7, 0x1c, 0x12, 0xce, 0xfa, 0xe8, 0xa5, 0xb6, 0xaa, + 0xdf, 0x9f, 0x42, 0x30, 0xe5, 0x8d, 0x76, 0xcb, 0x1f, 0xe1, 0xb4, 0x8f, 0x5d, 0x0a, 0x6e, 0xec, + 0xfc, 0xe9, 0x03, 0x2b, 0x34, 0x68, 0x85, 0xee, 0x70, 0xae, 0x27, 0x04, 0x97, 0x0f, 0x44, 0x97, + 0x86, 0x88, 0xdc, 0xe1, 0xf8, 0x27, 0xe5, 0xd2, 0x10, 0x08, 0x04, 0x27, 0xac, 0xa6, 0x69, 0x52, + 0xe7, 0x50, 0x76, 0xfe, 0x49, 0x43, 0xee, 0x4f, 0xef, 0x8a, 0x85, 0x21, 0x01, 0x18, 0x43, 0xe3, + 0xa4, 0xb6, 0x8e, 0x36, 0x08, 0x41, 0xfe, 0xf9, 0x5d, 0x19, 0x10, 0xa8, 0x36, 0xae, 0x27, 0xe0, + 0x9b, 0x46, 0x76, 0x86, 0x1d, 0x82, 0xfd, 0xcb, 0xbb, 0xe2, 0x33, 0x6b, 0x0b, 0xd2, 0x22, 0xe0, + 0x1f, 0x6d, 0x77, 0x26, 0x78, 0x2b, 0x48,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xc2, 0x78, 0x17, 0xd2, 0x81, + 0xd7, 0x1f, 0x30, 0xb6, 0xd7, 0x1f, 0x3b, 0x03, 0xb9, 0xed, 0x46, 0x42, 0x7f, 0x18, 0x86, 0x73, + 0x2d, 0x7e, 0x2c, 0x46, 0x6f, 0x95, 0x23, 0xad, 0x5f, 0xa9, 0xd0, 0x1f, 0x23, 0x0c, 0xfb, 0x7a, + 0x27, 0x5e, 0xc6, 0xdb, 0x0b, 0x7d, 0x27, 0x22, 0x63, 0x3a, 0x1c, 0x0a, 0xeb, 0xe9, 0xbf, 0xf9, + 0x8a, 0xfc, 0x41, 0xe8, 0xe7, 0x42, 0xfa, 0xd3, 0xb6, 0x92, 0xe5, 0xde, 0x72, 0x13, 0xa3, 0x8a, + 0xaa, 0xf1, 0x2a, 0x7d, 0x98, 0x9e, 0x7f, 0xe5, 0xb5, 0x83, 0x7b, 0x7e, 0x89, 0xd7, 0x6f, 0xf0, + 0x7a, 0xf5, 0xb5, 0x83, 0x91, 0x37, 0xf1, 0x7a, 0x1b, 0xaf, 0x77, 0xf0, 0xba, 0xff, 0xf5, 0x83, + 0x91, 0xe7, 0xf0, 0x7a, 0x01, 0xaf, 0x1f, 0xe1, 0xf5, 0x12, 0x5e, 0xaf, 0xbc, 0x8e, 0xfa, 0xf8, + 0xff, 0x55, 0xbc, 0xde, 0xc4, 0xfb, 0xb7, 0xf1, 0xff, 0x3b, 0xf8, 0xff, 0xfe, 0x3f, 0x1c, 0xdc, + 0xf3, 0xaf, 0x00, 0x00, 0x00, 0xff, 0xff, 0xb6, 0x4f, 0xfc, 0xaf, 0xfd, 0x2c, 0x00, 0x00, + } + r := bytes.NewReader(gzipped) + gzipr, err := compress_gzip.NewReader(r) + if err != nil { + panic(err) + } + ungzipped, err := io_ioutil.ReadAll(gzipr) + if err != nil { + panic(err) + } + if err := github_com_gogo_protobuf_proto.Unmarshal(ungzipped, d); err != nil { + panic(err) + } + return d +} +func (this *Castaway) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*Castaway) + if !ok { + that2, ok := that.(Castaway) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *Castaway") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *Castaway but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *Castaway but is not nil && this == nil") + } + if len(this.CastMapValueMessage) != len(that1.CastMapValueMessage) { + return fmt.Errorf("CastMapValueMessage this(%v) Not Equal that(%v)", len(this.CastMapValueMessage), len(that1.CastMapValueMessage)) + } + for i := range this.CastMapValueMessage { + a := (Wilson)(this.CastMapValueMessage[i]) + b := (Wilson)(that1.CastMapValueMessage[i]) + if !(&a).Equal(&b) { + return fmt.Errorf("CastMapValueMessage this[%v](%v) Not Equal that[%v](%v)", i, this.CastMapValueMessage[i], i, that1.CastMapValueMessage[i]) + } + } + if len(this.CastMapValueMessageNullable) != len(that1.CastMapValueMessageNullable) { + return fmt.Errorf("CastMapValueMessageNullable this(%v) Not Equal that(%v)", len(this.CastMapValueMessageNullable), len(that1.CastMapValueMessageNullable)) + } + for i := range this.CastMapValueMessageNullable { + a := (*Wilson)(this.CastMapValueMessageNullable[i]) + b := (*Wilson)(that1.CastMapValueMessageNullable[i]) + if !a.Equal(b) { + return fmt.Errorf("CastMapValueMessageNullable this[%v](%v) Not Equal that[%v](%v)", i, this.CastMapValueMessageNullable[i], i, that1.CastMapValueMessageNullable[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *Castaway) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*Castaway) + if !ok { + that2, ok := that.(Castaway) + 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.CastMapValueMessage) != len(that1.CastMapValueMessage) { + return false + } + for i := range this.CastMapValueMessage { + a := (Wilson)(this.CastMapValueMessage[i]) + b := (Wilson)(that1.CastMapValueMessage[i]) + if !(&a).Equal(&b) { + return false + } + } + if len(this.CastMapValueMessageNullable) != len(that1.CastMapValueMessageNullable) { + return false + } + for i := range this.CastMapValueMessageNullable { + a := (*Wilson)(this.CastMapValueMessageNullable[i]) + b := (*Wilson)(that1.CastMapValueMessageNullable[i]) + if !a.Equal(b) { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *Wilson) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*Wilson) + if !ok { + that2, ok := that.(Wilson) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *Wilson") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *Wilson but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *Wilson but is not nil && this == nil") + } + if this.Int64 != nil && that1.Int64 != nil { + if *this.Int64 != *that1.Int64 { + return fmt.Errorf("Int64 this(%v) Not Equal that(%v)", *this.Int64, *that1.Int64) + } + } else if this.Int64 != nil { + return fmt.Errorf("this.Int64 == nil && that.Int64 != nil") + } else if that1.Int64 != nil { + return fmt.Errorf("Int64 this(%v) Not Equal that(%v)", this.Int64, that1.Int64) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *Wilson) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*Wilson) + if !ok { + that2, ok := that.(Wilson) + 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.Int64 != nil && that1.Int64 != nil { + if *this.Int64 != *that1.Int64 { + return false + } + } else if this.Int64 != nil { + return false + } else if that1.Int64 != nil { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} + +type CastawayFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetCastMapValueMessage() map[int32]MyWilson + GetCastMapValueMessageNullable() map[int32]*MyWilson +} + +func (this *Castaway) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *Castaway) TestProto() github_com_gogo_protobuf_proto.Message { + return NewCastawayFromFace(this) +} + +func (this *Castaway) GetCastMapValueMessage() map[int32]MyWilson { + return this.CastMapValueMessage +} + +func (this *Castaway) GetCastMapValueMessageNullable() map[int32]*MyWilson { + return this.CastMapValueMessageNullable +} + +func NewCastawayFromFace(that CastawayFace) *Castaway { + this := &Castaway{} + this.CastMapValueMessage = that.GetCastMapValueMessage() + this.CastMapValueMessageNullable = that.GetCastMapValueMessageNullable() + return this +} + +type WilsonFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetInt64() *int64 +} + +func (this *Wilson) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *Wilson) TestProto() github_com_gogo_protobuf_proto.Message { + return NewWilsonFromFace(this) +} + +func (this *Wilson) GetInt64() *int64 { + return this.Int64 +} + +func NewWilsonFromFace(that WilsonFace) *Wilson { + this := &Wilson{} + this.Int64 = that.GetInt64() + return this +} + +func (this *Castaway) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 6) + s = append(s, "&castvalue.Castaway{") + keysForCastMapValueMessage := make([]int32, 0, len(this.CastMapValueMessage)) + for k := range this.CastMapValueMessage { + keysForCastMapValueMessage = append(keysForCastMapValueMessage, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForCastMapValueMessage) + mapStringForCastMapValueMessage := "map[int32]MyWilson{" + for _, k := range keysForCastMapValueMessage { + mapStringForCastMapValueMessage += fmt.Sprintf("%#v: %#v,", k, this.CastMapValueMessage[k]) + } + mapStringForCastMapValueMessage += "}" + if this.CastMapValueMessage != nil { + s = append(s, "CastMapValueMessage: "+mapStringForCastMapValueMessage+",\n") + } + keysForCastMapValueMessageNullable := make([]int32, 0, len(this.CastMapValueMessageNullable)) + for k := range this.CastMapValueMessageNullable { + keysForCastMapValueMessageNullable = append(keysForCastMapValueMessageNullable, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForCastMapValueMessageNullable) + mapStringForCastMapValueMessageNullable := "map[int32]*MyWilson{" + for _, k := range keysForCastMapValueMessageNullable { + mapStringForCastMapValueMessageNullable += fmt.Sprintf("%#v: %#v,", k, this.CastMapValueMessageNullable[k]) + } + mapStringForCastMapValueMessageNullable += "}" + if this.CastMapValueMessageNullable != nil { + s = append(s, "CastMapValueMessageNullable: "+mapStringForCastMapValueMessageNullable+",\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 *Wilson) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&castvalue.Wilson{") + if this.Int64 != nil { + s = append(s, "Int64: "+valueToGoStringCastvalue(this.Int64, "int64")+",\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 valueToGoStringCastvalue(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 extensionToGoStringCastvalue(e map[int32]github_com_gogo_protobuf_proto.Extension) string { + if e == nil { + return "nil" + } + s := "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 +} +func NewPopulatedCastaway(r randyCastvalue, easy bool) *Castaway { + this := &Castaway{} + if r.Intn(10) != 0 { + v1 := r.Intn(10) + this.CastMapValueMessage = make(map[int32]MyWilson) + for i := 0; i < v1; i++ { + this.CastMapValueMessage[int32(r.Int31())] = (MyWilson)(*NewPopulatedWilson(r, easy)) + } + } + if r.Intn(10) != 0 { + v2 := r.Intn(10) + this.CastMapValueMessageNullable = make(map[int32]*MyWilson) + for i := 0; i < v2; i++ { + this.CastMapValueMessageNullable[int32(r.Int31())] = (*MyWilson)(NewPopulatedWilson(r, easy)) + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedCastvalue(r, 3) + } + return this +} + +func NewPopulatedWilson(r randyCastvalue, easy bool) *Wilson { + this := &Wilson{} + if r.Intn(10) != 0 { + v3 := int64(r.Int63()) + if r.Intn(2) == 0 { + v3 *= -1 + } + this.Int64 = &v3 + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedCastvalue(r, 2) + } + return this +} + +type randyCastvalue interface { + Float32() float32 + Float64() float64 + Int63() int64 + Int31() int32 + Uint32() uint32 + Intn(n int) int +} + +func randUTF8RuneCastvalue(r randyCastvalue) 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 randStringCastvalue(r randyCastvalue) string { + v4 := r.Intn(100) + tmps := make([]rune, v4) + for i := 0; i < v4; i++ { + tmps[i] = randUTF8RuneCastvalue(r) + } + return string(tmps) +} +func randUnrecognizedCastvalue(r randyCastvalue, 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 = randFieldCastvalue(data, r, fieldNumber, wire) + } + return data +} +func randFieldCastvalue(data []byte, r randyCastvalue, fieldNumber int, wire int) []byte { + key := uint32(fieldNumber)<<3 | uint32(wire) + switch wire { + case 0: + data = encodeVarintPopulateCastvalue(data, uint64(key)) + v5 := r.Int63() + if r.Intn(2) == 0 { + v5 *= -1 + } + data = encodeVarintPopulateCastvalue(data, uint64(v5)) + case 1: + data = encodeVarintPopulateCastvalue(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 = encodeVarintPopulateCastvalue(data, uint64(key)) + ll := r.Intn(100) + data = encodeVarintPopulateCastvalue(data, uint64(ll)) + for j := 0; j < ll; j++ { + data = append(data, byte(r.Intn(256))) + } + default: + data = encodeVarintPopulateCastvalue(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 encodeVarintPopulateCastvalue(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 *Castaway) Size() (n int) { + var l int + _ = l + if len(m.CastMapValueMessage) > 0 { + for k, v := range m.CastMapValueMessage { + _ = k + _ = v + l = ((*Wilson)(&v)).Size() + mapEntrySize := 1 + sovCastvalue(uint64(k)) + 1 + l + sovCastvalue(uint64(l)) + n += mapEntrySize + 1 + sovCastvalue(uint64(mapEntrySize)) + } + } + if len(m.CastMapValueMessageNullable) > 0 { + for k, v := range m.CastMapValueMessageNullable { + _ = k + _ = v + l = 0 + if v != nil { + l = ((*Wilson)(v)).Size() + } + mapEntrySize := 1 + sovCastvalue(uint64(k)) + 1 + l + sovCastvalue(uint64(l)) + n += mapEntrySize + 1 + sovCastvalue(uint64(mapEntrySize)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *Wilson) Size() (n int) { + var l int + _ = l + if m.Int64 != nil { + n += 1 + sovCastvalue(uint64(*m.Int64)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func sovCastvalue(x uint64) (n int) { + for { + n++ + x >>= 7 + if x == 0 { + break + } + } + return n +} +func sozCastvalue(x uint64) (n int) { + return sovCastvalue(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (this *Castaway) String() string { + if this == nil { + return "nil" + } + keysForCastMapValueMessage := make([]int32, 0, len(this.CastMapValueMessage)) + for k := range this.CastMapValueMessage { + keysForCastMapValueMessage = append(keysForCastMapValueMessage, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForCastMapValueMessage) + mapStringForCastMapValueMessage := "map[int32]MyWilson{" + for _, k := range keysForCastMapValueMessage { + mapStringForCastMapValueMessage += fmt.Sprintf("%v: %v,", k, this.CastMapValueMessage[k]) + } + mapStringForCastMapValueMessage += "}" + keysForCastMapValueMessageNullable := make([]int32, 0, len(this.CastMapValueMessageNullable)) + for k := range this.CastMapValueMessageNullable { + keysForCastMapValueMessageNullable = append(keysForCastMapValueMessageNullable, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForCastMapValueMessageNullable) + mapStringForCastMapValueMessageNullable := "map[int32]*MyWilson{" + for _, k := range keysForCastMapValueMessageNullable { + mapStringForCastMapValueMessageNullable += fmt.Sprintf("%v: %v,", k, this.CastMapValueMessageNullable[k]) + } + mapStringForCastMapValueMessageNullable += "}" + s := strings.Join([]string{`&Castaway{`, + `CastMapValueMessage:` + mapStringForCastMapValueMessage + `,`, + `CastMapValueMessageNullable:` + mapStringForCastMapValueMessageNullable + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *Wilson) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&Wilson{`, + `Int64:` + valueToStringCastvalue(this.Int64) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func valueToStringCastvalue(v interface{}) string { + rv := reflect.ValueOf(v) + if rv.IsNil() { + return "nil" + } + pv := reflect.Indirect(rv).Interface() + return fmt.Sprintf("*%v", pv) +} +func (m *Castaway) 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 ErrIntOverflowCastvalue + } + 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: Castaway: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Castaway: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field CastMapValueMessage", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCastvalue + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthCastvalue + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var keykey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCastvalue + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + keykey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapkey int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCastvalue + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + mapkey |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var valuekey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCastvalue + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + valuekey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapmsglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCastvalue + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + mapmsglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if mapmsglen < 0 { + return ErrInvalidLengthCastvalue + } + postmsgIndex := iNdEx + mapmsglen + if mapmsglen < 0 { + return ErrInvalidLengthCastvalue + } + if postmsgIndex > l { + return io.ErrUnexpectedEOF + } + mapvalue := &Wilson{} + if err := mapvalue.Unmarshal(data[iNdEx:postmsgIndex]); err != nil { + return err + } + iNdEx = postmsgIndex + if m.CastMapValueMessage == nil { + m.CastMapValueMessage = make(map[int32]MyWilson) + } + m.CastMapValueMessage[mapkey] = ((MyWilson)(*mapvalue)) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field CastMapValueMessageNullable", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCastvalue + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthCastvalue + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var keykey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCastvalue + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + keykey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapkey int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCastvalue + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + mapkey |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var valuekey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCastvalue + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + valuekey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapmsglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCastvalue + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + mapmsglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if mapmsglen < 0 { + return ErrInvalidLengthCastvalue + } + postmsgIndex := iNdEx + mapmsglen + if mapmsglen < 0 { + return ErrInvalidLengthCastvalue + } + if postmsgIndex > l { + return io.ErrUnexpectedEOF + } + mapvalue := &Wilson{} + if err := mapvalue.Unmarshal(data[iNdEx:postmsgIndex]); err != nil { + return err + } + iNdEx = postmsgIndex + if m.CastMapValueMessageNullable == nil { + m.CastMapValueMessageNullable = make(map[int32]*MyWilson) + } + m.CastMapValueMessageNullable[mapkey] = ((*MyWilson)(mapvalue)) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipCastvalue(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthCastvalue + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Wilson) 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 ErrIntOverflowCastvalue + } + 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: Wilson: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Wilson: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Int64", wireType) + } + var v int64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCastvalue + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Int64 = &v + default: + iNdEx = preIndex + skippy, err := skipCastvalue(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthCastvalue + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipCastvalue(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, ErrIntOverflowCastvalue + } + 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, ErrIntOverflowCastvalue + } + 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, ErrIntOverflowCastvalue + } + 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, ErrInvalidLengthCastvalue + } + return iNdEx, nil + case 3: + for { + var innerWire uint64 + var start int = iNdEx + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowCastvalue + } + 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 := skipCastvalue(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 ( + ErrInvalidLengthCastvalue = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowCastvalue = fmt.Errorf("proto: integer overflow") +) + +var fileDescriptorCastvalue = []byte{ + // 340 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xe2, 0x52, 0x4a, 0xce, 0xcf, 0x4d, + 0xca, 0x2f, 0xd6, 0x2f, 0xcd, 0xcb, 0x4d, 0x2c, 0x2a, 0xce, 0x48, 0xcc, 0x49, 0x2d, 0xd2, 0x4f, + 0x4e, 0x2c, 0x2e, 0x29, 0x4b, 0xcc, 0x29, 0x4d, 0xd5, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0xe2, + 0x84, 0x0b, 0x48, 0xe9, 0xa6, 0x67, 0x96, 0x64, 0x94, 0x26, 0xe9, 0x01, 0x75, 0xe9, 0xa7, 0xe7, + 0xa7, 0xe7, 0xeb, 0x83, 0x55, 0x24, 0x95, 0xa6, 0x81, 0x79, 0x60, 0x0e, 0x98, 0x05, 0xd1, 0xa9, + 0x74, 0x90, 0x99, 0x8b, 0xc3, 0x19, 0xa8, 0x39, 0xb1, 0x3c, 0xb1, 0x52, 0xa8, 0x80, 0x4b, 0x18, + 0xc4, 0xf6, 0x4d, 0x2c, 0x08, 0x03, 0x99, 0xe5, 0x9b, 0x5a, 0x5c, 0x9c, 0x98, 0x9e, 0x2a, 0xc1, + 0xa8, 0xc0, 0xac, 0xc1, 0x6d, 0xa4, 0xa3, 0x87, 0xb0, 0x15, 0xa6, 0x43, 0x0f, 0x8b, 0x72, 0xd7, + 0xbc, 0x92, 0xa2, 0x4a, 0x27, 0x81, 0x13, 0xf7, 0xe4, 0x19, 0xba, 0xee, 0xcb, 0x73, 0xf8, 0x56, + 0x86, 0x67, 0xe6, 0x14, 0xe7, 0xe7, 0x05, 0x09, 0x27, 0x63, 0xaa, 0x15, 0x6a, 0x61, 0xe4, 0x92, + 0xc6, 0x62, 0x86, 0x5f, 0x69, 0x4e, 0x4e, 0x62, 0x52, 0x4e, 0xaa, 0x04, 0x13, 0xd8, 0x6a, 0x13, + 0x22, 0xad, 0x86, 0x69, 0x83, 0x38, 0x81, 0x07, 0xc5, 0x7a, 0xe9, 0x64, 0xdc, 0xea, 0xa5, 0x22, + 0xb9, 0x24, 0x70, 0xf9, 0x44, 0x48, 0x80, 0x8b, 0x39, 0x3b, 0xb5, 0x12, 0x18, 0x08, 0x8c, 0x1a, + 0xac, 0x41, 0x20, 0xa6, 0x90, 0x3a, 0x17, 0x2b, 0xd8, 0x2d, 0x40, 0xd7, 0x31, 0x02, 0x5d, 0x27, + 0x88, 0xe4, 0x3a, 0xa8, 0x65, 0x10, 0x79, 0x2b, 0x26, 0x0b, 0x46, 0xa9, 0x44, 0x2e, 0x05, 0x42, + 0x2e, 0xa5, 0xd0, 0x0a, 0x25, 0x39, 0x2e, 0x36, 0x88, 0xa0, 0x90, 0x08, 0x17, 0xab, 0x67, 0x5e, + 0x89, 0x99, 0x09, 0xd8, 0x28, 0xe6, 0x20, 0xd6, 0x4c, 0x10, 0xc7, 0xc9, 0xe7, 0xc4, 0x43, 0x39, + 0x86, 0x0b, 0x40, 0x7c, 0x03, 0x88, 0x1f, 0x3c, 0x94, 0x63, 0x7c, 0x01, 0xc4, 0x1f, 0x80, 0xf8, + 0x07, 0x10, 0x37, 0x3c, 0x92, 0x63, 0x5c, 0x01, 0xc4, 0x1b, 0x80, 0x78, 0x07, 0x10, 0x1f, 0x00, + 0xe2, 0x13, 0x8f, 0x80, 0xea, 0x81, 0xf4, 0x03, 0x20, 0x7e, 0x01, 0x64, 0x7f, 0x00, 0xd2, 0x3f, + 0x80, 0x74, 0xc3, 0x63, 0x39, 0x06, 0x40, 0x00, 0x00, 0x00, 0xff, 0xff, 0xa5, 0x77, 0x04, 0x2e, + 0x90, 0x02, 0x00, 0x00, +} diff --git a/vendor/github.com/gogo/protobuf/test/castvalue/combos/unmarshaler/castvalue.proto b/vendor/github.com/gogo/protobuf/test/castvalue/combos/unmarshaler/castvalue.proto new file mode 100644 index 000000000..a677196f2 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/castvalue/combos/unmarshaler/castvalue.proto @@ -0,0 +1,64 @@ +// Copyright (c) 2015, Vastech SA (PTY) LTD. All rights reserved. +// http://github.com/gogo/protobuf/gogoproto +// +// 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 castvalue; + +import "github.com/gogo/protobuf/gogoproto/gogo.proto"; + +option (gogoproto.goproto_stringer_all) = false; +option (gogoproto.goproto_enum_prefix_all) = false; +option (gogoproto.goproto_getters_all) = false; + +option (gogoproto.equal_all) = true; +option (gogoproto.verbose_equal_all) = true; +option (gogoproto.stringer_all) = true; +option (gogoproto.gostring_all) = true; +option (gogoproto.face_all) = true; +option (gogoproto.description_all) = true; + +option (gogoproto.testgen_all) = true; +option (gogoproto.populate_all) = true; +option (gogoproto.benchgen_all) = true; +option (gogoproto.unmarshaler_all) = true; +option (gogoproto.marshaler_all) = false; +option (gogoproto.sizer_all) = true; + +option (gogoproto.goproto_enum_stringer_all) = false; +option (gogoproto.enum_stringer_all) = true; + +option (gogoproto.unsafe_marshaler_all) = false; +option (gogoproto.unsafe_unmarshaler_all) = false; + +message Castaway { + map CastMapValueMessage = 1 [(gogoproto.castvalue) = "MyWilson", (gogoproto.nullable) = false]; + map CastMapValueMessageNullable = 2 [(gogoproto.castvalue) = "MyWilson"]; +} + +message Wilson { + optional int64 Int64 = 1; +} diff --git a/vendor/github.com/gogo/protobuf/test/castvalue/combos/unmarshaler/castvaluepb_test.go b/vendor/github.com/gogo/protobuf/test/castvalue/combos/unmarshaler/castvaluepb_test.go new file mode 100644 index 000000000..fc745be76 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/castvalue/combos/unmarshaler/castvaluepb_test.go @@ -0,0 +1,457 @@ +// Code generated by protoc-gen-gogo. +// source: combos/unmarshaler/castvalue.proto +// DO NOT EDIT! + +/* +Package castvalue is a generated protocol buffer package. + +It is generated from these files: + combos/unmarshaler/castvalue.proto + +It has these top-level messages: + Castaway + Wilson +*/ +package castvalue + +import testing "testing" +import math_rand "math/rand" +import time "time" +import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" +import github_com_gogo_protobuf_jsonpb "github.com/gogo/protobuf/jsonpb" +import fmt "fmt" +import go_parser "go/parser" +import proto "github.com/gogo/protobuf/proto" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +func TestCastawayProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCastaway(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Castaway{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkCastawayProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Castaway, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedCastaway(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkCastawayProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedCastaway(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &Castaway{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestWilsonProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedWilson(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Wilson{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkWilsonProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Wilson, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedWilson(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkWilsonProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedWilson(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &Wilson{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestCastawayJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCastaway(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Castaway{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestWilsonJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedWilson(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Wilson{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestCastawayProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCastaway(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &Castaway{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestCastawayProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCastaway(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &Castaway{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestWilsonProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedWilson(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &Wilson{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestWilsonProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedWilson(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &Wilson{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestCastvalueDescription(t *testing.T) { + CastvalueDescription() +} +func TestCastawayVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCastaway(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &Castaway{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestWilsonVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedWilson(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &Wilson{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestCastawayFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCastaway(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestWilsonFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedWilson(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestCastawayGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCastaway(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestWilsonGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedWilson(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestCastawaySize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCastaway(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkCastawaySize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Castaway, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedCastaway(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestWilsonSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedWilson(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkWilsonSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Wilson, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedWilson(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestCastawayStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCastaway(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestWilsonStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedWilson(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} + +//These tests are generated by github.com/gogo/protobuf/plugin/testgen diff --git a/vendor/github.com/gogo/protobuf/test/castvalue/combos/unmarshaler/mytypes.go b/vendor/github.com/gogo/protobuf/test/castvalue/combos/unmarshaler/mytypes.go new file mode 100644 index 000000000..9892212c4 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/castvalue/combos/unmarshaler/mytypes.go @@ -0,0 +1,31 @@ +// Extensions for Protocol Buffers to create more go like structures. +// +// Copyright (c) 2013, Vastech SA (PTY) LTD. All rights reserved. +// http://github.com/gogo/protobuf/gogoproto +// +// 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 castvalue + +type MyWilson Wilson diff --git a/vendor/github.com/gogo/protobuf/test/castvalue/combos/unsafeboth/castvalue.pb.go b/vendor/github.com/gogo/protobuf/test/castvalue/combos/unsafeboth/castvalue.pb.go new file mode 100644 index 000000000..40177c0ce --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/castvalue/combos/unsafeboth/castvalue.pb.go @@ -0,0 +1,1418 @@ +// Code generated by protoc-gen-gogo. +// source: combos/unsafeboth/castvalue.proto +// DO NOT EDIT! + +/* + Package castvalue is a generated protocol buffer package. + + It is generated from these files: + combos/unsafeboth/castvalue.proto + + It has these top-level messages: + Castaway + Wilson +*/ +package castvalue + +import proto "github.com/gogo/protobuf/proto" +import fmt "fmt" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" + +import github_com_gogo_protobuf_protoc_gen_gogo_descriptor "github.com/gogo/protobuf/protoc-gen-gogo/descriptor" +import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" +import compress_gzip "compress/gzip" +import bytes "bytes" +import io_ioutil "io/ioutil" + +import strings "strings" +import sort "sort" +import strconv "strconv" +import reflect "reflect" +import github_com_gogo_protobuf_sortkeys "github.com/gogo/protobuf/sortkeys" + +import errors "errors" + +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. +const _ = proto.GoGoProtoPackageIsVersion1 + +type Castaway struct { + CastMapValueMessage map[int32]MyWilson `protobuf:"bytes,1,rep,name=CastMapValueMessage,json=castMapValueMessage,castvalue=MyWilson,castvaluetype=castvalue.Wilson" json:"CastMapValueMessage" protobuf_key:"varint,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + CastMapValueMessageNullable map[int32]*MyWilson `protobuf:"bytes,2,rep,name=CastMapValueMessageNullable,json=castMapValueMessageNullable,castvalue=MyWilson,castvaluetype=castvalue.Wilson" json:"CastMapValueMessageNullable,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *Castaway) Reset() { *m = Castaway{} } +func (*Castaway) ProtoMessage() {} +func (*Castaway) Descriptor() ([]byte, []int) { return fileDescriptorCastvalue, []int{0} } + +type Wilson struct { + Int64 *int64 `protobuf:"varint,1,opt,name=Int64,json=int64" json:"Int64,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *Wilson) Reset() { *m = Wilson{} } +func (*Wilson) ProtoMessage() {} +func (*Wilson) Descriptor() ([]byte, []int) { return fileDescriptorCastvalue, []int{1} } + +func init() { + proto.RegisterType((*Castaway)(nil), "castvalue.Castaway") + proto.RegisterType((*Wilson)(nil), "castvalue.Wilson") +} +func (this *Castaway) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return CastvalueDescription() +} +func (this *Wilson) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return CastvalueDescription() +} +func CastvalueDescription() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + d := &github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet{} + var gzipped = []byte{ + // 3470 bytes of a gzipped FileDescriptorSet + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xcc, 0x5a, 0x6b, 0x6c, 0x23, 0x57, + 0x15, 0xae, 0x63, 0x3b, 0xb1, 0x8f, 0x1d, 0xc7, 0x99, 0xa4, 0xbb, 0xde, 0x6c, 0xbb, 0xd9, 0x75, + 0x1f, 0xbb, 0xdd, 0xb6, 0x49, 0x59, 0xfa, 0xd8, 0xba, 0xd0, 0x2a, 0x0f, 0x6f, 0xea, 0x55, 0x5e, + 0x4c, 0x92, 0x76, 0xb7, 0xfc, 0x18, 0x4d, 0xc6, 0x37, 0x8e, 0x77, 0xc7, 0x33, 0xc6, 0x33, 0xde, + 0xdd, 0xf4, 0x57, 0x51, 0x0b, 0xa8, 0x20, 0x28, 0x2f, 0x89, 0xbe, 0xa1, 0x95, 0xa0, 0xa5, 0xbc, + 0x5a, 0x5e, 0x42, 0xfc, 0x2a, 0x42, 0x85, 0xfe, 0x42, 0xc0, 0x2f, 0x7e, 0x20, 0x68, 0x4b, 0x25, + 0x0a, 0x14, 0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1, 0x62, 0x9f, 0xe2, 0x0c, 0xa4, 0x6b, + 0xc4, 0x71, 0xb0, 0x03, 0x9a, 0xbb, 0x55, 0x27, 0xb9, 0x18, 0x1b, 0xfd, 0xc1, 0x8e, 0xd1, 0xb7, + 0x8f, 0x3c, 0x25, 0x50, 0xab, 0x08, 0x52, 0xa6, 0x20, 0x49, 0xac, 0x66, 0x8d, 0x33, 0xc4, 0xb7, + 0xb1, 0x5f, 0x11, 0x35, 0xda, 0x59, 0x12, 0x14, 0x26, 0x28, 0x06, 0x1c, 0xd2, 0x38, 0x57, 0x35, + 0x48, 0xae, 0x9f, 0x11, 0x1c, 0xee, 0x20, 0x58, 0xe1, 0xed, 0xed, 0x1c, 0x12, 0x87, 0x43, 0x49, + 0x92, 0x0b, 0x2e, 0xb1, 0x9c, 0xaa, 0x6d, 0xe5, 0x06, 0x18, 0xc9, 0x55, 0x5d, 0x66, 0x91, 0x98, + 0xe5, 0x76, 0x8a, 0x16, 0x4e, 0xb9, 0x19, 0x06, 0xec, 0xba, 0x8b, 0x77, 0x4e, 0x2e, 0x81, 0xf3, + 0x93, 0x3a, 0x76, 0x59, 0x57, 0x47, 0x58, 0xe2, 0x3a, 0xaa, 0x54, 0x56, 0x4a, 0x90, 0x75, 0xec, + 0x66, 0xc3, 0x20, 0x9a, 0x61, 0x97, 0x89, 0x56, 0xb5, 0x36, 0xec, 0x5c, 0x92, 0x11, 0x8c, 0x77, + 0x0e, 0x84, 0x29, 0xce, 0xa0, 0x5e, 0x09, 0xd5, 0xd4, 0x8c, 0x13, 0x78, 0x56, 0xf6, 0x40, 0xbf, + 0xb3, 0x65, 0xb9, 0xfa, 0x85, 0x5c, 0x9a, 0x79, 0x88, 0x78, 0xca, 0xff, 0x3b, 0x0e, 0x43, 0xbd, + 0xb8, 0xd8, 0x6d, 0x10, 0xdf, 0xa0, 0xa3, 0x44, 0x07, 0xdb, 0x85, 0x0d, 0x38, 0x26, 0x68, 0xc4, + 0xfe, 0x77, 0x69, 0xc4, 0x29, 0x48, 0x59, 0xc4, 0x71, 0x49, 0x99, 0x7b, 0x44, 0xb4, 0x47, 0x9f, + 0x02, 0x0e, 0xea, 0x74, 0xa9, 0xd8, 0xbb, 0x72, 0xa9, 0x53, 0x30, 0xe4, 0x75, 0x49, 0x6b, 0xe8, + 0x56, 0x45, 0xfa, 0xe6, 0x64, 0x58, 0x4f, 0x26, 0x8a, 0x12, 0xa7, 0x52, 0x98, 0x9a, 0x21, 0x81, + 0x67, 0x65, 0x16, 0xc0, 0xb6, 0x88, 0xbd, 0x81, 0xcb, 0xcb, 0x30, 0xd1, 0x4f, 0xba, 0x5b, 0x69, + 0x89, 0xaa, 0x74, 0x58, 0xc9, 0xe6, 0x52, 0xc3, 0x54, 0x6e, 0x6d, 0xb9, 0xda, 0xc0, 0x36, 0x9e, + 0xb2, 0xc0, 0x17, 0x59, 0x87, 0xb7, 0xad, 0x41, 0xa6, 0x41, 0xa8, 0xdf, 0xa3, 0x89, 0xf9, 0xc8, + 0x92, 0xac, 0x13, 0x13, 0xa1, 0x23, 0x53, 0x05, 0x8c, 0x0f, 0x6c, 0xb0, 0xe1, 0x7f, 0x54, 0xae, + 0x00, 0x4f, 0xa0, 0x31, 0xb7, 0x02, 0x16, 0x85, 0xd2, 0x52, 0xb8, 0x88, 0xb2, 0xb1, 0xe3, 0x90, + 0x09, 0x9a, 0x47, 0x19, 0x85, 0xb8, 0xe3, 0xea, 0x0d, 0x97, 0x79, 0x61, 0x5c, 0xe5, 0x0f, 0x4a, + 0x16, 0xa2, 0x18, 0x64, 0x58, 0x94, 0x8b, 0xab, 0xf4, 0x76, 0xec, 0x16, 0x18, 0x0c, 0xbc, 0xbe, + 0x57, 0x60, 0xfe, 0xe1, 0x7e, 0x18, 0xed, 0xe6, 0x73, 0x5d, 0xdd, 0x1f, 0x97, 0x0f, 0x7a, 0xc0, + 0x3a, 0x69, 0xa0, 0xdf, 0x51, 0x06, 0xf1, 0x84, 0x1e, 0x15, 0x37, 0xf5,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30, 0xa3, 0x25, + 0x98, 0xaa, 0x42, 0xdb, 0x96, 0x68, 0xd3, 0x8c, 0x6c, 0x51, 0x6e, 0x82, 0x11, 0x86, 0xa8, 0x61, + 0xe0, 0xad, 0xd6, 0x4d, 0xa2, 0xd1, 0x3d, 0x80, 0xc3, 0xe2, 0xa9, 0xd7, 0xb3, 0x61, 0xaa, 0xb1, + 0x20, 0x14, 0x68, 0x8f, 0x1c, 0x65, 0x0e, 0x2e, 0x67, 0xb0, 0x0a, 0xb1, 0x48, 0x43, 0x77, 0x89, + 0x46, 0x3e, 0xd6, 0x44, 0x5d, 0x4d, 0xb7, 0xca, 0xda, 0xa6, 0xee, 0x6c, 0xe6, 0x46, 0xfd, 0x04, + 0xfb, 0xa8, 0xee, 0x9c, 0x50, 0x2d, 0x32, 0xcd, 0x29, 0xab, 0x7c, 0x27, 0xea, 0x29, 0x05, 0xd8, + 0xc3, 0x88, 0xd0, 0x28, 0x38, 0x66, 0xcd, 0xd8, 0x24, 0xc6, 0x59, 0xad, 0xe9, 0x6e, 0x1c, 0xcf, + 0xed, 0xf7, 0x33, 0xb0, 0x4e, 0xae, 0x30, 0x9d, 0x19, 0xaa, 0xb2, 0x86, 0x1a, 0xca, 0x0a, 0xa4, + 0xe9, 0x7c, 0xd4, 0xaa, 0xf7, 0x62, 0xb7, 0xed, 0x06, 0xcb, 0x11, 0x99, 0x2e, 0x8b, 0xdb, 0x67, + 0xc4, 0x89, 0x25, 0x01, 0x58, 0xc0, 0xfa, 0xb4, 0x10, 0x5f, 0x59, 0x2e, 0x16, 0x67, 0xd5, 0x94, + 0x64, 0x39, 0x61, 0x37, 0xa8, 0x4f, 0x55, 0x6c, 0xcf, 0xc6, 0x29, 0xee, 0x53, 0x15, 0x5b, 0x5a, + 0x18, 0xed, 0x65, 0x18, 0x7c, 0xd8, 0xb8, 0x77, 0x11, 0xc5, 0xba, 0x93, 0xcb, 0x06, 0xec, 0x65, + 0x18, 0x73, 0x5c, 0x41, 0xb8, 0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5e, 0xe8, 0xab, 0x1e, 0x72, 0xec, + 0x57, 0x11, 0x48, 0x48, 0x31, 0x26, 0x8a, 0x58, 0x5d, 0x77, 0x37, 0x19, 0x5d, 0x7c, 0xba, 0x2f, + 0x1b, 0x51, 0xd9, 0x33, 0x95, 0x63, 0x35, 0x63, 0x31, 0x17, 0x10, 0x72, 0xfa, 0x4c, 0xe7, 0xd5, + 0x24, 0x7a, 0x99, 0x15, 0xb8, 0x76, 0xad, 0x86, 0x33, 0xe9, 0xc8, 0x79, 0x15, 0xf2, 0x19, 0x21, + 0xa6, 0xe7, 0xe2, 0x6e, 0x43, 0xaf, 0x9a, 0x01, 0xdd, 0x18, 0xd3, 0xcd, 0xca, 0x06, 0x4f, 0xb9, + 0x00, 0xfb, 0x24, 0x6f, 0x99, 0xb8, 0x3a, 0x16, 0xcf, 0xe5, 0x16, 0xa8, 0x9f, 0x9d, 0x76, 0xed, + 0x15, 0x0a, 0xb3, 0xa2, 0x5d, 0x62, 0xa7, 0x4f, 0x61, 0x21, 0x6b, 0xd7, 0xda, 0x2d, 0x31, 0x9d, + 0x6d, 0xdb, 0x77, 0x39, 0x77, 0x46, 0xee, 0x81, 0x56, 0x51, 0xf1, 0x74, 0x5f, 0x74, 0x6e, 0x79, + 0xfa, 0xb9, 0xbe, 0xb1, 0x39, 0x8e, 0x5b, 0x96, 0x16, 0x54, 0xc9, 0x86, 0x49, 0x0c, 0x6a, 0x1d, + 0x78, 0xea, 0x0a, 0xb8, 0xbe, 0x52, 0x75, 0x37, 0x9b, 0xeb, 0x13, 0xf8, 0x86, 0xc9, 0x8a, 0x5d, + 0xb1, 0x5b, 0x9f, 0x33, 0xe8, 0x13, 0x7b, 0x60, 0x77, 0xe2, 0x93, 0x46, 0xd2, 0x93, 0x8e, 0x85, + 0x7e, 0xff, 0x28, 0x2c, 0xc2, 0x88, 0x50, 0xd6, 0xd8, 0x99, 0x2a, 0x2f, 0x41, 0x95, 0x1d, 0x37, + 0xe4, 0xb9, 0x17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4, 0x97, 0x6d, 0x25, 0xcb, 0xbd, 0xf9, 0x46, 0x46, 0x15, + 0x55, 0xe3, 0x55, 0xfa, 0x30, 0x3d, 0xff, 0xf2, 0xab, 0x07, 0x2e, 0xf9, 0x35, 0x5e, 0xbf, 0xc3, + 0xeb, 0x95, 0x57, 0x0f, 0x44, 0xde, 0xc0, 0xeb, 0x2d, 0xbc, 0xde, 0xc6, 0xeb, 0xbe, 0xd7, 0x0e, + 0x44, 0x9e, 0xc5, 0xeb, 0x79, 0xbc, 0x7e, 0x82, 0xd7, 0x8b, 0x78, 0xbd, 0xfc, 0x1a, 0xea, 0xe3, + 0xf5, 0x0a, 0xde, 0xbf, 0x81, 0xff, 0xdf, 0xc2, 0xff, 0x6f, 0xe3, 0x75, 0xdf, 0x9f, 0x0e, 0x44, + 0xfe, 0x13, 0x00, 0x00, 0xff, 0xff, 0x55, 0xa1, 0xab, 0x0b, 0xfc, 0x2c, 0x00, 0x00, + } + r := bytes.NewReader(gzipped) + gzipr, err := compress_gzip.NewReader(r) + if err != nil { + panic(err) + } + ungzipped, err := io_ioutil.ReadAll(gzipr) + if err != nil { + panic(err) + } + if err := github_com_gogo_protobuf_proto.Unmarshal(ungzipped, d); err != nil { + panic(err) + } + return d +} +func (this *Castaway) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*Castaway) + if !ok { + that2, ok := that.(Castaway) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *Castaway") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *Castaway but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *Castaway but is not nil && this == nil") + } + if len(this.CastMapValueMessage) != len(that1.CastMapValueMessage) { + return fmt.Errorf("CastMapValueMessage this(%v) Not Equal that(%v)", len(this.CastMapValueMessage), len(that1.CastMapValueMessage)) + } + for i := range this.CastMapValueMessage { + a := (Wilson)(this.CastMapValueMessage[i]) + b := (Wilson)(that1.CastMapValueMessage[i]) + if !(&a).Equal(&b) { + return fmt.Errorf("CastMapValueMessage this[%v](%v) Not Equal that[%v](%v)", i, this.CastMapValueMessage[i], i, that1.CastMapValueMessage[i]) + } + } + if len(this.CastMapValueMessageNullable) != len(that1.CastMapValueMessageNullable) { + return fmt.Errorf("CastMapValueMessageNullable this(%v) Not Equal that(%v)", len(this.CastMapValueMessageNullable), len(that1.CastMapValueMessageNullable)) + } + for i := range this.CastMapValueMessageNullable { + a := (*Wilson)(this.CastMapValueMessageNullable[i]) + b := (*Wilson)(that1.CastMapValueMessageNullable[i]) + if !a.Equal(b) { + return fmt.Errorf("CastMapValueMessageNullable this[%v](%v) Not Equal that[%v](%v)", i, this.CastMapValueMessageNullable[i], i, that1.CastMapValueMessageNullable[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *Castaway) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*Castaway) + if !ok { + that2, ok := that.(Castaway) + 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.CastMapValueMessage) != len(that1.CastMapValueMessage) { + return false + } + for i := range this.CastMapValueMessage { + a := (Wilson)(this.CastMapValueMessage[i]) + b := (Wilson)(that1.CastMapValueMessage[i]) + if !(&a).Equal(&b) { + return false + } + } + if len(this.CastMapValueMessageNullable) != len(that1.CastMapValueMessageNullable) { + return false + } + for i := range this.CastMapValueMessageNullable { + a := (*Wilson)(this.CastMapValueMessageNullable[i]) + b := (*Wilson)(that1.CastMapValueMessageNullable[i]) + if !a.Equal(b) { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *Wilson) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*Wilson) + if !ok { + that2, ok := that.(Wilson) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *Wilson") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *Wilson but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *Wilson but is not nil && this == nil") + } + if this.Int64 != nil && that1.Int64 != nil { + if *this.Int64 != *that1.Int64 { + return fmt.Errorf("Int64 this(%v) Not Equal that(%v)", *this.Int64, *that1.Int64) + } + } else if this.Int64 != nil { + return fmt.Errorf("this.Int64 == nil && that.Int64 != nil") + } else if that1.Int64 != nil { + return fmt.Errorf("Int64 this(%v) Not Equal that(%v)", this.Int64, that1.Int64) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *Wilson) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*Wilson) + if !ok { + that2, ok := that.(Wilson) + 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.Int64 != nil && that1.Int64 != nil { + if *this.Int64 != *that1.Int64 { + return false + } + } else if this.Int64 != nil { + return false + } else if that1.Int64 != nil { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} + +type CastawayFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetCastMapValueMessage() map[int32]MyWilson + GetCastMapValueMessageNullable() map[int32]*MyWilson +} + +func (this *Castaway) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *Castaway) TestProto() github_com_gogo_protobuf_proto.Message { + return NewCastawayFromFace(this) +} + +func (this *Castaway) GetCastMapValueMessage() map[int32]MyWilson { + return this.CastMapValueMessage +} + +func (this *Castaway) GetCastMapValueMessageNullable() map[int32]*MyWilson { + return this.CastMapValueMessageNullable +} + +func NewCastawayFromFace(that CastawayFace) *Castaway { + this := &Castaway{} + this.CastMapValueMessage = that.GetCastMapValueMessage() + this.CastMapValueMessageNullable = that.GetCastMapValueMessageNullable() + return this +} + +type WilsonFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetInt64() *int64 +} + +func (this *Wilson) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *Wilson) TestProto() github_com_gogo_protobuf_proto.Message { + return NewWilsonFromFace(this) +} + +func (this *Wilson) GetInt64() *int64 { + return this.Int64 +} + +func NewWilsonFromFace(that WilsonFace) *Wilson { + this := &Wilson{} + this.Int64 = that.GetInt64() + return this +} + +func (this *Castaway) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 6) + s = append(s, "&castvalue.Castaway{") + keysForCastMapValueMessage := make([]int32, 0, len(this.CastMapValueMessage)) + for k := range this.CastMapValueMessage { + keysForCastMapValueMessage = append(keysForCastMapValueMessage, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForCastMapValueMessage) + mapStringForCastMapValueMessage := "map[int32]MyWilson{" + for _, k := range keysForCastMapValueMessage { + mapStringForCastMapValueMessage += fmt.Sprintf("%#v: %#v,", k, this.CastMapValueMessage[k]) + } + mapStringForCastMapValueMessage += "}" + if this.CastMapValueMessage != nil { + s = append(s, "CastMapValueMessage: "+mapStringForCastMapValueMessage+",\n") + } + keysForCastMapValueMessageNullable := make([]int32, 0, len(this.CastMapValueMessageNullable)) + for k := range this.CastMapValueMessageNullable { + keysForCastMapValueMessageNullable = append(keysForCastMapValueMessageNullable, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForCastMapValueMessageNullable) + mapStringForCastMapValueMessageNullable := "map[int32]*MyWilson{" + for _, k := range keysForCastMapValueMessageNullable { + mapStringForCastMapValueMessageNullable += fmt.Sprintf("%#v: %#v,", k, this.CastMapValueMessageNullable[k]) + } + mapStringForCastMapValueMessageNullable += "}" + if this.CastMapValueMessageNullable != nil { + s = append(s, "CastMapValueMessageNullable: "+mapStringForCastMapValueMessageNullable+",\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 *Wilson) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&castvalue.Wilson{") + if this.Int64 != nil { + s = append(s, "Int64: "+valueToGoStringCastvalue(this.Int64, "int64")+",\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 valueToGoStringCastvalue(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 extensionToGoStringCastvalue(e map[int32]github_com_gogo_protobuf_proto.Extension) string { + if e == nil { + return "nil" + } + s := "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 +} +func NewPopulatedCastaway(r randyCastvalue, easy bool) *Castaway { + this := &Castaway{} + if r.Intn(10) != 0 { + v1 := r.Intn(10) + this.CastMapValueMessage = make(map[int32]MyWilson) + for i := 0; i < v1; i++ { + this.CastMapValueMessage[int32(r.Int31())] = (MyWilson)(*NewPopulatedWilson(r, easy)) + } + } + if r.Intn(10) != 0 { + v2 := r.Intn(10) + this.CastMapValueMessageNullable = make(map[int32]*MyWilson) + for i := 0; i < v2; i++ { + this.CastMapValueMessageNullable[int32(r.Int31())] = (*MyWilson)(NewPopulatedWilson(r, easy)) + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedCastvalue(r, 3) + } + return this +} + +func NewPopulatedWilson(r randyCastvalue, easy bool) *Wilson { + this := &Wilson{} + if r.Intn(10) != 0 { + v3 := int64(r.Int63()) + if r.Intn(2) == 0 { + v3 *= -1 + } + this.Int64 = &v3 + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedCastvalue(r, 2) + } + return this +} + +type randyCastvalue interface { + Float32() float32 + Float64() float64 + Int63() int64 + Int31() int32 + Uint32() uint32 + Intn(n int) int +} + +func randUTF8RuneCastvalue(r randyCastvalue) 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 randStringCastvalue(r randyCastvalue) string { + v4 := r.Intn(100) + tmps := make([]rune, v4) + for i := 0; i < v4; i++ { + tmps[i] = randUTF8RuneCastvalue(r) + } + return string(tmps) +} +func randUnrecognizedCastvalue(r randyCastvalue, 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 = randFieldCastvalue(data, r, fieldNumber, wire) + } + return data +} +func randFieldCastvalue(data []byte, r randyCastvalue, fieldNumber int, wire int) []byte { + key := uint32(fieldNumber)<<3 | uint32(wire) + switch wire { + case 0: + data = encodeVarintPopulateCastvalue(data, uint64(key)) + v5 := r.Int63() + if r.Intn(2) == 0 { + v5 *= -1 + } + data = encodeVarintPopulateCastvalue(data, uint64(v5)) + case 1: + data = encodeVarintPopulateCastvalue(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 = encodeVarintPopulateCastvalue(data, uint64(key)) + ll := r.Intn(100) + data = encodeVarintPopulateCastvalue(data, uint64(ll)) + for j := 0; j < ll; j++ { + data = append(data, byte(r.Intn(256))) + } + default: + data = encodeVarintPopulateCastvalue(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 encodeVarintPopulateCastvalue(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 *Castaway) Size() (n int) { + var l int + _ = l + if len(m.CastMapValueMessage) > 0 { + for k, v := range m.CastMapValueMessage { + _ = k + _ = v + l = ((*Wilson)(&v)).Size() + mapEntrySize := 1 + sovCastvalue(uint64(k)) + 1 + l + sovCastvalue(uint64(l)) + n += mapEntrySize + 1 + sovCastvalue(uint64(mapEntrySize)) + } + } + if len(m.CastMapValueMessageNullable) > 0 { + for k, v := range m.CastMapValueMessageNullable { + _ = k + _ = v + l = 0 + if v != nil { + l = ((*Wilson)(v)).Size() + } + mapEntrySize := 1 + sovCastvalue(uint64(k)) + 1 + l + sovCastvalue(uint64(l)) + n += mapEntrySize + 1 + sovCastvalue(uint64(mapEntrySize)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *Wilson) Size() (n int) { + var l int + _ = l + if m.Int64 != nil { + n += 1 + sovCastvalue(uint64(*m.Int64)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func sovCastvalue(x uint64) (n int) { + for { + n++ + x >>= 7 + if x == 0 { + break + } + } + return n +} +func sozCastvalue(x uint64) (n int) { + return sovCastvalue(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (this *Castaway) String() string { + if this == nil { + return "nil" + } + keysForCastMapValueMessage := make([]int32, 0, len(this.CastMapValueMessage)) + for k := range this.CastMapValueMessage { + keysForCastMapValueMessage = append(keysForCastMapValueMessage, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForCastMapValueMessage) + mapStringForCastMapValueMessage := "map[int32]MyWilson{" + for _, k := range keysForCastMapValueMessage { + mapStringForCastMapValueMessage += fmt.Sprintf("%v: %v,", k, this.CastMapValueMessage[k]) + } + mapStringForCastMapValueMessage += "}" + keysForCastMapValueMessageNullable := make([]int32, 0, len(this.CastMapValueMessageNullable)) + for k := range this.CastMapValueMessageNullable { + keysForCastMapValueMessageNullable = append(keysForCastMapValueMessageNullable, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForCastMapValueMessageNullable) + mapStringForCastMapValueMessageNullable := "map[int32]*MyWilson{" + for _, k := range keysForCastMapValueMessageNullable { + mapStringForCastMapValueMessageNullable += fmt.Sprintf("%v: %v,", k, this.CastMapValueMessageNullable[k]) + } + mapStringForCastMapValueMessageNullable += "}" + s := strings.Join([]string{`&Castaway{`, + `CastMapValueMessage:` + mapStringForCastMapValueMessage + `,`, + `CastMapValueMessageNullable:` + mapStringForCastMapValueMessageNullable + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *Wilson) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&Wilson{`, + `Int64:` + valueToStringCastvalue(this.Int64) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func valueToStringCastvalue(v interface{}) string { + rv := reflect.ValueOf(v) + if rv.IsNil() { + return "nil" + } + pv := reflect.Indirect(rv).Interface() + return fmt.Sprintf("*%v", pv) +} +func (m *Castaway) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *Castaway) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.CastMapValueMessage) > 0 { + for k := range m.CastMapValueMessage { + data[i] = 0xa + i++ + v := m.CastMapValueMessage[k] + msgSize := ((*Wilson)(&v)).Size() + mapSize := 1 + sovCastvalue(uint64(k)) + 1 + msgSize + sovCastvalue(uint64(msgSize)) + i = encodeVarintCastvalue(data, i, uint64(mapSize)) + data[i] = 0x8 + i++ + i = encodeVarintCastvalue(data, i, uint64(k)) + data[i] = 0x12 + i++ + i = encodeVarintCastvalue(data, i, uint64(((*Wilson)(&v)).Size())) + n1, err := ((*Wilson)(&v)).MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n1 + } + } + if len(m.CastMapValueMessageNullable) > 0 { + for k := range m.CastMapValueMessageNullable { + data[i] = 0x12 + i++ + v := m.CastMapValueMessageNullable[k] + if v == nil { + return 0, errors.New("proto: map has nil element") + } + msgSize := ((*Wilson)(v)).Size() + mapSize := 1 + sovCastvalue(uint64(k)) + 1 + msgSize + sovCastvalue(uint64(msgSize)) + i = encodeVarintCastvalue(data, i, uint64(mapSize)) + data[i] = 0x8 + i++ + i = encodeVarintCastvalue(data, i, uint64(k)) + data[i] = 0x12 + i++ + i = encodeVarintCastvalue(data, i, uint64(((*Wilson)(v)).Size())) + n2, err := ((*Wilson)(v)).MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n2 + } + } + if m.XXX_unrecognized != nil { + i += copy(data[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *Wilson) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *Wilson) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Int64 != nil { + data[i] = 0x8 + i++ + i = encodeVarintCastvalue(data, i, uint64(*m.Int64)) + } + if m.XXX_unrecognized != nil { + i += copy(data[i:], m.XXX_unrecognized) + } + return i, nil +} + +func encodeFixed64Castvalue(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 encodeFixed32Castvalue(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 encodeVarintCastvalue(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 (m *Castaway) 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 ErrIntOverflowCastvalueUnsafe + } + 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: Castaway: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Castaway: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field CastMapValueMessage", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCastvalueUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthCastvalueUnsafe + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var keykey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCastvalueUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + keykey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapkey int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCastvalueUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + mapkey |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var valuekey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCastvalueUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + valuekey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapmsglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCastvalueUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + mapmsglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if mapmsglen < 0 { + return ErrInvalidLengthCastvalueUnsafe + } + postmsgIndex := iNdEx + mapmsglen + if mapmsglen < 0 { + return ErrInvalidLengthCastvalueUnsafe + } + if postmsgIndex > l { + return io.ErrUnexpectedEOF + } + mapvalue := &Wilson{} + if err := mapvalue.Unmarshal(data[iNdEx:postmsgIndex]); err != nil { + return err + } + iNdEx = postmsgIndex + if m.CastMapValueMessage == nil { + m.CastMapValueMessage = make(map[int32]MyWilson) + } + m.CastMapValueMessage[mapkey] = ((MyWilson)(*mapvalue)) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field CastMapValueMessageNullable", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCastvalueUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthCastvalueUnsafe + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var keykey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCastvalueUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + keykey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapkey int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCastvalueUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + mapkey |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var valuekey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCastvalueUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + valuekey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapmsglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCastvalueUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + mapmsglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if mapmsglen < 0 { + return ErrInvalidLengthCastvalueUnsafe + } + postmsgIndex := iNdEx + mapmsglen + if mapmsglen < 0 { + return ErrInvalidLengthCastvalueUnsafe + } + if postmsgIndex > l { + return io.ErrUnexpectedEOF + } + mapvalue := &Wilson{} + if err := mapvalue.Unmarshal(data[iNdEx:postmsgIndex]); err != nil { + return err + } + iNdEx = postmsgIndex + if m.CastMapValueMessageNullable == nil { + m.CastMapValueMessageNullable = make(map[int32]*MyWilson) + } + m.CastMapValueMessageNullable[mapkey] = ((*MyWilson)(mapvalue)) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipCastvalueUnsafe(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthCastvalueUnsafe + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Wilson) 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 ErrIntOverflowCastvalueUnsafe + } + 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: Wilson: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Wilson: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Int64", wireType) + } + var v int64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCastvalueUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Int64 = &v + default: + iNdEx = preIndex + skippy, err := skipCastvalueUnsafe(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthCastvalueUnsafe + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipCastvalueUnsafe(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, ErrIntOverflowCastvalueUnsafe + } + 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, ErrIntOverflowCastvalueUnsafe + } + 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, ErrIntOverflowCastvalueUnsafe + } + 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, ErrInvalidLengthCastvalueUnsafe + } + return iNdEx, nil + case 3: + for { + var innerWire uint64 + var start int = iNdEx + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowCastvalueUnsafe + } + 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 := skipCastvalueUnsafe(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 ( + ErrInvalidLengthCastvalueUnsafe = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowCastvalueUnsafe = fmt.Errorf("proto: integer overflow") +) + +var fileDescriptorCastvalue = []byte{ + // 338 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xe2, 0x52, 0x4c, 0xce, 0xcf, 0x4d, + 0xca, 0x2f, 0xd6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, 0x12, 0x18, 0x08, 0x8c, 0x1a, 0xac, + 0x41, 0x20, 0xa6, 0x90, 0x3a, 0x17, 0x2b, 0xd8, 0x2d, 0x40, 0xd7, 0x31, 0x02, 0x5d, 0x27, 0x88, + 0xe4, 0x3a, 0xa8, 0x65, 0x10, 0x79, 0x2b, 0x26, 0x0b, 0x46, 0xa9, 0x44, 0x2e, 0x05, 0x42, 0x2e, + 0xa5, 0xd0, 0x0a, 0x25, 0x39, 0x2e, 0x36, 0x88, 0xa0, 0x90, 0x08, 0x17, 0xab, 0x67, 0x5e, 0x89, + 0x99, 0x09, 0xd8, 0x28, 0xe6, 0x20, 0xd6, 0x4c, 0x10, 0xc7, 0xc9, 0xe7, 0xc4, 0x43, 0x39, 0x86, + 0x0b, 0x40, 0x7c, 0x03, 0x88, 0x1f, 0x3c, 0x94, 0x63, 0x7c, 0x01, 0xc4, 0x1f, 0x80, 0xf8, 0x07, + 0x10, 0x37, 0x3c, 0x92, 0x63, 0x5c, 0x01, 0xc4, 0x1b, 0x80, 0x78, 0x07, 0x10, 0x1f, 0x00, 0xe2, + 0x13, 0x8f, 0x80, 0xea, 0x81, 0xf8, 0x01, 0x90, 0xfd, 0x02, 0x48, 0x7f, 0x00, 0xd2, 0x3f, 0x80, + 0xb8, 0xe1, 0xb1, 0x1c, 0x23, 0x20, 0x00, 0x00, 0xff, 0xff, 0x61, 0x07, 0x36, 0x06, 0x8f, 0x02, + 0x00, 0x00, +} diff --git a/vendor/github.com/gogo/protobuf/test/castvalue/combos/unsafeboth/castvalue.proto b/vendor/github.com/gogo/protobuf/test/castvalue/combos/unsafeboth/castvalue.proto new file mode 100644 index 000000000..9fb02befa --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/castvalue/combos/unsafeboth/castvalue.proto @@ -0,0 +1,64 @@ +// Copyright (c) 2015, Vastech SA (PTY) LTD. All rights reserved. +// http://github.com/gogo/protobuf/gogoproto +// +// 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 castvalue; + +import "github.com/gogo/protobuf/gogoproto/gogo.proto"; + +option (gogoproto.goproto_stringer_all) = false; +option (gogoproto.goproto_enum_prefix_all) = false; +option (gogoproto.goproto_getters_all) = false; + +option (gogoproto.equal_all) = true; +option (gogoproto.verbose_equal_all) = true; +option (gogoproto.stringer_all) = true; +option (gogoproto.gostring_all) = true; +option (gogoproto.face_all) = true; +option (gogoproto.description_all) = true; + +option (gogoproto.testgen_all) = true; +option (gogoproto.populate_all) = true; +option (gogoproto.benchgen_all) = true; +option (gogoproto.unmarshaler_all) = false; +option (gogoproto.marshaler_all) = false; +option (gogoproto.sizer_all) = true; + +option (gogoproto.goproto_enum_stringer_all) = false; +option (gogoproto.enum_stringer_all) = true; + +option (gogoproto.unsafe_marshaler_all) = true; +option (gogoproto.unsafe_unmarshaler_all) = true; + +message Castaway { + map CastMapValueMessage = 1 [(gogoproto.castvalue) = "MyWilson", (gogoproto.nullable) = false]; + map CastMapValueMessageNullable = 2 [(gogoproto.castvalue) = "MyWilson"]; +} + +message Wilson { + optional int64 Int64 = 1; +} diff --git a/vendor/github.com/gogo/protobuf/test/castvalue/combos/unsafeboth/castvaluepb_test.go b/vendor/github.com/gogo/protobuf/test/castvalue/combos/unsafeboth/castvaluepb_test.go new file mode 100644 index 000000000..2fc91d01e --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/castvalue/combos/unsafeboth/castvaluepb_test.go @@ -0,0 +1,513 @@ +// Code generated by protoc-gen-gogo. +// source: combos/unsafeboth/castvalue.proto +// DO NOT EDIT! + +/* +Package castvalue is a generated protocol buffer package. + +It is generated from these files: + combos/unsafeboth/castvalue.proto + +It has these top-level messages: + Castaway + Wilson +*/ +package castvalue + +import testing "testing" +import math_rand "math/rand" +import time "time" +import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" +import github_com_gogo_protobuf_jsonpb "github.com/gogo/protobuf/jsonpb" +import fmt "fmt" +import go_parser "go/parser" +import proto "github.com/gogo/protobuf/proto" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +func TestCastawayProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCastaway(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Castaway{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestCastawayMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCastaway(popr, false) + size := p.Size() + data := make([]byte, size) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(data) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Castaway{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkCastawayProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Castaway, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedCastaway(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkCastawayProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedCastaway(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &Castaway{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestWilsonProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedWilson(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Wilson{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestWilsonMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedWilson(popr, false) + size := p.Size() + data := make([]byte, size) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(data) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Wilson{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkWilsonProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Wilson, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedWilson(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkWilsonProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedWilson(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &Wilson{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestCastawayJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCastaway(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Castaway{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestWilsonJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedWilson(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Wilson{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestCastawayProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCastaway(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &Castaway{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestCastawayProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCastaway(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &Castaway{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestWilsonProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedWilson(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &Wilson{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestWilsonProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedWilson(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &Wilson{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestCastvalueDescription(t *testing.T) { + CastvalueDescription() +} +func TestCastawayVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCastaway(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &Castaway{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestWilsonVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedWilson(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &Wilson{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestCastawayFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCastaway(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestWilsonFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedWilson(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestCastawayGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCastaway(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestWilsonGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedWilson(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestCastawaySize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCastaway(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkCastawaySize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Castaway, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedCastaway(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestWilsonSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedWilson(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkWilsonSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Wilson, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedWilson(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestCastawayStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCastaway(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestWilsonStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedWilson(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} + +//These tests are generated by github.com/gogo/protobuf/plugin/testgen diff --git a/vendor/github.com/gogo/protobuf/test/castvalue/combos/unsafeboth/mytypes.go b/vendor/github.com/gogo/protobuf/test/castvalue/combos/unsafeboth/mytypes.go new file mode 100644 index 000000000..9892212c4 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/castvalue/combos/unsafeboth/mytypes.go @@ -0,0 +1,31 @@ +// Extensions for Protocol Buffers to create more go like structures. +// +// Copyright (c) 2013, Vastech SA (PTY) LTD. All rights reserved. +// http://github.com/gogo/protobuf/gogoproto +// +// 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 castvalue + +type MyWilson Wilson diff --git a/vendor/github.com/gogo/protobuf/test/castvalue/combos/unsafemarshaler/castvalue.pb.go b/vendor/github.com/gogo/protobuf/test/castvalue/combos/unsafemarshaler/castvalue.pb.go new file mode 100644 index 000000000..3fbcc1690 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/castvalue/combos/unsafemarshaler/castvalue.pb.go @@ -0,0 +1,978 @@ +// Code generated by protoc-gen-gogo. +// source: combos/unsafemarshaler/castvalue.proto +// DO NOT EDIT! + +/* +Package castvalue is a generated protocol buffer package. + +It is generated from these files: + combos/unsafemarshaler/castvalue.proto + +It has these top-level messages: + Castaway + Wilson +*/ +package castvalue + +import proto "github.com/gogo/protobuf/proto" +import fmt "fmt" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" + +import github_com_gogo_protobuf_protoc_gen_gogo_descriptor "github.com/gogo/protobuf/protoc-gen-gogo/descriptor" +import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" +import compress_gzip "compress/gzip" +import bytes "bytes" +import io_ioutil "io/ioutil" + +import strings "strings" +import sort "sort" +import strconv "strconv" +import reflect "reflect" +import github_com_gogo_protobuf_sortkeys "github.com/gogo/protobuf/sortkeys" + +import errors "errors" + +// 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. +const _ = proto.GoGoProtoPackageIsVersion1 + +type Castaway struct { + CastMapValueMessage map[int32]MyWilson `protobuf:"bytes,1,rep,name=CastMapValueMessage,json=castMapValueMessage,castvalue=MyWilson,castvaluetype=castvalue.Wilson" json:"CastMapValueMessage" protobuf_key:"varint,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + CastMapValueMessageNullable map[int32]*MyWilson `protobuf:"bytes,2,rep,name=CastMapValueMessageNullable,json=castMapValueMessageNullable,castvalue=MyWilson,castvaluetype=castvalue.Wilson" json:"CastMapValueMessageNullable,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *Castaway) Reset() { *m = Castaway{} } +func (*Castaway) ProtoMessage() {} +func (*Castaway) Descriptor() ([]byte, []int) { return fileDescriptorCastvalue, []int{0} } + +type Wilson struct { + Int64 *int64 `protobuf:"varint,1,opt,name=Int64,json=int64" json:"Int64,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *Wilson) Reset() { *m = Wilson{} } +func (*Wilson) ProtoMessage() {} +func (*Wilson) Descriptor() ([]byte, []int) { return fileDescriptorCastvalue, []int{1} } + +func init() { + proto.RegisterType((*Castaway)(nil), "castvalue.Castaway") + proto.RegisterType((*Wilson)(nil), "castvalue.Wilson") +} +func (this *Castaway) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return CastvalueDescription() +} +func (this *Wilson) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return CastvalueDescription() +} +func CastvalueDescription() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + d := &github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet{} + var gzipped = []byte{ + // 3472 bytes of a gzipped FileDescriptorSet + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xcc, 0x5a, 0x6b, 0x6c, 0x23, 0xd5, + 0xf5, 0x5f, 0xc7, 0x76, 0x62, 0x1f, 0x3b, 0x8e, 0x33, 0x09, 0xbb, 0xde, 0x2c, 0x6c, 0x76, 0xcd, + 0x63, 0x97, 0x05, 0x12, 0xfe, 0xfb, 0xe7, 0xb1, 0x98, 0xff, 0x1f, 0x94, 0x87, 0x37, 0x78, 0x95, + 0x57, 0x27, 0x09, 0xec, 0xd2, 0x0f, 0xa3, 0xc9, 0xf8, 0xc6, 0xf1, 0xee, 0x78, 0xc6, 0xf5, 0x8c, + 0x77, 0x37, 0x7c, 0xa2, 0x82, 0xb6, 0xa2, 0x55, 0xdf, 0x48, 0xe5, 0xdd, 0x82, 0xd4, 0x42, 0xe9, + 0x0b, 0xfa, 0x52, 0xd5, 0x4f, 0x54, 0x15, 0x2d, 0x9f, 0xaa, 0xb6, 0x9f, 0xfa, 0xa1, 0x6a, 0x81, + 0x22, 0x95, 0xb6, 0xb4, 0xa5, 0xd2, 0x4a, 0x45, 0xe2, 0x4b, 0xcf, 0x7d, 0x8d, 0x67, 0x6c, 0x27, + 0xe3, 0x50, 0x51, 0x1a, 0x69, 0x94, 0x99, 0x73, 0xcf, 0xef, 0x37, 0xf7, 0x9e, 0x7b, 0xee, 0x39, + 0xe7, 0xde, 0x31, 0xfc, 0xf4, 0x7f, 0xe0, 0x50, 0xc5, 0xb6, 0x2b, 0x26, 0x99, 0xac, 0x37, 0x6c, + 0xd7, 0x5e, 0x6f, 0x6e, 0x4c, 0x96, 0x89, 0x63, 0x34, 0xaa, 0x75, 0xd7, 0x6e, 0x4c, 0x30, 0x99, + 0x32, 0xc4, 0x35, 0x26, 0xa4, 0x46, 0x7e, 0x01, 0x86, 0x4f, 0x56, 0x4d, 0x32, 0xeb, 0x29, 0xae, + 0x10, 0x57, 0x39, 0x01, 0xb1, 0x0d, 0x14, 0xe6, 0x22, 0x87, 0xa2, 0x47, 0x53, 0xc7, 0xaf, 0x9a, + 0x68, 0x03, 0x4d, 0x04, 0x11, 0xcb, 0x54, 0xac, 0x32, 0x44, 0xfe, 0x8d, 0x18, 0x8c, 0x74, 0x69, + 0x55, 0x14, 0x88, 0x59, 0x7a, 0x8d, 0x32, 0x46, 0x8e, 0x26, 0x55, 0x76, 0xaf, 0xe4, 0x60, 0xa0, + 0xae, 0x1b, 0xe7, 0xf4, 0x0a, 0xc9, 0xf5, 0x31, 0xb1, 0x7c, 0x54, 0x0e, 0x02, 0x94, 0x49, 0x9d, + 0x58, 0x65, 0x62, 0x19, 0x5b, 0xb9, 0x28, 0xf6, 0x22, 0xa9, 0xfa, 0x24, 0xca, 0x75, 0x30, 0x5c, + 0x6f, 0xae, 0x9b, 0x55, 0x43, 0xf3, 0xa9, 0x01, 0xaa, 0xc5, 0xd5, 0x2c, 0x6f, 0x98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x44, 0x64, 0x4c, 0x87, 0x43, 0x61, 0x3d, 0xfd, + 0x37, 0x5f, 0x91, 0x3f, 0x08, 0xfd, 0x5c, 0x48, 0x7f, 0xde, 0x56, 0xb2, 0xdc, 0x5b, 0x6e, 0x62, + 0x54, 0x51, 0x35, 0x5e, 0xa5, 0x0f, 0xd3, 0xf3, 0xaf, 0xbc, 0x76, 0x70, 0xcf, 0x2f, 0xf1, 0xfa, + 0x0d, 0x5e, 0xaf, 0xbe, 0x76, 0x30, 0xf2, 0x26, 0x5e, 0x6f, 0xe3, 0xf5, 0x0e, 0x5e, 0xf7, 0xbf, + 0x7e, 0x30, 0xf2, 0x1c, 0x5e, 0x2f, 0xe0, 0xf5, 0x23, 0xbc, 0x5e, 0xc2, 0xeb, 0x95, 0xd7, 0x51, + 0x1f, 0xaf, 0x57, 0xf1, 0xfe, 0x4d, 0xfc, 0xff, 0x36, 0xfe, 0x7f, 0x07, 0xaf, 0xfb, 0xff, 0x70, + 0x70, 0xcf, 0xbf, 0x02, 0x00, 0x00, 0xff, 0xff, 0x76, 0x38, 0x95, 0x63, 0x01, 0x2d, 0x00, 0x00, + } + r := bytes.NewReader(gzipped) + gzipr, err := compress_gzip.NewReader(r) + if err != nil { + panic(err) + } + ungzipped, err := io_ioutil.ReadAll(gzipr) + if err != nil { + panic(err) + } + if err := github_com_gogo_protobuf_proto.Unmarshal(ungzipped, d); err != nil { + panic(err) + } + return d +} +func (this *Castaway) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*Castaway) + if !ok { + that2, ok := that.(Castaway) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *Castaway") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *Castaway but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *Castaway but is not nil && this == nil") + } + if len(this.CastMapValueMessage) != len(that1.CastMapValueMessage) { + return fmt.Errorf("CastMapValueMessage this(%v) Not Equal that(%v)", len(this.CastMapValueMessage), len(that1.CastMapValueMessage)) + } + for i := range this.CastMapValueMessage { + a := (Wilson)(this.CastMapValueMessage[i]) + b := (Wilson)(that1.CastMapValueMessage[i]) + if !(&a).Equal(&b) { + return fmt.Errorf("CastMapValueMessage this[%v](%v) Not Equal that[%v](%v)", i, this.CastMapValueMessage[i], i, that1.CastMapValueMessage[i]) + } + } + if len(this.CastMapValueMessageNullable) != len(that1.CastMapValueMessageNullable) { + return fmt.Errorf("CastMapValueMessageNullable this(%v) Not Equal that(%v)", len(this.CastMapValueMessageNullable), len(that1.CastMapValueMessageNullable)) + } + for i := range this.CastMapValueMessageNullable { + a := (*Wilson)(this.CastMapValueMessageNullable[i]) + b := (*Wilson)(that1.CastMapValueMessageNullable[i]) + if !a.Equal(b) { + return fmt.Errorf("CastMapValueMessageNullable this[%v](%v) Not Equal that[%v](%v)", i, this.CastMapValueMessageNullable[i], i, that1.CastMapValueMessageNullable[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *Castaway) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*Castaway) + if !ok { + that2, ok := that.(Castaway) + 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.CastMapValueMessage) != len(that1.CastMapValueMessage) { + return false + } + for i := range this.CastMapValueMessage { + a := (Wilson)(this.CastMapValueMessage[i]) + b := (Wilson)(that1.CastMapValueMessage[i]) + if !(&a).Equal(&b) { + return false + } + } + if len(this.CastMapValueMessageNullable) != len(that1.CastMapValueMessageNullable) { + return false + } + for i := range this.CastMapValueMessageNullable { + a := (*Wilson)(this.CastMapValueMessageNullable[i]) + b := (*Wilson)(that1.CastMapValueMessageNullable[i]) + if !a.Equal(b) { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *Wilson) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*Wilson) + if !ok { + that2, ok := that.(Wilson) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *Wilson") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *Wilson but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *Wilson but is not nil && this == nil") + } + if this.Int64 != nil && that1.Int64 != nil { + if *this.Int64 != *that1.Int64 { + return fmt.Errorf("Int64 this(%v) Not Equal that(%v)", *this.Int64, *that1.Int64) + } + } else if this.Int64 != nil { + return fmt.Errorf("this.Int64 == nil && that.Int64 != nil") + } else if that1.Int64 != nil { + return fmt.Errorf("Int64 this(%v) Not Equal that(%v)", this.Int64, that1.Int64) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *Wilson) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*Wilson) + if !ok { + that2, ok := that.(Wilson) + 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.Int64 != nil && that1.Int64 != nil { + if *this.Int64 != *that1.Int64 { + return false + } + } else if this.Int64 != nil { + return false + } else if that1.Int64 != nil { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} + +type CastawayFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetCastMapValueMessage() map[int32]MyWilson + GetCastMapValueMessageNullable() map[int32]*MyWilson +} + +func (this *Castaway) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *Castaway) TestProto() github_com_gogo_protobuf_proto.Message { + return NewCastawayFromFace(this) +} + +func (this *Castaway) GetCastMapValueMessage() map[int32]MyWilson { + return this.CastMapValueMessage +} + +func (this *Castaway) GetCastMapValueMessageNullable() map[int32]*MyWilson { + return this.CastMapValueMessageNullable +} + +func NewCastawayFromFace(that CastawayFace) *Castaway { + this := &Castaway{} + this.CastMapValueMessage = that.GetCastMapValueMessage() + this.CastMapValueMessageNullable = that.GetCastMapValueMessageNullable() + return this +} + +type WilsonFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetInt64() *int64 +} + +func (this *Wilson) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *Wilson) TestProto() github_com_gogo_protobuf_proto.Message { + return NewWilsonFromFace(this) +} + +func (this *Wilson) GetInt64() *int64 { + return this.Int64 +} + +func NewWilsonFromFace(that WilsonFace) *Wilson { + this := &Wilson{} + this.Int64 = that.GetInt64() + return this +} + +func (this *Castaway) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 6) + s = append(s, "&castvalue.Castaway{") + keysForCastMapValueMessage := make([]int32, 0, len(this.CastMapValueMessage)) + for k := range this.CastMapValueMessage { + keysForCastMapValueMessage = append(keysForCastMapValueMessage, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForCastMapValueMessage) + mapStringForCastMapValueMessage := "map[int32]MyWilson{" + for _, k := range keysForCastMapValueMessage { + mapStringForCastMapValueMessage += fmt.Sprintf("%#v: %#v,", k, this.CastMapValueMessage[k]) + } + mapStringForCastMapValueMessage += "}" + if this.CastMapValueMessage != nil { + s = append(s, "CastMapValueMessage: "+mapStringForCastMapValueMessage+",\n") + } + keysForCastMapValueMessageNullable := make([]int32, 0, len(this.CastMapValueMessageNullable)) + for k := range this.CastMapValueMessageNullable { + keysForCastMapValueMessageNullable = append(keysForCastMapValueMessageNullable, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForCastMapValueMessageNullable) + mapStringForCastMapValueMessageNullable := "map[int32]*MyWilson{" + for _, k := range keysForCastMapValueMessageNullable { + mapStringForCastMapValueMessageNullable += fmt.Sprintf("%#v: %#v,", k, this.CastMapValueMessageNullable[k]) + } + mapStringForCastMapValueMessageNullable += "}" + if this.CastMapValueMessageNullable != nil { + s = append(s, "CastMapValueMessageNullable: "+mapStringForCastMapValueMessageNullable+",\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 *Wilson) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&castvalue.Wilson{") + if this.Int64 != nil { + s = append(s, "Int64: "+valueToGoStringCastvalue(this.Int64, "int64")+",\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 valueToGoStringCastvalue(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 extensionToGoStringCastvalue(e map[int32]github_com_gogo_protobuf_proto.Extension) string { + if e == nil { + return "nil" + } + s := "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 +} +func NewPopulatedCastaway(r randyCastvalue, easy bool) *Castaway { + this := &Castaway{} + if r.Intn(10) != 0 { + v1 := r.Intn(10) + this.CastMapValueMessage = make(map[int32]MyWilson) + for i := 0; i < v1; i++ { + this.CastMapValueMessage[int32(r.Int31())] = (MyWilson)(*NewPopulatedWilson(r, easy)) + } + } + if r.Intn(10) != 0 { + v2 := r.Intn(10) + this.CastMapValueMessageNullable = make(map[int32]*MyWilson) + for i := 0; i < v2; i++ { + this.CastMapValueMessageNullable[int32(r.Int31())] = (*MyWilson)(NewPopulatedWilson(r, easy)) + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedCastvalue(r, 3) + } + return this +} + +func NewPopulatedWilson(r randyCastvalue, easy bool) *Wilson { + this := &Wilson{} + if r.Intn(10) != 0 { + v3 := int64(r.Int63()) + if r.Intn(2) == 0 { + v3 *= -1 + } + this.Int64 = &v3 + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedCastvalue(r, 2) + } + return this +} + +type randyCastvalue interface { + Float32() float32 + Float64() float64 + Int63() int64 + Int31() int32 + Uint32() uint32 + Intn(n int) int +} + +func randUTF8RuneCastvalue(r randyCastvalue) 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 randStringCastvalue(r randyCastvalue) string { + v4 := r.Intn(100) + tmps := make([]rune, v4) + for i := 0; i < v4; i++ { + tmps[i] = randUTF8RuneCastvalue(r) + } + return string(tmps) +} +func randUnrecognizedCastvalue(r randyCastvalue, 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 = randFieldCastvalue(data, r, fieldNumber, wire) + } + return data +} +func randFieldCastvalue(data []byte, r randyCastvalue, fieldNumber int, wire int) []byte { + key := uint32(fieldNumber)<<3 | uint32(wire) + switch wire { + case 0: + data = encodeVarintPopulateCastvalue(data, uint64(key)) + v5 := r.Int63() + if r.Intn(2) == 0 { + v5 *= -1 + } + data = encodeVarintPopulateCastvalue(data, uint64(v5)) + case 1: + data = encodeVarintPopulateCastvalue(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 = encodeVarintPopulateCastvalue(data, uint64(key)) + ll := r.Intn(100) + data = encodeVarintPopulateCastvalue(data, uint64(ll)) + for j := 0; j < ll; j++ { + data = append(data, byte(r.Intn(256))) + } + default: + data = encodeVarintPopulateCastvalue(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 encodeVarintPopulateCastvalue(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 *Castaway) Size() (n int) { + var l int + _ = l + if len(m.CastMapValueMessage) > 0 { + for k, v := range m.CastMapValueMessage { + _ = k + _ = v + l = ((*Wilson)(&v)).Size() + mapEntrySize := 1 + sovCastvalue(uint64(k)) + 1 + l + sovCastvalue(uint64(l)) + n += mapEntrySize + 1 + sovCastvalue(uint64(mapEntrySize)) + } + } + if len(m.CastMapValueMessageNullable) > 0 { + for k, v := range m.CastMapValueMessageNullable { + _ = k + _ = v + l = 0 + if v != nil { + l = ((*Wilson)(v)).Size() + } + mapEntrySize := 1 + sovCastvalue(uint64(k)) + 1 + l + sovCastvalue(uint64(l)) + n += mapEntrySize + 1 + sovCastvalue(uint64(mapEntrySize)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *Wilson) Size() (n int) { + var l int + _ = l + if m.Int64 != nil { + n += 1 + sovCastvalue(uint64(*m.Int64)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func sovCastvalue(x uint64) (n int) { + for { + n++ + x >>= 7 + if x == 0 { + break + } + } + return n +} +func sozCastvalue(x uint64) (n int) { + return sovCastvalue(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (this *Castaway) String() string { + if this == nil { + return "nil" + } + keysForCastMapValueMessage := make([]int32, 0, len(this.CastMapValueMessage)) + for k := range this.CastMapValueMessage { + keysForCastMapValueMessage = append(keysForCastMapValueMessage, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForCastMapValueMessage) + mapStringForCastMapValueMessage := "map[int32]MyWilson{" + for _, k := range keysForCastMapValueMessage { + mapStringForCastMapValueMessage += fmt.Sprintf("%v: %v,", k, this.CastMapValueMessage[k]) + } + mapStringForCastMapValueMessage += "}" + keysForCastMapValueMessageNullable := make([]int32, 0, len(this.CastMapValueMessageNullable)) + for k := range this.CastMapValueMessageNullable { + keysForCastMapValueMessageNullable = append(keysForCastMapValueMessageNullable, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForCastMapValueMessageNullable) + mapStringForCastMapValueMessageNullable := "map[int32]*MyWilson{" + for _, k := range keysForCastMapValueMessageNullable { + mapStringForCastMapValueMessageNullable += fmt.Sprintf("%v: %v,", k, this.CastMapValueMessageNullable[k]) + } + mapStringForCastMapValueMessageNullable += "}" + s := strings.Join([]string{`&Castaway{`, + `CastMapValueMessage:` + mapStringForCastMapValueMessage + `,`, + `CastMapValueMessageNullable:` + mapStringForCastMapValueMessageNullable + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *Wilson) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&Wilson{`, + `Int64:` + valueToStringCastvalue(this.Int64) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func valueToStringCastvalue(v interface{}) string { + rv := reflect.ValueOf(v) + if rv.IsNil() { + return "nil" + } + pv := reflect.Indirect(rv).Interface() + return fmt.Sprintf("*%v", pv) +} +func (m *Castaway) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *Castaway) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.CastMapValueMessage) > 0 { + for k := range m.CastMapValueMessage { + data[i] = 0xa + i++ + v := m.CastMapValueMessage[k] + msgSize := ((*Wilson)(&v)).Size() + mapSize := 1 + sovCastvalue(uint64(k)) + 1 + msgSize + sovCastvalue(uint64(msgSize)) + i = encodeVarintCastvalue(data, i, uint64(mapSize)) + data[i] = 0x8 + i++ + i = encodeVarintCastvalue(data, i, uint64(k)) + data[i] = 0x12 + i++ + i = encodeVarintCastvalue(data, i, uint64(((*Wilson)(&v)).Size())) + n1, err := ((*Wilson)(&v)).MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n1 + } + } + if len(m.CastMapValueMessageNullable) > 0 { + for k := range m.CastMapValueMessageNullable { + data[i] = 0x12 + i++ + v := m.CastMapValueMessageNullable[k] + if v == nil { + return 0, errors.New("proto: map has nil element") + } + msgSize := ((*Wilson)(v)).Size() + mapSize := 1 + sovCastvalue(uint64(k)) + 1 + msgSize + sovCastvalue(uint64(msgSize)) + i = encodeVarintCastvalue(data, i, uint64(mapSize)) + data[i] = 0x8 + i++ + i = encodeVarintCastvalue(data, i, uint64(k)) + data[i] = 0x12 + i++ + i = encodeVarintCastvalue(data, i, uint64(((*Wilson)(v)).Size())) + n2, err := ((*Wilson)(v)).MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n2 + } + } + if m.XXX_unrecognized != nil { + i += copy(data[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *Wilson) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *Wilson) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Int64 != nil { + data[i] = 0x8 + i++ + i = encodeVarintCastvalue(data, i, uint64(*m.Int64)) + } + if m.XXX_unrecognized != nil { + i += copy(data[i:], m.XXX_unrecognized) + } + return i, nil +} + +func encodeFixed64Castvalue(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 encodeFixed32Castvalue(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 encodeVarintCastvalue(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 +} + +var fileDescriptorCastvalue = []byte{ + // 343 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xe2, 0x52, 0x4b, 0xce, 0xcf, 0x4d, + 0xca, 0x2f, 0xd6, 0x2f, 0xcd, 0x2b, 0x4e, 0x4c, 0x4b, 0xcd, 0x4d, 0x2c, 0x2a, 0xce, 0x48, 0xcc, + 0x49, 0x2d, 0xd2, 0x4f, 0x4e, 0x2c, 0x2e, 0x29, 0x4b, 0xcc, 0x29, 0x4d, 0xd5, 0x2b, 0x28, 0xca, + 0x2f, 0xc9, 0x17, 0xe2, 0x84, 0x0b, 0x48, 0xe9, 0xa6, 0x67, 0x96, 0x64, 0x94, 0x26, 0xe9, 0x01, + 0x75, 0xea, 0xa7, 0xe7, 0xa7, 0xe7, 0xeb, 0x83, 0x55, 0x24, 0x95, 0xa6, 0x81, 0x79, 0x60, 0x0e, + 0x98, 0x05, 0xd1, 0xa9, 0x74, 0x90, 0x99, 0x8b, 0xc3, 0x19, 0xa8, 0x39, 0xb1, 0x3c, 0xb1, 0x52, + 0xa8, 0x80, 0x4b, 0x18, 0xc4, 0xf6, 0x4d, 0x2c, 0x08, 0x03, 0x99, 0xe5, 0x9b, 0x5a, 0x5c, 0x9c, + 0x98, 0x9e, 0x2a, 0xc1, 0xa8, 0xc0, 0xac, 0xc1, 0x6d, 0xa4, 0xa3, 0x87, 0xb0, 0x15, 0xa6, 0x43, + 0x0f, 0x8b, 0x72, 0xd7, 0xbc, 0x92, 0xa2, 0x4a, 0x27, 0x81, 0x13, 0xf7, 0xe4, 0x19, 0xba, 0xee, + 0xcb, 0x73, 0xf8, 0x56, 0x86, 0x67, 0xe6, 0x14, 0xe7, 0xe7, 0x05, 0x09, 0x27, 0x63, 0xaa, 0x15, + 0x6a, 0x61, 0xe4, 0x92, 0xc6, 0x62, 0x86, 0x5f, 0x69, 0x4e, 0x4e, 0x62, 0x52, 0x4e, 0xaa, 0x04, + 0x13, 0xd8, 0x6a, 0x13, 0x22, 0xad, 0x86, 0x69, 0x83, 0x38, 0x81, 0x07, 0xc5, 0x7a, 0xe9, 0x64, + 0xdc, 0xea, 0xa5, 0x22, 0xb9, 0x24, 0x70, 0xf9, 0x44, 0x48, 0x80, 0x8b, 0x39, 0x3b, 0xb5, 0x12, + 0x18, 0x08, 0x8c, 0x1a, 0xac, 0x41, 0x20, 0xa6, 0x90, 0x3a, 0x17, 0x2b, 0xd8, 0x2d, 0x40, 0xd7, + 0x31, 0x02, 0x5d, 0x27, 0x88, 0xe4, 0x3a, 0xa8, 0x65, 0x10, 0x79, 0x2b, 0x26, 0x0b, 0x46, 0xa9, + 0x44, 0x2e, 0x05, 0x42, 0x2e, 0xa5, 0xd0, 0x0a, 0x25, 0x39, 0x2e, 0x36, 0x88, 0xa0, 0x90, 0x08, + 0x17, 0xab, 0x67, 0x5e, 0x89, 0x99, 0x09, 0xd8, 0x28, 0xe6, 0x20, 0xd6, 0x4c, 0x10, 0xc7, 0xc9, + 0xe7, 0xc4, 0x43, 0x39, 0x86, 0x0b, 0x40, 0x7c, 0x03, 0x88, 0x1f, 0x3c, 0x94, 0x63, 0x7c, 0x01, + 0xc4, 0x1f, 0x80, 0xf8, 0x07, 0x10, 0x37, 0x3c, 0x92, 0x63, 0x5c, 0x01, 0xc4, 0x1b, 0x80, 0x78, + 0x07, 0x10, 0x1f, 0x00, 0xe2, 0x13, 0x8f, 0x80, 0xea, 0x81, 0xf8, 0x01, 0x90, 0xfd, 0x02, 0x48, + 0x7f, 0x00, 0xd2, 0x3f, 0x80, 0xb8, 0xe1, 0xb1, 0x1c, 0x03, 0x20, 0x00, 0x00, 0xff, 0xff, 0x29, + 0x83, 0xc1, 0xb7, 0x94, 0x02, 0x00, 0x00, +} diff --git a/vendor/github.com/gogo/protobuf/test/castvalue/combos/unsafemarshaler/castvalue.proto b/vendor/github.com/gogo/protobuf/test/castvalue/combos/unsafemarshaler/castvalue.proto new file mode 100644 index 000000000..1ada55aa0 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/castvalue/combos/unsafemarshaler/castvalue.proto @@ -0,0 +1,64 @@ +// Copyright (c) 2015, Vastech SA (PTY) LTD. All rights reserved. +// http://github.com/gogo/protobuf/gogoproto +// +// 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 castvalue; + +import "github.com/gogo/protobuf/gogoproto/gogo.proto"; + +option (gogoproto.goproto_stringer_all) = false; +option (gogoproto.goproto_enum_prefix_all) = false; +option (gogoproto.goproto_getters_all) = false; + +option (gogoproto.equal_all) = true; +option (gogoproto.verbose_equal_all) = true; +option (gogoproto.stringer_all) = true; +option (gogoproto.gostring_all) = true; +option (gogoproto.face_all) = true; +option (gogoproto.description_all) = true; + +option (gogoproto.testgen_all) = true; +option (gogoproto.populate_all) = true; +option (gogoproto.benchgen_all) = true; +option (gogoproto.unmarshaler_all) = false; +option (gogoproto.marshaler_all) = false; +option (gogoproto.sizer_all) = true; + +option (gogoproto.goproto_enum_stringer_all) = false; +option (gogoproto.enum_stringer_all) = true; + +option (gogoproto.unsafe_marshaler_all) = true; +option (gogoproto.unsafe_unmarshaler_all) = false; + +message Castaway { + map CastMapValueMessage = 1 [(gogoproto.castvalue) = "MyWilson", (gogoproto.nullable) = false]; + map CastMapValueMessageNullable = 2 [(gogoproto.castvalue) = "MyWilson"]; +} + +message Wilson { + optional int64 Int64 = 1; +} diff --git a/vendor/github.com/gogo/protobuf/test/castvalue/combos/unsafemarshaler/castvaluepb_test.go b/vendor/github.com/gogo/protobuf/test/castvalue/combos/unsafemarshaler/castvaluepb_test.go new file mode 100644 index 000000000..368eb54de --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/castvalue/combos/unsafemarshaler/castvaluepb_test.go @@ -0,0 +1,513 @@ +// Code generated by protoc-gen-gogo. +// source: combos/unsafemarshaler/castvalue.proto +// DO NOT EDIT! + +/* +Package castvalue is a generated protocol buffer package. + +It is generated from these files: + combos/unsafemarshaler/castvalue.proto + +It has these top-level messages: + Castaway + Wilson +*/ +package castvalue + +import testing "testing" +import math_rand "math/rand" +import time "time" +import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" +import github_com_gogo_protobuf_jsonpb "github.com/gogo/protobuf/jsonpb" +import fmt "fmt" +import go_parser "go/parser" +import proto "github.com/gogo/protobuf/proto" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +func TestCastawayProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCastaway(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Castaway{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestCastawayMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCastaway(popr, false) + size := p.Size() + data := make([]byte, size) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(data) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Castaway{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkCastawayProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Castaway, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedCastaway(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkCastawayProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedCastaway(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &Castaway{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestWilsonProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedWilson(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Wilson{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestWilsonMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedWilson(popr, false) + size := p.Size() + data := make([]byte, size) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(data) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Wilson{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkWilsonProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Wilson, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedWilson(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkWilsonProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedWilson(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &Wilson{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestCastawayJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCastaway(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Castaway{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestWilsonJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedWilson(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Wilson{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestCastawayProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCastaway(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &Castaway{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestCastawayProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCastaway(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &Castaway{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestWilsonProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedWilson(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &Wilson{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestWilsonProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedWilson(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &Wilson{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestCastvalueDescription(t *testing.T) { + CastvalueDescription() +} +func TestCastawayVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCastaway(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &Castaway{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestWilsonVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedWilson(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &Wilson{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestCastawayFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCastaway(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestWilsonFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedWilson(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestCastawayGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCastaway(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestWilsonGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedWilson(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestCastawaySize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCastaway(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkCastawaySize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Castaway, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedCastaway(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestWilsonSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedWilson(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkWilsonSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Wilson, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedWilson(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestCastawayStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCastaway(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestWilsonStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedWilson(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} + +//These tests are generated by github.com/gogo/protobuf/plugin/testgen diff --git a/vendor/github.com/gogo/protobuf/test/castvalue/combos/unsafemarshaler/mytypes.go b/vendor/github.com/gogo/protobuf/test/castvalue/combos/unsafemarshaler/mytypes.go new file mode 100644 index 000000000..9892212c4 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/castvalue/combos/unsafemarshaler/mytypes.go @@ -0,0 +1,31 @@ +// Extensions for Protocol Buffers to create more go like structures. +// +// Copyright (c) 2013, Vastech SA (PTY) LTD. All rights reserved. +// http://github.com/gogo/protobuf/gogoproto +// +// 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 castvalue + +type MyWilson Wilson diff --git a/vendor/github.com/gogo/protobuf/test/castvalue/combos/unsafeunmarshaler/castvalue.pb.go b/vendor/github.com/gogo/protobuf/test/castvalue/combos/unsafeunmarshaler/castvalue.pb.go new file mode 100644 index 000000000..a5aba757d --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/castvalue/combos/unsafeunmarshaler/castvalue.pb.go @@ -0,0 +1,1297 @@ +// Code generated by protoc-gen-gogo. +// source: combos/unsafeunmarshaler/castvalue.proto +// DO NOT EDIT! + +/* + Package castvalue is a generated protocol buffer package. + + It is generated from these files: + combos/unsafeunmarshaler/castvalue.proto + + It has these top-level messages: + Castaway + Wilson +*/ +package castvalue + +import proto "github.com/gogo/protobuf/proto" +import fmt "fmt" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" + +import github_com_gogo_protobuf_protoc_gen_gogo_descriptor "github.com/gogo/protobuf/protoc-gen-gogo/descriptor" +import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" +import compress_gzip "compress/gzip" +import bytes "bytes" +import io_ioutil "io/ioutil" + +import strings "strings" +import sort "sort" +import strconv "strconv" +import reflect "reflect" +import github_com_gogo_protobuf_sortkeys "github.com/gogo/protobuf/sortkeys" + +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. +const _ = proto.GoGoProtoPackageIsVersion1 + +type Castaway struct { + CastMapValueMessage map[int32]MyWilson `protobuf:"bytes,1,rep,name=CastMapValueMessage,json=castMapValueMessage,castvalue=MyWilson,castvaluetype=castvalue.Wilson" json:"CastMapValueMessage" protobuf_key:"varint,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + CastMapValueMessageNullable map[int32]*MyWilson `protobuf:"bytes,2,rep,name=CastMapValueMessageNullable,json=castMapValueMessageNullable,castvalue=MyWilson,castvaluetype=castvalue.Wilson" json:"CastMapValueMessageNullable,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *Castaway) Reset() { *m = Castaway{} } +func (*Castaway) ProtoMessage() {} +func (*Castaway) Descriptor() ([]byte, []int) { return fileDescriptorCastvalue, []int{0} } + +type Wilson struct { + Int64 *int64 `protobuf:"varint,1,opt,name=Int64,json=int64" json:"Int64,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *Wilson) Reset() { *m = Wilson{} } +func (*Wilson) ProtoMessage() {} +func (*Wilson) Descriptor() ([]byte, []int) { return fileDescriptorCastvalue, []int{1} } + +func init() { + proto.RegisterType((*Castaway)(nil), "castvalue.Castaway") + proto.RegisterType((*Wilson)(nil), "castvalue.Wilson") +} +func (this *Castaway) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return CastvalueDescription() +} +func (this *Wilson) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return CastvalueDescription() +} +func CastvalueDescription() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + d := &github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet{} + var gzipped = []byte{ + // 3469 bytes of a gzipped FileDescriptorSet + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xcc, 0x5a, 0x6b, 0x6c, 0x23, 0x57, + 0x15, 0xae, 0x63, 0x3b, 0xb1, 0x8f, 0x1d, 0xc7, 0x99, 0xa4, 0xbb, 0xde, 0x6c, 0xbb, 0xd9, 0x75, + 0x1f, 0xbb, 0xdd, 0xb6, 0x49, 0x59, 0xfa, 0xd8, 0xba, 0xd0, 0x2a, 0x0f, 0x6f, 0xea, 0x55, 0x5e, + 0x4c, 0x92, 0x76, 0xb7, 0xfc, 0x18, 0x4d, 0xc6, 0x37, 0x8e, 0x77, 0xc7, 0x33, 0xc6, 0x33, 0xde, + 0xdd, 0xf4, 0x57, 0x51, 0x0b, 0xa8, 0x20, 0xde, 0x08, 0xfa, 0x86, 0x56, 0x82, 0x96, 0xf2, 0x6a, + 0x79, 0x09, 0xf1, 0xab, 0x08, 0x15, 0xfa, 0x0b, 0x01, 0xbf, 0xf8, 0x81, 0xa0, 0x2d, 0x95, 0x28, + 0x50, 0xa0, 0x48, 0x2b, 0x51, 0xa9, 0x7f, 0x38, 0xf7, 0x35, 0x9e, 0xb1, 0x9d, 0x8c, 0x53, 0x54, + 0x4a, 0xa4, 0x51, 0x66, 0xce, 0x3d, 0xdf, 0x37, 0xf7, 0x9e, 0x7b, 0xee, 0x39, 0xe7, 0xde, 0x31, + 0xfc, 0xfc, 0x7d, 0x70, 0xb0, 0x62, 0xdb, 0x15, 0x93, 0x4c, 0xd6, 0x1b, 0xb6, 0x6b, 0xaf, 0x37, + 0x37, 0x26, 0xcb, 0xc4, 0x31, 0x1a, 0xd5, 0xba, 0x6b, 0x37, 0x26, 0x98, 0x4c, 0x19, 0xe2, 0x1a, + 0x13, 0x52, 0x23, 0xbf, 0x00, 0xc3, 0x27, 0xaa, 0x26, 0x99, 0xf5, 0x14, 0x57, 0x88, 0xab, 0x1c, + 0x87, 0xd8, 0x06, 0x0a, 0x73, 0x91, 0x83, 0xd1, 0x23, 0xa9, 0x63, 0x57, 0x4e, 0xb4, 0x81, 0x26, + 0x82, 0x88, 0x65, 0x2a, 0x56, 0x19, 0x22, 0xff, 0x5a, 0x0c, 0x46, 0xba, 0xb4, 0x2a, 0x0a, 0xc4, + 0x2c, 0xbd, 0x46, 0x19, 0x23, 0x47, 0x92, 0x2a, 0xbb, 0x57, 0x72, 0x30, 0x50, 0xd7, 0x8d, 0xb3, + 0x7a, 0x85, 0xe4, 0xfa, 0x98, 0x58, 0x3e, 0x2a, 0x07, 0x00, 0xca, 0xa4, 0x4e, 0xac, 0x32, 0xb1, + 0x8c, 0xad, 0x5c, 0x14, 0x7b, 0x91, 0x54, 0x7d, 0x12, 0xe5, 0x5a, 0x18, 0xae, 0x37, 0xd7, 0xcd, + 0xaa, 0xa1, 0xf9, 0xd4, 0x00, 0xd5, 0xe2, 0x6a, 0x96, 0x37, 0xcc, 0xb6, 0x94, 0x0f, 0xc3, 0xd0, + 0x79, 0xa2, 0x9f, 0xf5, 0xab, 0xa6, 0x98, 0x6a, 0x86, 0x8a, 0x7d, 0x8a, 0x33, 0x90, 0xae, 0x11, + 0xc7, 0xc1, 0x0e, 0x68, 0xee, 0x56, 0x9d, 0xe4, 0x62, 0x6c, 0xf4, 0x07, 0x3b, 0x46, 0xdf, 0x3e, + 0xf2, 0x94, 0x40, 0xad, 0x22, 0x48, 0x99, 0x82, 0x24, 0xb1, 0x9a, 0x35, 0xce, 0x10, 0xdf, 0xc6, + 0x7e, 0x45, 0xd4, 0x68, 0x67, 0x49, 0x50, 0x98, 0xa0, 0x18, 0x70, 0x48, 0xe3, 0x5c, 0xd5, 0x20, + 0xb9, 0x7e, 0x46, 0x70, 0xb8, 0x83, 0x60, 0x85, 0xb7, 0xb7, 0x73, 0x48, 0x1c, 0x0e, 0x25, 0x49, + 0x2e, 0xb8, 0xc4, 0x72, 0xaa, 0xb6, 0x95, 0x1b, 0x60, 0x24, 0x57, 0x75, 0x99, 0x45, 0x62, 0x96, + 0xdb, 0x29, 0x5a, 0x38, 0xe5, 0x66, 0x18, 0xb0, 0xeb, 0x2e, 0xde, 0x39, 0xb9, 0x04, 0xce, 0x4f, + 0xea, 0xd8, 0x65, 0x5d, 0x1d, 0x61, 0x89, 0xeb, 0xa8, 0x52, 0x59, 0x29, 0x41, 0xd6, 0xb1, 0x9b, + 0x0d, 0x83, 0x68, 0x86, 0x5d, 0x26, 0x5a, 0xd5, 0xda, 0xb0, 0x73, 0x49, 0x46, 0x30, 0xde, 0x39, + 0x10, 0xa6, 0x38, 0x83, 0x7a, 0x25, 0x54, 0x53, 0x33, 0x4e, 0xe0, 0x59, 0xd9, 0x03, 0xfd, 0xce, + 0x96, 0xe5, 0xea, 0x17, 0x72, 0x69, 0xe6, 0x21, 0xe2, 0x29, 0xff, 0xef, 0x38, 0x0c, 0xf5, 0xe2, + 0x62, 0xb7, 0x41, 0x7c, 0x83, 0x8e, 0x12, 0x1d, 0x6c, 0x17, 0x36, 0xe0, 0x98, 0xa0, 0x11, 0xfb, + 0xdf, 0xa1, 0x11, 0xa7, 0x20, 0x65, 0x11, 0xc7, 0x25, 0x65, 0xee, 0x11, 0xd1, 0x1e, 0x7d, 0x0a, + 0x38, 0xa8, 0xd3, 0xa5, 0x62, 0xef, 0xc8, 0xa5, 0x4e, 0xc1, 0x90, 0xd7, 0x25, 0xad, 0xa1, 0x5b, + 0x15, 0xe9, 0x9b, 0x93, 0x61, 0x3d, 0x99, 0x28, 0x4a, 0x9c, 0x4a, 0x61, 0x6a, 0x86, 0x04, 0x9e, + 0x95, 0x59, 0x00, 0xdb, 0x22, 0xf6, 0x06, 0x2e, 0x2f, 0xc3, 0x44, 0x3f, 0xe9, 0x6e, 0xa5, 0x25, + 0xaa, 0xd2, 0x61, 0x25, 0x9b, 0x4b, 0x0d, 0x53, 0xb9, 0xb5, 0xe5, 0x6a, 0x03, 0xdb, 0x78, 0xca, + 0x02, 0x5f, 0x64, 0x1d, 0xde, 0xb6, 0x06, 0x99, 0x06, 0xa1, 0x7e, 0x8f, 0x26, 0xe6, 0x23, 0x4b, + 0xb2, 0x4e, 0x4c, 0x84, 0x8e, 0x4c, 0x15, 0x30, 0x3e, 0xb0, 0xc1, 0x86, 0xff, 0x51, 0xb9, 0x02, + 0x3c, 0x81, 0xc6, 0xdc, 0x0a, 0x58, 0x14, 0x4a, 0x4b, 0xe1, 0x22, 0xca, 0xc6, 0x8e, 0x43, 0x26, + 0x68, 0x1e, 0x65, 0x14, 0xe2, 0x8e, 0xab, 0x37, 0x5c, 0xe6, 0x85, 0x71, 0x95, 0x3f, 0x28, 0x59, + 0x88, 0x62, 0x90, 0x61, 0x51, 0x2e, 0xae, 0xd2, 0xdb, 0xb1, 0x5b, 0x60, 0x30, 0xf0, 0xfa, 0x5e, + 0x81, 0xf9, 0x87, 0xfa, 0x61, 0xb4, 0x9b, 0xcf, 0x75, 0x75, 0x7f, 0x5c, 0x3e, 0xe8, 0x01, 0xeb, + 0xa4, 0x81, 0x7e, 0x47, 0x19, 0xc4, 0x13, 0x7a, 0x54, 0xdc, 0xd4, 0xd7, 0x89, 0x89, 0xde, 0x14, + 0x39, 0x92, 0x39, 0x76, 0x6d, 0x4f, 0x5e, 0x3d, 0x31, 0x4f, 0x21, 0x2a, 0x47, 0x2a, 0xb7, 0x43, + 0x4c, 0x84, 0x38, 0xca, 0x70, 0xb4, 0x37, 0x06, 0xea, 0x8b, 0x2a, 0xc3, 0x29, 0xfb, 0x21, 0x49, + 0xff, 0x73, 0xdb, 0xf6, 0xb3, 0x3e, 0x27, 0xa8, 0x80, 0xda, 0x55, 0x19, 0x83, 0x04, 0x73, 0xb3, + 0x32, 0x91, 0xa9, 0xc1, 0x7b, 0xa6, 0x13, 0x53, 0x26, 0x1b, 0x7a, 0xd3, 0x74, 0xb5, 0x73, 0xba, + 0xd9, 0x24, 0xcc, 0x61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, 0x79, 0x98, + 0x49, 0x32, 0x09, 0x5b, 0xc2, 0x34, 0x84, 0x34, 0x5d, 0xaf, 0x3d, 0xca, 0xda, 0x81, 0x8b, 0x98, + 0xc2, 0xf1, 0x56, 0x47, 0x63, 0xac, 0xa3, 0x07, 0xb6, 0x19, 0x69, 0x47, 0xca, 0xba, 0x01, 0xb2, + 0x86, 0x59, 0x25, 0x96, 0xab, 0x39, 0x6e, 0x83, 0xe8, 0xb5, 0xaa, 0x55, 0x61, 0x71, 0x34, 0x51, + 0x88, 0x6f, 0xe8, 0xa6, 0x43, 0xd4, 0x21, 0xde, 0xbc, 0x22, 0x5b, 0x29, 0x82, 0x25, 0x8b, 0x86, + 0x0f, 0xd1, 0x1f, 0x40, 0xf0, 0x66, 0x0f, 0x91, 0xff, 0xed, 0x00, 0xa4, 0x7c, 0xd5, 0x99, 0x72, + 0x08, 0xd2, 0x67, 0xf4, 0x73, 0xba, 0x26, 0x2b, 0x6e, 0x6e, 0x89, 0x14, 0x95, 0x2d, 0x8b, 0xaa, + 0xfb, 0x06, 0x18, 0x65, 0x2a, 0x38, 0x46, 0x7c, 0x91, 0x61, 0xea, 0x8e, 0xc3, 0x8c, 0x96, 0x60, + 0xaa, 0x0a, 0x6d, 0x5b, 0xa2, 0x4d, 0x33, 0xb2, 0x45, 0xb9, 0x09, 0x46, 0x18, 0xa2, 0x86, 0x81, + 0xb7, 0x5a, 0x37, 0x89, 0x46, 0xf7, 0x00, 0x0e, 0x8b, 0xa7, 0x5e, 0xcf, 0x86, 0xa9, 0xc6, 0x82, + 0x50, 0xa0, 0x3d, 0x72, 0x94, 0x39, 0xb8, 0x9c, 0xc1, 0x2a, 0xc4, 0x22, 0x0d, 0xdd, 0x25, 0x1a, + 0xf9, 0x48, 0x13, 0x75, 0x35, 0xdd, 0x2a, 0x6b, 0x9b, 0xba, 0xb3, 0x99, 0x1b, 0xf5, 0x13, 0xec, + 0xa3, 0xba, 0x73, 0x42, 0xb5, 0xc8, 0x34, 0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a8, 0x9a, 0x95, 0x2d, + 0x9e, 0x36, 0x16, 0x9a, 0x65, 0xbb, 0x49, 0x0b, 0x02, 0xae, 0x47, 0xa3, 0x5e, 0x44, 0x4d, 0x71, + 0x99, 0xa7, 0x22, 0x2a, 0xb6, 0xd6, 0x0e, 0x3e, 0xad, 0xa6, 0xb8, 0x8c, 0xab, 0x1c, 0x86, 0x21, + 0xbd, 0x52, 0x69, 0x50, 0x72, 0x49, 0xc4, 0xcb, 0xd0, 0x8c, 0x27, 0x66, 0x8a, 0x63, 0x27, 0x21, + 0x21, 0xed, 0x40, 0x13, 0x0b, 0xb5, 0x04, 0xe6, 0x7c, 0x76, 0x8e, 0xd2, 0x47, 0x37, 0xf5, 0x96, + 0x6c, 0xc4, 0x97, 0x56, 0x1d, 0xad, 0x75, 0xa0, 0xd7, 0x87, 0xed, 0x09, 0x35, 0x55, 0x75, 0xbc, + 0x13, 0x9c, 0xfc, 0xd3, 0x98, 0x5e, 0x83, 0x07, 0x92, 0xca, 0x2c, 0x24, 0x4c, 0x1b, 0xfd, 0x83, + 0x22, 0xf8, 0x69, 0xf8, 0x91, 0x90, 0x33, 0xcc, 0x89, 0x79, 0xa1, 0xaf, 0x7a, 0xc8, 0xb1, 0x5f, + 0x45, 0x20, 0x21, 0xc5, 0x98, 0x28, 0x62, 0x75, 0xdd, 0xdd, 0x64, 0x74, 0xf1, 0xe9, 0xbe, 0x6c, + 0x44, 0x65, 0xcf, 0x54, 0x8e, 0xd5, 0x8c, 0xc5, 0x5c, 0x40, 0xc8, 0xe9, 0x33, 0x9d, 0x57, 0x93, + 0xe8, 0x65, 0x56, 0xe0, 0xda, 0xb5, 0x1a, 0xce, 0xa4, 0x23, 0xe7, 0x55, 0xc8, 0x67, 0x84, 0x98, + 0x9e, 0x8b, 0xbb, 0x0d, 0xbd, 0x6a, 0x06, 0x74, 0x63, 0x4c, 0x37, 0x2b, 0x1b, 0x3c, 0xe5, 0x02, + 0xec, 0x93, 0xbc, 0x65, 0xe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07, 0x22, 0xff, + 0x09, 0x00, 0x00, 0xff, 0xff, 0x61, 0xee, 0x66, 0x13, 0x03, 0x2d, 0x00, 0x00, + } + r := bytes.NewReader(gzipped) + gzipr, err := compress_gzip.NewReader(r) + if err != nil { + panic(err) + } + ungzipped, err := io_ioutil.ReadAll(gzipr) + if err != nil { + panic(err) + } + if err := github_com_gogo_protobuf_proto.Unmarshal(ungzipped, d); err != nil { + panic(err) + } + return d +} +func (this *Castaway) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*Castaway) + if !ok { + that2, ok := that.(Castaway) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *Castaway") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *Castaway but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *Castaway but is not nil && this == nil") + } + if len(this.CastMapValueMessage) != len(that1.CastMapValueMessage) { + return fmt.Errorf("CastMapValueMessage this(%v) Not Equal that(%v)", len(this.CastMapValueMessage), len(that1.CastMapValueMessage)) + } + for i := range this.CastMapValueMessage { + a := (Wilson)(this.CastMapValueMessage[i]) + b := (Wilson)(that1.CastMapValueMessage[i]) + if !(&a).Equal(&b) { + return fmt.Errorf("CastMapValueMessage this[%v](%v) Not Equal that[%v](%v)", i, this.CastMapValueMessage[i], i, that1.CastMapValueMessage[i]) + } + } + if len(this.CastMapValueMessageNullable) != len(that1.CastMapValueMessageNullable) { + return fmt.Errorf("CastMapValueMessageNullable this(%v) Not Equal that(%v)", len(this.CastMapValueMessageNullable), len(that1.CastMapValueMessageNullable)) + } + for i := range this.CastMapValueMessageNullable { + a := (*Wilson)(this.CastMapValueMessageNullable[i]) + b := (*Wilson)(that1.CastMapValueMessageNullable[i]) + if !a.Equal(b) { + return fmt.Errorf("CastMapValueMessageNullable this[%v](%v) Not Equal that[%v](%v)", i, this.CastMapValueMessageNullable[i], i, that1.CastMapValueMessageNullable[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *Castaway) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*Castaway) + if !ok { + that2, ok := that.(Castaway) + 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.CastMapValueMessage) != len(that1.CastMapValueMessage) { + return false + } + for i := range this.CastMapValueMessage { + a := (Wilson)(this.CastMapValueMessage[i]) + b := (Wilson)(that1.CastMapValueMessage[i]) + if !(&a).Equal(&b) { + return false + } + } + if len(this.CastMapValueMessageNullable) != len(that1.CastMapValueMessageNullable) { + return false + } + for i := range this.CastMapValueMessageNullable { + a := (*Wilson)(this.CastMapValueMessageNullable[i]) + b := (*Wilson)(that1.CastMapValueMessageNullable[i]) + if !a.Equal(b) { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *Wilson) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*Wilson) + if !ok { + that2, ok := that.(Wilson) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *Wilson") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *Wilson but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *Wilson but is not nil && this == nil") + } + if this.Int64 != nil && that1.Int64 != nil { + if *this.Int64 != *that1.Int64 { + return fmt.Errorf("Int64 this(%v) Not Equal that(%v)", *this.Int64, *that1.Int64) + } + } else if this.Int64 != nil { + return fmt.Errorf("this.Int64 == nil && that.Int64 != nil") + } else if that1.Int64 != nil { + return fmt.Errorf("Int64 this(%v) Not Equal that(%v)", this.Int64, that1.Int64) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *Wilson) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*Wilson) + if !ok { + that2, ok := that.(Wilson) + 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.Int64 != nil && that1.Int64 != nil { + if *this.Int64 != *that1.Int64 { + return false + } + } else if this.Int64 != nil { + return false + } else if that1.Int64 != nil { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} + +type CastawayFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetCastMapValueMessage() map[int32]MyWilson + GetCastMapValueMessageNullable() map[int32]*MyWilson +} + +func (this *Castaway) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *Castaway) TestProto() github_com_gogo_protobuf_proto.Message { + return NewCastawayFromFace(this) +} + +func (this *Castaway) GetCastMapValueMessage() map[int32]MyWilson { + return this.CastMapValueMessage +} + +func (this *Castaway) GetCastMapValueMessageNullable() map[int32]*MyWilson { + return this.CastMapValueMessageNullable +} + +func NewCastawayFromFace(that CastawayFace) *Castaway { + this := &Castaway{} + this.CastMapValueMessage = that.GetCastMapValueMessage() + this.CastMapValueMessageNullable = that.GetCastMapValueMessageNullable() + return this +} + +type WilsonFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetInt64() *int64 +} + +func (this *Wilson) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *Wilson) TestProto() github_com_gogo_protobuf_proto.Message { + return NewWilsonFromFace(this) +} + +func (this *Wilson) GetInt64() *int64 { + return this.Int64 +} + +func NewWilsonFromFace(that WilsonFace) *Wilson { + this := &Wilson{} + this.Int64 = that.GetInt64() + return this +} + +func (this *Castaway) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 6) + s = append(s, "&castvalue.Castaway{") + keysForCastMapValueMessage := make([]int32, 0, len(this.CastMapValueMessage)) + for k := range this.CastMapValueMessage { + keysForCastMapValueMessage = append(keysForCastMapValueMessage, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForCastMapValueMessage) + mapStringForCastMapValueMessage := "map[int32]MyWilson{" + for _, k := range keysForCastMapValueMessage { + mapStringForCastMapValueMessage += fmt.Sprintf("%#v: %#v,", k, this.CastMapValueMessage[k]) + } + mapStringForCastMapValueMessage += "}" + if this.CastMapValueMessage != nil { + s = append(s, "CastMapValueMessage: "+mapStringForCastMapValueMessage+",\n") + } + keysForCastMapValueMessageNullable := make([]int32, 0, len(this.CastMapValueMessageNullable)) + for k := range this.CastMapValueMessageNullable { + keysForCastMapValueMessageNullable = append(keysForCastMapValueMessageNullable, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForCastMapValueMessageNullable) + mapStringForCastMapValueMessageNullable := "map[int32]*MyWilson{" + for _, k := range keysForCastMapValueMessageNullable { + mapStringForCastMapValueMessageNullable += fmt.Sprintf("%#v: %#v,", k, this.CastMapValueMessageNullable[k]) + } + mapStringForCastMapValueMessageNullable += "}" + if this.CastMapValueMessageNullable != nil { + s = append(s, "CastMapValueMessageNullable: "+mapStringForCastMapValueMessageNullable+",\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 *Wilson) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&castvalue.Wilson{") + if this.Int64 != nil { + s = append(s, "Int64: "+valueToGoStringCastvalue(this.Int64, "int64")+",\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 valueToGoStringCastvalue(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 extensionToGoStringCastvalue(e map[int32]github_com_gogo_protobuf_proto.Extension) string { + if e == nil { + return "nil" + } + s := "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 +} +func NewPopulatedCastaway(r randyCastvalue, easy bool) *Castaway { + this := &Castaway{} + if r.Intn(10) != 0 { + v1 := r.Intn(10) + this.CastMapValueMessage = make(map[int32]MyWilson) + for i := 0; i < v1; i++ { + this.CastMapValueMessage[int32(r.Int31())] = (MyWilson)(*NewPopulatedWilson(r, easy)) + } + } + if r.Intn(10) != 0 { + v2 := r.Intn(10) + this.CastMapValueMessageNullable = make(map[int32]*MyWilson) + for i := 0; i < v2; i++ { + this.CastMapValueMessageNullable[int32(r.Int31())] = (*MyWilson)(NewPopulatedWilson(r, easy)) + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedCastvalue(r, 3) + } + return this +} + +func NewPopulatedWilson(r randyCastvalue, easy bool) *Wilson { + this := &Wilson{} + if r.Intn(10) != 0 { + v3 := int64(r.Int63()) + if r.Intn(2) == 0 { + v3 *= -1 + } + this.Int64 = &v3 + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedCastvalue(r, 2) + } + return this +} + +type randyCastvalue interface { + Float32() float32 + Float64() float64 + Int63() int64 + Int31() int32 + Uint32() uint32 + Intn(n int) int +} + +func randUTF8RuneCastvalue(r randyCastvalue) 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 randStringCastvalue(r randyCastvalue) string { + v4 := r.Intn(100) + tmps := make([]rune, v4) + for i := 0; i < v4; i++ { + tmps[i] = randUTF8RuneCastvalue(r) + } + return string(tmps) +} +func randUnrecognizedCastvalue(r randyCastvalue, 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 = randFieldCastvalue(data, r, fieldNumber, wire) + } + return data +} +func randFieldCastvalue(data []byte, r randyCastvalue, fieldNumber int, wire int) []byte { + key := uint32(fieldNumber)<<3 | uint32(wire) + switch wire { + case 0: + data = encodeVarintPopulateCastvalue(data, uint64(key)) + v5 := r.Int63() + if r.Intn(2) == 0 { + v5 *= -1 + } + data = encodeVarintPopulateCastvalue(data, uint64(v5)) + case 1: + data = encodeVarintPopulateCastvalue(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 = encodeVarintPopulateCastvalue(data, uint64(key)) + ll := r.Intn(100) + data = encodeVarintPopulateCastvalue(data, uint64(ll)) + for j := 0; j < ll; j++ { + data = append(data, byte(r.Intn(256))) + } + default: + data = encodeVarintPopulateCastvalue(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 encodeVarintPopulateCastvalue(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 *Castaway) Size() (n int) { + var l int + _ = l + if len(m.CastMapValueMessage) > 0 { + for k, v := range m.CastMapValueMessage { + _ = k + _ = v + l = ((*Wilson)(&v)).Size() + mapEntrySize := 1 + sovCastvalue(uint64(k)) + 1 + l + sovCastvalue(uint64(l)) + n += mapEntrySize + 1 + sovCastvalue(uint64(mapEntrySize)) + } + } + if len(m.CastMapValueMessageNullable) > 0 { + for k, v := range m.CastMapValueMessageNullable { + _ = k + _ = v + l = 0 + if v != nil { + l = ((*Wilson)(v)).Size() + } + mapEntrySize := 1 + sovCastvalue(uint64(k)) + 1 + l + sovCastvalue(uint64(l)) + n += mapEntrySize + 1 + sovCastvalue(uint64(mapEntrySize)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *Wilson) Size() (n int) { + var l int + _ = l + if m.Int64 != nil { + n += 1 + sovCastvalue(uint64(*m.Int64)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func sovCastvalue(x uint64) (n int) { + for { + n++ + x >>= 7 + if x == 0 { + break + } + } + return n +} +func sozCastvalue(x uint64) (n int) { + return sovCastvalue(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (this *Castaway) String() string { + if this == nil { + return "nil" + } + keysForCastMapValueMessage := make([]int32, 0, len(this.CastMapValueMessage)) + for k := range this.CastMapValueMessage { + keysForCastMapValueMessage = append(keysForCastMapValueMessage, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForCastMapValueMessage) + mapStringForCastMapValueMessage := "map[int32]MyWilson{" + for _, k := range keysForCastMapValueMessage { + mapStringForCastMapValueMessage += fmt.Sprintf("%v: %v,", k, this.CastMapValueMessage[k]) + } + mapStringForCastMapValueMessage += "}" + keysForCastMapValueMessageNullable := make([]int32, 0, len(this.CastMapValueMessageNullable)) + for k := range this.CastMapValueMessageNullable { + keysForCastMapValueMessageNullable = append(keysForCastMapValueMessageNullable, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForCastMapValueMessageNullable) + mapStringForCastMapValueMessageNullable := "map[int32]*MyWilson{" + for _, k := range keysForCastMapValueMessageNullable { + mapStringForCastMapValueMessageNullable += fmt.Sprintf("%v: %v,", k, this.CastMapValueMessageNullable[k]) + } + mapStringForCastMapValueMessageNullable += "}" + s := strings.Join([]string{`&Castaway{`, + `CastMapValueMessage:` + mapStringForCastMapValueMessage + `,`, + `CastMapValueMessageNullable:` + mapStringForCastMapValueMessageNullable + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *Wilson) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&Wilson{`, + `Int64:` + valueToStringCastvalue(this.Int64) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func valueToStringCastvalue(v interface{}) string { + rv := reflect.ValueOf(v) + if rv.IsNil() { + return "nil" + } + pv := reflect.Indirect(rv).Interface() + return fmt.Sprintf("*%v", pv) +} +func (m *Castaway) 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 ErrIntOverflowCastvalueUnsafe + } + 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: Castaway: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Castaway: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field CastMapValueMessage", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCastvalueUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthCastvalueUnsafe + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var keykey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCastvalueUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + keykey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapkey int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCastvalueUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + mapkey |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var valuekey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCastvalueUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + valuekey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapmsglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCastvalueUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + mapmsglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if mapmsglen < 0 { + return ErrInvalidLengthCastvalueUnsafe + } + postmsgIndex := iNdEx + mapmsglen + if mapmsglen < 0 { + return ErrInvalidLengthCastvalueUnsafe + } + if postmsgIndex > l { + return io.ErrUnexpectedEOF + } + mapvalue := &Wilson{} + if err := mapvalue.Unmarshal(data[iNdEx:postmsgIndex]); err != nil { + return err + } + iNdEx = postmsgIndex + if m.CastMapValueMessage == nil { + m.CastMapValueMessage = make(map[int32]MyWilson) + } + m.CastMapValueMessage[mapkey] = ((MyWilson)(*mapvalue)) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field CastMapValueMessageNullable", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCastvalueUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthCastvalueUnsafe + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var keykey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCastvalueUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + keykey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapkey int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCastvalueUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + mapkey |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var valuekey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCastvalueUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + valuekey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapmsglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCastvalueUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + mapmsglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if mapmsglen < 0 { + return ErrInvalidLengthCastvalueUnsafe + } + postmsgIndex := iNdEx + mapmsglen + if mapmsglen < 0 { + return ErrInvalidLengthCastvalueUnsafe + } + if postmsgIndex > l { + return io.ErrUnexpectedEOF + } + mapvalue := &Wilson{} + if err := mapvalue.Unmarshal(data[iNdEx:postmsgIndex]); err != nil { + return err + } + iNdEx = postmsgIndex + if m.CastMapValueMessageNullable == nil { + m.CastMapValueMessageNullable = make(map[int32]*MyWilson) + } + m.CastMapValueMessageNullable[mapkey] = ((*MyWilson)(mapvalue)) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipCastvalueUnsafe(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthCastvalueUnsafe + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Wilson) 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 ErrIntOverflowCastvalueUnsafe + } + 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: Wilson: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Wilson: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Int64", wireType) + } + var v int64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCastvalueUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Int64 = &v + default: + iNdEx = preIndex + skippy, err := skipCastvalueUnsafe(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthCastvalueUnsafe + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipCastvalueUnsafe(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, ErrIntOverflowCastvalueUnsafe + } + 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, ErrIntOverflowCastvalueUnsafe + } + 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, ErrIntOverflowCastvalueUnsafe + } + 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, ErrInvalidLengthCastvalueUnsafe + } + return iNdEx, nil + case 3: + for { + var innerWire uint64 + var start int = iNdEx + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowCastvalueUnsafe + } + 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 := skipCastvalueUnsafe(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 ( + ErrInvalidLengthCastvalueUnsafe = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowCastvalueUnsafe = fmt.Errorf("proto: integer overflow") +) + +var fileDescriptorCastvalue = []byte{ + // 346 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xe2, 0xd2, 0x48, 0xce, 0xcf, 0x4d, + 0xca, 0x2f, 0xd6, 0x2f, 0xcd, 0x2b, 0x4e, 0x4c, 0x4b, 0x2d, 0xcd, 0xcb, 0x4d, 0x2c, 0x2a, 0xce, + 0x48, 0xcc, 0x49, 0x2d, 0xd2, 0x4f, 0x4e, 0x2c, 0x2e, 0x29, 0x4b, 0xcc, 0x29, 0x4d, 0xd5, 0x2b, + 0x28, 0xca, 0x2f, 0xc9, 0x17, 0xe2, 0x84, 0x0b, 0x48, 0xe9, 0xa6, 0x67, 0x96, 0x64, 0x94, 0x26, + 0xe9, 0x01, 0xf5, 0xea, 0xa7, 0xe7, 0xa7, 0xe7, 0xeb, 0x83, 0x55, 0x24, 0x95, 0xa6, 0x81, 0x79, + 0x60, 0x0e, 0x98, 0x05, 0xd1, 0xa9, 0x74, 0x90, 0x99, 0x8b, 0xc3, 0x19, 0xa8, 0x39, 0xb1, 0x3c, + 0xb1, 0x52, 0xa8, 0x80, 0x4b, 0x18, 0xc4, 0xf6, 0x4d, 0x2c, 0x08, 0x03, 0x99, 0xe5, 0x9b, 0x5a, + 0x5c, 0x9c, 0x98, 0x9e, 0x2a, 0xc1, 0xa8, 0xc0, 0xac, 0xc1, 0x6d, 0xa4, 0xa3, 0x87, 0xb0, 0x15, + 0xa6, 0x43, 0x0f, 0x8b, 0x72, 0xd7, 0xbc, 0x92, 0xa2, 0x4a, 0x27, 0x81, 0x13, 0xf7, 0xe4, 0x19, + 0xba, 0xee, 0xcb, 0x73, 0xf8, 0x56, 0x86, 0x67, 0xe6, 0x14, 0xe7, 0xe7, 0x05, 0x09, 0x27, 0x63, + 0xaa, 0x15, 0x6a, 0x61, 0xe4, 0x92, 0xc6, 0x62, 0x86, 0x5f, 0x69, 0x4e, 0x4e, 0x62, 0x52, 0x4e, + 0xaa, 0x04, 0x13, 0xd8, 0x6a, 0x13, 0x22, 0xad, 0x86, 0x69, 0x83, 0x38, 0x81, 0x07, 0xc5, 0x7a, + 0xe9, 0x64, 0xdc, 0xea, 0xa5, 0x22, 0xb9, 0x24, 0x70, 0xf9, 0x44, 0x48, 0x80, 0x8b, 0x39, 0x3b, + 0xb5, 0x12, 0x18, 0x08, 0x8c, 0x1a, 0xac, 0x41, 0x20, 0xa6, 0x90, 0x3a, 0x17, 0x2b, 0xd8, 0x2d, + 0x40, 0xd7, 0x31, 0x02, 0x5d, 0x27, 0x88, 0xe4, 0x3a, 0xa8, 0x65, 0x10, 0x79, 0x2b, 0x26, 0x0b, + 0x46, 0xa9, 0x44, 0x2e, 0x05, 0x42, 0x2e, 0xa5, 0xd0, 0x0a, 0x25, 0x39, 0x2e, 0x36, 0x88, 0xa0, + 0x90, 0x08, 0x17, 0xab, 0x67, 0x5e, 0x89, 0x99, 0x09, 0xd8, 0x28, 0xe6, 0x20, 0xd6, 0x4c, 0x10, + 0xc7, 0xc9, 0xe7, 0xc4, 0x43, 0x39, 0x86, 0x0b, 0x40, 0x7c, 0x03, 0x88, 0x1f, 0x3c, 0x94, 0x63, + 0x7c, 0x01, 0xc4, 0x1f, 0x80, 0xf8, 0x07, 0x10, 0x37, 0x3c, 0x92, 0x63, 0x5c, 0x01, 0xc4, 0x1b, + 0x80, 0x78, 0x07, 0x10, 0x1f, 0x00, 0xe2, 0x13, 0x8f, 0x80, 0xea, 0x81, 0xf8, 0x01, 0x90, 0xfd, + 0x02, 0x48, 0x7f, 0x00, 0xd2, 0x3f, 0x80, 0x74, 0xc3, 0x63, 0x39, 0x46, 0x40, 0x00, 0x00, 0x00, + 0xff, 0xff, 0x09, 0x08, 0xa5, 0x19, 0x96, 0x02, 0x00, 0x00, +} diff --git a/vendor/github.com/gogo/protobuf/test/castvalue/combos/unsafeunmarshaler/castvalue.proto b/vendor/github.com/gogo/protobuf/test/castvalue/combos/unsafeunmarshaler/castvalue.proto new file mode 100644 index 000000000..e7e6dac35 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/castvalue/combos/unsafeunmarshaler/castvalue.proto @@ -0,0 +1,64 @@ +// Copyright (c) 2015, Vastech SA (PTY) LTD. All rights reserved. +// http://github.com/gogo/protobuf/gogoproto +// +// 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 castvalue; + +import "github.com/gogo/protobuf/gogoproto/gogo.proto"; + +option (gogoproto.goproto_stringer_all) = false; +option (gogoproto.goproto_enum_prefix_all) = false; +option (gogoproto.goproto_getters_all) = false; + +option (gogoproto.equal_all) = true; +option (gogoproto.verbose_equal_all) = true; +option (gogoproto.stringer_all) = true; +option (gogoproto.gostring_all) = true; +option (gogoproto.face_all) = true; +option (gogoproto.description_all) = true; + +option (gogoproto.testgen_all) = true; +option (gogoproto.populate_all) = true; +option (gogoproto.benchgen_all) = true; +option (gogoproto.unmarshaler_all) = false; +option (gogoproto.marshaler_all) = false; +option (gogoproto.sizer_all) = true; + +option (gogoproto.goproto_enum_stringer_all) = false; +option (gogoproto.enum_stringer_all) = true; + +option (gogoproto.unsafe_marshaler_all) = false; +option (gogoproto.unsafe_unmarshaler_all) = true; + +message Castaway { + map CastMapValueMessage = 1 [(gogoproto.castvalue) = "MyWilson", (gogoproto.nullable) = false]; + map CastMapValueMessageNullable = 2 [(gogoproto.castvalue) = "MyWilson"]; +} + +message Wilson { + optional int64 Int64 = 1; +} diff --git a/vendor/github.com/gogo/protobuf/test/castvalue/combos/unsafeunmarshaler/castvaluepb_test.go b/vendor/github.com/gogo/protobuf/test/castvalue/combos/unsafeunmarshaler/castvaluepb_test.go new file mode 100644 index 000000000..21bb4cf4e --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/castvalue/combos/unsafeunmarshaler/castvaluepb_test.go @@ -0,0 +1,457 @@ +// Code generated by protoc-gen-gogo. +// source: combos/unsafeunmarshaler/castvalue.proto +// DO NOT EDIT! + +/* +Package castvalue is a generated protocol buffer package. + +It is generated from these files: + combos/unsafeunmarshaler/castvalue.proto + +It has these top-level messages: + Castaway + Wilson +*/ +package castvalue + +import testing "testing" +import math_rand "math/rand" +import time "time" +import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" +import github_com_gogo_protobuf_jsonpb "github.com/gogo/protobuf/jsonpb" +import fmt "fmt" +import go_parser "go/parser" +import proto "github.com/gogo/protobuf/proto" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +func TestCastawayProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCastaway(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Castaway{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkCastawayProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Castaway, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedCastaway(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkCastawayProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedCastaway(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &Castaway{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestWilsonProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedWilson(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Wilson{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkWilsonProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Wilson, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedWilson(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkWilsonProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedWilson(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &Wilson{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestCastawayJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCastaway(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Castaway{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestWilsonJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedWilson(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Wilson{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestCastawayProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCastaway(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &Castaway{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestCastawayProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCastaway(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &Castaway{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestWilsonProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedWilson(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &Wilson{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestWilsonProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedWilson(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &Wilson{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestCastvalueDescription(t *testing.T) { + CastvalueDescription() +} +func TestCastawayVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCastaway(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &Castaway{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestWilsonVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedWilson(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &Wilson{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestCastawayFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCastaway(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestWilsonFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedWilson(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestCastawayGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCastaway(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestWilsonGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedWilson(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestCastawaySize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCastaway(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkCastawaySize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Castaway, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedCastaway(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestWilsonSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedWilson(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkWilsonSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Wilson, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedWilson(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestCastawayStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCastaway(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestWilsonStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedWilson(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} + +//These tests are generated by github.com/gogo/protobuf/plugin/testgen diff --git a/vendor/github.com/gogo/protobuf/test/castvalue/combos/unsafeunmarshaler/mytypes.go b/vendor/github.com/gogo/protobuf/test/castvalue/combos/unsafeunmarshaler/mytypes.go new file mode 100644 index 000000000..9892212c4 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/castvalue/combos/unsafeunmarshaler/mytypes.go @@ -0,0 +1,31 @@ +// Extensions for Protocol Buffers to create more go like structures. +// +// Copyright (c) 2013, Vastech SA (PTY) LTD. All rights reserved. +// http://github.com/gogo/protobuf/gogoproto +// +// 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 castvalue + +type MyWilson Wilson diff --git a/vendor/github.com/gogo/protobuf/test/castvalue/mytypes.go b/vendor/github.com/gogo/protobuf/test/castvalue/mytypes.go new file mode 100644 index 000000000..9892212c4 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/castvalue/mytypes.go @@ -0,0 +1,31 @@ +// Extensions for Protocol Buffers to create more go like structures. +// +// Copyright (c) 2013, Vastech SA (PTY) LTD. All rights reserved. +// http://github.com/gogo/protobuf/gogoproto +// +// 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 castvalue + +type MyWilson Wilson diff --git a/vendor/github.com/gogo/protobuf/test/combos/both/bug_test.go b/vendor/github.com/gogo/protobuf/test/combos/both/bug_test.go new file mode 100644 index 000000000..2386c48e5 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/combos/both/bug_test.go @@ -0,0 +1,250 @@ +// Copyright (c) 2013, Vastech SA (PTY) LTD. All rights reserved. +// http://github.com/gogo/protobuf/gogoproto +// +// 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 test + +import ( + "fmt" + "math" + "math/rand" + "testing" + "time" + + "github.com/gogo/protobuf/proto" +) + +//http://code.google.com/p/goprotobuf/issues/detail?id=39 +func TestBugUint32VarintSize(t *testing.T) { + temp := uint32(math.MaxUint32) + n := &NinOptNative{} + n.Field5 = &temp + data, err := proto.Marshal(n) + if err != nil { + panic(err) + } + if len(data) != 6 { + t.Fatalf("data should be length 6, but its %#v", data) + } +} + +func TestBugZeroLengthSliceSize(t *testing.T) { + n := &NinRepPackedNative{ + Field8: []int64{}, + } + size := n.Size() + data, err := proto.Marshal(n) + if err != nil { + panic(err) + } + if len(data) != size { + t.Fatalf("expected %v, but got %v", len(data), size) + } +} + +//http://code.google.com/p/goprotobuf/issues/detail?id=40 +func TestBugPackedProtoSize(t *testing.T) { + n := &NinRepPackedNative{ + Field4: []int64{172960727389894724, 2360337516664475010, 860833876131988189, 9068073014890763245, 7794843386260381831, 4023536436053141786, 8992311247496919020, 4330096163611305776, 4490411416244976467, 7873947349172707443, 2754969595834279669, 1360667855926938684, 4771480785172657389, 4875578924966668055, 8070579869808877481, 9128179594766551001, 4630419407064527516, 863844540220372892, 8208727650143073487, 7086117356301045838, 7779695211931506151, 5493835345187563535, 9119767633370806007, 9054342025895349248, 1887303228838508438, 7624573031734528281, 1874668389749611225, 3517684643468970593, 6677697606628877758, 7293473953189936168, 444475066704085538, 8594971141363049302, 1146643249094989673, 733393306232853371, 7721178528893916886, 7784452000911004429, 6436373110242711440, 6897422461738321237, 8772249155667732778, 6211871464311393541, 3061903718310406883, 7845488913176136641, 8342255034663902574, 3443058984649725748, 8410801047334832902, 7496541071517841153, 4305416923521577765, 7814967600020476457, 8671843803465481186, 3490266370361096855, 1447425664719091336, 653218597262334239, 8306243902880091940, 7851896059762409081, 5936760560798954978, 5755724498441478025, 7022701569985035966, 3707709584811468220, 529069456924666920, 7986469043681522462, 3092513330689518836, 5103541550470476202, 3577384161242626406, 3733428084624703294, 8388690542440473117, 3262468785346149388, 8788358556558007570, 5476276940198542020, 7277903243119461239, 5065861426928605020, 7533460976202697734, 1749213838654236956, 557497603941617931, 5496307611456481108, 6444547750062831720, 6992758776744205596, 7356719693428537399, 2896328872476734507, 381447079530132038, 598300737753233118, 3687980626612697715, 7240924191084283349, 8172414415307971170, 4847024388701257185, 2081764168600256551, 3394217778539123488, 6244660626429310923, 8301712215675381614, 5360615125359461174, 8410140945829785773, 3152963269026381373, 6197275282781459633, 4419829061407546410, 6262035523070047537, 2837207483933463885, 2158105736666826128, 8150764172235490711}, + Field7: []int32{249451845, 1409974015, 393609128, 435232428, 1817529040, 91769006, 861170933, 1556185603, 1568580279, 1236375273, 512276621, 693633711, 967580535, 1950715977, 853431462, 1362390253, 159591204, 111900629, 322985263, 279671129, 1592548430, 465651370, 733849989, 1172059400, 1574824441, 263541092, 1271612397, 1520584358, 467078791, 117698716, 1098255064, 2054264846, 1766452305, 1267576395, 1557505617, 1187833560, 956187431, 1970977586, 1160235159, 1610259028, 489585797, 459139078, 566263183, 954319278, 1545018565, 1753946743, 948214318, 422878159, 883926576, 1424009347, 824732372, 1290433180, 80297942, 417294230, 1402647904, 2078392782, 220505045, 787368129, 463781454, 293083578, 808156928, 293976361}, + Field9: []uint32{0xaa4976e8, 0x3da8cc4c, 0x8c470d83, 0x344d964e, 0x5b90925, 0xa4c4d34e, 0x666eff19, 0xc238e552, 0x9be53bb6, 0x56364245, 0x33ee079d, 0x96bf0ede, 0x7941b74f, 0xdb07cb47, 0x6d76d827, 0x9b211d5d, 0x2798adb6, 0xe48b0c3b, 0x87061b21, 0x48f4e4d2, 0x3e5d5c12, 0x5ee91288, 0x336d4f35, 0xe1d44941, 0xc065548d, 0x2953d73f, 0x873af451, 0xfc769db, 0x9f1bf8da, 0x9baafdfc, 0xf1d3d770, 0x5bb5d2b4, 0xc2c67c48, 0x6845c4c1, 0xa48f32b0, 0xbb04bb70, 0xa5b1ca36, 0x8d98356a, 0x2171f654, 0x5ae279b0, 0x6c4a3d6b, 0x4fff5468, 0xcf9bf851, 0x68513614, 0xdbecd9b0, 0x9553ed3c, 0xa494a736, 0x42205438, 0xbf8e5caa, 0xd3283c6, 0x76d20788, 0x9179826f, 0x96b24f85, 0xbc2eacf4, 0xe4afae0b, 0x4bca85cb, 0x35e63b5b, 0xd7ccee0c, 0x2b506bb9, 0xe78e9f44, 0x9ad232f1, 0x99a37335, 0xa5d6ffc8}, + Field11: []uint64{0x53c01ebc, 0x4fb85ba6, 0x8805eea1, 0xb20ec896, 0x93b63410, 0xec7c9492, 0x50765a28, 0x19592106, 0x2ecc59b3, 0x39cd474f, 0xe4c9e47, 0x444f48c5, 0xe7731d32, 0xf3f43975, 0x603caedd, 0xbb05a1af, 0xa808e34e, 0x88580b07, 0x4c96bbd1, 0x730b4ab9, 0xed126e2b, 0x6db48205, 0x154ba1b9, 0xc26bfb6a, 0x389aa052, 0x869d966c, 0x7c86b366, 0xcc8edbcd, 0xfa8d6dad, 0xcf5857d9, 0x2d9cda0f, 0x1218a0b8, 0x41bf997, 0xf0ca65ac, 0xa610d4b9, 0x8d362e28, 0xb7212d87, 0x8e0fe109, 0xbee041d9, 0x759be2f6, 0x35fef4f3, 0xaeacdb71, 0x10888852, 0xf4e28117, 0xe2a14812, 0x73b748dc, 0xd1c3c6b2, 0xfef41bf0, 0xc9b43b62, 0x810e4faa, 0xcaa41c06, 0x1893fe0d, 0xedc7c850, 0xd12b9eaa, 0x467ee1a9, 0xbe84756b, 0xda7b1680, 0xdc069ffe, 0xf1e7e9f9, 0xb3d95370, 0xa92b77df, 0x5693ac41, 0xd04b7287, 0x27aebf15, 0x837b316e, 0x4dbe2263, 0xbab70c67, 0x547dab21, 0x3c346c1f, 0xb8ef0e4e, 0xfe2d03ce, 0xe1d75955, 0xfec1306, 0xba35c23e, 0xb784ed04, 0x2a4e33aa, 0x7e19d09a, 0x3827c1fe, 0xf3a51561, 0xef765e2b, 0xb044256c, 0x62b322be, 0xf34d56be, 0xeb71b369, 0xffe1294f, 0x237fe8d0, 0x77a1473b, 0x239e1196, 0xdd19bf3d, 0x82c91fe1, 0x95361c57, 0xffea3f1b, 0x1a094c84}, + Field12: []int64{8308420747267165049, 3664160795077875961, 7868970059161834817, 7237335984251173739, 5254748003907196506, 3362259627111837480, 430460752854552122, 5119635556501066533, 1277716037866233522, 9185775384759813768, 833932430882717888, 7986528304451297640, 6792233378368656337, 2074207091120609721, 1788723326198279432, 7756514594746453657, 2283775964901597324, 3061497730110517191, 7733947890656120277, 626967303632386244, 7822928600388582821, 3489658753000061230, 168869995163005961, 248814782163480763, 477885608911386247, 4198422415674133867, 3379354662797976109, 9925112544736939, 1486335136459138480, 4561560414032850671, 1010864164014091267, 186722821683803084, 5106357936724819318, 1298160820191228988, 4675403242419953145, 7130634540106489752, 7101280006672440929, 7176058292431955718, 9109875054097770321, 6810974877085322872, 4736707874303993641, 8993135362721382187, 6857881554990254283, 3704748883307461680, 1099360832887634994, 5207691918707192633, 5984721695043995243}, + } + size := proto.Size(n) + data, err := proto.Marshal(n) + if err != nil { + panic(err) + } + if len(data) != size { + t.Fatalf("expected %v, but got %v diff is %v", len(data), size, len(data)-size) + } +} + +func testSize(m interface { + proto.Message + Size() int +}, desc string, expected int) ([]byte, error) { + data, err := proto.Marshal(m) + if err != nil { + return nil, err + } + protoSize := proto.Size(m) + mSize := m.Size() + lenData := len(data) + if protoSize != mSize || protoSize != lenData || mSize != lenData { + return nil, fmt.Errorf("%s proto.Size(m){%d} != m.Size(){%d} != len(data){%d}", desc, protoSize, mSize, lenData) + } + if got := protoSize; got != expected { + return nil, fmt.Errorf("%s proto.Size(m) got %d expected %d", desc, got, expected) + } + if got := mSize; got != expected { + return nil, fmt.Errorf("%s m.Size() got %d expected %d", desc, got, expected) + } + if got := lenData; got != expected { + return nil, fmt.Errorf("%s len(data) got %d expected %d", desc, got, expected) + } + return data, nil +} + +func TestInt32Int64Compatibility(t *testing.T) { + + //test nullable int32 and int64 + + data1, err := testSize(&NinOptNative{ + Field3: proto.Int32(-1), + }, "nullable", 11) + if err != nil { + t.Error(err) + } + //change marshaled data1 to unmarshal into 4th field which is an int64 + data1[0] = uint8(uint32(4 /*fieldNumber*/)<<3 | uint32(0 /*wireType*/)) + u1 := &NinOptNative{} + if err = proto.Unmarshal(data1, u1); err != nil { + t.Error(err) + } + if !u1.Equal(&NinOptNative{ + Field4: proto.Int64(-1), + }) { + t.Error("nullable unmarshaled int32 is not the same int64") + } + + //test non-nullable int32 and int64 + + data2, err := testSize(&NidOptNative{ + Field3: -1, + }, "non nullable", 67) + if err != nil { + t.Error(err) + } + //change marshaled data2 to unmarshal into 4th field which is an int64 + field3 := uint8(uint32(3 /*fieldNumber*/)<<3 | uint32(0 /*wireType*/)) + field4 := uint8(uint32(4 /*fieldNumber*/)<<3 | uint32(0 /*wireType*/)) + for i, c := range data2 { + if c == field4 { + data2[i] = field3 + } else if c == field3 { + data2[i] = field4 + } + } + u2 := &NidOptNative{} + if err = proto.Unmarshal(data2, u2); err != nil { + t.Error(err) + } + if !u2.Equal(&NidOptNative{ + Field4: -1, + }) { + t.Error("non nullable unmarshaled int32 is not the same int64") + } + + //test packed repeated int32 and int64 + + m4 := &NinRepPackedNative{ + Field3: []int32{-1}, + } + data4, err := testSize(m4, "packed", 12) + if err != nil { + t.Error(err) + } + u4 := &NinRepPackedNative{} + if err := proto.Unmarshal(data4, u4); err != nil { + t.Error(err) + } + if err := u4.VerboseEqual(m4); err != nil { + t.Fatalf("%#v", u4) + } + + //test repeated int32 and int64 + + if _, err := testSize(&NinRepNative{ + Field3: []int32{-1}, + }, "repeated", 11); err != nil { + t.Error(err) + } + + t.Logf("tested all") +} + +func TestRepeatedExtensionsMsgsIssue161(t *testing.T) { + r := rand.New(rand.NewSource(time.Now().UnixNano())) + rep := 10 + nins := make([]*NinOptNative, rep) + for i := range nins { + nins[i] = NewPopulatedNinOptNative(r, true) + } + input := &MyExtendable{} + if err := proto.SetExtension(input, E_FieldE, nins); err != nil { + t.Fatal(err) + } + data, err := proto.Marshal(input) + if err != nil { + t.Fatal(err) + } + output := &MyExtendable{} + if err := proto.Unmarshal(data, output); err != nil { + t.Fatal(err) + } + if !input.Equal(output) { + t.Fatal("expected equal") + } + data2, err2 := proto.Marshal(output) + if err2 != nil { + t.Fatal(err2) + } + if len(data) != len(data2) { + t.Fatal("expected equal length buffers") + } +} + +func TestRepeatedExtensionsFieldsIssue161(t *testing.T) { + r := rand.New(rand.NewSource(time.Now().UnixNano())) + rep := 10 + ints := make([]int64, rep) + for i := range ints { + ints[i] = r.Int63() + } + input := &MyExtendable{} + if err := proto.SetExtension(input, E_FieldD, ints); err != nil { + t.Fatal(err) + } + data, err := proto.Marshal(input) + if err != nil { + t.Fatal(err) + } + output := &MyExtendable{} + if err := proto.Unmarshal(data, output); err != nil { + t.Fatal(err) + } + if !input.Equal(output) { + t.Fatal("expected equal") + } + data2, err2 := proto.Marshal(output) + if err2 != nil { + t.Fatal(err2) + } + if len(data) != len(data2) { + t.Fatal("expected equal length buffers") + } +} diff --git a/vendor/github.com/gogo/protobuf/test/combos/both/thetest.pb.go b/vendor/github.com/gogo/protobuf/test/combos/both/thetest.pb.go new file mode 100644 index 000000000..4e571395c --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/combos/both/thetest.pb.go @@ -0,0 +1,40312 @@ +// Code generated by protoc-gen-gogo. +// source: combos/both/thetest.proto +// DO NOT EDIT! + +/* + Package test is a generated protocol buffer package. + + It is generated from these files: + combos/both/thetest.proto + + It has these top-level messages: + NidOptNative + NinOptNative + NidRepNative + NinRepNative + NidRepPackedNative + NinRepPackedNative + NidOptStruct + NinOptStruct + NidRepStruct + NinRepStruct + NidEmbeddedStruct + NinEmbeddedStruct + NidNestedStruct + NinNestedStruct + NidOptCustom + CustomDash + NinOptCustom + NidRepCustom + NinRepCustom + NinOptNativeUnion + NinOptStructUnion + NinEmbeddedStructUnion + NinNestedStructUnion + Tree + OrBranch + AndBranch + Leaf + DeepTree + ADeepBranch + AndDeepBranch + DeepLeaf + Nil + NidOptEnum + NinOptEnum + NidRepEnum + NinRepEnum + NinOptEnumDefault + AnotherNinOptEnum + AnotherNinOptEnumDefault + Timer + MyExtendable + OtherExtenable + NestedDefinition + NestedScope + NinOptNativeDefault + CustomContainer + CustomNameNidOptNative + CustomNameNinOptNative + CustomNameNinRepNative + CustomNameNinStruct + CustomNameCustomType + CustomNameNinEmbeddedStructUnion + CustomNameEnum + NoExtensionsMap + Unrecognized + UnrecognizedWithInner + UnrecognizedWithEmbed + Node +*/ +package test + +import proto "github.com/gogo/protobuf/proto" +import fmt "fmt" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" + +import github_com_gogo_protobuf_test_custom "github.com/gogo/protobuf/test/custom" +import github_com_gogo_protobuf_test_custom_dash_type "github.com/gogo/protobuf/test/custom-dash-type" + +import bytes "bytes" +import github_com_gogo_protobuf_sortkeys "github.com/gogo/protobuf/sortkeys" + +import github_com_gogo_protobuf_protoc_gen_gogo_descriptor "github.com/gogo/protobuf/protoc-gen-gogo/descriptor" +import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" +import compress_gzip "compress/gzip" +import io_ioutil "io/ioutil" + +import strconv "strconv" + +import strings "strings" +import sort "sort" +import reflect "reflect" + +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. +const _ = proto.GoGoProtoPackageIsVersion1 + +type TheTestEnum int32 + +const ( + A TheTestEnum = 0 + B TheTestEnum = 1 + C TheTestEnum = 2 +) + +var TheTestEnum_name = map[int32]string{ + 0: "A", + 1: "B", + 2: "C", +} +var TheTestEnum_value = map[string]int32{ + "A": 0, + "B": 1, + "C": 2, +} + +func (x TheTestEnum) Enum() *TheTestEnum { + p := new(TheTestEnum) + *p = x + return p +} +func (x TheTestEnum) MarshalJSON() ([]byte, error) { + return proto.MarshalJSONEnum(TheTestEnum_name, int32(x)) +} +func (x *TheTestEnum) UnmarshalJSON(data []byte) error { + value, err := proto.UnmarshalJSONEnum(TheTestEnum_value, data, "TheTestEnum") + if err != nil { + return err + } + *x = TheTestEnum(value) + return nil +} +func (TheTestEnum) EnumDescriptor() ([]byte, []int) { return fileDescriptorThetest, []int{0} } + +type AnotherTestEnum int32 + +const ( + D AnotherTestEnum = 10 + E AnotherTestEnum = 11 +) + +var AnotherTestEnum_name = map[int32]string{ + 10: "D", + 11: "E", +} +var AnotherTestEnum_value = map[string]int32{ + "D": 10, + "E": 11, +} + +func (x AnotherTestEnum) Enum() *AnotherTestEnum { + p := new(AnotherTestEnum) + *p = x + return p +} +func (x AnotherTestEnum) MarshalJSON() ([]byte, error) { + return proto.MarshalJSONEnum(AnotherTestEnum_name, int32(x)) +} +func (x *AnotherTestEnum) UnmarshalJSON(data []byte) error { + value, err := proto.UnmarshalJSONEnum(AnotherTestEnum_value, data, "AnotherTestEnum") + if err != nil { + return err + } + *x = AnotherTestEnum(value) + return nil +} +func (AnotherTestEnum) EnumDescriptor() ([]byte, []int) { return fileDescriptorThetest, []int{1} } + +// YetAnotherTestEnum is used to test cross-package import of custom name +// fields and default resolution. +type YetAnotherTestEnum int32 + +const ( + AA YetAnotherTestEnum = 0 + BetterYetBB YetAnotherTestEnum = 1 +) + +var YetAnotherTestEnum_name = map[int32]string{ + 0: "AA", + 1: "BB", +} +var YetAnotherTestEnum_value = map[string]int32{ + "AA": 0, + "BB": 1, +} + +func (x YetAnotherTestEnum) Enum() *YetAnotherTestEnum { + p := new(YetAnotherTestEnum) + *p = x + return p +} +func (x YetAnotherTestEnum) MarshalJSON() ([]byte, error) { + return proto.MarshalJSONEnum(YetAnotherTestEnum_name, int32(x)) +} +func (x *YetAnotherTestEnum) UnmarshalJSON(data []byte) error { + value, err := proto.UnmarshalJSONEnum(YetAnotherTestEnum_value, data, "YetAnotherTestEnum") + if err != nil { + return err + } + *x = YetAnotherTestEnum(value) + return nil +} +func (YetAnotherTestEnum) EnumDescriptor() ([]byte, []int) { return fileDescriptorThetest, []int{2} } + +// YetAnotherTestEnum is used to test cross-package import of custom name +// fields and default resolution. +type YetYetAnotherTestEnum int32 + +const ( + YetYetAnotherTestEnum_CC YetYetAnotherTestEnum = 0 + YetYetAnotherTestEnum_BetterYetDD YetYetAnotherTestEnum = 1 +) + +var YetYetAnotherTestEnum_name = map[int32]string{ + 0: "CC", + 1: "DD", +} +var YetYetAnotherTestEnum_value = map[string]int32{ + "CC": 0, + "DD": 1, +} + +func (x YetYetAnotherTestEnum) Enum() *YetYetAnotherTestEnum { + p := new(YetYetAnotherTestEnum) + *p = x + return p +} +func (x YetYetAnotherTestEnum) MarshalJSON() ([]byte, error) { + return proto.MarshalJSONEnum(YetYetAnotherTestEnum_name, int32(x)) +} +func (x *YetYetAnotherTestEnum) UnmarshalJSON(data []byte) error { + value, err := proto.UnmarshalJSONEnum(YetYetAnotherTestEnum_value, data, "YetYetAnotherTestEnum") + if err != nil { + return err + } + *x = YetYetAnotherTestEnum(value) + return nil +} +func (YetYetAnotherTestEnum) EnumDescriptor() ([]byte, []int) { return fileDescriptorThetest, []int{3} } + +type NestedDefinition_NestedEnum int32 + +const ( + TYPE_NESTED NestedDefinition_NestedEnum = 1 +) + +var NestedDefinition_NestedEnum_name = map[int32]string{ + 1: "TYPE_NESTED", +} +var NestedDefinition_NestedEnum_value = map[string]int32{ + "TYPE_NESTED": 1, +} + +func (x NestedDefinition_NestedEnum) Enum() *NestedDefinition_NestedEnum { + p := new(NestedDefinition_NestedEnum) + *p = x + return p +} +func (x NestedDefinition_NestedEnum) MarshalJSON() ([]byte, error) { + return proto.MarshalJSONEnum(NestedDefinition_NestedEnum_name, int32(x)) +} +func (x *NestedDefinition_NestedEnum) UnmarshalJSON(data []byte) error { + value, err := proto.UnmarshalJSONEnum(NestedDefinition_NestedEnum_value, data, "NestedDefinition_NestedEnum") + if err != nil { + return err + } + *x = NestedDefinition_NestedEnum(value) + return nil +} +func (NestedDefinition_NestedEnum) EnumDescriptor() ([]byte, []int) { + return fileDescriptorThetest, []int{42, 0} +} + +type NidOptNative struct { + Field1 float64 `protobuf:"fixed64,1,opt,name=Field1,json=field1" json:"Field1"` + Field2 float32 `protobuf:"fixed32,2,opt,name=Field2,json=field2" json:"Field2"` + Field3 int32 `protobuf:"varint,3,opt,name=Field3,json=field3" json:"Field3"` + Field4 int64 `protobuf:"varint,4,opt,name=Field4,json=field4" json:"Field4"` + Field5 uint32 `protobuf:"varint,5,opt,name=Field5,json=field5" json:"Field5"` + Field6 uint64 `protobuf:"varint,6,opt,name=Field6,json=field6" json:"Field6"` + Field7 int32 `protobuf:"zigzag32,7,opt,name=Field7,json=field7" json:"Field7"` + Field8 int64 `protobuf:"zigzag64,8,opt,name=Field8,json=field8" json:"Field8"` + Field9 uint32 `protobuf:"fixed32,9,opt,name=Field9,json=field9" json:"Field9"` + Field10 int32 `protobuf:"fixed32,10,opt,name=Field10,json=field10" json:"Field10"` + Field11 uint64 `protobuf:"fixed64,11,opt,name=Field11,json=field11" json:"Field11"` + Field12 int64 `protobuf:"fixed64,12,opt,name=Field12,json=field12" json:"Field12"` + Field13 bool `protobuf:"varint,13,opt,name=Field13,json=field13" json:"Field13"` + Field14 string `protobuf:"bytes,14,opt,name=Field14,json=field14" json:"Field14"` + Field15 []byte `protobuf:"bytes,15,opt,name=Field15,json=field15" json:"Field15"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *NidOptNative) Reset() { *m = NidOptNative{} } +func (*NidOptNative) ProtoMessage() {} +func (*NidOptNative) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{0} } + +type NinOptNative struct { + Field1 *float64 `protobuf:"fixed64,1,opt,name=Field1,json=field1" json:"Field1,omitempty"` + Field2 *float32 `protobuf:"fixed32,2,opt,name=Field2,json=field2" json:"Field2,omitempty"` + Field3 *int32 `protobuf:"varint,3,opt,name=Field3,json=field3" json:"Field3,omitempty"` + Field4 *int64 `protobuf:"varint,4,opt,name=Field4,json=field4" json:"Field4,omitempty"` + Field5 *uint32 `protobuf:"varint,5,opt,name=Field5,json=field5" json:"Field5,omitempty"` + Field6 *uint64 `protobuf:"varint,6,opt,name=Field6,json=field6" json:"Field6,omitempty"` + Field7 *int32 `protobuf:"zigzag32,7,opt,name=Field7,json=field7" json:"Field7,omitempty"` + Field8 *int64 `protobuf:"zigzag64,8,opt,name=Field8,json=field8" json:"Field8,omitempty"` + Field9 *uint32 `protobuf:"fixed32,9,opt,name=Field9,json=field9" json:"Field9,omitempty"` + Field10 *int32 `protobuf:"fixed32,10,opt,name=Field10,json=field10" json:"Field10,omitempty"` + Field11 *uint64 `protobuf:"fixed64,11,opt,name=Field11,json=field11" json:"Field11,omitempty"` + Field12 *int64 `protobuf:"fixed64,12,opt,name=Field12,json=field12" json:"Field12,omitempty"` + Field13 *bool `protobuf:"varint,13,opt,name=Field13,json=field13" json:"Field13,omitempty"` + Field14 *string `protobuf:"bytes,14,opt,name=Field14,json=field14" json:"Field14,omitempty"` + Field15 []byte `protobuf:"bytes,15,opt,name=Field15,json=field15" json:"Field15,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *NinOptNative) Reset() { *m = NinOptNative{} } +func (*NinOptNative) ProtoMessage() {} +func (*NinOptNative) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{1} } + +type NidRepNative struct { + Field1 []float64 `protobuf:"fixed64,1,rep,name=Field1,json=field1" json:"Field1,omitempty"` + Field2 []float32 `protobuf:"fixed32,2,rep,name=Field2,json=field2" json:"Field2,omitempty"` + Field3 []int32 `protobuf:"varint,3,rep,name=Field3,json=field3" json:"Field3,omitempty"` + Field4 []int64 `protobuf:"varint,4,rep,name=Field4,json=field4" json:"Field4,omitempty"` + Field5 []uint32 `protobuf:"varint,5,rep,name=Field5,json=field5" json:"Field5,omitempty"` + Field6 []uint64 `protobuf:"varint,6,rep,name=Field6,json=field6" json:"Field6,omitempty"` + Field7 []int32 `protobuf:"zigzag32,7,rep,name=Field7,json=field7" json:"Field7,omitempty"` + Field8 []int64 `protobuf:"zigzag64,8,rep,name=Field8,json=field8" json:"Field8,omitempty"` + Field9 []uint32 `protobuf:"fixed32,9,rep,name=Field9,json=field9" json:"Field9,omitempty"` + Field10 []int32 `protobuf:"fixed32,10,rep,name=Field10,json=field10" json:"Field10,omitempty"` + Field11 []uint64 `protobuf:"fixed64,11,rep,name=Field11,json=field11" json:"Field11,omitempty"` + Field12 []int64 `protobuf:"fixed64,12,rep,name=Field12,json=field12" json:"Field12,omitempty"` + Field13 []bool `protobuf:"varint,13,rep,name=Field13,json=field13" json:"Field13,omitempty"` + Field14 []string `protobuf:"bytes,14,rep,name=Field14,json=field14" json:"Field14,omitempty"` + Field15 [][]byte `protobuf:"bytes,15,rep,name=Field15,json=field15" json:"Field15,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *NidRepNative) Reset() { *m = NidRepNative{} } +func (*NidRepNative) ProtoMessage() {} +func (*NidRepNative) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{2} } + +type NinRepNative struct { + Field1 []float64 `protobuf:"fixed64,1,rep,name=Field1,json=field1" json:"Field1,omitempty"` + Field2 []float32 `protobuf:"fixed32,2,rep,name=Field2,json=field2" json:"Field2,omitempty"` + Field3 []int32 `protobuf:"varint,3,rep,name=Field3,json=field3" json:"Field3,omitempty"` + Field4 []int64 `protobuf:"varint,4,rep,name=Field4,json=field4" json:"Field4,omitempty"` + Field5 []uint32 `protobuf:"varint,5,rep,name=Field5,json=field5" json:"Field5,omitempty"` + Field6 []uint64 `protobuf:"varint,6,rep,name=Field6,json=field6" json:"Field6,omitempty"` + Field7 []int32 `protobuf:"zigzag32,7,rep,name=Field7,json=field7" json:"Field7,omitempty"` + Field8 []int64 `protobuf:"zigzag64,8,rep,name=Field8,json=field8" json:"Field8,omitempty"` + Field9 []uint32 `protobuf:"fixed32,9,rep,name=Field9,json=field9" json:"Field9,omitempty"` + Field10 []int32 `protobuf:"fixed32,10,rep,name=Field10,json=field10" json:"Field10,omitempty"` + Field11 []uint64 `protobuf:"fixed64,11,rep,name=Field11,json=field11" json:"Field11,omitempty"` + Field12 []int64 `protobuf:"fixed64,12,rep,name=Field12,json=field12" json:"Field12,omitempty"` + Field13 []bool `protobuf:"varint,13,rep,name=Field13,json=field13" json:"Field13,omitempty"` + Field14 []string `protobuf:"bytes,14,rep,name=Field14,json=field14" json:"Field14,omitempty"` + Field15 [][]byte `protobuf:"bytes,15,rep,name=Field15,json=field15" json:"Field15,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *NinRepNative) Reset() { *m = NinRepNative{} } +func (*NinRepNative) ProtoMessage() {} +func (*NinRepNative) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{3} } + +type NidRepPackedNative struct { + Field1 []float64 `protobuf:"fixed64,1,rep,packed,name=Field1,json=field1" json:"Field1,omitempty"` + Field2 []float32 `protobuf:"fixed32,2,rep,packed,name=Field2,json=field2" json:"Field2,omitempty"` + Field3 []int32 `protobuf:"varint,3,rep,packed,name=Field3,json=field3" json:"Field3,omitempty"` + Field4 []int64 `protobuf:"varint,4,rep,packed,name=Field4,json=field4" json:"Field4,omitempty"` + Field5 []uint32 `protobuf:"varint,5,rep,packed,name=Field5,json=field5" json:"Field5,omitempty"` + Field6 []uint64 `protobuf:"varint,6,rep,packed,name=Field6,json=field6" json:"Field6,omitempty"` + Field7 []int32 `protobuf:"zigzag32,7,rep,packed,name=Field7,json=field7" json:"Field7,omitempty"` + Field8 []int64 `protobuf:"zigzag64,8,rep,packed,name=Field8,json=field8" json:"Field8,omitempty"` + Field9 []uint32 `protobuf:"fixed32,9,rep,packed,name=Field9,json=field9" json:"Field9,omitempty"` + Field10 []int32 `protobuf:"fixed32,10,rep,packed,name=Field10,json=field10" json:"Field10,omitempty"` + Field11 []uint64 `protobuf:"fixed64,11,rep,packed,name=Field11,json=field11" json:"Field11,omitempty"` + Field12 []int64 `protobuf:"fixed64,12,rep,packed,name=Field12,json=field12" json:"Field12,omitempty"` + Field13 []bool `protobuf:"varint,13,rep,packed,name=Field13,json=field13" json:"Field13,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *NidRepPackedNative) Reset() { *m = NidRepPackedNative{} } +func (*NidRepPackedNative) ProtoMessage() {} +func (*NidRepPackedNative) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{4} } + +type NinRepPackedNative struct { + Field1 []float64 `protobuf:"fixed64,1,rep,packed,name=Field1,json=field1" json:"Field1,omitempty"` + Field2 []float32 `protobuf:"fixed32,2,rep,packed,name=Field2,json=field2" json:"Field2,omitempty"` + Field3 []int32 `protobuf:"varint,3,rep,packed,name=Field3,json=field3" json:"Field3,omitempty"` + Field4 []int64 `protobuf:"varint,4,rep,packed,name=Field4,json=field4" json:"Field4,omitempty"` + Field5 []uint32 `protobuf:"varint,5,rep,packed,name=Field5,json=field5" json:"Field5,omitempty"` + Field6 []uint64 `protobuf:"varint,6,rep,packed,name=Field6,json=field6" json:"Field6,omitempty"` + Field7 []int32 `protobuf:"zigzag32,7,rep,packed,name=Field7,json=field7" json:"Field7,omitempty"` + Field8 []int64 `protobuf:"zigzag64,8,rep,packed,name=Field8,json=field8" json:"Field8,omitempty"` + Field9 []uint32 `protobuf:"fixed32,9,rep,packed,name=Field9,json=field9" json:"Field9,omitempty"` + Field10 []int32 `protobuf:"fixed32,10,rep,packed,name=Field10,json=field10" json:"Field10,omitempty"` + Field11 []uint64 `protobuf:"fixed64,11,rep,packed,name=Field11,json=field11" json:"Field11,omitempty"` + Field12 []int64 `protobuf:"fixed64,12,rep,packed,name=Field12,json=field12" json:"Field12,omitempty"` + Field13 []bool `protobuf:"varint,13,rep,packed,name=Field13,json=field13" json:"Field13,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *NinRepPackedNative) Reset() { *m = NinRepPackedNative{} } +func (*NinRepPackedNative) ProtoMessage() {} +func (*NinRepPackedNative) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{5} } + +type NidOptStruct struct { + Field1 float64 `protobuf:"fixed64,1,opt,name=Field1,json=field1" json:"Field1"` + Field2 float32 `protobuf:"fixed32,2,opt,name=Field2,json=field2" json:"Field2"` + Field3 NidOptNative `protobuf:"bytes,3,opt,name=Field3,json=field3" json:"Field3"` + Field4 NinOptNative `protobuf:"bytes,4,opt,name=Field4,json=field4" json:"Field4"` + Field6 uint64 `protobuf:"varint,6,opt,name=Field6,json=field6" json:"Field6"` + Field7 int32 `protobuf:"zigzag32,7,opt,name=Field7,json=field7" json:"Field7"` + Field8 NidOptNative `protobuf:"bytes,8,opt,name=Field8,json=field8" json:"Field8"` + Field13 bool `protobuf:"varint,13,opt,name=Field13,json=field13" json:"Field13"` + Field14 string `protobuf:"bytes,14,opt,name=Field14,json=field14" json:"Field14"` + Field15 []byte `protobuf:"bytes,15,opt,name=Field15,json=field15" json:"Field15"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *NidOptStruct) Reset() { *m = NidOptStruct{} } +func (*NidOptStruct) ProtoMessage() {} +func (*NidOptStruct) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{6} } + +type NinOptStruct struct { + Field1 *float64 `protobuf:"fixed64,1,opt,name=Field1,json=field1" json:"Field1,omitempty"` + Field2 *float32 `protobuf:"fixed32,2,opt,name=Field2,json=field2" json:"Field2,omitempty"` + Field3 *NidOptNative `protobuf:"bytes,3,opt,name=Field3,json=field3" json:"Field3,omitempty"` + Field4 *NinOptNative `protobuf:"bytes,4,opt,name=Field4,json=field4" json:"Field4,omitempty"` + Field6 *uint64 `protobuf:"varint,6,opt,name=Field6,json=field6" json:"Field6,omitempty"` + Field7 *int32 `protobuf:"zigzag32,7,opt,name=Field7,json=field7" json:"Field7,omitempty"` + Field8 *NidOptNative `protobuf:"bytes,8,opt,name=Field8,json=field8" json:"Field8,omitempty"` + Field13 *bool `protobuf:"varint,13,opt,name=Field13,json=field13" json:"Field13,omitempty"` + Field14 *string `protobuf:"bytes,14,opt,name=Field14,json=field14" json:"Field14,omitempty"` + Field15 []byte `protobuf:"bytes,15,opt,name=Field15,json=field15" json:"Field15,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *NinOptStruct) Reset() { *m = NinOptStruct{} } +func (*NinOptStruct) ProtoMessage() {} +func (*NinOptStruct) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{7} } + +type NidRepStruct struct { + Field1 []float64 `protobuf:"fixed64,1,rep,name=Field1,json=field1" json:"Field1,omitempty"` + Field2 []float32 `protobuf:"fixed32,2,rep,name=Field2,json=field2" json:"Field2,omitempty"` + Field3 []NidOptNative `protobuf:"bytes,3,rep,name=Field3,json=field3" json:"Field3"` + Field4 []NinOptNative `protobuf:"bytes,4,rep,name=Field4,json=field4" json:"Field4"` + Field6 []uint64 `protobuf:"varint,6,rep,name=Field6,json=field6" json:"Field6,omitempty"` + Field7 []int32 `protobuf:"zigzag32,7,rep,name=Field7,json=field7" json:"Field7,omitempty"` + Field8 []NidOptNative `protobuf:"bytes,8,rep,name=Field8,json=field8" json:"Field8"` + Field13 []bool `protobuf:"varint,13,rep,name=Field13,json=field13" json:"Field13,omitempty"` + Field14 []string `protobuf:"bytes,14,rep,name=Field14,json=field14" json:"Field14,omitempty"` + Field15 [][]byte `protobuf:"bytes,15,rep,name=Field15,json=field15" json:"Field15,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *NidRepStruct) Reset() { *m = NidRepStruct{} } +func (*NidRepStruct) ProtoMessage() {} +func (*NidRepStruct) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{8} } + +type NinRepStruct struct { + Field1 []float64 `protobuf:"fixed64,1,rep,name=Field1,json=field1" json:"Field1,omitempty"` + Field2 []float32 `protobuf:"fixed32,2,rep,name=Field2,json=field2" json:"Field2,omitempty"` + Field3 []*NidOptNative `protobuf:"bytes,3,rep,name=Field3,json=field3" json:"Field3,omitempty"` + Field4 []*NinOptNative `protobuf:"bytes,4,rep,name=Field4,json=field4" json:"Field4,omitempty"` + Field6 []uint64 `protobuf:"varint,6,rep,name=Field6,json=field6" json:"Field6,omitempty"` + Field7 []int32 `protobuf:"zigzag32,7,rep,name=Field7,json=field7" json:"Field7,omitempty"` + Field8 []*NidOptNative `protobuf:"bytes,8,rep,name=Field8,json=field8" json:"Field8,omitempty"` + Field13 []bool `protobuf:"varint,13,rep,name=Field13,json=field13" json:"Field13,omitempty"` + Field14 []string `protobuf:"bytes,14,rep,name=Field14,json=field14" json:"Field14,omitempty"` + Field15 [][]byte `protobuf:"bytes,15,rep,name=Field15,json=field15" json:"Field15,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *NinRepStruct) Reset() { *m = NinRepStruct{} } +func (*NinRepStruct) ProtoMessage() {} +func (*NinRepStruct) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{9} } + +type NidEmbeddedStruct struct { + *NidOptNative `protobuf:"bytes,1,opt,name=Field1,json=field1,embedded=Field1" json:"Field1,omitempty"` + Field200 NidOptNative `protobuf:"bytes,200,opt,name=Field200,json=field200" json:"Field200"` + Field210 bool `protobuf:"varint,210,opt,name=Field210,json=field210" json:"Field210"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *NidEmbeddedStruct) Reset() { *m = NidEmbeddedStruct{} } +func (*NidEmbeddedStruct) ProtoMessage() {} +func (*NidEmbeddedStruct) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{10} } + +type NinEmbeddedStruct struct { + *NidOptNative `protobuf:"bytes,1,opt,name=Field1,json=field1,embedded=Field1" json:"Field1,omitempty"` + Field200 *NidOptNative `protobuf:"bytes,200,opt,name=Field200,json=field200" json:"Field200,omitempty"` + Field210 *bool `protobuf:"varint,210,opt,name=Field210,json=field210" json:"Field210,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *NinEmbeddedStruct) Reset() { *m = NinEmbeddedStruct{} } +func (*NinEmbeddedStruct) ProtoMessage() {} +func (*NinEmbeddedStruct) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{11} } + +type NidNestedStruct struct { + Field1 NidOptStruct `protobuf:"bytes,1,opt,name=Field1,json=field1" json:"Field1"` + Field2 []NidRepStruct `protobuf:"bytes,2,rep,name=Field2,json=field2" json:"Field2"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *NidNestedStruct) Reset() { *m = NidNestedStruct{} } +func (*NidNestedStruct) ProtoMessage() {} +func (*NidNestedStruct) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{12} } + +type NinNestedStruct struct { + Field1 *NinOptStruct `protobuf:"bytes,1,opt,name=Field1,json=field1" json:"Field1,omitempty"` + Field2 []*NinRepStruct `protobuf:"bytes,2,rep,name=Field2,json=field2" json:"Field2,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *NinNestedStruct) Reset() { *m = NinNestedStruct{} } +func (*NinNestedStruct) ProtoMessage() {} +func (*NinNestedStruct) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{13} } + +type NidOptCustom struct { + Id Uuid `protobuf:"bytes,1,opt,name=Id,json=id,customtype=Uuid" json:"Id"` + Value github_com_gogo_protobuf_test_custom.Uint128 `protobuf:"bytes,2,opt,name=Value,json=value,customtype=github.com/gogo/protobuf/test/custom.Uint128" json:"Value"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *NidOptCustom) Reset() { *m = NidOptCustom{} } +func (*NidOptCustom) ProtoMessage() {} +func (*NidOptCustom) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{14} } + +type CustomDash struct { + Value *github_com_gogo_protobuf_test_custom_dash_type.Bytes `protobuf:"bytes,1,opt,name=Value,json=value,customtype=github.com/gogo/protobuf/test/custom-dash-type.Bytes" json:"Value,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *CustomDash) Reset() { *m = CustomDash{} } +func (*CustomDash) ProtoMessage() {} +func (*CustomDash) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{15} } + +type NinOptCustom struct { + Id *Uuid `protobuf:"bytes,1,opt,name=Id,json=id,customtype=Uuid" json:"Id,omitempty"` + Value *github_com_gogo_protobuf_test_custom.Uint128 `protobuf:"bytes,2,opt,name=Value,json=value,customtype=github.com/gogo/protobuf/test/custom.Uint128" json:"Value,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *NinOptCustom) Reset() { *m = NinOptCustom{} } +func (*NinOptCustom) ProtoMessage() {} +func (*NinOptCustom) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{16} } + +type NidRepCustom struct { + Id []Uuid `protobuf:"bytes,1,rep,name=Id,json=id,customtype=Uuid" json:"Id"` + Value []github_com_gogo_protobuf_test_custom.Uint128 `protobuf:"bytes,2,rep,name=Value,json=value,customtype=github.com/gogo/protobuf/test/custom.Uint128" json:"Value"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *NidRepCustom) Reset() { *m = NidRepCustom{} } +func (*NidRepCustom) ProtoMessage() {} +func (*NidRepCustom) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{17} } + +type NinRepCustom struct { + Id []Uuid `protobuf:"bytes,1,rep,name=Id,json=id,customtype=Uuid" json:"Id,omitempty"` + Value []github_com_gogo_protobuf_test_custom.Uint128 `protobuf:"bytes,2,rep,name=Value,json=value,customtype=github.com/gogo/protobuf/test/custom.Uint128" json:"Value,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *NinRepCustom) Reset() { *m = NinRepCustom{} } +func (*NinRepCustom) ProtoMessage() {} +func (*NinRepCustom) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{18} } + +type NinOptNativeUnion struct { + Field1 *float64 `protobuf:"fixed64,1,opt,name=Field1,json=field1" json:"Field1,omitempty"` + Field2 *float32 `protobuf:"fixed32,2,opt,name=Field2,json=field2" json:"Field2,omitempty"` + Field3 *int32 `protobuf:"varint,3,opt,name=Field3,json=field3" json:"Field3,omitempty"` + Field4 *int64 `protobuf:"varint,4,opt,name=Field4,json=field4" json:"Field4,omitempty"` + Field5 *uint32 `protobuf:"varint,5,opt,name=Field5,json=field5" json:"Field5,omitempty"` + Field6 *uint64 `protobuf:"varint,6,opt,name=Field6,json=field6" json:"Field6,omitempty"` + Field13 *bool `protobuf:"varint,13,opt,name=Field13,json=field13" json:"Field13,omitempty"` + Field14 *string `protobuf:"bytes,14,opt,name=Field14,json=field14" json:"Field14,omitempty"` + Field15 []byte `protobuf:"bytes,15,opt,name=Field15,json=field15" json:"Field15,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *NinOptNativeUnion) Reset() { *m = NinOptNativeUnion{} } +func (*NinOptNativeUnion) ProtoMessage() {} +func (*NinOptNativeUnion) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{19} } + +type NinOptStructUnion struct { + Field1 *float64 `protobuf:"fixed64,1,opt,name=Field1,json=field1" json:"Field1,omitempty"` + Field2 *float32 `protobuf:"fixed32,2,opt,name=Field2,json=field2" json:"Field2,omitempty"` + Field3 *NidOptNative `protobuf:"bytes,3,opt,name=Field3,json=field3" json:"Field3,omitempty"` + Field4 *NinOptNative `protobuf:"bytes,4,opt,name=Field4,json=field4" json:"Field4,omitempty"` + Field6 *uint64 `protobuf:"varint,6,opt,name=Field6,json=field6" json:"Field6,omitempty"` + Field7 *int32 `protobuf:"zigzag32,7,opt,name=Field7,json=field7" json:"Field7,omitempty"` + Field13 *bool `protobuf:"varint,13,opt,name=Field13,json=field13" json:"Field13,omitempty"` + Field14 *string `protobuf:"bytes,14,opt,name=Field14,json=field14" json:"Field14,omitempty"` + Field15 []byte `protobuf:"bytes,15,opt,name=Field15,json=field15" json:"Field15,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *NinOptStructUnion) Reset() { *m = NinOptStructUnion{} } +func (*NinOptStructUnion) ProtoMessage() {} +func (*NinOptStructUnion) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{20} } + +type NinEmbeddedStructUnion struct { + *NidOptNative `protobuf:"bytes,1,opt,name=Field1,json=field1,embedded=Field1" json:"Field1,omitempty"` + Field200 *NinOptNative `protobuf:"bytes,200,opt,name=Field200,json=field200" json:"Field200,omitempty"` + Field210 *bool `protobuf:"varint,210,opt,name=Field210,json=field210" json:"Field210,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *NinEmbeddedStructUnion) Reset() { *m = NinEmbeddedStructUnion{} } +func (*NinEmbeddedStructUnion) ProtoMessage() {} +func (*NinEmbeddedStructUnion) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{21} } + +type NinNestedStructUnion struct { + Field1 *NinOptNativeUnion `protobuf:"bytes,1,opt,name=Field1,json=field1" json:"Field1,omitempty"` + Field2 *NinOptStructUnion `protobuf:"bytes,2,opt,name=Field2,json=field2" json:"Field2,omitempty"` + Field3 *NinEmbeddedStructUnion `protobuf:"bytes,3,opt,name=Field3,json=field3" json:"Field3,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *NinNestedStructUnion) Reset() { *m = NinNestedStructUnion{} } +func (*NinNestedStructUnion) ProtoMessage() {} +func (*NinNestedStructUnion) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{22} } + +type Tree struct { + Or *OrBranch `protobuf:"bytes,1,opt,name=Or,json=or" json:"Or,omitempty"` + And *AndBranch `protobuf:"bytes,2,opt,name=And,json=and" json:"And,omitempty"` + Leaf *Leaf `protobuf:"bytes,3,opt,name=Leaf,json=leaf" json:"Leaf,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *Tree) Reset() { *m = Tree{} } +func (*Tree) ProtoMessage() {} +func (*Tree) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{23} } + +type OrBranch struct { + Left Tree `protobuf:"bytes,1,opt,name=Left,json=left" json:"Left"` + Right Tree `protobuf:"bytes,2,opt,name=Right,json=right" json:"Right"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *OrBranch) Reset() { *m = OrBranch{} } +func (*OrBranch) ProtoMessage() {} +func (*OrBranch) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{24} } + +type AndBranch struct { + Left Tree `protobuf:"bytes,1,opt,name=Left,json=left" json:"Left"` + Right Tree `protobuf:"bytes,2,opt,name=Right,json=right" json:"Right"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *AndBranch) Reset() { *m = AndBranch{} } +func (*AndBranch) ProtoMessage() {} +func (*AndBranch) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{25} } + +type Leaf struct { + Value int64 `protobuf:"varint,1,opt,name=Value,json=value" json:"Value"` + StrValue string `protobuf:"bytes,2,opt,name=StrValue,json=strValue" json:"StrValue"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *Leaf) Reset() { *m = Leaf{} } +func (*Leaf) ProtoMessage() {} +func (*Leaf) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{26} } + +type DeepTree struct { + Down *ADeepBranch `protobuf:"bytes,1,opt,name=Down,json=down" json:"Down,omitempty"` + And *AndDeepBranch `protobuf:"bytes,2,opt,name=And,json=and" json:"And,omitempty"` + Leaf *DeepLeaf `protobuf:"bytes,3,opt,name=Leaf,json=leaf" json:"Leaf,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *DeepTree) Reset() { *m = DeepTree{} } +func (*DeepTree) ProtoMessage() {} +func (*DeepTree) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{27} } + +type ADeepBranch struct { + Down DeepTree `protobuf:"bytes,2,opt,name=Down,json=down" json:"Down"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *ADeepBranch) Reset() { *m = ADeepBranch{} } +func (*ADeepBranch) ProtoMessage() {} +func (*ADeepBranch) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{28} } + +type AndDeepBranch struct { + Left DeepTree `protobuf:"bytes,1,opt,name=Left,json=left" json:"Left"` + Right DeepTree `protobuf:"bytes,2,opt,name=Right,json=right" json:"Right"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *AndDeepBranch) Reset() { *m = AndDeepBranch{} } +func (*AndDeepBranch) ProtoMessage() {} +func (*AndDeepBranch) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{29} } + +type DeepLeaf struct { + Tree Tree `protobuf:"bytes,1,opt,name=Tree,json=tree" json:"Tree"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *DeepLeaf) Reset() { *m = DeepLeaf{} } +func (*DeepLeaf) ProtoMessage() {} +func (*DeepLeaf) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{30} } + +type Nil struct { + XXX_unrecognized []byte `json:"-"` +} + +func (m *Nil) Reset() { *m = Nil{} } +func (*Nil) ProtoMessage() {} +func (*Nil) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{31} } + +type NidOptEnum struct { + Field1 TheTestEnum `protobuf:"varint,1,opt,name=Field1,json=field1,enum=test.TheTestEnum" json:"Field1"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *NidOptEnum) Reset() { *m = NidOptEnum{} } +func (*NidOptEnum) ProtoMessage() {} +func (*NidOptEnum) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{32} } + +type NinOptEnum struct { + Field1 *TheTestEnum `protobuf:"varint,1,opt,name=Field1,json=field1,enum=test.TheTestEnum" json:"Field1,omitempty"` + Field2 *YetAnotherTestEnum `protobuf:"varint,2,opt,name=Field2,json=field2,enum=test.YetAnotherTestEnum" json:"Field2,omitempty"` + Field3 *YetYetAnotherTestEnum `protobuf:"varint,3,opt,name=Field3,json=field3,enum=test.YetYetAnotherTestEnum" json:"Field3,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *NinOptEnum) Reset() { *m = NinOptEnum{} } +func (*NinOptEnum) ProtoMessage() {} +func (*NinOptEnum) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{33} } + +type NidRepEnum struct { + Field1 []TheTestEnum `protobuf:"varint,1,rep,name=Field1,json=field1,enum=test.TheTestEnum" json:"Field1,omitempty"` + Field2 []YetAnotherTestEnum `protobuf:"varint,2,rep,name=Field2,json=field2,enum=test.YetAnotherTestEnum" json:"Field2,omitempty"` + Field3 []YetYetAnotherTestEnum `protobuf:"varint,3,rep,name=Field3,json=field3,enum=test.YetYetAnotherTestEnum" json:"Field3,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *NidRepEnum) Reset() { *m = NidRepEnum{} } +func (*NidRepEnum) ProtoMessage() {} +func (*NidRepEnum) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{34} } + +type NinRepEnum struct { + Field1 []TheTestEnum `protobuf:"varint,1,rep,name=Field1,json=field1,enum=test.TheTestEnum" json:"Field1,omitempty"` + Field2 []YetAnotherTestEnum `protobuf:"varint,2,rep,name=Field2,json=field2,enum=test.YetAnotherTestEnum" json:"Field2,omitempty"` + Field3 []YetYetAnotherTestEnum `protobuf:"varint,3,rep,name=Field3,json=field3,enum=test.YetYetAnotherTestEnum" json:"Field3,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *NinRepEnum) Reset() { *m = NinRepEnum{} } +func (*NinRepEnum) ProtoMessage() {} +func (*NinRepEnum) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{35} } + +type NinOptEnumDefault struct { + Field1 *TheTestEnum `protobuf:"varint,1,opt,name=Field1,json=field1,enum=test.TheTestEnum,def=2" json:"Field1,omitempty"` + Field2 *YetAnotherTestEnum `protobuf:"varint,2,opt,name=Field2,json=field2,enum=test.YetAnotherTestEnum,def=1" json:"Field2,omitempty"` + Field3 *YetYetAnotherTestEnum `protobuf:"varint,3,opt,name=Field3,json=field3,enum=test.YetYetAnotherTestEnum,def=0" json:"Field3,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *NinOptEnumDefault) Reset() { *m = NinOptEnumDefault{} } +func (*NinOptEnumDefault) ProtoMessage() {} +func (*NinOptEnumDefault) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{36} } + +const Default_NinOptEnumDefault_Field1 TheTestEnum = C +const Default_NinOptEnumDefault_Field2 YetAnotherTestEnum = BetterYetBB +const Default_NinOptEnumDefault_Field3 YetYetAnotherTestEnum = YetYetAnotherTestEnum_CC + +func (m *NinOptEnumDefault) GetField1() TheTestEnum { + if m != nil && m.Field1 != nil { + return *m.Field1 + } + return Default_NinOptEnumDefault_Field1 +} + +func (m *NinOptEnumDefault) GetField2() YetAnotherTestEnum { + if m != nil && m.Field2 != nil { + return *m.Field2 + } + return Default_NinOptEnumDefault_Field2 +} + +func (m *NinOptEnumDefault) GetField3() YetYetAnotherTestEnum { + if m != nil && m.Field3 != nil { + return *m.Field3 + } + return Default_NinOptEnumDefault_Field3 +} + +type AnotherNinOptEnum struct { + Field1 *AnotherTestEnum `protobuf:"varint,1,opt,name=Field1,json=field1,enum=test.AnotherTestEnum" json:"Field1,omitempty"` + Field2 *YetAnotherTestEnum `protobuf:"varint,2,opt,name=Field2,json=field2,enum=test.YetAnotherTestEnum" json:"Field2,omitempty"` + Field3 *YetYetAnotherTestEnum `protobuf:"varint,3,opt,name=Field3,json=field3,enum=test.YetYetAnotherTestEnum" json:"Field3,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *AnotherNinOptEnum) Reset() { *m = AnotherNinOptEnum{} } +func (*AnotherNinOptEnum) ProtoMessage() {} +func (*AnotherNinOptEnum) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{37} } + +type AnotherNinOptEnumDefault struct { + Field1 *AnotherTestEnum `protobuf:"varint,1,opt,name=Field1,json=field1,enum=test.AnotherTestEnum,def=11" json:"Field1,omitempty"` + Field2 *YetAnotherTestEnum `protobuf:"varint,2,opt,name=Field2,json=field2,enum=test.YetAnotherTestEnum,def=1" json:"Field2,omitempty"` + Field3 *YetYetAnotherTestEnum `protobuf:"varint,3,opt,name=Field3,json=field3,enum=test.YetYetAnotherTestEnum,def=0" json:"Field3,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *AnotherNinOptEnumDefault) Reset() { *m = AnotherNinOptEnumDefault{} } +func (*AnotherNinOptEnumDefault) ProtoMessage() {} +func (*AnotherNinOptEnumDefault) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{38} } + +const Default_AnotherNinOptEnumDefault_Field1 AnotherTestEnum = E +const Default_AnotherNinOptEnumDefault_Field2 YetAnotherTestEnum = BetterYetBB +const Default_AnotherNinOptEnumDefault_Field3 YetYetAnotherTestEnum = YetYetAnotherTestEnum_CC + +func (m *AnotherNinOptEnumDefault) GetField1() AnotherTestEnum { + if m != nil && m.Field1 != nil { + return *m.Field1 + } + return Default_AnotherNinOptEnumDefault_Field1 +} + +func (m *AnotherNinOptEnumDefault) GetField2() YetAnotherTestEnum { + if m != nil && m.Field2 != nil { + return *m.Field2 + } + return Default_AnotherNinOptEnumDefault_Field2 +} + +func (m *AnotherNinOptEnumDefault) GetField3() YetYetAnotherTestEnum { + if m != nil && m.Field3 != nil { + return *m.Field3 + } + return Default_AnotherNinOptEnumDefault_Field3 +} + +type Timer struct { + Time1 int64 `protobuf:"fixed64,1,opt,name=Time1,json=time1" json:"Time1"` + Time2 int64 `protobuf:"fixed64,2,opt,name=Time2,json=time2" json:"Time2"` + Data []byte `protobuf:"bytes,3,opt,name=Data,json=data" json:"Data"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *Timer) Reset() { *m = Timer{} } +func (*Timer) ProtoMessage() {} +func (*Timer) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{39} } + +type MyExtendable struct { + Field1 *int64 `protobuf:"varint,1,opt,name=Field1,json=field1" json:"Field1,omitempty"` + XXX_extensions map[int32]proto.Extension `json:"-"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *MyExtendable) Reset() { *m = MyExtendable{} } +func (*MyExtendable) ProtoMessage() {} +func (*MyExtendable) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{40} } + +var extRange_MyExtendable = []proto.ExtensionRange{ + {100, 199}, +} + +func (*MyExtendable) ExtensionRangeArray() []proto.ExtensionRange { + return extRange_MyExtendable +} +func (m *MyExtendable) ExtensionMap() map[int32]proto.Extension { + if m.XXX_extensions == nil { + m.XXX_extensions = make(map[int32]proto.Extension) + } + return m.XXX_extensions +} + +type OtherExtenable struct { + Field2 *int64 `protobuf:"varint,2,opt,name=Field2,json=field2" json:"Field2,omitempty"` + Field13 *int64 `protobuf:"varint,13,opt,name=Field13,json=field13" json:"Field13,omitempty"` + M *MyExtendable `protobuf:"bytes,1,opt,name=M,json=m" json:"M,omitempty"` + XXX_extensions map[int32]proto.Extension `json:"-"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *OtherExtenable) Reset() { *m = OtherExtenable{} } +func (*OtherExtenable) ProtoMessage() {} +func (*OtherExtenable) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{41} } + +var extRange_OtherExtenable = []proto.ExtensionRange{ + {14, 16}, + {10, 12}, +} + +func (*OtherExtenable) ExtensionRangeArray() []proto.ExtensionRange { + return extRange_OtherExtenable +} +func (m *OtherExtenable) ExtensionMap() map[int32]proto.Extension { + if m.XXX_extensions == nil { + m.XXX_extensions = make(map[int32]proto.Extension) + } + return m.XXX_extensions +} + +type NestedDefinition struct { + Field1 *int64 `protobuf:"varint,1,opt,name=Field1,json=field1" json:"Field1,omitempty"` + EnumField *NestedDefinition_NestedEnum `protobuf:"varint,2,opt,name=EnumField,json=enumField,enum=test.NestedDefinition_NestedEnum" json:"EnumField,omitempty"` + NNM *NestedDefinition_NestedMessage_NestedNestedMsg `protobuf:"bytes,3,opt,name=NNM,json=nNM" json:"NNM,omitempty"` + NM *NestedDefinition_NestedMessage `protobuf:"bytes,4,opt,name=NM,json=nM" json:"NM,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *NestedDefinition) Reset() { *m = NestedDefinition{} } +func (*NestedDefinition) ProtoMessage() {} +func (*NestedDefinition) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{42} } + +type NestedDefinition_NestedMessage struct { + NestedField1 *uint64 `protobuf:"fixed64,1,opt,name=NestedField1,json=nestedField1" json:"NestedField1,omitempty"` + NNM *NestedDefinition_NestedMessage_NestedNestedMsg `protobuf:"bytes,2,opt,name=NNM,json=nNM" json:"NNM,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *NestedDefinition_NestedMessage) Reset() { *m = NestedDefinition_NestedMessage{} } +func (*NestedDefinition_NestedMessage) ProtoMessage() {} +func (*NestedDefinition_NestedMessage) Descriptor() ([]byte, []int) { + return fileDescriptorThetest, []int{42, 0} +} + +type NestedDefinition_NestedMessage_NestedNestedMsg struct { + NestedNestedField1 *string `protobuf:"bytes,10,opt,name=NestedNestedField1,json=nestedNestedField1" json:"NestedNestedField1,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *NestedDefinition_NestedMessage_NestedNestedMsg) Reset() { + *m = NestedDefinition_NestedMessage_NestedNestedMsg{} +} +func (*NestedDefinition_NestedMessage_NestedNestedMsg) ProtoMessage() {} +func (*NestedDefinition_NestedMessage_NestedNestedMsg) Descriptor() ([]byte, []int) { + return fileDescriptorThetest, []int{42, 0, 0} +} + +type NestedScope struct { + A *NestedDefinition_NestedMessage_NestedNestedMsg `protobuf:"bytes,1,opt,name=A,json=a" json:"A,omitempty"` + B *NestedDefinition_NestedEnum `protobuf:"varint,2,opt,name=B,json=b,enum=test.NestedDefinition_NestedEnum" json:"B,omitempty"` + C *NestedDefinition_NestedMessage `protobuf:"bytes,3,opt,name=C,json=c" json:"C,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *NestedScope) Reset() { *m = NestedScope{} } +func (*NestedScope) ProtoMessage() {} +func (*NestedScope) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{43} } + +type NinOptNativeDefault struct { + Field1 *float64 `protobuf:"fixed64,1,opt,name=Field1,json=field1,def=1234.1234" json:"Field1,omitempty"` + Field2 *float32 `protobuf:"fixed32,2,opt,name=Field2,json=field2,def=1234.1234" json:"Field2,omitempty"` + Field3 *int32 `protobuf:"varint,3,opt,name=Field3,json=field3,def=1234" json:"Field3,omitempty"` + Field4 *int64 `protobuf:"varint,4,opt,name=Field4,json=field4,def=1234" json:"Field4,omitempty"` + Field5 *uint32 `protobuf:"varint,5,opt,name=Field5,json=field5,def=1234" json:"Field5,omitempty"` + Field6 *uint64 `protobuf:"varint,6,opt,name=Field6,json=field6,def=1234" json:"Field6,omitempty"` + Field7 *int32 `protobuf:"zigzag32,7,opt,name=Field7,json=field7,def=1234" json:"Field7,omitempty"` + Field8 *int64 `protobuf:"zigzag64,8,opt,name=Field8,json=field8,def=1234" json:"Field8,omitempty"` + Field9 *uint32 `protobuf:"fixed32,9,opt,name=Field9,json=field9,def=1234" json:"Field9,omitempty"` + Field10 *int32 `protobuf:"fixed32,10,opt,name=Field10,json=field10,def=1234" json:"Field10,omitempty"` + Field11 *uint64 `protobuf:"fixed64,11,opt,name=Field11,json=field11,def=1234" json:"Field11,omitempty"` + Field12 *int64 `protobuf:"fixed64,12,opt,name=Field12,json=field12,def=1234" json:"Field12,omitempty"` + Field13 *bool `protobuf:"varint,13,opt,name=Field13,json=field13,def=1" json:"Field13,omitempty"` + Field14 *string `protobuf:"bytes,14,opt,name=Field14,json=field14,def=1234" json:"Field14,omitempty"` + Field15 []byte `protobuf:"bytes,15,opt,name=Field15,json=field15" json:"Field15,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *NinOptNativeDefault) Reset() { *m = NinOptNativeDefault{} } +func (*NinOptNativeDefault) ProtoMessage() {} +func (*NinOptNativeDefault) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{44} } + +const Default_NinOptNativeDefault_Field1 float64 = 1234.1234 +const Default_NinOptNativeDefault_Field2 float32 = 1234.1234 +const Default_NinOptNativeDefault_Field3 int32 = 1234 +const Default_NinOptNativeDefault_Field4 int64 = 1234 +const Default_NinOptNativeDefault_Field5 uint32 = 1234 +const Default_NinOptNativeDefault_Field6 uint64 = 1234 +const Default_NinOptNativeDefault_Field7 int32 = 1234 +const Default_NinOptNativeDefault_Field8 int64 = 1234 +const Default_NinOptNativeDefault_Field9 uint32 = 1234 +const Default_NinOptNativeDefault_Field10 int32 = 1234 +const Default_NinOptNativeDefault_Field11 uint64 = 1234 +const Default_NinOptNativeDefault_Field12 int64 = 1234 +const Default_NinOptNativeDefault_Field13 bool = true +const Default_NinOptNativeDefault_Field14 string = "1234" + +func (m *NinOptNativeDefault) GetField1() float64 { + if m != nil && m.Field1 != nil { + return *m.Field1 + } + return Default_NinOptNativeDefault_Field1 +} + +func (m *NinOptNativeDefault) GetField2() float32 { + if m != nil && m.Field2 != nil { + return *m.Field2 + } + return Default_NinOptNativeDefault_Field2 +} + +func (m *NinOptNativeDefault) GetField3() int32 { + if m != nil && m.Field3 != nil { + return *m.Field3 + } + return Default_NinOptNativeDefault_Field3 +} + +func (m *NinOptNativeDefault) GetField4() int64 { + if m != nil && m.Field4 != nil { + return *m.Field4 + } + return Default_NinOptNativeDefault_Field4 +} + +func (m *NinOptNativeDefault) GetField5() uint32 { + if m != nil && m.Field5 != nil { + return *m.Field5 + } + return Default_NinOptNativeDefault_Field5 +} + +func (m *NinOptNativeDefault) GetField6() uint64 { + if m != nil && m.Field6 != nil { + return *m.Field6 + } + return Default_NinOptNativeDefault_Field6 +} + +func (m *NinOptNativeDefault) GetField7() int32 { + if m != nil && m.Field7 != nil { + return *m.Field7 + } + return Default_NinOptNativeDefault_Field7 +} + +func (m *NinOptNativeDefault) GetField8() int64 { + if m != nil && m.Field8 != nil { + return *m.Field8 + } + return Default_NinOptNativeDefault_Field8 +} + +func (m *NinOptNativeDefault) GetField9() uint32 { + if m != nil && m.Field9 != nil { + return *m.Field9 + } + return Default_NinOptNativeDefault_Field9 +} + +func (m *NinOptNativeDefault) GetField10() int32 { + if m != nil && m.Field10 != nil { + return *m.Field10 + } + return Default_NinOptNativeDefault_Field10 +} + +func (m *NinOptNativeDefault) GetField11() uint64 { + if m != nil && m.Field11 != nil { + return *m.Field11 + } + return Default_NinOptNativeDefault_Field11 +} + +func (m *NinOptNativeDefault) GetField12() int64 { + if m != nil && m.Field12 != nil { + return *m.Field12 + } + return Default_NinOptNativeDefault_Field12 +} + +func (m *NinOptNativeDefault) GetField13() bool { + if m != nil && m.Field13 != nil { + return *m.Field13 + } + return Default_NinOptNativeDefault_Field13 +} + +func (m *NinOptNativeDefault) GetField14() string { + if m != nil && m.Field14 != nil { + return *m.Field14 + } + return Default_NinOptNativeDefault_Field14 +} + +func (m *NinOptNativeDefault) GetField15() []byte { + if m != nil { + return m.Field15 + } + return nil +} + +type CustomContainer struct { + CustomStruct NidOptCustom `protobuf:"bytes,1,opt,name=CustomStruct,json=customStruct" json:"CustomStruct"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *CustomContainer) Reset() { *m = CustomContainer{} } +func (*CustomContainer) ProtoMessage() {} +func (*CustomContainer) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{45} } + +type CustomNameNidOptNative struct { + FieldA float64 `protobuf:"fixed64,1,opt,name=Field1,json=field1" json:"Field1"` + FieldB float32 `protobuf:"fixed32,2,opt,name=Field2,json=field2" json:"Field2"` + FieldC int32 `protobuf:"varint,3,opt,name=Field3,json=field3" json:"Field3"` + FieldD int64 `protobuf:"varint,4,opt,name=Field4,json=field4" json:"Field4"` + FieldE uint32 `protobuf:"varint,5,opt,name=Field5,json=field5" json:"Field5"` + FieldF uint64 `protobuf:"varint,6,opt,name=Field6,json=field6" json:"Field6"` + FieldG int32 `protobuf:"zigzag32,7,opt,name=Field7,json=field7" json:"Field7"` + FieldH int64 `protobuf:"zigzag64,8,opt,name=Field8,json=field8" json:"Field8"` + FieldI uint32 `protobuf:"fixed32,9,opt,name=Field9,json=field9" json:"Field9"` + FieldJ int32 `protobuf:"fixed32,10,opt,name=Field10,json=field10" json:"Field10"` + FieldK uint64 `protobuf:"fixed64,11,opt,name=Field11,json=field11" json:"Field11"` + FieldL int64 `protobuf:"fixed64,12,opt,name=Field12,json=field12" json:"Field12"` + FieldM bool `protobuf:"varint,13,opt,name=Field13,json=field13" json:"Field13"` + FieldN string `protobuf:"bytes,14,opt,name=Field14,json=field14" json:"Field14"` + FieldO []byte `protobuf:"bytes,15,opt,name=Field15,json=field15" json:"Field15"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *CustomNameNidOptNative) Reset() { *m = CustomNameNidOptNative{} } +func (*CustomNameNidOptNative) ProtoMessage() {} +func (*CustomNameNidOptNative) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{46} } + +type CustomNameNinOptNative struct { + FieldA *float64 `protobuf:"fixed64,1,opt,name=Field1,json=field1" json:"Field1,omitempty"` + FieldB *float32 `protobuf:"fixed32,2,opt,name=Field2,json=field2" json:"Field2,omitempty"` + FieldC *int32 `protobuf:"varint,3,opt,name=Field3,json=field3" json:"Field3,omitempty"` + FieldD *int64 `protobuf:"varint,4,opt,name=Field4,json=field4" json:"Field4,omitempty"` + FieldE *uint32 `protobuf:"varint,5,opt,name=Field5,json=field5" json:"Field5,omitempty"` + FieldF *uint64 `protobuf:"varint,6,opt,name=Field6,json=field6" json:"Field6,omitempty"` + FieldG *int32 `protobuf:"zigzag32,7,opt,name=Field7,json=field7" json:"Field7,omitempty"` + FieldH *int64 `protobuf:"zigzag64,8,opt,name=Field8,json=field8" json:"Field8,omitempty"` + FieldI *uint32 `protobuf:"fixed32,9,opt,name=Field9,json=field9" json:"Field9,omitempty"` + FieldJ *int32 `protobuf:"fixed32,10,opt,name=Field10,json=field10" json:"Field10,omitempty"` + FieldK *uint64 `protobuf:"fixed64,11,opt,name=Field11,json=field11" json:"Field11,omitempty"` + FielL *int64 `protobuf:"fixed64,12,opt,name=Field12,json=field12" json:"Field12,omitempty"` + FieldM *bool `protobuf:"varint,13,opt,name=Field13,json=field13" json:"Field13,omitempty"` + FieldN *string `protobuf:"bytes,14,opt,name=Field14,json=field14" json:"Field14,omitempty"` + FieldO []byte `protobuf:"bytes,15,opt,name=Field15,json=field15" json:"Field15,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *CustomNameNinOptNative) Reset() { *m = CustomNameNinOptNative{} } +func (*CustomNameNinOptNative) ProtoMessage() {} +func (*CustomNameNinOptNative) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{47} } + +type CustomNameNinRepNative struct { + FieldA []float64 `protobuf:"fixed64,1,rep,name=Field1,json=field1" json:"Field1,omitempty"` + FieldB []float32 `protobuf:"fixed32,2,rep,name=Field2,json=field2" json:"Field2,omitempty"` + FieldC []int32 `protobuf:"varint,3,rep,name=Field3,json=field3" json:"Field3,omitempty"` + FieldD []int64 `protobuf:"varint,4,rep,name=Field4,json=field4" json:"Field4,omitempty"` + FieldE []uint32 `protobuf:"varint,5,rep,name=Field5,json=field5" json:"Field5,omitempty"` + FieldF []uint64 `protobuf:"varint,6,rep,name=Field6,json=field6" json:"Field6,omitempty"` + FieldG []int32 `protobuf:"zigzag32,7,rep,name=Field7,json=field7" json:"Field7,omitempty"` + FieldH []int64 `protobuf:"zigzag64,8,rep,name=Field8,json=field8" json:"Field8,omitempty"` + FieldI []uint32 `protobuf:"fixed32,9,rep,name=Field9,json=field9" json:"Field9,omitempty"` + FieldJ []int32 `protobuf:"fixed32,10,rep,name=Field10,json=field10" json:"Field10,omitempty"` + FieldK []uint64 `protobuf:"fixed64,11,rep,name=Field11,json=field11" json:"Field11,omitempty"` + FieldL []int64 `protobuf:"fixed64,12,rep,name=Field12,json=field12" json:"Field12,omitempty"` + FieldM []bool `protobuf:"varint,13,rep,name=Field13,json=field13" json:"Field13,omitempty"` + FieldN []string `protobuf:"bytes,14,rep,name=Field14,json=field14" json:"Field14,omitempty"` + FieldO [][]byte `protobuf:"bytes,15,rep,name=Field15,json=field15" json:"Field15,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *CustomNameNinRepNative) Reset() { *m = CustomNameNinRepNative{} } +func (*CustomNameNinRepNative) ProtoMessage() {} +func (*CustomNameNinRepNative) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{48} } + +type CustomNameNinStruct struct { + FieldA *float64 `protobuf:"fixed64,1,opt,name=Field1,json=field1" json:"Field1,omitempty"` + FieldB *float32 `protobuf:"fixed32,2,opt,name=Field2,json=field2" json:"Field2,omitempty"` + FieldC *NidOptNative `protobuf:"bytes,3,opt,name=Field3,json=field3" json:"Field3,omitempty"` + FieldD []*NinOptNative `protobuf:"bytes,4,rep,name=Field4,json=field4" json:"Field4,omitempty"` + FieldE *uint64 `protobuf:"varint,6,opt,name=Field6,json=field6" json:"Field6,omitempty"` + FieldF *int32 `protobuf:"zigzag32,7,opt,name=Field7,json=field7" json:"Field7,omitempty"` + FieldG *NidOptNative `protobuf:"bytes,8,opt,name=Field8,json=field8" json:"Field8,omitempty"` + FieldH *bool `protobuf:"varint,13,opt,name=Field13,json=field13" json:"Field13,omitempty"` + FieldI *string `protobuf:"bytes,14,opt,name=Field14,json=field14" json:"Field14,omitempty"` + FieldJ []byte `protobuf:"bytes,15,opt,name=Field15,json=field15" json:"Field15,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *CustomNameNinStruct) Reset() { *m = CustomNameNinStruct{} } +func (*CustomNameNinStruct) ProtoMessage() {} +func (*CustomNameNinStruct) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{49} } + +type CustomNameCustomType struct { + FieldA *Uuid `protobuf:"bytes,1,opt,name=Id,json=id,customtype=Uuid" json:"Id,omitempty"` + FieldB *github_com_gogo_protobuf_test_custom.Uint128 `protobuf:"bytes,2,opt,name=Value,json=value,customtype=github.com/gogo/protobuf/test/custom.Uint128" json:"Value,omitempty"` + FieldC []Uuid `protobuf:"bytes,3,rep,name=Ids,json=ids,customtype=Uuid" json:"Ids,omitempty"` + FieldD []github_com_gogo_protobuf_test_custom.Uint128 `protobuf:"bytes,4,rep,name=Values,json=values,customtype=github.com/gogo/protobuf/test/custom.Uint128" json:"Values,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *CustomNameCustomType) Reset() { *m = CustomNameCustomType{} } +func (*CustomNameCustomType) ProtoMessage() {} +func (*CustomNameCustomType) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{50} } + +type CustomNameNinEmbeddedStructUnion struct { + *NidOptNative `protobuf:"bytes,1,opt,name=Field1,json=field1,embedded=Field1" json:"Field1,omitempty"` + FieldA *NinOptNative `protobuf:"bytes,200,opt,name=Field200,json=field200" json:"Field200,omitempty"` + FieldB *bool `protobuf:"varint,210,opt,name=Field210,json=field210" json:"Field210,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *CustomNameNinEmbeddedStructUnion) Reset() { *m = CustomNameNinEmbeddedStructUnion{} } +func (*CustomNameNinEmbeddedStructUnion) ProtoMessage() {} +func (*CustomNameNinEmbeddedStructUnion) Descriptor() ([]byte, []int) { + return fileDescriptorThetest, []int{51} +} + +type CustomNameEnum struct { + FieldA *TheTestEnum `protobuf:"varint,1,opt,name=Field1,json=field1,enum=test.TheTestEnum" json:"Field1,omitempty"` + FieldB []TheTestEnum `protobuf:"varint,2,rep,name=Field2,json=field2,enum=test.TheTestEnum" json:"Field2,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *CustomNameEnum) Reset() { *m = CustomNameEnum{} } +func (*CustomNameEnum) ProtoMessage() {} +func (*CustomNameEnum) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{52} } + +type NoExtensionsMap struct { + Field1 *int64 `protobuf:"varint,1,opt,name=Field1,json=field1" json:"Field1,omitempty"` + XXX_extensions []byte `protobuf:"bytes,0,opt" json:"-"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *NoExtensionsMap) Reset() { *m = NoExtensionsMap{} } +func (*NoExtensionsMap) ProtoMessage() {} +func (*NoExtensionsMap) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{53} } + +var extRange_NoExtensionsMap = []proto.ExtensionRange{ + {100, 199}, +} + +func (*NoExtensionsMap) ExtensionRangeArray() []proto.ExtensionRange { + return extRange_NoExtensionsMap +} +func (m *NoExtensionsMap) GetExtensions() *[]byte { + if m.XXX_extensions == nil { + m.XXX_extensions = make([]byte, 0) + } + return &m.XXX_extensions +} + +type Unrecognized struct { + Field1 *string `protobuf:"bytes,1,opt,name=Field1,json=field1" json:"Field1,omitempty"` +} + +func (m *Unrecognized) Reset() { *m = Unrecognized{} } +func (*Unrecognized) ProtoMessage() {} +func (*Unrecognized) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{54} } + +type UnrecognizedWithInner struct { + Embedded []*UnrecognizedWithInner_Inner `protobuf:"bytes,1,rep,name=embedded" json:"embedded,omitempty"` + Field2 *string `protobuf:"bytes,2,opt,name=Field2,json=field2" json:"Field2,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *UnrecognizedWithInner) Reset() { *m = UnrecognizedWithInner{} } +func (*UnrecognizedWithInner) ProtoMessage() {} +func (*UnrecognizedWithInner) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{55} } + +type UnrecognizedWithInner_Inner struct { + Field1 *uint32 `protobuf:"varint,1,opt,name=Field1,json=field1" json:"Field1,omitempty"` +} + +func (m *UnrecognizedWithInner_Inner) Reset() { *m = UnrecognizedWithInner_Inner{} } +func (*UnrecognizedWithInner_Inner) ProtoMessage() {} +func (*UnrecognizedWithInner_Inner) Descriptor() ([]byte, []int) { + return fileDescriptorThetest, []int{55, 0} +} + +type UnrecognizedWithEmbed struct { + UnrecognizedWithEmbed_Embedded `protobuf:"bytes,1,opt,name=embedded,embedded=embedded" json:"embedded"` + Field2 *string `protobuf:"bytes,2,opt,name=Field2,json=field2" json:"Field2,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *UnrecognizedWithEmbed) Reset() { *m = UnrecognizedWithEmbed{} } +func (*UnrecognizedWithEmbed) ProtoMessage() {} +func (*UnrecognizedWithEmbed) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{56} } + +type UnrecognizedWithEmbed_Embedded struct { + Field1 *uint32 `protobuf:"varint,1,opt,name=Field1,json=field1" json:"Field1,omitempty"` +} + +func (m *UnrecognizedWithEmbed_Embedded) Reset() { *m = UnrecognizedWithEmbed_Embedded{} } +func (*UnrecognizedWithEmbed_Embedded) ProtoMessage() {} +func (*UnrecognizedWithEmbed_Embedded) Descriptor() ([]byte, []int) { + return fileDescriptorThetest, []int{56, 0} +} + +type Node struct { + Label *string `protobuf:"bytes,1,opt,name=Label,json=label" json:"Label,omitempty"` + Children []*Node `protobuf:"bytes,2,rep,name=Children,json=children" json:"Children,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *Node) Reset() { *m = Node{} } +func (*Node) ProtoMessage() {} +func (*Node) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{57} } + +var E_FieldA = &proto.ExtensionDesc{ + ExtendedType: (*MyExtendable)(nil), + ExtensionType: (*float64)(nil), + Field: 100, + Name: "test.FieldA", + Tag: "fixed64,100,opt,name=FieldA,json=fieldA", +} + +var E_FieldB = &proto.ExtensionDesc{ + ExtendedType: (*MyExtendable)(nil), + ExtensionType: (*NinOptNative)(nil), + Field: 101, + Name: "test.FieldB", + Tag: "bytes,101,opt,name=FieldB,json=fieldB", +} + +var E_FieldC = &proto.ExtensionDesc{ + ExtendedType: (*MyExtendable)(nil), + ExtensionType: (*NinEmbeddedStruct)(nil), + Field: 102, + Name: "test.FieldC", + Tag: "bytes,102,opt,name=FieldC,json=fieldC", +} + +var E_FieldD = &proto.ExtensionDesc{ + ExtendedType: (*MyExtendable)(nil), + ExtensionType: ([]int64)(nil), + Field: 104, + Name: "test.FieldD", + Tag: "varint,104,rep,name=FieldD,json=fieldD", +} + +var E_FieldE = &proto.ExtensionDesc{ + ExtendedType: (*MyExtendable)(nil), + ExtensionType: ([]*NinOptNative)(nil), + Field: 105, + Name: "test.FieldE", + Tag: "bytes,105,rep,name=FieldE,json=fieldE", +} + +var E_FieldA1 = &proto.ExtensionDesc{ + ExtendedType: (*NoExtensionsMap)(nil), + ExtensionType: (*float64)(nil), + Field: 100, + Name: "test.FieldA1", + Tag: "fixed64,100,opt,name=FieldA1,json=fieldA1", +} + +var E_FieldB1 = &proto.ExtensionDesc{ + ExtendedType: (*NoExtensionsMap)(nil), + ExtensionType: (*NinOptNative)(nil), + Field: 101, + Name: "test.FieldB1", + Tag: "bytes,101,opt,name=FieldB1,json=fieldB1", +} + +var E_FieldC1 = &proto.ExtensionDesc{ + ExtendedType: (*NoExtensionsMap)(nil), + ExtensionType: (*NinEmbeddedStruct)(nil), + Field: 102, + Name: "test.FieldC1", + Tag: "bytes,102,opt,name=FieldC1,json=fieldC1", +} + +func init() { + proto.RegisterType((*NidOptNative)(nil), "test.NidOptNative") + proto.RegisterType((*NinOptNative)(nil), "test.NinOptNative") + proto.RegisterType((*NidRepNative)(nil), "test.NidRepNative") + proto.RegisterType((*NinRepNative)(nil), "test.NinRepNative") + proto.RegisterType((*NidRepPackedNative)(nil), "test.NidRepPackedNative") + proto.RegisterType((*NinRepPackedNative)(nil), "test.NinRepPackedNative") + proto.RegisterType((*NidOptStruct)(nil), "test.NidOptStruct") + proto.RegisterType((*NinOptStruct)(nil), "test.NinOptStruct") + proto.RegisterType((*NidRepStruct)(nil), "test.NidRepStruct") + proto.RegisterType((*NinRepStruct)(nil), "test.NinRepStruct") + proto.RegisterType((*NidEmbeddedStruct)(nil), "test.NidEmbeddedStruct") + proto.RegisterType((*NinEmbeddedStruct)(nil), "test.NinEmbeddedStruct") + proto.RegisterType((*NidNestedStruct)(nil), "test.NidNestedStruct") + proto.RegisterType((*NinNestedStruct)(nil), "test.NinNestedStruct") + proto.RegisterType((*NidOptCustom)(nil), "test.NidOptCustom") + proto.RegisterType((*CustomDash)(nil), "test.CustomDash") + proto.RegisterType((*NinOptCustom)(nil), "test.NinOptCustom") + proto.RegisterType((*NidRepCustom)(nil), "test.NidRepCustom") + proto.RegisterType((*NinRepCustom)(nil), "test.NinRepCustom") + proto.RegisterType((*NinOptNativeUnion)(nil), "test.NinOptNativeUnion") + proto.RegisterType((*NinOptStructUnion)(nil), "test.NinOptStructUnion") + proto.RegisterType((*NinEmbeddedStructUnion)(nil), "test.NinEmbeddedStructUnion") + proto.RegisterType((*NinNestedStructUnion)(nil), "test.NinNestedStructUnion") + proto.RegisterType((*Tree)(nil), "test.Tree") + proto.RegisterType((*OrBranch)(nil), "test.OrBranch") + proto.RegisterType((*AndBranch)(nil), "test.AndBranch") + proto.RegisterType((*Leaf)(nil), "test.Leaf") + proto.RegisterType((*DeepTree)(nil), "test.DeepTree") + proto.RegisterType((*ADeepBranch)(nil), "test.ADeepBranch") + proto.RegisterType((*AndDeepBranch)(nil), "test.AndDeepBranch") + proto.RegisterType((*DeepLeaf)(nil), "test.DeepLeaf") + proto.RegisterType((*Nil)(nil), "test.Nil") + proto.RegisterType((*NidOptEnum)(nil), "test.NidOptEnum") + proto.RegisterType((*NinOptEnum)(nil), "test.NinOptEnum") + proto.RegisterType((*NidRepEnum)(nil), "test.NidRepEnum") + proto.RegisterType((*NinRepEnum)(nil), "test.NinRepEnum") + proto.RegisterType((*NinOptEnumDefault)(nil), "test.NinOptEnumDefault") + proto.RegisterType((*AnotherNinOptEnum)(nil), "test.AnotherNinOptEnum") + proto.RegisterType((*AnotherNinOptEnumDefault)(nil), "test.AnotherNinOptEnumDefault") + proto.RegisterType((*Timer)(nil), "test.Timer") + proto.RegisterType((*MyExtendable)(nil), "test.MyExtendable") + proto.RegisterType((*OtherExtenable)(nil), "test.OtherExtenable") + proto.RegisterType((*NestedDefinition)(nil), "test.NestedDefinition") + proto.RegisterType((*NestedDefinition_NestedMessage)(nil), "test.NestedDefinition.NestedMessage") + proto.RegisterType((*NestedDefinition_NestedMessage_NestedNestedMsg)(nil), "test.NestedDefinition.NestedMessage.NestedNestedMsg") + proto.RegisterType((*NestedScope)(nil), "test.NestedScope") + proto.RegisterType((*NinOptNativeDefault)(nil), "test.NinOptNativeDefault") + proto.RegisterType((*CustomContainer)(nil), "test.CustomContainer") + proto.RegisterType((*CustomNameNidOptNative)(nil), "test.CustomNameNidOptNative") + proto.RegisterType((*CustomNameNinOptNative)(nil), "test.CustomNameNinOptNative") + proto.RegisterType((*CustomNameNinRepNative)(nil), "test.CustomNameNinRepNative") + proto.RegisterType((*CustomNameNinStruct)(nil), "test.CustomNameNinStruct") + proto.RegisterType((*CustomNameCustomType)(nil), "test.CustomNameCustomType") + proto.RegisterType((*CustomNameNinEmbeddedStructUnion)(nil), "test.CustomNameNinEmbeddedStructUnion") + proto.RegisterType((*CustomNameEnum)(nil), "test.CustomNameEnum") + proto.RegisterType((*NoExtensionsMap)(nil), "test.NoExtensionsMap") + proto.RegisterType((*Unrecognized)(nil), "test.Unrecognized") + proto.RegisterType((*UnrecognizedWithInner)(nil), "test.UnrecognizedWithInner") + proto.RegisterType((*UnrecognizedWithInner_Inner)(nil), "test.UnrecognizedWithInner.Inner") + proto.RegisterType((*UnrecognizedWithEmbed)(nil), "test.UnrecognizedWithEmbed") + proto.RegisterType((*UnrecognizedWithEmbed_Embedded)(nil), "test.UnrecognizedWithEmbed.Embedded") + proto.RegisterType((*Node)(nil), "test.Node") + proto.RegisterEnum("test.TheTestEnum", TheTestEnum_name, TheTestEnum_value) + proto.RegisterEnum("test.AnotherTestEnum", AnotherTestEnum_name, AnotherTestEnum_value) + proto.RegisterEnum("test.YetAnotherTestEnum", YetAnotherTestEnum_name, YetAnotherTestEnum_value) + proto.RegisterEnum("test.YetYetAnotherTestEnum", YetYetAnotherTestEnum_name, YetYetAnotherTestEnum_value) + proto.RegisterEnum("test.NestedDefinition_NestedEnum", NestedDefinition_NestedEnum_name, NestedDefinition_NestedEnum_value) + proto.RegisterExtension(E_FieldA) + proto.RegisterExtension(E_FieldB) + proto.RegisterExtension(E_FieldC) + proto.RegisterExtension(E_FieldD) + proto.RegisterExtension(E_FieldE) + proto.RegisterExtension(E_FieldA1) + proto.RegisterExtension(E_FieldB1) + proto.RegisterExtension(E_FieldC1) +} +func (this *NidOptNative) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NidOptNative) + if !ok { + that2, ok := that.(NidOptNative) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.Field1 != that1.Field1 { + if this.Field1 < that1.Field1 { + return -1 + } + return 1 + } + if this.Field2 != that1.Field2 { + if this.Field2 < that1.Field2 { + return -1 + } + return 1 + } + if this.Field3 != that1.Field3 { + if this.Field3 < that1.Field3 { + return -1 + } + return 1 + } + if this.Field4 != that1.Field4 { + if this.Field4 < that1.Field4 { + return -1 + } + return 1 + } + if this.Field5 != that1.Field5 { + if this.Field5 < that1.Field5 { + return -1 + } + return 1 + } + if this.Field6 != that1.Field6 { + if this.Field6 < that1.Field6 { + return -1 + } + return 1 + } + if this.Field7 != that1.Field7 { + if this.Field7 < that1.Field7 { + return -1 + } + return 1 + } + if this.Field8 != that1.Field8 { + if this.Field8 < that1.Field8 { + return -1 + } + return 1 + } + if this.Field9 != that1.Field9 { + if this.Field9 < that1.Field9 { + return -1 + } + return 1 + } + if this.Field10 != that1.Field10 { + if this.Field10 < that1.Field10 { + return -1 + } + return 1 + } + if this.Field11 != that1.Field11 { + if this.Field11 < that1.Field11 { + return -1 + } + return 1 + } + if this.Field12 != that1.Field12 { + if this.Field12 < that1.Field12 { + return -1 + } + return 1 + } + if this.Field13 != that1.Field13 { + if !this.Field13 { + return -1 + } + return 1 + } + if this.Field14 != that1.Field14 { + if this.Field14 < that1.Field14 { + return -1 + } + return 1 + } + if c := bytes.Compare(this.Field15, that1.Field15); c != 0 { + return c + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NinOptNative) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NinOptNative) + if !ok { + that2, ok := that.(NinOptNative) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + if *this.Field1 < *that1.Field1 { + return -1 + } + return 1 + } + } else if this.Field1 != nil { + return 1 + } else if that1.Field1 != nil { + return -1 + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + if *this.Field2 < *that1.Field2 { + return -1 + } + return 1 + } + } else if this.Field2 != nil { + return 1 + } else if that1.Field2 != nil { + return -1 + } + if this.Field3 != nil && that1.Field3 != nil { + if *this.Field3 != *that1.Field3 { + if *this.Field3 < *that1.Field3 { + return -1 + } + return 1 + } + } else if this.Field3 != nil { + return 1 + } else if that1.Field3 != nil { + return -1 + } + if this.Field4 != nil && that1.Field4 != nil { + if *this.Field4 != *that1.Field4 { + if *this.Field4 < *that1.Field4 { + return -1 + } + return 1 + } + } else if this.Field4 != nil { + return 1 + } else if that1.Field4 != nil { + return -1 + } + if this.Field5 != nil && that1.Field5 != nil { + if *this.Field5 != *that1.Field5 { + if *this.Field5 < *that1.Field5 { + return -1 + } + return 1 + } + } else if this.Field5 != nil { + return 1 + } else if that1.Field5 != nil { + return -1 + } + if this.Field6 != nil && that1.Field6 != nil { + if *this.Field6 != *that1.Field6 { + if *this.Field6 < *that1.Field6 { + return -1 + } + return 1 + } + } else if this.Field6 != nil { + return 1 + } else if that1.Field6 != nil { + return -1 + } + if this.Field7 != nil && that1.Field7 != nil { + if *this.Field7 != *that1.Field7 { + if *this.Field7 < *that1.Field7 { + return -1 + } + return 1 + } + } else if this.Field7 != nil { + return 1 + } else if that1.Field7 != nil { + return -1 + } + if this.Field8 != nil && that1.Field8 != nil { + if *this.Field8 != *that1.Field8 { + if *this.Field8 < *that1.Field8 { + return -1 + } + return 1 + } + } else if this.Field8 != nil { + return 1 + } else if that1.Field8 != nil { + return -1 + } + if this.Field9 != nil && that1.Field9 != nil { + if *this.Field9 != *that1.Field9 { + if *this.Field9 < *that1.Field9 { + return -1 + } + return 1 + } + } else if this.Field9 != nil { + return 1 + } else if that1.Field9 != nil { + return -1 + } + if this.Field10 != nil && that1.Field10 != nil { + if *this.Field10 != *that1.Field10 { + if *this.Field10 < *that1.Field10 { + return -1 + } + return 1 + } + } else if this.Field10 != nil { + return 1 + } else if that1.Field10 != nil { + return -1 + } + if this.Field11 != nil && that1.Field11 != nil { + if *this.Field11 != *that1.Field11 { + if *this.Field11 < *that1.Field11 { + return -1 + } + return 1 + } + } else if this.Field11 != nil { + return 1 + } else if that1.Field11 != nil { + return -1 + } + if this.Field12 != nil && that1.Field12 != nil { + if *this.Field12 != *that1.Field12 { + if *this.Field12 < *that1.Field12 { + return -1 + } + return 1 + } + } else if this.Field12 != nil { + return 1 + } else if that1.Field12 != nil { + return -1 + } + if this.Field13 != nil && that1.Field13 != nil { + if *this.Field13 != *that1.Field13 { + if !*this.Field13 { + return -1 + } + return 1 + } + } else if this.Field13 != nil { + return 1 + } else if that1.Field13 != nil { + return -1 + } + if this.Field14 != nil && that1.Field14 != nil { + if *this.Field14 != *that1.Field14 { + if *this.Field14 < *that1.Field14 { + return -1 + } + return 1 + } + } else if this.Field14 != nil { + return 1 + } else if that1.Field14 != nil { + return -1 + } + if c := bytes.Compare(this.Field15, that1.Field15); c != 0 { + return c + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NidRepNative) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NidRepNative) + if !ok { + that2, ok := that.(NidRepNative) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if len(this.Field1) != len(that1.Field1) { + if len(this.Field1) < len(that1.Field1) { + return -1 + } + return 1 + } + for i := range this.Field1 { + if this.Field1[i] != that1.Field1[i] { + if this.Field1[i] < that1.Field1[i] { + return -1 + } + return 1 + } + } + if len(this.Field2) != len(that1.Field2) { + if len(this.Field2) < len(that1.Field2) { + return -1 + } + return 1 + } + for i := range this.Field2 { + if this.Field2[i] != that1.Field2[i] { + if this.Field2[i] < that1.Field2[i] { + return -1 + } + return 1 + } + } + if len(this.Field3) != len(that1.Field3) { + if len(this.Field3) < len(that1.Field3) { + return -1 + } + return 1 + } + for i := range this.Field3 { + if this.Field3[i] != that1.Field3[i] { + if this.Field3[i] < that1.Field3[i] { + return -1 + } + return 1 + } + } + if len(this.Field4) != len(that1.Field4) { + if len(this.Field4) < len(that1.Field4) { + return -1 + } + return 1 + } + for i := range this.Field4 { + if this.Field4[i] != that1.Field4[i] { + if this.Field4[i] < that1.Field4[i] { + return -1 + } + return 1 + } + } + if len(this.Field5) != len(that1.Field5) { + if len(this.Field5) < len(that1.Field5) { + return -1 + } + return 1 + } + for i := range this.Field5 { + if this.Field5[i] != that1.Field5[i] { + if this.Field5[i] < that1.Field5[i] { + return -1 + } + return 1 + } + } + if len(this.Field6) != len(that1.Field6) { + if len(this.Field6) < len(that1.Field6) { + return -1 + } + return 1 + } + for i := range this.Field6 { + if this.Field6[i] != that1.Field6[i] { + if this.Field6[i] < that1.Field6[i] { + return -1 + } + return 1 + } + } + if len(this.Field7) != len(that1.Field7) { + if len(this.Field7) < len(that1.Field7) { + return -1 + } + return 1 + } + for i := range this.Field7 { + if this.Field7[i] != that1.Field7[i] { + if this.Field7[i] < that1.Field7[i] { + return -1 + } + return 1 + } + } + if len(this.Field8) != len(that1.Field8) { + if len(this.Field8) < len(that1.Field8) { + return -1 + } + return 1 + } + for i := range this.Field8 { + if this.Field8[i] != that1.Field8[i] { + if this.Field8[i] < that1.Field8[i] { + return -1 + } + return 1 + } + } + if len(this.Field9) != len(that1.Field9) { + if len(this.Field9) < len(that1.Field9) { + return -1 + } + return 1 + } + for i := range this.Field9 { + if this.Field9[i] != that1.Field9[i] { + if this.Field9[i] < that1.Field9[i] { + return -1 + } + return 1 + } + } + if len(this.Field10) != len(that1.Field10) { + if len(this.Field10) < len(that1.Field10) { + return -1 + } + return 1 + } + for i := range this.Field10 { + if this.Field10[i] != that1.Field10[i] { + if this.Field10[i] < that1.Field10[i] { + return -1 + } + return 1 + } + } + if len(this.Field11) != len(that1.Field11) { + if len(this.Field11) < len(that1.Field11) { + return -1 + } + return 1 + } + for i := range this.Field11 { + if this.Field11[i] != that1.Field11[i] { + if this.Field11[i] < that1.Field11[i] { + return -1 + } + return 1 + } + } + if len(this.Field12) != len(that1.Field12) { + if len(this.Field12) < len(that1.Field12) { + return -1 + } + return 1 + } + for i := range this.Field12 { + if this.Field12[i] != that1.Field12[i] { + if this.Field12[i] < that1.Field12[i] { + return -1 + } + return 1 + } + } + if len(this.Field13) != len(that1.Field13) { + if len(this.Field13) < len(that1.Field13) { + return -1 + } + return 1 + } + for i := range this.Field13 { + if this.Field13[i] != that1.Field13[i] { + if !this.Field13[i] { + return -1 + } + return 1 + } + } + if len(this.Field14) != len(that1.Field14) { + if len(this.Field14) < len(that1.Field14) { + return -1 + } + return 1 + } + for i := range this.Field14 { + if this.Field14[i] != that1.Field14[i] { + if this.Field14[i] < that1.Field14[i] { + return -1 + } + return 1 + } + } + if len(this.Field15) != len(that1.Field15) { + if len(this.Field15) < len(that1.Field15) { + return -1 + } + return 1 + } + for i := range this.Field15 { + if c := bytes.Compare(this.Field15[i], that1.Field15[i]); c != 0 { + return c + } + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NinRepNative) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NinRepNative) + if !ok { + that2, ok := that.(NinRepNative) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if len(this.Field1) != len(that1.Field1) { + if len(this.Field1) < len(that1.Field1) { + return -1 + } + return 1 + } + for i := range this.Field1 { + if this.Field1[i] != that1.Field1[i] { + if this.Field1[i] < that1.Field1[i] { + return -1 + } + return 1 + } + } + if len(this.Field2) != len(that1.Field2) { + if len(this.Field2) < len(that1.Field2) { + return -1 + } + return 1 + } + for i := range this.Field2 { + if this.Field2[i] != that1.Field2[i] { + if this.Field2[i] < that1.Field2[i] { + return -1 + } + return 1 + } + } + if len(this.Field3) != len(that1.Field3) { + if len(this.Field3) < len(that1.Field3) { + return -1 + } + return 1 + } + for i := range this.Field3 { + if this.Field3[i] != that1.Field3[i] { + if this.Field3[i] < that1.Field3[i] { + return -1 + } + return 1 + } + } + if len(this.Field4) != len(that1.Field4) { + if len(this.Field4) < len(that1.Field4) { + return -1 + } + return 1 + } + for i := range this.Field4 { + if this.Field4[i] != that1.Field4[i] { + if this.Field4[i] < that1.Field4[i] { + return -1 + } + return 1 + } + } + if len(this.Field5) != len(that1.Field5) { + if len(this.Field5) < len(that1.Field5) { + return -1 + } + return 1 + } + for i := range this.Field5 { + if this.Field5[i] != that1.Field5[i] { + if this.Field5[i] < that1.Field5[i] { + return -1 + } + return 1 + } + } + if len(this.Field6) != len(that1.Field6) { + if len(this.Field6) < len(that1.Field6) { + return -1 + } + return 1 + } + for i := range this.Field6 { + if this.Field6[i] != that1.Field6[i] { + if this.Field6[i] < that1.Field6[i] { + return -1 + } + return 1 + } + } + if len(this.Field7) != len(that1.Field7) { + if len(this.Field7) < len(that1.Field7) { + return -1 + } + return 1 + } + for i := range this.Field7 { + if this.Field7[i] != that1.Field7[i] { + if this.Field7[i] < that1.Field7[i] { + return -1 + } + return 1 + } + } + if len(this.Field8) != len(that1.Field8) { + if len(this.Field8) < len(that1.Field8) { + return -1 + } + return 1 + } + for i := range this.Field8 { + if this.Field8[i] != that1.Field8[i] { + if this.Field8[i] < that1.Field8[i] { + return -1 + } + return 1 + } + } + if len(this.Field9) != len(that1.Field9) { + if len(this.Field9) < len(that1.Field9) { + return -1 + } + return 1 + } + for i := range this.Field9 { + if this.Field9[i] != that1.Field9[i] { + if this.Field9[i] < that1.Field9[i] { + return -1 + } + return 1 + } + } + if len(this.Field10) != len(that1.Field10) { + if len(this.Field10) < len(that1.Field10) { + return -1 + } + return 1 + } + for i := range this.Field10 { + if this.Field10[i] != that1.Field10[i] { + if this.Field10[i] < that1.Field10[i] { + return -1 + } + return 1 + } + } + if len(this.Field11) != len(that1.Field11) { + if len(this.Field11) < len(that1.Field11) { + return -1 + } + return 1 + } + for i := range this.Field11 { + if this.Field11[i] != that1.Field11[i] { + if this.Field11[i] < that1.Field11[i] { + return -1 + } + return 1 + } + } + if len(this.Field12) != len(that1.Field12) { + if len(this.Field12) < len(that1.Field12) { + return -1 + } + return 1 + } + for i := range this.Field12 { + if this.Field12[i] != that1.Field12[i] { + if this.Field12[i] < that1.Field12[i] { + return -1 + } + return 1 + } + } + if len(this.Field13) != len(that1.Field13) { + if len(this.Field13) < len(that1.Field13) { + return -1 + } + return 1 + } + for i := range this.Field13 { + if this.Field13[i] != that1.Field13[i] { + if !this.Field13[i] { + return -1 + } + return 1 + } + } + if len(this.Field14) != len(that1.Field14) { + if len(this.Field14) < len(that1.Field14) { + return -1 + } + return 1 + } + for i := range this.Field14 { + if this.Field14[i] != that1.Field14[i] { + if this.Field14[i] < that1.Field14[i] { + return -1 + } + return 1 + } + } + if len(this.Field15) != len(that1.Field15) { + if len(this.Field15) < len(that1.Field15) { + return -1 + } + return 1 + } + for i := range this.Field15 { + if c := bytes.Compare(this.Field15[i], that1.Field15[i]); c != 0 { + return c + } + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NidRepPackedNative) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NidRepPackedNative) + if !ok { + that2, ok := that.(NidRepPackedNative) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if len(this.Field1) != len(that1.Field1) { + if len(this.Field1) < len(that1.Field1) { + return -1 + } + return 1 + } + for i := range this.Field1 { + if this.Field1[i] != that1.Field1[i] { + if this.Field1[i] < that1.Field1[i] { + return -1 + } + return 1 + } + } + if len(this.Field2) != len(that1.Field2) { + if len(this.Field2) < len(that1.Field2) { + return -1 + } + return 1 + } + for i := range this.Field2 { + if this.Field2[i] != that1.Field2[i] { + if this.Field2[i] < that1.Field2[i] { + return -1 + } + return 1 + } + } + if len(this.Field3) != len(that1.Field3) { + if len(this.Field3) < len(that1.Field3) { + return -1 + } + return 1 + } + for i := range this.Field3 { + if this.Field3[i] != that1.Field3[i] { + if this.Field3[i] < that1.Field3[i] { + return -1 + } + return 1 + } + } + if len(this.Field4) != len(that1.Field4) { + if len(this.Field4) < len(that1.Field4) { + return -1 + } + return 1 + } + for i := range this.Field4 { + if this.Field4[i] != that1.Field4[i] { + if this.Field4[i] < that1.Field4[i] { + return -1 + } + return 1 + } + } + if len(this.Field5) != len(that1.Field5) { + if len(this.Field5) < len(that1.Field5) { + return -1 + } + return 1 + } + for i := range this.Field5 { + if this.Field5[i] != that1.Field5[i] { + if this.Field5[i] < that1.Field5[i] { + return -1 + } + return 1 + } + } + if len(this.Field6) != len(that1.Field6) { + if len(this.Field6) < len(that1.Field6) { + return -1 + } + return 1 + } + for i := range this.Field6 { + if this.Field6[i] != that1.Field6[i] { + if this.Field6[i] < that1.Field6[i] { + return -1 + } + return 1 + } + } + if len(this.Field7) != len(that1.Field7) { + if len(this.Field7) < len(that1.Field7) { + return -1 + } + return 1 + } + for i := range this.Field7 { + if this.Field7[i] != that1.Field7[i] { + if this.Field7[i] < that1.Field7[i] { + return -1 + } + return 1 + } + } + if len(this.Field8) != len(that1.Field8) { + if len(this.Field8) < len(that1.Field8) { + return -1 + } + return 1 + } + for i := range this.Field8 { + if this.Field8[i] != that1.Field8[i] { + if this.Field8[i] < that1.Field8[i] { + return -1 + } + return 1 + } + } + if len(this.Field9) != len(that1.Field9) { + if len(this.Field9) < len(that1.Field9) { + return -1 + } + return 1 + } + for i := range this.Field9 { + if this.Field9[i] != that1.Field9[i] { + if this.Field9[i] < that1.Field9[i] { + return -1 + } + return 1 + } + } + if len(this.Field10) != len(that1.Field10) { + if len(this.Field10) < len(that1.Field10) { + return -1 + } + return 1 + } + for i := range this.Field10 { + if this.Field10[i] != that1.Field10[i] { + if this.Field10[i] < that1.Field10[i] { + return -1 + } + return 1 + } + } + if len(this.Field11) != len(that1.Field11) { + if len(this.Field11) < len(that1.Field11) { + return -1 + } + return 1 + } + for i := range this.Field11 { + if this.Field11[i] != that1.Field11[i] { + if this.Field11[i] < that1.Field11[i] { + return -1 + } + return 1 + } + } + if len(this.Field12) != len(that1.Field12) { + if len(this.Field12) < len(that1.Field12) { + return -1 + } + return 1 + } + for i := range this.Field12 { + if this.Field12[i] != that1.Field12[i] { + if this.Field12[i] < that1.Field12[i] { + return -1 + } + return 1 + } + } + if len(this.Field13) != len(that1.Field13) { + if len(this.Field13) < len(that1.Field13) { + return -1 + } + return 1 + } + for i := range this.Field13 { + if this.Field13[i] != that1.Field13[i] { + if !this.Field13[i] { + return -1 + } + return 1 + } + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NinRepPackedNative) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NinRepPackedNative) + if !ok { + that2, ok := that.(NinRepPackedNative) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if len(this.Field1) != len(that1.Field1) { + if len(this.Field1) < len(that1.Field1) { + return -1 + } + return 1 + } + for i := range this.Field1 { + if this.Field1[i] != that1.Field1[i] { + if this.Field1[i] < that1.Field1[i] { + return -1 + } + return 1 + } + } + if len(this.Field2) != len(that1.Field2) { + if len(this.Field2) < len(that1.Field2) { + return -1 + } + return 1 + } + for i := range this.Field2 { + if this.Field2[i] != that1.Field2[i] { + if this.Field2[i] < that1.Field2[i] { + return -1 + } + return 1 + } + } + if len(this.Field3) != len(that1.Field3) { + if len(this.Field3) < len(that1.Field3) { + return -1 + } + return 1 + } + for i := range this.Field3 { + if this.Field3[i] != that1.Field3[i] { + if this.Field3[i] < that1.Field3[i] { + return -1 + } + return 1 + } + } + if len(this.Field4) != len(that1.Field4) { + if len(this.Field4) < len(that1.Field4) { + return -1 + } + return 1 + } + for i := range this.Field4 { + if this.Field4[i] != that1.Field4[i] { + if this.Field4[i] < that1.Field4[i] { + return -1 + } + return 1 + } + } + if len(this.Field5) != len(that1.Field5) { + if len(this.Field5) < len(that1.Field5) { + return -1 + } + return 1 + } + for i := range this.Field5 { + if this.Field5[i] != that1.Field5[i] { + if this.Field5[i] < that1.Field5[i] { + return -1 + } + return 1 + } + } + if len(this.Field6) != len(that1.Field6) { + if len(this.Field6) < len(that1.Field6) { + return -1 + } + return 1 + } + for i := range this.Field6 { + if this.Field6[i] != that1.Field6[i] { + if this.Field6[i] < that1.Field6[i] { + return -1 + } + return 1 + } + } + if len(this.Field7) != len(that1.Field7) { + if len(this.Field7) < len(that1.Field7) { + return -1 + } + return 1 + } + for i := range this.Field7 { + if this.Field7[i] != that1.Field7[i] { + if this.Field7[i] < that1.Field7[i] { + return -1 + } + return 1 + } + } + if len(this.Field8) != len(that1.Field8) { + if len(this.Field8) < len(that1.Field8) { + return -1 + } + return 1 + } + for i := range this.Field8 { + if this.Field8[i] != that1.Field8[i] { + if this.Field8[i] < that1.Field8[i] { + return -1 + } + return 1 + } + } + if len(this.Field9) != len(that1.Field9) { + if len(this.Field9) < len(that1.Field9) { + return -1 + } + return 1 + } + for i := range this.Field9 { + if this.Field9[i] != that1.Field9[i] { + if this.Field9[i] < that1.Field9[i] { + return -1 + } + return 1 + } + } + if len(this.Field10) != len(that1.Field10) { + if len(this.Field10) < len(that1.Field10) { + return -1 + } + return 1 + } + for i := range this.Field10 { + if this.Field10[i] != that1.Field10[i] { + if this.Field10[i] < that1.Field10[i] { + return -1 + } + return 1 + } + } + if len(this.Field11) != len(that1.Field11) { + if len(this.Field11) < len(that1.Field11) { + return -1 + } + return 1 + } + for i := range this.Field11 { + if this.Field11[i] != that1.Field11[i] { + if this.Field11[i] < that1.Field11[i] { + return -1 + } + return 1 + } + } + if len(this.Field12) != len(that1.Field12) { + if len(this.Field12) < len(that1.Field12) { + return -1 + } + return 1 + } + for i := range this.Field12 { + if this.Field12[i] != that1.Field12[i] { + if this.Field12[i] < that1.Field12[i] { + return -1 + } + return 1 + } + } + if len(this.Field13) != len(that1.Field13) { + if len(this.Field13) < len(that1.Field13) { + return -1 + } + return 1 + } + for i := range this.Field13 { + if this.Field13[i] != that1.Field13[i] { + if !this.Field13[i] { + return -1 + } + return 1 + } + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NidOptStruct) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NidOptStruct) + if !ok { + that2, ok := that.(NidOptStruct) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.Field1 != that1.Field1 { + if this.Field1 < that1.Field1 { + return -1 + } + return 1 + } + if this.Field2 != that1.Field2 { + if this.Field2 < that1.Field2 { + return -1 + } + return 1 + } + if c := this.Field3.Compare(&that1.Field3); c != 0 { + return c + } + if c := this.Field4.Compare(&that1.Field4); c != 0 { + return c + } + if this.Field6 != that1.Field6 { + if this.Field6 < that1.Field6 { + return -1 + } + return 1 + } + if this.Field7 != that1.Field7 { + if this.Field7 < that1.Field7 { + return -1 + } + return 1 + } + if c := this.Field8.Compare(&that1.Field8); c != 0 { + return c + } + if this.Field13 != that1.Field13 { + if !this.Field13 { + return -1 + } + return 1 + } + if this.Field14 != that1.Field14 { + if this.Field14 < that1.Field14 { + return -1 + } + return 1 + } + if c := bytes.Compare(this.Field15, that1.Field15); c != 0 { + return c + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NinOptStruct) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NinOptStruct) + if !ok { + that2, ok := that.(NinOptStruct) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + if *this.Field1 < *that1.Field1 { + return -1 + } + return 1 + } + } else if this.Field1 != nil { + return 1 + } else if that1.Field1 != nil { + return -1 + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + if *this.Field2 < *that1.Field2 { + return -1 + } + return 1 + } + } else if this.Field2 != nil { + return 1 + } else if that1.Field2 != nil { + return -1 + } + if c := this.Field3.Compare(that1.Field3); c != 0 { + return c + } + if c := this.Field4.Compare(that1.Field4); c != 0 { + return c + } + if this.Field6 != nil && that1.Field6 != nil { + if *this.Field6 != *that1.Field6 { + if *this.Field6 < *that1.Field6 { + return -1 + } + return 1 + } + } else if this.Field6 != nil { + return 1 + } else if that1.Field6 != nil { + return -1 + } + if this.Field7 != nil && that1.Field7 != nil { + if *this.Field7 != *that1.Field7 { + if *this.Field7 < *that1.Field7 { + return -1 + } + return 1 + } + } else if this.Field7 != nil { + return 1 + } else if that1.Field7 != nil { + return -1 + } + if c := this.Field8.Compare(that1.Field8); c != 0 { + return c + } + if this.Field13 != nil && that1.Field13 != nil { + if *this.Field13 != *that1.Field13 { + if !*this.Field13 { + return -1 + } + return 1 + } + } else if this.Field13 != nil { + return 1 + } else if that1.Field13 != nil { + return -1 + } + if this.Field14 != nil && that1.Field14 != nil { + if *this.Field14 != *that1.Field14 { + if *this.Field14 < *that1.Field14 { + return -1 + } + return 1 + } + } else if this.Field14 != nil { + return 1 + } else if that1.Field14 != nil { + return -1 + } + if c := bytes.Compare(this.Field15, that1.Field15); c != 0 { + return c + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NidRepStruct) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NidRepStruct) + if !ok { + that2, ok := that.(NidRepStruct) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if len(this.Field1) != len(that1.Field1) { + if len(this.Field1) < len(that1.Field1) { + return -1 + } + return 1 + } + for i := range this.Field1 { + if this.Field1[i] != that1.Field1[i] { + if this.Field1[i] < that1.Field1[i] { + return -1 + } + return 1 + } + } + if len(this.Field2) != len(that1.Field2) { + if len(this.Field2) < len(that1.Field2) { + return -1 + } + return 1 + } + for i := range this.Field2 { + if this.Field2[i] != that1.Field2[i] { + if this.Field2[i] < that1.Field2[i] { + return -1 + } + return 1 + } + } + if len(this.Field3) != len(that1.Field3) { + if len(this.Field3) < len(that1.Field3) { + return -1 + } + return 1 + } + for i := range this.Field3 { + if c := this.Field3[i].Compare(&that1.Field3[i]); c != 0 { + return c + } + } + if len(this.Field4) != len(that1.Field4) { + if len(this.Field4) < len(that1.Field4) { + return -1 + } + return 1 + } + for i := range this.Field4 { + if c := this.Field4[i].Compare(&that1.Field4[i]); c != 0 { + return c + } + } + if len(this.Field6) != len(that1.Field6) { + if len(this.Field6) < len(that1.Field6) { + return -1 + } + return 1 + } + for i := range this.Field6 { + if this.Field6[i] != that1.Field6[i] { + if this.Field6[i] < that1.Field6[i] { + return -1 + } + return 1 + } + } + if len(this.Field7) != len(that1.Field7) { + if len(this.Field7) < len(that1.Field7) { + return -1 + } + return 1 + } + for i := range this.Field7 { + if this.Field7[i] != that1.Field7[i] { + if this.Field7[i] < that1.Field7[i] { + return -1 + } + return 1 + } + } + if len(this.Field8) != len(that1.Field8) { + if len(this.Field8) < len(that1.Field8) { + return -1 + } + return 1 + } + for i := range this.Field8 { + if c := this.Field8[i].Compare(&that1.Field8[i]); c != 0 { + return c + } + } + if len(this.Field13) != len(that1.Field13) { + if len(this.Field13) < len(that1.Field13) { + return -1 + } + return 1 + } + for i := range this.Field13 { + if this.Field13[i] != that1.Field13[i] { + if !this.Field13[i] { + return -1 + } + return 1 + } + } + if len(this.Field14) != len(that1.Field14) { + if len(this.Field14) < len(that1.Field14) { + return -1 + } + return 1 + } + for i := range this.Field14 { + if this.Field14[i] != that1.Field14[i] { + if this.Field14[i] < that1.Field14[i] { + return -1 + } + return 1 + } + } + if len(this.Field15) != len(that1.Field15) { + if len(this.Field15) < len(that1.Field15) { + return -1 + } + return 1 + } + for i := range this.Field15 { + if c := bytes.Compare(this.Field15[i], that1.Field15[i]); c != 0 { + return c + } + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NinRepStruct) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NinRepStruct) + if !ok { + that2, ok := that.(NinRepStruct) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if len(this.Field1) != len(that1.Field1) { + if len(this.Field1) < len(that1.Field1) { + return -1 + } + return 1 + } + for i := range this.Field1 { + if this.Field1[i] != that1.Field1[i] { + if this.Field1[i] < that1.Field1[i] { + return -1 + } + return 1 + } + } + if len(this.Field2) != len(that1.Field2) { + if len(this.Field2) < len(that1.Field2) { + return -1 + } + return 1 + } + for i := range this.Field2 { + if this.Field2[i] != that1.Field2[i] { + if this.Field2[i] < that1.Field2[i] { + return -1 + } + return 1 + } + } + if len(this.Field3) != len(that1.Field3) { + if len(this.Field3) < len(that1.Field3) { + return -1 + } + return 1 + } + for i := range this.Field3 { + if c := this.Field3[i].Compare(that1.Field3[i]); c != 0 { + return c + } + } + if len(this.Field4) != len(that1.Field4) { + if len(this.Field4) < len(that1.Field4) { + return -1 + } + return 1 + } + for i := range this.Field4 { + if c := this.Field4[i].Compare(that1.Field4[i]); c != 0 { + return c + } + } + if len(this.Field6) != len(that1.Field6) { + if len(this.Field6) < len(that1.Field6) { + return -1 + } + return 1 + } + for i := range this.Field6 { + if this.Field6[i] != that1.Field6[i] { + if this.Field6[i] < that1.Field6[i] { + return -1 + } + return 1 + } + } + if len(this.Field7) != len(that1.Field7) { + if len(this.Field7) < len(that1.Field7) { + return -1 + } + return 1 + } + for i := range this.Field7 { + if this.Field7[i] != that1.Field7[i] { + if this.Field7[i] < that1.Field7[i] { + return -1 + } + return 1 + } + } + if len(this.Field8) != len(that1.Field8) { + if len(this.Field8) < len(that1.Field8) { + return -1 + } + return 1 + } + for i := range this.Field8 { + if c := this.Field8[i].Compare(that1.Field8[i]); c != 0 { + return c + } + } + if len(this.Field13) != len(that1.Field13) { + if len(this.Field13) < len(that1.Field13) { + return -1 + } + return 1 + } + for i := range this.Field13 { + if this.Field13[i] != that1.Field13[i] { + if !this.Field13[i] { + return -1 + } + return 1 + } + } + if len(this.Field14) != len(that1.Field14) { + if len(this.Field14) < len(that1.Field14) { + return -1 + } + return 1 + } + for i := range this.Field14 { + if this.Field14[i] != that1.Field14[i] { + if this.Field14[i] < that1.Field14[i] { + return -1 + } + return 1 + } + } + if len(this.Field15) != len(that1.Field15) { + if len(this.Field15) < len(that1.Field15) { + return -1 + } + return 1 + } + for i := range this.Field15 { + if c := bytes.Compare(this.Field15[i], that1.Field15[i]); c != 0 { + return c + } + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NidEmbeddedStruct) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NidEmbeddedStruct) + if !ok { + that2, ok := that.(NidEmbeddedStruct) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if c := this.NidOptNative.Compare(that1.NidOptNative); c != 0 { + return c + } + if c := this.Field200.Compare(&that1.Field200); c != 0 { + return c + } + if this.Field210 != that1.Field210 { + if !this.Field210 { + return -1 + } + return 1 + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NinEmbeddedStruct) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NinEmbeddedStruct) + if !ok { + that2, ok := that.(NinEmbeddedStruct) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if c := this.NidOptNative.Compare(that1.NidOptNative); c != 0 { + return c + } + if c := this.Field200.Compare(that1.Field200); c != 0 { + return c + } + if this.Field210 != nil && that1.Field210 != nil { + if *this.Field210 != *that1.Field210 { + if !*this.Field210 { + return -1 + } + return 1 + } + } else if this.Field210 != nil { + return 1 + } else if that1.Field210 != nil { + return -1 + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NidNestedStruct) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NidNestedStruct) + if !ok { + that2, ok := that.(NidNestedStruct) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if c := this.Field1.Compare(&that1.Field1); c != 0 { + return c + } + if len(this.Field2) != len(that1.Field2) { + if len(this.Field2) < len(that1.Field2) { + return -1 + } + return 1 + } + for i := range this.Field2 { + if c := this.Field2[i].Compare(&that1.Field2[i]); c != 0 { + return c + } + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NinNestedStruct) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NinNestedStruct) + if !ok { + that2, ok := that.(NinNestedStruct) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if c := this.Field1.Compare(that1.Field1); c != 0 { + return c + } + if len(this.Field2) != len(that1.Field2) { + if len(this.Field2) < len(that1.Field2) { + return -1 + } + return 1 + } + for i := range this.Field2 { + if c := this.Field2[i].Compare(that1.Field2[i]); c != 0 { + return c + } + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NidOptCustom) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NidOptCustom) + if !ok { + that2, ok := that.(NidOptCustom) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if c := this.Id.Compare(that1.Id); c != 0 { + return c + } + if c := this.Value.Compare(that1.Value); c != 0 { + return c + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *CustomDash) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*CustomDash) + if !ok { + that2, ok := that.(CustomDash) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if that1.Value == nil { + if this.Value != nil { + return 1 + } + } else if this.Value == nil { + return -1 + } else if c := this.Value.Compare(*that1.Value); c != 0 { + return c + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NinOptCustom) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NinOptCustom) + if !ok { + that2, ok := that.(NinOptCustom) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if that1.Id == nil { + if this.Id != nil { + return 1 + } + } else if this.Id == nil { + return -1 + } else if c := this.Id.Compare(*that1.Id); c != 0 { + return c + } + if that1.Value == nil { + if this.Value != nil { + return 1 + } + } else if this.Value == nil { + return -1 + } else if c := this.Value.Compare(*that1.Value); c != 0 { + return c + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NidRepCustom) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NidRepCustom) + if !ok { + that2, ok := that.(NidRepCustom) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if len(this.Id) != len(that1.Id) { + if len(this.Id) < len(that1.Id) { + return -1 + } + return 1 + } + for i := range this.Id { + if c := this.Id[i].Compare(that1.Id[i]); c != 0 { + return c + } + } + if len(this.Value) != len(that1.Value) { + if len(this.Value) < len(that1.Value) { + return -1 + } + return 1 + } + for i := range this.Value { + if c := this.Value[i].Compare(that1.Value[i]); c != 0 { + return c + } + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NinRepCustom) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NinRepCustom) + if !ok { + that2, ok := that.(NinRepCustom) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if len(this.Id) != len(that1.Id) { + if len(this.Id) < len(that1.Id) { + return -1 + } + return 1 + } + for i := range this.Id { + if c := this.Id[i].Compare(that1.Id[i]); c != 0 { + return c + } + } + if len(this.Value) != len(that1.Value) { + if len(this.Value) < len(that1.Value) { + return -1 + } + return 1 + } + for i := range this.Value { + if c := this.Value[i].Compare(that1.Value[i]); c != 0 { + return c + } + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NinOptNativeUnion) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NinOptNativeUnion) + if !ok { + that2, ok := that.(NinOptNativeUnion) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + if *this.Field1 < *that1.Field1 { + return -1 + } + return 1 + } + } else if this.Field1 != nil { + return 1 + } else if that1.Field1 != nil { + return -1 + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + if *this.Field2 < *that1.Field2 { + return -1 + } + return 1 + } + } else if this.Field2 != nil { + return 1 + } else if that1.Field2 != nil { + return -1 + } + if this.Field3 != nil && that1.Field3 != nil { + if *this.Field3 != *that1.Field3 { + if *this.Field3 < *that1.Field3 { + return -1 + } + return 1 + } + } else if this.Field3 != nil { + return 1 + } else if that1.Field3 != nil { + return -1 + } + if this.Field4 != nil && that1.Field4 != nil { + if *this.Field4 != *that1.Field4 { + if *this.Field4 < *that1.Field4 { + return -1 + } + return 1 + } + } else if this.Field4 != nil { + return 1 + } else if that1.Field4 != nil { + return -1 + } + if this.Field5 != nil && that1.Field5 != nil { + if *this.Field5 != *that1.Field5 { + if *this.Field5 < *that1.Field5 { + return -1 + } + return 1 + } + } else if this.Field5 != nil { + return 1 + } else if that1.Field5 != nil { + return -1 + } + if this.Field6 != nil && that1.Field6 != nil { + if *this.Field6 != *that1.Field6 { + if *this.Field6 < *that1.Field6 { + return -1 + } + return 1 + } + } else if this.Field6 != nil { + return 1 + } else if that1.Field6 != nil { + return -1 + } + if this.Field13 != nil && that1.Field13 != nil { + if *this.Field13 != *that1.Field13 { + if !*this.Field13 { + return -1 + } + return 1 + } + } else if this.Field13 != nil { + return 1 + } else if that1.Field13 != nil { + return -1 + } + if this.Field14 != nil && that1.Field14 != nil { + if *this.Field14 != *that1.Field14 { + if *this.Field14 < *that1.Field14 { + return -1 + } + return 1 + } + } else if this.Field14 != nil { + return 1 + } else if that1.Field14 != nil { + return -1 + } + if c := bytes.Compare(this.Field15, that1.Field15); c != 0 { + return c + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NinOptStructUnion) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NinOptStructUnion) + if !ok { + that2, ok := that.(NinOptStructUnion) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + if *this.Field1 < *that1.Field1 { + return -1 + } + return 1 + } + } else if this.Field1 != nil { + return 1 + } else if that1.Field1 != nil { + return -1 + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + if *this.Field2 < *that1.Field2 { + return -1 + } + return 1 + } + } else if this.Field2 != nil { + return 1 + } else if that1.Field2 != nil { + return -1 + } + if c := this.Field3.Compare(that1.Field3); c != 0 { + return c + } + if c := this.Field4.Compare(that1.Field4); c != 0 { + return c + } + if this.Field6 != nil && that1.Field6 != nil { + if *this.Field6 != *that1.Field6 { + if *this.Field6 < *that1.Field6 { + return -1 + } + return 1 + } + } else if this.Field6 != nil { + return 1 + } else if that1.Field6 != nil { + return -1 + } + if this.Field7 != nil && that1.Field7 != nil { + if *this.Field7 != *that1.Field7 { + if *this.Field7 < *that1.Field7 { + return -1 + } + return 1 + } + } else if this.Field7 != nil { + return 1 + } else if that1.Field7 != nil { + return -1 + } + if this.Field13 != nil && that1.Field13 != nil { + if *this.Field13 != *that1.Field13 { + if !*this.Field13 { + return -1 + } + return 1 + } + } else if this.Field13 != nil { + return 1 + } else if that1.Field13 != nil { + return -1 + } + if this.Field14 != nil && that1.Field14 != nil { + if *this.Field14 != *that1.Field14 { + if *this.Field14 < *that1.Field14 { + return -1 + } + return 1 + } + } else if this.Field14 != nil { + return 1 + } else if that1.Field14 != nil { + return -1 + } + if c := bytes.Compare(this.Field15, that1.Field15); c != 0 { + return c + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NinEmbeddedStructUnion) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NinEmbeddedStructUnion) + if !ok { + that2, ok := that.(NinEmbeddedStructUnion) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if c := this.NidOptNative.Compare(that1.NidOptNative); c != 0 { + return c + } + if c := this.Field200.Compare(that1.Field200); c != 0 { + return c + } + if this.Field210 != nil && that1.Field210 != nil { + if *this.Field210 != *that1.Field210 { + if !*this.Field210 { + return -1 + } + return 1 + } + } else if this.Field210 != nil { + return 1 + } else if that1.Field210 != nil { + return -1 + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NinNestedStructUnion) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NinNestedStructUnion) + if !ok { + that2, ok := that.(NinNestedStructUnion) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if c := this.Field1.Compare(that1.Field1); c != 0 { + return c + } + if c := this.Field2.Compare(that1.Field2); c != 0 { + return c + } + if c := this.Field3.Compare(that1.Field3); c != 0 { + return c + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *Tree) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*Tree) + if !ok { + that2, ok := that.(Tree) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if c := this.Or.Compare(that1.Or); c != 0 { + return c + } + if c := this.And.Compare(that1.And); c != 0 { + return c + } + if c := this.Leaf.Compare(that1.Leaf); c != 0 { + return c + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *OrBranch) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*OrBranch) + if !ok { + that2, ok := that.(OrBranch) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if c := this.Left.Compare(&that1.Left); c != 0 { + return c + } + if c := this.Right.Compare(&that1.Right); c != 0 { + return c + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *AndBranch) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*AndBranch) + if !ok { + that2, ok := that.(AndBranch) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if c := this.Left.Compare(&that1.Left); c != 0 { + return c + } + if c := this.Right.Compare(&that1.Right); c != 0 { + return c + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *Leaf) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*Leaf) + if !ok { + that2, ok := that.(Leaf) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.Value != that1.Value { + if this.Value < that1.Value { + return -1 + } + return 1 + } + if this.StrValue != that1.StrValue { + if this.StrValue < that1.StrValue { + return -1 + } + return 1 + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *DeepTree) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*DeepTree) + if !ok { + that2, ok := that.(DeepTree) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if c := this.Down.Compare(that1.Down); c != 0 { + return c + } + if c := this.And.Compare(that1.And); c != 0 { + return c + } + if c := this.Leaf.Compare(that1.Leaf); c != 0 { + return c + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *ADeepBranch) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*ADeepBranch) + if !ok { + that2, ok := that.(ADeepBranch) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if c := this.Down.Compare(&that1.Down); c != 0 { + return c + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *AndDeepBranch) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*AndDeepBranch) + if !ok { + that2, ok := that.(AndDeepBranch) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if c := this.Left.Compare(&that1.Left); c != 0 { + return c + } + if c := this.Right.Compare(&that1.Right); c != 0 { + return c + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *DeepLeaf) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*DeepLeaf) + if !ok { + that2, ok := that.(DeepLeaf) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if c := this.Tree.Compare(&that1.Tree); c != 0 { + return c + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *Nil) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*Nil) + if !ok { + that2, ok := that.(Nil) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NidOptEnum) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NidOptEnum) + if !ok { + that2, ok := that.(NidOptEnum) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.Field1 != that1.Field1 { + if this.Field1 < that1.Field1 { + return -1 + } + return 1 + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NinOptEnum) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NinOptEnum) + if !ok { + that2, ok := that.(NinOptEnum) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + if *this.Field1 < *that1.Field1 { + return -1 + } + return 1 + } + } else if this.Field1 != nil { + return 1 + } else if that1.Field1 != nil { + return -1 + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + if *this.Field2 < *that1.Field2 { + return -1 + } + return 1 + } + } else if this.Field2 != nil { + return 1 + } else if that1.Field2 != nil { + return -1 + } + if this.Field3 != nil && that1.Field3 != nil { + if *this.Field3 != *that1.Field3 { + if *this.Field3 < *that1.Field3 { + return -1 + } + return 1 + } + } else if this.Field3 != nil { + return 1 + } else if that1.Field3 != nil { + return -1 + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NidRepEnum) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NidRepEnum) + if !ok { + that2, ok := that.(NidRepEnum) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if len(this.Field1) != len(that1.Field1) { + if len(this.Field1) < len(that1.Field1) { + return -1 + } + return 1 + } + for i := range this.Field1 { + if this.Field1[i] != that1.Field1[i] { + if this.Field1[i] < that1.Field1[i] { + return -1 + } + return 1 + } + } + if len(this.Field2) != len(that1.Field2) { + if len(this.Field2) < len(that1.Field2) { + return -1 + } + return 1 + } + for i := range this.Field2 { + if this.Field2[i] != that1.Field2[i] { + if this.Field2[i] < that1.Field2[i] { + return -1 + } + return 1 + } + } + if len(this.Field3) != len(that1.Field3) { + if len(this.Field3) < len(that1.Field3) { + return -1 + } + return 1 + } + for i := range this.Field3 { + if this.Field3[i] != that1.Field3[i] { + if this.Field3[i] < that1.Field3[i] { + return -1 + } + return 1 + } + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NinRepEnum) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NinRepEnum) + if !ok { + that2, ok := that.(NinRepEnum) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if len(this.Field1) != len(that1.Field1) { + if len(this.Field1) < len(that1.Field1) { + return -1 + } + return 1 + } + for i := range this.Field1 { + if this.Field1[i] != that1.Field1[i] { + if this.Field1[i] < that1.Field1[i] { + return -1 + } + return 1 + } + } + if len(this.Field2) != len(that1.Field2) { + if len(this.Field2) < len(that1.Field2) { + return -1 + } + return 1 + } + for i := range this.Field2 { + if this.Field2[i] != that1.Field2[i] { + if this.Field2[i] < that1.Field2[i] { + return -1 + } + return 1 + } + } + if len(this.Field3) != len(that1.Field3) { + if len(this.Field3) < len(that1.Field3) { + return -1 + } + return 1 + } + for i := range this.Field3 { + if this.Field3[i] != that1.Field3[i] { + if this.Field3[i] < that1.Field3[i] { + return -1 + } + return 1 + } + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NinOptEnumDefault) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NinOptEnumDefault) + if !ok { + that2, ok := that.(NinOptEnumDefault) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + if *this.Field1 < *that1.Field1 { + return -1 + } + return 1 + } + } else if this.Field1 != nil { + return 1 + } else if that1.Field1 != nil { + return -1 + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + if *this.Field2 < *that1.Field2 { + return -1 + } + return 1 + } + } else if this.Field2 != nil { + return 1 + } else if that1.Field2 != nil { + return -1 + } + if this.Field3 != nil && that1.Field3 != nil { + if *this.Field3 != *that1.Field3 { + if *this.Field3 < *that1.Field3 { + return -1 + } + return 1 + } + } else if this.Field3 != nil { + return 1 + } else if that1.Field3 != nil { + return -1 + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *AnotherNinOptEnum) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*AnotherNinOptEnum) + if !ok { + that2, ok := that.(AnotherNinOptEnum) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + if *this.Field1 < *that1.Field1 { + return -1 + } + return 1 + } + } else if this.Field1 != nil { + return 1 + } else if that1.Field1 != nil { + return -1 + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + if *this.Field2 < *that1.Field2 { + return -1 + } + return 1 + } + } else if this.Field2 != nil { + return 1 + } else if that1.Field2 != nil { + return -1 + } + if this.Field3 != nil && that1.Field3 != nil { + if *this.Field3 != *that1.Field3 { + if *this.Field3 < *that1.Field3 { + return -1 + } + return 1 + } + } else if this.Field3 != nil { + return 1 + } else if that1.Field3 != nil { + return -1 + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *AnotherNinOptEnumDefault) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*AnotherNinOptEnumDefault) + if !ok { + that2, ok := that.(AnotherNinOptEnumDefault) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + if *this.Field1 < *that1.Field1 { + return -1 + } + return 1 + } + } else if this.Field1 != nil { + return 1 + } else if that1.Field1 != nil { + return -1 + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + if *this.Field2 < *that1.Field2 { + return -1 + } + return 1 + } + } else if this.Field2 != nil { + return 1 + } else if that1.Field2 != nil { + return -1 + } + if this.Field3 != nil && that1.Field3 != nil { + if *this.Field3 != *that1.Field3 { + if *this.Field3 < *that1.Field3 { + return -1 + } + return 1 + } + } else if this.Field3 != nil { + return 1 + } else if that1.Field3 != nil { + return -1 + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *Timer) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*Timer) + if !ok { + that2, ok := that.(Timer) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.Time1 != that1.Time1 { + if this.Time1 < that1.Time1 { + return -1 + } + return 1 + } + if this.Time2 != that1.Time2 { + if this.Time2 < that1.Time2 { + return -1 + } + return 1 + } + if c := bytes.Compare(this.Data, that1.Data); c != 0 { + return c + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *MyExtendable) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*MyExtendable) + if !ok { + that2, ok := that.(MyExtendable) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + if *this.Field1 < *that1.Field1 { + return -1 + } + return 1 + } + } else if this.Field1 != nil { + return 1 + } else if that1.Field1 != nil { + return -1 + } + extkeys := make([]int32, 0, len(this.XXX_extensions)+len(that1.XXX_extensions)) + for k := range this.XXX_extensions { + extkeys = append(extkeys, k) + } + for k := range that1.XXX_extensions { + if _, ok := this.XXX_extensions[k]; !ok { + extkeys = append(extkeys, k) + } + } + github_com_gogo_protobuf_sortkeys.Int32s(extkeys) + for _, k := range extkeys { + if v, ok := this.XXX_extensions[k]; ok { + if v2, ok := that1.XXX_extensions[k]; ok { + if c := v.Compare(&v2); c != 0 { + return c + } + } else { + return 1 + } + } else { + return -1 + } + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *OtherExtenable) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*OtherExtenable) + if !ok { + that2, ok := that.(OtherExtenable) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + if *this.Field2 < *that1.Field2 { + return -1 + } + return 1 + } + } else if this.Field2 != nil { + return 1 + } else if that1.Field2 != nil { + return -1 + } + if this.Field13 != nil && that1.Field13 != nil { + if *this.Field13 != *that1.Field13 { + if *this.Field13 < *that1.Field13 { + return -1 + } + return 1 + } + } else if this.Field13 != nil { + return 1 + } else if that1.Field13 != nil { + return -1 + } + if c := this.M.Compare(that1.M); c != 0 { + return c + } + extkeys := make([]int32, 0, len(this.XXX_extensions)+len(that1.XXX_extensions)) + for k := range this.XXX_extensions { + extkeys = append(extkeys, k) + } + for k := range that1.XXX_extensions { + if _, ok := this.XXX_extensions[k]; !ok { + extkeys = append(extkeys, k) + } + } + github_com_gogo_protobuf_sortkeys.Int32s(extkeys) + for _, k := range extkeys { + if v, ok := this.XXX_extensions[k]; ok { + if v2, ok := that1.XXX_extensions[k]; ok { + if c := v.Compare(&v2); c != 0 { + return c + } + } else { + return 1 + } + } else { + return -1 + } + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NestedDefinition) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NestedDefinition) + if !ok { + that2, ok := that.(NestedDefinition) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + if *this.Field1 < *that1.Field1 { + return -1 + } + return 1 + } + } else if this.Field1 != nil { + return 1 + } else if that1.Field1 != nil { + return -1 + } + if this.EnumField != nil && that1.EnumField != nil { + if *this.EnumField != *that1.EnumField { + if *this.EnumField < *that1.EnumField { + return -1 + } + return 1 + } + } else if this.EnumField != nil { + return 1 + } else if that1.EnumField != nil { + return -1 + } + if c := this.NNM.Compare(that1.NNM); c != 0 { + return c + } + if c := this.NM.Compare(that1.NM); c != 0 { + return c + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NestedDefinition_NestedMessage) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NestedDefinition_NestedMessage) + if !ok { + that2, ok := that.(NestedDefinition_NestedMessage) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.NestedField1 != nil && that1.NestedField1 != nil { + if *this.NestedField1 != *that1.NestedField1 { + if *this.NestedField1 < *that1.NestedField1 { + return -1 + } + return 1 + } + } else if this.NestedField1 != nil { + return 1 + } else if that1.NestedField1 != nil { + return -1 + } + if c := this.NNM.Compare(that1.NNM); c != 0 { + return c + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NestedDefinition_NestedMessage_NestedNestedMsg) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NestedDefinition_NestedMessage_NestedNestedMsg) + if !ok { + that2, ok := that.(NestedDefinition_NestedMessage_NestedNestedMsg) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.NestedNestedField1 != nil && that1.NestedNestedField1 != nil { + if *this.NestedNestedField1 != *that1.NestedNestedField1 { + if *this.NestedNestedField1 < *that1.NestedNestedField1 { + return -1 + } + return 1 + } + } else if this.NestedNestedField1 != nil { + return 1 + } else if that1.NestedNestedField1 != nil { + return -1 + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NestedScope) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NestedScope) + if !ok { + that2, ok := that.(NestedScope) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if c := this.A.Compare(that1.A); c != 0 { + return c + } + if this.B != nil && that1.B != nil { + if *this.B != *that1.B { + if *this.B < *that1.B { + return -1 + } + return 1 + } + } else if this.B != nil { + return 1 + } else if that1.B != nil { + return -1 + } + if c := this.C.Compare(that1.C); c != 0 { + return c + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NinOptNativeDefault) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NinOptNativeDefault) + if !ok { + that2, ok := that.(NinOptNativeDefault) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + if *this.Field1 < *that1.Field1 { + return -1 + } + return 1 + } + } else if this.Field1 != nil { + return 1 + } else if that1.Field1 != nil { + return -1 + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + if *this.Field2 < *that1.Field2 { + return -1 + } + return 1 + } + } else if this.Field2 != nil { + return 1 + } else if that1.Field2 != nil { + return -1 + } + if this.Field3 != nil && that1.Field3 != nil { + if *this.Field3 != *that1.Field3 { + if *this.Field3 < *that1.Field3 { + return -1 + } + return 1 + } + } else if this.Field3 != nil { + return 1 + } else if that1.Field3 != nil { + return -1 + } + if this.Field4 != nil && that1.Field4 != nil { + if *this.Field4 != *that1.Field4 { + if *this.Field4 < *that1.Field4 { + return -1 + } + return 1 + } + } else if this.Field4 != nil { + return 1 + } else if that1.Field4 != nil { + return -1 + } + if this.Field5 != nil && that1.Field5 != nil { + if *this.Field5 != *that1.Field5 { + if *this.Field5 < *that1.Field5 { + return -1 + } + return 1 + } + } else if this.Field5 != nil { + return 1 + } else if that1.Field5 != nil { + return -1 + } + if this.Field6 != nil && that1.Field6 != nil { + if *this.Field6 != *that1.Field6 { + if *this.Field6 < *that1.Field6 { + return -1 + } + return 1 + } + } else if this.Field6 != nil { + return 1 + } else if that1.Field6 != nil { + return -1 + } + if this.Field7 != nil && that1.Field7 != nil { + if *this.Field7 != *that1.Field7 { + if *this.Field7 < *that1.Field7 { + return -1 + } + return 1 + } + } else if this.Field7 != nil { + return 1 + } else if that1.Field7 != nil { + return -1 + } + if this.Field8 != nil && that1.Field8 != nil { + if *this.Field8 != *that1.Field8 { + if *this.Field8 < *that1.Field8 { + return -1 + } + return 1 + } + } else if this.Field8 != nil { + return 1 + } else if that1.Field8 != nil { + return -1 + } + if this.Field9 != nil && that1.Field9 != nil { + if *this.Field9 != *that1.Field9 { + if *this.Field9 < *that1.Field9 { + return -1 + } + return 1 + } + } else if this.Field9 != nil { + return 1 + } else if that1.Field9 != nil { + return -1 + } + if this.Field10 != nil && that1.Field10 != nil { + if *this.Field10 != *that1.Field10 { + if *this.Field10 < *that1.Field10 { + return -1 + } + return 1 + } + } else if this.Field10 != nil { + return 1 + } else if that1.Field10 != nil { + return -1 + } + if this.Field11 != nil && that1.Field11 != nil { + if *this.Field11 != *that1.Field11 { + if *this.Field11 < *that1.Field11 { + return -1 + } + return 1 + } + } else if this.Field11 != nil { + return 1 + } else if that1.Field11 != nil { + return -1 + } + if this.Field12 != nil && that1.Field12 != nil { + if *this.Field12 != *that1.Field12 { + if *this.Field12 < *that1.Field12 { + return -1 + } + return 1 + } + } else if this.Field12 != nil { + return 1 + } else if that1.Field12 != nil { + return -1 + } + if this.Field13 != nil && that1.Field13 != nil { + if *this.Field13 != *that1.Field13 { + if !*this.Field13 { + return -1 + } + return 1 + } + } else if this.Field13 != nil { + return 1 + } else if that1.Field13 != nil { + return -1 + } + if this.Field14 != nil && that1.Field14 != nil { + if *this.Field14 != *that1.Field14 { + if *this.Field14 < *that1.Field14 { + return -1 + } + return 1 + } + } else if this.Field14 != nil { + return 1 + } else if that1.Field14 != nil { + return -1 + } + if c := bytes.Compare(this.Field15, that1.Field15); c != 0 { + return c + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *CustomContainer) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*CustomContainer) + if !ok { + that2, ok := that.(CustomContainer) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if c := this.CustomStruct.Compare(&that1.CustomStruct); c != 0 { + return c + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *CustomNameNidOptNative) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*CustomNameNidOptNative) + if !ok { + that2, ok := that.(CustomNameNidOptNative) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.FieldA != that1.FieldA { + if this.FieldA < that1.FieldA { + return -1 + } + return 1 + } + if this.FieldB != that1.FieldB { + if this.FieldB < that1.FieldB { + return -1 + } + return 1 + } + if this.FieldC != that1.FieldC { + if this.FieldC < that1.FieldC { + return -1 + } + return 1 + } + if this.FieldD != that1.FieldD { + if this.FieldD < that1.FieldD { + return -1 + } + return 1 + } + if this.FieldE != that1.FieldE { + if this.FieldE < that1.FieldE { + return -1 + } + return 1 + } + if this.FieldF != that1.FieldF { + if this.FieldF < that1.FieldF { + return -1 + } + return 1 + } + if this.FieldG != that1.FieldG { + if this.FieldG < that1.FieldG { + return -1 + } + return 1 + } + if this.FieldH != that1.FieldH { + if this.FieldH < that1.FieldH { + return -1 + } + return 1 + } + if this.FieldI != that1.FieldI { + if this.FieldI < that1.FieldI { + return -1 + } + return 1 + } + if this.FieldJ != that1.FieldJ { + if this.FieldJ < that1.FieldJ { + return -1 + } + return 1 + } + if this.FieldK != that1.FieldK { + if this.FieldK < that1.FieldK { + return -1 + } + return 1 + } + if this.FieldL != that1.FieldL { + if this.FieldL < that1.FieldL { + return -1 + } + return 1 + } + if this.FieldM != that1.FieldM { + if !this.FieldM { + return -1 + } + return 1 + } + if this.FieldN != that1.FieldN { + if this.FieldN < that1.FieldN { + return -1 + } + return 1 + } + if c := bytes.Compare(this.FieldO, that1.FieldO); c != 0 { + return c + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *CustomNameNinOptNative) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*CustomNameNinOptNative) + if !ok { + that2, ok := that.(CustomNameNinOptNative) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.FieldA != nil && that1.FieldA != nil { + if *this.FieldA != *that1.FieldA { + if *this.FieldA < *that1.FieldA { + return -1 + } + return 1 + } + } else if this.FieldA != nil { + return 1 + } else if that1.FieldA != nil { + return -1 + } + if this.FieldB != nil && that1.FieldB != nil { + if *this.FieldB != *that1.FieldB { + if *this.FieldB < *that1.FieldB { + return -1 + } + return 1 + } + } else if this.FieldB != nil { + return 1 + } else if that1.FieldB != nil { + return -1 + } + if this.FieldC != nil && that1.FieldC != nil { + if *this.FieldC != *that1.FieldC { + if *this.FieldC < *that1.FieldC { + return -1 + } + return 1 + } + } else if this.FieldC != nil { + return 1 + } else if that1.FieldC != nil { + return -1 + } + if this.FieldD != nil && that1.FieldD != nil { + if *this.FieldD != *that1.FieldD { + if *this.FieldD < *that1.FieldD { + return -1 + } + return 1 + } + } else if this.FieldD != nil { + return 1 + } else if that1.FieldD != nil { + return -1 + } + if this.FieldE != nil && that1.FieldE != nil { + if *this.FieldE != *that1.FieldE { + if *this.FieldE < *that1.FieldE { + return -1 + } + return 1 + } + } else if this.FieldE != nil { + return 1 + } else if that1.FieldE != nil { + return -1 + } + if this.FieldF != nil && that1.FieldF != nil { + if *this.FieldF != *that1.FieldF { + if *this.FieldF < *that1.FieldF { + return -1 + } + return 1 + } + } else if this.FieldF != nil { + return 1 + } else if that1.FieldF != nil { + return -1 + } + if this.FieldG != nil && that1.FieldG != nil { + if *this.FieldG != *that1.FieldG { + if *this.FieldG < *that1.FieldG { + return -1 + } + return 1 + } + } else if this.FieldG != nil { + return 1 + } else if that1.FieldG != nil { + return -1 + } + if this.FieldH != nil && that1.FieldH != nil { + if *this.FieldH != *that1.FieldH { + if *this.FieldH < *that1.FieldH { + return -1 + } + return 1 + } + } else if this.FieldH != nil { + return 1 + } else if that1.FieldH != nil { + return -1 + } + if this.FieldI != nil && that1.FieldI != nil { + if *this.FieldI != *that1.FieldI { + if *this.FieldI < *that1.FieldI { + return -1 + } + return 1 + } + } else if this.FieldI != nil { + return 1 + } else if that1.FieldI != nil { + return -1 + } + if this.FieldJ != nil && that1.FieldJ != nil { + if *this.FieldJ != *that1.FieldJ { + if *this.FieldJ < *that1.FieldJ { + return -1 + } + return 1 + } + } else if this.FieldJ != nil { + return 1 + } else if that1.FieldJ != nil { + return -1 + } + if this.FieldK != nil && that1.FieldK != nil { + if *this.FieldK != *that1.FieldK { + if *this.FieldK < *that1.FieldK { + return -1 + } + return 1 + } + } else if this.FieldK != nil { + return 1 + } else if that1.FieldK != nil { + return -1 + } + if this.FielL != nil && that1.FielL != nil { + if *this.FielL != *that1.FielL { + if *this.FielL < *that1.FielL { + return -1 + } + return 1 + } + } else if this.FielL != nil { + return 1 + } else if that1.FielL != nil { + return -1 + } + if this.FieldM != nil && that1.FieldM != nil { + if *this.FieldM != *that1.FieldM { + if !*this.FieldM { + return -1 + } + return 1 + } + } else if this.FieldM != nil { + return 1 + } else if that1.FieldM != nil { + return -1 + } + if this.FieldN != nil && that1.FieldN != nil { + if *this.FieldN != *that1.FieldN { + if *this.FieldN < *that1.FieldN { + return -1 + } + return 1 + } + } else if this.FieldN != nil { + return 1 + } else if that1.FieldN != nil { + return -1 + } + if c := bytes.Compare(this.FieldO, that1.FieldO); c != 0 { + return c + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *CustomNameNinRepNative) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*CustomNameNinRepNative) + if !ok { + that2, ok := that.(CustomNameNinRepNative) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if len(this.FieldA) != len(that1.FieldA) { + if len(this.FieldA) < len(that1.FieldA) { + return -1 + } + return 1 + } + for i := range this.FieldA { + if this.FieldA[i] != that1.FieldA[i] { + if this.FieldA[i] < that1.FieldA[i] { + return -1 + } + return 1 + } + } + if len(this.FieldB) != len(that1.FieldB) { + if len(this.FieldB) < len(that1.FieldB) { + return -1 + } + return 1 + } + for i := range this.FieldB { + if this.FieldB[i] != that1.FieldB[i] { + if this.FieldB[i] < that1.FieldB[i] { + return -1 + } + return 1 + } + } + if len(this.FieldC) != len(that1.FieldC) { + if len(this.FieldC) < len(that1.FieldC) { + return -1 + } + return 1 + } + for i := range this.FieldC { + if this.FieldC[i] != that1.FieldC[i] { + if this.FieldC[i] < that1.FieldC[i] { + return -1 + } + return 1 + } + } + if len(this.FieldD) != len(that1.FieldD) { + if len(this.FieldD) < len(that1.FieldD) { + return -1 + } + return 1 + } + for i := range this.FieldD { + if this.FieldD[i] != that1.FieldD[i] { + if this.FieldD[i] < that1.FieldD[i] { + return -1 + } + return 1 + } + } + if len(this.FieldE) != len(that1.FieldE) { + if len(this.FieldE) < len(that1.FieldE) { + return -1 + } + return 1 + } + for i := range this.FieldE { + if this.FieldE[i] != that1.FieldE[i] { + if this.FieldE[i] < that1.FieldE[i] { + return -1 + } + return 1 + } + } + if len(this.FieldF) != len(that1.FieldF) { + if len(this.FieldF) < len(that1.FieldF) { + return -1 + } + return 1 + } + for i := range this.FieldF { + if this.FieldF[i] != that1.FieldF[i] { + if this.FieldF[i] < that1.FieldF[i] { + return -1 + } + return 1 + } + } + if len(this.FieldG) != len(that1.FieldG) { + if len(this.FieldG) < len(that1.FieldG) { + return -1 + } + return 1 + } + for i := range this.FieldG { + if this.FieldG[i] != that1.FieldG[i] { + if this.FieldG[i] < that1.FieldG[i] { + return -1 + } + return 1 + } + } + if len(this.FieldH) != len(that1.FieldH) { + if len(this.FieldH) < len(that1.FieldH) { + return -1 + } + return 1 + } + for i := range this.FieldH { + if this.FieldH[i] != that1.FieldH[i] { + if this.FieldH[i] < that1.FieldH[i] { + return -1 + } + return 1 + } + } + if len(this.FieldI) != len(that1.FieldI) { + if len(this.FieldI) < len(that1.FieldI) { + return -1 + } + return 1 + } + for i := range this.FieldI { + if this.FieldI[i] != that1.FieldI[i] { + if this.FieldI[i] < that1.FieldI[i] { + return -1 + } + return 1 + } + } + if len(this.FieldJ) != len(that1.FieldJ) { + if len(this.FieldJ) < len(that1.FieldJ) { + return -1 + } + return 1 + } + for i := range this.FieldJ { + if this.FieldJ[i] != that1.FieldJ[i] { + if this.FieldJ[i] < that1.FieldJ[i] { + return -1 + } + return 1 + } + } + if len(this.FieldK) != len(that1.FieldK) { + if len(this.FieldK) < len(that1.FieldK) { + return -1 + } + return 1 + } + for i := range this.FieldK { + if this.FieldK[i] != that1.FieldK[i] { + if this.FieldK[i] < that1.FieldK[i] { + return -1 + } + return 1 + } + } + if len(this.FieldL) != len(that1.FieldL) { + if len(this.FieldL) < len(that1.FieldL) { + return -1 + } + return 1 + } + for i := range this.FieldL { + if this.FieldL[i] != that1.FieldL[i] { + if this.FieldL[i] < that1.FieldL[i] { + return -1 + } + return 1 + } + } + if len(this.FieldM) != len(that1.FieldM) { + if len(this.FieldM) < len(that1.FieldM) { + return -1 + } + return 1 + } + for i := range this.FieldM { + if this.FieldM[i] != that1.FieldM[i] { + if !this.FieldM[i] { + return -1 + } + return 1 + } + } + if len(this.FieldN) != len(that1.FieldN) { + if len(this.FieldN) < len(that1.FieldN) { + return -1 + } + return 1 + } + for i := range this.FieldN { + if this.FieldN[i] != that1.FieldN[i] { + if this.FieldN[i] < that1.FieldN[i] { + return -1 + } + return 1 + } + } + if len(this.FieldO) != len(that1.FieldO) { + if len(this.FieldO) < len(that1.FieldO) { + return -1 + } + return 1 + } + for i := range this.FieldO { + if c := bytes.Compare(this.FieldO[i], that1.FieldO[i]); c != 0 { + return c + } + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *CustomNameNinStruct) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*CustomNameNinStruct) + if !ok { + that2, ok := that.(CustomNameNinStruct) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.FieldA != nil && that1.FieldA != nil { + if *this.FieldA != *that1.FieldA { + if *this.FieldA < *that1.FieldA { + return -1 + } + return 1 + } + } else if this.FieldA != nil { + return 1 + } else if that1.FieldA != nil { + return -1 + } + if this.FieldB != nil && that1.FieldB != nil { + if *this.FieldB != *that1.FieldB { + if *this.FieldB < *that1.FieldB { + return -1 + } + return 1 + } + } else if this.FieldB != nil { + return 1 + } else if that1.FieldB != nil { + return -1 + } + if c := this.FieldC.Compare(that1.FieldC); c != 0 { + return c + } + if len(this.FieldD) != len(that1.FieldD) { + if len(this.FieldD) < len(that1.FieldD) { + return -1 + } + return 1 + } + for i := range this.FieldD { + if c := this.FieldD[i].Compare(that1.FieldD[i]); c != 0 { + return c + } + } + if this.FieldE != nil && that1.FieldE != nil { + if *this.FieldE != *that1.FieldE { + if *this.FieldE < *that1.FieldE { + return -1 + } + return 1 + } + } else if this.FieldE != nil { + return 1 + } else if that1.FieldE != nil { + return -1 + } + if this.FieldF != nil && that1.FieldF != nil { + if *this.FieldF != *that1.FieldF { + if *this.FieldF < *that1.FieldF { + return -1 + } + return 1 + } + } else if this.FieldF != nil { + return 1 + } else if that1.FieldF != nil { + return -1 + } + if c := this.FieldG.Compare(that1.FieldG); c != 0 { + return c + } + if this.FieldH != nil && that1.FieldH != nil { + if *this.FieldH != *that1.FieldH { + if !*this.FieldH { + return -1 + } + return 1 + } + } else if this.FieldH != nil { + return 1 + } else if that1.FieldH != nil { + return -1 + } + if this.FieldI != nil && that1.FieldI != nil { + if *this.FieldI != *that1.FieldI { + if *this.FieldI < *that1.FieldI { + return -1 + } + return 1 + } + } else if this.FieldI != nil { + return 1 + } else if that1.FieldI != nil { + return -1 + } + if c := bytes.Compare(this.FieldJ, that1.FieldJ); c != 0 { + return c + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *CustomNameCustomType) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*CustomNameCustomType) + if !ok { + that2, ok := that.(CustomNameCustomType) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if that1.FieldA == nil { + if this.FieldA != nil { + return 1 + } + } else if this.FieldA == nil { + return -1 + } else if c := this.FieldA.Compare(*that1.FieldA); c != 0 { + return c + } + if that1.FieldB == nil { + if this.FieldB != nil { + return 1 + } + } else if this.FieldB == nil { + return -1 + } else if c := this.FieldB.Compare(*that1.FieldB); c != 0 { + return c + } + if len(this.FieldC) != len(that1.FieldC) { + if len(this.FieldC) < len(that1.FieldC) { + return -1 + } + return 1 + } + for i := range this.FieldC { + if c := this.FieldC[i].Compare(that1.FieldC[i]); c != 0 { + return c + } + } + if len(this.FieldD) != len(that1.FieldD) { + if len(this.FieldD) < len(that1.FieldD) { + return -1 + } + return 1 + } + for i := range this.FieldD { + if c := this.FieldD[i].Compare(that1.FieldD[i]); c != 0 { + return c + } + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *CustomNameNinEmbeddedStructUnion) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*CustomNameNinEmbeddedStructUnion) + if !ok { + that2, ok := that.(CustomNameNinEmbeddedStructUnion) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if c := this.NidOptNative.Compare(that1.NidOptNative); c != 0 { + return c + } + if c := this.FieldA.Compare(that1.FieldA); c != 0 { + return c + } + if this.FieldB != nil && that1.FieldB != nil { + if *this.FieldB != *that1.FieldB { + if !*this.FieldB { + return -1 + } + return 1 + } + } else if this.FieldB != nil { + return 1 + } else if that1.FieldB != nil { + return -1 + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *CustomNameEnum) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*CustomNameEnum) + if !ok { + that2, ok := that.(CustomNameEnum) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.FieldA != nil && that1.FieldA != nil { + if *this.FieldA != *that1.FieldA { + if *this.FieldA < *that1.FieldA { + return -1 + } + return 1 + } + } else if this.FieldA != nil { + return 1 + } else if that1.FieldA != nil { + return -1 + } + if len(this.FieldB) != len(that1.FieldB) { + if len(this.FieldB) < len(that1.FieldB) { + return -1 + } + return 1 + } + for i := range this.FieldB { + if this.FieldB[i] != that1.FieldB[i] { + if this.FieldB[i] < that1.FieldB[i] { + return -1 + } + return 1 + } + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NoExtensionsMap) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NoExtensionsMap) + if !ok { + that2, ok := that.(NoExtensionsMap) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + if *this.Field1 < *that1.Field1 { + return -1 + } + return 1 + } + } else if this.Field1 != nil { + return 1 + } else if that1.Field1 != nil { + return -1 + } + if c := bytes.Compare(this.XXX_extensions, that1.XXX_extensions); c != 0 { + return c + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *Unrecognized) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*Unrecognized) + if !ok { + that2, ok := that.(Unrecognized) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + if *this.Field1 < *that1.Field1 { + return -1 + } + return 1 + } + } else if this.Field1 != nil { + return 1 + } else if that1.Field1 != nil { + return -1 + } + return 0 +} +func (this *UnrecognizedWithInner) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*UnrecognizedWithInner) + if !ok { + that2, ok := that.(UnrecognizedWithInner) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if len(this.Embedded) != len(that1.Embedded) { + if len(this.Embedded) < len(that1.Embedded) { + return -1 + } + return 1 + } + for i := range this.Embedded { + if c := this.Embedded[i].Compare(that1.Embedded[i]); c != 0 { + return c + } + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + if *this.Field2 < *that1.Field2 { + return -1 + } + return 1 + } + } else if this.Field2 != nil { + return 1 + } else if that1.Field2 != nil { + return -1 + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *UnrecognizedWithInner_Inner) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*UnrecognizedWithInner_Inner) + if !ok { + that2, ok := that.(UnrecognizedWithInner_Inner) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + if *this.Field1 < *that1.Field1 { + return -1 + } + return 1 + } + } else if this.Field1 != nil { + return 1 + } else if that1.Field1 != nil { + return -1 + } + return 0 +} +func (this *UnrecognizedWithEmbed) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*UnrecognizedWithEmbed) + if !ok { + that2, ok := that.(UnrecognizedWithEmbed) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if c := this.UnrecognizedWithEmbed_Embedded.Compare(&that1.UnrecognizedWithEmbed_Embedded); c != 0 { + return c + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + if *this.Field2 < *that1.Field2 { + return -1 + } + return 1 + } + } else if this.Field2 != nil { + return 1 + } else if that1.Field2 != nil { + return -1 + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *UnrecognizedWithEmbed_Embedded) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*UnrecognizedWithEmbed_Embedded) + if !ok { + that2, ok := that.(UnrecognizedWithEmbed_Embedded) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + if *this.Field1 < *that1.Field1 { + return -1 + } + return 1 + } + } else if this.Field1 != nil { + return 1 + } else if that1.Field1 != nil { + return -1 + } + return 0 +} +func (this *Node) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*Node) + if !ok { + that2, ok := that.(Node) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.Label != nil && that1.Label != nil { + if *this.Label != *that1.Label { + if *this.Label < *that1.Label { + return -1 + } + return 1 + } + } else if this.Label != nil { + return 1 + } else if that1.Label != nil { + return -1 + } + if len(this.Children) != len(that1.Children) { + if len(this.Children) < len(that1.Children) { + return -1 + } + return 1 + } + for i := range this.Children { + if c := this.Children[i].Compare(that1.Children[i]); c != 0 { + return c + } + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NidOptNative) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NinOptNative) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NidRepNative) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NinRepNative) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NidRepPackedNative) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NinRepPackedNative) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NidOptStruct) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NinOptStruct) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NidRepStruct) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NinRepStruct) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NidEmbeddedStruct) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NinEmbeddedStruct) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NidNestedStruct) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NinNestedStruct) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NidOptCustom) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *CustomDash) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NinOptCustom) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NidRepCustom) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NinRepCustom) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NinOptNativeUnion) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NinOptStructUnion) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NinEmbeddedStructUnion) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NinNestedStructUnion) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *Tree) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *OrBranch) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *AndBranch) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *Leaf) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *DeepTree) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *ADeepBranch) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *AndDeepBranch) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *DeepLeaf) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *Nil) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NidOptEnum) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NinOptEnum) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NidRepEnum) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NinRepEnum) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NinOptEnumDefault) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *AnotherNinOptEnum) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *AnotherNinOptEnumDefault) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *Timer) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *MyExtendable) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *OtherExtenable) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NestedDefinition) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NestedDefinition_NestedMessage) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NestedDefinition_NestedMessage_NestedNestedMsg) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NestedScope) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NinOptNativeDefault) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *CustomContainer) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *CustomNameNidOptNative) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *CustomNameNinOptNative) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *CustomNameNinRepNative) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *CustomNameNinStruct) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *CustomNameCustomType) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *CustomNameNinEmbeddedStructUnion) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *CustomNameEnum) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NoExtensionsMap) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *Unrecognized) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *UnrecognizedWithInner) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *UnrecognizedWithInner_Inner) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *UnrecognizedWithEmbed) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *UnrecognizedWithEmbed_Embedded) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *Node) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func ThetestDescription() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + d := &github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet{} + var gzipped = []byte{ + // 6125 bytes of a gzipped FileDescriptorSet + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xcc, 0x7c, 0x6b, 0x6c, 0x23, 0xd7, + 0x75, 0xff, 0x0e, 0x87, 0x94, 0xa8, 0x43, 0x89, 0xa2, 0x66, 0xb5, 0x32, 0x2d, 0xaf, 0xf7, 0x41, + 0xcb, 0x6b, 0x59, 0xb1, 0xf5, 0x5a, 0xed, 0x8b, 0x4e, 0x1c, 0xf0, 0xb5, 0xb2, 0xf6, 0xaf, 0xd7, + 0x7f, 0x24, 0x25, 0x76, 0x5a, 0x80, 0xa0, 0xc8, 0x91, 0x44, 0x9b, 0x1a, 0xb2, 0x1c, 0xd2, 0xf6, + 0xe6, 0x43, 0x91, 0x26, 0x6d, 0x9a, 0xb4, 0xe8, 0x33, 0x2d, 0x9a, 0x77, 0x9c, 0x14, 0x69, 0x9c, + 0xf4, 0x95, 0xb4, 0x69, 0x50, 0x04, 0x45, 0x63, 0xa0, 0x48, 0xbb, 0xfd, 0x52, 0xb8, 0xf9, 0x54, + 0x14, 0x85, 0x91, 0x17, 0xd0, 0xb4, 0x4d, 0xdb, 0x04, 0x30, 0x90, 0x00, 0xc9, 0x87, 0xde, 0xf7, + 0xcc, 0xbd, 0x1c, 0x72, 0x46, 0x5e, 0x3b, 0xc9, 0x02, 0x5c, 0x91, 0xf7, 0x9c, 0xdf, 0x99, 0x33, + 0xe7, 0x75, 0xcf, 0xbd, 0x77, 0x48, 0xf8, 0xbb, 0x25, 0xb8, 0x70, 0xd8, 0x6c, 0x1e, 0x36, 0xac, + 0x85, 0x56, 0xbb, 0xd9, 0x69, 0xee, 0x77, 0x0f, 0x16, 0x6a, 0x96, 0x53, 0x6d, 0xd7, 0x5b, 0x9d, + 0x66, 0x7b, 0x9e, 0x8c, 0x19, 0xe3, 0x94, 0x63, 0x9e, 0x73, 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x0d, 0x54, 0x9b, 0x1e, 0x4d, 0xdf, + 0x1f, 0x81, 0x33, 0xbe, 0xc2, 0x7d, 0x15, 0xbd, 0x1f, 0xa0, 0x6e, 0xb7, 0xba, 0x1d, 0x3a, 0xaf, + 0xd2, 0x32, 0x33, 0x42, 0x46, 0x48, 0x0a, 0xe3, 0x12, 0xd2, 0xed, 0x08, 0xba, 0x4e, 0xe8, 0x40, + 0x87, 0x08, 0xc3, 0x75, 0x57, 0xd1, 0x28, 0x51, 0xf4, 0x5c, 0x9f, 0x3b, 0xed, 0x99, 0xb2, 0x16, + 0x21, 0x55, 0x6d, 0xd4, 0x2d, 0xbb, 0x53, 0x76, 0x3a, 0x6d, 0xab, 0x72, 0x5c, 0xb7, 0x0f, 0x49, + 0x1d, 0x8d, 0x67, 0x63, 0x07, 0x95, 0x86, 0x63, 0x99, 0xe3, 0x94, 0xbc, 0xc3, 0xa9, 0x18, 0x41, + 0x26, 0x8b, 0xb6, 0x07, 0x31, 0x24, 0x21, 0x28, 0x59, 0x20, 0x32, 0x5f, 0x1b, 0x86, 0x84, 0xa7, + 0x3b, 0x33, 0x2e, 0xc2, 0xe8, 0xd3, 0x95, 0x67, 0x2b, 0x65, 0xde, 0x71, 0x53, 0x4b, 0x24, 0xf0, + 0xd8, 0x36, 0xeb, 0xba, 0x17, 0x61, 0x92, 0xb0, 0xa0, 0x7b, 0x44, 0x17, 0xaa, 0x36, 0x2a, 0x8e, + 0x43, 0x8c, 0x16, 0x27, 0xac, 0x06, 0xa6, 0x6d, 0x61, 0x52, 0x81, 0x53, 0x8c, 0x2b, 0x70, 0x9a, + 0x20, 0x8e, 0x51, 0xe1, 0xad, 0xb7, 0x1a, 0x56, 0x19, 0xaf, 0x01, 0x1c, 0x52, 0x4f, 0x85, 0x66, + 0x13, 0x98, 0x63, 0x83, 0x31, 0x60, 0x8d, 0x1c, 0x63, 0x15, 0xee, 0x27, 0xb0, 0x43, 0xcb, 0xb6, + 0xda, 0x95, 0x8e, 0x55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9, 0x8b, 0xf2, 0x12, 0xaa, 0x97, 0xa5, 0xe7, 0x31, 0x91, 0x6c, 0xd4, 0x43, 0xed, 0x79, + 0x4c, 0x44, 0xa2, 0xf6, 0x3c, 0x26, 0x22, 0x51, 0x7b, 0x1e, 0x13, 0x91, 0xa8, 0x3d, 0x47, 0x01, + 0x12, 0xb5, 0xe7, 0x31, 0x11, 0x89, 0xda, 0xf3, 0x98, 0x88, 0x44, 0xed, 0x7d, 0x4c, 0x84, 0x91, + 0xfb, 0x3e, 0x26, 0x22, 0xd3, 0x7b, 0x1f, 0x13, 0x91, 0xe9, 0xbd, 0x8f, 0x89, 0x64, 0x51, 0x7f, + 0xd6, 0xb5, 0xfa, 0x1f, 0x3a, 0xc8, 0xf8, 0x41, 0x6b, 0x40, 0xb7, 0x00, 0x6f, 0xc1, 0x38, 0xdd, + 0x8f, 0x28, 0xe0, 0x67, 0xb0, 0xea, 0x36, 0x2a, 0xc5, 0x6f, 0x86, 0x51, 0x3a, 0x44, 0x57, 0x39, + 0x7e, 0xab, 0x40, 0x4a, 0x67, 0xe5, 0x76, 0xb4, 0xea, 0xe1, 0xce, 0xfc, 0x38, 0x0a, 0x53, 0x94, + 0x8c, 0xbf, 0x28, 0x28, 0x3d, 0x64, 0x74, 0x49, 0x39, 0x52, 0x4a, 0x62, 0xf8, 0x37, 0x5f, 0x39, + 0x4f, 0x47, 0x73, 0x22, 0x98, 0x2e, 0x29, 0x87, 0x4b, 0x32, 0x9f, 0x3b, 0xff, 0x5c, 0x52, 0x1e, + 0x3c, 0x92, 0xf9, 0xc4, 0x74, 0x23, 0xf8, 0xf8, 0x23, 0x48, 0x32, 0x5f, 0x51, 0x44, 0xd9, 0x25, + 0xe5, 0x61, 0x24, 0x99, 0xaf, 0x24, 0xe2, 0xed, 0x92, 0x72, 0xf4, 0x24, 0xf3, 0xdd, 0x14, 0x91, + 0x77, 0x49, 0x39, 0x84, 0x92, 0xf9, 0x56, 0x45, 0x0c, 0x5e, 0x52, 0x1e, 0x55, 0x92, 0xf9, 0x9e, + 0x10, 0xd1, 0x78, 0x49, 0x79, 0x68, 0x49, 0xe6, 0x5b, 0x13, 0x71, 0x39, 0xab, 0x3e, 0xbe, 0x24, + 0x33, 0xde, 0x72, 0x23, 0x74, 0x56, 0x7d, 0x90, 0x49, 0xe6, 0xfc, 0x7f, 0x6e, 0xac, 0xce, 0xaa, + 0x8f, 0x34, 0xc9, 0x9c, 0xeb, 0x6e, 0xd4, 0xce, 0xaa, 0x47, 0x65, 0x32, 0xe7, 0x86, 0x1b, 0xbf, + 0xb3, 0xea, 0xa1, 0x99, 0xcc, 0xb9, 0xe9, 0x46, 0xf2, 0xac, 0x7a, 0x7c, 0x26, 0x73, 0x6e, 0xb9, + 0x7b, 0xe8, 0x5f, 0x51, 0xc2, 0xcf, 0xf3, 0x10, 0x54, 0x46, 0x09, 0x3f, 0xf0, 0x09, 0xbd, 0x8c, + 0x12, 0x7a, 0xe0, 0x13, 0x76, 0x19, 0x25, 0xec, 0xc0, 0x27, 0xe4, 0x32, 0x4a, 0xc8, 0x81, 0x4f, + 0xb8, 0x65, 0x94, 0x70, 0x03, 0x9f, 0x50, 0xcb, 0x28, 0xa1, 0x06, 0x3e, 0x61, 0x96, 0x51, 0xc2, + 0x0c, 0x7c, 0x42, 0x2c, 0xa3, 0x84, 0x18, 0xf8, 0x84, 0x57, 0x46, 0x09, 0x2f, 0xf0, 0x09, 0xad, + 0x19, 0x35, 0xb4, 0xc0, 0x2f, 0xac, 0x66, 0xd4, 0xb0, 0x02, 0xbf, 0x90, 0x7a, 0x40, 0x0d, 0xa9, + 0x11, 0xc4, 0x15, 0xc3, 0x43, 0x9e, 0x68, 0x9a, 0x51, 0xa3, 0x09, 0xfc, 0x22, 0x69, 0x46, 0x8d, + 0x24, 0xf0, 0x8b, 0xa2, 0x19, 0x35, 0x8a, 0xc0, 0x2f, 0x82, 0x5e, 0x52, 0x23, 0xc8, 0x7d, 0xc4, + 0x27, 0xa3, 0x9c, 0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c, 0x19, 0x88, 0xce, 0x28, 0xb9, 0x25, 0x74, 0x87, 0x14, 0x90, + 0xef, 0x0b, 0xe8, 0x6f, 0x25, 0x2a, 0x24, 0xbf, 0x94, 0x7d, 0x82, 0x09, 0x29, 0xf4, 0x15, 0x12, + 0x60, 0x2a, 0x2a, 0xa9, 0xb0, 0x94, 0xdf, 0xbd, 0xf3, 0x8d, 0x73, 0xa7, 0x5e, 0x46, 0xaf, 0x7f, + 0x41, 0xaf, 0xaf, 0x7f, 0xe3, 0x9c, 0xf6, 0x1d, 0xf4, 0xfa, 0x1e, 0x7a, 0xfd, 0x10, 0xbd, 0xde, + 0xf5, 0xcd, 0x73, 0xda, 0x8b, 0xe8, 0xf5, 0x79, 0xf4, 0xfa, 0x6b, 0xf4, 0x7a, 0x09, 0xbd, 0xee, + 0xa0, 0xd7, 0xcb, 0xe8, 0xf5, 0x75, 0xf4, 0xfa, 0xce, 0x37, 0xcf, 0x9d, 0xfa, 0x1e, 0xfa, 0xfb, + 0x43, 0xf4, 0xf7, 0x5d, 0xdf, 0x3a, 0x77, 0xea, 0x05, 0xf4, 0x7a, 0xf1, 0x5b, 0xe7, 0xb4, 0xff, + 0x0b, 0x00, 0x00, 0xff, 0xff, 0x85, 0x47, 0xda, 0x26, 0x15, 0x5f, 0x00, 0x00, + } + r := bytes.NewReader(gzipped) + gzipr, err := compress_gzip.NewReader(r) + if err != nil { + panic(err) + } + ungzipped, err := io_ioutil.ReadAll(gzipr) + if err != nil { + panic(err) + } + if err := github_com_gogo_protobuf_proto.Unmarshal(ungzipped, d); err != nil { + panic(err) + } + return d +} +func (x TheTestEnum) String() string { + s, ok := TheTestEnum_name[int32(x)] + if ok { + return s + } + return strconv.Itoa(int(x)) +} +func (x AnotherTestEnum) String() string { + s, ok := AnotherTestEnum_name[int32(x)] + if ok { + return s + } + return strconv.Itoa(int(x)) +} +func (x YetAnotherTestEnum) String() string { + s, ok := YetAnotherTestEnum_name[int32(x)] + if ok { + return s + } + return strconv.Itoa(int(x)) +} +func (x YetYetAnotherTestEnum) String() string { + s, ok := YetYetAnotherTestEnum_name[int32(x)] + if ok { + return s + } + return strconv.Itoa(int(x)) +} +func (x NestedDefinition_NestedEnum) String() string { + s, ok := NestedDefinition_NestedEnum_name[int32(x)] + if ok { + return s + } + return strconv.Itoa(int(x)) +} +func (this *NidOptNative) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NidOptNative) + if !ok { + that2, ok := that.(NidOptNative) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NidOptNative") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NidOptNative but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NidOptNative but is not nil && this == nil") + } + if this.Field1 != that1.Field1 { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) + } + if this.Field2 != that1.Field2 { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) + } + if this.Field3 != that1.Field3 { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", this.Field3, that1.Field3) + } + if this.Field4 != that1.Field4 { + return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", this.Field4, that1.Field4) + } + if this.Field5 != that1.Field5 { + return fmt.Errorf("Field5 this(%v) Not Equal that(%v)", this.Field5, that1.Field5) + } + if this.Field6 != that1.Field6 { + return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", this.Field6, that1.Field6) + } + if this.Field7 != that1.Field7 { + return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", this.Field7, that1.Field7) + } + if this.Field8 != that1.Field8 { + return fmt.Errorf("Field8 this(%v) Not Equal that(%v)", this.Field8, that1.Field8) + } + if this.Field9 != that1.Field9 { + return fmt.Errorf("Field9 this(%v) Not Equal that(%v)", this.Field9, that1.Field9) + } + if this.Field10 != that1.Field10 { + return fmt.Errorf("Field10 this(%v) Not Equal that(%v)", this.Field10, that1.Field10) + } + if this.Field11 != that1.Field11 { + return fmt.Errorf("Field11 this(%v) Not Equal that(%v)", this.Field11, that1.Field11) + } + if this.Field12 != that1.Field12 { + return fmt.Errorf("Field12 this(%v) Not Equal that(%v)", this.Field12, that1.Field12) + } + if this.Field13 != that1.Field13 { + return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", this.Field13, that1.Field13) + } + if this.Field14 != that1.Field14 { + return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", this.Field14, that1.Field14) + } + if !bytes.Equal(this.Field15, that1.Field15) { + return fmt.Errorf("Field15 this(%v) Not Equal that(%v)", this.Field15, that1.Field15) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NidOptNative) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*NidOptNative) + if !ok { + that2, ok := that.(NidOptNative) + 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.Field1 != that1.Field1 { + return false + } + if this.Field2 != that1.Field2 { + return false + } + if this.Field3 != that1.Field3 { + return false + } + if this.Field4 != that1.Field4 { + return false + } + if this.Field5 != that1.Field5 { + return false + } + if this.Field6 != that1.Field6 { + return false + } + if this.Field7 != that1.Field7 { + return false + } + if this.Field8 != that1.Field8 { + return false + } + if this.Field9 != that1.Field9 { + return false + } + if this.Field10 != that1.Field10 { + return false + } + if this.Field11 != that1.Field11 { + return false + } + if this.Field12 != that1.Field12 { + return false + } + if this.Field13 != that1.Field13 { + return false + } + if this.Field14 != that1.Field14 { + return false + } + if !bytes.Equal(this.Field15, that1.Field15) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NinOptNative) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NinOptNative) + if !ok { + that2, ok := that.(NinOptNative) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NinOptNative") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NinOptNative but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NinOptNative but is not nil && this == nil") + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) + } + } else if this.Field1 != nil { + return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") + } else if that1.Field1 != nil { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", *this.Field2, *that1.Field2) + } + } else if this.Field2 != nil { + return fmt.Errorf("this.Field2 == nil && that.Field2 != nil") + } else if that1.Field2 != nil { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) + } + if this.Field3 != nil && that1.Field3 != nil { + if *this.Field3 != *that1.Field3 { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", *this.Field3, *that1.Field3) + } + } else if this.Field3 != nil { + return fmt.Errorf("this.Field3 == nil && that.Field3 != nil") + } else if that1.Field3 != nil { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", this.Field3, that1.Field3) + } + if this.Field4 != nil && that1.Field4 != nil { + if *this.Field4 != *that1.Field4 { + return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", *this.Field4, *that1.Field4) + } + } else if this.Field4 != nil { + return fmt.Errorf("this.Field4 == nil && that.Field4 != nil") + } else if that1.Field4 != nil { + return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", this.Field4, that1.Field4) + } + if this.Field5 != nil && that1.Field5 != nil { + if *this.Field5 != *that1.Field5 { + return fmt.Errorf("Field5 this(%v) Not Equal that(%v)", *this.Field5, *that1.Field5) + } + } else if this.Field5 != nil { + return fmt.Errorf("this.Field5 == nil && that.Field5 != nil") + } else if that1.Field5 != nil { + return fmt.Errorf("Field5 this(%v) Not Equal that(%v)", this.Field5, that1.Field5) + } + if this.Field6 != nil && that1.Field6 != nil { + if *this.Field6 != *that1.Field6 { + return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", *this.Field6, *that1.Field6) + } + } else if this.Field6 != nil { + return fmt.Errorf("this.Field6 == nil && that.Field6 != nil") + } else if that1.Field6 != nil { + return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", this.Field6, that1.Field6) + } + if this.Field7 != nil && that1.Field7 != nil { + if *this.Field7 != *that1.Field7 { + return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", *this.Field7, *that1.Field7) + } + } else if this.Field7 != nil { + return fmt.Errorf("this.Field7 == nil && that.Field7 != nil") + } else if that1.Field7 != nil { + return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", this.Field7, that1.Field7) + } + if this.Field8 != nil && that1.Field8 != nil { + if *this.Field8 != *that1.Field8 { + return fmt.Errorf("Field8 this(%v) Not Equal that(%v)", *this.Field8, *that1.Field8) + } + } else if this.Field8 != nil { + return fmt.Errorf("this.Field8 == nil && that.Field8 != nil") + } else if that1.Field8 != nil { + return fmt.Errorf("Field8 this(%v) Not Equal that(%v)", this.Field8, that1.Field8) + } + if this.Field9 != nil && that1.Field9 != nil { + if *this.Field9 != *that1.Field9 { + return fmt.Errorf("Field9 this(%v) Not Equal that(%v)", *this.Field9, *that1.Field9) + } + } else if this.Field9 != nil { + return fmt.Errorf("this.Field9 == nil && that.Field9 != nil") + } else if that1.Field9 != nil { + return fmt.Errorf("Field9 this(%v) Not Equal that(%v)", this.Field9, that1.Field9) + } + if this.Field10 != nil && that1.Field10 != nil { + if *this.Field10 != *that1.Field10 { + return fmt.Errorf("Field10 this(%v) Not Equal that(%v)", *this.Field10, *that1.Field10) + } + } else if this.Field10 != nil { + return fmt.Errorf("this.Field10 == nil && that.Field10 != nil") + } else if that1.Field10 != nil { + return fmt.Errorf("Field10 this(%v) Not Equal that(%v)", this.Field10, that1.Field10) + } + if this.Field11 != nil && that1.Field11 != nil { + if *this.Field11 != *that1.Field11 { + return fmt.Errorf("Field11 this(%v) Not Equal that(%v)", *this.Field11, *that1.Field11) + } + } else if this.Field11 != nil { + return fmt.Errorf("this.Field11 == nil && that.Field11 != nil") + } else if that1.Field11 != nil { + return fmt.Errorf("Field11 this(%v) Not Equal that(%v)", this.Field11, that1.Field11) + } + if this.Field12 != nil && that1.Field12 != nil { + if *this.Field12 != *that1.Field12 { + return fmt.Errorf("Field12 this(%v) Not Equal that(%v)", *this.Field12, *that1.Field12) + } + } else if this.Field12 != nil { + return fmt.Errorf("this.Field12 == nil && that.Field12 != nil") + } else if that1.Field12 != nil { + return fmt.Errorf("Field12 this(%v) Not Equal that(%v)", this.Field12, that1.Field12) + } + if this.Field13 != nil && that1.Field13 != nil { + if *this.Field13 != *that1.Field13 { + return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", *this.Field13, *that1.Field13) + } + } else if this.Field13 != nil { + return fmt.Errorf("this.Field13 == nil && that.Field13 != nil") + } else if that1.Field13 != nil { + return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", this.Field13, that1.Field13) + } + if this.Field14 != nil && that1.Field14 != nil { + if *this.Field14 != *that1.Field14 { + return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", *this.Field14, *that1.Field14) + } + } else if this.Field14 != nil { + return fmt.Errorf("this.Field14 == nil && that.Field14 != nil") + } else if that1.Field14 != nil { + return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", this.Field14, that1.Field14) + } + if !bytes.Equal(this.Field15, that1.Field15) { + return fmt.Errorf("Field15 this(%v) Not Equal that(%v)", this.Field15, that1.Field15) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NinOptNative) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*NinOptNative) + if !ok { + that2, ok := that.(NinOptNative) + 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.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return false + } + } else if this.Field1 != nil { + return false + } else if that1.Field1 != nil { + return false + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + return false + } + } else if this.Field2 != nil { + return false + } else if that1.Field2 != nil { + return false + } + if this.Field3 != nil && that1.Field3 != nil { + if *this.Field3 != *that1.Field3 { + return false + } + } else if this.Field3 != nil { + return false + } else if that1.Field3 != nil { + return false + } + if this.Field4 != nil && that1.Field4 != nil { + if *this.Field4 != *that1.Field4 { + return false + } + } else if this.Field4 != nil { + return false + } else if that1.Field4 != nil { + return false + } + if this.Field5 != nil && that1.Field5 != nil { + if *this.Field5 != *that1.Field5 { + return false + } + } else if this.Field5 != nil { + return false + } else if that1.Field5 != nil { + return false + } + if this.Field6 != nil && that1.Field6 != nil { + if *this.Field6 != *that1.Field6 { + return false + } + } else if this.Field6 != nil { + return false + } else if that1.Field6 != nil { + return false + } + if this.Field7 != nil && that1.Field7 != nil { + if *this.Field7 != *that1.Field7 { + return false + } + } else if this.Field7 != nil { + return false + } else if that1.Field7 != nil { + return false + } + if this.Field8 != nil && that1.Field8 != nil { + if *this.Field8 != *that1.Field8 { + return false + } + } else if this.Field8 != nil { + return false + } else if that1.Field8 != nil { + return false + } + if this.Field9 != nil && that1.Field9 != nil { + if *this.Field9 != *that1.Field9 { + return false + } + } else if this.Field9 != nil { + return false + } else if that1.Field9 != nil { + return false + } + if this.Field10 != nil && that1.Field10 != nil { + if *this.Field10 != *that1.Field10 { + return false + } + } else if this.Field10 != nil { + return false + } else if that1.Field10 != nil { + return false + } + if this.Field11 != nil && that1.Field11 != nil { + if *this.Field11 != *that1.Field11 { + return false + } + } else if this.Field11 != nil { + return false + } else if that1.Field11 != nil { + return false + } + if this.Field12 != nil && that1.Field12 != nil { + if *this.Field12 != *that1.Field12 { + return false + } + } else if this.Field12 != nil { + return false + } else if that1.Field12 != nil { + return false + } + if this.Field13 != nil && that1.Field13 != nil { + if *this.Field13 != *that1.Field13 { + return false + } + } else if this.Field13 != nil { + return false + } else if that1.Field13 != nil { + return false + } + if this.Field14 != nil && that1.Field14 != nil { + if *this.Field14 != *that1.Field14 { + return false + } + } else if this.Field14 != nil { + return false + } else if that1.Field14 != nil { + return false + } + if !bytes.Equal(this.Field15, that1.Field15) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NidRepNative) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NidRepNative) + if !ok { + that2, ok := that.(NidRepNative) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NidRepNative") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NidRepNative but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NidRepNative but is not nil && this == nil") + } + if len(this.Field1) != len(that1.Field1) { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", len(this.Field1), len(that1.Field1)) + } + for i := range this.Field1 { + if this.Field1[i] != that1.Field1[i] { + return fmt.Errorf("Field1 this[%v](%v) Not Equal that[%v](%v)", i, this.Field1[i], i, that1.Field1[i]) + } + } + if len(this.Field2) != len(that1.Field2) { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", len(this.Field2), len(that1.Field2)) + } + for i := range this.Field2 { + if this.Field2[i] != that1.Field2[i] { + return fmt.Errorf("Field2 this[%v](%v) Not Equal that[%v](%v)", i, this.Field2[i], i, that1.Field2[i]) + } + } + if len(this.Field3) != len(that1.Field3) { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", len(this.Field3), len(that1.Field3)) + } + for i := range this.Field3 { + if this.Field3[i] != that1.Field3[i] { + return fmt.Errorf("Field3 this[%v](%v) Not Equal that[%v](%v)", i, this.Field3[i], i, that1.Field3[i]) + } + } + if len(this.Field4) != len(that1.Field4) { + return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", len(this.Field4), len(that1.Field4)) + } + for i := range this.Field4 { + if this.Field4[i] != that1.Field4[i] { + return fmt.Errorf("Field4 this[%v](%v) Not Equal that[%v](%v)", i, this.Field4[i], i, that1.Field4[i]) + } + } + if len(this.Field5) != len(that1.Field5) { + return fmt.Errorf("Field5 this(%v) Not Equal that(%v)", len(this.Field5), len(that1.Field5)) + } + for i := range this.Field5 { + if this.Field5[i] != that1.Field5[i] { + return fmt.Errorf("Field5 this[%v](%v) Not Equal that[%v](%v)", i, this.Field5[i], i, that1.Field5[i]) + } + } + if len(this.Field6) != len(that1.Field6) { + return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", len(this.Field6), len(that1.Field6)) + } + for i := range this.Field6 { + if this.Field6[i] != that1.Field6[i] { + return fmt.Errorf("Field6 this[%v](%v) Not Equal that[%v](%v)", i, this.Field6[i], i, that1.Field6[i]) + } + } + if len(this.Field7) != len(that1.Field7) { + return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", len(this.Field7), len(that1.Field7)) + } + for i := range this.Field7 { + if this.Field7[i] != that1.Field7[i] { + return fmt.Errorf("Field7 this[%v](%v) Not Equal that[%v](%v)", i, this.Field7[i], i, that1.Field7[i]) + } + } + if len(this.Field8) != len(that1.Field8) { + return fmt.Errorf("Field8 this(%v) Not Equal that(%v)", len(this.Field8), len(that1.Field8)) + } + for i := range this.Field8 { + if this.Field8[i] != that1.Field8[i] { + return fmt.Errorf("Field8 this[%v](%v) Not Equal that[%v](%v)", i, this.Field8[i], i, that1.Field8[i]) + } + } + if len(this.Field9) != len(that1.Field9) { + return fmt.Errorf("Field9 this(%v) Not Equal that(%v)", len(this.Field9), len(that1.Field9)) + } + for i := range this.Field9 { + if this.Field9[i] != that1.Field9[i] { + return fmt.Errorf("Field9 this[%v](%v) Not Equal that[%v](%v)", i, this.Field9[i], i, that1.Field9[i]) + } + } + if len(this.Field10) != len(that1.Field10) { + return fmt.Errorf("Field10 this(%v) Not Equal that(%v)", len(this.Field10), len(that1.Field10)) + } + for i := range this.Field10 { + if this.Field10[i] != that1.Field10[i] { + return fmt.Errorf("Field10 this[%v](%v) Not Equal that[%v](%v)", i, this.Field10[i], i, that1.Field10[i]) + } + } + if len(this.Field11) != len(that1.Field11) { + return fmt.Errorf("Field11 this(%v) Not Equal that(%v)", len(this.Field11), len(that1.Field11)) + } + for i := range this.Field11 { + if this.Field11[i] != that1.Field11[i] { + return fmt.Errorf("Field11 this[%v](%v) Not Equal that[%v](%v)", i, this.Field11[i], i, that1.Field11[i]) + } + } + if len(this.Field12) != len(that1.Field12) { + return fmt.Errorf("Field12 this(%v) Not Equal that(%v)", len(this.Field12), len(that1.Field12)) + } + for i := range this.Field12 { + if this.Field12[i] != that1.Field12[i] { + return fmt.Errorf("Field12 this[%v](%v) Not Equal that[%v](%v)", i, this.Field12[i], i, that1.Field12[i]) + } + } + if len(this.Field13) != len(that1.Field13) { + return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", len(this.Field13), len(that1.Field13)) + } + for i := range this.Field13 { + if this.Field13[i] != that1.Field13[i] { + return fmt.Errorf("Field13 this[%v](%v) Not Equal that[%v](%v)", i, this.Field13[i], i, that1.Field13[i]) + } + } + if len(this.Field14) != len(that1.Field14) { + return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", len(this.Field14), len(that1.Field14)) + } + for i := range this.Field14 { + if this.Field14[i] != that1.Field14[i] { + return fmt.Errorf("Field14 this[%v](%v) Not Equal that[%v](%v)", i, this.Field14[i], i, that1.Field14[i]) + } + } + if len(this.Field15) != len(that1.Field15) { + return fmt.Errorf("Field15 this(%v) Not Equal that(%v)", len(this.Field15), len(that1.Field15)) + } + for i := range this.Field15 { + if !bytes.Equal(this.Field15[i], that1.Field15[i]) { + return fmt.Errorf("Field15 this[%v](%v) Not Equal that[%v](%v)", i, this.Field15[i], i, that1.Field15[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NidRepNative) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*NidRepNative) + if !ok { + that2, ok := that.(NidRepNative) + 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.Field1) != len(that1.Field1) { + return false + } + for i := range this.Field1 { + if this.Field1[i] != that1.Field1[i] { + return false + } + } + if len(this.Field2) != len(that1.Field2) { + return false + } + for i := range this.Field2 { + if this.Field2[i] != that1.Field2[i] { + return false + } + } + if len(this.Field3) != len(that1.Field3) { + return false + } + for i := range this.Field3 { + if this.Field3[i] != that1.Field3[i] { + return false + } + } + if len(this.Field4) != len(that1.Field4) { + return false + } + for i := range this.Field4 { + if this.Field4[i] != that1.Field4[i] { + return false + } + } + if len(this.Field5) != len(that1.Field5) { + return false + } + for i := range this.Field5 { + if this.Field5[i] != that1.Field5[i] { + return false + } + } + if len(this.Field6) != len(that1.Field6) { + return false + } + for i := range this.Field6 { + if this.Field6[i] != that1.Field6[i] { + return false + } + } + if len(this.Field7) != len(that1.Field7) { + return false + } + for i := range this.Field7 { + if this.Field7[i] != that1.Field7[i] { + return false + } + } + if len(this.Field8) != len(that1.Field8) { + return false + } + for i := range this.Field8 { + if this.Field8[i] != that1.Field8[i] { + return false + } + } + if len(this.Field9) != len(that1.Field9) { + return false + } + for i := range this.Field9 { + if this.Field9[i] != that1.Field9[i] { + return false + } + } + if len(this.Field10) != len(that1.Field10) { + return false + } + for i := range this.Field10 { + if this.Field10[i] != that1.Field10[i] { + return false + } + } + if len(this.Field11) != len(that1.Field11) { + return false + } + for i := range this.Field11 { + if this.Field11[i] != that1.Field11[i] { + return false + } + } + if len(this.Field12) != len(that1.Field12) { + return false + } + for i := range this.Field12 { + if this.Field12[i] != that1.Field12[i] { + return false + } + } + if len(this.Field13) != len(that1.Field13) { + return false + } + for i := range this.Field13 { + if this.Field13[i] != that1.Field13[i] { + return false + } + } + if len(this.Field14) != len(that1.Field14) { + return false + } + for i := range this.Field14 { + if this.Field14[i] != that1.Field14[i] { + return false + } + } + if len(this.Field15) != len(that1.Field15) { + return false + } + for i := range this.Field15 { + if !bytes.Equal(this.Field15[i], that1.Field15[i]) { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NinRepNative) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NinRepNative) + if !ok { + that2, ok := that.(NinRepNative) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NinRepNative") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NinRepNative but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NinRepNative but is not nil && this == nil") + } + if len(this.Field1) != len(that1.Field1) { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", len(this.Field1), len(that1.Field1)) + } + for i := range this.Field1 { + if this.Field1[i] != that1.Field1[i] { + return fmt.Errorf("Field1 this[%v](%v) Not Equal that[%v](%v)", i, this.Field1[i], i, that1.Field1[i]) + } + } + if len(this.Field2) != len(that1.Field2) { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", len(this.Field2), len(that1.Field2)) + } + for i := range this.Field2 { + if this.Field2[i] != that1.Field2[i] { + return fmt.Errorf("Field2 this[%v](%v) Not Equal that[%v](%v)", i, this.Field2[i], i, that1.Field2[i]) + } + } + if len(this.Field3) != len(that1.Field3) { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", len(this.Field3), len(that1.Field3)) + } + for i := range this.Field3 { + if this.Field3[i] != that1.Field3[i] { + return fmt.Errorf("Field3 this[%v](%v) Not Equal that[%v](%v)", i, this.Field3[i], i, that1.Field3[i]) + } + } + if len(this.Field4) != len(that1.Field4) { + return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", len(this.Field4), len(that1.Field4)) + } + for i := range this.Field4 { + if this.Field4[i] != that1.Field4[i] { + return fmt.Errorf("Field4 this[%v](%v) Not Equal that[%v](%v)", i, this.Field4[i], i, that1.Field4[i]) + } + } + if len(this.Field5) != len(that1.Field5) { + return fmt.Errorf("Field5 this(%v) Not Equal that(%v)", len(this.Field5), len(that1.Field5)) + } + for i := range this.Field5 { + if this.Field5[i] != that1.Field5[i] { + return fmt.Errorf("Field5 this[%v](%v) Not Equal that[%v](%v)", i, this.Field5[i], i, that1.Field5[i]) + } + } + if len(this.Field6) != len(that1.Field6) { + return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", len(this.Field6), len(that1.Field6)) + } + for i := range this.Field6 { + if this.Field6[i] != that1.Field6[i] { + return fmt.Errorf("Field6 this[%v](%v) Not Equal that[%v](%v)", i, this.Field6[i], i, that1.Field6[i]) + } + } + if len(this.Field7) != len(that1.Field7) { + return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", len(this.Field7), len(that1.Field7)) + } + for i := range this.Field7 { + if this.Field7[i] != that1.Field7[i] { + return fmt.Errorf("Field7 this[%v](%v) Not Equal that[%v](%v)", i, this.Field7[i], i, that1.Field7[i]) + } + } + if len(this.Field8) != len(that1.Field8) { + return fmt.Errorf("Field8 this(%v) Not Equal that(%v)", len(this.Field8), len(that1.Field8)) + } + for i := range this.Field8 { + if this.Field8[i] != that1.Field8[i] { + return fmt.Errorf("Field8 this[%v](%v) Not Equal that[%v](%v)", i, this.Field8[i], i, that1.Field8[i]) + } + } + if len(this.Field9) != len(that1.Field9) { + return fmt.Errorf("Field9 this(%v) Not Equal that(%v)", len(this.Field9), len(that1.Field9)) + } + for i := range this.Field9 { + if this.Field9[i] != that1.Field9[i] { + return fmt.Errorf("Field9 this[%v](%v) Not Equal that[%v](%v)", i, this.Field9[i], i, that1.Field9[i]) + } + } + if len(this.Field10) != len(that1.Field10) { + return fmt.Errorf("Field10 this(%v) Not Equal that(%v)", len(this.Field10), len(that1.Field10)) + } + for i := range this.Field10 { + if this.Field10[i] != that1.Field10[i] { + return fmt.Errorf("Field10 this[%v](%v) Not Equal that[%v](%v)", i, this.Field10[i], i, that1.Field10[i]) + } + } + if len(this.Field11) != len(that1.Field11) { + return fmt.Errorf("Field11 this(%v) Not Equal that(%v)", len(this.Field11), len(that1.Field11)) + } + for i := range this.Field11 { + if this.Field11[i] != that1.Field11[i] { + return fmt.Errorf("Field11 this[%v](%v) Not Equal that[%v](%v)", i, this.Field11[i], i, that1.Field11[i]) + } + } + if len(this.Field12) != len(that1.Field12) { + return fmt.Errorf("Field12 this(%v) Not Equal that(%v)", len(this.Field12), len(that1.Field12)) + } + for i := range this.Field12 { + if this.Field12[i] != that1.Field12[i] { + return fmt.Errorf("Field12 this[%v](%v) Not Equal that[%v](%v)", i, this.Field12[i], i, that1.Field12[i]) + } + } + if len(this.Field13) != len(that1.Field13) { + return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", len(this.Field13), len(that1.Field13)) + } + for i := range this.Field13 { + if this.Field13[i] != that1.Field13[i] { + return fmt.Errorf("Field13 this[%v](%v) Not Equal that[%v](%v)", i, this.Field13[i], i, that1.Field13[i]) + } + } + if len(this.Field14) != len(that1.Field14) { + return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", len(this.Field14), len(that1.Field14)) + } + for i := range this.Field14 { + if this.Field14[i] != that1.Field14[i] { + return fmt.Errorf("Field14 this[%v](%v) Not Equal that[%v](%v)", i, this.Field14[i], i, that1.Field14[i]) + } + } + if len(this.Field15) != len(that1.Field15) { + return fmt.Errorf("Field15 this(%v) Not Equal that(%v)", len(this.Field15), len(that1.Field15)) + } + for i := range this.Field15 { + if !bytes.Equal(this.Field15[i], that1.Field15[i]) { + return fmt.Errorf("Field15 this[%v](%v) Not Equal that[%v](%v)", i, this.Field15[i], i, that1.Field15[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NinRepNative) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*NinRepNative) + if !ok { + that2, ok := that.(NinRepNative) + 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.Field1) != len(that1.Field1) { + return false + } + for i := range this.Field1 { + if this.Field1[i] != that1.Field1[i] { + return false + } + } + if len(this.Field2) != len(that1.Field2) { + return false + } + for i := range this.Field2 { + if this.Field2[i] != that1.Field2[i] { + return false + } + } + if len(this.Field3) != len(that1.Field3) { + return false + } + for i := range this.Field3 { + if this.Field3[i] != that1.Field3[i] { + return false + } + } + if len(this.Field4) != len(that1.Field4) { + return false + } + for i := range this.Field4 { + if this.Field4[i] != that1.Field4[i] { + return false + } + } + if len(this.Field5) != len(that1.Field5) { + return false + } + for i := range this.Field5 { + if this.Field5[i] != that1.Field5[i] { + return false + } + } + if len(this.Field6) != len(that1.Field6) { + return false + } + for i := range this.Field6 { + if this.Field6[i] != that1.Field6[i] { + return false + } + } + if len(this.Field7) != len(that1.Field7) { + return false + } + for i := range this.Field7 { + if this.Field7[i] != that1.Field7[i] { + return false + } + } + if len(this.Field8) != len(that1.Field8) { + return false + } + for i := range this.Field8 { + if this.Field8[i] != that1.Field8[i] { + return false + } + } + if len(this.Field9) != len(that1.Field9) { + return false + } + for i := range this.Field9 { + if this.Field9[i] != that1.Field9[i] { + return false + } + } + if len(this.Field10) != len(that1.Field10) { + return false + } + for i := range this.Field10 { + if this.Field10[i] != that1.Field10[i] { + return false + } + } + if len(this.Field11) != len(that1.Field11) { + return false + } + for i := range this.Field11 { + if this.Field11[i] != that1.Field11[i] { + return false + } + } + if len(this.Field12) != len(that1.Field12) { + return false + } + for i := range this.Field12 { + if this.Field12[i] != that1.Field12[i] { + return false + } + } + if len(this.Field13) != len(that1.Field13) { + return false + } + for i := range this.Field13 { + if this.Field13[i] != that1.Field13[i] { + return false + } + } + if len(this.Field14) != len(that1.Field14) { + return false + } + for i := range this.Field14 { + if this.Field14[i] != that1.Field14[i] { + return false + } + } + if len(this.Field15) != len(that1.Field15) { + return false + } + for i := range this.Field15 { + if !bytes.Equal(this.Field15[i], that1.Field15[i]) { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NidRepPackedNative) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NidRepPackedNative) + if !ok { + that2, ok := that.(NidRepPackedNative) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NidRepPackedNative") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NidRepPackedNative but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NidRepPackedNative but is not nil && this == nil") + } + if len(this.Field1) != len(that1.Field1) { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", len(this.Field1), len(that1.Field1)) + } + for i := range this.Field1 { + if this.Field1[i] != that1.Field1[i] { + return fmt.Errorf("Field1 this[%v](%v) Not Equal that[%v](%v)", i, this.Field1[i], i, that1.Field1[i]) + } + } + if len(this.Field2) != len(that1.Field2) { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", len(this.Field2), len(that1.Field2)) + } + for i := range this.Field2 { + if this.Field2[i] != that1.Field2[i] { + return fmt.Errorf("Field2 this[%v](%v) Not Equal that[%v](%v)", i, this.Field2[i], i, that1.Field2[i]) + } + } + if len(this.Field3) != len(that1.Field3) { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", len(this.Field3), len(that1.Field3)) + } + for i := range this.Field3 { + if this.Field3[i] != that1.Field3[i] { + return fmt.Errorf("Field3 this[%v](%v) Not Equal that[%v](%v)", i, this.Field3[i], i, that1.Field3[i]) + } + } + if len(this.Field4) != len(that1.Field4) { + return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", len(this.Field4), len(that1.Field4)) + } + for i := range this.Field4 { + if this.Field4[i] != that1.Field4[i] { + return fmt.Errorf("Field4 this[%v](%v) Not Equal that[%v](%v)", i, this.Field4[i], i, that1.Field4[i]) + } + } + if len(this.Field5) != len(that1.Field5) { + return fmt.Errorf("Field5 this(%v) Not Equal that(%v)", len(this.Field5), len(that1.Field5)) + } + for i := range this.Field5 { + if this.Field5[i] != that1.Field5[i] { + return fmt.Errorf("Field5 this[%v](%v) Not Equal that[%v](%v)", i, this.Field5[i], i, that1.Field5[i]) + } + } + if len(this.Field6) != len(that1.Field6) { + return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", len(this.Field6), len(that1.Field6)) + } + for i := range this.Field6 { + if this.Field6[i] != that1.Field6[i] { + return fmt.Errorf("Field6 this[%v](%v) Not Equal that[%v](%v)", i, this.Field6[i], i, that1.Field6[i]) + } + } + if len(this.Field7) != len(that1.Field7) { + return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", len(this.Field7), len(that1.Field7)) + } + for i := range this.Field7 { + if this.Field7[i] != that1.Field7[i] { + return fmt.Errorf("Field7 this[%v](%v) Not Equal that[%v](%v)", i, this.Field7[i], i, that1.Field7[i]) + } + } + if len(this.Field8) != len(that1.Field8) { + return fmt.Errorf("Field8 this(%v) Not Equal that(%v)", len(this.Field8), len(that1.Field8)) + } + for i := range this.Field8 { + if this.Field8[i] != that1.Field8[i] { + return fmt.Errorf("Field8 this[%v](%v) Not Equal that[%v](%v)", i, this.Field8[i], i, that1.Field8[i]) + } + } + if len(this.Field9) != len(that1.Field9) { + return fmt.Errorf("Field9 this(%v) Not Equal that(%v)", len(this.Field9), len(that1.Field9)) + } + for i := range this.Field9 { + if this.Field9[i] != that1.Field9[i] { + return fmt.Errorf("Field9 this[%v](%v) Not Equal that[%v](%v)", i, this.Field9[i], i, that1.Field9[i]) + } + } + if len(this.Field10) != len(that1.Field10) { + return fmt.Errorf("Field10 this(%v) Not Equal that(%v)", len(this.Field10), len(that1.Field10)) + } + for i := range this.Field10 { + if this.Field10[i] != that1.Field10[i] { + return fmt.Errorf("Field10 this[%v](%v) Not Equal that[%v](%v)", i, this.Field10[i], i, that1.Field10[i]) + } + } + if len(this.Field11) != len(that1.Field11) { + return fmt.Errorf("Field11 this(%v) Not Equal that(%v)", len(this.Field11), len(that1.Field11)) + } + for i := range this.Field11 { + if this.Field11[i] != that1.Field11[i] { + return fmt.Errorf("Field11 this[%v](%v) Not Equal that[%v](%v)", i, this.Field11[i], i, that1.Field11[i]) + } + } + if len(this.Field12) != len(that1.Field12) { + return fmt.Errorf("Field12 this(%v) Not Equal that(%v)", len(this.Field12), len(that1.Field12)) + } + for i := range this.Field12 { + if this.Field12[i] != that1.Field12[i] { + return fmt.Errorf("Field12 this[%v](%v) Not Equal that[%v](%v)", i, this.Field12[i], i, that1.Field12[i]) + } + } + if len(this.Field13) != len(that1.Field13) { + return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", len(this.Field13), len(that1.Field13)) + } + for i := range this.Field13 { + if this.Field13[i] != that1.Field13[i] { + return fmt.Errorf("Field13 this[%v](%v) Not Equal that[%v](%v)", i, this.Field13[i], i, that1.Field13[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NidRepPackedNative) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*NidRepPackedNative) + if !ok { + that2, ok := that.(NidRepPackedNative) + 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.Field1) != len(that1.Field1) { + return false + } + for i := range this.Field1 { + if this.Field1[i] != that1.Field1[i] { + return false + } + } + if len(this.Field2) != len(that1.Field2) { + return false + } + for i := range this.Field2 { + if this.Field2[i] != that1.Field2[i] { + return false + } + } + if len(this.Field3) != len(that1.Field3) { + return false + } + for i := range this.Field3 { + if this.Field3[i] != that1.Field3[i] { + return false + } + } + if len(this.Field4) != len(that1.Field4) { + return false + } + for i := range this.Field4 { + if this.Field4[i] != that1.Field4[i] { + return false + } + } + if len(this.Field5) != len(that1.Field5) { + return false + } + for i := range this.Field5 { + if this.Field5[i] != that1.Field5[i] { + return false + } + } + if len(this.Field6) != len(that1.Field6) { + return false + } + for i := range this.Field6 { + if this.Field6[i] != that1.Field6[i] { + return false + } + } + if len(this.Field7) != len(that1.Field7) { + return false + } + for i := range this.Field7 { + if this.Field7[i] != that1.Field7[i] { + return false + } + } + if len(this.Field8) != len(that1.Field8) { + return false + } + for i := range this.Field8 { + if this.Field8[i] != that1.Field8[i] { + return false + } + } + if len(this.Field9) != len(that1.Field9) { + return false + } + for i := range this.Field9 { + if this.Field9[i] != that1.Field9[i] { + return false + } + } + if len(this.Field10) != len(that1.Field10) { + return false + } + for i := range this.Field10 { + if this.Field10[i] != that1.Field10[i] { + return false + } + } + if len(this.Field11) != len(that1.Field11) { + return false + } + for i := range this.Field11 { + if this.Field11[i] != that1.Field11[i] { + return false + } + } + if len(this.Field12) != len(that1.Field12) { + return false + } + for i := range this.Field12 { + if this.Field12[i] != that1.Field12[i] { + return false + } + } + if len(this.Field13) != len(that1.Field13) { + return false + } + for i := range this.Field13 { + if this.Field13[i] != that1.Field13[i] { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NinRepPackedNative) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NinRepPackedNative) + if !ok { + that2, ok := that.(NinRepPackedNative) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NinRepPackedNative") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NinRepPackedNative but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NinRepPackedNative but is not nil && this == nil") + } + if len(this.Field1) != len(that1.Field1) { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", len(this.Field1), len(that1.Field1)) + } + for i := range this.Field1 { + if this.Field1[i] != that1.Field1[i] { + return fmt.Errorf("Field1 this[%v](%v) Not Equal that[%v](%v)", i, this.Field1[i], i, that1.Field1[i]) + } + } + if len(this.Field2) != len(that1.Field2) { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", len(this.Field2), len(that1.Field2)) + } + for i := range this.Field2 { + if this.Field2[i] != that1.Field2[i] { + return fmt.Errorf("Field2 this[%v](%v) Not Equal that[%v](%v)", i, this.Field2[i], i, that1.Field2[i]) + } + } + if len(this.Field3) != len(that1.Field3) { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", len(this.Field3), len(that1.Field3)) + } + for i := range this.Field3 { + if this.Field3[i] != that1.Field3[i] { + return fmt.Errorf("Field3 this[%v](%v) Not Equal that[%v](%v)", i, this.Field3[i], i, that1.Field3[i]) + } + } + if len(this.Field4) != len(that1.Field4) { + return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", len(this.Field4), len(that1.Field4)) + } + for i := range this.Field4 { + if this.Field4[i] != that1.Field4[i] { + return fmt.Errorf("Field4 this[%v](%v) Not Equal that[%v](%v)", i, this.Field4[i], i, that1.Field4[i]) + } + } + if len(this.Field5) != len(that1.Field5) { + return fmt.Errorf("Field5 this(%v) Not Equal that(%v)", len(this.Field5), len(that1.Field5)) + } + for i := range this.Field5 { + if this.Field5[i] != that1.Field5[i] { + return fmt.Errorf("Field5 this[%v](%v) Not Equal that[%v](%v)", i, this.Field5[i], i, that1.Field5[i]) + } + } + if len(this.Field6) != len(that1.Field6) { + return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", len(this.Field6), len(that1.Field6)) + } + for i := range this.Field6 { + if this.Field6[i] != that1.Field6[i] { + return fmt.Errorf("Field6 this[%v](%v) Not Equal that[%v](%v)", i, this.Field6[i], i, that1.Field6[i]) + } + } + if len(this.Field7) != len(that1.Field7) { + return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", len(this.Field7), len(that1.Field7)) + } + for i := range this.Field7 { + if this.Field7[i] != that1.Field7[i] { + return fmt.Errorf("Field7 this[%v](%v) Not Equal that[%v](%v)", i, this.Field7[i], i, that1.Field7[i]) + } + } + if len(this.Field8) != len(that1.Field8) { + return fmt.Errorf("Field8 this(%v) Not Equal that(%v)", len(this.Field8), len(that1.Field8)) + } + for i := range this.Field8 { + if this.Field8[i] != that1.Field8[i] { + return fmt.Errorf("Field8 this[%v](%v) Not Equal that[%v](%v)", i, this.Field8[i], i, that1.Field8[i]) + } + } + if len(this.Field9) != len(that1.Field9) { + return fmt.Errorf("Field9 this(%v) Not Equal that(%v)", len(this.Field9), len(that1.Field9)) + } + for i := range this.Field9 { + if this.Field9[i] != that1.Field9[i] { + return fmt.Errorf("Field9 this[%v](%v) Not Equal that[%v](%v)", i, this.Field9[i], i, that1.Field9[i]) + } + } + if len(this.Field10) != len(that1.Field10) { + return fmt.Errorf("Field10 this(%v) Not Equal that(%v)", len(this.Field10), len(that1.Field10)) + } + for i := range this.Field10 { + if this.Field10[i] != that1.Field10[i] { + return fmt.Errorf("Field10 this[%v](%v) Not Equal that[%v](%v)", i, this.Field10[i], i, that1.Field10[i]) + } + } + if len(this.Field11) != len(that1.Field11) { + return fmt.Errorf("Field11 this(%v) Not Equal that(%v)", len(this.Field11), len(that1.Field11)) + } + for i := range this.Field11 { + if this.Field11[i] != that1.Field11[i] { + return fmt.Errorf("Field11 this[%v](%v) Not Equal that[%v](%v)", i, this.Field11[i], i, that1.Field11[i]) + } + } + if len(this.Field12) != len(that1.Field12) { + return fmt.Errorf("Field12 this(%v) Not Equal that(%v)", len(this.Field12), len(that1.Field12)) + } + for i := range this.Field12 { + if this.Field12[i] != that1.Field12[i] { + return fmt.Errorf("Field12 this[%v](%v) Not Equal that[%v](%v)", i, this.Field12[i], i, that1.Field12[i]) + } + } + if len(this.Field13) != len(that1.Field13) { + return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", len(this.Field13), len(that1.Field13)) + } + for i := range this.Field13 { + if this.Field13[i] != that1.Field13[i] { + return fmt.Errorf("Field13 this[%v](%v) Not Equal that[%v](%v)", i, this.Field13[i], i, that1.Field13[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NinRepPackedNative) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*NinRepPackedNative) + if !ok { + that2, ok := that.(NinRepPackedNative) + 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.Field1) != len(that1.Field1) { + return false + } + for i := range this.Field1 { + if this.Field1[i] != that1.Field1[i] { + return false + } + } + if len(this.Field2) != len(that1.Field2) { + return false + } + for i := range this.Field2 { + if this.Field2[i] != that1.Field2[i] { + return false + } + } + if len(this.Field3) != len(that1.Field3) { + return false + } + for i := range this.Field3 { + if this.Field3[i] != that1.Field3[i] { + return false + } + } + if len(this.Field4) != len(that1.Field4) { + return false + } + for i := range this.Field4 { + if this.Field4[i] != that1.Field4[i] { + return false + } + } + if len(this.Field5) != len(that1.Field5) { + return false + } + for i := range this.Field5 { + if this.Field5[i] != that1.Field5[i] { + return false + } + } + if len(this.Field6) != len(that1.Field6) { + return false + } + for i := range this.Field6 { + if this.Field6[i] != that1.Field6[i] { + return false + } + } + if len(this.Field7) != len(that1.Field7) { + return false + } + for i := range this.Field7 { + if this.Field7[i] != that1.Field7[i] { + return false + } + } + if len(this.Field8) != len(that1.Field8) { + return false + } + for i := range this.Field8 { + if this.Field8[i] != that1.Field8[i] { + return false + } + } + if len(this.Field9) != len(that1.Field9) { + return false + } + for i := range this.Field9 { + if this.Field9[i] != that1.Field9[i] { + return false + } + } + if len(this.Field10) != len(that1.Field10) { + return false + } + for i := range this.Field10 { + if this.Field10[i] != that1.Field10[i] { + return false + } + } + if len(this.Field11) != len(that1.Field11) { + return false + } + for i := range this.Field11 { + if this.Field11[i] != that1.Field11[i] { + return false + } + } + if len(this.Field12) != len(that1.Field12) { + return false + } + for i := range this.Field12 { + if this.Field12[i] != that1.Field12[i] { + return false + } + } + if len(this.Field13) != len(that1.Field13) { + return false + } + for i := range this.Field13 { + if this.Field13[i] != that1.Field13[i] { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NidOptStruct) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NidOptStruct) + if !ok { + that2, ok := that.(NidOptStruct) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NidOptStruct") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NidOptStruct but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NidOptStruct but is not nil && this == nil") + } + if this.Field1 != that1.Field1 { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) + } + if this.Field2 != that1.Field2 { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) + } + if !this.Field3.Equal(&that1.Field3) { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", this.Field3, that1.Field3) + } + if !this.Field4.Equal(&that1.Field4) { + return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", this.Field4, that1.Field4) + } + if this.Field6 != that1.Field6 { + return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", this.Field6, that1.Field6) + } + if this.Field7 != that1.Field7 { + return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", this.Field7, that1.Field7) + } + if !this.Field8.Equal(&that1.Field8) { + return fmt.Errorf("Field8 this(%v) Not Equal that(%v)", this.Field8, that1.Field8) + } + if this.Field13 != that1.Field13 { + return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", this.Field13, that1.Field13) + } + if this.Field14 != that1.Field14 { + return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", this.Field14, that1.Field14) + } + if !bytes.Equal(this.Field15, that1.Field15) { + return fmt.Errorf("Field15 this(%v) Not Equal that(%v)", this.Field15, that1.Field15) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NidOptStruct) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*NidOptStruct) + if !ok { + that2, ok := that.(NidOptStruct) + 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.Field1 != that1.Field1 { + return false + } + if this.Field2 != that1.Field2 { + return false + } + if !this.Field3.Equal(&that1.Field3) { + return false + } + if !this.Field4.Equal(&that1.Field4) { + return false + } + if this.Field6 != that1.Field6 { + return false + } + if this.Field7 != that1.Field7 { + return false + } + if !this.Field8.Equal(&that1.Field8) { + return false + } + if this.Field13 != that1.Field13 { + return false + } + if this.Field14 != that1.Field14 { + return false + } + if !bytes.Equal(this.Field15, that1.Field15) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NinOptStruct) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NinOptStruct) + if !ok { + that2, ok := that.(NinOptStruct) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NinOptStruct") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NinOptStruct but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NinOptStruct but is not nil && this == nil") + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) + } + } else if this.Field1 != nil { + return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") + } else if that1.Field1 != nil { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", *this.Field2, *that1.Field2) + } + } else if this.Field2 != nil { + return fmt.Errorf("this.Field2 == nil && that.Field2 != nil") + } else if that1.Field2 != nil { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) + } + if !this.Field3.Equal(that1.Field3) { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", this.Field3, that1.Field3) + } + if !this.Field4.Equal(that1.Field4) { + return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", this.Field4, that1.Field4) + } + if this.Field6 != nil && that1.Field6 != nil { + if *this.Field6 != *that1.Field6 { + return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", *this.Field6, *that1.Field6) + } + } else if this.Field6 != nil { + return fmt.Errorf("this.Field6 == nil && that.Field6 != nil") + } else if that1.Field6 != nil { + return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", this.Field6, that1.Field6) + } + if this.Field7 != nil && that1.Field7 != nil { + if *this.Field7 != *that1.Field7 { + return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", *this.Field7, *that1.Field7) + } + } else if this.Field7 != nil { + return fmt.Errorf("this.Field7 == nil && that.Field7 != nil") + } else if that1.Field7 != nil { + return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", this.Field7, that1.Field7) + } + if !this.Field8.Equal(that1.Field8) { + return fmt.Errorf("Field8 this(%v) Not Equal that(%v)", this.Field8, that1.Field8) + } + if this.Field13 != nil && that1.Field13 != nil { + if *this.Field13 != *that1.Field13 { + return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", *this.Field13, *that1.Field13) + } + } else if this.Field13 != nil { + return fmt.Errorf("this.Field13 == nil && that.Field13 != nil") + } else if that1.Field13 != nil { + return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", this.Field13, that1.Field13) + } + if this.Field14 != nil && that1.Field14 != nil { + if *this.Field14 != *that1.Field14 { + return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", *this.Field14, *that1.Field14) + } + } else if this.Field14 != nil { + return fmt.Errorf("this.Field14 == nil && that.Field14 != nil") + } else if that1.Field14 != nil { + return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", this.Field14, that1.Field14) + } + if !bytes.Equal(this.Field15, that1.Field15) { + return fmt.Errorf("Field15 this(%v) Not Equal that(%v)", this.Field15, that1.Field15) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NinOptStruct) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*NinOptStruct) + if !ok { + that2, ok := that.(NinOptStruct) + 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.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return false + } + } else if this.Field1 != nil { + return false + } else if that1.Field1 != nil { + return false + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + return false + } + } else if this.Field2 != nil { + return false + } else if that1.Field2 != nil { + return false + } + if !this.Field3.Equal(that1.Field3) { + return false + } + if !this.Field4.Equal(that1.Field4) { + return false + } + if this.Field6 != nil && that1.Field6 != nil { + if *this.Field6 != *that1.Field6 { + return false + } + } else if this.Field6 != nil { + return false + } else if that1.Field6 != nil { + return false + } + if this.Field7 != nil && that1.Field7 != nil { + if *this.Field7 != *that1.Field7 { + return false + } + } else if this.Field7 != nil { + return false + } else if that1.Field7 != nil { + return false + } + if !this.Field8.Equal(that1.Field8) { + return false + } + if this.Field13 != nil && that1.Field13 != nil { + if *this.Field13 != *that1.Field13 { + return false + } + } else if this.Field13 != nil { + return false + } else if that1.Field13 != nil { + return false + } + if this.Field14 != nil && that1.Field14 != nil { + if *this.Field14 != *that1.Field14 { + return false + } + } else if this.Field14 != nil { + return false + } else if that1.Field14 != nil { + return false + } + if !bytes.Equal(this.Field15, that1.Field15) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NidRepStruct) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NidRepStruct) + if !ok { + that2, ok := that.(NidRepStruct) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NidRepStruct") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NidRepStruct but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NidRepStruct but is not nil && this == nil") + } + if len(this.Field1) != len(that1.Field1) { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", len(this.Field1), len(that1.Field1)) + } + for i := range this.Field1 { + if this.Field1[i] != that1.Field1[i] { + return fmt.Errorf("Field1 this[%v](%v) Not Equal that[%v](%v)", i, this.Field1[i], i, that1.Field1[i]) + } + } + if len(this.Field2) != len(that1.Field2) { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", len(this.Field2), len(that1.Field2)) + } + for i := range this.Field2 { + if this.Field2[i] != that1.Field2[i] { + return fmt.Errorf("Field2 this[%v](%v) Not Equal that[%v](%v)", i, this.Field2[i], i, that1.Field2[i]) + } + } + if len(this.Field3) != len(that1.Field3) { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", len(this.Field3), len(that1.Field3)) + } + for i := range this.Field3 { + if !this.Field3[i].Equal(&that1.Field3[i]) { + return fmt.Errorf("Field3 this[%v](%v) Not Equal that[%v](%v)", i, this.Field3[i], i, that1.Field3[i]) + } + } + if len(this.Field4) != len(that1.Field4) { + return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", len(this.Field4), len(that1.Field4)) + } + for i := range this.Field4 { + if !this.Field4[i].Equal(&that1.Field4[i]) { + return fmt.Errorf("Field4 this[%v](%v) Not Equal that[%v](%v)", i, this.Field4[i], i, that1.Field4[i]) + } + } + if len(this.Field6) != len(that1.Field6) { + return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", len(this.Field6), len(that1.Field6)) + } + for i := range this.Field6 { + if this.Field6[i] != that1.Field6[i] { + return fmt.Errorf("Field6 this[%v](%v) Not Equal that[%v](%v)", i, this.Field6[i], i, that1.Field6[i]) + } + } + if len(this.Field7) != len(that1.Field7) { + return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", len(this.Field7), len(that1.Field7)) + } + for i := range this.Field7 { + if this.Field7[i] != that1.Field7[i] { + return fmt.Errorf("Field7 this[%v](%v) Not Equal that[%v](%v)", i, this.Field7[i], i, that1.Field7[i]) + } + } + if len(this.Field8) != len(that1.Field8) { + return fmt.Errorf("Field8 this(%v) Not Equal that(%v)", len(this.Field8), len(that1.Field8)) + } + for i := range this.Field8 { + if !this.Field8[i].Equal(&that1.Field8[i]) { + return fmt.Errorf("Field8 this[%v](%v) Not Equal that[%v](%v)", i, this.Field8[i], i, that1.Field8[i]) + } + } + if len(this.Field13) != len(that1.Field13) { + return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", len(this.Field13), len(that1.Field13)) + } + for i := range this.Field13 { + if this.Field13[i] != that1.Field13[i] { + return fmt.Errorf("Field13 this[%v](%v) Not Equal that[%v](%v)", i, this.Field13[i], i, that1.Field13[i]) + } + } + if len(this.Field14) != len(that1.Field14) { + return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", len(this.Field14), len(that1.Field14)) + } + for i := range this.Field14 { + if this.Field14[i] != that1.Field14[i] { + return fmt.Errorf("Field14 this[%v](%v) Not Equal that[%v](%v)", i, this.Field14[i], i, that1.Field14[i]) + } + } + if len(this.Field15) != len(that1.Field15) { + return fmt.Errorf("Field15 this(%v) Not Equal that(%v)", len(this.Field15), len(that1.Field15)) + } + for i := range this.Field15 { + if !bytes.Equal(this.Field15[i], that1.Field15[i]) { + return fmt.Errorf("Field15 this[%v](%v) Not Equal that[%v](%v)", i, this.Field15[i], i, that1.Field15[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NidRepStruct) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*NidRepStruct) + if !ok { + that2, ok := that.(NidRepStruct) + 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.Field1) != len(that1.Field1) { + return false + } + for i := range this.Field1 { + if this.Field1[i] != that1.Field1[i] { + return false + } + } + if len(this.Field2) != len(that1.Field2) { + return false + } + for i := range this.Field2 { + if this.Field2[i] != that1.Field2[i] { + return false + } + } + if len(this.Field3) != len(that1.Field3) { + return false + } + for i := range this.Field3 { + if !this.Field3[i].Equal(&that1.Field3[i]) { + return false + } + } + if len(this.Field4) != len(that1.Field4) { + return false + } + for i := range this.Field4 { + if !this.Field4[i].Equal(&that1.Field4[i]) { + return false + } + } + if len(this.Field6) != len(that1.Field6) { + return false + } + for i := range this.Field6 { + if this.Field6[i] != that1.Field6[i] { + return false + } + } + if len(this.Field7) != len(that1.Field7) { + return false + } + for i := range this.Field7 { + if this.Field7[i] != that1.Field7[i] { + return false + } + } + if len(this.Field8) != len(that1.Field8) { + return false + } + for i := range this.Field8 { + if !this.Field8[i].Equal(&that1.Field8[i]) { + return false + } + } + if len(this.Field13) != len(that1.Field13) { + return false + } + for i := range this.Field13 { + if this.Field13[i] != that1.Field13[i] { + return false + } + } + if len(this.Field14) != len(that1.Field14) { + return false + } + for i := range this.Field14 { + if this.Field14[i] != that1.Field14[i] { + return false + } + } + if len(this.Field15) != len(that1.Field15) { + return false + } + for i := range this.Field15 { + if !bytes.Equal(this.Field15[i], that1.Field15[i]) { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NinRepStruct) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NinRepStruct) + if !ok { + that2, ok := that.(NinRepStruct) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NinRepStruct") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NinRepStruct but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NinRepStruct but is not nil && this == nil") + } + if len(this.Field1) != len(that1.Field1) { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", len(this.Field1), len(that1.Field1)) + } + for i := range this.Field1 { + if this.Field1[i] != that1.Field1[i] { + return fmt.Errorf("Field1 this[%v](%v) Not Equal that[%v](%v)", i, this.Field1[i], i, that1.Field1[i]) + } + } + if len(this.Field2) != len(that1.Field2) { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", len(this.Field2), len(that1.Field2)) + } + for i := range this.Field2 { + if this.Field2[i] != that1.Field2[i] { + return fmt.Errorf("Field2 this[%v](%v) Not Equal that[%v](%v)", i, this.Field2[i], i, that1.Field2[i]) + } + } + if len(this.Field3) != len(that1.Field3) { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", len(this.Field3), len(that1.Field3)) + } + for i := range this.Field3 { + if !this.Field3[i].Equal(that1.Field3[i]) { + return fmt.Errorf("Field3 this[%v](%v) Not Equal that[%v](%v)", i, this.Field3[i], i, that1.Field3[i]) + } + } + if len(this.Field4) != len(that1.Field4) { + return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", len(this.Field4), len(that1.Field4)) + } + for i := range this.Field4 { + if !this.Field4[i].Equal(that1.Field4[i]) { + return fmt.Errorf("Field4 this[%v](%v) Not Equal that[%v](%v)", i, this.Field4[i], i, that1.Field4[i]) + } + } + if len(this.Field6) != len(that1.Field6) { + return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", len(this.Field6), len(that1.Field6)) + } + for i := range this.Field6 { + if this.Field6[i] != that1.Field6[i] { + return fmt.Errorf("Field6 this[%v](%v) Not Equal that[%v](%v)", i, this.Field6[i], i, that1.Field6[i]) + } + } + if len(this.Field7) != len(that1.Field7) { + return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", len(this.Field7), len(that1.Field7)) + } + for i := range this.Field7 { + if this.Field7[i] != that1.Field7[i] { + return fmt.Errorf("Field7 this[%v](%v) Not Equal that[%v](%v)", i, this.Field7[i], i, that1.Field7[i]) + } + } + if len(this.Field8) != len(that1.Field8) { + return fmt.Errorf("Field8 this(%v) Not Equal that(%v)", len(this.Field8), len(that1.Field8)) + } + for i := range this.Field8 { + if !this.Field8[i].Equal(that1.Field8[i]) { + return fmt.Errorf("Field8 this[%v](%v) Not Equal that[%v](%v)", i, this.Field8[i], i, that1.Field8[i]) + } + } + if len(this.Field13) != len(that1.Field13) { + return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", len(this.Field13), len(that1.Field13)) + } + for i := range this.Field13 { + if this.Field13[i] != that1.Field13[i] { + return fmt.Errorf("Field13 this[%v](%v) Not Equal that[%v](%v)", i, this.Field13[i], i, that1.Field13[i]) + } + } + if len(this.Field14) != len(that1.Field14) { + return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", len(this.Field14), len(that1.Field14)) + } + for i := range this.Field14 { + if this.Field14[i] != that1.Field14[i] { + return fmt.Errorf("Field14 this[%v](%v) Not Equal that[%v](%v)", i, this.Field14[i], i, that1.Field14[i]) + } + } + if len(this.Field15) != len(that1.Field15) { + return fmt.Errorf("Field15 this(%v) Not Equal that(%v)", len(this.Field15), len(that1.Field15)) + } + for i := range this.Field15 { + if !bytes.Equal(this.Field15[i], that1.Field15[i]) { + return fmt.Errorf("Field15 this[%v](%v) Not Equal that[%v](%v)", i, this.Field15[i], i, that1.Field15[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NinRepStruct) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*NinRepStruct) + if !ok { + that2, ok := that.(NinRepStruct) + 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.Field1) != len(that1.Field1) { + return false + } + for i := range this.Field1 { + if this.Field1[i] != that1.Field1[i] { + return false + } + } + if len(this.Field2) != len(that1.Field2) { + return false + } + for i := range this.Field2 { + if this.Field2[i] != that1.Field2[i] { + return false + } + } + if len(this.Field3) != len(that1.Field3) { + return false + } + for i := range this.Field3 { + if !this.Field3[i].Equal(that1.Field3[i]) { + return false + } + } + if len(this.Field4) != len(that1.Field4) { + return false + } + for i := range this.Field4 { + if !this.Field4[i].Equal(that1.Field4[i]) { + return false + } + } + if len(this.Field6) != len(that1.Field6) { + return false + } + for i := range this.Field6 { + if this.Field6[i] != that1.Field6[i] { + return false + } + } + if len(this.Field7) != len(that1.Field7) { + return false + } + for i := range this.Field7 { + if this.Field7[i] != that1.Field7[i] { + return false + } + } + if len(this.Field8) != len(that1.Field8) { + return false + } + for i := range this.Field8 { + if !this.Field8[i].Equal(that1.Field8[i]) { + return false + } + } + if len(this.Field13) != len(that1.Field13) { + return false + } + for i := range this.Field13 { + if this.Field13[i] != that1.Field13[i] { + return false + } + } + if len(this.Field14) != len(that1.Field14) { + return false + } + for i := range this.Field14 { + if this.Field14[i] != that1.Field14[i] { + return false + } + } + if len(this.Field15) != len(that1.Field15) { + return false + } + for i := range this.Field15 { + if !bytes.Equal(this.Field15[i], that1.Field15[i]) { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NidEmbeddedStruct) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NidEmbeddedStruct) + if !ok { + that2, ok := that.(NidEmbeddedStruct) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NidEmbeddedStruct") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NidEmbeddedStruct but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NidEmbeddedStruct but is not nil && this == nil") + } + if !this.NidOptNative.Equal(that1.NidOptNative) { + return fmt.Errorf("NidOptNative this(%v) Not Equal that(%v)", this.NidOptNative, that1.NidOptNative) + } + if !this.Field200.Equal(&that1.Field200) { + return fmt.Errorf("Field200 this(%v) Not Equal that(%v)", this.Field200, that1.Field200) + } + if this.Field210 != that1.Field210 { + return fmt.Errorf("Field210 this(%v) Not Equal that(%v)", this.Field210, that1.Field210) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NidEmbeddedStruct) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*NidEmbeddedStruct) + if !ok { + that2, ok := that.(NidEmbeddedStruct) + 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.NidOptNative.Equal(that1.NidOptNative) { + return false + } + if !this.Field200.Equal(&that1.Field200) { + return false + } + if this.Field210 != that1.Field210 { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NinEmbeddedStruct) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NinEmbeddedStruct) + if !ok { + that2, ok := that.(NinEmbeddedStruct) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NinEmbeddedStruct") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NinEmbeddedStruct but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NinEmbeddedStruct but is not nil && this == nil") + } + if !this.NidOptNative.Equal(that1.NidOptNative) { + return fmt.Errorf("NidOptNative this(%v) Not Equal that(%v)", this.NidOptNative, that1.NidOptNative) + } + if !this.Field200.Equal(that1.Field200) { + return fmt.Errorf("Field200 this(%v) Not Equal that(%v)", this.Field200, that1.Field200) + } + if this.Field210 != nil && that1.Field210 != nil { + if *this.Field210 != *that1.Field210 { + return fmt.Errorf("Field210 this(%v) Not Equal that(%v)", *this.Field210, *that1.Field210) + } + } else if this.Field210 != nil { + return fmt.Errorf("this.Field210 == nil && that.Field210 != nil") + } else if that1.Field210 != nil { + return fmt.Errorf("Field210 this(%v) Not Equal that(%v)", this.Field210, that1.Field210) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NinEmbeddedStruct) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*NinEmbeddedStruct) + if !ok { + that2, ok := that.(NinEmbeddedStruct) + 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.NidOptNative.Equal(that1.NidOptNative) { + return false + } + if !this.Field200.Equal(that1.Field200) { + return false + } + if this.Field210 != nil && that1.Field210 != nil { + if *this.Field210 != *that1.Field210 { + return false + } + } else if this.Field210 != nil { + return false + } else if that1.Field210 != nil { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NidNestedStruct) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NidNestedStruct) + if !ok { + that2, ok := that.(NidNestedStruct) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NidNestedStruct") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NidNestedStruct but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NidNestedStruct but is not nil && this == nil") + } + if !this.Field1.Equal(&that1.Field1) { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) + } + if len(this.Field2) != len(that1.Field2) { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", len(this.Field2), len(that1.Field2)) + } + for i := range this.Field2 { + if !this.Field2[i].Equal(&that1.Field2[i]) { + return fmt.Errorf("Field2 this[%v](%v) Not Equal that[%v](%v)", i, this.Field2[i], i, that1.Field2[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NidNestedStruct) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*NidNestedStruct) + if !ok { + that2, ok := that.(NidNestedStruct) + 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.Field1.Equal(&that1.Field1) { + return false + } + if len(this.Field2) != len(that1.Field2) { + return false + } + for i := range this.Field2 { + if !this.Field2[i].Equal(&that1.Field2[i]) { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NinNestedStruct) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NinNestedStruct) + if !ok { + that2, ok := that.(NinNestedStruct) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NinNestedStruct") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NinNestedStruct but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NinNestedStruct but is not nil && this == nil") + } + if !this.Field1.Equal(that1.Field1) { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) + } + if len(this.Field2) != len(that1.Field2) { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", len(this.Field2), len(that1.Field2)) + } + for i := range this.Field2 { + if !this.Field2[i].Equal(that1.Field2[i]) { + return fmt.Errorf("Field2 this[%v](%v) Not Equal that[%v](%v)", i, this.Field2[i], i, that1.Field2[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NinNestedStruct) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*NinNestedStruct) + if !ok { + that2, ok := that.(NinNestedStruct) + 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.Field1.Equal(that1.Field1) { + return false + } + if len(this.Field2) != len(that1.Field2) { + return false + } + for i := range this.Field2 { + if !this.Field2[i].Equal(that1.Field2[i]) { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NidOptCustom) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NidOptCustom) + if !ok { + that2, ok := that.(NidOptCustom) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NidOptCustom") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NidOptCustom but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NidOptCustom 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.Value.Equal(that1.Value) { + return fmt.Errorf("Value this(%v) Not Equal that(%v)", this.Value, that1.Value) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NidOptCustom) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*NidOptCustom) + if !ok { + that2, ok := that.(NidOptCustom) + 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.Value.Equal(that1.Value) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *CustomDash) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*CustomDash) + if !ok { + that2, ok := that.(CustomDash) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *CustomDash") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *CustomDash but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *CustomDash but is not nil && this == nil") + } + if that1.Value == nil { + if this.Value != nil { + return fmt.Errorf("this.Value != nil && that1.Value == nil") + } + } else if !this.Value.Equal(*that1.Value) { + return fmt.Errorf("Value this(%v) Not Equal that(%v)", this.Value, that1.Value) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *CustomDash) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*CustomDash) + if !ok { + that2, ok := that.(CustomDash) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + if this == nil { + return true + } + return false + } else if this == nil { + return false + } + if that1.Value == nil { + if this.Value != nil { + return false + } + } else if !this.Value.Equal(*that1.Value) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NinOptCustom) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NinOptCustom) + if !ok { + that2, ok := that.(NinOptCustom) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NinOptCustom") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NinOptCustom but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NinOptCustom but is not nil && this == nil") + } + if that1.Id == nil { + if this.Id != nil { + return fmt.Errorf("this.Id != nil && that1.Id == nil") + } + } else if !this.Id.Equal(*that1.Id) { + return fmt.Errorf("Id this(%v) Not Equal that(%v)", this.Id, that1.Id) + } + if that1.Value == nil { + if this.Value != nil { + return fmt.Errorf("this.Value != nil && that1.Value == nil") + } + } else if !this.Value.Equal(*that1.Value) { + return fmt.Errorf("Value this(%v) Not Equal that(%v)", this.Value, that1.Value) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NinOptCustom) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*NinOptCustom) + if !ok { + that2, ok := that.(NinOptCustom) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + if this == nil { + return true + } + return false + } else if this == nil { + return false + } + if that1.Id == nil { + if this.Id != nil { + return false + } + } else if !this.Id.Equal(*that1.Id) { + return false + } + if that1.Value == nil { + if this.Value != nil { + return false + } + } else if !this.Value.Equal(*that1.Value) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NidRepCustom) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NidRepCustom) + if !ok { + that2, ok := that.(NidRepCustom) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NidRepCustom") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NidRepCustom but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NidRepCustom but is not nil && this == nil") + } + if len(this.Id) != len(that1.Id) { + return fmt.Errorf("Id this(%v) Not Equal that(%v)", len(this.Id), len(that1.Id)) + } + for i := range this.Id { + if !this.Id[i].Equal(that1.Id[i]) { + return fmt.Errorf("Id this[%v](%v) Not Equal that[%v](%v)", i, this.Id[i], i, that1.Id[i]) + } + } + if len(this.Value) != len(that1.Value) { + return fmt.Errorf("Value this(%v) Not Equal that(%v)", len(this.Value), len(that1.Value)) + } + for i := range this.Value { + if !this.Value[i].Equal(that1.Value[i]) { + return fmt.Errorf("Value this[%v](%v) Not Equal that[%v](%v)", i, this.Value[i], i, that1.Value[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NidRepCustom) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*NidRepCustom) + if !ok { + that2, ok := that.(NidRepCustom) + 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.Id) != len(that1.Id) { + return false + } + for i := range this.Id { + if !this.Id[i].Equal(that1.Id[i]) { + return false + } + } + if len(this.Value) != len(that1.Value) { + return false + } + for i := range this.Value { + if !this.Value[i].Equal(that1.Value[i]) { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NinRepCustom) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NinRepCustom) + if !ok { + that2, ok := that.(NinRepCustom) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NinRepCustom") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NinRepCustom but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NinRepCustom but is not nil && this == nil") + } + if len(this.Id) != len(that1.Id) { + return fmt.Errorf("Id this(%v) Not Equal that(%v)", len(this.Id), len(that1.Id)) + } + for i := range this.Id { + if !this.Id[i].Equal(that1.Id[i]) { + return fmt.Errorf("Id this[%v](%v) Not Equal that[%v](%v)", i, this.Id[i], i, that1.Id[i]) + } + } + if len(this.Value) != len(that1.Value) { + return fmt.Errorf("Value this(%v) Not Equal that(%v)", len(this.Value), len(that1.Value)) + } + for i := range this.Value { + if !this.Value[i].Equal(that1.Value[i]) { + return fmt.Errorf("Value this[%v](%v) Not Equal that[%v](%v)", i, this.Value[i], i, that1.Value[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NinRepCustom) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*NinRepCustom) + if !ok { + that2, ok := that.(NinRepCustom) + 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.Id) != len(that1.Id) { + return false + } + for i := range this.Id { + if !this.Id[i].Equal(that1.Id[i]) { + return false + } + } + if len(this.Value) != len(that1.Value) { + return false + } + for i := range this.Value { + if !this.Value[i].Equal(that1.Value[i]) { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NinOptNativeUnion) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NinOptNativeUnion) + if !ok { + that2, ok := that.(NinOptNativeUnion) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NinOptNativeUnion") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NinOptNativeUnion but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NinOptNativeUnion but is not nil && this == nil") + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) + } + } else if this.Field1 != nil { + return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") + } else if that1.Field1 != nil { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", *this.Field2, *that1.Field2) + } + } else if this.Field2 != nil { + return fmt.Errorf("this.Field2 == nil && that.Field2 != nil") + } else if that1.Field2 != nil { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) + } + if this.Field3 != nil && that1.Field3 != nil { + if *this.Field3 != *that1.Field3 { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", *this.Field3, *that1.Field3) + } + } else if this.Field3 != nil { + return fmt.Errorf("this.Field3 == nil && that.Field3 != nil") + } else if that1.Field3 != nil { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", this.Field3, that1.Field3) + } + if this.Field4 != nil && that1.Field4 != nil { + if *this.Field4 != *that1.Field4 { + return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", *this.Field4, *that1.Field4) + } + } else if this.Field4 != nil { + return fmt.Errorf("this.Field4 == nil && that.Field4 != nil") + } else if that1.Field4 != nil { + return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", this.Field4, that1.Field4) + } + if this.Field5 != nil && that1.Field5 != nil { + if *this.Field5 != *that1.Field5 { + return fmt.Errorf("Field5 this(%v) Not Equal that(%v)", *this.Field5, *that1.Field5) + } + } else if this.Field5 != nil { + return fmt.Errorf("this.Field5 == nil && that.Field5 != nil") + } else if that1.Field5 != nil { + return fmt.Errorf("Field5 this(%v) Not Equal that(%v)", this.Field5, that1.Field5) + } + if this.Field6 != nil && that1.Field6 != nil { + if *this.Field6 != *that1.Field6 { + return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", *this.Field6, *that1.Field6) + } + } else if this.Field6 != nil { + return fmt.Errorf("this.Field6 == nil && that.Field6 != nil") + } else if that1.Field6 != nil { + return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", this.Field6, that1.Field6) + } + if this.Field13 != nil && that1.Field13 != nil { + if *this.Field13 != *that1.Field13 { + return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", *this.Field13, *that1.Field13) + } + } else if this.Field13 != nil { + return fmt.Errorf("this.Field13 == nil && that.Field13 != nil") + } else if that1.Field13 != nil { + return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", this.Field13, that1.Field13) + } + if this.Field14 != nil && that1.Field14 != nil { + if *this.Field14 != *that1.Field14 { + return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", *this.Field14, *that1.Field14) + } + } else if this.Field14 != nil { + return fmt.Errorf("this.Field14 == nil && that.Field14 != nil") + } else if that1.Field14 != nil { + return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", this.Field14, that1.Field14) + } + if !bytes.Equal(this.Field15, that1.Field15) { + return fmt.Errorf("Field15 this(%v) Not Equal that(%v)", this.Field15, that1.Field15) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NinOptNativeUnion) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*NinOptNativeUnion) + if !ok { + that2, ok := that.(NinOptNativeUnion) + 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.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return false + } + } else if this.Field1 != nil { + return false + } else if that1.Field1 != nil { + return false + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + return false + } + } else if this.Field2 != nil { + return false + } else if that1.Field2 != nil { + return false + } + if this.Field3 != nil && that1.Field3 != nil { + if *this.Field3 != *that1.Field3 { + return false + } + } else if this.Field3 != nil { + return false + } else if that1.Field3 != nil { + return false + } + if this.Field4 != nil && that1.Field4 != nil { + if *this.Field4 != *that1.Field4 { + return false + } + } else if this.Field4 != nil { + return false + } else if that1.Field4 != nil { + return false + } + if this.Field5 != nil && that1.Field5 != nil { + if *this.Field5 != *that1.Field5 { + return false + } + } else if this.Field5 != nil { + return false + } else if that1.Field5 != nil { + return false + } + if this.Field6 != nil && that1.Field6 != nil { + if *this.Field6 != *that1.Field6 { + return false + } + } else if this.Field6 != nil { + return false + } else if that1.Field6 != nil { + return false + } + if this.Field13 != nil && that1.Field13 != nil { + if *this.Field13 != *that1.Field13 { + return false + } + } else if this.Field13 != nil { + return false + } else if that1.Field13 != nil { + return false + } + if this.Field14 != nil && that1.Field14 != nil { + if *this.Field14 != *that1.Field14 { + return false + } + } else if this.Field14 != nil { + return false + } else if that1.Field14 != nil { + return false + } + if !bytes.Equal(this.Field15, that1.Field15) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NinOptStructUnion) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NinOptStructUnion) + if !ok { + that2, ok := that.(NinOptStructUnion) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NinOptStructUnion") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NinOptStructUnion but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NinOptStructUnion but is not nil && this == nil") + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) + } + } else if this.Field1 != nil { + return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") + } else if that1.Field1 != nil { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", *this.Field2, *that1.Field2) + } + } else if this.Field2 != nil { + return fmt.Errorf("this.Field2 == nil && that.Field2 != nil") + } else if that1.Field2 != nil { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) + } + if !this.Field3.Equal(that1.Field3) { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", this.Field3, that1.Field3) + } + if !this.Field4.Equal(that1.Field4) { + return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", this.Field4, that1.Field4) + } + if this.Field6 != nil && that1.Field6 != nil { + if *this.Field6 != *that1.Field6 { + return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", *this.Field6, *that1.Field6) + } + } else if this.Field6 != nil { + return fmt.Errorf("this.Field6 == nil && that.Field6 != nil") + } else if that1.Field6 != nil { + return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", this.Field6, that1.Field6) + } + if this.Field7 != nil && that1.Field7 != nil { + if *this.Field7 != *that1.Field7 { + return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", *this.Field7, *that1.Field7) + } + } else if this.Field7 != nil { + return fmt.Errorf("this.Field7 == nil && that.Field7 != nil") + } else if that1.Field7 != nil { + return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", this.Field7, that1.Field7) + } + if this.Field13 != nil && that1.Field13 != nil { + if *this.Field13 != *that1.Field13 { + return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", *this.Field13, *that1.Field13) + } + } else if this.Field13 != nil { + return fmt.Errorf("this.Field13 == nil && that.Field13 != nil") + } else if that1.Field13 != nil { + return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", this.Field13, that1.Field13) + } + if this.Field14 != nil && that1.Field14 != nil { + if *this.Field14 != *that1.Field14 { + return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", *this.Field14, *that1.Field14) + } + } else if this.Field14 != nil { + return fmt.Errorf("this.Field14 == nil && that.Field14 != nil") + } else if that1.Field14 != nil { + return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", this.Field14, that1.Field14) + } + if !bytes.Equal(this.Field15, that1.Field15) { + return fmt.Errorf("Field15 this(%v) Not Equal that(%v)", this.Field15, that1.Field15) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NinOptStructUnion) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*NinOptStructUnion) + if !ok { + that2, ok := that.(NinOptStructUnion) + 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.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return false + } + } else if this.Field1 != nil { + return false + } else if that1.Field1 != nil { + return false + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + return false + } + } else if this.Field2 != nil { + return false + } else if that1.Field2 != nil { + return false + } + if !this.Field3.Equal(that1.Field3) { + return false + } + if !this.Field4.Equal(that1.Field4) { + return false + } + if this.Field6 != nil && that1.Field6 != nil { + if *this.Field6 != *that1.Field6 { + return false + } + } else if this.Field6 != nil { + return false + } else if that1.Field6 != nil { + return false + } + if this.Field7 != nil && that1.Field7 != nil { + if *this.Field7 != *that1.Field7 { + return false + } + } else if this.Field7 != nil { + return false + } else if that1.Field7 != nil { + return false + } + if this.Field13 != nil && that1.Field13 != nil { + if *this.Field13 != *that1.Field13 { + return false + } + } else if this.Field13 != nil { + return false + } else if that1.Field13 != nil { + return false + } + if this.Field14 != nil && that1.Field14 != nil { + if *this.Field14 != *that1.Field14 { + return false + } + } else if this.Field14 != nil { + return false + } else if that1.Field14 != nil { + return false + } + if !bytes.Equal(this.Field15, that1.Field15) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NinEmbeddedStructUnion) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NinEmbeddedStructUnion) + if !ok { + that2, ok := that.(NinEmbeddedStructUnion) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NinEmbeddedStructUnion") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NinEmbeddedStructUnion but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NinEmbeddedStructUnion but is not nil && this == nil") + } + if !this.NidOptNative.Equal(that1.NidOptNative) { + return fmt.Errorf("NidOptNative this(%v) Not Equal that(%v)", this.NidOptNative, that1.NidOptNative) + } + if !this.Field200.Equal(that1.Field200) { + return fmt.Errorf("Field200 this(%v) Not Equal that(%v)", this.Field200, that1.Field200) + } + if this.Field210 != nil && that1.Field210 != nil { + if *this.Field210 != *that1.Field210 { + return fmt.Errorf("Field210 this(%v) Not Equal that(%v)", *this.Field210, *that1.Field210) + } + } else if this.Field210 != nil { + return fmt.Errorf("this.Field210 == nil && that.Field210 != nil") + } else if that1.Field210 != nil { + return fmt.Errorf("Field210 this(%v) Not Equal that(%v)", this.Field210, that1.Field210) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NinEmbeddedStructUnion) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*NinEmbeddedStructUnion) + if !ok { + that2, ok := that.(NinEmbeddedStructUnion) + 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.NidOptNative.Equal(that1.NidOptNative) { + return false + } + if !this.Field200.Equal(that1.Field200) { + return false + } + if this.Field210 != nil && that1.Field210 != nil { + if *this.Field210 != *that1.Field210 { + return false + } + } else if this.Field210 != nil { + return false + } else if that1.Field210 != nil { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NinNestedStructUnion) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NinNestedStructUnion) + if !ok { + that2, ok := that.(NinNestedStructUnion) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NinNestedStructUnion") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NinNestedStructUnion but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NinNestedStructUnion but is not nil && this == nil") + } + if !this.Field1.Equal(that1.Field1) { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) + } + if !this.Field2.Equal(that1.Field2) { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) + } + if !this.Field3.Equal(that1.Field3) { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", this.Field3, that1.Field3) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NinNestedStructUnion) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*NinNestedStructUnion) + if !ok { + that2, ok := that.(NinNestedStructUnion) + 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.Field1.Equal(that1.Field1) { + return false + } + if !this.Field2.Equal(that1.Field2) { + return false + } + if !this.Field3.Equal(that1.Field3) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *Tree) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*Tree) + if !ok { + that2, ok := that.(Tree) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *Tree") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *Tree but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *Tree but is not nil && this == nil") + } + if !this.Or.Equal(that1.Or) { + return fmt.Errorf("Or this(%v) Not Equal that(%v)", this.Or, that1.Or) + } + if !this.And.Equal(that1.And) { + return fmt.Errorf("And this(%v) Not Equal that(%v)", this.And, that1.And) + } + if !this.Leaf.Equal(that1.Leaf) { + return fmt.Errorf("Leaf this(%v) Not Equal that(%v)", this.Leaf, that1.Leaf) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *Tree) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*Tree) + if !ok { + that2, ok := that.(Tree) + 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.Or.Equal(that1.Or) { + return false + } + if !this.And.Equal(that1.And) { + return false + } + if !this.Leaf.Equal(that1.Leaf) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *OrBranch) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*OrBranch) + if !ok { + that2, ok := that.(OrBranch) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *OrBranch") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *OrBranch but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *OrBranch but is not nil && this == nil") + } + if !this.Left.Equal(&that1.Left) { + return fmt.Errorf("Left this(%v) Not Equal that(%v)", this.Left, that1.Left) + } + if !this.Right.Equal(&that1.Right) { + return fmt.Errorf("Right this(%v) Not Equal that(%v)", this.Right, that1.Right) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *OrBranch) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*OrBranch) + if !ok { + that2, ok := that.(OrBranch) + 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.Left.Equal(&that1.Left) { + return false + } + if !this.Right.Equal(&that1.Right) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *AndBranch) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*AndBranch) + if !ok { + that2, ok := that.(AndBranch) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *AndBranch") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *AndBranch but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *AndBranch but is not nil && this == nil") + } + if !this.Left.Equal(&that1.Left) { + return fmt.Errorf("Left this(%v) Not Equal that(%v)", this.Left, that1.Left) + } + if !this.Right.Equal(&that1.Right) { + return fmt.Errorf("Right this(%v) Not Equal that(%v)", this.Right, that1.Right) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *AndBranch) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*AndBranch) + if !ok { + that2, ok := that.(AndBranch) + 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.Left.Equal(&that1.Left) { + return false + } + if !this.Right.Equal(&that1.Right) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *Leaf) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*Leaf) + if !ok { + that2, ok := that.(Leaf) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *Leaf") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *Leaf but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *Leaf 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.StrValue != that1.StrValue { + return fmt.Errorf("StrValue this(%v) Not Equal that(%v)", this.StrValue, that1.StrValue) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *Leaf) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*Leaf) + if !ok { + that2, ok := that.(Leaf) + 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.StrValue != that1.StrValue { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *DeepTree) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*DeepTree) + if !ok { + that2, ok := that.(DeepTree) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *DeepTree") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *DeepTree but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *DeepTree but is not nil && this == nil") + } + if !this.Down.Equal(that1.Down) { + return fmt.Errorf("Down this(%v) Not Equal that(%v)", this.Down, that1.Down) + } + if !this.And.Equal(that1.And) { + return fmt.Errorf("And this(%v) Not Equal that(%v)", this.And, that1.And) + } + if !this.Leaf.Equal(that1.Leaf) { + return fmt.Errorf("Leaf this(%v) Not Equal that(%v)", this.Leaf, that1.Leaf) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *DeepTree) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*DeepTree) + if !ok { + that2, ok := that.(DeepTree) + 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.Down.Equal(that1.Down) { + return false + } + if !this.And.Equal(that1.And) { + return false + } + if !this.Leaf.Equal(that1.Leaf) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *ADeepBranch) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*ADeepBranch) + if !ok { + that2, ok := that.(ADeepBranch) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *ADeepBranch") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *ADeepBranch but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *ADeepBranch but is not nil && this == nil") + } + if !this.Down.Equal(&that1.Down) { + return fmt.Errorf("Down this(%v) Not Equal that(%v)", this.Down, that1.Down) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *ADeepBranch) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*ADeepBranch) + if !ok { + that2, ok := that.(ADeepBranch) + 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.Down.Equal(&that1.Down) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *AndDeepBranch) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*AndDeepBranch) + if !ok { + that2, ok := that.(AndDeepBranch) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *AndDeepBranch") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *AndDeepBranch but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *AndDeepBranch but is not nil && this == nil") + } + if !this.Left.Equal(&that1.Left) { + return fmt.Errorf("Left this(%v) Not Equal that(%v)", this.Left, that1.Left) + } + if !this.Right.Equal(&that1.Right) { + return fmt.Errorf("Right this(%v) Not Equal that(%v)", this.Right, that1.Right) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *AndDeepBranch) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*AndDeepBranch) + if !ok { + that2, ok := that.(AndDeepBranch) + 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.Left.Equal(&that1.Left) { + return false + } + if !this.Right.Equal(&that1.Right) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *DeepLeaf) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*DeepLeaf) + if !ok { + that2, ok := that.(DeepLeaf) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *DeepLeaf") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *DeepLeaf but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *DeepLeaf but is not nil && this == nil") + } + if !this.Tree.Equal(&that1.Tree) { + return fmt.Errorf("Tree this(%v) Not Equal that(%v)", this.Tree, that1.Tree) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *DeepLeaf) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*DeepLeaf) + if !ok { + that2, ok := that.(DeepLeaf) + 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.Tree.Equal(&that1.Tree) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *Nil) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*Nil) + if !ok { + that2, ok := that.(Nil) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *Nil") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *Nil but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *Nil but is not nil && this == nil") + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *Nil) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*Nil) + if !ok { + that2, ok := that.(Nil) + 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.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NidOptEnum) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NidOptEnum) + if !ok { + that2, ok := that.(NidOptEnum) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NidOptEnum") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NidOptEnum but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NidOptEnum but is not nil && this == nil") + } + if this.Field1 != that1.Field1 { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NidOptEnum) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*NidOptEnum) + if !ok { + that2, ok := that.(NidOptEnum) + 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.Field1 != that1.Field1 { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NinOptEnum) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NinOptEnum) + if !ok { + that2, ok := that.(NinOptEnum) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NinOptEnum") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NinOptEnum but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NinOptEnum but is not nil && this == nil") + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) + } + } else if this.Field1 != nil { + return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") + } else if that1.Field1 != nil { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", *this.Field2, *that1.Field2) + } + } else if this.Field2 != nil { + return fmt.Errorf("this.Field2 == nil && that.Field2 != nil") + } else if that1.Field2 != nil { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) + } + if this.Field3 != nil && that1.Field3 != nil { + if *this.Field3 != *that1.Field3 { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", *this.Field3, *that1.Field3) + } + } else if this.Field3 != nil { + return fmt.Errorf("this.Field3 == nil && that.Field3 != nil") + } else if that1.Field3 != nil { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", this.Field3, that1.Field3) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NinOptEnum) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*NinOptEnum) + if !ok { + that2, ok := that.(NinOptEnum) + 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.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return false + } + } else if this.Field1 != nil { + return false + } else if that1.Field1 != nil { + return false + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + return false + } + } else if this.Field2 != nil { + return false + } else if that1.Field2 != nil { + return false + } + if this.Field3 != nil && that1.Field3 != nil { + if *this.Field3 != *that1.Field3 { + return false + } + } else if this.Field3 != nil { + return false + } else if that1.Field3 != nil { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NidRepEnum) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NidRepEnum) + if !ok { + that2, ok := that.(NidRepEnum) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NidRepEnum") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NidRepEnum but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NidRepEnum but is not nil && this == nil") + } + if len(this.Field1) != len(that1.Field1) { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", len(this.Field1), len(that1.Field1)) + } + for i := range this.Field1 { + if this.Field1[i] != that1.Field1[i] { + return fmt.Errorf("Field1 this[%v](%v) Not Equal that[%v](%v)", i, this.Field1[i], i, that1.Field1[i]) + } + } + if len(this.Field2) != len(that1.Field2) { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", len(this.Field2), len(that1.Field2)) + } + for i := range this.Field2 { + if this.Field2[i] != that1.Field2[i] { + return fmt.Errorf("Field2 this[%v](%v) Not Equal that[%v](%v)", i, this.Field2[i], i, that1.Field2[i]) + } + } + if len(this.Field3) != len(that1.Field3) { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", len(this.Field3), len(that1.Field3)) + } + for i := range this.Field3 { + if this.Field3[i] != that1.Field3[i] { + return fmt.Errorf("Field3 this[%v](%v) Not Equal that[%v](%v)", i, this.Field3[i], i, that1.Field3[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NidRepEnum) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*NidRepEnum) + if !ok { + that2, ok := that.(NidRepEnum) + 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.Field1) != len(that1.Field1) { + return false + } + for i := range this.Field1 { + if this.Field1[i] != that1.Field1[i] { + return false + } + } + if len(this.Field2) != len(that1.Field2) { + return false + } + for i := range this.Field2 { + if this.Field2[i] != that1.Field2[i] { + return false + } + } + if len(this.Field3) != len(that1.Field3) { + return false + } + for i := range this.Field3 { + if this.Field3[i] != that1.Field3[i] { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NinRepEnum) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NinRepEnum) + if !ok { + that2, ok := that.(NinRepEnum) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NinRepEnum") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NinRepEnum but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NinRepEnum but is not nil && this == nil") + } + if len(this.Field1) != len(that1.Field1) { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", len(this.Field1), len(that1.Field1)) + } + for i := range this.Field1 { + if this.Field1[i] != that1.Field1[i] { + return fmt.Errorf("Field1 this[%v](%v) Not Equal that[%v](%v)", i, this.Field1[i], i, that1.Field1[i]) + } + } + if len(this.Field2) != len(that1.Field2) { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", len(this.Field2), len(that1.Field2)) + } + for i := range this.Field2 { + if this.Field2[i] != that1.Field2[i] { + return fmt.Errorf("Field2 this[%v](%v) Not Equal that[%v](%v)", i, this.Field2[i], i, that1.Field2[i]) + } + } + if len(this.Field3) != len(that1.Field3) { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", len(this.Field3), len(that1.Field3)) + } + for i := range this.Field3 { + if this.Field3[i] != that1.Field3[i] { + return fmt.Errorf("Field3 this[%v](%v) Not Equal that[%v](%v)", i, this.Field3[i], i, that1.Field3[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NinRepEnum) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*NinRepEnum) + if !ok { + that2, ok := that.(NinRepEnum) + 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.Field1) != len(that1.Field1) { + return false + } + for i := range this.Field1 { + if this.Field1[i] != that1.Field1[i] { + return false + } + } + if len(this.Field2) != len(that1.Field2) { + return false + } + for i := range this.Field2 { + if this.Field2[i] != that1.Field2[i] { + return false + } + } + if len(this.Field3) != len(that1.Field3) { + return false + } + for i := range this.Field3 { + if this.Field3[i] != that1.Field3[i] { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NinOptEnumDefault) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NinOptEnumDefault) + if !ok { + that2, ok := that.(NinOptEnumDefault) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NinOptEnumDefault") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NinOptEnumDefault but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NinOptEnumDefault but is not nil && this == nil") + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) + } + } else if this.Field1 != nil { + return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") + } else if that1.Field1 != nil { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", *this.Field2, *that1.Field2) + } + } else if this.Field2 != nil { + return fmt.Errorf("this.Field2 == nil && that.Field2 != nil") + } else if that1.Field2 != nil { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) + } + if this.Field3 != nil && that1.Field3 != nil { + if *this.Field3 != *that1.Field3 { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", *this.Field3, *that1.Field3) + } + } else if this.Field3 != nil { + return fmt.Errorf("this.Field3 == nil && that.Field3 != nil") + } else if that1.Field3 != nil { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", this.Field3, that1.Field3) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NinOptEnumDefault) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*NinOptEnumDefault) + if !ok { + that2, ok := that.(NinOptEnumDefault) + 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.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return false + } + } else if this.Field1 != nil { + return false + } else if that1.Field1 != nil { + return false + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + return false + } + } else if this.Field2 != nil { + return false + } else if that1.Field2 != nil { + return false + } + if this.Field3 != nil && that1.Field3 != nil { + if *this.Field3 != *that1.Field3 { + return false + } + } else if this.Field3 != nil { + return false + } else if that1.Field3 != nil { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *AnotherNinOptEnum) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*AnotherNinOptEnum) + if !ok { + that2, ok := that.(AnotherNinOptEnum) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *AnotherNinOptEnum") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *AnotherNinOptEnum but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *AnotherNinOptEnum but is not nil && this == nil") + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) + } + } else if this.Field1 != nil { + return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") + } else if that1.Field1 != nil { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", *this.Field2, *that1.Field2) + } + } else if this.Field2 != nil { + return fmt.Errorf("this.Field2 == nil && that.Field2 != nil") + } else if that1.Field2 != nil { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) + } + if this.Field3 != nil && that1.Field3 != nil { + if *this.Field3 != *that1.Field3 { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", *this.Field3, *that1.Field3) + } + } else if this.Field3 != nil { + return fmt.Errorf("this.Field3 == nil && that.Field3 != nil") + } else if that1.Field3 != nil { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", this.Field3, that1.Field3) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *AnotherNinOptEnum) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*AnotherNinOptEnum) + if !ok { + that2, ok := that.(AnotherNinOptEnum) + 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.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return false + } + } else if this.Field1 != nil { + return false + } else if that1.Field1 != nil { + return false + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + return false + } + } else if this.Field2 != nil { + return false + } else if that1.Field2 != nil { + return false + } + if this.Field3 != nil && that1.Field3 != nil { + if *this.Field3 != *that1.Field3 { + return false + } + } else if this.Field3 != nil { + return false + } else if that1.Field3 != nil { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *AnotherNinOptEnumDefault) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*AnotherNinOptEnumDefault) + if !ok { + that2, ok := that.(AnotherNinOptEnumDefault) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *AnotherNinOptEnumDefault") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *AnotherNinOptEnumDefault but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *AnotherNinOptEnumDefault but is not nil && this == nil") + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) + } + } else if this.Field1 != nil { + return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") + } else if that1.Field1 != nil { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", *this.Field2, *that1.Field2) + } + } else if this.Field2 != nil { + return fmt.Errorf("this.Field2 == nil && that.Field2 != nil") + } else if that1.Field2 != nil { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) + } + if this.Field3 != nil && that1.Field3 != nil { + if *this.Field3 != *that1.Field3 { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", *this.Field3, *that1.Field3) + } + } else if this.Field3 != nil { + return fmt.Errorf("this.Field3 == nil && that.Field3 != nil") + } else if that1.Field3 != nil { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", this.Field3, that1.Field3) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *AnotherNinOptEnumDefault) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*AnotherNinOptEnumDefault) + if !ok { + that2, ok := that.(AnotherNinOptEnumDefault) + 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.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return false + } + } else if this.Field1 != nil { + return false + } else if that1.Field1 != nil { + return false + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + return false + } + } else if this.Field2 != nil { + return false + } else if that1.Field2 != nil { + return false + } + if this.Field3 != nil && that1.Field3 != nil { + if *this.Field3 != *that1.Field3 { + return false + } + } else if this.Field3 != nil { + return false + } else if that1.Field3 != nil { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *Timer) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*Timer) + if !ok { + that2, ok := that.(Timer) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *Timer") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *Timer but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *Timer but is not nil && this == nil") + } + if this.Time1 != that1.Time1 { + return fmt.Errorf("Time1 this(%v) Not Equal that(%v)", this.Time1, that1.Time1) + } + if this.Time2 != that1.Time2 { + return fmt.Errorf("Time2 this(%v) Not Equal that(%v)", this.Time2, that1.Time2) + } + if !bytes.Equal(this.Data, that1.Data) { + return fmt.Errorf("Data this(%v) Not Equal that(%v)", this.Data, that1.Data) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *Timer) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*Timer) + if !ok { + that2, ok := that.(Timer) + 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.Time1 != that1.Time1 { + return false + } + if this.Time2 != that1.Time2 { + return false + } + if !bytes.Equal(this.Data, that1.Data) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *MyExtendable) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*MyExtendable) + if !ok { + that2, ok := that.(MyExtendable) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *MyExtendable") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *MyExtendable but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *MyExtendable but is not nil && this == nil") + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) + } + } else if this.Field1 != nil { + return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") + } else if that1.Field1 != nil { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) + } + for k, v := range this.XXX_extensions { + if v2, ok := that1.XXX_extensions[k]; ok { + if !v.Equal(&v2) { + return fmt.Errorf("XXX_extensions this[%v](%v) Not Equal that[%v](%v)", k, this.XXX_extensions[k], k, that1.XXX_extensions[k]) + } + } else { + return fmt.Errorf("XXX_extensions[%v] Not In that", k) + } + } + for k := range that1.XXX_extensions { + if _, ok := this.XXX_extensions[k]; !ok { + return fmt.Errorf("XXX_extensions[%v] Not In this", k) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *MyExtendable) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*MyExtendable) + if !ok { + that2, ok := that.(MyExtendable) + 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.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return false + } + } else if this.Field1 != nil { + return false + } else if that1.Field1 != nil { + return false + } + for k, v := range this.XXX_extensions { + if v2, ok := that1.XXX_extensions[k]; ok { + if !v.Equal(&v2) { + return false + } + } else { + return false + } + } + for k := range that1.XXX_extensions { + if _, ok := this.XXX_extensions[k]; !ok { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *OtherExtenable) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*OtherExtenable) + if !ok { + that2, ok := that.(OtherExtenable) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *OtherExtenable") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *OtherExtenable but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *OtherExtenable but is not nil && this == nil") + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", *this.Field2, *that1.Field2) + } + } else if this.Field2 != nil { + return fmt.Errorf("this.Field2 == nil && that.Field2 != nil") + } else if that1.Field2 != nil { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) + } + if this.Field13 != nil && that1.Field13 != nil { + if *this.Field13 != *that1.Field13 { + return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", *this.Field13, *that1.Field13) + } + } else if this.Field13 != nil { + return fmt.Errorf("this.Field13 == nil && that.Field13 != nil") + } else if that1.Field13 != nil { + return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", this.Field13, that1.Field13) + } + if !this.M.Equal(that1.M) { + return fmt.Errorf("M this(%v) Not Equal that(%v)", this.M, that1.M) + } + for k, v := range this.XXX_extensions { + if v2, ok := that1.XXX_extensions[k]; ok { + if !v.Equal(&v2) { + return fmt.Errorf("XXX_extensions this[%v](%v) Not Equal that[%v](%v)", k, this.XXX_extensions[k], k, that1.XXX_extensions[k]) + } + } else { + return fmt.Errorf("XXX_extensions[%v] Not In that", k) + } + } + for k := range that1.XXX_extensions { + if _, ok := this.XXX_extensions[k]; !ok { + return fmt.Errorf("XXX_extensions[%v] Not In this", k) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *OtherExtenable) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*OtherExtenable) + if !ok { + that2, ok := that.(OtherExtenable) + 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.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + return false + } + } else if this.Field2 != nil { + return false + } else if that1.Field2 != nil { + return false + } + if this.Field13 != nil && that1.Field13 != nil { + if *this.Field13 != *that1.Field13 { + return false + } + } else if this.Field13 != nil { + return false + } else if that1.Field13 != nil { + return false + } + if !this.M.Equal(that1.M) { + return false + } + for k, v := range this.XXX_extensions { + if v2, ok := that1.XXX_extensions[k]; ok { + if !v.Equal(&v2) { + return false + } + } else { + return false + } + } + for k := range that1.XXX_extensions { + if _, ok := this.XXX_extensions[k]; !ok { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NestedDefinition) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NestedDefinition) + if !ok { + that2, ok := that.(NestedDefinition) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NestedDefinition") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NestedDefinition but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NestedDefinition but is not nil && this == nil") + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) + } + } else if this.Field1 != nil { + return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") + } else if that1.Field1 != nil { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) + } + if this.EnumField != nil && that1.EnumField != nil { + if *this.EnumField != *that1.EnumField { + return fmt.Errorf("EnumField this(%v) Not Equal that(%v)", *this.EnumField, *that1.EnumField) + } + } else if this.EnumField != nil { + return fmt.Errorf("this.EnumField == nil && that.EnumField != nil") + } else if that1.EnumField != nil { + return fmt.Errorf("EnumField this(%v) Not Equal that(%v)", this.EnumField, that1.EnumField) + } + if !this.NNM.Equal(that1.NNM) { + return fmt.Errorf("NNM this(%v) Not Equal that(%v)", this.NNM, that1.NNM) + } + if !this.NM.Equal(that1.NM) { + return fmt.Errorf("NM this(%v) Not Equal that(%v)", this.NM, that1.NM) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NestedDefinition) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*NestedDefinition) + if !ok { + that2, ok := that.(NestedDefinition) + 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.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return false + } + } else if this.Field1 != nil { + return false + } else if that1.Field1 != nil { + return false + } + if this.EnumField != nil && that1.EnumField != nil { + if *this.EnumField != *that1.EnumField { + return false + } + } else if this.EnumField != nil { + return false + } else if that1.EnumField != nil { + return false + } + if !this.NNM.Equal(that1.NNM) { + return false + } + if !this.NM.Equal(that1.NM) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NestedDefinition_NestedMessage) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NestedDefinition_NestedMessage) + if !ok { + that2, ok := that.(NestedDefinition_NestedMessage) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NestedDefinition_NestedMessage") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NestedDefinition_NestedMessage but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NestedDefinition_NestedMessage but is not nil && this == nil") + } + if this.NestedField1 != nil && that1.NestedField1 != nil { + if *this.NestedField1 != *that1.NestedField1 { + return fmt.Errorf("NestedField1 this(%v) Not Equal that(%v)", *this.NestedField1, *that1.NestedField1) + } + } else if this.NestedField1 != nil { + return fmt.Errorf("this.NestedField1 == nil && that.NestedField1 != nil") + } else if that1.NestedField1 != nil { + return fmt.Errorf("NestedField1 this(%v) Not Equal that(%v)", this.NestedField1, that1.NestedField1) + } + if !this.NNM.Equal(that1.NNM) { + return fmt.Errorf("NNM this(%v) Not Equal that(%v)", this.NNM, that1.NNM) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NestedDefinition_NestedMessage) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*NestedDefinition_NestedMessage) + if !ok { + that2, ok := that.(NestedDefinition_NestedMessage) + 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.NestedField1 != nil && that1.NestedField1 != nil { + if *this.NestedField1 != *that1.NestedField1 { + return false + } + } else if this.NestedField1 != nil { + return false + } else if that1.NestedField1 != nil { + return false + } + if !this.NNM.Equal(that1.NNM) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NestedDefinition_NestedMessage_NestedNestedMsg) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NestedDefinition_NestedMessage_NestedNestedMsg) + if !ok { + that2, ok := that.(NestedDefinition_NestedMessage_NestedNestedMsg) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NestedDefinition_NestedMessage_NestedNestedMsg") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NestedDefinition_NestedMessage_NestedNestedMsg but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NestedDefinition_NestedMessage_NestedNestedMsg but is not nil && this == nil") + } + if this.NestedNestedField1 != nil && that1.NestedNestedField1 != nil { + if *this.NestedNestedField1 != *that1.NestedNestedField1 { + return fmt.Errorf("NestedNestedField1 this(%v) Not Equal that(%v)", *this.NestedNestedField1, *that1.NestedNestedField1) + } + } else if this.NestedNestedField1 != nil { + return fmt.Errorf("this.NestedNestedField1 == nil && that.NestedNestedField1 != nil") + } else if that1.NestedNestedField1 != nil { + return fmt.Errorf("NestedNestedField1 this(%v) Not Equal that(%v)", this.NestedNestedField1, that1.NestedNestedField1) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NestedDefinition_NestedMessage_NestedNestedMsg) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*NestedDefinition_NestedMessage_NestedNestedMsg) + if !ok { + that2, ok := that.(NestedDefinition_NestedMessage_NestedNestedMsg) + 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.NestedNestedField1 != nil && that1.NestedNestedField1 != nil { + if *this.NestedNestedField1 != *that1.NestedNestedField1 { + return false + } + } else if this.NestedNestedField1 != nil { + return false + } else if that1.NestedNestedField1 != nil { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NestedScope) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NestedScope) + if !ok { + that2, ok := that.(NestedScope) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NestedScope") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NestedScope but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NestedScope but is not nil && this == nil") + } + if !this.A.Equal(that1.A) { + return fmt.Errorf("A this(%v) Not Equal that(%v)", this.A, that1.A) + } + if this.B != nil && that1.B != nil { + if *this.B != *that1.B { + return fmt.Errorf("B this(%v) Not Equal that(%v)", *this.B, *that1.B) + } + } else if this.B != nil { + return fmt.Errorf("this.B == nil && that.B != nil") + } else if that1.B != nil { + return fmt.Errorf("B this(%v) Not Equal that(%v)", this.B, that1.B) + } + if !this.C.Equal(that1.C) { + return fmt.Errorf("C this(%v) Not Equal that(%v)", this.C, that1.C) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NestedScope) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*NestedScope) + if !ok { + that2, ok := that.(NestedScope) + 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.A.Equal(that1.A) { + return false + } + if this.B != nil && that1.B != nil { + if *this.B != *that1.B { + return false + } + } else if this.B != nil { + return false + } else if that1.B != nil { + return false + } + if !this.C.Equal(that1.C) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NinOptNativeDefault) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NinOptNativeDefault) + if !ok { + that2, ok := that.(NinOptNativeDefault) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NinOptNativeDefault") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NinOptNativeDefault but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NinOptNativeDefault but is not nil && this == nil") + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) + } + } else if this.Field1 != nil { + return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") + } else if that1.Field1 != nil { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", *this.Field2, *that1.Field2) + } + } else if this.Field2 != nil { + return fmt.Errorf("this.Field2 == nil && that.Field2 != nil") + } else if that1.Field2 != nil { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) + } + if this.Field3 != nil && that1.Field3 != nil { + if *this.Field3 != *that1.Field3 { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", *this.Field3, *that1.Field3) + } + } else if this.Field3 != nil { + return fmt.Errorf("this.Field3 == nil && that.Field3 != nil") + } else if that1.Field3 != nil { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", this.Field3, that1.Field3) + } + if this.Field4 != nil && that1.Field4 != nil { + if *this.Field4 != *that1.Field4 { + return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", *this.Field4, *that1.Field4) + } + } else if this.Field4 != nil { + return fmt.Errorf("this.Field4 == nil && that.Field4 != nil") + } else if that1.Field4 != nil { + return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", this.Field4, that1.Field4) + } + if this.Field5 != nil && that1.Field5 != nil { + if *this.Field5 != *that1.Field5 { + return fmt.Errorf("Field5 this(%v) Not Equal that(%v)", *this.Field5, *that1.Field5) + } + } else if this.Field5 != nil { + return fmt.Errorf("this.Field5 == nil && that.Field5 != nil") + } else if that1.Field5 != nil { + return fmt.Errorf("Field5 this(%v) Not Equal that(%v)", this.Field5, that1.Field5) + } + if this.Field6 != nil && that1.Field6 != nil { + if *this.Field6 != *that1.Field6 { + return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", *this.Field6, *that1.Field6) + } + } else if this.Field6 != nil { + return fmt.Errorf("this.Field6 == nil && that.Field6 != nil") + } else if that1.Field6 != nil { + return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", this.Field6, that1.Field6) + } + if this.Field7 != nil && that1.Field7 != nil { + if *this.Field7 != *that1.Field7 { + return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", *this.Field7, *that1.Field7) + } + } else if this.Field7 != nil { + return fmt.Errorf("this.Field7 == nil && that.Field7 != nil") + } else if that1.Field7 != nil { + return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", this.Field7, that1.Field7) + } + if this.Field8 != nil && that1.Field8 != nil { + if *this.Field8 != *that1.Field8 { + return fmt.Errorf("Field8 this(%v) Not Equal that(%v)", *this.Field8, *that1.Field8) + } + } else if this.Field8 != nil { + return fmt.Errorf("this.Field8 == nil && that.Field8 != nil") + } else if that1.Field8 != nil { + return fmt.Errorf("Field8 this(%v) Not Equal that(%v)", this.Field8, that1.Field8) + } + if this.Field9 != nil && that1.Field9 != nil { + if *this.Field9 != *that1.Field9 { + return fmt.Errorf("Field9 this(%v) Not Equal that(%v)", *this.Field9, *that1.Field9) + } + } else if this.Field9 != nil { + return fmt.Errorf("this.Field9 == nil && that.Field9 != nil") + } else if that1.Field9 != nil { + return fmt.Errorf("Field9 this(%v) Not Equal that(%v)", this.Field9, that1.Field9) + } + if this.Field10 != nil && that1.Field10 != nil { + if *this.Field10 != *that1.Field10 { + return fmt.Errorf("Field10 this(%v) Not Equal that(%v)", *this.Field10, *that1.Field10) + } + } else if this.Field10 != nil { + return fmt.Errorf("this.Field10 == nil && that.Field10 != nil") + } else if that1.Field10 != nil { + return fmt.Errorf("Field10 this(%v) Not Equal that(%v)", this.Field10, that1.Field10) + } + if this.Field11 != nil && that1.Field11 != nil { + if *this.Field11 != *that1.Field11 { + return fmt.Errorf("Field11 this(%v) Not Equal that(%v)", *this.Field11, *that1.Field11) + } + } else if this.Field11 != nil { + return fmt.Errorf("this.Field11 == nil && that.Field11 != nil") + } else if that1.Field11 != nil { + return fmt.Errorf("Field11 this(%v) Not Equal that(%v)", this.Field11, that1.Field11) + } + if this.Field12 != nil && that1.Field12 != nil { + if *this.Field12 != *that1.Field12 { + return fmt.Errorf("Field12 this(%v) Not Equal that(%v)", *this.Field12, *that1.Field12) + } + } else if this.Field12 != nil { + return fmt.Errorf("this.Field12 == nil && that.Field12 != nil") + } else if that1.Field12 != nil { + return fmt.Errorf("Field12 this(%v) Not Equal that(%v)", this.Field12, that1.Field12) + } + if this.Field13 != nil && that1.Field13 != nil { + if *this.Field13 != *that1.Field13 { + return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", *this.Field13, *that1.Field13) + } + } else if this.Field13 != nil { + return fmt.Errorf("this.Field13 == nil && that.Field13 != nil") + } else if that1.Field13 != nil { + return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", this.Field13, that1.Field13) + } + if this.Field14 != nil && that1.Field14 != nil { + if *this.Field14 != *that1.Field14 { + return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", *this.Field14, *that1.Field14) + } + } else if this.Field14 != nil { + return fmt.Errorf("this.Field14 == nil && that.Field14 != nil") + } else if that1.Field14 != nil { + return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", this.Field14, that1.Field14) + } + if !bytes.Equal(this.Field15, that1.Field15) { + return fmt.Errorf("Field15 this(%v) Not Equal that(%v)", this.Field15, that1.Field15) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NinOptNativeDefault) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*NinOptNativeDefault) + if !ok { + that2, ok := that.(NinOptNativeDefault) + 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.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return false + } + } else if this.Field1 != nil { + return false + } else if that1.Field1 != nil { + return false + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + return false + } + } else if this.Field2 != nil { + return false + } else if that1.Field2 != nil { + return false + } + if this.Field3 != nil && that1.Field3 != nil { + if *this.Field3 != *that1.Field3 { + return false + } + } else if this.Field3 != nil { + return false + } else if that1.Field3 != nil { + return false + } + if this.Field4 != nil && that1.Field4 != nil { + if *this.Field4 != *that1.Field4 { + return false + } + } else if this.Field4 != nil { + return false + } else if that1.Field4 != nil { + return false + } + if this.Field5 != nil && that1.Field5 != nil { + if *this.Field5 != *that1.Field5 { + return false + } + } else if this.Field5 != nil { + return false + } else if that1.Field5 != nil { + return false + } + if this.Field6 != nil && that1.Field6 != nil { + if *this.Field6 != *that1.Field6 { + return false + } + } else if this.Field6 != nil { + return false + } else if that1.Field6 != nil { + return false + } + if this.Field7 != nil && that1.Field7 != nil { + if *this.Field7 != *that1.Field7 { + return false + } + } else if this.Field7 != nil { + return false + } else if that1.Field7 != nil { + return false + } + if this.Field8 != nil && that1.Field8 != nil { + if *this.Field8 != *that1.Field8 { + return false + } + } else if this.Field8 != nil { + return false + } else if that1.Field8 != nil { + return false + } + if this.Field9 != nil && that1.Field9 != nil { + if *this.Field9 != *that1.Field9 { + return false + } + } else if this.Field9 != nil { + return false + } else if that1.Field9 != nil { + return false + } + if this.Field10 != nil && that1.Field10 != nil { + if *this.Field10 != *that1.Field10 { + return false + } + } else if this.Field10 != nil { + return false + } else if that1.Field10 != nil { + return false + } + if this.Field11 != nil && that1.Field11 != nil { + if *this.Field11 != *that1.Field11 { + return false + } + } else if this.Field11 != nil { + return false + } else if that1.Field11 != nil { + return false + } + if this.Field12 != nil && that1.Field12 != nil { + if *this.Field12 != *that1.Field12 { + return false + } + } else if this.Field12 != nil { + return false + } else if that1.Field12 != nil { + return false + } + if this.Field13 != nil && that1.Field13 != nil { + if *this.Field13 != *that1.Field13 { + return false + } + } else if this.Field13 != nil { + return false + } else if that1.Field13 != nil { + return false + } + if this.Field14 != nil && that1.Field14 != nil { + if *this.Field14 != *that1.Field14 { + return false + } + } else if this.Field14 != nil { + return false + } else if that1.Field14 != nil { + return false + } + if !bytes.Equal(this.Field15, that1.Field15) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *CustomContainer) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*CustomContainer) + if !ok { + that2, ok := that.(CustomContainer) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *CustomContainer") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *CustomContainer but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *CustomContainer but is not nil && this == nil") + } + if !this.CustomStruct.Equal(&that1.CustomStruct) { + return fmt.Errorf("CustomStruct this(%v) Not Equal that(%v)", this.CustomStruct, that1.CustomStruct) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *CustomContainer) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*CustomContainer) + if !ok { + that2, ok := that.(CustomContainer) + 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.CustomStruct.Equal(&that1.CustomStruct) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *CustomNameNidOptNative) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*CustomNameNidOptNative) + if !ok { + that2, ok := that.(CustomNameNidOptNative) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *CustomNameNidOptNative") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *CustomNameNidOptNative but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *CustomNameNidOptNative but is not nil && this == nil") + } + if this.FieldA != that1.FieldA { + return fmt.Errorf("FieldA this(%v) Not Equal that(%v)", this.FieldA, that1.FieldA) + } + if this.FieldB != that1.FieldB { + return fmt.Errorf("FieldB this(%v) Not Equal that(%v)", this.FieldB, that1.FieldB) + } + if this.FieldC != that1.FieldC { + return fmt.Errorf("FieldC this(%v) Not Equal that(%v)", this.FieldC, that1.FieldC) + } + if this.FieldD != that1.FieldD { + return fmt.Errorf("FieldD this(%v) Not Equal that(%v)", this.FieldD, that1.FieldD) + } + if this.FieldE != that1.FieldE { + return fmt.Errorf("FieldE this(%v) Not Equal that(%v)", this.FieldE, that1.FieldE) + } + if this.FieldF != that1.FieldF { + return fmt.Errorf("FieldF this(%v) Not Equal that(%v)", this.FieldF, that1.FieldF) + } + if this.FieldG != that1.FieldG { + return fmt.Errorf("FieldG this(%v) Not Equal that(%v)", this.FieldG, that1.FieldG) + } + if this.FieldH != that1.FieldH { + return fmt.Errorf("FieldH this(%v) Not Equal that(%v)", this.FieldH, that1.FieldH) + } + if this.FieldI != that1.FieldI { + return fmt.Errorf("FieldI this(%v) Not Equal that(%v)", this.FieldI, that1.FieldI) + } + if this.FieldJ != that1.FieldJ { + return fmt.Errorf("FieldJ this(%v) Not Equal that(%v)", this.FieldJ, that1.FieldJ) + } + if this.FieldK != that1.FieldK { + return fmt.Errorf("FieldK this(%v) Not Equal that(%v)", this.FieldK, that1.FieldK) + } + if this.FieldL != that1.FieldL { + return fmt.Errorf("FieldL this(%v) Not Equal that(%v)", this.FieldL, that1.FieldL) + } + if this.FieldM != that1.FieldM { + return fmt.Errorf("FieldM this(%v) Not Equal that(%v)", this.FieldM, that1.FieldM) + } + if this.FieldN != that1.FieldN { + return fmt.Errorf("FieldN this(%v) Not Equal that(%v)", this.FieldN, that1.FieldN) + } + if !bytes.Equal(this.FieldO, that1.FieldO) { + return fmt.Errorf("FieldO this(%v) Not Equal that(%v)", this.FieldO, that1.FieldO) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *CustomNameNidOptNative) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*CustomNameNidOptNative) + if !ok { + that2, ok := that.(CustomNameNidOptNative) + 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.FieldA != that1.FieldA { + return false + } + if this.FieldB != that1.FieldB { + return false + } + if this.FieldC != that1.FieldC { + return false + } + if this.FieldD != that1.FieldD { + return false + } + if this.FieldE != that1.FieldE { + return false + } + if this.FieldF != that1.FieldF { + return false + } + if this.FieldG != that1.FieldG { + return false + } + if this.FieldH != that1.FieldH { + return false + } + if this.FieldI != that1.FieldI { + return false + } + if this.FieldJ != that1.FieldJ { + return false + } + if this.FieldK != that1.FieldK { + return false + } + if this.FieldL != that1.FieldL { + return false + } + if this.FieldM != that1.FieldM { + return false + } + if this.FieldN != that1.FieldN { + return false + } + if !bytes.Equal(this.FieldO, that1.FieldO) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *CustomNameNinOptNative) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*CustomNameNinOptNative) + if !ok { + that2, ok := that.(CustomNameNinOptNative) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *CustomNameNinOptNative") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *CustomNameNinOptNative but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *CustomNameNinOptNative but is not nil && this == nil") + } + if this.FieldA != nil && that1.FieldA != nil { + if *this.FieldA != *that1.FieldA { + return fmt.Errorf("FieldA this(%v) Not Equal that(%v)", *this.FieldA, *that1.FieldA) + } + } else if this.FieldA != nil { + return fmt.Errorf("this.FieldA == nil && that.FieldA != nil") + } else if that1.FieldA != nil { + return fmt.Errorf("FieldA this(%v) Not Equal that(%v)", this.FieldA, that1.FieldA) + } + if this.FieldB != nil && that1.FieldB != nil { + if *this.FieldB != *that1.FieldB { + return fmt.Errorf("FieldB this(%v) Not Equal that(%v)", *this.FieldB, *that1.FieldB) + } + } else if this.FieldB != nil { + return fmt.Errorf("this.FieldB == nil && that.FieldB != nil") + } else if that1.FieldB != nil { + return fmt.Errorf("FieldB this(%v) Not Equal that(%v)", this.FieldB, that1.FieldB) + } + if this.FieldC != nil && that1.FieldC != nil { + if *this.FieldC != *that1.FieldC { + return fmt.Errorf("FieldC this(%v) Not Equal that(%v)", *this.FieldC, *that1.FieldC) + } + } else if this.FieldC != nil { + return fmt.Errorf("this.FieldC == nil && that.FieldC != nil") + } else if that1.FieldC != nil { + return fmt.Errorf("FieldC this(%v) Not Equal that(%v)", this.FieldC, that1.FieldC) + } + if this.FieldD != nil && that1.FieldD != nil { + if *this.FieldD != *that1.FieldD { + return fmt.Errorf("FieldD this(%v) Not Equal that(%v)", *this.FieldD, *that1.FieldD) + } + } else if this.FieldD != nil { + return fmt.Errorf("this.FieldD == nil && that.FieldD != nil") + } else if that1.FieldD != nil { + return fmt.Errorf("FieldD this(%v) Not Equal that(%v)", this.FieldD, that1.FieldD) + } + if this.FieldE != nil && that1.FieldE != nil { + if *this.FieldE != *that1.FieldE { + return fmt.Errorf("FieldE this(%v) Not Equal that(%v)", *this.FieldE, *that1.FieldE) + } + } else if this.FieldE != nil { + return fmt.Errorf("this.FieldE == nil && that.FieldE != nil") + } else if that1.FieldE != nil { + return fmt.Errorf("FieldE this(%v) Not Equal that(%v)", this.FieldE, that1.FieldE) + } + if this.FieldF != nil && that1.FieldF != nil { + if *this.FieldF != *that1.FieldF { + return fmt.Errorf("FieldF this(%v) Not Equal that(%v)", *this.FieldF, *that1.FieldF) + } + } else if this.FieldF != nil { + return fmt.Errorf("this.FieldF == nil && that.FieldF != nil") + } else if that1.FieldF != nil { + return fmt.Errorf("FieldF this(%v) Not Equal that(%v)", this.FieldF, that1.FieldF) + } + if this.FieldG != nil && that1.FieldG != nil { + if *this.FieldG != *that1.FieldG { + return fmt.Errorf("FieldG this(%v) Not Equal that(%v)", *this.FieldG, *that1.FieldG) + } + } else if this.FieldG != nil { + return fmt.Errorf("this.FieldG == nil && that.FieldG != nil") + } else if that1.FieldG != nil { + return fmt.Errorf("FieldG this(%v) Not Equal that(%v)", this.FieldG, that1.FieldG) + } + if this.FieldH != nil && that1.FieldH != nil { + if *this.FieldH != *that1.FieldH { + return fmt.Errorf("FieldH this(%v) Not Equal that(%v)", *this.FieldH, *that1.FieldH) + } + } else if this.FieldH != nil { + return fmt.Errorf("this.FieldH == nil && that.FieldH != nil") + } else if that1.FieldH != nil { + return fmt.Errorf("FieldH this(%v) Not Equal that(%v)", this.FieldH, that1.FieldH) + } + if this.FieldI != nil && that1.FieldI != nil { + if *this.FieldI != *that1.FieldI { + return fmt.Errorf("FieldI this(%v) Not Equal that(%v)", *this.FieldI, *that1.FieldI) + } + } else if this.FieldI != nil { + return fmt.Errorf("this.FieldI == nil && that.FieldI != nil") + } else if that1.FieldI != nil { + return fmt.Errorf("FieldI this(%v) Not Equal that(%v)", this.FieldI, that1.FieldI) + } + if this.FieldJ != nil && that1.FieldJ != nil { + if *this.FieldJ != *that1.FieldJ { + return fmt.Errorf("FieldJ this(%v) Not Equal that(%v)", *this.FieldJ, *that1.FieldJ) + } + } else if this.FieldJ != nil { + return fmt.Errorf("this.FieldJ == nil && that.FieldJ != nil") + } else if that1.FieldJ != nil { + return fmt.Errorf("FieldJ this(%v) Not Equal that(%v)", this.FieldJ, that1.FieldJ) + } + if this.FieldK != nil && that1.FieldK != nil { + if *this.FieldK != *that1.FieldK { + return fmt.Errorf("FieldK this(%v) Not Equal that(%v)", *this.FieldK, *that1.FieldK) + } + } else if this.FieldK != nil { + return fmt.Errorf("this.FieldK == nil && that.FieldK != nil") + } else if that1.FieldK != nil { + return fmt.Errorf("FieldK this(%v) Not Equal that(%v)", this.FieldK, that1.FieldK) + } + if this.FielL != nil && that1.FielL != nil { + if *this.FielL != *that1.FielL { + return fmt.Errorf("FielL this(%v) Not Equal that(%v)", *this.FielL, *that1.FielL) + } + } else if this.FielL != nil { + return fmt.Errorf("this.FielL == nil && that.FielL != nil") + } else if that1.FielL != nil { + return fmt.Errorf("FielL this(%v) Not Equal that(%v)", this.FielL, that1.FielL) + } + if this.FieldM != nil && that1.FieldM != nil { + if *this.FieldM != *that1.FieldM { + return fmt.Errorf("FieldM this(%v) Not Equal that(%v)", *this.FieldM, *that1.FieldM) + } + } else if this.FieldM != nil { + return fmt.Errorf("this.FieldM == nil && that.FieldM != nil") + } else if that1.FieldM != nil { + return fmt.Errorf("FieldM this(%v) Not Equal that(%v)", this.FieldM, that1.FieldM) + } + if this.FieldN != nil && that1.FieldN != nil { + if *this.FieldN != *that1.FieldN { + return fmt.Errorf("FieldN this(%v) Not Equal that(%v)", *this.FieldN, *that1.FieldN) + } + } else if this.FieldN != nil { + return fmt.Errorf("this.FieldN == nil && that.FieldN != nil") + } else if that1.FieldN != nil { + return fmt.Errorf("FieldN this(%v) Not Equal that(%v)", this.FieldN, that1.FieldN) + } + if !bytes.Equal(this.FieldO, that1.FieldO) { + return fmt.Errorf("FieldO this(%v) Not Equal that(%v)", this.FieldO, that1.FieldO) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *CustomNameNinOptNative) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*CustomNameNinOptNative) + if !ok { + that2, ok := that.(CustomNameNinOptNative) + 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.FieldA != nil && that1.FieldA != nil { + if *this.FieldA != *that1.FieldA { + return false + } + } else if this.FieldA != nil { + return false + } else if that1.FieldA != nil { + return false + } + if this.FieldB != nil && that1.FieldB != nil { + if *this.FieldB != *that1.FieldB { + return false + } + } else if this.FieldB != nil { + return false + } else if that1.FieldB != nil { + return false + } + if this.FieldC != nil && that1.FieldC != nil { + if *this.FieldC != *that1.FieldC { + return false + } + } else if this.FieldC != nil { + return false + } else if that1.FieldC != nil { + return false + } + if this.FieldD != nil && that1.FieldD != nil { + if *this.FieldD != *that1.FieldD { + return false + } + } else if this.FieldD != nil { + return false + } else if that1.FieldD != nil { + return false + } + if this.FieldE != nil && that1.FieldE != nil { + if *this.FieldE != *that1.FieldE { + return false + } + } else if this.FieldE != nil { + return false + } else if that1.FieldE != nil { + return false + } + if this.FieldF != nil && that1.FieldF != nil { + if *this.FieldF != *that1.FieldF { + return false + } + } else if this.FieldF != nil { + return false + } else if that1.FieldF != nil { + return false + } + if this.FieldG != nil && that1.FieldG != nil { + if *this.FieldG != *that1.FieldG { + return false + } + } else if this.FieldG != nil { + return false + } else if that1.FieldG != nil { + return false + } + if this.FieldH != nil && that1.FieldH != nil { + if *this.FieldH != *that1.FieldH { + return false + } + } else if this.FieldH != nil { + return false + } else if that1.FieldH != nil { + return false + } + if this.FieldI != nil && that1.FieldI != nil { + if *this.FieldI != *that1.FieldI { + return false + } + } else if this.FieldI != nil { + return false + } else if that1.FieldI != nil { + return false + } + if this.FieldJ != nil && that1.FieldJ != nil { + if *this.FieldJ != *that1.FieldJ { + return false + } + } else if this.FieldJ != nil { + return false + } else if that1.FieldJ != nil { + return false + } + if this.FieldK != nil && that1.FieldK != nil { + if *this.FieldK != *that1.FieldK { + return false + } + } else if this.FieldK != nil { + return false + } else if that1.FieldK != nil { + return false + } + if this.FielL != nil && that1.FielL != nil { + if *this.FielL != *that1.FielL { + return false + } + } else if this.FielL != nil { + return false + } else if that1.FielL != nil { + return false + } + if this.FieldM != nil && that1.FieldM != nil { + if *this.FieldM != *that1.FieldM { + return false + } + } else if this.FieldM != nil { + return false + } else if that1.FieldM != nil { + return false + } + if this.FieldN != nil && that1.FieldN != nil { + if *this.FieldN != *that1.FieldN { + return false + } + } else if this.FieldN != nil { + return false + } else if that1.FieldN != nil { + return false + } + if !bytes.Equal(this.FieldO, that1.FieldO) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *CustomNameNinRepNative) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*CustomNameNinRepNative) + if !ok { + that2, ok := that.(CustomNameNinRepNative) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *CustomNameNinRepNative") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *CustomNameNinRepNative but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *CustomNameNinRepNative but is not nil && this == nil") + } + if len(this.FieldA) != len(that1.FieldA) { + return fmt.Errorf("FieldA this(%v) Not Equal that(%v)", len(this.FieldA), len(that1.FieldA)) + } + for i := range this.FieldA { + if this.FieldA[i] != that1.FieldA[i] { + return fmt.Errorf("FieldA this[%v](%v) Not Equal that[%v](%v)", i, this.FieldA[i], i, that1.FieldA[i]) + } + } + if len(this.FieldB) != len(that1.FieldB) { + return fmt.Errorf("FieldB this(%v) Not Equal that(%v)", len(this.FieldB), len(that1.FieldB)) + } + for i := range this.FieldB { + if this.FieldB[i] != that1.FieldB[i] { + return fmt.Errorf("FieldB this[%v](%v) Not Equal that[%v](%v)", i, this.FieldB[i], i, that1.FieldB[i]) + } + } + if len(this.FieldC) != len(that1.FieldC) { + return fmt.Errorf("FieldC this(%v) Not Equal that(%v)", len(this.FieldC), len(that1.FieldC)) + } + for i := range this.FieldC { + if this.FieldC[i] != that1.FieldC[i] { + return fmt.Errorf("FieldC this[%v](%v) Not Equal that[%v](%v)", i, this.FieldC[i], i, that1.FieldC[i]) + } + } + if len(this.FieldD) != len(that1.FieldD) { + return fmt.Errorf("FieldD this(%v) Not Equal that(%v)", len(this.FieldD), len(that1.FieldD)) + } + for i := range this.FieldD { + if this.FieldD[i] != that1.FieldD[i] { + return fmt.Errorf("FieldD this[%v](%v) Not Equal that[%v](%v)", i, this.FieldD[i], i, that1.FieldD[i]) + } + } + if len(this.FieldE) != len(that1.FieldE) { + return fmt.Errorf("FieldE this(%v) Not Equal that(%v)", len(this.FieldE), len(that1.FieldE)) + } + for i := range this.FieldE { + if this.FieldE[i] != that1.FieldE[i] { + return fmt.Errorf("FieldE this[%v](%v) Not Equal that[%v](%v)", i, this.FieldE[i], i, that1.FieldE[i]) + } + } + if len(this.FieldF) != len(that1.FieldF) { + return fmt.Errorf("FieldF this(%v) Not Equal that(%v)", len(this.FieldF), len(that1.FieldF)) + } + for i := range this.FieldF { + if this.FieldF[i] != that1.FieldF[i] { + return fmt.Errorf("FieldF this[%v](%v) Not Equal that[%v](%v)", i, this.FieldF[i], i, that1.FieldF[i]) + } + } + if len(this.FieldG) != len(that1.FieldG) { + return fmt.Errorf("FieldG this(%v) Not Equal that(%v)", len(this.FieldG), len(that1.FieldG)) + } + for i := range this.FieldG { + if this.FieldG[i] != that1.FieldG[i] { + return fmt.Errorf("FieldG this[%v](%v) Not Equal that[%v](%v)", i, this.FieldG[i], i, that1.FieldG[i]) + } + } + if len(this.FieldH) != len(that1.FieldH) { + return fmt.Errorf("FieldH this(%v) Not Equal that(%v)", len(this.FieldH), len(that1.FieldH)) + } + for i := range this.FieldH { + if this.FieldH[i] != that1.FieldH[i] { + return fmt.Errorf("FieldH this[%v](%v) Not Equal that[%v](%v)", i, this.FieldH[i], i, that1.FieldH[i]) + } + } + if len(this.FieldI) != len(that1.FieldI) { + return fmt.Errorf("FieldI this(%v) Not Equal that(%v)", len(this.FieldI), len(that1.FieldI)) + } + for i := range this.FieldI { + if this.FieldI[i] != that1.FieldI[i] { + return fmt.Errorf("FieldI this[%v](%v) Not Equal that[%v](%v)", i, this.FieldI[i], i, that1.FieldI[i]) + } + } + if len(this.FieldJ) != len(that1.FieldJ) { + return fmt.Errorf("FieldJ this(%v) Not Equal that(%v)", len(this.FieldJ), len(that1.FieldJ)) + } + for i := range this.FieldJ { + if this.FieldJ[i] != that1.FieldJ[i] { + return fmt.Errorf("FieldJ this[%v](%v) Not Equal that[%v](%v)", i, this.FieldJ[i], i, that1.FieldJ[i]) + } + } + if len(this.FieldK) != len(that1.FieldK) { + return fmt.Errorf("FieldK this(%v) Not Equal that(%v)", len(this.FieldK), len(that1.FieldK)) + } + for i := range this.FieldK { + if this.FieldK[i] != that1.FieldK[i] { + return fmt.Errorf("FieldK this[%v](%v) Not Equal that[%v](%v)", i, this.FieldK[i], i, that1.FieldK[i]) + } + } + if len(this.FieldL) != len(that1.FieldL) { + return fmt.Errorf("FieldL this(%v) Not Equal that(%v)", len(this.FieldL), len(that1.FieldL)) + } + for i := range this.FieldL { + if this.FieldL[i] != that1.FieldL[i] { + return fmt.Errorf("FieldL this[%v](%v) Not Equal that[%v](%v)", i, this.FieldL[i], i, that1.FieldL[i]) + } + } + if len(this.FieldM) != len(that1.FieldM) { + return fmt.Errorf("FieldM this(%v) Not Equal that(%v)", len(this.FieldM), len(that1.FieldM)) + } + for i := range this.FieldM { + if this.FieldM[i] != that1.FieldM[i] { + return fmt.Errorf("FieldM this[%v](%v) Not Equal that[%v](%v)", i, this.FieldM[i], i, that1.FieldM[i]) + } + } + if len(this.FieldN) != len(that1.FieldN) { + return fmt.Errorf("FieldN this(%v) Not Equal that(%v)", len(this.FieldN), len(that1.FieldN)) + } + for i := range this.FieldN { + if this.FieldN[i] != that1.FieldN[i] { + return fmt.Errorf("FieldN this[%v](%v) Not Equal that[%v](%v)", i, this.FieldN[i], i, that1.FieldN[i]) + } + } + if len(this.FieldO) != len(that1.FieldO) { + return fmt.Errorf("FieldO this(%v) Not Equal that(%v)", len(this.FieldO), len(that1.FieldO)) + } + for i := range this.FieldO { + if !bytes.Equal(this.FieldO[i], that1.FieldO[i]) { + return fmt.Errorf("FieldO this[%v](%v) Not Equal that[%v](%v)", i, this.FieldO[i], i, that1.FieldO[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *CustomNameNinRepNative) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*CustomNameNinRepNative) + if !ok { + that2, ok := that.(CustomNameNinRepNative) + 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.FieldA) != len(that1.FieldA) { + return false + } + for i := range this.FieldA { + if this.FieldA[i] != that1.FieldA[i] { + return false + } + } + if len(this.FieldB) != len(that1.FieldB) { + return false + } + for i := range this.FieldB { + if this.FieldB[i] != that1.FieldB[i] { + return false + } + } + if len(this.FieldC) != len(that1.FieldC) { + return false + } + for i := range this.FieldC { + if this.FieldC[i] != that1.FieldC[i] { + return false + } + } + if len(this.FieldD) != len(that1.FieldD) { + return false + } + for i := range this.FieldD { + if this.FieldD[i] != that1.FieldD[i] { + return false + } + } + if len(this.FieldE) != len(that1.FieldE) { + return false + } + for i := range this.FieldE { + if this.FieldE[i] != that1.FieldE[i] { + return false + } + } + if len(this.FieldF) != len(that1.FieldF) { + return false + } + for i := range this.FieldF { + if this.FieldF[i] != that1.FieldF[i] { + return false + } + } + if len(this.FieldG) != len(that1.FieldG) { + return false + } + for i := range this.FieldG { + if this.FieldG[i] != that1.FieldG[i] { + return false + } + } + if len(this.FieldH) != len(that1.FieldH) { + return false + } + for i := range this.FieldH { + if this.FieldH[i] != that1.FieldH[i] { + return false + } + } + if len(this.FieldI) != len(that1.FieldI) { + return false + } + for i := range this.FieldI { + if this.FieldI[i] != that1.FieldI[i] { + return false + } + } + if len(this.FieldJ) != len(that1.FieldJ) { + return false + } + for i := range this.FieldJ { + if this.FieldJ[i] != that1.FieldJ[i] { + return false + } + } + if len(this.FieldK) != len(that1.FieldK) { + return false + } + for i := range this.FieldK { + if this.FieldK[i] != that1.FieldK[i] { + return false + } + } + if len(this.FieldL) != len(that1.FieldL) { + return false + } + for i := range this.FieldL { + if this.FieldL[i] != that1.FieldL[i] { + return false + } + } + if len(this.FieldM) != len(that1.FieldM) { + return false + } + for i := range this.FieldM { + if this.FieldM[i] != that1.FieldM[i] { + return false + } + } + if len(this.FieldN) != len(that1.FieldN) { + return false + } + for i := range this.FieldN { + if this.FieldN[i] != that1.FieldN[i] { + return false + } + } + if len(this.FieldO) != len(that1.FieldO) { + return false + } + for i := range this.FieldO { + if !bytes.Equal(this.FieldO[i], that1.FieldO[i]) { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *CustomNameNinStruct) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*CustomNameNinStruct) + if !ok { + that2, ok := that.(CustomNameNinStruct) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *CustomNameNinStruct") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *CustomNameNinStruct but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *CustomNameNinStruct but is not nil && this == nil") + } + if this.FieldA != nil && that1.FieldA != nil { + if *this.FieldA != *that1.FieldA { + return fmt.Errorf("FieldA this(%v) Not Equal that(%v)", *this.FieldA, *that1.FieldA) + } + } else if this.FieldA != nil { + return fmt.Errorf("this.FieldA == nil && that.FieldA != nil") + } else if that1.FieldA != nil { + return fmt.Errorf("FieldA this(%v) Not Equal that(%v)", this.FieldA, that1.FieldA) + } + if this.FieldB != nil && that1.FieldB != nil { + if *this.FieldB != *that1.FieldB { + return fmt.Errorf("FieldB this(%v) Not Equal that(%v)", *this.FieldB, *that1.FieldB) + } + } else if this.FieldB != nil { + return fmt.Errorf("this.FieldB == nil && that.FieldB != nil") + } else if that1.FieldB != nil { + return fmt.Errorf("FieldB this(%v) Not Equal that(%v)", this.FieldB, that1.FieldB) + } + if !this.FieldC.Equal(that1.FieldC) { + return fmt.Errorf("FieldC this(%v) Not Equal that(%v)", this.FieldC, that1.FieldC) + } + if len(this.FieldD) != len(that1.FieldD) { + return fmt.Errorf("FieldD this(%v) Not Equal that(%v)", len(this.FieldD), len(that1.FieldD)) + } + for i := range this.FieldD { + if !this.FieldD[i].Equal(that1.FieldD[i]) { + return fmt.Errorf("FieldD this[%v](%v) Not Equal that[%v](%v)", i, this.FieldD[i], i, that1.FieldD[i]) + } + } + if this.FieldE != nil && that1.FieldE != nil { + if *this.FieldE != *that1.FieldE { + return fmt.Errorf("FieldE this(%v) Not Equal that(%v)", *this.FieldE, *that1.FieldE) + } + } else if this.FieldE != nil { + return fmt.Errorf("this.FieldE == nil && that.FieldE != nil") + } else if that1.FieldE != nil { + return fmt.Errorf("FieldE this(%v) Not Equal that(%v)", this.FieldE, that1.FieldE) + } + if this.FieldF != nil && that1.FieldF != nil { + if *this.FieldF != *that1.FieldF { + return fmt.Errorf("FieldF this(%v) Not Equal that(%v)", *this.FieldF, *that1.FieldF) + } + } else if this.FieldF != nil { + return fmt.Errorf("this.FieldF == nil && that.FieldF != nil") + } else if that1.FieldF != nil { + return fmt.Errorf("FieldF this(%v) Not Equal that(%v)", this.FieldF, that1.FieldF) + } + if !this.FieldG.Equal(that1.FieldG) { + return fmt.Errorf("FieldG this(%v) Not Equal that(%v)", this.FieldG, that1.FieldG) + } + if this.FieldH != nil && that1.FieldH != nil { + if *this.FieldH != *that1.FieldH { + return fmt.Errorf("FieldH this(%v) Not Equal that(%v)", *this.FieldH, *that1.FieldH) + } + } else if this.FieldH != nil { + return fmt.Errorf("this.FieldH == nil && that.FieldH != nil") + } else if that1.FieldH != nil { + return fmt.Errorf("FieldH this(%v) Not Equal that(%v)", this.FieldH, that1.FieldH) + } + if this.FieldI != nil && that1.FieldI != nil { + if *this.FieldI != *that1.FieldI { + return fmt.Errorf("FieldI this(%v) Not Equal that(%v)", *this.FieldI, *that1.FieldI) + } + } else if this.FieldI != nil { + return fmt.Errorf("this.FieldI == nil && that.FieldI != nil") + } else if that1.FieldI != nil { + return fmt.Errorf("FieldI this(%v) Not Equal that(%v)", this.FieldI, that1.FieldI) + } + if !bytes.Equal(this.FieldJ, that1.FieldJ) { + return fmt.Errorf("FieldJ this(%v) Not Equal that(%v)", this.FieldJ, that1.FieldJ) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *CustomNameNinStruct) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*CustomNameNinStruct) + if !ok { + that2, ok := that.(CustomNameNinStruct) + 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.FieldA != nil && that1.FieldA != nil { + if *this.FieldA != *that1.FieldA { + return false + } + } else if this.FieldA != nil { + return false + } else if that1.FieldA != nil { + return false + } + if this.FieldB != nil && that1.FieldB != nil { + if *this.FieldB != *that1.FieldB { + return false + } + } else if this.FieldB != nil { + return false + } else if that1.FieldB != nil { + return false + } + if !this.FieldC.Equal(that1.FieldC) { + return false + } + if len(this.FieldD) != len(that1.FieldD) { + return false + } + for i := range this.FieldD { + if !this.FieldD[i].Equal(that1.FieldD[i]) { + return false + } + } + if this.FieldE != nil && that1.FieldE != nil { + if *this.FieldE != *that1.FieldE { + return false + } + } else if this.FieldE != nil { + return false + } else if that1.FieldE != nil { + return false + } + if this.FieldF != nil && that1.FieldF != nil { + if *this.FieldF != *that1.FieldF { + return false + } + } else if this.FieldF != nil { + return false + } else if that1.FieldF != nil { + return false + } + if !this.FieldG.Equal(that1.FieldG) { + return false + } + if this.FieldH != nil && that1.FieldH != nil { + if *this.FieldH != *that1.FieldH { + return false + } + } else if this.FieldH != nil { + return false + } else if that1.FieldH != nil { + return false + } + if this.FieldI != nil && that1.FieldI != nil { + if *this.FieldI != *that1.FieldI { + return false + } + } else if this.FieldI != nil { + return false + } else if that1.FieldI != nil { + return false + } + if !bytes.Equal(this.FieldJ, that1.FieldJ) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *CustomNameCustomType) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*CustomNameCustomType) + if !ok { + that2, ok := that.(CustomNameCustomType) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *CustomNameCustomType") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *CustomNameCustomType but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *CustomNameCustomType but is not nil && this == nil") + } + if that1.FieldA == nil { + if this.FieldA != nil { + return fmt.Errorf("this.FieldA != nil && that1.FieldA == nil") + } + } else if !this.FieldA.Equal(*that1.FieldA) { + return fmt.Errorf("FieldA this(%v) Not Equal that(%v)", this.FieldA, that1.FieldA) + } + if that1.FieldB == nil { + if this.FieldB != nil { + return fmt.Errorf("this.FieldB != nil && that1.FieldB == nil") + } + } else if !this.FieldB.Equal(*that1.FieldB) { + return fmt.Errorf("FieldB this(%v) Not Equal that(%v)", this.FieldB, that1.FieldB) + } + if len(this.FieldC) != len(that1.FieldC) { + return fmt.Errorf("FieldC this(%v) Not Equal that(%v)", len(this.FieldC), len(that1.FieldC)) + } + for i := range this.FieldC { + if !this.FieldC[i].Equal(that1.FieldC[i]) { + return fmt.Errorf("FieldC this[%v](%v) Not Equal that[%v](%v)", i, this.FieldC[i], i, that1.FieldC[i]) + } + } + if len(this.FieldD) != len(that1.FieldD) { + return fmt.Errorf("FieldD this(%v) Not Equal that(%v)", len(this.FieldD), len(that1.FieldD)) + } + for i := range this.FieldD { + if !this.FieldD[i].Equal(that1.FieldD[i]) { + return fmt.Errorf("FieldD this[%v](%v) Not Equal that[%v](%v)", i, this.FieldD[i], i, that1.FieldD[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *CustomNameCustomType) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*CustomNameCustomType) + if !ok { + that2, ok := that.(CustomNameCustomType) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + if this == nil { + return true + } + return false + } else if this == nil { + return false + } + if that1.FieldA == nil { + if this.FieldA != nil { + return false + } + } else if !this.FieldA.Equal(*that1.FieldA) { + return false + } + if that1.FieldB == nil { + if this.FieldB != nil { + return false + } + } else if !this.FieldB.Equal(*that1.FieldB) { + return false + } + if len(this.FieldC) != len(that1.FieldC) { + return false + } + for i := range this.FieldC { + if !this.FieldC[i].Equal(that1.FieldC[i]) { + return false + } + } + if len(this.FieldD) != len(that1.FieldD) { + return false + } + for i := range this.FieldD { + if !this.FieldD[i].Equal(that1.FieldD[i]) { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *CustomNameNinEmbeddedStructUnion) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*CustomNameNinEmbeddedStructUnion) + if !ok { + that2, ok := that.(CustomNameNinEmbeddedStructUnion) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *CustomNameNinEmbeddedStructUnion") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *CustomNameNinEmbeddedStructUnion but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *CustomNameNinEmbeddedStructUnion but is not nil && this == nil") + } + if !this.NidOptNative.Equal(that1.NidOptNative) { + return fmt.Errorf("NidOptNative this(%v) Not Equal that(%v)", this.NidOptNative, that1.NidOptNative) + } + if !this.FieldA.Equal(that1.FieldA) { + return fmt.Errorf("FieldA this(%v) Not Equal that(%v)", this.FieldA, that1.FieldA) + } + if this.FieldB != nil && that1.FieldB != nil { + if *this.FieldB != *that1.FieldB { + return fmt.Errorf("FieldB this(%v) Not Equal that(%v)", *this.FieldB, *that1.FieldB) + } + } else if this.FieldB != nil { + return fmt.Errorf("this.FieldB == nil && that.FieldB != nil") + } else if that1.FieldB != nil { + return fmt.Errorf("FieldB this(%v) Not Equal that(%v)", this.FieldB, that1.FieldB) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *CustomNameNinEmbeddedStructUnion) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*CustomNameNinEmbeddedStructUnion) + if !ok { + that2, ok := that.(CustomNameNinEmbeddedStructUnion) + 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.NidOptNative.Equal(that1.NidOptNative) { + return false + } + if !this.FieldA.Equal(that1.FieldA) { + return false + } + if this.FieldB != nil && that1.FieldB != nil { + if *this.FieldB != *that1.FieldB { + return false + } + } else if this.FieldB != nil { + return false + } else if that1.FieldB != nil { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *CustomNameEnum) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*CustomNameEnum) + if !ok { + that2, ok := that.(CustomNameEnum) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *CustomNameEnum") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *CustomNameEnum but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *CustomNameEnum but is not nil && this == nil") + } + if this.FieldA != nil && that1.FieldA != nil { + if *this.FieldA != *that1.FieldA { + return fmt.Errorf("FieldA this(%v) Not Equal that(%v)", *this.FieldA, *that1.FieldA) + } + } else if this.FieldA != nil { + return fmt.Errorf("this.FieldA == nil && that.FieldA != nil") + } else if that1.FieldA != nil { + return fmt.Errorf("FieldA this(%v) Not Equal that(%v)", this.FieldA, that1.FieldA) + } + if len(this.FieldB) != len(that1.FieldB) { + return fmt.Errorf("FieldB this(%v) Not Equal that(%v)", len(this.FieldB), len(that1.FieldB)) + } + for i := range this.FieldB { + if this.FieldB[i] != that1.FieldB[i] { + return fmt.Errorf("FieldB this[%v](%v) Not Equal that[%v](%v)", i, this.FieldB[i], i, that1.FieldB[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *CustomNameEnum) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*CustomNameEnum) + if !ok { + that2, ok := that.(CustomNameEnum) + 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.FieldA != nil && that1.FieldA != nil { + if *this.FieldA != *that1.FieldA { + return false + } + } else if this.FieldA != nil { + return false + } else if that1.FieldA != nil { + return false + } + if len(this.FieldB) != len(that1.FieldB) { + return false + } + for i := range this.FieldB { + if this.FieldB[i] != that1.FieldB[i] { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NoExtensionsMap) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NoExtensionsMap) + if !ok { + that2, ok := that.(NoExtensionsMap) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NoExtensionsMap") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NoExtensionsMap but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NoExtensionsMap but is not nil && this == nil") + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) + } + } else if this.Field1 != nil { + return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") + } else if that1.Field1 != nil { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) + } + if !bytes.Equal(this.XXX_extensions, that1.XXX_extensions) { + return fmt.Errorf("XXX_extensions this(%v) Not Equal that(%v)", this.XXX_extensions, that1.XXX_extensions) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NoExtensionsMap) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*NoExtensionsMap) + if !ok { + that2, ok := that.(NoExtensionsMap) + 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.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return false + } + } else if this.Field1 != nil { + return false + } else if that1.Field1 != nil { + return false + } + if !bytes.Equal(this.XXX_extensions, that1.XXX_extensions) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *Unrecognized) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*Unrecognized) + if !ok { + that2, ok := that.(Unrecognized) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *Unrecognized") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *Unrecognized but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *Unrecognized but is not nil && this == nil") + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) + } + } else if this.Field1 != nil { + return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") + } else if that1.Field1 != nil { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) + } + return nil +} +func (this *Unrecognized) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*Unrecognized) + if !ok { + that2, ok := that.(Unrecognized) + 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.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return false + } + } else if this.Field1 != nil { + return false + } else if that1.Field1 != nil { + return false + } + return true +} +func (this *UnrecognizedWithInner) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*UnrecognizedWithInner) + if !ok { + that2, ok := that.(UnrecognizedWithInner) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *UnrecognizedWithInner") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *UnrecognizedWithInner but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *UnrecognizedWithInner but is not nil && this == nil") + } + if len(this.Embedded) != len(that1.Embedded) { + return fmt.Errorf("Embedded this(%v) Not Equal that(%v)", len(this.Embedded), len(that1.Embedded)) + } + for i := range this.Embedded { + if !this.Embedded[i].Equal(that1.Embedded[i]) { + return fmt.Errorf("Embedded this[%v](%v) Not Equal that[%v](%v)", i, this.Embedded[i], i, that1.Embedded[i]) + } + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", *this.Field2, *that1.Field2) + } + } else if this.Field2 != nil { + return fmt.Errorf("this.Field2 == nil && that.Field2 != nil") + } else if that1.Field2 != nil { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *UnrecognizedWithInner) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*UnrecognizedWithInner) + if !ok { + that2, ok := that.(UnrecognizedWithInner) + 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.Embedded) != len(that1.Embedded) { + return false + } + for i := range this.Embedded { + if !this.Embedded[i].Equal(that1.Embedded[i]) { + return false + } + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + return false + } + } else if this.Field2 != nil { + return false + } else if that1.Field2 != nil { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *UnrecognizedWithInner_Inner) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*UnrecognizedWithInner_Inner) + if !ok { + that2, ok := that.(UnrecognizedWithInner_Inner) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *UnrecognizedWithInner_Inner") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *UnrecognizedWithInner_Inner but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *UnrecognizedWithInner_Inner but is not nil && this == nil") + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) + } + } else if this.Field1 != nil { + return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") + } else if that1.Field1 != nil { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) + } + return nil +} +func (this *UnrecognizedWithInner_Inner) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*UnrecognizedWithInner_Inner) + if !ok { + that2, ok := that.(UnrecognizedWithInner_Inner) + 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.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return false + } + } else if this.Field1 != nil { + return false + } else if that1.Field1 != nil { + return false + } + return true +} +func (this *UnrecognizedWithEmbed) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*UnrecognizedWithEmbed) + if !ok { + that2, ok := that.(UnrecognizedWithEmbed) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *UnrecognizedWithEmbed") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *UnrecognizedWithEmbed but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *UnrecognizedWithEmbed but is not nil && this == nil") + } + if !this.UnrecognizedWithEmbed_Embedded.Equal(&that1.UnrecognizedWithEmbed_Embedded) { + return fmt.Errorf("UnrecognizedWithEmbed_Embedded this(%v) Not Equal that(%v)", this.UnrecognizedWithEmbed_Embedded, that1.UnrecognizedWithEmbed_Embedded) + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", *this.Field2, *that1.Field2) + } + } else if this.Field2 != nil { + return fmt.Errorf("this.Field2 == nil && that.Field2 != nil") + } else if that1.Field2 != nil { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *UnrecognizedWithEmbed) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*UnrecognizedWithEmbed) + if !ok { + that2, ok := that.(UnrecognizedWithEmbed) + 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.UnrecognizedWithEmbed_Embedded.Equal(&that1.UnrecognizedWithEmbed_Embedded) { + return false + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + return false + } + } else if this.Field2 != nil { + return false + } else if that1.Field2 != nil { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *UnrecognizedWithEmbed_Embedded) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*UnrecognizedWithEmbed_Embedded) + if !ok { + that2, ok := that.(UnrecognizedWithEmbed_Embedded) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *UnrecognizedWithEmbed_Embedded") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *UnrecognizedWithEmbed_Embedded but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *UnrecognizedWithEmbed_Embedded but is not nil && this == nil") + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) + } + } else if this.Field1 != nil { + return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") + } else if that1.Field1 != nil { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) + } + return nil +} +func (this *UnrecognizedWithEmbed_Embedded) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*UnrecognizedWithEmbed_Embedded) + if !ok { + that2, ok := that.(UnrecognizedWithEmbed_Embedded) + 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.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return false + } + } else if this.Field1 != nil { + return false + } else if that1.Field1 != nil { + return false + } + return true +} +func (this *Node) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*Node) + if !ok { + that2, ok := that.(Node) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *Node") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *Node but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *Node but is not nil && this == nil") + } + if this.Label != nil && that1.Label != nil { + if *this.Label != *that1.Label { + return fmt.Errorf("Label this(%v) Not Equal that(%v)", *this.Label, *that1.Label) + } + } else if this.Label != nil { + return fmt.Errorf("this.Label == nil && that.Label != nil") + } else if that1.Label != nil { + return fmt.Errorf("Label this(%v) Not Equal that(%v)", this.Label, that1.Label) + } + if len(this.Children) != len(that1.Children) { + return fmt.Errorf("Children this(%v) Not Equal that(%v)", len(this.Children), len(that1.Children)) + } + for i := range this.Children { + if !this.Children[i].Equal(that1.Children[i]) { + return fmt.Errorf("Children this[%v](%v) Not Equal that[%v](%v)", i, this.Children[i], i, that1.Children[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *Node) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*Node) + if !ok { + that2, ok := that.(Node) + 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.Label != nil && that1.Label != nil { + if *this.Label != *that1.Label { + return false + } + } else if this.Label != nil { + return false + } else if that1.Label != nil { + return false + } + if len(this.Children) != len(that1.Children) { + return false + } + for i := range this.Children { + if !this.Children[i].Equal(that1.Children[i]) { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} + +type NidOptNativeFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetField1() float64 + GetField2() float32 + GetField3() int32 + GetField4() int64 + GetField5() uint32 + GetField6() uint64 + GetField7() int32 + GetField8() int64 + GetField9() uint32 + GetField10() int32 + GetField11() uint64 + GetField12() int64 + GetField13() bool + GetField14() string + GetField15() []byte +} + +func (this *NidOptNative) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NidOptNative) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNidOptNativeFromFace(this) +} + +func (this *NidOptNative) GetField1() float64 { + return this.Field1 +} + +func (this *NidOptNative) GetField2() float32 { + return this.Field2 +} + +func (this *NidOptNative) GetField3() int32 { + return this.Field3 +} + +func (this *NidOptNative) GetField4() int64 { + return this.Field4 +} + +func (this *NidOptNative) GetField5() uint32 { + return this.Field5 +} + +func (this *NidOptNative) GetField6() uint64 { + return this.Field6 +} + +func (this *NidOptNative) GetField7() int32 { + return this.Field7 +} + +func (this *NidOptNative) GetField8() int64 { + return this.Field8 +} + +func (this *NidOptNative) GetField9() uint32 { + return this.Field9 +} + +func (this *NidOptNative) GetField10() int32 { + return this.Field10 +} + +func (this *NidOptNative) GetField11() uint64 { + return this.Field11 +} + +func (this *NidOptNative) GetField12() int64 { + return this.Field12 +} + +func (this *NidOptNative) GetField13() bool { + return this.Field13 +} + +func (this *NidOptNative) GetField14() string { + return this.Field14 +} + +func (this *NidOptNative) GetField15() []byte { + return this.Field15 +} + +func NewNidOptNativeFromFace(that NidOptNativeFace) *NidOptNative { + this := &NidOptNative{} + this.Field1 = that.GetField1() + this.Field2 = that.GetField2() + this.Field3 = that.GetField3() + this.Field4 = that.GetField4() + this.Field5 = that.GetField5() + this.Field6 = that.GetField6() + this.Field7 = that.GetField7() + this.Field8 = that.GetField8() + this.Field9 = that.GetField9() + this.Field10 = that.GetField10() + this.Field11 = that.GetField11() + this.Field12 = that.GetField12() + this.Field13 = that.GetField13() + this.Field14 = that.GetField14() + this.Field15 = that.GetField15() + return this +} + +type NinOptNativeFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetField1() *float64 + GetField2() *float32 + GetField3() *int32 + GetField4() *int64 + GetField5() *uint32 + GetField6() *uint64 + GetField7() *int32 + GetField8() *int64 + GetField9() *uint32 + GetField10() *int32 + GetField11() *uint64 + GetField12() *int64 + GetField13() *bool + GetField14() *string + GetField15() []byte +} + +func (this *NinOptNative) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NinOptNative) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNinOptNativeFromFace(this) +} + +func (this *NinOptNative) GetField1() *float64 { + return this.Field1 +} + +func (this *NinOptNative) GetField2() *float32 { + return this.Field2 +} + +func (this *NinOptNative) GetField3() *int32 { + return this.Field3 +} + +func (this *NinOptNative) GetField4() *int64 { + return this.Field4 +} + +func (this *NinOptNative) GetField5() *uint32 { + return this.Field5 +} + +func (this *NinOptNative) GetField6() *uint64 { + return this.Field6 +} + +func (this *NinOptNative) GetField7() *int32 { + return this.Field7 +} + +func (this *NinOptNative) GetField8() *int64 { + return this.Field8 +} + +func (this *NinOptNative) GetField9() *uint32 { + return this.Field9 +} + +func (this *NinOptNative) GetField10() *int32 { + return this.Field10 +} + +func (this *NinOptNative) GetField11() *uint64 { + return this.Field11 +} + +func (this *NinOptNative) GetField12() *int64 { + return this.Field12 +} + +func (this *NinOptNative) GetField13() *bool { + return this.Field13 +} + +func (this *NinOptNative) GetField14() *string { + return this.Field14 +} + +func (this *NinOptNative) GetField15() []byte { + return this.Field15 +} + +func NewNinOptNativeFromFace(that NinOptNativeFace) *NinOptNative { + this := &NinOptNative{} + this.Field1 = that.GetField1() + this.Field2 = that.GetField2() + this.Field3 = that.GetField3() + this.Field4 = that.GetField4() + this.Field5 = that.GetField5() + this.Field6 = that.GetField6() + this.Field7 = that.GetField7() + this.Field8 = that.GetField8() + this.Field9 = that.GetField9() + this.Field10 = that.GetField10() + this.Field11 = that.GetField11() + this.Field12 = that.GetField12() + this.Field13 = that.GetField13() + this.Field14 = that.GetField14() + this.Field15 = that.GetField15() + return this +} + +type NidRepNativeFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetField1() []float64 + GetField2() []float32 + GetField3() []int32 + GetField4() []int64 + GetField5() []uint32 + GetField6() []uint64 + GetField7() []int32 + GetField8() []int64 + GetField9() []uint32 + GetField10() []int32 + GetField11() []uint64 + GetField12() []int64 + GetField13() []bool + GetField14() []string + GetField15() [][]byte +} + +func (this *NidRepNative) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NidRepNative) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNidRepNativeFromFace(this) +} + +func (this *NidRepNative) GetField1() []float64 { + return this.Field1 +} + +func (this *NidRepNative) GetField2() []float32 { + return this.Field2 +} + +func (this *NidRepNative) GetField3() []int32 { + return this.Field3 +} + +func (this *NidRepNative) GetField4() []int64 { + return this.Field4 +} + +func (this *NidRepNative) GetField5() []uint32 { + return this.Field5 +} + +func (this *NidRepNative) GetField6() []uint64 { + return this.Field6 +} + +func (this *NidRepNative) GetField7() []int32 { + return this.Field7 +} + +func (this *NidRepNative) GetField8() []int64 { + return this.Field8 +} + +func (this *NidRepNative) GetField9() []uint32 { + return this.Field9 +} + +func (this *NidRepNative) GetField10() []int32 { + return this.Field10 +} + +func (this *NidRepNative) GetField11() []uint64 { + return this.Field11 +} + +func (this *NidRepNative) GetField12() []int64 { + return this.Field12 +} + +func (this *NidRepNative) GetField13() []bool { + return this.Field13 +} + +func (this *NidRepNative) GetField14() []string { + return this.Field14 +} + +func (this *NidRepNative) GetField15() [][]byte { + return this.Field15 +} + +func NewNidRepNativeFromFace(that NidRepNativeFace) *NidRepNative { + this := &NidRepNative{} + this.Field1 = that.GetField1() + this.Field2 = that.GetField2() + this.Field3 = that.GetField3() + this.Field4 = that.GetField4() + this.Field5 = that.GetField5() + this.Field6 = that.GetField6() + this.Field7 = that.GetField7() + this.Field8 = that.GetField8() + this.Field9 = that.GetField9() + this.Field10 = that.GetField10() + this.Field11 = that.GetField11() + this.Field12 = that.GetField12() + this.Field13 = that.GetField13() + this.Field14 = that.GetField14() + this.Field15 = that.GetField15() + return this +} + +type NinRepNativeFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetField1() []float64 + GetField2() []float32 + GetField3() []int32 + GetField4() []int64 + GetField5() []uint32 + GetField6() []uint64 + GetField7() []int32 + GetField8() []int64 + GetField9() []uint32 + GetField10() []int32 + GetField11() []uint64 + GetField12() []int64 + GetField13() []bool + GetField14() []string + GetField15() [][]byte +} + +func (this *NinRepNative) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NinRepNative) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNinRepNativeFromFace(this) +} + +func (this *NinRepNative) GetField1() []float64 { + return this.Field1 +} + +func (this *NinRepNative) GetField2() []float32 { + return this.Field2 +} + +func (this *NinRepNative) GetField3() []int32 { + return this.Field3 +} + +func (this *NinRepNative) GetField4() []int64 { + return this.Field4 +} + +func (this *NinRepNative) GetField5() []uint32 { + return this.Field5 +} + +func (this *NinRepNative) GetField6() []uint64 { + return this.Field6 +} + +func (this *NinRepNative) GetField7() []int32 { + return this.Field7 +} + +func (this *NinRepNative) GetField8() []int64 { + return this.Field8 +} + +func (this *NinRepNative) GetField9() []uint32 { + return this.Field9 +} + +func (this *NinRepNative) GetField10() []int32 { + return this.Field10 +} + +func (this *NinRepNative) GetField11() []uint64 { + return this.Field11 +} + +func (this *NinRepNative) GetField12() []int64 { + return this.Field12 +} + +func (this *NinRepNative) GetField13() []bool { + return this.Field13 +} + +func (this *NinRepNative) GetField14() []string { + return this.Field14 +} + +func (this *NinRepNative) GetField15() [][]byte { + return this.Field15 +} + +func NewNinRepNativeFromFace(that NinRepNativeFace) *NinRepNative { + this := &NinRepNative{} + this.Field1 = that.GetField1() + this.Field2 = that.GetField2() + this.Field3 = that.GetField3() + this.Field4 = that.GetField4() + this.Field5 = that.GetField5() + this.Field6 = that.GetField6() + this.Field7 = that.GetField7() + this.Field8 = that.GetField8() + this.Field9 = that.GetField9() + this.Field10 = that.GetField10() + this.Field11 = that.GetField11() + this.Field12 = that.GetField12() + this.Field13 = that.GetField13() + this.Field14 = that.GetField14() + this.Field15 = that.GetField15() + return this +} + +type NidRepPackedNativeFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetField1() []float64 + GetField2() []float32 + GetField3() []int32 + GetField4() []int64 + GetField5() []uint32 + GetField6() []uint64 + GetField7() []int32 + GetField8() []int64 + GetField9() []uint32 + GetField10() []int32 + GetField11() []uint64 + GetField12() []int64 + GetField13() []bool +} + +func (this *NidRepPackedNative) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NidRepPackedNative) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNidRepPackedNativeFromFace(this) +} + +func (this *NidRepPackedNative) GetField1() []float64 { + return this.Field1 +} + +func (this *NidRepPackedNative) GetField2() []float32 { + return this.Field2 +} + +func (this *NidRepPackedNative) GetField3() []int32 { + return this.Field3 +} + +func (this *NidRepPackedNative) GetField4() []int64 { + return this.Field4 +} + +func (this *NidRepPackedNative) GetField5() []uint32 { + return this.Field5 +} + +func (this *NidRepPackedNative) GetField6() []uint64 { + return this.Field6 +} + +func (this *NidRepPackedNative) GetField7() []int32 { + return this.Field7 +} + +func (this *NidRepPackedNative) GetField8() []int64 { + return this.Field8 +} + +func (this *NidRepPackedNative) GetField9() []uint32 { + return this.Field9 +} + +func (this *NidRepPackedNative) GetField10() []int32 { + return this.Field10 +} + +func (this *NidRepPackedNative) GetField11() []uint64 { + return this.Field11 +} + +func (this *NidRepPackedNative) GetField12() []int64 { + return this.Field12 +} + +func (this *NidRepPackedNative) GetField13() []bool { + return this.Field13 +} + +func NewNidRepPackedNativeFromFace(that NidRepPackedNativeFace) *NidRepPackedNative { + this := &NidRepPackedNative{} + this.Field1 = that.GetField1() + this.Field2 = that.GetField2() + this.Field3 = that.GetField3() + this.Field4 = that.GetField4() + this.Field5 = that.GetField5() + this.Field6 = that.GetField6() + this.Field7 = that.GetField7() + this.Field8 = that.GetField8() + this.Field9 = that.GetField9() + this.Field10 = that.GetField10() + this.Field11 = that.GetField11() + this.Field12 = that.GetField12() + this.Field13 = that.GetField13() + return this +} + +type NinRepPackedNativeFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetField1() []float64 + GetField2() []float32 + GetField3() []int32 + GetField4() []int64 + GetField5() []uint32 + GetField6() []uint64 + GetField7() []int32 + GetField8() []int64 + GetField9() []uint32 + GetField10() []int32 + GetField11() []uint64 + GetField12() []int64 + GetField13() []bool +} + +func (this *NinRepPackedNative) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NinRepPackedNative) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNinRepPackedNativeFromFace(this) +} + +func (this *NinRepPackedNative) GetField1() []float64 { + return this.Field1 +} + +func (this *NinRepPackedNative) GetField2() []float32 { + return this.Field2 +} + +func (this *NinRepPackedNative) GetField3() []int32 { + return this.Field3 +} + +func (this *NinRepPackedNative) GetField4() []int64 { + return this.Field4 +} + +func (this *NinRepPackedNative) GetField5() []uint32 { + return this.Field5 +} + +func (this *NinRepPackedNative) GetField6() []uint64 { + return this.Field6 +} + +func (this *NinRepPackedNative) GetField7() []int32 { + return this.Field7 +} + +func (this *NinRepPackedNative) GetField8() []int64 { + return this.Field8 +} + +func (this *NinRepPackedNative) GetField9() []uint32 { + return this.Field9 +} + +func (this *NinRepPackedNative) GetField10() []int32 { + return this.Field10 +} + +func (this *NinRepPackedNative) GetField11() []uint64 { + return this.Field11 +} + +func (this *NinRepPackedNative) GetField12() []int64 { + return this.Field12 +} + +func (this *NinRepPackedNative) GetField13() []bool { + return this.Field13 +} + +func NewNinRepPackedNativeFromFace(that NinRepPackedNativeFace) *NinRepPackedNative { + this := &NinRepPackedNative{} + this.Field1 = that.GetField1() + this.Field2 = that.GetField2() + this.Field3 = that.GetField3() + this.Field4 = that.GetField4() + this.Field5 = that.GetField5() + this.Field6 = that.GetField6() + this.Field7 = that.GetField7() + this.Field8 = that.GetField8() + this.Field9 = that.GetField9() + this.Field10 = that.GetField10() + this.Field11 = that.GetField11() + this.Field12 = that.GetField12() + this.Field13 = that.GetField13() + return this +} + +type NidOptStructFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetField1() float64 + GetField2() float32 + GetField3() NidOptNative + GetField4() NinOptNative + GetField6() uint64 + GetField7() int32 + GetField8() NidOptNative + GetField13() bool + GetField14() string + GetField15() []byte +} + +func (this *NidOptStruct) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NidOptStruct) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNidOptStructFromFace(this) +} + +func (this *NidOptStruct) GetField1() float64 { + return this.Field1 +} + +func (this *NidOptStruct) GetField2() float32 { + return this.Field2 +} + +func (this *NidOptStruct) GetField3() NidOptNative { + return this.Field3 +} + +func (this *NidOptStruct) GetField4() NinOptNative { + return this.Field4 +} + +func (this *NidOptStruct) GetField6() uint64 { + return this.Field6 +} + +func (this *NidOptStruct) GetField7() int32 { + return this.Field7 +} + +func (this *NidOptStruct) GetField8() NidOptNative { + return this.Field8 +} + +func (this *NidOptStruct) GetField13() bool { + return this.Field13 +} + +func (this *NidOptStruct) GetField14() string { + return this.Field14 +} + +func (this *NidOptStruct) GetField15() []byte { + return this.Field15 +} + +func NewNidOptStructFromFace(that NidOptStructFace) *NidOptStruct { + this := &NidOptStruct{} + this.Field1 = that.GetField1() + this.Field2 = that.GetField2() + this.Field3 = that.GetField3() + this.Field4 = that.GetField4() + this.Field6 = that.GetField6() + this.Field7 = that.GetField7() + this.Field8 = that.GetField8() + this.Field13 = that.GetField13() + this.Field14 = that.GetField14() + this.Field15 = that.GetField15() + return this +} + +type NinOptStructFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetField1() *float64 + GetField2() *float32 + GetField3() *NidOptNative + GetField4() *NinOptNative + GetField6() *uint64 + GetField7() *int32 + GetField8() *NidOptNative + GetField13() *bool + GetField14() *string + GetField15() []byte +} + +func (this *NinOptStruct) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NinOptStruct) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNinOptStructFromFace(this) +} + +func (this *NinOptStruct) GetField1() *float64 { + return this.Field1 +} + +func (this *NinOptStruct) GetField2() *float32 { + return this.Field2 +} + +func (this *NinOptStruct) GetField3() *NidOptNative { + return this.Field3 +} + +func (this *NinOptStruct) GetField4() *NinOptNative { + return this.Field4 +} + +func (this *NinOptStruct) GetField6() *uint64 { + return this.Field6 +} + +func (this *NinOptStruct) GetField7() *int32 { + return this.Field7 +} + +func (this *NinOptStruct) GetField8() *NidOptNative { + return this.Field8 +} + +func (this *NinOptStruct) GetField13() *bool { + return this.Field13 +} + +func (this *NinOptStruct) GetField14() *string { + return this.Field14 +} + +func (this *NinOptStruct) GetField15() []byte { + return this.Field15 +} + +func NewNinOptStructFromFace(that NinOptStructFace) *NinOptStruct { + this := &NinOptStruct{} + this.Field1 = that.GetField1() + this.Field2 = that.GetField2() + this.Field3 = that.GetField3() + this.Field4 = that.GetField4() + this.Field6 = that.GetField6() + this.Field7 = that.GetField7() + this.Field8 = that.GetField8() + this.Field13 = that.GetField13() + this.Field14 = that.GetField14() + this.Field15 = that.GetField15() + return this +} + +type NidRepStructFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetField1() []float64 + GetField2() []float32 + GetField3() []NidOptNative + GetField4() []NinOptNative + GetField6() []uint64 + GetField7() []int32 + GetField8() []NidOptNative + GetField13() []bool + GetField14() []string + GetField15() [][]byte +} + +func (this *NidRepStruct) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NidRepStruct) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNidRepStructFromFace(this) +} + +func (this *NidRepStruct) GetField1() []float64 { + return this.Field1 +} + +func (this *NidRepStruct) GetField2() []float32 { + return this.Field2 +} + +func (this *NidRepStruct) GetField3() []NidOptNative { + return this.Field3 +} + +func (this *NidRepStruct) GetField4() []NinOptNative { + return this.Field4 +} + +func (this *NidRepStruct) GetField6() []uint64 { + return this.Field6 +} + +func (this *NidRepStruct) GetField7() []int32 { + return this.Field7 +} + +func (this *NidRepStruct) GetField8() []NidOptNative { + return this.Field8 +} + +func (this *NidRepStruct) GetField13() []bool { + return this.Field13 +} + +func (this *NidRepStruct) GetField14() []string { + return this.Field14 +} + +func (this *NidRepStruct) GetField15() [][]byte { + return this.Field15 +} + +func NewNidRepStructFromFace(that NidRepStructFace) *NidRepStruct { + this := &NidRepStruct{} + this.Field1 = that.GetField1() + this.Field2 = that.GetField2() + this.Field3 = that.GetField3() + this.Field4 = that.GetField4() + this.Field6 = that.GetField6() + this.Field7 = that.GetField7() + this.Field8 = that.GetField8() + this.Field13 = that.GetField13() + this.Field14 = that.GetField14() + this.Field15 = that.GetField15() + return this +} + +type NinRepStructFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetField1() []float64 + GetField2() []float32 + GetField3() []*NidOptNative + GetField4() []*NinOptNative + GetField6() []uint64 + GetField7() []int32 + GetField8() []*NidOptNative + GetField13() []bool + GetField14() []string + GetField15() [][]byte +} + +func (this *NinRepStruct) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NinRepStruct) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNinRepStructFromFace(this) +} + +func (this *NinRepStruct) GetField1() []float64 { + return this.Field1 +} + +func (this *NinRepStruct) GetField2() []float32 { + return this.Field2 +} + +func (this *NinRepStruct) GetField3() []*NidOptNative { + return this.Field3 +} + +func (this *NinRepStruct) GetField4() []*NinOptNative { + return this.Field4 +} + +func (this *NinRepStruct) GetField6() []uint64 { + return this.Field6 +} + +func (this *NinRepStruct) GetField7() []int32 { + return this.Field7 +} + +func (this *NinRepStruct) GetField8() []*NidOptNative { + return this.Field8 +} + +func (this *NinRepStruct) GetField13() []bool { + return this.Field13 +} + +func (this *NinRepStruct) GetField14() []string { + return this.Field14 +} + +func (this *NinRepStruct) GetField15() [][]byte { + return this.Field15 +} + +func NewNinRepStructFromFace(that NinRepStructFace) *NinRepStruct { + this := &NinRepStruct{} + this.Field1 = that.GetField1() + this.Field2 = that.GetField2() + this.Field3 = that.GetField3() + this.Field4 = that.GetField4() + this.Field6 = that.GetField6() + this.Field7 = that.GetField7() + this.Field8 = that.GetField8() + this.Field13 = that.GetField13() + this.Field14 = that.GetField14() + this.Field15 = that.GetField15() + return this +} + +type NidEmbeddedStructFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetNidOptNative() *NidOptNative + GetField200() NidOptNative + GetField210() bool +} + +func (this *NidEmbeddedStruct) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NidEmbeddedStruct) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNidEmbeddedStructFromFace(this) +} + +func (this *NidEmbeddedStruct) GetNidOptNative() *NidOptNative { + return this.NidOptNative +} + +func (this *NidEmbeddedStruct) GetField200() NidOptNative { + return this.Field200 +} + +func (this *NidEmbeddedStruct) GetField210() bool { + return this.Field210 +} + +func NewNidEmbeddedStructFromFace(that NidEmbeddedStructFace) *NidEmbeddedStruct { + this := &NidEmbeddedStruct{} + this.NidOptNative = that.GetNidOptNative() + this.Field200 = that.GetField200() + this.Field210 = that.GetField210() + return this +} + +type NinEmbeddedStructFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetNidOptNative() *NidOptNative + GetField200() *NidOptNative + GetField210() *bool +} + +func (this *NinEmbeddedStruct) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NinEmbeddedStruct) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNinEmbeddedStructFromFace(this) +} + +func (this *NinEmbeddedStruct) GetNidOptNative() *NidOptNative { + return this.NidOptNative +} + +func (this *NinEmbeddedStruct) GetField200() *NidOptNative { + return this.Field200 +} + +func (this *NinEmbeddedStruct) GetField210() *bool { + return this.Field210 +} + +func NewNinEmbeddedStructFromFace(that NinEmbeddedStructFace) *NinEmbeddedStruct { + this := &NinEmbeddedStruct{} + this.NidOptNative = that.GetNidOptNative() + this.Field200 = that.GetField200() + this.Field210 = that.GetField210() + return this +} + +type NidNestedStructFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetField1() NidOptStruct + GetField2() []NidRepStruct +} + +func (this *NidNestedStruct) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NidNestedStruct) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNidNestedStructFromFace(this) +} + +func (this *NidNestedStruct) GetField1() NidOptStruct { + return this.Field1 +} + +func (this *NidNestedStruct) GetField2() []NidRepStruct { + return this.Field2 +} + +func NewNidNestedStructFromFace(that NidNestedStructFace) *NidNestedStruct { + this := &NidNestedStruct{} + this.Field1 = that.GetField1() + this.Field2 = that.GetField2() + return this +} + +type NinNestedStructFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetField1() *NinOptStruct + GetField2() []*NinRepStruct +} + +func (this *NinNestedStruct) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NinNestedStruct) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNinNestedStructFromFace(this) +} + +func (this *NinNestedStruct) GetField1() *NinOptStruct { + return this.Field1 +} + +func (this *NinNestedStruct) GetField2() []*NinRepStruct { + return this.Field2 +} + +func NewNinNestedStructFromFace(that NinNestedStructFace) *NinNestedStruct { + this := &NinNestedStruct{} + this.Field1 = that.GetField1() + this.Field2 = that.GetField2() + return this +} + +type NidOptCustomFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetId() Uuid + GetValue() github_com_gogo_protobuf_test_custom.Uint128 +} + +func (this *NidOptCustom) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NidOptCustom) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNidOptCustomFromFace(this) +} + +func (this *NidOptCustom) GetId() Uuid { + return this.Id +} + +func (this *NidOptCustom) GetValue() github_com_gogo_protobuf_test_custom.Uint128 { + return this.Value +} + +func NewNidOptCustomFromFace(that NidOptCustomFace) *NidOptCustom { + this := &NidOptCustom{} + this.Id = that.GetId() + this.Value = that.GetValue() + return this +} + +type CustomDashFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetValue() *github_com_gogo_protobuf_test_custom_dash_type.Bytes +} + +func (this *CustomDash) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *CustomDash) TestProto() github_com_gogo_protobuf_proto.Message { + return NewCustomDashFromFace(this) +} + +func (this *CustomDash) GetValue() *github_com_gogo_protobuf_test_custom_dash_type.Bytes { + return this.Value +} + +func NewCustomDashFromFace(that CustomDashFace) *CustomDash { + this := &CustomDash{} + this.Value = that.GetValue() + return this +} + +type NinOptCustomFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetId() *Uuid + GetValue() *github_com_gogo_protobuf_test_custom.Uint128 +} + +func (this *NinOptCustom) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NinOptCustom) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNinOptCustomFromFace(this) +} + +func (this *NinOptCustom) GetId() *Uuid { + return this.Id +} + +func (this *NinOptCustom) GetValue() *github_com_gogo_protobuf_test_custom.Uint128 { + return this.Value +} + +func NewNinOptCustomFromFace(that NinOptCustomFace) *NinOptCustom { + this := &NinOptCustom{} + this.Id = that.GetId() + this.Value = that.GetValue() + return this +} + +type NidRepCustomFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetId() []Uuid + GetValue() []github_com_gogo_protobuf_test_custom.Uint128 +} + +func (this *NidRepCustom) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NidRepCustom) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNidRepCustomFromFace(this) +} + +func (this *NidRepCustom) GetId() []Uuid { + return this.Id +} + +func (this *NidRepCustom) GetValue() []github_com_gogo_protobuf_test_custom.Uint128 { + return this.Value +} + +func NewNidRepCustomFromFace(that NidRepCustomFace) *NidRepCustom { + this := &NidRepCustom{} + this.Id = that.GetId() + this.Value = that.GetValue() + return this +} + +type NinRepCustomFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetId() []Uuid + GetValue() []github_com_gogo_protobuf_test_custom.Uint128 +} + +func (this *NinRepCustom) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NinRepCustom) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNinRepCustomFromFace(this) +} + +func (this *NinRepCustom) GetId() []Uuid { + return this.Id +} + +func (this *NinRepCustom) GetValue() []github_com_gogo_protobuf_test_custom.Uint128 { + return this.Value +} + +func NewNinRepCustomFromFace(that NinRepCustomFace) *NinRepCustom { + this := &NinRepCustom{} + this.Id = that.GetId() + this.Value = that.GetValue() + return this +} + +type NinOptNativeUnionFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetField1() *float64 + GetField2() *float32 + GetField3() *int32 + GetField4() *int64 + GetField5() *uint32 + GetField6() *uint64 + GetField13() *bool + GetField14() *string + GetField15() []byte +} + +func (this *NinOptNativeUnion) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NinOptNativeUnion) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNinOptNativeUnionFromFace(this) +} + +func (this *NinOptNativeUnion) GetField1() *float64 { + return this.Field1 +} + +func (this *NinOptNativeUnion) GetField2() *float32 { + return this.Field2 +} + +func (this *NinOptNativeUnion) GetField3() *int32 { + return this.Field3 +} + +func (this *NinOptNativeUnion) GetField4() *int64 { + return this.Field4 +} + +func (this *NinOptNativeUnion) GetField5() *uint32 { + return this.Field5 +} + +func (this *NinOptNativeUnion) GetField6() *uint64 { + return this.Field6 +} + +func (this *NinOptNativeUnion) GetField13() *bool { + return this.Field13 +} + +func (this *NinOptNativeUnion) GetField14() *string { + return this.Field14 +} + +func (this *NinOptNativeUnion) GetField15() []byte { + return this.Field15 +} + +func NewNinOptNativeUnionFromFace(that NinOptNativeUnionFace) *NinOptNativeUnion { + this := &NinOptNativeUnion{} + this.Field1 = that.GetField1() + this.Field2 = that.GetField2() + this.Field3 = that.GetField3() + this.Field4 = that.GetField4() + this.Field5 = that.GetField5() + this.Field6 = that.GetField6() + this.Field13 = that.GetField13() + this.Field14 = that.GetField14() + this.Field15 = that.GetField15() + return this +} + +type NinOptStructUnionFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetField1() *float64 + GetField2() *float32 + GetField3() *NidOptNative + GetField4() *NinOptNative + GetField6() *uint64 + GetField7() *int32 + GetField13() *bool + GetField14() *string + GetField15() []byte +} + +func (this *NinOptStructUnion) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NinOptStructUnion) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNinOptStructUnionFromFace(this) +} + +func (this *NinOptStructUnion) GetField1() *float64 { + return this.Field1 +} + +func (this *NinOptStructUnion) GetField2() *float32 { + return this.Field2 +} + +func (this *NinOptStructUnion) GetField3() *NidOptNative { + return this.Field3 +} + +func (this *NinOptStructUnion) GetField4() *NinOptNative { + return this.Field4 +} + +func (this *NinOptStructUnion) GetField6() *uint64 { + return this.Field6 +} + +func (this *NinOptStructUnion) GetField7() *int32 { + return this.Field7 +} + +func (this *NinOptStructUnion) GetField13() *bool { + return this.Field13 +} + +func (this *NinOptStructUnion) GetField14() *string { + return this.Field14 +} + +func (this *NinOptStructUnion) GetField15() []byte { + return this.Field15 +} + +func NewNinOptStructUnionFromFace(that NinOptStructUnionFace) *NinOptStructUnion { + this := &NinOptStructUnion{} + this.Field1 = that.GetField1() + this.Field2 = that.GetField2() + this.Field3 = that.GetField3() + this.Field4 = that.GetField4() + this.Field6 = that.GetField6() + this.Field7 = that.GetField7() + this.Field13 = that.GetField13() + this.Field14 = that.GetField14() + this.Field15 = that.GetField15() + return this +} + +type NinEmbeddedStructUnionFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetNidOptNative() *NidOptNative + GetField200() *NinOptNative + GetField210() *bool +} + +func (this *NinEmbeddedStructUnion) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NinEmbeddedStructUnion) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNinEmbeddedStructUnionFromFace(this) +} + +func (this *NinEmbeddedStructUnion) GetNidOptNative() *NidOptNative { + return this.NidOptNative +} + +func (this *NinEmbeddedStructUnion) GetField200() *NinOptNative { + return this.Field200 +} + +func (this *NinEmbeddedStructUnion) GetField210() *bool { + return this.Field210 +} + +func NewNinEmbeddedStructUnionFromFace(that NinEmbeddedStructUnionFace) *NinEmbeddedStructUnion { + this := &NinEmbeddedStructUnion{} + this.NidOptNative = that.GetNidOptNative() + this.Field200 = that.GetField200() + this.Field210 = that.GetField210() + return this +} + +type NinNestedStructUnionFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetField1() *NinOptNativeUnion + GetField2() *NinOptStructUnion + GetField3() *NinEmbeddedStructUnion +} + +func (this *NinNestedStructUnion) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NinNestedStructUnion) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNinNestedStructUnionFromFace(this) +} + +func (this *NinNestedStructUnion) GetField1() *NinOptNativeUnion { + return this.Field1 +} + +func (this *NinNestedStructUnion) GetField2() *NinOptStructUnion { + return this.Field2 +} + +func (this *NinNestedStructUnion) GetField3() *NinEmbeddedStructUnion { + return this.Field3 +} + +func NewNinNestedStructUnionFromFace(that NinNestedStructUnionFace) *NinNestedStructUnion { + this := &NinNestedStructUnion{} + this.Field1 = that.GetField1() + this.Field2 = that.GetField2() + this.Field3 = that.GetField3() + return this +} + +type TreeFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetOr() *OrBranch + GetAnd() *AndBranch + GetLeaf() *Leaf +} + +func (this *Tree) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *Tree) TestProto() github_com_gogo_protobuf_proto.Message { + return NewTreeFromFace(this) +} + +func (this *Tree) GetOr() *OrBranch { + return this.Or +} + +func (this *Tree) GetAnd() *AndBranch { + return this.And +} + +func (this *Tree) GetLeaf() *Leaf { + return this.Leaf +} + +func NewTreeFromFace(that TreeFace) *Tree { + this := &Tree{} + this.Or = that.GetOr() + this.And = that.GetAnd() + this.Leaf = that.GetLeaf() + return this +} + +type OrBranchFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetLeft() Tree + GetRight() Tree +} + +func (this *OrBranch) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *OrBranch) TestProto() github_com_gogo_protobuf_proto.Message { + return NewOrBranchFromFace(this) +} + +func (this *OrBranch) GetLeft() Tree { + return this.Left +} + +func (this *OrBranch) GetRight() Tree { + return this.Right +} + +func NewOrBranchFromFace(that OrBranchFace) *OrBranch { + this := &OrBranch{} + this.Left = that.GetLeft() + this.Right = that.GetRight() + return this +} + +type AndBranchFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetLeft() Tree + GetRight() Tree +} + +func (this *AndBranch) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *AndBranch) TestProto() github_com_gogo_protobuf_proto.Message { + return NewAndBranchFromFace(this) +} + +func (this *AndBranch) GetLeft() Tree { + return this.Left +} + +func (this *AndBranch) GetRight() Tree { + return this.Right +} + +func NewAndBranchFromFace(that AndBranchFace) *AndBranch { + this := &AndBranch{} + this.Left = that.GetLeft() + this.Right = that.GetRight() + return this +} + +type LeafFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetValue() int64 + GetStrValue() string +} + +func (this *Leaf) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *Leaf) TestProto() github_com_gogo_protobuf_proto.Message { + return NewLeafFromFace(this) +} + +func (this *Leaf) GetValue() int64 { + return this.Value +} + +func (this *Leaf) GetStrValue() string { + return this.StrValue +} + +func NewLeafFromFace(that LeafFace) *Leaf { + this := &Leaf{} + this.Value = that.GetValue() + this.StrValue = that.GetStrValue() + return this +} + +type DeepTreeFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetDown() *ADeepBranch + GetAnd() *AndDeepBranch + GetLeaf() *DeepLeaf +} + +func (this *DeepTree) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *DeepTree) TestProto() github_com_gogo_protobuf_proto.Message { + return NewDeepTreeFromFace(this) +} + +func (this *DeepTree) GetDown() *ADeepBranch { + return this.Down +} + +func (this *DeepTree) GetAnd() *AndDeepBranch { + return this.And +} + +func (this *DeepTree) GetLeaf() *DeepLeaf { + return this.Leaf +} + +func NewDeepTreeFromFace(that DeepTreeFace) *DeepTree { + this := &DeepTree{} + this.Down = that.GetDown() + this.And = that.GetAnd() + this.Leaf = that.GetLeaf() + return this +} + +type ADeepBranchFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetDown() DeepTree +} + +func (this *ADeepBranch) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *ADeepBranch) TestProto() github_com_gogo_protobuf_proto.Message { + return NewADeepBranchFromFace(this) +} + +func (this *ADeepBranch) GetDown() DeepTree { + return this.Down +} + +func NewADeepBranchFromFace(that ADeepBranchFace) *ADeepBranch { + this := &ADeepBranch{} + this.Down = that.GetDown() + return this +} + +type AndDeepBranchFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetLeft() DeepTree + GetRight() DeepTree +} + +func (this *AndDeepBranch) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *AndDeepBranch) TestProto() github_com_gogo_protobuf_proto.Message { + return NewAndDeepBranchFromFace(this) +} + +func (this *AndDeepBranch) GetLeft() DeepTree { + return this.Left +} + +func (this *AndDeepBranch) GetRight() DeepTree { + return this.Right +} + +func NewAndDeepBranchFromFace(that AndDeepBranchFace) *AndDeepBranch { + this := &AndDeepBranch{} + this.Left = that.GetLeft() + this.Right = that.GetRight() + return this +} + +type DeepLeafFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetTree() Tree +} + +func (this *DeepLeaf) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *DeepLeaf) TestProto() github_com_gogo_protobuf_proto.Message { + return NewDeepLeafFromFace(this) +} + +func (this *DeepLeaf) GetTree() Tree { + return this.Tree +} + +func NewDeepLeafFromFace(that DeepLeafFace) *DeepLeaf { + this := &DeepLeaf{} + this.Tree = that.GetTree() + return this +} + +type NilFace interface { + Proto() github_com_gogo_protobuf_proto.Message +} + +func (this *Nil) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *Nil) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNilFromFace(this) +} + +func NewNilFromFace(that NilFace) *Nil { + this := &Nil{} + return this +} + +type NidOptEnumFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetField1() TheTestEnum +} + +func (this *NidOptEnum) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NidOptEnum) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNidOptEnumFromFace(this) +} + +func (this *NidOptEnum) GetField1() TheTestEnum { + return this.Field1 +} + +func NewNidOptEnumFromFace(that NidOptEnumFace) *NidOptEnum { + this := &NidOptEnum{} + this.Field1 = that.GetField1() + return this +} + +type NinOptEnumFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetField1() *TheTestEnum + GetField2() *YetAnotherTestEnum + GetField3() *YetYetAnotherTestEnum +} + +func (this *NinOptEnum) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NinOptEnum) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNinOptEnumFromFace(this) +} + +func (this *NinOptEnum) GetField1() *TheTestEnum { + return this.Field1 +} + +func (this *NinOptEnum) GetField2() *YetAnotherTestEnum { + return this.Field2 +} + +func (this *NinOptEnum) GetField3() *YetYetAnotherTestEnum { + return this.Field3 +} + +func NewNinOptEnumFromFace(that NinOptEnumFace) *NinOptEnum { + this := &NinOptEnum{} + this.Field1 = that.GetField1() + this.Field2 = that.GetField2() + this.Field3 = that.GetField3() + return this +} + +type NidRepEnumFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetField1() []TheTestEnum + GetField2() []YetAnotherTestEnum + GetField3() []YetYetAnotherTestEnum +} + +func (this *NidRepEnum) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NidRepEnum) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNidRepEnumFromFace(this) +} + +func (this *NidRepEnum) GetField1() []TheTestEnum { + return this.Field1 +} + +func (this *NidRepEnum) GetField2() []YetAnotherTestEnum { + return this.Field2 +} + +func (this *NidRepEnum) GetField3() []YetYetAnotherTestEnum { + return this.Field3 +} + +func NewNidRepEnumFromFace(that NidRepEnumFace) *NidRepEnum { + this := &NidRepEnum{} + this.Field1 = that.GetField1() + this.Field2 = that.GetField2() + this.Field3 = that.GetField3() + return this +} + +type NinRepEnumFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetField1() []TheTestEnum + GetField2() []YetAnotherTestEnum + GetField3() []YetYetAnotherTestEnum +} + +func (this *NinRepEnum) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NinRepEnum) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNinRepEnumFromFace(this) +} + +func (this *NinRepEnum) GetField1() []TheTestEnum { + return this.Field1 +} + +func (this *NinRepEnum) GetField2() []YetAnotherTestEnum { + return this.Field2 +} + +func (this *NinRepEnum) GetField3() []YetYetAnotherTestEnum { + return this.Field3 +} + +func NewNinRepEnumFromFace(that NinRepEnumFace) *NinRepEnum { + this := &NinRepEnum{} + this.Field1 = that.GetField1() + this.Field2 = that.GetField2() + this.Field3 = that.GetField3() + return this +} + +type AnotherNinOptEnumFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetField1() *AnotherTestEnum + GetField2() *YetAnotherTestEnum + GetField3() *YetYetAnotherTestEnum +} + +func (this *AnotherNinOptEnum) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *AnotherNinOptEnum) TestProto() github_com_gogo_protobuf_proto.Message { + return NewAnotherNinOptEnumFromFace(this) +} + +func (this *AnotherNinOptEnum) GetField1() *AnotherTestEnum { + return this.Field1 +} + +func (this *AnotherNinOptEnum) GetField2() *YetAnotherTestEnum { + return this.Field2 +} + +func (this *AnotherNinOptEnum) GetField3() *YetYetAnotherTestEnum { + return this.Field3 +} + +func NewAnotherNinOptEnumFromFace(that AnotherNinOptEnumFace) *AnotherNinOptEnum { + this := &AnotherNinOptEnum{} + this.Field1 = that.GetField1() + this.Field2 = that.GetField2() + this.Field3 = that.GetField3() + return this +} + +type TimerFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetTime1() int64 + GetTime2() int64 + GetData() []byte +} + +func (this *Timer) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *Timer) TestProto() github_com_gogo_protobuf_proto.Message { + return NewTimerFromFace(this) +} + +func (this *Timer) GetTime1() int64 { + return this.Time1 +} + +func (this *Timer) GetTime2() int64 { + return this.Time2 +} + +func (this *Timer) GetData() []byte { + return this.Data +} + +func NewTimerFromFace(that TimerFace) *Timer { + this := &Timer{} + this.Time1 = that.GetTime1() + this.Time2 = that.GetTime2() + this.Data = that.GetData() + return this +} + +type NestedDefinitionFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetField1() *int64 + GetEnumField() *NestedDefinition_NestedEnum + GetNNM() *NestedDefinition_NestedMessage_NestedNestedMsg + GetNM() *NestedDefinition_NestedMessage +} + +func (this *NestedDefinition) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NestedDefinition) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNestedDefinitionFromFace(this) +} + +func (this *NestedDefinition) GetField1() *int64 { + return this.Field1 +} + +func (this *NestedDefinition) GetEnumField() *NestedDefinition_NestedEnum { + return this.EnumField +} + +func (this *NestedDefinition) GetNNM() *NestedDefinition_NestedMessage_NestedNestedMsg { + return this.NNM +} + +func (this *NestedDefinition) GetNM() *NestedDefinition_NestedMessage { + return this.NM +} + +func NewNestedDefinitionFromFace(that NestedDefinitionFace) *NestedDefinition { + this := &NestedDefinition{} + this.Field1 = that.GetField1() + this.EnumField = that.GetEnumField() + this.NNM = that.GetNNM() + this.NM = that.GetNM() + return this +} + +type NestedDefinition_NestedMessageFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetNestedField1() *uint64 + GetNNM() *NestedDefinition_NestedMessage_NestedNestedMsg +} + +func (this *NestedDefinition_NestedMessage) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NestedDefinition_NestedMessage) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNestedDefinition_NestedMessageFromFace(this) +} + +func (this *NestedDefinition_NestedMessage) GetNestedField1() *uint64 { + return this.NestedField1 +} + +func (this *NestedDefinition_NestedMessage) GetNNM() *NestedDefinition_NestedMessage_NestedNestedMsg { + return this.NNM +} + +func NewNestedDefinition_NestedMessageFromFace(that NestedDefinition_NestedMessageFace) *NestedDefinition_NestedMessage { + this := &NestedDefinition_NestedMessage{} + this.NestedField1 = that.GetNestedField1() + this.NNM = that.GetNNM() + return this +} + +type NestedDefinition_NestedMessage_NestedNestedMsgFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetNestedNestedField1() *string +} + +func (this *NestedDefinition_NestedMessage_NestedNestedMsg) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NestedDefinition_NestedMessage_NestedNestedMsg) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNestedDefinition_NestedMessage_NestedNestedMsgFromFace(this) +} + +func (this *NestedDefinition_NestedMessage_NestedNestedMsg) GetNestedNestedField1() *string { + return this.NestedNestedField1 +} + +func NewNestedDefinition_NestedMessage_NestedNestedMsgFromFace(that NestedDefinition_NestedMessage_NestedNestedMsgFace) *NestedDefinition_NestedMessage_NestedNestedMsg { + this := &NestedDefinition_NestedMessage_NestedNestedMsg{} + this.NestedNestedField1 = that.GetNestedNestedField1() + return this +} + +type NestedScopeFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetA() *NestedDefinition_NestedMessage_NestedNestedMsg + GetB() *NestedDefinition_NestedEnum + GetC() *NestedDefinition_NestedMessage +} + +func (this *NestedScope) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NestedScope) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNestedScopeFromFace(this) +} + +func (this *NestedScope) GetA() *NestedDefinition_NestedMessage_NestedNestedMsg { + return this.A +} + +func (this *NestedScope) GetB() *NestedDefinition_NestedEnum { + return this.B +} + +func (this *NestedScope) GetC() *NestedDefinition_NestedMessage { + return this.C +} + +func NewNestedScopeFromFace(that NestedScopeFace) *NestedScope { + this := &NestedScope{} + this.A = that.GetA() + this.B = that.GetB() + this.C = that.GetC() + return this +} + +type CustomContainerFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetCustomStruct() NidOptCustom +} + +func (this *CustomContainer) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *CustomContainer) TestProto() github_com_gogo_protobuf_proto.Message { + return NewCustomContainerFromFace(this) +} + +func (this *CustomContainer) GetCustomStruct() NidOptCustom { + return this.CustomStruct +} + +func NewCustomContainerFromFace(that CustomContainerFace) *CustomContainer { + this := &CustomContainer{} + this.CustomStruct = that.GetCustomStruct() + return this +} + +type CustomNameNidOptNativeFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetFieldA() float64 + GetFieldB() float32 + GetFieldC() int32 + GetFieldD() int64 + GetFieldE() uint32 + GetFieldF() uint64 + GetFieldG() int32 + GetFieldH() int64 + GetFieldI() uint32 + GetFieldJ() int32 + GetFieldK() uint64 + GetFieldL() int64 + GetFieldM() bool + GetFieldN() string + GetFieldO() []byte +} + +func (this *CustomNameNidOptNative) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *CustomNameNidOptNative) TestProto() github_com_gogo_protobuf_proto.Message { + return NewCustomNameNidOptNativeFromFace(this) +} + +func (this *CustomNameNidOptNative) GetFieldA() float64 { + return this.FieldA +} + +func (this *CustomNameNidOptNative) GetFieldB() float32 { + return this.FieldB +} + +func (this *CustomNameNidOptNative) GetFieldC() int32 { + return this.FieldC +} + +func (this *CustomNameNidOptNative) GetFieldD() int64 { + return this.FieldD +} + +func (this *CustomNameNidOptNative) GetFieldE() uint32 { + return this.FieldE +} + +func (this *CustomNameNidOptNative) GetFieldF() uint64 { + return this.FieldF +} + +func (this *CustomNameNidOptNative) GetFieldG() int32 { + return this.FieldG +} + +func (this *CustomNameNidOptNative) GetFieldH() int64 { + return this.FieldH +} + +func (this *CustomNameNidOptNative) GetFieldI() uint32 { + return this.FieldI +} + +func (this *CustomNameNidOptNative) GetFieldJ() int32 { + return this.FieldJ +} + +func (this *CustomNameNidOptNative) GetFieldK() uint64 { + return this.FieldK +} + +func (this *CustomNameNidOptNative) GetFieldL() int64 { + return this.FieldL +} + +func (this *CustomNameNidOptNative) GetFieldM() bool { + return this.FieldM +} + +func (this *CustomNameNidOptNative) GetFieldN() string { + return this.FieldN +} + +func (this *CustomNameNidOptNative) GetFieldO() []byte { + return this.FieldO +} + +func NewCustomNameNidOptNativeFromFace(that CustomNameNidOptNativeFace) *CustomNameNidOptNative { + this := &CustomNameNidOptNative{} + this.FieldA = that.GetFieldA() + this.FieldB = that.GetFieldB() + this.FieldC = that.GetFieldC() + this.FieldD = that.GetFieldD() + this.FieldE = that.GetFieldE() + this.FieldF = that.GetFieldF() + this.FieldG = that.GetFieldG() + this.FieldH = that.GetFieldH() + this.FieldI = that.GetFieldI() + this.FieldJ = that.GetFieldJ() + this.FieldK = that.GetFieldK() + this.FieldL = that.GetFieldL() + this.FieldM = that.GetFieldM() + this.FieldN = that.GetFieldN() + this.FieldO = that.GetFieldO() + return this +} + +type CustomNameNinOptNativeFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetFieldA() *float64 + GetFieldB() *float32 + GetFieldC() *int32 + GetFieldD() *int64 + GetFieldE() *uint32 + GetFieldF() *uint64 + GetFieldG() *int32 + GetFieldH() *int64 + GetFieldI() *uint32 + GetFieldJ() *int32 + GetFieldK() *uint64 + GetFielL() *int64 + GetFieldM() *bool + GetFieldN() *string + GetFieldO() []byte +} + +func (this *CustomNameNinOptNative) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *CustomNameNinOptNative) TestProto() github_com_gogo_protobuf_proto.Message { + return NewCustomNameNinOptNativeFromFace(this) +} + +func (this *CustomNameNinOptNative) GetFieldA() *float64 { + return this.FieldA +} + +func (this *CustomNameNinOptNative) GetFieldB() *float32 { + return this.FieldB +} + +func (this *CustomNameNinOptNative) GetFieldC() *int32 { + return this.FieldC +} + +func (this *CustomNameNinOptNative) GetFieldD() *int64 { + return this.FieldD +} + +func (this *CustomNameNinOptNative) GetFieldE() *uint32 { + return this.FieldE +} + +func (this *CustomNameNinOptNative) GetFieldF() *uint64 { + return this.FieldF +} + +func (this *CustomNameNinOptNative) GetFieldG() *int32 { + return this.FieldG +} + +func (this *CustomNameNinOptNative) GetFieldH() *int64 { + return this.FieldH +} + +func (this *CustomNameNinOptNative) GetFieldI() *uint32 { + return this.FieldI +} + +func (this *CustomNameNinOptNative) GetFieldJ() *int32 { + return this.FieldJ +} + +func (this *CustomNameNinOptNative) GetFieldK() *uint64 { + return this.FieldK +} + +func (this *CustomNameNinOptNative) GetFielL() *int64 { + return this.FielL +} + +func (this *CustomNameNinOptNative) GetFieldM() *bool { + return this.FieldM +} + +func (this *CustomNameNinOptNative) GetFieldN() *string { + return this.FieldN +} + +func (this *CustomNameNinOptNative) GetFieldO() []byte { + return this.FieldO +} + +func NewCustomNameNinOptNativeFromFace(that CustomNameNinOptNativeFace) *CustomNameNinOptNative { + this := &CustomNameNinOptNative{} + this.FieldA = that.GetFieldA() + this.FieldB = that.GetFieldB() + this.FieldC = that.GetFieldC() + this.FieldD = that.GetFieldD() + this.FieldE = that.GetFieldE() + this.FieldF = that.GetFieldF() + this.FieldG = that.GetFieldG() + this.FieldH = that.GetFieldH() + this.FieldI = that.GetFieldI() + this.FieldJ = that.GetFieldJ() + this.FieldK = that.GetFieldK() + this.FielL = that.GetFielL() + this.FieldM = that.GetFieldM() + this.FieldN = that.GetFieldN() + this.FieldO = that.GetFieldO() + return this +} + +type CustomNameNinRepNativeFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetFieldA() []float64 + GetFieldB() []float32 + GetFieldC() []int32 + GetFieldD() []int64 + GetFieldE() []uint32 + GetFieldF() []uint64 + GetFieldG() []int32 + GetFieldH() []int64 + GetFieldI() []uint32 + GetFieldJ() []int32 + GetFieldK() []uint64 + GetFieldL() []int64 + GetFieldM() []bool + GetFieldN() []string + GetFieldO() [][]byte +} + +func (this *CustomNameNinRepNative) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *CustomNameNinRepNative) TestProto() github_com_gogo_protobuf_proto.Message { + return NewCustomNameNinRepNativeFromFace(this) +} + +func (this *CustomNameNinRepNative) GetFieldA() []float64 { + return this.FieldA +} + +func (this *CustomNameNinRepNative) GetFieldB() []float32 { + return this.FieldB +} + +func (this *CustomNameNinRepNative) GetFieldC() []int32 { + return this.FieldC +} + +func (this *CustomNameNinRepNative) GetFieldD() []int64 { + return this.FieldD +} + +func (this *CustomNameNinRepNative) GetFieldE() []uint32 { + return this.FieldE +} + +func (this *CustomNameNinRepNative) GetFieldF() []uint64 { + return this.FieldF +} + +func (this *CustomNameNinRepNative) GetFieldG() []int32 { + return this.FieldG +} + +func (this *CustomNameNinRepNative) GetFieldH() []int64 { + return this.FieldH +} + +func (this *CustomNameNinRepNative) GetFieldI() []uint32 { + return this.FieldI +} + +func (this *CustomNameNinRepNative) GetFieldJ() []int32 { + return this.FieldJ +} + +func (this *CustomNameNinRepNative) GetFieldK() []uint64 { + return this.FieldK +} + +func (this *CustomNameNinRepNative) GetFieldL() []int64 { + return this.FieldL +} + +func (this *CustomNameNinRepNative) GetFieldM() []bool { + return this.FieldM +} + +func (this *CustomNameNinRepNative) GetFieldN() []string { + return this.FieldN +} + +func (this *CustomNameNinRepNative) GetFieldO() [][]byte { + return this.FieldO +} + +func NewCustomNameNinRepNativeFromFace(that CustomNameNinRepNativeFace) *CustomNameNinRepNative { + this := &CustomNameNinRepNative{} + this.FieldA = that.GetFieldA() + this.FieldB = that.GetFieldB() + this.FieldC = that.GetFieldC() + this.FieldD = that.GetFieldD() + this.FieldE = that.GetFieldE() + this.FieldF = that.GetFieldF() + this.FieldG = that.GetFieldG() + this.FieldH = that.GetFieldH() + this.FieldI = that.GetFieldI() + this.FieldJ = that.GetFieldJ() + this.FieldK = that.GetFieldK() + this.FieldL = that.GetFieldL() + this.FieldM = that.GetFieldM() + this.FieldN = that.GetFieldN() + this.FieldO = that.GetFieldO() + return this +} + +type CustomNameNinStructFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetFieldA() *float64 + GetFieldB() *float32 + GetFieldC() *NidOptNative + GetFieldD() []*NinOptNative + GetFieldE() *uint64 + GetFieldF() *int32 + GetFieldG() *NidOptNative + GetFieldH() *bool + GetFieldI() *string + GetFieldJ() []byte +} + +func (this *CustomNameNinStruct) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *CustomNameNinStruct) TestProto() github_com_gogo_protobuf_proto.Message { + return NewCustomNameNinStructFromFace(this) +} + +func (this *CustomNameNinStruct) GetFieldA() *float64 { + return this.FieldA +} + +func (this *CustomNameNinStruct) GetFieldB() *float32 { + return this.FieldB +} + +func (this *CustomNameNinStruct) GetFieldC() *NidOptNative { + return this.FieldC +} + +func (this *CustomNameNinStruct) GetFieldD() []*NinOptNative { + return this.FieldD +} + +func (this *CustomNameNinStruct) GetFieldE() *uint64 { + return this.FieldE +} + +func (this *CustomNameNinStruct) GetFieldF() *int32 { + return this.FieldF +} + +func (this *CustomNameNinStruct) GetFieldG() *NidOptNative { + return this.FieldG +} + +func (this *CustomNameNinStruct) GetFieldH() *bool { + return this.FieldH +} + +func (this *CustomNameNinStruct) GetFieldI() *string { + return this.FieldI +} + +func (this *CustomNameNinStruct) GetFieldJ() []byte { + return this.FieldJ +} + +func NewCustomNameNinStructFromFace(that CustomNameNinStructFace) *CustomNameNinStruct { + this := &CustomNameNinStruct{} + this.FieldA = that.GetFieldA() + this.FieldB = that.GetFieldB() + this.FieldC = that.GetFieldC() + this.FieldD = that.GetFieldD() + this.FieldE = that.GetFieldE() + this.FieldF = that.GetFieldF() + this.FieldG = that.GetFieldG() + this.FieldH = that.GetFieldH() + this.FieldI = that.GetFieldI() + this.FieldJ = that.GetFieldJ() + return this +} + +type CustomNameCustomTypeFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetFieldA() *Uuid + GetFieldB() *github_com_gogo_protobuf_test_custom.Uint128 + GetFieldC() []Uuid + GetFieldD() []github_com_gogo_protobuf_test_custom.Uint128 +} + +func (this *CustomNameCustomType) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *CustomNameCustomType) TestProto() github_com_gogo_protobuf_proto.Message { + return NewCustomNameCustomTypeFromFace(this) +} + +func (this *CustomNameCustomType) GetFieldA() *Uuid { + return this.FieldA +} + +func (this *CustomNameCustomType) GetFieldB() *github_com_gogo_protobuf_test_custom.Uint128 { + return this.FieldB +} + +func (this *CustomNameCustomType) GetFieldC() []Uuid { + return this.FieldC +} + +func (this *CustomNameCustomType) GetFieldD() []github_com_gogo_protobuf_test_custom.Uint128 { + return this.FieldD +} + +func NewCustomNameCustomTypeFromFace(that CustomNameCustomTypeFace) *CustomNameCustomType { + this := &CustomNameCustomType{} + this.FieldA = that.GetFieldA() + this.FieldB = that.GetFieldB() + this.FieldC = that.GetFieldC() + this.FieldD = that.GetFieldD() + return this +} + +type CustomNameNinEmbeddedStructUnionFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetNidOptNative() *NidOptNative + GetFieldA() *NinOptNative + GetFieldB() *bool +} + +func (this *CustomNameNinEmbeddedStructUnion) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *CustomNameNinEmbeddedStructUnion) TestProto() github_com_gogo_protobuf_proto.Message { + return NewCustomNameNinEmbeddedStructUnionFromFace(this) +} + +func (this *CustomNameNinEmbeddedStructUnion) GetNidOptNative() *NidOptNative { + return this.NidOptNative +} + +func (this *CustomNameNinEmbeddedStructUnion) GetFieldA() *NinOptNative { + return this.FieldA +} + +func (this *CustomNameNinEmbeddedStructUnion) GetFieldB() *bool { + return this.FieldB +} + +func NewCustomNameNinEmbeddedStructUnionFromFace(that CustomNameNinEmbeddedStructUnionFace) *CustomNameNinEmbeddedStructUnion { + this := &CustomNameNinEmbeddedStructUnion{} + this.NidOptNative = that.GetNidOptNative() + this.FieldA = that.GetFieldA() + this.FieldB = that.GetFieldB() + return this +} + +type CustomNameEnumFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetFieldA() *TheTestEnum + GetFieldB() []TheTestEnum +} + +func (this *CustomNameEnum) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *CustomNameEnum) TestProto() github_com_gogo_protobuf_proto.Message { + return NewCustomNameEnumFromFace(this) +} + +func (this *CustomNameEnum) GetFieldA() *TheTestEnum { + return this.FieldA +} + +func (this *CustomNameEnum) GetFieldB() []TheTestEnum { + return this.FieldB +} + +func NewCustomNameEnumFromFace(that CustomNameEnumFace) *CustomNameEnum { + this := &CustomNameEnum{} + this.FieldA = that.GetFieldA() + this.FieldB = that.GetFieldB() + return this +} + +type UnrecognizedFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetField1() *string +} + +func (this *Unrecognized) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *Unrecognized) TestProto() github_com_gogo_protobuf_proto.Message { + return NewUnrecognizedFromFace(this) +} + +func (this *Unrecognized) GetField1() *string { + return this.Field1 +} + +func NewUnrecognizedFromFace(that UnrecognizedFace) *Unrecognized { + this := &Unrecognized{} + this.Field1 = that.GetField1() + return this +} + +type UnrecognizedWithInnerFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetEmbedded() []*UnrecognizedWithInner_Inner + GetField2() *string +} + +func (this *UnrecognizedWithInner) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *UnrecognizedWithInner) TestProto() github_com_gogo_protobuf_proto.Message { + return NewUnrecognizedWithInnerFromFace(this) +} + +func (this *UnrecognizedWithInner) GetEmbedded() []*UnrecognizedWithInner_Inner { + return this.Embedded +} + +func (this *UnrecognizedWithInner) GetField2() *string { + return this.Field2 +} + +func NewUnrecognizedWithInnerFromFace(that UnrecognizedWithInnerFace) *UnrecognizedWithInner { + this := &UnrecognizedWithInner{} + this.Embedded = that.GetEmbedded() + this.Field2 = that.GetField2() + return this +} + +type UnrecognizedWithInner_InnerFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetField1() *uint32 +} + +func (this *UnrecognizedWithInner_Inner) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *UnrecognizedWithInner_Inner) TestProto() github_com_gogo_protobuf_proto.Message { + return NewUnrecognizedWithInner_InnerFromFace(this) +} + +func (this *UnrecognizedWithInner_Inner) GetField1() *uint32 { + return this.Field1 +} + +func NewUnrecognizedWithInner_InnerFromFace(that UnrecognizedWithInner_InnerFace) *UnrecognizedWithInner_Inner { + this := &UnrecognizedWithInner_Inner{} + this.Field1 = that.GetField1() + return this +} + +type UnrecognizedWithEmbedFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetUnrecognizedWithEmbed_Embedded() UnrecognizedWithEmbed_Embedded + GetField2() *string +} + +func (this *UnrecognizedWithEmbed) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *UnrecognizedWithEmbed) TestProto() github_com_gogo_protobuf_proto.Message { + return NewUnrecognizedWithEmbedFromFace(this) +} + +func (this *UnrecognizedWithEmbed) GetUnrecognizedWithEmbed_Embedded() UnrecognizedWithEmbed_Embedded { + return this.UnrecognizedWithEmbed_Embedded +} + +func (this *UnrecognizedWithEmbed) GetField2() *string { + return this.Field2 +} + +func NewUnrecognizedWithEmbedFromFace(that UnrecognizedWithEmbedFace) *UnrecognizedWithEmbed { + this := &UnrecognizedWithEmbed{} + this.UnrecognizedWithEmbed_Embedded = that.GetUnrecognizedWithEmbed_Embedded() + this.Field2 = that.GetField2() + return this +} + +type UnrecognizedWithEmbed_EmbeddedFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetField1() *uint32 +} + +func (this *UnrecognizedWithEmbed_Embedded) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *UnrecognizedWithEmbed_Embedded) TestProto() github_com_gogo_protobuf_proto.Message { + return NewUnrecognizedWithEmbed_EmbeddedFromFace(this) +} + +func (this *UnrecognizedWithEmbed_Embedded) GetField1() *uint32 { + return this.Field1 +} + +func NewUnrecognizedWithEmbed_EmbeddedFromFace(that UnrecognizedWithEmbed_EmbeddedFace) *UnrecognizedWithEmbed_Embedded { + this := &UnrecognizedWithEmbed_Embedded{} + this.Field1 = that.GetField1() + return this +} + +type NodeFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetLabel() *string + GetChildren() []*Node +} + +func (this *Node) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *Node) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNodeFromFace(this) +} + +func (this *Node) GetLabel() *string { + return this.Label +} + +func (this *Node) GetChildren() []*Node { + return this.Children +} + +func NewNodeFromFace(that NodeFace) *Node { + this := &Node{} + this.Label = that.GetLabel() + this.Children = that.GetChildren() + return this +} + +func (this *NidOptNative) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 19) + s = append(s, "&test.NidOptNative{") + s = append(s, "Field1: "+fmt.Sprintf("%#v", this.Field1)+",\n") + s = append(s, "Field2: "+fmt.Sprintf("%#v", this.Field2)+",\n") + s = append(s, "Field3: "+fmt.Sprintf("%#v", this.Field3)+",\n") + s = append(s, "Field4: "+fmt.Sprintf("%#v", this.Field4)+",\n") + s = append(s, "Field5: "+fmt.Sprintf("%#v", this.Field5)+",\n") + s = append(s, "Field6: "+fmt.Sprintf("%#v", this.Field6)+",\n") + s = append(s, "Field7: "+fmt.Sprintf("%#v", this.Field7)+",\n") + s = append(s, "Field8: "+fmt.Sprintf("%#v", this.Field8)+",\n") + s = append(s, "Field9: "+fmt.Sprintf("%#v", this.Field9)+",\n") + s = append(s, "Field10: "+fmt.Sprintf("%#v", this.Field10)+",\n") + s = append(s, "Field11: "+fmt.Sprintf("%#v", this.Field11)+",\n") + s = append(s, "Field12: "+fmt.Sprintf("%#v", this.Field12)+",\n") + s = append(s, "Field13: "+fmt.Sprintf("%#v", this.Field13)+",\n") + s = append(s, "Field14: "+fmt.Sprintf("%#v", this.Field14)+",\n") + s = append(s, "Field15: "+fmt.Sprintf("%#v", this.Field15)+",\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 *NinOptNative) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 19) + s = append(s, "&test.NinOptNative{") + if this.Field1 != nil { + s = append(s, "Field1: "+valueToGoStringThetest(this.Field1, "float64")+",\n") + } + if this.Field2 != nil { + s = append(s, "Field2: "+valueToGoStringThetest(this.Field2, "float32")+",\n") + } + if this.Field3 != nil { + s = append(s, "Field3: "+valueToGoStringThetest(this.Field3, "int32")+",\n") + } + if this.Field4 != nil { + s = append(s, "Field4: "+valueToGoStringThetest(this.Field4, "int64")+",\n") + } + if this.Field5 != nil { + s = append(s, "Field5: "+valueToGoStringThetest(this.Field5, "uint32")+",\n") + } + if this.Field6 != nil { + s = append(s, "Field6: "+valueToGoStringThetest(this.Field6, "uint64")+",\n") + } + if this.Field7 != nil { + s = append(s, "Field7: "+valueToGoStringThetest(this.Field7, "int32")+",\n") + } + if this.Field8 != nil { + s = append(s, "Field8: "+valueToGoStringThetest(this.Field8, "int64")+",\n") + } + if this.Field9 != nil { + s = append(s, "Field9: "+valueToGoStringThetest(this.Field9, "uint32")+",\n") + } + if this.Field10 != nil { + s = append(s, "Field10: "+valueToGoStringThetest(this.Field10, "int32")+",\n") + } + if this.Field11 != nil { + s = append(s, "Field11: "+valueToGoStringThetest(this.Field11, "uint64")+",\n") + } + if this.Field12 != nil { + s = append(s, "Field12: "+valueToGoStringThetest(this.Field12, "int64")+",\n") + } + if this.Field13 != nil { + s = append(s, "Field13: "+valueToGoStringThetest(this.Field13, "bool")+",\n") + } + if this.Field14 != nil { + s = append(s, "Field14: "+valueToGoStringThetest(this.Field14, "string")+",\n") + } + if this.Field15 != nil { + s = append(s, "Field15: "+valueToGoStringThetest(this.Field15, "byte")+",\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 *NidRepNative) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 19) + s = append(s, "&test.NidRepNative{") + if this.Field1 != nil { + s = append(s, "Field1: "+fmt.Sprintf("%#v", this.Field1)+",\n") + } + if this.Field2 != nil { + s = append(s, "Field2: "+fmt.Sprintf("%#v", this.Field2)+",\n") + } + if this.Field3 != nil { + s = append(s, "Field3: "+fmt.Sprintf("%#v", this.Field3)+",\n") + } + if this.Field4 != nil { + s = append(s, "Field4: "+fmt.Sprintf("%#v", this.Field4)+",\n") + } + if this.Field5 != nil { + s = append(s, "Field5: "+fmt.Sprintf("%#v", this.Field5)+",\n") + } + if this.Field6 != nil { + s = append(s, "Field6: "+fmt.Sprintf("%#v", this.Field6)+",\n") + } + if this.Field7 != nil { + s = append(s, "Field7: "+fmt.Sprintf("%#v", this.Field7)+",\n") + } + if this.Field8 != nil { + s = append(s, "Field8: "+fmt.Sprintf("%#v", this.Field8)+",\n") + } + if this.Field9 != nil { + s = append(s, "Field9: "+fmt.Sprintf("%#v", this.Field9)+",\n") + } + if this.Field10 != nil { + s = append(s, "Field10: "+fmt.Sprintf("%#v", this.Field10)+",\n") + } + if this.Field11 != nil { + s = append(s, "Field11: "+fmt.Sprintf("%#v", this.Field11)+",\n") + } + if this.Field12 != nil { + s = append(s, "Field12: "+fmt.Sprintf("%#v", this.Field12)+",\n") + } + if this.Field13 != nil { + s = append(s, "Field13: "+fmt.Sprintf("%#v", this.Field13)+",\n") + } + if this.Field14 != nil { + s = append(s, "Field14: "+fmt.Sprintf("%#v", this.Field14)+",\n") + } + if this.Field15 != nil { + s = append(s, "Field15: "+fmt.Sprintf("%#v", this.Field15)+",\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 *NinRepNative) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 19) + s = append(s, "&test.NinRepNative{") + if this.Field1 != nil { + s = append(s, "Field1: "+fmt.Sprintf("%#v", this.Field1)+",\n") + } + if this.Field2 != nil { + s = append(s, "Field2: "+fmt.Sprintf("%#v", this.Field2)+",\n") + } + if this.Field3 != nil { + s = append(s, "Field3: "+fmt.Sprintf("%#v", this.Field3)+",\n") + } + if this.Field4 != nil { + s = append(s, "Field4: "+fmt.Sprintf("%#v", this.Field4)+",\n") + } + if this.Field5 != nil { + s = append(s, "Field5: "+fmt.Sprintf("%#v", this.Field5)+",\n") + } + if this.Field6 != nil { + s = append(s, "Field6: "+fmt.Sprintf("%#v", this.Field6)+",\n") + } + if this.Field7 != nil { + s = append(s, "Field7: "+fmt.Sprintf("%#v", this.Field7)+",\n") + } + if this.Field8 != nil { + s = append(s, "Field8: "+fmt.Sprintf("%#v", this.Field8)+",\n") + } + if this.Field9 != nil { + s = append(s, "Field9: "+fmt.Sprintf("%#v", this.Field9)+",\n") + } + if this.Field10 != nil { + s = append(s, "Field10: "+fmt.Sprintf("%#v", this.Field10)+",\n") + } + if this.Field11 != nil { + s = append(s, "Field11: "+fmt.Sprintf("%#v", this.Field11)+",\n") + } + if this.Field12 != nil { + s = append(s, "Field12: "+fmt.Sprintf("%#v", this.Field12)+",\n") + } + if this.Field13 != nil { + s = append(s, "Field13: "+fmt.Sprintf("%#v", this.Field13)+",\n") + } + if this.Field14 != nil { + s = append(s, "Field14: "+fmt.Sprintf("%#v", this.Field14)+",\n") + } + if this.Field15 != nil { + s = append(s, "Field15: "+fmt.Sprintf("%#v", this.Field15)+",\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 *NidRepPackedNative) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 17) + s = append(s, "&test.NidRepPackedNative{") + if this.Field1 != nil { + s = append(s, "Field1: "+fmt.Sprintf("%#v", this.Field1)+",\n") + } + if this.Field2 != nil { + s = append(s, "Field2: "+fmt.Sprintf("%#v", this.Field2)+",\n") + } + if this.Field3 != nil { + s = append(s, "Field3: "+fmt.Sprintf("%#v", this.Field3)+",\n") + } + if this.Field4 != nil { + s = append(s, "Field4: "+fmt.Sprintf("%#v", this.Field4)+",\n") + } + if this.Field5 != nil { + s = append(s, "Field5: "+fmt.Sprintf("%#v", this.Field5)+",\n") + } + if this.Field6 != nil { + s = append(s, "Field6: "+fmt.Sprintf("%#v", this.Field6)+",\n") + } + if this.Field7 != nil { + s = append(s, "Field7: "+fmt.Sprintf("%#v", this.Field7)+",\n") + } + if this.Field8 != nil { + s = append(s, "Field8: "+fmt.Sprintf("%#v", this.Field8)+",\n") + } + if this.Field9 != nil { + s = append(s, "Field9: "+fmt.Sprintf("%#v", this.Field9)+",\n") + } + if this.Field10 != nil { + s = append(s, "Field10: "+fmt.Sprintf("%#v", this.Field10)+",\n") + } + if this.Field11 != nil { + s = append(s, "Field11: "+fmt.Sprintf("%#v", this.Field11)+",\n") + } + if this.Field12 != nil { + s = append(s, "Field12: "+fmt.Sprintf("%#v", this.Field12)+",\n") + } + if this.Field13 != nil { + s = append(s, "Field13: "+fmt.Sprintf("%#v", this.Field13)+",\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 *NinRepPackedNative) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 17) + s = append(s, "&test.NinRepPackedNative{") + if this.Field1 != nil { + s = append(s, "Field1: "+fmt.Sprintf("%#v", this.Field1)+",\n") + } + if this.Field2 != nil { + s = append(s, "Field2: "+fmt.Sprintf("%#v", this.Field2)+",\n") + } + if this.Field3 != nil { + s = append(s, "Field3: "+fmt.Sprintf("%#v", this.Field3)+",\n") + } + if this.Field4 != nil { + s = append(s, "Field4: "+fmt.Sprintf("%#v", this.Field4)+",\n") + } + if this.Field5 != nil { + s = append(s, "Field5: "+fmt.Sprintf("%#v", this.Field5)+",\n") + } + if this.Field6 != nil { + s = append(s, "Field6: "+fmt.Sprintf("%#v", this.Field6)+",\n") + } + if this.Field7 != nil { + s = append(s, "Field7: "+fmt.Sprintf("%#v", this.Field7)+",\n") + } + if this.Field8 != nil { + s = append(s, "Field8: "+fmt.Sprintf("%#v", this.Field8)+",\n") + } + if this.Field9 != nil { + s = append(s, "Field9: "+fmt.Sprintf("%#v", this.Field9)+",\n") + } + if this.Field10 != nil { + s = append(s, "Field10: "+fmt.Sprintf("%#v", this.Field10)+",\n") + } + if this.Field11 != nil { + s = append(s, "Field11: "+fmt.Sprintf("%#v", this.Field11)+",\n") + } + if this.Field12 != nil { + s = append(s, "Field12: "+fmt.Sprintf("%#v", this.Field12)+",\n") + } + if this.Field13 != nil { + s = append(s, "Field13: "+fmt.Sprintf("%#v", this.Field13)+",\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 *NidOptStruct) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 14) + s = append(s, "&test.NidOptStruct{") + s = append(s, "Field1: "+fmt.Sprintf("%#v", this.Field1)+",\n") + s = append(s, "Field2: "+fmt.Sprintf("%#v", this.Field2)+",\n") + s = append(s, "Field3: "+strings.Replace(this.Field3.GoString(), `&`, ``, 1)+",\n") + s = append(s, "Field4: "+strings.Replace(this.Field4.GoString(), `&`, ``, 1)+",\n") + s = append(s, "Field6: "+fmt.Sprintf("%#v", this.Field6)+",\n") + s = append(s, "Field7: "+fmt.Sprintf("%#v", this.Field7)+",\n") + s = append(s, "Field8: "+strings.Replace(this.Field8.GoString(), `&`, ``, 1)+",\n") + s = append(s, "Field13: "+fmt.Sprintf("%#v", this.Field13)+",\n") + s = append(s, "Field14: "+fmt.Sprintf("%#v", this.Field14)+",\n") + s = append(s, "Field15: "+fmt.Sprintf("%#v", this.Field15)+",\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 *NinOptStruct) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 14) + s = append(s, "&test.NinOptStruct{") + if this.Field1 != nil { + s = append(s, "Field1: "+valueToGoStringThetest(this.Field1, "float64")+",\n") + } + if this.Field2 != nil { + s = append(s, "Field2: "+valueToGoStringThetest(this.Field2, "float32")+",\n") + } + if this.Field3 != nil { + s = append(s, "Field3: "+fmt.Sprintf("%#v", this.Field3)+",\n") + } + if this.Field4 != nil { + s = append(s, "Field4: "+fmt.Sprintf("%#v", this.Field4)+",\n") + } + if this.Field6 != nil { + s = append(s, "Field6: "+valueToGoStringThetest(this.Field6, "uint64")+",\n") + } + if this.Field7 != nil { + s = append(s, "Field7: "+valueToGoStringThetest(this.Field7, "int32")+",\n") + } + if this.Field8 != nil { + s = append(s, "Field8: "+fmt.Sprintf("%#v", this.Field8)+",\n") + } + if this.Field13 != nil { + s = append(s, "Field13: "+valueToGoStringThetest(this.Field13, "bool")+",\n") + } + if this.Field14 != nil { + s = append(s, "Field14: "+valueToGoStringThetest(this.Field14, "string")+",\n") + } + if this.Field15 != nil { + s = append(s, "Field15: "+valueToGoStringThetest(this.Field15, "byte")+",\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 *NidRepStruct) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 14) + s = append(s, "&test.NidRepStruct{") + if this.Field1 != nil { + s = append(s, "Field1: "+fmt.Sprintf("%#v", this.Field1)+",\n") + } + if this.Field2 != nil { + s = append(s, "Field2: "+fmt.Sprintf("%#v", this.Field2)+",\n") + } + if this.Field3 != nil { + s = append(s, "Field3: "+fmt.Sprintf("%#v", this.Field3)+",\n") + } + if this.Field4 != nil { + s = append(s, "Field4: "+fmt.Sprintf("%#v", this.Field4)+",\n") + } + if this.Field6 != nil { + s = append(s, "Field6: "+fmt.Sprintf("%#v", this.Field6)+",\n") + } + if this.Field7 != nil { + s = append(s, "Field7: "+fmt.Sprintf("%#v", this.Field7)+",\n") + } + if this.Field8 != nil { + s = append(s, "Field8: "+fmt.Sprintf("%#v", this.Field8)+",\n") + } + if this.Field13 != nil { + s = append(s, "Field13: "+fmt.Sprintf("%#v", this.Field13)+",\n") + } + if this.Field14 != nil { + s = append(s, "Field14: "+fmt.Sprintf("%#v", this.Field14)+",\n") + } + if this.Field15 != nil { + s = append(s, "Field15: "+fmt.Sprintf("%#v", this.Field15)+",\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 *NinRepStruct) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 14) + s = append(s, "&test.NinRepStruct{") + if this.Field1 != nil { + s = append(s, "Field1: "+fmt.Sprintf("%#v", this.Field1)+",\n") + } + if this.Field2 != nil { + s = append(s, "Field2: "+fmt.Sprintf("%#v", this.Field2)+",\n") + } + if this.Field3 != nil { + s = append(s, "Field3: "+fmt.Sprintf("%#v", this.Field3)+",\n") + } + if this.Field4 != nil { + s = append(s, "Field4: "+fmt.Sprintf("%#v", this.Field4)+",\n") + } + if this.Field6 != nil { + s = append(s, "Field6: "+fmt.Sprintf("%#v", this.Field6)+",\n") + } + if this.Field7 != nil { + s = append(s, "Field7: "+fmt.Sprintf("%#v", this.Field7)+",\n") + } + if this.Field8 != nil { + s = append(s, "Field8: "+fmt.Sprintf("%#v", this.Field8)+",\n") + } + if this.Field13 != nil { + s = append(s, "Field13: "+fmt.Sprintf("%#v", this.Field13)+",\n") + } + if this.Field14 != nil { + s = append(s, "Field14: "+fmt.Sprintf("%#v", this.Field14)+",\n") + } + if this.Field15 != nil { + s = append(s, "Field15: "+fmt.Sprintf("%#v", this.Field15)+",\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 *NidEmbeddedStruct) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 7) + s = append(s, "&test.NidEmbeddedStruct{") + if this.NidOptNative != nil { + s = append(s, "NidOptNative: "+fmt.Sprintf("%#v", this.NidOptNative)+",\n") + } + s = append(s, "Field200: "+strings.Replace(this.Field200.GoString(), `&`, ``, 1)+",\n") + s = append(s, "Field210: "+fmt.Sprintf("%#v", this.Field210)+",\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 *NinEmbeddedStruct) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 7) + s = append(s, "&test.NinEmbeddedStruct{") + if this.NidOptNative != nil { + s = append(s, "NidOptNative: "+fmt.Sprintf("%#v", this.NidOptNative)+",\n") + } + if this.Field200 != nil { + s = append(s, "Field200: "+fmt.Sprintf("%#v", this.Field200)+",\n") + } + if this.Field210 != nil { + s = append(s, "Field210: "+valueToGoStringThetest(this.Field210, "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 *NidNestedStruct) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 6) + s = append(s, "&test.NidNestedStruct{") + s = append(s, "Field1: "+strings.Replace(this.Field1.GoString(), `&`, ``, 1)+",\n") + if this.Field2 != nil { + s = append(s, "Field2: "+fmt.Sprintf("%#v", this.Field2)+",\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 *NinNestedStruct) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 6) + s = append(s, "&test.NinNestedStruct{") + if this.Field1 != nil { + s = append(s, "Field1: "+fmt.Sprintf("%#v", this.Field1)+",\n") + } + if this.Field2 != nil { + s = append(s, "Field2: "+fmt.Sprintf("%#v", this.Field2)+",\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 *NidOptCustom) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 6) + s = append(s, "&test.NidOptCustom{") + s = append(s, "Id: "+fmt.Sprintf("%#v", this.Id)+",\n") + s = append(s, "Value: "+fmt.Sprintf("%#v", this.Value)+",\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 *CustomDash) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&test.CustomDash{") + if this.Value != nil { + s = append(s, "Value: "+valueToGoStringThetest(this.Value, "github_com_gogo_protobuf_test_custom_dash_type.Bytes")+",\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 *NinOptCustom) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 6) + s = append(s, "&test.NinOptCustom{") + if this.Id != nil { + s = append(s, "Id: "+valueToGoStringThetest(this.Id, "Uuid")+",\n") + } + if this.Value != nil { + s = append(s, "Value: "+valueToGoStringThetest(this.Value, "github_com_gogo_protobuf_test_custom.Uint128")+",\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 *NidRepCustom) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 6) + s = append(s, "&test.NidRepCustom{") + if this.Id != nil { + s = append(s, "Id: "+fmt.Sprintf("%#v", this.Id)+",\n") + } + if this.Value != nil { + s = append(s, "Value: "+fmt.Sprintf("%#v", this.Value)+",\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 *NinRepCustom) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 6) + s = append(s, "&test.NinRepCustom{") + if this.Id != nil { + s = append(s, "Id: "+fmt.Sprintf("%#v", this.Id)+",\n") + } + if this.Value != nil { + s = append(s, "Value: "+fmt.Sprintf("%#v", this.Value)+",\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 *NinOptNativeUnion) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 13) + s = append(s, "&test.NinOptNativeUnion{") + if this.Field1 != nil { + s = append(s, "Field1: "+valueToGoStringThetest(this.Field1, "float64")+",\n") + } + if this.Field2 != nil { + s = append(s, "Field2: "+valueToGoStringThetest(this.Field2, "float32")+",\n") + } + if this.Field3 != nil { + s = append(s, "Field3: "+valueToGoStringThetest(this.Field3, "int32")+",\n") + } + if this.Field4 != nil { + s = append(s, "Field4: "+valueToGoStringThetest(this.Field4, "int64")+",\n") + } + if this.Field5 != nil { + s = append(s, "Field5: "+valueToGoStringThetest(this.Field5, "uint32")+",\n") + } + if this.Field6 != nil { + s = append(s, "Field6: "+valueToGoStringThetest(this.Field6, "uint64")+",\n") + } + if this.Field13 != nil { + s = append(s, "Field13: "+valueToGoStringThetest(this.Field13, "bool")+",\n") + } + if this.Field14 != nil { + s = append(s, "Field14: "+valueToGoStringThetest(this.Field14, "string")+",\n") + } + if this.Field15 != nil { + s = append(s, "Field15: "+valueToGoStringThetest(this.Field15, "byte")+",\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 *NinOptStructUnion) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 13) + s = append(s, "&test.NinOptStructUnion{") + if this.Field1 != nil { + s = append(s, "Field1: "+valueToGoStringThetest(this.Field1, "float64")+",\n") + } + if this.Field2 != nil { + s = append(s, "Field2: "+valueToGoStringThetest(this.Field2, "float32")+",\n") + } + if this.Field3 != nil { + s = append(s, "Field3: "+fmt.Sprintf("%#v", this.Field3)+",\n") + } + if this.Field4 != nil { + s = append(s, "Field4: "+fmt.Sprintf("%#v", this.Field4)+",\n") + } + if this.Field6 != nil { + s = append(s, "Field6: "+valueToGoStringThetest(this.Field6, "uint64")+",\n") + } + if this.Field7 != nil { + s = append(s, "Field7: "+valueToGoStringThetest(this.Field7, "int32")+",\n") + } + if this.Field13 != nil { + s = append(s, "Field13: "+valueToGoStringThetest(this.Field13, "bool")+",\n") + } + if this.Field14 != nil { + s = append(s, "Field14: "+valueToGoStringThetest(this.Field14, "string")+",\n") + } + if this.Field15 != nil { + s = append(s, "Field15: "+valueToGoStringThetest(this.Field15, "byte")+",\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 *NinEmbeddedStructUnion) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 7) + s = append(s, "&test.NinEmbeddedStructUnion{") + if this.NidOptNative != nil { + s = append(s, "NidOptNative: "+fmt.Sprintf("%#v", this.NidOptNative)+",\n") + } + if this.Field200 != nil { + s = append(s, "Field200: "+fmt.Sprintf("%#v", this.Field200)+",\n") + } + if this.Field210 != nil { + s = append(s, "Field210: "+valueToGoStringThetest(this.Field210, "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 *NinNestedStructUnion) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 7) + s = append(s, "&test.NinNestedStructUnion{") + if this.Field1 != nil { + s = append(s, "Field1: "+fmt.Sprintf("%#v", this.Field1)+",\n") + } + if this.Field2 != nil { + s = append(s, "Field2: "+fmt.Sprintf("%#v", this.Field2)+",\n") + } + if this.Field3 != nil { + s = append(s, "Field3: "+fmt.Sprintf("%#v", this.Field3)+",\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 *Tree) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 7) + s = append(s, "&test.Tree{") + if this.Or != nil { + s = append(s, "Or: "+fmt.Sprintf("%#v", this.Or)+",\n") + } + if this.And != nil { + s = append(s, "And: "+fmt.Sprintf("%#v", this.And)+",\n") + } + if this.Leaf != nil { + s = append(s, "Leaf: "+fmt.Sprintf("%#v", this.Leaf)+",\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 *OrBranch) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 6) + s = append(s, "&test.OrBranch{") + s = append(s, "Left: "+strings.Replace(this.Left.GoString(), `&`, ``, 1)+",\n") + s = append(s, "Right: "+strings.Replace(this.Right.GoString(), `&`, ``, 1)+",\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 *AndBranch) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 6) + s = append(s, "&test.AndBranch{") + s = append(s, "Left: "+strings.Replace(this.Left.GoString(), `&`, ``, 1)+",\n") + s = append(s, "Right: "+strings.Replace(this.Right.GoString(), `&`, ``, 1)+",\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 *Leaf) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 6) + s = append(s, "&test.Leaf{") + s = append(s, "Value: "+fmt.Sprintf("%#v", this.Value)+",\n") + s = append(s, "StrValue: "+fmt.Sprintf("%#v", this.StrValue)+",\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 *DeepTree) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 7) + s = append(s, "&test.DeepTree{") + if this.Down != nil { + s = append(s, "Down: "+fmt.Sprintf("%#v", this.Down)+",\n") + } + if this.And != nil { + s = append(s, "And: "+fmt.Sprintf("%#v", this.And)+",\n") + } + if this.Leaf != nil { + s = append(s, "Leaf: "+fmt.Sprintf("%#v", this.Leaf)+",\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 *ADeepBranch) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&test.ADeepBranch{") + s = append(s, "Down: "+strings.Replace(this.Down.GoString(), `&`, ``, 1)+",\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 *AndDeepBranch) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 6) + s = append(s, "&test.AndDeepBranch{") + s = append(s, "Left: "+strings.Replace(this.Left.GoString(), `&`, ``, 1)+",\n") + s = append(s, "Right: "+strings.Replace(this.Right.GoString(), `&`, ``, 1)+",\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 *DeepLeaf) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&test.DeepLeaf{") + s = append(s, "Tree: "+strings.Replace(this.Tree.GoString(), `&`, ``, 1)+",\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 *Nil) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 4) + s = append(s, "&test.Nil{") + 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 *NidOptEnum) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&test.NidOptEnum{") + s = append(s, "Field1: "+fmt.Sprintf("%#v", this.Field1)+",\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 *NinOptEnum) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 7) + s = append(s, "&test.NinOptEnum{") + if this.Field1 != nil { + s = append(s, "Field1: "+valueToGoStringThetest(this.Field1, "test.TheTestEnum")+",\n") + } + if this.Field2 != nil { + s = append(s, "Field2: "+valueToGoStringThetest(this.Field2, "test.YetAnotherTestEnum")+",\n") + } + if this.Field3 != nil { + s = append(s, "Field3: "+valueToGoStringThetest(this.Field3, "test.YetYetAnotherTestEnum")+",\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 *NidRepEnum) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 7) + s = append(s, "&test.NidRepEnum{") + if this.Field1 != nil { + s = append(s, "Field1: "+fmt.Sprintf("%#v", this.Field1)+",\n") + } + if this.Field2 != nil { + s = append(s, "Field2: "+fmt.Sprintf("%#v", this.Field2)+",\n") + } + if this.Field3 != nil { + s = append(s, "Field3: "+fmt.Sprintf("%#v", this.Field3)+",\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 *NinRepEnum) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 7) + s = append(s, "&test.NinRepEnum{") + if this.Field1 != nil { + s = append(s, "Field1: "+fmt.Sprintf("%#v", this.Field1)+",\n") + } + if this.Field2 != nil { + s = append(s, "Field2: "+fmt.Sprintf("%#v", this.Field2)+",\n") + } + if this.Field3 != nil { + s = append(s, "Field3: "+fmt.Sprintf("%#v", this.Field3)+",\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 *NinOptEnumDefault) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 7) + s = append(s, "&test.NinOptEnumDefault{") + if this.Field1 != nil { + s = append(s, "Field1: "+valueToGoStringThetest(this.Field1, "test.TheTestEnum")+",\n") + } + if this.Field2 != nil { + s = append(s, "Field2: "+valueToGoStringThetest(this.Field2, "test.YetAnotherTestEnum")+",\n") + } + if this.Field3 != nil { + s = append(s, "Field3: "+valueToGoStringThetest(this.Field3, "test.YetYetAnotherTestEnum")+",\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 *AnotherNinOptEnum) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 7) + s = append(s, "&test.AnotherNinOptEnum{") + if this.Field1 != nil { + s = append(s, "Field1: "+valueToGoStringThetest(this.Field1, "test.AnotherTestEnum")+",\n") + } + if this.Field2 != nil { + s = append(s, "Field2: "+valueToGoStringThetest(this.Field2, "test.YetAnotherTestEnum")+",\n") + } + if this.Field3 != nil { + s = append(s, "Field3: "+valueToGoStringThetest(this.Field3, "test.YetYetAnotherTestEnum")+",\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 *AnotherNinOptEnumDefault) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 7) + s = append(s, "&test.AnotherNinOptEnumDefault{") + if this.Field1 != nil { + s = append(s, "Field1: "+valueToGoStringThetest(this.Field1, "test.AnotherTestEnum")+",\n") + } + if this.Field2 != nil { + s = append(s, "Field2: "+valueToGoStringThetest(this.Field2, "test.YetAnotherTestEnum")+",\n") + } + if this.Field3 != nil { + s = append(s, "Field3: "+valueToGoStringThetest(this.Field3, "test.YetYetAnotherTestEnum")+",\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 *Timer) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 7) + s = append(s, "&test.Timer{") + s = append(s, "Time1: "+fmt.Sprintf("%#v", this.Time1)+",\n") + s = append(s, "Time2: "+fmt.Sprintf("%#v", this.Time2)+",\n") + s = append(s, "Data: "+fmt.Sprintf("%#v", this.Data)+",\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 *MyExtendable) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&test.MyExtendable{") + if this.Field1 != nil { + s = append(s, "Field1: "+valueToGoStringThetest(this.Field1, "int64")+",\n") + } + if this.XXX_extensions != nil { + s = append(s, "XXX_extensions: "+extensionToGoStringThetest(this.XXX_extensions)+",\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 *OtherExtenable) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 7) + s = append(s, "&test.OtherExtenable{") + if this.Field2 != nil { + s = append(s, "Field2: "+valueToGoStringThetest(this.Field2, "int64")+",\n") + } + if this.Field13 != nil { + s = append(s, "Field13: "+valueToGoStringThetest(this.Field13, "int64")+",\n") + } + if this.M != nil { + s = append(s, "M: "+fmt.Sprintf("%#v", this.M)+",\n") + } + if this.XXX_extensions != nil { + s = append(s, "XXX_extensions: "+extensionToGoStringThetest(this.XXX_extensions)+",\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 *NestedDefinition) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 8) + s = append(s, "&test.NestedDefinition{") + if this.Field1 != nil { + s = append(s, "Field1: "+valueToGoStringThetest(this.Field1, "int64")+",\n") + } + if this.EnumField != nil { + s = append(s, "EnumField: "+valueToGoStringThetest(this.EnumField, "test.NestedDefinition_NestedEnum")+",\n") + } + if this.NNM != nil { + s = append(s, "NNM: "+fmt.Sprintf("%#v", this.NNM)+",\n") + } + if this.NM != nil { + s = append(s, "NM: "+fmt.Sprintf("%#v", this.NM)+",\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 *NestedDefinition_NestedMessage) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 6) + s = append(s, "&test.NestedDefinition_NestedMessage{") + if this.NestedField1 != nil { + s = append(s, "NestedField1: "+valueToGoStringThetest(this.NestedField1, "uint64")+",\n") + } + if this.NNM != nil { + s = append(s, "NNM: "+fmt.Sprintf("%#v", this.NNM)+",\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 *NestedDefinition_NestedMessage_NestedNestedMsg) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&test.NestedDefinition_NestedMessage_NestedNestedMsg{") + if this.NestedNestedField1 != nil { + s = append(s, "NestedNestedField1: "+valueToGoStringThetest(this.NestedNestedField1, "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 *NestedScope) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 7) + s = append(s, "&test.NestedScope{") + if this.A != nil { + s = append(s, "A: "+fmt.Sprintf("%#v", this.A)+",\n") + } + if this.B != nil { + s = append(s, "B: "+valueToGoStringThetest(this.B, "test.NestedDefinition_NestedEnum")+",\n") + } + if this.C != nil { + s = append(s, "C: "+fmt.Sprintf("%#v", this.C)+",\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 *NinOptNativeDefault) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 19) + s = append(s, "&test.NinOptNativeDefault{") + if this.Field1 != nil { + s = append(s, "Field1: "+valueToGoStringThetest(this.Field1, "float64")+",\n") + } + if this.Field2 != nil { + s = append(s, "Field2: "+valueToGoStringThetest(this.Field2, "float32")+",\n") + } + if this.Field3 != nil { + s = append(s, "Field3: "+valueToGoStringThetest(this.Field3, "int32")+",\n") + } + if this.Field4 != nil { + s = append(s, "Field4: "+valueToGoStringThetest(this.Field4, "int64")+",\n") + } + if this.Field5 != nil { + s = append(s, "Field5: "+valueToGoStringThetest(this.Field5, "uint32")+",\n") + } + if this.Field6 != nil { + s = append(s, "Field6: "+valueToGoStringThetest(this.Field6, "uint64")+",\n") + } + if this.Field7 != nil { + s = append(s, "Field7: "+valueToGoStringThetest(this.Field7, "int32")+",\n") + } + if this.Field8 != nil { + s = append(s, "Field8: "+valueToGoStringThetest(this.Field8, "int64")+",\n") + } + if this.Field9 != nil { + s = append(s, "Field9: "+valueToGoStringThetest(this.Field9, "uint32")+",\n") + } + if this.Field10 != nil { + s = append(s, "Field10: "+valueToGoStringThetest(this.Field10, "int32")+",\n") + } + if this.Field11 != nil { + s = append(s, "Field11: "+valueToGoStringThetest(this.Field11, "uint64")+",\n") + } + if this.Field12 != nil { + s = append(s, "Field12: "+valueToGoStringThetest(this.Field12, "int64")+",\n") + } + if this.Field13 != nil { + s = append(s, "Field13: "+valueToGoStringThetest(this.Field13, "bool")+",\n") + } + if this.Field14 != nil { + s = append(s, "Field14: "+valueToGoStringThetest(this.Field14, "string")+",\n") + } + if this.Field15 != nil { + s = append(s, "Field15: "+valueToGoStringThetest(this.Field15, "byte")+",\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 *CustomContainer) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&test.CustomContainer{") + s = append(s, "CustomStruct: "+strings.Replace(this.CustomStruct.GoString(), `&`, ``, 1)+",\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 *CustomNameNidOptNative) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 19) + s = append(s, "&test.CustomNameNidOptNative{") + s = append(s, "FieldA: "+fmt.Sprintf("%#v", this.FieldA)+",\n") + s = append(s, "FieldB: "+fmt.Sprintf("%#v", this.FieldB)+",\n") + s = append(s, "FieldC: "+fmt.Sprintf("%#v", this.FieldC)+",\n") + s = append(s, "FieldD: "+fmt.Sprintf("%#v", this.FieldD)+",\n") + s = append(s, "FieldE: "+fmt.Sprintf("%#v", this.FieldE)+",\n") + s = append(s, "FieldF: "+fmt.Sprintf("%#v", this.FieldF)+",\n") + s = append(s, "FieldG: "+fmt.Sprintf("%#v", this.FieldG)+",\n") + s = append(s, "FieldH: "+fmt.Sprintf("%#v", this.FieldH)+",\n") + s = append(s, "FieldI: "+fmt.Sprintf("%#v", this.FieldI)+",\n") + s = append(s, "FieldJ: "+fmt.Sprintf("%#v", this.FieldJ)+",\n") + s = append(s, "FieldK: "+fmt.Sprintf("%#v", this.FieldK)+",\n") + s = append(s, "FieldL: "+fmt.Sprintf("%#v", this.FieldL)+",\n") + s = append(s, "FieldM: "+fmt.Sprintf("%#v", this.FieldM)+",\n") + s = append(s, "FieldN: "+fmt.Sprintf("%#v", this.FieldN)+",\n") + s = append(s, "FieldO: "+fmt.Sprintf("%#v", this.FieldO)+",\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 *CustomNameNinOptNative) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 19) + s = append(s, "&test.CustomNameNinOptNative{") + if this.FieldA != nil { + s = append(s, "FieldA: "+valueToGoStringThetest(this.FieldA, "float64")+",\n") + } + if this.FieldB != nil { + s = append(s, "FieldB: "+valueToGoStringThetest(this.FieldB, "float32")+",\n") + } + if this.FieldC != nil { + s = append(s, "FieldC: "+valueToGoStringThetest(this.FieldC, "int32")+",\n") + } + if this.FieldD != nil { + s = append(s, "FieldD: "+valueToGoStringThetest(this.FieldD, "int64")+",\n") + } + if this.FieldE != nil { + s = append(s, "FieldE: "+valueToGoStringThetest(this.FieldE, "uint32")+",\n") + } + if this.FieldF != nil { + s = append(s, "FieldF: "+valueToGoStringThetest(this.FieldF, "uint64")+",\n") + } + if this.FieldG != nil { + s = append(s, "FieldG: "+valueToGoStringThetest(this.FieldG, "int32")+",\n") + } + if this.FieldH != nil { + s = append(s, "FieldH: "+valueToGoStringThetest(this.FieldH, "int64")+",\n") + } + if this.FieldI != nil { + s = append(s, "FieldI: "+valueToGoStringThetest(this.FieldI, "uint32")+",\n") + } + if this.FieldJ != nil { + s = append(s, "FieldJ: "+valueToGoStringThetest(this.FieldJ, "int32")+",\n") + } + if this.FieldK != nil { + s = append(s, "FieldK: "+valueToGoStringThetest(this.FieldK, "uint64")+",\n") + } + if this.FielL != nil { + s = append(s, "FielL: "+valueToGoStringThetest(this.FielL, "int64")+",\n") + } + if this.FieldM != nil { + s = append(s, "FieldM: "+valueToGoStringThetest(this.FieldM, "bool")+",\n") + } + if this.FieldN != nil { + s = append(s, "FieldN: "+valueToGoStringThetest(this.FieldN, "string")+",\n") + } + if this.FieldO != nil { + s = append(s, "FieldO: "+valueToGoStringThetest(this.FieldO, "byte")+",\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 *CustomNameNinRepNative) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 19) + s = append(s, "&test.CustomNameNinRepNative{") + if this.FieldA != nil { + s = append(s, "FieldA: "+fmt.Sprintf("%#v", this.FieldA)+",\n") + } + if this.FieldB != nil { + s = append(s, "FieldB: "+fmt.Sprintf("%#v", this.FieldB)+",\n") + } + if this.FieldC != nil { + s = append(s, "FieldC: "+fmt.Sprintf("%#v", this.FieldC)+",\n") + } + if this.FieldD != nil { + s = append(s, "FieldD: "+fmt.Sprintf("%#v", this.FieldD)+",\n") + } + if this.FieldE != nil { + s = append(s, "FieldE: "+fmt.Sprintf("%#v", this.FieldE)+",\n") + } + if this.FieldF != nil { + s = append(s, "FieldF: "+fmt.Sprintf("%#v", this.FieldF)+",\n") + } + if this.FieldG != nil { + s = append(s, "FieldG: "+fmt.Sprintf("%#v", this.FieldG)+",\n") + } + if this.FieldH != nil { + s = append(s, "FieldH: "+fmt.Sprintf("%#v", this.FieldH)+",\n") + } + if this.FieldI != nil { + s = append(s, "FieldI: "+fmt.Sprintf("%#v", this.FieldI)+",\n") + } + if this.FieldJ != nil { + s = append(s, "FieldJ: "+fmt.Sprintf("%#v", this.FieldJ)+",\n") + } + if this.FieldK != nil { + s = append(s, "FieldK: "+fmt.Sprintf("%#v", this.FieldK)+",\n") + } + if this.FieldL != nil { + s = append(s, "FieldL: "+fmt.Sprintf("%#v", this.FieldL)+",\n") + } + if this.FieldM != nil { + s = append(s, "FieldM: "+fmt.Sprintf("%#v", this.FieldM)+",\n") + } + if this.FieldN != nil { + s = append(s, "FieldN: "+fmt.Sprintf("%#v", this.FieldN)+",\n") + } + if this.FieldO != nil { + s = append(s, "FieldO: "+fmt.Sprintf("%#v", this.FieldO)+",\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 *CustomNameNinStruct) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 14) + s = append(s, "&test.CustomNameNinStruct{") + if this.FieldA != nil { + s = append(s, "FieldA: "+valueToGoStringThetest(this.FieldA, "float64")+",\n") + } + if this.FieldB != nil { + s = append(s, "FieldB: "+valueToGoStringThetest(this.FieldB, "float32")+",\n") + } + if this.FieldC != nil { + s = append(s, "FieldC: "+fmt.Sprintf("%#v", this.FieldC)+",\n") + } + if this.FieldD != nil { + s = append(s, "FieldD: "+fmt.Sprintf("%#v", this.FieldD)+",\n") + } + if this.FieldE != nil { + s = append(s, "FieldE: "+valueToGoStringThetest(this.FieldE, "uint64")+",\n") + } + if this.FieldF != nil { + s = append(s, "FieldF: "+valueToGoStringThetest(this.FieldF, "int32")+",\n") + } + if this.FieldG != nil { + s = append(s, "FieldG: "+fmt.Sprintf("%#v", this.FieldG)+",\n") + } + if this.FieldH != nil { + s = append(s, "FieldH: "+valueToGoStringThetest(this.FieldH, "bool")+",\n") + } + if this.FieldI != nil { + s = append(s, "FieldI: "+valueToGoStringThetest(this.FieldI, "string")+",\n") + } + if this.FieldJ != nil { + s = append(s, "FieldJ: "+valueToGoStringThetest(this.FieldJ, "byte")+",\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 *CustomNameCustomType) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 8) + s = append(s, "&test.CustomNameCustomType{") + if this.FieldA != nil { + s = append(s, "FieldA: "+valueToGoStringThetest(this.FieldA, "Uuid")+",\n") + } + if this.FieldB != nil { + s = append(s, "FieldB: "+valueToGoStringThetest(this.FieldB, "github_com_gogo_protobuf_test_custom.Uint128")+",\n") + } + if this.FieldC != nil { + s = append(s, "FieldC: "+fmt.Sprintf("%#v", this.FieldC)+",\n") + } + if this.FieldD != nil { + s = append(s, "FieldD: "+fmt.Sprintf("%#v", this.FieldD)+",\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 *CustomNameNinEmbeddedStructUnion) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 7) + s = append(s, "&test.CustomNameNinEmbeddedStructUnion{") + if this.NidOptNative != nil { + s = append(s, "NidOptNative: "+fmt.Sprintf("%#v", this.NidOptNative)+",\n") + } + if this.FieldA != nil { + s = append(s, "FieldA: "+fmt.Sprintf("%#v", this.FieldA)+",\n") + } + if this.FieldB != nil { + s = append(s, "FieldB: "+valueToGoStringThetest(this.FieldB, "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 *CustomNameEnum) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 6) + s = append(s, "&test.CustomNameEnum{") + if this.FieldA != nil { + s = append(s, "FieldA: "+valueToGoStringThetest(this.FieldA, "test.TheTestEnum")+",\n") + } + if this.FieldB != nil { + s = append(s, "FieldB: "+fmt.Sprintf("%#v", this.FieldB)+",\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 *NoExtensionsMap) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&test.NoExtensionsMap{") + if this.Field1 != nil { + s = append(s, "Field1: "+valueToGoStringThetest(this.Field1, "int64")+",\n") + } + if this.XXX_extensions != nil { + s = append(s, "XXX_extensions: "+fmt.Sprintf("%#v", this.XXX_extensions)+",\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 *Unrecognized) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&test.Unrecognized{") + if this.Field1 != nil { + s = append(s, "Field1: "+valueToGoStringThetest(this.Field1, "string")+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *UnrecognizedWithInner) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 6) + s = append(s, "&test.UnrecognizedWithInner{") + if this.Embedded != nil { + s = append(s, "Embedded: "+fmt.Sprintf("%#v", this.Embedded)+",\n") + } + if this.Field2 != nil { + s = append(s, "Field2: "+valueToGoStringThetest(this.Field2, "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 *UnrecognizedWithInner_Inner) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&test.UnrecognizedWithInner_Inner{") + if this.Field1 != nil { + s = append(s, "Field1: "+valueToGoStringThetest(this.Field1, "uint32")+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *UnrecognizedWithEmbed) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 6) + s = append(s, "&test.UnrecognizedWithEmbed{") + s = append(s, "UnrecognizedWithEmbed_Embedded: "+strings.Replace(this.UnrecognizedWithEmbed_Embedded.GoString(), `&`, ``, 1)+",\n") + if this.Field2 != nil { + s = append(s, "Field2: "+valueToGoStringThetest(this.Field2, "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 *UnrecognizedWithEmbed_Embedded) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&test.UnrecognizedWithEmbed_Embedded{") + if this.Field1 != nil { + s = append(s, "Field1: "+valueToGoStringThetest(this.Field1, "uint32")+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *Node) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 6) + s = append(s, "&test.Node{") + if this.Label != nil { + s = append(s, "Label: "+valueToGoStringThetest(this.Label, "string")+",\n") + } + if this.Children != nil { + s = append(s, "Children: "+fmt.Sprintf("%#v", this.Children)+",\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 valueToGoStringThetest(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 extensionToGoStringThetest(e map[int32]github_com_gogo_protobuf_proto.Extension) string { + if e == nil { + return "nil" + } + s := "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 +} +func (m *NidOptNative) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *NidOptNative) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + data[i] = 0x9 + i++ + i = encodeFixed64Thetest(data, i, uint64(math.Float64bits(float64(m.Field1)))) + data[i] = 0x15 + i++ + i = encodeFixed32Thetest(data, i, uint32(math.Float32bits(float32(m.Field2)))) + data[i] = 0x18 + i++ + i = encodeVarintThetest(data, i, uint64(m.Field3)) + data[i] = 0x20 + i++ + i = encodeVarintThetest(data, i, uint64(m.Field4)) + data[i] = 0x28 + i++ + i = encodeVarintThetest(data, i, uint64(m.Field5)) + data[i] = 0x30 + i++ + i = encodeVarintThetest(data, i, uint64(m.Field6)) + data[i] = 0x38 + i++ + i = encodeVarintThetest(data, i, uint64((uint32(m.Field7)<<1)^uint32((m.Field7>>31)))) + data[i] = 0x40 + i++ + i = encodeVarintThetest(data, i, uint64((uint64(m.Field8)<<1)^uint64((m.Field8>>63)))) + data[i] = 0x4d + i++ + i = encodeFixed32Thetest(data, i, uint32(m.Field9)) + data[i] = 0x55 + i++ + i = encodeFixed32Thetest(data, i, uint32(m.Field10)) + data[i] = 0x59 + i++ + i = encodeFixed64Thetest(data, i, uint64(m.Field11)) + data[i] = 0x61 + i++ + i = encodeFixed64Thetest(data, i, uint64(m.Field12)) + data[i] = 0x68 + i++ + if m.Field13 { + data[i] = 1 + } else { + data[i] = 0 + } + i++ + data[i] = 0x72 + i++ + i = encodeVarintThetest(data, i, uint64(len(m.Field14))) + i += copy(data[i:], m.Field14) + if m.Field15 != nil { + data[i] = 0x7a + i++ + i = encodeVarintThetest(data, i, uint64(len(m.Field15))) + i += copy(data[i:], m.Field15) + } + if m.XXX_unrecognized != nil { + i += copy(data[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *NinOptNative) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *NinOptNative) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Field1 != nil { + data[i] = 0x9 + i++ + i = encodeFixed64Thetest(data, i, uint64(math.Float64bits(float64(*m.Field1)))) + } + if m.Field2 != nil { + data[i] = 0x15 + i++ + i = encodeFixed32Thetest(data, i, uint32(math.Float32bits(float32(*m.Field2)))) + } + if m.Field3 != nil { + data[i] = 0x18 + i++ + i = encodeVarintThetest(data, i, uint64(*m.Field3)) + } + if m.Field4 != nil { + data[i] = 0x20 + i++ + i = encodeVarintThetest(data, i, uint64(*m.Field4)) + } + if m.Field5 != nil { + data[i] = 0x28 + i++ + i = encodeVarintThetest(data, i, uint64(*m.Field5)) + } + if m.Field6 != nil { + data[i] = 0x30 + i++ + i = encodeVarintThetest(data, i, uint64(*m.Field6)) + } + if m.Field7 != nil { + data[i] = 0x38 + i++ + i = encodeVarintThetest(data, i, uint64((uint32(*m.Field7)<<1)^uint32((*m.Field7>>31)))) + } + if m.Field8 != nil { + data[i] = 0x40 + i++ + i = encodeVarintThetest(data, i, uint64((uint64(*m.Field8)<<1)^uint64((*m.Field8>>63)))) + } + if m.Field9 != nil { + data[i] = 0x4d + i++ + i = encodeFixed32Thetest(data, i, uint32(*m.Field9)) + } + if m.Field10 != nil { + data[i] = 0x55 + i++ + i = encodeFixed32Thetest(data, i, uint32(*m.Field10)) + } + if m.Field11 != nil { + data[i] = 0x59 + i++ + i = encodeFixed64Thetest(data, i, uint64(*m.Field11)) + } + if m.Field12 != nil { + data[i] = 0x61 + i++ + i = encodeFixed64Thetest(data, i, uint64(*m.Field12)) + } + if m.Field13 != nil { + data[i] = 0x68 + i++ + if *m.Field13 { + data[i] = 1 + } else { + data[i] = 0 + } + i++ + } + if m.Field14 != nil { + data[i] = 0x72 + i++ + i = encodeVarintThetest(data, i, uint64(len(*m.Field14))) + i += copy(data[i:], *m.Field14) + } + if m.Field15 != nil { + data[i] = 0x7a + i++ + i = encodeVarintThetest(data, i, uint64(len(m.Field15))) + i += copy(data[i:], m.Field15) + } + if m.XXX_unrecognized != nil { + i += copy(data[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *NidRepNative) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *NidRepNative) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Field1) > 0 { + for _, num := range m.Field1 { + data[i] = 0x9 + i++ + f1 := math.Float64bits(float64(num)) + data[i] = uint8(f1) + i++ + data[i] = uint8(f1 >> 8) + i++ + data[i] = uint8(f1 >> 16) + i++ + data[i] = uint8(f1 >> 24) + i++ + data[i] = uint8(f1 >> 32) + i++ + data[i] = uint8(f1 >> 40) + i++ + data[i] = uint8(f1 >> 48) + i++ + data[i] = uint8(f1 >> 56) + i++ + } + } + if len(m.Field2) > 0 { + for _, num := range m.Field2 { + data[i] = 0x15 + i++ + f2 := math.Float32bits(float32(num)) + data[i] = uint8(f2) + i++ + data[i] = uint8(f2 >> 8) + i++ + data[i] = uint8(f2 >> 16) + i++ + data[i] = uint8(f2 >> 24) + i++ + } + } + if len(m.Field3) > 0 { + for _, num := range m.Field3 { + data[i] = 0x18 + i++ + i = encodeVarintThetest(data, i, uint64(num)) + } + } + if len(m.Field4) > 0 { + for _, num := range m.Field4 { + data[i] = 0x20 + i++ + i = encodeVarintThetest(data, i, uint64(num)) + } + } + if len(m.Field5) > 0 { + for _, num := range m.Field5 { + data[i] = 0x28 + i++ + i = encodeVarintThetest(data, i, uint64(num)) + } + } + if len(m.Field6) > 0 { + for _, num := range m.Field6 { + data[i] = 0x30 + i++ + i = encodeVarintThetest(data, i, uint64(num)) + } + } + if len(m.Field7) > 0 { + for _, num := range m.Field7 { + data[i] = 0x38 + i++ + x3 := (uint32(num) << 1) ^ uint32((num >> 31)) + for x3 >= 1<<7 { + data[i] = uint8(uint64(x3)&0x7f | 0x80) + x3 >>= 7 + i++ + } + data[i] = uint8(x3) + i++ + } + } + if len(m.Field8) > 0 { + for _, num := range m.Field8 { + data[i] = 0x40 + i++ + x4 := (uint64(num) << 1) ^ uint64((num >> 63)) + for x4 >= 1<<7 { + data[i] = uint8(uint64(x4)&0x7f | 0x80) + x4 >>= 7 + i++ + } + data[i] = uint8(x4) + i++ + } + } + if len(m.Field9) > 0 { + for _, num := range m.Field9 { + data[i] = 0x4d + i++ + data[i] = uint8(num) + i++ + data[i] = uint8(num >> 8) + i++ + data[i] = uint8(num >> 16) + i++ + data[i] = uint8(num >> 24) + i++ + } + } + if len(m.Field10) > 0 { + for _, num := range m.Field10 { + data[i] = 0x55 + i++ + data[i] = uint8(num) + i++ + data[i] = uint8(num >> 8) + i++ + data[i] = uint8(num >> 16) + i++ + data[i] = uint8(num >> 24) + i++ + } + } + if len(m.Field11) > 0 { + for _, num := range m.Field11 { + data[i] = 0x59 + i++ + data[i] = uint8(num) + i++ + data[i] = uint8(num >> 8) + i++ + data[i] = uint8(num >> 16) + i++ + data[i] = uint8(num >> 24) + i++ + data[i] = uint8(num >> 32) + i++ + data[i] = uint8(num >> 40) + i++ + data[i] = uint8(num >> 48) + i++ + data[i] = uint8(num >> 56) + i++ + } + } + if len(m.Field12) > 0 { + for _, num := range m.Field12 { + data[i] = 0x61 + i++ + data[i] = uint8(num) + i++ + data[i] = uint8(num >> 8) + i++ + data[i] = uint8(num >> 16) + i++ + data[i] = uint8(num >> 24) + i++ + data[i] = uint8(num >> 32) + i++ + data[i] = uint8(num >> 40) + i++ + data[i] = uint8(num >> 48) + i++ + data[i] = uint8(num >> 56) + i++ + } + } + if len(m.Field13) > 0 { + for _, b := range m.Field13 { + data[i] = 0x68 + i++ + if b { + data[i] = 1 + } else { + data[i] = 0 + } + i++ + } + } + if len(m.Field14) > 0 { + for _, s := range m.Field14 { + data[i] = 0x72 + 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 len(m.Field15) > 0 { + for _, b := range m.Field15 { + data[i] = 0x7a + i++ + i = encodeVarintThetest(data, i, uint64(len(b))) + i += copy(data[i:], b) + } + } + if m.XXX_unrecognized != nil { + i += copy(data[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *NinRepNative) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *NinRepNative) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Field1) > 0 { + for _, num := range m.Field1 { + data[i] = 0x9 + i++ + f5 := math.Float64bits(float64(num)) + data[i] = uint8(f5) + i++ + data[i] = uint8(f5 >> 8) + i++ + data[i] = uint8(f5 >> 16) + i++ + data[i] = uint8(f5 >> 24) + i++ + data[i] = uint8(f5 >> 32) + i++ + data[i] = uint8(f5 >> 40) + i++ + data[i] = uint8(f5 >> 48) + i++ + data[i] = uint8(f5 >> 56) + i++ + } + } + if len(m.Field2) > 0 { + for _, num := range m.Field2 { + data[i] = 0x15 + i++ + f6 := math.Float32bits(float32(num)) + data[i] = uint8(f6) + i++ + data[i] = uint8(f6 >> 8) + i++ + data[i] = uint8(f6 >> 16) + i++ + data[i] = uint8(f6 >> 24) + i++ + } + } + if len(m.Field3) > 0 { + for _, num := range m.Field3 { + data[i] = 0x18 + i++ + i = encodeVarintThetest(data, i, uint64(num)) + } + } + if len(m.Field4) > 0 { + for _, num := range m.Field4 { + data[i] = 0x20 + i++ + i = encodeVarintThetest(data, i, uint64(num)) + } + } + if len(m.Field5) > 0 { + for _, num := range m.Field5 { + data[i] = 0x28 + i++ + i = encodeVarintThetest(data, i, uint64(num)) + } + } + if len(m.Field6) > 0 { + for _, num := range m.Field6 { + data[i] = 0x30 + i++ + i = encodeVarintThetest(data, i, uint64(num)) + } + } + if len(m.Field7) > 0 { + for _, num := range m.Field7 { + data[i] = 0x38 + i++ + x7 := (uint32(num) << 1) ^ uint32((num >> 31)) + for x7 >= 1<<7 { + data[i] = uint8(uint64(x7)&0x7f | 0x80) + x7 >>= 7 + i++ + } + data[i] = uint8(x7) + i++ + } + } + if len(m.Field8) > 0 { + for _, num := range m.Field8 { + data[i] = 0x40 + i++ + x8 := (uint64(num) << 1) ^ uint64((num >> 63)) + for x8 >= 1<<7 { + data[i] = uint8(uint64(x8)&0x7f | 0x80) + x8 >>= 7 + i++ + } + data[i] = uint8(x8) + i++ + } + } + if len(m.Field9) > 0 { + for _, num := range m.Field9 { + data[i] = 0x4d + i++ + data[i] = uint8(num) + i++ + data[i] = uint8(num >> 8) + i++ + data[i] = uint8(num >> 16) + i++ + data[i] = uint8(num >> 24) + i++ + } + } + if len(m.Field10) > 0 { + for _, num := range m.Field10 { + data[i] = 0x55 + i++ + data[i] = uint8(num) + i++ + data[i] = uint8(num >> 8) + i++ + data[i] = uint8(num >> 16) + i++ + data[i] = uint8(num >> 24) + i++ + } + } + if len(m.Field11) > 0 { + for _, num := range m.Field11 { + data[i] = 0x59 + i++ + data[i] = uint8(num) + i++ + data[i] = uint8(num >> 8) + i++ + data[i] = uint8(num >> 16) + i++ + data[i] = uint8(num >> 24) + i++ + data[i] = uint8(num >> 32) + i++ + data[i] = uint8(num >> 40) + i++ + data[i] = uint8(num >> 48) + i++ + data[i] = uint8(num >> 56) + i++ + } + } + if len(m.Field12) > 0 { + for _, num := range m.Field12 { + data[i] = 0x61 + i++ + data[i] = uint8(num) + i++ + data[i] = uint8(num >> 8) + i++ + data[i] = uint8(num >> 16) + i++ + data[i] = uint8(num >> 24) + i++ + data[i] = uint8(num >> 32) + i++ + data[i] = uint8(num >> 40) + i++ + data[i] = uint8(num >> 48) + i++ + data[i] = uint8(num >> 56) + i++ + } + } + if len(m.Field13) > 0 { + for _, b := range m.Field13 { + data[i] = 0x68 + i++ + if b { + data[i] = 1 + } else { + data[i] = 0 + } + i++ + } + } + if len(m.Field14) > 0 { + for _, s := range m.Field14 { + data[i] = 0x72 + 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 len(m.Field15) > 0 { + for _, b := range m.Field15 { + data[i] = 0x7a + i++ + i = encodeVarintThetest(data, i, uint64(len(b))) + i += copy(data[i:], b) + } + } + if m.XXX_unrecognized != nil { + i += copy(data[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *NidRepPackedNative) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *NidRepPackedNative) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Field1) > 0 { + data[i] = 0xa + i++ + i = encodeVarintThetest(data, i, uint64(len(m.Field1)*8)) + for _, num := range m.Field1 { + f9 := math.Float64bits(float64(num)) + data[i] = uint8(f9) + i++ + data[i] = uint8(f9 >> 8) + i++ + data[i] = uint8(f9 >> 16) + i++ + data[i] = uint8(f9 >> 24) + i++ + data[i] = uint8(f9 >> 32) + i++ + data[i] = uint8(f9 >> 40) + i++ + data[i] = uint8(f9 >> 48) + i++ + data[i] = uint8(f9 >> 56) + i++ + } + } + if len(m.Field2) > 0 { + data[i] = 0x12 + i++ + i = encodeVarintThetest(data, i, uint64(len(m.Field2)*4)) + for _, num := range m.Field2 { + f10 := math.Float32bits(float32(num)) + data[i] = uint8(f10) + i++ + data[i] = uint8(f10 >> 8) + i++ + data[i] = uint8(f10 >> 16) + i++ + data[i] = uint8(f10 >> 24) + i++ + } + } + if len(m.Field3) > 0 { + data12 := make([]byte, len(m.Field3)*10) + var j11 int + for _, num1 := range m.Field3 { + num := uint64(num1) + for num >= 1<<7 { + data12[j11] = uint8(uint64(num)&0x7f | 0x80) + num >>= 7 + j11++ + } + data12[j11] = uint8(num) + j11++ + } + data[i] = 0x1a + i++ + i = encodeVarintThetest(data, i, uint64(j11)) + i += copy(data[i:], data12[:j11]) + } + if len(m.Field4) > 0 { + data14 := make([]byte, len(m.Field4)*10) + var j13 int + for _, num1 := range m.Field4 { + num := uint64(num1) + for num >= 1<<7 { + data14[j13] = uint8(uint64(num)&0x7f | 0x80) + num >>= 7 + j13++ + } + data14[j13] = uint8(num) + j13++ + } + data[i] = 0x22 + i++ + i = encodeVarintThetest(data, i, uint64(j13)) + i += copy(data[i:], data14[:j13]) + } + if len(m.Field5) > 0 { + data16 := make([]byte, len(m.Field5)*10) + var j15 int + for _, num := range m.Field5 { + for num >= 1<<7 { + data16[j15] = uint8(uint64(num)&0x7f | 0x80) + num >>= 7 + j15++ + } + data16[j15] = uint8(num) + j15++ + } + data[i] = 0x2a + i++ + i = encodeVarintThetest(data, i, uint64(j15)) + i += copy(data[i:], data16[:j15]) + } + if len(m.Field6) > 0 { + data18 := make([]byte, len(m.Field6)*10) + var j17 int + for _, num := range m.Field6 { + for num >= 1<<7 { + data18[j17] = uint8(uint64(num)&0x7f | 0x80) + num >>= 7 + j17++ + } + data18[j17] = uint8(num) + j17++ + } + data[i] = 0x32 + i++ + i = encodeVarintThetest(data, i, uint64(j17)) + i += copy(data[i:], data18[:j17]) + } + if len(m.Field7) > 0 { + data19 := make([]byte, len(m.Field7)*5) + var j20 int + for _, num := range m.Field7 { + x21 := (uint32(num) << 1) ^ uint32((num >> 31)) + for x21 >= 1<<7 { + data19[j20] = uint8(uint64(x21)&0x7f | 0x80) + j20++ + x21 >>= 7 + } + data19[j20] = uint8(x21) + j20++ + } + data[i] = 0x3a + i++ + i = encodeVarintThetest(data, i, uint64(j20)) + i += copy(data[i:], data19[:j20]) + } + if len(m.Field8) > 0 { + var j22 int + data24 := make([]byte, len(m.Field8)*10) + for _, num := range m.Field8 { + x23 := (uint64(num) << 1) ^ uint64((num >> 63)) + for x23 >= 1<<7 { + data24[j22] = uint8(uint64(x23)&0x7f | 0x80) + j22++ + x23 >>= 7 + } + data24[j22] = uint8(x23) + j22++ + } + data[i] = 0x42 + i++ + i = encodeVarintThetest(data, i, uint64(j22)) + i += copy(data[i:], data24[:j22]) + } + if len(m.Field9) > 0 { + data[i] = 0x4a + i++ + i = encodeVarintThetest(data, i, uint64(len(m.Field9)*4)) + for _, num := range m.Field9 { + data[i] = uint8(num) + i++ + data[i] = uint8(num >> 8) + i++ + data[i] = uint8(num >> 16) + i++ + data[i] = uint8(num >> 24) + i++ + } + } + if len(m.Field10) > 0 { + data[i] = 0x52 + i++ + i = encodeVarintThetest(data, i, uint64(len(m.Field10)*4)) + for _, num := range m.Field10 { + data[i] = uint8(num) + i++ + data[i] = uint8(num >> 8) + i++ + data[i] = uint8(num >> 16) + i++ + data[i] = uint8(num >> 24) + i++ + } + } + if len(m.Field11) > 0 { + data[i] = 0x5a + i++ + i = encodeVarintThetest(data, i, uint64(len(m.Field11)*8)) + for _, num := range m.Field11 { + data[i] = uint8(num) + i++ + data[i] = uint8(num >> 8) + i++ + data[i] = uint8(num >> 16) + i++ + data[i] = uint8(num >> 24) + i++ + data[i] = uint8(num >> 32) + i++ + data[i] = uint8(num >> 40) + i++ + data[i] = uint8(num >> 48) + i++ + data[i] = uint8(num >> 56) + i++ + } + } + if len(m.Field12) > 0 { + data[i] = 0x62 + i++ + i = encodeVarintThetest(data, i, uint64(len(m.Field12)*8)) + for _, num := range m.Field12 { + data[i] = uint8(num) + i++ + data[i] = uint8(num >> 8) + i++ + data[i] = uint8(num >> 16) + i++ + data[i] = uint8(num >> 24) + i++ + data[i] = uint8(num >> 32) + i++ + data[i] = uint8(num >> 40) + i++ + data[i] = uint8(num >> 48) + i++ + data[i] = uint8(num >> 56) + i++ + } + } + if len(m.Field13) > 0 { + data[i] = 0x6a + i++ + i = encodeVarintThetest(data, i, uint64(len(m.Field13))) + for _, b := range m.Field13 { + if b { + data[i] = 1 + } else { + data[i] = 0 + } + i++ + } + } + if m.XXX_unrecognized != nil { + i += copy(data[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *NinRepPackedNative) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *NinRepPackedNative) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Field1) > 0 { + data[i] = 0xa + i++ + i = encodeVarintThetest(data, i, uint64(len(m.Field1)*8)) + for _, num := range m.Field1 { + f25 := math.Float64bits(float64(num)) + data[i] = uint8(f25) + i++ + data[i] = uint8(f25 >> 8) + i++ + data[i] = uint8(f25 >> 16) + i++ + data[i] = uint8(f25 >> 24) + i++ + data[i] = uint8(f25 >> 32) + i++ + data[i] = uint8(f25 >> 40) + i++ + data[i] = uint8(f25 >> 48) + i++ + data[i] = uint8(f25 >> 56) + i++ + } + } + if len(m.Field2) > 0 { + data[i] = 0x12 + i++ + i = encodeVarintThetest(data, i, uint64(len(m.Field2)*4)) + for _, num := range m.Field2 { + f26 := math.Float32bits(float32(num)) + data[i] = uint8(f26) + i++ + data[i] = uint8(f26 >> 8) + i++ + data[i] = uint8(f26 >> 16) + i++ + data[i] = uint8(f26 >> 24) + i++ + } + } + if len(m.Field3) > 0 { + data28 := make([]byte, len(m.Field3)*10) + var j27 int + for _, num1 := range m.Field3 { + num := uint64(num1) + for num >= 1<<7 { + data28[j27] = uint8(uint64(num)&0x7f | 0x80) + num >>= 7 + j27++ + } + data28[j27] = uint8(num) + j27++ + } + data[i] = 0x1a + i++ + i = encodeVarintThetest(data, i, uint64(j27)) + i += copy(data[i:], data28[:j27]) + } + if len(m.Field4) > 0 { + data30 := make([]byte, len(m.Field4)*10) + var j29 int + for _, num1 := range m.Field4 { + num := uint64(num1) + for num >= 1<<7 { + data30[j29] = uint8(uint64(num)&0x7f | 0x80) + num >>= 7 + j29++ + } + data30[j29] = uint8(num) + j29++ + } + data[i] = 0x22 + i++ + i = encodeVarintThetest(data, i, uint64(j29)) + i += copy(data[i:], data30[:j29]) + } + if len(m.Field5) > 0 { + data32 := make([]byte, len(m.Field5)*10) + var j31 int + for _, num := range m.Field5 { + for num >= 1<<7 { + data32[j31] = uint8(uint64(num)&0x7f | 0x80) + num >>= 7 + j31++ + } + data32[j31] = uint8(num) + j31++ + } + data[i] = 0x2a + i++ + i = encodeVarintThetest(data, i, uint64(j31)) + i += copy(data[i:], data32[:j31]) + } + if len(m.Field6) > 0 { + data34 := make([]byte, len(m.Field6)*10) + var j33 int + for _, num := range m.Field6 { + for num >= 1<<7 { + data34[j33] = uint8(uint64(num)&0x7f | 0x80) + num >>= 7 + j33++ + } + data34[j33] = uint8(num) + j33++ + } + data[i] = 0x32 + i++ + i = encodeVarintThetest(data, i, uint64(j33)) + i += copy(data[i:], data34[:j33]) + } + if len(m.Field7) > 0 { + data35 := make([]byte, len(m.Field7)*5) + var j36 int + for _, num := range m.Field7 { + x37 := (uint32(num) << 1) ^ uint32((num >> 31)) + for x37 >= 1<<7 { + data35[j36] = uint8(uint64(x37)&0x7f | 0x80) + j36++ + x37 >>= 7 + } + data35[j36] = uint8(x37) + j36++ + } + data[i] = 0x3a + i++ + i = encodeVarintThetest(data, i, uint64(j36)) + i += copy(data[i:], data35[:j36]) + } + if len(m.Field8) > 0 { + var j38 int + data40 := make([]byte, len(m.Field8)*10) + for _, num := range m.Field8 { + x39 := (uint64(num) << 1) ^ uint64((num >> 63)) + for x39 >= 1<<7 { + data40[j38] = uint8(uint64(x39)&0x7f | 0x80) + j38++ + x39 >>= 7 + } + data40[j38] = uint8(x39) + j38++ + } + data[i] = 0x42 + i++ + i = encodeVarintThetest(data, i, uint64(j38)) + i += copy(data[i:], data40[:j38]) + } + if len(m.Field9) > 0 { + data[i] = 0x4a + i++ + i = encodeVarintThetest(data, i, uint64(len(m.Field9)*4)) + for _, num := range m.Field9 { + data[i] = uint8(num) + i++ + data[i] = uint8(num >> 8) + i++ + data[i] = uint8(num >> 16) + i++ + data[i] = uint8(num >> 24) + i++ + } + } + if len(m.Field10) > 0 { + data[i] = 0x52 + i++ + i = encodeVarintThetest(data, i, uint64(len(m.Field10)*4)) + for _, num := range m.Field10 { + data[i] = uint8(num) + i++ + data[i] = uint8(num >> 8) + i++ + data[i] = uint8(num >> 16) + i++ + data[i] = uint8(num >> 24) + i++ + } + } + if len(m.Field11) > 0 { + data[i] = 0x5a + i++ + i = encodeVarintThetest(data, i, uint64(len(m.Field11)*8)) + for _, num := range m.Field11 { + data[i] = uint8(num) + i++ + data[i] = uint8(num >> 8) + i++ + data[i] = uint8(num >> 16) + i++ + data[i] = uint8(num >> 24) + i++ + data[i] = uint8(num >> 32) + i++ + data[i] = uint8(num >> 40) + i++ + data[i] = uint8(num >> 48) + i++ + data[i] = uint8(num >> 56) + i++ + } + } + if len(m.Field12) > 0 { + data[i] = 0x62 + i++ + i = encodeVarintThetest(data, i, uint64(len(m.Field12)*8)) + for _, num := range m.Field12 { + data[i] = uint8(num) + i++ + data[i] = uint8(num >> 8) + i++ + data[i] = uint8(num >> 16) + i++ + data[i] = uint8(num >> 24) + i++ + data[i] = uint8(num >> 32) + i++ + data[i] = uint8(num >> 40) + i++ + data[i] = uint8(num >> 48) + i++ + data[i] = uint8(num >> 56) + i++ + } + } + if len(m.Field13) > 0 { + data[i] = 0x6a + i++ + i = encodeVarintThetest(data, i, uint64(len(m.Field13))) + for _, b := range m.Field13 { + if b { + data[i] = 1 + } else { + data[i] = 0 + } + i++ + } + } + if m.XXX_unrecognized != nil { + i += copy(data[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *NidOptStruct) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *NidOptStruct) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + data[i] = 0x9 + i++ + i = encodeFixed64Thetest(data, i, uint64(math.Float64bits(float64(m.Field1)))) + data[i] = 0x15 + i++ + i = encodeFixed32Thetest(data, i, uint32(math.Float32bits(float32(m.Field2)))) + data[i] = 0x1a + i++ + i = encodeVarintThetest(data, i, uint64(m.Field3.Size())) + n41, err := m.Field3.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n41 + data[i] = 0x22 + i++ + i = encodeVarintThetest(data, i, uint64(m.Field4.Size())) + n42, err := m.Field4.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n42 + data[i] = 0x30 + i++ + i = encodeVarintThetest(data, i, uint64(m.Field6)) + data[i] = 0x38 + i++ + i = encodeVarintThetest(data, i, uint64((uint32(m.Field7)<<1)^uint32((m.Field7>>31)))) + data[i] = 0x42 + i++ + i = encodeVarintThetest(data, i, uint64(m.Field8.Size())) + n43, err := m.Field8.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n43 + data[i] = 0x68 + i++ + if m.Field13 { + data[i] = 1 + } else { + data[i] = 0 + } + i++ + data[i] = 0x72 + i++ + i = encodeVarintThetest(data, i, uint64(len(m.Field14))) + i += copy(data[i:], m.Field14) + if m.Field15 != nil { + data[i] = 0x7a + i++ + i = encodeVarintThetest(data, i, uint64(len(m.Field15))) + i += copy(data[i:], m.Field15) + } + if m.XXX_unrecognized != nil { + i += copy(data[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *NinOptStruct) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *NinOptStruct) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Field1 != nil { + data[i] = 0x9 + i++ + i = encodeFixed64Thetest(data, i, uint64(math.Float64bits(float64(*m.Field1)))) + } + if m.Field2 != nil { + data[i] = 0x15 + i++ + i = encodeFixed32Thetest(data, i, uint32(math.Float32bits(float32(*m.Field2)))) + } + if m.Field3 != nil { + data[i] = 0x1a + i++ + i = encodeVarintThetest(data, i, uint64(m.Field3.Size())) + n44, err := m.Field3.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n44 + } + if m.Field4 != nil { + data[i] = 0x22 + i++ + i = encodeVarintThetest(data, i, uint64(m.Field4.Size())) + n45, err := m.Field4.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n45 + } + if m.Field6 != nil { + data[i] = 0x30 + i++ + i = encodeVarintThetest(data, i, uint64(*m.Field6)) + } + if m.Field7 != nil { + data[i] = 0x38 + i++ + i = encodeVarintThetest(data, i, uint64((uint32(*m.Field7)<<1)^uint32((*m.Field7>>31)))) + } + if m.Field8 != nil { + data[i] = 0x42 + i++ + i = encodeVarintThetest(data, i, uint64(m.Field8.Size())) + n46, err := m.Field8.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n46 + } + if m.Field13 != nil { + data[i] = 0x68 + i++ + if *m.Field13 { + data[i] = 1 + } else { + data[i] = 0 + } + i++ + } + if m.Field14 != nil { + data[i] = 0x72 + i++ + i = encodeVarintThetest(data, i, uint64(len(*m.Field14))) + i += copy(data[i:], *m.Field14) + } + if m.Field15 != nil { + data[i] = 0x7a + i++ + i = encodeVarintThetest(data, i, uint64(len(m.Field15))) + i += copy(data[i:], m.Field15) + } + if m.XXX_unrecognized != nil { + i += copy(data[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *NidRepStruct) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *NidRepStruct) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Field1) > 0 { + for _, num := range m.Field1 { + data[i] = 0x9 + i++ + f47 := math.Float64bits(float64(num)) + data[i] = uint8(f47) + i++ + data[i] = uint8(f47 >> 8) + i++ + data[i] = uint8(f47 >> 16) + i++ + data[i] = uint8(f47 >> 24) + i++ + data[i] = uint8(f47 >> 32) + i++ + data[i] = uint8(f47 >> 40) + i++ + data[i] = uint8(f47 >> 48) + i++ + data[i] = uint8(f47 >> 56) + i++ + } + } + if len(m.Field2) > 0 { + for _, num := range m.Field2 { + data[i] = 0x15 + i++ + f48 := math.Float32bits(float32(num)) + data[i] = uint8(f48) + i++ + data[i] = uint8(f48 >> 8) + i++ + data[i] = uint8(f48 >> 16) + i++ + data[i] = uint8(f48 >> 24) + i++ + } + } + if len(m.Field3) > 0 { + for _, msg := range m.Field3 { + data[i] = 0x1a + i++ + i = encodeVarintThetest(data, i, uint64(msg.Size())) + n, err := msg.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n + } + } + if len(m.Field4) > 0 { + for _, msg := range m.Field4 { + data[i] = 0x22 + i++ + i = encodeVarintThetest(data, i, uint64(msg.Size())) + n, err := msg.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n + } + } + if len(m.Field6) > 0 { + for _, num := range m.Field6 { + data[i] = 0x30 + i++ + i = encodeVarintThetest(data, i, uint64(num)) + } + } + if len(m.Field7) > 0 { + for _, num := range m.Field7 { + data[i] = 0x38 + i++ + x49 := (uint32(num) << 1) ^ uint32((num >> 31)) + for x49 >= 1<<7 { + data[i] = uint8(uint64(x49)&0x7f | 0x80) + x49 >>= 7 + i++ + } + data[i] = uint8(x49) + i++ + } + } + if len(m.Field8) > 0 { + for _, msg := range m.Field8 { + data[i] = 0x42 + i++ + i = encodeVarintThetest(data, i, uint64(msg.Size())) + n, err := msg.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n + } + } + if len(m.Field13) > 0 { + for _, b := range m.Field13 { + data[i] = 0x68 + i++ + if b { + data[i] = 1 + } else { + data[i] = 0 + } + i++ + } + } + if len(m.Field14) > 0 { + for _, s := range m.Field14 { + data[i] = 0x72 + 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 len(m.Field15) > 0 { + for _, b := range m.Field15 { + data[i] = 0x7a + i++ + i = encodeVarintThetest(data, i, uint64(len(b))) + i += copy(data[i:], b) + } + } + if m.XXX_unrecognized != nil { + i += copy(data[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *NinRepStruct) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *NinRepStruct) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Field1) > 0 { + for _, num := range m.Field1 { + data[i] = 0x9 + i++ + f50 := math.Float64bits(float64(num)) + data[i] = uint8(f50) + i++ + data[i] = uint8(f50 >> 8) + i++ + data[i] = uint8(f50 >> 16) + i++ + data[i] = uint8(f50 >> 24) + i++ + data[i] = uint8(f50 >> 32) + i++ + data[i] = uint8(f50 >> 40) + i++ + data[i] = uint8(f50 >> 48) + i++ + data[i] = uint8(f50 >> 56) + i++ + } + } + if len(m.Field2) > 0 { + for _, num := range m.Field2 { + data[i] = 0x15 + i++ + f51 := math.Float32bits(float32(num)) + data[i] = uint8(f51) + i++ + data[i] = uint8(f51 >> 8) + i++ + data[i] = uint8(f51 >> 16) + i++ + data[i] = uint8(f51 >> 24) + i++ + } + } + if len(m.Field3) > 0 { + for _, msg := range m.Field3 { + data[i] = 0x1a + i++ + i = encodeVarintThetest(data, i, uint64(msg.Size())) + n, err := msg.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n + } + } + if len(m.Field4) > 0 { + for _, msg := range m.Field4 { + data[i] = 0x22 + i++ + i = encodeVarintThetest(data, i, uint64(msg.Size())) + n, err := msg.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n + } + } + if len(m.Field6) > 0 { + for _, num := range m.Field6 { + data[i] = 0x30 + i++ + i = encodeVarintThetest(data, i, uint64(num)) + } + } + if len(m.Field7) > 0 { + for _, num := range m.Field7 { + data[i] = 0x38 + i++ + x52 := (uint32(num) << 1) ^ uint32((num >> 31)) + for x52 >= 1<<7 { + data[i] = uint8(uint64(x52)&0x7f | 0x80) + x52 >>= 7 + i++ + } + data[i] = uint8(x52) + i++ + } + } + if len(m.Field8) > 0 { + for _, msg := range m.Field8 { + data[i] = 0x42 + i++ + i = encodeVarintThetest(data, i, uint64(msg.Size())) + n, err := msg.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n + } + } + if len(m.Field13) > 0 { + for _, b := range m.Field13 { + data[i] = 0x68 + i++ + if b { + data[i] = 1 + } else { + data[i] = 0 + } + i++ + } + } + if len(m.Field14) > 0 { + for _, s := range m.Field14 { + data[i] = 0x72 + 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 len(m.Field15) > 0 { + for _, b := range m.Field15 { + data[i] = 0x7a + i++ + i = encodeVarintThetest(data, i, uint64(len(b))) + i += copy(data[i:], b) + } + } + if m.XXX_unrecognized != nil { + i += copy(data[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *NidEmbeddedStruct) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *NidEmbeddedStruct) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.NidOptNative != nil { + data[i] = 0xa + i++ + i = encodeVarintThetest(data, i, uint64(m.NidOptNative.Size())) + n53, err := m.NidOptNative.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n53 + } + data[i] = 0xc2 + i++ + data[i] = 0xc + i++ + i = encodeVarintThetest(data, i, uint64(m.Field200.Size())) + n54, err := m.Field200.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n54 + data[i] = 0x90 + i++ + data[i] = 0xd + i++ + if m.Field210 { + data[i] = 1 + } else { + data[i] = 0 + } + i++ + if m.XXX_unrecognized != nil { + i += copy(data[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *NinEmbeddedStruct) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *NinEmbeddedStruct) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.NidOptNative != nil { + data[i] = 0xa + i++ + i = encodeVarintThetest(data, i, uint64(m.NidOptNative.Size())) + n55, err := m.NidOptNative.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n55 + } + if m.Field200 != nil { + data[i] = 0xc2 + i++ + data[i] = 0xc + i++ + i = encodeVarintThetest(data, i, uint64(m.Field200.Size())) + n56, err := m.Field200.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n56 + } + if m.Field210 != nil { + data[i] = 0x90 + i++ + data[i] = 0xd + i++ + if *m.Field210 { + data[i] = 1 + } else { + data[i] = 0 + } + i++ + } + if m.XXX_unrecognized != nil { + i += copy(data[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *NidNestedStruct) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *NidNestedStruct) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + data[i] = 0xa + i++ + i = encodeVarintThetest(data, i, uint64(m.Field1.Size())) + n57, err := m.Field1.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n57 + if len(m.Field2) > 0 { + for _, msg := range m.Field2 { + data[i] = 0x12 + i++ + i = encodeVarintThetest(data, i, uint64(msg.Size())) + n, err := msg.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n + } + } + if m.XXX_unrecognized != nil { + i += copy(data[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *NinNestedStruct) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *NinNestedStruct) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Field1 != nil { + data[i] = 0xa + i++ + i = encodeVarintThetest(data, i, uint64(m.Field1.Size())) + n58, err := m.Field1.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n58 + } + if len(m.Field2) > 0 { + for _, msg := range m.Field2 { + data[i] = 0x12 + i++ + i = encodeVarintThetest(data, i, uint64(msg.Size())) + n, err := msg.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n + } + } + if m.XXX_unrecognized != nil { + i += copy(data[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *NidOptCustom) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *NidOptCustom) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + data[i] = 0xa + i++ + i = encodeVarintThetest(data, i, uint64(m.Id.Size())) + n59, err := m.Id.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n59 + data[i] = 0x12 + i++ + i = encodeVarintThetest(data, i, uint64(m.Value.Size())) + n60, err := m.Value.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n60 + if m.XXX_unrecognized != nil { + i += copy(data[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *CustomDash) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *CustomDash) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Value != nil { + data[i] = 0xa + i++ + i = encodeVarintThetest(data, i, uint64(m.Value.Size())) + n61, err := m.Value.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n61 + } + if m.XXX_unrecognized != nil { + i += copy(data[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *NinOptCustom) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *NinOptCustom) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Id != nil { + data[i] = 0xa + i++ + i = encodeVarintThetest(data, i, uint64(m.Id.Size())) + n62, err := m.Id.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n62 + } + if m.Value != nil { + data[i] = 0x12 + i++ + i = encodeVarintThetest(data, i, uint64(m.Value.Size())) + n63, err := m.Value.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n63 + } + if m.XXX_unrecognized != nil { + i += copy(data[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *NidRepCustom) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *NidRepCustom) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Id) > 0 { + for _, msg := range m.Id { + data[i] = 0xa + i++ + i = encodeVarintThetest(data, i, uint64(msg.Size())) + n, err := msg.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n + } + } + if len(m.Value) > 0 { + for _, msg := range m.Value { + data[i] = 0x12 + i++ + i = encodeVarintThetest(data, i, uint64(msg.Size())) + n, err := msg.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n + } + } + if m.XXX_unrecognized != nil { + i += copy(data[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *NinRepCustom) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *NinRepCustom) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Id) > 0 { + for _, msg := range m.Id { + data[i] = 0xa + i++ + i = encodeVarintThetest(data, i, uint64(msg.Size())) + n, err := msg.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n + } + } + if len(m.Value) > 0 { + for _, msg := range m.Value { + data[i] = 0x12 + i++ + i = encodeVarintThetest(data, i, uint64(msg.Size())) + n, err := msg.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n + } + } + if m.XXX_unrecognized != nil { + i += copy(data[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *NinOptNativeUnion) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *NinOptNativeUnion) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Field1 != nil { + data[i] = 0x9 + i++ + i = encodeFixed64Thetest(data, i, uint64(math.Float64bits(float64(*m.Field1)))) + } + if m.Field2 != nil { + data[i] = 0x15 + i++ + i = encodeFixed32Thetest(data, i, uint32(math.Float32bits(float32(*m.Field2)))) + } + if m.Field3 != nil { + data[i] = 0x18 + i++ + i = encodeVarintThetest(data, i, uint64(*m.Field3)) + } + if m.Field4 != nil { + data[i] = 0x20 + i++ + i = encodeVarintThetest(data, i, uint64(*m.Field4)) + } + if m.Field5 != nil { + data[i] = 0x28 + i++ + i = encodeVarintThetest(data, i, uint64(*m.Field5)) + } + if m.Field6 != nil { + data[i] = 0x30 + i++ + i = encodeVarintThetest(data, i, uint64(*m.Field6)) + } + if m.Field13 != nil { + data[i] = 0x68 + i++ + if *m.Field13 { + data[i] = 1 + } else { + data[i] = 0 + } + i++ + } + if m.Field14 != nil { + data[i] = 0x72 + i++ + i = encodeVarintThetest(data, i, uint64(len(*m.Field14))) + i += copy(data[i:], *m.Field14) + } + if m.Field15 != nil { + data[i] = 0x7a + i++ + i = encodeVarintThetest(data, i, uint64(len(m.Field15))) + i += copy(data[i:], m.Field15) + } + if m.XXX_unrecognized != nil { + i += copy(data[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *NinOptStructUnion) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *NinOptStructUnion) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Field1 != nil { + data[i] = 0x9 + i++ + i = encodeFixed64Thetest(data, i, uint64(math.Float64bits(float64(*m.Field1)))) + } + if m.Field2 != nil { + data[i] = 0x15 + i++ + i = encodeFixed32Thetest(data, i, uint32(math.Float32bits(float32(*m.Field2)))) + } + if m.Field3 != nil { + data[i] = 0x1a + i++ + i = encodeVarintThetest(data, i, uint64(m.Field3.Size())) + n64, err := m.Field3.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n64 + } + if m.Field4 != nil { + data[i] = 0x22 + i++ + i = encodeVarintThetest(data, i, uint64(m.Field4.Size())) + n65, err := m.Field4.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n65 + } + if m.Field6 != nil { + data[i] = 0x30 + i++ + i = encodeVarintThetest(data, i, uint64(*m.Field6)) + } + if m.Field7 != nil { + data[i] = 0x38 + i++ + i = encodeVarintThetest(data, i, uint64((uint32(*m.Field7)<<1)^uint32((*m.Field7>>31)))) + } + if m.Field13 != nil { + data[i] = 0x68 + i++ + if *m.Field13 { + data[i] = 1 + } else { + data[i] = 0 + } + i++ + } + if m.Field14 != nil { + data[i] = 0x72 + i++ + i = encodeVarintThetest(data, i, uint64(len(*m.Field14))) + i += copy(data[i:], *m.Field14) + } + if m.Field15 != nil { + data[i] = 0x7a + i++ + i = encodeVarintThetest(data, i, uint64(len(m.Field15))) + i += copy(data[i:], m.Field15) + } + if m.XXX_unrecognized != nil { + i += copy(data[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *NinEmbeddedStructUnion) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *NinEmbeddedStructUnion) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.NidOptNative != nil { + data[i] = 0xa + i++ + i = encodeVarintThetest(data, i, uint64(m.NidOptNative.Size())) + n66, err := m.NidOptNative.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n66 + } + if m.Field200 != nil { + data[i] = 0xc2 + i++ + data[i] = 0xc + i++ + i = encodeVarintThetest(data, i, uint64(m.Field200.Size())) + n67, err := m.Field200.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n67 + } + if m.Field210 != nil { + data[i] = 0x90 + i++ + data[i] = 0xd + i++ + if *m.Field210 { + data[i] = 1 + } else { + data[i] = 0 + } + i++ + } + if m.XXX_unrecognized != nil { + i += copy(data[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *NinNestedStructUnion) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *NinNestedStructUnion) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Field1 != nil { + data[i] = 0xa + i++ + i = encodeVarintThetest(data, i, uint64(m.Field1.Size())) + n68, err := m.Field1.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n68 + } + if m.Field2 != nil { + data[i] = 0x12 + i++ + i = encodeVarintThetest(data, i, uint64(m.Field2.Size())) + n69, err := m.Field2.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n69 + } + if m.Field3 != nil { + data[i] = 0x1a + i++ + i = encodeVarintThetest(data, i, uint64(m.Field3.Size())) + n70, err := m.Field3.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n70 + } + if m.XXX_unrecognized != nil { + i += copy(data[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *Tree) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *Tree) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Or != nil { + data[i] = 0xa + i++ + i = encodeVarintThetest(data, i, uint64(m.Or.Size())) + n71, err := m.Or.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n71 + } + if m.And != nil { + data[i] = 0x12 + i++ + i = encodeVarintThetest(data, i, uint64(m.And.Size())) + n72, err := m.And.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n72 + } + if m.Leaf != nil { + data[i] = 0x1a + i++ + i = encodeVarintThetest(data, i, uint64(m.Leaf.Size())) + n73, err := m.Leaf.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n73 + } + if m.XXX_unrecognized != nil { + i += copy(data[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *OrBranch) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *OrBranch) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + data[i] = 0xa + i++ + i = encodeVarintThetest(data, i, uint64(m.Left.Size())) + n74, err := m.Left.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n74 + data[i] = 0x12 + i++ + i = encodeVarintThetest(data, i, uint64(m.Right.Size())) + n75, err := m.Right.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n75 + if m.XXX_unrecognized != nil { + i += copy(data[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *AndBranch) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *AndBranch) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + data[i] = 0xa + i++ + i = encodeVarintThetest(data, i, uint64(m.Left.Size())) + n76, err := m.Left.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n76 + data[i] = 0x12 + i++ + i = encodeVarintThetest(data, i, uint64(m.Right.Size())) + n77, err := m.Right.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n77 + if m.XXX_unrecognized != nil { + i += copy(data[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *Leaf) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *Leaf) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + data[i] = 0x8 + i++ + i = encodeVarintThetest(data, i, uint64(m.Value)) + data[i] = 0x12 + i++ + i = encodeVarintThetest(data, i, uint64(len(m.StrValue))) + i += copy(data[i:], m.StrValue) + if m.XXX_unrecognized != nil { + i += copy(data[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *DeepTree) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *DeepTree) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Down != nil { + data[i] = 0xa + i++ + i = encodeVarintThetest(data, i, uint64(m.Down.Size())) + n78, err := m.Down.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n78 + } + if m.And != nil { + data[i] = 0x12 + i++ + i = encodeVarintThetest(data, i, uint64(m.And.Size())) + n79, err := m.And.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n79 + } + if m.Leaf != nil { + data[i] = 0x1a + i++ + i = encodeVarintThetest(data, i, uint64(m.Leaf.Size())) + n80, err := m.Leaf.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n80 + } + if m.XXX_unrecognized != nil { + i += copy(data[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *ADeepBranch) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *ADeepBranch) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + data[i] = 0x12 + i++ + i = encodeVarintThetest(data, i, uint64(m.Down.Size())) + n81, err := m.Down.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n81 + if m.XXX_unrecognized != nil { + i += copy(data[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *AndDeepBranch) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *AndDeepBranch) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + data[i] = 0xa + i++ + i = encodeVarintThetest(data, i, uint64(m.Left.Size())) + n82, err := m.Left.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n82 + data[i] = 0x12 + i++ + i = encodeVarintThetest(data, i, uint64(m.Right.Size())) + n83, err := m.Right.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n83 + if m.XXX_unrecognized != nil { + i += copy(data[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *DeepLeaf) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *DeepLeaf) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + data[i] = 0xa + i++ + i = encodeVarintThetest(data, i, uint64(m.Tree.Size())) + n84, err := m.Tree.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n84 + if m.XXX_unrecognized != nil { + i += copy(data[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *Nil) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *Nil) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.XXX_unrecognized != nil { + i += copy(data[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *NidOptEnum) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *NidOptEnum) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + data[i] = 0x8 + i++ + i = encodeVarintThetest(data, i, uint64(m.Field1)) + if m.XXX_unrecognized != nil { + i += copy(data[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *NinOptEnum) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *NinOptEnum) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Field1 != nil { + data[i] = 0x8 + i++ + i = encodeVarintThetest(data, i, uint64(*m.Field1)) + } + if m.Field2 != nil { + data[i] = 0x10 + i++ + i = encodeVarintThetest(data, i, uint64(*m.Field2)) + } + if m.Field3 != nil { + data[i] = 0x18 + i++ + i = encodeVarintThetest(data, i, uint64(*m.Field3)) + } + if m.XXX_unrecognized != nil { + i += copy(data[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *NidRepEnum) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *NidRepEnum) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Field1) > 0 { + for _, num := range m.Field1 { + data[i] = 0x8 + i++ + i = encodeVarintThetest(data, i, uint64(num)) + } + } + if len(m.Field2) > 0 { + for _, num := range m.Field2 { + data[i] = 0x10 + i++ + i = encodeVarintThetest(data, i, uint64(num)) + } + } + if len(m.Field3) > 0 { + for _, num := range m.Field3 { + data[i] = 0x18 + i++ + i = encodeVarintThetest(data, i, uint64(num)) + } + } + if m.XXX_unrecognized != nil { + i += copy(data[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *NinRepEnum) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *NinRepEnum) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Field1) > 0 { + for _, num := range m.Field1 { + data[i] = 0x8 + i++ + i = encodeVarintThetest(data, i, uint64(num)) + } + } + if len(m.Field2) > 0 { + for _, num := range m.Field2 { + data[i] = 0x10 + i++ + i = encodeVarintThetest(data, i, uint64(num)) + } + } + if len(m.Field3) > 0 { + for _, num := range m.Field3 { + data[i] = 0x18 + i++ + i = encodeVarintThetest(data, i, uint64(num)) + } + } + if m.XXX_unrecognized != nil { + i += copy(data[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *NinOptEnumDefault) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *NinOptEnumDefault) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Field1 != nil { + data[i] = 0x8 + i++ + i = encodeVarintThetest(data, i, uint64(*m.Field1)) + } + if m.Field2 != nil { + data[i] = 0x10 + i++ + i = encodeVarintThetest(data, i, uint64(*m.Field2)) + } + if m.Field3 != nil { + data[i] = 0x18 + i++ + i = encodeVarintThetest(data, i, uint64(*m.Field3)) + } + if m.XXX_unrecognized != nil { + i += copy(data[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *AnotherNinOptEnum) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *AnotherNinOptEnum) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Field1 != nil { + data[i] = 0x8 + i++ + i = encodeVarintThetest(data, i, uint64(*m.Field1)) + } + if m.Field2 != nil { + data[i] = 0x10 + i++ + i = encodeVarintThetest(data, i, uint64(*m.Field2)) + } + if m.Field3 != nil { + data[i] = 0x18 + i++ + i = encodeVarintThetest(data, i, uint64(*m.Field3)) + } + if m.XXX_unrecognized != nil { + i += copy(data[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *AnotherNinOptEnumDefault) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *AnotherNinOptEnumDefault) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Field1 != nil { + data[i] = 0x8 + i++ + i = encodeVarintThetest(data, i, uint64(*m.Field1)) + } + if m.Field2 != nil { + data[i] = 0x10 + i++ + i = encodeVarintThetest(data, i, uint64(*m.Field2)) + } + if m.Field3 != nil { + data[i] = 0x18 + i++ + i = encodeVarintThetest(data, i, uint64(*m.Field3)) + } + if m.XXX_unrecognized != nil { + i += copy(data[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *Timer) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *Timer) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + data[i] = 0x9 + i++ + i = encodeFixed64Thetest(data, i, uint64(m.Time1)) + data[i] = 0x11 + i++ + i = encodeFixed64Thetest(data, i, uint64(m.Time2)) + if m.Data != nil { + data[i] = 0x1a + i++ + i = encodeVarintThetest(data, i, uint64(len(m.Data))) + i += copy(data[i:], m.Data) + } + if m.XXX_unrecognized != nil { + i += copy(data[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *MyExtendable) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *MyExtendable) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Field1 != nil { + data[i] = 0x8 + i++ + i = encodeVarintThetest(data, i, uint64(*m.Field1)) + } + if len(m.XXX_extensions) > 0 { + n, err := github_com_gogo_protobuf_proto.EncodeExtensionMap(m.XXX_extensions, data[i:]) + if err != nil { + return 0, err + } + i += n + } + if m.XXX_unrecognized != nil { + i += copy(data[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *OtherExtenable) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *OtherExtenable) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.M != nil { + data[i] = 0xa + i++ + i = encodeVarintThetest(data, i, uint64(m.M.Size())) + n85, err := m.M.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n85 + } + if m.Field2 != nil { + data[i] = 0x10 + i++ + i = encodeVarintThetest(data, i, uint64(*m.Field2)) + } + if m.Field13 != nil { + data[i] = 0x68 + i++ + i = encodeVarintThetest(data, i, uint64(*m.Field13)) + } + if len(m.XXX_extensions) > 0 { + n, err := github_com_gogo_protobuf_proto.EncodeExtensionMap(m.XXX_extensions, data[i:]) + if err != nil { + return 0, err + } + i += n + } + if m.XXX_unrecognized != nil { + i += copy(data[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *NestedDefinition) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *NestedDefinition) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Field1 != nil { + data[i] = 0x8 + i++ + i = encodeVarintThetest(data, i, uint64(*m.Field1)) + } + if m.EnumField != nil { + data[i] = 0x10 + i++ + i = encodeVarintThetest(data, i, uint64(*m.EnumField)) + } + if m.NNM != nil { + data[i] = 0x1a + i++ + i = encodeVarintThetest(data, i, uint64(m.NNM.Size())) + n86, err := m.NNM.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n86 + } + if m.NM != nil { + data[i] = 0x22 + i++ + i = encodeVarintThetest(data, i, uint64(m.NM.Size())) + n87, err := m.NM.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n87 + } + if m.XXX_unrecognized != nil { + i += copy(data[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *NestedDefinition_NestedMessage) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *NestedDefinition_NestedMessage) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.NestedField1 != nil { + data[i] = 0x9 + i++ + i = encodeFixed64Thetest(data, i, uint64(*m.NestedField1)) + } + if m.NNM != nil { + data[i] = 0x12 + i++ + i = encodeVarintThetest(data, i, uint64(m.NNM.Size())) + n88, err := m.NNM.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n88 + } + if m.XXX_unrecognized != nil { + i += copy(data[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *NestedDefinition_NestedMessage_NestedNestedMsg) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *NestedDefinition_NestedMessage_NestedNestedMsg) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.NestedNestedField1 != nil { + data[i] = 0x52 + i++ + i = encodeVarintThetest(data, i, uint64(len(*m.NestedNestedField1))) + i += copy(data[i:], *m.NestedNestedField1) + } + if m.XXX_unrecognized != nil { + i += copy(data[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *NestedScope) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *NestedScope) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.A != nil { + data[i] = 0xa + i++ + i = encodeVarintThetest(data, i, uint64(m.A.Size())) + n89, err := m.A.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n89 + } + if m.B != nil { + data[i] = 0x10 + i++ + i = encodeVarintThetest(data, i, uint64(*m.B)) + } + if m.C != nil { + data[i] = 0x1a + i++ + i = encodeVarintThetest(data, i, uint64(m.C.Size())) + n90, err := m.C.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n90 + } + if m.XXX_unrecognized != nil { + i += copy(data[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *NinOptNativeDefault) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *NinOptNativeDefault) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Field1 != nil { + data[i] = 0x9 + i++ + i = encodeFixed64Thetest(data, i, uint64(math.Float64bits(float64(*m.Field1)))) + } + if m.Field2 != nil { + data[i] = 0x15 + i++ + i = encodeFixed32Thetest(data, i, uint32(math.Float32bits(float32(*m.Field2)))) + } + if m.Field3 != nil { + data[i] = 0x18 + i++ + i = encodeVarintThetest(data, i, uint64(*m.Field3)) + } + if m.Field4 != nil { + data[i] = 0x20 + i++ + i = encodeVarintThetest(data, i, uint64(*m.Field4)) + } + if m.Field5 != nil { + data[i] = 0x28 + i++ + i = encodeVarintThetest(data, i, uint64(*m.Field5)) + } + if m.Field6 != nil { + data[i] = 0x30 + i++ + i = encodeVarintThetest(data, i, uint64(*m.Field6)) + } + if m.Field7 != nil { + data[i] = 0x38 + i++ + i = encodeVarintThetest(data, i, uint64((uint32(*m.Field7)<<1)^uint32((*m.Field7>>31)))) + } + if m.Field8 != nil { + data[i] = 0x40 + i++ + i = encodeVarintThetest(data, i, uint64((uint64(*m.Field8)<<1)^uint64((*m.Field8>>63)))) + } + if m.Field9 != nil { + data[i] = 0x4d + i++ + i = encodeFixed32Thetest(data, i, uint32(*m.Field9)) + } + if m.Field10 != nil { + data[i] = 0x55 + i++ + i = encodeFixed32Thetest(data, i, uint32(*m.Field10)) + } + if m.Field11 != nil { + data[i] = 0x59 + i++ + i = encodeFixed64Thetest(data, i, uint64(*m.Field11)) + } + if m.Field12 != nil { + data[i] = 0x61 + i++ + i = encodeFixed64Thetest(data, i, uint64(*m.Field12)) + } + if m.Field13 != nil { + data[i] = 0x68 + i++ + if *m.Field13 { + data[i] = 1 + } else { + data[i] = 0 + } + i++ + } + if m.Field14 != nil { + data[i] = 0x72 + i++ + i = encodeVarintThetest(data, i, uint64(len(*m.Field14))) + i += copy(data[i:], *m.Field14) + } + if m.Field15 != nil { + data[i] = 0x7a + i++ + i = encodeVarintThetest(data, i, uint64(len(m.Field15))) + i += copy(data[i:], m.Field15) + } + if m.XXX_unrecognized != nil { + i += copy(data[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *CustomContainer) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *CustomContainer) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + data[i] = 0xa + i++ + i = encodeVarintThetest(data, i, uint64(m.CustomStruct.Size())) + n91, err := m.CustomStruct.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n91 + if m.XXX_unrecognized != nil { + i += copy(data[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *CustomNameNidOptNative) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *CustomNameNidOptNative) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + data[i] = 0x9 + i++ + i = encodeFixed64Thetest(data, i, uint64(math.Float64bits(float64(m.FieldA)))) + data[i] = 0x15 + i++ + i = encodeFixed32Thetest(data, i, uint32(math.Float32bits(float32(m.FieldB)))) + data[i] = 0x18 + i++ + i = encodeVarintThetest(data, i, uint64(m.FieldC)) + data[i] = 0x20 + i++ + i = encodeVarintThetest(data, i, uint64(m.FieldD)) + data[i] = 0x28 + i++ + i = encodeVarintThetest(data, i, uint64(m.FieldE)) + data[i] = 0x30 + i++ + i = encodeVarintThetest(data, i, uint64(m.FieldF)) + data[i] = 0x38 + i++ + i = encodeVarintThetest(data, i, uint64((uint32(m.FieldG)<<1)^uint32((m.FieldG>>31)))) + data[i] = 0x40 + i++ + i = encodeVarintThetest(data, i, uint64((uint64(m.FieldH)<<1)^uint64((m.FieldH>>63)))) + data[i] = 0x4d + i++ + i = encodeFixed32Thetest(data, i, uint32(m.FieldI)) + data[i] = 0x55 + i++ + i = encodeFixed32Thetest(data, i, uint32(m.FieldJ)) + data[i] = 0x59 + i++ + i = encodeFixed64Thetest(data, i, uint64(m.FieldK)) + data[i] = 0x61 + i++ + i = encodeFixed64Thetest(data, i, uint64(m.FieldL)) + data[i] = 0x68 + i++ + if m.FieldM { + data[i] = 1 + } else { + data[i] = 0 + } + i++ + data[i] = 0x72 + i++ + i = encodeVarintThetest(data, i, uint64(len(m.FieldN))) + i += copy(data[i:], m.FieldN) + if m.FieldO != nil { + data[i] = 0x7a + i++ + i = encodeVarintThetest(data, i, uint64(len(m.FieldO))) + i += copy(data[i:], m.FieldO) + } + if m.XXX_unrecognized != nil { + i += copy(data[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *CustomNameNinOptNative) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *CustomNameNinOptNative) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.FieldA != nil { + data[i] = 0x9 + i++ + i = encodeFixed64Thetest(data, i, uint64(math.Float64bits(float64(*m.FieldA)))) + } + if m.FieldB != nil { + data[i] = 0x15 + i++ + i = encodeFixed32Thetest(data, i, uint32(math.Float32bits(float32(*m.FieldB)))) + } + if m.FieldC != nil { + data[i] = 0x18 + i++ + i = encodeVarintThetest(data, i, uint64(*m.FieldC)) + } + if m.FieldD != nil { + data[i] = 0x20 + i++ + i = encodeVarintThetest(data, i, uint64(*m.FieldD)) + } + if m.FieldE != nil { + data[i] = 0x28 + i++ + i = encodeVarintThetest(data, i, uint64(*m.FieldE)) + } + if m.FieldF != nil { + data[i] = 0x30 + i++ + i = encodeVarintThetest(data, i, uint64(*m.FieldF)) + } + if m.FieldG != nil { + data[i] = 0x38 + i++ + i = encodeVarintThetest(data, i, uint64((uint32(*m.FieldG)<<1)^uint32((*m.FieldG>>31)))) + } + if m.FieldH != nil { + data[i] = 0x40 + i++ + i = encodeVarintThetest(data, i, uint64((uint64(*m.FieldH)<<1)^uint64((*m.FieldH>>63)))) + } + if m.FieldI != nil { + data[i] = 0x4d + i++ + i = encodeFixed32Thetest(data, i, uint32(*m.FieldI)) + } + if m.FieldJ != nil { + data[i] = 0x55 + i++ + i = encodeFixed32Thetest(data, i, uint32(*m.FieldJ)) + } + if m.FieldK != nil { + data[i] = 0x59 + i++ + i = encodeFixed64Thetest(data, i, uint64(*m.FieldK)) + } + if m.FielL != nil { + data[i] = 0x61 + i++ + i = encodeFixed64Thetest(data, i, uint64(*m.FielL)) + } + if m.FieldM != nil { + data[i] = 0x68 + i++ + if *m.FieldM { + data[i] = 1 + } else { + data[i] = 0 + } + i++ + } + if m.FieldN != nil { + data[i] = 0x72 + i++ + i = encodeVarintThetest(data, i, uint64(len(*m.FieldN))) + i += copy(data[i:], *m.FieldN) + } + if m.FieldO != nil { + data[i] = 0x7a + i++ + i = encodeVarintThetest(data, i, uint64(len(m.FieldO))) + i += copy(data[i:], m.FieldO) + } + if m.XXX_unrecognized != nil { + i += copy(data[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *CustomNameNinRepNative) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *CustomNameNinRepNative) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.FieldA) > 0 { + for _, num := range m.FieldA { + data[i] = 0x9 + i++ + f92 := math.Float64bits(float64(num)) + data[i] = uint8(f92) + i++ + data[i] = uint8(f92 >> 8) + i++ + data[i] = uint8(f92 >> 16) + i++ + data[i] = uint8(f92 >> 24) + i++ + data[i] = uint8(f92 >> 32) + i++ + data[i] = uint8(f92 >> 40) + i++ + data[i] = uint8(f92 >> 48) + i++ + data[i] = uint8(f92 >> 56) + i++ + } + } + if len(m.FieldB) > 0 { + for _, num := range m.FieldB { + data[i] = 0x15 + i++ + f93 := math.Float32bits(float32(num)) + data[i] = uint8(f93) + i++ + data[i] = uint8(f93 >> 8) + i++ + data[i] = uint8(f93 >> 16) + i++ + data[i] = uint8(f93 >> 24) + i++ + } + } + if len(m.FieldC) > 0 { + for _, num := range m.FieldC { + data[i] = 0x18 + i++ + i = encodeVarintThetest(data, i, uint64(num)) + } + } + if len(m.FieldD) > 0 { + for _, num := range m.FieldD { + data[i] = 0x20 + i++ + i = encodeVarintThetest(data, i, uint64(num)) + } + } + if len(m.FieldE) > 0 { + for _, num := range m.FieldE { + data[i] = 0x28 + i++ + i = encodeVarintThetest(data, i, uint64(num)) + } + } + if len(m.FieldF) > 0 { + for _, num := range m.FieldF { + data[i] = 0x30 + i++ + i = encodeVarintThetest(data, i, uint64(num)) + } + } + if len(m.FieldG) > 0 { + for _, num := range m.FieldG { + data[i] = 0x38 + i++ + x94 := (uint32(num) << 1) ^ uint32((num >> 31)) + for x94 >= 1<<7 { + data[i] = uint8(uint64(x94)&0x7f | 0x80) + x94 >>= 7 + i++ + } + data[i] = uint8(x94) + i++ + } + } + if len(m.FieldH) > 0 { + for _, num := range m.FieldH { + data[i] = 0x40 + i++ + x95 := (uint64(num) << 1) ^ uint64((num >> 63)) + for x95 >= 1<<7 { + data[i] = uint8(uint64(x95)&0x7f | 0x80) + x95 >>= 7 + i++ + } + data[i] = uint8(x95) + i++ + } + } + if len(m.FieldI) > 0 { + for _, num := range m.FieldI { + data[i] = 0x4d + i++ + data[i] = uint8(num) + i++ + data[i] = uint8(num >> 8) + i++ + data[i] = uint8(num >> 16) + i++ + data[i] = uint8(num >> 24) + i++ + } + } + if len(m.FieldJ) > 0 { + for _, num := range m.FieldJ { + data[i] = 0x55 + i++ + data[i] = uint8(num) + i++ + data[i] = uint8(num >> 8) + i++ + data[i] = uint8(num >> 16) + i++ + data[i] = uint8(num >> 24) + i++ + } + } + if len(m.FieldK) > 0 { + for _, num := range m.FieldK { + data[i] = 0x59 + i++ + data[i] = uint8(num) + i++ + data[i] = uint8(num >> 8) + i++ + data[i] = uint8(num >> 16) + i++ + data[i] = uint8(num >> 24) + i++ + data[i] = uint8(num >> 32) + i++ + data[i] = uint8(num >> 40) + i++ + data[i] = uint8(num >> 48) + i++ + data[i] = uint8(num >> 56) + i++ + } + } + if len(m.FieldL) > 0 { + for _, num := range m.FieldL { + data[i] = 0x61 + i++ + data[i] = uint8(num) + i++ + data[i] = uint8(num >> 8) + i++ + data[i] = uint8(num >> 16) + i++ + data[i] = uint8(num >> 24) + i++ + data[i] = uint8(num >> 32) + i++ + data[i] = uint8(num >> 40) + i++ + data[i] = uint8(num >> 48) + i++ + data[i] = uint8(num >> 56) + i++ + } + } + if len(m.FieldM) > 0 { + for _, b := range m.FieldM { + data[i] = 0x68 + i++ + if b { + data[i] = 1 + } else { + data[i] = 0 + } + i++ + } + } + if len(m.FieldN) > 0 { + for _, s := range m.FieldN { + data[i] = 0x72 + 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 len(m.FieldO) > 0 { + for _, b := range m.FieldO { + data[i] = 0x7a + i++ + i = encodeVarintThetest(data, i, uint64(len(b))) + i += copy(data[i:], b) + } + } + if m.XXX_unrecognized != nil { + i += copy(data[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *CustomNameNinStruct) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *CustomNameNinStruct) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.FieldA != nil { + data[i] = 0x9 + i++ + i = encodeFixed64Thetest(data, i, uint64(math.Float64bits(float64(*m.FieldA)))) + } + if m.FieldB != nil { + data[i] = 0x15 + i++ + i = encodeFixed32Thetest(data, i, uint32(math.Float32bits(float32(*m.FieldB)))) + } + if m.FieldC != nil { + data[i] = 0x1a + i++ + i = encodeVarintThetest(data, i, uint64(m.FieldC.Size())) + n96, err := m.FieldC.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n96 + } + if len(m.FieldD) > 0 { + for _, msg := range m.FieldD { + data[i] = 0x22 + i++ + i = encodeVarintThetest(data, i, uint64(msg.Size())) + n, err := msg.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n + } + } + if m.FieldE != nil { + data[i] = 0x30 + i++ + i = encodeVarintThetest(data, i, uint64(*m.FieldE)) + } + if m.FieldF != nil { + data[i] = 0x38 + i++ + i = encodeVarintThetest(data, i, uint64((uint32(*m.FieldF)<<1)^uint32((*m.FieldF>>31)))) + } + if m.FieldG != nil { + data[i] = 0x42 + i++ + i = encodeVarintThetest(data, i, uint64(m.FieldG.Size())) + n97, err := m.FieldG.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n97 + } + if m.FieldH != nil { + data[i] = 0x68 + i++ + if *m.FieldH { + data[i] = 1 + } else { + data[i] = 0 + } + i++ + } + if m.FieldI != nil { + data[i] = 0x72 + i++ + i = encodeVarintThetest(data, i, uint64(len(*m.FieldI))) + i += copy(data[i:], *m.FieldI) + } + if m.FieldJ != nil { + data[i] = 0x7a + i++ + i = encodeVarintThetest(data, i, uint64(len(m.FieldJ))) + i += copy(data[i:], m.FieldJ) + } + if m.XXX_unrecognized != nil { + i += copy(data[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *CustomNameCustomType) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *CustomNameCustomType) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.FieldA != nil { + data[i] = 0xa + i++ + i = encodeVarintThetest(data, i, uint64(m.FieldA.Size())) + n98, err := m.FieldA.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n98 + } + if m.FieldB != nil { + data[i] = 0x12 + i++ + i = encodeVarintThetest(data, i, uint64(m.FieldB.Size())) + n99, err := m.FieldB.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n99 + } + if len(m.FieldC) > 0 { + for _, msg := range m.FieldC { + data[i] = 0x1a + i++ + i = encodeVarintThetest(data, i, uint64(msg.Size())) + n, err := msg.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n + } + } + if len(m.FieldD) > 0 { + for _, msg := range m.FieldD { + data[i] = 0x22 + i++ + i = encodeVarintThetest(data, i, uint64(msg.Size())) + n, err := msg.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n + } + } + if m.XXX_unrecognized != nil { + i += copy(data[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *CustomNameNinEmbeddedStructUnion) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *CustomNameNinEmbeddedStructUnion) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.NidOptNative != nil { + data[i] = 0xa + i++ + i = encodeVarintThetest(data, i, uint64(m.NidOptNative.Size())) + n100, err := m.NidOptNative.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n100 + } + if m.FieldA != nil { + data[i] = 0xc2 + i++ + data[i] = 0xc + i++ + i = encodeVarintThetest(data, i, uint64(m.FieldA.Size())) + n101, err := m.FieldA.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n101 + } + if m.FieldB != nil { + data[i] = 0x90 + i++ + data[i] = 0xd + i++ + if *m.FieldB { + data[i] = 1 + } else { + data[i] = 0 + } + i++ + } + if m.XXX_unrecognized != nil { + i += copy(data[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *CustomNameEnum) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *CustomNameEnum) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.FieldA != nil { + data[i] = 0x8 + i++ + i = encodeVarintThetest(data, i, uint64(*m.FieldA)) + } + if len(m.FieldB) > 0 { + for _, num := range m.FieldB { + data[i] = 0x10 + i++ + i = encodeVarintThetest(data, i, uint64(num)) + } + } + if m.XXX_unrecognized != nil { + i += copy(data[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *NoExtensionsMap) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *NoExtensionsMap) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Field1 != nil { + data[i] = 0x8 + i++ + i = encodeVarintThetest(data, i, uint64(*m.Field1)) + } + if m.XXX_extensions != nil { + i += copy(data[i:], m.XXX_extensions) + } + if m.XXX_unrecognized != nil { + i += copy(data[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *Unrecognized) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *Unrecognized) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Field1 != nil { + data[i] = 0xa + i++ + i = encodeVarintThetest(data, i, uint64(len(*m.Field1))) + i += copy(data[i:], *m.Field1) + } + return i, nil +} + +func (m *UnrecognizedWithInner) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *UnrecognizedWithInner) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Embedded) > 0 { + for _, msg := range m.Embedded { + data[i] = 0xa + i++ + i = encodeVarintThetest(data, i, uint64(msg.Size())) + n, err := msg.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n + } + } + if m.Field2 != nil { + data[i] = 0x12 + i++ + i = encodeVarintThetest(data, i, uint64(len(*m.Field2))) + i += copy(data[i:], *m.Field2) + } + if m.XXX_unrecognized != nil { + i += copy(data[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *UnrecognizedWithInner_Inner) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *UnrecognizedWithInner_Inner) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Field1 != nil { + data[i] = 0x8 + i++ + i = encodeVarintThetest(data, i, uint64(*m.Field1)) + } + return i, nil +} + +func (m *UnrecognizedWithEmbed) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *UnrecognizedWithEmbed) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + data[i] = 0xa + i++ + i = encodeVarintThetest(data, i, uint64(m.UnrecognizedWithEmbed_Embedded.Size())) + n102, err := m.UnrecognizedWithEmbed_Embedded.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n102 + if m.Field2 != nil { + data[i] = 0x12 + i++ + i = encodeVarintThetest(data, i, uint64(len(*m.Field2))) + i += copy(data[i:], *m.Field2) + } + if m.XXX_unrecognized != nil { + i += copy(data[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *UnrecognizedWithEmbed_Embedded) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *UnrecognizedWithEmbed_Embedded) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Field1 != nil { + data[i] = 0x8 + i++ + i = encodeVarintThetest(data, i, uint64(*m.Field1)) + } + return i, nil +} + +func (m *Node) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *Node) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Label != nil { + data[i] = 0xa + i++ + i = encodeVarintThetest(data, i, uint64(len(*m.Label))) + i += copy(data[i:], *m.Label) + } + if len(m.Children) > 0 { + for _, msg := range m.Children { + data[i] = 0x12 + i++ + i = encodeVarintThetest(data, i, uint64(msg.Size())) + n, err := msg.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n + } + } + if m.XXX_unrecognized != nil { + i += copy(data[i:], m.XXX_unrecognized) + } + return i, nil +} + +func encodeFixed64Thetest(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 encodeFixed32Thetest(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 encodeVarintThetest(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 NewPopulatedNidOptNative(r randyThetest, easy bool) *NidOptNative { + this := &NidOptNative{} + this.Field1 = float64(r.Float64()) + if r.Intn(2) == 0 { + this.Field1 *= -1 + } + this.Field2 = float32(r.Float32()) + if r.Intn(2) == 0 { + this.Field2 *= -1 + } + this.Field3 = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Field3 *= -1 + } + this.Field4 = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Field4 *= -1 + } + this.Field5 = uint32(r.Uint32()) + this.Field6 = uint64(uint64(r.Uint32())) + this.Field7 = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Field7 *= -1 + } + this.Field8 = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Field8 *= -1 + } + this.Field9 = uint32(r.Uint32()) + this.Field10 = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Field10 *= -1 + } + this.Field11 = uint64(uint64(r.Uint32())) + this.Field12 = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Field12 *= -1 + } + this.Field13 = bool(bool(r.Intn(2) == 0)) + this.Field14 = randStringThetest(r) + v1 := r.Intn(100) + this.Field15 = make([]byte, v1) + for i := 0; i < v1; i++ { + this.Field15[i] = byte(r.Intn(256)) + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 16) + } + return this +} + +func NewPopulatedNinOptNative(r randyThetest, easy bool) *NinOptNative { + this := &NinOptNative{} + if r.Intn(10) != 0 { + v2 := float64(r.Float64()) + if r.Intn(2) == 0 { + v2 *= -1 + } + this.Field1 = &v2 + } + if r.Intn(10) != 0 { + v3 := float32(r.Float32()) + if r.Intn(2) == 0 { + v3 *= -1 + } + this.Field2 = &v3 + } + if r.Intn(10) != 0 { + v4 := int32(r.Int31()) + if r.Intn(2) == 0 { + v4 *= -1 + } + this.Field3 = &v4 + } + if r.Intn(10) != 0 { + v5 := int64(r.Int63()) + if r.Intn(2) == 0 { + v5 *= -1 + } + this.Field4 = &v5 + } + if r.Intn(10) != 0 { + v6 := uint32(r.Uint32()) + this.Field5 = &v6 + } + if r.Intn(10) != 0 { + v7 := uint64(uint64(r.Uint32())) + this.Field6 = &v7 + } + if r.Intn(10) != 0 { + v8 := int32(r.Int31()) + if r.Intn(2) == 0 { + v8 *= -1 + } + this.Field7 = &v8 + } + if r.Intn(10) != 0 { + v9 := int64(r.Int63()) + if r.Intn(2) == 0 { + v9 *= -1 + } + this.Field8 = &v9 + } + if r.Intn(10) != 0 { + v10 := uint32(r.Uint32()) + this.Field9 = &v10 + } + if r.Intn(10) != 0 { + v11 := int32(r.Int31()) + if r.Intn(2) == 0 { + v11 *= -1 + } + this.Field10 = &v11 + } + if r.Intn(10) != 0 { + v12 := uint64(uint64(r.Uint32())) + this.Field11 = &v12 + } + if r.Intn(10) != 0 { + v13 := int64(r.Int63()) + if r.Intn(2) == 0 { + v13 *= -1 + } + this.Field12 = &v13 + } + if r.Intn(10) != 0 { + v14 := bool(bool(r.Intn(2) == 0)) + this.Field13 = &v14 + } + if r.Intn(10) != 0 { + v15 := randStringThetest(r) + this.Field14 = &v15 + } + if r.Intn(10) != 0 { + v16 := r.Intn(100) + this.Field15 = make([]byte, v16) + for i := 0; i < v16; i++ { + this.Field15[i] = byte(r.Intn(256)) + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 16) + } + return this +} + +func NewPopulatedNidRepNative(r randyThetest, easy bool) *NidRepNative { + this := &NidRepNative{} + if r.Intn(10) != 0 { + v17 := r.Intn(10) + this.Field1 = make([]float64, v17) + for i := 0; i < v17; i++ { + this.Field1[i] = float64(r.Float64()) + if r.Intn(2) == 0 { + this.Field1[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v18 := r.Intn(10) + this.Field2 = make([]float32, v18) + for i := 0; i < v18; i++ { + this.Field2[i] = float32(r.Float32()) + if r.Intn(2) == 0 { + this.Field2[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v19 := r.Intn(10) + this.Field3 = make([]int32, v19) + for i := 0; i < v19; i++ { + this.Field3[i] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Field3[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v20 := r.Intn(10) + this.Field4 = make([]int64, v20) + for i := 0; i < v20; i++ { + this.Field4[i] = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Field4[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v21 := r.Intn(10) + this.Field5 = make([]uint32, v21) + for i := 0; i < v21; i++ { + this.Field5[i] = uint32(r.Uint32()) + } + } + if r.Intn(10) != 0 { + v22 := r.Intn(10) + this.Field6 = make([]uint64, v22) + for i := 0; i < v22; i++ { + this.Field6[i] = uint64(uint64(r.Uint32())) + } + } + if r.Intn(10) != 0 { + v23 := r.Intn(10) + this.Field7 = make([]int32, v23) + for i := 0; i < v23; i++ { + this.Field7[i] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Field7[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v24 := r.Intn(10) + this.Field8 = make([]int64, v24) + for i := 0; i < v24; i++ { + this.Field8[i] = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Field8[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v25 := r.Intn(10) + this.Field9 = make([]uint32, v25) + for i := 0; i < v25; i++ { + this.Field9[i] = uint32(r.Uint32()) + } + } + if r.Intn(10) != 0 { + v26 := r.Intn(10) + this.Field10 = make([]int32, v26) + for i := 0; i < v26; i++ { + this.Field10[i] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Field10[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v27 := r.Intn(10) + this.Field11 = make([]uint64, v27) + for i := 0; i < v27; i++ { + this.Field11[i] = uint64(uint64(r.Uint32())) + } + } + if r.Intn(10) != 0 { + v28 := r.Intn(10) + this.Field12 = make([]int64, v28) + for i := 0; i < v28; i++ { + this.Field12[i] = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Field12[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v29 := r.Intn(10) + this.Field13 = make([]bool, v29) + for i := 0; i < v29; i++ { + this.Field13[i] = bool(bool(r.Intn(2) == 0)) + } + } + if r.Intn(10) != 0 { + v30 := r.Intn(10) + this.Field14 = make([]string, v30) + for i := 0; i < v30; i++ { + this.Field14[i] = randStringThetest(r) + } + } + if r.Intn(10) != 0 { + v31 := r.Intn(10) + this.Field15 = make([][]byte, v31) + for i := 0; i < v31; i++ { + v32 := r.Intn(100) + this.Field15[i] = make([]byte, v32) + for j := 0; j < v32; j++ { + this.Field15[i][j] = byte(r.Intn(256)) + } + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 16) + } + return this +} + +func NewPopulatedNinRepNative(r randyThetest, easy bool) *NinRepNative { + this := &NinRepNative{} + if r.Intn(10) != 0 { + v33 := r.Intn(10) + this.Field1 = make([]float64, v33) + for i := 0; i < v33; i++ { + this.Field1[i] = float64(r.Float64()) + if r.Intn(2) == 0 { + this.Field1[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v34 := r.Intn(10) + this.Field2 = make([]float32, v34) + for i := 0; i < v34; i++ { + this.Field2[i] = float32(r.Float32()) + if r.Intn(2) == 0 { + this.Field2[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v35 := r.Intn(10) + this.Field3 = make([]int32, v35) + for i := 0; i < v35; i++ { + this.Field3[i] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Field3[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v36 := r.Intn(10) + this.Field4 = make([]int64, v36) + for i := 0; i < v36; i++ { + this.Field4[i] = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Field4[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v37 := r.Intn(10) + this.Field5 = make([]uint32, v37) + for i := 0; i < v37; i++ { + this.Field5[i] = uint32(r.Uint32()) + } + } + if r.Intn(10) != 0 { + v38 := r.Intn(10) + this.Field6 = make([]uint64, v38) + for i := 0; i < v38; i++ { + this.Field6[i] = uint64(uint64(r.Uint32())) + } + } + if r.Intn(10) != 0 { + v39 := r.Intn(10) + this.Field7 = make([]int32, v39) + for i := 0; i < v39; i++ { + this.Field7[i] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Field7[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v40 := r.Intn(10) + this.Field8 = make([]int64, v40) + for i := 0; i < v40; i++ { + this.Field8[i] = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Field8[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v41 := r.Intn(10) + this.Field9 = make([]uint32, v41) + for i := 0; i < v41; i++ { + this.Field9[i] = uint32(r.Uint32()) + } + } + if r.Intn(10) != 0 { + v42 := r.Intn(10) + this.Field10 = make([]int32, v42) + for i := 0; i < v42; i++ { + this.Field10[i] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Field10[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v43 := r.Intn(10) + this.Field11 = make([]uint64, v43) + for i := 0; i < v43; i++ { + this.Field11[i] = uint64(uint64(r.Uint32())) + } + } + if r.Intn(10) != 0 { + v44 := r.Intn(10) + this.Field12 = make([]int64, v44) + for i := 0; i < v44; i++ { + this.Field12[i] = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Field12[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v45 := r.Intn(10) + this.Field13 = make([]bool, v45) + for i := 0; i < v45; i++ { + this.Field13[i] = bool(bool(r.Intn(2) == 0)) + } + } + if r.Intn(10) != 0 { + v46 := r.Intn(10) + this.Field14 = make([]string, v46) + for i := 0; i < v46; i++ { + this.Field14[i] = randStringThetest(r) + } + } + if r.Intn(10) != 0 { + v47 := r.Intn(10) + this.Field15 = make([][]byte, v47) + for i := 0; i < v47; i++ { + v48 := r.Intn(100) + this.Field15[i] = make([]byte, v48) + for j := 0; j < v48; j++ { + this.Field15[i][j] = byte(r.Intn(256)) + } + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 16) + } + return this +} + +func NewPopulatedNidRepPackedNative(r randyThetest, easy bool) *NidRepPackedNative { + this := &NidRepPackedNative{} + if r.Intn(10) != 0 { + v49 := r.Intn(10) + this.Field1 = make([]float64, v49) + for i := 0; i < v49; i++ { + this.Field1[i] = float64(r.Float64()) + if r.Intn(2) == 0 { + this.Field1[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v50 := r.Intn(10) + this.Field2 = make([]float32, v50) + for i := 0; i < v50; i++ { + this.Field2[i] = float32(r.Float32()) + if r.Intn(2) == 0 { + this.Field2[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v51 := r.Intn(10) + this.Field3 = make([]int32, v51) + for i := 0; i < v51; i++ { + this.Field3[i] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Field3[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v52 := r.Intn(10) + this.Field4 = make([]int64, v52) + for i := 0; i < v52; i++ { + this.Field4[i] = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Field4[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v53 := r.Intn(10) + this.Field5 = make([]uint32, v53) + for i := 0; i < v53; i++ { + this.Field5[i] = uint32(r.Uint32()) + } + } + if r.Intn(10) != 0 { + v54 := r.Intn(10) + this.Field6 = make([]uint64, v54) + for i := 0; i < v54; i++ { + this.Field6[i] = uint64(uint64(r.Uint32())) + } + } + if r.Intn(10) != 0 { + v55 := r.Intn(10) + this.Field7 = make([]int32, v55) + for i := 0; i < v55; i++ { + this.Field7[i] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Field7[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v56 := r.Intn(10) + this.Field8 = make([]int64, v56) + for i := 0; i < v56; i++ { + this.Field8[i] = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Field8[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v57 := r.Intn(10) + this.Field9 = make([]uint32, v57) + for i := 0; i < v57; i++ { + this.Field9[i] = uint32(r.Uint32()) + } + } + if r.Intn(10) != 0 { + v58 := r.Intn(10) + this.Field10 = make([]int32, v58) + for i := 0; i < v58; i++ { + this.Field10[i] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Field10[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v59 := r.Intn(10) + this.Field11 = make([]uint64, v59) + for i := 0; i < v59; i++ { + this.Field11[i] = uint64(uint64(r.Uint32())) + } + } + if r.Intn(10) != 0 { + v60 := r.Intn(10) + this.Field12 = make([]int64, v60) + for i := 0; i < v60; i++ { + this.Field12[i] = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Field12[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v61 := r.Intn(10) + this.Field13 = make([]bool, v61) + for i := 0; i < v61; i++ { + this.Field13[i] = bool(bool(r.Intn(2) == 0)) + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 14) + } + return this +} + +func NewPopulatedNinRepPackedNative(r randyThetest, easy bool) *NinRepPackedNative { + this := &NinRepPackedNative{} + if r.Intn(10) != 0 { + v62 := r.Intn(10) + this.Field1 = make([]float64, v62) + for i := 0; i < v62; i++ { + this.Field1[i] = float64(r.Float64()) + if r.Intn(2) == 0 { + this.Field1[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v63 := r.Intn(10) + this.Field2 = make([]float32, v63) + for i := 0; i < v63; i++ { + this.Field2[i] = float32(r.Float32()) + if r.Intn(2) == 0 { + this.Field2[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v64 := r.Intn(10) + this.Field3 = make([]int32, v64) + for i := 0; i < v64; i++ { + this.Field3[i] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Field3[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v65 := r.Intn(10) + this.Field4 = make([]int64, v65) + for i := 0; i < v65; i++ { + this.Field4[i] = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Field4[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v66 := r.Intn(10) + this.Field5 = make([]uint32, v66) + for i := 0; i < v66; i++ { + this.Field5[i] = uint32(r.Uint32()) + } + } + if r.Intn(10) != 0 { + v67 := r.Intn(10) + this.Field6 = make([]uint64, v67) + for i := 0; i < v67; i++ { + this.Field6[i] = uint64(uint64(r.Uint32())) + } + } + if r.Intn(10) != 0 { + v68 := r.Intn(10) + this.Field7 = make([]int32, v68) + for i := 0; i < v68; i++ { + this.Field7[i] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Field7[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v69 := r.Intn(10) + this.Field8 = make([]int64, v69) + for i := 0; i < v69; i++ { + this.Field8[i] = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Field8[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v70 := r.Intn(10) + this.Field9 = make([]uint32, v70) + for i := 0; i < v70; i++ { + this.Field9[i] = uint32(r.Uint32()) + } + } + if r.Intn(10) != 0 { + v71 := r.Intn(10) + this.Field10 = make([]int32, v71) + for i := 0; i < v71; i++ { + this.Field10[i] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Field10[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v72 := r.Intn(10) + this.Field11 = make([]uint64, v72) + for i := 0; i < v72; i++ { + this.Field11[i] = uint64(uint64(r.Uint32())) + } + } + if r.Intn(10) != 0 { + v73 := r.Intn(10) + this.Field12 = make([]int64, v73) + for i := 0; i < v73; i++ { + this.Field12[i] = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Field12[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v74 := r.Intn(10) + this.Field13 = make([]bool, v74) + for i := 0; i < v74; i++ { + this.Field13[i] = bool(bool(r.Intn(2) == 0)) + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 14) + } + return this +} + +func NewPopulatedNidOptStruct(r randyThetest, easy bool) *NidOptStruct { + this := &NidOptStruct{} + this.Field1 = float64(r.Float64()) + if r.Intn(2) == 0 { + this.Field1 *= -1 + } + this.Field2 = float32(r.Float32()) + if r.Intn(2) == 0 { + this.Field2 *= -1 + } + v75 := NewPopulatedNidOptNative(r, easy) + this.Field3 = *v75 + v76 := NewPopulatedNinOptNative(r, easy) + this.Field4 = *v76 + this.Field6 = uint64(uint64(r.Uint32())) + this.Field7 = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Field7 *= -1 + } + v77 := NewPopulatedNidOptNative(r, easy) + this.Field8 = *v77 + this.Field13 = bool(bool(r.Intn(2) == 0)) + this.Field14 = randStringThetest(r) + v78 := r.Intn(100) + this.Field15 = make([]byte, v78) + for i := 0; i < v78; i++ { + this.Field15[i] = byte(r.Intn(256)) + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 16) + } + return this +} + +func NewPopulatedNinOptStruct(r randyThetest, easy bool) *NinOptStruct { + this := &NinOptStruct{} + if r.Intn(10) != 0 { + v79 := float64(r.Float64()) + if r.Intn(2) == 0 { + v79 *= -1 + } + this.Field1 = &v79 + } + if r.Intn(10) != 0 { + v80 := float32(r.Float32()) + if r.Intn(2) == 0 { + v80 *= -1 + } + this.Field2 = &v80 + } + if r.Intn(10) != 0 { + this.Field3 = NewPopulatedNidOptNative(r, easy) + } + if r.Intn(10) != 0 { + this.Field4 = NewPopulatedNinOptNative(r, easy) + } + if r.Intn(10) != 0 { + v81 := uint64(uint64(r.Uint32())) + this.Field6 = &v81 + } + if r.Intn(10) != 0 { + v82 := int32(r.Int31()) + if r.Intn(2) == 0 { + v82 *= -1 + } + this.Field7 = &v82 + } + if r.Intn(10) != 0 { + this.Field8 = NewPopulatedNidOptNative(r, easy) + } + if r.Intn(10) != 0 { + v83 := bool(bool(r.Intn(2) == 0)) + this.Field13 = &v83 + } + if r.Intn(10) != 0 { + v84 := randStringThetest(r) + this.Field14 = &v84 + } + if r.Intn(10) != 0 { + v85 := r.Intn(100) + this.Field15 = make([]byte, v85) + for i := 0; i < v85; i++ { + this.Field15[i] = byte(r.Intn(256)) + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 16) + } + return this +} + +func NewPopulatedNidRepStruct(r randyThetest, easy bool) *NidRepStruct { + this := &NidRepStruct{} + if r.Intn(10) != 0 { + v86 := r.Intn(10) + this.Field1 = make([]float64, v86) + for i := 0; i < v86; i++ { + this.Field1[i] = float64(r.Float64()) + if r.Intn(2) == 0 { + this.Field1[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v87 := r.Intn(10) + this.Field2 = make([]float32, v87) + for i := 0; i < v87; i++ { + this.Field2[i] = float32(r.Float32()) + if r.Intn(2) == 0 { + this.Field2[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v88 := r.Intn(5) + this.Field3 = make([]NidOptNative, v88) + for i := 0; i < v88; i++ { + v89 := NewPopulatedNidOptNative(r, easy) + this.Field3[i] = *v89 + } + } + if r.Intn(10) != 0 { + v90 := r.Intn(5) + this.Field4 = make([]NinOptNative, v90) + for i := 0; i < v90; i++ { + v91 := NewPopulatedNinOptNative(r, easy) + this.Field4[i] = *v91 + } + } + if r.Intn(10) != 0 { + v92 := r.Intn(10) + this.Field6 = make([]uint64, v92) + for i := 0; i < v92; i++ { + this.Field6[i] = uint64(uint64(r.Uint32())) + } + } + if r.Intn(10) != 0 { + v93 := r.Intn(10) + this.Field7 = make([]int32, v93) + for i := 0; i < v93; i++ { + this.Field7[i] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Field7[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v94 := r.Intn(5) + this.Field8 = make([]NidOptNative, v94) + for i := 0; i < v94; i++ { + v95 := NewPopulatedNidOptNative(r, easy) + this.Field8[i] = *v95 + } + } + if r.Intn(10) != 0 { + v96 := r.Intn(10) + this.Field13 = make([]bool, v96) + for i := 0; i < v96; i++ { + this.Field13[i] = bool(bool(r.Intn(2) == 0)) + } + } + if r.Intn(10) != 0 { + v97 := r.Intn(10) + this.Field14 = make([]string, v97) + for i := 0; i < v97; i++ { + this.Field14[i] = randStringThetest(r) + } + } + if r.Intn(10) != 0 { + v98 := r.Intn(10) + this.Field15 = make([][]byte, v98) + for i := 0; i < v98; i++ { + v99 := r.Intn(100) + this.Field15[i] = make([]byte, v99) + for j := 0; j < v99; j++ { + this.Field15[i][j] = byte(r.Intn(256)) + } + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 16) + } + return this +} + +func NewPopulatedNinRepStruct(r randyThetest, easy bool) *NinRepStruct { + this := &NinRepStruct{} + if r.Intn(10) != 0 { + v100 := r.Intn(10) + this.Field1 = make([]float64, v100) + for i := 0; i < v100; i++ { + this.Field1[i] = float64(r.Float64()) + if r.Intn(2) == 0 { + this.Field1[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v101 := r.Intn(10) + this.Field2 = make([]float32, v101) + for i := 0; i < v101; i++ { + this.Field2[i] = float32(r.Float32()) + if r.Intn(2) == 0 { + this.Field2[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v102 := r.Intn(5) + this.Field3 = make([]*NidOptNative, v102) + for i := 0; i < v102; i++ { + this.Field3[i] = NewPopulatedNidOptNative(r, easy) + } + } + if r.Intn(10) != 0 { + v103 := r.Intn(5) + this.Field4 = make([]*NinOptNative, v103) + for i := 0; i < v103; i++ { + this.Field4[i] = NewPopulatedNinOptNative(r, easy) + } + } + if r.Intn(10) != 0 { + v104 := r.Intn(10) + this.Field6 = make([]uint64, v104) + for i := 0; i < v104; i++ { + this.Field6[i] = uint64(uint64(r.Uint32())) + } + } + if r.Intn(10) != 0 { + v105 := r.Intn(10) + this.Field7 = make([]int32, v105) + for i := 0; i < v105; i++ { + this.Field7[i] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Field7[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v106 := r.Intn(5) + this.Field8 = make([]*NidOptNative, v106) + for i := 0; i < v106; i++ { + this.Field8[i] = NewPopulatedNidOptNative(r, easy) + } + } + if r.Intn(10) != 0 { + v107 := r.Intn(10) + this.Field13 = make([]bool, v107) + for i := 0; i < v107; i++ { + this.Field13[i] = bool(bool(r.Intn(2) == 0)) + } + } + if r.Intn(10) != 0 { + v108 := r.Intn(10) + this.Field14 = make([]string, v108) + for i := 0; i < v108; i++ { + this.Field14[i] = randStringThetest(r) + } + } + if r.Intn(10) != 0 { + v109 := r.Intn(10) + this.Field15 = make([][]byte, v109) + for i := 0; i < v109; i++ { + v110 := r.Intn(100) + this.Field15[i] = make([]byte, v110) + for j := 0; j < v110; j++ { + this.Field15[i][j] = byte(r.Intn(256)) + } + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 16) + } + return this +} + +func NewPopulatedNidEmbeddedStruct(r randyThetest, easy bool) *NidEmbeddedStruct { + this := &NidEmbeddedStruct{} + if r.Intn(10) != 0 { + this.NidOptNative = NewPopulatedNidOptNative(r, easy) + } + v111 := NewPopulatedNidOptNative(r, easy) + this.Field200 = *v111 + this.Field210 = bool(bool(r.Intn(2) == 0)) + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 211) + } + return this +} + +func NewPopulatedNinEmbeddedStruct(r randyThetest, easy bool) *NinEmbeddedStruct { + this := &NinEmbeddedStruct{} + if r.Intn(10) != 0 { + this.NidOptNative = NewPopulatedNidOptNative(r, easy) + } + if r.Intn(10) != 0 { + this.Field200 = NewPopulatedNidOptNative(r, easy) + } + if r.Intn(10) != 0 { + v112 := bool(bool(r.Intn(2) == 0)) + this.Field210 = &v112 + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 211) + } + return this +} + +func NewPopulatedNidNestedStruct(r randyThetest, easy bool) *NidNestedStruct { + this := &NidNestedStruct{} + v113 := NewPopulatedNidOptStruct(r, easy) + this.Field1 = *v113 + if r.Intn(10) != 0 { + v114 := r.Intn(5) + this.Field2 = make([]NidRepStruct, v114) + for i := 0; i < v114; i++ { + v115 := NewPopulatedNidRepStruct(r, easy) + this.Field2[i] = *v115 + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 3) + } + return this +} + +func NewPopulatedNinNestedStruct(r randyThetest, easy bool) *NinNestedStruct { + this := &NinNestedStruct{} + if r.Intn(10) != 0 { + this.Field1 = NewPopulatedNinOptStruct(r, easy) + } + if r.Intn(10) != 0 { + v116 := r.Intn(5) + this.Field2 = make([]*NinRepStruct, v116) + for i := 0; i < v116; i++ { + this.Field2[i] = NewPopulatedNinRepStruct(r, easy) + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 3) + } + return this +} + +func NewPopulatedNidOptCustom(r randyThetest, easy bool) *NidOptCustom { + this := &NidOptCustom{} + v117 := NewPopulatedUuid(r) + this.Id = *v117 + v118 := github_com_gogo_protobuf_test_custom.NewPopulatedUint128(r) + this.Value = *v118 + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 3) + } + return this +} + +func NewPopulatedCustomDash(r randyThetest, easy bool) *CustomDash { + this := &CustomDash{} + if r.Intn(10) != 0 { + this.Value = github_com_gogo_protobuf_test_custom_dash_type.NewPopulatedBytes(r) + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 2) + } + return this +} + +func NewPopulatedNinOptCustom(r randyThetest, easy bool) *NinOptCustom { + this := &NinOptCustom{} + if r.Intn(10) != 0 { + this.Id = NewPopulatedUuid(r) + } + if r.Intn(10) != 0 { + this.Value = github_com_gogo_protobuf_test_custom.NewPopulatedUint128(r) + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 3) + } + return this +} + +func NewPopulatedNidRepCustom(r randyThetest, easy bool) *NidRepCustom { + this := &NidRepCustom{} + if r.Intn(10) != 0 { + v119 := r.Intn(10) + this.Id = make([]Uuid, v119) + for i := 0; i < v119; i++ { + v120 := NewPopulatedUuid(r) + this.Id[i] = *v120 + } + } + if r.Intn(10) != 0 { + v121 := r.Intn(10) + this.Value = make([]github_com_gogo_protobuf_test_custom.Uint128, v121) + for i := 0; i < v121; i++ { + v122 := github_com_gogo_protobuf_test_custom.NewPopulatedUint128(r) + this.Value[i] = *v122 + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 3) + } + return this +} + +func NewPopulatedNinRepCustom(r randyThetest, easy bool) *NinRepCustom { + this := &NinRepCustom{} + if r.Intn(10) != 0 { + v123 := r.Intn(10) + this.Id = make([]Uuid, v123) + for i := 0; i < v123; i++ { + v124 := NewPopulatedUuid(r) + this.Id[i] = *v124 + } + } + if r.Intn(10) != 0 { + v125 := r.Intn(10) + this.Value = make([]github_com_gogo_protobuf_test_custom.Uint128, v125) + for i := 0; i < v125; i++ { + v126 := github_com_gogo_protobuf_test_custom.NewPopulatedUint128(r) + this.Value[i] = *v126 + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 3) + } + return this +} + +func NewPopulatedNinOptNativeUnion(r randyThetest, easy bool) *NinOptNativeUnion { + this := &NinOptNativeUnion{} + fieldNum := r.Intn(9) + switch fieldNum { + case 0: + v127 := float64(r.Float64()) + if r.Intn(2) == 0 { + v127 *= -1 + } + this.Field1 = &v127 + case 1: + v128 := float32(r.Float32()) + if r.Intn(2) == 0 { + v128 *= -1 + } + this.Field2 = &v128 + case 2: + v129 := int32(r.Int31()) + if r.Intn(2) == 0 { + v129 *= -1 + } + this.Field3 = &v129 + case 3: + v130 := int64(r.Int63()) + if r.Intn(2) == 0 { + v130 *= -1 + } + this.Field4 = &v130 + case 4: + v131 := uint32(r.Uint32()) + this.Field5 = &v131 + case 5: + v132 := uint64(uint64(r.Uint32())) + this.Field6 = &v132 + case 6: + v133 := bool(bool(r.Intn(2) == 0)) + this.Field13 = &v133 + case 7: + v134 := randStringThetest(r) + this.Field14 = &v134 + case 8: + v135 := r.Intn(100) + this.Field15 = make([]byte, v135) + for i := 0; i < v135; i++ { + this.Field15[i] = byte(r.Intn(256)) + } + } + return this +} + +func NewPopulatedNinOptStructUnion(r randyThetest, easy bool) *NinOptStructUnion { + this := &NinOptStructUnion{} + fieldNum := r.Intn(9) + switch fieldNum { + case 0: + v136 := float64(r.Float64()) + if r.Intn(2) == 0 { + v136 *= -1 + } + this.Field1 = &v136 + case 1: + v137 := float32(r.Float32()) + if r.Intn(2) == 0 { + v137 *= -1 + } + this.Field2 = &v137 + case 2: + this.Field3 = NewPopulatedNidOptNative(r, easy) + case 3: + this.Field4 = NewPopulatedNinOptNative(r, easy) + case 4: + v138 := uint64(uint64(r.Uint32())) + this.Field6 = &v138 + case 5: + v139 := int32(r.Int31()) + if r.Intn(2) == 0 { + v139 *= -1 + } + this.Field7 = &v139 + case 6: + v140 := bool(bool(r.Intn(2) == 0)) + this.Field13 = &v140 + case 7: + v141 := randStringThetest(r) + this.Field14 = &v141 + case 8: + v142 := r.Intn(100) + this.Field15 = make([]byte, v142) + for i := 0; i < v142; i++ { + this.Field15[i] = byte(r.Intn(256)) + } + } + return this +} + +func NewPopulatedNinEmbeddedStructUnion(r randyThetest, easy bool) *NinEmbeddedStructUnion { + this := &NinEmbeddedStructUnion{} + fieldNum := r.Intn(3) + switch fieldNum { + case 0: + this.NidOptNative = NewPopulatedNidOptNative(r, easy) + case 1: + this.Field200 = NewPopulatedNinOptNative(r, easy) + case 2: + v143 := bool(bool(r.Intn(2) == 0)) + this.Field210 = &v143 + } + return this +} + +func NewPopulatedNinNestedStructUnion(r randyThetest, easy bool) *NinNestedStructUnion { + this := &NinNestedStructUnion{} + fieldNum := r.Intn(3) + switch fieldNum { + case 0: + this.Field1 = NewPopulatedNinOptNativeUnion(r, easy) + case 1: + this.Field2 = NewPopulatedNinOptStructUnion(r, easy) + case 2: + this.Field3 = NewPopulatedNinEmbeddedStructUnion(r, easy) + } + return this +} + +func NewPopulatedTree(r randyThetest, easy bool) *Tree { + this := &Tree{} + fieldNum := r.Intn(102) + switch fieldNum { + case 0: + this.Or = NewPopulatedOrBranch(r, easy) + case 1: + this.And = NewPopulatedAndBranch(r, easy) + case 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101: + this.Leaf = NewPopulatedLeaf(r, easy) + } + return this +} + +func NewPopulatedOrBranch(r randyThetest, easy bool) *OrBranch { + this := &OrBranch{} + v144 := NewPopulatedTree(r, easy) + this.Left = *v144 + v145 := NewPopulatedTree(r, easy) + this.Right = *v145 + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 3) + } + return this +} + +func NewPopulatedAndBranch(r randyThetest, easy bool) *AndBranch { + this := &AndBranch{} + v146 := NewPopulatedTree(r, easy) + this.Left = *v146 + v147 := NewPopulatedTree(r, easy) + this.Right = *v147 + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 3) + } + return this +} + +func NewPopulatedLeaf(r randyThetest, easy bool) *Leaf { + this := &Leaf{} + this.Value = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Value *= -1 + } + this.StrValue = randStringThetest(r) + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 3) + } + return this +} + +func NewPopulatedDeepTree(r randyThetest, easy bool) *DeepTree { + this := &DeepTree{} + fieldNum := r.Intn(102) + switch fieldNum { + case 0: + this.Down = NewPopulatedADeepBranch(r, easy) + case 1: + this.And = NewPopulatedAndDeepBranch(r, easy) + case 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101: + this.Leaf = NewPopulatedDeepLeaf(r, easy) + } + return this +} + +func NewPopulatedADeepBranch(r randyThetest, easy bool) *ADeepBranch { + this := &ADeepBranch{} + v148 := NewPopulatedDeepTree(r, easy) + this.Down = *v148 + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 3) + } + return this +} + +func NewPopulatedAndDeepBranch(r randyThetest, easy bool) *AndDeepBranch { + this := &AndDeepBranch{} + v149 := NewPopulatedDeepTree(r, easy) + this.Left = *v149 + v150 := NewPopulatedDeepTree(r, easy) + this.Right = *v150 + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 3) + } + return this +} + +func NewPopulatedDeepLeaf(r randyThetest, easy bool) *DeepLeaf { + this := &DeepLeaf{} + v151 := NewPopulatedTree(r, easy) + this.Tree = *v151 + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 2) + } + return this +} + +func NewPopulatedNil(r randyThetest, easy bool) *Nil { + this := &Nil{} + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 1) + } + return this +} + +func NewPopulatedNidOptEnum(r randyThetest, easy bool) *NidOptEnum { + this := &NidOptEnum{} + this.Field1 = TheTestEnum([]int32{0, 1, 2}[r.Intn(3)]) + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 2) + } + return this +} + +func NewPopulatedNinOptEnum(r randyThetest, easy bool) *NinOptEnum { + this := &NinOptEnum{} + if r.Intn(10) != 0 { + v152 := TheTestEnum([]int32{0, 1, 2}[r.Intn(3)]) + this.Field1 = &v152 + } + if r.Intn(10) != 0 { + v153 := YetAnotherTestEnum([]int32{0, 1}[r.Intn(2)]) + this.Field2 = &v153 + } + if r.Intn(10) != 0 { + v154 := YetYetAnotherTestEnum([]int32{0, 1}[r.Intn(2)]) + this.Field3 = &v154 + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 4) + } + return this +} + +func NewPopulatedNidRepEnum(r randyThetest, easy bool) *NidRepEnum { + this := &NidRepEnum{} + if r.Intn(10) != 0 { + v155 := r.Intn(10) + this.Field1 = make([]TheTestEnum, v155) + for i := 0; i < v155; i++ { + this.Field1[i] = TheTestEnum([]int32{0, 1, 2}[r.Intn(3)]) + } + } + if r.Intn(10) != 0 { + v156 := r.Intn(10) + this.Field2 = make([]YetAnotherTestEnum, v156) + for i := 0; i < v156; i++ { + this.Field2[i] = YetAnotherTestEnum([]int32{0, 1}[r.Intn(2)]) + } + } + if r.Intn(10) != 0 { + v157 := r.Intn(10) + this.Field3 = make([]YetYetAnotherTestEnum, v157) + for i := 0; i < v157; i++ { + this.Field3[i] = YetYetAnotherTestEnum([]int32{0, 1}[r.Intn(2)]) + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 4) + } + return this +} + +func NewPopulatedNinRepEnum(r randyThetest, easy bool) *NinRepEnum { + this := &NinRepEnum{} + if r.Intn(10) != 0 { + v158 := r.Intn(10) + this.Field1 = make([]TheTestEnum, v158) + for i := 0; i < v158; i++ { + this.Field1[i] = TheTestEnum([]int32{0, 1, 2}[r.Intn(3)]) + } + } + if r.Intn(10) != 0 { + v159 := r.Intn(10) + this.Field2 = make([]YetAnotherTestEnum, v159) + for i := 0; i < v159; i++ { + this.Field2[i] = YetAnotherTestEnum([]int32{0, 1}[r.Intn(2)]) + } + } + if r.Intn(10) != 0 { + v160 := r.Intn(10) + this.Field3 = make([]YetYetAnotherTestEnum, v160) + for i := 0; i < v160; i++ { + this.Field3[i] = YetYetAnotherTestEnum([]int32{0, 1}[r.Intn(2)]) + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 4) + } + return this +} + +func NewPopulatedNinOptEnumDefault(r randyThetest, easy bool) *NinOptEnumDefault { + this := &NinOptEnumDefault{} + if r.Intn(10) != 0 { + v161 := TheTestEnum([]int32{0, 1, 2}[r.Intn(3)]) + this.Field1 = &v161 + } + if r.Intn(10) != 0 { + v162 := YetAnotherTestEnum([]int32{0, 1}[r.Intn(2)]) + this.Field2 = &v162 + } + if r.Intn(10) != 0 { + v163 := YetYetAnotherTestEnum([]int32{0, 1}[r.Intn(2)]) + this.Field3 = &v163 + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 4) + } + return this +} + +func NewPopulatedAnotherNinOptEnum(r randyThetest, easy bool) *AnotherNinOptEnum { + this := &AnotherNinOptEnum{} + if r.Intn(10) != 0 { + v164 := AnotherTestEnum([]int32{10, 11}[r.Intn(2)]) + this.Field1 = &v164 + } + if r.Intn(10) != 0 { + v165 := YetAnotherTestEnum([]int32{0, 1}[r.Intn(2)]) + this.Field2 = &v165 + } + if r.Intn(10) != 0 { + v166 := YetYetAnotherTestEnum([]int32{0, 1}[r.Intn(2)]) + this.Field3 = &v166 + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 4) + } + return this +} + +func NewPopulatedAnotherNinOptEnumDefault(r randyThetest, easy bool) *AnotherNinOptEnumDefault { + this := &AnotherNinOptEnumDefault{} + if r.Intn(10) != 0 { + v167 := AnotherTestEnum([]int32{10, 11}[r.Intn(2)]) + this.Field1 = &v167 + } + if r.Intn(10) != 0 { + v168 := YetAnotherTestEnum([]int32{0, 1}[r.Intn(2)]) + this.Field2 = &v168 + } + if r.Intn(10) != 0 { + v169 := YetYetAnotherTestEnum([]int32{0, 1}[r.Intn(2)]) + this.Field3 = &v169 + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 4) + } + return this +} + +func NewPopulatedTimer(r randyThetest, easy bool) *Timer { + this := &Timer{} + this.Time1 = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Time1 *= -1 + } + this.Time2 = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Time2 *= -1 + } + v170 := r.Intn(100) + this.Data = make([]byte, v170) + for i := 0; i < v170; i++ { + this.Data[i] = byte(r.Intn(256)) + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 4) + } + return this +} + +func NewPopulatedMyExtendable(r randyThetest, easy bool) *MyExtendable { + this := &MyExtendable{} + if r.Intn(10) != 0 { + v171 := int64(r.Int63()) + if r.Intn(2) == 0 { + v171 *= -1 + } + this.Field1 = &v171 + } + if !easy && r.Intn(10) != 0 { + l := r.Intn(5) + for i := 0; i < l; i++ { + fieldNumber := r.Intn(100) + 100 + wire := r.Intn(4) + if wire == 3 { + wire = 5 + } + data := randFieldThetest(nil, r, fieldNumber, wire) + github_com_gogo_protobuf_proto.SetRawExtension(this, int32(fieldNumber), data) + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 201) + } + return this +} + +func NewPopulatedOtherExtenable(r randyThetest, easy bool) *OtherExtenable { + this := &OtherExtenable{} + if r.Intn(10) != 0 { + this.M = NewPopulatedMyExtendable(r, easy) + } + if r.Intn(10) != 0 { + v172 := int64(r.Int63()) + if r.Intn(2) == 0 { + v172 *= -1 + } + this.Field2 = &v172 + } + if r.Intn(10) != 0 { + v173 := int64(r.Int63()) + if r.Intn(2) == 0 { + v173 *= -1 + } + this.Field13 = &v173 + } + if !easy && r.Intn(10) != 0 { + l := r.Intn(5) + for i := 0; i < l; i++ { + eIndex := r.Intn(2) + fieldNumber := 0 + switch eIndex { + case 0: + fieldNumber = r.Intn(3) + 14 + case 1: + fieldNumber = r.Intn(3) + 10 + } + wire := r.Intn(4) + if wire == 3 { + wire = 5 + } + data := randFieldThetest(nil, r, fieldNumber, wire) + github_com_gogo_protobuf_proto.SetRawExtension(this, int32(fieldNumber), data) + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 18) + } + return this +} + +func NewPopulatedNestedDefinition(r randyThetest, easy bool) *NestedDefinition { + this := &NestedDefinition{} + if r.Intn(10) != 0 { + v174 := int64(r.Int63()) + if r.Intn(2) == 0 { + v174 *= -1 + } + this.Field1 = &v174 + } + if r.Intn(10) != 0 { + v175 := NestedDefinition_NestedEnum([]int32{1}[r.Intn(1)]) + this.EnumField = &v175 + } + if r.Intn(10) != 0 { + this.NNM = NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(r, easy) + } + if r.Intn(10) != 0 { + this.NM = NewPopulatedNestedDefinition_NestedMessage(r, easy) + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 5) + } + return this +} + +func NewPopulatedNestedDefinition_NestedMessage(r randyThetest, easy bool) *NestedDefinition_NestedMessage { + this := &NestedDefinition_NestedMessage{} + if r.Intn(10) != 0 { + v176 := uint64(uint64(r.Uint32())) + this.NestedField1 = &v176 + } + if r.Intn(10) != 0 { + this.NNM = NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(r, easy) + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 3) + } + return this +} + +func NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(r randyThetest, easy bool) *NestedDefinition_NestedMessage_NestedNestedMsg { + this := &NestedDefinition_NestedMessage_NestedNestedMsg{} + if r.Intn(10) != 0 { + v177 := randStringThetest(r) + this.NestedNestedField1 = &v177 + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 11) + } + return this +} + +func NewPopulatedNestedScope(r randyThetest, easy bool) *NestedScope { + this := &NestedScope{} + if r.Intn(10) != 0 { + this.A = NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(r, easy) + } + if r.Intn(10) != 0 { + v178 := NestedDefinition_NestedEnum([]int32{1}[r.Intn(1)]) + this.B = &v178 + } + if r.Intn(10) != 0 { + this.C = NewPopulatedNestedDefinition_NestedMessage(r, easy) + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 4) + } + return this +} + +func NewPopulatedNinOptNativeDefault(r randyThetest, easy bool) *NinOptNativeDefault { + this := &NinOptNativeDefault{} + if r.Intn(10) != 0 { + v179 := float64(r.Float64()) + if r.Intn(2) == 0 { + v179 *= -1 + } + this.Field1 = &v179 + } + if r.Intn(10) != 0 { + v180 := float32(r.Float32()) + if r.Intn(2) == 0 { + v180 *= -1 + } + this.Field2 = &v180 + } + if r.Intn(10) != 0 { + v181 := int32(r.Int31()) + if r.Intn(2) == 0 { + v181 *= -1 + } + this.Field3 = &v181 + } + if r.Intn(10) != 0 { + v182 := int64(r.Int63()) + if r.Intn(2) == 0 { + v182 *= -1 + } + this.Field4 = &v182 + } + if r.Intn(10) != 0 { + v183 := uint32(r.Uint32()) + this.Field5 = &v183 + } + if r.Intn(10) != 0 { + v184 := uint64(uint64(r.Uint32())) + this.Field6 = &v184 + } + if r.Intn(10) != 0 { + v185 := int32(r.Int31()) + if r.Intn(2) == 0 { + v185 *= -1 + } + this.Field7 = &v185 + } + if r.Intn(10) != 0 { + v186 := int64(r.Int63()) + if r.Intn(2) == 0 { + v186 *= -1 + } + this.Field8 = &v186 + } + if r.Intn(10) != 0 { + v187 := uint32(r.Uint32()) + this.Field9 = &v187 + } + if r.Intn(10) != 0 { + v188 := int32(r.Int31()) + if r.Intn(2) == 0 { + v188 *= -1 + } + this.Field10 = &v188 + } + if r.Intn(10) != 0 { + v189 := uint64(uint64(r.Uint32())) + this.Field11 = &v189 + } + if r.Intn(10) != 0 { + v190 := int64(r.Int63()) + if r.Intn(2) == 0 { + v190 *= -1 + } + this.Field12 = &v190 + } + if r.Intn(10) != 0 { + v191 := bool(bool(r.Intn(2) == 0)) + this.Field13 = &v191 + } + if r.Intn(10) != 0 { + v192 := randStringThetest(r) + this.Field14 = &v192 + } + if r.Intn(10) != 0 { + v193 := r.Intn(100) + this.Field15 = make([]byte, v193) + for i := 0; i < v193; i++ { + this.Field15[i] = byte(r.Intn(256)) + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 16) + } + return this +} + +func NewPopulatedCustomContainer(r randyThetest, easy bool) *CustomContainer { + this := &CustomContainer{} + v194 := NewPopulatedNidOptCustom(r, easy) + this.CustomStruct = *v194 + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 2) + } + return this +} + +func NewPopulatedCustomNameNidOptNative(r randyThetest, easy bool) *CustomNameNidOptNative { + this := &CustomNameNidOptNative{} + this.FieldA = float64(r.Float64()) + if r.Intn(2) == 0 { + this.FieldA *= -1 + } + this.FieldB = float32(r.Float32()) + if r.Intn(2) == 0 { + this.FieldB *= -1 + } + this.FieldC = int32(r.Int31()) + if r.Intn(2) == 0 { + this.FieldC *= -1 + } + this.FieldD = int64(r.Int63()) + if r.Intn(2) == 0 { + this.FieldD *= -1 + } + this.FieldE = uint32(r.Uint32()) + this.FieldF = uint64(uint64(r.Uint32())) + this.FieldG = int32(r.Int31()) + if r.Intn(2) == 0 { + this.FieldG *= -1 + } + this.FieldH = int64(r.Int63()) + if r.Intn(2) == 0 { + this.FieldH *= -1 + } + this.FieldI = uint32(r.Uint32()) + this.FieldJ = int32(r.Int31()) + if r.Intn(2) == 0 { + this.FieldJ *= -1 + } + this.FieldK = uint64(uint64(r.Uint32())) + this.FieldL = int64(r.Int63()) + if r.Intn(2) == 0 { + this.FieldL *= -1 + } + this.FieldM = bool(bool(r.Intn(2) == 0)) + this.FieldN = randStringThetest(r) + v195 := r.Intn(100) + this.FieldO = make([]byte, v195) + for i := 0; i < v195; i++ { + this.FieldO[i] = byte(r.Intn(256)) + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 16) + } + return this +} + +func NewPopulatedCustomNameNinOptNative(r randyThetest, easy bool) *CustomNameNinOptNative { + this := &CustomNameNinOptNative{} + if r.Intn(10) != 0 { + v196 := float64(r.Float64()) + if r.Intn(2) == 0 { + v196 *= -1 + } + this.FieldA = &v196 + } + if r.Intn(10) != 0 { + v197 := float32(r.Float32()) + if r.Intn(2) == 0 { + v197 *= -1 + } + this.FieldB = &v197 + } + if r.Intn(10) != 0 { + v198 := int32(r.Int31()) + if r.Intn(2) == 0 { + v198 *= -1 + } + this.FieldC = &v198 + } + if r.Intn(10) != 0 { + v199 := int64(r.Int63()) + if r.Intn(2) == 0 { + v199 *= -1 + } + this.FieldD = &v199 + } + if r.Intn(10) != 0 { + v200 := uint32(r.Uint32()) + this.FieldE = &v200 + } + if r.Intn(10) != 0 { + v201 := uint64(uint64(r.Uint32())) + this.FieldF = &v201 + } + if r.Intn(10) != 0 { + v202 := int32(r.Int31()) + if r.Intn(2) == 0 { + v202 *= -1 + } + this.FieldG = &v202 + } + if r.Intn(10) != 0 { + v203 := int64(r.Int63()) + if r.Intn(2) == 0 { + v203 *= -1 + } + this.FieldH = &v203 + } + if r.Intn(10) != 0 { + v204 := uint32(r.Uint32()) + this.FieldI = &v204 + } + if r.Intn(10) != 0 { + v205 := int32(r.Int31()) + if r.Intn(2) == 0 { + v205 *= -1 + } + this.FieldJ = &v205 + } + if r.Intn(10) != 0 { + v206 := uint64(uint64(r.Uint32())) + this.FieldK = &v206 + } + if r.Intn(10) != 0 { + v207 := int64(r.Int63()) + if r.Intn(2) == 0 { + v207 *= -1 + } + this.FielL = &v207 + } + if r.Intn(10) != 0 { + v208 := bool(bool(r.Intn(2) == 0)) + this.FieldM = &v208 + } + if r.Intn(10) != 0 { + v209 := randStringThetest(r) + this.FieldN = &v209 + } + if r.Intn(10) != 0 { + v210 := r.Intn(100) + this.FieldO = make([]byte, v210) + for i := 0; i < v210; i++ { + this.FieldO[i] = byte(r.Intn(256)) + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 16) + } + return this +} + +func NewPopulatedCustomNameNinRepNative(r randyThetest, easy bool) *CustomNameNinRepNative { + this := &CustomNameNinRepNative{} + if r.Intn(10) != 0 { + v211 := r.Intn(10) + this.FieldA = make([]float64, v211) + for i := 0; i < v211; i++ { + this.FieldA[i] = float64(r.Float64()) + if r.Intn(2) == 0 { + this.FieldA[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v212 := r.Intn(10) + this.FieldB = make([]float32, v212) + for i := 0; i < v212; i++ { + this.FieldB[i] = float32(r.Float32()) + if r.Intn(2) == 0 { + this.FieldB[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v213 := r.Intn(10) + this.FieldC = make([]int32, v213) + for i := 0; i < v213; i++ { + this.FieldC[i] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.FieldC[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v214 := r.Intn(10) + this.FieldD = make([]int64, v214) + for i := 0; i < v214; i++ { + this.FieldD[i] = int64(r.Int63()) + if r.Intn(2) == 0 { + this.FieldD[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v215 := r.Intn(10) + this.FieldE = make([]uint32, v215) + for i := 0; i < v215; i++ { + this.FieldE[i] = uint32(r.Uint32()) + } + } + if r.Intn(10) != 0 { + v216 := r.Intn(10) + this.FieldF = make([]uint64, v216) + for i := 0; i < v216; i++ { + this.FieldF[i] = uint64(uint64(r.Uint32())) + } + } + if r.Intn(10) != 0 { + v217 := r.Intn(10) + this.FieldG = make([]int32, v217) + for i := 0; i < v217; i++ { + this.FieldG[i] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.FieldG[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v218 := r.Intn(10) + this.FieldH = make([]int64, v218) + for i := 0; i < v218; i++ { + this.FieldH[i] = int64(r.Int63()) + if r.Intn(2) == 0 { + this.FieldH[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v219 := r.Intn(10) + this.FieldI = make([]uint32, v219) + for i := 0; i < v219; i++ { + this.FieldI[i] = uint32(r.Uint32()) + } + } + if r.Intn(10) != 0 { + v220 := r.Intn(10) + this.FieldJ = make([]int32, v220) + for i := 0; i < v220; i++ { + this.FieldJ[i] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.FieldJ[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v221 := r.Intn(10) + this.FieldK = make([]uint64, v221) + for i := 0; i < v221; i++ { + this.FieldK[i] = uint64(uint64(r.Uint32())) + } + } + if r.Intn(10) != 0 { + v222 := r.Intn(10) + this.FieldL = make([]int64, v222) + for i := 0; i < v222; i++ { + this.FieldL[i] = int64(r.Int63()) + if r.Intn(2) == 0 { + this.FieldL[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v223 := r.Intn(10) + this.FieldM = make([]bool, v223) + for i := 0; i < v223; i++ { + this.FieldM[i] = bool(bool(r.Intn(2) == 0)) + } + } + if r.Intn(10) != 0 { + v224 := r.Intn(10) + this.FieldN = make([]string, v224) + for i := 0; i < v224; i++ { + this.FieldN[i] = randStringThetest(r) + } + } + if r.Intn(10) != 0 { + v225 := r.Intn(10) + this.FieldO = make([][]byte, v225) + for i := 0; i < v225; i++ { + v226 := r.Intn(100) + this.FieldO[i] = make([]byte, v226) + for j := 0; j < v226; j++ { + this.FieldO[i][j] = byte(r.Intn(256)) + } + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 16) + } + return this +} + +func NewPopulatedCustomNameNinStruct(r randyThetest, easy bool) *CustomNameNinStruct { + this := &CustomNameNinStruct{} + if r.Intn(10) != 0 { + v227 := float64(r.Float64()) + if r.Intn(2) == 0 { + v227 *= -1 + } + this.FieldA = &v227 + } + if r.Intn(10) != 0 { + v228 := float32(r.Float32()) + if r.Intn(2) == 0 { + v228 *= -1 + } + this.FieldB = &v228 + } + if r.Intn(10) != 0 { + this.FieldC = NewPopulatedNidOptNative(r, easy) + } + if r.Intn(10) != 0 { + v229 := r.Intn(5) + this.FieldD = make([]*NinOptNative, v229) + for i := 0; i < v229; i++ { + this.FieldD[i] = NewPopulatedNinOptNative(r, easy) + } + } + if r.Intn(10) != 0 { + v230 := uint64(uint64(r.Uint32())) + this.FieldE = &v230 + } + if r.Intn(10) != 0 { + v231 := int32(r.Int31()) + if r.Intn(2) == 0 { + v231 *= -1 + } + this.FieldF = &v231 + } + if r.Intn(10) != 0 { + this.FieldG = NewPopulatedNidOptNative(r, easy) + } + if r.Intn(10) != 0 { + v232 := bool(bool(r.Intn(2) == 0)) + this.FieldH = &v232 + } + if r.Intn(10) != 0 { + v233 := randStringThetest(r) + this.FieldI = &v233 + } + if r.Intn(10) != 0 { + v234 := r.Intn(100) + this.FieldJ = make([]byte, v234) + for i := 0; i < v234; i++ { + this.FieldJ[i] = byte(r.Intn(256)) + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 16) + } + return this +} + +func NewPopulatedCustomNameCustomType(r randyThetest, easy bool) *CustomNameCustomType { + this := &CustomNameCustomType{} + if r.Intn(10) != 0 { + this.FieldA = NewPopulatedUuid(r) + } + if r.Intn(10) != 0 { + this.FieldB = github_com_gogo_protobuf_test_custom.NewPopulatedUint128(r) + } + if r.Intn(10) != 0 { + v235 := r.Intn(10) + this.FieldC = make([]Uuid, v235) + for i := 0; i < v235; i++ { + v236 := NewPopulatedUuid(r) + this.FieldC[i] = *v236 + } + } + if r.Intn(10) != 0 { + v237 := r.Intn(10) + this.FieldD = make([]github_com_gogo_protobuf_test_custom.Uint128, v237) + for i := 0; i < v237; i++ { + v238 := github_com_gogo_protobuf_test_custom.NewPopulatedUint128(r) + this.FieldD[i] = *v238 + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 5) + } + return this +} + +func NewPopulatedCustomNameNinEmbeddedStructUnion(r randyThetest, easy bool) *CustomNameNinEmbeddedStructUnion { + this := &CustomNameNinEmbeddedStructUnion{} + fieldNum := r.Intn(3) + switch fieldNum { + case 0: + this.NidOptNative = NewPopulatedNidOptNative(r, easy) + case 1: + this.FieldA = NewPopulatedNinOptNative(r, easy) + case 2: + v239 := bool(bool(r.Intn(2) == 0)) + this.FieldB = &v239 + } + return this +} + +func NewPopulatedCustomNameEnum(r randyThetest, easy bool) *CustomNameEnum { + this := &CustomNameEnum{} + if r.Intn(10) != 0 { + v240 := TheTestEnum([]int32{0, 1, 2}[r.Intn(3)]) + this.FieldA = &v240 + } + if r.Intn(10) != 0 { + v241 := r.Intn(10) + this.FieldB = make([]TheTestEnum, v241) + for i := 0; i < v241; i++ { + this.FieldB[i] = TheTestEnum([]int32{0, 1, 2}[r.Intn(3)]) + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 3) + } + return this +} + +func NewPopulatedNoExtensionsMap(r randyThetest, easy bool) *NoExtensionsMap { + this := &NoExtensionsMap{} + if r.Intn(10) != 0 { + v242 := int64(r.Int63()) + if r.Intn(2) == 0 { + v242 *= -1 + } + this.Field1 = &v242 + } + if !easy && r.Intn(10) != 0 { + l := r.Intn(5) + for i := 0; i < l; i++ { + fieldNumber := r.Intn(100) + 100 + wire := r.Intn(4) + if wire == 3 { + wire = 5 + } + data := randFieldThetest(nil, r, fieldNumber, wire) + github_com_gogo_protobuf_proto.SetRawExtension(this, int32(fieldNumber), data) + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 201) + } + return this +} + +func NewPopulatedUnrecognized(r randyThetest, easy bool) *Unrecognized { + this := &Unrecognized{} + if r.Intn(10) != 0 { + v243 := randStringThetest(r) + this.Field1 = &v243 + } + if !easy && r.Intn(10) != 0 { + } + return this +} + +func NewPopulatedUnrecognizedWithInner(r randyThetest, easy bool) *UnrecognizedWithInner { + this := &UnrecognizedWithInner{} + if r.Intn(10) != 0 { + v244 := r.Intn(5) + this.Embedded = make([]*UnrecognizedWithInner_Inner, v244) + for i := 0; i < v244; i++ { + this.Embedded[i] = NewPopulatedUnrecognizedWithInner_Inner(r, easy) + } + } + if r.Intn(10) != 0 { + v245 := randStringThetest(r) + this.Field2 = &v245 + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 3) + } + return this +} + +func NewPopulatedUnrecognizedWithInner_Inner(r randyThetest, easy bool) *UnrecognizedWithInner_Inner { + this := &UnrecognizedWithInner_Inner{} + if r.Intn(10) != 0 { + v246 := uint32(r.Uint32()) + this.Field1 = &v246 + } + if !easy && r.Intn(10) != 0 { + } + return this +} + +func NewPopulatedUnrecognizedWithEmbed(r randyThetest, easy bool) *UnrecognizedWithEmbed { + this := &UnrecognizedWithEmbed{} + v247 := NewPopulatedUnrecognizedWithEmbed_Embedded(r, easy) + this.UnrecognizedWithEmbed_Embedded = *v247 + if r.Intn(10) != 0 { + v248 := randStringThetest(r) + this.Field2 = &v248 + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 3) + } + return this +} + +func NewPopulatedUnrecognizedWithEmbed_Embedded(r randyThetest, easy bool) *UnrecognizedWithEmbed_Embedded { + this := &UnrecognizedWithEmbed_Embedded{} + if r.Intn(10) != 0 { + v249 := uint32(r.Uint32()) + this.Field1 = &v249 + } + if !easy && r.Intn(10) != 0 { + } + return this +} + +func NewPopulatedNode(r randyThetest, easy bool) *Node { + this := &Node{} + if r.Intn(10) != 0 { + v250 := randStringThetest(r) + this.Label = &v250 + } + if r.Intn(10) == 0 { + v251 := r.Intn(5) + this.Children = make([]*Node, v251) + for i := 0; i < v251; i++ { + this.Children[i] = NewPopulatedNode(r, easy) + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 3) + } + return this +} + +type randyThetest interface { + Float32() float32 + Float64() float64 + Int63() int64 + Int31() int32 + Uint32() uint32 + Intn(n int) int +} + +func randUTF8RuneThetest(r randyThetest) 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 randStringThetest(r randyThetest) string { + v252 := r.Intn(100) + tmps := make([]rune, v252) + for i := 0; i < v252; i++ { + tmps[i] = randUTF8RuneThetest(r) + } + return string(tmps) +} +func randUnrecognizedThetest(r randyThetest, 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 = randFieldThetest(data, r, fieldNumber, wire) + } + return data +} +func randFieldThetest(data []byte, r randyThetest, fieldNumber int, wire int) []byte { + key := uint32(fieldNumber)<<3 | uint32(wire) + switch wire { + case 0: + data = encodeVarintPopulateThetest(data, uint64(key)) + v253 := r.Int63() + if r.Intn(2) == 0 { + v253 *= -1 + } + data = encodeVarintPopulateThetest(data, uint64(v253)) + case 1: + data = encodeVarintPopulateThetest(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 = encodeVarintPopulateThetest(data, uint64(key)) + ll := r.Intn(100) + data = encodeVarintPopulateThetest(data, uint64(ll)) + for j := 0; j < ll; j++ { + data = append(data, byte(r.Intn(256))) + } + default: + data = encodeVarintPopulateThetest(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 encodeVarintPopulateThetest(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 *NidOptNative) Size() (n int) { + var l int + _ = l + n += 9 + n += 5 + n += 1 + sovThetest(uint64(m.Field3)) + n += 1 + sovThetest(uint64(m.Field4)) + n += 1 + sovThetest(uint64(m.Field5)) + n += 1 + sovThetest(uint64(m.Field6)) + n += 1 + sozThetest(uint64(m.Field7)) + n += 1 + sozThetest(uint64(m.Field8)) + n += 5 + n += 5 + n += 9 + n += 9 + n += 2 + l = len(m.Field14) + n += 1 + l + sovThetest(uint64(l)) + if m.Field15 != nil { + l = len(m.Field15) + n += 1 + l + sovThetest(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NinOptNative) Size() (n int) { + var l int + _ = l + if m.Field1 != nil { + n += 9 + } + if m.Field2 != nil { + n += 5 + } + if m.Field3 != nil { + n += 1 + sovThetest(uint64(*m.Field3)) + } + if m.Field4 != nil { + n += 1 + sovThetest(uint64(*m.Field4)) + } + if m.Field5 != nil { + n += 1 + sovThetest(uint64(*m.Field5)) + } + if m.Field6 != nil { + n += 1 + sovThetest(uint64(*m.Field6)) + } + if m.Field7 != nil { + n += 1 + sozThetest(uint64(*m.Field7)) + } + if m.Field8 != nil { + n += 1 + sozThetest(uint64(*m.Field8)) + } + if m.Field9 != nil { + n += 5 + } + if m.Field10 != nil { + n += 5 + } + if m.Field11 != nil { + n += 9 + } + if m.Field12 != nil { + n += 9 + } + if m.Field13 != nil { + n += 2 + } + if m.Field14 != nil { + l = len(*m.Field14) + n += 1 + l + sovThetest(uint64(l)) + } + if m.Field15 != nil { + l = len(m.Field15) + n += 1 + l + sovThetest(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NidRepNative) Size() (n int) { + var l int + _ = l + if len(m.Field1) > 0 { + n += 9 * len(m.Field1) + } + if len(m.Field2) > 0 { + n += 5 * len(m.Field2) + } + if len(m.Field3) > 0 { + for _, e := range m.Field3 { + n += 1 + sovThetest(uint64(e)) + } + } + if len(m.Field4) > 0 { + for _, e := range m.Field4 { + n += 1 + sovThetest(uint64(e)) + } + } + if len(m.Field5) > 0 { + for _, e := range m.Field5 { + n += 1 + sovThetest(uint64(e)) + } + } + if len(m.Field6) > 0 { + for _, e := range m.Field6 { + n += 1 + sovThetest(uint64(e)) + } + } + if len(m.Field7) > 0 { + for _, e := range m.Field7 { + n += 1 + sozThetest(uint64(e)) + } + } + if len(m.Field8) > 0 { + for _, e := range m.Field8 { + n += 1 + sozThetest(uint64(e)) + } + } + if len(m.Field9) > 0 { + n += 5 * len(m.Field9) + } + if len(m.Field10) > 0 { + n += 5 * len(m.Field10) + } + if len(m.Field11) > 0 { + n += 9 * len(m.Field11) + } + if len(m.Field12) > 0 { + n += 9 * len(m.Field12) + } + if len(m.Field13) > 0 { + n += 2 * len(m.Field13) + } + if len(m.Field14) > 0 { + for _, s := range m.Field14 { + l = len(s) + n += 1 + l + sovThetest(uint64(l)) + } + } + if len(m.Field15) > 0 { + for _, b := range m.Field15 { + l = len(b) + n += 1 + l + sovThetest(uint64(l)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NinRepNative) Size() (n int) { + var l int + _ = l + if len(m.Field1) > 0 { + n += 9 * len(m.Field1) + } + if len(m.Field2) > 0 { + n += 5 * len(m.Field2) + } + if len(m.Field3) > 0 { + for _, e := range m.Field3 { + n += 1 + sovThetest(uint64(e)) + } + } + if len(m.Field4) > 0 { + for _, e := range m.Field4 { + n += 1 + sovThetest(uint64(e)) + } + } + if len(m.Field5) > 0 { + for _, e := range m.Field5 { + n += 1 + sovThetest(uint64(e)) + } + } + if len(m.Field6) > 0 { + for _, e := range m.Field6 { + n += 1 + sovThetest(uint64(e)) + } + } + if len(m.Field7) > 0 { + for _, e := range m.Field7 { + n += 1 + sozThetest(uint64(e)) + } + } + if len(m.Field8) > 0 { + for _, e := range m.Field8 { + n += 1 + sozThetest(uint64(e)) + } + } + if len(m.Field9) > 0 { + n += 5 * len(m.Field9) + } + if len(m.Field10) > 0 { + n += 5 * len(m.Field10) + } + if len(m.Field11) > 0 { + n += 9 * len(m.Field11) + } + if len(m.Field12) > 0 { + n += 9 * len(m.Field12) + } + if len(m.Field13) > 0 { + n += 2 * len(m.Field13) + } + if len(m.Field14) > 0 { + for _, s := range m.Field14 { + l = len(s) + n += 1 + l + sovThetest(uint64(l)) + } + } + if len(m.Field15) > 0 { + for _, b := range m.Field15 { + l = len(b) + n += 1 + l + sovThetest(uint64(l)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NidRepPackedNative) Size() (n int) { + var l int + _ = l + if len(m.Field1) > 0 { + n += 1 + sovThetest(uint64(len(m.Field1)*8)) + len(m.Field1)*8 + } + if len(m.Field2) > 0 { + n += 1 + sovThetest(uint64(len(m.Field2)*4)) + len(m.Field2)*4 + } + if len(m.Field3) > 0 { + l = 0 + for _, e := range m.Field3 { + l += sovThetest(uint64(e)) + } + n += 1 + sovThetest(uint64(l)) + l + } + if len(m.Field4) > 0 { + l = 0 + for _, e := range m.Field4 { + l += sovThetest(uint64(e)) + } + n += 1 + sovThetest(uint64(l)) + l + } + if len(m.Field5) > 0 { + l = 0 + for _, e := range m.Field5 { + l += sovThetest(uint64(e)) + } + n += 1 + sovThetest(uint64(l)) + l + } + if len(m.Field6) > 0 { + l = 0 + for _, e := range m.Field6 { + l += sovThetest(uint64(e)) + } + n += 1 + sovThetest(uint64(l)) + l + } + if len(m.Field7) > 0 { + l = 0 + for _, e := range m.Field7 { + l += sozThetest(uint64(e)) + } + n += 1 + sovThetest(uint64(l)) + l + } + if len(m.Field8) > 0 { + l = 0 + for _, e := range m.Field8 { + l += sozThetest(uint64(e)) + } + n += 1 + sovThetest(uint64(l)) + l + } + if len(m.Field9) > 0 { + n += 1 + sovThetest(uint64(len(m.Field9)*4)) + len(m.Field9)*4 + } + if len(m.Field10) > 0 { + n += 1 + sovThetest(uint64(len(m.Field10)*4)) + len(m.Field10)*4 + } + if len(m.Field11) > 0 { + n += 1 + sovThetest(uint64(len(m.Field11)*8)) + len(m.Field11)*8 + } + if len(m.Field12) > 0 { + n += 1 + sovThetest(uint64(len(m.Field12)*8)) + len(m.Field12)*8 + } + if len(m.Field13) > 0 { + n += 1 + sovThetest(uint64(len(m.Field13))) + len(m.Field13)*1 + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NinRepPackedNative) Size() (n int) { + var l int + _ = l + if len(m.Field1) > 0 { + n += 1 + sovThetest(uint64(len(m.Field1)*8)) + len(m.Field1)*8 + } + if len(m.Field2) > 0 { + n += 1 + sovThetest(uint64(len(m.Field2)*4)) + len(m.Field2)*4 + } + if len(m.Field3) > 0 { + l = 0 + for _, e := range m.Field3 { + l += sovThetest(uint64(e)) + } + n += 1 + sovThetest(uint64(l)) + l + } + if len(m.Field4) > 0 { + l = 0 + for _, e := range m.Field4 { + l += sovThetest(uint64(e)) + } + n += 1 + sovThetest(uint64(l)) + l + } + if len(m.Field5) > 0 { + l = 0 + for _, e := range m.Field5 { + l += sovThetest(uint64(e)) + } + n += 1 + sovThetest(uint64(l)) + l + } + if len(m.Field6) > 0 { + l = 0 + for _, e := range m.Field6 { + l += sovThetest(uint64(e)) + } + n += 1 + sovThetest(uint64(l)) + l + } + if len(m.Field7) > 0 { + l = 0 + for _, e := range m.Field7 { + l += sozThetest(uint64(e)) + } + n += 1 + sovThetest(uint64(l)) + l + } + if len(m.Field8) > 0 { + l = 0 + for _, e := range m.Field8 { + l += sozThetest(uint64(e)) + } + n += 1 + sovThetest(uint64(l)) + l + } + if len(m.Field9) > 0 { + n += 1 + sovThetest(uint64(len(m.Field9)*4)) + len(m.Field9)*4 + } + if len(m.Field10) > 0 { + n += 1 + sovThetest(uint64(len(m.Field10)*4)) + len(m.Field10)*4 + } + if len(m.Field11) > 0 { + n += 1 + sovThetest(uint64(len(m.Field11)*8)) + len(m.Field11)*8 + } + if len(m.Field12) > 0 { + n += 1 + sovThetest(uint64(len(m.Field12)*8)) + len(m.Field12)*8 + } + if len(m.Field13) > 0 { + n += 1 + sovThetest(uint64(len(m.Field13))) + len(m.Field13)*1 + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NidOptStruct) Size() (n int) { + var l int + _ = l + n += 9 + n += 5 + l = m.Field3.Size() + n += 1 + l + sovThetest(uint64(l)) + l = m.Field4.Size() + n += 1 + l + sovThetest(uint64(l)) + n += 1 + sovThetest(uint64(m.Field6)) + n += 1 + sozThetest(uint64(m.Field7)) + l = m.Field8.Size() + n += 1 + l + sovThetest(uint64(l)) + n += 2 + l = len(m.Field14) + n += 1 + l + sovThetest(uint64(l)) + if m.Field15 != nil { + l = len(m.Field15) + n += 1 + l + sovThetest(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NinOptStruct) Size() (n int) { + var l int + _ = l + if m.Field1 != nil { + n += 9 + } + if m.Field2 != nil { + n += 5 + } + if m.Field3 != nil { + l = m.Field3.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if m.Field4 != nil { + l = m.Field4.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if m.Field6 != nil { + n += 1 + sovThetest(uint64(*m.Field6)) + } + if m.Field7 != nil { + n += 1 + sozThetest(uint64(*m.Field7)) + } + if m.Field8 != nil { + l = m.Field8.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if m.Field13 != nil { + n += 2 + } + if m.Field14 != nil { + l = len(*m.Field14) + n += 1 + l + sovThetest(uint64(l)) + } + if m.Field15 != nil { + l = len(m.Field15) + n += 1 + l + sovThetest(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NidRepStruct) Size() (n int) { + var l int + _ = l + if len(m.Field1) > 0 { + n += 9 * len(m.Field1) + } + if len(m.Field2) > 0 { + n += 5 * len(m.Field2) + } + if len(m.Field3) > 0 { + for _, e := range m.Field3 { + l = e.Size() + n += 1 + l + sovThetest(uint64(l)) + } + } + if len(m.Field4) > 0 { + for _, e := range m.Field4 { + l = e.Size() + n += 1 + l + sovThetest(uint64(l)) + } + } + if len(m.Field6) > 0 { + for _, e := range m.Field6 { + n += 1 + sovThetest(uint64(e)) + } + } + if len(m.Field7) > 0 { + for _, e := range m.Field7 { + n += 1 + sozThetest(uint64(e)) + } + } + if len(m.Field8) > 0 { + for _, e := range m.Field8 { + l = e.Size() + n += 1 + l + sovThetest(uint64(l)) + } + } + if len(m.Field13) > 0 { + n += 2 * len(m.Field13) + } + if len(m.Field14) > 0 { + for _, s := range m.Field14 { + l = len(s) + n += 1 + l + sovThetest(uint64(l)) + } + } + if len(m.Field15) > 0 { + for _, b := range m.Field15 { + l = len(b) + n += 1 + l + sovThetest(uint64(l)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NinRepStruct) Size() (n int) { + var l int + _ = l + if len(m.Field1) > 0 { + n += 9 * len(m.Field1) + } + if len(m.Field2) > 0 { + n += 5 * len(m.Field2) + } + if len(m.Field3) > 0 { + for _, e := range m.Field3 { + l = e.Size() + n += 1 + l + sovThetest(uint64(l)) + } + } + if len(m.Field4) > 0 { + for _, e := range m.Field4 { + l = e.Size() + n += 1 + l + sovThetest(uint64(l)) + } + } + if len(m.Field6) > 0 { + for _, e := range m.Field6 { + n += 1 + sovThetest(uint64(e)) + } + } + if len(m.Field7) > 0 { + for _, e := range m.Field7 { + n += 1 + sozThetest(uint64(e)) + } + } + if len(m.Field8) > 0 { + for _, e := range m.Field8 { + l = e.Size() + n += 1 + l + sovThetest(uint64(l)) + } + } + if len(m.Field13) > 0 { + n += 2 * len(m.Field13) + } + if len(m.Field14) > 0 { + for _, s := range m.Field14 { + l = len(s) + n += 1 + l + sovThetest(uint64(l)) + } + } + if len(m.Field15) > 0 { + for _, b := range m.Field15 { + l = len(b) + n += 1 + l + sovThetest(uint64(l)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NidEmbeddedStruct) Size() (n int) { + var l int + _ = l + if m.NidOptNative != nil { + l = m.NidOptNative.Size() + n += 1 + l + sovThetest(uint64(l)) + } + l = m.Field200.Size() + n += 2 + l + sovThetest(uint64(l)) + n += 3 + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NinEmbeddedStruct) Size() (n int) { + var l int + _ = l + if m.NidOptNative != nil { + l = m.NidOptNative.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if m.Field200 != nil { + l = m.Field200.Size() + n += 2 + l + sovThetest(uint64(l)) + } + if m.Field210 != nil { + n += 3 + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NidNestedStruct) Size() (n int) { + var l int + _ = l + l = m.Field1.Size() + n += 1 + l + sovThetest(uint64(l)) + if len(m.Field2) > 0 { + for _, e := range m.Field2 { + l = e.Size() + n += 1 + l + sovThetest(uint64(l)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NinNestedStruct) Size() (n int) { + var l int + _ = l + if m.Field1 != nil { + l = m.Field1.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if len(m.Field2) > 0 { + for _, e := range m.Field2 { + l = e.Size() + n += 1 + l + sovThetest(uint64(l)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NidOptCustom) Size() (n int) { + var l int + _ = l + l = m.Id.Size() + n += 1 + l + sovThetest(uint64(l)) + l = m.Value.Size() + n += 1 + l + sovThetest(uint64(l)) + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *CustomDash) Size() (n int) { + var l int + _ = l + if m.Value != nil { + l = m.Value.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NinOptCustom) Size() (n int) { + var l int + _ = l + if m.Id != nil { + l = m.Id.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if m.Value != nil { + l = m.Value.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NidRepCustom) Size() (n int) { + var l int + _ = l + if len(m.Id) > 0 { + for _, e := range m.Id { + l = e.Size() + n += 1 + l + sovThetest(uint64(l)) + } + } + if len(m.Value) > 0 { + for _, e := range m.Value { + l = e.Size() + n += 1 + l + sovThetest(uint64(l)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NinRepCustom) Size() (n int) { + var l int + _ = l + if len(m.Id) > 0 { + for _, e := range m.Id { + l = e.Size() + n += 1 + l + sovThetest(uint64(l)) + } + } + if len(m.Value) > 0 { + for _, e := range m.Value { + l = e.Size() + n += 1 + l + sovThetest(uint64(l)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NinOptNativeUnion) Size() (n int) { + var l int + _ = l + if m.Field1 != nil { + n += 9 + } + if m.Field2 != nil { + n += 5 + } + if m.Field3 != nil { + n += 1 + sovThetest(uint64(*m.Field3)) + } + if m.Field4 != nil { + n += 1 + sovThetest(uint64(*m.Field4)) + } + if m.Field5 != nil { + n += 1 + sovThetest(uint64(*m.Field5)) + } + if m.Field6 != nil { + n += 1 + sovThetest(uint64(*m.Field6)) + } + if m.Field13 != nil { + n += 2 + } + if m.Field14 != nil { + l = len(*m.Field14) + n += 1 + l + sovThetest(uint64(l)) + } + if m.Field15 != nil { + l = len(m.Field15) + n += 1 + l + sovThetest(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NinOptStructUnion) Size() (n int) { + var l int + _ = l + if m.Field1 != nil { + n += 9 + } + if m.Field2 != nil { + n += 5 + } + if m.Field3 != nil { + l = m.Field3.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if m.Field4 != nil { + l = m.Field4.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if m.Field6 != nil { + n += 1 + sovThetest(uint64(*m.Field6)) + } + if m.Field7 != nil { + n += 1 + sozThetest(uint64(*m.Field7)) + } + if m.Field13 != nil { + n += 2 + } + if m.Field14 != nil { + l = len(*m.Field14) + n += 1 + l + sovThetest(uint64(l)) + } + if m.Field15 != nil { + l = len(m.Field15) + n += 1 + l + sovThetest(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NinEmbeddedStructUnion) Size() (n int) { + var l int + _ = l + if m.NidOptNative != nil { + l = m.NidOptNative.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if m.Field200 != nil { + l = m.Field200.Size() + n += 2 + l + sovThetest(uint64(l)) + } + if m.Field210 != nil { + n += 3 + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NinNestedStructUnion) Size() (n int) { + var l int + _ = l + if m.Field1 != nil { + l = m.Field1.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if m.Field2 != nil { + l = m.Field2.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if m.Field3 != nil { + l = m.Field3.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *Tree) Size() (n int) { + var l int + _ = l + if m.Or != nil { + l = m.Or.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if m.And != nil { + l = m.And.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if m.Leaf != nil { + l = m.Leaf.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *OrBranch) Size() (n int) { + var l int + _ = l + l = m.Left.Size() + n += 1 + l + sovThetest(uint64(l)) + l = m.Right.Size() + n += 1 + l + sovThetest(uint64(l)) + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *AndBranch) Size() (n int) { + var l int + _ = l + l = m.Left.Size() + n += 1 + l + sovThetest(uint64(l)) + l = m.Right.Size() + n += 1 + l + sovThetest(uint64(l)) + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *Leaf) Size() (n int) { + var l int + _ = l + n += 1 + sovThetest(uint64(m.Value)) + l = len(m.StrValue) + n += 1 + l + sovThetest(uint64(l)) + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *DeepTree) Size() (n int) { + var l int + _ = l + if m.Down != nil { + l = m.Down.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if m.And != nil { + l = m.And.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if m.Leaf != nil { + l = m.Leaf.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *ADeepBranch) Size() (n int) { + var l int + _ = l + l = m.Down.Size() + n += 1 + l + sovThetest(uint64(l)) + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *AndDeepBranch) Size() (n int) { + var l int + _ = l + l = m.Left.Size() + n += 1 + l + sovThetest(uint64(l)) + l = m.Right.Size() + n += 1 + l + sovThetest(uint64(l)) + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *DeepLeaf) Size() (n int) { + var l int + _ = l + l = m.Tree.Size() + n += 1 + l + sovThetest(uint64(l)) + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *Nil) Size() (n int) { + var l int + _ = l + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NidOptEnum) Size() (n int) { + var l int + _ = l + n += 1 + sovThetest(uint64(m.Field1)) + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NinOptEnum) Size() (n int) { + var l int + _ = l + if m.Field1 != nil { + n += 1 + sovThetest(uint64(*m.Field1)) + } + if m.Field2 != nil { + n += 1 + sovThetest(uint64(*m.Field2)) + } + if m.Field3 != nil { + n += 1 + sovThetest(uint64(*m.Field3)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NidRepEnum) Size() (n int) { + var l int + _ = l + if len(m.Field1) > 0 { + for _, e := range m.Field1 { + n += 1 + sovThetest(uint64(e)) + } + } + if len(m.Field2) > 0 { + for _, e := range m.Field2 { + n += 1 + sovThetest(uint64(e)) + } + } + if len(m.Field3) > 0 { + for _, e := range m.Field3 { + n += 1 + sovThetest(uint64(e)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NinRepEnum) Size() (n int) { + var l int + _ = l + if len(m.Field1) > 0 { + for _, e := range m.Field1 { + n += 1 + sovThetest(uint64(e)) + } + } + if len(m.Field2) > 0 { + for _, e := range m.Field2 { + n += 1 + sovThetest(uint64(e)) + } + } + if len(m.Field3) > 0 { + for _, e := range m.Field3 { + n += 1 + sovThetest(uint64(e)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NinOptEnumDefault) Size() (n int) { + var l int + _ = l + if m.Field1 != nil { + n += 1 + sovThetest(uint64(*m.Field1)) + } + if m.Field2 != nil { + n += 1 + sovThetest(uint64(*m.Field2)) + } + if m.Field3 != nil { + n += 1 + sovThetest(uint64(*m.Field3)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *AnotherNinOptEnum) Size() (n int) { + var l int + _ = l + if m.Field1 != nil { + n += 1 + sovThetest(uint64(*m.Field1)) + } + if m.Field2 != nil { + n += 1 + sovThetest(uint64(*m.Field2)) + } + if m.Field3 != nil { + n += 1 + sovThetest(uint64(*m.Field3)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *AnotherNinOptEnumDefault) Size() (n int) { + var l int + _ = l + if m.Field1 != nil { + n += 1 + sovThetest(uint64(*m.Field1)) + } + if m.Field2 != nil { + n += 1 + sovThetest(uint64(*m.Field2)) + } + if m.Field3 != nil { + n += 1 + sovThetest(uint64(*m.Field3)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *Timer) Size() (n int) { + var l int + _ = l + n += 9 + n += 9 + if m.Data != nil { + l = len(m.Data) + n += 1 + l + sovThetest(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *MyExtendable) Size() (n int) { + var l int + _ = l + if m.Field1 != nil { + n += 1 + sovThetest(uint64(*m.Field1)) + } + if m.XXX_extensions != nil { + n += github_com_gogo_protobuf_proto.SizeOfExtensionMap(m.XXX_extensions) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *OtherExtenable) Size() (n int) { + var l int + _ = l + if m.M != nil { + l = m.M.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if m.Field2 != nil { + n += 1 + sovThetest(uint64(*m.Field2)) + } + if m.Field13 != nil { + n += 1 + sovThetest(uint64(*m.Field13)) + } + if m.XXX_extensions != nil { + n += github_com_gogo_protobuf_proto.SizeOfExtensionMap(m.XXX_extensions) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NestedDefinition) Size() (n int) { + var l int + _ = l + if m.Field1 != nil { + n += 1 + sovThetest(uint64(*m.Field1)) + } + if m.EnumField != nil { + n += 1 + sovThetest(uint64(*m.EnumField)) + } + if m.NNM != nil { + l = m.NNM.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if m.NM != nil { + l = m.NM.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NestedDefinition_NestedMessage) Size() (n int) { + var l int + _ = l + if m.NestedField1 != nil { + n += 9 + } + if m.NNM != nil { + l = m.NNM.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NestedDefinition_NestedMessage_NestedNestedMsg) Size() (n int) { + var l int + _ = l + if m.NestedNestedField1 != nil { + l = len(*m.NestedNestedField1) + n += 1 + l + sovThetest(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NestedScope) Size() (n int) { + var l int + _ = l + if m.A != nil { + l = m.A.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if m.B != nil { + n += 1 + sovThetest(uint64(*m.B)) + } + if m.C != nil { + l = m.C.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NinOptNativeDefault) Size() (n int) { + var l int + _ = l + if m.Field1 != nil { + n += 9 + } + if m.Field2 != nil { + n += 5 + } + if m.Field3 != nil { + n += 1 + sovThetest(uint64(*m.Field3)) + } + if m.Field4 != nil { + n += 1 + sovThetest(uint64(*m.Field4)) + } + if m.Field5 != nil { + n += 1 + sovThetest(uint64(*m.Field5)) + } + if m.Field6 != nil { + n += 1 + sovThetest(uint64(*m.Field6)) + } + if m.Field7 != nil { + n += 1 + sozThetest(uint64(*m.Field7)) + } + if m.Field8 != nil { + n += 1 + sozThetest(uint64(*m.Field8)) + } + if m.Field9 != nil { + n += 5 + } + if m.Field10 != nil { + n += 5 + } + if m.Field11 != nil { + n += 9 + } + if m.Field12 != nil { + n += 9 + } + if m.Field13 != nil { + n += 2 + } + if m.Field14 != nil { + l = len(*m.Field14) + n += 1 + l + sovThetest(uint64(l)) + } + if m.Field15 != nil { + l = len(m.Field15) + n += 1 + l + sovThetest(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *CustomContainer) Size() (n int) { + var l int + _ = l + l = m.CustomStruct.Size() + n += 1 + l + sovThetest(uint64(l)) + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *CustomNameNidOptNative) Size() (n int) { + var l int + _ = l + n += 9 + n += 5 + n += 1 + sovThetest(uint64(m.FieldC)) + n += 1 + sovThetest(uint64(m.FieldD)) + n += 1 + sovThetest(uint64(m.FieldE)) + n += 1 + sovThetest(uint64(m.FieldF)) + n += 1 + sozThetest(uint64(m.FieldG)) + n += 1 + sozThetest(uint64(m.FieldH)) + n += 5 + n += 5 + n += 9 + n += 9 + n += 2 + l = len(m.FieldN) + n += 1 + l + sovThetest(uint64(l)) + if m.FieldO != nil { + l = len(m.FieldO) + n += 1 + l + sovThetest(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *CustomNameNinOptNative) Size() (n int) { + var l int + _ = l + if m.FieldA != nil { + n += 9 + } + if m.FieldB != nil { + n += 5 + } + if m.FieldC != nil { + n += 1 + sovThetest(uint64(*m.FieldC)) + } + if m.FieldD != nil { + n += 1 + sovThetest(uint64(*m.FieldD)) + } + if m.FieldE != nil { + n += 1 + sovThetest(uint64(*m.FieldE)) + } + if m.FieldF != nil { + n += 1 + sovThetest(uint64(*m.FieldF)) + } + if m.FieldG != nil { + n += 1 + sozThetest(uint64(*m.FieldG)) + } + if m.FieldH != nil { + n += 1 + sozThetest(uint64(*m.FieldH)) + } + if m.FieldI != nil { + n += 5 + } + if m.FieldJ != nil { + n += 5 + } + if m.FieldK != nil { + n += 9 + } + if m.FielL != nil { + n += 9 + } + if m.FieldM != nil { + n += 2 + } + if m.FieldN != nil { + l = len(*m.FieldN) + n += 1 + l + sovThetest(uint64(l)) + } + if m.FieldO != nil { + l = len(m.FieldO) + n += 1 + l + sovThetest(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *CustomNameNinRepNative) Size() (n int) { + var l int + _ = l + if len(m.FieldA) > 0 { + n += 9 * len(m.FieldA) + } + if len(m.FieldB) > 0 { + n += 5 * len(m.FieldB) + } + if len(m.FieldC) > 0 { + for _, e := range m.FieldC { + n += 1 + sovThetest(uint64(e)) + } + } + if len(m.FieldD) > 0 { + for _, e := range m.FieldD { + n += 1 + sovThetest(uint64(e)) + } + } + if len(m.FieldE) > 0 { + for _, e := range m.FieldE { + n += 1 + sovThetest(uint64(e)) + } + } + if len(m.FieldF) > 0 { + for _, e := range m.FieldF { + n += 1 + sovThetest(uint64(e)) + } + } + if len(m.FieldG) > 0 { + for _, e := range m.FieldG { + n += 1 + sozThetest(uint64(e)) + } + } + if len(m.FieldH) > 0 { + for _, e := range m.FieldH { + n += 1 + sozThetest(uint64(e)) + } + } + if len(m.FieldI) > 0 { + n += 5 * len(m.FieldI) + } + if len(m.FieldJ) > 0 { + n += 5 * len(m.FieldJ) + } + if len(m.FieldK) > 0 { + n += 9 * len(m.FieldK) + } + if len(m.FieldL) > 0 { + n += 9 * len(m.FieldL) + } + if len(m.FieldM) > 0 { + n += 2 * len(m.FieldM) + } + if len(m.FieldN) > 0 { + for _, s := range m.FieldN { + l = len(s) + n += 1 + l + sovThetest(uint64(l)) + } + } + if len(m.FieldO) > 0 { + for _, b := range m.FieldO { + l = len(b) + n += 1 + l + sovThetest(uint64(l)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *CustomNameNinStruct) Size() (n int) { + var l int + _ = l + if m.FieldA != nil { + n += 9 + } + if m.FieldB != nil { + n += 5 + } + if m.FieldC != nil { + l = m.FieldC.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if len(m.FieldD) > 0 { + for _, e := range m.FieldD { + l = e.Size() + n += 1 + l + sovThetest(uint64(l)) + } + } + if m.FieldE != nil { + n += 1 + sovThetest(uint64(*m.FieldE)) + } + if m.FieldF != nil { + n += 1 + sozThetest(uint64(*m.FieldF)) + } + if m.FieldG != nil { + l = m.FieldG.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if m.FieldH != nil { + n += 2 + } + if m.FieldI != nil { + l = len(*m.FieldI) + n += 1 + l + sovThetest(uint64(l)) + } + if m.FieldJ != nil { + l = len(m.FieldJ) + n += 1 + l + sovThetest(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *CustomNameCustomType) Size() (n int) { + var l int + _ = l + if m.FieldA != nil { + l = m.FieldA.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if m.FieldB != nil { + l = m.FieldB.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if len(m.FieldC) > 0 { + for _, e := range m.FieldC { + l = e.Size() + n += 1 + l + sovThetest(uint64(l)) + } + } + if len(m.FieldD) > 0 { + for _, e := range m.FieldD { + l = e.Size() + n += 1 + l + sovThetest(uint64(l)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *CustomNameNinEmbeddedStructUnion) Size() (n int) { + var l int + _ = l + if m.NidOptNative != nil { + l = m.NidOptNative.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if m.FieldA != nil { + l = m.FieldA.Size() + n += 2 + l + sovThetest(uint64(l)) + } + if m.FieldB != nil { + n += 3 + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *CustomNameEnum) Size() (n int) { + var l int + _ = l + if m.FieldA != nil { + n += 1 + sovThetest(uint64(*m.FieldA)) + } + if len(m.FieldB) > 0 { + for _, e := range m.FieldB { + n += 1 + sovThetest(uint64(e)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NoExtensionsMap) Size() (n int) { + var l int + _ = l + if m.Field1 != nil { + n += 1 + sovThetest(uint64(*m.Field1)) + } + if m.XXX_extensions != nil { + n += len(m.XXX_extensions) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *Unrecognized) Size() (n int) { + var l int + _ = l + if m.Field1 != nil { + l = len(*m.Field1) + n += 1 + l + sovThetest(uint64(l)) + } + return n +} + +func (m *UnrecognizedWithInner) Size() (n int) { + var l int + _ = l + if len(m.Embedded) > 0 { + for _, e := range m.Embedded { + l = e.Size() + n += 1 + l + sovThetest(uint64(l)) + } + } + if m.Field2 != nil { + l = len(*m.Field2) + n += 1 + l + sovThetest(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *UnrecognizedWithInner_Inner) Size() (n int) { + var l int + _ = l + if m.Field1 != nil { + n += 1 + sovThetest(uint64(*m.Field1)) + } + return n +} + +func (m *UnrecognizedWithEmbed) Size() (n int) { + var l int + _ = l + l = m.UnrecognizedWithEmbed_Embedded.Size() + n += 1 + l + sovThetest(uint64(l)) + if m.Field2 != nil { + l = len(*m.Field2) + n += 1 + l + sovThetest(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *UnrecognizedWithEmbed_Embedded) Size() (n int) { + var l int + _ = l + if m.Field1 != nil { + n += 1 + sovThetest(uint64(*m.Field1)) + } + return n +} + +func (m *Node) Size() (n int) { + var l int + _ = l + if m.Label != nil { + l = len(*m.Label) + n += 1 + l + sovThetest(uint64(l)) + } + if len(m.Children) > 0 { + for _, e := range m.Children { + l = e.Size() + n += 1 + l + sovThetest(uint64(l)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func sovThetest(x uint64) (n int) { + for { + n++ + x >>= 7 + if x == 0 { + break + } + } + return n +} +func sozThetest(x uint64) (n int) { + return sovThetest(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (this *NidOptNative) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NidOptNative{`, + `Field1:` + fmt.Sprintf("%v", this.Field1) + `,`, + `Field2:` + fmt.Sprintf("%v", this.Field2) + `,`, + `Field3:` + fmt.Sprintf("%v", this.Field3) + `,`, + `Field4:` + fmt.Sprintf("%v", this.Field4) + `,`, + `Field5:` + fmt.Sprintf("%v", this.Field5) + `,`, + `Field6:` + fmt.Sprintf("%v", this.Field6) + `,`, + `Field7:` + fmt.Sprintf("%v", this.Field7) + `,`, + `Field8:` + fmt.Sprintf("%v", this.Field8) + `,`, + `Field9:` + fmt.Sprintf("%v", this.Field9) + `,`, + `Field10:` + fmt.Sprintf("%v", this.Field10) + `,`, + `Field11:` + fmt.Sprintf("%v", this.Field11) + `,`, + `Field12:` + fmt.Sprintf("%v", this.Field12) + `,`, + `Field13:` + fmt.Sprintf("%v", this.Field13) + `,`, + `Field14:` + fmt.Sprintf("%v", this.Field14) + `,`, + `Field15:` + fmt.Sprintf("%v", this.Field15) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NinOptNative) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NinOptNative{`, + `Field1:` + valueToStringThetest(this.Field1) + `,`, + `Field2:` + valueToStringThetest(this.Field2) + `,`, + `Field3:` + valueToStringThetest(this.Field3) + `,`, + `Field4:` + valueToStringThetest(this.Field4) + `,`, + `Field5:` + valueToStringThetest(this.Field5) + `,`, + `Field6:` + valueToStringThetest(this.Field6) + `,`, + `Field7:` + valueToStringThetest(this.Field7) + `,`, + `Field8:` + valueToStringThetest(this.Field8) + `,`, + `Field9:` + valueToStringThetest(this.Field9) + `,`, + `Field10:` + valueToStringThetest(this.Field10) + `,`, + `Field11:` + valueToStringThetest(this.Field11) + `,`, + `Field12:` + valueToStringThetest(this.Field12) + `,`, + `Field13:` + valueToStringThetest(this.Field13) + `,`, + `Field14:` + valueToStringThetest(this.Field14) + `,`, + `Field15:` + valueToStringThetest(this.Field15) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NidRepNative) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NidRepNative{`, + `Field1:` + fmt.Sprintf("%v", this.Field1) + `,`, + `Field2:` + fmt.Sprintf("%v", this.Field2) + `,`, + `Field3:` + fmt.Sprintf("%v", this.Field3) + `,`, + `Field4:` + fmt.Sprintf("%v", this.Field4) + `,`, + `Field5:` + fmt.Sprintf("%v", this.Field5) + `,`, + `Field6:` + fmt.Sprintf("%v", this.Field6) + `,`, + `Field7:` + fmt.Sprintf("%v", this.Field7) + `,`, + `Field8:` + fmt.Sprintf("%v", this.Field8) + `,`, + `Field9:` + fmt.Sprintf("%v", this.Field9) + `,`, + `Field10:` + fmt.Sprintf("%v", this.Field10) + `,`, + `Field11:` + fmt.Sprintf("%v", this.Field11) + `,`, + `Field12:` + fmt.Sprintf("%v", this.Field12) + `,`, + `Field13:` + fmt.Sprintf("%v", this.Field13) + `,`, + `Field14:` + fmt.Sprintf("%v", this.Field14) + `,`, + `Field15:` + fmt.Sprintf("%v", this.Field15) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NinRepNative) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NinRepNative{`, + `Field1:` + fmt.Sprintf("%v", this.Field1) + `,`, + `Field2:` + fmt.Sprintf("%v", this.Field2) + `,`, + `Field3:` + fmt.Sprintf("%v", this.Field3) + `,`, + `Field4:` + fmt.Sprintf("%v", this.Field4) + `,`, + `Field5:` + fmt.Sprintf("%v", this.Field5) + `,`, + `Field6:` + fmt.Sprintf("%v", this.Field6) + `,`, + `Field7:` + fmt.Sprintf("%v", this.Field7) + `,`, + `Field8:` + fmt.Sprintf("%v", this.Field8) + `,`, + `Field9:` + fmt.Sprintf("%v", this.Field9) + `,`, + `Field10:` + fmt.Sprintf("%v", this.Field10) + `,`, + `Field11:` + fmt.Sprintf("%v", this.Field11) + `,`, + `Field12:` + fmt.Sprintf("%v", this.Field12) + `,`, + `Field13:` + fmt.Sprintf("%v", this.Field13) + `,`, + `Field14:` + fmt.Sprintf("%v", this.Field14) + `,`, + `Field15:` + fmt.Sprintf("%v", this.Field15) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NidRepPackedNative) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NidRepPackedNative{`, + `Field1:` + fmt.Sprintf("%v", this.Field1) + `,`, + `Field2:` + fmt.Sprintf("%v", this.Field2) + `,`, + `Field3:` + fmt.Sprintf("%v", this.Field3) + `,`, + `Field4:` + fmt.Sprintf("%v", this.Field4) + `,`, + `Field5:` + fmt.Sprintf("%v", this.Field5) + `,`, + `Field6:` + fmt.Sprintf("%v", this.Field6) + `,`, + `Field7:` + fmt.Sprintf("%v", this.Field7) + `,`, + `Field8:` + fmt.Sprintf("%v", this.Field8) + `,`, + `Field9:` + fmt.Sprintf("%v", this.Field9) + `,`, + `Field10:` + fmt.Sprintf("%v", this.Field10) + `,`, + `Field11:` + fmt.Sprintf("%v", this.Field11) + `,`, + `Field12:` + fmt.Sprintf("%v", this.Field12) + `,`, + `Field13:` + fmt.Sprintf("%v", this.Field13) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NinRepPackedNative) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NinRepPackedNative{`, + `Field1:` + fmt.Sprintf("%v", this.Field1) + `,`, + `Field2:` + fmt.Sprintf("%v", this.Field2) + `,`, + `Field3:` + fmt.Sprintf("%v", this.Field3) + `,`, + `Field4:` + fmt.Sprintf("%v", this.Field4) + `,`, + `Field5:` + fmt.Sprintf("%v", this.Field5) + `,`, + `Field6:` + fmt.Sprintf("%v", this.Field6) + `,`, + `Field7:` + fmt.Sprintf("%v", this.Field7) + `,`, + `Field8:` + fmt.Sprintf("%v", this.Field8) + `,`, + `Field9:` + fmt.Sprintf("%v", this.Field9) + `,`, + `Field10:` + fmt.Sprintf("%v", this.Field10) + `,`, + `Field11:` + fmt.Sprintf("%v", this.Field11) + `,`, + `Field12:` + fmt.Sprintf("%v", this.Field12) + `,`, + `Field13:` + fmt.Sprintf("%v", this.Field13) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NidOptStruct) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NidOptStruct{`, + `Field1:` + fmt.Sprintf("%v", this.Field1) + `,`, + `Field2:` + fmt.Sprintf("%v", this.Field2) + `,`, + `Field3:` + strings.Replace(strings.Replace(this.Field3.String(), "NidOptNative", "NidOptNative", 1), `&`, ``, 1) + `,`, + `Field4:` + strings.Replace(strings.Replace(this.Field4.String(), "NinOptNative", "NinOptNative", 1), `&`, ``, 1) + `,`, + `Field6:` + fmt.Sprintf("%v", this.Field6) + `,`, + `Field7:` + fmt.Sprintf("%v", this.Field7) + `,`, + `Field8:` + strings.Replace(strings.Replace(this.Field8.String(), "NidOptNative", "NidOptNative", 1), `&`, ``, 1) + `,`, + `Field13:` + fmt.Sprintf("%v", this.Field13) + `,`, + `Field14:` + fmt.Sprintf("%v", this.Field14) + `,`, + `Field15:` + fmt.Sprintf("%v", this.Field15) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NinOptStruct) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NinOptStruct{`, + `Field1:` + valueToStringThetest(this.Field1) + `,`, + `Field2:` + valueToStringThetest(this.Field2) + `,`, + `Field3:` + strings.Replace(fmt.Sprintf("%v", this.Field3), "NidOptNative", "NidOptNative", 1) + `,`, + `Field4:` + strings.Replace(fmt.Sprintf("%v", this.Field4), "NinOptNative", "NinOptNative", 1) + `,`, + `Field6:` + valueToStringThetest(this.Field6) + `,`, + `Field7:` + valueToStringThetest(this.Field7) + `,`, + `Field8:` + strings.Replace(fmt.Sprintf("%v", this.Field8), "NidOptNative", "NidOptNative", 1) + `,`, + `Field13:` + valueToStringThetest(this.Field13) + `,`, + `Field14:` + valueToStringThetest(this.Field14) + `,`, + `Field15:` + valueToStringThetest(this.Field15) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NidRepStruct) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NidRepStruct{`, + `Field1:` + fmt.Sprintf("%v", this.Field1) + `,`, + `Field2:` + fmt.Sprintf("%v", this.Field2) + `,`, + `Field3:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Field3), "NidOptNative", "NidOptNative", 1), `&`, ``, 1) + `,`, + `Field4:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Field4), "NinOptNative", "NinOptNative", 1), `&`, ``, 1) + `,`, + `Field6:` + fmt.Sprintf("%v", this.Field6) + `,`, + `Field7:` + fmt.Sprintf("%v", this.Field7) + `,`, + `Field8:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Field8), "NidOptNative", "NidOptNative", 1), `&`, ``, 1) + `,`, + `Field13:` + fmt.Sprintf("%v", this.Field13) + `,`, + `Field14:` + fmt.Sprintf("%v", this.Field14) + `,`, + `Field15:` + fmt.Sprintf("%v", this.Field15) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NinRepStruct) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NinRepStruct{`, + `Field1:` + fmt.Sprintf("%v", this.Field1) + `,`, + `Field2:` + fmt.Sprintf("%v", this.Field2) + `,`, + `Field3:` + strings.Replace(fmt.Sprintf("%v", this.Field3), "NidOptNative", "NidOptNative", 1) + `,`, + `Field4:` + strings.Replace(fmt.Sprintf("%v", this.Field4), "NinOptNative", "NinOptNative", 1) + `,`, + `Field6:` + fmt.Sprintf("%v", this.Field6) + `,`, + `Field7:` + fmt.Sprintf("%v", this.Field7) + `,`, + `Field8:` + strings.Replace(fmt.Sprintf("%v", this.Field8), "NidOptNative", "NidOptNative", 1) + `,`, + `Field13:` + fmt.Sprintf("%v", this.Field13) + `,`, + `Field14:` + fmt.Sprintf("%v", this.Field14) + `,`, + `Field15:` + fmt.Sprintf("%v", this.Field15) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NidEmbeddedStruct) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NidEmbeddedStruct{`, + `NidOptNative:` + strings.Replace(fmt.Sprintf("%v", this.NidOptNative), "NidOptNative", "NidOptNative", 1) + `,`, + `Field200:` + strings.Replace(strings.Replace(this.Field200.String(), "NidOptNative", "NidOptNative", 1), `&`, ``, 1) + `,`, + `Field210:` + fmt.Sprintf("%v", this.Field210) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NinEmbeddedStruct) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NinEmbeddedStruct{`, + `NidOptNative:` + strings.Replace(fmt.Sprintf("%v", this.NidOptNative), "NidOptNative", "NidOptNative", 1) + `,`, + `Field200:` + strings.Replace(fmt.Sprintf("%v", this.Field200), "NidOptNative", "NidOptNative", 1) + `,`, + `Field210:` + valueToStringThetest(this.Field210) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NidNestedStruct) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NidNestedStruct{`, + `Field1:` + strings.Replace(strings.Replace(this.Field1.String(), "NidOptStruct", "NidOptStruct", 1), `&`, ``, 1) + `,`, + `Field2:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Field2), "NidRepStruct", "NidRepStruct", 1), `&`, ``, 1) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NinNestedStruct) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NinNestedStruct{`, + `Field1:` + strings.Replace(fmt.Sprintf("%v", this.Field1), "NinOptStruct", "NinOptStruct", 1) + `,`, + `Field2:` + strings.Replace(fmt.Sprintf("%v", this.Field2), "NinRepStruct", "NinRepStruct", 1) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NidOptCustom) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NidOptCustom{`, + `Id:` + fmt.Sprintf("%v", this.Id) + `,`, + `Value:` + fmt.Sprintf("%v", this.Value) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *CustomDash) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&CustomDash{`, + `Value:` + valueToStringThetest(this.Value) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NinOptCustom) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NinOptCustom{`, + `Id:` + valueToStringThetest(this.Id) + `,`, + `Value:` + valueToStringThetest(this.Value) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NidRepCustom) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NidRepCustom{`, + `Id:` + fmt.Sprintf("%v", this.Id) + `,`, + `Value:` + fmt.Sprintf("%v", this.Value) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NinRepCustom) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NinRepCustom{`, + `Id:` + fmt.Sprintf("%v", this.Id) + `,`, + `Value:` + fmt.Sprintf("%v", this.Value) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NinOptNativeUnion) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NinOptNativeUnion{`, + `Field1:` + valueToStringThetest(this.Field1) + `,`, + `Field2:` + valueToStringThetest(this.Field2) + `,`, + `Field3:` + valueToStringThetest(this.Field3) + `,`, + `Field4:` + valueToStringThetest(this.Field4) + `,`, + `Field5:` + valueToStringThetest(this.Field5) + `,`, + `Field6:` + valueToStringThetest(this.Field6) + `,`, + `Field13:` + valueToStringThetest(this.Field13) + `,`, + `Field14:` + valueToStringThetest(this.Field14) + `,`, + `Field15:` + valueToStringThetest(this.Field15) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NinOptStructUnion) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NinOptStructUnion{`, + `Field1:` + valueToStringThetest(this.Field1) + `,`, + `Field2:` + valueToStringThetest(this.Field2) + `,`, + `Field3:` + strings.Replace(fmt.Sprintf("%v", this.Field3), "NidOptNative", "NidOptNative", 1) + `,`, + `Field4:` + strings.Replace(fmt.Sprintf("%v", this.Field4), "NinOptNative", "NinOptNative", 1) + `,`, + `Field6:` + valueToStringThetest(this.Field6) + `,`, + `Field7:` + valueToStringThetest(this.Field7) + `,`, + `Field13:` + valueToStringThetest(this.Field13) + `,`, + `Field14:` + valueToStringThetest(this.Field14) + `,`, + `Field15:` + valueToStringThetest(this.Field15) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NinEmbeddedStructUnion) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NinEmbeddedStructUnion{`, + `NidOptNative:` + strings.Replace(fmt.Sprintf("%v", this.NidOptNative), "NidOptNative", "NidOptNative", 1) + `,`, + `Field200:` + strings.Replace(fmt.Sprintf("%v", this.Field200), "NinOptNative", "NinOptNative", 1) + `,`, + `Field210:` + valueToStringThetest(this.Field210) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NinNestedStructUnion) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NinNestedStructUnion{`, + `Field1:` + strings.Replace(fmt.Sprintf("%v", this.Field1), "NinOptNativeUnion", "NinOptNativeUnion", 1) + `,`, + `Field2:` + strings.Replace(fmt.Sprintf("%v", this.Field2), "NinOptStructUnion", "NinOptStructUnion", 1) + `,`, + `Field3:` + strings.Replace(fmt.Sprintf("%v", this.Field3), "NinEmbeddedStructUnion", "NinEmbeddedStructUnion", 1) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *Tree) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&Tree{`, + `Or:` + strings.Replace(fmt.Sprintf("%v", this.Or), "OrBranch", "OrBranch", 1) + `,`, + `And:` + strings.Replace(fmt.Sprintf("%v", this.And), "AndBranch", "AndBranch", 1) + `,`, + `Leaf:` + strings.Replace(fmt.Sprintf("%v", this.Leaf), "Leaf", "Leaf", 1) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *OrBranch) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&OrBranch{`, + `Left:` + strings.Replace(strings.Replace(this.Left.String(), "Tree", "Tree", 1), `&`, ``, 1) + `,`, + `Right:` + strings.Replace(strings.Replace(this.Right.String(), "Tree", "Tree", 1), `&`, ``, 1) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *AndBranch) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&AndBranch{`, + `Left:` + strings.Replace(strings.Replace(this.Left.String(), "Tree", "Tree", 1), `&`, ``, 1) + `,`, + `Right:` + strings.Replace(strings.Replace(this.Right.String(), "Tree", "Tree", 1), `&`, ``, 1) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *Leaf) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&Leaf{`, + `Value:` + fmt.Sprintf("%v", this.Value) + `,`, + `StrValue:` + fmt.Sprintf("%v", this.StrValue) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *DeepTree) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&DeepTree{`, + `Down:` + strings.Replace(fmt.Sprintf("%v", this.Down), "ADeepBranch", "ADeepBranch", 1) + `,`, + `And:` + strings.Replace(fmt.Sprintf("%v", this.And), "AndDeepBranch", "AndDeepBranch", 1) + `,`, + `Leaf:` + strings.Replace(fmt.Sprintf("%v", this.Leaf), "DeepLeaf", "DeepLeaf", 1) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *ADeepBranch) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&ADeepBranch{`, + `Down:` + strings.Replace(strings.Replace(this.Down.String(), "DeepTree", "DeepTree", 1), `&`, ``, 1) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *AndDeepBranch) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&AndDeepBranch{`, + `Left:` + strings.Replace(strings.Replace(this.Left.String(), "DeepTree", "DeepTree", 1), `&`, ``, 1) + `,`, + `Right:` + strings.Replace(strings.Replace(this.Right.String(), "DeepTree", "DeepTree", 1), `&`, ``, 1) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *DeepLeaf) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&DeepLeaf{`, + `Tree:` + strings.Replace(strings.Replace(this.Tree.String(), "Tree", "Tree", 1), `&`, ``, 1) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *Nil) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&Nil{`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NidOptEnum) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NidOptEnum{`, + `Field1:` + fmt.Sprintf("%v", this.Field1) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NinOptEnum) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NinOptEnum{`, + `Field1:` + valueToStringThetest(this.Field1) + `,`, + `Field2:` + valueToStringThetest(this.Field2) + `,`, + `Field3:` + valueToStringThetest(this.Field3) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NidRepEnum) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NidRepEnum{`, + `Field1:` + fmt.Sprintf("%v", this.Field1) + `,`, + `Field2:` + fmt.Sprintf("%v", this.Field2) + `,`, + `Field3:` + fmt.Sprintf("%v", this.Field3) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NinRepEnum) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NinRepEnum{`, + `Field1:` + fmt.Sprintf("%v", this.Field1) + `,`, + `Field2:` + fmt.Sprintf("%v", this.Field2) + `,`, + `Field3:` + fmt.Sprintf("%v", this.Field3) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NinOptEnumDefault) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NinOptEnumDefault{`, + `Field1:` + valueToStringThetest(this.Field1) + `,`, + `Field2:` + valueToStringThetest(this.Field2) + `,`, + `Field3:` + valueToStringThetest(this.Field3) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *AnotherNinOptEnum) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&AnotherNinOptEnum{`, + `Field1:` + valueToStringThetest(this.Field1) + `,`, + `Field2:` + valueToStringThetest(this.Field2) + `,`, + `Field3:` + valueToStringThetest(this.Field3) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *AnotherNinOptEnumDefault) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&AnotherNinOptEnumDefault{`, + `Field1:` + valueToStringThetest(this.Field1) + `,`, + `Field2:` + valueToStringThetest(this.Field2) + `,`, + `Field3:` + valueToStringThetest(this.Field3) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *Timer) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&Timer{`, + `Time1:` + fmt.Sprintf("%v", this.Time1) + `,`, + `Time2:` + fmt.Sprintf("%v", this.Time2) + `,`, + `Data:` + fmt.Sprintf("%v", this.Data) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *MyExtendable) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&MyExtendable{`, + `Field1:` + valueToStringThetest(this.Field1) + `,`, + `XXX_extensions:` + proto.StringFromExtensionsMap(this.XXX_extensions) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *OtherExtenable) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&OtherExtenable{`, + `M:` + strings.Replace(fmt.Sprintf("%v", this.M), "MyExtendable", "MyExtendable", 1) + `,`, + `Field2:` + valueToStringThetest(this.Field2) + `,`, + `Field13:` + valueToStringThetest(this.Field13) + `,`, + `XXX_extensions:` + proto.StringFromExtensionsMap(this.XXX_extensions) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NestedDefinition) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NestedDefinition{`, + `Field1:` + valueToStringThetest(this.Field1) + `,`, + `EnumField:` + valueToStringThetest(this.EnumField) + `,`, + `NNM:` + strings.Replace(fmt.Sprintf("%v", this.NNM), "NestedDefinition_NestedMessage_NestedNestedMsg", "NestedDefinition_NestedMessage_NestedNestedMsg", 1) + `,`, + `NM:` + strings.Replace(fmt.Sprintf("%v", this.NM), "NestedDefinition_NestedMessage", "NestedDefinition_NestedMessage", 1) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NestedDefinition_NestedMessage) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NestedDefinition_NestedMessage{`, + `NestedField1:` + valueToStringThetest(this.NestedField1) + `,`, + `NNM:` + strings.Replace(fmt.Sprintf("%v", this.NNM), "NestedDefinition_NestedMessage_NestedNestedMsg", "NestedDefinition_NestedMessage_NestedNestedMsg", 1) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NestedDefinition_NestedMessage_NestedNestedMsg) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NestedDefinition_NestedMessage_NestedNestedMsg{`, + `NestedNestedField1:` + valueToStringThetest(this.NestedNestedField1) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NestedScope) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NestedScope{`, + `A:` + strings.Replace(fmt.Sprintf("%v", this.A), "NestedDefinition_NestedMessage_NestedNestedMsg", "NestedDefinition_NestedMessage_NestedNestedMsg", 1) + `,`, + `B:` + valueToStringThetest(this.B) + `,`, + `C:` + strings.Replace(fmt.Sprintf("%v", this.C), "NestedDefinition_NestedMessage", "NestedDefinition_NestedMessage", 1) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NinOptNativeDefault) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NinOptNativeDefault{`, + `Field1:` + valueToStringThetest(this.Field1) + `,`, + `Field2:` + valueToStringThetest(this.Field2) + `,`, + `Field3:` + valueToStringThetest(this.Field3) + `,`, + `Field4:` + valueToStringThetest(this.Field4) + `,`, + `Field5:` + valueToStringThetest(this.Field5) + `,`, + `Field6:` + valueToStringThetest(this.Field6) + `,`, + `Field7:` + valueToStringThetest(this.Field7) + `,`, + `Field8:` + valueToStringThetest(this.Field8) + `,`, + `Field9:` + valueToStringThetest(this.Field9) + `,`, + `Field10:` + valueToStringThetest(this.Field10) + `,`, + `Field11:` + valueToStringThetest(this.Field11) + `,`, + `Field12:` + valueToStringThetest(this.Field12) + `,`, + `Field13:` + valueToStringThetest(this.Field13) + `,`, + `Field14:` + valueToStringThetest(this.Field14) + `,`, + `Field15:` + valueToStringThetest(this.Field15) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *CustomContainer) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&CustomContainer{`, + `CustomStruct:` + strings.Replace(strings.Replace(this.CustomStruct.String(), "NidOptCustom", "NidOptCustom", 1), `&`, ``, 1) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *CustomNameNidOptNative) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&CustomNameNidOptNative{`, + `FieldA:` + fmt.Sprintf("%v", this.FieldA) + `,`, + `FieldB:` + fmt.Sprintf("%v", this.FieldB) + `,`, + `FieldC:` + fmt.Sprintf("%v", this.FieldC) + `,`, + `FieldD:` + fmt.Sprintf("%v", this.FieldD) + `,`, + `FieldE:` + fmt.Sprintf("%v", this.FieldE) + `,`, + `FieldF:` + fmt.Sprintf("%v", this.FieldF) + `,`, + `FieldG:` + fmt.Sprintf("%v", this.FieldG) + `,`, + `FieldH:` + fmt.Sprintf("%v", this.FieldH) + `,`, + `FieldI:` + fmt.Sprintf("%v", this.FieldI) + `,`, + `FieldJ:` + fmt.Sprintf("%v", this.FieldJ) + `,`, + `FieldK:` + fmt.Sprintf("%v", this.FieldK) + `,`, + `FieldL:` + fmt.Sprintf("%v", this.FieldL) + `,`, + `FieldM:` + fmt.Sprintf("%v", this.FieldM) + `,`, + `FieldN:` + fmt.Sprintf("%v", this.FieldN) + `,`, + `FieldO:` + fmt.Sprintf("%v", this.FieldO) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *CustomNameNinOptNative) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&CustomNameNinOptNative{`, + `FieldA:` + valueToStringThetest(this.FieldA) + `,`, + `FieldB:` + valueToStringThetest(this.FieldB) + `,`, + `FieldC:` + valueToStringThetest(this.FieldC) + `,`, + `FieldD:` + valueToStringThetest(this.FieldD) + `,`, + `FieldE:` + valueToStringThetest(this.FieldE) + `,`, + `FieldF:` + valueToStringThetest(this.FieldF) + `,`, + `FieldG:` + valueToStringThetest(this.FieldG) + `,`, + `FieldH:` + valueToStringThetest(this.FieldH) + `,`, + `FieldI:` + valueToStringThetest(this.FieldI) + `,`, + `FieldJ:` + valueToStringThetest(this.FieldJ) + `,`, + `FieldK:` + valueToStringThetest(this.FieldK) + `,`, + `FielL:` + valueToStringThetest(this.FielL) + `,`, + `FieldM:` + valueToStringThetest(this.FieldM) + `,`, + `FieldN:` + valueToStringThetest(this.FieldN) + `,`, + `FieldO:` + valueToStringThetest(this.FieldO) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *CustomNameNinRepNative) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&CustomNameNinRepNative{`, + `FieldA:` + fmt.Sprintf("%v", this.FieldA) + `,`, + `FieldB:` + fmt.Sprintf("%v", this.FieldB) + `,`, + `FieldC:` + fmt.Sprintf("%v", this.FieldC) + `,`, + `FieldD:` + fmt.Sprintf("%v", this.FieldD) + `,`, + `FieldE:` + fmt.Sprintf("%v", this.FieldE) + `,`, + `FieldF:` + fmt.Sprintf("%v", this.FieldF) + `,`, + `FieldG:` + fmt.Sprintf("%v", this.FieldG) + `,`, + `FieldH:` + fmt.Sprintf("%v", this.FieldH) + `,`, + `FieldI:` + fmt.Sprintf("%v", this.FieldI) + `,`, + `FieldJ:` + fmt.Sprintf("%v", this.FieldJ) + `,`, + `FieldK:` + fmt.Sprintf("%v", this.FieldK) + `,`, + `FieldL:` + fmt.Sprintf("%v", this.FieldL) + `,`, + `FieldM:` + fmt.Sprintf("%v", this.FieldM) + `,`, + `FieldN:` + fmt.Sprintf("%v", this.FieldN) + `,`, + `FieldO:` + fmt.Sprintf("%v", this.FieldO) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *CustomNameNinStruct) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&CustomNameNinStruct{`, + `FieldA:` + valueToStringThetest(this.FieldA) + `,`, + `FieldB:` + valueToStringThetest(this.FieldB) + `,`, + `FieldC:` + strings.Replace(fmt.Sprintf("%v", this.FieldC), "NidOptNative", "NidOptNative", 1) + `,`, + `FieldD:` + strings.Replace(fmt.Sprintf("%v", this.FieldD), "NinOptNative", "NinOptNative", 1) + `,`, + `FieldE:` + valueToStringThetest(this.FieldE) + `,`, + `FieldF:` + valueToStringThetest(this.FieldF) + `,`, + `FieldG:` + strings.Replace(fmt.Sprintf("%v", this.FieldG), "NidOptNative", "NidOptNative", 1) + `,`, + `FieldH:` + valueToStringThetest(this.FieldH) + `,`, + `FieldI:` + valueToStringThetest(this.FieldI) + `,`, + `FieldJ:` + valueToStringThetest(this.FieldJ) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *CustomNameCustomType) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&CustomNameCustomType{`, + `FieldA:` + valueToStringThetest(this.FieldA) + `,`, + `FieldB:` + valueToStringThetest(this.FieldB) + `,`, + `FieldC:` + fmt.Sprintf("%v", this.FieldC) + `,`, + `FieldD:` + fmt.Sprintf("%v", this.FieldD) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *CustomNameNinEmbeddedStructUnion) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&CustomNameNinEmbeddedStructUnion{`, + `NidOptNative:` + strings.Replace(fmt.Sprintf("%v", this.NidOptNative), "NidOptNative", "NidOptNative", 1) + `,`, + `FieldA:` + strings.Replace(fmt.Sprintf("%v", this.FieldA), "NinOptNative", "NinOptNative", 1) + `,`, + `FieldB:` + valueToStringThetest(this.FieldB) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *CustomNameEnum) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&CustomNameEnum{`, + `FieldA:` + valueToStringThetest(this.FieldA) + `,`, + `FieldB:` + fmt.Sprintf("%v", this.FieldB) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NoExtensionsMap) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NoExtensionsMap{`, + `Field1:` + valueToStringThetest(this.Field1) + `,`, + `XXX_extensions:` + proto.StringFromExtensionsBytes(this.XXX_extensions) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *Unrecognized) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&Unrecognized{`, + `Field1:` + valueToStringThetest(this.Field1) + `,`, + `}`, + }, "") + return s +} +func (this *UnrecognizedWithInner) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&UnrecognizedWithInner{`, + `Embedded:` + strings.Replace(fmt.Sprintf("%v", this.Embedded), "UnrecognizedWithInner_Inner", "UnrecognizedWithInner_Inner", 1) + `,`, + `Field2:` + valueToStringThetest(this.Field2) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *UnrecognizedWithInner_Inner) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&UnrecognizedWithInner_Inner{`, + `Field1:` + valueToStringThetest(this.Field1) + `,`, + `}`, + }, "") + return s +} +func (this *UnrecognizedWithEmbed) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&UnrecognizedWithEmbed{`, + `UnrecognizedWithEmbed_Embedded:` + strings.Replace(strings.Replace(this.UnrecognizedWithEmbed_Embedded.String(), "UnrecognizedWithEmbed_Embedded", "UnrecognizedWithEmbed_Embedded", 1), `&`, ``, 1) + `,`, + `Field2:` + valueToStringThetest(this.Field2) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *UnrecognizedWithEmbed_Embedded) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&UnrecognizedWithEmbed_Embedded{`, + `Field1:` + valueToStringThetest(this.Field1) + `,`, + `}`, + }, "") + return s +} +func (this *Node) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&Node{`, + `Label:` + valueToStringThetest(this.Label) + `,`, + `Children:` + strings.Replace(fmt.Sprintf("%v", this.Children), "Node", "Node", 1) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func valueToStringThetest(v interface{}) string { + rv := reflect.ValueOf(v) + if rv.IsNil() { + return "nil" + } + pv := reflect.Indirect(rv).Interface() + return fmt.Sprintf("*%v", pv) +} +func (this *NinOptNativeUnion) GetValue() interface{} { + if this.Field1 != nil { + return this.Field1 + } + if this.Field2 != nil { + return this.Field2 + } + if this.Field3 != nil { + return this.Field3 + } + if this.Field4 != nil { + return this.Field4 + } + if this.Field5 != nil { + return this.Field5 + } + if this.Field6 != nil { + return this.Field6 + } + if this.Field13 != nil { + return this.Field13 + } + if this.Field14 != nil { + return this.Field14 + } + if this.Field15 != nil { + return this.Field15 + } + return nil +} + +func (this *NinOptNativeUnion) SetValue(value interface{}) bool { + switch vt := value.(type) { + case *float64: + this.Field1 = vt + case *float32: + this.Field2 = vt + case *int32: + this.Field3 = vt + case *int64: + this.Field4 = vt + case *uint32: + this.Field5 = vt + case *uint64: + this.Field6 = vt + case *bool: + this.Field13 = vt + case *string: + this.Field14 = vt + case []byte: + this.Field15 = vt + default: + return false + } + return true +} +func (this *NinOptStructUnion) GetValue() interface{} { + if this.Field1 != nil { + return this.Field1 + } + if this.Field2 != nil { + return this.Field2 + } + if this.Field3 != nil { + return this.Field3 + } + if this.Field4 != nil { + return this.Field4 + } + if this.Field6 != nil { + return this.Field6 + } + if this.Field7 != nil { + return this.Field7 + } + if this.Field13 != nil { + return this.Field13 + } + if this.Field14 != nil { + return this.Field14 + } + if this.Field15 != nil { + return this.Field15 + } + return nil +} + +func (this *NinOptStructUnion) SetValue(value interface{}) bool { + switch vt := value.(type) { + case *float64: + this.Field1 = vt + case *float32: + this.Field2 = vt + case *NidOptNative: + this.Field3 = vt + case *NinOptNative: + this.Field4 = vt + case *uint64: + this.Field6 = vt + case *int32: + this.Field7 = vt + case *bool: + this.Field13 = vt + case *string: + this.Field14 = vt + case []byte: + this.Field15 = vt + default: + return false + } + return true +} +func (this *NinEmbeddedStructUnion) GetValue() interface{} { + if this.NidOptNative != nil { + return this.NidOptNative + } + if this.Field200 != nil { + return this.Field200 + } + if this.Field210 != nil { + return this.Field210 + } + return nil +} + +func (this *NinEmbeddedStructUnion) SetValue(value interface{}) bool { + switch vt := value.(type) { + case *NidOptNative: + this.NidOptNative = vt + case *NinOptNative: + this.Field200 = vt + case *bool: + this.Field210 = vt + default: + return false + } + return true +} +func (this *NinNestedStructUnion) GetValue() interface{} { + if this.Field1 != nil { + return this.Field1 + } + if this.Field2 != nil { + return this.Field2 + } + if this.Field3 != nil { + return this.Field3 + } + return nil +} + +func (this *NinNestedStructUnion) SetValue(value interface{}) bool { + switch vt := value.(type) { + case *NinOptNativeUnion: + this.Field1 = vt + case *NinOptStructUnion: + this.Field2 = vt + case *NinEmbeddedStructUnion: + this.Field3 = vt + default: + this.Field1 = new(NinOptNativeUnion) + if set := this.Field1.SetValue(value); set { + return true + } + this.Field1 = nil + this.Field2 = new(NinOptStructUnion) + if set := this.Field2.SetValue(value); set { + return true + } + this.Field2 = nil + this.Field3 = new(NinEmbeddedStructUnion) + if set := this.Field3.SetValue(value); set { + return true + } + this.Field3 = nil + return false + } + return true +} +func (this *Tree) GetValue() interface{} { + if this.Or != nil { + return this.Or + } + if this.And != nil { + return this.And + } + if this.Leaf != nil { + return this.Leaf + } + return nil +} + +func (this *Tree) SetValue(value interface{}) bool { + switch vt := value.(type) { + case *OrBranch: + this.Or = vt + case *AndBranch: + this.And = vt + case *Leaf: + this.Leaf = vt + default: + return false + } + return true +} +func (this *DeepTree) GetValue() interface{} { + if this.Down != nil { + return this.Down + } + if this.And != nil { + return this.And + } + if this.Leaf != nil { + return this.Leaf + } + return nil +} + +func (this *DeepTree) SetValue(value interface{}) bool { + switch vt := value.(type) { + case *ADeepBranch: + this.Down = vt + case *AndDeepBranch: + this.And = vt + case *DeepLeaf: + this.Leaf = vt + default: + return false + } + return true +} +func (this *CustomNameNinEmbeddedStructUnion) GetValue() interface{} { + if this.NidOptNative != nil { + return this.NidOptNative + } + if this.FieldA != nil { + return this.FieldA + } + if this.FieldB != nil { + return this.FieldB + } + return nil +} + +func (this *CustomNameNinEmbeddedStructUnion) SetValue(value interface{}) bool { + switch vt := value.(type) { + case *NidOptNative: + this.NidOptNative = vt + case *NinOptNative: + this.FieldA = vt + case *bool: + this.FieldB = vt + default: + return false + } + return true +} +func (m *NidOptNative) 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 ErrIntOverflowThetest + } + 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: NidOptNative: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: NidOptNative: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field Field1", 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.Field1 = float64(math.Float64frombits(v)) + case 2: + if wireType != 5 { + return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType) + } + var v uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + iNdEx += 4 + v = uint32(data[iNdEx-4]) + v |= uint32(data[iNdEx-3]) << 8 + v |= uint32(data[iNdEx-2]) << 16 + v |= uint32(data[iNdEx-1]) << 24 + m.Field2 = float32(math.Float32frombits(v)) + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field3", wireType) + } + m.Field3 = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + m.Field3 |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field4", wireType) + } + m.Field4 = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + m.Field4 |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + case 5: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field5", wireType) + } + m.Field5 = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + m.Field5 |= (uint32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + case 6: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field6", wireType) + } + m.Field6 = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + m.Field6 |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + case 7: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field7", wireType) + } + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + v = int32((uint32(v) >> 1) ^ uint32(((v&1)<<31)>>31)) + m.Field7 = v + case 8: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field8", wireType) + } + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + v = (v >> 1) ^ uint64((int64(v&1)<<63)>>63) + m.Field8 = int64(v) + case 9: + if wireType != 5 { + return fmt.Errorf("proto: wrong wireType = %d for field Field9", wireType) + } + m.Field9 = 0 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + iNdEx += 4 + m.Field9 = uint32(data[iNdEx-4]) + m.Field9 |= uint32(data[iNdEx-3]) << 8 + m.Field9 |= uint32(data[iNdEx-2]) << 16 + m.Field9 |= uint32(data[iNdEx-1]) << 24 + case 10: + if wireType != 5 { + return fmt.Errorf("proto: wrong wireType = %d for field Field10", wireType) + } + m.Field10 = 0 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + iNdEx += 4 + m.Field10 = int32(data[iNdEx-4]) + m.Field10 |= int32(data[iNdEx-3]) << 8 + m.Field10 |= int32(data[iNdEx-2]) << 16 + m.Field10 |= int32(data[iNdEx-1]) << 24 + case 11: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field Field11", wireType) + } + m.Field11 = 0 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + iNdEx += 8 + m.Field11 = uint64(data[iNdEx-8]) + m.Field11 |= uint64(data[iNdEx-7]) << 8 + m.Field11 |= uint64(data[iNdEx-6]) << 16 + m.Field11 |= uint64(data[iNdEx-5]) << 24 + m.Field11 |= uint64(data[iNdEx-4]) << 32 + m.Field11 |= uint64(data[iNdEx-3]) << 40 + m.Field11 |= uint64(data[iNdEx-2]) << 48 + m.Field11 |= uint64(data[iNdEx-1]) << 56 + case 12: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field Field12", wireType) + } + m.Field12 = 0 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + iNdEx += 8 + m.Field12 = int64(data[iNdEx-8]) + m.Field12 |= int64(data[iNdEx-7]) << 8 + m.Field12 |= int64(data[iNdEx-6]) << 16 + m.Field12 |= int64(data[iNdEx-5]) << 24 + m.Field12 |= int64(data[iNdEx-4]) << 32 + m.Field12 |= int64(data[iNdEx-3]) << 40 + m.Field12 |= int64(data[iNdEx-2]) << 48 + m.Field12 |= int64(data[iNdEx-1]) << 56 + case 13: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field13", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field13 = bool(v != 0) + case 14: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field14", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + 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 ErrInvalidLengthThetest + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Field14 = string(data[iNdEx:postIndex]) + iNdEx = postIndex + case 15: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field15", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + byteLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Field15 = append(m.Field15[:0], data[iNdEx:postIndex]...) + if m.Field15 == nil { + m.Field15 = []byte{} + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipThetest(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetest + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *NinOptNative) 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 ErrIntOverflowThetest + } + 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: NinOptNative: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: NinOptNative: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field Field1", 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.Field1 = &v2 + case 2: + if wireType != 5 { + return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType) + } + var v uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + iNdEx += 4 + v = uint32(data[iNdEx-4]) + v |= uint32(data[iNdEx-3]) << 8 + v |= uint32(data[iNdEx-2]) << 16 + v |= uint32(data[iNdEx-1]) << 24 + v2 := float32(math.Float32frombits(v)) + m.Field2 = &v2 + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field3", wireType) + } + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field3 = &v + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field4", wireType) + } + var v int64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field4 = &v + case 5: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field5", wireType) + } + var v uint32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (uint32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field5 = &v + case 6: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field6", wireType) + } + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field6 = &v + case 7: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field7", wireType) + } + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + v = int32((uint32(v) >> 1) ^ uint32(((v&1)<<31)>>31)) + m.Field7 = &v + case 8: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field8", wireType) + } + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + v = (v >> 1) ^ uint64((int64(v&1)<<63)>>63) + v2 := int64(v) + m.Field8 = &v2 + case 9: + if wireType != 5 { + return fmt.Errorf("proto: wrong wireType = %d for field Field9", wireType) + } + var v uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + iNdEx += 4 + v = uint32(data[iNdEx-4]) + v |= uint32(data[iNdEx-3]) << 8 + v |= uint32(data[iNdEx-2]) << 16 + v |= uint32(data[iNdEx-1]) << 24 + m.Field9 = &v + case 10: + if wireType != 5 { + return fmt.Errorf("proto: wrong wireType = %d for field Field10", wireType) + } + var v int32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + iNdEx += 4 + v = int32(data[iNdEx-4]) + v |= int32(data[iNdEx-3]) << 8 + v |= int32(data[iNdEx-2]) << 16 + v |= int32(data[iNdEx-1]) << 24 + m.Field10 = &v + case 11: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field Field11", 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.Field11 = &v + case 12: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field Field12", wireType) + } + var v int64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + iNdEx += 8 + v = int64(data[iNdEx-8]) + v |= int64(data[iNdEx-7]) << 8 + v |= int64(data[iNdEx-6]) << 16 + v |= int64(data[iNdEx-5]) << 24 + v |= int64(data[iNdEx-4]) << 32 + v |= int64(data[iNdEx-3]) << 40 + v |= int64(data[iNdEx-2]) << 48 + v |= int64(data[iNdEx-1]) << 56 + m.Field12 = &v + case 13: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field13", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + b := bool(v != 0) + m.Field13 = &b + case 14: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field14", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + 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 ErrInvalidLengthThetest + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + s := string(data[iNdEx:postIndex]) + m.Field14 = &s + iNdEx = postIndex + case 15: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field15", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + byteLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Field15 = append(m.Field15[:0], data[iNdEx:postIndex]...) + if m.Field15 == nil { + m.Field15 = []byte{} + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipThetest(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetest + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *NidRepNative) 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 ErrIntOverflowThetest + } + 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: NidRepNative: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: NidRepNative: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field Field1", 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.Field1 = append(m.Field1, v2) + case 2: + if wireType != 5 { + return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType) + } + var v uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + iNdEx += 4 + v = uint32(data[iNdEx-4]) + v |= uint32(data[iNdEx-3]) << 8 + v |= uint32(data[iNdEx-2]) << 16 + v |= uint32(data[iNdEx-1]) << 24 + v2 := float32(math.Float32frombits(v)) + m.Field2 = append(m.Field2, v2) + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field3", wireType) + } + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field3 = append(m.Field3, v) + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field4", wireType) + } + var v int64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field4 = append(m.Field4, v) + case 5: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field5", wireType) + } + var v uint32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (uint32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field5 = append(m.Field5, v) + case 6: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field6", wireType) + } + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field6 = append(m.Field6, v) + case 7: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field7", wireType) + } + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + v = int32((uint32(v) >> 1) ^ uint32(((v&1)<<31)>>31)) + m.Field7 = append(m.Field7, v) + case 8: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field8", wireType) + } + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + v = (v >> 1) ^ uint64((int64(v&1)<<63)>>63) + m.Field8 = append(m.Field8, int64(v)) + case 9: + if wireType != 5 { + return fmt.Errorf("proto: wrong wireType = %d for field Field9", wireType) + } + var v uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + iNdEx += 4 + v = uint32(data[iNdEx-4]) + v |= uint32(data[iNdEx-3]) << 8 + v |= uint32(data[iNdEx-2]) << 16 + v |= uint32(data[iNdEx-1]) << 24 + m.Field9 = append(m.Field9, v) + case 10: + if wireType != 5 { + return fmt.Errorf("proto: wrong wireType = %d for field Field10", wireType) + } + var v int32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + iNdEx += 4 + v = int32(data[iNdEx-4]) + v |= int32(data[iNdEx-3]) << 8 + v |= int32(data[iNdEx-2]) << 16 + v |= int32(data[iNdEx-1]) << 24 + m.Field10 = append(m.Field10, v) + case 11: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field Field11", 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.Field11 = append(m.Field11, v) + case 12: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field Field12", wireType) + } + var v int64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + iNdEx += 8 + v = int64(data[iNdEx-8]) + v |= int64(data[iNdEx-7]) << 8 + v |= int64(data[iNdEx-6]) << 16 + v |= int64(data[iNdEx-5]) << 24 + v |= int64(data[iNdEx-4]) << 32 + v |= int64(data[iNdEx-3]) << 40 + v |= int64(data[iNdEx-2]) << 48 + v |= int64(data[iNdEx-1]) << 56 + m.Field12 = append(m.Field12, v) + case 13: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field13", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field13 = append(m.Field13, bool(v != 0)) + case 14: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field14", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + 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 ErrInvalidLengthThetest + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Field14 = append(m.Field14, string(data[iNdEx:postIndex])) + iNdEx = postIndex + case 15: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field15", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + byteLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Field15 = append(m.Field15, make([]byte, postIndex-iNdEx)) + copy(m.Field15[len(m.Field15)-1], data[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipThetest(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetest + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *NinRepNative) 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 ErrIntOverflowThetest + } + 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: NinRepNative: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: NinRepNative: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field Field1", 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.Field1 = append(m.Field1, v2) + case 2: + if wireType != 5 { + return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType) + } + var v uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + iNdEx += 4 + v = uint32(data[iNdEx-4]) + v |= uint32(data[iNdEx-3]) << 8 + v |= uint32(data[iNdEx-2]) << 16 + v |= uint32(data[iNdEx-1]) << 24 + v2 := float32(math.Float32frombits(v)) + m.Field2 = append(m.Field2, v2) + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field3", wireType) + } + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field3 = append(m.Field3, v) + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field4", wireType) + } + var v int64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field4 = append(m.Field4, v) + case 5: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field5", wireType) + } + var v uint32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (uint32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field5 = append(m.Field5, v) + case 6: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field6", wireType) + } + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field6 = append(m.Field6, v) + case 7: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field7", wireType) + } + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + v = int32((uint32(v) >> 1) ^ uint32(((v&1)<<31)>>31)) + m.Field7 = append(m.Field7, v) + case 8: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field8", wireType) + } + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + v = (v >> 1) ^ uint64((int64(v&1)<<63)>>63) + m.Field8 = append(m.Field8, int64(v)) + case 9: + if wireType != 5 { + return fmt.Errorf("proto: wrong wireType = %d for field Field9", wireType) + } + var v uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + iNdEx += 4 + v = uint32(data[iNdEx-4]) + v |= uint32(data[iNdEx-3]) << 8 + v |= uint32(data[iNdEx-2]) << 16 + v |= uint32(data[iNdEx-1]) << 24 + m.Field9 = append(m.Field9, v) + case 10: + if wireType != 5 { + return fmt.Errorf("proto: wrong wireType = %d for field Field10", wireType) + } + var v int32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + iNdEx += 4 + v = int32(data[iNdEx-4]) + v |= int32(data[iNdEx-3]) << 8 + v |= int32(data[iNdEx-2]) << 16 + v |= int32(data[iNdEx-1]) << 24 + m.Field10 = append(m.Field10, v) + case 11: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field Field11", 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.Field11 = append(m.Field11, v) + case 12: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field Field12", wireType) + } + var v int64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + iNdEx += 8 + v = int64(data[iNdEx-8]) + v |= int64(data[iNdEx-7]) << 8 + v |= int64(data[iNdEx-6]) << 16 + v |= int64(data[iNdEx-5]) << 24 + v |= int64(data[iNdEx-4]) << 32 + v |= int64(data[iNdEx-3]) << 40 + v |= int64(data[iNdEx-2]) << 48 + v |= int64(data[iNdEx-1]) << 56 + m.Field12 = append(m.Field12, v) + case 13: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field13", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field13 = append(m.Field13, bool(v != 0)) + case 14: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field14", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + 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 ErrInvalidLengthThetest + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Field14 = append(m.Field14, string(data[iNdEx:postIndex])) + iNdEx = postIndex + case 15: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field15", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + byteLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Field15 = append(m.Field15, make([]byte, postIndex-iNdEx)) + copy(m.Field15[len(m.Field15)-1], data[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipThetest(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetest + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *NidRepPackedNative) 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 ErrIntOverflowThetest + } + 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: NidRepPackedNative: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: NidRepPackedNative: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + for iNdEx < postIndex { + 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.Field1 = append(m.Field1, v2) + } + } else if wireType == 1 { + 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.Field1 = append(m.Field1, v2) + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) + } + case 2: + if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + for iNdEx < postIndex { + var v uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + iNdEx += 4 + v = uint32(data[iNdEx-4]) + v |= uint32(data[iNdEx-3]) << 8 + v |= uint32(data[iNdEx-2]) << 16 + v |= uint32(data[iNdEx-1]) << 24 + v2 := float32(math.Float32frombits(v)) + m.Field2 = append(m.Field2, v2) + } + } else if wireType == 5 { + var v uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + iNdEx += 4 + v = uint32(data[iNdEx-4]) + v |= uint32(data[iNdEx-3]) << 8 + v |= uint32(data[iNdEx-2]) << 16 + v |= uint32(data[iNdEx-1]) << 24 + v2 := float32(math.Float32frombits(v)) + m.Field2 = append(m.Field2, v2) + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType) + } + case 3: + if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + for iNdEx < postIndex { + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field3 = append(m.Field3, v) + } + } else if wireType == 0 { + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field3 = append(m.Field3, v) + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field3", wireType) + } + case 4: + if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + for iNdEx < postIndex { + var v int64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field4 = append(m.Field4, v) + } + } else if wireType == 0 { + var v int64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field4 = append(m.Field4, v) + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field4", wireType) + } + case 5: + if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthThetest + } + 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 ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (uint32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field5 = append(m.Field5, v) + } + } else if wireType == 0 { + var v uint32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (uint32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field5 = append(m.Field5, v) + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field5", wireType) + } + case 6: + if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + for iNdEx < postIndex { + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field6 = append(m.Field6, v) + } + } else if wireType == 0 { + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field6 = append(m.Field6, v) + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field6", wireType) + } + case 7: + if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + for iNdEx < postIndex { + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + v = int32((uint32(v) >> 1) ^ uint32(((v&1)<<31)>>31)) + m.Field7 = append(m.Field7, v) + } + } else if wireType == 0 { + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + v = int32((uint32(v) >> 1) ^ uint32(((v&1)<<31)>>31)) + m.Field7 = append(m.Field7, v) + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field7", wireType) + } + case 8: + if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + for iNdEx < postIndex { + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + v = (v >> 1) ^ uint64((int64(v&1)<<63)>>63) + m.Field8 = append(m.Field8, int64(v)) + } + } else if wireType == 0 { + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + v = (v >> 1) ^ uint64((int64(v&1)<<63)>>63) + m.Field8 = append(m.Field8, int64(v)) + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field8", wireType) + } + case 9: + if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + for iNdEx < postIndex { + var v uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + iNdEx += 4 + v = uint32(data[iNdEx-4]) + v |= uint32(data[iNdEx-3]) << 8 + v |= uint32(data[iNdEx-2]) << 16 + v |= uint32(data[iNdEx-1]) << 24 + m.Field9 = append(m.Field9, v) + } + } else if wireType == 5 { + var v uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + iNdEx += 4 + v = uint32(data[iNdEx-4]) + v |= uint32(data[iNdEx-3]) << 8 + v |= uint32(data[iNdEx-2]) << 16 + v |= uint32(data[iNdEx-1]) << 24 + m.Field9 = append(m.Field9, v) + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field9", wireType) + } + case 10: + if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + for iNdEx < postIndex { + var v int32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + iNdEx += 4 + v = int32(data[iNdEx-4]) + v |= int32(data[iNdEx-3]) << 8 + v |= int32(data[iNdEx-2]) << 16 + v |= int32(data[iNdEx-1]) << 24 + m.Field10 = append(m.Field10, v) + } + } else if wireType == 5 { + var v int32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + iNdEx += 4 + v = int32(data[iNdEx-4]) + v |= int32(data[iNdEx-3]) << 8 + v |= int32(data[iNdEx-2]) << 16 + v |= int32(data[iNdEx-1]) << 24 + m.Field10 = append(m.Field10, v) + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field10", wireType) + } + case 11: + if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + for iNdEx < postIndex { + 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.Field11 = append(m.Field11, v) + } + } else if wireType == 1 { + 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.Field11 = append(m.Field11, v) + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field11", wireType) + } + case 12: + if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + for iNdEx < postIndex { + var v int64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + iNdEx += 8 + v = int64(data[iNdEx-8]) + v |= int64(data[iNdEx-7]) << 8 + v |= int64(data[iNdEx-6]) << 16 + v |= int64(data[iNdEx-5]) << 24 + v |= int64(data[iNdEx-4]) << 32 + v |= int64(data[iNdEx-3]) << 40 + v |= int64(data[iNdEx-2]) << 48 + v |= int64(data[iNdEx-1]) << 56 + m.Field12 = append(m.Field12, v) + } + } else if wireType == 1 { + var v int64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + iNdEx += 8 + v = int64(data[iNdEx-8]) + v |= int64(data[iNdEx-7]) << 8 + v |= int64(data[iNdEx-6]) << 16 + v |= int64(data[iNdEx-5]) << 24 + v |= int64(data[iNdEx-4]) << 32 + v |= int64(data[iNdEx-3]) << 40 + v |= int64(data[iNdEx-2]) << 48 + v |= int64(data[iNdEx-1]) << 56 + m.Field12 = append(m.Field12, v) + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field12", wireType) + } + case 13: + if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + for iNdEx < postIndex { + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field13 = append(m.Field13, bool(v != 0)) + } + } else if wireType == 0 { + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field13 = append(m.Field13, bool(v != 0)) + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field13", wireType) + } + default: + iNdEx = preIndex + skippy, err := skipThetest(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetest + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *NinRepPackedNative) 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 ErrIntOverflowThetest + } + 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: NinRepPackedNative: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: NinRepPackedNative: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + for iNdEx < postIndex { + 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.Field1 = append(m.Field1, v2) + } + } else if wireType == 1 { + 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.Field1 = append(m.Field1, v2) + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) + } + case 2: + if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + for iNdEx < postIndex { + var v uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + iNdEx += 4 + v = uint32(data[iNdEx-4]) + v |= uint32(data[iNdEx-3]) << 8 + v |= uint32(data[iNdEx-2]) << 16 + v |= uint32(data[iNdEx-1]) << 24 + v2 := float32(math.Float32frombits(v)) + m.Field2 = append(m.Field2, v2) + } + } else if wireType == 5 { + var v uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + iNdEx += 4 + v = uint32(data[iNdEx-4]) + v |= uint32(data[iNdEx-3]) << 8 + v |= uint32(data[iNdEx-2]) << 16 + v |= uint32(data[iNdEx-1]) << 24 + v2 := float32(math.Float32frombits(v)) + m.Field2 = append(m.Field2, v2) + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType) + } + case 3: + if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + for iNdEx < postIndex { + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field3 = append(m.Field3, v) + } + } else if wireType == 0 { + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field3 = append(m.Field3, v) + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field3", wireType) + } + case 4: + if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + for iNdEx < postIndex { + var v int64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field4 = append(m.Field4, v) + } + } else if wireType == 0 { + var v int64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field4 = append(m.Field4, v) + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field4", wireType) + } + case 5: + if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthThetest + } + 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 ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (uint32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field5 = append(m.Field5, v) + } + } else if wireType == 0 { + var v uint32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (uint32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field5 = append(m.Field5, v) + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field5", wireType) + } + case 6: + if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + for iNdEx < postIndex { + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field6 = append(m.Field6, v) + } + } else if wireType == 0 { + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field6 = append(m.Field6, v) + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field6", wireType) + } + case 7: + if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + for iNdEx < postIndex { + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + v = int32((uint32(v) >> 1) ^ uint32(((v&1)<<31)>>31)) + m.Field7 = append(m.Field7, v) + } + } else if wireType == 0 { + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + v = int32((uint32(v) >> 1) ^ uint32(((v&1)<<31)>>31)) + m.Field7 = append(m.Field7, v) + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field7", wireType) + } + case 8: + if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + for iNdEx < postIndex { + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + v = (v >> 1) ^ uint64((int64(v&1)<<63)>>63) + m.Field8 = append(m.Field8, int64(v)) + } + } else if wireType == 0 { + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + v = (v >> 1) ^ uint64((int64(v&1)<<63)>>63) + m.Field8 = append(m.Field8, int64(v)) + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field8", wireType) + } + case 9: + if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + for iNdEx < postIndex { + var v uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + iNdEx += 4 + v = uint32(data[iNdEx-4]) + v |= uint32(data[iNdEx-3]) << 8 + v |= uint32(data[iNdEx-2]) << 16 + v |= uint32(data[iNdEx-1]) << 24 + m.Field9 = append(m.Field9, v) + } + } else if wireType == 5 { + var v uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + iNdEx += 4 + v = uint32(data[iNdEx-4]) + v |= uint32(data[iNdEx-3]) << 8 + v |= uint32(data[iNdEx-2]) << 16 + v |= uint32(data[iNdEx-1]) << 24 + m.Field9 = append(m.Field9, v) + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field9", wireType) + } + case 10: + if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + for iNdEx < postIndex { + var v int32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + iNdEx += 4 + v = int32(data[iNdEx-4]) + v |= int32(data[iNdEx-3]) << 8 + v |= int32(data[iNdEx-2]) << 16 + v |= int32(data[iNdEx-1]) << 24 + m.Field10 = append(m.Field10, v) + } + } else if wireType == 5 { + var v int32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + iNdEx += 4 + v = int32(data[iNdEx-4]) + v |= int32(data[iNdEx-3]) << 8 + v |= int32(data[iNdEx-2]) << 16 + v |= int32(data[iNdEx-1]) << 24 + m.Field10 = append(m.Field10, v) + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field10", wireType) + } + case 11: + if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + for iNdEx < postIndex { + 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.Field11 = append(m.Field11, v) + } + } else if wireType == 1 { + 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.Field11 = append(m.Field11, v) + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field11", wireType) + } + case 12: + if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + for iNdEx < postIndex { + var v int64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + iNdEx += 8 + v = int64(data[iNdEx-8]) + v |= int64(data[iNdEx-7]) << 8 + v |= int64(data[iNdEx-6]) << 16 + v |= int64(data[iNdEx-5]) << 24 + v |= int64(data[iNdEx-4]) << 32 + v |= int64(data[iNdEx-3]) << 40 + v |= int64(data[iNdEx-2]) << 48 + v |= int64(data[iNdEx-1]) << 56 + m.Field12 = append(m.Field12, v) + } + } else if wireType == 1 { + var v int64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + iNdEx += 8 + v = int64(data[iNdEx-8]) + v |= int64(data[iNdEx-7]) << 8 + v |= int64(data[iNdEx-6]) << 16 + v |= int64(data[iNdEx-5]) << 24 + v |= int64(data[iNdEx-4]) << 32 + v |= int64(data[iNdEx-3]) << 40 + v |= int64(data[iNdEx-2]) << 48 + v |= int64(data[iNdEx-1]) << 56 + m.Field12 = append(m.Field12, v) + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field12", wireType) + } + case 13: + if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + for iNdEx < postIndex { + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field13 = append(m.Field13, bool(v != 0)) + } + } else if wireType == 0 { + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field13 = append(m.Field13, bool(v != 0)) + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field13", wireType) + } + default: + iNdEx = preIndex + skippy, err := skipThetest(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetest + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *NidOptStruct) 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 ErrIntOverflowThetest + } + 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: NidOptStruct: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: NidOptStruct: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field Field1", 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.Field1 = float64(math.Float64frombits(v)) + case 2: + if wireType != 5 { + return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType) + } + var v uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + iNdEx += 4 + v = uint32(data[iNdEx-4]) + v |= uint32(data[iNdEx-3]) << 8 + v |= uint32(data[iNdEx-2]) << 16 + v |= uint32(data[iNdEx-1]) << 24 + m.Field2 = float32(math.Float32frombits(v)) + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field3", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Field3.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field4", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Field4.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 6: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field6", wireType) + } + m.Field6 = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + m.Field6 |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + case 7: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field7", wireType) + } + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + v = int32((uint32(v) >> 1) ^ uint32(((v&1)<<31)>>31)) + m.Field7 = v + case 8: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field8", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Field8.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 13: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field13", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field13 = bool(v != 0) + case 14: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field14", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + 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 ErrInvalidLengthThetest + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Field14 = string(data[iNdEx:postIndex]) + iNdEx = postIndex + case 15: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field15", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + byteLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Field15 = append(m.Field15[:0], data[iNdEx:postIndex]...) + if m.Field15 == nil { + m.Field15 = []byte{} + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipThetest(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetest + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *NinOptStruct) 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 ErrIntOverflowThetest + } + 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: NinOptStruct: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: NinOptStruct: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field Field1", 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.Field1 = &v2 + case 2: + if wireType != 5 { + return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType) + } + var v uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + iNdEx += 4 + v = uint32(data[iNdEx-4]) + v |= uint32(data[iNdEx-3]) << 8 + v |= uint32(data[iNdEx-2]) << 16 + v |= uint32(data[iNdEx-1]) << 24 + v2 := float32(math.Float32frombits(v)) + m.Field2 = &v2 + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field3", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Field3 == nil { + m.Field3 = &NidOptNative{} + } + if err := m.Field3.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field4", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Field4 == nil { + m.Field4 = &NinOptNative{} + } + if err := m.Field4.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 6: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field6", wireType) + } + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field6 = &v + case 7: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field7", wireType) + } + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + v = int32((uint32(v) >> 1) ^ uint32(((v&1)<<31)>>31)) + m.Field7 = &v + case 8: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field8", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Field8 == nil { + m.Field8 = &NidOptNative{} + } + if err := m.Field8.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 13: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field13", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + b := bool(v != 0) + m.Field13 = &b + case 14: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field14", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + 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 ErrInvalidLengthThetest + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + s := string(data[iNdEx:postIndex]) + m.Field14 = &s + iNdEx = postIndex + case 15: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field15", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + byteLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Field15 = append(m.Field15[:0], data[iNdEx:postIndex]...) + if m.Field15 == nil { + m.Field15 = []byte{} + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipThetest(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetest + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *NidRepStruct) 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 ErrIntOverflowThetest + } + 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: NidRepStruct: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: NidRepStruct: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field Field1", 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.Field1 = append(m.Field1, v2) + case 2: + if wireType != 5 { + return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType) + } + var v uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + iNdEx += 4 + v = uint32(data[iNdEx-4]) + v |= uint32(data[iNdEx-3]) << 8 + v |= uint32(data[iNdEx-2]) << 16 + v |= uint32(data[iNdEx-1]) << 24 + v2 := float32(math.Float32frombits(v)) + m.Field2 = append(m.Field2, v2) + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field3", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Field3 = append(m.Field3, NidOptNative{}) + if err := m.Field3[len(m.Field3)-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 Field4", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Field4 = append(m.Field4, NinOptNative{}) + if err := m.Field4[len(m.Field4)-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 Field6", wireType) + } + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field6 = append(m.Field6, v) + case 7: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field7", wireType) + } + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + v = int32((uint32(v) >> 1) ^ uint32(((v&1)<<31)>>31)) + m.Field7 = append(m.Field7, v) + case 8: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field8", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Field8 = append(m.Field8, NidOptNative{}) + if err := m.Field8[len(m.Field8)-1].Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 13: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field13", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field13 = append(m.Field13, bool(v != 0)) + case 14: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field14", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + 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 ErrInvalidLengthThetest + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Field14 = append(m.Field14, string(data[iNdEx:postIndex])) + iNdEx = postIndex + case 15: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field15", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + byteLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Field15 = append(m.Field15, make([]byte, postIndex-iNdEx)) + copy(m.Field15[len(m.Field15)-1], data[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipThetest(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetest + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *NinRepStruct) 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 ErrIntOverflowThetest + } + 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: NinRepStruct: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: NinRepStruct: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field Field1", 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.Field1 = append(m.Field1, v2) + case 2: + if wireType != 5 { + return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType) + } + var v uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + iNdEx += 4 + v = uint32(data[iNdEx-4]) + v |= uint32(data[iNdEx-3]) << 8 + v |= uint32(data[iNdEx-2]) << 16 + v |= uint32(data[iNdEx-1]) << 24 + v2 := float32(math.Float32frombits(v)) + m.Field2 = append(m.Field2, v2) + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field3", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Field3 = append(m.Field3, &NidOptNative{}) + if err := m.Field3[len(m.Field3)-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 Field4", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Field4 = append(m.Field4, &NinOptNative{}) + if err := m.Field4[len(m.Field4)-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 Field6", wireType) + } + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field6 = append(m.Field6, v) + case 7: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field7", wireType) + } + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + v = int32((uint32(v) >> 1) ^ uint32(((v&1)<<31)>>31)) + m.Field7 = append(m.Field7, v) + case 8: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field8", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Field8 = append(m.Field8, &NidOptNative{}) + if err := m.Field8[len(m.Field8)-1].Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 13: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field13", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field13 = append(m.Field13, bool(v != 0)) + case 14: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field14", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + 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 ErrInvalidLengthThetest + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Field14 = append(m.Field14, string(data[iNdEx:postIndex])) + iNdEx = postIndex + case 15: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field15", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + byteLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Field15 = append(m.Field15, make([]byte, postIndex-iNdEx)) + copy(m.Field15[len(m.Field15)-1], data[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipThetest(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetest + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *NidEmbeddedStruct) 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 ErrIntOverflowThetest + } + 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: NidEmbeddedStruct: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: NidEmbeddedStruct: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NidOptNative", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.NidOptNative == nil { + m.NidOptNative = &NidOptNative{} + } + if err := m.NidOptNative.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 200: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field200", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Field200.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 210: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field210", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field210 = bool(v != 0) + default: + iNdEx = preIndex + skippy, err := skipThetest(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetest + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *NinEmbeddedStruct) 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 ErrIntOverflowThetest + } + 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: NinEmbeddedStruct: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: NinEmbeddedStruct: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NidOptNative", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.NidOptNative == nil { + m.NidOptNative = &NidOptNative{} + } + if err := m.NidOptNative.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 200: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field200", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Field200 == nil { + m.Field200 = &NidOptNative{} + } + if err := m.Field200.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 210: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field210", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + b := bool(v != 0) + m.Field210 = &b + default: + iNdEx = preIndex + skippy, err := skipThetest(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetest + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *NidNestedStruct) 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 ErrIntOverflowThetest + } + 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: NidNestedStruct: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: NidNestedStruct: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Field1.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Field2 = append(m.Field2, NidRepStruct{}) + if err := m.Field2[len(m.Field2)-1].Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipThetest(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetest + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *NinNestedStruct) 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 ErrIntOverflowThetest + } + 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: NinNestedStruct: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: NinNestedStruct: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Field1 == nil { + m.Field1 = &NinOptStruct{} + } + if err := m.Field1.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Field2 = append(m.Field2, &NinRepStruct{}) + if err := m.Field2[len(m.Field2)-1].Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipThetest(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetest + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *NidOptCustom) 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 ErrIntOverflowThetest + } + 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: NidOptCustom: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: NidOptCustom: 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 byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + byteLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + 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 Value", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + byteLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Value.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipThetest(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetest + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *CustomDash) 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 ErrIntOverflowThetest + } + 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: CustomDash: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: CustomDash: 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 ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + byteLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var v github_com_gogo_protobuf_test_custom_dash_type.Bytes + m.Value = &v + if err := m.Value.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipThetest(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetest + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *NinOptCustom) 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 ErrIntOverflowThetest + } + 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: NinOptCustom: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: NinOptCustom: 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 byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + byteLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var v Uuid + m.Id = &v + 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 Value", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + byteLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var v github_com_gogo_protobuf_test_custom.Uint128 + m.Value = &v + if err := m.Value.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipThetest(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetest + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *NidRepCustom) 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 ErrIntOverflowThetest + } + 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: NidRepCustom: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: NidRepCustom: 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 byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + byteLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var v Uuid + m.Id = append(m.Id, v) + if err := m.Id[len(m.Id)-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 Value", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + byteLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var v github_com_gogo_protobuf_test_custom.Uint128 + m.Value = append(m.Value, v) + if err := m.Value[len(m.Value)-1].Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipThetest(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetest + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *NinRepCustom) 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 ErrIntOverflowThetest + } + 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: NinRepCustom: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: NinRepCustom: 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 byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + byteLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var v Uuid + m.Id = append(m.Id, v) + if err := m.Id[len(m.Id)-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 Value", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + byteLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var v github_com_gogo_protobuf_test_custom.Uint128 + m.Value = append(m.Value, v) + if err := m.Value[len(m.Value)-1].Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipThetest(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetest + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *NinOptNativeUnion) 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 ErrIntOverflowThetest + } + 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: NinOptNativeUnion: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: NinOptNativeUnion: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field Field1", 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.Field1 = &v2 + case 2: + if wireType != 5 { + return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType) + } + var v uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + iNdEx += 4 + v = uint32(data[iNdEx-4]) + v |= uint32(data[iNdEx-3]) << 8 + v |= uint32(data[iNdEx-2]) << 16 + v |= uint32(data[iNdEx-1]) << 24 + v2 := float32(math.Float32frombits(v)) + m.Field2 = &v2 + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field3", wireType) + } + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field3 = &v + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field4", wireType) + } + var v int64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field4 = &v + case 5: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field5", wireType) + } + var v uint32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (uint32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field5 = &v + case 6: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field6", wireType) + } + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field6 = &v + case 13: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field13", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + b := bool(v != 0) + m.Field13 = &b + case 14: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field14", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + 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 ErrInvalidLengthThetest + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + s := string(data[iNdEx:postIndex]) + m.Field14 = &s + iNdEx = postIndex + case 15: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field15", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + byteLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Field15 = append(m.Field15[:0], data[iNdEx:postIndex]...) + if m.Field15 == nil { + m.Field15 = []byte{} + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipThetest(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetest + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *NinOptStructUnion) 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 ErrIntOverflowThetest + } + 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: NinOptStructUnion: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: NinOptStructUnion: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field Field1", 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.Field1 = &v2 + case 2: + if wireType != 5 { + return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType) + } + var v uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + iNdEx += 4 + v = uint32(data[iNdEx-4]) + v |= uint32(data[iNdEx-3]) << 8 + v |= uint32(data[iNdEx-2]) << 16 + v |= uint32(data[iNdEx-1]) << 24 + v2 := float32(math.Float32frombits(v)) + m.Field2 = &v2 + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field3", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Field3 == nil { + m.Field3 = &NidOptNative{} + } + if err := m.Field3.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field4", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Field4 == nil { + m.Field4 = &NinOptNative{} + } + if err := m.Field4.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 6: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field6", wireType) + } + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field6 = &v + case 7: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field7", wireType) + } + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + v = int32((uint32(v) >> 1) ^ uint32(((v&1)<<31)>>31)) + m.Field7 = &v + case 13: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field13", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + b := bool(v != 0) + m.Field13 = &b + case 14: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field14", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + 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 ErrInvalidLengthThetest + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + s := string(data[iNdEx:postIndex]) + m.Field14 = &s + iNdEx = postIndex + case 15: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field15", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + byteLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Field15 = append(m.Field15[:0], data[iNdEx:postIndex]...) + if m.Field15 == nil { + m.Field15 = []byte{} + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipThetest(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetest + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *NinEmbeddedStructUnion) 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 ErrIntOverflowThetest + } + 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: NinEmbeddedStructUnion: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: NinEmbeddedStructUnion: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NidOptNative", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.NidOptNative == nil { + m.NidOptNative = &NidOptNative{} + } + if err := m.NidOptNative.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 200: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field200", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Field200 == nil { + m.Field200 = &NinOptNative{} + } + if err := m.Field200.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 210: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field210", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + b := bool(v != 0) + m.Field210 = &b + default: + iNdEx = preIndex + skippy, err := skipThetest(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetest + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *NinNestedStructUnion) 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 ErrIntOverflowThetest + } + 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: NinNestedStructUnion: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: NinNestedStructUnion: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Field1 == nil { + m.Field1 = &NinOptNativeUnion{} + } + if err := m.Field1.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Field2 == nil { + m.Field2 = &NinOptStructUnion{} + } + if err := m.Field2.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field3", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Field3 == nil { + m.Field3 = &NinEmbeddedStructUnion{} + } + if err := m.Field3.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipThetest(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetest + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Tree) 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 ErrIntOverflowThetest + } + 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: Tree: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Tree: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Or", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Or == nil { + m.Or = &OrBranch{} + } + if err := m.Or.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field And", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.And == nil { + m.And = &AndBranch{} + } + if err := m.And.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Leaf", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Leaf == nil { + m.Leaf = &Leaf{} + } + if err := m.Leaf.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipThetest(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetest + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *OrBranch) 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 ErrIntOverflowThetest + } + 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: OrBranch: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: OrBranch: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Left", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Left.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Right", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Right.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipThetest(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetest + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *AndBranch) 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 ErrIntOverflowThetest + } + 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: AndBranch: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: AndBranch: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Left", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Left.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Right", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Right.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipThetest(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetest + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Leaf) 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 ErrIntOverflowThetest + } + 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: Leaf: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Leaf: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType) + } + m.Value = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + m.Value |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field StrValue", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + 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 ErrInvalidLengthThetest + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.StrValue = string(data[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipThetest(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetest + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *DeepTree) 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 ErrIntOverflowThetest + } + 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: DeepTree: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: DeepTree: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Down", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Down == nil { + m.Down = &ADeepBranch{} + } + if err := m.Down.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field And", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.And == nil { + m.And = &AndDeepBranch{} + } + if err := m.And.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Leaf", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Leaf == nil { + m.Leaf = &DeepLeaf{} + } + if err := m.Leaf.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipThetest(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetest + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ADeepBranch) 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 ErrIntOverflowThetest + } + 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: ADeepBranch: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ADeepBranch: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Down", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Down.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipThetest(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetest + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *AndDeepBranch) 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 ErrIntOverflowThetest + } + 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: AndDeepBranch: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: AndDeepBranch: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Left", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Left.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Right", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Right.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipThetest(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetest + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *DeepLeaf) 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 ErrIntOverflowThetest + } + 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: DeepLeaf: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: DeepLeaf: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Tree", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Tree.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipThetest(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetest + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Nil) 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 ErrIntOverflowThetest + } + 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: Nil: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Nil: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipThetest(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetest + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *NidOptEnum) 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 ErrIntOverflowThetest + } + 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: NidOptEnum: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: NidOptEnum: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) + } + m.Field1 = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + m.Field1 |= (TheTestEnum(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipThetest(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetest + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *NinOptEnum) 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 ErrIntOverflowThetest + } + 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: NinOptEnum: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: NinOptEnum: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) + } + var v TheTestEnum + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (TheTestEnum(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field1 = &v + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType) + } + var v YetAnotherTestEnum + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (YetAnotherTestEnum(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field2 = &v + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field3", wireType) + } + var v YetYetAnotherTestEnum + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (YetYetAnotherTestEnum(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field3 = &v + default: + iNdEx = preIndex + skippy, err := skipThetest(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetest + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *NidRepEnum) 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 ErrIntOverflowThetest + } + 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: NidRepEnum: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: NidRepEnum: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) + } + var v TheTestEnum + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (TheTestEnum(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field1 = append(m.Field1, v) + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType) + } + var v YetAnotherTestEnum + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (YetAnotherTestEnum(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field2 = append(m.Field2, v) + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field3", wireType) + } + var v YetYetAnotherTestEnum + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (YetYetAnotherTestEnum(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field3 = append(m.Field3, v) + default: + iNdEx = preIndex + skippy, err := skipThetest(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetest + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *NinRepEnum) 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 ErrIntOverflowThetest + } + 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: NinRepEnum: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: NinRepEnum: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) + } + var v TheTestEnum + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (TheTestEnum(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field1 = append(m.Field1, v) + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType) + } + var v YetAnotherTestEnum + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (YetAnotherTestEnum(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field2 = append(m.Field2, v) + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field3", wireType) + } + var v YetYetAnotherTestEnum + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (YetYetAnotherTestEnum(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field3 = append(m.Field3, v) + default: + iNdEx = preIndex + skippy, err := skipThetest(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetest + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *NinOptEnumDefault) 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 ErrIntOverflowThetest + } + 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: NinOptEnumDefault: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: NinOptEnumDefault: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) + } + var v TheTestEnum + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (TheTestEnum(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field1 = &v + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType) + } + var v YetAnotherTestEnum + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (YetAnotherTestEnum(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field2 = &v + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field3", wireType) + } + var v YetYetAnotherTestEnum + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (YetYetAnotherTestEnum(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field3 = &v + default: + iNdEx = preIndex + skippy, err := skipThetest(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetest + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *AnotherNinOptEnum) 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 ErrIntOverflowThetest + } + 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: AnotherNinOptEnum: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: AnotherNinOptEnum: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) + } + var v AnotherTestEnum + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (AnotherTestEnum(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field1 = &v + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType) + } + var v YetAnotherTestEnum + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (YetAnotherTestEnum(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field2 = &v + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field3", wireType) + } + var v YetYetAnotherTestEnum + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (YetYetAnotherTestEnum(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field3 = &v + default: + iNdEx = preIndex + skippy, err := skipThetest(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetest + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *AnotherNinOptEnumDefault) 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 ErrIntOverflowThetest + } + 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: AnotherNinOptEnumDefault: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: AnotherNinOptEnumDefault: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) + } + var v AnotherTestEnum + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (AnotherTestEnum(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field1 = &v + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType) + } + var v YetAnotherTestEnum + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (YetAnotherTestEnum(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field2 = &v + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field3", wireType) + } + var v YetYetAnotherTestEnum + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (YetYetAnotherTestEnum(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field3 = &v + default: + iNdEx = preIndex + skippy, err := skipThetest(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetest + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Timer) 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 ErrIntOverflowThetest + } + 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: Timer: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Timer: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field Time1", wireType) + } + m.Time1 = 0 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + iNdEx += 8 + m.Time1 = int64(data[iNdEx-8]) + m.Time1 |= int64(data[iNdEx-7]) << 8 + m.Time1 |= int64(data[iNdEx-6]) << 16 + m.Time1 |= int64(data[iNdEx-5]) << 24 + m.Time1 |= int64(data[iNdEx-4]) << 32 + m.Time1 |= int64(data[iNdEx-3]) << 40 + m.Time1 |= int64(data[iNdEx-2]) << 48 + m.Time1 |= int64(data[iNdEx-1]) << 56 + case 2: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field Time2", wireType) + } + m.Time2 = 0 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + iNdEx += 8 + m.Time2 = int64(data[iNdEx-8]) + m.Time2 |= int64(data[iNdEx-7]) << 8 + m.Time2 |= int64(data[iNdEx-6]) << 16 + m.Time2 |= int64(data[iNdEx-5]) << 24 + m.Time2 |= int64(data[iNdEx-4]) << 32 + m.Time2 |= int64(data[iNdEx-3]) << 40 + m.Time2 |= int64(data[iNdEx-2]) << 48 + m.Time2 |= int64(data[iNdEx-1]) << 56 + 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 ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthThetest + } + 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 := skipThetest(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetest + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MyExtendable) 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 ErrIntOverflowThetest + } + 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: MyExtendable: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MyExtendable: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) + } + var v int64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field1 = &v + default: + if (fieldNum >= 100) && (fieldNum < 200) { + var sizeOfWire int + for { + sizeOfWire++ + wire >>= 7 + if wire == 0 { + break + } + } + iNdEx -= sizeOfWire + skippy, err := skipThetest(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetest + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + github_com_gogo_protobuf_proto.AppendExtension(m, int32(fieldNum), data[iNdEx:iNdEx+skippy]) + iNdEx += skippy + } else { + iNdEx = preIndex + skippy, err := skipThetest(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetest + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *OtherExtenable) 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 ErrIntOverflowThetest + } + 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: OtherExtenable: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: OtherExtenable: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field M", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.M == nil { + m.M = &MyExtendable{} + } + if err := m.M.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType) + } + var v int64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field2 = &v + case 13: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field13", wireType) + } + var v int64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field13 = &v + default: + if ((fieldNum >= 14) && (fieldNum < 17)) || ((fieldNum >= 10) && (fieldNum < 13)) { + var sizeOfWire int + for { + sizeOfWire++ + wire >>= 7 + if wire == 0 { + break + } + } + iNdEx -= sizeOfWire + skippy, err := skipThetest(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetest + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + github_com_gogo_protobuf_proto.AppendExtension(m, int32(fieldNum), data[iNdEx:iNdEx+skippy]) + iNdEx += skippy + } else { + iNdEx = preIndex + skippy, err := skipThetest(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetest + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *NestedDefinition) 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 ErrIntOverflowThetest + } + 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: NestedDefinition: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: NestedDefinition: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) + } + var v int64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field1 = &v + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field EnumField", wireType) + } + var v NestedDefinition_NestedEnum + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (NestedDefinition_NestedEnum(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.EnumField = &v + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NNM", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.NNM == nil { + m.NNM = &NestedDefinition_NestedMessage_NestedNestedMsg{} + } + if err := m.NNM.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NM", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.NM == nil { + m.NM = &NestedDefinition_NestedMessage{} + } + if err := m.NM.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipThetest(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetest + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *NestedDefinition_NestedMessage) 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 ErrIntOverflowThetest + } + 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: NestedMessage: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: NestedMessage: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field NestedField1", 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.NestedField1 = &v + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NNM", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.NNM == nil { + m.NNM = &NestedDefinition_NestedMessage_NestedNestedMsg{} + } + if err := m.NNM.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipThetest(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetest + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *NestedDefinition_NestedMessage_NestedNestedMsg) 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 ErrIntOverflowThetest + } + 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: NestedNestedMsg: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: NestedNestedMsg: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 10: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NestedNestedField1", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + 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 ErrInvalidLengthThetest + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + s := string(data[iNdEx:postIndex]) + m.NestedNestedField1 = &s + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipThetest(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetest + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *NestedScope) 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 ErrIntOverflowThetest + } + 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: NestedScope: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: NestedScope: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field A", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.A == nil { + m.A = &NestedDefinition_NestedMessage_NestedNestedMsg{} + } + if err := m.A.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field B", wireType) + } + var v NestedDefinition_NestedEnum + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (NestedDefinition_NestedEnum(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.B = &v + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field C", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.C == nil { + m.C = &NestedDefinition_NestedMessage{} + } + if err := m.C.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipThetest(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetest + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *NinOptNativeDefault) 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 ErrIntOverflowThetest + } + 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: NinOptNativeDefault: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: NinOptNativeDefault: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field Field1", 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.Field1 = &v2 + case 2: + if wireType != 5 { + return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType) + } + var v uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + iNdEx += 4 + v = uint32(data[iNdEx-4]) + v |= uint32(data[iNdEx-3]) << 8 + v |= uint32(data[iNdEx-2]) << 16 + v |= uint32(data[iNdEx-1]) << 24 + v2 := float32(math.Float32frombits(v)) + m.Field2 = &v2 + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field3", wireType) + } + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field3 = &v + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field4", wireType) + } + var v int64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field4 = &v + case 5: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field5", wireType) + } + var v uint32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (uint32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field5 = &v + case 6: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field6", wireType) + } + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field6 = &v + case 7: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field7", wireType) + } + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + v = int32((uint32(v) >> 1) ^ uint32(((v&1)<<31)>>31)) + m.Field7 = &v + case 8: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field8", wireType) + } + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + v = (v >> 1) ^ uint64((int64(v&1)<<63)>>63) + v2 := int64(v) + m.Field8 = &v2 + case 9: + if wireType != 5 { + return fmt.Errorf("proto: wrong wireType = %d for field Field9", wireType) + } + var v uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + iNdEx += 4 + v = uint32(data[iNdEx-4]) + v |= uint32(data[iNdEx-3]) << 8 + v |= uint32(data[iNdEx-2]) << 16 + v |= uint32(data[iNdEx-1]) << 24 + m.Field9 = &v + case 10: + if wireType != 5 { + return fmt.Errorf("proto: wrong wireType = %d for field Field10", wireType) + } + var v int32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + iNdEx += 4 + v = int32(data[iNdEx-4]) + v |= int32(data[iNdEx-3]) << 8 + v |= int32(data[iNdEx-2]) << 16 + v |= int32(data[iNdEx-1]) << 24 + m.Field10 = &v + case 11: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field Field11", 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.Field11 = &v + case 12: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field Field12", wireType) + } + var v int64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + iNdEx += 8 + v = int64(data[iNdEx-8]) + v |= int64(data[iNdEx-7]) << 8 + v |= int64(data[iNdEx-6]) << 16 + v |= int64(data[iNdEx-5]) << 24 + v |= int64(data[iNdEx-4]) << 32 + v |= int64(data[iNdEx-3]) << 40 + v |= int64(data[iNdEx-2]) << 48 + v |= int64(data[iNdEx-1]) << 56 + m.Field12 = &v + case 13: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field13", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + b := bool(v != 0) + m.Field13 = &b + case 14: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field14", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + 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 ErrInvalidLengthThetest + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + s := string(data[iNdEx:postIndex]) + m.Field14 = &s + iNdEx = postIndex + case 15: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field15", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + byteLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Field15 = append(m.Field15[:0], data[iNdEx:postIndex]...) + if m.Field15 == nil { + m.Field15 = []byte{} + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipThetest(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetest + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *CustomContainer) 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 ErrIntOverflowThetest + } + 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: CustomContainer: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: CustomContainer: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field CustomStruct", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.CustomStruct.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipThetest(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetest + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *CustomNameNidOptNative) 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 ErrIntOverflowThetest + } + 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: CustomNameNidOptNative: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: CustomNameNidOptNative: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field FieldA", 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.FieldA = float64(math.Float64frombits(v)) + case 2: + if wireType != 5 { + return fmt.Errorf("proto: wrong wireType = %d for field FieldB", wireType) + } + var v uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + iNdEx += 4 + v = uint32(data[iNdEx-4]) + v |= uint32(data[iNdEx-3]) << 8 + v |= uint32(data[iNdEx-2]) << 16 + v |= uint32(data[iNdEx-1]) << 24 + m.FieldB = float32(math.Float32frombits(v)) + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field FieldC", wireType) + } + m.FieldC = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + m.FieldC |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field FieldD", wireType) + } + m.FieldD = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + m.FieldD |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + case 5: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field FieldE", wireType) + } + m.FieldE = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + m.FieldE |= (uint32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + case 6: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field FieldF", wireType) + } + m.FieldF = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + m.FieldF |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + case 7: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field FieldG", wireType) + } + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + v = int32((uint32(v) >> 1) ^ uint32(((v&1)<<31)>>31)) + m.FieldG = v + case 8: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field FieldH", wireType) + } + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + v = (v >> 1) ^ uint64((int64(v&1)<<63)>>63) + m.FieldH = int64(v) + case 9: + if wireType != 5 { + return fmt.Errorf("proto: wrong wireType = %d for field FieldI", wireType) + } + m.FieldI = 0 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + iNdEx += 4 + m.FieldI = uint32(data[iNdEx-4]) + m.FieldI |= uint32(data[iNdEx-3]) << 8 + m.FieldI |= uint32(data[iNdEx-2]) << 16 + m.FieldI |= uint32(data[iNdEx-1]) << 24 + case 10: + if wireType != 5 { + return fmt.Errorf("proto: wrong wireType = %d for field FieldJ", wireType) + } + m.FieldJ = 0 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + iNdEx += 4 + m.FieldJ = int32(data[iNdEx-4]) + m.FieldJ |= int32(data[iNdEx-3]) << 8 + m.FieldJ |= int32(data[iNdEx-2]) << 16 + m.FieldJ |= int32(data[iNdEx-1]) << 24 + case 11: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field FieldK", wireType) + } + m.FieldK = 0 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + iNdEx += 8 + m.FieldK = uint64(data[iNdEx-8]) + m.FieldK |= uint64(data[iNdEx-7]) << 8 + m.FieldK |= uint64(data[iNdEx-6]) << 16 + m.FieldK |= uint64(data[iNdEx-5]) << 24 + m.FieldK |= uint64(data[iNdEx-4]) << 32 + m.FieldK |= uint64(data[iNdEx-3]) << 40 + m.FieldK |= uint64(data[iNdEx-2]) << 48 + m.FieldK |= uint64(data[iNdEx-1]) << 56 + case 12: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field FieldL", wireType) + } + m.FieldL = 0 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + iNdEx += 8 + m.FieldL = int64(data[iNdEx-8]) + m.FieldL |= int64(data[iNdEx-7]) << 8 + m.FieldL |= int64(data[iNdEx-6]) << 16 + m.FieldL |= int64(data[iNdEx-5]) << 24 + m.FieldL |= int64(data[iNdEx-4]) << 32 + m.FieldL |= int64(data[iNdEx-3]) << 40 + m.FieldL |= int64(data[iNdEx-2]) << 48 + m.FieldL |= int64(data[iNdEx-1]) << 56 + case 13: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field FieldM", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.FieldM = bool(v != 0) + case 14: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field FieldN", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + 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 ErrInvalidLengthThetest + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.FieldN = string(data[iNdEx:postIndex]) + iNdEx = postIndex + case 15: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field FieldO", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + byteLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.FieldO = append(m.FieldO[:0], data[iNdEx:postIndex]...) + if m.FieldO == nil { + m.FieldO = []byte{} + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipThetest(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetest + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *CustomNameNinOptNative) 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 ErrIntOverflowThetest + } + 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: CustomNameNinOptNative: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: CustomNameNinOptNative: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field FieldA", 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.FieldA = &v2 + case 2: + if wireType != 5 { + return fmt.Errorf("proto: wrong wireType = %d for field FieldB", wireType) + } + var v uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + iNdEx += 4 + v = uint32(data[iNdEx-4]) + v |= uint32(data[iNdEx-3]) << 8 + v |= uint32(data[iNdEx-2]) << 16 + v |= uint32(data[iNdEx-1]) << 24 + v2 := float32(math.Float32frombits(v)) + m.FieldB = &v2 + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field FieldC", wireType) + } + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.FieldC = &v + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field FieldD", wireType) + } + var v int64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.FieldD = &v + case 5: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field FieldE", wireType) + } + var v uint32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (uint32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.FieldE = &v + case 6: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field FieldF", wireType) + } + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.FieldF = &v + case 7: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field FieldG", wireType) + } + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + v = int32((uint32(v) >> 1) ^ uint32(((v&1)<<31)>>31)) + m.FieldG = &v + case 8: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field FieldH", wireType) + } + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + v = (v >> 1) ^ uint64((int64(v&1)<<63)>>63) + v2 := int64(v) + m.FieldH = &v2 + case 9: + if wireType != 5 { + return fmt.Errorf("proto: wrong wireType = %d for field FieldI", wireType) + } + var v uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + iNdEx += 4 + v = uint32(data[iNdEx-4]) + v |= uint32(data[iNdEx-3]) << 8 + v |= uint32(data[iNdEx-2]) << 16 + v |= uint32(data[iNdEx-1]) << 24 + m.FieldI = &v + case 10: + if wireType != 5 { + return fmt.Errorf("proto: wrong wireType = %d for field FieldJ", wireType) + } + var v int32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + iNdEx += 4 + v = int32(data[iNdEx-4]) + v |= int32(data[iNdEx-3]) << 8 + v |= int32(data[iNdEx-2]) << 16 + v |= int32(data[iNdEx-1]) << 24 + m.FieldJ = &v + case 11: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field FieldK", 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.FieldK = &v + case 12: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field FielL", wireType) + } + var v int64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + iNdEx += 8 + v = int64(data[iNdEx-8]) + v |= int64(data[iNdEx-7]) << 8 + v |= int64(data[iNdEx-6]) << 16 + v |= int64(data[iNdEx-5]) << 24 + v |= int64(data[iNdEx-4]) << 32 + v |= int64(data[iNdEx-3]) << 40 + v |= int64(data[iNdEx-2]) << 48 + v |= int64(data[iNdEx-1]) << 56 + m.FielL = &v + case 13: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field FieldM", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + b := bool(v != 0) + m.FieldM = &b + case 14: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field FieldN", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + 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 ErrInvalidLengthThetest + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + s := string(data[iNdEx:postIndex]) + m.FieldN = &s + iNdEx = postIndex + case 15: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field FieldO", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + byteLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.FieldO = append(m.FieldO[:0], data[iNdEx:postIndex]...) + if m.FieldO == nil { + m.FieldO = []byte{} + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipThetest(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetest + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *CustomNameNinRepNative) 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 ErrIntOverflowThetest + } + 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: CustomNameNinRepNative: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: CustomNameNinRepNative: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field FieldA", 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.FieldA = append(m.FieldA, v2) + case 2: + if wireType != 5 { + return fmt.Errorf("proto: wrong wireType = %d for field FieldB", wireType) + } + var v uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + iNdEx += 4 + v = uint32(data[iNdEx-4]) + v |= uint32(data[iNdEx-3]) << 8 + v |= uint32(data[iNdEx-2]) << 16 + v |= uint32(data[iNdEx-1]) << 24 + v2 := float32(math.Float32frombits(v)) + m.FieldB = append(m.FieldB, v2) + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field FieldC", wireType) + } + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.FieldC = append(m.FieldC, v) + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field FieldD", wireType) + } + var v int64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.FieldD = append(m.FieldD, v) + case 5: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field FieldE", wireType) + } + var v uint32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (uint32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.FieldE = append(m.FieldE, v) + case 6: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field FieldF", wireType) + } + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.FieldF = append(m.FieldF, v) + case 7: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field FieldG", wireType) + } + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + v = int32((uint32(v) >> 1) ^ uint32(((v&1)<<31)>>31)) + m.FieldG = append(m.FieldG, v) + case 8: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field FieldH", wireType) + } + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + v = (v >> 1) ^ uint64((int64(v&1)<<63)>>63) + m.FieldH = append(m.FieldH, int64(v)) + case 9: + if wireType != 5 { + return fmt.Errorf("proto: wrong wireType = %d for field FieldI", wireType) + } + var v uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + iNdEx += 4 + v = uint32(data[iNdEx-4]) + v |= uint32(data[iNdEx-3]) << 8 + v |= uint32(data[iNdEx-2]) << 16 + v |= uint32(data[iNdEx-1]) << 24 + m.FieldI = append(m.FieldI, v) + case 10: + if wireType != 5 { + return fmt.Errorf("proto: wrong wireType = %d for field FieldJ", wireType) + } + var v int32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + iNdEx += 4 + v = int32(data[iNdEx-4]) + v |= int32(data[iNdEx-3]) << 8 + v |= int32(data[iNdEx-2]) << 16 + v |= int32(data[iNdEx-1]) << 24 + m.FieldJ = append(m.FieldJ, v) + case 11: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field FieldK", 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.FieldK = append(m.FieldK, v) + case 12: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field FieldL", wireType) + } + var v int64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + iNdEx += 8 + v = int64(data[iNdEx-8]) + v |= int64(data[iNdEx-7]) << 8 + v |= int64(data[iNdEx-6]) << 16 + v |= int64(data[iNdEx-5]) << 24 + v |= int64(data[iNdEx-4]) << 32 + v |= int64(data[iNdEx-3]) << 40 + v |= int64(data[iNdEx-2]) << 48 + v |= int64(data[iNdEx-1]) << 56 + m.FieldL = append(m.FieldL, v) + case 13: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field FieldM", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.FieldM = append(m.FieldM, bool(v != 0)) + case 14: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field FieldN", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + 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 ErrInvalidLengthThetest + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.FieldN = append(m.FieldN, string(data[iNdEx:postIndex])) + iNdEx = postIndex + case 15: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field FieldO", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + byteLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.FieldO = append(m.FieldO, make([]byte, postIndex-iNdEx)) + copy(m.FieldO[len(m.FieldO)-1], data[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipThetest(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetest + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *CustomNameNinStruct) 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 ErrIntOverflowThetest + } + 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: CustomNameNinStruct: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: CustomNameNinStruct: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field FieldA", 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.FieldA = &v2 + case 2: + if wireType != 5 { + return fmt.Errorf("proto: wrong wireType = %d for field FieldB", wireType) + } + var v uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + iNdEx += 4 + v = uint32(data[iNdEx-4]) + v |= uint32(data[iNdEx-3]) << 8 + v |= uint32(data[iNdEx-2]) << 16 + v |= uint32(data[iNdEx-1]) << 24 + v2 := float32(math.Float32frombits(v)) + m.FieldB = &v2 + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field FieldC", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.FieldC == nil { + m.FieldC = &NidOptNative{} + } + if err := m.FieldC.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field FieldD", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.FieldD = append(m.FieldD, &NinOptNative{}) + if err := m.FieldD[len(m.FieldD)-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 FieldE", wireType) + } + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.FieldE = &v + case 7: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field FieldF", wireType) + } + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + v = int32((uint32(v) >> 1) ^ uint32(((v&1)<<31)>>31)) + m.FieldF = &v + case 8: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field FieldG", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.FieldG == nil { + m.FieldG = &NidOptNative{} + } + if err := m.FieldG.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 13: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field FieldH", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + b := bool(v != 0) + m.FieldH = &b + case 14: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field FieldI", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + 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 ErrInvalidLengthThetest + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + s := string(data[iNdEx:postIndex]) + m.FieldI = &s + iNdEx = postIndex + case 15: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field FieldJ", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + byteLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.FieldJ = append(m.FieldJ[:0], data[iNdEx:postIndex]...) + if m.FieldJ == nil { + m.FieldJ = []byte{} + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipThetest(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetest + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *CustomNameCustomType) 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 ErrIntOverflowThetest + } + 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: CustomNameCustomType: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: CustomNameCustomType: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field FieldA", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + byteLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var v Uuid + m.FieldA = &v + if err := m.FieldA.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field FieldB", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + byteLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var v github_com_gogo_protobuf_test_custom.Uint128 + m.FieldB = &v + if err := m.FieldB.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field FieldC", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + byteLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var v Uuid + m.FieldC = append(m.FieldC, v) + if err := m.FieldC[len(m.FieldC)-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 FieldD", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + byteLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var v github_com_gogo_protobuf_test_custom.Uint128 + m.FieldD = append(m.FieldD, v) + if err := m.FieldD[len(m.FieldD)-1].Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipThetest(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetest + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *CustomNameNinEmbeddedStructUnion) 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 ErrIntOverflowThetest + } + 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: CustomNameNinEmbeddedStructUnion: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: CustomNameNinEmbeddedStructUnion: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NidOptNative", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.NidOptNative == nil { + m.NidOptNative = &NidOptNative{} + } + if err := m.NidOptNative.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 200: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field FieldA", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.FieldA == nil { + m.FieldA = &NinOptNative{} + } + if err := m.FieldA.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 210: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field FieldB", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + b := bool(v != 0) + m.FieldB = &b + default: + iNdEx = preIndex + skippy, err := skipThetest(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetest + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *CustomNameEnum) 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 ErrIntOverflowThetest + } + 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: CustomNameEnum: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: CustomNameEnum: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field FieldA", wireType) + } + var v TheTestEnum + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (TheTestEnum(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.FieldA = &v + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field FieldB", wireType) + } + var v TheTestEnum + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (TheTestEnum(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.FieldB = append(m.FieldB, v) + default: + iNdEx = preIndex + skippy, err := skipThetest(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetest + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *NoExtensionsMap) 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 ErrIntOverflowThetest + } + 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: NoExtensionsMap: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: NoExtensionsMap: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) + } + var v int64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field1 = &v + default: + if (fieldNum >= 100) && (fieldNum < 200) { + var sizeOfWire int + for { + sizeOfWire++ + wire >>= 7 + if wire == 0 { + break + } + } + iNdEx -= sizeOfWire + skippy, err := skipThetest(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetest + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + github_com_gogo_protobuf_proto.AppendExtension(m, int32(fieldNum), data[iNdEx:iNdEx+skippy]) + iNdEx += skippy + } else { + iNdEx = preIndex + skippy, err := skipThetest(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetest + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Unrecognized) 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 ErrIntOverflowThetest + } + 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: Unrecognized: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Unrecognized: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + 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 ErrInvalidLengthThetest + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + s := string(data[iNdEx:postIndex]) + m.Field1 = &s + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipThetest(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetest + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *UnrecognizedWithInner) 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 ErrIntOverflowThetest + } + 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: UnrecognizedWithInner: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: UnrecognizedWithInner: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Embedded", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Embedded = append(m.Embedded, &UnrecognizedWithInner_Inner{}) + if err := m.Embedded[len(m.Embedded)-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 Field2", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + 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 ErrInvalidLengthThetest + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + s := string(data[iNdEx:postIndex]) + m.Field2 = &s + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipThetest(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetest + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *UnrecognizedWithInner_Inner) 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 ErrIntOverflowThetest + } + 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: Inner: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Inner: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) + } + var v uint32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (uint32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field1 = &v + default: + iNdEx = preIndex + skippy, err := skipThetest(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetest + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *UnrecognizedWithEmbed) 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 ErrIntOverflowThetest + } + 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: UnrecognizedWithEmbed: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: UnrecognizedWithEmbed: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field UnrecognizedWithEmbed_Embedded", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.UnrecognizedWithEmbed_Embedded.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + 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 ErrInvalidLengthThetest + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + s := string(data[iNdEx:postIndex]) + m.Field2 = &s + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipThetest(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetest + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *UnrecognizedWithEmbed_Embedded) 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 ErrIntOverflowThetest + } + 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: Embedded: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Embedded: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) + } + var v uint32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (uint32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field1 = &v + default: + iNdEx = preIndex + skippy, err := skipThetest(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetest + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Node) 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 ErrIntOverflowThetest + } + 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: Node: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Node: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Label", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + 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 ErrInvalidLengthThetest + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + s := string(data[iNdEx:postIndex]) + m.Label = &s + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Children", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Children = append(m.Children, &Node{}) + if err := m.Children[len(m.Children)-1].Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipThetest(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetest + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipThetest(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, ErrIntOverflowThetest + } + 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, ErrIntOverflowThetest + } + 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, ErrIntOverflowThetest + } + 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, ErrInvalidLengthThetest + } + return iNdEx, nil + case 3: + for { + var innerWire uint64 + var start int = iNdEx + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowThetest + } + 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 := skipThetest(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 ( + ErrInvalidLengthThetest = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowThetest = fmt.Errorf("proto: integer overflow") +) + +var fileDescriptorThetest = []byte{ + // 3006 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xcc, 0x5a, 0x4d, 0x6c, 0x1b, 0xc7, + 0x15, 0xd6, 0xee, 0x90, 0x32, 0x35, 0xa2, 0x24, 0x7a, 0x13, 0x33, 0x5b, 0x46, 0x95, 0xe4, 0x2d, + 0xa3, 0x2a, 0x44, 0x2c, 0x91, 0x14, 0x25, 0xcb, 0x4c, 0x93, 0x42, 0xfc, 0x71, 0x6d, 0xd7, 0xa2, + 0x0c, 0x46, 0x6e, 0x6b, 0xa0, 0x40, 0x41, 0x89, 0x2b, 0x89, 0xa8, 0xb4, 0x14, 0xc8, 0x95, 0x6b, + 0xf7, 0x50, 0x04, 0x39, 0x14, 0x46, 0xaf, 0x45, 0x8f, 0x6d, 0x5c, 0x14, 0x05, 0xdc, 0x5b, 0x0e, + 0x45, 0x51, 0x14, 0x45, 0xe3, 0x4b, 0x01, 0xf5, 0x66, 0xf4, 0x54, 0x14, 0x85, 0x91, 0x38, 0x97, + 0x1c, 0xd3, 0x53, 0x73, 0xc8, 0xa1, 0xb3, 0xbb, 0x33, 0xb3, 0x33, 0xb3, 0xbb, 0xdc, 0xa5, 0x25, + 0xb7, 0x39, 0x2c, 0x7f, 0xe6, 0xbd, 0x37, 0xf3, 0xf6, 0x7d, 0xdf, 0x9b, 0x79, 0xbb, 0x33, 0xf0, + 0x2b, 0x3b, 0xdd, 0xc3, 0xed, 0x6e, 0x7f, 0x69, 0xbb, 0x6b, 0xee, 0x2f, 0x99, 0xfb, 0xba, 0xa9, + 0xf7, 0xcd, 0xc5, 0xa3, 0x5e, 0xd7, 0xec, 0x2a, 0x31, 0xeb, 0x77, 0xe6, 0xd2, 0x5e, 0xc7, 0xdc, + 0x3f, 0xde, 0x5e, 0x44, 0x7a,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, 0x5c, 0xf9, 0x8a, 0x3a, + 0x85, 0xe4, 0x49, 0x5e, 0xbe, 0xa2, 0xbd, 0x67, 0xc3, 0x6b, 0xb8, 0xf0, 0xa6, 0x79, 0x78, 0x29, + 0xb0, 0x69, 0x1e, 0x58, 0x0a, 0x69, 0x9a, 0x87, 0x94, 0x82, 0x99, 0xe6, 0xc1, 0xa4, 0x30, 0xa6, + 0x79, 0x18, 0x29, 0x80, 0x69, 0x1e, 0x40, 0x0a, 0x5d, 0x9a, 0x87, 0x8e, 0x82, 0x96, 0xe6, 0x41, + 0xa3, 0x70, 0xa5, 0x79, 0xb8, 0x28, 0x50, 0xaa, 0x00, 0x94, 0x0b, 0x91, 0x2a, 0x40, 0xe4, 0x82, + 0xa3, 0x0a, 0xe0, 0xb8, 0xb0, 0xa8, 0x02, 0x2c, 0x2e, 0x20, 0xaa, 0x00, 0x88, 0x0b, 0x85, 0x2a, + 0x40, 0xe1, 0x82, 0x80, 0x73, 0xac, 0xa9, 0x1f, 0xf9, 0xe4, 0x18, 0x18, 0x98, 0x63, 0x60, 0x60, + 0x8e, 0x81, 0x81, 0x39, 0x06, 0x06, 0xe6, 0x18, 0x18, 0x98, 0x63, 0x60, 0x60, 0x8e, 0x81, 0x81, + 0x39, 0x06, 0x06, 0xe6, 0x18, 0x18, 0x9c, 0x63, 0x20, 0x24, 0xc7, 0x40, 0x48, 0x8e, 0x81, 0x90, + 0x1c, 0x03, 0x21, 0x39, 0x06, 0x42, 0x72, 0x0c, 0x04, 0xe6, 0x98, 0x0b, 0x6f, 0x9a, 0x87, 0xd7, + 0x37, 0xc7, 0x40, 0x40, 0x8e, 0x81, 0x80, 0x1c, 0x03, 0x01, 0x39, 0x06, 0x02, 0x72, 0x0c, 0x04, + 0xe4, 0x18, 0x08, 0xc8, 0x31, 0x10, 0x90, 0x63, 0x20, 0x28, 0xc7, 0x40, 0x60, 0x8e, 0x81, 0xc0, + 0x1c, 0x03, 0x81, 0x39, 0x06, 0x02, 0x73, 0x0c, 0x04, 0xe6, 0x18, 0x60, 0x73, 0xec, 0xcf, 0x00, + 0x2a, 0x4e, 0x8e, 0xdd, 0x6a, 0xed, 0xfc, 0x50, 0x6f, 0x63, 0x28, 0x66, 0x84, 0x4c, 0x1b, 0xb5, + 0xa0, 0x4b, 0xb9, 0x90, 0xcc, 0x08, 0xb9, 0xc6, 0xcb, 0x8b, 0x54, 0x4e, 0xb2, 0x8d, 0x97, 0x2f, + 0x53, 0x39, 0xc9, 0x37, 0x5e, 0x5e, 0xa2, 0x72, 0x92, 0x71, 0xbc, 0x7c, 0x85, 0xca, 0x49, 0xce, + 0xf1, 0xf2, 0x55, 0x2a, 0x27, 0x59, 0xc7, 0xcb, 0x2f, 0x53, 0x39, 0xc9, 0x3b, 0x5e, 0xbe, 0x46, + 0xe5, 0x24, 0xf3, 0x78, 0xf9, 0x15, 0x65, 0x4e, 0xcc, 0x3d, 0xa2, 0x40, 0xa1, 0x9d, 0x13, 0xb3, + 0x4f, 0xd0, 0x28, 0xb8, 0x1a, 0x24, 0xff, 0x04, 0x8d, 0xa2, 0xab, 0x41, 0x32, 0x50, 0xd0, 0x58, + 0xd6, 0x1e, 0xd8, 0xf0, 0x19, 0x22, 0x7c, 0x19, 0x01, 0x3e, 0x99, 0x81, 0x2e, 0x23, 0x40, 0x27, + 0x33, 0xb0, 0x65, 0x04, 0xd8, 0x64, 0x06, 0xb2, 0x8c, 0x00, 0x99, 0xcc, 0xc0, 0x95, 0x11, 0xe0, + 0x92, 0x19, 0xa8, 0x32, 0x02, 0x54, 0x32, 0x03, 0x53, 0x46, 0x80, 0x49, 0x66, 0x20, 0xca, 0x08, + 0x10, 0xc9, 0x0c, 0x3c, 0x19, 0x01, 0x1e, 0x99, 0x81, 0x66, 0x5a, 0x84, 0x46, 0x66, 0x61, 0x99, + 0x16, 0x61, 0x91, 0x59, 0x48, 0xa6, 0x45, 0x48, 0x64, 0x16, 0x8e, 0x69, 0x11, 0x0e, 0x99, 0x85, + 0xe2, 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6d, 0x97, 0xab, 0x0b, 0xe2, 0x91, 0x26, 0x5e, 0xf3, 0xa6, 0xcb, 0xda, 0x05, + 0x71, 0xab, 0x8c, 0xd7, 0xdc, 0x70, 0xf9, 0xbb, 0x20, 0x6e, 0x9a, 0xf1, 0x9a, 0x0d, 0x97, 0xc9, + 0x0b, 0xe2, 0xf6, 0x19, 0xaf, 0xb9, 0xe9, 0xbe, 0x43, 0xff, 0x50, 0xa0, 0x1f, 0x73, 0x08, 0x4a, + 0x13, 0xe8, 0x07, 0x7d, 0xa8, 0xa7, 0x09, 0xd4, 0x83, 0x3e, 0xb4, 0xd3, 0x04, 0xda, 0x41, 0x1f, + 0xca, 0x69, 0x02, 0xe5, 0xa0, 0x0f, 0xdd, 0x34, 0x81, 0x6e, 0xd0, 0x87, 0x6a, 0x9a, 0x40, 0x35, + 0xe8, 0x43, 0x33, 0x4d, 0xa0, 0x19, 0xf4, 0xa1, 0x98, 0x26, 0x50, 0x0c, 0xfa, 0xd0, 0x4b, 0x13, + 0xe8, 0x05, 0x7d, 0xa8, 0x95, 0x15, 0xa9, 0x05, 0xfd, 0x68, 0x95, 0x15, 0x69, 0x05, 0xfd, 0x28, + 0xf5, 0x35, 0x91, 0x52, 0x63, 0x48, 0x2b, 0x6e, 0x35, 0x31, 0x6c, 0xca, 0x8a, 0x6c, 0x82, 0x7e, + 0x4c, 0xca, 0x8a, 0x4c, 0x82, 0x7e, 0x2c, 0xca, 0x8a, 0x2c, 0x82, 0x7e, 0x0c, 0x7a, 0x2c, 0x32, + 0xc8, 0x3d, 0xe2, 0xa3, 0x09, 0x3b, 0x8a, 0x61, 0x0c, 0x02, 0x11, 0x18, 0x04, 0x22, 0x30, 0x08, + 0x44, 0x60, 0x10, 0x88, 0xc0, 0x20, 0x10, 0x81, 0x41, 0x20, 0x02, 0x83, 0x40, 0x04, 0x06, 0x81, + 0x28, 0x0c, 0x02, 0x91, 0x18, 0x04, 0x82, 0x18, 0x94, 0x15, 0x0f, 0x3c, 0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 0x9d, 0x54, 0x0a, + 0xe5, 0x6b, 0xb8, 0x93, 0x6a, 0x60, 0x27, 0x21, 0xa1, 0x72, 0x7a, 0xaa, 0x16, 0x2a, 0x5b, 0x27, + 0x1f, 0xcf, 0x8c, 0x3c, 0x41, 0xd7, 0x3f, 0xd0, 0xf5, 0xd1, 0xc7, 0x33, 0xd2, 0xa7, 0xe8, 0xfa, + 0x0c, 0x5d, 0x9f, 0xa3, 0xeb, 0xdd, 0x67, 0x33, 0xd2, 0x23, 0x74, 0x7d, 0x80, 0xae, 0x3f, 0xa2, + 0xeb, 0x31, 0xba, 0x4e, 0xd0, 0xf5, 0x04, 0x5d, 0x1f, 0xa1, 0xeb, 0xd3, 0x67, 0x33, 0x23, 0x9f, + 0xa1, 0xef, 0xcf, 0xd1, 0xf7, 0xbb, 0x9f, 0xcc, 0x8c, 0x3c, 0x44, 0xd7, 0xa3, 0x4f, 0x66, 0xa4, + 0xff, 0x06, 0x00, 0x00, 0xff, 0xff, 0x0e, 0x09, 0xbb, 0xed, 0xa8, 0x34, 0x00, 0x00, +} diff --git a/vendor/github.com/gogo/protobuf/test/combos/both/thetest.proto b/vendor/github.com/gogo/protobuf/test/combos/both/thetest.proto new file mode 100644 index 000000000..347d8d4c2 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/combos/both/thetest.proto @@ -0,0 +1,624 @@ +// Copyright (c) 2013, Vastech SA (PTY) LTD. All rights reserved. +// http://github.com/gogo/protobuf/gogoproto +// +// 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 test; + +import "github.com/gogo/protobuf/gogoproto/gogo.proto"; + +option (gogoproto.goproto_stringer_all) = false; +option (gogoproto.goproto_enum_prefix_all) = false; +option (gogoproto.goproto_getters_all) = false; + +option (gogoproto.equal_all) = true; +option (gogoproto.verbose_equal_all) = true; +option (gogoproto.stringer_all) = true; +option (gogoproto.gostring_all) = true; +option (gogoproto.face_all) = true; +option (gogoproto.description_all) = true; + +option (gogoproto.testgen_all) = true; +option (gogoproto.populate_all) = true; +option (gogoproto.benchgen_all) = true; +option (gogoproto.unmarshaler_all) = true; +option (gogoproto.marshaler_all) = true; +option (gogoproto.sizer_all) = true; +option (gogoproto.protosizer_all) = false; + +option (gogoproto.goproto_enum_stringer_all) = false; +option (gogoproto.enum_stringer_all) = true; + +option (gogoproto.unsafe_marshaler_all) = false; +option (gogoproto.unsafe_unmarshaler_all) = false; + +option (gogoproto.compare_all) = true; + +message NidOptNative { + optional double Field1 = 1 [(gogoproto.nullable) = false]; + optional float Field2 = 2 [(gogoproto.nullable) = false]; + optional int32 Field3 = 3 [(gogoproto.nullable) = false]; + optional int64 Field4 = 4 [(gogoproto.nullable) = false]; + optional uint32 Field5 = 5 [(gogoproto.nullable) = false]; + optional uint64 Field6 = 6 [(gogoproto.nullable) = false]; + optional sint32 Field7 = 7 [(gogoproto.nullable) = false]; + optional sint64 Field8 = 8 [(gogoproto.nullable) = false]; + optional fixed32 Field9 = 9 [(gogoproto.nullable) = false]; + optional sfixed32 Field10 = 10 [(gogoproto.nullable) = false]; + optional fixed64 Field11 = 11 [(gogoproto.nullable) = false]; + optional sfixed64 Field12 = 12 [(gogoproto.nullable) = false]; + optional bool Field13 = 13 [(gogoproto.nullable) = false]; + optional string Field14 = 14 [(gogoproto.nullable) = false]; + optional bytes Field15 = 15 [(gogoproto.nullable) = false]; +} + +message NinOptNative { + optional double Field1 = 1; + optional float Field2 = 2; + optional int32 Field3 = 3; + optional int64 Field4 = 4; + optional uint32 Field5 = 5; + optional uint64 Field6 = 6; + optional sint32 Field7 = 7; + optional sint64 Field8 = 8; + optional fixed32 Field9 = 9; + optional sfixed32 Field10 = 10; + optional fixed64 Field11 = 11; + optional sfixed64 Field12 = 12; + optional bool Field13 = 13; + optional string Field14 = 14; + optional bytes Field15 = 15; +} + +message NidRepNative { + repeated double Field1 = 1 [(gogoproto.nullable) = false]; + repeated float Field2 = 2 [(gogoproto.nullable) = false]; + repeated int32 Field3 = 3 [(gogoproto.nullable) = false]; + repeated int64 Field4 = 4 [(gogoproto.nullable) = false]; + repeated uint32 Field5 = 5 [(gogoproto.nullable) = false]; + repeated uint64 Field6 = 6 [(gogoproto.nullable) = false]; + repeated sint32 Field7 = 7 [(gogoproto.nullable) = false]; + repeated sint64 Field8 = 8 [(gogoproto.nullable) = false]; + repeated fixed32 Field9 = 9 [(gogoproto.nullable) = false]; + repeated sfixed32 Field10 = 10 [(gogoproto.nullable) = false]; + repeated fixed64 Field11 = 11 [(gogoproto.nullable) = false]; + repeated sfixed64 Field12 = 12 [(gogoproto.nullable) = false]; + repeated bool Field13 = 13 [(gogoproto.nullable) = false]; + repeated string Field14 = 14 [(gogoproto.nullable) = false]; + repeated bytes Field15 = 15 [(gogoproto.nullable) = false]; +} + +message NinRepNative { + repeated double Field1 = 1; + repeated float Field2 = 2; + repeated int32 Field3 = 3; + repeated int64 Field4 = 4; + repeated uint32 Field5 = 5; + repeated uint64 Field6 = 6; + repeated sint32 Field7 = 7; + repeated sint64 Field8 = 8; + repeated fixed32 Field9 = 9; + repeated sfixed32 Field10 = 10; + repeated fixed64 Field11 = 11; + repeated sfixed64 Field12 = 12; + repeated bool Field13 = 13; + repeated string Field14 = 14; + repeated bytes Field15 = 15; +} + +message NidRepPackedNative { + repeated double Field1 = 1 [(gogoproto.nullable) = false, packed = true]; + repeated float Field2 = 2 [(gogoproto.nullable) = false, packed = true]; + repeated int32 Field3 = 3 [(gogoproto.nullable) = false, packed = true]; + repeated int64 Field4 = 4 [(gogoproto.nullable) = false, packed = true]; + repeated uint32 Field5 = 5 [(gogoproto.nullable) = false, packed = true]; + repeated uint64 Field6 = 6 [(gogoproto.nullable) = false, packed = true]; + repeated sint32 Field7 = 7 [(gogoproto.nullable) = false, packed = true]; + repeated sint64 Field8 = 8 [(gogoproto.nullable) = false, packed = true]; + repeated fixed32 Field9 = 9 [(gogoproto.nullable) = false, packed = true]; + repeated sfixed32 Field10 = 10 [(gogoproto.nullable) = false, packed = true]; + repeated fixed64 Field11 = 11 [(gogoproto.nullable) = false, packed = true]; + repeated sfixed64 Field12 = 12 [(gogoproto.nullable) = false, packed = true]; + repeated bool Field13 = 13 [(gogoproto.nullable) = false, packed = true]; +} + +message NinRepPackedNative { + repeated double Field1 = 1 [packed = true]; + repeated float Field2 = 2 [packed = true]; + repeated int32 Field3 = 3 [packed = true]; + repeated int64 Field4 = 4 [packed = true]; + repeated uint32 Field5 = 5 [packed = true]; + repeated uint64 Field6 = 6 [packed = true]; + repeated sint32 Field7 = 7 [packed = true]; + repeated sint64 Field8 = 8 [packed = true]; + repeated fixed32 Field9 = 9 [packed = true]; + repeated sfixed32 Field10 = 10 [packed = true]; + repeated fixed64 Field11 = 11 [packed = true]; + repeated sfixed64 Field12 = 12 [packed = true]; + repeated bool Field13 = 13 [packed = true]; +} + +message NidOptStruct { + optional double Field1 = 1 [(gogoproto.nullable) = false]; + optional float Field2 = 2 [(gogoproto.nullable) = false]; + optional NidOptNative Field3 = 3 [(gogoproto.nullable) = false]; + optional NinOptNative Field4 = 4 [(gogoproto.nullable) = false]; + optional uint64 Field6 = 6 [(gogoproto.nullable) = false]; + optional sint32 Field7 = 7 [(gogoproto.nullable) = false]; + optional NidOptNative Field8 = 8 [(gogoproto.nullable) = false]; + optional bool Field13 = 13 [(gogoproto.nullable) = false]; + optional string Field14 = 14 [(gogoproto.nullable) = false]; + optional bytes Field15 = 15 [(gogoproto.nullable) = false]; +} + +message NinOptStruct { + optional double Field1 = 1; + optional float Field2 = 2; + optional NidOptNative Field3 = 3; + optional NinOptNative Field4 = 4; + optional uint64 Field6 = 6; + optional sint32 Field7 = 7; + optional NidOptNative Field8 = 8; + optional bool Field13 = 13; + optional string Field14 = 14; + optional bytes Field15 = 15; +} + +message NidRepStruct { + repeated double Field1 = 1 [(gogoproto.nullable) = false]; + repeated float Field2 = 2 [(gogoproto.nullable) = false]; + repeated NidOptNative Field3 = 3 [(gogoproto.nullable) = false]; + repeated NinOptNative Field4 = 4 [(gogoproto.nullable) = false]; + repeated uint64 Field6 = 6 [(gogoproto.nullable) = false]; + repeated sint32 Field7 = 7 [(gogoproto.nullable) = false]; + repeated NidOptNative Field8 = 8 [(gogoproto.nullable) = false]; + repeated bool Field13 = 13 [(gogoproto.nullable) = false]; + repeated string Field14 = 14 [(gogoproto.nullable) = false]; + repeated bytes Field15 = 15 [(gogoproto.nullable) = false]; +} + +message NinRepStruct { + repeated double Field1 = 1; + repeated float Field2 = 2; + repeated NidOptNative Field3 = 3; + repeated NinOptNative Field4 = 4; + repeated uint64 Field6 = 6; + repeated sint32 Field7 = 7; + repeated NidOptNative Field8 = 8; + repeated bool Field13 = 13; + repeated string Field14 = 14; + repeated bytes Field15 = 15; +} + +message NidEmbeddedStruct { + optional NidOptNative Field1 = 1 [(gogoproto.embed) = true]; + optional NidOptNative Field200 = 200 [(gogoproto.nullable) = false]; + optional bool Field210 = 210 [(gogoproto.nullable) = false]; +} + +message NinEmbeddedStruct { + optional NidOptNative Field1 = 1 [(gogoproto.embed) = true]; + optional NidOptNative Field200 = 200; + optional bool Field210 = 210; +} + +message NidNestedStruct { + optional NidOptStruct Field1 = 1 [(gogoproto.nullable) = false]; + repeated NidRepStruct Field2 = 2 [(gogoproto.nullable) = false]; +} + +message NinNestedStruct { + optional NinOptStruct Field1 = 1; + repeated NinRepStruct Field2 = 2; +} + +message NidOptCustom { + optional bytes Id = 1 [(gogoproto.customtype) = "Uuid", (gogoproto.nullable) = false]; + optional bytes Value = 2 [(gogoproto.customtype) = "github.com/gogo/protobuf/test/custom.Uint128", (gogoproto.nullable) = false]; +} + +message CustomDash { + optional bytes Value = 1 [(gogoproto.customtype) = "github.com/gogo/protobuf/test/custom-dash-type.Bytes"]; +} + +message NinOptCustom { + optional bytes Id = 1 [(gogoproto.customtype) = "Uuid"]; + optional bytes Value = 2 [(gogoproto.customtype) = "github.com/gogo/protobuf/test/custom.Uint128"]; +} + +message NidRepCustom { + repeated bytes Id = 1 [(gogoproto.customtype) = "Uuid", (gogoproto.nullable) = false]; + repeated bytes Value = 2 [(gogoproto.customtype) = "github.com/gogo/protobuf/test/custom.Uint128", (gogoproto.nullable) = false]; +} + +message NinRepCustom { + repeated bytes Id = 1 [(gogoproto.customtype) = "Uuid"]; + repeated bytes Value = 2 [(gogoproto.customtype) = "github.com/gogo/protobuf/test/custom.Uint128"]; +} + +message NinOptNativeUnion { + option (gogoproto.onlyone) = true; + optional double Field1 = 1; + optional float Field2 = 2; + optional int32 Field3 = 3; + optional int64 Field4 = 4; + optional uint32 Field5 = 5; + optional uint64 Field6 = 6; + optional bool Field13 = 13; + optional string Field14 = 14; + optional bytes Field15 = 15; +} + +message NinOptStructUnion { + option (gogoproto.onlyone) = true; + optional double Field1 = 1; + optional float Field2 = 2; + optional NidOptNative Field3 = 3; + optional NinOptNative Field4 = 4; + optional uint64 Field6 = 6; + optional sint32 Field7 = 7; + optional bool Field13 = 13; + optional string Field14 = 14; + optional bytes Field15 = 15; +} + +message NinEmbeddedStructUnion { + option (gogoproto.onlyone) = true; + optional NidOptNative Field1 = 1 [(gogoproto.embed) = true]; + optional NinOptNative Field200 = 200; + optional bool Field210 = 210; +} + +message NinNestedStructUnion { + option (gogoproto.onlyone) = true; + optional NinOptNativeUnion Field1 = 1; + optional NinOptStructUnion Field2 = 2; + optional NinEmbeddedStructUnion Field3 = 3; +} + +message Tree { + option (gogoproto.onlyone) = true; + optional OrBranch Or = 1; + optional AndBranch And = 2; + optional Leaf Leaf = 3; +} + +message OrBranch { + optional Tree Left = 1 [(gogoproto.nullable) = false]; + optional Tree Right = 2 [(gogoproto.nullable) = false]; +} + +message AndBranch { + optional Tree Left = 1 [(gogoproto.nullable) = false]; + optional Tree Right = 2 [(gogoproto.nullable) = false]; +} + +message Leaf { + optional int64 Value = 1 [(gogoproto.nullable) = false]; + optional string StrValue = 2 [(gogoproto.nullable) = false]; +} + +message DeepTree { + option (gogoproto.onlyone) = true; + optional ADeepBranch Down = 1; + optional AndDeepBranch And = 2; + optional DeepLeaf Leaf = 3; +} + +message ADeepBranch { + optional DeepTree Down = 2 [(gogoproto.nullable) = false]; +} + +message AndDeepBranch { + optional DeepTree Left = 1 [(gogoproto.nullable) = false]; + optional DeepTree Right = 2 [(gogoproto.nullable) = false]; +} + +message DeepLeaf { + optional Tree Tree = 1 [(gogoproto.nullable) = false]; +} + +message Nil { + +} + +enum TheTestEnum { + A = 0; + B = 1; + C = 2; +} + +enum AnotherTestEnum { + option (gogoproto.goproto_enum_prefix) = false; + D = 10; + E = 11; +} + +// YetAnotherTestEnum is used to test cross-package import of custom name +// fields and default resolution. +enum YetAnotherTestEnum { + option (gogoproto.goproto_enum_prefix) = false; + AA = 0; + BB = 1 [(gogoproto.enumvalue_customname) = "BetterYetBB"]; +} + +// YetAnotherTestEnum is used to test cross-package import of custom name +// fields and default resolution. +enum YetYetAnotherTestEnum { + option (gogoproto.goproto_enum_prefix) = true; + CC = 0; + DD = 1 [(gogoproto.enumvalue_customname) = "BetterYetDD"]; +} + +message NidOptEnum { + optional TheTestEnum Field1 = 1 [(gogoproto.nullable) = false]; +} + +message NinOptEnum { + optional TheTestEnum Field1 = 1; + optional YetAnotherTestEnum Field2 = 2; + optional YetYetAnotherTestEnum Field3 = 3; +} + +message NidRepEnum { + repeated TheTestEnum Field1 = 1 [(gogoproto.nullable) = false]; + repeated YetAnotherTestEnum Field2 = 2 [(gogoproto.nullable) = false]; + repeated YetYetAnotherTestEnum Field3 = 3 [(gogoproto.nullable) = false]; +} + +message NinRepEnum { + repeated TheTestEnum Field1 = 1; + repeated YetAnotherTestEnum Field2 = 2; + repeated YetYetAnotherTestEnum Field3 = 3; +} + +message NinOptEnumDefault { + option (gogoproto.goproto_getters) = true; + option (gogoproto.face) = false; + optional TheTestEnum Field1 = 1 [default=C]; + optional YetAnotherTestEnum Field2 = 2 [default=BB]; + optional YetYetAnotherTestEnum Field3 = 3 [default=CC]; +} + +message AnotherNinOptEnum { + optional AnotherTestEnum Field1 = 1; + optional YetAnotherTestEnum Field2 = 2; + optional YetYetAnotherTestEnum Field3 = 3; +} + +message AnotherNinOptEnumDefault { + option (gogoproto.goproto_getters) = true; + option (gogoproto.face) = false; + optional AnotherTestEnum Field1 = 1 [default=E]; + optional YetAnotherTestEnum Field2 = 2 [default=BB]; + optional YetYetAnotherTestEnum Field3 = 3 [default=CC]; +} + + +message Timer { + optional sfixed64 Time1 = 1 [(gogoproto.nullable) = false]; + optional sfixed64 Time2 = 2 [(gogoproto.nullable) = false]; + optional bytes Data = 3 [(gogoproto.nullable) = false]; +} + +message MyExtendable { + option (gogoproto.face) = false; + optional int64 Field1 = 1; + extensions 100 to 199; +} + +extend MyExtendable { + optional double FieldA = 100; + optional NinOptNative FieldB = 101; + optional NinEmbeddedStruct FieldC = 102; + repeated int64 FieldD = 104; + repeated NinOptNative FieldE = 105; +} + +message OtherExtenable { + option (gogoproto.face) = false; + optional int64 Field2 = 2; + extensions 14 to 16; + optional int64 Field13 = 13; + extensions 10 to 12; + optional MyExtendable M = 1; +} + +message NestedDefinition { + optional int64 Field1 = 1; + message NestedMessage { + optional fixed64 NestedField1 = 1; + optional NestedNestedMsg NNM = 2; + message NestedNestedMsg { + optional string NestedNestedField1 = 10; + } + } + enum NestedEnum { + TYPE_NESTED = 1; + } + optional NestedEnum EnumField = 2; + optional NestedMessage.NestedNestedMsg NNM = 3; + optional NestedMessage NM = 4; +} + +message NestedScope { + optional NestedDefinition.NestedMessage.NestedNestedMsg A = 1; + optional NestedDefinition.NestedEnum B = 2; + optional NestedDefinition.NestedMessage C = 3; +} + +message NinOptNativeDefault { + option (gogoproto.goproto_getters) = true; + option (gogoproto.face) = false; + optional double Field1 = 1 [default = 1234.1234]; + optional float Field2 = 2 [default = 1234.1234]; + optional int32 Field3 = 3 [default = 1234]; + optional int64 Field4 = 4 [default = 1234]; + optional uint32 Field5 = 5 [default = 1234]; + optional uint64 Field6 = 6 [default = 1234]; + optional sint32 Field7 = 7 [default = 1234]; + optional sint64 Field8 = 8 [default = 1234]; + optional fixed32 Field9 = 9 [default = 1234]; + optional sfixed32 Field10 = 10 [default = 1234]; + optional fixed64 Field11 = 11 [default = 1234]; + optional sfixed64 Field12 = 12 [default = 1234]; + optional bool Field13 = 13 [default = true]; + optional string Field14 = 14 [default = "1234"]; + optional bytes Field15 = 15; +} + +message CustomContainer { + optional NidOptCustom CustomStruct = 1 [(gogoproto.nullable) = false]; +} + +message CustomNameNidOptNative { + optional double Field1 = 1 [(gogoproto.nullable) = false, (gogoproto.customname) = "FieldA"]; + optional float Field2 = 2 [(gogoproto.nullable) = false, (gogoproto.customname) = "FieldB"]; + optional int32 Field3 = 3 [(gogoproto.nullable) = false, (gogoproto.customname) = "FieldC"]; + optional int64 Field4 = 4 [(gogoproto.nullable) = false, (gogoproto.customname) = "FieldD"]; + optional uint32 Field5 = 5 [(gogoproto.nullable) = false, (gogoproto.customname) = "FieldE"]; + optional uint64 Field6 = 6 [(gogoproto.nullable) = false, (gogoproto.customname) = "FieldF"]; + optional sint32 Field7 = 7 [(gogoproto.nullable) = false, (gogoproto.customname) = "FieldG"]; + optional sint64 Field8 = 8 [(gogoproto.nullable) = false, (gogoproto.customname) = "FieldH"]; + optional fixed32 Field9 = 9 [(gogoproto.nullable) = false, (gogoproto.customname) = "FieldI"]; + optional sfixed32 Field10 = 10 [(gogoproto.nullable) = false, (gogoproto.customname) = "FieldJ"]; + optional fixed64 Field11 = 11 [(gogoproto.nullable) = false, (gogoproto.customname) = "FieldK"]; + optional sfixed64 Field12 = 12 [(gogoproto.nullable) = false, (gogoproto.customname) = "FieldL"]; + optional bool Field13 = 13 [(gogoproto.nullable) = false, (gogoproto.customname) = "FieldM"]; + optional string Field14 = 14 [(gogoproto.nullable) = false, (gogoproto.customname) = "FieldN"]; + optional bytes Field15 = 15 [(gogoproto.nullable) = false, (gogoproto.customname) = "FieldO"]; +} + +message CustomNameNinOptNative { + optional double Field1 = 1 [(gogoproto.customname) = "FieldA"]; + optional float Field2 = 2 [(gogoproto.customname) = "FieldB"]; + optional int32 Field3 = 3 [(gogoproto.customname) = "FieldC"]; + optional int64 Field4 = 4 [(gogoproto.customname) = "FieldD"]; + optional uint32 Field5 = 5 [(gogoproto.customname) = "FieldE"]; + optional uint64 Field6 = 6 [(gogoproto.customname) = "FieldF"]; + optional sint32 Field7 = 7 [(gogoproto.customname) = "FieldG"]; + optional sint64 Field8 = 8 [(gogoproto.customname) = "FieldH"]; + optional fixed32 Field9 = 9 [(gogoproto.customname) = "FieldI"]; + optional sfixed32 Field10 = 10 [(gogoproto.customname) = "FieldJ"]; + optional fixed64 Field11 = 11 [(gogoproto.customname) = "FieldK"]; + optional sfixed64 Field12 = 12 [(gogoproto.customname) = "FielL"]; + optional bool Field13 = 13 [(gogoproto.customname) = "FieldM"]; + optional string Field14 = 14 [(gogoproto.customname) = "FieldN"]; + optional bytes Field15 = 15 [(gogoproto.customname) = "FieldO"]; +} + +message CustomNameNinRepNative { + repeated double Field1 = 1 [(gogoproto.customname) = "FieldA"]; + repeated float Field2 = 2 [(gogoproto.customname) = "FieldB"]; + repeated int32 Field3 = 3 [(gogoproto.customname) = "FieldC"]; + repeated int64 Field4 = 4 [(gogoproto.customname) = "FieldD"]; + repeated uint32 Field5 = 5 [(gogoproto.customname) = "FieldE"]; + repeated uint64 Field6 = 6 [(gogoproto.customname) = "FieldF"]; + repeated sint32 Field7 = 7 [(gogoproto.customname) = "FieldG"]; + repeated sint64 Field8 = 8 [(gogoproto.customname) = "FieldH"]; + repeated fixed32 Field9 = 9 [(gogoproto.customname) = "FieldI"]; + repeated sfixed32 Field10 = 10 [(gogoproto.customname) = "FieldJ"]; + repeated fixed64 Field11 = 11 [(gogoproto.customname) = "FieldK"]; + repeated sfixed64 Field12 = 12 [(gogoproto.customname) = "FieldL"]; + repeated bool Field13 = 13 [(gogoproto.customname) = "FieldM"]; + repeated string Field14 = 14 [(gogoproto.customname) = "FieldN"]; + repeated bytes Field15 = 15 [(gogoproto.customname) = "FieldO"]; +} + +message CustomNameNinStruct { + optional double Field1 = 1 [(gogoproto.customname) = "FieldA"]; + optional float Field2 = 2 [(gogoproto.customname) = "FieldB"]; + optional NidOptNative Field3 = 3 [(gogoproto.customname) = "FieldC"]; + repeated NinOptNative Field4 = 4 [(gogoproto.customname) = "FieldD"]; + optional uint64 Field6 = 6 [(gogoproto.customname) = "FieldE"]; + optional sint32 Field7 = 7 [(gogoproto.customname) = "FieldF"]; + optional NidOptNative Field8 = 8 [(gogoproto.customname) = "FieldG"]; + optional bool Field13 = 13 [(gogoproto.customname) = "FieldH"]; + optional string Field14 = 14 [(gogoproto.customname) = "FieldI"]; + optional bytes Field15 = 15 [(gogoproto.customname) = "FieldJ"]; +} + +message CustomNameCustomType { + optional bytes Id = 1 [(gogoproto.customname) = "FieldA", (gogoproto.customtype) = "Uuid"]; + optional bytes Value = 2 [(gogoproto.customname) = "FieldB", (gogoproto.customtype) = "github.com/gogo/protobuf/test/custom.Uint128"]; + repeated bytes Ids = 3 [(gogoproto.customname) = "FieldC", (gogoproto.customtype) = "Uuid"]; + repeated bytes Values = 4 [(gogoproto.customname) = "FieldD", (gogoproto.customtype) = "github.com/gogo/protobuf/test/custom.Uint128"]; +} + +message CustomNameNinEmbeddedStructUnion { + option (gogoproto.onlyone) = true; + optional NidOptNative Field1 = 1 [(gogoproto.embed) = true]; + optional NinOptNative Field200 = 200 [(gogoproto.customname) = "FieldA"]; + optional bool Field210 = 210 [(gogoproto.customname) = "FieldB"]; +} + +message CustomNameEnum { + optional TheTestEnum Field1 = 1 [(gogoproto.customname) = "FieldA"]; + repeated TheTestEnum Field2 = 2 [(gogoproto.customname) = "FieldB"]; +} + +message NoExtensionsMap { + option (gogoproto.face) = false; + option (gogoproto.goproto_extensions_map) = false; + optional int64 Field1 = 1; + extensions 100 to 199; +} + +extend NoExtensionsMap { + optional double FieldA1 = 100; + optional NinOptNative FieldB1 = 101; + optional NinEmbeddedStruct FieldC1 = 102; +} + +message Unrecognized { + option (gogoproto.goproto_unrecognized) = false; + optional string Field1 = 1; +} + +message UnrecognizedWithInner { + message Inner { + option (gogoproto.goproto_unrecognized) = false; + optional uint32 Field1 = 1; + } + + repeated Inner embedded = 1; + optional string Field2 = 2; +} + +message UnrecognizedWithEmbed { + message Embedded { + option (gogoproto.goproto_unrecognized) = false; + optional uint32 Field1 = 1; + } + + optional Embedded embedded = 1 [(gogoproto.embed) = true, (gogoproto.nullable) = false]; + optional string Field2 = 2; +} + +message Node { + optional string Label = 1; + repeated Node Children = 2; +} + diff --git a/vendor/github.com/gogo/protobuf/test/combos/both/thetestpb_test.go b/vendor/github.com/gogo/protobuf/test/combos/both/thetestpb_test.go new file mode 100644 index 000000000..c94b76cbe --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/combos/both/thetestpb_test.go @@ -0,0 +1,16373 @@ +// Code generated by protoc-gen-gogo. +// source: combos/both/thetest.proto +// DO NOT EDIT! + +/* +Package test is a generated protocol buffer package. + +It is generated from these files: + combos/both/thetest.proto + +It has these top-level messages: + NidOptNative + NinOptNative + NidRepNative + NinRepNative + NidRepPackedNative + NinRepPackedNative + NidOptStruct + NinOptStruct + NidRepStruct + NinRepStruct + NidEmbeddedStruct + NinEmbeddedStruct + NidNestedStruct + NinNestedStruct + NidOptCustom + CustomDash + NinOptCustom + NidRepCustom + NinRepCustom + NinOptNativeUnion + NinOptStructUnion + NinEmbeddedStructUnion + NinNestedStructUnion + Tree + OrBranch + AndBranch + Leaf + DeepTree + ADeepBranch + AndDeepBranch + DeepLeaf + Nil + NidOptEnum + NinOptEnum + NidRepEnum + NinRepEnum + NinOptEnumDefault + AnotherNinOptEnum + AnotherNinOptEnumDefault + Timer + MyExtendable + OtherExtenable + NestedDefinition + NestedScope + NinOptNativeDefault + CustomContainer + CustomNameNidOptNative + CustomNameNinOptNative + CustomNameNinRepNative + CustomNameNinStruct + CustomNameCustomType + CustomNameNinEmbeddedStructUnion + CustomNameEnum + NoExtensionsMap + Unrecognized + UnrecognizedWithInner + UnrecognizedWithEmbed + Node +*/ +package test + +import testing "testing" +import math_rand "math/rand" +import time "time" +import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" +import github_com_gogo_protobuf_jsonpb "github.com/gogo/protobuf/jsonpb" +import fmt "fmt" +import go_parser "go/parser" +import proto "github.com/gogo/protobuf/proto" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +func TestNidOptNativeProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidOptNative(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidOptNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestNidOptNativeMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidOptNative(popr, false) + size := p.Size() + data := make([]byte, size) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(data) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidOptNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkNidOptNativeProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NidOptNative, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNidOptNative(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNidOptNativeProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNidOptNative(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &NidOptNative{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinOptNativeProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptNative(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinOptNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestNinOptNativeMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptNative(popr, false) + size := p.Size() + data := make([]byte, size) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(data) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinOptNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkNinOptNativeProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinOptNative, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNinOptNative(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNinOptNativeProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinOptNative(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &NinOptNative{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNidRepNativeProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepNative(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidRepNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestNidRepNativeMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepNative(popr, false) + size := p.Size() + data := make([]byte, size) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(data) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidRepNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkNidRepNativeProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NidRepNative, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNidRepNative(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNidRepNativeProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNidRepNative(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &NidRepNative{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinRepNativeProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepNative(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinRepNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestNinRepNativeMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepNative(popr, false) + size := p.Size() + data := make([]byte, size) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(data) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinRepNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkNinRepNativeProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinRepNative, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNinRepNative(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNinRepNativeProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinRepNative(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &NinRepNative{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNidRepPackedNativeProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepPackedNative(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidRepPackedNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestNidRepPackedNativeMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepPackedNative(popr, false) + size := p.Size() + data := make([]byte, size) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(data) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidRepPackedNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkNidRepPackedNativeProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NidRepPackedNative, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNidRepPackedNative(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNidRepPackedNativeProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNidRepPackedNative(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &NidRepPackedNative{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinRepPackedNativeProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepPackedNative(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinRepPackedNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestNinRepPackedNativeMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepPackedNative(popr, false) + size := p.Size() + data := make([]byte, size) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(data) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinRepPackedNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkNinRepPackedNativeProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinRepPackedNative, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNinRepPackedNative(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNinRepPackedNativeProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinRepPackedNative(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &NinRepPackedNative{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNidOptStructProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidOptStruct(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidOptStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestNidOptStructMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidOptStruct(popr, false) + size := p.Size() + data := make([]byte, size) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(data) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidOptStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkNidOptStructProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NidOptStruct, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNidOptStruct(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNidOptStructProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNidOptStruct(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &NidOptStruct{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinOptStructProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptStruct(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinOptStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestNinOptStructMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptStruct(popr, false) + size := p.Size() + data := make([]byte, size) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(data) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinOptStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkNinOptStructProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinOptStruct, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNinOptStruct(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNinOptStructProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinOptStruct(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &NinOptStruct{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNidRepStructProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepStruct(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidRepStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestNidRepStructMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepStruct(popr, false) + size := p.Size() + data := make([]byte, size) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(data) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidRepStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkNidRepStructProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NidRepStruct, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNidRepStruct(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNidRepStructProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNidRepStruct(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &NidRepStruct{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinRepStructProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepStruct(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinRepStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestNinRepStructMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepStruct(popr, false) + size := p.Size() + data := make([]byte, size) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(data) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinRepStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkNinRepStructProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinRepStruct, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNinRepStruct(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNinRepStructProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinRepStruct(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &NinRepStruct{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNidEmbeddedStructProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidEmbeddedStruct(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidEmbeddedStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestNidEmbeddedStructMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidEmbeddedStruct(popr, false) + size := p.Size() + data := make([]byte, size) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(data) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidEmbeddedStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkNidEmbeddedStructProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NidEmbeddedStruct, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNidEmbeddedStruct(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNidEmbeddedStructProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNidEmbeddedStruct(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &NidEmbeddedStruct{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinEmbeddedStructProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinEmbeddedStruct(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinEmbeddedStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestNinEmbeddedStructMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinEmbeddedStruct(popr, false) + size := p.Size() + data := make([]byte, size) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(data) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinEmbeddedStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkNinEmbeddedStructProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinEmbeddedStruct, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNinEmbeddedStruct(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNinEmbeddedStructProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinEmbeddedStruct(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &NinEmbeddedStruct{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNidNestedStructProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidNestedStruct(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidNestedStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestNidNestedStructMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidNestedStruct(popr, false) + size := p.Size() + data := make([]byte, size) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(data) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidNestedStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkNidNestedStructProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NidNestedStruct, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNidNestedStruct(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNidNestedStructProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNidNestedStruct(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &NidNestedStruct{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinNestedStructProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinNestedStruct(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinNestedStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestNinNestedStructMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinNestedStruct(popr, false) + size := p.Size() + data := make([]byte, size) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(data) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinNestedStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkNinNestedStructProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinNestedStruct, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNinNestedStruct(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNinNestedStructProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinNestedStruct(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &NinNestedStruct{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNidOptCustomProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidOptCustom(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidOptCustom{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestNidOptCustomMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidOptCustom(popr, false) + size := p.Size() + data := make([]byte, size) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(data) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidOptCustom{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkNidOptCustomProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NidOptCustom, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNidOptCustom(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNidOptCustomProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNidOptCustom(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &NidOptCustom{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestCustomDashProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomDash(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &CustomDash{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestCustomDashMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomDash(popr, false) + size := p.Size() + data := make([]byte, size) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(data) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &CustomDash{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkCustomDashProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*CustomDash, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedCustomDash(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkCustomDashProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedCustomDash(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &CustomDash{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinOptCustomProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptCustom(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinOptCustom{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestNinOptCustomMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptCustom(popr, false) + size := p.Size() + data := make([]byte, size) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(data) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinOptCustom{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkNinOptCustomProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinOptCustom, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNinOptCustom(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNinOptCustomProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinOptCustom(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &NinOptCustom{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNidRepCustomProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepCustom(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidRepCustom{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestNidRepCustomMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepCustom(popr, false) + size := p.Size() + data := make([]byte, size) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(data) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidRepCustom{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkNidRepCustomProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NidRepCustom, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNidRepCustom(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNidRepCustomProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNidRepCustom(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &NidRepCustom{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinRepCustomProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepCustom(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinRepCustom{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestNinRepCustomMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepCustom(popr, false) + size := p.Size() + data := make([]byte, size) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(data) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinRepCustom{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkNinRepCustomProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinRepCustom, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNinRepCustom(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNinRepCustomProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinRepCustom(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &NinRepCustom{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinOptNativeUnionProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptNativeUnion(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinOptNativeUnion{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestNinOptNativeUnionMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptNativeUnion(popr, false) + size := p.Size() + data := make([]byte, size) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(data) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinOptNativeUnion{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkNinOptNativeUnionProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinOptNativeUnion, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNinOptNativeUnion(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNinOptNativeUnionProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinOptNativeUnion(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &NinOptNativeUnion{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinOptStructUnionProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptStructUnion(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinOptStructUnion{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestNinOptStructUnionMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptStructUnion(popr, false) + size := p.Size() + data := make([]byte, size) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(data) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinOptStructUnion{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkNinOptStructUnionProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinOptStructUnion, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNinOptStructUnion(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNinOptStructUnionProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinOptStructUnion(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &NinOptStructUnion{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinEmbeddedStructUnionProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinEmbeddedStructUnion(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinEmbeddedStructUnion{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestNinEmbeddedStructUnionMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinEmbeddedStructUnion(popr, false) + size := p.Size() + data := make([]byte, size) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(data) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinEmbeddedStructUnion{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkNinEmbeddedStructUnionProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinEmbeddedStructUnion, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNinEmbeddedStructUnion(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNinEmbeddedStructUnionProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinEmbeddedStructUnion(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &NinEmbeddedStructUnion{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinNestedStructUnionProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinNestedStructUnion(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinNestedStructUnion{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestNinNestedStructUnionMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinNestedStructUnion(popr, false) + size := p.Size() + data := make([]byte, size) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(data) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinNestedStructUnion{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkNinNestedStructUnionProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinNestedStructUnion, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNinNestedStructUnion(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNinNestedStructUnionProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinNestedStructUnion(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &NinNestedStructUnion{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestTreeProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedTree(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Tree{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestTreeMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedTree(popr, false) + size := p.Size() + data := make([]byte, size) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(data) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Tree{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkTreeProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Tree, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedTree(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkTreeProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedTree(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &Tree{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestOrBranchProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedOrBranch(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &OrBranch{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestOrBranchMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedOrBranch(popr, false) + size := p.Size() + data := make([]byte, size) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(data) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &OrBranch{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkOrBranchProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*OrBranch, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedOrBranch(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkOrBranchProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedOrBranch(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &OrBranch{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestAndBranchProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAndBranch(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &AndBranch{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestAndBranchMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAndBranch(popr, false) + size := p.Size() + data := make([]byte, size) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(data) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &AndBranch{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkAndBranchProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*AndBranch, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedAndBranch(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkAndBranchProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedAndBranch(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &AndBranch{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestLeafProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedLeaf(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Leaf{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestLeafMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedLeaf(popr, false) + size := p.Size() + data := make([]byte, size) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(data) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Leaf{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkLeafProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Leaf, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedLeaf(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkLeafProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedLeaf(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &Leaf{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestDeepTreeProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedDeepTree(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &DeepTree{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestDeepTreeMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedDeepTree(popr, false) + size := p.Size() + data := make([]byte, size) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(data) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &DeepTree{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkDeepTreeProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*DeepTree, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedDeepTree(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkDeepTreeProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedDeepTree(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &DeepTree{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestADeepBranchProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedADeepBranch(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &ADeepBranch{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestADeepBranchMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedADeepBranch(popr, false) + size := p.Size() + data := make([]byte, size) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(data) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &ADeepBranch{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkADeepBranchProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*ADeepBranch, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedADeepBranch(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkADeepBranchProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedADeepBranch(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &ADeepBranch{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestAndDeepBranchProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAndDeepBranch(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &AndDeepBranch{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestAndDeepBranchMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAndDeepBranch(popr, false) + size := p.Size() + data := make([]byte, size) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(data) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &AndDeepBranch{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkAndDeepBranchProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*AndDeepBranch, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedAndDeepBranch(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkAndDeepBranchProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedAndDeepBranch(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &AndDeepBranch{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestDeepLeafProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedDeepLeaf(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &DeepLeaf{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestDeepLeafMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedDeepLeaf(popr, false) + size := p.Size() + data := make([]byte, size) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(data) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &DeepLeaf{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkDeepLeafProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*DeepLeaf, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedDeepLeaf(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkDeepLeafProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedDeepLeaf(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &DeepLeaf{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNilProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNil(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Nil{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestNilMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNil(popr, false) + size := p.Size() + data := make([]byte, size) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(data) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Nil{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkNilProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Nil, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNil(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNilProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNil(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &Nil{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNidOptEnumProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidOptEnum(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidOptEnum{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestNidOptEnumMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidOptEnum(popr, false) + size := p.Size() + data := make([]byte, size) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(data) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidOptEnum{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkNidOptEnumProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NidOptEnum, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNidOptEnum(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNidOptEnumProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNidOptEnum(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &NidOptEnum{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinOptEnumProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptEnum(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinOptEnum{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestNinOptEnumMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptEnum(popr, false) + size := p.Size() + data := make([]byte, size) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(data) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinOptEnum{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkNinOptEnumProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinOptEnum, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNinOptEnum(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNinOptEnumProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinOptEnum(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &NinOptEnum{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNidRepEnumProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepEnum(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidRepEnum{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestNidRepEnumMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepEnum(popr, false) + size := p.Size() + data := make([]byte, size) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(data) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidRepEnum{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkNidRepEnumProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NidRepEnum, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNidRepEnum(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNidRepEnumProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNidRepEnum(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &NidRepEnum{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinRepEnumProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepEnum(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinRepEnum{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestNinRepEnumMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepEnum(popr, false) + size := p.Size() + data := make([]byte, size) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(data) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinRepEnum{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkNinRepEnumProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinRepEnum, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNinRepEnum(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNinRepEnumProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinRepEnum(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &NinRepEnum{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinOptEnumDefaultProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptEnumDefault(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinOptEnumDefault{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestNinOptEnumDefaultMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptEnumDefault(popr, false) + size := p.Size() + data := make([]byte, size) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(data) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinOptEnumDefault{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkNinOptEnumDefaultProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinOptEnumDefault, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNinOptEnumDefault(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNinOptEnumDefaultProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinOptEnumDefault(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &NinOptEnumDefault{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestAnotherNinOptEnumProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAnotherNinOptEnum(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &AnotherNinOptEnum{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestAnotherNinOptEnumMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAnotherNinOptEnum(popr, false) + size := p.Size() + data := make([]byte, size) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(data) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &AnotherNinOptEnum{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkAnotherNinOptEnumProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*AnotherNinOptEnum, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedAnotherNinOptEnum(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkAnotherNinOptEnumProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedAnotherNinOptEnum(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &AnotherNinOptEnum{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestAnotherNinOptEnumDefaultProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAnotherNinOptEnumDefault(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &AnotherNinOptEnumDefault{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestAnotherNinOptEnumDefaultMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAnotherNinOptEnumDefault(popr, false) + size := p.Size() + data := make([]byte, size) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(data) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &AnotherNinOptEnumDefault{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkAnotherNinOptEnumDefaultProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*AnotherNinOptEnumDefault, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedAnotherNinOptEnumDefault(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkAnotherNinOptEnumDefaultProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedAnotherNinOptEnumDefault(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &AnotherNinOptEnumDefault{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestTimerProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedTimer(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Timer{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestTimerMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedTimer(popr, false) + size := p.Size() + data := make([]byte, size) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(data) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Timer{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkTimerProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Timer, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedTimer(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkTimerProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedTimer(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &Timer{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestMyExtendableProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMyExtendable(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &MyExtendable{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestMyExtendableMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMyExtendable(popr, false) + size := p.Size() + data := make([]byte, size) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(data) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &MyExtendable{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkMyExtendableProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*MyExtendable, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedMyExtendable(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkMyExtendableProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedMyExtendable(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &MyExtendable{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestOtherExtenableProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedOtherExtenable(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &OtherExtenable{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestOtherExtenableMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedOtherExtenable(popr, false) + size := p.Size() + data := make([]byte, size) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(data) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &OtherExtenable{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkOtherExtenableProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*OtherExtenable, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedOtherExtenable(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkOtherExtenableProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedOtherExtenable(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &OtherExtenable{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNestedDefinitionProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNestedDefinition(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NestedDefinition{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestNestedDefinitionMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNestedDefinition(popr, false) + size := p.Size() + data := make([]byte, size) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(data) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NestedDefinition{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkNestedDefinitionProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NestedDefinition, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNestedDefinition(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNestedDefinitionProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNestedDefinition(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &NestedDefinition{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNestedDefinition_NestedMessageProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNestedDefinition_NestedMessage(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NestedDefinition_NestedMessage{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestNestedDefinition_NestedMessageMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNestedDefinition_NestedMessage(popr, false) + size := p.Size() + data := make([]byte, size) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(data) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NestedDefinition_NestedMessage{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkNestedDefinition_NestedMessageProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NestedDefinition_NestedMessage, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNestedDefinition_NestedMessage(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNestedDefinition_NestedMessageProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNestedDefinition_NestedMessage(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &NestedDefinition_NestedMessage{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNestedDefinition_NestedMessage_NestedNestedMsgProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NestedDefinition_NestedMessage_NestedNestedMsg{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestNestedDefinition_NestedMessage_NestedNestedMsgMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(popr, false) + size := p.Size() + data := make([]byte, size) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(data) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NestedDefinition_NestedMessage_NestedNestedMsg{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkNestedDefinition_NestedMessage_NestedNestedMsgProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NestedDefinition_NestedMessage_NestedNestedMsg, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNestedDefinition_NestedMessage_NestedNestedMsgProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &NestedDefinition_NestedMessage_NestedNestedMsg{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNestedScopeProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNestedScope(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NestedScope{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestNestedScopeMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNestedScope(popr, false) + size := p.Size() + data := make([]byte, size) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(data) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NestedScope{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkNestedScopeProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NestedScope, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNestedScope(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNestedScopeProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNestedScope(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &NestedScope{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinOptNativeDefaultProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptNativeDefault(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinOptNativeDefault{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestNinOptNativeDefaultMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptNativeDefault(popr, false) + size := p.Size() + data := make([]byte, size) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(data) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinOptNativeDefault{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkNinOptNativeDefaultProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinOptNativeDefault, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNinOptNativeDefault(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNinOptNativeDefaultProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinOptNativeDefault(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &NinOptNativeDefault{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestCustomContainerProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomContainer(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &CustomContainer{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestCustomContainerMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomContainer(popr, false) + size := p.Size() + data := make([]byte, size) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(data) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &CustomContainer{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkCustomContainerProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*CustomContainer, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedCustomContainer(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkCustomContainerProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedCustomContainer(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &CustomContainer{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestCustomNameNidOptNativeProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameNidOptNative(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &CustomNameNidOptNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestCustomNameNidOptNativeMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameNidOptNative(popr, false) + size := p.Size() + data := make([]byte, size) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(data) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &CustomNameNidOptNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkCustomNameNidOptNativeProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*CustomNameNidOptNative, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedCustomNameNidOptNative(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkCustomNameNidOptNativeProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedCustomNameNidOptNative(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &CustomNameNidOptNative{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestCustomNameNinOptNativeProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameNinOptNative(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &CustomNameNinOptNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestCustomNameNinOptNativeMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameNinOptNative(popr, false) + size := p.Size() + data := make([]byte, size) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(data) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &CustomNameNinOptNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkCustomNameNinOptNativeProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*CustomNameNinOptNative, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedCustomNameNinOptNative(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkCustomNameNinOptNativeProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedCustomNameNinOptNative(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &CustomNameNinOptNative{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestCustomNameNinRepNativeProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameNinRepNative(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &CustomNameNinRepNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestCustomNameNinRepNativeMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameNinRepNative(popr, false) + size := p.Size() + data := make([]byte, size) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(data) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &CustomNameNinRepNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkCustomNameNinRepNativeProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*CustomNameNinRepNative, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedCustomNameNinRepNative(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkCustomNameNinRepNativeProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedCustomNameNinRepNative(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &CustomNameNinRepNative{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestCustomNameNinStructProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameNinStruct(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &CustomNameNinStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestCustomNameNinStructMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameNinStruct(popr, false) + size := p.Size() + data := make([]byte, size) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(data) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &CustomNameNinStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkCustomNameNinStructProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*CustomNameNinStruct, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedCustomNameNinStruct(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkCustomNameNinStructProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedCustomNameNinStruct(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &CustomNameNinStruct{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestCustomNameCustomTypeProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameCustomType(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &CustomNameCustomType{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestCustomNameCustomTypeMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameCustomType(popr, false) + size := p.Size() + data := make([]byte, size) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(data) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &CustomNameCustomType{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkCustomNameCustomTypeProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*CustomNameCustomType, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedCustomNameCustomType(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkCustomNameCustomTypeProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedCustomNameCustomType(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &CustomNameCustomType{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestCustomNameNinEmbeddedStructUnionProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameNinEmbeddedStructUnion(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &CustomNameNinEmbeddedStructUnion{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestCustomNameNinEmbeddedStructUnionMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameNinEmbeddedStructUnion(popr, false) + size := p.Size() + data := make([]byte, size) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(data) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &CustomNameNinEmbeddedStructUnion{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkCustomNameNinEmbeddedStructUnionProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*CustomNameNinEmbeddedStructUnion, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedCustomNameNinEmbeddedStructUnion(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkCustomNameNinEmbeddedStructUnionProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedCustomNameNinEmbeddedStructUnion(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &CustomNameNinEmbeddedStructUnion{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestCustomNameEnumProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameEnum(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &CustomNameEnum{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestCustomNameEnumMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameEnum(popr, false) + size := p.Size() + data := make([]byte, size) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(data) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &CustomNameEnum{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkCustomNameEnumProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*CustomNameEnum, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedCustomNameEnum(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkCustomNameEnumProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedCustomNameEnum(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &CustomNameEnum{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNoExtensionsMapProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNoExtensionsMap(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NoExtensionsMap{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestNoExtensionsMapMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNoExtensionsMap(popr, false) + size := p.Size() + data := make([]byte, size) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(data) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NoExtensionsMap{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkNoExtensionsMapProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NoExtensionsMap, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNoExtensionsMap(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNoExtensionsMapProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNoExtensionsMap(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &NoExtensionsMap{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestUnrecognizedProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUnrecognized(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Unrecognized{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestUnrecognizedMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUnrecognized(popr, false) + size := p.Size() + data := make([]byte, size) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(data) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Unrecognized{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkUnrecognizedProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Unrecognized, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedUnrecognized(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkUnrecognizedProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedUnrecognized(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &Unrecognized{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestUnrecognizedWithInnerProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUnrecognizedWithInner(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &UnrecognizedWithInner{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestUnrecognizedWithInnerMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUnrecognizedWithInner(popr, false) + size := p.Size() + data := make([]byte, size) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(data) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &UnrecognizedWithInner{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkUnrecognizedWithInnerProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*UnrecognizedWithInner, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedUnrecognizedWithInner(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkUnrecognizedWithInnerProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedUnrecognizedWithInner(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &UnrecognizedWithInner{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestUnrecognizedWithInner_InnerProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUnrecognizedWithInner_Inner(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &UnrecognizedWithInner_Inner{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestUnrecognizedWithInner_InnerMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUnrecognizedWithInner_Inner(popr, false) + size := p.Size() + data := make([]byte, size) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(data) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &UnrecognizedWithInner_Inner{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkUnrecognizedWithInner_InnerProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*UnrecognizedWithInner_Inner, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedUnrecognizedWithInner_Inner(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkUnrecognizedWithInner_InnerProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedUnrecognizedWithInner_Inner(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &UnrecognizedWithInner_Inner{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestUnrecognizedWithEmbedProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUnrecognizedWithEmbed(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &UnrecognizedWithEmbed{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestUnrecognizedWithEmbedMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUnrecognizedWithEmbed(popr, false) + size := p.Size() + data := make([]byte, size) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(data) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &UnrecognizedWithEmbed{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkUnrecognizedWithEmbedProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*UnrecognizedWithEmbed, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedUnrecognizedWithEmbed(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkUnrecognizedWithEmbedProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedUnrecognizedWithEmbed(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &UnrecognizedWithEmbed{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestUnrecognizedWithEmbed_EmbeddedProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUnrecognizedWithEmbed_Embedded(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &UnrecognizedWithEmbed_Embedded{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestUnrecognizedWithEmbed_EmbeddedMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUnrecognizedWithEmbed_Embedded(popr, false) + size := p.Size() + data := make([]byte, size) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(data) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &UnrecognizedWithEmbed_Embedded{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkUnrecognizedWithEmbed_EmbeddedProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*UnrecognizedWithEmbed_Embedded, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedUnrecognizedWithEmbed_Embedded(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkUnrecognizedWithEmbed_EmbeddedProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedUnrecognizedWithEmbed_Embedded(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &UnrecognizedWithEmbed_Embedded{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNodeProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNode(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Node{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestNodeMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNode(popr, false) + size := p.Size() + data := make([]byte, size) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(data) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Node{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkNodeProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Node, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNode(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNodeProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNode(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &Node{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNidOptNativeJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidOptNative(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidOptNative{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNinOptNativeJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptNative(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinOptNative{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNidRepNativeJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepNative(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidRepNative{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNinRepNativeJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepNative(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinRepNative{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNidRepPackedNativeJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepPackedNative(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidRepPackedNative{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNinRepPackedNativeJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepPackedNative(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinRepPackedNative{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNidOptStructJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidOptStruct(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidOptStruct{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNinOptStructJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptStruct(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinOptStruct{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNidRepStructJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepStruct(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidRepStruct{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNinRepStructJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepStruct(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinRepStruct{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNidEmbeddedStructJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidEmbeddedStruct(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidEmbeddedStruct{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNinEmbeddedStructJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinEmbeddedStruct(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinEmbeddedStruct{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNidNestedStructJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidNestedStruct(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidNestedStruct{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNinNestedStructJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinNestedStruct(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinNestedStruct{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNidOptCustomJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidOptCustom(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidOptCustom{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestCustomDashJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomDash(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &CustomDash{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNinOptCustomJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptCustom(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinOptCustom{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNidRepCustomJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepCustom(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidRepCustom{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNinRepCustomJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepCustom(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinRepCustom{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNinOptNativeUnionJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptNativeUnion(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinOptNativeUnion{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNinOptStructUnionJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptStructUnion(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinOptStructUnion{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNinEmbeddedStructUnionJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinEmbeddedStructUnion(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinEmbeddedStructUnion{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNinNestedStructUnionJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinNestedStructUnion(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinNestedStructUnion{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestTreeJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedTree(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Tree{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestOrBranchJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedOrBranch(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &OrBranch{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestAndBranchJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAndBranch(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &AndBranch{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestLeafJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedLeaf(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Leaf{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestDeepTreeJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedDeepTree(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &DeepTree{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestADeepBranchJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedADeepBranch(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &ADeepBranch{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestAndDeepBranchJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAndDeepBranch(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &AndDeepBranch{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestDeepLeafJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedDeepLeaf(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &DeepLeaf{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNilJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNil(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Nil{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNidOptEnumJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidOptEnum(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidOptEnum{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNinOptEnumJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptEnum(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinOptEnum{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNidRepEnumJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepEnum(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidRepEnum{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNinRepEnumJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepEnum(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinRepEnum{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNinOptEnumDefaultJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptEnumDefault(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinOptEnumDefault{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestAnotherNinOptEnumJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAnotherNinOptEnum(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &AnotherNinOptEnum{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestAnotherNinOptEnumDefaultJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAnotherNinOptEnumDefault(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &AnotherNinOptEnumDefault{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestTimerJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedTimer(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Timer{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestMyExtendableJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMyExtendable(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &MyExtendable{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestOtherExtenableJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedOtherExtenable(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &OtherExtenable{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNestedDefinitionJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNestedDefinition(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NestedDefinition{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNestedDefinition_NestedMessageJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNestedDefinition_NestedMessage(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NestedDefinition_NestedMessage{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNestedDefinition_NestedMessage_NestedNestedMsgJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NestedDefinition_NestedMessage_NestedNestedMsg{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNestedScopeJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNestedScope(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NestedScope{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNinOptNativeDefaultJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptNativeDefault(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinOptNativeDefault{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestCustomContainerJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomContainer(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &CustomContainer{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestCustomNameNidOptNativeJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameNidOptNative(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &CustomNameNidOptNative{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestCustomNameNinOptNativeJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameNinOptNative(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &CustomNameNinOptNative{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestCustomNameNinRepNativeJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameNinRepNative(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &CustomNameNinRepNative{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestCustomNameNinStructJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameNinStruct(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &CustomNameNinStruct{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestCustomNameCustomTypeJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameCustomType(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &CustomNameCustomType{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestCustomNameNinEmbeddedStructUnionJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameNinEmbeddedStructUnion(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &CustomNameNinEmbeddedStructUnion{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestCustomNameEnumJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameEnum(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &CustomNameEnum{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNoExtensionsMapJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNoExtensionsMap(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NoExtensionsMap{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestUnrecognizedJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUnrecognized(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Unrecognized{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestUnrecognizedWithInnerJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUnrecognizedWithInner(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &UnrecognizedWithInner{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestUnrecognizedWithInner_InnerJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUnrecognizedWithInner_Inner(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &UnrecognizedWithInner_Inner{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestUnrecognizedWithEmbedJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUnrecognizedWithEmbed(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &UnrecognizedWithEmbed{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestUnrecognizedWithEmbed_EmbeddedJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUnrecognizedWithEmbed_Embedded(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &UnrecognizedWithEmbed_Embedded{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNodeJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNode(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Node{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNidOptNativeProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidOptNative(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NidOptNative{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNidOptNativeProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidOptNative(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NidOptNative{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinOptNativeProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptNative(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NinOptNative{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinOptNativeProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptNative(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NinOptNative{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNidRepNativeProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepNative(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NidRepNative{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNidRepNativeProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepNative(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NidRepNative{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinRepNativeProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepNative(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NinRepNative{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinRepNativeProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepNative(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NinRepNative{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNidRepPackedNativeProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepPackedNative(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NidRepPackedNative{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNidRepPackedNativeProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepPackedNative(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NidRepPackedNative{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinRepPackedNativeProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepPackedNative(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NinRepPackedNative{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinRepPackedNativeProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepPackedNative(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NinRepPackedNative{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNidOptStructProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidOptStruct(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NidOptStruct{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNidOptStructProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidOptStruct(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NidOptStruct{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinOptStructProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptStruct(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NinOptStruct{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinOptStructProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptStruct(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NinOptStruct{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNidRepStructProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepStruct(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NidRepStruct{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNidRepStructProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepStruct(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NidRepStruct{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinRepStructProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepStruct(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NinRepStruct{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinRepStructProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepStruct(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NinRepStruct{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNidEmbeddedStructProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidEmbeddedStruct(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NidEmbeddedStruct{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNidEmbeddedStructProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidEmbeddedStruct(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NidEmbeddedStruct{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinEmbeddedStructProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinEmbeddedStruct(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NinEmbeddedStruct{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinEmbeddedStructProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinEmbeddedStruct(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NinEmbeddedStruct{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNidNestedStructProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidNestedStruct(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NidNestedStruct{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNidNestedStructProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidNestedStruct(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NidNestedStruct{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinNestedStructProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinNestedStruct(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NinNestedStruct{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinNestedStructProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinNestedStruct(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NinNestedStruct{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNidOptCustomProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidOptCustom(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NidOptCustom{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNidOptCustomProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidOptCustom(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NidOptCustom{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestCustomDashProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomDash(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &CustomDash{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestCustomDashProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomDash(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &CustomDash{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinOptCustomProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptCustom(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NinOptCustom{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinOptCustomProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptCustom(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NinOptCustom{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNidRepCustomProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepCustom(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NidRepCustom{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNidRepCustomProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepCustom(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NidRepCustom{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinRepCustomProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepCustom(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NinRepCustom{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinRepCustomProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepCustom(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NinRepCustom{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinOptNativeUnionProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptNativeUnion(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NinOptNativeUnion{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinOptNativeUnionProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptNativeUnion(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NinOptNativeUnion{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinOptStructUnionProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptStructUnion(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NinOptStructUnion{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinOptStructUnionProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptStructUnion(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NinOptStructUnion{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinEmbeddedStructUnionProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinEmbeddedStructUnion(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NinEmbeddedStructUnion{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinEmbeddedStructUnionProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinEmbeddedStructUnion(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NinEmbeddedStructUnion{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinNestedStructUnionProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinNestedStructUnion(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NinNestedStructUnion{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinNestedStructUnionProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinNestedStructUnion(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NinNestedStructUnion{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestTreeProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedTree(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &Tree{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestTreeProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedTree(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &Tree{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestOrBranchProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedOrBranch(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &OrBranch{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestOrBranchProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedOrBranch(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &OrBranch{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestAndBranchProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAndBranch(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &AndBranch{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestAndBranchProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAndBranch(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &AndBranch{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestLeafProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedLeaf(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &Leaf{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestLeafProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedLeaf(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &Leaf{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestDeepTreeProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedDeepTree(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &DeepTree{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestDeepTreeProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedDeepTree(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &DeepTree{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestADeepBranchProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedADeepBranch(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &ADeepBranch{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestADeepBranchProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedADeepBranch(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &ADeepBranch{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestAndDeepBranchProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAndDeepBranch(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &AndDeepBranch{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestAndDeepBranchProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAndDeepBranch(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &AndDeepBranch{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestDeepLeafProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedDeepLeaf(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &DeepLeaf{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestDeepLeafProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedDeepLeaf(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &DeepLeaf{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNilProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNil(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &Nil{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNilProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNil(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &Nil{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNidOptEnumProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidOptEnum(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NidOptEnum{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNidOptEnumProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidOptEnum(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NidOptEnum{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinOptEnumProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptEnum(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NinOptEnum{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinOptEnumProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptEnum(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NinOptEnum{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNidRepEnumProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepEnum(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NidRepEnum{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNidRepEnumProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepEnum(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NidRepEnum{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinRepEnumProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepEnum(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NinRepEnum{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinRepEnumProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepEnum(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NinRepEnum{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinOptEnumDefaultProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptEnumDefault(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NinOptEnumDefault{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinOptEnumDefaultProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptEnumDefault(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NinOptEnumDefault{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestAnotherNinOptEnumProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAnotherNinOptEnum(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &AnotherNinOptEnum{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestAnotherNinOptEnumProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAnotherNinOptEnum(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &AnotherNinOptEnum{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestAnotherNinOptEnumDefaultProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAnotherNinOptEnumDefault(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &AnotherNinOptEnumDefault{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestAnotherNinOptEnumDefaultProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAnotherNinOptEnumDefault(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &AnotherNinOptEnumDefault{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestTimerProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedTimer(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &Timer{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestTimerProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedTimer(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &Timer{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestMyExtendableProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMyExtendable(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &MyExtendable{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestMyExtendableProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMyExtendable(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &MyExtendable{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestOtherExtenableProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedOtherExtenable(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &OtherExtenable{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestOtherExtenableProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedOtherExtenable(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &OtherExtenable{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNestedDefinitionProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNestedDefinition(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NestedDefinition{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNestedDefinitionProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNestedDefinition(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NestedDefinition{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNestedDefinition_NestedMessageProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNestedDefinition_NestedMessage(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NestedDefinition_NestedMessage{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNestedDefinition_NestedMessageProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNestedDefinition_NestedMessage(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NestedDefinition_NestedMessage{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNestedDefinition_NestedMessage_NestedNestedMsgProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NestedDefinition_NestedMessage_NestedNestedMsg{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNestedDefinition_NestedMessage_NestedNestedMsgProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NestedDefinition_NestedMessage_NestedNestedMsg{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNestedScopeProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNestedScope(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NestedScope{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNestedScopeProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNestedScope(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NestedScope{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinOptNativeDefaultProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptNativeDefault(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NinOptNativeDefault{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinOptNativeDefaultProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptNativeDefault(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NinOptNativeDefault{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestCustomContainerProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomContainer(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &CustomContainer{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestCustomContainerProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomContainer(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &CustomContainer{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestCustomNameNidOptNativeProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameNidOptNative(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &CustomNameNidOptNative{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestCustomNameNidOptNativeProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameNidOptNative(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &CustomNameNidOptNative{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestCustomNameNinOptNativeProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameNinOptNative(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &CustomNameNinOptNative{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestCustomNameNinOptNativeProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameNinOptNative(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &CustomNameNinOptNative{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestCustomNameNinRepNativeProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameNinRepNative(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &CustomNameNinRepNative{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestCustomNameNinRepNativeProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameNinRepNative(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &CustomNameNinRepNative{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestCustomNameNinStructProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameNinStruct(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &CustomNameNinStruct{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestCustomNameNinStructProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameNinStruct(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &CustomNameNinStruct{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestCustomNameCustomTypeProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameCustomType(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &CustomNameCustomType{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestCustomNameCustomTypeProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameCustomType(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &CustomNameCustomType{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestCustomNameNinEmbeddedStructUnionProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameNinEmbeddedStructUnion(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &CustomNameNinEmbeddedStructUnion{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestCustomNameNinEmbeddedStructUnionProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameNinEmbeddedStructUnion(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &CustomNameNinEmbeddedStructUnion{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestCustomNameEnumProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameEnum(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &CustomNameEnum{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestCustomNameEnumProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameEnum(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &CustomNameEnum{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNoExtensionsMapProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNoExtensionsMap(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NoExtensionsMap{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNoExtensionsMapProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNoExtensionsMap(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NoExtensionsMap{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestUnrecognizedProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUnrecognized(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &Unrecognized{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestUnrecognizedProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUnrecognized(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &Unrecognized{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestUnrecognizedWithInnerProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUnrecognizedWithInner(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &UnrecognizedWithInner{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestUnrecognizedWithInnerProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUnrecognizedWithInner(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &UnrecognizedWithInner{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestUnrecognizedWithInner_InnerProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUnrecognizedWithInner_Inner(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &UnrecognizedWithInner_Inner{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestUnrecognizedWithInner_InnerProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUnrecognizedWithInner_Inner(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &UnrecognizedWithInner_Inner{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestUnrecognizedWithEmbedProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUnrecognizedWithEmbed(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &UnrecognizedWithEmbed{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestUnrecognizedWithEmbedProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUnrecognizedWithEmbed(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &UnrecognizedWithEmbed{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestUnrecognizedWithEmbed_EmbeddedProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUnrecognizedWithEmbed_Embedded(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &UnrecognizedWithEmbed_Embedded{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestUnrecognizedWithEmbed_EmbeddedProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUnrecognizedWithEmbed_Embedded(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &UnrecognizedWithEmbed_Embedded{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNodeProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNode(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &Node{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNodeProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNode(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &Node{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNidOptNativeCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidOptNative(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NidOptNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNidOptNative(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNinOptNativeCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptNative(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinOptNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNinOptNative(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNidRepNativeCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidRepNative(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NidRepNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNidRepNative(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNinRepNativeCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinRepNative(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinRepNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNinRepNative(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNidRepPackedNativeCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidRepPackedNative(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NidRepPackedNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNidRepPackedNative(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNinRepPackedNativeCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinRepPackedNative(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinRepPackedNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNinRepPackedNative(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNidOptStructCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidOptStruct(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NidOptStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNidOptStruct(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNinOptStructCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptStruct(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinOptStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNinOptStruct(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNidRepStructCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidRepStruct(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NidRepStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNidRepStruct(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNinRepStructCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinRepStruct(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinRepStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNinRepStruct(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNidEmbeddedStructCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidEmbeddedStruct(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NidEmbeddedStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNidEmbeddedStruct(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNinEmbeddedStructCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinEmbeddedStruct(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinEmbeddedStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNinEmbeddedStruct(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNidNestedStructCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidNestedStruct(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NidNestedStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNidNestedStruct(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNinNestedStructCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinNestedStruct(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinNestedStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNinNestedStruct(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNidOptCustomCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidOptCustom(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NidOptCustom{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNidOptCustom(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestCustomDashCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomDash(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &CustomDash{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedCustomDash(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNinOptCustomCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptCustom(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinOptCustom{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNinOptCustom(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNidRepCustomCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidRepCustom(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NidRepCustom{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNidRepCustom(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNinRepCustomCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinRepCustom(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinRepCustom{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNinRepCustom(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNinOptNativeUnionCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptNativeUnion(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinOptNativeUnion{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNinOptNativeUnion(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNinOptStructUnionCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptStructUnion(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinOptStructUnion{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNinOptStructUnion(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNinEmbeddedStructUnionCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinEmbeddedStructUnion(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinEmbeddedStructUnion{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNinEmbeddedStructUnion(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNinNestedStructUnionCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinNestedStructUnion(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinNestedStructUnion{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNinNestedStructUnion(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestTreeCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedTree(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &Tree{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedTree(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestOrBranchCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedOrBranch(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &OrBranch{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedOrBranch(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestAndBranchCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAndBranch(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &AndBranch{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedAndBranch(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestLeafCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedLeaf(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &Leaf{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedLeaf(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestDeepTreeCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedDeepTree(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &DeepTree{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedDeepTree(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestADeepBranchCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedADeepBranch(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &ADeepBranch{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedADeepBranch(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestAndDeepBranchCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAndDeepBranch(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &AndDeepBranch{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedAndDeepBranch(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestDeepLeafCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedDeepLeaf(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &DeepLeaf{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedDeepLeaf(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNilCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNil(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &Nil{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNil(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNidOptEnumCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidOptEnum(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NidOptEnum{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNidOptEnum(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNinOptEnumCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptEnum(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinOptEnum{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNinOptEnum(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNidRepEnumCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidRepEnum(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NidRepEnum{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNidRepEnum(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNinRepEnumCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinRepEnum(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinRepEnum{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNinRepEnum(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNinOptEnumDefaultCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptEnumDefault(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinOptEnumDefault{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNinOptEnumDefault(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestAnotherNinOptEnumCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAnotherNinOptEnum(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &AnotherNinOptEnum{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedAnotherNinOptEnum(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestAnotherNinOptEnumDefaultCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAnotherNinOptEnumDefault(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &AnotherNinOptEnumDefault{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedAnotherNinOptEnumDefault(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestTimerCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedTimer(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &Timer{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedTimer(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestMyExtendableCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedMyExtendable(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &MyExtendable{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedMyExtendable(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestOtherExtenableCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedOtherExtenable(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &OtherExtenable{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedOtherExtenable(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNestedDefinitionCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNestedDefinition(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NestedDefinition{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNestedDefinition(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNestedDefinition_NestedMessageCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNestedDefinition_NestedMessage(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NestedDefinition_NestedMessage{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNestedDefinition_NestedMessage(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNestedDefinition_NestedMessage_NestedNestedMsgCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NestedDefinition_NestedMessage_NestedNestedMsg{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNestedScopeCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNestedScope(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NestedScope{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNestedScope(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNinOptNativeDefaultCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptNativeDefault(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinOptNativeDefault{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNinOptNativeDefault(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestCustomContainerCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomContainer(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &CustomContainer{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedCustomContainer(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestCustomNameNidOptNativeCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameNidOptNative(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &CustomNameNidOptNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedCustomNameNidOptNative(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestCustomNameNinOptNativeCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameNinOptNative(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &CustomNameNinOptNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedCustomNameNinOptNative(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestCustomNameNinRepNativeCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameNinRepNative(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &CustomNameNinRepNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedCustomNameNinRepNative(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestCustomNameNinStructCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameNinStruct(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &CustomNameNinStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedCustomNameNinStruct(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestCustomNameCustomTypeCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameCustomType(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &CustomNameCustomType{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedCustomNameCustomType(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestCustomNameNinEmbeddedStructUnionCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameNinEmbeddedStructUnion(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &CustomNameNinEmbeddedStructUnion{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedCustomNameNinEmbeddedStructUnion(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestCustomNameEnumCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameEnum(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &CustomNameEnum{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedCustomNameEnum(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNoExtensionsMapCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNoExtensionsMap(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NoExtensionsMap{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNoExtensionsMap(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestUnrecognizedCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedUnrecognized(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &Unrecognized{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedUnrecognized(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestUnrecognizedWithInnerCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedUnrecognizedWithInner(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &UnrecognizedWithInner{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedUnrecognizedWithInner(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestUnrecognizedWithInner_InnerCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedUnrecognizedWithInner_Inner(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &UnrecognizedWithInner_Inner{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedUnrecognizedWithInner_Inner(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestUnrecognizedWithEmbedCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedUnrecognizedWithEmbed(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &UnrecognizedWithEmbed{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedUnrecognizedWithEmbed(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestUnrecognizedWithEmbed_EmbeddedCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedUnrecognizedWithEmbed_Embedded(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &UnrecognizedWithEmbed_Embedded{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedUnrecognizedWithEmbed_Embedded(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNodeCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNode(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &Node{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNode(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestThetestDescription(t *testing.T) { + ThetestDescription() +} +func TestNidOptNativeVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidOptNative(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NidOptNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNinOptNativeVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptNative(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinOptNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNidRepNativeVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidRepNative(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NidRepNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNinRepNativeVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinRepNative(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinRepNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNidRepPackedNativeVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidRepPackedNative(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NidRepPackedNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNinRepPackedNativeVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinRepPackedNative(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinRepPackedNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNidOptStructVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidOptStruct(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NidOptStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNinOptStructVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptStruct(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinOptStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNidRepStructVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidRepStruct(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NidRepStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNinRepStructVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinRepStruct(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinRepStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNidEmbeddedStructVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidEmbeddedStruct(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NidEmbeddedStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNinEmbeddedStructVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinEmbeddedStruct(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinEmbeddedStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNidNestedStructVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidNestedStruct(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NidNestedStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNinNestedStructVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinNestedStruct(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinNestedStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNidOptCustomVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidOptCustom(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NidOptCustom{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestCustomDashVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomDash(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &CustomDash{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNinOptCustomVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptCustom(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinOptCustom{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNidRepCustomVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidRepCustom(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NidRepCustom{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNinRepCustomVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinRepCustom(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinRepCustom{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNinOptNativeUnionVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptNativeUnion(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinOptNativeUnion{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNinOptStructUnionVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptStructUnion(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinOptStructUnion{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNinEmbeddedStructUnionVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinEmbeddedStructUnion(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinEmbeddedStructUnion{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNinNestedStructUnionVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinNestedStructUnion(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinNestedStructUnion{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestTreeVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedTree(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &Tree{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestOrBranchVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedOrBranch(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &OrBranch{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestAndBranchVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAndBranch(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &AndBranch{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestLeafVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedLeaf(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &Leaf{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestDeepTreeVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedDeepTree(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &DeepTree{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestADeepBranchVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedADeepBranch(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &ADeepBranch{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestAndDeepBranchVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAndDeepBranch(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &AndDeepBranch{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestDeepLeafVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedDeepLeaf(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &DeepLeaf{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNilVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNil(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &Nil{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNidOptEnumVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidOptEnum(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NidOptEnum{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNinOptEnumVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptEnum(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinOptEnum{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNidRepEnumVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidRepEnum(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NidRepEnum{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNinRepEnumVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinRepEnum(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinRepEnum{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNinOptEnumDefaultVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptEnumDefault(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinOptEnumDefault{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestAnotherNinOptEnumVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAnotherNinOptEnum(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &AnotherNinOptEnum{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestAnotherNinOptEnumDefaultVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAnotherNinOptEnumDefault(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &AnotherNinOptEnumDefault{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestTimerVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedTimer(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &Timer{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestMyExtendableVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedMyExtendable(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &MyExtendable{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestOtherExtenableVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedOtherExtenable(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &OtherExtenable{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNestedDefinitionVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNestedDefinition(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NestedDefinition{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNestedDefinition_NestedMessageVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNestedDefinition_NestedMessage(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NestedDefinition_NestedMessage{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNestedDefinition_NestedMessage_NestedNestedMsgVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NestedDefinition_NestedMessage_NestedNestedMsg{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNestedScopeVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNestedScope(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NestedScope{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNinOptNativeDefaultVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptNativeDefault(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinOptNativeDefault{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestCustomContainerVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomContainer(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &CustomContainer{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestCustomNameNidOptNativeVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameNidOptNative(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &CustomNameNidOptNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestCustomNameNinOptNativeVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameNinOptNative(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &CustomNameNinOptNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestCustomNameNinRepNativeVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameNinRepNative(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &CustomNameNinRepNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestCustomNameNinStructVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameNinStruct(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &CustomNameNinStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestCustomNameCustomTypeVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameCustomType(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &CustomNameCustomType{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestCustomNameNinEmbeddedStructUnionVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameNinEmbeddedStructUnion(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &CustomNameNinEmbeddedStructUnion{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestCustomNameEnumVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameEnum(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &CustomNameEnum{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNoExtensionsMapVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNoExtensionsMap(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NoExtensionsMap{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestUnrecognizedVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedUnrecognized(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &Unrecognized{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestUnrecognizedWithInnerVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedUnrecognizedWithInner(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &UnrecognizedWithInner{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestUnrecognizedWithInner_InnerVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedUnrecognizedWithInner_Inner(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &UnrecognizedWithInner_Inner{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestUnrecognizedWithEmbedVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedUnrecognizedWithEmbed(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &UnrecognizedWithEmbed{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestUnrecognizedWithEmbed_EmbeddedVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedUnrecognizedWithEmbed_Embedded(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &UnrecognizedWithEmbed_Embedded{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNodeVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNode(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &Node{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNidOptNativeFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidOptNative(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNinOptNativeFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptNative(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNidRepNativeFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidRepNative(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNinRepNativeFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinRepNative(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNidRepPackedNativeFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidRepPackedNative(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNinRepPackedNativeFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinRepPackedNative(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNidOptStructFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidOptStruct(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNinOptStructFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptStruct(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNidRepStructFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidRepStruct(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNinRepStructFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinRepStruct(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNidEmbeddedStructFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidEmbeddedStruct(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNinEmbeddedStructFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinEmbeddedStruct(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNidNestedStructFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidNestedStruct(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNinNestedStructFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinNestedStruct(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNidOptCustomFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidOptCustom(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestCustomDashFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomDash(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNinOptCustomFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptCustom(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNidRepCustomFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidRepCustom(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNinRepCustomFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinRepCustom(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNinOptNativeUnionFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptNativeUnion(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNinOptStructUnionFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptStructUnion(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNinEmbeddedStructUnionFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinEmbeddedStructUnion(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNinNestedStructUnionFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinNestedStructUnion(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestTreeFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedTree(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestOrBranchFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedOrBranch(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestAndBranchFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAndBranch(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestLeafFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedLeaf(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestDeepTreeFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedDeepTree(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestADeepBranchFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedADeepBranch(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestAndDeepBranchFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAndDeepBranch(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestDeepLeafFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedDeepLeaf(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNilFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNil(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNidOptEnumFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidOptEnum(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNinOptEnumFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptEnum(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNidRepEnumFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidRepEnum(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNinRepEnumFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinRepEnum(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestAnotherNinOptEnumFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAnotherNinOptEnum(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestTimerFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedTimer(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNestedDefinitionFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNestedDefinition(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNestedDefinition_NestedMessageFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNestedDefinition_NestedMessage(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNestedDefinition_NestedMessage_NestedNestedMsgFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNestedScopeFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNestedScope(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestCustomContainerFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomContainer(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestCustomNameNidOptNativeFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameNidOptNative(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestCustomNameNinOptNativeFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameNinOptNative(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestCustomNameNinRepNativeFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameNinRepNative(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestCustomNameNinStructFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameNinStruct(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestCustomNameCustomTypeFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameCustomType(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestCustomNameNinEmbeddedStructUnionFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameNinEmbeddedStructUnion(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestCustomNameEnumFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameEnum(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestUnrecognizedFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedUnrecognized(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestUnrecognizedWithInnerFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedUnrecognizedWithInner(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestUnrecognizedWithInner_InnerFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedUnrecognizedWithInner_Inner(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestUnrecognizedWithEmbedFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedUnrecognizedWithEmbed(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestUnrecognizedWithEmbed_EmbeddedFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedUnrecognizedWithEmbed_Embedded(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNodeFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNode(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNidOptNativeGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidOptNative(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestNinOptNativeGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptNative(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestNidRepNativeGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidRepNative(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestNinRepNativeGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinRepNative(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestNidRepPackedNativeGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidRepPackedNative(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestNinRepPackedNativeGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinRepPackedNative(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestNidOptStructGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidOptStruct(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestNinOptStructGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptStruct(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestNidRepStructGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidRepStruct(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestNinRepStructGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinRepStruct(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestNidEmbeddedStructGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidEmbeddedStruct(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestNinEmbeddedStructGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinEmbeddedStruct(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestNidNestedStructGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidNestedStruct(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestNinNestedStructGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinNestedStruct(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestNidOptCustomGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidOptCustom(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestCustomDashGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomDash(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestNinOptCustomGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptCustom(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestNidRepCustomGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidRepCustom(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestNinRepCustomGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinRepCustom(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestNinOptNativeUnionGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptNativeUnion(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestNinOptStructUnionGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptStructUnion(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestNinEmbeddedStructUnionGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinEmbeddedStructUnion(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestNinNestedStructUnionGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinNestedStructUnion(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestTreeGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedTree(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestOrBranchGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedOrBranch(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestAndBranchGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAndBranch(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestLeafGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedLeaf(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestDeepTreeGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedDeepTree(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestADeepBranchGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedADeepBranch(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestAndDeepBranchGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAndDeepBranch(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestDeepLeafGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedDeepLeaf(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestNilGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNil(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestNidOptEnumGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidOptEnum(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestNinOptEnumGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptEnum(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestNidRepEnumGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidRepEnum(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestNinRepEnumGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinRepEnum(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestNinOptEnumDefaultGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptEnumDefault(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestAnotherNinOptEnumGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAnotherNinOptEnum(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestAnotherNinOptEnumDefaultGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAnotherNinOptEnumDefault(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestTimerGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedTimer(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestMyExtendableGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedMyExtendable(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestOtherExtenableGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedOtherExtenable(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestNestedDefinitionGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNestedDefinition(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestNestedDefinition_NestedMessageGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNestedDefinition_NestedMessage(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestNestedDefinition_NestedMessage_NestedNestedMsgGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestNestedScopeGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNestedScope(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestNinOptNativeDefaultGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptNativeDefault(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestCustomContainerGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomContainer(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestCustomNameNidOptNativeGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameNidOptNative(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestCustomNameNinOptNativeGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameNinOptNative(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestCustomNameNinRepNativeGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameNinRepNative(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestCustomNameNinStructGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameNinStruct(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestCustomNameCustomTypeGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameCustomType(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestCustomNameNinEmbeddedStructUnionGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameNinEmbeddedStructUnion(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestCustomNameEnumGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameEnum(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestNoExtensionsMapGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNoExtensionsMap(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestUnrecognizedGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedUnrecognized(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestUnrecognizedWithInnerGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedUnrecognizedWithInner(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestUnrecognizedWithInner_InnerGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedUnrecognizedWithInner_Inner(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestUnrecognizedWithEmbedGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedUnrecognizedWithEmbed(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestUnrecognizedWithEmbed_EmbeddedGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedUnrecognizedWithEmbed_Embedded(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestNodeGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNode(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestNidOptNativeSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidOptNative(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNidOptNativeSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NidOptNative, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNidOptNative(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinOptNativeSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptNative(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNinOptNativeSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinOptNative, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNinOptNative(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNidRepNativeSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepNative(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNidRepNativeSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NidRepNative, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNidRepNative(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinRepNativeSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepNative(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNinRepNativeSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinRepNative, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNinRepNative(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNidRepPackedNativeSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepPackedNative(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNidRepPackedNativeSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NidRepPackedNative, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNidRepPackedNative(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinRepPackedNativeSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepPackedNative(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNinRepPackedNativeSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinRepPackedNative, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNinRepPackedNative(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNidOptStructSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidOptStruct(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNidOptStructSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NidOptStruct, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNidOptStruct(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinOptStructSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptStruct(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNinOptStructSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinOptStruct, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNinOptStruct(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNidRepStructSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepStruct(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNidRepStructSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NidRepStruct, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNidRepStruct(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinRepStructSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepStruct(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNinRepStructSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinRepStruct, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNinRepStruct(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNidEmbeddedStructSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidEmbeddedStruct(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNidEmbeddedStructSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NidEmbeddedStruct, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNidEmbeddedStruct(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinEmbeddedStructSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinEmbeddedStruct(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNinEmbeddedStructSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinEmbeddedStruct, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNinEmbeddedStruct(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNidNestedStructSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidNestedStruct(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNidNestedStructSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NidNestedStruct, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNidNestedStruct(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinNestedStructSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinNestedStruct(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNinNestedStructSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinNestedStruct, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNinNestedStruct(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNidOptCustomSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidOptCustom(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNidOptCustomSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NidOptCustom, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNidOptCustom(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestCustomDashSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomDash(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkCustomDashSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*CustomDash, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedCustomDash(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinOptCustomSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptCustom(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNinOptCustomSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinOptCustom, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNinOptCustom(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNidRepCustomSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepCustom(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNidRepCustomSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NidRepCustom, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNidRepCustom(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinRepCustomSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepCustom(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNinRepCustomSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinRepCustom, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNinRepCustom(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinOptNativeUnionSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptNativeUnion(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNinOptNativeUnionSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinOptNativeUnion, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNinOptNativeUnion(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinOptStructUnionSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptStructUnion(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNinOptStructUnionSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinOptStructUnion, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNinOptStructUnion(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinEmbeddedStructUnionSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinEmbeddedStructUnion(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNinEmbeddedStructUnionSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinEmbeddedStructUnion, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNinEmbeddedStructUnion(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinNestedStructUnionSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinNestedStructUnion(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNinNestedStructUnionSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinNestedStructUnion, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNinNestedStructUnion(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestTreeSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedTree(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkTreeSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Tree, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedTree(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestOrBranchSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedOrBranch(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkOrBranchSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*OrBranch, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedOrBranch(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestAndBranchSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAndBranch(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkAndBranchSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*AndBranch, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedAndBranch(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestLeafSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedLeaf(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkLeafSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Leaf, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedLeaf(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestDeepTreeSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedDeepTree(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkDeepTreeSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*DeepTree, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedDeepTree(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestADeepBranchSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedADeepBranch(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkADeepBranchSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*ADeepBranch, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedADeepBranch(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestAndDeepBranchSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAndDeepBranch(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkAndDeepBranchSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*AndDeepBranch, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedAndDeepBranch(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestDeepLeafSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedDeepLeaf(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkDeepLeafSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*DeepLeaf, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedDeepLeaf(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNilSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNil(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNilSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Nil, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNil(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNidOptEnumSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidOptEnum(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNidOptEnumSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NidOptEnum, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNidOptEnum(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinOptEnumSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptEnum(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNinOptEnumSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinOptEnum, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNinOptEnum(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNidRepEnumSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepEnum(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNidRepEnumSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NidRepEnum, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNidRepEnum(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinRepEnumSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepEnum(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNinRepEnumSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinRepEnum, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNinRepEnum(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinOptEnumDefaultSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptEnumDefault(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNinOptEnumDefaultSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinOptEnumDefault, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNinOptEnumDefault(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestAnotherNinOptEnumSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAnotherNinOptEnum(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkAnotherNinOptEnumSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*AnotherNinOptEnum, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedAnotherNinOptEnum(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestAnotherNinOptEnumDefaultSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAnotherNinOptEnumDefault(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkAnotherNinOptEnumDefaultSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*AnotherNinOptEnumDefault, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedAnotherNinOptEnumDefault(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestTimerSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedTimer(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkTimerSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Timer, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedTimer(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestMyExtendableSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMyExtendable(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkMyExtendableSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*MyExtendable, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedMyExtendable(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestOtherExtenableSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedOtherExtenable(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkOtherExtenableSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*OtherExtenable, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedOtherExtenable(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNestedDefinitionSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNestedDefinition(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNestedDefinitionSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NestedDefinition, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNestedDefinition(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNestedDefinition_NestedMessageSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNestedDefinition_NestedMessage(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNestedDefinition_NestedMessageSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NestedDefinition_NestedMessage, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNestedDefinition_NestedMessage(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNestedDefinition_NestedMessage_NestedNestedMsgSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNestedDefinition_NestedMessage_NestedNestedMsgSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NestedDefinition_NestedMessage_NestedNestedMsg, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNestedScopeSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNestedScope(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNestedScopeSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NestedScope, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNestedScope(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinOptNativeDefaultSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptNativeDefault(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNinOptNativeDefaultSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinOptNativeDefault, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNinOptNativeDefault(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestCustomContainerSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomContainer(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkCustomContainerSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*CustomContainer, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedCustomContainer(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestCustomNameNidOptNativeSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameNidOptNative(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkCustomNameNidOptNativeSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*CustomNameNidOptNative, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedCustomNameNidOptNative(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestCustomNameNinOptNativeSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameNinOptNative(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkCustomNameNinOptNativeSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*CustomNameNinOptNative, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedCustomNameNinOptNative(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestCustomNameNinRepNativeSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameNinRepNative(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkCustomNameNinRepNativeSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*CustomNameNinRepNative, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedCustomNameNinRepNative(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestCustomNameNinStructSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameNinStruct(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkCustomNameNinStructSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*CustomNameNinStruct, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedCustomNameNinStruct(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestCustomNameCustomTypeSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameCustomType(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkCustomNameCustomTypeSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*CustomNameCustomType, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedCustomNameCustomType(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestCustomNameNinEmbeddedStructUnionSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameNinEmbeddedStructUnion(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkCustomNameNinEmbeddedStructUnionSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*CustomNameNinEmbeddedStructUnion, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedCustomNameNinEmbeddedStructUnion(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestCustomNameEnumSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameEnum(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkCustomNameEnumSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*CustomNameEnum, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedCustomNameEnum(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNoExtensionsMapSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNoExtensionsMap(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNoExtensionsMapSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NoExtensionsMap, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNoExtensionsMap(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestUnrecognizedSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUnrecognized(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkUnrecognizedSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Unrecognized, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedUnrecognized(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestUnrecognizedWithInnerSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUnrecognizedWithInner(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkUnrecognizedWithInnerSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*UnrecognizedWithInner, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedUnrecognizedWithInner(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestUnrecognizedWithInner_InnerSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUnrecognizedWithInner_Inner(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkUnrecognizedWithInner_InnerSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*UnrecognizedWithInner_Inner, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedUnrecognizedWithInner_Inner(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestUnrecognizedWithEmbedSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUnrecognizedWithEmbed(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkUnrecognizedWithEmbedSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*UnrecognizedWithEmbed, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedUnrecognizedWithEmbed(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestUnrecognizedWithEmbed_EmbeddedSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUnrecognizedWithEmbed_Embedded(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkUnrecognizedWithEmbed_EmbeddedSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*UnrecognizedWithEmbed_Embedded, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedUnrecognizedWithEmbed_Embedded(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNodeSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNode(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNodeSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Node, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNode(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNidOptNativeStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidOptNative(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNinOptNativeStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptNative(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNidRepNativeStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidRepNative(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNinRepNativeStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinRepNative(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNidRepPackedNativeStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidRepPackedNative(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNinRepPackedNativeStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinRepPackedNative(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNidOptStructStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidOptStruct(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNinOptStructStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptStruct(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNidRepStructStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidRepStruct(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNinRepStructStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinRepStruct(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNidEmbeddedStructStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidEmbeddedStruct(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNinEmbeddedStructStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinEmbeddedStruct(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNidNestedStructStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidNestedStruct(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNinNestedStructStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinNestedStruct(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNidOptCustomStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidOptCustom(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestCustomDashStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomDash(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNinOptCustomStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptCustom(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNidRepCustomStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidRepCustom(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNinRepCustomStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinRepCustom(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNinOptNativeUnionStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptNativeUnion(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNinOptStructUnionStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptStructUnion(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNinEmbeddedStructUnionStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinEmbeddedStructUnion(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNinNestedStructUnionStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinNestedStructUnion(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestTreeStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedTree(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestOrBranchStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedOrBranch(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestAndBranchStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAndBranch(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestLeafStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedLeaf(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestDeepTreeStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedDeepTree(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestADeepBranchStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedADeepBranch(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestAndDeepBranchStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAndDeepBranch(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestDeepLeafStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedDeepLeaf(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNilStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNil(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNidOptEnumStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidOptEnum(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNinOptEnumStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptEnum(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNidRepEnumStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidRepEnum(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNinRepEnumStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinRepEnum(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNinOptEnumDefaultStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptEnumDefault(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestAnotherNinOptEnumStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAnotherNinOptEnum(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestAnotherNinOptEnumDefaultStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAnotherNinOptEnumDefault(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestTimerStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedTimer(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestMyExtendableStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedMyExtendable(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestOtherExtenableStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedOtherExtenable(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNestedDefinitionStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNestedDefinition(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNestedDefinition_NestedMessageStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNestedDefinition_NestedMessage(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNestedDefinition_NestedMessage_NestedNestedMsgStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNestedScopeStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNestedScope(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNinOptNativeDefaultStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptNativeDefault(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestCustomContainerStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomContainer(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestCustomNameNidOptNativeStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameNidOptNative(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestCustomNameNinOptNativeStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameNinOptNative(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestCustomNameNinRepNativeStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameNinRepNative(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestCustomNameNinStructStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameNinStruct(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestCustomNameCustomTypeStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameCustomType(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestCustomNameNinEmbeddedStructUnionStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameNinEmbeddedStructUnion(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestCustomNameEnumStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameEnum(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNoExtensionsMapStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNoExtensionsMap(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestUnrecognizedStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedUnrecognized(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestUnrecognizedWithInnerStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedUnrecognizedWithInner(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestUnrecognizedWithInner_InnerStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedUnrecognizedWithInner_Inner(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestUnrecognizedWithEmbedStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedUnrecognizedWithEmbed(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestUnrecognizedWithEmbed_EmbeddedStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedUnrecognizedWithEmbed_Embedded(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNodeStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNode(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNinOptNativeUnionOnlyOne(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptNativeUnion(popr, true) + v := p.GetValue() + msg := &NinOptNativeUnion{} + if !msg.SetValue(v) { + t.Fatalf("OnlyOne: Could not set Value") + } + if !p.Equal(msg) { + t.Fatalf("%#v !OnlyOne Equal %#v", msg, p) + } +} +func TestNinOptStructUnionOnlyOne(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptStructUnion(popr, true) + v := p.GetValue() + msg := &NinOptStructUnion{} + if !msg.SetValue(v) { + t.Fatalf("OnlyOne: Could not set Value") + } + if !p.Equal(msg) { + t.Fatalf("%#v !OnlyOne Equal %#v", msg, p) + } +} +func TestNinEmbeddedStructUnionOnlyOne(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinEmbeddedStructUnion(popr, true) + v := p.GetValue() + msg := &NinEmbeddedStructUnion{} + if !msg.SetValue(v) { + t.Fatalf("OnlyOne: Could not set Value") + } + if !p.Equal(msg) { + t.Fatalf("%#v !OnlyOne Equal %#v", msg, p) + } +} +func TestNinNestedStructUnionOnlyOne(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinNestedStructUnion(popr, true) + v := p.GetValue() + msg := &NinNestedStructUnion{} + if !msg.SetValue(v) { + t.Fatalf("OnlyOne: Could not set Value") + } + if !p.Equal(msg) { + t.Fatalf("%#v !OnlyOne Equal %#v", msg, p) + } +} +func TestTreeOnlyOne(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedTree(popr, true) + v := p.GetValue() + msg := &Tree{} + if !msg.SetValue(v) { + t.Fatalf("OnlyOne: Could not set Value") + } + if !p.Equal(msg) { + t.Fatalf("%#v !OnlyOne Equal %#v", msg, p) + } +} +func TestDeepTreeOnlyOne(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedDeepTree(popr, true) + v := p.GetValue() + msg := &DeepTree{} + if !msg.SetValue(v) { + t.Fatalf("OnlyOne: Could not set Value") + } + if !p.Equal(msg) { + t.Fatalf("%#v !OnlyOne Equal %#v", msg, p) + } +} +func TestCustomNameNinEmbeddedStructUnionOnlyOne(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameNinEmbeddedStructUnion(popr, true) + v := p.GetValue() + msg := &CustomNameNinEmbeddedStructUnion{} + if !msg.SetValue(v) { + t.Fatalf("OnlyOne: Could not set Value") + } + if !p.Equal(msg) { + t.Fatalf("%#v !OnlyOne Equal %#v", msg, p) + } +} + +//These tests are generated by github.com/gogo/protobuf/plugin/testgen diff --git a/vendor/github.com/gogo/protobuf/test/combos/both/uuid.go b/vendor/github.com/gogo/protobuf/test/combos/both/uuid.go new file mode 100644 index 000000000..760111191 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/combos/both/uuid.go @@ -0,0 +1,126 @@ +// Extensions for Protocol Buffers to create more go like structures. +// +// Copyright (c) 2013, Vastech SA (PTY) LTD. All rights reserved. +// http://github.com/gogo/protobuf/gogoproto +// +// 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 test + +import ( + "bytes" + "encoding/json" +) + +func PutLittleEndianUint64(b []byte, offset int, v uint64) { + b[offset] = byte(v) + b[offset+1] = byte(v >> 8) + b[offset+2] = byte(v >> 16) + b[offset+3] = byte(v >> 24) + b[offset+4] = byte(v >> 32) + b[offset+5] = byte(v >> 40) + b[offset+6] = byte(v >> 48) + b[offset+7] = byte(v >> 56) +} + +type Uuid []byte + +func (uuid Uuid) Marshal() ([]byte, error) { + if len(uuid) == 0 { + return nil, nil + } + return []byte(uuid), nil +} + +func (uuid Uuid) MarshalTo(data []byte) (n int, err error) { + if len(uuid) == 0 { + return 0, nil + } + copy(data, uuid) + return 16, nil +} + +func (uuid *Uuid) Unmarshal(data []byte) error { + if len(data) == 0 { + uuid = nil + return nil + } + id := Uuid(make([]byte, 16)) + copy(id, data) + *uuid = id + return nil +} + +func (uuid *Uuid) Size() int { + if uuid == nil { + return 0 + } + if len(*uuid) == 0 { + return 0 + } + return 16 +} + +func (uuid Uuid) MarshalJSON() ([]byte, error) { + return json.Marshal([]byte(uuid)) +} + +func (uuid *Uuid) UnmarshalJSON(data []byte) error { + v := new([]byte) + err := json.Unmarshal(data, v) + if err != nil { + return err + } + return uuid.Unmarshal(*v) +} + +func (uuid Uuid) Equal(other Uuid) bool { + return bytes.Equal(uuid[0:], other[0:]) +} + +func (uuid Uuid) Compare(other Uuid) int { + return bytes.Compare(uuid[0:], other[0:]) +} + +type int63 interface { + Int63() int64 +} + +func NewPopulatedUuid(r int63) *Uuid { + u := RandV4(r) + return &u +} + +func RandV4(r int63) Uuid { + uuid := make(Uuid, 16) + uuid.RandV4(r) + return uuid +} + +func (uuid Uuid) RandV4(r int63) { + PutLittleEndianUint64(uuid, 0, uint64(r.Int63())) + PutLittleEndianUint64(uuid, 8, uint64(r.Int63())) + uuid[6] = (uuid[6] & 0xf) | 0x40 + uuid[8] = (uuid[8] & 0x3f) | 0x80 +} diff --git a/vendor/github.com/gogo/protobuf/test/combos/marshaler/bug_test.go b/vendor/github.com/gogo/protobuf/test/combos/marshaler/bug_test.go new file mode 100644 index 000000000..2386c48e5 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/combos/marshaler/bug_test.go @@ -0,0 +1,250 @@ +// Copyright (c) 2013, Vastech SA (PTY) LTD. All rights reserved. +// http://github.com/gogo/protobuf/gogoproto +// +// 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 test + +import ( + "fmt" + "math" + "math/rand" + "testing" + "time" + + "github.com/gogo/protobuf/proto" +) + +//http://code.google.com/p/goprotobuf/issues/detail?id=39 +func TestBugUint32VarintSize(t *testing.T) { + temp := uint32(math.MaxUint32) + n := &NinOptNative{} + n.Field5 = &temp + data, err := proto.Marshal(n) + if err != nil { + panic(err) + } + if len(data) != 6 { + t.Fatalf("data should be length 6, but its %#v", data) + } +} + +func TestBugZeroLengthSliceSize(t *testing.T) { + n := &NinRepPackedNative{ + Field8: []int64{}, + } + size := n.Size() + data, err := proto.Marshal(n) + if err != nil { + panic(err) + } + if len(data) != size { + t.Fatalf("expected %v, but got %v", len(data), size) + } +} + +//http://code.google.com/p/goprotobuf/issues/detail?id=40 +func TestBugPackedProtoSize(t *testing.T) { + n := &NinRepPackedNative{ + Field4: []int64{172960727389894724, 2360337516664475010, 860833876131988189, 9068073014890763245, 7794843386260381831, 4023536436053141786, 8992311247496919020, 4330096163611305776, 4490411416244976467, 7873947349172707443, 2754969595834279669, 1360667855926938684, 4771480785172657389, 4875578924966668055, 8070579869808877481, 9128179594766551001, 4630419407064527516, 863844540220372892, 8208727650143073487, 7086117356301045838, 7779695211931506151, 5493835345187563535, 9119767633370806007, 9054342025895349248, 1887303228838508438, 7624573031734528281, 1874668389749611225, 3517684643468970593, 6677697606628877758, 7293473953189936168, 444475066704085538, 8594971141363049302, 1146643249094989673, 733393306232853371, 7721178528893916886, 7784452000911004429, 6436373110242711440, 6897422461738321237, 8772249155667732778, 6211871464311393541, 3061903718310406883, 7845488913176136641, 8342255034663902574, 3443058984649725748, 8410801047334832902, 7496541071517841153, 4305416923521577765, 7814967600020476457, 8671843803465481186, 3490266370361096855, 1447425664719091336, 653218597262334239, 8306243902880091940, 7851896059762409081, 5936760560798954978, 5755724498441478025, 7022701569985035966, 3707709584811468220, 529069456924666920, 7986469043681522462, 3092513330689518836, 5103541550470476202, 3577384161242626406, 3733428084624703294, 8388690542440473117, 3262468785346149388, 8788358556558007570, 5476276940198542020, 7277903243119461239, 5065861426928605020, 7533460976202697734, 1749213838654236956, 557497603941617931, 5496307611456481108, 6444547750062831720, 6992758776744205596, 7356719693428537399, 2896328872476734507, 381447079530132038, 598300737753233118, 3687980626612697715, 7240924191084283349, 8172414415307971170, 4847024388701257185, 2081764168600256551, 3394217778539123488, 6244660626429310923, 8301712215675381614, 5360615125359461174, 8410140945829785773, 3152963269026381373, 6197275282781459633, 4419829061407546410, 6262035523070047537, 2837207483933463885, 2158105736666826128, 8150764172235490711}, + Field7: []int32{249451845, 1409974015, 393609128, 435232428, 1817529040, 91769006, 861170933, 1556185603, 1568580279, 1236375273, 512276621, 693633711, 967580535, 1950715977, 853431462, 1362390253, 159591204, 111900629, 322985263, 279671129, 1592548430, 465651370, 733849989, 1172059400, 1574824441, 263541092, 1271612397, 1520584358, 467078791, 117698716, 1098255064, 2054264846, 1766452305, 1267576395, 1557505617, 1187833560, 956187431, 1970977586, 1160235159, 1610259028, 489585797, 459139078, 566263183, 954319278, 1545018565, 1753946743, 948214318, 422878159, 883926576, 1424009347, 824732372, 1290433180, 80297942, 417294230, 1402647904, 2078392782, 220505045, 787368129, 463781454, 293083578, 808156928, 293976361}, + Field9: []uint32{0xaa4976e8, 0x3da8cc4c, 0x8c470d83, 0x344d964e, 0x5b90925, 0xa4c4d34e, 0x666eff19, 0xc238e552, 0x9be53bb6, 0x56364245, 0x33ee079d, 0x96bf0ede, 0x7941b74f, 0xdb07cb47, 0x6d76d827, 0x9b211d5d, 0x2798adb6, 0xe48b0c3b, 0x87061b21, 0x48f4e4d2, 0x3e5d5c12, 0x5ee91288, 0x336d4f35, 0xe1d44941, 0xc065548d, 0x2953d73f, 0x873af451, 0xfc769db, 0x9f1bf8da, 0x9baafdfc, 0xf1d3d770, 0x5bb5d2b4, 0xc2c67c48, 0x6845c4c1, 0xa48f32b0, 0xbb04bb70, 0xa5b1ca36, 0x8d98356a, 0x2171f654, 0x5ae279b0, 0x6c4a3d6b, 0x4fff5468, 0xcf9bf851, 0x68513614, 0xdbecd9b0, 0x9553ed3c, 0xa494a736, 0x42205438, 0xbf8e5caa, 0xd3283c6, 0x76d20788, 0x9179826f, 0x96b24f85, 0xbc2eacf4, 0xe4afae0b, 0x4bca85cb, 0x35e63b5b, 0xd7ccee0c, 0x2b506bb9, 0xe78e9f44, 0x9ad232f1, 0x99a37335, 0xa5d6ffc8}, + Field11: []uint64{0x53c01ebc, 0x4fb85ba6, 0x8805eea1, 0xb20ec896, 0x93b63410, 0xec7c9492, 0x50765a28, 0x19592106, 0x2ecc59b3, 0x39cd474f, 0xe4c9e47, 0x444f48c5, 0xe7731d32, 0xf3f43975, 0x603caedd, 0xbb05a1af, 0xa808e34e, 0x88580b07, 0x4c96bbd1, 0x730b4ab9, 0xed126e2b, 0x6db48205, 0x154ba1b9, 0xc26bfb6a, 0x389aa052, 0x869d966c, 0x7c86b366, 0xcc8edbcd, 0xfa8d6dad, 0xcf5857d9, 0x2d9cda0f, 0x1218a0b8, 0x41bf997, 0xf0ca65ac, 0xa610d4b9, 0x8d362e28, 0xb7212d87, 0x8e0fe109, 0xbee041d9, 0x759be2f6, 0x35fef4f3, 0xaeacdb71, 0x10888852, 0xf4e28117, 0xe2a14812, 0x73b748dc, 0xd1c3c6b2, 0xfef41bf0, 0xc9b43b62, 0x810e4faa, 0xcaa41c06, 0x1893fe0d, 0xedc7c850, 0xd12b9eaa, 0x467ee1a9, 0xbe84756b, 0xda7b1680, 0xdc069ffe, 0xf1e7e9f9, 0xb3d95370, 0xa92b77df, 0x5693ac41, 0xd04b7287, 0x27aebf15, 0x837b316e, 0x4dbe2263, 0xbab70c67, 0x547dab21, 0x3c346c1f, 0xb8ef0e4e, 0xfe2d03ce, 0xe1d75955, 0xfec1306, 0xba35c23e, 0xb784ed04, 0x2a4e33aa, 0x7e19d09a, 0x3827c1fe, 0xf3a51561, 0xef765e2b, 0xb044256c, 0x62b322be, 0xf34d56be, 0xeb71b369, 0xffe1294f, 0x237fe8d0, 0x77a1473b, 0x239e1196, 0xdd19bf3d, 0x82c91fe1, 0x95361c57, 0xffea3f1b, 0x1a094c84}, + Field12: []int64{8308420747267165049, 3664160795077875961, 7868970059161834817, 7237335984251173739, 5254748003907196506, 3362259627111837480, 430460752854552122, 5119635556501066533, 1277716037866233522, 9185775384759813768, 833932430882717888, 7986528304451297640, 6792233378368656337, 2074207091120609721, 1788723326198279432, 7756514594746453657, 2283775964901597324, 3061497730110517191, 7733947890656120277, 626967303632386244, 7822928600388582821, 3489658753000061230, 168869995163005961, 248814782163480763, 477885608911386247, 4198422415674133867, 3379354662797976109, 9925112544736939, 1486335136459138480, 4561560414032850671, 1010864164014091267, 186722821683803084, 5106357936724819318, 1298160820191228988, 4675403242419953145, 7130634540106489752, 7101280006672440929, 7176058292431955718, 9109875054097770321, 6810974877085322872, 4736707874303993641, 8993135362721382187, 6857881554990254283, 3704748883307461680, 1099360832887634994, 5207691918707192633, 5984721695043995243}, + } + size := proto.Size(n) + data, err := proto.Marshal(n) + if err != nil { + panic(err) + } + if len(data) != size { + t.Fatalf("expected %v, but got %v diff is %v", len(data), size, len(data)-size) + } +} + +func testSize(m interface { + proto.Message + Size() int +}, desc string, expected int) ([]byte, error) { + data, err := proto.Marshal(m) + if err != nil { + return nil, err + } + protoSize := proto.Size(m) + mSize := m.Size() + lenData := len(data) + if protoSize != mSize || protoSize != lenData || mSize != lenData { + return nil, fmt.Errorf("%s proto.Size(m){%d} != m.Size(){%d} != len(data){%d}", desc, protoSize, mSize, lenData) + } + if got := protoSize; got != expected { + return nil, fmt.Errorf("%s proto.Size(m) got %d expected %d", desc, got, expected) + } + if got := mSize; got != expected { + return nil, fmt.Errorf("%s m.Size() got %d expected %d", desc, got, expected) + } + if got := lenData; got != expected { + return nil, fmt.Errorf("%s len(data) got %d expected %d", desc, got, expected) + } + return data, nil +} + +func TestInt32Int64Compatibility(t *testing.T) { + + //test nullable int32 and int64 + + data1, err := testSize(&NinOptNative{ + Field3: proto.Int32(-1), + }, "nullable", 11) + if err != nil { + t.Error(err) + } + //change marshaled data1 to unmarshal into 4th field which is an int64 + data1[0] = uint8(uint32(4 /*fieldNumber*/)<<3 | uint32(0 /*wireType*/)) + u1 := &NinOptNative{} + if err = proto.Unmarshal(data1, u1); err != nil { + t.Error(err) + } + if !u1.Equal(&NinOptNative{ + Field4: proto.Int64(-1), + }) { + t.Error("nullable unmarshaled int32 is not the same int64") + } + + //test non-nullable int32 and int64 + + data2, err := testSize(&NidOptNative{ + Field3: -1, + }, "non nullable", 67) + if err != nil { + t.Error(err) + } + //change marshaled data2 to unmarshal into 4th field which is an int64 + field3 := uint8(uint32(3 /*fieldNumber*/)<<3 | uint32(0 /*wireType*/)) + field4 := uint8(uint32(4 /*fieldNumber*/)<<3 | uint32(0 /*wireType*/)) + for i, c := range data2 { + if c == field4 { + data2[i] = field3 + } else if c == field3 { + data2[i] = field4 + } + } + u2 := &NidOptNative{} + if err = proto.Unmarshal(data2, u2); err != nil { + t.Error(err) + } + if !u2.Equal(&NidOptNative{ + Field4: -1, + }) { + t.Error("non nullable unmarshaled int32 is not the same int64") + } + + //test packed repeated int32 and int64 + + m4 := &NinRepPackedNative{ + Field3: []int32{-1}, + } + data4, err := testSize(m4, "packed", 12) + if err != nil { + t.Error(err) + } + u4 := &NinRepPackedNative{} + if err := proto.Unmarshal(data4, u4); err != nil { + t.Error(err) + } + if err := u4.VerboseEqual(m4); err != nil { + t.Fatalf("%#v", u4) + } + + //test repeated int32 and int64 + + if _, err := testSize(&NinRepNative{ + Field3: []int32{-1}, + }, "repeated", 11); err != nil { + t.Error(err) + } + + t.Logf("tested all") +} + +func TestRepeatedExtensionsMsgsIssue161(t *testing.T) { + r := rand.New(rand.NewSource(time.Now().UnixNano())) + rep := 10 + nins := make([]*NinOptNative, rep) + for i := range nins { + nins[i] = NewPopulatedNinOptNative(r, true) + } + input := &MyExtendable{} + if err := proto.SetExtension(input, E_FieldE, nins); err != nil { + t.Fatal(err) + } + data, err := proto.Marshal(input) + if err != nil { + t.Fatal(err) + } + output := &MyExtendable{} + if err := proto.Unmarshal(data, output); err != nil { + t.Fatal(err) + } + if !input.Equal(output) { + t.Fatal("expected equal") + } + data2, err2 := proto.Marshal(output) + if err2 != nil { + t.Fatal(err2) + } + if len(data) != len(data2) { + t.Fatal("expected equal length buffers") + } +} + +func TestRepeatedExtensionsFieldsIssue161(t *testing.T) { + r := rand.New(rand.NewSource(time.Now().UnixNano())) + rep := 10 + ints := make([]int64, rep) + for i := range ints { + ints[i] = r.Int63() + } + input := &MyExtendable{} + if err := proto.SetExtension(input, E_FieldD, ints); err != nil { + t.Fatal(err) + } + data, err := proto.Marshal(input) + if err != nil { + t.Fatal(err) + } + output := &MyExtendable{} + if err := proto.Unmarshal(data, output); err != nil { + t.Fatal(err) + } + if !input.Equal(output) { + t.Fatal("expected equal") + } + data2, err2 := proto.Marshal(output) + if err2 != nil { + t.Fatal(err2) + } + if len(data) != len(data2) { + t.Fatal("expected equal length buffers") + } +} diff --git a/vendor/github.com/gogo/protobuf/test/combos/marshaler/thetest.pb.go b/vendor/github.com/gogo/protobuf/test/combos/marshaler/thetest.pb.go new file mode 100644 index 000000000..7d3c7c6c6 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/combos/marshaler/thetest.pb.go @@ -0,0 +1,28780 @@ +// Code generated by protoc-gen-gogo. +// source: combos/marshaler/thetest.proto +// DO NOT EDIT! + +/* + Package test is a generated protocol buffer package. + + It is generated from these files: + combos/marshaler/thetest.proto + + It has these top-level messages: + NidOptNative + NinOptNative + NidRepNative + NinRepNative + NidRepPackedNative + NinRepPackedNative + NidOptStruct + NinOptStruct + NidRepStruct + NinRepStruct + NidEmbeddedStruct + NinEmbeddedStruct + NidNestedStruct + NinNestedStruct + NidOptCustom + CustomDash + NinOptCustom + NidRepCustom + NinRepCustom + NinOptNativeUnion + NinOptStructUnion + NinEmbeddedStructUnion + NinNestedStructUnion + Tree + OrBranch + AndBranch + Leaf + DeepTree + ADeepBranch + AndDeepBranch + DeepLeaf + Nil + NidOptEnum + NinOptEnum + NidRepEnum + NinRepEnum + NinOptEnumDefault + AnotherNinOptEnum + AnotherNinOptEnumDefault + Timer + MyExtendable + OtherExtenable + NestedDefinition + NestedScope + NinOptNativeDefault + CustomContainer + CustomNameNidOptNative + CustomNameNinOptNative + CustomNameNinRepNative + CustomNameNinStruct + CustomNameCustomType + CustomNameNinEmbeddedStructUnion + CustomNameEnum + NoExtensionsMap + Unrecognized + UnrecognizedWithInner + UnrecognizedWithEmbed + Node +*/ +package test + +import proto "github.com/gogo/protobuf/proto" +import fmt "fmt" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" + +import github_com_gogo_protobuf_test_custom "github.com/gogo/protobuf/test/custom" +import github_com_gogo_protobuf_test_custom_dash_type "github.com/gogo/protobuf/test/custom-dash-type" + +import bytes "bytes" +import github_com_gogo_protobuf_sortkeys "github.com/gogo/protobuf/sortkeys" + +import github_com_gogo_protobuf_protoc_gen_gogo_descriptor "github.com/gogo/protobuf/protoc-gen-gogo/descriptor" +import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" +import compress_gzip "compress/gzip" +import io_ioutil "io/ioutil" + +import strconv "strconv" + +import strings "strings" +import sort "sort" +import reflect "reflect" + +// 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. +const _ = proto.GoGoProtoPackageIsVersion1 + +type TheTestEnum int32 + +const ( + A TheTestEnum = 0 + B TheTestEnum = 1 + C TheTestEnum = 2 +) + +var TheTestEnum_name = map[int32]string{ + 0: "A", + 1: "B", + 2: "C", +} +var TheTestEnum_value = map[string]int32{ + "A": 0, + "B": 1, + "C": 2, +} + +func (x TheTestEnum) Enum() *TheTestEnum { + p := new(TheTestEnum) + *p = x + return p +} +func (x TheTestEnum) MarshalJSON() ([]byte, error) { + return proto.MarshalJSONEnum(TheTestEnum_name, int32(x)) +} +func (x *TheTestEnum) UnmarshalJSON(data []byte) error { + value, err := proto.UnmarshalJSONEnum(TheTestEnum_value, data, "TheTestEnum") + if err != nil { + return err + } + *x = TheTestEnum(value) + return nil +} +func (TheTestEnum) EnumDescriptor() ([]byte, []int) { return fileDescriptorThetest, []int{0} } + +type AnotherTestEnum int32 + +const ( + D AnotherTestEnum = 10 + E AnotherTestEnum = 11 +) + +var AnotherTestEnum_name = map[int32]string{ + 10: "D", + 11: "E", +} +var AnotherTestEnum_value = map[string]int32{ + "D": 10, + "E": 11, +} + +func (x AnotherTestEnum) Enum() *AnotherTestEnum { + p := new(AnotherTestEnum) + *p = x + return p +} +func (x AnotherTestEnum) MarshalJSON() ([]byte, error) { + return proto.MarshalJSONEnum(AnotherTestEnum_name, int32(x)) +} +func (x *AnotherTestEnum) UnmarshalJSON(data []byte) error { + value, err := proto.UnmarshalJSONEnum(AnotherTestEnum_value, data, "AnotherTestEnum") + if err != nil { + return err + } + *x = AnotherTestEnum(value) + return nil +} +func (AnotherTestEnum) EnumDescriptor() ([]byte, []int) { return fileDescriptorThetest, []int{1} } + +// YetAnotherTestEnum is used to test cross-package import of custom name +// fields and default resolution. +type YetAnotherTestEnum int32 + +const ( + AA YetAnotherTestEnum = 0 + BetterYetBB YetAnotherTestEnum = 1 +) + +var YetAnotherTestEnum_name = map[int32]string{ + 0: "AA", + 1: "BB", +} +var YetAnotherTestEnum_value = map[string]int32{ + "AA": 0, + "BB": 1, +} + +func (x YetAnotherTestEnum) Enum() *YetAnotherTestEnum { + p := new(YetAnotherTestEnum) + *p = x + return p +} +func (x YetAnotherTestEnum) MarshalJSON() ([]byte, error) { + return proto.MarshalJSONEnum(YetAnotherTestEnum_name, int32(x)) +} +func (x *YetAnotherTestEnum) UnmarshalJSON(data []byte) error { + value, err := proto.UnmarshalJSONEnum(YetAnotherTestEnum_value, data, "YetAnotherTestEnum") + if err != nil { + return err + } + *x = YetAnotherTestEnum(value) + return nil +} +func (YetAnotherTestEnum) EnumDescriptor() ([]byte, []int) { return fileDescriptorThetest, []int{2} } + +// YetAnotherTestEnum is used to test cross-package import of custom name +// fields and default resolution. +type YetYetAnotherTestEnum int32 + +const ( + YetYetAnotherTestEnum_CC YetYetAnotherTestEnum = 0 + YetYetAnotherTestEnum_BetterYetDD YetYetAnotherTestEnum = 1 +) + +var YetYetAnotherTestEnum_name = map[int32]string{ + 0: "CC", + 1: "DD", +} +var YetYetAnotherTestEnum_value = map[string]int32{ + "CC": 0, + "DD": 1, +} + +func (x YetYetAnotherTestEnum) Enum() *YetYetAnotherTestEnum { + p := new(YetYetAnotherTestEnum) + *p = x + return p +} +func (x YetYetAnotherTestEnum) MarshalJSON() ([]byte, error) { + return proto.MarshalJSONEnum(YetYetAnotherTestEnum_name, int32(x)) +} +func (x *YetYetAnotherTestEnum) UnmarshalJSON(data []byte) error { + value, err := proto.UnmarshalJSONEnum(YetYetAnotherTestEnum_value, data, "YetYetAnotherTestEnum") + if err != nil { + return err + } + *x = YetYetAnotherTestEnum(value) + return nil +} +func (YetYetAnotherTestEnum) EnumDescriptor() ([]byte, []int) { return fileDescriptorThetest, []int{3} } + +type NestedDefinition_NestedEnum int32 + +const ( + TYPE_NESTED NestedDefinition_NestedEnum = 1 +) + +var NestedDefinition_NestedEnum_name = map[int32]string{ + 1: "TYPE_NESTED", +} +var NestedDefinition_NestedEnum_value = map[string]int32{ + "TYPE_NESTED": 1, +} + +func (x NestedDefinition_NestedEnum) Enum() *NestedDefinition_NestedEnum { + p := new(NestedDefinition_NestedEnum) + *p = x + return p +} +func (x NestedDefinition_NestedEnum) MarshalJSON() ([]byte, error) { + return proto.MarshalJSONEnum(NestedDefinition_NestedEnum_name, int32(x)) +} +func (x *NestedDefinition_NestedEnum) UnmarshalJSON(data []byte) error { + value, err := proto.UnmarshalJSONEnum(NestedDefinition_NestedEnum_value, data, "NestedDefinition_NestedEnum") + if err != nil { + return err + } + *x = NestedDefinition_NestedEnum(value) + return nil +} +func (NestedDefinition_NestedEnum) EnumDescriptor() ([]byte, []int) { + return fileDescriptorThetest, []int{42, 0} +} + +type NidOptNative struct { + Field1 float64 `protobuf:"fixed64,1,opt,name=Field1,json=field1" json:"Field1"` + Field2 float32 `protobuf:"fixed32,2,opt,name=Field2,json=field2" json:"Field2"` + Field3 int32 `protobuf:"varint,3,opt,name=Field3,json=field3" json:"Field3"` + Field4 int64 `protobuf:"varint,4,opt,name=Field4,json=field4" json:"Field4"` + Field5 uint32 `protobuf:"varint,5,opt,name=Field5,json=field5" json:"Field5"` + Field6 uint64 `protobuf:"varint,6,opt,name=Field6,json=field6" json:"Field6"` + Field7 int32 `protobuf:"zigzag32,7,opt,name=Field7,json=field7" json:"Field7"` + Field8 int64 `protobuf:"zigzag64,8,opt,name=Field8,json=field8" json:"Field8"` + Field9 uint32 `protobuf:"fixed32,9,opt,name=Field9,json=field9" json:"Field9"` + Field10 int32 `protobuf:"fixed32,10,opt,name=Field10,json=field10" json:"Field10"` + Field11 uint64 `protobuf:"fixed64,11,opt,name=Field11,json=field11" json:"Field11"` + Field12 int64 `protobuf:"fixed64,12,opt,name=Field12,json=field12" json:"Field12"` + Field13 bool `protobuf:"varint,13,opt,name=Field13,json=field13" json:"Field13"` + Field14 string `protobuf:"bytes,14,opt,name=Field14,json=field14" json:"Field14"` + Field15 []byte `protobuf:"bytes,15,opt,name=Field15,json=field15" json:"Field15"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *NidOptNative) Reset() { *m = NidOptNative{} } +func (*NidOptNative) ProtoMessage() {} +func (*NidOptNative) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{0} } + +type NinOptNative struct { + Field1 *float64 `protobuf:"fixed64,1,opt,name=Field1,json=field1" json:"Field1,omitempty"` + Field2 *float32 `protobuf:"fixed32,2,opt,name=Field2,json=field2" json:"Field2,omitempty"` + Field3 *int32 `protobuf:"varint,3,opt,name=Field3,json=field3" json:"Field3,omitempty"` + Field4 *int64 `protobuf:"varint,4,opt,name=Field4,json=field4" json:"Field4,omitempty"` + Field5 *uint32 `protobuf:"varint,5,opt,name=Field5,json=field5" json:"Field5,omitempty"` + Field6 *uint64 `protobuf:"varint,6,opt,name=Field6,json=field6" json:"Field6,omitempty"` + Field7 *int32 `protobuf:"zigzag32,7,opt,name=Field7,json=field7" json:"Field7,omitempty"` + Field8 *int64 `protobuf:"zigzag64,8,opt,name=Field8,json=field8" json:"Field8,omitempty"` + Field9 *uint32 `protobuf:"fixed32,9,opt,name=Field9,json=field9" json:"Field9,omitempty"` + Field10 *int32 `protobuf:"fixed32,10,opt,name=Field10,json=field10" json:"Field10,omitempty"` + Field11 *uint64 `protobuf:"fixed64,11,opt,name=Field11,json=field11" json:"Field11,omitempty"` + Field12 *int64 `protobuf:"fixed64,12,opt,name=Field12,json=field12" json:"Field12,omitempty"` + Field13 *bool `protobuf:"varint,13,opt,name=Field13,json=field13" json:"Field13,omitempty"` + Field14 *string `protobuf:"bytes,14,opt,name=Field14,json=field14" json:"Field14,omitempty"` + Field15 []byte `protobuf:"bytes,15,opt,name=Field15,json=field15" json:"Field15,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *NinOptNative) Reset() { *m = NinOptNative{} } +func (*NinOptNative) ProtoMessage() {} +func (*NinOptNative) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{1} } + +type NidRepNative struct { + Field1 []float64 `protobuf:"fixed64,1,rep,name=Field1,json=field1" json:"Field1,omitempty"` + Field2 []float32 `protobuf:"fixed32,2,rep,name=Field2,json=field2" json:"Field2,omitempty"` + Field3 []int32 `protobuf:"varint,3,rep,name=Field3,json=field3" json:"Field3,omitempty"` + Field4 []int64 `protobuf:"varint,4,rep,name=Field4,json=field4" json:"Field4,omitempty"` + Field5 []uint32 `protobuf:"varint,5,rep,name=Field5,json=field5" json:"Field5,omitempty"` + Field6 []uint64 `protobuf:"varint,6,rep,name=Field6,json=field6" json:"Field6,omitempty"` + Field7 []int32 `protobuf:"zigzag32,7,rep,name=Field7,json=field7" json:"Field7,omitempty"` + Field8 []int64 `protobuf:"zigzag64,8,rep,name=Field8,json=field8" json:"Field8,omitempty"` + Field9 []uint32 `protobuf:"fixed32,9,rep,name=Field9,json=field9" json:"Field9,omitempty"` + Field10 []int32 `protobuf:"fixed32,10,rep,name=Field10,json=field10" json:"Field10,omitempty"` + Field11 []uint64 `protobuf:"fixed64,11,rep,name=Field11,json=field11" json:"Field11,omitempty"` + Field12 []int64 `protobuf:"fixed64,12,rep,name=Field12,json=field12" json:"Field12,omitempty"` + Field13 []bool `protobuf:"varint,13,rep,name=Field13,json=field13" json:"Field13,omitempty"` + Field14 []string `protobuf:"bytes,14,rep,name=Field14,json=field14" json:"Field14,omitempty"` + Field15 [][]byte `protobuf:"bytes,15,rep,name=Field15,json=field15" json:"Field15,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *NidRepNative) Reset() { *m = NidRepNative{} } +func (*NidRepNative) ProtoMessage() {} +func (*NidRepNative) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{2} } + +type NinRepNative struct { + Field1 []float64 `protobuf:"fixed64,1,rep,name=Field1,json=field1" json:"Field1,omitempty"` + Field2 []float32 `protobuf:"fixed32,2,rep,name=Field2,json=field2" json:"Field2,omitempty"` + Field3 []int32 `protobuf:"varint,3,rep,name=Field3,json=field3" json:"Field3,omitempty"` + Field4 []int64 `protobuf:"varint,4,rep,name=Field4,json=field4" json:"Field4,omitempty"` + Field5 []uint32 `protobuf:"varint,5,rep,name=Field5,json=field5" json:"Field5,omitempty"` + Field6 []uint64 `protobuf:"varint,6,rep,name=Field6,json=field6" json:"Field6,omitempty"` + Field7 []int32 `protobuf:"zigzag32,7,rep,name=Field7,json=field7" json:"Field7,omitempty"` + Field8 []int64 `protobuf:"zigzag64,8,rep,name=Field8,json=field8" json:"Field8,omitempty"` + Field9 []uint32 `protobuf:"fixed32,9,rep,name=Field9,json=field9" json:"Field9,omitempty"` + Field10 []int32 `protobuf:"fixed32,10,rep,name=Field10,json=field10" json:"Field10,omitempty"` + Field11 []uint64 `protobuf:"fixed64,11,rep,name=Field11,json=field11" json:"Field11,omitempty"` + Field12 []int64 `protobuf:"fixed64,12,rep,name=Field12,json=field12" json:"Field12,omitempty"` + Field13 []bool `protobuf:"varint,13,rep,name=Field13,json=field13" json:"Field13,omitempty"` + Field14 []string `protobuf:"bytes,14,rep,name=Field14,json=field14" json:"Field14,omitempty"` + Field15 [][]byte `protobuf:"bytes,15,rep,name=Field15,json=field15" json:"Field15,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *NinRepNative) Reset() { *m = NinRepNative{} } +func (*NinRepNative) ProtoMessage() {} +func (*NinRepNative) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{3} } + +type NidRepPackedNative struct { + Field1 []float64 `protobuf:"fixed64,1,rep,packed,name=Field1,json=field1" json:"Field1,omitempty"` + Field2 []float32 `protobuf:"fixed32,2,rep,packed,name=Field2,json=field2" json:"Field2,omitempty"` + Field3 []int32 `protobuf:"varint,3,rep,packed,name=Field3,json=field3" json:"Field3,omitempty"` + Field4 []int64 `protobuf:"varint,4,rep,packed,name=Field4,json=field4" json:"Field4,omitempty"` + Field5 []uint32 `protobuf:"varint,5,rep,packed,name=Field5,json=field5" json:"Field5,omitempty"` + Field6 []uint64 `protobuf:"varint,6,rep,packed,name=Field6,json=field6" json:"Field6,omitempty"` + Field7 []int32 `protobuf:"zigzag32,7,rep,packed,name=Field7,json=field7" json:"Field7,omitempty"` + Field8 []int64 `protobuf:"zigzag64,8,rep,packed,name=Field8,json=field8" json:"Field8,omitempty"` + Field9 []uint32 `protobuf:"fixed32,9,rep,packed,name=Field9,json=field9" json:"Field9,omitempty"` + Field10 []int32 `protobuf:"fixed32,10,rep,packed,name=Field10,json=field10" json:"Field10,omitempty"` + Field11 []uint64 `protobuf:"fixed64,11,rep,packed,name=Field11,json=field11" json:"Field11,omitempty"` + Field12 []int64 `protobuf:"fixed64,12,rep,packed,name=Field12,json=field12" json:"Field12,omitempty"` + Field13 []bool `protobuf:"varint,13,rep,packed,name=Field13,json=field13" json:"Field13,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *NidRepPackedNative) Reset() { *m = NidRepPackedNative{} } +func (*NidRepPackedNative) ProtoMessage() {} +func (*NidRepPackedNative) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{4} } + +type NinRepPackedNative struct { + Field1 []float64 `protobuf:"fixed64,1,rep,packed,name=Field1,json=field1" json:"Field1,omitempty"` + Field2 []float32 `protobuf:"fixed32,2,rep,packed,name=Field2,json=field2" json:"Field2,omitempty"` + Field3 []int32 `protobuf:"varint,3,rep,packed,name=Field3,json=field3" json:"Field3,omitempty"` + Field4 []int64 `protobuf:"varint,4,rep,packed,name=Field4,json=field4" json:"Field4,omitempty"` + Field5 []uint32 `protobuf:"varint,5,rep,packed,name=Field5,json=field5" json:"Field5,omitempty"` + Field6 []uint64 `protobuf:"varint,6,rep,packed,name=Field6,json=field6" json:"Field6,omitempty"` + Field7 []int32 `protobuf:"zigzag32,7,rep,packed,name=Field7,json=field7" json:"Field7,omitempty"` + Field8 []int64 `protobuf:"zigzag64,8,rep,packed,name=Field8,json=field8" json:"Field8,omitempty"` + Field9 []uint32 `protobuf:"fixed32,9,rep,packed,name=Field9,json=field9" json:"Field9,omitempty"` + Field10 []int32 `protobuf:"fixed32,10,rep,packed,name=Field10,json=field10" json:"Field10,omitempty"` + Field11 []uint64 `protobuf:"fixed64,11,rep,packed,name=Field11,json=field11" json:"Field11,omitempty"` + Field12 []int64 `protobuf:"fixed64,12,rep,packed,name=Field12,json=field12" json:"Field12,omitempty"` + Field13 []bool `protobuf:"varint,13,rep,packed,name=Field13,json=field13" json:"Field13,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *NinRepPackedNative) Reset() { *m = NinRepPackedNative{} } +func (*NinRepPackedNative) ProtoMessage() {} +func (*NinRepPackedNative) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{5} } + +type NidOptStruct struct { + Field1 float64 `protobuf:"fixed64,1,opt,name=Field1,json=field1" json:"Field1"` + Field2 float32 `protobuf:"fixed32,2,opt,name=Field2,json=field2" json:"Field2"` + Field3 NidOptNative `protobuf:"bytes,3,opt,name=Field3,json=field3" json:"Field3"` + Field4 NinOptNative `protobuf:"bytes,4,opt,name=Field4,json=field4" json:"Field4"` + Field6 uint64 `protobuf:"varint,6,opt,name=Field6,json=field6" json:"Field6"` + Field7 int32 `protobuf:"zigzag32,7,opt,name=Field7,json=field7" json:"Field7"` + Field8 NidOptNative `protobuf:"bytes,8,opt,name=Field8,json=field8" json:"Field8"` + Field13 bool `protobuf:"varint,13,opt,name=Field13,json=field13" json:"Field13"` + Field14 string `protobuf:"bytes,14,opt,name=Field14,json=field14" json:"Field14"` + Field15 []byte `protobuf:"bytes,15,opt,name=Field15,json=field15" json:"Field15"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *NidOptStruct) Reset() { *m = NidOptStruct{} } +func (*NidOptStruct) ProtoMessage() {} +func (*NidOptStruct) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{6} } + +type NinOptStruct struct { + Field1 *float64 `protobuf:"fixed64,1,opt,name=Field1,json=field1" json:"Field1,omitempty"` + Field2 *float32 `protobuf:"fixed32,2,opt,name=Field2,json=field2" json:"Field2,omitempty"` + Field3 *NidOptNative `protobuf:"bytes,3,opt,name=Field3,json=field3" json:"Field3,omitempty"` + Field4 *NinOptNative `protobuf:"bytes,4,opt,name=Field4,json=field4" json:"Field4,omitempty"` + Field6 *uint64 `protobuf:"varint,6,opt,name=Field6,json=field6" json:"Field6,omitempty"` + Field7 *int32 `protobuf:"zigzag32,7,opt,name=Field7,json=field7" json:"Field7,omitempty"` + Field8 *NidOptNative `protobuf:"bytes,8,opt,name=Field8,json=field8" json:"Field8,omitempty"` + Field13 *bool `protobuf:"varint,13,opt,name=Field13,json=field13" json:"Field13,omitempty"` + Field14 *string `protobuf:"bytes,14,opt,name=Field14,json=field14" json:"Field14,omitempty"` + Field15 []byte `protobuf:"bytes,15,opt,name=Field15,json=field15" json:"Field15,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *NinOptStruct) Reset() { *m = NinOptStruct{} } +func (*NinOptStruct) ProtoMessage() {} +func (*NinOptStruct) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{7} } + +type NidRepStruct struct { + Field1 []float64 `protobuf:"fixed64,1,rep,name=Field1,json=field1" json:"Field1,omitempty"` + Field2 []float32 `protobuf:"fixed32,2,rep,name=Field2,json=field2" json:"Field2,omitempty"` + Field3 []NidOptNative `protobuf:"bytes,3,rep,name=Field3,json=field3" json:"Field3"` + Field4 []NinOptNative `protobuf:"bytes,4,rep,name=Field4,json=field4" json:"Field4"` + Field6 []uint64 `protobuf:"varint,6,rep,name=Field6,json=field6" json:"Field6,omitempty"` + Field7 []int32 `protobuf:"zigzag32,7,rep,name=Field7,json=field7" json:"Field7,omitempty"` + Field8 []NidOptNative `protobuf:"bytes,8,rep,name=Field8,json=field8" json:"Field8"` + Field13 []bool `protobuf:"varint,13,rep,name=Field13,json=field13" json:"Field13,omitempty"` + Field14 []string `protobuf:"bytes,14,rep,name=Field14,json=field14" json:"Field14,omitempty"` + Field15 [][]byte `protobuf:"bytes,15,rep,name=Field15,json=field15" json:"Field15,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *NidRepStruct) Reset() { *m = NidRepStruct{} } +func (*NidRepStruct) ProtoMessage() {} +func (*NidRepStruct) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{8} } + +type NinRepStruct struct { + Field1 []float64 `protobuf:"fixed64,1,rep,name=Field1,json=field1" json:"Field1,omitempty"` + Field2 []float32 `protobuf:"fixed32,2,rep,name=Field2,json=field2" json:"Field2,omitempty"` + Field3 []*NidOptNative `protobuf:"bytes,3,rep,name=Field3,json=field3" json:"Field3,omitempty"` + Field4 []*NinOptNative `protobuf:"bytes,4,rep,name=Field4,json=field4" json:"Field4,omitempty"` + Field6 []uint64 `protobuf:"varint,6,rep,name=Field6,json=field6" json:"Field6,omitempty"` + Field7 []int32 `protobuf:"zigzag32,7,rep,name=Field7,json=field7" json:"Field7,omitempty"` + Field8 []*NidOptNative `protobuf:"bytes,8,rep,name=Field8,json=field8" json:"Field8,omitempty"` + Field13 []bool `protobuf:"varint,13,rep,name=Field13,json=field13" json:"Field13,omitempty"` + Field14 []string `protobuf:"bytes,14,rep,name=Field14,json=field14" json:"Field14,omitempty"` + Field15 [][]byte `protobuf:"bytes,15,rep,name=Field15,json=field15" json:"Field15,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *NinRepStruct) Reset() { *m = NinRepStruct{} } +func (*NinRepStruct) ProtoMessage() {} +func (*NinRepStruct) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{9} } + +type NidEmbeddedStruct struct { + *NidOptNative `protobuf:"bytes,1,opt,name=Field1,json=field1,embedded=Field1" json:"Field1,omitempty"` + Field200 NidOptNative `protobuf:"bytes,200,opt,name=Field200,json=field200" json:"Field200"` + Field210 bool `protobuf:"varint,210,opt,name=Field210,json=field210" json:"Field210"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *NidEmbeddedStruct) Reset() { *m = NidEmbeddedStruct{} } +func (*NidEmbeddedStruct) ProtoMessage() {} +func (*NidEmbeddedStruct) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{10} } + +type NinEmbeddedStruct struct { + *NidOptNative `protobuf:"bytes,1,opt,name=Field1,json=field1,embedded=Field1" json:"Field1,omitempty"` + Field200 *NidOptNative `protobuf:"bytes,200,opt,name=Field200,json=field200" json:"Field200,omitempty"` + Field210 *bool `protobuf:"varint,210,opt,name=Field210,json=field210" json:"Field210,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *NinEmbeddedStruct) Reset() { *m = NinEmbeddedStruct{} } +func (*NinEmbeddedStruct) ProtoMessage() {} +func (*NinEmbeddedStruct) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{11} } + +type NidNestedStruct struct { + Field1 NidOptStruct `protobuf:"bytes,1,opt,name=Field1,json=field1" json:"Field1"` + Field2 []NidRepStruct `protobuf:"bytes,2,rep,name=Field2,json=field2" json:"Field2"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *NidNestedStruct) Reset() { *m = NidNestedStruct{} } +func (*NidNestedStruct) ProtoMessage() {} +func (*NidNestedStruct) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{12} } + +type NinNestedStruct struct { + Field1 *NinOptStruct `protobuf:"bytes,1,opt,name=Field1,json=field1" json:"Field1,omitempty"` + Field2 []*NinRepStruct `protobuf:"bytes,2,rep,name=Field2,json=field2" json:"Field2,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *NinNestedStruct) Reset() { *m = NinNestedStruct{} } +func (*NinNestedStruct) ProtoMessage() {} +func (*NinNestedStruct) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{13} } + +type NidOptCustom struct { + Id Uuid `protobuf:"bytes,1,opt,name=Id,json=id,customtype=Uuid" json:"Id"` + Value github_com_gogo_protobuf_test_custom.Uint128 `protobuf:"bytes,2,opt,name=Value,json=value,customtype=github.com/gogo/protobuf/test/custom.Uint128" json:"Value"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *NidOptCustom) Reset() { *m = NidOptCustom{} } +func (*NidOptCustom) ProtoMessage() {} +func (*NidOptCustom) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{14} } + +type CustomDash struct { + Value *github_com_gogo_protobuf_test_custom_dash_type.Bytes `protobuf:"bytes,1,opt,name=Value,json=value,customtype=github.com/gogo/protobuf/test/custom-dash-type.Bytes" json:"Value,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *CustomDash) Reset() { *m = CustomDash{} } +func (*CustomDash) ProtoMessage() {} +func (*CustomDash) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{15} } + +type NinOptCustom struct { + Id *Uuid `protobuf:"bytes,1,opt,name=Id,json=id,customtype=Uuid" json:"Id,omitempty"` + Value *github_com_gogo_protobuf_test_custom.Uint128 `protobuf:"bytes,2,opt,name=Value,json=value,customtype=github.com/gogo/protobuf/test/custom.Uint128" json:"Value,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *NinOptCustom) Reset() { *m = NinOptCustom{} } +func (*NinOptCustom) ProtoMessage() {} +func (*NinOptCustom) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{16} } + +type NidRepCustom struct { + Id []Uuid `protobuf:"bytes,1,rep,name=Id,json=id,customtype=Uuid" json:"Id"` + Value []github_com_gogo_protobuf_test_custom.Uint128 `protobuf:"bytes,2,rep,name=Value,json=value,customtype=github.com/gogo/protobuf/test/custom.Uint128" json:"Value"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *NidRepCustom) Reset() { *m = NidRepCustom{} } +func (*NidRepCustom) ProtoMessage() {} +func (*NidRepCustom) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{17} } + +type NinRepCustom struct { + Id []Uuid `protobuf:"bytes,1,rep,name=Id,json=id,customtype=Uuid" json:"Id,omitempty"` + Value []github_com_gogo_protobuf_test_custom.Uint128 `protobuf:"bytes,2,rep,name=Value,json=value,customtype=github.com/gogo/protobuf/test/custom.Uint128" json:"Value,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *NinRepCustom) Reset() { *m = NinRepCustom{} } +func (*NinRepCustom) ProtoMessage() {} +func (*NinRepCustom) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{18} } + +type NinOptNativeUnion struct { + Field1 *float64 `protobuf:"fixed64,1,opt,name=Field1,json=field1" json:"Field1,omitempty"` + Field2 *float32 `protobuf:"fixed32,2,opt,name=Field2,json=field2" json:"Field2,omitempty"` + Field3 *int32 `protobuf:"varint,3,opt,name=Field3,json=field3" json:"Field3,omitempty"` + Field4 *int64 `protobuf:"varint,4,opt,name=Field4,json=field4" json:"Field4,omitempty"` + Field5 *uint32 `protobuf:"varint,5,opt,name=Field5,json=field5" json:"Field5,omitempty"` + Field6 *uint64 `protobuf:"varint,6,opt,name=Field6,json=field6" json:"Field6,omitempty"` + Field13 *bool `protobuf:"varint,13,opt,name=Field13,json=field13" json:"Field13,omitempty"` + Field14 *string `protobuf:"bytes,14,opt,name=Field14,json=field14" json:"Field14,omitempty"` + Field15 []byte `protobuf:"bytes,15,opt,name=Field15,json=field15" json:"Field15,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *NinOptNativeUnion) Reset() { *m = NinOptNativeUnion{} } +func (*NinOptNativeUnion) ProtoMessage() {} +func (*NinOptNativeUnion) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{19} } + +type NinOptStructUnion struct { + Field1 *float64 `protobuf:"fixed64,1,opt,name=Field1,json=field1" json:"Field1,omitempty"` + Field2 *float32 `protobuf:"fixed32,2,opt,name=Field2,json=field2" json:"Field2,omitempty"` + Field3 *NidOptNative `protobuf:"bytes,3,opt,name=Field3,json=field3" json:"Field3,omitempty"` + Field4 *NinOptNative `protobuf:"bytes,4,opt,name=Field4,json=field4" json:"Field4,omitempty"` + Field6 *uint64 `protobuf:"varint,6,opt,name=Field6,json=field6" json:"Field6,omitempty"` + Field7 *int32 `protobuf:"zigzag32,7,opt,name=Field7,json=field7" json:"Field7,omitempty"` + Field13 *bool `protobuf:"varint,13,opt,name=Field13,json=field13" json:"Field13,omitempty"` + Field14 *string `protobuf:"bytes,14,opt,name=Field14,json=field14" json:"Field14,omitempty"` + Field15 []byte `protobuf:"bytes,15,opt,name=Field15,json=field15" json:"Field15,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *NinOptStructUnion) Reset() { *m = NinOptStructUnion{} } +func (*NinOptStructUnion) ProtoMessage() {} +func (*NinOptStructUnion) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{20} } + +type NinEmbeddedStructUnion struct { + *NidOptNative `protobuf:"bytes,1,opt,name=Field1,json=field1,embedded=Field1" json:"Field1,omitempty"` + Field200 *NinOptNative `protobuf:"bytes,200,opt,name=Field200,json=field200" json:"Field200,omitempty"` + Field210 *bool `protobuf:"varint,210,opt,name=Field210,json=field210" json:"Field210,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *NinEmbeddedStructUnion) Reset() { *m = NinEmbeddedStructUnion{} } +func (*NinEmbeddedStructUnion) ProtoMessage() {} +func (*NinEmbeddedStructUnion) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{21} } + +type NinNestedStructUnion struct { + Field1 *NinOptNativeUnion `protobuf:"bytes,1,opt,name=Field1,json=field1" json:"Field1,omitempty"` + Field2 *NinOptStructUnion `protobuf:"bytes,2,opt,name=Field2,json=field2" json:"Field2,omitempty"` + Field3 *NinEmbeddedStructUnion `protobuf:"bytes,3,opt,name=Field3,json=field3" json:"Field3,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *NinNestedStructUnion) Reset() { *m = NinNestedStructUnion{} } +func (*NinNestedStructUnion) ProtoMessage() {} +func (*NinNestedStructUnion) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{22} } + +type Tree struct { + Or *OrBranch `protobuf:"bytes,1,opt,name=Or,json=or" json:"Or,omitempty"` + And *AndBranch `protobuf:"bytes,2,opt,name=And,json=and" json:"And,omitempty"` + Leaf *Leaf `protobuf:"bytes,3,opt,name=Leaf,json=leaf" json:"Leaf,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *Tree) Reset() { *m = Tree{} } +func (*Tree) ProtoMessage() {} +func (*Tree) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{23} } + +type OrBranch struct { + Left Tree `protobuf:"bytes,1,opt,name=Left,json=left" json:"Left"` + Right Tree `protobuf:"bytes,2,opt,name=Right,json=right" json:"Right"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *OrBranch) Reset() { *m = OrBranch{} } +func (*OrBranch) ProtoMessage() {} +func (*OrBranch) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{24} } + +type AndBranch struct { + Left Tree `protobuf:"bytes,1,opt,name=Left,json=left" json:"Left"` + Right Tree `protobuf:"bytes,2,opt,name=Right,json=right" json:"Right"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *AndBranch) Reset() { *m = AndBranch{} } +func (*AndBranch) ProtoMessage() {} +func (*AndBranch) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{25} } + +type Leaf struct { + Value int64 `protobuf:"varint,1,opt,name=Value,json=value" json:"Value"` + StrValue string `protobuf:"bytes,2,opt,name=StrValue,json=strValue" json:"StrValue"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *Leaf) Reset() { *m = Leaf{} } +func (*Leaf) ProtoMessage() {} +func (*Leaf) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{26} } + +type DeepTree struct { + Down *ADeepBranch `protobuf:"bytes,1,opt,name=Down,json=down" json:"Down,omitempty"` + And *AndDeepBranch `protobuf:"bytes,2,opt,name=And,json=and" json:"And,omitempty"` + Leaf *DeepLeaf `protobuf:"bytes,3,opt,name=Leaf,json=leaf" json:"Leaf,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *DeepTree) Reset() { *m = DeepTree{} } +func (*DeepTree) ProtoMessage() {} +func (*DeepTree) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{27} } + +type ADeepBranch struct { + Down DeepTree `protobuf:"bytes,2,opt,name=Down,json=down" json:"Down"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *ADeepBranch) Reset() { *m = ADeepBranch{} } +func (*ADeepBranch) ProtoMessage() {} +func (*ADeepBranch) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{28} } + +type AndDeepBranch struct { + Left DeepTree `protobuf:"bytes,1,opt,name=Left,json=left" json:"Left"` + Right DeepTree `protobuf:"bytes,2,opt,name=Right,json=right" json:"Right"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *AndDeepBranch) Reset() { *m = AndDeepBranch{} } +func (*AndDeepBranch) ProtoMessage() {} +func (*AndDeepBranch) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{29} } + +type DeepLeaf struct { + Tree Tree `protobuf:"bytes,1,opt,name=Tree,json=tree" json:"Tree"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *DeepLeaf) Reset() { *m = DeepLeaf{} } +func (*DeepLeaf) ProtoMessage() {} +func (*DeepLeaf) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{30} } + +type Nil struct { + XXX_unrecognized []byte `json:"-"` +} + +func (m *Nil) Reset() { *m = Nil{} } +func (*Nil) ProtoMessage() {} +func (*Nil) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{31} } + +type NidOptEnum struct { + Field1 TheTestEnum `protobuf:"varint,1,opt,name=Field1,json=field1,enum=test.TheTestEnum" json:"Field1"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *NidOptEnum) Reset() { *m = NidOptEnum{} } +func (*NidOptEnum) ProtoMessage() {} +func (*NidOptEnum) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{32} } + +type NinOptEnum struct { + Field1 *TheTestEnum `protobuf:"varint,1,opt,name=Field1,json=field1,enum=test.TheTestEnum" json:"Field1,omitempty"` + Field2 *YetAnotherTestEnum `protobuf:"varint,2,opt,name=Field2,json=field2,enum=test.YetAnotherTestEnum" json:"Field2,omitempty"` + Field3 *YetYetAnotherTestEnum `protobuf:"varint,3,opt,name=Field3,json=field3,enum=test.YetYetAnotherTestEnum" json:"Field3,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *NinOptEnum) Reset() { *m = NinOptEnum{} } +func (*NinOptEnum) ProtoMessage() {} +func (*NinOptEnum) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{33} } + +type NidRepEnum struct { + Field1 []TheTestEnum `protobuf:"varint,1,rep,name=Field1,json=field1,enum=test.TheTestEnum" json:"Field1,omitempty"` + Field2 []YetAnotherTestEnum `protobuf:"varint,2,rep,name=Field2,json=field2,enum=test.YetAnotherTestEnum" json:"Field2,omitempty"` + Field3 []YetYetAnotherTestEnum `protobuf:"varint,3,rep,name=Field3,json=field3,enum=test.YetYetAnotherTestEnum" json:"Field3,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *NidRepEnum) Reset() { *m = NidRepEnum{} } +func (*NidRepEnum) ProtoMessage() {} +func (*NidRepEnum) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{34} } + +type NinRepEnum struct { + Field1 []TheTestEnum `protobuf:"varint,1,rep,name=Field1,json=field1,enum=test.TheTestEnum" json:"Field1,omitempty"` + Field2 []YetAnotherTestEnum `protobuf:"varint,2,rep,name=Field2,json=field2,enum=test.YetAnotherTestEnum" json:"Field2,omitempty"` + Field3 []YetYetAnotherTestEnum `protobuf:"varint,3,rep,name=Field3,json=field3,enum=test.YetYetAnotherTestEnum" json:"Field3,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *NinRepEnum) Reset() { *m = NinRepEnum{} } +func (*NinRepEnum) ProtoMessage() {} +func (*NinRepEnum) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{35} } + +type NinOptEnumDefault struct { + Field1 *TheTestEnum `protobuf:"varint,1,opt,name=Field1,json=field1,enum=test.TheTestEnum,def=2" json:"Field1,omitempty"` + Field2 *YetAnotherTestEnum `protobuf:"varint,2,opt,name=Field2,json=field2,enum=test.YetAnotherTestEnum,def=1" json:"Field2,omitempty"` + Field3 *YetYetAnotherTestEnum `protobuf:"varint,3,opt,name=Field3,json=field3,enum=test.YetYetAnotherTestEnum,def=0" json:"Field3,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *NinOptEnumDefault) Reset() { *m = NinOptEnumDefault{} } +func (*NinOptEnumDefault) ProtoMessage() {} +func (*NinOptEnumDefault) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{36} } + +const Default_NinOptEnumDefault_Field1 TheTestEnum = C +const Default_NinOptEnumDefault_Field2 YetAnotherTestEnum = BetterYetBB +const Default_NinOptEnumDefault_Field3 YetYetAnotherTestEnum = YetYetAnotherTestEnum_CC + +func (m *NinOptEnumDefault) GetField1() TheTestEnum { + if m != nil && m.Field1 != nil { + return *m.Field1 + } + return Default_NinOptEnumDefault_Field1 +} + +func (m *NinOptEnumDefault) GetField2() YetAnotherTestEnum { + if m != nil && m.Field2 != nil { + return *m.Field2 + } + return Default_NinOptEnumDefault_Field2 +} + +func (m *NinOptEnumDefault) GetField3() YetYetAnotherTestEnum { + if m != nil && m.Field3 != nil { + return *m.Field3 + } + return Default_NinOptEnumDefault_Field3 +} + +type AnotherNinOptEnum struct { + Field1 *AnotherTestEnum `protobuf:"varint,1,opt,name=Field1,json=field1,enum=test.AnotherTestEnum" json:"Field1,omitempty"` + Field2 *YetAnotherTestEnum `protobuf:"varint,2,opt,name=Field2,json=field2,enum=test.YetAnotherTestEnum" json:"Field2,omitempty"` + Field3 *YetYetAnotherTestEnum `protobuf:"varint,3,opt,name=Field3,json=field3,enum=test.YetYetAnotherTestEnum" json:"Field3,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *AnotherNinOptEnum) Reset() { *m = AnotherNinOptEnum{} } +func (*AnotherNinOptEnum) ProtoMessage() {} +func (*AnotherNinOptEnum) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{37} } + +type AnotherNinOptEnumDefault struct { + Field1 *AnotherTestEnum `protobuf:"varint,1,opt,name=Field1,json=field1,enum=test.AnotherTestEnum,def=11" json:"Field1,omitempty"` + Field2 *YetAnotherTestEnum `protobuf:"varint,2,opt,name=Field2,json=field2,enum=test.YetAnotherTestEnum,def=1" json:"Field2,omitempty"` + Field3 *YetYetAnotherTestEnum `protobuf:"varint,3,opt,name=Field3,json=field3,enum=test.YetYetAnotherTestEnum,def=0" json:"Field3,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *AnotherNinOptEnumDefault) Reset() { *m = AnotherNinOptEnumDefault{} } +func (*AnotherNinOptEnumDefault) ProtoMessage() {} +func (*AnotherNinOptEnumDefault) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{38} } + +const Default_AnotherNinOptEnumDefault_Field1 AnotherTestEnum = E +const Default_AnotherNinOptEnumDefault_Field2 YetAnotherTestEnum = BetterYetBB +const Default_AnotherNinOptEnumDefault_Field3 YetYetAnotherTestEnum = YetYetAnotherTestEnum_CC + +func (m *AnotherNinOptEnumDefault) GetField1() AnotherTestEnum { + if m != nil && m.Field1 != nil { + return *m.Field1 + } + return Default_AnotherNinOptEnumDefault_Field1 +} + +func (m *AnotherNinOptEnumDefault) GetField2() YetAnotherTestEnum { + if m != nil && m.Field2 != nil { + return *m.Field2 + } + return Default_AnotherNinOptEnumDefault_Field2 +} + +func (m *AnotherNinOptEnumDefault) GetField3() YetYetAnotherTestEnum { + if m != nil && m.Field3 != nil { + return *m.Field3 + } + return Default_AnotherNinOptEnumDefault_Field3 +} + +type Timer struct { + Time1 int64 `protobuf:"fixed64,1,opt,name=Time1,json=time1" json:"Time1"` + Time2 int64 `protobuf:"fixed64,2,opt,name=Time2,json=time2" json:"Time2"` + Data []byte `protobuf:"bytes,3,opt,name=Data,json=data" json:"Data"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *Timer) Reset() { *m = Timer{} } +func (*Timer) ProtoMessage() {} +func (*Timer) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{39} } + +type MyExtendable struct { + Field1 *int64 `protobuf:"varint,1,opt,name=Field1,json=field1" json:"Field1,omitempty"` + XXX_extensions map[int32]proto.Extension `json:"-"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *MyExtendable) Reset() { *m = MyExtendable{} } +func (*MyExtendable) ProtoMessage() {} +func (*MyExtendable) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{40} } + +var extRange_MyExtendable = []proto.ExtensionRange{ + {100, 199}, +} + +func (*MyExtendable) ExtensionRangeArray() []proto.ExtensionRange { + return extRange_MyExtendable +} +func (m *MyExtendable) ExtensionMap() map[int32]proto.Extension { + if m.XXX_extensions == nil { + m.XXX_extensions = make(map[int32]proto.Extension) + } + return m.XXX_extensions +} + +type OtherExtenable struct { + Field2 *int64 `protobuf:"varint,2,opt,name=Field2,json=field2" json:"Field2,omitempty"` + Field13 *int64 `protobuf:"varint,13,opt,name=Field13,json=field13" json:"Field13,omitempty"` + M *MyExtendable `protobuf:"bytes,1,opt,name=M,json=m" json:"M,omitempty"` + XXX_extensions map[int32]proto.Extension `json:"-"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *OtherExtenable) Reset() { *m = OtherExtenable{} } +func (*OtherExtenable) ProtoMessage() {} +func (*OtherExtenable) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{41} } + +var extRange_OtherExtenable = []proto.ExtensionRange{ + {14, 16}, + {10, 12}, +} + +func (*OtherExtenable) ExtensionRangeArray() []proto.ExtensionRange { + return extRange_OtherExtenable +} +func (m *OtherExtenable) ExtensionMap() map[int32]proto.Extension { + if m.XXX_extensions == nil { + m.XXX_extensions = make(map[int32]proto.Extension) + } + return m.XXX_extensions +} + +type NestedDefinition struct { + Field1 *int64 `protobuf:"varint,1,opt,name=Field1,json=field1" json:"Field1,omitempty"` + EnumField *NestedDefinition_NestedEnum `protobuf:"varint,2,opt,name=EnumField,json=enumField,enum=test.NestedDefinition_NestedEnum" json:"EnumField,omitempty"` + NNM *NestedDefinition_NestedMessage_NestedNestedMsg `protobuf:"bytes,3,opt,name=NNM,json=nNM" json:"NNM,omitempty"` + NM *NestedDefinition_NestedMessage `protobuf:"bytes,4,opt,name=NM,json=nM" json:"NM,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *NestedDefinition) Reset() { *m = NestedDefinition{} } +func (*NestedDefinition) ProtoMessage() {} +func (*NestedDefinition) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{42} } + +type NestedDefinition_NestedMessage struct { + NestedField1 *uint64 `protobuf:"fixed64,1,opt,name=NestedField1,json=nestedField1" json:"NestedField1,omitempty"` + NNM *NestedDefinition_NestedMessage_NestedNestedMsg `protobuf:"bytes,2,opt,name=NNM,json=nNM" json:"NNM,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *NestedDefinition_NestedMessage) Reset() { *m = NestedDefinition_NestedMessage{} } +func (*NestedDefinition_NestedMessage) ProtoMessage() {} +func (*NestedDefinition_NestedMessage) Descriptor() ([]byte, []int) { + return fileDescriptorThetest, []int{42, 0} +} + +type NestedDefinition_NestedMessage_NestedNestedMsg struct { + NestedNestedField1 *string `protobuf:"bytes,10,opt,name=NestedNestedField1,json=nestedNestedField1" json:"NestedNestedField1,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *NestedDefinition_NestedMessage_NestedNestedMsg) Reset() { + *m = NestedDefinition_NestedMessage_NestedNestedMsg{} +} +func (*NestedDefinition_NestedMessage_NestedNestedMsg) ProtoMessage() {} +func (*NestedDefinition_NestedMessage_NestedNestedMsg) Descriptor() ([]byte, []int) { + return fileDescriptorThetest, []int{42, 0, 0} +} + +type NestedScope struct { + A *NestedDefinition_NestedMessage_NestedNestedMsg `protobuf:"bytes,1,opt,name=A,json=a" json:"A,omitempty"` + B *NestedDefinition_NestedEnum `protobuf:"varint,2,opt,name=B,json=b,enum=test.NestedDefinition_NestedEnum" json:"B,omitempty"` + C *NestedDefinition_NestedMessage `protobuf:"bytes,3,opt,name=C,json=c" json:"C,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *NestedScope) Reset() { *m = NestedScope{} } +func (*NestedScope) ProtoMessage() {} +func (*NestedScope) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{43} } + +type NinOptNativeDefault struct { + Field1 *float64 `protobuf:"fixed64,1,opt,name=Field1,json=field1,def=1234.1234" json:"Field1,omitempty"` + Field2 *float32 `protobuf:"fixed32,2,opt,name=Field2,json=field2,def=1234.1234" json:"Field2,omitempty"` + Field3 *int32 `protobuf:"varint,3,opt,name=Field3,json=field3,def=1234" json:"Field3,omitempty"` + Field4 *int64 `protobuf:"varint,4,opt,name=Field4,json=field4,def=1234" json:"Field4,omitempty"` + Field5 *uint32 `protobuf:"varint,5,opt,name=Field5,json=field5,def=1234" json:"Field5,omitempty"` + Field6 *uint64 `protobuf:"varint,6,opt,name=Field6,json=field6,def=1234" json:"Field6,omitempty"` + Field7 *int32 `protobuf:"zigzag32,7,opt,name=Field7,json=field7,def=1234" json:"Field7,omitempty"` + Field8 *int64 `protobuf:"zigzag64,8,opt,name=Field8,json=field8,def=1234" json:"Field8,omitempty"` + Field9 *uint32 `protobuf:"fixed32,9,opt,name=Field9,json=field9,def=1234" json:"Field9,omitempty"` + Field10 *int32 `protobuf:"fixed32,10,opt,name=Field10,json=field10,def=1234" json:"Field10,omitempty"` + Field11 *uint64 `protobuf:"fixed64,11,opt,name=Field11,json=field11,def=1234" json:"Field11,omitempty"` + Field12 *int64 `protobuf:"fixed64,12,opt,name=Field12,json=field12,def=1234" json:"Field12,omitempty"` + Field13 *bool `protobuf:"varint,13,opt,name=Field13,json=field13,def=1" json:"Field13,omitempty"` + Field14 *string `protobuf:"bytes,14,opt,name=Field14,json=field14,def=1234" json:"Field14,omitempty"` + Field15 []byte `protobuf:"bytes,15,opt,name=Field15,json=field15" json:"Field15,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *NinOptNativeDefault) Reset() { *m = NinOptNativeDefault{} } +func (*NinOptNativeDefault) ProtoMessage() {} +func (*NinOptNativeDefault) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{44} } + +const Default_NinOptNativeDefault_Field1 float64 = 1234.1234 +const Default_NinOptNativeDefault_Field2 float32 = 1234.1234 +const Default_NinOptNativeDefault_Field3 int32 = 1234 +const Default_NinOptNativeDefault_Field4 int64 = 1234 +const Default_NinOptNativeDefault_Field5 uint32 = 1234 +const Default_NinOptNativeDefault_Field6 uint64 = 1234 +const Default_NinOptNativeDefault_Field7 int32 = 1234 +const Default_NinOptNativeDefault_Field8 int64 = 1234 +const Default_NinOptNativeDefault_Field9 uint32 = 1234 +const Default_NinOptNativeDefault_Field10 int32 = 1234 +const Default_NinOptNativeDefault_Field11 uint64 = 1234 +const Default_NinOptNativeDefault_Field12 int64 = 1234 +const Default_NinOptNativeDefault_Field13 bool = true +const Default_NinOptNativeDefault_Field14 string = "1234" + +func (m *NinOptNativeDefault) GetField1() float64 { + if m != nil && m.Field1 != nil { + return *m.Field1 + } + return Default_NinOptNativeDefault_Field1 +} + +func (m *NinOptNativeDefault) GetField2() float32 { + if m != nil && m.Field2 != nil { + return *m.Field2 + } + return Default_NinOptNativeDefault_Field2 +} + +func (m *NinOptNativeDefault) GetField3() int32 { + if m != nil && m.Field3 != nil { + return *m.Field3 + } + return Default_NinOptNativeDefault_Field3 +} + +func (m *NinOptNativeDefault) GetField4() int64 { + if m != nil && m.Field4 != nil { + return *m.Field4 + } + return Default_NinOptNativeDefault_Field4 +} + +func (m *NinOptNativeDefault) GetField5() uint32 { + if m != nil && m.Field5 != nil { + return *m.Field5 + } + return Default_NinOptNativeDefault_Field5 +} + +func (m *NinOptNativeDefault) GetField6() uint64 { + if m != nil && m.Field6 != nil { + return *m.Field6 + } + return Default_NinOptNativeDefault_Field6 +} + +func (m *NinOptNativeDefault) GetField7() int32 { + if m != nil && m.Field7 != nil { + return *m.Field7 + } + return Default_NinOptNativeDefault_Field7 +} + +func (m *NinOptNativeDefault) GetField8() int64 { + if m != nil && m.Field8 != nil { + return *m.Field8 + } + return Default_NinOptNativeDefault_Field8 +} + +func (m *NinOptNativeDefault) GetField9() uint32 { + if m != nil && m.Field9 != nil { + return *m.Field9 + } + return Default_NinOptNativeDefault_Field9 +} + +func (m *NinOptNativeDefault) GetField10() int32 { + if m != nil && m.Field10 != nil { + return *m.Field10 + } + return Default_NinOptNativeDefault_Field10 +} + +func (m *NinOptNativeDefault) GetField11() uint64 { + if m != nil && m.Field11 != nil { + return *m.Field11 + } + return Default_NinOptNativeDefault_Field11 +} + +func (m *NinOptNativeDefault) GetField12() int64 { + if m != nil && m.Field12 != nil { + return *m.Field12 + } + return Default_NinOptNativeDefault_Field12 +} + +func (m *NinOptNativeDefault) GetField13() bool { + if m != nil && m.Field13 != nil { + return *m.Field13 + } + return Default_NinOptNativeDefault_Field13 +} + +func (m *NinOptNativeDefault) GetField14() string { + if m != nil && m.Field14 != nil { + return *m.Field14 + } + return Default_NinOptNativeDefault_Field14 +} + +func (m *NinOptNativeDefault) GetField15() []byte { + if m != nil { + return m.Field15 + } + return nil +} + +type CustomContainer struct { + CustomStruct NidOptCustom `protobuf:"bytes,1,opt,name=CustomStruct,json=customStruct" json:"CustomStruct"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *CustomContainer) Reset() { *m = CustomContainer{} } +func (*CustomContainer) ProtoMessage() {} +func (*CustomContainer) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{45} } + +type CustomNameNidOptNative struct { + FieldA float64 `protobuf:"fixed64,1,opt,name=Field1,json=field1" json:"Field1"` + FieldB float32 `protobuf:"fixed32,2,opt,name=Field2,json=field2" json:"Field2"` + FieldC int32 `protobuf:"varint,3,opt,name=Field3,json=field3" json:"Field3"` + FieldD int64 `protobuf:"varint,4,opt,name=Field4,json=field4" json:"Field4"` + FieldE uint32 `protobuf:"varint,5,opt,name=Field5,json=field5" json:"Field5"` + FieldF uint64 `protobuf:"varint,6,opt,name=Field6,json=field6" json:"Field6"` + FieldG int32 `protobuf:"zigzag32,7,opt,name=Field7,json=field7" json:"Field7"` + FieldH int64 `protobuf:"zigzag64,8,opt,name=Field8,json=field8" json:"Field8"` + FieldI uint32 `protobuf:"fixed32,9,opt,name=Field9,json=field9" json:"Field9"` + FieldJ int32 `protobuf:"fixed32,10,opt,name=Field10,json=field10" json:"Field10"` + FieldK uint64 `protobuf:"fixed64,11,opt,name=Field11,json=field11" json:"Field11"` + FieldL int64 `protobuf:"fixed64,12,opt,name=Field12,json=field12" json:"Field12"` + FieldM bool `protobuf:"varint,13,opt,name=Field13,json=field13" json:"Field13"` + FieldN string `protobuf:"bytes,14,opt,name=Field14,json=field14" json:"Field14"` + FieldO []byte `protobuf:"bytes,15,opt,name=Field15,json=field15" json:"Field15"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *CustomNameNidOptNative) Reset() { *m = CustomNameNidOptNative{} } +func (*CustomNameNidOptNative) ProtoMessage() {} +func (*CustomNameNidOptNative) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{46} } + +type CustomNameNinOptNative struct { + FieldA *float64 `protobuf:"fixed64,1,opt,name=Field1,json=field1" json:"Field1,omitempty"` + FieldB *float32 `protobuf:"fixed32,2,opt,name=Field2,json=field2" json:"Field2,omitempty"` + FieldC *int32 `protobuf:"varint,3,opt,name=Field3,json=field3" json:"Field3,omitempty"` + FieldD *int64 `protobuf:"varint,4,opt,name=Field4,json=field4" json:"Field4,omitempty"` + FieldE *uint32 `protobuf:"varint,5,opt,name=Field5,json=field5" json:"Field5,omitempty"` + FieldF *uint64 `protobuf:"varint,6,opt,name=Field6,json=field6" json:"Field6,omitempty"` + FieldG *int32 `protobuf:"zigzag32,7,opt,name=Field7,json=field7" json:"Field7,omitempty"` + FieldH *int64 `protobuf:"zigzag64,8,opt,name=Field8,json=field8" json:"Field8,omitempty"` + FieldI *uint32 `protobuf:"fixed32,9,opt,name=Field9,json=field9" json:"Field9,omitempty"` + FieldJ *int32 `protobuf:"fixed32,10,opt,name=Field10,json=field10" json:"Field10,omitempty"` + FieldK *uint64 `protobuf:"fixed64,11,opt,name=Field11,json=field11" json:"Field11,omitempty"` + FielL *int64 `protobuf:"fixed64,12,opt,name=Field12,json=field12" json:"Field12,omitempty"` + FieldM *bool `protobuf:"varint,13,opt,name=Field13,json=field13" json:"Field13,omitempty"` + FieldN *string `protobuf:"bytes,14,opt,name=Field14,json=field14" json:"Field14,omitempty"` + FieldO []byte `protobuf:"bytes,15,opt,name=Field15,json=field15" json:"Field15,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *CustomNameNinOptNative) Reset() { *m = CustomNameNinOptNative{} } +func (*CustomNameNinOptNative) ProtoMessage() {} +func (*CustomNameNinOptNative) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{47} } + +type CustomNameNinRepNative struct { + FieldA []float64 `protobuf:"fixed64,1,rep,name=Field1,json=field1" json:"Field1,omitempty"` + FieldB []float32 `protobuf:"fixed32,2,rep,name=Field2,json=field2" json:"Field2,omitempty"` + FieldC []int32 `protobuf:"varint,3,rep,name=Field3,json=field3" json:"Field3,omitempty"` + FieldD []int64 `protobuf:"varint,4,rep,name=Field4,json=field4" json:"Field4,omitempty"` + FieldE []uint32 `protobuf:"varint,5,rep,name=Field5,json=field5" json:"Field5,omitempty"` + FieldF []uint64 `protobuf:"varint,6,rep,name=Field6,json=field6" json:"Field6,omitempty"` + FieldG []int32 `protobuf:"zigzag32,7,rep,name=Field7,json=field7" json:"Field7,omitempty"` + FieldH []int64 `protobuf:"zigzag64,8,rep,name=Field8,json=field8" json:"Field8,omitempty"` + FieldI []uint32 `protobuf:"fixed32,9,rep,name=Field9,json=field9" json:"Field9,omitempty"` + FieldJ []int32 `protobuf:"fixed32,10,rep,name=Field10,json=field10" json:"Field10,omitempty"` + FieldK []uint64 `protobuf:"fixed64,11,rep,name=Field11,json=field11" json:"Field11,omitempty"` + FieldL []int64 `protobuf:"fixed64,12,rep,name=Field12,json=field12" json:"Field12,omitempty"` + FieldM []bool `protobuf:"varint,13,rep,name=Field13,json=field13" json:"Field13,omitempty"` + FieldN []string `protobuf:"bytes,14,rep,name=Field14,json=field14" json:"Field14,omitempty"` + FieldO [][]byte `protobuf:"bytes,15,rep,name=Field15,json=field15" json:"Field15,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *CustomNameNinRepNative) Reset() { *m = CustomNameNinRepNative{} } +func (*CustomNameNinRepNative) ProtoMessage() {} +func (*CustomNameNinRepNative) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{48} } + +type CustomNameNinStruct struct { + FieldA *float64 `protobuf:"fixed64,1,opt,name=Field1,json=field1" json:"Field1,omitempty"` + FieldB *float32 `protobuf:"fixed32,2,opt,name=Field2,json=field2" json:"Field2,omitempty"` + FieldC *NidOptNative `protobuf:"bytes,3,opt,name=Field3,json=field3" json:"Field3,omitempty"` + FieldD []*NinOptNative `protobuf:"bytes,4,rep,name=Field4,json=field4" json:"Field4,omitempty"` + FieldE *uint64 `protobuf:"varint,6,opt,name=Field6,json=field6" json:"Field6,omitempty"` + FieldF *int32 `protobuf:"zigzag32,7,opt,name=Field7,json=field7" json:"Field7,omitempty"` + FieldG *NidOptNative `protobuf:"bytes,8,opt,name=Field8,json=field8" json:"Field8,omitempty"` + FieldH *bool `protobuf:"varint,13,opt,name=Field13,json=field13" json:"Field13,omitempty"` + FieldI *string `protobuf:"bytes,14,opt,name=Field14,json=field14" json:"Field14,omitempty"` + FieldJ []byte `protobuf:"bytes,15,opt,name=Field15,json=field15" json:"Field15,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *CustomNameNinStruct) Reset() { *m = CustomNameNinStruct{} } +func (*CustomNameNinStruct) ProtoMessage() {} +func (*CustomNameNinStruct) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{49} } + +type CustomNameCustomType struct { + FieldA *Uuid `protobuf:"bytes,1,opt,name=Id,json=id,customtype=Uuid" json:"Id,omitempty"` + FieldB *github_com_gogo_protobuf_test_custom.Uint128 `protobuf:"bytes,2,opt,name=Value,json=value,customtype=github.com/gogo/protobuf/test/custom.Uint128" json:"Value,omitempty"` + FieldC []Uuid `protobuf:"bytes,3,rep,name=Ids,json=ids,customtype=Uuid" json:"Ids,omitempty"` + FieldD []github_com_gogo_protobuf_test_custom.Uint128 `protobuf:"bytes,4,rep,name=Values,json=values,customtype=github.com/gogo/protobuf/test/custom.Uint128" json:"Values,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *CustomNameCustomType) Reset() { *m = CustomNameCustomType{} } +func (*CustomNameCustomType) ProtoMessage() {} +func (*CustomNameCustomType) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{50} } + +type CustomNameNinEmbeddedStructUnion struct { + *NidOptNative `protobuf:"bytes,1,opt,name=Field1,json=field1,embedded=Field1" json:"Field1,omitempty"` + FieldA *NinOptNative `protobuf:"bytes,200,opt,name=Field200,json=field200" json:"Field200,omitempty"` + FieldB *bool `protobuf:"varint,210,opt,name=Field210,json=field210" json:"Field210,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *CustomNameNinEmbeddedStructUnion) Reset() { *m = CustomNameNinEmbeddedStructUnion{} } +func (*CustomNameNinEmbeddedStructUnion) ProtoMessage() {} +func (*CustomNameNinEmbeddedStructUnion) Descriptor() ([]byte, []int) { + return fileDescriptorThetest, []int{51} +} + +type CustomNameEnum struct { + FieldA *TheTestEnum `protobuf:"varint,1,opt,name=Field1,json=field1,enum=test.TheTestEnum" json:"Field1,omitempty"` + FieldB []TheTestEnum `protobuf:"varint,2,rep,name=Field2,json=field2,enum=test.TheTestEnum" json:"Field2,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *CustomNameEnum) Reset() { *m = CustomNameEnum{} } +func (*CustomNameEnum) ProtoMessage() {} +func (*CustomNameEnum) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{52} } + +type NoExtensionsMap struct { + Field1 *int64 `protobuf:"varint,1,opt,name=Field1,json=field1" json:"Field1,omitempty"` + XXX_extensions []byte `protobuf:"bytes,0,opt" json:"-"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *NoExtensionsMap) Reset() { *m = NoExtensionsMap{} } +func (*NoExtensionsMap) ProtoMessage() {} +func (*NoExtensionsMap) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{53} } + +var extRange_NoExtensionsMap = []proto.ExtensionRange{ + {100, 199}, +} + +func (*NoExtensionsMap) ExtensionRangeArray() []proto.ExtensionRange { + return extRange_NoExtensionsMap +} +func (m *NoExtensionsMap) GetExtensions() *[]byte { + if m.XXX_extensions == nil { + m.XXX_extensions = make([]byte, 0) + } + return &m.XXX_extensions +} + +type Unrecognized struct { + Field1 *string `protobuf:"bytes,1,opt,name=Field1,json=field1" json:"Field1,omitempty"` +} + +func (m *Unrecognized) Reset() { *m = Unrecognized{} } +func (*Unrecognized) ProtoMessage() {} +func (*Unrecognized) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{54} } + +type UnrecognizedWithInner struct { + Embedded []*UnrecognizedWithInner_Inner `protobuf:"bytes,1,rep,name=embedded" json:"embedded,omitempty"` + Field2 *string `protobuf:"bytes,2,opt,name=Field2,json=field2" json:"Field2,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *UnrecognizedWithInner) Reset() { *m = UnrecognizedWithInner{} } +func (*UnrecognizedWithInner) ProtoMessage() {} +func (*UnrecognizedWithInner) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{55} } + +type UnrecognizedWithInner_Inner struct { + Field1 *uint32 `protobuf:"varint,1,opt,name=Field1,json=field1" json:"Field1,omitempty"` +} + +func (m *UnrecognizedWithInner_Inner) Reset() { *m = UnrecognizedWithInner_Inner{} } +func (*UnrecognizedWithInner_Inner) ProtoMessage() {} +func (*UnrecognizedWithInner_Inner) Descriptor() ([]byte, []int) { + return fileDescriptorThetest, []int{55, 0} +} + +type UnrecognizedWithEmbed struct { + UnrecognizedWithEmbed_Embedded `protobuf:"bytes,1,opt,name=embedded,embedded=embedded" json:"embedded"` + Field2 *string `protobuf:"bytes,2,opt,name=Field2,json=field2" json:"Field2,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *UnrecognizedWithEmbed) Reset() { *m = UnrecognizedWithEmbed{} } +func (*UnrecognizedWithEmbed) ProtoMessage() {} +func (*UnrecognizedWithEmbed) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{56} } + +type UnrecognizedWithEmbed_Embedded struct { + Field1 *uint32 `protobuf:"varint,1,opt,name=Field1,json=field1" json:"Field1,omitempty"` +} + +func (m *UnrecognizedWithEmbed_Embedded) Reset() { *m = UnrecognizedWithEmbed_Embedded{} } +func (*UnrecognizedWithEmbed_Embedded) ProtoMessage() {} +func (*UnrecognizedWithEmbed_Embedded) Descriptor() ([]byte, []int) { + return fileDescriptorThetest, []int{56, 0} +} + +type Node struct { + Label *string `protobuf:"bytes,1,opt,name=Label,json=label" json:"Label,omitempty"` + Children []*Node `protobuf:"bytes,2,rep,name=Children,json=children" json:"Children,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *Node) Reset() { *m = Node{} } +func (*Node) ProtoMessage() {} +func (*Node) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{57} } + +var E_FieldA = &proto.ExtensionDesc{ + ExtendedType: (*MyExtendable)(nil), + ExtensionType: (*float64)(nil), + Field: 100, + Name: "test.FieldA", + Tag: "fixed64,100,opt,name=FieldA,json=fieldA", +} + +var E_FieldB = &proto.ExtensionDesc{ + ExtendedType: (*MyExtendable)(nil), + ExtensionType: (*NinOptNative)(nil), + Field: 101, + Name: "test.FieldB", + Tag: "bytes,101,opt,name=FieldB,json=fieldB", +} + +var E_FieldC = &proto.ExtensionDesc{ + ExtendedType: (*MyExtendable)(nil), + ExtensionType: (*NinEmbeddedStruct)(nil), + Field: 102, + Name: "test.FieldC", + Tag: "bytes,102,opt,name=FieldC,json=fieldC", +} + +var E_FieldD = &proto.ExtensionDesc{ + ExtendedType: (*MyExtendable)(nil), + ExtensionType: ([]int64)(nil), + Field: 104, + Name: "test.FieldD", + Tag: "varint,104,rep,name=FieldD,json=fieldD", +} + +var E_FieldE = &proto.ExtensionDesc{ + ExtendedType: (*MyExtendable)(nil), + ExtensionType: ([]*NinOptNative)(nil), + Field: 105, + Name: "test.FieldE", + Tag: "bytes,105,rep,name=FieldE,json=fieldE", +} + +var E_FieldA1 = &proto.ExtensionDesc{ + ExtendedType: (*NoExtensionsMap)(nil), + ExtensionType: (*float64)(nil), + Field: 100, + Name: "test.FieldA1", + Tag: "fixed64,100,opt,name=FieldA1,json=fieldA1", +} + +var E_FieldB1 = &proto.ExtensionDesc{ + ExtendedType: (*NoExtensionsMap)(nil), + ExtensionType: (*NinOptNative)(nil), + Field: 101, + Name: "test.FieldB1", + Tag: "bytes,101,opt,name=FieldB1,json=fieldB1", +} + +var E_FieldC1 = &proto.ExtensionDesc{ + ExtendedType: (*NoExtensionsMap)(nil), + ExtensionType: (*NinEmbeddedStruct)(nil), + Field: 102, + Name: "test.FieldC1", + Tag: "bytes,102,opt,name=FieldC1,json=fieldC1", +} + +func init() { + proto.RegisterType((*NidOptNative)(nil), "test.NidOptNative") + proto.RegisterType((*NinOptNative)(nil), "test.NinOptNative") + proto.RegisterType((*NidRepNative)(nil), "test.NidRepNative") + proto.RegisterType((*NinRepNative)(nil), "test.NinRepNative") + proto.RegisterType((*NidRepPackedNative)(nil), "test.NidRepPackedNative") + proto.RegisterType((*NinRepPackedNative)(nil), "test.NinRepPackedNative") + proto.RegisterType((*NidOptStruct)(nil), "test.NidOptStruct") + proto.RegisterType((*NinOptStruct)(nil), "test.NinOptStruct") + proto.RegisterType((*NidRepStruct)(nil), "test.NidRepStruct") + proto.RegisterType((*NinRepStruct)(nil), "test.NinRepStruct") + proto.RegisterType((*NidEmbeddedStruct)(nil), "test.NidEmbeddedStruct") + proto.RegisterType((*NinEmbeddedStruct)(nil), "test.NinEmbeddedStruct") + proto.RegisterType((*NidNestedStruct)(nil), "test.NidNestedStruct") + proto.RegisterType((*NinNestedStruct)(nil), "test.NinNestedStruct") + proto.RegisterType((*NidOptCustom)(nil), "test.NidOptCustom") + proto.RegisterType((*CustomDash)(nil), "test.CustomDash") + proto.RegisterType((*NinOptCustom)(nil), "test.NinOptCustom") + proto.RegisterType((*NidRepCustom)(nil), "test.NidRepCustom") + proto.RegisterType((*NinRepCustom)(nil), "test.NinRepCustom") + proto.RegisterType((*NinOptNativeUnion)(nil), "test.NinOptNativeUnion") + proto.RegisterType((*NinOptStructUnion)(nil), "test.NinOptStructUnion") + proto.RegisterType((*NinEmbeddedStructUnion)(nil), "test.NinEmbeddedStructUnion") + proto.RegisterType((*NinNestedStructUnion)(nil), "test.NinNestedStructUnion") + proto.RegisterType((*Tree)(nil), "test.Tree") + proto.RegisterType((*OrBranch)(nil), "test.OrBranch") + proto.RegisterType((*AndBranch)(nil), "test.AndBranch") + proto.RegisterType((*Leaf)(nil), "test.Leaf") + proto.RegisterType((*DeepTree)(nil), "test.DeepTree") + proto.RegisterType((*ADeepBranch)(nil), "test.ADeepBranch") + proto.RegisterType((*AndDeepBranch)(nil), "test.AndDeepBranch") + proto.RegisterType((*DeepLeaf)(nil), "test.DeepLeaf") + proto.RegisterType((*Nil)(nil), "test.Nil") + proto.RegisterType((*NidOptEnum)(nil), "test.NidOptEnum") + proto.RegisterType((*NinOptEnum)(nil), "test.NinOptEnum") + proto.RegisterType((*NidRepEnum)(nil), "test.NidRepEnum") + proto.RegisterType((*NinRepEnum)(nil), "test.NinRepEnum") + proto.RegisterType((*NinOptEnumDefault)(nil), "test.NinOptEnumDefault") + proto.RegisterType((*AnotherNinOptEnum)(nil), "test.AnotherNinOptEnum") + proto.RegisterType((*AnotherNinOptEnumDefault)(nil), "test.AnotherNinOptEnumDefault") + proto.RegisterType((*Timer)(nil), "test.Timer") + proto.RegisterType((*MyExtendable)(nil), "test.MyExtendable") + proto.RegisterType((*OtherExtenable)(nil), "test.OtherExtenable") + proto.RegisterType((*NestedDefinition)(nil), "test.NestedDefinition") + proto.RegisterType((*NestedDefinition_NestedMessage)(nil), "test.NestedDefinition.NestedMessage") + proto.RegisterType((*NestedDefinition_NestedMessage_NestedNestedMsg)(nil), "test.NestedDefinition.NestedMessage.NestedNestedMsg") + proto.RegisterType((*NestedScope)(nil), "test.NestedScope") + proto.RegisterType((*NinOptNativeDefault)(nil), "test.NinOptNativeDefault") + proto.RegisterType((*CustomContainer)(nil), "test.CustomContainer") + proto.RegisterType((*CustomNameNidOptNative)(nil), "test.CustomNameNidOptNative") + proto.RegisterType((*CustomNameNinOptNative)(nil), "test.CustomNameNinOptNative") + proto.RegisterType((*CustomNameNinRepNative)(nil), "test.CustomNameNinRepNative") + proto.RegisterType((*CustomNameNinStruct)(nil), "test.CustomNameNinStruct") + proto.RegisterType((*CustomNameCustomType)(nil), "test.CustomNameCustomType") + proto.RegisterType((*CustomNameNinEmbeddedStructUnion)(nil), "test.CustomNameNinEmbeddedStructUnion") + proto.RegisterType((*CustomNameEnum)(nil), "test.CustomNameEnum") + proto.RegisterType((*NoExtensionsMap)(nil), "test.NoExtensionsMap") + proto.RegisterType((*Unrecognized)(nil), "test.Unrecognized") + proto.RegisterType((*UnrecognizedWithInner)(nil), "test.UnrecognizedWithInner") + proto.RegisterType((*UnrecognizedWithInner_Inner)(nil), "test.UnrecognizedWithInner.Inner") + proto.RegisterType((*UnrecognizedWithEmbed)(nil), "test.UnrecognizedWithEmbed") + proto.RegisterType((*UnrecognizedWithEmbed_Embedded)(nil), "test.UnrecognizedWithEmbed.Embedded") + proto.RegisterType((*Node)(nil), "test.Node") + proto.RegisterEnum("test.TheTestEnum", TheTestEnum_name, TheTestEnum_value) + proto.RegisterEnum("test.AnotherTestEnum", AnotherTestEnum_name, AnotherTestEnum_value) + proto.RegisterEnum("test.YetAnotherTestEnum", YetAnotherTestEnum_name, YetAnotherTestEnum_value) + proto.RegisterEnum("test.YetYetAnotherTestEnum", YetYetAnotherTestEnum_name, YetYetAnotherTestEnum_value) + proto.RegisterEnum("test.NestedDefinition_NestedEnum", NestedDefinition_NestedEnum_name, NestedDefinition_NestedEnum_value) + proto.RegisterExtension(E_FieldA) + proto.RegisterExtension(E_FieldB) + proto.RegisterExtension(E_FieldC) + proto.RegisterExtension(E_FieldD) + proto.RegisterExtension(E_FieldE) + proto.RegisterExtension(E_FieldA1) + proto.RegisterExtension(E_FieldB1) + proto.RegisterExtension(E_FieldC1) +} +func (this *NidOptNative) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NidOptNative) + if !ok { + that2, ok := that.(NidOptNative) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.Field1 != that1.Field1 { + if this.Field1 < that1.Field1 { + return -1 + } + return 1 + } + if this.Field2 != that1.Field2 { + if this.Field2 < that1.Field2 { + return -1 + } + return 1 + } + if this.Field3 != that1.Field3 { + if this.Field3 < that1.Field3 { + return -1 + } + return 1 + } + if this.Field4 != that1.Field4 { + if this.Field4 < that1.Field4 { + return -1 + } + return 1 + } + if this.Field5 != that1.Field5 { + if this.Field5 < that1.Field5 { + return -1 + } + return 1 + } + if this.Field6 != that1.Field6 { + if this.Field6 < that1.Field6 { + return -1 + } + return 1 + } + if this.Field7 != that1.Field7 { + if this.Field7 < that1.Field7 { + return -1 + } + return 1 + } + if this.Field8 != that1.Field8 { + if this.Field8 < that1.Field8 { + return -1 + } + return 1 + } + if this.Field9 != that1.Field9 { + if this.Field9 < that1.Field9 { + return -1 + } + return 1 + } + if this.Field10 != that1.Field10 { + if this.Field10 < that1.Field10 { + return -1 + } + return 1 + } + if this.Field11 != that1.Field11 { + if this.Field11 < that1.Field11 { + return -1 + } + return 1 + } + if this.Field12 != that1.Field12 { + if this.Field12 < that1.Field12 { + return -1 + } + return 1 + } + if this.Field13 != that1.Field13 { + if !this.Field13 { + return -1 + } + return 1 + } + if this.Field14 != that1.Field14 { + if this.Field14 < that1.Field14 { + return -1 + } + return 1 + } + if c := bytes.Compare(this.Field15, that1.Field15); c != 0 { + return c + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NinOptNative) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NinOptNative) + if !ok { + that2, ok := that.(NinOptNative) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + if *this.Field1 < *that1.Field1 { + return -1 + } + return 1 + } + } else if this.Field1 != nil { + return 1 + } else if that1.Field1 != nil { + return -1 + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + if *this.Field2 < *that1.Field2 { + return -1 + } + return 1 + } + } else if this.Field2 != nil { + return 1 + } else if that1.Field2 != nil { + return -1 + } + if this.Field3 != nil && that1.Field3 != nil { + if *this.Field3 != *that1.Field3 { + if *this.Field3 < *that1.Field3 { + return -1 + } + return 1 + } + } else if this.Field3 != nil { + return 1 + } else if that1.Field3 != nil { + return -1 + } + if this.Field4 != nil && that1.Field4 != nil { + if *this.Field4 != *that1.Field4 { + if *this.Field4 < *that1.Field4 { + return -1 + } + return 1 + } + } else if this.Field4 != nil { + return 1 + } else if that1.Field4 != nil { + return -1 + } + if this.Field5 != nil && that1.Field5 != nil { + if *this.Field5 != *that1.Field5 { + if *this.Field5 < *that1.Field5 { + return -1 + } + return 1 + } + } else if this.Field5 != nil { + return 1 + } else if that1.Field5 != nil { + return -1 + } + if this.Field6 != nil && that1.Field6 != nil { + if *this.Field6 != *that1.Field6 { + if *this.Field6 < *that1.Field6 { + return -1 + } + return 1 + } + } else if this.Field6 != nil { + return 1 + } else if that1.Field6 != nil { + return -1 + } + if this.Field7 != nil && that1.Field7 != nil { + if *this.Field7 != *that1.Field7 { + if *this.Field7 < *that1.Field7 { + return -1 + } + return 1 + } + } else if this.Field7 != nil { + return 1 + } else if that1.Field7 != nil { + return -1 + } + if this.Field8 != nil && that1.Field8 != nil { + if *this.Field8 != *that1.Field8 { + if *this.Field8 < *that1.Field8 { + return -1 + } + return 1 + } + } else if this.Field8 != nil { + return 1 + } else if that1.Field8 != nil { + return -1 + } + if this.Field9 != nil && that1.Field9 != nil { + if *this.Field9 != *that1.Field9 { + if *this.Field9 < *that1.Field9 { + return -1 + } + return 1 + } + } else if this.Field9 != nil { + return 1 + } else if that1.Field9 != nil { + return -1 + } + if this.Field10 != nil && that1.Field10 != nil { + if *this.Field10 != *that1.Field10 { + if *this.Field10 < *that1.Field10 { + return -1 + } + return 1 + } + } else if this.Field10 != nil { + return 1 + } else if that1.Field10 != nil { + return -1 + } + if this.Field11 != nil && that1.Field11 != nil { + if *this.Field11 != *that1.Field11 { + if *this.Field11 < *that1.Field11 { + return -1 + } + return 1 + } + } else if this.Field11 != nil { + return 1 + } else if that1.Field11 != nil { + return -1 + } + if this.Field12 != nil && that1.Field12 != nil { + if *this.Field12 != *that1.Field12 { + if *this.Field12 < *that1.Field12 { + return -1 + } + return 1 + } + } else if this.Field12 != nil { + return 1 + } else if that1.Field12 != nil { + return -1 + } + if this.Field13 != nil && that1.Field13 != nil { + if *this.Field13 != *that1.Field13 { + if !*this.Field13 { + return -1 + } + return 1 + } + } else if this.Field13 != nil { + return 1 + } else if that1.Field13 != nil { + return -1 + } + if this.Field14 != nil && that1.Field14 != nil { + if *this.Field14 != *that1.Field14 { + if *this.Field14 < *that1.Field14 { + return -1 + } + return 1 + } + } else if this.Field14 != nil { + return 1 + } else if that1.Field14 != nil { + return -1 + } + if c := bytes.Compare(this.Field15, that1.Field15); c != 0 { + return c + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NidRepNative) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NidRepNative) + if !ok { + that2, ok := that.(NidRepNative) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if len(this.Field1) != len(that1.Field1) { + if len(this.Field1) < len(that1.Field1) { + return -1 + } + return 1 + } + for i := range this.Field1 { + if this.Field1[i] != that1.Field1[i] { + if this.Field1[i] < that1.Field1[i] { + return -1 + } + return 1 + } + } + if len(this.Field2) != len(that1.Field2) { + if len(this.Field2) < len(that1.Field2) { + return -1 + } + return 1 + } + for i := range this.Field2 { + if this.Field2[i] != that1.Field2[i] { + if this.Field2[i] < that1.Field2[i] { + return -1 + } + return 1 + } + } + if len(this.Field3) != len(that1.Field3) { + if len(this.Field3) < len(that1.Field3) { + return -1 + } + return 1 + } + for i := range this.Field3 { + if this.Field3[i] != that1.Field3[i] { + if this.Field3[i] < that1.Field3[i] { + return -1 + } + return 1 + } + } + if len(this.Field4) != len(that1.Field4) { + if len(this.Field4) < len(that1.Field4) { + return -1 + } + return 1 + } + for i := range this.Field4 { + if this.Field4[i] != that1.Field4[i] { + if this.Field4[i] < that1.Field4[i] { + return -1 + } + return 1 + } + } + if len(this.Field5) != len(that1.Field5) { + if len(this.Field5) < len(that1.Field5) { + return -1 + } + return 1 + } + for i := range this.Field5 { + if this.Field5[i] != that1.Field5[i] { + if this.Field5[i] < that1.Field5[i] { + return -1 + } + return 1 + } + } + if len(this.Field6) != len(that1.Field6) { + if len(this.Field6) < len(that1.Field6) { + return -1 + } + return 1 + } + for i := range this.Field6 { + if this.Field6[i] != that1.Field6[i] { + if this.Field6[i] < that1.Field6[i] { + return -1 + } + return 1 + } + } + if len(this.Field7) != len(that1.Field7) { + if len(this.Field7) < len(that1.Field7) { + return -1 + } + return 1 + } + for i := range this.Field7 { + if this.Field7[i] != that1.Field7[i] { + if this.Field7[i] < that1.Field7[i] { + return -1 + } + return 1 + } + } + if len(this.Field8) != len(that1.Field8) { + if len(this.Field8) < len(that1.Field8) { + return -1 + } + return 1 + } + for i := range this.Field8 { + if this.Field8[i] != that1.Field8[i] { + if this.Field8[i] < that1.Field8[i] { + return -1 + } + return 1 + } + } + if len(this.Field9) != len(that1.Field9) { + if len(this.Field9) < len(that1.Field9) { + return -1 + } + return 1 + } + for i := range this.Field9 { + if this.Field9[i] != that1.Field9[i] { + if this.Field9[i] < that1.Field9[i] { + return -1 + } + return 1 + } + } + if len(this.Field10) != len(that1.Field10) { + if len(this.Field10) < len(that1.Field10) { + return -1 + } + return 1 + } + for i := range this.Field10 { + if this.Field10[i] != that1.Field10[i] { + if this.Field10[i] < that1.Field10[i] { + return -1 + } + return 1 + } + } + if len(this.Field11) != len(that1.Field11) { + if len(this.Field11) < len(that1.Field11) { + return -1 + } + return 1 + } + for i := range this.Field11 { + if this.Field11[i] != that1.Field11[i] { + if this.Field11[i] < that1.Field11[i] { + return -1 + } + return 1 + } + } + if len(this.Field12) != len(that1.Field12) { + if len(this.Field12) < len(that1.Field12) { + return -1 + } + return 1 + } + for i := range this.Field12 { + if this.Field12[i] != that1.Field12[i] { + if this.Field12[i] < that1.Field12[i] { + return -1 + } + return 1 + } + } + if len(this.Field13) != len(that1.Field13) { + if len(this.Field13) < len(that1.Field13) { + return -1 + } + return 1 + } + for i := range this.Field13 { + if this.Field13[i] != that1.Field13[i] { + if !this.Field13[i] { + return -1 + } + return 1 + } + } + if len(this.Field14) != len(that1.Field14) { + if len(this.Field14) < len(that1.Field14) { + return -1 + } + return 1 + } + for i := range this.Field14 { + if this.Field14[i] != that1.Field14[i] { + if this.Field14[i] < that1.Field14[i] { + return -1 + } + return 1 + } + } + if len(this.Field15) != len(that1.Field15) { + if len(this.Field15) < len(that1.Field15) { + return -1 + } + return 1 + } + for i := range this.Field15 { + if c := bytes.Compare(this.Field15[i], that1.Field15[i]); c != 0 { + return c + } + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NinRepNative) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NinRepNative) + if !ok { + that2, ok := that.(NinRepNative) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if len(this.Field1) != len(that1.Field1) { + if len(this.Field1) < len(that1.Field1) { + return -1 + } + return 1 + } + for i := range this.Field1 { + if this.Field1[i] != that1.Field1[i] { + if this.Field1[i] < that1.Field1[i] { + return -1 + } + return 1 + } + } + if len(this.Field2) != len(that1.Field2) { + if len(this.Field2) < len(that1.Field2) { + return -1 + } + return 1 + } + for i := range this.Field2 { + if this.Field2[i] != that1.Field2[i] { + if this.Field2[i] < that1.Field2[i] { + return -1 + } + return 1 + } + } + if len(this.Field3) != len(that1.Field3) { + if len(this.Field3) < len(that1.Field3) { + return -1 + } + return 1 + } + for i := range this.Field3 { + if this.Field3[i] != that1.Field3[i] { + if this.Field3[i] < that1.Field3[i] { + return -1 + } + return 1 + } + } + if len(this.Field4) != len(that1.Field4) { + if len(this.Field4) < len(that1.Field4) { + return -1 + } + return 1 + } + for i := range this.Field4 { + if this.Field4[i] != that1.Field4[i] { + if this.Field4[i] < that1.Field4[i] { + return -1 + } + return 1 + } + } + if len(this.Field5) != len(that1.Field5) { + if len(this.Field5) < len(that1.Field5) { + return -1 + } + return 1 + } + for i := range this.Field5 { + if this.Field5[i] != that1.Field5[i] { + if this.Field5[i] < that1.Field5[i] { + return -1 + } + return 1 + } + } + if len(this.Field6) != len(that1.Field6) { + if len(this.Field6) < len(that1.Field6) { + return -1 + } + return 1 + } + for i := range this.Field6 { + if this.Field6[i] != that1.Field6[i] { + if this.Field6[i] < that1.Field6[i] { + return -1 + } + return 1 + } + } + if len(this.Field7) != len(that1.Field7) { + if len(this.Field7) < len(that1.Field7) { + return -1 + } + return 1 + } + for i := range this.Field7 { + if this.Field7[i] != that1.Field7[i] { + if this.Field7[i] < that1.Field7[i] { + return -1 + } + return 1 + } + } + if len(this.Field8) != len(that1.Field8) { + if len(this.Field8) < len(that1.Field8) { + return -1 + } + return 1 + } + for i := range this.Field8 { + if this.Field8[i] != that1.Field8[i] { + if this.Field8[i] < that1.Field8[i] { + return -1 + } + return 1 + } + } + if len(this.Field9) != len(that1.Field9) { + if len(this.Field9) < len(that1.Field9) { + return -1 + } + return 1 + } + for i := range this.Field9 { + if this.Field9[i] != that1.Field9[i] { + if this.Field9[i] < that1.Field9[i] { + return -1 + } + return 1 + } + } + if len(this.Field10) != len(that1.Field10) { + if len(this.Field10) < len(that1.Field10) { + return -1 + } + return 1 + } + for i := range this.Field10 { + if this.Field10[i] != that1.Field10[i] { + if this.Field10[i] < that1.Field10[i] { + return -1 + } + return 1 + } + } + if len(this.Field11) != len(that1.Field11) { + if len(this.Field11) < len(that1.Field11) { + return -1 + } + return 1 + } + for i := range this.Field11 { + if this.Field11[i] != that1.Field11[i] { + if this.Field11[i] < that1.Field11[i] { + return -1 + } + return 1 + } + } + if len(this.Field12) != len(that1.Field12) { + if len(this.Field12) < len(that1.Field12) { + return -1 + } + return 1 + } + for i := range this.Field12 { + if this.Field12[i] != that1.Field12[i] { + if this.Field12[i] < that1.Field12[i] { + return -1 + } + return 1 + } + } + if len(this.Field13) != len(that1.Field13) { + if len(this.Field13) < len(that1.Field13) { + return -1 + } + return 1 + } + for i := range this.Field13 { + if this.Field13[i] != that1.Field13[i] { + if !this.Field13[i] { + return -1 + } + return 1 + } + } + if len(this.Field14) != len(that1.Field14) { + if len(this.Field14) < len(that1.Field14) { + return -1 + } + return 1 + } + for i := range this.Field14 { + if this.Field14[i] != that1.Field14[i] { + if this.Field14[i] < that1.Field14[i] { + return -1 + } + return 1 + } + } + if len(this.Field15) != len(that1.Field15) { + if len(this.Field15) < len(that1.Field15) { + return -1 + } + return 1 + } + for i := range this.Field15 { + if c := bytes.Compare(this.Field15[i], that1.Field15[i]); c != 0 { + return c + } + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NidRepPackedNative) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NidRepPackedNative) + if !ok { + that2, ok := that.(NidRepPackedNative) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if len(this.Field1) != len(that1.Field1) { + if len(this.Field1) < len(that1.Field1) { + return -1 + } + return 1 + } + for i := range this.Field1 { + if this.Field1[i] != that1.Field1[i] { + if this.Field1[i] < that1.Field1[i] { + return -1 + } + return 1 + } + } + if len(this.Field2) != len(that1.Field2) { + if len(this.Field2) < len(that1.Field2) { + return -1 + } + return 1 + } + for i := range this.Field2 { + if this.Field2[i] != that1.Field2[i] { + if this.Field2[i] < that1.Field2[i] { + return -1 + } + return 1 + } + } + if len(this.Field3) != len(that1.Field3) { + if len(this.Field3) < len(that1.Field3) { + return -1 + } + return 1 + } + for i := range this.Field3 { + if this.Field3[i] != that1.Field3[i] { + if this.Field3[i] < that1.Field3[i] { + return -1 + } + return 1 + } + } + if len(this.Field4) != len(that1.Field4) { + if len(this.Field4) < len(that1.Field4) { + return -1 + } + return 1 + } + for i := range this.Field4 { + if this.Field4[i] != that1.Field4[i] { + if this.Field4[i] < that1.Field4[i] { + return -1 + } + return 1 + } + } + if len(this.Field5) != len(that1.Field5) { + if len(this.Field5) < len(that1.Field5) { + return -1 + } + return 1 + } + for i := range this.Field5 { + if this.Field5[i] != that1.Field5[i] { + if this.Field5[i] < that1.Field5[i] { + return -1 + } + return 1 + } + } + if len(this.Field6) != len(that1.Field6) { + if len(this.Field6) < len(that1.Field6) { + return -1 + } + return 1 + } + for i := range this.Field6 { + if this.Field6[i] != that1.Field6[i] { + if this.Field6[i] < that1.Field6[i] { + return -1 + } + return 1 + } + } + if len(this.Field7) != len(that1.Field7) { + if len(this.Field7) < len(that1.Field7) { + return -1 + } + return 1 + } + for i := range this.Field7 { + if this.Field7[i] != that1.Field7[i] { + if this.Field7[i] < that1.Field7[i] { + return -1 + } + return 1 + } + } + if len(this.Field8) != len(that1.Field8) { + if len(this.Field8) < len(that1.Field8) { + return -1 + } + return 1 + } + for i := range this.Field8 { + if this.Field8[i] != that1.Field8[i] { + if this.Field8[i] < that1.Field8[i] { + return -1 + } + return 1 + } + } + if len(this.Field9) != len(that1.Field9) { + if len(this.Field9) < len(that1.Field9) { + return -1 + } + return 1 + } + for i := range this.Field9 { + if this.Field9[i] != that1.Field9[i] { + if this.Field9[i] < that1.Field9[i] { + return -1 + } + return 1 + } + } + if len(this.Field10) != len(that1.Field10) { + if len(this.Field10) < len(that1.Field10) { + return -1 + } + return 1 + } + for i := range this.Field10 { + if this.Field10[i] != that1.Field10[i] { + if this.Field10[i] < that1.Field10[i] { + return -1 + } + return 1 + } + } + if len(this.Field11) != len(that1.Field11) { + if len(this.Field11) < len(that1.Field11) { + return -1 + } + return 1 + } + for i := range this.Field11 { + if this.Field11[i] != that1.Field11[i] { + if this.Field11[i] < that1.Field11[i] { + return -1 + } + return 1 + } + } + if len(this.Field12) != len(that1.Field12) { + if len(this.Field12) < len(that1.Field12) { + return -1 + } + return 1 + } + for i := range this.Field12 { + if this.Field12[i] != that1.Field12[i] { + if this.Field12[i] < that1.Field12[i] { + return -1 + } + return 1 + } + } + if len(this.Field13) != len(that1.Field13) { + if len(this.Field13) < len(that1.Field13) { + return -1 + } + return 1 + } + for i := range this.Field13 { + if this.Field13[i] != that1.Field13[i] { + if !this.Field13[i] { + return -1 + } + return 1 + } + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NinRepPackedNative) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NinRepPackedNative) + if !ok { + that2, ok := that.(NinRepPackedNative) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if len(this.Field1) != len(that1.Field1) { + if len(this.Field1) < len(that1.Field1) { + return -1 + } + return 1 + } + for i := range this.Field1 { + if this.Field1[i] != that1.Field1[i] { + if this.Field1[i] < that1.Field1[i] { + return -1 + } + return 1 + } + } + if len(this.Field2) != len(that1.Field2) { + if len(this.Field2) < len(that1.Field2) { + return -1 + } + return 1 + } + for i := range this.Field2 { + if this.Field2[i] != that1.Field2[i] { + if this.Field2[i] < that1.Field2[i] { + return -1 + } + return 1 + } + } + if len(this.Field3) != len(that1.Field3) { + if len(this.Field3) < len(that1.Field3) { + return -1 + } + return 1 + } + for i := range this.Field3 { + if this.Field3[i] != that1.Field3[i] { + if this.Field3[i] < that1.Field3[i] { + return -1 + } + return 1 + } + } + if len(this.Field4) != len(that1.Field4) { + if len(this.Field4) < len(that1.Field4) { + return -1 + } + return 1 + } + for i := range this.Field4 { + if this.Field4[i] != that1.Field4[i] { + if this.Field4[i] < that1.Field4[i] { + return -1 + } + return 1 + } + } + if len(this.Field5) != len(that1.Field5) { + if len(this.Field5) < len(that1.Field5) { + return -1 + } + return 1 + } + for i := range this.Field5 { + if this.Field5[i] != that1.Field5[i] { + if this.Field5[i] < that1.Field5[i] { + return -1 + } + return 1 + } + } + if len(this.Field6) != len(that1.Field6) { + if len(this.Field6) < len(that1.Field6) { + return -1 + } + return 1 + } + for i := range this.Field6 { + if this.Field6[i] != that1.Field6[i] { + if this.Field6[i] < that1.Field6[i] { + return -1 + } + return 1 + } + } + if len(this.Field7) != len(that1.Field7) { + if len(this.Field7) < len(that1.Field7) { + return -1 + } + return 1 + } + for i := range this.Field7 { + if this.Field7[i] != that1.Field7[i] { + if this.Field7[i] < that1.Field7[i] { + return -1 + } + return 1 + } + } + if len(this.Field8) != len(that1.Field8) { + if len(this.Field8) < len(that1.Field8) { + return -1 + } + return 1 + } + for i := range this.Field8 { + if this.Field8[i] != that1.Field8[i] { + if this.Field8[i] < that1.Field8[i] { + return -1 + } + return 1 + } + } + if len(this.Field9) != len(that1.Field9) { + if len(this.Field9) < len(that1.Field9) { + return -1 + } + return 1 + } + for i := range this.Field9 { + if this.Field9[i] != that1.Field9[i] { + if this.Field9[i] < that1.Field9[i] { + return -1 + } + return 1 + } + } + if len(this.Field10) != len(that1.Field10) { + if len(this.Field10) < len(that1.Field10) { + return -1 + } + return 1 + } + for i := range this.Field10 { + if this.Field10[i] != that1.Field10[i] { + if this.Field10[i] < that1.Field10[i] { + return -1 + } + return 1 + } + } + if len(this.Field11) != len(that1.Field11) { + if len(this.Field11) < len(that1.Field11) { + return -1 + } + return 1 + } + for i := range this.Field11 { + if this.Field11[i] != that1.Field11[i] { + if this.Field11[i] < that1.Field11[i] { + return -1 + } + return 1 + } + } + if len(this.Field12) != len(that1.Field12) { + if len(this.Field12) < len(that1.Field12) { + return -1 + } + return 1 + } + for i := range this.Field12 { + if this.Field12[i] != that1.Field12[i] { + if this.Field12[i] < that1.Field12[i] { + return -1 + } + return 1 + } + } + if len(this.Field13) != len(that1.Field13) { + if len(this.Field13) < len(that1.Field13) { + return -1 + } + return 1 + } + for i := range this.Field13 { + if this.Field13[i] != that1.Field13[i] { + if !this.Field13[i] { + return -1 + } + return 1 + } + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NidOptStruct) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NidOptStruct) + if !ok { + that2, ok := that.(NidOptStruct) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.Field1 != that1.Field1 { + if this.Field1 < that1.Field1 { + return -1 + } + return 1 + } + if this.Field2 != that1.Field2 { + if this.Field2 < that1.Field2 { + return -1 + } + return 1 + } + if c := this.Field3.Compare(&that1.Field3); c != 0 { + return c + } + if c := this.Field4.Compare(&that1.Field4); c != 0 { + return c + } + if this.Field6 != that1.Field6 { + if this.Field6 < that1.Field6 { + return -1 + } + return 1 + } + if this.Field7 != that1.Field7 { + if this.Field7 < that1.Field7 { + return -1 + } + return 1 + } + if c := this.Field8.Compare(&that1.Field8); c != 0 { + return c + } + if this.Field13 != that1.Field13 { + if !this.Field13 { + return -1 + } + return 1 + } + if this.Field14 != that1.Field14 { + if this.Field14 < that1.Field14 { + return -1 + } + return 1 + } + if c := bytes.Compare(this.Field15, that1.Field15); c != 0 { + return c + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NinOptStruct) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NinOptStruct) + if !ok { + that2, ok := that.(NinOptStruct) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + if *this.Field1 < *that1.Field1 { + return -1 + } + return 1 + } + } else if this.Field1 != nil { + return 1 + } else if that1.Field1 != nil { + return -1 + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + if *this.Field2 < *that1.Field2 { + return -1 + } + return 1 + } + } else if this.Field2 != nil { + return 1 + } else if that1.Field2 != nil { + return -1 + } + if c := this.Field3.Compare(that1.Field3); c != 0 { + return c + } + if c := this.Field4.Compare(that1.Field4); c != 0 { + return c + } + if this.Field6 != nil && that1.Field6 != nil { + if *this.Field6 != *that1.Field6 { + if *this.Field6 < *that1.Field6 { + return -1 + } + return 1 + } + } else if this.Field6 != nil { + return 1 + } else if that1.Field6 != nil { + return -1 + } + if this.Field7 != nil && that1.Field7 != nil { + if *this.Field7 != *that1.Field7 { + if *this.Field7 < *that1.Field7 { + return -1 + } + return 1 + } + } else if this.Field7 != nil { + return 1 + } else if that1.Field7 != nil { + return -1 + } + if c := this.Field8.Compare(that1.Field8); c != 0 { + return c + } + if this.Field13 != nil && that1.Field13 != nil { + if *this.Field13 != *that1.Field13 { + if !*this.Field13 { + return -1 + } + return 1 + } + } else if this.Field13 != nil { + return 1 + } else if that1.Field13 != nil { + return -1 + } + if this.Field14 != nil && that1.Field14 != nil { + if *this.Field14 != *that1.Field14 { + if *this.Field14 < *that1.Field14 { + return -1 + } + return 1 + } + } else if this.Field14 != nil { + return 1 + } else if that1.Field14 != nil { + return -1 + } + if c := bytes.Compare(this.Field15, that1.Field15); c != 0 { + return c + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NidRepStruct) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NidRepStruct) + if !ok { + that2, ok := that.(NidRepStruct) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if len(this.Field1) != len(that1.Field1) { + if len(this.Field1) < len(that1.Field1) { + return -1 + } + return 1 + } + for i := range this.Field1 { + if this.Field1[i] != that1.Field1[i] { + if this.Field1[i] < that1.Field1[i] { + return -1 + } + return 1 + } + } + if len(this.Field2) != len(that1.Field2) { + if len(this.Field2) < len(that1.Field2) { + return -1 + } + return 1 + } + for i := range this.Field2 { + if this.Field2[i] != that1.Field2[i] { + if this.Field2[i] < that1.Field2[i] { + return -1 + } + return 1 + } + } + if len(this.Field3) != len(that1.Field3) { + if len(this.Field3) < len(that1.Field3) { + return -1 + } + return 1 + } + for i := range this.Field3 { + if c := this.Field3[i].Compare(&that1.Field3[i]); c != 0 { + return c + } + } + if len(this.Field4) != len(that1.Field4) { + if len(this.Field4) < len(that1.Field4) { + return -1 + } + return 1 + } + for i := range this.Field4 { + if c := this.Field4[i].Compare(&that1.Field4[i]); c != 0 { + return c + } + } + if len(this.Field6) != len(that1.Field6) { + if len(this.Field6) < len(that1.Field6) { + return -1 + } + return 1 + } + for i := range this.Field6 { + if this.Field6[i] != that1.Field6[i] { + if this.Field6[i] < that1.Field6[i] { + return -1 + } + return 1 + } + } + if len(this.Field7) != len(that1.Field7) { + if len(this.Field7) < len(that1.Field7) { + return -1 + } + return 1 + } + for i := range this.Field7 { + if this.Field7[i] != that1.Field7[i] { + if this.Field7[i] < that1.Field7[i] { + return -1 + } + return 1 + } + } + if len(this.Field8) != len(that1.Field8) { + if len(this.Field8) < len(that1.Field8) { + return -1 + } + return 1 + } + for i := range this.Field8 { + if c := this.Field8[i].Compare(&that1.Field8[i]); c != 0 { + return c + } + } + if len(this.Field13) != len(that1.Field13) { + if len(this.Field13) < len(that1.Field13) { + return -1 + } + return 1 + } + for i := range this.Field13 { + if this.Field13[i] != that1.Field13[i] { + if !this.Field13[i] { + return -1 + } + return 1 + } + } + if len(this.Field14) != len(that1.Field14) { + if len(this.Field14) < len(that1.Field14) { + return -1 + } + return 1 + } + for i := range this.Field14 { + if this.Field14[i] != that1.Field14[i] { + if this.Field14[i] < that1.Field14[i] { + return -1 + } + return 1 + } + } + if len(this.Field15) != len(that1.Field15) { + if len(this.Field15) < len(that1.Field15) { + return -1 + } + return 1 + } + for i := range this.Field15 { + if c := bytes.Compare(this.Field15[i], that1.Field15[i]); c != 0 { + return c + } + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NinRepStruct) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NinRepStruct) + if !ok { + that2, ok := that.(NinRepStruct) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if len(this.Field1) != len(that1.Field1) { + if len(this.Field1) < len(that1.Field1) { + return -1 + } + return 1 + } + for i := range this.Field1 { + if this.Field1[i] != that1.Field1[i] { + if this.Field1[i] < that1.Field1[i] { + return -1 + } + return 1 + } + } + if len(this.Field2) != len(that1.Field2) { + if len(this.Field2) < len(that1.Field2) { + return -1 + } + return 1 + } + for i := range this.Field2 { + if this.Field2[i] != that1.Field2[i] { + if this.Field2[i] < that1.Field2[i] { + return -1 + } + return 1 + } + } + if len(this.Field3) != len(that1.Field3) { + if len(this.Field3) < len(that1.Field3) { + return -1 + } + return 1 + } + for i := range this.Field3 { + if c := this.Field3[i].Compare(that1.Field3[i]); c != 0 { + return c + } + } + if len(this.Field4) != len(that1.Field4) { + if len(this.Field4) < len(that1.Field4) { + return -1 + } + return 1 + } + for i := range this.Field4 { + if c := this.Field4[i].Compare(that1.Field4[i]); c != 0 { + return c + } + } + if len(this.Field6) != len(that1.Field6) { + if len(this.Field6) < len(that1.Field6) { + return -1 + } + return 1 + } + for i := range this.Field6 { + if this.Field6[i] != that1.Field6[i] { + if this.Field6[i] < that1.Field6[i] { + return -1 + } + return 1 + } + } + if len(this.Field7) != len(that1.Field7) { + if len(this.Field7) < len(that1.Field7) { + return -1 + } + return 1 + } + for i := range this.Field7 { + if this.Field7[i] != that1.Field7[i] { + if this.Field7[i] < that1.Field7[i] { + return -1 + } + return 1 + } + } + if len(this.Field8) != len(that1.Field8) { + if len(this.Field8) < len(that1.Field8) { + return -1 + } + return 1 + } + for i := range this.Field8 { + if c := this.Field8[i].Compare(that1.Field8[i]); c != 0 { + return c + } + } + if len(this.Field13) != len(that1.Field13) { + if len(this.Field13) < len(that1.Field13) { + return -1 + } + return 1 + } + for i := range this.Field13 { + if this.Field13[i] != that1.Field13[i] { + if !this.Field13[i] { + return -1 + } + return 1 + } + } + if len(this.Field14) != len(that1.Field14) { + if len(this.Field14) < len(that1.Field14) { + return -1 + } + return 1 + } + for i := range this.Field14 { + if this.Field14[i] != that1.Field14[i] { + if this.Field14[i] < that1.Field14[i] { + return -1 + } + return 1 + } + } + if len(this.Field15) != len(that1.Field15) { + if len(this.Field15) < len(that1.Field15) { + return -1 + } + return 1 + } + for i := range this.Field15 { + if c := bytes.Compare(this.Field15[i], that1.Field15[i]); c != 0 { + return c + } + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NidEmbeddedStruct) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NidEmbeddedStruct) + if !ok { + that2, ok := that.(NidEmbeddedStruct) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if c := this.NidOptNative.Compare(that1.NidOptNative); c != 0 { + return c + } + if c := this.Field200.Compare(&that1.Field200); c != 0 { + return c + } + if this.Field210 != that1.Field210 { + if !this.Field210 { + return -1 + } + return 1 + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NinEmbeddedStruct) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NinEmbeddedStruct) + if !ok { + that2, ok := that.(NinEmbeddedStruct) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if c := this.NidOptNative.Compare(that1.NidOptNative); c != 0 { + return c + } + if c := this.Field200.Compare(that1.Field200); c != 0 { + return c + } + if this.Field210 != nil && that1.Field210 != nil { + if *this.Field210 != *that1.Field210 { + if !*this.Field210 { + return -1 + } + return 1 + } + } else if this.Field210 != nil { + return 1 + } else if that1.Field210 != nil { + return -1 + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NidNestedStruct) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NidNestedStruct) + if !ok { + that2, ok := that.(NidNestedStruct) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if c := this.Field1.Compare(&that1.Field1); c != 0 { + return c + } + if len(this.Field2) != len(that1.Field2) { + if len(this.Field2) < len(that1.Field2) { + return -1 + } + return 1 + } + for i := range this.Field2 { + if c := this.Field2[i].Compare(&that1.Field2[i]); c != 0 { + return c + } + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NinNestedStruct) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NinNestedStruct) + if !ok { + that2, ok := that.(NinNestedStruct) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if c := this.Field1.Compare(that1.Field1); c != 0 { + return c + } + if len(this.Field2) != len(that1.Field2) { + if len(this.Field2) < len(that1.Field2) { + return -1 + } + return 1 + } + for i := range this.Field2 { + if c := this.Field2[i].Compare(that1.Field2[i]); c != 0 { + return c + } + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NidOptCustom) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NidOptCustom) + if !ok { + that2, ok := that.(NidOptCustom) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if c := this.Id.Compare(that1.Id); c != 0 { + return c + } + if c := this.Value.Compare(that1.Value); c != 0 { + return c + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *CustomDash) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*CustomDash) + if !ok { + that2, ok := that.(CustomDash) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if that1.Value == nil { + if this.Value != nil { + return 1 + } + } else if this.Value == nil { + return -1 + } else if c := this.Value.Compare(*that1.Value); c != 0 { + return c + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NinOptCustom) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NinOptCustom) + if !ok { + that2, ok := that.(NinOptCustom) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if that1.Id == nil { + if this.Id != nil { + return 1 + } + } else if this.Id == nil { + return -1 + } else if c := this.Id.Compare(*that1.Id); c != 0 { + return c + } + if that1.Value == nil { + if this.Value != nil { + return 1 + } + } else if this.Value == nil { + return -1 + } else if c := this.Value.Compare(*that1.Value); c != 0 { + return c + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NidRepCustom) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NidRepCustom) + if !ok { + that2, ok := that.(NidRepCustom) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if len(this.Id) != len(that1.Id) { + if len(this.Id) < len(that1.Id) { + return -1 + } + return 1 + } + for i := range this.Id { + if c := this.Id[i].Compare(that1.Id[i]); c != 0 { + return c + } + } + if len(this.Value) != len(that1.Value) { + if len(this.Value) < len(that1.Value) { + return -1 + } + return 1 + } + for i := range this.Value { + if c := this.Value[i].Compare(that1.Value[i]); c != 0 { + return c + } + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NinRepCustom) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NinRepCustom) + if !ok { + that2, ok := that.(NinRepCustom) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if len(this.Id) != len(that1.Id) { + if len(this.Id) < len(that1.Id) { + return -1 + } + return 1 + } + for i := range this.Id { + if c := this.Id[i].Compare(that1.Id[i]); c != 0 { + return c + } + } + if len(this.Value) != len(that1.Value) { + if len(this.Value) < len(that1.Value) { + return -1 + } + return 1 + } + for i := range this.Value { + if c := this.Value[i].Compare(that1.Value[i]); c != 0 { + return c + } + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NinOptNativeUnion) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NinOptNativeUnion) + if !ok { + that2, ok := that.(NinOptNativeUnion) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + if *this.Field1 < *that1.Field1 { + return -1 + } + return 1 + } + } else if this.Field1 != nil { + return 1 + } else if that1.Field1 != nil { + return -1 + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + if *this.Field2 < *that1.Field2 { + return -1 + } + return 1 + } + } else if this.Field2 != nil { + return 1 + } else if that1.Field2 != nil { + return -1 + } + if this.Field3 != nil && that1.Field3 != nil { + if *this.Field3 != *that1.Field3 { + if *this.Field3 < *that1.Field3 { + return -1 + } + return 1 + } + } else if this.Field3 != nil { + return 1 + } else if that1.Field3 != nil { + return -1 + } + if this.Field4 != nil && that1.Field4 != nil { + if *this.Field4 != *that1.Field4 { + if *this.Field4 < *that1.Field4 { + return -1 + } + return 1 + } + } else if this.Field4 != nil { + return 1 + } else if that1.Field4 != nil { + return -1 + } + if this.Field5 != nil && that1.Field5 != nil { + if *this.Field5 != *that1.Field5 { + if *this.Field5 < *that1.Field5 { + return -1 + } + return 1 + } + } else if this.Field5 != nil { + return 1 + } else if that1.Field5 != nil { + return -1 + } + if this.Field6 != nil && that1.Field6 != nil { + if *this.Field6 != *that1.Field6 { + if *this.Field6 < *that1.Field6 { + return -1 + } + return 1 + } + } else if this.Field6 != nil { + return 1 + } else if that1.Field6 != nil { + return -1 + } + if this.Field13 != nil && that1.Field13 != nil { + if *this.Field13 != *that1.Field13 { + if !*this.Field13 { + return -1 + } + return 1 + } + } else if this.Field13 != nil { + return 1 + } else if that1.Field13 != nil { + return -1 + } + if this.Field14 != nil && that1.Field14 != nil { + if *this.Field14 != *that1.Field14 { + if *this.Field14 < *that1.Field14 { + return -1 + } + return 1 + } + } else if this.Field14 != nil { + return 1 + } else if that1.Field14 != nil { + return -1 + } + if c := bytes.Compare(this.Field15, that1.Field15); c != 0 { + return c + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NinOptStructUnion) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NinOptStructUnion) + if !ok { + that2, ok := that.(NinOptStructUnion) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + if *this.Field1 < *that1.Field1 { + return -1 + } + return 1 + } + } else if this.Field1 != nil { + return 1 + } else if that1.Field1 != nil { + return -1 + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + if *this.Field2 < *that1.Field2 { + return -1 + } + return 1 + } + } else if this.Field2 != nil { + return 1 + } else if that1.Field2 != nil { + return -1 + } + if c := this.Field3.Compare(that1.Field3); c != 0 { + return c + } + if c := this.Field4.Compare(that1.Field4); c != 0 { + return c + } + if this.Field6 != nil && that1.Field6 != nil { + if *this.Field6 != *that1.Field6 { + if *this.Field6 < *that1.Field6 { + return -1 + } + return 1 + } + } else if this.Field6 != nil { + return 1 + } else if that1.Field6 != nil { + return -1 + } + if this.Field7 != nil && that1.Field7 != nil { + if *this.Field7 != *that1.Field7 { + if *this.Field7 < *that1.Field7 { + return -1 + } + return 1 + } + } else if this.Field7 != nil { + return 1 + } else if that1.Field7 != nil { + return -1 + } + if this.Field13 != nil && that1.Field13 != nil { + if *this.Field13 != *that1.Field13 { + if !*this.Field13 { + return -1 + } + return 1 + } + } else if this.Field13 != nil { + return 1 + } else if that1.Field13 != nil { + return -1 + } + if this.Field14 != nil && that1.Field14 != nil { + if *this.Field14 != *that1.Field14 { + if *this.Field14 < *that1.Field14 { + return -1 + } + return 1 + } + } else if this.Field14 != nil { + return 1 + } else if that1.Field14 != nil { + return -1 + } + if c := bytes.Compare(this.Field15, that1.Field15); c != 0 { + return c + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NinEmbeddedStructUnion) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NinEmbeddedStructUnion) + if !ok { + that2, ok := that.(NinEmbeddedStructUnion) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if c := this.NidOptNative.Compare(that1.NidOptNative); c != 0 { + return c + } + if c := this.Field200.Compare(that1.Field200); c != 0 { + return c + } + if this.Field210 != nil && that1.Field210 != nil { + if *this.Field210 != *that1.Field210 { + if !*this.Field210 { + return -1 + } + return 1 + } + } else if this.Field210 != nil { + return 1 + } else if that1.Field210 != nil { + return -1 + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NinNestedStructUnion) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NinNestedStructUnion) + if !ok { + that2, ok := that.(NinNestedStructUnion) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if c := this.Field1.Compare(that1.Field1); c != 0 { + return c + } + if c := this.Field2.Compare(that1.Field2); c != 0 { + return c + } + if c := this.Field3.Compare(that1.Field3); c != 0 { + return c + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *Tree) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*Tree) + if !ok { + that2, ok := that.(Tree) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if c := this.Or.Compare(that1.Or); c != 0 { + return c + } + if c := this.And.Compare(that1.And); c != 0 { + return c + } + if c := this.Leaf.Compare(that1.Leaf); c != 0 { + return c + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *OrBranch) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*OrBranch) + if !ok { + that2, ok := that.(OrBranch) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if c := this.Left.Compare(&that1.Left); c != 0 { + return c + } + if c := this.Right.Compare(&that1.Right); c != 0 { + return c + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *AndBranch) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*AndBranch) + if !ok { + that2, ok := that.(AndBranch) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if c := this.Left.Compare(&that1.Left); c != 0 { + return c + } + if c := this.Right.Compare(&that1.Right); c != 0 { + return c + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *Leaf) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*Leaf) + if !ok { + that2, ok := that.(Leaf) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.Value != that1.Value { + if this.Value < that1.Value { + return -1 + } + return 1 + } + if this.StrValue != that1.StrValue { + if this.StrValue < that1.StrValue { + return -1 + } + return 1 + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *DeepTree) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*DeepTree) + if !ok { + that2, ok := that.(DeepTree) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if c := this.Down.Compare(that1.Down); c != 0 { + return c + } + if c := this.And.Compare(that1.And); c != 0 { + return c + } + if c := this.Leaf.Compare(that1.Leaf); c != 0 { + return c + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *ADeepBranch) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*ADeepBranch) + if !ok { + that2, ok := that.(ADeepBranch) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if c := this.Down.Compare(&that1.Down); c != 0 { + return c + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *AndDeepBranch) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*AndDeepBranch) + if !ok { + that2, ok := that.(AndDeepBranch) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if c := this.Left.Compare(&that1.Left); c != 0 { + return c + } + if c := this.Right.Compare(&that1.Right); c != 0 { + return c + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *DeepLeaf) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*DeepLeaf) + if !ok { + that2, ok := that.(DeepLeaf) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if c := this.Tree.Compare(&that1.Tree); c != 0 { + return c + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *Nil) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*Nil) + if !ok { + that2, ok := that.(Nil) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NidOptEnum) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NidOptEnum) + if !ok { + that2, ok := that.(NidOptEnum) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.Field1 != that1.Field1 { + if this.Field1 < that1.Field1 { + return -1 + } + return 1 + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NinOptEnum) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NinOptEnum) + if !ok { + that2, ok := that.(NinOptEnum) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + if *this.Field1 < *that1.Field1 { + return -1 + } + return 1 + } + } else if this.Field1 != nil { + return 1 + } else if that1.Field1 != nil { + return -1 + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + if *this.Field2 < *that1.Field2 { + return -1 + } + return 1 + } + } else if this.Field2 != nil { + return 1 + } else if that1.Field2 != nil { + return -1 + } + if this.Field3 != nil && that1.Field3 != nil { + if *this.Field3 != *that1.Field3 { + if *this.Field3 < *that1.Field3 { + return -1 + } + return 1 + } + } else if this.Field3 != nil { + return 1 + } else if that1.Field3 != nil { + return -1 + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NidRepEnum) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NidRepEnum) + if !ok { + that2, ok := that.(NidRepEnum) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if len(this.Field1) != len(that1.Field1) { + if len(this.Field1) < len(that1.Field1) { + return -1 + } + return 1 + } + for i := range this.Field1 { + if this.Field1[i] != that1.Field1[i] { + if this.Field1[i] < that1.Field1[i] { + return -1 + } + return 1 + } + } + if len(this.Field2) != len(that1.Field2) { + if len(this.Field2) < len(that1.Field2) { + return -1 + } + return 1 + } + for i := range this.Field2 { + if this.Field2[i] != that1.Field2[i] { + if this.Field2[i] < that1.Field2[i] { + return -1 + } + return 1 + } + } + if len(this.Field3) != len(that1.Field3) { + if len(this.Field3) < len(that1.Field3) { + return -1 + } + return 1 + } + for i := range this.Field3 { + if this.Field3[i] != that1.Field3[i] { + if this.Field3[i] < that1.Field3[i] { + return -1 + } + return 1 + } + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NinRepEnum) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NinRepEnum) + if !ok { + that2, ok := that.(NinRepEnum) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if len(this.Field1) != len(that1.Field1) { + if len(this.Field1) < len(that1.Field1) { + return -1 + } + return 1 + } + for i := range this.Field1 { + if this.Field1[i] != that1.Field1[i] { + if this.Field1[i] < that1.Field1[i] { + return -1 + } + return 1 + } + } + if len(this.Field2) != len(that1.Field2) { + if len(this.Field2) < len(that1.Field2) { + return -1 + } + return 1 + } + for i := range this.Field2 { + if this.Field2[i] != that1.Field2[i] { + if this.Field2[i] < that1.Field2[i] { + return -1 + } + return 1 + } + } + if len(this.Field3) != len(that1.Field3) { + if len(this.Field3) < len(that1.Field3) { + return -1 + } + return 1 + } + for i := range this.Field3 { + if this.Field3[i] != that1.Field3[i] { + if this.Field3[i] < that1.Field3[i] { + return -1 + } + return 1 + } + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NinOptEnumDefault) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NinOptEnumDefault) + if !ok { + that2, ok := that.(NinOptEnumDefault) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + if *this.Field1 < *that1.Field1 { + return -1 + } + return 1 + } + } else if this.Field1 != nil { + return 1 + } else if that1.Field1 != nil { + return -1 + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + if *this.Field2 < *that1.Field2 { + return -1 + } + return 1 + } + } else if this.Field2 != nil { + return 1 + } else if that1.Field2 != nil { + return -1 + } + if this.Field3 != nil && that1.Field3 != nil { + if *this.Field3 != *that1.Field3 { + if *this.Field3 < *that1.Field3 { + return -1 + } + return 1 + } + } else if this.Field3 != nil { + return 1 + } else if that1.Field3 != nil { + return -1 + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *AnotherNinOptEnum) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*AnotherNinOptEnum) + if !ok { + that2, ok := that.(AnotherNinOptEnum) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + if *this.Field1 < *that1.Field1 { + return -1 + } + return 1 + } + } else if this.Field1 != nil { + return 1 + } else if that1.Field1 != nil { + return -1 + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + if *this.Field2 < *that1.Field2 { + return -1 + } + return 1 + } + } else if this.Field2 != nil { + return 1 + } else if that1.Field2 != nil { + return -1 + } + if this.Field3 != nil && that1.Field3 != nil { + if *this.Field3 != *that1.Field3 { + if *this.Field3 < *that1.Field3 { + return -1 + } + return 1 + } + } else if this.Field3 != nil { + return 1 + } else if that1.Field3 != nil { + return -1 + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *AnotherNinOptEnumDefault) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*AnotherNinOptEnumDefault) + if !ok { + that2, ok := that.(AnotherNinOptEnumDefault) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + if *this.Field1 < *that1.Field1 { + return -1 + } + return 1 + } + } else if this.Field1 != nil { + return 1 + } else if that1.Field1 != nil { + return -1 + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + if *this.Field2 < *that1.Field2 { + return -1 + } + return 1 + } + } else if this.Field2 != nil { + return 1 + } else if that1.Field2 != nil { + return -1 + } + if this.Field3 != nil && that1.Field3 != nil { + if *this.Field3 != *that1.Field3 { + if *this.Field3 < *that1.Field3 { + return -1 + } + return 1 + } + } else if this.Field3 != nil { + return 1 + } else if that1.Field3 != nil { + return -1 + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *Timer) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*Timer) + if !ok { + that2, ok := that.(Timer) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.Time1 != that1.Time1 { + if this.Time1 < that1.Time1 { + return -1 + } + return 1 + } + if this.Time2 != that1.Time2 { + if this.Time2 < that1.Time2 { + return -1 + } + return 1 + } + if c := bytes.Compare(this.Data, that1.Data); c != 0 { + return c + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *MyExtendable) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*MyExtendable) + if !ok { + that2, ok := that.(MyExtendable) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + if *this.Field1 < *that1.Field1 { + return -1 + } + return 1 + } + } else if this.Field1 != nil { + return 1 + } else if that1.Field1 != nil { + return -1 + } + extkeys := make([]int32, 0, len(this.XXX_extensions)+len(that1.XXX_extensions)) + for k := range this.XXX_extensions { + extkeys = append(extkeys, k) + } + for k := range that1.XXX_extensions { + if _, ok := this.XXX_extensions[k]; !ok { + extkeys = append(extkeys, k) + } + } + github_com_gogo_protobuf_sortkeys.Int32s(extkeys) + for _, k := range extkeys { + if v, ok := this.XXX_extensions[k]; ok { + if v2, ok := that1.XXX_extensions[k]; ok { + if c := v.Compare(&v2); c != 0 { + return c + } + } else { + return 1 + } + } else { + return -1 + } + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *OtherExtenable) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*OtherExtenable) + if !ok { + that2, ok := that.(OtherExtenable) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + if *this.Field2 < *that1.Field2 { + return -1 + } + return 1 + } + } else if this.Field2 != nil { + return 1 + } else if that1.Field2 != nil { + return -1 + } + if this.Field13 != nil && that1.Field13 != nil { + if *this.Field13 != *that1.Field13 { + if *this.Field13 < *that1.Field13 { + return -1 + } + return 1 + } + } else if this.Field13 != nil { + return 1 + } else if that1.Field13 != nil { + return -1 + } + if c := this.M.Compare(that1.M); c != 0 { + return c + } + extkeys := make([]int32, 0, len(this.XXX_extensions)+len(that1.XXX_extensions)) + for k := range this.XXX_extensions { + extkeys = append(extkeys, k) + } + for k := range that1.XXX_extensions { + if _, ok := this.XXX_extensions[k]; !ok { + extkeys = append(extkeys, k) + } + } + github_com_gogo_protobuf_sortkeys.Int32s(extkeys) + for _, k := range extkeys { + if v, ok := this.XXX_extensions[k]; ok { + if v2, ok := that1.XXX_extensions[k]; ok { + if c := v.Compare(&v2); c != 0 { + return c + } + } else { + return 1 + } + } else { + return -1 + } + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NestedDefinition) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NestedDefinition) + if !ok { + that2, ok := that.(NestedDefinition) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + if *this.Field1 < *that1.Field1 { + return -1 + } + return 1 + } + } else if this.Field1 != nil { + return 1 + } else if that1.Field1 != nil { + return -1 + } + if this.EnumField != nil && that1.EnumField != nil { + if *this.EnumField != *that1.EnumField { + if *this.EnumField < *that1.EnumField { + return -1 + } + return 1 + } + } else if this.EnumField != nil { + return 1 + } else if that1.EnumField != nil { + return -1 + } + if c := this.NNM.Compare(that1.NNM); c != 0 { + return c + } + if c := this.NM.Compare(that1.NM); c != 0 { + return c + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NestedDefinition_NestedMessage) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NestedDefinition_NestedMessage) + if !ok { + that2, ok := that.(NestedDefinition_NestedMessage) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.NestedField1 != nil && that1.NestedField1 != nil { + if *this.NestedField1 != *that1.NestedField1 { + if *this.NestedField1 < *that1.NestedField1 { + return -1 + } + return 1 + } + } else if this.NestedField1 != nil { + return 1 + } else if that1.NestedField1 != nil { + return -1 + } + if c := this.NNM.Compare(that1.NNM); c != 0 { + return c + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NestedDefinition_NestedMessage_NestedNestedMsg) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NestedDefinition_NestedMessage_NestedNestedMsg) + if !ok { + that2, ok := that.(NestedDefinition_NestedMessage_NestedNestedMsg) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.NestedNestedField1 != nil && that1.NestedNestedField1 != nil { + if *this.NestedNestedField1 != *that1.NestedNestedField1 { + if *this.NestedNestedField1 < *that1.NestedNestedField1 { + return -1 + } + return 1 + } + } else if this.NestedNestedField1 != nil { + return 1 + } else if that1.NestedNestedField1 != nil { + return -1 + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NestedScope) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NestedScope) + if !ok { + that2, ok := that.(NestedScope) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if c := this.A.Compare(that1.A); c != 0 { + return c + } + if this.B != nil && that1.B != nil { + if *this.B != *that1.B { + if *this.B < *that1.B { + return -1 + } + return 1 + } + } else if this.B != nil { + return 1 + } else if that1.B != nil { + return -1 + } + if c := this.C.Compare(that1.C); c != 0 { + return c + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NinOptNativeDefault) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NinOptNativeDefault) + if !ok { + that2, ok := that.(NinOptNativeDefault) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + if *this.Field1 < *that1.Field1 { + return -1 + } + return 1 + } + } else if this.Field1 != nil { + return 1 + } else if that1.Field1 != nil { + return -1 + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + if *this.Field2 < *that1.Field2 { + return -1 + } + return 1 + } + } else if this.Field2 != nil { + return 1 + } else if that1.Field2 != nil { + return -1 + } + if this.Field3 != nil && that1.Field3 != nil { + if *this.Field3 != *that1.Field3 { + if *this.Field3 < *that1.Field3 { + return -1 + } + return 1 + } + } else if this.Field3 != nil { + return 1 + } else if that1.Field3 != nil { + return -1 + } + if this.Field4 != nil && that1.Field4 != nil { + if *this.Field4 != *that1.Field4 { + if *this.Field4 < *that1.Field4 { + return -1 + } + return 1 + } + } else if this.Field4 != nil { + return 1 + } else if that1.Field4 != nil { + return -1 + } + if this.Field5 != nil && that1.Field5 != nil { + if *this.Field5 != *that1.Field5 { + if *this.Field5 < *that1.Field5 { + return -1 + } + return 1 + } + } else if this.Field5 != nil { + return 1 + } else if that1.Field5 != nil { + return -1 + } + if this.Field6 != nil && that1.Field6 != nil { + if *this.Field6 != *that1.Field6 { + if *this.Field6 < *that1.Field6 { + return -1 + } + return 1 + } + } else if this.Field6 != nil { + return 1 + } else if that1.Field6 != nil { + return -1 + } + if this.Field7 != nil && that1.Field7 != nil { + if *this.Field7 != *that1.Field7 { + if *this.Field7 < *that1.Field7 { + return -1 + } + return 1 + } + } else if this.Field7 != nil { + return 1 + } else if that1.Field7 != nil { + return -1 + } + if this.Field8 != nil && that1.Field8 != nil { + if *this.Field8 != *that1.Field8 { + if *this.Field8 < *that1.Field8 { + return -1 + } + return 1 + } + } else if this.Field8 != nil { + return 1 + } else if that1.Field8 != nil { + return -1 + } + if this.Field9 != nil && that1.Field9 != nil { + if *this.Field9 != *that1.Field9 { + if *this.Field9 < *that1.Field9 { + return -1 + } + return 1 + } + } else if this.Field9 != nil { + return 1 + } else if that1.Field9 != nil { + return -1 + } + if this.Field10 != nil && that1.Field10 != nil { + if *this.Field10 != *that1.Field10 { + if *this.Field10 < *that1.Field10 { + return -1 + } + return 1 + } + } else if this.Field10 != nil { + return 1 + } else if that1.Field10 != nil { + return -1 + } + if this.Field11 != nil && that1.Field11 != nil { + if *this.Field11 != *that1.Field11 { + if *this.Field11 < *that1.Field11 { + return -1 + } + return 1 + } + } else if this.Field11 != nil { + return 1 + } else if that1.Field11 != nil { + return -1 + } + if this.Field12 != nil && that1.Field12 != nil { + if *this.Field12 != *that1.Field12 { + if *this.Field12 < *that1.Field12 { + return -1 + } + return 1 + } + } else if this.Field12 != nil { + return 1 + } else if that1.Field12 != nil { + return -1 + } + if this.Field13 != nil && that1.Field13 != nil { + if *this.Field13 != *that1.Field13 { + if !*this.Field13 { + return -1 + } + return 1 + } + } else if this.Field13 != nil { + return 1 + } else if that1.Field13 != nil { + return -1 + } + if this.Field14 != nil && that1.Field14 != nil { + if *this.Field14 != *that1.Field14 { + if *this.Field14 < *that1.Field14 { + return -1 + } + return 1 + } + } else if this.Field14 != nil { + return 1 + } else if that1.Field14 != nil { + return -1 + } + if c := bytes.Compare(this.Field15, that1.Field15); c != 0 { + return c + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *CustomContainer) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*CustomContainer) + if !ok { + that2, ok := that.(CustomContainer) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if c := this.CustomStruct.Compare(&that1.CustomStruct); c != 0 { + return c + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *CustomNameNidOptNative) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*CustomNameNidOptNative) + if !ok { + that2, ok := that.(CustomNameNidOptNative) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.FieldA != that1.FieldA { + if this.FieldA < that1.FieldA { + return -1 + } + return 1 + } + if this.FieldB != that1.FieldB { + if this.FieldB < that1.FieldB { + return -1 + } + return 1 + } + if this.FieldC != that1.FieldC { + if this.FieldC < that1.FieldC { + return -1 + } + return 1 + } + if this.FieldD != that1.FieldD { + if this.FieldD < that1.FieldD { + return -1 + } + return 1 + } + if this.FieldE != that1.FieldE { + if this.FieldE < that1.FieldE { + return -1 + } + return 1 + } + if this.FieldF != that1.FieldF { + if this.FieldF < that1.FieldF { + return -1 + } + return 1 + } + if this.FieldG != that1.FieldG { + if this.FieldG < that1.FieldG { + return -1 + } + return 1 + } + if this.FieldH != that1.FieldH { + if this.FieldH < that1.FieldH { + return -1 + } + return 1 + } + if this.FieldI != that1.FieldI { + if this.FieldI < that1.FieldI { + return -1 + } + return 1 + } + if this.FieldJ != that1.FieldJ { + if this.FieldJ < that1.FieldJ { + return -1 + } + return 1 + } + if this.FieldK != that1.FieldK { + if this.FieldK < that1.FieldK { + return -1 + } + return 1 + } + if this.FieldL != that1.FieldL { + if this.FieldL < that1.FieldL { + return -1 + } + return 1 + } + if this.FieldM != that1.FieldM { + if !this.FieldM { + return -1 + } + return 1 + } + if this.FieldN != that1.FieldN { + if this.FieldN < that1.FieldN { + return -1 + } + return 1 + } + if c := bytes.Compare(this.FieldO, that1.FieldO); c != 0 { + return c + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *CustomNameNinOptNative) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*CustomNameNinOptNative) + if !ok { + that2, ok := that.(CustomNameNinOptNative) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.FieldA != nil && that1.FieldA != nil { + if *this.FieldA != *that1.FieldA { + if *this.FieldA < *that1.FieldA { + return -1 + } + return 1 + } + } else if this.FieldA != nil { + return 1 + } else if that1.FieldA != nil { + return -1 + } + if this.FieldB != nil && that1.FieldB != nil { + if *this.FieldB != *that1.FieldB { + if *this.FieldB < *that1.FieldB { + return -1 + } + return 1 + } + } else if this.FieldB != nil { + return 1 + } else if that1.FieldB != nil { + return -1 + } + if this.FieldC != nil && that1.FieldC != nil { + if *this.FieldC != *that1.FieldC { + if *this.FieldC < *that1.FieldC { + return -1 + } + return 1 + } + } else if this.FieldC != nil { + return 1 + } else if that1.FieldC != nil { + return -1 + } + if this.FieldD != nil && that1.FieldD != nil { + if *this.FieldD != *that1.FieldD { + if *this.FieldD < *that1.FieldD { + return -1 + } + return 1 + } + } else if this.FieldD != nil { + return 1 + } else if that1.FieldD != nil { + return -1 + } + if this.FieldE != nil && that1.FieldE != nil { + if *this.FieldE != *that1.FieldE { + if *this.FieldE < *that1.FieldE { + return -1 + } + return 1 + } + } else if this.FieldE != nil { + return 1 + } else if that1.FieldE != nil { + return -1 + } + if this.FieldF != nil && that1.FieldF != nil { + if *this.FieldF != *that1.FieldF { + if *this.FieldF < *that1.FieldF { + return -1 + } + return 1 + } + } else if this.FieldF != nil { + return 1 + } else if that1.FieldF != nil { + return -1 + } + if this.FieldG != nil && that1.FieldG != nil { + if *this.FieldG != *that1.FieldG { + if *this.FieldG < *that1.FieldG { + return -1 + } + return 1 + } + } else if this.FieldG != nil { + return 1 + } else if that1.FieldG != nil { + return -1 + } + if this.FieldH != nil && that1.FieldH != nil { + if *this.FieldH != *that1.FieldH { + if *this.FieldH < *that1.FieldH { + return -1 + } + return 1 + } + } else if this.FieldH != nil { + return 1 + } else if that1.FieldH != nil { + return -1 + } + if this.FieldI != nil && that1.FieldI != nil { + if *this.FieldI != *that1.FieldI { + if *this.FieldI < *that1.FieldI { + return -1 + } + return 1 + } + } else if this.FieldI != nil { + return 1 + } else if that1.FieldI != nil { + return -1 + } + if this.FieldJ != nil && that1.FieldJ != nil { + if *this.FieldJ != *that1.FieldJ { + if *this.FieldJ < *that1.FieldJ { + return -1 + } + return 1 + } + } else if this.FieldJ != nil { + return 1 + } else if that1.FieldJ != nil { + return -1 + } + if this.FieldK != nil && that1.FieldK != nil { + if *this.FieldK != *that1.FieldK { + if *this.FieldK < *that1.FieldK { + return -1 + } + return 1 + } + } else if this.FieldK != nil { + return 1 + } else if that1.FieldK != nil { + return -1 + } + if this.FielL != nil && that1.FielL != nil { + if *this.FielL != *that1.FielL { + if *this.FielL < *that1.FielL { + return -1 + } + return 1 + } + } else if this.FielL != nil { + return 1 + } else if that1.FielL != nil { + return -1 + } + if this.FieldM != nil && that1.FieldM != nil { + if *this.FieldM != *that1.FieldM { + if !*this.FieldM { + return -1 + } + return 1 + } + } else if this.FieldM != nil { + return 1 + } else if that1.FieldM != nil { + return -1 + } + if this.FieldN != nil && that1.FieldN != nil { + if *this.FieldN != *that1.FieldN { + if *this.FieldN < *that1.FieldN { + return -1 + } + return 1 + } + } else if this.FieldN != nil { + return 1 + } else if that1.FieldN != nil { + return -1 + } + if c := bytes.Compare(this.FieldO, that1.FieldO); c != 0 { + return c + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *CustomNameNinRepNative) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*CustomNameNinRepNative) + if !ok { + that2, ok := that.(CustomNameNinRepNative) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if len(this.FieldA) != len(that1.FieldA) { + if len(this.FieldA) < len(that1.FieldA) { + return -1 + } + return 1 + } + for i := range this.FieldA { + if this.FieldA[i] != that1.FieldA[i] { + if this.FieldA[i] < that1.FieldA[i] { + return -1 + } + return 1 + } + } + if len(this.FieldB) != len(that1.FieldB) { + if len(this.FieldB) < len(that1.FieldB) { + return -1 + } + return 1 + } + for i := range this.FieldB { + if this.FieldB[i] != that1.FieldB[i] { + if this.FieldB[i] < that1.FieldB[i] { + return -1 + } + return 1 + } + } + if len(this.FieldC) != len(that1.FieldC) { + if len(this.FieldC) < len(that1.FieldC) { + return -1 + } + return 1 + } + for i := range this.FieldC { + if this.FieldC[i] != that1.FieldC[i] { + if this.FieldC[i] < that1.FieldC[i] { + return -1 + } + return 1 + } + } + if len(this.FieldD) != len(that1.FieldD) { + if len(this.FieldD) < len(that1.FieldD) { + return -1 + } + return 1 + } + for i := range this.FieldD { + if this.FieldD[i] != that1.FieldD[i] { + if this.FieldD[i] < that1.FieldD[i] { + return -1 + } + return 1 + } + } + if len(this.FieldE) != len(that1.FieldE) { + if len(this.FieldE) < len(that1.FieldE) { + return -1 + } + return 1 + } + for i := range this.FieldE { + if this.FieldE[i] != that1.FieldE[i] { + if this.FieldE[i] < that1.FieldE[i] { + return -1 + } + return 1 + } + } + if len(this.FieldF) != len(that1.FieldF) { + if len(this.FieldF) < len(that1.FieldF) { + return -1 + } + return 1 + } + for i := range this.FieldF { + if this.FieldF[i] != that1.FieldF[i] { + if this.FieldF[i] < that1.FieldF[i] { + return -1 + } + return 1 + } + } + if len(this.FieldG) != len(that1.FieldG) { + if len(this.FieldG) < len(that1.FieldG) { + return -1 + } + return 1 + } + for i := range this.FieldG { + if this.FieldG[i] != that1.FieldG[i] { + if this.FieldG[i] < that1.FieldG[i] { + return -1 + } + return 1 + } + } + if len(this.FieldH) != len(that1.FieldH) { + if len(this.FieldH) < len(that1.FieldH) { + return -1 + } + return 1 + } + for i := range this.FieldH { + if this.FieldH[i] != that1.FieldH[i] { + if this.FieldH[i] < that1.FieldH[i] { + return -1 + } + return 1 + } + } + if len(this.FieldI) != len(that1.FieldI) { + if len(this.FieldI) < len(that1.FieldI) { + return -1 + } + return 1 + } + for i := range this.FieldI { + if this.FieldI[i] != that1.FieldI[i] { + if this.FieldI[i] < that1.FieldI[i] { + return -1 + } + return 1 + } + } + if len(this.FieldJ) != len(that1.FieldJ) { + if len(this.FieldJ) < len(that1.FieldJ) { + return -1 + } + return 1 + } + for i := range this.FieldJ { + if this.FieldJ[i] != that1.FieldJ[i] { + if this.FieldJ[i] < that1.FieldJ[i] { + return -1 + } + return 1 + } + } + if len(this.FieldK) != len(that1.FieldK) { + if len(this.FieldK) < len(that1.FieldK) { + return -1 + } + return 1 + } + for i := range this.FieldK { + if this.FieldK[i] != that1.FieldK[i] { + if this.FieldK[i] < that1.FieldK[i] { + return -1 + } + return 1 + } + } + if len(this.FieldL) != len(that1.FieldL) { + if len(this.FieldL) < len(that1.FieldL) { + return -1 + } + return 1 + } + for i := range this.FieldL { + if this.FieldL[i] != that1.FieldL[i] { + if this.FieldL[i] < that1.FieldL[i] { + return -1 + } + return 1 + } + } + if len(this.FieldM) != len(that1.FieldM) { + if len(this.FieldM) < len(that1.FieldM) { + return -1 + } + return 1 + } + for i := range this.FieldM { + if this.FieldM[i] != that1.FieldM[i] { + if !this.FieldM[i] { + return -1 + } + return 1 + } + } + if len(this.FieldN) != len(that1.FieldN) { + if len(this.FieldN) < len(that1.FieldN) { + return -1 + } + return 1 + } + for i := range this.FieldN { + if this.FieldN[i] != that1.FieldN[i] { + if this.FieldN[i] < that1.FieldN[i] { + return -1 + } + return 1 + } + } + if len(this.FieldO) != len(that1.FieldO) { + if len(this.FieldO) < len(that1.FieldO) { + return -1 + } + return 1 + } + for i := range this.FieldO { + if c := bytes.Compare(this.FieldO[i], that1.FieldO[i]); c != 0 { + return c + } + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *CustomNameNinStruct) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*CustomNameNinStruct) + if !ok { + that2, ok := that.(CustomNameNinStruct) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.FieldA != nil && that1.FieldA != nil { + if *this.FieldA != *that1.FieldA { + if *this.FieldA < *that1.FieldA { + return -1 + } + return 1 + } + } else if this.FieldA != nil { + return 1 + } else if that1.FieldA != nil { + return -1 + } + if this.FieldB != nil && that1.FieldB != nil { + if *this.FieldB != *that1.FieldB { + if *this.FieldB < *that1.FieldB { + return -1 + } + return 1 + } + } else if this.FieldB != nil { + return 1 + } else if that1.FieldB != nil { + return -1 + } + if c := this.FieldC.Compare(that1.FieldC); c != 0 { + return c + } + if len(this.FieldD) != len(that1.FieldD) { + if len(this.FieldD) < len(that1.FieldD) { + return -1 + } + return 1 + } + for i := range this.FieldD { + if c := this.FieldD[i].Compare(that1.FieldD[i]); c != 0 { + return c + } + } + if this.FieldE != nil && that1.FieldE != nil { + if *this.FieldE != *that1.FieldE { + if *this.FieldE < *that1.FieldE { + return -1 + } + return 1 + } + } else if this.FieldE != nil { + return 1 + } else if that1.FieldE != nil { + return -1 + } + if this.FieldF != nil && that1.FieldF != nil { + if *this.FieldF != *that1.FieldF { + if *this.FieldF < *that1.FieldF { + return -1 + } + return 1 + } + } else if this.FieldF != nil { + return 1 + } else if that1.FieldF != nil { + return -1 + } + if c := this.FieldG.Compare(that1.FieldG); c != 0 { + return c + } + if this.FieldH != nil && that1.FieldH != nil { + if *this.FieldH != *that1.FieldH { + if !*this.FieldH { + return -1 + } + return 1 + } + } else if this.FieldH != nil { + return 1 + } else if that1.FieldH != nil { + return -1 + } + if this.FieldI != nil && that1.FieldI != nil { + if *this.FieldI != *that1.FieldI { + if *this.FieldI < *that1.FieldI { + return -1 + } + return 1 + } + } else if this.FieldI != nil { + return 1 + } else if that1.FieldI != nil { + return -1 + } + if c := bytes.Compare(this.FieldJ, that1.FieldJ); c != 0 { + return c + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *CustomNameCustomType) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*CustomNameCustomType) + if !ok { + that2, ok := that.(CustomNameCustomType) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if that1.FieldA == nil { + if this.FieldA != nil { + return 1 + } + } else if this.FieldA == nil { + return -1 + } else if c := this.FieldA.Compare(*that1.FieldA); c != 0 { + return c + } + if that1.FieldB == nil { + if this.FieldB != nil { + return 1 + } + } else if this.FieldB == nil { + return -1 + } else if c := this.FieldB.Compare(*that1.FieldB); c != 0 { + return c + } + if len(this.FieldC) != len(that1.FieldC) { + if len(this.FieldC) < len(that1.FieldC) { + return -1 + } + return 1 + } + for i := range this.FieldC { + if c := this.FieldC[i].Compare(that1.FieldC[i]); c != 0 { + return c + } + } + if len(this.FieldD) != len(that1.FieldD) { + if len(this.FieldD) < len(that1.FieldD) { + return -1 + } + return 1 + } + for i := range this.FieldD { + if c := this.FieldD[i].Compare(that1.FieldD[i]); c != 0 { + return c + } + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *CustomNameNinEmbeddedStructUnion) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*CustomNameNinEmbeddedStructUnion) + if !ok { + that2, ok := that.(CustomNameNinEmbeddedStructUnion) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if c := this.NidOptNative.Compare(that1.NidOptNative); c != 0 { + return c + } + if c := this.FieldA.Compare(that1.FieldA); c != 0 { + return c + } + if this.FieldB != nil && that1.FieldB != nil { + if *this.FieldB != *that1.FieldB { + if !*this.FieldB { + return -1 + } + return 1 + } + } else if this.FieldB != nil { + return 1 + } else if that1.FieldB != nil { + return -1 + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *CustomNameEnum) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*CustomNameEnum) + if !ok { + that2, ok := that.(CustomNameEnum) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.FieldA != nil && that1.FieldA != nil { + if *this.FieldA != *that1.FieldA { + if *this.FieldA < *that1.FieldA { + return -1 + } + return 1 + } + } else if this.FieldA != nil { + return 1 + } else if that1.FieldA != nil { + return -1 + } + if len(this.FieldB) != len(that1.FieldB) { + if len(this.FieldB) < len(that1.FieldB) { + return -1 + } + return 1 + } + for i := range this.FieldB { + if this.FieldB[i] != that1.FieldB[i] { + if this.FieldB[i] < that1.FieldB[i] { + return -1 + } + return 1 + } + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NoExtensionsMap) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NoExtensionsMap) + if !ok { + that2, ok := that.(NoExtensionsMap) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + if *this.Field1 < *that1.Field1 { + return -1 + } + return 1 + } + } else if this.Field1 != nil { + return 1 + } else if that1.Field1 != nil { + return -1 + } + if c := bytes.Compare(this.XXX_extensions, that1.XXX_extensions); c != 0 { + return c + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *Unrecognized) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*Unrecognized) + if !ok { + that2, ok := that.(Unrecognized) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + if *this.Field1 < *that1.Field1 { + return -1 + } + return 1 + } + } else if this.Field1 != nil { + return 1 + } else if that1.Field1 != nil { + return -1 + } + return 0 +} +func (this *UnrecognizedWithInner) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*UnrecognizedWithInner) + if !ok { + that2, ok := that.(UnrecognizedWithInner) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if len(this.Embedded) != len(that1.Embedded) { + if len(this.Embedded) < len(that1.Embedded) { + return -1 + } + return 1 + } + for i := range this.Embedded { + if c := this.Embedded[i].Compare(that1.Embedded[i]); c != 0 { + return c + } + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + if *this.Field2 < *that1.Field2 { + return -1 + } + return 1 + } + } else if this.Field2 != nil { + return 1 + } else if that1.Field2 != nil { + return -1 + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *UnrecognizedWithInner_Inner) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*UnrecognizedWithInner_Inner) + if !ok { + that2, ok := that.(UnrecognizedWithInner_Inner) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + if *this.Field1 < *that1.Field1 { + return -1 + } + return 1 + } + } else if this.Field1 != nil { + return 1 + } else if that1.Field1 != nil { + return -1 + } + return 0 +} +func (this *UnrecognizedWithEmbed) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*UnrecognizedWithEmbed) + if !ok { + that2, ok := that.(UnrecognizedWithEmbed) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if c := this.UnrecognizedWithEmbed_Embedded.Compare(&that1.UnrecognizedWithEmbed_Embedded); c != 0 { + return c + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + if *this.Field2 < *that1.Field2 { + return -1 + } + return 1 + } + } else if this.Field2 != nil { + return 1 + } else if that1.Field2 != nil { + return -1 + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *UnrecognizedWithEmbed_Embedded) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*UnrecognizedWithEmbed_Embedded) + if !ok { + that2, ok := that.(UnrecognizedWithEmbed_Embedded) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + if *this.Field1 < *that1.Field1 { + return -1 + } + return 1 + } + } else if this.Field1 != nil { + return 1 + } else if that1.Field1 != nil { + return -1 + } + return 0 +} +func (this *Node) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*Node) + if !ok { + that2, ok := that.(Node) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.Label != nil && that1.Label != nil { + if *this.Label != *that1.Label { + if *this.Label < *that1.Label { + return -1 + } + return 1 + } + } else if this.Label != nil { + return 1 + } else if that1.Label != nil { + return -1 + } + if len(this.Children) != len(that1.Children) { + if len(this.Children) < len(that1.Children) { + return -1 + } + return 1 + } + for i := range this.Children { + if c := this.Children[i].Compare(that1.Children[i]); c != 0 { + return c + } + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NidOptNative) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NinOptNative) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NidRepNative) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NinRepNative) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NidRepPackedNative) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NinRepPackedNative) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NidOptStruct) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NinOptStruct) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NidRepStruct) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NinRepStruct) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NidEmbeddedStruct) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NinEmbeddedStruct) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NidNestedStruct) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NinNestedStruct) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NidOptCustom) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *CustomDash) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NinOptCustom) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NidRepCustom) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NinRepCustom) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NinOptNativeUnion) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NinOptStructUnion) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NinEmbeddedStructUnion) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NinNestedStructUnion) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *Tree) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *OrBranch) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *AndBranch) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *Leaf) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *DeepTree) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *ADeepBranch) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *AndDeepBranch) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *DeepLeaf) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *Nil) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NidOptEnum) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NinOptEnum) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NidRepEnum) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NinRepEnum) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NinOptEnumDefault) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *AnotherNinOptEnum) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *AnotherNinOptEnumDefault) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *Timer) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *MyExtendable) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *OtherExtenable) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NestedDefinition) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NestedDefinition_NestedMessage) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NestedDefinition_NestedMessage_NestedNestedMsg) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NestedScope) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NinOptNativeDefault) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *CustomContainer) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *CustomNameNidOptNative) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *CustomNameNinOptNative) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *CustomNameNinRepNative) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *CustomNameNinStruct) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *CustomNameCustomType) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *CustomNameNinEmbeddedStructUnion) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *CustomNameEnum) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NoExtensionsMap) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *Unrecognized) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *UnrecognizedWithInner) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *UnrecognizedWithInner_Inner) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *UnrecognizedWithEmbed) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *UnrecognizedWithEmbed_Embedded) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *Node) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func ThetestDescription() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + d := &github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet{} + var gzipped = []byte{ + // 6123 bytes of a gzipped FileDescriptorSet + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xcc, 0x7c, 0x6b, 0x6c, 0x23, 0xd7, + 0x75, 0xff, 0x0e, 0x87, 0x94, 0xa8, 0x43, 0x89, 0xa2, 0x66, 0xb5, 0x32, 0x2d, 0xaf, 0xf7, 0x41, + 0xcb, 0xb2, 0xac, 0xd8, 0x7a, 0xad, 0xf6, 0x45, 0x27, 0x0e, 0xf8, 0x5a, 0x59, 0xfb, 0xd7, 0xeb, + 0x3f, 0x92, 0x12, 0x3b, 0x2d, 0x40, 0x70, 0xc9, 0x91, 0x44, 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eb, 0xf6, 0x41, 0x33, 0x3d, 0x42, 0x04, 0x9c, 0xef, 0xbd, + 0x11, 0xc2, 0x58, 0x40, 0x7c, 0xeb, 0x88, 0xcd, 0x4c, 0x3a, 0xd2, 0x67, 0x63, 0x0a, 0x86, 0x9c, + 0xdb, 0x76, 0xa7, 0xf2, 0x7c, 0x7a, 0x94, 0x44, 0x08, 0xfb, 0x94, 0xf9, 0x41, 0x0c, 0xc6, 0xc3, + 0x84, 0xd8, 0x63, 0x10, 0x3b, 0xc0, 0x77, 0x89, 0x02, 0xec, 0x04, 0x36, 0xa0, 0x18, 0xd9, 0x88, + 0x43, 0xaf, 0xd1, 0x88, 0x39, 0x48, 0xd8, 0x96, 0xd3, 0xb1, 0x6a, 0x34, 0x22, 0xf4, 0x90, 0x31, + 0x05, 0x14, 0xd4, 0x1b, 0x52, 0xd1, 0xd7, 0x14, 0x52, 0x4f, 0xc2, 0xb8, 0x50, 0xa9, 0xdc, 0xae, + 0xd8, 0x87, 0x3c, 0x36, 0x17, 0x83, 0x34, 0x59, 0x28, 0x71, 0x9c, 0x89, 0x61, 0x66, 0xd2, 0x92, + 0x3e, 0x1b, 0x45, 0x80, 0xa6, 0x6d, 0x35, 0x0f, 0x50, 0x7a, 0x55, 0x1b, 0x28, 0x4e, 0xfc, 0xad, + 0xb4, 0x8d, 0x59, 0x7a, 0xac, 0xd4, 0xa4, 0xa3, 0xd5, 0x86, 0x71, 0xdd, 0x0d, 0xb5, 0xe1, 0x3e, + 0x91, 0xb2, 0x49, 0x93, 0xac, 0x27, 0xda, 0xf6, 0x21, 0xd9, 0xb6, 0x70, 0xdc, 0x23, 0x13, 0xd3, + 0x3b, 0x1b, 0x21, 0x4a, 0x2c, 0x04, 0xde, 0x99, 0xc9, 0x60, 0xf4, 0xc6, 0xc6, 0xda, 0xde, 0x8f, + 0xc6, 0x03, 0x20, 0x06, 0xca, 0x24, 0xac, 0x80, 0x54, 0xa1, 0x51, 0x3e, 0xb8, 0x85, 0xc6, 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b, 0xa8, 0x34, 0x1c, 0xcb, 0x1c, 0xa7, 0xe4, 0x5d, 0x4e, 0xc5, + 0x08, 0x32, 0x59, 0xb4, 0x3d, 0x88, 0x21, 0x09, 0x41, 0xc9, 0x02, 0x91, 0xf9, 0xfa, 0x30, 0x24, + 0x3c, 0xdd, 0x99, 0x71, 0x11, 0x46, 0x9f, 0xae, 0x3c, 0x5b, 0x29, 0xf3, 0x8e, 0x9b, 0x5a, 0x22, + 0x81, 0xc7, 0x76, 0x58, 0xd7, 0xbd, 0x04, 0x93, 0x84, 0x05, 0xdd, 0x23, 0xba, 0x50, 0xb5, 0x51, + 0x71, 0x1c, 0x62, 0xb4, 0x38, 0x61, 0x35, 0x30, 0x6d, 0x1b, 0x93, 0x0a, 0x9c, 0x62, 0x5c, 0x86, + 0xd3, 0x04, 0x71, 0x8c, 0x0a, 0x6f, 0xbd, 0xd5, 0xb0, 0xca, 0xf8, 0x19, 0xc0, 0x21, 0xf5, 0x54, + 0x68, 0x36, 0x81, 0x39, 0x36, 0x19, 0x03, 0xd6, 0xc8, 0x31, 0xd6, 0xe0, 0x7e, 0x02, 0x3b, 0xb4, + 0x6c, 0xab, 0x5d, 0xe9, 0x58, 0x65, 0xeb, 0x17, 0xba, 0x88, 0xb7, 0x5c, 0xb1, 0x6b, 0xe5, 0xa3, + 0x8a, 0x73, 0x94, 0x9e, 0xf4, 0x0a, 0xb8, 0x17, 0xf3, 0xae, 0x31, 0xd6, 0x12, 0xe1, 0xcc, 0xd9, + 0xb5, 0x27, 0x10, 0x9f, 0x91, 0x85, 0x29, 0x22, 0x08, 0x19, 0x05, 0xdd, 0x73, 0xb9, 0x7a, 0x64, + 0x55, 0x9f, 0x29, 0x77, 0x3b, 0x07, 0xd7, 0xd2, 0xf7, 0x79, 0x25, 0x10, 0x25, 0x77, 0x09, 0x4f, + 0x01, 0xb3, 0xec, 0x23, 0x0e, 0x63, 0x17, 0x46, 0xb1, 0x3f, 0x8e, 0xeb, 0xef, 0x44, 0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c, 0x1e, 0xb6, 0xb1, 0x70, 0x2e, 0x88, 0xb6, 0xa1, 0x49, 0x31, + 0x4c, 0x18, 0xa7, 0x6f, 0x42, 0x9c, 0xdb, 0x01, 0x4f, 0x2c, 0xd8, 0x12, 0x68, 0xce, 0x27, 0xeb, + 0x28, 0x11, 0xfc, 0x50, 0x6f, 0x73, 0x22, 0xba, 0x68, 0xdd, 0x29, 0xbb, 0x0b, 0x7a, 0x11, 0x44, + 0x8f, 0x9b, 0x89, 0xba, 0x23, 0x56, 0x70, 0x32, 0x9f, 0x41, 0xd3, 0xab, 0xbc, 0x20, 0x69, 0x14, + 0x21, 0xde, 0x68, 0xa2, 0xf8, 0xc0, 0x08, 0xba, 0x1a, 0x3e, 0x17, 0xb0, 0x86, 0xb9, 0xb0, 0xc1, + 0xf8, 0x4d, 0x81, 0x9c, 0xfe, 0x47, 0x0d, 0xe2, 0x7c, 0x18, 0x4d, 0x14, 0xd1, 0x56, 0xa5, 0x73, + 0x44, 0xc4, 0xc5, 0xf2, 0x91, 0x94, 0x66, 0x92, 0xcf, 0x78, 0x1c, 0x75, 0x33, 0x36, 0x09, 0x01, + 0x36, 0x8e, 0x3f, 0x63, 0xbf, 0x36, 0xac, 0x4a, 0x8d, 0x34, 0xb8, 0xcd, 0xe3, 0x63, 0xe4, 0x49, + 0x87, 0xfb, 0x95, 0x8d, 0x17, 0xd8, 0x30, 0x5e, 0x17, 0xef, 0xb4, 0x2b, 0xf5, 0x86, 0xc4, 0x1b, + 0x25, 0xbc, 0x29, 0x4e, 0x10, 0xcc, 0x59, 0xb8, 0x97, 0xcb, 0xad, 0x59, 0x9d, 0x0a, 0x6a, 0x9e, + 0x6b, 0x2e, 0x68, 0x88, 0xac, 0x76, 0xdd, 0xc3, 0x18, 0x8a, 0x8c, 0xce, 0xb1, 0xf9, 0x27, 0x51, + 0x23, 0xdb, 0x3c, 0x56, 0x2d, 0x91, 0x4f, 0x29, 0xcf, 0x5d, 0xce, 0x13, 0xda, 0x3b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, 0xc7, 0x98, 0x85, 0x98, 0x59, 0x3f, 0x3c, 0xea, 0xb0, 0x8b, 0xf7, 0xb2, + 0xc5, 0xda, 0x98, 0x9c, 0x79, 0x0a, 0x46, 0x84, 0x46, 0xaf, 0xb3, 0xe8, 0x22, 0xbd, 0x35, 0xf4, + 0x24, 0xec, 0x99, 0x4f, 0xf8, 0xba, 0x25, 0xfb, 0x2e, 0xe7, 0x05, 0x88, 0x23, 0x33, 0xbb, 0x45, + 0x9f, 0x77, 0xa4, 0x78, 0xe3, 0x9d, 0x8c, 0x66, 0xde, 0xad, 0x41, 0xbc, 0x68, 0x59, 0x2d, 0x62, + 0xf0, 0x07, 0x21, 0x5a, 0x6c, 0x3e, 0x67, 0x33, 0x05, 0x27, 0x98, 0x45, 0x31, 0x99, 0xd9, 0x34, + 0x5a, 0x43, 0x64, 0xc4, 0xe6, 0xb1, 0xfb, 0x69, 0x61, 0x77, 0x0f, 0x1f, 0xb1, 0x7d, 0x46, 0xb2, + 0x3d, 0x73, 0x20, 0x66, 0xea, 0xb1, 0xff, 0x55, 0x48, 0x78, 0xae, 0x62, 0xcc, 0x31, 0x35, 0x22, + 0x2a, 0xd0, 0x6b, 0x2b, 0xac, 0x49, 0xc6, 0x82, 0x31, 0xe9, 0xc2, 0x18, 0xea, 0x31, 0x71, 0x1f, + 0x28, 0x31, 0xf3, 0xbc, 0x6c, 0x66, 0x7f, 0x56, 0x66, 0xea, 0x25, 0x6a, 0x23, 0x62, 0xee, 0x19, + 0x1a, 0x9c, 0xfd, 0x9d, 0xd8, 0x41, 0xef, 0x33, 0x31, 0xd0, 0xb7, 0xea, 0x8d, 0xcc, 0x5b, 0x00, + 0x68, 0xca, 0xe3, 0x33, 0x54, 0x4a, 0xd6, 0x25, 0xb9, 0x81, 0xf7, 0x8e, 0xac, 0x3d, 0xf4, 0x17, + 0xb3, 0xc8, 0xfd, 0x14, 0x2e, 0x30, 0x40, 0x53, 0x8c, 0xe0, 0x1f, 0x0e, 0xc4, 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0xca, 0x28, 0xe1, 0x07, 0x3e, 0xa1, 0x97, 0x51, + 0x42, 0x0f, 0x7c, 0xc2, 0x2e, 0xa3, 0x84, 0x1d, 0xf8, 0x84, 0x5c, 0x46, 0x09, 0x39, 0xf0, 0x09, + 0xb7, 0x8c, 0x12, 0x6e, 0xe0, 0x13, 0x6a, 0x19, 0x25, 0xd4, 0xc0, 0x27, 0xcc, 0x32, 0x4a, 0x98, + 0x81, 0x4f, 0x88, 0x65, 0x94, 0x10, 0x03, 0x9f, 0xf0, 0xca, 0x28, 0xe1, 0x05, 0x3e, 0xa1, 0x35, + 0xa3, 0x86, 0x16, 0xf8, 0x85, 0xd5, 0x8c, 0x1a, 0x56, 0xe0, 0x17, 0x52, 0x0f, 0xa8, 0x21, 0x35, + 0x82, 0xb8, 0x62, 0x78, 0xc8, 0x13, 0x4d, 0x33, 0x6a, 0x34, 0x81, 0x5f, 0x24, 0xcd, 0xa8, 0x91, + 0x04, 0x7e, 0x51, 0x34, 0xa3, 0x46, 0x11, 0xf8, 0x45, 0xd0, 0x4b, 0x6a, 0x04, 0xb9, 0x47, 0x7c, + 0x32, 0xca, 0x8e, 0x62, 0x50, 0x04, 0xe9, 0x21, 0x22, 0x48, 0x0f, 0x11, 0x41, 0x7a, 0x88, 0x08, + 0xd2, 0x43, 0x44, 0x90, 0x1e, 0x22, 0x82, 0xf4, 0x10, 0x11, 0xa4, 0x87, 0x88, 0x20, 0x3d, 0x4c, + 0x04, 0xe9, 0xa1, 0x22, 0x48, 0xef, 0x17, 0x41, 0x33, 0xea, 0x81, 0x07, 0xf0, 0x2b, 0x48, 0x33, + 0xea, 0xce, 0x67, 0x70, 0x08, 0xe9, 0xa1, 0x42, 0x48, 0xef, 0x17, 0x42, 0x5f, 0x45, 0x8d, 0x94, + 0x14, 0x42, 0x6c, 0x7b, 0xe8, 0xf5, 0xaa, 0x40, 0x57, 0x42, 0x9c, 0xaf, 0xf0, 0x8b, 0xa9, 0x2b, + 0x21, 0xf6, 0x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, 0xc4, 0x8b, 0xfe, 0x7e, 0x07, 0xfd, 0xfd, 0x1e, 0xfa, 0xfb, 0x43, 0xf4, + 0xf7, 0x5d, 0xdf, 0x3a, 0x77, 0xea, 0x05, 0xf4, 0x7a, 0xf1, 0x5b, 0xe7, 0xb4, 0xff, 0x0b, 0x00, + 0x00, 0xff, 0xff, 0x20, 0x2c, 0x09, 0x2b, 0x1a, 0x5f, 0x00, 0x00, + } + r := bytes.NewReader(gzipped) + gzipr, err := compress_gzip.NewReader(r) + if err != nil { + panic(err) + } + ungzipped, err := io_ioutil.ReadAll(gzipr) + if err != nil { + panic(err) + } + if err := github_com_gogo_protobuf_proto.Unmarshal(ungzipped, d); err != nil { + panic(err) + } + return d +} +func (x TheTestEnum) String() string { + s, ok := TheTestEnum_name[int32(x)] + if ok { + return s + } + return strconv.Itoa(int(x)) +} +func (x AnotherTestEnum) String() string { + s, ok := AnotherTestEnum_name[int32(x)] + if ok { + return s + } + return strconv.Itoa(int(x)) +} +func (x YetAnotherTestEnum) String() string { + s, ok := YetAnotherTestEnum_name[int32(x)] + if ok { + return s + } + return strconv.Itoa(int(x)) +} +func (x YetYetAnotherTestEnum) String() string { + s, ok := YetYetAnotherTestEnum_name[int32(x)] + if ok { + return s + } + return strconv.Itoa(int(x)) +} +func (x NestedDefinition_NestedEnum) String() string { + s, ok := NestedDefinition_NestedEnum_name[int32(x)] + if ok { + return s + } + return strconv.Itoa(int(x)) +} +func (this *NidOptNative) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NidOptNative) + if !ok { + that2, ok := that.(NidOptNative) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NidOptNative") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NidOptNative but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NidOptNative but is not nil && this == nil") + } + if this.Field1 != that1.Field1 { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) + } + if this.Field2 != that1.Field2 { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) + } + if this.Field3 != that1.Field3 { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", this.Field3, that1.Field3) + } + if this.Field4 != that1.Field4 { + return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", this.Field4, that1.Field4) + } + if this.Field5 != that1.Field5 { + return fmt.Errorf("Field5 this(%v) Not Equal that(%v)", this.Field5, that1.Field5) + } + if this.Field6 != that1.Field6 { + return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", this.Field6, that1.Field6) + } + if this.Field7 != that1.Field7 { + return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", this.Field7, that1.Field7) + } + if this.Field8 != that1.Field8 { + return fmt.Errorf("Field8 this(%v) Not Equal that(%v)", this.Field8, that1.Field8) + } + if this.Field9 != that1.Field9 { + return fmt.Errorf("Field9 this(%v) Not Equal that(%v)", this.Field9, that1.Field9) + } + if this.Field10 != that1.Field10 { + return fmt.Errorf("Field10 this(%v) Not Equal that(%v)", this.Field10, that1.Field10) + } + if this.Field11 != that1.Field11 { + return fmt.Errorf("Field11 this(%v) Not Equal that(%v)", this.Field11, that1.Field11) + } + if this.Field12 != that1.Field12 { + return fmt.Errorf("Field12 this(%v) Not Equal that(%v)", this.Field12, that1.Field12) + } + if this.Field13 != that1.Field13 { + return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", this.Field13, that1.Field13) + } + if this.Field14 != that1.Field14 { + return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", this.Field14, that1.Field14) + } + if !bytes.Equal(this.Field15, that1.Field15) { + return fmt.Errorf("Field15 this(%v) Not Equal that(%v)", this.Field15, that1.Field15) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NidOptNative) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*NidOptNative) + if !ok { + that2, ok := that.(NidOptNative) + 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.Field1 != that1.Field1 { + return false + } + if this.Field2 != that1.Field2 { + return false + } + if this.Field3 != that1.Field3 { + return false + } + if this.Field4 != that1.Field4 { + return false + } + if this.Field5 != that1.Field5 { + return false + } + if this.Field6 != that1.Field6 { + return false + } + if this.Field7 != that1.Field7 { + return false + } + if this.Field8 != that1.Field8 { + return false + } + if this.Field9 != that1.Field9 { + return false + } + if this.Field10 != that1.Field10 { + return false + } + if this.Field11 != that1.Field11 { + return false + } + if this.Field12 != that1.Field12 { + return false + } + if this.Field13 != that1.Field13 { + return false + } + if this.Field14 != that1.Field14 { + return false + } + if !bytes.Equal(this.Field15, that1.Field15) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NinOptNative) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NinOptNative) + if !ok { + that2, ok := that.(NinOptNative) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NinOptNative") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NinOptNative but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NinOptNative but is not nil && this == nil") + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) + } + } else if this.Field1 != nil { + return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") + } else if that1.Field1 != nil { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", *this.Field2, *that1.Field2) + } + } else if this.Field2 != nil { + return fmt.Errorf("this.Field2 == nil && that.Field2 != nil") + } else if that1.Field2 != nil { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) + } + if this.Field3 != nil && that1.Field3 != nil { + if *this.Field3 != *that1.Field3 { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", *this.Field3, *that1.Field3) + } + } else if this.Field3 != nil { + return fmt.Errorf("this.Field3 == nil && that.Field3 != nil") + } else if that1.Field3 != nil { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", this.Field3, that1.Field3) + } + if this.Field4 != nil && that1.Field4 != nil { + if *this.Field4 != *that1.Field4 { + return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", *this.Field4, *that1.Field4) + } + } else if this.Field4 != nil { + return fmt.Errorf("this.Field4 == nil && that.Field4 != nil") + } else if that1.Field4 != nil { + return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", this.Field4, that1.Field4) + } + if this.Field5 != nil && that1.Field5 != nil { + if *this.Field5 != *that1.Field5 { + return fmt.Errorf("Field5 this(%v) Not Equal that(%v)", *this.Field5, *that1.Field5) + } + } else if this.Field5 != nil { + return fmt.Errorf("this.Field5 == nil && that.Field5 != nil") + } else if that1.Field5 != nil { + return fmt.Errorf("Field5 this(%v) Not Equal that(%v)", this.Field5, that1.Field5) + } + if this.Field6 != nil && that1.Field6 != nil { + if *this.Field6 != *that1.Field6 { + return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", *this.Field6, *that1.Field6) + } + } else if this.Field6 != nil { + return fmt.Errorf("this.Field6 == nil && that.Field6 != nil") + } else if that1.Field6 != nil { + return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", this.Field6, that1.Field6) + } + if this.Field7 != nil && that1.Field7 != nil { + if *this.Field7 != *that1.Field7 { + return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", *this.Field7, *that1.Field7) + } + } else if this.Field7 != nil { + return fmt.Errorf("this.Field7 == nil && that.Field7 != nil") + } else if that1.Field7 != nil { + return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", this.Field7, that1.Field7) + } + if this.Field8 != nil && that1.Field8 != nil { + if *this.Field8 != *that1.Field8 { + return fmt.Errorf("Field8 this(%v) Not Equal that(%v)", *this.Field8, *that1.Field8) + } + } else if this.Field8 != nil { + return fmt.Errorf("this.Field8 == nil && that.Field8 != nil") + } else if that1.Field8 != nil { + return fmt.Errorf("Field8 this(%v) Not Equal that(%v)", this.Field8, that1.Field8) + } + if this.Field9 != nil && that1.Field9 != nil { + if *this.Field9 != *that1.Field9 { + return fmt.Errorf("Field9 this(%v) Not Equal that(%v)", *this.Field9, *that1.Field9) + } + } else if this.Field9 != nil { + return fmt.Errorf("this.Field9 == nil && that.Field9 != nil") + } else if that1.Field9 != nil { + return fmt.Errorf("Field9 this(%v) Not Equal that(%v)", this.Field9, that1.Field9) + } + if this.Field10 != nil && that1.Field10 != nil { + if *this.Field10 != *that1.Field10 { + return fmt.Errorf("Field10 this(%v) Not Equal that(%v)", *this.Field10, *that1.Field10) + } + } else if this.Field10 != nil { + return fmt.Errorf("this.Field10 == nil && that.Field10 != nil") + } else if that1.Field10 != nil { + return fmt.Errorf("Field10 this(%v) Not Equal that(%v)", this.Field10, that1.Field10) + } + if this.Field11 != nil && that1.Field11 != nil { + if *this.Field11 != *that1.Field11 { + return fmt.Errorf("Field11 this(%v) Not Equal that(%v)", *this.Field11, *that1.Field11) + } + } else if this.Field11 != nil { + return fmt.Errorf("this.Field11 == nil && that.Field11 != nil") + } else if that1.Field11 != nil { + return fmt.Errorf("Field11 this(%v) Not Equal that(%v)", this.Field11, that1.Field11) + } + if this.Field12 != nil && that1.Field12 != nil { + if *this.Field12 != *that1.Field12 { + return fmt.Errorf("Field12 this(%v) Not Equal that(%v)", *this.Field12, *that1.Field12) + } + } else if this.Field12 != nil { + return fmt.Errorf("this.Field12 == nil && that.Field12 != nil") + } else if that1.Field12 != nil { + return fmt.Errorf("Field12 this(%v) Not Equal that(%v)", this.Field12, that1.Field12) + } + if this.Field13 != nil && that1.Field13 != nil { + if *this.Field13 != *that1.Field13 { + return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", *this.Field13, *that1.Field13) + } + } else if this.Field13 != nil { + return fmt.Errorf("this.Field13 == nil && that.Field13 != nil") + } else if that1.Field13 != nil { + return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", this.Field13, that1.Field13) + } + if this.Field14 != nil && that1.Field14 != nil { + if *this.Field14 != *that1.Field14 { + return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", *this.Field14, *that1.Field14) + } + } else if this.Field14 != nil { + return fmt.Errorf("this.Field14 == nil && that.Field14 != nil") + } else if that1.Field14 != nil { + return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", this.Field14, that1.Field14) + } + if !bytes.Equal(this.Field15, that1.Field15) { + return fmt.Errorf("Field15 this(%v) Not Equal that(%v)", this.Field15, that1.Field15) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NinOptNative) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*NinOptNative) + if !ok { + that2, ok := that.(NinOptNative) + 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.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return false + } + } else if this.Field1 != nil { + return false + } else if that1.Field1 != nil { + return false + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + return false + } + } else if this.Field2 != nil { + return false + } else if that1.Field2 != nil { + return false + } + if this.Field3 != nil && that1.Field3 != nil { + if *this.Field3 != *that1.Field3 { + return false + } + } else if this.Field3 != nil { + return false + } else if that1.Field3 != nil { + return false + } + if this.Field4 != nil && that1.Field4 != nil { + if *this.Field4 != *that1.Field4 { + return false + } + } else if this.Field4 != nil { + return false + } else if that1.Field4 != nil { + return false + } + if this.Field5 != nil && that1.Field5 != nil { + if *this.Field5 != *that1.Field5 { + return false + } + } else if this.Field5 != nil { + return false + } else if that1.Field5 != nil { + return false + } + if this.Field6 != nil && that1.Field6 != nil { + if *this.Field6 != *that1.Field6 { + return false + } + } else if this.Field6 != nil { + return false + } else if that1.Field6 != nil { + return false + } + if this.Field7 != nil && that1.Field7 != nil { + if *this.Field7 != *that1.Field7 { + return false + } + } else if this.Field7 != nil { + return false + } else if that1.Field7 != nil { + return false + } + if this.Field8 != nil && that1.Field8 != nil { + if *this.Field8 != *that1.Field8 { + return false + } + } else if this.Field8 != nil { + return false + } else if that1.Field8 != nil { + return false + } + if this.Field9 != nil && that1.Field9 != nil { + if *this.Field9 != *that1.Field9 { + return false + } + } else if this.Field9 != nil { + return false + } else if that1.Field9 != nil { + return false + } + if this.Field10 != nil && that1.Field10 != nil { + if *this.Field10 != *that1.Field10 { + return false + } + } else if this.Field10 != nil { + return false + } else if that1.Field10 != nil { + return false + } + if this.Field11 != nil && that1.Field11 != nil { + if *this.Field11 != *that1.Field11 { + return false + } + } else if this.Field11 != nil { + return false + } else if that1.Field11 != nil { + return false + } + if this.Field12 != nil && that1.Field12 != nil { + if *this.Field12 != *that1.Field12 { + return false + } + } else if this.Field12 != nil { + return false + } else if that1.Field12 != nil { + return false + } + if this.Field13 != nil && that1.Field13 != nil { + if *this.Field13 != *that1.Field13 { + return false + } + } else if this.Field13 != nil { + return false + } else if that1.Field13 != nil { + return false + } + if this.Field14 != nil && that1.Field14 != nil { + if *this.Field14 != *that1.Field14 { + return false + } + } else if this.Field14 != nil { + return false + } else if that1.Field14 != nil { + return false + } + if !bytes.Equal(this.Field15, that1.Field15) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NidRepNative) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NidRepNative) + if !ok { + that2, ok := that.(NidRepNative) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NidRepNative") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NidRepNative but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NidRepNative but is not nil && this == nil") + } + if len(this.Field1) != len(that1.Field1) { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", len(this.Field1), len(that1.Field1)) + } + for i := range this.Field1 { + if this.Field1[i] != that1.Field1[i] { + return fmt.Errorf("Field1 this[%v](%v) Not Equal that[%v](%v)", i, this.Field1[i], i, that1.Field1[i]) + } + } + if len(this.Field2) != len(that1.Field2) { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", len(this.Field2), len(that1.Field2)) + } + for i := range this.Field2 { + if this.Field2[i] != that1.Field2[i] { + return fmt.Errorf("Field2 this[%v](%v) Not Equal that[%v](%v)", i, this.Field2[i], i, that1.Field2[i]) + } + } + if len(this.Field3) != len(that1.Field3) { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", len(this.Field3), len(that1.Field3)) + } + for i := range this.Field3 { + if this.Field3[i] != that1.Field3[i] { + return fmt.Errorf("Field3 this[%v](%v) Not Equal that[%v](%v)", i, this.Field3[i], i, that1.Field3[i]) + } + } + if len(this.Field4) != len(that1.Field4) { + return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", len(this.Field4), len(that1.Field4)) + } + for i := range this.Field4 { + if this.Field4[i] != that1.Field4[i] { + return fmt.Errorf("Field4 this[%v](%v) Not Equal that[%v](%v)", i, this.Field4[i], i, that1.Field4[i]) + } + } + if len(this.Field5) != len(that1.Field5) { + return fmt.Errorf("Field5 this(%v) Not Equal that(%v)", len(this.Field5), len(that1.Field5)) + } + for i := range this.Field5 { + if this.Field5[i] != that1.Field5[i] { + return fmt.Errorf("Field5 this[%v](%v) Not Equal that[%v](%v)", i, this.Field5[i], i, that1.Field5[i]) + } + } + if len(this.Field6) != len(that1.Field6) { + return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", len(this.Field6), len(that1.Field6)) + } + for i := range this.Field6 { + if this.Field6[i] != that1.Field6[i] { + return fmt.Errorf("Field6 this[%v](%v) Not Equal that[%v](%v)", i, this.Field6[i], i, that1.Field6[i]) + } + } + if len(this.Field7) != len(that1.Field7) { + return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", len(this.Field7), len(that1.Field7)) + } + for i := range this.Field7 { + if this.Field7[i] != that1.Field7[i] { + return fmt.Errorf("Field7 this[%v](%v) Not Equal that[%v](%v)", i, this.Field7[i], i, that1.Field7[i]) + } + } + if len(this.Field8) != len(that1.Field8) { + return fmt.Errorf("Field8 this(%v) Not Equal that(%v)", len(this.Field8), len(that1.Field8)) + } + for i := range this.Field8 { + if this.Field8[i] != that1.Field8[i] { + return fmt.Errorf("Field8 this[%v](%v) Not Equal that[%v](%v)", i, this.Field8[i], i, that1.Field8[i]) + } + } + if len(this.Field9) != len(that1.Field9) { + return fmt.Errorf("Field9 this(%v) Not Equal that(%v)", len(this.Field9), len(that1.Field9)) + } + for i := range this.Field9 { + if this.Field9[i] != that1.Field9[i] { + return fmt.Errorf("Field9 this[%v](%v) Not Equal that[%v](%v)", i, this.Field9[i], i, that1.Field9[i]) + } + } + if len(this.Field10) != len(that1.Field10) { + return fmt.Errorf("Field10 this(%v) Not Equal that(%v)", len(this.Field10), len(that1.Field10)) + } + for i := range this.Field10 { + if this.Field10[i] != that1.Field10[i] { + return fmt.Errorf("Field10 this[%v](%v) Not Equal that[%v](%v)", i, this.Field10[i], i, that1.Field10[i]) + } + } + if len(this.Field11) != len(that1.Field11) { + return fmt.Errorf("Field11 this(%v) Not Equal that(%v)", len(this.Field11), len(that1.Field11)) + } + for i := range this.Field11 { + if this.Field11[i] != that1.Field11[i] { + return fmt.Errorf("Field11 this[%v](%v) Not Equal that[%v](%v)", i, this.Field11[i], i, that1.Field11[i]) + } + } + if len(this.Field12) != len(that1.Field12) { + return fmt.Errorf("Field12 this(%v) Not Equal that(%v)", len(this.Field12), len(that1.Field12)) + } + for i := range this.Field12 { + if this.Field12[i] != that1.Field12[i] { + return fmt.Errorf("Field12 this[%v](%v) Not Equal that[%v](%v)", i, this.Field12[i], i, that1.Field12[i]) + } + } + if len(this.Field13) != len(that1.Field13) { + return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", len(this.Field13), len(that1.Field13)) + } + for i := range this.Field13 { + if this.Field13[i] != that1.Field13[i] { + return fmt.Errorf("Field13 this[%v](%v) Not Equal that[%v](%v)", i, this.Field13[i], i, that1.Field13[i]) + } + } + if len(this.Field14) != len(that1.Field14) { + return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", len(this.Field14), len(that1.Field14)) + } + for i := range this.Field14 { + if this.Field14[i] != that1.Field14[i] { + return fmt.Errorf("Field14 this[%v](%v) Not Equal that[%v](%v)", i, this.Field14[i], i, that1.Field14[i]) + } + } + if len(this.Field15) != len(that1.Field15) { + return fmt.Errorf("Field15 this(%v) Not Equal that(%v)", len(this.Field15), len(that1.Field15)) + } + for i := range this.Field15 { + if !bytes.Equal(this.Field15[i], that1.Field15[i]) { + return fmt.Errorf("Field15 this[%v](%v) Not Equal that[%v](%v)", i, this.Field15[i], i, that1.Field15[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NidRepNative) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*NidRepNative) + if !ok { + that2, ok := that.(NidRepNative) + 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.Field1) != len(that1.Field1) { + return false + } + for i := range this.Field1 { + if this.Field1[i] != that1.Field1[i] { + return false + } + } + if len(this.Field2) != len(that1.Field2) { + return false + } + for i := range this.Field2 { + if this.Field2[i] != that1.Field2[i] { + return false + } + } + if len(this.Field3) != len(that1.Field3) { + return false + } + for i := range this.Field3 { + if this.Field3[i] != that1.Field3[i] { + return false + } + } + if len(this.Field4) != len(that1.Field4) { + return false + } + for i := range this.Field4 { + if this.Field4[i] != that1.Field4[i] { + return false + } + } + if len(this.Field5) != len(that1.Field5) { + return false + } + for i := range this.Field5 { + if this.Field5[i] != that1.Field5[i] { + return false + } + } + if len(this.Field6) != len(that1.Field6) { + return false + } + for i := range this.Field6 { + if this.Field6[i] != that1.Field6[i] { + return false + } + } + if len(this.Field7) != len(that1.Field7) { + return false + } + for i := range this.Field7 { + if this.Field7[i] != that1.Field7[i] { + return false + } + } + if len(this.Field8) != len(that1.Field8) { + return false + } + for i := range this.Field8 { + if this.Field8[i] != that1.Field8[i] { + return false + } + } + if len(this.Field9) != len(that1.Field9) { + return false + } + for i := range this.Field9 { + if this.Field9[i] != that1.Field9[i] { + return false + } + } + if len(this.Field10) != len(that1.Field10) { + return false + } + for i := range this.Field10 { + if this.Field10[i] != that1.Field10[i] { + return false + } + } + if len(this.Field11) != len(that1.Field11) { + return false + } + for i := range this.Field11 { + if this.Field11[i] != that1.Field11[i] { + return false + } + } + if len(this.Field12) != len(that1.Field12) { + return false + } + for i := range this.Field12 { + if this.Field12[i] != that1.Field12[i] { + return false + } + } + if len(this.Field13) != len(that1.Field13) { + return false + } + for i := range this.Field13 { + if this.Field13[i] != that1.Field13[i] { + return false + } + } + if len(this.Field14) != len(that1.Field14) { + return false + } + for i := range this.Field14 { + if this.Field14[i] != that1.Field14[i] { + return false + } + } + if len(this.Field15) != len(that1.Field15) { + return false + } + for i := range this.Field15 { + if !bytes.Equal(this.Field15[i], that1.Field15[i]) { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NinRepNative) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NinRepNative) + if !ok { + that2, ok := that.(NinRepNative) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NinRepNative") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NinRepNative but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NinRepNative but is not nil && this == nil") + } + if len(this.Field1) != len(that1.Field1) { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", len(this.Field1), len(that1.Field1)) + } + for i := range this.Field1 { + if this.Field1[i] != that1.Field1[i] { + return fmt.Errorf("Field1 this[%v](%v) Not Equal that[%v](%v)", i, this.Field1[i], i, that1.Field1[i]) + } + } + if len(this.Field2) != len(that1.Field2) { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", len(this.Field2), len(that1.Field2)) + } + for i := range this.Field2 { + if this.Field2[i] != that1.Field2[i] { + return fmt.Errorf("Field2 this[%v](%v) Not Equal that[%v](%v)", i, this.Field2[i], i, that1.Field2[i]) + } + } + if len(this.Field3) != len(that1.Field3) { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", len(this.Field3), len(that1.Field3)) + } + for i := range this.Field3 { + if this.Field3[i] != that1.Field3[i] { + return fmt.Errorf("Field3 this[%v](%v) Not Equal that[%v](%v)", i, this.Field3[i], i, that1.Field3[i]) + } + } + if len(this.Field4) != len(that1.Field4) { + return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", len(this.Field4), len(that1.Field4)) + } + for i := range this.Field4 { + if this.Field4[i] != that1.Field4[i] { + return fmt.Errorf("Field4 this[%v](%v) Not Equal that[%v](%v)", i, this.Field4[i], i, that1.Field4[i]) + } + } + if len(this.Field5) != len(that1.Field5) { + return fmt.Errorf("Field5 this(%v) Not Equal that(%v)", len(this.Field5), len(that1.Field5)) + } + for i := range this.Field5 { + if this.Field5[i] != that1.Field5[i] { + return fmt.Errorf("Field5 this[%v](%v) Not Equal that[%v](%v)", i, this.Field5[i], i, that1.Field5[i]) + } + } + if len(this.Field6) != len(that1.Field6) { + return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", len(this.Field6), len(that1.Field6)) + } + for i := range this.Field6 { + if this.Field6[i] != that1.Field6[i] { + return fmt.Errorf("Field6 this[%v](%v) Not Equal that[%v](%v)", i, this.Field6[i], i, that1.Field6[i]) + } + } + if len(this.Field7) != len(that1.Field7) { + return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", len(this.Field7), len(that1.Field7)) + } + for i := range this.Field7 { + if this.Field7[i] != that1.Field7[i] { + return fmt.Errorf("Field7 this[%v](%v) Not Equal that[%v](%v)", i, this.Field7[i], i, that1.Field7[i]) + } + } + if len(this.Field8) != len(that1.Field8) { + return fmt.Errorf("Field8 this(%v) Not Equal that(%v)", len(this.Field8), len(that1.Field8)) + } + for i := range this.Field8 { + if this.Field8[i] != that1.Field8[i] { + return fmt.Errorf("Field8 this[%v](%v) Not Equal that[%v](%v)", i, this.Field8[i], i, that1.Field8[i]) + } + } + if len(this.Field9) != len(that1.Field9) { + return fmt.Errorf("Field9 this(%v) Not Equal that(%v)", len(this.Field9), len(that1.Field9)) + } + for i := range this.Field9 { + if this.Field9[i] != that1.Field9[i] { + return fmt.Errorf("Field9 this[%v](%v) Not Equal that[%v](%v)", i, this.Field9[i], i, that1.Field9[i]) + } + } + if len(this.Field10) != len(that1.Field10) { + return fmt.Errorf("Field10 this(%v) Not Equal that(%v)", len(this.Field10), len(that1.Field10)) + } + for i := range this.Field10 { + if this.Field10[i] != that1.Field10[i] { + return fmt.Errorf("Field10 this[%v](%v) Not Equal that[%v](%v)", i, this.Field10[i], i, that1.Field10[i]) + } + } + if len(this.Field11) != len(that1.Field11) { + return fmt.Errorf("Field11 this(%v) Not Equal that(%v)", len(this.Field11), len(that1.Field11)) + } + for i := range this.Field11 { + if this.Field11[i] != that1.Field11[i] { + return fmt.Errorf("Field11 this[%v](%v) Not Equal that[%v](%v)", i, this.Field11[i], i, that1.Field11[i]) + } + } + if len(this.Field12) != len(that1.Field12) { + return fmt.Errorf("Field12 this(%v) Not Equal that(%v)", len(this.Field12), len(that1.Field12)) + } + for i := range this.Field12 { + if this.Field12[i] != that1.Field12[i] { + return fmt.Errorf("Field12 this[%v](%v) Not Equal that[%v](%v)", i, this.Field12[i], i, that1.Field12[i]) + } + } + if len(this.Field13) != len(that1.Field13) { + return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", len(this.Field13), len(that1.Field13)) + } + for i := range this.Field13 { + if this.Field13[i] != that1.Field13[i] { + return fmt.Errorf("Field13 this[%v](%v) Not Equal that[%v](%v)", i, this.Field13[i], i, that1.Field13[i]) + } + } + if len(this.Field14) != len(that1.Field14) { + return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", len(this.Field14), len(that1.Field14)) + } + for i := range this.Field14 { + if this.Field14[i] != that1.Field14[i] { + return fmt.Errorf("Field14 this[%v](%v) Not Equal that[%v](%v)", i, this.Field14[i], i, that1.Field14[i]) + } + } + if len(this.Field15) != len(that1.Field15) { + return fmt.Errorf("Field15 this(%v) Not Equal that(%v)", len(this.Field15), len(that1.Field15)) + } + for i := range this.Field15 { + if !bytes.Equal(this.Field15[i], that1.Field15[i]) { + return fmt.Errorf("Field15 this[%v](%v) Not Equal that[%v](%v)", i, this.Field15[i], i, that1.Field15[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NinRepNative) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*NinRepNative) + if !ok { + that2, ok := that.(NinRepNative) + 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.Field1) != len(that1.Field1) { + return false + } + for i := range this.Field1 { + if this.Field1[i] != that1.Field1[i] { + return false + } + } + if len(this.Field2) != len(that1.Field2) { + return false + } + for i := range this.Field2 { + if this.Field2[i] != that1.Field2[i] { + return false + } + } + if len(this.Field3) != len(that1.Field3) { + return false + } + for i := range this.Field3 { + if this.Field3[i] != that1.Field3[i] { + return false + } + } + if len(this.Field4) != len(that1.Field4) { + return false + } + for i := range this.Field4 { + if this.Field4[i] != that1.Field4[i] { + return false + } + } + if len(this.Field5) != len(that1.Field5) { + return false + } + for i := range this.Field5 { + if this.Field5[i] != that1.Field5[i] { + return false + } + } + if len(this.Field6) != len(that1.Field6) { + return false + } + for i := range this.Field6 { + if this.Field6[i] != that1.Field6[i] { + return false + } + } + if len(this.Field7) != len(that1.Field7) { + return false + } + for i := range this.Field7 { + if this.Field7[i] != that1.Field7[i] { + return false + } + } + if len(this.Field8) != len(that1.Field8) { + return false + } + for i := range this.Field8 { + if this.Field8[i] != that1.Field8[i] { + return false + } + } + if len(this.Field9) != len(that1.Field9) { + return false + } + for i := range this.Field9 { + if this.Field9[i] != that1.Field9[i] { + return false + } + } + if len(this.Field10) != len(that1.Field10) { + return false + } + for i := range this.Field10 { + if this.Field10[i] != that1.Field10[i] { + return false + } + } + if len(this.Field11) != len(that1.Field11) { + return false + } + for i := range this.Field11 { + if this.Field11[i] != that1.Field11[i] { + return false + } + } + if len(this.Field12) != len(that1.Field12) { + return false + } + for i := range this.Field12 { + if this.Field12[i] != that1.Field12[i] { + return false + } + } + if len(this.Field13) != len(that1.Field13) { + return false + } + for i := range this.Field13 { + if this.Field13[i] != that1.Field13[i] { + return false + } + } + if len(this.Field14) != len(that1.Field14) { + return false + } + for i := range this.Field14 { + if this.Field14[i] != that1.Field14[i] { + return false + } + } + if len(this.Field15) != len(that1.Field15) { + return false + } + for i := range this.Field15 { + if !bytes.Equal(this.Field15[i], that1.Field15[i]) { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NidRepPackedNative) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NidRepPackedNative) + if !ok { + that2, ok := that.(NidRepPackedNative) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NidRepPackedNative") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NidRepPackedNative but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NidRepPackedNative but is not nil && this == nil") + } + if len(this.Field1) != len(that1.Field1) { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", len(this.Field1), len(that1.Field1)) + } + for i := range this.Field1 { + if this.Field1[i] != that1.Field1[i] { + return fmt.Errorf("Field1 this[%v](%v) Not Equal that[%v](%v)", i, this.Field1[i], i, that1.Field1[i]) + } + } + if len(this.Field2) != len(that1.Field2) { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", len(this.Field2), len(that1.Field2)) + } + for i := range this.Field2 { + if this.Field2[i] != that1.Field2[i] { + return fmt.Errorf("Field2 this[%v](%v) Not Equal that[%v](%v)", i, this.Field2[i], i, that1.Field2[i]) + } + } + if len(this.Field3) != len(that1.Field3) { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", len(this.Field3), len(that1.Field3)) + } + for i := range this.Field3 { + if this.Field3[i] != that1.Field3[i] { + return fmt.Errorf("Field3 this[%v](%v) Not Equal that[%v](%v)", i, this.Field3[i], i, that1.Field3[i]) + } + } + if len(this.Field4) != len(that1.Field4) { + return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", len(this.Field4), len(that1.Field4)) + } + for i := range this.Field4 { + if this.Field4[i] != that1.Field4[i] { + return fmt.Errorf("Field4 this[%v](%v) Not Equal that[%v](%v)", i, this.Field4[i], i, that1.Field4[i]) + } + } + if len(this.Field5) != len(that1.Field5) { + return fmt.Errorf("Field5 this(%v) Not Equal that(%v)", len(this.Field5), len(that1.Field5)) + } + for i := range this.Field5 { + if this.Field5[i] != that1.Field5[i] { + return fmt.Errorf("Field5 this[%v](%v) Not Equal that[%v](%v)", i, this.Field5[i], i, that1.Field5[i]) + } + } + if len(this.Field6) != len(that1.Field6) { + return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", len(this.Field6), len(that1.Field6)) + } + for i := range this.Field6 { + if this.Field6[i] != that1.Field6[i] { + return fmt.Errorf("Field6 this[%v](%v) Not Equal that[%v](%v)", i, this.Field6[i], i, that1.Field6[i]) + } + } + if len(this.Field7) != len(that1.Field7) { + return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", len(this.Field7), len(that1.Field7)) + } + for i := range this.Field7 { + if this.Field7[i] != that1.Field7[i] { + return fmt.Errorf("Field7 this[%v](%v) Not Equal that[%v](%v)", i, this.Field7[i], i, that1.Field7[i]) + } + } + if len(this.Field8) != len(that1.Field8) { + return fmt.Errorf("Field8 this(%v) Not Equal that(%v)", len(this.Field8), len(that1.Field8)) + } + for i := range this.Field8 { + if this.Field8[i] != that1.Field8[i] { + return fmt.Errorf("Field8 this[%v](%v) Not Equal that[%v](%v)", i, this.Field8[i], i, that1.Field8[i]) + } + } + if len(this.Field9) != len(that1.Field9) { + return fmt.Errorf("Field9 this(%v) Not Equal that(%v)", len(this.Field9), len(that1.Field9)) + } + for i := range this.Field9 { + if this.Field9[i] != that1.Field9[i] { + return fmt.Errorf("Field9 this[%v](%v) Not Equal that[%v](%v)", i, this.Field9[i], i, that1.Field9[i]) + } + } + if len(this.Field10) != len(that1.Field10) { + return fmt.Errorf("Field10 this(%v) Not Equal that(%v)", len(this.Field10), len(that1.Field10)) + } + for i := range this.Field10 { + if this.Field10[i] != that1.Field10[i] { + return fmt.Errorf("Field10 this[%v](%v) Not Equal that[%v](%v)", i, this.Field10[i], i, that1.Field10[i]) + } + } + if len(this.Field11) != len(that1.Field11) { + return fmt.Errorf("Field11 this(%v) Not Equal that(%v)", len(this.Field11), len(that1.Field11)) + } + for i := range this.Field11 { + if this.Field11[i] != that1.Field11[i] { + return fmt.Errorf("Field11 this[%v](%v) Not Equal that[%v](%v)", i, this.Field11[i], i, that1.Field11[i]) + } + } + if len(this.Field12) != len(that1.Field12) { + return fmt.Errorf("Field12 this(%v) Not Equal that(%v)", len(this.Field12), len(that1.Field12)) + } + for i := range this.Field12 { + if this.Field12[i] != that1.Field12[i] { + return fmt.Errorf("Field12 this[%v](%v) Not Equal that[%v](%v)", i, this.Field12[i], i, that1.Field12[i]) + } + } + if len(this.Field13) != len(that1.Field13) { + return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", len(this.Field13), len(that1.Field13)) + } + for i := range this.Field13 { + if this.Field13[i] != that1.Field13[i] { + return fmt.Errorf("Field13 this[%v](%v) Not Equal that[%v](%v)", i, this.Field13[i], i, that1.Field13[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NidRepPackedNative) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*NidRepPackedNative) + if !ok { + that2, ok := that.(NidRepPackedNative) + 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.Field1) != len(that1.Field1) { + return false + } + for i := range this.Field1 { + if this.Field1[i] != that1.Field1[i] { + return false + } + } + if len(this.Field2) != len(that1.Field2) { + return false + } + for i := range this.Field2 { + if this.Field2[i] != that1.Field2[i] { + return false + } + } + if len(this.Field3) != len(that1.Field3) { + return false + } + for i := range this.Field3 { + if this.Field3[i] != that1.Field3[i] { + return false + } + } + if len(this.Field4) != len(that1.Field4) { + return false + } + for i := range this.Field4 { + if this.Field4[i] != that1.Field4[i] { + return false + } + } + if len(this.Field5) != len(that1.Field5) { + return false + } + for i := range this.Field5 { + if this.Field5[i] != that1.Field5[i] { + return false + } + } + if len(this.Field6) != len(that1.Field6) { + return false + } + for i := range this.Field6 { + if this.Field6[i] != that1.Field6[i] { + return false + } + } + if len(this.Field7) != len(that1.Field7) { + return false + } + for i := range this.Field7 { + if this.Field7[i] != that1.Field7[i] { + return false + } + } + if len(this.Field8) != len(that1.Field8) { + return false + } + for i := range this.Field8 { + if this.Field8[i] != that1.Field8[i] { + return false + } + } + if len(this.Field9) != len(that1.Field9) { + return false + } + for i := range this.Field9 { + if this.Field9[i] != that1.Field9[i] { + return false + } + } + if len(this.Field10) != len(that1.Field10) { + return false + } + for i := range this.Field10 { + if this.Field10[i] != that1.Field10[i] { + return false + } + } + if len(this.Field11) != len(that1.Field11) { + return false + } + for i := range this.Field11 { + if this.Field11[i] != that1.Field11[i] { + return false + } + } + if len(this.Field12) != len(that1.Field12) { + return false + } + for i := range this.Field12 { + if this.Field12[i] != that1.Field12[i] { + return false + } + } + if len(this.Field13) != len(that1.Field13) { + return false + } + for i := range this.Field13 { + if this.Field13[i] != that1.Field13[i] { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NinRepPackedNative) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NinRepPackedNative) + if !ok { + that2, ok := that.(NinRepPackedNative) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NinRepPackedNative") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NinRepPackedNative but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NinRepPackedNative but is not nil && this == nil") + } + if len(this.Field1) != len(that1.Field1) { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", len(this.Field1), len(that1.Field1)) + } + for i := range this.Field1 { + if this.Field1[i] != that1.Field1[i] { + return fmt.Errorf("Field1 this[%v](%v) Not Equal that[%v](%v)", i, this.Field1[i], i, that1.Field1[i]) + } + } + if len(this.Field2) != len(that1.Field2) { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", len(this.Field2), len(that1.Field2)) + } + for i := range this.Field2 { + if this.Field2[i] != that1.Field2[i] { + return fmt.Errorf("Field2 this[%v](%v) Not Equal that[%v](%v)", i, this.Field2[i], i, that1.Field2[i]) + } + } + if len(this.Field3) != len(that1.Field3) { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", len(this.Field3), len(that1.Field3)) + } + for i := range this.Field3 { + if this.Field3[i] != that1.Field3[i] { + return fmt.Errorf("Field3 this[%v](%v) Not Equal that[%v](%v)", i, this.Field3[i], i, that1.Field3[i]) + } + } + if len(this.Field4) != len(that1.Field4) { + return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", len(this.Field4), len(that1.Field4)) + } + for i := range this.Field4 { + if this.Field4[i] != that1.Field4[i] { + return fmt.Errorf("Field4 this[%v](%v) Not Equal that[%v](%v)", i, this.Field4[i], i, that1.Field4[i]) + } + } + if len(this.Field5) != len(that1.Field5) { + return fmt.Errorf("Field5 this(%v) Not Equal that(%v)", len(this.Field5), len(that1.Field5)) + } + for i := range this.Field5 { + if this.Field5[i] != that1.Field5[i] { + return fmt.Errorf("Field5 this[%v](%v) Not Equal that[%v](%v)", i, this.Field5[i], i, that1.Field5[i]) + } + } + if len(this.Field6) != len(that1.Field6) { + return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", len(this.Field6), len(that1.Field6)) + } + for i := range this.Field6 { + if this.Field6[i] != that1.Field6[i] { + return fmt.Errorf("Field6 this[%v](%v) Not Equal that[%v](%v)", i, this.Field6[i], i, that1.Field6[i]) + } + } + if len(this.Field7) != len(that1.Field7) { + return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", len(this.Field7), len(that1.Field7)) + } + for i := range this.Field7 { + if this.Field7[i] != that1.Field7[i] { + return fmt.Errorf("Field7 this[%v](%v) Not Equal that[%v](%v)", i, this.Field7[i], i, that1.Field7[i]) + } + } + if len(this.Field8) != len(that1.Field8) { + return fmt.Errorf("Field8 this(%v) Not Equal that(%v)", len(this.Field8), len(that1.Field8)) + } + for i := range this.Field8 { + if this.Field8[i] != that1.Field8[i] { + return fmt.Errorf("Field8 this[%v](%v) Not Equal that[%v](%v)", i, this.Field8[i], i, that1.Field8[i]) + } + } + if len(this.Field9) != len(that1.Field9) { + return fmt.Errorf("Field9 this(%v) Not Equal that(%v)", len(this.Field9), len(that1.Field9)) + } + for i := range this.Field9 { + if this.Field9[i] != that1.Field9[i] { + return fmt.Errorf("Field9 this[%v](%v) Not Equal that[%v](%v)", i, this.Field9[i], i, that1.Field9[i]) + } + } + if len(this.Field10) != len(that1.Field10) { + return fmt.Errorf("Field10 this(%v) Not Equal that(%v)", len(this.Field10), len(that1.Field10)) + } + for i := range this.Field10 { + if this.Field10[i] != that1.Field10[i] { + return fmt.Errorf("Field10 this[%v](%v) Not Equal that[%v](%v)", i, this.Field10[i], i, that1.Field10[i]) + } + } + if len(this.Field11) != len(that1.Field11) { + return fmt.Errorf("Field11 this(%v) Not Equal that(%v)", len(this.Field11), len(that1.Field11)) + } + for i := range this.Field11 { + if this.Field11[i] != that1.Field11[i] { + return fmt.Errorf("Field11 this[%v](%v) Not Equal that[%v](%v)", i, this.Field11[i], i, that1.Field11[i]) + } + } + if len(this.Field12) != len(that1.Field12) { + return fmt.Errorf("Field12 this(%v) Not Equal that(%v)", len(this.Field12), len(that1.Field12)) + } + for i := range this.Field12 { + if this.Field12[i] != that1.Field12[i] { + return fmt.Errorf("Field12 this[%v](%v) Not Equal that[%v](%v)", i, this.Field12[i], i, that1.Field12[i]) + } + } + if len(this.Field13) != len(that1.Field13) { + return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", len(this.Field13), len(that1.Field13)) + } + for i := range this.Field13 { + if this.Field13[i] != that1.Field13[i] { + return fmt.Errorf("Field13 this[%v](%v) Not Equal that[%v](%v)", i, this.Field13[i], i, that1.Field13[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NinRepPackedNative) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*NinRepPackedNative) + if !ok { + that2, ok := that.(NinRepPackedNative) + 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.Field1) != len(that1.Field1) { + return false + } + for i := range this.Field1 { + if this.Field1[i] != that1.Field1[i] { + return false + } + } + if len(this.Field2) != len(that1.Field2) { + return false + } + for i := range this.Field2 { + if this.Field2[i] != that1.Field2[i] { + return false + } + } + if len(this.Field3) != len(that1.Field3) { + return false + } + for i := range this.Field3 { + if this.Field3[i] != that1.Field3[i] { + return false + } + } + if len(this.Field4) != len(that1.Field4) { + return false + } + for i := range this.Field4 { + if this.Field4[i] != that1.Field4[i] { + return false + } + } + if len(this.Field5) != len(that1.Field5) { + return false + } + for i := range this.Field5 { + if this.Field5[i] != that1.Field5[i] { + return false + } + } + if len(this.Field6) != len(that1.Field6) { + return false + } + for i := range this.Field6 { + if this.Field6[i] != that1.Field6[i] { + return false + } + } + if len(this.Field7) != len(that1.Field7) { + return false + } + for i := range this.Field7 { + if this.Field7[i] != that1.Field7[i] { + return false + } + } + if len(this.Field8) != len(that1.Field8) { + return false + } + for i := range this.Field8 { + if this.Field8[i] != that1.Field8[i] { + return false + } + } + if len(this.Field9) != len(that1.Field9) { + return false + } + for i := range this.Field9 { + if this.Field9[i] != that1.Field9[i] { + return false + } + } + if len(this.Field10) != len(that1.Field10) { + return false + } + for i := range this.Field10 { + if this.Field10[i] != that1.Field10[i] { + return false + } + } + if len(this.Field11) != len(that1.Field11) { + return false + } + for i := range this.Field11 { + if this.Field11[i] != that1.Field11[i] { + return false + } + } + if len(this.Field12) != len(that1.Field12) { + return false + } + for i := range this.Field12 { + if this.Field12[i] != that1.Field12[i] { + return false + } + } + if len(this.Field13) != len(that1.Field13) { + return false + } + for i := range this.Field13 { + if this.Field13[i] != that1.Field13[i] { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NidOptStruct) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NidOptStruct) + if !ok { + that2, ok := that.(NidOptStruct) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NidOptStruct") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NidOptStruct but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NidOptStruct but is not nil && this == nil") + } + if this.Field1 != that1.Field1 { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) + } + if this.Field2 != that1.Field2 { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) + } + if !this.Field3.Equal(&that1.Field3) { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", this.Field3, that1.Field3) + } + if !this.Field4.Equal(&that1.Field4) { + return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", this.Field4, that1.Field4) + } + if this.Field6 != that1.Field6 { + return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", this.Field6, that1.Field6) + } + if this.Field7 != that1.Field7 { + return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", this.Field7, that1.Field7) + } + if !this.Field8.Equal(&that1.Field8) { + return fmt.Errorf("Field8 this(%v) Not Equal that(%v)", this.Field8, that1.Field8) + } + if this.Field13 != that1.Field13 { + return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", this.Field13, that1.Field13) + } + if this.Field14 != that1.Field14 { + return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", this.Field14, that1.Field14) + } + if !bytes.Equal(this.Field15, that1.Field15) { + return fmt.Errorf("Field15 this(%v) Not Equal that(%v)", this.Field15, that1.Field15) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NidOptStruct) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*NidOptStruct) + if !ok { + that2, ok := that.(NidOptStruct) + 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.Field1 != that1.Field1 { + return false + } + if this.Field2 != that1.Field2 { + return false + } + if !this.Field3.Equal(&that1.Field3) { + return false + } + if !this.Field4.Equal(&that1.Field4) { + return false + } + if this.Field6 != that1.Field6 { + return false + } + if this.Field7 != that1.Field7 { + return false + } + if !this.Field8.Equal(&that1.Field8) { + return false + } + if this.Field13 != that1.Field13 { + return false + } + if this.Field14 != that1.Field14 { + return false + } + if !bytes.Equal(this.Field15, that1.Field15) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NinOptStruct) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NinOptStruct) + if !ok { + that2, ok := that.(NinOptStruct) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NinOptStruct") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NinOptStruct but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NinOptStruct but is not nil && this == nil") + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) + } + } else if this.Field1 != nil { + return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") + } else if that1.Field1 != nil { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", *this.Field2, *that1.Field2) + } + } else if this.Field2 != nil { + return fmt.Errorf("this.Field2 == nil && that.Field2 != nil") + } else if that1.Field2 != nil { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) + } + if !this.Field3.Equal(that1.Field3) { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", this.Field3, that1.Field3) + } + if !this.Field4.Equal(that1.Field4) { + return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", this.Field4, that1.Field4) + } + if this.Field6 != nil && that1.Field6 != nil { + if *this.Field6 != *that1.Field6 { + return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", *this.Field6, *that1.Field6) + } + } else if this.Field6 != nil { + return fmt.Errorf("this.Field6 == nil && that.Field6 != nil") + } else if that1.Field6 != nil { + return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", this.Field6, that1.Field6) + } + if this.Field7 != nil && that1.Field7 != nil { + if *this.Field7 != *that1.Field7 { + return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", *this.Field7, *that1.Field7) + } + } else if this.Field7 != nil { + return fmt.Errorf("this.Field7 == nil && that.Field7 != nil") + } else if that1.Field7 != nil { + return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", this.Field7, that1.Field7) + } + if !this.Field8.Equal(that1.Field8) { + return fmt.Errorf("Field8 this(%v) Not Equal that(%v)", this.Field8, that1.Field8) + } + if this.Field13 != nil && that1.Field13 != nil { + if *this.Field13 != *that1.Field13 { + return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", *this.Field13, *that1.Field13) + } + } else if this.Field13 != nil { + return fmt.Errorf("this.Field13 == nil && that.Field13 != nil") + } else if that1.Field13 != nil { + return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", this.Field13, that1.Field13) + } + if this.Field14 != nil && that1.Field14 != nil { + if *this.Field14 != *that1.Field14 { + return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", *this.Field14, *that1.Field14) + } + } else if this.Field14 != nil { + return fmt.Errorf("this.Field14 == nil && that.Field14 != nil") + } else if that1.Field14 != nil { + return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", this.Field14, that1.Field14) + } + if !bytes.Equal(this.Field15, that1.Field15) { + return fmt.Errorf("Field15 this(%v) Not Equal that(%v)", this.Field15, that1.Field15) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NinOptStruct) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*NinOptStruct) + if !ok { + that2, ok := that.(NinOptStruct) + 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.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return false + } + } else if this.Field1 != nil { + return false + } else if that1.Field1 != nil { + return false + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + return false + } + } else if this.Field2 != nil { + return false + } else if that1.Field2 != nil { + return false + } + if !this.Field3.Equal(that1.Field3) { + return false + } + if !this.Field4.Equal(that1.Field4) { + return false + } + if this.Field6 != nil && that1.Field6 != nil { + if *this.Field6 != *that1.Field6 { + return false + } + } else if this.Field6 != nil { + return false + } else if that1.Field6 != nil { + return false + } + if this.Field7 != nil && that1.Field7 != nil { + if *this.Field7 != *that1.Field7 { + return false + } + } else if this.Field7 != nil { + return false + } else if that1.Field7 != nil { + return false + } + if !this.Field8.Equal(that1.Field8) { + return false + } + if this.Field13 != nil && that1.Field13 != nil { + if *this.Field13 != *that1.Field13 { + return false + } + } else if this.Field13 != nil { + return false + } else if that1.Field13 != nil { + return false + } + if this.Field14 != nil && that1.Field14 != nil { + if *this.Field14 != *that1.Field14 { + return false + } + } else if this.Field14 != nil { + return false + } else if that1.Field14 != nil { + return false + } + if !bytes.Equal(this.Field15, that1.Field15) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NidRepStruct) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NidRepStruct) + if !ok { + that2, ok := that.(NidRepStruct) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NidRepStruct") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NidRepStruct but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NidRepStruct but is not nil && this == nil") + } + if len(this.Field1) != len(that1.Field1) { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", len(this.Field1), len(that1.Field1)) + } + for i := range this.Field1 { + if this.Field1[i] != that1.Field1[i] { + return fmt.Errorf("Field1 this[%v](%v) Not Equal that[%v](%v)", i, this.Field1[i], i, that1.Field1[i]) + } + } + if len(this.Field2) != len(that1.Field2) { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", len(this.Field2), len(that1.Field2)) + } + for i := range this.Field2 { + if this.Field2[i] != that1.Field2[i] { + return fmt.Errorf("Field2 this[%v](%v) Not Equal that[%v](%v)", i, this.Field2[i], i, that1.Field2[i]) + } + } + if len(this.Field3) != len(that1.Field3) { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", len(this.Field3), len(that1.Field3)) + } + for i := range this.Field3 { + if !this.Field3[i].Equal(&that1.Field3[i]) { + return fmt.Errorf("Field3 this[%v](%v) Not Equal that[%v](%v)", i, this.Field3[i], i, that1.Field3[i]) + } + } + if len(this.Field4) != len(that1.Field4) { + return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", len(this.Field4), len(that1.Field4)) + } + for i := range this.Field4 { + if !this.Field4[i].Equal(&that1.Field4[i]) { + return fmt.Errorf("Field4 this[%v](%v) Not Equal that[%v](%v)", i, this.Field4[i], i, that1.Field4[i]) + } + } + if len(this.Field6) != len(that1.Field6) { + return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", len(this.Field6), len(that1.Field6)) + } + for i := range this.Field6 { + if this.Field6[i] != that1.Field6[i] { + return fmt.Errorf("Field6 this[%v](%v) Not Equal that[%v](%v)", i, this.Field6[i], i, that1.Field6[i]) + } + } + if len(this.Field7) != len(that1.Field7) { + return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", len(this.Field7), len(that1.Field7)) + } + for i := range this.Field7 { + if this.Field7[i] != that1.Field7[i] { + return fmt.Errorf("Field7 this[%v](%v) Not Equal that[%v](%v)", i, this.Field7[i], i, that1.Field7[i]) + } + } + if len(this.Field8) != len(that1.Field8) { + return fmt.Errorf("Field8 this(%v) Not Equal that(%v)", len(this.Field8), len(that1.Field8)) + } + for i := range this.Field8 { + if !this.Field8[i].Equal(&that1.Field8[i]) { + return fmt.Errorf("Field8 this[%v](%v) Not Equal that[%v](%v)", i, this.Field8[i], i, that1.Field8[i]) + } + } + if len(this.Field13) != len(that1.Field13) { + return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", len(this.Field13), len(that1.Field13)) + } + for i := range this.Field13 { + if this.Field13[i] != that1.Field13[i] { + return fmt.Errorf("Field13 this[%v](%v) Not Equal that[%v](%v)", i, this.Field13[i], i, that1.Field13[i]) + } + } + if len(this.Field14) != len(that1.Field14) { + return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", len(this.Field14), len(that1.Field14)) + } + for i := range this.Field14 { + if this.Field14[i] != that1.Field14[i] { + return fmt.Errorf("Field14 this[%v](%v) Not Equal that[%v](%v)", i, this.Field14[i], i, that1.Field14[i]) + } + } + if len(this.Field15) != len(that1.Field15) { + return fmt.Errorf("Field15 this(%v) Not Equal that(%v)", len(this.Field15), len(that1.Field15)) + } + for i := range this.Field15 { + if !bytes.Equal(this.Field15[i], that1.Field15[i]) { + return fmt.Errorf("Field15 this[%v](%v) Not Equal that[%v](%v)", i, this.Field15[i], i, that1.Field15[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NidRepStruct) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*NidRepStruct) + if !ok { + that2, ok := that.(NidRepStruct) + 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.Field1) != len(that1.Field1) { + return false + } + for i := range this.Field1 { + if this.Field1[i] != that1.Field1[i] { + return false + } + } + if len(this.Field2) != len(that1.Field2) { + return false + } + for i := range this.Field2 { + if this.Field2[i] != that1.Field2[i] { + return false + } + } + if len(this.Field3) != len(that1.Field3) { + return false + } + for i := range this.Field3 { + if !this.Field3[i].Equal(&that1.Field3[i]) { + return false + } + } + if len(this.Field4) != len(that1.Field4) { + return false + } + for i := range this.Field4 { + if !this.Field4[i].Equal(&that1.Field4[i]) { + return false + } + } + if len(this.Field6) != len(that1.Field6) { + return false + } + for i := range this.Field6 { + if this.Field6[i] != that1.Field6[i] { + return false + } + } + if len(this.Field7) != len(that1.Field7) { + return false + } + for i := range this.Field7 { + if this.Field7[i] != that1.Field7[i] { + return false + } + } + if len(this.Field8) != len(that1.Field8) { + return false + } + for i := range this.Field8 { + if !this.Field8[i].Equal(&that1.Field8[i]) { + return false + } + } + if len(this.Field13) != len(that1.Field13) { + return false + } + for i := range this.Field13 { + if this.Field13[i] != that1.Field13[i] { + return false + } + } + if len(this.Field14) != len(that1.Field14) { + return false + } + for i := range this.Field14 { + if this.Field14[i] != that1.Field14[i] { + return false + } + } + if len(this.Field15) != len(that1.Field15) { + return false + } + for i := range this.Field15 { + if !bytes.Equal(this.Field15[i], that1.Field15[i]) { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NinRepStruct) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NinRepStruct) + if !ok { + that2, ok := that.(NinRepStruct) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NinRepStruct") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NinRepStruct but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NinRepStruct but is not nil && this == nil") + } + if len(this.Field1) != len(that1.Field1) { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", len(this.Field1), len(that1.Field1)) + } + for i := range this.Field1 { + if this.Field1[i] != that1.Field1[i] { + return fmt.Errorf("Field1 this[%v](%v) Not Equal that[%v](%v)", i, this.Field1[i], i, that1.Field1[i]) + } + } + if len(this.Field2) != len(that1.Field2) { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", len(this.Field2), len(that1.Field2)) + } + for i := range this.Field2 { + if this.Field2[i] != that1.Field2[i] { + return fmt.Errorf("Field2 this[%v](%v) Not Equal that[%v](%v)", i, this.Field2[i], i, that1.Field2[i]) + } + } + if len(this.Field3) != len(that1.Field3) { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", len(this.Field3), len(that1.Field3)) + } + for i := range this.Field3 { + if !this.Field3[i].Equal(that1.Field3[i]) { + return fmt.Errorf("Field3 this[%v](%v) Not Equal that[%v](%v)", i, this.Field3[i], i, that1.Field3[i]) + } + } + if len(this.Field4) != len(that1.Field4) { + return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", len(this.Field4), len(that1.Field4)) + } + for i := range this.Field4 { + if !this.Field4[i].Equal(that1.Field4[i]) { + return fmt.Errorf("Field4 this[%v](%v) Not Equal that[%v](%v)", i, this.Field4[i], i, that1.Field4[i]) + } + } + if len(this.Field6) != len(that1.Field6) { + return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", len(this.Field6), len(that1.Field6)) + } + for i := range this.Field6 { + if this.Field6[i] != that1.Field6[i] { + return fmt.Errorf("Field6 this[%v](%v) Not Equal that[%v](%v)", i, this.Field6[i], i, that1.Field6[i]) + } + } + if len(this.Field7) != len(that1.Field7) { + return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", len(this.Field7), len(that1.Field7)) + } + for i := range this.Field7 { + if this.Field7[i] != that1.Field7[i] { + return fmt.Errorf("Field7 this[%v](%v) Not Equal that[%v](%v)", i, this.Field7[i], i, that1.Field7[i]) + } + } + if len(this.Field8) != len(that1.Field8) { + return fmt.Errorf("Field8 this(%v) Not Equal that(%v)", len(this.Field8), len(that1.Field8)) + } + for i := range this.Field8 { + if !this.Field8[i].Equal(that1.Field8[i]) { + return fmt.Errorf("Field8 this[%v](%v) Not Equal that[%v](%v)", i, this.Field8[i], i, that1.Field8[i]) + } + } + if len(this.Field13) != len(that1.Field13) { + return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", len(this.Field13), len(that1.Field13)) + } + for i := range this.Field13 { + if this.Field13[i] != that1.Field13[i] { + return fmt.Errorf("Field13 this[%v](%v) Not Equal that[%v](%v)", i, this.Field13[i], i, that1.Field13[i]) + } + } + if len(this.Field14) != len(that1.Field14) { + return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", len(this.Field14), len(that1.Field14)) + } + for i := range this.Field14 { + if this.Field14[i] != that1.Field14[i] { + return fmt.Errorf("Field14 this[%v](%v) Not Equal that[%v](%v)", i, this.Field14[i], i, that1.Field14[i]) + } + } + if len(this.Field15) != len(that1.Field15) { + return fmt.Errorf("Field15 this(%v) Not Equal that(%v)", len(this.Field15), len(that1.Field15)) + } + for i := range this.Field15 { + if !bytes.Equal(this.Field15[i], that1.Field15[i]) { + return fmt.Errorf("Field15 this[%v](%v) Not Equal that[%v](%v)", i, this.Field15[i], i, that1.Field15[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NinRepStruct) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*NinRepStruct) + if !ok { + that2, ok := that.(NinRepStruct) + 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.Field1) != len(that1.Field1) { + return false + } + for i := range this.Field1 { + if this.Field1[i] != that1.Field1[i] { + return false + } + } + if len(this.Field2) != len(that1.Field2) { + return false + } + for i := range this.Field2 { + if this.Field2[i] != that1.Field2[i] { + return false + } + } + if len(this.Field3) != len(that1.Field3) { + return false + } + for i := range this.Field3 { + if !this.Field3[i].Equal(that1.Field3[i]) { + return false + } + } + if len(this.Field4) != len(that1.Field4) { + return false + } + for i := range this.Field4 { + if !this.Field4[i].Equal(that1.Field4[i]) { + return false + } + } + if len(this.Field6) != len(that1.Field6) { + return false + } + for i := range this.Field6 { + if this.Field6[i] != that1.Field6[i] { + return false + } + } + if len(this.Field7) != len(that1.Field7) { + return false + } + for i := range this.Field7 { + if this.Field7[i] != that1.Field7[i] { + return false + } + } + if len(this.Field8) != len(that1.Field8) { + return false + } + for i := range this.Field8 { + if !this.Field8[i].Equal(that1.Field8[i]) { + return false + } + } + if len(this.Field13) != len(that1.Field13) { + return false + } + for i := range this.Field13 { + if this.Field13[i] != that1.Field13[i] { + return false + } + } + if len(this.Field14) != len(that1.Field14) { + return false + } + for i := range this.Field14 { + if this.Field14[i] != that1.Field14[i] { + return false + } + } + if len(this.Field15) != len(that1.Field15) { + return false + } + for i := range this.Field15 { + if !bytes.Equal(this.Field15[i], that1.Field15[i]) { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NidEmbeddedStruct) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NidEmbeddedStruct) + if !ok { + that2, ok := that.(NidEmbeddedStruct) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NidEmbeddedStruct") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NidEmbeddedStruct but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NidEmbeddedStruct but is not nil && this == nil") + } + if !this.NidOptNative.Equal(that1.NidOptNative) { + return fmt.Errorf("NidOptNative this(%v) Not Equal that(%v)", this.NidOptNative, that1.NidOptNative) + } + if !this.Field200.Equal(&that1.Field200) { + return fmt.Errorf("Field200 this(%v) Not Equal that(%v)", this.Field200, that1.Field200) + } + if this.Field210 != that1.Field210 { + return fmt.Errorf("Field210 this(%v) Not Equal that(%v)", this.Field210, that1.Field210) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NidEmbeddedStruct) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*NidEmbeddedStruct) + if !ok { + that2, ok := that.(NidEmbeddedStruct) + 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.NidOptNative.Equal(that1.NidOptNative) { + return false + } + if !this.Field200.Equal(&that1.Field200) { + return false + } + if this.Field210 != that1.Field210 { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NinEmbeddedStruct) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NinEmbeddedStruct) + if !ok { + that2, ok := that.(NinEmbeddedStruct) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NinEmbeddedStruct") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NinEmbeddedStruct but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NinEmbeddedStruct but is not nil && this == nil") + } + if !this.NidOptNative.Equal(that1.NidOptNative) { + return fmt.Errorf("NidOptNative this(%v) Not Equal that(%v)", this.NidOptNative, that1.NidOptNative) + } + if !this.Field200.Equal(that1.Field200) { + return fmt.Errorf("Field200 this(%v) Not Equal that(%v)", this.Field200, that1.Field200) + } + if this.Field210 != nil && that1.Field210 != nil { + if *this.Field210 != *that1.Field210 { + return fmt.Errorf("Field210 this(%v) Not Equal that(%v)", *this.Field210, *that1.Field210) + } + } else if this.Field210 != nil { + return fmt.Errorf("this.Field210 == nil && that.Field210 != nil") + } else if that1.Field210 != nil { + return fmt.Errorf("Field210 this(%v) Not Equal that(%v)", this.Field210, that1.Field210) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NinEmbeddedStruct) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*NinEmbeddedStruct) + if !ok { + that2, ok := that.(NinEmbeddedStruct) + 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.NidOptNative.Equal(that1.NidOptNative) { + return false + } + if !this.Field200.Equal(that1.Field200) { + return false + } + if this.Field210 != nil && that1.Field210 != nil { + if *this.Field210 != *that1.Field210 { + return false + } + } else if this.Field210 != nil { + return false + } else if that1.Field210 != nil { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NidNestedStruct) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NidNestedStruct) + if !ok { + that2, ok := that.(NidNestedStruct) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NidNestedStruct") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NidNestedStruct but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NidNestedStruct but is not nil && this == nil") + } + if !this.Field1.Equal(&that1.Field1) { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) + } + if len(this.Field2) != len(that1.Field2) { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", len(this.Field2), len(that1.Field2)) + } + for i := range this.Field2 { + if !this.Field2[i].Equal(&that1.Field2[i]) { + return fmt.Errorf("Field2 this[%v](%v) Not Equal that[%v](%v)", i, this.Field2[i], i, that1.Field2[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NidNestedStruct) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*NidNestedStruct) + if !ok { + that2, ok := that.(NidNestedStruct) + 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.Field1.Equal(&that1.Field1) { + return false + } + if len(this.Field2) != len(that1.Field2) { + return false + } + for i := range this.Field2 { + if !this.Field2[i].Equal(&that1.Field2[i]) { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NinNestedStruct) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NinNestedStruct) + if !ok { + that2, ok := that.(NinNestedStruct) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NinNestedStruct") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NinNestedStruct but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NinNestedStruct but is not nil && this == nil") + } + if !this.Field1.Equal(that1.Field1) { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) + } + if len(this.Field2) != len(that1.Field2) { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", len(this.Field2), len(that1.Field2)) + } + for i := range this.Field2 { + if !this.Field2[i].Equal(that1.Field2[i]) { + return fmt.Errorf("Field2 this[%v](%v) Not Equal that[%v](%v)", i, this.Field2[i], i, that1.Field2[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NinNestedStruct) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*NinNestedStruct) + if !ok { + that2, ok := that.(NinNestedStruct) + 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.Field1.Equal(that1.Field1) { + return false + } + if len(this.Field2) != len(that1.Field2) { + return false + } + for i := range this.Field2 { + if !this.Field2[i].Equal(that1.Field2[i]) { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NidOptCustom) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NidOptCustom) + if !ok { + that2, ok := that.(NidOptCustom) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NidOptCustom") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NidOptCustom but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NidOptCustom 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.Value.Equal(that1.Value) { + return fmt.Errorf("Value this(%v) Not Equal that(%v)", this.Value, that1.Value) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NidOptCustom) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*NidOptCustom) + if !ok { + that2, ok := that.(NidOptCustom) + 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.Value.Equal(that1.Value) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *CustomDash) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*CustomDash) + if !ok { + that2, ok := that.(CustomDash) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *CustomDash") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *CustomDash but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *CustomDash but is not nil && this == nil") + } + if that1.Value == nil { + if this.Value != nil { + return fmt.Errorf("this.Value != nil && that1.Value == nil") + } + } else if !this.Value.Equal(*that1.Value) { + return fmt.Errorf("Value this(%v) Not Equal that(%v)", this.Value, that1.Value) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *CustomDash) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*CustomDash) + if !ok { + that2, ok := that.(CustomDash) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + if this == nil { + return true + } + return false + } else if this == nil { + return false + } + if that1.Value == nil { + if this.Value != nil { + return false + } + } else if !this.Value.Equal(*that1.Value) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NinOptCustom) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NinOptCustom) + if !ok { + that2, ok := that.(NinOptCustom) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NinOptCustom") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NinOptCustom but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NinOptCustom but is not nil && this == nil") + } + if that1.Id == nil { + if this.Id != nil { + return fmt.Errorf("this.Id != nil && that1.Id == nil") + } + } else if !this.Id.Equal(*that1.Id) { + return fmt.Errorf("Id this(%v) Not Equal that(%v)", this.Id, that1.Id) + } + if that1.Value == nil { + if this.Value != nil { + return fmt.Errorf("this.Value != nil && that1.Value == nil") + } + } else if !this.Value.Equal(*that1.Value) { + return fmt.Errorf("Value this(%v) Not Equal that(%v)", this.Value, that1.Value) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NinOptCustom) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*NinOptCustom) + if !ok { + that2, ok := that.(NinOptCustom) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + if this == nil { + return true + } + return false + } else if this == nil { + return false + } + if that1.Id == nil { + if this.Id != nil { + return false + } + } else if !this.Id.Equal(*that1.Id) { + return false + } + if that1.Value == nil { + if this.Value != nil { + return false + } + } else if !this.Value.Equal(*that1.Value) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NidRepCustom) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NidRepCustom) + if !ok { + that2, ok := that.(NidRepCustom) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NidRepCustom") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NidRepCustom but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NidRepCustom but is not nil && this == nil") + } + if len(this.Id) != len(that1.Id) { + return fmt.Errorf("Id this(%v) Not Equal that(%v)", len(this.Id), len(that1.Id)) + } + for i := range this.Id { + if !this.Id[i].Equal(that1.Id[i]) { + return fmt.Errorf("Id this[%v](%v) Not Equal that[%v](%v)", i, this.Id[i], i, that1.Id[i]) + } + } + if len(this.Value) != len(that1.Value) { + return fmt.Errorf("Value this(%v) Not Equal that(%v)", len(this.Value), len(that1.Value)) + } + for i := range this.Value { + if !this.Value[i].Equal(that1.Value[i]) { + return fmt.Errorf("Value this[%v](%v) Not Equal that[%v](%v)", i, this.Value[i], i, that1.Value[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NidRepCustom) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*NidRepCustom) + if !ok { + that2, ok := that.(NidRepCustom) + 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.Id) != len(that1.Id) { + return false + } + for i := range this.Id { + if !this.Id[i].Equal(that1.Id[i]) { + return false + } + } + if len(this.Value) != len(that1.Value) { + return false + } + for i := range this.Value { + if !this.Value[i].Equal(that1.Value[i]) { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NinRepCustom) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NinRepCustom) + if !ok { + that2, ok := that.(NinRepCustom) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NinRepCustom") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NinRepCustom but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NinRepCustom but is not nil && this == nil") + } + if len(this.Id) != len(that1.Id) { + return fmt.Errorf("Id this(%v) Not Equal that(%v)", len(this.Id), len(that1.Id)) + } + for i := range this.Id { + if !this.Id[i].Equal(that1.Id[i]) { + return fmt.Errorf("Id this[%v](%v) Not Equal that[%v](%v)", i, this.Id[i], i, that1.Id[i]) + } + } + if len(this.Value) != len(that1.Value) { + return fmt.Errorf("Value this(%v) Not Equal that(%v)", len(this.Value), len(that1.Value)) + } + for i := range this.Value { + if !this.Value[i].Equal(that1.Value[i]) { + return fmt.Errorf("Value this[%v](%v) Not Equal that[%v](%v)", i, this.Value[i], i, that1.Value[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NinRepCustom) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*NinRepCustom) + if !ok { + that2, ok := that.(NinRepCustom) + 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.Id) != len(that1.Id) { + return false + } + for i := range this.Id { + if !this.Id[i].Equal(that1.Id[i]) { + return false + } + } + if len(this.Value) != len(that1.Value) { + return false + } + for i := range this.Value { + if !this.Value[i].Equal(that1.Value[i]) { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NinOptNativeUnion) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NinOptNativeUnion) + if !ok { + that2, ok := that.(NinOptNativeUnion) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NinOptNativeUnion") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NinOptNativeUnion but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NinOptNativeUnion but is not nil && this == nil") + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) + } + } else if this.Field1 != nil { + return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") + } else if that1.Field1 != nil { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", *this.Field2, *that1.Field2) + } + } else if this.Field2 != nil { + return fmt.Errorf("this.Field2 == nil && that.Field2 != nil") + } else if that1.Field2 != nil { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) + } + if this.Field3 != nil && that1.Field3 != nil { + if *this.Field3 != *that1.Field3 { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", *this.Field3, *that1.Field3) + } + } else if this.Field3 != nil { + return fmt.Errorf("this.Field3 == nil && that.Field3 != nil") + } else if that1.Field3 != nil { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", this.Field3, that1.Field3) + } + if this.Field4 != nil && that1.Field4 != nil { + if *this.Field4 != *that1.Field4 { + return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", *this.Field4, *that1.Field4) + } + } else if this.Field4 != nil { + return fmt.Errorf("this.Field4 == nil && that.Field4 != nil") + } else if that1.Field4 != nil { + return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", this.Field4, that1.Field4) + } + if this.Field5 != nil && that1.Field5 != nil { + if *this.Field5 != *that1.Field5 { + return fmt.Errorf("Field5 this(%v) Not Equal that(%v)", *this.Field5, *that1.Field5) + } + } else if this.Field5 != nil { + return fmt.Errorf("this.Field5 == nil && that.Field5 != nil") + } else if that1.Field5 != nil { + return fmt.Errorf("Field5 this(%v) Not Equal that(%v)", this.Field5, that1.Field5) + } + if this.Field6 != nil && that1.Field6 != nil { + if *this.Field6 != *that1.Field6 { + return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", *this.Field6, *that1.Field6) + } + } else if this.Field6 != nil { + return fmt.Errorf("this.Field6 == nil && that.Field6 != nil") + } else if that1.Field6 != nil { + return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", this.Field6, that1.Field6) + } + if this.Field13 != nil && that1.Field13 != nil { + if *this.Field13 != *that1.Field13 { + return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", *this.Field13, *that1.Field13) + } + } else if this.Field13 != nil { + return fmt.Errorf("this.Field13 == nil && that.Field13 != nil") + } else if that1.Field13 != nil { + return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", this.Field13, that1.Field13) + } + if this.Field14 != nil && that1.Field14 != nil { + if *this.Field14 != *that1.Field14 { + return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", *this.Field14, *that1.Field14) + } + } else if this.Field14 != nil { + return fmt.Errorf("this.Field14 == nil && that.Field14 != nil") + } else if that1.Field14 != nil { + return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", this.Field14, that1.Field14) + } + if !bytes.Equal(this.Field15, that1.Field15) { + return fmt.Errorf("Field15 this(%v) Not Equal that(%v)", this.Field15, that1.Field15) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NinOptNativeUnion) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*NinOptNativeUnion) + if !ok { + that2, ok := that.(NinOptNativeUnion) + 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.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return false + } + } else if this.Field1 != nil { + return false + } else if that1.Field1 != nil { + return false + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + return false + } + } else if this.Field2 != nil { + return false + } else if that1.Field2 != nil { + return false + } + if this.Field3 != nil && that1.Field3 != nil { + if *this.Field3 != *that1.Field3 { + return false + } + } else if this.Field3 != nil { + return false + } else if that1.Field3 != nil { + return false + } + if this.Field4 != nil && that1.Field4 != nil { + if *this.Field4 != *that1.Field4 { + return false + } + } else if this.Field4 != nil { + return false + } else if that1.Field4 != nil { + return false + } + if this.Field5 != nil && that1.Field5 != nil { + if *this.Field5 != *that1.Field5 { + return false + } + } else if this.Field5 != nil { + return false + } else if that1.Field5 != nil { + return false + } + if this.Field6 != nil && that1.Field6 != nil { + if *this.Field6 != *that1.Field6 { + return false + } + } else if this.Field6 != nil { + return false + } else if that1.Field6 != nil { + return false + } + if this.Field13 != nil && that1.Field13 != nil { + if *this.Field13 != *that1.Field13 { + return false + } + } else if this.Field13 != nil { + return false + } else if that1.Field13 != nil { + return false + } + if this.Field14 != nil && that1.Field14 != nil { + if *this.Field14 != *that1.Field14 { + return false + } + } else if this.Field14 != nil { + return false + } else if that1.Field14 != nil { + return false + } + if !bytes.Equal(this.Field15, that1.Field15) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NinOptStructUnion) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NinOptStructUnion) + if !ok { + that2, ok := that.(NinOptStructUnion) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NinOptStructUnion") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NinOptStructUnion but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NinOptStructUnion but is not nil && this == nil") + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) + } + } else if this.Field1 != nil { + return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") + } else if that1.Field1 != nil { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", *this.Field2, *that1.Field2) + } + } else if this.Field2 != nil { + return fmt.Errorf("this.Field2 == nil && that.Field2 != nil") + } else if that1.Field2 != nil { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) + } + if !this.Field3.Equal(that1.Field3) { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", this.Field3, that1.Field3) + } + if !this.Field4.Equal(that1.Field4) { + return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", this.Field4, that1.Field4) + } + if this.Field6 != nil && that1.Field6 != nil { + if *this.Field6 != *that1.Field6 { + return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", *this.Field6, *that1.Field6) + } + } else if this.Field6 != nil { + return fmt.Errorf("this.Field6 == nil && that.Field6 != nil") + } else if that1.Field6 != nil { + return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", this.Field6, that1.Field6) + } + if this.Field7 != nil && that1.Field7 != nil { + if *this.Field7 != *that1.Field7 { + return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", *this.Field7, *that1.Field7) + } + } else if this.Field7 != nil { + return fmt.Errorf("this.Field7 == nil && that.Field7 != nil") + } else if that1.Field7 != nil { + return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", this.Field7, that1.Field7) + } + if this.Field13 != nil && that1.Field13 != nil { + if *this.Field13 != *that1.Field13 { + return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", *this.Field13, *that1.Field13) + } + } else if this.Field13 != nil { + return fmt.Errorf("this.Field13 == nil && that.Field13 != nil") + } else if that1.Field13 != nil { + return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", this.Field13, that1.Field13) + } + if this.Field14 != nil && that1.Field14 != nil { + if *this.Field14 != *that1.Field14 { + return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", *this.Field14, *that1.Field14) + } + } else if this.Field14 != nil { + return fmt.Errorf("this.Field14 == nil && that.Field14 != nil") + } else if that1.Field14 != nil { + return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", this.Field14, that1.Field14) + } + if !bytes.Equal(this.Field15, that1.Field15) { + return fmt.Errorf("Field15 this(%v) Not Equal that(%v)", this.Field15, that1.Field15) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NinOptStructUnion) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*NinOptStructUnion) + if !ok { + that2, ok := that.(NinOptStructUnion) + 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.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return false + } + } else if this.Field1 != nil { + return false + } else if that1.Field1 != nil { + return false + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + return false + } + } else if this.Field2 != nil { + return false + } else if that1.Field2 != nil { + return false + } + if !this.Field3.Equal(that1.Field3) { + return false + } + if !this.Field4.Equal(that1.Field4) { + return false + } + if this.Field6 != nil && that1.Field6 != nil { + if *this.Field6 != *that1.Field6 { + return false + } + } else if this.Field6 != nil { + return false + } else if that1.Field6 != nil { + return false + } + if this.Field7 != nil && that1.Field7 != nil { + if *this.Field7 != *that1.Field7 { + return false + } + } else if this.Field7 != nil { + return false + } else if that1.Field7 != nil { + return false + } + if this.Field13 != nil && that1.Field13 != nil { + if *this.Field13 != *that1.Field13 { + return false + } + } else if this.Field13 != nil { + return false + } else if that1.Field13 != nil { + return false + } + if this.Field14 != nil && that1.Field14 != nil { + if *this.Field14 != *that1.Field14 { + return false + } + } else if this.Field14 != nil { + return false + } else if that1.Field14 != nil { + return false + } + if !bytes.Equal(this.Field15, that1.Field15) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NinEmbeddedStructUnion) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NinEmbeddedStructUnion) + if !ok { + that2, ok := that.(NinEmbeddedStructUnion) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NinEmbeddedStructUnion") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NinEmbeddedStructUnion but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NinEmbeddedStructUnion but is not nil && this == nil") + } + if !this.NidOptNative.Equal(that1.NidOptNative) { + return fmt.Errorf("NidOptNative this(%v) Not Equal that(%v)", this.NidOptNative, that1.NidOptNative) + } + if !this.Field200.Equal(that1.Field200) { + return fmt.Errorf("Field200 this(%v) Not Equal that(%v)", this.Field200, that1.Field200) + } + if this.Field210 != nil && that1.Field210 != nil { + if *this.Field210 != *that1.Field210 { + return fmt.Errorf("Field210 this(%v) Not Equal that(%v)", *this.Field210, *that1.Field210) + } + } else if this.Field210 != nil { + return fmt.Errorf("this.Field210 == nil && that.Field210 != nil") + } else if that1.Field210 != nil { + return fmt.Errorf("Field210 this(%v) Not Equal that(%v)", this.Field210, that1.Field210) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NinEmbeddedStructUnion) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*NinEmbeddedStructUnion) + if !ok { + that2, ok := that.(NinEmbeddedStructUnion) + 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.NidOptNative.Equal(that1.NidOptNative) { + return false + } + if !this.Field200.Equal(that1.Field200) { + return false + } + if this.Field210 != nil && that1.Field210 != nil { + if *this.Field210 != *that1.Field210 { + return false + } + } else if this.Field210 != nil { + return false + } else if that1.Field210 != nil { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NinNestedStructUnion) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NinNestedStructUnion) + if !ok { + that2, ok := that.(NinNestedStructUnion) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NinNestedStructUnion") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NinNestedStructUnion but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NinNestedStructUnion but is not nil && this == nil") + } + if !this.Field1.Equal(that1.Field1) { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) + } + if !this.Field2.Equal(that1.Field2) { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) + } + if !this.Field3.Equal(that1.Field3) { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", this.Field3, that1.Field3) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NinNestedStructUnion) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*NinNestedStructUnion) + if !ok { + that2, ok := that.(NinNestedStructUnion) + 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.Field1.Equal(that1.Field1) { + return false + } + if !this.Field2.Equal(that1.Field2) { + return false + } + if !this.Field3.Equal(that1.Field3) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *Tree) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*Tree) + if !ok { + that2, ok := that.(Tree) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *Tree") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *Tree but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *Tree but is not nil && this == nil") + } + if !this.Or.Equal(that1.Or) { + return fmt.Errorf("Or this(%v) Not Equal that(%v)", this.Or, that1.Or) + } + if !this.And.Equal(that1.And) { + return fmt.Errorf("And this(%v) Not Equal that(%v)", this.And, that1.And) + } + if !this.Leaf.Equal(that1.Leaf) { + return fmt.Errorf("Leaf this(%v) Not Equal that(%v)", this.Leaf, that1.Leaf) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *Tree) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*Tree) + if !ok { + that2, ok := that.(Tree) + 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.Or.Equal(that1.Or) { + return false + } + if !this.And.Equal(that1.And) { + return false + } + if !this.Leaf.Equal(that1.Leaf) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *OrBranch) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*OrBranch) + if !ok { + that2, ok := that.(OrBranch) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *OrBranch") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *OrBranch but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *OrBranch but is not nil && this == nil") + } + if !this.Left.Equal(&that1.Left) { + return fmt.Errorf("Left this(%v) Not Equal that(%v)", this.Left, that1.Left) + } + if !this.Right.Equal(&that1.Right) { + return fmt.Errorf("Right this(%v) Not Equal that(%v)", this.Right, that1.Right) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *OrBranch) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*OrBranch) + if !ok { + that2, ok := that.(OrBranch) + 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.Left.Equal(&that1.Left) { + return false + } + if !this.Right.Equal(&that1.Right) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *AndBranch) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*AndBranch) + if !ok { + that2, ok := that.(AndBranch) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *AndBranch") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *AndBranch but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *AndBranch but is not nil && this == nil") + } + if !this.Left.Equal(&that1.Left) { + return fmt.Errorf("Left this(%v) Not Equal that(%v)", this.Left, that1.Left) + } + if !this.Right.Equal(&that1.Right) { + return fmt.Errorf("Right this(%v) Not Equal that(%v)", this.Right, that1.Right) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *AndBranch) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*AndBranch) + if !ok { + that2, ok := that.(AndBranch) + 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.Left.Equal(&that1.Left) { + return false + } + if !this.Right.Equal(&that1.Right) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *Leaf) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*Leaf) + if !ok { + that2, ok := that.(Leaf) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *Leaf") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *Leaf but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *Leaf 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.StrValue != that1.StrValue { + return fmt.Errorf("StrValue this(%v) Not Equal that(%v)", this.StrValue, that1.StrValue) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *Leaf) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*Leaf) + if !ok { + that2, ok := that.(Leaf) + 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.StrValue != that1.StrValue { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *DeepTree) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*DeepTree) + if !ok { + that2, ok := that.(DeepTree) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *DeepTree") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *DeepTree but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *DeepTree but is not nil && this == nil") + } + if !this.Down.Equal(that1.Down) { + return fmt.Errorf("Down this(%v) Not Equal that(%v)", this.Down, that1.Down) + } + if !this.And.Equal(that1.And) { + return fmt.Errorf("And this(%v) Not Equal that(%v)", this.And, that1.And) + } + if !this.Leaf.Equal(that1.Leaf) { + return fmt.Errorf("Leaf this(%v) Not Equal that(%v)", this.Leaf, that1.Leaf) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *DeepTree) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*DeepTree) + if !ok { + that2, ok := that.(DeepTree) + 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.Down.Equal(that1.Down) { + return false + } + if !this.And.Equal(that1.And) { + return false + } + if !this.Leaf.Equal(that1.Leaf) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *ADeepBranch) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*ADeepBranch) + if !ok { + that2, ok := that.(ADeepBranch) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *ADeepBranch") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *ADeepBranch but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *ADeepBranch but is not nil && this == nil") + } + if !this.Down.Equal(&that1.Down) { + return fmt.Errorf("Down this(%v) Not Equal that(%v)", this.Down, that1.Down) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *ADeepBranch) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*ADeepBranch) + if !ok { + that2, ok := that.(ADeepBranch) + 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.Down.Equal(&that1.Down) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *AndDeepBranch) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*AndDeepBranch) + if !ok { + that2, ok := that.(AndDeepBranch) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *AndDeepBranch") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *AndDeepBranch but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *AndDeepBranch but is not nil && this == nil") + } + if !this.Left.Equal(&that1.Left) { + return fmt.Errorf("Left this(%v) Not Equal that(%v)", this.Left, that1.Left) + } + if !this.Right.Equal(&that1.Right) { + return fmt.Errorf("Right this(%v) Not Equal that(%v)", this.Right, that1.Right) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *AndDeepBranch) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*AndDeepBranch) + if !ok { + that2, ok := that.(AndDeepBranch) + 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.Left.Equal(&that1.Left) { + return false + } + if !this.Right.Equal(&that1.Right) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *DeepLeaf) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*DeepLeaf) + if !ok { + that2, ok := that.(DeepLeaf) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *DeepLeaf") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *DeepLeaf but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *DeepLeaf but is not nil && this == nil") + } + if !this.Tree.Equal(&that1.Tree) { + return fmt.Errorf("Tree this(%v) Not Equal that(%v)", this.Tree, that1.Tree) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *DeepLeaf) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*DeepLeaf) + if !ok { + that2, ok := that.(DeepLeaf) + 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.Tree.Equal(&that1.Tree) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *Nil) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*Nil) + if !ok { + that2, ok := that.(Nil) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *Nil") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *Nil but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *Nil but is not nil && this == nil") + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *Nil) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*Nil) + if !ok { + that2, ok := that.(Nil) + 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.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NidOptEnum) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NidOptEnum) + if !ok { + that2, ok := that.(NidOptEnum) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NidOptEnum") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NidOptEnum but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NidOptEnum but is not nil && this == nil") + } + if this.Field1 != that1.Field1 { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NidOptEnum) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*NidOptEnum) + if !ok { + that2, ok := that.(NidOptEnum) + 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.Field1 != that1.Field1 { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NinOptEnum) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NinOptEnum) + if !ok { + that2, ok := that.(NinOptEnum) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NinOptEnum") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NinOptEnum but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NinOptEnum but is not nil && this == nil") + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) + } + } else if this.Field1 != nil { + return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") + } else if that1.Field1 != nil { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", *this.Field2, *that1.Field2) + } + } else if this.Field2 != nil { + return fmt.Errorf("this.Field2 == nil && that.Field2 != nil") + } else if that1.Field2 != nil { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) + } + if this.Field3 != nil && that1.Field3 != nil { + if *this.Field3 != *that1.Field3 { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", *this.Field3, *that1.Field3) + } + } else if this.Field3 != nil { + return fmt.Errorf("this.Field3 == nil && that.Field3 != nil") + } else if that1.Field3 != nil { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", this.Field3, that1.Field3) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NinOptEnum) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*NinOptEnum) + if !ok { + that2, ok := that.(NinOptEnum) + 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.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return false + } + } else if this.Field1 != nil { + return false + } else if that1.Field1 != nil { + return false + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + return false + } + } else if this.Field2 != nil { + return false + } else if that1.Field2 != nil { + return false + } + if this.Field3 != nil && that1.Field3 != nil { + if *this.Field3 != *that1.Field3 { + return false + } + } else if this.Field3 != nil { + return false + } else if that1.Field3 != nil { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NidRepEnum) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NidRepEnum) + if !ok { + that2, ok := that.(NidRepEnum) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NidRepEnum") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NidRepEnum but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NidRepEnum but is not nil && this == nil") + } + if len(this.Field1) != len(that1.Field1) { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", len(this.Field1), len(that1.Field1)) + } + for i := range this.Field1 { + if this.Field1[i] != that1.Field1[i] { + return fmt.Errorf("Field1 this[%v](%v) Not Equal that[%v](%v)", i, this.Field1[i], i, that1.Field1[i]) + } + } + if len(this.Field2) != len(that1.Field2) { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", len(this.Field2), len(that1.Field2)) + } + for i := range this.Field2 { + if this.Field2[i] != that1.Field2[i] { + return fmt.Errorf("Field2 this[%v](%v) Not Equal that[%v](%v)", i, this.Field2[i], i, that1.Field2[i]) + } + } + if len(this.Field3) != len(that1.Field3) { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", len(this.Field3), len(that1.Field3)) + } + for i := range this.Field3 { + if this.Field3[i] != that1.Field3[i] { + return fmt.Errorf("Field3 this[%v](%v) Not Equal that[%v](%v)", i, this.Field3[i], i, that1.Field3[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NidRepEnum) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*NidRepEnum) + if !ok { + that2, ok := that.(NidRepEnum) + 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.Field1) != len(that1.Field1) { + return false + } + for i := range this.Field1 { + if this.Field1[i] != that1.Field1[i] { + return false + } + } + if len(this.Field2) != len(that1.Field2) { + return false + } + for i := range this.Field2 { + if this.Field2[i] != that1.Field2[i] { + return false + } + } + if len(this.Field3) != len(that1.Field3) { + return false + } + for i := range this.Field3 { + if this.Field3[i] != that1.Field3[i] { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NinRepEnum) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NinRepEnum) + if !ok { + that2, ok := that.(NinRepEnum) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NinRepEnum") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NinRepEnum but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NinRepEnum but is not nil && this == nil") + } + if len(this.Field1) != len(that1.Field1) { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", len(this.Field1), len(that1.Field1)) + } + for i := range this.Field1 { + if this.Field1[i] != that1.Field1[i] { + return fmt.Errorf("Field1 this[%v](%v) Not Equal that[%v](%v)", i, this.Field1[i], i, that1.Field1[i]) + } + } + if len(this.Field2) != len(that1.Field2) { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", len(this.Field2), len(that1.Field2)) + } + for i := range this.Field2 { + if this.Field2[i] != that1.Field2[i] { + return fmt.Errorf("Field2 this[%v](%v) Not Equal that[%v](%v)", i, this.Field2[i], i, that1.Field2[i]) + } + } + if len(this.Field3) != len(that1.Field3) { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", len(this.Field3), len(that1.Field3)) + } + for i := range this.Field3 { + if this.Field3[i] != that1.Field3[i] { + return fmt.Errorf("Field3 this[%v](%v) Not Equal that[%v](%v)", i, this.Field3[i], i, that1.Field3[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NinRepEnum) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*NinRepEnum) + if !ok { + that2, ok := that.(NinRepEnum) + 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.Field1) != len(that1.Field1) { + return false + } + for i := range this.Field1 { + if this.Field1[i] != that1.Field1[i] { + return false + } + } + if len(this.Field2) != len(that1.Field2) { + return false + } + for i := range this.Field2 { + if this.Field2[i] != that1.Field2[i] { + return false + } + } + if len(this.Field3) != len(that1.Field3) { + return false + } + for i := range this.Field3 { + if this.Field3[i] != that1.Field3[i] { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NinOptEnumDefault) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NinOptEnumDefault) + if !ok { + that2, ok := that.(NinOptEnumDefault) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NinOptEnumDefault") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NinOptEnumDefault but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NinOptEnumDefault but is not nil && this == nil") + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) + } + } else if this.Field1 != nil { + return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") + } else if that1.Field1 != nil { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", *this.Field2, *that1.Field2) + } + } else if this.Field2 != nil { + return fmt.Errorf("this.Field2 == nil && that.Field2 != nil") + } else if that1.Field2 != nil { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) + } + if this.Field3 != nil && that1.Field3 != nil { + if *this.Field3 != *that1.Field3 { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", *this.Field3, *that1.Field3) + } + } else if this.Field3 != nil { + return fmt.Errorf("this.Field3 == nil && that.Field3 != nil") + } else if that1.Field3 != nil { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", this.Field3, that1.Field3) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NinOptEnumDefault) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*NinOptEnumDefault) + if !ok { + that2, ok := that.(NinOptEnumDefault) + 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.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return false + } + } else if this.Field1 != nil { + return false + } else if that1.Field1 != nil { + return false + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + return false + } + } else if this.Field2 != nil { + return false + } else if that1.Field2 != nil { + return false + } + if this.Field3 != nil && that1.Field3 != nil { + if *this.Field3 != *that1.Field3 { + return false + } + } else if this.Field3 != nil { + return false + } else if that1.Field3 != nil { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *AnotherNinOptEnum) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*AnotherNinOptEnum) + if !ok { + that2, ok := that.(AnotherNinOptEnum) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *AnotherNinOptEnum") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *AnotherNinOptEnum but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *AnotherNinOptEnum but is not nil && this == nil") + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) + } + } else if this.Field1 != nil { + return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") + } else if that1.Field1 != nil { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", *this.Field2, *that1.Field2) + } + } else if this.Field2 != nil { + return fmt.Errorf("this.Field2 == nil && that.Field2 != nil") + } else if that1.Field2 != nil { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) + } + if this.Field3 != nil && that1.Field3 != nil { + if *this.Field3 != *that1.Field3 { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", *this.Field3, *that1.Field3) + } + } else if this.Field3 != nil { + return fmt.Errorf("this.Field3 == nil && that.Field3 != nil") + } else if that1.Field3 != nil { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", this.Field3, that1.Field3) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *AnotherNinOptEnum) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*AnotherNinOptEnum) + if !ok { + that2, ok := that.(AnotherNinOptEnum) + 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.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return false + } + } else if this.Field1 != nil { + return false + } else if that1.Field1 != nil { + return false + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + return false + } + } else if this.Field2 != nil { + return false + } else if that1.Field2 != nil { + return false + } + if this.Field3 != nil && that1.Field3 != nil { + if *this.Field3 != *that1.Field3 { + return false + } + } else if this.Field3 != nil { + return false + } else if that1.Field3 != nil { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *AnotherNinOptEnumDefault) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*AnotherNinOptEnumDefault) + if !ok { + that2, ok := that.(AnotherNinOptEnumDefault) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *AnotherNinOptEnumDefault") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *AnotherNinOptEnumDefault but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *AnotherNinOptEnumDefault but is not nil && this == nil") + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) + } + } else if this.Field1 != nil { + return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") + } else if that1.Field1 != nil { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", *this.Field2, *that1.Field2) + } + } else if this.Field2 != nil { + return fmt.Errorf("this.Field2 == nil && that.Field2 != nil") + } else if that1.Field2 != nil { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) + } + if this.Field3 != nil && that1.Field3 != nil { + if *this.Field3 != *that1.Field3 { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", *this.Field3, *that1.Field3) + } + } else if this.Field3 != nil { + return fmt.Errorf("this.Field3 == nil && that.Field3 != nil") + } else if that1.Field3 != nil { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", this.Field3, that1.Field3) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *AnotherNinOptEnumDefault) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*AnotherNinOptEnumDefault) + if !ok { + that2, ok := that.(AnotherNinOptEnumDefault) + 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.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return false + } + } else if this.Field1 != nil { + return false + } else if that1.Field1 != nil { + return false + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + return false + } + } else if this.Field2 != nil { + return false + } else if that1.Field2 != nil { + return false + } + if this.Field3 != nil && that1.Field3 != nil { + if *this.Field3 != *that1.Field3 { + return false + } + } else if this.Field3 != nil { + return false + } else if that1.Field3 != nil { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *Timer) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*Timer) + if !ok { + that2, ok := that.(Timer) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *Timer") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *Timer but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *Timer but is not nil && this == nil") + } + if this.Time1 != that1.Time1 { + return fmt.Errorf("Time1 this(%v) Not Equal that(%v)", this.Time1, that1.Time1) + } + if this.Time2 != that1.Time2 { + return fmt.Errorf("Time2 this(%v) Not Equal that(%v)", this.Time2, that1.Time2) + } + if !bytes.Equal(this.Data, that1.Data) { + return fmt.Errorf("Data this(%v) Not Equal that(%v)", this.Data, that1.Data) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *Timer) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*Timer) + if !ok { + that2, ok := that.(Timer) + 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.Time1 != that1.Time1 { + return false + } + if this.Time2 != that1.Time2 { + return false + } + if !bytes.Equal(this.Data, that1.Data) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *MyExtendable) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*MyExtendable) + if !ok { + that2, ok := that.(MyExtendable) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *MyExtendable") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *MyExtendable but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *MyExtendable but is not nil && this == nil") + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) + } + } else if this.Field1 != nil { + return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") + } else if that1.Field1 != nil { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) + } + for k, v := range this.XXX_extensions { + if v2, ok := that1.XXX_extensions[k]; ok { + if !v.Equal(&v2) { + return fmt.Errorf("XXX_extensions this[%v](%v) Not Equal that[%v](%v)", k, this.XXX_extensions[k], k, that1.XXX_extensions[k]) + } + } else { + return fmt.Errorf("XXX_extensions[%v] Not In that", k) + } + } + for k := range that1.XXX_extensions { + if _, ok := this.XXX_extensions[k]; !ok { + return fmt.Errorf("XXX_extensions[%v] Not In this", k) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *MyExtendable) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*MyExtendable) + if !ok { + that2, ok := that.(MyExtendable) + 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.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return false + } + } else if this.Field1 != nil { + return false + } else if that1.Field1 != nil { + return false + } + for k, v := range this.XXX_extensions { + if v2, ok := that1.XXX_extensions[k]; ok { + if !v.Equal(&v2) { + return false + } + } else { + return false + } + } + for k := range that1.XXX_extensions { + if _, ok := this.XXX_extensions[k]; !ok { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *OtherExtenable) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*OtherExtenable) + if !ok { + that2, ok := that.(OtherExtenable) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *OtherExtenable") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *OtherExtenable but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *OtherExtenable but is not nil && this == nil") + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", *this.Field2, *that1.Field2) + } + } else if this.Field2 != nil { + return fmt.Errorf("this.Field2 == nil && that.Field2 != nil") + } else if that1.Field2 != nil { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) + } + if this.Field13 != nil && that1.Field13 != nil { + if *this.Field13 != *that1.Field13 { + return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", *this.Field13, *that1.Field13) + } + } else if this.Field13 != nil { + return fmt.Errorf("this.Field13 == nil && that.Field13 != nil") + } else if that1.Field13 != nil { + return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", this.Field13, that1.Field13) + } + if !this.M.Equal(that1.M) { + return fmt.Errorf("M this(%v) Not Equal that(%v)", this.M, that1.M) + } + for k, v := range this.XXX_extensions { + if v2, ok := that1.XXX_extensions[k]; ok { + if !v.Equal(&v2) { + return fmt.Errorf("XXX_extensions this[%v](%v) Not Equal that[%v](%v)", k, this.XXX_extensions[k], k, that1.XXX_extensions[k]) + } + } else { + return fmt.Errorf("XXX_extensions[%v] Not In that", k) + } + } + for k := range that1.XXX_extensions { + if _, ok := this.XXX_extensions[k]; !ok { + return fmt.Errorf("XXX_extensions[%v] Not In this", k) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *OtherExtenable) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*OtherExtenable) + if !ok { + that2, ok := that.(OtherExtenable) + 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.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + return false + } + } else if this.Field2 != nil { + return false + } else if that1.Field2 != nil { + return false + } + if this.Field13 != nil && that1.Field13 != nil { + if *this.Field13 != *that1.Field13 { + return false + } + } else if this.Field13 != nil { + return false + } else if that1.Field13 != nil { + return false + } + if !this.M.Equal(that1.M) { + return false + } + for k, v := range this.XXX_extensions { + if v2, ok := that1.XXX_extensions[k]; ok { + if !v.Equal(&v2) { + return false + } + } else { + return false + } + } + for k := range that1.XXX_extensions { + if _, ok := this.XXX_extensions[k]; !ok { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NestedDefinition) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NestedDefinition) + if !ok { + that2, ok := that.(NestedDefinition) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NestedDefinition") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NestedDefinition but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NestedDefinition but is not nil && this == nil") + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) + } + } else if this.Field1 != nil { + return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") + } else if that1.Field1 != nil { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) + } + if this.EnumField != nil && that1.EnumField != nil { + if *this.EnumField != *that1.EnumField { + return fmt.Errorf("EnumField this(%v) Not Equal that(%v)", *this.EnumField, *that1.EnumField) + } + } else if this.EnumField != nil { + return fmt.Errorf("this.EnumField == nil && that.EnumField != nil") + } else if that1.EnumField != nil { + return fmt.Errorf("EnumField this(%v) Not Equal that(%v)", this.EnumField, that1.EnumField) + } + if !this.NNM.Equal(that1.NNM) { + return fmt.Errorf("NNM this(%v) Not Equal that(%v)", this.NNM, that1.NNM) + } + if !this.NM.Equal(that1.NM) { + return fmt.Errorf("NM this(%v) Not Equal that(%v)", this.NM, that1.NM) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NestedDefinition) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*NestedDefinition) + if !ok { + that2, ok := that.(NestedDefinition) + 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.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return false + } + } else if this.Field1 != nil { + return false + } else if that1.Field1 != nil { + return false + } + if this.EnumField != nil && that1.EnumField != nil { + if *this.EnumField != *that1.EnumField { + return false + } + } else if this.EnumField != nil { + return false + } else if that1.EnumField != nil { + return false + } + if !this.NNM.Equal(that1.NNM) { + return false + } + if !this.NM.Equal(that1.NM) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NestedDefinition_NestedMessage) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NestedDefinition_NestedMessage) + if !ok { + that2, ok := that.(NestedDefinition_NestedMessage) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NestedDefinition_NestedMessage") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NestedDefinition_NestedMessage but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NestedDefinition_NestedMessage but is not nil && this == nil") + } + if this.NestedField1 != nil && that1.NestedField1 != nil { + if *this.NestedField1 != *that1.NestedField1 { + return fmt.Errorf("NestedField1 this(%v) Not Equal that(%v)", *this.NestedField1, *that1.NestedField1) + } + } else if this.NestedField1 != nil { + return fmt.Errorf("this.NestedField1 == nil && that.NestedField1 != nil") + } else if that1.NestedField1 != nil { + return fmt.Errorf("NestedField1 this(%v) Not Equal that(%v)", this.NestedField1, that1.NestedField1) + } + if !this.NNM.Equal(that1.NNM) { + return fmt.Errorf("NNM this(%v) Not Equal that(%v)", this.NNM, that1.NNM) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NestedDefinition_NestedMessage) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*NestedDefinition_NestedMessage) + if !ok { + that2, ok := that.(NestedDefinition_NestedMessage) + 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.NestedField1 != nil && that1.NestedField1 != nil { + if *this.NestedField1 != *that1.NestedField1 { + return false + } + } else if this.NestedField1 != nil { + return false + } else if that1.NestedField1 != nil { + return false + } + if !this.NNM.Equal(that1.NNM) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NestedDefinition_NestedMessage_NestedNestedMsg) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NestedDefinition_NestedMessage_NestedNestedMsg) + if !ok { + that2, ok := that.(NestedDefinition_NestedMessage_NestedNestedMsg) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NestedDefinition_NestedMessage_NestedNestedMsg") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NestedDefinition_NestedMessage_NestedNestedMsg but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NestedDefinition_NestedMessage_NestedNestedMsg but is not nil && this == nil") + } + if this.NestedNestedField1 != nil && that1.NestedNestedField1 != nil { + if *this.NestedNestedField1 != *that1.NestedNestedField1 { + return fmt.Errorf("NestedNestedField1 this(%v) Not Equal that(%v)", *this.NestedNestedField1, *that1.NestedNestedField1) + } + } else if this.NestedNestedField1 != nil { + return fmt.Errorf("this.NestedNestedField1 == nil && that.NestedNestedField1 != nil") + } else if that1.NestedNestedField1 != nil { + return fmt.Errorf("NestedNestedField1 this(%v) Not Equal that(%v)", this.NestedNestedField1, that1.NestedNestedField1) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NestedDefinition_NestedMessage_NestedNestedMsg) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*NestedDefinition_NestedMessage_NestedNestedMsg) + if !ok { + that2, ok := that.(NestedDefinition_NestedMessage_NestedNestedMsg) + 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.NestedNestedField1 != nil && that1.NestedNestedField1 != nil { + if *this.NestedNestedField1 != *that1.NestedNestedField1 { + return false + } + } else if this.NestedNestedField1 != nil { + return false + } else if that1.NestedNestedField1 != nil { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NestedScope) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NestedScope) + if !ok { + that2, ok := that.(NestedScope) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NestedScope") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NestedScope but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NestedScope but is not nil && this == nil") + } + if !this.A.Equal(that1.A) { + return fmt.Errorf("A this(%v) Not Equal that(%v)", this.A, that1.A) + } + if this.B != nil && that1.B != nil { + if *this.B != *that1.B { + return fmt.Errorf("B this(%v) Not Equal that(%v)", *this.B, *that1.B) + } + } else if this.B != nil { + return fmt.Errorf("this.B == nil && that.B != nil") + } else if that1.B != nil { + return fmt.Errorf("B this(%v) Not Equal that(%v)", this.B, that1.B) + } + if !this.C.Equal(that1.C) { + return fmt.Errorf("C this(%v) Not Equal that(%v)", this.C, that1.C) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NestedScope) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*NestedScope) + if !ok { + that2, ok := that.(NestedScope) + 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.A.Equal(that1.A) { + return false + } + if this.B != nil && that1.B != nil { + if *this.B != *that1.B { + return false + } + } else if this.B != nil { + return false + } else if that1.B != nil { + return false + } + if !this.C.Equal(that1.C) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NinOptNativeDefault) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NinOptNativeDefault) + if !ok { + that2, ok := that.(NinOptNativeDefault) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NinOptNativeDefault") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NinOptNativeDefault but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NinOptNativeDefault but is not nil && this == nil") + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) + } + } else if this.Field1 != nil { + return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") + } else if that1.Field1 != nil { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", *this.Field2, *that1.Field2) + } + } else if this.Field2 != nil { + return fmt.Errorf("this.Field2 == nil && that.Field2 != nil") + } else if that1.Field2 != nil { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) + } + if this.Field3 != nil && that1.Field3 != nil { + if *this.Field3 != *that1.Field3 { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", *this.Field3, *that1.Field3) + } + } else if this.Field3 != nil { + return fmt.Errorf("this.Field3 == nil && that.Field3 != nil") + } else if that1.Field3 != nil { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", this.Field3, that1.Field3) + } + if this.Field4 != nil && that1.Field4 != nil { + if *this.Field4 != *that1.Field4 { + return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", *this.Field4, *that1.Field4) + } + } else if this.Field4 != nil { + return fmt.Errorf("this.Field4 == nil && that.Field4 != nil") + } else if that1.Field4 != nil { + return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", this.Field4, that1.Field4) + } + if this.Field5 != nil && that1.Field5 != nil { + if *this.Field5 != *that1.Field5 { + return fmt.Errorf("Field5 this(%v) Not Equal that(%v)", *this.Field5, *that1.Field5) + } + } else if this.Field5 != nil { + return fmt.Errorf("this.Field5 == nil && that.Field5 != nil") + } else if that1.Field5 != nil { + return fmt.Errorf("Field5 this(%v) Not Equal that(%v)", this.Field5, that1.Field5) + } + if this.Field6 != nil && that1.Field6 != nil { + if *this.Field6 != *that1.Field6 { + return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", *this.Field6, *that1.Field6) + } + } else if this.Field6 != nil { + return fmt.Errorf("this.Field6 == nil && that.Field6 != nil") + } else if that1.Field6 != nil { + return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", this.Field6, that1.Field6) + } + if this.Field7 != nil && that1.Field7 != nil { + if *this.Field7 != *that1.Field7 { + return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", *this.Field7, *that1.Field7) + } + } else if this.Field7 != nil { + return fmt.Errorf("this.Field7 == nil && that.Field7 != nil") + } else if that1.Field7 != nil { + return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", this.Field7, that1.Field7) + } + if this.Field8 != nil && that1.Field8 != nil { + if *this.Field8 != *that1.Field8 { + return fmt.Errorf("Field8 this(%v) Not Equal that(%v)", *this.Field8, *that1.Field8) + } + } else if this.Field8 != nil { + return fmt.Errorf("this.Field8 == nil && that.Field8 != nil") + } else if that1.Field8 != nil { + return fmt.Errorf("Field8 this(%v) Not Equal that(%v)", this.Field8, that1.Field8) + } + if this.Field9 != nil && that1.Field9 != nil { + if *this.Field9 != *that1.Field9 { + return fmt.Errorf("Field9 this(%v) Not Equal that(%v)", *this.Field9, *that1.Field9) + } + } else if this.Field9 != nil { + return fmt.Errorf("this.Field9 == nil && that.Field9 != nil") + } else if that1.Field9 != nil { + return fmt.Errorf("Field9 this(%v) Not Equal that(%v)", this.Field9, that1.Field9) + } + if this.Field10 != nil && that1.Field10 != nil { + if *this.Field10 != *that1.Field10 { + return fmt.Errorf("Field10 this(%v) Not Equal that(%v)", *this.Field10, *that1.Field10) + } + } else if this.Field10 != nil { + return fmt.Errorf("this.Field10 == nil && that.Field10 != nil") + } else if that1.Field10 != nil { + return fmt.Errorf("Field10 this(%v) Not Equal that(%v)", this.Field10, that1.Field10) + } + if this.Field11 != nil && that1.Field11 != nil { + if *this.Field11 != *that1.Field11 { + return fmt.Errorf("Field11 this(%v) Not Equal that(%v)", *this.Field11, *that1.Field11) + } + } else if this.Field11 != nil { + return fmt.Errorf("this.Field11 == nil && that.Field11 != nil") + } else if that1.Field11 != nil { + return fmt.Errorf("Field11 this(%v) Not Equal that(%v)", this.Field11, that1.Field11) + } + if this.Field12 != nil && that1.Field12 != nil { + if *this.Field12 != *that1.Field12 { + return fmt.Errorf("Field12 this(%v) Not Equal that(%v)", *this.Field12, *that1.Field12) + } + } else if this.Field12 != nil { + return fmt.Errorf("this.Field12 == nil && that.Field12 != nil") + } else if that1.Field12 != nil { + return fmt.Errorf("Field12 this(%v) Not Equal that(%v)", this.Field12, that1.Field12) + } + if this.Field13 != nil && that1.Field13 != nil { + if *this.Field13 != *that1.Field13 { + return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", *this.Field13, *that1.Field13) + } + } else if this.Field13 != nil { + return fmt.Errorf("this.Field13 == nil && that.Field13 != nil") + } else if that1.Field13 != nil { + return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", this.Field13, that1.Field13) + } + if this.Field14 != nil && that1.Field14 != nil { + if *this.Field14 != *that1.Field14 { + return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", *this.Field14, *that1.Field14) + } + } else if this.Field14 != nil { + return fmt.Errorf("this.Field14 == nil && that.Field14 != nil") + } else if that1.Field14 != nil { + return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", this.Field14, that1.Field14) + } + if !bytes.Equal(this.Field15, that1.Field15) { + return fmt.Errorf("Field15 this(%v) Not Equal that(%v)", this.Field15, that1.Field15) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NinOptNativeDefault) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*NinOptNativeDefault) + if !ok { + that2, ok := that.(NinOptNativeDefault) + 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.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return false + } + } else if this.Field1 != nil { + return false + } else if that1.Field1 != nil { + return false + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + return false + } + } else if this.Field2 != nil { + return false + } else if that1.Field2 != nil { + return false + } + if this.Field3 != nil && that1.Field3 != nil { + if *this.Field3 != *that1.Field3 { + return false + } + } else if this.Field3 != nil { + return false + } else if that1.Field3 != nil { + return false + } + if this.Field4 != nil && that1.Field4 != nil { + if *this.Field4 != *that1.Field4 { + return false + } + } else if this.Field4 != nil { + return false + } else if that1.Field4 != nil { + return false + } + if this.Field5 != nil && that1.Field5 != nil { + if *this.Field5 != *that1.Field5 { + return false + } + } else if this.Field5 != nil { + return false + } else if that1.Field5 != nil { + return false + } + if this.Field6 != nil && that1.Field6 != nil { + if *this.Field6 != *that1.Field6 { + return false + } + } else if this.Field6 != nil { + return false + } else if that1.Field6 != nil { + return false + } + if this.Field7 != nil && that1.Field7 != nil { + if *this.Field7 != *that1.Field7 { + return false + } + } else if this.Field7 != nil { + return false + } else if that1.Field7 != nil { + return false + } + if this.Field8 != nil && that1.Field8 != nil { + if *this.Field8 != *that1.Field8 { + return false + } + } else if this.Field8 != nil { + return false + } else if that1.Field8 != nil { + return false + } + if this.Field9 != nil && that1.Field9 != nil { + if *this.Field9 != *that1.Field9 { + return false + } + } else if this.Field9 != nil { + return false + } else if that1.Field9 != nil { + return false + } + if this.Field10 != nil && that1.Field10 != nil { + if *this.Field10 != *that1.Field10 { + return false + } + } else if this.Field10 != nil { + return false + } else if that1.Field10 != nil { + return false + } + if this.Field11 != nil && that1.Field11 != nil { + if *this.Field11 != *that1.Field11 { + return false + } + } else if this.Field11 != nil { + return false + } else if that1.Field11 != nil { + return false + } + if this.Field12 != nil && that1.Field12 != nil { + if *this.Field12 != *that1.Field12 { + return false + } + } else if this.Field12 != nil { + return false + } else if that1.Field12 != nil { + return false + } + if this.Field13 != nil && that1.Field13 != nil { + if *this.Field13 != *that1.Field13 { + return false + } + } else if this.Field13 != nil { + return false + } else if that1.Field13 != nil { + return false + } + if this.Field14 != nil && that1.Field14 != nil { + if *this.Field14 != *that1.Field14 { + return false + } + } else if this.Field14 != nil { + return false + } else if that1.Field14 != nil { + return false + } + if !bytes.Equal(this.Field15, that1.Field15) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *CustomContainer) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*CustomContainer) + if !ok { + that2, ok := that.(CustomContainer) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *CustomContainer") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *CustomContainer but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *CustomContainer but is not nil && this == nil") + } + if !this.CustomStruct.Equal(&that1.CustomStruct) { + return fmt.Errorf("CustomStruct this(%v) Not Equal that(%v)", this.CustomStruct, that1.CustomStruct) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *CustomContainer) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*CustomContainer) + if !ok { + that2, ok := that.(CustomContainer) + 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.CustomStruct.Equal(&that1.CustomStruct) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *CustomNameNidOptNative) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*CustomNameNidOptNative) + if !ok { + that2, ok := that.(CustomNameNidOptNative) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *CustomNameNidOptNative") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *CustomNameNidOptNative but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *CustomNameNidOptNative but is not nil && this == nil") + } + if this.FieldA != that1.FieldA { + return fmt.Errorf("FieldA this(%v) Not Equal that(%v)", this.FieldA, that1.FieldA) + } + if this.FieldB != that1.FieldB { + return fmt.Errorf("FieldB this(%v) Not Equal that(%v)", this.FieldB, that1.FieldB) + } + if this.FieldC != that1.FieldC { + return fmt.Errorf("FieldC this(%v) Not Equal that(%v)", this.FieldC, that1.FieldC) + } + if this.FieldD != that1.FieldD { + return fmt.Errorf("FieldD this(%v) Not Equal that(%v)", this.FieldD, that1.FieldD) + } + if this.FieldE != that1.FieldE { + return fmt.Errorf("FieldE this(%v) Not Equal that(%v)", this.FieldE, that1.FieldE) + } + if this.FieldF != that1.FieldF { + return fmt.Errorf("FieldF this(%v) Not Equal that(%v)", this.FieldF, that1.FieldF) + } + if this.FieldG != that1.FieldG { + return fmt.Errorf("FieldG this(%v) Not Equal that(%v)", this.FieldG, that1.FieldG) + } + if this.FieldH != that1.FieldH { + return fmt.Errorf("FieldH this(%v) Not Equal that(%v)", this.FieldH, that1.FieldH) + } + if this.FieldI != that1.FieldI { + return fmt.Errorf("FieldI this(%v) Not Equal that(%v)", this.FieldI, that1.FieldI) + } + if this.FieldJ != that1.FieldJ { + return fmt.Errorf("FieldJ this(%v) Not Equal that(%v)", this.FieldJ, that1.FieldJ) + } + if this.FieldK != that1.FieldK { + return fmt.Errorf("FieldK this(%v) Not Equal that(%v)", this.FieldK, that1.FieldK) + } + if this.FieldL != that1.FieldL { + return fmt.Errorf("FieldL this(%v) Not Equal that(%v)", this.FieldL, that1.FieldL) + } + if this.FieldM != that1.FieldM { + return fmt.Errorf("FieldM this(%v) Not Equal that(%v)", this.FieldM, that1.FieldM) + } + if this.FieldN != that1.FieldN { + return fmt.Errorf("FieldN this(%v) Not Equal that(%v)", this.FieldN, that1.FieldN) + } + if !bytes.Equal(this.FieldO, that1.FieldO) { + return fmt.Errorf("FieldO this(%v) Not Equal that(%v)", this.FieldO, that1.FieldO) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *CustomNameNidOptNative) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*CustomNameNidOptNative) + if !ok { + that2, ok := that.(CustomNameNidOptNative) + 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.FieldA != that1.FieldA { + return false + } + if this.FieldB != that1.FieldB { + return false + } + if this.FieldC != that1.FieldC { + return false + } + if this.FieldD != that1.FieldD { + return false + } + if this.FieldE != that1.FieldE { + return false + } + if this.FieldF != that1.FieldF { + return false + } + if this.FieldG != that1.FieldG { + return false + } + if this.FieldH != that1.FieldH { + return false + } + if this.FieldI != that1.FieldI { + return false + } + if this.FieldJ != that1.FieldJ { + return false + } + if this.FieldK != that1.FieldK { + return false + } + if this.FieldL != that1.FieldL { + return false + } + if this.FieldM != that1.FieldM { + return false + } + if this.FieldN != that1.FieldN { + return false + } + if !bytes.Equal(this.FieldO, that1.FieldO) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *CustomNameNinOptNative) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*CustomNameNinOptNative) + if !ok { + that2, ok := that.(CustomNameNinOptNative) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *CustomNameNinOptNative") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *CustomNameNinOptNative but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *CustomNameNinOptNative but is not nil && this == nil") + } + if this.FieldA != nil && that1.FieldA != nil { + if *this.FieldA != *that1.FieldA { + return fmt.Errorf("FieldA this(%v) Not Equal that(%v)", *this.FieldA, *that1.FieldA) + } + } else if this.FieldA != nil { + return fmt.Errorf("this.FieldA == nil && that.FieldA != nil") + } else if that1.FieldA != nil { + return fmt.Errorf("FieldA this(%v) Not Equal that(%v)", this.FieldA, that1.FieldA) + } + if this.FieldB != nil && that1.FieldB != nil { + if *this.FieldB != *that1.FieldB { + return fmt.Errorf("FieldB this(%v) Not Equal that(%v)", *this.FieldB, *that1.FieldB) + } + } else if this.FieldB != nil { + return fmt.Errorf("this.FieldB == nil && that.FieldB != nil") + } else if that1.FieldB != nil { + return fmt.Errorf("FieldB this(%v) Not Equal that(%v)", this.FieldB, that1.FieldB) + } + if this.FieldC != nil && that1.FieldC != nil { + if *this.FieldC != *that1.FieldC { + return fmt.Errorf("FieldC this(%v) Not Equal that(%v)", *this.FieldC, *that1.FieldC) + } + } else if this.FieldC != nil { + return fmt.Errorf("this.FieldC == nil && that.FieldC != nil") + } else if that1.FieldC != nil { + return fmt.Errorf("FieldC this(%v) Not Equal that(%v)", this.FieldC, that1.FieldC) + } + if this.FieldD != nil && that1.FieldD != nil { + if *this.FieldD != *that1.FieldD { + return fmt.Errorf("FieldD this(%v) Not Equal that(%v)", *this.FieldD, *that1.FieldD) + } + } else if this.FieldD != nil { + return fmt.Errorf("this.FieldD == nil && that.FieldD != nil") + } else if that1.FieldD != nil { + return fmt.Errorf("FieldD this(%v) Not Equal that(%v)", this.FieldD, that1.FieldD) + } + if this.FieldE != nil && that1.FieldE != nil { + if *this.FieldE != *that1.FieldE { + return fmt.Errorf("FieldE this(%v) Not Equal that(%v)", *this.FieldE, *that1.FieldE) + } + } else if this.FieldE != nil { + return fmt.Errorf("this.FieldE == nil && that.FieldE != nil") + } else if that1.FieldE != nil { + return fmt.Errorf("FieldE this(%v) Not Equal that(%v)", this.FieldE, that1.FieldE) + } + if this.FieldF != nil && that1.FieldF != nil { + if *this.FieldF != *that1.FieldF { + return fmt.Errorf("FieldF this(%v) Not Equal that(%v)", *this.FieldF, *that1.FieldF) + } + } else if this.FieldF != nil { + return fmt.Errorf("this.FieldF == nil && that.FieldF != nil") + } else if that1.FieldF != nil { + return fmt.Errorf("FieldF this(%v) Not Equal that(%v)", this.FieldF, that1.FieldF) + } + if this.FieldG != nil && that1.FieldG != nil { + if *this.FieldG != *that1.FieldG { + return fmt.Errorf("FieldG this(%v) Not Equal that(%v)", *this.FieldG, *that1.FieldG) + } + } else if this.FieldG != nil { + return fmt.Errorf("this.FieldG == nil && that.FieldG != nil") + } else if that1.FieldG != nil { + return fmt.Errorf("FieldG this(%v) Not Equal that(%v)", this.FieldG, that1.FieldG) + } + if this.FieldH != nil && that1.FieldH != nil { + if *this.FieldH != *that1.FieldH { + return fmt.Errorf("FieldH this(%v) Not Equal that(%v)", *this.FieldH, *that1.FieldH) + } + } else if this.FieldH != nil { + return fmt.Errorf("this.FieldH == nil && that.FieldH != nil") + } else if that1.FieldH != nil { + return fmt.Errorf("FieldH this(%v) Not Equal that(%v)", this.FieldH, that1.FieldH) + } + if this.FieldI != nil && that1.FieldI != nil { + if *this.FieldI != *that1.FieldI { + return fmt.Errorf("FieldI this(%v) Not Equal that(%v)", *this.FieldI, *that1.FieldI) + } + } else if this.FieldI != nil { + return fmt.Errorf("this.FieldI == nil && that.FieldI != nil") + } else if that1.FieldI != nil { + return fmt.Errorf("FieldI this(%v) Not Equal that(%v)", this.FieldI, that1.FieldI) + } + if this.FieldJ != nil && that1.FieldJ != nil { + if *this.FieldJ != *that1.FieldJ { + return fmt.Errorf("FieldJ this(%v) Not Equal that(%v)", *this.FieldJ, *that1.FieldJ) + } + } else if this.FieldJ != nil { + return fmt.Errorf("this.FieldJ == nil && that.FieldJ != nil") + } else if that1.FieldJ != nil { + return fmt.Errorf("FieldJ this(%v) Not Equal that(%v)", this.FieldJ, that1.FieldJ) + } + if this.FieldK != nil && that1.FieldK != nil { + if *this.FieldK != *that1.FieldK { + return fmt.Errorf("FieldK this(%v) Not Equal that(%v)", *this.FieldK, *that1.FieldK) + } + } else if this.FieldK != nil { + return fmt.Errorf("this.FieldK == nil && that.FieldK != nil") + } else if that1.FieldK != nil { + return fmt.Errorf("FieldK this(%v) Not Equal that(%v)", this.FieldK, that1.FieldK) + } + if this.FielL != nil && that1.FielL != nil { + if *this.FielL != *that1.FielL { + return fmt.Errorf("FielL this(%v) Not Equal that(%v)", *this.FielL, *that1.FielL) + } + } else if this.FielL != nil { + return fmt.Errorf("this.FielL == nil && that.FielL != nil") + } else if that1.FielL != nil { + return fmt.Errorf("FielL this(%v) Not Equal that(%v)", this.FielL, that1.FielL) + } + if this.FieldM != nil && that1.FieldM != nil { + if *this.FieldM != *that1.FieldM { + return fmt.Errorf("FieldM this(%v) Not Equal that(%v)", *this.FieldM, *that1.FieldM) + } + } else if this.FieldM != nil { + return fmt.Errorf("this.FieldM == nil && that.FieldM != nil") + } else if that1.FieldM != nil { + return fmt.Errorf("FieldM this(%v) Not Equal that(%v)", this.FieldM, that1.FieldM) + } + if this.FieldN != nil && that1.FieldN != nil { + if *this.FieldN != *that1.FieldN { + return fmt.Errorf("FieldN this(%v) Not Equal that(%v)", *this.FieldN, *that1.FieldN) + } + } else if this.FieldN != nil { + return fmt.Errorf("this.FieldN == nil && that.FieldN != nil") + } else if that1.FieldN != nil { + return fmt.Errorf("FieldN this(%v) Not Equal that(%v)", this.FieldN, that1.FieldN) + } + if !bytes.Equal(this.FieldO, that1.FieldO) { + return fmt.Errorf("FieldO this(%v) Not Equal that(%v)", this.FieldO, that1.FieldO) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *CustomNameNinOptNative) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*CustomNameNinOptNative) + if !ok { + that2, ok := that.(CustomNameNinOptNative) + 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.FieldA != nil && that1.FieldA != nil { + if *this.FieldA != *that1.FieldA { + return false + } + } else if this.FieldA != nil { + return false + } else if that1.FieldA != nil { + return false + } + if this.FieldB != nil && that1.FieldB != nil { + if *this.FieldB != *that1.FieldB { + return false + } + } else if this.FieldB != nil { + return false + } else if that1.FieldB != nil { + return false + } + if this.FieldC != nil && that1.FieldC != nil { + if *this.FieldC != *that1.FieldC { + return false + } + } else if this.FieldC != nil { + return false + } else if that1.FieldC != nil { + return false + } + if this.FieldD != nil && that1.FieldD != nil { + if *this.FieldD != *that1.FieldD { + return false + } + } else if this.FieldD != nil { + return false + } else if that1.FieldD != nil { + return false + } + if this.FieldE != nil && that1.FieldE != nil { + if *this.FieldE != *that1.FieldE { + return false + } + } else if this.FieldE != nil { + return false + } else if that1.FieldE != nil { + return false + } + if this.FieldF != nil && that1.FieldF != nil { + if *this.FieldF != *that1.FieldF { + return false + } + } else if this.FieldF != nil { + return false + } else if that1.FieldF != nil { + return false + } + if this.FieldG != nil && that1.FieldG != nil { + if *this.FieldG != *that1.FieldG { + return false + } + } else if this.FieldG != nil { + return false + } else if that1.FieldG != nil { + return false + } + if this.FieldH != nil && that1.FieldH != nil { + if *this.FieldH != *that1.FieldH { + return false + } + } else if this.FieldH != nil { + return false + } else if that1.FieldH != nil { + return false + } + if this.FieldI != nil && that1.FieldI != nil { + if *this.FieldI != *that1.FieldI { + return false + } + } else if this.FieldI != nil { + return false + } else if that1.FieldI != nil { + return false + } + if this.FieldJ != nil && that1.FieldJ != nil { + if *this.FieldJ != *that1.FieldJ { + return false + } + } else if this.FieldJ != nil { + return false + } else if that1.FieldJ != nil { + return false + } + if this.FieldK != nil && that1.FieldK != nil { + if *this.FieldK != *that1.FieldK { + return false + } + } else if this.FieldK != nil { + return false + } else if that1.FieldK != nil { + return false + } + if this.FielL != nil && that1.FielL != nil { + if *this.FielL != *that1.FielL { + return false + } + } else if this.FielL != nil { + return false + } else if that1.FielL != nil { + return false + } + if this.FieldM != nil && that1.FieldM != nil { + if *this.FieldM != *that1.FieldM { + return false + } + } else if this.FieldM != nil { + return false + } else if that1.FieldM != nil { + return false + } + if this.FieldN != nil && that1.FieldN != nil { + if *this.FieldN != *that1.FieldN { + return false + } + } else if this.FieldN != nil { + return false + } else if that1.FieldN != nil { + return false + } + if !bytes.Equal(this.FieldO, that1.FieldO) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *CustomNameNinRepNative) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*CustomNameNinRepNative) + if !ok { + that2, ok := that.(CustomNameNinRepNative) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *CustomNameNinRepNative") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *CustomNameNinRepNative but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *CustomNameNinRepNative but is not nil && this == nil") + } + if len(this.FieldA) != len(that1.FieldA) { + return fmt.Errorf("FieldA this(%v) Not Equal that(%v)", len(this.FieldA), len(that1.FieldA)) + } + for i := range this.FieldA { + if this.FieldA[i] != that1.FieldA[i] { + return fmt.Errorf("FieldA this[%v](%v) Not Equal that[%v](%v)", i, this.FieldA[i], i, that1.FieldA[i]) + } + } + if len(this.FieldB) != len(that1.FieldB) { + return fmt.Errorf("FieldB this(%v) Not Equal that(%v)", len(this.FieldB), len(that1.FieldB)) + } + for i := range this.FieldB { + if this.FieldB[i] != that1.FieldB[i] { + return fmt.Errorf("FieldB this[%v](%v) Not Equal that[%v](%v)", i, this.FieldB[i], i, that1.FieldB[i]) + } + } + if len(this.FieldC) != len(that1.FieldC) { + return fmt.Errorf("FieldC this(%v) Not Equal that(%v)", len(this.FieldC), len(that1.FieldC)) + } + for i := range this.FieldC { + if this.FieldC[i] != that1.FieldC[i] { + return fmt.Errorf("FieldC this[%v](%v) Not Equal that[%v](%v)", i, this.FieldC[i], i, that1.FieldC[i]) + } + } + if len(this.FieldD) != len(that1.FieldD) { + return fmt.Errorf("FieldD this(%v) Not Equal that(%v)", len(this.FieldD), len(that1.FieldD)) + } + for i := range this.FieldD { + if this.FieldD[i] != that1.FieldD[i] { + return fmt.Errorf("FieldD this[%v](%v) Not Equal that[%v](%v)", i, this.FieldD[i], i, that1.FieldD[i]) + } + } + if len(this.FieldE) != len(that1.FieldE) { + return fmt.Errorf("FieldE this(%v) Not Equal that(%v)", len(this.FieldE), len(that1.FieldE)) + } + for i := range this.FieldE { + if this.FieldE[i] != that1.FieldE[i] { + return fmt.Errorf("FieldE this[%v](%v) Not Equal that[%v](%v)", i, this.FieldE[i], i, that1.FieldE[i]) + } + } + if len(this.FieldF) != len(that1.FieldF) { + return fmt.Errorf("FieldF this(%v) Not Equal that(%v)", len(this.FieldF), len(that1.FieldF)) + } + for i := range this.FieldF { + if this.FieldF[i] != that1.FieldF[i] { + return fmt.Errorf("FieldF this[%v](%v) Not Equal that[%v](%v)", i, this.FieldF[i], i, that1.FieldF[i]) + } + } + if len(this.FieldG) != len(that1.FieldG) { + return fmt.Errorf("FieldG this(%v) Not Equal that(%v)", len(this.FieldG), len(that1.FieldG)) + } + for i := range this.FieldG { + if this.FieldG[i] != that1.FieldG[i] { + return fmt.Errorf("FieldG this[%v](%v) Not Equal that[%v](%v)", i, this.FieldG[i], i, that1.FieldG[i]) + } + } + if len(this.FieldH) != len(that1.FieldH) { + return fmt.Errorf("FieldH this(%v) Not Equal that(%v)", len(this.FieldH), len(that1.FieldH)) + } + for i := range this.FieldH { + if this.FieldH[i] != that1.FieldH[i] { + return fmt.Errorf("FieldH this[%v](%v) Not Equal that[%v](%v)", i, this.FieldH[i], i, that1.FieldH[i]) + } + } + if len(this.FieldI) != len(that1.FieldI) { + return fmt.Errorf("FieldI this(%v) Not Equal that(%v)", len(this.FieldI), len(that1.FieldI)) + } + for i := range this.FieldI { + if this.FieldI[i] != that1.FieldI[i] { + return fmt.Errorf("FieldI this[%v](%v) Not Equal that[%v](%v)", i, this.FieldI[i], i, that1.FieldI[i]) + } + } + if len(this.FieldJ) != len(that1.FieldJ) { + return fmt.Errorf("FieldJ this(%v) Not Equal that(%v)", len(this.FieldJ), len(that1.FieldJ)) + } + for i := range this.FieldJ { + if this.FieldJ[i] != that1.FieldJ[i] { + return fmt.Errorf("FieldJ this[%v](%v) Not Equal that[%v](%v)", i, this.FieldJ[i], i, that1.FieldJ[i]) + } + } + if len(this.FieldK) != len(that1.FieldK) { + return fmt.Errorf("FieldK this(%v) Not Equal that(%v)", len(this.FieldK), len(that1.FieldK)) + } + for i := range this.FieldK { + if this.FieldK[i] != that1.FieldK[i] { + return fmt.Errorf("FieldK this[%v](%v) Not Equal that[%v](%v)", i, this.FieldK[i], i, that1.FieldK[i]) + } + } + if len(this.FieldL) != len(that1.FieldL) { + return fmt.Errorf("FieldL this(%v) Not Equal that(%v)", len(this.FieldL), len(that1.FieldL)) + } + for i := range this.FieldL { + if this.FieldL[i] != that1.FieldL[i] { + return fmt.Errorf("FieldL this[%v](%v) Not Equal that[%v](%v)", i, this.FieldL[i], i, that1.FieldL[i]) + } + } + if len(this.FieldM) != len(that1.FieldM) { + return fmt.Errorf("FieldM this(%v) Not Equal that(%v)", len(this.FieldM), len(that1.FieldM)) + } + for i := range this.FieldM { + if this.FieldM[i] != that1.FieldM[i] { + return fmt.Errorf("FieldM this[%v](%v) Not Equal that[%v](%v)", i, this.FieldM[i], i, that1.FieldM[i]) + } + } + if len(this.FieldN) != len(that1.FieldN) { + return fmt.Errorf("FieldN this(%v) Not Equal that(%v)", len(this.FieldN), len(that1.FieldN)) + } + for i := range this.FieldN { + if this.FieldN[i] != that1.FieldN[i] { + return fmt.Errorf("FieldN this[%v](%v) Not Equal that[%v](%v)", i, this.FieldN[i], i, that1.FieldN[i]) + } + } + if len(this.FieldO) != len(that1.FieldO) { + return fmt.Errorf("FieldO this(%v) Not Equal that(%v)", len(this.FieldO), len(that1.FieldO)) + } + for i := range this.FieldO { + if !bytes.Equal(this.FieldO[i], that1.FieldO[i]) { + return fmt.Errorf("FieldO this[%v](%v) Not Equal that[%v](%v)", i, this.FieldO[i], i, that1.FieldO[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *CustomNameNinRepNative) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*CustomNameNinRepNative) + if !ok { + that2, ok := that.(CustomNameNinRepNative) + 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.FieldA) != len(that1.FieldA) { + return false + } + for i := range this.FieldA { + if this.FieldA[i] != that1.FieldA[i] { + return false + } + } + if len(this.FieldB) != len(that1.FieldB) { + return false + } + for i := range this.FieldB { + if this.FieldB[i] != that1.FieldB[i] { + return false + } + } + if len(this.FieldC) != len(that1.FieldC) { + return false + } + for i := range this.FieldC { + if this.FieldC[i] != that1.FieldC[i] { + return false + } + } + if len(this.FieldD) != len(that1.FieldD) { + return false + } + for i := range this.FieldD { + if this.FieldD[i] != that1.FieldD[i] { + return false + } + } + if len(this.FieldE) != len(that1.FieldE) { + return false + } + for i := range this.FieldE { + if this.FieldE[i] != that1.FieldE[i] { + return false + } + } + if len(this.FieldF) != len(that1.FieldF) { + return false + } + for i := range this.FieldF { + if this.FieldF[i] != that1.FieldF[i] { + return false + } + } + if len(this.FieldG) != len(that1.FieldG) { + return false + } + for i := range this.FieldG { + if this.FieldG[i] != that1.FieldG[i] { + return false + } + } + if len(this.FieldH) != len(that1.FieldH) { + return false + } + for i := range this.FieldH { + if this.FieldH[i] != that1.FieldH[i] { + return false + } + } + if len(this.FieldI) != len(that1.FieldI) { + return false + } + for i := range this.FieldI { + if this.FieldI[i] != that1.FieldI[i] { + return false + } + } + if len(this.FieldJ) != len(that1.FieldJ) { + return false + } + for i := range this.FieldJ { + if this.FieldJ[i] != that1.FieldJ[i] { + return false + } + } + if len(this.FieldK) != len(that1.FieldK) { + return false + } + for i := range this.FieldK { + if this.FieldK[i] != that1.FieldK[i] { + return false + } + } + if len(this.FieldL) != len(that1.FieldL) { + return false + } + for i := range this.FieldL { + if this.FieldL[i] != that1.FieldL[i] { + return false + } + } + if len(this.FieldM) != len(that1.FieldM) { + return false + } + for i := range this.FieldM { + if this.FieldM[i] != that1.FieldM[i] { + return false + } + } + if len(this.FieldN) != len(that1.FieldN) { + return false + } + for i := range this.FieldN { + if this.FieldN[i] != that1.FieldN[i] { + return false + } + } + if len(this.FieldO) != len(that1.FieldO) { + return false + } + for i := range this.FieldO { + if !bytes.Equal(this.FieldO[i], that1.FieldO[i]) { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *CustomNameNinStruct) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*CustomNameNinStruct) + if !ok { + that2, ok := that.(CustomNameNinStruct) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *CustomNameNinStruct") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *CustomNameNinStruct but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *CustomNameNinStruct but is not nil && this == nil") + } + if this.FieldA != nil && that1.FieldA != nil { + if *this.FieldA != *that1.FieldA { + return fmt.Errorf("FieldA this(%v) Not Equal that(%v)", *this.FieldA, *that1.FieldA) + } + } else if this.FieldA != nil { + return fmt.Errorf("this.FieldA == nil && that.FieldA != nil") + } else if that1.FieldA != nil { + return fmt.Errorf("FieldA this(%v) Not Equal that(%v)", this.FieldA, that1.FieldA) + } + if this.FieldB != nil && that1.FieldB != nil { + if *this.FieldB != *that1.FieldB { + return fmt.Errorf("FieldB this(%v) Not Equal that(%v)", *this.FieldB, *that1.FieldB) + } + } else if this.FieldB != nil { + return fmt.Errorf("this.FieldB == nil && that.FieldB != nil") + } else if that1.FieldB != nil { + return fmt.Errorf("FieldB this(%v) Not Equal that(%v)", this.FieldB, that1.FieldB) + } + if !this.FieldC.Equal(that1.FieldC) { + return fmt.Errorf("FieldC this(%v) Not Equal that(%v)", this.FieldC, that1.FieldC) + } + if len(this.FieldD) != len(that1.FieldD) { + return fmt.Errorf("FieldD this(%v) Not Equal that(%v)", len(this.FieldD), len(that1.FieldD)) + } + for i := range this.FieldD { + if !this.FieldD[i].Equal(that1.FieldD[i]) { + return fmt.Errorf("FieldD this[%v](%v) Not Equal that[%v](%v)", i, this.FieldD[i], i, that1.FieldD[i]) + } + } + if this.FieldE != nil && that1.FieldE != nil { + if *this.FieldE != *that1.FieldE { + return fmt.Errorf("FieldE this(%v) Not Equal that(%v)", *this.FieldE, *that1.FieldE) + } + } else if this.FieldE != nil { + return fmt.Errorf("this.FieldE == nil && that.FieldE != nil") + } else if that1.FieldE != nil { + return fmt.Errorf("FieldE this(%v) Not Equal that(%v)", this.FieldE, that1.FieldE) + } + if this.FieldF != nil && that1.FieldF != nil { + if *this.FieldF != *that1.FieldF { + return fmt.Errorf("FieldF this(%v) Not Equal that(%v)", *this.FieldF, *that1.FieldF) + } + } else if this.FieldF != nil { + return fmt.Errorf("this.FieldF == nil && that.FieldF != nil") + } else if that1.FieldF != nil { + return fmt.Errorf("FieldF this(%v) Not Equal that(%v)", this.FieldF, that1.FieldF) + } + if !this.FieldG.Equal(that1.FieldG) { + return fmt.Errorf("FieldG this(%v) Not Equal that(%v)", this.FieldG, that1.FieldG) + } + if this.FieldH != nil && that1.FieldH != nil { + if *this.FieldH != *that1.FieldH { + return fmt.Errorf("FieldH this(%v) Not Equal that(%v)", *this.FieldH, *that1.FieldH) + } + } else if this.FieldH != nil { + return fmt.Errorf("this.FieldH == nil && that.FieldH != nil") + } else if that1.FieldH != nil { + return fmt.Errorf("FieldH this(%v) Not Equal that(%v)", this.FieldH, that1.FieldH) + } + if this.FieldI != nil && that1.FieldI != nil { + if *this.FieldI != *that1.FieldI { + return fmt.Errorf("FieldI this(%v) Not Equal that(%v)", *this.FieldI, *that1.FieldI) + } + } else if this.FieldI != nil { + return fmt.Errorf("this.FieldI == nil && that.FieldI != nil") + } else if that1.FieldI != nil { + return fmt.Errorf("FieldI this(%v) Not Equal that(%v)", this.FieldI, that1.FieldI) + } + if !bytes.Equal(this.FieldJ, that1.FieldJ) { + return fmt.Errorf("FieldJ this(%v) Not Equal that(%v)", this.FieldJ, that1.FieldJ) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *CustomNameNinStruct) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*CustomNameNinStruct) + if !ok { + that2, ok := that.(CustomNameNinStruct) + 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.FieldA != nil && that1.FieldA != nil { + if *this.FieldA != *that1.FieldA { + return false + } + } else if this.FieldA != nil { + return false + } else if that1.FieldA != nil { + return false + } + if this.FieldB != nil && that1.FieldB != nil { + if *this.FieldB != *that1.FieldB { + return false + } + } else if this.FieldB != nil { + return false + } else if that1.FieldB != nil { + return false + } + if !this.FieldC.Equal(that1.FieldC) { + return false + } + if len(this.FieldD) != len(that1.FieldD) { + return false + } + for i := range this.FieldD { + if !this.FieldD[i].Equal(that1.FieldD[i]) { + return false + } + } + if this.FieldE != nil && that1.FieldE != nil { + if *this.FieldE != *that1.FieldE { + return false + } + } else if this.FieldE != nil { + return false + } else if that1.FieldE != nil { + return false + } + if this.FieldF != nil && that1.FieldF != nil { + if *this.FieldF != *that1.FieldF { + return false + } + } else if this.FieldF != nil { + return false + } else if that1.FieldF != nil { + return false + } + if !this.FieldG.Equal(that1.FieldG) { + return false + } + if this.FieldH != nil && that1.FieldH != nil { + if *this.FieldH != *that1.FieldH { + return false + } + } else if this.FieldH != nil { + return false + } else if that1.FieldH != nil { + return false + } + if this.FieldI != nil && that1.FieldI != nil { + if *this.FieldI != *that1.FieldI { + return false + } + } else if this.FieldI != nil { + return false + } else if that1.FieldI != nil { + return false + } + if !bytes.Equal(this.FieldJ, that1.FieldJ) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *CustomNameCustomType) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*CustomNameCustomType) + if !ok { + that2, ok := that.(CustomNameCustomType) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *CustomNameCustomType") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *CustomNameCustomType but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *CustomNameCustomType but is not nil && this == nil") + } + if that1.FieldA == nil { + if this.FieldA != nil { + return fmt.Errorf("this.FieldA != nil && that1.FieldA == nil") + } + } else if !this.FieldA.Equal(*that1.FieldA) { + return fmt.Errorf("FieldA this(%v) Not Equal that(%v)", this.FieldA, that1.FieldA) + } + if that1.FieldB == nil { + if this.FieldB != nil { + return fmt.Errorf("this.FieldB != nil && that1.FieldB == nil") + } + } else if !this.FieldB.Equal(*that1.FieldB) { + return fmt.Errorf("FieldB this(%v) Not Equal that(%v)", this.FieldB, that1.FieldB) + } + if len(this.FieldC) != len(that1.FieldC) { + return fmt.Errorf("FieldC this(%v) Not Equal that(%v)", len(this.FieldC), len(that1.FieldC)) + } + for i := range this.FieldC { + if !this.FieldC[i].Equal(that1.FieldC[i]) { + return fmt.Errorf("FieldC this[%v](%v) Not Equal that[%v](%v)", i, this.FieldC[i], i, that1.FieldC[i]) + } + } + if len(this.FieldD) != len(that1.FieldD) { + return fmt.Errorf("FieldD this(%v) Not Equal that(%v)", len(this.FieldD), len(that1.FieldD)) + } + for i := range this.FieldD { + if !this.FieldD[i].Equal(that1.FieldD[i]) { + return fmt.Errorf("FieldD this[%v](%v) Not Equal that[%v](%v)", i, this.FieldD[i], i, that1.FieldD[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *CustomNameCustomType) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*CustomNameCustomType) + if !ok { + that2, ok := that.(CustomNameCustomType) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + if this == nil { + return true + } + return false + } else if this == nil { + return false + } + if that1.FieldA == nil { + if this.FieldA != nil { + return false + } + } else if !this.FieldA.Equal(*that1.FieldA) { + return false + } + if that1.FieldB == nil { + if this.FieldB != nil { + return false + } + } else if !this.FieldB.Equal(*that1.FieldB) { + return false + } + if len(this.FieldC) != len(that1.FieldC) { + return false + } + for i := range this.FieldC { + if !this.FieldC[i].Equal(that1.FieldC[i]) { + return false + } + } + if len(this.FieldD) != len(that1.FieldD) { + return false + } + for i := range this.FieldD { + if !this.FieldD[i].Equal(that1.FieldD[i]) { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *CustomNameNinEmbeddedStructUnion) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*CustomNameNinEmbeddedStructUnion) + if !ok { + that2, ok := that.(CustomNameNinEmbeddedStructUnion) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *CustomNameNinEmbeddedStructUnion") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *CustomNameNinEmbeddedStructUnion but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *CustomNameNinEmbeddedStructUnion but is not nil && this == nil") + } + if !this.NidOptNative.Equal(that1.NidOptNative) { + return fmt.Errorf("NidOptNative this(%v) Not Equal that(%v)", this.NidOptNative, that1.NidOptNative) + } + if !this.FieldA.Equal(that1.FieldA) { + return fmt.Errorf("FieldA this(%v) Not Equal that(%v)", this.FieldA, that1.FieldA) + } + if this.FieldB != nil && that1.FieldB != nil { + if *this.FieldB != *that1.FieldB { + return fmt.Errorf("FieldB this(%v) Not Equal that(%v)", *this.FieldB, *that1.FieldB) + } + } else if this.FieldB != nil { + return fmt.Errorf("this.FieldB == nil && that.FieldB != nil") + } else if that1.FieldB != nil { + return fmt.Errorf("FieldB this(%v) Not Equal that(%v)", this.FieldB, that1.FieldB) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *CustomNameNinEmbeddedStructUnion) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*CustomNameNinEmbeddedStructUnion) + if !ok { + that2, ok := that.(CustomNameNinEmbeddedStructUnion) + 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.NidOptNative.Equal(that1.NidOptNative) { + return false + } + if !this.FieldA.Equal(that1.FieldA) { + return false + } + if this.FieldB != nil && that1.FieldB != nil { + if *this.FieldB != *that1.FieldB { + return false + } + } else if this.FieldB != nil { + return false + } else if that1.FieldB != nil { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *CustomNameEnum) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*CustomNameEnum) + if !ok { + that2, ok := that.(CustomNameEnum) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *CustomNameEnum") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *CustomNameEnum but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *CustomNameEnum but is not nil && this == nil") + } + if this.FieldA != nil && that1.FieldA != nil { + if *this.FieldA != *that1.FieldA { + return fmt.Errorf("FieldA this(%v) Not Equal that(%v)", *this.FieldA, *that1.FieldA) + } + } else if this.FieldA != nil { + return fmt.Errorf("this.FieldA == nil && that.FieldA != nil") + } else if that1.FieldA != nil { + return fmt.Errorf("FieldA this(%v) Not Equal that(%v)", this.FieldA, that1.FieldA) + } + if len(this.FieldB) != len(that1.FieldB) { + return fmt.Errorf("FieldB this(%v) Not Equal that(%v)", len(this.FieldB), len(that1.FieldB)) + } + for i := range this.FieldB { + if this.FieldB[i] != that1.FieldB[i] { + return fmt.Errorf("FieldB this[%v](%v) Not Equal that[%v](%v)", i, this.FieldB[i], i, that1.FieldB[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *CustomNameEnum) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*CustomNameEnum) + if !ok { + that2, ok := that.(CustomNameEnum) + 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.FieldA != nil && that1.FieldA != nil { + if *this.FieldA != *that1.FieldA { + return false + } + } else if this.FieldA != nil { + return false + } else if that1.FieldA != nil { + return false + } + if len(this.FieldB) != len(that1.FieldB) { + return false + } + for i := range this.FieldB { + if this.FieldB[i] != that1.FieldB[i] { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NoExtensionsMap) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NoExtensionsMap) + if !ok { + that2, ok := that.(NoExtensionsMap) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NoExtensionsMap") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NoExtensionsMap but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NoExtensionsMap but is not nil && this == nil") + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) + } + } else if this.Field1 != nil { + return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") + } else if that1.Field1 != nil { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) + } + if !bytes.Equal(this.XXX_extensions, that1.XXX_extensions) { + return fmt.Errorf("XXX_extensions this(%v) Not Equal that(%v)", this.XXX_extensions, that1.XXX_extensions) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NoExtensionsMap) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*NoExtensionsMap) + if !ok { + that2, ok := that.(NoExtensionsMap) + 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.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return false + } + } else if this.Field1 != nil { + return false + } else if that1.Field1 != nil { + return false + } + if !bytes.Equal(this.XXX_extensions, that1.XXX_extensions) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *Unrecognized) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*Unrecognized) + if !ok { + that2, ok := that.(Unrecognized) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *Unrecognized") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *Unrecognized but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *Unrecognized but is not nil && this == nil") + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) + } + } else if this.Field1 != nil { + return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") + } else if that1.Field1 != nil { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) + } + return nil +} +func (this *Unrecognized) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*Unrecognized) + if !ok { + that2, ok := that.(Unrecognized) + 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.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return false + } + } else if this.Field1 != nil { + return false + } else if that1.Field1 != nil { + return false + } + return true +} +func (this *UnrecognizedWithInner) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*UnrecognizedWithInner) + if !ok { + that2, ok := that.(UnrecognizedWithInner) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *UnrecognizedWithInner") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *UnrecognizedWithInner but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *UnrecognizedWithInner but is not nil && this == nil") + } + if len(this.Embedded) != len(that1.Embedded) { + return fmt.Errorf("Embedded this(%v) Not Equal that(%v)", len(this.Embedded), len(that1.Embedded)) + } + for i := range this.Embedded { + if !this.Embedded[i].Equal(that1.Embedded[i]) { + return fmt.Errorf("Embedded this[%v](%v) Not Equal that[%v](%v)", i, this.Embedded[i], i, that1.Embedded[i]) + } + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", *this.Field2, *that1.Field2) + } + } else if this.Field2 != nil { + return fmt.Errorf("this.Field2 == nil && that.Field2 != nil") + } else if that1.Field2 != nil { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *UnrecognizedWithInner) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*UnrecognizedWithInner) + if !ok { + that2, ok := that.(UnrecognizedWithInner) + 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.Embedded) != len(that1.Embedded) { + return false + } + for i := range this.Embedded { + if !this.Embedded[i].Equal(that1.Embedded[i]) { + return false + } + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + return false + } + } else if this.Field2 != nil { + return false + } else if that1.Field2 != nil { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *UnrecognizedWithInner_Inner) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*UnrecognizedWithInner_Inner) + if !ok { + that2, ok := that.(UnrecognizedWithInner_Inner) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *UnrecognizedWithInner_Inner") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *UnrecognizedWithInner_Inner but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *UnrecognizedWithInner_Inner but is not nil && this == nil") + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) + } + } else if this.Field1 != nil { + return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") + } else if that1.Field1 != nil { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) + } + return nil +} +func (this *UnrecognizedWithInner_Inner) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*UnrecognizedWithInner_Inner) + if !ok { + that2, ok := that.(UnrecognizedWithInner_Inner) + 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.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return false + } + } else if this.Field1 != nil { + return false + } else if that1.Field1 != nil { + return false + } + return true +} +func (this *UnrecognizedWithEmbed) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*UnrecognizedWithEmbed) + if !ok { + that2, ok := that.(UnrecognizedWithEmbed) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *UnrecognizedWithEmbed") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *UnrecognizedWithEmbed but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *UnrecognizedWithEmbed but is not nil && this == nil") + } + if !this.UnrecognizedWithEmbed_Embedded.Equal(&that1.UnrecognizedWithEmbed_Embedded) { + return fmt.Errorf("UnrecognizedWithEmbed_Embedded this(%v) Not Equal that(%v)", this.UnrecognizedWithEmbed_Embedded, that1.UnrecognizedWithEmbed_Embedded) + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", *this.Field2, *that1.Field2) + } + } else if this.Field2 != nil { + return fmt.Errorf("this.Field2 == nil && that.Field2 != nil") + } else if that1.Field2 != nil { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *UnrecognizedWithEmbed) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*UnrecognizedWithEmbed) + if !ok { + that2, ok := that.(UnrecognizedWithEmbed) + 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.UnrecognizedWithEmbed_Embedded.Equal(&that1.UnrecognizedWithEmbed_Embedded) { + return false + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + return false + } + } else if this.Field2 != nil { + return false + } else if that1.Field2 != nil { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *UnrecognizedWithEmbed_Embedded) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*UnrecognizedWithEmbed_Embedded) + if !ok { + that2, ok := that.(UnrecognizedWithEmbed_Embedded) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *UnrecognizedWithEmbed_Embedded") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *UnrecognizedWithEmbed_Embedded but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *UnrecognizedWithEmbed_Embedded but is not nil && this == nil") + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) + } + } else if this.Field1 != nil { + return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") + } else if that1.Field1 != nil { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) + } + return nil +} +func (this *UnrecognizedWithEmbed_Embedded) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*UnrecognizedWithEmbed_Embedded) + if !ok { + that2, ok := that.(UnrecognizedWithEmbed_Embedded) + 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.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return false + } + } else if this.Field1 != nil { + return false + } else if that1.Field1 != nil { + return false + } + return true +} +func (this *Node) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*Node) + if !ok { + that2, ok := that.(Node) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *Node") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *Node but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *Node but is not nil && this == nil") + } + if this.Label != nil && that1.Label != nil { + if *this.Label != *that1.Label { + return fmt.Errorf("Label this(%v) Not Equal that(%v)", *this.Label, *that1.Label) + } + } else if this.Label != nil { + return fmt.Errorf("this.Label == nil && that.Label != nil") + } else if that1.Label != nil { + return fmt.Errorf("Label this(%v) Not Equal that(%v)", this.Label, that1.Label) + } + if len(this.Children) != len(that1.Children) { + return fmt.Errorf("Children this(%v) Not Equal that(%v)", len(this.Children), len(that1.Children)) + } + for i := range this.Children { + if !this.Children[i].Equal(that1.Children[i]) { + return fmt.Errorf("Children this[%v](%v) Not Equal that[%v](%v)", i, this.Children[i], i, that1.Children[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *Node) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*Node) + if !ok { + that2, ok := that.(Node) + 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.Label != nil && that1.Label != nil { + if *this.Label != *that1.Label { + return false + } + } else if this.Label != nil { + return false + } else if that1.Label != nil { + return false + } + if len(this.Children) != len(that1.Children) { + return false + } + for i := range this.Children { + if !this.Children[i].Equal(that1.Children[i]) { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} + +type NidOptNativeFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetField1() float64 + GetField2() float32 + GetField3() int32 + GetField4() int64 + GetField5() uint32 + GetField6() uint64 + GetField7() int32 + GetField8() int64 + GetField9() uint32 + GetField10() int32 + GetField11() uint64 + GetField12() int64 + GetField13() bool + GetField14() string + GetField15() []byte +} + +func (this *NidOptNative) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NidOptNative) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNidOptNativeFromFace(this) +} + +func (this *NidOptNative) GetField1() float64 { + return this.Field1 +} + +func (this *NidOptNative) GetField2() float32 { + return this.Field2 +} + +func (this *NidOptNative) GetField3() int32 { + return this.Field3 +} + +func (this *NidOptNative) GetField4() int64 { + return this.Field4 +} + +func (this *NidOptNative) GetField5() uint32 { + return this.Field5 +} + +func (this *NidOptNative) GetField6() uint64 { + return this.Field6 +} + +func (this *NidOptNative) GetField7() int32 { + return this.Field7 +} + +func (this *NidOptNative) GetField8() int64 { + return this.Field8 +} + +func (this *NidOptNative) GetField9() uint32 { + return this.Field9 +} + +func (this *NidOptNative) GetField10() int32 { + return this.Field10 +} + +func (this *NidOptNative) GetField11() uint64 { + return this.Field11 +} + +func (this *NidOptNative) GetField12() int64 { + return this.Field12 +} + +func (this *NidOptNative) GetField13() bool { + return this.Field13 +} + +func (this *NidOptNative) GetField14() string { + return this.Field14 +} + +func (this *NidOptNative) GetField15() []byte { + return this.Field15 +} + +func NewNidOptNativeFromFace(that NidOptNativeFace) *NidOptNative { + this := &NidOptNative{} + this.Field1 = that.GetField1() + this.Field2 = that.GetField2() + this.Field3 = that.GetField3() + this.Field4 = that.GetField4() + this.Field5 = that.GetField5() + this.Field6 = that.GetField6() + this.Field7 = that.GetField7() + this.Field8 = that.GetField8() + this.Field9 = that.GetField9() + this.Field10 = that.GetField10() + this.Field11 = that.GetField11() + this.Field12 = that.GetField12() + this.Field13 = that.GetField13() + this.Field14 = that.GetField14() + this.Field15 = that.GetField15() + return this +} + +type NinOptNativeFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetField1() *float64 + GetField2() *float32 + GetField3() *int32 + GetField4() *int64 + GetField5() *uint32 + GetField6() *uint64 + GetField7() *int32 + GetField8() *int64 + GetField9() *uint32 + GetField10() *int32 + GetField11() *uint64 + GetField12() *int64 + GetField13() *bool + GetField14() *string + GetField15() []byte +} + +func (this *NinOptNative) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NinOptNative) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNinOptNativeFromFace(this) +} + +func (this *NinOptNative) GetField1() *float64 { + return this.Field1 +} + +func (this *NinOptNative) GetField2() *float32 { + return this.Field2 +} + +func (this *NinOptNative) GetField3() *int32 { + return this.Field3 +} + +func (this *NinOptNative) GetField4() *int64 { + return this.Field4 +} + +func (this *NinOptNative) GetField5() *uint32 { + return this.Field5 +} + +func (this *NinOptNative) GetField6() *uint64 { + return this.Field6 +} + +func (this *NinOptNative) GetField7() *int32 { + return this.Field7 +} + +func (this *NinOptNative) GetField8() *int64 { + return this.Field8 +} + +func (this *NinOptNative) GetField9() *uint32 { + return this.Field9 +} + +func (this *NinOptNative) GetField10() *int32 { + return this.Field10 +} + +func (this *NinOptNative) GetField11() *uint64 { + return this.Field11 +} + +func (this *NinOptNative) GetField12() *int64 { + return this.Field12 +} + +func (this *NinOptNative) GetField13() *bool { + return this.Field13 +} + +func (this *NinOptNative) GetField14() *string { + return this.Field14 +} + +func (this *NinOptNative) GetField15() []byte { + return this.Field15 +} + +func NewNinOptNativeFromFace(that NinOptNativeFace) *NinOptNative { + this := &NinOptNative{} + this.Field1 = that.GetField1() + this.Field2 = that.GetField2() + this.Field3 = that.GetField3() + this.Field4 = that.GetField4() + this.Field5 = that.GetField5() + this.Field6 = that.GetField6() + this.Field7 = that.GetField7() + this.Field8 = that.GetField8() + this.Field9 = that.GetField9() + this.Field10 = that.GetField10() + this.Field11 = that.GetField11() + this.Field12 = that.GetField12() + this.Field13 = that.GetField13() + this.Field14 = that.GetField14() + this.Field15 = that.GetField15() + return this +} + +type NidRepNativeFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetField1() []float64 + GetField2() []float32 + GetField3() []int32 + GetField4() []int64 + GetField5() []uint32 + GetField6() []uint64 + GetField7() []int32 + GetField8() []int64 + GetField9() []uint32 + GetField10() []int32 + GetField11() []uint64 + GetField12() []int64 + GetField13() []bool + GetField14() []string + GetField15() [][]byte +} + +func (this *NidRepNative) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NidRepNative) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNidRepNativeFromFace(this) +} + +func (this *NidRepNative) GetField1() []float64 { + return this.Field1 +} + +func (this *NidRepNative) GetField2() []float32 { + return this.Field2 +} + +func (this *NidRepNative) GetField3() []int32 { + return this.Field3 +} + +func (this *NidRepNative) GetField4() []int64 { + return this.Field4 +} + +func (this *NidRepNative) GetField5() []uint32 { + return this.Field5 +} + +func (this *NidRepNative) GetField6() []uint64 { + return this.Field6 +} + +func (this *NidRepNative) GetField7() []int32 { + return this.Field7 +} + +func (this *NidRepNative) GetField8() []int64 { + return this.Field8 +} + +func (this *NidRepNative) GetField9() []uint32 { + return this.Field9 +} + +func (this *NidRepNative) GetField10() []int32 { + return this.Field10 +} + +func (this *NidRepNative) GetField11() []uint64 { + return this.Field11 +} + +func (this *NidRepNative) GetField12() []int64 { + return this.Field12 +} + +func (this *NidRepNative) GetField13() []bool { + return this.Field13 +} + +func (this *NidRepNative) GetField14() []string { + return this.Field14 +} + +func (this *NidRepNative) GetField15() [][]byte { + return this.Field15 +} + +func NewNidRepNativeFromFace(that NidRepNativeFace) *NidRepNative { + this := &NidRepNative{} + this.Field1 = that.GetField1() + this.Field2 = that.GetField2() + this.Field3 = that.GetField3() + this.Field4 = that.GetField4() + this.Field5 = that.GetField5() + this.Field6 = that.GetField6() + this.Field7 = that.GetField7() + this.Field8 = that.GetField8() + this.Field9 = that.GetField9() + this.Field10 = that.GetField10() + this.Field11 = that.GetField11() + this.Field12 = that.GetField12() + this.Field13 = that.GetField13() + this.Field14 = that.GetField14() + this.Field15 = that.GetField15() + return this +} + +type NinRepNativeFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetField1() []float64 + GetField2() []float32 + GetField3() []int32 + GetField4() []int64 + GetField5() []uint32 + GetField6() []uint64 + GetField7() []int32 + GetField8() []int64 + GetField9() []uint32 + GetField10() []int32 + GetField11() []uint64 + GetField12() []int64 + GetField13() []bool + GetField14() []string + GetField15() [][]byte +} + +func (this *NinRepNative) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NinRepNative) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNinRepNativeFromFace(this) +} + +func (this *NinRepNative) GetField1() []float64 { + return this.Field1 +} + +func (this *NinRepNative) GetField2() []float32 { + return this.Field2 +} + +func (this *NinRepNative) GetField3() []int32 { + return this.Field3 +} + +func (this *NinRepNative) GetField4() []int64 { + return this.Field4 +} + +func (this *NinRepNative) GetField5() []uint32 { + return this.Field5 +} + +func (this *NinRepNative) GetField6() []uint64 { + return this.Field6 +} + +func (this *NinRepNative) GetField7() []int32 { + return this.Field7 +} + +func (this *NinRepNative) GetField8() []int64 { + return this.Field8 +} + +func (this *NinRepNative) GetField9() []uint32 { + return this.Field9 +} + +func (this *NinRepNative) GetField10() []int32 { + return this.Field10 +} + +func (this *NinRepNative) GetField11() []uint64 { + return this.Field11 +} + +func (this *NinRepNative) GetField12() []int64 { + return this.Field12 +} + +func (this *NinRepNative) GetField13() []bool { + return this.Field13 +} + +func (this *NinRepNative) GetField14() []string { + return this.Field14 +} + +func (this *NinRepNative) GetField15() [][]byte { + return this.Field15 +} + +func NewNinRepNativeFromFace(that NinRepNativeFace) *NinRepNative { + this := &NinRepNative{} + this.Field1 = that.GetField1() + this.Field2 = that.GetField2() + this.Field3 = that.GetField3() + this.Field4 = that.GetField4() + this.Field5 = that.GetField5() + this.Field6 = that.GetField6() + this.Field7 = that.GetField7() + this.Field8 = that.GetField8() + this.Field9 = that.GetField9() + this.Field10 = that.GetField10() + this.Field11 = that.GetField11() + this.Field12 = that.GetField12() + this.Field13 = that.GetField13() + this.Field14 = that.GetField14() + this.Field15 = that.GetField15() + return this +} + +type NidRepPackedNativeFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetField1() []float64 + GetField2() []float32 + GetField3() []int32 + GetField4() []int64 + GetField5() []uint32 + GetField6() []uint64 + GetField7() []int32 + GetField8() []int64 + GetField9() []uint32 + GetField10() []int32 + GetField11() []uint64 + GetField12() []int64 + GetField13() []bool +} + +func (this *NidRepPackedNative) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NidRepPackedNative) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNidRepPackedNativeFromFace(this) +} + +func (this *NidRepPackedNative) GetField1() []float64 { + return this.Field1 +} + +func (this *NidRepPackedNative) GetField2() []float32 { + return this.Field2 +} + +func (this *NidRepPackedNative) GetField3() []int32 { + return this.Field3 +} + +func (this *NidRepPackedNative) GetField4() []int64 { + return this.Field4 +} + +func (this *NidRepPackedNative) GetField5() []uint32 { + return this.Field5 +} + +func (this *NidRepPackedNative) GetField6() []uint64 { + return this.Field6 +} + +func (this *NidRepPackedNative) GetField7() []int32 { + return this.Field7 +} + +func (this *NidRepPackedNative) GetField8() []int64 { + return this.Field8 +} + +func (this *NidRepPackedNative) GetField9() []uint32 { + return this.Field9 +} + +func (this *NidRepPackedNative) GetField10() []int32 { + return this.Field10 +} + +func (this *NidRepPackedNative) GetField11() []uint64 { + return this.Field11 +} + +func (this *NidRepPackedNative) GetField12() []int64 { + return this.Field12 +} + +func (this *NidRepPackedNative) GetField13() []bool { + return this.Field13 +} + +func NewNidRepPackedNativeFromFace(that NidRepPackedNativeFace) *NidRepPackedNative { + this := &NidRepPackedNative{} + this.Field1 = that.GetField1() + this.Field2 = that.GetField2() + this.Field3 = that.GetField3() + this.Field4 = that.GetField4() + this.Field5 = that.GetField5() + this.Field6 = that.GetField6() + this.Field7 = that.GetField7() + this.Field8 = that.GetField8() + this.Field9 = that.GetField9() + this.Field10 = that.GetField10() + this.Field11 = that.GetField11() + this.Field12 = that.GetField12() + this.Field13 = that.GetField13() + return this +} + +type NinRepPackedNativeFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetField1() []float64 + GetField2() []float32 + GetField3() []int32 + GetField4() []int64 + GetField5() []uint32 + GetField6() []uint64 + GetField7() []int32 + GetField8() []int64 + GetField9() []uint32 + GetField10() []int32 + GetField11() []uint64 + GetField12() []int64 + GetField13() []bool +} + +func (this *NinRepPackedNative) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NinRepPackedNative) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNinRepPackedNativeFromFace(this) +} + +func (this *NinRepPackedNative) GetField1() []float64 { + return this.Field1 +} + +func (this *NinRepPackedNative) GetField2() []float32 { + return this.Field2 +} + +func (this *NinRepPackedNative) GetField3() []int32 { + return this.Field3 +} + +func (this *NinRepPackedNative) GetField4() []int64 { + return this.Field4 +} + +func (this *NinRepPackedNative) GetField5() []uint32 { + return this.Field5 +} + +func (this *NinRepPackedNative) GetField6() []uint64 { + return this.Field6 +} + +func (this *NinRepPackedNative) GetField7() []int32 { + return this.Field7 +} + +func (this *NinRepPackedNative) GetField8() []int64 { + return this.Field8 +} + +func (this *NinRepPackedNative) GetField9() []uint32 { + return this.Field9 +} + +func (this *NinRepPackedNative) GetField10() []int32 { + return this.Field10 +} + +func (this *NinRepPackedNative) GetField11() []uint64 { + return this.Field11 +} + +func (this *NinRepPackedNative) GetField12() []int64 { + return this.Field12 +} + +func (this *NinRepPackedNative) GetField13() []bool { + return this.Field13 +} + +func NewNinRepPackedNativeFromFace(that NinRepPackedNativeFace) *NinRepPackedNative { + this := &NinRepPackedNative{} + this.Field1 = that.GetField1() + this.Field2 = that.GetField2() + this.Field3 = that.GetField3() + this.Field4 = that.GetField4() + this.Field5 = that.GetField5() + this.Field6 = that.GetField6() + this.Field7 = that.GetField7() + this.Field8 = that.GetField8() + this.Field9 = that.GetField9() + this.Field10 = that.GetField10() + this.Field11 = that.GetField11() + this.Field12 = that.GetField12() + this.Field13 = that.GetField13() + return this +} + +type NidOptStructFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetField1() float64 + GetField2() float32 + GetField3() NidOptNative + GetField4() NinOptNative + GetField6() uint64 + GetField7() int32 + GetField8() NidOptNative + GetField13() bool + GetField14() string + GetField15() []byte +} + +func (this *NidOptStruct) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NidOptStruct) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNidOptStructFromFace(this) +} + +func (this *NidOptStruct) GetField1() float64 { + return this.Field1 +} + +func (this *NidOptStruct) GetField2() float32 { + return this.Field2 +} + +func (this *NidOptStruct) GetField3() NidOptNative { + return this.Field3 +} + +func (this *NidOptStruct) GetField4() NinOptNative { + return this.Field4 +} + +func (this *NidOptStruct) GetField6() uint64 { + return this.Field6 +} + +func (this *NidOptStruct) GetField7() int32 { + return this.Field7 +} + +func (this *NidOptStruct) GetField8() NidOptNative { + return this.Field8 +} + +func (this *NidOptStruct) GetField13() bool { + return this.Field13 +} + +func (this *NidOptStruct) GetField14() string { + return this.Field14 +} + +func (this *NidOptStruct) GetField15() []byte { + return this.Field15 +} + +func NewNidOptStructFromFace(that NidOptStructFace) *NidOptStruct { + this := &NidOptStruct{} + this.Field1 = that.GetField1() + this.Field2 = that.GetField2() + this.Field3 = that.GetField3() + this.Field4 = that.GetField4() + this.Field6 = that.GetField6() + this.Field7 = that.GetField7() + this.Field8 = that.GetField8() + this.Field13 = that.GetField13() + this.Field14 = that.GetField14() + this.Field15 = that.GetField15() + return this +} + +type NinOptStructFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetField1() *float64 + GetField2() *float32 + GetField3() *NidOptNative + GetField4() *NinOptNative + GetField6() *uint64 + GetField7() *int32 + GetField8() *NidOptNative + GetField13() *bool + GetField14() *string + GetField15() []byte +} + +func (this *NinOptStruct) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NinOptStruct) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNinOptStructFromFace(this) +} + +func (this *NinOptStruct) GetField1() *float64 { + return this.Field1 +} + +func (this *NinOptStruct) GetField2() *float32 { + return this.Field2 +} + +func (this *NinOptStruct) GetField3() *NidOptNative { + return this.Field3 +} + +func (this *NinOptStruct) GetField4() *NinOptNative { + return this.Field4 +} + +func (this *NinOptStruct) GetField6() *uint64 { + return this.Field6 +} + +func (this *NinOptStruct) GetField7() *int32 { + return this.Field7 +} + +func (this *NinOptStruct) GetField8() *NidOptNative { + return this.Field8 +} + +func (this *NinOptStruct) GetField13() *bool { + return this.Field13 +} + +func (this *NinOptStruct) GetField14() *string { + return this.Field14 +} + +func (this *NinOptStruct) GetField15() []byte { + return this.Field15 +} + +func NewNinOptStructFromFace(that NinOptStructFace) *NinOptStruct { + this := &NinOptStruct{} + this.Field1 = that.GetField1() + this.Field2 = that.GetField2() + this.Field3 = that.GetField3() + this.Field4 = that.GetField4() + this.Field6 = that.GetField6() + this.Field7 = that.GetField7() + this.Field8 = that.GetField8() + this.Field13 = that.GetField13() + this.Field14 = that.GetField14() + this.Field15 = that.GetField15() + return this +} + +type NidRepStructFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetField1() []float64 + GetField2() []float32 + GetField3() []NidOptNative + GetField4() []NinOptNative + GetField6() []uint64 + GetField7() []int32 + GetField8() []NidOptNative + GetField13() []bool + GetField14() []string + GetField15() [][]byte +} + +func (this *NidRepStruct) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NidRepStruct) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNidRepStructFromFace(this) +} + +func (this *NidRepStruct) GetField1() []float64 { + return this.Field1 +} + +func (this *NidRepStruct) GetField2() []float32 { + return this.Field2 +} + +func (this *NidRepStruct) GetField3() []NidOptNative { + return this.Field3 +} + +func (this *NidRepStruct) GetField4() []NinOptNative { + return this.Field4 +} + +func (this *NidRepStruct) GetField6() []uint64 { + return this.Field6 +} + +func (this *NidRepStruct) GetField7() []int32 { + return this.Field7 +} + +func (this *NidRepStruct) GetField8() []NidOptNative { + return this.Field8 +} + +func (this *NidRepStruct) GetField13() []bool { + return this.Field13 +} + +func (this *NidRepStruct) GetField14() []string { + return this.Field14 +} + +func (this *NidRepStruct) GetField15() [][]byte { + return this.Field15 +} + +func NewNidRepStructFromFace(that NidRepStructFace) *NidRepStruct { + this := &NidRepStruct{} + this.Field1 = that.GetField1() + this.Field2 = that.GetField2() + this.Field3 = that.GetField3() + this.Field4 = that.GetField4() + this.Field6 = that.GetField6() + this.Field7 = that.GetField7() + this.Field8 = that.GetField8() + this.Field13 = that.GetField13() + this.Field14 = that.GetField14() + this.Field15 = that.GetField15() + return this +} + +type NinRepStructFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetField1() []float64 + GetField2() []float32 + GetField3() []*NidOptNative + GetField4() []*NinOptNative + GetField6() []uint64 + GetField7() []int32 + GetField8() []*NidOptNative + GetField13() []bool + GetField14() []string + GetField15() [][]byte +} + +func (this *NinRepStruct) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NinRepStruct) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNinRepStructFromFace(this) +} + +func (this *NinRepStruct) GetField1() []float64 { + return this.Field1 +} + +func (this *NinRepStruct) GetField2() []float32 { + return this.Field2 +} + +func (this *NinRepStruct) GetField3() []*NidOptNative { + return this.Field3 +} + +func (this *NinRepStruct) GetField4() []*NinOptNative { + return this.Field4 +} + +func (this *NinRepStruct) GetField6() []uint64 { + return this.Field6 +} + +func (this *NinRepStruct) GetField7() []int32 { + return this.Field7 +} + +func (this *NinRepStruct) GetField8() []*NidOptNative { + return this.Field8 +} + +func (this *NinRepStruct) GetField13() []bool { + return this.Field13 +} + +func (this *NinRepStruct) GetField14() []string { + return this.Field14 +} + +func (this *NinRepStruct) GetField15() [][]byte { + return this.Field15 +} + +func NewNinRepStructFromFace(that NinRepStructFace) *NinRepStruct { + this := &NinRepStruct{} + this.Field1 = that.GetField1() + this.Field2 = that.GetField2() + this.Field3 = that.GetField3() + this.Field4 = that.GetField4() + this.Field6 = that.GetField6() + this.Field7 = that.GetField7() + this.Field8 = that.GetField8() + this.Field13 = that.GetField13() + this.Field14 = that.GetField14() + this.Field15 = that.GetField15() + return this +} + +type NidEmbeddedStructFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetNidOptNative() *NidOptNative + GetField200() NidOptNative + GetField210() bool +} + +func (this *NidEmbeddedStruct) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NidEmbeddedStruct) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNidEmbeddedStructFromFace(this) +} + +func (this *NidEmbeddedStruct) GetNidOptNative() *NidOptNative { + return this.NidOptNative +} + +func (this *NidEmbeddedStruct) GetField200() NidOptNative { + return this.Field200 +} + +func (this *NidEmbeddedStruct) GetField210() bool { + return this.Field210 +} + +func NewNidEmbeddedStructFromFace(that NidEmbeddedStructFace) *NidEmbeddedStruct { + this := &NidEmbeddedStruct{} + this.NidOptNative = that.GetNidOptNative() + this.Field200 = that.GetField200() + this.Field210 = that.GetField210() + return this +} + +type NinEmbeddedStructFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetNidOptNative() *NidOptNative + GetField200() *NidOptNative + GetField210() *bool +} + +func (this *NinEmbeddedStruct) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NinEmbeddedStruct) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNinEmbeddedStructFromFace(this) +} + +func (this *NinEmbeddedStruct) GetNidOptNative() *NidOptNative { + return this.NidOptNative +} + +func (this *NinEmbeddedStruct) GetField200() *NidOptNative { + return this.Field200 +} + +func (this *NinEmbeddedStruct) GetField210() *bool { + return this.Field210 +} + +func NewNinEmbeddedStructFromFace(that NinEmbeddedStructFace) *NinEmbeddedStruct { + this := &NinEmbeddedStruct{} + this.NidOptNative = that.GetNidOptNative() + this.Field200 = that.GetField200() + this.Field210 = that.GetField210() + return this +} + +type NidNestedStructFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetField1() NidOptStruct + GetField2() []NidRepStruct +} + +func (this *NidNestedStruct) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NidNestedStruct) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNidNestedStructFromFace(this) +} + +func (this *NidNestedStruct) GetField1() NidOptStruct { + return this.Field1 +} + +func (this *NidNestedStruct) GetField2() []NidRepStruct { + return this.Field2 +} + +func NewNidNestedStructFromFace(that NidNestedStructFace) *NidNestedStruct { + this := &NidNestedStruct{} + this.Field1 = that.GetField1() + this.Field2 = that.GetField2() + return this +} + +type NinNestedStructFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetField1() *NinOptStruct + GetField2() []*NinRepStruct +} + +func (this *NinNestedStruct) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NinNestedStruct) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNinNestedStructFromFace(this) +} + +func (this *NinNestedStruct) GetField1() *NinOptStruct { + return this.Field1 +} + +func (this *NinNestedStruct) GetField2() []*NinRepStruct { + return this.Field2 +} + +func NewNinNestedStructFromFace(that NinNestedStructFace) *NinNestedStruct { + this := &NinNestedStruct{} + this.Field1 = that.GetField1() + this.Field2 = that.GetField2() + return this +} + +type NidOptCustomFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetId() Uuid + GetValue() github_com_gogo_protobuf_test_custom.Uint128 +} + +func (this *NidOptCustom) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NidOptCustom) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNidOptCustomFromFace(this) +} + +func (this *NidOptCustom) GetId() Uuid { + return this.Id +} + +func (this *NidOptCustom) GetValue() github_com_gogo_protobuf_test_custom.Uint128 { + return this.Value +} + +func NewNidOptCustomFromFace(that NidOptCustomFace) *NidOptCustom { + this := &NidOptCustom{} + this.Id = that.GetId() + this.Value = that.GetValue() + return this +} + +type CustomDashFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetValue() *github_com_gogo_protobuf_test_custom_dash_type.Bytes +} + +func (this *CustomDash) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *CustomDash) TestProto() github_com_gogo_protobuf_proto.Message { + return NewCustomDashFromFace(this) +} + +func (this *CustomDash) GetValue() *github_com_gogo_protobuf_test_custom_dash_type.Bytes { + return this.Value +} + +func NewCustomDashFromFace(that CustomDashFace) *CustomDash { + this := &CustomDash{} + this.Value = that.GetValue() + return this +} + +type NinOptCustomFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetId() *Uuid + GetValue() *github_com_gogo_protobuf_test_custom.Uint128 +} + +func (this *NinOptCustom) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NinOptCustom) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNinOptCustomFromFace(this) +} + +func (this *NinOptCustom) GetId() *Uuid { + return this.Id +} + +func (this *NinOptCustom) GetValue() *github_com_gogo_protobuf_test_custom.Uint128 { + return this.Value +} + +func NewNinOptCustomFromFace(that NinOptCustomFace) *NinOptCustom { + this := &NinOptCustom{} + this.Id = that.GetId() + this.Value = that.GetValue() + return this +} + +type NidRepCustomFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetId() []Uuid + GetValue() []github_com_gogo_protobuf_test_custom.Uint128 +} + +func (this *NidRepCustom) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NidRepCustom) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNidRepCustomFromFace(this) +} + +func (this *NidRepCustom) GetId() []Uuid { + return this.Id +} + +func (this *NidRepCustom) GetValue() []github_com_gogo_protobuf_test_custom.Uint128 { + return this.Value +} + +func NewNidRepCustomFromFace(that NidRepCustomFace) *NidRepCustom { + this := &NidRepCustom{} + this.Id = that.GetId() + this.Value = that.GetValue() + return this +} + +type NinRepCustomFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetId() []Uuid + GetValue() []github_com_gogo_protobuf_test_custom.Uint128 +} + +func (this *NinRepCustom) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NinRepCustom) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNinRepCustomFromFace(this) +} + +func (this *NinRepCustom) GetId() []Uuid { + return this.Id +} + +func (this *NinRepCustom) GetValue() []github_com_gogo_protobuf_test_custom.Uint128 { + return this.Value +} + +func NewNinRepCustomFromFace(that NinRepCustomFace) *NinRepCustom { + this := &NinRepCustom{} + this.Id = that.GetId() + this.Value = that.GetValue() + return this +} + +type NinOptNativeUnionFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetField1() *float64 + GetField2() *float32 + GetField3() *int32 + GetField4() *int64 + GetField5() *uint32 + GetField6() *uint64 + GetField13() *bool + GetField14() *string + GetField15() []byte +} + +func (this *NinOptNativeUnion) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NinOptNativeUnion) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNinOptNativeUnionFromFace(this) +} + +func (this *NinOptNativeUnion) GetField1() *float64 { + return this.Field1 +} + +func (this *NinOptNativeUnion) GetField2() *float32 { + return this.Field2 +} + +func (this *NinOptNativeUnion) GetField3() *int32 { + return this.Field3 +} + +func (this *NinOptNativeUnion) GetField4() *int64 { + return this.Field4 +} + +func (this *NinOptNativeUnion) GetField5() *uint32 { + return this.Field5 +} + +func (this *NinOptNativeUnion) GetField6() *uint64 { + return this.Field6 +} + +func (this *NinOptNativeUnion) GetField13() *bool { + return this.Field13 +} + +func (this *NinOptNativeUnion) GetField14() *string { + return this.Field14 +} + +func (this *NinOptNativeUnion) GetField15() []byte { + return this.Field15 +} + +func NewNinOptNativeUnionFromFace(that NinOptNativeUnionFace) *NinOptNativeUnion { + this := &NinOptNativeUnion{} + this.Field1 = that.GetField1() + this.Field2 = that.GetField2() + this.Field3 = that.GetField3() + this.Field4 = that.GetField4() + this.Field5 = that.GetField5() + this.Field6 = that.GetField6() + this.Field13 = that.GetField13() + this.Field14 = that.GetField14() + this.Field15 = that.GetField15() + return this +} + +type NinOptStructUnionFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetField1() *float64 + GetField2() *float32 + GetField3() *NidOptNative + GetField4() *NinOptNative + GetField6() *uint64 + GetField7() *int32 + GetField13() *bool + GetField14() *string + GetField15() []byte +} + +func (this *NinOptStructUnion) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NinOptStructUnion) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNinOptStructUnionFromFace(this) +} + +func (this *NinOptStructUnion) GetField1() *float64 { + return this.Field1 +} + +func (this *NinOptStructUnion) GetField2() *float32 { + return this.Field2 +} + +func (this *NinOptStructUnion) GetField3() *NidOptNative { + return this.Field3 +} + +func (this *NinOptStructUnion) GetField4() *NinOptNative { + return this.Field4 +} + +func (this *NinOptStructUnion) GetField6() *uint64 { + return this.Field6 +} + +func (this *NinOptStructUnion) GetField7() *int32 { + return this.Field7 +} + +func (this *NinOptStructUnion) GetField13() *bool { + return this.Field13 +} + +func (this *NinOptStructUnion) GetField14() *string { + return this.Field14 +} + +func (this *NinOptStructUnion) GetField15() []byte { + return this.Field15 +} + +func NewNinOptStructUnionFromFace(that NinOptStructUnionFace) *NinOptStructUnion { + this := &NinOptStructUnion{} + this.Field1 = that.GetField1() + this.Field2 = that.GetField2() + this.Field3 = that.GetField3() + this.Field4 = that.GetField4() + this.Field6 = that.GetField6() + this.Field7 = that.GetField7() + this.Field13 = that.GetField13() + this.Field14 = that.GetField14() + this.Field15 = that.GetField15() + return this +} + +type NinEmbeddedStructUnionFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetNidOptNative() *NidOptNative + GetField200() *NinOptNative + GetField210() *bool +} + +func (this *NinEmbeddedStructUnion) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NinEmbeddedStructUnion) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNinEmbeddedStructUnionFromFace(this) +} + +func (this *NinEmbeddedStructUnion) GetNidOptNative() *NidOptNative { + return this.NidOptNative +} + +func (this *NinEmbeddedStructUnion) GetField200() *NinOptNative { + return this.Field200 +} + +func (this *NinEmbeddedStructUnion) GetField210() *bool { + return this.Field210 +} + +func NewNinEmbeddedStructUnionFromFace(that NinEmbeddedStructUnionFace) *NinEmbeddedStructUnion { + this := &NinEmbeddedStructUnion{} + this.NidOptNative = that.GetNidOptNative() + this.Field200 = that.GetField200() + this.Field210 = that.GetField210() + return this +} + +type NinNestedStructUnionFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetField1() *NinOptNativeUnion + GetField2() *NinOptStructUnion + GetField3() *NinEmbeddedStructUnion +} + +func (this *NinNestedStructUnion) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NinNestedStructUnion) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNinNestedStructUnionFromFace(this) +} + +func (this *NinNestedStructUnion) GetField1() *NinOptNativeUnion { + return this.Field1 +} + +func (this *NinNestedStructUnion) GetField2() *NinOptStructUnion { + return this.Field2 +} + +func (this *NinNestedStructUnion) GetField3() *NinEmbeddedStructUnion { + return this.Field3 +} + +func NewNinNestedStructUnionFromFace(that NinNestedStructUnionFace) *NinNestedStructUnion { + this := &NinNestedStructUnion{} + this.Field1 = that.GetField1() + this.Field2 = that.GetField2() + this.Field3 = that.GetField3() + return this +} + +type TreeFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetOr() *OrBranch + GetAnd() *AndBranch + GetLeaf() *Leaf +} + +func (this *Tree) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *Tree) TestProto() github_com_gogo_protobuf_proto.Message { + return NewTreeFromFace(this) +} + +func (this *Tree) GetOr() *OrBranch { + return this.Or +} + +func (this *Tree) GetAnd() *AndBranch { + return this.And +} + +func (this *Tree) GetLeaf() *Leaf { + return this.Leaf +} + +func NewTreeFromFace(that TreeFace) *Tree { + this := &Tree{} + this.Or = that.GetOr() + this.And = that.GetAnd() + this.Leaf = that.GetLeaf() + return this +} + +type OrBranchFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetLeft() Tree + GetRight() Tree +} + +func (this *OrBranch) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *OrBranch) TestProto() github_com_gogo_protobuf_proto.Message { + return NewOrBranchFromFace(this) +} + +func (this *OrBranch) GetLeft() Tree { + return this.Left +} + +func (this *OrBranch) GetRight() Tree { + return this.Right +} + +func NewOrBranchFromFace(that OrBranchFace) *OrBranch { + this := &OrBranch{} + this.Left = that.GetLeft() + this.Right = that.GetRight() + return this +} + +type AndBranchFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetLeft() Tree + GetRight() Tree +} + +func (this *AndBranch) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *AndBranch) TestProto() github_com_gogo_protobuf_proto.Message { + return NewAndBranchFromFace(this) +} + +func (this *AndBranch) GetLeft() Tree { + return this.Left +} + +func (this *AndBranch) GetRight() Tree { + return this.Right +} + +func NewAndBranchFromFace(that AndBranchFace) *AndBranch { + this := &AndBranch{} + this.Left = that.GetLeft() + this.Right = that.GetRight() + return this +} + +type LeafFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetValue() int64 + GetStrValue() string +} + +func (this *Leaf) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *Leaf) TestProto() github_com_gogo_protobuf_proto.Message { + return NewLeafFromFace(this) +} + +func (this *Leaf) GetValue() int64 { + return this.Value +} + +func (this *Leaf) GetStrValue() string { + return this.StrValue +} + +func NewLeafFromFace(that LeafFace) *Leaf { + this := &Leaf{} + this.Value = that.GetValue() + this.StrValue = that.GetStrValue() + return this +} + +type DeepTreeFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetDown() *ADeepBranch + GetAnd() *AndDeepBranch + GetLeaf() *DeepLeaf +} + +func (this *DeepTree) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *DeepTree) TestProto() github_com_gogo_protobuf_proto.Message { + return NewDeepTreeFromFace(this) +} + +func (this *DeepTree) GetDown() *ADeepBranch { + return this.Down +} + +func (this *DeepTree) GetAnd() *AndDeepBranch { + return this.And +} + +func (this *DeepTree) GetLeaf() *DeepLeaf { + return this.Leaf +} + +func NewDeepTreeFromFace(that DeepTreeFace) *DeepTree { + this := &DeepTree{} + this.Down = that.GetDown() + this.And = that.GetAnd() + this.Leaf = that.GetLeaf() + return this +} + +type ADeepBranchFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetDown() DeepTree +} + +func (this *ADeepBranch) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *ADeepBranch) TestProto() github_com_gogo_protobuf_proto.Message { + return NewADeepBranchFromFace(this) +} + +func (this *ADeepBranch) GetDown() DeepTree { + return this.Down +} + +func NewADeepBranchFromFace(that ADeepBranchFace) *ADeepBranch { + this := &ADeepBranch{} + this.Down = that.GetDown() + return this +} + +type AndDeepBranchFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetLeft() DeepTree + GetRight() DeepTree +} + +func (this *AndDeepBranch) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *AndDeepBranch) TestProto() github_com_gogo_protobuf_proto.Message { + return NewAndDeepBranchFromFace(this) +} + +func (this *AndDeepBranch) GetLeft() DeepTree { + return this.Left +} + +func (this *AndDeepBranch) GetRight() DeepTree { + return this.Right +} + +func NewAndDeepBranchFromFace(that AndDeepBranchFace) *AndDeepBranch { + this := &AndDeepBranch{} + this.Left = that.GetLeft() + this.Right = that.GetRight() + return this +} + +type DeepLeafFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetTree() Tree +} + +func (this *DeepLeaf) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *DeepLeaf) TestProto() github_com_gogo_protobuf_proto.Message { + return NewDeepLeafFromFace(this) +} + +func (this *DeepLeaf) GetTree() Tree { + return this.Tree +} + +func NewDeepLeafFromFace(that DeepLeafFace) *DeepLeaf { + this := &DeepLeaf{} + this.Tree = that.GetTree() + return this +} + +type NilFace interface { + Proto() github_com_gogo_protobuf_proto.Message +} + +func (this *Nil) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *Nil) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNilFromFace(this) +} + +func NewNilFromFace(that NilFace) *Nil { + this := &Nil{} + return this +} + +type NidOptEnumFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetField1() TheTestEnum +} + +func (this *NidOptEnum) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NidOptEnum) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNidOptEnumFromFace(this) +} + +func (this *NidOptEnum) GetField1() TheTestEnum { + return this.Field1 +} + +func NewNidOptEnumFromFace(that NidOptEnumFace) *NidOptEnum { + this := &NidOptEnum{} + this.Field1 = that.GetField1() + return this +} + +type NinOptEnumFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetField1() *TheTestEnum + GetField2() *YetAnotherTestEnum + GetField3() *YetYetAnotherTestEnum +} + +func (this *NinOptEnum) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NinOptEnum) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNinOptEnumFromFace(this) +} + +func (this *NinOptEnum) GetField1() *TheTestEnum { + return this.Field1 +} + +func (this *NinOptEnum) GetField2() *YetAnotherTestEnum { + return this.Field2 +} + +func (this *NinOptEnum) GetField3() *YetYetAnotherTestEnum { + return this.Field3 +} + +func NewNinOptEnumFromFace(that NinOptEnumFace) *NinOptEnum { + this := &NinOptEnum{} + this.Field1 = that.GetField1() + this.Field2 = that.GetField2() + this.Field3 = that.GetField3() + return this +} + +type NidRepEnumFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetField1() []TheTestEnum + GetField2() []YetAnotherTestEnum + GetField3() []YetYetAnotherTestEnum +} + +func (this *NidRepEnum) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NidRepEnum) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNidRepEnumFromFace(this) +} + +func (this *NidRepEnum) GetField1() []TheTestEnum { + return this.Field1 +} + +func (this *NidRepEnum) GetField2() []YetAnotherTestEnum { + return this.Field2 +} + +func (this *NidRepEnum) GetField3() []YetYetAnotherTestEnum { + return this.Field3 +} + +func NewNidRepEnumFromFace(that NidRepEnumFace) *NidRepEnum { + this := &NidRepEnum{} + this.Field1 = that.GetField1() + this.Field2 = that.GetField2() + this.Field3 = that.GetField3() + return this +} + +type NinRepEnumFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetField1() []TheTestEnum + GetField2() []YetAnotherTestEnum + GetField3() []YetYetAnotherTestEnum +} + +func (this *NinRepEnum) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NinRepEnum) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNinRepEnumFromFace(this) +} + +func (this *NinRepEnum) GetField1() []TheTestEnum { + return this.Field1 +} + +func (this *NinRepEnum) GetField2() []YetAnotherTestEnum { + return this.Field2 +} + +func (this *NinRepEnum) GetField3() []YetYetAnotherTestEnum { + return this.Field3 +} + +func NewNinRepEnumFromFace(that NinRepEnumFace) *NinRepEnum { + this := &NinRepEnum{} + this.Field1 = that.GetField1() + this.Field2 = that.GetField2() + this.Field3 = that.GetField3() + return this +} + +type AnotherNinOptEnumFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetField1() *AnotherTestEnum + GetField2() *YetAnotherTestEnum + GetField3() *YetYetAnotherTestEnum +} + +func (this *AnotherNinOptEnum) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *AnotherNinOptEnum) TestProto() github_com_gogo_protobuf_proto.Message { + return NewAnotherNinOptEnumFromFace(this) +} + +func (this *AnotherNinOptEnum) GetField1() *AnotherTestEnum { + return this.Field1 +} + +func (this *AnotherNinOptEnum) GetField2() *YetAnotherTestEnum { + return this.Field2 +} + +func (this *AnotherNinOptEnum) GetField3() *YetYetAnotherTestEnum { + return this.Field3 +} + +func NewAnotherNinOptEnumFromFace(that AnotherNinOptEnumFace) *AnotherNinOptEnum { + this := &AnotherNinOptEnum{} + this.Field1 = that.GetField1() + this.Field2 = that.GetField2() + this.Field3 = that.GetField3() + return this +} + +type TimerFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetTime1() int64 + GetTime2() int64 + GetData() []byte +} + +func (this *Timer) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *Timer) TestProto() github_com_gogo_protobuf_proto.Message { + return NewTimerFromFace(this) +} + +func (this *Timer) GetTime1() int64 { + return this.Time1 +} + +func (this *Timer) GetTime2() int64 { + return this.Time2 +} + +func (this *Timer) GetData() []byte { + return this.Data +} + +func NewTimerFromFace(that TimerFace) *Timer { + this := &Timer{} + this.Time1 = that.GetTime1() + this.Time2 = that.GetTime2() + this.Data = that.GetData() + return this +} + +type NestedDefinitionFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetField1() *int64 + GetEnumField() *NestedDefinition_NestedEnum + GetNNM() *NestedDefinition_NestedMessage_NestedNestedMsg + GetNM() *NestedDefinition_NestedMessage +} + +func (this *NestedDefinition) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NestedDefinition) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNestedDefinitionFromFace(this) +} + +func (this *NestedDefinition) GetField1() *int64 { + return this.Field1 +} + +func (this *NestedDefinition) GetEnumField() *NestedDefinition_NestedEnum { + return this.EnumField +} + +func (this *NestedDefinition) GetNNM() *NestedDefinition_NestedMessage_NestedNestedMsg { + return this.NNM +} + +func (this *NestedDefinition) GetNM() *NestedDefinition_NestedMessage { + return this.NM +} + +func NewNestedDefinitionFromFace(that NestedDefinitionFace) *NestedDefinition { + this := &NestedDefinition{} + this.Field1 = that.GetField1() + this.EnumField = that.GetEnumField() + this.NNM = that.GetNNM() + this.NM = that.GetNM() + return this +} + +type NestedDefinition_NestedMessageFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetNestedField1() *uint64 + GetNNM() *NestedDefinition_NestedMessage_NestedNestedMsg +} + +func (this *NestedDefinition_NestedMessage) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NestedDefinition_NestedMessage) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNestedDefinition_NestedMessageFromFace(this) +} + +func (this *NestedDefinition_NestedMessage) GetNestedField1() *uint64 { + return this.NestedField1 +} + +func (this *NestedDefinition_NestedMessage) GetNNM() *NestedDefinition_NestedMessage_NestedNestedMsg { + return this.NNM +} + +func NewNestedDefinition_NestedMessageFromFace(that NestedDefinition_NestedMessageFace) *NestedDefinition_NestedMessage { + this := &NestedDefinition_NestedMessage{} + this.NestedField1 = that.GetNestedField1() + this.NNM = that.GetNNM() + return this +} + +type NestedDefinition_NestedMessage_NestedNestedMsgFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetNestedNestedField1() *string +} + +func (this *NestedDefinition_NestedMessage_NestedNestedMsg) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NestedDefinition_NestedMessage_NestedNestedMsg) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNestedDefinition_NestedMessage_NestedNestedMsgFromFace(this) +} + +func (this *NestedDefinition_NestedMessage_NestedNestedMsg) GetNestedNestedField1() *string { + return this.NestedNestedField1 +} + +func NewNestedDefinition_NestedMessage_NestedNestedMsgFromFace(that NestedDefinition_NestedMessage_NestedNestedMsgFace) *NestedDefinition_NestedMessage_NestedNestedMsg { + this := &NestedDefinition_NestedMessage_NestedNestedMsg{} + this.NestedNestedField1 = that.GetNestedNestedField1() + return this +} + +type NestedScopeFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetA() *NestedDefinition_NestedMessage_NestedNestedMsg + GetB() *NestedDefinition_NestedEnum + GetC() *NestedDefinition_NestedMessage +} + +func (this *NestedScope) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NestedScope) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNestedScopeFromFace(this) +} + +func (this *NestedScope) GetA() *NestedDefinition_NestedMessage_NestedNestedMsg { + return this.A +} + +func (this *NestedScope) GetB() *NestedDefinition_NestedEnum { + return this.B +} + +func (this *NestedScope) GetC() *NestedDefinition_NestedMessage { + return this.C +} + +func NewNestedScopeFromFace(that NestedScopeFace) *NestedScope { + this := &NestedScope{} + this.A = that.GetA() + this.B = that.GetB() + this.C = that.GetC() + return this +} + +type CustomContainerFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetCustomStruct() NidOptCustom +} + +func (this *CustomContainer) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *CustomContainer) TestProto() github_com_gogo_protobuf_proto.Message { + return NewCustomContainerFromFace(this) +} + +func (this *CustomContainer) GetCustomStruct() NidOptCustom { + return this.CustomStruct +} + +func NewCustomContainerFromFace(that CustomContainerFace) *CustomContainer { + this := &CustomContainer{} + this.CustomStruct = that.GetCustomStruct() + return this +} + +type CustomNameNidOptNativeFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetFieldA() float64 + GetFieldB() float32 + GetFieldC() int32 + GetFieldD() int64 + GetFieldE() uint32 + GetFieldF() uint64 + GetFieldG() int32 + GetFieldH() int64 + GetFieldI() uint32 + GetFieldJ() int32 + GetFieldK() uint64 + GetFieldL() int64 + GetFieldM() bool + GetFieldN() string + GetFieldO() []byte +} + +func (this *CustomNameNidOptNative) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *CustomNameNidOptNative) TestProto() github_com_gogo_protobuf_proto.Message { + return NewCustomNameNidOptNativeFromFace(this) +} + +func (this *CustomNameNidOptNative) GetFieldA() float64 { + return this.FieldA +} + +func (this *CustomNameNidOptNative) GetFieldB() float32 { + return this.FieldB +} + +func (this *CustomNameNidOptNative) GetFieldC() int32 { + return this.FieldC +} + +func (this *CustomNameNidOptNative) GetFieldD() int64 { + return this.FieldD +} + +func (this *CustomNameNidOptNative) GetFieldE() uint32 { + return this.FieldE +} + +func (this *CustomNameNidOptNative) GetFieldF() uint64 { + return this.FieldF +} + +func (this *CustomNameNidOptNative) GetFieldG() int32 { + return this.FieldG +} + +func (this *CustomNameNidOptNative) GetFieldH() int64 { + return this.FieldH +} + +func (this *CustomNameNidOptNative) GetFieldI() uint32 { + return this.FieldI +} + +func (this *CustomNameNidOptNative) GetFieldJ() int32 { + return this.FieldJ +} + +func (this *CustomNameNidOptNative) GetFieldK() uint64 { + return this.FieldK +} + +func (this *CustomNameNidOptNative) GetFieldL() int64 { + return this.FieldL +} + +func (this *CustomNameNidOptNative) GetFieldM() bool { + return this.FieldM +} + +func (this *CustomNameNidOptNative) GetFieldN() string { + return this.FieldN +} + +func (this *CustomNameNidOptNative) GetFieldO() []byte { + return this.FieldO +} + +func NewCustomNameNidOptNativeFromFace(that CustomNameNidOptNativeFace) *CustomNameNidOptNative { + this := &CustomNameNidOptNative{} + this.FieldA = that.GetFieldA() + this.FieldB = that.GetFieldB() + this.FieldC = that.GetFieldC() + this.FieldD = that.GetFieldD() + this.FieldE = that.GetFieldE() + this.FieldF = that.GetFieldF() + this.FieldG = that.GetFieldG() + this.FieldH = that.GetFieldH() + this.FieldI = that.GetFieldI() + this.FieldJ = that.GetFieldJ() + this.FieldK = that.GetFieldK() + this.FieldL = that.GetFieldL() + this.FieldM = that.GetFieldM() + this.FieldN = that.GetFieldN() + this.FieldO = that.GetFieldO() + return this +} + +type CustomNameNinOptNativeFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetFieldA() *float64 + GetFieldB() *float32 + GetFieldC() *int32 + GetFieldD() *int64 + GetFieldE() *uint32 + GetFieldF() *uint64 + GetFieldG() *int32 + GetFieldH() *int64 + GetFieldI() *uint32 + GetFieldJ() *int32 + GetFieldK() *uint64 + GetFielL() *int64 + GetFieldM() *bool + GetFieldN() *string + GetFieldO() []byte +} + +func (this *CustomNameNinOptNative) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *CustomNameNinOptNative) TestProto() github_com_gogo_protobuf_proto.Message { + return NewCustomNameNinOptNativeFromFace(this) +} + +func (this *CustomNameNinOptNative) GetFieldA() *float64 { + return this.FieldA +} + +func (this *CustomNameNinOptNative) GetFieldB() *float32 { + return this.FieldB +} + +func (this *CustomNameNinOptNative) GetFieldC() *int32 { + return this.FieldC +} + +func (this *CustomNameNinOptNative) GetFieldD() *int64 { + return this.FieldD +} + +func (this *CustomNameNinOptNative) GetFieldE() *uint32 { + return this.FieldE +} + +func (this *CustomNameNinOptNative) GetFieldF() *uint64 { + return this.FieldF +} + +func (this *CustomNameNinOptNative) GetFieldG() *int32 { + return this.FieldG +} + +func (this *CustomNameNinOptNative) GetFieldH() *int64 { + return this.FieldH +} + +func (this *CustomNameNinOptNative) GetFieldI() *uint32 { + return this.FieldI +} + +func (this *CustomNameNinOptNative) GetFieldJ() *int32 { + return this.FieldJ +} + +func (this *CustomNameNinOptNative) GetFieldK() *uint64 { + return this.FieldK +} + +func (this *CustomNameNinOptNative) GetFielL() *int64 { + return this.FielL +} + +func (this *CustomNameNinOptNative) GetFieldM() *bool { + return this.FieldM +} + +func (this *CustomNameNinOptNative) GetFieldN() *string { + return this.FieldN +} + +func (this *CustomNameNinOptNative) GetFieldO() []byte { + return this.FieldO +} + +func NewCustomNameNinOptNativeFromFace(that CustomNameNinOptNativeFace) *CustomNameNinOptNative { + this := &CustomNameNinOptNative{} + this.FieldA = that.GetFieldA() + this.FieldB = that.GetFieldB() + this.FieldC = that.GetFieldC() + this.FieldD = that.GetFieldD() + this.FieldE = that.GetFieldE() + this.FieldF = that.GetFieldF() + this.FieldG = that.GetFieldG() + this.FieldH = that.GetFieldH() + this.FieldI = that.GetFieldI() + this.FieldJ = that.GetFieldJ() + this.FieldK = that.GetFieldK() + this.FielL = that.GetFielL() + this.FieldM = that.GetFieldM() + this.FieldN = that.GetFieldN() + this.FieldO = that.GetFieldO() + return this +} + +type CustomNameNinRepNativeFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetFieldA() []float64 + GetFieldB() []float32 + GetFieldC() []int32 + GetFieldD() []int64 + GetFieldE() []uint32 + GetFieldF() []uint64 + GetFieldG() []int32 + GetFieldH() []int64 + GetFieldI() []uint32 + GetFieldJ() []int32 + GetFieldK() []uint64 + GetFieldL() []int64 + GetFieldM() []bool + GetFieldN() []string + GetFieldO() [][]byte +} + +func (this *CustomNameNinRepNative) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *CustomNameNinRepNative) TestProto() github_com_gogo_protobuf_proto.Message { + return NewCustomNameNinRepNativeFromFace(this) +} + +func (this *CustomNameNinRepNative) GetFieldA() []float64 { + return this.FieldA +} + +func (this *CustomNameNinRepNative) GetFieldB() []float32 { + return this.FieldB +} + +func (this *CustomNameNinRepNative) GetFieldC() []int32 { + return this.FieldC +} + +func (this *CustomNameNinRepNative) GetFieldD() []int64 { + return this.FieldD +} + +func (this *CustomNameNinRepNative) GetFieldE() []uint32 { + return this.FieldE +} + +func (this *CustomNameNinRepNative) GetFieldF() []uint64 { + return this.FieldF +} + +func (this *CustomNameNinRepNative) GetFieldG() []int32 { + return this.FieldG +} + +func (this *CustomNameNinRepNative) GetFieldH() []int64 { + return this.FieldH +} + +func (this *CustomNameNinRepNative) GetFieldI() []uint32 { + return this.FieldI +} + +func (this *CustomNameNinRepNative) GetFieldJ() []int32 { + return this.FieldJ +} + +func (this *CustomNameNinRepNative) GetFieldK() []uint64 { + return this.FieldK +} + +func (this *CustomNameNinRepNative) GetFieldL() []int64 { + return this.FieldL +} + +func (this *CustomNameNinRepNative) GetFieldM() []bool { + return this.FieldM +} + +func (this *CustomNameNinRepNative) GetFieldN() []string { + return this.FieldN +} + +func (this *CustomNameNinRepNative) GetFieldO() [][]byte { + return this.FieldO +} + +func NewCustomNameNinRepNativeFromFace(that CustomNameNinRepNativeFace) *CustomNameNinRepNative { + this := &CustomNameNinRepNative{} + this.FieldA = that.GetFieldA() + this.FieldB = that.GetFieldB() + this.FieldC = that.GetFieldC() + this.FieldD = that.GetFieldD() + this.FieldE = that.GetFieldE() + this.FieldF = that.GetFieldF() + this.FieldG = that.GetFieldG() + this.FieldH = that.GetFieldH() + this.FieldI = that.GetFieldI() + this.FieldJ = that.GetFieldJ() + this.FieldK = that.GetFieldK() + this.FieldL = that.GetFieldL() + this.FieldM = that.GetFieldM() + this.FieldN = that.GetFieldN() + this.FieldO = that.GetFieldO() + return this +} + +type CustomNameNinStructFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetFieldA() *float64 + GetFieldB() *float32 + GetFieldC() *NidOptNative + GetFieldD() []*NinOptNative + GetFieldE() *uint64 + GetFieldF() *int32 + GetFieldG() *NidOptNative + GetFieldH() *bool + GetFieldI() *string + GetFieldJ() []byte +} + +func (this *CustomNameNinStruct) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *CustomNameNinStruct) TestProto() github_com_gogo_protobuf_proto.Message { + return NewCustomNameNinStructFromFace(this) +} + +func (this *CustomNameNinStruct) GetFieldA() *float64 { + return this.FieldA +} + +func (this *CustomNameNinStruct) GetFieldB() *float32 { + return this.FieldB +} + +func (this *CustomNameNinStruct) GetFieldC() *NidOptNative { + return this.FieldC +} + +func (this *CustomNameNinStruct) GetFieldD() []*NinOptNative { + return this.FieldD +} + +func (this *CustomNameNinStruct) GetFieldE() *uint64 { + return this.FieldE +} + +func (this *CustomNameNinStruct) GetFieldF() *int32 { + return this.FieldF +} + +func (this *CustomNameNinStruct) GetFieldG() *NidOptNative { + return this.FieldG +} + +func (this *CustomNameNinStruct) GetFieldH() *bool { + return this.FieldH +} + +func (this *CustomNameNinStruct) GetFieldI() *string { + return this.FieldI +} + +func (this *CustomNameNinStruct) GetFieldJ() []byte { + return this.FieldJ +} + +func NewCustomNameNinStructFromFace(that CustomNameNinStructFace) *CustomNameNinStruct { + this := &CustomNameNinStruct{} + this.FieldA = that.GetFieldA() + this.FieldB = that.GetFieldB() + this.FieldC = that.GetFieldC() + this.FieldD = that.GetFieldD() + this.FieldE = that.GetFieldE() + this.FieldF = that.GetFieldF() + this.FieldG = that.GetFieldG() + this.FieldH = that.GetFieldH() + this.FieldI = that.GetFieldI() + this.FieldJ = that.GetFieldJ() + return this +} + +type CustomNameCustomTypeFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetFieldA() *Uuid + GetFieldB() *github_com_gogo_protobuf_test_custom.Uint128 + GetFieldC() []Uuid + GetFieldD() []github_com_gogo_protobuf_test_custom.Uint128 +} + +func (this *CustomNameCustomType) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *CustomNameCustomType) TestProto() github_com_gogo_protobuf_proto.Message { + return NewCustomNameCustomTypeFromFace(this) +} + +func (this *CustomNameCustomType) GetFieldA() *Uuid { + return this.FieldA +} + +func (this *CustomNameCustomType) GetFieldB() *github_com_gogo_protobuf_test_custom.Uint128 { + return this.FieldB +} + +func (this *CustomNameCustomType) GetFieldC() []Uuid { + return this.FieldC +} + +func (this *CustomNameCustomType) GetFieldD() []github_com_gogo_protobuf_test_custom.Uint128 { + return this.FieldD +} + +func NewCustomNameCustomTypeFromFace(that CustomNameCustomTypeFace) *CustomNameCustomType { + this := &CustomNameCustomType{} + this.FieldA = that.GetFieldA() + this.FieldB = that.GetFieldB() + this.FieldC = that.GetFieldC() + this.FieldD = that.GetFieldD() + return this +} + +type CustomNameNinEmbeddedStructUnionFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetNidOptNative() *NidOptNative + GetFieldA() *NinOptNative + GetFieldB() *bool +} + +func (this *CustomNameNinEmbeddedStructUnion) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *CustomNameNinEmbeddedStructUnion) TestProto() github_com_gogo_protobuf_proto.Message { + return NewCustomNameNinEmbeddedStructUnionFromFace(this) +} + +func (this *CustomNameNinEmbeddedStructUnion) GetNidOptNative() *NidOptNative { + return this.NidOptNative +} + +func (this *CustomNameNinEmbeddedStructUnion) GetFieldA() *NinOptNative { + return this.FieldA +} + +func (this *CustomNameNinEmbeddedStructUnion) GetFieldB() *bool { + return this.FieldB +} + +func NewCustomNameNinEmbeddedStructUnionFromFace(that CustomNameNinEmbeddedStructUnionFace) *CustomNameNinEmbeddedStructUnion { + this := &CustomNameNinEmbeddedStructUnion{} + this.NidOptNative = that.GetNidOptNative() + this.FieldA = that.GetFieldA() + this.FieldB = that.GetFieldB() + return this +} + +type CustomNameEnumFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetFieldA() *TheTestEnum + GetFieldB() []TheTestEnum +} + +func (this *CustomNameEnum) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *CustomNameEnum) TestProto() github_com_gogo_protobuf_proto.Message { + return NewCustomNameEnumFromFace(this) +} + +func (this *CustomNameEnum) GetFieldA() *TheTestEnum { + return this.FieldA +} + +func (this *CustomNameEnum) GetFieldB() []TheTestEnum { + return this.FieldB +} + +func NewCustomNameEnumFromFace(that CustomNameEnumFace) *CustomNameEnum { + this := &CustomNameEnum{} + this.FieldA = that.GetFieldA() + this.FieldB = that.GetFieldB() + return this +} + +type UnrecognizedFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetField1() *string +} + +func (this *Unrecognized) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *Unrecognized) TestProto() github_com_gogo_protobuf_proto.Message { + return NewUnrecognizedFromFace(this) +} + +func (this *Unrecognized) GetField1() *string { + return this.Field1 +} + +func NewUnrecognizedFromFace(that UnrecognizedFace) *Unrecognized { + this := &Unrecognized{} + this.Field1 = that.GetField1() + return this +} + +type UnrecognizedWithInnerFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetEmbedded() []*UnrecognizedWithInner_Inner + GetField2() *string +} + +func (this *UnrecognizedWithInner) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *UnrecognizedWithInner) TestProto() github_com_gogo_protobuf_proto.Message { + return NewUnrecognizedWithInnerFromFace(this) +} + +func (this *UnrecognizedWithInner) GetEmbedded() []*UnrecognizedWithInner_Inner { + return this.Embedded +} + +func (this *UnrecognizedWithInner) GetField2() *string { + return this.Field2 +} + +func NewUnrecognizedWithInnerFromFace(that UnrecognizedWithInnerFace) *UnrecognizedWithInner { + this := &UnrecognizedWithInner{} + this.Embedded = that.GetEmbedded() + this.Field2 = that.GetField2() + return this +} + +type UnrecognizedWithInner_InnerFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetField1() *uint32 +} + +func (this *UnrecognizedWithInner_Inner) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *UnrecognizedWithInner_Inner) TestProto() github_com_gogo_protobuf_proto.Message { + return NewUnrecognizedWithInner_InnerFromFace(this) +} + +func (this *UnrecognizedWithInner_Inner) GetField1() *uint32 { + return this.Field1 +} + +func NewUnrecognizedWithInner_InnerFromFace(that UnrecognizedWithInner_InnerFace) *UnrecognizedWithInner_Inner { + this := &UnrecognizedWithInner_Inner{} + this.Field1 = that.GetField1() + return this +} + +type UnrecognizedWithEmbedFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetUnrecognizedWithEmbed_Embedded() UnrecognizedWithEmbed_Embedded + GetField2() *string +} + +func (this *UnrecognizedWithEmbed) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *UnrecognizedWithEmbed) TestProto() github_com_gogo_protobuf_proto.Message { + return NewUnrecognizedWithEmbedFromFace(this) +} + +func (this *UnrecognizedWithEmbed) GetUnrecognizedWithEmbed_Embedded() UnrecognizedWithEmbed_Embedded { + return this.UnrecognizedWithEmbed_Embedded +} + +func (this *UnrecognizedWithEmbed) GetField2() *string { + return this.Field2 +} + +func NewUnrecognizedWithEmbedFromFace(that UnrecognizedWithEmbedFace) *UnrecognizedWithEmbed { + this := &UnrecognizedWithEmbed{} + this.UnrecognizedWithEmbed_Embedded = that.GetUnrecognizedWithEmbed_Embedded() + this.Field2 = that.GetField2() + return this +} + +type UnrecognizedWithEmbed_EmbeddedFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetField1() *uint32 +} + +func (this *UnrecognizedWithEmbed_Embedded) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *UnrecognizedWithEmbed_Embedded) TestProto() github_com_gogo_protobuf_proto.Message { + return NewUnrecognizedWithEmbed_EmbeddedFromFace(this) +} + +func (this *UnrecognizedWithEmbed_Embedded) GetField1() *uint32 { + return this.Field1 +} + +func NewUnrecognizedWithEmbed_EmbeddedFromFace(that UnrecognizedWithEmbed_EmbeddedFace) *UnrecognizedWithEmbed_Embedded { + this := &UnrecognizedWithEmbed_Embedded{} + this.Field1 = that.GetField1() + return this +} + +type NodeFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetLabel() *string + GetChildren() []*Node +} + +func (this *Node) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *Node) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNodeFromFace(this) +} + +func (this *Node) GetLabel() *string { + return this.Label +} + +func (this *Node) GetChildren() []*Node { + return this.Children +} + +func NewNodeFromFace(that NodeFace) *Node { + this := &Node{} + this.Label = that.GetLabel() + this.Children = that.GetChildren() + return this +} + +func (this *NidOptNative) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 19) + s = append(s, "&test.NidOptNative{") + s = append(s, "Field1: "+fmt.Sprintf("%#v", this.Field1)+",\n") + s = append(s, "Field2: "+fmt.Sprintf("%#v", this.Field2)+",\n") + s = append(s, "Field3: "+fmt.Sprintf("%#v", this.Field3)+",\n") + s = append(s, "Field4: "+fmt.Sprintf("%#v", this.Field4)+",\n") + s = append(s, "Field5: "+fmt.Sprintf("%#v", this.Field5)+",\n") + s = append(s, "Field6: "+fmt.Sprintf("%#v", this.Field6)+",\n") + s = append(s, "Field7: "+fmt.Sprintf("%#v", this.Field7)+",\n") + s = append(s, "Field8: "+fmt.Sprintf("%#v", this.Field8)+",\n") + s = append(s, "Field9: "+fmt.Sprintf("%#v", this.Field9)+",\n") + s = append(s, "Field10: "+fmt.Sprintf("%#v", this.Field10)+",\n") + s = append(s, "Field11: "+fmt.Sprintf("%#v", this.Field11)+",\n") + s = append(s, "Field12: "+fmt.Sprintf("%#v", this.Field12)+",\n") + s = append(s, "Field13: "+fmt.Sprintf("%#v", this.Field13)+",\n") + s = append(s, "Field14: "+fmt.Sprintf("%#v", this.Field14)+",\n") + s = append(s, "Field15: "+fmt.Sprintf("%#v", this.Field15)+",\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 *NinOptNative) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 19) + s = append(s, "&test.NinOptNative{") + if this.Field1 != nil { + s = append(s, "Field1: "+valueToGoStringThetest(this.Field1, "float64")+",\n") + } + if this.Field2 != nil { + s = append(s, "Field2: "+valueToGoStringThetest(this.Field2, "float32")+",\n") + } + if this.Field3 != nil { + s = append(s, "Field3: "+valueToGoStringThetest(this.Field3, "int32")+",\n") + } + if this.Field4 != nil { + s = append(s, "Field4: "+valueToGoStringThetest(this.Field4, "int64")+",\n") + } + if this.Field5 != nil { + s = append(s, "Field5: "+valueToGoStringThetest(this.Field5, "uint32")+",\n") + } + if this.Field6 != nil { + s = append(s, "Field6: "+valueToGoStringThetest(this.Field6, "uint64")+",\n") + } + if this.Field7 != nil { + s = append(s, "Field7: "+valueToGoStringThetest(this.Field7, "int32")+",\n") + } + if this.Field8 != nil { + s = append(s, "Field8: "+valueToGoStringThetest(this.Field8, "int64")+",\n") + } + if this.Field9 != nil { + s = append(s, "Field9: "+valueToGoStringThetest(this.Field9, "uint32")+",\n") + } + if this.Field10 != nil { + s = append(s, "Field10: "+valueToGoStringThetest(this.Field10, "int32")+",\n") + } + if this.Field11 != nil { + s = append(s, "Field11: "+valueToGoStringThetest(this.Field11, "uint64")+",\n") + } + if this.Field12 != nil { + s = append(s, "Field12: "+valueToGoStringThetest(this.Field12, "int64")+",\n") + } + if this.Field13 != nil { + s = append(s, "Field13: "+valueToGoStringThetest(this.Field13, "bool")+",\n") + } + if this.Field14 != nil { + s = append(s, "Field14: "+valueToGoStringThetest(this.Field14, "string")+",\n") + } + if this.Field15 != nil { + s = append(s, "Field15: "+valueToGoStringThetest(this.Field15, "byte")+",\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 *NidRepNative) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 19) + s = append(s, "&test.NidRepNative{") + if this.Field1 != nil { + s = append(s, "Field1: "+fmt.Sprintf("%#v", this.Field1)+",\n") + } + if this.Field2 != nil { + s = append(s, "Field2: "+fmt.Sprintf("%#v", this.Field2)+",\n") + } + if this.Field3 != nil { + s = append(s, "Field3: "+fmt.Sprintf("%#v", this.Field3)+",\n") + } + if this.Field4 != nil { + s = append(s, "Field4: "+fmt.Sprintf("%#v", this.Field4)+",\n") + } + if this.Field5 != nil { + s = append(s, "Field5: "+fmt.Sprintf("%#v", this.Field5)+",\n") + } + if this.Field6 != nil { + s = append(s, "Field6: "+fmt.Sprintf("%#v", this.Field6)+",\n") + } + if this.Field7 != nil { + s = append(s, "Field7: "+fmt.Sprintf("%#v", this.Field7)+",\n") + } + if this.Field8 != nil { + s = append(s, "Field8: "+fmt.Sprintf("%#v", this.Field8)+",\n") + } + if this.Field9 != nil { + s = append(s, "Field9: "+fmt.Sprintf("%#v", this.Field9)+",\n") + } + if this.Field10 != nil { + s = append(s, "Field10: "+fmt.Sprintf("%#v", this.Field10)+",\n") + } + if this.Field11 != nil { + s = append(s, "Field11: "+fmt.Sprintf("%#v", this.Field11)+",\n") + } + if this.Field12 != nil { + s = append(s, "Field12: "+fmt.Sprintf("%#v", this.Field12)+",\n") + } + if this.Field13 != nil { + s = append(s, "Field13: "+fmt.Sprintf("%#v", this.Field13)+",\n") + } + if this.Field14 != nil { + s = append(s, "Field14: "+fmt.Sprintf("%#v", this.Field14)+",\n") + } + if this.Field15 != nil { + s = append(s, "Field15: "+fmt.Sprintf("%#v", this.Field15)+",\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 *NinRepNative) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 19) + s = append(s, "&test.NinRepNative{") + if this.Field1 != nil { + s = append(s, "Field1: "+fmt.Sprintf("%#v", this.Field1)+",\n") + } + if this.Field2 != nil { + s = append(s, "Field2: "+fmt.Sprintf("%#v", this.Field2)+",\n") + } + if this.Field3 != nil { + s = append(s, "Field3: "+fmt.Sprintf("%#v", this.Field3)+",\n") + } + if this.Field4 != nil { + s = append(s, "Field4: "+fmt.Sprintf("%#v", this.Field4)+",\n") + } + if this.Field5 != nil { + s = append(s, "Field5: "+fmt.Sprintf("%#v", this.Field5)+",\n") + } + if this.Field6 != nil { + s = append(s, "Field6: "+fmt.Sprintf("%#v", this.Field6)+",\n") + } + if this.Field7 != nil { + s = append(s, "Field7: "+fmt.Sprintf("%#v", this.Field7)+",\n") + } + if this.Field8 != nil { + s = append(s, "Field8: "+fmt.Sprintf("%#v", this.Field8)+",\n") + } + if this.Field9 != nil { + s = append(s, "Field9: "+fmt.Sprintf("%#v", this.Field9)+",\n") + } + if this.Field10 != nil { + s = append(s, "Field10: "+fmt.Sprintf("%#v", this.Field10)+",\n") + } + if this.Field11 != nil { + s = append(s, "Field11: "+fmt.Sprintf("%#v", this.Field11)+",\n") + } + if this.Field12 != nil { + s = append(s, "Field12: "+fmt.Sprintf("%#v", this.Field12)+",\n") + } + if this.Field13 != nil { + s = append(s, "Field13: "+fmt.Sprintf("%#v", this.Field13)+",\n") + } + if this.Field14 != nil { + s = append(s, "Field14: "+fmt.Sprintf("%#v", this.Field14)+",\n") + } + if this.Field15 != nil { + s = append(s, "Field15: "+fmt.Sprintf("%#v", this.Field15)+",\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 *NidRepPackedNative) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 17) + s = append(s, "&test.NidRepPackedNative{") + if this.Field1 != nil { + s = append(s, "Field1: "+fmt.Sprintf("%#v", this.Field1)+",\n") + } + if this.Field2 != nil { + s = append(s, "Field2: "+fmt.Sprintf("%#v", this.Field2)+",\n") + } + if this.Field3 != nil { + s = append(s, "Field3: "+fmt.Sprintf("%#v", this.Field3)+",\n") + } + if this.Field4 != nil { + s = append(s, "Field4: "+fmt.Sprintf("%#v", this.Field4)+",\n") + } + if this.Field5 != nil { + s = append(s, "Field5: "+fmt.Sprintf("%#v", this.Field5)+",\n") + } + if this.Field6 != nil { + s = append(s, "Field6: "+fmt.Sprintf("%#v", this.Field6)+",\n") + } + if this.Field7 != nil { + s = append(s, "Field7: "+fmt.Sprintf("%#v", this.Field7)+",\n") + } + if this.Field8 != nil { + s = append(s, "Field8: "+fmt.Sprintf("%#v", this.Field8)+",\n") + } + if this.Field9 != nil { + s = append(s, "Field9: "+fmt.Sprintf("%#v", this.Field9)+",\n") + } + if this.Field10 != nil { + s = append(s, "Field10: "+fmt.Sprintf("%#v", this.Field10)+",\n") + } + if this.Field11 != nil { + s = append(s, "Field11: "+fmt.Sprintf("%#v", this.Field11)+",\n") + } + if this.Field12 != nil { + s = append(s, "Field12: "+fmt.Sprintf("%#v", this.Field12)+",\n") + } + if this.Field13 != nil { + s = append(s, "Field13: "+fmt.Sprintf("%#v", this.Field13)+",\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 *NinRepPackedNative) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 17) + s = append(s, "&test.NinRepPackedNative{") + if this.Field1 != nil { + s = append(s, "Field1: "+fmt.Sprintf("%#v", this.Field1)+",\n") + } + if this.Field2 != nil { + s = append(s, "Field2: "+fmt.Sprintf("%#v", this.Field2)+",\n") + } + if this.Field3 != nil { + s = append(s, "Field3: "+fmt.Sprintf("%#v", this.Field3)+",\n") + } + if this.Field4 != nil { + s = append(s, "Field4: "+fmt.Sprintf("%#v", this.Field4)+",\n") + } + if this.Field5 != nil { + s = append(s, "Field5: "+fmt.Sprintf("%#v", this.Field5)+",\n") + } + if this.Field6 != nil { + s = append(s, "Field6: "+fmt.Sprintf("%#v", this.Field6)+",\n") + } + if this.Field7 != nil { + s = append(s, "Field7: "+fmt.Sprintf("%#v", this.Field7)+",\n") + } + if this.Field8 != nil { + s = append(s, "Field8: "+fmt.Sprintf("%#v", this.Field8)+",\n") + } + if this.Field9 != nil { + s = append(s, "Field9: "+fmt.Sprintf("%#v", this.Field9)+",\n") + } + if this.Field10 != nil { + s = append(s, "Field10: "+fmt.Sprintf("%#v", this.Field10)+",\n") + } + if this.Field11 != nil { + s = append(s, "Field11: "+fmt.Sprintf("%#v", this.Field11)+",\n") + } + if this.Field12 != nil { + s = append(s, "Field12: "+fmt.Sprintf("%#v", this.Field12)+",\n") + } + if this.Field13 != nil { + s = append(s, "Field13: "+fmt.Sprintf("%#v", this.Field13)+",\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 *NidOptStruct) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 14) + s = append(s, "&test.NidOptStruct{") + s = append(s, "Field1: "+fmt.Sprintf("%#v", this.Field1)+",\n") + s = append(s, "Field2: "+fmt.Sprintf("%#v", this.Field2)+",\n") + s = append(s, "Field3: "+strings.Replace(this.Field3.GoString(), `&`, ``, 1)+",\n") + s = append(s, "Field4: "+strings.Replace(this.Field4.GoString(), `&`, ``, 1)+",\n") + s = append(s, "Field6: "+fmt.Sprintf("%#v", this.Field6)+",\n") + s = append(s, "Field7: "+fmt.Sprintf("%#v", this.Field7)+",\n") + s = append(s, "Field8: "+strings.Replace(this.Field8.GoString(), `&`, ``, 1)+",\n") + s = append(s, "Field13: "+fmt.Sprintf("%#v", this.Field13)+",\n") + s = append(s, "Field14: "+fmt.Sprintf("%#v", this.Field14)+",\n") + s = append(s, "Field15: "+fmt.Sprintf("%#v", this.Field15)+",\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 *NinOptStruct) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 14) + s = append(s, "&test.NinOptStruct{") + if this.Field1 != nil { + s = append(s, "Field1: "+valueToGoStringThetest(this.Field1, "float64")+",\n") + } + if this.Field2 != nil { + s = append(s, "Field2: "+valueToGoStringThetest(this.Field2, "float32")+",\n") + } + if this.Field3 != nil { + s = append(s, "Field3: "+fmt.Sprintf("%#v", this.Field3)+",\n") + } + if this.Field4 != nil { + s = append(s, "Field4: "+fmt.Sprintf("%#v", this.Field4)+",\n") + } + if this.Field6 != nil { + s = append(s, "Field6: "+valueToGoStringThetest(this.Field6, "uint64")+",\n") + } + if this.Field7 != nil { + s = append(s, "Field7: "+valueToGoStringThetest(this.Field7, "int32")+",\n") + } + if this.Field8 != nil { + s = append(s, "Field8: "+fmt.Sprintf("%#v", this.Field8)+",\n") + } + if this.Field13 != nil { + s = append(s, "Field13: "+valueToGoStringThetest(this.Field13, "bool")+",\n") + } + if this.Field14 != nil { + s = append(s, "Field14: "+valueToGoStringThetest(this.Field14, "string")+",\n") + } + if this.Field15 != nil { + s = append(s, "Field15: "+valueToGoStringThetest(this.Field15, "byte")+",\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 *NidRepStruct) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 14) + s = append(s, "&test.NidRepStruct{") + if this.Field1 != nil { + s = append(s, "Field1: "+fmt.Sprintf("%#v", this.Field1)+",\n") + } + if this.Field2 != nil { + s = append(s, "Field2: "+fmt.Sprintf("%#v", this.Field2)+",\n") + } + if this.Field3 != nil { + s = append(s, "Field3: "+fmt.Sprintf("%#v", this.Field3)+",\n") + } + if this.Field4 != nil { + s = append(s, "Field4: "+fmt.Sprintf("%#v", this.Field4)+",\n") + } + if this.Field6 != nil { + s = append(s, "Field6: "+fmt.Sprintf("%#v", this.Field6)+",\n") + } + if this.Field7 != nil { + s = append(s, "Field7: "+fmt.Sprintf("%#v", this.Field7)+",\n") + } + if this.Field8 != nil { + s = append(s, "Field8: "+fmt.Sprintf("%#v", this.Field8)+",\n") + } + if this.Field13 != nil { + s = append(s, "Field13: "+fmt.Sprintf("%#v", this.Field13)+",\n") + } + if this.Field14 != nil { + s = append(s, "Field14: "+fmt.Sprintf("%#v", this.Field14)+",\n") + } + if this.Field15 != nil { + s = append(s, "Field15: "+fmt.Sprintf("%#v", this.Field15)+",\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 *NinRepStruct) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 14) + s = append(s, "&test.NinRepStruct{") + if this.Field1 != nil { + s = append(s, "Field1: "+fmt.Sprintf("%#v", this.Field1)+",\n") + } + if this.Field2 != nil { + s = append(s, "Field2: "+fmt.Sprintf("%#v", this.Field2)+",\n") + } + if this.Field3 != nil { + s = append(s, "Field3: "+fmt.Sprintf("%#v", this.Field3)+",\n") + } + if this.Field4 != nil { + s = append(s, "Field4: "+fmt.Sprintf("%#v", this.Field4)+",\n") + } + if this.Field6 != nil { + s = append(s, "Field6: "+fmt.Sprintf("%#v", this.Field6)+",\n") + } + if this.Field7 != nil { + s = append(s, "Field7: "+fmt.Sprintf("%#v", this.Field7)+",\n") + } + if this.Field8 != nil { + s = append(s, "Field8: "+fmt.Sprintf("%#v", this.Field8)+",\n") + } + if this.Field13 != nil { + s = append(s, "Field13: "+fmt.Sprintf("%#v", this.Field13)+",\n") + } + if this.Field14 != nil { + s = append(s, "Field14: "+fmt.Sprintf("%#v", this.Field14)+",\n") + } + if this.Field15 != nil { + s = append(s, "Field15: "+fmt.Sprintf("%#v", this.Field15)+",\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 *NidEmbeddedStruct) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 7) + s = append(s, "&test.NidEmbeddedStruct{") + if this.NidOptNative != nil { + s = append(s, "NidOptNative: "+fmt.Sprintf("%#v", this.NidOptNative)+",\n") + } + s = append(s, "Field200: "+strings.Replace(this.Field200.GoString(), `&`, ``, 1)+",\n") + s = append(s, "Field210: "+fmt.Sprintf("%#v", this.Field210)+",\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 *NinEmbeddedStruct) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 7) + s = append(s, "&test.NinEmbeddedStruct{") + if this.NidOptNative != nil { + s = append(s, "NidOptNative: "+fmt.Sprintf("%#v", this.NidOptNative)+",\n") + } + if this.Field200 != nil { + s = append(s, "Field200: "+fmt.Sprintf("%#v", this.Field200)+",\n") + } + if this.Field210 != nil { + s = append(s, "Field210: "+valueToGoStringThetest(this.Field210, "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 *NidNestedStruct) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 6) + s = append(s, "&test.NidNestedStruct{") + s = append(s, "Field1: "+strings.Replace(this.Field1.GoString(), `&`, ``, 1)+",\n") + if this.Field2 != nil { + s = append(s, "Field2: "+fmt.Sprintf("%#v", this.Field2)+",\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 *NinNestedStruct) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 6) + s = append(s, "&test.NinNestedStruct{") + if this.Field1 != nil { + s = append(s, "Field1: "+fmt.Sprintf("%#v", this.Field1)+",\n") + } + if this.Field2 != nil { + s = append(s, "Field2: "+fmt.Sprintf("%#v", this.Field2)+",\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 *NidOptCustom) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 6) + s = append(s, "&test.NidOptCustom{") + s = append(s, "Id: "+fmt.Sprintf("%#v", this.Id)+",\n") + s = append(s, "Value: "+fmt.Sprintf("%#v", this.Value)+",\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 *CustomDash) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&test.CustomDash{") + if this.Value != nil { + s = append(s, "Value: "+valueToGoStringThetest(this.Value, "github_com_gogo_protobuf_test_custom_dash_type.Bytes")+",\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 *NinOptCustom) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 6) + s = append(s, "&test.NinOptCustom{") + if this.Id != nil { + s = append(s, "Id: "+valueToGoStringThetest(this.Id, "Uuid")+",\n") + } + if this.Value != nil { + s = append(s, "Value: "+valueToGoStringThetest(this.Value, "github_com_gogo_protobuf_test_custom.Uint128")+",\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 *NidRepCustom) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 6) + s = append(s, "&test.NidRepCustom{") + if this.Id != nil { + s = append(s, "Id: "+fmt.Sprintf("%#v", this.Id)+",\n") + } + if this.Value != nil { + s = append(s, "Value: "+fmt.Sprintf("%#v", this.Value)+",\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 *NinRepCustom) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 6) + s = append(s, "&test.NinRepCustom{") + if this.Id != nil { + s = append(s, "Id: "+fmt.Sprintf("%#v", this.Id)+",\n") + } + if this.Value != nil { + s = append(s, "Value: "+fmt.Sprintf("%#v", this.Value)+",\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 *NinOptNativeUnion) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 13) + s = append(s, "&test.NinOptNativeUnion{") + if this.Field1 != nil { + s = append(s, "Field1: "+valueToGoStringThetest(this.Field1, "float64")+",\n") + } + if this.Field2 != nil { + s = append(s, "Field2: "+valueToGoStringThetest(this.Field2, "float32")+",\n") + } + if this.Field3 != nil { + s = append(s, "Field3: "+valueToGoStringThetest(this.Field3, "int32")+",\n") + } + if this.Field4 != nil { + s = append(s, "Field4: "+valueToGoStringThetest(this.Field4, "int64")+",\n") + } + if this.Field5 != nil { + s = append(s, "Field5: "+valueToGoStringThetest(this.Field5, "uint32")+",\n") + } + if this.Field6 != nil { + s = append(s, "Field6: "+valueToGoStringThetest(this.Field6, "uint64")+",\n") + } + if this.Field13 != nil { + s = append(s, "Field13: "+valueToGoStringThetest(this.Field13, "bool")+",\n") + } + if this.Field14 != nil { + s = append(s, "Field14: "+valueToGoStringThetest(this.Field14, "string")+",\n") + } + if this.Field15 != nil { + s = append(s, "Field15: "+valueToGoStringThetest(this.Field15, "byte")+",\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 *NinOptStructUnion) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 13) + s = append(s, "&test.NinOptStructUnion{") + if this.Field1 != nil { + s = append(s, "Field1: "+valueToGoStringThetest(this.Field1, "float64")+",\n") + } + if this.Field2 != nil { + s = append(s, "Field2: "+valueToGoStringThetest(this.Field2, "float32")+",\n") + } + if this.Field3 != nil { + s = append(s, "Field3: "+fmt.Sprintf("%#v", this.Field3)+",\n") + } + if this.Field4 != nil { + s = append(s, "Field4: "+fmt.Sprintf("%#v", this.Field4)+",\n") + } + if this.Field6 != nil { + s = append(s, "Field6: "+valueToGoStringThetest(this.Field6, "uint64")+",\n") + } + if this.Field7 != nil { + s = append(s, "Field7: "+valueToGoStringThetest(this.Field7, "int32")+",\n") + } + if this.Field13 != nil { + s = append(s, "Field13: "+valueToGoStringThetest(this.Field13, "bool")+",\n") + } + if this.Field14 != nil { + s = append(s, "Field14: "+valueToGoStringThetest(this.Field14, "string")+",\n") + } + if this.Field15 != nil { + s = append(s, "Field15: "+valueToGoStringThetest(this.Field15, "byte")+",\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 *NinEmbeddedStructUnion) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 7) + s = append(s, "&test.NinEmbeddedStructUnion{") + if this.NidOptNative != nil { + s = append(s, "NidOptNative: "+fmt.Sprintf("%#v", this.NidOptNative)+",\n") + } + if this.Field200 != nil { + s = append(s, "Field200: "+fmt.Sprintf("%#v", this.Field200)+",\n") + } + if this.Field210 != nil { + s = append(s, "Field210: "+valueToGoStringThetest(this.Field210, "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 *NinNestedStructUnion) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 7) + s = append(s, "&test.NinNestedStructUnion{") + if this.Field1 != nil { + s = append(s, "Field1: "+fmt.Sprintf("%#v", this.Field1)+",\n") + } + if this.Field2 != nil { + s = append(s, "Field2: "+fmt.Sprintf("%#v", this.Field2)+",\n") + } + if this.Field3 != nil { + s = append(s, "Field3: "+fmt.Sprintf("%#v", this.Field3)+",\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 *Tree) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 7) + s = append(s, "&test.Tree{") + if this.Or != nil { + s = append(s, "Or: "+fmt.Sprintf("%#v", this.Or)+",\n") + } + if this.And != nil { + s = append(s, "And: "+fmt.Sprintf("%#v", this.And)+",\n") + } + if this.Leaf != nil { + s = append(s, "Leaf: "+fmt.Sprintf("%#v", this.Leaf)+",\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 *OrBranch) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 6) + s = append(s, "&test.OrBranch{") + s = append(s, "Left: "+strings.Replace(this.Left.GoString(), `&`, ``, 1)+",\n") + s = append(s, "Right: "+strings.Replace(this.Right.GoString(), `&`, ``, 1)+",\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 *AndBranch) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 6) + s = append(s, "&test.AndBranch{") + s = append(s, "Left: "+strings.Replace(this.Left.GoString(), `&`, ``, 1)+",\n") + s = append(s, "Right: "+strings.Replace(this.Right.GoString(), `&`, ``, 1)+",\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 *Leaf) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 6) + s = append(s, "&test.Leaf{") + s = append(s, "Value: "+fmt.Sprintf("%#v", this.Value)+",\n") + s = append(s, "StrValue: "+fmt.Sprintf("%#v", this.StrValue)+",\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 *DeepTree) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 7) + s = append(s, "&test.DeepTree{") + if this.Down != nil { + s = append(s, "Down: "+fmt.Sprintf("%#v", this.Down)+",\n") + } + if this.And != nil { + s = append(s, "And: "+fmt.Sprintf("%#v", this.And)+",\n") + } + if this.Leaf != nil { + s = append(s, "Leaf: "+fmt.Sprintf("%#v", this.Leaf)+",\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 *ADeepBranch) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&test.ADeepBranch{") + s = append(s, "Down: "+strings.Replace(this.Down.GoString(), `&`, ``, 1)+",\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 *AndDeepBranch) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 6) + s = append(s, "&test.AndDeepBranch{") + s = append(s, "Left: "+strings.Replace(this.Left.GoString(), `&`, ``, 1)+",\n") + s = append(s, "Right: "+strings.Replace(this.Right.GoString(), `&`, ``, 1)+",\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 *DeepLeaf) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&test.DeepLeaf{") + s = append(s, "Tree: "+strings.Replace(this.Tree.GoString(), `&`, ``, 1)+",\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 *Nil) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 4) + s = append(s, "&test.Nil{") + 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 *NidOptEnum) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&test.NidOptEnum{") + s = append(s, "Field1: "+fmt.Sprintf("%#v", this.Field1)+",\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 *NinOptEnum) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 7) + s = append(s, "&test.NinOptEnum{") + if this.Field1 != nil { + s = append(s, "Field1: "+valueToGoStringThetest(this.Field1, "test.TheTestEnum")+",\n") + } + if this.Field2 != nil { + s = append(s, "Field2: "+valueToGoStringThetest(this.Field2, "test.YetAnotherTestEnum")+",\n") + } + if this.Field3 != nil { + s = append(s, "Field3: "+valueToGoStringThetest(this.Field3, "test.YetYetAnotherTestEnum")+",\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 *NidRepEnum) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 7) + s = append(s, "&test.NidRepEnum{") + if this.Field1 != nil { + s = append(s, "Field1: "+fmt.Sprintf("%#v", this.Field1)+",\n") + } + if this.Field2 != nil { + s = append(s, "Field2: "+fmt.Sprintf("%#v", this.Field2)+",\n") + } + if this.Field3 != nil { + s = append(s, "Field3: "+fmt.Sprintf("%#v", this.Field3)+",\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 *NinRepEnum) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 7) + s = append(s, "&test.NinRepEnum{") + if this.Field1 != nil { + s = append(s, "Field1: "+fmt.Sprintf("%#v", this.Field1)+",\n") + } + if this.Field2 != nil { + s = append(s, "Field2: "+fmt.Sprintf("%#v", this.Field2)+",\n") + } + if this.Field3 != nil { + s = append(s, "Field3: "+fmt.Sprintf("%#v", this.Field3)+",\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 *NinOptEnumDefault) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 7) + s = append(s, "&test.NinOptEnumDefault{") + if this.Field1 != nil { + s = append(s, "Field1: "+valueToGoStringThetest(this.Field1, "test.TheTestEnum")+",\n") + } + if this.Field2 != nil { + s = append(s, "Field2: "+valueToGoStringThetest(this.Field2, "test.YetAnotherTestEnum")+",\n") + } + if this.Field3 != nil { + s = append(s, "Field3: "+valueToGoStringThetest(this.Field3, "test.YetYetAnotherTestEnum")+",\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 *AnotherNinOptEnum) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 7) + s = append(s, "&test.AnotherNinOptEnum{") + if this.Field1 != nil { + s = append(s, "Field1: "+valueToGoStringThetest(this.Field1, "test.AnotherTestEnum")+",\n") + } + if this.Field2 != nil { + s = append(s, "Field2: "+valueToGoStringThetest(this.Field2, "test.YetAnotherTestEnum")+",\n") + } + if this.Field3 != nil { + s = append(s, "Field3: "+valueToGoStringThetest(this.Field3, "test.YetYetAnotherTestEnum")+",\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 *AnotherNinOptEnumDefault) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 7) + s = append(s, "&test.AnotherNinOptEnumDefault{") + if this.Field1 != nil { + s = append(s, "Field1: "+valueToGoStringThetest(this.Field1, "test.AnotherTestEnum")+",\n") + } + if this.Field2 != nil { + s = append(s, "Field2: "+valueToGoStringThetest(this.Field2, "test.YetAnotherTestEnum")+",\n") + } + if this.Field3 != nil { + s = append(s, "Field3: "+valueToGoStringThetest(this.Field3, "test.YetYetAnotherTestEnum")+",\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 *Timer) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 7) + s = append(s, "&test.Timer{") + s = append(s, "Time1: "+fmt.Sprintf("%#v", this.Time1)+",\n") + s = append(s, "Time2: "+fmt.Sprintf("%#v", this.Time2)+",\n") + s = append(s, "Data: "+fmt.Sprintf("%#v", this.Data)+",\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 *MyExtendable) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&test.MyExtendable{") + if this.Field1 != nil { + s = append(s, "Field1: "+valueToGoStringThetest(this.Field1, "int64")+",\n") + } + if this.XXX_extensions != nil { + s = append(s, "XXX_extensions: "+extensionToGoStringThetest(this.XXX_extensions)+",\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 *OtherExtenable) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 7) + s = append(s, "&test.OtherExtenable{") + if this.Field2 != nil { + s = append(s, "Field2: "+valueToGoStringThetest(this.Field2, "int64")+",\n") + } + if this.Field13 != nil { + s = append(s, "Field13: "+valueToGoStringThetest(this.Field13, "int64")+",\n") + } + if this.M != nil { + s = append(s, "M: "+fmt.Sprintf("%#v", this.M)+",\n") + } + if this.XXX_extensions != nil { + s = append(s, "XXX_extensions: "+extensionToGoStringThetest(this.XXX_extensions)+",\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 *NestedDefinition) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 8) + s = append(s, "&test.NestedDefinition{") + if this.Field1 != nil { + s = append(s, "Field1: "+valueToGoStringThetest(this.Field1, "int64")+",\n") + } + if this.EnumField != nil { + s = append(s, "EnumField: "+valueToGoStringThetest(this.EnumField, "test.NestedDefinition_NestedEnum")+",\n") + } + if this.NNM != nil { + s = append(s, "NNM: "+fmt.Sprintf("%#v", this.NNM)+",\n") + } + if this.NM != nil { + s = append(s, "NM: "+fmt.Sprintf("%#v", this.NM)+",\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 *NestedDefinition_NestedMessage) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 6) + s = append(s, "&test.NestedDefinition_NestedMessage{") + if this.NestedField1 != nil { + s = append(s, "NestedField1: "+valueToGoStringThetest(this.NestedField1, "uint64")+",\n") + } + if this.NNM != nil { + s = append(s, "NNM: "+fmt.Sprintf("%#v", this.NNM)+",\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 *NestedDefinition_NestedMessage_NestedNestedMsg) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&test.NestedDefinition_NestedMessage_NestedNestedMsg{") + if this.NestedNestedField1 != nil { + s = append(s, "NestedNestedField1: "+valueToGoStringThetest(this.NestedNestedField1, "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 *NestedScope) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 7) + s = append(s, "&test.NestedScope{") + if this.A != nil { + s = append(s, "A: "+fmt.Sprintf("%#v", this.A)+",\n") + } + if this.B != nil { + s = append(s, "B: "+valueToGoStringThetest(this.B, "test.NestedDefinition_NestedEnum")+",\n") + } + if this.C != nil { + s = append(s, "C: "+fmt.Sprintf("%#v", this.C)+",\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 *NinOptNativeDefault) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 19) + s = append(s, "&test.NinOptNativeDefault{") + if this.Field1 != nil { + s = append(s, "Field1: "+valueToGoStringThetest(this.Field1, "float64")+",\n") + } + if this.Field2 != nil { + s = append(s, "Field2: "+valueToGoStringThetest(this.Field2, "float32")+",\n") + } + if this.Field3 != nil { + s = append(s, "Field3: "+valueToGoStringThetest(this.Field3, "int32")+",\n") + } + if this.Field4 != nil { + s = append(s, "Field4: "+valueToGoStringThetest(this.Field4, "int64")+",\n") + } + if this.Field5 != nil { + s = append(s, "Field5: "+valueToGoStringThetest(this.Field5, "uint32")+",\n") + } + if this.Field6 != nil { + s = append(s, "Field6: "+valueToGoStringThetest(this.Field6, "uint64")+",\n") + } + if this.Field7 != nil { + s = append(s, "Field7: "+valueToGoStringThetest(this.Field7, "int32")+",\n") + } + if this.Field8 != nil { + s = append(s, "Field8: "+valueToGoStringThetest(this.Field8, "int64")+",\n") + } + if this.Field9 != nil { + s = append(s, "Field9: "+valueToGoStringThetest(this.Field9, "uint32")+",\n") + } + if this.Field10 != nil { + s = append(s, "Field10: "+valueToGoStringThetest(this.Field10, "int32")+",\n") + } + if this.Field11 != nil { + s = append(s, "Field11: "+valueToGoStringThetest(this.Field11, "uint64")+",\n") + } + if this.Field12 != nil { + s = append(s, "Field12: "+valueToGoStringThetest(this.Field12, "int64")+",\n") + } + if this.Field13 != nil { + s = append(s, "Field13: "+valueToGoStringThetest(this.Field13, "bool")+",\n") + } + if this.Field14 != nil { + s = append(s, "Field14: "+valueToGoStringThetest(this.Field14, "string")+",\n") + } + if this.Field15 != nil { + s = append(s, "Field15: "+valueToGoStringThetest(this.Field15, "byte")+",\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 *CustomContainer) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&test.CustomContainer{") + s = append(s, "CustomStruct: "+strings.Replace(this.CustomStruct.GoString(), `&`, ``, 1)+",\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 *CustomNameNidOptNative) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 19) + s = append(s, "&test.CustomNameNidOptNative{") + s = append(s, "FieldA: "+fmt.Sprintf("%#v", this.FieldA)+",\n") + s = append(s, "FieldB: "+fmt.Sprintf("%#v", this.FieldB)+",\n") + s = append(s, "FieldC: "+fmt.Sprintf("%#v", this.FieldC)+",\n") + s = append(s, "FieldD: "+fmt.Sprintf("%#v", this.FieldD)+",\n") + s = append(s, "FieldE: "+fmt.Sprintf("%#v", this.FieldE)+",\n") + s = append(s, "FieldF: "+fmt.Sprintf("%#v", this.FieldF)+",\n") + s = append(s, "FieldG: "+fmt.Sprintf("%#v", this.FieldG)+",\n") + s = append(s, "FieldH: "+fmt.Sprintf("%#v", this.FieldH)+",\n") + s = append(s, "FieldI: "+fmt.Sprintf("%#v", this.FieldI)+",\n") + s = append(s, "FieldJ: "+fmt.Sprintf("%#v", this.FieldJ)+",\n") + s = append(s, "FieldK: "+fmt.Sprintf("%#v", this.FieldK)+",\n") + s = append(s, "FieldL: "+fmt.Sprintf("%#v", this.FieldL)+",\n") + s = append(s, "FieldM: "+fmt.Sprintf("%#v", this.FieldM)+",\n") + s = append(s, "FieldN: "+fmt.Sprintf("%#v", this.FieldN)+",\n") + s = append(s, "FieldO: "+fmt.Sprintf("%#v", this.FieldO)+",\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 *CustomNameNinOptNative) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 19) + s = append(s, "&test.CustomNameNinOptNative{") + if this.FieldA != nil { + s = append(s, "FieldA: "+valueToGoStringThetest(this.FieldA, "float64")+",\n") + } + if this.FieldB != nil { + s = append(s, "FieldB: "+valueToGoStringThetest(this.FieldB, "float32")+",\n") + } + if this.FieldC != nil { + s = append(s, "FieldC: "+valueToGoStringThetest(this.FieldC, "int32")+",\n") + } + if this.FieldD != nil { + s = append(s, "FieldD: "+valueToGoStringThetest(this.FieldD, "int64")+",\n") + } + if this.FieldE != nil { + s = append(s, "FieldE: "+valueToGoStringThetest(this.FieldE, "uint32")+",\n") + } + if this.FieldF != nil { + s = append(s, "FieldF: "+valueToGoStringThetest(this.FieldF, "uint64")+",\n") + } + if this.FieldG != nil { + s = append(s, "FieldG: "+valueToGoStringThetest(this.FieldG, "int32")+",\n") + } + if this.FieldH != nil { + s = append(s, "FieldH: "+valueToGoStringThetest(this.FieldH, "int64")+",\n") + } + if this.FieldI != nil { + s = append(s, "FieldI: "+valueToGoStringThetest(this.FieldI, "uint32")+",\n") + } + if this.FieldJ != nil { + s = append(s, "FieldJ: "+valueToGoStringThetest(this.FieldJ, "int32")+",\n") + } + if this.FieldK != nil { + s = append(s, "FieldK: "+valueToGoStringThetest(this.FieldK, "uint64")+",\n") + } + if this.FielL != nil { + s = append(s, "FielL: "+valueToGoStringThetest(this.FielL, "int64")+",\n") + } + if this.FieldM != nil { + s = append(s, "FieldM: "+valueToGoStringThetest(this.FieldM, "bool")+",\n") + } + if this.FieldN != nil { + s = append(s, "FieldN: "+valueToGoStringThetest(this.FieldN, "string")+",\n") + } + if this.FieldO != nil { + s = append(s, "FieldO: "+valueToGoStringThetest(this.FieldO, "byte")+",\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 *CustomNameNinRepNative) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 19) + s = append(s, "&test.CustomNameNinRepNative{") + if this.FieldA != nil { + s = append(s, "FieldA: "+fmt.Sprintf("%#v", this.FieldA)+",\n") + } + if this.FieldB != nil { + s = append(s, "FieldB: "+fmt.Sprintf("%#v", this.FieldB)+",\n") + } + if this.FieldC != nil { + s = append(s, "FieldC: "+fmt.Sprintf("%#v", this.FieldC)+",\n") + } + if this.FieldD != nil { + s = append(s, "FieldD: "+fmt.Sprintf("%#v", this.FieldD)+",\n") + } + if this.FieldE != nil { + s = append(s, "FieldE: "+fmt.Sprintf("%#v", this.FieldE)+",\n") + } + if this.FieldF != nil { + s = append(s, "FieldF: "+fmt.Sprintf("%#v", this.FieldF)+",\n") + } + if this.FieldG != nil { + s = append(s, "FieldG: "+fmt.Sprintf("%#v", this.FieldG)+",\n") + } + if this.FieldH != nil { + s = append(s, "FieldH: "+fmt.Sprintf("%#v", this.FieldH)+",\n") + } + if this.FieldI != nil { + s = append(s, "FieldI: "+fmt.Sprintf("%#v", this.FieldI)+",\n") + } + if this.FieldJ != nil { + s = append(s, "FieldJ: "+fmt.Sprintf("%#v", this.FieldJ)+",\n") + } + if this.FieldK != nil { + s = append(s, "FieldK: "+fmt.Sprintf("%#v", this.FieldK)+",\n") + } + if this.FieldL != nil { + s = append(s, "FieldL: "+fmt.Sprintf("%#v", this.FieldL)+",\n") + } + if this.FieldM != nil { + s = append(s, "FieldM: "+fmt.Sprintf("%#v", this.FieldM)+",\n") + } + if this.FieldN != nil { + s = append(s, "FieldN: "+fmt.Sprintf("%#v", this.FieldN)+",\n") + } + if this.FieldO != nil { + s = append(s, "FieldO: "+fmt.Sprintf("%#v", this.FieldO)+",\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 *CustomNameNinStruct) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 14) + s = append(s, "&test.CustomNameNinStruct{") + if this.FieldA != nil { + s = append(s, "FieldA: "+valueToGoStringThetest(this.FieldA, "float64")+",\n") + } + if this.FieldB != nil { + s = append(s, "FieldB: "+valueToGoStringThetest(this.FieldB, "float32")+",\n") + } + if this.FieldC != nil { + s = append(s, "FieldC: "+fmt.Sprintf("%#v", this.FieldC)+",\n") + } + if this.FieldD != nil { + s = append(s, "FieldD: "+fmt.Sprintf("%#v", this.FieldD)+",\n") + } + if this.FieldE != nil { + s = append(s, "FieldE: "+valueToGoStringThetest(this.FieldE, "uint64")+",\n") + } + if this.FieldF != nil { + s = append(s, "FieldF: "+valueToGoStringThetest(this.FieldF, "int32")+",\n") + } + if this.FieldG != nil { + s = append(s, "FieldG: "+fmt.Sprintf("%#v", this.FieldG)+",\n") + } + if this.FieldH != nil { + s = append(s, "FieldH: "+valueToGoStringThetest(this.FieldH, "bool")+",\n") + } + if this.FieldI != nil { + s = append(s, "FieldI: "+valueToGoStringThetest(this.FieldI, "string")+",\n") + } + if this.FieldJ != nil { + s = append(s, "FieldJ: "+valueToGoStringThetest(this.FieldJ, "byte")+",\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 *CustomNameCustomType) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 8) + s = append(s, "&test.CustomNameCustomType{") + if this.FieldA != nil { + s = append(s, "FieldA: "+valueToGoStringThetest(this.FieldA, "Uuid")+",\n") + } + if this.FieldB != nil { + s = append(s, "FieldB: "+valueToGoStringThetest(this.FieldB, "github_com_gogo_protobuf_test_custom.Uint128")+",\n") + } + if this.FieldC != nil { + s = append(s, "FieldC: "+fmt.Sprintf("%#v", this.FieldC)+",\n") + } + if this.FieldD != nil { + s = append(s, "FieldD: "+fmt.Sprintf("%#v", this.FieldD)+",\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 *CustomNameNinEmbeddedStructUnion) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 7) + s = append(s, "&test.CustomNameNinEmbeddedStructUnion{") + if this.NidOptNative != nil { + s = append(s, "NidOptNative: "+fmt.Sprintf("%#v", this.NidOptNative)+",\n") + } + if this.FieldA != nil { + s = append(s, "FieldA: "+fmt.Sprintf("%#v", this.FieldA)+",\n") + } + if this.FieldB != nil { + s = append(s, "FieldB: "+valueToGoStringThetest(this.FieldB, "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 *CustomNameEnum) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 6) + s = append(s, "&test.CustomNameEnum{") + if this.FieldA != nil { + s = append(s, "FieldA: "+valueToGoStringThetest(this.FieldA, "test.TheTestEnum")+",\n") + } + if this.FieldB != nil { + s = append(s, "FieldB: "+fmt.Sprintf("%#v", this.FieldB)+",\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 *NoExtensionsMap) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&test.NoExtensionsMap{") + if this.Field1 != nil { + s = append(s, "Field1: "+valueToGoStringThetest(this.Field1, "int64")+",\n") + } + if this.XXX_extensions != nil { + s = append(s, "XXX_extensions: "+fmt.Sprintf("%#v", this.XXX_extensions)+",\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 *Unrecognized) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&test.Unrecognized{") + if this.Field1 != nil { + s = append(s, "Field1: "+valueToGoStringThetest(this.Field1, "string")+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *UnrecognizedWithInner) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 6) + s = append(s, "&test.UnrecognizedWithInner{") + if this.Embedded != nil { + s = append(s, "Embedded: "+fmt.Sprintf("%#v", this.Embedded)+",\n") + } + if this.Field2 != nil { + s = append(s, "Field2: "+valueToGoStringThetest(this.Field2, "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 *UnrecognizedWithInner_Inner) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&test.UnrecognizedWithInner_Inner{") + if this.Field1 != nil { + s = append(s, "Field1: "+valueToGoStringThetest(this.Field1, "uint32")+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *UnrecognizedWithEmbed) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 6) + s = append(s, "&test.UnrecognizedWithEmbed{") + s = append(s, "UnrecognizedWithEmbed_Embedded: "+strings.Replace(this.UnrecognizedWithEmbed_Embedded.GoString(), `&`, ``, 1)+",\n") + if this.Field2 != nil { + s = append(s, "Field2: "+valueToGoStringThetest(this.Field2, "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 *UnrecognizedWithEmbed_Embedded) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&test.UnrecognizedWithEmbed_Embedded{") + if this.Field1 != nil { + s = append(s, "Field1: "+valueToGoStringThetest(this.Field1, "uint32")+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *Node) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 6) + s = append(s, "&test.Node{") + if this.Label != nil { + s = append(s, "Label: "+valueToGoStringThetest(this.Label, "string")+",\n") + } + if this.Children != nil { + s = append(s, "Children: "+fmt.Sprintf("%#v", this.Children)+",\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 valueToGoStringThetest(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 extensionToGoStringThetest(e map[int32]github_com_gogo_protobuf_proto.Extension) string { + if e == nil { + return "nil" + } + s := "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 +} +func (m *NidOptNative) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *NidOptNative) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + data[i] = 0x9 + i++ + i = encodeFixed64Thetest(data, i, uint64(math.Float64bits(float64(m.Field1)))) + data[i] = 0x15 + i++ + i = encodeFixed32Thetest(data, i, uint32(math.Float32bits(float32(m.Field2)))) + data[i] = 0x18 + i++ + i = encodeVarintThetest(data, i, uint64(m.Field3)) + data[i] = 0x20 + i++ + i = encodeVarintThetest(data, i, uint64(m.Field4)) + data[i] = 0x28 + i++ + i = encodeVarintThetest(data, i, uint64(m.Field5)) + data[i] = 0x30 + i++ + i = encodeVarintThetest(data, i, uint64(m.Field6)) + data[i] = 0x38 + i++ + i = encodeVarintThetest(data, i, uint64((uint32(m.Field7)<<1)^uint32((m.Field7>>31)))) + data[i] = 0x40 + i++ + i = encodeVarintThetest(data, i, uint64((uint64(m.Field8)<<1)^uint64((m.Field8>>63)))) + data[i] = 0x4d + i++ + i = encodeFixed32Thetest(data, i, uint32(m.Field9)) + data[i] = 0x55 + i++ + i = encodeFixed32Thetest(data, i, uint32(m.Field10)) + data[i] = 0x59 + i++ + i = encodeFixed64Thetest(data, i, uint64(m.Field11)) + data[i] = 0x61 + i++ + i = encodeFixed64Thetest(data, i, uint64(m.Field12)) + data[i] = 0x68 + i++ + if m.Field13 { + data[i] = 1 + } else { + data[i] = 0 + } + i++ + data[i] = 0x72 + i++ + i = encodeVarintThetest(data, i, uint64(len(m.Field14))) + i += copy(data[i:], m.Field14) + if m.Field15 != nil { + data[i] = 0x7a + i++ + i = encodeVarintThetest(data, i, uint64(len(m.Field15))) + i += copy(data[i:], m.Field15) + } + if m.XXX_unrecognized != nil { + i += copy(data[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *NinOptNative) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *NinOptNative) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Field1 != nil { + data[i] = 0x9 + i++ + i = encodeFixed64Thetest(data, i, uint64(math.Float64bits(float64(*m.Field1)))) + } + if m.Field2 != nil { + data[i] = 0x15 + i++ + i = encodeFixed32Thetest(data, i, uint32(math.Float32bits(float32(*m.Field2)))) + } + if m.Field3 != nil { + data[i] = 0x18 + i++ + i = encodeVarintThetest(data, i, uint64(*m.Field3)) + } + if m.Field4 != nil { + data[i] = 0x20 + i++ + i = encodeVarintThetest(data, i, uint64(*m.Field4)) + } + if m.Field5 != nil { + data[i] = 0x28 + i++ + i = encodeVarintThetest(data, i, uint64(*m.Field5)) + } + if m.Field6 != nil { + data[i] = 0x30 + i++ + i = encodeVarintThetest(data, i, uint64(*m.Field6)) + } + if m.Field7 != nil { + data[i] = 0x38 + i++ + i = encodeVarintThetest(data, i, uint64((uint32(*m.Field7)<<1)^uint32((*m.Field7>>31)))) + } + if m.Field8 != nil { + data[i] = 0x40 + i++ + i = encodeVarintThetest(data, i, uint64((uint64(*m.Field8)<<1)^uint64((*m.Field8>>63)))) + } + if m.Field9 != nil { + data[i] = 0x4d + i++ + i = encodeFixed32Thetest(data, i, uint32(*m.Field9)) + } + if m.Field10 != nil { + data[i] = 0x55 + i++ + i = encodeFixed32Thetest(data, i, uint32(*m.Field10)) + } + if m.Field11 != nil { + data[i] = 0x59 + i++ + i = encodeFixed64Thetest(data, i, uint64(*m.Field11)) + } + if m.Field12 != nil { + data[i] = 0x61 + i++ + i = encodeFixed64Thetest(data, i, uint64(*m.Field12)) + } + if m.Field13 != nil { + data[i] = 0x68 + i++ + if *m.Field13 { + data[i] = 1 + } else { + data[i] = 0 + } + i++ + } + if m.Field14 != nil { + data[i] = 0x72 + i++ + i = encodeVarintThetest(data, i, uint64(len(*m.Field14))) + i += copy(data[i:], *m.Field14) + } + if m.Field15 != nil { + data[i] = 0x7a + i++ + i = encodeVarintThetest(data, i, uint64(len(m.Field15))) + i += copy(data[i:], m.Field15) + } + if m.XXX_unrecognized != nil { + i += copy(data[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *NidRepNative) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *NidRepNative) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Field1) > 0 { + for _, num := range m.Field1 { + data[i] = 0x9 + i++ + f1 := math.Float64bits(float64(num)) + data[i] = uint8(f1) + i++ + data[i] = uint8(f1 >> 8) + i++ + data[i] = uint8(f1 >> 16) + i++ + data[i] = uint8(f1 >> 24) + i++ + data[i] = uint8(f1 >> 32) + i++ + data[i] = uint8(f1 >> 40) + i++ + data[i] = uint8(f1 >> 48) + i++ + data[i] = uint8(f1 >> 56) + i++ + } + } + if len(m.Field2) > 0 { + for _, num := range m.Field2 { + data[i] = 0x15 + i++ + f2 := math.Float32bits(float32(num)) + data[i] = uint8(f2) + i++ + data[i] = uint8(f2 >> 8) + i++ + data[i] = uint8(f2 >> 16) + i++ + data[i] = uint8(f2 >> 24) + i++ + } + } + if len(m.Field3) > 0 { + for _, num := range m.Field3 { + data[i] = 0x18 + i++ + i = encodeVarintThetest(data, i, uint64(num)) + } + } + if len(m.Field4) > 0 { + for _, num := range m.Field4 { + data[i] = 0x20 + i++ + i = encodeVarintThetest(data, i, uint64(num)) + } + } + if len(m.Field5) > 0 { + for _, num := range m.Field5 { + data[i] = 0x28 + i++ + i = encodeVarintThetest(data, i, uint64(num)) + } + } + if len(m.Field6) > 0 { + for _, num := range m.Field6 { + data[i] = 0x30 + i++ + i = encodeVarintThetest(data, i, uint64(num)) + } + } + if len(m.Field7) > 0 { + for _, num := range m.Field7 { + data[i] = 0x38 + i++ + x3 := (uint32(num) << 1) ^ uint32((num >> 31)) + for x3 >= 1<<7 { + data[i] = uint8(uint64(x3)&0x7f | 0x80) + x3 >>= 7 + i++ + } + data[i] = uint8(x3) + i++ + } + } + if len(m.Field8) > 0 { + for _, num := range m.Field8 { + data[i] = 0x40 + i++ + x4 := (uint64(num) << 1) ^ uint64((num >> 63)) + for x4 >= 1<<7 { + data[i] = uint8(uint64(x4)&0x7f | 0x80) + x4 >>= 7 + i++ + } + data[i] = uint8(x4) + i++ + } + } + if len(m.Field9) > 0 { + for _, num := range m.Field9 { + data[i] = 0x4d + i++ + data[i] = uint8(num) + i++ + data[i] = uint8(num >> 8) + i++ + data[i] = uint8(num >> 16) + i++ + data[i] = uint8(num >> 24) + i++ + } + } + if len(m.Field10) > 0 { + for _, num := range m.Field10 { + data[i] = 0x55 + i++ + data[i] = uint8(num) + i++ + data[i] = uint8(num >> 8) + i++ + data[i] = uint8(num >> 16) + i++ + data[i] = uint8(num >> 24) + i++ + } + } + if len(m.Field11) > 0 { + for _, num := range m.Field11 { + data[i] = 0x59 + i++ + data[i] = uint8(num) + i++ + data[i] = uint8(num >> 8) + i++ + data[i] = uint8(num >> 16) + i++ + data[i] = uint8(num >> 24) + i++ + data[i] = uint8(num >> 32) + i++ + data[i] = uint8(num >> 40) + i++ + data[i] = uint8(num >> 48) + i++ + data[i] = uint8(num >> 56) + i++ + } + } + if len(m.Field12) > 0 { + for _, num := range m.Field12 { + data[i] = 0x61 + i++ + data[i] = uint8(num) + i++ + data[i] = uint8(num >> 8) + i++ + data[i] = uint8(num >> 16) + i++ + data[i] = uint8(num >> 24) + i++ + data[i] = uint8(num >> 32) + i++ + data[i] = uint8(num >> 40) + i++ + data[i] = uint8(num >> 48) + i++ + data[i] = uint8(num >> 56) + i++ + } + } + if len(m.Field13) > 0 { + for _, b := range m.Field13 { + data[i] = 0x68 + i++ + if b { + data[i] = 1 + } else { + data[i] = 0 + } + i++ + } + } + if len(m.Field14) > 0 { + for _, s := range m.Field14 { + data[i] = 0x72 + 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 len(m.Field15) > 0 { + for _, b := range m.Field15 { + data[i] = 0x7a + i++ + i = encodeVarintThetest(data, i, uint64(len(b))) + i += copy(data[i:], b) + } + } + if m.XXX_unrecognized != nil { + i += copy(data[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *NinRepNative) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *NinRepNative) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Field1) > 0 { + for _, num := range m.Field1 { + data[i] = 0x9 + i++ + f5 := math.Float64bits(float64(num)) + data[i] = uint8(f5) + i++ + data[i] = uint8(f5 >> 8) + i++ + data[i] = uint8(f5 >> 16) + i++ + data[i] = uint8(f5 >> 24) + i++ + data[i] = uint8(f5 >> 32) + i++ + data[i] = uint8(f5 >> 40) + i++ + data[i] = uint8(f5 >> 48) + i++ + data[i] = uint8(f5 >> 56) + i++ + } + } + if len(m.Field2) > 0 { + for _, num := range m.Field2 { + data[i] = 0x15 + i++ + f6 := math.Float32bits(float32(num)) + data[i] = uint8(f6) + i++ + data[i] = uint8(f6 >> 8) + i++ + data[i] = uint8(f6 >> 16) + i++ + data[i] = uint8(f6 >> 24) + i++ + } + } + if len(m.Field3) > 0 { + for _, num := range m.Field3 { + data[i] = 0x18 + i++ + i = encodeVarintThetest(data, i, uint64(num)) + } + } + if len(m.Field4) > 0 { + for _, num := range m.Field4 { + data[i] = 0x20 + i++ + i = encodeVarintThetest(data, i, uint64(num)) + } + } + if len(m.Field5) > 0 { + for _, num := range m.Field5 { + data[i] = 0x28 + i++ + i = encodeVarintThetest(data, i, uint64(num)) + } + } + if len(m.Field6) > 0 { + for _, num := range m.Field6 { + data[i] = 0x30 + i++ + i = encodeVarintThetest(data, i, uint64(num)) + } + } + if len(m.Field7) > 0 { + for _, num := range m.Field7 { + data[i] = 0x38 + i++ + x7 := (uint32(num) << 1) ^ uint32((num >> 31)) + for x7 >= 1<<7 { + data[i] = uint8(uint64(x7)&0x7f | 0x80) + x7 >>= 7 + i++ + } + data[i] = uint8(x7) + i++ + } + } + if len(m.Field8) > 0 { + for _, num := range m.Field8 { + data[i] = 0x40 + i++ + x8 := (uint64(num) << 1) ^ uint64((num >> 63)) + for x8 >= 1<<7 { + data[i] = uint8(uint64(x8)&0x7f | 0x80) + x8 >>= 7 + i++ + } + data[i] = uint8(x8) + i++ + } + } + if len(m.Field9) > 0 { + for _, num := range m.Field9 { + data[i] = 0x4d + i++ + data[i] = uint8(num) + i++ + data[i] = uint8(num >> 8) + i++ + data[i] = uint8(num >> 16) + i++ + data[i] = uint8(num >> 24) + i++ + } + } + if len(m.Field10) > 0 { + for _, num := range m.Field10 { + data[i] = 0x55 + i++ + data[i] = uint8(num) + i++ + data[i] = uint8(num >> 8) + i++ + data[i] = uint8(num >> 16) + i++ + data[i] = uint8(num >> 24) + i++ + } + } + if len(m.Field11) > 0 { + for _, num := range m.Field11 { + data[i] = 0x59 + i++ + data[i] = uint8(num) + i++ + data[i] = uint8(num >> 8) + i++ + data[i] = uint8(num >> 16) + i++ + data[i] = uint8(num >> 24) + i++ + data[i] = uint8(num >> 32) + i++ + data[i] = uint8(num >> 40) + i++ + data[i] = uint8(num >> 48) + i++ + data[i] = uint8(num >> 56) + i++ + } + } + if len(m.Field12) > 0 { + for _, num := range m.Field12 { + data[i] = 0x61 + i++ + data[i] = uint8(num) + i++ + data[i] = uint8(num >> 8) + i++ + data[i] = uint8(num >> 16) + i++ + data[i] = uint8(num >> 24) + i++ + data[i] = uint8(num >> 32) + i++ + data[i] = uint8(num >> 40) + i++ + data[i] = uint8(num >> 48) + i++ + data[i] = uint8(num >> 56) + i++ + } + } + if len(m.Field13) > 0 { + for _, b := range m.Field13 { + data[i] = 0x68 + i++ + if b { + data[i] = 1 + } else { + data[i] = 0 + } + i++ + } + } + if len(m.Field14) > 0 { + for _, s := range m.Field14 { + data[i] = 0x72 + 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 len(m.Field15) > 0 { + for _, b := range m.Field15 { + data[i] = 0x7a + i++ + i = encodeVarintThetest(data, i, uint64(len(b))) + i += copy(data[i:], b) + } + } + if m.XXX_unrecognized != nil { + i += copy(data[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *NidRepPackedNative) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *NidRepPackedNative) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Field1) > 0 { + data[i] = 0xa + i++ + i = encodeVarintThetest(data, i, uint64(len(m.Field1)*8)) + for _, num := range m.Field1 { + f9 := math.Float64bits(float64(num)) + data[i] = uint8(f9) + i++ + data[i] = uint8(f9 >> 8) + i++ + data[i] = uint8(f9 >> 16) + i++ + data[i] = uint8(f9 >> 24) + i++ + data[i] = uint8(f9 >> 32) + i++ + data[i] = uint8(f9 >> 40) + i++ + data[i] = uint8(f9 >> 48) + i++ + data[i] = uint8(f9 >> 56) + i++ + } + } + if len(m.Field2) > 0 { + data[i] = 0x12 + i++ + i = encodeVarintThetest(data, i, uint64(len(m.Field2)*4)) + for _, num := range m.Field2 { + f10 := math.Float32bits(float32(num)) + data[i] = uint8(f10) + i++ + data[i] = uint8(f10 >> 8) + i++ + data[i] = uint8(f10 >> 16) + i++ + data[i] = uint8(f10 >> 24) + i++ + } + } + if len(m.Field3) > 0 { + data12 := make([]byte, len(m.Field3)*10) + var j11 int + for _, num1 := range m.Field3 { + num := uint64(num1) + for num >= 1<<7 { + data12[j11] = uint8(uint64(num)&0x7f | 0x80) + num >>= 7 + j11++ + } + data12[j11] = uint8(num) + j11++ + } + data[i] = 0x1a + i++ + i = encodeVarintThetest(data, i, uint64(j11)) + i += copy(data[i:], data12[:j11]) + } + if len(m.Field4) > 0 { + data14 := make([]byte, len(m.Field4)*10) + var j13 int + for _, num1 := range m.Field4 { + num := uint64(num1) + for num >= 1<<7 { + data14[j13] = uint8(uint64(num)&0x7f | 0x80) + num >>= 7 + j13++ + } + data14[j13] = uint8(num) + j13++ + } + data[i] = 0x22 + i++ + i = encodeVarintThetest(data, i, uint64(j13)) + i += copy(data[i:], data14[:j13]) + } + if len(m.Field5) > 0 { + data16 := make([]byte, len(m.Field5)*10) + var j15 int + for _, num := range m.Field5 { + for num >= 1<<7 { + data16[j15] = uint8(uint64(num)&0x7f | 0x80) + num >>= 7 + j15++ + } + data16[j15] = uint8(num) + j15++ + } + data[i] = 0x2a + i++ + i = encodeVarintThetest(data, i, uint64(j15)) + i += copy(data[i:], data16[:j15]) + } + if len(m.Field6) > 0 { + data18 := make([]byte, len(m.Field6)*10) + var j17 int + for _, num := range m.Field6 { + for num >= 1<<7 { + data18[j17] = uint8(uint64(num)&0x7f | 0x80) + num >>= 7 + j17++ + } + data18[j17] = uint8(num) + j17++ + } + data[i] = 0x32 + i++ + i = encodeVarintThetest(data, i, uint64(j17)) + i += copy(data[i:], data18[:j17]) + } + if len(m.Field7) > 0 { + data19 := make([]byte, len(m.Field7)*5) + var j20 int + for _, num := range m.Field7 { + x21 := (uint32(num) << 1) ^ uint32((num >> 31)) + for x21 >= 1<<7 { + data19[j20] = uint8(uint64(x21)&0x7f | 0x80) + j20++ + x21 >>= 7 + } + data19[j20] = uint8(x21) + j20++ + } + data[i] = 0x3a + i++ + i = encodeVarintThetest(data, i, uint64(j20)) + i += copy(data[i:], data19[:j20]) + } + if len(m.Field8) > 0 { + var j22 int + data24 := make([]byte, len(m.Field8)*10) + for _, num := range m.Field8 { + x23 := (uint64(num) << 1) ^ uint64((num >> 63)) + for x23 >= 1<<7 { + data24[j22] = uint8(uint64(x23)&0x7f | 0x80) + j22++ + x23 >>= 7 + } + data24[j22] = uint8(x23) + j22++ + } + data[i] = 0x42 + i++ + i = encodeVarintThetest(data, i, uint64(j22)) + i += copy(data[i:], data24[:j22]) + } + if len(m.Field9) > 0 { + data[i] = 0x4a + i++ + i = encodeVarintThetest(data, i, uint64(len(m.Field9)*4)) + for _, num := range m.Field9 { + data[i] = uint8(num) + i++ + data[i] = uint8(num >> 8) + i++ + data[i] = uint8(num >> 16) + i++ + data[i] = uint8(num >> 24) + i++ + } + } + if len(m.Field10) > 0 { + data[i] = 0x52 + i++ + i = encodeVarintThetest(data, i, uint64(len(m.Field10)*4)) + for _, num := range m.Field10 { + data[i] = uint8(num) + i++ + data[i] = uint8(num >> 8) + i++ + data[i] = uint8(num >> 16) + i++ + data[i] = uint8(num >> 24) + i++ + } + } + if len(m.Field11) > 0 { + data[i] = 0x5a + i++ + i = encodeVarintThetest(data, i, uint64(len(m.Field11)*8)) + for _, num := range m.Field11 { + data[i] = uint8(num) + i++ + data[i] = uint8(num >> 8) + i++ + data[i] = uint8(num >> 16) + i++ + data[i] = uint8(num >> 24) + i++ + data[i] = uint8(num >> 32) + i++ + data[i] = uint8(num >> 40) + i++ + data[i] = uint8(num >> 48) + i++ + data[i] = uint8(num >> 56) + i++ + } + } + if len(m.Field12) > 0 { + data[i] = 0x62 + i++ + i = encodeVarintThetest(data, i, uint64(len(m.Field12)*8)) + for _, num := range m.Field12 { + data[i] = uint8(num) + i++ + data[i] = uint8(num >> 8) + i++ + data[i] = uint8(num >> 16) + i++ + data[i] = uint8(num >> 24) + i++ + data[i] = uint8(num >> 32) + i++ + data[i] = uint8(num >> 40) + i++ + data[i] = uint8(num >> 48) + i++ + data[i] = uint8(num >> 56) + i++ + } + } + if len(m.Field13) > 0 { + data[i] = 0x6a + i++ + i = encodeVarintThetest(data, i, uint64(len(m.Field13))) + for _, b := range m.Field13 { + if b { + data[i] = 1 + } else { + data[i] = 0 + } + i++ + } + } + if m.XXX_unrecognized != nil { + i += copy(data[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *NinRepPackedNative) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *NinRepPackedNative) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Field1) > 0 { + data[i] = 0xa + i++ + i = encodeVarintThetest(data, i, uint64(len(m.Field1)*8)) + for _, num := range m.Field1 { + f25 := math.Float64bits(float64(num)) + data[i] = uint8(f25) + i++ + data[i] = uint8(f25 >> 8) + i++ + data[i] = uint8(f25 >> 16) + i++ + data[i] = uint8(f25 >> 24) + i++ + data[i] = uint8(f25 >> 32) + i++ + data[i] = uint8(f25 >> 40) + i++ + data[i] = uint8(f25 >> 48) + i++ + data[i] = uint8(f25 >> 56) + i++ + } + } + if len(m.Field2) > 0 { + data[i] = 0x12 + i++ + i = encodeVarintThetest(data, i, uint64(len(m.Field2)*4)) + for _, num := range m.Field2 { + f26 := math.Float32bits(float32(num)) + data[i] = uint8(f26) + i++ + data[i] = uint8(f26 >> 8) + i++ + data[i] = uint8(f26 >> 16) + i++ + data[i] = uint8(f26 >> 24) + i++ + } + } + if len(m.Field3) > 0 { + data28 := make([]byte, len(m.Field3)*10) + var j27 int + for _, num1 := range m.Field3 { + num := uint64(num1) + for num >= 1<<7 { + data28[j27] = uint8(uint64(num)&0x7f | 0x80) + num >>= 7 + j27++ + } + data28[j27] = uint8(num) + j27++ + } + data[i] = 0x1a + i++ + i = encodeVarintThetest(data, i, uint64(j27)) + i += copy(data[i:], data28[:j27]) + } + if len(m.Field4) > 0 { + data30 := make([]byte, len(m.Field4)*10) + var j29 int + for _, num1 := range m.Field4 { + num := uint64(num1) + for num >= 1<<7 { + data30[j29] = uint8(uint64(num)&0x7f | 0x80) + num >>= 7 + j29++ + } + data30[j29] = uint8(num) + j29++ + } + data[i] = 0x22 + i++ + i = encodeVarintThetest(data, i, uint64(j29)) + i += copy(data[i:], data30[:j29]) + } + if len(m.Field5) > 0 { + data32 := make([]byte, len(m.Field5)*10) + var j31 int + for _, num := range m.Field5 { + for num >= 1<<7 { + data32[j31] = uint8(uint64(num)&0x7f | 0x80) + num >>= 7 + j31++ + } + data32[j31] = uint8(num) + j31++ + } + data[i] = 0x2a + i++ + i = encodeVarintThetest(data, i, uint64(j31)) + i += copy(data[i:], data32[:j31]) + } + if len(m.Field6) > 0 { + data34 := make([]byte, len(m.Field6)*10) + var j33 int + for _, num := range m.Field6 { + for num >= 1<<7 { + data34[j33] = uint8(uint64(num)&0x7f | 0x80) + num >>= 7 + j33++ + } + data34[j33] = uint8(num) + j33++ + } + data[i] = 0x32 + i++ + i = encodeVarintThetest(data, i, uint64(j33)) + i += copy(data[i:], data34[:j33]) + } + if len(m.Field7) > 0 { + data35 := make([]byte, len(m.Field7)*5) + var j36 int + for _, num := range m.Field7 { + x37 := (uint32(num) << 1) ^ uint32((num >> 31)) + for x37 >= 1<<7 { + data35[j36] = uint8(uint64(x37)&0x7f | 0x80) + j36++ + x37 >>= 7 + } + data35[j36] = uint8(x37) + j36++ + } + data[i] = 0x3a + i++ + i = encodeVarintThetest(data, i, uint64(j36)) + i += copy(data[i:], data35[:j36]) + } + if len(m.Field8) > 0 { + var j38 int + data40 := make([]byte, len(m.Field8)*10) + for _, num := range m.Field8 { + x39 := (uint64(num) << 1) ^ uint64((num >> 63)) + for x39 >= 1<<7 { + data40[j38] = uint8(uint64(x39)&0x7f | 0x80) + j38++ + x39 >>= 7 + } + data40[j38] = uint8(x39) + j38++ + } + data[i] = 0x42 + i++ + i = encodeVarintThetest(data, i, uint64(j38)) + i += copy(data[i:], data40[:j38]) + } + if len(m.Field9) > 0 { + data[i] = 0x4a + i++ + i = encodeVarintThetest(data, i, uint64(len(m.Field9)*4)) + for _, num := range m.Field9 { + data[i] = uint8(num) + i++ + data[i] = uint8(num >> 8) + i++ + data[i] = uint8(num >> 16) + i++ + data[i] = uint8(num >> 24) + i++ + } + } + if len(m.Field10) > 0 { + data[i] = 0x52 + i++ + i = encodeVarintThetest(data, i, uint64(len(m.Field10)*4)) + for _, num := range m.Field10 { + data[i] = uint8(num) + i++ + data[i] = uint8(num >> 8) + i++ + data[i] = uint8(num >> 16) + i++ + data[i] = uint8(num >> 24) + i++ + } + } + if len(m.Field11) > 0 { + data[i] = 0x5a + i++ + i = encodeVarintThetest(data, i, uint64(len(m.Field11)*8)) + for _, num := range m.Field11 { + data[i] = uint8(num) + i++ + data[i] = uint8(num >> 8) + i++ + data[i] = uint8(num >> 16) + i++ + data[i] = uint8(num >> 24) + i++ + data[i] = uint8(num >> 32) + i++ + data[i] = uint8(num >> 40) + i++ + data[i] = uint8(num >> 48) + i++ + data[i] = uint8(num >> 56) + i++ + } + } + if len(m.Field12) > 0 { + data[i] = 0x62 + i++ + i = encodeVarintThetest(data, i, uint64(len(m.Field12)*8)) + for _, num := range m.Field12 { + data[i] = uint8(num) + i++ + data[i] = uint8(num >> 8) + i++ + data[i] = uint8(num >> 16) + i++ + data[i] = uint8(num >> 24) + i++ + data[i] = uint8(num >> 32) + i++ + data[i] = uint8(num >> 40) + i++ + data[i] = uint8(num >> 48) + i++ + data[i] = uint8(num >> 56) + i++ + } + } + if len(m.Field13) > 0 { + data[i] = 0x6a + i++ + i = encodeVarintThetest(data, i, uint64(len(m.Field13))) + for _, b := range m.Field13 { + if b { + data[i] = 1 + } else { + data[i] = 0 + } + i++ + } + } + if m.XXX_unrecognized != nil { + i += copy(data[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *NidOptStruct) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *NidOptStruct) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + data[i] = 0x9 + i++ + i = encodeFixed64Thetest(data, i, uint64(math.Float64bits(float64(m.Field1)))) + data[i] = 0x15 + i++ + i = encodeFixed32Thetest(data, i, uint32(math.Float32bits(float32(m.Field2)))) + data[i] = 0x1a + i++ + i = encodeVarintThetest(data, i, uint64(m.Field3.Size())) + n41, err := m.Field3.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n41 + data[i] = 0x22 + i++ + i = encodeVarintThetest(data, i, uint64(m.Field4.Size())) + n42, err := m.Field4.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n42 + data[i] = 0x30 + i++ + i = encodeVarintThetest(data, i, uint64(m.Field6)) + data[i] = 0x38 + i++ + i = encodeVarintThetest(data, i, uint64((uint32(m.Field7)<<1)^uint32((m.Field7>>31)))) + data[i] = 0x42 + i++ + i = encodeVarintThetest(data, i, uint64(m.Field8.Size())) + n43, err := m.Field8.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n43 + data[i] = 0x68 + i++ + if m.Field13 { + data[i] = 1 + } else { + data[i] = 0 + } + i++ + data[i] = 0x72 + i++ + i = encodeVarintThetest(data, i, uint64(len(m.Field14))) + i += copy(data[i:], m.Field14) + if m.Field15 != nil { + data[i] = 0x7a + i++ + i = encodeVarintThetest(data, i, uint64(len(m.Field15))) + i += copy(data[i:], m.Field15) + } + if m.XXX_unrecognized != nil { + i += copy(data[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *NinOptStruct) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *NinOptStruct) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Field1 != nil { + data[i] = 0x9 + i++ + i = encodeFixed64Thetest(data, i, uint64(math.Float64bits(float64(*m.Field1)))) + } + if m.Field2 != nil { + data[i] = 0x15 + i++ + i = encodeFixed32Thetest(data, i, uint32(math.Float32bits(float32(*m.Field2)))) + } + if m.Field3 != nil { + data[i] = 0x1a + i++ + i = encodeVarintThetest(data, i, uint64(m.Field3.Size())) + n44, err := m.Field3.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n44 + } + if m.Field4 != nil { + data[i] = 0x22 + i++ + i = encodeVarintThetest(data, i, uint64(m.Field4.Size())) + n45, err := m.Field4.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n45 + } + if m.Field6 != nil { + data[i] = 0x30 + i++ + i = encodeVarintThetest(data, i, uint64(*m.Field6)) + } + if m.Field7 != nil { + data[i] = 0x38 + i++ + i = encodeVarintThetest(data, i, uint64((uint32(*m.Field7)<<1)^uint32((*m.Field7>>31)))) + } + if m.Field8 != nil { + data[i] = 0x42 + i++ + i = encodeVarintThetest(data, i, uint64(m.Field8.Size())) + n46, err := m.Field8.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n46 + } + if m.Field13 != nil { + data[i] = 0x68 + i++ + if *m.Field13 { + data[i] = 1 + } else { + data[i] = 0 + } + i++ + } + if m.Field14 != nil { + data[i] = 0x72 + i++ + i = encodeVarintThetest(data, i, uint64(len(*m.Field14))) + i += copy(data[i:], *m.Field14) + } + if m.Field15 != nil { + data[i] = 0x7a + i++ + i = encodeVarintThetest(data, i, uint64(len(m.Field15))) + i += copy(data[i:], m.Field15) + } + if m.XXX_unrecognized != nil { + i += copy(data[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *NidRepStruct) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *NidRepStruct) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Field1) > 0 { + for _, num := range m.Field1 { + data[i] = 0x9 + i++ + f47 := math.Float64bits(float64(num)) + data[i] = uint8(f47) + i++ + data[i] = uint8(f47 >> 8) + i++ + data[i] = uint8(f47 >> 16) + i++ + data[i] = uint8(f47 >> 24) + i++ + data[i] = uint8(f47 >> 32) + i++ + data[i] = uint8(f47 >> 40) + i++ + data[i] = uint8(f47 >> 48) + i++ + data[i] = uint8(f47 >> 56) + i++ + } + } + if len(m.Field2) > 0 { + for _, num := range m.Field2 { + data[i] = 0x15 + i++ + f48 := math.Float32bits(float32(num)) + data[i] = uint8(f48) + i++ + data[i] = uint8(f48 >> 8) + i++ + data[i] = uint8(f48 >> 16) + i++ + data[i] = uint8(f48 >> 24) + i++ + } + } + if len(m.Field3) > 0 { + for _, msg := range m.Field3 { + data[i] = 0x1a + i++ + i = encodeVarintThetest(data, i, uint64(msg.Size())) + n, err := msg.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n + } + } + if len(m.Field4) > 0 { + for _, msg := range m.Field4 { + data[i] = 0x22 + i++ + i = encodeVarintThetest(data, i, uint64(msg.Size())) + n, err := msg.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n + } + } + if len(m.Field6) > 0 { + for _, num := range m.Field6 { + data[i] = 0x30 + i++ + i = encodeVarintThetest(data, i, uint64(num)) + } + } + if len(m.Field7) > 0 { + for _, num := range m.Field7 { + data[i] = 0x38 + i++ + x49 := (uint32(num) << 1) ^ uint32((num >> 31)) + for x49 >= 1<<7 { + data[i] = uint8(uint64(x49)&0x7f | 0x80) + x49 >>= 7 + i++ + } + data[i] = uint8(x49) + i++ + } + } + if len(m.Field8) > 0 { + for _, msg := range m.Field8 { + data[i] = 0x42 + i++ + i = encodeVarintThetest(data, i, uint64(msg.Size())) + n, err := msg.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n + } + } + if len(m.Field13) > 0 { + for _, b := range m.Field13 { + data[i] = 0x68 + i++ + if b { + data[i] = 1 + } else { + data[i] = 0 + } + i++ + } + } + if len(m.Field14) > 0 { + for _, s := range m.Field14 { + data[i] = 0x72 + 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 len(m.Field15) > 0 { + for _, b := range m.Field15 { + data[i] = 0x7a + i++ + i = encodeVarintThetest(data, i, uint64(len(b))) + i += copy(data[i:], b) + } + } + if m.XXX_unrecognized != nil { + i += copy(data[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *NinRepStruct) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *NinRepStruct) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Field1) > 0 { + for _, num := range m.Field1 { + data[i] = 0x9 + i++ + f50 := math.Float64bits(float64(num)) + data[i] = uint8(f50) + i++ + data[i] = uint8(f50 >> 8) + i++ + data[i] = uint8(f50 >> 16) + i++ + data[i] = uint8(f50 >> 24) + i++ + data[i] = uint8(f50 >> 32) + i++ + data[i] = uint8(f50 >> 40) + i++ + data[i] = uint8(f50 >> 48) + i++ + data[i] = uint8(f50 >> 56) + i++ + } + } + if len(m.Field2) > 0 { + for _, num := range m.Field2 { + data[i] = 0x15 + i++ + f51 := math.Float32bits(float32(num)) + data[i] = uint8(f51) + i++ + data[i] = uint8(f51 >> 8) + i++ + data[i] = uint8(f51 >> 16) + i++ + data[i] = uint8(f51 >> 24) + i++ + } + } + if len(m.Field3) > 0 { + for _, msg := range m.Field3 { + data[i] = 0x1a + i++ + i = encodeVarintThetest(data, i, uint64(msg.Size())) + n, err := msg.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n + } + } + if len(m.Field4) > 0 { + for _, msg := range m.Field4 { + data[i] = 0x22 + i++ + i = encodeVarintThetest(data, i, uint64(msg.Size())) + n, err := msg.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n + } + } + if len(m.Field6) > 0 { + for _, num := range m.Field6 { + data[i] = 0x30 + i++ + i = encodeVarintThetest(data, i, uint64(num)) + } + } + if len(m.Field7) > 0 { + for _, num := range m.Field7 { + data[i] = 0x38 + i++ + x52 := (uint32(num) << 1) ^ uint32((num >> 31)) + for x52 >= 1<<7 { + data[i] = uint8(uint64(x52)&0x7f | 0x80) + x52 >>= 7 + i++ + } + data[i] = uint8(x52) + i++ + } + } + if len(m.Field8) > 0 { + for _, msg := range m.Field8 { + data[i] = 0x42 + i++ + i = encodeVarintThetest(data, i, uint64(msg.Size())) + n, err := msg.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n + } + } + if len(m.Field13) > 0 { + for _, b := range m.Field13 { + data[i] = 0x68 + i++ + if b { + data[i] = 1 + } else { + data[i] = 0 + } + i++ + } + } + if len(m.Field14) > 0 { + for _, s := range m.Field14 { + data[i] = 0x72 + 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 len(m.Field15) > 0 { + for _, b := range m.Field15 { + data[i] = 0x7a + i++ + i = encodeVarintThetest(data, i, uint64(len(b))) + i += copy(data[i:], b) + } + } + if m.XXX_unrecognized != nil { + i += copy(data[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *NidEmbeddedStruct) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *NidEmbeddedStruct) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.NidOptNative != nil { + data[i] = 0xa + i++ + i = encodeVarintThetest(data, i, uint64(m.NidOptNative.Size())) + n53, err := m.NidOptNative.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n53 + } + data[i] = 0xc2 + i++ + data[i] = 0xc + i++ + i = encodeVarintThetest(data, i, uint64(m.Field200.Size())) + n54, err := m.Field200.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n54 + data[i] = 0x90 + i++ + data[i] = 0xd + i++ + if m.Field210 { + data[i] = 1 + } else { + data[i] = 0 + } + i++ + if m.XXX_unrecognized != nil { + i += copy(data[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *NinEmbeddedStruct) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *NinEmbeddedStruct) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.NidOptNative != nil { + data[i] = 0xa + i++ + i = encodeVarintThetest(data, i, uint64(m.NidOptNative.Size())) + n55, err := m.NidOptNative.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n55 + } + if m.Field200 != nil { + data[i] = 0xc2 + i++ + data[i] = 0xc + i++ + i = encodeVarintThetest(data, i, uint64(m.Field200.Size())) + n56, err := m.Field200.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n56 + } + if m.Field210 != nil { + data[i] = 0x90 + i++ + data[i] = 0xd + i++ + if *m.Field210 { + data[i] = 1 + } else { + data[i] = 0 + } + i++ + } + if m.XXX_unrecognized != nil { + i += copy(data[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *NidNestedStruct) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *NidNestedStruct) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + data[i] = 0xa + i++ + i = encodeVarintThetest(data, i, uint64(m.Field1.Size())) + n57, err := m.Field1.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n57 + if len(m.Field2) > 0 { + for _, msg := range m.Field2 { + data[i] = 0x12 + i++ + i = encodeVarintThetest(data, i, uint64(msg.Size())) + n, err := msg.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n + } + } + if m.XXX_unrecognized != nil { + i += copy(data[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *NinNestedStruct) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *NinNestedStruct) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Field1 != nil { + data[i] = 0xa + i++ + i = encodeVarintThetest(data, i, uint64(m.Field1.Size())) + n58, err := m.Field1.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n58 + } + if len(m.Field2) > 0 { + for _, msg := range m.Field2 { + data[i] = 0x12 + i++ + i = encodeVarintThetest(data, i, uint64(msg.Size())) + n, err := msg.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n + } + } + if m.XXX_unrecognized != nil { + i += copy(data[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *NidOptCustom) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *NidOptCustom) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + data[i] = 0xa + i++ + i = encodeVarintThetest(data, i, uint64(m.Id.Size())) + n59, err := m.Id.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n59 + data[i] = 0x12 + i++ + i = encodeVarintThetest(data, i, uint64(m.Value.Size())) + n60, err := m.Value.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n60 + if m.XXX_unrecognized != nil { + i += copy(data[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *CustomDash) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *CustomDash) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Value != nil { + data[i] = 0xa + i++ + i = encodeVarintThetest(data, i, uint64(m.Value.Size())) + n61, err := m.Value.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n61 + } + if m.XXX_unrecognized != nil { + i += copy(data[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *NinOptCustom) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *NinOptCustom) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Id != nil { + data[i] = 0xa + i++ + i = encodeVarintThetest(data, i, uint64(m.Id.Size())) + n62, err := m.Id.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n62 + } + if m.Value != nil { + data[i] = 0x12 + i++ + i = encodeVarintThetest(data, i, uint64(m.Value.Size())) + n63, err := m.Value.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n63 + } + if m.XXX_unrecognized != nil { + i += copy(data[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *NidRepCustom) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *NidRepCustom) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Id) > 0 { + for _, msg := range m.Id { + data[i] = 0xa + i++ + i = encodeVarintThetest(data, i, uint64(msg.Size())) + n, err := msg.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n + } + } + if len(m.Value) > 0 { + for _, msg := range m.Value { + data[i] = 0x12 + i++ + i = encodeVarintThetest(data, i, uint64(msg.Size())) + n, err := msg.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n + } + } + if m.XXX_unrecognized != nil { + i += copy(data[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *NinRepCustom) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *NinRepCustom) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Id) > 0 { + for _, msg := range m.Id { + data[i] = 0xa + i++ + i = encodeVarintThetest(data, i, uint64(msg.Size())) + n, err := msg.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n + } + } + if len(m.Value) > 0 { + for _, msg := range m.Value { + data[i] = 0x12 + i++ + i = encodeVarintThetest(data, i, uint64(msg.Size())) + n, err := msg.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n + } + } + if m.XXX_unrecognized != nil { + i += copy(data[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *NinOptNativeUnion) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *NinOptNativeUnion) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Field1 != nil { + data[i] = 0x9 + i++ + i = encodeFixed64Thetest(data, i, uint64(math.Float64bits(float64(*m.Field1)))) + } + if m.Field2 != nil { + data[i] = 0x15 + i++ + i = encodeFixed32Thetest(data, i, uint32(math.Float32bits(float32(*m.Field2)))) + } + if m.Field3 != nil { + data[i] = 0x18 + i++ + i = encodeVarintThetest(data, i, uint64(*m.Field3)) + } + if m.Field4 != nil { + data[i] = 0x20 + i++ + i = encodeVarintThetest(data, i, uint64(*m.Field4)) + } + if m.Field5 != nil { + data[i] = 0x28 + i++ + i = encodeVarintThetest(data, i, uint64(*m.Field5)) + } + if m.Field6 != nil { + data[i] = 0x30 + i++ + i = encodeVarintThetest(data, i, uint64(*m.Field6)) + } + if m.Field13 != nil { + data[i] = 0x68 + i++ + if *m.Field13 { + data[i] = 1 + } else { + data[i] = 0 + } + i++ + } + if m.Field14 != nil { + data[i] = 0x72 + i++ + i = encodeVarintThetest(data, i, uint64(len(*m.Field14))) + i += copy(data[i:], *m.Field14) + } + if m.Field15 != nil { + data[i] = 0x7a + i++ + i = encodeVarintThetest(data, i, uint64(len(m.Field15))) + i += copy(data[i:], m.Field15) + } + if m.XXX_unrecognized != nil { + i += copy(data[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *NinOptStructUnion) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *NinOptStructUnion) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Field1 != nil { + data[i] = 0x9 + i++ + i = encodeFixed64Thetest(data, i, uint64(math.Float64bits(float64(*m.Field1)))) + } + if m.Field2 != nil { + data[i] = 0x15 + i++ + i = encodeFixed32Thetest(data, i, uint32(math.Float32bits(float32(*m.Field2)))) + } + if m.Field3 != nil { + data[i] = 0x1a + i++ + i = encodeVarintThetest(data, i, uint64(m.Field3.Size())) + n64, err := m.Field3.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n64 + } + if m.Field4 != nil { + data[i] = 0x22 + i++ + i = encodeVarintThetest(data, i, uint64(m.Field4.Size())) + n65, err := m.Field4.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n65 + } + if m.Field6 != nil { + data[i] = 0x30 + i++ + i = encodeVarintThetest(data, i, uint64(*m.Field6)) + } + if m.Field7 != nil { + data[i] = 0x38 + i++ + i = encodeVarintThetest(data, i, uint64((uint32(*m.Field7)<<1)^uint32((*m.Field7>>31)))) + } + if m.Field13 != nil { + data[i] = 0x68 + i++ + if *m.Field13 { + data[i] = 1 + } else { + data[i] = 0 + } + i++ + } + if m.Field14 != nil { + data[i] = 0x72 + i++ + i = encodeVarintThetest(data, i, uint64(len(*m.Field14))) + i += copy(data[i:], *m.Field14) + } + if m.Field15 != nil { + data[i] = 0x7a + i++ + i = encodeVarintThetest(data, i, uint64(len(m.Field15))) + i += copy(data[i:], m.Field15) + } + if m.XXX_unrecognized != nil { + i += copy(data[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *NinEmbeddedStructUnion) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *NinEmbeddedStructUnion) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.NidOptNative != nil { + data[i] = 0xa + i++ + i = encodeVarintThetest(data, i, uint64(m.NidOptNative.Size())) + n66, err := m.NidOptNative.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n66 + } + if m.Field200 != nil { + data[i] = 0xc2 + i++ + data[i] = 0xc + i++ + i = encodeVarintThetest(data, i, uint64(m.Field200.Size())) + n67, err := m.Field200.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n67 + } + if m.Field210 != nil { + data[i] = 0x90 + i++ + data[i] = 0xd + i++ + if *m.Field210 { + data[i] = 1 + } else { + data[i] = 0 + } + i++ + } + if m.XXX_unrecognized != nil { + i += copy(data[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *NinNestedStructUnion) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *NinNestedStructUnion) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Field1 != nil { + data[i] = 0xa + i++ + i = encodeVarintThetest(data, i, uint64(m.Field1.Size())) + n68, err := m.Field1.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n68 + } + if m.Field2 != nil { + data[i] = 0x12 + i++ + i = encodeVarintThetest(data, i, uint64(m.Field2.Size())) + n69, err := m.Field2.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n69 + } + if m.Field3 != nil { + data[i] = 0x1a + i++ + i = encodeVarintThetest(data, i, uint64(m.Field3.Size())) + n70, err := m.Field3.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n70 + } + if m.XXX_unrecognized != nil { + i += copy(data[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *Tree) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *Tree) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Or != nil { + data[i] = 0xa + i++ + i = encodeVarintThetest(data, i, uint64(m.Or.Size())) + n71, err := m.Or.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n71 + } + if m.And != nil { + data[i] = 0x12 + i++ + i = encodeVarintThetest(data, i, uint64(m.And.Size())) + n72, err := m.And.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n72 + } + if m.Leaf != nil { + data[i] = 0x1a + i++ + i = encodeVarintThetest(data, i, uint64(m.Leaf.Size())) + n73, err := m.Leaf.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n73 + } + if m.XXX_unrecognized != nil { + i += copy(data[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *OrBranch) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *OrBranch) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + data[i] = 0xa + i++ + i = encodeVarintThetest(data, i, uint64(m.Left.Size())) + n74, err := m.Left.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n74 + data[i] = 0x12 + i++ + i = encodeVarintThetest(data, i, uint64(m.Right.Size())) + n75, err := m.Right.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n75 + if m.XXX_unrecognized != nil { + i += copy(data[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *AndBranch) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *AndBranch) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + data[i] = 0xa + i++ + i = encodeVarintThetest(data, i, uint64(m.Left.Size())) + n76, err := m.Left.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n76 + data[i] = 0x12 + i++ + i = encodeVarintThetest(data, i, uint64(m.Right.Size())) + n77, err := m.Right.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n77 + if m.XXX_unrecognized != nil { + i += copy(data[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *Leaf) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *Leaf) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + data[i] = 0x8 + i++ + i = encodeVarintThetest(data, i, uint64(m.Value)) + data[i] = 0x12 + i++ + i = encodeVarintThetest(data, i, uint64(len(m.StrValue))) + i += copy(data[i:], m.StrValue) + if m.XXX_unrecognized != nil { + i += copy(data[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *DeepTree) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *DeepTree) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Down != nil { + data[i] = 0xa + i++ + i = encodeVarintThetest(data, i, uint64(m.Down.Size())) + n78, err := m.Down.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n78 + } + if m.And != nil { + data[i] = 0x12 + i++ + i = encodeVarintThetest(data, i, uint64(m.And.Size())) + n79, err := m.And.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n79 + } + if m.Leaf != nil { + data[i] = 0x1a + i++ + i = encodeVarintThetest(data, i, uint64(m.Leaf.Size())) + n80, err := m.Leaf.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n80 + } + if m.XXX_unrecognized != nil { + i += copy(data[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *ADeepBranch) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *ADeepBranch) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + data[i] = 0x12 + i++ + i = encodeVarintThetest(data, i, uint64(m.Down.Size())) + n81, err := m.Down.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n81 + if m.XXX_unrecognized != nil { + i += copy(data[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *AndDeepBranch) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *AndDeepBranch) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + data[i] = 0xa + i++ + i = encodeVarintThetest(data, i, uint64(m.Left.Size())) + n82, err := m.Left.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n82 + data[i] = 0x12 + i++ + i = encodeVarintThetest(data, i, uint64(m.Right.Size())) + n83, err := m.Right.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n83 + if m.XXX_unrecognized != nil { + i += copy(data[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *DeepLeaf) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *DeepLeaf) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + data[i] = 0xa + i++ + i = encodeVarintThetest(data, i, uint64(m.Tree.Size())) + n84, err := m.Tree.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n84 + if m.XXX_unrecognized != nil { + i += copy(data[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *Nil) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *Nil) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.XXX_unrecognized != nil { + i += copy(data[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *NidOptEnum) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *NidOptEnum) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + data[i] = 0x8 + i++ + i = encodeVarintThetest(data, i, uint64(m.Field1)) + if m.XXX_unrecognized != nil { + i += copy(data[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *NinOptEnum) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *NinOptEnum) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Field1 != nil { + data[i] = 0x8 + i++ + i = encodeVarintThetest(data, i, uint64(*m.Field1)) + } + if m.Field2 != nil { + data[i] = 0x10 + i++ + i = encodeVarintThetest(data, i, uint64(*m.Field2)) + } + if m.Field3 != nil { + data[i] = 0x18 + i++ + i = encodeVarintThetest(data, i, uint64(*m.Field3)) + } + if m.XXX_unrecognized != nil { + i += copy(data[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *NidRepEnum) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *NidRepEnum) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Field1) > 0 { + for _, num := range m.Field1 { + data[i] = 0x8 + i++ + i = encodeVarintThetest(data, i, uint64(num)) + } + } + if len(m.Field2) > 0 { + for _, num := range m.Field2 { + data[i] = 0x10 + i++ + i = encodeVarintThetest(data, i, uint64(num)) + } + } + if len(m.Field3) > 0 { + for _, num := range m.Field3 { + data[i] = 0x18 + i++ + i = encodeVarintThetest(data, i, uint64(num)) + } + } + if m.XXX_unrecognized != nil { + i += copy(data[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *NinRepEnum) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *NinRepEnum) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Field1) > 0 { + for _, num := range m.Field1 { + data[i] = 0x8 + i++ + i = encodeVarintThetest(data, i, uint64(num)) + } + } + if len(m.Field2) > 0 { + for _, num := range m.Field2 { + data[i] = 0x10 + i++ + i = encodeVarintThetest(data, i, uint64(num)) + } + } + if len(m.Field3) > 0 { + for _, num := range m.Field3 { + data[i] = 0x18 + i++ + i = encodeVarintThetest(data, i, uint64(num)) + } + } + if m.XXX_unrecognized != nil { + i += copy(data[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *NinOptEnumDefault) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *NinOptEnumDefault) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Field1 != nil { + data[i] = 0x8 + i++ + i = encodeVarintThetest(data, i, uint64(*m.Field1)) + } + if m.Field2 != nil { + data[i] = 0x10 + i++ + i = encodeVarintThetest(data, i, uint64(*m.Field2)) + } + if m.Field3 != nil { + data[i] = 0x18 + i++ + i = encodeVarintThetest(data, i, uint64(*m.Field3)) + } + if m.XXX_unrecognized != nil { + i += copy(data[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *AnotherNinOptEnum) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *AnotherNinOptEnum) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Field1 != nil { + data[i] = 0x8 + i++ + i = encodeVarintThetest(data, i, uint64(*m.Field1)) + } + if m.Field2 != nil { + data[i] = 0x10 + i++ + i = encodeVarintThetest(data, i, uint64(*m.Field2)) + } + if m.Field3 != nil { + data[i] = 0x18 + i++ + i = encodeVarintThetest(data, i, uint64(*m.Field3)) + } + if m.XXX_unrecognized != nil { + i += copy(data[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *AnotherNinOptEnumDefault) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *AnotherNinOptEnumDefault) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Field1 != nil { + data[i] = 0x8 + i++ + i = encodeVarintThetest(data, i, uint64(*m.Field1)) + } + if m.Field2 != nil { + data[i] = 0x10 + i++ + i = encodeVarintThetest(data, i, uint64(*m.Field2)) + } + if m.Field3 != nil { + data[i] = 0x18 + i++ + i = encodeVarintThetest(data, i, uint64(*m.Field3)) + } + if m.XXX_unrecognized != nil { + i += copy(data[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *Timer) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *Timer) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + data[i] = 0x9 + i++ + i = encodeFixed64Thetest(data, i, uint64(m.Time1)) + data[i] = 0x11 + i++ + i = encodeFixed64Thetest(data, i, uint64(m.Time2)) + if m.Data != nil { + data[i] = 0x1a + i++ + i = encodeVarintThetest(data, i, uint64(len(m.Data))) + i += copy(data[i:], m.Data) + } + if m.XXX_unrecognized != nil { + i += copy(data[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *MyExtendable) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *MyExtendable) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Field1 != nil { + data[i] = 0x8 + i++ + i = encodeVarintThetest(data, i, uint64(*m.Field1)) + } + if len(m.XXX_extensions) > 0 { + n, err := github_com_gogo_protobuf_proto.EncodeExtensionMap(m.XXX_extensions, data[i:]) + if err != nil { + return 0, err + } + i += n + } + if m.XXX_unrecognized != nil { + i += copy(data[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *OtherExtenable) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *OtherExtenable) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.M != nil { + data[i] = 0xa + i++ + i = encodeVarintThetest(data, i, uint64(m.M.Size())) + n85, err := m.M.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n85 + } + if m.Field2 != nil { + data[i] = 0x10 + i++ + i = encodeVarintThetest(data, i, uint64(*m.Field2)) + } + if m.Field13 != nil { + data[i] = 0x68 + i++ + i = encodeVarintThetest(data, i, uint64(*m.Field13)) + } + if len(m.XXX_extensions) > 0 { + n, err := github_com_gogo_protobuf_proto.EncodeExtensionMap(m.XXX_extensions, data[i:]) + if err != nil { + return 0, err + } + i += n + } + if m.XXX_unrecognized != nil { + i += copy(data[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *NestedDefinition) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *NestedDefinition) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Field1 != nil { + data[i] = 0x8 + i++ + i = encodeVarintThetest(data, i, uint64(*m.Field1)) + } + if m.EnumField != nil { + data[i] = 0x10 + i++ + i = encodeVarintThetest(data, i, uint64(*m.EnumField)) + } + if m.NNM != nil { + data[i] = 0x1a + i++ + i = encodeVarintThetest(data, i, uint64(m.NNM.Size())) + n86, err := m.NNM.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n86 + } + if m.NM != nil { + data[i] = 0x22 + i++ + i = encodeVarintThetest(data, i, uint64(m.NM.Size())) + n87, err := m.NM.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n87 + } + if m.XXX_unrecognized != nil { + i += copy(data[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *NestedDefinition_NestedMessage) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *NestedDefinition_NestedMessage) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.NestedField1 != nil { + data[i] = 0x9 + i++ + i = encodeFixed64Thetest(data, i, uint64(*m.NestedField1)) + } + if m.NNM != nil { + data[i] = 0x12 + i++ + i = encodeVarintThetest(data, i, uint64(m.NNM.Size())) + n88, err := m.NNM.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n88 + } + if m.XXX_unrecognized != nil { + i += copy(data[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *NestedDefinition_NestedMessage_NestedNestedMsg) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *NestedDefinition_NestedMessage_NestedNestedMsg) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.NestedNestedField1 != nil { + data[i] = 0x52 + i++ + i = encodeVarintThetest(data, i, uint64(len(*m.NestedNestedField1))) + i += copy(data[i:], *m.NestedNestedField1) + } + if m.XXX_unrecognized != nil { + i += copy(data[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *NestedScope) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *NestedScope) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.A != nil { + data[i] = 0xa + i++ + i = encodeVarintThetest(data, i, uint64(m.A.Size())) + n89, err := m.A.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n89 + } + if m.B != nil { + data[i] = 0x10 + i++ + i = encodeVarintThetest(data, i, uint64(*m.B)) + } + if m.C != nil { + data[i] = 0x1a + i++ + i = encodeVarintThetest(data, i, uint64(m.C.Size())) + n90, err := m.C.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n90 + } + if m.XXX_unrecognized != nil { + i += copy(data[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *NinOptNativeDefault) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *NinOptNativeDefault) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Field1 != nil { + data[i] = 0x9 + i++ + i = encodeFixed64Thetest(data, i, uint64(math.Float64bits(float64(*m.Field1)))) + } + if m.Field2 != nil { + data[i] = 0x15 + i++ + i = encodeFixed32Thetest(data, i, uint32(math.Float32bits(float32(*m.Field2)))) + } + if m.Field3 != nil { + data[i] = 0x18 + i++ + i = encodeVarintThetest(data, i, uint64(*m.Field3)) + } + if m.Field4 != nil { + data[i] = 0x20 + i++ + i = encodeVarintThetest(data, i, uint64(*m.Field4)) + } + if m.Field5 != nil { + data[i] = 0x28 + i++ + i = encodeVarintThetest(data, i, uint64(*m.Field5)) + } + if m.Field6 != nil { + data[i] = 0x30 + i++ + i = encodeVarintThetest(data, i, uint64(*m.Field6)) + } + if m.Field7 != nil { + data[i] = 0x38 + i++ + i = encodeVarintThetest(data, i, uint64((uint32(*m.Field7)<<1)^uint32((*m.Field7>>31)))) + } + if m.Field8 != nil { + data[i] = 0x40 + i++ + i = encodeVarintThetest(data, i, uint64((uint64(*m.Field8)<<1)^uint64((*m.Field8>>63)))) + } + if m.Field9 != nil { + data[i] = 0x4d + i++ + i = encodeFixed32Thetest(data, i, uint32(*m.Field9)) + } + if m.Field10 != nil { + data[i] = 0x55 + i++ + i = encodeFixed32Thetest(data, i, uint32(*m.Field10)) + } + if m.Field11 != nil { + data[i] = 0x59 + i++ + i = encodeFixed64Thetest(data, i, uint64(*m.Field11)) + } + if m.Field12 != nil { + data[i] = 0x61 + i++ + i = encodeFixed64Thetest(data, i, uint64(*m.Field12)) + } + if m.Field13 != nil { + data[i] = 0x68 + i++ + if *m.Field13 { + data[i] = 1 + } else { + data[i] = 0 + } + i++ + } + if m.Field14 != nil { + data[i] = 0x72 + i++ + i = encodeVarintThetest(data, i, uint64(len(*m.Field14))) + i += copy(data[i:], *m.Field14) + } + if m.Field15 != nil { + data[i] = 0x7a + i++ + i = encodeVarintThetest(data, i, uint64(len(m.Field15))) + i += copy(data[i:], m.Field15) + } + if m.XXX_unrecognized != nil { + i += copy(data[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *CustomContainer) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *CustomContainer) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + data[i] = 0xa + i++ + i = encodeVarintThetest(data, i, uint64(m.CustomStruct.Size())) + n91, err := m.CustomStruct.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n91 + if m.XXX_unrecognized != nil { + i += copy(data[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *CustomNameNidOptNative) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *CustomNameNidOptNative) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + data[i] = 0x9 + i++ + i = encodeFixed64Thetest(data, i, uint64(math.Float64bits(float64(m.FieldA)))) + data[i] = 0x15 + i++ + i = encodeFixed32Thetest(data, i, uint32(math.Float32bits(float32(m.FieldB)))) + data[i] = 0x18 + i++ + i = encodeVarintThetest(data, i, uint64(m.FieldC)) + data[i] = 0x20 + i++ + i = encodeVarintThetest(data, i, uint64(m.FieldD)) + data[i] = 0x28 + i++ + i = encodeVarintThetest(data, i, uint64(m.FieldE)) + data[i] = 0x30 + i++ + i = encodeVarintThetest(data, i, uint64(m.FieldF)) + data[i] = 0x38 + i++ + i = encodeVarintThetest(data, i, uint64((uint32(m.FieldG)<<1)^uint32((m.FieldG>>31)))) + data[i] = 0x40 + i++ + i = encodeVarintThetest(data, i, uint64((uint64(m.FieldH)<<1)^uint64((m.FieldH>>63)))) + data[i] = 0x4d + i++ + i = encodeFixed32Thetest(data, i, uint32(m.FieldI)) + data[i] = 0x55 + i++ + i = encodeFixed32Thetest(data, i, uint32(m.FieldJ)) + data[i] = 0x59 + i++ + i = encodeFixed64Thetest(data, i, uint64(m.FieldK)) + data[i] = 0x61 + i++ + i = encodeFixed64Thetest(data, i, uint64(m.FieldL)) + data[i] = 0x68 + i++ + if m.FieldM { + data[i] = 1 + } else { + data[i] = 0 + } + i++ + data[i] = 0x72 + i++ + i = encodeVarintThetest(data, i, uint64(len(m.FieldN))) + i += copy(data[i:], m.FieldN) + if m.FieldO != nil { + data[i] = 0x7a + i++ + i = encodeVarintThetest(data, i, uint64(len(m.FieldO))) + i += copy(data[i:], m.FieldO) + } + if m.XXX_unrecognized != nil { + i += copy(data[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *CustomNameNinOptNative) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *CustomNameNinOptNative) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.FieldA != nil { + data[i] = 0x9 + i++ + i = encodeFixed64Thetest(data, i, uint64(math.Float64bits(float64(*m.FieldA)))) + } + if m.FieldB != nil { + data[i] = 0x15 + i++ + i = encodeFixed32Thetest(data, i, uint32(math.Float32bits(float32(*m.FieldB)))) + } + if m.FieldC != nil { + data[i] = 0x18 + i++ + i = encodeVarintThetest(data, i, uint64(*m.FieldC)) + } + if m.FieldD != nil { + data[i] = 0x20 + i++ + i = encodeVarintThetest(data, i, uint64(*m.FieldD)) + } + if m.FieldE != nil { + data[i] = 0x28 + i++ + i = encodeVarintThetest(data, i, uint64(*m.FieldE)) + } + if m.FieldF != nil { + data[i] = 0x30 + i++ + i = encodeVarintThetest(data, i, uint64(*m.FieldF)) + } + if m.FieldG != nil { + data[i] = 0x38 + i++ + i = encodeVarintThetest(data, i, uint64((uint32(*m.FieldG)<<1)^uint32((*m.FieldG>>31)))) + } + if m.FieldH != nil { + data[i] = 0x40 + i++ + i = encodeVarintThetest(data, i, uint64((uint64(*m.FieldH)<<1)^uint64((*m.FieldH>>63)))) + } + if m.FieldI != nil { + data[i] = 0x4d + i++ + i = encodeFixed32Thetest(data, i, uint32(*m.FieldI)) + } + if m.FieldJ != nil { + data[i] = 0x55 + i++ + i = encodeFixed32Thetest(data, i, uint32(*m.FieldJ)) + } + if m.FieldK != nil { + data[i] = 0x59 + i++ + i = encodeFixed64Thetest(data, i, uint64(*m.FieldK)) + } + if m.FielL != nil { + data[i] = 0x61 + i++ + i = encodeFixed64Thetest(data, i, uint64(*m.FielL)) + } + if m.FieldM != nil { + data[i] = 0x68 + i++ + if *m.FieldM { + data[i] = 1 + } else { + data[i] = 0 + } + i++ + } + if m.FieldN != nil { + data[i] = 0x72 + i++ + i = encodeVarintThetest(data, i, uint64(len(*m.FieldN))) + i += copy(data[i:], *m.FieldN) + } + if m.FieldO != nil { + data[i] = 0x7a + i++ + i = encodeVarintThetest(data, i, uint64(len(m.FieldO))) + i += copy(data[i:], m.FieldO) + } + if m.XXX_unrecognized != nil { + i += copy(data[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *CustomNameNinRepNative) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *CustomNameNinRepNative) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.FieldA) > 0 { + for _, num := range m.FieldA { + data[i] = 0x9 + i++ + f92 := math.Float64bits(float64(num)) + data[i] = uint8(f92) + i++ + data[i] = uint8(f92 >> 8) + i++ + data[i] = uint8(f92 >> 16) + i++ + data[i] = uint8(f92 >> 24) + i++ + data[i] = uint8(f92 >> 32) + i++ + data[i] = uint8(f92 >> 40) + i++ + data[i] = uint8(f92 >> 48) + i++ + data[i] = uint8(f92 >> 56) + i++ + } + } + if len(m.FieldB) > 0 { + for _, num := range m.FieldB { + data[i] = 0x15 + i++ + f93 := math.Float32bits(float32(num)) + data[i] = uint8(f93) + i++ + data[i] = uint8(f93 >> 8) + i++ + data[i] = uint8(f93 >> 16) + i++ + data[i] = uint8(f93 >> 24) + i++ + } + } + if len(m.FieldC) > 0 { + for _, num := range m.FieldC { + data[i] = 0x18 + i++ + i = encodeVarintThetest(data, i, uint64(num)) + } + } + if len(m.FieldD) > 0 { + for _, num := range m.FieldD { + data[i] = 0x20 + i++ + i = encodeVarintThetest(data, i, uint64(num)) + } + } + if len(m.FieldE) > 0 { + for _, num := range m.FieldE { + data[i] = 0x28 + i++ + i = encodeVarintThetest(data, i, uint64(num)) + } + } + if len(m.FieldF) > 0 { + for _, num := range m.FieldF { + data[i] = 0x30 + i++ + i = encodeVarintThetest(data, i, uint64(num)) + } + } + if len(m.FieldG) > 0 { + for _, num := range m.FieldG { + data[i] = 0x38 + i++ + x94 := (uint32(num) << 1) ^ uint32((num >> 31)) + for x94 >= 1<<7 { + data[i] = uint8(uint64(x94)&0x7f | 0x80) + x94 >>= 7 + i++ + } + data[i] = uint8(x94) + i++ + } + } + if len(m.FieldH) > 0 { + for _, num := range m.FieldH { + data[i] = 0x40 + i++ + x95 := (uint64(num) << 1) ^ uint64((num >> 63)) + for x95 >= 1<<7 { + data[i] = uint8(uint64(x95)&0x7f | 0x80) + x95 >>= 7 + i++ + } + data[i] = uint8(x95) + i++ + } + } + if len(m.FieldI) > 0 { + for _, num := range m.FieldI { + data[i] = 0x4d + i++ + data[i] = uint8(num) + i++ + data[i] = uint8(num >> 8) + i++ + data[i] = uint8(num >> 16) + i++ + data[i] = uint8(num >> 24) + i++ + } + } + if len(m.FieldJ) > 0 { + for _, num := range m.FieldJ { + data[i] = 0x55 + i++ + data[i] = uint8(num) + i++ + data[i] = uint8(num >> 8) + i++ + data[i] = uint8(num >> 16) + i++ + data[i] = uint8(num >> 24) + i++ + } + } + if len(m.FieldK) > 0 { + for _, num := range m.FieldK { + data[i] = 0x59 + i++ + data[i] = uint8(num) + i++ + data[i] = uint8(num >> 8) + i++ + data[i] = uint8(num >> 16) + i++ + data[i] = uint8(num >> 24) + i++ + data[i] = uint8(num >> 32) + i++ + data[i] = uint8(num >> 40) + i++ + data[i] = uint8(num >> 48) + i++ + data[i] = uint8(num >> 56) + i++ + } + } + if len(m.FieldL) > 0 { + for _, num := range m.FieldL { + data[i] = 0x61 + i++ + data[i] = uint8(num) + i++ + data[i] = uint8(num >> 8) + i++ + data[i] = uint8(num >> 16) + i++ + data[i] = uint8(num >> 24) + i++ + data[i] = uint8(num >> 32) + i++ + data[i] = uint8(num >> 40) + i++ + data[i] = uint8(num >> 48) + i++ + data[i] = uint8(num >> 56) + i++ + } + } + if len(m.FieldM) > 0 { + for _, b := range m.FieldM { + data[i] = 0x68 + i++ + if b { + data[i] = 1 + } else { + data[i] = 0 + } + i++ + } + } + if len(m.FieldN) > 0 { + for _, s := range m.FieldN { + data[i] = 0x72 + 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 len(m.FieldO) > 0 { + for _, b := range m.FieldO { + data[i] = 0x7a + i++ + i = encodeVarintThetest(data, i, uint64(len(b))) + i += copy(data[i:], b) + } + } + if m.XXX_unrecognized != nil { + i += copy(data[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *CustomNameNinStruct) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *CustomNameNinStruct) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.FieldA != nil { + data[i] = 0x9 + i++ + i = encodeFixed64Thetest(data, i, uint64(math.Float64bits(float64(*m.FieldA)))) + } + if m.FieldB != nil { + data[i] = 0x15 + i++ + i = encodeFixed32Thetest(data, i, uint32(math.Float32bits(float32(*m.FieldB)))) + } + if m.FieldC != nil { + data[i] = 0x1a + i++ + i = encodeVarintThetest(data, i, uint64(m.FieldC.Size())) + n96, err := m.FieldC.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n96 + } + if len(m.FieldD) > 0 { + for _, msg := range m.FieldD { + data[i] = 0x22 + i++ + i = encodeVarintThetest(data, i, uint64(msg.Size())) + n, err := msg.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n + } + } + if m.FieldE != nil { + data[i] = 0x30 + i++ + i = encodeVarintThetest(data, i, uint64(*m.FieldE)) + } + if m.FieldF != nil { + data[i] = 0x38 + i++ + i = encodeVarintThetest(data, i, uint64((uint32(*m.FieldF)<<1)^uint32((*m.FieldF>>31)))) + } + if m.FieldG != nil { + data[i] = 0x42 + i++ + i = encodeVarintThetest(data, i, uint64(m.FieldG.Size())) + n97, err := m.FieldG.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n97 + } + if m.FieldH != nil { + data[i] = 0x68 + i++ + if *m.FieldH { + data[i] = 1 + } else { + data[i] = 0 + } + i++ + } + if m.FieldI != nil { + data[i] = 0x72 + i++ + i = encodeVarintThetest(data, i, uint64(len(*m.FieldI))) + i += copy(data[i:], *m.FieldI) + } + if m.FieldJ != nil { + data[i] = 0x7a + i++ + i = encodeVarintThetest(data, i, uint64(len(m.FieldJ))) + i += copy(data[i:], m.FieldJ) + } + if m.XXX_unrecognized != nil { + i += copy(data[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *CustomNameCustomType) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *CustomNameCustomType) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.FieldA != nil { + data[i] = 0xa + i++ + i = encodeVarintThetest(data, i, uint64(m.FieldA.Size())) + n98, err := m.FieldA.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n98 + } + if m.FieldB != nil { + data[i] = 0x12 + i++ + i = encodeVarintThetest(data, i, uint64(m.FieldB.Size())) + n99, err := m.FieldB.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n99 + } + if len(m.FieldC) > 0 { + for _, msg := range m.FieldC { + data[i] = 0x1a + i++ + i = encodeVarintThetest(data, i, uint64(msg.Size())) + n, err := msg.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n + } + } + if len(m.FieldD) > 0 { + for _, msg := range m.FieldD { + data[i] = 0x22 + i++ + i = encodeVarintThetest(data, i, uint64(msg.Size())) + n, err := msg.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n + } + } + if m.XXX_unrecognized != nil { + i += copy(data[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *CustomNameNinEmbeddedStructUnion) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *CustomNameNinEmbeddedStructUnion) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.NidOptNative != nil { + data[i] = 0xa + i++ + i = encodeVarintThetest(data, i, uint64(m.NidOptNative.Size())) + n100, err := m.NidOptNative.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n100 + } + if m.FieldA != nil { + data[i] = 0xc2 + i++ + data[i] = 0xc + i++ + i = encodeVarintThetest(data, i, uint64(m.FieldA.Size())) + n101, err := m.FieldA.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n101 + } + if m.FieldB != nil { + data[i] = 0x90 + i++ + data[i] = 0xd + i++ + if *m.FieldB { + data[i] = 1 + } else { + data[i] = 0 + } + i++ + } + if m.XXX_unrecognized != nil { + i += copy(data[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *CustomNameEnum) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *CustomNameEnum) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.FieldA != nil { + data[i] = 0x8 + i++ + i = encodeVarintThetest(data, i, uint64(*m.FieldA)) + } + if len(m.FieldB) > 0 { + for _, num := range m.FieldB { + data[i] = 0x10 + i++ + i = encodeVarintThetest(data, i, uint64(num)) + } + } + if m.XXX_unrecognized != nil { + i += copy(data[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *NoExtensionsMap) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *NoExtensionsMap) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Field1 != nil { + data[i] = 0x8 + i++ + i = encodeVarintThetest(data, i, uint64(*m.Field1)) + } + if m.XXX_extensions != nil { + i += copy(data[i:], m.XXX_extensions) + } + if m.XXX_unrecognized != nil { + i += copy(data[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *Unrecognized) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *Unrecognized) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Field1 != nil { + data[i] = 0xa + i++ + i = encodeVarintThetest(data, i, uint64(len(*m.Field1))) + i += copy(data[i:], *m.Field1) + } + return i, nil +} + +func (m *UnrecognizedWithInner) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *UnrecognizedWithInner) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Embedded) > 0 { + for _, msg := range m.Embedded { + data[i] = 0xa + i++ + i = encodeVarintThetest(data, i, uint64(msg.Size())) + n, err := msg.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n + } + } + if m.Field2 != nil { + data[i] = 0x12 + i++ + i = encodeVarintThetest(data, i, uint64(len(*m.Field2))) + i += copy(data[i:], *m.Field2) + } + if m.XXX_unrecognized != nil { + i += copy(data[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *UnrecognizedWithInner_Inner) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *UnrecognizedWithInner_Inner) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Field1 != nil { + data[i] = 0x8 + i++ + i = encodeVarintThetest(data, i, uint64(*m.Field1)) + } + return i, nil +} + +func (m *UnrecognizedWithEmbed) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *UnrecognizedWithEmbed) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + data[i] = 0xa + i++ + i = encodeVarintThetest(data, i, uint64(m.UnrecognizedWithEmbed_Embedded.Size())) + n102, err := m.UnrecognizedWithEmbed_Embedded.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n102 + if m.Field2 != nil { + data[i] = 0x12 + i++ + i = encodeVarintThetest(data, i, uint64(len(*m.Field2))) + i += copy(data[i:], *m.Field2) + } + if m.XXX_unrecognized != nil { + i += copy(data[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *UnrecognizedWithEmbed_Embedded) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *UnrecognizedWithEmbed_Embedded) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Field1 != nil { + data[i] = 0x8 + i++ + i = encodeVarintThetest(data, i, uint64(*m.Field1)) + } + return i, nil +} + +func (m *Node) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *Node) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Label != nil { + data[i] = 0xa + i++ + i = encodeVarintThetest(data, i, uint64(len(*m.Label))) + i += copy(data[i:], *m.Label) + } + if len(m.Children) > 0 { + for _, msg := range m.Children { + data[i] = 0x12 + i++ + i = encodeVarintThetest(data, i, uint64(msg.Size())) + n, err := msg.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n + } + } + if m.XXX_unrecognized != nil { + i += copy(data[i:], m.XXX_unrecognized) + } + return i, nil +} + +func encodeFixed64Thetest(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 encodeFixed32Thetest(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 encodeVarintThetest(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 NewPopulatedNidOptNative(r randyThetest, easy bool) *NidOptNative { + this := &NidOptNative{} + this.Field1 = float64(r.Float64()) + if r.Intn(2) == 0 { + this.Field1 *= -1 + } + this.Field2 = float32(r.Float32()) + if r.Intn(2) == 0 { + this.Field2 *= -1 + } + this.Field3 = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Field3 *= -1 + } + this.Field4 = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Field4 *= -1 + } + this.Field5 = uint32(r.Uint32()) + this.Field6 = uint64(uint64(r.Uint32())) + this.Field7 = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Field7 *= -1 + } + this.Field8 = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Field8 *= -1 + } + this.Field9 = uint32(r.Uint32()) + this.Field10 = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Field10 *= -1 + } + this.Field11 = uint64(uint64(r.Uint32())) + this.Field12 = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Field12 *= -1 + } + this.Field13 = bool(bool(r.Intn(2) == 0)) + this.Field14 = randStringThetest(r) + v1 := r.Intn(100) + this.Field15 = make([]byte, v1) + for i := 0; i < v1; i++ { + this.Field15[i] = byte(r.Intn(256)) + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 16) + } + return this +} + +func NewPopulatedNinOptNative(r randyThetest, easy bool) *NinOptNative { + this := &NinOptNative{} + if r.Intn(10) != 0 { + v2 := float64(r.Float64()) + if r.Intn(2) == 0 { + v2 *= -1 + } + this.Field1 = &v2 + } + if r.Intn(10) != 0 { + v3 := float32(r.Float32()) + if r.Intn(2) == 0 { + v3 *= -1 + } + this.Field2 = &v3 + } + if r.Intn(10) != 0 { + v4 := int32(r.Int31()) + if r.Intn(2) == 0 { + v4 *= -1 + } + this.Field3 = &v4 + } + if r.Intn(10) != 0 { + v5 := int64(r.Int63()) + if r.Intn(2) == 0 { + v5 *= -1 + } + this.Field4 = &v5 + } + if r.Intn(10) != 0 { + v6 := uint32(r.Uint32()) + this.Field5 = &v6 + } + if r.Intn(10) != 0 { + v7 := uint64(uint64(r.Uint32())) + this.Field6 = &v7 + } + if r.Intn(10) != 0 { + v8 := int32(r.Int31()) + if r.Intn(2) == 0 { + v8 *= -1 + } + this.Field7 = &v8 + } + if r.Intn(10) != 0 { + v9 := int64(r.Int63()) + if r.Intn(2) == 0 { + v9 *= -1 + } + this.Field8 = &v9 + } + if r.Intn(10) != 0 { + v10 := uint32(r.Uint32()) + this.Field9 = &v10 + } + if r.Intn(10) != 0 { + v11 := int32(r.Int31()) + if r.Intn(2) == 0 { + v11 *= -1 + } + this.Field10 = &v11 + } + if r.Intn(10) != 0 { + v12 := uint64(uint64(r.Uint32())) + this.Field11 = &v12 + } + if r.Intn(10) != 0 { + v13 := int64(r.Int63()) + if r.Intn(2) == 0 { + v13 *= -1 + } + this.Field12 = &v13 + } + if r.Intn(10) != 0 { + v14 := bool(bool(r.Intn(2) == 0)) + this.Field13 = &v14 + } + if r.Intn(10) != 0 { + v15 := randStringThetest(r) + this.Field14 = &v15 + } + if r.Intn(10) != 0 { + v16 := r.Intn(100) + this.Field15 = make([]byte, v16) + for i := 0; i < v16; i++ { + this.Field15[i] = byte(r.Intn(256)) + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 16) + } + return this +} + +func NewPopulatedNidRepNative(r randyThetest, easy bool) *NidRepNative { + this := &NidRepNative{} + if r.Intn(10) != 0 { + v17 := r.Intn(10) + this.Field1 = make([]float64, v17) + for i := 0; i < v17; i++ { + this.Field1[i] = float64(r.Float64()) + if r.Intn(2) == 0 { + this.Field1[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v18 := r.Intn(10) + this.Field2 = make([]float32, v18) + for i := 0; i < v18; i++ { + this.Field2[i] = float32(r.Float32()) + if r.Intn(2) == 0 { + this.Field2[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v19 := r.Intn(10) + this.Field3 = make([]int32, v19) + for i := 0; i < v19; i++ { + this.Field3[i] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Field3[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v20 := r.Intn(10) + this.Field4 = make([]int64, v20) + for i := 0; i < v20; i++ { + this.Field4[i] = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Field4[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v21 := r.Intn(10) + this.Field5 = make([]uint32, v21) + for i := 0; i < v21; i++ { + this.Field5[i] = uint32(r.Uint32()) + } + } + if r.Intn(10) != 0 { + v22 := r.Intn(10) + this.Field6 = make([]uint64, v22) + for i := 0; i < v22; i++ { + this.Field6[i] = uint64(uint64(r.Uint32())) + } + } + if r.Intn(10) != 0 { + v23 := r.Intn(10) + this.Field7 = make([]int32, v23) + for i := 0; i < v23; i++ { + this.Field7[i] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Field7[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v24 := r.Intn(10) + this.Field8 = make([]int64, v24) + for i := 0; i < v24; i++ { + this.Field8[i] = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Field8[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v25 := r.Intn(10) + this.Field9 = make([]uint32, v25) + for i := 0; i < v25; i++ { + this.Field9[i] = uint32(r.Uint32()) + } + } + if r.Intn(10) != 0 { + v26 := r.Intn(10) + this.Field10 = make([]int32, v26) + for i := 0; i < v26; i++ { + this.Field10[i] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Field10[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v27 := r.Intn(10) + this.Field11 = make([]uint64, v27) + for i := 0; i < v27; i++ { + this.Field11[i] = uint64(uint64(r.Uint32())) + } + } + if r.Intn(10) != 0 { + v28 := r.Intn(10) + this.Field12 = make([]int64, v28) + for i := 0; i < v28; i++ { + this.Field12[i] = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Field12[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v29 := r.Intn(10) + this.Field13 = make([]bool, v29) + for i := 0; i < v29; i++ { + this.Field13[i] = bool(bool(r.Intn(2) == 0)) + } + } + if r.Intn(10) != 0 { + v30 := r.Intn(10) + this.Field14 = make([]string, v30) + for i := 0; i < v30; i++ { + this.Field14[i] = randStringThetest(r) + } + } + if r.Intn(10) != 0 { + v31 := r.Intn(10) + this.Field15 = make([][]byte, v31) + for i := 0; i < v31; i++ { + v32 := r.Intn(100) + this.Field15[i] = make([]byte, v32) + for j := 0; j < v32; j++ { + this.Field15[i][j] = byte(r.Intn(256)) + } + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 16) + } + return this +} + +func NewPopulatedNinRepNative(r randyThetest, easy bool) *NinRepNative { + this := &NinRepNative{} + if r.Intn(10) != 0 { + v33 := r.Intn(10) + this.Field1 = make([]float64, v33) + for i := 0; i < v33; i++ { + this.Field1[i] = float64(r.Float64()) + if r.Intn(2) == 0 { + this.Field1[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v34 := r.Intn(10) + this.Field2 = make([]float32, v34) + for i := 0; i < v34; i++ { + this.Field2[i] = float32(r.Float32()) + if r.Intn(2) == 0 { + this.Field2[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v35 := r.Intn(10) + this.Field3 = make([]int32, v35) + for i := 0; i < v35; i++ { + this.Field3[i] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Field3[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v36 := r.Intn(10) + this.Field4 = make([]int64, v36) + for i := 0; i < v36; i++ { + this.Field4[i] = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Field4[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v37 := r.Intn(10) + this.Field5 = make([]uint32, v37) + for i := 0; i < v37; i++ { + this.Field5[i] = uint32(r.Uint32()) + } + } + if r.Intn(10) != 0 { + v38 := r.Intn(10) + this.Field6 = make([]uint64, v38) + for i := 0; i < v38; i++ { + this.Field6[i] = uint64(uint64(r.Uint32())) + } + } + if r.Intn(10) != 0 { + v39 := r.Intn(10) + this.Field7 = make([]int32, v39) + for i := 0; i < v39; i++ { + this.Field7[i] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Field7[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v40 := r.Intn(10) + this.Field8 = make([]int64, v40) + for i := 0; i < v40; i++ { + this.Field8[i] = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Field8[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v41 := r.Intn(10) + this.Field9 = make([]uint32, v41) + for i := 0; i < v41; i++ { + this.Field9[i] = uint32(r.Uint32()) + } + } + if r.Intn(10) != 0 { + v42 := r.Intn(10) + this.Field10 = make([]int32, v42) + for i := 0; i < v42; i++ { + this.Field10[i] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Field10[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v43 := r.Intn(10) + this.Field11 = make([]uint64, v43) + for i := 0; i < v43; i++ { + this.Field11[i] = uint64(uint64(r.Uint32())) + } + } + if r.Intn(10) != 0 { + v44 := r.Intn(10) + this.Field12 = make([]int64, v44) + for i := 0; i < v44; i++ { + this.Field12[i] = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Field12[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v45 := r.Intn(10) + this.Field13 = make([]bool, v45) + for i := 0; i < v45; i++ { + this.Field13[i] = bool(bool(r.Intn(2) == 0)) + } + } + if r.Intn(10) != 0 { + v46 := r.Intn(10) + this.Field14 = make([]string, v46) + for i := 0; i < v46; i++ { + this.Field14[i] = randStringThetest(r) + } + } + if r.Intn(10) != 0 { + v47 := r.Intn(10) + this.Field15 = make([][]byte, v47) + for i := 0; i < v47; i++ { + v48 := r.Intn(100) + this.Field15[i] = make([]byte, v48) + for j := 0; j < v48; j++ { + this.Field15[i][j] = byte(r.Intn(256)) + } + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 16) + } + return this +} + +func NewPopulatedNidRepPackedNative(r randyThetest, easy bool) *NidRepPackedNative { + this := &NidRepPackedNative{} + if r.Intn(10) != 0 { + v49 := r.Intn(10) + this.Field1 = make([]float64, v49) + for i := 0; i < v49; i++ { + this.Field1[i] = float64(r.Float64()) + if r.Intn(2) == 0 { + this.Field1[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v50 := r.Intn(10) + this.Field2 = make([]float32, v50) + for i := 0; i < v50; i++ { + this.Field2[i] = float32(r.Float32()) + if r.Intn(2) == 0 { + this.Field2[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v51 := r.Intn(10) + this.Field3 = make([]int32, v51) + for i := 0; i < v51; i++ { + this.Field3[i] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Field3[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v52 := r.Intn(10) + this.Field4 = make([]int64, v52) + for i := 0; i < v52; i++ { + this.Field4[i] = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Field4[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v53 := r.Intn(10) + this.Field5 = make([]uint32, v53) + for i := 0; i < v53; i++ { + this.Field5[i] = uint32(r.Uint32()) + } + } + if r.Intn(10) != 0 { + v54 := r.Intn(10) + this.Field6 = make([]uint64, v54) + for i := 0; i < v54; i++ { + this.Field6[i] = uint64(uint64(r.Uint32())) + } + } + if r.Intn(10) != 0 { + v55 := r.Intn(10) + this.Field7 = make([]int32, v55) + for i := 0; i < v55; i++ { + this.Field7[i] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Field7[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v56 := r.Intn(10) + this.Field8 = make([]int64, v56) + for i := 0; i < v56; i++ { + this.Field8[i] = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Field8[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v57 := r.Intn(10) + this.Field9 = make([]uint32, v57) + for i := 0; i < v57; i++ { + this.Field9[i] = uint32(r.Uint32()) + } + } + if r.Intn(10) != 0 { + v58 := r.Intn(10) + this.Field10 = make([]int32, v58) + for i := 0; i < v58; i++ { + this.Field10[i] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Field10[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v59 := r.Intn(10) + this.Field11 = make([]uint64, v59) + for i := 0; i < v59; i++ { + this.Field11[i] = uint64(uint64(r.Uint32())) + } + } + if r.Intn(10) != 0 { + v60 := r.Intn(10) + this.Field12 = make([]int64, v60) + for i := 0; i < v60; i++ { + this.Field12[i] = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Field12[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v61 := r.Intn(10) + this.Field13 = make([]bool, v61) + for i := 0; i < v61; i++ { + this.Field13[i] = bool(bool(r.Intn(2) == 0)) + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 14) + } + return this +} + +func NewPopulatedNinRepPackedNative(r randyThetest, easy bool) *NinRepPackedNative { + this := &NinRepPackedNative{} + if r.Intn(10) != 0 { + v62 := r.Intn(10) + this.Field1 = make([]float64, v62) + for i := 0; i < v62; i++ { + this.Field1[i] = float64(r.Float64()) + if r.Intn(2) == 0 { + this.Field1[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v63 := r.Intn(10) + this.Field2 = make([]float32, v63) + for i := 0; i < v63; i++ { + this.Field2[i] = float32(r.Float32()) + if r.Intn(2) == 0 { + this.Field2[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v64 := r.Intn(10) + this.Field3 = make([]int32, v64) + for i := 0; i < v64; i++ { + this.Field3[i] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Field3[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v65 := r.Intn(10) + this.Field4 = make([]int64, v65) + for i := 0; i < v65; i++ { + this.Field4[i] = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Field4[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v66 := r.Intn(10) + this.Field5 = make([]uint32, v66) + for i := 0; i < v66; i++ { + this.Field5[i] = uint32(r.Uint32()) + } + } + if r.Intn(10) != 0 { + v67 := r.Intn(10) + this.Field6 = make([]uint64, v67) + for i := 0; i < v67; i++ { + this.Field6[i] = uint64(uint64(r.Uint32())) + } + } + if r.Intn(10) != 0 { + v68 := r.Intn(10) + this.Field7 = make([]int32, v68) + for i := 0; i < v68; i++ { + this.Field7[i] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Field7[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v69 := r.Intn(10) + this.Field8 = make([]int64, v69) + for i := 0; i < v69; i++ { + this.Field8[i] = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Field8[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v70 := r.Intn(10) + this.Field9 = make([]uint32, v70) + for i := 0; i < v70; i++ { + this.Field9[i] = uint32(r.Uint32()) + } + } + if r.Intn(10) != 0 { + v71 := r.Intn(10) + this.Field10 = make([]int32, v71) + for i := 0; i < v71; i++ { + this.Field10[i] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Field10[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v72 := r.Intn(10) + this.Field11 = make([]uint64, v72) + for i := 0; i < v72; i++ { + this.Field11[i] = uint64(uint64(r.Uint32())) + } + } + if r.Intn(10) != 0 { + v73 := r.Intn(10) + this.Field12 = make([]int64, v73) + for i := 0; i < v73; i++ { + this.Field12[i] = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Field12[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v74 := r.Intn(10) + this.Field13 = make([]bool, v74) + for i := 0; i < v74; i++ { + this.Field13[i] = bool(bool(r.Intn(2) == 0)) + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 14) + } + return this +} + +func NewPopulatedNidOptStruct(r randyThetest, easy bool) *NidOptStruct { + this := &NidOptStruct{} + this.Field1 = float64(r.Float64()) + if r.Intn(2) == 0 { + this.Field1 *= -1 + } + this.Field2 = float32(r.Float32()) + if r.Intn(2) == 0 { + this.Field2 *= -1 + } + v75 := NewPopulatedNidOptNative(r, easy) + this.Field3 = *v75 + v76 := NewPopulatedNinOptNative(r, easy) + this.Field4 = *v76 + this.Field6 = uint64(uint64(r.Uint32())) + this.Field7 = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Field7 *= -1 + } + v77 := NewPopulatedNidOptNative(r, easy) + this.Field8 = *v77 + this.Field13 = bool(bool(r.Intn(2) == 0)) + this.Field14 = randStringThetest(r) + v78 := r.Intn(100) + this.Field15 = make([]byte, v78) + for i := 0; i < v78; i++ { + this.Field15[i] = byte(r.Intn(256)) + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 16) + } + return this +} + +func NewPopulatedNinOptStruct(r randyThetest, easy bool) *NinOptStruct { + this := &NinOptStruct{} + if r.Intn(10) != 0 { + v79 := float64(r.Float64()) + if r.Intn(2) == 0 { + v79 *= -1 + } + this.Field1 = &v79 + } + if r.Intn(10) != 0 { + v80 := float32(r.Float32()) + if r.Intn(2) == 0 { + v80 *= -1 + } + this.Field2 = &v80 + } + if r.Intn(10) != 0 { + this.Field3 = NewPopulatedNidOptNative(r, easy) + } + if r.Intn(10) != 0 { + this.Field4 = NewPopulatedNinOptNative(r, easy) + } + if r.Intn(10) != 0 { + v81 := uint64(uint64(r.Uint32())) + this.Field6 = &v81 + } + if r.Intn(10) != 0 { + v82 := int32(r.Int31()) + if r.Intn(2) == 0 { + v82 *= -1 + } + this.Field7 = &v82 + } + if r.Intn(10) != 0 { + this.Field8 = NewPopulatedNidOptNative(r, easy) + } + if r.Intn(10) != 0 { + v83 := bool(bool(r.Intn(2) == 0)) + this.Field13 = &v83 + } + if r.Intn(10) != 0 { + v84 := randStringThetest(r) + this.Field14 = &v84 + } + if r.Intn(10) != 0 { + v85 := r.Intn(100) + this.Field15 = make([]byte, v85) + for i := 0; i < v85; i++ { + this.Field15[i] = byte(r.Intn(256)) + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 16) + } + return this +} + +func NewPopulatedNidRepStruct(r randyThetest, easy bool) *NidRepStruct { + this := &NidRepStruct{} + if r.Intn(10) != 0 { + v86 := r.Intn(10) + this.Field1 = make([]float64, v86) + for i := 0; i < v86; i++ { + this.Field1[i] = float64(r.Float64()) + if r.Intn(2) == 0 { + this.Field1[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v87 := r.Intn(10) + this.Field2 = make([]float32, v87) + for i := 0; i < v87; i++ { + this.Field2[i] = float32(r.Float32()) + if r.Intn(2) == 0 { + this.Field2[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v88 := r.Intn(5) + this.Field3 = make([]NidOptNative, v88) + for i := 0; i < v88; i++ { + v89 := NewPopulatedNidOptNative(r, easy) + this.Field3[i] = *v89 + } + } + if r.Intn(10) != 0 { + v90 := r.Intn(5) + this.Field4 = make([]NinOptNative, v90) + for i := 0; i < v90; i++ { + v91 := NewPopulatedNinOptNative(r, easy) + this.Field4[i] = *v91 + } + } + if r.Intn(10) != 0 { + v92 := r.Intn(10) + this.Field6 = make([]uint64, v92) + for i := 0; i < v92; i++ { + this.Field6[i] = uint64(uint64(r.Uint32())) + } + } + if r.Intn(10) != 0 { + v93 := r.Intn(10) + this.Field7 = make([]int32, v93) + for i := 0; i < v93; i++ { + this.Field7[i] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Field7[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v94 := r.Intn(5) + this.Field8 = make([]NidOptNative, v94) + for i := 0; i < v94; i++ { + v95 := NewPopulatedNidOptNative(r, easy) + this.Field8[i] = *v95 + } + } + if r.Intn(10) != 0 { + v96 := r.Intn(10) + this.Field13 = make([]bool, v96) + for i := 0; i < v96; i++ { + this.Field13[i] = bool(bool(r.Intn(2) == 0)) + } + } + if r.Intn(10) != 0 { + v97 := r.Intn(10) + this.Field14 = make([]string, v97) + for i := 0; i < v97; i++ { + this.Field14[i] = randStringThetest(r) + } + } + if r.Intn(10) != 0 { + v98 := r.Intn(10) + this.Field15 = make([][]byte, v98) + for i := 0; i < v98; i++ { + v99 := r.Intn(100) + this.Field15[i] = make([]byte, v99) + for j := 0; j < v99; j++ { + this.Field15[i][j] = byte(r.Intn(256)) + } + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 16) + } + return this +} + +func NewPopulatedNinRepStruct(r randyThetest, easy bool) *NinRepStruct { + this := &NinRepStruct{} + if r.Intn(10) != 0 { + v100 := r.Intn(10) + this.Field1 = make([]float64, v100) + for i := 0; i < v100; i++ { + this.Field1[i] = float64(r.Float64()) + if r.Intn(2) == 0 { + this.Field1[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v101 := r.Intn(10) + this.Field2 = make([]float32, v101) + for i := 0; i < v101; i++ { + this.Field2[i] = float32(r.Float32()) + if r.Intn(2) == 0 { + this.Field2[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v102 := r.Intn(5) + this.Field3 = make([]*NidOptNative, v102) + for i := 0; i < v102; i++ { + this.Field3[i] = NewPopulatedNidOptNative(r, easy) + } + } + if r.Intn(10) != 0 { + v103 := r.Intn(5) + this.Field4 = make([]*NinOptNative, v103) + for i := 0; i < v103; i++ { + this.Field4[i] = NewPopulatedNinOptNative(r, easy) + } + } + if r.Intn(10) != 0 { + v104 := r.Intn(10) + this.Field6 = make([]uint64, v104) + for i := 0; i < v104; i++ { + this.Field6[i] = uint64(uint64(r.Uint32())) + } + } + if r.Intn(10) != 0 { + v105 := r.Intn(10) + this.Field7 = make([]int32, v105) + for i := 0; i < v105; i++ { + this.Field7[i] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Field7[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v106 := r.Intn(5) + this.Field8 = make([]*NidOptNative, v106) + for i := 0; i < v106; i++ { + this.Field8[i] = NewPopulatedNidOptNative(r, easy) + } + } + if r.Intn(10) != 0 { + v107 := r.Intn(10) + this.Field13 = make([]bool, v107) + for i := 0; i < v107; i++ { + this.Field13[i] = bool(bool(r.Intn(2) == 0)) + } + } + if r.Intn(10) != 0 { + v108 := r.Intn(10) + this.Field14 = make([]string, v108) + for i := 0; i < v108; i++ { + this.Field14[i] = randStringThetest(r) + } + } + if r.Intn(10) != 0 { + v109 := r.Intn(10) + this.Field15 = make([][]byte, v109) + for i := 0; i < v109; i++ { + v110 := r.Intn(100) + this.Field15[i] = make([]byte, v110) + for j := 0; j < v110; j++ { + this.Field15[i][j] = byte(r.Intn(256)) + } + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 16) + } + return this +} + +func NewPopulatedNidEmbeddedStruct(r randyThetest, easy bool) *NidEmbeddedStruct { + this := &NidEmbeddedStruct{} + if r.Intn(10) != 0 { + this.NidOptNative = NewPopulatedNidOptNative(r, easy) + } + v111 := NewPopulatedNidOptNative(r, easy) + this.Field200 = *v111 + this.Field210 = bool(bool(r.Intn(2) == 0)) + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 211) + } + return this +} + +func NewPopulatedNinEmbeddedStruct(r randyThetest, easy bool) *NinEmbeddedStruct { + this := &NinEmbeddedStruct{} + if r.Intn(10) != 0 { + this.NidOptNative = NewPopulatedNidOptNative(r, easy) + } + if r.Intn(10) != 0 { + this.Field200 = NewPopulatedNidOptNative(r, easy) + } + if r.Intn(10) != 0 { + v112 := bool(bool(r.Intn(2) == 0)) + this.Field210 = &v112 + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 211) + } + return this +} + +func NewPopulatedNidNestedStruct(r randyThetest, easy bool) *NidNestedStruct { + this := &NidNestedStruct{} + v113 := NewPopulatedNidOptStruct(r, easy) + this.Field1 = *v113 + if r.Intn(10) != 0 { + v114 := r.Intn(5) + this.Field2 = make([]NidRepStruct, v114) + for i := 0; i < v114; i++ { + v115 := NewPopulatedNidRepStruct(r, easy) + this.Field2[i] = *v115 + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 3) + } + return this +} + +func NewPopulatedNinNestedStruct(r randyThetest, easy bool) *NinNestedStruct { + this := &NinNestedStruct{} + if r.Intn(10) != 0 { + this.Field1 = NewPopulatedNinOptStruct(r, easy) + } + if r.Intn(10) != 0 { + v116 := r.Intn(5) + this.Field2 = make([]*NinRepStruct, v116) + for i := 0; i < v116; i++ { + this.Field2[i] = NewPopulatedNinRepStruct(r, easy) + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 3) + } + return this +} + +func NewPopulatedNidOptCustom(r randyThetest, easy bool) *NidOptCustom { + this := &NidOptCustom{} + v117 := NewPopulatedUuid(r) + this.Id = *v117 + v118 := github_com_gogo_protobuf_test_custom.NewPopulatedUint128(r) + this.Value = *v118 + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 3) + } + return this +} + +func NewPopulatedCustomDash(r randyThetest, easy bool) *CustomDash { + this := &CustomDash{} + if r.Intn(10) != 0 { + this.Value = github_com_gogo_protobuf_test_custom_dash_type.NewPopulatedBytes(r) + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 2) + } + return this +} + +func NewPopulatedNinOptCustom(r randyThetest, easy bool) *NinOptCustom { + this := &NinOptCustom{} + if r.Intn(10) != 0 { + this.Id = NewPopulatedUuid(r) + } + if r.Intn(10) != 0 { + this.Value = github_com_gogo_protobuf_test_custom.NewPopulatedUint128(r) + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 3) + } + return this +} + +func NewPopulatedNidRepCustom(r randyThetest, easy bool) *NidRepCustom { + this := &NidRepCustom{} + if r.Intn(10) != 0 { + v119 := r.Intn(10) + this.Id = make([]Uuid, v119) + for i := 0; i < v119; i++ { + v120 := NewPopulatedUuid(r) + this.Id[i] = *v120 + } + } + if r.Intn(10) != 0 { + v121 := r.Intn(10) + this.Value = make([]github_com_gogo_protobuf_test_custom.Uint128, v121) + for i := 0; i < v121; i++ { + v122 := github_com_gogo_protobuf_test_custom.NewPopulatedUint128(r) + this.Value[i] = *v122 + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 3) + } + return this +} + +func NewPopulatedNinRepCustom(r randyThetest, easy bool) *NinRepCustom { + this := &NinRepCustom{} + if r.Intn(10) != 0 { + v123 := r.Intn(10) + this.Id = make([]Uuid, v123) + for i := 0; i < v123; i++ { + v124 := NewPopulatedUuid(r) + this.Id[i] = *v124 + } + } + if r.Intn(10) != 0 { + v125 := r.Intn(10) + this.Value = make([]github_com_gogo_protobuf_test_custom.Uint128, v125) + for i := 0; i < v125; i++ { + v126 := github_com_gogo_protobuf_test_custom.NewPopulatedUint128(r) + this.Value[i] = *v126 + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 3) + } + return this +} + +func NewPopulatedNinOptNativeUnion(r randyThetest, easy bool) *NinOptNativeUnion { + this := &NinOptNativeUnion{} + fieldNum := r.Intn(9) + switch fieldNum { + case 0: + v127 := float64(r.Float64()) + if r.Intn(2) == 0 { + v127 *= -1 + } + this.Field1 = &v127 + case 1: + v128 := float32(r.Float32()) + if r.Intn(2) == 0 { + v128 *= -1 + } + this.Field2 = &v128 + case 2: + v129 := int32(r.Int31()) + if r.Intn(2) == 0 { + v129 *= -1 + } + this.Field3 = &v129 + case 3: + v130 := int64(r.Int63()) + if r.Intn(2) == 0 { + v130 *= -1 + } + this.Field4 = &v130 + case 4: + v131 := uint32(r.Uint32()) + this.Field5 = &v131 + case 5: + v132 := uint64(uint64(r.Uint32())) + this.Field6 = &v132 + case 6: + v133 := bool(bool(r.Intn(2) == 0)) + this.Field13 = &v133 + case 7: + v134 := randStringThetest(r) + this.Field14 = &v134 + case 8: + v135 := r.Intn(100) + this.Field15 = make([]byte, v135) + for i := 0; i < v135; i++ { + this.Field15[i] = byte(r.Intn(256)) + } + } + return this +} + +func NewPopulatedNinOptStructUnion(r randyThetest, easy bool) *NinOptStructUnion { + this := &NinOptStructUnion{} + fieldNum := r.Intn(9) + switch fieldNum { + case 0: + v136 := float64(r.Float64()) + if r.Intn(2) == 0 { + v136 *= -1 + } + this.Field1 = &v136 + case 1: + v137 := float32(r.Float32()) + if r.Intn(2) == 0 { + v137 *= -1 + } + this.Field2 = &v137 + case 2: + this.Field3 = NewPopulatedNidOptNative(r, easy) + case 3: + this.Field4 = NewPopulatedNinOptNative(r, easy) + case 4: + v138 := uint64(uint64(r.Uint32())) + this.Field6 = &v138 + case 5: + v139 := int32(r.Int31()) + if r.Intn(2) == 0 { + v139 *= -1 + } + this.Field7 = &v139 + case 6: + v140 := bool(bool(r.Intn(2) == 0)) + this.Field13 = &v140 + case 7: + v141 := randStringThetest(r) + this.Field14 = &v141 + case 8: + v142 := r.Intn(100) + this.Field15 = make([]byte, v142) + for i := 0; i < v142; i++ { + this.Field15[i] = byte(r.Intn(256)) + } + } + return this +} + +func NewPopulatedNinEmbeddedStructUnion(r randyThetest, easy bool) *NinEmbeddedStructUnion { + this := &NinEmbeddedStructUnion{} + fieldNum := r.Intn(3) + switch fieldNum { + case 0: + this.NidOptNative = NewPopulatedNidOptNative(r, easy) + case 1: + this.Field200 = NewPopulatedNinOptNative(r, easy) + case 2: + v143 := bool(bool(r.Intn(2) == 0)) + this.Field210 = &v143 + } + return this +} + +func NewPopulatedNinNestedStructUnion(r randyThetest, easy bool) *NinNestedStructUnion { + this := &NinNestedStructUnion{} + fieldNum := r.Intn(3) + switch fieldNum { + case 0: + this.Field1 = NewPopulatedNinOptNativeUnion(r, easy) + case 1: + this.Field2 = NewPopulatedNinOptStructUnion(r, easy) + case 2: + this.Field3 = NewPopulatedNinEmbeddedStructUnion(r, easy) + } + return this +} + +func NewPopulatedTree(r randyThetest, easy bool) *Tree { + this := &Tree{} + fieldNum := r.Intn(102) + switch fieldNum { + case 0: + this.Or = NewPopulatedOrBranch(r, easy) + case 1: + this.And = NewPopulatedAndBranch(r, easy) + case 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101: + this.Leaf = NewPopulatedLeaf(r, easy) + } + return this +} + +func NewPopulatedOrBranch(r randyThetest, easy bool) *OrBranch { + this := &OrBranch{} + v144 := NewPopulatedTree(r, easy) + this.Left = *v144 + v145 := NewPopulatedTree(r, easy) + this.Right = *v145 + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 3) + } + return this +} + +func NewPopulatedAndBranch(r randyThetest, easy bool) *AndBranch { + this := &AndBranch{} + v146 := NewPopulatedTree(r, easy) + this.Left = *v146 + v147 := NewPopulatedTree(r, easy) + this.Right = *v147 + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 3) + } + return this +} + +func NewPopulatedLeaf(r randyThetest, easy bool) *Leaf { + this := &Leaf{} + this.Value = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Value *= -1 + } + this.StrValue = randStringThetest(r) + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 3) + } + return this +} + +func NewPopulatedDeepTree(r randyThetest, easy bool) *DeepTree { + this := &DeepTree{} + fieldNum := r.Intn(102) + switch fieldNum { + case 0: + this.Down = NewPopulatedADeepBranch(r, easy) + case 1: + this.And = NewPopulatedAndDeepBranch(r, easy) + case 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101: + this.Leaf = NewPopulatedDeepLeaf(r, easy) + } + return this +} + +func NewPopulatedADeepBranch(r randyThetest, easy bool) *ADeepBranch { + this := &ADeepBranch{} + v148 := NewPopulatedDeepTree(r, easy) + this.Down = *v148 + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 3) + } + return this +} + +func NewPopulatedAndDeepBranch(r randyThetest, easy bool) *AndDeepBranch { + this := &AndDeepBranch{} + v149 := NewPopulatedDeepTree(r, easy) + this.Left = *v149 + v150 := NewPopulatedDeepTree(r, easy) + this.Right = *v150 + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 3) + } + return this +} + +func NewPopulatedDeepLeaf(r randyThetest, easy bool) *DeepLeaf { + this := &DeepLeaf{} + v151 := NewPopulatedTree(r, easy) + this.Tree = *v151 + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 2) + } + return this +} + +func NewPopulatedNil(r randyThetest, easy bool) *Nil { + this := &Nil{} + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 1) + } + return this +} + +func NewPopulatedNidOptEnum(r randyThetest, easy bool) *NidOptEnum { + this := &NidOptEnum{} + this.Field1 = TheTestEnum([]int32{0, 1, 2}[r.Intn(3)]) + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 2) + } + return this +} + +func NewPopulatedNinOptEnum(r randyThetest, easy bool) *NinOptEnum { + this := &NinOptEnum{} + if r.Intn(10) != 0 { + v152 := TheTestEnum([]int32{0, 1, 2}[r.Intn(3)]) + this.Field1 = &v152 + } + if r.Intn(10) != 0 { + v153 := YetAnotherTestEnum([]int32{0, 1}[r.Intn(2)]) + this.Field2 = &v153 + } + if r.Intn(10) != 0 { + v154 := YetYetAnotherTestEnum([]int32{0, 1}[r.Intn(2)]) + this.Field3 = &v154 + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 4) + } + return this +} + +func NewPopulatedNidRepEnum(r randyThetest, easy bool) *NidRepEnum { + this := &NidRepEnum{} + if r.Intn(10) != 0 { + v155 := r.Intn(10) + this.Field1 = make([]TheTestEnum, v155) + for i := 0; i < v155; i++ { + this.Field1[i] = TheTestEnum([]int32{0, 1, 2}[r.Intn(3)]) + } + } + if r.Intn(10) != 0 { + v156 := r.Intn(10) + this.Field2 = make([]YetAnotherTestEnum, v156) + for i := 0; i < v156; i++ { + this.Field2[i] = YetAnotherTestEnum([]int32{0, 1}[r.Intn(2)]) + } + } + if r.Intn(10) != 0 { + v157 := r.Intn(10) + this.Field3 = make([]YetYetAnotherTestEnum, v157) + for i := 0; i < v157; i++ { + this.Field3[i] = YetYetAnotherTestEnum([]int32{0, 1}[r.Intn(2)]) + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 4) + } + return this +} + +func NewPopulatedNinRepEnum(r randyThetest, easy bool) *NinRepEnum { + this := &NinRepEnum{} + if r.Intn(10) != 0 { + v158 := r.Intn(10) + this.Field1 = make([]TheTestEnum, v158) + for i := 0; i < v158; i++ { + this.Field1[i] = TheTestEnum([]int32{0, 1, 2}[r.Intn(3)]) + } + } + if r.Intn(10) != 0 { + v159 := r.Intn(10) + this.Field2 = make([]YetAnotherTestEnum, v159) + for i := 0; i < v159; i++ { + this.Field2[i] = YetAnotherTestEnum([]int32{0, 1}[r.Intn(2)]) + } + } + if r.Intn(10) != 0 { + v160 := r.Intn(10) + this.Field3 = make([]YetYetAnotherTestEnum, v160) + for i := 0; i < v160; i++ { + this.Field3[i] = YetYetAnotherTestEnum([]int32{0, 1}[r.Intn(2)]) + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 4) + } + return this +} + +func NewPopulatedNinOptEnumDefault(r randyThetest, easy bool) *NinOptEnumDefault { + this := &NinOptEnumDefault{} + if r.Intn(10) != 0 { + v161 := TheTestEnum([]int32{0, 1, 2}[r.Intn(3)]) + this.Field1 = &v161 + } + if r.Intn(10) != 0 { + v162 := YetAnotherTestEnum([]int32{0, 1}[r.Intn(2)]) + this.Field2 = &v162 + } + if r.Intn(10) != 0 { + v163 := YetYetAnotherTestEnum([]int32{0, 1}[r.Intn(2)]) + this.Field3 = &v163 + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 4) + } + return this +} + +func NewPopulatedAnotherNinOptEnum(r randyThetest, easy bool) *AnotherNinOptEnum { + this := &AnotherNinOptEnum{} + if r.Intn(10) != 0 { + v164 := AnotherTestEnum([]int32{10, 11}[r.Intn(2)]) + this.Field1 = &v164 + } + if r.Intn(10) != 0 { + v165 := YetAnotherTestEnum([]int32{0, 1}[r.Intn(2)]) + this.Field2 = &v165 + } + if r.Intn(10) != 0 { + v166 := YetYetAnotherTestEnum([]int32{0, 1}[r.Intn(2)]) + this.Field3 = &v166 + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 4) + } + return this +} + +func NewPopulatedAnotherNinOptEnumDefault(r randyThetest, easy bool) *AnotherNinOptEnumDefault { + this := &AnotherNinOptEnumDefault{} + if r.Intn(10) != 0 { + v167 := AnotherTestEnum([]int32{10, 11}[r.Intn(2)]) + this.Field1 = &v167 + } + if r.Intn(10) != 0 { + v168 := YetAnotherTestEnum([]int32{0, 1}[r.Intn(2)]) + this.Field2 = &v168 + } + if r.Intn(10) != 0 { + v169 := YetYetAnotherTestEnum([]int32{0, 1}[r.Intn(2)]) + this.Field3 = &v169 + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 4) + } + return this +} + +func NewPopulatedTimer(r randyThetest, easy bool) *Timer { + this := &Timer{} + this.Time1 = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Time1 *= -1 + } + this.Time2 = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Time2 *= -1 + } + v170 := r.Intn(100) + this.Data = make([]byte, v170) + for i := 0; i < v170; i++ { + this.Data[i] = byte(r.Intn(256)) + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 4) + } + return this +} + +func NewPopulatedMyExtendable(r randyThetest, easy bool) *MyExtendable { + this := &MyExtendable{} + if r.Intn(10) != 0 { + v171 := int64(r.Int63()) + if r.Intn(2) == 0 { + v171 *= -1 + } + this.Field1 = &v171 + } + if !easy && r.Intn(10) != 0 { + l := r.Intn(5) + for i := 0; i < l; i++ { + fieldNumber := r.Intn(100) + 100 + wire := r.Intn(4) + if wire == 3 { + wire = 5 + } + data := randFieldThetest(nil, r, fieldNumber, wire) + github_com_gogo_protobuf_proto.SetRawExtension(this, int32(fieldNumber), data) + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 201) + } + return this +} + +func NewPopulatedOtherExtenable(r randyThetest, easy bool) *OtherExtenable { + this := &OtherExtenable{} + if r.Intn(10) != 0 { + this.M = NewPopulatedMyExtendable(r, easy) + } + if r.Intn(10) != 0 { + v172 := int64(r.Int63()) + if r.Intn(2) == 0 { + v172 *= -1 + } + this.Field2 = &v172 + } + if r.Intn(10) != 0 { + v173 := int64(r.Int63()) + if r.Intn(2) == 0 { + v173 *= -1 + } + this.Field13 = &v173 + } + if !easy && r.Intn(10) != 0 { + l := r.Intn(5) + for i := 0; i < l; i++ { + eIndex := r.Intn(2) + fieldNumber := 0 + switch eIndex { + case 0: + fieldNumber = r.Intn(3) + 14 + case 1: + fieldNumber = r.Intn(3) + 10 + } + wire := r.Intn(4) + if wire == 3 { + wire = 5 + } + data := randFieldThetest(nil, r, fieldNumber, wire) + github_com_gogo_protobuf_proto.SetRawExtension(this, int32(fieldNumber), data) + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 18) + } + return this +} + +func NewPopulatedNestedDefinition(r randyThetest, easy bool) *NestedDefinition { + this := &NestedDefinition{} + if r.Intn(10) != 0 { + v174 := int64(r.Int63()) + if r.Intn(2) == 0 { + v174 *= -1 + } + this.Field1 = &v174 + } + if r.Intn(10) != 0 { + v175 := NestedDefinition_NestedEnum([]int32{1}[r.Intn(1)]) + this.EnumField = &v175 + } + if r.Intn(10) != 0 { + this.NNM = NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(r, easy) + } + if r.Intn(10) != 0 { + this.NM = NewPopulatedNestedDefinition_NestedMessage(r, easy) + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 5) + } + return this +} + +func NewPopulatedNestedDefinition_NestedMessage(r randyThetest, easy bool) *NestedDefinition_NestedMessage { + this := &NestedDefinition_NestedMessage{} + if r.Intn(10) != 0 { + v176 := uint64(uint64(r.Uint32())) + this.NestedField1 = &v176 + } + if r.Intn(10) != 0 { + this.NNM = NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(r, easy) + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 3) + } + return this +} + +func NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(r randyThetest, easy bool) *NestedDefinition_NestedMessage_NestedNestedMsg { + this := &NestedDefinition_NestedMessage_NestedNestedMsg{} + if r.Intn(10) != 0 { + v177 := randStringThetest(r) + this.NestedNestedField1 = &v177 + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 11) + } + return this +} + +func NewPopulatedNestedScope(r randyThetest, easy bool) *NestedScope { + this := &NestedScope{} + if r.Intn(10) != 0 { + this.A = NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(r, easy) + } + if r.Intn(10) != 0 { + v178 := NestedDefinition_NestedEnum([]int32{1}[r.Intn(1)]) + this.B = &v178 + } + if r.Intn(10) != 0 { + this.C = NewPopulatedNestedDefinition_NestedMessage(r, easy) + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 4) + } + return this +} + +func NewPopulatedNinOptNativeDefault(r randyThetest, easy bool) *NinOptNativeDefault { + this := &NinOptNativeDefault{} + if r.Intn(10) != 0 { + v179 := float64(r.Float64()) + if r.Intn(2) == 0 { + v179 *= -1 + } + this.Field1 = &v179 + } + if r.Intn(10) != 0 { + v180 := float32(r.Float32()) + if r.Intn(2) == 0 { + v180 *= -1 + } + this.Field2 = &v180 + } + if r.Intn(10) != 0 { + v181 := int32(r.Int31()) + if r.Intn(2) == 0 { + v181 *= -1 + } + this.Field3 = &v181 + } + if r.Intn(10) != 0 { + v182 := int64(r.Int63()) + if r.Intn(2) == 0 { + v182 *= -1 + } + this.Field4 = &v182 + } + if r.Intn(10) != 0 { + v183 := uint32(r.Uint32()) + this.Field5 = &v183 + } + if r.Intn(10) != 0 { + v184 := uint64(uint64(r.Uint32())) + this.Field6 = &v184 + } + if r.Intn(10) != 0 { + v185 := int32(r.Int31()) + if r.Intn(2) == 0 { + v185 *= -1 + } + this.Field7 = &v185 + } + if r.Intn(10) != 0 { + v186 := int64(r.Int63()) + if r.Intn(2) == 0 { + v186 *= -1 + } + this.Field8 = &v186 + } + if r.Intn(10) != 0 { + v187 := uint32(r.Uint32()) + this.Field9 = &v187 + } + if r.Intn(10) != 0 { + v188 := int32(r.Int31()) + if r.Intn(2) == 0 { + v188 *= -1 + } + this.Field10 = &v188 + } + if r.Intn(10) != 0 { + v189 := uint64(uint64(r.Uint32())) + this.Field11 = &v189 + } + if r.Intn(10) != 0 { + v190 := int64(r.Int63()) + if r.Intn(2) == 0 { + v190 *= -1 + } + this.Field12 = &v190 + } + if r.Intn(10) != 0 { + v191 := bool(bool(r.Intn(2) == 0)) + this.Field13 = &v191 + } + if r.Intn(10) != 0 { + v192 := randStringThetest(r) + this.Field14 = &v192 + } + if r.Intn(10) != 0 { + v193 := r.Intn(100) + this.Field15 = make([]byte, v193) + for i := 0; i < v193; i++ { + this.Field15[i] = byte(r.Intn(256)) + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 16) + } + return this +} + +func NewPopulatedCustomContainer(r randyThetest, easy bool) *CustomContainer { + this := &CustomContainer{} + v194 := NewPopulatedNidOptCustom(r, easy) + this.CustomStruct = *v194 + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 2) + } + return this +} + +func NewPopulatedCustomNameNidOptNative(r randyThetest, easy bool) *CustomNameNidOptNative { + this := &CustomNameNidOptNative{} + this.FieldA = float64(r.Float64()) + if r.Intn(2) == 0 { + this.FieldA *= -1 + } + this.FieldB = float32(r.Float32()) + if r.Intn(2) == 0 { + this.FieldB *= -1 + } + this.FieldC = int32(r.Int31()) + if r.Intn(2) == 0 { + this.FieldC *= -1 + } + this.FieldD = int64(r.Int63()) + if r.Intn(2) == 0 { + this.FieldD *= -1 + } + this.FieldE = uint32(r.Uint32()) + this.FieldF = uint64(uint64(r.Uint32())) + this.FieldG = int32(r.Int31()) + if r.Intn(2) == 0 { + this.FieldG *= -1 + } + this.FieldH = int64(r.Int63()) + if r.Intn(2) == 0 { + this.FieldH *= -1 + } + this.FieldI = uint32(r.Uint32()) + this.FieldJ = int32(r.Int31()) + if r.Intn(2) == 0 { + this.FieldJ *= -1 + } + this.FieldK = uint64(uint64(r.Uint32())) + this.FieldL = int64(r.Int63()) + if r.Intn(2) == 0 { + this.FieldL *= -1 + } + this.FieldM = bool(bool(r.Intn(2) == 0)) + this.FieldN = randStringThetest(r) + v195 := r.Intn(100) + this.FieldO = make([]byte, v195) + for i := 0; i < v195; i++ { + this.FieldO[i] = byte(r.Intn(256)) + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 16) + } + return this +} + +func NewPopulatedCustomNameNinOptNative(r randyThetest, easy bool) *CustomNameNinOptNative { + this := &CustomNameNinOptNative{} + if r.Intn(10) != 0 { + v196 := float64(r.Float64()) + if r.Intn(2) == 0 { + v196 *= -1 + } + this.FieldA = &v196 + } + if r.Intn(10) != 0 { + v197 := float32(r.Float32()) + if r.Intn(2) == 0 { + v197 *= -1 + } + this.FieldB = &v197 + } + if r.Intn(10) != 0 { + v198 := int32(r.Int31()) + if r.Intn(2) == 0 { + v198 *= -1 + } + this.FieldC = &v198 + } + if r.Intn(10) != 0 { + v199 := int64(r.Int63()) + if r.Intn(2) == 0 { + v199 *= -1 + } + this.FieldD = &v199 + } + if r.Intn(10) != 0 { + v200 := uint32(r.Uint32()) + this.FieldE = &v200 + } + if r.Intn(10) != 0 { + v201 := uint64(uint64(r.Uint32())) + this.FieldF = &v201 + } + if r.Intn(10) != 0 { + v202 := int32(r.Int31()) + if r.Intn(2) == 0 { + v202 *= -1 + } + this.FieldG = &v202 + } + if r.Intn(10) != 0 { + v203 := int64(r.Int63()) + if r.Intn(2) == 0 { + v203 *= -1 + } + this.FieldH = &v203 + } + if r.Intn(10) != 0 { + v204 := uint32(r.Uint32()) + this.FieldI = &v204 + } + if r.Intn(10) != 0 { + v205 := int32(r.Int31()) + if r.Intn(2) == 0 { + v205 *= -1 + } + this.FieldJ = &v205 + } + if r.Intn(10) != 0 { + v206 := uint64(uint64(r.Uint32())) + this.FieldK = &v206 + } + if r.Intn(10) != 0 { + v207 := int64(r.Int63()) + if r.Intn(2) == 0 { + v207 *= -1 + } + this.FielL = &v207 + } + if r.Intn(10) != 0 { + v208 := bool(bool(r.Intn(2) == 0)) + this.FieldM = &v208 + } + if r.Intn(10) != 0 { + v209 := randStringThetest(r) + this.FieldN = &v209 + } + if r.Intn(10) != 0 { + v210 := r.Intn(100) + this.FieldO = make([]byte, v210) + for i := 0; i < v210; i++ { + this.FieldO[i] = byte(r.Intn(256)) + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 16) + } + return this +} + +func NewPopulatedCustomNameNinRepNative(r randyThetest, easy bool) *CustomNameNinRepNative { + this := &CustomNameNinRepNative{} + if r.Intn(10) != 0 { + v211 := r.Intn(10) + this.FieldA = make([]float64, v211) + for i := 0; i < v211; i++ { + this.FieldA[i] = float64(r.Float64()) + if r.Intn(2) == 0 { + this.FieldA[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v212 := r.Intn(10) + this.FieldB = make([]float32, v212) + for i := 0; i < v212; i++ { + this.FieldB[i] = float32(r.Float32()) + if r.Intn(2) == 0 { + this.FieldB[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v213 := r.Intn(10) + this.FieldC = make([]int32, v213) + for i := 0; i < v213; i++ { + this.FieldC[i] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.FieldC[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v214 := r.Intn(10) + this.FieldD = make([]int64, v214) + for i := 0; i < v214; i++ { + this.FieldD[i] = int64(r.Int63()) + if r.Intn(2) == 0 { + this.FieldD[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v215 := r.Intn(10) + this.FieldE = make([]uint32, v215) + for i := 0; i < v215; i++ { + this.FieldE[i] = uint32(r.Uint32()) + } + } + if r.Intn(10) != 0 { + v216 := r.Intn(10) + this.FieldF = make([]uint64, v216) + for i := 0; i < v216; i++ { + this.FieldF[i] = uint64(uint64(r.Uint32())) + } + } + if r.Intn(10) != 0 { + v217 := r.Intn(10) + this.FieldG = make([]int32, v217) + for i := 0; i < v217; i++ { + this.FieldG[i] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.FieldG[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v218 := r.Intn(10) + this.FieldH = make([]int64, v218) + for i := 0; i < v218; i++ { + this.FieldH[i] = int64(r.Int63()) + if r.Intn(2) == 0 { + this.FieldH[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v219 := r.Intn(10) + this.FieldI = make([]uint32, v219) + for i := 0; i < v219; i++ { + this.FieldI[i] = uint32(r.Uint32()) + } + } + if r.Intn(10) != 0 { + v220 := r.Intn(10) + this.FieldJ = make([]int32, v220) + for i := 0; i < v220; i++ { + this.FieldJ[i] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.FieldJ[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v221 := r.Intn(10) + this.FieldK = make([]uint64, v221) + for i := 0; i < v221; i++ { + this.FieldK[i] = uint64(uint64(r.Uint32())) + } + } + if r.Intn(10) != 0 { + v222 := r.Intn(10) + this.FieldL = make([]int64, v222) + for i := 0; i < v222; i++ { + this.FieldL[i] = int64(r.Int63()) + if r.Intn(2) == 0 { + this.FieldL[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v223 := r.Intn(10) + this.FieldM = make([]bool, v223) + for i := 0; i < v223; i++ { + this.FieldM[i] = bool(bool(r.Intn(2) == 0)) + } + } + if r.Intn(10) != 0 { + v224 := r.Intn(10) + this.FieldN = make([]string, v224) + for i := 0; i < v224; i++ { + this.FieldN[i] = randStringThetest(r) + } + } + if r.Intn(10) != 0 { + v225 := r.Intn(10) + this.FieldO = make([][]byte, v225) + for i := 0; i < v225; i++ { + v226 := r.Intn(100) + this.FieldO[i] = make([]byte, v226) + for j := 0; j < v226; j++ { + this.FieldO[i][j] = byte(r.Intn(256)) + } + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 16) + } + return this +} + +func NewPopulatedCustomNameNinStruct(r randyThetest, easy bool) *CustomNameNinStruct { + this := &CustomNameNinStruct{} + if r.Intn(10) != 0 { + v227 := float64(r.Float64()) + if r.Intn(2) == 0 { + v227 *= -1 + } + this.FieldA = &v227 + } + if r.Intn(10) != 0 { + v228 := float32(r.Float32()) + if r.Intn(2) == 0 { + v228 *= -1 + } + this.FieldB = &v228 + } + if r.Intn(10) != 0 { + this.FieldC = NewPopulatedNidOptNative(r, easy) + } + if r.Intn(10) != 0 { + v229 := r.Intn(5) + this.FieldD = make([]*NinOptNative, v229) + for i := 0; i < v229; i++ { + this.FieldD[i] = NewPopulatedNinOptNative(r, easy) + } + } + if r.Intn(10) != 0 { + v230 := uint64(uint64(r.Uint32())) + this.FieldE = &v230 + } + if r.Intn(10) != 0 { + v231 := int32(r.Int31()) + if r.Intn(2) == 0 { + v231 *= -1 + } + this.FieldF = &v231 + } + if r.Intn(10) != 0 { + this.FieldG = NewPopulatedNidOptNative(r, easy) + } + if r.Intn(10) != 0 { + v232 := bool(bool(r.Intn(2) == 0)) + this.FieldH = &v232 + } + if r.Intn(10) != 0 { + v233 := randStringThetest(r) + this.FieldI = &v233 + } + if r.Intn(10) != 0 { + v234 := r.Intn(100) + this.FieldJ = make([]byte, v234) + for i := 0; i < v234; i++ { + this.FieldJ[i] = byte(r.Intn(256)) + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 16) + } + return this +} + +func NewPopulatedCustomNameCustomType(r randyThetest, easy bool) *CustomNameCustomType { + this := &CustomNameCustomType{} + if r.Intn(10) != 0 { + this.FieldA = NewPopulatedUuid(r) + } + if r.Intn(10) != 0 { + this.FieldB = github_com_gogo_protobuf_test_custom.NewPopulatedUint128(r) + } + if r.Intn(10) != 0 { + v235 := r.Intn(10) + this.FieldC = make([]Uuid, v235) + for i := 0; i < v235; i++ { + v236 := NewPopulatedUuid(r) + this.FieldC[i] = *v236 + } + } + if r.Intn(10) != 0 { + v237 := r.Intn(10) + this.FieldD = make([]github_com_gogo_protobuf_test_custom.Uint128, v237) + for i := 0; i < v237; i++ { + v238 := github_com_gogo_protobuf_test_custom.NewPopulatedUint128(r) + this.FieldD[i] = *v238 + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 5) + } + return this +} + +func NewPopulatedCustomNameNinEmbeddedStructUnion(r randyThetest, easy bool) *CustomNameNinEmbeddedStructUnion { + this := &CustomNameNinEmbeddedStructUnion{} + fieldNum := r.Intn(3) + switch fieldNum { + case 0: + this.NidOptNative = NewPopulatedNidOptNative(r, easy) + case 1: + this.FieldA = NewPopulatedNinOptNative(r, easy) + case 2: + v239 := bool(bool(r.Intn(2) == 0)) + this.FieldB = &v239 + } + return this +} + +func NewPopulatedCustomNameEnum(r randyThetest, easy bool) *CustomNameEnum { + this := &CustomNameEnum{} + if r.Intn(10) != 0 { + v240 := TheTestEnum([]int32{0, 1, 2}[r.Intn(3)]) + this.FieldA = &v240 + } + if r.Intn(10) != 0 { + v241 := r.Intn(10) + this.FieldB = make([]TheTestEnum, v241) + for i := 0; i < v241; i++ { + this.FieldB[i] = TheTestEnum([]int32{0, 1, 2}[r.Intn(3)]) + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 3) + } + return this +} + +func NewPopulatedNoExtensionsMap(r randyThetest, easy bool) *NoExtensionsMap { + this := &NoExtensionsMap{} + if r.Intn(10) != 0 { + v242 := int64(r.Int63()) + if r.Intn(2) == 0 { + v242 *= -1 + } + this.Field1 = &v242 + } + if !easy && r.Intn(10) != 0 { + l := r.Intn(5) + for i := 0; i < l; i++ { + fieldNumber := r.Intn(100) + 100 + wire := r.Intn(4) + if wire == 3 { + wire = 5 + } + data := randFieldThetest(nil, r, fieldNumber, wire) + github_com_gogo_protobuf_proto.SetRawExtension(this, int32(fieldNumber), data) + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 201) + } + return this +} + +func NewPopulatedUnrecognized(r randyThetest, easy bool) *Unrecognized { + this := &Unrecognized{} + if r.Intn(10) != 0 { + v243 := randStringThetest(r) + this.Field1 = &v243 + } + if !easy && r.Intn(10) != 0 { + } + return this +} + +func NewPopulatedUnrecognizedWithInner(r randyThetest, easy bool) *UnrecognizedWithInner { + this := &UnrecognizedWithInner{} + if r.Intn(10) != 0 { + v244 := r.Intn(5) + this.Embedded = make([]*UnrecognizedWithInner_Inner, v244) + for i := 0; i < v244; i++ { + this.Embedded[i] = NewPopulatedUnrecognizedWithInner_Inner(r, easy) + } + } + if r.Intn(10) != 0 { + v245 := randStringThetest(r) + this.Field2 = &v245 + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 3) + } + return this +} + +func NewPopulatedUnrecognizedWithInner_Inner(r randyThetest, easy bool) *UnrecognizedWithInner_Inner { + this := &UnrecognizedWithInner_Inner{} + if r.Intn(10) != 0 { + v246 := uint32(r.Uint32()) + this.Field1 = &v246 + } + if !easy && r.Intn(10) != 0 { + } + return this +} + +func NewPopulatedUnrecognizedWithEmbed(r randyThetest, easy bool) *UnrecognizedWithEmbed { + this := &UnrecognizedWithEmbed{} + v247 := NewPopulatedUnrecognizedWithEmbed_Embedded(r, easy) + this.UnrecognizedWithEmbed_Embedded = *v247 + if r.Intn(10) != 0 { + v248 := randStringThetest(r) + this.Field2 = &v248 + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 3) + } + return this +} + +func NewPopulatedUnrecognizedWithEmbed_Embedded(r randyThetest, easy bool) *UnrecognizedWithEmbed_Embedded { + this := &UnrecognizedWithEmbed_Embedded{} + if r.Intn(10) != 0 { + v249 := uint32(r.Uint32()) + this.Field1 = &v249 + } + if !easy && r.Intn(10) != 0 { + } + return this +} + +func NewPopulatedNode(r randyThetest, easy bool) *Node { + this := &Node{} + if r.Intn(10) != 0 { + v250 := randStringThetest(r) + this.Label = &v250 + } + if r.Intn(10) == 0 { + v251 := r.Intn(5) + this.Children = make([]*Node, v251) + for i := 0; i < v251; i++ { + this.Children[i] = NewPopulatedNode(r, easy) + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 3) + } + return this +} + +type randyThetest interface { + Float32() float32 + Float64() float64 + Int63() int64 + Int31() int32 + Uint32() uint32 + Intn(n int) int +} + +func randUTF8RuneThetest(r randyThetest) 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 randStringThetest(r randyThetest) string { + v252 := r.Intn(100) + tmps := make([]rune, v252) + for i := 0; i < v252; i++ { + tmps[i] = randUTF8RuneThetest(r) + } + return string(tmps) +} +func randUnrecognizedThetest(r randyThetest, 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 = randFieldThetest(data, r, fieldNumber, wire) + } + return data +} +func randFieldThetest(data []byte, r randyThetest, fieldNumber int, wire int) []byte { + key := uint32(fieldNumber)<<3 | uint32(wire) + switch wire { + case 0: + data = encodeVarintPopulateThetest(data, uint64(key)) + v253 := r.Int63() + if r.Intn(2) == 0 { + v253 *= -1 + } + data = encodeVarintPopulateThetest(data, uint64(v253)) + case 1: + data = encodeVarintPopulateThetest(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 = encodeVarintPopulateThetest(data, uint64(key)) + ll := r.Intn(100) + data = encodeVarintPopulateThetest(data, uint64(ll)) + for j := 0; j < ll; j++ { + data = append(data, byte(r.Intn(256))) + } + default: + data = encodeVarintPopulateThetest(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 encodeVarintPopulateThetest(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 *NidOptNative) Size() (n int) { + var l int + _ = l + n += 9 + n += 5 + n += 1 + sovThetest(uint64(m.Field3)) + n += 1 + sovThetest(uint64(m.Field4)) + n += 1 + sovThetest(uint64(m.Field5)) + n += 1 + sovThetest(uint64(m.Field6)) + n += 1 + sozThetest(uint64(m.Field7)) + n += 1 + sozThetest(uint64(m.Field8)) + n += 5 + n += 5 + n += 9 + n += 9 + n += 2 + l = len(m.Field14) + n += 1 + l + sovThetest(uint64(l)) + if m.Field15 != nil { + l = len(m.Field15) + n += 1 + l + sovThetest(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NinOptNative) Size() (n int) { + var l int + _ = l + if m.Field1 != nil { + n += 9 + } + if m.Field2 != nil { + n += 5 + } + if m.Field3 != nil { + n += 1 + sovThetest(uint64(*m.Field3)) + } + if m.Field4 != nil { + n += 1 + sovThetest(uint64(*m.Field4)) + } + if m.Field5 != nil { + n += 1 + sovThetest(uint64(*m.Field5)) + } + if m.Field6 != nil { + n += 1 + sovThetest(uint64(*m.Field6)) + } + if m.Field7 != nil { + n += 1 + sozThetest(uint64(*m.Field7)) + } + if m.Field8 != nil { + n += 1 + sozThetest(uint64(*m.Field8)) + } + if m.Field9 != nil { + n += 5 + } + if m.Field10 != nil { + n += 5 + } + if m.Field11 != nil { + n += 9 + } + if m.Field12 != nil { + n += 9 + } + if m.Field13 != nil { + n += 2 + } + if m.Field14 != nil { + l = len(*m.Field14) + n += 1 + l + sovThetest(uint64(l)) + } + if m.Field15 != nil { + l = len(m.Field15) + n += 1 + l + sovThetest(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NidRepNative) Size() (n int) { + var l int + _ = l + if len(m.Field1) > 0 { + n += 9 * len(m.Field1) + } + if len(m.Field2) > 0 { + n += 5 * len(m.Field2) + } + if len(m.Field3) > 0 { + for _, e := range m.Field3 { + n += 1 + sovThetest(uint64(e)) + } + } + if len(m.Field4) > 0 { + for _, e := range m.Field4 { + n += 1 + sovThetest(uint64(e)) + } + } + if len(m.Field5) > 0 { + for _, e := range m.Field5 { + n += 1 + sovThetest(uint64(e)) + } + } + if len(m.Field6) > 0 { + for _, e := range m.Field6 { + n += 1 + sovThetest(uint64(e)) + } + } + if len(m.Field7) > 0 { + for _, e := range m.Field7 { + n += 1 + sozThetest(uint64(e)) + } + } + if len(m.Field8) > 0 { + for _, e := range m.Field8 { + n += 1 + sozThetest(uint64(e)) + } + } + if len(m.Field9) > 0 { + n += 5 * len(m.Field9) + } + if len(m.Field10) > 0 { + n += 5 * len(m.Field10) + } + if len(m.Field11) > 0 { + n += 9 * len(m.Field11) + } + if len(m.Field12) > 0 { + n += 9 * len(m.Field12) + } + if len(m.Field13) > 0 { + n += 2 * len(m.Field13) + } + if len(m.Field14) > 0 { + for _, s := range m.Field14 { + l = len(s) + n += 1 + l + sovThetest(uint64(l)) + } + } + if len(m.Field15) > 0 { + for _, b := range m.Field15 { + l = len(b) + n += 1 + l + sovThetest(uint64(l)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NinRepNative) Size() (n int) { + var l int + _ = l + if len(m.Field1) > 0 { + n += 9 * len(m.Field1) + } + if len(m.Field2) > 0 { + n += 5 * len(m.Field2) + } + if len(m.Field3) > 0 { + for _, e := range m.Field3 { + n += 1 + sovThetest(uint64(e)) + } + } + if len(m.Field4) > 0 { + for _, e := range m.Field4 { + n += 1 + sovThetest(uint64(e)) + } + } + if len(m.Field5) > 0 { + for _, e := range m.Field5 { + n += 1 + sovThetest(uint64(e)) + } + } + if len(m.Field6) > 0 { + for _, e := range m.Field6 { + n += 1 + sovThetest(uint64(e)) + } + } + if len(m.Field7) > 0 { + for _, e := range m.Field7 { + n += 1 + sozThetest(uint64(e)) + } + } + if len(m.Field8) > 0 { + for _, e := range m.Field8 { + n += 1 + sozThetest(uint64(e)) + } + } + if len(m.Field9) > 0 { + n += 5 * len(m.Field9) + } + if len(m.Field10) > 0 { + n += 5 * len(m.Field10) + } + if len(m.Field11) > 0 { + n += 9 * len(m.Field11) + } + if len(m.Field12) > 0 { + n += 9 * len(m.Field12) + } + if len(m.Field13) > 0 { + n += 2 * len(m.Field13) + } + if len(m.Field14) > 0 { + for _, s := range m.Field14 { + l = len(s) + n += 1 + l + sovThetest(uint64(l)) + } + } + if len(m.Field15) > 0 { + for _, b := range m.Field15 { + l = len(b) + n += 1 + l + sovThetest(uint64(l)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NidRepPackedNative) Size() (n int) { + var l int + _ = l + if len(m.Field1) > 0 { + n += 1 + sovThetest(uint64(len(m.Field1)*8)) + len(m.Field1)*8 + } + if len(m.Field2) > 0 { + n += 1 + sovThetest(uint64(len(m.Field2)*4)) + len(m.Field2)*4 + } + if len(m.Field3) > 0 { + l = 0 + for _, e := range m.Field3 { + l += sovThetest(uint64(e)) + } + n += 1 + sovThetest(uint64(l)) + l + } + if len(m.Field4) > 0 { + l = 0 + for _, e := range m.Field4 { + l += sovThetest(uint64(e)) + } + n += 1 + sovThetest(uint64(l)) + l + } + if len(m.Field5) > 0 { + l = 0 + for _, e := range m.Field5 { + l += sovThetest(uint64(e)) + } + n += 1 + sovThetest(uint64(l)) + l + } + if len(m.Field6) > 0 { + l = 0 + for _, e := range m.Field6 { + l += sovThetest(uint64(e)) + } + n += 1 + sovThetest(uint64(l)) + l + } + if len(m.Field7) > 0 { + l = 0 + for _, e := range m.Field7 { + l += sozThetest(uint64(e)) + } + n += 1 + sovThetest(uint64(l)) + l + } + if len(m.Field8) > 0 { + l = 0 + for _, e := range m.Field8 { + l += sozThetest(uint64(e)) + } + n += 1 + sovThetest(uint64(l)) + l + } + if len(m.Field9) > 0 { + n += 1 + sovThetest(uint64(len(m.Field9)*4)) + len(m.Field9)*4 + } + if len(m.Field10) > 0 { + n += 1 + sovThetest(uint64(len(m.Field10)*4)) + len(m.Field10)*4 + } + if len(m.Field11) > 0 { + n += 1 + sovThetest(uint64(len(m.Field11)*8)) + len(m.Field11)*8 + } + if len(m.Field12) > 0 { + n += 1 + sovThetest(uint64(len(m.Field12)*8)) + len(m.Field12)*8 + } + if len(m.Field13) > 0 { + n += 1 + sovThetest(uint64(len(m.Field13))) + len(m.Field13)*1 + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NinRepPackedNative) Size() (n int) { + var l int + _ = l + if len(m.Field1) > 0 { + n += 1 + sovThetest(uint64(len(m.Field1)*8)) + len(m.Field1)*8 + } + if len(m.Field2) > 0 { + n += 1 + sovThetest(uint64(len(m.Field2)*4)) + len(m.Field2)*4 + } + if len(m.Field3) > 0 { + l = 0 + for _, e := range m.Field3 { + l += sovThetest(uint64(e)) + } + n += 1 + sovThetest(uint64(l)) + l + } + if len(m.Field4) > 0 { + l = 0 + for _, e := range m.Field4 { + l += sovThetest(uint64(e)) + } + n += 1 + sovThetest(uint64(l)) + l + } + if len(m.Field5) > 0 { + l = 0 + for _, e := range m.Field5 { + l += sovThetest(uint64(e)) + } + n += 1 + sovThetest(uint64(l)) + l + } + if len(m.Field6) > 0 { + l = 0 + for _, e := range m.Field6 { + l += sovThetest(uint64(e)) + } + n += 1 + sovThetest(uint64(l)) + l + } + if len(m.Field7) > 0 { + l = 0 + for _, e := range m.Field7 { + l += sozThetest(uint64(e)) + } + n += 1 + sovThetest(uint64(l)) + l + } + if len(m.Field8) > 0 { + l = 0 + for _, e := range m.Field8 { + l += sozThetest(uint64(e)) + } + n += 1 + sovThetest(uint64(l)) + l + } + if len(m.Field9) > 0 { + n += 1 + sovThetest(uint64(len(m.Field9)*4)) + len(m.Field9)*4 + } + if len(m.Field10) > 0 { + n += 1 + sovThetest(uint64(len(m.Field10)*4)) + len(m.Field10)*4 + } + if len(m.Field11) > 0 { + n += 1 + sovThetest(uint64(len(m.Field11)*8)) + len(m.Field11)*8 + } + if len(m.Field12) > 0 { + n += 1 + sovThetest(uint64(len(m.Field12)*8)) + len(m.Field12)*8 + } + if len(m.Field13) > 0 { + n += 1 + sovThetest(uint64(len(m.Field13))) + len(m.Field13)*1 + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NidOptStruct) Size() (n int) { + var l int + _ = l + n += 9 + n += 5 + l = m.Field3.Size() + n += 1 + l + sovThetest(uint64(l)) + l = m.Field4.Size() + n += 1 + l + sovThetest(uint64(l)) + n += 1 + sovThetest(uint64(m.Field6)) + n += 1 + sozThetest(uint64(m.Field7)) + l = m.Field8.Size() + n += 1 + l + sovThetest(uint64(l)) + n += 2 + l = len(m.Field14) + n += 1 + l + sovThetest(uint64(l)) + if m.Field15 != nil { + l = len(m.Field15) + n += 1 + l + sovThetest(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NinOptStruct) Size() (n int) { + var l int + _ = l + if m.Field1 != nil { + n += 9 + } + if m.Field2 != nil { + n += 5 + } + if m.Field3 != nil { + l = m.Field3.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if m.Field4 != nil { + l = m.Field4.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if m.Field6 != nil { + n += 1 + sovThetest(uint64(*m.Field6)) + } + if m.Field7 != nil { + n += 1 + sozThetest(uint64(*m.Field7)) + } + if m.Field8 != nil { + l = m.Field8.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if m.Field13 != nil { + n += 2 + } + if m.Field14 != nil { + l = len(*m.Field14) + n += 1 + l + sovThetest(uint64(l)) + } + if m.Field15 != nil { + l = len(m.Field15) + n += 1 + l + sovThetest(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NidRepStruct) Size() (n int) { + var l int + _ = l + if len(m.Field1) > 0 { + n += 9 * len(m.Field1) + } + if len(m.Field2) > 0 { + n += 5 * len(m.Field2) + } + if len(m.Field3) > 0 { + for _, e := range m.Field3 { + l = e.Size() + n += 1 + l + sovThetest(uint64(l)) + } + } + if len(m.Field4) > 0 { + for _, e := range m.Field4 { + l = e.Size() + n += 1 + l + sovThetest(uint64(l)) + } + } + if len(m.Field6) > 0 { + for _, e := range m.Field6 { + n += 1 + sovThetest(uint64(e)) + } + } + if len(m.Field7) > 0 { + for _, e := range m.Field7 { + n += 1 + sozThetest(uint64(e)) + } + } + if len(m.Field8) > 0 { + for _, e := range m.Field8 { + l = e.Size() + n += 1 + l + sovThetest(uint64(l)) + } + } + if len(m.Field13) > 0 { + n += 2 * len(m.Field13) + } + if len(m.Field14) > 0 { + for _, s := range m.Field14 { + l = len(s) + n += 1 + l + sovThetest(uint64(l)) + } + } + if len(m.Field15) > 0 { + for _, b := range m.Field15 { + l = len(b) + n += 1 + l + sovThetest(uint64(l)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NinRepStruct) Size() (n int) { + var l int + _ = l + if len(m.Field1) > 0 { + n += 9 * len(m.Field1) + } + if len(m.Field2) > 0 { + n += 5 * len(m.Field2) + } + if len(m.Field3) > 0 { + for _, e := range m.Field3 { + l = e.Size() + n += 1 + l + sovThetest(uint64(l)) + } + } + if len(m.Field4) > 0 { + for _, e := range m.Field4 { + l = e.Size() + n += 1 + l + sovThetest(uint64(l)) + } + } + if len(m.Field6) > 0 { + for _, e := range m.Field6 { + n += 1 + sovThetest(uint64(e)) + } + } + if len(m.Field7) > 0 { + for _, e := range m.Field7 { + n += 1 + sozThetest(uint64(e)) + } + } + if len(m.Field8) > 0 { + for _, e := range m.Field8 { + l = e.Size() + n += 1 + l + sovThetest(uint64(l)) + } + } + if len(m.Field13) > 0 { + n += 2 * len(m.Field13) + } + if len(m.Field14) > 0 { + for _, s := range m.Field14 { + l = len(s) + n += 1 + l + sovThetest(uint64(l)) + } + } + if len(m.Field15) > 0 { + for _, b := range m.Field15 { + l = len(b) + n += 1 + l + sovThetest(uint64(l)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NidEmbeddedStruct) Size() (n int) { + var l int + _ = l + if m.NidOptNative != nil { + l = m.NidOptNative.Size() + n += 1 + l + sovThetest(uint64(l)) + } + l = m.Field200.Size() + n += 2 + l + sovThetest(uint64(l)) + n += 3 + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NinEmbeddedStruct) Size() (n int) { + var l int + _ = l + if m.NidOptNative != nil { + l = m.NidOptNative.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if m.Field200 != nil { + l = m.Field200.Size() + n += 2 + l + sovThetest(uint64(l)) + } + if m.Field210 != nil { + n += 3 + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NidNestedStruct) Size() (n int) { + var l int + _ = l + l = m.Field1.Size() + n += 1 + l + sovThetest(uint64(l)) + if len(m.Field2) > 0 { + for _, e := range m.Field2 { + l = e.Size() + n += 1 + l + sovThetest(uint64(l)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NinNestedStruct) Size() (n int) { + var l int + _ = l + if m.Field1 != nil { + l = m.Field1.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if len(m.Field2) > 0 { + for _, e := range m.Field2 { + l = e.Size() + n += 1 + l + sovThetest(uint64(l)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NidOptCustom) Size() (n int) { + var l int + _ = l + l = m.Id.Size() + n += 1 + l + sovThetest(uint64(l)) + l = m.Value.Size() + n += 1 + l + sovThetest(uint64(l)) + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *CustomDash) Size() (n int) { + var l int + _ = l + if m.Value != nil { + l = m.Value.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NinOptCustom) Size() (n int) { + var l int + _ = l + if m.Id != nil { + l = m.Id.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if m.Value != nil { + l = m.Value.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NidRepCustom) Size() (n int) { + var l int + _ = l + if len(m.Id) > 0 { + for _, e := range m.Id { + l = e.Size() + n += 1 + l + sovThetest(uint64(l)) + } + } + if len(m.Value) > 0 { + for _, e := range m.Value { + l = e.Size() + n += 1 + l + sovThetest(uint64(l)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NinRepCustom) Size() (n int) { + var l int + _ = l + if len(m.Id) > 0 { + for _, e := range m.Id { + l = e.Size() + n += 1 + l + sovThetest(uint64(l)) + } + } + if len(m.Value) > 0 { + for _, e := range m.Value { + l = e.Size() + n += 1 + l + sovThetest(uint64(l)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NinOptNativeUnion) Size() (n int) { + var l int + _ = l + if m.Field1 != nil { + n += 9 + } + if m.Field2 != nil { + n += 5 + } + if m.Field3 != nil { + n += 1 + sovThetest(uint64(*m.Field3)) + } + if m.Field4 != nil { + n += 1 + sovThetest(uint64(*m.Field4)) + } + if m.Field5 != nil { + n += 1 + sovThetest(uint64(*m.Field5)) + } + if m.Field6 != nil { + n += 1 + sovThetest(uint64(*m.Field6)) + } + if m.Field13 != nil { + n += 2 + } + if m.Field14 != nil { + l = len(*m.Field14) + n += 1 + l + sovThetest(uint64(l)) + } + if m.Field15 != nil { + l = len(m.Field15) + n += 1 + l + sovThetest(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NinOptStructUnion) Size() (n int) { + var l int + _ = l + if m.Field1 != nil { + n += 9 + } + if m.Field2 != nil { + n += 5 + } + if m.Field3 != nil { + l = m.Field3.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if m.Field4 != nil { + l = m.Field4.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if m.Field6 != nil { + n += 1 + sovThetest(uint64(*m.Field6)) + } + if m.Field7 != nil { + n += 1 + sozThetest(uint64(*m.Field7)) + } + if m.Field13 != nil { + n += 2 + } + if m.Field14 != nil { + l = len(*m.Field14) + n += 1 + l + sovThetest(uint64(l)) + } + if m.Field15 != nil { + l = len(m.Field15) + n += 1 + l + sovThetest(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NinEmbeddedStructUnion) Size() (n int) { + var l int + _ = l + if m.NidOptNative != nil { + l = m.NidOptNative.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if m.Field200 != nil { + l = m.Field200.Size() + n += 2 + l + sovThetest(uint64(l)) + } + if m.Field210 != nil { + n += 3 + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NinNestedStructUnion) Size() (n int) { + var l int + _ = l + if m.Field1 != nil { + l = m.Field1.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if m.Field2 != nil { + l = m.Field2.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if m.Field3 != nil { + l = m.Field3.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *Tree) Size() (n int) { + var l int + _ = l + if m.Or != nil { + l = m.Or.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if m.And != nil { + l = m.And.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if m.Leaf != nil { + l = m.Leaf.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *OrBranch) Size() (n int) { + var l int + _ = l + l = m.Left.Size() + n += 1 + l + sovThetest(uint64(l)) + l = m.Right.Size() + n += 1 + l + sovThetest(uint64(l)) + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *AndBranch) Size() (n int) { + var l int + _ = l + l = m.Left.Size() + n += 1 + l + sovThetest(uint64(l)) + l = m.Right.Size() + n += 1 + l + sovThetest(uint64(l)) + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *Leaf) Size() (n int) { + var l int + _ = l + n += 1 + sovThetest(uint64(m.Value)) + l = len(m.StrValue) + n += 1 + l + sovThetest(uint64(l)) + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *DeepTree) Size() (n int) { + var l int + _ = l + if m.Down != nil { + l = m.Down.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if m.And != nil { + l = m.And.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if m.Leaf != nil { + l = m.Leaf.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *ADeepBranch) Size() (n int) { + var l int + _ = l + l = m.Down.Size() + n += 1 + l + sovThetest(uint64(l)) + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *AndDeepBranch) Size() (n int) { + var l int + _ = l + l = m.Left.Size() + n += 1 + l + sovThetest(uint64(l)) + l = m.Right.Size() + n += 1 + l + sovThetest(uint64(l)) + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *DeepLeaf) Size() (n int) { + var l int + _ = l + l = m.Tree.Size() + n += 1 + l + sovThetest(uint64(l)) + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *Nil) Size() (n int) { + var l int + _ = l + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NidOptEnum) Size() (n int) { + var l int + _ = l + n += 1 + sovThetest(uint64(m.Field1)) + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NinOptEnum) Size() (n int) { + var l int + _ = l + if m.Field1 != nil { + n += 1 + sovThetest(uint64(*m.Field1)) + } + if m.Field2 != nil { + n += 1 + sovThetest(uint64(*m.Field2)) + } + if m.Field3 != nil { + n += 1 + sovThetest(uint64(*m.Field3)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NidRepEnum) Size() (n int) { + var l int + _ = l + if len(m.Field1) > 0 { + for _, e := range m.Field1 { + n += 1 + sovThetest(uint64(e)) + } + } + if len(m.Field2) > 0 { + for _, e := range m.Field2 { + n += 1 + sovThetest(uint64(e)) + } + } + if len(m.Field3) > 0 { + for _, e := range m.Field3 { + n += 1 + sovThetest(uint64(e)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NinRepEnum) Size() (n int) { + var l int + _ = l + if len(m.Field1) > 0 { + for _, e := range m.Field1 { + n += 1 + sovThetest(uint64(e)) + } + } + if len(m.Field2) > 0 { + for _, e := range m.Field2 { + n += 1 + sovThetest(uint64(e)) + } + } + if len(m.Field3) > 0 { + for _, e := range m.Field3 { + n += 1 + sovThetest(uint64(e)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NinOptEnumDefault) Size() (n int) { + var l int + _ = l + if m.Field1 != nil { + n += 1 + sovThetest(uint64(*m.Field1)) + } + if m.Field2 != nil { + n += 1 + sovThetest(uint64(*m.Field2)) + } + if m.Field3 != nil { + n += 1 + sovThetest(uint64(*m.Field3)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *AnotherNinOptEnum) Size() (n int) { + var l int + _ = l + if m.Field1 != nil { + n += 1 + sovThetest(uint64(*m.Field1)) + } + if m.Field2 != nil { + n += 1 + sovThetest(uint64(*m.Field2)) + } + if m.Field3 != nil { + n += 1 + sovThetest(uint64(*m.Field3)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *AnotherNinOptEnumDefault) Size() (n int) { + var l int + _ = l + if m.Field1 != nil { + n += 1 + sovThetest(uint64(*m.Field1)) + } + if m.Field2 != nil { + n += 1 + sovThetest(uint64(*m.Field2)) + } + if m.Field3 != nil { + n += 1 + sovThetest(uint64(*m.Field3)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *Timer) Size() (n int) { + var l int + _ = l + n += 9 + n += 9 + if m.Data != nil { + l = len(m.Data) + n += 1 + l + sovThetest(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *MyExtendable) Size() (n int) { + var l int + _ = l + if m.Field1 != nil { + n += 1 + sovThetest(uint64(*m.Field1)) + } + if m.XXX_extensions != nil { + n += github_com_gogo_protobuf_proto.SizeOfExtensionMap(m.XXX_extensions) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *OtherExtenable) Size() (n int) { + var l int + _ = l + if m.M != nil { + l = m.M.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if m.Field2 != nil { + n += 1 + sovThetest(uint64(*m.Field2)) + } + if m.Field13 != nil { + n += 1 + sovThetest(uint64(*m.Field13)) + } + if m.XXX_extensions != nil { + n += github_com_gogo_protobuf_proto.SizeOfExtensionMap(m.XXX_extensions) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NestedDefinition) Size() (n int) { + var l int + _ = l + if m.Field1 != nil { + n += 1 + sovThetest(uint64(*m.Field1)) + } + if m.EnumField != nil { + n += 1 + sovThetest(uint64(*m.EnumField)) + } + if m.NNM != nil { + l = m.NNM.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if m.NM != nil { + l = m.NM.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NestedDefinition_NestedMessage) Size() (n int) { + var l int + _ = l + if m.NestedField1 != nil { + n += 9 + } + if m.NNM != nil { + l = m.NNM.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NestedDefinition_NestedMessage_NestedNestedMsg) Size() (n int) { + var l int + _ = l + if m.NestedNestedField1 != nil { + l = len(*m.NestedNestedField1) + n += 1 + l + sovThetest(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NestedScope) Size() (n int) { + var l int + _ = l + if m.A != nil { + l = m.A.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if m.B != nil { + n += 1 + sovThetest(uint64(*m.B)) + } + if m.C != nil { + l = m.C.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NinOptNativeDefault) Size() (n int) { + var l int + _ = l + if m.Field1 != nil { + n += 9 + } + if m.Field2 != nil { + n += 5 + } + if m.Field3 != nil { + n += 1 + sovThetest(uint64(*m.Field3)) + } + if m.Field4 != nil { + n += 1 + sovThetest(uint64(*m.Field4)) + } + if m.Field5 != nil { + n += 1 + sovThetest(uint64(*m.Field5)) + } + if m.Field6 != nil { + n += 1 + sovThetest(uint64(*m.Field6)) + } + if m.Field7 != nil { + n += 1 + sozThetest(uint64(*m.Field7)) + } + if m.Field8 != nil { + n += 1 + sozThetest(uint64(*m.Field8)) + } + if m.Field9 != nil { + n += 5 + } + if m.Field10 != nil { + n += 5 + } + if m.Field11 != nil { + n += 9 + } + if m.Field12 != nil { + n += 9 + } + if m.Field13 != nil { + n += 2 + } + if m.Field14 != nil { + l = len(*m.Field14) + n += 1 + l + sovThetest(uint64(l)) + } + if m.Field15 != nil { + l = len(m.Field15) + n += 1 + l + sovThetest(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *CustomContainer) Size() (n int) { + var l int + _ = l + l = m.CustomStruct.Size() + n += 1 + l + sovThetest(uint64(l)) + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *CustomNameNidOptNative) Size() (n int) { + var l int + _ = l + n += 9 + n += 5 + n += 1 + sovThetest(uint64(m.FieldC)) + n += 1 + sovThetest(uint64(m.FieldD)) + n += 1 + sovThetest(uint64(m.FieldE)) + n += 1 + sovThetest(uint64(m.FieldF)) + n += 1 + sozThetest(uint64(m.FieldG)) + n += 1 + sozThetest(uint64(m.FieldH)) + n += 5 + n += 5 + n += 9 + n += 9 + n += 2 + l = len(m.FieldN) + n += 1 + l + sovThetest(uint64(l)) + if m.FieldO != nil { + l = len(m.FieldO) + n += 1 + l + sovThetest(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *CustomNameNinOptNative) Size() (n int) { + var l int + _ = l + if m.FieldA != nil { + n += 9 + } + if m.FieldB != nil { + n += 5 + } + if m.FieldC != nil { + n += 1 + sovThetest(uint64(*m.FieldC)) + } + if m.FieldD != nil { + n += 1 + sovThetest(uint64(*m.FieldD)) + } + if m.FieldE != nil { + n += 1 + sovThetest(uint64(*m.FieldE)) + } + if m.FieldF != nil { + n += 1 + sovThetest(uint64(*m.FieldF)) + } + if m.FieldG != nil { + n += 1 + sozThetest(uint64(*m.FieldG)) + } + if m.FieldH != nil { + n += 1 + sozThetest(uint64(*m.FieldH)) + } + if m.FieldI != nil { + n += 5 + } + if m.FieldJ != nil { + n += 5 + } + if m.FieldK != nil { + n += 9 + } + if m.FielL != nil { + n += 9 + } + if m.FieldM != nil { + n += 2 + } + if m.FieldN != nil { + l = len(*m.FieldN) + n += 1 + l + sovThetest(uint64(l)) + } + if m.FieldO != nil { + l = len(m.FieldO) + n += 1 + l + sovThetest(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *CustomNameNinRepNative) Size() (n int) { + var l int + _ = l + if len(m.FieldA) > 0 { + n += 9 * len(m.FieldA) + } + if len(m.FieldB) > 0 { + n += 5 * len(m.FieldB) + } + if len(m.FieldC) > 0 { + for _, e := range m.FieldC { + n += 1 + sovThetest(uint64(e)) + } + } + if len(m.FieldD) > 0 { + for _, e := range m.FieldD { + n += 1 + sovThetest(uint64(e)) + } + } + if len(m.FieldE) > 0 { + for _, e := range m.FieldE { + n += 1 + sovThetest(uint64(e)) + } + } + if len(m.FieldF) > 0 { + for _, e := range m.FieldF { + n += 1 + sovThetest(uint64(e)) + } + } + if len(m.FieldG) > 0 { + for _, e := range m.FieldG { + n += 1 + sozThetest(uint64(e)) + } + } + if len(m.FieldH) > 0 { + for _, e := range m.FieldH { + n += 1 + sozThetest(uint64(e)) + } + } + if len(m.FieldI) > 0 { + n += 5 * len(m.FieldI) + } + if len(m.FieldJ) > 0 { + n += 5 * len(m.FieldJ) + } + if len(m.FieldK) > 0 { + n += 9 * len(m.FieldK) + } + if len(m.FieldL) > 0 { + n += 9 * len(m.FieldL) + } + if len(m.FieldM) > 0 { + n += 2 * len(m.FieldM) + } + if len(m.FieldN) > 0 { + for _, s := range m.FieldN { + l = len(s) + n += 1 + l + sovThetest(uint64(l)) + } + } + if len(m.FieldO) > 0 { + for _, b := range m.FieldO { + l = len(b) + n += 1 + l + sovThetest(uint64(l)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *CustomNameNinStruct) Size() (n int) { + var l int + _ = l + if m.FieldA != nil { + n += 9 + } + if m.FieldB != nil { + n += 5 + } + if m.FieldC != nil { + l = m.FieldC.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if len(m.FieldD) > 0 { + for _, e := range m.FieldD { + l = e.Size() + n += 1 + l + sovThetest(uint64(l)) + } + } + if m.FieldE != nil { + n += 1 + sovThetest(uint64(*m.FieldE)) + } + if m.FieldF != nil { + n += 1 + sozThetest(uint64(*m.FieldF)) + } + if m.FieldG != nil { + l = m.FieldG.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if m.FieldH != nil { + n += 2 + } + if m.FieldI != nil { + l = len(*m.FieldI) + n += 1 + l + sovThetest(uint64(l)) + } + if m.FieldJ != nil { + l = len(m.FieldJ) + n += 1 + l + sovThetest(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *CustomNameCustomType) Size() (n int) { + var l int + _ = l + if m.FieldA != nil { + l = m.FieldA.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if m.FieldB != nil { + l = m.FieldB.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if len(m.FieldC) > 0 { + for _, e := range m.FieldC { + l = e.Size() + n += 1 + l + sovThetest(uint64(l)) + } + } + if len(m.FieldD) > 0 { + for _, e := range m.FieldD { + l = e.Size() + n += 1 + l + sovThetest(uint64(l)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *CustomNameNinEmbeddedStructUnion) Size() (n int) { + var l int + _ = l + if m.NidOptNative != nil { + l = m.NidOptNative.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if m.FieldA != nil { + l = m.FieldA.Size() + n += 2 + l + sovThetest(uint64(l)) + } + if m.FieldB != nil { + n += 3 + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *CustomNameEnum) Size() (n int) { + var l int + _ = l + if m.FieldA != nil { + n += 1 + sovThetest(uint64(*m.FieldA)) + } + if len(m.FieldB) > 0 { + for _, e := range m.FieldB { + n += 1 + sovThetest(uint64(e)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NoExtensionsMap) Size() (n int) { + var l int + _ = l + if m.Field1 != nil { + n += 1 + sovThetest(uint64(*m.Field1)) + } + if m.XXX_extensions != nil { + n += len(m.XXX_extensions) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *Unrecognized) Size() (n int) { + var l int + _ = l + if m.Field1 != nil { + l = len(*m.Field1) + n += 1 + l + sovThetest(uint64(l)) + } + return n +} + +func (m *UnrecognizedWithInner) Size() (n int) { + var l int + _ = l + if len(m.Embedded) > 0 { + for _, e := range m.Embedded { + l = e.Size() + n += 1 + l + sovThetest(uint64(l)) + } + } + if m.Field2 != nil { + l = len(*m.Field2) + n += 1 + l + sovThetest(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *UnrecognizedWithInner_Inner) Size() (n int) { + var l int + _ = l + if m.Field1 != nil { + n += 1 + sovThetest(uint64(*m.Field1)) + } + return n +} + +func (m *UnrecognizedWithEmbed) Size() (n int) { + var l int + _ = l + l = m.UnrecognizedWithEmbed_Embedded.Size() + n += 1 + l + sovThetest(uint64(l)) + if m.Field2 != nil { + l = len(*m.Field2) + n += 1 + l + sovThetest(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *UnrecognizedWithEmbed_Embedded) Size() (n int) { + var l int + _ = l + if m.Field1 != nil { + n += 1 + sovThetest(uint64(*m.Field1)) + } + return n +} + +func (m *Node) Size() (n int) { + var l int + _ = l + if m.Label != nil { + l = len(*m.Label) + n += 1 + l + sovThetest(uint64(l)) + } + if len(m.Children) > 0 { + for _, e := range m.Children { + l = e.Size() + n += 1 + l + sovThetest(uint64(l)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func sovThetest(x uint64) (n int) { + for { + n++ + x >>= 7 + if x == 0 { + break + } + } + return n +} +func sozThetest(x uint64) (n int) { + return sovThetest(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (this *NidOptNative) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NidOptNative{`, + `Field1:` + fmt.Sprintf("%v", this.Field1) + `,`, + `Field2:` + fmt.Sprintf("%v", this.Field2) + `,`, + `Field3:` + fmt.Sprintf("%v", this.Field3) + `,`, + `Field4:` + fmt.Sprintf("%v", this.Field4) + `,`, + `Field5:` + fmt.Sprintf("%v", this.Field5) + `,`, + `Field6:` + fmt.Sprintf("%v", this.Field6) + `,`, + `Field7:` + fmt.Sprintf("%v", this.Field7) + `,`, + `Field8:` + fmt.Sprintf("%v", this.Field8) + `,`, + `Field9:` + fmt.Sprintf("%v", this.Field9) + `,`, + `Field10:` + fmt.Sprintf("%v", this.Field10) + `,`, + `Field11:` + fmt.Sprintf("%v", this.Field11) + `,`, + `Field12:` + fmt.Sprintf("%v", this.Field12) + `,`, + `Field13:` + fmt.Sprintf("%v", this.Field13) + `,`, + `Field14:` + fmt.Sprintf("%v", this.Field14) + `,`, + `Field15:` + fmt.Sprintf("%v", this.Field15) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NinOptNative) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NinOptNative{`, + `Field1:` + valueToStringThetest(this.Field1) + `,`, + `Field2:` + valueToStringThetest(this.Field2) + `,`, + `Field3:` + valueToStringThetest(this.Field3) + `,`, + `Field4:` + valueToStringThetest(this.Field4) + `,`, + `Field5:` + valueToStringThetest(this.Field5) + `,`, + `Field6:` + valueToStringThetest(this.Field6) + `,`, + `Field7:` + valueToStringThetest(this.Field7) + `,`, + `Field8:` + valueToStringThetest(this.Field8) + `,`, + `Field9:` + valueToStringThetest(this.Field9) + `,`, + `Field10:` + valueToStringThetest(this.Field10) + `,`, + `Field11:` + valueToStringThetest(this.Field11) + `,`, + `Field12:` + valueToStringThetest(this.Field12) + `,`, + `Field13:` + valueToStringThetest(this.Field13) + `,`, + `Field14:` + valueToStringThetest(this.Field14) + `,`, + `Field15:` + valueToStringThetest(this.Field15) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NidRepNative) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NidRepNative{`, + `Field1:` + fmt.Sprintf("%v", this.Field1) + `,`, + `Field2:` + fmt.Sprintf("%v", this.Field2) + `,`, + `Field3:` + fmt.Sprintf("%v", this.Field3) + `,`, + `Field4:` + fmt.Sprintf("%v", this.Field4) + `,`, + `Field5:` + fmt.Sprintf("%v", this.Field5) + `,`, + `Field6:` + fmt.Sprintf("%v", this.Field6) + `,`, + `Field7:` + fmt.Sprintf("%v", this.Field7) + `,`, + `Field8:` + fmt.Sprintf("%v", this.Field8) + `,`, + `Field9:` + fmt.Sprintf("%v", this.Field9) + `,`, + `Field10:` + fmt.Sprintf("%v", this.Field10) + `,`, + `Field11:` + fmt.Sprintf("%v", this.Field11) + `,`, + `Field12:` + fmt.Sprintf("%v", this.Field12) + `,`, + `Field13:` + fmt.Sprintf("%v", this.Field13) + `,`, + `Field14:` + fmt.Sprintf("%v", this.Field14) + `,`, + `Field15:` + fmt.Sprintf("%v", this.Field15) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NinRepNative) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NinRepNative{`, + `Field1:` + fmt.Sprintf("%v", this.Field1) + `,`, + `Field2:` + fmt.Sprintf("%v", this.Field2) + `,`, + `Field3:` + fmt.Sprintf("%v", this.Field3) + `,`, + `Field4:` + fmt.Sprintf("%v", this.Field4) + `,`, + `Field5:` + fmt.Sprintf("%v", this.Field5) + `,`, + `Field6:` + fmt.Sprintf("%v", this.Field6) + `,`, + `Field7:` + fmt.Sprintf("%v", this.Field7) + `,`, + `Field8:` + fmt.Sprintf("%v", this.Field8) + `,`, + `Field9:` + fmt.Sprintf("%v", this.Field9) + `,`, + `Field10:` + fmt.Sprintf("%v", this.Field10) + `,`, + `Field11:` + fmt.Sprintf("%v", this.Field11) + `,`, + `Field12:` + fmt.Sprintf("%v", this.Field12) + `,`, + `Field13:` + fmt.Sprintf("%v", this.Field13) + `,`, + `Field14:` + fmt.Sprintf("%v", this.Field14) + `,`, + `Field15:` + fmt.Sprintf("%v", this.Field15) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NidRepPackedNative) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NidRepPackedNative{`, + `Field1:` + fmt.Sprintf("%v", this.Field1) + `,`, + `Field2:` + fmt.Sprintf("%v", this.Field2) + `,`, + `Field3:` + fmt.Sprintf("%v", this.Field3) + `,`, + `Field4:` + fmt.Sprintf("%v", this.Field4) + `,`, + `Field5:` + fmt.Sprintf("%v", this.Field5) + `,`, + `Field6:` + fmt.Sprintf("%v", this.Field6) + `,`, + `Field7:` + fmt.Sprintf("%v", this.Field7) + `,`, + `Field8:` + fmt.Sprintf("%v", this.Field8) + `,`, + `Field9:` + fmt.Sprintf("%v", this.Field9) + `,`, + `Field10:` + fmt.Sprintf("%v", this.Field10) + `,`, + `Field11:` + fmt.Sprintf("%v", this.Field11) + `,`, + `Field12:` + fmt.Sprintf("%v", this.Field12) + `,`, + `Field13:` + fmt.Sprintf("%v", this.Field13) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NinRepPackedNative) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NinRepPackedNative{`, + `Field1:` + fmt.Sprintf("%v", this.Field1) + `,`, + `Field2:` + fmt.Sprintf("%v", this.Field2) + `,`, + `Field3:` + fmt.Sprintf("%v", this.Field3) + `,`, + `Field4:` + fmt.Sprintf("%v", this.Field4) + `,`, + `Field5:` + fmt.Sprintf("%v", this.Field5) + `,`, + `Field6:` + fmt.Sprintf("%v", this.Field6) + `,`, + `Field7:` + fmt.Sprintf("%v", this.Field7) + `,`, + `Field8:` + fmt.Sprintf("%v", this.Field8) + `,`, + `Field9:` + fmt.Sprintf("%v", this.Field9) + `,`, + `Field10:` + fmt.Sprintf("%v", this.Field10) + `,`, + `Field11:` + fmt.Sprintf("%v", this.Field11) + `,`, + `Field12:` + fmt.Sprintf("%v", this.Field12) + `,`, + `Field13:` + fmt.Sprintf("%v", this.Field13) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NidOptStruct) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NidOptStruct{`, + `Field1:` + fmt.Sprintf("%v", this.Field1) + `,`, + `Field2:` + fmt.Sprintf("%v", this.Field2) + `,`, + `Field3:` + strings.Replace(strings.Replace(this.Field3.String(), "NidOptNative", "NidOptNative", 1), `&`, ``, 1) + `,`, + `Field4:` + strings.Replace(strings.Replace(this.Field4.String(), "NinOptNative", "NinOptNative", 1), `&`, ``, 1) + `,`, + `Field6:` + fmt.Sprintf("%v", this.Field6) + `,`, + `Field7:` + fmt.Sprintf("%v", this.Field7) + `,`, + `Field8:` + strings.Replace(strings.Replace(this.Field8.String(), "NidOptNative", "NidOptNative", 1), `&`, ``, 1) + `,`, + `Field13:` + fmt.Sprintf("%v", this.Field13) + `,`, + `Field14:` + fmt.Sprintf("%v", this.Field14) + `,`, + `Field15:` + fmt.Sprintf("%v", this.Field15) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NinOptStruct) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NinOptStruct{`, + `Field1:` + valueToStringThetest(this.Field1) + `,`, + `Field2:` + valueToStringThetest(this.Field2) + `,`, + `Field3:` + strings.Replace(fmt.Sprintf("%v", this.Field3), "NidOptNative", "NidOptNative", 1) + `,`, + `Field4:` + strings.Replace(fmt.Sprintf("%v", this.Field4), "NinOptNative", "NinOptNative", 1) + `,`, + `Field6:` + valueToStringThetest(this.Field6) + `,`, + `Field7:` + valueToStringThetest(this.Field7) + `,`, + `Field8:` + strings.Replace(fmt.Sprintf("%v", this.Field8), "NidOptNative", "NidOptNative", 1) + `,`, + `Field13:` + valueToStringThetest(this.Field13) + `,`, + `Field14:` + valueToStringThetest(this.Field14) + `,`, + `Field15:` + valueToStringThetest(this.Field15) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NidRepStruct) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NidRepStruct{`, + `Field1:` + fmt.Sprintf("%v", this.Field1) + `,`, + `Field2:` + fmt.Sprintf("%v", this.Field2) + `,`, + `Field3:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Field3), "NidOptNative", "NidOptNative", 1), `&`, ``, 1) + `,`, + `Field4:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Field4), "NinOptNative", "NinOptNative", 1), `&`, ``, 1) + `,`, + `Field6:` + fmt.Sprintf("%v", this.Field6) + `,`, + `Field7:` + fmt.Sprintf("%v", this.Field7) + `,`, + `Field8:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Field8), "NidOptNative", "NidOptNative", 1), `&`, ``, 1) + `,`, + `Field13:` + fmt.Sprintf("%v", this.Field13) + `,`, + `Field14:` + fmt.Sprintf("%v", this.Field14) + `,`, + `Field15:` + fmt.Sprintf("%v", this.Field15) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NinRepStruct) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NinRepStruct{`, + `Field1:` + fmt.Sprintf("%v", this.Field1) + `,`, + `Field2:` + fmt.Sprintf("%v", this.Field2) + `,`, + `Field3:` + strings.Replace(fmt.Sprintf("%v", this.Field3), "NidOptNative", "NidOptNative", 1) + `,`, + `Field4:` + strings.Replace(fmt.Sprintf("%v", this.Field4), "NinOptNative", "NinOptNative", 1) + `,`, + `Field6:` + fmt.Sprintf("%v", this.Field6) + `,`, + `Field7:` + fmt.Sprintf("%v", this.Field7) + `,`, + `Field8:` + strings.Replace(fmt.Sprintf("%v", this.Field8), "NidOptNative", "NidOptNative", 1) + `,`, + `Field13:` + fmt.Sprintf("%v", this.Field13) + `,`, + `Field14:` + fmt.Sprintf("%v", this.Field14) + `,`, + `Field15:` + fmt.Sprintf("%v", this.Field15) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NidEmbeddedStruct) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NidEmbeddedStruct{`, + `NidOptNative:` + strings.Replace(fmt.Sprintf("%v", this.NidOptNative), "NidOptNative", "NidOptNative", 1) + `,`, + `Field200:` + strings.Replace(strings.Replace(this.Field200.String(), "NidOptNative", "NidOptNative", 1), `&`, ``, 1) + `,`, + `Field210:` + fmt.Sprintf("%v", this.Field210) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NinEmbeddedStruct) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NinEmbeddedStruct{`, + `NidOptNative:` + strings.Replace(fmt.Sprintf("%v", this.NidOptNative), "NidOptNative", "NidOptNative", 1) + `,`, + `Field200:` + strings.Replace(fmt.Sprintf("%v", this.Field200), "NidOptNative", "NidOptNative", 1) + `,`, + `Field210:` + valueToStringThetest(this.Field210) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NidNestedStruct) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NidNestedStruct{`, + `Field1:` + strings.Replace(strings.Replace(this.Field1.String(), "NidOptStruct", "NidOptStruct", 1), `&`, ``, 1) + `,`, + `Field2:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Field2), "NidRepStruct", "NidRepStruct", 1), `&`, ``, 1) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NinNestedStruct) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NinNestedStruct{`, + `Field1:` + strings.Replace(fmt.Sprintf("%v", this.Field1), "NinOptStruct", "NinOptStruct", 1) + `,`, + `Field2:` + strings.Replace(fmt.Sprintf("%v", this.Field2), "NinRepStruct", "NinRepStruct", 1) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NidOptCustom) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NidOptCustom{`, + `Id:` + fmt.Sprintf("%v", this.Id) + `,`, + `Value:` + fmt.Sprintf("%v", this.Value) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *CustomDash) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&CustomDash{`, + `Value:` + valueToStringThetest(this.Value) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NinOptCustom) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NinOptCustom{`, + `Id:` + valueToStringThetest(this.Id) + `,`, + `Value:` + valueToStringThetest(this.Value) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NidRepCustom) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NidRepCustom{`, + `Id:` + fmt.Sprintf("%v", this.Id) + `,`, + `Value:` + fmt.Sprintf("%v", this.Value) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NinRepCustom) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NinRepCustom{`, + `Id:` + fmt.Sprintf("%v", this.Id) + `,`, + `Value:` + fmt.Sprintf("%v", this.Value) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NinOptNativeUnion) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NinOptNativeUnion{`, + `Field1:` + valueToStringThetest(this.Field1) + `,`, + `Field2:` + valueToStringThetest(this.Field2) + `,`, + `Field3:` + valueToStringThetest(this.Field3) + `,`, + `Field4:` + valueToStringThetest(this.Field4) + `,`, + `Field5:` + valueToStringThetest(this.Field5) + `,`, + `Field6:` + valueToStringThetest(this.Field6) + `,`, + `Field13:` + valueToStringThetest(this.Field13) + `,`, + `Field14:` + valueToStringThetest(this.Field14) + `,`, + `Field15:` + valueToStringThetest(this.Field15) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NinOptStructUnion) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NinOptStructUnion{`, + `Field1:` + valueToStringThetest(this.Field1) + `,`, + `Field2:` + valueToStringThetest(this.Field2) + `,`, + `Field3:` + strings.Replace(fmt.Sprintf("%v", this.Field3), "NidOptNative", "NidOptNative", 1) + `,`, + `Field4:` + strings.Replace(fmt.Sprintf("%v", this.Field4), "NinOptNative", "NinOptNative", 1) + `,`, + `Field6:` + valueToStringThetest(this.Field6) + `,`, + `Field7:` + valueToStringThetest(this.Field7) + `,`, + `Field13:` + valueToStringThetest(this.Field13) + `,`, + `Field14:` + valueToStringThetest(this.Field14) + `,`, + `Field15:` + valueToStringThetest(this.Field15) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NinEmbeddedStructUnion) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NinEmbeddedStructUnion{`, + `NidOptNative:` + strings.Replace(fmt.Sprintf("%v", this.NidOptNative), "NidOptNative", "NidOptNative", 1) + `,`, + `Field200:` + strings.Replace(fmt.Sprintf("%v", this.Field200), "NinOptNative", "NinOptNative", 1) + `,`, + `Field210:` + valueToStringThetest(this.Field210) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NinNestedStructUnion) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NinNestedStructUnion{`, + `Field1:` + strings.Replace(fmt.Sprintf("%v", this.Field1), "NinOptNativeUnion", "NinOptNativeUnion", 1) + `,`, + `Field2:` + strings.Replace(fmt.Sprintf("%v", this.Field2), "NinOptStructUnion", "NinOptStructUnion", 1) + `,`, + `Field3:` + strings.Replace(fmt.Sprintf("%v", this.Field3), "NinEmbeddedStructUnion", "NinEmbeddedStructUnion", 1) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *Tree) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&Tree{`, + `Or:` + strings.Replace(fmt.Sprintf("%v", this.Or), "OrBranch", "OrBranch", 1) + `,`, + `And:` + strings.Replace(fmt.Sprintf("%v", this.And), "AndBranch", "AndBranch", 1) + `,`, + `Leaf:` + strings.Replace(fmt.Sprintf("%v", this.Leaf), "Leaf", "Leaf", 1) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *OrBranch) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&OrBranch{`, + `Left:` + strings.Replace(strings.Replace(this.Left.String(), "Tree", "Tree", 1), `&`, ``, 1) + `,`, + `Right:` + strings.Replace(strings.Replace(this.Right.String(), "Tree", "Tree", 1), `&`, ``, 1) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *AndBranch) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&AndBranch{`, + `Left:` + strings.Replace(strings.Replace(this.Left.String(), "Tree", "Tree", 1), `&`, ``, 1) + `,`, + `Right:` + strings.Replace(strings.Replace(this.Right.String(), "Tree", "Tree", 1), `&`, ``, 1) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *Leaf) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&Leaf{`, + `Value:` + fmt.Sprintf("%v", this.Value) + `,`, + `StrValue:` + fmt.Sprintf("%v", this.StrValue) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *DeepTree) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&DeepTree{`, + `Down:` + strings.Replace(fmt.Sprintf("%v", this.Down), "ADeepBranch", "ADeepBranch", 1) + `,`, + `And:` + strings.Replace(fmt.Sprintf("%v", this.And), "AndDeepBranch", "AndDeepBranch", 1) + `,`, + `Leaf:` + strings.Replace(fmt.Sprintf("%v", this.Leaf), "DeepLeaf", "DeepLeaf", 1) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *ADeepBranch) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&ADeepBranch{`, + `Down:` + strings.Replace(strings.Replace(this.Down.String(), "DeepTree", "DeepTree", 1), `&`, ``, 1) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *AndDeepBranch) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&AndDeepBranch{`, + `Left:` + strings.Replace(strings.Replace(this.Left.String(), "DeepTree", "DeepTree", 1), `&`, ``, 1) + `,`, + `Right:` + strings.Replace(strings.Replace(this.Right.String(), "DeepTree", "DeepTree", 1), `&`, ``, 1) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *DeepLeaf) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&DeepLeaf{`, + `Tree:` + strings.Replace(strings.Replace(this.Tree.String(), "Tree", "Tree", 1), `&`, ``, 1) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *Nil) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&Nil{`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NidOptEnum) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NidOptEnum{`, + `Field1:` + fmt.Sprintf("%v", this.Field1) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NinOptEnum) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NinOptEnum{`, + `Field1:` + valueToStringThetest(this.Field1) + `,`, + `Field2:` + valueToStringThetest(this.Field2) + `,`, + `Field3:` + valueToStringThetest(this.Field3) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NidRepEnum) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NidRepEnum{`, + `Field1:` + fmt.Sprintf("%v", this.Field1) + `,`, + `Field2:` + fmt.Sprintf("%v", this.Field2) + `,`, + `Field3:` + fmt.Sprintf("%v", this.Field3) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NinRepEnum) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NinRepEnum{`, + `Field1:` + fmt.Sprintf("%v", this.Field1) + `,`, + `Field2:` + fmt.Sprintf("%v", this.Field2) + `,`, + `Field3:` + fmt.Sprintf("%v", this.Field3) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NinOptEnumDefault) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NinOptEnumDefault{`, + `Field1:` + valueToStringThetest(this.Field1) + `,`, + `Field2:` + valueToStringThetest(this.Field2) + `,`, + `Field3:` + valueToStringThetest(this.Field3) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *AnotherNinOptEnum) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&AnotherNinOptEnum{`, + `Field1:` + valueToStringThetest(this.Field1) + `,`, + `Field2:` + valueToStringThetest(this.Field2) + `,`, + `Field3:` + valueToStringThetest(this.Field3) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *AnotherNinOptEnumDefault) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&AnotherNinOptEnumDefault{`, + `Field1:` + valueToStringThetest(this.Field1) + `,`, + `Field2:` + valueToStringThetest(this.Field2) + `,`, + `Field3:` + valueToStringThetest(this.Field3) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *Timer) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&Timer{`, + `Time1:` + fmt.Sprintf("%v", this.Time1) + `,`, + `Time2:` + fmt.Sprintf("%v", this.Time2) + `,`, + `Data:` + fmt.Sprintf("%v", this.Data) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *MyExtendable) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&MyExtendable{`, + `Field1:` + valueToStringThetest(this.Field1) + `,`, + `XXX_extensions:` + proto.StringFromExtensionsMap(this.XXX_extensions) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *OtherExtenable) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&OtherExtenable{`, + `M:` + strings.Replace(fmt.Sprintf("%v", this.M), "MyExtendable", "MyExtendable", 1) + `,`, + `Field2:` + valueToStringThetest(this.Field2) + `,`, + `Field13:` + valueToStringThetest(this.Field13) + `,`, + `XXX_extensions:` + proto.StringFromExtensionsMap(this.XXX_extensions) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NestedDefinition) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NestedDefinition{`, + `Field1:` + valueToStringThetest(this.Field1) + `,`, + `EnumField:` + valueToStringThetest(this.EnumField) + `,`, + `NNM:` + strings.Replace(fmt.Sprintf("%v", this.NNM), "NestedDefinition_NestedMessage_NestedNestedMsg", "NestedDefinition_NestedMessage_NestedNestedMsg", 1) + `,`, + `NM:` + strings.Replace(fmt.Sprintf("%v", this.NM), "NestedDefinition_NestedMessage", "NestedDefinition_NestedMessage", 1) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NestedDefinition_NestedMessage) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NestedDefinition_NestedMessage{`, + `NestedField1:` + valueToStringThetest(this.NestedField1) + `,`, + `NNM:` + strings.Replace(fmt.Sprintf("%v", this.NNM), "NestedDefinition_NestedMessage_NestedNestedMsg", "NestedDefinition_NestedMessage_NestedNestedMsg", 1) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NestedDefinition_NestedMessage_NestedNestedMsg) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NestedDefinition_NestedMessage_NestedNestedMsg{`, + `NestedNestedField1:` + valueToStringThetest(this.NestedNestedField1) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NestedScope) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NestedScope{`, + `A:` + strings.Replace(fmt.Sprintf("%v", this.A), "NestedDefinition_NestedMessage_NestedNestedMsg", "NestedDefinition_NestedMessage_NestedNestedMsg", 1) + `,`, + `B:` + valueToStringThetest(this.B) + `,`, + `C:` + strings.Replace(fmt.Sprintf("%v", this.C), "NestedDefinition_NestedMessage", "NestedDefinition_NestedMessage", 1) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NinOptNativeDefault) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NinOptNativeDefault{`, + `Field1:` + valueToStringThetest(this.Field1) + `,`, + `Field2:` + valueToStringThetest(this.Field2) + `,`, + `Field3:` + valueToStringThetest(this.Field3) + `,`, + `Field4:` + valueToStringThetest(this.Field4) + `,`, + `Field5:` + valueToStringThetest(this.Field5) + `,`, + `Field6:` + valueToStringThetest(this.Field6) + `,`, + `Field7:` + valueToStringThetest(this.Field7) + `,`, + `Field8:` + valueToStringThetest(this.Field8) + `,`, + `Field9:` + valueToStringThetest(this.Field9) + `,`, + `Field10:` + valueToStringThetest(this.Field10) + `,`, + `Field11:` + valueToStringThetest(this.Field11) + `,`, + `Field12:` + valueToStringThetest(this.Field12) + `,`, + `Field13:` + valueToStringThetest(this.Field13) + `,`, + `Field14:` + valueToStringThetest(this.Field14) + `,`, + `Field15:` + valueToStringThetest(this.Field15) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *CustomContainer) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&CustomContainer{`, + `CustomStruct:` + strings.Replace(strings.Replace(this.CustomStruct.String(), "NidOptCustom", "NidOptCustom", 1), `&`, ``, 1) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *CustomNameNidOptNative) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&CustomNameNidOptNative{`, + `FieldA:` + fmt.Sprintf("%v", this.FieldA) + `,`, + `FieldB:` + fmt.Sprintf("%v", this.FieldB) + `,`, + `FieldC:` + fmt.Sprintf("%v", this.FieldC) + `,`, + `FieldD:` + fmt.Sprintf("%v", this.FieldD) + `,`, + `FieldE:` + fmt.Sprintf("%v", this.FieldE) + `,`, + `FieldF:` + fmt.Sprintf("%v", this.FieldF) + `,`, + `FieldG:` + fmt.Sprintf("%v", this.FieldG) + `,`, + `FieldH:` + fmt.Sprintf("%v", this.FieldH) + `,`, + `FieldI:` + fmt.Sprintf("%v", this.FieldI) + `,`, + `FieldJ:` + fmt.Sprintf("%v", this.FieldJ) + `,`, + `FieldK:` + fmt.Sprintf("%v", this.FieldK) + `,`, + `FieldL:` + fmt.Sprintf("%v", this.FieldL) + `,`, + `FieldM:` + fmt.Sprintf("%v", this.FieldM) + `,`, + `FieldN:` + fmt.Sprintf("%v", this.FieldN) + `,`, + `FieldO:` + fmt.Sprintf("%v", this.FieldO) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *CustomNameNinOptNative) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&CustomNameNinOptNative{`, + `FieldA:` + valueToStringThetest(this.FieldA) + `,`, + `FieldB:` + valueToStringThetest(this.FieldB) + `,`, + `FieldC:` + valueToStringThetest(this.FieldC) + `,`, + `FieldD:` + valueToStringThetest(this.FieldD) + `,`, + `FieldE:` + valueToStringThetest(this.FieldE) + `,`, + `FieldF:` + valueToStringThetest(this.FieldF) + `,`, + `FieldG:` + valueToStringThetest(this.FieldG) + `,`, + `FieldH:` + valueToStringThetest(this.FieldH) + `,`, + `FieldI:` + valueToStringThetest(this.FieldI) + `,`, + `FieldJ:` + valueToStringThetest(this.FieldJ) + `,`, + `FieldK:` + valueToStringThetest(this.FieldK) + `,`, + `FielL:` + valueToStringThetest(this.FielL) + `,`, + `FieldM:` + valueToStringThetest(this.FieldM) + `,`, + `FieldN:` + valueToStringThetest(this.FieldN) + `,`, + `FieldO:` + valueToStringThetest(this.FieldO) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *CustomNameNinRepNative) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&CustomNameNinRepNative{`, + `FieldA:` + fmt.Sprintf("%v", this.FieldA) + `,`, + `FieldB:` + fmt.Sprintf("%v", this.FieldB) + `,`, + `FieldC:` + fmt.Sprintf("%v", this.FieldC) + `,`, + `FieldD:` + fmt.Sprintf("%v", this.FieldD) + `,`, + `FieldE:` + fmt.Sprintf("%v", this.FieldE) + `,`, + `FieldF:` + fmt.Sprintf("%v", this.FieldF) + `,`, + `FieldG:` + fmt.Sprintf("%v", this.FieldG) + `,`, + `FieldH:` + fmt.Sprintf("%v", this.FieldH) + `,`, + `FieldI:` + fmt.Sprintf("%v", this.FieldI) + `,`, + `FieldJ:` + fmt.Sprintf("%v", this.FieldJ) + `,`, + `FieldK:` + fmt.Sprintf("%v", this.FieldK) + `,`, + `FieldL:` + fmt.Sprintf("%v", this.FieldL) + `,`, + `FieldM:` + fmt.Sprintf("%v", this.FieldM) + `,`, + `FieldN:` + fmt.Sprintf("%v", this.FieldN) + `,`, + `FieldO:` + fmt.Sprintf("%v", this.FieldO) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *CustomNameNinStruct) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&CustomNameNinStruct{`, + `FieldA:` + valueToStringThetest(this.FieldA) + `,`, + `FieldB:` + valueToStringThetest(this.FieldB) + `,`, + `FieldC:` + strings.Replace(fmt.Sprintf("%v", this.FieldC), "NidOptNative", "NidOptNative", 1) + `,`, + `FieldD:` + strings.Replace(fmt.Sprintf("%v", this.FieldD), "NinOptNative", "NinOptNative", 1) + `,`, + `FieldE:` + valueToStringThetest(this.FieldE) + `,`, + `FieldF:` + valueToStringThetest(this.FieldF) + `,`, + `FieldG:` + strings.Replace(fmt.Sprintf("%v", this.FieldG), "NidOptNative", "NidOptNative", 1) + `,`, + `FieldH:` + valueToStringThetest(this.FieldH) + `,`, + `FieldI:` + valueToStringThetest(this.FieldI) + `,`, + `FieldJ:` + valueToStringThetest(this.FieldJ) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *CustomNameCustomType) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&CustomNameCustomType{`, + `FieldA:` + valueToStringThetest(this.FieldA) + `,`, + `FieldB:` + valueToStringThetest(this.FieldB) + `,`, + `FieldC:` + fmt.Sprintf("%v", this.FieldC) + `,`, + `FieldD:` + fmt.Sprintf("%v", this.FieldD) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *CustomNameNinEmbeddedStructUnion) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&CustomNameNinEmbeddedStructUnion{`, + `NidOptNative:` + strings.Replace(fmt.Sprintf("%v", this.NidOptNative), "NidOptNative", "NidOptNative", 1) + `,`, + `FieldA:` + strings.Replace(fmt.Sprintf("%v", this.FieldA), "NinOptNative", "NinOptNative", 1) + `,`, + `FieldB:` + valueToStringThetest(this.FieldB) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *CustomNameEnum) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&CustomNameEnum{`, + `FieldA:` + valueToStringThetest(this.FieldA) + `,`, + `FieldB:` + fmt.Sprintf("%v", this.FieldB) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NoExtensionsMap) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NoExtensionsMap{`, + `Field1:` + valueToStringThetest(this.Field1) + `,`, + `XXX_extensions:` + proto.StringFromExtensionsBytes(this.XXX_extensions) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *Unrecognized) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&Unrecognized{`, + `Field1:` + valueToStringThetest(this.Field1) + `,`, + `}`, + }, "") + return s +} +func (this *UnrecognizedWithInner) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&UnrecognizedWithInner{`, + `Embedded:` + strings.Replace(fmt.Sprintf("%v", this.Embedded), "UnrecognizedWithInner_Inner", "UnrecognizedWithInner_Inner", 1) + `,`, + `Field2:` + valueToStringThetest(this.Field2) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *UnrecognizedWithInner_Inner) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&UnrecognizedWithInner_Inner{`, + `Field1:` + valueToStringThetest(this.Field1) + `,`, + `}`, + }, "") + return s +} +func (this *UnrecognizedWithEmbed) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&UnrecognizedWithEmbed{`, + `UnrecognizedWithEmbed_Embedded:` + strings.Replace(strings.Replace(this.UnrecognizedWithEmbed_Embedded.String(), "UnrecognizedWithEmbed_Embedded", "UnrecognizedWithEmbed_Embedded", 1), `&`, ``, 1) + `,`, + `Field2:` + valueToStringThetest(this.Field2) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *UnrecognizedWithEmbed_Embedded) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&UnrecognizedWithEmbed_Embedded{`, + `Field1:` + valueToStringThetest(this.Field1) + `,`, + `}`, + }, "") + return s +} +func (this *Node) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&Node{`, + `Label:` + valueToStringThetest(this.Label) + `,`, + `Children:` + strings.Replace(fmt.Sprintf("%v", this.Children), "Node", "Node", 1) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func valueToStringThetest(v interface{}) string { + rv := reflect.ValueOf(v) + if rv.IsNil() { + return "nil" + } + pv := reflect.Indirect(rv).Interface() + return fmt.Sprintf("*%v", pv) +} +func (this *NinOptNativeUnion) GetValue() interface{} { + if this.Field1 != nil { + return this.Field1 + } + if this.Field2 != nil { + return this.Field2 + } + if this.Field3 != nil { + return this.Field3 + } + if this.Field4 != nil { + return this.Field4 + } + if this.Field5 != nil { + return this.Field5 + } + if this.Field6 != nil { + return this.Field6 + } + if this.Field13 != nil { + return this.Field13 + } + if this.Field14 != nil { + return this.Field14 + } + if this.Field15 != nil { + return this.Field15 + } + return nil +} + +func (this *NinOptNativeUnion) SetValue(value interface{}) bool { + switch vt := value.(type) { + case *float64: + this.Field1 = vt + case *float32: + this.Field2 = vt + case *int32: + this.Field3 = vt + case *int64: + this.Field4 = vt + case *uint32: + this.Field5 = vt + case *uint64: + this.Field6 = vt + case *bool: + this.Field13 = vt + case *string: + this.Field14 = vt + case []byte: + this.Field15 = vt + default: + return false + } + return true +} +func (this *NinOptStructUnion) GetValue() interface{} { + if this.Field1 != nil { + return this.Field1 + } + if this.Field2 != nil { + return this.Field2 + } + if this.Field3 != nil { + return this.Field3 + } + if this.Field4 != nil { + return this.Field4 + } + if this.Field6 != nil { + return this.Field6 + } + if this.Field7 != nil { + return this.Field7 + } + if this.Field13 != nil { + return this.Field13 + } + if this.Field14 != nil { + return this.Field14 + } + if this.Field15 != nil { + return this.Field15 + } + return nil +} + +func (this *NinOptStructUnion) SetValue(value interface{}) bool { + switch vt := value.(type) { + case *float64: + this.Field1 = vt + case *float32: + this.Field2 = vt + case *NidOptNative: + this.Field3 = vt + case *NinOptNative: + this.Field4 = vt + case *uint64: + this.Field6 = vt + case *int32: + this.Field7 = vt + case *bool: + this.Field13 = vt + case *string: + this.Field14 = vt + case []byte: + this.Field15 = vt + default: + return false + } + return true +} +func (this *NinEmbeddedStructUnion) GetValue() interface{} { + if this.NidOptNative != nil { + return this.NidOptNative + } + if this.Field200 != nil { + return this.Field200 + } + if this.Field210 != nil { + return this.Field210 + } + return nil +} + +func (this *NinEmbeddedStructUnion) SetValue(value interface{}) bool { + switch vt := value.(type) { + case *NidOptNative: + this.NidOptNative = vt + case *NinOptNative: + this.Field200 = vt + case *bool: + this.Field210 = vt + default: + return false + } + return true +} +func (this *NinNestedStructUnion) GetValue() interface{} { + if this.Field1 != nil { + return this.Field1 + } + if this.Field2 != nil { + return this.Field2 + } + if this.Field3 != nil { + return this.Field3 + } + return nil +} + +func (this *NinNestedStructUnion) SetValue(value interface{}) bool { + switch vt := value.(type) { + case *NinOptNativeUnion: + this.Field1 = vt + case *NinOptStructUnion: + this.Field2 = vt + case *NinEmbeddedStructUnion: + this.Field3 = vt + default: + this.Field1 = new(NinOptNativeUnion) + if set := this.Field1.SetValue(value); set { + return true + } + this.Field1 = nil + this.Field2 = new(NinOptStructUnion) + if set := this.Field2.SetValue(value); set { + return true + } + this.Field2 = nil + this.Field3 = new(NinEmbeddedStructUnion) + if set := this.Field3.SetValue(value); set { + return true + } + this.Field3 = nil + return false + } + return true +} +func (this *Tree) GetValue() interface{} { + if this.Or != nil { + return this.Or + } + if this.And != nil { + return this.And + } + if this.Leaf != nil { + return this.Leaf + } + return nil +} + +func (this *Tree) SetValue(value interface{}) bool { + switch vt := value.(type) { + case *OrBranch: + this.Or = vt + case *AndBranch: + this.And = vt + case *Leaf: + this.Leaf = vt + default: + return false + } + return true +} +func (this *DeepTree) GetValue() interface{} { + if this.Down != nil { + return this.Down + } + if this.And != nil { + return this.And + } + if this.Leaf != nil { + return this.Leaf + } + return nil +} + +func (this *DeepTree) SetValue(value interface{}) bool { + switch vt := value.(type) { + case *ADeepBranch: + this.Down = vt + case *AndDeepBranch: + this.And = vt + case *DeepLeaf: + this.Leaf = vt + default: + return false + } + return true +} +func (this *CustomNameNinEmbeddedStructUnion) GetValue() interface{} { + if this.NidOptNative != nil { + return this.NidOptNative + } + if this.FieldA != nil { + return this.FieldA + } + if this.FieldB != nil { + return this.FieldB + } + return nil +} + +func (this *CustomNameNinEmbeddedStructUnion) SetValue(value interface{}) bool { + switch vt := value.(type) { + case *NidOptNative: + this.NidOptNative = vt + case *NinOptNative: + this.FieldA = vt + case *bool: + this.FieldB = vt + default: + return false + } + return true +} + +var fileDescriptorThetest = []byte{ + // 3009 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xcc, 0x5a, 0x4d, 0x6c, 0x1b, 0xc7, + 0x15, 0xd6, 0xee, 0x90, 0x32, 0x35, 0xa2, 0x24, 0x7a, 0x13, 0x33, 0x0b, 0x46, 0x95, 0xe4, 0x2d, + 0xa3, 0x2a, 0x84, 0x2d, 0x91, 0x14, 0x25, 0xcb, 0x4c, 0x93, 0x42, 0xfc, 0x71, 0x6d, 0xd7, 0xa2, + 0x0c, 0x46, 0x6e, 0x6b, 0xa0, 0x40, 0x41, 0x89, 0x2b, 0x89, 0xa8, 0xb4, 0x14, 0xc8, 0x95, 0x6b, + 0xf7, 0x50, 0x04, 0x39, 0x14, 0x46, 0xaf, 0x45, 0x8f, 0x6d, 0x5c, 0x14, 0x05, 0xdc, 0x5b, 0x0e, + 0x45, 0x51, 0x14, 0x45, 0xe3, 0x4b, 0x01, 0xf5, 0x66, 0xf4, 0x54, 0x14, 0x85, 0xd1, 0x38, 0x97, + 0x1c, 0xd3, 0x53, 0x73, 0xc8, 0xa1, 0xb3, 0xbb, 0x33, 0xb3, 0x33, 0xb3, 0xbb, 0xdc, 0xa5, 0x25, + 0xb7, 0x39, 0xac, 0x96, 0x9a, 0xf7, 0xde, 0xcc, 0xdb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06, 0x9e, 0x73, + 0xa2, 0x91, 0x57, 0x21, 0x12, 0x4f, 0x61, 0xf1, 0x39, 0x27, 0x1c, 0x79, 0x57, 0x5e, 0x50, 0xc7, + 0x91, 0x7c, 0x94, 0x97, 0x17, 0x5c, 0x79, 0x51, 0x4d, 0x22, 0x79, 0x8a, 0x97, 0x17, 0x5d, 0xf9, + 0xb2, 0x3a, 0x81, 0xe4, 0x09, 0x5e, 0xbe, 0xec, 0xca, 0x4b, 0xea, 0x24, 0x92, 0x8f, 0xf1, 0xf2, + 0x92, 0x2b, 0x5f, 0x51, 0xa7, 0x90, 0x3c, 0xc9, 0xcb, 0x57, 0xb4, 0xf7, 0x6d, 0x78, 0x0d, 0x17, + 0xde, 0x34, 0x0f, 0x2f, 0x05, 0x36, 0xcd, 0x03, 0x4b, 0x21, 0x4d, 0xf3, 0x90, 0x52, 0x30, 0xd3, + 0x3c, 0x98, 0x14, 0xc6, 0x34, 0x0f, 0x23, 0x05, 0x30, 0xcd, 0x03, 0x48, 0xa1, 0x4b, 0xf3, 0xd0, + 0x51, 0xd0, 0xd2, 0x3c, 0x68, 0x14, 0xae, 0x34, 0x0f, 0x17, 0x05, 0x4a, 0x15, 0x80, 0x72, 0x21, + 0x52, 0x05, 0x88, 0x5c, 0x70, 0x54, 0x01, 0x1c, 0x17, 0x16, 0x55, 0x80, 0xc5, 0x05, 0x44, 0x15, + 0x00, 0x71, 0xa1, 0x50, 0x05, 0x28, 0x5c, 0x10, 0x70, 0x8e, 0x35, 0xf5, 0x23, 0x9f, 0x1c, 0x03, + 0x03, 0x73, 0x0c, 0x0c, 0xcc, 0x31, 0x30, 0x30, 0xc7, 0xc0, 0xc0, 0x1c, 0x03, 0x03, 0x73, 0x0c, + 0x0c, 0xcc, 0x31, 0x30, 0x30, 0xc7, 0xc0, 0xc0, 0x1c, 0x03, 0x83, 0x73, 0x0c, 0x84, 0xe4, 0x18, + 0x08, 0xc9, 0x31, 0x10, 0x92, 0x63, 0x20, 0x24, 0xc7, 0x40, 0x48, 0x8e, 0x81, 0xc0, 0x1c, 0x73, + 0xe1, 0x4d, 0xf3, 0xf0, 0xfa, 0xe6, 0x18, 0x08, 0xc8, 0x31, 0x10, 0x90, 0x63, 0x20, 0x20, 0xc7, + 0x40, 0x40, 0x8e, 0x81, 0x80, 0x1c, 0x03, 0x01, 0x39, 0x06, 0x02, 0x72, 0x0c, 0x04, 0xe5, 0x18, + 0x08, 0xcc, 0x31, 0x10, 0x98, 0x63, 0x20, 0x30, 0xc7, 0x40, 0x60, 0x8e, 0x81, 0xc0, 0x1c, 0x03, + 0x6c, 0x8e, 0xfd, 0x09, 0x40, 0xc5, 0xc9, 0xb1, 0xdb, 0xad, 0x9d, 0x1f, 0xe8, 0x6d, 0x0c, 0xc5, + 0x8c, 0x90, 0x69, 0xa3, 0x16, 0x74, 0x29, 0x17, 0x92, 0x19, 0x21, 0xd7, 0x78, 0x79, 0x91, 0xca, + 0x49, 0xb6, 0xf1, 0xf2, 0x65, 0x2a, 0x27, 0xf9, 0xc6, 0xcb, 0x4b, 0x54, 0x4e, 0x32, 0x8e, 0x97, + 0xaf, 0x50, 0x39, 0xc9, 0x39, 0x5e, 0xbe, 0x4a, 0xe5, 0x24, 0xeb, 0x78, 0xf9, 0x15, 0x2a, 0x27, + 0x79, 0xc7, 0xcb, 0xd7, 0xa8, 0x9c, 0x64, 0x1e, 0x2f, 0xbf, 0xaa, 0xcc, 0x89, 0xb9, 0x47, 0x14, + 0x28, 0xb4, 0x73, 0x62, 0xf6, 0x09, 0x1a, 0x05, 0x57, 0x83, 0xe4, 0x9f, 0xa0, 0x51, 0x74, 0x35, + 0x48, 0x06, 0x0a, 0x1a, 0xcb, 0xda, 0x43, 0x1b, 0x3e, 0x43, 0x84, 0x2f, 0x23, 0xc0, 0x27, 0x33, + 0xd0, 0x65, 0x04, 0xe8, 0x64, 0x06, 0xb6, 0x8c, 0x00, 0x9b, 0xcc, 0x40, 0x96, 0x11, 0x20, 0x93, + 0x19, 0x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, 0x22, 0x93, 0xa0, 0x1f, 0x8b, 0xb2, 0x22, 0x8b, 0xa0, + 0x1f, 0x83, 0x9e, 0x88, 0x0c, 0x72, 0x8f, 0xf8, 0x68, 0xc2, 0x8e, 0x62, 0x18, 0x83, 0x40, 0x04, + 0x06, 0x81, 0x08, 0x0c, 0x02, 0x11, 0x18, 0x04, 0x22, 0x30, 0x08, 0x44, 0x60, 0x10, 0x88, 0xc0, + 0x20, 0x10, 0x81, 0x41, 0x20, 0x0a, 0x83, 0x40, 0x24, 0x06, 0x81, 0x20, 0x06, 0x65, 0xc5, 0x03, + 0x0f, 0xd0, 0x6f, 0x42, 0xca, 0x8a, 0x3b, 0x9f, 0xe1, 0x14, 0x02, 0x91, 0x28, 0x04, 0x82, 0x28, + 0xf4, 0x11, 0x2a, 0xa4, 0x38, 0x0a, 0xe1, 0xed, 0xa1, 0xb3, 0x9a, 0x81, 0x56, 0x23, 0x9c, 0xaf, + 0xf0, 0xe3, 0xd4, 0x6a, 0x84, 0x3d, 0xea, 0x41, 0x3c, 0xf3, 0xce, 0x42, 0xf5, 0x08, 0xb3, 0xd0, + 0x35, 0xca, 0xa1, 0xd5, 0x08, 0xe7, 0x2e, 0xbc, 0xdc, 0x5b, 0x1b, 0x34, 0x09, 0x5c, 0x8f, 0x34, + 0x09, 0xdc, 0x88, 0x34, 0x09, 0xdc, 0x74, 0x11, 0xfc, 0x89, 0x0c, 0x5f, 0x75, 0x11, 0x74, 0x7e, + 0x6d, 0x3d, 0x38, 0xb2, 0xa6, 0x00, 0x77, 0x87, 0x4a, 0x21, 0xbb, 0x36, 0x0c, 0x8c, 0xd6, 0xfe, + 0xcd, 0x6d, 0x7e, 0xaf, 0xaa, 0x3c, 0xec, 0xfe, 0x0d, 0x83, 0x38, 0xfe, 0x16, 0x9a, 0x85, 0xe0, + 0x46, 0xbb, 0x6f, 0xcf, 0x16, 0x7e, 0xc3, 0x56, 0x9b, 0xa0, 0xd3, 0xee, 0x2b, 0x4d, 0x38, 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, 0x57, 0xd8, 0xb7, 0xe3, 0xe7, 0x20, 0xdc, + 0x49, 0x95, 0x3a, 0x5c, 0xf3, 0xed, 0x64, 0x9f, 0x39, 0x4d, 0x5d, 0xa3, 0x0e, 0xd7, 0x7d, 0x75, + 0x3b, 0x21, 0xa7, 0x8a, 0xea, 0xe5, 0x25, 0xbc, 0x8c, 0xac, 0x17, 0x94, 0x0b, 0x84, 0x05, 0x5c, + 0x8e, 0xe3, 0x00, 0x39, 0x2b, 0xca, 0x7a, 0x01, 0x3d, 0xa1, 0x63, 0x50, 0x09, 0x34, 0x08, 0x8e, + 0x92, 0xd3, 0x49, 0xa5, 0x50, 0xbe, 0x8e, 0x3b, 0xa9, 0x06, 0x76, 0x12, 0x12, 0x2a, 0xa7, 0xa7, + 0x6a, 0xa1, 0xb2, 0x75, 0xf2, 0xf1, 0xcc, 0xc8, 0x53, 0x74, 0xfd, 0x1d, 0x5d, 0xff, 0xfa, 0x78, + 0x46, 0xfa, 0x14, 0x5d, 0x9f, 0xa1, 0xeb, 0x73, 0x74, 0xbd, 0xf7, 0x7c, 0x46, 0x7a, 0x8c, 0xae, + 0x0f, 0xd1, 0xf5, 0x07, 0x74, 0x3d, 0x41, 0xd7, 0x09, 0xba, 0x9e, 0x3e, 0x47, 0xba, 0xe8, 0xfe, + 0x29, 0xba, 0x7f, 0x86, 0xee, 0x9f, 0xa3, 0xfb, 0x7b, 0x9f, 0xcc, 0x8c, 0x3c, 0x42, 0xd7, 0xe3, + 0x4f, 0x66, 0xa4, 0xff, 0x06, 0x00, 0x00, 0xff, 0xff, 0x7e, 0xa8, 0x87, 0x58, 0xad, 0x34, 0x00, + 0x00, +} diff --git a/vendor/github.com/gogo/protobuf/test/combos/marshaler/thetest.proto b/vendor/github.com/gogo/protobuf/test/combos/marshaler/thetest.proto new file mode 100644 index 000000000..6b0e40a2d --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/combos/marshaler/thetest.proto @@ -0,0 +1,624 @@ +// Copyright (c) 2013, Vastech SA (PTY) LTD. All rights reserved. +// http://github.com/gogo/protobuf/gogoproto +// +// 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 test; + +import "github.com/gogo/protobuf/gogoproto/gogo.proto"; + +option (gogoproto.goproto_stringer_all) = false; +option (gogoproto.goproto_enum_prefix_all) = false; +option (gogoproto.goproto_getters_all) = false; + +option (gogoproto.equal_all) = true; +option (gogoproto.verbose_equal_all) = true; +option (gogoproto.stringer_all) = true; +option (gogoproto.gostring_all) = true; +option (gogoproto.face_all) = true; +option (gogoproto.description_all) = true; + +option (gogoproto.testgen_all) = true; +option (gogoproto.populate_all) = true; +option (gogoproto.benchgen_all) = true; +option (gogoproto.unmarshaler_all) = false; +option (gogoproto.marshaler_all) = true; +option (gogoproto.sizer_all) = true; +option (gogoproto.protosizer_all) = false; + +option (gogoproto.goproto_enum_stringer_all) = false; +option (gogoproto.enum_stringer_all) = true; + +option (gogoproto.unsafe_marshaler_all) = false; +option (gogoproto.unsafe_unmarshaler_all) = false; + +option (gogoproto.compare_all) = true; + +message NidOptNative { + optional double Field1 = 1 [(gogoproto.nullable) = false]; + optional float Field2 = 2 [(gogoproto.nullable) = false]; + optional int32 Field3 = 3 [(gogoproto.nullable) = false]; + optional int64 Field4 = 4 [(gogoproto.nullable) = false]; + optional uint32 Field5 = 5 [(gogoproto.nullable) = false]; + optional uint64 Field6 = 6 [(gogoproto.nullable) = false]; + optional sint32 Field7 = 7 [(gogoproto.nullable) = false]; + optional sint64 Field8 = 8 [(gogoproto.nullable) = false]; + optional fixed32 Field9 = 9 [(gogoproto.nullable) = false]; + optional sfixed32 Field10 = 10 [(gogoproto.nullable) = false]; + optional fixed64 Field11 = 11 [(gogoproto.nullable) = false]; + optional sfixed64 Field12 = 12 [(gogoproto.nullable) = false]; + optional bool Field13 = 13 [(gogoproto.nullable) = false]; + optional string Field14 = 14 [(gogoproto.nullable) = false]; + optional bytes Field15 = 15 [(gogoproto.nullable) = false]; +} + +message NinOptNative { + optional double Field1 = 1; + optional float Field2 = 2; + optional int32 Field3 = 3; + optional int64 Field4 = 4; + optional uint32 Field5 = 5; + optional uint64 Field6 = 6; + optional sint32 Field7 = 7; + optional sint64 Field8 = 8; + optional fixed32 Field9 = 9; + optional sfixed32 Field10 = 10; + optional fixed64 Field11 = 11; + optional sfixed64 Field12 = 12; + optional bool Field13 = 13; + optional string Field14 = 14; + optional bytes Field15 = 15; +} + +message NidRepNative { + repeated double Field1 = 1 [(gogoproto.nullable) = false]; + repeated float Field2 = 2 [(gogoproto.nullable) = false]; + repeated int32 Field3 = 3 [(gogoproto.nullable) = false]; + repeated int64 Field4 = 4 [(gogoproto.nullable) = false]; + repeated uint32 Field5 = 5 [(gogoproto.nullable) = false]; + repeated uint64 Field6 = 6 [(gogoproto.nullable) = false]; + repeated sint32 Field7 = 7 [(gogoproto.nullable) = false]; + repeated sint64 Field8 = 8 [(gogoproto.nullable) = false]; + repeated fixed32 Field9 = 9 [(gogoproto.nullable) = false]; + repeated sfixed32 Field10 = 10 [(gogoproto.nullable) = false]; + repeated fixed64 Field11 = 11 [(gogoproto.nullable) = false]; + repeated sfixed64 Field12 = 12 [(gogoproto.nullable) = false]; + repeated bool Field13 = 13 [(gogoproto.nullable) = false]; + repeated string Field14 = 14 [(gogoproto.nullable) = false]; + repeated bytes Field15 = 15 [(gogoproto.nullable) = false]; +} + +message NinRepNative { + repeated double Field1 = 1; + repeated float Field2 = 2; + repeated int32 Field3 = 3; + repeated int64 Field4 = 4; + repeated uint32 Field5 = 5; + repeated uint64 Field6 = 6; + repeated sint32 Field7 = 7; + repeated sint64 Field8 = 8; + repeated fixed32 Field9 = 9; + repeated sfixed32 Field10 = 10; + repeated fixed64 Field11 = 11; + repeated sfixed64 Field12 = 12; + repeated bool Field13 = 13; + repeated string Field14 = 14; + repeated bytes Field15 = 15; +} + +message NidRepPackedNative { + repeated double Field1 = 1 [(gogoproto.nullable) = false, packed = true]; + repeated float Field2 = 2 [(gogoproto.nullable) = false, packed = true]; + repeated int32 Field3 = 3 [(gogoproto.nullable) = false, packed = true]; + repeated int64 Field4 = 4 [(gogoproto.nullable) = false, packed = true]; + repeated uint32 Field5 = 5 [(gogoproto.nullable) = false, packed = true]; + repeated uint64 Field6 = 6 [(gogoproto.nullable) = false, packed = true]; + repeated sint32 Field7 = 7 [(gogoproto.nullable) = false, packed = true]; + repeated sint64 Field8 = 8 [(gogoproto.nullable) = false, packed = true]; + repeated fixed32 Field9 = 9 [(gogoproto.nullable) = false, packed = true]; + repeated sfixed32 Field10 = 10 [(gogoproto.nullable) = false, packed = true]; + repeated fixed64 Field11 = 11 [(gogoproto.nullable) = false, packed = true]; + repeated sfixed64 Field12 = 12 [(gogoproto.nullable) = false, packed = true]; + repeated bool Field13 = 13 [(gogoproto.nullable) = false, packed = true]; +} + +message NinRepPackedNative { + repeated double Field1 = 1 [packed = true]; + repeated float Field2 = 2 [packed = true]; + repeated int32 Field3 = 3 [packed = true]; + repeated int64 Field4 = 4 [packed = true]; + repeated uint32 Field5 = 5 [packed = true]; + repeated uint64 Field6 = 6 [packed = true]; + repeated sint32 Field7 = 7 [packed = true]; + repeated sint64 Field8 = 8 [packed = true]; + repeated fixed32 Field9 = 9 [packed = true]; + repeated sfixed32 Field10 = 10 [packed = true]; + repeated fixed64 Field11 = 11 [packed = true]; + repeated sfixed64 Field12 = 12 [packed = true]; + repeated bool Field13 = 13 [packed = true]; +} + +message NidOptStruct { + optional double Field1 = 1 [(gogoproto.nullable) = false]; + optional float Field2 = 2 [(gogoproto.nullable) = false]; + optional NidOptNative Field3 = 3 [(gogoproto.nullable) = false]; + optional NinOptNative Field4 = 4 [(gogoproto.nullable) = false]; + optional uint64 Field6 = 6 [(gogoproto.nullable) = false]; + optional sint32 Field7 = 7 [(gogoproto.nullable) = false]; + optional NidOptNative Field8 = 8 [(gogoproto.nullable) = false]; + optional bool Field13 = 13 [(gogoproto.nullable) = false]; + optional string Field14 = 14 [(gogoproto.nullable) = false]; + optional bytes Field15 = 15 [(gogoproto.nullable) = false]; +} + +message NinOptStruct { + optional double Field1 = 1; + optional float Field2 = 2; + optional NidOptNative Field3 = 3; + optional NinOptNative Field4 = 4; + optional uint64 Field6 = 6; + optional sint32 Field7 = 7; + optional NidOptNative Field8 = 8; + optional bool Field13 = 13; + optional string Field14 = 14; + optional bytes Field15 = 15; +} + +message NidRepStruct { + repeated double Field1 = 1 [(gogoproto.nullable) = false]; + repeated float Field2 = 2 [(gogoproto.nullable) = false]; + repeated NidOptNative Field3 = 3 [(gogoproto.nullable) = false]; + repeated NinOptNative Field4 = 4 [(gogoproto.nullable) = false]; + repeated uint64 Field6 = 6 [(gogoproto.nullable) = false]; + repeated sint32 Field7 = 7 [(gogoproto.nullable) = false]; + repeated NidOptNative Field8 = 8 [(gogoproto.nullable) = false]; + repeated bool Field13 = 13 [(gogoproto.nullable) = false]; + repeated string Field14 = 14 [(gogoproto.nullable) = false]; + repeated bytes Field15 = 15 [(gogoproto.nullable) = false]; +} + +message NinRepStruct { + repeated double Field1 = 1; + repeated float Field2 = 2; + repeated NidOptNative Field3 = 3; + repeated NinOptNative Field4 = 4; + repeated uint64 Field6 = 6; + repeated sint32 Field7 = 7; + repeated NidOptNative Field8 = 8; + repeated bool Field13 = 13; + repeated string Field14 = 14; + repeated bytes Field15 = 15; +} + +message NidEmbeddedStruct { + optional NidOptNative Field1 = 1 [(gogoproto.embed) = true]; + optional NidOptNative Field200 = 200 [(gogoproto.nullable) = false]; + optional bool Field210 = 210 [(gogoproto.nullable) = false]; +} + +message NinEmbeddedStruct { + optional NidOptNative Field1 = 1 [(gogoproto.embed) = true]; + optional NidOptNative Field200 = 200; + optional bool Field210 = 210; +} + +message NidNestedStruct { + optional NidOptStruct Field1 = 1 [(gogoproto.nullable) = false]; + repeated NidRepStruct Field2 = 2 [(gogoproto.nullable) = false]; +} + +message NinNestedStruct { + optional NinOptStruct Field1 = 1; + repeated NinRepStruct Field2 = 2; +} + +message NidOptCustom { + optional bytes Id = 1 [(gogoproto.customtype) = "Uuid", (gogoproto.nullable) = false]; + optional bytes Value = 2 [(gogoproto.customtype) = "github.com/gogo/protobuf/test/custom.Uint128", (gogoproto.nullable) = false]; +} + +message CustomDash { + optional bytes Value = 1 [(gogoproto.customtype) = "github.com/gogo/protobuf/test/custom-dash-type.Bytes"]; +} + +message NinOptCustom { + optional bytes Id = 1 [(gogoproto.customtype) = "Uuid"]; + optional bytes Value = 2 [(gogoproto.customtype) = "github.com/gogo/protobuf/test/custom.Uint128"]; +} + +message NidRepCustom { + repeated bytes Id = 1 [(gogoproto.customtype) = "Uuid", (gogoproto.nullable) = false]; + repeated bytes Value = 2 [(gogoproto.customtype) = "github.com/gogo/protobuf/test/custom.Uint128", (gogoproto.nullable) = false]; +} + +message NinRepCustom { + repeated bytes Id = 1 [(gogoproto.customtype) = "Uuid"]; + repeated bytes Value = 2 [(gogoproto.customtype) = "github.com/gogo/protobuf/test/custom.Uint128"]; +} + +message NinOptNativeUnion { + option (gogoproto.onlyone) = true; + optional double Field1 = 1; + optional float Field2 = 2; + optional int32 Field3 = 3; + optional int64 Field4 = 4; + optional uint32 Field5 = 5; + optional uint64 Field6 = 6; + optional bool Field13 = 13; + optional string Field14 = 14; + optional bytes Field15 = 15; +} + +message NinOptStructUnion { + option (gogoproto.onlyone) = true; + optional double Field1 = 1; + optional float Field2 = 2; + optional NidOptNative Field3 = 3; + optional NinOptNative Field4 = 4; + optional uint64 Field6 = 6; + optional sint32 Field7 = 7; + optional bool Field13 = 13; + optional string Field14 = 14; + optional bytes Field15 = 15; +} + +message NinEmbeddedStructUnion { + option (gogoproto.onlyone) = true; + optional NidOptNative Field1 = 1 [(gogoproto.embed) = true]; + optional NinOptNative Field200 = 200; + optional bool Field210 = 210; +} + +message NinNestedStructUnion { + option (gogoproto.onlyone) = true; + optional NinOptNativeUnion Field1 = 1; + optional NinOptStructUnion Field2 = 2; + optional NinEmbeddedStructUnion Field3 = 3; +} + +message Tree { + option (gogoproto.onlyone) = true; + optional OrBranch Or = 1; + optional AndBranch And = 2; + optional Leaf Leaf = 3; +} + +message OrBranch { + optional Tree Left = 1 [(gogoproto.nullable) = false]; + optional Tree Right = 2 [(gogoproto.nullable) = false]; +} + +message AndBranch { + optional Tree Left = 1 [(gogoproto.nullable) = false]; + optional Tree Right = 2 [(gogoproto.nullable) = false]; +} + +message Leaf { + optional int64 Value = 1 [(gogoproto.nullable) = false]; + optional string StrValue = 2 [(gogoproto.nullable) = false]; +} + +message DeepTree { + option (gogoproto.onlyone) = true; + optional ADeepBranch Down = 1; + optional AndDeepBranch And = 2; + optional DeepLeaf Leaf = 3; +} + +message ADeepBranch { + optional DeepTree Down = 2 [(gogoproto.nullable) = false]; +} + +message AndDeepBranch { + optional DeepTree Left = 1 [(gogoproto.nullable) = false]; + optional DeepTree Right = 2 [(gogoproto.nullable) = false]; +} + +message DeepLeaf { + optional Tree Tree = 1 [(gogoproto.nullable) = false]; +} + +message Nil { + +} + +enum TheTestEnum { + A = 0; + B = 1; + C = 2; +} + +enum AnotherTestEnum { + option (gogoproto.goproto_enum_prefix) = false; + D = 10; + E = 11; +} + +// YetAnotherTestEnum is used to test cross-package import of custom name +// fields and default resolution. +enum YetAnotherTestEnum { + option (gogoproto.goproto_enum_prefix) = false; + AA = 0; + BB = 1 [(gogoproto.enumvalue_customname) = "BetterYetBB"]; +} + +// YetAnotherTestEnum is used to test cross-package import of custom name +// fields and default resolution. +enum YetYetAnotherTestEnum { + option (gogoproto.goproto_enum_prefix) = true; + CC = 0; + DD = 1 [(gogoproto.enumvalue_customname) = "BetterYetDD"]; +} + +message NidOptEnum { + optional TheTestEnum Field1 = 1 [(gogoproto.nullable) = false]; +} + +message NinOptEnum { + optional TheTestEnum Field1 = 1; + optional YetAnotherTestEnum Field2 = 2; + optional YetYetAnotherTestEnum Field3 = 3; +} + +message NidRepEnum { + repeated TheTestEnum Field1 = 1 [(gogoproto.nullable) = false]; + repeated YetAnotherTestEnum Field2 = 2 [(gogoproto.nullable) = false]; + repeated YetYetAnotherTestEnum Field3 = 3 [(gogoproto.nullable) = false]; +} + +message NinRepEnum { + repeated TheTestEnum Field1 = 1; + repeated YetAnotherTestEnum Field2 = 2; + repeated YetYetAnotherTestEnum Field3 = 3; +} + +message NinOptEnumDefault { + option (gogoproto.goproto_getters) = true; + option (gogoproto.face) = false; + optional TheTestEnum Field1 = 1 [default=C]; + optional YetAnotherTestEnum Field2 = 2 [default=BB]; + optional YetYetAnotherTestEnum Field3 = 3 [default=CC]; +} + +message AnotherNinOptEnum { + optional AnotherTestEnum Field1 = 1; + optional YetAnotherTestEnum Field2 = 2; + optional YetYetAnotherTestEnum Field3 = 3; +} + +message AnotherNinOptEnumDefault { + option (gogoproto.goproto_getters) = true; + option (gogoproto.face) = false; + optional AnotherTestEnum Field1 = 1 [default=E]; + optional YetAnotherTestEnum Field2 = 2 [default=BB]; + optional YetYetAnotherTestEnum Field3 = 3 [default=CC]; +} + + +message Timer { + optional sfixed64 Time1 = 1 [(gogoproto.nullable) = false]; + optional sfixed64 Time2 = 2 [(gogoproto.nullable) = false]; + optional bytes Data = 3 [(gogoproto.nullable) = false]; +} + +message MyExtendable { + option (gogoproto.face) = false; + optional int64 Field1 = 1; + extensions 100 to 199; +} + +extend MyExtendable { + optional double FieldA = 100; + optional NinOptNative FieldB = 101; + optional NinEmbeddedStruct FieldC = 102; + repeated int64 FieldD = 104; + repeated NinOptNative FieldE = 105; +} + +message OtherExtenable { + option (gogoproto.face) = false; + optional int64 Field2 = 2; + extensions 14 to 16; + optional int64 Field13 = 13; + extensions 10 to 12; + optional MyExtendable M = 1; +} + +message NestedDefinition { + optional int64 Field1 = 1; + message NestedMessage { + optional fixed64 NestedField1 = 1; + optional NestedNestedMsg NNM = 2; + message NestedNestedMsg { + optional string NestedNestedField1 = 10; + } + } + enum NestedEnum { + TYPE_NESTED = 1; + } + optional NestedEnum EnumField = 2; + optional NestedMessage.NestedNestedMsg NNM = 3; + optional NestedMessage NM = 4; +} + +message NestedScope { + optional NestedDefinition.NestedMessage.NestedNestedMsg A = 1; + optional NestedDefinition.NestedEnum B = 2; + optional NestedDefinition.NestedMessage C = 3; +} + +message NinOptNativeDefault { + option (gogoproto.goproto_getters) = true; + option (gogoproto.face) = false; + optional double Field1 = 1 [default = 1234.1234]; + optional float Field2 = 2 [default = 1234.1234]; + optional int32 Field3 = 3 [default = 1234]; + optional int64 Field4 = 4 [default = 1234]; + optional uint32 Field5 = 5 [default = 1234]; + optional uint64 Field6 = 6 [default = 1234]; + optional sint32 Field7 = 7 [default = 1234]; + optional sint64 Field8 = 8 [default = 1234]; + optional fixed32 Field9 = 9 [default = 1234]; + optional sfixed32 Field10 = 10 [default = 1234]; + optional fixed64 Field11 = 11 [default = 1234]; + optional sfixed64 Field12 = 12 [default = 1234]; + optional bool Field13 = 13 [default = true]; + optional string Field14 = 14 [default = "1234"]; + optional bytes Field15 = 15; +} + +message CustomContainer { + optional NidOptCustom CustomStruct = 1 [(gogoproto.nullable) = false]; +} + +message CustomNameNidOptNative { + optional double Field1 = 1 [(gogoproto.nullable) = false, (gogoproto.customname) = "FieldA"]; + optional float Field2 = 2 [(gogoproto.nullable) = false, (gogoproto.customname) = "FieldB"]; + optional int32 Field3 = 3 [(gogoproto.nullable) = false, (gogoproto.customname) = "FieldC"]; + optional int64 Field4 = 4 [(gogoproto.nullable) = false, (gogoproto.customname) = "FieldD"]; + optional uint32 Field5 = 5 [(gogoproto.nullable) = false, (gogoproto.customname) = "FieldE"]; + optional uint64 Field6 = 6 [(gogoproto.nullable) = false, (gogoproto.customname) = "FieldF"]; + optional sint32 Field7 = 7 [(gogoproto.nullable) = false, (gogoproto.customname) = "FieldG"]; + optional sint64 Field8 = 8 [(gogoproto.nullable) = false, (gogoproto.customname) = "FieldH"]; + optional fixed32 Field9 = 9 [(gogoproto.nullable) = false, (gogoproto.customname) = "FieldI"]; + optional sfixed32 Field10 = 10 [(gogoproto.nullable) = false, (gogoproto.customname) = "FieldJ"]; + optional fixed64 Field11 = 11 [(gogoproto.nullable) = false, (gogoproto.customname) = "FieldK"]; + optional sfixed64 Field12 = 12 [(gogoproto.nullable) = false, (gogoproto.customname) = "FieldL"]; + optional bool Field13 = 13 [(gogoproto.nullable) = false, (gogoproto.customname) = "FieldM"]; + optional string Field14 = 14 [(gogoproto.nullable) = false, (gogoproto.customname) = "FieldN"]; + optional bytes Field15 = 15 [(gogoproto.nullable) = false, (gogoproto.customname) = "FieldO"]; +} + +message CustomNameNinOptNative { + optional double Field1 = 1 [(gogoproto.customname) = "FieldA"]; + optional float Field2 = 2 [(gogoproto.customname) = "FieldB"]; + optional int32 Field3 = 3 [(gogoproto.customname) = "FieldC"]; + optional int64 Field4 = 4 [(gogoproto.customname) = "FieldD"]; + optional uint32 Field5 = 5 [(gogoproto.customname) = "FieldE"]; + optional uint64 Field6 = 6 [(gogoproto.customname) = "FieldF"]; + optional sint32 Field7 = 7 [(gogoproto.customname) = "FieldG"]; + optional sint64 Field8 = 8 [(gogoproto.customname) = "FieldH"]; + optional fixed32 Field9 = 9 [(gogoproto.customname) = "FieldI"]; + optional sfixed32 Field10 = 10 [(gogoproto.customname) = "FieldJ"]; + optional fixed64 Field11 = 11 [(gogoproto.customname) = "FieldK"]; + optional sfixed64 Field12 = 12 [(gogoproto.customname) = "FielL"]; + optional bool Field13 = 13 [(gogoproto.customname) = "FieldM"]; + optional string Field14 = 14 [(gogoproto.customname) = "FieldN"]; + optional bytes Field15 = 15 [(gogoproto.customname) = "FieldO"]; +} + +message CustomNameNinRepNative { + repeated double Field1 = 1 [(gogoproto.customname) = "FieldA"]; + repeated float Field2 = 2 [(gogoproto.customname) = "FieldB"]; + repeated int32 Field3 = 3 [(gogoproto.customname) = "FieldC"]; + repeated int64 Field4 = 4 [(gogoproto.customname) = "FieldD"]; + repeated uint32 Field5 = 5 [(gogoproto.customname) = "FieldE"]; + repeated uint64 Field6 = 6 [(gogoproto.customname) = "FieldF"]; + repeated sint32 Field7 = 7 [(gogoproto.customname) = "FieldG"]; + repeated sint64 Field8 = 8 [(gogoproto.customname) = "FieldH"]; + repeated fixed32 Field9 = 9 [(gogoproto.customname) = "FieldI"]; + repeated sfixed32 Field10 = 10 [(gogoproto.customname) = "FieldJ"]; + repeated fixed64 Field11 = 11 [(gogoproto.customname) = "FieldK"]; + repeated sfixed64 Field12 = 12 [(gogoproto.customname) = "FieldL"]; + repeated bool Field13 = 13 [(gogoproto.customname) = "FieldM"]; + repeated string Field14 = 14 [(gogoproto.customname) = "FieldN"]; + repeated bytes Field15 = 15 [(gogoproto.customname) = "FieldO"]; +} + +message CustomNameNinStruct { + optional double Field1 = 1 [(gogoproto.customname) = "FieldA"]; + optional float Field2 = 2 [(gogoproto.customname) = "FieldB"]; + optional NidOptNative Field3 = 3 [(gogoproto.customname) = "FieldC"]; + repeated NinOptNative Field4 = 4 [(gogoproto.customname) = "FieldD"]; + optional uint64 Field6 = 6 [(gogoproto.customname) = "FieldE"]; + optional sint32 Field7 = 7 [(gogoproto.customname) = "FieldF"]; + optional NidOptNative Field8 = 8 [(gogoproto.customname) = "FieldG"]; + optional bool Field13 = 13 [(gogoproto.customname) = "FieldH"]; + optional string Field14 = 14 [(gogoproto.customname) = "FieldI"]; + optional bytes Field15 = 15 [(gogoproto.customname) = "FieldJ"]; +} + +message CustomNameCustomType { + optional bytes Id = 1 [(gogoproto.customname) = "FieldA", (gogoproto.customtype) = "Uuid"]; + optional bytes Value = 2 [(gogoproto.customname) = "FieldB", (gogoproto.customtype) = "github.com/gogo/protobuf/test/custom.Uint128"]; + repeated bytes Ids = 3 [(gogoproto.customname) = "FieldC", (gogoproto.customtype) = "Uuid"]; + repeated bytes Values = 4 [(gogoproto.customname) = "FieldD", (gogoproto.customtype) = "github.com/gogo/protobuf/test/custom.Uint128"]; +} + +message CustomNameNinEmbeddedStructUnion { + option (gogoproto.onlyone) = true; + optional NidOptNative Field1 = 1 [(gogoproto.embed) = true]; + optional NinOptNative Field200 = 200 [(gogoproto.customname) = "FieldA"]; + optional bool Field210 = 210 [(gogoproto.customname) = "FieldB"]; +} + +message CustomNameEnum { + optional TheTestEnum Field1 = 1 [(gogoproto.customname) = "FieldA"]; + repeated TheTestEnum Field2 = 2 [(gogoproto.customname) = "FieldB"]; +} + +message NoExtensionsMap { + option (gogoproto.face) = false; + option (gogoproto.goproto_extensions_map) = false; + optional int64 Field1 = 1; + extensions 100 to 199; +} + +extend NoExtensionsMap { + optional double FieldA1 = 100; + optional NinOptNative FieldB1 = 101; + optional NinEmbeddedStruct FieldC1 = 102; +} + +message Unrecognized { + option (gogoproto.goproto_unrecognized) = false; + optional string Field1 = 1; +} + +message UnrecognizedWithInner { + message Inner { + option (gogoproto.goproto_unrecognized) = false; + optional uint32 Field1 = 1; + } + + repeated Inner embedded = 1; + optional string Field2 = 2; +} + +message UnrecognizedWithEmbed { + message Embedded { + option (gogoproto.goproto_unrecognized) = false; + optional uint32 Field1 = 1; + } + + optional Embedded embedded = 1 [(gogoproto.embed) = true, (gogoproto.nullable) = false]; + optional string Field2 = 2; +} + +message Node { + optional string Label = 1; + repeated Node Children = 2; +} + diff --git a/vendor/github.com/gogo/protobuf/test/combos/marshaler/thetestpb_test.go b/vendor/github.com/gogo/protobuf/test/combos/marshaler/thetestpb_test.go new file mode 100644 index 000000000..47fdcf12c --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/combos/marshaler/thetestpb_test.go @@ -0,0 +1,16373 @@ +// Code generated by protoc-gen-gogo. +// source: combos/marshaler/thetest.proto +// DO NOT EDIT! + +/* +Package test is a generated protocol buffer package. + +It is generated from these files: + combos/marshaler/thetest.proto + +It has these top-level messages: + NidOptNative + NinOptNative + NidRepNative + NinRepNative + NidRepPackedNative + NinRepPackedNative + NidOptStruct + NinOptStruct + NidRepStruct + NinRepStruct + NidEmbeddedStruct + NinEmbeddedStruct + NidNestedStruct + NinNestedStruct + NidOptCustom + CustomDash + NinOptCustom + NidRepCustom + NinRepCustom + NinOptNativeUnion + NinOptStructUnion + NinEmbeddedStructUnion + NinNestedStructUnion + Tree + OrBranch + AndBranch + Leaf + DeepTree + ADeepBranch + AndDeepBranch + DeepLeaf + Nil + NidOptEnum + NinOptEnum + NidRepEnum + NinRepEnum + NinOptEnumDefault + AnotherNinOptEnum + AnotherNinOptEnumDefault + Timer + MyExtendable + OtherExtenable + NestedDefinition + NestedScope + NinOptNativeDefault + CustomContainer + CustomNameNidOptNative + CustomNameNinOptNative + CustomNameNinRepNative + CustomNameNinStruct + CustomNameCustomType + CustomNameNinEmbeddedStructUnion + CustomNameEnum + NoExtensionsMap + Unrecognized + UnrecognizedWithInner + UnrecognizedWithEmbed + Node +*/ +package test + +import testing "testing" +import math_rand "math/rand" +import time "time" +import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" +import github_com_gogo_protobuf_jsonpb "github.com/gogo/protobuf/jsonpb" +import fmt "fmt" +import go_parser "go/parser" +import proto "github.com/gogo/protobuf/proto" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +func TestNidOptNativeProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidOptNative(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidOptNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestNidOptNativeMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidOptNative(popr, false) + size := p.Size() + data := make([]byte, size) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(data) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidOptNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkNidOptNativeProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NidOptNative, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNidOptNative(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNidOptNativeProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNidOptNative(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &NidOptNative{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinOptNativeProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptNative(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinOptNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestNinOptNativeMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptNative(popr, false) + size := p.Size() + data := make([]byte, size) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(data) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinOptNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkNinOptNativeProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinOptNative, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNinOptNative(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNinOptNativeProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinOptNative(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &NinOptNative{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNidRepNativeProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepNative(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidRepNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestNidRepNativeMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepNative(popr, false) + size := p.Size() + data := make([]byte, size) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(data) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidRepNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkNidRepNativeProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NidRepNative, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNidRepNative(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNidRepNativeProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNidRepNative(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &NidRepNative{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinRepNativeProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepNative(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinRepNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestNinRepNativeMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepNative(popr, false) + size := p.Size() + data := make([]byte, size) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(data) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinRepNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkNinRepNativeProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinRepNative, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNinRepNative(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNinRepNativeProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinRepNative(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &NinRepNative{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNidRepPackedNativeProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepPackedNative(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidRepPackedNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestNidRepPackedNativeMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepPackedNative(popr, false) + size := p.Size() + data := make([]byte, size) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(data) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidRepPackedNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkNidRepPackedNativeProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NidRepPackedNative, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNidRepPackedNative(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNidRepPackedNativeProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNidRepPackedNative(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &NidRepPackedNative{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinRepPackedNativeProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepPackedNative(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinRepPackedNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestNinRepPackedNativeMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepPackedNative(popr, false) + size := p.Size() + data := make([]byte, size) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(data) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinRepPackedNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkNinRepPackedNativeProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinRepPackedNative, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNinRepPackedNative(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNinRepPackedNativeProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinRepPackedNative(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &NinRepPackedNative{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNidOptStructProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidOptStruct(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidOptStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestNidOptStructMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidOptStruct(popr, false) + size := p.Size() + data := make([]byte, size) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(data) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidOptStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkNidOptStructProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NidOptStruct, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNidOptStruct(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNidOptStructProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNidOptStruct(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &NidOptStruct{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinOptStructProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptStruct(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinOptStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestNinOptStructMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptStruct(popr, false) + size := p.Size() + data := make([]byte, size) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(data) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinOptStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkNinOptStructProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinOptStruct, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNinOptStruct(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNinOptStructProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinOptStruct(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &NinOptStruct{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNidRepStructProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepStruct(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidRepStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestNidRepStructMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepStruct(popr, false) + size := p.Size() + data := make([]byte, size) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(data) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidRepStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkNidRepStructProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NidRepStruct, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNidRepStruct(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNidRepStructProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNidRepStruct(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &NidRepStruct{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinRepStructProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepStruct(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinRepStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestNinRepStructMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepStruct(popr, false) + size := p.Size() + data := make([]byte, size) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(data) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinRepStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkNinRepStructProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinRepStruct, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNinRepStruct(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNinRepStructProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinRepStruct(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &NinRepStruct{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNidEmbeddedStructProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidEmbeddedStruct(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidEmbeddedStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestNidEmbeddedStructMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidEmbeddedStruct(popr, false) + size := p.Size() + data := make([]byte, size) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(data) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidEmbeddedStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkNidEmbeddedStructProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NidEmbeddedStruct, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNidEmbeddedStruct(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNidEmbeddedStructProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNidEmbeddedStruct(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &NidEmbeddedStruct{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinEmbeddedStructProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinEmbeddedStruct(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinEmbeddedStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestNinEmbeddedStructMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinEmbeddedStruct(popr, false) + size := p.Size() + data := make([]byte, size) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(data) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinEmbeddedStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkNinEmbeddedStructProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinEmbeddedStruct, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNinEmbeddedStruct(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNinEmbeddedStructProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinEmbeddedStruct(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &NinEmbeddedStruct{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNidNestedStructProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidNestedStruct(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidNestedStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestNidNestedStructMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidNestedStruct(popr, false) + size := p.Size() + data := make([]byte, size) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(data) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidNestedStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkNidNestedStructProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NidNestedStruct, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNidNestedStruct(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNidNestedStructProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNidNestedStruct(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &NidNestedStruct{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinNestedStructProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinNestedStruct(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinNestedStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestNinNestedStructMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinNestedStruct(popr, false) + size := p.Size() + data := make([]byte, size) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(data) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinNestedStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkNinNestedStructProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinNestedStruct, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNinNestedStruct(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNinNestedStructProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinNestedStruct(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &NinNestedStruct{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNidOptCustomProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidOptCustom(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidOptCustom{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestNidOptCustomMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidOptCustom(popr, false) + size := p.Size() + data := make([]byte, size) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(data) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidOptCustom{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkNidOptCustomProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NidOptCustom, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNidOptCustom(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNidOptCustomProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNidOptCustom(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &NidOptCustom{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestCustomDashProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomDash(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &CustomDash{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestCustomDashMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomDash(popr, false) + size := p.Size() + data := make([]byte, size) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(data) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &CustomDash{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkCustomDashProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*CustomDash, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedCustomDash(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkCustomDashProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedCustomDash(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &CustomDash{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinOptCustomProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptCustom(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinOptCustom{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestNinOptCustomMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptCustom(popr, false) + size := p.Size() + data := make([]byte, size) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(data) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinOptCustom{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkNinOptCustomProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinOptCustom, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNinOptCustom(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNinOptCustomProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinOptCustom(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &NinOptCustom{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNidRepCustomProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepCustom(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidRepCustom{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestNidRepCustomMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepCustom(popr, false) + size := p.Size() + data := make([]byte, size) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(data) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidRepCustom{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkNidRepCustomProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NidRepCustom, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNidRepCustom(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNidRepCustomProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNidRepCustom(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &NidRepCustom{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinRepCustomProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepCustom(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinRepCustom{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestNinRepCustomMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepCustom(popr, false) + size := p.Size() + data := make([]byte, size) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(data) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinRepCustom{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkNinRepCustomProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinRepCustom, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNinRepCustom(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNinRepCustomProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinRepCustom(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &NinRepCustom{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinOptNativeUnionProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptNativeUnion(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinOptNativeUnion{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestNinOptNativeUnionMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptNativeUnion(popr, false) + size := p.Size() + data := make([]byte, size) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(data) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinOptNativeUnion{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkNinOptNativeUnionProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinOptNativeUnion, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNinOptNativeUnion(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNinOptNativeUnionProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinOptNativeUnion(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &NinOptNativeUnion{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinOptStructUnionProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptStructUnion(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinOptStructUnion{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestNinOptStructUnionMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptStructUnion(popr, false) + size := p.Size() + data := make([]byte, size) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(data) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinOptStructUnion{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkNinOptStructUnionProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinOptStructUnion, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNinOptStructUnion(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNinOptStructUnionProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinOptStructUnion(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &NinOptStructUnion{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinEmbeddedStructUnionProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinEmbeddedStructUnion(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinEmbeddedStructUnion{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestNinEmbeddedStructUnionMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinEmbeddedStructUnion(popr, false) + size := p.Size() + data := make([]byte, size) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(data) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinEmbeddedStructUnion{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkNinEmbeddedStructUnionProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinEmbeddedStructUnion, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNinEmbeddedStructUnion(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNinEmbeddedStructUnionProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinEmbeddedStructUnion(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &NinEmbeddedStructUnion{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinNestedStructUnionProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinNestedStructUnion(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinNestedStructUnion{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestNinNestedStructUnionMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinNestedStructUnion(popr, false) + size := p.Size() + data := make([]byte, size) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(data) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinNestedStructUnion{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkNinNestedStructUnionProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinNestedStructUnion, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNinNestedStructUnion(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNinNestedStructUnionProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinNestedStructUnion(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &NinNestedStructUnion{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestTreeProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedTree(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Tree{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestTreeMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedTree(popr, false) + size := p.Size() + data := make([]byte, size) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(data) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Tree{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkTreeProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Tree, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedTree(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkTreeProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedTree(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &Tree{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestOrBranchProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedOrBranch(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &OrBranch{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestOrBranchMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedOrBranch(popr, false) + size := p.Size() + data := make([]byte, size) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(data) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &OrBranch{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkOrBranchProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*OrBranch, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedOrBranch(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkOrBranchProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedOrBranch(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &OrBranch{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestAndBranchProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAndBranch(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &AndBranch{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestAndBranchMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAndBranch(popr, false) + size := p.Size() + data := make([]byte, size) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(data) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &AndBranch{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkAndBranchProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*AndBranch, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedAndBranch(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkAndBranchProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedAndBranch(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &AndBranch{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestLeafProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedLeaf(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Leaf{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestLeafMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedLeaf(popr, false) + size := p.Size() + data := make([]byte, size) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(data) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Leaf{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkLeafProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Leaf, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedLeaf(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkLeafProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedLeaf(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &Leaf{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestDeepTreeProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedDeepTree(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &DeepTree{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestDeepTreeMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedDeepTree(popr, false) + size := p.Size() + data := make([]byte, size) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(data) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &DeepTree{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkDeepTreeProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*DeepTree, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedDeepTree(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkDeepTreeProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedDeepTree(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &DeepTree{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestADeepBranchProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedADeepBranch(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &ADeepBranch{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestADeepBranchMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedADeepBranch(popr, false) + size := p.Size() + data := make([]byte, size) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(data) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &ADeepBranch{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkADeepBranchProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*ADeepBranch, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedADeepBranch(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkADeepBranchProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedADeepBranch(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &ADeepBranch{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestAndDeepBranchProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAndDeepBranch(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &AndDeepBranch{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestAndDeepBranchMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAndDeepBranch(popr, false) + size := p.Size() + data := make([]byte, size) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(data) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &AndDeepBranch{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkAndDeepBranchProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*AndDeepBranch, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedAndDeepBranch(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkAndDeepBranchProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedAndDeepBranch(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &AndDeepBranch{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestDeepLeafProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedDeepLeaf(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &DeepLeaf{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestDeepLeafMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedDeepLeaf(popr, false) + size := p.Size() + data := make([]byte, size) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(data) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &DeepLeaf{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkDeepLeafProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*DeepLeaf, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedDeepLeaf(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkDeepLeafProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedDeepLeaf(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &DeepLeaf{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNilProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNil(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Nil{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestNilMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNil(popr, false) + size := p.Size() + data := make([]byte, size) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(data) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Nil{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkNilProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Nil, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNil(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNilProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNil(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &Nil{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNidOptEnumProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidOptEnum(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidOptEnum{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestNidOptEnumMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidOptEnum(popr, false) + size := p.Size() + data := make([]byte, size) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(data) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidOptEnum{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkNidOptEnumProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NidOptEnum, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNidOptEnum(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNidOptEnumProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNidOptEnum(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &NidOptEnum{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinOptEnumProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptEnum(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinOptEnum{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestNinOptEnumMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptEnum(popr, false) + size := p.Size() + data := make([]byte, size) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(data) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinOptEnum{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkNinOptEnumProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinOptEnum, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNinOptEnum(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNinOptEnumProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinOptEnum(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &NinOptEnum{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNidRepEnumProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepEnum(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidRepEnum{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestNidRepEnumMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepEnum(popr, false) + size := p.Size() + data := make([]byte, size) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(data) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidRepEnum{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkNidRepEnumProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NidRepEnum, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNidRepEnum(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNidRepEnumProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNidRepEnum(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &NidRepEnum{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinRepEnumProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepEnum(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinRepEnum{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestNinRepEnumMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepEnum(popr, false) + size := p.Size() + data := make([]byte, size) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(data) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinRepEnum{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkNinRepEnumProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinRepEnum, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNinRepEnum(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNinRepEnumProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinRepEnum(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &NinRepEnum{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinOptEnumDefaultProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptEnumDefault(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinOptEnumDefault{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestNinOptEnumDefaultMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptEnumDefault(popr, false) + size := p.Size() + data := make([]byte, size) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(data) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinOptEnumDefault{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkNinOptEnumDefaultProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinOptEnumDefault, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNinOptEnumDefault(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNinOptEnumDefaultProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinOptEnumDefault(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &NinOptEnumDefault{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestAnotherNinOptEnumProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAnotherNinOptEnum(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &AnotherNinOptEnum{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestAnotherNinOptEnumMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAnotherNinOptEnum(popr, false) + size := p.Size() + data := make([]byte, size) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(data) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &AnotherNinOptEnum{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkAnotherNinOptEnumProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*AnotherNinOptEnum, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedAnotherNinOptEnum(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkAnotherNinOptEnumProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedAnotherNinOptEnum(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &AnotherNinOptEnum{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestAnotherNinOptEnumDefaultProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAnotherNinOptEnumDefault(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &AnotherNinOptEnumDefault{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestAnotherNinOptEnumDefaultMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAnotherNinOptEnumDefault(popr, false) + size := p.Size() + data := make([]byte, size) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(data) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &AnotherNinOptEnumDefault{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkAnotherNinOptEnumDefaultProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*AnotherNinOptEnumDefault, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedAnotherNinOptEnumDefault(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkAnotherNinOptEnumDefaultProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedAnotherNinOptEnumDefault(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &AnotherNinOptEnumDefault{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestTimerProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedTimer(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Timer{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestTimerMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedTimer(popr, false) + size := p.Size() + data := make([]byte, size) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(data) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Timer{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkTimerProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Timer, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedTimer(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkTimerProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedTimer(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &Timer{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestMyExtendableProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMyExtendable(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &MyExtendable{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestMyExtendableMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMyExtendable(popr, false) + size := p.Size() + data := make([]byte, size) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(data) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &MyExtendable{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkMyExtendableProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*MyExtendable, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedMyExtendable(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkMyExtendableProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedMyExtendable(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &MyExtendable{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestOtherExtenableProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedOtherExtenable(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &OtherExtenable{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestOtherExtenableMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedOtherExtenable(popr, false) + size := p.Size() + data := make([]byte, size) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(data) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &OtherExtenable{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkOtherExtenableProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*OtherExtenable, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedOtherExtenable(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkOtherExtenableProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedOtherExtenable(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &OtherExtenable{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNestedDefinitionProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNestedDefinition(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NestedDefinition{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestNestedDefinitionMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNestedDefinition(popr, false) + size := p.Size() + data := make([]byte, size) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(data) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NestedDefinition{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkNestedDefinitionProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NestedDefinition, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNestedDefinition(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNestedDefinitionProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNestedDefinition(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &NestedDefinition{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNestedDefinition_NestedMessageProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNestedDefinition_NestedMessage(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NestedDefinition_NestedMessage{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestNestedDefinition_NestedMessageMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNestedDefinition_NestedMessage(popr, false) + size := p.Size() + data := make([]byte, size) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(data) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NestedDefinition_NestedMessage{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkNestedDefinition_NestedMessageProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NestedDefinition_NestedMessage, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNestedDefinition_NestedMessage(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNestedDefinition_NestedMessageProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNestedDefinition_NestedMessage(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &NestedDefinition_NestedMessage{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNestedDefinition_NestedMessage_NestedNestedMsgProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NestedDefinition_NestedMessage_NestedNestedMsg{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestNestedDefinition_NestedMessage_NestedNestedMsgMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(popr, false) + size := p.Size() + data := make([]byte, size) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(data) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NestedDefinition_NestedMessage_NestedNestedMsg{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkNestedDefinition_NestedMessage_NestedNestedMsgProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NestedDefinition_NestedMessage_NestedNestedMsg, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNestedDefinition_NestedMessage_NestedNestedMsgProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &NestedDefinition_NestedMessage_NestedNestedMsg{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNestedScopeProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNestedScope(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NestedScope{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestNestedScopeMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNestedScope(popr, false) + size := p.Size() + data := make([]byte, size) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(data) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NestedScope{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkNestedScopeProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NestedScope, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNestedScope(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNestedScopeProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNestedScope(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &NestedScope{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinOptNativeDefaultProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptNativeDefault(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinOptNativeDefault{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestNinOptNativeDefaultMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptNativeDefault(popr, false) + size := p.Size() + data := make([]byte, size) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(data) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinOptNativeDefault{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkNinOptNativeDefaultProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinOptNativeDefault, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNinOptNativeDefault(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNinOptNativeDefaultProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinOptNativeDefault(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &NinOptNativeDefault{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestCustomContainerProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomContainer(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &CustomContainer{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestCustomContainerMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomContainer(popr, false) + size := p.Size() + data := make([]byte, size) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(data) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &CustomContainer{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkCustomContainerProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*CustomContainer, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedCustomContainer(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkCustomContainerProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedCustomContainer(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &CustomContainer{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestCustomNameNidOptNativeProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameNidOptNative(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &CustomNameNidOptNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestCustomNameNidOptNativeMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameNidOptNative(popr, false) + size := p.Size() + data := make([]byte, size) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(data) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &CustomNameNidOptNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkCustomNameNidOptNativeProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*CustomNameNidOptNative, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedCustomNameNidOptNative(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkCustomNameNidOptNativeProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedCustomNameNidOptNative(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &CustomNameNidOptNative{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestCustomNameNinOptNativeProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameNinOptNative(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &CustomNameNinOptNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestCustomNameNinOptNativeMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameNinOptNative(popr, false) + size := p.Size() + data := make([]byte, size) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(data) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &CustomNameNinOptNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkCustomNameNinOptNativeProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*CustomNameNinOptNative, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedCustomNameNinOptNative(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkCustomNameNinOptNativeProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedCustomNameNinOptNative(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &CustomNameNinOptNative{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestCustomNameNinRepNativeProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameNinRepNative(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &CustomNameNinRepNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestCustomNameNinRepNativeMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameNinRepNative(popr, false) + size := p.Size() + data := make([]byte, size) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(data) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &CustomNameNinRepNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkCustomNameNinRepNativeProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*CustomNameNinRepNative, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedCustomNameNinRepNative(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkCustomNameNinRepNativeProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedCustomNameNinRepNative(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &CustomNameNinRepNative{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestCustomNameNinStructProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameNinStruct(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &CustomNameNinStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestCustomNameNinStructMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameNinStruct(popr, false) + size := p.Size() + data := make([]byte, size) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(data) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &CustomNameNinStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkCustomNameNinStructProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*CustomNameNinStruct, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedCustomNameNinStruct(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkCustomNameNinStructProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedCustomNameNinStruct(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &CustomNameNinStruct{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestCustomNameCustomTypeProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameCustomType(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &CustomNameCustomType{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestCustomNameCustomTypeMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameCustomType(popr, false) + size := p.Size() + data := make([]byte, size) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(data) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &CustomNameCustomType{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkCustomNameCustomTypeProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*CustomNameCustomType, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedCustomNameCustomType(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkCustomNameCustomTypeProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedCustomNameCustomType(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &CustomNameCustomType{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestCustomNameNinEmbeddedStructUnionProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameNinEmbeddedStructUnion(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &CustomNameNinEmbeddedStructUnion{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestCustomNameNinEmbeddedStructUnionMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameNinEmbeddedStructUnion(popr, false) + size := p.Size() + data := make([]byte, size) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(data) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &CustomNameNinEmbeddedStructUnion{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkCustomNameNinEmbeddedStructUnionProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*CustomNameNinEmbeddedStructUnion, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedCustomNameNinEmbeddedStructUnion(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkCustomNameNinEmbeddedStructUnionProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedCustomNameNinEmbeddedStructUnion(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &CustomNameNinEmbeddedStructUnion{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestCustomNameEnumProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameEnum(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &CustomNameEnum{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestCustomNameEnumMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameEnum(popr, false) + size := p.Size() + data := make([]byte, size) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(data) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &CustomNameEnum{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkCustomNameEnumProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*CustomNameEnum, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedCustomNameEnum(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkCustomNameEnumProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedCustomNameEnum(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &CustomNameEnum{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNoExtensionsMapProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNoExtensionsMap(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NoExtensionsMap{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestNoExtensionsMapMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNoExtensionsMap(popr, false) + size := p.Size() + data := make([]byte, size) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(data) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NoExtensionsMap{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkNoExtensionsMapProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NoExtensionsMap, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNoExtensionsMap(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNoExtensionsMapProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNoExtensionsMap(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &NoExtensionsMap{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestUnrecognizedProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUnrecognized(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Unrecognized{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestUnrecognizedMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUnrecognized(popr, false) + size := p.Size() + data := make([]byte, size) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(data) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Unrecognized{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkUnrecognizedProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Unrecognized, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedUnrecognized(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkUnrecognizedProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedUnrecognized(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &Unrecognized{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestUnrecognizedWithInnerProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUnrecognizedWithInner(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &UnrecognizedWithInner{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestUnrecognizedWithInnerMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUnrecognizedWithInner(popr, false) + size := p.Size() + data := make([]byte, size) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(data) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &UnrecognizedWithInner{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkUnrecognizedWithInnerProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*UnrecognizedWithInner, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedUnrecognizedWithInner(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkUnrecognizedWithInnerProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedUnrecognizedWithInner(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &UnrecognizedWithInner{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestUnrecognizedWithInner_InnerProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUnrecognizedWithInner_Inner(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &UnrecognizedWithInner_Inner{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestUnrecognizedWithInner_InnerMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUnrecognizedWithInner_Inner(popr, false) + size := p.Size() + data := make([]byte, size) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(data) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &UnrecognizedWithInner_Inner{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkUnrecognizedWithInner_InnerProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*UnrecognizedWithInner_Inner, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedUnrecognizedWithInner_Inner(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkUnrecognizedWithInner_InnerProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedUnrecognizedWithInner_Inner(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &UnrecognizedWithInner_Inner{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestUnrecognizedWithEmbedProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUnrecognizedWithEmbed(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &UnrecognizedWithEmbed{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestUnrecognizedWithEmbedMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUnrecognizedWithEmbed(popr, false) + size := p.Size() + data := make([]byte, size) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(data) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &UnrecognizedWithEmbed{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkUnrecognizedWithEmbedProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*UnrecognizedWithEmbed, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedUnrecognizedWithEmbed(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkUnrecognizedWithEmbedProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedUnrecognizedWithEmbed(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &UnrecognizedWithEmbed{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestUnrecognizedWithEmbed_EmbeddedProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUnrecognizedWithEmbed_Embedded(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &UnrecognizedWithEmbed_Embedded{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestUnrecognizedWithEmbed_EmbeddedMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUnrecognizedWithEmbed_Embedded(popr, false) + size := p.Size() + data := make([]byte, size) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(data) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &UnrecognizedWithEmbed_Embedded{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkUnrecognizedWithEmbed_EmbeddedProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*UnrecognizedWithEmbed_Embedded, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedUnrecognizedWithEmbed_Embedded(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkUnrecognizedWithEmbed_EmbeddedProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedUnrecognizedWithEmbed_Embedded(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &UnrecognizedWithEmbed_Embedded{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNodeProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNode(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Node{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestNodeMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNode(popr, false) + size := p.Size() + data := make([]byte, size) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(data) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Node{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkNodeProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Node, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNode(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNodeProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNode(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &Node{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNidOptNativeJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidOptNative(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidOptNative{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNinOptNativeJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptNative(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinOptNative{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNidRepNativeJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepNative(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidRepNative{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNinRepNativeJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepNative(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinRepNative{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNidRepPackedNativeJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepPackedNative(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidRepPackedNative{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNinRepPackedNativeJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepPackedNative(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinRepPackedNative{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNidOptStructJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidOptStruct(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidOptStruct{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNinOptStructJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptStruct(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinOptStruct{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNidRepStructJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepStruct(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidRepStruct{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNinRepStructJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepStruct(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinRepStruct{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNidEmbeddedStructJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidEmbeddedStruct(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidEmbeddedStruct{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNinEmbeddedStructJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinEmbeddedStruct(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinEmbeddedStruct{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNidNestedStructJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidNestedStruct(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidNestedStruct{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNinNestedStructJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinNestedStruct(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinNestedStruct{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNidOptCustomJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidOptCustom(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidOptCustom{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestCustomDashJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomDash(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &CustomDash{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNinOptCustomJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptCustom(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinOptCustom{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNidRepCustomJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepCustom(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidRepCustom{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNinRepCustomJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepCustom(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinRepCustom{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNinOptNativeUnionJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptNativeUnion(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinOptNativeUnion{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNinOptStructUnionJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptStructUnion(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinOptStructUnion{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNinEmbeddedStructUnionJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinEmbeddedStructUnion(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinEmbeddedStructUnion{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNinNestedStructUnionJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinNestedStructUnion(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinNestedStructUnion{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestTreeJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedTree(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Tree{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestOrBranchJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedOrBranch(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &OrBranch{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestAndBranchJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAndBranch(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &AndBranch{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestLeafJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedLeaf(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Leaf{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestDeepTreeJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedDeepTree(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &DeepTree{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestADeepBranchJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedADeepBranch(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &ADeepBranch{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestAndDeepBranchJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAndDeepBranch(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &AndDeepBranch{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestDeepLeafJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedDeepLeaf(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &DeepLeaf{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNilJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNil(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Nil{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNidOptEnumJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidOptEnum(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidOptEnum{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNinOptEnumJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptEnum(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinOptEnum{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNidRepEnumJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepEnum(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidRepEnum{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNinRepEnumJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepEnum(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinRepEnum{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNinOptEnumDefaultJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptEnumDefault(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinOptEnumDefault{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestAnotherNinOptEnumJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAnotherNinOptEnum(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &AnotherNinOptEnum{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestAnotherNinOptEnumDefaultJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAnotherNinOptEnumDefault(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &AnotherNinOptEnumDefault{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestTimerJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedTimer(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Timer{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestMyExtendableJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMyExtendable(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &MyExtendable{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestOtherExtenableJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedOtherExtenable(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &OtherExtenable{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNestedDefinitionJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNestedDefinition(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NestedDefinition{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNestedDefinition_NestedMessageJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNestedDefinition_NestedMessage(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NestedDefinition_NestedMessage{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNestedDefinition_NestedMessage_NestedNestedMsgJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NestedDefinition_NestedMessage_NestedNestedMsg{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNestedScopeJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNestedScope(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NestedScope{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNinOptNativeDefaultJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptNativeDefault(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinOptNativeDefault{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestCustomContainerJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomContainer(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &CustomContainer{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestCustomNameNidOptNativeJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameNidOptNative(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &CustomNameNidOptNative{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestCustomNameNinOptNativeJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameNinOptNative(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &CustomNameNinOptNative{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestCustomNameNinRepNativeJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameNinRepNative(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &CustomNameNinRepNative{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestCustomNameNinStructJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameNinStruct(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &CustomNameNinStruct{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestCustomNameCustomTypeJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameCustomType(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &CustomNameCustomType{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestCustomNameNinEmbeddedStructUnionJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameNinEmbeddedStructUnion(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &CustomNameNinEmbeddedStructUnion{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestCustomNameEnumJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameEnum(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &CustomNameEnum{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNoExtensionsMapJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNoExtensionsMap(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NoExtensionsMap{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestUnrecognizedJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUnrecognized(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Unrecognized{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestUnrecognizedWithInnerJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUnrecognizedWithInner(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &UnrecognizedWithInner{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestUnrecognizedWithInner_InnerJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUnrecognizedWithInner_Inner(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &UnrecognizedWithInner_Inner{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestUnrecognizedWithEmbedJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUnrecognizedWithEmbed(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &UnrecognizedWithEmbed{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestUnrecognizedWithEmbed_EmbeddedJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUnrecognizedWithEmbed_Embedded(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &UnrecognizedWithEmbed_Embedded{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNodeJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNode(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Node{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNidOptNativeProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidOptNative(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NidOptNative{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNidOptNativeProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidOptNative(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NidOptNative{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinOptNativeProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptNative(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NinOptNative{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinOptNativeProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptNative(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NinOptNative{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNidRepNativeProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepNative(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NidRepNative{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNidRepNativeProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepNative(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NidRepNative{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinRepNativeProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepNative(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NinRepNative{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinRepNativeProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepNative(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NinRepNative{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNidRepPackedNativeProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepPackedNative(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NidRepPackedNative{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNidRepPackedNativeProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepPackedNative(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NidRepPackedNative{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinRepPackedNativeProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepPackedNative(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NinRepPackedNative{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinRepPackedNativeProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepPackedNative(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NinRepPackedNative{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNidOptStructProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidOptStruct(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NidOptStruct{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNidOptStructProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidOptStruct(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NidOptStruct{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinOptStructProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptStruct(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NinOptStruct{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinOptStructProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptStruct(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NinOptStruct{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNidRepStructProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepStruct(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NidRepStruct{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNidRepStructProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepStruct(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NidRepStruct{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinRepStructProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepStruct(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NinRepStruct{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinRepStructProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepStruct(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NinRepStruct{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNidEmbeddedStructProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidEmbeddedStruct(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NidEmbeddedStruct{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNidEmbeddedStructProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidEmbeddedStruct(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NidEmbeddedStruct{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinEmbeddedStructProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinEmbeddedStruct(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NinEmbeddedStruct{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinEmbeddedStructProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinEmbeddedStruct(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NinEmbeddedStruct{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNidNestedStructProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidNestedStruct(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NidNestedStruct{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNidNestedStructProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidNestedStruct(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NidNestedStruct{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinNestedStructProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinNestedStruct(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NinNestedStruct{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinNestedStructProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinNestedStruct(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NinNestedStruct{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNidOptCustomProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidOptCustom(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NidOptCustom{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNidOptCustomProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidOptCustom(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NidOptCustom{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestCustomDashProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomDash(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &CustomDash{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestCustomDashProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomDash(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &CustomDash{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinOptCustomProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptCustom(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NinOptCustom{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinOptCustomProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptCustom(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NinOptCustom{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNidRepCustomProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepCustom(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NidRepCustom{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNidRepCustomProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepCustom(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NidRepCustom{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinRepCustomProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepCustom(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NinRepCustom{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinRepCustomProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepCustom(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NinRepCustom{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinOptNativeUnionProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptNativeUnion(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NinOptNativeUnion{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinOptNativeUnionProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptNativeUnion(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NinOptNativeUnion{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinOptStructUnionProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptStructUnion(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NinOptStructUnion{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinOptStructUnionProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptStructUnion(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NinOptStructUnion{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinEmbeddedStructUnionProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinEmbeddedStructUnion(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NinEmbeddedStructUnion{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinEmbeddedStructUnionProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinEmbeddedStructUnion(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NinEmbeddedStructUnion{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinNestedStructUnionProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinNestedStructUnion(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NinNestedStructUnion{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinNestedStructUnionProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinNestedStructUnion(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NinNestedStructUnion{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestTreeProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedTree(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &Tree{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestTreeProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedTree(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &Tree{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestOrBranchProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedOrBranch(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &OrBranch{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestOrBranchProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedOrBranch(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &OrBranch{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestAndBranchProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAndBranch(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &AndBranch{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestAndBranchProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAndBranch(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &AndBranch{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestLeafProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedLeaf(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &Leaf{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestLeafProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedLeaf(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &Leaf{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestDeepTreeProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedDeepTree(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &DeepTree{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestDeepTreeProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedDeepTree(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &DeepTree{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestADeepBranchProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedADeepBranch(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &ADeepBranch{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestADeepBranchProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedADeepBranch(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &ADeepBranch{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestAndDeepBranchProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAndDeepBranch(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &AndDeepBranch{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestAndDeepBranchProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAndDeepBranch(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &AndDeepBranch{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestDeepLeafProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedDeepLeaf(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &DeepLeaf{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestDeepLeafProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedDeepLeaf(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &DeepLeaf{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNilProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNil(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &Nil{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNilProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNil(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &Nil{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNidOptEnumProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidOptEnum(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NidOptEnum{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNidOptEnumProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidOptEnum(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NidOptEnum{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinOptEnumProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptEnum(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NinOptEnum{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinOptEnumProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptEnum(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NinOptEnum{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNidRepEnumProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepEnum(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NidRepEnum{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNidRepEnumProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepEnum(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NidRepEnum{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinRepEnumProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepEnum(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NinRepEnum{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinRepEnumProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepEnum(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NinRepEnum{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinOptEnumDefaultProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptEnumDefault(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NinOptEnumDefault{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinOptEnumDefaultProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptEnumDefault(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NinOptEnumDefault{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestAnotherNinOptEnumProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAnotherNinOptEnum(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &AnotherNinOptEnum{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestAnotherNinOptEnumProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAnotherNinOptEnum(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &AnotherNinOptEnum{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestAnotherNinOptEnumDefaultProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAnotherNinOptEnumDefault(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &AnotherNinOptEnumDefault{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestAnotherNinOptEnumDefaultProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAnotherNinOptEnumDefault(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &AnotherNinOptEnumDefault{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestTimerProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedTimer(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &Timer{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestTimerProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedTimer(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &Timer{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestMyExtendableProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMyExtendable(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &MyExtendable{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestMyExtendableProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMyExtendable(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &MyExtendable{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestOtherExtenableProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedOtherExtenable(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &OtherExtenable{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestOtherExtenableProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedOtherExtenable(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &OtherExtenable{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNestedDefinitionProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNestedDefinition(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NestedDefinition{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNestedDefinitionProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNestedDefinition(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NestedDefinition{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNestedDefinition_NestedMessageProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNestedDefinition_NestedMessage(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NestedDefinition_NestedMessage{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNestedDefinition_NestedMessageProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNestedDefinition_NestedMessage(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NestedDefinition_NestedMessage{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNestedDefinition_NestedMessage_NestedNestedMsgProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NestedDefinition_NestedMessage_NestedNestedMsg{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNestedDefinition_NestedMessage_NestedNestedMsgProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NestedDefinition_NestedMessage_NestedNestedMsg{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNestedScopeProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNestedScope(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NestedScope{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNestedScopeProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNestedScope(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NestedScope{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinOptNativeDefaultProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptNativeDefault(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NinOptNativeDefault{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinOptNativeDefaultProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptNativeDefault(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NinOptNativeDefault{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestCustomContainerProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomContainer(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &CustomContainer{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestCustomContainerProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomContainer(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &CustomContainer{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestCustomNameNidOptNativeProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameNidOptNative(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &CustomNameNidOptNative{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestCustomNameNidOptNativeProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameNidOptNative(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &CustomNameNidOptNative{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestCustomNameNinOptNativeProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameNinOptNative(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &CustomNameNinOptNative{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestCustomNameNinOptNativeProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameNinOptNative(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &CustomNameNinOptNative{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestCustomNameNinRepNativeProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameNinRepNative(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &CustomNameNinRepNative{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestCustomNameNinRepNativeProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameNinRepNative(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &CustomNameNinRepNative{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestCustomNameNinStructProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameNinStruct(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &CustomNameNinStruct{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestCustomNameNinStructProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameNinStruct(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &CustomNameNinStruct{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestCustomNameCustomTypeProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameCustomType(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &CustomNameCustomType{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestCustomNameCustomTypeProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameCustomType(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &CustomNameCustomType{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestCustomNameNinEmbeddedStructUnionProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameNinEmbeddedStructUnion(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &CustomNameNinEmbeddedStructUnion{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestCustomNameNinEmbeddedStructUnionProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameNinEmbeddedStructUnion(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &CustomNameNinEmbeddedStructUnion{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestCustomNameEnumProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameEnum(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &CustomNameEnum{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestCustomNameEnumProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameEnum(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &CustomNameEnum{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNoExtensionsMapProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNoExtensionsMap(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NoExtensionsMap{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNoExtensionsMapProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNoExtensionsMap(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NoExtensionsMap{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestUnrecognizedProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUnrecognized(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &Unrecognized{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestUnrecognizedProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUnrecognized(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &Unrecognized{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestUnrecognizedWithInnerProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUnrecognizedWithInner(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &UnrecognizedWithInner{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestUnrecognizedWithInnerProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUnrecognizedWithInner(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &UnrecognizedWithInner{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestUnrecognizedWithInner_InnerProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUnrecognizedWithInner_Inner(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &UnrecognizedWithInner_Inner{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestUnrecognizedWithInner_InnerProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUnrecognizedWithInner_Inner(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &UnrecognizedWithInner_Inner{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestUnrecognizedWithEmbedProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUnrecognizedWithEmbed(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &UnrecognizedWithEmbed{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestUnrecognizedWithEmbedProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUnrecognizedWithEmbed(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &UnrecognizedWithEmbed{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestUnrecognizedWithEmbed_EmbeddedProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUnrecognizedWithEmbed_Embedded(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &UnrecognizedWithEmbed_Embedded{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestUnrecognizedWithEmbed_EmbeddedProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUnrecognizedWithEmbed_Embedded(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &UnrecognizedWithEmbed_Embedded{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNodeProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNode(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &Node{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNodeProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNode(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &Node{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNidOptNativeCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidOptNative(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NidOptNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNidOptNative(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNinOptNativeCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptNative(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinOptNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNinOptNative(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNidRepNativeCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidRepNative(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NidRepNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNidRepNative(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNinRepNativeCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinRepNative(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinRepNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNinRepNative(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNidRepPackedNativeCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidRepPackedNative(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NidRepPackedNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNidRepPackedNative(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNinRepPackedNativeCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinRepPackedNative(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinRepPackedNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNinRepPackedNative(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNidOptStructCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidOptStruct(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NidOptStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNidOptStruct(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNinOptStructCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptStruct(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinOptStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNinOptStruct(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNidRepStructCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidRepStruct(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NidRepStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNidRepStruct(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNinRepStructCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinRepStruct(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinRepStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNinRepStruct(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNidEmbeddedStructCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidEmbeddedStruct(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NidEmbeddedStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNidEmbeddedStruct(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNinEmbeddedStructCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinEmbeddedStruct(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinEmbeddedStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNinEmbeddedStruct(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNidNestedStructCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidNestedStruct(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NidNestedStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNidNestedStruct(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNinNestedStructCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinNestedStruct(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinNestedStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNinNestedStruct(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNidOptCustomCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidOptCustom(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NidOptCustom{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNidOptCustom(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestCustomDashCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomDash(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &CustomDash{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedCustomDash(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNinOptCustomCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptCustom(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinOptCustom{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNinOptCustom(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNidRepCustomCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidRepCustom(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NidRepCustom{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNidRepCustom(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNinRepCustomCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinRepCustom(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinRepCustom{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNinRepCustom(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNinOptNativeUnionCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptNativeUnion(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinOptNativeUnion{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNinOptNativeUnion(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNinOptStructUnionCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptStructUnion(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinOptStructUnion{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNinOptStructUnion(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNinEmbeddedStructUnionCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinEmbeddedStructUnion(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinEmbeddedStructUnion{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNinEmbeddedStructUnion(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNinNestedStructUnionCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinNestedStructUnion(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinNestedStructUnion{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNinNestedStructUnion(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestTreeCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedTree(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &Tree{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedTree(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestOrBranchCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedOrBranch(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &OrBranch{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedOrBranch(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestAndBranchCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAndBranch(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &AndBranch{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedAndBranch(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestLeafCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedLeaf(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &Leaf{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedLeaf(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestDeepTreeCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedDeepTree(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &DeepTree{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedDeepTree(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestADeepBranchCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedADeepBranch(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &ADeepBranch{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedADeepBranch(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestAndDeepBranchCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAndDeepBranch(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &AndDeepBranch{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedAndDeepBranch(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestDeepLeafCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedDeepLeaf(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &DeepLeaf{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedDeepLeaf(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNilCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNil(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &Nil{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNil(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNidOptEnumCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidOptEnum(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NidOptEnum{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNidOptEnum(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNinOptEnumCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptEnum(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinOptEnum{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNinOptEnum(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNidRepEnumCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidRepEnum(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NidRepEnum{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNidRepEnum(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNinRepEnumCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinRepEnum(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinRepEnum{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNinRepEnum(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNinOptEnumDefaultCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptEnumDefault(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinOptEnumDefault{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNinOptEnumDefault(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestAnotherNinOptEnumCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAnotherNinOptEnum(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &AnotherNinOptEnum{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedAnotherNinOptEnum(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestAnotherNinOptEnumDefaultCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAnotherNinOptEnumDefault(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &AnotherNinOptEnumDefault{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedAnotherNinOptEnumDefault(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestTimerCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedTimer(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &Timer{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedTimer(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestMyExtendableCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedMyExtendable(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &MyExtendable{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedMyExtendable(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestOtherExtenableCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedOtherExtenable(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &OtherExtenable{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedOtherExtenable(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNestedDefinitionCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNestedDefinition(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NestedDefinition{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNestedDefinition(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNestedDefinition_NestedMessageCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNestedDefinition_NestedMessage(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NestedDefinition_NestedMessage{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNestedDefinition_NestedMessage(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNestedDefinition_NestedMessage_NestedNestedMsgCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NestedDefinition_NestedMessage_NestedNestedMsg{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNestedScopeCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNestedScope(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NestedScope{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNestedScope(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNinOptNativeDefaultCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptNativeDefault(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinOptNativeDefault{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNinOptNativeDefault(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestCustomContainerCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomContainer(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &CustomContainer{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedCustomContainer(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestCustomNameNidOptNativeCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameNidOptNative(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &CustomNameNidOptNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedCustomNameNidOptNative(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestCustomNameNinOptNativeCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameNinOptNative(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &CustomNameNinOptNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedCustomNameNinOptNative(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestCustomNameNinRepNativeCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameNinRepNative(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &CustomNameNinRepNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedCustomNameNinRepNative(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestCustomNameNinStructCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameNinStruct(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &CustomNameNinStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedCustomNameNinStruct(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestCustomNameCustomTypeCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameCustomType(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &CustomNameCustomType{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedCustomNameCustomType(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestCustomNameNinEmbeddedStructUnionCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameNinEmbeddedStructUnion(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &CustomNameNinEmbeddedStructUnion{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedCustomNameNinEmbeddedStructUnion(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestCustomNameEnumCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameEnum(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &CustomNameEnum{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedCustomNameEnum(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNoExtensionsMapCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNoExtensionsMap(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NoExtensionsMap{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNoExtensionsMap(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestUnrecognizedCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedUnrecognized(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &Unrecognized{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedUnrecognized(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestUnrecognizedWithInnerCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedUnrecognizedWithInner(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &UnrecognizedWithInner{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedUnrecognizedWithInner(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestUnrecognizedWithInner_InnerCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedUnrecognizedWithInner_Inner(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &UnrecognizedWithInner_Inner{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedUnrecognizedWithInner_Inner(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestUnrecognizedWithEmbedCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedUnrecognizedWithEmbed(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &UnrecognizedWithEmbed{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedUnrecognizedWithEmbed(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestUnrecognizedWithEmbed_EmbeddedCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedUnrecognizedWithEmbed_Embedded(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &UnrecognizedWithEmbed_Embedded{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedUnrecognizedWithEmbed_Embedded(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNodeCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNode(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &Node{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNode(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestThetestDescription(t *testing.T) { + ThetestDescription() +} +func TestNidOptNativeVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidOptNative(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NidOptNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNinOptNativeVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptNative(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinOptNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNidRepNativeVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidRepNative(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NidRepNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNinRepNativeVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinRepNative(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinRepNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNidRepPackedNativeVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidRepPackedNative(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NidRepPackedNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNinRepPackedNativeVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinRepPackedNative(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinRepPackedNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNidOptStructVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidOptStruct(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NidOptStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNinOptStructVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptStruct(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinOptStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNidRepStructVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidRepStruct(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NidRepStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNinRepStructVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinRepStruct(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinRepStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNidEmbeddedStructVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidEmbeddedStruct(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NidEmbeddedStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNinEmbeddedStructVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinEmbeddedStruct(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinEmbeddedStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNidNestedStructVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidNestedStruct(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NidNestedStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNinNestedStructVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinNestedStruct(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinNestedStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNidOptCustomVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidOptCustom(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NidOptCustom{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestCustomDashVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomDash(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &CustomDash{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNinOptCustomVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptCustom(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinOptCustom{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNidRepCustomVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidRepCustom(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NidRepCustom{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNinRepCustomVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinRepCustom(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinRepCustom{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNinOptNativeUnionVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptNativeUnion(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinOptNativeUnion{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNinOptStructUnionVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptStructUnion(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinOptStructUnion{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNinEmbeddedStructUnionVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinEmbeddedStructUnion(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinEmbeddedStructUnion{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNinNestedStructUnionVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinNestedStructUnion(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinNestedStructUnion{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestTreeVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedTree(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &Tree{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestOrBranchVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedOrBranch(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &OrBranch{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestAndBranchVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAndBranch(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &AndBranch{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestLeafVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedLeaf(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &Leaf{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestDeepTreeVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedDeepTree(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &DeepTree{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestADeepBranchVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedADeepBranch(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &ADeepBranch{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestAndDeepBranchVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAndDeepBranch(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &AndDeepBranch{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestDeepLeafVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedDeepLeaf(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &DeepLeaf{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNilVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNil(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &Nil{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNidOptEnumVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidOptEnum(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NidOptEnum{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNinOptEnumVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptEnum(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinOptEnum{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNidRepEnumVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidRepEnum(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NidRepEnum{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNinRepEnumVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinRepEnum(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinRepEnum{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNinOptEnumDefaultVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptEnumDefault(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinOptEnumDefault{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestAnotherNinOptEnumVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAnotherNinOptEnum(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &AnotherNinOptEnum{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestAnotherNinOptEnumDefaultVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAnotherNinOptEnumDefault(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &AnotherNinOptEnumDefault{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestTimerVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedTimer(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &Timer{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestMyExtendableVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedMyExtendable(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &MyExtendable{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestOtherExtenableVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedOtherExtenable(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &OtherExtenable{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNestedDefinitionVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNestedDefinition(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NestedDefinition{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNestedDefinition_NestedMessageVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNestedDefinition_NestedMessage(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NestedDefinition_NestedMessage{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNestedDefinition_NestedMessage_NestedNestedMsgVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NestedDefinition_NestedMessage_NestedNestedMsg{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNestedScopeVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNestedScope(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NestedScope{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNinOptNativeDefaultVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptNativeDefault(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinOptNativeDefault{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestCustomContainerVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomContainer(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &CustomContainer{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestCustomNameNidOptNativeVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameNidOptNative(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &CustomNameNidOptNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestCustomNameNinOptNativeVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameNinOptNative(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &CustomNameNinOptNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestCustomNameNinRepNativeVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameNinRepNative(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &CustomNameNinRepNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestCustomNameNinStructVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameNinStruct(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &CustomNameNinStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestCustomNameCustomTypeVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameCustomType(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &CustomNameCustomType{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestCustomNameNinEmbeddedStructUnionVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameNinEmbeddedStructUnion(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &CustomNameNinEmbeddedStructUnion{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestCustomNameEnumVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameEnum(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &CustomNameEnum{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNoExtensionsMapVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNoExtensionsMap(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NoExtensionsMap{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestUnrecognizedVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedUnrecognized(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &Unrecognized{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestUnrecognizedWithInnerVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedUnrecognizedWithInner(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &UnrecognizedWithInner{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestUnrecognizedWithInner_InnerVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedUnrecognizedWithInner_Inner(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &UnrecognizedWithInner_Inner{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestUnrecognizedWithEmbedVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedUnrecognizedWithEmbed(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &UnrecognizedWithEmbed{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestUnrecognizedWithEmbed_EmbeddedVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedUnrecognizedWithEmbed_Embedded(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &UnrecognizedWithEmbed_Embedded{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNodeVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNode(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &Node{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNidOptNativeFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidOptNative(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNinOptNativeFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptNative(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNidRepNativeFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidRepNative(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNinRepNativeFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinRepNative(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNidRepPackedNativeFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidRepPackedNative(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNinRepPackedNativeFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinRepPackedNative(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNidOptStructFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidOptStruct(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNinOptStructFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptStruct(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNidRepStructFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidRepStruct(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNinRepStructFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinRepStruct(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNidEmbeddedStructFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidEmbeddedStruct(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNinEmbeddedStructFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinEmbeddedStruct(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNidNestedStructFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidNestedStruct(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNinNestedStructFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinNestedStruct(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNidOptCustomFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidOptCustom(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestCustomDashFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomDash(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNinOptCustomFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptCustom(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNidRepCustomFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidRepCustom(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNinRepCustomFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinRepCustom(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNinOptNativeUnionFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptNativeUnion(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNinOptStructUnionFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptStructUnion(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNinEmbeddedStructUnionFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinEmbeddedStructUnion(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNinNestedStructUnionFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinNestedStructUnion(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestTreeFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedTree(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestOrBranchFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedOrBranch(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestAndBranchFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAndBranch(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestLeafFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedLeaf(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestDeepTreeFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedDeepTree(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestADeepBranchFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedADeepBranch(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestAndDeepBranchFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAndDeepBranch(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestDeepLeafFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedDeepLeaf(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNilFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNil(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNidOptEnumFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidOptEnum(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNinOptEnumFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptEnum(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNidRepEnumFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidRepEnum(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNinRepEnumFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinRepEnum(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestAnotherNinOptEnumFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAnotherNinOptEnum(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestTimerFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedTimer(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNestedDefinitionFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNestedDefinition(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNestedDefinition_NestedMessageFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNestedDefinition_NestedMessage(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNestedDefinition_NestedMessage_NestedNestedMsgFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNestedScopeFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNestedScope(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestCustomContainerFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomContainer(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestCustomNameNidOptNativeFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameNidOptNative(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestCustomNameNinOptNativeFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameNinOptNative(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestCustomNameNinRepNativeFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameNinRepNative(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestCustomNameNinStructFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameNinStruct(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestCustomNameCustomTypeFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameCustomType(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestCustomNameNinEmbeddedStructUnionFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameNinEmbeddedStructUnion(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestCustomNameEnumFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameEnum(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestUnrecognizedFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedUnrecognized(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestUnrecognizedWithInnerFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedUnrecognizedWithInner(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestUnrecognizedWithInner_InnerFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedUnrecognizedWithInner_Inner(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestUnrecognizedWithEmbedFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedUnrecognizedWithEmbed(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestUnrecognizedWithEmbed_EmbeddedFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedUnrecognizedWithEmbed_Embedded(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNodeFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNode(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNidOptNativeGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidOptNative(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestNinOptNativeGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptNative(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestNidRepNativeGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidRepNative(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestNinRepNativeGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinRepNative(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestNidRepPackedNativeGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidRepPackedNative(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestNinRepPackedNativeGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinRepPackedNative(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestNidOptStructGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidOptStruct(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestNinOptStructGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptStruct(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestNidRepStructGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidRepStruct(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestNinRepStructGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinRepStruct(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestNidEmbeddedStructGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidEmbeddedStruct(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestNinEmbeddedStructGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinEmbeddedStruct(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestNidNestedStructGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidNestedStruct(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestNinNestedStructGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinNestedStruct(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestNidOptCustomGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidOptCustom(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestCustomDashGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomDash(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestNinOptCustomGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptCustom(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestNidRepCustomGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidRepCustom(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestNinRepCustomGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinRepCustom(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestNinOptNativeUnionGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptNativeUnion(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestNinOptStructUnionGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptStructUnion(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestNinEmbeddedStructUnionGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinEmbeddedStructUnion(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestNinNestedStructUnionGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinNestedStructUnion(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestTreeGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedTree(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestOrBranchGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedOrBranch(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestAndBranchGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAndBranch(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestLeafGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedLeaf(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestDeepTreeGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedDeepTree(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestADeepBranchGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedADeepBranch(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestAndDeepBranchGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAndDeepBranch(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestDeepLeafGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedDeepLeaf(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestNilGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNil(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestNidOptEnumGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidOptEnum(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestNinOptEnumGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptEnum(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestNidRepEnumGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidRepEnum(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestNinRepEnumGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinRepEnum(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestNinOptEnumDefaultGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptEnumDefault(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestAnotherNinOptEnumGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAnotherNinOptEnum(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestAnotherNinOptEnumDefaultGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAnotherNinOptEnumDefault(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestTimerGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedTimer(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestMyExtendableGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedMyExtendable(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestOtherExtenableGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedOtherExtenable(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestNestedDefinitionGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNestedDefinition(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestNestedDefinition_NestedMessageGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNestedDefinition_NestedMessage(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestNestedDefinition_NestedMessage_NestedNestedMsgGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestNestedScopeGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNestedScope(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestNinOptNativeDefaultGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptNativeDefault(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestCustomContainerGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomContainer(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestCustomNameNidOptNativeGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameNidOptNative(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestCustomNameNinOptNativeGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameNinOptNative(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestCustomNameNinRepNativeGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameNinRepNative(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestCustomNameNinStructGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameNinStruct(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestCustomNameCustomTypeGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameCustomType(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestCustomNameNinEmbeddedStructUnionGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameNinEmbeddedStructUnion(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestCustomNameEnumGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameEnum(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestNoExtensionsMapGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNoExtensionsMap(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestUnrecognizedGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedUnrecognized(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestUnrecognizedWithInnerGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedUnrecognizedWithInner(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestUnrecognizedWithInner_InnerGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedUnrecognizedWithInner_Inner(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestUnrecognizedWithEmbedGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedUnrecognizedWithEmbed(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestUnrecognizedWithEmbed_EmbeddedGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedUnrecognizedWithEmbed_Embedded(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestNodeGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNode(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestNidOptNativeSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidOptNative(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNidOptNativeSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NidOptNative, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNidOptNative(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinOptNativeSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptNative(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNinOptNativeSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinOptNative, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNinOptNative(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNidRepNativeSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepNative(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNidRepNativeSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NidRepNative, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNidRepNative(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinRepNativeSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepNative(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNinRepNativeSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinRepNative, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNinRepNative(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNidRepPackedNativeSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepPackedNative(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNidRepPackedNativeSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NidRepPackedNative, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNidRepPackedNative(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinRepPackedNativeSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepPackedNative(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNinRepPackedNativeSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinRepPackedNative, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNinRepPackedNative(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNidOptStructSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidOptStruct(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNidOptStructSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NidOptStruct, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNidOptStruct(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinOptStructSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptStruct(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNinOptStructSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinOptStruct, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNinOptStruct(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNidRepStructSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepStruct(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNidRepStructSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NidRepStruct, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNidRepStruct(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinRepStructSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepStruct(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNinRepStructSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinRepStruct, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNinRepStruct(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNidEmbeddedStructSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidEmbeddedStruct(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNidEmbeddedStructSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NidEmbeddedStruct, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNidEmbeddedStruct(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinEmbeddedStructSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinEmbeddedStruct(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNinEmbeddedStructSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinEmbeddedStruct, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNinEmbeddedStruct(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNidNestedStructSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidNestedStruct(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNidNestedStructSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NidNestedStruct, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNidNestedStruct(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinNestedStructSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinNestedStruct(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNinNestedStructSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinNestedStruct, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNinNestedStruct(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNidOptCustomSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidOptCustom(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNidOptCustomSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NidOptCustom, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNidOptCustom(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestCustomDashSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomDash(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkCustomDashSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*CustomDash, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedCustomDash(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinOptCustomSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptCustom(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNinOptCustomSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinOptCustom, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNinOptCustom(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNidRepCustomSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepCustom(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNidRepCustomSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NidRepCustom, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNidRepCustom(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinRepCustomSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepCustom(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNinRepCustomSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinRepCustom, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNinRepCustom(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinOptNativeUnionSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptNativeUnion(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNinOptNativeUnionSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinOptNativeUnion, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNinOptNativeUnion(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinOptStructUnionSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptStructUnion(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNinOptStructUnionSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinOptStructUnion, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNinOptStructUnion(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinEmbeddedStructUnionSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinEmbeddedStructUnion(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNinEmbeddedStructUnionSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinEmbeddedStructUnion, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNinEmbeddedStructUnion(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinNestedStructUnionSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinNestedStructUnion(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNinNestedStructUnionSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinNestedStructUnion, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNinNestedStructUnion(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestTreeSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedTree(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkTreeSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Tree, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedTree(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestOrBranchSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedOrBranch(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkOrBranchSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*OrBranch, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedOrBranch(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestAndBranchSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAndBranch(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkAndBranchSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*AndBranch, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedAndBranch(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestLeafSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedLeaf(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkLeafSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Leaf, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedLeaf(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestDeepTreeSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedDeepTree(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkDeepTreeSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*DeepTree, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedDeepTree(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestADeepBranchSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedADeepBranch(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkADeepBranchSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*ADeepBranch, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedADeepBranch(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestAndDeepBranchSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAndDeepBranch(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkAndDeepBranchSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*AndDeepBranch, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedAndDeepBranch(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestDeepLeafSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedDeepLeaf(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkDeepLeafSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*DeepLeaf, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedDeepLeaf(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNilSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNil(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNilSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Nil, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNil(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNidOptEnumSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidOptEnum(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNidOptEnumSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NidOptEnum, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNidOptEnum(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinOptEnumSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptEnum(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNinOptEnumSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinOptEnum, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNinOptEnum(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNidRepEnumSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepEnum(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNidRepEnumSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NidRepEnum, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNidRepEnum(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinRepEnumSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepEnum(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNinRepEnumSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinRepEnum, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNinRepEnum(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinOptEnumDefaultSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptEnumDefault(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNinOptEnumDefaultSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinOptEnumDefault, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNinOptEnumDefault(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestAnotherNinOptEnumSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAnotherNinOptEnum(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkAnotherNinOptEnumSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*AnotherNinOptEnum, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedAnotherNinOptEnum(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestAnotherNinOptEnumDefaultSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAnotherNinOptEnumDefault(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkAnotherNinOptEnumDefaultSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*AnotherNinOptEnumDefault, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedAnotherNinOptEnumDefault(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestTimerSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedTimer(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkTimerSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Timer, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedTimer(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestMyExtendableSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMyExtendable(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkMyExtendableSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*MyExtendable, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedMyExtendable(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestOtherExtenableSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedOtherExtenable(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkOtherExtenableSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*OtherExtenable, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedOtherExtenable(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNestedDefinitionSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNestedDefinition(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNestedDefinitionSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NestedDefinition, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNestedDefinition(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNestedDefinition_NestedMessageSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNestedDefinition_NestedMessage(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNestedDefinition_NestedMessageSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NestedDefinition_NestedMessage, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNestedDefinition_NestedMessage(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNestedDefinition_NestedMessage_NestedNestedMsgSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNestedDefinition_NestedMessage_NestedNestedMsgSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NestedDefinition_NestedMessage_NestedNestedMsg, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNestedScopeSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNestedScope(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNestedScopeSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NestedScope, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNestedScope(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinOptNativeDefaultSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptNativeDefault(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNinOptNativeDefaultSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinOptNativeDefault, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNinOptNativeDefault(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestCustomContainerSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomContainer(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkCustomContainerSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*CustomContainer, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedCustomContainer(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestCustomNameNidOptNativeSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameNidOptNative(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkCustomNameNidOptNativeSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*CustomNameNidOptNative, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedCustomNameNidOptNative(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestCustomNameNinOptNativeSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameNinOptNative(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkCustomNameNinOptNativeSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*CustomNameNinOptNative, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedCustomNameNinOptNative(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestCustomNameNinRepNativeSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameNinRepNative(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkCustomNameNinRepNativeSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*CustomNameNinRepNative, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedCustomNameNinRepNative(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestCustomNameNinStructSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameNinStruct(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkCustomNameNinStructSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*CustomNameNinStruct, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedCustomNameNinStruct(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestCustomNameCustomTypeSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameCustomType(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkCustomNameCustomTypeSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*CustomNameCustomType, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedCustomNameCustomType(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestCustomNameNinEmbeddedStructUnionSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameNinEmbeddedStructUnion(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkCustomNameNinEmbeddedStructUnionSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*CustomNameNinEmbeddedStructUnion, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedCustomNameNinEmbeddedStructUnion(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestCustomNameEnumSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameEnum(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkCustomNameEnumSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*CustomNameEnum, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedCustomNameEnum(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNoExtensionsMapSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNoExtensionsMap(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNoExtensionsMapSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NoExtensionsMap, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNoExtensionsMap(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestUnrecognizedSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUnrecognized(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkUnrecognizedSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Unrecognized, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedUnrecognized(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestUnrecognizedWithInnerSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUnrecognizedWithInner(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkUnrecognizedWithInnerSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*UnrecognizedWithInner, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedUnrecognizedWithInner(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestUnrecognizedWithInner_InnerSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUnrecognizedWithInner_Inner(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkUnrecognizedWithInner_InnerSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*UnrecognizedWithInner_Inner, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedUnrecognizedWithInner_Inner(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestUnrecognizedWithEmbedSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUnrecognizedWithEmbed(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkUnrecognizedWithEmbedSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*UnrecognizedWithEmbed, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedUnrecognizedWithEmbed(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestUnrecognizedWithEmbed_EmbeddedSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUnrecognizedWithEmbed_Embedded(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkUnrecognizedWithEmbed_EmbeddedSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*UnrecognizedWithEmbed_Embedded, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedUnrecognizedWithEmbed_Embedded(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNodeSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNode(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNodeSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Node, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNode(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNidOptNativeStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidOptNative(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNinOptNativeStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptNative(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNidRepNativeStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidRepNative(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNinRepNativeStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinRepNative(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNidRepPackedNativeStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidRepPackedNative(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNinRepPackedNativeStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinRepPackedNative(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNidOptStructStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidOptStruct(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNinOptStructStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptStruct(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNidRepStructStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidRepStruct(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNinRepStructStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinRepStruct(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNidEmbeddedStructStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidEmbeddedStruct(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNinEmbeddedStructStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinEmbeddedStruct(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNidNestedStructStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidNestedStruct(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNinNestedStructStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinNestedStruct(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNidOptCustomStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidOptCustom(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestCustomDashStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomDash(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNinOptCustomStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptCustom(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNidRepCustomStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidRepCustom(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNinRepCustomStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinRepCustom(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNinOptNativeUnionStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptNativeUnion(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNinOptStructUnionStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptStructUnion(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNinEmbeddedStructUnionStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinEmbeddedStructUnion(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNinNestedStructUnionStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinNestedStructUnion(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestTreeStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedTree(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestOrBranchStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedOrBranch(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestAndBranchStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAndBranch(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestLeafStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedLeaf(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestDeepTreeStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedDeepTree(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestADeepBranchStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedADeepBranch(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestAndDeepBranchStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAndDeepBranch(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestDeepLeafStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedDeepLeaf(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNilStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNil(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNidOptEnumStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidOptEnum(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNinOptEnumStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptEnum(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNidRepEnumStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidRepEnum(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNinRepEnumStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinRepEnum(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNinOptEnumDefaultStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptEnumDefault(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestAnotherNinOptEnumStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAnotherNinOptEnum(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestAnotherNinOptEnumDefaultStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAnotherNinOptEnumDefault(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestTimerStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedTimer(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestMyExtendableStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedMyExtendable(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestOtherExtenableStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedOtherExtenable(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNestedDefinitionStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNestedDefinition(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNestedDefinition_NestedMessageStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNestedDefinition_NestedMessage(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNestedDefinition_NestedMessage_NestedNestedMsgStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNestedScopeStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNestedScope(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNinOptNativeDefaultStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptNativeDefault(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestCustomContainerStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomContainer(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestCustomNameNidOptNativeStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameNidOptNative(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestCustomNameNinOptNativeStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameNinOptNative(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestCustomNameNinRepNativeStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameNinRepNative(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestCustomNameNinStructStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameNinStruct(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestCustomNameCustomTypeStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameCustomType(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestCustomNameNinEmbeddedStructUnionStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameNinEmbeddedStructUnion(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestCustomNameEnumStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameEnum(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNoExtensionsMapStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNoExtensionsMap(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestUnrecognizedStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedUnrecognized(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestUnrecognizedWithInnerStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedUnrecognizedWithInner(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestUnrecognizedWithInner_InnerStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedUnrecognizedWithInner_Inner(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestUnrecognizedWithEmbedStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedUnrecognizedWithEmbed(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestUnrecognizedWithEmbed_EmbeddedStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedUnrecognizedWithEmbed_Embedded(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNodeStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNode(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNinOptNativeUnionOnlyOne(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptNativeUnion(popr, true) + v := p.GetValue() + msg := &NinOptNativeUnion{} + if !msg.SetValue(v) { + t.Fatalf("OnlyOne: Could not set Value") + } + if !p.Equal(msg) { + t.Fatalf("%#v !OnlyOne Equal %#v", msg, p) + } +} +func TestNinOptStructUnionOnlyOne(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptStructUnion(popr, true) + v := p.GetValue() + msg := &NinOptStructUnion{} + if !msg.SetValue(v) { + t.Fatalf("OnlyOne: Could not set Value") + } + if !p.Equal(msg) { + t.Fatalf("%#v !OnlyOne Equal %#v", msg, p) + } +} +func TestNinEmbeddedStructUnionOnlyOne(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinEmbeddedStructUnion(popr, true) + v := p.GetValue() + msg := &NinEmbeddedStructUnion{} + if !msg.SetValue(v) { + t.Fatalf("OnlyOne: Could not set Value") + } + if !p.Equal(msg) { + t.Fatalf("%#v !OnlyOne Equal %#v", msg, p) + } +} +func TestNinNestedStructUnionOnlyOne(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinNestedStructUnion(popr, true) + v := p.GetValue() + msg := &NinNestedStructUnion{} + if !msg.SetValue(v) { + t.Fatalf("OnlyOne: Could not set Value") + } + if !p.Equal(msg) { + t.Fatalf("%#v !OnlyOne Equal %#v", msg, p) + } +} +func TestTreeOnlyOne(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedTree(popr, true) + v := p.GetValue() + msg := &Tree{} + if !msg.SetValue(v) { + t.Fatalf("OnlyOne: Could not set Value") + } + if !p.Equal(msg) { + t.Fatalf("%#v !OnlyOne Equal %#v", msg, p) + } +} +func TestDeepTreeOnlyOne(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedDeepTree(popr, true) + v := p.GetValue() + msg := &DeepTree{} + if !msg.SetValue(v) { + t.Fatalf("OnlyOne: Could not set Value") + } + if !p.Equal(msg) { + t.Fatalf("%#v !OnlyOne Equal %#v", msg, p) + } +} +func TestCustomNameNinEmbeddedStructUnionOnlyOne(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameNinEmbeddedStructUnion(popr, true) + v := p.GetValue() + msg := &CustomNameNinEmbeddedStructUnion{} + if !msg.SetValue(v) { + t.Fatalf("OnlyOne: Could not set Value") + } + if !p.Equal(msg) { + t.Fatalf("%#v !OnlyOne Equal %#v", msg, p) + } +} + +//These tests are generated by github.com/gogo/protobuf/plugin/testgen diff --git a/vendor/github.com/gogo/protobuf/test/combos/marshaler/uuid.go b/vendor/github.com/gogo/protobuf/test/combos/marshaler/uuid.go new file mode 100644 index 000000000..760111191 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/combos/marshaler/uuid.go @@ -0,0 +1,126 @@ +// Extensions for Protocol Buffers to create more go like structures. +// +// Copyright (c) 2013, Vastech SA (PTY) LTD. All rights reserved. +// http://github.com/gogo/protobuf/gogoproto +// +// 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 test + +import ( + "bytes" + "encoding/json" +) + +func PutLittleEndianUint64(b []byte, offset int, v uint64) { + b[offset] = byte(v) + b[offset+1] = byte(v >> 8) + b[offset+2] = byte(v >> 16) + b[offset+3] = byte(v >> 24) + b[offset+4] = byte(v >> 32) + b[offset+5] = byte(v >> 40) + b[offset+6] = byte(v >> 48) + b[offset+7] = byte(v >> 56) +} + +type Uuid []byte + +func (uuid Uuid) Marshal() ([]byte, error) { + if len(uuid) == 0 { + return nil, nil + } + return []byte(uuid), nil +} + +func (uuid Uuid) MarshalTo(data []byte) (n int, err error) { + if len(uuid) == 0 { + return 0, nil + } + copy(data, uuid) + return 16, nil +} + +func (uuid *Uuid) Unmarshal(data []byte) error { + if len(data) == 0 { + uuid = nil + return nil + } + id := Uuid(make([]byte, 16)) + copy(id, data) + *uuid = id + return nil +} + +func (uuid *Uuid) Size() int { + if uuid == nil { + return 0 + } + if len(*uuid) == 0 { + return 0 + } + return 16 +} + +func (uuid Uuid) MarshalJSON() ([]byte, error) { + return json.Marshal([]byte(uuid)) +} + +func (uuid *Uuid) UnmarshalJSON(data []byte) error { + v := new([]byte) + err := json.Unmarshal(data, v) + if err != nil { + return err + } + return uuid.Unmarshal(*v) +} + +func (uuid Uuid) Equal(other Uuid) bool { + return bytes.Equal(uuid[0:], other[0:]) +} + +func (uuid Uuid) Compare(other Uuid) int { + return bytes.Compare(uuid[0:], other[0:]) +} + +type int63 interface { + Int63() int64 +} + +func NewPopulatedUuid(r int63) *Uuid { + u := RandV4(r) + return &u +} + +func RandV4(r int63) Uuid { + uuid := make(Uuid, 16) + uuid.RandV4(r) + return uuid +} + +func (uuid Uuid) RandV4(r int63) { + PutLittleEndianUint64(uuid, 0, uint64(r.Int63())) + PutLittleEndianUint64(uuid, 8, uint64(r.Int63())) + uuid[6] = (uuid[6] & 0xf) | 0x40 + uuid[8] = (uuid[8] & 0x3f) | 0x80 +} diff --git a/vendor/github.com/gogo/protobuf/test/combos/unmarshaler/bug_test.go b/vendor/github.com/gogo/protobuf/test/combos/unmarshaler/bug_test.go new file mode 100644 index 000000000..2386c48e5 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/combos/unmarshaler/bug_test.go @@ -0,0 +1,250 @@ +// Copyright (c) 2013, Vastech SA (PTY) LTD. All rights reserved. +// http://github.com/gogo/protobuf/gogoproto +// +// 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 test + +import ( + "fmt" + "math" + "math/rand" + "testing" + "time" + + "github.com/gogo/protobuf/proto" +) + +//http://code.google.com/p/goprotobuf/issues/detail?id=39 +func TestBugUint32VarintSize(t *testing.T) { + temp := uint32(math.MaxUint32) + n := &NinOptNative{} + n.Field5 = &temp + data, err := proto.Marshal(n) + if err != nil { + panic(err) + } + if len(data) != 6 { + t.Fatalf("data should be length 6, but its %#v", data) + } +} + +func TestBugZeroLengthSliceSize(t *testing.T) { + n := &NinRepPackedNative{ + Field8: []int64{}, + } + size := n.Size() + data, err := proto.Marshal(n) + if err != nil { + panic(err) + } + if len(data) != size { + t.Fatalf("expected %v, but got %v", len(data), size) + } +} + +//http://code.google.com/p/goprotobuf/issues/detail?id=40 +func TestBugPackedProtoSize(t *testing.T) { + n := &NinRepPackedNative{ + Field4: []int64{172960727389894724, 2360337516664475010, 860833876131988189, 9068073014890763245, 7794843386260381831, 4023536436053141786, 8992311247496919020, 4330096163611305776, 4490411416244976467, 7873947349172707443, 2754969595834279669, 1360667855926938684, 4771480785172657389, 4875578924966668055, 8070579869808877481, 9128179594766551001, 4630419407064527516, 863844540220372892, 8208727650143073487, 7086117356301045838, 7779695211931506151, 5493835345187563535, 9119767633370806007, 9054342025895349248, 1887303228838508438, 7624573031734528281, 1874668389749611225, 3517684643468970593, 6677697606628877758, 7293473953189936168, 444475066704085538, 8594971141363049302, 1146643249094989673, 733393306232853371, 7721178528893916886, 7784452000911004429, 6436373110242711440, 6897422461738321237, 8772249155667732778, 6211871464311393541, 3061903718310406883, 7845488913176136641, 8342255034663902574, 3443058984649725748, 8410801047334832902, 7496541071517841153, 4305416923521577765, 7814967600020476457, 8671843803465481186, 3490266370361096855, 1447425664719091336, 653218597262334239, 8306243902880091940, 7851896059762409081, 5936760560798954978, 5755724498441478025, 7022701569985035966, 3707709584811468220, 529069456924666920, 7986469043681522462, 3092513330689518836, 5103541550470476202, 3577384161242626406, 3733428084624703294, 8388690542440473117, 3262468785346149388, 8788358556558007570, 5476276940198542020, 7277903243119461239, 5065861426928605020, 7533460976202697734, 1749213838654236956, 557497603941617931, 5496307611456481108, 6444547750062831720, 6992758776744205596, 7356719693428537399, 2896328872476734507, 381447079530132038, 598300737753233118, 3687980626612697715, 7240924191084283349, 8172414415307971170, 4847024388701257185, 2081764168600256551, 3394217778539123488, 6244660626429310923, 8301712215675381614, 5360615125359461174, 8410140945829785773, 3152963269026381373, 6197275282781459633, 4419829061407546410, 6262035523070047537, 2837207483933463885, 2158105736666826128, 8150764172235490711}, + Field7: []int32{249451845, 1409974015, 393609128, 435232428, 1817529040, 91769006, 861170933, 1556185603, 1568580279, 1236375273, 512276621, 693633711, 967580535, 1950715977, 853431462, 1362390253, 159591204, 111900629, 322985263, 279671129, 1592548430, 465651370, 733849989, 1172059400, 1574824441, 263541092, 1271612397, 1520584358, 467078791, 117698716, 1098255064, 2054264846, 1766452305, 1267576395, 1557505617, 1187833560, 956187431, 1970977586, 1160235159, 1610259028, 489585797, 459139078, 566263183, 954319278, 1545018565, 1753946743, 948214318, 422878159, 883926576, 1424009347, 824732372, 1290433180, 80297942, 417294230, 1402647904, 2078392782, 220505045, 787368129, 463781454, 293083578, 808156928, 293976361}, + Field9: []uint32{0xaa4976e8, 0x3da8cc4c, 0x8c470d83, 0x344d964e, 0x5b90925, 0xa4c4d34e, 0x666eff19, 0xc238e552, 0x9be53bb6, 0x56364245, 0x33ee079d, 0x96bf0ede, 0x7941b74f, 0xdb07cb47, 0x6d76d827, 0x9b211d5d, 0x2798adb6, 0xe48b0c3b, 0x87061b21, 0x48f4e4d2, 0x3e5d5c12, 0x5ee91288, 0x336d4f35, 0xe1d44941, 0xc065548d, 0x2953d73f, 0x873af451, 0xfc769db, 0x9f1bf8da, 0x9baafdfc, 0xf1d3d770, 0x5bb5d2b4, 0xc2c67c48, 0x6845c4c1, 0xa48f32b0, 0xbb04bb70, 0xa5b1ca36, 0x8d98356a, 0x2171f654, 0x5ae279b0, 0x6c4a3d6b, 0x4fff5468, 0xcf9bf851, 0x68513614, 0xdbecd9b0, 0x9553ed3c, 0xa494a736, 0x42205438, 0xbf8e5caa, 0xd3283c6, 0x76d20788, 0x9179826f, 0x96b24f85, 0xbc2eacf4, 0xe4afae0b, 0x4bca85cb, 0x35e63b5b, 0xd7ccee0c, 0x2b506bb9, 0xe78e9f44, 0x9ad232f1, 0x99a37335, 0xa5d6ffc8}, + Field11: []uint64{0x53c01ebc, 0x4fb85ba6, 0x8805eea1, 0xb20ec896, 0x93b63410, 0xec7c9492, 0x50765a28, 0x19592106, 0x2ecc59b3, 0x39cd474f, 0xe4c9e47, 0x444f48c5, 0xe7731d32, 0xf3f43975, 0x603caedd, 0xbb05a1af, 0xa808e34e, 0x88580b07, 0x4c96bbd1, 0x730b4ab9, 0xed126e2b, 0x6db48205, 0x154ba1b9, 0xc26bfb6a, 0x389aa052, 0x869d966c, 0x7c86b366, 0xcc8edbcd, 0xfa8d6dad, 0xcf5857d9, 0x2d9cda0f, 0x1218a0b8, 0x41bf997, 0xf0ca65ac, 0xa610d4b9, 0x8d362e28, 0xb7212d87, 0x8e0fe109, 0xbee041d9, 0x759be2f6, 0x35fef4f3, 0xaeacdb71, 0x10888852, 0xf4e28117, 0xe2a14812, 0x73b748dc, 0xd1c3c6b2, 0xfef41bf0, 0xc9b43b62, 0x810e4faa, 0xcaa41c06, 0x1893fe0d, 0xedc7c850, 0xd12b9eaa, 0x467ee1a9, 0xbe84756b, 0xda7b1680, 0xdc069ffe, 0xf1e7e9f9, 0xb3d95370, 0xa92b77df, 0x5693ac41, 0xd04b7287, 0x27aebf15, 0x837b316e, 0x4dbe2263, 0xbab70c67, 0x547dab21, 0x3c346c1f, 0xb8ef0e4e, 0xfe2d03ce, 0xe1d75955, 0xfec1306, 0xba35c23e, 0xb784ed04, 0x2a4e33aa, 0x7e19d09a, 0x3827c1fe, 0xf3a51561, 0xef765e2b, 0xb044256c, 0x62b322be, 0xf34d56be, 0xeb71b369, 0xffe1294f, 0x237fe8d0, 0x77a1473b, 0x239e1196, 0xdd19bf3d, 0x82c91fe1, 0x95361c57, 0xffea3f1b, 0x1a094c84}, + Field12: []int64{8308420747267165049, 3664160795077875961, 7868970059161834817, 7237335984251173739, 5254748003907196506, 3362259627111837480, 430460752854552122, 5119635556501066533, 1277716037866233522, 9185775384759813768, 833932430882717888, 7986528304451297640, 6792233378368656337, 2074207091120609721, 1788723326198279432, 7756514594746453657, 2283775964901597324, 3061497730110517191, 7733947890656120277, 626967303632386244, 7822928600388582821, 3489658753000061230, 168869995163005961, 248814782163480763, 477885608911386247, 4198422415674133867, 3379354662797976109, 9925112544736939, 1486335136459138480, 4561560414032850671, 1010864164014091267, 186722821683803084, 5106357936724819318, 1298160820191228988, 4675403242419953145, 7130634540106489752, 7101280006672440929, 7176058292431955718, 9109875054097770321, 6810974877085322872, 4736707874303993641, 8993135362721382187, 6857881554990254283, 3704748883307461680, 1099360832887634994, 5207691918707192633, 5984721695043995243}, + } + size := proto.Size(n) + data, err := proto.Marshal(n) + if err != nil { + panic(err) + } + if len(data) != size { + t.Fatalf("expected %v, but got %v diff is %v", len(data), size, len(data)-size) + } +} + +func testSize(m interface { + proto.Message + Size() int +}, desc string, expected int) ([]byte, error) { + data, err := proto.Marshal(m) + if err != nil { + return nil, err + } + protoSize := proto.Size(m) + mSize := m.Size() + lenData := len(data) + if protoSize != mSize || protoSize != lenData || mSize != lenData { + return nil, fmt.Errorf("%s proto.Size(m){%d} != m.Size(){%d} != len(data){%d}", desc, protoSize, mSize, lenData) + } + if got := protoSize; got != expected { + return nil, fmt.Errorf("%s proto.Size(m) got %d expected %d", desc, got, expected) + } + if got := mSize; got != expected { + return nil, fmt.Errorf("%s m.Size() got %d expected %d", desc, got, expected) + } + if got := lenData; got != expected { + return nil, fmt.Errorf("%s len(data) got %d expected %d", desc, got, expected) + } + return data, nil +} + +func TestInt32Int64Compatibility(t *testing.T) { + + //test nullable int32 and int64 + + data1, err := testSize(&NinOptNative{ + Field3: proto.Int32(-1), + }, "nullable", 11) + if err != nil { + t.Error(err) + } + //change marshaled data1 to unmarshal into 4th field which is an int64 + data1[0] = uint8(uint32(4 /*fieldNumber*/)<<3 | uint32(0 /*wireType*/)) + u1 := &NinOptNative{} + if err = proto.Unmarshal(data1, u1); err != nil { + t.Error(err) + } + if !u1.Equal(&NinOptNative{ + Field4: proto.Int64(-1), + }) { + t.Error("nullable unmarshaled int32 is not the same int64") + } + + //test non-nullable int32 and int64 + + data2, err := testSize(&NidOptNative{ + Field3: -1, + }, "non nullable", 67) + if err != nil { + t.Error(err) + } + //change marshaled data2 to unmarshal into 4th field which is an int64 + field3 := uint8(uint32(3 /*fieldNumber*/)<<3 | uint32(0 /*wireType*/)) + field4 := uint8(uint32(4 /*fieldNumber*/)<<3 | uint32(0 /*wireType*/)) + for i, c := range data2 { + if c == field4 { + data2[i] = field3 + } else if c == field3 { + data2[i] = field4 + } + } + u2 := &NidOptNative{} + if err = proto.Unmarshal(data2, u2); err != nil { + t.Error(err) + } + if !u2.Equal(&NidOptNative{ + Field4: -1, + }) { + t.Error("non nullable unmarshaled int32 is not the same int64") + } + + //test packed repeated int32 and int64 + + m4 := &NinRepPackedNative{ + Field3: []int32{-1}, + } + data4, err := testSize(m4, "packed", 12) + if err != nil { + t.Error(err) + } + u4 := &NinRepPackedNative{} + if err := proto.Unmarshal(data4, u4); err != nil { + t.Error(err) + } + if err := u4.VerboseEqual(m4); err != nil { + t.Fatalf("%#v", u4) + } + + //test repeated int32 and int64 + + if _, err := testSize(&NinRepNative{ + Field3: []int32{-1}, + }, "repeated", 11); err != nil { + t.Error(err) + } + + t.Logf("tested all") +} + +func TestRepeatedExtensionsMsgsIssue161(t *testing.T) { + r := rand.New(rand.NewSource(time.Now().UnixNano())) + rep := 10 + nins := make([]*NinOptNative, rep) + for i := range nins { + nins[i] = NewPopulatedNinOptNative(r, true) + } + input := &MyExtendable{} + if err := proto.SetExtension(input, E_FieldE, nins); err != nil { + t.Fatal(err) + } + data, err := proto.Marshal(input) + if err != nil { + t.Fatal(err) + } + output := &MyExtendable{} + if err := proto.Unmarshal(data, output); err != nil { + t.Fatal(err) + } + if !input.Equal(output) { + t.Fatal("expected equal") + } + data2, err2 := proto.Marshal(output) + if err2 != nil { + t.Fatal(err2) + } + if len(data) != len(data2) { + t.Fatal("expected equal length buffers") + } +} + +func TestRepeatedExtensionsFieldsIssue161(t *testing.T) { + r := rand.New(rand.NewSource(time.Now().UnixNano())) + rep := 10 + ints := make([]int64, rep) + for i := range ints { + ints[i] = r.Int63() + } + input := &MyExtendable{} + if err := proto.SetExtension(input, E_FieldD, ints); err != nil { + t.Fatal(err) + } + data, err := proto.Marshal(input) + if err != nil { + t.Fatal(err) + } + output := &MyExtendable{} + if err := proto.Unmarshal(data, output); err != nil { + t.Fatal(err) + } + if !input.Equal(output) { + t.Fatal("expected equal") + } + data2, err2 := proto.Marshal(output) + if err2 != nil { + t.Fatal(err2) + } + if len(data) != len(data2) { + t.Fatal("expected equal length buffers") + } +} diff --git a/vendor/github.com/gogo/protobuf/test/combos/unmarshaler/thetest.pb.go b/vendor/github.com/gogo/protobuf/test/combos/unmarshaler/thetest.pb.go new file mode 100644 index 000000000..76069b919 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/combos/unmarshaler/thetest.pb.go @@ -0,0 +1,36193 @@ +// Code generated by protoc-gen-gogo. +// source: combos/unmarshaler/thetest.proto +// DO NOT EDIT! + +/* + Package test is a generated protocol buffer package. + + It is generated from these files: + combos/unmarshaler/thetest.proto + + It has these top-level messages: + NidOptNative + NinOptNative + NidRepNative + NinRepNative + NidRepPackedNative + NinRepPackedNative + NidOptStruct + NinOptStruct + NidRepStruct + NinRepStruct + NidEmbeddedStruct + NinEmbeddedStruct + NidNestedStruct + NinNestedStruct + NidOptCustom + CustomDash + NinOptCustom + NidRepCustom + NinRepCustom + NinOptNativeUnion + NinOptStructUnion + NinEmbeddedStructUnion + NinNestedStructUnion + Tree + OrBranch + AndBranch + Leaf + DeepTree + ADeepBranch + AndDeepBranch + DeepLeaf + Nil + NidOptEnum + NinOptEnum + NidRepEnum + NinRepEnum + NinOptEnumDefault + AnotherNinOptEnum + AnotherNinOptEnumDefault + Timer + MyExtendable + OtherExtenable + NestedDefinition + NestedScope + NinOptNativeDefault + CustomContainer + CustomNameNidOptNative + CustomNameNinOptNative + CustomNameNinRepNative + CustomNameNinStruct + CustomNameCustomType + CustomNameNinEmbeddedStructUnion + CustomNameEnum + NoExtensionsMap + Unrecognized + UnrecognizedWithInner + UnrecognizedWithEmbed + Node +*/ +package test + +import proto "github.com/gogo/protobuf/proto" +import fmt "fmt" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" + +import github_com_gogo_protobuf_test_custom "github.com/gogo/protobuf/test/custom" +import github_com_gogo_protobuf_test_custom_dash_type "github.com/gogo/protobuf/test/custom-dash-type" + +import bytes "bytes" +import github_com_gogo_protobuf_sortkeys "github.com/gogo/protobuf/sortkeys" + +import github_com_gogo_protobuf_protoc_gen_gogo_descriptor "github.com/gogo/protobuf/protoc-gen-gogo/descriptor" +import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" +import compress_gzip "compress/gzip" +import io_ioutil "io/ioutil" + +import strconv "strconv" + +import strings "strings" +import sort "sort" +import reflect "reflect" + +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. +const _ = proto.GoGoProtoPackageIsVersion1 + +type TheTestEnum int32 + +const ( + A TheTestEnum = 0 + B TheTestEnum = 1 + C TheTestEnum = 2 +) + +var TheTestEnum_name = map[int32]string{ + 0: "A", + 1: "B", + 2: "C", +} +var TheTestEnum_value = map[string]int32{ + "A": 0, + "B": 1, + "C": 2, +} + +func (x TheTestEnum) Enum() *TheTestEnum { + p := new(TheTestEnum) + *p = x + return p +} +func (x TheTestEnum) MarshalJSON() ([]byte, error) { + return proto.MarshalJSONEnum(TheTestEnum_name, int32(x)) +} +func (x *TheTestEnum) UnmarshalJSON(data []byte) error { + value, err := proto.UnmarshalJSONEnum(TheTestEnum_value, data, "TheTestEnum") + if err != nil { + return err + } + *x = TheTestEnum(value) + return nil +} +func (TheTestEnum) EnumDescriptor() ([]byte, []int) { return fileDescriptorThetest, []int{0} } + +type AnotherTestEnum int32 + +const ( + D AnotherTestEnum = 10 + E AnotherTestEnum = 11 +) + +var AnotherTestEnum_name = map[int32]string{ + 10: "D", + 11: "E", +} +var AnotherTestEnum_value = map[string]int32{ + "D": 10, + "E": 11, +} + +func (x AnotherTestEnum) Enum() *AnotherTestEnum { + p := new(AnotherTestEnum) + *p = x + return p +} +func (x AnotherTestEnum) MarshalJSON() ([]byte, error) { + return proto.MarshalJSONEnum(AnotherTestEnum_name, int32(x)) +} +func (x *AnotherTestEnum) UnmarshalJSON(data []byte) error { + value, err := proto.UnmarshalJSONEnum(AnotherTestEnum_value, data, "AnotherTestEnum") + if err != nil { + return err + } + *x = AnotherTestEnum(value) + return nil +} +func (AnotherTestEnum) EnumDescriptor() ([]byte, []int) { return fileDescriptorThetest, []int{1} } + +// YetAnotherTestEnum is used to test cross-package import of custom name +// fields and default resolution. +type YetAnotherTestEnum int32 + +const ( + AA YetAnotherTestEnum = 0 + BetterYetBB YetAnotherTestEnum = 1 +) + +var YetAnotherTestEnum_name = map[int32]string{ + 0: "AA", + 1: "BB", +} +var YetAnotherTestEnum_value = map[string]int32{ + "AA": 0, + "BB": 1, +} + +func (x YetAnotherTestEnum) Enum() *YetAnotherTestEnum { + p := new(YetAnotherTestEnum) + *p = x + return p +} +func (x YetAnotherTestEnum) MarshalJSON() ([]byte, error) { + return proto.MarshalJSONEnum(YetAnotherTestEnum_name, int32(x)) +} +func (x *YetAnotherTestEnum) UnmarshalJSON(data []byte) error { + value, err := proto.UnmarshalJSONEnum(YetAnotherTestEnum_value, data, "YetAnotherTestEnum") + if err != nil { + return err + } + *x = YetAnotherTestEnum(value) + return nil +} +func (YetAnotherTestEnum) EnumDescriptor() ([]byte, []int) { return fileDescriptorThetest, []int{2} } + +// YetAnotherTestEnum is used to test cross-package import of custom name +// fields and default resolution. +type YetYetAnotherTestEnum int32 + +const ( + YetYetAnotherTestEnum_CC YetYetAnotherTestEnum = 0 + YetYetAnotherTestEnum_BetterYetDD YetYetAnotherTestEnum = 1 +) + +var YetYetAnotherTestEnum_name = map[int32]string{ + 0: "CC", + 1: "DD", +} +var YetYetAnotherTestEnum_value = map[string]int32{ + "CC": 0, + "DD": 1, +} + +func (x YetYetAnotherTestEnum) Enum() *YetYetAnotherTestEnum { + p := new(YetYetAnotherTestEnum) + *p = x + return p +} +func (x YetYetAnotherTestEnum) MarshalJSON() ([]byte, error) { + return proto.MarshalJSONEnum(YetYetAnotherTestEnum_name, int32(x)) +} +func (x *YetYetAnotherTestEnum) UnmarshalJSON(data []byte) error { + value, err := proto.UnmarshalJSONEnum(YetYetAnotherTestEnum_value, data, "YetYetAnotherTestEnum") + if err != nil { + return err + } + *x = YetYetAnotherTestEnum(value) + return nil +} +func (YetYetAnotherTestEnum) EnumDescriptor() ([]byte, []int) { return fileDescriptorThetest, []int{3} } + +type NestedDefinition_NestedEnum int32 + +const ( + TYPE_NESTED NestedDefinition_NestedEnum = 1 +) + +var NestedDefinition_NestedEnum_name = map[int32]string{ + 1: "TYPE_NESTED", +} +var NestedDefinition_NestedEnum_value = map[string]int32{ + "TYPE_NESTED": 1, +} + +func (x NestedDefinition_NestedEnum) Enum() *NestedDefinition_NestedEnum { + p := new(NestedDefinition_NestedEnum) + *p = x + return p +} +func (x NestedDefinition_NestedEnum) MarshalJSON() ([]byte, error) { + return proto.MarshalJSONEnum(NestedDefinition_NestedEnum_name, int32(x)) +} +func (x *NestedDefinition_NestedEnum) UnmarshalJSON(data []byte) error { + value, err := proto.UnmarshalJSONEnum(NestedDefinition_NestedEnum_value, data, "NestedDefinition_NestedEnum") + if err != nil { + return err + } + *x = NestedDefinition_NestedEnum(value) + return nil +} +func (NestedDefinition_NestedEnum) EnumDescriptor() ([]byte, []int) { + return fileDescriptorThetest, []int{42, 0} +} + +type NidOptNative struct { + Field1 float64 `protobuf:"fixed64,1,opt,name=Field1,json=field1" json:"Field1"` + Field2 float32 `protobuf:"fixed32,2,opt,name=Field2,json=field2" json:"Field2"` + Field3 int32 `protobuf:"varint,3,opt,name=Field3,json=field3" json:"Field3"` + Field4 int64 `protobuf:"varint,4,opt,name=Field4,json=field4" json:"Field4"` + Field5 uint32 `protobuf:"varint,5,opt,name=Field5,json=field5" json:"Field5"` + Field6 uint64 `protobuf:"varint,6,opt,name=Field6,json=field6" json:"Field6"` + Field7 int32 `protobuf:"zigzag32,7,opt,name=Field7,json=field7" json:"Field7"` + Field8 int64 `protobuf:"zigzag64,8,opt,name=Field8,json=field8" json:"Field8"` + Field9 uint32 `protobuf:"fixed32,9,opt,name=Field9,json=field9" json:"Field9"` + Field10 int32 `protobuf:"fixed32,10,opt,name=Field10,json=field10" json:"Field10"` + Field11 uint64 `protobuf:"fixed64,11,opt,name=Field11,json=field11" json:"Field11"` + Field12 int64 `protobuf:"fixed64,12,opt,name=Field12,json=field12" json:"Field12"` + Field13 bool `protobuf:"varint,13,opt,name=Field13,json=field13" json:"Field13"` + Field14 string `protobuf:"bytes,14,opt,name=Field14,json=field14" json:"Field14"` + Field15 []byte `protobuf:"bytes,15,opt,name=Field15,json=field15" json:"Field15"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *NidOptNative) Reset() { *m = NidOptNative{} } +func (*NidOptNative) ProtoMessage() {} +func (*NidOptNative) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{0} } + +type NinOptNative struct { + Field1 *float64 `protobuf:"fixed64,1,opt,name=Field1,json=field1" json:"Field1,omitempty"` + Field2 *float32 `protobuf:"fixed32,2,opt,name=Field2,json=field2" json:"Field2,omitempty"` + Field3 *int32 `protobuf:"varint,3,opt,name=Field3,json=field3" json:"Field3,omitempty"` + Field4 *int64 `protobuf:"varint,4,opt,name=Field4,json=field4" json:"Field4,omitempty"` + Field5 *uint32 `protobuf:"varint,5,opt,name=Field5,json=field5" json:"Field5,omitempty"` + Field6 *uint64 `protobuf:"varint,6,opt,name=Field6,json=field6" json:"Field6,omitempty"` + Field7 *int32 `protobuf:"zigzag32,7,opt,name=Field7,json=field7" json:"Field7,omitempty"` + Field8 *int64 `protobuf:"zigzag64,8,opt,name=Field8,json=field8" json:"Field8,omitempty"` + Field9 *uint32 `protobuf:"fixed32,9,opt,name=Field9,json=field9" json:"Field9,omitempty"` + Field10 *int32 `protobuf:"fixed32,10,opt,name=Field10,json=field10" json:"Field10,omitempty"` + Field11 *uint64 `protobuf:"fixed64,11,opt,name=Field11,json=field11" json:"Field11,omitempty"` + Field12 *int64 `protobuf:"fixed64,12,opt,name=Field12,json=field12" json:"Field12,omitempty"` + Field13 *bool `protobuf:"varint,13,opt,name=Field13,json=field13" json:"Field13,omitempty"` + Field14 *string `protobuf:"bytes,14,opt,name=Field14,json=field14" json:"Field14,omitempty"` + Field15 []byte `protobuf:"bytes,15,opt,name=Field15,json=field15" json:"Field15,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *NinOptNative) Reset() { *m = NinOptNative{} } +func (*NinOptNative) ProtoMessage() {} +func (*NinOptNative) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{1} } + +type NidRepNative struct { + Field1 []float64 `protobuf:"fixed64,1,rep,name=Field1,json=field1" json:"Field1,omitempty"` + Field2 []float32 `protobuf:"fixed32,2,rep,name=Field2,json=field2" json:"Field2,omitempty"` + Field3 []int32 `protobuf:"varint,3,rep,name=Field3,json=field3" json:"Field3,omitempty"` + Field4 []int64 `protobuf:"varint,4,rep,name=Field4,json=field4" json:"Field4,omitempty"` + Field5 []uint32 `protobuf:"varint,5,rep,name=Field5,json=field5" json:"Field5,omitempty"` + Field6 []uint64 `protobuf:"varint,6,rep,name=Field6,json=field6" json:"Field6,omitempty"` + Field7 []int32 `protobuf:"zigzag32,7,rep,name=Field7,json=field7" json:"Field7,omitempty"` + Field8 []int64 `protobuf:"zigzag64,8,rep,name=Field8,json=field8" json:"Field8,omitempty"` + Field9 []uint32 `protobuf:"fixed32,9,rep,name=Field9,json=field9" json:"Field9,omitempty"` + Field10 []int32 `protobuf:"fixed32,10,rep,name=Field10,json=field10" json:"Field10,omitempty"` + Field11 []uint64 `protobuf:"fixed64,11,rep,name=Field11,json=field11" json:"Field11,omitempty"` + Field12 []int64 `protobuf:"fixed64,12,rep,name=Field12,json=field12" json:"Field12,omitempty"` + Field13 []bool `protobuf:"varint,13,rep,name=Field13,json=field13" json:"Field13,omitempty"` + Field14 []string `protobuf:"bytes,14,rep,name=Field14,json=field14" json:"Field14,omitempty"` + Field15 [][]byte `protobuf:"bytes,15,rep,name=Field15,json=field15" json:"Field15,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *NidRepNative) Reset() { *m = NidRepNative{} } +func (*NidRepNative) ProtoMessage() {} +func (*NidRepNative) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{2} } + +type NinRepNative struct { + Field1 []float64 `protobuf:"fixed64,1,rep,name=Field1,json=field1" json:"Field1,omitempty"` + Field2 []float32 `protobuf:"fixed32,2,rep,name=Field2,json=field2" json:"Field2,omitempty"` + Field3 []int32 `protobuf:"varint,3,rep,name=Field3,json=field3" json:"Field3,omitempty"` + Field4 []int64 `protobuf:"varint,4,rep,name=Field4,json=field4" json:"Field4,omitempty"` + Field5 []uint32 `protobuf:"varint,5,rep,name=Field5,json=field5" json:"Field5,omitempty"` + Field6 []uint64 `protobuf:"varint,6,rep,name=Field6,json=field6" json:"Field6,omitempty"` + Field7 []int32 `protobuf:"zigzag32,7,rep,name=Field7,json=field7" json:"Field7,omitempty"` + Field8 []int64 `protobuf:"zigzag64,8,rep,name=Field8,json=field8" json:"Field8,omitempty"` + Field9 []uint32 `protobuf:"fixed32,9,rep,name=Field9,json=field9" json:"Field9,omitempty"` + Field10 []int32 `protobuf:"fixed32,10,rep,name=Field10,json=field10" json:"Field10,omitempty"` + Field11 []uint64 `protobuf:"fixed64,11,rep,name=Field11,json=field11" json:"Field11,omitempty"` + Field12 []int64 `protobuf:"fixed64,12,rep,name=Field12,json=field12" json:"Field12,omitempty"` + Field13 []bool `protobuf:"varint,13,rep,name=Field13,json=field13" json:"Field13,omitempty"` + Field14 []string `protobuf:"bytes,14,rep,name=Field14,json=field14" json:"Field14,omitempty"` + Field15 [][]byte `protobuf:"bytes,15,rep,name=Field15,json=field15" json:"Field15,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *NinRepNative) Reset() { *m = NinRepNative{} } +func (*NinRepNative) ProtoMessage() {} +func (*NinRepNative) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{3} } + +type NidRepPackedNative struct { + Field1 []float64 `protobuf:"fixed64,1,rep,packed,name=Field1,json=field1" json:"Field1,omitempty"` + Field2 []float32 `protobuf:"fixed32,2,rep,packed,name=Field2,json=field2" json:"Field2,omitempty"` + Field3 []int32 `protobuf:"varint,3,rep,packed,name=Field3,json=field3" json:"Field3,omitempty"` + Field4 []int64 `protobuf:"varint,4,rep,packed,name=Field4,json=field4" json:"Field4,omitempty"` + Field5 []uint32 `protobuf:"varint,5,rep,packed,name=Field5,json=field5" json:"Field5,omitempty"` + Field6 []uint64 `protobuf:"varint,6,rep,packed,name=Field6,json=field6" json:"Field6,omitempty"` + Field7 []int32 `protobuf:"zigzag32,7,rep,packed,name=Field7,json=field7" json:"Field7,omitempty"` + Field8 []int64 `protobuf:"zigzag64,8,rep,packed,name=Field8,json=field8" json:"Field8,omitempty"` + Field9 []uint32 `protobuf:"fixed32,9,rep,packed,name=Field9,json=field9" json:"Field9,omitempty"` + Field10 []int32 `protobuf:"fixed32,10,rep,packed,name=Field10,json=field10" json:"Field10,omitempty"` + Field11 []uint64 `protobuf:"fixed64,11,rep,packed,name=Field11,json=field11" json:"Field11,omitempty"` + Field12 []int64 `protobuf:"fixed64,12,rep,packed,name=Field12,json=field12" json:"Field12,omitempty"` + Field13 []bool `protobuf:"varint,13,rep,packed,name=Field13,json=field13" json:"Field13,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *NidRepPackedNative) Reset() { *m = NidRepPackedNative{} } +func (*NidRepPackedNative) ProtoMessage() {} +func (*NidRepPackedNative) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{4} } + +type NinRepPackedNative struct { + Field1 []float64 `protobuf:"fixed64,1,rep,packed,name=Field1,json=field1" json:"Field1,omitempty"` + Field2 []float32 `protobuf:"fixed32,2,rep,packed,name=Field2,json=field2" json:"Field2,omitempty"` + Field3 []int32 `protobuf:"varint,3,rep,packed,name=Field3,json=field3" json:"Field3,omitempty"` + Field4 []int64 `protobuf:"varint,4,rep,packed,name=Field4,json=field4" json:"Field4,omitempty"` + Field5 []uint32 `protobuf:"varint,5,rep,packed,name=Field5,json=field5" json:"Field5,omitempty"` + Field6 []uint64 `protobuf:"varint,6,rep,packed,name=Field6,json=field6" json:"Field6,omitempty"` + Field7 []int32 `protobuf:"zigzag32,7,rep,packed,name=Field7,json=field7" json:"Field7,omitempty"` + Field8 []int64 `protobuf:"zigzag64,8,rep,packed,name=Field8,json=field8" json:"Field8,omitempty"` + Field9 []uint32 `protobuf:"fixed32,9,rep,packed,name=Field9,json=field9" json:"Field9,omitempty"` + Field10 []int32 `protobuf:"fixed32,10,rep,packed,name=Field10,json=field10" json:"Field10,omitempty"` + Field11 []uint64 `protobuf:"fixed64,11,rep,packed,name=Field11,json=field11" json:"Field11,omitempty"` + Field12 []int64 `protobuf:"fixed64,12,rep,packed,name=Field12,json=field12" json:"Field12,omitempty"` + Field13 []bool `protobuf:"varint,13,rep,packed,name=Field13,json=field13" json:"Field13,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *NinRepPackedNative) Reset() { *m = NinRepPackedNative{} } +func (*NinRepPackedNative) ProtoMessage() {} +func (*NinRepPackedNative) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{5} } + +type NidOptStruct struct { + Field1 float64 `protobuf:"fixed64,1,opt,name=Field1,json=field1" json:"Field1"` + Field2 float32 `protobuf:"fixed32,2,opt,name=Field2,json=field2" json:"Field2"` + Field3 NidOptNative `protobuf:"bytes,3,opt,name=Field3,json=field3" json:"Field3"` + Field4 NinOptNative `protobuf:"bytes,4,opt,name=Field4,json=field4" json:"Field4"` + Field6 uint64 `protobuf:"varint,6,opt,name=Field6,json=field6" json:"Field6"` + Field7 int32 `protobuf:"zigzag32,7,opt,name=Field7,json=field7" json:"Field7"` + Field8 NidOptNative `protobuf:"bytes,8,opt,name=Field8,json=field8" json:"Field8"` + Field13 bool `protobuf:"varint,13,opt,name=Field13,json=field13" json:"Field13"` + Field14 string `protobuf:"bytes,14,opt,name=Field14,json=field14" json:"Field14"` + Field15 []byte `protobuf:"bytes,15,opt,name=Field15,json=field15" json:"Field15"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *NidOptStruct) Reset() { *m = NidOptStruct{} } +func (*NidOptStruct) ProtoMessage() {} +func (*NidOptStruct) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{6} } + +type NinOptStruct struct { + Field1 *float64 `protobuf:"fixed64,1,opt,name=Field1,json=field1" json:"Field1,omitempty"` + Field2 *float32 `protobuf:"fixed32,2,opt,name=Field2,json=field2" json:"Field2,omitempty"` + Field3 *NidOptNative `protobuf:"bytes,3,opt,name=Field3,json=field3" json:"Field3,omitempty"` + Field4 *NinOptNative `protobuf:"bytes,4,opt,name=Field4,json=field4" json:"Field4,omitempty"` + Field6 *uint64 `protobuf:"varint,6,opt,name=Field6,json=field6" json:"Field6,omitempty"` + Field7 *int32 `protobuf:"zigzag32,7,opt,name=Field7,json=field7" json:"Field7,omitempty"` + Field8 *NidOptNative `protobuf:"bytes,8,opt,name=Field8,json=field8" json:"Field8,omitempty"` + Field13 *bool `protobuf:"varint,13,opt,name=Field13,json=field13" json:"Field13,omitempty"` + Field14 *string `protobuf:"bytes,14,opt,name=Field14,json=field14" json:"Field14,omitempty"` + Field15 []byte `protobuf:"bytes,15,opt,name=Field15,json=field15" json:"Field15,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *NinOptStruct) Reset() { *m = NinOptStruct{} } +func (*NinOptStruct) ProtoMessage() {} +func (*NinOptStruct) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{7} } + +type NidRepStruct struct { + Field1 []float64 `protobuf:"fixed64,1,rep,name=Field1,json=field1" json:"Field1,omitempty"` + Field2 []float32 `protobuf:"fixed32,2,rep,name=Field2,json=field2" json:"Field2,omitempty"` + Field3 []NidOptNative `protobuf:"bytes,3,rep,name=Field3,json=field3" json:"Field3"` + Field4 []NinOptNative `protobuf:"bytes,4,rep,name=Field4,json=field4" json:"Field4"` + Field6 []uint64 `protobuf:"varint,6,rep,name=Field6,json=field6" json:"Field6,omitempty"` + Field7 []int32 `protobuf:"zigzag32,7,rep,name=Field7,json=field7" json:"Field7,omitempty"` + Field8 []NidOptNative `protobuf:"bytes,8,rep,name=Field8,json=field8" json:"Field8"` + Field13 []bool `protobuf:"varint,13,rep,name=Field13,json=field13" json:"Field13,omitempty"` + Field14 []string `protobuf:"bytes,14,rep,name=Field14,json=field14" json:"Field14,omitempty"` + Field15 [][]byte `protobuf:"bytes,15,rep,name=Field15,json=field15" json:"Field15,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *NidRepStruct) Reset() { *m = NidRepStruct{} } +func (*NidRepStruct) ProtoMessage() {} +func (*NidRepStruct) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{8} } + +type NinRepStruct struct { + Field1 []float64 `protobuf:"fixed64,1,rep,name=Field1,json=field1" json:"Field1,omitempty"` + Field2 []float32 `protobuf:"fixed32,2,rep,name=Field2,json=field2" json:"Field2,omitempty"` + Field3 []*NidOptNative `protobuf:"bytes,3,rep,name=Field3,json=field3" json:"Field3,omitempty"` + Field4 []*NinOptNative `protobuf:"bytes,4,rep,name=Field4,json=field4" json:"Field4,omitempty"` + Field6 []uint64 `protobuf:"varint,6,rep,name=Field6,json=field6" json:"Field6,omitempty"` + Field7 []int32 `protobuf:"zigzag32,7,rep,name=Field7,json=field7" json:"Field7,omitempty"` + Field8 []*NidOptNative `protobuf:"bytes,8,rep,name=Field8,json=field8" json:"Field8,omitempty"` + Field13 []bool `protobuf:"varint,13,rep,name=Field13,json=field13" json:"Field13,omitempty"` + Field14 []string `protobuf:"bytes,14,rep,name=Field14,json=field14" json:"Field14,omitempty"` + Field15 [][]byte `protobuf:"bytes,15,rep,name=Field15,json=field15" json:"Field15,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *NinRepStruct) Reset() { *m = NinRepStruct{} } +func (*NinRepStruct) ProtoMessage() {} +func (*NinRepStruct) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{9} } + +type NidEmbeddedStruct struct { + *NidOptNative `protobuf:"bytes,1,opt,name=Field1,json=field1,embedded=Field1" json:"Field1,omitempty"` + Field200 NidOptNative `protobuf:"bytes,200,opt,name=Field200,json=field200" json:"Field200"` + Field210 bool `protobuf:"varint,210,opt,name=Field210,json=field210" json:"Field210"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *NidEmbeddedStruct) Reset() { *m = NidEmbeddedStruct{} } +func (*NidEmbeddedStruct) ProtoMessage() {} +func (*NidEmbeddedStruct) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{10} } + +type NinEmbeddedStruct struct { + *NidOptNative `protobuf:"bytes,1,opt,name=Field1,json=field1,embedded=Field1" json:"Field1,omitempty"` + Field200 *NidOptNative `protobuf:"bytes,200,opt,name=Field200,json=field200" json:"Field200,omitempty"` + Field210 *bool `protobuf:"varint,210,opt,name=Field210,json=field210" json:"Field210,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *NinEmbeddedStruct) Reset() { *m = NinEmbeddedStruct{} } +func (*NinEmbeddedStruct) ProtoMessage() {} +func (*NinEmbeddedStruct) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{11} } + +type NidNestedStruct struct { + Field1 NidOptStruct `protobuf:"bytes,1,opt,name=Field1,json=field1" json:"Field1"` + Field2 []NidRepStruct `protobuf:"bytes,2,rep,name=Field2,json=field2" json:"Field2"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *NidNestedStruct) Reset() { *m = NidNestedStruct{} } +func (*NidNestedStruct) ProtoMessage() {} +func (*NidNestedStruct) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{12} } + +type NinNestedStruct struct { + Field1 *NinOptStruct `protobuf:"bytes,1,opt,name=Field1,json=field1" json:"Field1,omitempty"` + Field2 []*NinRepStruct `protobuf:"bytes,2,rep,name=Field2,json=field2" json:"Field2,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *NinNestedStruct) Reset() { *m = NinNestedStruct{} } +func (*NinNestedStruct) ProtoMessage() {} +func (*NinNestedStruct) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{13} } + +type NidOptCustom struct { + Id Uuid `protobuf:"bytes,1,opt,name=Id,json=id,customtype=Uuid" json:"Id"` + Value github_com_gogo_protobuf_test_custom.Uint128 `protobuf:"bytes,2,opt,name=Value,json=value,customtype=github.com/gogo/protobuf/test/custom.Uint128" json:"Value"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *NidOptCustom) Reset() { *m = NidOptCustom{} } +func (*NidOptCustom) ProtoMessage() {} +func (*NidOptCustom) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{14} } + +type CustomDash struct { + Value *github_com_gogo_protobuf_test_custom_dash_type.Bytes `protobuf:"bytes,1,opt,name=Value,json=value,customtype=github.com/gogo/protobuf/test/custom-dash-type.Bytes" json:"Value,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *CustomDash) Reset() { *m = CustomDash{} } +func (*CustomDash) ProtoMessage() {} +func (*CustomDash) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{15} } + +type NinOptCustom struct { + Id *Uuid `protobuf:"bytes,1,opt,name=Id,json=id,customtype=Uuid" json:"Id,omitempty"` + Value *github_com_gogo_protobuf_test_custom.Uint128 `protobuf:"bytes,2,opt,name=Value,json=value,customtype=github.com/gogo/protobuf/test/custom.Uint128" json:"Value,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *NinOptCustom) Reset() { *m = NinOptCustom{} } +func (*NinOptCustom) ProtoMessage() {} +func (*NinOptCustom) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{16} } + +type NidRepCustom struct { + Id []Uuid `protobuf:"bytes,1,rep,name=Id,json=id,customtype=Uuid" json:"Id"` + Value []github_com_gogo_protobuf_test_custom.Uint128 `protobuf:"bytes,2,rep,name=Value,json=value,customtype=github.com/gogo/protobuf/test/custom.Uint128" json:"Value"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *NidRepCustom) Reset() { *m = NidRepCustom{} } +func (*NidRepCustom) ProtoMessage() {} +func (*NidRepCustom) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{17} } + +type NinRepCustom struct { + Id []Uuid `protobuf:"bytes,1,rep,name=Id,json=id,customtype=Uuid" json:"Id,omitempty"` + Value []github_com_gogo_protobuf_test_custom.Uint128 `protobuf:"bytes,2,rep,name=Value,json=value,customtype=github.com/gogo/protobuf/test/custom.Uint128" json:"Value,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *NinRepCustom) Reset() { *m = NinRepCustom{} } +func (*NinRepCustom) ProtoMessage() {} +func (*NinRepCustom) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{18} } + +type NinOptNativeUnion struct { + Field1 *float64 `protobuf:"fixed64,1,opt,name=Field1,json=field1" json:"Field1,omitempty"` + Field2 *float32 `protobuf:"fixed32,2,opt,name=Field2,json=field2" json:"Field2,omitempty"` + Field3 *int32 `protobuf:"varint,3,opt,name=Field3,json=field3" json:"Field3,omitempty"` + Field4 *int64 `protobuf:"varint,4,opt,name=Field4,json=field4" json:"Field4,omitempty"` + Field5 *uint32 `protobuf:"varint,5,opt,name=Field5,json=field5" json:"Field5,omitempty"` + Field6 *uint64 `protobuf:"varint,6,opt,name=Field6,json=field6" json:"Field6,omitempty"` + Field13 *bool `protobuf:"varint,13,opt,name=Field13,json=field13" json:"Field13,omitempty"` + Field14 *string `protobuf:"bytes,14,opt,name=Field14,json=field14" json:"Field14,omitempty"` + Field15 []byte `protobuf:"bytes,15,opt,name=Field15,json=field15" json:"Field15,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *NinOptNativeUnion) Reset() { *m = NinOptNativeUnion{} } +func (*NinOptNativeUnion) ProtoMessage() {} +func (*NinOptNativeUnion) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{19} } + +type NinOptStructUnion struct { + Field1 *float64 `protobuf:"fixed64,1,opt,name=Field1,json=field1" json:"Field1,omitempty"` + Field2 *float32 `protobuf:"fixed32,2,opt,name=Field2,json=field2" json:"Field2,omitempty"` + Field3 *NidOptNative `protobuf:"bytes,3,opt,name=Field3,json=field3" json:"Field3,omitempty"` + Field4 *NinOptNative `protobuf:"bytes,4,opt,name=Field4,json=field4" json:"Field4,omitempty"` + Field6 *uint64 `protobuf:"varint,6,opt,name=Field6,json=field6" json:"Field6,omitempty"` + Field7 *int32 `protobuf:"zigzag32,7,opt,name=Field7,json=field7" json:"Field7,omitempty"` + Field13 *bool `protobuf:"varint,13,opt,name=Field13,json=field13" json:"Field13,omitempty"` + Field14 *string `protobuf:"bytes,14,opt,name=Field14,json=field14" json:"Field14,omitempty"` + Field15 []byte `protobuf:"bytes,15,opt,name=Field15,json=field15" json:"Field15,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *NinOptStructUnion) Reset() { *m = NinOptStructUnion{} } +func (*NinOptStructUnion) ProtoMessage() {} +func (*NinOptStructUnion) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{20} } + +type NinEmbeddedStructUnion struct { + *NidOptNative `protobuf:"bytes,1,opt,name=Field1,json=field1,embedded=Field1" json:"Field1,omitempty"` + Field200 *NinOptNative `protobuf:"bytes,200,opt,name=Field200,json=field200" json:"Field200,omitempty"` + Field210 *bool `protobuf:"varint,210,opt,name=Field210,json=field210" json:"Field210,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *NinEmbeddedStructUnion) Reset() { *m = NinEmbeddedStructUnion{} } +func (*NinEmbeddedStructUnion) ProtoMessage() {} +func (*NinEmbeddedStructUnion) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{21} } + +type NinNestedStructUnion struct { + Field1 *NinOptNativeUnion `protobuf:"bytes,1,opt,name=Field1,json=field1" json:"Field1,omitempty"` + Field2 *NinOptStructUnion `protobuf:"bytes,2,opt,name=Field2,json=field2" json:"Field2,omitempty"` + Field3 *NinEmbeddedStructUnion `protobuf:"bytes,3,opt,name=Field3,json=field3" json:"Field3,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *NinNestedStructUnion) Reset() { *m = NinNestedStructUnion{} } +func (*NinNestedStructUnion) ProtoMessage() {} +func (*NinNestedStructUnion) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{22} } + +type Tree struct { + Or *OrBranch `protobuf:"bytes,1,opt,name=Or,json=or" json:"Or,omitempty"` + And *AndBranch `protobuf:"bytes,2,opt,name=And,json=and" json:"And,omitempty"` + Leaf *Leaf `protobuf:"bytes,3,opt,name=Leaf,json=leaf" json:"Leaf,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *Tree) Reset() { *m = Tree{} } +func (*Tree) ProtoMessage() {} +func (*Tree) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{23} } + +type OrBranch struct { + Left Tree `protobuf:"bytes,1,opt,name=Left,json=left" json:"Left"` + Right Tree `protobuf:"bytes,2,opt,name=Right,json=right" json:"Right"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *OrBranch) Reset() { *m = OrBranch{} } +func (*OrBranch) ProtoMessage() {} +func (*OrBranch) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{24} } + +type AndBranch struct { + Left Tree `protobuf:"bytes,1,opt,name=Left,json=left" json:"Left"` + Right Tree `protobuf:"bytes,2,opt,name=Right,json=right" json:"Right"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *AndBranch) Reset() { *m = AndBranch{} } +func (*AndBranch) ProtoMessage() {} +func (*AndBranch) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{25} } + +type Leaf struct { + Value int64 `protobuf:"varint,1,opt,name=Value,json=value" json:"Value"` + StrValue string `protobuf:"bytes,2,opt,name=StrValue,json=strValue" json:"StrValue"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *Leaf) Reset() { *m = Leaf{} } +func (*Leaf) ProtoMessage() {} +func (*Leaf) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{26} } + +type DeepTree struct { + Down *ADeepBranch `protobuf:"bytes,1,opt,name=Down,json=down" json:"Down,omitempty"` + And *AndDeepBranch `protobuf:"bytes,2,opt,name=And,json=and" json:"And,omitempty"` + Leaf *DeepLeaf `protobuf:"bytes,3,opt,name=Leaf,json=leaf" json:"Leaf,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *DeepTree) Reset() { *m = DeepTree{} } +func (*DeepTree) ProtoMessage() {} +func (*DeepTree) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{27} } + +type ADeepBranch struct { + Down DeepTree `protobuf:"bytes,2,opt,name=Down,json=down" json:"Down"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *ADeepBranch) Reset() { *m = ADeepBranch{} } +func (*ADeepBranch) ProtoMessage() {} +func (*ADeepBranch) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{28} } + +type AndDeepBranch struct { + Left DeepTree `protobuf:"bytes,1,opt,name=Left,json=left" json:"Left"` + Right DeepTree `protobuf:"bytes,2,opt,name=Right,json=right" json:"Right"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *AndDeepBranch) Reset() { *m = AndDeepBranch{} } +func (*AndDeepBranch) ProtoMessage() {} +func (*AndDeepBranch) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{29} } + +type DeepLeaf struct { + Tree Tree `protobuf:"bytes,1,opt,name=Tree,json=tree" json:"Tree"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *DeepLeaf) Reset() { *m = DeepLeaf{} } +func (*DeepLeaf) ProtoMessage() {} +func (*DeepLeaf) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{30} } + +type Nil struct { + XXX_unrecognized []byte `json:"-"` +} + +func (m *Nil) Reset() { *m = Nil{} } +func (*Nil) ProtoMessage() {} +func (*Nil) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{31} } + +type NidOptEnum struct { + Field1 TheTestEnum `protobuf:"varint,1,opt,name=Field1,json=field1,enum=test.TheTestEnum" json:"Field1"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *NidOptEnum) Reset() { *m = NidOptEnum{} } +func (*NidOptEnum) ProtoMessage() {} +func (*NidOptEnum) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{32} } + +type NinOptEnum struct { + Field1 *TheTestEnum `protobuf:"varint,1,opt,name=Field1,json=field1,enum=test.TheTestEnum" json:"Field1,omitempty"` + Field2 *YetAnotherTestEnum `protobuf:"varint,2,opt,name=Field2,json=field2,enum=test.YetAnotherTestEnum" json:"Field2,omitempty"` + Field3 *YetYetAnotherTestEnum `protobuf:"varint,3,opt,name=Field3,json=field3,enum=test.YetYetAnotherTestEnum" json:"Field3,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *NinOptEnum) Reset() { *m = NinOptEnum{} } +func (*NinOptEnum) ProtoMessage() {} +func (*NinOptEnum) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{33} } + +type NidRepEnum struct { + Field1 []TheTestEnum `protobuf:"varint,1,rep,name=Field1,json=field1,enum=test.TheTestEnum" json:"Field1,omitempty"` + Field2 []YetAnotherTestEnum `protobuf:"varint,2,rep,name=Field2,json=field2,enum=test.YetAnotherTestEnum" json:"Field2,omitempty"` + Field3 []YetYetAnotherTestEnum `protobuf:"varint,3,rep,name=Field3,json=field3,enum=test.YetYetAnotherTestEnum" json:"Field3,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *NidRepEnum) Reset() { *m = NidRepEnum{} } +func (*NidRepEnum) ProtoMessage() {} +func (*NidRepEnum) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{34} } + +type NinRepEnum struct { + Field1 []TheTestEnum `protobuf:"varint,1,rep,name=Field1,json=field1,enum=test.TheTestEnum" json:"Field1,omitempty"` + Field2 []YetAnotherTestEnum `protobuf:"varint,2,rep,name=Field2,json=field2,enum=test.YetAnotherTestEnum" json:"Field2,omitempty"` + Field3 []YetYetAnotherTestEnum `protobuf:"varint,3,rep,name=Field3,json=field3,enum=test.YetYetAnotherTestEnum" json:"Field3,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *NinRepEnum) Reset() { *m = NinRepEnum{} } +func (*NinRepEnum) ProtoMessage() {} +func (*NinRepEnum) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{35} } + +type NinOptEnumDefault struct { + Field1 *TheTestEnum `protobuf:"varint,1,opt,name=Field1,json=field1,enum=test.TheTestEnum,def=2" json:"Field1,omitempty"` + Field2 *YetAnotherTestEnum `protobuf:"varint,2,opt,name=Field2,json=field2,enum=test.YetAnotherTestEnum,def=1" json:"Field2,omitempty"` + Field3 *YetYetAnotherTestEnum `protobuf:"varint,3,opt,name=Field3,json=field3,enum=test.YetYetAnotherTestEnum,def=0" json:"Field3,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *NinOptEnumDefault) Reset() { *m = NinOptEnumDefault{} } +func (*NinOptEnumDefault) ProtoMessage() {} +func (*NinOptEnumDefault) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{36} } + +const Default_NinOptEnumDefault_Field1 TheTestEnum = C +const Default_NinOptEnumDefault_Field2 YetAnotherTestEnum = BetterYetBB +const Default_NinOptEnumDefault_Field3 YetYetAnotherTestEnum = YetYetAnotherTestEnum_CC + +func (m *NinOptEnumDefault) GetField1() TheTestEnum { + if m != nil && m.Field1 != nil { + return *m.Field1 + } + return Default_NinOptEnumDefault_Field1 +} + +func (m *NinOptEnumDefault) GetField2() YetAnotherTestEnum { + if m != nil && m.Field2 != nil { + return *m.Field2 + } + return Default_NinOptEnumDefault_Field2 +} + +func (m *NinOptEnumDefault) GetField3() YetYetAnotherTestEnum { + if m != nil && m.Field3 != nil { + return *m.Field3 + } + return Default_NinOptEnumDefault_Field3 +} + +type AnotherNinOptEnum struct { + Field1 *AnotherTestEnum `protobuf:"varint,1,opt,name=Field1,json=field1,enum=test.AnotherTestEnum" json:"Field1,omitempty"` + Field2 *YetAnotherTestEnum `protobuf:"varint,2,opt,name=Field2,json=field2,enum=test.YetAnotherTestEnum" json:"Field2,omitempty"` + Field3 *YetYetAnotherTestEnum `protobuf:"varint,3,opt,name=Field3,json=field3,enum=test.YetYetAnotherTestEnum" json:"Field3,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *AnotherNinOptEnum) Reset() { *m = AnotherNinOptEnum{} } +func (*AnotherNinOptEnum) ProtoMessage() {} +func (*AnotherNinOptEnum) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{37} } + +type AnotherNinOptEnumDefault struct { + Field1 *AnotherTestEnum `protobuf:"varint,1,opt,name=Field1,json=field1,enum=test.AnotherTestEnum,def=11" json:"Field1,omitempty"` + Field2 *YetAnotherTestEnum `protobuf:"varint,2,opt,name=Field2,json=field2,enum=test.YetAnotherTestEnum,def=1" json:"Field2,omitempty"` + Field3 *YetYetAnotherTestEnum `protobuf:"varint,3,opt,name=Field3,json=field3,enum=test.YetYetAnotherTestEnum,def=0" json:"Field3,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *AnotherNinOptEnumDefault) Reset() { *m = AnotherNinOptEnumDefault{} } +func (*AnotherNinOptEnumDefault) ProtoMessage() {} +func (*AnotherNinOptEnumDefault) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{38} } + +const Default_AnotherNinOptEnumDefault_Field1 AnotherTestEnum = E +const Default_AnotherNinOptEnumDefault_Field2 YetAnotherTestEnum = BetterYetBB +const Default_AnotherNinOptEnumDefault_Field3 YetYetAnotherTestEnum = YetYetAnotherTestEnum_CC + +func (m *AnotherNinOptEnumDefault) GetField1() AnotherTestEnum { + if m != nil && m.Field1 != nil { + return *m.Field1 + } + return Default_AnotherNinOptEnumDefault_Field1 +} + +func (m *AnotherNinOptEnumDefault) GetField2() YetAnotherTestEnum { + if m != nil && m.Field2 != nil { + return *m.Field2 + } + return Default_AnotherNinOptEnumDefault_Field2 +} + +func (m *AnotherNinOptEnumDefault) GetField3() YetYetAnotherTestEnum { + if m != nil && m.Field3 != nil { + return *m.Field3 + } + return Default_AnotherNinOptEnumDefault_Field3 +} + +type Timer struct { + Time1 int64 `protobuf:"fixed64,1,opt,name=Time1,json=time1" json:"Time1"` + Time2 int64 `protobuf:"fixed64,2,opt,name=Time2,json=time2" json:"Time2"` + Data []byte `protobuf:"bytes,3,opt,name=Data,json=data" json:"Data"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *Timer) Reset() { *m = Timer{} } +func (*Timer) ProtoMessage() {} +func (*Timer) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{39} } + +type MyExtendable struct { + Field1 *int64 `protobuf:"varint,1,opt,name=Field1,json=field1" json:"Field1,omitempty"` + XXX_extensions map[int32]proto.Extension `json:"-"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *MyExtendable) Reset() { *m = MyExtendable{} } +func (*MyExtendable) ProtoMessage() {} +func (*MyExtendable) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{40} } + +var extRange_MyExtendable = []proto.ExtensionRange{ + {100, 199}, +} + +func (*MyExtendable) ExtensionRangeArray() []proto.ExtensionRange { + return extRange_MyExtendable +} +func (m *MyExtendable) ExtensionMap() map[int32]proto.Extension { + if m.XXX_extensions == nil { + m.XXX_extensions = make(map[int32]proto.Extension) + } + return m.XXX_extensions +} + +type OtherExtenable struct { + Field2 *int64 `protobuf:"varint,2,opt,name=Field2,json=field2" json:"Field2,omitempty"` + Field13 *int64 `protobuf:"varint,13,opt,name=Field13,json=field13" json:"Field13,omitempty"` + M *MyExtendable `protobuf:"bytes,1,opt,name=M,json=m" json:"M,omitempty"` + XXX_extensions map[int32]proto.Extension `json:"-"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *OtherExtenable) Reset() { *m = OtherExtenable{} } +func (*OtherExtenable) ProtoMessage() {} +func (*OtherExtenable) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{41} } + +var extRange_OtherExtenable = []proto.ExtensionRange{ + {14, 16}, + {10, 12}, +} + +func (*OtherExtenable) ExtensionRangeArray() []proto.ExtensionRange { + return extRange_OtherExtenable +} +func (m *OtherExtenable) ExtensionMap() map[int32]proto.Extension { + if m.XXX_extensions == nil { + m.XXX_extensions = make(map[int32]proto.Extension) + } + return m.XXX_extensions +} + +type NestedDefinition struct { + Field1 *int64 `protobuf:"varint,1,opt,name=Field1,json=field1" json:"Field1,omitempty"` + EnumField *NestedDefinition_NestedEnum `protobuf:"varint,2,opt,name=EnumField,json=enumField,enum=test.NestedDefinition_NestedEnum" json:"EnumField,omitempty"` + NNM *NestedDefinition_NestedMessage_NestedNestedMsg `protobuf:"bytes,3,opt,name=NNM,json=nNM" json:"NNM,omitempty"` + NM *NestedDefinition_NestedMessage `protobuf:"bytes,4,opt,name=NM,json=nM" json:"NM,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *NestedDefinition) Reset() { *m = NestedDefinition{} } +func (*NestedDefinition) ProtoMessage() {} +func (*NestedDefinition) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{42} } + +type NestedDefinition_NestedMessage struct { + NestedField1 *uint64 `protobuf:"fixed64,1,opt,name=NestedField1,json=nestedField1" json:"NestedField1,omitempty"` + NNM *NestedDefinition_NestedMessage_NestedNestedMsg `protobuf:"bytes,2,opt,name=NNM,json=nNM" json:"NNM,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *NestedDefinition_NestedMessage) Reset() { *m = NestedDefinition_NestedMessage{} } +func (*NestedDefinition_NestedMessage) ProtoMessage() {} +func (*NestedDefinition_NestedMessage) Descriptor() ([]byte, []int) { + return fileDescriptorThetest, []int{42, 0} +} + +type NestedDefinition_NestedMessage_NestedNestedMsg struct { + NestedNestedField1 *string `protobuf:"bytes,10,opt,name=NestedNestedField1,json=nestedNestedField1" json:"NestedNestedField1,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *NestedDefinition_NestedMessage_NestedNestedMsg) Reset() { + *m = NestedDefinition_NestedMessage_NestedNestedMsg{} +} +func (*NestedDefinition_NestedMessage_NestedNestedMsg) ProtoMessage() {} +func (*NestedDefinition_NestedMessage_NestedNestedMsg) Descriptor() ([]byte, []int) { + return fileDescriptorThetest, []int{42, 0, 0} +} + +type NestedScope struct { + A *NestedDefinition_NestedMessage_NestedNestedMsg `protobuf:"bytes,1,opt,name=A,json=a" json:"A,omitempty"` + B *NestedDefinition_NestedEnum `protobuf:"varint,2,opt,name=B,json=b,enum=test.NestedDefinition_NestedEnum" json:"B,omitempty"` + C *NestedDefinition_NestedMessage `protobuf:"bytes,3,opt,name=C,json=c" json:"C,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *NestedScope) Reset() { *m = NestedScope{} } +func (*NestedScope) ProtoMessage() {} +func (*NestedScope) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{43} } + +type NinOptNativeDefault struct { + Field1 *float64 `protobuf:"fixed64,1,opt,name=Field1,json=field1,def=1234.1234" json:"Field1,omitempty"` + Field2 *float32 `protobuf:"fixed32,2,opt,name=Field2,json=field2,def=1234.1234" json:"Field2,omitempty"` + Field3 *int32 `protobuf:"varint,3,opt,name=Field3,json=field3,def=1234" json:"Field3,omitempty"` + Field4 *int64 `protobuf:"varint,4,opt,name=Field4,json=field4,def=1234" json:"Field4,omitempty"` + Field5 *uint32 `protobuf:"varint,5,opt,name=Field5,json=field5,def=1234" json:"Field5,omitempty"` + Field6 *uint64 `protobuf:"varint,6,opt,name=Field6,json=field6,def=1234" json:"Field6,omitempty"` + Field7 *int32 `protobuf:"zigzag32,7,opt,name=Field7,json=field7,def=1234" json:"Field7,omitempty"` + Field8 *int64 `protobuf:"zigzag64,8,opt,name=Field8,json=field8,def=1234" json:"Field8,omitempty"` + Field9 *uint32 `protobuf:"fixed32,9,opt,name=Field9,json=field9,def=1234" json:"Field9,omitempty"` + Field10 *int32 `protobuf:"fixed32,10,opt,name=Field10,json=field10,def=1234" json:"Field10,omitempty"` + Field11 *uint64 `protobuf:"fixed64,11,opt,name=Field11,json=field11,def=1234" json:"Field11,omitempty"` + Field12 *int64 `protobuf:"fixed64,12,opt,name=Field12,json=field12,def=1234" json:"Field12,omitempty"` + Field13 *bool `protobuf:"varint,13,opt,name=Field13,json=field13,def=1" json:"Field13,omitempty"` + Field14 *string `protobuf:"bytes,14,opt,name=Field14,json=field14,def=1234" json:"Field14,omitempty"` + Field15 []byte `protobuf:"bytes,15,opt,name=Field15,json=field15" json:"Field15,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *NinOptNativeDefault) Reset() { *m = NinOptNativeDefault{} } +func (*NinOptNativeDefault) ProtoMessage() {} +func (*NinOptNativeDefault) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{44} } + +const Default_NinOptNativeDefault_Field1 float64 = 1234.1234 +const Default_NinOptNativeDefault_Field2 float32 = 1234.1234 +const Default_NinOptNativeDefault_Field3 int32 = 1234 +const Default_NinOptNativeDefault_Field4 int64 = 1234 +const Default_NinOptNativeDefault_Field5 uint32 = 1234 +const Default_NinOptNativeDefault_Field6 uint64 = 1234 +const Default_NinOptNativeDefault_Field7 int32 = 1234 +const Default_NinOptNativeDefault_Field8 int64 = 1234 +const Default_NinOptNativeDefault_Field9 uint32 = 1234 +const Default_NinOptNativeDefault_Field10 int32 = 1234 +const Default_NinOptNativeDefault_Field11 uint64 = 1234 +const Default_NinOptNativeDefault_Field12 int64 = 1234 +const Default_NinOptNativeDefault_Field13 bool = true +const Default_NinOptNativeDefault_Field14 string = "1234" + +func (m *NinOptNativeDefault) GetField1() float64 { + if m != nil && m.Field1 != nil { + return *m.Field1 + } + return Default_NinOptNativeDefault_Field1 +} + +func (m *NinOptNativeDefault) GetField2() float32 { + if m != nil && m.Field2 != nil { + return *m.Field2 + } + return Default_NinOptNativeDefault_Field2 +} + +func (m *NinOptNativeDefault) GetField3() int32 { + if m != nil && m.Field3 != nil { + return *m.Field3 + } + return Default_NinOptNativeDefault_Field3 +} + +func (m *NinOptNativeDefault) GetField4() int64 { + if m != nil && m.Field4 != nil { + return *m.Field4 + } + return Default_NinOptNativeDefault_Field4 +} + +func (m *NinOptNativeDefault) GetField5() uint32 { + if m != nil && m.Field5 != nil { + return *m.Field5 + } + return Default_NinOptNativeDefault_Field5 +} + +func (m *NinOptNativeDefault) GetField6() uint64 { + if m != nil && m.Field6 != nil { + return *m.Field6 + } + return Default_NinOptNativeDefault_Field6 +} + +func (m *NinOptNativeDefault) GetField7() int32 { + if m != nil && m.Field7 != nil { + return *m.Field7 + } + return Default_NinOptNativeDefault_Field7 +} + +func (m *NinOptNativeDefault) GetField8() int64 { + if m != nil && m.Field8 != nil { + return *m.Field8 + } + return Default_NinOptNativeDefault_Field8 +} + +func (m *NinOptNativeDefault) GetField9() uint32 { + if m != nil && m.Field9 != nil { + return *m.Field9 + } + return Default_NinOptNativeDefault_Field9 +} + +func (m *NinOptNativeDefault) GetField10() int32 { + if m != nil && m.Field10 != nil { + return *m.Field10 + } + return Default_NinOptNativeDefault_Field10 +} + +func (m *NinOptNativeDefault) GetField11() uint64 { + if m != nil && m.Field11 != nil { + return *m.Field11 + } + return Default_NinOptNativeDefault_Field11 +} + +func (m *NinOptNativeDefault) GetField12() int64 { + if m != nil && m.Field12 != nil { + return *m.Field12 + } + return Default_NinOptNativeDefault_Field12 +} + +func (m *NinOptNativeDefault) GetField13() bool { + if m != nil && m.Field13 != nil { + return *m.Field13 + } + return Default_NinOptNativeDefault_Field13 +} + +func (m *NinOptNativeDefault) GetField14() string { + if m != nil && m.Field14 != nil { + return *m.Field14 + } + return Default_NinOptNativeDefault_Field14 +} + +func (m *NinOptNativeDefault) GetField15() []byte { + if m != nil { + return m.Field15 + } + return nil +} + +type CustomContainer struct { + CustomStruct NidOptCustom `protobuf:"bytes,1,opt,name=CustomStruct,json=customStruct" json:"CustomStruct"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *CustomContainer) Reset() { *m = CustomContainer{} } +func (*CustomContainer) ProtoMessage() {} +func (*CustomContainer) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{45} } + +type CustomNameNidOptNative struct { + FieldA float64 `protobuf:"fixed64,1,opt,name=Field1,json=field1" json:"Field1"` + FieldB float32 `protobuf:"fixed32,2,opt,name=Field2,json=field2" json:"Field2"` + FieldC int32 `protobuf:"varint,3,opt,name=Field3,json=field3" json:"Field3"` + FieldD int64 `protobuf:"varint,4,opt,name=Field4,json=field4" json:"Field4"` + FieldE uint32 `protobuf:"varint,5,opt,name=Field5,json=field5" json:"Field5"` + FieldF uint64 `protobuf:"varint,6,opt,name=Field6,json=field6" json:"Field6"` + FieldG int32 `protobuf:"zigzag32,7,opt,name=Field7,json=field7" json:"Field7"` + FieldH int64 `protobuf:"zigzag64,8,opt,name=Field8,json=field8" json:"Field8"` + FieldI uint32 `protobuf:"fixed32,9,opt,name=Field9,json=field9" json:"Field9"` + FieldJ int32 `protobuf:"fixed32,10,opt,name=Field10,json=field10" json:"Field10"` + FieldK uint64 `protobuf:"fixed64,11,opt,name=Field11,json=field11" json:"Field11"` + FieldL int64 `protobuf:"fixed64,12,opt,name=Field12,json=field12" json:"Field12"` + FieldM bool `protobuf:"varint,13,opt,name=Field13,json=field13" json:"Field13"` + FieldN string `protobuf:"bytes,14,opt,name=Field14,json=field14" json:"Field14"` + FieldO []byte `protobuf:"bytes,15,opt,name=Field15,json=field15" json:"Field15"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *CustomNameNidOptNative) Reset() { *m = CustomNameNidOptNative{} } +func (*CustomNameNidOptNative) ProtoMessage() {} +func (*CustomNameNidOptNative) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{46} } + +type CustomNameNinOptNative struct { + FieldA *float64 `protobuf:"fixed64,1,opt,name=Field1,json=field1" json:"Field1,omitempty"` + FieldB *float32 `protobuf:"fixed32,2,opt,name=Field2,json=field2" json:"Field2,omitempty"` + FieldC *int32 `protobuf:"varint,3,opt,name=Field3,json=field3" json:"Field3,omitempty"` + FieldD *int64 `protobuf:"varint,4,opt,name=Field4,json=field4" json:"Field4,omitempty"` + FieldE *uint32 `protobuf:"varint,5,opt,name=Field5,json=field5" json:"Field5,omitempty"` + FieldF *uint64 `protobuf:"varint,6,opt,name=Field6,json=field6" json:"Field6,omitempty"` + FieldG *int32 `protobuf:"zigzag32,7,opt,name=Field7,json=field7" json:"Field7,omitempty"` + FieldH *int64 `protobuf:"zigzag64,8,opt,name=Field8,json=field8" json:"Field8,omitempty"` + FieldI *uint32 `protobuf:"fixed32,9,opt,name=Field9,json=field9" json:"Field9,omitempty"` + FieldJ *int32 `protobuf:"fixed32,10,opt,name=Field10,json=field10" json:"Field10,omitempty"` + FieldK *uint64 `protobuf:"fixed64,11,opt,name=Field11,json=field11" json:"Field11,omitempty"` + FielL *int64 `protobuf:"fixed64,12,opt,name=Field12,json=field12" json:"Field12,omitempty"` + FieldM *bool `protobuf:"varint,13,opt,name=Field13,json=field13" json:"Field13,omitempty"` + FieldN *string `protobuf:"bytes,14,opt,name=Field14,json=field14" json:"Field14,omitempty"` + FieldO []byte `protobuf:"bytes,15,opt,name=Field15,json=field15" json:"Field15,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *CustomNameNinOptNative) Reset() { *m = CustomNameNinOptNative{} } +func (*CustomNameNinOptNative) ProtoMessage() {} +func (*CustomNameNinOptNative) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{47} } + +type CustomNameNinRepNative struct { + FieldA []float64 `protobuf:"fixed64,1,rep,name=Field1,json=field1" json:"Field1,omitempty"` + FieldB []float32 `protobuf:"fixed32,2,rep,name=Field2,json=field2" json:"Field2,omitempty"` + FieldC []int32 `protobuf:"varint,3,rep,name=Field3,json=field3" json:"Field3,omitempty"` + FieldD []int64 `protobuf:"varint,4,rep,name=Field4,json=field4" json:"Field4,omitempty"` + FieldE []uint32 `protobuf:"varint,5,rep,name=Field5,json=field5" json:"Field5,omitempty"` + FieldF []uint64 `protobuf:"varint,6,rep,name=Field6,json=field6" json:"Field6,omitempty"` + FieldG []int32 `protobuf:"zigzag32,7,rep,name=Field7,json=field7" json:"Field7,omitempty"` + FieldH []int64 `protobuf:"zigzag64,8,rep,name=Field8,json=field8" json:"Field8,omitempty"` + FieldI []uint32 `protobuf:"fixed32,9,rep,name=Field9,json=field9" json:"Field9,omitempty"` + FieldJ []int32 `protobuf:"fixed32,10,rep,name=Field10,json=field10" json:"Field10,omitempty"` + FieldK []uint64 `protobuf:"fixed64,11,rep,name=Field11,json=field11" json:"Field11,omitempty"` + FieldL []int64 `protobuf:"fixed64,12,rep,name=Field12,json=field12" json:"Field12,omitempty"` + FieldM []bool `protobuf:"varint,13,rep,name=Field13,json=field13" json:"Field13,omitempty"` + FieldN []string `protobuf:"bytes,14,rep,name=Field14,json=field14" json:"Field14,omitempty"` + FieldO [][]byte `protobuf:"bytes,15,rep,name=Field15,json=field15" json:"Field15,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *CustomNameNinRepNative) Reset() { *m = CustomNameNinRepNative{} } +func (*CustomNameNinRepNative) ProtoMessage() {} +func (*CustomNameNinRepNative) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{48} } + +type CustomNameNinStruct struct { + FieldA *float64 `protobuf:"fixed64,1,opt,name=Field1,json=field1" json:"Field1,omitempty"` + FieldB *float32 `protobuf:"fixed32,2,opt,name=Field2,json=field2" json:"Field2,omitempty"` + FieldC *NidOptNative `protobuf:"bytes,3,opt,name=Field3,json=field3" json:"Field3,omitempty"` + FieldD []*NinOptNative `protobuf:"bytes,4,rep,name=Field4,json=field4" json:"Field4,omitempty"` + FieldE *uint64 `protobuf:"varint,6,opt,name=Field6,json=field6" json:"Field6,omitempty"` + FieldF *int32 `protobuf:"zigzag32,7,opt,name=Field7,json=field7" json:"Field7,omitempty"` + FieldG *NidOptNative `protobuf:"bytes,8,opt,name=Field8,json=field8" json:"Field8,omitempty"` + FieldH *bool `protobuf:"varint,13,opt,name=Field13,json=field13" json:"Field13,omitempty"` + FieldI *string `protobuf:"bytes,14,opt,name=Field14,json=field14" json:"Field14,omitempty"` + FieldJ []byte `protobuf:"bytes,15,opt,name=Field15,json=field15" json:"Field15,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *CustomNameNinStruct) Reset() { *m = CustomNameNinStruct{} } +func (*CustomNameNinStruct) ProtoMessage() {} +func (*CustomNameNinStruct) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{49} } + +type CustomNameCustomType struct { + FieldA *Uuid `protobuf:"bytes,1,opt,name=Id,json=id,customtype=Uuid" json:"Id,omitempty"` + FieldB *github_com_gogo_protobuf_test_custom.Uint128 `protobuf:"bytes,2,opt,name=Value,json=value,customtype=github.com/gogo/protobuf/test/custom.Uint128" json:"Value,omitempty"` + FieldC []Uuid `protobuf:"bytes,3,rep,name=Ids,json=ids,customtype=Uuid" json:"Ids,omitempty"` + FieldD []github_com_gogo_protobuf_test_custom.Uint128 `protobuf:"bytes,4,rep,name=Values,json=values,customtype=github.com/gogo/protobuf/test/custom.Uint128" json:"Values,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *CustomNameCustomType) Reset() { *m = CustomNameCustomType{} } +func (*CustomNameCustomType) ProtoMessage() {} +func (*CustomNameCustomType) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{50} } + +type CustomNameNinEmbeddedStructUnion struct { + *NidOptNative `protobuf:"bytes,1,opt,name=Field1,json=field1,embedded=Field1" json:"Field1,omitempty"` + FieldA *NinOptNative `protobuf:"bytes,200,opt,name=Field200,json=field200" json:"Field200,omitempty"` + FieldB *bool `protobuf:"varint,210,opt,name=Field210,json=field210" json:"Field210,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *CustomNameNinEmbeddedStructUnion) Reset() { *m = CustomNameNinEmbeddedStructUnion{} } +func (*CustomNameNinEmbeddedStructUnion) ProtoMessage() {} +func (*CustomNameNinEmbeddedStructUnion) Descriptor() ([]byte, []int) { + return fileDescriptorThetest, []int{51} +} + +type CustomNameEnum struct { + FieldA *TheTestEnum `protobuf:"varint,1,opt,name=Field1,json=field1,enum=test.TheTestEnum" json:"Field1,omitempty"` + FieldB []TheTestEnum `protobuf:"varint,2,rep,name=Field2,json=field2,enum=test.TheTestEnum" json:"Field2,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *CustomNameEnum) Reset() { *m = CustomNameEnum{} } +func (*CustomNameEnum) ProtoMessage() {} +func (*CustomNameEnum) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{52} } + +type NoExtensionsMap struct { + Field1 *int64 `protobuf:"varint,1,opt,name=Field1,json=field1" json:"Field1,omitempty"` + XXX_extensions []byte `protobuf:"bytes,0,opt" json:"-"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *NoExtensionsMap) Reset() { *m = NoExtensionsMap{} } +func (*NoExtensionsMap) ProtoMessage() {} +func (*NoExtensionsMap) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{53} } + +var extRange_NoExtensionsMap = []proto.ExtensionRange{ + {100, 199}, +} + +func (*NoExtensionsMap) ExtensionRangeArray() []proto.ExtensionRange { + return extRange_NoExtensionsMap +} +func (m *NoExtensionsMap) GetExtensions() *[]byte { + if m.XXX_extensions == nil { + m.XXX_extensions = make([]byte, 0) + } + return &m.XXX_extensions +} + +type Unrecognized struct { + Field1 *string `protobuf:"bytes,1,opt,name=Field1,json=field1" json:"Field1,omitempty"` +} + +func (m *Unrecognized) Reset() { *m = Unrecognized{} } +func (*Unrecognized) ProtoMessage() {} +func (*Unrecognized) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{54} } + +type UnrecognizedWithInner struct { + Embedded []*UnrecognizedWithInner_Inner `protobuf:"bytes,1,rep,name=embedded" json:"embedded,omitempty"` + Field2 *string `protobuf:"bytes,2,opt,name=Field2,json=field2" json:"Field2,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *UnrecognizedWithInner) Reset() { *m = UnrecognizedWithInner{} } +func (*UnrecognizedWithInner) ProtoMessage() {} +func (*UnrecognizedWithInner) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{55} } + +type UnrecognizedWithInner_Inner struct { + Field1 *uint32 `protobuf:"varint,1,opt,name=Field1,json=field1" json:"Field1,omitempty"` +} + +func (m *UnrecognizedWithInner_Inner) Reset() { *m = UnrecognizedWithInner_Inner{} } +func (*UnrecognizedWithInner_Inner) ProtoMessage() {} +func (*UnrecognizedWithInner_Inner) Descriptor() ([]byte, []int) { + return fileDescriptorThetest, []int{55, 0} +} + +type UnrecognizedWithEmbed struct { + UnrecognizedWithEmbed_Embedded `protobuf:"bytes,1,opt,name=embedded,embedded=embedded" json:"embedded"` + Field2 *string `protobuf:"bytes,2,opt,name=Field2,json=field2" json:"Field2,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *UnrecognizedWithEmbed) Reset() { *m = UnrecognizedWithEmbed{} } +func (*UnrecognizedWithEmbed) ProtoMessage() {} +func (*UnrecognizedWithEmbed) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{56} } + +type UnrecognizedWithEmbed_Embedded struct { + Field1 *uint32 `protobuf:"varint,1,opt,name=Field1,json=field1" json:"Field1,omitempty"` +} + +func (m *UnrecognizedWithEmbed_Embedded) Reset() { *m = UnrecognizedWithEmbed_Embedded{} } +func (*UnrecognizedWithEmbed_Embedded) ProtoMessage() {} +func (*UnrecognizedWithEmbed_Embedded) Descriptor() ([]byte, []int) { + return fileDescriptorThetest, []int{56, 0} +} + +type Node struct { + Label *string `protobuf:"bytes,1,opt,name=Label,json=label" json:"Label,omitempty"` + Children []*Node `protobuf:"bytes,2,rep,name=Children,json=children" json:"Children,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *Node) Reset() { *m = Node{} } +func (*Node) ProtoMessage() {} +func (*Node) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{57} } + +var E_FieldA = &proto.ExtensionDesc{ + ExtendedType: (*MyExtendable)(nil), + ExtensionType: (*float64)(nil), + Field: 100, + Name: "test.FieldA", + Tag: "fixed64,100,opt,name=FieldA,json=fieldA", +} + +var E_FieldB = &proto.ExtensionDesc{ + ExtendedType: (*MyExtendable)(nil), + ExtensionType: (*NinOptNative)(nil), + Field: 101, + Name: "test.FieldB", + Tag: "bytes,101,opt,name=FieldB,json=fieldB", +} + +var E_FieldC = &proto.ExtensionDesc{ + ExtendedType: (*MyExtendable)(nil), + ExtensionType: (*NinEmbeddedStruct)(nil), + Field: 102, + Name: "test.FieldC", + Tag: "bytes,102,opt,name=FieldC,json=fieldC", +} + +var E_FieldD = &proto.ExtensionDesc{ + ExtendedType: (*MyExtendable)(nil), + ExtensionType: ([]int64)(nil), + Field: 104, + Name: "test.FieldD", + Tag: "varint,104,rep,name=FieldD,json=fieldD", +} + +var E_FieldE = &proto.ExtensionDesc{ + ExtendedType: (*MyExtendable)(nil), + ExtensionType: ([]*NinOptNative)(nil), + Field: 105, + Name: "test.FieldE", + Tag: "bytes,105,rep,name=FieldE,json=fieldE", +} + +var E_FieldA1 = &proto.ExtensionDesc{ + ExtendedType: (*NoExtensionsMap)(nil), + ExtensionType: (*float64)(nil), + Field: 100, + Name: "test.FieldA1", + Tag: "fixed64,100,opt,name=FieldA1,json=fieldA1", +} + +var E_FieldB1 = &proto.ExtensionDesc{ + ExtendedType: (*NoExtensionsMap)(nil), + ExtensionType: (*NinOptNative)(nil), + Field: 101, + Name: "test.FieldB1", + Tag: "bytes,101,opt,name=FieldB1,json=fieldB1", +} + +var E_FieldC1 = &proto.ExtensionDesc{ + ExtendedType: (*NoExtensionsMap)(nil), + ExtensionType: (*NinEmbeddedStruct)(nil), + Field: 102, + Name: "test.FieldC1", + Tag: "bytes,102,opt,name=FieldC1,json=fieldC1", +} + +func init() { + proto.RegisterType((*NidOptNative)(nil), "test.NidOptNative") + proto.RegisterType((*NinOptNative)(nil), "test.NinOptNative") + proto.RegisterType((*NidRepNative)(nil), "test.NidRepNative") + proto.RegisterType((*NinRepNative)(nil), "test.NinRepNative") + proto.RegisterType((*NidRepPackedNative)(nil), "test.NidRepPackedNative") + proto.RegisterType((*NinRepPackedNative)(nil), "test.NinRepPackedNative") + proto.RegisterType((*NidOptStruct)(nil), "test.NidOptStruct") + proto.RegisterType((*NinOptStruct)(nil), "test.NinOptStruct") + proto.RegisterType((*NidRepStruct)(nil), "test.NidRepStruct") + proto.RegisterType((*NinRepStruct)(nil), "test.NinRepStruct") + proto.RegisterType((*NidEmbeddedStruct)(nil), "test.NidEmbeddedStruct") + proto.RegisterType((*NinEmbeddedStruct)(nil), "test.NinEmbeddedStruct") + proto.RegisterType((*NidNestedStruct)(nil), "test.NidNestedStruct") + proto.RegisterType((*NinNestedStruct)(nil), "test.NinNestedStruct") + proto.RegisterType((*NidOptCustom)(nil), "test.NidOptCustom") + proto.RegisterType((*CustomDash)(nil), "test.CustomDash") + proto.RegisterType((*NinOptCustom)(nil), "test.NinOptCustom") + proto.RegisterType((*NidRepCustom)(nil), "test.NidRepCustom") + proto.RegisterType((*NinRepCustom)(nil), "test.NinRepCustom") + proto.RegisterType((*NinOptNativeUnion)(nil), "test.NinOptNativeUnion") + proto.RegisterType((*NinOptStructUnion)(nil), "test.NinOptStructUnion") + proto.RegisterType((*NinEmbeddedStructUnion)(nil), "test.NinEmbeddedStructUnion") + proto.RegisterType((*NinNestedStructUnion)(nil), "test.NinNestedStructUnion") + proto.RegisterType((*Tree)(nil), "test.Tree") + proto.RegisterType((*OrBranch)(nil), "test.OrBranch") + proto.RegisterType((*AndBranch)(nil), "test.AndBranch") + proto.RegisterType((*Leaf)(nil), "test.Leaf") + proto.RegisterType((*DeepTree)(nil), "test.DeepTree") + proto.RegisterType((*ADeepBranch)(nil), "test.ADeepBranch") + proto.RegisterType((*AndDeepBranch)(nil), "test.AndDeepBranch") + proto.RegisterType((*DeepLeaf)(nil), "test.DeepLeaf") + proto.RegisterType((*Nil)(nil), "test.Nil") + proto.RegisterType((*NidOptEnum)(nil), "test.NidOptEnum") + proto.RegisterType((*NinOptEnum)(nil), "test.NinOptEnum") + proto.RegisterType((*NidRepEnum)(nil), "test.NidRepEnum") + proto.RegisterType((*NinRepEnum)(nil), "test.NinRepEnum") + proto.RegisterType((*NinOptEnumDefault)(nil), "test.NinOptEnumDefault") + proto.RegisterType((*AnotherNinOptEnum)(nil), "test.AnotherNinOptEnum") + proto.RegisterType((*AnotherNinOptEnumDefault)(nil), "test.AnotherNinOptEnumDefault") + proto.RegisterType((*Timer)(nil), "test.Timer") + proto.RegisterType((*MyExtendable)(nil), "test.MyExtendable") + proto.RegisterType((*OtherExtenable)(nil), "test.OtherExtenable") + proto.RegisterType((*NestedDefinition)(nil), "test.NestedDefinition") + proto.RegisterType((*NestedDefinition_NestedMessage)(nil), "test.NestedDefinition.NestedMessage") + proto.RegisterType((*NestedDefinition_NestedMessage_NestedNestedMsg)(nil), "test.NestedDefinition.NestedMessage.NestedNestedMsg") + proto.RegisterType((*NestedScope)(nil), "test.NestedScope") + proto.RegisterType((*NinOptNativeDefault)(nil), "test.NinOptNativeDefault") + proto.RegisterType((*CustomContainer)(nil), "test.CustomContainer") + proto.RegisterType((*CustomNameNidOptNative)(nil), "test.CustomNameNidOptNative") + proto.RegisterType((*CustomNameNinOptNative)(nil), "test.CustomNameNinOptNative") + proto.RegisterType((*CustomNameNinRepNative)(nil), "test.CustomNameNinRepNative") + proto.RegisterType((*CustomNameNinStruct)(nil), "test.CustomNameNinStruct") + proto.RegisterType((*CustomNameCustomType)(nil), "test.CustomNameCustomType") + proto.RegisterType((*CustomNameNinEmbeddedStructUnion)(nil), "test.CustomNameNinEmbeddedStructUnion") + proto.RegisterType((*CustomNameEnum)(nil), "test.CustomNameEnum") + proto.RegisterType((*NoExtensionsMap)(nil), "test.NoExtensionsMap") + proto.RegisterType((*Unrecognized)(nil), "test.Unrecognized") + proto.RegisterType((*UnrecognizedWithInner)(nil), "test.UnrecognizedWithInner") + proto.RegisterType((*UnrecognizedWithInner_Inner)(nil), "test.UnrecognizedWithInner.Inner") + proto.RegisterType((*UnrecognizedWithEmbed)(nil), "test.UnrecognizedWithEmbed") + proto.RegisterType((*UnrecognizedWithEmbed_Embedded)(nil), "test.UnrecognizedWithEmbed.Embedded") + proto.RegisterType((*Node)(nil), "test.Node") + proto.RegisterEnum("test.TheTestEnum", TheTestEnum_name, TheTestEnum_value) + proto.RegisterEnum("test.AnotherTestEnum", AnotherTestEnum_name, AnotherTestEnum_value) + proto.RegisterEnum("test.YetAnotherTestEnum", YetAnotherTestEnum_name, YetAnotherTestEnum_value) + proto.RegisterEnum("test.YetYetAnotherTestEnum", YetYetAnotherTestEnum_name, YetYetAnotherTestEnum_value) + proto.RegisterEnum("test.NestedDefinition_NestedEnum", NestedDefinition_NestedEnum_name, NestedDefinition_NestedEnum_value) + proto.RegisterExtension(E_FieldA) + proto.RegisterExtension(E_FieldB) + proto.RegisterExtension(E_FieldC) + proto.RegisterExtension(E_FieldD) + proto.RegisterExtension(E_FieldE) + proto.RegisterExtension(E_FieldA1) + proto.RegisterExtension(E_FieldB1) + proto.RegisterExtension(E_FieldC1) +} +func (this *NidOptNative) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NidOptNative) + if !ok { + that2, ok := that.(NidOptNative) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.Field1 != that1.Field1 { + if this.Field1 < that1.Field1 { + return -1 + } + return 1 + } + if this.Field2 != that1.Field2 { + if this.Field2 < that1.Field2 { + return -1 + } + return 1 + } + if this.Field3 != that1.Field3 { + if this.Field3 < that1.Field3 { + return -1 + } + return 1 + } + if this.Field4 != that1.Field4 { + if this.Field4 < that1.Field4 { + return -1 + } + return 1 + } + if this.Field5 != that1.Field5 { + if this.Field5 < that1.Field5 { + return -1 + } + return 1 + } + if this.Field6 != that1.Field6 { + if this.Field6 < that1.Field6 { + return -1 + } + return 1 + } + if this.Field7 != that1.Field7 { + if this.Field7 < that1.Field7 { + return -1 + } + return 1 + } + if this.Field8 != that1.Field8 { + if this.Field8 < that1.Field8 { + return -1 + } + return 1 + } + if this.Field9 != that1.Field9 { + if this.Field9 < that1.Field9 { + return -1 + } + return 1 + } + if this.Field10 != that1.Field10 { + if this.Field10 < that1.Field10 { + return -1 + } + return 1 + } + if this.Field11 != that1.Field11 { + if this.Field11 < that1.Field11 { + return -1 + } + return 1 + } + if this.Field12 != that1.Field12 { + if this.Field12 < that1.Field12 { + return -1 + } + return 1 + } + if this.Field13 != that1.Field13 { + if !this.Field13 { + return -1 + } + return 1 + } + if this.Field14 != that1.Field14 { + if this.Field14 < that1.Field14 { + return -1 + } + return 1 + } + if c := bytes.Compare(this.Field15, that1.Field15); c != 0 { + return c + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NinOptNative) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NinOptNative) + if !ok { + that2, ok := that.(NinOptNative) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + if *this.Field1 < *that1.Field1 { + return -1 + } + return 1 + } + } else if this.Field1 != nil { + return 1 + } else if that1.Field1 != nil { + return -1 + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + if *this.Field2 < *that1.Field2 { + return -1 + } + return 1 + } + } else if this.Field2 != nil { + return 1 + } else if that1.Field2 != nil { + return -1 + } + if this.Field3 != nil && that1.Field3 != nil { + if *this.Field3 != *that1.Field3 { + if *this.Field3 < *that1.Field3 { + return -1 + } + return 1 + } + } else if this.Field3 != nil { + return 1 + } else if that1.Field3 != nil { + return -1 + } + if this.Field4 != nil && that1.Field4 != nil { + if *this.Field4 != *that1.Field4 { + if *this.Field4 < *that1.Field4 { + return -1 + } + return 1 + } + } else if this.Field4 != nil { + return 1 + } else if that1.Field4 != nil { + return -1 + } + if this.Field5 != nil && that1.Field5 != nil { + if *this.Field5 != *that1.Field5 { + if *this.Field5 < *that1.Field5 { + return -1 + } + return 1 + } + } else if this.Field5 != nil { + return 1 + } else if that1.Field5 != nil { + return -1 + } + if this.Field6 != nil && that1.Field6 != nil { + if *this.Field6 != *that1.Field6 { + if *this.Field6 < *that1.Field6 { + return -1 + } + return 1 + } + } else if this.Field6 != nil { + return 1 + } else if that1.Field6 != nil { + return -1 + } + if this.Field7 != nil && that1.Field7 != nil { + if *this.Field7 != *that1.Field7 { + if *this.Field7 < *that1.Field7 { + return -1 + } + return 1 + } + } else if this.Field7 != nil { + return 1 + } else if that1.Field7 != nil { + return -1 + } + if this.Field8 != nil && that1.Field8 != nil { + if *this.Field8 != *that1.Field8 { + if *this.Field8 < *that1.Field8 { + return -1 + } + return 1 + } + } else if this.Field8 != nil { + return 1 + } else if that1.Field8 != nil { + return -1 + } + if this.Field9 != nil && that1.Field9 != nil { + if *this.Field9 != *that1.Field9 { + if *this.Field9 < *that1.Field9 { + return -1 + } + return 1 + } + } else if this.Field9 != nil { + return 1 + } else if that1.Field9 != nil { + return -1 + } + if this.Field10 != nil && that1.Field10 != nil { + if *this.Field10 != *that1.Field10 { + if *this.Field10 < *that1.Field10 { + return -1 + } + return 1 + } + } else if this.Field10 != nil { + return 1 + } else if that1.Field10 != nil { + return -1 + } + if this.Field11 != nil && that1.Field11 != nil { + if *this.Field11 != *that1.Field11 { + if *this.Field11 < *that1.Field11 { + return -1 + } + return 1 + } + } else if this.Field11 != nil { + return 1 + } else if that1.Field11 != nil { + return -1 + } + if this.Field12 != nil && that1.Field12 != nil { + if *this.Field12 != *that1.Field12 { + if *this.Field12 < *that1.Field12 { + return -1 + } + return 1 + } + } else if this.Field12 != nil { + return 1 + } else if that1.Field12 != nil { + return -1 + } + if this.Field13 != nil && that1.Field13 != nil { + if *this.Field13 != *that1.Field13 { + if !*this.Field13 { + return -1 + } + return 1 + } + } else if this.Field13 != nil { + return 1 + } else if that1.Field13 != nil { + return -1 + } + if this.Field14 != nil && that1.Field14 != nil { + if *this.Field14 != *that1.Field14 { + if *this.Field14 < *that1.Field14 { + return -1 + } + return 1 + } + } else if this.Field14 != nil { + return 1 + } else if that1.Field14 != nil { + return -1 + } + if c := bytes.Compare(this.Field15, that1.Field15); c != 0 { + return c + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NidRepNative) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NidRepNative) + if !ok { + that2, ok := that.(NidRepNative) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if len(this.Field1) != len(that1.Field1) { + if len(this.Field1) < len(that1.Field1) { + return -1 + } + return 1 + } + for i := range this.Field1 { + if this.Field1[i] != that1.Field1[i] { + if this.Field1[i] < that1.Field1[i] { + return -1 + } + return 1 + } + } + if len(this.Field2) != len(that1.Field2) { + if len(this.Field2) < len(that1.Field2) { + return -1 + } + return 1 + } + for i := range this.Field2 { + if this.Field2[i] != that1.Field2[i] { + if this.Field2[i] < that1.Field2[i] { + return -1 + } + return 1 + } + } + if len(this.Field3) != len(that1.Field3) { + if len(this.Field3) < len(that1.Field3) { + return -1 + } + return 1 + } + for i := range this.Field3 { + if this.Field3[i] != that1.Field3[i] { + if this.Field3[i] < that1.Field3[i] { + return -1 + } + return 1 + } + } + if len(this.Field4) != len(that1.Field4) { + if len(this.Field4) < len(that1.Field4) { + return -1 + } + return 1 + } + for i := range this.Field4 { + if this.Field4[i] != that1.Field4[i] { + if this.Field4[i] < that1.Field4[i] { + return -1 + } + return 1 + } + } + if len(this.Field5) != len(that1.Field5) { + if len(this.Field5) < len(that1.Field5) { + return -1 + } + return 1 + } + for i := range this.Field5 { + if this.Field5[i] != that1.Field5[i] { + if this.Field5[i] < that1.Field5[i] { + return -1 + } + return 1 + } + } + if len(this.Field6) != len(that1.Field6) { + if len(this.Field6) < len(that1.Field6) { + return -1 + } + return 1 + } + for i := range this.Field6 { + if this.Field6[i] != that1.Field6[i] { + if this.Field6[i] < that1.Field6[i] { + return -1 + } + return 1 + } + } + if len(this.Field7) != len(that1.Field7) { + if len(this.Field7) < len(that1.Field7) { + return -1 + } + return 1 + } + for i := range this.Field7 { + if this.Field7[i] != that1.Field7[i] { + if this.Field7[i] < that1.Field7[i] { + return -1 + } + return 1 + } + } + if len(this.Field8) != len(that1.Field8) { + if len(this.Field8) < len(that1.Field8) { + return -1 + } + return 1 + } + for i := range this.Field8 { + if this.Field8[i] != that1.Field8[i] { + if this.Field8[i] < that1.Field8[i] { + return -1 + } + return 1 + } + } + if len(this.Field9) != len(that1.Field9) { + if len(this.Field9) < len(that1.Field9) { + return -1 + } + return 1 + } + for i := range this.Field9 { + if this.Field9[i] != that1.Field9[i] { + if this.Field9[i] < that1.Field9[i] { + return -1 + } + return 1 + } + } + if len(this.Field10) != len(that1.Field10) { + if len(this.Field10) < len(that1.Field10) { + return -1 + } + return 1 + } + for i := range this.Field10 { + if this.Field10[i] != that1.Field10[i] { + if this.Field10[i] < that1.Field10[i] { + return -1 + } + return 1 + } + } + if len(this.Field11) != len(that1.Field11) { + if len(this.Field11) < len(that1.Field11) { + return -1 + } + return 1 + } + for i := range this.Field11 { + if this.Field11[i] != that1.Field11[i] { + if this.Field11[i] < that1.Field11[i] { + return -1 + } + return 1 + } + } + if len(this.Field12) != len(that1.Field12) { + if len(this.Field12) < len(that1.Field12) { + return -1 + } + return 1 + } + for i := range this.Field12 { + if this.Field12[i] != that1.Field12[i] { + if this.Field12[i] < that1.Field12[i] { + return -1 + } + return 1 + } + } + if len(this.Field13) != len(that1.Field13) { + if len(this.Field13) < len(that1.Field13) { + return -1 + } + return 1 + } + for i := range this.Field13 { + if this.Field13[i] != that1.Field13[i] { + if !this.Field13[i] { + return -1 + } + return 1 + } + } + if len(this.Field14) != len(that1.Field14) { + if len(this.Field14) < len(that1.Field14) { + return -1 + } + return 1 + } + for i := range this.Field14 { + if this.Field14[i] != that1.Field14[i] { + if this.Field14[i] < that1.Field14[i] { + return -1 + } + return 1 + } + } + if len(this.Field15) != len(that1.Field15) { + if len(this.Field15) < len(that1.Field15) { + return -1 + } + return 1 + } + for i := range this.Field15 { + if c := bytes.Compare(this.Field15[i], that1.Field15[i]); c != 0 { + return c + } + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NinRepNative) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NinRepNative) + if !ok { + that2, ok := that.(NinRepNative) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if len(this.Field1) != len(that1.Field1) { + if len(this.Field1) < len(that1.Field1) { + return -1 + } + return 1 + } + for i := range this.Field1 { + if this.Field1[i] != that1.Field1[i] { + if this.Field1[i] < that1.Field1[i] { + return -1 + } + return 1 + } + } + if len(this.Field2) != len(that1.Field2) { + if len(this.Field2) < len(that1.Field2) { + return -1 + } + return 1 + } + for i := range this.Field2 { + if this.Field2[i] != that1.Field2[i] { + if this.Field2[i] < that1.Field2[i] { + return -1 + } + return 1 + } + } + if len(this.Field3) != len(that1.Field3) { + if len(this.Field3) < len(that1.Field3) { + return -1 + } + return 1 + } + for i := range this.Field3 { + if this.Field3[i] != that1.Field3[i] { + if this.Field3[i] < that1.Field3[i] { + return -1 + } + return 1 + } + } + if len(this.Field4) != len(that1.Field4) { + if len(this.Field4) < len(that1.Field4) { + return -1 + } + return 1 + } + for i := range this.Field4 { + if this.Field4[i] != that1.Field4[i] { + if this.Field4[i] < that1.Field4[i] { + return -1 + } + return 1 + } + } + if len(this.Field5) != len(that1.Field5) { + if len(this.Field5) < len(that1.Field5) { + return -1 + } + return 1 + } + for i := range this.Field5 { + if this.Field5[i] != that1.Field5[i] { + if this.Field5[i] < that1.Field5[i] { + return -1 + } + return 1 + } + } + if len(this.Field6) != len(that1.Field6) { + if len(this.Field6) < len(that1.Field6) { + return -1 + } + return 1 + } + for i := range this.Field6 { + if this.Field6[i] != that1.Field6[i] { + if this.Field6[i] < that1.Field6[i] { + return -1 + } + return 1 + } + } + if len(this.Field7) != len(that1.Field7) { + if len(this.Field7) < len(that1.Field7) { + return -1 + } + return 1 + } + for i := range this.Field7 { + if this.Field7[i] != that1.Field7[i] { + if this.Field7[i] < that1.Field7[i] { + return -1 + } + return 1 + } + } + if len(this.Field8) != len(that1.Field8) { + if len(this.Field8) < len(that1.Field8) { + return -1 + } + return 1 + } + for i := range this.Field8 { + if this.Field8[i] != that1.Field8[i] { + if this.Field8[i] < that1.Field8[i] { + return -1 + } + return 1 + } + } + if len(this.Field9) != len(that1.Field9) { + if len(this.Field9) < len(that1.Field9) { + return -1 + } + return 1 + } + for i := range this.Field9 { + if this.Field9[i] != that1.Field9[i] { + if this.Field9[i] < that1.Field9[i] { + return -1 + } + return 1 + } + } + if len(this.Field10) != len(that1.Field10) { + if len(this.Field10) < len(that1.Field10) { + return -1 + } + return 1 + } + for i := range this.Field10 { + if this.Field10[i] != that1.Field10[i] { + if this.Field10[i] < that1.Field10[i] { + return -1 + } + return 1 + } + } + if len(this.Field11) != len(that1.Field11) { + if len(this.Field11) < len(that1.Field11) { + return -1 + } + return 1 + } + for i := range this.Field11 { + if this.Field11[i] != that1.Field11[i] { + if this.Field11[i] < that1.Field11[i] { + return -1 + } + return 1 + } + } + if len(this.Field12) != len(that1.Field12) { + if len(this.Field12) < len(that1.Field12) { + return -1 + } + return 1 + } + for i := range this.Field12 { + if this.Field12[i] != that1.Field12[i] { + if this.Field12[i] < that1.Field12[i] { + return -1 + } + return 1 + } + } + if len(this.Field13) != len(that1.Field13) { + if len(this.Field13) < len(that1.Field13) { + return -1 + } + return 1 + } + for i := range this.Field13 { + if this.Field13[i] != that1.Field13[i] { + if !this.Field13[i] { + return -1 + } + return 1 + } + } + if len(this.Field14) != len(that1.Field14) { + if len(this.Field14) < len(that1.Field14) { + return -1 + } + return 1 + } + for i := range this.Field14 { + if this.Field14[i] != that1.Field14[i] { + if this.Field14[i] < that1.Field14[i] { + return -1 + } + return 1 + } + } + if len(this.Field15) != len(that1.Field15) { + if len(this.Field15) < len(that1.Field15) { + return -1 + } + return 1 + } + for i := range this.Field15 { + if c := bytes.Compare(this.Field15[i], that1.Field15[i]); c != 0 { + return c + } + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NidRepPackedNative) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NidRepPackedNative) + if !ok { + that2, ok := that.(NidRepPackedNative) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if len(this.Field1) != len(that1.Field1) { + if len(this.Field1) < len(that1.Field1) { + return -1 + } + return 1 + } + for i := range this.Field1 { + if this.Field1[i] != that1.Field1[i] { + if this.Field1[i] < that1.Field1[i] { + return -1 + } + return 1 + } + } + if len(this.Field2) != len(that1.Field2) { + if len(this.Field2) < len(that1.Field2) { + return -1 + } + return 1 + } + for i := range this.Field2 { + if this.Field2[i] != that1.Field2[i] { + if this.Field2[i] < that1.Field2[i] { + return -1 + } + return 1 + } + } + if len(this.Field3) != len(that1.Field3) { + if len(this.Field3) < len(that1.Field3) { + return -1 + } + return 1 + } + for i := range this.Field3 { + if this.Field3[i] != that1.Field3[i] { + if this.Field3[i] < that1.Field3[i] { + return -1 + } + return 1 + } + } + if len(this.Field4) != len(that1.Field4) { + if len(this.Field4) < len(that1.Field4) { + return -1 + } + return 1 + } + for i := range this.Field4 { + if this.Field4[i] != that1.Field4[i] { + if this.Field4[i] < that1.Field4[i] { + return -1 + } + return 1 + } + } + if len(this.Field5) != len(that1.Field5) { + if len(this.Field5) < len(that1.Field5) { + return -1 + } + return 1 + } + for i := range this.Field5 { + if this.Field5[i] != that1.Field5[i] { + if this.Field5[i] < that1.Field5[i] { + return -1 + } + return 1 + } + } + if len(this.Field6) != len(that1.Field6) { + if len(this.Field6) < len(that1.Field6) { + return -1 + } + return 1 + } + for i := range this.Field6 { + if this.Field6[i] != that1.Field6[i] { + if this.Field6[i] < that1.Field6[i] { + return -1 + } + return 1 + } + } + if len(this.Field7) != len(that1.Field7) { + if len(this.Field7) < len(that1.Field7) { + return -1 + } + return 1 + } + for i := range this.Field7 { + if this.Field7[i] != that1.Field7[i] { + if this.Field7[i] < that1.Field7[i] { + return -1 + } + return 1 + } + } + if len(this.Field8) != len(that1.Field8) { + if len(this.Field8) < len(that1.Field8) { + return -1 + } + return 1 + } + for i := range this.Field8 { + if this.Field8[i] != that1.Field8[i] { + if this.Field8[i] < that1.Field8[i] { + return -1 + } + return 1 + } + } + if len(this.Field9) != len(that1.Field9) { + if len(this.Field9) < len(that1.Field9) { + return -1 + } + return 1 + } + for i := range this.Field9 { + if this.Field9[i] != that1.Field9[i] { + if this.Field9[i] < that1.Field9[i] { + return -1 + } + return 1 + } + } + if len(this.Field10) != len(that1.Field10) { + if len(this.Field10) < len(that1.Field10) { + return -1 + } + return 1 + } + for i := range this.Field10 { + if this.Field10[i] != that1.Field10[i] { + if this.Field10[i] < that1.Field10[i] { + return -1 + } + return 1 + } + } + if len(this.Field11) != len(that1.Field11) { + if len(this.Field11) < len(that1.Field11) { + return -1 + } + return 1 + } + for i := range this.Field11 { + if this.Field11[i] != that1.Field11[i] { + if this.Field11[i] < that1.Field11[i] { + return -1 + } + return 1 + } + } + if len(this.Field12) != len(that1.Field12) { + if len(this.Field12) < len(that1.Field12) { + return -1 + } + return 1 + } + for i := range this.Field12 { + if this.Field12[i] != that1.Field12[i] { + if this.Field12[i] < that1.Field12[i] { + return -1 + } + return 1 + } + } + if len(this.Field13) != len(that1.Field13) { + if len(this.Field13) < len(that1.Field13) { + return -1 + } + return 1 + } + for i := range this.Field13 { + if this.Field13[i] != that1.Field13[i] { + if !this.Field13[i] { + return -1 + } + return 1 + } + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NinRepPackedNative) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NinRepPackedNative) + if !ok { + that2, ok := that.(NinRepPackedNative) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if len(this.Field1) != len(that1.Field1) { + if len(this.Field1) < len(that1.Field1) { + return -1 + } + return 1 + } + for i := range this.Field1 { + if this.Field1[i] != that1.Field1[i] { + if this.Field1[i] < that1.Field1[i] { + return -1 + } + return 1 + } + } + if len(this.Field2) != len(that1.Field2) { + if len(this.Field2) < len(that1.Field2) { + return -1 + } + return 1 + } + for i := range this.Field2 { + if this.Field2[i] != that1.Field2[i] { + if this.Field2[i] < that1.Field2[i] { + return -1 + } + return 1 + } + } + if len(this.Field3) != len(that1.Field3) { + if len(this.Field3) < len(that1.Field3) { + return -1 + } + return 1 + } + for i := range this.Field3 { + if this.Field3[i] != that1.Field3[i] { + if this.Field3[i] < that1.Field3[i] { + return -1 + } + return 1 + } + } + if len(this.Field4) != len(that1.Field4) { + if len(this.Field4) < len(that1.Field4) { + return -1 + } + return 1 + } + for i := range this.Field4 { + if this.Field4[i] != that1.Field4[i] { + if this.Field4[i] < that1.Field4[i] { + return -1 + } + return 1 + } + } + if len(this.Field5) != len(that1.Field5) { + if len(this.Field5) < len(that1.Field5) { + return -1 + } + return 1 + } + for i := range this.Field5 { + if this.Field5[i] != that1.Field5[i] { + if this.Field5[i] < that1.Field5[i] { + return -1 + } + return 1 + } + } + if len(this.Field6) != len(that1.Field6) { + if len(this.Field6) < len(that1.Field6) { + return -1 + } + return 1 + } + for i := range this.Field6 { + if this.Field6[i] != that1.Field6[i] { + if this.Field6[i] < that1.Field6[i] { + return -1 + } + return 1 + } + } + if len(this.Field7) != len(that1.Field7) { + if len(this.Field7) < len(that1.Field7) { + return -1 + } + return 1 + } + for i := range this.Field7 { + if this.Field7[i] != that1.Field7[i] { + if this.Field7[i] < that1.Field7[i] { + return -1 + } + return 1 + } + } + if len(this.Field8) != len(that1.Field8) { + if len(this.Field8) < len(that1.Field8) { + return -1 + } + return 1 + } + for i := range this.Field8 { + if this.Field8[i] != that1.Field8[i] { + if this.Field8[i] < that1.Field8[i] { + return -1 + } + return 1 + } + } + if len(this.Field9) != len(that1.Field9) { + if len(this.Field9) < len(that1.Field9) { + return -1 + } + return 1 + } + for i := range this.Field9 { + if this.Field9[i] != that1.Field9[i] { + if this.Field9[i] < that1.Field9[i] { + return -1 + } + return 1 + } + } + if len(this.Field10) != len(that1.Field10) { + if len(this.Field10) < len(that1.Field10) { + return -1 + } + return 1 + } + for i := range this.Field10 { + if this.Field10[i] != that1.Field10[i] { + if this.Field10[i] < that1.Field10[i] { + return -1 + } + return 1 + } + } + if len(this.Field11) != len(that1.Field11) { + if len(this.Field11) < len(that1.Field11) { + return -1 + } + return 1 + } + for i := range this.Field11 { + if this.Field11[i] != that1.Field11[i] { + if this.Field11[i] < that1.Field11[i] { + return -1 + } + return 1 + } + } + if len(this.Field12) != len(that1.Field12) { + if len(this.Field12) < len(that1.Field12) { + return -1 + } + return 1 + } + for i := range this.Field12 { + if this.Field12[i] != that1.Field12[i] { + if this.Field12[i] < that1.Field12[i] { + return -1 + } + return 1 + } + } + if len(this.Field13) != len(that1.Field13) { + if len(this.Field13) < len(that1.Field13) { + return -1 + } + return 1 + } + for i := range this.Field13 { + if this.Field13[i] != that1.Field13[i] { + if !this.Field13[i] { + return -1 + } + return 1 + } + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NidOptStruct) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NidOptStruct) + if !ok { + that2, ok := that.(NidOptStruct) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.Field1 != that1.Field1 { + if this.Field1 < that1.Field1 { + return -1 + } + return 1 + } + if this.Field2 != that1.Field2 { + if this.Field2 < that1.Field2 { + return -1 + } + return 1 + } + if c := this.Field3.Compare(&that1.Field3); c != 0 { + return c + } + if c := this.Field4.Compare(&that1.Field4); c != 0 { + return c + } + if this.Field6 != that1.Field6 { + if this.Field6 < that1.Field6 { + return -1 + } + return 1 + } + if this.Field7 != that1.Field7 { + if this.Field7 < that1.Field7 { + return -1 + } + return 1 + } + if c := this.Field8.Compare(&that1.Field8); c != 0 { + return c + } + if this.Field13 != that1.Field13 { + if !this.Field13 { + return -1 + } + return 1 + } + if this.Field14 != that1.Field14 { + if this.Field14 < that1.Field14 { + return -1 + } + return 1 + } + if c := bytes.Compare(this.Field15, that1.Field15); c != 0 { + return c + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NinOptStruct) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NinOptStruct) + if !ok { + that2, ok := that.(NinOptStruct) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + if *this.Field1 < *that1.Field1 { + return -1 + } + return 1 + } + } else if this.Field1 != nil { + return 1 + } else if that1.Field1 != nil { + return -1 + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + if *this.Field2 < *that1.Field2 { + return -1 + } + return 1 + } + } else if this.Field2 != nil { + return 1 + } else if that1.Field2 != nil { + return -1 + } + if c := this.Field3.Compare(that1.Field3); c != 0 { + return c + } + if c := this.Field4.Compare(that1.Field4); c != 0 { + return c + } + if this.Field6 != nil && that1.Field6 != nil { + if *this.Field6 != *that1.Field6 { + if *this.Field6 < *that1.Field6 { + return -1 + } + return 1 + } + } else if this.Field6 != nil { + return 1 + } else if that1.Field6 != nil { + return -1 + } + if this.Field7 != nil && that1.Field7 != nil { + if *this.Field7 != *that1.Field7 { + if *this.Field7 < *that1.Field7 { + return -1 + } + return 1 + } + } else if this.Field7 != nil { + return 1 + } else if that1.Field7 != nil { + return -1 + } + if c := this.Field8.Compare(that1.Field8); c != 0 { + return c + } + if this.Field13 != nil && that1.Field13 != nil { + if *this.Field13 != *that1.Field13 { + if !*this.Field13 { + return -1 + } + return 1 + } + } else if this.Field13 != nil { + return 1 + } else if that1.Field13 != nil { + return -1 + } + if this.Field14 != nil && that1.Field14 != nil { + if *this.Field14 != *that1.Field14 { + if *this.Field14 < *that1.Field14 { + return -1 + } + return 1 + } + } else if this.Field14 != nil { + return 1 + } else if that1.Field14 != nil { + return -1 + } + if c := bytes.Compare(this.Field15, that1.Field15); c != 0 { + return c + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NidRepStruct) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NidRepStruct) + if !ok { + that2, ok := that.(NidRepStruct) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if len(this.Field1) != len(that1.Field1) { + if len(this.Field1) < len(that1.Field1) { + return -1 + } + return 1 + } + for i := range this.Field1 { + if this.Field1[i] != that1.Field1[i] { + if this.Field1[i] < that1.Field1[i] { + return -1 + } + return 1 + } + } + if len(this.Field2) != len(that1.Field2) { + if len(this.Field2) < len(that1.Field2) { + return -1 + } + return 1 + } + for i := range this.Field2 { + if this.Field2[i] != that1.Field2[i] { + if this.Field2[i] < that1.Field2[i] { + return -1 + } + return 1 + } + } + if len(this.Field3) != len(that1.Field3) { + if len(this.Field3) < len(that1.Field3) { + return -1 + } + return 1 + } + for i := range this.Field3 { + if c := this.Field3[i].Compare(&that1.Field3[i]); c != 0 { + return c + } + } + if len(this.Field4) != len(that1.Field4) { + if len(this.Field4) < len(that1.Field4) { + return -1 + } + return 1 + } + for i := range this.Field4 { + if c := this.Field4[i].Compare(&that1.Field4[i]); c != 0 { + return c + } + } + if len(this.Field6) != len(that1.Field6) { + if len(this.Field6) < len(that1.Field6) { + return -1 + } + return 1 + } + for i := range this.Field6 { + if this.Field6[i] != that1.Field6[i] { + if this.Field6[i] < that1.Field6[i] { + return -1 + } + return 1 + } + } + if len(this.Field7) != len(that1.Field7) { + if len(this.Field7) < len(that1.Field7) { + return -1 + } + return 1 + } + for i := range this.Field7 { + if this.Field7[i] != that1.Field7[i] { + if this.Field7[i] < that1.Field7[i] { + return -1 + } + return 1 + } + } + if len(this.Field8) != len(that1.Field8) { + if len(this.Field8) < len(that1.Field8) { + return -1 + } + return 1 + } + for i := range this.Field8 { + if c := this.Field8[i].Compare(&that1.Field8[i]); c != 0 { + return c + } + } + if len(this.Field13) != len(that1.Field13) { + if len(this.Field13) < len(that1.Field13) { + return -1 + } + return 1 + } + for i := range this.Field13 { + if this.Field13[i] != that1.Field13[i] { + if !this.Field13[i] { + return -1 + } + return 1 + } + } + if len(this.Field14) != len(that1.Field14) { + if len(this.Field14) < len(that1.Field14) { + return -1 + } + return 1 + } + for i := range this.Field14 { + if this.Field14[i] != that1.Field14[i] { + if this.Field14[i] < that1.Field14[i] { + return -1 + } + return 1 + } + } + if len(this.Field15) != len(that1.Field15) { + if len(this.Field15) < len(that1.Field15) { + return -1 + } + return 1 + } + for i := range this.Field15 { + if c := bytes.Compare(this.Field15[i], that1.Field15[i]); c != 0 { + return c + } + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NinRepStruct) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NinRepStruct) + if !ok { + that2, ok := that.(NinRepStruct) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if len(this.Field1) != len(that1.Field1) { + if len(this.Field1) < len(that1.Field1) { + return -1 + } + return 1 + } + for i := range this.Field1 { + if this.Field1[i] != that1.Field1[i] { + if this.Field1[i] < that1.Field1[i] { + return -1 + } + return 1 + } + } + if len(this.Field2) != len(that1.Field2) { + if len(this.Field2) < len(that1.Field2) { + return -1 + } + return 1 + } + for i := range this.Field2 { + if this.Field2[i] != that1.Field2[i] { + if this.Field2[i] < that1.Field2[i] { + return -1 + } + return 1 + } + } + if len(this.Field3) != len(that1.Field3) { + if len(this.Field3) < len(that1.Field3) { + return -1 + } + return 1 + } + for i := range this.Field3 { + if c := this.Field3[i].Compare(that1.Field3[i]); c != 0 { + return c + } + } + if len(this.Field4) != len(that1.Field4) { + if len(this.Field4) < len(that1.Field4) { + return -1 + } + return 1 + } + for i := range this.Field4 { + if c := this.Field4[i].Compare(that1.Field4[i]); c != 0 { + return c + } + } + if len(this.Field6) != len(that1.Field6) { + if len(this.Field6) < len(that1.Field6) { + return -1 + } + return 1 + } + for i := range this.Field6 { + if this.Field6[i] != that1.Field6[i] { + if this.Field6[i] < that1.Field6[i] { + return -1 + } + return 1 + } + } + if len(this.Field7) != len(that1.Field7) { + if len(this.Field7) < len(that1.Field7) { + return -1 + } + return 1 + } + for i := range this.Field7 { + if this.Field7[i] != that1.Field7[i] { + if this.Field7[i] < that1.Field7[i] { + return -1 + } + return 1 + } + } + if len(this.Field8) != len(that1.Field8) { + if len(this.Field8) < len(that1.Field8) { + return -1 + } + return 1 + } + for i := range this.Field8 { + if c := this.Field8[i].Compare(that1.Field8[i]); c != 0 { + return c + } + } + if len(this.Field13) != len(that1.Field13) { + if len(this.Field13) < len(that1.Field13) { + return -1 + } + return 1 + } + for i := range this.Field13 { + if this.Field13[i] != that1.Field13[i] { + if !this.Field13[i] { + return -1 + } + return 1 + } + } + if len(this.Field14) != len(that1.Field14) { + if len(this.Field14) < len(that1.Field14) { + return -1 + } + return 1 + } + for i := range this.Field14 { + if this.Field14[i] != that1.Field14[i] { + if this.Field14[i] < that1.Field14[i] { + return -1 + } + return 1 + } + } + if len(this.Field15) != len(that1.Field15) { + if len(this.Field15) < len(that1.Field15) { + return -1 + } + return 1 + } + for i := range this.Field15 { + if c := bytes.Compare(this.Field15[i], that1.Field15[i]); c != 0 { + return c + } + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NidEmbeddedStruct) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NidEmbeddedStruct) + if !ok { + that2, ok := that.(NidEmbeddedStruct) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if c := this.NidOptNative.Compare(that1.NidOptNative); c != 0 { + return c + } + if c := this.Field200.Compare(&that1.Field200); c != 0 { + return c + } + if this.Field210 != that1.Field210 { + if !this.Field210 { + return -1 + } + return 1 + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NinEmbeddedStruct) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NinEmbeddedStruct) + if !ok { + that2, ok := that.(NinEmbeddedStruct) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if c := this.NidOptNative.Compare(that1.NidOptNative); c != 0 { + return c + } + if c := this.Field200.Compare(that1.Field200); c != 0 { + return c + } + if this.Field210 != nil && that1.Field210 != nil { + if *this.Field210 != *that1.Field210 { + if !*this.Field210 { + return -1 + } + return 1 + } + } else if this.Field210 != nil { + return 1 + } else if that1.Field210 != nil { + return -1 + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NidNestedStruct) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NidNestedStruct) + if !ok { + that2, ok := that.(NidNestedStruct) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if c := this.Field1.Compare(&that1.Field1); c != 0 { + return c + } + if len(this.Field2) != len(that1.Field2) { + if len(this.Field2) < len(that1.Field2) { + return -1 + } + return 1 + } + for i := range this.Field2 { + if c := this.Field2[i].Compare(&that1.Field2[i]); c != 0 { + return c + } + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NinNestedStruct) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NinNestedStruct) + if !ok { + that2, ok := that.(NinNestedStruct) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if c := this.Field1.Compare(that1.Field1); c != 0 { + return c + } + if len(this.Field2) != len(that1.Field2) { + if len(this.Field2) < len(that1.Field2) { + return -1 + } + return 1 + } + for i := range this.Field2 { + if c := this.Field2[i].Compare(that1.Field2[i]); c != 0 { + return c + } + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NidOptCustom) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NidOptCustom) + if !ok { + that2, ok := that.(NidOptCustom) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if c := this.Id.Compare(that1.Id); c != 0 { + return c + } + if c := this.Value.Compare(that1.Value); c != 0 { + return c + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *CustomDash) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*CustomDash) + if !ok { + that2, ok := that.(CustomDash) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if that1.Value == nil { + if this.Value != nil { + return 1 + } + } else if this.Value == nil { + return -1 + } else if c := this.Value.Compare(*that1.Value); c != 0 { + return c + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NinOptCustom) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NinOptCustom) + if !ok { + that2, ok := that.(NinOptCustom) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if that1.Id == nil { + if this.Id != nil { + return 1 + } + } else if this.Id == nil { + return -1 + } else if c := this.Id.Compare(*that1.Id); c != 0 { + return c + } + if that1.Value == nil { + if this.Value != nil { + return 1 + } + } else if this.Value == nil { + return -1 + } else if c := this.Value.Compare(*that1.Value); c != 0 { + return c + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NidRepCustom) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NidRepCustom) + if !ok { + that2, ok := that.(NidRepCustom) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if len(this.Id) != len(that1.Id) { + if len(this.Id) < len(that1.Id) { + return -1 + } + return 1 + } + for i := range this.Id { + if c := this.Id[i].Compare(that1.Id[i]); c != 0 { + return c + } + } + if len(this.Value) != len(that1.Value) { + if len(this.Value) < len(that1.Value) { + return -1 + } + return 1 + } + for i := range this.Value { + if c := this.Value[i].Compare(that1.Value[i]); c != 0 { + return c + } + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NinRepCustom) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NinRepCustom) + if !ok { + that2, ok := that.(NinRepCustom) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if len(this.Id) != len(that1.Id) { + if len(this.Id) < len(that1.Id) { + return -1 + } + return 1 + } + for i := range this.Id { + if c := this.Id[i].Compare(that1.Id[i]); c != 0 { + return c + } + } + if len(this.Value) != len(that1.Value) { + if len(this.Value) < len(that1.Value) { + return -1 + } + return 1 + } + for i := range this.Value { + if c := this.Value[i].Compare(that1.Value[i]); c != 0 { + return c + } + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NinOptNativeUnion) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NinOptNativeUnion) + if !ok { + that2, ok := that.(NinOptNativeUnion) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + if *this.Field1 < *that1.Field1 { + return -1 + } + return 1 + } + } else if this.Field1 != nil { + return 1 + } else if that1.Field1 != nil { + return -1 + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + if *this.Field2 < *that1.Field2 { + return -1 + } + return 1 + } + } else if this.Field2 != nil { + return 1 + } else if that1.Field2 != nil { + return -1 + } + if this.Field3 != nil && that1.Field3 != nil { + if *this.Field3 != *that1.Field3 { + if *this.Field3 < *that1.Field3 { + return -1 + } + return 1 + } + } else if this.Field3 != nil { + return 1 + } else if that1.Field3 != nil { + return -1 + } + if this.Field4 != nil && that1.Field4 != nil { + if *this.Field4 != *that1.Field4 { + if *this.Field4 < *that1.Field4 { + return -1 + } + return 1 + } + } else if this.Field4 != nil { + return 1 + } else if that1.Field4 != nil { + return -1 + } + if this.Field5 != nil && that1.Field5 != nil { + if *this.Field5 != *that1.Field5 { + if *this.Field5 < *that1.Field5 { + return -1 + } + return 1 + } + } else if this.Field5 != nil { + return 1 + } else if that1.Field5 != nil { + return -1 + } + if this.Field6 != nil && that1.Field6 != nil { + if *this.Field6 != *that1.Field6 { + if *this.Field6 < *that1.Field6 { + return -1 + } + return 1 + } + } else if this.Field6 != nil { + return 1 + } else if that1.Field6 != nil { + return -1 + } + if this.Field13 != nil && that1.Field13 != nil { + if *this.Field13 != *that1.Field13 { + if !*this.Field13 { + return -1 + } + return 1 + } + } else if this.Field13 != nil { + return 1 + } else if that1.Field13 != nil { + return -1 + } + if this.Field14 != nil && that1.Field14 != nil { + if *this.Field14 != *that1.Field14 { + if *this.Field14 < *that1.Field14 { + return -1 + } + return 1 + } + } else if this.Field14 != nil { + return 1 + } else if that1.Field14 != nil { + return -1 + } + if c := bytes.Compare(this.Field15, that1.Field15); c != 0 { + return c + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NinOptStructUnion) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NinOptStructUnion) + if !ok { + that2, ok := that.(NinOptStructUnion) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + if *this.Field1 < *that1.Field1 { + return -1 + } + return 1 + } + } else if this.Field1 != nil { + return 1 + } else if that1.Field1 != nil { + return -1 + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + if *this.Field2 < *that1.Field2 { + return -1 + } + return 1 + } + } else if this.Field2 != nil { + return 1 + } else if that1.Field2 != nil { + return -1 + } + if c := this.Field3.Compare(that1.Field3); c != 0 { + return c + } + if c := this.Field4.Compare(that1.Field4); c != 0 { + return c + } + if this.Field6 != nil && that1.Field6 != nil { + if *this.Field6 != *that1.Field6 { + if *this.Field6 < *that1.Field6 { + return -1 + } + return 1 + } + } else if this.Field6 != nil { + return 1 + } else if that1.Field6 != nil { + return -1 + } + if this.Field7 != nil && that1.Field7 != nil { + if *this.Field7 != *that1.Field7 { + if *this.Field7 < *that1.Field7 { + return -1 + } + return 1 + } + } else if this.Field7 != nil { + return 1 + } else if that1.Field7 != nil { + return -1 + } + if this.Field13 != nil && that1.Field13 != nil { + if *this.Field13 != *that1.Field13 { + if !*this.Field13 { + return -1 + } + return 1 + } + } else if this.Field13 != nil { + return 1 + } else if that1.Field13 != nil { + return -1 + } + if this.Field14 != nil && that1.Field14 != nil { + if *this.Field14 != *that1.Field14 { + if *this.Field14 < *that1.Field14 { + return -1 + } + return 1 + } + } else if this.Field14 != nil { + return 1 + } else if that1.Field14 != nil { + return -1 + } + if c := bytes.Compare(this.Field15, that1.Field15); c != 0 { + return c + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NinEmbeddedStructUnion) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NinEmbeddedStructUnion) + if !ok { + that2, ok := that.(NinEmbeddedStructUnion) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if c := this.NidOptNative.Compare(that1.NidOptNative); c != 0 { + return c + } + if c := this.Field200.Compare(that1.Field200); c != 0 { + return c + } + if this.Field210 != nil && that1.Field210 != nil { + if *this.Field210 != *that1.Field210 { + if !*this.Field210 { + return -1 + } + return 1 + } + } else if this.Field210 != nil { + return 1 + } else if that1.Field210 != nil { + return -1 + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NinNestedStructUnion) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NinNestedStructUnion) + if !ok { + that2, ok := that.(NinNestedStructUnion) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if c := this.Field1.Compare(that1.Field1); c != 0 { + return c + } + if c := this.Field2.Compare(that1.Field2); c != 0 { + return c + } + if c := this.Field3.Compare(that1.Field3); c != 0 { + return c + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *Tree) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*Tree) + if !ok { + that2, ok := that.(Tree) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if c := this.Or.Compare(that1.Or); c != 0 { + return c + } + if c := this.And.Compare(that1.And); c != 0 { + return c + } + if c := this.Leaf.Compare(that1.Leaf); c != 0 { + return c + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *OrBranch) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*OrBranch) + if !ok { + that2, ok := that.(OrBranch) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if c := this.Left.Compare(&that1.Left); c != 0 { + return c + } + if c := this.Right.Compare(&that1.Right); c != 0 { + return c + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *AndBranch) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*AndBranch) + if !ok { + that2, ok := that.(AndBranch) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if c := this.Left.Compare(&that1.Left); c != 0 { + return c + } + if c := this.Right.Compare(&that1.Right); c != 0 { + return c + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *Leaf) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*Leaf) + if !ok { + that2, ok := that.(Leaf) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.Value != that1.Value { + if this.Value < that1.Value { + return -1 + } + return 1 + } + if this.StrValue != that1.StrValue { + if this.StrValue < that1.StrValue { + return -1 + } + return 1 + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *DeepTree) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*DeepTree) + if !ok { + that2, ok := that.(DeepTree) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if c := this.Down.Compare(that1.Down); c != 0 { + return c + } + if c := this.And.Compare(that1.And); c != 0 { + return c + } + if c := this.Leaf.Compare(that1.Leaf); c != 0 { + return c + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *ADeepBranch) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*ADeepBranch) + if !ok { + that2, ok := that.(ADeepBranch) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if c := this.Down.Compare(&that1.Down); c != 0 { + return c + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *AndDeepBranch) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*AndDeepBranch) + if !ok { + that2, ok := that.(AndDeepBranch) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if c := this.Left.Compare(&that1.Left); c != 0 { + return c + } + if c := this.Right.Compare(&that1.Right); c != 0 { + return c + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *DeepLeaf) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*DeepLeaf) + if !ok { + that2, ok := that.(DeepLeaf) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if c := this.Tree.Compare(&that1.Tree); c != 0 { + return c + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *Nil) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*Nil) + if !ok { + that2, ok := that.(Nil) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NidOptEnum) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NidOptEnum) + if !ok { + that2, ok := that.(NidOptEnum) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.Field1 != that1.Field1 { + if this.Field1 < that1.Field1 { + return -1 + } + return 1 + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NinOptEnum) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NinOptEnum) + if !ok { + that2, ok := that.(NinOptEnum) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + if *this.Field1 < *that1.Field1 { + return -1 + } + return 1 + } + } else if this.Field1 != nil { + return 1 + } else if that1.Field1 != nil { + return -1 + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + if *this.Field2 < *that1.Field2 { + return -1 + } + return 1 + } + } else if this.Field2 != nil { + return 1 + } else if that1.Field2 != nil { + return -1 + } + if this.Field3 != nil && that1.Field3 != nil { + if *this.Field3 != *that1.Field3 { + if *this.Field3 < *that1.Field3 { + return -1 + } + return 1 + } + } else if this.Field3 != nil { + return 1 + } else if that1.Field3 != nil { + return -1 + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NidRepEnum) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NidRepEnum) + if !ok { + that2, ok := that.(NidRepEnum) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if len(this.Field1) != len(that1.Field1) { + if len(this.Field1) < len(that1.Field1) { + return -1 + } + return 1 + } + for i := range this.Field1 { + if this.Field1[i] != that1.Field1[i] { + if this.Field1[i] < that1.Field1[i] { + return -1 + } + return 1 + } + } + if len(this.Field2) != len(that1.Field2) { + if len(this.Field2) < len(that1.Field2) { + return -1 + } + return 1 + } + for i := range this.Field2 { + if this.Field2[i] != that1.Field2[i] { + if this.Field2[i] < that1.Field2[i] { + return -1 + } + return 1 + } + } + if len(this.Field3) != len(that1.Field3) { + if len(this.Field3) < len(that1.Field3) { + return -1 + } + return 1 + } + for i := range this.Field3 { + if this.Field3[i] != that1.Field3[i] { + if this.Field3[i] < that1.Field3[i] { + return -1 + } + return 1 + } + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NinRepEnum) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NinRepEnum) + if !ok { + that2, ok := that.(NinRepEnum) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if len(this.Field1) != len(that1.Field1) { + if len(this.Field1) < len(that1.Field1) { + return -1 + } + return 1 + } + for i := range this.Field1 { + if this.Field1[i] != that1.Field1[i] { + if this.Field1[i] < that1.Field1[i] { + return -1 + } + return 1 + } + } + if len(this.Field2) != len(that1.Field2) { + if len(this.Field2) < len(that1.Field2) { + return -1 + } + return 1 + } + for i := range this.Field2 { + if this.Field2[i] != that1.Field2[i] { + if this.Field2[i] < that1.Field2[i] { + return -1 + } + return 1 + } + } + if len(this.Field3) != len(that1.Field3) { + if len(this.Field3) < len(that1.Field3) { + return -1 + } + return 1 + } + for i := range this.Field3 { + if this.Field3[i] != that1.Field3[i] { + if this.Field3[i] < that1.Field3[i] { + return -1 + } + return 1 + } + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NinOptEnumDefault) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NinOptEnumDefault) + if !ok { + that2, ok := that.(NinOptEnumDefault) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + if *this.Field1 < *that1.Field1 { + return -1 + } + return 1 + } + } else if this.Field1 != nil { + return 1 + } else if that1.Field1 != nil { + return -1 + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + if *this.Field2 < *that1.Field2 { + return -1 + } + return 1 + } + } else if this.Field2 != nil { + return 1 + } else if that1.Field2 != nil { + return -1 + } + if this.Field3 != nil && that1.Field3 != nil { + if *this.Field3 != *that1.Field3 { + if *this.Field3 < *that1.Field3 { + return -1 + } + return 1 + } + } else if this.Field3 != nil { + return 1 + } else if that1.Field3 != nil { + return -1 + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *AnotherNinOptEnum) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*AnotherNinOptEnum) + if !ok { + that2, ok := that.(AnotherNinOptEnum) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + if *this.Field1 < *that1.Field1 { + return -1 + } + return 1 + } + } else if this.Field1 != nil { + return 1 + } else if that1.Field1 != nil { + return -1 + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + if *this.Field2 < *that1.Field2 { + return -1 + } + return 1 + } + } else if this.Field2 != nil { + return 1 + } else if that1.Field2 != nil { + return -1 + } + if this.Field3 != nil && that1.Field3 != nil { + if *this.Field3 != *that1.Field3 { + if *this.Field3 < *that1.Field3 { + return -1 + } + return 1 + } + } else if this.Field3 != nil { + return 1 + } else if that1.Field3 != nil { + return -1 + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *AnotherNinOptEnumDefault) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*AnotherNinOptEnumDefault) + if !ok { + that2, ok := that.(AnotherNinOptEnumDefault) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + if *this.Field1 < *that1.Field1 { + return -1 + } + return 1 + } + } else if this.Field1 != nil { + return 1 + } else if that1.Field1 != nil { + return -1 + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + if *this.Field2 < *that1.Field2 { + return -1 + } + return 1 + } + } else if this.Field2 != nil { + return 1 + } else if that1.Field2 != nil { + return -1 + } + if this.Field3 != nil && that1.Field3 != nil { + if *this.Field3 != *that1.Field3 { + if *this.Field3 < *that1.Field3 { + return -1 + } + return 1 + } + } else if this.Field3 != nil { + return 1 + } else if that1.Field3 != nil { + return -1 + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *Timer) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*Timer) + if !ok { + that2, ok := that.(Timer) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.Time1 != that1.Time1 { + if this.Time1 < that1.Time1 { + return -1 + } + return 1 + } + if this.Time2 != that1.Time2 { + if this.Time2 < that1.Time2 { + return -1 + } + return 1 + } + if c := bytes.Compare(this.Data, that1.Data); c != 0 { + return c + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *MyExtendable) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*MyExtendable) + if !ok { + that2, ok := that.(MyExtendable) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + if *this.Field1 < *that1.Field1 { + return -1 + } + return 1 + } + } else if this.Field1 != nil { + return 1 + } else if that1.Field1 != nil { + return -1 + } + extkeys := make([]int32, 0, len(this.XXX_extensions)+len(that1.XXX_extensions)) + for k := range this.XXX_extensions { + extkeys = append(extkeys, k) + } + for k := range that1.XXX_extensions { + if _, ok := this.XXX_extensions[k]; !ok { + extkeys = append(extkeys, k) + } + } + github_com_gogo_protobuf_sortkeys.Int32s(extkeys) + for _, k := range extkeys { + if v, ok := this.XXX_extensions[k]; ok { + if v2, ok := that1.XXX_extensions[k]; ok { + if c := v.Compare(&v2); c != 0 { + return c + } + } else { + return 1 + } + } else { + return -1 + } + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *OtherExtenable) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*OtherExtenable) + if !ok { + that2, ok := that.(OtherExtenable) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + if *this.Field2 < *that1.Field2 { + return -1 + } + return 1 + } + } else if this.Field2 != nil { + return 1 + } else if that1.Field2 != nil { + return -1 + } + if this.Field13 != nil && that1.Field13 != nil { + if *this.Field13 != *that1.Field13 { + if *this.Field13 < *that1.Field13 { + return -1 + } + return 1 + } + } else if this.Field13 != nil { + return 1 + } else if that1.Field13 != nil { + return -1 + } + if c := this.M.Compare(that1.M); c != 0 { + return c + } + extkeys := make([]int32, 0, len(this.XXX_extensions)+len(that1.XXX_extensions)) + for k := range this.XXX_extensions { + extkeys = append(extkeys, k) + } + for k := range that1.XXX_extensions { + if _, ok := this.XXX_extensions[k]; !ok { + extkeys = append(extkeys, k) + } + } + github_com_gogo_protobuf_sortkeys.Int32s(extkeys) + for _, k := range extkeys { + if v, ok := this.XXX_extensions[k]; ok { + if v2, ok := that1.XXX_extensions[k]; ok { + if c := v.Compare(&v2); c != 0 { + return c + } + } else { + return 1 + } + } else { + return -1 + } + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NestedDefinition) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NestedDefinition) + if !ok { + that2, ok := that.(NestedDefinition) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + if *this.Field1 < *that1.Field1 { + return -1 + } + return 1 + } + } else if this.Field1 != nil { + return 1 + } else if that1.Field1 != nil { + return -1 + } + if this.EnumField != nil && that1.EnumField != nil { + if *this.EnumField != *that1.EnumField { + if *this.EnumField < *that1.EnumField { + return -1 + } + return 1 + } + } else if this.EnumField != nil { + return 1 + } else if that1.EnumField != nil { + return -1 + } + if c := this.NNM.Compare(that1.NNM); c != 0 { + return c + } + if c := this.NM.Compare(that1.NM); c != 0 { + return c + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NestedDefinition_NestedMessage) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NestedDefinition_NestedMessage) + if !ok { + that2, ok := that.(NestedDefinition_NestedMessage) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.NestedField1 != nil && that1.NestedField1 != nil { + if *this.NestedField1 != *that1.NestedField1 { + if *this.NestedField1 < *that1.NestedField1 { + return -1 + } + return 1 + } + } else if this.NestedField1 != nil { + return 1 + } else if that1.NestedField1 != nil { + return -1 + } + if c := this.NNM.Compare(that1.NNM); c != 0 { + return c + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NestedDefinition_NestedMessage_NestedNestedMsg) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NestedDefinition_NestedMessage_NestedNestedMsg) + if !ok { + that2, ok := that.(NestedDefinition_NestedMessage_NestedNestedMsg) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.NestedNestedField1 != nil && that1.NestedNestedField1 != nil { + if *this.NestedNestedField1 != *that1.NestedNestedField1 { + if *this.NestedNestedField1 < *that1.NestedNestedField1 { + return -1 + } + return 1 + } + } else if this.NestedNestedField1 != nil { + return 1 + } else if that1.NestedNestedField1 != nil { + return -1 + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NestedScope) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NestedScope) + if !ok { + that2, ok := that.(NestedScope) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if c := this.A.Compare(that1.A); c != 0 { + return c + } + if this.B != nil && that1.B != nil { + if *this.B != *that1.B { + if *this.B < *that1.B { + return -1 + } + return 1 + } + } else if this.B != nil { + return 1 + } else if that1.B != nil { + return -1 + } + if c := this.C.Compare(that1.C); c != 0 { + return c + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NinOptNativeDefault) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NinOptNativeDefault) + if !ok { + that2, ok := that.(NinOptNativeDefault) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + if *this.Field1 < *that1.Field1 { + return -1 + } + return 1 + } + } else if this.Field1 != nil { + return 1 + } else if that1.Field1 != nil { + return -1 + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + if *this.Field2 < *that1.Field2 { + return -1 + } + return 1 + } + } else if this.Field2 != nil { + return 1 + } else if that1.Field2 != nil { + return -1 + } + if this.Field3 != nil && that1.Field3 != nil { + if *this.Field3 != *that1.Field3 { + if *this.Field3 < *that1.Field3 { + return -1 + } + return 1 + } + } else if this.Field3 != nil { + return 1 + } else if that1.Field3 != nil { + return -1 + } + if this.Field4 != nil && that1.Field4 != nil { + if *this.Field4 != *that1.Field4 { + if *this.Field4 < *that1.Field4 { + return -1 + } + return 1 + } + } else if this.Field4 != nil { + return 1 + } else if that1.Field4 != nil { + return -1 + } + if this.Field5 != nil && that1.Field5 != nil { + if *this.Field5 != *that1.Field5 { + if *this.Field5 < *that1.Field5 { + return -1 + } + return 1 + } + } else if this.Field5 != nil { + return 1 + } else if that1.Field5 != nil { + return -1 + } + if this.Field6 != nil && that1.Field6 != nil { + if *this.Field6 != *that1.Field6 { + if *this.Field6 < *that1.Field6 { + return -1 + } + return 1 + } + } else if this.Field6 != nil { + return 1 + } else if that1.Field6 != nil { + return -1 + } + if this.Field7 != nil && that1.Field7 != nil { + if *this.Field7 != *that1.Field7 { + if *this.Field7 < *that1.Field7 { + return -1 + } + return 1 + } + } else if this.Field7 != nil { + return 1 + } else if that1.Field7 != nil { + return -1 + } + if this.Field8 != nil && that1.Field8 != nil { + if *this.Field8 != *that1.Field8 { + if *this.Field8 < *that1.Field8 { + return -1 + } + return 1 + } + } else if this.Field8 != nil { + return 1 + } else if that1.Field8 != nil { + return -1 + } + if this.Field9 != nil && that1.Field9 != nil { + if *this.Field9 != *that1.Field9 { + if *this.Field9 < *that1.Field9 { + return -1 + } + return 1 + } + } else if this.Field9 != nil { + return 1 + } else if that1.Field9 != nil { + return -1 + } + if this.Field10 != nil && that1.Field10 != nil { + if *this.Field10 != *that1.Field10 { + if *this.Field10 < *that1.Field10 { + return -1 + } + return 1 + } + } else if this.Field10 != nil { + return 1 + } else if that1.Field10 != nil { + return -1 + } + if this.Field11 != nil && that1.Field11 != nil { + if *this.Field11 != *that1.Field11 { + if *this.Field11 < *that1.Field11 { + return -1 + } + return 1 + } + } else if this.Field11 != nil { + return 1 + } else if that1.Field11 != nil { + return -1 + } + if this.Field12 != nil && that1.Field12 != nil { + if *this.Field12 != *that1.Field12 { + if *this.Field12 < *that1.Field12 { + return -1 + } + return 1 + } + } else if this.Field12 != nil { + return 1 + } else if that1.Field12 != nil { + return -1 + } + if this.Field13 != nil && that1.Field13 != nil { + if *this.Field13 != *that1.Field13 { + if !*this.Field13 { + return -1 + } + return 1 + } + } else if this.Field13 != nil { + return 1 + } else if that1.Field13 != nil { + return -1 + } + if this.Field14 != nil && that1.Field14 != nil { + if *this.Field14 != *that1.Field14 { + if *this.Field14 < *that1.Field14 { + return -1 + } + return 1 + } + } else if this.Field14 != nil { + return 1 + } else if that1.Field14 != nil { + return -1 + } + if c := bytes.Compare(this.Field15, that1.Field15); c != 0 { + return c + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *CustomContainer) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*CustomContainer) + if !ok { + that2, ok := that.(CustomContainer) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if c := this.CustomStruct.Compare(&that1.CustomStruct); c != 0 { + return c + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *CustomNameNidOptNative) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*CustomNameNidOptNative) + if !ok { + that2, ok := that.(CustomNameNidOptNative) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.FieldA != that1.FieldA { + if this.FieldA < that1.FieldA { + return -1 + } + return 1 + } + if this.FieldB != that1.FieldB { + if this.FieldB < that1.FieldB { + return -1 + } + return 1 + } + if this.FieldC != that1.FieldC { + if this.FieldC < that1.FieldC { + return -1 + } + return 1 + } + if this.FieldD != that1.FieldD { + if this.FieldD < that1.FieldD { + return -1 + } + return 1 + } + if this.FieldE != that1.FieldE { + if this.FieldE < that1.FieldE { + return -1 + } + return 1 + } + if this.FieldF != that1.FieldF { + if this.FieldF < that1.FieldF { + return -1 + } + return 1 + } + if this.FieldG != that1.FieldG { + if this.FieldG < that1.FieldG { + return -1 + } + return 1 + } + if this.FieldH != that1.FieldH { + if this.FieldH < that1.FieldH { + return -1 + } + return 1 + } + if this.FieldI != that1.FieldI { + if this.FieldI < that1.FieldI { + return -1 + } + return 1 + } + if this.FieldJ != that1.FieldJ { + if this.FieldJ < that1.FieldJ { + return -1 + } + return 1 + } + if this.FieldK != that1.FieldK { + if this.FieldK < that1.FieldK { + return -1 + } + return 1 + } + if this.FieldL != that1.FieldL { + if this.FieldL < that1.FieldL { + return -1 + } + return 1 + } + if this.FieldM != that1.FieldM { + if !this.FieldM { + return -1 + } + return 1 + } + if this.FieldN != that1.FieldN { + if this.FieldN < that1.FieldN { + return -1 + } + return 1 + } + if c := bytes.Compare(this.FieldO, that1.FieldO); c != 0 { + return c + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *CustomNameNinOptNative) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*CustomNameNinOptNative) + if !ok { + that2, ok := that.(CustomNameNinOptNative) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.FieldA != nil && that1.FieldA != nil { + if *this.FieldA != *that1.FieldA { + if *this.FieldA < *that1.FieldA { + return -1 + } + return 1 + } + } else if this.FieldA != nil { + return 1 + } else if that1.FieldA != nil { + return -1 + } + if this.FieldB != nil && that1.FieldB != nil { + if *this.FieldB != *that1.FieldB { + if *this.FieldB < *that1.FieldB { + return -1 + } + return 1 + } + } else if this.FieldB != nil { + return 1 + } else if that1.FieldB != nil { + return -1 + } + if this.FieldC != nil && that1.FieldC != nil { + if *this.FieldC != *that1.FieldC { + if *this.FieldC < *that1.FieldC { + return -1 + } + return 1 + } + } else if this.FieldC != nil { + return 1 + } else if that1.FieldC != nil { + return -1 + } + if this.FieldD != nil && that1.FieldD != nil { + if *this.FieldD != *that1.FieldD { + if *this.FieldD < *that1.FieldD { + return -1 + } + return 1 + } + } else if this.FieldD != nil { + return 1 + } else if that1.FieldD != nil { + return -1 + } + if this.FieldE != nil && that1.FieldE != nil { + if *this.FieldE != *that1.FieldE { + if *this.FieldE < *that1.FieldE { + return -1 + } + return 1 + } + } else if this.FieldE != nil { + return 1 + } else if that1.FieldE != nil { + return -1 + } + if this.FieldF != nil && that1.FieldF != nil { + if *this.FieldF != *that1.FieldF { + if *this.FieldF < *that1.FieldF { + return -1 + } + return 1 + } + } else if this.FieldF != nil { + return 1 + } else if that1.FieldF != nil { + return -1 + } + if this.FieldG != nil && that1.FieldG != nil { + if *this.FieldG != *that1.FieldG { + if *this.FieldG < *that1.FieldG { + return -1 + } + return 1 + } + } else if this.FieldG != nil { + return 1 + } else if that1.FieldG != nil { + return -1 + } + if this.FieldH != nil && that1.FieldH != nil { + if *this.FieldH != *that1.FieldH { + if *this.FieldH < *that1.FieldH { + return -1 + } + return 1 + } + } else if this.FieldH != nil { + return 1 + } else if that1.FieldH != nil { + return -1 + } + if this.FieldI != nil && that1.FieldI != nil { + if *this.FieldI != *that1.FieldI { + if *this.FieldI < *that1.FieldI { + return -1 + } + return 1 + } + } else if this.FieldI != nil { + return 1 + } else if that1.FieldI != nil { + return -1 + } + if this.FieldJ != nil && that1.FieldJ != nil { + if *this.FieldJ != *that1.FieldJ { + if *this.FieldJ < *that1.FieldJ { + return -1 + } + return 1 + } + } else if this.FieldJ != nil { + return 1 + } else if that1.FieldJ != nil { + return -1 + } + if this.FieldK != nil && that1.FieldK != nil { + if *this.FieldK != *that1.FieldK { + if *this.FieldK < *that1.FieldK { + return -1 + } + return 1 + } + } else if this.FieldK != nil { + return 1 + } else if that1.FieldK != nil { + return -1 + } + if this.FielL != nil && that1.FielL != nil { + if *this.FielL != *that1.FielL { + if *this.FielL < *that1.FielL { + return -1 + } + return 1 + } + } else if this.FielL != nil { + return 1 + } else if that1.FielL != nil { + return -1 + } + if this.FieldM != nil && that1.FieldM != nil { + if *this.FieldM != *that1.FieldM { + if !*this.FieldM { + return -1 + } + return 1 + } + } else if this.FieldM != nil { + return 1 + } else if that1.FieldM != nil { + return -1 + } + if this.FieldN != nil && that1.FieldN != nil { + if *this.FieldN != *that1.FieldN { + if *this.FieldN < *that1.FieldN { + return -1 + } + return 1 + } + } else if this.FieldN != nil { + return 1 + } else if that1.FieldN != nil { + return -1 + } + if c := bytes.Compare(this.FieldO, that1.FieldO); c != 0 { + return c + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *CustomNameNinRepNative) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*CustomNameNinRepNative) + if !ok { + that2, ok := that.(CustomNameNinRepNative) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if len(this.FieldA) != len(that1.FieldA) { + if len(this.FieldA) < len(that1.FieldA) { + return -1 + } + return 1 + } + for i := range this.FieldA { + if this.FieldA[i] != that1.FieldA[i] { + if this.FieldA[i] < that1.FieldA[i] { + return -1 + } + return 1 + } + } + if len(this.FieldB) != len(that1.FieldB) { + if len(this.FieldB) < len(that1.FieldB) { + return -1 + } + return 1 + } + for i := range this.FieldB { + if this.FieldB[i] != that1.FieldB[i] { + if this.FieldB[i] < that1.FieldB[i] { + return -1 + } + return 1 + } + } + if len(this.FieldC) != len(that1.FieldC) { + if len(this.FieldC) < len(that1.FieldC) { + return -1 + } + return 1 + } + for i := range this.FieldC { + if this.FieldC[i] != that1.FieldC[i] { + if this.FieldC[i] < that1.FieldC[i] { + return -1 + } + return 1 + } + } + if len(this.FieldD) != len(that1.FieldD) { + if len(this.FieldD) < len(that1.FieldD) { + return -1 + } + return 1 + } + for i := range this.FieldD { + if this.FieldD[i] != that1.FieldD[i] { + if this.FieldD[i] < that1.FieldD[i] { + return -1 + } + return 1 + } + } + if len(this.FieldE) != len(that1.FieldE) { + if len(this.FieldE) < len(that1.FieldE) { + return -1 + } + return 1 + } + for i := range this.FieldE { + if this.FieldE[i] != that1.FieldE[i] { + if this.FieldE[i] < that1.FieldE[i] { + return -1 + } + return 1 + } + } + if len(this.FieldF) != len(that1.FieldF) { + if len(this.FieldF) < len(that1.FieldF) { + return -1 + } + return 1 + } + for i := range this.FieldF { + if this.FieldF[i] != that1.FieldF[i] { + if this.FieldF[i] < that1.FieldF[i] { + return -1 + } + return 1 + } + } + if len(this.FieldG) != len(that1.FieldG) { + if len(this.FieldG) < len(that1.FieldG) { + return -1 + } + return 1 + } + for i := range this.FieldG { + if this.FieldG[i] != that1.FieldG[i] { + if this.FieldG[i] < that1.FieldG[i] { + return -1 + } + return 1 + } + } + if len(this.FieldH) != len(that1.FieldH) { + if len(this.FieldH) < len(that1.FieldH) { + return -1 + } + return 1 + } + for i := range this.FieldH { + if this.FieldH[i] != that1.FieldH[i] { + if this.FieldH[i] < that1.FieldH[i] { + return -1 + } + return 1 + } + } + if len(this.FieldI) != len(that1.FieldI) { + if len(this.FieldI) < len(that1.FieldI) { + return -1 + } + return 1 + } + for i := range this.FieldI { + if this.FieldI[i] != that1.FieldI[i] { + if this.FieldI[i] < that1.FieldI[i] { + return -1 + } + return 1 + } + } + if len(this.FieldJ) != len(that1.FieldJ) { + if len(this.FieldJ) < len(that1.FieldJ) { + return -1 + } + return 1 + } + for i := range this.FieldJ { + if this.FieldJ[i] != that1.FieldJ[i] { + if this.FieldJ[i] < that1.FieldJ[i] { + return -1 + } + return 1 + } + } + if len(this.FieldK) != len(that1.FieldK) { + if len(this.FieldK) < len(that1.FieldK) { + return -1 + } + return 1 + } + for i := range this.FieldK { + if this.FieldK[i] != that1.FieldK[i] { + if this.FieldK[i] < that1.FieldK[i] { + return -1 + } + return 1 + } + } + if len(this.FieldL) != len(that1.FieldL) { + if len(this.FieldL) < len(that1.FieldL) { + return -1 + } + return 1 + } + for i := range this.FieldL { + if this.FieldL[i] != that1.FieldL[i] { + if this.FieldL[i] < that1.FieldL[i] { + return -1 + } + return 1 + } + } + if len(this.FieldM) != len(that1.FieldM) { + if len(this.FieldM) < len(that1.FieldM) { + return -1 + } + return 1 + } + for i := range this.FieldM { + if this.FieldM[i] != that1.FieldM[i] { + if !this.FieldM[i] { + return -1 + } + return 1 + } + } + if len(this.FieldN) != len(that1.FieldN) { + if len(this.FieldN) < len(that1.FieldN) { + return -1 + } + return 1 + } + for i := range this.FieldN { + if this.FieldN[i] != that1.FieldN[i] { + if this.FieldN[i] < that1.FieldN[i] { + return -1 + } + return 1 + } + } + if len(this.FieldO) != len(that1.FieldO) { + if len(this.FieldO) < len(that1.FieldO) { + return -1 + } + return 1 + } + for i := range this.FieldO { + if c := bytes.Compare(this.FieldO[i], that1.FieldO[i]); c != 0 { + return c + } + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *CustomNameNinStruct) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*CustomNameNinStruct) + if !ok { + that2, ok := that.(CustomNameNinStruct) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.FieldA != nil && that1.FieldA != nil { + if *this.FieldA != *that1.FieldA { + if *this.FieldA < *that1.FieldA { + return -1 + } + return 1 + } + } else if this.FieldA != nil { + return 1 + } else if that1.FieldA != nil { + return -1 + } + if this.FieldB != nil && that1.FieldB != nil { + if *this.FieldB != *that1.FieldB { + if *this.FieldB < *that1.FieldB { + return -1 + } + return 1 + } + } else if this.FieldB != nil { + return 1 + } else if that1.FieldB != nil { + return -1 + } + if c := this.FieldC.Compare(that1.FieldC); c != 0 { + return c + } + if len(this.FieldD) != len(that1.FieldD) { + if len(this.FieldD) < len(that1.FieldD) { + return -1 + } + return 1 + } + for i := range this.FieldD { + if c := this.FieldD[i].Compare(that1.FieldD[i]); c != 0 { + return c + } + } + if this.FieldE != nil && that1.FieldE != nil { + if *this.FieldE != *that1.FieldE { + if *this.FieldE < *that1.FieldE { + return -1 + } + return 1 + } + } else if this.FieldE != nil { + return 1 + } else if that1.FieldE != nil { + return -1 + } + if this.FieldF != nil && that1.FieldF != nil { + if *this.FieldF != *that1.FieldF { + if *this.FieldF < *that1.FieldF { + return -1 + } + return 1 + } + } else if this.FieldF != nil { + return 1 + } else if that1.FieldF != nil { + return -1 + } + if c := this.FieldG.Compare(that1.FieldG); c != 0 { + return c + } + if this.FieldH != nil && that1.FieldH != nil { + if *this.FieldH != *that1.FieldH { + if !*this.FieldH { + return -1 + } + return 1 + } + } else if this.FieldH != nil { + return 1 + } else if that1.FieldH != nil { + return -1 + } + if this.FieldI != nil && that1.FieldI != nil { + if *this.FieldI != *that1.FieldI { + if *this.FieldI < *that1.FieldI { + return -1 + } + return 1 + } + } else if this.FieldI != nil { + return 1 + } else if that1.FieldI != nil { + return -1 + } + if c := bytes.Compare(this.FieldJ, that1.FieldJ); c != 0 { + return c + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *CustomNameCustomType) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*CustomNameCustomType) + if !ok { + that2, ok := that.(CustomNameCustomType) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if that1.FieldA == nil { + if this.FieldA != nil { + return 1 + } + } else if this.FieldA == nil { + return -1 + } else if c := this.FieldA.Compare(*that1.FieldA); c != 0 { + return c + } + if that1.FieldB == nil { + if this.FieldB != nil { + return 1 + } + } else if this.FieldB == nil { + return -1 + } else if c := this.FieldB.Compare(*that1.FieldB); c != 0 { + return c + } + if len(this.FieldC) != len(that1.FieldC) { + if len(this.FieldC) < len(that1.FieldC) { + return -1 + } + return 1 + } + for i := range this.FieldC { + if c := this.FieldC[i].Compare(that1.FieldC[i]); c != 0 { + return c + } + } + if len(this.FieldD) != len(that1.FieldD) { + if len(this.FieldD) < len(that1.FieldD) { + return -1 + } + return 1 + } + for i := range this.FieldD { + if c := this.FieldD[i].Compare(that1.FieldD[i]); c != 0 { + return c + } + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *CustomNameNinEmbeddedStructUnion) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*CustomNameNinEmbeddedStructUnion) + if !ok { + that2, ok := that.(CustomNameNinEmbeddedStructUnion) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if c := this.NidOptNative.Compare(that1.NidOptNative); c != 0 { + return c + } + if c := this.FieldA.Compare(that1.FieldA); c != 0 { + return c + } + if this.FieldB != nil && that1.FieldB != nil { + if *this.FieldB != *that1.FieldB { + if !*this.FieldB { + return -1 + } + return 1 + } + } else if this.FieldB != nil { + return 1 + } else if that1.FieldB != nil { + return -1 + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *CustomNameEnum) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*CustomNameEnum) + if !ok { + that2, ok := that.(CustomNameEnum) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.FieldA != nil && that1.FieldA != nil { + if *this.FieldA != *that1.FieldA { + if *this.FieldA < *that1.FieldA { + return -1 + } + return 1 + } + } else if this.FieldA != nil { + return 1 + } else if that1.FieldA != nil { + return -1 + } + if len(this.FieldB) != len(that1.FieldB) { + if len(this.FieldB) < len(that1.FieldB) { + return -1 + } + return 1 + } + for i := range this.FieldB { + if this.FieldB[i] != that1.FieldB[i] { + if this.FieldB[i] < that1.FieldB[i] { + return -1 + } + return 1 + } + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NoExtensionsMap) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NoExtensionsMap) + if !ok { + that2, ok := that.(NoExtensionsMap) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + if *this.Field1 < *that1.Field1 { + return -1 + } + return 1 + } + } else if this.Field1 != nil { + return 1 + } else if that1.Field1 != nil { + return -1 + } + if c := bytes.Compare(this.XXX_extensions, that1.XXX_extensions); c != 0 { + return c + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *Unrecognized) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*Unrecognized) + if !ok { + that2, ok := that.(Unrecognized) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + if *this.Field1 < *that1.Field1 { + return -1 + } + return 1 + } + } else if this.Field1 != nil { + return 1 + } else if that1.Field1 != nil { + return -1 + } + return 0 +} +func (this *UnrecognizedWithInner) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*UnrecognizedWithInner) + if !ok { + that2, ok := that.(UnrecognizedWithInner) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if len(this.Embedded) != len(that1.Embedded) { + if len(this.Embedded) < len(that1.Embedded) { + return -1 + } + return 1 + } + for i := range this.Embedded { + if c := this.Embedded[i].Compare(that1.Embedded[i]); c != 0 { + return c + } + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + if *this.Field2 < *that1.Field2 { + return -1 + } + return 1 + } + } else if this.Field2 != nil { + return 1 + } else if that1.Field2 != nil { + return -1 + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *UnrecognizedWithInner_Inner) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*UnrecognizedWithInner_Inner) + if !ok { + that2, ok := that.(UnrecognizedWithInner_Inner) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + if *this.Field1 < *that1.Field1 { + return -1 + } + return 1 + } + } else if this.Field1 != nil { + return 1 + } else if that1.Field1 != nil { + return -1 + } + return 0 +} +func (this *UnrecognizedWithEmbed) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*UnrecognizedWithEmbed) + if !ok { + that2, ok := that.(UnrecognizedWithEmbed) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if c := this.UnrecognizedWithEmbed_Embedded.Compare(&that1.UnrecognizedWithEmbed_Embedded); c != 0 { + return c + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + if *this.Field2 < *that1.Field2 { + return -1 + } + return 1 + } + } else if this.Field2 != nil { + return 1 + } else if that1.Field2 != nil { + return -1 + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *UnrecognizedWithEmbed_Embedded) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*UnrecognizedWithEmbed_Embedded) + if !ok { + that2, ok := that.(UnrecognizedWithEmbed_Embedded) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + if *this.Field1 < *that1.Field1 { + return -1 + } + return 1 + } + } else if this.Field1 != nil { + return 1 + } else if that1.Field1 != nil { + return -1 + } + return 0 +} +func (this *Node) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*Node) + if !ok { + that2, ok := that.(Node) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.Label != nil && that1.Label != nil { + if *this.Label != *that1.Label { + if *this.Label < *that1.Label { + return -1 + } + return 1 + } + } else if this.Label != nil { + return 1 + } else if that1.Label != nil { + return -1 + } + if len(this.Children) != len(that1.Children) { + if len(this.Children) < len(that1.Children) { + return -1 + } + return 1 + } + for i := range this.Children { + if c := this.Children[i].Compare(that1.Children[i]); c != 0 { + return c + } + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NidOptNative) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NinOptNative) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NidRepNative) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NinRepNative) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NidRepPackedNative) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NinRepPackedNative) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NidOptStruct) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NinOptStruct) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NidRepStruct) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NinRepStruct) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NidEmbeddedStruct) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NinEmbeddedStruct) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NidNestedStruct) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NinNestedStruct) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NidOptCustom) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *CustomDash) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NinOptCustom) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NidRepCustom) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NinRepCustom) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NinOptNativeUnion) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NinOptStructUnion) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NinEmbeddedStructUnion) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NinNestedStructUnion) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *Tree) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *OrBranch) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *AndBranch) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *Leaf) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *DeepTree) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *ADeepBranch) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *AndDeepBranch) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *DeepLeaf) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *Nil) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NidOptEnum) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NinOptEnum) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NidRepEnum) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NinRepEnum) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NinOptEnumDefault) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *AnotherNinOptEnum) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *AnotherNinOptEnumDefault) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *Timer) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *MyExtendable) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *OtherExtenable) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NestedDefinition) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NestedDefinition_NestedMessage) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NestedDefinition_NestedMessage_NestedNestedMsg) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NestedScope) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NinOptNativeDefault) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *CustomContainer) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *CustomNameNidOptNative) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *CustomNameNinOptNative) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *CustomNameNinRepNative) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *CustomNameNinStruct) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *CustomNameCustomType) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *CustomNameNinEmbeddedStructUnion) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *CustomNameEnum) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NoExtensionsMap) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *Unrecognized) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *UnrecognizedWithInner) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *UnrecognizedWithInner_Inner) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *UnrecognizedWithEmbed) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *UnrecognizedWithEmbed_Embedded) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *Node) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func ThetestDescription() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + d := &github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet{} + var gzipped = []byte{ + // 6121 bytes of a gzipped FileDescriptorSet + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xcc, 0x5c, 0x6b, 0x6c, 0x23, 0xd7, + 0x75, 0xde, 0xe1, 0x90, 0x12, 0x75, 0x28, 0x51, 0xd4, 0xac, 0x56, 0xa6, 0xe5, 0xf5, 0x3e, 0x68, + 0x59, 0x96, 0x15, 0x5b, 0xaf, 0xd5, 0xbe, 0xe8, 0xc4, 0x01, 0x5f, 0x2b, 0x6b, 0xab, 0x57, 0x47, + 0x52, 0x62, 0xa7, 0x05, 0x08, 0x2e, 0x39, 0x92, 0x68, 0x53, 0x43, 0x96, 0x43, 0xda, 0xde, 0xfc, + 0x28, 0xd2, 0xa4, 0x4d, 0x93, 0x16, 0x7d, 0xa6, 0x45, 0xf3, 0x8e, 0x93, 0x22, 0x8d, 0x93, 0x3e, + 0x92, 0xb4, 0x69, 0x50, 0x04, 0x45, 0x63, 0xa0, 0x48, 0xbb, 0xfd, 0x53, 0xa4, 0xf9, 0x55, 0x14, + 0x85, 0x91, 0x17, 0xd0, 0xb4, 0x4d, 0xdb, 0x04, 0x30, 0x90, 0x00, 0xc9, 0x8f, 0xde, 0xf7, 0xcc, + 0xbd, 0x1c, 0x72, 0x46, 0x5e, 0x3b, 0xc9, 0x02, 0x5c, 0x91, 0xf7, 0x9c, 0xef, 0xcc, 0x99, 0xf3, + 0xba, 0x67, 0xee, 0xbd, 0x24, 0xfc, 0xfd, 0x32, 0x5c, 0x38, 0x6c, 0x36, 0x0f, 0x1b, 0xd6, 0x62, + 0xab, 0xdd, 0xec, 0x34, 0x6f, 0x75, 0x0f, 0x16, 0x6b, 0x96, 0x53, 0x6d, 0xd7, 0x5b, 0x9d, 0x66, + 0x7b, 0x81, 0x8c, 0x19, 0xe3, 0x94, 0x63, 0x81, 0x73, 0x64, 0x36, 0x61, 0xe2, 0x46, 0xbd, 0x61, + 0x15, 0x05, 0xe3, 0xae, 0xd5, 0x31, 0xae, 0x41, 0xf4, 0x00, 0x0d, 0xa6, 0xb5, 0x0b, 0xfa, 0x5c, + 0x62, 0x65, 0x66, 0x41, 0x01, 0x2d, 0xc8, 0x88, 0x1d, 0x3c, 0x6c, 0x12, 0x44, 0xe6, 0xdb, 0x51, + 0x38, 0xed, 0x43, 0x35, 0x0c, 0x88, 0xda, 0x95, 0x63, 0x2c, 0x51, 0x9b, 0x1b, 0x31, 0xc9, 0x7b, + 0x23, 0x0d, 0xc3, 0xad, 0x4a, 0xf5, 0x99, 0xca, 0xa1, 0x95, 0x8e, 0x90, 0x61, 0xfe, 0xd1, 0x38, + 0x07, 0x50, 0xb3, 0x5a, 0x96, 0x5d, 0xb3, 0xec, 0xea, 0xed, 0xb4, 0x8e, 0xb4, 0x18, 0x31, 0x3d, + 0x23, 0xc6, 0x1b, 0x60, 0xa2, 0xd5, 0xbd, 0xd5, 0xa8, 0x57, 0xcb, 0x1e, 0x36, 0x40, 0x6c, 0x31, + 0x33, 0x45, 0x09, 0x45, 0x97, 0xf9, 0x21, 0x18, 0x7f, 0xce, 0xaa, 0x3c, 0xe3, 0x65, 0x4d, 0x10, + 0xd6, 0x24, 0x1e, 0xf6, 0x30, 0x16, 0x60, 0xf4, 0xd8, 0x72, 0x1c, 0xa4, 0x40, 0xb9, 0x73, 0xbb, + 0x65, 0xa5, 0xa3, 0xe4, 0xee, 0x2f, 0xf4, 0xdc, 0xbd, 0x7a, 0xe7, 0x09, 0x86, 0xda, 0x43, 0x20, + 0x23, 0x07, 0x23, 0x96, 0xdd, 0x3d, 0xa6, 0x12, 0x62, 0x7d, 0xec, 0x57, 0x42, 0x1c, 0xaa, 0x94, + 0x38, 0x86, 0x31, 0x11, 0xc3, 0x8e, 0xd5, 0x7e, 0xb6, 0x5e, 0xb5, 0xd2, 0x43, 0x44, 0xc0, 0x43, + 0x3d, 0x02, 0x76, 0x29, 0x5d, 0x95, 0xc1, 0x71, 0xe8, 0x56, 0x46, 0xac, 0xe7, 0x3b, 0x96, 0xed, + 0xd4, 0x9b, 0x76, 0x7a, 0x98, 0x08, 0x79, 0xd0, 0xc7, 0x8b, 0x56, 0xa3, 0xa6, 0x8a, 0x70, 0x71, + 0xc6, 0x15, 0x18, 0x6e, 0xb6, 0x3a, 0xe8, 0x9d, 0x93, 0x8e, 0x23, 0xff, 0x24, 0x56, 0xce, 0xfa, + 0x06, 0xc2, 0x36, 0xe5, 0x31, 0x39, 0xb3, 0xb1, 0x0e, 0x29, 0xa7, 0xd9, 0x6d, 0x57, 0xad, 0x72, + 0xb5, 0x59, 0xb3, 0xca, 0x75, 0xfb, 0xa0, 0x99, 0x1e, 0x21, 0x02, 0xce, 0xf7, 0xde, 0x08, 0x61, + 0x2c, 0x20, 0xbe, 0x75, 0xc4, 0x66, 0x26, 0x1d, 0xe9, 0xb3, 0x31, 0x05, 0x43, 0xce, 0x6d, 0xbb, + 0x53, 0x79, 0x3e, 0x3d, 0x4a, 0x22, 0x84, 0x7d, 0xca, 0xfc, 0x20, 0x06, 0xe3, 0x61, 0x42, 0xec, + 0x31, 0x88, 0x1d, 0xe0, 0xbb, 0x44, 0x01, 0x76, 0x02, 0x1b, 0x50, 0x8c, 0x6c, 0xc4, 0xa1, 0x57, + 0x69, 0xc4, 0x1c, 0x24, 0x6c, 0xcb, 0xe9, 0x58, 0x35, 0x1a, 0x11, 0x7a, 0xc8, 0x98, 0x02, 0x0a, + 0xea, 0x0d, 0xa9, 0xe8, 0xab, 0x0a, 0xa9, 0x27, 0x61, 0x5c, 0xa8, 0x54, 0x6e, 0x57, 0xec, 0x43, + 0x1e, 0x9b, 0x8b, 0x41, 0x9a, 0x2c, 0x94, 0x38, 0xce, 0xc4, 0x30, 0x33, 0x69, 0x49, 0x9f, 0x8d, + 0x22, 0x40, 0xd3, 0xb6, 0x9a, 0x07, 0x28, 0xbd, 0xaa, 0x0d, 0x14, 0x27, 0xfe, 0x56, 0xda, 0xc6, + 0x2c, 0x3d, 0x56, 0x6a, 0xd2, 0xd1, 0x6a, 0xc3, 0xb8, 0xee, 0x86, 0xda, 0x70, 0x9f, 0x48, 0xd9, + 0xa4, 0x49, 0xd6, 0x13, 0x6d, 0xfb, 0x90, 0x6c, 0x5b, 0x38, 0xee, 0x91, 0x89, 0xe9, 0x9d, 0x8d, + 0x10, 0x25, 0x16, 0x02, 0xef, 0xcc, 0x64, 0x30, 0x7a, 0x63, 0x63, 0x6d, 0xef, 0x47, 0xe3, 0x01, + 0x10, 0x03, 0x65, 0x12, 0x56, 0x40, 0xaa, 0xd0, 0x28, 0x1f, 0xdc, 0x42, 0x63, 0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, 0x53, 0xfc, 0x36, 0x18, 0x84, 0x99, 0xf2, 0x96, 0x65, 0x57, 0x8f, 0xc2, + 0x49, 0x78, 0x91, 0x9b, 0x92, 0x63, 0xb0, 0x08, 0x54, 0x79, 0x8e, 0x2b, 0x6d, 0xf4, 0x70, 0xdd, + 0x08, 0xe5, 0x8e, 0x4f, 0x33, 0x19, 0xa3, 0x02, 0xc4, 0x2c, 0xd2, 0xb5, 0x4f, 0x22, 0xe6, 0x33, + 0xdc, 0x22, 0x1e, 0x18, 0x4b, 0x3d, 0xf4, 0x64, 0x8a, 0x3b, 0x89, 0x93, 0x48, 0xfb, 0x53, 0x9e, + 0x7a, 0x14, 0xbb, 0xe9, 0x95, 0x88, 0x3c, 0xed, 0xa0, 0x47, 0xf0, 0x30, 0x62, 0xfe, 0x8c, 0x7b, + 0x9a, 0x00, 0x30, 0xf8, 0x29, 0xb8, 0xd7, 0xb7, 0xd4, 0x87, 0x10, 0xf6, 0xe7, 0x4c, 0xd8, 0x94, + 0x4f, 0xb9, 0x67, 0x25, 0xe1, 0xa4, 0x22, 0xff, 0x82, 0x97, 0x04, 0x4b, 0x91, 0xb5, 0x83, 0xdb, + 0x58, 0xa7, 0x72, 0x70, 0x32, 0xab, 0x7d, 0x96, 0x5b, 0x8d, 0x62, 0x25, 0xab, 0xed, 0xc1, 0x14, + 0x93, 0x78, 0x32, 0xbf, 0x7e, 0x8e, 0x17, 0x56, 0x8a, 0xde, 0x97, 0xbd, 0xfb, 0x0b, 0x30, 0x2d, + 0xcc, 0xc9, 0x3b, 0x30, 0xa7, 0x8c, 0x17, 0x06, 0x82, 0x25, 0x7f, 0x9e, 0x49, 0xe6, 0x15, 0x5f, + 0xb4, 0x70, 0xce, 0x66, 0xa5, 0x85, 0x85, 0x3f, 0x09, 0x69, 0x2e, 0xbc, 0x6b, 0xa3, 0x06, 0xbf, + 0x79, 0x68, 0x23, 0x37, 0xd6, 0x42, 0x88, 0xfe, 0x4b, 0xc5, 0x55, 0xfb, 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b, + 0x51, 0x3a, 0xe0, 0xb9, 0xdd, 0x21, 0x73, 0xd4, 0xf6, 0x8c, 0x71, 0x9d, 0x23, 0x77, 0xa9, 0xf3, + 0x74, 0x0e, 0x3d, 0xb5, 0xcb, 0xe3, 0xc6, 0x02, 0x18, 0xde, 0x21, 0xa6, 0x04, 0xfd, 0xb5, 0x12, + 0xc3, 0xee, 0xa1, 0x64, 0xee, 0x47, 0x55, 0x58, 0xd8, 0x55, 0xfc, 0xc8, 0xc6, 0x56, 0x69, 0x17, + 0xff, 0x3e, 0x86, 0x96, 0xf9, 0xa2, 0x06, 0x09, 0xd6, 0xb6, 0x56, 0x9b, 0x2d, 0xcb, 0xc8, 0x83, + 0x96, 0x63, 0xf1, 0xf0, 0xea, 0xf4, 0xd6, 0x2a, 0x68, 0x76, 0xd2, 0xf2, 0xe1, 0x5d, 0xad, 0xdd, + 0x32, 0x56, 0x40, 0x2b, 0x30, 0x07, 0x87, 0xf3, 0x8c, 0x56, 0xcd, 0x7c, 0x5f, 0x87, 0xd3, 0xde, + 0x36, 0x9a, 0xd7, 0x93, 0x8b, 0xf2, 0x73, 0x53, 0x76, 0x64, 0x79, 0xe5, 0xd2, 0xea, 0x02, 0xfe, + 0x4f, 0x84, 0xe4, 0x45, 0xf9, 0x11, 0xaa, 0x97, 0xa5, 0xe7, 0x98, 0x48, 0x36, 0xea, 0xa1, 0xf6, + 0x1c, 0x13, 0x91, 0xa8, 0x3d, 0xc7, 0x44, 0x24, 0x6a, 0xcf, 0x31, 0x11, 0x89, 0xda, 0xb3, 0x15, + 0x20, 0x51, 0x7b, 0x8e, 0x89, 0x48, 0xd4, 0x9e, 0x63, 0x22, 0x12, 0xb5, 0xf7, 0x98, 0x08, 0x23, + 0xf7, 0x3d, 0x26, 0x22, 0xd3, 0x7b, 0x8f, 0x89, 0xc8, 0xf4, 0xde, 0x63, 0x22, 0x59, 0xd4, 0x9f, + 0x75, 0xad, 0xfe, 0x9b, 0x0e, 0x32, 0x7e, 0x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1a, 0xfa, + 0x97, 0x95, 0xf0, 0xf3, 0x1c, 0x82, 0xca, 0x28, 0xe1, 0x07, 0x3e, 0xa1, 0x97, 0x51, 0x42, 0x0f, + 0x7c, 0xc2, 0x2e, 0xa3, 0x84, 0x1d, 0xf8, 0x84, 0x5c, 0x46, 0x09, 0x39, 0xf0, 0x09, 0xb7, 0x8c, + 0x12, 0x6e, 0xe0, 0x13, 0x6a, 0x19, 0x25, 0xd4, 0xc0, 0x27, 0xcc, 0x32, 0x4a, 0x98, 0x81, 0x4f, + 0x88, 0x65, 0x94, 0x10, 0x03, 0x9f, 0xf0, 0xca, 0x28, 0xe1, 0x05, 0x3e, 0xa1, 0x35, 0xa3, 0x86, + 0x16, 0xf8, 0x85, 0xd5, 0x8c, 0x1a, 0x56, 0xe0, 0x17, 0x52, 0x0f, 0xa8, 0x21, 0x35, 0x82, 0xb8, + 0x62, 0x78, 0xc8, 0x13, 0x4d, 0x33, 0x6a, 0x34, 0x81, 0x5f, 0x24, 0xcd, 0xa8, 0x91, 0x04, 0x7e, + 0x51, 0x34, 0xa3, 0x46, 0x11, 0xf8, 0x45, 0xd0, 0x4b, 0x6a, 0x04, 0xb9, 0x47, 0x7c, 0x32, 0xca, + 0x8e, 0x62, 0x50, 0x04, 0xe9, 0x21, 0x22, 0x48, 0x0f, 0x11, 0x41, 0x7a, 0x88, 0x08, 0xd2, 0x43, + 0x44, 0x90, 0x1e, 0x22, 0x82, 0xf4, 0x10, 0x11, 0xa4, 0x87, 0x88, 0x20, 0x3d, 0x4c, 0x04, 0xe9, + 0xa1, 0x22, 0x48, 0xef, 0x17, 0x41, 0x33, 0xea, 0x81, 0x07, 0xf0, 0x2b, 0x48, 0x33, 0xea, 0xce, + 0x67, 0x70, 0x08, 0xe9, 0xa1, 0x42, 0x48, 0xef, 0x17, 0x42, 0x5f, 0x46, 0x8d, 0x94, 0x14, 0x42, + 0x6c, 0x7b, 0xe8, 0xb5, 0xaa, 0x40, 0x57, 0x42, 0x9c, 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0x83, 0x5e, 0x2f, 0xa1, 0xd7, 0x9d, 0x6f, 0x22, + 0x7e, 0xf4, 0xf7, 0xeb, 0xe8, 0xf5, 0x1d, 0xf4, 0xfe, 0x7b, 0xe8, 0xef, 0x0f, 0xd1, 0xdf, 0x77, + 0x7c, 0xeb, 0xdc, 0xa9, 0x17, 0xd0, 0xeb, 0xc5, 0x6f, 0x9d, 0xd3, 0xfe, 0x3f, 0x00, 0x00, 0xff, + 0xff, 0x1e, 0xd1, 0x9e, 0xe4, 0x1c, 0x5f, 0x00, 0x00, + } + r := bytes.NewReader(gzipped) + gzipr, err := compress_gzip.NewReader(r) + if err != nil { + panic(err) + } + ungzipped, err := io_ioutil.ReadAll(gzipr) + if err != nil { + panic(err) + } + if err := github_com_gogo_protobuf_proto.Unmarshal(ungzipped, d); err != nil { + panic(err) + } + return d +} +func (x TheTestEnum) String() string { + s, ok := TheTestEnum_name[int32(x)] + if ok { + return s + } + return strconv.Itoa(int(x)) +} +func (x AnotherTestEnum) String() string { + s, ok := AnotherTestEnum_name[int32(x)] + if ok { + return s + } + return strconv.Itoa(int(x)) +} +func (x YetAnotherTestEnum) String() string { + s, ok := YetAnotherTestEnum_name[int32(x)] + if ok { + return s + } + return strconv.Itoa(int(x)) +} +func (x YetYetAnotherTestEnum) String() string { + s, ok := YetYetAnotherTestEnum_name[int32(x)] + if ok { + return s + } + return strconv.Itoa(int(x)) +} +func (x NestedDefinition_NestedEnum) String() string { + s, ok := NestedDefinition_NestedEnum_name[int32(x)] + if ok { + return s + } + return strconv.Itoa(int(x)) +} +func (this *NidOptNative) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NidOptNative) + if !ok { + that2, ok := that.(NidOptNative) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NidOptNative") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NidOptNative but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NidOptNative but is not nil && this == nil") + } + if this.Field1 != that1.Field1 { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) + } + if this.Field2 != that1.Field2 { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) + } + if this.Field3 != that1.Field3 { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", this.Field3, that1.Field3) + } + if this.Field4 != that1.Field4 { + return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", this.Field4, that1.Field4) + } + if this.Field5 != that1.Field5 { + return fmt.Errorf("Field5 this(%v) Not Equal that(%v)", this.Field5, that1.Field5) + } + if this.Field6 != that1.Field6 { + return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", this.Field6, that1.Field6) + } + if this.Field7 != that1.Field7 { + return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", this.Field7, that1.Field7) + } + if this.Field8 != that1.Field8 { + return fmt.Errorf("Field8 this(%v) Not Equal that(%v)", this.Field8, that1.Field8) + } + if this.Field9 != that1.Field9 { + return fmt.Errorf("Field9 this(%v) Not Equal that(%v)", this.Field9, that1.Field9) + } + if this.Field10 != that1.Field10 { + return fmt.Errorf("Field10 this(%v) Not Equal that(%v)", this.Field10, that1.Field10) + } + if this.Field11 != that1.Field11 { + return fmt.Errorf("Field11 this(%v) Not Equal that(%v)", this.Field11, that1.Field11) + } + if this.Field12 != that1.Field12 { + return fmt.Errorf("Field12 this(%v) Not Equal that(%v)", this.Field12, that1.Field12) + } + if this.Field13 != that1.Field13 { + return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", this.Field13, that1.Field13) + } + if this.Field14 != that1.Field14 { + return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", this.Field14, that1.Field14) + } + if !bytes.Equal(this.Field15, that1.Field15) { + return fmt.Errorf("Field15 this(%v) Not Equal that(%v)", this.Field15, that1.Field15) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NidOptNative) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*NidOptNative) + if !ok { + that2, ok := that.(NidOptNative) + 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.Field1 != that1.Field1 { + return false + } + if this.Field2 != that1.Field2 { + return false + } + if this.Field3 != that1.Field3 { + return false + } + if this.Field4 != that1.Field4 { + return false + } + if this.Field5 != that1.Field5 { + return false + } + if this.Field6 != that1.Field6 { + return false + } + if this.Field7 != that1.Field7 { + return false + } + if this.Field8 != that1.Field8 { + return false + } + if this.Field9 != that1.Field9 { + return false + } + if this.Field10 != that1.Field10 { + return false + } + if this.Field11 != that1.Field11 { + return false + } + if this.Field12 != that1.Field12 { + return false + } + if this.Field13 != that1.Field13 { + return false + } + if this.Field14 != that1.Field14 { + return false + } + if !bytes.Equal(this.Field15, that1.Field15) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NinOptNative) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NinOptNative) + if !ok { + that2, ok := that.(NinOptNative) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NinOptNative") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NinOptNative but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NinOptNative but is not nil && this == nil") + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) + } + } else if this.Field1 != nil { + return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") + } else if that1.Field1 != nil { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", *this.Field2, *that1.Field2) + } + } else if this.Field2 != nil { + return fmt.Errorf("this.Field2 == nil && that.Field2 != nil") + } else if that1.Field2 != nil { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) + } + if this.Field3 != nil && that1.Field3 != nil { + if *this.Field3 != *that1.Field3 { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", *this.Field3, *that1.Field3) + } + } else if this.Field3 != nil { + return fmt.Errorf("this.Field3 == nil && that.Field3 != nil") + } else if that1.Field3 != nil { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", this.Field3, that1.Field3) + } + if this.Field4 != nil && that1.Field4 != nil { + if *this.Field4 != *that1.Field4 { + return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", *this.Field4, *that1.Field4) + } + } else if this.Field4 != nil { + return fmt.Errorf("this.Field4 == nil && that.Field4 != nil") + } else if that1.Field4 != nil { + return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", this.Field4, that1.Field4) + } + if this.Field5 != nil && that1.Field5 != nil { + if *this.Field5 != *that1.Field5 { + return fmt.Errorf("Field5 this(%v) Not Equal that(%v)", *this.Field5, *that1.Field5) + } + } else if this.Field5 != nil { + return fmt.Errorf("this.Field5 == nil && that.Field5 != nil") + } else if that1.Field5 != nil { + return fmt.Errorf("Field5 this(%v) Not Equal that(%v)", this.Field5, that1.Field5) + } + if this.Field6 != nil && that1.Field6 != nil { + if *this.Field6 != *that1.Field6 { + return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", *this.Field6, *that1.Field6) + } + } else if this.Field6 != nil { + return fmt.Errorf("this.Field6 == nil && that.Field6 != nil") + } else if that1.Field6 != nil { + return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", this.Field6, that1.Field6) + } + if this.Field7 != nil && that1.Field7 != nil { + if *this.Field7 != *that1.Field7 { + return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", *this.Field7, *that1.Field7) + } + } else if this.Field7 != nil { + return fmt.Errorf("this.Field7 == nil && that.Field7 != nil") + } else if that1.Field7 != nil { + return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", this.Field7, that1.Field7) + } + if this.Field8 != nil && that1.Field8 != nil { + if *this.Field8 != *that1.Field8 { + return fmt.Errorf("Field8 this(%v) Not Equal that(%v)", *this.Field8, *that1.Field8) + } + } else if this.Field8 != nil { + return fmt.Errorf("this.Field8 == nil && that.Field8 != nil") + } else if that1.Field8 != nil { + return fmt.Errorf("Field8 this(%v) Not Equal that(%v)", this.Field8, that1.Field8) + } + if this.Field9 != nil && that1.Field9 != nil { + if *this.Field9 != *that1.Field9 { + return fmt.Errorf("Field9 this(%v) Not Equal that(%v)", *this.Field9, *that1.Field9) + } + } else if this.Field9 != nil { + return fmt.Errorf("this.Field9 == nil && that.Field9 != nil") + } else if that1.Field9 != nil { + return fmt.Errorf("Field9 this(%v) Not Equal that(%v)", this.Field9, that1.Field9) + } + if this.Field10 != nil && that1.Field10 != nil { + if *this.Field10 != *that1.Field10 { + return fmt.Errorf("Field10 this(%v) Not Equal that(%v)", *this.Field10, *that1.Field10) + } + } else if this.Field10 != nil { + return fmt.Errorf("this.Field10 == nil && that.Field10 != nil") + } else if that1.Field10 != nil { + return fmt.Errorf("Field10 this(%v) Not Equal that(%v)", this.Field10, that1.Field10) + } + if this.Field11 != nil && that1.Field11 != nil { + if *this.Field11 != *that1.Field11 { + return fmt.Errorf("Field11 this(%v) Not Equal that(%v)", *this.Field11, *that1.Field11) + } + } else if this.Field11 != nil { + return fmt.Errorf("this.Field11 == nil && that.Field11 != nil") + } else if that1.Field11 != nil { + return fmt.Errorf("Field11 this(%v) Not Equal that(%v)", this.Field11, that1.Field11) + } + if this.Field12 != nil && that1.Field12 != nil { + if *this.Field12 != *that1.Field12 { + return fmt.Errorf("Field12 this(%v) Not Equal that(%v)", *this.Field12, *that1.Field12) + } + } else if this.Field12 != nil { + return fmt.Errorf("this.Field12 == nil && that.Field12 != nil") + } else if that1.Field12 != nil { + return fmt.Errorf("Field12 this(%v) Not Equal that(%v)", this.Field12, that1.Field12) + } + if this.Field13 != nil && that1.Field13 != nil { + if *this.Field13 != *that1.Field13 { + return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", *this.Field13, *that1.Field13) + } + } else if this.Field13 != nil { + return fmt.Errorf("this.Field13 == nil && that.Field13 != nil") + } else if that1.Field13 != nil { + return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", this.Field13, that1.Field13) + } + if this.Field14 != nil && that1.Field14 != nil { + if *this.Field14 != *that1.Field14 { + return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", *this.Field14, *that1.Field14) + } + } else if this.Field14 != nil { + return fmt.Errorf("this.Field14 == nil && that.Field14 != nil") + } else if that1.Field14 != nil { + return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", this.Field14, that1.Field14) + } + if !bytes.Equal(this.Field15, that1.Field15) { + return fmt.Errorf("Field15 this(%v) Not Equal that(%v)", this.Field15, that1.Field15) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NinOptNative) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*NinOptNative) + if !ok { + that2, ok := that.(NinOptNative) + 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.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return false + } + } else if this.Field1 != nil { + return false + } else if that1.Field1 != nil { + return false + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + return false + } + } else if this.Field2 != nil { + return false + } else if that1.Field2 != nil { + return false + } + if this.Field3 != nil && that1.Field3 != nil { + if *this.Field3 != *that1.Field3 { + return false + } + } else if this.Field3 != nil { + return false + } else if that1.Field3 != nil { + return false + } + if this.Field4 != nil && that1.Field4 != nil { + if *this.Field4 != *that1.Field4 { + return false + } + } else if this.Field4 != nil { + return false + } else if that1.Field4 != nil { + return false + } + if this.Field5 != nil && that1.Field5 != nil { + if *this.Field5 != *that1.Field5 { + return false + } + } else if this.Field5 != nil { + return false + } else if that1.Field5 != nil { + return false + } + if this.Field6 != nil && that1.Field6 != nil { + if *this.Field6 != *that1.Field6 { + return false + } + } else if this.Field6 != nil { + return false + } else if that1.Field6 != nil { + return false + } + if this.Field7 != nil && that1.Field7 != nil { + if *this.Field7 != *that1.Field7 { + return false + } + } else if this.Field7 != nil { + return false + } else if that1.Field7 != nil { + return false + } + if this.Field8 != nil && that1.Field8 != nil { + if *this.Field8 != *that1.Field8 { + return false + } + } else if this.Field8 != nil { + return false + } else if that1.Field8 != nil { + return false + } + if this.Field9 != nil && that1.Field9 != nil { + if *this.Field9 != *that1.Field9 { + return false + } + } else if this.Field9 != nil { + return false + } else if that1.Field9 != nil { + return false + } + if this.Field10 != nil && that1.Field10 != nil { + if *this.Field10 != *that1.Field10 { + return false + } + } else if this.Field10 != nil { + return false + } else if that1.Field10 != nil { + return false + } + if this.Field11 != nil && that1.Field11 != nil { + if *this.Field11 != *that1.Field11 { + return false + } + } else if this.Field11 != nil { + return false + } else if that1.Field11 != nil { + return false + } + if this.Field12 != nil && that1.Field12 != nil { + if *this.Field12 != *that1.Field12 { + return false + } + } else if this.Field12 != nil { + return false + } else if that1.Field12 != nil { + return false + } + if this.Field13 != nil && that1.Field13 != nil { + if *this.Field13 != *that1.Field13 { + return false + } + } else if this.Field13 != nil { + return false + } else if that1.Field13 != nil { + return false + } + if this.Field14 != nil && that1.Field14 != nil { + if *this.Field14 != *that1.Field14 { + return false + } + } else if this.Field14 != nil { + return false + } else if that1.Field14 != nil { + return false + } + if !bytes.Equal(this.Field15, that1.Field15) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NidRepNative) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NidRepNative) + if !ok { + that2, ok := that.(NidRepNative) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NidRepNative") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NidRepNative but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NidRepNative but is not nil && this == nil") + } + if len(this.Field1) != len(that1.Field1) { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", len(this.Field1), len(that1.Field1)) + } + for i := range this.Field1 { + if this.Field1[i] != that1.Field1[i] { + return fmt.Errorf("Field1 this[%v](%v) Not Equal that[%v](%v)", i, this.Field1[i], i, that1.Field1[i]) + } + } + if len(this.Field2) != len(that1.Field2) { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", len(this.Field2), len(that1.Field2)) + } + for i := range this.Field2 { + if this.Field2[i] != that1.Field2[i] { + return fmt.Errorf("Field2 this[%v](%v) Not Equal that[%v](%v)", i, this.Field2[i], i, that1.Field2[i]) + } + } + if len(this.Field3) != len(that1.Field3) { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", len(this.Field3), len(that1.Field3)) + } + for i := range this.Field3 { + if this.Field3[i] != that1.Field3[i] { + return fmt.Errorf("Field3 this[%v](%v) Not Equal that[%v](%v)", i, this.Field3[i], i, that1.Field3[i]) + } + } + if len(this.Field4) != len(that1.Field4) { + return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", len(this.Field4), len(that1.Field4)) + } + for i := range this.Field4 { + if this.Field4[i] != that1.Field4[i] { + return fmt.Errorf("Field4 this[%v](%v) Not Equal that[%v](%v)", i, this.Field4[i], i, that1.Field4[i]) + } + } + if len(this.Field5) != len(that1.Field5) { + return fmt.Errorf("Field5 this(%v) Not Equal that(%v)", len(this.Field5), len(that1.Field5)) + } + for i := range this.Field5 { + if this.Field5[i] != that1.Field5[i] { + return fmt.Errorf("Field5 this[%v](%v) Not Equal that[%v](%v)", i, this.Field5[i], i, that1.Field5[i]) + } + } + if len(this.Field6) != len(that1.Field6) { + return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", len(this.Field6), len(that1.Field6)) + } + for i := range this.Field6 { + if this.Field6[i] != that1.Field6[i] { + return fmt.Errorf("Field6 this[%v](%v) Not Equal that[%v](%v)", i, this.Field6[i], i, that1.Field6[i]) + } + } + if len(this.Field7) != len(that1.Field7) { + return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", len(this.Field7), len(that1.Field7)) + } + for i := range this.Field7 { + if this.Field7[i] != that1.Field7[i] { + return fmt.Errorf("Field7 this[%v](%v) Not Equal that[%v](%v)", i, this.Field7[i], i, that1.Field7[i]) + } + } + if len(this.Field8) != len(that1.Field8) { + return fmt.Errorf("Field8 this(%v) Not Equal that(%v)", len(this.Field8), len(that1.Field8)) + } + for i := range this.Field8 { + if this.Field8[i] != that1.Field8[i] { + return fmt.Errorf("Field8 this[%v](%v) Not Equal that[%v](%v)", i, this.Field8[i], i, that1.Field8[i]) + } + } + if len(this.Field9) != len(that1.Field9) { + return fmt.Errorf("Field9 this(%v) Not Equal that(%v)", len(this.Field9), len(that1.Field9)) + } + for i := range this.Field9 { + if this.Field9[i] != that1.Field9[i] { + return fmt.Errorf("Field9 this[%v](%v) Not Equal that[%v](%v)", i, this.Field9[i], i, that1.Field9[i]) + } + } + if len(this.Field10) != len(that1.Field10) { + return fmt.Errorf("Field10 this(%v) Not Equal that(%v)", len(this.Field10), len(that1.Field10)) + } + for i := range this.Field10 { + if this.Field10[i] != that1.Field10[i] { + return fmt.Errorf("Field10 this[%v](%v) Not Equal that[%v](%v)", i, this.Field10[i], i, that1.Field10[i]) + } + } + if len(this.Field11) != len(that1.Field11) { + return fmt.Errorf("Field11 this(%v) Not Equal that(%v)", len(this.Field11), len(that1.Field11)) + } + for i := range this.Field11 { + if this.Field11[i] != that1.Field11[i] { + return fmt.Errorf("Field11 this[%v](%v) Not Equal that[%v](%v)", i, this.Field11[i], i, that1.Field11[i]) + } + } + if len(this.Field12) != len(that1.Field12) { + return fmt.Errorf("Field12 this(%v) Not Equal that(%v)", len(this.Field12), len(that1.Field12)) + } + for i := range this.Field12 { + if this.Field12[i] != that1.Field12[i] { + return fmt.Errorf("Field12 this[%v](%v) Not Equal that[%v](%v)", i, this.Field12[i], i, that1.Field12[i]) + } + } + if len(this.Field13) != len(that1.Field13) { + return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", len(this.Field13), len(that1.Field13)) + } + for i := range this.Field13 { + if this.Field13[i] != that1.Field13[i] { + return fmt.Errorf("Field13 this[%v](%v) Not Equal that[%v](%v)", i, this.Field13[i], i, that1.Field13[i]) + } + } + if len(this.Field14) != len(that1.Field14) { + return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", len(this.Field14), len(that1.Field14)) + } + for i := range this.Field14 { + if this.Field14[i] != that1.Field14[i] { + return fmt.Errorf("Field14 this[%v](%v) Not Equal that[%v](%v)", i, this.Field14[i], i, that1.Field14[i]) + } + } + if len(this.Field15) != len(that1.Field15) { + return fmt.Errorf("Field15 this(%v) Not Equal that(%v)", len(this.Field15), len(that1.Field15)) + } + for i := range this.Field15 { + if !bytes.Equal(this.Field15[i], that1.Field15[i]) { + return fmt.Errorf("Field15 this[%v](%v) Not Equal that[%v](%v)", i, this.Field15[i], i, that1.Field15[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NidRepNative) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*NidRepNative) + if !ok { + that2, ok := that.(NidRepNative) + 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.Field1) != len(that1.Field1) { + return false + } + for i := range this.Field1 { + if this.Field1[i] != that1.Field1[i] { + return false + } + } + if len(this.Field2) != len(that1.Field2) { + return false + } + for i := range this.Field2 { + if this.Field2[i] != that1.Field2[i] { + return false + } + } + if len(this.Field3) != len(that1.Field3) { + return false + } + for i := range this.Field3 { + if this.Field3[i] != that1.Field3[i] { + return false + } + } + if len(this.Field4) != len(that1.Field4) { + return false + } + for i := range this.Field4 { + if this.Field4[i] != that1.Field4[i] { + return false + } + } + if len(this.Field5) != len(that1.Field5) { + return false + } + for i := range this.Field5 { + if this.Field5[i] != that1.Field5[i] { + return false + } + } + if len(this.Field6) != len(that1.Field6) { + return false + } + for i := range this.Field6 { + if this.Field6[i] != that1.Field6[i] { + return false + } + } + if len(this.Field7) != len(that1.Field7) { + return false + } + for i := range this.Field7 { + if this.Field7[i] != that1.Field7[i] { + return false + } + } + if len(this.Field8) != len(that1.Field8) { + return false + } + for i := range this.Field8 { + if this.Field8[i] != that1.Field8[i] { + return false + } + } + if len(this.Field9) != len(that1.Field9) { + return false + } + for i := range this.Field9 { + if this.Field9[i] != that1.Field9[i] { + return false + } + } + if len(this.Field10) != len(that1.Field10) { + return false + } + for i := range this.Field10 { + if this.Field10[i] != that1.Field10[i] { + return false + } + } + if len(this.Field11) != len(that1.Field11) { + return false + } + for i := range this.Field11 { + if this.Field11[i] != that1.Field11[i] { + return false + } + } + if len(this.Field12) != len(that1.Field12) { + return false + } + for i := range this.Field12 { + if this.Field12[i] != that1.Field12[i] { + return false + } + } + if len(this.Field13) != len(that1.Field13) { + return false + } + for i := range this.Field13 { + if this.Field13[i] != that1.Field13[i] { + return false + } + } + if len(this.Field14) != len(that1.Field14) { + return false + } + for i := range this.Field14 { + if this.Field14[i] != that1.Field14[i] { + return false + } + } + if len(this.Field15) != len(that1.Field15) { + return false + } + for i := range this.Field15 { + if !bytes.Equal(this.Field15[i], that1.Field15[i]) { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NinRepNative) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NinRepNative) + if !ok { + that2, ok := that.(NinRepNative) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NinRepNative") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NinRepNative but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NinRepNative but is not nil && this == nil") + } + if len(this.Field1) != len(that1.Field1) { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", len(this.Field1), len(that1.Field1)) + } + for i := range this.Field1 { + if this.Field1[i] != that1.Field1[i] { + return fmt.Errorf("Field1 this[%v](%v) Not Equal that[%v](%v)", i, this.Field1[i], i, that1.Field1[i]) + } + } + if len(this.Field2) != len(that1.Field2) { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", len(this.Field2), len(that1.Field2)) + } + for i := range this.Field2 { + if this.Field2[i] != that1.Field2[i] { + return fmt.Errorf("Field2 this[%v](%v) Not Equal that[%v](%v)", i, this.Field2[i], i, that1.Field2[i]) + } + } + if len(this.Field3) != len(that1.Field3) { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", len(this.Field3), len(that1.Field3)) + } + for i := range this.Field3 { + if this.Field3[i] != that1.Field3[i] { + return fmt.Errorf("Field3 this[%v](%v) Not Equal that[%v](%v)", i, this.Field3[i], i, that1.Field3[i]) + } + } + if len(this.Field4) != len(that1.Field4) { + return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", len(this.Field4), len(that1.Field4)) + } + for i := range this.Field4 { + if this.Field4[i] != that1.Field4[i] { + return fmt.Errorf("Field4 this[%v](%v) Not Equal that[%v](%v)", i, this.Field4[i], i, that1.Field4[i]) + } + } + if len(this.Field5) != len(that1.Field5) { + return fmt.Errorf("Field5 this(%v) Not Equal that(%v)", len(this.Field5), len(that1.Field5)) + } + for i := range this.Field5 { + if this.Field5[i] != that1.Field5[i] { + return fmt.Errorf("Field5 this[%v](%v) Not Equal that[%v](%v)", i, this.Field5[i], i, that1.Field5[i]) + } + } + if len(this.Field6) != len(that1.Field6) { + return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", len(this.Field6), len(that1.Field6)) + } + for i := range this.Field6 { + if this.Field6[i] != that1.Field6[i] { + return fmt.Errorf("Field6 this[%v](%v) Not Equal that[%v](%v)", i, this.Field6[i], i, that1.Field6[i]) + } + } + if len(this.Field7) != len(that1.Field7) { + return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", len(this.Field7), len(that1.Field7)) + } + for i := range this.Field7 { + if this.Field7[i] != that1.Field7[i] { + return fmt.Errorf("Field7 this[%v](%v) Not Equal that[%v](%v)", i, this.Field7[i], i, that1.Field7[i]) + } + } + if len(this.Field8) != len(that1.Field8) { + return fmt.Errorf("Field8 this(%v) Not Equal that(%v)", len(this.Field8), len(that1.Field8)) + } + for i := range this.Field8 { + if this.Field8[i] != that1.Field8[i] { + return fmt.Errorf("Field8 this[%v](%v) Not Equal that[%v](%v)", i, this.Field8[i], i, that1.Field8[i]) + } + } + if len(this.Field9) != len(that1.Field9) { + return fmt.Errorf("Field9 this(%v) Not Equal that(%v)", len(this.Field9), len(that1.Field9)) + } + for i := range this.Field9 { + if this.Field9[i] != that1.Field9[i] { + return fmt.Errorf("Field9 this[%v](%v) Not Equal that[%v](%v)", i, this.Field9[i], i, that1.Field9[i]) + } + } + if len(this.Field10) != len(that1.Field10) { + return fmt.Errorf("Field10 this(%v) Not Equal that(%v)", len(this.Field10), len(that1.Field10)) + } + for i := range this.Field10 { + if this.Field10[i] != that1.Field10[i] { + return fmt.Errorf("Field10 this[%v](%v) Not Equal that[%v](%v)", i, this.Field10[i], i, that1.Field10[i]) + } + } + if len(this.Field11) != len(that1.Field11) { + return fmt.Errorf("Field11 this(%v) Not Equal that(%v)", len(this.Field11), len(that1.Field11)) + } + for i := range this.Field11 { + if this.Field11[i] != that1.Field11[i] { + return fmt.Errorf("Field11 this[%v](%v) Not Equal that[%v](%v)", i, this.Field11[i], i, that1.Field11[i]) + } + } + if len(this.Field12) != len(that1.Field12) { + return fmt.Errorf("Field12 this(%v) Not Equal that(%v)", len(this.Field12), len(that1.Field12)) + } + for i := range this.Field12 { + if this.Field12[i] != that1.Field12[i] { + return fmt.Errorf("Field12 this[%v](%v) Not Equal that[%v](%v)", i, this.Field12[i], i, that1.Field12[i]) + } + } + if len(this.Field13) != len(that1.Field13) { + return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", len(this.Field13), len(that1.Field13)) + } + for i := range this.Field13 { + if this.Field13[i] != that1.Field13[i] { + return fmt.Errorf("Field13 this[%v](%v) Not Equal that[%v](%v)", i, this.Field13[i], i, that1.Field13[i]) + } + } + if len(this.Field14) != len(that1.Field14) { + return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", len(this.Field14), len(that1.Field14)) + } + for i := range this.Field14 { + if this.Field14[i] != that1.Field14[i] { + return fmt.Errorf("Field14 this[%v](%v) Not Equal that[%v](%v)", i, this.Field14[i], i, that1.Field14[i]) + } + } + if len(this.Field15) != len(that1.Field15) { + return fmt.Errorf("Field15 this(%v) Not Equal that(%v)", len(this.Field15), len(that1.Field15)) + } + for i := range this.Field15 { + if !bytes.Equal(this.Field15[i], that1.Field15[i]) { + return fmt.Errorf("Field15 this[%v](%v) Not Equal that[%v](%v)", i, this.Field15[i], i, that1.Field15[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NinRepNative) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*NinRepNative) + if !ok { + that2, ok := that.(NinRepNative) + 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.Field1) != len(that1.Field1) { + return false + } + for i := range this.Field1 { + if this.Field1[i] != that1.Field1[i] { + return false + } + } + if len(this.Field2) != len(that1.Field2) { + return false + } + for i := range this.Field2 { + if this.Field2[i] != that1.Field2[i] { + return false + } + } + if len(this.Field3) != len(that1.Field3) { + return false + } + for i := range this.Field3 { + if this.Field3[i] != that1.Field3[i] { + return false + } + } + if len(this.Field4) != len(that1.Field4) { + return false + } + for i := range this.Field4 { + if this.Field4[i] != that1.Field4[i] { + return false + } + } + if len(this.Field5) != len(that1.Field5) { + return false + } + for i := range this.Field5 { + if this.Field5[i] != that1.Field5[i] { + return false + } + } + if len(this.Field6) != len(that1.Field6) { + return false + } + for i := range this.Field6 { + if this.Field6[i] != that1.Field6[i] { + return false + } + } + if len(this.Field7) != len(that1.Field7) { + return false + } + for i := range this.Field7 { + if this.Field7[i] != that1.Field7[i] { + return false + } + } + if len(this.Field8) != len(that1.Field8) { + return false + } + for i := range this.Field8 { + if this.Field8[i] != that1.Field8[i] { + return false + } + } + if len(this.Field9) != len(that1.Field9) { + return false + } + for i := range this.Field9 { + if this.Field9[i] != that1.Field9[i] { + return false + } + } + if len(this.Field10) != len(that1.Field10) { + return false + } + for i := range this.Field10 { + if this.Field10[i] != that1.Field10[i] { + return false + } + } + if len(this.Field11) != len(that1.Field11) { + return false + } + for i := range this.Field11 { + if this.Field11[i] != that1.Field11[i] { + return false + } + } + if len(this.Field12) != len(that1.Field12) { + return false + } + for i := range this.Field12 { + if this.Field12[i] != that1.Field12[i] { + return false + } + } + if len(this.Field13) != len(that1.Field13) { + return false + } + for i := range this.Field13 { + if this.Field13[i] != that1.Field13[i] { + return false + } + } + if len(this.Field14) != len(that1.Field14) { + return false + } + for i := range this.Field14 { + if this.Field14[i] != that1.Field14[i] { + return false + } + } + if len(this.Field15) != len(that1.Field15) { + return false + } + for i := range this.Field15 { + if !bytes.Equal(this.Field15[i], that1.Field15[i]) { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NidRepPackedNative) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NidRepPackedNative) + if !ok { + that2, ok := that.(NidRepPackedNative) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NidRepPackedNative") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NidRepPackedNative but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NidRepPackedNative but is not nil && this == nil") + } + if len(this.Field1) != len(that1.Field1) { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", len(this.Field1), len(that1.Field1)) + } + for i := range this.Field1 { + if this.Field1[i] != that1.Field1[i] { + return fmt.Errorf("Field1 this[%v](%v) Not Equal that[%v](%v)", i, this.Field1[i], i, that1.Field1[i]) + } + } + if len(this.Field2) != len(that1.Field2) { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", len(this.Field2), len(that1.Field2)) + } + for i := range this.Field2 { + if this.Field2[i] != that1.Field2[i] { + return fmt.Errorf("Field2 this[%v](%v) Not Equal that[%v](%v)", i, this.Field2[i], i, that1.Field2[i]) + } + } + if len(this.Field3) != len(that1.Field3) { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", len(this.Field3), len(that1.Field3)) + } + for i := range this.Field3 { + if this.Field3[i] != that1.Field3[i] { + return fmt.Errorf("Field3 this[%v](%v) Not Equal that[%v](%v)", i, this.Field3[i], i, that1.Field3[i]) + } + } + if len(this.Field4) != len(that1.Field4) { + return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", len(this.Field4), len(that1.Field4)) + } + for i := range this.Field4 { + if this.Field4[i] != that1.Field4[i] { + return fmt.Errorf("Field4 this[%v](%v) Not Equal that[%v](%v)", i, this.Field4[i], i, that1.Field4[i]) + } + } + if len(this.Field5) != len(that1.Field5) { + return fmt.Errorf("Field5 this(%v) Not Equal that(%v)", len(this.Field5), len(that1.Field5)) + } + for i := range this.Field5 { + if this.Field5[i] != that1.Field5[i] { + return fmt.Errorf("Field5 this[%v](%v) Not Equal that[%v](%v)", i, this.Field5[i], i, that1.Field5[i]) + } + } + if len(this.Field6) != len(that1.Field6) { + return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", len(this.Field6), len(that1.Field6)) + } + for i := range this.Field6 { + if this.Field6[i] != that1.Field6[i] { + return fmt.Errorf("Field6 this[%v](%v) Not Equal that[%v](%v)", i, this.Field6[i], i, that1.Field6[i]) + } + } + if len(this.Field7) != len(that1.Field7) { + return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", len(this.Field7), len(that1.Field7)) + } + for i := range this.Field7 { + if this.Field7[i] != that1.Field7[i] { + return fmt.Errorf("Field7 this[%v](%v) Not Equal that[%v](%v)", i, this.Field7[i], i, that1.Field7[i]) + } + } + if len(this.Field8) != len(that1.Field8) { + return fmt.Errorf("Field8 this(%v) Not Equal that(%v)", len(this.Field8), len(that1.Field8)) + } + for i := range this.Field8 { + if this.Field8[i] != that1.Field8[i] { + return fmt.Errorf("Field8 this[%v](%v) Not Equal that[%v](%v)", i, this.Field8[i], i, that1.Field8[i]) + } + } + if len(this.Field9) != len(that1.Field9) { + return fmt.Errorf("Field9 this(%v) Not Equal that(%v)", len(this.Field9), len(that1.Field9)) + } + for i := range this.Field9 { + if this.Field9[i] != that1.Field9[i] { + return fmt.Errorf("Field9 this[%v](%v) Not Equal that[%v](%v)", i, this.Field9[i], i, that1.Field9[i]) + } + } + if len(this.Field10) != len(that1.Field10) { + return fmt.Errorf("Field10 this(%v) Not Equal that(%v)", len(this.Field10), len(that1.Field10)) + } + for i := range this.Field10 { + if this.Field10[i] != that1.Field10[i] { + return fmt.Errorf("Field10 this[%v](%v) Not Equal that[%v](%v)", i, this.Field10[i], i, that1.Field10[i]) + } + } + if len(this.Field11) != len(that1.Field11) { + return fmt.Errorf("Field11 this(%v) Not Equal that(%v)", len(this.Field11), len(that1.Field11)) + } + for i := range this.Field11 { + if this.Field11[i] != that1.Field11[i] { + return fmt.Errorf("Field11 this[%v](%v) Not Equal that[%v](%v)", i, this.Field11[i], i, that1.Field11[i]) + } + } + if len(this.Field12) != len(that1.Field12) { + return fmt.Errorf("Field12 this(%v) Not Equal that(%v)", len(this.Field12), len(that1.Field12)) + } + for i := range this.Field12 { + if this.Field12[i] != that1.Field12[i] { + return fmt.Errorf("Field12 this[%v](%v) Not Equal that[%v](%v)", i, this.Field12[i], i, that1.Field12[i]) + } + } + if len(this.Field13) != len(that1.Field13) { + return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", len(this.Field13), len(that1.Field13)) + } + for i := range this.Field13 { + if this.Field13[i] != that1.Field13[i] { + return fmt.Errorf("Field13 this[%v](%v) Not Equal that[%v](%v)", i, this.Field13[i], i, that1.Field13[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NidRepPackedNative) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*NidRepPackedNative) + if !ok { + that2, ok := that.(NidRepPackedNative) + 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.Field1) != len(that1.Field1) { + return false + } + for i := range this.Field1 { + if this.Field1[i] != that1.Field1[i] { + return false + } + } + if len(this.Field2) != len(that1.Field2) { + return false + } + for i := range this.Field2 { + if this.Field2[i] != that1.Field2[i] { + return false + } + } + if len(this.Field3) != len(that1.Field3) { + return false + } + for i := range this.Field3 { + if this.Field3[i] != that1.Field3[i] { + return false + } + } + if len(this.Field4) != len(that1.Field4) { + return false + } + for i := range this.Field4 { + if this.Field4[i] != that1.Field4[i] { + return false + } + } + if len(this.Field5) != len(that1.Field5) { + return false + } + for i := range this.Field5 { + if this.Field5[i] != that1.Field5[i] { + return false + } + } + if len(this.Field6) != len(that1.Field6) { + return false + } + for i := range this.Field6 { + if this.Field6[i] != that1.Field6[i] { + return false + } + } + if len(this.Field7) != len(that1.Field7) { + return false + } + for i := range this.Field7 { + if this.Field7[i] != that1.Field7[i] { + return false + } + } + if len(this.Field8) != len(that1.Field8) { + return false + } + for i := range this.Field8 { + if this.Field8[i] != that1.Field8[i] { + return false + } + } + if len(this.Field9) != len(that1.Field9) { + return false + } + for i := range this.Field9 { + if this.Field9[i] != that1.Field9[i] { + return false + } + } + if len(this.Field10) != len(that1.Field10) { + return false + } + for i := range this.Field10 { + if this.Field10[i] != that1.Field10[i] { + return false + } + } + if len(this.Field11) != len(that1.Field11) { + return false + } + for i := range this.Field11 { + if this.Field11[i] != that1.Field11[i] { + return false + } + } + if len(this.Field12) != len(that1.Field12) { + return false + } + for i := range this.Field12 { + if this.Field12[i] != that1.Field12[i] { + return false + } + } + if len(this.Field13) != len(that1.Field13) { + return false + } + for i := range this.Field13 { + if this.Field13[i] != that1.Field13[i] { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NinRepPackedNative) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NinRepPackedNative) + if !ok { + that2, ok := that.(NinRepPackedNative) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NinRepPackedNative") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NinRepPackedNative but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NinRepPackedNative but is not nil && this == nil") + } + if len(this.Field1) != len(that1.Field1) { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", len(this.Field1), len(that1.Field1)) + } + for i := range this.Field1 { + if this.Field1[i] != that1.Field1[i] { + return fmt.Errorf("Field1 this[%v](%v) Not Equal that[%v](%v)", i, this.Field1[i], i, that1.Field1[i]) + } + } + if len(this.Field2) != len(that1.Field2) { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", len(this.Field2), len(that1.Field2)) + } + for i := range this.Field2 { + if this.Field2[i] != that1.Field2[i] { + return fmt.Errorf("Field2 this[%v](%v) Not Equal that[%v](%v)", i, this.Field2[i], i, that1.Field2[i]) + } + } + if len(this.Field3) != len(that1.Field3) { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", len(this.Field3), len(that1.Field3)) + } + for i := range this.Field3 { + if this.Field3[i] != that1.Field3[i] { + return fmt.Errorf("Field3 this[%v](%v) Not Equal that[%v](%v)", i, this.Field3[i], i, that1.Field3[i]) + } + } + if len(this.Field4) != len(that1.Field4) { + return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", len(this.Field4), len(that1.Field4)) + } + for i := range this.Field4 { + if this.Field4[i] != that1.Field4[i] { + return fmt.Errorf("Field4 this[%v](%v) Not Equal that[%v](%v)", i, this.Field4[i], i, that1.Field4[i]) + } + } + if len(this.Field5) != len(that1.Field5) { + return fmt.Errorf("Field5 this(%v) Not Equal that(%v)", len(this.Field5), len(that1.Field5)) + } + for i := range this.Field5 { + if this.Field5[i] != that1.Field5[i] { + return fmt.Errorf("Field5 this[%v](%v) Not Equal that[%v](%v)", i, this.Field5[i], i, that1.Field5[i]) + } + } + if len(this.Field6) != len(that1.Field6) { + return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", len(this.Field6), len(that1.Field6)) + } + for i := range this.Field6 { + if this.Field6[i] != that1.Field6[i] { + return fmt.Errorf("Field6 this[%v](%v) Not Equal that[%v](%v)", i, this.Field6[i], i, that1.Field6[i]) + } + } + if len(this.Field7) != len(that1.Field7) { + return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", len(this.Field7), len(that1.Field7)) + } + for i := range this.Field7 { + if this.Field7[i] != that1.Field7[i] { + return fmt.Errorf("Field7 this[%v](%v) Not Equal that[%v](%v)", i, this.Field7[i], i, that1.Field7[i]) + } + } + if len(this.Field8) != len(that1.Field8) { + return fmt.Errorf("Field8 this(%v) Not Equal that(%v)", len(this.Field8), len(that1.Field8)) + } + for i := range this.Field8 { + if this.Field8[i] != that1.Field8[i] { + return fmt.Errorf("Field8 this[%v](%v) Not Equal that[%v](%v)", i, this.Field8[i], i, that1.Field8[i]) + } + } + if len(this.Field9) != len(that1.Field9) { + return fmt.Errorf("Field9 this(%v) Not Equal that(%v)", len(this.Field9), len(that1.Field9)) + } + for i := range this.Field9 { + if this.Field9[i] != that1.Field9[i] { + return fmt.Errorf("Field9 this[%v](%v) Not Equal that[%v](%v)", i, this.Field9[i], i, that1.Field9[i]) + } + } + if len(this.Field10) != len(that1.Field10) { + return fmt.Errorf("Field10 this(%v) Not Equal that(%v)", len(this.Field10), len(that1.Field10)) + } + for i := range this.Field10 { + if this.Field10[i] != that1.Field10[i] { + return fmt.Errorf("Field10 this[%v](%v) Not Equal that[%v](%v)", i, this.Field10[i], i, that1.Field10[i]) + } + } + if len(this.Field11) != len(that1.Field11) { + return fmt.Errorf("Field11 this(%v) Not Equal that(%v)", len(this.Field11), len(that1.Field11)) + } + for i := range this.Field11 { + if this.Field11[i] != that1.Field11[i] { + return fmt.Errorf("Field11 this[%v](%v) Not Equal that[%v](%v)", i, this.Field11[i], i, that1.Field11[i]) + } + } + if len(this.Field12) != len(that1.Field12) { + return fmt.Errorf("Field12 this(%v) Not Equal that(%v)", len(this.Field12), len(that1.Field12)) + } + for i := range this.Field12 { + if this.Field12[i] != that1.Field12[i] { + return fmt.Errorf("Field12 this[%v](%v) Not Equal that[%v](%v)", i, this.Field12[i], i, that1.Field12[i]) + } + } + if len(this.Field13) != len(that1.Field13) { + return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", len(this.Field13), len(that1.Field13)) + } + for i := range this.Field13 { + if this.Field13[i] != that1.Field13[i] { + return fmt.Errorf("Field13 this[%v](%v) Not Equal that[%v](%v)", i, this.Field13[i], i, that1.Field13[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NinRepPackedNative) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*NinRepPackedNative) + if !ok { + that2, ok := that.(NinRepPackedNative) + 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.Field1) != len(that1.Field1) { + return false + } + for i := range this.Field1 { + if this.Field1[i] != that1.Field1[i] { + return false + } + } + if len(this.Field2) != len(that1.Field2) { + return false + } + for i := range this.Field2 { + if this.Field2[i] != that1.Field2[i] { + return false + } + } + if len(this.Field3) != len(that1.Field3) { + return false + } + for i := range this.Field3 { + if this.Field3[i] != that1.Field3[i] { + return false + } + } + if len(this.Field4) != len(that1.Field4) { + return false + } + for i := range this.Field4 { + if this.Field4[i] != that1.Field4[i] { + return false + } + } + if len(this.Field5) != len(that1.Field5) { + return false + } + for i := range this.Field5 { + if this.Field5[i] != that1.Field5[i] { + return false + } + } + if len(this.Field6) != len(that1.Field6) { + return false + } + for i := range this.Field6 { + if this.Field6[i] != that1.Field6[i] { + return false + } + } + if len(this.Field7) != len(that1.Field7) { + return false + } + for i := range this.Field7 { + if this.Field7[i] != that1.Field7[i] { + return false + } + } + if len(this.Field8) != len(that1.Field8) { + return false + } + for i := range this.Field8 { + if this.Field8[i] != that1.Field8[i] { + return false + } + } + if len(this.Field9) != len(that1.Field9) { + return false + } + for i := range this.Field9 { + if this.Field9[i] != that1.Field9[i] { + return false + } + } + if len(this.Field10) != len(that1.Field10) { + return false + } + for i := range this.Field10 { + if this.Field10[i] != that1.Field10[i] { + return false + } + } + if len(this.Field11) != len(that1.Field11) { + return false + } + for i := range this.Field11 { + if this.Field11[i] != that1.Field11[i] { + return false + } + } + if len(this.Field12) != len(that1.Field12) { + return false + } + for i := range this.Field12 { + if this.Field12[i] != that1.Field12[i] { + return false + } + } + if len(this.Field13) != len(that1.Field13) { + return false + } + for i := range this.Field13 { + if this.Field13[i] != that1.Field13[i] { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NidOptStruct) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NidOptStruct) + if !ok { + that2, ok := that.(NidOptStruct) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NidOptStruct") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NidOptStruct but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NidOptStruct but is not nil && this == nil") + } + if this.Field1 != that1.Field1 { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) + } + if this.Field2 != that1.Field2 { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) + } + if !this.Field3.Equal(&that1.Field3) { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", this.Field3, that1.Field3) + } + if !this.Field4.Equal(&that1.Field4) { + return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", this.Field4, that1.Field4) + } + if this.Field6 != that1.Field6 { + return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", this.Field6, that1.Field6) + } + if this.Field7 != that1.Field7 { + return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", this.Field7, that1.Field7) + } + if !this.Field8.Equal(&that1.Field8) { + return fmt.Errorf("Field8 this(%v) Not Equal that(%v)", this.Field8, that1.Field8) + } + if this.Field13 != that1.Field13 { + return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", this.Field13, that1.Field13) + } + if this.Field14 != that1.Field14 { + return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", this.Field14, that1.Field14) + } + if !bytes.Equal(this.Field15, that1.Field15) { + return fmt.Errorf("Field15 this(%v) Not Equal that(%v)", this.Field15, that1.Field15) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NidOptStruct) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*NidOptStruct) + if !ok { + that2, ok := that.(NidOptStruct) + 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.Field1 != that1.Field1 { + return false + } + if this.Field2 != that1.Field2 { + return false + } + if !this.Field3.Equal(&that1.Field3) { + return false + } + if !this.Field4.Equal(&that1.Field4) { + return false + } + if this.Field6 != that1.Field6 { + return false + } + if this.Field7 != that1.Field7 { + return false + } + if !this.Field8.Equal(&that1.Field8) { + return false + } + if this.Field13 != that1.Field13 { + return false + } + if this.Field14 != that1.Field14 { + return false + } + if !bytes.Equal(this.Field15, that1.Field15) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NinOptStruct) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NinOptStruct) + if !ok { + that2, ok := that.(NinOptStruct) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NinOptStruct") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NinOptStruct but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NinOptStruct but is not nil && this == nil") + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) + } + } else if this.Field1 != nil { + return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") + } else if that1.Field1 != nil { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", *this.Field2, *that1.Field2) + } + } else if this.Field2 != nil { + return fmt.Errorf("this.Field2 == nil && that.Field2 != nil") + } else if that1.Field2 != nil { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) + } + if !this.Field3.Equal(that1.Field3) { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", this.Field3, that1.Field3) + } + if !this.Field4.Equal(that1.Field4) { + return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", this.Field4, that1.Field4) + } + if this.Field6 != nil && that1.Field6 != nil { + if *this.Field6 != *that1.Field6 { + return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", *this.Field6, *that1.Field6) + } + } else if this.Field6 != nil { + return fmt.Errorf("this.Field6 == nil && that.Field6 != nil") + } else if that1.Field6 != nil { + return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", this.Field6, that1.Field6) + } + if this.Field7 != nil && that1.Field7 != nil { + if *this.Field7 != *that1.Field7 { + return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", *this.Field7, *that1.Field7) + } + } else if this.Field7 != nil { + return fmt.Errorf("this.Field7 == nil && that.Field7 != nil") + } else if that1.Field7 != nil { + return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", this.Field7, that1.Field7) + } + if !this.Field8.Equal(that1.Field8) { + return fmt.Errorf("Field8 this(%v) Not Equal that(%v)", this.Field8, that1.Field8) + } + if this.Field13 != nil && that1.Field13 != nil { + if *this.Field13 != *that1.Field13 { + return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", *this.Field13, *that1.Field13) + } + } else if this.Field13 != nil { + return fmt.Errorf("this.Field13 == nil && that.Field13 != nil") + } else if that1.Field13 != nil { + return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", this.Field13, that1.Field13) + } + if this.Field14 != nil && that1.Field14 != nil { + if *this.Field14 != *that1.Field14 { + return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", *this.Field14, *that1.Field14) + } + } else if this.Field14 != nil { + return fmt.Errorf("this.Field14 == nil && that.Field14 != nil") + } else if that1.Field14 != nil { + return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", this.Field14, that1.Field14) + } + if !bytes.Equal(this.Field15, that1.Field15) { + return fmt.Errorf("Field15 this(%v) Not Equal that(%v)", this.Field15, that1.Field15) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NinOptStruct) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*NinOptStruct) + if !ok { + that2, ok := that.(NinOptStruct) + 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.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return false + } + } else if this.Field1 != nil { + return false + } else if that1.Field1 != nil { + return false + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + return false + } + } else if this.Field2 != nil { + return false + } else if that1.Field2 != nil { + return false + } + if !this.Field3.Equal(that1.Field3) { + return false + } + if !this.Field4.Equal(that1.Field4) { + return false + } + if this.Field6 != nil && that1.Field6 != nil { + if *this.Field6 != *that1.Field6 { + return false + } + } else if this.Field6 != nil { + return false + } else if that1.Field6 != nil { + return false + } + if this.Field7 != nil && that1.Field7 != nil { + if *this.Field7 != *that1.Field7 { + return false + } + } else if this.Field7 != nil { + return false + } else if that1.Field7 != nil { + return false + } + if !this.Field8.Equal(that1.Field8) { + return false + } + if this.Field13 != nil && that1.Field13 != nil { + if *this.Field13 != *that1.Field13 { + return false + } + } else if this.Field13 != nil { + return false + } else if that1.Field13 != nil { + return false + } + if this.Field14 != nil && that1.Field14 != nil { + if *this.Field14 != *that1.Field14 { + return false + } + } else if this.Field14 != nil { + return false + } else if that1.Field14 != nil { + return false + } + if !bytes.Equal(this.Field15, that1.Field15) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NidRepStruct) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NidRepStruct) + if !ok { + that2, ok := that.(NidRepStruct) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NidRepStruct") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NidRepStruct but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NidRepStruct but is not nil && this == nil") + } + if len(this.Field1) != len(that1.Field1) { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", len(this.Field1), len(that1.Field1)) + } + for i := range this.Field1 { + if this.Field1[i] != that1.Field1[i] { + return fmt.Errorf("Field1 this[%v](%v) Not Equal that[%v](%v)", i, this.Field1[i], i, that1.Field1[i]) + } + } + if len(this.Field2) != len(that1.Field2) { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", len(this.Field2), len(that1.Field2)) + } + for i := range this.Field2 { + if this.Field2[i] != that1.Field2[i] { + return fmt.Errorf("Field2 this[%v](%v) Not Equal that[%v](%v)", i, this.Field2[i], i, that1.Field2[i]) + } + } + if len(this.Field3) != len(that1.Field3) { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", len(this.Field3), len(that1.Field3)) + } + for i := range this.Field3 { + if !this.Field3[i].Equal(&that1.Field3[i]) { + return fmt.Errorf("Field3 this[%v](%v) Not Equal that[%v](%v)", i, this.Field3[i], i, that1.Field3[i]) + } + } + if len(this.Field4) != len(that1.Field4) { + return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", len(this.Field4), len(that1.Field4)) + } + for i := range this.Field4 { + if !this.Field4[i].Equal(&that1.Field4[i]) { + return fmt.Errorf("Field4 this[%v](%v) Not Equal that[%v](%v)", i, this.Field4[i], i, that1.Field4[i]) + } + } + if len(this.Field6) != len(that1.Field6) { + return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", len(this.Field6), len(that1.Field6)) + } + for i := range this.Field6 { + if this.Field6[i] != that1.Field6[i] { + return fmt.Errorf("Field6 this[%v](%v) Not Equal that[%v](%v)", i, this.Field6[i], i, that1.Field6[i]) + } + } + if len(this.Field7) != len(that1.Field7) { + return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", len(this.Field7), len(that1.Field7)) + } + for i := range this.Field7 { + if this.Field7[i] != that1.Field7[i] { + return fmt.Errorf("Field7 this[%v](%v) Not Equal that[%v](%v)", i, this.Field7[i], i, that1.Field7[i]) + } + } + if len(this.Field8) != len(that1.Field8) { + return fmt.Errorf("Field8 this(%v) Not Equal that(%v)", len(this.Field8), len(that1.Field8)) + } + for i := range this.Field8 { + if !this.Field8[i].Equal(&that1.Field8[i]) { + return fmt.Errorf("Field8 this[%v](%v) Not Equal that[%v](%v)", i, this.Field8[i], i, that1.Field8[i]) + } + } + if len(this.Field13) != len(that1.Field13) { + return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", len(this.Field13), len(that1.Field13)) + } + for i := range this.Field13 { + if this.Field13[i] != that1.Field13[i] { + return fmt.Errorf("Field13 this[%v](%v) Not Equal that[%v](%v)", i, this.Field13[i], i, that1.Field13[i]) + } + } + if len(this.Field14) != len(that1.Field14) { + return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", len(this.Field14), len(that1.Field14)) + } + for i := range this.Field14 { + if this.Field14[i] != that1.Field14[i] { + return fmt.Errorf("Field14 this[%v](%v) Not Equal that[%v](%v)", i, this.Field14[i], i, that1.Field14[i]) + } + } + if len(this.Field15) != len(that1.Field15) { + return fmt.Errorf("Field15 this(%v) Not Equal that(%v)", len(this.Field15), len(that1.Field15)) + } + for i := range this.Field15 { + if !bytes.Equal(this.Field15[i], that1.Field15[i]) { + return fmt.Errorf("Field15 this[%v](%v) Not Equal that[%v](%v)", i, this.Field15[i], i, that1.Field15[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NidRepStruct) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*NidRepStruct) + if !ok { + that2, ok := that.(NidRepStruct) + 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.Field1) != len(that1.Field1) { + return false + } + for i := range this.Field1 { + if this.Field1[i] != that1.Field1[i] { + return false + } + } + if len(this.Field2) != len(that1.Field2) { + return false + } + for i := range this.Field2 { + if this.Field2[i] != that1.Field2[i] { + return false + } + } + if len(this.Field3) != len(that1.Field3) { + return false + } + for i := range this.Field3 { + if !this.Field3[i].Equal(&that1.Field3[i]) { + return false + } + } + if len(this.Field4) != len(that1.Field4) { + return false + } + for i := range this.Field4 { + if !this.Field4[i].Equal(&that1.Field4[i]) { + return false + } + } + if len(this.Field6) != len(that1.Field6) { + return false + } + for i := range this.Field6 { + if this.Field6[i] != that1.Field6[i] { + return false + } + } + if len(this.Field7) != len(that1.Field7) { + return false + } + for i := range this.Field7 { + if this.Field7[i] != that1.Field7[i] { + return false + } + } + if len(this.Field8) != len(that1.Field8) { + return false + } + for i := range this.Field8 { + if !this.Field8[i].Equal(&that1.Field8[i]) { + return false + } + } + if len(this.Field13) != len(that1.Field13) { + return false + } + for i := range this.Field13 { + if this.Field13[i] != that1.Field13[i] { + return false + } + } + if len(this.Field14) != len(that1.Field14) { + return false + } + for i := range this.Field14 { + if this.Field14[i] != that1.Field14[i] { + return false + } + } + if len(this.Field15) != len(that1.Field15) { + return false + } + for i := range this.Field15 { + if !bytes.Equal(this.Field15[i], that1.Field15[i]) { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NinRepStruct) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NinRepStruct) + if !ok { + that2, ok := that.(NinRepStruct) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NinRepStruct") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NinRepStruct but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NinRepStruct but is not nil && this == nil") + } + if len(this.Field1) != len(that1.Field1) { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", len(this.Field1), len(that1.Field1)) + } + for i := range this.Field1 { + if this.Field1[i] != that1.Field1[i] { + return fmt.Errorf("Field1 this[%v](%v) Not Equal that[%v](%v)", i, this.Field1[i], i, that1.Field1[i]) + } + } + if len(this.Field2) != len(that1.Field2) { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", len(this.Field2), len(that1.Field2)) + } + for i := range this.Field2 { + if this.Field2[i] != that1.Field2[i] { + return fmt.Errorf("Field2 this[%v](%v) Not Equal that[%v](%v)", i, this.Field2[i], i, that1.Field2[i]) + } + } + if len(this.Field3) != len(that1.Field3) { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", len(this.Field3), len(that1.Field3)) + } + for i := range this.Field3 { + if !this.Field3[i].Equal(that1.Field3[i]) { + return fmt.Errorf("Field3 this[%v](%v) Not Equal that[%v](%v)", i, this.Field3[i], i, that1.Field3[i]) + } + } + if len(this.Field4) != len(that1.Field4) { + return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", len(this.Field4), len(that1.Field4)) + } + for i := range this.Field4 { + if !this.Field4[i].Equal(that1.Field4[i]) { + return fmt.Errorf("Field4 this[%v](%v) Not Equal that[%v](%v)", i, this.Field4[i], i, that1.Field4[i]) + } + } + if len(this.Field6) != len(that1.Field6) { + return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", len(this.Field6), len(that1.Field6)) + } + for i := range this.Field6 { + if this.Field6[i] != that1.Field6[i] { + return fmt.Errorf("Field6 this[%v](%v) Not Equal that[%v](%v)", i, this.Field6[i], i, that1.Field6[i]) + } + } + if len(this.Field7) != len(that1.Field7) { + return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", len(this.Field7), len(that1.Field7)) + } + for i := range this.Field7 { + if this.Field7[i] != that1.Field7[i] { + return fmt.Errorf("Field7 this[%v](%v) Not Equal that[%v](%v)", i, this.Field7[i], i, that1.Field7[i]) + } + } + if len(this.Field8) != len(that1.Field8) { + return fmt.Errorf("Field8 this(%v) Not Equal that(%v)", len(this.Field8), len(that1.Field8)) + } + for i := range this.Field8 { + if !this.Field8[i].Equal(that1.Field8[i]) { + return fmt.Errorf("Field8 this[%v](%v) Not Equal that[%v](%v)", i, this.Field8[i], i, that1.Field8[i]) + } + } + if len(this.Field13) != len(that1.Field13) { + return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", len(this.Field13), len(that1.Field13)) + } + for i := range this.Field13 { + if this.Field13[i] != that1.Field13[i] { + return fmt.Errorf("Field13 this[%v](%v) Not Equal that[%v](%v)", i, this.Field13[i], i, that1.Field13[i]) + } + } + if len(this.Field14) != len(that1.Field14) { + return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", len(this.Field14), len(that1.Field14)) + } + for i := range this.Field14 { + if this.Field14[i] != that1.Field14[i] { + return fmt.Errorf("Field14 this[%v](%v) Not Equal that[%v](%v)", i, this.Field14[i], i, that1.Field14[i]) + } + } + if len(this.Field15) != len(that1.Field15) { + return fmt.Errorf("Field15 this(%v) Not Equal that(%v)", len(this.Field15), len(that1.Field15)) + } + for i := range this.Field15 { + if !bytes.Equal(this.Field15[i], that1.Field15[i]) { + return fmt.Errorf("Field15 this[%v](%v) Not Equal that[%v](%v)", i, this.Field15[i], i, that1.Field15[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NinRepStruct) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*NinRepStruct) + if !ok { + that2, ok := that.(NinRepStruct) + 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.Field1) != len(that1.Field1) { + return false + } + for i := range this.Field1 { + if this.Field1[i] != that1.Field1[i] { + return false + } + } + if len(this.Field2) != len(that1.Field2) { + return false + } + for i := range this.Field2 { + if this.Field2[i] != that1.Field2[i] { + return false + } + } + if len(this.Field3) != len(that1.Field3) { + return false + } + for i := range this.Field3 { + if !this.Field3[i].Equal(that1.Field3[i]) { + return false + } + } + if len(this.Field4) != len(that1.Field4) { + return false + } + for i := range this.Field4 { + if !this.Field4[i].Equal(that1.Field4[i]) { + return false + } + } + if len(this.Field6) != len(that1.Field6) { + return false + } + for i := range this.Field6 { + if this.Field6[i] != that1.Field6[i] { + return false + } + } + if len(this.Field7) != len(that1.Field7) { + return false + } + for i := range this.Field7 { + if this.Field7[i] != that1.Field7[i] { + return false + } + } + if len(this.Field8) != len(that1.Field8) { + return false + } + for i := range this.Field8 { + if !this.Field8[i].Equal(that1.Field8[i]) { + return false + } + } + if len(this.Field13) != len(that1.Field13) { + return false + } + for i := range this.Field13 { + if this.Field13[i] != that1.Field13[i] { + return false + } + } + if len(this.Field14) != len(that1.Field14) { + return false + } + for i := range this.Field14 { + if this.Field14[i] != that1.Field14[i] { + return false + } + } + if len(this.Field15) != len(that1.Field15) { + return false + } + for i := range this.Field15 { + if !bytes.Equal(this.Field15[i], that1.Field15[i]) { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NidEmbeddedStruct) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NidEmbeddedStruct) + if !ok { + that2, ok := that.(NidEmbeddedStruct) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NidEmbeddedStruct") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NidEmbeddedStruct but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NidEmbeddedStruct but is not nil && this == nil") + } + if !this.NidOptNative.Equal(that1.NidOptNative) { + return fmt.Errorf("NidOptNative this(%v) Not Equal that(%v)", this.NidOptNative, that1.NidOptNative) + } + if !this.Field200.Equal(&that1.Field200) { + return fmt.Errorf("Field200 this(%v) Not Equal that(%v)", this.Field200, that1.Field200) + } + if this.Field210 != that1.Field210 { + return fmt.Errorf("Field210 this(%v) Not Equal that(%v)", this.Field210, that1.Field210) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NidEmbeddedStruct) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*NidEmbeddedStruct) + if !ok { + that2, ok := that.(NidEmbeddedStruct) + 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.NidOptNative.Equal(that1.NidOptNative) { + return false + } + if !this.Field200.Equal(&that1.Field200) { + return false + } + if this.Field210 != that1.Field210 { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NinEmbeddedStruct) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NinEmbeddedStruct) + if !ok { + that2, ok := that.(NinEmbeddedStruct) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NinEmbeddedStruct") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NinEmbeddedStruct but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NinEmbeddedStruct but is not nil && this == nil") + } + if !this.NidOptNative.Equal(that1.NidOptNative) { + return fmt.Errorf("NidOptNative this(%v) Not Equal that(%v)", this.NidOptNative, that1.NidOptNative) + } + if !this.Field200.Equal(that1.Field200) { + return fmt.Errorf("Field200 this(%v) Not Equal that(%v)", this.Field200, that1.Field200) + } + if this.Field210 != nil && that1.Field210 != nil { + if *this.Field210 != *that1.Field210 { + return fmt.Errorf("Field210 this(%v) Not Equal that(%v)", *this.Field210, *that1.Field210) + } + } else if this.Field210 != nil { + return fmt.Errorf("this.Field210 == nil && that.Field210 != nil") + } else if that1.Field210 != nil { + return fmt.Errorf("Field210 this(%v) Not Equal that(%v)", this.Field210, that1.Field210) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NinEmbeddedStruct) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*NinEmbeddedStruct) + if !ok { + that2, ok := that.(NinEmbeddedStruct) + 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.NidOptNative.Equal(that1.NidOptNative) { + return false + } + if !this.Field200.Equal(that1.Field200) { + return false + } + if this.Field210 != nil && that1.Field210 != nil { + if *this.Field210 != *that1.Field210 { + return false + } + } else if this.Field210 != nil { + return false + } else if that1.Field210 != nil { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NidNestedStruct) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NidNestedStruct) + if !ok { + that2, ok := that.(NidNestedStruct) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NidNestedStruct") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NidNestedStruct but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NidNestedStruct but is not nil && this == nil") + } + if !this.Field1.Equal(&that1.Field1) { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) + } + if len(this.Field2) != len(that1.Field2) { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", len(this.Field2), len(that1.Field2)) + } + for i := range this.Field2 { + if !this.Field2[i].Equal(&that1.Field2[i]) { + return fmt.Errorf("Field2 this[%v](%v) Not Equal that[%v](%v)", i, this.Field2[i], i, that1.Field2[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NidNestedStruct) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*NidNestedStruct) + if !ok { + that2, ok := that.(NidNestedStruct) + 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.Field1.Equal(&that1.Field1) { + return false + } + if len(this.Field2) != len(that1.Field2) { + return false + } + for i := range this.Field2 { + if !this.Field2[i].Equal(&that1.Field2[i]) { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NinNestedStruct) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NinNestedStruct) + if !ok { + that2, ok := that.(NinNestedStruct) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NinNestedStruct") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NinNestedStruct but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NinNestedStruct but is not nil && this == nil") + } + if !this.Field1.Equal(that1.Field1) { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) + } + if len(this.Field2) != len(that1.Field2) { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", len(this.Field2), len(that1.Field2)) + } + for i := range this.Field2 { + if !this.Field2[i].Equal(that1.Field2[i]) { + return fmt.Errorf("Field2 this[%v](%v) Not Equal that[%v](%v)", i, this.Field2[i], i, that1.Field2[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NinNestedStruct) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*NinNestedStruct) + if !ok { + that2, ok := that.(NinNestedStruct) + 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.Field1.Equal(that1.Field1) { + return false + } + if len(this.Field2) != len(that1.Field2) { + return false + } + for i := range this.Field2 { + if !this.Field2[i].Equal(that1.Field2[i]) { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NidOptCustom) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NidOptCustom) + if !ok { + that2, ok := that.(NidOptCustom) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NidOptCustom") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NidOptCustom but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NidOptCustom 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.Value.Equal(that1.Value) { + return fmt.Errorf("Value this(%v) Not Equal that(%v)", this.Value, that1.Value) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NidOptCustom) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*NidOptCustom) + if !ok { + that2, ok := that.(NidOptCustom) + 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.Value.Equal(that1.Value) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *CustomDash) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*CustomDash) + if !ok { + that2, ok := that.(CustomDash) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *CustomDash") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *CustomDash but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *CustomDash but is not nil && this == nil") + } + if that1.Value == nil { + if this.Value != nil { + return fmt.Errorf("this.Value != nil && that1.Value == nil") + } + } else if !this.Value.Equal(*that1.Value) { + return fmt.Errorf("Value this(%v) Not Equal that(%v)", this.Value, that1.Value) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *CustomDash) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*CustomDash) + if !ok { + that2, ok := that.(CustomDash) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + if this == nil { + return true + } + return false + } else if this == nil { + return false + } + if that1.Value == nil { + if this.Value != nil { + return false + } + } else if !this.Value.Equal(*that1.Value) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NinOptCustom) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NinOptCustom) + if !ok { + that2, ok := that.(NinOptCustom) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NinOptCustom") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NinOptCustom but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NinOptCustom but is not nil && this == nil") + } + if that1.Id == nil { + if this.Id != nil { + return fmt.Errorf("this.Id != nil && that1.Id == nil") + } + } else if !this.Id.Equal(*that1.Id) { + return fmt.Errorf("Id this(%v) Not Equal that(%v)", this.Id, that1.Id) + } + if that1.Value == nil { + if this.Value != nil { + return fmt.Errorf("this.Value != nil && that1.Value == nil") + } + } else if !this.Value.Equal(*that1.Value) { + return fmt.Errorf("Value this(%v) Not Equal that(%v)", this.Value, that1.Value) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NinOptCustom) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*NinOptCustom) + if !ok { + that2, ok := that.(NinOptCustom) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + if this == nil { + return true + } + return false + } else if this == nil { + return false + } + if that1.Id == nil { + if this.Id != nil { + return false + } + } else if !this.Id.Equal(*that1.Id) { + return false + } + if that1.Value == nil { + if this.Value != nil { + return false + } + } else if !this.Value.Equal(*that1.Value) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NidRepCustom) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NidRepCustom) + if !ok { + that2, ok := that.(NidRepCustom) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NidRepCustom") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NidRepCustom but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NidRepCustom but is not nil && this == nil") + } + if len(this.Id) != len(that1.Id) { + return fmt.Errorf("Id this(%v) Not Equal that(%v)", len(this.Id), len(that1.Id)) + } + for i := range this.Id { + if !this.Id[i].Equal(that1.Id[i]) { + return fmt.Errorf("Id this[%v](%v) Not Equal that[%v](%v)", i, this.Id[i], i, that1.Id[i]) + } + } + if len(this.Value) != len(that1.Value) { + return fmt.Errorf("Value this(%v) Not Equal that(%v)", len(this.Value), len(that1.Value)) + } + for i := range this.Value { + if !this.Value[i].Equal(that1.Value[i]) { + return fmt.Errorf("Value this[%v](%v) Not Equal that[%v](%v)", i, this.Value[i], i, that1.Value[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NidRepCustom) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*NidRepCustom) + if !ok { + that2, ok := that.(NidRepCustom) + 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.Id) != len(that1.Id) { + return false + } + for i := range this.Id { + if !this.Id[i].Equal(that1.Id[i]) { + return false + } + } + if len(this.Value) != len(that1.Value) { + return false + } + for i := range this.Value { + if !this.Value[i].Equal(that1.Value[i]) { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NinRepCustom) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NinRepCustom) + if !ok { + that2, ok := that.(NinRepCustom) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NinRepCustom") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NinRepCustom but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NinRepCustom but is not nil && this == nil") + } + if len(this.Id) != len(that1.Id) { + return fmt.Errorf("Id this(%v) Not Equal that(%v)", len(this.Id), len(that1.Id)) + } + for i := range this.Id { + if !this.Id[i].Equal(that1.Id[i]) { + return fmt.Errorf("Id this[%v](%v) Not Equal that[%v](%v)", i, this.Id[i], i, that1.Id[i]) + } + } + if len(this.Value) != len(that1.Value) { + return fmt.Errorf("Value this(%v) Not Equal that(%v)", len(this.Value), len(that1.Value)) + } + for i := range this.Value { + if !this.Value[i].Equal(that1.Value[i]) { + return fmt.Errorf("Value this[%v](%v) Not Equal that[%v](%v)", i, this.Value[i], i, that1.Value[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NinRepCustom) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*NinRepCustom) + if !ok { + that2, ok := that.(NinRepCustom) + 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.Id) != len(that1.Id) { + return false + } + for i := range this.Id { + if !this.Id[i].Equal(that1.Id[i]) { + return false + } + } + if len(this.Value) != len(that1.Value) { + return false + } + for i := range this.Value { + if !this.Value[i].Equal(that1.Value[i]) { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NinOptNativeUnion) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NinOptNativeUnion) + if !ok { + that2, ok := that.(NinOptNativeUnion) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NinOptNativeUnion") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NinOptNativeUnion but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NinOptNativeUnion but is not nil && this == nil") + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) + } + } else if this.Field1 != nil { + return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") + } else if that1.Field1 != nil { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", *this.Field2, *that1.Field2) + } + } else if this.Field2 != nil { + return fmt.Errorf("this.Field2 == nil && that.Field2 != nil") + } else if that1.Field2 != nil { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) + } + if this.Field3 != nil && that1.Field3 != nil { + if *this.Field3 != *that1.Field3 { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", *this.Field3, *that1.Field3) + } + } else if this.Field3 != nil { + return fmt.Errorf("this.Field3 == nil && that.Field3 != nil") + } else if that1.Field3 != nil { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", this.Field3, that1.Field3) + } + if this.Field4 != nil && that1.Field4 != nil { + if *this.Field4 != *that1.Field4 { + return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", *this.Field4, *that1.Field4) + } + } else if this.Field4 != nil { + return fmt.Errorf("this.Field4 == nil && that.Field4 != nil") + } else if that1.Field4 != nil { + return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", this.Field4, that1.Field4) + } + if this.Field5 != nil && that1.Field5 != nil { + if *this.Field5 != *that1.Field5 { + return fmt.Errorf("Field5 this(%v) Not Equal that(%v)", *this.Field5, *that1.Field5) + } + } else if this.Field5 != nil { + return fmt.Errorf("this.Field5 == nil && that.Field5 != nil") + } else if that1.Field5 != nil { + return fmt.Errorf("Field5 this(%v) Not Equal that(%v)", this.Field5, that1.Field5) + } + if this.Field6 != nil && that1.Field6 != nil { + if *this.Field6 != *that1.Field6 { + return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", *this.Field6, *that1.Field6) + } + } else if this.Field6 != nil { + return fmt.Errorf("this.Field6 == nil && that.Field6 != nil") + } else if that1.Field6 != nil { + return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", this.Field6, that1.Field6) + } + if this.Field13 != nil && that1.Field13 != nil { + if *this.Field13 != *that1.Field13 { + return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", *this.Field13, *that1.Field13) + } + } else if this.Field13 != nil { + return fmt.Errorf("this.Field13 == nil && that.Field13 != nil") + } else if that1.Field13 != nil { + return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", this.Field13, that1.Field13) + } + if this.Field14 != nil && that1.Field14 != nil { + if *this.Field14 != *that1.Field14 { + return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", *this.Field14, *that1.Field14) + } + } else if this.Field14 != nil { + return fmt.Errorf("this.Field14 == nil && that.Field14 != nil") + } else if that1.Field14 != nil { + return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", this.Field14, that1.Field14) + } + if !bytes.Equal(this.Field15, that1.Field15) { + return fmt.Errorf("Field15 this(%v) Not Equal that(%v)", this.Field15, that1.Field15) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NinOptNativeUnion) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*NinOptNativeUnion) + if !ok { + that2, ok := that.(NinOptNativeUnion) + 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.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return false + } + } else if this.Field1 != nil { + return false + } else if that1.Field1 != nil { + return false + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + return false + } + } else if this.Field2 != nil { + return false + } else if that1.Field2 != nil { + return false + } + if this.Field3 != nil && that1.Field3 != nil { + if *this.Field3 != *that1.Field3 { + return false + } + } else if this.Field3 != nil { + return false + } else if that1.Field3 != nil { + return false + } + if this.Field4 != nil && that1.Field4 != nil { + if *this.Field4 != *that1.Field4 { + return false + } + } else if this.Field4 != nil { + return false + } else if that1.Field4 != nil { + return false + } + if this.Field5 != nil && that1.Field5 != nil { + if *this.Field5 != *that1.Field5 { + return false + } + } else if this.Field5 != nil { + return false + } else if that1.Field5 != nil { + return false + } + if this.Field6 != nil && that1.Field6 != nil { + if *this.Field6 != *that1.Field6 { + return false + } + } else if this.Field6 != nil { + return false + } else if that1.Field6 != nil { + return false + } + if this.Field13 != nil && that1.Field13 != nil { + if *this.Field13 != *that1.Field13 { + return false + } + } else if this.Field13 != nil { + return false + } else if that1.Field13 != nil { + return false + } + if this.Field14 != nil && that1.Field14 != nil { + if *this.Field14 != *that1.Field14 { + return false + } + } else if this.Field14 != nil { + return false + } else if that1.Field14 != nil { + return false + } + if !bytes.Equal(this.Field15, that1.Field15) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NinOptStructUnion) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NinOptStructUnion) + if !ok { + that2, ok := that.(NinOptStructUnion) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NinOptStructUnion") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NinOptStructUnion but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NinOptStructUnion but is not nil && this == nil") + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) + } + } else if this.Field1 != nil { + return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") + } else if that1.Field1 != nil { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", *this.Field2, *that1.Field2) + } + } else if this.Field2 != nil { + return fmt.Errorf("this.Field2 == nil && that.Field2 != nil") + } else if that1.Field2 != nil { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) + } + if !this.Field3.Equal(that1.Field3) { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", this.Field3, that1.Field3) + } + if !this.Field4.Equal(that1.Field4) { + return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", this.Field4, that1.Field4) + } + if this.Field6 != nil && that1.Field6 != nil { + if *this.Field6 != *that1.Field6 { + return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", *this.Field6, *that1.Field6) + } + } else if this.Field6 != nil { + return fmt.Errorf("this.Field6 == nil && that.Field6 != nil") + } else if that1.Field6 != nil { + return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", this.Field6, that1.Field6) + } + if this.Field7 != nil && that1.Field7 != nil { + if *this.Field7 != *that1.Field7 { + return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", *this.Field7, *that1.Field7) + } + } else if this.Field7 != nil { + return fmt.Errorf("this.Field7 == nil && that.Field7 != nil") + } else if that1.Field7 != nil { + return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", this.Field7, that1.Field7) + } + if this.Field13 != nil && that1.Field13 != nil { + if *this.Field13 != *that1.Field13 { + return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", *this.Field13, *that1.Field13) + } + } else if this.Field13 != nil { + return fmt.Errorf("this.Field13 == nil && that.Field13 != nil") + } else if that1.Field13 != nil { + return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", this.Field13, that1.Field13) + } + if this.Field14 != nil && that1.Field14 != nil { + if *this.Field14 != *that1.Field14 { + return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", *this.Field14, *that1.Field14) + } + } else if this.Field14 != nil { + return fmt.Errorf("this.Field14 == nil && that.Field14 != nil") + } else if that1.Field14 != nil { + return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", this.Field14, that1.Field14) + } + if !bytes.Equal(this.Field15, that1.Field15) { + return fmt.Errorf("Field15 this(%v) Not Equal that(%v)", this.Field15, that1.Field15) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NinOptStructUnion) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*NinOptStructUnion) + if !ok { + that2, ok := that.(NinOptStructUnion) + 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.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return false + } + } else if this.Field1 != nil { + return false + } else if that1.Field1 != nil { + return false + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + return false + } + } else if this.Field2 != nil { + return false + } else if that1.Field2 != nil { + return false + } + if !this.Field3.Equal(that1.Field3) { + return false + } + if !this.Field4.Equal(that1.Field4) { + return false + } + if this.Field6 != nil && that1.Field6 != nil { + if *this.Field6 != *that1.Field6 { + return false + } + } else if this.Field6 != nil { + return false + } else if that1.Field6 != nil { + return false + } + if this.Field7 != nil && that1.Field7 != nil { + if *this.Field7 != *that1.Field7 { + return false + } + } else if this.Field7 != nil { + return false + } else if that1.Field7 != nil { + return false + } + if this.Field13 != nil && that1.Field13 != nil { + if *this.Field13 != *that1.Field13 { + return false + } + } else if this.Field13 != nil { + return false + } else if that1.Field13 != nil { + return false + } + if this.Field14 != nil && that1.Field14 != nil { + if *this.Field14 != *that1.Field14 { + return false + } + } else if this.Field14 != nil { + return false + } else if that1.Field14 != nil { + return false + } + if !bytes.Equal(this.Field15, that1.Field15) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NinEmbeddedStructUnion) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NinEmbeddedStructUnion) + if !ok { + that2, ok := that.(NinEmbeddedStructUnion) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NinEmbeddedStructUnion") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NinEmbeddedStructUnion but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NinEmbeddedStructUnion but is not nil && this == nil") + } + if !this.NidOptNative.Equal(that1.NidOptNative) { + return fmt.Errorf("NidOptNative this(%v) Not Equal that(%v)", this.NidOptNative, that1.NidOptNative) + } + if !this.Field200.Equal(that1.Field200) { + return fmt.Errorf("Field200 this(%v) Not Equal that(%v)", this.Field200, that1.Field200) + } + if this.Field210 != nil && that1.Field210 != nil { + if *this.Field210 != *that1.Field210 { + return fmt.Errorf("Field210 this(%v) Not Equal that(%v)", *this.Field210, *that1.Field210) + } + } else if this.Field210 != nil { + return fmt.Errorf("this.Field210 == nil && that.Field210 != nil") + } else if that1.Field210 != nil { + return fmt.Errorf("Field210 this(%v) Not Equal that(%v)", this.Field210, that1.Field210) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NinEmbeddedStructUnion) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*NinEmbeddedStructUnion) + if !ok { + that2, ok := that.(NinEmbeddedStructUnion) + 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.NidOptNative.Equal(that1.NidOptNative) { + return false + } + if !this.Field200.Equal(that1.Field200) { + return false + } + if this.Field210 != nil && that1.Field210 != nil { + if *this.Field210 != *that1.Field210 { + return false + } + } else if this.Field210 != nil { + return false + } else if that1.Field210 != nil { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NinNestedStructUnion) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NinNestedStructUnion) + if !ok { + that2, ok := that.(NinNestedStructUnion) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NinNestedStructUnion") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NinNestedStructUnion but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NinNestedStructUnion but is not nil && this == nil") + } + if !this.Field1.Equal(that1.Field1) { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) + } + if !this.Field2.Equal(that1.Field2) { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) + } + if !this.Field3.Equal(that1.Field3) { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", this.Field3, that1.Field3) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NinNestedStructUnion) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*NinNestedStructUnion) + if !ok { + that2, ok := that.(NinNestedStructUnion) + 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.Field1.Equal(that1.Field1) { + return false + } + if !this.Field2.Equal(that1.Field2) { + return false + } + if !this.Field3.Equal(that1.Field3) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *Tree) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*Tree) + if !ok { + that2, ok := that.(Tree) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *Tree") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *Tree but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *Tree but is not nil && this == nil") + } + if !this.Or.Equal(that1.Or) { + return fmt.Errorf("Or this(%v) Not Equal that(%v)", this.Or, that1.Or) + } + if !this.And.Equal(that1.And) { + return fmt.Errorf("And this(%v) Not Equal that(%v)", this.And, that1.And) + } + if !this.Leaf.Equal(that1.Leaf) { + return fmt.Errorf("Leaf this(%v) Not Equal that(%v)", this.Leaf, that1.Leaf) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *Tree) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*Tree) + if !ok { + that2, ok := that.(Tree) + 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.Or.Equal(that1.Or) { + return false + } + if !this.And.Equal(that1.And) { + return false + } + if !this.Leaf.Equal(that1.Leaf) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *OrBranch) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*OrBranch) + if !ok { + that2, ok := that.(OrBranch) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *OrBranch") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *OrBranch but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *OrBranch but is not nil && this == nil") + } + if !this.Left.Equal(&that1.Left) { + return fmt.Errorf("Left this(%v) Not Equal that(%v)", this.Left, that1.Left) + } + if !this.Right.Equal(&that1.Right) { + return fmt.Errorf("Right this(%v) Not Equal that(%v)", this.Right, that1.Right) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *OrBranch) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*OrBranch) + if !ok { + that2, ok := that.(OrBranch) + 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.Left.Equal(&that1.Left) { + return false + } + if !this.Right.Equal(&that1.Right) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *AndBranch) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*AndBranch) + if !ok { + that2, ok := that.(AndBranch) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *AndBranch") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *AndBranch but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *AndBranch but is not nil && this == nil") + } + if !this.Left.Equal(&that1.Left) { + return fmt.Errorf("Left this(%v) Not Equal that(%v)", this.Left, that1.Left) + } + if !this.Right.Equal(&that1.Right) { + return fmt.Errorf("Right this(%v) Not Equal that(%v)", this.Right, that1.Right) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *AndBranch) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*AndBranch) + if !ok { + that2, ok := that.(AndBranch) + 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.Left.Equal(&that1.Left) { + return false + } + if !this.Right.Equal(&that1.Right) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *Leaf) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*Leaf) + if !ok { + that2, ok := that.(Leaf) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *Leaf") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *Leaf but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *Leaf 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.StrValue != that1.StrValue { + return fmt.Errorf("StrValue this(%v) Not Equal that(%v)", this.StrValue, that1.StrValue) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *Leaf) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*Leaf) + if !ok { + that2, ok := that.(Leaf) + 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.StrValue != that1.StrValue { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *DeepTree) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*DeepTree) + if !ok { + that2, ok := that.(DeepTree) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *DeepTree") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *DeepTree but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *DeepTree but is not nil && this == nil") + } + if !this.Down.Equal(that1.Down) { + return fmt.Errorf("Down this(%v) Not Equal that(%v)", this.Down, that1.Down) + } + if !this.And.Equal(that1.And) { + return fmt.Errorf("And this(%v) Not Equal that(%v)", this.And, that1.And) + } + if !this.Leaf.Equal(that1.Leaf) { + return fmt.Errorf("Leaf this(%v) Not Equal that(%v)", this.Leaf, that1.Leaf) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *DeepTree) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*DeepTree) + if !ok { + that2, ok := that.(DeepTree) + 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.Down.Equal(that1.Down) { + return false + } + if !this.And.Equal(that1.And) { + return false + } + if !this.Leaf.Equal(that1.Leaf) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *ADeepBranch) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*ADeepBranch) + if !ok { + that2, ok := that.(ADeepBranch) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *ADeepBranch") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *ADeepBranch but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *ADeepBranch but is not nil && this == nil") + } + if !this.Down.Equal(&that1.Down) { + return fmt.Errorf("Down this(%v) Not Equal that(%v)", this.Down, that1.Down) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *ADeepBranch) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*ADeepBranch) + if !ok { + that2, ok := that.(ADeepBranch) + 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.Down.Equal(&that1.Down) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *AndDeepBranch) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*AndDeepBranch) + if !ok { + that2, ok := that.(AndDeepBranch) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *AndDeepBranch") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *AndDeepBranch but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *AndDeepBranch but is not nil && this == nil") + } + if !this.Left.Equal(&that1.Left) { + return fmt.Errorf("Left this(%v) Not Equal that(%v)", this.Left, that1.Left) + } + if !this.Right.Equal(&that1.Right) { + return fmt.Errorf("Right this(%v) Not Equal that(%v)", this.Right, that1.Right) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *AndDeepBranch) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*AndDeepBranch) + if !ok { + that2, ok := that.(AndDeepBranch) + 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.Left.Equal(&that1.Left) { + return false + } + if !this.Right.Equal(&that1.Right) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *DeepLeaf) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*DeepLeaf) + if !ok { + that2, ok := that.(DeepLeaf) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *DeepLeaf") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *DeepLeaf but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *DeepLeaf but is not nil && this == nil") + } + if !this.Tree.Equal(&that1.Tree) { + return fmt.Errorf("Tree this(%v) Not Equal that(%v)", this.Tree, that1.Tree) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *DeepLeaf) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*DeepLeaf) + if !ok { + that2, ok := that.(DeepLeaf) + 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.Tree.Equal(&that1.Tree) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *Nil) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*Nil) + if !ok { + that2, ok := that.(Nil) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *Nil") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *Nil but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *Nil but is not nil && this == nil") + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *Nil) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*Nil) + if !ok { + that2, ok := that.(Nil) + 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.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NidOptEnum) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NidOptEnum) + if !ok { + that2, ok := that.(NidOptEnum) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NidOptEnum") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NidOptEnum but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NidOptEnum but is not nil && this == nil") + } + if this.Field1 != that1.Field1 { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NidOptEnum) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*NidOptEnum) + if !ok { + that2, ok := that.(NidOptEnum) + 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.Field1 != that1.Field1 { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NinOptEnum) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NinOptEnum) + if !ok { + that2, ok := that.(NinOptEnum) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NinOptEnum") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NinOptEnum but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NinOptEnum but is not nil && this == nil") + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) + } + } else if this.Field1 != nil { + return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") + } else if that1.Field1 != nil { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", *this.Field2, *that1.Field2) + } + } else if this.Field2 != nil { + return fmt.Errorf("this.Field2 == nil && that.Field2 != nil") + } else if that1.Field2 != nil { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) + } + if this.Field3 != nil && that1.Field3 != nil { + if *this.Field3 != *that1.Field3 { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", *this.Field3, *that1.Field3) + } + } else if this.Field3 != nil { + return fmt.Errorf("this.Field3 == nil && that.Field3 != nil") + } else if that1.Field3 != nil { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", this.Field3, that1.Field3) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NinOptEnum) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*NinOptEnum) + if !ok { + that2, ok := that.(NinOptEnum) + 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.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return false + } + } else if this.Field1 != nil { + return false + } else if that1.Field1 != nil { + return false + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + return false + } + } else if this.Field2 != nil { + return false + } else if that1.Field2 != nil { + return false + } + if this.Field3 != nil && that1.Field3 != nil { + if *this.Field3 != *that1.Field3 { + return false + } + } else if this.Field3 != nil { + return false + } else if that1.Field3 != nil { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NidRepEnum) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NidRepEnum) + if !ok { + that2, ok := that.(NidRepEnum) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NidRepEnum") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NidRepEnum but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NidRepEnum but is not nil && this == nil") + } + if len(this.Field1) != len(that1.Field1) { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", len(this.Field1), len(that1.Field1)) + } + for i := range this.Field1 { + if this.Field1[i] != that1.Field1[i] { + return fmt.Errorf("Field1 this[%v](%v) Not Equal that[%v](%v)", i, this.Field1[i], i, that1.Field1[i]) + } + } + if len(this.Field2) != len(that1.Field2) { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", len(this.Field2), len(that1.Field2)) + } + for i := range this.Field2 { + if this.Field2[i] != that1.Field2[i] { + return fmt.Errorf("Field2 this[%v](%v) Not Equal that[%v](%v)", i, this.Field2[i], i, that1.Field2[i]) + } + } + if len(this.Field3) != len(that1.Field3) { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", len(this.Field3), len(that1.Field3)) + } + for i := range this.Field3 { + if this.Field3[i] != that1.Field3[i] { + return fmt.Errorf("Field3 this[%v](%v) Not Equal that[%v](%v)", i, this.Field3[i], i, that1.Field3[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NidRepEnum) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*NidRepEnum) + if !ok { + that2, ok := that.(NidRepEnum) + 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.Field1) != len(that1.Field1) { + return false + } + for i := range this.Field1 { + if this.Field1[i] != that1.Field1[i] { + return false + } + } + if len(this.Field2) != len(that1.Field2) { + return false + } + for i := range this.Field2 { + if this.Field2[i] != that1.Field2[i] { + return false + } + } + if len(this.Field3) != len(that1.Field3) { + return false + } + for i := range this.Field3 { + if this.Field3[i] != that1.Field3[i] { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NinRepEnum) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NinRepEnum) + if !ok { + that2, ok := that.(NinRepEnum) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NinRepEnum") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NinRepEnum but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NinRepEnum but is not nil && this == nil") + } + if len(this.Field1) != len(that1.Field1) { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", len(this.Field1), len(that1.Field1)) + } + for i := range this.Field1 { + if this.Field1[i] != that1.Field1[i] { + return fmt.Errorf("Field1 this[%v](%v) Not Equal that[%v](%v)", i, this.Field1[i], i, that1.Field1[i]) + } + } + if len(this.Field2) != len(that1.Field2) { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", len(this.Field2), len(that1.Field2)) + } + for i := range this.Field2 { + if this.Field2[i] != that1.Field2[i] { + return fmt.Errorf("Field2 this[%v](%v) Not Equal that[%v](%v)", i, this.Field2[i], i, that1.Field2[i]) + } + } + if len(this.Field3) != len(that1.Field3) { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", len(this.Field3), len(that1.Field3)) + } + for i := range this.Field3 { + if this.Field3[i] != that1.Field3[i] { + return fmt.Errorf("Field3 this[%v](%v) Not Equal that[%v](%v)", i, this.Field3[i], i, that1.Field3[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NinRepEnum) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*NinRepEnum) + if !ok { + that2, ok := that.(NinRepEnum) + 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.Field1) != len(that1.Field1) { + return false + } + for i := range this.Field1 { + if this.Field1[i] != that1.Field1[i] { + return false + } + } + if len(this.Field2) != len(that1.Field2) { + return false + } + for i := range this.Field2 { + if this.Field2[i] != that1.Field2[i] { + return false + } + } + if len(this.Field3) != len(that1.Field3) { + return false + } + for i := range this.Field3 { + if this.Field3[i] != that1.Field3[i] { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NinOptEnumDefault) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NinOptEnumDefault) + if !ok { + that2, ok := that.(NinOptEnumDefault) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NinOptEnumDefault") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NinOptEnumDefault but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NinOptEnumDefault but is not nil && this == nil") + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) + } + } else if this.Field1 != nil { + return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") + } else if that1.Field1 != nil { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", *this.Field2, *that1.Field2) + } + } else if this.Field2 != nil { + return fmt.Errorf("this.Field2 == nil && that.Field2 != nil") + } else if that1.Field2 != nil { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) + } + if this.Field3 != nil && that1.Field3 != nil { + if *this.Field3 != *that1.Field3 { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", *this.Field3, *that1.Field3) + } + } else if this.Field3 != nil { + return fmt.Errorf("this.Field3 == nil && that.Field3 != nil") + } else if that1.Field3 != nil { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", this.Field3, that1.Field3) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NinOptEnumDefault) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*NinOptEnumDefault) + if !ok { + that2, ok := that.(NinOptEnumDefault) + 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.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return false + } + } else if this.Field1 != nil { + return false + } else if that1.Field1 != nil { + return false + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + return false + } + } else if this.Field2 != nil { + return false + } else if that1.Field2 != nil { + return false + } + if this.Field3 != nil && that1.Field3 != nil { + if *this.Field3 != *that1.Field3 { + return false + } + } else if this.Field3 != nil { + return false + } else if that1.Field3 != nil { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *AnotherNinOptEnum) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*AnotherNinOptEnum) + if !ok { + that2, ok := that.(AnotherNinOptEnum) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *AnotherNinOptEnum") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *AnotherNinOptEnum but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *AnotherNinOptEnum but is not nil && this == nil") + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) + } + } else if this.Field1 != nil { + return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") + } else if that1.Field1 != nil { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", *this.Field2, *that1.Field2) + } + } else if this.Field2 != nil { + return fmt.Errorf("this.Field2 == nil && that.Field2 != nil") + } else if that1.Field2 != nil { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) + } + if this.Field3 != nil && that1.Field3 != nil { + if *this.Field3 != *that1.Field3 { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", *this.Field3, *that1.Field3) + } + } else if this.Field3 != nil { + return fmt.Errorf("this.Field3 == nil && that.Field3 != nil") + } else if that1.Field3 != nil { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", this.Field3, that1.Field3) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *AnotherNinOptEnum) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*AnotherNinOptEnum) + if !ok { + that2, ok := that.(AnotherNinOptEnum) + 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.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return false + } + } else if this.Field1 != nil { + return false + } else if that1.Field1 != nil { + return false + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + return false + } + } else if this.Field2 != nil { + return false + } else if that1.Field2 != nil { + return false + } + if this.Field3 != nil && that1.Field3 != nil { + if *this.Field3 != *that1.Field3 { + return false + } + } else if this.Field3 != nil { + return false + } else if that1.Field3 != nil { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *AnotherNinOptEnumDefault) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*AnotherNinOptEnumDefault) + if !ok { + that2, ok := that.(AnotherNinOptEnumDefault) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *AnotherNinOptEnumDefault") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *AnotherNinOptEnumDefault but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *AnotherNinOptEnumDefault but is not nil && this == nil") + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) + } + } else if this.Field1 != nil { + return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") + } else if that1.Field1 != nil { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", *this.Field2, *that1.Field2) + } + } else if this.Field2 != nil { + return fmt.Errorf("this.Field2 == nil && that.Field2 != nil") + } else if that1.Field2 != nil { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) + } + if this.Field3 != nil && that1.Field3 != nil { + if *this.Field3 != *that1.Field3 { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", *this.Field3, *that1.Field3) + } + } else if this.Field3 != nil { + return fmt.Errorf("this.Field3 == nil && that.Field3 != nil") + } else if that1.Field3 != nil { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", this.Field3, that1.Field3) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *AnotherNinOptEnumDefault) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*AnotherNinOptEnumDefault) + if !ok { + that2, ok := that.(AnotherNinOptEnumDefault) + 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.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return false + } + } else if this.Field1 != nil { + return false + } else if that1.Field1 != nil { + return false + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + return false + } + } else if this.Field2 != nil { + return false + } else if that1.Field2 != nil { + return false + } + if this.Field3 != nil && that1.Field3 != nil { + if *this.Field3 != *that1.Field3 { + return false + } + } else if this.Field3 != nil { + return false + } else if that1.Field3 != nil { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *Timer) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*Timer) + if !ok { + that2, ok := that.(Timer) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *Timer") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *Timer but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *Timer but is not nil && this == nil") + } + if this.Time1 != that1.Time1 { + return fmt.Errorf("Time1 this(%v) Not Equal that(%v)", this.Time1, that1.Time1) + } + if this.Time2 != that1.Time2 { + return fmt.Errorf("Time2 this(%v) Not Equal that(%v)", this.Time2, that1.Time2) + } + if !bytes.Equal(this.Data, that1.Data) { + return fmt.Errorf("Data this(%v) Not Equal that(%v)", this.Data, that1.Data) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *Timer) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*Timer) + if !ok { + that2, ok := that.(Timer) + 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.Time1 != that1.Time1 { + return false + } + if this.Time2 != that1.Time2 { + return false + } + if !bytes.Equal(this.Data, that1.Data) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *MyExtendable) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*MyExtendable) + if !ok { + that2, ok := that.(MyExtendable) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *MyExtendable") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *MyExtendable but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *MyExtendable but is not nil && this == nil") + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) + } + } else if this.Field1 != nil { + return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") + } else if that1.Field1 != nil { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) + } + for k, v := range this.XXX_extensions { + if v2, ok := that1.XXX_extensions[k]; ok { + if !v.Equal(&v2) { + return fmt.Errorf("XXX_extensions this[%v](%v) Not Equal that[%v](%v)", k, this.XXX_extensions[k], k, that1.XXX_extensions[k]) + } + } else { + return fmt.Errorf("XXX_extensions[%v] Not In that", k) + } + } + for k := range that1.XXX_extensions { + if _, ok := this.XXX_extensions[k]; !ok { + return fmt.Errorf("XXX_extensions[%v] Not In this", k) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *MyExtendable) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*MyExtendable) + if !ok { + that2, ok := that.(MyExtendable) + 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.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return false + } + } else if this.Field1 != nil { + return false + } else if that1.Field1 != nil { + return false + } + for k, v := range this.XXX_extensions { + if v2, ok := that1.XXX_extensions[k]; ok { + if !v.Equal(&v2) { + return false + } + } else { + return false + } + } + for k := range that1.XXX_extensions { + if _, ok := this.XXX_extensions[k]; !ok { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *OtherExtenable) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*OtherExtenable) + if !ok { + that2, ok := that.(OtherExtenable) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *OtherExtenable") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *OtherExtenable but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *OtherExtenable but is not nil && this == nil") + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", *this.Field2, *that1.Field2) + } + } else if this.Field2 != nil { + return fmt.Errorf("this.Field2 == nil && that.Field2 != nil") + } else if that1.Field2 != nil { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) + } + if this.Field13 != nil && that1.Field13 != nil { + if *this.Field13 != *that1.Field13 { + return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", *this.Field13, *that1.Field13) + } + } else if this.Field13 != nil { + return fmt.Errorf("this.Field13 == nil && that.Field13 != nil") + } else if that1.Field13 != nil { + return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", this.Field13, that1.Field13) + } + if !this.M.Equal(that1.M) { + return fmt.Errorf("M this(%v) Not Equal that(%v)", this.M, that1.M) + } + for k, v := range this.XXX_extensions { + if v2, ok := that1.XXX_extensions[k]; ok { + if !v.Equal(&v2) { + return fmt.Errorf("XXX_extensions this[%v](%v) Not Equal that[%v](%v)", k, this.XXX_extensions[k], k, that1.XXX_extensions[k]) + } + } else { + return fmt.Errorf("XXX_extensions[%v] Not In that", k) + } + } + for k := range that1.XXX_extensions { + if _, ok := this.XXX_extensions[k]; !ok { + return fmt.Errorf("XXX_extensions[%v] Not In this", k) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *OtherExtenable) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*OtherExtenable) + if !ok { + that2, ok := that.(OtherExtenable) + 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.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + return false + } + } else if this.Field2 != nil { + return false + } else if that1.Field2 != nil { + return false + } + if this.Field13 != nil && that1.Field13 != nil { + if *this.Field13 != *that1.Field13 { + return false + } + } else if this.Field13 != nil { + return false + } else if that1.Field13 != nil { + return false + } + if !this.M.Equal(that1.M) { + return false + } + for k, v := range this.XXX_extensions { + if v2, ok := that1.XXX_extensions[k]; ok { + if !v.Equal(&v2) { + return false + } + } else { + return false + } + } + for k := range that1.XXX_extensions { + if _, ok := this.XXX_extensions[k]; !ok { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NestedDefinition) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NestedDefinition) + if !ok { + that2, ok := that.(NestedDefinition) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NestedDefinition") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NestedDefinition but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NestedDefinition but is not nil && this == nil") + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) + } + } else if this.Field1 != nil { + return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") + } else if that1.Field1 != nil { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) + } + if this.EnumField != nil && that1.EnumField != nil { + if *this.EnumField != *that1.EnumField { + return fmt.Errorf("EnumField this(%v) Not Equal that(%v)", *this.EnumField, *that1.EnumField) + } + } else if this.EnumField != nil { + return fmt.Errorf("this.EnumField == nil && that.EnumField != nil") + } else if that1.EnumField != nil { + return fmt.Errorf("EnumField this(%v) Not Equal that(%v)", this.EnumField, that1.EnumField) + } + if !this.NNM.Equal(that1.NNM) { + return fmt.Errorf("NNM this(%v) Not Equal that(%v)", this.NNM, that1.NNM) + } + if !this.NM.Equal(that1.NM) { + return fmt.Errorf("NM this(%v) Not Equal that(%v)", this.NM, that1.NM) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NestedDefinition) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*NestedDefinition) + if !ok { + that2, ok := that.(NestedDefinition) + 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.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return false + } + } else if this.Field1 != nil { + return false + } else if that1.Field1 != nil { + return false + } + if this.EnumField != nil && that1.EnumField != nil { + if *this.EnumField != *that1.EnumField { + return false + } + } else if this.EnumField != nil { + return false + } else if that1.EnumField != nil { + return false + } + if !this.NNM.Equal(that1.NNM) { + return false + } + if !this.NM.Equal(that1.NM) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NestedDefinition_NestedMessage) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NestedDefinition_NestedMessage) + if !ok { + that2, ok := that.(NestedDefinition_NestedMessage) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NestedDefinition_NestedMessage") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NestedDefinition_NestedMessage but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NestedDefinition_NestedMessage but is not nil && this == nil") + } + if this.NestedField1 != nil && that1.NestedField1 != nil { + if *this.NestedField1 != *that1.NestedField1 { + return fmt.Errorf("NestedField1 this(%v) Not Equal that(%v)", *this.NestedField1, *that1.NestedField1) + } + } else if this.NestedField1 != nil { + return fmt.Errorf("this.NestedField1 == nil && that.NestedField1 != nil") + } else if that1.NestedField1 != nil { + return fmt.Errorf("NestedField1 this(%v) Not Equal that(%v)", this.NestedField1, that1.NestedField1) + } + if !this.NNM.Equal(that1.NNM) { + return fmt.Errorf("NNM this(%v) Not Equal that(%v)", this.NNM, that1.NNM) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NestedDefinition_NestedMessage) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*NestedDefinition_NestedMessage) + if !ok { + that2, ok := that.(NestedDefinition_NestedMessage) + 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.NestedField1 != nil && that1.NestedField1 != nil { + if *this.NestedField1 != *that1.NestedField1 { + return false + } + } else if this.NestedField1 != nil { + return false + } else if that1.NestedField1 != nil { + return false + } + if !this.NNM.Equal(that1.NNM) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NestedDefinition_NestedMessage_NestedNestedMsg) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NestedDefinition_NestedMessage_NestedNestedMsg) + if !ok { + that2, ok := that.(NestedDefinition_NestedMessage_NestedNestedMsg) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NestedDefinition_NestedMessage_NestedNestedMsg") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NestedDefinition_NestedMessage_NestedNestedMsg but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NestedDefinition_NestedMessage_NestedNestedMsg but is not nil && this == nil") + } + if this.NestedNestedField1 != nil && that1.NestedNestedField1 != nil { + if *this.NestedNestedField1 != *that1.NestedNestedField1 { + return fmt.Errorf("NestedNestedField1 this(%v) Not Equal that(%v)", *this.NestedNestedField1, *that1.NestedNestedField1) + } + } else if this.NestedNestedField1 != nil { + return fmt.Errorf("this.NestedNestedField1 == nil && that.NestedNestedField1 != nil") + } else if that1.NestedNestedField1 != nil { + return fmt.Errorf("NestedNestedField1 this(%v) Not Equal that(%v)", this.NestedNestedField1, that1.NestedNestedField1) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NestedDefinition_NestedMessage_NestedNestedMsg) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*NestedDefinition_NestedMessage_NestedNestedMsg) + if !ok { + that2, ok := that.(NestedDefinition_NestedMessage_NestedNestedMsg) + 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.NestedNestedField1 != nil && that1.NestedNestedField1 != nil { + if *this.NestedNestedField1 != *that1.NestedNestedField1 { + return false + } + } else if this.NestedNestedField1 != nil { + return false + } else if that1.NestedNestedField1 != nil { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NestedScope) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NestedScope) + if !ok { + that2, ok := that.(NestedScope) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NestedScope") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NestedScope but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NestedScope but is not nil && this == nil") + } + if !this.A.Equal(that1.A) { + return fmt.Errorf("A this(%v) Not Equal that(%v)", this.A, that1.A) + } + if this.B != nil && that1.B != nil { + if *this.B != *that1.B { + return fmt.Errorf("B this(%v) Not Equal that(%v)", *this.B, *that1.B) + } + } else if this.B != nil { + return fmt.Errorf("this.B == nil && that.B != nil") + } else if that1.B != nil { + return fmt.Errorf("B this(%v) Not Equal that(%v)", this.B, that1.B) + } + if !this.C.Equal(that1.C) { + return fmt.Errorf("C this(%v) Not Equal that(%v)", this.C, that1.C) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NestedScope) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*NestedScope) + if !ok { + that2, ok := that.(NestedScope) + 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.A.Equal(that1.A) { + return false + } + if this.B != nil && that1.B != nil { + if *this.B != *that1.B { + return false + } + } else if this.B != nil { + return false + } else if that1.B != nil { + return false + } + if !this.C.Equal(that1.C) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NinOptNativeDefault) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NinOptNativeDefault) + if !ok { + that2, ok := that.(NinOptNativeDefault) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NinOptNativeDefault") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NinOptNativeDefault but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NinOptNativeDefault but is not nil && this == nil") + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) + } + } else if this.Field1 != nil { + return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") + } else if that1.Field1 != nil { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", *this.Field2, *that1.Field2) + } + } else if this.Field2 != nil { + return fmt.Errorf("this.Field2 == nil && that.Field2 != nil") + } else if that1.Field2 != nil { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) + } + if this.Field3 != nil && that1.Field3 != nil { + if *this.Field3 != *that1.Field3 { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", *this.Field3, *that1.Field3) + } + } else if this.Field3 != nil { + return fmt.Errorf("this.Field3 == nil && that.Field3 != nil") + } else if that1.Field3 != nil { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", this.Field3, that1.Field3) + } + if this.Field4 != nil && that1.Field4 != nil { + if *this.Field4 != *that1.Field4 { + return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", *this.Field4, *that1.Field4) + } + } else if this.Field4 != nil { + return fmt.Errorf("this.Field4 == nil && that.Field4 != nil") + } else if that1.Field4 != nil { + return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", this.Field4, that1.Field4) + } + if this.Field5 != nil && that1.Field5 != nil { + if *this.Field5 != *that1.Field5 { + return fmt.Errorf("Field5 this(%v) Not Equal that(%v)", *this.Field5, *that1.Field5) + } + } else if this.Field5 != nil { + return fmt.Errorf("this.Field5 == nil && that.Field5 != nil") + } else if that1.Field5 != nil { + return fmt.Errorf("Field5 this(%v) Not Equal that(%v)", this.Field5, that1.Field5) + } + if this.Field6 != nil && that1.Field6 != nil { + if *this.Field6 != *that1.Field6 { + return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", *this.Field6, *that1.Field6) + } + } else if this.Field6 != nil { + return fmt.Errorf("this.Field6 == nil && that.Field6 != nil") + } else if that1.Field6 != nil { + return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", this.Field6, that1.Field6) + } + if this.Field7 != nil && that1.Field7 != nil { + if *this.Field7 != *that1.Field7 { + return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", *this.Field7, *that1.Field7) + } + } else if this.Field7 != nil { + return fmt.Errorf("this.Field7 == nil && that.Field7 != nil") + } else if that1.Field7 != nil { + return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", this.Field7, that1.Field7) + } + if this.Field8 != nil && that1.Field8 != nil { + if *this.Field8 != *that1.Field8 { + return fmt.Errorf("Field8 this(%v) Not Equal that(%v)", *this.Field8, *that1.Field8) + } + } else if this.Field8 != nil { + return fmt.Errorf("this.Field8 == nil && that.Field8 != nil") + } else if that1.Field8 != nil { + return fmt.Errorf("Field8 this(%v) Not Equal that(%v)", this.Field8, that1.Field8) + } + if this.Field9 != nil && that1.Field9 != nil { + if *this.Field9 != *that1.Field9 { + return fmt.Errorf("Field9 this(%v) Not Equal that(%v)", *this.Field9, *that1.Field9) + } + } else if this.Field9 != nil { + return fmt.Errorf("this.Field9 == nil && that.Field9 != nil") + } else if that1.Field9 != nil { + return fmt.Errorf("Field9 this(%v) Not Equal that(%v)", this.Field9, that1.Field9) + } + if this.Field10 != nil && that1.Field10 != nil { + if *this.Field10 != *that1.Field10 { + return fmt.Errorf("Field10 this(%v) Not Equal that(%v)", *this.Field10, *that1.Field10) + } + } else if this.Field10 != nil { + return fmt.Errorf("this.Field10 == nil && that.Field10 != nil") + } else if that1.Field10 != nil { + return fmt.Errorf("Field10 this(%v) Not Equal that(%v)", this.Field10, that1.Field10) + } + if this.Field11 != nil && that1.Field11 != nil { + if *this.Field11 != *that1.Field11 { + return fmt.Errorf("Field11 this(%v) Not Equal that(%v)", *this.Field11, *that1.Field11) + } + } else if this.Field11 != nil { + return fmt.Errorf("this.Field11 == nil && that.Field11 != nil") + } else if that1.Field11 != nil { + return fmt.Errorf("Field11 this(%v) Not Equal that(%v)", this.Field11, that1.Field11) + } + if this.Field12 != nil && that1.Field12 != nil { + if *this.Field12 != *that1.Field12 { + return fmt.Errorf("Field12 this(%v) Not Equal that(%v)", *this.Field12, *that1.Field12) + } + } else if this.Field12 != nil { + return fmt.Errorf("this.Field12 == nil && that.Field12 != nil") + } else if that1.Field12 != nil { + return fmt.Errorf("Field12 this(%v) Not Equal that(%v)", this.Field12, that1.Field12) + } + if this.Field13 != nil && that1.Field13 != nil { + if *this.Field13 != *that1.Field13 { + return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", *this.Field13, *that1.Field13) + } + } else if this.Field13 != nil { + return fmt.Errorf("this.Field13 == nil && that.Field13 != nil") + } else if that1.Field13 != nil { + return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", this.Field13, that1.Field13) + } + if this.Field14 != nil && that1.Field14 != nil { + if *this.Field14 != *that1.Field14 { + return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", *this.Field14, *that1.Field14) + } + } else if this.Field14 != nil { + return fmt.Errorf("this.Field14 == nil && that.Field14 != nil") + } else if that1.Field14 != nil { + return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", this.Field14, that1.Field14) + } + if !bytes.Equal(this.Field15, that1.Field15) { + return fmt.Errorf("Field15 this(%v) Not Equal that(%v)", this.Field15, that1.Field15) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NinOptNativeDefault) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*NinOptNativeDefault) + if !ok { + that2, ok := that.(NinOptNativeDefault) + 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.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return false + } + } else if this.Field1 != nil { + return false + } else if that1.Field1 != nil { + return false + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + return false + } + } else if this.Field2 != nil { + return false + } else if that1.Field2 != nil { + return false + } + if this.Field3 != nil && that1.Field3 != nil { + if *this.Field3 != *that1.Field3 { + return false + } + } else if this.Field3 != nil { + return false + } else if that1.Field3 != nil { + return false + } + if this.Field4 != nil && that1.Field4 != nil { + if *this.Field4 != *that1.Field4 { + return false + } + } else if this.Field4 != nil { + return false + } else if that1.Field4 != nil { + return false + } + if this.Field5 != nil && that1.Field5 != nil { + if *this.Field5 != *that1.Field5 { + return false + } + } else if this.Field5 != nil { + return false + } else if that1.Field5 != nil { + return false + } + if this.Field6 != nil && that1.Field6 != nil { + if *this.Field6 != *that1.Field6 { + return false + } + } else if this.Field6 != nil { + return false + } else if that1.Field6 != nil { + return false + } + if this.Field7 != nil && that1.Field7 != nil { + if *this.Field7 != *that1.Field7 { + return false + } + } else if this.Field7 != nil { + return false + } else if that1.Field7 != nil { + return false + } + if this.Field8 != nil && that1.Field8 != nil { + if *this.Field8 != *that1.Field8 { + return false + } + } else if this.Field8 != nil { + return false + } else if that1.Field8 != nil { + return false + } + if this.Field9 != nil && that1.Field9 != nil { + if *this.Field9 != *that1.Field9 { + return false + } + } else if this.Field9 != nil { + return false + } else if that1.Field9 != nil { + return false + } + if this.Field10 != nil && that1.Field10 != nil { + if *this.Field10 != *that1.Field10 { + return false + } + } else if this.Field10 != nil { + return false + } else if that1.Field10 != nil { + return false + } + if this.Field11 != nil && that1.Field11 != nil { + if *this.Field11 != *that1.Field11 { + return false + } + } else if this.Field11 != nil { + return false + } else if that1.Field11 != nil { + return false + } + if this.Field12 != nil && that1.Field12 != nil { + if *this.Field12 != *that1.Field12 { + return false + } + } else if this.Field12 != nil { + return false + } else if that1.Field12 != nil { + return false + } + if this.Field13 != nil && that1.Field13 != nil { + if *this.Field13 != *that1.Field13 { + return false + } + } else if this.Field13 != nil { + return false + } else if that1.Field13 != nil { + return false + } + if this.Field14 != nil && that1.Field14 != nil { + if *this.Field14 != *that1.Field14 { + return false + } + } else if this.Field14 != nil { + return false + } else if that1.Field14 != nil { + return false + } + if !bytes.Equal(this.Field15, that1.Field15) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *CustomContainer) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*CustomContainer) + if !ok { + that2, ok := that.(CustomContainer) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *CustomContainer") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *CustomContainer but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *CustomContainer but is not nil && this == nil") + } + if !this.CustomStruct.Equal(&that1.CustomStruct) { + return fmt.Errorf("CustomStruct this(%v) Not Equal that(%v)", this.CustomStruct, that1.CustomStruct) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *CustomContainer) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*CustomContainer) + if !ok { + that2, ok := that.(CustomContainer) + 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.CustomStruct.Equal(&that1.CustomStruct) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *CustomNameNidOptNative) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*CustomNameNidOptNative) + if !ok { + that2, ok := that.(CustomNameNidOptNative) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *CustomNameNidOptNative") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *CustomNameNidOptNative but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *CustomNameNidOptNative but is not nil && this == nil") + } + if this.FieldA != that1.FieldA { + return fmt.Errorf("FieldA this(%v) Not Equal that(%v)", this.FieldA, that1.FieldA) + } + if this.FieldB != that1.FieldB { + return fmt.Errorf("FieldB this(%v) Not Equal that(%v)", this.FieldB, that1.FieldB) + } + if this.FieldC != that1.FieldC { + return fmt.Errorf("FieldC this(%v) Not Equal that(%v)", this.FieldC, that1.FieldC) + } + if this.FieldD != that1.FieldD { + return fmt.Errorf("FieldD this(%v) Not Equal that(%v)", this.FieldD, that1.FieldD) + } + if this.FieldE != that1.FieldE { + return fmt.Errorf("FieldE this(%v) Not Equal that(%v)", this.FieldE, that1.FieldE) + } + if this.FieldF != that1.FieldF { + return fmt.Errorf("FieldF this(%v) Not Equal that(%v)", this.FieldF, that1.FieldF) + } + if this.FieldG != that1.FieldG { + return fmt.Errorf("FieldG this(%v) Not Equal that(%v)", this.FieldG, that1.FieldG) + } + if this.FieldH != that1.FieldH { + return fmt.Errorf("FieldH this(%v) Not Equal that(%v)", this.FieldH, that1.FieldH) + } + if this.FieldI != that1.FieldI { + return fmt.Errorf("FieldI this(%v) Not Equal that(%v)", this.FieldI, that1.FieldI) + } + if this.FieldJ != that1.FieldJ { + return fmt.Errorf("FieldJ this(%v) Not Equal that(%v)", this.FieldJ, that1.FieldJ) + } + if this.FieldK != that1.FieldK { + return fmt.Errorf("FieldK this(%v) Not Equal that(%v)", this.FieldK, that1.FieldK) + } + if this.FieldL != that1.FieldL { + return fmt.Errorf("FieldL this(%v) Not Equal that(%v)", this.FieldL, that1.FieldL) + } + if this.FieldM != that1.FieldM { + return fmt.Errorf("FieldM this(%v) Not Equal that(%v)", this.FieldM, that1.FieldM) + } + if this.FieldN != that1.FieldN { + return fmt.Errorf("FieldN this(%v) Not Equal that(%v)", this.FieldN, that1.FieldN) + } + if !bytes.Equal(this.FieldO, that1.FieldO) { + return fmt.Errorf("FieldO this(%v) Not Equal that(%v)", this.FieldO, that1.FieldO) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *CustomNameNidOptNative) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*CustomNameNidOptNative) + if !ok { + that2, ok := that.(CustomNameNidOptNative) + 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.FieldA != that1.FieldA { + return false + } + if this.FieldB != that1.FieldB { + return false + } + if this.FieldC != that1.FieldC { + return false + } + if this.FieldD != that1.FieldD { + return false + } + if this.FieldE != that1.FieldE { + return false + } + if this.FieldF != that1.FieldF { + return false + } + if this.FieldG != that1.FieldG { + return false + } + if this.FieldH != that1.FieldH { + return false + } + if this.FieldI != that1.FieldI { + return false + } + if this.FieldJ != that1.FieldJ { + return false + } + if this.FieldK != that1.FieldK { + return false + } + if this.FieldL != that1.FieldL { + return false + } + if this.FieldM != that1.FieldM { + return false + } + if this.FieldN != that1.FieldN { + return false + } + if !bytes.Equal(this.FieldO, that1.FieldO) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *CustomNameNinOptNative) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*CustomNameNinOptNative) + if !ok { + that2, ok := that.(CustomNameNinOptNative) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *CustomNameNinOptNative") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *CustomNameNinOptNative but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *CustomNameNinOptNative but is not nil && this == nil") + } + if this.FieldA != nil && that1.FieldA != nil { + if *this.FieldA != *that1.FieldA { + return fmt.Errorf("FieldA this(%v) Not Equal that(%v)", *this.FieldA, *that1.FieldA) + } + } else if this.FieldA != nil { + return fmt.Errorf("this.FieldA == nil && that.FieldA != nil") + } else if that1.FieldA != nil { + return fmt.Errorf("FieldA this(%v) Not Equal that(%v)", this.FieldA, that1.FieldA) + } + if this.FieldB != nil && that1.FieldB != nil { + if *this.FieldB != *that1.FieldB { + return fmt.Errorf("FieldB this(%v) Not Equal that(%v)", *this.FieldB, *that1.FieldB) + } + } else if this.FieldB != nil { + return fmt.Errorf("this.FieldB == nil && that.FieldB != nil") + } else if that1.FieldB != nil { + return fmt.Errorf("FieldB this(%v) Not Equal that(%v)", this.FieldB, that1.FieldB) + } + if this.FieldC != nil && that1.FieldC != nil { + if *this.FieldC != *that1.FieldC { + return fmt.Errorf("FieldC this(%v) Not Equal that(%v)", *this.FieldC, *that1.FieldC) + } + } else if this.FieldC != nil { + return fmt.Errorf("this.FieldC == nil && that.FieldC != nil") + } else if that1.FieldC != nil { + return fmt.Errorf("FieldC this(%v) Not Equal that(%v)", this.FieldC, that1.FieldC) + } + if this.FieldD != nil && that1.FieldD != nil { + if *this.FieldD != *that1.FieldD { + return fmt.Errorf("FieldD this(%v) Not Equal that(%v)", *this.FieldD, *that1.FieldD) + } + } else if this.FieldD != nil { + return fmt.Errorf("this.FieldD == nil && that.FieldD != nil") + } else if that1.FieldD != nil { + return fmt.Errorf("FieldD this(%v) Not Equal that(%v)", this.FieldD, that1.FieldD) + } + if this.FieldE != nil && that1.FieldE != nil { + if *this.FieldE != *that1.FieldE { + return fmt.Errorf("FieldE this(%v) Not Equal that(%v)", *this.FieldE, *that1.FieldE) + } + } else if this.FieldE != nil { + return fmt.Errorf("this.FieldE == nil && that.FieldE != nil") + } else if that1.FieldE != nil { + return fmt.Errorf("FieldE this(%v) Not Equal that(%v)", this.FieldE, that1.FieldE) + } + if this.FieldF != nil && that1.FieldF != nil { + if *this.FieldF != *that1.FieldF { + return fmt.Errorf("FieldF this(%v) Not Equal that(%v)", *this.FieldF, *that1.FieldF) + } + } else if this.FieldF != nil { + return fmt.Errorf("this.FieldF == nil && that.FieldF != nil") + } else if that1.FieldF != nil { + return fmt.Errorf("FieldF this(%v) Not Equal that(%v)", this.FieldF, that1.FieldF) + } + if this.FieldG != nil && that1.FieldG != nil { + if *this.FieldG != *that1.FieldG { + return fmt.Errorf("FieldG this(%v) Not Equal that(%v)", *this.FieldG, *that1.FieldG) + } + } else if this.FieldG != nil { + return fmt.Errorf("this.FieldG == nil && that.FieldG != nil") + } else if that1.FieldG != nil { + return fmt.Errorf("FieldG this(%v) Not Equal that(%v)", this.FieldG, that1.FieldG) + } + if this.FieldH != nil && that1.FieldH != nil { + if *this.FieldH != *that1.FieldH { + return fmt.Errorf("FieldH this(%v) Not Equal that(%v)", *this.FieldH, *that1.FieldH) + } + } else if this.FieldH != nil { + return fmt.Errorf("this.FieldH == nil && that.FieldH != nil") + } else if that1.FieldH != nil { + return fmt.Errorf("FieldH this(%v) Not Equal that(%v)", this.FieldH, that1.FieldH) + } + if this.FieldI != nil && that1.FieldI != nil { + if *this.FieldI != *that1.FieldI { + return fmt.Errorf("FieldI this(%v) Not Equal that(%v)", *this.FieldI, *that1.FieldI) + } + } else if this.FieldI != nil { + return fmt.Errorf("this.FieldI == nil && that.FieldI != nil") + } else if that1.FieldI != nil { + return fmt.Errorf("FieldI this(%v) Not Equal that(%v)", this.FieldI, that1.FieldI) + } + if this.FieldJ != nil && that1.FieldJ != nil { + if *this.FieldJ != *that1.FieldJ { + return fmt.Errorf("FieldJ this(%v) Not Equal that(%v)", *this.FieldJ, *that1.FieldJ) + } + } else if this.FieldJ != nil { + return fmt.Errorf("this.FieldJ == nil && that.FieldJ != nil") + } else if that1.FieldJ != nil { + return fmt.Errorf("FieldJ this(%v) Not Equal that(%v)", this.FieldJ, that1.FieldJ) + } + if this.FieldK != nil && that1.FieldK != nil { + if *this.FieldK != *that1.FieldK { + return fmt.Errorf("FieldK this(%v) Not Equal that(%v)", *this.FieldK, *that1.FieldK) + } + } else if this.FieldK != nil { + return fmt.Errorf("this.FieldK == nil && that.FieldK != nil") + } else if that1.FieldK != nil { + return fmt.Errorf("FieldK this(%v) Not Equal that(%v)", this.FieldK, that1.FieldK) + } + if this.FielL != nil && that1.FielL != nil { + if *this.FielL != *that1.FielL { + return fmt.Errorf("FielL this(%v) Not Equal that(%v)", *this.FielL, *that1.FielL) + } + } else if this.FielL != nil { + return fmt.Errorf("this.FielL == nil && that.FielL != nil") + } else if that1.FielL != nil { + return fmt.Errorf("FielL this(%v) Not Equal that(%v)", this.FielL, that1.FielL) + } + if this.FieldM != nil && that1.FieldM != nil { + if *this.FieldM != *that1.FieldM { + return fmt.Errorf("FieldM this(%v) Not Equal that(%v)", *this.FieldM, *that1.FieldM) + } + } else if this.FieldM != nil { + return fmt.Errorf("this.FieldM == nil && that.FieldM != nil") + } else if that1.FieldM != nil { + return fmt.Errorf("FieldM this(%v) Not Equal that(%v)", this.FieldM, that1.FieldM) + } + if this.FieldN != nil && that1.FieldN != nil { + if *this.FieldN != *that1.FieldN { + return fmt.Errorf("FieldN this(%v) Not Equal that(%v)", *this.FieldN, *that1.FieldN) + } + } else if this.FieldN != nil { + return fmt.Errorf("this.FieldN == nil && that.FieldN != nil") + } else if that1.FieldN != nil { + return fmt.Errorf("FieldN this(%v) Not Equal that(%v)", this.FieldN, that1.FieldN) + } + if !bytes.Equal(this.FieldO, that1.FieldO) { + return fmt.Errorf("FieldO this(%v) Not Equal that(%v)", this.FieldO, that1.FieldO) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *CustomNameNinOptNative) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*CustomNameNinOptNative) + if !ok { + that2, ok := that.(CustomNameNinOptNative) + 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.FieldA != nil && that1.FieldA != nil { + if *this.FieldA != *that1.FieldA { + return false + } + } else if this.FieldA != nil { + return false + } else if that1.FieldA != nil { + return false + } + if this.FieldB != nil && that1.FieldB != nil { + if *this.FieldB != *that1.FieldB { + return false + } + } else if this.FieldB != nil { + return false + } else if that1.FieldB != nil { + return false + } + if this.FieldC != nil && that1.FieldC != nil { + if *this.FieldC != *that1.FieldC { + return false + } + } else if this.FieldC != nil { + return false + } else if that1.FieldC != nil { + return false + } + if this.FieldD != nil && that1.FieldD != nil { + if *this.FieldD != *that1.FieldD { + return false + } + } else if this.FieldD != nil { + return false + } else if that1.FieldD != nil { + return false + } + if this.FieldE != nil && that1.FieldE != nil { + if *this.FieldE != *that1.FieldE { + return false + } + } else if this.FieldE != nil { + return false + } else if that1.FieldE != nil { + return false + } + if this.FieldF != nil && that1.FieldF != nil { + if *this.FieldF != *that1.FieldF { + return false + } + } else if this.FieldF != nil { + return false + } else if that1.FieldF != nil { + return false + } + if this.FieldG != nil && that1.FieldG != nil { + if *this.FieldG != *that1.FieldG { + return false + } + } else if this.FieldG != nil { + return false + } else if that1.FieldG != nil { + return false + } + if this.FieldH != nil && that1.FieldH != nil { + if *this.FieldH != *that1.FieldH { + return false + } + } else if this.FieldH != nil { + return false + } else if that1.FieldH != nil { + return false + } + if this.FieldI != nil && that1.FieldI != nil { + if *this.FieldI != *that1.FieldI { + return false + } + } else if this.FieldI != nil { + return false + } else if that1.FieldI != nil { + return false + } + if this.FieldJ != nil && that1.FieldJ != nil { + if *this.FieldJ != *that1.FieldJ { + return false + } + } else if this.FieldJ != nil { + return false + } else if that1.FieldJ != nil { + return false + } + if this.FieldK != nil && that1.FieldK != nil { + if *this.FieldK != *that1.FieldK { + return false + } + } else if this.FieldK != nil { + return false + } else if that1.FieldK != nil { + return false + } + if this.FielL != nil && that1.FielL != nil { + if *this.FielL != *that1.FielL { + return false + } + } else if this.FielL != nil { + return false + } else if that1.FielL != nil { + return false + } + if this.FieldM != nil && that1.FieldM != nil { + if *this.FieldM != *that1.FieldM { + return false + } + } else if this.FieldM != nil { + return false + } else if that1.FieldM != nil { + return false + } + if this.FieldN != nil && that1.FieldN != nil { + if *this.FieldN != *that1.FieldN { + return false + } + } else if this.FieldN != nil { + return false + } else if that1.FieldN != nil { + return false + } + if !bytes.Equal(this.FieldO, that1.FieldO) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *CustomNameNinRepNative) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*CustomNameNinRepNative) + if !ok { + that2, ok := that.(CustomNameNinRepNative) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *CustomNameNinRepNative") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *CustomNameNinRepNative but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *CustomNameNinRepNative but is not nil && this == nil") + } + if len(this.FieldA) != len(that1.FieldA) { + return fmt.Errorf("FieldA this(%v) Not Equal that(%v)", len(this.FieldA), len(that1.FieldA)) + } + for i := range this.FieldA { + if this.FieldA[i] != that1.FieldA[i] { + return fmt.Errorf("FieldA this[%v](%v) Not Equal that[%v](%v)", i, this.FieldA[i], i, that1.FieldA[i]) + } + } + if len(this.FieldB) != len(that1.FieldB) { + return fmt.Errorf("FieldB this(%v) Not Equal that(%v)", len(this.FieldB), len(that1.FieldB)) + } + for i := range this.FieldB { + if this.FieldB[i] != that1.FieldB[i] { + return fmt.Errorf("FieldB this[%v](%v) Not Equal that[%v](%v)", i, this.FieldB[i], i, that1.FieldB[i]) + } + } + if len(this.FieldC) != len(that1.FieldC) { + return fmt.Errorf("FieldC this(%v) Not Equal that(%v)", len(this.FieldC), len(that1.FieldC)) + } + for i := range this.FieldC { + if this.FieldC[i] != that1.FieldC[i] { + return fmt.Errorf("FieldC this[%v](%v) Not Equal that[%v](%v)", i, this.FieldC[i], i, that1.FieldC[i]) + } + } + if len(this.FieldD) != len(that1.FieldD) { + return fmt.Errorf("FieldD this(%v) Not Equal that(%v)", len(this.FieldD), len(that1.FieldD)) + } + for i := range this.FieldD { + if this.FieldD[i] != that1.FieldD[i] { + return fmt.Errorf("FieldD this[%v](%v) Not Equal that[%v](%v)", i, this.FieldD[i], i, that1.FieldD[i]) + } + } + if len(this.FieldE) != len(that1.FieldE) { + return fmt.Errorf("FieldE this(%v) Not Equal that(%v)", len(this.FieldE), len(that1.FieldE)) + } + for i := range this.FieldE { + if this.FieldE[i] != that1.FieldE[i] { + return fmt.Errorf("FieldE this[%v](%v) Not Equal that[%v](%v)", i, this.FieldE[i], i, that1.FieldE[i]) + } + } + if len(this.FieldF) != len(that1.FieldF) { + return fmt.Errorf("FieldF this(%v) Not Equal that(%v)", len(this.FieldF), len(that1.FieldF)) + } + for i := range this.FieldF { + if this.FieldF[i] != that1.FieldF[i] { + return fmt.Errorf("FieldF this[%v](%v) Not Equal that[%v](%v)", i, this.FieldF[i], i, that1.FieldF[i]) + } + } + if len(this.FieldG) != len(that1.FieldG) { + return fmt.Errorf("FieldG this(%v) Not Equal that(%v)", len(this.FieldG), len(that1.FieldG)) + } + for i := range this.FieldG { + if this.FieldG[i] != that1.FieldG[i] { + return fmt.Errorf("FieldG this[%v](%v) Not Equal that[%v](%v)", i, this.FieldG[i], i, that1.FieldG[i]) + } + } + if len(this.FieldH) != len(that1.FieldH) { + return fmt.Errorf("FieldH this(%v) Not Equal that(%v)", len(this.FieldH), len(that1.FieldH)) + } + for i := range this.FieldH { + if this.FieldH[i] != that1.FieldH[i] { + return fmt.Errorf("FieldH this[%v](%v) Not Equal that[%v](%v)", i, this.FieldH[i], i, that1.FieldH[i]) + } + } + if len(this.FieldI) != len(that1.FieldI) { + return fmt.Errorf("FieldI this(%v) Not Equal that(%v)", len(this.FieldI), len(that1.FieldI)) + } + for i := range this.FieldI { + if this.FieldI[i] != that1.FieldI[i] { + return fmt.Errorf("FieldI this[%v](%v) Not Equal that[%v](%v)", i, this.FieldI[i], i, that1.FieldI[i]) + } + } + if len(this.FieldJ) != len(that1.FieldJ) { + return fmt.Errorf("FieldJ this(%v) Not Equal that(%v)", len(this.FieldJ), len(that1.FieldJ)) + } + for i := range this.FieldJ { + if this.FieldJ[i] != that1.FieldJ[i] { + return fmt.Errorf("FieldJ this[%v](%v) Not Equal that[%v](%v)", i, this.FieldJ[i], i, that1.FieldJ[i]) + } + } + if len(this.FieldK) != len(that1.FieldK) { + return fmt.Errorf("FieldK this(%v) Not Equal that(%v)", len(this.FieldK), len(that1.FieldK)) + } + for i := range this.FieldK { + if this.FieldK[i] != that1.FieldK[i] { + return fmt.Errorf("FieldK this[%v](%v) Not Equal that[%v](%v)", i, this.FieldK[i], i, that1.FieldK[i]) + } + } + if len(this.FieldL) != len(that1.FieldL) { + return fmt.Errorf("FieldL this(%v) Not Equal that(%v)", len(this.FieldL), len(that1.FieldL)) + } + for i := range this.FieldL { + if this.FieldL[i] != that1.FieldL[i] { + return fmt.Errorf("FieldL this[%v](%v) Not Equal that[%v](%v)", i, this.FieldL[i], i, that1.FieldL[i]) + } + } + if len(this.FieldM) != len(that1.FieldM) { + return fmt.Errorf("FieldM this(%v) Not Equal that(%v)", len(this.FieldM), len(that1.FieldM)) + } + for i := range this.FieldM { + if this.FieldM[i] != that1.FieldM[i] { + return fmt.Errorf("FieldM this[%v](%v) Not Equal that[%v](%v)", i, this.FieldM[i], i, that1.FieldM[i]) + } + } + if len(this.FieldN) != len(that1.FieldN) { + return fmt.Errorf("FieldN this(%v) Not Equal that(%v)", len(this.FieldN), len(that1.FieldN)) + } + for i := range this.FieldN { + if this.FieldN[i] != that1.FieldN[i] { + return fmt.Errorf("FieldN this[%v](%v) Not Equal that[%v](%v)", i, this.FieldN[i], i, that1.FieldN[i]) + } + } + if len(this.FieldO) != len(that1.FieldO) { + return fmt.Errorf("FieldO this(%v) Not Equal that(%v)", len(this.FieldO), len(that1.FieldO)) + } + for i := range this.FieldO { + if !bytes.Equal(this.FieldO[i], that1.FieldO[i]) { + return fmt.Errorf("FieldO this[%v](%v) Not Equal that[%v](%v)", i, this.FieldO[i], i, that1.FieldO[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *CustomNameNinRepNative) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*CustomNameNinRepNative) + if !ok { + that2, ok := that.(CustomNameNinRepNative) + 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.FieldA) != len(that1.FieldA) { + return false + } + for i := range this.FieldA { + if this.FieldA[i] != that1.FieldA[i] { + return false + } + } + if len(this.FieldB) != len(that1.FieldB) { + return false + } + for i := range this.FieldB { + if this.FieldB[i] != that1.FieldB[i] { + return false + } + } + if len(this.FieldC) != len(that1.FieldC) { + return false + } + for i := range this.FieldC { + if this.FieldC[i] != that1.FieldC[i] { + return false + } + } + if len(this.FieldD) != len(that1.FieldD) { + return false + } + for i := range this.FieldD { + if this.FieldD[i] != that1.FieldD[i] { + return false + } + } + if len(this.FieldE) != len(that1.FieldE) { + return false + } + for i := range this.FieldE { + if this.FieldE[i] != that1.FieldE[i] { + return false + } + } + if len(this.FieldF) != len(that1.FieldF) { + return false + } + for i := range this.FieldF { + if this.FieldF[i] != that1.FieldF[i] { + return false + } + } + if len(this.FieldG) != len(that1.FieldG) { + return false + } + for i := range this.FieldG { + if this.FieldG[i] != that1.FieldG[i] { + return false + } + } + if len(this.FieldH) != len(that1.FieldH) { + return false + } + for i := range this.FieldH { + if this.FieldH[i] != that1.FieldH[i] { + return false + } + } + if len(this.FieldI) != len(that1.FieldI) { + return false + } + for i := range this.FieldI { + if this.FieldI[i] != that1.FieldI[i] { + return false + } + } + if len(this.FieldJ) != len(that1.FieldJ) { + return false + } + for i := range this.FieldJ { + if this.FieldJ[i] != that1.FieldJ[i] { + return false + } + } + if len(this.FieldK) != len(that1.FieldK) { + return false + } + for i := range this.FieldK { + if this.FieldK[i] != that1.FieldK[i] { + return false + } + } + if len(this.FieldL) != len(that1.FieldL) { + return false + } + for i := range this.FieldL { + if this.FieldL[i] != that1.FieldL[i] { + return false + } + } + if len(this.FieldM) != len(that1.FieldM) { + return false + } + for i := range this.FieldM { + if this.FieldM[i] != that1.FieldM[i] { + return false + } + } + if len(this.FieldN) != len(that1.FieldN) { + return false + } + for i := range this.FieldN { + if this.FieldN[i] != that1.FieldN[i] { + return false + } + } + if len(this.FieldO) != len(that1.FieldO) { + return false + } + for i := range this.FieldO { + if !bytes.Equal(this.FieldO[i], that1.FieldO[i]) { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *CustomNameNinStruct) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*CustomNameNinStruct) + if !ok { + that2, ok := that.(CustomNameNinStruct) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *CustomNameNinStruct") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *CustomNameNinStruct but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *CustomNameNinStruct but is not nil && this == nil") + } + if this.FieldA != nil && that1.FieldA != nil { + if *this.FieldA != *that1.FieldA { + return fmt.Errorf("FieldA this(%v) Not Equal that(%v)", *this.FieldA, *that1.FieldA) + } + } else if this.FieldA != nil { + return fmt.Errorf("this.FieldA == nil && that.FieldA != nil") + } else if that1.FieldA != nil { + return fmt.Errorf("FieldA this(%v) Not Equal that(%v)", this.FieldA, that1.FieldA) + } + if this.FieldB != nil && that1.FieldB != nil { + if *this.FieldB != *that1.FieldB { + return fmt.Errorf("FieldB this(%v) Not Equal that(%v)", *this.FieldB, *that1.FieldB) + } + } else if this.FieldB != nil { + return fmt.Errorf("this.FieldB == nil && that.FieldB != nil") + } else if that1.FieldB != nil { + return fmt.Errorf("FieldB this(%v) Not Equal that(%v)", this.FieldB, that1.FieldB) + } + if !this.FieldC.Equal(that1.FieldC) { + return fmt.Errorf("FieldC this(%v) Not Equal that(%v)", this.FieldC, that1.FieldC) + } + if len(this.FieldD) != len(that1.FieldD) { + return fmt.Errorf("FieldD this(%v) Not Equal that(%v)", len(this.FieldD), len(that1.FieldD)) + } + for i := range this.FieldD { + if !this.FieldD[i].Equal(that1.FieldD[i]) { + return fmt.Errorf("FieldD this[%v](%v) Not Equal that[%v](%v)", i, this.FieldD[i], i, that1.FieldD[i]) + } + } + if this.FieldE != nil && that1.FieldE != nil { + if *this.FieldE != *that1.FieldE { + return fmt.Errorf("FieldE this(%v) Not Equal that(%v)", *this.FieldE, *that1.FieldE) + } + } else if this.FieldE != nil { + return fmt.Errorf("this.FieldE == nil && that.FieldE != nil") + } else if that1.FieldE != nil { + return fmt.Errorf("FieldE this(%v) Not Equal that(%v)", this.FieldE, that1.FieldE) + } + if this.FieldF != nil && that1.FieldF != nil { + if *this.FieldF != *that1.FieldF { + return fmt.Errorf("FieldF this(%v) Not Equal that(%v)", *this.FieldF, *that1.FieldF) + } + } else if this.FieldF != nil { + return fmt.Errorf("this.FieldF == nil && that.FieldF != nil") + } else if that1.FieldF != nil { + return fmt.Errorf("FieldF this(%v) Not Equal that(%v)", this.FieldF, that1.FieldF) + } + if !this.FieldG.Equal(that1.FieldG) { + return fmt.Errorf("FieldG this(%v) Not Equal that(%v)", this.FieldG, that1.FieldG) + } + if this.FieldH != nil && that1.FieldH != nil { + if *this.FieldH != *that1.FieldH { + return fmt.Errorf("FieldH this(%v) Not Equal that(%v)", *this.FieldH, *that1.FieldH) + } + } else if this.FieldH != nil { + return fmt.Errorf("this.FieldH == nil && that.FieldH != nil") + } else if that1.FieldH != nil { + return fmt.Errorf("FieldH this(%v) Not Equal that(%v)", this.FieldH, that1.FieldH) + } + if this.FieldI != nil && that1.FieldI != nil { + if *this.FieldI != *that1.FieldI { + return fmt.Errorf("FieldI this(%v) Not Equal that(%v)", *this.FieldI, *that1.FieldI) + } + } else if this.FieldI != nil { + return fmt.Errorf("this.FieldI == nil && that.FieldI != nil") + } else if that1.FieldI != nil { + return fmt.Errorf("FieldI this(%v) Not Equal that(%v)", this.FieldI, that1.FieldI) + } + if !bytes.Equal(this.FieldJ, that1.FieldJ) { + return fmt.Errorf("FieldJ this(%v) Not Equal that(%v)", this.FieldJ, that1.FieldJ) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *CustomNameNinStruct) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*CustomNameNinStruct) + if !ok { + that2, ok := that.(CustomNameNinStruct) + 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.FieldA != nil && that1.FieldA != nil { + if *this.FieldA != *that1.FieldA { + return false + } + } else if this.FieldA != nil { + return false + } else if that1.FieldA != nil { + return false + } + if this.FieldB != nil && that1.FieldB != nil { + if *this.FieldB != *that1.FieldB { + return false + } + } else if this.FieldB != nil { + return false + } else if that1.FieldB != nil { + return false + } + if !this.FieldC.Equal(that1.FieldC) { + return false + } + if len(this.FieldD) != len(that1.FieldD) { + return false + } + for i := range this.FieldD { + if !this.FieldD[i].Equal(that1.FieldD[i]) { + return false + } + } + if this.FieldE != nil && that1.FieldE != nil { + if *this.FieldE != *that1.FieldE { + return false + } + } else if this.FieldE != nil { + return false + } else if that1.FieldE != nil { + return false + } + if this.FieldF != nil && that1.FieldF != nil { + if *this.FieldF != *that1.FieldF { + return false + } + } else if this.FieldF != nil { + return false + } else if that1.FieldF != nil { + return false + } + if !this.FieldG.Equal(that1.FieldG) { + return false + } + if this.FieldH != nil && that1.FieldH != nil { + if *this.FieldH != *that1.FieldH { + return false + } + } else if this.FieldH != nil { + return false + } else if that1.FieldH != nil { + return false + } + if this.FieldI != nil && that1.FieldI != nil { + if *this.FieldI != *that1.FieldI { + return false + } + } else if this.FieldI != nil { + return false + } else if that1.FieldI != nil { + return false + } + if !bytes.Equal(this.FieldJ, that1.FieldJ) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *CustomNameCustomType) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*CustomNameCustomType) + if !ok { + that2, ok := that.(CustomNameCustomType) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *CustomNameCustomType") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *CustomNameCustomType but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *CustomNameCustomType but is not nil && this == nil") + } + if that1.FieldA == nil { + if this.FieldA != nil { + return fmt.Errorf("this.FieldA != nil && that1.FieldA == nil") + } + } else if !this.FieldA.Equal(*that1.FieldA) { + return fmt.Errorf("FieldA this(%v) Not Equal that(%v)", this.FieldA, that1.FieldA) + } + if that1.FieldB == nil { + if this.FieldB != nil { + return fmt.Errorf("this.FieldB != nil && that1.FieldB == nil") + } + } else if !this.FieldB.Equal(*that1.FieldB) { + return fmt.Errorf("FieldB this(%v) Not Equal that(%v)", this.FieldB, that1.FieldB) + } + if len(this.FieldC) != len(that1.FieldC) { + return fmt.Errorf("FieldC this(%v) Not Equal that(%v)", len(this.FieldC), len(that1.FieldC)) + } + for i := range this.FieldC { + if !this.FieldC[i].Equal(that1.FieldC[i]) { + return fmt.Errorf("FieldC this[%v](%v) Not Equal that[%v](%v)", i, this.FieldC[i], i, that1.FieldC[i]) + } + } + if len(this.FieldD) != len(that1.FieldD) { + return fmt.Errorf("FieldD this(%v) Not Equal that(%v)", len(this.FieldD), len(that1.FieldD)) + } + for i := range this.FieldD { + if !this.FieldD[i].Equal(that1.FieldD[i]) { + return fmt.Errorf("FieldD this[%v](%v) Not Equal that[%v](%v)", i, this.FieldD[i], i, that1.FieldD[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *CustomNameCustomType) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*CustomNameCustomType) + if !ok { + that2, ok := that.(CustomNameCustomType) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + if this == nil { + return true + } + return false + } else if this == nil { + return false + } + if that1.FieldA == nil { + if this.FieldA != nil { + return false + } + } else if !this.FieldA.Equal(*that1.FieldA) { + return false + } + if that1.FieldB == nil { + if this.FieldB != nil { + return false + } + } else if !this.FieldB.Equal(*that1.FieldB) { + return false + } + if len(this.FieldC) != len(that1.FieldC) { + return false + } + for i := range this.FieldC { + if !this.FieldC[i].Equal(that1.FieldC[i]) { + return false + } + } + if len(this.FieldD) != len(that1.FieldD) { + return false + } + for i := range this.FieldD { + if !this.FieldD[i].Equal(that1.FieldD[i]) { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *CustomNameNinEmbeddedStructUnion) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*CustomNameNinEmbeddedStructUnion) + if !ok { + that2, ok := that.(CustomNameNinEmbeddedStructUnion) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *CustomNameNinEmbeddedStructUnion") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *CustomNameNinEmbeddedStructUnion but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *CustomNameNinEmbeddedStructUnion but is not nil && this == nil") + } + if !this.NidOptNative.Equal(that1.NidOptNative) { + return fmt.Errorf("NidOptNative this(%v) Not Equal that(%v)", this.NidOptNative, that1.NidOptNative) + } + if !this.FieldA.Equal(that1.FieldA) { + return fmt.Errorf("FieldA this(%v) Not Equal that(%v)", this.FieldA, that1.FieldA) + } + if this.FieldB != nil && that1.FieldB != nil { + if *this.FieldB != *that1.FieldB { + return fmt.Errorf("FieldB this(%v) Not Equal that(%v)", *this.FieldB, *that1.FieldB) + } + } else if this.FieldB != nil { + return fmt.Errorf("this.FieldB == nil && that.FieldB != nil") + } else if that1.FieldB != nil { + return fmt.Errorf("FieldB this(%v) Not Equal that(%v)", this.FieldB, that1.FieldB) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *CustomNameNinEmbeddedStructUnion) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*CustomNameNinEmbeddedStructUnion) + if !ok { + that2, ok := that.(CustomNameNinEmbeddedStructUnion) + 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.NidOptNative.Equal(that1.NidOptNative) { + return false + } + if !this.FieldA.Equal(that1.FieldA) { + return false + } + if this.FieldB != nil && that1.FieldB != nil { + if *this.FieldB != *that1.FieldB { + return false + } + } else if this.FieldB != nil { + return false + } else if that1.FieldB != nil { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *CustomNameEnum) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*CustomNameEnum) + if !ok { + that2, ok := that.(CustomNameEnum) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *CustomNameEnum") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *CustomNameEnum but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *CustomNameEnum but is not nil && this == nil") + } + if this.FieldA != nil && that1.FieldA != nil { + if *this.FieldA != *that1.FieldA { + return fmt.Errorf("FieldA this(%v) Not Equal that(%v)", *this.FieldA, *that1.FieldA) + } + } else if this.FieldA != nil { + return fmt.Errorf("this.FieldA == nil && that.FieldA != nil") + } else if that1.FieldA != nil { + return fmt.Errorf("FieldA this(%v) Not Equal that(%v)", this.FieldA, that1.FieldA) + } + if len(this.FieldB) != len(that1.FieldB) { + return fmt.Errorf("FieldB this(%v) Not Equal that(%v)", len(this.FieldB), len(that1.FieldB)) + } + for i := range this.FieldB { + if this.FieldB[i] != that1.FieldB[i] { + return fmt.Errorf("FieldB this[%v](%v) Not Equal that[%v](%v)", i, this.FieldB[i], i, that1.FieldB[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *CustomNameEnum) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*CustomNameEnum) + if !ok { + that2, ok := that.(CustomNameEnum) + 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.FieldA != nil && that1.FieldA != nil { + if *this.FieldA != *that1.FieldA { + return false + } + } else if this.FieldA != nil { + return false + } else if that1.FieldA != nil { + return false + } + if len(this.FieldB) != len(that1.FieldB) { + return false + } + for i := range this.FieldB { + if this.FieldB[i] != that1.FieldB[i] { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NoExtensionsMap) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NoExtensionsMap) + if !ok { + that2, ok := that.(NoExtensionsMap) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NoExtensionsMap") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NoExtensionsMap but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NoExtensionsMap but is not nil && this == nil") + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) + } + } else if this.Field1 != nil { + return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") + } else if that1.Field1 != nil { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) + } + if !bytes.Equal(this.XXX_extensions, that1.XXX_extensions) { + return fmt.Errorf("XXX_extensions this(%v) Not Equal that(%v)", this.XXX_extensions, that1.XXX_extensions) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NoExtensionsMap) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*NoExtensionsMap) + if !ok { + that2, ok := that.(NoExtensionsMap) + 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.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return false + } + } else if this.Field1 != nil { + return false + } else if that1.Field1 != nil { + return false + } + if !bytes.Equal(this.XXX_extensions, that1.XXX_extensions) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *Unrecognized) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*Unrecognized) + if !ok { + that2, ok := that.(Unrecognized) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *Unrecognized") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *Unrecognized but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *Unrecognized but is not nil && this == nil") + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) + } + } else if this.Field1 != nil { + return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") + } else if that1.Field1 != nil { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) + } + return nil +} +func (this *Unrecognized) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*Unrecognized) + if !ok { + that2, ok := that.(Unrecognized) + 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.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return false + } + } else if this.Field1 != nil { + return false + } else if that1.Field1 != nil { + return false + } + return true +} +func (this *UnrecognizedWithInner) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*UnrecognizedWithInner) + if !ok { + that2, ok := that.(UnrecognizedWithInner) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *UnrecognizedWithInner") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *UnrecognizedWithInner but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *UnrecognizedWithInner but is not nil && this == nil") + } + if len(this.Embedded) != len(that1.Embedded) { + return fmt.Errorf("Embedded this(%v) Not Equal that(%v)", len(this.Embedded), len(that1.Embedded)) + } + for i := range this.Embedded { + if !this.Embedded[i].Equal(that1.Embedded[i]) { + return fmt.Errorf("Embedded this[%v](%v) Not Equal that[%v](%v)", i, this.Embedded[i], i, that1.Embedded[i]) + } + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", *this.Field2, *that1.Field2) + } + } else if this.Field2 != nil { + return fmt.Errorf("this.Field2 == nil && that.Field2 != nil") + } else if that1.Field2 != nil { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *UnrecognizedWithInner) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*UnrecognizedWithInner) + if !ok { + that2, ok := that.(UnrecognizedWithInner) + 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.Embedded) != len(that1.Embedded) { + return false + } + for i := range this.Embedded { + if !this.Embedded[i].Equal(that1.Embedded[i]) { + return false + } + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + return false + } + } else if this.Field2 != nil { + return false + } else if that1.Field2 != nil { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *UnrecognizedWithInner_Inner) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*UnrecognizedWithInner_Inner) + if !ok { + that2, ok := that.(UnrecognizedWithInner_Inner) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *UnrecognizedWithInner_Inner") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *UnrecognizedWithInner_Inner but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *UnrecognizedWithInner_Inner but is not nil && this == nil") + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) + } + } else if this.Field1 != nil { + return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") + } else if that1.Field1 != nil { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) + } + return nil +} +func (this *UnrecognizedWithInner_Inner) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*UnrecognizedWithInner_Inner) + if !ok { + that2, ok := that.(UnrecognizedWithInner_Inner) + 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.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return false + } + } else if this.Field1 != nil { + return false + } else if that1.Field1 != nil { + return false + } + return true +} +func (this *UnrecognizedWithEmbed) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*UnrecognizedWithEmbed) + if !ok { + that2, ok := that.(UnrecognizedWithEmbed) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *UnrecognizedWithEmbed") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *UnrecognizedWithEmbed but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *UnrecognizedWithEmbed but is not nil && this == nil") + } + if !this.UnrecognizedWithEmbed_Embedded.Equal(&that1.UnrecognizedWithEmbed_Embedded) { + return fmt.Errorf("UnrecognizedWithEmbed_Embedded this(%v) Not Equal that(%v)", this.UnrecognizedWithEmbed_Embedded, that1.UnrecognizedWithEmbed_Embedded) + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", *this.Field2, *that1.Field2) + } + } else if this.Field2 != nil { + return fmt.Errorf("this.Field2 == nil && that.Field2 != nil") + } else if that1.Field2 != nil { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *UnrecognizedWithEmbed) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*UnrecognizedWithEmbed) + if !ok { + that2, ok := that.(UnrecognizedWithEmbed) + 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.UnrecognizedWithEmbed_Embedded.Equal(&that1.UnrecognizedWithEmbed_Embedded) { + return false + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + return false + } + } else if this.Field2 != nil { + return false + } else if that1.Field2 != nil { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *UnrecognizedWithEmbed_Embedded) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*UnrecognizedWithEmbed_Embedded) + if !ok { + that2, ok := that.(UnrecognizedWithEmbed_Embedded) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *UnrecognizedWithEmbed_Embedded") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *UnrecognizedWithEmbed_Embedded but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *UnrecognizedWithEmbed_Embedded but is not nil && this == nil") + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) + } + } else if this.Field1 != nil { + return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") + } else if that1.Field1 != nil { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) + } + return nil +} +func (this *UnrecognizedWithEmbed_Embedded) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*UnrecognizedWithEmbed_Embedded) + if !ok { + that2, ok := that.(UnrecognizedWithEmbed_Embedded) + 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.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return false + } + } else if this.Field1 != nil { + return false + } else if that1.Field1 != nil { + return false + } + return true +} +func (this *Node) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*Node) + if !ok { + that2, ok := that.(Node) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *Node") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *Node but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *Node but is not nil && this == nil") + } + if this.Label != nil && that1.Label != nil { + if *this.Label != *that1.Label { + return fmt.Errorf("Label this(%v) Not Equal that(%v)", *this.Label, *that1.Label) + } + } else if this.Label != nil { + return fmt.Errorf("this.Label == nil && that.Label != nil") + } else if that1.Label != nil { + return fmt.Errorf("Label this(%v) Not Equal that(%v)", this.Label, that1.Label) + } + if len(this.Children) != len(that1.Children) { + return fmt.Errorf("Children this(%v) Not Equal that(%v)", len(this.Children), len(that1.Children)) + } + for i := range this.Children { + if !this.Children[i].Equal(that1.Children[i]) { + return fmt.Errorf("Children this[%v](%v) Not Equal that[%v](%v)", i, this.Children[i], i, that1.Children[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *Node) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*Node) + if !ok { + that2, ok := that.(Node) + 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.Label != nil && that1.Label != nil { + if *this.Label != *that1.Label { + return false + } + } else if this.Label != nil { + return false + } else if that1.Label != nil { + return false + } + if len(this.Children) != len(that1.Children) { + return false + } + for i := range this.Children { + if !this.Children[i].Equal(that1.Children[i]) { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} + +type NidOptNativeFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetField1() float64 + GetField2() float32 + GetField3() int32 + GetField4() int64 + GetField5() uint32 + GetField6() uint64 + GetField7() int32 + GetField8() int64 + GetField9() uint32 + GetField10() int32 + GetField11() uint64 + GetField12() int64 + GetField13() bool + GetField14() string + GetField15() []byte +} + +func (this *NidOptNative) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NidOptNative) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNidOptNativeFromFace(this) +} + +func (this *NidOptNative) GetField1() float64 { + return this.Field1 +} + +func (this *NidOptNative) GetField2() float32 { + return this.Field2 +} + +func (this *NidOptNative) GetField3() int32 { + return this.Field3 +} + +func (this *NidOptNative) GetField4() int64 { + return this.Field4 +} + +func (this *NidOptNative) GetField5() uint32 { + return this.Field5 +} + +func (this *NidOptNative) GetField6() uint64 { + return this.Field6 +} + +func (this *NidOptNative) GetField7() int32 { + return this.Field7 +} + +func (this *NidOptNative) GetField8() int64 { + return this.Field8 +} + +func (this *NidOptNative) GetField9() uint32 { + return this.Field9 +} + +func (this *NidOptNative) GetField10() int32 { + return this.Field10 +} + +func (this *NidOptNative) GetField11() uint64 { + return this.Field11 +} + +func (this *NidOptNative) GetField12() int64 { + return this.Field12 +} + +func (this *NidOptNative) GetField13() bool { + return this.Field13 +} + +func (this *NidOptNative) GetField14() string { + return this.Field14 +} + +func (this *NidOptNative) GetField15() []byte { + return this.Field15 +} + +func NewNidOptNativeFromFace(that NidOptNativeFace) *NidOptNative { + this := &NidOptNative{} + this.Field1 = that.GetField1() + this.Field2 = that.GetField2() + this.Field3 = that.GetField3() + this.Field4 = that.GetField4() + this.Field5 = that.GetField5() + this.Field6 = that.GetField6() + this.Field7 = that.GetField7() + this.Field8 = that.GetField8() + this.Field9 = that.GetField9() + this.Field10 = that.GetField10() + this.Field11 = that.GetField11() + this.Field12 = that.GetField12() + this.Field13 = that.GetField13() + this.Field14 = that.GetField14() + this.Field15 = that.GetField15() + return this +} + +type NinOptNativeFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetField1() *float64 + GetField2() *float32 + GetField3() *int32 + GetField4() *int64 + GetField5() *uint32 + GetField6() *uint64 + GetField7() *int32 + GetField8() *int64 + GetField9() *uint32 + GetField10() *int32 + GetField11() *uint64 + GetField12() *int64 + GetField13() *bool + GetField14() *string + GetField15() []byte +} + +func (this *NinOptNative) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NinOptNative) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNinOptNativeFromFace(this) +} + +func (this *NinOptNative) GetField1() *float64 { + return this.Field1 +} + +func (this *NinOptNative) GetField2() *float32 { + return this.Field2 +} + +func (this *NinOptNative) GetField3() *int32 { + return this.Field3 +} + +func (this *NinOptNative) GetField4() *int64 { + return this.Field4 +} + +func (this *NinOptNative) GetField5() *uint32 { + return this.Field5 +} + +func (this *NinOptNative) GetField6() *uint64 { + return this.Field6 +} + +func (this *NinOptNative) GetField7() *int32 { + return this.Field7 +} + +func (this *NinOptNative) GetField8() *int64 { + return this.Field8 +} + +func (this *NinOptNative) GetField9() *uint32 { + return this.Field9 +} + +func (this *NinOptNative) GetField10() *int32 { + return this.Field10 +} + +func (this *NinOptNative) GetField11() *uint64 { + return this.Field11 +} + +func (this *NinOptNative) GetField12() *int64 { + return this.Field12 +} + +func (this *NinOptNative) GetField13() *bool { + return this.Field13 +} + +func (this *NinOptNative) GetField14() *string { + return this.Field14 +} + +func (this *NinOptNative) GetField15() []byte { + return this.Field15 +} + +func NewNinOptNativeFromFace(that NinOptNativeFace) *NinOptNative { + this := &NinOptNative{} + this.Field1 = that.GetField1() + this.Field2 = that.GetField2() + this.Field3 = that.GetField3() + this.Field4 = that.GetField4() + this.Field5 = that.GetField5() + this.Field6 = that.GetField6() + this.Field7 = that.GetField7() + this.Field8 = that.GetField8() + this.Field9 = that.GetField9() + this.Field10 = that.GetField10() + this.Field11 = that.GetField11() + this.Field12 = that.GetField12() + this.Field13 = that.GetField13() + this.Field14 = that.GetField14() + this.Field15 = that.GetField15() + return this +} + +type NidRepNativeFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetField1() []float64 + GetField2() []float32 + GetField3() []int32 + GetField4() []int64 + GetField5() []uint32 + GetField6() []uint64 + GetField7() []int32 + GetField8() []int64 + GetField9() []uint32 + GetField10() []int32 + GetField11() []uint64 + GetField12() []int64 + GetField13() []bool + GetField14() []string + GetField15() [][]byte +} + +func (this *NidRepNative) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NidRepNative) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNidRepNativeFromFace(this) +} + +func (this *NidRepNative) GetField1() []float64 { + return this.Field1 +} + +func (this *NidRepNative) GetField2() []float32 { + return this.Field2 +} + +func (this *NidRepNative) GetField3() []int32 { + return this.Field3 +} + +func (this *NidRepNative) GetField4() []int64 { + return this.Field4 +} + +func (this *NidRepNative) GetField5() []uint32 { + return this.Field5 +} + +func (this *NidRepNative) GetField6() []uint64 { + return this.Field6 +} + +func (this *NidRepNative) GetField7() []int32 { + return this.Field7 +} + +func (this *NidRepNative) GetField8() []int64 { + return this.Field8 +} + +func (this *NidRepNative) GetField9() []uint32 { + return this.Field9 +} + +func (this *NidRepNative) GetField10() []int32 { + return this.Field10 +} + +func (this *NidRepNative) GetField11() []uint64 { + return this.Field11 +} + +func (this *NidRepNative) GetField12() []int64 { + return this.Field12 +} + +func (this *NidRepNative) GetField13() []bool { + return this.Field13 +} + +func (this *NidRepNative) GetField14() []string { + return this.Field14 +} + +func (this *NidRepNative) GetField15() [][]byte { + return this.Field15 +} + +func NewNidRepNativeFromFace(that NidRepNativeFace) *NidRepNative { + this := &NidRepNative{} + this.Field1 = that.GetField1() + this.Field2 = that.GetField2() + this.Field3 = that.GetField3() + this.Field4 = that.GetField4() + this.Field5 = that.GetField5() + this.Field6 = that.GetField6() + this.Field7 = that.GetField7() + this.Field8 = that.GetField8() + this.Field9 = that.GetField9() + this.Field10 = that.GetField10() + this.Field11 = that.GetField11() + this.Field12 = that.GetField12() + this.Field13 = that.GetField13() + this.Field14 = that.GetField14() + this.Field15 = that.GetField15() + return this +} + +type NinRepNativeFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetField1() []float64 + GetField2() []float32 + GetField3() []int32 + GetField4() []int64 + GetField5() []uint32 + GetField6() []uint64 + GetField7() []int32 + GetField8() []int64 + GetField9() []uint32 + GetField10() []int32 + GetField11() []uint64 + GetField12() []int64 + GetField13() []bool + GetField14() []string + GetField15() [][]byte +} + +func (this *NinRepNative) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NinRepNative) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNinRepNativeFromFace(this) +} + +func (this *NinRepNative) GetField1() []float64 { + return this.Field1 +} + +func (this *NinRepNative) GetField2() []float32 { + return this.Field2 +} + +func (this *NinRepNative) GetField3() []int32 { + return this.Field3 +} + +func (this *NinRepNative) GetField4() []int64 { + return this.Field4 +} + +func (this *NinRepNative) GetField5() []uint32 { + return this.Field5 +} + +func (this *NinRepNative) GetField6() []uint64 { + return this.Field6 +} + +func (this *NinRepNative) GetField7() []int32 { + return this.Field7 +} + +func (this *NinRepNative) GetField8() []int64 { + return this.Field8 +} + +func (this *NinRepNative) GetField9() []uint32 { + return this.Field9 +} + +func (this *NinRepNative) GetField10() []int32 { + return this.Field10 +} + +func (this *NinRepNative) GetField11() []uint64 { + return this.Field11 +} + +func (this *NinRepNative) GetField12() []int64 { + return this.Field12 +} + +func (this *NinRepNative) GetField13() []bool { + return this.Field13 +} + +func (this *NinRepNative) GetField14() []string { + return this.Field14 +} + +func (this *NinRepNative) GetField15() [][]byte { + return this.Field15 +} + +func NewNinRepNativeFromFace(that NinRepNativeFace) *NinRepNative { + this := &NinRepNative{} + this.Field1 = that.GetField1() + this.Field2 = that.GetField2() + this.Field3 = that.GetField3() + this.Field4 = that.GetField4() + this.Field5 = that.GetField5() + this.Field6 = that.GetField6() + this.Field7 = that.GetField7() + this.Field8 = that.GetField8() + this.Field9 = that.GetField9() + this.Field10 = that.GetField10() + this.Field11 = that.GetField11() + this.Field12 = that.GetField12() + this.Field13 = that.GetField13() + this.Field14 = that.GetField14() + this.Field15 = that.GetField15() + return this +} + +type NidRepPackedNativeFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetField1() []float64 + GetField2() []float32 + GetField3() []int32 + GetField4() []int64 + GetField5() []uint32 + GetField6() []uint64 + GetField7() []int32 + GetField8() []int64 + GetField9() []uint32 + GetField10() []int32 + GetField11() []uint64 + GetField12() []int64 + GetField13() []bool +} + +func (this *NidRepPackedNative) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NidRepPackedNative) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNidRepPackedNativeFromFace(this) +} + +func (this *NidRepPackedNative) GetField1() []float64 { + return this.Field1 +} + +func (this *NidRepPackedNative) GetField2() []float32 { + return this.Field2 +} + +func (this *NidRepPackedNative) GetField3() []int32 { + return this.Field3 +} + +func (this *NidRepPackedNative) GetField4() []int64 { + return this.Field4 +} + +func (this *NidRepPackedNative) GetField5() []uint32 { + return this.Field5 +} + +func (this *NidRepPackedNative) GetField6() []uint64 { + return this.Field6 +} + +func (this *NidRepPackedNative) GetField7() []int32 { + return this.Field7 +} + +func (this *NidRepPackedNative) GetField8() []int64 { + return this.Field8 +} + +func (this *NidRepPackedNative) GetField9() []uint32 { + return this.Field9 +} + +func (this *NidRepPackedNative) GetField10() []int32 { + return this.Field10 +} + +func (this *NidRepPackedNative) GetField11() []uint64 { + return this.Field11 +} + +func (this *NidRepPackedNative) GetField12() []int64 { + return this.Field12 +} + +func (this *NidRepPackedNative) GetField13() []bool { + return this.Field13 +} + +func NewNidRepPackedNativeFromFace(that NidRepPackedNativeFace) *NidRepPackedNative { + this := &NidRepPackedNative{} + this.Field1 = that.GetField1() + this.Field2 = that.GetField2() + this.Field3 = that.GetField3() + this.Field4 = that.GetField4() + this.Field5 = that.GetField5() + this.Field6 = that.GetField6() + this.Field7 = that.GetField7() + this.Field8 = that.GetField8() + this.Field9 = that.GetField9() + this.Field10 = that.GetField10() + this.Field11 = that.GetField11() + this.Field12 = that.GetField12() + this.Field13 = that.GetField13() + return this +} + +type NinRepPackedNativeFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetField1() []float64 + GetField2() []float32 + GetField3() []int32 + GetField4() []int64 + GetField5() []uint32 + GetField6() []uint64 + GetField7() []int32 + GetField8() []int64 + GetField9() []uint32 + GetField10() []int32 + GetField11() []uint64 + GetField12() []int64 + GetField13() []bool +} + +func (this *NinRepPackedNative) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NinRepPackedNative) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNinRepPackedNativeFromFace(this) +} + +func (this *NinRepPackedNative) GetField1() []float64 { + return this.Field1 +} + +func (this *NinRepPackedNative) GetField2() []float32 { + return this.Field2 +} + +func (this *NinRepPackedNative) GetField3() []int32 { + return this.Field3 +} + +func (this *NinRepPackedNative) GetField4() []int64 { + return this.Field4 +} + +func (this *NinRepPackedNative) GetField5() []uint32 { + return this.Field5 +} + +func (this *NinRepPackedNative) GetField6() []uint64 { + return this.Field6 +} + +func (this *NinRepPackedNative) GetField7() []int32 { + return this.Field7 +} + +func (this *NinRepPackedNative) GetField8() []int64 { + return this.Field8 +} + +func (this *NinRepPackedNative) GetField9() []uint32 { + return this.Field9 +} + +func (this *NinRepPackedNative) GetField10() []int32 { + return this.Field10 +} + +func (this *NinRepPackedNative) GetField11() []uint64 { + return this.Field11 +} + +func (this *NinRepPackedNative) GetField12() []int64 { + return this.Field12 +} + +func (this *NinRepPackedNative) GetField13() []bool { + return this.Field13 +} + +func NewNinRepPackedNativeFromFace(that NinRepPackedNativeFace) *NinRepPackedNative { + this := &NinRepPackedNative{} + this.Field1 = that.GetField1() + this.Field2 = that.GetField2() + this.Field3 = that.GetField3() + this.Field4 = that.GetField4() + this.Field5 = that.GetField5() + this.Field6 = that.GetField6() + this.Field7 = that.GetField7() + this.Field8 = that.GetField8() + this.Field9 = that.GetField9() + this.Field10 = that.GetField10() + this.Field11 = that.GetField11() + this.Field12 = that.GetField12() + this.Field13 = that.GetField13() + return this +} + +type NidOptStructFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetField1() float64 + GetField2() float32 + GetField3() NidOptNative + GetField4() NinOptNative + GetField6() uint64 + GetField7() int32 + GetField8() NidOptNative + GetField13() bool + GetField14() string + GetField15() []byte +} + +func (this *NidOptStruct) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NidOptStruct) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNidOptStructFromFace(this) +} + +func (this *NidOptStruct) GetField1() float64 { + return this.Field1 +} + +func (this *NidOptStruct) GetField2() float32 { + return this.Field2 +} + +func (this *NidOptStruct) GetField3() NidOptNative { + return this.Field3 +} + +func (this *NidOptStruct) GetField4() NinOptNative { + return this.Field4 +} + +func (this *NidOptStruct) GetField6() uint64 { + return this.Field6 +} + +func (this *NidOptStruct) GetField7() int32 { + return this.Field7 +} + +func (this *NidOptStruct) GetField8() NidOptNative { + return this.Field8 +} + +func (this *NidOptStruct) GetField13() bool { + return this.Field13 +} + +func (this *NidOptStruct) GetField14() string { + return this.Field14 +} + +func (this *NidOptStruct) GetField15() []byte { + return this.Field15 +} + +func NewNidOptStructFromFace(that NidOptStructFace) *NidOptStruct { + this := &NidOptStruct{} + this.Field1 = that.GetField1() + this.Field2 = that.GetField2() + this.Field3 = that.GetField3() + this.Field4 = that.GetField4() + this.Field6 = that.GetField6() + this.Field7 = that.GetField7() + this.Field8 = that.GetField8() + this.Field13 = that.GetField13() + this.Field14 = that.GetField14() + this.Field15 = that.GetField15() + return this +} + +type NinOptStructFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetField1() *float64 + GetField2() *float32 + GetField3() *NidOptNative + GetField4() *NinOptNative + GetField6() *uint64 + GetField7() *int32 + GetField8() *NidOptNative + GetField13() *bool + GetField14() *string + GetField15() []byte +} + +func (this *NinOptStruct) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NinOptStruct) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNinOptStructFromFace(this) +} + +func (this *NinOptStruct) GetField1() *float64 { + return this.Field1 +} + +func (this *NinOptStruct) GetField2() *float32 { + return this.Field2 +} + +func (this *NinOptStruct) GetField3() *NidOptNative { + return this.Field3 +} + +func (this *NinOptStruct) GetField4() *NinOptNative { + return this.Field4 +} + +func (this *NinOptStruct) GetField6() *uint64 { + return this.Field6 +} + +func (this *NinOptStruct) GetField7() *int32 { + return this.Field7 +} + +func (this *NinOptStruct) GetField8() *NidOptNative { + return this.Field8 +} + +func (this *NinOptStruct) GetField13() *bool { + return this.Field13 +} + +func (this *NinOptStruct) GetField14() *string { + return this.Field14 +} + +func (this *NinOptStruct) GetField15() []byte { + return this.Field15 +} + +func NewNinOptStructFromFace(that NinOptStructFace) *NinOptStruct { + this := &NinOptStruct{} + this.Field1 = that.GetField1() + this.Field2 = that.GetField2() + this.Field3 = that.GetField3() + this.Field4 = that.GetField4() + this.Field6 = that.GetField6() + this.Field7 = that.GetField7() + this.Field8 = that.GetField8() + this.Field13 = that.GetField13() + this.Field14 = that.GetField14() + this.Field15 = that.GetField15() + return this +} + +type NidRepStructFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetField1() []float64 + GetField2() []float32 + GetField3() []NidOptNative + GetField4() []NinOptNative + GetField6() []uint64 + GetField7() []int32 + GetField8() []NidOptNative + GetField13() []bool + GetField14() []string + GetField15() [][]byte +} + +func (this *NidRepStruct) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NidRepStruct) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNidRepStructFromFace(this) +} + +func (this *NidRepStruct) GetField1() []float64 { + return this.Field1 +} + +func (this *NidRepStruct) GetField2() []float32 { + return this.Field2 +} + +func (this *NidRepStruct) GetField3() []NidOptNative { + return this.Field3 +} + +func (this *NidRepStruct) GetField4() []NinOptNative { + return this.Field4 +} + +func (this *NidRepStruct) GetField6() []uint64 { + return this.Field6 +} + +func (this *NidRepStruct) GetField7() []int32 { + return this.Field7 +} + +func (this *NidRepStruct) GetField8() []NidOptNative { + return this.Field8 +} + +func (this *NidRepStruct) GetField13() []bool { + return this.Field13 +} + +func (this *NidRepStruct) GetField14() []string { + return this.Field14 +} + +func (this *NidRepStruct) GetField15() [][]byte { + return this.Field15 +} + +func NewNidRepStructFromFace(that NidRepStructFace) *NidRepStruct { + this := &NidRepStruct{} + this.Field1 = that.GetField1() + this.Field2 = that.GetField2() + this.Field3 = that.GetField3() + this.Field4 = that.GetField4() + this.Field6 = that.GetField6() + this.Field7 = that.GetField7() + this.Field8 = that.GetField8() + this.Field13 = that.GetField13() + this.Field14 = that.GetField14() + this.Field15 = that.GetField15() + return this +} + +type NinRepStructFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetField1() []float64 + GetField2() []float32 + GetField3() []*NidOptNative + GetField4() []*NinOptNative + GetField6() []uint64 + GetField7() []int32 + GetField8() []*NidOptNative + GetField13() []bool + GetField14() []string + GetField15() [][]byte +} + +func (this *NinRepStruct) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NinRepStruct) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNinRepStructFromFace(this) +} + +func (this *NinRepStruct) GetField1() []float64 { + return this.Field1 +} + +func (this *NinRepStruct) GetField2() []float32 { + return this.Field2 +} + +func (this *NinRepStruct) GetField3() []*NidOptNative { + return this.Field3 +} + +func (this *NinRepStruct) GetField4() []*NinOptNative { + return this.Field4 +} + +func (this *NinRepStruct) GetField6() []uint64 { + return this.Field6 +} + +func (this *NinRepStruct) GetField7() []int32 { + return this.Field7 +} + +func (this *NinRepStruct) GetField8() []*NidOptNative { + return this.Field8 +} + +func (this *NinRepStruct) GetField13() []bool { + return this.Field13 +} + +func (this *NinRepStruct) GetField14() []string { + return this.Field14 +} + +func (this *NinRepStruct) GetField15() [][]byte { + return this.Field15 +} + +func NewNinRepStructFromFace(that NinRepStructFace) *NinRepStruct { + this := &NinRepStruct{} + this.Field1 = that.GetField1() + this.Field2 = that.GetField2() + this.Field3 = that.GetField3() + this.Field4 = that.GetField4() + this.Field6 = that.GetField6() + this.Field7 = that.GetField7() + this.Field8 = that.GetField8() + this.Field13 = that.GetField13() + this.Field14 = that.GetField14() + this.Field15 = that.GetField15() + return this +} + +type NidEmbeddedStructFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetNidOptNative() *NidOptNative + GetField200() NidOptNative + GetField210() bool +} + +func (this *NidEmbeddedStruct) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NidEmbeddedStruct) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNidEmbeddedStructFromFace(this) +} + +func (this *NidEmbeddedStruct) GetNidOptNative() *NidOptNative { + return this.NidOptNative +} + +func (this *NidEmbeddedStruct) GetField200() NidOptNative { + return this.Field200 +} + +func (this *NidEmbeddedStruct) GetField210() bool { + return this.Field210 +} + +func NewNidEmbeddedStructFromFace(that NidEmbeddedStructFace) *NidEmbeddedStruct { + this := &NidEmbeddedStruct{} + this.NidOptNative = that.GetNidOptNative() + this.Field200 = that.GetField200() + this.Field210 = that.GetField210() + return this +} + +type NinEmbeddedStructFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetNidOptNative() *NidOptNative + GetField200() *NidOptNative + GetField210() *bool +} + +func (this *NinEmbeddedStruct) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NinEmbeddedStruct) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNinEmbeddedStructFromFace(this) +} + +func (this *NinEmbeddedStruct) GetNidOptNative() *NidOptNative { + return this.NidOptNative +} + +func (this *NinEmbeddedStruct) GetField200() *NidOptNative { + return this.Field200 +} + +func (this *NinEmbeddedStruct) GetField210() *bool { + return this.Field210 +} + +func NewNinEmbeddedStructFromFace(that NinEmbeddedStructFace) *NinEmbeddedStruct { + this := &NinEmbeddedStruct{} + this.NidOptNative = that.GetNidOptNative() + this.Field200 = that.GetField200() + this.Field210 = that.GetField210() + return this +} + +type NidNestedStructFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetField1() NidOptStruct + GetField2() []NidRepStruct +} + +func (this *NidNestedStruct) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NidNestedStruct) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNidNestedStructFromFace(this) +} + +func (this *NidNestedStruct) GetField1() NidOptStruct { + return this.Field1 +} + +func (this *NidNestedStruct) GetField2() []NidRepStruct { + return this.Field2 +} + +func NewNidNestedStructFromFace(that NidNestedStructFace) *NidNestedStruct { + this := &NidNestedStruct{} + this.Field1 = that.GetField1() + this.Field2 = that.GetField2() + return this +} + +type NinNestedStructFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetField1() *NinOptStruct + GetField2() []*NinRepStruct +} + +func (this *NinNestedStruct) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NinNestedStruct) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNinNestedStructFromFace(this) +} + +func (this *NinNestedStruct) GetField1() *NinOptStruct { + return this.Field1 +} + +func (this *NinNestedStruct) GetField2() []*NinRepStruct { + return this.Field2 +} + +func NewNinNestedStructFromFace(that NinNestedStructFace) *NinNestedStruct { + this := &NinNestedStruct{} + this.Field1 = that.GetField1() + this.Field2 = that.GetField2() + return this +} + +type NidOptCustomFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetId() Uuid + GetValue() github_com_gogo_protobuf_test_custom.Uint128 +} + +func (this *NidOptCustom) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NidOptCustom) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNidOptCustomFromFace(this) +} + +func (this *NidOptCustom) GetId() Uuid { + return this.Id +} + +func (this *NidOptCustom) GetValue() github_com_gogo_protobuf_test_custom.Uint128 { + return this.Value +} + +func NewNidOptCustomFromFace(that NidOptCustomFace) *NidOptCustom { + this := &NidOptCustom{} + this.Id = that.GetId() + this.Value = that.GetValue() + return this +} + +type CustomDashFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetValue() *github_com_gogo_protobuf_test_custom_dash_type.Bytes +} + +func (this *CustomDash) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *CustomDash) TestProto() github_com_gogo_protobuf_proto.Message { + return NewCustomDashFromFace(this) +} + +func (this *CustomDash) GetValue() *github_com_gogo_protobuf_test_custom_dash_type.Bytes { + return this.Value +} + +func NewCustomDashFromFace(that CustomDashFace) *CustomDash { + this := &CustomDash{} + this.Value = that.GetValue() + return this +} + +type NinOptCustomFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetId() *Uuid + GetValue() *github_com_gogo_protobuf_test_custom.Uint128 +} + +func (this *NinOptCustom) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NinOptCustom) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNinOptCustomFromFace(this) +} + +func (this *NinOptCustom) GetId() *Uuid { + return this.Id +} + +func (this *NinOptCustom) GetValue() *github_com_gogo_protobuf_test_custom.Uint128 { + return this.Value +} + +func NewNinOptCustomFromFace(that NinOptCustomFace) *NinOptCustom { + this := &NinOptCustom{} + this.Id = that.GetId() + this.Value = that.GetValue() + return this +} + +type NidRepCustomFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetId() []Uuid + GetValue() []github_com_gogo_protobuf_test_custom.Uint128 +} + +func (this *NidRepCustom) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NidRepCustom) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNidRepCustomFromFace(this) +} + +func (this *NidRepCustom) GetId() []Uuid { + return this.Id +} + +func (this *NidRepCustom) GetValue() []github_com_gogo_protobuf_test_custom.Uint128 { + return this.Value +} + +func NewNidRepCustomFromFace(that NidRepCustomFace) *NidRepCustom { + this := &NidRepCustom{} + this.Id = that.GetId() + this.Value = that.GetValue() + return this +} + +type NinRepCustomFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetId() []Uuid + GetValue() []github_com_gogo_protobuf_test_custom.Uint128 +} + +func (this *NinRepCustom) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NinRepCustom) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNinRepCustomFromFace(this) +} + +func (this *NinRepCustom) GetId() []Uuid { + return this.Id +} + +func (this *NinRepCustom) GetValue() []github_com_gogo_protobuf_test_custom.Uint128 { + return this.Value +} + +func NewNinRepCustomFromFace(that NinRepCustomFace) *NinRepCustom { + this := &NinRepCustom{} + this.Id = that.GetId() + this.Value = that.GetValue() + return this +} + +type NinOptNativeUnionFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetField1() *float64 + GetField2() *float32 + GetField3() *int32 + GetField4() *int64 + GetField5() *uint32 + GetField6() *uint64 + GetField13() *bool + GetField14() *string + GetField15() []byte +} + +func (this *NinOptNativeUnion) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NinOptNativeUnion) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNinOptNativeUnionFromFace(this) +} + +func (this *NinOptNativeUnion) GetField1() *float64 { + return this.Field1 +} + +func (this *NinOptNativeUnion) GetField2() *float32 { + return this.Field2 +} + +func (this *NinOptNativeUnion) GetField3() *int32 { + return this.Field3 +} + +func (this *NinOptNativeUnion) GetField4() *int64 { + return this.Field4 +} + +func (this *NinOptNativeUnion) GetField5() *uint32 { + return this.Field5 +} + +func (this *NinOptNativeUnion) GetField6() *uint64 { + return this.Field6 +} + +func (this *NinOptNativeUnion) GetField13() *bool { + return this.Field13 +} + +func (this *NinOptNativeUnion) GetField14() *string { + return this.Field14 +} + +func (this *NinOptNativeUnion) GetField15() []byte { + return this.Field15 +} + +func NewNinOptNativeUnionFromFace(that NinOptNativeUnionFace) *NinOptNativeUnion { + this := &NinOptNativeUnion{} + this.Field1 = that.GetField1() + this.Field2 = that.GetField2() + this.Field3 = that.GetField3() + this.Field4 = that.GetField4() + this.Field5 = that.GetField5() + this.Field6 = that.GetField6() + this.Field13 = that.GetField13() + this.Field14 = that.GetField14() + this.Field15 = that.GetField15() + return this +} + +type NinOptStructUnionFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetField1() *float64 + GetField2() *float32 + GetField3() *NidOptNative + GetField4() *NinOptNative + GetField6() *uint64 + GetField7() *int32 + GetField13() *bool + GetField14() *string + GetField15() []byte +} + +func (this *NinOptStructUnion) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NinOptStructUnion) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNinOptStructUnionFromFace(this) +} + +func (this *NinOptStructUnion) GetField1() *float64 { + return this.Field1 +} + +func (this *NinOptStructUnion) GetField2() *float32 { + return this.Field2 +} + +func (this *NinOptStructUnion) GetField3() *NidOptNative { + return this.Field3 +} + +func (this *NinOptStructUnion) GetField4() *NinOptNative { + return this.Field4 +} + +func (this *NinOptStructUnion) GetField6() *uint64 { + return this.Field6 +} + +func (this *NinOptStructUnion) GetField7() *int32 { + return this.Field7 +} + +func (this *NinOptStructUnion) GetField13() *bool { + return this.Field13 +} + +func (this *NinOptStructUnion) GetField14() *string { + return this.Field14 +} + +func (this *NinOptStructUnion) GetField15() []byte { + return this.Field15 +} + +func NewNinOptStructUnionFromFace(that NinOptStructUnionFace) *NinOptStructUnion { + this := &NinOptStructUnion{} + this.Field1 = that.GetField1() + this.Field2 = that.GetField2() + this.Field3 = that.GetField3() + this.Field4 = that.GetField4() + this.Field6 = that.GetField6() + this.Field7 = that.GetField7() + this.Field13 = that.GetField13() + this.Field14 = that.GetField14() + this.Field15 = that.GetField15() + return this +} + +type NinEmbeddedStructUnionFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetNidOptNative() *NidOptNative + GetField200() *NinOptNative + GetField210() *bool +} + +func (this *NinEmbeddedStructUnion) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NinEmbeddedStructUnion) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNinEmbeddedStructUnionFromFace(this) +} + +func (this *NinEmbeddedStructUnion) GetNidOptNative() *NidOptNative { + return this.NidOptNative +} + +func (this *NinEmbeddedStructUnion) GetField200() *NinOptNative { + return this.Field200 +} + +func (this *NinEmbeddedStructUnion) GetField210() *bool { + return this.Field210 +} + +func NewNinEmbeddedStructUnionFromFace(that NinEmbeddedStructUnionFace) *NinEmbeddedStructUnion { + this := &NinEmbeddedStructUnion{} + this.NidOptNative = that.GetNidOptNative() + this.Field200 = that.GetField200() + this.Field210 = that.GetField210() + return this +} + +type NinNestedStructUnionFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetField1() *NinOptNativeUnion + GetField2() *NinOptStructUnion + GetField3() *NinEmbeddedStructUnion +} + +func (this *NinNestedStructUnion) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NinNestedStructUnion) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNinNestedStructUnionFromFace(this) +} + +func (this *NinNestedStructUnion) GetField1() *NinOptNativeUnion { + return this.Field1 +} + +func (this *NinNestedStructUnion) GetField2() *NinOptStructUnion { + return this.Field2 +} + +func (this *NinNestedStructUnion) GetField3() *NinEmbeddedStructUnion { + return this.Field3 +} + +func NewNinNestedStructUnionFromFace(that NinNestedStructUnionFace) *NinNestedStructUnion { + this := &NinNestedStructUnion{} + this.Field1 = that.GetField1() + this.Field2 = that.GetField2() + this.Field3 = that.GetField3() + return this +} + +type TreeFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetOr() *OrBranch + GetAnd() *AndBranch + GetLeaf() *Leaf +} + +func (this *Tree) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *Tree) TestProto() github_com_gogo_protobuf_proto.Message { + return NewTreeFromFace(this) +} + +func (this *Tree) GetOr() *OrBranch { + return this.Or +} + +func (this *Tree) GetAnd() *AndBranch { + return this.And +} + +func (this *Tree) GetLeaf() *Leaf { + return this.Leaf +} + +func NewTreeFromFace(that TreeFace) *Tree { + this := &Tree{} + this.Or = that.GetOr() + this.And = that.GetAnd() + this.Leaf = that.GetLeaf() + return this +} + +type OrBranchFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetLeft() Tree + GetRight() Tree +} + +func (this *OrBranch) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *OrBranch) TestProto() github_com_gogo_protobuf_proto.Message { + return NewOrBranchFromFace(this) +} + +func (this *OrBranch) GetLeft() Tree { + return this.Left +} + +func (this *OrBranch) GetRight() Tree { + return this.Right +} + +func NewOrBranchFromFace(that OrBranchFace) *OrBranch { + this := &OrBranch{} + this.Left = that.GetLeft() + this.Right = that.GetRight() + return this +} + +type AndBranchFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetLeft() Tree + GetRight() Tree +} + +func (this *AndBranch) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *AndBranch) TestProto() github_com_gogo_protobuf_proto.Message { + return NewAndBranchFromFace(this) +} + +func (this *AndBranch) GetLeft() Tree { + return this.Left +} + +func (this *AndBranch) GetRight() Tree { + return this.Right +} + +func NewAndBranchFromFace(that AndBranchFace) *AndBranch { + this := &AndBranch{} + this.Left = that.GetLeft() + this.Right = that.GetRight() + return this +} + +type LeafFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetValue() int64 + GetStrValue() string +} + +func (this *Leaf) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *Leaf) TestProto() github_com_gogo_protobuf_proto.Message { + return NewLeafFromFace(this) +} + +func (this *Leaf) GetValue() int64 { + return this.Value +} + +func (this *Leaf) GetStrValue() string { + return this.StrValue +} + +func NewLeafFromFace(that LeafFace) *Leaf { + this := &Leaf{} + this.Value = that.GetValue() + this.StrValue = that.GetStrValue() + return this +} + +type DeepTreeFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetDown() *ADeepBranch + GetAnd() *AndDeepBranch + GetLeaf() *DeepLeaf +} + +func (this *DeepTree) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *DeepTree) TestProto() github_com_gogo_protobuf_proto.Message { + return NewDeepTreeFromFace(this) +} + +func (this *DeepTree) GetDown() *ADeepBranch { + return this.Down +} + +func (this *DeepTree) GetAnd() *AndDeepBranch { + return this.And +} + +func (this *DeepTree) GetLeaf() *DeepLeaf { + return this.Leaf +} + +func NewDeepTreeFromFace(that DeepTreeFace) *DeepTree { + this := &DeepTree{} + this.Down = that.GetDown() + this.And = that.GetAnd() + this.Leaf = that.GetLeaf() + return this +} + +type ADeepBranchFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetDown() DeepTree +} + +func (this *ADeepBranch) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *ADeepBranch) TestProto() github_com_gogo_protobuf_proto.Message { + return NewADeepBranchFromFace(this) +} + +func (this *ADeepBranch) GetDown() DeepTree { + return this.Down +} + +func NewADeepBranchFromFace(that ADeepBranchFace) *ADeepBranch { + this := &ADeepBranch{} + this.Down = that.GetDown() + return this +} + +type AndDeepBranchFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetLeft() DeepTree + GetRight() DeepTree +} + +func (this *AndDeepBranch) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *AndDeepBranch) TestProto() github_com_gogo_protobuf_proto.Message { + return NewAndDeepBranchFromFace(this) +} + +func (this *AndDeepBranch) GetLeft() DeepTree { + return this.Left +} + +func (this *AndDeepBranch) GetRight() DeepTree { + return this.Right +} + +func NewAndDeepBranchFromFace(that AndDeepBranchFace) *AndDeepBranch { + this := &AndDeepBranch{} + this.Left = that.GetLeft() + this.Right = that.GetRight() + return this +} + +type DeepLeafFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetTree() Tree +} + +func (this *DeepLeaf) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *DeepLeaf) TestProto() github_com_gogo_protobuf_proto.Message { + return NewDeepLeafFromFace(this) +} + +func (this *DeepLeaf) GetTree() Tree { + return this.Tree +} + +func NewDeepLeafFromFace(that DeepLeafFace) *DeepLeaf { + this := &DeepLeaf{} + this.Tree = that.GetTree() + return this +} + +type NilFace interface { + Proto() github_com_gogo_protobuf_proto.Message +} + +func (this *Nil) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *Nil) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNilFromFace(this) +} + +func NewNilFromFace(that NilFace) *Nil { + this := &Nil{} + return this +} + +type NidOptEnumFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetField1() TheTestEnum +} + +func (this *NidOptEnum) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NidOptEnum) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNidOptEnumFromFace(this) +} + +func (this *NidOptEnum) GetField1() TheTestEnum { + return this.Field1 +} + +func NewNidOptEnumFromFace(that NidOptEnumFace) *NidOptEnum { + this := &NidOptEnum{} + this.Field1 = that.GetField1() + return this +} + +type NinOptEnumFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetField1() *TheTestEnum + GetField2() *YetAnotherTestEnum + GetField3() *YetYetAnotherTestEnum +} + +func (this *NinOptEnum) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NinOptEnum) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNinOptEnumFromFace(this) +} + +func (this *NinOptEnum) GetField1() *TheTestEnum { + return this.Field1 +} + +func (this *NinOptEnum) GetField2() *YetAnotherTestEnum { + return this.Field2 +} + +func (this *NinOptEnum) GetField3() *YetYetAnotherTestEnum { + return this.Field3 +} + +func NewNinOptEnumFromFace(that NinOptEnumFace) *NinOptEnum { + this := &NinOptEnum{} + this.Field1 = that.GetField1() + this.Field2 = that.GetField2() + this.Field3 = that.GetField3() + return this +} + +type NidRepEnumFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetField1() []TheTestEnum + GetField2() []YetAnotherTestEnum + GetField3() []YetYetAnotherTestEnum +} + +func (this *NidRepEnum) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NidRepEnum) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNidRepEnumFromFace(this) +} + +func (this *NidRepEnum) GetField1() []TheTestEnum { + return this.Field1 +} + +func (this *NidRepEnum) GetField2() []YetAnotherTestEnum { + return this.Field2 +} + +func (this *NidRepEnum) GetField3() []YetYetAnotherTestEnum { + return this.Field3 +} + +func NewNidRepEnumFromFace(that NidRepEnumFace) *NidRepEnum { + this := &NidRepEnum{} + this.Field1 = that.GetField1() + this.Field2 = that.GetField2() + this.Field3 = that.GetField3() + return this +} + +type NinRepEnumFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetField1() []TheTestEnum + GetField2() []YetAnotherTestEnum + GetField3() []YetYetAnotherTestEnum +} + +func (this *NinRepEnum) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NinRepEnum) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNinRepEnumFromFace(this) +} + +func (this *NinRepEnum) GetField1() []TheTestEnum { + return this.Field1 +} + +func (this *NinRepEnum) GetField2() []YetAnotherTestEnum { + return this.Field2 +} + +func (this *NinRepEnum) GetField3() []YetYetAnotherTestEnum { + return this.Field3 +} + +func NewNinRepEnumFromFace(that NinRepEnumFace) *NinRepEnum { + this := &NinRepEnum{} + this.Field1 = that.GetField1() + this.Field2 = that.GetField2() + this.Field3 = that.GetField3() + return this +} + +type AnotherNinOptEnumFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetField1() *AnotherTestEnum + GetField2() *YetAnotherTestEnum + GetField3() *YetYetAnotherTestEnum +} + +func (this *AnotherNinOptEnum) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *AnotherNinOptEnum) TestProto() github_com_gogo_protobuf_proto.Message { + return NewAnotherNinOptEnumFromFace(this) +} + +func (this *AnotherNinOptEnum) GetField1() *AnotherTestEnum { + return this.Field1 +} + +func (this *AnotherNinOptEnum) GetField2() *YetAnotherTestEnum { + return this.Field2 +} + +func (this *AnotherNinOptEnum) GetField3() *YetYetAnotherTestEnum { + return this.Field3 +} + +func NewAnotherNinOptEnumFromFace(that AnotherNinOptEnumFace) *AnotherNinOptEnum { + this := &AnotherNinOptEnum{} + this.Field1 = that.GetField1() + this.Field2 = that.GetField2() + this.Field3 = that.GetField3() + return this +} + +type TimerFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetTime1() int64 + GetTime2() int64 + GetData() []byte +} + +func (this *Timer) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *Timer) TestProto() github_com_gogo_protobuf_proto.Message { + return NewTimerFromFace(this) +} + +func (this *Timer) GetTime1() int64 { + return this.Time1 +} + +func (this *Timer) GetTime2() int64 { + return this.Time2 +} + +func (this *Timer) GetData() []byte { + return this.Data +} + +func NewTimerFromFace(that TimerFace) *Timer { + this := &Timer{} + this.Time1 = that.GetTime1() + this.Time2 = that.GetTime2() + this.Data = that.GetData() + return this +} + +type NestedDefinitionFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetField1() *int64 + GetEnumField() *NestedDefinition_NestedEnum + GetNNM() *NestedDefinition_NestedMessage_NestedNestedMsg + GetNM() *NestedDefinition_NestedMessage +} + +func (this *NestedDefinition) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NestedDefinition) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNestedDefinitionFromFace(this) +} + +func (this *NestedDefinition) GetField1() *int64 { + return this.Field1 +} + +func (this *NestedDefinition) GetEnumField() *NestedDefinition_NestedEnum { + return this.EnumField +} + +func (this *NestedDefinition) GetNNM() *NestedDefinition_NestedMessage_NestedNestedMsg { + return this.NNM +} + +func (this *NestedDefinition) GetNM() *NestedDefinition_NestedMessage { + return this.NM +} + +func NewNestedDefinitionFromFace(that NestedDefinitionFace) *NestedDefinition { + this := &NestedDefinition{} + this.Field1 = that.GetField1() + this.EnumField = that.GetEnumField() + this.NNM = that.GetNNM() + this.NM = that.GetNM() + return this +} + +type NestedDefinition_NestedMessageFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetNestedField1() *uint64 + GetNNM() *NestedDefinition_NestedMessage_NestedNestedMsg +} + +func (this *NestedDefinition_NestedMessage) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NestedDefinition_NestedMessage) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNestedDefinition_NestedMessageFromFace(this) +} + +func (this *NestedDefinition_NestedMessage) GetNestedField1() *uint64 { + return this.NestedField1 +} + +func (this *NestedDefinition_NestedMessage) GetNNM() *NestedDefinition_NestedMessage_NestedNestedMsg { + return this.NNM +} + +func NewNestedDefinition_NestedMessageFromFace(that NestedDefinition_NestedMessageFace) *NestedDefinition_NestedMessage { + this := &NestedDefinition_NestedMessage{} + this.NestedField1 = that.GetNestedField1() + this.NNM = that.GetNNM() + return this +} + +type NestedDefinition_NestedMessage_NestedNestedMsgFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetNestedNestedField1() *string +} + +func (this *NestedDefinition_NestedMessage_NestedNestedMsg) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NestedDefinition_NestedMessage_NestedNestedMsg) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNestedDefinition_NestedMessage_NestedNestedMsgFromFace(this) +} + +func (this *NestedDefinition_NestedMessage_NestedNestedMsg) GetNestedNestedField1() *string { + return this.NestedNestedField1 +} + +func NewNestedDefinition_NestedMessage_NestedNestedMsgFromFace(that NestedDefinition_NestedMessage_NestedNestedMsgFace) *NestedDefinition_NestedMessage_NestedNestedMsg { + this := &NestedDefinition_NestedMessage_NestedNestedMsg{} + this.NestedNestedField1 = that.GetNestedNestedField1() + return this +} + +type NestedScopeFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetA() *NestedDefinition_NestedMessage_NestedNestedMsg + GetB() *NestedDefinition_NestedEnum + GetC() *NestedDefinition_NestedMessage +} + +func (this *NestedScope) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NestedScope) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNestedScopeFromFace(this) +} + +func (this *NestedScope) GetA() *NestedDefinition_NestedMessage_NestedNestedMsg { + return this.A +} + +func (this *NestedScope) GetB() *NestedDefinition_NestedEnum { + return this.B +} + +func (this *NestedScope) GetC() *NestedDefinition_NestedMessage { + return this.C +} + +func NewNestedScopeFromFace(that NestedScopeFace) *NestedScope { + this := &NestedScope{} + this.A = that.GetA() + this.B = that.GetB() + this.C = that.GetC() + return this +} + +type CustomContainerFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetCustomStruct() NidOptCustom +} + +func (this *CustomContainer) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *CustomContainer) TestProto() github_com_gogo_protobuf_proto.Message { + return NewCustomContainerFromFace(this) +} + +func (this *CustomContainer) GetCustomStruct() NidOptCustom { + return this.CustomStruct +} + +func NewCustomContainerFromFace(that CustomContainerFace) *CustomContainer { + this := &CustomContainer{} + this.CustomStruct = that.GetCustomStruct() + return this +} + +type CustomNameNidOptNativeFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetFieldA() float64 + GetFieldB() float32 + GetFieldC() int32 + GetFieldD() int64 + GetFieldE() uint32 + GetFieldF() uint64 + GetFieldG() int32 + GetFieldH() int64 + GetFieldI() uint32 + GetFieldJ() int32 + GetFieldK() uint64 + GetFieldL() int64 + GetFieldM() bool + GetFieldN() string + GetFieldO() []byte +} + +func (this *CustomNameNidOptNative) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *CustomNameNidOptNative) TestProto() github_com_gogo_protobuf_proto.Message { + return NewCustomNameNidOptNativeFromFace(this) +} + +func (this *CustomNameNidOptNative) GetFieldA() float64 { + return this.FieldA +} + +func (this *CustomNameNidOptNative) GetFieldB() float32 { + return this.FieldB +} + +func (this *CustomNameNidOptNative) GetFieldC() int32 { + return this.FieldC +} + +func (this *CustomNameNidOptNative) GetFieldD() int64 { + return this.FieldD +} + +func (this *CustomNameNidOptNative) GetFieldE() uint32 { + return this.FieldE +} + +func (this *CustomNameNidOptNative) GetFieldF() uint64 { + return this.FieldF +} + +func (this *CustomNameNidOptNative) GetFieldG() int32 { + return this.FieldG +} + +func (this *CustomNameNidOptNative) GetFieldH() int64 { + return this.FieldH +} + +func (this *CustomNameNidOptNative) GetFieldI() uint32 { + return this.FieldI +} + +func (this *CustomNameNidOptNative) GetFieldJ() int32 { + return this.FieldJ +} + +func (this *CustomNameNidOptNative) GetFieldK() uint64 { + return this.FieldK +} + +func (this *CustomNameNidOptNative) GetFieldL() int64 { + return this.FieldL +} + +func (this *CustomNameNidOptNative) GetFieldM() bool { + return this.FieldM +} + +func (this *CustomNameNidOptNative) GetFieldN() string { + return this.FieldN +} + +func (this *CustomNameNidOptNative) GetFieldO() []byte { + return this.FieldO +} + +func NewCustomNameNidOptNativeFromFace(that CustomNameNidOptNativeFace) *CustomNameNidOptNative { + this := &CustomNameNidOptNative{} + this.FieldA = that.GetFieldA() + this.FieldB = that.GetFieldB() + this.FieldC = that.GetFieldC() + this.FieldD = that.GetFieldD() + this.FieldE = that.GetFieldE() + this.FieldF = that.GetFieldF() + this.FieldG = that.GetFieldG() + this.FieldH = that.GetFieldH() + this.FieldI = that.GetFieldI() + this.FieldJ = that.GetFieldJ() + this.FieldK = that.GetFieldK() + this.FieldL = that.GetFieldL() + this.FieldM = that.GetFieldM() + this.FieldN = that.GetFieldN() + this.FieldO = that.GetFieldO() + return this +} + +type CustomNameNinOptNativeFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetFieldA() *float64 + GetFieldB() *float32 + GetFieldC() *int32 + GetFieldD() *int64 + GetFieldE() *uint32 + GetFieldF() *uint64 + GetFieldG() *int32 + GetFieldH() *int64 + GetFieldI() *uint32 + GetFieldJ() *int32 + GetFieldK() *uint64 + GetFielL() *int64 + GetFieldM() *bool + GetFieldN() *string + GetFieldO() []byte +} + +func (this *CustomNameNinOptNative) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *CustomNameNinOptNative) TestProto() github_com_gogo_protobuf_proto.Message { + return NewCustomNameNinOptNativeFromFace(this) +} + +func (this *CustomNameNinOptNative) GetFieldA() *float64 { + return this.FieldA +} + +func (this *CustomNameNinOptNative) GetFieldB() *float32 { + return this.FieldB +} + +func (this *CustomNameNinOptNative) GetFieldC() *int32 { + return this.FieldC +} + +func (this *CustomNameNinOptNative) GetFieldD() *int64 { + return this.FieldD +} + +func (this *CustomNameNinOptNative) GetFieldE() *uint32 { + return this.FieldE +} + +func (this *CustomNameNinOptNative) GetFieldF() *uint64 { + return this.FieldF +} + +func (this *CustomNameNinOptNative) GetFieldG() *int32 { + return this.FieldG +} + +func (this *CustomNameNinOptNative) GetFieldH() *int64 { + return this.FieldH +} + +func (this *CustomNameNinOptNative) GetFieldI() *uint32 { + return this.FieldI +} + +func (this *CustomNameNinOptNative) GetFieldJ() *int32 { + return this.FieldJ +} + +func (this *CustomNameNinOptNative) GetFieldK() *uint64 { + return this.FieldK +} + +func (this *CustomNameNinOptNative) GetFielL() *int64 { + return this.FielL +} + +func (this *CustomNameNinOptNative) GetFieldM() *bool { + return this.FieldM +} + +func (this *CustomNameNinOptNative) GetFieldN() *string { + return this.FieldN +} + +func (this *CustomNameNinOptNative) GetFieldO() []byte { + return this.FieldO +} + +func NewCustomNameNinOptNativeFromFace(that CustomNameNinOptNativeFace) *CustomNameNinOptNative { + this := &CustomNameNinOptNative{} + this.FieldA = that.GetFieldA() + this.FieldB = that.GetFieldB() + this.FieldC = that.GetFieldC() + this.FieldD = that.GetFieldD() + this.FieldE = that.GetFieldE() + this.FieldF = that.GetFieldF() + this.FieldG = that.GetFieldG() + this.FieldH = that.GetFieldH() + this.FieldI = that.GetFieldI() + this.FieldJ = that.GetFieldJ() + this.FieldK = that.GetFieldK() + this.FielL = that.GetFielL() + this.FieldM = that.GetFieldM() + this.FieldN = that.GetFieldN() + this.FieldO = that.GetFieldO() + return this +} + +type CustomNameNinRepNativeFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetFieldA() []float64 + GetFieldB() []float32 + GetFieldC() []int32 + GetFieldD() []int64 + GetFieldE() []uint32 + GetFieldF() []uint64 + GetFieldG() []int32 + GetFieldH() []int64 + GetFieldI() []uint32 + GetFieldJ() []int32 + GetFieldK() []uint64 + GetFieldL() []int64 + GetFieldM() []bool + GetFieldN() []string + GetFieldO() [][]byte +} + +func (this *CustomNameNinRepNative) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *CustomNameNinRepNative) TestProto() github_com_gogo_protobuf_proto.Message { + return NewCustomNameNinRepNativeFromFace(this) +} + +func (this *CustomNameNinRepNative) GetFieldA() []float64 { + return this.FieldA +} + +func (this *CustomNameNinRepNative) GetFieldB() []float32 { + return this.FieldB +} + +func (this *CustomNameNinRepNative) GetFieldC() []int32 { + return this.FieldC +} + +func (this *CustomNameNinRepNative) GetFieldD() []int64 { + return this.FieldD +} + +func (this *CustomNameNinRepNative) GetFieldE() []uint32 { + return this.FieldE +} + +func (this *CustomNameNinRepNative) GetFieldF() []uint64 { + return this.FieldF +} + +func (this *CustomNameNinRepNative) GetFieldG() []int32 { + return this.FieldG +} + +func (this *CustomNameNinRepNative) GetFieldH() []int64 { + return this.FieldH +} + +func (this *CustomNameNinRepNative) GetFieldI() []uint32 { + return this.FieldI +} + +func (this *CustomNameNinRepNative) GetFieldJ() []int32 { + return this.FieldJ +} + +func (this *CustomNameNinRepNative) GetFieldK() []uint64 { + return this.FieldK +} + +func (this *CustomNameNinRepNative) GetFieldL() []int64 { + return this.FieldL +} + +func (this *CustomNameNinRepNative) GetFieldM() []bool { + return this.FieldM +} + +func (this *CustomNameNinRepNative) GetFieldN() []string { + return this.FieldN +} + +func (this *CustomNameNinRepNative) GetFieldO() [][]byte { + return this.FieldO +} + +func NewCustomNameNinRepNativeFromFace(that CustomNameNinRepNativeFace) *CustomNameNinRepNative { + this := &CustomNameNinRepNative{} + this.FieldA = that.GetFieldA() + this.FieldB = that.GetFieldB() + this.FieldC = that.GetFieldC() + this.FieldD = that.GetFieldD() + this.FieldE = that.GetFieldE() + this.FieldF = that.GetFieldF() + this.FieldG = that.GetFieldG() + this.FieldH = that.GetFieldH() + this.FieldI = that.GetFieldI() + this.FieldJ = that.GetFieldJ() + this.FieldK = that.GetFieldK() + this.FieldL = that.GetFieldL() + this.FieldM = that.GetFieldM() + this.FieldN = that.GetFieldN() + this.FieldO = that.GetFieldO() + return this +} + +type CustomNameNinStructFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetFieldA() *float64 + GetFieldB() *float32 + GetFieldC() *NidOptNative + GetFieldD() []*NinOptNative + GetFieldE() *uint64 + GetFieldF() *int32 + GetFieldG() *NidOptNative + GetFieldH() *bool + GetFieldI() *string + GetFieldJ() []byte +} + +func (this *CustomNameNinStruct) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *CustomNameNinStruct) TestProto() github_com_gogo_protobuf_proto.Message { + return NewCustomNameNinStructFromFace(this) +} + +func (this *CustomNameNinStruct) GetFieldA() *float64 { + return this.FieldA +} + +func (this *CustomNameNinStruct) GetFieldB() *float32 { + return this.FieldB +} + +func (this *CustomNameNinStruct) GetFieldC() *NidOptNative { + return this.FieldC +} + +func (this *CustomNameNinStruct) GetFieldD() []*NinOptNative { + return this.FieldD +} + +func (this *CustomNameNinStruct) GetFieldE() *uint64 { + return this.FieldE +} + +func (this *CustomNameNinStruct) GetFieldF() *int32 { + return this.FieldF +} + +func (this *CustomNameNinStruct) GetFieldG() *NidOptNative { + return this.FieldG +} + +func (this *CustomNameNinStruct) GetFieldH() *bool { + return this.FieldH +} + +func (this *CustomNameNinStruct) GetFieldI() *string { + return this.FieldI +} + +func (this *CustomNameNinStruct) GetFieldJ() []byte { + return this.FieldJ +} + +func NewCustomNameNinStructFromFace(that CustomNameNinStructFace) *CustomNameNinStruct { + this := &CustomNameNinStruct{} + this.FieldA = that.GetFieldA() + this.FieldB = that.GetFieldB() + this.FieldC = that.GetFieldC() + this.FieldD = that.GetFieldD() + this.FieldE = that.GetFieldE() + this.FieldF = that.GetFieldF() + this.FieldG = that.GetFieldG() + this.FieldH = that.GetFieldH() + this.FieldI = that.GetFieldI() + this.FieldJ = that.GetFieldJ() + return this +} + +type CustomNameCustomTypeFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetFieldA() *Uuid + GetFieldB() *github_com_gogo_protobuf_test_custom.Uint128 + GetFieldC() []Uuid + GetFieldD() []github_com_gogo_protobuf_test_custom.Uint128 +} + +func (this *CustomNameCustomType) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *CustomNameCustomType) TestProto() github_com_gogo_protobuf_proto.Message { + return NewCustomNameCustomTypeFromFace(this) +} + +func (this *CustomNameCustomType) GetFieldA() *Uuid { + return this.FieldA +} + +func (this *CustomNameCustomType) GetFieldB() *github_com_gogo_protobuf_test_custom.Uint128 { + return this.FieldB +} + +func (this *CustomNameCustomType) GetFieldC() []Uuid { + return this.FieldC +} + +func (this *CustomNameCustomType) GetFieldD() []github_com_gogo_protobuf_test_custom.Uint128 { + return this.FieldD +} + +func NewCustomNameCustomTypeFromFace(that CustomNameCustomTypeFace) *CustomNameCustomType { + this := &CustomNameCustomType{} + this.FieldA = that.GetFieldA() + this.FieldB = that.GetFieldB() + this.FieldC = that.GetFieldC() + this.FieldD = that.GetFieldD() + return this +} + +type CustomNameNinEmbeddedStructUnionFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetNidOptNative() *NidOptNative + GetFieldA() *NinOptNative + GetFieldB() *bool +} + +func (this *CustomNameNinEmbeddedStructUnion) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *CustomNameNinEmbeddedStructUnion) TestProto() github_com_gogo_protobuf_proto.Message { + return NewCustomNameNinEmbeddedStructUnionFromFace(this) +} + +func (this *CustomNameNinEmbeddedStructUnion) GetNidOptNative() *NidOptNative { + return this.NidOptNative +} + +func (this *CustomNameNinEmbeddedStructUnion) GetFieldA() *NinOptNative { + return this.FieldA +} + +func (this *CustomNameNinEmbeddedStructUnion) GetFieldB() *bool { + return this.FieldB +} + +func NewCustomNameNinEmbeddedStructUnionFromFace(that CustomNameNinEmbeddedStructUnionFace) *CustomNameNinEmbeddedStructUnion { + this := &CustomNameNinEmbeddedStructUnion{} + this.NidOptNative = that.GetNidOptNative() + this.FieldA = that.GetFieldA() + this.FieldB = that.GetFieldB() + return this +} + +type CustomNameEnumFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetFieldA() *TheTestEnum + GetFieldB() []TheTestEnum +} + +func (this *CustomNameEnum) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *CustomNameEnum) TestProto() github_com_gogo_protobuf_proto.Message { + return NewCustomNameEnumFromFace(this) +} + +func (this *CustomNameEnum) GetFieldA() *TheTestEnum { + return this.FieldA +} + +func (this *CustomNameEnum) GetFieldB() []TheTestEnum { + return this.FieldB +} + +func NewCustomNameEnumFromFace(that CustomNameEnumFace) *CustomNameEnum { + this := &CustomNameEnum{} + this.FieldA = that.GetFieldA() + this.FieldB = that.GetFieldB() + return this +} + +type UnrecognizedFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetField1() *string +} + +func (this *Unrecognized) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *Unrecognized) TestProto() github_com_gogo_protobuf_proto.Message { + return NewUnrecognizedFromFace(this) +} + +func (this *Unrecognized) GetField1() *string { + return this.Field1 +} + +func NewUnrecognizedFromFace(that UnrecognizedFace) *Unrecognized { + this := &Unrecognized{} + this.Field1 = that.GetField1() + return this +} + +type UnrecognizedWithInnerFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetEmbedded() []*UnrecognizedWithInner_Inner + GetField2() *string +} + +func (this *UnrecognizedWithInner) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *UnrecognizedWithInner) TestProto() github_com_gogo_protobuf_proto.Message { + return NewUnrecognizedWithInnerFromFace(this) +} + +func (this *UnrecognizedWithInner) GetEmbedded() []*UnrecognizedWithInner_Inner { + return this.Embedded +} + +func (this *UnrecognizedWithInner) GetField2() *string { + return this.Field2 +} + +func NewUnrecognizedWithInnerFromFace(that UnrecognizedWithInnerFace) *UnrecognizedWithInner { + this := &UnrecognizedWithInner{} + this.Embedded = that.GetEmbedded() + this.Field2 = that.GetField2() + return this +} + +type UnrecognizedWithInner_InnerFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetField1() *uint32 +} + +func (this *UnrecognizedWithInner_Inner) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *UnrecognizedWithInner_Inner) TestProto() github_com_gogo_protobuf_proto.Message { + return NewUnrecognizedWithInner_InnerFromFace(this) +} + +func (this *UnrecognizedWithInner_Inner) GetField1() *uint32 { + return this.Field1 +} + +func NewUnrecognizedWithInner_InnerFromFace(that UnrecognizedWithInner_InnerFace) *UnrecognizedWithInner_Inner { + this := &UnrecognizedWithInner_Inner{} + this.Field1 = that.GetField1() + return this +} + +type UnrecognizedWithEmbedFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetUnrecognizedWithEmbed_Embedded() UnrecognizedWithEmbed_Embedded + GetField2() *string +} + +func (this *UnrecognizedWithEmbed) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *UnrecognizedWithEmbed) TestProto() github_com_gogo_protobuf_proto.Message { + return NewUnrecognizedWithEmbedFromFace(this) +} + +func (this *UnrecognizedWithEmbed) GetUnrecognizedWithEmbed_Embedded() UnrecognizedWithEmbed_Embedded { + return this.UnrecognizedWithEmbed_Embedded +} + +func (this *UnrecognizedWithEmbed) GetField2() *string { + return this.Field2 +} + +func NewUnrecognizedWithEmbedFromFace(that UnrecognizedWithEmbedFace) *UnrecognizedWithEmbed { + this := &UnrecognizedWithEmbed{} + this.UnrecognizedWithEmbed_Embedded = that.GetUnrecognizedWithEmbed_Embedded() + this.Field2 = that.GetField2() + return this +} + +type UnrecognizedWithEmbed_EmbeddedFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetField1() *uint32 +} + +func (this *UnrecognizedWithEmbed_Embedded) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *UnrecognizedWithEmbed_Embedded) TestProto() github_com_gogo_protobuf_proto.Message { + return NewUnrecognizedWithEmbed_EmbeddedFromFace(this) +} + +func (this *UnrecognizedWithEmbed_Embedded) GetField1() *uint32 { + return this.Field1 +} + +func NewUnrecognizedWithEmbed_EmbeddedFromFace(that UnrecognizedWithEmbed_EmbeddedFace) *UnrecognizedWithEmbed_Embedded { + this := &UnrecognizedWithEmbed_Embedded{} + this.Field1 = that.GetField1() + return this +} + +type NodeFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetLabel() *string + GetChildren() []*Node +} + +func (this *Node) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *Node) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNodeFromFace(this) +} + +func (this *Node) GetLabel() *string { + return this.Label +} + +func (this *Node) GetChildren() []*Node { + return this.Children +} + +func NewNodeFromFace(that NodeFace) *Node { + this := &Node{} + this.Label = that.GetLabel() + this.Children = that.GetChildren() + return this +} + +func (this *NidOptNative) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 19) + s = append(s, "&test.NidOptNative{") + s = append(s, "Field1: "+fmt.Sprintf("%#v", this.Field1)+",\n") + s = append(s, "Field2: "+fmt.Sprintf("%#v", this.Field2)+",\n") + s = append(s, "Field3: "+fmt.Sprintf("%#v", this.Field3)+",\n") + s = append(s, "Field4: "+fmt.Sprintf("%#v", this.Field4)+",\n") + s = append(s, "Field5: "+fmt.Sprintf("%#v", this.Field5)+",\n") + s = append(s, "Field6: "+fmt.Sprintf("%#v", this.Field6)+",\n") + s = append(s, "Field7: "+fmt.Sprintf("%#v", this.Field7)+",\n") + s = append(s, "Field8: "+fmt.Sprintf("%#v", this.Field8)+",\n") + s = append(s, "Field9: "+fmt.Sprintf("%#v", this.Field9)+",\n") + s = append(s, "Field10: "+fmt.Sprintf("%#v", this.Field10)+",\n") + s = append(s, "Field11: "+fmt.Sprintf("%#v", this.Field11)+",\n") + s = append(s, "Field12: "+fmt.Sprintf("%#v", this.Field12)+",\n") + s = append(s, "Field13: "+fmt.Sprintf("%#v", this.Field13)+",\n") + s = append(s, "Field14: "+fmt.Sprintf("%#v", this.Field14)+",\n") + s = append(s, "Field15: "+fmt.Sprintf("%#v", this.Field15)+",\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 *NinOptNative) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 19) + s = append(s, "&test.NinOptNative{") + if this.Field1 != nil { + s = append(s, "Field1: "+valueToGoStringThetest(this.Field1, "float64")+",\n") + } + if this.Field2 != nil { + s = append(s, "Field2: "+valueToGoStringThetest(this.Field2, "float32")+",\n") + } + if this.Field3 != nil { + s = append(s, "Field3: "+valueToGoStringThetest(this.Field3, "int32")+",\n") + } + if this.Field4 != nil { + s = append(s, "Field4: "+valueToGoStringThetest(this.Field4, "int64")+",\n") + } + if this.Field5 != nil { + s = append(s, "Field5: "+valueToGoStringThetest(this.Field5, "uint32")+",\n") + } + if this.Field6 != nil { + s = append(s, "Field6: "+valueToGoStringThetest(this.Field6, "uint64")+",\n") + } + if this.Field7 != nil { + s = append(s, "Field7: "+valueToGoStringThetest(this.Field7, "int32")+",\n") + } + if this.Field8 != nil { + s = append(s, "Field8: "+valueToGoStringThetest(this.Field8, "int64")+",\n") + } + if this.Field9 != nil { + s = append(s, "Field9: "+valueToGoStringThetest(this.Field9, "uint32")+",\n") + } + if this.Field10 != nil { + s = append(s, "Field10: "+valueToGoStringThetest(this.Field10, "int32")+",\n") + } + if this.Field11 != nil { + s = append(s, "Field11: "+valueToGoStringThetest(this.Field11, "uint64")+",\n") + } + if this.Field12 != nil { + s = append(s, "Field12: "+valueToGoStringThetest(this.Field12, "int64")+",\n") + } + if this.Field13 != nil { + s = append(s, "Field13: "+valueToGoStringThetest(this.Field13, "bool")+",\n") + } + if this.Field14 != nil { + s = append(s, "Field14: "+valueToGoStringThetest(this.Field14, "string")+",\n") + } + if this.Field15 != nil { + s = append(s, "Field15: "+valueToGoStringThetest(this.Field15, "byte")+",\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 *NidRepNative) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 19) + s = append(s, "&test.NidRepNative{") + if this.Field1 != nil { + s = append(s, "Field1: "+fmt.Sprintf("%#v", this.Field1)+",\n") + } + if this.Field2 != nil { + s = append(s, "Field2: "+fmt.Sprintf("%#v", this.Field2)+",\n") + } + if this.Field3 != nil { + s = append(s, "Field3: "+fmt.Sprintf("%#v", this.Field3)+",\n") + } + if this.Field4 != nil { + s = append(s, "Field4: "+fmt.Sprintf("%#v", this.Field4)+",\n") + } + if this.Field5 != nil { + s = append(s, "Field5: "+fmt.Sprintf("%#v", this.Field5)+",\n") + } + if this.Field6 != nil { + s = append(s, "Field6: "+fmt.Sprintf("%#v", this.Field6)+",\n") + } + if this.Field7 != nil { + s = append(s, "Field7: "+fmt.Sprintf("%#v", this.Field7)+",\n") + } + if this.Field8 != nil { + s = append(s, "Field8: "+fmt.Sprintf("%#v", this.Field8)+",\n") + } + if this.Field9 != nil { + s = append(s, "Field9: "+fmt.Sprintf("%#v", this.Field9)+",\n") + } + if this.Field10 != nil { + s = append(s, "Field10: "+fmt.Sprintf("%#v", this.Field10)+",\n") + } + if this.Field11 != nil { + s = append(s, "Field11: "+fmt.Sprintf("%#v", this.Field11)+",\n") + } + if this.Field12 != nil { + s = append(s, "Field12: "+fmt.Sprintf("%#v", this.Field12)+",\n") + } + if this.Field13 != nil { + s = append(s, "Field13: "+fmt.Sprintf("%#v", this.Field13)+",\n") + } + if this.Field14 != nil { + s = append(s, "Field14: "+fmt.Sprintf("%#v", this.Field14)+",\n") + } + if this.Field15 != nil { + s = append(s, "Field15: "+fmt.Sprintf("%#v", this.Field15)+",\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 *NinRepNative) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 19) + s = append(s, "&test.NinRepNative{") + if this.Field1 != nil { + s = append(s, "Field1: "+fmt.Sprintf("%#v", this.Field1)+",\n") + } + if this.Field2 != nil { + s = append(s, "Field2: "+fmt.Sprintf("%#v", this.Field2)+",\n") + } + if this.Field3 != nil { + s = append(s, "Field3: "+fmt.Sprintf("%#v", this.Field3)+",\n") + } + if this.Field4 != nil { + s = append(s, "Field4: "+fmt.Sprintf("%#v", this.Field4)+",\n") + } + if this.Field5 != nil { + s = append(s, "Field5: "+fmt.Sprintf("%#v", this.Field5)+",\n") + } + if this.Field6 != nil { + s = append(s, "Field6: "+fmt.Sprintf("%#v", this.Field6)+",\n") + } + if this.Field7 != nil { + s = append(s, "Field7: "+fmt.Sprintf("%#v", this.Field7)+",\n") + } + if this.Field8 != nil { + s = append(s, "Field8: "+fmt.Sprintf("%#v", this.Field8)+",\n") + } + if this.Field9 != nil { + s = append(s, "Field9: "+fmt.Sprintf("%#v", this.Field9)+",\n") + } + if this.Field10 != nil { + s = append(s, "Field10: "+fmt.Sprintf("%#v", this.Field10)+",\n") + } + if this.Field11 != nil { + s = append(s, "Field11: "+fmt.Sprintf("%#v", this.Field11)+",\n") + } + if this.Field12 != nil { + s = append(s, "Field12: "+fmt.Sprintf("%#v", this.Field12)+",\n") + } + if this.Field13 != nil { + s = append(s, "Field13: "+fmt.Sprintf("%#v", this.Field13)+",\n") + } + if this.Field14 != nil { + s = append(s, "Field14: "+fmt.Sprintf("%#v", this.Field14)+",\n") + } + if this.Field15 != nil { + s = append(s, "Field15: "+fmt.Sprintf("%#v", this.Field15)+",\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 *NidRepPackedNative) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 17) + s = append(s, "&test.NidRepPackedNative{") + if this.Field1 != nil { + s = append(s, "Field1: "+fmt.Sprintf("%#v", this.Field1)+",\n") + } + if this.Field2 != nil { + s = append(s, "Field2: "+fmt.Sprintf("%#v", this.Field2)+",\n") + } + if this.Field3 != nil { + s = append(s, "Field3: "+fmt.Sprintf("%#v", this.Field3)+",\n") + } + if this.Field4 != nil { + s = append(s, "Field4: "+fmt.Sprintf("%#v", this.Field4)+",\n") + } + if this.Field5 != nil { + s = append(s, "Field5: "+fmt.Sprintf("%#v", this.Field5)+",\n") + } + if this.Field6 != nil { + s = append(s, "Field6: "+fmt.Sprintf("%#v", this.Field6)+",\n") + } + if this.Field7 != nil { + s = append(s, "Field7: "+fmt.Sprintf("%#v", this.Field7)+",\n") + } + if this.Field8 != nil { + s = append(s, "Field8: "+fmt.Sprintf("%#v", this.Field8)+",\n") + } + if this.Field9 != nil { + s = append(s, "Field9: "+fmt.Sprintf("%#v", this.Field9)+",\n") + } + if this.Field10 != nil { + s = append(s, "Field10: "+fmt.Sprintf("%#v", this.Field10)+",\n") + } + if this.Field11 != nil { + s = append(s, "Field11: "+fmt.Sprintf("%#v", this.Field11)+",\n") + } + if this.Field12 != nil { + s = append(s, "Field12: "+fmt.Sprintf("%#v", this.Field12)+",\n") + } + if this.Field13 != nil { + s = append(s, "Field13: "+fmt.Sprintf("%#v", this.Field13)+",\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 *NinRepPackedNative) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 17) + s = append(s, "&test.NinRepPackedNative{") + if this.Field1 != nil { + s = append(s, "Field1: "+fmt.Sprintf("%#v", this.Field1)+",\n") + } + if this.Field2 != nil { + s = append(s, "Field2: "+fmt.Sprintf("%#v", this.Field2)+",\n") + } + if this.Field3 != nil { + s = append(s, "Field3: "+fmt.Sprintf("%#v", this.Field3)+",\n") + } + if this.Field4 != nil { + s = append(s, "Field4: "+fmt.Sprintf("%#v", this.Field4)+",\n") + } + if this.Field5 != nil { + s = append(s, "Field5: "+fmt.Sprintf("%#v", this.Field5)+",\n") + } + if this.Field6 != nil { + s = append(s, "Field6: "+fmt.Sprintf("%#v", this.Field6)+",\n") + } + if this.Field7 != nil { + s = append(s, "Field7: "+fmt.Sprintf("%#v", this.Field7)+",\n") + } + if this.Field8 != nil { + s = append(s, "Field8: "+fmt.Sprintf("%#v", this.Field8)+",\n") + } + if this.Field9 != nil { + s = append(s, "Field9: "+fmt.Sprintf("%#v", this.Field9)+",\n") + } + if this.Field10 != nil { + s = append(s, "Field10: "+fmt.Sprintf("%#v", this.Field10)+",\n") + } + if this.Field11 != nil { + s = append(s, "Field11: "+fmt.Sprintf("%#v", this.Field11)+",\n") + } + if this.Field12 != nil { + s = append(s, "Field12: "+fmt.Sprintf("%#v", this.Field12)+",\n") + } + if this.Field13 != nil { + s = append(s, "Field13: "+fmt.Sprintf("%#v", this.Field13)+",\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 *NidOptStruct) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 14) + s = append(s, "&test.NidOptStruct{") + s = append(s, "Field1: "+fmt.Sprintf("%#v", this.Field1)+",\n") + s = append(s, "Field2: "+fmt.Sprintf("%#v", this.Field2)+",\n") + s = append(s, "Field3: "+strings.Replace(this.Field3.GoString(), `&`, ``, 1)+",\n") + s = append(s, "Field4: "+strings.Replace(this.Field4.GoString(), `&`, ``, 1)+",\n") + s = append(s, "Field6: "+fmt.Sprintf("%#v", this.Field6)+",\n") + s = append(s, "Field7: "+fmt.Sprintf("%#v", this.Field7)+",\n") + s = append(s, "Field8: "+strings.Replace(this.Field8.GoString(), `&`, ``, 1)+",\n") + s = append(s, "Field13: "+fmt.Sprintf("%#v", this.Field13)+",\n") + s = append(s, "Field14: "+fmt.Sprintf("%#v", this.Field14)+",\n") + s = append(s, "Field15: "+fmt.Sprintf("%#v", this.Field15)+",\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 *NinOptStruct) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 14) + s = append(s, "&test.NinOptStruct{") + if this.Field1 != nil { + s = append(s, "Field1: "+valueToGoStringThetest(this.Field1, "float64")+",\n") + } + if this.Field2 != nil { + s = append(s, "Field2: "+valueToGoStringThetest(this.Field2, "float32")+",\n") + } + if this.Field3 != nil { + s = append(s, "Field3: "+fmt.Sprintf("%#v", this.Field3)+",\n") + } + if this.Field4 != nil { + s = append(s, "Field4: "+fmt.Sprintf("%#v", this.Field4)+",\n") + } + if this.Field6 != nil { + s = append(s, "Field6: "+valueToGoStringThetest(this.Field6, "uint64")+",\n") + } + if this.Field7 != nil { + s = append(s, "Field7: "+valueToGoStringThetest(this.Field7, "int32")+",\n") + } + if this.Field8 != nil { + s = append(s, "Field8: "+fmt.Sprintf("%#v", this.Field8)+",\n") + } + if this.Field13 != nil { + s = append(s, "Field13: "+valueToGoStringThetest(this.Field13, "bool")+",\n") + } + if this.Field14 != nil { + s = append(s, "Field14: "+valueToGoStringThetest(this.Field14, "string")+",\n") + } + if this.Field15 != nil { + s = append(s, "Field15: "+valueToGoStringThetest(this.Field15, "byte")+",\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 *NidRepStruct) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 14) + s = append(s, "&test.NidRepStruct{") + if this.Field1 != nil { + s = append(s, "Field1: "+fmt.Sprintf("%#v", this.Field1)+",\n") + } + if this.Field2 != nil { + s = append(s, "Field2: "+fmt.Sprintf("%#v", this.Field2)+",\n") + } + if this.Field3 != nil { + s = append(s, "Field3: "+fmt.Sprintf("%#v", this.Field3)+",\n") + } + if this.Field4 != nil { + s = append(s, "Field4: "+fmt.Sprintf("%#v", this.Field4)+",\n") + } + if this.Field6 != nil { + s = append(s, "Field6: "+fmt.Sprintf("%#v", this.Field6)+",\n") + } + if this.Field7 != nil { + s = append(s, "Field7: "+fmt.Sprintf("%#v", this.Field7)+",\n") + } + if this.Field8 != nil { + s = append(s, "Field8: "+fmt.Sprintf("%#v", this.Field8)+",\n") + } + if this.Field13 != nil { + s = append(s, "Field13: "+fmt.Sprintf("%#v", this.Field13)+",\n") + } + if this.Field14 != nil { + s = append(s, "Field14: "+fmt.Sprintf("%#v", this.Field14)+",\n") + } + if this.Field15 != nil { + s = append(s, "Field15: "+fmt.Sprintf("%#v", this.Field15)+",\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 *NinRepStruct) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 14) + s = append(s, "&test.NinRepStruct{") + if this.Field1 != nil { + s = append(s, "Field1: "+fmt.Sprintf("%#v", this.Field1)+",\n") + } + if this.Field2 != nil { + s = append(s, "Field2: "+fmt.Sprintf("%#v", this.Field2)+",\n") + } + if this.Field3 != nil { + s = append(s, "Field3: "+fmt.Sprintf("%#v", this.Field3)+",\n") + } + if this.Field4 != nil { + s = append(s, "Field4: "+fmt.Sprintf("%#v", this.Field4)+",\n") + } + if this.Field6 != nil { + s = append(s, "Field6: "+fmt.Sprintf("%#v", this.Field6)+",\n") + } + if this.Field7 != nil { + s = append(s, "Field7: "+fmt.Sprintf("%#v", this.Field7)+",\n") + } + if this.Field8 != nil { + s = append(s, "Field8: "+fmt.Sprintf("%#v", this.Field8)+",\n") + } + if this.Field13 != nil { + s = append(s, "Field13: "+fmt.Sprintf("%#v", this.Field13)+",\n") + } + if this.Field14 != nil { + s = append(s, "Field14: "+fmt.Sprintf("%#v", this.Field14)+",\n") + } + if this.Field15 != nil { + s = append(s, "Field15: "+fmt.Sprintf("%#v", this.Field15)+",\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 *NidEmbeddedStruct) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 7) + s = append(s, "&test.NidEmbeddedStruct{") + if this.NidOptNative != nil { + s = append(s, "NidOptNative: "+fmt.Sprintf("%#v", this.NidOptNative)+",\n") + } + s = append(s, "Field200: "+strings.Replace(this.Field200.GoString(), `&`, ``, 1)+",\n") + s = append(s, "Field210: "+fmt.Sprintf("%#v", this.Field210)+",\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 *NinEmbeddedStruct) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 7) + s = append(s, "&test.NinEmbeddedStruct{") + if this.NidOptNative != nil { + s = append(s, "NidOptNative: "+fmt.Sprintf("%#v", this.NidOptNative)+",\n") + } + if this.Field200 != nil { + s = append(s, "Field200: "+fmt.Sprintf("%#v", this.Field200)+",\n") + } + if this.Field210 != nil { + s = append(s, "Field210: "+valueToGoStringThetest(this.Field210, "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 *NidNestedStruct) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 6) + s = append(s, "&test.NidNestedStruct{") + s = append(s, "Field1: "+strings.Replace(this.Field1.GoString(), `&`, ``, 1)+",\n") + if this.Field2 != nil { + s = append(s, "Field2: "+fmt.Sprintf("%#v", this.Field2)+",\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 *NinNestedStruct) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 6) + s = append(s, "&test.NinNestedStruct{") + if this.Field1 != nil { + s = append(s, "Field1: "+fmt.Sprintf("%#v", this.Field1)+",\n") + } + if this.Field2 != nil { + s = append(s, "Field2: "+fmt.Sprintf("%#v", this.Field2)+",\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 *NidOptCustom) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 6) + s = append(s, "&test.NidOptCustom{") + s = append(s, "Id: "+fmt.Sprintf("%#v", this.Id)+",\n") + s = append(s, "Value: "+fmt.Sprintf("%#v", this.Value)+",\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 *CustomDash) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&test.CustomDash{") + if this.Value != nil { + s = append(s, "Value: "+valueToGoStringThetest(this.Value, "github_com_gogo_protobuf_test_custom_dash_type.Bytes")+",\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 *NinOptCustom) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 6) + s = append(s, "&test.NinOptCustom{") + if this.Id != nil { + s = append(s, "Id: "+valueToGoStringThetest(this.Id, "Uuid")+",\n") + } + if this.Value != nil { + s = append(s, "Value: "+valueToGoStringThetest(this.Value, "github_com_gogo_protobuf_test_custom.Uint128")+",\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 *NidRepCustom) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 6) + s = append(s, "&test.NidRepCustom{") + if this.Id != nil { + s = append(s, "Id: "+fmt.Sprintf("%#v", this.Id)+",\n") + } + if this.Value != nil { + s = append(s, "Value: "+fmt.Sprintf("%#v", this.Value)+",\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 *NinRepCustom) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 6) + s = append(s, "&test.NinRepCustom{") + if this.Id != nil { + s = append(s, "Id: "+fmt.Sprintf("%#v", this.Id)+",\n") + } + if this.Value != nil { + s = append(s, "Value: "+fmt.Sprintf("%#v", this.Value)+",\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 *NinOptNativeUnion) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 13) + s = append(s, "&test.NinOptNativeUnion{") + if this.Field1 != nil { + s = append(s, "Field1: "+valueToGoStringThetest(this.Field1, "float64")+",\n") + } + if this.Field2 != nil { + s = append(s, "Field2: "+valueToGoStringThetest(this.Field2, "float32")+",\n") + } + if this.Field3 != nil { + s = append(s, "Field3: "+valueToGoStringThetest(this.Field3, "int32")+",\n") + } + if this.Field4 != nil { + s = append(s, "Field4: "+valueToGoStringThetest(this.Field4, "int64")+",\n") + } + if this.Field5 != nil { + s = append(s, "Field5: "+valueToGoStringThetest(this.Field5, "uint32")+",\n") + } + if this.Field6 != nil { + s = append(s, "Field6: "+valueToGoStringThetest(this.Field6, "uint64")+",\n") + } + if this.Field13 != nil { + s = append(s, "Field13: "+valueToGoStringThetest(this.Field13, "bool")+",\n") + } + if this.Field14 != nil { + s = append(s, "Field14: "+valueToGoStringThetest(this.Field14, "string")+",\n") + } + if this.Field15 != nil { + s = append(s, "Field15: "+valueToGoStringThetest(this.Field15, "byte")+",\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 *NinOptStructUnion) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 13) + s = append(s, "&test.NinOptStructUnion{") + if this.Field1 != nil { + s = append(s, "Field1: "+valueToGoStringThetest(this.Field1, "float64")+",\n") + } + if this.Field2 != nil { + s = append(s, "Field2: "+valueToGoStringThetest(this.Field2, "float32")+",\n") + } + if this.Field3 != nil { + s = append(s, "Field3: "+fmt.Sprintf("%#v", this.Field3)+",\n") + } + if this.Field4 != nil { + s = append(s, "Field4: "+fmt.Sprintf("%#v", this.Field4)+",\n") + } + if this.Field6 != nil { + s = append(s, "Field6: "+valueToGoStringThetest(this.Field6, "uint64")+",\n") + } + if this.Field7 != nil { + s = append(s, "Field7: "+valueToGoStringThetest(this.Field7, "int32")+",\n") + } + if this.Field13 != nil { + s = append(s, "Field13: "+valueToGoStringThetest(this.Field13, "bool")+",\n") + } + if this.Field14 != nil { + s = append(s, "Field14: "+valueToGoStringThetest(this.Field14, "string")+",\n") + } + if this.Field15 != nil { + s = append(s, "Field15: "+valueToGoStringThetest(this.Field15, "byte")+",\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 *NinEmbeddedStructUnion) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 7) + s = append(s, "&test.NinEmbeddedStructUnion{") + if this.NidOptNative != nil { + s = append(s, "NidOptNative: "+fmt.Sprintf("%#v", this.NidOptNative)+",\n") + } + if this.Field200 != nil { + s = append(s, "Field200: "+fmt.Sprintf("%#v", this.Field200)+",\n") + } + if this.Field210 != nil { + s = append(s, "Field210: "+valueToGoStringThetest(this.Field210, "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 *NinNestedStructUnion) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 7) + s = append(s, "&test.NinNestedStructUnion{") + if this.Field1 != nil { + s = append(s, "Field1: "+fmt.Sprintf("%#v", this.Field1)+",\n") + } + if this.Field2 != nil { + s = append(s, "Field2: "+fmt.Sprintf("%#v", this.Field2)+",\n") + } + if this.Field3 != nil { + s = append(s, "Field3: "+fmt.Sprintf("%#v", this.Field3)+",\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 *Tree) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 7) + s = append(s, "&test.Tree{") + if this.Or != nil { + s = append(s, "Or: "+fmt.Sprintf("%#v", this.Or)+",\n") + } + if this.And != nil { + s = append(s, "And: "+fmt.Sprintf("%#v", this.And)+",\n") + } + if this.Leaf != nil { + s = append(s, "Leaf: "+fmt.Sprintf("%#v", this.Leaf)+",\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 *OrBranch) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 6) + s = append(s, "&test.OrBranch{") + s = append(s, "Left: "+strings.Replace(this.Left.GoString(), `&`, ``, 1)+",\n") + s = append(s, "Right: "+strings.Replace(this.Right.GoString(), `&`, ``, 1)+",\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 *AndBranch) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 6) + s = append(s, "&test.AndBranch{") + s = append(s, "Left: "+strings.Replace(this.Left.GoString(), `&`, ``, 1)+",\n") + s = append(s, "Right: "+strings.Replace(this.Right.GoString(), `&`, ``, 1)+",\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 *Leaf) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 6) + s = append(s, "&test.Leaf{") + s = append(s, "Value: "+fmt.Sprintf("%#v", this.Value)+",\n") + s = append(s, "StrValue: "+fmt.Sprintf("%#v", this.StrValue)+",\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 *DeepTree) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 7) + s = append(s, "&test.DeepTree{") + if this.Down != nil { + s = append(s, "Down: "+fmt.Sprintf("%#v", this.Down)+",\n") + } + if this.And != nil { + s = append(s, "And: "+fmt.Sprintf("%#v", this.And)+",\n") + } + if this.Leaf != nil { + s = append(s, "Leaf: "+fmt.Sprintf("%#v", this.Leaf)+",\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 *ADeepBranch) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&test.ADeepBranch{") + s = append(s, "Down: "+strings.Replace(this.Down.GoString(), `&`, ``, 1)+",\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 *AndDeepBranch) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 6) + s = append(s, "&test.AndDeepBranch{") + s = append(s, "Left: "+strings.Replace(this.Left.GoString(), `&`, ``, 1)+",\n") + s = append(s, "Right: "+strings.Replace(this.Right.GoString(), `&`, ``, 1)+",\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 *DeepLeaf) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&test.DeepLeaf{") + s = append(s, "Tree: "+strings.Replace(this.Tree.GoString(), `&`, ``, 1)+",\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 *Nil) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 4) + s = append(s, "&test.Nil{") + 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 *NidOptEnum) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&test.NidOptEnum{") + s = append(s, "Field1: "+fmt.Sprintf("%#v", this.Field1)+",\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 *NinOptEnum) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 7) + s = append(s, "&test.NinOptEnum{") + if this.Field1 != nil { + s = append(s, "Field1: "+valueToGoStringThetest(this.Field1, "test.TheTestEnum")+",\n") + } + if this.Field2 != nil { + s = append(s, "Field2: "+valueToGoStringThetest(this.Field2, "test.YetAnotherTestEnum")+",\n") + } + if this.Field3 != nil { + s = append(s, "Field3: "+valueToGoStringThetest(this.Field3, "test.YetYetAnotherTestEnum")+",\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 *NidRepEnum) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 7) + s = append(s, "&test.NidRepEnum{") + if this.Field1 != nil { + s = append(s, "Field1: "+fmt.Sprintf("%#v", this.Field1)+",\n") + } + if this.Field2 != nil { + s = append(s, "Field2: "+fmt.Sprintf("%#v", this.Field2)+",\n") + } + if this.Field3 != nil { + s = append(s, "Field3: "+fmt.Sprintf("%#v", this.Field3)+",\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 *NinRepEnum) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 7) + s = append(s, "&test.NinRepEnum{") + if this.Field1 != nil { + s = append(s, "Field1: "+fmt.Sprintf("%#v", this.Field1)+",\n") + } + if this.Field2 != nil { + s = append(s, "Field2: "+fmt.Sprintf("%#v", this.Field2)+",\n") + } + if this.Field3 != nil { + s = append(s, "Field3: "+fmt.Sprintf("%#v", this.Field3)+",\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 *NinOptEnumDefault) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 7) + s = append(s, "&test.NinOptEnumDefault{") + if this.Field1 != nil { + s = append(s, "Field1: "+valueToGoStringThetest(this.Field1, "test.TheTestEnum")+",\n") + } + if this.Field2 != nil { + s = append(s, "Field2: "+valueToGoStringThetest(this.Field2, "test.YetAnotherTestEnum")+",\n") + } + if this.Field3 != nil { + s = append(s, "Field3: "+valueToGoStringThetest(this.Field3, "test.YetYetAnotherTestEnum")+",\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 *AnotherNinOptEnum) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 7) + s = append(s, "&test.AnotherNinOptEnum{") + if this.Field1 != nil { + s = append(s, "Field1: "+valueToGoStringThetest(this.Field1, "test.AnotherTestEnum")+",\n") + } + if this.Field2 != nil { + s = append(s, "Field2: "+valueToGoStringThetest(this.Field2, "test.YetAnotherTestEnum")+",\n") + } + if this.Field3 != nil { + s = append(s, "Field3: "+valueToGoStringThetest(this.Field3, "test.YetYetAnotherTestEnum")+",\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 *AnotherNinOptEnumDefault) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 7) + s = append(s, "&test.AnotherNinOptEnumDefault{") + if this.Field1 != nil { + s = append(s, "Field1: "+valueToGoStringThetest(this.Field1, "test.AnotherTestEnum")+",\n") + } + if this.Field2 != nil { + s = append(s, "Field2: "+valueToGoStringThetest(this.Field2, "test.YetAnotherTestEnum")+",\n") + } + if this.Field3 != nil { + s = append(s, "Field3: "+valueToGoStringThetest(this.Field3, "test.YetYetAnotherTestEnum")+",\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 *Timer) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 7) + s = append(s, "&test.Timer{") + s = append(s, "Time1: "+fmt.Sprintf("%#v", this.Time1)+",\n") + s = append(s, "Time2: "+fmt.Sprintf("%#v", this.Time2)+",\n") + s = append(s, "Data: "+fmt.Sprintf("%#v", this.Data)+",\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 *MyExtendable) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&test.MyExtendable{") + if this.Field1 != nil { + s = append(s, "Field1: "+valueToGoStringThetest(this.Field1, "int64")+",\n") + } + if this.XXX_extensions != nil { + s = append(s, "XXX_extensions: "+extensionToGoStringThetest(this.XXX_extensions)+",\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 *OtherExtenable) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 7) + s = append(s, "&test.OtherExtenable{") + if this.Field2 != nil { + s = append(s, "Field2: "+valueToGoStringThetest(this.Field2, "int64")+",\n") + } + if this.Field13 != nil { + s = append(s, "Field13: "+valueToGoStringThetest(this.Field13, "int64")+",\n") + } + if this.M != nil { + s = append(s, "M: "+fmt.Sprintf("%#v", this.M)+",\n") + } + if this.XXX_extensions != nil { + s = append(s, "XXX_extensions: "+extensionToGoStringThetest(this.XXX_extensions)+",\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 *NestedDefinition) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 8) + s = append(s, "&test.NestedDefinition{") + if this.Field1 != nil { + s = append(s, "Field1: "+valueToGoStringThetest(this.Field1, "int64")+",\n") + } + if this.EnumField != nil { + s = append(s, "EnumField: "+valueToGoStringThetest(this.EnumField, "test.NestedDefinition_NestedEnum")+",\n") + } + if this.NNM != nil { + s = append(s, "NNM: "+fmt.Sprintf("%#v", this.NNM)+",\n") + } + if this.NM != nil { + s = append(s, "NM: "+fmt.Sprintf("%#v", this.NM)+",\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 *NestedDefinition_NestedMessage) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 6) + s = append(s, "&test.NestedDefinition_NestedMessage{") + if this.NestedField1 != nil { + s = append(s, "NestedField1: "+valueToGoStringThetest(this.NestedField1, "uint64")+",\n") + } + if this.NNM != nil { + s = append(s, "NNM: "+fmt.Sprintf("%#v", this.NNM)+",\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 *NestedDefinition_NestedMessage_NestedNestedMsg) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&test.NestedDefinition_NestedMessage_NestedNestedMsg{") + if this.NestedNestedField1 != nil { + s = append(s, "NestedNestedField1: "+valueToGoStringThetest(this.NestedNestedField1, "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 *NestedScope) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 7) + s = append(s, "&test.NestedScope{") + if this.A != nil { + s = append(s, "A: "+fmt.Sprintf("%#v", this.A)+",\n") + } + if this.B != nil { + s = append(s, "B: "+valueToGoStringThetest(this.B, "test.NestedDefinition_NestedEnum")+",\n") + } + if this.C != nil { + s = append(s, "C: "+fmt.Sprintf("%#v", this.C)+",\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 *NinOptNativeDefault) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 19) + s = append(s, "&test.NinOptNativeDefault{") + if this.Field1 != nil { + s = append(s, "Field1: "+valueToGoStringThetest(this.Field1, "float64")+",\n") + } + if this.Field2 != nil { + s = append(s, "Field2: "+valueToGoStringThetest(this.Field2, "float32")+",\n") + } + if this.Field3 != nil { + s = append(s, "Field3: "+valueToGoStringThetest(this.Field3, "int32")+",\n") + } + if this.Field4 != nil { + s = append(s, "Field4: "+valueToGoStringThetest(this.Field4, "int64")+",\n") + } + if this.Field5 != nil { + s = append(s, "Field5: "+valueToGoStringThetest(this.Field5, "uint32")+",\n") + } + if this.Field6 != nil { + s = append(s, "Field6: "+valueToGoStringThetest(this.Field6, "uint64")+",\n") + } + if this.Field7 != nil { + s = append(s, "Field7: "+valueToGoStringThetest(this.Field7, "int32")+",\n") + } + if this.Field8 != nil { + s = append(s, "Field8: "+valueToGoStringThetest(this.Field8, "int64")+",\n") + } + if this.Field9 != nil { + s = append(s, "Field9: "+valueToGoStringThetest(this.Field9, "uint32")+",\n") + } + if this.Field10 != nil { + s = append(s, "Field10: "+valueToGoStringThetest(this.Field10, "int32")+",\n") + } + if this.Field11 != nil { + s = append(s, "Field11: "+valueToGoStringThetest(this.Field11, "uint64")+",\n") + } + if this.Field12 != nil { + s = append(s, "Field12: "+valueToGoStringThetest(this.Field12, "int64")+",\n") + } + if this.Field13 != nil { + s = append(s, "Field13: "+valueToGoStringThetest(this.Field13, "bool")+",\n") + } + if this.Field14 != nil { + s = append(s, "Field14: "+valueToGoStringThetest(this.Field14, "string")+",\n") + } + if this.Field15 != nil { + s = append(s, "Field15: "+valueToGoStringThetest(this.Field15, "byte")+",\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 *CustomContainer) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&test.CustomContainer{") + s = append(s, "CustomStruct: "+strings.Replace(this.CustomStruct.GoString(), `&`, ``, 1)+",\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 *CustomNameNidOptNative) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 19) + s = append(s, "&test.CustomNameNidOptNative{") + s = append(s, "FieldA: "+fmt.Sprintf("%#v", this.FieldA)+",\n") + s = append(s, "FieldB: "+fmt.Sprintf("%#v", this.FieldB)+",\n") + s = append(s, "FieldC: "+fmt.Sprintf("%#v", this.FieldC)+",\n") + s = append(s, "FieldD: "+fmt.Sprintf("%#v", this.FieldD)+",\n") + s = append(s, "FieldE: "+fmt.Sprintf("%#v", this.FieldE)+",\n") + s = append(s, "FieldF: "+fmt.Sprintf("%#v", this.FieldF)+",\n") + s = append(s, "FieldG: "+fmt.Sprintf("%#v", this.FieldG)+",\n") + s = append(s, "FieldH: "+fmt.Sprintf("%#v", this.FieldH)+",\n") + s = append(s, "FieldI: "+fmt.Sprintf("%#v", this.FieldI)+",\n") + s = append(s, "FieldJ: "+fmt.Sprintf("%#v", this.FieldJ)+",\n") + s = append(s, "FieldK: "+fmt.Sprintf("%#v", this.FieldK)+",\n") + s = append(s, "FieldL: "+fmt.Sprintf("%#v", this.FieldL)+",\n") + s = append(s, "FieldM: "+fmt.Sprintf("%#v", this.FieldM)+",\n") + s = append(s, "FieldN: "+fmt.Sprintf("%#v", this.FieldN)+",\n") + s = append(s, "FieldO: "+fmt.Sprintf("%#v", this.FieldO)+",\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 *CustomNameNinOptNative) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 19) + s = append(s, "&test.CustomNameNinOptNative{") + if this.FieldA != nil { + s = append(s, "FieldA: "+valueToGoStringThetest(this.FieldA, "float64")+",\n") + } + if this.FieldB != nil { + s = append(s, "FieldB: "+valueToGoStringThetest(this.FieldB, "float32")+",\n") + } + if this.FieldC != nil { + s = append(s, "FieldC: "+valueToGoStringThetest(this.FieldC, "int32")+",\n") + } + if this.FieldD != nil { + s = append(s, "FieldD: "+valueToGoStringThetest(this.FieldD, "int64")+",\n") + } + if this.FieldE != nil { + s = append(s, "FieldE: "+valueToGoStringThetest(this.FieldE, "uint32")+",\n") + } + if this.FieldF != nil { + s = append(s, "FieldF: "+valueToGoStringThetest(this.FieldF, "uint64")+",\n") + } + if this.FieldG != nil { + s = append(s, "FieldG: "+valueToGoStringThetest(this.FieldG, "int32")+",\n") + } + if this.FieldH != nil { + s = append(s, "FieldH: "+valueToGoStringThetest(this.FieldH, "int64")+",\n") + } + if this.FieldI != nil { + s = append(s, "FieldI: "+valueToGoStringThetest(this.FieldI, "uint32")+",\n") + } + if this.FieldJ != nil { + s = append(s, "FieldJ: "+valueToGoStringThetest(this.FieldJ, "int32")+",\n") + } + if this.FieldK != nil { + s = append(s, "FieldK: "+valueToGoStringThetest(this.FieldK, "uint64")+",\n") + } + if this.FielL != nil { + s = append(s, "FielL: "+valueToGoStringThetest(this.FielL, "int64")+",\n") + } + if this.FieldM != nil { + s = append(s, "FieldM: "+valueToGoStringThetest(this.FieldM, "bool")+",\n") + } + if this.FieldN != nil { + s = append(s, "FieldN: "+valueToGoStringThetest(this.FieldN, "string")+",\n") + } + if this.FieldO != nil { + s = append(s, "FieldO: "+valueToGoStringThetest(this.FieldO, "byte")+",\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 *CustomNameNinRepNative) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 19) + s = append(s, "&test.CustomNameNinRepNative{") + if this.FieldA != nil { + s = append(s, "FieldA: "+fmt.Sprintf("%#v", this.FieldA)+",\n") + } + if this.FieldB != nil { + s = append(s, "FieldB: "+fmt.Sprintf("%#v", this.FieldB)+",\n") + } + if this.FieldC != nil { + s = append(s, "FieldC: "+fmt.Sprintf("%#v", this.FieldC)+",\n") + } + if this.FieldD != nil { + s = append(s, "FieldD: "+fmt.Sprintf("%#v", this.FieldD)+",\n") + } + if this.FieldE != nil { + s = append(s, "FieldE: "+fmt.Sprintf("%#v", this.FieldE)+",\n") + } + if this.FieldF != nil { + s = append(s, "FieldF: "+fmt.Sprintf("%#v", this.FieldF)+",\n") + } + if this.FieldG != nil { + s = append(s, "FieldG: "+fmt.Sprintf("%#v", this.FieldG)+",\n") + } + if this.FieldH != nil { + s = append(s, "FieldH: "+fmt.Sprintf("%#v", this.FieldH)+",\n") + } + if this.FieldI != nil { + s = append(s, "FieldI: "+fmt.Sprintf("%#v", this.FieldI)+",\n") + } + if this.FieldJ != nil { + s = append(s, "FieldJ: "+fmt.Sprintf("%#v", this.FieldJ)+",\n") + } + if this.FieldK != nil { + s = append(s, "FieldK: "+fmt.Sprintf("%#v", this.FieldK)+",\n") + } + if this.FieldL != nil { + s = append(s, "FieldL: "+fmt.Sprintf("%#v", this.FieldL)+",\n") + } + if this.FieldM != nil { + s = append(s, "FieldM: "+fmt.Sprintf("%#v", this.FieldM)+",\n") + } + if this.FieldN != nil { + s = append(s, "FieldN: "+fmt.Sprintf("%#v", this.FieldN)+",\n") + } + if this.FieldO != nil { + s = append(s, "FieldO: "+fmt.Sprintf("%#v", this.FieldO)+",\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 *CustomNameNinStruct) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 14) + s = append(s, "&test.CustomNameNinStruct{") + if this.FieldA != nil { + s = append(s, "FieldA: "+valueToGoStringThetest(this.FieldA, "float64")+",\n") + } + if this.FieldB != nil { + s = append(s, "FieldB: "+valueToGoStringThetest(this.FieldB, "float32")+",\n") + } + if this.FieldC != nil { + s = append(s, "FieldC: "+fmt.Sprintf("%#v", this.FieldC)+",\n") + } + if this.FieldD != nil { + s = append(s, "FieldD: "+fmt.Sprintf("%#v", this.FieldD)+",\n") + } + if this.FieldE != nil { + s = append(s, "FieldE: "+valueToGoStringThetest(this.FieldE, "uint64")+",\n") + } + if this.FieldF != nil { + s = append(s, "FieldF: "+valueToGoStringThetest(this.FieldF, "int32")+",\n") + } + if this.FieldG != nil { + s = append(s, "FieldG: "+fmt.Sprintf("%#v", this.FieldG)+",\n") + } + if this.FieldH != nil { + s = append(s, "FieldH: "+valueToGoStringThetest(this.FieldH, "bool")+",\n") + } + if this.FieldI != nil { + s = append(s, "FieldI: "+valueToGoStringThetest(this.FieldI, "string")+",\n") + } + if this.FieldJ != nil { + s = append(s, "FieldJ: "+valueToGoStringThetest(this.FieldJ, "byte")+",\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 *CustomNameCustomType) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 8) + s = append(s, "&test.CustomNameCustomType{") + if this.FieldA != nil { + s = append(s, "FieldA: "+valueToGoStringThetest(this.FieldA, "Uuid")+",\n") + } + if this.FieldB != nil { + s = append(s, "FieldB: "+valueToGoStringThetest(this.FieldB, "github_com_gogo_protobuf_test_custom.Uint128")+",\n") + } + if this.FieldC != nil { + s = append(s, "FieldC: "+fmt.Sprintf("%#v", this.FieldC)+",\n") + } + if this.FieldD != nil { + s = append(s, "FieldD: "+fmt.Sprintf("%#v", this.FieldD)+",\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 *CustomNameNinEmbeddedStructUnion) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 7) + s = append(s, "&test.CustomNameNinEmbeddedStructUnion{") + if this.NidOptNative != nil { + s = append(s, "NidOptNative: "+fmt.Sprintf("%#v", this.NidOptNative)+",\n") + } + if this.FieldA != nil { + s = append(s, "FieldA: "+fmt.Sprintf("%#v", this.FieldA)+",\n") + } + if this.FieldB != nil { + s = append(s, "FieldB: "+valueToGoStringThetest(this.FieldB, "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 *CustomNameEnum) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 6) + s = append(s, "&test.CustomNameEnum{") + if this.FieldA != nil { + s = append(s, "FieldA: "+valueToGoStringThetest(this.FieldA, "test.TheTestEnum")+",\n") + } + if this.FieldB != nil { + s = append(s, "FieldB: "+fmt.Sprintf("%#v", this.FieldB)+",\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 *NoExtensionsMap) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&test.NoExtensionsMap{") + if this.Field1 != nil { + s = append(s, "Field1: "+valueToGoStringThetest(this.Field1, "int64")+",\n") + } + if this.XXX_extensions != nil { + s = append(s, "XXX_extensions: "+fmt.Sprintf("%#v", this.XXX_extensions)+",\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 *Unrecognized) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&test.Unrecognized{") + if this.Field1 != nil { + s = append(s, "Field1: "+valueToGoStringThetest(this.Field1, "string")+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *UnrecognizedWithInner) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 6) + s = append(s, "&test.UnrecognizedWithInner{") + if this.Embedded != nil { + s = append(s, "Embedded: "+fmt.Sprintf("%#v", this.Embedded)+",\n") + } + if this.Field2 != nil { + s = append(s, "Field2: "+valueToGoStringThetest(this.Field2, "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 *UnrecognizedWithInner_Inner) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&test.UnrecognizedWithInner_Inner{") + if this.Field1 != nil { + s = append(s, "Field1: "+valueToGoStringThetest(this.Field1, "uint32")+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *UnrecognizedWithEmbed) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 6) + s = append(s, "&test.UnrecognizedWithEmbed{") + s = append(s, "UnrecognizedWithEmbed_Embedded: "+strings.Replace(this.UnrecognizedWithEmbed_Embedded.GoString(), `&`, ``, 1)+",\n") + if this.Field2 != nil { + s = append(s, "Field2: "+valueToGoStringThetest(this.Field2, "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 *UnrecognizedWithEmbed_Embedded) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&test.UnrecognizedWithEmbed_Embedded{") + if this.Field1 != nil { + s = append(s, "Field1: "+valueToGoStringThetest(this.Field1, "uint32")+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *Node) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 6) + s = append(s, "&test.Node{") + if this.Label != nil { + s = append(s, "Label: "+valueToGoStringThetest(this.Label, "string")+",\n") + } + if this.Children != nil { + s = append(s, "Children: "+fmt.Sprintf("%#v", this.Children)+",\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 valueToGoStringThetest(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 extensionToGoStringThetest(e map[int32]github_com_gogo_protobuf_proto.Extension) string { + if e == nil { + return "nil" + } + s := "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 +} +func NewPopulatedNidOptNative(r randyThetest, easy bool) *NidOptNative { + this := &NidOptNative{} + this.Field1 = float64(r.Float64()) + if r.Intn(2) == 0 { + this.Field1 *= -1 + } + this.Field2 = float32(r.Float32()) + if r.Intn(2) == 0 { + this.Field2 *= -1 + } + this.Field3 = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Field3 *= -1 + } + this.Field4 = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Field4 *= -1 + } + this.Field5 = uint32(r.Uint32()) + this.Field6 = uint64(uint64(r.Uint32())) + this.Field7 = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Field7 *= -1 + } + this.Field8 = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Field8 *= -1 + } + this.Field9 = uint32(r.Uint32()) + this.Field10 = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Field10 *= -1 + } + this.Field11 = uint64(uint64(r.Uint32())) + this.Field12 = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Field12 *= -1 + } + this.Field13 = bool(bool(r.Intn(2) == 0)) + this.Field14 = randStringThetest(r) + v1 := r.Intn(100) + this.Field15 = make([]byte, v1) + for i := 0; i < v1; i++ { + this.Field15[i] = byte(r.Intn(256)) + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 16) + } + return this +} + +func NewPopulatedNinOptNative(r randyThetest, easy bool) *NinOptNative { + this := &NinOptNative{} + if r.Intn(10) != 0 { + v2 := float64(r.Float64()) + if r.Intn(2) == 0 { + v2 *= -1 + } + this.Field1 = &v2 + } + if r.Intn(10) != 0 { + v3 := float32(r.Float32()) + if r.Intn(2) == 0 { + v3 *= -1 + } + this.Field2 = &v3 + } + if r.Intn(10) != 0 { + v4 := int32(r.Int31()) + if r.Intn(2) == 0 { + v4 *= -1 + } + this.Field3 = &v4 + } + if r.Intn(10) != 0 { + v5 := int64(r.Int63()) + if r.Intn(2) == 0 { + v5 *= -1 + } + this.Field4 = &v5 + } + if r.Intn(10) != 0 { + v6 := uint32(r.Uint32()) + this.Field5 = &v6 + } + if r.Intn(10) != 0 { + v7 := uint64(uint64(r.Uint32())) + this.Field6 = &v7 + } + if r.Intn(10) != 0 { + v8 := int32(r.Int31()) + if r.Intn(2) == 0 { + v8 *= -1 + } + this.Field7 = &v8 + } + if r.Intn(10) != 0 { + v9 := int64(r.Int63()) + if r.Intn(2) == 0 { + v9 *= -1 + } + this.Field8 = &v9 + } + if r.Intn(10) != 0 { + v10 := uint32(r.Uint32()) + this.Field9 = &v10 + } + if r.Intn(10) != 0 { + v11 := int32(r.Int31()) + if r.Intn(2) == 0 { + v11 *= -1 + } + this.Field10 = &v11 + } + if r.Intn(10) != 0 { + v12 := uint64(uint64(r.Uint32())) + this.Field11 = &v12 + } + if r.Intn(10) != 0 { + v13 := int64(r.Int63()) + if r.Intn(2) == 0 { + v13 *= -1 + } + this.Field12 = &v13 + } + if r.Intn(10) != 0 { + v14 := bool(bool(r.Intn(2) == 0)) + this.Field13 = &v14 + } + if r.Intn(10) != 0 { + v15 := randStringThetest(r) + this.Field14 = &v15 + } + if r.Intn(10) != 0 { + v16 := r.Intn(100) + this.Field15 = make([]byte, v16) + for i := 0; i < v16; i++ { + this.Field15[i] = byte(r.Intn(256)) + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 16) + } + return this +} + +func NewPopulatedNidRepNative(r randyThetest, easy bool) *NidRepNative { + this := &NidRepNative{} + if r.Intn(10) != 0 { + v17 := r.Intn(10) + this.Field1 = make([]float64, v17) + for i := 0; i < v17; i++ { + this.Field1[i] = float64(r.Float64()) + if r.Intn(2) == 0 { + this.Field1[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v18 := r.Intn(10) + this.Field2 = make([]float32, v18) + for i := 0; i < v18; i++ { + this.Field2[i] = float32(r.Float32()) + if r.Intn(2) == 0 { + this.Field2[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v19 := r.Intn(10) + this.Field3 = make([]int32, v19) + for i := 0; i < v19; i++ { + this.Field3[i] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Field3[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v20 := r.Intn(10) + this.Field4 = make([]int64, v20) + for i := 0; i < v20; i++ { + this.Field4[i] = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Field4[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v21 := r.Intn(10) + this.Field5 = make([]uint32, v21) + for i := 0; i < v21; i++ { + this.Field5[i] = uint32(r.Uint32()) + } + } + if r.Intn(10) != 0 { + v22 := r.Intn(10) + this.Field6 = make([]uint64, v22) + for i := 0; i < v22; i++ { + this.Field6[i] = uint64(uint64(r.Uint32())) + } + } + if r.Intn(10) != 0 { + v23 := r.Intn(10) + this.Field7 = make([]int32, v23) + for i := 0; i < v23; i++ { + this.Field7[i] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Field7[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v24 := r.Intn(10) + this.Field8 = make([]int64, v24) + for i := 0; i < v24; i++ { + this.Field8[i] = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Field8[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v25 := r.Intn(10) + this.Field9 = make([]uint32, v25) + for i := 0; i < v25; i++ { + this.Field9[i] = uint32(r.Uint32()) + } + } + if r.Intn(10) != 0 { + v26 := r.Intn(10) + this.Field10 = make([]int32, v26) + for i := 0; i < v26; i++ { + this.Field10[i] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Field10[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v27 := r.Intn(10) + this.Field11 = make([]uint64, v27) + for i := 0; i < v27; i++ { + this.Field11[i] = uint64(uint64(r.Uint32())) + } + } + if r.Intn(10) != 0 { + v28 := r.Intn(10) + this.Field12 = make([]int64, v28) + for i := 0; i < v28; i++ { + this.Field12[i] = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Field12[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v29 := r.Intn(10) + this.Field13 = make([]bool, v29) + for i := 0; i < v29; i++ { + this.Field13[i] = bool(bool(r.Intn(2) == 0)) + } + } + if r.Intn(10) != 0 { + v30 := r.Intn(10) + this.Field14 = make([]string, v30) + for i := 0; i < v30; i++ { + this.Field14[i] = randStringThetest(r) + } + } + if r.Intn(10) != 0 { + v31 := r.Intn(10) + this.Field15 = make([][]byte, v31) + for i := 0; i < v31; i++ { + v32 := r.Intn(100) + this.Field15[i] = make([]byte, v32) + for j := 0; j < v32; j++ { + this.Field15[i][j] = byte(r.Intn(256)) + } + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 16) + } + return this +} + +func NewPopulatedNinRepNative(r randyThetest, easy bool) *NinRepNative { + this := &NinRepNative{} + if r.Intn(10) != 0 { + v33 := r.Intn(10) + this.Field1 = make([]float64, v33) + for i := 0; i < v33; i++ { + this.Field1[i] = float64(r.Float64()) + if r.Intn(2) == 0 { + this.Field1[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v34 := r.Intn(10) + this.Field2 = make([]float32, v34) + for i := 0; i < v34; i++ { + this.Field2[i] = float32(r.Float32()) + if r.Intn(2) == 0 { + this.Field2[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v35 := r.Intn(10) + this.Field3 = make([]int32, v35) + for i := 0; i < v35; i++ { + this.Field3[i] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Field3[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v36 := r.Intn(10) + this.Field4 = make([]int64, v36) + for i := 0; i < v36; i++ { + this.Field4[i] = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Field4[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v37 := r.Intn(10) + this.Field5 = make([]uint32, v37) + for i := 0; i < v37; i++ { + this.Field5[i] = uint32(r.Uint32()) + } + } + if r.Intn(10) != 0 { + v38 := r.Intn(10) + this.Field6 = make([]uint64, v38) + for i := 0; i < v38; i++ { + this.Field6[i] = uint64(uint64(r.Uint32())) + } + } + if r.Intn(10) != 0 { + v39 := r.Intn(10) + this.Field7 = make([]int32, v39) + for i := 0; i < v39; i++ { + this.Field7[i] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Field7[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v40 := r.Intn(10) + this.Field8 = make([]int64, v40) + for i := 0; i < v40; i++ { + this.Field8[i] = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Field8[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v41 := r.Intn(10) + this.Field9 = make([]uint32, v41) + for i := 0; i < v41; i++ { + this.Field9[i] = uint32(r.Uint32()) + } + } + if r.Intn(10) != 0 { + v42 := r.Intn(10) + this.Field10 = make([]int32, v42) + for i := 0; i < v42; i++ { + this.Field10[i] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Field10[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v43 := r.Intn(10) + this.Field11 = make([]uint64, v43) + for i := 0; i < v43; i++ { + this.Field11[i] = uint64(uint64(r.Uint32())) + } + } + if r.Intn(10) != 0 { + v44 := r.Intn(10) + this.Field12 = make([]int64, v44) + for i := 0; i < v44; i++ { + this.Field12[i] = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Field12[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v45 := r.Intn(10) + this.Field13 = make([]bool, v45) + for i := 0; i < v45; i++ { + this.Field13[i] = bool(bool(r.Intn(2) == 0)) + } + } + if r.Intn(10) != 0 { + v46 := r.Intn(10) + this.Field14 = make([]string, v46) + for i := 0; i < v46; i++ { + this.Field14[i] = randStringThetest(r) + } + } + if r.Intn(10) != 0 { + v47 := r.Intn(10) + this.Field15 = make([][]byte, v47) + for i := 0; i < v47; i++ { + v48 := r.Intn(100) + this.Field15[i] = make([]byte, v48) + for j := 0; j < v48; j++ { + this.Field15[i][j] = byte(r.Intn(256)) + } + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 16) + } + return this +} + +func NewPopulatedNidRepPackedNative(r randyThetest, easy bool) *NidRepPackedNative { + this := &NidRepPackedNative{} + if r.Intn(10) != 0 { + v49 := r.Intn(10) + this.Field1 = make([]float64, v49) + for i := 0; i < v49; i++ { + this.Field1[i] = float64(r.Float64()) + if r.Intn(2) == 0 { + this.Field1[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v50 := r.Intn(10) + this.Field2 = make([]float32, v50) + for i := 0; i < v50; i++ { + this.Field2[i] = float32(r.Float32()) + if r.Intn(2) == 0 { + this.Field2[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v51 := r.Intn(10) + this.Field3 = make([]int32, v51) + for i := 0; i < v51; i++ { + this.Field3[i] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Field3[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v52 := r.Intn(10) + this.Field4 = make([]int64, v52) + for i := 0; i < v52; i++ { + this.Field4[i] = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Field4[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v53 := r.Intn(10) + this.Field5 = make([]uint32, v53) + for i := 0; i < v53; i++ { + this.Field5[i] = uint32(r.Uint32()) + } + } + if r.Intn(10) != 0 { + v54 := r.Intn(10) + this.Field6 = make([]uint64, v54) + for i := 0; i < v54; i++ { + this.Field6[i] = uint64(uint64(r.Uint32())) + } + } + if r.Intn(10) != 0 { + v55 := r.Intn(10) + this.Field7 = make([]int32, v55) + for i := 0; i < v55; i++ { + this.Field7[i] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Field7[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v56 := r.Intn(10) + this.Field8 = make([]int64, v56) + for i := 0; i < v56; i++ { + this.Field8[i] = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Field8[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v57 := r.Intn(10) + this.Field9 = make([]uint32, v57) + for i := 0; i < v57; i++ { + this.Field9[i] = uint32(r.Uint32()) + } + } + if r.Intn(10) != 0 { + v58 := r.Intn(10) + this.Field10 = make([]int32, v58) + for i := 0; i < v58; i++ { + this.Field10[i] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Field10[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v59 := r.Intn(10) + this.Field11 = make([]uint64, v59) + for i := 0; i < v59; i++ { + this.Field11[i] = uint64(uint64(r.Uint32())) + } + } + if r.Intn(10) != 0 { + v60 := r.Intn(10) + this.Field12 = make([]int64, v60) + for i := 0; i < v60; i++ { + this.Field12[i] = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Field12[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v61 := r.Intn(10) + this.Field13 = make([]bool, v61) + for i := 0; i < v61; i++ { + this.Field13[i] = bool(bool(r.Intn(2) == 0)) + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 14) + } + return this +} + +func NewPopulatedNinRepPackedNative(r randyThetest, easy bool) *NinRepPackedNative { + this := &NinRepPackedNative{} + if r.Intn(10) != 0 { + v62 := r.Intn(10) + this.Field1 = make([]float64, v62) + for i := 0; i < v62; i++ { + this.Field1[i] = float64(r.Float64()) + if r.Intn(2) == 0 { + this.Field1[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v63 := r.Intn(10) + this.Field2 = make([]float32, v63) + for i := 0; i < v63; i++ { + this.Field2[i] = float32(r.Float32()) + if r.Intn(2) == 0 { + this.Field2[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v64 := r.Intn(10) + this.Field3 = make([]int32, v64) + for i := 0; i < v64; i++ { + this.Field3[i] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Field3[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v65 := r.Intn(10) + this.Field4 = make([]int64, v65) + for i := 0; i < v65; i++ { + this.Field4[i] = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Field4[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v66 := r.Intn(10) + this.Field5 = make([]uint32, v66) + for i := 0; i < v66; i++ { + this.Field5[i] = uint32(r.Uint32()) + } + } + if r.Intn(10) != 0 { + v67 := r.Intn(10) + this.Field6 = make([]uint64, v67) + for i := 0; i < v67; i++ { + this.Field6[i] = uint64(uint64(r.Uint32())) + } + } + if r.Intn(10) != 0 { + v68 := r.Intn(10) + this.Field7 = make([]int32, v68) + for i := 0; i < v68; i++ { + this.Field7[i] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Field7[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v69 := r.Intn(10) + this.Field8 = make([]int64, v69) + for i := 0; i < v69; i++ { + this.Field8[i] = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Field8[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v70 := r.Intn(10) + this.Field9 = make([]uint32, v70) + for i := 0; i < v70; i++ { + this.Field9[i] = uint32(r.Uint32()) + } + } + if r.Intn(10) != 0 { + v71 := r.Intn(10) + this.Field10 = make([]int32, v71) + for i := 0; i < v71; i++ { + this.Field10[i] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Field10[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v72 := r.Intn(10) + this.Field11 = make([]uint64, v72) + for i := 0; i < v72; i++ { + this.Field11[i] = uint64(uint64(r.Uint32())) + } + } + if r.Intn(10) != 0 { + v73 := r.Intn(10) + this.Field12 = make([]int64, v73) + for i := 0; i < v73; i++ { + this.Field12[i] = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Field12[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v74 := r.Intn(10) + this.Field13 = make([]bool, v74) + for i := 0; i < v74; i++ { + this.Field13[i] = bool(bool(r.Intn(2) == 0)) + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 14) + } + return this +} + +func NewPopulatedNidOptStruct(r randyThetest, easy bool) *NidOptStruct { + this := &NidOptStruct{} + this.Field1 = float64(r.Float64()) + if r.Intn(2) == 0 { + this.Field1 *= -1 + } + this.Field2 = float32(r.Float32()) + if r.Intn(2) == 0 { + this.Field2 *= -1 + } + v75 := NewPopulatedNidOptNative(r, easy) + this.Field3 = *v75 + v76 := NewPopulatedNinOptNative(r, easy) + this.Field4 = *v76 + this.Field6 = uint64(uint64(r.Uint32())) + this.Field7 = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Field7 *= -1 + } + v77 := NewPopulatedNidOptNative(r, easy) + this.Field8 = *v77 + this.Field13 = bool(bool(r.Intn(2) == 0)) + this.Field14 = randStringThetest(r) + v78 := r.Intn(100) + this.Field15 = make([]byte, v78) + for i := 0; i < v78; i++ { + this.Field15[i] = byte(r.Intn(256)) + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 16) + } + return this +} + +func NewPopulatedNinOptStruct(r randyThetest, easy bool) *NinOptStruct { + this := &NinOptStruct{} + if r.Intn(10) != 0 { + v79 := float64(r.Float64()) + if r.Intn(2) == 0 { + v79 *= -1 + } + this.Field1 = &v79 + } + if r.Intn(10) != 0 { + v80 := float32(r.Float32()) + if r.Intn(2) == 0 { + v80 *= -1 + } + this.Field2 = &v80 + } + if r.Intn(10) != 0 { + this.Field3 = NewPopulatedNidOptNative(r, easy) + } + if r.Intn(10) != 0 { + this.Field4 = NewPopulatedNinOptNative(r, easy) + } + if r.Intn(10) != 0 { + v81 := uint64(uint64(r.Uint32())) + this.Field6 = &v81 + } + if r.Intn(10) != 0 { + v82 := int32(r.Int31()) + if r.Intn(2) == 0 { + v82 *= -1 + } + this.Field7 = &v82 + } + if r.Intn(10) != 0 { + this.Field8 = NewPopulatedNidOptNative(r, easy) + } + if r.Intn(10) != 0 { + v83 := bool(bool(r.Intn(2) == 0)) + this.Field13 = &v83 + } + if r.Intn(10) != 0 { + v84 := randStringThetest(r) + this.Field14 = &v84 + } + if r.Intn(10) != 0 { + v85 := r.Intn(100) + this.Field15 = make([]byte, v85) + for i := 0; i < v85; i++ { + this.Field15[i] = byte(r.Intn(256)) + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 16) + } + return this +} + +func NewPopulatedNidRepStruct(r randyThetest, easy bool) *NidRepStruct { + this := &NidRepStruct{} + if r.Intn(10) != 0 { + v86 := r.Intn(10) + this.Field1 = make([]float64, v86) + for i := 0; i < v86; i++ { + this.Field1[i] = float64(r.Float64()) + if r.Intn(2) == 0 { + this.Field1[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v87 := r.Intn(10) + this.Field2 = make([]float32, v87) + for i := 0; i < v87; i++ { + this.Field2[i] = float32(r.Float32()) + if r.Intn(2) == 0 { + this.Field2[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v88 := r.Intn(5) + this.Field3 = make([]NidOptNative, v88) + for i := 0; i < v88; i++ { + v89 := NewPopulatedNidOptNative(r, easy) + this.Field3[i] = *v89 + } + } + if r.Intn(10) != 0 { + v90 := r.Intn(5) + this.Field4 = make([]NinOptNative, v90) + for i := 0; i < v90; i++ { + v91 := NewPopulatedNinOptNative(r, easy) + this.Field4[i] = *v91 + } + } + if r.Intn(10) != 0 { + v92 := r.Intn(10) + this.Field6 = make([]uint64, v92) + for i := 0; i < v92; i++ { + this.Field6[i] = uint64(uint64(r.Uint32())) + } + } + if r.Intn(10) != 0 { + v93 := r.Intn(10) + this.Field7 = make([]int32, v93) + for i := 0; i < v93; i++ { + this.Field7[i] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Field7[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v94 := r.Intn(5) + this.Field8 = make([]NidOptNative, v94) + for i := 0; i < v94; i++ { + v95 := NewPopulatedNidOptNative(r, easy) + this.Field8[i] = *v95 + } + } + if r.Intn(10) != 0 { + v96 := r.Intn(10) + this.Field13 = make([]bool, v96) + for i := 0; i < v96; i++ { + this.Field13[i] = bool(bool(r.Intn(2) == 0)) + } + } + if r.Intn(10) != 0 { + v97 := r.Intn(10) + this.Field14 = make([]string, v97) + for i := 0; i < v97; i++ { + this.Field14[i] = randStringThetest(r) + } + } + if r.Intn(10) != 0 { + v98 := r.Intn(10) + this.Field15 = make([][]byte, v98) + for i := 0; i < v98; i++ { + v99 := r.Intn(100) + this.Field15[i] = make([]byte, v99) + for j := 0; j < v99; j++ { + this.Field15[i][j] = byte(r.Intn(256)) + } + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 16) + } + return this +} + +func NewPopulatedNinRepStruct(r randyThetest, easy bool) *NinRepStruct { + this := &NinRepStruct{} + if r.Intn(10) != 0 { + v100 := r.Intn(10) + this.Field1 = make([]float64, v100) + for i := 0; i < v100; i++ { + this.Field1[i] = float64(r.Float64()) + if r.Intn(2) == 0 { + this.Field1[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v101 := r.Intn(10) + this.Field2 = make([]float32, v101) + for i := 0; i < v101; i++ { + this.Field2[i] = float32(r.Float32()) + if r.Intn(2) == 0 { + this.Field2[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v102 := r.Intn(5) + this.Field3 = make([]*NidOptNative, v102) + for i := 0; i < v102; i++ { + this.Field3[i] = NewPopulatedNidOptNative(r, easy) + } + } + if r.Intn(10) != 0 { + v103 := r.Intn(5) + this.Field4 = make([]*NinOptNative, v103) + for i := 0; i < v103; i++ { + this.Field4[i] = NewPopulatedNinOptNative(r, easy) + } + } + if r.Intn(10) != 0 { + v104 := r.Intn(10) + this.Field6 = make([]uint64, v104) + for i := 0; i < v104; i++ { + this.Field6[i] = uint64(uint64(r.Uint32())) + } + } + if r.Intn(10) != 0 { + v105 := r.Intn(10) + this.Field7 = make([]int32, v105) + for i := 0; i < v105; i++ { + this.Field7[i] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Field7[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v106 := r.Intn(5) + this.Field8 = make([]*NidOptNative, v106) + for i := 0; i < v106; i++ { + this.Field8[i] = NewPopulatedNidOptNative(r, easy) + } + } + if r.Intn(10) != 0 { + v107 := r.Intn(10) + this.Field13 = make([]bool, v107) + for i := 0; i < v107; i++ { + this.Field13[i] = bool(bool(r.Intn(2) == 0)) + } + } + if r.Intn(10) != 0 { + v108 := r.Intn(10) + this.Field14 = make([]string, v108) + for i := 0; i < v108; i++ { + this.Field14[i] = randStringThetest(r) + } + } + if r.Intn(10) != 0 { + v109 := r.Intn(10) + this.Field15 = make([][]byte, v109) + for i := 0; i < v109; i++ { + v110 := r.Intn(100) + this.Field15[i] = make([]byte, v110) + for j := 0; j < v110; j++ { + this.Field15[i][j] = byte(r.Intn(256)) + } + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 16) + } + return this +} + +func NewPopulatedNidEmbeddedStruct(r randyThetest, easy bool) *NidEmbeddedStruct { + this := &NidEmbeddedStruct{} + if r.Intn(10) != 0 { + this.NidOptNative = NewPopulatedNidOptNative(r, easy) + } + v111 := NewPopulatedNidOptNative(r, easy) + this.Field200 = *v111 + this.Field210 = bool(bool(r.Intn(2) == 0)) + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 211) + } + return this +} + +func NewPopulatedNinEmbeddedStruct(r randyThetest, easy bool) *NinEmbeddedStruct { + this := &NinEmbeddedStruct{} + if r.Intn(10) != 0 { + this.NidOptNative = NewPopulatedNidOptNative(r, easy) + } + if r.Intn(10) != 0 { + this.Field200 = NewPopulatedNidOptNative(r, easy) + } + if r.Intn(10) != 0 { + v112 := bool(bool(r.Intn(2) == 0)) + this.Field210 = &v112 + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 211) + } + return this +} + +func NewPopulatedNidNestedStruct(r randyThetest, easy bool) *NidNestedStruct { + this := &NidNestedStruct{} + v113 := NewPopulatedNidOptStruct(r, easy) + this.Field1 = *v113 + if r.Intn(10) != 0 { + v114 := r.Intn(5) + this.Field2 = make([]NidRepStruct, v114) + for i := 0; i < v114; i++ { + v115 := NewPopulatedNidRepStruct(r, easy) + this.Field2[i] = *v115 + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 3) + } + return this +} + +func NewPopulatedNinNestedStruct(r randyThetest, easy bool) *NinNestedStruct { + this := &NinNestedStruct{} + if r.Intn(10) != 0 { + this.Field1 = NewPopulatedNinOptStruct(r, easy) + } + if r.Intn(10) != 0 { + v116 := r.Intn(5) + this.Field2 = make([]*NinRepStruct, v116) + for i := 0; i < v116; i++ { + this.Field2[i] = NewPopulatedNinRepStruct(r, easy) + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 3) + } + return this +} + +func NewPopulatedNidOptCustom(r randyThetest, easy bool) *NidOptCustom { + this := &NidOptCustom{} + v117 := NewPopulatedUuid(r) + this.Id = *v117 + v118 := github_com_gogo_protobuf_test_custom.NewPopulatedUint128(r) + this.Value = *v118 + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 3) + } + return this +} + +func NewPopulatedCustomDash(r randyThetest, easy bool) *CustomDash { + this := &CustomDash{} + if r.Intn(10) != 0 { + this.Value = github_com_gogo_protobuf_test_custom_dash_type.NewPopulatedBytes(r) + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 2) + } + return this +} + +func NewPopulatedNinOptCustom(r randyThetest, easy bool) *NinOptCustom { + this := &NinOptCustom{} + if r.Intn(10) != 0 { + this.Id = NewPopulatedUuid(r) + } + if r.Intn(10) != 0 { + this.Value = github_com_gogo_protobuf_test_custom.NewPopulatedUint128(r) + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 3) + } + return this +} + +func NewPopulatedNidRepCustom(r randyThetest, easy bool) *NidRepCustom { + this := &NidRepCustom{} + if r.Intn(10) != 0 { + v119 := r.Intn(10) + this.Id = make([]Uuid, v119) + for i := 0; i < v119; i++ { + v120 := NewPopulatedUuid(r) + this.Id[i] = *v120 + } + } + if r.Intn(10) != 0 { + v121 := r.Intn(10) + this.Value = make([]github_com_gogo_protobuf_test_custom.Uint128, v121) + for i := 0; i < v121; i++ { + v122 := github_com_gogo_protobuf_test_custom.NewPopulatedUint128(r) + this.Value[i] = *v122 + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 3) + } + return this +} + +func NewPopulatedNinRepCustom(r randyThetest, easy bool) *NinRepCustom { + this := &NinRepCustom{} + if r.Intn(10) != 0 { + v123 := r.Intn(10) + this.Id = make([]Uuid, v123) + for i := 0; i < v123; i++ { + v124 := NewPopulatedUuid(r) + this.Id[i] = *v124 + } + } + if r.Intn(10) != 0 { + v125 := r.Intn(10) + this.Value = make([]github_com_gogo_protobuf_test_custom.Uint128, v125) + for i := 0; i < v125; i++ { + v126 := github_com_gogo_protobuf_test_custom.NewPopulatedUint128(r) + this.Value[i] = *v126 + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 3) + } + return this +} + +func NewPopulatedNinOptNativeUnion(r randyThetest, easy bool) *NinOptNativeUnion { + this := &NinOptNativeUnion{} + fieldNum := r.Intn(9) + switch fieldNum { + case 0: + v127 := float64(r.Float64()) + if r.Intn(2) == 0 { + v127 *= -1 + } + this.Field1 = &v127 + case 1: + v128 := float32(r.Float32()) + if r.Intn(2) == 0 { + v128 *= -1 + } + this.Field2 = &v128 + case 2: + v129 := int32(r.Int31()) + if r.Intn(2) == 0 { + v129 *= -1 + } + this.Field3 = &v129 + case 3: + v130 := int64(r.Int63()) + if r.Intn(2) == 0 { + v130 *= -1 + } + this.Field4 = &v130 + case 4: + v131 := uint32(r.Uint32()) + this.Field5 = &v131 + case 5: + v132 := uint64(uint64(r.Uint32())) + this.Field6 = &v132 + case 6: + v133 := bool(bool(r.Intn(2) == 0)) + this.Field13 = &v133 + case 7: + v134 := randStringThetest(r) + this.Field14 = &v134 + case 8: + v135 := r.Intn(100) + this.Field15 = make([]byte, v135) + for i := 0; i < v135; i++ { + this.Field15[i] = byte(r.Intn(256)) + } + } + return this +} + +func NewPopulatedNinOptStructUnion(r randyThetest, easy bool) *NinOptStructUnion { + this := &NinOptStructUnion{} + fieldNum := r.Intn(9) + switch fieldNum { + case 0: + v136 := float64(r.Float64()) + if r.Intn(2) == 0 { + v136 *= -1 + } + this.Field1 = &v136 + case 1: + v137 := float32(r.Float32()) + if r.Intn(2) == 0 { + v137 *= -1 + } + this.Field2 = &v137 + case 2: + this.Field3 = NewPopulatedNidOptNative(r, easy) + case 3: + this.Field4 = NewPopulatedNinOptNative(r, easy) + case 4: + v138 := uint64(uint64(r.Uint32())) + this.Field6 = &v138 + case 5: + v139 := int32(r.Int31()) + if r.Intn(2) == 0 { + v139 *= -1 + } + this.Field7 = &v139 + case 6: + v140 := bool(bool(r.Intn(2) == 0)) + this.Field13 = &v140 + case 7: + v141 := randStringThetest(r) + this.Field14 = &v141 + case 8: + v142 := r.Intn(100) + this.Field15 = make([]byte, v142) + for i := 0; i < v142; i++ { + this.Field15[i] = byte(r.Intn(256)) + } + } + return this +} + +func NewPopulatedNinEmbeddedStructUnion(r randyThetest, easy bool) *NinEmbeddedStructUnion { + this := &NinEmbeddedStructUnion{} + fieldNum := r.Intn(3) + switch fieldNum { + case 0: + this.NidOptNative = NewPopulatedNidOptNative(r, easy) + case 1: + this.Field200 = NewPopulatedNinOptNative(r, easy) + case 2: + v143 := bool(bool(r.Intn(2) == 0)) + this.Field210 = &v143 + } + return this +} + +func NewPopulatedNinNestedStructUnion(r randyThetest, easy bool) *NinNestedStructUnion { + this := &NinNestedStructUnion{} + fieldNum := r.Intn(3) + switch fieldNum { + case 0: + this.Field1 = NewPopulatedNinOptNativeUnion(r, easy) + case 1: + this.Field2 = NewPopulatedNinOptStructUnion(r, easy) + case 2: + this.Field3 = NewPopulatedNinEmbeddedStructUnion(r, easy) + } + return this +} + +func NewPopulatedTree(r randyThetest, easy bool) *Tree { + this := &Tree{} + fieldNum := r.Intn(102) + switch fieldNum { + case 0: + this.Or = NewPopulatedOrBranch(r, easy) + case 1: + this.And = NewPopulatedAndBranch(r, easy) + case 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101: + this.Leaf = NewPopulatedLeaf(r, easy) + } + return this +} + +func NewPopulatedOrBranch(r randyThetest, easy bool) *OrBranch { + this := &OrBranch{} + v144 := NewPopulatedTree(r, easy) + this.Left = *v144 + v145 := NewPopulatedTree(r, easy) + this.Right = *v145 + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 3) + } + return this +} + +func NewPopulatedAndBranch(r randyThetest, easy bool) *AndBranch { + this := &AndBranch{} + v146 := NewPopulatedTree(r, easy) + this.Left = *v146 + v147 := NewPopulatedTree(r, easy) + this.Right = *v147 + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 3) + } + return this +} + +func NewPopulatedLeaf(r randyThetest, easy bool) *Leaf { + this := &Leaf{} + this.Value = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Value *= -1 + } + this.StrValue = randStringThetest(r) + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 3) + } + return this +} + +func NewPopulatedDeepTree(r randyThetest, easy bool) *DeepTree { + this := &DeepTree{} + fieldNum := r.Intn(102) + switch fieldNum { + case 0: + this.Down = NewPopulatedADeepBranch(r, easy) + case 1: + this.And = NewPopulatedAndDeepBranch(r, easy) + case 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101: + this.Leaf = NewPopulatedDeepLeaf(r, easy) + } + return this +} + +func NewPopulatedADeepBranch(r randyThetest, easy bool) *ADeepBranch { + this := &ADeepBranch{} + v148 := NewPopulatedDeepTree(r, easy) + this.Down = *v148 + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 3) + } + return this +} + +func NewPopulatedAndDeepBranch(r randyThetest, easy bool) *AndDeepBranch { + this := &AndDeepBranch{} + v149 := NewPopulatedDeepTree(r, easy) + this.Left = *v149 + v150 := NewPopulatedDeepTree(r, easy) + this.Right = *v150 + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 3) + } + return this +} + +func NewPopulatedDeepLeaf(r randyThetest, easy bool) *DeepLeaf { + this := &DeepLeaf{} + v151 := NewPopulatedTree(r, easy) + this.Tree = *v151 + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 2) + } + return this +} + +func NewPopulatedNil(r randyThetest, easy bool) *Nil { + this := &Nil{} + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 1) + } + return this +} + +func NewPopulatedNidOptEnum(r randyThetest, easy bool) *NidOptEnum { + this := &NidOptEnum{} + this.Field1 = TheTestEnum([]int32{0, 1, 2}[r.Intn(3)]) + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 2) + } + return this +} + +func NewPopulatedNinOptEnum(r randyThetest, easy bool) *NinOptEnum { + this := &NinOptEnum{} + if r.Intn(10) != 0 { + v152 := TheTestEnum([]int32{0, 1, 2}[r.Intn(3)]) + this.Field1 = &v152 + } + if r.Intn(10) != 0 { + v153 := YetAnotherTestEnum([]int32{0, 1}[r.Intn(2)]) + this.Field2 = &v153 + } + if r.Intn(10) != 0 { + v154 := YetYetAnotherTestEnum([]int32{0, 1}[r.Intn(2)]) + this.Field3 = &v154 + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 4) + } + return this +} + +func NewPopulatedNidRepEnum(r randyThetest, easy bool) *NidRepEnum { + this := &NidRepEnum{} + if r.Intn(10) != 0 { + v155 := r.Intn(10) + this.Field1 = make([]TheTestEnum, v155) + for i := 0; i < v155; i++ { + this.Field1[i] = TheTestEnum([]int32{0, 1, 2}[r.Intn(3)]) + } + } + if r.Intn(10) != 0 { + v156 := r.Intn(10) + this.Field2 = make([]YetAnotherTestEnum, v156) + for i := 0; i < v156; i++ { + this.Field2[i] = YetAnotherTestEnum([]int32{0, 1}[r.Intn(2)]) + } + } + if r.Intn(10) != 0 { + v157 := r.Intn(10) + this.Field3 = make([]YetYetAnotherTestEnum, v157) + for i := 0; i < v157; i++ { + this.Field3[i] = YetYetAnotherTestEnum([]int32{0, 1}[r.Intn(2)]) + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 4) + } + return this +} + +func NewPopulatedNinRepEnum(r randyThetest, easy bool) *NinRepEnum { + this := &NinRepEnum{} + if r.Intn(10) != 0 { + v158 := r.Intn(10) + this.Field1 = make([]TheTestEnum, v158) + for i := 0; i < v158; i++ { + this.Field1[i] = TheTestEnum([]int32{0, 1, 2}[r.Intn(3)]) + } + } + if r.Intn(10) != 0 { + v159 := r.Intn(10) + this.Field2 = make([]YetAnotherTestEnum, v159) + for i := 0; i < v159; i++ { + this.Field2[i] = YetAnotherTestEnum([]int32{0, 1}[r.Intn(2)]) + } + } + if r.Intn(10) != 0 { + v160 := r.Intn(10) + this.Field3 = make([]YetYetAnotherTestEnum, v160) + for i := 0; i < v160; i++ { + this.Field3[i] = YetYetAnotherTestEnum([]int32{0, 1}[r.Intn(2)]) + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 4) + } + return this +} + +func NewPopulatedNinOptEnumDefault(r randyThetest, easy bool) *NinOptEnumDefault { + this := &NinOptEnumDefault{} + if r.Intn(10) != 0 { + v161 := TheTestEnum([]int32{0, 1, 2}[r.Intn(3)]) + this.Field1 = &v161 + } + if r.Intn(10) != 0 { + v162 := YetAnotherTestEnum([]int32{0, 1}[r.Intn(2)]) + this.Field2 = &v162 + } + if r.Intn(10) != 0 { + v163 := YetYetAnotherTestEnum([]int32{0, 1}[r.Intn(2)]) + this.Field3 = &v163 + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 4) + } + return this +} + +func NewPopulatedAnotherNinOptEnum(r randyThetest, easy bool) *AnotherNinOptEnum { + this := &AnotherNinOptEnum{} + if r.Intn(10) != 0 { + v164 := AnotherTestEnum([]int32{10, 11}[r.Intn(2)]) + this.Field1 = &v164 + } + if r.Intn(10) != 0 { + v165 := YetAnotherTestEnum([]int32{0, 1}[r.Intn(2)]) + this.Field2 = &v165 + } + if r.Intn(10) != 0 { + v166 := YetYetAnotherTestEnum([]int32{0, 1}[r.Intn(2)]) + this.Field3 = &v166 + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 4) + } + return this +} + +func NewPopulatedAnotherNinOptEnumDefault(r randyThetest, easy bool) *AnotherNinOptEnumDefault { + this := &AnotherNinOptEnumDefault{} + if r.Intn(10) != 0 { + v167 := AnotherTestEnum([]int32{10, 11}[r.Intn(2)]) + this.Field1 = &v167 + } + if r.Intn(10) != 0 { + v168 := YetAnotherTestEnum([]int32{0, 1}[r.Intn(2)]) + this.Field2 = &v168 + } + if r.Intn(10) != 0 { + v169 := YetYetAnotherTestEnum([]int32{0, 1}[r.Intn(2)]) + this.Field3 = &v169 + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 4) + } + return this +} + +func NewPopulatedTimer(r randyThetest, easy bool) *Timer { + this := &Timer{} + this.Time1 = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Time1 *= -1 + } + this.Time2 = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Time2 *= -1 + } + v170 := r.Intn(100) + this.Data = make([]byte, v170) + for i := 0; i < v170; i++ { + this.Data[i] = byte(r.Intn(256)) + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 4) + } + return this +} + +func NewPopulatedMyExtendable(r randyThetest, easy bool) *MyExtendable { + this := &MyExtendable{} + if r.Intn(10) != 0 { + v171 := int64(r.Int63()) + if r.Intn(2) == 0 { + v171 *= -1 + } + this.Field1 = &v171 + } + if !easy && r.Intn(10) != 0 { + l := r.Intn(5) + for i := 0; i < l; i++ { + fieldNumber := r.Intn(100) + 100 + wire := r.Intn(4) + if wire == 3 { + wire = 5 + } + data := randFieldThetest(nil, r, fieldNumber, wire) + github_com_gogo_protobuf_proto.SetRawExtension(this, int32(fieldNumber), data) + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 201) + } + return this +} + +func NewPopulatedOtherExtenable(r randyThetest, easy bool) *OtherExtenable { + this := &OtherExtenable{} + if r.Intn(10) != 0 { + v172 := int64(r.Int63()) + if r.Intn(2) == 0 { + v172 *= -1 + } + this.Field2 = &v172 + } + if r.Intn(10) != 0 { + v173 := int64(r.Int63()) + if r.Intn(2) == 0 { + v173 *= -1 + } + this.Field13 = &v173 + } + if r.Intn(10) != 0 { + this.M = NewPopulatedMyExtendable(r, easy) + } + if !easy && r.Intn(10) != 0 { + l := r.Intn(5) + for i := 0; i < l; i++ { + eIndex := r.Intn(2) + fieldNumber := 0 + switch eIndex { + case 0: + fieldNumber = r.Intn(3) + 14 + case 1: + fieldNumber = r.Intn(3) + 10 + } + wire := r.Intn(4) + if wire == 3 { + wire = 5 + } + data := randFieldThetest(nil, r, fieldNumber, wire) + github_com_gogo_protobuf_proto.SetRawExtension(this, int32(fieldNumber), data) + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 18) + } + return this +} + +func NewPopulatedNestedDefinition(r randyThetest, easy bool) *NestedDefinition { + this := &NestedDefinition{} + if r.Intn(10) != 0 { + v174 := int64(r.Int63()) + if r.Intn(2) == 0 { + v174 *= -1 + } + this.Field1 = &v174 + } + if r.Intn(10) != 0 { + v175 := NestedDefinition_NestedEnum([]int32{1}[r.Intn(1)]) + this.EnumField = &v175 + } + if r.Intn(10) != 0 { + this.NNM = NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(r, easy) + } + if r.Intn(10) != 0 { + this.NM = NewPopulatedNestedDefinition_NestedMessage(r, easy) + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 5) + } + return this +} + +func NewPopulatedNestedDefinition_NestedMessage(r randyThetest, easy bool) *NestedDefinition_NestedMessage { + this := &NestedDefinition_NestedMessage{} + if r.Intn(10) != 0 { + v176 := uint64(uint64(r.Uint32())) + this.NestedField1 = &v176 + } + if r.Intn(10) != 0 { + this.NNM = NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(r, easy) + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 3) + } + return this +} + +func NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(r randyThetest, easy bool) *NestedDefinition_NestedMessage_NestedNestedMsg { + this := &NestedDefinition_NestedMessage_NestedNestedMsg{} + if r.Intn(10) != 0 { + v177 := randStringThetest(r) + this.NestedNestedField1 = &v177 + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 11) + } + return this +} + +func NewPopulatedNestedScope(r randyThetest, easy bool) *NestedScope { + this := &NestedScope{} + if r.Intn(10) != 0 { + this.A = NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(r, easy) + } + if r.Intn(10) != 0 { + v178 := NestedDefinition_NestedEnum([]int32{1}[r.Intn(1)]) + this.B = &v178 + } + if r.Intn(10) != 0 { + this.C = NewPopulatedNestedDefinition_NestedMessage(r, easy) + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 4) + } + return this +} + +func NewPopulatedNinOptNativeDefault(r randyThetest, easy bool) *NinOptNativeDefault { + this := &NinOptNativeDefault{} + if r.Intn(10) != 0 { + v179 := float64(r.Float64()) + if r.Intn(2) == 0 { + v179 *= -1 + } + this.Field1 = &v179 + } + if r.Intn(10) != 0 { + v180 := float32(r.Float32()) + if r.Intn(2) == 0 { + v180 *= -1 + } + this.Field2 = &v180 + } + if r.Intn(10) != 0 { + v181 := int32(r.Int31()) + if r.Intn(2) == 0 { + v181 *= -1 + } + this.Field3 = &v181 + } + if r.Intn(10) != 0 { + v182 := int64(r.Int63()) + if r.Intn(2) == 0 { + v182 *= -1 + } + this.Field4 = &v182 + } + if r.Intn(10) != 0 { + v183 := uint32(r.Uint32()) + this.Field5 = &v183 + } + if r.Intn(10) != 0 { + v184 := uint64(uint64(r.Uint32())) + this.Field6 = &v184 + } + if r.Intn(10) != 0 { + v185 := int32(r.Int31()) + if r.Intn(2) == 0 { + v185 *= -1 + } + this.Field7 = &v185 + } + if r.Intn(10) != 0 { + v186 := int64(r.Int63()) + if r.Intn(2) == 0 { + v186 *= -1 + } + this.Field8 = &v186 + } + if r.Intn(10) != 0 { + v187 := uint32(r.Uint32()) + this.Field9 = &v187 + } + if r.Intn(10) != 0 { + v188 := int32(r.Int31()) + if r.Intn(2) == 0 { + v188 *= -1 + } + this.Field10 = &v188 + } + if r.Intn(10) != 0 { + v189 := uint64(uint64(r.Uint32())) + this.Field11 = &v189 + } + if r.Intn(10) != 0 { + v190 := int64(r.Int63()) + if r.Intn(2) == 0 { + v190 *= -1 + } + this.Field12 = &v190 + } + if r.Intn(10) != 0 { + v191 := bool(bool(r.Intn(2) == 0)) + this.Field13 = &v191 + } + if r.Intn(10) != 0 { + v192 := randStringThetest(r) + this.Field14 = &v192 + } + if r.Intn(10) != 0 { + v193 := r.Intn(100) + this.Field15 = make([]byte, v193) + for i := 0; i < v193; i++ { + this.Field15[i] = byte(r.Intn(256)) + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 16) + } + return this +} + +func NewPopulatedCustomContainer(r randyThetest, easy bool) *CustomContainer { + this := &CustomContainer{} + v194 := NewPopulatedNidOptCustom(r, easy) + this.CustomStruct = *v194 + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 2) + } + return this +} + +func NewPopulatedCustomNameNidOptNative(r randyThetest, easy bool) *CustomNameNidOptNative { + this := &CustomNameNidOptNative{} + this.FieldA = float64(r.Float64()) + if r.Intn(2) == 0 { + this.FieldA *= -1 + } + this.FieldB = float32(r.Float32()) + if r.Intn(2) == 0 { + this.FieldB *= -1 + } + this.FieldC = int32(r.Int31()) + if r.Intn(2) == 0 { + this.FieldC *= -1 + } + this.FieldD = int64(r.Int63()) + if r.Intn(2) == 0 { + this.FieldD *= -1 + } + this.FieldE = uint32(r.Uint32()) + this.FieldF = uint64(uint64(r.Uint32())) + this.FieldG = int32(r.Int31()) + if r.Intn(2) == 0 { + this.FieldG *= -1 + } + this.FieldH = int64(r.Int63()) + if r.Intn(2) == 0 { + this.FieldH *= -1 + } + this.FieldI = uint32(r.Uint32()) + this.FieldJ = int32(r.Int31()) + if r.Intn(2) == 0 { + this.FieldJ *= -1 + } + this.FieldK = uint64(uint64(r.Uint32())) + this.FieldL = int64(r.Int63()) + if r.Intn(2) == 0 { + this.FieldL *= -1 + } + this.FieldM = bool(bool(r.Intn(2) == 0)) + this.FieldN = randStringThetest(r) + v195 := r.Intn(100) + this.FieldO = make([]byte, v195) + for i := 0; i < v195; i++ { + this.FieldO[i] = byte(r.Intn(256)) + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 16) + } + return this +} + +func NewPopulatedCustomNameNinOptNative(r randyThetest, easy bool) *CustomNameNinOptNative { + this := &CustomNameNinOptNative{} + if r.Intn(10) != 0 { + v196 := float64(r.Float64()) + if r.Intn(2) == 0 { + v196 *= -1 + } + this.FieldA = &v196 + } + if r.Intn(10) != 0 { + v197 := float32(r.Float32()) + if r.Intn(2) == 0 { + v197 *= -1 + } + this.FieldB = &v197 + } + if r.Intn(10) != 0 { + v198 := int32(r.Int31()) + if r.Intn(2) == 0 { + v198 *= -1 + } + this.FieldC = &v198 + } + if r.Intn(10) != 0 { + v199 := int64(r.Int63()) + if r.Intn(2) == 0 { + v199 *= -1 + } + this.FieldD = &v199 + } + if r.Intn(10) != 0 { + v200 := uint32(r.Uint32()) + this.FieldE = &v200 + } + if r.Intn(10) != 0 { + v201 := uint64(uint64(r.Uint32())) + this.FieldF = &v201 + } + if r.Intn(10) != 0 { + v202 := int32(r.Int31()) + if r.Intn(2) == 0 { + v202 *= -1 + } + this.FieldG = &v202 + } + if r.Intn(10) != 0 { + v203 := int64(r.Int63()) + if r.Intn(2) == 0 { + v203 *= -1 + } + this.FieldH = &v203 + } + if r.Intn(10) != 0 { + v204 := uint32(r.Uint32()) + this.FieldI = &v204 + } + if r.Intn(10) != 0 { + v205 := int32(r.Int31()) + if r.Intn(2) == 0 { + v205 *= -1 + } + this.FieldJ = &v205 + } + if r.Intn(10) != 0 { + v206 := uint64(uint64(r.Uint32())) + this.FieldK = &v206 + } + if r.Intn(10) != 0 { + v207 := int64(r.Int63()) + if r.Intn(2) == 0 { + v207 *= -1 + } + this.FielL = &v207 + } + if r.Intn(10) != 0 { + v208 := bool(bool(r.Intn(2) == 0)) + this.FieldM = &v208 + } + if r.Intn(10) != 0 { + v209 := randStringThetest(r) + this.FieldN = &v209 + } + if r.Intn(10) != 0 { + v210 := r.Intn(100) + this.FieldO = make([]byte, v210) + for i := 0; i < v210; i++ { + this.FieldO[i] = byte(r.Intn(256)) + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 16) + } + return this +} + +func NewPopulatedCustomNameNinRepNative(r randyThetest, easy bool) *CustomNameNinRepNative { + this := &CustomNameNinRepNative{} + if r.Intn(10) != 0 { + v211 := r.Intn(10) + this.FieldA = make([]float64, v211) + for i := 0; i < v211; i++ { + this.FieldA[i] = float64(r.Float64()) + if r.Intn(2) == 0 { + this.FieldA[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v212 := r.Intn(10) + this.FieldB = make([]float32, v212) + for i := 0; i < v212; i++ { + this.FieldB[i] = float32(r.Float32()) + if r.Intn(2) == 0 { + this.FieldB[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v213 := r.Intn(10) + this.FieldC = make([]int32, v213) + for i := 0; i < v213; i++ { + this.FieldC[i] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.FieldC[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v214 := r.Intn(10) + this.FieldD = make([]int64, v214) + for i := 0; i < v214; i++ { + this.FieldD[i] = int64(r.Int63()) + if r.Intn(2) == 0 { + this.FieldD[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v215 := r.Intn(10) + this.FieldE = make([]uint32, v215) + for i := 0; i < v215; i++ { + this.FieldE[i] = uint32(r.Uint32()) + } + } + if r.Intn(10) != 0 { + v216 := r.Intn(10) + this.FieldF = make([]uint64, v216) + for i := 0; i < v216; i++ { + this.FieldF[i] = uint64(uint64(r.Uint32())) + } + } + if r.Intn(10) != 0 { + v217 := r.Intn(10) + this.FieldG = make([]int32, v217) + for i := 0; i < v217; i++ { + this.FieldG[i] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.FieldG[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v218 := r.Intn(10) + this.FieldH = make([]int64, v218) + for i := 0; i < v218; i++ { + this.FieldH[i] = int64(r.Int63()) + if r.Intn(2) == 0 { + this.FieldH[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v219 := r.Intn(10) + this.FieldI = make([]uint32, v219) + for i := 0; i < v219; i++ { + this.FieldI[i] = uint32(r.Uint32()) + } + } + if r.Intn(10) != 0 { + v220 := r.Intn(10) + this.FieldJ = make([]int32, v220) + for i := 0; i < v220; i++ { + this.FieldJ[i] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.FieldJ[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v221 := r.Intn(10) + this.FieldK = make([]uint64, v221) + for i := 0; i < v221; i++ { + this.FieldK[i] = uint64(uint64(r.Uint32())) + } + } + if r.Intn(10) != 0 { + v222 := r.Intn(10) + this.FieldL = make([]int64, v222) + for i := 0; i < v222; i++ { + this.FieldL[i] = int64(r.Int63()) + if r.Intn(2) == 0 { + this.FieldL[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v223 := r.Intn(10) + this.FieldM = make([]bool, v223) + for i := 0; i < v223; i++ { + this.FieldM[i] = bool(bool(r.Intn(2) == 0)) + } + } + if r.Intn(10) != 0 { + v224 := r.Intn(10) + this.FieldN = make([]string, v224) + for i := 0; i < v224; i++ { + this.FieldN[i] = randStringThetest(r) + } + } + if r.Intn(10) != 0 { + v225 := r.Intn(10) + this.FieldO = make([][]byte, v225) + for i := 0; i < v225; i++ { + v226 := r.Intn(100) + this.FieldO[i] = make([]byte, v226) + for j := 0; j < v226; j++ { + this.FieldO[i][j] = byte(r.Intn(256)) + } + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 16) + } + return this +} + +func NewPopulatedCustomNameNinStruct(r randyThetest, easy bool) *CustomNameNinStruct { + this := &CustomNameNinStruct{} + if r.Intn(10) != 0 { + v227 := float64(r.Float64()) + if r.Intn(2) == 0 { + v227 *= -1 + } + this.FieldA = &v227 + } + if r.Intn(10) != 0 { + v228 := float32(r.Float32()) + if r.Intn(2) == 0 { + v228 *= -1 + } + this.FieldB = &v228 + } + if r.Intn(10) != 0 { + this.FieldC = NewPopulatedNidOptNative(r, easy) + } + if r.Intn(10) != 0 { + v229 := r.Intn(5) + this.FieldD = make([]*NinOptNative, v229) + for i := 0; i < v229; i++ { + this.FieldD[i] = NewPopulatedNinOptNative(r, easy) + } + } + if r.Intn(10) != 0 { + v230 := uint64(uint64(r.Uint32())) + this.FieldE = &v230 + } + if r.Intn(10) != 0 { + v231 := int32(r.Int31()) + if r.Intn(2) == 0 { + v231 *= -1 + } + this.FieldF = &v231 + } + if r.Intn(10) != 0 { + this.FieldG = NewPopulatedNidOptNative(r, easy) + } + if r.Intn(10) != 0 { + v232 := bool(bool(r.Intn(2) == 0)) + this.FieldH = &v232 + } + if r.Intn(10) != 0 { + v233 := randStringThetest(r) + this.FieldI = &v233 + } + if r.Intn(10) != 0 { + v234 := r.Intn(100) + this.FieldJ = make([]byte, v234) + for i := 0; i < v234; i++ { + this.FieldJ[i] = byte(r.Intn(256)) + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 16) + } + return this +} + +func NewPopulatedCustomNameCustomType(r randyThetest, easy bool) *CustomNameCustomType { + this := &CustomNameCustomType{} + if r.Intn(10) != 0 { + this.FieldA = NewPopulatedUuid(r) + } + if r.Intn(10) != 0 { + this.FieldB = github_com_gogo_protobuf_test_custom.NewPopulatedUint128(r) + } + if r.Intn(10) != 0 { + v235 := r.Intn(10) + this.FieldC = make([]Uuid, v235) + for i := 0; i < v235; i++ { + v236 := NewPopulatedUuid(r) + this.FieldC[i] = *v236 + } + } + if r.Intn(10) != 0 { + v237 := r.Intn(10) + this.FieldD = make([]github_com_gogo_protobuf_test_custom.Uint128, v237) + for i := 0; i < v237; i++ { + v238 := github_com_gogo_protobuf_test_custom.NewPopulatedUint128(r) + this.FieldD[i] = *v238 + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 5) + } + return this +} + +func NewPopulatedCustomNameNinEmbeddedStructUnion(r randyThetest, easy bool) *CustomNameNinEmbeddedStructUnion { + this := &CustomNameNinEmbeddedStructUnion{} + fieldNum := r.Intn(3) + switch fieldNum { + case 0: + this.NidOptNative = NewPopulatedNidOptNative(r, easy) + case 1: + this.FieldA = NewPopulatedNinOptNative(r, easy) + case 2: + v239 := bool(bool(r.Intn(2) == 0)) + this.FieldB = &v239 + } + return this +} + +func NewPopulatedCustomNameEnum(r randyThetest, easy bool) *CustomNameEnum { + this := &CustomNameEnum{} + if r.Intn(10) != 0 { + v240 := TheTestEnum([]int32{0, 1, 2}[r.Intn(3)]) + this.FieldA = &v240 + } + if r.Intn(10) != 0 { + v241 := r.Intn(10) + this.FieldB = make([]TheTestEnum, v241) + for i := 0; i < v241; i++ { + this.FieldB[i] = TheTestEnum([]int32{0, 1, 2}[r.Intn(3)]) + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 3) + } + return this +} + +func NewPopulatedNoExtensionsMap(r randyThetest, easy bool) *NoExtensionsMap { + this := &NoExtensionsMap{} + if r.Intn(10) != 0 { + v242 := int64(r.Int63()) + if r.Intn(2) == 0 { + v242 *= -1 + } + this.Field1 = &v242 + } + if !easy && r.Intn(10) != 0 { + l := r.Intn(5) + for i := 0; i < l; i++ { + fieldNumber := r.Intn(100) + 100 + wire := r.Intn(4) + if wire == 3 { + wire = 5 + } + data := randFieldThetest(nil, r, fieldNumber, wire) + github_com_gogo_protobuf_proto.SetRawExtension(this, int32(fieldNumber), data) + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 201) + } + return this +} + +func NewPopulatedUnrecognized(r randyThetest, easy bool) *Unrecognized { + this := &Unrecognized{} + if r.Intn(10) != 0 { + v243 := randStringThetest(r) + this.Field1 = &v243 + } + if !easy && r.Intn(10) != 0 { + } + return this +} + +func NewPopulatedUnrecognizedWithInner(r randyThetest, easy bool) *UnrecognizedWithInner { + this := &UnrecognizedWithInner{} + if r.Intn(10) != 0 { + v244 := r.Intn(5) + this.Embedded = make([]*UnrecognizedWithInner_Inner, v244) + for i := 0; i < v244; i++ { + this.Embedded[i] = NewPopulatedUnrecognizedWithInner_Inner(r, easy) + } + } + if r.Intn(10) != 0 { + v245 := randStringThetest(r) + this.Field2 = &v245 + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 3) + } + return this +} + +func NewPopulatedUnrecognizedWithInner_Inner(r randyThetest, easy bool) *UnrecognizedWithInner_Inner { + this := &UnrecognizedWithInner_Inner{} + if r.Intn(10) != 0 { + v246 := uint32(r.Uint32()) + this.Field1 = &v246 + } + if !easy && r.Intn(10) != 0 { + } + return this +} + +func NewPopulatedUnrecognizedWithEmbed(r randyThetest, easy bool) *UnrecognizedWithEmbed { + this := &UnrecognizedWithEmbed{} + v247 := NewPopulatedUnrecognizedWithEmbed_Embedded(r, easy) + this.UnrecognizedWithEmbed_Embedded = *v247 + if r.Intn(10) != 0 { + v248 := randStringThetest(r) + this.Field2 = &v248 + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 3) + } + return this +} + +func NewPopulatedUnrecognizedWithEmbed_Embedded(r randyThetest, easy bool) *UnrecognizedWithEmbed_Embedded { + this := &UnrecognizedWithEmbed_Embedded{} + if r.Intn(10) != 0 { + v249 := uint32(r.Uint32()) + this.Field1 = &v249 + } + if !easy && r.Intn(10) != 0 { + } + return this +} + +func NewPopulatedNode(r randyThetest, easy bool) *Node { + this := &Node{} + if r.Intn(10) != 0 { + v250 := randStringThetest(r) + this.Label = &v250 + } + if r.Intn(10) == 0 { + v251 := r.Intn(5) + this.Children = make([]*Node, v251) + for i := 0; i < v251; i++ { + this.Children[i] = NewPopulatedNode(r, easy) + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 3) + } + return this +} + +type randyThetest interface { + Float32() float32 + Float64() float64 + Int63() int64 + Int31() int32 + Uint32() uint32 + Intn(n int) int +} + +func randUTF8RuneThetest(r randyThetest) 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 randStringThetest(r randyThetest) string { + v252 := r.Intn(100) + tmps := make([]rune, v252) + for i := 0; i < v252; i++ { + tmps[i] = randUTF8RuneThetest(r) + } + return string(tmps) +} +func randUnrecognizedThetest(r randyThetest, 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 = randFieldThetest(data, r, fieldNumber, wire) + } + return data +} +func randFieldThetest(data []byte, r randyThetest, fieldNumber int, wire int) []byte { + key := uint32(fieldNumber)<<3 | uint32(wire) + switch wire { + case 0: + data = encodeVarintPopulateThetest(data, uint64(key)) + v253 := r.Int63() + if r.Intn(2) == 0 { + v253 *= -1 + } + data = encodeVarintPopulateThetest(data, uint64(v253)) + case 1: + data = encodeVarintPopulateThetest(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 = encodeVarintPopulateThetest(data, uint64(key)) + ll := r.Intn(100) + data = encodeVarintPopulateThetest(data, uint64(ll)) + for j := 0; j < ll; j++ { + data = append(data, byte(r.Intn(256))) + } + default: + data = encodeVarintPopulateThetest(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 encodeVarintPopulateThetest(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 *NidOptNative) Size() (n int) { + var l int + _ = l + n += 9 + n += 5 + n += 1 + sovThetest(uint64(m.Field3)) + n += 1 + sovThetest(uint64(m.Field4)) + n += 1 + sovThetest(uint64(m.Field5)) + n += 1 + sovThetest(uint64(m.Field6)) + n += 1 + sozThetest(uint64(m.Field7)) + n += 1 + sozThetest(uint64(m.Field8)) + n += 5 + n += 5 + n += 9 + n += 9 + n += 2 + l = len(m.Field14) + n += 1 + l + sovThetest(uint64(l)) + if m.Field15 != nil { + l = len(m.Field15) + n += 1 + l + sovThetest(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NinOptNative) Size() (n int) { + var l int + _ = l + if m.Field1 != nil { + n += 9 + } + if m.Field2 != nil { + n += 5 + } + if m.Field3 != nil { + n += 1 + sovThetest(uint64(*m.Field3)) + } + if m.Field4 != nil { + n += 1 + sovThetest(uint64(*m.Field4)) + } + if m.Field5 != nil { + n += 1 + sovThetest(uint64(*m.Field5)) + } + if m.Field6 != nil { + n += 1 + sovThetest(uint64(*m.Field6)) + } + if m.Field7 != nil { + n += 1 + sozThetest(uint64(*m.Field7)) + } + if m.Field8 != nil { + n += 1 + sozThetest(uint64(*m.Field8)) + } + if m.Field9 != nil { + n += 5 + } + if m.Field10 != nil { + n += 5 + } + if m.Field11 != nil { + n += 9 + } + if m.Field12 != nil { + n += 9 + } + if m.Field13 != nil { + n += 2 + } + if m.Field14 != nil { + l = len(*m.Field14) + n += 1 + l + sovThetest(uint64(l)) + } + if m.Field15 != nil { + l = len(m.Field15) + n += 1 + l + sovThetest(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NidRepNative) Size() (n int) { + var l int + _ = l + if len(m.Field1) > 0 { + n += 9 * len(m.Field1) + } + if len(m.Field2) > 0 { + n += 5 * len(m.Field2) + } + if len(m.Field3) > 0 { + for _, e := range m.Field3 { + n += 1 + sovThetest(uint64(e)) + } + } + if len(m.Field4) > 0 { + for _, e := range m.Field4 { + n += 1 + sovThetest(uint64(e)) + } + } + if len(m.Field5) > 0 { + for _, e := range m.Field5 { + n += 1 + sovThetest(uint64(e)) + } + } + if len(m.Field6) > 0 { + for _, e := range m.Field6 { + n += 1 + sovThetest(uint64(e)) + } + } + if len(m.Field7) > 0 { + for _, e := range m.Field7 { + n += 1 + sozThetest(uint64(e)) + } + } + if len(m.Field8) > 0 { + for _, e := range m.Field8 { + n += 1 + sozThetest(uint64(e)) + } + } + if len(m.Field9) > 0 { + n += 5 * len(m.Field9) + } + if len(m.Field10) > 0 { + n += 5 * len(m.Field10) + } + if len(m.Field11) > 0 { + n += 9 * len(m.Field11) + } + if len(m.Field12) > 0 { + n += 9 * len(m.Field12) + } + if len(m.Field13) > 0 { + n += 2 * len(m.Field13) + } + if len(m.Field14) > 0 { + for _, s := range m.Field14 { + l = len(s) + n += 1 + l + sovThetest(uint64(l)) + } + } + if len(m.Field15) > 0 { + for _, b := range m.Field15 { + l = len(b) + n += 1 + l + sovThetest(uint64(l)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NinRepNative) Size() (n int) { + var l int + _ = l + if len(m.Field1) > 0 { + n += 9 * len(m.Field1) + } + if len(m.Field2) > 0 { + n += 5 * len(m.Field2) + } + if len(m.Field3) > 0 { + for _, e := range m.Field3 { + n += 1 + sovThetest(uint64(e)) + } + } + if len(m.Field4) > 0 { + for _, e := range m.Field4 { + n += 1 + sovThetest(uint64(e)) + } + } + if len(m.Field5) > 0 { + for _, e := range m.Field5 { + n += 1 + sovThetest(uint64(e)) + } + } + if len(m.Field6) > 0 { + for _, e := range m.Field6 { + n += 1 + sovThetest(uint64(e)) + } + } + if len(m.Field7) > 0 { + for _, e := range m.Field7 { + n += 1 + sozThetest(uint64(e)) + } + } + if len(m.Field8) > 0 { + for _, e := range m.Field8 { + n += 1 + sozThetest(uint64(e)) + } + } + if len(m.Field9) > 0 { + n += 5 * len(m.Field9) + } + if len(m.Field10) > 0 { + n += 5 * len(m.Field10) + } + if len(m.Field11) > 0 { + n += 9 * len(m.Field11) + } + if len(m.Field12) > 0 { + n += 9 * len(m.Field12) + } + if len(m.Field13) > 0 { + n += 2 * len(m.Field13) + } + if len(m.Field14) > 0 { + for _, s := range m.Field14 { + l = len(s) + n += 1 + l + sovThetest(uint64(l)) + } + } + if len(m.Field15) > 0 { + for _, b := range m.Field15 { + l = len(b) + n += 1 + l + sovThetest(uint64(l)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NidRepPackedNative) Size() (n int) { + var l int + _ = l + if len(m.Field1) > 0 { + n += 1 + sovThetest(uint64(len(m.Field1)*8)) + len(m.Field1)*8 + } + if len(m.Field2) > 0 { + n += 1 + sovThetest(uint64(len(m.Field2)*4)) + len(m.Field2)*4 + } + if len(m.Field3) > 0 { + l = 0 + for _, e := range m.Field3 { + l += sovThetest(uint64(e)) + } + n += 1 + sovThetest(uint64(l)) + l + } + if len(m.Field4) > 0 { + l = 0 + for _, e := range m.Field4 { + l += sovThetest(uint64(e)) + } + n += 1 + sovThetest(uint64(l)) + l + } + if len(m.Field5) > 0 { + l = 0 + for _, e := range m.Field5 { + l += sovThetest(uint64(e)) + } + n += 1 + sovThetest(uint64(l)) + l + } + if len(m.Field6) > 0 { + l = 0 + for _, e := range m.Field6 { + l += sovThetest(uint64(e)) + } + n += 1 + sovThetest(uint64(l)) + l + } + if len(m.Field7) > 0 { + l = 0 + for _, e := range m.Field7 { + l += sozThetest(uint64(e)) + } + n += 1 + sovThetest(uint64(l)) + l + } + if len(m.Field8) > 0 { + l = 0 + for _, e := range m.Field8 { + l += sozThetest(uint64(e)) + } + n += 1 + sovThetest(uint64(l)) + l + } + if len(m.Field9) > 0 { + n += 1 + sovThetest(uint64(len(m.Field9)*4)) + len(m.Field9)*4 + } + if len(m.Field10) > 0 { + n += 1 + sovThetest(uint64(len(m.Field10)*4)) + len(m.Field10)*4 + } + if len(m.Field11) > 0 { + n += 1 + sovThetest(uint64(len(m.Field11)*8)) + len(m.Field11)*8 + } + if len(m.Field12) > 0 { + n += 1 + sovThetest(uint64(len(m.Field12)*8)) + len(m.Field12)*8 + } + if len(m.Field13) > 0 { + n += 1 + sovThetest(uint64(len(m.Field13))) + len(m.Field13)*1 + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NinRepPackedNative) Size() (n int) { + var l int + _ = l + if len(m.Field1) > 0 { + n += 1 + sovThetest(uint64(len(m.Field1)*8)) + len(m.Field1)*8 + } + if len(m.Field2) > 0 { + n += 1 + sovThetest(uint64(len(m.Field2)*4)) + len(m.Field2)*4 + } + if len(m.Field3) > 0 { + l = 0 + for _, e := range m.Field3 { + l += sovThetest(uint64(e)) + } + n += 1 + sovThetest(uint64(l)) + l + } + if len(m.Field4) > 0 { + l = 0 + for _, e := range m.Field4 { + l += sovThetest(uint64(e)) + } + n += 1 + sovThetest(uint64(l)) + l + } + if len(m.Field5) > 0 { + l = 0 + for _, e := range m.Field5 { + l += sovThetest(uint64(e)) + } + n += 1 + sovThetest(uint64(l)) + l + } + if len(m.Field6) > 0 { + l = 0 + for _, e := range m.Field6 { + l += sovThetest(uint64(e)) + } + n += 1 + sovThetest(uint64(l)) + l + } + if len(m.Field7) > 0 { + l = 0 + for _, e := range m.Field7 { + l += sozThetest(uint64(e)) + } + n += 1 + sovThetest(uint64(l)) + l + } + if len(m.Field8) > 0 { + l = 0 + for _, e := range m.Field8 { + l += sozThetest(uint64(e)) + } + n += 1 + sovThetest(uint64(l)) + l + } + if len(m.Field9) > 0 { + n += 1 + sovThetest(uint64(len(m.Field9)*4)) + len(m.Field9)*4 + } + if len(m.Field10) > 0 { + n += 1 + sovThetest(uint64(len(m.Field10)*4)) + len(m.Field10)*4 + } + if len(m.Field11) > 0 { + n += 1 + sovThetest(uint64(len(m.Field11)*8)) + len(m.Field11)*8 + } + if len(m.Field12) > 0 { + n += 1 + sovThetest(uint64(len(m.Field12)*8)) + len(m.Field12)*8 + } + if len(m.Field13) > 0 { + n += 1 + sovThetest(uint64(len(m.Field13))) + len(m.Field13)*1 + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NidOptStruct) Size() (n int) { + var l int + _ = l + n += 9 + n += 5 + l = m.Field3.Size() + n += 1 + l + sovThetest(uint64(l)) + l = m.Field4.Size() + n += 1 + l + sovThetest(uint64(l)) + n += 1 + sovThetest(uint64(m.Field6)) + n += 1 + sozThetest(uint64(m.Field7)) + l = m.Field8.Size() + n += 1 + l + sovThetest(uint64(l)) + n += 2 + l = len(m.Field14) + n += 1 + l + sovThetest(uint64(l)) + if m.Field15 != nil { + l = len(m.Field15) + n += 1 + l + sovThetest(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NinOptStruct) Size() (n int) { + var l int + _ = l + if m.Field1 != nil { + n += 9 + } + if m.Field2 != nil { + n += 5 + } + if m.Field3 != nil { + l = m.Field3.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if m.Field4 != nil { + l = m.Field4.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if m.Field6 != nil { + n += 1 + sovThetest(uint64(*m.Field6)) + } + if m.Field7 != nil { + n += 1 + sozThetest(uint64(*m.Field7)) + } + if m.Field8 != nil { + l = m.Field8.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if m.Field13 != nil { + n += 2 + } + if m.Field14 != nil { + l = len(*m.Field14) + n += 1 + l + sovThetest(uint64(l)) + } + if m.Field15 != nil { + l = len(m.Field15) + n += 1 + l + sovThetest(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NidRepStruct) Size() (n int) { + var l int + _ = l + if len(m.Field1) > 0 { + n += 9 * len(m.Field1) + } + if len(m.Field2) > 0 { + n += 5 * len(m.Field2) + } + if len(m.Field3) > 0 { + for _, e := range m.Field3 { + l = e.Size() + n += 1 + l + sovThetest(uint64(l)) + } + } + if len(m.Field4) > 0 { + for _, e := range m.Field4 { + l = e.Size() + n += 1 + l + sovThetest(uint64(l)) + } + } + if len(m.Field6) > 0 { + for _, e := range m.Field6 { + n += 1 + sovThetest(uint64(e)) + } + } + if len(m.Field7) > 0 { + for _, e := range m.Field7 { + n += 1 + sozThetest(uint64(e)) + } + } + if len(m.Field8) > 0 { + for _, e := range m.Field8 { + l = e.Size() + n += 1 + l + sovThetest(uint64(l)) + } + } + if len(m.Field13) > 0 { + n += 2 * len(m.Field13) + } + if len(m.Field14) > 0 { + for _, s := range m.Field14 { + l = len(s) + n += 1 + l + sovThetest(uint64(l)) + } + } + if len(m.Field15) > 0 { + for _, b := range m.Field15 { + l = len(b) + n += 1 + l + sovThetest(uint64(l)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NinRepStruct) Size() (n int) { + var l int + _ = l + if len(m.Field1) > 0 { + n += 9 * len(m.Field1) + } + if len(m.Field2) > 0 { + n += 5 * len(m.Field2) + } + if len(m.Field3) > 0 { + for _, e := range m.Field3 { + l = e.Size() + n += 1 + l + sovThetest(uint64(l)) + } + } + if len(m.Field4) > 0 { + for _, e := range m.Field4 { + l = e.Size() + n += 1 + l + sovThetest(uint64(l)) + } + } + if len(m.Field6) > 0 { + for _, e := range m.Field6 { + n += 1 + sovThetest(uint64(e)) + } + } + if len(m.Field7) > 0 { + for _, e := range m.Field7 { + n += 1 + sozThetest(uint64(e)) + } + } + if len(m.Field8) > 0 { + for _, e := range m.Field8 { + l = e.Size() + n += 1 + l + sovThetest(uint64(l)) + } + } + if len(m.Field13) > 0 { + n += 2 * len(m.Field13) + } + if len(m.Field14) > 0 { + for _, s := range m.Field14 { + l = len(s) + n += 1 + l + sovThetest(uint64(l)) + } + } + if len(m.Field15) > 0 { + for _, b := range m.Field15 { + l = len(b) + n += 1 + l + sovThetest(uint64(l)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NidEmbeddedStruct) Size() (n int) { + var l int + _ = l + if m.NidOptNative != nil { + l = m.NidOptNative.Size() + n += 1 + l + sovThetest(uint64(l)) + } + l = m.Field200.Size() + n += 2 + l + sovThetest(uint64(l)) + n += 3 + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NinEmbeddedStruct) Size() (n int) { + var l int + _ = l + if m.NidOptNative != nil { + l = m.NidOptNative.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if m.Field200 != nil { + l = m.Field200.Size() + n += 2 + l + sovThetest(uint64(l)) + } + if m.Field210 != nil { + n += 3 + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NidNestedStruct) Size() (n int) { + var l int + _ = l + l = m.Field1.Size() + n += 1 + l + sovThetest(uint64(l)) + if len(m.Field2) > 0 { + for _, e := range m.Field2 { + l = e.Size() + n += 1 + l + sovThetest(uint64(l)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NinNestedStruct) Size() (n int) { + var l int + _ = l + if m.Field1 != nil { + l = m.Field1.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if len(m.Field2) > 0 { + for _, e := range m.Field2 { + l = e.Size() + n += 1 + l + sovThetest(uint64(l)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NidOptCustom) Size() (n int) { + var l int + _ = l + l = m.Id.Size() + n += 1 + l + sovThetest(uint64(l)) + l = m.Value.Size() + n += 1 + l + sovThetest(uint64(l)) + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *CustomDash) Size() (n int) { + var l int + _ = l + if m.Value != nil { + l = m.Value.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NinOptCustom) Size() (n int) { + var l int + _ = l + if m.Id != nil { + l = m.Id.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if m.Value != nil { + l = m.Value.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NidRepCustom) Size() (n int) { + var l int + _ = l + if len(m.Id) > 0 { + for _, e := range m.Id { + l = e.Size() + n += 1 + l + sovThetest(uint64(l)) + } + } + if len(m.Value) > 0 { + for _, e := range m.Value { + l = e.Size() + n += 1 + l + sovThetest(uint64(l)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NinRepCustom) Size() (n int) { + var l int + _ = l + if len(m.Id) > 0 { + for _, e := range m.Id { + l = e.Size() + n += 1 + l + sovThetest(uint64(l)) + } + } + if len(m.Value) > 0 { + for _, e := range m.Value { + l = e.Size() + n += 1 + l + sovThetest(uint64(l)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NinOptNativeUnion) Size() (n int) { + var l int + _ = l + if m.Field1 != nil { + n += 9 + } + if m.Field2 != nil { + n += 5 + } + if m.Field3 != nil { + n += 1 + sovThetest(uint64(*m.Field3)) + } + if m.Field4 != nil { + n += 1 + sovThetest(uint64(*m.Field4)) + } + if m.Field5 != nil { + n += 1 + sovThetest(uint64(*m.Field5)) + } + if m.Field6 != nil { + n += 1 + sovThetest(uint64(*m.Field6)) + } + if m.Field13 != nil { + n += 2 + } + if m.Field14 != nil { + l = len(*m.Field14) + n += 1 + l + sovThetest(uint64(l)) + } + if m.Field15 != nil { + l = len(m.Field15) + n += 1 + l + sovThetest(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NinOptStructUnion) Size() (n int) { + var l int + _ = l + if m.Field1 != nil { + n += 9 + } + if m.Field2 != nil { + n += 5 + } + if m.Field3 != nil { + l = m.Field3.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if m.Field4 != nil { + l = m.Field4.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if m.Field6 != nil { + n += 1 + sovThetest(uint64(*m.Field6)) + } + if m.Field7 != nil { + n += 1 + sozThetest(uint64(*m.Field7)) + } + if m.Field13 != nil { + n += 2 + } + if m.Field14 != nil { + l = len(*m.Field14) + n += 1 + l + sovThetest(uint64(l)) + } + if m.Field15 != nil { + l = len(m.Field15) + n += 1 + l + sovThetest(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NinEmbeddedStructUnion) Size() (n int) { + var l int + _ = l + if m.NidOptNative != nil { + l = m.NidOptNative.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if m.Field200 != nil { + l = m.Field200.Size() + n += 2 + l + sovThetest(uint64(l)) + } + if m.Field210 != nil { + n += 3 + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NinNestedStructUnion) Size() (n int) { + var l int + _ = l + if m.Field1 != nil { + l = m.Field1.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if m.Field2 != nil { + l = m.Field2.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if m.Field3 != nil { + l = m.Field3.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *Tree) Size() (n int) { + var l int + _ = l + if m.Or != nil { + l = m.Or.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if m.And != nil { + l = m.And.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if m.Leaf != nil { + l = m.Leaf.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *OrBranch) Size() (n int) { + var l int + _ = l + l = m.Left.Size() + n += 1 + l + sovThetest(uint64(l)) + l = m.Right.Size() + n += 1 + l + sovThetest(uint64(l)) + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *AndBranch) Size() (n int) { + var l int + _ = l + l = m.Left.Size() + n += 1 + l + sovThetest(uint64(l)) + l = m.Right.Size() + n += 1 + l + sovThetest(uint64(l)) + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *Leaf) Size() (n int) { + var l int + _ = l + n += 1 + sovThetest(uint64(m.Value)) + l = len(m.StrValue) + n += 1 + l + sovThetest(uint64(l)) + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *DeepTree) Size() (n int) { + var l int + _ = l + if m.Down != nil { + l = m.Down.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if m.And != nil { + l = m.And.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if m.Leaf != nil { + l = m.Leaf.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *ADeepBranch) Size() (n int) { + var l int + _ = l + l = m.Down.Size() + n += 1 + l + sovThetest(uint64(l)) + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *AndDeepBranch) Size() (n int) { + var l int + _ = l + l = m.Left.Size() + n += 1 + l + sovThetest(uint64(l)) + l = m.Right.Size() + n += 1 + l + sovThetest(uint64(l)) + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *DeepLeaf) Size() (n int) { + var l int + _ = l + l = m.Tree.Size() + n += 1 + l + sovThetest(uint64(l)) + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *Nil) Size() (n int) { + var l int + _ = l + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NidOptEnum) Size() (n int) { + var l int + _ = l + n += 1 + sovThetest(uint64(m.Field1)) + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NinOptEnum) Size() (n int) { + var l int + _ = l + if m.Field1 != nil { + n += 1 + sovThetest(uint64(*m.Field1)) + } + if m.Field2 != nil { + n += 1 + sovThetest(uint64(*m.Field2)) + } + if m.Field3 != nil { + n += 1 + sovThetest(uint64(*m.Field3)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NidRepEnum) Size() (n int) { + var l int + _ = l + if len(m.Field1) > 0 { + for _, e := range m.Field1 { + n += 1 + sovThetest(uint64(e)) + } + } + if len(m.Field2) > 0 { + for _, e := range m.Field2 { + n += 1 + sovThetest(uint64(e)) + } + } + if len(m.Field3) > 0 { + for _, e := range m.Field3 { + n += 1 + sovThetest(uint64(e)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NinRepEnum) Size() (n int) { + var l int + _ = l + if len(m.Field1) > 0 { + for _, e := range m.Field1 { + n += 1 + sovThetest(uint64(e)) + } + } + if len(m.Field2) > 0 { + for _, e := range m.Field2 { + n += 1 + sovThetest(uint64(e)) + } + } + if len(m.Field3) > 0 { + for _, e := range m.Field3 { + n += 1 + sovThetest(uint64(e)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NinOptEnumDefault) Size() (n int) { + var l int + _ = l + if m.Field1 != nil { + n += 1 + sovThetest(uint64(*m.Field1)) + } + if m.Field2 != nil { + n += 1 + sovThetest(uint64(*m.Field2)) + } + if m.Field3 != nil { + n += 1 + sovThetest(uint64(*m.Field3)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *AnotherNinOptEnum) Size() (n int) { + var l int + _ = l + if m.Field1 != nil { + n += 1 + sovThetest(uint64(*m.Field1)) + } + if m.Field2 != nil { + n += 1 + sovThetest(uint64(*m.Field2)) + } + if m.Field3 != nil { + n += 1 + sovThetest(uint64(*m.Field3)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *AnotherNinOptEnumDefault) Size() (n int) { + var l int + _ = l + if m.Field1 != nil { + n += 1 + sovThetest(uint64(*m.Field1)) + } + if m.Field2 != nil { + n += 1 + sovThetest(uint64(*m.Field2)) + } + if m.Field3 != nil { + n += 1 + sovThetest(uint64(*m.Field3)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *Timer) Size() (n int) { + var l int + _ = l + n += 9 + n += 9 + if m.Data != nil { + l = len(m.Data) + n += 1 + l + sovThetest(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *MyExtendable) Size() (n int) { + var l int + _ = l + if m.Field1 != nil { + n += 1 + sovThetest(uint64(*m.Field1)) + } + if m.XXX_extensions != nil { + n += github_com_gogo_protobuf_proto.SizeOfExtensionMap(m.XXX_extensions) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *OtherExtenable) Size() (n int) { + var l int + _ = l + if m.Field2 != nil { + n += 1 + sovThetest(uint64(*m.Field2)) + } + if m.Field13 != nil { + n += 1 + sovThetest(uint64(*m.Field13)) + } + if m.M != nil { + l = m.M.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if m.XXX_extensions != nil { + n += github_com_gogo_protobuf_proto.SizeOfExtensionMap(m.XXX_extensions) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NestedDefinition) Size() (n int) { + var l int + _ = l + if m.Field1 != nil { + n += 1 + sovThetest(uint64(*m.Field1)) + } + if m.EnumField != nil { + n += 1 + sovThetest(uint64(*m.EnumField)) + } + if m.NNM != nil { + l = m.NNM.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if m.NM != nil { + l = m.NM.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NestedDefinition_NestedMessage) Size() (n int) { + var l int + _ = l + if m.NestedField1 != nil { + n += 9 + } + if m.NNM != nil { + l = m.NNM.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NestedDefinition_NestedMessage_NestedNestedMsg) Size() (n int) { + var l int + _ = l + if m.NestedNestedField1 != nil { + l = len(*m.NestedNestedField1) + n += 1 + l + sovThetest(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NestedScope) Size() (n int) { + var l int + _ = l + if m.A != nil { + l = m.A.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if m.B != nil { + n += 1 + sovThetest(uint64(*m.B)) + } + if m.C != nil { + l = m.C.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NinOptNativeDefault) Size() (n int) { + var l int + _ = l + if m.Field1 != nil { + n += 9 + } + if m.Field2 != nil { + n += 5 + } + if m.Field3 != nil { + n += 1 + sovThetest(uint64(*m.Field3)) + } + if m.Field4 != nil { + n += 1 + sovThetest(uint64(*m.Field4)) + } + if m.Field5 != nil { + n += 1 + sovThetest(uint64(*m.Field5)) + } + if m.Field6 != nil { + n += 1 + sovThetest(uint64(*m.Field6)) + } + if m.Field7 != nil { + n += 1 + sozThetest(uint64(*m.Field7)) + } + if m.Field8 != nil { + n += 1 + sozThetest(uint64(*m.Field8)) + } + if m.Field9 != nil { + n += 5 + } + if m.Field10 != nil { + n += 5 + } + if m.Field11 != nil { + n += 9 + } + if m.Field12 != nil { + n += 9 + } + if m.Field13 != nil { + n += 2 + } + if m.Field14 != nil { + l = len(*m.Field14) + n += 1 + l + sovThetest(uint64(l)) + } + if m.Field15 != nil { + l = len(m.Field15) + n += 1 + l + sovThetest(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *CustomContainer) Size() (n int) { + var l int + _ = l + l = m.CustomStruct.Size() + n += 1 + l + sovThetest(uint64(l)) + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *CustomNameNidOptNative) Size() (n int) { + var l int + _ = l + n += 9 + n += 5 + n += 1 + sovThetest(uint64(m.FieldC)) + n += 1 + sovThetest(uint64(m.FieldD)) + n += 1 + sovThetest(uint64(m.FieldE)) + n += 1 + sovThetest(uint64(m.FieldF)) + n += 1 + sozThetest(uint64(m.FieldG)) + n += 1 + sozThetest(uint64(m.FieldH)) + n += 5 + n += 5 + n += 9 + n += 9 + n += 2 + l = len(m.FieldN) + n += 1 + l + sovThetest(uint64(l)) + if m.FieldO != nil { + l = len(m.FieldO) + n += 1 + l + sovThetest(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *CustomNameNinOptNative) Size() (n int) { + var l int + _ = l + if m.FieldA != nil { + n += 9 + } + if m.FieldB != nil { + n += 5 + } + if m.FieldC != nil { + n += 1 + sovThetest(uint64(*m.FieldC)) + } + if m.FieldD != nil { + n += 1 + sovThetest(uint64(*m.FieldD)) + } + if m.FieldE != nil { + n += 1 + sovThetest(uint64(*m.FieldE)) + } + if m.FieldF != nil { + n += 1 + sovThetest(uint64(*m.FieldF)) + } + if m.FieldG != nil { + n += 1 + sozThetest(uint64(*m.FieldG)) + } + if m.FieldH != nil { + n += 1 + sozThetest(uint64(*m.FieldH)) + } + if m.FieldI != nil { + n += 5 + } + if m.FieldJ != nil { + n += 5 + } + if m.FieldK != nil { + n += 9 + } + if m.FielL != nil { + n += 9 + } + if m.FieldM != nil { + n += 2 + } + if m.FieldN != nil { + l = len(*m.FieldN) + n += 1 + l + sovThetest(uint64(l)) + } + if m.FieldO != nil { + l = len(m.FieldO) + n += 1 + l + sovThetest(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *CustomNameNinRepNative) Size() (n int) { + var l int + _ = l + if len(m.FieldA) > 0 { + n += 9 * len(m.FieldA) + } + if len(m.FieldB) > 0 { + n += 5 * len(m.FieldB) + } + if len(m.FieldC) > 0 { + for _, e := range m.FieldC { + n += 1 + sovThetest(uint64(e)) + } + } + if len(m.FieldD) > 0 { + for _, e := range m.FieldD { + n += 1 + sovThetest(uint64(e)) + } + } + if len(m.FieldE) > 0 { + for _, e := range m.FieldE { + n += 1 + sovThetest(uint64(e)) + } + } + if len(m.FieldF) > 0 { + for _, e := range m.FieldF { + n += 1 + sovThetest(uint64(e)) + } + } + if len(m.FieldG) > 0 { + for _, e := range m.FieldG { + n += 1 + sozThetest(uint64(e)) + } + } + if len(m.FieldH) > 0 { + for _, e := range m.FieldH { + n += 1 + sozThetest(uint64(e)) + } + } + if len(m.FieldI) > 0 { + n += 5 * len(m.FieldI) + } + if len(m.FieldJ) > 0 { + n += 5 * len(m.FieldJ) + } + if len(m.FieldK) > 0 { + n += 9 * len(m.FieldK) + } + if len(m.FieldL) > 0 { + n += 9 * len(m.FieldL) + } + if len(m.FieldM) > 0 { + n += 2 * len(m.FieldM) + } + if len(m.FieldN) > 0 { + for _, s := range m.FieldN { + l = len(s) + n += 1 + l + sovThetest(uint64(l)) + } + } + if len(m.FieldO) > 0 { + for _, b := range m.FieldO { + l = len(b) + n += 1 + l + sovThetest(uint64(l)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *CustomNameNinStruct) Size() (n int) { + var l int + _ = l + if m.FieldA != nil { + n += 9 + } + if m.FieldB != nil { + n += 5 + } + if m.FieldC != nil { + l = m.FieldC.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if len(m.FieldD) > 0 { + for _, e := range m.FieldD { + l = e.Size() + n += 1 + l + sovThetest(uint64(l)) + } + } + if m.FieldE != nil { + n += 1 + sovThetest(uint64(*m.FieldE)) + } + if m.FieldF != nil { + n += 1 + sozThetest(uint64(*m.FieldF)) + } + if m.FieldG != nil { + l = m.FieldG.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if m.FieldH != nil { + n += 2 + } + if m.FieldI != nil { + l = len(*m.FieldI) + n += 1 + l + sovThetest(uint64(l)) + } + if m.FieldJ != nil { + l = len(m.FieldJ) + n += 1 + l + sovThetest(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *CustomNameCustomType) Size() (n int) { + var l int + _ = l + if m.FieldA != nil { + l = m.FieldA.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if m.FieldB != nil { + l = m.FieldB.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if len(m.FieldC) > 0 { + for _, e := range m.FieldC { + l = e.Size() + n += 1 + l + sovThetest(uint64(l)) + } + } + if len(m.FieldD) > 0 { + for _, e := range m.FieldD { + l = e.Size() + n += 1 + l + sovThetest(uint64(l)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *CustomNameNinEmbeddedStructUnion) Size() (n int) { + var l int + _ = l + if m.NidOptNative != nil { + l = m.NidOptNative.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if m.FieldA != nil { + l = m.FieldA.Size() + n += 2 + l + sovThetest(uint64(l)) + } + if m.FieldB != nil { + n += 3 + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *CustomNameEnum) Size() (n int) { + var l int + _ = l + if m.FieldA != nil { + n += 1 + sovThetest(uint64(*m.FieldA)) + } + if len(m.FieldB) > 0 { + for _, e := range m.FieldB { + n += 1 + sovThetest(uint64(e)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NoExtensionsMap) Size() (n int) { + var l int + _ = l + if m.Field1 != nil { + n += 1 + sovThetest(uint64(*m.Field1)) + } + if m.XXX_extensions != nil { + n += len(m.XXX_extensions) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *Unrecognized) Size() (n int) { + var l int + _ = l + if m.Field1 != nil { + l = len(*m.Field1) + n += 1 + l + sovThetest(uint64(l)) + } + return n +} + +func (m *UnrecognizedWithInner) Size() (n int) { + var l int + _ = l + if len(m.Embedded) > 0 { + for _, e := range m.Embedded { + l = e.Size() + n += 1 + l + sovThetest(uint64(l)) + } + } + if m.Field2 != nil { + l = len(*m.Field2) + n += 1 + l + sovThetest(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *UnrecognizedWithInner_Inner) Size() (n int) { + var l int + _ = l + if m.Field1 != nil { + n += 1 + sovThetest(uint64(*m.Field1)) + } + return n +} + +func (m *UnrecognizedWithEmbed) Size() (n int) { + var l int + _ = l + l = m.UnrecognizedWithEmbed_Embedded.Size() + n += 1 + l + sovThetest(uint64(l)) + if m.Field2 != nil { + l = len(*m.Field2) + n += 1 + l + sovThetest(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *UnrecognizedWithEmbed_Embedded) Size() (n int) { + var l int + _ = l + if m.Field1 != nil { + n += 1 + sovThetest(uint64(*m.Field1)) + } + return n +} + +func (m *Node) Size() (n int) { + var l int + _ = l + if m.Label != nil { + l = len(*m.Label) + n += 1 + l + sovThetest(uint64(l)) + } + if len(m.Children) > 0 { + for _, e := range m.Children { + l = e.Size() + n += 1 + l + sovThetest(uint64(l)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func sovThetest(x uint64) (n int) { + for { + n++ + x >>= 7 + if x == 0 { + break + } + } + return n +} +func sozThetest(x uint64) (n int) { + return sovThetest(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (this *NidOptNative) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NidOptNative{`, + `Field1:` + fmt.Sprintf("%v", this.Field1) + `,`, + `Field2:` + fmt.Sprintf("%v", this.Field2) + `,`, + `Field3:` + fmt.Sprintf("%v", this.Field3) + `,`, + `Field4:` + fmt.Sprintf("%v", this.Field4) + `,`, + `Field5:` + fmt.Sprintf("%v", this.Field5) + `,`, + `Field6:` + fmt.Sprintf("%v", this.Field6) + `,`, + `Field7:` + fmt.Sprintf("%v", this.Field7) + `,`, + `Field8:` + fmt.Sprintf("%v", this.Field8) + `,`, + `Field9:` + fmt.Sprintf("%v", this.Field9) + `,`, + `Field10:` + fmt.Sprintf("%v", this.Field10) + `,`, + `Field11:` + fmt.Sprintf("%v", this.Field11) + `,`, + `Field12:` + fmt.Sprintf("%v", this.Field12) + `,`, + `Field13:` + fmt.Sprintf("%v", this.Field13) + `,`, + `Field14:` + fmt.Sprintf("%v", this.Field14) + `,`, + `Field15:` + fmt.Sprintf("%v", this.Field15) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NinOptNative) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NinOptNative{`, + `Field1:` + valueToStringThetest(this.Field1) + `,`, + `Field2:` + valueToStringThetest(this.Field2) + `,`, + `Field3:` + valueToStringThetest(this.Field3) + `,`, + `Field4:` + valueToStringThetest(this.Field4) + `,`, + `Field5:` + valueToStringThetest(this.Field5) + `,`, + `Field6:` + valueToStringThetest(this.Field6) + `,`, + `Field7:` + valueToStringThetest(this.Field7) + `,`, + `Field8:` + valueToStringThetest(this.Field8) + `,`, + `Field9:` + valueToStringThetest(this.Field9) + `,`, + `Field10:` + valueToStringThetest(this.Field10) + `,`, + `Field11:` + valueToStringThetest(this.Field11) + `,`, + `Field12:` + valueToStringThetest(this.Field12) + `,`, + `Field13:` + valueToStringThetest(this.Field13) + `,`, + `Field14:` + valueToStringThetest(this.Field14) + `,`, + `Field15:` + valueToStringThetest(this.Field15) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NidRepNative) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NidRepNative{`, + `Field1:` + fmt.Sprintf("%v", this.Field1) + `,`, + `Field2:` + fmt.Sprintf("%v", this.Field2) + `,`, + `Field3:` + fmt.Sprintf("%v", this.Field3) + `,`, + `Field4:` + fmt.Sprintf("%v", this.Field4) + `,`, + `Field5:` + fmt.Sprintf("%v", this.Field5) + `,`, + `Field6:` + fmt.Sprintf("%v", this.Field6) + `,`, + `Field7:` + fmt.Sprintf("%v", this.Field7) + `,`, + `Field8:` + fmt.Sprintf("%v", this.Field8) + `,`, + `Field9:` + fmt.Sprintf("%v", this.Field9) + `,`, + `Field10:` + fmt.Sprintf("%v", this.Field10) + `,`, + `Field11:` + fmt.Sprintf("%v", this.Field11) + `,`, + `Field12:` + fmt.Sprintf("%v", this.Field12) + `,`, + `Field13:` + fmt.Sprintf("%v", this.Field13) + `,`, + `Field14:` + fmt.Sprintf("%v", this.Field14) + `,`, + `Field15:` + fmt.Sprintf("%v", this.Field15) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NinRepNative) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NinRepNative{`, + `Field1:` + fmt.Sprintf("%v", this.Field1) + `,`, + `Field2:` + fmt.Sprintf("%v", this.Field2) + `,`, + `Field3:` + fmt.Sprintf("%v", this.Field3) + `,`, + `Field4:` + fmt.Sprintf("%v", this.Field4) + `,`, + `Field5:` + fmt.Sprintf("%v", this.Field5) + `,`, + `Field6:` + fmt.Sprintf("%v", this.Field6) + `,`, + `Field7:` + fmt.Sprintf("%v", this.Field7) + `,`, + `Field8:` + fmt.Sprintf("%v", this.Field8) + `,`, + `Field9:` + fmt.Sprintf("%v", this.Field9) + `,`, + `Field10:` + fmt.Sprintf("%v", this.Field10) + `,`, + `Field11:` + fmt.Sprintf("%v", this.Field11) + `,`, + `Field12:` + fmt.Sprintf("%v", this.Field12) + `,`, + `Field13:` + fmt.Sprintf("%v", this.Field13) + `,`, + `Field14:` + fmt.Sprintf("%v", this.Field14) + `,`, + `Field15:` + fmt.Sprintf("%v", this.Field15) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NidRepPackedNative) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NidRepPackedNative{`, + `Field1:` + fmt.Sprintf("%v", this.Field1) + `,`, + `Field2:` + fmt.Sprintf("%v", this.Field2) + `,`, + `Field3:` + fmt.Sprintf("%v", this.Field3) + `,`, + `Field4:` + fmt.Sprintf("%v", this.Field4) + `,`, + `Field5:` + fmt.Sprintf("%v", this.Field5) + `,`, + `Field6:` + fmt.Sprintf("%v", this.Field6) + `,`, + `Field7:` + fmt.Sprintf("%v", this.Field7) + `,`, + `Field8:` + fmt.Sprintf("%v", this.Field8) + `,`, + `Field9:` + fmt.Sprintf("%v", this.Field9) + `,`, + `Field10:` + fmt.Sprintf("%v", this.Field10) + `,`, + `Field11:` + fmt.Sprintf("%v", this.Field11) + `,`, + `Field12:` + fmt.Sprintf("%v", this.Field12) + `,`, + `Field13:` + fmt.Sprintf("%v", this.Field13) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NinRepPackedNative) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NinRepPackedNative{`, + `Field1:` + fmt.Sprintf("%v", this.Field1) + `,`, + `Field2:` + fmt.Sprintf("%v", this.Field2) + `,`, + `Field3:` + fmt.Sprintf("%v", this.Field3) + `,`, + `Field4:` + fmt.Sprintf("%v", this.Field4) + `,`, + `Field5:` + fmt.Sprintf("%v", this.Field5) + `,`, + `Field6:` + fmt.Sprintf("%v", this.Field6) + `,`, + `Field7:` + fmt.Sprintf("%v", this.Field7) + `,`, + `Field8:` + fmt.Sprintf("%v", this.Field8) + `,`, + `Field9:` + fmt.Sprintf("%v", this.Field9) + `,`, + `Field10:` + fmt.Sprintf("%v", this.Field10) + `,`, + `Field11:` + fmt.Sprintf("%v", this.Field11) + `,`, + `Field12:` + fmt.Sprintf("%v", this.Field12) + `,`, + `Field13:` + fmt.Sprintf("%v", this.Field13) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NidOptStruct) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NidOptStruct{`, + `Field1:` + fmt.Sprintf("%v", this.Field1) + `,`, + `Field2:` + fmt.Sprintf("%v", this.Field2) + `,`, + `Field3:` + strings.Replace(strings.Replace(this.Field3.String(), "NidOptNative", "NidOptNative", 1), `&`, ``, 1) + `,`, + `Field4:` + strings.Replace(strings.Replace(this.Field4.String(), "NinOptNative", "NinOptNative", 1), `&`, ``, 1) + `,`, + `Field6:` + fmt.Sprintf("%v", this.Field6) + `,`, + `Field7:` + fmt.Sprintf("%v", this.Field7) + `,`, + `Field8:` + strings.Replace(strings.Replace(this.Field8.String(), "NidOptNative", "NidOptNative", 1), `&`, ``, 1) + `,`, + `Field13:` + fmt.Sprintf("%v", this.Field13) + `,`, + `Field14:` + fmt.Sprintf("%v", this.Field14) + `,`, + `Field15:` + fmt.Sprintf("%v", this.Field15) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NinOptStruct) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NinOptStruct{`, + `Field1:` + valueToStringThetest(this.Field1) + `,`, + `Field2:` + valueToStringThetest(this.Field2) + `,`, + `Field3:` + strings.Replace(fmt.Sprintf("%v", this.Field3), "NidOptNative", "NidOptNative", 1) + `,`, + `Field4:` + strings.Replace(fmt.Sprintf("%v", this.Field4), "NinOptNative", "NinOptNative", 1) + `,`, + `Field6:` + valueToStringThetest(this.Field6) + `,`, + `Field7:` + valueToStringThetest(this.Field7) + `,`, + `Field8:` + strings.Replace(fmt.Sprintf("%v", this.Field8), "NidOptNative", "NidOptNative", 1) + `,`, + `Field13:` + valueToStringThetest(this.Field13) + `,`, + `Field14:` + valueToStringThetest(this.Field14) + `,`, + `Field15:` + valueToStringThetest(this.Field15) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NidRepStruct) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NidRepStruct{`, + `Field1:` + fmt.Sprintf("%v", this.Field1) + `,`, + `Field2:` + fmt.Sprintf("%v", this.Field2) + `,`, + `Field3:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Field3), "NidOptNative", "NidOptNative", 1), `&`, ``, 1) + `,`, + `Field4:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Field4), "NinOptNative", "NinOptNative", 1), `&`, ``, 1) + `,`, + `Field6:` + fmt.Sprintf("%v", this.Field6) + `,`, + `Field7:` + fmt.Sprintf("%v", this.Field7) + `,`, + `Field8:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Field8), "NidOptNative", "NidOptNative", 1), `&`, ``, 1) + `,`, + `Field13:` + fmt.Sprintf("%v", this.Field13) + `,`, + `Field14:` + fmt.Sprintf("%v", this.Field14) + `,`, + `Field15:` + fmt.Sprintf("%v", this.Field15) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NinRepStruct) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NinRepStruct{`, + `Field1:` + fmt.Sprintf("%v", this.Field1) + `,`, + `Field2:` + fmt.Sprintf("%v", this.Field2) + `,`, + `Field3:` + strings.Replace(fmt.Sprintf("%v", this.Field3), "NidOptNative", "NidOptNative", 1) + `,`, + `Field4:` + strings.Replace(fmt.Sprintf("%v", this.Field4), "NinOptNative", "NinOptNative", 1) + `,`, + `Field6:` + fmt.Sprintf("%v", this.Field6) + `,`, + `Field7:` + fmt.Sprintf("%v", this.Field7) + `,`, + `Field8:` + strings.Replace(fmt.Sprintf("%v", this.Field8), "NidOptNative", "NidOptNative", 1) + `,`, + `Field13:` + fmt.Sprintf("%v", this.Field13) + `,`, + `Field14:` + fmt.Sprintf("%v", this.Field14) + `,`, + `Field15:` + fmt.Sprintf("%v", this.Field15) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NidEmbeddedStruct) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NidEmbeddedStruct{`, + `NidOptNative:` + strings.Replace(fmt.Sprintf("%v", this.NidOptNative), "NidOptNative", "NidOptNative", 1) + `,`, + `Field200:` + strings.Replace(strings.Replace(this.Field200.String(), "NidOptNative", "NidOptNative", 1), `&`, ``, 1) + `,`, + `Field210:` + fmt.Sprintf("%v", this.Field210) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NinEmbeddedStruct) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NinEmbeddedStruct{`, + `NidOptNative:` + strings.Replace(fmt.Sprintf("%v", this.NidOptNative), "NidOptNative", "NidOptNative", 1) + `,`, + `Field200:` + strings.Replace(fmt.Sprintf("%v", this.Field200), "NidOptNative", "NidOptNative", 1) + `,`, + `Field210:` + valueToStringThetest(this.Field210) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NidNestedStruct) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NidNestedStruct{`, + `Field1:` + strings.Replace(strings.Replace(this.Field1.String(), "NidOptStruct", "NidOptStruct", 1), `&`, ``, 1) + `,`, + `Field2:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Field2), "NidRepStruct", "NidRepStruct", 1), `&`, ``, 1) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NinNestedStruct) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NinNestedStruct{`, + `Field1:` + strings.Replace(fmt.Sprintf("%v", this.Field1), "NinOptStruct", "NinOptStruct", 1) + `,`, + `Field2:` + strings.Replace(fmt.Sprintf("%v", this.Field2), "NinRepStruct", "NinRepStruct", 1) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NidOptCustom) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NidOptCustom{`, + `Id:` + fmt.Sprintf("%v", this.Id) + `,`, + `Value:` + fmt.Sprintf("%v", this.Value) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *CustomDash) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&CustomDash{`, + `Value:` + valueToStringThetest(this.Value) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NinOptCustom) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NinOptCustom{`, + `Id:` + valueToStringThetest(this.Id) + `,`, + `Value:` + valueToStringThetest(this.Value) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NidRepCustom) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NidRepCustom{`, + `Id:` + fmt.Sprintf("%v", this.Id) + `,`, + `Value:` + fmt.Sprintf("%v", this.Value) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NinRepCustom) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NinRepCustom{`, + `Id:` + fmt.Sprintf("%v", this.Id) + `,`, + `Value:` + fmt.Sprintf("%v", this.Value) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NinOptNativeUnion) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NinOptNativeUnion{`, + `Field1:` + valueToStringThetest(this.Field1) + `,`, + `Field2:` + valueToStringThetest(this.Field2) + `,`, + `Field3:` + valueToStringThetest(this.Field3) + `,`, + `Field4:` + valueToStringThetest(this.Field4) + `,`, + `Field5:` + valueToStringThetest(this.Field5) + `,`, + `Field6:` + valueToStringThetest(this.Field6) + `,`, + `Field13:` + valueToStringThetest(this.Field13) + `,`, + `Field14:` + valueToStringThetest(this.Field14) + `,`, + `Field15:` + valueToStringThetest(this.Field15) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NinOptStructUnion) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NinOptStructUnion{`, + `Field1:` + valueToStringThetest(this.Field1) + `,`, + `Field2:` + valueToStringThetest(this.Field2) + `,`, + `Field3:` + strings.Replace(fmt.Sprintf("%v", this.Field3), "NidOptNative", "NidOptNative", 1) + `,`, + `Field4:` + strings.Replace(fmt.Sprintf("%v", this.Field4), "NinOptNative", "NinOptNative", 1) + `,`, + `Field6:` + valueToStringThetest(this.Field6) + `,`, + `Field7:` + valueToStringThetest(this.Field7) + `,`, + `Field13:` + valueToStringThetest(this.Field13) + `,`, + `Field14:` + valueToStringThetest(this.Field14) + `,`, + `Field15:` + valueToStringThetest(this.Field15) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NinEmbeddedStructUnion) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NinEmbeddedStructUnion{`, + `NidOptNative:` + strings.Replace(fmt.Sprintf("%v", this.NidOptNative), "NidOptNative", "NidOptNative", 1) + `,`, + `Field200:` + strings.Replace(fmt.Sprintf("%v", this.Field200), "NinOptNative", "NinOptNative", 1) + `,`, + `Field210:` + valueToStringThetest(this.Field210) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NinNestedStructUnion) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NinNestedStructUnion{`, + `Field1:` + strings.Replace(fmt.Sprintf("%v", this.Field1), "NinOptNativeUnion", "NinOptNativeUnion", 1) + `,`, + `Field2:` + strings.Replace(fmt.Sprintf("%v", this.Field2), "NinOptStructUnion", "NinOptStructUnion", 1) + `,`, + `Field3:` + strings.Replace(fmt.Sprintf("%v", this.Field3), "NinEmbeddedStructUnion", "NinEmbeddedStructUnion", 1) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *Tree) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&Tree{`, + `Or:` + strings.Replace(fmt.Sprintf("%v", this.Or), "OrBranch", "OrBranch", 1) + `,`, + `And:` + strings.Replace(fmt.Sprintf("%v", this.And), "AndBranch", "AndBranch", 1) + `,`, + `Leaf:` + strings.Replace(fmt.Sprintf("%v", this.Leaf), "Leaf", "Leaf", 1) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *OrBranch) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&OrBranch{`, + `Left:` + strings.Replace(strings.Replace(this.Left.String(), "Tree", "Tree", 1), `&`, ``, 1) + `,`, + `Right:` + strings.Replace(strings.Replace(this.Right.String(), "Tree", "Tree", 1), `&`, ``, 1) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *AndBranch) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&AndBranch{`, + `Left:` + strings.Replace(strings.Replace(this.Left.String(), "Tree", "Tree", 1), `&`, ``, 1) + `,`, + `Right:` + strings.Replace(strings.Replace(this.Right.String(), "Tree", "Tree", 1), `&`, ``, 1) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *Leaf) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&Leaf{`, + `Value:` + fmt.Sprintf("%v", this.Value) + `,`, + `StrValue:` + fmt.Sprintf("%v", this.StrValue) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *DeepTree) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&DeepTree{`, + `Down:` + strings.Replace(fmt.Sprintf("%v", this.Down), "ADeepBranch", "ADeepBranch", 1) + `,`, + `And:` + strings.Replace(fmt.Sprintf("%v", this.And), "AndDeepBranch", "AndDeepBranch", 1) + `,`, + `Leaf:` + strings.Replace(fmt.Sprintf("%v", this.Leaf), "DeepLeaf", "DeepLeaf", 1) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *ADeepBranch) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&ADeepBranch{`, + `Down:` + strings.Replace(strings.Replace(this.Down.String(), "DeepTree", "DeepTree", 1), `&`, ``, 1) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *AndDeepBranch) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&AndDeepBranch{`, + `Left:` + strings.Replace(strings.Replace(this.Left.String(), "DeepTree", "DeepTree", 1), `&`, ``, 1) + `,`, + `Right:` + strings.Replace(strings.Replace(this.Right.String(), "DeepTree", "DeepTree", 1), `&`, ``, 1) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *DeepLeaf) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&DeepLeaf{`, + `Tree:` + strings.Replace(strings.Replace(this.Tree.String(), "Tree", "Tree", 1), `&`, ``, 1) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *Nil) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&Nil{`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NidOptEnum) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NidOptEnum{`, + `Field1:` + fmt.Sprintf("%v", this.Field1) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NinOptEnum) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NinOptEnum{`, + `Field1:` + valueToStringThetest(this.Field1) + `,`, + `Field2:` + valueToStringThetest(this.Field2) + `,`, + `Field3:` + valueToStringThetest(this.Field3) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NidRepEnum) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NidRepEnum{`, + `Field1:` + fmt.Sprintf("%v", this.Field1) + `,`, + `Field2:` + fmt.Sprintf("%v", this.Field2) + `,`, + `Field3:` + fmt.Sprintf("%v", this.Field3) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NinRepEnum) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NinRepEnum{`, + `Field1:` + fmt.Sprintf("%v", this.Field1) + `,`, + `Field2:` + fmt.Sprintf("%v", this.Field2) + `,`, + `Field3:` + fmt.Sprintf("%v", this.Field3) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NinOptEnumDefault) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NinOptEnumDefault{`, + `Field1:` + valueToStringThetest(this.Field1) + `,`, + `Field2:` + valueToStringThetest(this.Field2) + `,`, + `Field3:` + valueToStringThetest(this.Field3) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *AnotherNinOptEnum) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&AnotherNinOptEnum{`, + `Field1:` + valueToStringThetest(this.Field1) + `,`, + `Field2:` + valueToStringThetest(this.Field2) + `,`, + `Field3:` + valueToStringThetest(this.Field3) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *AnotherNinOptEnumDefault) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&AnotherNinOptEnumDefault{`, + `Field1:` + valueToStringThetest(this.Field1) + `,`, + `Field2:` + valueToStringThetest(this.Field2) + `,`, + `Field3:` + valueToStringThetest(this.Field3) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *Timer) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&Timer{`, + `Time1:` + fmt.Sprintf("%v", this.Time1) + `,`, + `Time2:` + fmt.Sprintf("%v", this.Time2) + `,`, + `Data:` + fmt.Sprintf("%v", this.Data) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *MyExtendable) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&MyExtendable{`, + `Field1:` + valueToStringThetest(this.Field1) + `,`, + `XXX_extensions:` + proto.StringFromExtensionsMap(this.XXX_extensions) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *OtherExtenable) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&OtherExtenable{`, + `Field2:` + valueToStringThetest(this.Field2) + `,`, + `Field13:` + valueToStringThetest(this.Field13) + `,`, + `M:` + strings.Replace(fmt.Sprintf("%v", this.M), "MyExtendable", "MyExtendable", 1) + `,`, + `XXX_extensions:` + proto.StringFromExtensionsMap(this.XXX_extensions) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NestedDefinition) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NestedDefinition{`, + `Field1:` + valueToStringThetest(this.Field1) + `,`, + `EnumField:` + valueToStringThetest(this.EnumField) + `,`, + `NNM:` + strings.Replace(fmt.Sprintf("%v", this.NNM), "NestedDefinition_NestedMessage_NestedNestedMsg", "NestedDefinition_NestedMessage_NestedNestedMsg", 1) + `,`, + `NM:` + strings.Replace(fmt.Sprintf("%v", this.NM), "NestedDefinition_NestedMessage", "NestedDefinition_NestedMessage", 1) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NestedDefinition_NestedMessage) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NestedDefinition_NestedMessage{`, + `NestedField1:` + valueToStringThetest(this.NestedField1) + `,`, + `NNM:` + strings.Replace(fmt.Sprintf("%v", this.NNM), "NestedDefinition_NestedMessage_NestedNestedMsg", "NestedDefinition_NestedMessage_NestedNestedMsg", 1) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NestedDefinition_NestedMessage_NestedNestedMsg) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NestedDefinition_NestedMessage_NestedNestedMsg{`, + `NestedNestedField1:` + valueToStringThetest(this.NestedNestedField1) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NestedScope) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NestedScope{`, + `A:` + strings.Replace(fmt.Sprintf("%v", this.A), "NestedDefinition_NestedMessage_NestedNestedMsg", "NestedDefinition_NestedMessage_NestedNestedMsg", 1) + `,`, + `B:` + valueToStringThetest(this.B) + `,`, + `C:` + strings.Replace(fmt.Sprintf("%v", this.C), "NestedDefinition_NestedMessage", "NestedDefinition_NestedMessage", 1) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NinOptNativeDefault) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NinOptNativeDefault{`, + `Field1:` + valueToStringThetest(this.Field1) + `,`, + `Field2:` + valueToStringThetest(this.Field2) + `,`, + `Field3:` + valueToStringThetest(this.Field3) + `,`, + `Field4:` + valueToStringThetest(this.Field4) + `,`, + `Field5:` + valueToStringThetest(this.Field5) + `,`, + `Field6:` + valueToStringThetest(this.Field6) + `,`, + `Field7:` + valueToStringThetest(this.Field7) + `,`, + `Field8:` + valueToStringThetest(this.Field8) + `,`, + `Field9:` + valueToStringThetest(this.Field9) + `,`, + `Field10:` + valueToStringThetest(this.Field10) + `,`, + `Field11:` + valueToStringThetest(this.Field11) + `,`, + `Field12:` + valueToStringThetest(this.Field12) + `,`, + `Field13:` + valueToStringThetest(this.Field13) + `,`, + `Field14:` + valueToStringThetest(this.Field14) + `,`, + `Field15:` + valueToStringThetest(this.Field15) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *CustomContainer) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&CustomContainer{`, + `CustomStruct:` + strings.Replace(strings.Replace(this.CustomStruct.String(), "NidOptCustom", "NidOptCustom", 1), `&`, ``, 1) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *CustomNameNidOptNative) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&CustomNameNidOptNative{`, + `FieldA:` + fmt.Sprintf("%v", this.FieldA) + `,`, + `FieldB:` + fmt.Sprintf("%v", this.FieldB) + `,`, + `FieldC:` + fmt.Sprintf("%v", this.FieldC) + `,`, + `FieldD:` + fmt.Sprintf("%v", this.FieldD) + `,`, + `FieldE:` + fmt.Sprintf("%v", this.FieldE) + `,`, + `FieldF:` + fmt.Sprintf("%v", this.FieldF) + `,`, + `FieldG:` + fmt.Sprintf("%v", this.FieldG) + `,`, + `FieldH:` + fmt.Sprintf("%v", this.FieldH) + `,`, + `FieldI:` + fmt.Sprintf("%v", this.FieldI) + `,`, + `FieldJ:` + fmt.Sprintf("%v", this.FieldJ) + `,`, + `FieldK:` + fmt.Sprintf("%v", this.FieldK) + `,`, + `FieldL:` + fmt.Sprintf("%v", this.FieldL) + `,`, + `FieldM:` + fmt.Sprintf("%v", this.FieldM) + `,`, + `FieldN:` + fmt.Sprintf("%v", this.FieldN) + `,`, + `FieldO:` + fmt.Sprintf("%v", this.FieldO) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *CustomNameNinOptNative) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&CustomNameNinOptNative{`, + `FieldA:` + valueToStringThetest(this.FieldA) + `,`, + `FieldB:` + valueToStringThetest(this.FieldB) + `,`, + `FieldC:` + valueToStringThetest(this.FieldC) + `,`, + `FieldD:` + valueToStringThetest(this.FieldD) + `,`, + `FieldE:` + valueToStringThetest(this.FieldE) + `,`, + `FieldF:` + valueToStringThetest(this.FieldF) + `,`, + `FieldG:` + valueToStringThetest(this.FieldG) + `,`, + `FieldH:` + valueToStringThetest(this.FieldH) + `,`, + `FieldI:` + valueToStringThetest(this.FieldI) + `,`, + `FieldJ:` + valueToStringThetest(this.FieldJ) + `,`, + `FieldK:` + valueToStringThetest(this.FieldK) + `,`, + `FielL:` + valueToStringThetest(this.FielL) + `,`, + `FieldM:` + valueToStringThetest(this.FieldM) + `,`, + `FieldN:` + valueToStringThetest(this.FieldN) + `,`, + `FieldO:` + valueToStringThetest(this.FieldO) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *CustomNameNinRepNative) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&CustomNameNinRepNative{`, + `FieldA:` + fmt.Sprintf("%v", this.FieldA) + `,`, + `FieldB:` + fmt.Sprintf("%v", this.FieldB) + `,`, + `FieldC:` + fmt.Sprintf("%v", this.FieldC) + `,`, + `FieldD:` + fmt.Sprintf("%v", this.FieldD) + `,`, + `FieldE:` + fmt.Sprintf("%v", this.FieldE) + `,`, + `FieldF:` + fmt.Sprintf("%v", this.FieldF) + `,`, + `FieldG:` + fmt.Sprintf("%v", this.FieldG) + `,`, + `FieldH:` + fmt.Sprintf("%v", this.FieldH) + `,`, + `FieldI:` + fmt.Sprintf("%v", this.FieldI) + `,`, + `FieldJ:` + fmt.Sprintf("%v", this.FieldJ) + `,`, + `FieldK:` + fmt.Sprintf("%v", this.FieldK) + `,`, + `FieldL:` + fmt.Sprintf("%v", this.FieldL) + `,`, + `FieldM:` + fmt.Sprintf("%v", this.FieldM) + `,`, + `FieldN:` + fmt.Sprintf("%v", this.FieldN) + `,`, + `FieldO:` + fmt.Sprintf("%v", this.FieldO) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *CustomNameNinStruct) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&CustomNameNinStruct{`, + `FieldA:` + valueToStringThetest(this.FieldA) + `,`, + `FieldB:` + valueToStringThetest(this.FieldB) + `,`, + `FieldC:` + strings.Replace(fmt.Sprintf("%v", this.FieldC), "NidOptNative", "NidOptNative", 1) + `,`, + `FieldD:` + strings.Replace(fmt.Sprintf("%v", this.FieldD), "NinOptNative", "NinOptNative", 1) + `,`, + `FieldE:` + valueToStringThetest(this.FieldE) + `,`, + `FieldF:` + valueToStringThetest(this.FieldF) + `,`, + `FieldG:` + strings.Replace(fmt.Sprintf("%v", this.FieldG), "NidOptNative", "NidOptNative", 1) + `,`, + `FieldH:` + valueToStringThetest(this.FieldH) + `,`, + `FieldI:` + valueToStringThetest(this.FieldI) + `,`, + `FieldJ:` + valueToStringThetest(this.FieldJ) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *CustomNameCustomType) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&CustomNameCustomType{`, + `FieldA:` + valueToStringThetest(this.FieldA) + `,`, + `FieldB:` + valueToStringThetest(this.FieldB) + `,`, + `FieldC:` + fmt.Sprintf("%v", this.FieldC) + `,`, + `FieldD:` + fmt.Sprintf("%v", this.FieldD) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *CustomNameNinEmbeddedStructUnion) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&CustomNameNinEmbeddedStructUnion{`, + `NidOptNative:` + strings.Replace(fmt.Sprintf("%v", this.NidOptNative), "NidOptNative", "NidOptNative", 1) + `,`, + `FieldA:` + strings.Replace(fmt.Sprintf("%v", this.FieldA), "NinOptNative", "NinOptNative", 1) + `,`, + `FieldB:` + valueToStringThetest(this.FieldB) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *CustomNameEnum) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&CustomNameEnum{`, + `FieldA:` + valueToStringThetest(this.FieldA) + `,`, + `FieldB:` + fmt.Sprintf("%v", this.FieldB) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NoExtensionsMap) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NoExtensionsMap{`, + `Field1:` + valueToStringThetest(this.Field1) + `,`, + `XXX_extensions:` + proto.StringFromExtensionsBytes(this.XXX_extensions) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *Unrecognized) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&Unrecognized{`, + `Field1:` + valueToStringThetest(this.Field1) + `,`, + `}`, + }, "") + return s +} +func (this *UnrecognizedWithInner) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&UnrecognizedWithInner{`, + `Embedded:` + strings.Replace(fmt.Sprintf("%v", this.Embedded), "UnrecognizedWithInner_Inner", "UnrecognizedWithInner_Inner", 1) + `,`, + `Field2:` + valueToStringThetest(this.Field2) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *UnrecognizedWithInner_Inner) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&UnrecognizedWithInner_Inner{`, + `Field1:` + valueToStringThetest(this.Field1) + `,`, + `}`, + }, "") + return s +} +func (this *UnrecognizedWithEmbed) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&UnrecognizedWithEmbed{`, + `UnrecognizedWithEmbed_Embedded:` + strings.Replace(strings.Replace(this.UnrecognizedWithEmbed_Embedded.String(), "UnrecognizedWithEmbed_Embedded", "UnrecognizedWithEmbed_Embedded", 1), `&`, ``, 1) + `,`, + `Field2:` + valueToStringThetest(this.Field2) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *UnrecognizedWithEmbed_Embedded) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&UnrecognizedWithEmbed_Embedded{`, + `Field1:` + valueToStringThetest(this.Field1) + `,`, + `}`, + }, "") + return s +} +func (this *Node) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&Node{`, + `Label:` + valueToStringThetest(this.Label) + `,`, + `Children:` + strings.Replace(fmt.Sprintf("%v", this.Children), "Node", "Node", 1) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func valueToStringThetest(v interface{}) string { + rv := reflect.ValueOf(v) + if rv.IsNil() { + return "nil" + } + pv := reflect.Indirect(rv).Interface() + return fmt.Sprintf("*%v", pv) +} +func (this *NinOptNativeUnion) GetValue() interface{} { + if this.Field1 != nil { + return this.Field1 + } + if this.Field2 != nil { + return this.Field2 + } + if this.Field3 != nil { + return this.Field3 + } + if this.Field4 != nil { + return this.Field4 + } + if this.Field5 != nil { + return this.Field5 + } + if this.Field6 != nil { + return this.Field6 + } + if this.Field13 != nil { + return this.Field13 + } + if this.Field14 != nil { + return this.Field14 + } + if this.Field15 != nil { + return this.Field15 + } + return nil +} + +func (this *NinOptNativeUnion) SetValue(value interface{}) bool { + switch vt := value.(type) { + case *float64: + this.Field1 = vt + case *float32: + this.Field2 = vt + case *int32: + this.Field3 = vt + case *int64: + this.Field4 = vt + case *uint32: + this.Field5 = vt + case *uint64: + this.Field6 = vt + case *bool: + this.Field13 = vt + case *string: + this.Field14 = vt + case []byte: + this.Field15 = vt + default: + return false + } + return true +} +func (this *NinOptStructUnion) GetValue() interface{} { + if this.Field1 != nil { + return this.Field1 + } + if this.Field2 != nil { + return this.Field2 + } + if this.Field3 != nil { + return this.Field3 + } + if this.Field4 != nil { + return this.Field4 + } + if this.Field6 != nil { + return this.Field6 + } + if this.Field7 != nil { + return this.Field7 + } + if this.Field13 != nil { + return this.Field13 + } + if this.Field14 != nil { + return this.Field14 + } + if this.Field15 != nil { + return this.Field15 + } + return nil +} + +func (this *NinOptStructUnion) SetValue(value interface{}) bool { + switch vt := value.(type) { + case *float64: + this.Field1 = vt + case *float32: + this.Field2 = vt + case *NidOptNative: + this.Field3 = vt + case *NinOptNative: + this.Field4 = vt + case *uint64: + this.Field6 = vt + case *int32: + this.Field7 = vt + case *bool: + this.Field13 = vt + case *string: + this.Field14 = vt + case []byte: + this.Field15 = vt + default: + return false + } + return true +} +func (this *NinEmbeddedStructUnion) GetValue() interface{} { + if this.NidOptNative != nil { + return this.NidOptNative + } + if this.Field200 != nil { + return this.Field200 + } + if this.Field210 != nil { + return this.Field210 + } + return nil +} + +func (this *NinEmbeddedStructUnion) SetValue(value interface{}) bool { + switch vt := value.(type) { + case *NidOptNative: + this.NidOptNative = vt + case *NinOptNative: + this.Field200 = vt + case *bool: + this.Field210 = vt + default: + return false + } + return true +} +func (this *NinNestedStructUnion) GetValue() interface{} { + if this.Field1 != nil { + return this.Field1 + } + if this.Field2 != nil { + return this.Field2 + } + if this.Field3 != nil { + return this.Field3 + } + return nil +} + +func (this *NinNestedStructUnion) SetValue(value interface{}) bool { + switch vt := value.(type) { + case *NinOptNativeUnion: + this.Field1 = vt + case *NinOptStructUnion: + this.Field2 = vt + case *NinEmbeddedStructUnion: + this.Field3 = vt + default: + this.Field1 = new(NinOptNativeUnion) + if set := this.Field1.SetValue(value); set { + return true + } + this.Field1 = nil + this.Field2 = new(NinOptStructUnion) + if set := this.Field2.SetValue(value); set { + return true + } + this.Field2 = nil + this.Field3 = new(NinEmbeddedStructUnion) + if set := this.Field3.SetValue(value); set { + return true + } + this.Field3 = nil + return false + } + return true +} +func (this *Tree) GetValue() interface{} { + if this.Or != nil { + return this.Or + } + if this.And != nil { + return this.And + } + if this.Leaf != nil { + return this.Leaf + } + return nil +} + +func (this *Tree) SetValue(value interface{}) bool { + switch vt := value.(type) { + case *OrBranch: + this.Or = vt + case *AndBranch: + this.And = vt + case *Leaf: + this.Leaf = vt + default: + return false + } + return true +} +func (this *DeepTree) GetValue() interface{} { + if this.Down != nil { + return this.Down + } + if this.And != nil { + return this.And + } + if this.Leaf != nil { + return this.Leaf + } + return nil +} + +func (this *DeepTree) SetValue(value interface{}) bool { + switch vt := value.(type) { + case *ADeepBranch: + this.Down = vt + case *AndDeepBranch: + this.And = vt + case *DeepLeaf: + this.Leaf = vt + default: + return false + } + return true +} +func (this *CustomNameNinEmbeddedStructUnion) GetValue() interface{} { + if this.NidOptNative != nil { + return this.NidOptNative + } + if this.FieldA != nil { + return this.FieldA + } + if this.FieldB != nil { + return this.FieldB + } + return nil +} + +func (this *CustomNameNinEmbeddedStructUnion) SetValue(value interface{}) bool { + switch vt := value.(type) { + case *NidOptNative: + this.NidOptNative = vt + case *NinOptNative: + this.FieldA = vt + case *bool: + this.FieldB = vt + default: + return false + } + return true +} +func (m *NidOptNative) 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 ErrIntOverflowThetest + } + 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: NidOptNative: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: NidOptNative: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field Field1", 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.Field1 = float64(math.Float64frombits(v)) + case 2: + if wireType != 5 { + return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType) + } + var v uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + iNdEx += 4 + v = uint32(data[iNdEx-4]) + v |= uint32(data[iNdEx-3]) << 8 + v |= uint32(data[iNdEx-2]) << 16 + v |= uint32(data[iNdEx-1]) << 24 + m.Field2 = float32(math.Float32frombits(v)) + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field3", wireType) + } + m.Field3 = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + m.Field3 |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field4", wireType) + } + m.Field4 = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + m.Field4 |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + case 5: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field5", wireType) + } + m.Field5 = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + m.Field5 |= (uint32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + case 6: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field6", wireType) + } + m.Field6 = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + m.Field6 |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + case 7: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field7", wireType) + } + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + v = int32((uint32(v) >> 1) ^ uint32(((v&1)<<31)>>31)) + m.Field7 = v + case 8: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field8", wireType) + } + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + v = (v >> 1) ^ uint64((int64(v&1)<<63)>>63) + m.Field8 = int64(v) + case 9: + if wireType != 5 { + return fmt.Errorf("proto: wrong wireType = %d for field Field9", wireType) + } + m.Field9 = 0 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + iNdEx += 4 + m.Field9 = uint32(data[iNdEx-4]) + m.Field9 |= uint32(data[iNdEx-3]) << 8 + m.Field9 |= uint32(data[iNdEx-2]) << 16 + m.Field9 |= uint32(data[iNdEx-1]) << 24 + case 10: + if wireType != 5 { + return fmt.Errorf("proto: wrong wireType = %d for field Field10", wireType) + } + m.Field10 = 0 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + iNdEx += 4 + m.Field10 = int32(data[iNdEx-4]) + m.Field10 |= int32(data[iNdEx-3]) << 8 + m.Field10 |= int32(data[iNdEx-2]) << 16 + m.Field10 |= int32(data[iNdEx-1]) << 24 + case 11: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field Field11", wireType) + } + m.Field11 = 0 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + iNdEx += 8 + m.Field11 = uint64(data[iNdEx-8]) + m.Field11 |= uint64(data[iNdEx-7]) << 8 + m.Field11 |= uint64(data[iNdEx-6]) << 16 + m.Field11 |= uint64(data[iNdEx-5]) << 24 + m.Field11 |= uint64(data[iNdEx-4]) << 32 + m.Field11 |= uint64(data[iNdEx-3]) << 40 + m.Field11 |= uint64(data[iNdEx-2]) << 48 + m.Field11 |= uint64(data[iNdEx-1]) << 56 + case 12: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field Field12", wireType) + } + m.Field12 = 0 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + iNdEx += 8 + m.Field12 = int64(data[iNdEx-8]) + m.Field12 |= int64(data[iNdEx-7]) << 8 + m.Field12 |= int64(data[iNdEx-6]) << 16 + m.Field12 |= int64(data[iNdEx-5]) << 24 + m.Field12 |= int64(data[iNdEx-4]) << 32 + m.Field12 |= int64(data[iNdEx-3]) << 40 + m.Field12 |= int64(data[iNdEx-2]) << 48 + m.Field12 |= int64(data[iNdEx-1]) << 56 + case 13: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field13", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field13 = bool(v != 0) + case 14: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field14", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + 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 ErrInvalidLengthThetest + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Field14 = string(data[iNdEx:postIndex]) + iNdEx = postIndex + case 15: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field15", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + byteLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Field15 = append(m.Field15[:0], data[iNdEx:postIndex]...) + if m.Field15 == nil { + m.Field15 = []byte{} + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipThetest(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetest + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *NinOptNative) 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 ErrIntOverflowThetest + } + 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: NinOptNative: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: NinOptNative: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field Field1", 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.Field1 = &v2 + case 2: + if wireType != 5 { + return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType) + } + var v uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + iNdEx += 4 + v = uint32(data[iNdEx-4]) + v |= uint32(data[iNdEx-3]) << 8 + v |= uint32(data[iNdEx-2]) << 16 + v |= uint32(data[iNdEx-1]) << 24 + v2 := float32(math.Float32frombits(v)) + m.Field2 = &v2 + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field3", wireType) + } + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field3 = &v + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field4", wireType) + } + var v int64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field4 = &v + case 5: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field5", wireType) + } + var v uint32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (uint32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field5 = &v + case 6: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field6", wireType) + } + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field6 = &v + case 7: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field7", wireType) + } + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + v = int32((uint32(v) >> 1) ^ uint32(((v&1)<<31)>>31)) + m.Field7 = &v + case 8: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field8", wireType) + } + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + v = (v >> 1) ^ uint64((int64(v&1)<<63)>>63) + v2 := int64(v) + m.Field8 = &v2 + case 9: + if wireType != 5 { + return fmt.Errorf("proto: wrong wireType = %d for field Field9", wireType) + } + var v uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + iNdEx += 4 + v = uint32(data[iNdEx-4]) + v |= uint32(data[iNdEx-3]) << 8 + v |= uint32(data[iNdEx-2]) << 16 + v |= uint32(data[iNdEx-1]) << 24 + m.Field9 = &v + case 10: + if wireType != 5 { + return fmt.Errorf("proto: wrong wireType = %d for field Field10", wireType) + } + var v int32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + iNdEx += 4 + v = int32(data[iNdEx-4]) + v |= int32(data[iNdEx-3]) << 8 + v |= int32(data[iNdEx-2]) << 16 + v |= int32(data[iNdEx-1]) << 24 + m.Field10 = &v + case 11: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field Field11", 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.Field11 = &v + case 12: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field Field12", wireType) + } + var v int64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + iNdEx += 8 + v = int64(data[iNdEx-8]) + v |= int64(data[iNdEx-7]) << 8 + v |= int64(data[iNdEx-6]) << 16 + v |= int64(data[iNdEx-5]) << 24 + v |= int64(data[iNdEx-4]) << 32 + v |= int64(data[iNdEx-3]) << 40 + v |= int64(data[iNdEx-2]) << 48 + v |= int64(data[iNdEx-1]) << 56 + m.Field12 = &v + case 13: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field13", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + b := bool(v != 0) + m.Field13 = &b + case 14: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field14", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + 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 ErrInvalidLengthThetest + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + s := string(data[iNdEx:postIndex]) + m.Field14 = &s + iNdEx = postIndex + case 15: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field15", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + byteLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Field15 = append(m.Field15[:0], data[iNdEx:postIndex]...) + if m.Field15 == nil { + m.Field15 = []byte{} + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipThetest(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetest + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *NidRepNative) 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 ErrIntOverflowThetest + } + 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: NidRepNative: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: NidRepNative: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field Field1", 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.Field1 = append(m.Field1, v2) + case 2: + if wireType != 5 { + return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType) + } + var v uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + iNdEx += 4 + v = uint32(data[iNdEx-4]) + v |= uint32(data[iNdEx-3]) << 8 + v |= uint32(data[iNdEx-2]) << 16 + v |= uint32(data[iNdEx-1]) << 24 + v2 := float32(math.Float32frombits(v)) + m.Field2 = append(m.Field2, v2) + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field3", wireType) + } + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field3 = append(m.Field3, v) + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field4", wireType) + } + var v int64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field4 = append(m.Field4, v) + case 5: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field5", wireType) + } + var v uint32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (uint32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field5 = append(m.Field5, v) + case 6: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field6", wireType) + } + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field6 = append(m.Field6, v) + case 7: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field7", wireType) + } + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + v = int32((uint32(v) >> 1) ^ uint32(((v&1)<<31)>>31)) + m.Field7 = append(m.Field7, v) + case 8: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field8", wireType) + } + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + v = (v >> 1) ^ uint64((int64(v&1)<<63)>>63) + m.Field8 = append(m.Field8, int64(v)) + case 9: + if wireType != 5 { + return fmt.Errorf("proto: wrong wireType = %d for field Field9", wireType) + } + var v uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + iNdEx += 4 + v = uint32(data[iNdEx-4]) + v |= uint32(data[iNdEx-3]) << 8 + v |= uint32(data[iNdEx-2]) << 16 + v |= uint32(data[iNdEx-1]) << 24 + m.Field9 = append(m.Field9, v) + case 10: + if wireType != 5 { + return fmt.Errorf("proto: wrong wireType = %d for field Field10", wireType) + } + var v int32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + iNdEx += 4 + v = int32(data[iNdEx-4]) + v |= int32(data[iNdEx-3]) << 8 + v |= int32(data[iNdEx-2]) << 16 + v |= int32(data[iNdEx-1]) << 24 + m.Field10 = append(m.Field10, v) + case 11: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field Field11", 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.Field11 = append(m.Field11, v) + case 12: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field Field12", wireType) + } + var v int64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + iNdEx += 8 + v = int64(data[iNdEx-8]) + v |= int64(data[iNdEx-7]) << 8 + v |= int64(data[iNdEx-6]) << 16 + v |= int64(data[iNdEx-5]) << 24 + v |= int64(data[iNdEx-4]) << 32 + v |= int64(data[iNdEx-3]) << 40 + v |= int64(data[iNdEx-2]) << 48 + v |= int64(data[iNdEx-1]) << 56 + m.Field12 = append(m.Field12, v) + case 13: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field13", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field13 = append(m.Field13, bool(v != 0)) + case 14: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field14", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + 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 ErrInvalidLengthThetest + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Field14 = append(m.Field14, string(data[iNdEx:postIndex])) + iNdEx = postIndex + case 15: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field15", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + byteLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Field15 = append(m.Field15, make([]byte, postIndex-iNdEx)) + copy(m.Field15[len(m.Field15)-1], data[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipThetest(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetest + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *NinRepNative) 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 ErrIntOverflowThetest + } + 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: NinRepNative: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: NinRepNative: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field Field1", 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.Field1 = append(m.Field1, v2) + case 2: + if wireType != 5 { + return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType) + } + var v uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + iNdEx += 4 + v = uint32(data[iNdEx-4]) + v |= uint32(data[iNdEx-3]) << 8 + v |= uint32(data[iNdEx-2]) << 16 + v |= uint32(data[iNdEx-1]) << 24 + v2 := float32(math.Float32frombits(v)) + m.Field2 = append(m.Field2, v2) + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field3", wireType) + } + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field3 = append(m.Field3, v) + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field4", wireType) + } + var v int64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field4 = append(m.Field4, v) + case 5: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field5", wireType) + } + var v uint32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (uint32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field5 = append(m.Field5, v) + case 6: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field6", wireType) + } + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field6 = append(m.Field6, v) + case 7: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field7", wireType) + } + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + v = int32((uint32(v) >> 1) ^ uint32(((v&1)<<31)>>31)) + m.Field7 = append(m.Field7, v) + case 8: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field8", wireType) + } + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + v = (v >> 1) ^ uint64((int64(v&1)<<63)>>63) + m.Field8 = append(m.Field8, int64(v)) + case 9: + if wireType != 5 { + return fmt.Errorf("proto: wrong wireType = %d for field Field9", wireType) + } + var v uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + iNdEx += 4 + v = uint32(data[iNdEx-4]) + v |= uint32(data[iNdEx-3]) << 8 + v |= uint32(data[iNdEx-2]) << 16 + v |= uint32(data[iNdEx-1]) << 24 + m.Field9 = append(m.Field9, v) + case 10: + if wireType != 5 { + return fmt.Errorf("proto: wrong wireType = %d for field Field10", wireType) + } + var v int32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + iNdEx += 4 + v = int32(data[iNdEx-4]) + v |= int32(data[iNdEx-3]) << 8 + v |= int32(data[iNdEx-2]) << 16 + v |= int32(data[iNdEx-1]) << 24 + m.Field10 = append(m.Field10, v) + case 11: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field Field11", 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.Field11 = append(m.Field11, v) + case 12: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field Field12", wireType) + } + var v int64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + iNdEx += 8 + v = int64(data[iNdEx-8]) + v |= int64(data[iNdEx-7]) << 8 + v |= int64(data[iNdEx-6]) << 16 + v |= int64(data[iNdEx-5]) << 24 + v |= int64(data[iNdEx-4]) << 32 + v |= int64(data[iNdEx-3]) << 40 + v |= int64(data[iNdEx-2]) << 48 + v |= int64(data[iNdEx-1]) << 56 + m.Field12 = append(m.Field12, v) + case 13: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field13", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field13 = append(m.Field13, bool(v != 0)) + case 14: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field14", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + 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 ErrInvalidLengthThetest + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Field14 = append(m.Field14, string(data[iNdEx:postIndex])) + iNdEx = postIndex + case 15: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field15", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + byteLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Field15 = append(m.Field15, make([]byte, postIndex-iNdEx)) + copy(m.Field15[len(m.Field15)-1], data[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipThetest(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetest + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *NidRepPackedNative) 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 ErrIntOverflowThetest + } + 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: NidRepPackedNative: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: NidRepPackedNative: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + for iNdEx < postIndex { + 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.Field1 = append(m.Field1, v2) + } + } else if wireType == 1 { + 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.Field1 = append(m.Field1, v2) + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) + } + case 2: + if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + for iNdEx < postIndex { + var v uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + iNdEx += 4 + v = uint32(data[iNdEx-4]) + v |= uint32(data[iNdEx-3]) << 8 + v |= uint32(data[iNdEx-2]) << 16 + v |= uint32(data[iNdEx-1]) << 24 + v2 := float32(math.Float32frombits(v)) + m.Field2 = append(m.Field2, v2) + } + } else if wireType == 5 { + var v uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + iNdEx += 4 + v = uint32(data[iNdEx-4]) + v |= uint32(data[iNdEx-3]) << 8 + v |= uint32(data[iNdEx-2]) << 16 + v |= uint32(data[iNdEx-1]) << 24 + v2 := float32(math.Float32frombits(v)) + m.Field2 = append(m.Field2, v2) + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType) + } + case 3: + if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + for iNdEx < postIndex { + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field3 = append(m.Field3, v) + } + } else if wireType == 0 { + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field3 = append(m.Field3, v) + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field3", wireType) + } + case 4: + if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + for iNdEx < postIndex { + var v int64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field4 = append(m.Field4, v) + } + } else if wireType == 0 { + var v int64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field4 = append(m.Field4, v) + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field4", wireType) + } + case 5: + if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthThetest + } + 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 ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (uint32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field5 = append(m.Field5, v) + } + } else if wireType == 0 { + var v uint32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (uint32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field5 = append(m.Field5, v) + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field5", wireType) + } + case 6: + if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + for iNdEx < postIndex { + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field6 = append(m.Field6, v) + } + } else if wireType == 0 { + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field6 = append(m.Field6, v) + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field6", wireType) + } + case 7: + if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + for iNdEx < postIndex { + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + v = int32((uint32(v) >> 1) ^ uint32(((v&1)<<31)>>31)) + m.Field7 = append(m.Field7, v) + } + } else if wireType == 0 { + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + v = int32((uint32(v) >> 1) ^ uint32(((v&1)<<31)>>31)) + m.Field7 = append(m.Field7, v) + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field7", wireType) + } + case 8: + if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + for iNdEx < postIndex { + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + v = (v >> 1) ^ uint64((int64(v&1)<<63)>>63) + m.Field8 = append(m.Field8, int64(v)) + } + } else if wireType == 0 { + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + v = (v >> 1) ^ uint64((int64(v&1)<<63)>>63) + m.Field8 = append(m.Field8, int64(v)) + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field8", wireType) + } + case 9: + if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + for iNdEx < postIndex { + var v uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + iNdEx += 4 + v = uint32(data[iNdEx-4]) + v |= uint32(data[iNdEx-3]) << 8 + v |= uint32(data[iNdEx-2]) << 16 + v |= uint32(data[iNdEx-1]) << 24 + m.Field9 = append(m.Field9, v) + } + } else if wireType == 5 { + var v uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + iNdEx += 4 + v = uint32(data[iNdEx-4]) + v |= uint32(data[iNdEx-3]) << 8 + v |= uint32(data[iNdEx-2]) << 16 + v |= uint32(data[iNdEx-1]) << 24 + m.Field9 = append(m.Field9, v) + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field9", wireType) + } + case 10: + if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + for iNdEx < postIndex { + var v int32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + iNdEx += 4 + v = int32(data[iNdEx-4]) + v |= int32(data[iNdEx-3]) << 8 + v |= int32(data[iNdEx-2]) << 16 + v |= int32(data[iNdEx-1]) << 24 + m.Field10 = append(m.Field10, v) + } + } else if wireType == 5 { + var v int32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + iNdEx += 4 + v = int32(data[iNdEx-4]) + v |= int32(data[iNdEx-3]) << 8 + v |= int32(data[iNdEx-2]) << 16 + v |= int32(data[iNdEx-1]) << 24 + m.Field10 = append(m.Field10, v) + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field10", wireType) + } + case 11: + if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + for iNdEx < postIndex { + 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.Field11 = append(m.Field11, v) + } + } else if wireType == 1 { + 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.Field11 = append(m.Field11, v) + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field11", wireType) + } + case 12: + if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + for iNdEx < postIndex { + var v int64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + iNdEx += 8 + v = int64(data[iNdEx-8]) + v |= int64(data[iNdEx-7]) << 8 + v |= int64(data[iNdEx-6]) << 16 + v |= int64(data[iNdEx-5]) << 24 + v |= int64(data[iNdEx-4]) << 32 + v |= int64(data[iNdEx-3]) << 40 + v |= int64(data[iNdEx-2]) << 48 + v |= int64(data[iNdEx-1]) << 56 + m.Field12 = append(m.Field12, v) + } + } else if wireType == 1 { + var v int64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + iNdEx += 8 + v = int64(data[iNdEx-8]) + v |= int64(data[iNdEx-7]) << 8 + v |= int64(data[iNdEx-6]) << 16 + v |= int64(data[iNdEx-5]) << 24 + v |= int64(data[iNdEx-4]) << 32 + v |= int64(data[iNdEx-3]) << 40 + v |= int64(data[iNdEx-2]) << 48 + v |= int64(data[iNdEx-1]) << 56 + m.Field12 = append(m.Field12, v) + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field12", wireType) + } + case 13: + if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + for iNdEx < postIndex { + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field13 = append(m.Field13, bool(v != 0)) + } + } else if wireType == 0 { + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field13 = append(m.Field13, bool(v != 0)) + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field13", wireType) + } + default: + iNdEx = preIndex + skippy, err := skipThetest(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetest + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *NinRepPackedNative) 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 ErrIntOverflowThetest + } + 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: NinRepPackedNative: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: NinRepPackedNative: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + for iNdEx < postIndex { + 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.Field1 = append(m.Field1, v2) + } + } else if wireType == 1 { + 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.Field1 = append(m.Field1, v2) + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) + } + case 2: + if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + for iNdEx < postIndex { + var v uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + iNdEx += 4 + v = uint32(data[iNdEx-4]) + v |= uint32(data[iNdEx-3]) << 8 + v |= uint32(data[iNdEx-2]) << 16 + v |= uint32(data[iNdEx-1]) << 24 + v2 := float32(math.Float32frombits(v)) + m.Field2 = append(m.Field2, v2) + } + } else if wireType == 5 { + var v uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + iNdEx += 4 + v = uint32(data[iNdEx-4]) + v |= uint32(data[iNdEx-3]) << 8 + v |= uint32(data[iNdEx-2]) << 16 + v |= uint32(data[iNdEx-1]) << 24 + v2 := float32(math.Float32frombits(v)) + m.Field2 = append(m.Field2, v2) + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType) + } + case 3: + if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + for iNdEx < postIndex { + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field3 = append(m.Field3, v) + } + } else if wireType == 0 { + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field3 = append(m.Field3, v) + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field3", wireType) + } + case 4: + if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + for iNdEx < postIndex { + var v int64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field4 = append(m.Field4, v) + } + } else if wireType == 0 { + var v int64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field4 = append(m.Field4, v) + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field4", wireType) + } + case 5: + if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthThetest + } + 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 ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (uint32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field5 = append(m.Field5, v) + } + } else if wireType == 0 { + var v uint32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (uint32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field5 = append(m.Field5, v) + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field5", wireType) + } + case 6: + if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + for iNdEx < postIndex { + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field6 = append(m.Field6, v) + } + } else if wireType == 0 { + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field6 = append(m.Field6, v) + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field6", wireType) + } + case 7: + if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + for iNdEx < postIndex { + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + v = int32((uint32(v) >> 1) ^ uint32(((v&1)<<31)>>31)) + m.Field7 = append(m.Field7, v) + } + } else if wireType == 0 { + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + v = int32((uint32(v) >> 1) ^ uint32(((v&1)<<31)>>31)) + m.Field7 = append(m.Field7, v) + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field7", wireType) + } + case 8: + if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + for iNdEx < postIndex { + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + v = (v >> 1) ^ uint64((int64(v&1)<<63)>>63) + m.Field8 = append(m.Field8, int64(v)) + } + } else if wireType == 0 { + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + v = (v >> 1) ^ uint64((int64(v&1)<<63)>>63) + m.Field8 = append(m.Field8, int64(v)) + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field8", wireType) + } + case 9: + if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + for iNdEx < postIndex { + var v uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + iNdEx += 4 + v = uint32(data[iNdEx-4]) + v |= uint32(data[iNdEx-3]) << 8 + v |= uint32(data[iNdEx-2]) << 16 + v |= uint32(data[iNdEx-1]) << 24 + m.Field9 = append(m.Field9, v) + } + } else if wireType == 5 { + var v uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + iNdEx += 4 + v = uint32(data[iNdEx-4]) + v |= uint32(data[iNdEx-3]) << 8 + v |= uint32(data[iNdEx-2]) << 16 + v |= uint32(data[iNdEx-1]) << 24 + m.Field9 = append(m.Field9, v) + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field9", wireType) + } + case 10: + if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + for iNdEx < postIndex { + var v int32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + iNdEx += 4 + v = int32(data[iNdEx-4]) + v |= int32(data[iNdEx-3]) << 8 + v |= int32(data[iNdEx-2]) << 16 + v |= int32(data[iNdEx-1]) << 24 + m.Field10 = append(m.Field10, v) + } + } else if wireType == 5 { + var v int32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + iNdEx += 4 + v = int32(data[iNdEx-4]) + v |= int32(data[iNdEx-3]) << 8 + v |= int32(data[iNdEx-2]) << 16 + v |= int32(data[iNdEx-1]) << 24 + m.Field10 = append(m.Field10, v) + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field10", wireType) + } + case 11: + if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + for iNdEx < postIndex { + 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.Field11 = append(m.Field11, v) + } + } else if wireType == 1 { + 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.Field11 = append(m.Field11, v) + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field11", wireType) + } + case 12: + if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + for iNdEx < postIndex { + var v int64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + iNdEx += 8 + v = int64(data[iNdEx-8]) + v |= int64(data[iNdEx-7]) << 8 + v |= int64(data[iNdEx-6]) << 16 + v |= int64(data[iNdEx-5]) << 24 + v |= int64(data[iNdEx-4]) << 32 + v |= int64(data[iNdEx-3]) << 40 + v |= int64(data[iNdEx-2]) << 48 + v |= int64(data[iNdEx-1]) << 56 + m.Field12 = append(m.Field12, v) + } + } else if wireType == 1 { + var v int64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + iNdEx += 8 + v = int64(data[iNdEx-8]) + v |= int64(data[iNdEx-7]) << 8 + v |= int64(data[iNdEx-6]) << 16 + v |= int64(data[iNdEx-5]) << 24 + v |= int64(data[iNdEx-4]) << 32 + v |= int64(data[iNdEx-3]) << 40 + v |= int64(data[iNdEx-2]) << 48 + v |= int64(data[iNdEx-1]) << 56 + m.Field12 = append(m.Field12, v) + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field12", wireType) + } + case 13: + if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + for iNdEx < postIndex { + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field13 = append(m.Field13, bool(v != 0)) + } + } else if wireType == 0 { + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field13 = append(m.Field13, bool(v != 0)) + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field13", wireType) + } + default: + iNdEx = preIndex + skippy, err := skipThetest(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetest + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *NidOptStruct) 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 ErrIntOverflowThetest + } + 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: NidOptStruct: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: NidOptStruct: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field Field1", 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.Field1 = float64(math.Float64frombits(v)) + case 2: + if wireType != 5 { + return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType) + } + var v uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + iNdEx += 4 + v = uint32(data[iNdEx-4]) + v |= uint32(data[iNdEx-3]) << 8 + v |= uint32(data[iNdEx-2]) << 16 + v |= uint32(data[iNdEx-1]) << 24 + m.Field2 = float32(math.Float32frombits(v)) + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field3", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Field3.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field4", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Field4.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 6: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field6", wireType) + } + m.Field6 = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + m.Field6 |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + case 7: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field7", wireType) + } + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + v = int32((uint32(v) >> 1) ^ uint32(((v&1)<<31)>>31)) + m.Field7 = v + case 8: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field8", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Field8.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 13: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field13", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field13 = bool(v != 0) + case 14: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field14", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + 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 ErrInvalidLengthThetest + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Field14 = string(data[iNdEx:postIndex]) + iNdEx = postIndex + case 15: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field15", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + byteLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Field15 = append(m.Field15[:0], data[iNdEx:postIndex]...) + if m.Field15 == nil { + m.Field15 = []byte{} + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipThetest(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetest + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *NinOptStruct) 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 ErrIntOverflowThetest + } + 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: NinOptStruct: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: NinOptStruct: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field Field1", 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.Field1 = &v2 + case 2: + if wireType != 5 { + return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType) + } + var v uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + iNdEx += 4 + v = uint32(data[iNdEx-4]) + v |= uint32(data[iNdEx-3]) << 8 + v |= uint32(data[iNdEx-2]) << 16 + v |= uint32(data[iNdEx-1]) << 24 + v2 := float32(math.Float32frombits(v)) + m.Field2 = &v2 + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field3", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Field3 == nil { + m.Field3 = &NidOptNative{} + } + if err := m.Field3.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field4", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Field4 == nil { + m.Field4 = &NinOptNative{} + } + if err := m.Field4.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 6: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field6", wireType) + } + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field6 = &v + case 7: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field7", wireType) + } + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + v = int32((uint32(v) >> 1) ^ uint32(((v&1)<<31)>>31)) + m.Field7 = &v + case 8: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field8", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Field8 == nil { + m.Field8 = &NidOptNative{} + } + if err := m.Field8.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 13: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field13", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + b := bool(v != 0) + m.Field13 = &b + case 14: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field14", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + 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 ErrInvalidLengthThetest + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + s := string(data[iNdEx:postIndex]) + m.Field14 = &s + iNdEx = postIndex + case 15: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field15", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + byteLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Field15 = append(m.Field15[:0], data[iNdEx:postIndex]...) + if m.Field15 == nil { + m.Field15 = []byte{} + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipThetest(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetest + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *NidRepStruct) 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 ErrIntOverflowThetest + } + 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: NidRepStruct: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: NidRepStruct: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field Field1", 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.Field1 = append(m.Field1, v2) + case 2: + if wireType != 5 { + return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType) + } + var v uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + iNdEx += 4 + v = uint32(data[iNdEx-4]) + v |= uint32(data[iNdEx-3]) << 8 + v |= uint32(data[iNdEx-2]) << 16 + v |= uint32(data[iNdEx-1]) << 24 + v2 := float32(math.Float32frombits(v)) + m.Field2 = append(m.Field2, v2) + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field3", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Field3 = append(m.Field3, NidOptNative{}) + if err := m.Field3[len(m.Field3)-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 Field4", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Field4 = append(m.Field4, NinOptNative{}) + if err := m.Field4[len(m.Field4)-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 Field6", wireType) + } + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field6 = append(m.Field6, v) + case 7: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field7", wireType) + } + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + v = int32((uint32(v) >> 1) ^ uint32(((v&1)<<31)>>31)) + m.Field7 = append(m.Field7, v) + case 8: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field8", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Field8 = append(m.Field8, NidOptNative{}) + if err := m.Field8[len(m.Field8)-1].Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 13: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field13", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field13 = append(m.Field13, bool(v != 0)) + case 14: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field14", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + 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 ErrInvalidLengthThetest + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Field14 = append(m.Field14, string(data[iNdEx:postIndex])) + iNdEx = postIndex + case 15: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field15", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + byteLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Field15 = append(m.Field15, make([]byte, postIndex-iNdEx)) + copy(m.Field15[len(m.Field15)-1], data[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipThetest(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetest + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *NinRepStruct) 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 ErrIntOverflowThetest + } + 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: NinRepStruct: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: NinRepStruct: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field Field1", 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.Field1 = append(m.Field1, v2) + case 2: + if wireType != 5 { + return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType) + } + var v uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + iNdEx += 4 + v = uint32(data[iNdEx-4]) + v |= uint32(data[iNdEx-3]) << 8 + v |= uint32(data[iNdEx-2]) << 16 + v |= uint32(data[iNdEx-1]) << 24 + v2 := float32(math.Float32frombits(v)) + m.Field2 = append(m.Field2, v2) + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field3", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Field3 = append(m.Field3, &NidOptNative{}) + if err := m.Field3[len(m.Field3)-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 Field4", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Field4 = append(m.Field4, &NinOptNative{}) + if err := m.Field4[len(m.Field4)-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 Field6", wireType) + } + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field6 = append(m.Field6, v) + case 7: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field7", wireType) + } + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + v = int32((uint32(v) >> 1) ^ uint32(((v&1)<<31)>>31)) + m.Field7 = append(m.Field7, v) + case 8: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field8", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Field8 = append(m.Field8, &NidOptNative{}) + if err := m.Field8[len(m.Field8)-1].Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 13: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field13", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field13 = append(m.Field13, bool(v != 0)) + case 14: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field14", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + 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 ErrInvalidLengthThetest + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Field14 = append(m.Field14, string(data[iNdEx:postIndex])) + iNdEx = postIndex + case 15: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field15", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + byteLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Field15 = append(m.Field15, make([]byte, postIndex-iNdEx)) + copy(m.Field15[len(m.Field15)-1], data[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipThetest(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetest + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *NidEmbeddedStruct) 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 ErrIntOverflowThetest + } + 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: NidEmbeddedStruct: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: NidEmbeddedStruct: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NidOptNative", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.NidOptNative == nil { + m.NidOptNative = &NidOptNative{} + } + if err := m.NidOptNative.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 200: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field200", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Field200.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 210: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field210", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field210 = bool(v != 0) + default: + iNdEx = preIndex + skippy, err := skipThetest(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetest + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *NinEmbeddedStruct) 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 ErrIntOverflowThetest + } + 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: NinEmbeddedStruct: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: NinEmbeddedStruct: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NidOptNative", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.NidOptNative == nil { + m.NidOptNative = &NidOptNative{} + } + if err := m.NidOptNative.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 200: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field200", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Field200 == nil { + m.Field200 = &NidOptNative{} + } + if err := m.Field200.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 210: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field210", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + b := bool(v != 0) + m.Field210 = &b + default: + iNdEx = preIndex + skippy, err := skipThetest(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetest + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *NidNestedStruct) 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 ErrIntOverflowThetest + } + 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: NidNestedStruct: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: NidNestedStruct: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Field1.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Field2 = append(m.Field2, NidRepStruct{}) + if err := m.Field2[len(m.Field2)-1].Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipThetest(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetest + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *NinNestedStruct) 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 ErrIntOverflowThetest + } + 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: NinNestedStruct: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: NinNestedStruct: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Field1 == nil { + m.Field1 = &NinOptStruct{} + } + if err := m.Field1.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Field2 = append(m.Field2, &NinRepStruct{}) + if err := m.Field2[len(m.Field2)-1].Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipThetest(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetest + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *NidOptCustom) 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 ErrIntOverflowThetest + } + 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: NidOptCustom: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: NidOptCustom: 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 byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + byteLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + 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 Value", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + byteLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Value.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipThetest(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetest + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *CustomDash) 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 ErrIntOverflowThetest + } + 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: CustomDash: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: CustomDash: 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 ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + byteLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var v github_com_gogo_protobuf_test_custom_dash_type.Bytes + m.Value = &v + if err := m.Value.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipThetest(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetest + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *NinOptCustom) 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 ErrIntOverflowThetest + } + 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: NinOptCustom: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: NinOptCustom: 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 byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + byteLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var v Uuid + m.Id = &v + 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 Value", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + byteLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var v github_com_gogo_protobuf_test_custom.Uint128 + m.Value = &v + if err := m.Value.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipThetest(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetest + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *NidRepCustom) 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 ErrIntOverflowThetest + } + 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: NidRepCustom: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: NidRepCustom: 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 byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + byteLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var v Uuid + m.Id = append(m.Id, v) + if err := m.Id[len(m.Id)-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 Value", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + byteLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var v github_com_gogo_protobuf_test_custom.Uint128 + m.Value = append(m.Value, v) + if err := m.Value[len(m.Value)-1].Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipThetest(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetest + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *NinRepCustom) 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 ErrIntOverflowThetest + } + 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: NinRepCustom: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: NinRepCustom: 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 byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + byteLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var v Uuid + m.Id = append(m.Id, v) + if err := m.Id[len(m.Id)-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 Value", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + byteLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var v github_com_gogo_protobuf_test_custom.Uint128 + m.Value = append(m.Value, v) + if err := m.Value[len(m.Value)-1].Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipThetest(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetest + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *NinOptNativeUnion) 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 ErrIntOverflowThetest + } + 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: NinOptNativeUnion: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: NinOptNativeUnion: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field Field1", 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.Field1 = &v2 + case 2: + if wireType != 5 { + return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType) + } + var v uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + iNdEx += 4 + v = uint32(data[iNdEx-4]) + v |= uint32(data[iNdEx-3]) << 8 + v |= uint32(data[iNdEx-2]) << 16 + v |= uint32(data[iNdEx-1]) << 24 + v2 := float32(math.Float32frombits(v)) + m.Field2 = &v2 + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field3", wireType) + } + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field3 = &v + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field4", wireType) + } + var v int64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field4 = &v + case 5: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field5", wireType) + } + var v uint32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (uint32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field5 = &v + case 6: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field6", wireType) + } + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field6 = &v + case 13: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field13", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + b := bool(v != 0) + m.Field13 = &b + case 14: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field14", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + 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 ErrInvalidLengthThetest + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + s := string(data[iNdEx:postIndex]) + m.Field14 = &s + iNdEx = postIndex + case 15: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field15", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + byteLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Field15 = append(m.Field15[:0], data[iNdEx:postIndex]...) + if m.Field15 == nil { + m.Field15 = []byte{} + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipThetest(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetest + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *NinOptStructUnion) 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 ErrIntOverflowThetest + } + 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: NinOptStructUnion: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: NinOptStructUnion: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field Field1", 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.Field1 = &v2 + case 2: + if wireType != 5 { + return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType) + } + var v uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + iNdEx += 4 + v = uint32(data[iNdEx-4]) + v |= uint32(data[iNdEx-3]) << 8 + v |= uint32(data[iNdEx-2]) << 16 + v |= uint32(data[iNdEx-1]) << 24 + v2 := float32(math.Float32frombits(v)) + m.Field2 = &v2 + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field3", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Field3 == nil { + m.Field3 = &NidOptNative{} + } + if err := m.Field3.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field4", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Field4 == nil { + m.Field4 = &NinOptNative{} + } + if err := m.Field4.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 6: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field6", wireType) + } + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field6 = &v + case 7: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field7", wireType) + } + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + v = int32((uint32(v) >> 1) ^ uint32(((v&1)<<31)>>31)) + m.Field7 = &v + case 13: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field13", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + b := bool(v != 0) + m.Field13 = &b + case 14: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field14", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + 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 ErrInvalidLengthThetest + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + s := string(data[iNdEx:postIndex]) + m.Field14 = &s + iNdEx = postIndex + case 15: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field15", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + byteLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Field15 = append(m.Field15[:0], data[iNdEx:postIndex]...) + if m.Field15 == nil { + m.Field15 = []byte{} + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipThetest(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetest + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *NinEmbeddedStructUnion) 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 ErrIntOverflowThetest + } + 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: NinEmbeddedStructUnion: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: NinEmbeddedStructUnion: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NidOptNative", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.NidOptNative == nil { + m.NidOptNative = &NidOptNative{} + } + if err := m.NidOptNative.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 200: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field200", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Field200 == nil { + m.Field200 = &NinOptNative{} + } + if err := m.Field200.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 210: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field210", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + b := bool(v != 0) + m.Field210 = &b + default: + iNdEx = preIndex + skippy, err := skipThetest(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetest + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *NinNestedStructUnion) 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 ErrIntOverflowThetest + } + 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: NinNestedStructUnion: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: NinNestedStructUnion: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Field1 == nil { + m.Field1 = &NinOptNativeUnion{} + } + if err := m.Field1.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Field2 == nil { + m.Field2 = &NinOptStructUnion{} + } + if err := m.Field2.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field3", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Field3 == nil { + m.Field3 = &NinEmbeddedStructUnion{} + } + if err := m.Field3.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipThetest(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetest + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Tree) 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 ErrIntOverflowThetest + } + 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: Tree: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Tree: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Or", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Or == nil { + m.Or = &OrBranch{} + } + if err := m.Or.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field And", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.And == nil { + m.And = &AndBranch{} + } + if err := m.And.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Leaf", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Leaf == nil { + m.Leaf = &Leaf{} + } + if err := m.Leaf.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipThetest(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetest + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *OrBranch) 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 ErrIntOverflowThetest + } + 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: OrBranch: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: OrBranch: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Left", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Left.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Right", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Right.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipThetest(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetest + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *AndBranch) 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 ErrIntOverflowThetest + } + 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: AndBranch: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: AndBranch: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Left", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Left.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Right", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Right.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipThetest(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetest + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Leaf) 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 ErrIntOverflowThetest + } + 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: Leaf: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Leaf: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType) + } + m.Value = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + m.Value |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field StrValue", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + 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 ErrInvalidLengthThetest + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.StrValue = string(data[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipThetest(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetest + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *DeepTree) 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 ErrIntOverflowThetest + } + 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: DeepTree: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: DeepTree: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Down", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Down == nil { + m.Down = &ADeepBranch{} + } + if err := m.Down.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field And", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.And == nil { + m.And = &AndDeepBranch{} + } + if err := m.And.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Leaf", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Leaf == nil { + m.Leaf = &DeepLeaf{} + } + if err := m.Leaf.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipThetest(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetest + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ADeepBranch) 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 ErrIntOverflowThetest + } + 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: ADeepBranch: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ADeepBranch: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Down", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Down.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipThetest(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetest + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *AndDeepBranch) 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 ErrIntOverflowThetest + } + 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: AndDeepBranch: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: AndDeepBranch: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Left", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Left.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Right", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Right.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipThetest(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetest + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *DeepLeaf) 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 ErrIntOverflowThetest + } + 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: DeepLeaf: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: DeepLeaf: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Tree", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Tree.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipThetest(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetest + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Nil) 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 ErrIntOverflowThetest + } + 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: Nil: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Nil: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipThetest(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetest + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *NidOptEnum) 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 ErrIntOverflowThetest + } + 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: NidOptEnum: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: NidOptEnum: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) + } + m.Field1 = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + m.Field1 |= (TheTestEnum(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipThetest(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetest + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *NinOptEnum) 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 ErrIntOverflowThetest + } + 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: NinOptEnum: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: NinOptEnum: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) + } + var v TheTestEnum + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (TheTestEnum(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field1 = &v + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType) + } + var v YetAnotherTestEnum + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (YetAnotherTestEnum(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field2 = &v + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field3", wireType) + } + var v YetYetAnotherTestEnum + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (YetYetAnotherTestEnum(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field3 = &v + default: + iNdEx = preIndex + skippy, err := skipThetest(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetest + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *NidRepEnum) 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 ErrIntOverflowThetest + } + 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: NidRepEnum: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: NidRepEnum: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) + } + var v TheTestEnum + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (TheTestEnum(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field1 = append(m.Field1, v) + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType) + } + var v YetAnotherTestEnum + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (YetAnotherTestEnum(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field2 = append(m.Field2, v) + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field3", wireType) + } + var v YetYetAnotherTestEnum + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (YetYetAnotherTestEnum(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field3 = append(m.Field3, v) + default: + iNdEx = preIndex + skippy, err := skipThetest(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetest + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *NinRepEnum) 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 ErrIntOverflowThetest + } + 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: NinRepEnum: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: NinRepEnum: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) + } + var v TheTestEnum + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (TheTestEnum(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field1 = append(m.Field1, v) + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType) + } + var v YetAnotherTestEnum + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (YetAnotherTestEnum(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field2 = append(m.Field2, v) + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field3", wireType) + } + var v YetYetAnotherTestEnum + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (YetYetAnotherTestEnum(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field3 = append(m.Field3, v) + default: + iNdEx = preIndex + skippy, err := skipThetest(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetest + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *NinOptEnumDefault) 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 ErrIntOverflowThetest + } + 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: NinOptEnumDefault: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: NinOptEnumDefault: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) + } + var v TheTestEnum + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (TheTestEnum(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field1 = &v + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType) + } + var v YetAnotherTestEnum + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (YetAnotherTestEnum(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field2 = &v + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field3", wireType) + } + var v YetYetAnotherTestEnum + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (YetYetAnotherTestEnum(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field3 = &v + default: + iNdEx = preIndex + skippy, err := skipThetest(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetest + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *AnotherNinOptEnum) 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 ErrIntOverflowThetest + } + 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: AnotherNinOptEnum: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: AnotherNinOptEnum: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) + } + var v AnotherTestEnum + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (AnotherTestEnum(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field1 = &v + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType) + } + var v YetAnotherTestEnum + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (YetAnotherTestEnum(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field2 = &v + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field3", wireType) + } + var v YetYetAnotherTestEnum + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (YetYetAnotherTestEnum(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field3 = &v + default: + iNdEx = preIndex + skippy, err := skipThetest(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetest + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *AnotherNinOptEnumDefault) 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 ErrIntOverflowThetest + } + 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: AnotherNinOptEnumDefault: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: AnotherNinOptEnumDefault: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) + } + var v AnotherTestEnum + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (AnotherTestEnum(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field1 = &v + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType) + } + var v YetAnotherTestEnum + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (YetAnotherTestEnum(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field2 = &v + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field3", wireType) + } + var v YetYetAnotherTestEnum + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (YetYetAnotherTestEnum(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field3 = &v + default: + iNdEx = preIndex + skippy, err := skipThetest(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetest + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Timer) 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 ErrIntOverflowThetest + } + 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: Timer: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Timer: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field Time1", wireType) + } + m.Time1 = 0 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + iNdEx += 8 + m.Time1 = int64(data[iNdEx-8]) + m.Time1 |= int64(data[iNdEx-7]) << 8 + m.Time1 |= int64(data[iNdEx-6]) << 16 + m.Time1 |= int64(data[iNdEx-5]) << 24 + m.Time1 |= int64(data[iNdEx-4]) << 32 + m.Time1 |= int64(data[iNdEx-3]) << 40 + m.Time1 |= int64(data[iNdEx-2]) << 48 + m.Time1 |= int64(data[iNdEx-1]) << 56 + case 2: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field Time2", wireType) + } + m.Time2 = 0 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + iNdEx += 8 + m.Time2 = int64(data[iNdEx-8]) + m.Time2 |= int64(data[iNdEx-7]) << 8 + m.Time2 |= int64(data[iNdEx-6]) << 16 + m.Time2 |= int64(data[iNdEx-5]) << 24 + m.Time2 |= int64(data[iNdEx-4]) << 32 + m.Time2 |= int64(data[iNdEx-3]) << 40 + m.Time2 |= int64(data[iNdEx-2]) << 48 + m.Time2 |= int64(data[iNdEx-1]) << 56 + 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 ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthThetest + } + 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 := skipThetest(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetest + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MyExtendable) 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 ErrIntOverflowThetest + } + 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: MyExtendable: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MyExtendable: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) + } + var v int64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field1 = &v + default: + if (fieldNum >= 100) && (fieldNum < 200) { + var sizeOfWire int + for { + sizeOfWire++ + wire >>= 7 + if wire == 0 { + break + } + } + iNdEx -= sizeOfWire + skippy, err := skipThetest(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetest + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + github_com_gogo_protobuf_proto.AppendExtension(m, int32(fieldNum), data[iNdEx:iNdEx+skippy]) + iNdEx += skippy + } else { + iNdEx = preIndex + skippy, err := skipThetest(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetest + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *OtherExtenable) 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 ErrIntOverflowThetest + } + 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: OtherExtenable: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: OtherExtenable: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType) + } + var v int64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field2 = &v + case 13: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field13", wireType) + } + var v int64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field13 = &v + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field M", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.M == nil { + m.M = &MyExtendable{} + } + if err := m.M.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + if ((fieldNum >= 14) && (fieldNum < 17)) || ((fieldNum >= 10) && (fieldNum < 13)) { + var sizeOfWire int + for { + sizeOfWire++ + wire >>= 7 + if wire == 0 { + break + } + } + iNdEx -= sizeOfWire + skippy, err := skipThetest(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetest + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + github_com_gogo_protobuf_proto.AppendExtension(m, int32(fieldNum), data[iNdEx:iNdEx+skippy]) + iNdEx += skippy + } else { + iNdEx = preIndex + skippy, err := skipThetest(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetest + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *NestedDefinition) 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 ErrIntOverflowThetest + } + 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: NestedDefinition: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: NestedDefinition: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) + } + var v int64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field1 = &v + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field EnumField", wireType) + } + var v NestedDefinition_NestedEnum + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (NestedDefinition_NestedEnum(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.EnumField = &v + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NNM", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.NNM == nil { + m.NNM = &NestedDefinition_NestedMessage_NestedNestedMsg{} + } + if err := m.NNM.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NM", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.NM == nil { + m.NM = &NestedDefinition_NestedMessage{} + } + if err := m.NM.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipThetest(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetest + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *NestedDefinition_NestedMessage) 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 ErrIntOverflowThetest + } + 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: NestedMessage: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: NestedMessage: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field NestedField1", 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.NestedField1 = &v + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NNM", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.NNM == nil { + m.NNM = &NestedDefinition_NestedMessage_NestedNestedMsg{} + } + if err := m.NNM.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipThetest(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetest + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *NestedDefinition_NestedMessage_NestedNestedMsg) 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 ErrIntOverflowThetest + } + 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: NestedNestedMsg: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: NestedNestedMsg: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 10: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NestedNestedField1", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + 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 ErrInvalidLengthThetest + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + s := string(data[iNdEx:postIndex]) + m.NestedNestedField1 = &s + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipThetest(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetest + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *NestedScope) 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 ErrIntOverflowThetest + } + 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: NestedScope: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: NestedScope: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field A", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.A == nil { + m.A = &NestedDefinition_NestedMessage_NestedNestedMsg{} + } + if err := m.A.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field B", wireType) + } + var v NestedDefinition_NestedEnum + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (NestedDefinition_NestedEnum(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.B = &v + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field C", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.C == nil { + m.C = &NestedDefinition_NestedMessage{} + } + if err := m.C.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipThetest(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetest + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *NinOptNativeDefault) 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 ErrIntOverflowThetest + } + 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: NinOptNativeDefault: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: NinOptNativeDefault: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field Field1", 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.Field1 = &v2 + case 2: + if wireType != 5 { + return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType) + } + var v uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + iNdEx += 4 + v = uint32(data[iNdEx-4]) + v |= uint32(data[iNdEx-3]) << 8 + v |= uint32(data[iNdEx-2]) << 16 + v |= uint32(data[iNdEx-1]) << 24 + v2 := float32(math.Float32frombits(v)) + m.Field2 = &v2 + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field3", wireType) + } + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field3 = &v + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field4", wireType) + } + var v int64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field4 = &v + case 5: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field5", wireType) + } + var v uint32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (uint32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field5 = &v + case 6: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field6", wireType) + } + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field6 = &v + case 7: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field7", wireType) + } + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + v = int32((uint32(v) >> 1) ^ uint32(((v&1)<<31)>>31)) + m.Field7 = &v + case 8: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field8", wireType) + } + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + v = (v >> 1) ^ uint64((int64(v&1)<<63)>>63) + v2 := int64(v) + m.Field8 = &v2 + case 9: + if wireType != 5 { + return fmt.Errorf("proto: wrong wireType = %d for field Field9", wireType) + } + var v uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + iNdEx += 4 + v = uint32(data[iNdEx-4]) + v |= uint32(data[iNdEx-3]) << 8 + v |= uint32(data[iNdEx-2]) << 16 + v |= uint32(data[iNdEx-1]) << 24 + m.Field9 = &v + case 10: + if wireType != 5 { + return fmt.Errorf("proto: wrong wireType = %d for field Field10", wireType) + } + var v int32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + iNdEx += 4 + v = int32(data[iNdEx-4]) + v |= int32(data[iNdEx-3]) << 8 + v |= int32(data[iNdEx-2]) << 16 + v |= int32(data[iNdEx-1]) << 24 + m.Field10 = &v + case 11: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field Field11", 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.Field11 = &v + case 12: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field Field12", wireType) + } + var v int64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + iNdEx += 8 + v = int64(data[iNdEx-8]) + v |= int64(data[iNdEx-7]) << 8 + v |= int64(data[iNdEx-6]) << 16 + v |= int64(data[iNdEx-5]) << 24 + v |= int64(data[iNdEx-4]) << 32 + v |= int64(data[iNdEx-3]) << 40 + v |= int64(data[iNdEx-2]) << 48 + v |= int64(data[iNdEx-1]) << 56 + m.Field12 = &v + case 13: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field13", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + b := bool(v != 0) + m.Field13 = &b + case 14: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field14", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + 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 ErrInvalidLengthThetest + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + s := string(data[iNdEx:postIndex]) + m.Field14 = &s + iNdEx = postIndex + case 15: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field15", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + byteLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Field15 = append(m.Field15[:0], data[iNdEx:postIndex]...) + if m.Field15 == nil { + m.Field15 = []byte{} + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipThetest(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetest + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *CustomContainer) 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 ErrIntOverflowThetest + } + 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: CustomContainer: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: CustomContainer: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field CustomStruct", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.CustomStruct.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipThetest(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetest + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *CustomNameNidOptNative) 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 ErrIntOverflowThetest + } + 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: CustomNameNidOptNative: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: CustomNameNidOptNative: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field FieldA", 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.FieldA = float64(math.Float64frombits(v)) + case 2: + if wireType != 5 { + return fmt.Errorf("proto: wrong wireType = %d for field FieldB", wireType) + } + var v uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + iNdEx += 4 + v = uint32(data[iNdEx-4]) + v |= uint32(data[iNdEx-3]) << 8 + v |= uint32(data[iNdEx-2]) << 16 + v |= uint32(data[iNdEx-1]) << 24 + m.FieldB = float32(math.Float32frombits(v)) + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field FieldC", wireType) + } + m.FieldC = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + m.FieldC |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field FieldD", wireType) + } + m.FieldD = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + m.FieldD |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + case 5: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field FieldE", wireType) + } + m.FieldE = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + m.FieldE |= (uint32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + case 6: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field FieldF", wireType) + } + m.FieldF = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + m.FieldF |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + case 7: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field FieldG", wireType) + } + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + v = int32((uint32(v) >> 1) ^ uint32(((v&1)<<31)>>31)) + m.FieldG = v + case 8: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field FieldH", wireType) + } + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + v = (v >> 1) ^ uint64((int64(v&1)<<63)>>63) + m.FieldH = int64(v) + case 9: + if wireType != 5 { + return fmt.Errorf("proto: wrong wireType = %d for field FieldI", wireType) + } + m.FieldI = 0 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + iNdEx += 4 + m.FieldI = uint32(data[iNdEx-4]) + m.FieldI |= uint32(data[iNdEx-3]) << 8 + m.FieldI |= uint32(data[iNdEx-2]) << 16 + m.FieldI |= uint32(data[iNdEx-1]) << 24 + case 10: + if wireType != 5 { + return fmt.Errorf("proto: wrong wireType = %d for field FieldJ", wireType) + } + m.FieldJ = 0 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + iNdEx += 4 + m.FieldJ = int32(data[iNdEx-4]) + m.FieldJ |= int32(data[iNdEx-3]) << 8 + m.FieldJ |= int32(data[iNdEx-2]) << 16 + m.FieldJ |= int32(data[iNdEx-1]) << 24 + case 11: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field FieldK", wireType) + } + m.FieldK = 0 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + iNdEx += 8 + m.FieldK = uint64(data[iNdEx-8]) + m.FieldK |= uint64(data[iNdEx-7]) << 8 + m.FieldK |= uint64(data[iNdEx-6]) << 16 + m.FieldK |= uint64(data[iNdEx-5]) << 24 + m.FieldK |= uint64(data[iNdEx-4]) << 32 + m.FieldK |= uint64(data[iNdEx-3]) << 40 + m.FieldK |= uint64(data[iNdEx-2]) << 48 + m.FieldK |= uint64(data[iNdEx-1]) << 56 + case 12: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field FieldL", wireType) + } + m.FieldL = 0 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + iNdEx += 8 + m.FieldL = int64(data[iNdEx-8]) + m.FieldL |= int64(data[iNdEx-7]) << 8 + m.FieldL |= int64(data[iNdEx-6]) << 16 + m.FieldL |= int64(data[iNdEx-5]) << 24 + m.FieldL |= int64(data[iNdEx-4]) << 32 + m.FieldL |= int64(data[iNdEx-3]) << 40 + m.FieldL |= int64(data[iNdEx-2]) << 48 + m.FieldL |= int64(data[iNdEx-1]) << 56 + case 13: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field FieldM", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.FieldM = bool(v != 0) + case 14: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field FieldN", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + 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 ErrInvalidLengthThetest + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.FieldN = string(data[iNdEx:postIndex]) + iNdEx = postIndex + case 15: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field FieldO", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + byteLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.FieldO = append(m.FieldO[:0], data[iNdEx:postIndex]...) + if m.FieldO == nil { + m.FieldO = []byte{} + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipThetest(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetest + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *CustomNameNinOptNative) 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 ErrIntOverflowThetest + } + 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: CustomNameNinOptNative: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: CustomNameNinOptNative: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field FieldA", 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.FieldA = &v2 + case 2: + if wireType != 5 { + return fmt.Errorf("proto: wrong wireType = %d for field FieldB", wireType) + } + var v uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + iNdEx += 4 + v = uint32(data[iNdEx-4]) + v |= uint32(data[iNdEx-3]) << 8 + v |= uint32(data[iNdEx-2]) << 16 + v |= uint32(data[iNdEx-1]) << 24 + v2 := float32(math.Float32frombits(v)) + m.FieldB = &v2 + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field FieldC", wireType) + } + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.FieldC = &v + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field FieldD", wireType) + } + var v int64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.FieldD = &v + case 5: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field FieldE", wireType) + } + var v uint32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (uint32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.FieldE = &v + case 6: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field FieldF", wireType) + } + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.FieldF = &v + case 7: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field FieldG", wireType) + } + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + v = int32((uint32(v) >> 1) ^ uint32(((v&1)<<31)>>31)) + m.FieldG = &v + case 8: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field FieldH", wireType) + } + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + v = (v >> 1) ^ uint64((int64(v&1)<<63)>>63) + v2 := int64(v) + m.FieldH = &v2 + case 9: + if wireType != 5 { + return fmt.Errorf("proto: wrong wireType = %d for field FieldI", wireType) + } + var v uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + iNdEx += 4 + v = uint32(data[iNdEx-4]) + v |= uint32(data[iNdEx-3]) << 8 + v |= uint32(data[iNdEx-2]) << 16 + v |= uint32(data[iNdEx-1]) << 24 + m.FieldI = &v + case 10: + if wireType != 5 { + return fmt.Errorf("proto: wrong wireType = %d for field FieldJ", wireType) + } + var v int32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + iNdEx += 4 + v = int32(data[iNdEx-4]) + v |= int32(data[iNdEx-3]) << 8 + v |= int32(data[iNdEx-2]) << 16 + v |= int32(data[iNdEx-1]) << 24 + m.FieldJ = &v + case 11: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field FieldK", 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.FieldK = &v + case 12: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field FielL", wireType) + } + var v int64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + iNdEx += 8 + v = int64(data[iNdEx-8]) + v |= int64(data[iNdEx-7]) << 8 + v |= int64(data[iNdEx-6]) << 16 + v |= int64(data[iNdEx-5]) << 24 + v |= int64(data[iNdEx-4]) << 32 + v |= int64(data[iNdEx-3]) << 40 + v |= int64(data[iNdEx-2]) << 48 + v |= int64(data[iNdEx-1]) << 56 + m.FielL = &v + case 13: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field FieldM", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + b := bool(v != 0) + m.FieldM = &b + case 14: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field FieldN", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + 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 ErrInvalidLengthThetest + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + s := string(data[iNdEx:postIndex]) + m.FieldN = &s + iNdEx = postIndex + case 15: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field FieldO", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + byteLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.FieldO = append(m.FieldO[:0], data[iNdEx:postIndex]...) + if m.FieldO == nil { + m.FieldO = []byte{} + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipThetest(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetest + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *CustomNameNinRepNative) 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 ErrIntOverflowThetest + } + 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: CustomNameNinRepNative: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: CustomNameNinRepNative: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field FieldA", 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.FieldA = append(m.FieldA, v2) + case 2: + if wireType != 5 { + return fmt.Errorf("proto: wrong wireType = %d for field FieldB", wireType) + } + var v uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + iNdEx += 4 + v = uint32(data[iNdEx-4]) + v |= uint32(data[iNdEx-3]) << 8 + v |= uint32(data[iNdEx-2]) << 16 + v |= uint32(data[iNdEx-1]) << 24 + v2 := float32(math.Float32frombits(v)) + m.FieldB = append(m.FieldB, v2) + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field FieldC", wireType) + } + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.FieldC = append(m.FieldC, v) + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field FieldD", wireType) + } + var v int64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.FieldD = append(m.FieldD, v) + case 5: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field FieldE", wireType) + } + var v uint32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (uint32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.FieldE = append(m.FieldE, v) + case 6: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field FieldF", wireType) + } + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.FieldF = append(m.FieldF, v) + case 7: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field FieldG", wireType) + } + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + v = int32((uint32(v) >> 1) ^ uint32(((v&1)<<31)>>31)) + m.FieldG = append(m.FieldG, v) + case 8: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field FieldH", wireType) + } + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + v = (v >> 1) ^ uint64((int64(v&1)<<63)>>63) + m.FieldH = append(m.FieldH, int64(v)) + case 9: + if wireType != 5 { + return fmt.Errorf("proto: wrong wireType = %d for field FieldI", wireType) + } + var v uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + iNdEx += 4 + v = uint32(data[iNdEx-4]) + v |= uint32(data[iNdEx-3]) << 8 + v |= uint32(data[iNdEx-2]) << 16 + v |= uint32(data[iNdEx-1]) << 24 + m.FieldI = append(m.FieldI, v) + case 10: + if wireType != 5 { + return fmt.Errorf("proto: wrong wireType = %d for field FieldJ", wireType) + } + var v int32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + iNdEx += 4 + v = int32(data[iNdEx-4]) + v |= int32(data[iNdEx-3]) << 8 + v |= int32(data[iNdEx-2]) << 16 + v |= int32(data[iNdEx-1]) << 24 + m.FieldJ = append(m.FieldJ, v) + case 11: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field FieldK", 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.FieldK = append(m.FieldK, v) + case 12: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field FieldL", wireType) + } + var v int64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + iNdEx += 8 + v = int64(data[iNdEx-8]) + v |= int64(data[iNdEx-7]) << 8 + v |= int64(data[iNdEx-6]) << 16 + v |= int64(data[iNdEx-5]) << 24 + v |= int64(data[iNdEx-4]) << 32 + v |= int64(data[iNdEx-3]) << 40 + v |= int64(data[iNdEx-2]) << 48 + v |= int64(data[iNdEx-1]) << 56 + m.FieldL = append(m.FieldL, v) + case 13: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field FieldM", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.FieldM = append(m.FieldM, bool(v != 0)) + case 14: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field FieldN", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + 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 ErrInvalidLengthThetest + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.FieldN = append(m.FieldN, string(data[iNdEx:postIndex])) + iNdEx = postIndex + case 15: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field FieldO", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + byteLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.FieldO = append(m.FieldO, make([]byte, postIndex-iNdEx)) + copy(m.FieldO[len(m.FieldO)-1], data[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipThetest(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetest + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *CustomNameNinStruct) 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 ErrIntOverflowThetest + } + 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: CustomNameNinStruct: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: CustomNameNinStruct: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field FieldA", 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.FieldA = &v2 + case 2: + if wireType != 5 { + return fmt.Errorf("proto: wrong wireType = %d for field FieldB", wireType) + } + var v uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + iNdEx += 4 + v = uint32(data[iNdEx-4]) + v |= uint32(data[iNdEx-3]) << 8 + v |= uint32(data[iNdEx-2]) << 16 + v |= uint32(data[iNdEx-1]) << 24 + v2 := float32(math.Float32frombits(v)) + m.FieldB = &v2 + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field FieldC", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.FieldC == nil { + m.FieldC = &NidOptNative{} + } + if err := m.FieldC.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field FieldD", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.FieldD = append(m.FieldD, &NinOptNative{}) + if err := m.FieldD[len(m.FieldD)-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 FieldE", wireType) + } + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.FieldE = &v + case 7: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field FieldF", wireType) + } + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + v = int32((uint32(v) >> 1) ^ uint32(((v&1)<<31)>>31)) + m.FieldF = &v + case 8: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field FieldG", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.FieldG == nil { + m.FieldG = &NidOptNative{} + } + if err := m.FieldG.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 13: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field FieldH", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + b := bool(v != 0) + m.FieldH = &b + case 14: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field FieldI", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + 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 ErrInvalidLengthThetest + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + s := string(data[iNdEx:postIndex]) + m.FieldI = &s + iNdEx = postIndex + case 15: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field FieldJ", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + byteLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.FieldJ = append(m.FieldJ[:0], data[iNdEx:postIndex]...) + if m.FieldJ == nil { + m.FieldJ = []byte{} + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipThetest(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetest + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *CustomNameCustomType) 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 ErrIntOverflowThetest + } + 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: CustomNameCustomType: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: CustomNameCustomType: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field FieldA", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + byteLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var v Uuid + m.FieldA = &v + if err := m.FieldA.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field FieldB", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + byteLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var v github_com_gogo_protobuf_test_custom.Uint128 + m.FieldB = &v + if err := m.FieldB.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field FieldC", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + byteLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var v Uuid + m.FieldC = append(m.FieldC, v) + if err := m.FieldC[len(m.FieldC)-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 FieldD", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + byteLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var v github_com_gogo_protobuf_test_custom.Uint128 + m.FieldD = append(m.FieldD, v) + if err := m.FieldD[len(m.FieldD)-1].Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipThetest(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetest + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *CustomNameNinEmbeddedStructUnion) 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 ErrIntOverflowThetest + } + 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: CustomNameNinEmbeddedStructUnion: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: CustomNameNinEmbeddedStructUnion: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NidOptNative", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.NidOptNative == nil { + m.NidOptNative = &NidOptNative{} + } + if err := m.NidOptNative.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 200: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field FieldA", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.FieldA == nil { + m.FieldA = &NinOptNative{} + } + if err := m.FieldA.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 210: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field FieldB", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + b := bool(v != 0) + m.FieldB = &b + default: + iNdEx = preIndex + skippy, err := skipThetest(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetest + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *CustomNameEnum) 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 ErrIntOverflowThetest + } + 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: CustomNameEnum: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: CustomNameEnum: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field FieldA", wireType) + } + var v TheTestEnum + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (TheTestEnum(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.FieldA = &v + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field FieldB", wireType) + } + var v TheTestEnum + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (TheTestEnum(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.FieldB = append(m.FieldB, v) + default: + iNdEx = preIndex + skippy, err := skipThetest(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetest + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *NoExtensionsMap) 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 ErrIntOverflowThetest + } + 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: NoExtensionsMap: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: NoExtensionsMap: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) + } + var v int64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field1 = &v + default: + if (fieldNum >= 100) && (fieldNum < 200) { + var sizeOfWire int + for { + sizeOfWire++ + wire >>= 7 + if wire == 0 { + break + } + } + iNdEx -= sizeOfWire + skippy, err := skipThetest(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetest + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + github_com_gogo_protobuf_proto.AppendExtension(m, int32(fieldNum), data[iNdEx:iNdEx+skippy]) + iNdEx += skippy + } else { + iNdEx = preIndex + skippy, err := skipThetest(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetest + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Unrecognized) 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 ErrIntOverflowThetest + } + 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: Unrecognized: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Unrecognized: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + 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 ErrInvalidLengthThetest + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + s := string(data[iNdEx:postIndex]) + m.Field1 = &s + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipThetest(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetest + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *UnrecognizedWithInner) 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 ErrIntOverflowThetest + } + 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: UnrecognizedWithInner: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: UnrecognizedWithInner: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Embedded", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Embedded = append(m.Embedded, &UnrecognizedWithInner_Inner{}) + if err := m.Embedded[len(m.Embedded)-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 Field2", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + 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 ErrInvalidLengthThetest + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + s := string(data[iNdEx:postIndex]) + m.Field2 = &s + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipThetest(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetest + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *UnrecognizedWithInner_Inner) 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 ErrIntOverflowThetest + } + 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: Inner: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Inner: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) + } + var v uint32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (uint32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field1 = &v + default: + iNdEx = preIndex + skippy, err := skipThetest(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetest + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *UnrecognizedWithEmbed) 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 ErrIntOverflowThetest + } + 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: UnrecognizedWithEmbed: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: UnrecognizedWithEmbed: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field UnrecognizedWithEmbed_Embedded", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.UnrecognizedWithEmbed_Embedded.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + 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 ErrInvalidLengthThetest + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + s := string(data[iNdEx:postIndex]) + m.Field2 = &s + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipThetest(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetest + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *UnrecognizedWithEmbed_Embedded) 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 ErrIntOverflowThetest + } + 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: Embedded: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Embedded: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) + } + var v uint32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (uint32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field1 = &v + default: + iNdEx = preIndex + skippy, err := skipThetest(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetest + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Node) 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 ErrIntOverflowThetest + } + 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: Node: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Node: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Label", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + 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 ErrInvalidLengthThetest + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + s := string(data[iNdEx:postIndex]) + m.Label = &s + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Children", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Children = append(m.Children, &Node{}) + if err := m.Children[len(m.Children)-1].Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipThetest(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetest + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipThetest(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, ErrIntOverflowThetest + } + 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, ErrIntOverflowThetest + } + 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, ErrIntOverflowThetest + } + 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, ErrInvalidLengthThetest + } + return iNdEx, nil + case 3: + for { + var innerWire uint64 + var start int = iNdEx + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowThetest + } + 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 := skipThetest(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 ( + ErrInvalidLengthThetest = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowThetest = fmt.Errorf("proto: integer overflow") +) + +var fileDescriptorThetest = []byte{ + // 3012 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xcc, 0x5a, 0x4f, 0x6c, 0x1b, 0xc7, + 0xf5, 0xd6, 0xee, 0x90, 0x32, 0x35, 0xa2, 0x24, 0x7a, 0x13, 0x33, 0x0b, 0x46, 0x3f, 0x49, 0xde, + 0x9f, 0xa2, 0x2a, 0x84, 0x2d, 0x91, 0x14, 0x25, 0xcb, 0x4c, 0x93, 0x42, 0xfc, 0xe3, 0xda, 0xae, + 0x45, 0x19, 0x8c, 0xdc, 0xd6, 0x40, 0x81, 0x82, 0x12, 0x57, 0x12, 0x51, 0x69, 0x29, 0x90, 0x4b, + 0xd7, 0xee, 0xa1, 0x08, 0x72, 0x28, 0x8c, 0x5e, 0x8b, 0x1e, 0xdb, 0xb8, 0x28, 0x0a, 0xb8, 0xb7, + 0x1c, 0x8a, 0xa2, 0x28, 0x8a, 0xc6, 0x97, 0x02, 0xea, 0xcd, 0xe8, 0xa9, 0x28, 0x0a, 0x23, 0x71, + 0x2e, 0x39, 0xa6, 0xa7, 0xe6, 0x90, 0x43, 0x67, 0x77, 0x67, 0x66, 0x67, 0x66, 0x77, 0xb9, 0x4b, + 0x4b, 0x6e, 0x73, 0xa0, 0x48, 0xed, 0xf7, 0xde, 0xce, 0xdb, 0xf7, 0x7d, 0x6f, 0xf6, 0xed, 0xce, + 0xc0, 0xb9, 0xdd, 0xce, 0xd1, 0x4e, 0xa7, 0xb7, 0xdc, 0x37, 0x8e, 0x9a, 0xdd, 0xde, 0x41, 0xf3, + 0x50, 0xef, 0x2e, 0x9b, 0x07, 0xba, 0xa9, 0xf7, 0xcc, 0xa5, 0xe3, 0x6e, 0xc7, 0xec, 0x28, 0x31, + 0xeb, 0x77, 0xe6, 0xf2, 0x7e, 0xdb, 0x3c, 0xe8, 0xef, 0x2c, 0x21, 0xf3, 0xe5, 0xfd, 0xce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1, 0x49, 0x1e, 0x5f, 0xd5, 0xde, 0xb7, 0xe9, 0x35, 0x5c, 0x7a, 0xd3, 0x3c, + 0xbd, 0x94, 0xd8, 0x34, 0x4f, 0x2c, 0xa5, 0x34, 0xcd, 0x53, 0x4a, 0xc9, 0x4c, 0xf3, 0x64, 0x52, + 0x1a, 0xd3, 0x3c, 0x8d, 0x94, 0xc0, 0x34, 0x4f, 0x20, 0xa5, 0x2e, 0xcd, 0x53, 0x47, 0x49, 0x4b, + 0xf3, 0xa4, 0x51, 0xba, 0xd2, 0x3c, 0x5d, 0x94, 0x28, 0x55, 0x20, 0xca, 0xa5, 0x48, 0x15, 0x28, + 0x72, 0xc9, 0x51, 0x05, 0x72, 0x5c, 0x5a, 0x54, 0x81, 0x16, 0x97, 0x10, 0x55, 0x20, 0xc4, 0xa5, + 0x42, 0x15, 0xa8, 0x70, 0x49, 0xc0, 0x35, 0xd6, 0xd0, 0x8f, 0x7d, 0x6a, 0x0c, 0x0c, 0xac, 0x31, + 0x30, 0xb0, 0xc6, 0xc0, 0xc0, 0x1a, 0x03, 0x03, 0x6b, 0x0c, 0x0c, 0xac, 0x31, 0x30, 0xb0, 0xc6, + 0xc0, 0xc0, 0x1a, 0x03, 0x03, 0x6b, 0x0c, 0x0c, 0xae, 0x31, 0x10, 0x52, 0x63, 0x20, 0xa4, 0xc6, + 0x40, 0x48, 0x8d, 0x81, 0x90, 0x1a, 0x03, 0x21, 0x35, 0x06, 0x02, 0x6b, 0xcc, 0xa5, 0x37, 0xcd, + 0xd3, 0xeb, 0x5b, 0x63, 0x20, 0xa0, 0xc6, 0x40, 0x40, 0x8d, 0x81, 0x80, 0x1a, 0x03, 0x01, 0x35, + 0x06, 0x02, 0x6a, 0x0c, 0x04, 0xd4, 0x18, 0x08, 0xa8, 0x31, 0x10, 0x54, 0x63, 0x20, 0xb0, 0xc6, + 0x40, 0x60, 0x8d, 0x81, 0xc0, 0x1a, 0x03, 0x81, 0x35, 0x06, 0x02, 0x6b, 0x0c, 0xb0, 0x35, 0xf6, + 0x27, 0x00, 0x15, 0xa7, 0xc6, 0x6e, 0x37, 0x77, 0x7f, 0xa0, 0xb7, 0x30, 0x15, 0x33, 0x42, 0xa5, + 0x8d, 0x5a, 0xd4, 0xa5, 0x5c, 0x4a, 0x66, 0x84, 0x5a, 0xe3, 0xf1, 0x02, 0xc5, 0x49, 0xb5, 0xf1, + 0xf8, 0x0a, 0xc5, 0x49, 0xbd, 0xf1, 0x78, 0x91, 0xe2, 0xa4, 0xe2, 0x78, 0x7c, 0x95, 0xe2, 0xa4, + 0xe6, 0x78, 0x7c, 0x8d, 0xe2, 0xa4, 0xea, 0x78, 0xfc, 0x0a, 0xc5, 0x49, 0xdd, 0xf1, 0xf8, 0x3a, + 0xc5, 0x49, 0xe5, 0xf1, 0xf8, 0x55, 0x65, 0x4e, 0xac, 0x3d, 0x62, 0x40, 0xa9, 0x9d, 0x13, 0xab, + 0x4f, 0xb0, 0xc8, 0xbb, 0x16, 0xa4, 0xfe, 0x04, 0x8b, 0x82, 0x6b, 0x41, 0x2a, 0x50, 0xb0, 0x58, + 0xd1, 0x1e, 0xda, 0xf4, 0x19, 0x22, 0x7d, 0x19, 0x81, 0x3e, 0x99, 0xa1, 0x2e, 0x23, 0x50, 0x27, + 0x33, 0xb4, 0x65, 0x04, 0xda, 0x64, 0x86, 0xb2, 0x8c, 0x40, 0x99, 0xcc, 0xd0, 0x95, 0x11, 0xe8, + 0x92, 0x19, 0xaa, 0x32, 0x02, 0x55, 0x32, 0x43, 0x53, 0x46, 0xa0, 0x49, 0x66, 0x28, 0xca, 0x08, + 0x14, 0xc9, 0x0c, 0x3d, 0x19, 0x81, 0x1e, 0x99, 0xa1, 0x66, 0x5a, 0xa4, 0x46, 0x66, 0x69, 0x99, + 0x16, 0x69, 0x91, 0x59, 0x4a, 0xa6, 0x45, 0x4a, 0x64, 0x96, 0x8e, 0x69, 0x91, 0x0e, 0x99, 0xa5, + 0xe2, 0x4b, 0x99, 0x74,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, 0x73, 0x5f, 0xc7, 0xff, 0xe1, 0x63, 0xbd, 0xfd, 0x06, 0x30, 0xea, + 0x9b, 0x48, 0x36, 0x32, 0x3a, 0x8d, 0xd3, 0xf0, 0xce, 0x47, 0x39, 0x4d, 0x43, 0x36, 0x36, 0x33, + 0x7f, 0x96, 0xe0, 0x04, 0x77, 0x14, 0xdd, 0x6d, 0x93, 0xce, 0x01, 0xe6, 0x72, 0x47, 0x1b, 0x49, + 0x83, 0x39, 0x46, 0x62, 0x96, 0x4f, 0x19, 0x73, 0x66, 0x03, 0x3d, 0xb5, 0xf3, 0xc7, 0x95, 0x25, + 0xa8, 0xb0, 0x87, 0x70, 0x10, 0xd0, 0x6e, 0xa8, 0x15, 0xc3, 0x83, 0x68, 0xff, 0x87, 0x66, 0x61, + 0x9a, 0x57, 0x65, 0x0a, 0x8e, 0x6f, 0xdf, 0xbd, 0x5d, 0xfb, 0x7e, 0xbd, 0xf6, 0xee, 0x76, 0xad, + 0x9a, 0x92, 0xb4, 0xdf, 0x4b, 0x70, 0x1c, 0xb7, 0xad, 0xbb, 0x9d, 0x63, 0x5d, 0x29, 0x43, 0x69, + 0x03, 0xeb, 0xe1, 0xc5, 0xe2, 0x96, 0x9a, 0xe8, 0xee, 0x24, 0x95, 0xa3, 0x53, 0x2d, 0xed, 0x28, + 0x05, 0x28, 0x55, 0x30, 0xc1, 0xd1, 0x98, 0x91, 0x76, 0xb5, 0x7f, 0x01, 0xf8, 0x0a, 0xdb, 0x46, + 0x93, 0xf9, 0xe4, 0x22, 0xff, 0xdc, 0x54, 0x1a, 0xcb, 0x17, 0x56, 0x8a, 0x4b, 0xd6, 0x1f, 0x2a, + 0xc9, 0x8b, 0xfc, 0x23, 0x94, 0xd7, 0xc4, 0xb3, 0x4d, 0xa4, 0x14, 0x63, 0x50, 0xcf, 0x36, 0x11, + 0x0e, 0xf5, 0x6c, 0x13, 0xe1, 0x50, 0xcf, 0x36, 0x11, 0x0e, 0xf5, 0x2c, 0x05, 0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, 0x5b, 0x7e, 0xcb, 0xd5, 0xea, 0xa2, 0xb8, 0xa5, 0x89, 0xb7, 0xbc, 0xe5, + 0xaa, 0x76, 0x51, 0x5c, 0x2a, 0xe3, 0x2d, 0x37, 0x5d, 0xfd, 0x2e, 0x8a, 0x8b, 0x66, 0xbc, 0x65, + 0xdd, 0x55, 0xf2, 0xa2, 0xb8, 0x7c, 0xc6, 0x5b, 0x6e, 0xb9, 0xef, 0xd0, 0x3f, 0x12, 0xe4, 0xc7, + 0x6c, 0x82, 0xd2, 0x04, 0xf9, 0x41, 0x1f, 0xe9, 0x69, 0x82, 0xf4, 0xa0, 0x8f, 0xec, 0x34, 0x41, + 0x76, 0xd0, 0x47, 0x72, 0x9a, 0x20, 0x39, 0xe8, 0x23, 0x37, 0x4d, 0x90, 0x1b, 0xf4, 0x91, 0x9a, + 0x26, 0x48, 0x0d, 0xfa, 0xc8, 0x4c, 0x13, 0x64, 0x06, 0x7d, 0x24, 0xa6, 0x09, 0x12, 0x83, 0x3e, + 0xf2, 0xd2, 0x04, 0x79, 0x41, 0x1f, 0x69, 0xcd, 0x8b, 0xd2, 0x82, 0x7e, 0xb2, 0x9a, 0x17, 0x65, + 0x05, 0xfd, 0x24, 0xf5, 0xff, 0xa2, 0xa4, 0xc6, 0x90, 0x55, 0xdc, 0x3a, 0xc4, 0xa8, 0x69, 0x5e, + 0x54, 0x13, 0xf4, 0x53, 0xd2, 0xbc, 0xa8, 0x24, 0xe8, 0xa7, 0xa2, 0x79, 0x51, 0x45, 0xd0, 0x4f, + 0x41, 0x4f, 0x44, 0x05, 0xb9, 0x5b, 0x7c, 0x34, 0x61, 0x45, 0x31, 0x4c, 0x41, 0x20, 0x82, 0x82, + 0x40, 0x04, 0x05, 0x81, 0x08, 0x0a, 0x02, 0x11, 0x14, 0x04, 0x22, 0x28, 0x08, 0x44, 0x50, 0x10, + 0x88, 0xa0, 0x20, 0x10, 0x45, 0x41, 0x20, 0x92, 0x82, 0x40, 0x90, 0x82, 0xe6, 0xc5, 0x0d, 0x0f, + 0xd0, 0x6f, 0x42, 0x9a, 0x17, 0x57, 0x3e, 0xc3, 0x25, 0x04, 0x22, 0x49, 0x08, 0x04, 0x49, 0xe8, + 0x23, 0xd4, 0x48, 0x71, 0x12, 0xc2, 0xcb, 0x43, 0x67, 0x35, 0x03, 0xad, 0x45, 0xd8, 0x5f, 0xe1, + 0xa7, 0xa9, 0xb5, 0x08, 0x6b, 0xd4, 0x83, 0x74, 0xe6, 0x9d, 0x85, 0x6a, 0x11, 0x66, 0xa1, 0x6b, + 0x54, 0x43, 0x6b, 0x11, 0xf6, 0x5d, 0x78, 0xb5, 0xb7, 0x3e, 0x68, 0x12, 0xb8, 0x1e, 0x69, 0x12, + 0xb8, 0x11, 0x69, 0x12, 0xb8, 0xe9, 0x32, 0xf8, 0x13, 0x19, 0xbe, 0xea, 0x32, 0xe8, 0xfc, 0xda, + 0x7e, 0x70, 0x6c, 0x4d, 0x01, 0xee, 0x0a, 0x95, 0x42, 0x56, 0x6d, 0x18, 0x1a, 0xad, 0xf5, 0x9b, + 0xdb, 0xfc, 0x5a, 0x55, 0x69, 0xd8, 0xf5, 0x1b, 0x86, 0x71, 0xfc, 0x2e, 0x74, 0x1e, 0x82, 0x1b, + 0xad, 0x9e, 0x3d, 0x5b, 0xf8, 0x0d, 0x5b, 0x69, 0x80, 0x76, 0xab, 0xa7, 0x34, 0xe0, 0xa8, 0x3d, + 0x6e, 0xcf, 0xa6, 0xf7, 0x34, 0x03, 0x23, 0xea, 0xed, 0x81, 0x7b, 0xda, 0x13, 0x09, 0xce, 0x71, + 0x52, 0x3e, 0x9b, 0x15, 0x83, 0xb7, 0x22, 0xad, 0x18, 0x70, 0x05, 0xe2, 0xae, 0x1e, 0x7c, 0xcd, + 0xbb, 0x50, 0xcd, 0x56, 0x89, 0xb8, 0x92, 0xf0, 0x63, 0x38, 0xe9, 0x5e, 0x81, 0xfd, 0xc8, 0xb6, + 0x1a, 0xfe, 0x32, 0xd3,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87, 0x72, 0xa0, 0x43, 0x70, + 0x96, 0x9c, 0x93, 0x94, 0xf3, 0xa5, 0xeb, 0xf8, 0x24, 0x95, 0xc0, 0x93, 0x84, 0xa4, 0xca, 0x39, + 0x53, 0x25, 0x5f, 0xde, 0x3e, 0xf9, 0x64, 0x66, 0xe4, 0x29, 0xfa, 0xfc, 0x1d, 0x7d, 0x3e, 0xfe, + 0x64, 0x46, 0xfa, 0x0c, 0x7d, 0x3e, 0x47, 0x9f, 0x2f, 0xd0, 0xe7, 0xbd, 0xe7, 0x33, 0xd2, 0x63, + 0xf4, 0xf9, 0x10, 0x7d, 0xfe, 0x80, 0x3e, 0x4f, 0xd0, 0xe7, 0xe4, 0x39, 0xb2, 0x47, 0xdf, 0x1f, + 0xa3, 0xcf, 0x67, 0xe8, 0xf7, 0xe7, 0xe8, 0xfb, 0x0b, 0xf4, 0xfd, 0xde, 0xa7, 0x33, 0x23, 0x8f, + 0xd0, 0xe7, 0xf1, 0xa7, 0x33, 0xd2, 0x7f, 0x02, 0x00, 0x00, 0xff, 0xff, 0x36, 0x6c, 0xcd, 0x1a, + 0xaf, 0x34, 0x00, 0x00, +} diff --git a/vendor/github.com/gogo/protobuf/test/combos/unmarshaler/thetest.proto b/vendor/github.com/gogo/protobuf/test/combos/unmarshaler/thetest.proto new file mode 100644 index 000000000..10102433d --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/combos/unmarshaler/thetest.proto @@ -0,0 +1,624 @@ +// Copyright (c) 2013, Vastech SA (PTY) LTD. All rights reserved. +// http://github.com/gogo/protobuf/gogoproto +// +// 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 test; + +import "github.com/gogo/protobuf/gogoproto/gogo.proto"; + +option (gogoproto.goproto_stringer_all) = false; +option (gogoproto.goproto_enum_prefix_all) = false; +option (gogoproto.goproto_getters_all) = false; + +option (gogoproto.equal_all) = true; +option (gogoproto.verbose_equal_all) = true; +option (gogoproto.stringer_all) = true; +option (gogoproto.gostring_all) = true; +option (gogoproto.face_all) = true; +option (gogoproto.description_all) = true; + +option (gogoproto.testgen_all) = true; +option (gogoproto.populate_all) = true; +option (gogoproto.benchgen_all) = true; +option (gogoproto.unmarshaler_all) = true; +option (gogoproto.marshaler_all) = false; +option (gogoproto.sizer_all) = true; +option (gogoproto.protosizer_all) = false; + +option (gogoproto.goproto_enum_stringer_all) = false; +option (gogoproto.enum_stringer_all) = true; + +option (gogoproto.unsafe_marshaler_all) = false; +option (gogoproto.unsafe_unmarshaler_all) = false; + +option (gogoproto.compare_all) = true; + +message NidOptNative { + optional double Field1 = 1 [(gogoproto.nullable) = false]; + optional float Field2 = 2 [(gogoproto.nullable) = false]; + optional int32 Field3 = 3 [(gogoproto.nullable) = false]; + optional int64 Field4 = 4 [(gogoproto.nullable) = false]; + optional uint32 Field5 = 5 [(gogoproto.nullable) = false]; + optional uint64 Field6 = 6 [(gogoproto.nullable) = false]; + optional sint32 Field7 = 7 [(gogoproto.nullable) = false]; + optional sint64 Field8 = 8 [(gogoproto.nullable) = false]; + optional fixed32 Field9 = 9 [(gogoproto.nullable) = false]; + optional sfixed32 Field10 = 10 [(gogoproto.nullable) = false]; + optional fixed64 Field11 = 11 [(gogoproto.nullable) = false]; + optional sfixed64 Field12 = 12 [(gogoproto.nullable) = false]; + optional bool Field13 = 13 [(gogoproto.nullable) = false]; + optional string Field14 = 14 [(gogoproto.nullable) = false]; + optional bytes Field15 = 15 [(gogoproto.nullable) = false]; +} + +message NinOptNative { + optional double Field1 = 1; + optional float Field2 = 2; + optional int32 Field3 = 3; + optional int64 Field4 = 4; + optional uint32 Field5 = 5; + optional uint64 Field6 = 6; + optional sint32 Field7 = 7; + optional sint64 Field8 = 8; + optional fixed32 Field9 = 9; + optional sfixed32 Field10 = 10; + optional fixed64 Field11 = 11; + optional sfixed64 Field12 = 12; + optional bool Field13 = 13; + optional string Field14 = 14; + optional bytes Field15 = 15; +} + +message NidRepNative { + repeated double Field1 = 1 [(gogoproto.nullable) = false]; + repeated float Field2 = 2 [(gogoproto.nullable) = false]; + repeated int32 Field3 = 3 [(gogoproto.nullable) = false]; + repeated int64 Field4 = 4 [(gogoproto.nullable) = false]; + repeated uint32 Field5 = 5 [(gogoproto.nullable) = false]; + repeated uint64 Field6 = 6 [(gogoproto.nullable) = false]; + repeated sint32 Field7 = 7 [(gogoproto.nullable) = false]; + repeated sint64 Field8 = 8 [(gogoproto.nullable) = false]; + repeated fixed32 Field9 = 9 [(gogoproto.nullable) = false]; + repeated sfixed32 Field10 = 10 [(gogoproto.nullable) = false]; + repeated fixed64 Field11 = 11 [(gogoproto.nullable) = false]; + repeated sfixed64 Field12 = 12 [(gogoproto.nullable) = false]; + repeated bool Field13 = 13 [(gogoproto.nullable) = false]; + repeated string Field14 = 14 [(gogoproto.nullable) = false]; + repeated bytes Field15 = 15 [(gogoproto.nullable) = false]; +} + +message NinRepNative { + repeated double Field1 = 1; + repeated float Field2 = 2; + repeated int32 Field3 = 3; + repeated int64 Field4 = 4; + repeated uint32 Field5 = 5; + repeated uint64 Field6 = 6; + repeated sint32 Field7 = 7; + repeated sint64 Field8 = 8; + repeated fixed32 Field9 = 9; + repeated sfixed32 Field10 = 10; + repeated fixed64 Field11 = 11; + repeated sfixed64 Field12 = 12; + repeated bool Field13 = 13; + repeated string Field14 = 14; + repeated bytes Field15 = 15; +} + +message NidRepPackedNative { + repeated double Field1 = 1 [(gogoproto.nullable) = false, packed = true]; + repeated float Field2 = 2 [(gogoproto.nullable) = false, packed = true]; + repeated int32 Field3 = 3 [(gogoproto.nullable) = false, packed = true]; + repeated int64 Field4 = 4 [(gogoproto.nullable) = false, packed = true]; + repeated uint32 Field5 = 5 [(gogoproto.nullable) = false, packed = true]; + repeated uint64 Field6 = 6 [(gogoproto.nullable) = false, packed = true]; + repeated sint32 Field7 = 7 [(gogoproto.nullable) = false, packed = true]; + repeated sint64 Field8 = 8 [(gogoproto.nullable) = false, packed = true]; + repeated fixed32 Field9 = 9 [(gogoproto.nullable) = false, packed = true]; + repeated sfixed32 Field10 = 10 [(gogoproto.nullable) = false, packed = true]; + repeated fixed64 Field11 = 11 [(gogoproto.nullable) = false, packed = true]; + repeated sfixed64 Field12 = 12 [(gogoproto.nullable) = false, packed = true]; + repeated bool Field13 = 13 [(gogoproto.nullable) = false, packed = true]; +} + +message NinRepPackedNative { + repeated double Field1 = 1 [packed = true]; + repeated float Field2 = 2 [packed = true]; + repeated int32 Field3 = 3 [packed = true]; + repeated int64 Field4 = 4 [packed = true]; + repeated uint32 Field5 = 5 [packed = true]; + repeated uint64 Field6 = 6 [packed = true]; + repeated sint32 Field7 = 7 [packed = true]; + repeated sint64 Field8 = 8 [packed = true]; + repeated fixed32 Field9 = 9 [packed = true]; + repeated sfixed32 Field10 = 10 [packed = true]; + repeated fixed64 Field11 = 11 [packed = true]; + repeated sfixed64 Field12 = 12 [packed = true]; + repeated bool Field13 = 13 [packed = true]; +} + +message NidOptStruct { + optional double Field1 = 1 [(gogoproto.nullable) = false]; + optional float Field2 = 2 [(gogoproto.nullable) = false]; + optional NidOptNative Field3 = 3 [(gogoproto.nullable) = false]; + optional NinOptNative Field4 = 4 [(gogoproto.nullable) = false]; + optional uint64 Field6 = 6 [(gogoproto.nullable) = false]; + optional sint32 Field7 = 7 [(gogoproto.nullable) = false]; + optional NidOptNative Field8 = 8 [(gogoproto.nullable) = false]; + optional bool Field13 = 13 [(gogoproto.nullable) = false]; + optional string Field14 = 14 [(gogoproto.nullable) = false]; + optional bytes Field15 = 15 [(gogoproto.nullable) = false]; +} + +message NinOptStruct { + optional double Field1 = 1; + optional float Field2 = 2; + optional NidOptNative Field3 = 3; + optional NinOptNative Field4 = 4; + optional uint64 Field6 = 6; + optional sint32 Field7 = 7; + optional NidOptNative Field8 = 8; + optional bool Field13 = 13; + optional string Field14 = 14; + optional bytes Field15 = 15; +} + +message NidRepStruct { + repeated double Field1 = 1 [(gogoproto.nullable) = false]; + repeated float Field2 = 2 [(gogoproto.nullable) = false]; + repeated NidOptNative Field3 = 3 [(gogoproto.nullable) = false]; + repeated NinOptNative Field4 = 4 [(gogoproto.nullable) = false]; + repeated uint64 Field6 = 6 [(gogoproto.nullable) = false]; + repeated sint32 Field7 = 7 [(gogoproto.nullable) = false]; + repeated NidOptNative Field8 = 8 [(gogoproto.nullable) = false]; + repeated bool Field13 = 13 [(gogoproto.nullable) = false]; + repeated string Field14 = 14 [(gogoproto.nullable) = false]; + repeated bytes Field15 = 15 [(gogoproto.nullable) = false]; +} + +message NinRepStruct { + repeated double Field1 = 1; + repeated float Field2 = 2; + repeated NidOptNative Field3 = 3; + repeated NinOptNative Field4 = 4; + repeated uint64 Field6 = 6; + repeated sint32 Field7 = 7; + repeated NidOptNative Field8 = 8; + repeated bool Field13 = 13; + repeated string Field14 = 14; + repeated bytes Field15 = 15; +} + +message NidEmbeddedStruct { + optional NidOptNative Field1 = 1 [(gogoproto.embed) = true]; + optional NidOptNative Field200 = 200 [(gogoproto.nullable) = false]; + optional bool Field210 = 210 [(gogoproto.nullable) = false]; +} + +message NinEmbeddedStruct { + optional NidOptNative Field1 = 1 [(gogoproto.embed) = true]; + optional NidOptNative Field200 = 200; + optional bool Field210 = 210; +} + +message NidNestedStruct { + optional NidOptStruct Field1 = 1 [(gogoproto.nullable) = false]; + repeated NidRepStruct Field2 = 2 [(gogoproto.nullable) = false]; +} + +message NinNestedStruct { + optional NinOptStruct Field1 = 1; + repeated NinRepStruct Field2 = 2; +} + +message NidOptCustom { + optional bytes Id = 1 [(gogoproto.customtype) = "Uuid", (gogoproto.nullable) = false]; + optional bytes Value = 2 [(gogoproto.customtype) = "github.com/gogo/protobuf/test/custom.Uint128", (gogoproto.nullable) = false]; +} + +message CustomDash { + optional bytes Value = 1 [(gogoproto.customtype) = "github.com/gogo/protobuf/test/custom-dash-type.Bytes"]; +} + +message NinOptCustom { + optional bytes Id = 1 [(gogoproto.customtype) = "Uuid"]; + optional bytes Value = 2 [(gogoproto.customtype) = "github.com/gogo/protobuf/test/custom.Uint128"]; +} + +message NidRepCustom { + repeated bytes Id = 1 [(gogoproto.customtype) = "Uuid", (gogoproto.nullable) = false]; + repeated bytes Value = 2 [(gogoproto.customtype) = "github.com/gogo/protobuf/test/custom.Uint128", (gogoproto.nullable) = false]; +} + +message NinRepCustom { + repeated bytes Id = 1 [(gogoproto.customtype) = "Uuid"]; + repeated bytes Value = 2 [(gogoproto.customtype) = "github.com/gogo/protobuf/test/custom.Uint128"]; +} + +message NinOptNativeUnion { + option (gogoproto.onlyone) = true; + optional double Field1 = 1; + optional float Field2 = 2; + optional int32 Field3 = 3; + optional int64 Field4 = 4; + optional uint32 Field5 = 5; + optional uint64 Field6 = 6; + optional bool Field13 = 13; + optional string Field14 = 14; + optional bytes Field15 = 15; +} + +message NinOptStructUnion { + option (gogoproto.onlyone) = true; + optional double Field1 = 1; + optional float Field2 = 2; + optional NidOptNative Field3 = 3; + optional NinOptNative Field4 = 4; + optional uint64 Field6 = 6; + optional sint32 Field7 = 7; + optional bool Field13 = 13; + optional string Field14 = 14; + optional bytes Field15 = 15; +} + +message NinEmbeddedStructUnion { + option (gogoproto.onlyone) = true; + optional NidOptNative Field1 = 1 [(gogoproto.embed) = true]; + optional NinOptNative Field200 = 200; + optional bool Field210 = 210; +} + +message NinNestedStructUnion { + option (gogoproto.onlyone) = true; + optional NinOptNativeUnion Field1 = 1; + optional NinOptStructUnion Field2 = 2; + optional NinEmbeddedStructUnion Field3 = 3; +} + +message Tree { + option (gogoproto.onlyone) = true; + optional OrBranch Or = 1; + optional AndBranch And = 2; + optional Leaf Leaf = 3; +} + +message OrBranch { + optional Tree Left = 1 [(gogoproto.nullable) = false]; + optional Tree Right = 2 [(gogoproto.nullable) = false]; +} + +message AndBranch { + optional Tree Left = 1 [(gogoproto.nullable) = false]; + optional Tree Right = 2 [(gogoproto.nullable) = false]; +} + +message Leaf { + optional int64 Value = 1 [(gogoproto.nullable) = false]; + optional string StrValue = 2 [(gogoproto.nullable) = false]; +} + +message DeepTree { + option (gogoproto.onlyone) = true; + optional ADeepBranch Down = 1; + optional AndDeepBranch And = 2; + optional DeepLeaf Leaf = 3; +} + +message ADeepBranch { + optional DeepTree Down = 2 [(gogoproto.nullable) = false]; +} + +message AndDeepBranch { + optional DeepTree Left = 1 [(gogoproto.nullable) = false]; + optional DeepTree Right = 2 [(gogoproto.nullable) = false]; +} + +message DeepLeaf { + optional Tree Tree = 1 [(gogoproto.nullable) = false]; +} + +message Nil { + +} + +enum TheTestEnum { + A = 0; + B = 1; + C = 2; +} + +enum AnotherTestEnum { + option (gogoproto.goproto_enum_prefix) = false; + D = 10; + E = 11; +} + +// YetAnotherTestEnum is used to test cross-package import of custom name +// fields and default resolution. +enum YetAnotherTestEnum { + option (gogoproto.goproto_enum_prefix) = false; + AA = 0; + BB = 1 [(gogoproto.enumvalue_customname) = "BetterYetBB"]; +} + +// YetAnotherTestEnum is used to test cross-package import of custom name +// fields and default resolution. +enum YetYetAnotherTestEnum { + option (gogoproto.goproto_enum_prefix) = true; + CC = 0; + DD = 1 [(gogoproto.enumvalue_customname) = "BetterYetDD"]; +} + +message NidOptEnum { + optional TheTestEnum Field1 = 1 [(gogoproto.nullable) = false]; +} + +message NinOptEnum { + optional TheTestEnum Field1 = 1; + optional YetAnotherTestEnum Field2 = 2; + optional YetYetAnotherTestEnum Field3 = 3; +} + +message NidRepEnum { + repeated TheTestEnum Field1 = 1 [(gogoproto.nullable) = false]; + repeated YetAnotherTestEnum Field2 = 2 [(gogoproto.nullable) = false]; + repeated YetYetAnotherTestEnum Field3 = 3 [(gogoproto.nullable) = false]; +} + +message NinRepEnum { + repeated TheTestEnum Field1 = 1; + repeated YetAnotherTestEnum Field2 = 2; + repeated YetYetAnotherTestEnum Field3 = 3; +} + +message NinOptEnumDefault { + option (gogoproto.goproto_getters) = true; + option (gogoproto.face) = false; + optional TheTestEnum Field1 = 1 [default=C]; + optional YetAnotherTestEnum Field2 = 2 [default=BB]; + optional YetYetAnotherTestEnum Field3 = 3 [default=CC]; +} + +message AnotherNinOptEnum { + optional AnotherTestEnum Field1 = 1; + optional YetAnotherTestEnum Field2 = 2; + optional YetYetAnotherTestEnum Field3 = 3; +} + +message AnotherNinOptEnumDefault { + option (gogoproto.goproto_getters) = true; + option (gogoproto.face) = false; + optional AnotherTestEnum Field1 = 1 [default=E]; + optional YetAnotherTestEnum Field2 = 2 [default=BB]; + optional YetYetAnotherTestEnum Field3 = 3 [default=CC]; +} + + +message Timer { + optional sfixed64 Time1 = 1 [(gogoproto.nullable) = false]; + optional sfixed64 Time2 = 2 [(gogoproto.nullable) = false]; + optional bytes Data = 3 [(gogoproto.nullable) = false]; +} + +message MyExtendable { + option (gogoproto.face) = false; + optional int64 Field1 = 1; + extensions 100 to 199; +} + +extend MyExtendable { + optional double FieldA = 100; + optional NinOptNative FieldB = 101; + optional NinEmbeddedStruct FieldC = 102; + repeated int64 FieldD = 104; + repeated NinOptNative FieldE = 105; +} + +message OtherExtenable { + option (gogoproto.face) = false; + optional int64 Field2 = 2; + extensions 14 to 16; + optional int64 Field13 = 13; + extensions 10 to 12; + optional MyExtendable M = 1; +} + +message NestedDefinition { + optional int64 Field1 = 1; + message NestedMessage { + optional fixed64 NestedField1 = 1; + optional NestedNestedMsg NNM = 2; + message NestedNestedMsg { + optional string NestedNestedField1 = 10; + } + } + enum NestedEnum { + TYPE_NESTED = 1; + } + optional NestedEnum EnumField = 2; + optional NestedMessage.NestedNestedMsg NNM = 3; + optional NestedMessage NM = 4; +} + +message NestedScope { + optional NestedDefinition.NestedMessage.NestedNestedMsg A = 1; + optional NestedDefinition.NestedEnum B = 2; + optional NestedDefinition.NestedMessage C = 3; +} + +message NinOptNativeDefault { + option (gogoproto.goproto_getters) = true; + option (gogoproto.face) = false; + optional double Field1 = 1 [default = 1234.1234]; + optional float Field2 = 2 [default = 1234.1234]; + optional int32 Field3 = 3 [default = 1234]; + optional int64 Field4 = 4 [default = 1234]; + optional uint32 Field5 = 5 [default = 1234]; + optional uint64 Field6 = 6 [default = 1234]; + optional sint32 Field7 = 7 [default = 1234]; + optional sint64 Field8 = 8 [default = 1234]; + optional fixed32 Field9 = 9 [default = 1234]; + optional sfixed32 Field10 = 10 [default = 1234]; + optional fixed64 Field11 = 11 [default = 1234]; + optional sfixed64 Field12 = 12 [default = 1234]; + optional bool Field13 = 13 [default = true]; + optional string Field14 = 14 [default = "1234"]; + optional bytes Field15 = 15; +} + +message CustomContainer { + optional NidOptCustom CustomStruct = 1 [(gogoproto.nullable) = false]; +} + +message CustomNameNidOptNative { + optional double Field1 = 1 [(gogoproto.nullable) = false, (gogoproto.customname) = "FieldA"]; + optional float Field2 = 2 [(gogoproto.nullable) = false, (gogoproto.customname) = "FieldB"]; + optional int32 Field3 = 3 [(gogoproto.nullable) = false, (gogoproto.customname) = "FieldC"]; + optional int64 Field4 = 4 [(gogoproto.nullable) = false, (gogoproto.customname) = "FieldD"]; + optional uint32 Field5 = 5 [(gogoproto.nullable) = false, (gogoproto.customname) = "FieldE"]; + optional uint64 Field6 = 6 [(gogoproto.nullable) = false, (gogoproto.customname) = "FieldF"]; + optional sint32 Field7 = 7 [(gogoproto.nullable) = false, (gogoproto.customname) = "FieldG"]; + optional sint64 Field8 = 8 [(gogoproto.nullable) = false, (gogoproto.customname) = "FieldH"]; + optional fixed32 Field9 = 9 [(gogoproto.nullable) = false, (gogoproto.customname) = "FieldI"]; + optional sfixed32 Field10 = 10 [(gogoproto.nullable) = false, (gogoproto.customname) = "FieldJ"]; + optional fixed64 Field11 = 11 [(gogoproto.nullable) = false, (gogoproto.customname) = "FieldK"]; + optional sfixed64 Field12 = 12 [(gogoproto.nullable) = false, (gogoproto.customname) = "FieldL"]; + optional bool Field13 = 13 [(gogoproto.nullable) = false, (gogoproto.customname) = "FieldM"]; + optional string Field14 = 14 [(gogoproto.nullable) = false, (gogoproto.customname) = "FieldN"]; + optional bytes Field15 = 15 [(gogoproto.nullable) = false, (gogoproto.customname) = "FieldO"]; +} + +message CustomNameNinOptNative { + optional double Field1 = 1 [(gogoproto.customname) = "FieldA"]; + optional float Field2 = 2 [(gogoproto.customname) = "FieldB"]; + optional int32 Field3 = 3 [(gogoproto.customname) = "FieldC"]; + optional int64 Field4 = 4 [(gogoproto.customname) = "FieldD"]; + optional uint32 Field5 = 5 [(gogoproto.customname) = "FieldE"]; + optional uint64 Field6 = 6 [(gogoproto.customname) = "FieldF"]; + optional sint32 Field7 = 7 [(gogoproto.customname) = "FieldG"]; + optional sint64 Field8 = 8 [(gogoproto.customname) = "FieldH"]; + optional fixed32 Field9 = 9 [(gogoproto.customname) = "FieldI"]; + optional sfixed32 Field10 = 10 [(gogoproto.customname) = "FieldJ"]; + optional fixed64 Field11 = 11 [(gogoproto.customname) = "FieldK"]; + optional sfixed64 Field12 = 12 [(gogoproto.customname) = "FielL"]; + optional bool Field13 = 13 [(gogoproto.customname) = "FieldM"]; + optional string Field14 = 14 [(gogoproto.customname) = "FieldN"]; + optional bytes Field15 = 15 [(gogoproto.customname) = "FieldO"]; +} + +message CustomNameNinRepNative { + repeated double Field1 = 1 [(gogoproto.customname) = "FieldA"]; + repeated float Field2 = 2 [(gogoproto.customname) = "FieldB"]; + repeated int32 Field3 = 3 [(gogoproto.customname) = "FieldC"]; + repeated int64 Field4 = 4 [(gogoproto.customname) = "FieldD"]; + repeated uint32 Field5 = 5 [(gogoproto.customname) = "FieldE"]; + repeated uint64 Field6 = 6 [(gogoproto.customname) = "FieldF"]; + repeated sint32 Field7 = 7 [(gogoproto.customname) = "FieldG"]; + repeated sint64 Field8 = 8 [(gogoproto.customname) = "FieldH"]; + repeated fixed32 Field9 = 9 [(gogoproto.customname) = "FieldI"]; + repeated sfixed32 Field10 = 10 [(gogoproto.customname) = "FieldJ"]; + repeated fixed64 Field11 = 11 [(gogoproto.customname) = "FieldK"]; + repeated sfixed64 Field12 = 12 [(gogoproto.customname) = "FieldL"]; + repeated bool Field13 = 13 [(gogoproto.customname) = "FieldM"]; + repeated string Field14 = 14 [(gogoproto.customname) = "FieldN"]; + repeated bytes Field15 = 15 [(gogoproto.customname) = "FieldO"]; +} + +message CustomNameNinStruct { + optional double Field1 = 1 [(gogoproto.customname) = "FieldA"]; + optional float Field2 = 2 [(gogoproto.customname) = "FieldB"]; + optional NidOptNative Field3 = 3 [(gogoproto.customname) = "FieldC"]; + repeated NinOptNative Field4 = 4 [(gogoproto.customname) = "FieldD"]; + optional uint64 Field6 = 6 [(gogoproto.customname) = "FieldE"]; + optional sint32 Field7 = 7 [(gogoproto.customname) = "FieldF"]; + optional NidOptNative Field8 = 8 [(gogoproto.customname) = "FieldG"]; + optional bool Field13 = 13 [(gogoproto.customname) = "FieldH"]; + optional string Field14 = 14 [(gogoproto.customname) = "FieldI"]; + optional bytes Field15 = 15 [(gogoproto.customname) = "FieldJ"]; +} + +message CustomNameCustomType { + optional bytes Id = 1 [(gogoproto.customname) = "FieldA", (gogoproto.customtype) = "Uuid"]; + optional bytes Value = 2 [(gogoproto.customname) = "FieldB", (gogoproto.customtype) = "github.com/gogo/protobuf/test/custom.Uint128"]; + repeated bytes Ids = 3 [(gogoproto.customname) = "FieldC", (gogoproto.customtype) = "Uuid"]; + repeated bytes Values = 4 [(gogoproto.customname) = "FieldD", (gogoproto.customtype) = "github.com/gogo/protobuf/test/custom.Uint128"]; +} + +message CustomNameNinEmbeddedStructUnion { + option (gogoproto.onlyone) = true; + optional NidOptNative Field1 = 1 [(gogoproto.embed) = true]; + optional NinOptNative Field200 = 200 [(gogoproto.customname) = "FieldA"]; + optional bool Field210 = 210 [(gogoproto.customname) = "FieldB"]; +} + +message CustomNameEnum { + optional TheTestEnum Field1 = 1 [(gogoproto.customname) = "FieldA"]; + repeated TheTestEnum Field2 = 2 [(gogoproto.customname) = "FieldB"]; +} + +message NoExtensionsMap { + option (gogoproto.face) = false; + option (gogoproto.goproto_extensions_map) = false; + optional int64 Field1 = 1; + extensions 100 to 199; +} + +extend NoExtensionsMap { + optional double FieldA1 = 100; + optional NinOptNative FieldB1 = 101; + optional NinEmbeddedStruct FieldC1 = 102; +} + +message Unrecognized { + option (gogoproto.goproto_unrecognized) = false; + optional string Field1 = 1; +} + +message UnrecognizedWithInner { + message Inner { + option (gogoproto.goproto_unrecognized) = false; + optional uint32 Field1 = 1; + } + + repeated Inner embedded = 1; + optional string Field2 = 2; +} + +message UnrecognizedWithEmbed { + message Embedded { + option (gogoproto.goproto_unrecognized) = false; + optional uint32 Field1 = 1; + } + + optional Embedded embedded = 1 [(gogoproto.embed) = true, (gogoproto.nullable) = false]; + optional string Field2 = 2; +} + +message Node { + optional string Label = 1; + repeated Node Children = 2; +} + diff --git a/vendor/github.com/gogo/protobuf/test/combos/unmarshaler/thetestpb_test.go b/vendor/github.com/gogo/protobuf/test/combos/unmarshaler/thetestpb_test.go new file mode 100644 index 000000000..5de863bf3 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/combos/unmarshaler/thetestpb_test.go @@ -0,0 +1,14637 @@ +// Code generated by protoc-gen-gogo. +// source: combos/unmarshaler/thetest.proto +// DO NOT EDIT! + +/* +Package test is a generated protocol buffer package. + +It is generated from these files: + combos/unmarshaler/thetest.proto + +It has these top-level messages: + NidOptNative + NinOptNative + NidRepNative + NinRepNative + NidRepPackedNative + NinRepPackedNative + NidOptStruct + NinOptStruct + NidRepStruct + NinRepStruct + NidEmbeddedStruct + NinEmbeddedStruct + NidNestedStruct + NinNestedStruct + NidOptCustom + CustomDash + NinOptCustom + NidRepCustom + NinRepCustom + NinOptNativeUnion + NinOptStructUnion + NinEmbeddedStructUnion + NinNestedStructUnion + Tree + OrBranch + AndBranch + Leaf + DeepTree + ADeepBranch + AndDeepBranch + DeepLeaf + Nil + NidOptEnum + NinOptEnum + NidRepEnum + NinRepEnum + NinOptEnumDefault + AnotherNinOptEnum + AnotherNinOptEnumDefault + Timer + MyExtendable + OtherExtenable + NestedDefinition + NestedScope + NinOptNativeDefault + CustomContainer + CustomNameNidOptNative + CustomNameNinOptNative + CustomNameNinRepNative + CustomNameNinStruct + CustomNameCustomType + CustomNameNinEmbeddedStructUnion + CustomNameEnum + NoExtensionsMap + Unrecognized + UnrecognizedWithInner + UnrecognizedWithEmbed + Node +*/ +package test + +import testing "testing" +import math_rand "math/rand" +import time "time" +import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" +import github_com_gogo_protobuf_jsonpb "github.com/gogo/protobuf/jsonpb" +import fmt "fmt" +import go_parser "go/parser" +import proto "github.com/gogo/protobuf/proto" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +func TestNidOptNativeProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidOptNative(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidOptNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkNidOptNativeProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NidOptNative, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNidOptNative(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNidOptNativeProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNidOptNative(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &NidOptNative{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinOptNativeProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptNative(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinOptNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkNinOptNativeProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinOptNative, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNinOptNative(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNinOptNativeProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinOptNative(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &NinOptNative{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNidRepNativeProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepNative(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidRepNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkNidRepNativeProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NidRepNative, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNidRepNative(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNidRepNativeProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNidRepNative(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &NidRepNative{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinRepNativeProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepNative(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinRepNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkNinRepNativeProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinRepNative, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNinRepNative(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNinRepNativeProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinRepNative(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &NinRepNative{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNidRepPackedNativeProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepPackedNative(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidRepPackedNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkNidRepPackedNativeProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NidRepPackedNative, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNidRepPackedNative(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNidRepPackedNativeProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNidRepPackedNative(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &NidRepPackedNative{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinRepPackedNativeProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepPackedNative(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinRepPackedNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkNinRepPackedNativeProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinRepPackedNative, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNinRepPackedNative(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNinRepPackedNativeProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinRepPackedNative(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &NinRepPackedNative{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNidOptStructProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidOptStruct(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidOptStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkNidOptStructProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NidOptStruct, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNidOptStruct(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNidOptStructProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNidOptStruct(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &NidOptStruct{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinOptStructProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptStruct(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinOptStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkNinOptStructProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinOptStruct, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNinOptStruct(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNinOptStructProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinOptStruct(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &NinOptStruct{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNidRepStructProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepStruct(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidRepStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkNidRepStructProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NidRepStruct, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNidRepStruct(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNidRepStructProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNidRepStruct(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &NidRepStruct{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinRepStructProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepStruct(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinRepStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkNinRepStructProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinRepStruct, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNinRepStruct(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNinRepStructProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinRepStruct(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &NinRepStruct{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNidEmbeddedStructProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidEmbeddedStruct(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidEmbeddedStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkNidEmbeddedStructProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NidEmbeddedStruct, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNidEmbeddedStruct(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNidEmbeddedStructProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNidEmbeddedStruct(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &NidEmbeddedStruct{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinEmbeddedStructProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinEmbeddedStruct(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinEmbeddedStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkNinEmbeddedStructProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinEmbeddedStruct, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNinEmbeddedStruct(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNinEmbeddedStructProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinEmbeddedStruct(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &NinEmbeddedStruct{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNidNestedStructProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidNestedStruct(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidNestedStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkNidNestedStructProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NidNestedStruct, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNidNestedStruct(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNidNestedStructProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNidNestedStruct(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &NidNestedStruct{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinNestedStructProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinNestedStruct(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinNestedStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkNinNestedStructProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinNestedStruct, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNinNestedStruct(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNinNestedStructProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinNestedStruct(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &NinNestedStruct{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNidOptCustomProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidOptCustom(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidOptCustom{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkNidOptCustomProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NidOptCustom, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNidOptCustom(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNidOptCustomProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNidOptCustom(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &NidOptCustom{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestCustomDashProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomDash(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &CustomDash{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkCustomDashProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*CustomDash, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedCustomDash(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkCustomDashProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedCustomDash(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &CustomDash{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinOptCustomProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptCustom(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinOptCustom{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkNinOptCustomProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinOptCustom, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNinOptCustom(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNinOptCustomProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinOptCustom(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &NinOptCustom{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNidRepCustomProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepCustom(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidRepCustom{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkNidRepCustomProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NidRepCustom, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNidRepCustom(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNidRepCustomProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNidRepCustom(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &NidRepCustom{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinRepCustomProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepCustom(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinRepCustom{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkNinRepCustomProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinRepCustom, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNinRepCustom(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNinRepCustomProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinRepCustom(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &NinRepCustom{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinOptNativeUnionProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptNativeUnion(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinOptNativeUnion{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkNinOptNativeUnionProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinOptNativeUnion, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNinOptNativeUnion(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNinOptNativeUnionProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinOptNativeUnion(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &NinOptNativeUnion{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinOptStructUnionProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptStructUnion(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinOptStructUnion{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkNinOptStructUnionProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinOptStructUnion, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNinOptStructUnion(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNinOptStructUnionProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinOptStructUnion(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &NinOptStructUnion{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinEmbeddedStructUnionProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinEmbeddedStructUnion(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinEmbeddedStructUnion{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkNinEmbeddedStructUnionProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinEmbeddedStructUnion, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNinEmbeddedStructUnion(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNinEmbeddedStructUnionProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinEmbeddedStructUnion(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &NinEmbeddedStructUnion{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinNestedStructUnionProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinNestedStructUnion(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinNestedStructUnion{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkNinNestedStructUnionProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinNestedStructUnion, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNinNestedStructUnion(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNinNestedStructUnionProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinNestedStructUnion(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &NinNestedStructUnion{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestTreeProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedTree(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Tree{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkTreeProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Tree, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedTree(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkTreeProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedTree(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &Tree{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestOrBranchProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedOrBranch(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &OrBranch{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkOrBranchProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*OrBranch, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedOrBranch(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkOrBranchProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedOrBranch(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &OrBranch{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestAndBranchProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAndBranch(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &AndBranch{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkAndBranchProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*AndBranch, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedAndBranch(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkAndBranchProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedAndBranch(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &AndBranch{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestLeafProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedLeaf(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Leaf{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkLeafProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Leaf, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedLeaf(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkLeafProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedLeaf(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &Leaf{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestDeepTreeProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedDeepTree(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &DeepTree{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkDeepTreeProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*DeepTree, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedDeepTree(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkDeepTreeProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedDeepTree(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &DeepTree{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestADeepBranchProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedADeepBranch(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &ADeepBranch{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkADeepBranchProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*ADeepBranch, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedADeepBranch(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkADeepBranchProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedADeepBranch(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &ADeepBranch{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestAndDeepBranchProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAndDeepBranch(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &AndDeepBranch{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkAndDeepBranchProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*AndDeepBranch, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedAndDeepBranch(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkAndDeepBranchProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedAndDeepBranch(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &AndDeepBranch{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestDeepLeafProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedDeepLeaf(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &DeepLeaf{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkDeepLeafProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*DeepLeaf, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedDeepLeaf(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkDeepLeafProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedDeepLeaf(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &DeepLeaf{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNilProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNil(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Nil{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkNilProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Nil, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNil(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNilProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNil(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &Nil{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNidOptEnumProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidOptEnum(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidOptEnum{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkNidOptEnumProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NidOptEnum, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNidOptEnum(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNidOptEnumProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNidOptEnum(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &NidOptEnum{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinOptEnumProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptEnum(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinOptEnum{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkNinOptEnumProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinOptEnum, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNinOptEnum(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNinOptEnumProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinOptEnum(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &NinOptEnum{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNidRepEnumProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepEnum(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidRepEnum{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkNidRepEnumProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NidRepEnum, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNidRepEnum(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNidRepEnumProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNidRepEnum(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &NidRepEnum{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinRepEnumProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepEnum(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinRepEnum{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkNinRepEnumProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinRepEnum, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNinRepEnum(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNinRepEnumProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinRepEnum(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &NinRepEnum{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinOptEnumDefaultProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptEnumDefault(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinOptEnumDefault{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkNinOptEnumDefaultProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinOptEnumDefault, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNinOptEnumDefault(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNinOptEnumDefaultProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinOptEnumDefault(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &NinOptEnumDefault{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestAnotherNinOptEnumProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAnotherNinOptEnum(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &AnotherNinOptEnum{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkAnotherNinOptEnumProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*AnotherNinOptEnum, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedAnotherNinOptEnum(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkAnotherNinOptEnumProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedAnotherNinOptEnum(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &AnotherNinOptEnum{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestAnotherNinOptEnumDefaultProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAnotherNinOptEnumDefault(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &AnotherNinOptEnumDefault{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkAnotherNinOptEnumDefaultProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*AnotherNinOptEnumDefault, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedAnotherNinOptEnumDefault(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkAnotherNinOptEnumDefaultProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedAnotherNinOptEnumDefault(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &AnotherNinOptEnumDefault{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestTimerProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedTimer(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Timer{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkTimerProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Timer, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedTimer(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkTimerProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedTimer(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &Timer{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestMyExtendableProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMyExtendable(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &MyExtendable{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkMyExtendableProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*MyExtendable, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedMyExtendable(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkMyExtendableProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedMyExtendable(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &MyExtendable{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestOtherExtenableProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedOtherExtenable(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &OtherExtenable{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkOtherExtenableProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*OtherExtenable, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedOtherExtenable(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkOtherExtenableProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedOtherExtenable(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &OtherExtenable{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNestedDefinitionProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNestedDefinition(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NestedDefinition{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkNestedDefinitionProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NestedDefinition, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNestedDefinition(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNestedDefinitionProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNestedDefinition(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &NestedDefinition{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNestedDefinition_NestedMessageProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNestedDefinition_NestedMessage(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NestedDefinition_NestedMessage{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkNestedDefinition_NestedMessageProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NestedDefinition_NestedMessage, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNestedDefinition_NestedMessage(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNestedDefinition_NestedMessageProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNestedDefinition_NestedMessage(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &NestedDefinition_NestedMessage{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNestedDefinition_NestedMessage_NestedNestedMsgProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NestedDefinition_NestedMessage_NestedNestedMsg{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkNestedDefinition_NestedMessage_NestedNestedMsgProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NestedDefinition_NestedMessage_NestedNestedMsg, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNestedDefinition_NestedMessage_NestedNestedMsgProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &NestedDefinition_NestedMessage_NestedNestedMsg{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNestedScopeProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNestedScope(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NestedScope{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkNestedScopeProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NestedScope, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNestedScope(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNestedScopeProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNestedScope(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &NestedScope{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinOptNativeDefaultProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptNativeDefault(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinOptNativeDefault{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkNinOptNativeDefaultProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinOptNativeDefault, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNinOptNativeDefault(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNinOptNativeDefaultProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinOptNativeDefault(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &NinOptNativeDefault{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestCustomContainerProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomContainer(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &CustomContainer{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkCustomContainerProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*CustomContainer, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedCustomContainer(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkCustomContainerProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedCustomContainer(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &CustomContainer{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestCustomNameNidOptNativeProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameNidOptNative(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &CustomNameNidOptNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkCustomNameNidOptNativeProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*CustomNameNidOptNative, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedCustomNameNidOptNative(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkCustomNameNidOptNativeProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedCustomNameNidOptNative(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &CustomNameNidOptNative{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestCustomNameNinOptNativeProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameNinOptNative(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &CustomNameNinOptNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkCustomNameNinOptNativeProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*CustomNameNinOptNative, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedCustomNameNinOptNative(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkCustomNameNinOptNativeProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedCustomNameNinOptNative(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &CustomNameNinOptNative{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestCustomNameNinRepNativeProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameNinRepNative(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &CustomNameNinRepNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkCustomNameNinRepNativeProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*CustomNameNinRepNative, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedCustomNameNinRepNative(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkCustomNameNinRepNativeProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedCustomNameNinRepNative(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &CustomNameNinRepNative{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestCustomNameNinStructProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameNinStruct(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &CustomNameNinStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkCustomNameNinStructProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*CustomNameNinStruct, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedCustomNameNinStruct(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkCustomNameNinStructProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedCustomNameNinStruct(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &CustomNameNinStruct{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestCustomNameCustomTypeProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameCustomType(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &CustomNameCustomType{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkCustomNameCustomTypeProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*CustomNameCustomType, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedCustomNameCustomType(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkCustomNameCustomTypeProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedCustomNameCustomType(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &CustomNameCustomType{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestCustomNameNinEmbeddedStructUnionProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameNinEmbeddedStructUnion(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &CustomNameNinEmbeddedStructUnion{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkCustomNameNinEmbeddedStructUnionProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*CustomNameNinEmbeddedStructUnion, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedCustomNameNinEmbeddedStructUnion(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkCustomNameNinEmbeddedStructUnionProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedCustomNameNinEmbeddedStructUnion(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &CustomNameNinEmbeddedStructUnion{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestCustomNameEnumProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameEnum(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &CustomNameEnum{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkCustomNameEnumProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*CustomNameEnum, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedCustomNameEnum(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkCustomNameEnumProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedCustomNameEnum(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &CustomNameEnum{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNoExtensionsMapProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNoExtensionsMap(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NoExtensionsMap{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkNoExtensionsMapProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NoExtensionsMap, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNoExtensionsMap(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNoExtensionsMapProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNoExtensionsMap(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &NoExtensionsMap{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestUnrecognizedProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUnrecognized(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Unrecognized{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkUnrecognizedProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Unrecognized, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedUnrecognized(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkUnrecognizedProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedUnrecognized(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &Unrecognized{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestUnrecognizedWithInnerProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUnrecognizedWithInner(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &UnrecognizedWithInner{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkUnrecognizedWithInnerProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*UnrecognizedWithInner, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedUnrecognizedWithInner(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkUnrecognizedWithInnerProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedUnrecognizedWithInner(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &UnrecognizedWithInner{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestUnrecognizedWithInner_InnerProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUnrecognizedWithInner_Inner(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &UnrecognizedWithInner_Inner{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkUnrecognizedWithInner_InnerProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*UnrecognizedWithInner_Inner, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedUnrecognizedWithInner_Inner(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkUnrecognizedWithInner_InnerProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedUnrecognizedWithInner_Inner(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &UnrecognizedWithInner_Inner{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestUnrecognizedWithEmbedProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUnrecognizedWithEmbed(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &UnrecognizedWithEmbed{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkUnrecognizedWithEmbedProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*UnrecognizedWithEmbed, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedUnrecognizedWithEmbed(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkUnrecognizedWithEmbedProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedUnrecognizedWithEmbed(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &UnrecognizedWithEmbed{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestUnrecognizedWithEmbed_EmbeddedProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUnrecognizedWithEmbed_Embedded(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &UnrecognizedWithEmbed_Embedded{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkUnrecognizedWithEmbed_EmbeddedProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*UnrecognizedWithEmbed_Embedded, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedUnrecognizedWithEmbed_Embedded(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkUnrecognizedWithEmbed_EmbeddedProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedUnrecognizedWithEmbed_Embedded(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &UnrecognizedWithEmbed_Embedded{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNodeProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNode(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Node{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkNodeProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Node, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNode(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNodeProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNode(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &Node{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNidOptNativeJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidOptNative(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidOptNative{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNinOptNativeJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptNative(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinOptNative{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNidRepNativeJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepNative(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidRepNative{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNinRepNativeJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepNative(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinRepNative{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNidRepPackedNativeJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepPackedNative(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidRepPackedNative{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNinRepPackedNativeJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepPackedNative(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinRepPackedNative{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNidOptStructJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidOptStruct(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidOptStruct{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNinOptStructJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptStruct(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinOptStruct{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNidRepStructJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepStruct(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidRepStruct{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNinRepStructJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepStruct(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinRepStruct{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNidEmbeddedStructJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidEmbeddedStruct(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidEmbeddedStruct{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNinEmbeddedStructJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinEmbeddedStruct(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinEmbeddedStruct{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNidNestedStructJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidNestedStruct(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidNestedStruct{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNinNestedStructJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinNestedStruct(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinNestedStruct{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNidOptCustomJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidOptCustom(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidOptCustom{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestCustomDashJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomDash(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &CustomDash{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNinOptCustomJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptCustom(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinOptCustom{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNidRepCustomJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepCustom(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidRepCustom{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNinRepCustomJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepCustom(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinRepCustom{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNinOptNativeUnionJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptNativeUnion(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinOptNativeUnion{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNinOptStructUnionJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptStructUnion(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinOptStructUnion{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNinEmbeddedStructUnionJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinEmbeddedStructUnion(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinEmbeddedStructUnion{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNinNestedStructUnionJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinNestedStructUnion(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinNestedStructUnion{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestTreeJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedTree(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Tree{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestOrBranchJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedOrBranch(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &OrBranch{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestAndBranchJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAndBranch(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &AndBranch{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestLeafJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedLeaf(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Leaf{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestDeepTreeJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedDeepTree(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &DeepTree{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestADeepBranchJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedADeepBranch(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &ADeepBranch{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestAndDeepBranchJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAndDeepBranch(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &AndDeepBranch{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestDeepLeafJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedDeepLeaf(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &DeepLeaf{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNilJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNil(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Nil{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNidOptEnumJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidOptEnum(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidOptEnum{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNinOptEnumJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptEnum(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinOptEnum{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNidRepEnumJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepEnum(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidRepEnum{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNinRepEnumJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepEnum(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinRepEnum{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNinOptEnumDefaultJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptEnumDefault(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinOptEnumDefault{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestAnotherNinOptEnumJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAnotherNinOptEnum(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &AnotherNinOptEnum{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestAnotherNinOptEnumDefaultJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAnotherNinOptEnumDefault(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &AnotherNinOptEnumDefault{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestTimerJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedTimer(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Timer{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestMyExtendableJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMyExtendable(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &MyExtendable{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestOtherExtenableJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedOtherExtenable(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &OtherExtenable{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNestedDefinitionJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNestedDefinition(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NestedDefinition{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNestedDefinition_NestedMessageJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNestedDefinition_NestedMessage(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NestedDefinition_NestedMessage{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNestedDefinition_NestedMessage_NestedNestedMsgJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NestedDefinition_NestedMessage_NestedNestedMsg{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNestedScopeJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNestedScope(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NestedScope{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNinOptNativeDefaultJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptNativeDefault(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinOptNativeDefault{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestCustomContainerJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomContainer(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &CustomContainer{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestCustomNameNidOptNativeJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameNidOptNative(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &CustomNameNidOptNative{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestCustomNameNinOptNativeJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameNinOptNative(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &CustomNameNinOptNative{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestCustomNameNinRepNativeJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameNinRepNative(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &CustomNameNinRepNative{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestCustomNameNinStructJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameNinStruct(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &CustomNameNinStruct{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestCustomNameCustomTypeJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameCustomType(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &CustomNameCustomType{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestCustomNameNinEmbeddedStructUnionJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameNinEmbeddedStructUnion(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &CustomNameNinEmbeddedStructUnion{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestCustomNameEnumJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameEnum(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &CustomNameEnum{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNoExtensionsMapJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNoExtensionsMap(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NoExtensionsMap{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestUnrecognizedJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUnrecognized(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Unrecognized{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestUnrecognizedWithInnerJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUnrecognizedWithInner(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &UnrecognizedWithInner{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestUnrecognizedWithInner_InnerJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUnrecognizedWithInner_Inner(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &UnrecognizedWithInner_Inner{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestUnrecognizedWithEmbedJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUnrecognizedWithEmbed(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &UnrecognizedWithEmbed{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestUnrecognizedWithEmbed_EmbeddedJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUnrecognizedWithEmbed_Embedded(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &UnrecognizedWithEmbed_Embedded{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNodeJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNode(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Node{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNidOptNativeProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidOptNative(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NidOptNative{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNidOptNativeProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidOptNative(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NidOptNative{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinOptNativeProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptNative(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NinOptNative{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinOptNativeProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptNative(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NinOptNative{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNidRepNativeProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepNative(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NidRepNative{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNidRepNativeProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepNative(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NidRepNative{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinRepNativeProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepNative(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NinRepNative{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinRepNativeProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepNative(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NinRepNative{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNidRepPackedNativeProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepPackedNative(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NidRepPackedNative{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNidRepPackedNativeProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepPackedNative(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NidRepPackedNative{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinRepPackedNativeProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepPackedNative(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NinRepPackedNative{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinRepPackedNativeProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepPackedNative(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NinRepPackedNative{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNidOptStructProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidOptStruct(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NidOptStruct{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNidOptStructProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidOptStruct(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NidOptStruct{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinOptStructProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptStruct(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NinOptStruct{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinOptStructProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptStruct(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NinOptStruct{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNidRepStructProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepStruct(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NidRepStruct{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNidRepStructProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepStruct(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NidRepStruct{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinRepStructProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepStruct(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NinRepStruct{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinRepStructProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepStruct(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NinRepStruct{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNidEmbeddedStructProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidEmbeddedStruct(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NidEmbeddedStruct{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNidEmbeddedStructProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidEmbeddedStruct(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NidEmbeddedStruct{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinEmbeddedStructProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinEmbeddedStruct(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NinEmbeddedStruct{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinEmbeddedStructProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinEmbeddedStruct(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NinEmbeddedStruct{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNidNestedStructProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidNestedStruct(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NidNestedStruct{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNidNestedStructProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidNestedStruct(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NidNestedStruct{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinNestedStructProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinNestedStruct(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NinNestedStruct{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinNestedStructProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinNestedStruct(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NinNestedStruct{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNidOptCustomProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidOptCustom(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NidOptCustom{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNidOptCustomProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidOptCustom(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NidOptCustom{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestCustomDashProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomDash(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &CustomDash{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestCustomDashProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomDash(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &CustomDash{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinOptCustomProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptCustom(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NinOptCustom{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinOptCustomProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptCustom(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NinOptCustom{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNidRepCustomProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepCustom(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NidRepCustom{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNidRepCustomProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepCustom(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NidRepCustom{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinRepCustomProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepCustom(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NinRepCustom{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinRepCustomProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepCustom(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NinRepCustom{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinOptNativeUnionProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptNativeUnion(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NinOptNativeUnion{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinOptNativeUnionProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptNativeUnion(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NinOptNativeUnion{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinOptStructUnionProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptStructUnion(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NinOptStructUnion{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinOptStructUnionProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptStructUnion(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NinOptStructUnion{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinEmbeddedStructUnionProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinEmbeddedStructUnion(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NinEmbeddedStructUnion{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinEmbeddedStructUnionProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinEmbeddedStructUnion(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NinEmbeddedStructUnion{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinNestedStructUnionProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinNestedStructUnion(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NinNestedStructUnion{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinNestedStructUnionProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinNestedStructUnion(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NinNestedStructUnion{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestTreeProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedTree(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &Tree{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestTreeProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedTree(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &Tree{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestOrBranchProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedOrBranch(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &OrBranch{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestOrBranchProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedOrBranch(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &OrBranch{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestAndBranchProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAndBranch(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &AndBranch{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestAndBranchProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAndBranch(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &AndBranch{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestLeafProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedLeaf(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &Leaf{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestLeafProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedLeaf(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &Leaf{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestDeepTreeProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedDeepTree(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &DeepTree{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestDeepTreeProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedDeepTree(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &DeepTree{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestADeepBranchProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedADeepBranch(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &ADeepBranch{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestADeepBranchProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedADeepBranch(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &ADeepBranch{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestAndDeepBranchProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAndDeepBranch(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &AndDeepBranch{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestAndDeepBranchProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAndDeepBranch(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &AndDeepBranch{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestDeepLeafProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedDeepLeaf(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &DeepLeaf{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestDeepLeafProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedDeepLeaf(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &DeepLeaf{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNilProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNil(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &Nil{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNilProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNil(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &Nil{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNidOptEnumProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidOptEnum(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NidOptEnum{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNidOptEnumProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidOptEnum(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NidOptEnum{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinOptEnumProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptEnum(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NinOptEnum{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinOptEnumProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptEnum(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NinOptEnum{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNidRepEnumProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepEnum(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NidRepEnum{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNidRepEnumProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepEnum(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NidRepEnum{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinRepEnumProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepEnum(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NinRepEnum{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinRepEnumProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepEnum(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NinRepEnum{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinOptEnumDefaultProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptEnumDefault(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NinOptEnumDefault{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinOptEnumDefaultProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptEnumDefault(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NinOptEnumDefault{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestAnotherNinOptEnumProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAnotherNinOptEnum(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &AnotherNinOptEnum{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestAnotherNinOptEnumProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAnotherNinOptEnum(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &AnotherNinOptEnum{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestAnotherNinOptEnumDefaultProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAnotherNinOptEnumDefault(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &AnotherNinOptEnumDefault{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestAnotherNinOptEnumDefaultProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAnotherNinOptEnumDefault(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &AnotherNinOptEnumDefault{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestTimerProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedTimer(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &Timer{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestTimerProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedTimer(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &Timer{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestMyExtendableProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMyExtendable(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &MyExtendable{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestMyExtendableProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMyExtendable(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &MyExtendable{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestOtherExtenableProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedOtherExtenable(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &OtherExtenable{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestOtherExtenableProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedOtherExtenable(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &OtherExtenable{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNestedDefinitionProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNestedDefinition(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NestedDefinition{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNestedDefinitionProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNestedDefinition(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NestedDefinition{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNestedDefinition_NestedMessageProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNestedDefinition_NestedMessage(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NestedDefinition_NestedMessage{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNestedDefinition_NestedMessageProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNestedDefinition_NestedMessage(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NestedDefinition_NestedMessage{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNestedDefinition_NestedMessage_NestedNestedMsgProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NestedDefinition_NestedMessage_NestedNestedMsg{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNestedDefinition_NestedMessage_NestedNestedMsgProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NestedDefinition_NestedMessage_NestedNestedMsg{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNestedScopeProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNestedScope(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NestedScope{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNestedScopeProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNestedScope(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NestedScope{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinOptNativeDefaultProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptNativeDefault(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NinOptNativeDefault{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinOptNativeDefaultProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptNativeDefault(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NinOptNativeDefault{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestCustomContainerProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomContainer(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &CustomContainer{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestCustomContainerProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomContainer(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &CustomContainer{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestCustomNameNidOptNativeProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameNidOptNative(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &CustomNameNidOptNative{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestCustomNameNidOptNativeProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameNidOptNative(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &CustomNameNidOptNative{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestCustomNameNinOptNativeProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameNinOptNative(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &CustomNameNinOptNative{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestCustomNameNinOptNativeProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameNinOptNative(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &CustomNameNinOptNative{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestCustomNameNinRepNativeProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameNinRepNative(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &CustomNameNinRepNative{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestCustomNameNinRepNativeProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameNinRepNative(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &CustomNameNinRepNative{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestCustomNameNinStructProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameNinStruct(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &CustomNameNinStruct{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestCustomNameNinStructProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameNinStruct(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &CustomNameNinStruct{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestCustomNameCustomTypeProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameCustomType(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &CustomNameCustomType{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestCustomNameCustomTypeProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameCustomType(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &CustomNameCustomType{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestCustomNameNinEmbeddedStructUnionProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameNinEmbeddedStructUnion(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &CustomNameNinEmbeddedStructUnion{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestCustomNameNinEmbeddedStructUnionProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameNinEmbeddedStructUnion(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &CustomNameNinEmbeddedStructUnion{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestCustomNameEnumProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameEnum(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &CustomNameEnum{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestCustomNameEnumProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameEnum(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &CustomNameEnum{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNoExtensionsMapProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNoExtensionsMap(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NoExtensionsMap{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNoExtensionsMapProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNoExtensionsMap(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NoExtensionsMap{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestUnrecognizedProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUnrecognized(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &Unrecognized{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestUnrecognizedProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUnrecognized(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &Unrecognized{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestUnrecognizedWithInnerProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUnrecognizedWithInner(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &UnrecognizedWithInner{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestUnrecognizedWithInnerProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUnrecognizedWithInner(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &UnrecognizedWithInner{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestUnrecognizedWithInner_InnerProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUnrecognizedWithInner_Inner(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &UnrecognizedWithInner_Inner{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestUnrecognizedWithInner_InnerProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUnrecognizedWithInner_Inner(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &UnrecognizedWithInner_Inner{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestUnrecognizedWithEmbedProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUnrecognizedWithEmbed(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &UnrecognizedWithEmbed{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestUnrecognizedWithEmbedProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUnrecognizedWithEmbed(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &UnrecognizedWithEmbed{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestUnrecognizedWithEmbed_EmbeddedProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUnrecognizedWithEmbed_Embedded(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &UnrecognizedWithEmbed_Embedded{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestUnrecognizedWithEmbed_EmbeddedProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUnrecognizedWithEmbed_Embedded(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &UnrecognizedWithEmbed_Embedded{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNodeProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNode(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &Node{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNodeProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNode(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &Node{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNidOptNativeCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidOptNative(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NidOptNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNidOptNative(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNinOptNativeCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptNative(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinOptNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNinOptNative(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNidRepNativeCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidRepNative(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NidRepNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNidRepNative(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNinRepNativeCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinRepNative(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinRepNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNinRepNative(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNidRepPackedNativeCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidRepPackedNative(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NidRepPackedNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNidRepPackedNative(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNinRepPackedNativeCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinRepPackedNative(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinRepPackedNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNinRepPackedNative(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNidOptStructCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidOptStruct(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NidOptStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNidOptStruct(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNinOptStructCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptStruct(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinOptStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNinOptStruct(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNidRepStructCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidRepStruct(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NidRepStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNidRepStruct(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNinRepStructCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinRepStruct(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinRepStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNinRepStruct(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNidEmbeddedStructCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidEmbeddedStruct(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NidEmbeddedStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNidEmbeddedStruct(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNinEmbeddedStructCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinEmbeddedStruct(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinEmbeddedStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNinEmbeddedStruct(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNidNestedStructCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidNestedStruct(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NidNestedStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNidNestedStruct(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNinNestedStructCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinNestedStruct(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinNestedStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNinNestedStruct(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNidOptCustomCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidOptCustom(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NidOptCustom{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNidOptCustom(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestCustomDashCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomDash(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &CustomDash{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedCustomDash(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNinOptCustomCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptCustom(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinOptCustom{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNinOptCustom(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNidRepCustomCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidRepCustom(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NidRepCustom{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNidRepCustom(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNinRepCustomCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinRepCustom(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinRepCustom{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNinRepCustom(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNinOptNativeUnionCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptNativeUnion(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinOptNativeUnion{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNinOptNativeUnion(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNinOptStructUnionCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptStructUnion(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinOptStructUnion{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNinOptStructUnion(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNinEmbeddedStructUnionCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinEmbeddedStructUnion(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinEmbeddedStructUnion{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNinEmbeddedStructUnion(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNinNestedStructUnionCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinNestedStructUnion(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinNestedStructUnion{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNinNestedStructUnion(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestTreeCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedTree(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &Tree{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedTree(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestOrBranchCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedOrBranch(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &OrBranch{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedOrBranch(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestAndBranchCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAndBranch(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &AndBranch{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedAndBranch(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestLeafCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedLeaf(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &Leaf{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedLeaf(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestDeepTreeCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedDeepTree(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &DeepTree{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedDeepTree(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestADeepBranchCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedADeepBranch(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &ADeepBranch{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedADeepBranch(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestAndDeepBranchCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAndDeepBranch(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &AndDeepBranch{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedAndDeepBranch(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestDeepLeafCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedDeepLeaf(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &DeepLeaf{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedDeepLeaf(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNilCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNil(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &Nil{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNil(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNidOptEnumCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidOptEnum(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NidOptEnum{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNidOptEnum(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNinOptEnumCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptEnum(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinOptEnum{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNinOptEnum(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNidRepEnumCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidRepEnum(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NidRepEnum{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNidRepEnum(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNinRepEnumCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinRepEnum(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinRepEnum{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNinRepEnum(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNinOptEnumDefaultCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptEnumDefault(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinOptEnumDefault{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNinOptEnumDefault(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestAnotherNinOptEnumCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAnotherNinOptEnum(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &AnotherNinOptEnum{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedAnotherNinOptEnum(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestAnotherNinOptEnumDefaultCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAnotherNinOptEnumDefault(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &AnotherNinOptEnumDefault{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedAnotherNinOptEnumDefault(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestTimerCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedTimer(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &Timer{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedTimer(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestMyExtendableCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedMyExtendable(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &MyExtendable{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedMyExtendable(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestOtherExtenableCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedOtherExtenable(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &OtherExtenable{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedOtherExtenable(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNestedDefinitionCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNestedDefinition(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NestedDefinition{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNestedDefinition(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNestedDefinition_NestedMessageCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNestedDefinition_NestedMessage(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NestedDefinition_NestedMessage{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNestedDefinition_NestedMessage(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNestedDefinition_NestedMessage_NestedNestedMsgCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NestedDefinition_NestedMessage_NestedNestedMsg{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNestedScopeCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNestedScope(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NestedScope{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNestedScope(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNinOptNativeDefaultCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptNativeDefault(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinOptNativeDefault{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNinOptNativeDefault(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestCustomContainerCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomContainer(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &CustomContainer{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedCustomContainer(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestCustomNameNidOptNativeCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameNidOptNative(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &CustomNameNidOptNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedCustomNameNidOptNative(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestCustomNameNinOptNativeCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameNinOptNative(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &CustomNameNinOptNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedCustomNameNinOptNative(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestCustomNameNinRepNativeCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameNinRepNative(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &CustomNameNinRepNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedCustomNameNinRepNative(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestCustomNameNinStructCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameNinStruct(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &CustomNameNinStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedCustomNameNinStruct(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestCustomNameCustomTypeCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameCustomType(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &CustomNameCustomType{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedCustomNameCustomType(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestCustomNameNinEmbeddedStructUnionCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameNinEmbeddedStructUnion(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &CustomNameNinEmbeddedStructUnion{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedCustomNameNinEmbeddedStructUnion(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestCustomNameEnumCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameEnum(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &CustomNameEnum{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedCustomNameEnum(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNoExtensionsMapCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNoExtensionsMap(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NoExtensionsMap{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNoExtensionsMap(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestUnrecognizedCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedUnrecognized(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &Unrecognized{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedUnrecognized(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestUnrecognizedWithInnerCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedUnrecognizedWithInner(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &UnrecognizedWithInner{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedUnrecognizedWithInner(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestUnrecognizedWithInner_InnerCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedUnrecognizedWithInner_Inner(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &UnrecognizedWithInner_Inner{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedUnrecognizedWithInner_Inner(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestUnrecognizedWithEmbedCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedUnrecognizedWithEmbed(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &UnrecognizedWithEmbed{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedUnrecognizedWithEmbed(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestUnrecognizedWithEmbed_EmbeddedCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedUnrecognizedWithEmbed_Embedded(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &UnrecognizedWithEmbed_Embedded{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedUnrecognizedWithEmbed_Embedded(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNodeCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNode(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &Node{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNode(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestThetestDescription(t *testing.T) { + ThetestDescription() +} +func TestNidOptNativeVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidOptNative(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NidOptNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNinOptNativeVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptNative(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinOptNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNidRepNativeVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidRepNative(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NidRepNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNinRepNativeVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinRepNative(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinRepNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNidRepPackedNativeVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidRepPackedNative(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NidRepPackedNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNinRepPackedNativeVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinRepPackedNative(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinRepPackedNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNidOptStructVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidOptStruct(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NidOptStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNinOptStructVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptStruct(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinOptStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNidRepStructVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidRepStruct(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NidRepStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNinRepStructVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinRepStruct(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinRepStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNidEmbeddedStructVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidEmbeddedStruct(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NidEmbeddedStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNinEmbeddedStructVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinEmbeddedStruct(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinEmbeddedStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNidNestedStructVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidNestedStruct(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NidNestedStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNinNestedStructVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinNestedStruct(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinNestedStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNidOptCustomVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidOptCustom(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NidOptCustom{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestCustomDashVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomDash(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &CustomDash{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNinOptCustomVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptCustom(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinOptCustom{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNidRepCustomVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidRepCustom(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NidRepCustom{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNinRepCustomVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinRepCustom(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinRepCustom{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNinOptNativeUnionVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptNativeUnion(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinOptNativeUnion{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNinOptStructUnionVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptStructUnion(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinOptStructUnion{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNinEmbeddedStructUnionVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinEmbeddedStructUnion(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinEmbeddedStructUnion{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNinNestedStructUnionVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinNestedStructUnion(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinNestedStructUnion{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestTreeVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedTree(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &Tree{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestOrBranchVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedOrBranch(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &OrBranch{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestAndBranchVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAndBranch(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &AndBranch{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestLeafVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedLeaf(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &Leaf{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestDeepTreeVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedDeepTree(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &DeepTree{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestADeepBranchVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedADeepBranch(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &ADeepBranch{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestAndDeepBranchVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAndDeepBranch(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &AndDeepBranch{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestDeepLeafVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedDeepLeaf(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &DeepLeaf{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNilVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNil(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &Nil{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNidOptEnumVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidOptEnum(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NidOptEnum{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNinOptEnumVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptEnum(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinOptEnum{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNidRepEnumVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidRepEnum(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NidRepEnum{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNinRepEnumVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinRepEnum(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinRepEnum{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNinOptEnumDefaultVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptEnumDefault(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinOptEnumDefault{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestAnotherNinOptEnumVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAnotherNinOptEnum(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &AnotherNinOptEnum{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestAnotherNinOptEnumDefaultVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAnotherNinOptEnumDefault(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &AnotherNinOptEnumDefault{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestTimerVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedTimer(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &Timer{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestMyExtendableVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedMyExtendable(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &MyExtendable{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestOtherExtenableVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedOtherExtenable(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &OtherExtenable{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNestedDefinitionVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNestedDefinition(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NestedDefinition{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNestedDefinition_NestedMessageVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNestedDefinition_NestedMessage(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NestedDefinition_NestedMessage{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNestedDefinition_NestedMessage_NestedNestedMsgVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NestedDefinition_NestedMessage_NestedNestedMsg{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNestedScopeVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNestedScope(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NestedScope{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNinOptNativeDefaultVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptNativeDefault(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinOptNativeDefault{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestCustomContainerVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomContainer(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &CustomContainer{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestCustomNameNidOptNativeVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameNidOptNative(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &CustomNameNidOptNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestCustomNameNinOptNativeVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameNinOptNative(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &CustomNameNinOptNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestCustomNameNinRepNativeVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameNinRepNative(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &CustomNameNinRepNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestCustomNameNinStructVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameNinStruct(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &CustomNameNinStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestCustomNameCustomTypeVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameCustomType(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &CustomNameCustomType{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestCustomNameNinEmbeddedStructUnionVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameNinEmbeddedStructUnion(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &CustomNameNinEmbeddedStructUnion{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestCustomNameEnumVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameEnum(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &CustomNameEnum{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNoExtensionsMapVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNoExtensionsMap(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NoExtensionsMap{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestUnrecognizedVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedUnrecognized(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &Unrecognized{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestUnrecognizedWithInnerVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedUnrecognizedWithInner(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &UnrecognizedWithInner{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestUnrecognizedWithInner_InnerVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedUnrecognizedWithInner_Inner(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &UnrecognizedWithInner_Inner{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestUnrecognizedWithEmbedVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedUnrecognizedWithEmbed(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &UnrecognizedWithEmbed{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestUnrecognizedWithEmbed_EmbeddedVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedUnrecognizedWithEmbed_Embedded(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &UnrecognizedWithEmbed_Embedded{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNodeVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNode(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &Node{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNidOptNativeFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidOptNative(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNinOptNativeFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptNative(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNidRepNativeFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidRepNative(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNinRepNativeFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinRepNative(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNidRepPackedNativeFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidRepPackedNative(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNinRepPackedNativeFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinRepPackedNative(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNidOptStructFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidOptStruct(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNinOptStructFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptStruct(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNidRepStructFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidRepStruct(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNinRepStructFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinRepStruct(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNidEmbeddedStructFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidEmbeddedStruct(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNinEmbeddedStructFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinEmbeddedStruct(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNidNestedStructFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidNestedStruct(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNinNestedStructFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinNestedStruct(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNidOptCustomFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidOptCustom(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestCustomDashFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomDash(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNinOptCustomFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptCustom(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNidRepCustomFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidRepCustom(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNinRepCustomFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinRepCustom(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNinOptNativeUnionFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptNativeUnion(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNinOptStructUnionFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptStructUnion(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNinEmbeddedStructUnionFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinEmbeddedStructUnion(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNinNestedStructUnionFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinNestedStructUnion(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestTreeFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedTree(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestOrBranchFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedOrBranch(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestAndBranchFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAndBranch(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestLeafFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedLeaf(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestDeepTreeFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedDeepTree(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestADeepBranchFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedADeepBranch(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestAndDeepBranchFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAndDeepBranch(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestDeepLeafFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedDeepLeaf(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNilFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNil(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNidOptEnumFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidOptEnum(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNinOptEnumFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptEnum(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNidRepEnumFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidRepEnum(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNinRepEnumFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinRepEnum(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestAnotherNinOptEnumFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAnotherNinOptEnum(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestTimerFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedTimer(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNestedDefinitionFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNestedDefinition(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNestedDefinition_NestedMessageFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNestedDefinition_NestedMessage(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNestedDefinition_NestedMessage_NestedNestedMsgFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNestedScopeFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNestedScope(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestCustomContainerFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomContainer(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestCustomNameNidOptNativeFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameNidOptNative(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestCustomNameNinOptNativeFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameNinOptNative(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestCustomNameNinRepNativeFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameNinRepNative(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestCustomNameNinStructFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameNinStruct(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestCustomNameCustomTypeFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameCustomType(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestCustomNameNinEmbeddedStructUnionFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameNinEmbeddedStructUnion(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestCustomNameEnumFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameEnum(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestUnrecognizedFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedUnrecognized(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestUnrecognizedWithInnerFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedUnrecognizedWithInner(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestUnrecognizedWithInner_InnerFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedUnrecognizedWithInner_Inner(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestUnrecognizedWithEmbedFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedUnrecognizedWithEmbed(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestUnrecognizedWithEmbed_EmbeddedFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedUnrecognizedWithEmbed_Embedded(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNodeFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNode(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNidOptNativeGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidOptNative(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestNinOptNativeGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptNative(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestNidRepNativeGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidRepNative(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestNinRepNativeGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinRepNative(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestNidRepPackedNativeGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidRepPackedNative(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestNinRepPackedNativeGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinRepPackedNative(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestNidOptStructGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidOptStruct(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestNinOptStructGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptStruct(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestNidRepStructGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidRepStruct(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestNinRepStructGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinRepStruct(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestNidEmbeddedStructGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidEmbeddedStruct(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestNinEmbeddedStructGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinEmbeddedStruct(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestNidNestedStructGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidNestedStruct(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestNinNestedStructGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinNestedStruct(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestNidOptCustomGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidOptCustom(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestCustomDashGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomDash(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestNinOptCustomGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptCustom(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestNidRepCustomGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidRepCustom(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestNinRepCustomGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinRepCustom(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestNinOptNativeUnionGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptNativeUnion(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestNinOptStructUnionGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptStructUnion(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestNinEmbeddedStructUnionGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinEmbeddedStructUnion(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestNinNestedStructUnionGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinNestedStructUnion(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestTreeGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedTree(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestOrBranchGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedOrBranch(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestAndBranchGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAndBranch(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestLeafGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedLeaf(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestDeepTreeGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedDeepTree(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestADeepBranchGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedADeepBranch(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestAndDeepBranchGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAndDeepBranch(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestDeepLeafGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedDeepLeaf(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestNilGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNil(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestNidOptEnumGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidOptEnum(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestNinOptEnumGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptEnum(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestNidRepEnumGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidRepEnum(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestNinRepEnumGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinRepEnum(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestNinOptEnumDefaultGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptEnumDefault(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestAnotherNinOptEnumGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAnotherNinOptEnum(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestAnotherNinOptEnumDefaultGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAnotherNinOptEnumDefault(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestTimerGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedTimer(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestMyExtendableGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedMyExtendable(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestOtherExtenableGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedOtherExtenable(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestNestedDefinitionGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNestedDefinition(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestNestedDefinition_NestedMessageGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNestedDefinition_NestedMessage(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestNestedDefinition_NestedMessage_NestedNestedMsgGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestNestedScopeGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNestedScope(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestNinOptNativeDefaultGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptNativeDefault(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestCustomContainerGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomContainer(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestCustomNameNidOptNativeGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameNidOptNative(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestCustomNameNinOptNativeGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameNinOptNative(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestCustomNameNinRepNativeGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameNinRepNative(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestCustomNameNinStructGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameNinStruct(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestCustomNameCustomTypeGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameCustomType(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestCustomNameNinEmbeddedStructUnionGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameNinEmbeddedStructUnion(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestCustomNameEnumGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameEnum(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestNoExtensionsMapGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNoExtensionsMap(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestUnrecognizedGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedUnrecognized(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestUnrecognizedWithInnerGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedUnrecognizedWithInner(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestUnrecognizedWithInner_InnerGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedUnrecognizedWithInner_Inner(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestUnrecognizedWithEmbedGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedUnrecognizedWithEmbed(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestUnrecognizedWithEmbed_EmbeddedGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedUnrecognizedWithEmbed_Embedded(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestNodeGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNode(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestNidOptNativeSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidOptNative(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNidOptNativeSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NidOptNative, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNidOptNative(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinOptNativeSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptNative(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNinOptNativeSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinOptNative, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNinOptNative(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNidRepNativeSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepNative(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNidRepNativeSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NidRepNative, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNidRepNative(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinRepNativeSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepNative(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNinRepNativeSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinRepNative, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNinRepNative(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNidRepPackedNativeSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepPackedNative(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNidRepPackedNativeSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NidRepPackedNative, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNidRepPackedNative(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinRepPackedNativeSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepPackedNative(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNinRepPackedNativeSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinRepPackedNative, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNinRepPackedNative(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNidOptStructSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidOptStruct(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNidOptStructSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NidOptStruct, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNidOptStruct(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinOptStructSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptStruct(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNinOptStructSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinOptStruct, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNinOptStruct(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNidRepStructSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepStruct(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNidRepStructSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NidRepStruct, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNidRepStruct(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinRepStructSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepStruct(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNinRepStructSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinRepStruct, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNinRepStruct(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNidEmbeddedStructSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidEmbeddedStruct(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNidEmbeddedStructSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NidEmbeddedStruct, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNidEmbeddedStruct(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinEmbeddedStructSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinEmbeddedStruct(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNinEmbeddedStructSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinEmbeddedStruct, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNinEmbeddedStruct(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNidNestedStructSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidNestedStruct(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNidNestedStructSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NidNestedStruct, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNidNestedStruct(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinNestedStructSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinNestedStruct(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNinNestedStructSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinNestedStruct, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNinNestedStruct(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNidOptCustomSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidOptCustom(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNidOptCustomSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NidOptCustom, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNidOptCustom(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestCustomDashSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomDash(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkCustomDashSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*CustomDash, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedCustomDash(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinOptCustomSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptCustom(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNinOptCustomSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinOptCustom, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNinOptCustom(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNidRepCustomSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepCustom(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNidRepCustomSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NidRepCustom, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNidRepCustom(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinRepCustomSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepCustom(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNinRepCustomSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinRepCustom, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNinRepCustom(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinOptNativeUnionSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptNativeUnion(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNinOptNativeUnionSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinOptNativeUnion, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNinOptNativeUnion(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinOptStructUnionSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptStructUnion(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNinOptStructUnionSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinOptStructUnion, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNinOptStructUnion(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinEmbeddedStructUnionSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinEmbeddedStructUnion(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNinEmbeddedStructUnionSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinEmbeddedStructUnion, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNinEmbeddedStructUnion(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinNestedStructUnionSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinNestedStructUnion(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNinNestedStructUnionSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinNestedStructUnion, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNinNestedStructUnion(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestTreeSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedTree(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkTreeSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Tree, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedTree(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestOrBranchSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedOrBranch(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkOrBranchSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*OrBranch, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedOrBranch(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestAndBranchSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAndBranch(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkAndBranchSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*AndBranch, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedAndBranch(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestLeafSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedLeaf(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkLeafSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Leaf, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedLeaf(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestDeepTreeSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedDeepTree(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkDeepTreeSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*DeepTree, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedDeepTree(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestADeepBranchSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedADeepBranch(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkADeepBranchSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*ADeepBranch, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedADeepBranch(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestAndDeepBranchSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAndDeepBranch(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkAndDeepBranchSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*AndDeepBranch, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedAndDeepBranch(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestDeepLeafSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedDeepLeaf(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkDeepLeafSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*DeepLeaf, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedDeepLeaf(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNilSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNil(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNilSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Nil, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNil(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNidOptEnumSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidOptEnum(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNidOptEnumSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NidOptEnum, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNidOptEnum(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinOptEnumSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptEnum(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNinOptEnumSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinOptEnum, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNinOptEnum(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNidRepEnumSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepEnum(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNidRepEnumSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NidRepEnum, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNidRepEnum(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinRepEnumSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepEnum(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNinRepEnumSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinRepEnum, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNinRepEnum(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinOptEnumDefaultSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptEnumDefault(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNinOptEnumDefaultSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinOptEnumDefault, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNinOptEnumDefault(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestAnotherNinOptEnumSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAnotherNinOptEnum(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkAnotherNinOptEnumSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*AnotherNinOptEnum, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedAnotherNinOptEnum(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestAnotherNinOptEnumDefaultSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAnotherNinOptEnumDefault(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkAnotherNinOptEnumDefaultSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*AnotherNinOptEnumDefault, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedAnotherNinOptEnumDefault(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestTimerSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedTimer(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkTimerSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Timer, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedTimer(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestMyExtendableSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMyExtendable(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkMyExtendableSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*MyExtendable, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedMyExtendable(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestOtherExtenableSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedOtherExtenable(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkOtherExtenableSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*OtherExtenable, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedOtherExtenable(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNestedDefinitionSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNestedDefinition(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNestedDefinitionSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NestedDefinition, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNestedDefinition(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNestedDefinition_NestedMessageSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNestedDefinition_NestedMessage(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNestedDefinition_NestedMessageSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NestedDefinition_NestedMessage, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNestedDefinition_NestedMessage(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNestedDefinition_NestedMessage_NestedNestedMsgSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNestedDefinition_NestedMessage_NestedNestedMsgSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NestedDefinition_NestedMessage_NestedNestedMsg, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNestedScopeSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNestedScope(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNestedScopeSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NestedScope, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNestedScope(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinOptNativeDefaultSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptNativeDefault(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNinOptNativeDefaultSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinOptNativeDefault, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNinOptNativeDefault(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestCustomContainerSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomContainer(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkCustomContainerSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*CustomContainer, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedCustomContainer(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestCustomNameNidOptNativeSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameNidOptNative(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkCustomNameNidOptNativeSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*CustomNameNidOptNative, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedCustomNameNidOptNative(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestCustomNameNinOptNativeSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameNinOptNative(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkCustomNameNinOptNativeSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*CustomNameNinOptNative, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedCustomNameNinOptNative(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestCustomNameNinRepNativeSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameNinRepNative(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkCustomNameNinRepNativeSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*CustomNameNinRepNative, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedCustomNameNinRepNative(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestCustomNameNinStructSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameNinStruct(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkCustomNameNinStructSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*CustomNameNinStruct, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedCustomNameNinStruct(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestCustomNameCustomTypeSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameCustomType(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkCustomNameCustomTypeSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*CustomNameCustomType, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedCustomNameCustomType(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestCustomNameNinEmbeddedStructUnionSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameNinEmbeddedStructUnion(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkCustomNameNinEmbeddedStructUnionSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*CustomNameNinEmbeddedStructUnion, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedCustomNameNinEmbeddedStructUnion(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestCustomNameEnumSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameEnum(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkCustomNameEnumSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*CustomNameEnum, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedCustomNameEnum(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNoExtensionsMapSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNoExtensionsMap(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNoExtensionsMapSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NoExtensionsMap, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNoExtensionsMap(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestUnrecognizedSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUnrecognized(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkUnrecognizedSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Unrecognized, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedUnrecognized(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestUnrecognizedWithInnerSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUnrecognizedWithInner(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkUnrecognizedWithInnerSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*UnrecognizedWithInner, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedUnrecognizedWithInner(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestUnrecognizedWithInner_InnerSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUnrecognizedWithInner_Inner(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkUnrecognizedWithInner_InnerSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*UnrecognizedWithInner_Inner, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedUnrecognizedWithInner_Inner(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestUnrecognizedWithEmbedSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUnrecognizedWithEmbed(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkUnrecognizedWithEmbedSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*UnrecognizedWithEmbed, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedUnrecognizedWithEmbed(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestUnrecognizedWithEmbed_EmbeddedSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUnrecognizedWithEmbed_Embedded(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkUnrecognizedWithEmbed_EmbeddedSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*UnrecognizedWithEmbed_Embedded, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedUnrecognizedWithEmbed_Embedded(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNodeSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNode(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNodeSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Node, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNode(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNidOptNativeStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidOptNative(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNinOptNativeStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptNative(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNidRepNativeStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidRepNative(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNinRepNativeStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinRepNative(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNidRepPackedNativeStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidRepPackedNative(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNinRepPackedNativeStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinRepPackedNative(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNidOptStructStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidOptStruct(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNinOptStructStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptStruct(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNidRepStructStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidRepStruct(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNinRepStructStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinRepStruct(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNidEmbeddedStructStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidEmbeddedStruct(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNinEmbeddedStructStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinEmbeddedStruct(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNidNestedStructStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidNestedStruct(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNinNestedStructStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinNestedStruct(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNidOptCustomStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidOptCustom(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestCustomDashStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomDash(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNinOptCustomStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptCustom(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNidRepCustomStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidRepCustom(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNinRepCustomStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinRepCustom(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNinOptNativeUnionStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptNativeUnion(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNinOptStructUnionStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptStructUnion(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNinEmbeddedStructUnionStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinEmbeddedStructUnion(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNinNestedStructUnionStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinNestedStructUnion(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestTreeStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedTree(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestOrBranchStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedOrBranch(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestAndBranchStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAndBranch(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestLeafStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedLeaf(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestDeepTreeStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedDeepTree(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestADeepBranchStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedADeepBranch(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestAndDeepBranchStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAndDeepBranch(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestDeepLeafStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedDeepLeaf(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNilStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNil(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNidOptEnumStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidOptEnum(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNinOptEnumStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptEnum(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNidRepEnumStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidRepEnum(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNinRepEnumStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinRepEnum(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNinOptEnumDefaultStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptEnumDefault(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestAnotherNinOptEnumStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAnotherNinOptEnum(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestAnotherNinOptEnumDefaultStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAnotherNinOptEnumDefault(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestTimerStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedTimer(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestMyExtendableStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedMyExtendable(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestOtherExtenableStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedOtherExtenable(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNestedDefinitionStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNestedDefinition(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNestedDefinition_NestedMessageStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNestedDefinition_NestedMessage(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNestedDefinition_NestedMessage_NestedNestedMsgStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNestedScopeStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNestedScope(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNinOptNativeDefaultStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptNativeDefault(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestCustomContainerStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomContainer(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestCustomNameNidOptNativeStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameNidOptNative(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestCustomNameNinOptNativeStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameNinOptNative(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestCustomNameNinRepNativeStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameNinRepNative(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestCustomNameNinStructStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameNinStruct(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestCustomNameCustomTypeStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameCustomType(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestCustomNameNinEmbeddedStructUnionStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameNinEmbeddedStructUnion(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestCustomNameEnumStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameEnum(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNoExtensionsMapStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNoExtensionsMap(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestUnrecognizedStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedUnrecognized(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestUnrecognizedWithInnerStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedUnrecognizedWithInner(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestUnrecognizedWithInner_InnerStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedUnrecognizedWithInner_Inner(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestUnrecognizedWithEmbedStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedUnrecognizedWithEmbed(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestUnrecognizedWithEmbed_EmbeddedStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedUnrecognizedWithEmbed_Embedded(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNodeStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNode(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNinOptNativeUnionOnlyOne(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptNativeUnion(popr, true) + v := p.GetValue() + msg := &NinOptNativeUnion{} + if !msg.SetValue(v) { + t.Fatalf("OnlyOne: Could not set Value") + } + if !p.Equal(msg) { + t.Fatalf("%#v !OnlyOne Equal %#v", msg, p) + } +} +func TestNinOptStructUnionOnlyOne(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptStructUnion(popr, true) + v := p.GetValue() + msg := &NinOptStructUnion{} + if !msg.SetValue(v) { + t.Fatalf("OnlyOne: Could not set Value") + } + if !p.Equal(msg) { + t.Fatalf("%#v !OnlyOne Equal %#v", msg, p) + } +} +func TestNinEmbeddedStructUnionOnlyOne(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinEmbeddedStructUnion(popr, true) + v := p.GetValue() + msg := &NinEmbeddedStructUnion{} + if !msg.SetValue(v) { + t.Fatalf("OnlyOne: Could not set Value") + } + if !p.Equal(msg) { + t.Fatalf("%#v !OnlyOne Equal %#v", msg, p) + } +} +func TestNinNestedStructUnionOnlyOne(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinNestedStructUnion(popr, true) + v := p.GetValue() + msg := &NinNestedStructUnion{} + if !msg.SetValue(v) { + t.Fatalf("OnlyOne: Could not set Value") + } + if !p.Equal(msg) { + t.Fatalf("%#v !OnlyOne Equal %#v", msg, p) + } +} +func TestTreeOnlyOne(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedTree(popr, true) + v := p.GetValue() + msg := &Tree{} + if !msg.SetValue(v) { + t.Fatalf("OnlyOne: Could not set Value") + } + if !p.Equal(msg) { + t.Fatalf("%#v !OnlyOne Equal %#v", msg, p) + } +} +func TestDeepTreeOnlyOne(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedDeepTree(popr, true) + v := p.GetValue() + msg := &DeepTree{} + if !msg.SetValue(v) { + t.Fatalf("OnlyOne: Could not set Value") + } + if !p.Equal(msg) { + t.Fatalf("%#v !OnlyOne Equal %#v", msg, p) + } +} +func TestCustomNameNinEmbeddedStructUnionOnlyOne(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameNinEmbeddedStructUnion(popr, true) + v := p.GetValue() + msg := &CustomNameNinEmbeddedStructUnion{} + if !msg.SetValue(v) { + t.Fatalf("OnlyOne: Could not set Value") + } + if !p.Equal(msg) { + t.Fatalf("%#v !OnlyOne Equal %#v", msg, p) + } +} + +//These tests are generated by github.com/gogo/protobuf/plugin/testgen diff --git a/vendor/github.com/gogo/protobuf/test/combos/unmarshaler/uuid.go b/vendor/github.com/gogo/protobuf/test/combos/unmarshaler/uuid.go new file mode 100644 index 000000000..760111191 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/combos/unmarshaler/uuid.go @@ -0,0 +1,126 @@ +// Extensions for Protocol Buffers to create more go like structures. +// +// Copyright (c) 2013, Vastech SA (PTY) LTD. All rights reserved. +// http://github.com/gogo/protobuf/gogoproto +// +// 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 test + +import ( + "bytes" + "encoding/json" +) + +func PutLittleEndianUint64(b []byte, offset int, v uint64) { + b[offset] = byte(v) + b[offset+1] = byte(v >> 8) + b[offset+2] = byte(v >> 16) + b[offset+3] = byte(v >> 24) + b[offset+4] = byte(v >> 32) + b[offset+5] = byte(v >> 40) + b[offset+6] = byte(v >> 48) + b[offset+7] = byte(v >> 56) +} + +type Uuid []byte + +func (uuid Uuid) Marshal() ([]byte, error) { + if len(uuid) == 0 { + return nil, nil + } + return []byte(uuid), nil +} + +func (uuid Uuid) MarshalTo(data []byte) (n int, err error) { + if len(uuid) == 0 { + return 0, nil + } + copy(data, uuid) + return 16, nil +} + +func (uuid *Uuid) Unmarshal(data []byte) error { + if len(data) == 0 { + uuid = nil + return nil + } + id := Uuid(make([]byte, 16)) + copy(id, data) + *uuid = id + return nil +} + +func (uuid *Uuid) Size() int { + if uuid == nil { + return 0 + } + if len(*uuid) == 0 { + return 0 + } + return 16 +} + +func (uuid Uuid) MarshalJSON() ([]byte, error) { + return json.Marshal([]byte(uuid)) +} + +func (uuid *Uuid) UnmarshalJSON(data []byte) error { + v := new([]byte) + err := json.Unmarshal(data, v) + if err != nil { + return err + } + return uuid.Unmarshal(*v) +} + +func (uuid Uuid) Equal(other Uuid) bool { + return bytes.Equal(uuid[0:], other[0:]) +} + +func (uuid Uuid) Compare(other Uuid) int { + return bytes.Compare(uuid[0:], other[0:]) +} + +type int63 interface { + Int63() int64 +} + +func NewPopulatedUuid(r int63) *Uuid { + u := RandV4(r) + return &u +} + +func RandV4(r int63) Uuid { + uuid := make(Uuid, 16) + uuid.RandV4(r) + return uuid +} + +func (uuid Uuid) RandV4(r int63) { + PutLittleEndianUint64(uuid, 0, uint64(r.Int63())) + PutLittleEndianUint64(uuid, 8, uint64(r.Int63())) + uuid[6] = (uuid[6] & 0xf) | 0x40 + uuid[8] = (uuid[8] & 0x3f) | 0x80 +} diff --git a/vendor/github.com/gogo/protobuf/test/combos/unsafeboth/bug_test.go b/vendor/github.com/gogo/protobuf/test/combos/unsafeboth/bug_test.go new file mode 100644 index 000000000..2386c48e5 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/combos/unsafeboth/bug_test.go @@ -0,0 +1,250 @@ +// Copyright (c) 2013, Vastech SA (PTY) LTD. All rights reserved. +// http://github.com/gogo/protobuf/gogoproto +// +// 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 test + +import ( + "fmt" + "math" + "math/rand" + "testing" + "time" + + "github.com/gogo/protobuf/proto" +) + +//http://code.google.com/p/goprotobuf/issues/detail?id=39 +func TestBugUint32VarintSize(t *testing.T) { + temp := uint32(math.MaxUint32) + n := &NinOptNative{} + n.Field5 = &temp + data, err := proto.Marshal(n) + if err != nil { + panic(err) + } + if len(data) != 6 { + t.Fatalf("data should be length 6, but its %#v", data) + } +} + +func TestBugZeroLengthSliceSize(t *testing.T) { + n := &NinRepPackedNative{ + Field8: []int64{}, + } + size := n.Size() + data, err := proto.Marshal(n) + if err != nil { + panic(err) + } + if len(data) != size { + t.Fatalf("expected %v, but got %v", len(data), size) + } +} + +//http://code.google.com/p/goprotobuf/issues/detail?id=40 +func TestBugPackedProtoSize(t *testing.T) { + n := &NinRepPackedNative{ + Field4: []int64{172960727389894724, 2360337516664475010, 860833876131988189, 9068073014890763245, 7794843386260381831, 4023536436053141786, 8992311247496919020, 4330096163611305776, 4490411416244976467, 7873947349172707443, 2754969595834279669, 1360667855926938684, 4771480785172657389, 4875578924966668055, 8070579869808877481, 9128179594766551001, 4630419407064527516, 863844540220372892, 8208727650143073487, 7086117356301045838, 7779695211931506151, 5493835345187563535, 9119767633370806007, 9054342025895349248, 1887303228838508438, 7624573031734528281, 1874668389749611225, 3517684643468970593, 6677697606628877758, 7293473953189936168, 444475066704085538, 8594971141363049302, 1146643249094989673, 733393306232853371, 7721178528893916886, 7784452000911004429, 6436373110242711440, 6897422461738321237, 8772249155667732778, 6211871464311393541, 3061903718310406883, 7845488913176136641, 8342255034663902574, 3443058984649725748, 8410801047334832902, 7496541071517841153, 4305416923521577765, 7814967600020476457, 8671843803465481186, 3490266370361096855, 1447425664719091336, 653218597262334239, 8306243902880091940, 7851896059762409081, 5936760560798954978, 5755724498441478025, 7022701569985035966, 3707709584811468220, 529069456924666920, 7986469043681522462, 3092513330689518836, 5103541550470476202, 3577384161242626406, 3733428084624703294, 8388690542440473117, 3262468785346149388, 8788358556558007570, 5476276940198542020, 7277903243119461239, 5065861426928605020, 7533460976202697734, 1749213838654236956, 557497603941617931, 5496307611456481108, 6444547750062831720, 6992758776744205596, 7356719693428537399, 2896328872476734507, 381447079530132038, 598300737753233118, 3687980626612697715, 7240924191084283349, 8172414415307971170, 4847024388701257185, 2081764168600256551, 3394217778539123488, 6244660626429310923, 8301712215675381614, 5360615125359461174, 8410140945829785773, 3152963269026381373, 6197275282781459633, 4419829061407546410, 6262035523070047537, 2837207483933463885, 2158105736666826128, 8150764172235490711}, + Field7: []int32{249451845, 1409974015, 393609128, 435232428, 1817529040, 91769006, 861170933, 1556185603, 1568580279, 1236375273, 512276621, 693633711, 967580535, 1950715977, 853431462, 1362390253, 159591204, 111900629, 322985263, 279671129, 1592548430, 465651370, 733849989, 1172059400, 1574824441, 263541092, 1271612397, 1520584358, 467078791, 117698716, 1098255064, 2054264846, 1766452305, 1267576395, 1557505617, 1187833560, 956187431, 1970977586, 1160235159, 1610259028, 489585797, 459139078, 566263183, 954319278, 1545018565, 1753946743, 948214318, 422878159, 883926576, 1424009347, 824732372, 1290433180, 80297942, 417294230, 1402647904, 2078392782, 220505045, 787368129, 463781454, 293083578, 808156928, 293976361}, + Field9: []uint32{0xaa4976e8, 0x3da8cc4c, 0x8c470d83, 0x344d964e, 0x5b90925, 0xa4c4d34e, 0x666eff19, 0xc238e552, 0x9be53bb6, 0x56364245, 0x33ee079d, 0x96bf0ede, 0x7941b74f, 0xdb07cb47, 0x6d76d827, 0x9b211d5d, 0x2798adb6, 0xe48b0c3b, 0x87061b21, 0x48f4e4d2, 0x3e5d5c12, 0x5ee91288, 0x336d4f35, 0xe1d44941, 0xc065548d, 0x2953d73f, 0x873af451, 0xfc769db, 0x9f1bf8da, 0x9baafdfc, 0xf1d3d770, 0x5bb5d2b4, 0xc2c67c48, 0x6845c4c1, 0xa48f32b0, 0xbb04bb70, 0xa5b1ca36, 0x8d98356a, 0x2171f654, 0x5ae279b0, 0x6c4a3d6b, 0x4fff5468, 0xcf9bf851, 0x68513614, 0xdbecd9b0, 0x9553ed3c, 0xa494a736, 0x42205438, 0xbf8e5caa, 0xd3283c6, 0x76d20788, 0x9179826f, 0x96b24f85, 0xbc2eacf4, 0xe4afae0b, 0x4bca85cb, 0x35e63b5b, 0xd7ccee0c, 0x2b506bb9, 0xe78e9f44, 0x9ad232f1, 0x99a37335, 0xa5d6ffc8}, + Field11: []uint64{0x53c01ebc, 0x4fb85ba6, 0x8805eea1, 0xb20ec896, 0x93b63410, 0xec7c9492, 0x50765a28, 0x19592106, 0x2ecc59b3, 0x39cd474f, 0xe4c9e47, 0x444f48c5, 0xe7731d32, 0xf3f43975, 0x603caedd, 0xbb05a1af, 0xa808e34e, 0x88580b07, 0x4c96bbd1, 0x730b4ab9, 0xed126e2b, 0x6db48205, 0x154ba1b9, 0xc26bfb6a, 0x389aa052, 0x869d966c, 0x7c86b366, 0xcc8edbcd, 0xfa8d6dad, 0xcf5857d9, 0x2d9cda0f, 0x1218a0b8, 0x41bf997, 0xf0ca65ac, 0xa610d4b9, 0x8d362e28, 0xb7212d87, 0x8e0fe109, 0xbee041d9, 0x759be2f6, 0x35fef4f3, 0xaeacdb71, 0x10888852, 0xf4e28117, 0xe2a14812, 0x73b748dc, 0xd1c3c6b2, 0xfef41bf0, 0xc9b43b62, 0x810e4faa, 0xcaa41c06, 0x1893fe0d, 0xedc7c850, 0xd12b9eaa, 0x467ee1a9, 0xbe84756b, 0xda7b1680, 0xdc069ffe, 0xf1e7e9f9, 0xb3d95370, 0xa92b77df, 0x5693ac41, 0xd04b7287, 0x27aebf15, 0x837b316e, 0x4dbe2263, 0xbab70c67, 0x547dab21, 0x3c346c1f, 0xb8ef0e4e, 0xfe2d03ce, 0xe1d75955, 0xfec1306, 0xba35c23e, 0xb784ed04, 0x2a4e33aa, 0x7e19d09a, 0x3827c1fe, 0xf3a51561, 0xef765e2b, 0xb044256c, 0x62b322be, 0xf34d56be, 0xeb71b369, 0xffe1294f, 0x237fe8d0, 0x77a1473b, 0x239e1196, 0xdd19bf3d, 0x82c91fe1, 0x95361c57, 0xffea3f1b, 0x1a094c84}, + Field12: []int64{8308420747267165049, 3664160795077875961, 7868970059161834817, 7237335984251173739, 5254748003907196506, 3362259627111837480, 430460752854552122, 5119635556501066533, 1277716037866233522, 9185775384759813768, 833932430882717888, 7986528304451297640, 6792233378368656337, 2074207091120609721, 1788723326198279432, 7756514594746453657, 2283775964901597324, 3061497730110517191, 7733947890656120277, 626967303632386244, 7822928600388582821, 3489658753000061230, 168869995163005961, 248814782163480763, 477885608911386247, 4198422415674133867, 3379354662797976109, 9925112544736939, 1486335136459138480, 4561560414032850671, 1010864164014091267, 186722821683803084, 5106357936724819318, 1298160820191228988, 4675403242419953145, 7130634540106489752, 7101280006672440929, 7176058292431955718, 9109875054097770321, 6810974877085322872, 4736707874303993641, 8993135362721382187, 6857881554990254283, 3704748883307461680, 1099360832887634994, 5207691918707192633, 5984721695043995243}, + } + size := proto.Size(n) + data, err := proto.Marshal(n) + if err != nil { + panic(err) + } + if len(data) != size { + t.Fatalf("expected %v, but got %v diff is %v", len(data), size, len(data)-size) + } +} + +func testSize(m interface { + proto.Message + Size() int +}, desc string, expected int) ([]byte, error) { + data, err := proto.Marshal(m) + if err != nil { + return nil, err + } + protoSize := proto.Size(m) + mSize := m.Size() + lenData := len(data) + if protoSize != mSize || protoSize != lenData || mSize != lenData { + return nil, fmt.Errorf("%s proto.Size(m){%d} != m.Size(){%d} != len(data){%d}", desc, protoSize, mSize, lenData) + } + if got := protoSize; got != expected { + return nil, fmt.Errorf("%s proto.Size(m) got %d expected %d", desc, got, expected) + } + if got := mSize; got != expected { + return nil, fmt.Errorf("%s m.Size() got %d expected %d", desc, got, expected) + } + if got := lenData; got != expected { + return nil, fmt.Errorf("%s len(data) got %d expected %d", desc, got, expected) + } + return data, nil +} + +func TestInt32Int64Compatibility(t *testing.T) { + + //test nullable int32 and int64 + + data1, err := testSize(&NinOptNative{ + Field3: proto.Int32(-1), + }, "nullable", 11) + if err != nil { + t.Error(err) + } + //change marshaled data1 to unmarshal into 4th field which is an int64 + data1[0] = uint8(uint32(4 /*fieldNumber*/)<<3 | uint32(0 /*wireType*/)) + u1 := &NinOptNative{} + if err = proto.Unmarshal(data1, u1); err != nil { + t.Error(err) + } + if !u1.Equal(&NinOptNative{ + Field4: proto.Int64(-1), + }) { + t.Error("nullable unmarshaled int32 is not the same int64") + } + + //test non-nullable int32 and int64 + + data2, err := testSize(&NidOptNative{ + Field3: -1, + }, "non nullable", 67) + if err != nil { + t.Error(err) + } + //change marshaled data2 to unmarshal into 4th field which is an int64 + field3 := uint8(uint32(3 /*fieldNumber*/)<<3 | uint32(0 /*wireType*/)) + field4 := uint8(uint32(4 /*fieldNumber*/)<<3 | uint32(0 /*wireType*/)) + for i, c := range data2 { + if c == field4 { + data2[i] = field3 + } else if c == field3 { + data2[i] = field4 + } + } + u2 := &NidOptNative{} + if err = proto.Unmarshal(data2, u2); err != nil { + t.Error(err) + } + if !u2.Equal(&NidOptNative{ + Field4: -1, + }) { + t.Error("non nullable unmarshaled int32 is not the same int64") + } + + //test packed repeated int32 and int64 + + m4 := &NinRepPackedNative{ + Field3: []int32{-1}, + } + data4, err := testSize(m4, "packed", 12) + if err != nil { + t.Error(err) + } + u4 := &NinRepPackedNative{} + if err := proto.Unmarshal(data4, u4); err != nil { + t.Error(err) + } + if err := u4.VerboseEqual(m4); err != nil { + t.Fatalf("%#v", u4) + } + + //test repeated int32 and int64 + + if _, err := testSize(&NinRepNative{ + Field3: []int32{-1}, + }, "repeated", 11); err != nil { + t.Error(err) + } + + t.Logf("tested all") +} + +func TestRepeatedExtensionsMsgsIssue161(t *testing.T) { + r := rand.New(rand.NewSource(time.Now().UnixNano())) + rep := 10 + nins := make([]*NinOptNative, rep) + for i := range nins { + nins[i] = NewPopulatedNinOptNative(r, true) + } + input := &MyExtendable{} + if err := proto.SetExtension(input, E_FieldE, nins); err != nil { + t.Fatal(err) + } + data, err := proto.Marshal(input) + if err != nil { + t.Fatal(err) + } + output := &MyExtendable{} + if err := proto.Unmarshal(data, output); err != nil { + t.Fatal(err) + } + if !input.Equal(output) { + t.Fatal("expected equal") + } + data2, err2 := proto.Marshal(output) + if err2 != nil { + t.Fatal(err2) + } + if len(data) != len(data2) { + t.Fatal("expected equal length buffers") + } +} + +func TestRepeatedExtensionsFieldsIssue161(t *testing.T) { + r := rand.New(rand.NewSource(time.Now().UnixNano())) + rep := 10 + ints := make([]int64, rep) + for i := range ints { + ints[i] = r.Int63() + } + input := &MyExtendable{} + if err := proto.SetExtension(input, E_FieldD, ints); err != nil { + t.Fatal(err) + } + data, err := proto.Marshal(input) + if err != nil { + t.Fatal(err) + } + output := &MyExtendable{} + if err := proto.Unmarshal(data, output); err != nil { + t.Fatal(err) + } + if !input.Equal(output) { + t.Fatal("expected equal") + } + data2, err2 := proto.Marshal(output) + if err2 != nil { + t.Fatal(err2) + } + if len(data) != len(data2) { + t.Fatal("expected equal length buffers") + } +} diff --git a/vendor/github.com/gogo/protobuf/test/combos/unsafeboth/thetest.pb.go b/vendor/github.com/gogo/protobuf/test/combos/unsafeboth/thetest.pb.go new file mode 100644 index 000000000..7a9bb8320 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/combos/unsafeboth/thetest.pb.go @@ -0,0 +1,39499 @@ +// Code generated by protoc-gen-gogo. +// source: combos/unsafeboth/thetest.proto +// DO NOT EDIT! + +/* + Package test is a generated protocol buffer package. + + It is generated from these files: + combos/unsafeboth/thetest.proto + + It has these top-level messages: + NidOptNative + NinOptNative + NidRepNative + NinRepNative + NidRepPackedNative + NinRepPackedNative + NidOptStruct + NinOptStruct + NidRepStruct + NinRepStruct + NidEmbeddedStruct + NinEmbeddedStruct + NidNestedStruct + NinNestedStruct + NidOptCustom + CustomDash + NinOptCustom + NidRepCustom + NinRepCustom + NinOptNativeUnion + NinOptStructUnion + NinEmbeddedStructUnion + NinNestedStructUnion + Tree + OrBranch + AndBranch + Leaf + DeepTree + ADeepBranch + AndDeepBranch + DeepLeaf + Nil + NidOptEnum + NinOptEnum + NidRepEnum + NinRepEnum + NinOptEnumDefault + AnotherNinOptEnum + AnotherNinOptEnumDefault + Timer + MyExtendable + OtherExtenable + NestedDefinition + NestedScope + NinOptNativeDefault + CustomContainer + CustomNameNidOptNative + CustomNameNinOptNative + CustomNameNinRepNative + CustomNameNinStruct + CustomNameCustomType + CustomNameNinEmbeddedStructUnion + CustomNameEnum + NoExtensionsMap + Unrecognized + UnrecognizedWithInner + UnrecognizedWithEmbed + Node +*/ +package test + +import proto "github.com/gogo/protobuf/proto" +import fmt "fmt" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" + +import github_com_gogo_protobuf_test_custom "github.com/gogo/protobuf/test/custom" +import github_com_gogo_protobuf_test_custom_dash_type "github.com/gogo/protobuf/test/custom-dash-type" + +import bytes "bytes" +import github_com_gogo_protobuf_sortkeys "github.com/gogo/protobuf/sortkeys" + +import github_com_gogo_protobuf_protoc_gen_gogo_descriptor "github.com/gogo/protobuf/protoc-gen-gogo/descriptor" +import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" +import compress_gzip "compress/gzip" +import io_ioutil "io/ioutil" + +import strconv "strconv" + +import strings "strings" +import sort "sort" +import reflect "reflect" + +import unsafe "unsafe" + +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. +const _ = proto.GoGoProtoPackageIsVersion1 + +type TheTestEnum int32 + +const ( + A TheTestEnum = 0 + B TheTestEnum = 1 + C TheTestEnum = 2 +) + +var TheTestEnum_name = map[int32]string{ + 0: "A", + 1: "B", + 2: "C", +} +var TheTestEnum_value = map[string]int32{ + "A": 0, + "B": 1, + "C": 2, +} + +func (x TheTestEnum) Enum() *TheTestEnum { + p := new(TheTestEnum) + *p = x + return p +} +func (x TheTestEnum) MarshalJSON() ([]byte, error) { + return proto.MarshalJSONEnum(TheTestEnum_name, int32(x)) +} +func (x *TheTestEnum) UnmarshalJSON(data []byte) error { + value, err := proto.UnmarshalJSONEnum(TheTestEnum_value, data, "TheTestEnum") + if err != nil { + return err + } + *x = TheTestEnum(value) + return nil +} +func (TheTestEnum) EnumDescriptor() ([]byte, []int) { return fileDescriptorThetest, []int{0} } + +type AnotherTestEnum int32 + +const ( + D AnotherTestEnum = 10 + E AnotherTestEnum = 11 +) + +var AnotherTestEnum_name = map[int32]string{ + 10: "D", + 11: "E", +} +var AnotherTestEnum_value = map[string]int32{ + "D": 10, + "E": 11, +} + +func (x AnotherTestEnum) Enum() *AnotherTestEnum { + p := new(AnotherTestEnum) + *p = x + return p +} +func (x AnotherTestEnum) MarshalJSON() ([]byte, error) { + return proto.MarshalJSONEnum(AnotherTestEnum_name, int32(x)) +} +func (x *AnotherTestEnum) UnmarshalJSON(data []byte) error { + value, err := proto.UnmarshalJSONEnum(AnotherTestEnum_value, data, "AnotherTestEnum") + if err != nil { + return err + } + *x = AnotherTestEnum(value) + return nil +} +func (AnotherTestEnum) EnumDescriptor() ([]byte, []int) { return fileDescriptorThetest, []int{1} } + +// YetAnotherTestEnum is used to test cross-package import of custom name +// fields and default resolution. +type YetAnotherTestEnum int32 + +const ( + AA YetAnotherTestEnum = 0 + BetterYetBB YetAnotherTestEnum = 1 +) + +var YetAnotherTestEnum_name = map[int32]string{ + 0: "AA", + 1: "BB", +} +var YetAnotherTestEnum_value = map[string]int32{ + "AA": 0, + "BB": 1, +} + +func (x YetAnotherTestEnum) Enum() *YetAnotherTestEnum { + p := new(YetAnotherTestEnum) + *p = x + return p +} +func (x YetAnotherTestEnum) MarshalJSON() ([]byte, error) { + return proto.MarshalJSONEnum(YetAnotherTestEnum_name, int32(x)) +} +func (x *YetAnotherTestEnum) UnmarshalJSON(data []byte) error { + value, err := proto.UnmarshalJSONEnum(YetAnotherTestEnum_value, data, "YetAnotherTestEnum") + if err != nil { + return err + } + *x = YetAnotherTestEnum(value) + return nil +} +func (YetAnotherTestEnum) EnumDescriptor() ([]byte, []int) { return fileDescriptorThetest, []int{2} } + +// YetAnotherTestEnum is used to test cross-package import of custom name +// fields and default resolution. +type YetYetAnotherTestEnum int32 + +const ( + YetYetAnotherTestEnum_CC YetYetAnotherTestEnum = 0 + YetYetAnotherTestEnum_BetterYetDD YetYetAnotherTestEnum = 1 +) + +var YetYetAnotherTestEnum_name = map[int32]string{ + 0: "CC", + 1: "DD", +} +var YetYetAnotherTestEnum_value = map[string]int32{ + "CC": 0, + "DD": 1, +} + +func (x YetYetAnotherTestEnum) Enum() *YetYetAnotherTestEnum { + p := new(YetYetAnotherTestEnum) + *p = x + return p +} +func (x YetYetAnotherTestEnum) MarshalJSON() ([]byte, error) { + return proto.MarshalJSONEnum(YetYetAnotherTestEnum_name, int32(x)) +} +func (x *YetYetAnotherTestEnum) UnmarshalJSON(data []byte) error { + value, err := proto.UnmarshalJSONEnum(YetYetAnotherTestEnum_value, data, "YetYetAnotherTestEnum") + if err != nil { + return err + } + *x = YetYetAnotherTestEnum(value) + return nil +} +func (YetYetAnotherTestEnum) EnumDescriptor() ([]byte, []int) { return fileDescriptorThetest, []int{3} } + +type NestedDefinition_NestedEnum int32 + +const ( + TYPE_NESTED NestedDefinition_NestedEnum = 1 +) + +var NestedDefinition_NestedEnum_name = map[int32]string{ + 1: "TYPE_NESTED", +} +var NestedDefinition_NestedEnum_value = map[string]int32{ + "TYPE_NESTED": 1, +} + +func (x NestedDefinition_NestedEnum) Enum() *NestedDefinition_NestedEnum { + p := new(NestedDefinition_NestedEnum) + *p = x + return p +} +func (x NestedDefinition_NestedEnum) MarshalJSON() ([]byte, error) { + return proto.MarshalJSONEnum(NestedDefinition_NestedEnum_name, int32(x)) +} +func (x *NestedDefinition_NestedEnum) UnmarshalJSON(data []byte) error { + value, err := proto.UnmarshalJSONEnum(NestedDefinition_NestedEnum_value, data, "NestedDefinition_NestedEnum") + if err != nil { + return err + } + *x = NestedDefinition_NestedEnum(value) + return nil +} +func (NestedDefinition_NestedEnum) EnumDescriptor() ([]byte, []int) { + return fileDescriptorThetest, []int{42, 0} +} + +type NidOptNative struct { + Field1 float64 `protobuf:"fixed64,1,opt,name=Field1,json=field1" json:"Field1"` + Field2 float32 `protobuf:"fixed32,2,opt,name=Field2,json=field2" json:"Field2"` + Field3 int32 `protobuf:"varint,3,opt,name=Field3,json=field3" json:"Field3"` + Field4 int64 `protobuf:"varint,4,opt,name=Field4,json=field4" json:"Field4"` + Field5 uint32 `protobuf:"varint,5,opt,name=Field5,json=field5" json:"Field5"` + Field6 uint64 `protobuf:"varint,6,opt,name=Field6,json=field6" json:"Field6"` + Field7 int32 `protobuf:"zigzag32,7,opt,name=Field7,json=field7" json:"Field7"` + Field8 int64 `protobuf:"zigzag64,8,opt,name=Field8,json=field8" json:"Field8"` + Field9 uint32 `protobuf:"fixed32,9,opt,name=Field9,json=field9" json:"Field9"` + Field10 int32 `protobuf:"fixed32,10,opt,name=Field10,json=field10" json:"Field10"` + Field11 uint64 `protobuf:"fixed64,11,opt,name=Field11,json=field11" json:"Field11"` + Field12 int64 `protobuf:"fixed64,12,opt,name=Field12,json=field12" json:"Field12"` + Field13 bool `protobuf:"varint,13,opt,name=Field13,json=field13" json:"Field13"` + Field14 string `protobuf:"bytes,14,opt,name=Field14,json=field14" json:"Field14"` + Field15 []byte `protobuf:"bytes,15,opt,name=Field15,json=field15" json:"Field15"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *NidOptNative) Reset() { *m = NidOptNative{} } +func (*NidOptNative) ProtoMessage() {} +func (*NidOptNative) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{0} } + +type NinOptNative struct { + Field1 *float64 `protobuf:"fixed64,1,opt,name=Field1,json=field1" json:"Field1,omitempty"` + Field2 *float32 `protobuf:"fixed32,2,opt,name=Field2,json=field2" json:"Field2,omitempty"` + Field3 *int32 `protobuf:"varint,3,opt,name=Field3,json=field3" json:"Field3,omitempty"` + Field4 *int64 `protobuf:"varint,4,opt,name=Field4,json=field4" json:"Field4,omitempty"` + Field5 *uint32 `protobuf:"varint,5,opt,name=Field5,json=field5" json:"Field5,omitempty"` + Field6 *uint64 `protobuf:"varint,6,opt,name=Field6,json=field6" json:"Field6,omitempty"` + Field7 *int32 `protobuf:"zigzag32,7,opt,name=Field7,json=field7" json:"Field7,omitempty"` + Field8 *int64 `protobuf:"zigzag64,8,opt,name=Field8,json=field8" json:"Field8,omitempty"` + Field9 *uint32 `protobuf:"fixed32,9,opt,name=Field9,json=field9" json:"Field9,omitempty"` + Field10 *int32 `protobuf:"fixed32,10,opt,name=Field10,json=field10" json:"Field10,omitempty"` + Field11 *uint64 `protobuf:"fixed64,11,opt,name=Field11,json=field11" json:"Field11,omitempty"` + Field12 *int64 `protobuf:"fixed64,12,opt,name=Field12,json=field12" json:"Field12,omitempty"` + Field13 *bool `protobuf:"varint,13,opt,name=Field13,json=field13" json:"Field13,omitempty"` + Field14 *string `protobuf:"bytes,14,opt,name=Field14,json=field14" json:"Field14,omitempty"` + Field15 []byte `protobuf:"bytes,15,opt,name=Field15,json=field15" json:"Field15,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *NinOptNative) Reset() { *m = NinOptNative{} } +func (*NinOptNative) ProtoMessage() {} +func (*NinOptNative) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{1} } + +type NidRepNative struct { + Field1 []float64 `protobuf:"fixed64,1,rep,name=Field1,json=field1" json:"Field1,omitempty"` + Field2 []float32 `protobuf:"fixed32,2,rep,name=Field2,json=field2" json:"Field2,omitempty"` + Field3 []int32 `protobuf:"varint,3,rep,name=Field3,json=field3" json:"Field3,omitempty"` + Field4 []int64 `protobuf:"varint,4,rep,name=Field4,json=field4" json:"Field4,omitempty"` + Field5 []uint32 `protobuf:"varint,5,rep,name=Field5,json=field5" json:"Field5,omitempty"` + Field6 []uint64 `protobuf:"varint,6,rep,name=Field6,json=field6" json:"Field6,omitempty"` + Field7 []int32 `protobuf:"zigzag32,7,rep,name=Field7,json=field7" json:"Field7,omitempty"` + Field8 []int64 `protobuf:"zigzag64,8,rep,name=Field8,json=field8" json:"Field8,omitempty"` + Field9 []uint32 `protobuf:"fixed32,9,rep,name=Field9,json=field9" json:"Field9,omitempty"` + Field10 []int32 `protobuf:"fixed32,10,rep,name=Field10,json=field10" json:"Field10,omitempty"` + Field11 []uint64 `protobuf:"fixed64,11,rep,name=Field11,json=field11" json:"Field11,omitempty"` + Field12 []int64 `protobuf:"fixed64,12,rep,name=Field12,json=field12" json:"Field12,omitempty"` + Field13 []bool `protobuf:"varint,13,rep,name=Field13,json=field13" json:"Field13,omitempty"` + Field14 []string `protobuf:"bytes,14,rep,name=Field14,json=field14" json:"Field14,omitempty"` + Field15 [][]byte `protobuf:"bytes,15,rep,name=Field15,json=field15" json:"Field15,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *NidRepNative) Reset() { *m = NidRepNative{} } +func (*NidRepNative) ProtoMessage() {} +func (*NidRepNative) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{2} } + +type NinRepNative struct { + Field1 []float64 `protobuf:"fixed64,1,rep,name=Field1,json=field1" json:"Field1,omitempty"` + Field2 []float32 `protobuf:"fixed32,2,rep,name=Field2,json=field2" json:"Field2,omitempty"` + Field3 []int32 `protobuf:"varint,3,rep,name=Field3,json=field3" json:"Field3,omitempty"` + Field4 []int64 `protobuf:"varint,4,rep,name=Field4,json=field4" json:"Field4,omitempty"` + Field5 []uint32 `protobuf:"varint,5,rep,name=Field5,json=field5" json:"Field5,omitempty"` + Field6 []uint64 `protobuf:"varint,6,rep,name=Field6,json=field6" json:"Field6,omitempty"` + Field7 []int32 `protobuf:"zigzag32,7,rep,name=Field7,json=field7" json:"Field7,omitempty"` + Field8 []int64 `protobuf:"zigzag64,8,rep,name=Field8,json=field8" json:"Field8,omitempty"` + Field9 []uint32 `protobuf:"fixed32,9,rep,name=Field9,json=field9" json:"Field9,omitempty"` + Field10 []int32 `protobuf:"fixed32,10,rep,name=Field10,json=field10" json:"Field10,omitempty"` + Field11 []uint64 `protobuf:"fixed64,11,rep,name=Field11,json=field11" json:"Field11,omitempty"` + Field12 []int64 `protobuf:"fixed64,12,rep,name=Field12,json=field12" json:"Field12,omitempty"` + Field13 []bool `protobuf:"varint,13,rep,name=Field13,json=field13" json:"Field13,omitempty"` + Field14 []string `protobuf:"bytes,14,rep,name=Field14,json=field14" json:"Field14,omitempty"` + Field15 [][]byte `protobuf:"bytes,15,rep,name=Field15,json=field15" json:"Field15,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *NinRepNative) Reset() { *m = NinRepNative{} } +func (*NinRepNative) ProtoMessage() {} +func (*NinRepNative) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{3} } + +type NidRepPackedNative struct { + Field1 []float64 `protobuf:"fixed64,1,rep,packed,name=Field1,json=field1" json:"Field1,omitempty"` + Field2 []float32 `protobuf:"fixed32,2,rep,packed,name=Field2,json=field2" json:"Field2,omitempty"` + Field3 []int32 `protobuf:"varint,3,rep,packed,name=Field3,json=field3" json:"Field3,omitempty"` + Field4 []int64 `protobuf:"varint,4,rep,packed,name=Field4,json=field4" json:"Field4,omitempty"` + Field5 []uint32 `protobuf:"varint,5,rep,packed,name=Field5,json=field5" json:"Field5,omitempty"` + Field6 []uint64 `protobuf:"varint,6,rep,packed,name=Field6,json=field6" json:"Field6,omitempty"` + Field7 []int32 `protobuf:"zigzag32,7,rep,packed,name=Field7,json=field7" json:"Field7,omitempty"` + Field8 []int64 `protobuf:"zigzag64,8,rep,packed,name=Field8,json=field8" json:"Field8,omitempty"` + Field9 []uint32 `protobuf:"fixed32,9,rep,packed,name=Field9,json=field9" json:"Field9,omitempty"` + Field10 []int32 `protobuf:"fixed32,10,rep,packed,name=Field10,json=field10" json:"Field10,omitempty"` + Field11 []uint64 `protobuf:"fixed64,11,rep,packed,name=Field11,json=field11" json:"Field11,omitempty"` + Field12 []int64 `protobuf:"fixed64,12,rep,packed,name=Field12,json=field12" json:"Field12,omitempty"` + Field13 []bool `protobuf:"varint,13,rep,packed,name=Field13,json=field13" json:"Field13,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *NidRepPackedNative) Reset() { *m = NidRepPackedNative{} } +func (*NidRepPackedNative) ProtoMessage() {} +func (*NidRepPackedNative) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{4} } + +type NinRepPackedNative struct { + Field1 []float64 `protobuf:"fixed64,1,rep,packed,name=Field1,json=field1" json:"Field1,omitempty"` + Field2 []float32 `protobuf:"fixed32,2,rep,packed,name=Field2,json=field2" json:"Field2,omitempty"` + Field3 []int32 `protobuf:"varint,3,rep,packed,name=Field3,json=field3" json:"Field3,omitempty"` + Field4 []int64 `protobuf:"varint,4,rep,packed,name=Field4,json=field4" json:"Field4,omitempty"` + Field5 []uint32 `protobuf:"varint,5,rep,packed,name=Field5,json=field5" json:"Field5,omitempty"` + Field6 []uint64 `protobuf:"varint,6,rep,packed,name=Field6,json=field6" json:"Field6,omitempty"` + Field7 []int32 `protobuf:"zigzag32,7,rep,packed,name=Field7,json=field7" json:"Field7,omitempty"` + Field8 []int64 `protobuf:"zigzag64,8,rep,packed,name=Field8,json=field8" json:"Field8,omitempty"` + Field9 []uint32 `protobuf:"fixed32,9,rep,packed,name=Field9,json=field9" json:"Field9,omitempty"` + Field10 []int32 `protobuf:"fixed32,10,rep,packed,name=Field10,json=field10" json:"Field10,omitempty"` + Field11 []uint64 `protobuf:"fixed64,11,rep,packed,name=Field11,json=field11" json:"Field11,omitempty"` + Field12 []int64 `protobuf:"fixed64,12,rep,packed,name=Field12,json=field12" json:"Field12,omitempty"` + Field13 []bool `protobuf:"varint,13,rep,packed,name=Field13,json=field13" json:"Field13,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *NinRepPackedNative) Reset() { *m = NinRepPackedNative{} } +func (*NinRepPackedNative) ProtoMessage() {} +func (*NinRepPackedNative) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{5} } + +type NidOptStruct struct { + Field1 float64 `protobuf:"fixed64,1,opt,name=Field1,json=field1" json:"Field1"` + Field2 float32 `protobuf:"fixed32,2,opt,name=Field2,json=field2" json:"Field2"` + Field3 NidOptNative `protobuf:"bytes,3,opt,name=Field3,json=field3" json:"Field3"` + Field4 NinOptNative `protobuf:"bytes,4,opt,name=Field4,json=field4" json:"Field4"` + Field6 uint64 `protobuf:"varint,6,opt,name=Field6,json=field6" json:"Field6"` + Field7 int32 `protobuf:"zigzag32,7,opt,name=Field7,json=field7" json:"Field7"` + Field8 NidOptNative `protobuf:"bytes,8,opt,name=Field8,json=field8" json:"Field8"` + Field13 bool `protobuf:"varint,13,opt,name=Field13,json=field13" json:"Field13"` + Field14 string `protobuf:"bytes,14,opt,name=Field14,json=field14" json:"Field14"` + Field15 []byte `protobuf:"bytes,15,opt,name=Field15,json=field15" json:"Field15"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *NidOptStruct) Reset() { *m = NidOptStruct{} } +func (*NidOptStruct) ProtoMessage() {} +func (*NidOptStruct) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{6} } + +type NinOptStruct struct { + Field1 *float64 `protobuf:"fixed64,1,opt,name=Field1,json=field1" json:"Field1,omitempty"` + Field2 *float32 `protobuf:"fixed32,2,opt,name=Field2,json=field2" json:"Field2,omitempty"` + Field3 *NidOptNative `protobuf:"bytes,3,opt,name=Field3,json=field3" json:"Field3,omitempty"` + Field4 *NinOptNative `protobuf:"bytes,4,opt,name=Field4,json=field4" json:"Field4,omitempty"` + Field6 *uint64 `protobuf:"varint,6,opt,name=Field6,json=field6" json:"Field6,omitempty"` + Field7 *int32 `protobuf:"zigzag32,7,opt,name=Field7,json=field7" json:"Field7,omitempty"` + Field8 *NidOptNative `protobuf:"bytes,8,opt,name=Field8,json=field8" json:"Field8,omitempty"` + Field13 *bool `protobuf:"varint,13,opt,name=Field13,json=field13" json:"Field13,omitempty"` + Field14 *string `protobuf:"bytes,14,opt,name=Field14,json=field14" json:"Field14,omitempty"` + Field15 []byte `protobuf:"bytes,15,opt,name=Field15,json=field15" json:"Field15,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *NinOptStruct) Reset() { *m = NinOptStruct{} } +func (*NinOptStruct) ProtoMessage() {} +func (*NinOptStruct) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{7} } + +type NidRepStruct struct { + Field1 []float64 `protobuf:"fixed64,1,rep,name=Field1,json=field1" json:"Field1,omitempty"` + Field2 []float32 `protobuf:"fixed32,2,rep,name=Field2,json=field2" json:"Field2,omitempty"` + Field3 []NidOptNative `protobuf:"bytes,3,rep,name=Field3,json=field3" json:"Field3"` + Field4 []NinOptNative `protobuf:"bytes,4,rep,name=Field4,json=field4" json:"Field4"` + Field6 []uint64 `protobuf:"varint,6,rep,name=Field6,json=field6" json:"Field6,omitempty"` + Field7 []int32 `protobuf:"zigzag32,7,rep,name=Field7,json=field7" json:"Field7,omitempty"` + Field8 []NidOptNative `protobuf:"bytes,8,rep,name=Field8,json=field8" json:"Field8"` + Field13 []bool `protobuf:"varint,13,rep,name=Field13,json=field13" json:"Field13,omitempty"` + Field14 []string `protobuf:"bytes,14,rep,name=Field14,json=field14" json:"Field14,omitempty"` + Field15 [][]byte `protobuf:"bytes,15,rep,name=Field15,json=field15" json:"Field15,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *NidRepStruct) Reset() { *m = NidRepStruct{} } +func (*NidRepStruct) ProtoMessage() {} +func (*NidRepStruct) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{8} } + +type NinRepStruct struct { + Field1 []float64 `protobuf:"fixed64,1,rep,name=Field1,json=field1" json:"Field1,omitempty"` + Field2 []float32 `protobuf:"fixed32,2,rep,name=Field2,json=field2" json:"Field2,omitempty"` + Field3 []*NidOptNative `protobuf:"bytes,3,rep,name=Field3,json=field3" json:"Field3,omitempty"` + Field4 []*NinOptNative `protobuf:"bytes,4,rep,name=Field4,json=field4" json:"Field4,omitempty"` + Field6 []uint64 `protobuf:"varint,6,rep,name=Field6,json=field6" json:"Field6,omitempty"` + Field7 []int32 `protobuf:"zigzag32,7,rep,name=Field7,json=field7" json:"Field7,omitempty"` + Field8 []*NidOptNative `protobuf:"bytes,8,rep,name=Field8,json=field8" json:"Field8,omitempty"` + Field13 []bool `protobuf:"varint,13,rep,name=Field13,json=field13" json:"Field13,omitempty"` + Field14 []string `protobuf:"bytes,14,rep,name=Field14,json=field14" json:"Field14,omitempty"` + Field15 [][]byte `protobuf:"bytes,15,rep,name=Field15,json=field15" json:"Field15,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *NinRepStruct) Reset() { *m = NinRepStruct{} } +func (*NinRepStruct) ProtoMessage() {} +func (*NinRepStruct) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{9} } + +type NidEmbeddedStruct struct { + *NidOptNative `protobuf:"bytes,1,opt,name=Field1,json=field1,embedded=Field1" json:"Field1,omitempty"` + Field200 NidOptNative `protobuf:"bytes,200,opt,name=Field200,json=field200" json:"Field200"` + Field210 bool `protobuf:"varint,210,opt,name=Field210,json=field210" json:"Field210"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *NidEmbeddedStruct) Reset() { *m = NidEmbeddedStruct{} } +func (*NidEmbeddedStruct) ProtoMessage() {} +func (*NidEmbeddedStruct) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{10} } + +type NinEmbeddedStruct struct { + *NidOptNative `protobuf:"bytes,1,opt,name=Field1,json=field1,embedded=Field1" json:"Field1,omitempty"` + Field200 *NidOptNative `protobuf:"bytes,200,opt,name=Field200,json=field200" json:"Field200,omitempty"` + Field210 *bool `protobuf:"varint,210,opt,name=Field210,json=field210" json:"Field210,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *NinEmbeddedStruct) Reset() { *m = NinEmbeddedStruct{} } +func (*NinEmbeddedStruct) ProtoMessage() {} +func (*NinEmbeddedStruct) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{11} } + +type NidNestedStruct struct { + Field1 NidOptStruct `protobuf:"bytes,1,opt,name=Field1,json=field1" json:"Field1"` + Field2 []NidRepStruct `protobuf:"bytes,2,rep,name=Field2,json=field2" json:"Field2"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *NidNestedStruct) Reset() { *m = NidNestedStruct{} } +func (*NidNestedStruct) ProtoMessage() {} +func (*NidNestedStruct) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{12} } + +type NinNestedStruct struct { + Field1 *NinOptStruct `protobuf:"bytes,1,opt,name=Field1,json=field1" json:"Field1,omitempty"` + Field2 []*NinRepStruct `protobuf:"bytes,2,rep,name=Field2,json=field2" json:"Field2,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *NinNestedStruct) Reset() { *m = NinNestedStruct{} } +func (*NinNestedStruct) ProtoMessage() {} +func (*NinNestedStruct) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{13} } + +type NidOptCustom struct { + Id Uuid `protobuf:"bytes,1,opt,name=Id,json=id,customtype=Uuid" json:"Id"` + Value github_com_gogo_protobuf_test_custom.Uint128 `protobuf:"bytes,2,opt,name=Value,json=value,customtype=github.com/gogo/protobuf/test/custom.Uint128" json:"Value"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *NidOptCustom) Reset() { *m = NidOptCustom{} } +func (*NidOptCustom) ProtoMessage() {} +func (*NidOptCustom) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{14} } + +type CustomDash struct { + Value *github_com_gogo_protobuf_test_custom_dash_type.Bytes `protobuf:"bytes,1,opt,name=Value,json=value,customtype=github.com/gogo/protobuf/test/custom-dash-type.Bytes" json:"Value,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *CustomDash) Reset() { *m = CustomDash{} } +func (*CustomDash) ProtoMessage() {} +func (*CustomDash) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{15} } + +type NinOptCustom struct { + Id *Uuid `protobuf:"bytes,1,opt,name=Id,json=id,customtype=Uuid" json:"Id,omitempty"` + Value *github_com_gogo_protobuf_test_custom.Uint128 `protobuf:"bytes,2,opt,name=Value,json=value,customtype=github.com/gogo/protobuf/test/custom.Uint128" json:"Value,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *NinOptCustom) Reset() { *m = NinOptCustom{} } +func (*NinOptCustom) ProtoMessage() {} +func (*NinOptCustom) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{16} } + +type NidRepCustom struct { + Id []Uuid `protobuf:"bytes,1,rep,name=Id,json=id,customtype=Uuid" json:"Id"` + Value []github_com_gogo_protobuf_test_custom.Uint128 `protobuf:"bytes,2,rep,name=Value,json=value,customtype=github.com/gogo/protobuf/test/custom.Uint128" json:"Value"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *NidRepCustom) Reset() { *m = NidRepCustom{} } +func (*NidRepCustom) ProtoMessage() {} +func (*NidRepCustom) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{17} } + +type NinRepCustom struct { + Id []Uuid `protobuf:"bytes,1,rep,name=Id,json=id,customtype=Uuid" json:"Id,omitempty"` + Value []github_com_gogo_protobuf_test_custom.Uint128 `protobuf:"bytes,2,rep,name=Value,json=value,customtype=github.com/gogo/protobuf/test/custom.Uint128" json:"Value,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *NinRepCustom) Reset() { *m = NinRepCustom{} } +func (*NinRepCustom) ProtoMessage() {} +func (*NinRepCustom) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{18} } + +type NinOptNativeUnion struct { + Field1 *float64 `protobuf:"fixed64,1,opt,name=Field1,json=field1" json:"Field1,omitempty"` + Field2 *float32 `protobuf:"fixed32,2,opt,name=Field2,json=field2" json:"Field2,omitempty"` + Field3 *int32 `protobuf:"varint,3,opt,name=Field3,json=field3" json:"Field3,omitempty"` + Field4 *int64 `protobuf:"varint,4,opt,name=Field4,json=field4" json:"Field4,omitempty"` + Field5 *uint32 `protobuf:"varint,5,opt,name=Field5,json=field5" json:"Field5,omitempty"` + Field6 *uint64 `protobuf:"varint,6,opt,name=Field6,json=field6" json:"Field6,omitempty"` + Field13 *bool `protobuf:"varint,13,opt,name=Field13,json=field13" json:"Field13,omitempty"` + Field14 *string `protobuf:"bytes,14,opt,name=Field14,json=field14" json:"Field14,omitempty"` + Field15 []byte `protobuf:"bytes,15,opt,name=Field15,json=field15" json:"Field15,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *NinOptNativeUnion) Reset() { *m = NinOptNativeUnion{} } +func (*NinOptNativeUnion) ProtoMessage() {} +func (*NinOptNativeUnion) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{19} } + +type NinOptStructUnion struct { + Field1 *float64 `protobuf:"fixed64,1,opt,name=Field1,json=field1" json:"Field1,omitempty"` + Field2 *float32 `protobuf:"fixed32,2,opt,name=Field2,json=field2" json:"Field2,omitempty"` + Field3 *NidOptNative `protobuf:"bytes,3,opt,name=Field3,json=field3" json:"Field3,omitempty"` + Field4 *NinOptNative `protobuf:"bytes,4,opt,name=Field4,json=field4" json:"Field4,omitempty"` + Field6 *uint64 `protobuf:"varint,6,opt,name=Field6,json=field6" json:"Field6,omitempty"` + Field7 *int32 `protobuf:"zigzag32,7,opt,name=Field7,json=field7" json:"Field7,omitempty"` + Field13 *bool `protobuf:"varint,13,opt,name=Field13,json=field13" json:"Field13,omitempty"` + Field14 *string `protobuf:"bytes,14,opt,name=Field14,json=field14" json:"Field14,omitempty"` + Field15 []byte `protobuf:"bytes,15,opt,name=Field15,json=field15" json:"Field15,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *NinOptStructUnion) Reset() { *m = NinOptStructUnion{} } +func (*NinOptStructUnion) ProtoMessage() {} +func (*NinOptStructUnion) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{20} } + +type NinEmbeddedStructUnion struct { + *NidOptNative `protobuf:"bytes,1,opt,name=Field1,json=field1,embedded=Field1" json:"Field1,omitempty"` + Field200 *NinOptNative `protobuf:"bytes,200,opt,name=Field200,json=field200" json:"Field200,omitempty"` + Field210 *bool `protobuf:"varint,210,opt,name=Field210,json=field210" json:"Field210,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *NinEmbeddedStructUnion) Reset() { *m = NinEmbeddedStructUnion{} } +func (*NinEmbeddedStructUnion) ProtoMessage() {} +func (*NinEmbeddedStructUnion) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{21} } + +type NinNestedStructUnion struct { + Field1 *NinOptNativeUnion `protobuf:"bytes,1,opt,name=Field1,json=field1" json:"Field1,omitempty"` + Field2 *NinOptStructUnion `protobuf:"bytes,2,opt,name=Field2,json=field2" json:"Field2,omitempty"` + Field3 *NinEmbeddedStructUnion `protobuf:"bytes,3,opt,name=Field3,json=field3" json:"Field3,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *NinNestedStructUnion) Reset() { *m = NinNestedStructUnion{} } +func (*NinNestedStructUnion) ProtoMessage() {} +func (*NinNestedStructUnion) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{22} } + +type Tree struct { + Or *OrBranch `protobuf:"bytes,1,opt,name=Or,json=or" json:"Or,omitempty"` + And *AndBranch `protobuf:"bytes,2,opt,name=And,json=and" json:"And,omitempty"` + Leaf *Leaf `protobuf:"bytes,3,opt,name=Leaf,json=leaf" json:"Leaf,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *Tree) Reset() { *m = Tree{} } +func (*Tree) ProtoMessage() {} +func (*Tree) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{23} } + +type OrBranch struct { + Left Tree `protobuf:"bytes,1,opt,name=Left,json=left" json:"Left"` + Right Tree `protobuf:"bytes,2,opt,name=Right,json=right" json:"Right"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *OrBranch) Reset() { *m = OrBranch{} } +func (*OrBranch) ProtoMessage() {} +func (*OrBranch) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{24} } + +type AndBranch struct { + Left Tree `protobuf:"bytes,1,opt,name=Left,json=left" json:"Left"` + Right Tree `protobuf:"bytes,2,opt,name=Right,json=right" json:"Right"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *AndBranch) Reset() { *m = AndBranch{} } +func (*AndBranch) ProtoMessage() {} +func (*AndBranch) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{25} } + +type Leaf struct { + Value int64 `protobuf:"varint,1,opt,name=Value,json=value" json:"Value"` + StrValue string `protobuf:"bytes,2,opt,name=StrValue,json=strValue" json:"StrValue"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *Leaf) Reset() { *m = Leaf{} } +func (*Leaf) ProtoMessage() {} +func (*Leaf) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{26} } + +type DeepTree struct { + Down *ADeepBranch `protobuf:"bytes,1,opt,name=Down,json=down" json:"Down,omitempty"` + And *AndDeepBranch `protobuf:"bytes,2,opt,name=And,json=and" json:"And,omitempty"` + Leaf *DeepLeaf `protobuf:"bytes,3,opt,name=Leaf,json=leaf" json:"Leaf,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *DeepTree) Reset() { *m = DeepTree{} } +func (*DeepTree) ProtoMessage() {} +func (*DeepTree) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{27} } + +type ADeepBranch struct { + Down DeepTree `protobuf:"bytes,2,opt,name=Down,json=down" json:"Down"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *ADeepBranch) Reset() { *m = ADeepBranch{} } +func (*ADeepBranch) ProtoMessage() {} +func (*ADeepBranch) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{28} } + +type AndDeepBranch struct { + Left DeepTree `protobuf:"bytes,1,opt,name=Left,json=left" json:"Left"` + Right DeepTree `protobuf:"bytes,2,opt,name=Right,json=right" json:"Right"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *AndDeepBranch) Reset() { *m = AndDeepBranch{} } +func (*AndDeepBranch) ProtoMessage() {} +func (*AndDeepBranch) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{29} } + +type DeepLeaf struct { + Tree Tree `protobuf:"bytes,1,opt,name=Tree,json=tree" json:"Tree"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *DeepLeaf) Reset() { *m = DeepLeaf{} } +func (*DeepLeaf) ProtoMessage() {} +func (*DeepLeaf) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{30} } + +type Nil struct { + XXX_unrecognized []byte `json:"-"` +} + +func (m *Nil) Reset() { *m = Nil{} } +func (*Nil) ProtoMessage() {} +func (*Nil) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{31} } + +type NidOptEnum struct { + Field1 TheTestEnum `protobuf:"varint,1,opt,name=Field1,json=field1,enum=test.TheTestEnum" json:"Field1"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *NidOptEnum) Reset() { *m = NidOptEnum{} } +func (*NidOptEnum) ProtoMessage() {} +func (*NidOptEnum) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{32} } + +type NinOptEnum struct { + Field1 *TheTestEnum `protobuf:"varint,1,opt,name=Field1,json=field1,enum=test.TheTestEnum" json:"Field1,omitempty"` + Field2 *YetAnotherTestEnum `protobuf:"varint,2,opt,name=Field2,json=field2,enum=test.YetAnotherTestEnum" json:"Field2,omitempty"` + Field3 *YetYetAnotherTestEnum `protobuf:"varint,3,opt,name=Field3,json=field3,enum=test.YetYetAnotherTestEnum" json:"Field3,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *NinOptEnum) Reset() { *m = NinOptEnum{} } +func (*NinOptEnum) ProtoMessage() {} +func (*NinOptEnum) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{33} } + +type NidRepEnum struct { + Field1 []TheTestEnum `protobuf:"varint,1,rep,name=Field1,json=field1,enum=test.TheTestEnum" json:"Field1,omitempty"` + Field2 []YetAnotherTestEnum `protobuf:"varint,2,rep,name=Field2,json=field2,enum=test.YetAnotherTestEnum" json:"Field2,omitempty"` + Field3 []YetYetAnotherTestEnum `protobuf:"varint,3,rep,name=Field3,json=field3,enum=test.YetYetAnotherTestEnum" json:"Field3,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *NidRepEnum) Reset() { *m = NidRepEnum{} } +func (*NidRepEnum) ProtoMessage() {} +func (*NidRepEnum) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{34} } + +type NinRepEnum struct { + Field1 []TheTestEnum `protobuf:"varint,1,rep,name=Field1,json=field1,enum=test.TheTestEnum" json:"Field1,omitempty"` + Field2 []YetAnotherTestEnum `protobuf:"varint,2,rep,name=Field2,json=field2,enum=test.YetAnotherTestEnum" json:"Field2,omitempty"` + Field3 []YetYetAnotherTestEnum `protobuf:"varint,3,rep,name=Field3,json=field3,enum=test.YetYetAnotherTestEnum" json:"Field3,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *NinRepEnum) Reset() { *m = NinRepEnum{} } +func (*NinRepEnum) ProtoMessage() {} +func (*NinRepEnum) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{35} } + +type NinOptEnumDefault struct { + Field1 *TheTestEnum `protobuf:"varint,1,opt,name=Field1,json=field1,enum=test.TheTestEnum,def=2" json:"Field1,omitempty"` + Field2 *YetAnotherTestEnum `protobuf:"varint,2,opt,name=Field2,json=field2,enum=test.YetAnotherTestEnum,def=1" json:"Field2,omitempty"` + Field3 *YetYetAnotherTestEnum `protobuf:"varint,3,opt,name=Field3,json=field3,enum=test.YetYetAnotherTestEnum,def=0" json:"Field3,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *NinOptEnumDefault) Reset() { *m = NinOptEnumDefault{} } +func (*NinOptEnumDefault) ProtoMessage() {} +func (*NinOptEnumDefault) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{36} } + +const Default_NinOptEnumDefault_Field1 TheTestEnum = C +const Default_NinOptEnumDefault_Field2 YetAnotherTestEnum = BetterYetBB +const Default_NinOptEnumDefault_Field3 YetYetAnotherTestEnum = YetYetAnotherTestEnum_CC + +func (m *NinOptEnumDefault) GetField1() TheTestEnum { + if m != nil && m.Field1 != nil { + return *m.Field1 + } + return Default_NinOptEnumDefault_Field1 +} + +func (m *NinOptEnumDefault) GetField2() YetAnotherTestEnum { + if m != nil && m.Field2 != nil { + return *m.Field2 + } + return Default_NinOptEnumDefault_Field2 +} + +func (m *NinOptEnumDefault) GetField3() YetYetAnotherTestEnum { + if m != nil && m.Field3 != nil { + return *m.Field3 + } + return Default_NinOptEnumDefault_Field3 +} + +type AnotherNinOptEnum struct { + Field1 *AnotherTestEnum `protobuf:"varint,1,opt,name=Field1,json=field1,enum=test.AnotherTestEnum" json:"Field1,omitempty"` + Field2 *YetAnotherTestEnum `protobuf:"varint,2,opt,name=Field2,json=field2,enum=test.YetAnotherTestEnum" json:"Field2,omitempty"` + Field3 *YetYetAnotherTestEnum `protobuf:"varint,3,opt,name=Field3,json=field3,enum=test.YetYetAnotherTestEnum" json:"Field3,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *AnotherNinOptEnum) Reset() { *m = AnotherNinOptEnum{} } +func (*AnotherNinOptEnum) ProtoMessage() {} +func (*AnotherNinOptEnum) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{37} } + +type AnotherNinOptEnumDefault struct { + Field1 *AnotherTestEnum `protobuf:"varint,1,opt,name=Field1,json=field1,enum=test.AnotherTestEnum,def=11" json:"Field1,omitempty"` + Field2 *YetAnotherTestEnum `protobuf:"varint,2,opt,name=Field2,json=field2,enum=test.YetAnotherTestEnum,def=1" json:"Field2,omitempty"` + Field3 *YetYetAnotherTestEnum `protobuf:"varint,3,opt,name=Field3,json=field3,enum=test.YetYetAnotherTestEnum,def=0" json:"Field3,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *AnotherNinOptEnumDefault) Reset() { *m = AnotherNinOptEnumDefault{} } +func (*AnotherNinOptEnumDefault) ProtoMessage() {} +func (*AnotherNinOptEnumDefault) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{38} } + +const Default_AnotherNinOptEnumDefault_Field1 AnotherTestEnum = E +const Default_AnotherNinOptEnumDefault_Field2 YetAnotherTestEnum = BetterYetBB +const Default_AnotherNinOptEnumDefault_Field3 YetYetAnotherTestEnum = YetYetAnotherTestEnum_CC + +func (m *AnotherNinOptEnumDefault) GetField1() AnotherTestEnum { + if m != nil && m.Field1 != nil { + return *m.Field1 + } + return Default_AnotherNinOptEnumDefault_Field1 +} + +func (m *AnotherNinOptEnumDefault) GetField2() YetAnotherTestEnum { + if m != nil && m.Field2 != nil { + return *m.Field2 + } + return Default_AnotherNinOptEnumDefault_Field2 +} + +func (m *AnotherNinOptEnumDefault) GetField3() YetYetAnotherTestEnum { + if m != nil && m.Field3 != nil { + return *m.Field3 + } + return Default_AnotherNinOptEnumDefault_Field3 +} + +type Timer struct { + Time1 int64 `protobuf:"fixed64,1,opt,name=Time1,json=time1" json:"Time1"` + Time2 int64 `protobuf:"fixed64,2,opt,name=Time2,json=time2" json:"Time2"` + Data []byte `protobuf:"bytes,3,opt,name=Data,json=data" json:"Data"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *Timer) Reset() { *m = Timer{} } +func (*Timer) ProtoMessage() {} +func (*Timer) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{39} } + +type MyExtendable struct { + Field1 *int64 `protobuf:"varint,1,opt,name=Field1,json=field1" json:"Field1,omitempty"` + XXX_extensions map[int32]proto.Extension `json:"-"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *MyExtendable) Reset() { *m = MyExtendable{} } +func (*MyExtendable) ProtoMessage() {} +func (*MyExtendable) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{40} } + +var extRange_MyExtendable = []proto.ExtensionRange{ + {100, 199}, +} + +func (*MyExtendable) ExtensionRangeArray() []proto.ExtensionRange { + return extRange_MyExtendable +} +func (m *MyExtendable) ExtensionMap() map[int32]proto.Extension { + if m.XXX_extensions == nil { + m.XXX_extensions = make(map[int32]proto.Extension) + } + return m.XXX_extensions +} + +type OtherExtenable struct { + Field2 *int64 `protobuf:"varint,2,opt,name=Field2,json=field2" json:"Field2,omitempty"` + Field13 *int64 `protobuf:"varint,13,opt,name=Field13,json=field13" json:"Field13,omitempty"` + M *MyExtendable `protobuf:"bytes,1,opt,name=M,json=m" json:"M,omitempty"` + XXX_extensions map[int32]proto.Extension `json:"-"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *OtherExtenable) Reset() { *m = OtherExtenable{} } +func (*OtherExtenable) ProtoMessage() {} +func (*OtherExtenable) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{41} } + +var extRange_OtherExtenable = []proto.ExtensionRange{ + {14, 16}, + {10, 12}, +} + +func (*OtherExtenable) ExtensionRangeArray() []proto.ExtensionRange { + return extRange_OtherExtenable +} +func (m *OtherExtenable) ExtensionMap() map[int32]proto.Extension { + if m.XXX_extensions == nil { + m.XXX_extensions = make(map[int32]proto.Extension) + } + return m.XXX_extensions +} + +type NestedDefinition struct { + Field1 *int64 `protobuf:"varint,1,opt,name=Field1,json=field1" json:"Field1,omitempty"` + EnumField *NestedDefinition_NestedEnum `protobuf:"varint,2,opt,name=EnumField,json=enumField,enum=test.NestedDefinition_NestedEnum" json:"EnumField,omitempty"` + NNM *NestedDefinition_NestedMessage_NestedNestedMsg `protobuf:"bytes,3,opt,name=NNM,json=nNM" json:"NNM,omitempty"` + NM *NestedDefinition_NestedMessage `protobuf:"bytes,4,opt,name=NM,json=nM" json:"NM,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *NestedDefinition) Reset() { *m = NestedDefinition{} } +func (*NestedDefinition) ProtoMessage() {} +func (*NestedDefinition) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{42} } + +type NestedDefinition_NestedMessage struct { + NestedField1 *uint64 `protobuf:"fixed64,1,opt,name=NestedField1,json=nestedField1" json:"NestedField1,omitempty"` + NNM *NestedDefinition_NestedMessage_NestedNestedMsg `protobuf:"bytes,2,opt,name=NNM,json=nNM" json:"NNM,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *NestedDefinition_NestedMessage) Reset() { *m = NestedDefinition_NestedMessage{} } +func (*NestedDefinition_NestedMessage) ProtoMessage() {} +func (*NestedDefinition_NestedMessage) Descriptor() ([]byte, []int) { + return fileDescriptorThetest, []int{42, 0} +} + +type NestedDefinition_NestedMessage_NestedNestedMsg struct { + NestedNestedField1 *string `protobuf:"bytes,10,opt,name=NestedNestedField1,json=nestedNestedField1" json:"NestedNestedField1,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *NestedDefinition_NestedMessage_NestedNestedMsg) Reset() { + *m = NestedDefinition_NestedMessage_NestedNestedMsg{} +} +func (*NestedDefinition_NestedMessage_NestedNestedMsg) ProtoMessage() {} +func (*NestedDefinition_NestedMessage_NestedNestedMsg) Descriptor() ([]byte, []int) { + return fileDescriptorThetest, []int{42, 0, 0} +} + +type NestedScope struct { + A *NestedDefinition_NestedMessage_NestedNestedMsg `protobuf:"bytes,1,opt,name=A,json=a" json:"A,omitempty"` + B *NestedDefinition_NestedEnum `protobuf:"varint,2,opt,name=B,json=b,enum=test.NestedDefinition_NestedEnum" json:"B,omitempty"` + C *NestedDefinition_NestedMessage `protobuf:"bytes,3,opt,name=C,json=c" json:"C,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *NestedScope) Reset() { *m = NestedScope{} } +func (*NestedScope) ProtoMessage() {} +func (*NestedScope) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{43} } + +type NinOptNativeDefault struct { + Field1 *float64 `protobuf:"fixed64,1,opt,name=Field1,json=field1,def=1234.1234" json:"Field1,omitempty"` + Field2 *float32 `protobuf:"fixed32,2,opt,name=Field2,json=field2,def=1234.1234" json:"Field2,omitempty"` + Field3 *int32 `protobuf:"varint,3,opt,name=Field3,json=field3,def=1234" json:"Field3,omitempty"` + Field4 *int64 `protobuf:"varint,4,opt,name=Field4,json=field4,def=1234" json:"Field4,omitempty"` + Field5 *uint32 `protobuf:"varint,5,opt,name=Field5,json=field5,def=1234" json:"Field5,omitempty"` + Field6 *uint64 `protobuf:"varint,6,opt,name=Field6,json=field6,def=1234" json:"Field6,omitempty"` + Field7 *int32 `protobuf:"zigzag32,7,opt,name=Field7,json=field7,def=1234" json:"Field7,omitempty"` + Field8 *int64 `protobuf:"zigzag64,8,opt,name=Field8,json=field8,def=1234" json:"Field8,omitempty"` + Field9 *uint32 `protobuf:"fixed32,9,opt,name=Field9,json=field9,def=1234" json:"Field9,omitempty"` + Field10 *int32 `protobuf:"fixed32,10,opt,name=Field10,json=field10,def=1234" json:"Field10,omitempty"` + Field11 *uint64 `protobuf:"fixed64,11,opt,name=Field11,json=field11,def=1234" json:"Field11,omitempty"` + Field12 *int64 `protobuf:"fixed64,12,opt,name=Field12,json=field12,def=1234" json:"Field12,omitempty"` + Field13 *bool `protobuf:"varint,13,opt,name=Field13,json=field13,def=1" json:"Field13,omitempty"` + Field14 *string `protobuf:"bytes,14,opt,name=Field14,json=field14,def=1234" json:"Field14,omitempty"` + Field15 []byte `protobuf:"bytes,15,opt,name=Field15,json=field15" json:"Field15,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *NinOptNativeDefault) Reset() { *m = NinOptNativeDefault{} } +func (*NinOptNativeDefault) ProtoMessage() {} +func (*NinOptNativeDefault) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{44} } + +const Default_NinOptNativeDefault_Field1 float64 = 1234.1234 +const Default_NinOptNativeDefault_Field2 float32 = 1234.1234 +const Default_NinOptNativeDefault_Field3 int32 = 1234 +const Default_NinOptNativeDefault_Field4 int64 = 1234 +const Default_NinOptNativeDefault_Field5 uint32 = 1234 +const Default_NinOptNativeDefault_Field6 uint64 = 1234 +const Default_NinOptNativeDefault_Field7 int32 = 1234 +const Default_NinOptNativeDefault_Field8 int64 = 1234 +const Default_NinOptNativeDefault_Field9 uint32 = 1234 +const Default_NinOptNativeDefault_Field10 int32 = 1234 +const Default_NinOptNativeDefault_Field11 uint64 = 1234 +const Default_NinOptNativeDefault_Field12 int64 = 1234 +const Default_NinOptNativeDefault_Field13 bool = true +const Default_NinOptNativeDefault_Field14 string = "1234" + +func (m *NinOptNativeDefault) GetField1() float64 { + if m != nil && m.Field1 != nil { + return *m.Field1 + } + return Default_NinOptNativeDefault_Field1 +} + +func (m *NinOptNativeDefault) GetField2() float32 { + if m != nil && m.Field2 != nil { + return *m.Field2 + } + return Default_NinOptNativeDefault_Field2 +} + +func (m *NinOptNativeDefault) GetField3() int32 { + if m != nil && m.Field3 != nil { + return *m.Field3 + } + return Default_NinOptNativeDefault_Field3 +} + +func (m *NinOptNativeDefault) GetField4() int64 { + if m != nil && m.Field4 != nil { + return *m.Field4 + } + return Default_NinOptNativeDefault_Field4 +} + +func (m *NinOptNativeDefault) GetField5() uint32 { + if m != nil && m.Field5 != nil { + return *m.Field5 + } + return Default_NinOptNativeDefault_Field5 +} + +func (m *NinOptNativeDefault) GetField6() uint64 { + if m != nil && m.Field6 != nil { + return *m.Field6 + } + return Default_NinOptNativeDefault_Field6 +} + +func (m *NinOptNativeDefault) GetField7() int32 { + if m != nil && m.Field7 != nil { + return *m.Field7 + } + return Default_NinOptNativeDefault_Field7 +} + +func (m *NinOptNativeDefault) GetField8() int64 { + if m != nil && m.Field8 != nil { + return *m.Field8 + } + return Default_NinOptNativeDefault_Field8 +} + +func (m *NinOptNativeDefault) GetField9() uint32 { + if m != nil && m.Field9 != nil { + return *m.Field9 + } + return Default_NinOptNativeDefault_Field9 +} + +func (m *NinOptNativeDefault) GetField10() int32 { + if m != nil && m.Field10 != nil { + return *m.Field10 + } + return Default_NinOptNativeDefault_Field10 +} + +func (m *NinOptNativeDefault) GetField11() uint64 { + if m != nil && m.Field11 != nil { + return *m.Field11 + } + return Default_NinOptNativeDefault_Field11 +} + +func (m *NinOptNativeDefault) GetField12() int64 { + if m != nil && m.Field12 != nil { + return *m.Field12 + } + return Default_NinOptNativeDefault_Field12 +} + +func (m *NinOptNativeDefault) GetField13() bool { + if m != nil && m.Field13 != nil { + return *m.Field13 + } + return Default_NinOptNativeDefault_Field13 +} + +func (m *NinOptNativeDefault) GetField14() string { + if m != nil && m.Field14 != nil { + return *m.Field14 + } + return Default_NinOptNativeDefault_Field14 +} + +func (m *NinOptNativeDefault) GetField15() []byte { + if m != nil { + return m.Field15 + } + return nil +} + +type CustomContainer struct { + CustomStruct NidOptCustom `protobuf:"bytes,1,opt,name=CustomStruct,json=customStruct" json:"CustomStruct"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *CustomContainer) Reset() { *m = CustomContainer{} } +func (*CustomContainer) ProtoMessage() {} +func (*CustomContainer) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{45} } + +type CustomNameNidOptNative struct { + FieldA float64 `protobuf:"fixed64,1,opt,name=Field1,json=field1" json:"Field1"` + FieldB float32 `protobuf:"fixed32,2,opt,name=Field2,json=field2" json:"Field2"` + FieldC int32 `protobuf:"varint,3,opt,name=Field3,json=field3" json:"Field3"` + FieldD int64 `protobuf:"varint,4,opt,name=Field4,json=field4" json:"Field4"` + FieldE uint32 `protobuf:"varint,5,opt,name=Field5,json=field5" json:"Field5"` + FieldF uint64 `protobuf:"varint,6,opt,name=Field6,json=field6" json:"Field6"` + FieldG int32 `protobuf:"zigzag32,7,opt,name=Field7,json=field7" json:"Field7"` + FieldH int64 `protobuf:"zigzag64,8,opt,name=Field8,json=field8" json:"Field8"` + FieldI uint32 `protobuf:"fixed32,9,opt,name=Field9,json=field9" json:"Field9"` + FieldJ int32 `protobuf:"fixed32,10,opt,name=Field10,json=field10" json:"Field10"` + FieldK uint64 `protobuf:"fixed64,11,opt,name=Field11,json=field11" json:"Field11"` + FieldL int64 `protobuf:"fixed64,12,opt,name=Field12,json=field12" json:"Field12"` + FieldM bool `protobuf:"varint,13,opt,name=Field13,json=field13" json:"Field13"` + FieldN string `protobuf:"bytes,14,opt,name=Field14,json=field14" json:"Field14"` + FieldO []byte `protobuf:"bytes,15,opt,name=Field15,json=field15" json:"Field15"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *CustomNameNidOptNative) Reset() { *m = CustomNameNidOptNative{} } +func (*CustomNameNidOptNative) ProtoMessage() {} +func (*CustomNameNidOptNative) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{46} } + +type CustomNameNinOptNative struct { + FieldA *float64 `protobuf:"fixed64,1,opt,name=Field1,json=field1" json:"Field1,omitempty"` + FieldB *float32 `protobuf:"fixed32,2,opt,name=Field2,json=field2" json:"Field2,omitempty"` + FieldC *int32 `protobuf:"varint,3,opt,name=Field3,json=field3" json:"Field3,omitempty"` + FieldD *int64 `protobuf:"varint,4,opt,name=Field4,json=field4" json:"Field4,omitempty"` + FieldE *uint32 `protobuf:"varint,5,opt,name=Field5,json=field5" json:"Field5,omitempty"` + FieldF *uint64 `protobuf:"varint,6,opt,name=Field6,json=field6" json:"Field6,omitempty"` + FieldG *int32 `protobuf:"zigzag32,7,opt,name=Field7,json=field7" json:"Field7,omitempty"` + FieldH *int64 `protobuf:"zigzag64,8,opt,name=Field8,json=field8" json:"Field8,omitempty"` + FieldI *uint32 `protobuf:"fixed32,9,opt,name=Field9,json=field9" json:"Field9,omitempty"` + FieldJ *int32 `protobuf:"fixed32,10,opt,name=Field10,json=field10" json:"Field10,omitempty"` + FieldK *uint64 `protobuf:"fixed64,11,opt,name=Field11,json=field11" json:"Field11,omitempty"` + FielL *int64 `protobuf:"fixed64,12,opt,name=Field12,json=field12" json:"Field12,omitempty"` + FieldM *bool `protobuf:"varint,13,opt,name=Field13,json=field13" json:"Field13,omitempty"` + FieldN *string `protobuf:"bytes,14,opt,name=Field14,json=field14" json:"Field14,omitempty"` + FieldO []byte `protobuf:"bytes,15,opt,name=Field15,json=field15" json:"Field15,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *CustomNameNinOptNative) Reset() { *m = CustomNameNinOptNative{} } +func (*CustomNameNinOptNative) ProtoMessage() {} +func (*CustomNameNinOptNative) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{47} } + +type CustomNameNinRepNative struct { + FieldA []float64 `protobuf:"fixed64,1,rep,name=Field1,json=field1" json:"Field1,omitempty"` + FieldB []float32 `protobuf:"fixed32,2,rep,name=Field2,json=field2" json:"Field2,omitempty"` + FieldC []int32 `protobuf:"varint,3,rep,name=Field3,json=field3" json:"Field3,omitempty"` + FieldD []int64 `protobuf:"varint,4,rep,name=Field4,json=field4" json:"Field4,omitempty"` + FieldE []uint32 `protobuf:"varint,5,rep,name=Field5,json=field5" json:"Field5,omitempty"` + FieldF []uint64 `protobuf:"varint,6,rep,name=Field6,json=field6" json:"Field6,omitempty"` + FieldG []int32 `protobuf:"zigzag32,7,rep,name=Field7,json=field7" json:"Field7,omitempty"` + FieldH []int64 `protobuf:"zigzag64,8,rep,name=Field8,json=field8" json:"Field8,omitempty"` + FieldI []uint32 `protobuf:"fixed32,9,rep,name=Field9,json=field9" json:"Field9,omitempty"` + FieldJ []int32 `protobuf:"fixed32,10,rep,name=Field10,json=field10" json:"Field10,omitempty"` + FieldK []uint64 `protobuf:"fixed64,11,rep,name=Field11,json=field11" json:"Field11,omitempty"` + FieldL []int64 `protobuf:"fixed64,12,rep,name=Field12,json=field12" json:"Field12,omitempty"` + FieldM []bool `protobuf:"varint,13,rep,name=Field13,json=field13" json:"Field13,omitempty"` + FieldN []string `protobuf:"bytes,14,rep,name=Field14,json=field14" json:"Field14,omitempty"` + FieldO [][]byte `protobuf:"bytes,15,rep,name=Field15,json=field15" json:"Field15,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *CustomNameNinRepNative) Reset() { *m = CustomNameNinRepNative{} } +func (*CustomNameNinRepNative) ProtoMessage() {} +func (*CustomNameNinRepNative) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{48} } + +type CustomNameNinStruct struct { + FieldA *float64 `protobuf:"fixed64,1,opt,name=Field1,json=field1" json:"Field1,omitempty"` + FieldB *float32 `protobuf:"fixed32,2,opt,name=Field2,json=field2" json:"Field2,omitempty"` + FieldC *NidOptNative `protobuf:"bytes,3,opt,name=Field3,json=field3" json:"Field3,omitempty"` + FieldD []*NinOptNative `protobuf:"bytes,4,rep,name=Field4,json=field4" json:"Field4,omitempty"` + FieldE *uint64 `protobuf:"varint,6,opt,name=Field6,json=field6" json:"Field6,omitempty"` + FieldF *int32 `protobuf:"zigzag32,7,opt,name=Field7,json=field7" json:"Field7,omitempty"` + FieldG *NidOptNative `protobuf:"bytes,8,opt,name=Field8,json=field8" json:"Field8,omitempty"` + FieldH *bool `protobuf:"varint,13,opt,name=Field13,json=field13" json:"Field13,omitempty"` + FieldI *string `protobuf:"bytes,14,opt,name=Field14,json=field14" json:"Field14,omitempty"` + FieldJ []byte `protobuf:"bytes,15,opt,name=Field15,json=field15" json:"Field15,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *CustomNameNinStruct) Reset() { *m = CustomNameNinStruct{} } +func (*CustomNameNinStruct) ProtoMessage() {} +func (*CustomNameNinStruct) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{49} } + +type CustomNameCustomType struct { + FieldA *Uuid `protobuf:"bytes,1,opt,name=Id,json=id,customtype=Uuid" json:"Id,omitempty"` + FieldB *github_com_gogo_protobuf_test_custom.Uint128 `protobuf:"bytes,2,opt,name=Value,json=value,customtype=github.com/gogo/protobuf/test/custom.Uint128" json:"Value,omitempty"` + FieldC []Uuid `protobuf:"bytes,3,rep,name=Ids,json=ids,customtype=Uuid" json:"Ids,omitempty"` + FieldD []github_com_gogo_protobuf_test_custom.Uint128 `protobuf:"bytes,4,rep,name=Values,json=values,customtype=github.com/gogo/protobuf/test/custom.Uint128" json:"Values,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *CustomNameCustomType) Reset() { *m = CustomNameCustomType{} } +func (*CustomNameCustomType) ProtoMessage() {} +func (*CustomNameCustomType) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{50} } + +type CustomNameNinEmbeddedStructUnion struct { + *NidOptNative `protobuf:"bytes,1,opt,name=Field1,json=field1,embedded=Field1" json:"Field1,omitempty"` + FieldA *NinOptNative `protobuf:"bytes,200,opt,name=Field200,json=field200" json:"Field200,omitempty"` + FieldB *bool `protobuf:"varint,210,opt,name=Field210,json=field210" json:"Field210,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *CustomNameNinEmbeddedStructUnion) Reset() { *m = CustomNameNinEmbeddedStructUnion{} } +func (*CustomNameNinEmbeddedStructUnion) ProtoMessage() {} +func (*CustomNameNinEmbeddedStructUnion) Descriptor() ([]byte, []int) { + return fileDescriptorThetest, []int{51} +} + +type CustomNameEnum struct { + FieldA *TheTestEnum `protobuf:"varint,1,opt,name=Field1,json=field1,enum=test.TheTestEnum" json:"Field1,omitempty"` + FieldB []TheTestEnum `protobuf:"varint,2,rep,name=Field2,json=field2,enum=test.TheTestEnum" json:"Field2,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *CustomNameEnum) Reset() { *m = CustomNameEnum{} } +func (*CustomNameEnum) ProtoMessage() {} +func (*CustomNameEnum) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{52} } + +type NoExtensionsMap struct { + Field1 *int64 `protobuf:"varint,1,opt,name=Field1,json=field1" json:"Field1,omitempty"` + XXX_extensions []byte `protobuf:"bytes,0,opt" json:"-"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *NoExtensionsMap) Reset() { *m = NoExtensionsMap{} } +func (*NoExtensionsMap) ProtoMessage() {} +func (*NoExtensionsMap) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{53} } + +var extRange_NoExtensionsMap = []proto.ExtensionRange{ + {100, 199}, +} + +func (*NoExtensionsMap) ExtensionRangeArray() []proto.ExtensionRange { + return extRange_NoExtensionsMap +} +func (m *NoExtensionsMap) GetExtensions() *[]byte { + if m.XXX_extensions == nil { + m.XXX_extensions = make([]byte, 0) + } + return &m.XXX_extensions +} + +type Unrecognized struct { + Field1 *string `protobuf:"bytes,1,opt,name=Field1,json=field1" json:"Field1,omitempty"` +} + +func (m *Unrecognized) Reset() { *m = Unrecognized{} } +func (*Unrecognized) ProtoMessage() {} +func (*Unrecognized) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{54} } + +type UnrecognizedWithInner struct { + Embedded []*UnrecognizedWithInner_Inner `protobuf:"bytes,1,rep,name=embedded" json:"embedded,omitempty"` + Field2 *string `protobuf:"bytes,2,opt,name=Field2,json=field2" json:"Field2,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *UnrecognizedWithInner) Reset() { *m = UnrecognizedWithInner{} } +func (*UnrecognizedWithInner) ProtoMessage() {} +func (*UnrecognizedWithInner) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{55} } + +type UnrecognizedWithInner_Inner struct { + Field1 *uint32 `protobuf:"varint,1,opt,name=Field1,json=field1" json:"Field1,omitempty"` +} + +func (m *UnrecognizedWithInner_Inner) Reset() { *m = UnrecognizedWithInner_Inner{} } +func (*UnrecognizedWithInner_Inner) ProtoMessage() {} +func (*UnrecognizedWithInner_Inner) Descriptor() ([]byte, []int) { + return fileDescriptorThetest, []int{55, 0} +} + +type UnrecognizedWithEmbed struct { + UnrecognizedWithEmbed_Embedded `protobuf:"bytes,1,opt,name=embedded,embedded=embedded" json:"embedded"` + Field2 *string `protobuf:"bytes,2,opt,name=Field2,json=field2" json:"Field2,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *UnrecognizedWithEmbed) Reset() { *m = UnrecognizedWithEmbed{} } +func (*UnrecognizedWithEmbed) ProtoMessage() {} +func (*UnrecognizedWithEmbed) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{56} } + +type UnrecognizedWithEmbed_Embedded struct { + Field1 *uint32 `protobuf:"varint,1,opt,name=Field1,json=field1" json:"Field1,omitempty"` +} + +func (m *UnrecognizedWithEmbed_Embedded) Reset() { *m = UnrecognizedWithEmbed_Embedded{} } +func (*UnrecognizedWithEmbed_Embedded) ProtoMessage() {} +func (*UnrecognizedWithEmbed_Embedded) Descriptor() ([]byte, []int) { + return fileDescriptorThetest, []int{56, 0} +} + +type Node struct { + Label *string `protobuf:"bytes,1,opt,name=Label,json=label" json:"Label,omitempty"` + Children []*Node `protobuf:"bytes,2,rep,name=Children,json=children" json:"Children,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *Node) Reset() { *m = Node{} } +func (*Node) ProtoMessage() {} +func (*Node) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{57} } + +var E_FieldA = &proto.ExtensionDesc{ + ExtendedType: (*MyExtendable)(nil), + ExtensionType: (*float64)(nil), + Field: 100, + Name: "test.FieldA", + Tag: "fixed64,100,opt,name=FieldA,json=fieldA", +} + +var E_FieldB = &proto.ExtensionDesc{ + ExtendedType: (*MyExtendable)(nil), + ExtensionType: (*NinOptNative)(nil), + Field: 101, + Name: "test.FieldB", + Tag: "bytes,101,opt,name=FieldB,json=fieldB", +} + +var E_FieldC = &proto.ExtensionDesc{ + ExtendedType: (*MyExtendable)(nil), + ExtensionType: (*NinEmbeddedStruct)(nil), + Field: 102, + Name: "test.FieldC", + Tag: "bytes,102,opt,name=FieldC,json=fieldC", +} + +var E_FieldD = &proto.ExtensionDesc{ + ExtendedType: (*MyExtendable)(nil), + ExtensionType: ([]int64)(nil), + Field: 104, + Name: "test.FieldD", + Tag: "varint,104,rep,name=FieldD,json=fieldD", +} + +var E_FieldE = &proto.ExtensionDesc{ + ExtendedType: (*MyExtendable)(nil), + ExtensionType: ([]*NinOptNative)(nil), + Field: 105, + Name: "test.FieldE", + Tag: "bytes,105,rep,name=FieldE,json=fieldE", +} + +var E_FieldA1 = &proto.ExtensionDesc{ + ExtendedType: (*NoExtensionsMap)(nil), + ExtensionType: (*float64)(nil), + Field: 100, + Name: "test.FieldA1", + Tag: "fixed64,100,opt,name=FieldA1,json=fieldA1", +} + +var E_FieldB1 = &proto.ExtensionDesc{ + ExtendedType: (*NoExtensionsMap)(nil), + ExtensionType: (*NinOptNative)(nil), + Field: 101, + Name: "test.FieldB1", + Tag: "bytes,101,opt,name=FieldB1,json=fieldB1", +} + +var E_FieldC1 = &proto.ExtensionDesc{ + ExtendedType: (*NoExtensionsMap)(nil), + ExtensionType: (*NinEmbeddedStruct)(nil), + Field: 102, + Name: "test.FieldC1", + Tag: "bytes,102,opt,name=FieldC1,json=fieldC1", +} + +func init() { + proto.RegisterType((*NidOptNative)(nil), "test.NidOptNative") + proto.RegisterType((*NinOptNative)(nil), "test.NinOptNative") + proto.RegisterType((*NidRepNative)(nil), "test.NidRepNative") + proto.RegisterType((*NinRepNative)(nil), "test.NinRepNative") + proto.RegisterType((*NidRepPackedNative)(nil), "test.NidRepPackedNative") + proto.RegisterType((*NinRepPackedNative)(nil), "test.NinRepPackedNative") + proto.RegisterType((*NidOptStruct)(nil), "test.NidOptStruct") + proto.RegisterType((*NinOptStruct)(nil), "test.NinOptStruct") + proto.RegisterType((*NidRepStruct)(nil), "test.NidRepStruct") + proto.RegisterType((*NinRepStruct)(nil), "test.NinRepStruct") + proto.RegisterType((*NidEmbeddedStruct)(nil), "test.NidEmbeddedStruct") + proto.RegisterType((*NinEmbeddedStruct)(nil), "test.NinEmbeddedStruct") + proto.RegisterType((*NidNestedStruct)(nil), "test.NidNestedStruct") + proto.RegisterType((*NinNestedStruct)(nil), "test.NinNestedStruct") + proto.RegisterType((*NidOptCustom)(nil), "test.NidOptCustom") + proto.RegisterType((*CustomDash)(nil), "test.CustomDash") + proto.RegisterType((*NinOptCustom)(nil), "test.NinOptCustom") + proto.RegisterType((*NidRepCustom)(nil), "test.NidRepCustom") + proto.RegisterType((*NinRepCustom)(nil), "test.NinRepCustom") + proto.RegisterType((*NinOptNativeUnion)(nil), "test.NinOptNativeUnion") + proto.RegisterType((*NinOptStructUnion)(nil), "test.NinOptStructUnion") + proto.RegisterType((*NinEmbeddedStructUnion)(nil), "test.NinEmbeddedStructUnion") + proto.RegisterType((*NinNestedStructUnion)(nil), "test.NinNestedStructUnion") + proto.RegisterType((*Tree)(nil), "test.Tree") + proto.RegisterType((*OrBranch)(nil), "test.OrBranch") + proto.RegisterType((*AndBranch)(nil), "test.AndBranch") + proto.RegisterType((*Leaf)(nil), "test.Leaf") + proto.RegisterType((*DeepTree)(nil), "test.DeepTree") + proto.RegisterType((*ADeepBranch)(nil), "test.ADeepBranch") + proto.RegisterType((*AndDeepBranch)(nil), "test.AndDeepBranch") + proto.RegisterType((*DeepLeaf)(nil), "test.DeepLeaf") + proto.RegisterType((*Nil)(nil), "test.Nil") + proto.RegisterType((*NidOptEnum)(nil), "test.NidOptEnum") + proto.RegisterType((*NinOptEnum)(nil), "test.NinOptEnum") + proto.RegisterType((*NidRepEnum)(nil), "test.NidRepEnum") + proto.RegisterType((*NinRepEnum)(nil), "test.NinRepEnum") + proto.RegisterType((*NinOptEnumDefault)(nil), "test.NinOptEnumDefault") + proto.RegisterType((*AnotherNinOptEnum)(nil), "test.AnotherNinOptEnum") + proto.RegisterType((*AnotherNinOptEnumDefault)(nil), "test.AnotherNinOptEnumDefault") + proto.RegisterType((*Timer)(nil), "test.Timer") + proto.RegisterType((*MyExtendable)(nil), "test.MyExtendable") + proto.RegisterType((*OtherExtenable)(nil), "test.OtherExtenable") + proto.RegisterType((*NestedDefinition)(nil), "test.NestedDefinition") + proto.RegisterType((*NestedDefinition_NestedMessage)(nil), "test.NestedDefinition.NestedMessage") + proto.RegisterType((*NestedDefinition_NestedMessage_NestedNestedMsg)(nil), "test.NestedDefinition.NestedMessage.NestedNestedMsg") + proto.RegisterType((*NestedScope)(nil), "test.NestedScope") + proto.RegisterType((*NinOptNativeDefault)(nil), "test.NinOptNativeDefault") + proto.RegisterType((*CustomContainer)(nil), "test.CustomContainer") + proto.RegisterType((*CustomNameNidOptNative)(nil), "test.CustomNameNidOptNative") + proto.RegisterType((*CustomNameNinOptNative)(nil), "test.CustomNameNinOptNative") + proto.RegisterType((*CustomNameNinRepNative)(nil), "test.CustomNameNinRepNative") + proto.RegisterType((*CustomNameNinStruct)(nil), "test.CustomNameNinStruct") + proto.RegisterType((*CustomNameCustomType)(nil), "test.CustomNameCustomType") + proto.RegisterType((*CustomNameNinEmbeddedStructUnion)(nil), "test.CustomNameNinEmbeddedStructUnion") + proto.RegisterType((*CustomNameEnum)(nil), "test.CustomNameEnum") + proto.RegisterType((*NoExtensionsMap)(nil), "test.NoExtensionsMap") + proto.RegisterType((*Unrecognized)(nil), "test.Unrecognized") + proto.RegisterType((*UnrecognizedWithInner)(nil), "test.UnrecognizedWithInner") + proto.RegisterType((*UnrecognizedWithInner_Inner)(nil), "test.UnrecognizedWithInner.Inner") + proto.RegisterType((*UnrecognizedWithEmbed)(nil), "test.UnrecognizedWithEmbed") + proto.RegisterType((*UnrecognizedWithEmbed_Embedded)(nil), "test.UnrecognizedWithEmbed.Embedded") + proto.RegisterType((*Node)(nil), "test.Node") + proto.RegisterEnum("test.TheTestEnum", TheTestEnum_name, TheTestEnum_value) + proto.RegisterEnum("test.AnotherTestEnum", AnotherTestEnum_name, AnotherTestEnum_value) + proto.RegisterEnum("test.YetAnotherTestEnum", YetAnotherTestEnum_name, YetAnotherTestEnum_value) + proto.RegisterEnum("test.YetYetAnotherTestEnum", YetYetAnotherTestEnum_name, YetYetAnotherTestEnum_value) + proto.RegisterEnum("test.NestedDefinition_NestedEnum", NestedDefinition_NestedEnum_name, NestedDefinition_NestedEnum_value) + proto.RegisterExtension(E_FieldA) + proto.RegisterExtension(E_FieldB) + proto.RegisterExtension(E_FieldC) + proto.RegisterExtension(E_FieldD) + proto.RegisterExtension(E_FieldE) + proto.RegisterExtension(E_FieldA1) + proto.RegisterExtension(E_FieldB1) + proto.RegisterExtension(E_FieldC1) +} +func (this *NidOptNative) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NidOptNative) + if !ok { + that2, ok := that.(NidOptNative) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.Field1 != that1.Field1 { + if this.Field1 < that1.Field1 { + return -1 + } + return 1 + } + if this.Field2 != that1.Field2 { + if this.Field2 < that1.Field2 { + return -1 + } + return 1 + } + if this.Field3 != that1.Field3 { + if this.Field3 < that1.Field3 { + return -1 + } + return 1 + } + if this.Field4 != that1.Field4 { + if this.Field4 < that1.Field4 { + return -1 + } + return 1 + } + if this.Field5 != that1.Field5 { + if this.Field5 < that1.Field5 { + return -1 + } + return 1 + } + if this.Field6 != that1.Field6 { + if this.Field6 < that1.Field6 { + return -1 + } + return 1 + } + if this.Field7 != that1.Field7 { + if this.Field7 < that1.Field7 { + return -1 + } + return 1 + } + if this.Field8 != that1.Field8 { + if this.Field8 < that1.Field8 { + return -1 + } + return 1 + } + if this.Field9 != that1.Field9 { + if this.Field9 < that1.Field9 { + return -1 + } + return 1 + } + if this.Field10 != that1.Field10 { + if this.Field10 < that1.Field10 { + return -1 + } + return 1 + } + if this.Field11 != that1.Field11 { + if this.Field11 < that1.Field11 { + return -1 + } + return 1 + } + if this.Field12 != that1.Field12 { + if this.Field12 < that1.Field12 { + return -1 + } + return 1 + } + if this.Field13 != that1.Field13 { + if !this.Field13 { + return -1 + } + return 1 + } + if this.Field14 != that1.Field14 { + if this.Field14 < that1.Field14 { + return -1 + } + return 1 + } + if c := bytes.Compare(this.Field15, that1.Field15); c != 0 { + return c + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NinOptNative) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NinOptNative) + if !ok { + that2, ok := that.(NinOptNative) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + if *this.Field1 < *that1.Field1 { + return -1 + } + return 1 + } + } else if this.Field1 != nil { + return 1 + } else if that1.Field1 != nil { + return -1 + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + if *this.Field2 < *that1.Field2 { + return -1 + } + return 1 + } + } else if this.Field2 != nil { + return 1 + } else if that1.Field2 != nil { + return -1 + } + if this.Field3 != nil && that1.Field3 != nil { + if *this.Field3 != *that1.Field3 { + if *this.Field3 < *that1.Field3 { + return -1 + } + return 1 + } + } else if this.Field3 != nil { + return 1 + } else if that1.Field3 != nil { + return -1 + } + if this.Field4 != nil && that1.Field4 != nil { + if *this.Field4 != *that1.Field4 { + if *this.Field4 < *that1.Field4 { + return -1 + } + return 1 + } + } else if this.Field4 != nil { + return 1 + } else if that1.Field4 != nil { + return -1 + } + if this.Field5 != nil && that1.Field5 != nil { + if *this.Field5 != *that1.Field5 { + if *this.Field5 < *that1.Field5 { + return -1 + } + return 1 + } + } else if this.Field5 != nil { + return 1 + } else if that1.Field5 != nil { + return -1 + } + if this.Field6 != nil && that1.Field6 != nil { + if *this.Field6 != *that1.Field6 { + if *this.Field6 < *that1.Field6 { + return -1 + } + return 1 + } + } else if this.Field6 != nil { + return 1 + } else if that1.Field6 != nil { + return -1 + } + if this.Field7 != nil && that1.Field7 != nil { + if *this.Field7 != *that1.Field7 { + if *this.Field7 < *that1.Field7 { + return -1 + } + return 1 + } + } else if this.Field7 != nil { + return 1 + } else if that1.Field7 != nil { + return -1 + } + if this.Field8 != nil && that1.Field8 != nil { + if *this.Field8 != *that1.Field8 { + if *this.Field8 < *that1.Field8 { + return -1 + } + return 1 + } + } else if this.Field8 != nil { + return 1 + } else if that1.Field8 != nil { + return -1 + } + if this.Field9 != nil && that1.Field9 != nil { + if *this.Field9 != *that1.Field9 { + if *this.Field9 < *that1.Field9 { + return -1 + } + return 1 + } + } else if this.Field9 != nil { + return 1 + } else if that1.Field9 != nil { + return -1 + } + if this.Field10 != nil && that1.Field10 != nil { + if *this.Field10 != *that1.Field10 { + if *this.Field10 < *that1.Field10 { + return -1 + } + return 1 + } + } else if this.Field10 != nil { + return 1 + } else if that1.Field10 != nil { + return -1 + } + if this.Field11 != nil && that1.Field11 != nil { + if *this.Field11 != *that1.Field11 { + if *this.Field11 < *that1.Field11 { + return -1 + } + return 1 + } + } else if this.Field11 != nil { + return 1 + } else if that1.Field11 != nil { + return -1 + } + if this.Field12 != nil && that1.Field12 != nil { + if *this.Field12 != *that1.Field12 { + if *this.Field12 < *that1.Field12 { + return -1 + } + return 1 + } + } else if this.Field12 != nil { + return 1 + } else if that1.Field12 != nil { + return -1 + } + if this.Field13 != nil && that1.Field13 != nil { + if *this.Field13 != *that1.Field13 { + if !*this.Field13 { + return -1 + } + return 1 + } + } else if this.Field13 != nil { + return 1 + } else if that1.Field13 != nil { + return -1 + } + if this.Field14 != nil && that1.Field14 != nil { + if *this.Field14 != *that1.Field14 { + if *this.Field14 < *that1.Field14 { + return -1 + } + return 1 + } + } else if this.Field14 != nil { + return 1 + } else if that1.Field14 != nil { + return -1 + } + if c := bytes.Compare(this.Field15, that1.Field15); c != 0 { + return c + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NidRepNative) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NidRepNative) + if !ok { + that2, ok := that.(NidRepNative) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if len(this.Field1) != len(that1.Field1) { + if len(this.Field1) < len(that1.Field1) { + return -1 + } + return 1 + } + for i := range this.Field1 { + if this.Field1[i] != that1.Field1[i] { + if this.Field1[i] < that1.Field1[i] { + return -1 + } + return 1 + } + } + if len(this.Field2) != len(that1.Field2) { + if len(this.Field2) < len(that1.Field2) { + return -1 + } + return 1 + } + for i := range this.Field2 { + if this.Field2[i] != that1.Field2[i] { + if this.Field2[i] < that1.Field2[i] { + return -1 + } + return 1 + } + } + if len(this.Field3) != len(that1.Field3) { + if len(this.Field3) < len(that1.Field3) { + return -1 + } + return 1 + } + for i := range this.Field3 { + if this.Field3[i] != that1.Field3[i] { + if this.Field3[i] < that1.Field3[i] { + return -1 + } + return 1 + } + } + if len(this.Field4) != len(that1.Field4) { + if len(this.Field4) < len(that1.Field4) { + return -1 + } + return 1 + } + for i := range this.Field4 { + if this.Field4[i] != that1.Field4[i] { + if this.Field4[i] < that1.Field4[i] { + return -1 + } + return 1 + } + } + if len(this.Field5) != len(that1.Field5) { + if len(this.Field5) < len(that1.Field5) { + return -1 + } + return 1 + } + for i := range this.Field5 { + if this.Field5[i] != that1.Field5[i] { + if this.Field5[i] < that1.Field5[i] { + return -1 + } + return 1 + } + } + if len(this.Field6) != len(that1.Field6) { + if len(this.Field6) < len(that1.Field6) { + return -1 + } + return 1 + } + for i := range this.Field6 { + if this.Field6[i] != that1.Field6[i] { + if this.Field6[i] < that1.Field6[i] { + return -1 + } + return 1 + } + } + if len(this.Field7) != len(that1.Field7) { + if len(this.Field7) < len(that1.Field7) { + return -1 + } + return 1 + } + for i := range this.Field7 { + if this.Field7[i] != that1.Field7[i] { + if this.Field7[i] < that1.Field7[i] { + return -1 + } + return 1 + } + } + if len(this.Field8) != len(that1.Field8) { + if len(this.Field8) < len(that1.Field8) { + return -1 + } + return 1 + } + for i := range this.Field8 { + if this.Field8[i] != that1.Field8[i] { + if this.Field8[i] < that1.Field8[i] { + return -1 + } + return 1 + } + } + if len(this.Field9) != len(that1.Field9) { + if len(this.Field9) < len(that1.Field9) { + return -1 + } + return 1 + } + for i := range this.Field9 { + if this.Field9[i] != that1.Field9[i] { + if this.Field9[i] < that1.Field9[i] { + return -1 + } + return 1 + } + } + if len(this.Field10) != len(that1.Field10) { + if len(this.Field10) < len(that1.Field10) { + return -1 + } + return 1 + } + for i := range this.Field10 { + if this.Field10[i] != that1.Field10[i] { + if this.Field10[i] < that1.Field10[i] { + return -1 + } + return 1 + } + } + if len(this.Field11) != len(that1.Field11) { + if len(this.Field11) < len(that1.Field11) { + return -1 + } + return 1 + } + for i := range this.Field11 { + if this.Field11[i] != that1.Field11[i] { + if this.Field11[i] < that1.Field11[i] { + return -1 + } + return 1 + } + } + if len(this.Field12) != len(that1.Field12) { + if len(this.Field12) < len(that1.Field12) { + return -1 + } + return 1 + } + for i := range this.Field12 { + if this.Field12[i] != that1.Field12[i] { + if this.Field12[i] < that1.Field12[i] { + return -1 + } + return 1 + } + } + if len(this.Field13) != len(that1.Field13) { + if len(this.Field13) < len(that1.Field13) { + return -1 + } + return 1 + } + for i := range this.Field13 { + if this.Field13[i] != that1.Field13[i] { + if !this.Field13[i] { + return -1 + } + return 1 + } + } + if len(this.Field14) != len(that1.Field14) { + if len(this.Field14) < len(that1.Field14) { + return -1 + } + return 1 + } + for i := range this.Field14 { + if this.Field14[i] != that1.Field14[i] { + if this.Field14[i] < that1.Field14[i] { + return -1 + } + return 1 + } + } + if len(this.Field15) != len(that1.Field15) { + if len(this.Field15) < len(that1.Field15) { + return -1 + } + return 1 + } + for i := range this.Field15 { + if c := bytes.Compare(this.Field15[i], that1.Field15[i]); c != 0 { + return c + } + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NinRepNative) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NinRepNative) + if !ok { + that2, ok := that.(NinRepNative) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if len(this.Field1) != len(that1.Field1) { + if len(this.Field1) < len(that1.Field1) { + return -1 + } + return 1 + } + for i := range this.Field1 { + if this.Field1[i] != that1.Field1[i] { + if this.Field1[i] < that1.Field1[i] { + return -1 + } + return 1 + } + } + if len(this.Field2) != len(that1.Field2) { + if len(this.Field2) < len(that1.Field2) { + return -1 + } + return 1 + } + for i := range this.Field2 { + if this.Field2[i] != that1.Field2[i] { + if this.Field2[i] < that1.Field2[i] { + return -1 + } + return 1 + } + } + if len(this.Field3) != len(that1.Field3) { + if len(this.Field3) < len(that1.Field3) { + return -1 + } + return 1 + } + for i := range this.Field3 { + if this.Field3[i] != that1.Field3[i] { + if this.Field3[i] < that1.Field3[i] { + return -1 + } + return 1 + } + } + if len(this.Field4) != len(that1.Field4) { + if len(this.Field4) < len(that1.Field4) { + return -1 + } + return 1 + } + for i := range this.Field4 { + if this.Field4[i] != that1.Field4[i] { + if this.Field4[i] < that1.Field4[i] { + return -1 + } + return 1 + } + } + if len(this.Field5) != len(that1.Field5) { + if len(this.Field5) < len(that1.Field5) { + return -1 + } + return 1 + } + for i := range this.Field5 { + if this.Field5[i] != that1.Field5[i] { + if this.Field5[i] < that1.Field5[i] { + return -1 + } + return 1 + } + } + if len(this.Field6) != len(that1.Field6) { + if len(this.Field6) < len(that1.Field6) { + return -1 + } + return 1 + } + for i := range this.Field6 { + if this.Field6[i] != that1.Field6[i] { + if this.Field6[i] < that1.Field6[i] { + return -1 + } + return 1 + } + } + if len(this.Field7) != len(that1.Field7) { + if len(this.Field7) < len(that1.Field7) { + return -1 + } + return 1 + } + for i := range this.Field7 { + if this.Field7[i] != that1.Field7[i] { + if this.Field7[i] < that1.Field7[i] { + return -1 + } + return 1 + } + } + if len(this.Field8) != len(that1.Field8) { + if len(this.Field8) < len(that1.Field8) { + return -1 + } + return 1 + } + for i := range this.Field8 { + if this.Field8[i] != that1.Field8[i] { + if this.Field8[i] < that1.Field8[i] { + return -1 + } + return 1 + } + } + if len(this.Field9) != len(that1.Field9) { + if len(this.Field9) < len(that1.Field9) { + return -1 + } + return 1 + } + for i := range this.Field9 { + if this.Field9[i] != that1.Field9[i] { + if this.Field9[i] < that1.Field9[i] { + return -1 + } + return 1 + } + } + if len(this.Field10) != len(that1.Field10) { + if len(this.Field10) < len(that1.Field10) { + return -1 + } + return 1 + } + for i := range this.Field10 { + if this.Field10[i] != that1.Field10[i] { + if this.Field10[i] < that1.Field10[i] { + return -1 + } + return 1 + } + } + if len(this.Field11) != len(that1.Field11) { + if len(this.Field11) < len(that1.Field11) { + return -1 + } + return 1 + } + for i := range this.Field11 { + if this.Field11[i] != that1.Field11[i] { + if this.Field11[i] < that1.Field11[i] { + return -1 + } + return 1 + } + } + if len(this.Field12) != len(that1.Field12) { + if len(this.Field12) < len(that1.Field12) { + return -1 + } + return 1 + } + for i := range this.Field12 { + if this.Field12[i] != that1.Field12[i] { + if this.Field12[i] < that1.Field12[i] { + return -1 + } + return 1 + } + } + if len(this.Field13) != len(that1.Field13) { + if len(this.Field13) < len(that1.Field13) { + return -1 + } + return 1 + } + for i := range this.Field13 { + if this.Field13[i] != that1.Field13[i] { + if !this.Field13[i] { + return -1 + } + return 1 + } + } + if len(this.Field14) != len(that1.Field14) { + if len(this.Field14) < len(that1.Field14) { + return -1 + } + return 1 + } + for i := range this.Field14 { + if this.Field14[i] != that1.Field14[i] { + if this.Field14[i] < that1.Field14[i] { + return -1 + } + return 1 + } + } + if len(this.Field15) != len(that1.Field15) { + if len(this.Field15) < len(that1.Field15) { + return -1 + } + return 1 + } + for i := range this.Field15 { + if c := bytes.Compare(this.Field15[i], that1.Field15[i]); c != 0 { + return c + } + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NidRepPackedNative) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NidRepPackedNative) + if !ok { + that2, ok := that.(NidRepPackedNative) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if len(this.Field1) != len(that1.Field1) { + if len(this.Field1) < len(that1.Field1) { + return -1 + } + return 1 + } + for i := range this.Field1 { + if this.Field1[i] != that1.Field1[i] { + if this.Field1[i] < that1.Field1[i] { + return -1 + } + return 1 + } + } + if len(this.Field2) != len(that1.Field2) { + if len(this.Field2) < len(that1.Field2) { + return -1 + } + return 1 + } + for i := range this.Field2 { + if this.Field2[i] != that1.Field2[i] { + if this.Field2[i] < that1.Field2[i] { + return -1 + } + return 1 + } + } + if len(this.Field3) != len(that1.Field3) { + if len(this.Field3) < len(that1.Field3) { + return -1 + } + return 1 + } + for i := range this.Field3 { + if this.Field3[i] != that1.Field3[i] { + if this.Field3[i] < that1.Field3[i] { + return -1 + } + return 1 + } + } + if len(this.Field4) != len(that1.Field4) { + if len(this.Field4) < len(that1.Field4) { + return -1 + } + return 1 + } + for i := range this.Field4 { + if this.Field4[i] != that1.Field4[i] { + if this.Field4[i] < that1.Field4[i] { + return -1 + } + return 1 + } + } + if len(this.Field5) != len(that1.Field5) { + if len(this.Field5) < len(that1.Field5) { + return -1 + } + return 1 + } + for i := range this.Field5 { + if this.Field5[i] != that1.Field5[i] { + if this.Field5[i] < that1.Field5[i] { + return -1 + } + return 1 + } + } + if len(this.Field6) != len(that1.Field6) { + if len(this.Field6) < len(that1.Field6) { + return -1 + } + return 1 + } + for i := range this.Field6 { + if this.Field6[i] != that1.Field6[i] { + if this.Field6[i] < that1.Field6[i] { + return -1 + } + return 1 + } + } + if len(this.Field7) != len(that1.Field7) { + if len(this.Field7) < len(that1.Field7) { + return -1 + } + return 1 + } + for i := range this.Field7 { + if this.Field7[i] != that1.Field7[i] { + if this.Field7[i] < that1.Field7[i] { + return -1 + } + return 1 + } + } + if len(this.Field8) != len(that1.Field8) { + if len(this.Field8) < len(that1.Field8) { + return -1 + } + return 1 + } + for i := range this.Field8 { + if this.Field8[i] != that1.Field8[i] { + if this.Field8[i] < that1.Field8[i] { + return -1 + } + return 1 + } + } + if len(this.Field9) != len(that1.Field9) { + if len(this.Field9) < len(that1.Field9) { + return -1 + } + return 1 + } + for i := range this.Field9 { + if this.Field9[i] != that1.Field9[i] { + if this.Field9[i] < that1.Field9[i] { + return -1 + } + return 1 + } + } + if len(this.Field10) != len(that1.Field10) { + if len(this.Field10) < len(that1.Field10) { + return -1 + } + return 1 + } + for i := range this.Field10 { + if this.Field10[i] != that1.Field10[i] { + if this.Field10[i] < that1.Field10[i] { + return -1 + } + return 1 + } + } + if len(this.Field11) != len(that1.Field11) { + if len(this.Field11) < len(that1.Field11) { + return -1 + } + return 1 + } + for i := range this.Field11 { + if this.Field11[i] != that1.Field11[i] { + if this.Field11[i] < that1.Field11[i] { + return -1 + } + return 1 + } + } + if len(this.Field12) != len(that1.Field12) { + if len(this.Field12) < len(that1.Field12) { + return -1 + } + return 1 + } + for i := range this.Field12 { + if this.Field12[i] != that1.Field12[i] { + if this.Field12[i] < that1.Field12[i] { + return -1 + } + return 1 + } + } + if len(this.Field13) != len(that1.Field13) { + if len(this.Field13) < len(that1.Field13) { + return -1 + } + return 1 + } + for i := range this.Field13 { + if this.Field13[i] != that1.Field13[i] { + if !this.Field13[i] { + return -1 + } + return 1 + } + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NinRepPackedNative) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NinRepPackedNative) + if !ok { + that2, ok := that.(NinRepPackedNative) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if len(this.Field1) != len(that1.Field1) { + if len(this.Field1) < len(that1.Field1) { + return -1 + } + return 1 + } + for i := range this.Field1 { + if this.Field1[i] != that1.Field1[i] { + if this.Field1[i] < that1.Field1[i] { + return -1 + } + return 1 + } + } + if len(this.Field2) != len(that1.Field2) { + if len(this.Field2) < len(that1.Field2) { + return -1 + } + return 1 + } + for i := range this.Field2 { + if this.Field2[i] != that1.Field2[i] { + if this.Field2[i] < that1.Field2[i] { + return -1 + } + return 1 + } + } + if len(this.Field3) != len(that1.Field3) { + if len(this.Field3) < len(that1.Field3) { + return -1 + } + return 1 + } + for i := range this.Field3 { + if this.Field3[i] != that1.Field3[i] { + if this.Field3[i] < that1.Field3[i] { + return -1 + } + return 1 + } + } + if len(this.Field4) != len(that1.Field4) { + if len(this.Field4) < len(that1.Field4) { + return -1 + } + return 1 + } + for i := range this.Field4 { + if this.Field4[i] != that1.Field4[i] { + if this.Field4[i] < that1.Field4[i] { + return -1 + } + return 1 + } + } + if len(this.Field5) != len(that1.Field5) { + if len(this.Field5) < len(that1.Field5) { + return -1 + } + return 1 + } + for i := range this.Field5 { + if this.Field5[i] != that1.Field5[i] { + if this.Field5[i] < that1.Field5[i] { + return -1 + } + return 1 + } + } + if len(this.Field6) != len(that1.Field6) { + if len(this.Field6) < len(that1.Field6) { + return -1 + } + return 1 + } + for i := range this.Field6 { + if this.Field6[i] != that1.Field6[i] { + if this.Field6[i] < that1.Field6[i] { + return -1 + } + return 1 + } + } + if len(this.Field7) != len(that1.Field7) { + if len(this.Field7) < len(that1.Field7) { + return -1 + } + return 1 + } + for i := range this.Field7 { + if this.Field7[i] != that1.Field7[i] { + if this.Field7[i] < that1.Field7[i] { + return -1 + } + return 1 + } + } + if len(this.Field8) != len(that1.Field8) { + if len(this.Field8) < len(that1.Field8) { + return -1 + } + return 1 + } + for i := range this.Field8 { + if this.Field8[i] != that1.Field8[i] { + if this.Field8[i] < that1.Field8[i] { + return -1 + } + return 1 + } + } + if len(this.Field9) != len(that1.Field9) { + if len(this.Field9) < len(that1.Field9) { + return -1 + } + return 1 + } + for i := range this.Field9 { + if this.Field9[i] != that1.Field9[i] { + if this.Field9[i] < that1.Field9[i] { + return -1 + } + return 1 + } + } + if len(this.Field10) != len(that1.Field10) { + if len(this.Field10) < len(that1.Field10) { + return -1 + } + return 1 + } + for i := range this.Field10 { + if this.Field10[i] != that1.Field10[i] { + if this.Field10[i] < that1.Field10[i] { + return -1 + } + return 1 + } + } + if len(this.Field11) != len(that1.Field11) { + if len(this.Field11) < len(that1.Field11) { + return -1 + } + return 1 + } + for i := range this.Field11 { + if this.Field11[i] != that1.Field11[i] { + if this.Field11[i] < that1.Field11[i] { + return -1 + } + return 1 + } + } + if len(this.Field12) != len(that1.Field12) { + if len(this.Field12) < len(that1.Field12) { + return -1 + } + return 1 + } + for i := range this.Field12 { + if this.Field12[i] != that1.Field12[i] { + if this.Field12[i] < that1.Field12[i] { + return -1 + } + return 1 + } + } + if len(this.Field13) != len(that1.Field13) { + if len(this.Field13) < len(that1.Field13) { + return -1 + } + return 1 + } + for i := range this.Field13 { + if this.Field13[i] != that1.Field13[i] { + if !this.Field13[i] { + return -1 + } + return 1 + } + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NidOptStruct) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NidOptStruct) + if !ok { + that2, ok := that.(NidOptStruct) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.Field1 != that1.Field1 { + if this.Field1 < that1.Field1 { + return -1 + } + return 1 + } + if this.Field2 != that1.Field2 { + if this.Field2 < that1.Field2 { + return -1 + } + return 1 + } + if c := this.Field3.Compare(&that1.Field3); c != 0 { + return c + } + if c := this.Field4.Compare(&that1.Field4); c != 0 { + return c + } + if this.Field6 != that1.Field6 { + if this.Field6 < that1.Field6 { + return -1 + } + return 1 + } + if this.Field7 != that1.Field7 { + if this.Field7 < that1.Field7 { + return -1 + } + return 1 + } + if c := this.Field8.Compare(&that1.Field8); c != 0 { + return c + } + if this.Field13 != that1.Field13 { + if !this.Field13 { + return -1 + } + return 1 + } + if this.Field14 != that1.Field14 { + if this.Field14 < that1.Field14 { + return -1 + } + return 1 + } + if c := bytes.Compare(this.Field15, that1.Field15); c != 0 { + return c + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NinOptStruct) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NinOptStruct) + if !ok { + that2, ok := that.(NinOptStruct) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + if *this.Field1 < *that1.Field1 { + return -1 + } + return 1 + } + } else if this.Field1 != nil { + return 1 + } else if that1.Field1 != nil { + return -1 + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + if *this.Field2 < *that1.Field2 { + return -1 + } + return 1 + } + } else if this.Field2 != nil { + return 1 + } else if that1.Field2 != nil { + return -1 + } + if c := this.Field3.Compare(that1.Field3); c != 0 { + return c + } + if c := this.Field4.Compare(that1.Field4); c != 0 { + return c + } + if this.Field6 != nil && that1.Field6 != nil { + if *this.Field6 != *that1.Field6 { + if *this.Field6 < *that1.Field6 { + return -1 + } + return 1 + } + } else if this.Field6 != nil { + return 1 + } else if that1.Field6 != nil { + return -1 + } + if this.Field7 != nil && that1.Field7 != nil { + if *this.Field7 != *that1.Field7 { + if *this.Field7 < *that1.Field7 { + return -1 + } + return 1 + } + } else if this.Field7 != nil { + return 1 + } else if that1.Field7 != nil { + return -1 + } + if c := this.Field8.Compare(that1.Field8); c != 0 { + return c + } + if this.Field13 != nil && that1.Field13 != nil { + if *this.Field13 != *that1.Field13 { + if !*this.Field13 { + return -1 + } + return 1 + } + } else if this.Field13 != nil { + return 1 + } else if that1.Field13 != nil { + return -1 + } + if this.Field14 != nil && that1.Field14 != nil { + if *this.Field14 != *that1.Field14 { + if *this.Field14 < *that1.Field14 { + return -1 + } + return 1 + } + } else if this.Field14 != nil { + return 1 + } else if that1.Field14 != nil { + return -1 + } + if c := bytes.Compare(this.Field15, that1.Field15); c != 0 { + return c + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NidRepStruct) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NidRepStruct) + if !ok { + that2, ok := that.(NidRepStruct) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if len(this.Field1) != len(that1.Field1) { + if len(this.Field1) < len(that1.Field1) { + return -1 + } + return 1 + } + for i := range this.Field1 { + if this.Field1[i] != that1.Field1[i] { + if this.Field1[i] < that1.Field1[i] { + return -1 + } + return 1 + } + } + if len(this.Field2) != len(that1.Field2) { + if len(this.Field2) < len(that1.Field2) { + return -1 + } + return 1 + } + for i := range this.Field2 { + if this.Field2[i] != that1.Field2[i] { + if this.Field2[i] < that1.Field2[i] { + return -1 + } + return 1 + } + } + if len(this.Field3) != len(that1.Field3) { + if len(this.Field3) < len(that1.Field3) { + return -1 + } + return 1 + } + for i := range this.Field3 { + if c := this.Field3[i].Compare(&that1.Field3[i]); c != 0 { + return c + } + } + if len(this.Field4) != len(that1.Field4) { + if len(this.Field4) < len(that1.Field4) { + return -1 + } + return 1 + } + for i := range this.Field4 { + if c := this.Field4[i].Compare(&that1.Field4[i]); c != 0 { + return c + } + } + if len(this.Field6) != len(that1.Field6) { + if len(this.Field6) < len(that1.Field6) { + return -1 + } + return 1 + } + for i := range this.Field6 { + if this.Field6[i] != that1.Field6[i] { + if this.Field6[i] < that1.Field6[i] { + return -1 + } + return 1 + } + } + if len(this.Field7) != len(that1.Field7) { + if len(this.Field7) < len(that1.Field7) { + return -1 + } + return 1 + } + for i := range this.Field7 { + if this.Field7[i] != that1.Field7[i] { + if this.Field7[i] < that1.Field7[i] { + return -1 + } + return 1 + } + } + if len(this.Field8) != len(that1.Field8) { + if len(this.Field8) < len(that1.Field8) { + return -1 + } + return 1 + } + for i := range this.Field8 { + if c := this.Field8[i].Compare(&that1.Field8[i]); c != 0 { + return c + } + } + if len(this.Field13) != len(that1.Field13) { + if len(this.Field13) < len(that1.Field13) { + return -1 + } + return 1 + } + for i := range this.Field13 { + if this.Field13[i] != that1.Field13[i] { + if !this.Field13[i] { + return -1 + } + return 1 + } + } + if len(this.Field14) != len(that1.Field14) { + if len(this.Field14) < len(that1.Field14) { + return -1 + } + return 1 + } + for i := range this.Field14 { + if this.Field14[i] != that1.Field14[i] { + if this.Field14[i] < that1.Field14[i] { + return -1 + } + return 1 + } + } + if len(this.Field15) != len(that1.Field15) { + if len(this.Field15) < len(that1.Field15) { + return -1 + } + return 1 + } + for i := range this.Field15 { + if c := bytes.Compare(this.Field15[i], that1.Field15[i]); c != 0 { + return c + } + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NinRepStruct) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NinRepStruct) + if !ok { + that2, ok := that.(NinRepStruct) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if len(this.Field1) != len(that1.Field1) { + if len(this.Field1) < len(that1.Field1) { + return -1 + } + return 1 + } + for i := range this.Field1 { + if this.Field1[i] != that1.Field1[i] { + if this.Field1[i] < that1.Field1[i] { + return -1 + } + return 1 + } + } + if len(this.Field2) != len(that1.Field2) { + if len(this.Field2) < len(that1.Field2) { + return -1 + } + return 1 + } + for i := range this.Field2 { + if this.Field2[i] != that1.Field2[i] { + if this.Field2[i] < that1.Field2[i] { + return -1 + } + return 1 + } + } + if len(this.Field3) != len(that1.Field3) { + if len(this.Field3) < len(that1.Field3) { + return -1 + } + return 1 + } + for i := range this.Field3 { + if c := this.Field3[i].Compare(that1.Field3[i]); c != 0 { + return c + } + } + if len(this.Field4) != len(that1.Field4) { + if len(this.Field4) < len(that1.Field4) { + return -1 + } + return 1 + } + for i := range this.Field4 { + if c := this.Field4[i].Compare(that1.Field4[i]); c != 0 { + return c + } + } + if len(this.Field6) != len(that1.Field6) { + if len(this.Field6) < len(that1.Field6) { + return -1 + } + return 1 + } + for i := range this.Field6 { + if this.Field6[i] != that1.Field6[i] { + if this.Field6[i] < that1.Field6[i] { + return -1 + } + return 1 + } + } + if len(this.Field7) != len(that1.Field7) { + if len(this.Field7) < len(that1.Field7) { + return -1 + } + return 1 + } + for i := range this.Field7 { + if this.Field7[i] != that1.Field7[i] { + if this.Field7[i] < that1.Field7[i] { + return -1 + } + return 1 + } + } + if len(this.Field8) != len(that1.Field8) { + if len(this.Field8) < len(that1.Field8) { + return -1 + } + return 1 + } + for i := range this.Field8 { + if c := this.Field8[i].Compare(that1.Field8[i]); c != 0 { + return c + } + } + if len(this.Field13) != len(that1.Field13) { + if len(this.Field13) < len(that1.Field13) { + return -1 + } + return 1 + } + for i := range this.Field13 { + if this.Field13[i] != that1.Field13[i] { + if !this.Field13[i] { + return -1 + } + return 1 + } + } + if len(this.Field14) != len(that1.Field14) { + if len(this.Field14) < len(that1.Field14) { + return -1 + } + return 1 + } + for i := range this.Field14 { + if this.Field14[i] != that1.Field14[i] { + if this.Field14[i] < that1.Field14[i] { + return -1 + } + return 1 + } + } + if len(this.Field15) != len(that1.Field15) { + if len(this.Field15) < len(that1.Field15) { + return -1 + } + return 1 + } + for i := range this.Field15 { + if c := bytes.Compare(this.Field15[i], that1.Field15[i]); c != 0 { + return c + } + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NidEmbeddedStruct) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NidEmbeddedStruct) + if !ok { + that2, ok := that.(NidEmbeddedStruct) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if c := this.NidOptNative.Compare(that1.NidOptNative); c != 0 { + return c + } + if c := this.Field200.Compare(&that1.Field200); c != 0 { + return c + } + if this.Field210 != that1.Field210 { + if !this.Field210 { + return -1 + } + return 1 + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NinEmbeddedStruct) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NinEmbeddedStruct) + if !ok { + that2, ok := that.(NinEmbeddedStruct) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if c := this.NidOptNative.Compare(that1.NidOptNative); c != 0 { + return c + } + if c := this.Field200.Compare(that1.Field200); c != 0 { + return c + } + if this.Field210 != nil && that1.Field210 != nil { + if *this.Field210 != *that1.Field210 { + if !*this.Field210 { + return -1 + } + return 1 + } + } else if this.Field210 != nil { + return 1 + } else if that1.Field210 != nil { + return -1 + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NidNestedStruct) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NidNestedStruct) + if !ok { + that2, ok := that.(NidNestedStruct) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if c := this.Field1.Compare(&that1.Field1); c != 0 { + return c + } + if len(this.Field2) != len(that1.Field2) { + if len(this.Field2) < len(that1.Field2) { + return -1 + } + return 1 + } + for i := range this.Field2 { + if c := this.Field2[i].Compare(&that1.Field2[i]); c != 0 { + return c + } + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NinNestedStruct) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NinNestedStruct) + if !ok { + that2, ok := that.(NinNestedStruct) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if c := this.Field1.Compare(that1.Field1); c != 0 { + return c + } + if len(this.Field2) != len(that1.Field2) { + if len(this.Field2) < len(that1.Field2) { + return -1 + } + return 1 + } + for i := range this.Field2 { + if c := this.Field2[i].Compare(that1.Field2[i]); c != 0 { + return c + } + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NidOptCustom) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NidOptCustom) + if !ok { + that2, ok := that.(NidOptCustom) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if c := this.Id.Compare(that1.Id); c != 0 { + return c + } + if c := this.Value.Compare(that1.Value); c != 0 { + return c + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *CustomDash) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*CustomDash) + if !ok { + that2, ok := that.(CustomDash) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if that1.Value == nil { + if this.Value != nil { + return 1 + } + } else if this.Value == nil { + return -1 + } else if c := this.Value.Compare(*that1.Value); c != 0 { + return c + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NinOptCustom) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NinOptCustom) + if !ok { + that2, ok := that.(NinOptCustom) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if that1.Id == nil { + if this.Id != nil { + return 1 + } + } else if this.Id == nil { + return -1 + } else if c := this.Id.Compare(*that1.Id); c != 0 { + return c + } + if that1.Value == nil { + if this.Value != nil { + return 1 + } + } else if this.Value == nil { + return -1 + } else if c := this.Value.Compare(*that1.Value); c != 0 { + return c + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NidRepCustom) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NidRepCustom) + if !ok { + that2, ok := that.(NidRepCustom) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if len(this.Id) != len(that1.Id) { + if len(this.Id) < len(that1.Id) { + return -1 + } + return 1 + } + for i := range this.Id { + if c := this.Id[i].Compare(that1.Id[i]); c != 0 { + return c + } + } + if len(this.Value) != len(that1.Value) { + if len(this.Value) < len(that1.Value) { + return -1 + } + return 1 + } + for i := range this.Value { + if c := this.Value[i].Compare(that1.Value[i]); c != 0 { + return c + } + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NinRepCustom) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NinRepCustom) + if !ok { + that2, ok := that.(NinRepCustom) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if len(this.Id) != len(that1.Id) { + if len(this.Id) < len(that1.Id) { + return -1 + } + return 1 + } + for i := range this.Id { + if c := this.Id[i].Compare(that1.Id[i]); c != 0 { + return c + } + } + if len(this.Value) != len(that1.Value) { + if len(this.Value) < len(that1.Value) { + return -1 + } + return 1 + } + for i := range this.Value { + if c := this.Value[i].Compare(that1.Value[i]); c != 0 { + return c + } + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NinOptNativeUnion) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NinOptNativeUnion) + if !ok { + that2, ok := that.(NinOptNativeUnion) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + if *this.Field1 < *that1.Field1 { + return -1 + } + return 1 + } + } else if this.Field1 != nil { + return 1 + } else if that1.Field1 != nil { + return -1 + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + if *this.Field2 < *that1.Field2 { + return -1 + } + return 1 + } + } else if this.Field2 != nil { + return 1 + } else if that1.Field2 != nil { + return -1 + } + if this.Field3 != nil && that1.Field3 != nil { + if *this.Field3 != *that1.Field3 { + if *this.Field3 < *that1.Field3 { + return -1 + } + return 1 + } + } else if this.Field3 != nil { + return 1 + } else if that1.Field3 != nil { + return -1 + } + if this.Field4 != nil && that1.Field4 != nil { + if *this.Field4 != *that1.Field4 { + if *this.Field4 < *that1.Field4 { + return -1 + } + return 1 + } + } else if this.Field4 != nil { + return 1 + } else if that1.Field4 != nil { + return -1 + } + if this.Field5 != nil && that1.Field5 != nil { + if *this.Field5 != *that1.Field5 { + if *this.Field5 < *that1.Field5 { + return -1 + } + return 1 + } + } else if this.Field5 != nil { + return 1 + } else if that1.Field5 != nil { + return -1 + } + if this.Field6 != nil && that1.Field6 != nil { + if *this.Field6 != *that1.Field6 { + if *this.Field6 < *that1.Field6 { + return -1 + } + return 1 + } + } else if this.Field6 != nil { + return 1 + } else if that1.Field6 != nil { + return -1 + } + if this.Field13 != nil && that1.Field13 != nil { + if *this.Field13 != *that1.Field13 { + if !*this.Field13 { + return -1 + } + return 1 + } + } else if this.Field13 != nil { + return 1 + } else if that1.Field13 != nil { + return -1 + } + if this.Field14 != nil && that1.Field14 != nil { + if *this.Field14 != *that1.Field14 { + if *this.Field14 < *that1.Field14 { + return -1 + } + return 1 + } + } else if this.Field14 != nil { + return 1 + } else if that1.Field14 != nil { + return -1 + } + if c := bytes.Compare(this.Field15, that1.Field15); c != 0 { + return c + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NinOptStructUnion) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NinOptStructUnion) + if !ok { + that2, ok := that.(NinOptStructUnion) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + if *this.Field1 < *that1.Field1 { + return -1 + } + return 1 + } + } else if this.Field1 != nil { + return 1 + } else if that1.Field1 != nil { + return -1 + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + if *this.Field2 < *that1.Field2 { + return -1 + } + return 1 + } + } else if this.Field2 != nil { + return 1 + } else if that1.Field2 != nil { + return -1 + } + if c := this.Field3.Compare(that1.Field3); c != 0 { + return c + } + if c := this.Field4.Compare(that1.Field4); c != 0 { + return c + } + if this.Field6 != nil && that1.Field6 != nil { + if *this.Field6 != *that1.Field6 { + if *this.Field6 < *that1.Field6 { + return -1 + } + return 1 + } + } else if this.Field6 != nil { + return 1 + } else if that1.Field6 != nil { + return -1 + } + if this.Field7 != nil && that1.Field7 != nil { + if *this.Field7 != *that1.Field7 { + if *this.Field7 < *that1.Field7 { + return -1 + } + return 1 + } + } else if this.Field7 != nil { + return 1 + } else if that1.Field7 != nil { + return -1 + } + if this.Field13 != nil && that1.Field13 != nil { + if *this.Field13 != *that1.Field13 { + if !*this.Field13 { + return -1 + } + return 1 + } + } else if this.Field13 != nil { + return 1 + } else if that1.Field13 != nil { + return -1 + } + if this.Field14 != nil && that1.Field14 != nil { + if *this.Field14 != *that1.Field14 { + if *this.Field14 < *that1.Field14 { + return -1 + } + return 1 + } + } else if this.Field14 != nil { + return 1 + } else if that1.Field14 != nil { + return -1 + } + if c := bytes.Compare(this.Field15, that1.Field15); c != 0 { + return c + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NinEmbeddedStructUnion) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NinEmbeddedStructUnion) + if !ok { + that2, ok := that.(NinEmbeddedStructUnion) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if c := this.NidOptNative.Compare(that1.NidOptNative); c != 0 { + return c + } + if c := this.Field200.Compare(that1.Field200); c != 0 { + return c + } + if this.Field210 != nil && that1.Field210 != nil { + if *this.Field210 != *that1.Field210 { + if !*this.Field210 { + return -1 + } + return 1 + } + } else if this.Field210 != nil { + return 1 + } else if that1.Field210 != nil { + return -1 + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NinNestedStructUnion) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NinNestedStructUnion) + if !ok { + that2, ok := that.(NinNestedStructUnion) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if c := this.Field1.Compare(that1.Field1); c != 0 { + return c + } + if c := this.Field2.Compare(that1.Field2); c != 0 { + return c + } + if c := this.Field3.Compare(that1.Field3); c != 0 { + return c + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *Tree) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*Tree) + if !ok { + that2, ok := that.(Tree) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if c := this.Or.Compare(that1.Or); c != 0 { + return c + } + if c := this.And.Compare(that1.And); c != 0 { + return c + } + if c := this.Leaf.Compare(that1.Leaf); c != 0 { + return c + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *OrBranch) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*OrBranch) + if !ok { + that2, ok := that.(OrBranch) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if c := this.Left.Compare(&that1.Left); c != 0 { + return c + } + if c := this.Right.Compare(&that1.Right); c != 0 { + return c + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *AndBranch) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*AndBranch) + if !ok { + that2, ok := that.(AndBranch) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if c := this.Left.Compare(&that1.Left); c != 0 { + return c + } + if c := this.Right.Compare(&that1.Right); c != 0 { + return c + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *Leaf) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*Leaf) + if !ok { + that2, ok := that.(Leaf) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.Value != that1.Value { + if this.Value < that1.Value { + return -1 + } + return 1 + } + if this.StrValue != that1.StrValue { + if this.StrValue < that1.StrValue { + return -1 + } + return 1 + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *DeepTree) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*DeepTree) + if !ok { + that2, ok := that.(DeepTree) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if c := this.Down.Compare(that1.Down); c != 0 { + return c + } + if c := this.And.Compare(that1.And); c != 0 { + return c + } + if c := this.Leaf.Compare(that1.Leaf); c != 0 { + return c + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *ADeepBranch) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*ADeepBranch) + if !ok { + that2, ok := that.(ADeepBranch) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if c := this.Down.Compare(&that1.Down); c != 0 { + return c + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *AndDeepBranch) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*AndDeepBranch) + if !ok { + that2, ok := that.(AndDeepBranch) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if c := this.Left.Compare(&that1.Left); c != 0 { + return c + } + if c := this.Right.Compare(&that1.Right); c != 0 { + return c + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *DeepLeaf) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*DeepLeaf) + if !ok { + that2, ok := that.(DeepLeaf) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if c := this.Tree.Compare(&that1.Tree); c != 0 { + return c + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *Nil) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*Nil) + if !ok { + that2, ok := that.(Nil) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NidOptEnum) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NidOptEnum) + if !ok { + that2, ok := that.(NidOptEnum) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.Field1 != that1.Field1 { + if this.Field1 < that1.Field1 { + return -1 + } + return 1 + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NinOptEnum) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NinOptEnum) + if !ok { + that2, ok := that.(NinOptEnum) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + if *this.Field1 < *that1.Field1 { + return -1 + } + return 1 + } + } else if this.Field1 != nil { + return 1 + } else if that1.Field1 != nil { + return -1 + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + if *this.Field2 < *that1.Field2 { + return -1 + } + return 1 + } + } else if this.Field2 != nil { + return 1 + } else if that1.Field2 != nil { + return -1 + } + if this.Field3 != nil && that1.Field3 != nil { + if *this.Field3 != *that1.Field3 { + if *this.Field3 < *that1.Field3 { + return -1 + } + return 1 + } + } else if this.Field3 != nil { + return 1 + } else if that1.Field3 != nil { + return -1 + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NidRepEnum) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NidRepEnum) + if !ok { + that2, ok := that.(NidRepEnum) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if len(this.Field1) != len(that1.Field1) { + if len(this.Field1) < len(that1.Field1) { + return -1 + } + return 1 + } + for i := range this.Field1 { + if this.Field1[i] != that1.Field1[i] { + if this.Field1[i] < that1.Field1[i] { + return -1 + } + return 1 + } + } + if len(this.Field2) != len(that1.Field2) { + if len(this.Field2) < len(that1.Field2) { + return -1 + } + return 1 + } + for i := range this.Field2 { + if this.Field2[i] != that1.Field2[i] { + if this.Field2[i] < that1.Field2[i] { + return -1 + } + return 1 + } + } + if len(this.Field3) != len(that1.Field3) { + if len(this.Field3) < len(that1.Field3) { + return -1 + } + return 1 + } + for i := range this.Field3 { + if this.Field3[i] != that1.Field3[i] { + if this.Field3[i] < that1.Field3[i] { + return -1 + } + return 1 + } + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NinRepEnum) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NinRepEnum) + if !ok { + that2, ok := that.(NinRepEnum) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if len(this.Field1) != len(that1.Field1) { + if len(this.Field1) < len(that1.Field1) { + return -1 + } + return 1 + } + for i := range this.Field1 { + if this.Field1[i] != that1.Field1[i] { + if this.Field1[i] < that1.Field1[i] { + return -1 + } + return 1 + } + } + if len(this.Field2) != len(that1.Field2) { + if len(this.Field2) < len(that1.Field2) { + return -1 + } + return 1 + } + for i := range this.Field2 { + if this.Field2[i] != that1.Field2[i] { + if this.Field2[i] < that1.Field2[i] { + return -1 + } + return 1 + } + } + if len(this.Field3) != len(that1.Field3) { + if len(this.Field3) < len(that1.Field3) { + return -1 + } + return 1 + } + for i := range this.Field3 { + if this.Field3[i] != that1.Field3[i] { + if this.Field3[i] < that1.Field3[i] { + return -1 + } + return 1 + } + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NinOptEnumDefault) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NinOptEnumDefault) + if !ok { + that2, ok := that.(NinOptEnumDefault) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + if *this.Field1 < *that1.Field1 { + return -1 + } + return 1 + } + } else if this.Field1 != nil { + return 1 + } else if that1.Field1 != nil { + return -1 + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + if *this.Field2 < *that1.Field2 { + return -1 + } + return 1 + } + } else if this.Field2 != nil { + return 1 + } else if that1.Field2 != nil { + return -1 + } + if this.Field3 != nil && that1.Field3 != nil { + if *this.Field3 != *that1.Field3 { + if *this.Field3 < *that1.Field3 { + return -1 + } + return 1 + } + } else if this.Field3 != nil { + return 1 + } else if that1.Field3 != nil { + return -1 + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *AnotherNinOptEnum) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*AnotherNinOptEnum) + if !ok { + that2, ok := that.(AnotherNinOptEnum) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + if *this.Field1 < *that1.Field1 { + return -1 + } + return 1 + } + } else if this.Field1 != nil { + return 1 + } else if that1.Field1 != nil { + return -1 + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + if *this.Field2 < *that1.Field2 { + return -1 + } + return 1 + } + } else if this.Field2 != nil { + return 1 + } else if that1.Field2 != nil { + return -1 + } + if this.Field3 != nil && that1.Field3 != nil { + if *this.Field3 != *that1.Field3 { + if *this.Field3 < *that1.Field3 { + return -1 + } + return 1 + } + } else if this.Field3 != nil { + return 1 + } else if that1.Field3 != nil { + return -1 + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *AnotherNinOptEnumDefault) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*AnotherNinOptEnumDefault) + if !ok { + that2, ok := that.(AnotherNinOptEnumDefault) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + if *this.Field1 < *that1.Field1 { + return -1 + } + return 1 + } + } else if this.Field1 != nil { + return 1 + } else if that1.Field1 != nil { + return -1 + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + if *this.Field2 < *that1.Field2 { + return -1 + } + return 1 + } + } else if this.Field2 != nil { + return 1 + } else if that1.Field2 != nil { + return -1 + } + if this.Field3 != nil && that1.Field3 != nil { + if *this.Field3 != *that1.Field3 { + if *this.Field3 < *that1.Field3 { + return -1 + } + return 1 + } + } else if this.Field3 != nil { + return 1 + } else if that1.Field3 != nil { + return -1 + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *Timer) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*Timer) + if !ok { + that2, ok := that.(Timer) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.Time1 != that1.Time1 { + if this.Time1 < that1.Time1 { + return -1 + } + return 1 + } + if this.Time2 != that1.Time2 { + if this.Time2 < that1.Time2 { + return -1 + } + return 1 + } + if c := bytes.Compare(this.Data, that1.Data); c != 0 { + return c + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *MyExtendable) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*MyExtendable) + if !ok { + that2, ok := that.(MyExtendable) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + if *this.Field1 < *that1.Field1 { + return -1 + } + return 1 + } + } else if this.Field1 != nil { + return 1 + } else if that1.Field1 != nil { + return -1 + } + extkeys := make([]int32, 0, len(this.XXX_extensions)+len(that1.XXX_extensions)) + for k := range this.XXX_extensions { + extkeys = append(extkeys, k) + } + for k := range that1.XXX_extensions { + if _, ok := this.XXX_extensions[k]; !ok { + extkeys = append(extkeys, k) + } + } + github_com_gogo_protobuf_sortkeys.Int32s(extkeys) + for _, k := range extkeys { + if v, ok := this.XXX_extensions[k]; ok { + if v2, ok := that1.XXX_extensions[k]; ok { + if c := v.Compare(&v2); c != 0 { + return c + } + } else { + return 1 + } + } else { + return -1 + } + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *OtherExtenable) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*OtherExtenable) + if !ok { + that2, ok := that.(OtherExtenable) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + if *this.Field2 < *that1.Field2 { + return -1 + } + return 1 + } + } else if this.Field2 != nil { + return 1 + } else if that1.Field2 != nil { + return -1 + } + if this.Field13 != nil && that1.Field13 != nil { + if *this.Field13 != *that1.Field13 { + if *this.Field13 < *that1.Field13 { + return -1 + } + return 1 + } + } else if this.Field13 != nil { + return 1 + } else if that1.Field13 != nil { + return -1 + } + if c := this.M.Compare(that1.M); c != 0 { + return c + } + extkeys := make([]int32, 0, len(this.XXX_extensions)+len(that1.XXX_extensions)) + for k := range this.XXX_extensions { + extkeys = append(extkeys, k) + } + for k := range that1.XXX_extensions { + if _, ok := this.XXX_extensions[k]; !ok { + extkeys = append(extkeys, k) + } + } + github_com_gogo_protobuf_sortkeys.Int32s(extkeys) + for _, k := range extkeys { + if v, ok := this.XXX_extensions[k]; ok { + if v2, ok := that1.XXX_extensions[k]; ok { + if c := v.Compare(&v2); c != 0 { + return c + } + } else { + return 1 + } + } else { + return -1 + } + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NestedDefinition) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NestedDefinition) + if !ok { + that2, ok := that.(NestedDefinition) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + if *this.Field1 < *that1.Field1 { + return -1 + } + return 1 + } + } else if this.Field1 != nil { + return 1 + } else if that1.Field1 != nil { + return -1 + } + if this.EnumField != nil && that1.EnumField != nil { + if *this.EnumField != *that1.EnumField { + if *this.EnumField < *that1.EnumField { + return -1 + } + return 1 + } + } else if this.EnumField != nil { + return 1 + } else if that1.EnumField != nil { + return -1 + } + if c := this.NNM.Compare(that1.NNM); c != 0 { + return c + } + if c := this.NM.Compare(that1.NM); c != 0 { + return c + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NestedDefinition_NestedMessage) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NestedDefinition_NestedMessage) + if !ok { + that2, ok := that.(NestedDefinition_NestedMessage) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.NestedField1 != nil && that1.NestedField1 != nil { + if *this.NestedField1 != *that1.NestedField1 { + if *this.NestedField1 < *that1.NestedField1 { + return -1 + } + return 1 + } + } else if this.NestedField1 != nil { + return 1 + } else if that1.NestedField1 != nil { + return -1 + } + if c := this.NNM.Compare(that1.NNM); c != 0 { + return c + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NestedDefinition_NestedMessage_NestedNestedMsg) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NestedDefinition_NestedMessage_NestedNestedMsg) + if !ok { + that2, ok := that.(NestedDefinition_NestedMessage_NestedNestedMsg) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.NestedNestedField1 != nil && that1.NestedNestedField1 != nil { + if *this.NestedNestedField1 != *that1.NestedNestedField1 { + if *this.NestedNestedField1 < *that1.NestedNestedField1 { + return -1 + } + return 1 + } + } else if this.NestedNestedField1 != nil { + return 1 + } else if that1.NestedNestedField1 != nil { + return -1 + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NestedScope) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NestedScope) + if !ok { + that2, ok := that.(NestedScope) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if c := this.A.Compare(that1.A); c != 0 { + return c + } + if this.B != nil && that1.B != nil { + if *this.B != *that1.B { + if *this.B < *that1.B { + return -1 + } + return 1 + } + } else if this.B != nil { + return 1 + } else if that1.B != nil { + return -1 + } + if c := this.C.Compare(that1.C); c != 0 { + return c + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NinOptNativeDefault) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NinOptNativeDefault) + if !ok { + that2, ok := that.(NinOptNativeDefault) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + if *this.Field1 < *that1.Field1 { + return -1 + } + return 1 + } + } else if this.Field1 != nil { + return 1 + } else if that1.Field1 != nil { + return -1 + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + if *this.Field2 < *that1.Field2 { + return -1 + } + return 1 + } + } else if this.Field2 != nil { + return 1 + } else if that1.Field2 != nil { + return -1 + } + if this.Field3 != nil && that1.Field3 != nil { + if *this.Field3 != *that1.Field3 { + if *this.Field3 < *that1.Field3 { + return -1 + } + return 1 + } + } else if this.Field3 != nil { + return 1 + } else if that1.Field3 != nil { + return -1 + } + if this.Field4 != nil && that1.Field4 != nil { + if *this.Field4 != *that1.Field4 { + if *this.Field4 < *that1.Field4 { + return -1 + } + return 1 + } + } else if this.Field4 != nil { + return 1 + } else if that1.Field4 != nil { + return -1 + } + if this.Field5 != nil && that1.Field5 != nil { + if *this.Field5 != *that1.Field5 { + if *this.Field5 < *that1.Field5 { + return -1 + } + return 1 + } + } else if this.Field5 != nil { + return 1 + } else if that1.Field5 != nil { + return -1 + } + if this.Field6 != nil && that1.Field6 != nil { + if *this.Field6 != *that1.Field6 { + if *this.Field6 < *that1.Field6 { + return -1 + } + return 1 + } + } else if this.Field6 != nil { + return 1 + } else if that1.Field6 != nil { + return -1 + } + if this.Field7 != nil && that1.Field7 != nil { + if *this.Field7 != *that1.Field7 { + if *this.Field7 < *that1.Field7 { + return -1 + } + return 1 + } + } else if this.Field7 != nil { + return 1 + } else if that1.Field7 != nil { + return -1 + } + if this.Field8 != nil && that1.Field8 != nil { + if *this.Field8 != *that1.Field8 { + if *this.Field8 < *that1.Field8 { + return -1 + } + return 1 + } + } else if this.Field8 != nil { + return 1 + } else if that1.Field8 != nil { + return -1 + } + if this.Field9 != nil && that1.Field9 != nil { + if *this.Field9 != *that1.Field9 { + if *this.Field9 < *that1.Field9 { + return -1 + } + return 1 + } + } else if this.Field9 != nil { + return 1 + } else if that1.Field9 != nil { + return -1 + } + if this.Field10 != nil && that1.Field10 != nil { + if *this.Field10 != *that1.Field10 { + if *this.Field10 < *that1.Field10 { + return -1 + } + return 1 + } + } else if this.Field10 != nil { + return 1 + } else if that1.Field10 != nil { + return -1 + } + if this.Field11 != nil && that1.Field11 != nil { + if *this.Field11 != *that1.Field11 { + if *this.Field11 < *that1.Field11 { + return -1 + } + return 1 + } + } else if this.Field11 != nil { + return 1 + } else if that1.Field11 != nil { + return -1 + } + if this.Field12 != nil && that1.Field12 != nil { + if *this.Field12 != *that1.Field12 { + if *this.Field12 < *that1.Field12 { + return -1 + } + return 1 + } + } else if this.Field12 != nil { + return 1 + } else if that1.Field12 != nil { + return -1 + } + if this.Field13 != nil && that1.Field13 != nil { + if *this.Field13 != *that1.Field13 { + if !*this.Field13 { + return -1 + } + return 1 + } + } else if this.Field13 != nil { + return 1 + } else if that1.Field13 != nil { + return -1 + } + if this.Field14 != nil && that1.Field14 != nil { + if *this.Field14 != *that1.Field14 { + if *this.Field14 < *that1.Field14 { + return -1 + } + return 1 + } + } else if this.Field14 != nil { + return 1 + } else if that1.Field14 != nil { + return -1 + } + if c := bytes.Compare(this.Field15, that1.Field15); c != 0 { + return c + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *CustomContainer) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*CustomContainer) + if !ok { + that2, ok := that.(CustomContainer) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if c := this.CustomStruct.Compare(&that1.CustomStruct); c != 0 { + return c + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *CustomNameNidOptNative) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*CustomNameNidOptNative) + if !ok { + that2, ok := that.(CustomNameNidOptNative) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.FieldA != that1.FieldA { + if this.FieldA < that1.FieldA { + return -1 + } + return 1 + } + if this.FieldB != that1.FieldB { + if this.FieldB < that1.FieldB { + return -1 + } + return 1 + } + if this.FieldC != that1.FieldC { + if this.FieldC < that1.FieldC { + return -1 + } + return 1 + } + if this.FieldD != that1.FieldD { + if this.FieldD < that1.FieldD { + return -1 + } + return 1 + } + if this.FieldE != that1.FieldE { + if this.FieldE < that1.FieldE { + return -1 + } + return 1 + } + if this.FieldF != that1.FieldF { + if this.FieldF < that1.FieldF { + return -1 + } + return 1 + } + if this.FieldG != that1.FieldG { + if this.FieldG < that1.FieldG { + return -1 + } + return 1 + } + if this.FieldH != that1.FieldH { + if this.FieldH < that1.FieldH { + return -1 + } + return 1 + } + if this.FieldI != that1.FieldI { + if this.FieldI < that1.FieldI { + return -1 + } + return 1 + } + if this.FieldJ != that1.FieldJ { + if this.FieldJ < that1.FieldJ { + return -1 + } + return 1 + } + if this.FieldK != that1.FieldK { + if this.FieldK < that1.FieldK { + return -1 + } + return 1 + } + if this.FieldL != that1.FieldL { + if this.FieldL < that1.FieldL { + return -1 + } + return 1 + } + if this.FieldM != that1.FieldM { + if !this.FieldM { + return -1 + } + return 1 + } + if this.FieldN != that1.FieldN { + if this.FieldN < that1.FieldN { + return -1 + } + return 1 + } + if c := bytes.Compare(this.FieldO, that1.FieldO); c != 0 { + return c + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *CustomNameNinOptNative) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*CustomNameNinOptNative) + if !ok { + that2, ok := that.(CustomNameNinOptNative) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.FieldA != nil && that1.FieldA != nil { + if *this.FieldA != *that1.FieldA { + if *this.FieldA < *that1.FieldA { + return -1 + } + return 1 + } + } else if this.FieldA != nil { + return 1 + } else if that1.FieldA != nil { + return -1 + } + if this.FieldB != nil && that1.FieldB != nil { + if *this.FieldB != *that1.FieldB { + if *this.FieldB < *that1.FieldB { + return -1 + } + return 1 + } + } else if this.FieldB != nil { + return 1 + } else if that1.FieldB != nil { + return -1 + } + if this.FieldC != nil && that1.FieldC != nil { + if *this.FieldC != *that1.FieldC { + if *this.FieldC < *that1.FieldC { + return -1 + } + return 1 + } + } else if this.FieldC != nil { + return 1 + } else if that1.FieldC != nil { + return -1 + } + if this.FieldD != nil && that1.FieldD != nil { + if *this.FieldD != *that1.FieldD { + if *this.FieldD < *that1.FieldD { + return -1 + } + return 1 + } + } else if this.FieldD != nil { + return 1 + } else if that1.FieldD != nil { + return -1 + } + if this.FieldE != nil && that1.FieldE != nil { + if *this.FieldE != *that1.FieldE { + if *this.FieldE < *that1.FieldE { + return -1 + } + return 1 + } + } else if this.FieldE != nil { + return 1 + } else if that1.FieldE != nil { + return -1 + } + if this.FieldF != nil && that1.FieldF != nil { + if *this.FieldF != *that1.FieldF { + if *this.FieldF < *that1.FieldF { + return -1 + } + return 1 + } + } else if this.FieldF != nil { + return 1 + } else if that1.FieldF != nil { + return -1 + } + if this.FieldG != nil && that1.FieldG != nil { + if *this.FieldG != *that1.FieldG { + if *this.FieldG < *that1.FieldG { + return -1 + } + return 1 + } + } else if this.FieldG != nil { + return 1 + } else if that1.FieldG != nil { + return -1 + } + if this.FieldH != nil && that1.FieldH != nil { + if *this.FieldH != *that1.FieldH { + if *this.FieldH < *that1.FieldH { + return -1 + } + return 1 + } + } else if this.FieldH != nil { + return 1 + } else if that1.FieldH != nil { + return -1 + } + if this.FieldI != nil && that1.FieldI != nil { + if *this.FieldI != *that1.FieldI { + if *this.FieldI < *that1.FieldI { + return -1 + } + return 1 + } + } else if this.FieldI != nil { + return 1 + } else if that1.FieldI != nil { + return -1 + } + if this.FieldJ != nil && that1.FieldJ != nil { + if *this.FieldJ != *that1.FieldJ { + if *this.FieldJ < *that1.FieldJ { + return -1 + } + return 1 + } + } else if this.FieldJ != nil { + return 1 + } else if that1.FieldJ != nil { + return -1 + } + if this.FieldK != nil && that1.FieldK != nil { + if *this.FieldK != *that1.FieldK { + if *this.FieldK < *that1.FieldK { + return -1 + } + return 1 + } + } else if this.FieldK != nil { + return 1 + } else if that1.FieldK != nil { + return -1 + } + if this.FielL != nil && that1.FielL != nil { + if *this.FielL != *that1.FielL { + if *this.FielL < *that1.FielL { + return -1 + } + return 1 + } + } else if this.FielL != nil { + return 1 + } else if that1.FielL != nil { + return -1 + } + if this.FieldM != nil && that1.FieldM != nil { + if *this.FieldM != *that1.FieldM { + if !*this.FieldM { + return -1 + } + return 1 + } + } else if this.FieldM != nil { + return 1 + } else if that1.FieldM != nil { + return -1 + } + if this.FieldN != nil && that1.FieldN != nil { + if *this.FieldN != *that1.FieldN { + if *this.FieldN < *that1.FieldN { + return -1 + } + return 1 + } + } else if this.FieldN != nil { + return 1 + } else if that1.FieldN != nil { + return -1 + } + if c := bytes.Compare(this.FieldO, that1.FieldO); c != 0 { + return c + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *CustomNameNinRepNative) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*CustomNameNinRepNative) + if !ok { + that2, ok := that.(CustomNameNinRepNative) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if len(this.FieldA) != len(that1.FieldA) { + if len(this.FieldA) < len(that1.FieldA) { + return -1 + } + return 1 + } + for i := range this.FieldA { + if this.FieldA[i] != that1.FieldA[i] { + if this.FieldA[i] < that1.FieldA[i] { + return -1 + } + return 1 + } + } + if len(this.FieldB) != len(that1.FieldB) { + if len(this.FieldB) < len(that1.FieldB) { + return -1 + } + return 1 + } + for i := range this.FieldB { + if this.FieldB[i] != that1.FieldB[i] { + if this.FieldB[i] < that1.FieldB[i] { + return -1 + } + return 1 + } + } + if len(this.FieldC) != len(that1.FieldC) { + if len(this.FieldC) < len(that1.FieldC) { + return -1 + } + return 1 + } + for i := range this.FieldC { + if this.FieldC[i] != that1.FieldC[i] { + if this.FieldC[i] < that1.FieldC[i] { + return -1 + } + return 1 + } + } + if len(this.FieldD) != len(that1.FieldD) { + if len(this.FieldD) < len(that1.FieldD) { + return -1 + } + return 1 + } + for i := range this.FieldD { + if this.FieldD[i] != that1.FieldD[i] { + if this.FieldD[i] < that1.FieldD[i] { + return -1 + } + return 1 + } + } + if len(this.FieldE) != len(that1.FieldE) { + if len(this.FieldE) < len(that1.FieldE) { + return -1 + } + return 1 + } + for i := range this.FieldE { + if this.FieldE[i] != that1.FieldE[i] { + if this.FieldE[i] < that1.FieldE[i] { + return -1 + } + return 1 + } + } + if len(this.FieldF) != len(that1.FieldF) { + if len(this.FieldF) < len(that1.FieldF) { + return -1 + } + return 1 + } + for i := range this.FieldF { + if this.FieldF[i] != that1.FieldF[i] { + if this.FieldF[i] < that1.FieldF[i] { + return -1 + } + return 1 + } + } + if len(this.FieldG) != len(that1.FieldG) { + if len(this.FieldG) < len(that1.FieldG) { + return -1 + } + return 1 + } + for i := range this.FieldG { + if this.FieldG[i] != that1.FieldG[i] { + if this.FieldG[i] < that1.FieldG[i] { + return -1 + } + return 1 + } + } + if len(this.FieldH) != len(that1.FieldH) { + if len(this.FieldH) < len(that1.FieldH) { + return -1 + } + return 1 + } + for i := range this.FieldH { + if this.FieldH[i] != that1.FieldH[i] { + if this.FieldH[i] < that1.FieldH[i] { + return -1 + } + return 1 + } + } + if len(this.FieldI) != len(that1.FieldI) { + if len(this.FieldI) < len(that1.FieldI) { + return -1 + } + return 1 + } + for i := range this.FieldI { + if this.FieldI[i] != that1.FieldI[i] { + if this.FieldI[i] < that1.FieldI[i] { + return -1 + } + return 1 + } + } + if len(this.FieldJ) != len(that1.FieldJ) { + if len(this.FieldJ) < len(that1.FieldJ) { + return -1 + } + return 1 + } + for i := range this.FieldJ { + if this.FieldJ[i] != that1.FieldJ[i] { + if this.FieldJ[i] < that1.FieldJ[i] { + return -1 + } + return 1 + } + } + if len(this.FieldK) != len(that1.FieldK) { + if len(this.FieldK) < len(that1.FieldK) { + return -1 + } + return 1 + } + for i := range this.FieldK { + if this.FieldK[i] != that1.FieldK[i] { + if this.FieldK[i] < that1.FieldK[i] { + return -1 + } + return 1 + } + } + if len(this.FieldL) != len(that1.FieldL) { + if len(this.FieldL) < len(that1.FieldL) { + return -1 + } + return 1 + } + for i := range this.FieldL { + if this.FieldL[i] != that1.FieldL[i] { + if this.FieldL[i] < that1.FieldL[i] { + return -1 + } + return 1 + } + } + if len(this.FieldM) != len(that1.FieldM) { + if len(this.FieldM) < len(that1.FieldM) { + return -1 + } + return 1 + } + for i := range this.FieldM { + if this.FieldM[i] != that1.FieldM[i] { + if !this.FieldM[i] { + return -1 + } + return 1 + } + } + if len(this.FieldN) != len(that1.FieldN) { + if len(this.FieldN) < len(that1.FieldN) { + return -1 + } + return 1 + } + for i := range this.FieldN { + if this.FieldN[i] != that1.FieldN[i] { + if this.FieldN[i] < that1.FieldN[i] { + return -1 + } + return 1 + } + } + if len(this.FieldO) != len(that1.FieldO) { + if len(this.FieldO) < len(that1.FieldO) { + return -1 + } + return 1 + } + for i := range this.FieldO { + if c := bytes.Compare(this.FieldO[i], that1.FieldO[i]); c != 0 { + return c + } + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *CustomNameNinStruct) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*CustomNameNinStruct) + if !ok { + that2, ok := that.(CustomNameNinStruct) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.FieldA != nil && that1.FieldA != nil { + if *this.FieldA != *that1.FieldA { + if *this.FieldA < *that1.FieldA { + return -1 + } + return 1 + } + } else if this.FieldA != nil { + return 1 + } else if that1.FieldA != nil { + return -1 + } + if this.FieldB != nil && that1.FieldB != nil { + if *this.FieldB != *that1.FieldB { + if *this.FieldB < *that1.FieldB { + return -1 + } + return 1 + } + } else if this.FieldB != nil { + return 1 + } else if that1.FieldB != nil { + return -1 + } + if c := this.FieldC.Compare(that1.FieldC); c != 0 { + return c + } + if len(this.FieldD) != len(that1.FieldD) { + if len(this.FieldD) < len(that1.FieldD) { + return -1 + } + return 1 + } + for i := range this.FieldD { + if c := this.FieldD[i].Compare(that1.FieldD[i]); c != 0 { + return c + } + } + if this.FieldE != nil && that1.FieldE != nil { + if *this.FieldE != *that1.FieldE { + if *this.FieldE < *that1.FieldE { + return -1 + } + return 1 + } + } else if this.FieldE != nil { + return 1 + } else if that1.FieldE != nil { + return -1 + } + if this.FieldF != nil && that1.FieldF != nil { + if *this.FieldF != *that1.FieldF { + if *this.FieldF < *that1.FieldF { + return -1 + } + return 1 + } + } else if this.FieldF != nil { + return 1 + } else if that1.FieldF != nil { + return -1 + } + if c := this.FieldG.Compare(that1.FieldG); c != 0 { + return c + } + if this.FieldH != nil && that1.FieldH != nil { + if *this.FieldH != *that1.FieldH { + if !*this.FieldH { + return -1 + } + return 1 + } + } else if this.FieldH != nil { + return 1 + } else if that1.FieldH != nil { + return -1 + } + if this.FieldI != nil && that1.FieldI != nil { + if *this.FieldI != *that1.FieldI { + if *this.FieldI < *that1.FieldI { + return -1 + } + return 1 + } + } else if this.FieldI != nil { + return 1 + } else if that1.FieldI != nil { + return -1 + } + if c := bytes.Compare(this.FieldJ, that1.FieldJ); c != 0 { + return c + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *CustomNameCustomType) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*CustomNameCustomType) + if !ok { + that2, ok := that.(CustomNameCustomType) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if that1.FieldA == nil { + if this.FieldA != nil { + return 1 + } + } else if this.FieldA == nil { + return -1 + } else if c := this.FieldA.Compare(*that1.FieldA); c != 0 { + return c + } + if that1.FieldB == nil { + if this.FieldB != nil { + return 1 + } + } else if this.FieldB == nil { + return -1 + } else if c := this.FieldB.Compare(*that1.FieldB); c != 0 { + return c + } + if len(this.FieldC) != len(that1.FieldC) { + if len(this.FieldC) < len(that1.FieldC) { + return -1 + } + return 1 + } + for i := range this.FieldC { + if c := this.FieldC[i].Compare(that1.FieldC[i]); c != 0 { + return c + } + } + if len(this.FieldD) != len(that1.FieldD) { + if len(this.FieldD) < len(that1.FieldD) { + return -1 + } + return 1 + } + for i := range this.FieldD { + if c := this.FieldD[i].Compare(that1.FieldD[i]); c != 0 { + return c + } + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *CustomNameNinEmbeddedStructUnion) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*CustomNameNinEmbeddedStructUnion) + if !ok { + that2, ok := that.(CustomNameNinEmbeddedStructUnion) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if c := this.NidOptNative.Compare(that1.NidOptNative); c != 0 { + return c + } + if c := this.FieldA.Compare(that1.FieldA); c != 0 { + return c + } + if this.FieldB != nil && that1.FieldB != nil { + if *this.FieldB != *that1.FieldB { + if !*this.FieldB { + return -1 + } + return 1 + } + } else if this.FieldB != nil { + return 1 + } else if that1.FieldB != nil { + return -1 + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *CustomNameEnum) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*CustomNameEnum) + if !ok { + that2, ok := that.(CustomNameEnum) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.FieldA != nil && that1.FieldA != nil { + if *this.FieldA != *that1.FieldA { + if *this.FieldA < *that1.FieldA { + return -1 + } + return 1 + } + } else if this.FieldA != nil { + return 1 + } else if that1.FieldA != nil { + return -1 + } + if len(this.FieldB) != len(that1.FieldB) { + if len(this.FieldB) < len(that1.FieldB) { + return -1 + } + return 1 + } + for i := range this.FieldB { + if this.FieldB[i] != that1.FieldB[i] { + if this.FieldB[i] < that1.FieldB[i] { + return -1 + } + return 1 + } + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NoExtensionsMap) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NoExtensionsMap) + if !ok { + that2, ok := that.(NoExtensionsMap) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + if *this.Field1 < *that1.Field1 { + return -1 + } + return 1 + } + } else if this.Field1 != nil { + return 1 + } else if that1.Field1 != nil { + return -1 + } + if c := bytes.Compare(this.XXX_extensions, that1.XXX_extensions); c != 0 { + return c + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *Unrecognized) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*Unrecognized) + if !ok { + that2, ok := that.(Unrecognized) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + if *this.Field1 < *that1.Field1 { + return -1 + } + return 1 + } + } else if this.Field1 != nil { + return 1 + } else if that1.Field1 != nil { + return -1 + } + return 0 +} +func (this *UnrecognizedWithInner) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*UnrecognizedWithInner) + if !ok { + that2, ok := that.(UnrecognizedWithInner) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if len(this.Embedded) != len(that1.Embedded) { + if len(this.Embedded) < len(that1.Embedded) { + return -1 + } + return 1 + } + for i := range this.Embedded { + if c := this.Embedded[i].Compare(that1.Embedded[i]); c != 0 { + return c + } + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + if *this.Field2 < *that1.Field2 { + return -1 + } + return 1 + } + } else if this.Field2 != nil { + return 1 + } else if that1.Field2 != nil { + return -1 + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *UnrecognizedWithInner_Inner) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*UnrecognizedWithInner_Inner) + if !ok { + that2, ok := that.(UnrecognizedWithInner_Inner) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + if *this.Field1 < *that1.Field1 { + return -1 + } + return 1 + } + } else if this.Field1 != nil { + return 1 + } else if that1.Field1 != nil { + return -1 + } + return 0 +} +func (this *UnrecognizedWithEmbed) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*UnrecognizedWithEmbed) + if !ok { + that2, ok := that.(UnrecognizedWithEmbed) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if c := this.UnrecognizedWithEmbed_Embedded.Compare(&that1.UnrecognizedWithEmbed_Embedded); c != 0 { + return c + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + if *this.Field2 < *that1.Field2 { + return -1 + } + return 1 + } + } else if this.Field2 != nil { + return 1 + } else if that1.Field2 != nil { + return -1 + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *UnrecognizedWithEmbed_Embedded) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*UnrecognizedWithEmbed_Embedded) + if !ok { + that2, ok := that.(UnrecognizedWithEmbed_Embedded) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + if *this.Field1 < *that1.Field1 { + return -1 + } + return 1 + } + } else if this.Field1 != nil { + return 1 + } else if that1.Field1 != nil { + return -1 + } + return 0 +} +func (this *Node) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*Node) + if !ok { + that2, ok := that.(Node) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.Label != nil && that1.Label != nil { + if *this.Label != *that1.Label { + if *this.Label < *that1.Label { + return -1 + } + return 1 + } + } else if this.Label != nil { + return 1 + } else if that1.Label != nil { + return -1 + } + if len(this.Children) != len(that1.Children) { + if len(this.Children) < len(that1.Children) { + return -1 + } + return 1 + } + for i := range this.Children { + if c := this.Children[i].Compare(that1.Children[i]); c != 0 { + return c + } + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NidOptNative) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NinOptNative) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NidRepNative) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NinRepNative) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NidRepPackedNative) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NinRepPackedNative) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NidOptStruct) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NinOptStruct) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NidRepStruct) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NinRepStruct) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NidEmbeddedStruct) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NinEmbeddedStruct) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NidNestedStruct) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NinNestedStruct) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NidOptCustom) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *CustomDash) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NinOptCustom) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NidRepCustom) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NinRepCustom) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NinOptNativeUnion) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NinOptStructUnion) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NinEmbeddedStructUnion) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NinNestedStructUnion) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *Tree) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *OrBranch) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *AndBranch) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *Leaf) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *DeepTree) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *ADeepBranch) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *AndDeepBranch) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *DeepLeaf) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *Nil) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NidOptEnum) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NinOptEnum) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NidRepEnum) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NinRepEnum) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NinOptEnumDefault) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *AnotherNinOptEnum) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *AnotherNinOptEnumDefault) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *Timer) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *MyExtendable) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *OtherExtenable) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NestedDefinition) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NestedDefinition_NestedMessage) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NestedDefinition_NestedMessage_NestedNestedMsg) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NestedScope) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NinOptNativeDefault) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *CustomContainer) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *CustomNameNidOptNative) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *CustomNameNinOptNative) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *CustomNameNinRepNative) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *CustomNameNinStruct) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *CustomNameCustomType) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *CustomNameNinEmbeddedStructUnion) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *CustomNameEnum) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NoExtensionsMap) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *Unrecognized) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *UnrecognizedWithInner) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *UnrecognizedWithInner_Inner) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *UnrecognizedWithEmbed) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *UnrecognizedWithEmbed_Embedded) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *Node) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func ThetestDescription() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + d := &github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet{} + var gzipped = []byte{ + // 6125 bytes of a gzipped FileDescriptorSet + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xcc, 0x5c, 0x6b, 0x6c, 0x23, 0xd7, + 0x75, 0xde, 0xe1, 0x90, 0x12, 0x75, 0x28, 0x51, 0xd4, 0xac, 0x56, 0xa6, 0xe5, 0xf5, 0x3e, 0x68, + 0x79, 0x2d, 0x2b, 0xb6, 0x5e, 0xab, 0x7d, 0xd1, 0x89, 0x03, 0xbe, 0x56, 0xd6, 0x56, 0xaf, 0x8e, + 0xa4, 0xc4, 0x4e, 0x0b, 0x10, 0x14, 0x39, 0x92, 0x68, 0x53, 0x43, 0x96, 0x43, 0xda, 0xde, 0xfc, + 0x28, 0xd2, 0xa4, 0x4d, 0x93, 0x16, 0x7d, 0xa6, 0x45, 0xf3, 0x8e, 0x93, 0x22, 0x8d, 0x93, 0xb6, + 0x69, 0xd2, 0xa6, 0x41, 0x11, 0x14, 0x8d, 0x81, 0x22, 0xed, 0xf6, 0x4f, 0x91, 0xe6, 0x57, 0x51, + 0x14, 0x46, 0x5e, 0x40, 0xd3, 0x36, 0x6d, 0x13, 0xc0, 0x40, 0x02, 0x24, 0x3f, 0x7a, 0xdf, 0x33, + 0xf7, 0x72, 0xc8, 0x19, 0x79, 0xed, 0x24, 0x0b, 0x70, 0x45, 0x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+ 0x65, 0xa5, 0xa3, 0xe4, 0xee, 0x2f, 0xf4, 0xdc, 0xbd, 0x7a, 0xe7, 0x09, 0x86, 0xda, 0x45, 0x20, + 0x23, 0x07, 0x23, 0x96, 0xdd, 0x3d, 0xa6, 0x12, 0x62, 0x7d, 0xec, 0x57, 0x42, 0x1c, 0xaa, 0x94, + 0x38, 0x86, 0x31, 0x11, 0xc3, 0x8e, 0xd5, 0x7e, 0xb6, 0x5e, 0xb5, 0xd2, 0x43, 0x44, 0xc0, 0x43, + 0x3d, 0x02, 0x76, 0x28, 0x5d, 0x95, 0xc1, 0x71, 0xe8, 0x56, 0x46, 0xac, 0xe7, 0x3b, 0x96, 0xed, + 0xd4, 0x9b, 0x76, 0x7a, 0x98, 0x08, 0x79, 0xd0, 0xc7, 0x8b, 0x56, 0xa3, 0xa6, 0x8a, 0x70, 0x71, + 0xc6, 0x55, 0x18, 0x6e, 0xb6, 0x3a, 0xe8, 0x9d, 0x93, 0x8e, 0x23, 0xff, 0x24, 0x96, 0xcf, 0xfa, + 0x06, 0xc2, 0x16, 0xe5, 0x31, 0x39, 0xb3, 0xb1, 0x06, 0x29, 0xa7, 0xd9, 0x6d, 0x57, 0xad, 0x72, + 0xb5, 0x59, 0xb3, 0xca, 0x75, 0xfb, 0xa0, 0x99, 0x1e, 0x21, 0x02, 0xce, 0xf7, 0xde, 0x08, 0x61, + 0x2c, 0x20, 0xbe, 0x35, 0xc4, 0x66, 0x26, 0x1d, 0xe9, 0xb3, 0x31, 0x05, 0x43, 0xce, 0x6d, 0xbb, + 0x53, 0x79, 0x3e, 0x3d, 0x4a, 0x22, 0x84, 0x7d, 0xca, 0xfc, 0x20, 0x06, 0xe3, 0x61, 0x42, 0xec, + 0x31, 0x88, 0x1d, 0xe0, 0xbb, 0x44, 0x01, 0x76, 0x02, 0x1b, 0x50, 0x8c, 0x6c, 0xc4, 0xa1, 0x57, + 0x69, 0xc4, 0x1c, 0x24, 0x6c, 0xcb, 0xe9, 0x58, 0x35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 0x37, + 0xce, 0x80, 0xe4, 0x29, 0x18, 0xcb, 0xba, 0x01, 0xf1, 0x03, 0xf4, 0x00, 0x14, 0x42, 0xc4, 0x47, + 0x98, 0x88, 0x61, 0xcc, 0x8f, 0xa1, 0x39, 0x18, 0x3d, 0x6c, 0xb2, 0x32, 0x1c, 0x0c, 0xff, 0x28, + 0x83, 0x27, 0x38, 0x86, 0x89, 0x68, 0x35, 0x5b, 0xdd, 0x06, 0xae, 0xd1, 0xc1, 0x22, 0x3e, 0xc6, + 0x45, 0x70, 0x0c, 0x13, 0x71, 0x02, 0xb3, 0xbe, 0xc0, 0x45, 0x38, 0x1e, 0x7b, 0xbe, 0x19, 0xaf, + 0xf5, 0x36, 0x6e, 0x37, 0xed, 0x30, 0x4a, 0x7c, 0x9c, 0x49, 0x00, 0x06, 0xc1, 0x02, 0x1e, 0x83, + 0x91, 0xb0, 0x8e, 0xf8, 0x24, 0x83, 0xc7, 0x2d, 0xee, 0x01, 0x94, 0x67, 0xbc, 0xc8, 0xe0, 0xbd, + 0x95, 0x60, 0x11, 0x7f, 0xc2, 0x44, 0x24, 0x3d, 0x30, 0x76, 0x1b, 0x1d, 0xcb, 0xe9, 0xa0, 0x47, + 0xf5, 0x10, 0x42, 0x3e, 0xc5, 0x6f, 0x83, 0x41, 0x98, 0x29, 0xf7, 0x2d, 0xbb, 0x7a, 0x14, 0x4e, + 0xc2, 0x8b, 0xdc, 0x94, 0x1c, 0x83, 0x45, 0xa0, 0xca, 0x73, 0x5c, 0x69, 0xa3, 0x87, 0xeb, 0x46, + 0x28, 0x77, 0x7c, 0x9a, 0xc9, 0x18, 0x15, 0x20, 0x66, 0x91, 0xae, 0x7d, 0x12, 0x31, 0x9f, 0xe1, + 0x16, 0xf1, 0xc0, 0x58, 0xea, 0xa1, 0x27, 0x53, 0xdc, 0x49, 0x9c, 0x44, 0xda, 0x9f, 0xf2, 0xd4, + 0xa3, 0xd8, 0x0d, 0xaf, 0x44, 0xe4, 0x69, 0x07,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, 0x07, 0xdc, 0x9b, 0x84, 0x1f, 0xab, 0xa1, 0xce, 0x25, 0xc1, 0x32, 0xfe, + 0x88, 0xab, 0xa1, 0x4c, 0x25, 0x68, 0x66, 0x32, 0x7a, 0xe7, 0x91, 0x60, 0x79, 0xef, 0x67, 0xf2, + 0x26, 0x7a, 0xa6, 0x91, 0xec, 0x5b, 0x61, 0xca, 0x7f, 0x0e, 0x09, 0x96, 0xfa, 0x81, 0x57, 0x94, + 0xae, 0xdf, 0x3b, 0x85, 0xa0, 0x29, 0x6f, 0xd2, 0x6f, 0xfe, 0x08, 0x16, 0xfb, 0xc1, 0x57, 0xe4, + 0x07, 0x3b, 0xef, 0xf4, 0x81, 0x3a, 0x34, 0x70, 0x4b, 0x77, 0xb0, 0xac, 0x0f, 0x33, 0x59, 0x1e, + 0x10, 0x4e, 0x0d, 0x56, 0xb9, 0x83, 0xf1, 0x1f, 0xe1, 0xa9, 0xc1, 0x10, 0x08, 0x1c, 0xb7, 0xbb, + 0x8d, 0x06, 0x0e, 0x0e, 0x63, 0xf0, 0x91, 0x86, 0xf4, 0x7f, 0xfe, 0x88, 0x25, 0x06, 0x07, 0xa0, + 0x1a, 0x1a, 0xb3, 0x8e, 0xf7, 0x91, 0x0d, 0x02, 0x90, 0xff, 0xf5, 0x23, 0x5e, 0x10, 0x30, 0x37, + 0xca, 0x27, 0xa0, 0x0f, 0x8d, 0x64, 0x0d, 0x3b, 0x00, 0xfb, 0xdf, 0x3f, 0x62, 0xdb, 0xac, 0x2e, + 0xc4, 0x15, 0x40, 0x37, 0x6d, 0x07, 0x0b, 0xf8, 0xae, 0x2c, 0x80, 0x3c, 0x68, 0xde, 0x80, 0x61, + 0x7c, 0xb2, 0xa3, 0x53, 0x39, 0x0c, 0x42, 0xff, 0x0f, 0x43, 0x73, 0x7e, 0x6c, 0xb0, 0xe3, 0x66, + 0xdb, 0x42, 0x6f, 0x9d, 0x20, 0xec, 0xff, 0x32, 0xac, 0x00, 0x60, 0x70, 0x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14, 0xfc, 0x82, 0x06, + 0x93, 0x4a, 0x79, 0xa5, 0xea, 0x2d, 0x28, 0xea, 0xdd, 0xd3, 0x7b, 0x25, 0xc2, 0xe8, 0xd1, 0xce, + 0xeb, 0x5e, 0x05, 0xe0, 0x91, 0x2c, 0xfc, 0xbe, 0xa2, 0xf8, 0xfd, 0xac, 0x00, 0xf8, 0x98, 0x8b, + 0x47, 0x00, 0x53, 0xbb, 0x09, 0xd1, 0xdd, 0xb6, 0x85, 0x97, 0x20, 0x22, 0x5b, 0x6d, 0xa6, 0x61, + 0x92, 0xe2, 0xb7, 0xda, 0xf9, 0x76, 0xc5, 0xae, 0x1e, 0x99, 0x91, 0x66, 0x1b, 0x4d, 0xb6, 0x7a, + 0x8e, 0x7d, 0xe1, 0x38, 0xb1, 0x3c, 0x4e, 0x19, 0xd0, 0x00, 0xe3, 0xd0, 0x2b, 0x76, 0x0d, 0x89, + 0x88, 0xae, 0x5b, 0x95, 0x03, 0xa6, 0x04, 0x50, 0x1e, 0x3c, 0x62, 0x46, 0x1b, 0xe8, 0x7f, 0x76, + 0xc1, 0x27, 0x21, 0xce, 0x05, 0x1b, 0x33, 0x18, 0x71, 0xd0, 0x61, 0x97, 0x65, 0x08, 0xac, 0x0e, + 0x9b, 0xb9, 0x10, 0xee, 0xa0, 0x63, 0x5c, 0x82, 0x98, 0x59, 0x3f, 0x3c, 0xea, 0xb0, 0x8b, 0xf7, + 0xb2, 0xc5, 0xda, 0x98, 0x9c, 0x79, 0x0a, 0x46, 0x84, 0x46, 0xaf, 0xb1, 0xe8, 0x22, 0xbd, 0x35, + 0xf4, 0x24, 0xec, 0x99, 0x4f, 0xf8, 0xba, 0x25, 0xfb, 0x32, 0xe7, 0x05, 0x88, 0x23, 0x33, 0xbb, + 0x45, 0x9f, 0x77, 0xa4, 0x78, 0xe7, 0x9d, 0x8c, 0x66, 0xde, 0xa9, 0x41, 0xbc, 0x68, 0x59, 0x2d, + 0x62, 0xf0, 0x07, 0x21, 0x5a, 0x6c, 0x3e, 0x67, 0x33, 0x05, 0x27, 0x98, 0x45, 0x31, 0x99, 0xd9, + 0x34, 0x5a, 0x43, 0x64, 0xc4, 0xe6, 0xb1, 0xfb, 0x69, 0x61, 0x77, 0x0f, 0x1f, 0xb1, 0x7d, 0x46, + 0xb2, 0x3d, 0x73, 0x20, 0x66, 0xea, 0xb1, 0xff, 0x35, 0x48, 0x78, 0xae, 0x62, 0xcc, 0x32, 0x35, + 0x22, 0x2a, 0xd0, 0x6b, 0x2b, 0xac, 0x49, 0xc6, 0x82, 0x31, 0xe9, 0xc2, 0x18, 0xea, 0x31, 0x71, + 0x1f, 0x28, 0x31, 0xf3, 0x9c, 0x6c, 0x66, 0x7f, 0x56, 0x66, 0xea, 0x45, 0x6a, 0x23, 0x62, 0xee, + 0x19, 0x1a, 0x9c, 0xfd, 0x9d, 0xd8, 0x41, 0xef, 0x33, 0x31, 0xd0, 0x37, 0xeb, 0x8d, 0xcc, 0x9b, + 0x00, 0x68, 0xca, 0xe3, 0x43, 0x54, 0x4a, 0xd6, 0x25, 0xb9, 0x81, 0x77, 0x8f, 0xac, 0x5d, 0xf4, + 0x17, 0xb3, 0xc8, 0xfd, 0x14, 0x2e, 0x30, 0x40, 0x53, 0x8c, 0xe0, 0x1f, 0x0e, 0xc4, 0xfb, 0x76, + 0x62, 0x98, 0x35, 0x4d, 0x59, 0x9f, 0xb2, 0x3a, 0x39, 0xbb, 0xd9, 0x39, 0xb2, 0xda, 0x0a, 0x62, + 0xd9, 0xb8, 0x2c, 0x25, 0x6c, 0x72, 0xf9, 0x3e, 0x81, 0xe8, 0x0b, 0xba, 0x9c, 0xf9, 0x1c, 0x51, + 0x10, 0xb7, 0x02, 0x3d, 0x37, 0xa8, 0x87, 0xb8, 0x41, 0xe3, 0xaa, 0xd4, 0xbf, 0x0d, 0x50, 0x53, + 0x79, 0xb4, 0xbc, 0x21, 0x3d, 0xe7, 0x0c, 0x56, 0x56, 0x7e, 0xc6, 0xe4, 0x36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 0xc1, 0x23, 0x99, 0x4f, 0x4c, 0x37, 0x82, 0x8f, 0x1f, 0x41, 0x92, 0xf9, 0x8a, 0x22, + 0xca, 0x2e, 0x29, 0x87, 0x91, 0x64, 0xbe, 0x92, 0x88, 0xb7, 0x4b, 0xca, 0xd6, 0x93, 0xcc, 0x77, + 0x53, 0x44, 0xde, 0x25, 0x65, 0x13, 0x4a, 0xe6, 0x5b, 0x15, 0x31, 0x78, 0x49, 0x39, 0xaa, 0x24, + 0xf3, 0x3d, 0x21, 0xa2, 0xf1, 0x92, 0x72, 0x68, 0x49, 0xe6, 0x5b, 0x13, 0x71, 0x39, 0xab, 0x1e, + 0x5f, 0x92, 0x19, 0x6f, 0xb9, 0x11, 0x3a, 0xab, 0x1e, 0x64, 0x92, 0x39, 0x7f, 0xce, 0x8d, 0xd5, + 0x59, 0xf5, 0x48, 0x93, 0xcc, 0xb9, 0xee, 0x46, 0xed, 0xac, 0xba, 0x55, 0x26, 0x73, 0x6e, 0xb8, + 0xf1, 0x3b, 0xab, 0x6e, 0x9a, 0xc9, 0x9c, 0x9b, 0x6e, 0x24, 0xcf, 0xaa, 0xdb, 0x67, 0x32, 0xe7, + 0x96, 0xbb, 0x86, 0xfe, 0x65, 0x25, 0xfc, 0x3c, 0x87, 0xa0, 0x32, 0x4a, 0xf8, 0x81, 0x4f, 0xe8, + 0x65, 0x94, 0xd0, 0x03, 0x9f, 0xb0, 0xcb, 0x28, 0x61, 0x07, 0x3e, 0x21, 0x97, 0x51, 0x42, 0x0e, + 0x7c, 0xc2, 0x2d, 0xa3, 0x84, 0x1b, 0xf8, 0x84, 0x5a, 0x46, 0x09, 0x35, 0xf0, 0x09, 0xb3, 0x8c, + 0x12, 0x66, 0xe0, 0x13, 0x62, 0x19, 0x25, 0xc4, 0xc0, 0x27, 0xbc, 0x32, 0x4a, 0x78, 0x81, 0x4f, + 0x68, 0xcd, 0xa8, 0xa1, 0x05, 0x7e, 0x61, 0x35, 0xa3, 0x86, 0x15, 0x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xec, 0xdb, 0xc9, 0x35, 0x88, 0x09, 0x29, 0x08, 0x85, 0x8b, 0xbe, 0x42, 0x8e, 0x3c, 0xa7, 0xa9, + 0x8b, 0x42, 0xe1, 0x92, 0x2f, 0x6f, 0x3d, 0xe0, 0x54, 0x51, 0x29, 0xbb, 0xc0, 0xa6, 0x91, 0xdc, + 0x92, 0x71, 0x86, 0x47, 0x81, 0x94, 0xe3, 0xcc, 0x40, 0x74, 0x46, 0xc9, 0x2d, 0xa1, 0x3b, 0xa4, + 0x80, 0x7c, 0x5f, 0x40, 0x7f, 0x2b, 0x51, 0x21, 0xf9, 0xa5, 0xec, 0x13, 0x4c, 0x48, 0xa1, 0xaf, + 0x90, 0x00, 0x53, 0x51, 0x49, 0x85, 0xa5, 0xfc, 0xee, 0x9d, 0x6f, 0x9c, 0x3b, 0xf5, 0x55, 0xf4, + 0xfa, 0x57, 0xf4, 0xfa, 0xfa, 0x37, 0xce, 0x69, 0xdf, 0x41, 0xaf, 0xef, 0xa1, 0xd7, 0x0f, 0xd1, + 0xeb, 0x1d, 0xdf, 0x3c, 0xa7, 0xbd, 0x88, 0x5e, 0x9f, 0x43, 0xaf, 0xbf, 0x41, 0xaf, 0x97, 0xd0, + 0xeb, 0xce, 0x37, 0x11, 0x3f, 0x7a, 0x7d, 0x1d, 0xbd, 0xff, 0x0e, 0xfa, 0xfb, 0x3d, 0xf4, 0xf7, + 0x87, 0xe8, 0xf5, 0x8e, 0x6f, 0x9d, 0xd3, 0x5e, 0xf8, 0xd6, 0xb9, 0x53, 0x2f, 0xa2, 0xbf, 0xff, + 0x1f, 0x00, 0x00, 0xff, 0xff, 0x19, 0x57, 0xf3, 0x99, 0x1b, 0x5f, 0x00, 0x00, + } + r := bytes.NewReader(gzipped) + gzipr, err := compress_gzip.NewReader(r) + if err != nil { + panic(err) + } + ungzipped, err := io_ioutil.ReadAll(gzipr) + if err != nil { + panic(err) + } + if err := github_com_gogo_protobuf_proto.Unmarshal(ungzipped, d); err != nil { + panic(err) + } + return d +} +func (x TheTestEnum) String() string { + s, ok := TheTestEnum_name[int32(x)] + if ok { + return s + } + return strconv.Itoa(int(x)) +} +func (x AnotherTestEnum) String() string { + s, ok := AnotherTestEnum_name[int32(x)] + if ok { + return s + } + return strconv.Itoa(int(x)) +} +func (x YetAnotherTestEnum) String() string { + s, ok := YetAnotherTestEnum_name[int32(x)] + if ok { + return s + } + return strconv.Itoa(int(x)) +} +func (x YetYetAnotherTestEnum) String() string { + s, ok := YetYetAnotherTestEnum_name[int32(x)] + if ok { + return s + } + return strconv.Itoa(int(x)) +} +func (x NestedDefinition_NestedEnum) String() string { + s, ok := NestedDefinition_NestedEnum_name[int32(x)] + if ok { + return s + } + return strconv.Itoa(int(x)) +} +func (this *NidOptNative) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NidOptNative) + if !ok { + that2, ok := that.(NidOptNative) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NidOptNative") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NidOptNative but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NidOptNative but is not nil && this == nil") + } + if this.Field1 != that1.Field1 { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) + } + if this.Field2 != that1.Field2 { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) + } + if this.Field3 != that1.Field3 { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", this.Field3, that1.Field3) + } + if this.Field4 != that1.Field4 { + return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", this.Field4, that1.Field4) + } + if this.Field5 != that1.Field5 { + return fmt.Errorf("Field5 this(%v) Not Equal that(%v)", this.Field5, that1.Field5) + } + if this.Field6 != that1.Field6 { + return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", this.Field6, that1.Field6) + } + if this.Field7 != that1.Field7 { + return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", this.Field7, that1.Field7) + } + if this.Field8 != that1.Field8 { + return fmt.Errorf("Field8 this(%v) Not Equal that(%v)", this.Field8, that1.Field8) + } + if this.Field9 != that1.Field9 { + return fmt.Errorf("Field9 this(%v) Not Equal that(%v)", this.Field9, that1.Field9) + } + if this.Field10 != that1.Field10 { + return fmt.Errorf("Field10 this(%v) Not Equal that(%v)", this.Field10, that1.Field10) + } + if this.Field11 != that1.Field11 { + return fmt.Errorf("Field11 this(%v) Not Equal that(%v)", this.Field11, that1.Field11) + } + if this.Field12 != that1.Field12 { + return fmt.Errorf("Field12 this(%v) Not Equal that(%v)", this.Field12, that1.Field12) + } + if this.Field13 != that1.Field13 { + return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", this.Field13, that1.Field13) + } + if this.Field14 != that1.Field14 { + return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", this.Field14, that1.Field14) + } + if !bytes.Equal(this.Field15, that1.Field15) { + return fmt.Errorf("Field15 this(%v) Not Equal that(%v)", this.Field15, that1.Field15) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NidOptNative) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*NidOptNative) + if !ok { + that2, ok := that.(NidOptNative) + 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.Field1 != that1.Field1 { + return false + } + if this.Field2 != that1.Field2 { + return false + } + if this.Field3 != that1.Field3 { + return false + } + if this.Field4 != that1.Field4 { + return false + } + if this.Field5 != that1.Field5 { + return false + } + if this.Field6 != that1.Field6 { + return false + } + if this.Field7 != that1.Field7 { + return false + } + if this.Field8 != that1.Field8 { + return false + } + if this.Field9 != that1.Field9 { + return false + } + if this.Field10 != that1.Field10 { + return false + } + if this.Field11 != that1.Field11 { + return false + } + if this.Field12 != that1.Field12 { + return false + } + if this.Field13 != that1.Field13 { + return false + } + if this.Field14 != that1.Field14 { + return false + } + if !bytes.Equal(this.Field15, that1.Field15) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NinOptNative) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NinOptNative) + if !ok { + that2, ok := that.(NinOptNative) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NinOptNative") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NinOptNative but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NinOptNative but is not nil && this == nil") + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) + } + } else if this.Field1 != nil { + return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") + } else if that1.Field1 != nil { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", *this.Field2, *that1.Field2) + } + } else if this.Field2 != nil { + return fmt.Errorf("this.Field2 == nil && that.Field2 != nil") + } else if that1.Field2 != nil { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) + } + if this.Field3 != nil && that1.Field3 != nil { + if *this.Field3 != *that1.Field3 { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", *this.Field3, *that1.Field3) + } + } else if this.Field3 != nil { + return fmt.Errorf("this.Field3 == nil && that.Field3 != nil") + } else if that1.Field3 != nil { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", this.Field3, that1.Field3) + } + if this.Field4 != nil && that1.Field4 != nil { + if *this.Field4 != *that1.Field4 { + return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", *this.Field4, *that1.Field4) + } + } else if this.Field4 != nil { + return fmt.Errorf("this.Field4 == nil && that.Field4 != nil") + } else if that1.Field4 != nil { + return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", this.Field4, that1.Field4) + } + if this.Field5 != nil && that1.Field5 != nil { + if *this.Field5 != *that1.Field5 { + return fmt.Errorf("Field5 this(%v) Not Equal that(%v)", *this.Field5, *that1.Field5) + } + } else if this.Field5 != nil { + return fmt.Errorf("this.Field5 == nil && that.Field5 != nil") + } else if that1.Field5 != nil { + return fmt.Errorf("Field5 this(%v) Not Equal that(%v)", this.Field5, that1.Field5) + } + if this.Field6 != nil && that1.Field6 != nil { + if *this.Field6 != *that1.Field6 { + return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", *this.Field6, *that1.Field6) + } + } else if this.Field6 != nil { + return fmt.Errorf("this.Field6 == nil && that.Field6 != nil") + } else if that1.Field6 != nil { + return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", this.Field6, that1.Field6) + } + if this.Field7 != nil && that1.Field7 != nil { + if *this.Field7 != *that1.Field7 { + return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", *this.Field7, *that1.Field7) + } + } else if this.Field7 != nil { + return fmt.Errorf("this.Field7 == nil && that.Field7 != nil") + } else if that1.Field7 != nil { + return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", this.Field7, that1.Field7) + } + if this.Field8 != nil && that1.Field8 != nil { + if *this.Field8 != *that1.Field8 { + return fmt.Errorf("Field8 this(%v) Not Equal that(%v)", *this.Field8, *that1.Field8) + } + } else if this.Field8 != nil { + return fmt.Errorf("this.Field8 == nil && that.Field8 != nil") + } else if that1.Field8 != nil { + return fmt.Errorf("Field8 this(%v) Not Equal that(%v)", this.Field8, that1.Field8) + } + if this.Field9 != nil && that1.Field9 != nil { + if *this.Field9 != *that1.Field9 { + return fmt.Errorf("Field9 this(%v) Not Equal that(%v)", *this.Field9, *that1.Field9) + } + } else if this.Field9 != nil { + return fmt.Errorf("this.Field9 == nil && that.Field9 != nil") + } else if that1.Field9 != nil { + return fmt.Errorf("Field9 this(%v) Not Equal that(%v)", this.Field9, that1.Field9) + } + if this.Field10 != nil && that1.Field10 != nil { + if *this.Field10 != *that1.Field10 { + return fmt.Errorf("Field10 this(%v) Not Equal that(%v)", *this.Field10, *that1.Field10) + } + } else if this.Field10 != nil { + return fmt.Errorf("this.Field10 == nil && that.Field10 != nil") + } else if that1.Field10 != nil { + return fmt.Errorf("Field10 this(%v) Not Equal that(%v)", this.Field10, that1.Field10) + } + if this.Field11 != nil && that1.Field11 != nil { + if *this.Field11 != *that1.Field11 { + return fmt.Errorf("Field11 this(%v) Not Equal that(%v)", *this.Field11, *that1.Field11) + } + } else if this.Field11 != nil { + return fmt.Errorf("this.Field11 == nil && that.Field11 != nil") + } else if that1.Field11 != nil { + return fmt.Errorf("Field11 this(%v) Not Equal that(%v)", this.Field11, that1.Field11) + } + if this.Field12 != nil && that1.Field12 != nil { + if *this.Field12 != *that1.Field12 { + return fmt.Errorf("Field12 this(%v) Not Equal that(%v)", *this.Field12, *that1.Field12) + } + } else if this.Field12 != nil { + return fmt.Errorf("this.Field12 == nil && that.Field12 != nil") + } else if that1.Field12 != nil { + return fmt.Errorf("Field12 this(%v) Not Equal that(%v)", this.Field12, that1.Field12) + } + if this.Field13 != nil && that1.Field13 != nil { + if *this.Field13 != *that1.Field13 { + return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", *this.Field13, *that1.Field13) + } + } else if this.Field13 != nil { + return fmt.Errorf("this.Field13 == nil && that.Field13 != nil") + } else if that1.Field13 != nil { + return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", this.Field13, that1.Field13) + } + if this.Field14 != nil && that1.Field14 != nil { + if *this.Field14 != *that1.Field14 { + return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", *this.Field14, *that1.Field14) + } + } else if this.Field14 != nil { + return fmt.Errorf("this.Field14 == nil && that.Field14 != nil") + } else if that1.Field14 != nil { + return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", this.Field14, that1.Field14) + } + if !bytes.Equal(this.Field15, that1.Field15) { + return fmt.Errorf("Field15 this(%v) Not Equal that(%v)", this.Field15, that1.Field15) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NinOptNative) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*NinOptNative) + if !ok { + that2, ok := that.(NinOptNative) + 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.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return false + } + } else if this.Field1 != nil { + return false + } else if that1.Field1 != nil { + return false + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + return false + } + } else if this.Field2 != nil { + return false + } else if that1.Field2 != nil { + return false + } + if this.Field3 != nil && that1.Field3 != nil { + if *this.Field3 != *that1.Field3 { + return false + } + } else if this.Field3 != nil { + return false + } else if that1.Field3 != nil { + return false + } + if this.Field4 != nil && that1.Field4 != nil { + if *this.Field4 != *that1.Field4 { + return false + } + } else if this.Field4 != nil { + return false + } else if that1.Field4 != nil { + return false + } + if this.Field5 != nil && that1.Field5 != nil { + if *this.Field5 != *that1.Field5 { + return false + } + } else if this.Field5 != nil { + return false + } else if that1.Field5 != nil { + return false + } + if this.Field6 != nil && that1.Field6 != nil { + if *this.Field6 != *that1.Field6 { + return false + } + } else if this.Field6 != nil { + return false + } else if that1.Field6 != nil { + return false + } + if this.Field7 != nil && that1.Field7 != nil { + if *this.Field7 != *that1.Field7 { + return false + } + } else if this.Field7 != nil { + return false + } else if that1.Field7 != nil { + return false + } + if this.Field8 != nil && that1.Field8 != nil { + if *this.Field8 != *that1.Field8 { + return false + } + } else if this.Field8 != nil { + return false + } else if that1.Field8 != nil { + return false + } + if this.Field9 != nil && that1.Field9 != nil { + if *this.Field9 != *that1.Field9 { + return false + } + } else if this.Field9 != nil { + return false + } else if that1.Field9 != nil { + return false + } + if this.Field10 != nil && that1.Field10 != nil { + if *this.Field10 != *that1.Field10 { + return false + } + } else if this.Field10 != nil { + return false + } else if that1.Field10 != nil { + return false + } + if this.Field11 != nil && that1.Field11 != nil { + if *this.Field11 != *that1.Field11 { + return false + } + } else if this.Field11 != nil { + return false + } else if that1.Field11 != nil { + return false + } + if this.Field12 != nil && that1.Field12 != nil { + if *this.Field12 != *that1.Field12 { + return false + } + } else if this.Field12 != nil { + return false + } else if that1.Field12 != nil { + return false + } + if this.Field13 != nil && that1.Field13 != nil { + if *this.Field13 != *that1.Field13 { + return false + } + } else if this.Field13 != nil { + return false + } else if that1.Field13 != nil { + return false + } + if this.Field14 != nil && that1.Field14 != nil { + if *this.Field14 != *that1.Field14 { + return false + } + } else if this.Field14 != nil { + return false + } else if that1.Field14 != nil { + return false + } + if !bytes.Equal(this.Field15, that1.Field15) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NidRepNative) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NidRepNative) + if !ok { + that2, ok := that.(NidRepNative) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NidRepNative") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NidRepNative but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NidRepNative but is not nil && this == nil") + } + if len(this.Field1) != len(that1.Field1) { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", len(this.Field1), len(that1.Field1)) + } + for i := range this.Field1 { + if this.Field1[i] != that1.Field1[i] { + return fmt.Errorf("Field1 this[%v](%v) Not Equal that[%v](%v)", i, this.Field1[i], i, that1.Field1[i]) + } + } + if len(this.Field2) != len(that1.Field2) { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", len(this.Field2), len(that1.Field2)) + } + for i := range this.Field2 { + if this.Field2[i] != that1.Field2[i] { + return fmt.Errorf("Field2 this[%v](%v) Not Equal that[%v](%v)", i, this.Field2[i], i, that1.Field2[i]) + } + } + if len(this.Field3) != len(that1.Field3) { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", len(this.Field3), len(that1.Field3)) + } + for i := range this.Field3 { + if this.Field3[i] != that1.Field3[i] { + return fmt.Errorf("Field3 this[%v](%v) Not Equal that[%v](%v)", i, this.Field3[i], i, that1.Field3[i]) + } + } + if len(this.Field4) != len(that1.Field4) { + return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", len(this.Field4), len(that1.Field4)) + } + for i := range this.Field4 { + if this.Field4[i] != that1.Field4[i] { + return fmt.Errorf("Field4 this[%v](%v) Not Equal that[%v](%v)", i, this.Field4[i], i, that1.Field4[i]) + } + } + if len(this.Field5) != len(that1.Field5) { + return fmt.Errorf("Field5 this(%v) Not Equal that(%v)", len(this.Field5), len(that1.Field5)) + } + for i := range this.Field5 { + if this.Field5[i] != that1.Field5[i] { + return fmt.Errorf("Field5 this[%v](%v) Not Equal that[%v](%v)", i, this.Field5[i], i, that1.Field5[i]) + } + } + if len(this.Field6) != len(that1.Field6) { + return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", len(this.Field6), len(that1.Field6)) + } + for i := range this.Field6 { + if this.Field6[i] != that1.Field6[i] { + return fmt.Errorf("Field6 this[%v](%v) Not Equal that[%v](%v)", i, this.Field6[i], i, that1.Field6[i]) + } + } + if len(this.Field7) != len(that1.Field7) { + return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", len(this.Field7), len(that1.Field7)) + } + for i := range this.Field7 { + if this.Field7[i] != that1.Field7[i] { + return fmt.Errorf("Field7 this[%v](%v) Not Equal that[%v](%v)", i, this.Field7[i], i, that1.Field7[i]) + } + } + if len(this.Field8) != len(that1.Field8) { + return fmt.Errorf("Field8 this(%v) Not Equal that(%v)", len(this.Field8), len(that1.Field8)) + } + for i := range this.Field8 { + if this.Field8[i] != that1.Field8[i] { + return fmt.Errorf("Field8 this[%v](%v) Not Equal that[%v](%v)", i, this.Field8[i], i, that1.Field8[i]) + } + } + if len(this.Field9) != len(that1.Field9) { + return fmt.Errorf("Field9 this(%v) Not Equal that(%v)", len(this.Field9), len(that1.Field9)) + } + for i := range this.Field9 { + if this.Field9[i] != that1.Field9[i] { + return fmt.Errorf("Field9 this[%v](%v) Not Equal that[%v](%v)", i, this.Field9[i], i, that1.Field9[i]) + } + } + if len(this.Field10) != len(that1.Field10) { + return fmt.Errorf("Field10 this(%v) Not Equal that(%v)", len(this.Field10), len(that1.Field10)) + } + for i := range this.Field10 { + if this.Field10[i] != that1.Field10[i] { + return fmt.Errorf("Field10 this[%v](%v) Not Equal that[%v](%v)", i, this.Field10[i], i, that1.Field10[i]) + } + } + if len(this.Field11) != len(that1.Field11) { + return fmt.Errorf("Field11 this(%v) Not Equal that(%v)", len(this.Field11), len(that1.Field11)) + } + for i := range this.Field11 { + if this.Field11[i] != that1.Field11[i] { + return fmt.Errorf("Field11 this[%v](%v) Not Equal that[%v](%v)", i, this.Field11[i], i, that1.Field11[i]) + } + } + if len(this.Field12) != len(that1.Field12) { + return fmt.Errorf("Field12 this(%v) Not Equal that(%v)", len(this.Field12), len(that1.Field12)) + } + for i := range this.Field12 { + if this.Field12[i] != that1.Field12[i] { + return fmt.Errorf("Field12 this[%v](%v) Not Equal that[%v](%v)", i, this.Field12[i], i, that1.Field12[i]) + } + } + if len(this.Field13) != len(that1.Field13) { + return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", len(this.Field13), len(that1.Field13)) + } + for i := range this.Field13 { + if this.Field13[i] != that1.Field13[i] { + return fmt.Errorf("Field13 this[%v](%v) Not Equal that[%v](%v)", i, this.Field13[i], i, that1.Field13[i]) + } + } + if len(this.Field14) != len(that1.Field14) { + return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", len(this.Field14), len(that1.Field14)) + } + for i := range this.Field14 { + if this.Field14[i] != that1.Field14[i] { + return fmt.Errorf("Field14 this[%v](%v) Not Equal that[%v](%v)", i, this.Field14[i], i, that1.Field14[i]) + } + } + if len(this.Field15) != len(that1.Field15) { + return fmt.Errorf("Field15 this(%v) Not Equal that(%v)", len(this.Field15), len(that1.Field15)) + } + for i := range this.Field15 { + if !bytes.Equal(this.Field15[i], that1.Field15[i]) { + return fmt.Errorf("Field15 this[%v](%v) Not Equal that[%v](%v)", i, this.Field15[i], i, that1.Field15[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NidRepNative) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*NidRepNative) + if !ok { + that2, ok := that.(NidRepNative) + 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.Field1) != len(that1.Field1) { + return false + } + for i := range this.Field1 { + if this.Field1[i] != that1.Field1[i] { + return false + } + } + if len(this.Field2) != len(that1.Field2) { + return false + } + for i := range this.Field2 { + if this.Field2[i] != that1.Field2[i] { + return false + } + } + if len(this.Field3) != len(that1.Field3) { + return false + } + for i := range this.Field3 { + if this.Field3[i] != that1.Field3[i] { + return false + } + } + if len(this.Field4) != len(that1.Field4) { + return false + } + for i := range this.Field4 { + if this.Field4[i] != that1.Field4[i] { + return false + } + } + if len(this.Field5) != len(that1.Field5) { + return false + } + for i := range this.Field5 { + if this.Field5[i] != that1.Field5[i] { + return false + } + } + if len(this.Field6) != len(that1.Field6) { + return false + } + for i := range this.Field6 { + if this.Field6[i] != that1.Field6[i] { + return false + } + } + if len(this.Field7) != len(that1.Field7) { + return false + } + for i := range this.Field7 { + if this.Field7[i] != that1.Field7[i] { + return false + } + } + if len(this.Field8) != len(that1.Field8) { + return false + } + for i := range this.Field8 { + if this.Field8[i] != that1.Field8[i] { + return false + } + } + if len(this.Field9) != len(that1.Field9) { + return false + } + for i := range this.Field9 { + if this.Field9[i] != that1.Field9[i] { + return false + } + } + if len(this.Field10) != len(that1.Field10) { + return false + } + for i := range this.Field10 { + if this.Field10[i] != that1.Field10[i] { + return false + } + } + if len(this.Field11) != len(that1.Field11) { + return false + } + for i := range this.Field11 { + if this.Field11[i] != that1.Field11[i] { + return false + } + } + if len(this.Field12) != len(that1.Field12) { + return false + } + for i := range this.Field12 { + if this.Field12[i] != that1.Field12[i] { + return false + } + } + if len(this.Field13) != len(that1.Field13) { + return false + } + for i := range this.Field13 { + if this.Field13[i] != that1.Field13[i] { + return false + } + } + if len(this.Field14) != len(that1.Field14) { + return false + } + for i := range this.Field14 { + if this.Field14[i] != that1.Field14[i] { + return false + } + } + if len(this.Field15) != len(that1.Field15) { + return false + } + for i := range this.Field15 { + if !bytes.Equal(this.Field15[i], that1.Field15[i]) { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NinRepNative) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NinRepNative) + if !ok { + that2, ok := that.(NinRepNative) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NinRepNative") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NinRepNative but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NinRepNative but is not nil && this == nil") + } + if len(this.Field1) != len(that1.Field1) { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", len(this.Field1), len(that1.Field1)) + } + for i := range this.Field1 { + if this.Field1[i] != that1.Field1[i] { + return fmt.Errorf("Field1 this[%v](%v) Not Equal that[%v](%v)", i, this.Field1[i], i, that1.Field1[i]) + } + } + if len(this.Field2) != len(that1.Field2) { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", len(this.Field2), len(that1.Field2)) + } + for i := range this.Field2 { + if this.Field2[i] != that1.Field2[i] { + return fmt.Errorf("Field2 this[%v](%v) Not Equal that[%v](%v)", i, this.Field2[i], i, that1.Field2[i]) + } + } + if len(this.Field3) != len(that1.Field3) { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", len(this.Field3), len(that1.Field3)) + } + for i := range this.Field3 { + if this.Field3[i] != that1.Field3[i] { + return fmt.Errorf("Field3 this[%v](%v) Not Equal that[%v](%v)", i, this.Field3[i], i, that1.Field3[i]) + } + } + if len(this.Field4) != len(that1.Field4) { + return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", len(this.Field4), len(that1.Field4)) + } + for i := range this.Field4 { + if this.Field4[i] != that1.Field4[i] { + return fmt.Errorf("Field4 this[%v](%v) Not Equal that[%v](%v)", i, this.Field4[i], i, that1.Field4[i]) + } + } + if len(this.Field5) != len(that1.Field5) { + return fmt.Errorf("Field5 this(%v) Not Equal that(%v)", len(this.Field5), len(that1.Field5)) + } + for i := range this.Field5 { + if this.Field5[i] != that1.Field5[i] { + return fmt.Errorf("Field5 this[%v](%v) Not Equal that[%v](%v)", i, this.Field5[i], i, that1.Field5[i]) + } + } + if len(this.Field6) != len(that1.Field6) { + return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", len(this.Field6), len(that1.Field6)) + } + for i := range this.Field6 { + if this.Field6[i] != that1.Field6[i] { + return fmt.Errorf("Field6 this[%v](%v) Not Equal that[%v](%v)", i, this.Field6[i], i, that1.Field6[i]) + } + } + if len(this.Field7) != len(that1.Field7) { + return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", len(this.Field7), len(that1.Field7)) + } + for i := range this.Field7 { + if this.Field7[i] != that1.Field7[i] { + return fmt.Errorf("Field7 this[%v](%v) Not Equal that[%v](%v)", i, this.Field7[i], i, that1.Field7[i]) + } + } + if len(this.Field8) != len(that1.Field8) { + return fmt.Errorf("Field8 this(%v) Not Equal that(%v)", len(this.Field8), len(that1.Field8)) + } + for i := range this.Field8 { + if this.Field8[i] != that1.Field8[i] { + return fmt.Errorf("Field8 this[%v](%v) Not Equal that[%v](%v)", i, this.Field8[i], i, that1.Field8[i]) + } + } + if len(this.Field9) != len(that1.Field9) { + return fmt.Errorf("Field9 this(%v) Not Equal that(%v)", len(this.Field9), len(that1.Field9)) + } + for i := range this.Field9 { + if this.Field9[i] != that1.Field9[i] { + return fmt.Errorf("Field9 this[%v](%v) Not Equal that[%v](%v)", i, this.Field9[i], i, that1.Field9[i]) + } + } + if len(this.Field10) != len(that1.Field10) { + return fmt.Errorf("Field10 this(%v) Not Equal that(%v)", len(this.Field10), len(that1.Field10)) + } + for i := range this.Field10 { + if this.Field10[i] != that1.Field10[i] { + return fmt.Errorf("Field10 this[%v](%v) Not Equal that[%v](%v)", i, this.Field10[i], i, that1.Field10[i]) + } + } + if len(this.Field11) != len(that1.Field11) { + return fmt.Errorf("Field11 this(%v) Not Equal that(%v)", len(this.Field11), len(that1.Field11)) + } + for i := range this.Field11 { + if this.Field11[i] != that1.Field11[i] { + return fmt.Errorf("Field11 this[%v](%v) Not Equal that[%v](%v)", i, this.Field11[i], i, that1.Field11[i]) + } + } + if len(this.Field12) != len(that1.Field12) { + return fmt.Errorf("Field12 this(%v) Not Equal that(%v)", len(this.Field12), len(that1.Field12)) + } + for i := range this.Field12 { + if this.Field12[i] != that1.Field12[i] { + return fmt.Errorf("Field12 this[%v](%v) Not Equal that[%v](%v)", i, this.Field12[i], i, that1.Field12[i]) + } + } + if len(this.Field13) != len(that1.Field13) { + return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", len(this.Field13), len(that1.Field13)) + } + for i := range this.Field13 { + if this.Field13[i] != that1.Field13[i] { + return fmt.Errorf("Field13 this[%v](%v) Not Equal that[%v](%v)", i, this.Field13[i], i, that1.Field13[i]) + } + } + if len(this.Field14) != len(that1.Field14) { + return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", len(this.Field14), len(that1.Field14)) + } + for i := range this.Field14 { + if this.Field14[i] != that1.Field14[i] { + return fmt.Errorf("Field14 this[%v](%v) Not Equal that[%v](%v)", i, this.Field14[i], i, that1.Field14[i]) + } + } + if len(this.Field15) != len(that1.Field15) { + return fmt.Errorf("Field15 this(%v) Not Equal that(%v)", len(this.Field15), len(that1.Field15)) + } + for i := range this.Field15 { + if !bytes.Equal(this.Field15[i], that1.Field15[i]) { + return fmt.Errorf("Field15 this[%v](%v) Not Equal that[%v](%v)", i, this.Field15[i], i, that1.Field15[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NinRepNative) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*NinRepNative) + if !ok { + that2, ok := that.(NinRepNative) + 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.Field1) != len(that1.Field1) { + return false + } + for i := range this.Field1 { + if this.Field1[i] != that1.Field1[i] { + return false + } + } + if len(this.Field2) != len(that1.Field2) { + return false + } + for i := range this.Field2 { + if this.Field2[i] != that1.Field2[i] { + return false + } + } + if len(this.Field3) != len(that1.Field3) { + return false + } + for i := range this.Field3 { + if this.Field3[i] != that1.Field3[i] { + return false + } + } + if len(this.Field4) != len(that1.Field4) { + return false + } + for i := range this.Field4 { + if this.Field4[i] != that1.Field4[i] { + return false + } + } + if len(this.Field5) != len(that1.Field5) { + return false + } + for i := range this.Field5 { + if this.Field5[i] != that1.Field5[i] { + return false + } + } + if len(this.Field6) != len(that1.Field6) { + return false + } + for i := range this.Field6 { + if this.Field6[i] != that1.Field6[i] { + return false + } + } + if len(this.Field7) != len(that1.Field7) { + return false + } + for i := range this.Field7 { + if this.Field7[i] != that1.Field7[i] { + return false + } + } + if len(this.Field8) != len(that1.Field8) { + return false + } + for i := range this.Field8 { + if this.Field8[i] != that1.Field8[i] { + return false + } + } + if len(this.Field9) != len(that1.Field9) { + return false + } + for i := range this.Field9 { + if this.Field9[i] != that1.Field9[i] { + return false + } + } + if len(this.Field10) != len(that1.Field10) { + return false + } + for i := range this.Field10 { + if this.Field10[i] != that1.Field10[i] { + return false + } + } + if len(this.Field11) != len(that1.Field11) { + return false + } + for i := range this.Field11 { + if this.Field11[i] != that1.Field11[i] { + return false + } + } + if len(this.Field12) != len(that1.Field12) { + return false + } + for i := range this.Field12 { + if this.Field12[i] != that1.Field12[i] { + return false + } + } + if len(this.Field13) != len(that1.Field13) { + return false + } + for i := range this.Field13 { + if this.Field13[i] != that1.Field13[i] { + return false + } + } + if len(this.Field14) != len(that1.Field14) { + return false + } + for i := range this.Field14 { + if this.Field14[i] != that1.Field14[i] { + return false + } + } + if len(this.Field15) != len(that1.Field15) { + return false + } + for i := range this.Field15 { + if !bytes.Equal(this.Field15[i], that1.Field15[i]) { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NidRepPackedNative) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NidRepPackedNative) + if !ok { + that2, ok := that.(NidRepPackedNative) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NidRepPackedNative") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NidRepPackedNative but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NidRepPackedNative but is not nil && this == nil") + } + if len(this.Field1) != len(that1.Field1) { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", len(this.Field1), len(that1.Field1)) + } + for i := range this.Field1 { + if this.Field1[i] != that1.Field1[i] { + return fmt.Errorf("Field1 this[%v](%v) Not Equal that[%v](%v)", i, this.Field1[i], i, that1.Field1[i]) + } + } + if len(this.Field2) != len(that1.Field2) { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", len(this.Field2), len(that1.Field2)) + } + for i := range this.Field2 { + if this.Field2[i] != that1.Field2[i] { + return fmt.Errorf("Field2 this[%v](%v) Not Equal that[%v](%v)", i, this.Field2[i], i, that1.Field2[i]) + } + } + if len(this.Field3) != len(that1.Field3) { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", len(this.Field3), len(that1.Field3)) + } + for i := range this.Field3 { + if this.Field3[i] != that1.Field3[i] { + return fmt.Errorf("Field3 this[%v](%v) Not Equal that[%v](%v)", i, this.Field3[i], i, that1.Field3[i]) + } + } + if len(this.Field4) != len(that1.Field4) { + return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", len(this.Field4), len(that1.Field4)) + } + for i := range this.Field4 { + if this.Field4[i] != that1.Field4[i] { + return fmt.Errorf("Field4 this[%v](%v) Not Equal that[%v](%v)", i, this.Field4[i], i, that1.Field4[i]) + } + } + if len(this.Field5) != len(that1.Field5) { + return fmt.Errorf("Field5 this(%v) Not Equal that(%v)", len(this.Field5), len(that1.Field5)) + } + for i := range this.Field5 { + if this.Field5[i] != that1.Field5[i] { + return fmt.Errorf("Field5 this[%v](%v) Not Equal that[%v](%v)", i, this.Field5[i], i, that1.Field5[i]) + } + } + if len(this.Field6) != len(that1.Field6) { + return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", len(this.Field6), len(that1.Field6)) + } + for i := range this.Field6 { + if this.Field6[i] != that1.Field6[i] { + return fmt.Errorf("Field6 this[%v](%v) Not Equal that[%v](%v)", i, this.Field6[i], i, that1.Field6[i]) + } + } + if len(this.Field7) != len(that1.Field7) { + return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", len(this.Field7), len(that1.Field7)) + } + for i := range this.Field7 { + if this.Field7[i] != that1.Field7[i] { + return fmt.Errorf("Field7 this[%v](%v) Not Equal that[%v](%v)", i, this.Field7[i], i, that1.Field7[i]) + } + } + if len(this.Field8) != len(that1.Field8) { + return fmt.Errorf("Field8 this(%v) Not Equal that(%v)", len(this.Field8), len(that1.Field8)) + } + for i := range this.Field8 { + if this.Field8[i] != that1.Field8[i] { + return fmt.Errorf("Field8 this[%v](%v) Not Equal that[%v](%v)", i, this.Field8[i], i, that1.Field8[i]) + } + } + if len(this.Field9) != len(that1.Field9) { + return fmt.Errorf("Field9 this(%v) Not Equal that(%v)", len(this.Field9), len(that1.Field9)) + } + for i := range this.Field9 { + if this.Field9[i] != that1.Field9[i] { + return fmt.Errorf("Field9 this[%v](%v) Not Equal that[%v](%v)", i, this.Field9[i], i, that1.Field9[i]) + } + } + if len(this.Field10) != len(that1.Field10) { + return fmt.Errorf("Field10 this(%v) Not Equal that(%v)", len(this.Field10), len(that1.Field10)) + } + for i := range this.Field10 { + if this.Field10[i] != that1.Field10[i] { + return fmt.Errorf("Field10 this[%v](%v) Not Equal that[%v](%v)", i, this.Field10[i], i, that1.Field10[i]) + } + } + if len(this.Field11) != len(that1.Field11) { + return fmt.Errorf("Field11 this(%v) Not Equal that(%v)", len(this.Field11), len(that1.Field11)) + } + for i := range this.Field11 { + if this.Field11[i] != that1.Field11[i] { + return fmt.Errorf("Field11 this[%v](%v) Not Equal that[%v](%v)", i, this.Field11[i], i, that1.Field11[i]) + } + } + if len(this.Field12) != len(that1.Field12) { + return fmt.Errorf("Field12 this(%v) Not Equal that(%v)", len(this.Field12), len(that1.Field12)) + } + for i := range this.Field12 { + if this.Field12[i] != that1.Field12[i] { + return fmt.Errorf("Field12 this[%v](%v) Not Equal that[%v](%v)", i, this.Field12[i], i, that1.Field12[i]) + } + } + if len(this.Field13) != len(that1.Field13) { + return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", len(this.Field13), len(that1.Field13)) + } + for i := range this.Field13 { + if this.Field13[i] != that1.Field13[i] { + return fmt.Errorf("Field13 this[%v](%v) Not Equal that[%v](%v)", i, this.Field13[i], i, that1.Field13[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NidRepPackedNative) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*NidRepPackedNative) + if !ok { + that2, ok := that.(NidRepPackedNative) + 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.Field1) != len(that1.Field1) { + return false + } + for i := range this.Field1 { + if this.Field1[i] != that1.Field1[i] { + return false + } + } + if len(this.Field2) != len(that1.Field2) { + return false + } + for i := range this.Field2 { + if this.Field2[i] != that1.Field2[i] { + return false + } + } + if len(this.Field3) != len(that1.Field3) { + return false + } + for i := range this.Field3 { + if this.Field3[i] != that1.Field3[i] { + return false + } + } + if len(this.Field4) != len(that1.Field4) { + return false + } + for i := range this.Field4 { + if this.Field4[i] != that1.Field4[i] { + return false + } + } + if len(this.Field5) != len(that1.Field5) { + return false + } + for i := range this.Field5 { + if this.Field5[i] != that1.Field5[i] { + return false + } + } + if len(this.Field6) != len(that1.Field6) { + return false + } + for i := range this.Field6 { + if this.Field6[i] != that1.Field6[i] { + return false + } + } + if len(this.Field7) != len(that1.Field7) { + return false + } + for i := range this.Field7 { + if this.Field7[i] != that1.Field7[i] { + return false + } + } + if len(this.Field8) != len(that1.Field8) { + return false + } + for i := range this.Field8 { + if this.Field8[i] != that1.Field8[i] { + return false + } + } + if len(this.Field9) != len(that1.Field9) { + return false + } + for i := range this.Field9 { + if this.Field9[i] != that1.Field9[i] { + return false + } + } + if len(this.Field10) != len(that1.Field10) { + return false + } + for i := range this.Field10 { + if this.Field10[i] != that1.Field10[i] { + return false + } + } + if len(this.Field11) != len(that1.Field11) { + return false + } + for i := range this.Field11 { + if this.Field11[i] != that1.Field11[i] { + return false + } + } + if len(this.Field12) != len(that1.Field12) { + return false + } + for i := range this.Field12 { + if this.Field12[i] != that1.Field12[i] { + return false + } + } + if len(this.Field13) != len(that1.Field13) { + return false + } + for i := range this.Field13 { + if this.Field13[i] != that1.Field13[i] { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NinRepPackedNative) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NinRepPackedNative) + if !ok { + that2, ok := that.(NinRepPackedNative) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NinRepPackedNative") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NinRepPackedNative but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NinRepPackedNative but is not nil && this == nil") + } + if len(this.Field1) != len(that1.Field1) { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", len(this.Field1), len(that1.Field1)) + } + for i := range this.Field1 { + if this.Field1[i] != that1.Field1[i] { + return fmt.Errorf("Field1 this[%v](%v) Not Equal that[%v](%v)", i, this.Field1[i], i, that1.Field1[i]) + } + } + if len(this.Field2) != len(that1.Field2) { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", len(this.Field2), len(that1.Field2)) + } + for i := range this.Field2 { + if this.Field2[i] != that1.Field2[i] { + return fmt.Errorf("Field2 this[%v](%v) Not Equal that[%v](%v)", i, this.Field2[i], i, that1.Field2[i]) + } + } + if len(this.Field3) != len(that1.Field3) { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", len(this.Field3), len(that1.Field3)) + } + for i := range this.Field3 { + if this.Field3[i] != that1.Field3[i] { + return fmt.Errorf("Field3 this[%v](%v) Not Equal that[%v](%v)", i, this.Field3[i], i, that1.Field3[i]) + } + } + if len(this.Field4) != len(that1.Field4) { + return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", len(this.Field4), len(that1.Field4)) + } + for i := range this.Field4 { + if this.Field4[i] != that1.Field4[i] { + return fmt.Errorf("Field4 this[%v](%v) Not Equal that[%v](%v)", i, this.Field4[i], i, that1.Field4[i]) + } + } + if len(this.Field5) != len(that1.Field5) { + return fmt.Errorf("Field5 this(%v) Not Equal that(%v)", len(this.Field5), len(that1.Field5)) + } + for i := range this.Field5 { + if this.Field5[i] != that1.Field5[i] { + return fmt.Errorf("Field5 this[%v](%v) Not Equal that[%v](%v)", i, this.Field5[i], i, that1.Field5[i]) + } + } + if len(this.Field6) != len(that1.Field6) { + return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", len(this.Field6), len(that1.Field6)) + } + for i := range this.Field6 { + if this.Field6[i] != that1.Field6[i] { + return fmt.Errorf("Field6 this[%v](%v) Not Equal that[%v](%v)", i, this.Field6[i], i, that1.Field6[i]) + } + } + if len(this.Field7) != len(that1.Field7) { + return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", len(this.Field7), len(that1.Field7)) + } + for i := range this.Field7 { + if this.Field7[i] != that1.Field7[i] { + return fmt.Errorf("Field7 this[%v](%v) Not Equal that[%v](%v)", i, this.Field7[i], i, that1.Field7[i]) + } + } + if len(this.Field8) != len(that1.Field8) { + return fmt.Errorf("Field8 this(%v) Not Equal that(%v)", len(this.Field8), len(that1.Field8)) + } + for i := range this.Field8 { + if this.Field8[i] != that1.Field8[i] { + return fmt.Errorf("Field8 this[%v](%v) Not Equal that[%v](%v)", i, this.Field8[i], i, that1.Field8[i]) + } + } + if len(this.Field9) != len(that1.Field9) { + return fmt.Errorf("Field9 this(%v) Not Equal that(%v)", len(this.Field9), len(that1.Field9)) + } + for i := range this.Field9 { + if this.Field9[i] != that1.Field9[i] { + return fmt.Errorf("Field9 this[%v](%v) Not Equal that[%v](%v)", i, this.Field9[i], i, that1.Field9[i]) + } + } + if len(this.Field10) != len(that1.Field10) { + return fmt.Errorf("Field10 this(%v) Not Equal that(%v)", len(this.Field10), len(that1.Field10)) + } + for i := range this.Field10 { + if this.Field10[i] != that1.Field10[i] { + return fmt.Errorf("Field10 this[%v](%v) Not Equal that[%v](%v)", i, this.Field10[i], i, that1.Field10[i]) + } + } + if len(this.Field11) != len(that1.Field11) { + return fmt.Errorf("Field11 this(%v) Not Equal that(%v)", len(this.Field11), len(that1.Field11)) + } + for i := range this.Field11 { + if this.Field11[i] != that1.Field11[i] { + return fmt.Errorf("Field11 this[%v](%v) Not Equal that[%v](%v)", i, this.Field11[i], i, that1.Field11[i]) + } + } + if len(this.Field12) != len(that1.Field12) { + return fmt.Errorf("Field12 this(%v) Not Equal that(%v)", len(this.Field12), len(that1.Field12)) + } + for i := range this.Field12 { + if this.Field12[i] != that1.Field12[i] { + return fmt.Errorf("Field12 this[%v](%v) Not Equal that[%v](%v)", i, this.Field12[i], i, that1.Field12[i]) + } + } + if len(this.Field13) != len(that1.Field13) { + return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", len(this.Field13), len(that1.Field13)) + } + for i := range this.Field13 { + if this.Field13[i] != that1.Field13[i] { + return fmt.Errorf("Field13 this[%v](%v) Not Equal that[%v](%v)", i, this.Field13[i], i, that1.Field13[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NinRepPackedNative) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*NinRepPackedNative) + if !ok { + that2, ok := that.(NinRepPackedNative) + 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.Field1) != len(that1.Field1) { + return false + } + for i := range this.Field1 { + if this.Field1[i] != that1.Field1[i] { + return false + } + } + if len(this.Field2) != len(that1.Field2) { + return false + } + for i := range this.Field2 { + if this.Field2[i] != that1.Field2[i] { + return false + } + } + if len(this.Field3) != len(that1.Field3) { + return false + } + for i := range this.Field3 { + if this.Field3[i] != that1.Field3[i] { + return false + } + } + if len(this.Field4) != len(that1.Field4) { + return false + } + for i := range this.Field4 { + if this.Field4[i] != that1.Field4[i] { + return false + } + } + if len(this.Field5) != len(that1.Field5) { + return false + } + for i := range this.Field5 { + if this.Field5[i] != that1.Field5[i] { + return false + } + } + if len(this.Field6) != len(that1.Field6) { + return false + } + for i := range this.Field6 { + if this.Field6[i] != that1.Field6[i] { + return false + } + } + if len(this.Field7) != len(that1.Field7) { + return false + } + for i := range this.Field7 { + if this.Field7[i] != that1.Field7[i] { + return false + } + } + if len(this.Field8) != len(that1.Field8) { + return false + } + for i := range this.Field8 { + if this.Field8[i] != that1.Field8[i] { + return false + } + } + if len(this.Field9) != len(that1.Field9) { + return false + } + for i := range this.Field9 { + if this.Field9[i] != that1.Field9[i] { + return false + } + } + if len(this.Field10) != len(that1.Field10) { + return false + } + for i := range this.Field10 { + if this.Field10[i] != that1.Field10[i] { + return false + } + } + if len(this.Field11) != len(that1.Field11) { + return false + } + for i := range this.Field11 { + if this.Field11[i] != that1.Field11[i] { + return false + } + } + if len(this.Field12) != len(that1.Field12) { + return false + } + for i := range this.Field12 { + if this.Field12[i] != that1.Field12[i] { + return false + } + } + if len(this.Field13) != len(that1.Field13) { + return false + } + for i := range this.Field13 { + if this.Field13[i] != that1.Field13[i] { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NidOptStruct) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NidOptStruct) + if !ok { + that2, ok := that.(NidOptStruct) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NidOptStruct") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NidOptStruct but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NidOptStruct but is not nil && this == nil") + } + if this.Field1 != that1.Field1 { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) + } + if this.Field2 != that1.Field2 { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) + } + if !this.Field3.Equal(&that1.Field3) { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", this.Field3, that1.Field3) + } + if !this.Field4.Equal(&that1.Field4) { + return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", this.Field4, that1.Field4) + } + if this.Field6 != that1.Field6 { + return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", this.Field6, that1.Field6) + } + if this.Field7 != that1.Field7 { + return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", this.Field7, that1.Field7) + } + if !this.Field8.Equal(&that1.Field8) { + return fmt.Errorf("Field8 this(%v) Not Equal that(%v)", this.Field8, that1.Field8) + } + if this.Field13 != that1.Field13 { + return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", this.Field13, that1.Field13) + } + if this.Field14 != that1.Field14 { + return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", this.Field14, that1.Field14) + } + if !bytes.Equal(this.Field15, that1.Field15) { + return fmt.Errorf("Field15 this(%v) Not Equal that(%v)", this.Field15, that1.Field15) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NidOptStruct) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*NidOptStruct) + if !ok { + that2, ok := that.(NidOptStruct) + 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.Field1 != that1.Field1 { + return false + } + if this.Field2 != that1.Field2 { + return false + } + if !this.Field3.Equal(&that1.Field3) { + return false + } + if !this.Field4.Equal(&that1.Field4) { + return false + } + if this.Field6 != that1.Field6 { + return false + } + if this.Field7 != that1.Field7 { + return false + } + if !this.Field8.Equal(&that1.Field8) { + return false + } + if this.Field13 != that1.Field13 { + return false + } + if this.Field14 != that1.Field14 { + return false + } + if !bytes.Equal(this.Field15, that1.Field15) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NinOptStruct) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NinOptStruct) + if !ok { + that2, ok := that.(NinOptStruct) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NinOptStruct") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NinOptStruct but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NinOptStruct but is not nil && this == nil") + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) + } + } else if this.Field1 != nil { + return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") + } else if that1.Field1 != nil { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", *this.Field2, *that1.Field2) + } + } else if this.Field2 != nil { + return fmt.Errorf("this.Field2 == nil && that.Field2 != nil") + } else if that1.Field2 != nil { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) + } + if !this.Field3.Equal(that1.Field3) { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", this.Field3, that1.Field3) + } + if !this.Field4.Equal(that1.Field4) { + return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", this.Field4, that1.Field4) + } + if this.Field6 != nil && that1.Field6 != nil { + if *this.Field6 != *that1.Field6 { + return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", *this.Field6, *that1.Field6) + } + } else if this.Field6 != nil { + return fmt.Errorf("this.Field6 == nil && that.Field6 != nil") + } else if that1.Field6 != nil { + return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", this.Field6, that1.Field6) + } + if this.Field7 != nil && that1.Field7 != nil { + if *this.Field7 != *that1.Field7 { + return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", *this.Field7, *that1.Field7) + } + } else if this.Field7 != nil { + return fmt.Errorf("this.Field7 == nil && that.Field7 != nil") + } else if that1.Field7 != nil { + return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", this.Field7, that1.Field7) + } + if !this.Field8.Equal(that1.Field8) { + return fmt.Errorf("Field8 this(%v) Not Equal that(%v)", this.Field8, that1.Field8) + } + if this.Field13 != nil && that1.Field13 != nil { + if *this.Field13 != *that1.Field13 { + return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", *this.Field13, *that1.Field13) + } + } else if this.Field13 != nil { + return fmt.Errorf("this.Field13 == nil && that.Field13 != nil") + } else if that1.Field13 != nil { + return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", this.Field13, that1.Field13) + } + if this.Field14 != nil && that1.Field14 != nil { + if *this.Field14 != *that1.Field14 { + return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", *this.Field14, *that1.Field14) + } + } else if this.Field14 != nil { + return fmt.Errorf("this.Field14 == nil && that.Field14 != nil") + } else if that1.Field14 != nil { + return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", this.Field14, that1.Field14) + } + if !bytes.Equal(this.Field15, that1.Field15) { + return fmt.Errorf("Field15 this(%v) Not Equal that(%v)", this.Field15, that1.Field15) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NinOptStruct) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*NinOptStruct) + if !ok { + that2, ok := that.(NinOptStruct) + 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.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return false + } + } else if this.Field1 != nil { + return false + } else if that1.Field1 != nil { + return false + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + return false + } + } else if this.Field2 != nil { + return false + } else if that1.Field2 != nil { + return false + } + if !this.Field3.Equal(that1.Field3) { + return false + } + if !this.Field4.Equal(that1.Field4) { + return false + } + if this.Field6 != nil && that1.Field6 != nil { + if *this.Field6 != *that1.Field6 { + return false + } + } else if this.Field6 != nil { + return false + } else if that1.Field6 != nil { + return false + } + if this.Field7 != nil && that1.Field7 != nil { + if *this.Field7 != *that1.Field7 { + return false + } + } else if this.Field7 != nil { + return false + } else if that1.Field7 != nil { + return false + } + if !this.Field8.Equal(that1.Field8) { + return false + } + if this.Field13 != nil && that1.Field13 != nil { + if *this.Field13 != *that1.Field13 { + return false + } + } else if this.Field13 != nil { + return false + } else if that1.Field13 != nil { + return false + } + if this.Field14 != nil && that1.Field14 != nil { + if *this.Field14 != *that1.Field14 { + return false + } + } else if this.Field14 != nil { + return false + } else if that1.Field14 != nil { + return false + } + if !bytes.Equal(this.Field15, that1.Field15) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NidRepStruct) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NidRepStruct) + if !ok { + that2, ok := that.(NidRepStruct) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NidRepStruct") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NidRepStruct but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NidRepStruct but is not nil && this == nil") + } + if len(this.Field1) != len(that1.Field1) { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", len(this.Field1), len(that1.Field1)) + } + for i := range this.Field1 { + if this.Field1[i] != that1.Field1[i] { + return fmt.Errorf("Field1 this[%v](%v) Not Equal that[%v](%v)", i, this.Field1[i], i, that1.Field1[i]) + } + } + if len(this.Field2) != len(that1.Field2) { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", len(this.Field2), len(that1.Field2)) + } + for i := range this.Field2 { + if this.Field2[i] != that1.Field2[i] { + return fmt.Errorf("Field2 this[%v](%v) Not Equal that[%v](%v)", i, this.Field2[i], i, that1.Field2[i]) + } + } + if len(this.Field3) != len(that1.Field3) { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", len(this.Field3), len(that1.Field3)) + } + for i := range this.Field3 { + if !this.Field3[i].Equal(&that1.Field3[i]) { + return fmt.Errorf("Field3 this[%v](%v) Not Equal that[%v](%v)", i, this.Field3[i], i, that1.Field3[i]) + } + } + if len(this.Field4) != len(that1.Field4) { + return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", len(this.Field4), len(that1.Field4)) + } + for i := range this.Field4 { + if !this.Field4[i].Equal(&that1.Field4[i]) { + return fmt.Errorf("Field4 this[%v](%v) Not Equal that[%v](%v)", i, this.Field4[i], i, that1.Field4[i]) + } + } + if len(this.Field6) != len(that1.Field6) { + return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", len(this.Field6), len(that1.Field6)) + } + for i := range this.Field6 { + if this.Field6[i] != that1.Field6[i] { + return fmt.Errorf("Field6 this[%v](%v) Not Equal that[%v](%v)", i, this.Field6[i], i, that1.Field6[i]) + } + } + if len(this.Field7) != len(that1.Field7) { + return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", len(this.Field7), len(that1.Field7)) + } + for i := range this.Field7 { + if this.Field7[i] != that1.Field7[i] { + return fmt.Errorf("Field7 this[%v](%v) Not Equal that[%v](%v)", i, this.Field7[i], i, that1.Field7[i]) + } + } + if len(this.Field8) != len(that1.Field8) { + return fmt.Errorf("Field8 this(%v) Not Equal that(%v)", len(this.Field8), len(that1.Field8)) + } + for i := range this.Field8 { + if !this.Field8[i].Equal(&that1.Field8[i]) { + return fmt.Errorf("Field8 this[%v](%v) Not Equal that[%v](%v)", i, this.Field8[i], i, that1.Field8[i]) + } + } + if len(this.Field13) != len(that1.Field13) { + return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", len(this.Field13), len(that1.Field13)) + } + for i := range this.Field13 { + if this.Field13[i] != that1.Field13[i] { + return fmt.Errorf("Field13 this[%v](%v) Not Equal that[%v](%v)", i, this.Field13[i], i, that1.Field13[i]) + } + } + if len(this.Field14) != len(that1.Field14) { + return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", len(this.Field14), len(that1.Field14)) + } + for i := range this.Field14 { + if this.Field14[i] != that1.Field14[i] { + return fmt.Errorf("Field14 this[%v](%v) Not Equal that[%v](%v)", i, this.Field14[i], i, that1.Field14[i]) + } + } + if len(this.Field15) != len(that1.Field15) { + return fmt.Errorf("Field15 this(%v) Not Equal that(%v)", len(this.Field15), len(that1.Field15)) + } + for i := range this.Field15 { + if !bytes.Equal(this.Field15[i], that1.Field15[i]) { + return fmt.Errorf("Field15 this[%v](%v) Not Equal that[%v](%v)", i, this.Field15[i], i, that1.Field15[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NidRepStruct) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*NidRepStruct) + if !ok { + that2, ok := that.(NidRepStruct) + 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.Field1) != len(that1.Field1) { + return false + } + for i := range this.Field1 { + if this.Field1[i] != that1.Field1[i] { + return false + } + } + if len(this.Field2) != len(that1.Field2) { + return false + } + for i := range this.Field2 { + if this.Field2[i] != that1.Field2[i] { + return false + } + } + if len(this.Field3) != len(that1.Field3) { + return false + } + for i := range this.Field3 { + if !this.Field3[i].Equal(&that1.Field3[i]) { + return false + } + } + if len(this.Field4) != len(that1.Field4) { + return false + } + for i := range this.Field4 { + if !this.Field4[i].Equal(&that1.Field4[i]) { + return false + } + } + if len(this.Field6) != len(that1.Field6) { + return false + } + for i := range this.Field6 { + if this.Field6[i] != that1.Field6[i] { + return false + } + } + if len(this.Field7) != len(that1.Field7) { + return false + } + for i := range this.Field7 { + if this.Field7[i] != that1.Field7[i] { + return false + } + } + if len(this.Field8) != len(that1.Field8) { + return false + } + for i := range this.Field8 { + if !this.Field8[i].Equal(&that1.Field8[i]) { + return false + } + } + if len(this.Field13) != len(that1.Field13) { + return false + } + for i := range this.Field13 { + if this.Field13[i] != that1.Field13[i] { + return false + } + } + if len(this.Field14) != len(that1.Field14) { + return false + } + for i := range this.Field14 { + if this.Field14[i] != that1.Field14[i] { + return false + } + } + if len(this.Field15) != len(that1.Field15) { + return false + } + for i := range this.Field15 { + if !bytes.Equal(this.Field15[i], that1.Field15[i]) { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NinRepStruct) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NinRepStruct) + if !ok { + that2, ok := that.(NinRepStruct) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NinRepStruct") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NinRepStruct but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NinRepStruct but is not nil && this == nil") + } + if len(this.Field1) != len(that1.Field1) { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", len(this.Field1), len(that1.Field1)) + } + for i := range this.Field1 { + if this.Field1[i] != that1.Field1[i] { + return fmt.Errorf("Field1 this[%v](%v) Not Equal that[%v](%v)", i, this.Field1[i], i, that1.Field1[i]) + } + } + if len(this.Field2) != len(that1.Field2) { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", len(this.Field2), len(that1.Field2)) + } + for i := range this.Field2 { + if this.Field2[i] != that1.Field2[i] { + return fmt.Errorf("Field2 this[%v](%v) Not Equal that[%v](%v)", i, this.Field2[i], i, that1.Field2[i]) + } + } + if len(this.Field3) != len(that1.Field3) { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", len(this.Field3), len(that1.Field3)) + } + for i := range this.Field3 { + if !this.Field3[i].Equal(that1.Field3[i]) { + return fmt.Errorf("Field3 this[%v](%v) Not Equal that[%v](%v)", i, this.Field3[i], i, that1.Field3[i]) + } + } + if len(this.Field4) != len(that1.Field4) { + return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", len(this.Field4), len(that1.Field4)) + } + for i := range this.Field4 { + if !this.Field4[i].Equal(that1.Field4[i]) { + return fmt.Errorf("Field4 this[%v](%v) Not Equal that[%v](%v)", i, this.Field4[i], i, that1.Field4[i]) + } + } + if len(this.Field6) != len(that1.Field6) { + return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", len(this.Field6), len(that1.Field6)) + } + for i := range this.Field6 { + if this.Field6[i] != that1.Field6[i] { + return fmt.Errorf("Field6 this[%v](%v) Not Equal that[%v](%v)", i, this.Field6[i], i, that1.Field6[i]) + } + } + if len(this.Field7) != len(that1.Field7) { + return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", len(this.Field7), len(that1.Field7)) + } + for i := range this.Field7 { + if this.Field7[i] != that1.Field7[i] { + return fmt.Errorf("Field7 this[%v](%v) Not Equal that[%v](%v)", i, this.Field7[i], i, that1.Field7[i]) + } + } + if len(this.Field8) != len(that1.Field8) { + return fmt.Errorf("Field8 this(%v) Not Equal that(%v)", len(this.Field8), len(that1.Field8)) + } + for i := range this.Field8 { + if !this.Field8[i].Equal(that1.Field8[i]) { + return fmt.Errorf("Field8 this[%v](%v) Not Equal that[%v](%v)", i, this.Field8[i], i, that1.Field8[i]) + } + } + if len(this.Field13) != len(that1.Field13) { + return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", len(this.Field13), len(that1.Field13)) + } + for i := range this.Field13 { + if this.Field13[i] != that1.Field13[i] { + return fmt.Errorf("Field13 this[%v](%v) Not Equal that[%v](%v)", i, this.Field13[i], i, that1.Field13[i]) + } + } + if len(this.Field14) != len(that1.Field14) { + return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", len(this.Field14), len(that1.Field14)) + } + for i := range this.Field14 { + if this.Field14[i] != that1.Field14[i] { + return fmt.Errorf("Field14 this[%v](%v) Not Equal that[%v](%v)", i, this.Field14[i], i, that1.Field14[i]) + } + } + if len(this.Field15) != len(that1.Field15) { + return fmt.Errorf("Field15 this(%v) Not Equal that(%v)", len(this.Field15), len(that1.Field15)) + } + for i := range this.Field15 { + if !bytes.Equal(this.Field15[i], that1.Field15[i]) { + return fmt.Errorf("Field15 this[%v](%v) Not Equal that[%v](%v)", i, this.Field15[i], i, that1.Field15[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NinRepStruct) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*NinRepStruct) + if !ok { + that2, ok := that.(NinRepStruct) + 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.Field1) != len(that1.Field1) { + return false + } + for i := range this.Field1 { + if this.Field1[i] != that1.Field1[i] { + return false + } + } + if len(this.Field2) != len(that1.Field2) { + return false + } + for i := range this.Field2 { + if this.Field2[i] != that1.Field2[i] { + return false + } + } + if len(this.Field3) != len(that1.Field3) { + return false + } + for i := range this.Field3 { + if !this.Field3[i].Equal(that1.Field3[i]) { + return false + } + } + if len(this.Field4) != len(that1.Field4) { + return false + } + for i := range this.Field4 { + if !this.Field4[i].Equal(that1.Field4[i]) { + return false + } + } + if len(this.Field6) != len(that1.Field6) { + return false + } + for i := range this.Field6 { + if this.Field6[i] != that1.Field6[i] { + return false + } + } + if len(this.Field7) != len(that1.Field7) { + return false + } + for i := range this.Field7 { + if this.Field7[i] != that1.Field7[i] { + return false + } + } + if len(this.Field8) != len(that1.Field8) { + return false + } + for i := range this.Field8 { + if !this.Field8[i].Equal(that1.Field8[i]) { + return false + } + } + if len(this.Field13) != len(that1.Field13) { + return false + } + for i := range this.Field13 { + if this.Field13[i] != that1.Field13[i] { + return false + } + } + if len(this.Field14) != len(that1.Field14) { + return false + } + for i := range this.Field14 { + if this.Field14[i] != that1.Field14[i] { + return false + } + } + if len(this.Field15) != len(that1.Field15) { + return false + } + for i := range this.Field15 { + if !bytes.Equal(this.Field15[i], that1.Field15[i]) { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NidEmbeddedStruct) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NidEmbeddedStruct) + if !ok { + that2, ok := that.(NidEmbeddedStruct) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NidEmbeddedStruct") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NidEmbeddedStruct but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NidEmbeddedStruct but is not nil && this == nil") + } + if !this.NidOptNative.Equal(that1.NidOptNative) { + return fmt.Errorf("NidOptNative this(%v) Not Equal that(%v)", this.NidOptNative, that1.NidOptNative) + } + if !this.Field200.Equal(&that1.Field200) { + return fmt.Errorf("Field200 this(%v) Not Equal that(%v)", this.Field200, that1.Field200) + } + if this.Field210 != that1.Field210 { + return fmt.Errorf("Field210 this(%v) Not Equal that(%v)", this.Field210, that1.Field210) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NidEmbeddedStruct) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*NidEmbeddedStruct) + if !ok { + that2, ok := that.(NidEmbeddedStruct) + 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.NidOptNative.Equal(that1.NidOptNative) { + return false + } + if !this.Field200.Equal(&that1.Field200) { + return false + } + if this.Field210 != that1.Field210 { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NinEmbeddedStruct) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NinEmbeddedStruct) + if !ok { + that2, ok := that.(NinEmbeddedStruct) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NinEmbeddedStruct") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NinEmbeddedStruct but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NinEmbeddedStruct but is not nil && this == nil") + } + if !this.NidOptNative.Equal(that1.NidOptNative) { + return fmt.Errorf("NidOptNative this(%v) Not Equal that(%v)", this.NidOptNative, that1.NidOptNative) + } + if !this.Field200.Equal(that1.Field200) { + return fmt.Errorf("Field200 this(%v) Not Equal that(%v)", this.Field200, that1.Field200) + } + if this.Field210 != nil && that1.Field210 != nil { + if *this.Field210 != *that1.Field210 { + return fmt.Errorf("Field210 this(%v) Not Equal that(%v)", *this.Field210, *that1.Field210) + } + } else if this.Field210 != nil { + return fmt.Errorf("this.Field210 == nil && that.Field210 != nil") + } else if that1.Field210 != nil { + return fmt.Errorf("Field210 this(%v) Not Equal that(%v)", this.Field210, that1.Field210) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NinEmbeddedStruct) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*NinEmbeddedStruct) + if !ok { + that2, ok := that.(NinEmbeddedStruct) + 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.NidOptNative.Equal(that1.NidOptNative) { + return false + } + if !this.Field200.Equal(that1.Field200) { + return false + } + if this.Field210 != nil && that1.Field210 != nil { + if *this.Field210 != *that1.Field210 { + return false + } + } else if this.Field210 != nil { + return false + } else if that1.Field210 != nil { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NidNestedStruct) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NidNestedStruct) + if !ok { + that2, ok := that.(NidNestedStruct) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NidNestedStruct") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NidNestedStruct but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NidNestedStruct but is not nil && this == nil") + } + if !this.Field1.Equal(&that1.Field1) { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) + } + if len(this.Field2) != len(that1.Field2) { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", len(this.Field2), len(that1.Field2)) + } + for i := range this.Field2 { + if !this.Field2[i].Equal(&that1.Field2[i]) { + return fmt.Errorf("Field2 this[%v](%v) Not Equal that[%v](%v)", i, this.Field2[i], i, that1.Field2[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NidNestedStruct) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*NidNestedStruct) + if !ok { + that2, ok := that.(NidNestedStruct) + 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.Field1.Equal(&that1.Field1) { + return false + } + if len(this.Field2) != len(that1.Field2) { + return false + } + for i := range this.Field2 { + if !this.Field2[i].Equal(&that1.Field2[i]) { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NinNestedStruct) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NinNestedStruct) + if !ok { + that2, ok := that.(NinNestedStruct) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NinNestedStruct") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NinNestedStruct but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NinNestedStruct but is not nil && this == nil") + } + if !this.Field1.Equal(that1.Field1) { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) + } + if len(this.Field2) != len(that1.Field2) { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", len(this.Field2), len(that1.Field2)) + } + for i := range this.Field2 { + if !this.Field2[i].Equal(that1.Field2[i]) { + return fmt.Errorf("Field2 this[%v](%v) Not Equal that[%v](%v)", i, this.Field2[i], i, that1.Field2[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NinNestedStruct) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*NinNestedStruct) + if !ok { + that2, ok := that.(NinNestedStruct) + 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.Field1.Equal(that1.Field1) { + return false + } + if len(this.Field2) != len(that1.Field2) { + return false + } + for i := range this.Field2 { + if !this.Field2[i].Equal(that1.Field2[i]) { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NidOptCustom) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NidOptCustom) + if !ok { + that2, ok := that.(NidOptCustom) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NidOptCustom") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NidOptCustom but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NidOptCustom 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.Value.Equal(that1.Value) { + return fmt.Errorf("Value this(%v) Not Equal that(%v)", this.Value, that1.Value) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NidOptCustom) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*NidOptCustom) + if !ok { + that2, ok := that.(NidOptCustom) + 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.Value.Equal(that1.Value) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *CustomDash) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*CustomDash) + if !ok { + that2, ok := that.(CustomDash) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *CustomDash") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *CustomDash but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *CustomDash but is not nil && this == nil") + } + if that1.Value == nil { + if this.Value != nil { + return fmt.Errorf("this.Value != nil && that1.Value == nil") + } + } else if !this.Value.Equal(*that1.Value) { + return fmt.Errorf("Value this(%v) Not Equal that(%v)", this.Value, that1.Value) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *CustomDash) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*CustomDash) + if !ok { + that2, ok := that.(CustomDash) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + if this == nil { + return true + } + return false + } else if this == nil { + return false + } + if that1.Value == nil { + if this.Value != nil { + return false + } + } else if !this.Value.Equal(*that1.Value) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NinOptCustom) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NinOptCustom) + if !ok { + that2, ok := that.(NinOptCustom) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NinOptCustom") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NinOptCustom but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NinOptCustom but is not nil && this == nil") + } + if that1.Id == nil { + if this.Id != nil { + return fmt.Errorf("this.Id != nil && that1.Id == nil") + } + } else if !this.Id.Equal(*that1.Id) { + return fmt.Errorf("Id this(%v) Not Equal that(%v)", this.Id, that1.Id) + } + if that1.Value == nil { + if this.Value != nil { + return fmt.Errorf("this.Value != nil && that1.Value == nil") + } + } else if !this.Value.Equal(*that1.Value) { + return fmt.Errorf("Value this(%v) Not Equal that(%v)", this.Value, that1.Value) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NinOptCustom) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*NinOptCustom) + if !ok { + that2, ok := that.(NinOptCustom) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + if this == nil { + return true + } + return false + } else if this == nil { + return false + } + if that1.Id == nil { + if this.Id != nil { + return false + } + } else if !this.Id.Equal(*that1.Id) { + return false + } + if that1.Value == nil { + if this.Value != nil { + return false + } + } else if !this.Value.Equal(*that1.Value) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NidRepCustom) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NidRepCustom) + if !ok { + that2, ok := that.(NidRepCustom) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NidRepCustom") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NidRepCustom but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NidRepCustom but is not nil && this == nil") + } + if len(this.Id) != len(that1.Id) { + return fmt.Errorf("Id this(%v) Not Equal that(%v)", len(this.Id), len(that1.Id)) + } + for i := range this.Id { + if !this.Id[i].Equal(that1.Id[i]) { + return fmt.Errorf("Id this[%v](%v) Not Equal that[%v](%v)", i, this.Id[i], i, that1.Id[i]) + } + } + if len(this.Value) != len(that1.Value) { + return fmt.Errorf("Value this(%v) Not Equal that(%v)", len(this.Value), len(that1.Value)) + } + for i := range this.Value { + if !this.Value[i].Equal(that1.Value[i]) { + return fmt.Errorf("Value this[%v](%v) Not Equal that[%v](%v)", i, this.Value[i], i, that1.Value[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NidRepCustom) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*NidRepCustom) + if !ok { + that2, ok := that.(NidRepCustom) + 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.Id) != len(that1.Id) { + return false + } + for i := range this.Id { + if !this.Id[i].Equal(that1.Id[i]) { + return false + } + } + if len(this.Value) != len(that1.Value) { + return false + } + for i := range this.Value { + if !this.Value[i].Equal(that1.Value[i]) { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NinRepCustom) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NinRepCustom) + if !ok { + that2, ok := that.(NinRepCustom) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NinRepCustom") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NinRepCustom but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NinRepCustom but is not nil && this == nil") + } + if len(this.Id) != len(that1.Id) { + return fmt.Errorf("Id this(%v) Not Equal that(%v)", len(this.Id), len(that1.Id)) + } + for i := range this.Id { + if !this.Id[i].Equal(that1.Id[i]) { + return fmt.Errorf("Id this[%v](%v) Not Equal that[%v](%v)", i, this.Id[i], i, that1.Id[i]) + } + } + if len(this.Value) != len(that1.Value) { + return fmt.Errorf("Value this(%v) Not Equal that(%v)", len(this.Value), len(that1.Value)) + } + for i := range this.Value { + if !this.Value[i].Equal(that1.Value[i]) { + return fmt.Errorf("Value this[%v](%v) Not Equal that[%v](%v)", i, this.Value[i], i, that1.Value[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NinRepCustom) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*NinRepCustom) + if !ok { + that2, ok := that.(NinRepCustom) + 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.Id) != len(that1.Id) { + return false + } + for i := range this.Id { + if !this.Id[i].Equal(that1.Id[i]) { + return false + } + } + if len(this.Value) != len(that1.Value) { + return false + } + for i := range this.Value { + if !this.Value[i].Equal(that1.Value[i]) { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NinOptNativeUnion) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NinOptNativeUnion) + if !ok { + that2, ok := that.(NinOptNativeUnion) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NinOptNativeUnion") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NinOptNativeUnion but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NinOptNativeUnion but is not nil && this == nil") + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) + } + } else if this.Field1 != nil { + return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") + } else if that1.Field1 != nil { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", *this.Field2, *that1.Field2) + } + } else if this.Field2 != nil { + return fmt.Errorf("this.Field2 == nil && that.Field2 != nil") + } else if that1.Field2 != nil { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) + } + if this.Field3 != nil && that1.Field3 != nil { + if *this.Field3 != *that1.Field3 { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", *this.Field3, *that1.Field3) + } + } else if this.Field3 != nil { + return fmt.Errorf("this.Field3 == nil && that.Field3 != nil") + } else if that1.Field3 != nil { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", this.Field3, that1.Field3) + } + if this.Field4 != nil && that1.Field4 != nil { + if *this.Field4 != *that1.Field4 { + return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", *this.Field4, *that1.Field4) + } + } else if this.Field4 != nil { + return fmt.Errorf("this.Field4 == nil && that.Field4 != nil") + } else if that1.Field4 != nil { + return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", this.Field4, that1.Field4) + } + if this.Field5 != nil && that1.Field5 != nil { + if *this.Field5 != *that1.Field5 { + return fmt.Errorf("Field5 this(%v) Not Equal that(%v)", *this.Field5, *that1.Field5) + } + } else if this.Field5 != nil { + return fmt.Errorf("this.Field5 == nil && that.Field5 != nil") + } else if that1.Field5 != nil { + return fmt.Errorf("Field5 this(%v) Not Equal that(%v)", this.Field5, that1.Field5) + } + if this.Field6 != nil && that1.Field6 != nil { + if *this.Field6 != *that1.Field6 { + return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", *this.Field6, *that1.Field6) + } + } else if this.Field6 != nil { + return fmt.Errorf("this.Field6 == nil && that.Field6 != nil") + } else if that1.Field6 != nil { + return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", this.Field6, that1.Field6) + } + if this.Field13 != nil && that1.Field13 != nil { + if *this.Field13 != *that1.Field13 { + return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", *this.Field13, *that1.Field13) + } + } else if this.Field13 != nil { + return fmt.Errorf("this.Field13 == nil && that.Field13 != nil") + } else if that1.Field13 != nil { + return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", this.Field13, that1.Field13) + } + if this.Field14 != nil && that1.Field14 != nil { + if *this.Field14 != *that1.Field14 { + return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", *this.Field14, *that1.Field14) + } + } else if this.Field14 != nil { + return fmt.Errorf("this.Field14 == nil && that.Field14 != nil") + } else if that1.Field14 != nil { + return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", this.Field14, that1.Field14) + } + if !bytes.Equal(this.Field15, that1.Field15) { + return fmt.Errorf("Field15 this(%v) Not Equal that(%v)", this.Field15, that1.Field15) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NinOptNativeUnion) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*NinOptNativeUnion) + if !ok { + that2, ok := that.(NinOptNativeUnion) + 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.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return false + } + } else if this.Field1 != nil { + return false + } else if that1.Field1 != nil { + return false + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + return false + } + } else if this.Field2 != nil { + return false + } else if that1.Field2 != nil { + return false + } + if this.Field3 != nil && that1.Field3 != nil { + if *this.Field3 != *that1.Field3 { + return false + } + } else if this.Field3 != nil { + return false + } else if that1.Field3 != nil { + return false + } + if this.Field4 != nil && that1.Field4 != nil { + if *this.Field4 != *that1.Field4 { + return false + } + } else if this.Field4 != nil { + return false + } else if that1.Field4 != nil { + return false + } + if this.Field5 != nil && that1.Field5 != nil { + if *this.Field5 != *that1.Field5 { + return false + } + } else if this.Field5 != nil { + return false + } else if that1.Field5 != nil { + return false + } + if this.Field6 != nil && that1.Field6 != nil { + if *this.Field6 != *that1.Field6 { + return false + } + } else if this.Field6 != nil { + return false + } else if that1.Field6 != nil { + return false + } + if this.Field13 != nil && that1.Field13 != nil { + if *this.Field13 != *that1.Field13 { + return false + } + } else if this.Field13 != nil { + return false + } else if that1.Field13 != nil { + return false + } + if this.Field14 != nil && that1.Field14 != nil { + if *this.Field14 != *that1.Field14 { + return false + } + } else if this.Field14 != nil { + return false + } else if that1.Field14 != nil { + return false + } + if !bytes.Equal(this.Field15, that1.Field15) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NinOptStructUnion) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NinOptStructUnion) + if !ok { + that2, ok := that.(NinOptStructUnion) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NinOptStructUnion") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NinOptStructUnion but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NinOptStructUnion but is not nil && this == nil") + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) + } + } else if this.Field1 != nil { + return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") + } else if that1.Field1 != nil { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", *this.Field2, *that1.Field2) + } + } else if this.Field2 != nil { + return fmt.Errorf("this.Field2 == nil && that.Field2 != nil") + } else if that1.Field2 != nil { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) + } + if !this.Field3.Equal(that1.Field3) { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", this.Field3, that1.Field3) + } + if !this.Field4.Equal(that1.Field4) { + return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", this.Field4, that1.Field4) + } + if this.Field6 != nil && that1.Field6 != nil { + if *this.Field6 != *that1.Field6 { + return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", *this.Field6, *that1.Field6) + } + } else if this.Field6 != nil { + return fmt.Errorf("this.Field6 == nil && that.Field6 != nil") + } else if that1.Field6 != nil { + return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", this.Field6, that1.Field6) + } + if this.Field7 != nil && that1.Field7 != nil { + if *this.Field7 != *that1.Field7 { + return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", *this.Field7, *that1.Field7) + } + } else if this.Field7 != nil { + return fmt.Errorf("this.Field7 == nil && that.Field7 != nil") + } else if that1.Field7 != nil { + return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", this.Field7, that1.Field7) + } + if this.Field13 != nil && that1.Field13 != nil { + if *this.Field13 != *that1.Field13 { + return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", *this.Field13, *that1.Field13) + } + } else if this.Field13 != nil { + return fmt.Errorf("this.Field13 == nil && that.Field13 != nil") + } else if that1.Field13 != nil { + return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", this.Field13, that1.Field13) + } + if this.Field14 != nil && that1.Field14 != nil { + if *this.Field14 != *that1.Field14 { + return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", *this.Field14, *that1.Field14) + } + } else if this.Field14 != nil { + return fmt.Errorf("this.Field14 == nil && that.Field14 != nil") + } else if that1.Field14 != nil { + return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", this.Field14, that1.Field14) + } + if !bytes.Equal(this.Field15, that1.Field15) { + return fmt.Errorf("Field15 this(%v) Not Equal that(%v)", this.Field15, that1.Field15) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NinOptStructUnion) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*NinOptStructUnion) + if !ok { + that2, ok := that.(NinOptStructUnion) + 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.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return false + } + } else if this.Field1 != nil { + return false + } else if that1.Field1 != nil { + return false + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + return false + } + } else if this.Field2 != nil { + return false + } else if that1.Field2 != nil { + return false + } + if !this.Field3.Equal(that1.Field3) { + return false + } + if !this.Field4.Equal(that1.Field4) { + return false + } + if this.Field6 != nil && that1.Field6 != nil { + if *this.Field6 != *that1.Field6 { + return false + } + } else if this.Field6 != nil { + return false + } else if that1.Field6 != nil { + return false + } + if this.Field7 != nil && that1.Field7 != nil { + if *this.Field7 != *that1.Field7 { + return false + } + } else if this.Field7 != nil { + return false + } else if that1.Field7 != nil { + return false + } + if this.Field13 != nil && that1.Field13 != nil { + if *this.Field13 != *that1.Field13 { + return false + } + } else if this.Field13 != nil { + return false + } else if that1.Field13 != nil { + return false + } + if this.Field14 != nil && that1.Field14 != nil { + if *this.Field14 != *that1.Field14 { + return false + } + } else if this.Field14 != nil { + return false + } else if that1.Field14 != nil { + return false + } + if !bytes.Equal(this.Field15, that1.Field15) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NinEmbeddedStructUnion) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NinEmbeddedStructUnion) + if !ok { + that2, ok := that.(NinEmbeddedStructUnion) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NinEmbeddedStructUnion") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NinEmbeddedStructUnion but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NinEmbeddedStructUnion but is not nil && this == nil") + } + if !this.NidOptNative.Equal(that1.NidOptNative) { + return fmt.Errorf("NidOptNative this(%v) Not Equal that(%v)", this.NidOptNative, that1.NidOptNative) + } + if !this.Field200.Equal(that1.Field200) { + return fmt.Errorf("Field200 this(%v) Not Equal that(%v)", this.Field200, that1.Field200) + } + if this.Field210 != nil && that1.Field210 != nil { + if *this.Field210 != *that1.Field210 { + return fmt.Errorf("Field210 this(%v) Not Equal that(%v)", *this.Field210, *that1.Field210) + } + } else if this.Field210 != nil { + return fmt.Errorf("this.Field210 == nil && that.Field210 != nil") + } else if that1.Field210 != nil { + return fmt.Errorf("Field210 this(%v) Not Equal that(%v)", this.Field210, that1.Field210) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NinEmbeddedStructUnion) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*NinEmbeddedStructUnion) + if !ok { + that2, ok := that.(NinEmbeddedStructUnion) + 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.NidOptNative.Equal(that1.NidOptNative) { + return false + } + if !this.Field200.Equal(that1.Field200) { + return false + } + if this.Field210 != nil && that1.Field210 != nil { + if *this.Field210 != *that1.Field210 { + return false + } + } else if this.Field210 != nil { + return false + } else if that1.Field210 != nil { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NinNestedStructUnion) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NinNestedStructUnion) + if !ok { + that2, ok := that.(NinNestedStructUnion) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NinNestedStructUnion") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NinNestedStructUnion but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NinNestedStructUnion but is not nil && this == nil") + } + if !this.Field1.Equal(that1.Field1) { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) + } + if !this.Field2.Equal(that1.Field2) { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) + } + if !this.Field3.Equal(that1.Field3) { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", this.Field3, that1.Field3) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NinNestedStructUnion) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*NinNestedStructUnion) + if !ok { + that2, ok := that.(NinNestedStructUnion) + 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.Field1.Equal(that1.Field1) { + return false + } + if !this.Field2.Equal(that1.Field2) { + return false + } + if !this.Field3.Equal(that1.Field3) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *Tree) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*Tree) + if !ok { + that2, ok := that.(Tree) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *Tree") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *Tree but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *Tree but is not nil && this == nil") + } + if !this.Or.Equal(that1.Or) { + return fmt.Errorf("Or this(%v) Not Equal that(%v)", this.Or, that1.Or) + } + if !this.And.Equal(that1.And) { + return fmt.Errorf("And this(%v) Not Equal that(%v)", this.And, that1.And) + } + if !this.Leaf.Equal(that1.Leaf) { + return fmt.Errorf("Leaf this(%v) Not Equal that(%v)", this.Leaf, that1.Leaf) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *Tree) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*Tree) + if !ok { + that2, ok := that.(Tree) + 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.Or.Equal(that1.Or) { + return false + } + if !this.And.Equal(that1.And) { + return false + } + if !this.Leaf.Equal(that1.Leaf) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *OrBranch) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*OrBranch) + if !ok { + that2, ok := that.(OrBranch) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *OrBranch") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *OrBranch but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *OrBranch but is not nil && this == nil") + } + if !this.Left.Equal(&that1.Left) { + return fmt.Errorf("Left this(%v) Not Equal that(%v)", this.Left, that1.Left) + } + if !this.Right.Equal(&that1.Right) { + return fmt.Errorf("Right this(%v) Not Equal that(%v)", this.Right, that1.Right) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *OrBranch) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*OrBranch) + if !ok { + that2, ok := that.(OrBranch) + 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.Left.Equal(&that1.Left) { + return false + } + if !this.Right.Equal(&that1.Right) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *AndBranch) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*AndBranch) + if !ok { + that2, ok := that.(AndBranch) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *AndBranch") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *AndBranch but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *AndBranch but is not nil && this == nil") + } + if !this.Left.Equal(&that1.Left) { + return fmt.Errorf("Left this(%v) Not Equal that(%v)", this.Left, that1.Left) + } + if !this.Right.Equal(&that1.Right) { + return fmt.Errorf("Right this(%v) Not Equal that(%v)", this.Right, that1.Right) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *AndBranch) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*AndBranch) + if !ok { + that2, ok := that.(AndBranch) + 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.Left.Equal(&that1.Left) { + return false + } + if !this.Right.Equal(&that1.Right) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *Leaf) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*Leaf) + if !ok { + that2, ok := that.(Leaf) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *Leaf") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *Leaf but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *Leaf 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.StrValue != that1.StrValue { + return fmt.Errorf("StrValue this(%v) Not Equal that(%v)", this.StrValue, that1.StrValue) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *Leaf) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*Leaf) + if !ok { + that2, ok := that.(Leaf) + 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.StrValue != that1.StrValue { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *DeepTree) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*DeepTree) + if !ok { + that2, ok := that.(DeepTree) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *DeepTree") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *DeepTree but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *DeepTree but is not nil && this == nil") + } + if !this.Down.Equal(that1.Down) { + return fmt.Errorf("Down this(%v) Not Equal that(%v)", this.Down, that1.Down) + } + if !this.And.Equal(that1.And) { + return fmt.Errorf("And this(%v) Not Equal that(%v)", this.And, that1.And) + } + if !this.Leaf.Equal(that1.Leaf) { + return fmt.Errorf("Leaf this(%v) Not Equal that(%v)", this.Leaf, that1.Leaf) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *DeepTree) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*DeepTree) + if !ok { + that2, ok := that.(DeepTree) + 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.Down.Equal(that1.Down) { + return false + } + if !this.And.Equal(that1.And) { + return false + } + if !this.Leaf.Equal(that1.Leaf) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *ADeepBranch) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*ADeepBranch) + if !ok { + that2, ok := that.(ADeepBranch) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *ADeepBranch") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *ADeepBranch but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *ADeepBranch but is not nil && this == nil") + } + if !this.Down.Equal(&that1.Down) { + return fmt.Errorf("Down this(%v) Not Equal that(%v)", this.Down, that1.Down) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *ADeepBranch) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*ADeepBranch) + if !ok { + that2, ok := that.(ADeepBranch) + 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.Down.Equal(&that1.Down) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *AndDeepBranch) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*AndDeepBranch) + if !ok { + that2, ok := that.(AndDeepBranch) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *AndDeepBranch") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *AndDeepBranch but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *AndDeepBranch but is not nil && this == nil") + } + if !this.Left.Equal(&that1.Left) { + return fmt.Errorf("Left this(%v) Not Equal that(%v)", this.Left, that1.Left) + } + if !this.Right.Equal(&that1.Right) { + return fmt.Errorf("Right this(%v) Not Equal that(%v)", this.Right, that1.Right) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *AndDeepBranch) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*AndDeepBranch) + if !ok { + that2, ok := that.(AndDeepBranch) + 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.Left.Equal(&that1.Left) { + return false + } + if !this.Right.Equal(&that1.Right) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *DeepLeaf) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*DeepLeaf) + if !ok { + that2, ok := that.(DeepLeaf) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *DeepLeaf") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *DeepLeaf but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *DeepLeaf but is not nil && this == nil") + } + if !this.Tree.Equal(&that1.Tree) { + return fmt.Errorf("Tree this(%v) Not Equal that(%v)", this.Tree, that1.Tree) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *DeepLeaf) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*DeepLeaf) + if !ok { + that2, ok := that.(DeepLeaf) + 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.Tree.Equal(&that1.Tree) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *Nil) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*Nil) + if !ok { + that2, ok := that.(Nil) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *Nil") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *Nil but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *Nil but is not nil && this == nil") + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *Nil) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*Nil) + if !ok { + that2, ok := that.(Nil) + 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.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NidOptEnum) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NidOptEnum) + if !ok { + that2, ok := that.(NidOptEnum) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NidOptEnum") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NidOptEnum but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NidOptEnum but is not nil && this == nil") + } + if this.Field1 != that1.Field1 { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NidOptEnum) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*NidOptEnum) + if !ok { + that2, ok := that.(NidOptEnum) + 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.Field1 != that1.Field1 { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NinOptEnum) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NinOptEnum) + if !ok { + that2, ok := that.(NinOptEnum) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NinOptEnum") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NinOptEnum but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NinOptEnum but is not nil && this == nil") + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) + } + } else if this.Field1 != nil { + return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") + } else if that1.Field1 != nil { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", *this.Field2, *that1.Field2) + } + } else if this.Field2 != nil { + return fmt.Errorf("this.Field2 == nil && that.Field2 != nil") + } else if that1.Field2 != nil { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) + } + if this.Field3 != nil && that1.Field3 != nil { + if *this.Field3 != *that1.Field3 { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", *this.Field3, *that1.Field3) + } + } else if this.Field3 != nil { + return fmt.Errorf("this.Field3 == nil && that.Field3 != nil") + } else if that1.Field3 != nil { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", this.Field3, that1.Field3) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NinOptEnum) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*NinOptEnum) + if !ok { + that2, ok := that.(NinOptEnum) + 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.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return false + } + } else if this.Field1 != nil { + return false + } else if that1.Field1 != nil { + return false + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + return false + } + } else if this.Field2 != nil { + return false + } else if that1.Field2 != nil { + return false + } + if this.Field3 != nil && that1.Field3 != nil { + if *this.Field3 != *that1.Field3 { + return false + } + } else if this.Field3 != nil { + return false + } else if that1.Field3 != nil { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NidRepEnum) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NidRepEnum) + if !ok { + that2, ok := that.(NidRepEnum) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NidRepEnum") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NidRepEnum but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NidRepEnum but is not nil && this == nil") + } + if len(this.Field1) != len(that1.Field1) { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", len(this.Field1), len(that1.Field1)) + } + for i := range this.Field1 { + if this.Field1[i] != that1.Field1[i] { + return fmt.Errorf("Field1 this[%v](%v) Not Equal that[%v](%v)", i, this.Field1[i], i, that1.Field1[i]) + } + } + if len(this.Field2) != len(that1.Field2) { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", len(this.Field2), len(that1.Field2)) + } + for i := range this.Field2 { + if this.Field2[i] != that1.Field2[i] { + return fmt.Errorf("Field2 this[%v](%v) Not Equal that[%v](%v)", i, this.Field2[i], i, that1.Field2[i]) + } + } + if len(this.Field3) != len(that1.Field3) { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", len(this.Field3), len(that1.Field3)) + } + for i := range this.Field3 { + if this.Field3[i] != that1.Field3[i] { + return fmt.Errorf("Field3 this[%v](%v) Not Equal that[%v](%v)", i, this.Field3[i], i, that1.Field3[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NidRepEnum) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*NidRepEnum) + if !ok { + that2, ok := that.(NidRepEnum) + 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.Field1) != len(that1.Field1) { + return false + } + for i := range this.Field1 { + if this.Field1[i] != that1.Field1[i] { + return false + } + } + if len(this.Field2) != len(that1.Field2) { + return false + } + for i := range this.Field2 { + if this.Field2[i] != that1.Field2[i] { + return false + } + } + if len(this.Field3) != len(that1.Field3) { + return false + } + for i := range this.Field3 { + if this.Field3[i] != that1.Field3[i] { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NinRepEnum) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NinRepEnum) + if !ok { + that2, ok := that.(NinRepEnum) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NinRepEnum") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NinRepEnum but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NinRepEnum but is not nil && this == nil") + } + if len(this.Field1) != len(that1.Field1) { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", len(this.Field1), len(that1.Field1)) + } + for i := range this.Field1 { + if this.Field1[i] != that1.Field1[i] { + return fmt.Errorf("Field1 this[%v](%v) Not Equal that[%v](%v)", i, this.Field1[i], i, that1.Field1[i]) + } + } + if len(this.Field2) != len(that1.Field2) { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", len(this.Field2), len(that1.Field2)) + } + for i := range this.Field2 { + if this.Field2[i] != that1.Field2[i] { + return fmt.Errorf("Field2 this[%v](%v) Not Equal that[%v](%v)", i, this.Field2[i], i, that1.Field2[i]) + } + } + if len(this.Field3) != len(that1.Field3) { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", len(this.Field3), len(that1.Field3)) + } + for i := range this.Field3 { + if this.Field3[i] != that1.Field3[i] { + return fmt.Errorf("Field3 this[%v](%v) Not Equal that[%v](%v)", i, this.Field3[i], i, that1.Field3[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NinRepEnum) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*NinRepEnum) + if !ok { + that2, ok := that.(NinRepEnum) + 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.Field1) != len(that1.Field1) { + return false + } + for i := range this.Field1 { + if this.Field1[i] != that1.Field1[i] { + return false + } + } + if len(this.Field2) != len(that1.Field2) { + return false + } + for i := range this.Field2 { + if this.Field2[i] != that1.Field2[i] { + return false + } + } + if len(this.Field3) != len(that1.Field3) { + return false + } + for i := range this.Field3 { + if this.Field3[i] != that1.Field3[i] { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NinOptEnumDefault) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NinOptEnumDefault) + if !ok { + that2, ok := that.(NinOptEnumDefault) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NinOptEnumDefault") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NinOptEnumDefault but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NinOptEnumDefault but is not nil && this == nil") + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) + } + } else if this.Field1 != nil { + return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") + } else if that1.Field1 != nil { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", *this.Field2, *that1.Field2) + } + } else if this.Field2 != nil { + return fmt.Errorf("this.Field2 == nil && that.Field2 != nil") + } else if that1.Field2 != nil { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) + } + if this.Field3 != nil && that1.Field3 != nil { + if *this.Field3 != *that1.Field3 { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", *this.Field3, *that1.Field3) + } + } else if this.Field3 != nil { + return fmt.Errorf("this.Field3 == nil && that.Field3 != nil") + } else if that1.Field3 != nil { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", this.Field3, that1.Field3) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NinOptEnumDefault) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*NinOptEnumDefault) + if !ok { + that2, ok := that.(NinOptEnumDefault) + 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.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return false + } + } else if this.Field1 != nil { + return false + } else if that1.Field1 != nil { + return false + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + return false + } + } else if this.Field2 != nil { + return false + } else if that1.Field2 != nil { + return false + } + if this.Field3 != nil && that1.Field3 != nil { + if *this.Field3 != *that1.Field3 { + return false + } + } else if this.Field3 != nil { + return false + } else if that1.Field3 != nil { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *AnotherNinOptEnum) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*AnotherNinOptEnum) + if !ok { + that2, ok := that.(AnotherNinOptEnum) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *AnotherNinOptEnum") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *AnotherNinOptEnum but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *AnotherNinOptEnum but is not nil && this == nil") + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) + } + } else if this.Field1 != nil { + return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") + } else if that1.Field1 != nil { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", *this.Field2, *that1.Field2) + } + } else if this.Field2 != nil { + return fmt.Errorf("this.Field2 == nil && that.Field2 != nil") + } else if that1.Field2 != nil { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) + } + if this.Field3 != nil && that1.Field3 != nil { + if *this.Field3 != *that1.Field3 { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", *this.Field3, *that1.Field3) + } + } else if this.Field3 != nil { + return fmt.Errorf("this.Field3 == nil && that.Field3 != nil") + } else if that1.Field3 != nil { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", this.Field3, that1.Field3) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *AnotherNinOptEnum) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*AnotherNinOptEnum) + if !ok { + that2, ok := that.(AnotherNinOptEnum) + 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.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return false + } + } else if this.Field1 != nil { + return false + } else if that1.Field1 != nil { + return false + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + return false + } + } else if this.Field2 != nil { + return false + } else if that1.Field2 != nil { + return false + } + if this.Field3 != nil && that1.Field3 != nil { + if *this.Field3 != *that1.Field3 { + return false + } + } else if this.Field3 != nil { + return false + } else if that1.Field3 != nil { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *AnotherNinOptEnumDefault) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*AnotherNinOptEnumDefault) + if !ok { + that2, ok := that.(AnotherNinOptEnumDefault) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *AnotherNinOptEnumDefault") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *AnotherNinOptEnumDefault but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *AnotherNinOptEnumDefault but is not nil && this == nil") + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) + } + } else if this.Field1 != nil { + return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") + } else if that1.Field1 != nil { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", *this.Field2, *that1.Field2) + } + } else if this.Field2 != nil { + return fmt.Errorf("this.Field2 == nil && that.Field2 != nil") + } else if that1.Field2 != nil { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) + } + if this.Field3 != nil && that1.Field3 != nil { + if *this.Field3 != *that1.Field3 { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", *this.Field3, *that1.Field3) + } + } else if this.Field3 != nil { + return fmt.Errorf("this.Field3 == nil && that.Field3 != nil") + } else if that1.Field3 != nil { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", this.Field3, that1.Field3) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *AnotherNinOptEnumDefault) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*AnotherNinOptEnumDefault) + if !ok { + that2, ok := that.(AnotherNinOptEnumDefault) + 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.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return false + } + } else if this.Field1 != nil { + return false + } else if that1.Field1 != nil { + return false + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + return false + } + } else if this.Field2 != nil { + return false + } else if that1.Field2 != nil { + return false + } + if this.Field3 != nil && that1.Field3 != nil { + if *this.Field3 != *that1.Field3 { + return false + } + } else if this.Field3 != nil { + return false + } else if that1.Field3 != nil { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *Timer) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*Timer) + if !ok { + that2, ok := that.(Timer) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *Timer") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *Timer but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *Timer but is not nil && this == nil") + } + if this.Time1 != that1.Time1 { + return fmt.Errorf("Time1 this(%v) Not Equal that(%v)", this.Time1, that1.Time1) + } + if this.Time2 != that1.Time2 { + return fmt.Errorf("Time2 this(%v) Not Equal that(%v)", this.Time2, that1.Time2) + } + if !bytes.Equal(this.Data, that1.Data) { + return fmt.Errorf("Data this(%v) Not Equal that(%v)", this.Data, that1.Data) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *Timer) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*Timer) + if !ok { + that2, ok := that.(Timer) + 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.Time1 != that1.Time1 { + return false + } + if this.Time2 != that1.Time2 { + return false + } + if !bytes.Equal(this.Data, that1.Data) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *MyExtendable) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*MyExtendable) + if !ok { + that2, ok := that.(MyExtendable) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *MyExtendable") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *MyExtendable but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *MyExtendable but is not nil && this == nil") + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) + } + } else if this.Field1 != nil { + return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") + } else if that1.Field1 != nil { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) + } + for k, v := range this.XXX_extensions { + if v2, ok := that1.XXX_extensions[k]; ok { + if !v.Equal(&v2) { + return fmt.Errorf("XXX_extensions this[%v](%v) Not Equal that[%v](%v)", k, this.XXX_extensions[k], k, that1.XXX_extensions[k]) + } + } else { + return fmt.Errorf("XXX_extensions[%v] Not In that", k) + } + } + for k := range that1.XXX_extensions { + if _, ok := this.XXX_extensions[k]; !ok { + return fmt.Errorf("XXX_extensions[%v] Not In this", k) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *MyExtendable) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*MyExtendable) + if !ok { + that2, ok := that.(MyExtendable) + 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.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return false + } + } else if this.Field1 != nil { + return false + } else if that1.Field1 != nil { + return false + } + for k, v := range this.XXX_extensions { + if v2, ok := that1.XXX_extensions[k]; ok { + if !v.Equal(&v2) { + return false + } + } else { + return false + } + } + for k := range that1.XXX_extensions { + if _, ok := this.XXX_extensions[k]; !ok { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *OtherExtenable) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*OtherExtenable) + if !ok { + that2, ok := that.(OtherExtenable) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *OtherExtenable") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *OtherExtenable but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *OtherExtenable but is not nil && this == nil") + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", *this.Field2, *that1.Field2) + } + } else if this.Field2 != nil { + return fmt.Errorf("this.Field2 == nil && that.Field2 != nil") + } else if that1.Field2 != nil { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) + } + if this.Field13 != nil && that1.Field13 != nil { + if *this.Field13 != *that1.Field13 { + return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", *this.Field13, *that1.Field13) + } + } else if this.Field13 != nil { + return fmt.Errorf("this.Field13 == nil && that.Field13 != nil") + } else if that1.Field13 != nil { + return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", this.Field13, that1.Field13) + } + if !this.M.Equal(that1.M) { + return fmt.Errorf("M this(%v) Not Equal that(%v)", this.M, that1.M) + } + for k, v := range this.XXX_extensions { + if v2, ok := that1.XXX_extensions[k]; ok { + if !v.Equal(&v2) { + return fmt.Errorf("XXX_extensions this[%v](%v) Not Equal that[%v](%v)", k, this.XXX_extensions[k], k, that1.XXX_extensions[k]) + } + } else { + return fmt.Errorf("XXX_extensions[%v] Not In that", k) + } + } + for k := range that1.XXX_extensions { + if _, ok := this.XXX_extensions[k]; !ok { + return fmt.Errorf("XXX_extensions[%v] Not In this", k) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *OtherExtenable) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*OtherExtenable) + if !ok { + that2, ok := that.(OtherExtenable) + 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.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + return false + } + } else if this.Field2 != nil { + return false + } else if that1.Field2 != nil { + return false + } + if this.Field13 != nil && that1.Field13 != nil { + if *this.Field13 != *that1.Field13 { + return false + } + } else if this.Field13 != nil { + return false + } else if that1.Field13 != nil { + return false + } + if !this.M.Equal(that1.M) { + return false + } + for k, v := range this.XXX_extensions { + if v2, ok := that1.XXX_extensions[k]; ok { + if !v.Equal(&v2) { + return false + } + } else { + return false + } + } + for k := range that1.XXX_extensions { + if _, ok := this.XXX_extensions[k]; !ok { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NestedDefinition) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NestedDefinition) + if !ok { + that2, ok := that.(NestedDefinition) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NestedDefinition") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NestedDefinition but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NestedDefinition but is not nil && this == nil") + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) + } + } else if this.Field1 != nil { + return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") + } else if that1.Field1 != nil { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) + } + if this.EnumField != nil && that1.EnumField != nil { + if *this.EnumField != *that1.EnumField { + return fmt.Errorf("EnumField this(%v) Not Equal that(%v)", *this.EnumField, *that1.EnumField) + } + } else if this.EnumField != nil { + return fmt.Errorf("this.EnumField == nil && that.EnumField != nil") + } else if that1.EnumField != nil { + return fmt.Errorf("EnumField this(%v) Not Equal that(%v)", this.EnumField, that1.EnumField) + } + if !this.NNM.Equal(that1.NNM) { + return fmt.Errorf("NNM this(%v) Not Equal that(%v)", this.NNM, that1.NNM) + } + if !this.NM.Equal(that1.NM) { + return fmt.Errorf("NM this(%v) Not Equal that(%v)", this.NM, that1.NM) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NestedDefinition) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*NestedDefinition) + if !ok { + that2, ok := that.(NestedDefinition) + 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.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return false + } + } else if this.Field1 != nil { + return false + } else if that1.Field1 != nil { + return false + } + if this.EnumField != nil && that1.EnumField != nil { + if *this.EnumField != *that1.EnumField { + return false + } + } else if this.EnumField != nil { + return false + } else if that1.EnumField != nil { + return false + } + if !this.NNM.Equal(that1.NNM) { + return false + } + if !this.NM.Equal(that1.NM) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NestedDefinition_NestedMessage) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NestedDefinition_NestedMessage) + if !ok { + that2, ok := that.(NestedDefinition_NestedMessage) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NestedDefinition_NestedMessage") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NestedDefinition_NestedMessage but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NestedDefinition_NestedMessage but is not nil && this == nil") + } + if this.NestedField1 != nil && that1.NestedField1 != nil { + if *this.NestedField1 != *that1.NestedField1 { + return fmt.Errorf("NestedField1 this(%v) Not Equal that(%v)", *this.NestedField1, *that1.NestedField1) + } + } else if this.NestedField1 != nil { + return fmt.Errorf("this.NestedField1 == nil && that.NestedField1 != nil") + } else if that1.NestedField1 != nil { + return fmt.Errorf("NestedField1 this(%v) Not Equal that(%v)", this.NestedField1, that1.NestedField1) + } + if !this.NNM.Equal(that1.NNM) { + return fmt.Errorf("NNM this(%v) Not Equal that(%v)", this.NNM, that1.NNM) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NestedDefinition_NestedMessage) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*NestedDefinition_NestedMessage) + if !ok { + that2, ok := that.(NestedDefinition_NestedMessage) + 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.NestedField1 != nil && that1.NestedField1 != nil { + if *this.NestedField1 != *that1.NestedField1 { + return false + } + } else if this.NestedField1 != nil { + return false + } else if that1.NestedField1 != nil { + return false + } + if !this.NNM.Equal(that1.NNM) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NestedDefinition_NestedMessage_NestedNestedMsg) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NestedDefinition_NestedMessage_NestedNestedMsg) + if !ok { + that2, ok := that.(NestedDefinition_NestedMessage_NestedNestedMsg) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NestedDefinition_NestedMessage_NestedNestedMsg") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NestedDefinition_NestedMessage_NestedNestedMsg but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NestedDefinition_NestedMessage_NestedNestedMsg but is not nil && this == nil") + } + if this.NestedNestedField1 != nil && that1.NestedNestedField1 != nil { + if *this.NestedNestedField1 != *that1.NestedNestedField1 { + return fmt.Errorf("NestedNestedField1 this(%v) Not Equal that(%v)", *this.NestedNestedField1, *that1.NestedNestedField1) + } + } else if this.NestedNestedField1 != nil { + return fmt.Errorf("this.NestedNestedField1 == nil && that.NestedNestedField1 != nil") + } else if that1.NestedNestedField1 != nil { + return fmt.Errorf("NestedNestedField1 this(%v) Not Equal that(%v)", this.NestedNestedField1, that1.NestedNestedField1) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NestedDefinition_NestedMessage_NestedNestedMsg) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*NestedDefinition_NestedMessage_NestedNestedMsg) + if !ok { + that2, ok := that.(NestedDefinition_NestedMessage_NestedNestedMsg) + 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.NestedNestedField1 != nil && that1.NestedNestedField1 != nil { + if *this.NestedNestedField1 != *that1.NestedNestedField1 { + return false + } + } else if this.NestedNestedField1 != nil { + return false + } else if that1.NestedNestedField1 != nil { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NestedScope) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NestedScope) + if !ok { + that2, ok := that.(NestedScope) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NestedScope") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NestedScope but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NestedScope but is not nil && this == nil") + } + if !this.A.Equal(that1.A) { + return fmt.Errorf("A this(%v) Not Equal that(%v)", this.A, that1.A) + } + if this.B != nil && that1.B != nil { + if *this.B != *that1.B { + return fmt.Errorf("B this(%v) Not Equal that(%v)", *this.B, *that1.B) + } + } else if this.B != nil { + return fmt.Errorf("this.B == nil && that.B != nil") + } else if that1.B != nil { + return fmt.Errorf("B this(%v) Not Equal that(%v)", this.B, that1.B) + } + if !this.C.Equal(that1.C) { + return fmt.Errorf("C this(%v) Not Equal that(%v)", this.C, that1.C) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NestedScope) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*NestedScope) + if !ok { + that2, ok := that.(NestedScope) + 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.A.Equal(that1.A) { + return false + } + if this.B != nil && that1.B != nil { + if *this.B != *that1.B { + return false + } + } else if this.B != nil { + return false + } else if that1.B != nil { + return false + } + if !this.C.Equal(that1.C) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NinOptNativeDefault) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NinOptNativeDefault) + if !ok { + that2, ok := that.(NinOptNativeDefault) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NinOptNativeDefault") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NinOptNativeDefault but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NinOptNativeDefault but is not nil && this == nil") + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) + } + } else if this.Field1 != nil { + return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") + } else if that1.Field1 != nil { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", *this.Field2, *that1.Field2) + } + } else if this.Field2 != nil { + return fmt.Errorf("this.Field2 == nil && that.Field2 != nil") + } else if that1.Field2 != nil { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) + } + if this.Field3 != nil && that1.Field3 != nil { + if *this.Field3 != *that1.Field3 { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", *this.Field3, *that1.Field3) + } + } else if this.Field3 != nil { + return fmt.Errorf("this.Field3 == nil && that.Field3 != nil") + } else if that1.Field3 != nil { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", this.Field3, that1.Field3) + } + if this.Field4 != nil && that1.Field4 != nil { + if *this.Field4 != *that1.Field4 { + return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", *this.Field4, *that1.Field4) + } + } else if this.Field4 != nil { + return fmt.Errorf("this.Field4 == nil && that.Field4 != nil") + } else if that1.Field4 != nil { + return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", this.Field4, that1.Field4) + } + if this.Field5 != nil && that1.Field5 != nil { + if *this.Field5 != *that1.Field5 { + return fmt.Errorf("Field5 this(%v) Not Equal that(%v)", *this.Field5, *that1.Field5) + } + } else if this.Field5 != nil { + return fmt.Errorf("this.Field5 == nil && that.Field5 != nil") + } else if that1.Field5 != nil { + return fmt.Errorf("Field5 this(%v) Not Equal that(%v)", this.Field5, that1.Field5) + } + if this.Field6 != nil && that1.Field6 != nil { + if *this.Field6 != *that1.Field6 { + return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", *this.Field6, *that1.Field6) + } + } else if this.Field6 != nil { + return fmt.Errorf("this.Field6 == nil && that.Field6 != nil") + } else if that1.Field6 != nil { + return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", this.Field6, that1.Field6) + } + if this.Field7 != nil && that1.Field7 != nil { + if *this.Field7 != *that1.Field7 { + return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", *this.Field7, *that1.Field7) + } + } else if this.Field7 != nil { + return fmt.Errorf("this.Field7 == nil && that.Field7 != nil") + } else if that1.Field7 != nil { + return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", this.Field7, that1.Field7) + } + if this.Field8 != nil && that1.Field8 != nil { + if *this.Field8 != *that1.Field8 { + return fmt.Errorf("Field8 this(%v) Not Equal that(%v)", *this.Field8, *that1.Field8) + } + } else if this.Field8 != nil { + return fmt.Errorf("this.Field8 == nil && that.Field8 != nil") + } else if that1.Field8 != nil { + return fmt.Errorf("Field8 this(%v) Not Equal that(%v)", this.Field8, that1.Field8) + } + if this.Field9 != nil && that1.Field9 != nil { + if *this.Field9 != *that1.Field9 { + return fmt.Errorf("Field9 this(%v) Not Equal that(%v)", *this.Field9, *that1.Field9) + } + } else if this.Field9 != nil { + return fmt.Errorf("this.Field9 == nil && that.Field9 != nil") + } else if that1.Field9 != nil { + return fmt.Errorf("Field9 this(%v) Not Equal that(%v)", this.Field9, that1.Field9) + } + if this.Field10 != nil && that1.Field10 != nil { + if *this.Field10 != *that1.Field10 { + return fmt.Errorf("Field10 this(%v) Not Equal that(%v)", *this.Field10, *that1.Field10) + } + } else if this.Field10 != nil { + return fmt.Errorf("this.Field10 == nil && that.Field10 != nil") + } else if that1.Field10 != nil { + return fmt.Errorf("Field10 this(%v) Not Equal that(%v)", this.Field10, that1.Field10) + } + if this.Field11 != nil && that1.Field11 != nil { + if *this.Field11 != *that1.Field11 { + return fmt.Errorf("Field11 this(%v) Not Equal that(%v)", *this.Field11, *that1.Field11) + } + } else if this.Field11 != nil { + return fmt.Errorf("this.Field11 == nil && that.Field11 != nil") + } else if that1.Field11 != nil { + return fmt.Errorf("Field11 this(%v) Not Equal that(%v)", this.Field11, that1.Field11) + } + if this.Field12 != nil && that1.Field12 != nil { + if *this.Field12 != *that1.Field12 { + return fmt.Errorf("Field12 this(%v) Not Equal that(%v)", *this.Field12, *that1.Field12) + } + } else if this.Field12 != nil { + return fmt.Errorf("this.Field12 == nil && that.Field12 != nil") + } else if that1.Field12 != nil { + return fmt.Errorf("Field12 this(%v) Not Equal that(%v)", this.Field12, that1.Field12) + } + if this.Field13 != nil && that1.Field13 != nil { + if *this.Field13 != *that1.Field13 { + return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", *this.Field13, *that1.Field13) + } + } else if this.Field13 != nil { + return fmt.Errorf("this.Field13 == nil && that.Field13 != nil") + } else if that1.Field13 != nil { + return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", this.Field13, that1.Field13) + } + if this.Field14 != nil && that1.Field14 != nil { + if *this.Field14 != *that1.Field14 { + return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", *this.Field14, *that1.Field14) + } + } else if this.Field14 != nil { + return fmt.Errorf("this.Field14 == nil && that.Field14 != nil") + } else if that1.Field14 != nil { + return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", this.Field14, that1.Field14) + } + if !bytes.Equal(this.Field15, that1.Field15) { + return fmt.Errorf("Field15 this(%v) Not Equal that(%v)", this.Field15, that1.Field15) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NinOptNativeDefault) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*NinOptNativeDefault) + if !ok { + that2, ok := that.(NinOptNativeDefault) + 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.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return false + } + } else if this.Field1 != nil { + return false + } else if that1.Field1 != nil { + return false + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + return false + } + } else if this.Field2 != nil { + return false + } else if that1.Field2 != nil { + return false + } + if this.Field3 != nil && that1.Field3 != nil { + if *this.Field3 != *that1.Field3 { + return false + } + } else if this.Field3 != nil { + return false + } else if that1.Field3 != nil { + return false + } + if this.Field4 != nil && that1.Field4 != nil { + if *this.Field4 != *that1.Field4 { + return false + } + } else if this.Field4 != nil { + return false + } else if that1.Field4 != nil { + return false + } + if this.Field5 != nil && that1.Field5 != nil { + if *this.Field5 != *that1.Field5 { + return false + } + } else if this.Field5 != nil { + return false + } else if that1.Field5 != nil { + return false + } + if this.Field6 != nil && that1.Field6 != nil { + if *this.Field6 != *that1.Field6 { + return false + } + } else if this.Field6 != nil { + return false + } else if that1.Field6 != nil { + return false + } + if this.Field7 != nil && that1.Field7 != nil { + if *this.Field7 != *that1.Field7 { + return false + } + } else if this.Field7 != nil { + return false + } else if that1.Field7 != nil { + return false + } + if this.Field8 != nil && that1.Field8 != nil { + if *this.Field8 != *that1.Field8 { + return false + } + } else if this.Field8 != nil { + return false + } else if that1.Field8 != nil { + return false + } + if this.Field9 != nil && that1.Field9 != nil { + if *this.Field9 != *that1.Field9 { + return false + } + } else if this.Field9 != nil { + return false + } else if that1.Field9 != nil { + return false + } + if this.Field10 != nil && that1.Field10 != nil { + if *this.Field10 != *that1.Field10 { + return false + } + } else if this.Field10 != nil { + return false + } else if that1.Field10 != nil { + return false + } + if this.Field11 != nil && that1.Field11 != nil { + if *this.Field11 != *that1.Field11 { + return false + } + } else if this.Field11 != nil { + return false + } else if that1.Field11 != nil { + return false + } + if this.Field12 != nil && that1.Field12 != nil { + if *this.Field12 != *that1.Field12 { + return false + } + } else if this.Field12 != nil { + return false + } else if that1.Field12 != nil { + return false + } + if this.Field13 != nil && that1.Field13 != nil { + if *this.Field13 != *that1.Field13 { + return false + } + } else if this.Field13 != nil { + return false + } else if that1.Field13 != nil { + return false + } + if this.Field14 != nil && that1.Field14 != nil { + if *this.Field14 != *that1.Field14 { + return false + } + } else if this.Field14 != nil { + return false + } else if that1.Field14 != nil { + return false + } + if !bytes.Equal(this.Field15, that1.Field15) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *CustomContainer) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*CustomContainer) + if !ok { + that2, ok := that.(CustomContainer) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *CustomContainer") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *CustomContainer but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *CustomContainer but is not nil && this == nil") + } + if !this.CustomStruct.Equal(&that1.CustomStruct) { + return fmt.Errorf("CustomStruct this(%v) Not Equal that(%v)", this.CustomStruct, that1.CustomStruct) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *CustomContainer) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*CustomContainer) + if !ok { + that2, ok := that.(CustomContainer) + 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.CustomStruct.Equal(&that1.CustomStruct) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *CustomNameNidOptNative) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*CustomNameNidOptNative) + if !ok { + that2, ok := that.(CustomNameNidOptNative) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *CustomNameNidOptNative") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *CustomNameNidOptNative but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *CustomNameNidOptNative but is not nil && this == nil") + } + if this.FieldA != that1.FieldA { + return fmt.Errorf("FieldA this(%v) Not Equal that(%v)", this.FieldA, that1.FieldA) + } + if this.FieldB != that1.FieldB { + return fmt.Errorf("FieldB this(%v) Not Equal that(%v)", this.FieldB, that1.FieldB) + } + if this.FieldC != that1.FieldC { + return fmt.Errorf("FieldC this(%v) Not Equal that(%v)", this.FieldC, that1.FieldC) + } + if this.FieldD != that1.FieldD { + return fmt.Errorf("FieldD this(%v) Not Equal that(%v)", this.FieldD, that1.FieldD) + } + if this.FieldE != that1.FieldE { + return fmt.Errorf("FieldE this(%v) Not Equal that(%v)", this.FieldE, that1.FieldE) + } + if this.FieldF != that1.FieldF { + return fmt.Errorf("FieldF this(%v) Not Equal that(%v)", this.FieldF, that1.FieldF) + } + if this.FieldG != that1.FieldG { + return fmt.Errorf("FieldG this(%v) Not Equal that(%v)", this.FieldG, that1.FieldG) + } + if this.FieldH != that1.FieldH { + return fmt.Errorf("FieldH this(%v) Not Equal that(%v)", this.FieldH, that1.FieldH) + } + if this.FieldI != that1.FieldI { + return fmt.Errorf("FieldI this(%v) Not Equal that(%v)", this.FieldI, that1.FieldI) + } + if this.FieldJ != that1.FieldJ { + return fmt.Errorf("FieldJ this(%v) Not Equal that(%v)", this.FieldJ, that1.FieldJ) + } + if this.FieldK != that1.FieldK { + return fmt.Errorf("FieldK this(%v) Not Equal that(%v)", this.FieldK, that1.FieldK) + } + if this.FieldL != that1.FieldL { + return fmt.Errorf("FieldL this(%v) Not Equal that(%v)", this.FieldL, that1.FieldL) + } + if this.FieldM != that1.FieldM { + return fmt.Errorf("FieldM this(%v) Not Equal that(%v)", this.FieldM, that1.FieldM) + } + if this.FieldN != that1.FieldN { + return fmt.Errorf("FieldN this(%v) Not Equal that(%v)", this.FieldN, that1.FieldN) + } + if !bytes.Equal(this.FieldO, that1.FieldO) { + return fmt.Errorf("FieldO this(%v) Not Equal that(%v)", this.FieldO, that1.FieldO) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *CustomNameNidOptNative) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*CustomNameNidOptNative) + if !ok { + that2, ok := that.(CustomNameNidOptNative) + 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.FieldA != that1.FieldA { + return false + } + if this.FieldB != that1.FieldB { + return false + } + if this.FieldC != that1.FieldC { + return false + } + if this.FieldD != that1.FieldD { + return false + } + if this.FieldE != that1.FieldE { + return false + } + if this.FieldF != that1.FieldF { + return false + } + if this.FieldG != that1.FieldG { + return false + } + if this.FieldH != that1.FieldH { + return false + } + if this.FieldI != that1.FieldI { + return false + } + if this.FieldJ != that1.FieldJ { + return false + } + if this.FieldK != that1.FieldK { + return false + } + if this.FieldL != that1.FieldL { + return false + } + if this.FieldM != that1.FieldM { + return false + } + if this.FieldN != that1.FieldN { + return false + } + if !bytes.Equal(this.FieldO, that1.FieldO) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *CustomNameNinOptNative) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*CustomNameNinOptNative) + if !ok { + that2, ok := that.(CustomNameNinOptNative) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *CustomNameNinOptNative") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *CustomNameNinOptNative but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *CustomNameNinOptNative but is not nil && this == nil") + } + if this.FieldA != nil && that1.FieldA != nil { + if *this.FieldA != *that1.FieldA { + return fmt.Errorf("FieldA this(%v) Not Equal that(%v)", *this.FieldA, *that1.FieldA) + } + } else if this.FieldA != nil { + return fmt.Errorf("this.FieldA == nil && that.FieldA != nil") + } else if that1.FieldA != nil { + return fmt.Errorf("FieldA this(%v) Not Equal that(%v)", this.FieldA, that1.FieldA) + } + if this.FieldB != nil && that1.FieldB != nil { + if *this.FieldB != *that1.FieldB { + return fmt.Errorf("FieldB this(%v) Not Equal that(%v)", *this.FieldB, *that1.FieldB) + } + } else if this.FieldB != nil { + return fmt.Errorf("this.FieldB == nil && that.FieldB != nil") + } else if that1.FieldB != nil { + return fmt.Errorf("FieldB this(%v) Not Equal that(%v)", this.FieldB, that1.FieldB) + } + if this.FieldC != nil && that1.FieldC != nil { + if *this.FieldC != *that1.FieldC { + return fmt.Errorf("FieldC this(%v) Not Equal that(%v)", *this.FieldC, *that1.FieldC) + } + } else if this.FieldC != nil { + return fmt.Errorf("this.FieldC == nil && that.FieldC != nil") + } else if that1.FieldC != nil { + return fmt.Errorf("FieldC this(%v) Not Equal that(%v)", this.FieldC, that1.FieldC) + } + if this.FieldD != nil && that1.FieldD != nil { + if *this.FieldD != *that1.FieldD { + return fmt.Errorf("FieldD this(%v) Not Equal that(%v)", *this.FieldD, *that1.FieldD) + } + } else if this.FieldD != nil { + return fmt.Errorf("this.FieldD == nil && that.FieldD != nil") + } else if that1.FieldD != nil { + return fmt.Errorf("FieldD this(%v) Not Equal that(%v)", this.FieldD, that1.FieldD) + } + if this.FieldE != nil && that1.FieldE != nil { + if *this.FieldE != *that1.FieldE { + return fmt.Errorf("FieldE this(%v) Not Equal that(%v)", *this.FieldE, *that1.FieldE) + } + } else if this.FieldE != nil { + return fmt.Errorf("this.FieldE == nil && that.FieldE != nil") + } else if that1.FieldE != nil { + return fmt.Errorf("FieldE this(%v) Not Equal that(%v)", this.FieldE, that1.FieldE) + } + if this.FieldF != nil && that1.FieldF != nil { + if *this.FieldF != *that1.FieldF { + return fmt.Errorf("FieldF this(%v) Not Equal that(%v)", *this.FieldF, *that1.FieldF) + } + } else if this.FieldF != nil { + return fmt.Errorf("this.FieldF == nil && that.FieldF != nil") + } else if that1.FieldF != nil { + return fmt.Errorf("FieldF this(%v) Not Equal that(%v)", this.FieldF, that1.FieldF) + } + if this.FieldG != nil && that1.FieldG != nil { + if *this.FieldG != *that1.FieldG { + return fmt.Errorf("FieldG this(%v) Not Equal that(%v)", *this.FieldG, *that1.FieldG) + } + } else if this.FieldG != nil { + return fmt.Errorf("this.FieldG == nil && that.FieldG != nil") + } else if that1.FieldG != nil { + return fmt.Errorf("FieldG this(%v) Not Equal that(%v)", this.FieldG, that1.FieldG) + } + if this.FieldH != nil && that1.FieldH != nil { + if *this.FieldH != *that1.FieldH { + return fmt.Errorf("FieldH this(%v) Not Equal that(%v)", *this.FieldH, *that1.FieldH) + } + } else if this.FieldH != nil { + return fmt.Errorf("this.FieldH == nil && that.FieldH != nil") + } else if that1.FieldH != nil { + return fmt.Errorf("FieldH this(%v) Not Equal that(%v)", this.FieldH, that1.FieldH) + } + if this.FieldI != nil && that1.FieldI != nil { + if *this.FieldI != *that1.FieldI { + return fmt.Errorf("FieldI this(%v) Not Equal that(%v)", *this.FieldI, *that1.FieldI) + } + } else if this.FieldI != nil { + return fmt.Errorf("this.FieldI == nil && that.FieldI != nil") + } else if that1.FieldI != nil { + return fmt.Errorf("FieldI this(%v) Not Equal that(%v)", this.FieldI, that1.FieldI) + } + if this.FieldJ != nil && that1.FieldJ != nil { + if *this.FieldJ != *that1.FieldJ { + return fmt.Errorf("FieldJ this(%v) Not Equal that(%v)", *this.FieldJ, *that1.FieldJ) + } + } else if this.FieldJ != nil { + return fmt.Errorf("this.FieldJ == nil && that.FieldJ != nil") + } else if that1.FieldJ != nil { + return fmt.Errorf("FieldJ this(%v) Not Equal that(%v)", this.FieldJ, that1.FieldJ) + } + if this.FieldK != nil && that1.FieldK != nil { + if *this.FieldK != *that1.FieldK { + return fmt.Errorf("FieldK this(%v) Not Equal that(%v)", *this.FieldK, *that1.FieldK) + } + } else if this.FieldK != nil { + return fmt.Errorf("this.FieldK == nil && that.FieldK != nil") + } else if that1.FieldK != nil { + return fmt.Errorf("FieldK this(%v) Not Equal that(%v)", this.FieldK, that1.FieldK) + } + if this.FielL != nil && that1.FielL != nil { + if *this.FielL != *that1.FielL { + return fmt.Errorf("FielL this(%v) Not Equal that(%v)", *this.FielL, *that1.FielL) + } + } else if this.FielL != nil { + return fmt.Errorf("this.FielL == nil && that.FielL != nil") + } else if that1.FielL != nil { + return fmt.Errorf("FielL this(%v) Not Equal that(%v)", this.FielL, that1.FielL) + } + if this.FieldM != nil && that1.FieldM != nil { + if *this.FieldM != *that1.FieldM { + return fmt.Errorf("FieldM this(%v) Not Equal that(%v)", *this.FieldM, *that1.FieldM) + } + } else if this.FieldM != nil { + return fmt.Errorf("this.FieldM == nil && that.FieldM != nil") + } else if that1.FieldM != nil { + return fmt.Errorf("FieldM this(%v) Not Equal that(%v)", this.FieldM, that1.FieldM) + } + if this.FieldN != nil && that1.FieldN != nil { + if *this.FieldN != *that1.FieldN { + return fmt.Errorf("FieldN this(%v) Not Equal that(%v)", *this.FieldN, *that1.FieldN) + } + } else if this.FieldN != nil { + return fmt.Errorf("this.FieldN == nil && that.FieldN != nil") + } else if that1.FieldN != nil { + return fmt.Errorf("FieldN this(%v) Not Equal that(%v)", this.FieldN, that1.FieldN) + } + if !bytes.Equal(this.FieldO, that1.FieldO) { + return fmt.Errorf("FieldO this(%v) Not Equal that(%v)", this.FieldO, that1.FieldO) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *CustomNameNinOptNative) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*CustomNameNinOptNative) + if !ok { + that2, ok := that.(CustomNameNinOptNative) + 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.FieldA != nil && that1.FieldA != nil { + if *this.FieldA != *that1.FieldA { + return false + } + } else if this.FieldA != nil { + return false + } else if that1.FieldA != nil { + return false + } + if this.FieldB != nil && that1.FieldB != nil { + if *this.FieldB != *that1.FieldB { + return false + } + } else if this.FieldB != nil { + return false + } else if that1.FieldB != nil { + return false + } + if this.FieldC != nil && that1.FieldC != nil { + if *this.FieldC != *that1.FieldC { + return false + } + } else if this.FieldC != nil { + return false + } else if that1.FieldC != nil { + return false + } + if this.FieldD != nil && that1.FieldD != nil { + if *this.FieldD != *that1.FieldD { + return false + } + } else if this.FieldD != nil { + return false + } else if that1.FieldD != nil { + return false + } + if this.FieldE != nil && that1.FieldE != nil { + if *this.FieldE != *that1.FieldE { + return false + } + } else if this.FieldE != nil { + return false + } else if that1.FieldE != nil { + return false + } + if this.FieldF != nil && that1.FieldF != nil { + if *this.FieldF != *that1.FieldF { + return false + } + } else if this.FieldF != nil { + return false + } else if that1.FieldF != nil { + return false + } + if this.FieldG != nil && that1.FieldG != nil { + if *this.FieldG != *that1.FieldG { + return false + } + } else if this.FieldG != nil { + return false + } else if that1.FieldG != nil { + return false + } + if this.FieldH != nil && that1.FieldH != nil { + if *this.FieldH != *that1.FieldH { + return false + } + } else if this.FieldH != nil { + return false + } else if that1.FieldH != nil { + return false + } + if this.FieldI != nil && that1.FieldI != nil { + if *this.FieldI != *that1.FieldI { + return false + } + } else if this.FieldI != nil { + return false + } else if that1.FieldI != nil { + return false + } + if this.FieldJ != nil && that1.FieldJ != nil { + if *this.FieldJ != *that1.FieldJ { + return false + } + } else if this.FieldJ != nil { + return false + } else if that1.FieldJ != nil { + return false + } + if this.FieldK != nil && that1.FieldK != nil { + if *this.FieldK != *that1.FieldK { + return false + } + } else if this.FieldK != nil { + return false + } else if that1.FieldK != nil { + return false + } + if this.FielL != nil && that1.FielL != nil { + if *this.FielL != *that1.FielL { + return false + } + } else if this.FielL != nil { + return false + } else if that1.FielL != nil { + return false + } + if this.FieldM != nil && that1.FieldM != nil { + if *this.FieldM != *that1.FieldM { + return false + } + } else if this.FieldM != nil { + return false + } else if that1.FieldM != nil { + return false + } + if this.FieldN != nil && that1.FieldN != nil { + if *this.FieldN != *that1.FieldN { + return false + } + } else if this.FieldN != nil { + return false + } else if that1.FieldN != nil { + return false + } + if !bytes.Equal(this.FieldO, that1.FieldO) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *CustomNameNinRepNative) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*CustomNameNinRepNative) + if !ok { + that2, ok := that.(CustomNameNinRepNative) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *CustomNameNinRepNative") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *CustomNameNinRepNative but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *CustomNameNinRepNative but is not nil && this == nil") + } + if len(this.FieldA) != len(that1.FieldA) { + return fmt.Errorf("FieldA this(%v) Not Equal that(%v)", len(this.FieldA), len(that1.FieldA)) + } + for i := range this.FieldA { + if this.FieldA[i] != that1.FieldA[i] { + return fmt.Errorf("FieldA this[%v](%v) Not Equal that[%v](%v)", i, this.FieldA[i], i, that1.FieldA[i]) + } + } + if len(this.FieldB) != len(that1.FieldB) { + return fmt.Errorf("FieldB this(%v) Not Equal that(%v)", len(this.FieldB), len(that1.FieldB)) + } + for i := range this.FieldB { + if this.FieldB[i] != that1.FieldB[i] { + return fmt.Errorf("FieldB this[%v](%v) Not Equal that[%v](%v)", i, this.FieldB[i], i, that1.FieldB[i]) + } + } + if len(this.FieldC) != len(that1.FieldC) { + return fmt.Errorf("FieldC this(%v) Not Equal that(%v)", len(this.FieldC), len(that1.FieldC)) + } + for i := range this.FieldC { + if this.FieldC[i] != that1.FieldC[i] { + return fmt.Errorf("FieldC this[%v](%v) Not Equal that[%v](%v)", i, this.FieldC[i], i, that1.FieldC[i]) + } + } + if len(this.FieldD) != len(that1.FieldD) { + return fmt.Errorf("FieldD this(%v) Not Equal that(%v)", len(this.FieldD), len(that1.FieldD)) + } + for i := range this.FieldD { + if this.FieldD[i] != that1.FieldD[i] { + return fmt.Errorf("FieldD this[%v](%v) Not Equal that[%v](%v)", i, this.FieldD[i], i, that1.FieldD[i]) + } + } + if len(this.FieldE) != len(that1.FieldE) { + return fmt.Errorf("FieldE this(%v) Not Equal that(%v)", len(this.FieldE), len(that1.FieldE)) + } + for i := range this.FieldE { + if this.FieldE[i] != that1.FieldE[i] { + return fmt.Errorf("FieldE this[%v](%v) Not Equal that[%v](%v)", i, this.FieldE[i], i, that1.FieldE[i]) + } + } + if len(this.FieldF) != len(that1.FieldF) { + return fmt.Errorf("FieldF this(%v) Not Equal that(%v)", len(this.FieldF), len(that1.FieldF)) + } + for i := range this.FieldF { + if this.FieldF[i] != that1.FieldF[i] { + return fmt.Errorf("FieldF this[%v](%v) Not Equal that[%v](%v)", i, this.FieldF[i], i, that1.FieldF[i]) + } + } + if len(this.FieldG) != len(that1.FieldG) { + return fmt.Errorf("FieldG this(%v) Not Equal that(%v)", len(this.FieldG), len(that1.FieldG)) + } + for i := range this.FieldG { + if this.FieldG[i] != that1.FieldG[i] { + return fmt.Errorf("FieldG this[%v](%v) Not Equal that[%v](%v)", i, this.FieldG[i], i, that1.FieldG[i]) + } + } + if len(this.FieldH) != len(that1.FieldH) { + return fmt.Errorf("FieldH this(%v) Not Equal that(%v)", len(this.FieldH), len(that1.FieldH)) + } + for i := range this.FieldH { + if this.FieldH[i] != that1.FieldH[i] { + return fmt.Errorf("FieldH this[%v](%v) Not Equal that[%v](%v)", i, this.FieldH[i], i, that1.FieldH[i]) + } + } + if len(this.FieldI) != len(that1.FieldI) { + return fmt.Errorf("FieldI this(%v) Not Equal that(%v)", len(this.FieldI), len(that1.FieldI)) + } + for i := range this.FieldI { + if this.FieldI[i] != that1.FieldI[i] { + return fmt.Errorf("FieldI this[%v](%v) Not Equal that[%v](%v)", i, this.FieldI[i], i, that1.FieldI[i]) + } + } + if len(this.FieldJ) != len(that1.FieldJ) { + return fmt.Errorf("FieldJ this(%v) Not Equal that(%v)", len(this.FieldJ), len(that1.FieldJ)) + } + for i := range this.FieldJ { + if this.FieldJ[i] != that1.FieldJ[i] { + return fmt.Errorf("FieldJ this[%v](%v) Not Equal that[%v](%v)", i, this.FieldJ[i], i, that1.FieldJ[i]) + } + } + if len(this.FieldK) != len(that1.FieldK) { + return fmt.Errorf("FieldK this(%v) Not Equal that(%v)", len(this.FieldK), len(that1.FieldK)) + } + for i := range this.FieldK { + if this.FieldK[i] != that1.FieldK[i] { + return fmt.Errorf("FieldK this[%v](%v) Not Equal that[%v](%v)", i, this.FieldK[i], i, that1.FieldK[i]) + } + } + if len(this.FieldL) != len(that1.FieldL) { + return fmt.Errorf("FieldL this(%v) Not Equal that(%v)", len(this.FieldL), len(that1.FieldL)) + } + for i := range this.FieldL { + if this.FieldL[i] != that1.FieldL[i] { + return fmt.Errorf("FieldL this[%v](%v) Not Equal that[%v](%v)", i, this.FieldL[i], i, that1.FieldL[i]) + } + } + if len(this.FieldM) != len(that1.FieldM) { + return fmt.Errorf("FieldM this(%v) Not Equal that(%v)", len(this.FieldM), len(that1.FieldM)) + } + for i := range this.FieldM { + if this.FieldM[i] != that1.FieldM[i] { + return fmt.Errorf("FieldM this[%v](%v) Not Equal that[%v](%v)", i, this.FieldM[i], i, that1.FieldM[i]) + } + } + if len(this.FieldN) != len(that1.FieldN) { + return fmt.Errorf("FieldN this(%v) Not Equal that(%v)", len(this.FieldN), len(that1.FieldN)) + } + for i := range this.FieldN { + if this.FieldN[i] != that1.FieldN[i] { + return fmt.Errorf("FieldN this[%v](%v) Not Equal that[%v](%v)", i, this.FieldN[i], i, that1.FieldN[i]) + } + } + if len(this.FieldO) != len(that1.FieldO) { + return fmt.Errorf("FieldO this(%v) Not Equal that(%v)", len(this.FieldO), len(that1.FieldO)) + } + for i := range this.FieldO { + if !bytes.Equal(this.FieldO[i], that1.FieldO[i]) { + return fmt.Errorf("FieldO this[%v](%v) Not Equal that[%v](%v)", i, this.FieldO[i], i, that1.FieldO[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *CustomNameNinRepNative) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*CustomNameNinRepNative) + if !ok { + that2, ok := that.(CustomNameNinRepNative) + 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.FieldA) != len(that1.FieldA) { + return false + } + for i := range this.FieldA { + if this.FieldA[i] != that1.FieldA[i] { + return false + } + } + if len(this.FieldB) != len(that1.FieldB) { + return false + } + for i := range this.FieldB { + if this.FieldB[i] != that1.FieldB[i] { + return false + } + } + if len(this.FieldC) != len(that1.FieldC) { + return false + } + for i := range this.FieldC { + if this.FieldC[i] != that1.FieldC[i] { + return false + } + } + if len(this.FieldD) != len(that1.FieldD) { + return false + } + for i := range this.FieldD { + if this.FieldD[i] != that1.FieldD[i] { + return false + } + } + if len(this.FieldE) != len(that1.FieldE) { + return false + } + for i := range this.FieldE { + if this.FieldE[i] != that1.FieldE[i] { + return false + } + } + if len(this.FieldF) != len(that1.FieldF) { + return false + } + for i := range this.FieldF { + if this.FieldF[i] != that1.FieldF[i] { + return false + } + } + if len(this.FieldG) != len(that1.FieldG) { + return false + } + for i := range this.FieldG { + if this.FieldG[i] != that1.FieldG[i] { + return false + } + } + if len(this.FieldH) != len(that1.FieldH) { + return false + } + for i := range this.FieldH { + if this.FieldH[i] != that1.FieldH[i] { + return false + } + } + if len(this.FieldI) != len(that1.FieldI) { + return false + } + for i := range this.FieldI { + if this.FieldI[i] != that1.FieldI[i] { + return false + } + } + if len(this.FieldJ) != len(that1.FieldJ) { + return false + } + for i := range this.FieldJ { + if this.FieldJ[i] != that1.FieldJ[i] { + return false + } + } + if len(this.FieldK) != len(that1.FieldK) { + return false + } + for i := range this.FieldK { + if this.FieldK[i] != that1.FieldK[i] { + return false + } + } + if len(this.FieldL) != len(that1.FieldL) { + return false + } + for i := range this.FieldL { + if this.FieldL[i] != that1.FieldL[i] { + return false + } + } + if len(this.FieldM) != len(that1.FieldM) { + return false + } + for i := range this.FieldM { + if this.FieldM[i] != that1.FieldM[i] { + return false + } + } + if len(this.FieldN) != len(that1.FieldN) { + return false + } + for i := range this.FieldN { + if this.FieldN[i] != that1.FieldN[i] { + return false + } + } + if len(this.FieldO) != len(that1.FieldO) { + return false + } + for i := range this.FieldO { + if !bytes.Equal(this.FieldO[i], that1.FieldO[i]) { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *CustomNameNinStruct) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*CustomNameNinStruct) + if !ok { + that2, ok := that.(CustomNameNinStruct) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *CustomNameNinStruct") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *CustomNameNinStruct but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *CustomNameNinStruct but is not nil && this == nil") + } + if this.FieldA != nil && that1.FieldA != nil { + if *this.FieldA != *that1.FieldA { + return fmt.Errorf("FieldA this(%v) Not Equal that(%v)", *this.FieldA, *that1.FieldA) + } + } else if this.FieldA != nil { + return fmt.Errorf("this.FieldA == nil && that.FieldA != nil") + } else if that1.FieldA != nil { + return fmt.Errorf("FieldA this(%v) Not Equal that(%v)", this.FieldA, that1.FieldA) + } + if this.FieldB != nil && that1.FieldB != nil { + if *this.FieldB != *that1.FieldB { + return fmt.Errorf("FieldB this(%v) Not Equal that(%v)", *this.FieldB, *that1.FieldB) + } + } else if this.FieldB != nil { + return fmt.Errorf("this.FieldB == nil && that.FieldB != nil") + } else if that1.FieldB != nil { + return fmt.Errorf("FieldB this(%v) Not Equal that(%v)", this.FieldB, that1.FieldB) + } + if !this.FieldC.Equal(that1.FieldC) { + return fmt.Errorf("FieldC this(%v) Not Equal that(%v)", this.FieldC, that1.FieldC) + } + if len(this.FieldD) != len(that1.FieldD) { + return fmt.Errorf("FieldD this(%v) Not Equal that(%v)", len(this.FieldD), len(that1.FieldD)) + } + for i := range this.FieldD { + if !this.FieldD[i].Equal(that1.FieldD[i]) { + return fmt.Errorf("FieldD this[%v](%v) Not Equal that[%v](%v)", i, this.FieldD[i], i, that1.FieldD[i]) + } + } + if this.FieldE != nil && that1.FieldE != nil { + if *this.FieldE != *that1.FieldE { + return fmt.Errorf("FieldE this(%v) Not Equal that(%v)", *this.FieldE, *that1.FieldE) + } + } else if this.FieldE != nil { + return fmt.Errorf("this.FieldE == nil && that.FieldE != nil") + } else if that1.FieldE != nil { + return fmt.Errorf("FieldE this(%v) Not Equal that(%v)", this.FieldE, that1.FieldE) + } + if this.FieldF != nil && that1.FieldF != nil { + if *this.FieldF != *that1.FieldF { + return fmt.Errorf("FieldF this(%v) Not Equal that(%v)", *this.FieldF, *that1.FieldF) + } + } else if this.FieldF != nil { + return fmt.Errorf("this.FieldF == nil && that.FieldF != nil") + } else if that1.FieldF != nil { + return fmt.Errorf("FieldF this(%v) Not Equal that(%v)", this.FieldF, that1.FieldF) + } + if !this.FieldG.Equal(that1.FieldG) { + return fmt.Errorf("FieldG this(%v) Not Equal that(%v)", this.FieldG, that1.FieldG) + } + if this.FieldH != nil && that1.FieldH != nil { + if *this.FieldH != *that1.FieldH { + return fmt.Errorf("FieldH this(%v) Not Equal that(%v)", *this.FieldH, *that1.FieldH) + } + } else if this.FieldH != nil { + return fmt.Errorf("this.FieldH == nil && that.FieldH != nil") + } else if that1.FieldH != nil { + return fmt.Errorf("FieldH this(%v) Not Equal that(%v)", this.FieldH, that1.FieldH) + } + if this.FieldI != nil && that1.FieldI != nil { + if *this.FieldI != *that1.FieldI { + return fmt.Errorf("FieldI this(%v) Not Equal that(%v)", *this.FieldI, *that1.FieldI) + } + } else if this.FieldI != nil { + return fmt.Errorf("this.FieldI == nil && that.FieldI != nil") + } else if that1.FieldI != nil { + return fmt.Errorf("FieldI this(%v) Not Equal that(%v)", this.FieldI, that1.FieldI) + } + if !bytes.Equal(this.FieldJ, that1.FieldJ) { + return fmt.Errorf("FieldJ this(%v) Not Equal that(%v)", this.FieldJ, that1.FieldJ) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *CustomNameNinStruct) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*CustomNameNinStruct) + if !ok { + that2, ok := that.(CustomNameNinStruct) + 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.FieldA != nil && that1.FieldA != nil { + if *this.FieldA != *that1.FieldA { + return false + } + } else if this.FieldA != nil { + return false + } else if that1.FieldA != nil { + return false + } + if this.FieldB != nil && that1.FieldB != nil { + if *this.FieldB != *that1.FieldB { + return false + } + } else if this.FieldB != nil { + return false + } else if that1.FieldB != nil { + return false + } + if !this.FieldC.Equal(that1.FieldC) { + return false + } + if len(this.FieldD) != len(that1.FieldD) { + return false + } + for i := range this.FieldD { + if !this.FieldD[i].Equal(that1.FieldD[i]) { + return false + } + } + if this.FieldE != nil && that1.FieldE != nil { + if *this.FieldE != *that1.FieldE { + return false + } + } else if this.FieldE != nil { + return false + } else if that1.FieldE != nil { + return false + } + if this.FieldF != nil && that1.FieldF != nil { + if *this.FieldF != *that1.FieldF { + return false + } + } else if this.FieldF != nil { + return false + } else if that1.FieldF != nil { + return false + } + if !this.FieldG.Equal(that1.FieldG) { + return false + } + if this.FieldH != nil && that1.FieldH != nil { + if *this.FieldH != *that1.FieldH { + return false + } + } else if this.FieldH != nil { + return false + } else if that1.FieldH != nil { + return false + } + if this.FieldI != nil && that1.FieldI != nil { + if *this.FieldI != *that1.FieldI { + return false + } + } else if this.FieldI != nil { + return false + } else if that1.FieldI != nil { + return false + } + if !bytes.Equal(this.FieldJ, that1.FieldJ) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *CustomNameCustomType) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*CustomNameCustomType) + if !ok { + that2, ok := that.(CustomNameCustomType) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *CustomNameCustomType") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *CustomNameCustomType but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *CustomNameCustomType but is not nil && this == nil") + } + if that1.FieldA == nil { + if this.FieldA != nil { + return fmt.Errorf("this.FieldA != nil && that1.FieldA == nil") + } + } else if !this.FieldA.Equal(*that1.FieldA) { + return fmt.Errorf("FieldA this(%v) Not Equal that(%v)", this.FieldA, that1.FieldA) + } + if that1.FieldB == nil { + if this.FieldB != nil { + return fmt.Errorf("this.FieldB != nil && that1.FieldB == nil") + } + } else if !this.FieldB.Equal(*that1.FieldB) { + return fmt.Errorf("FieldB this(%v) Not Equal that(%v)", this.FieldB, that1.FieldB) + } + if len(this.FieldC) != len(that1.FieldC) { + return fmt.Errorf("FieldC this(%v) Not Equal that(%v)", len(this.FieldC), len(that1.FieldC)) + } + for i := range this.FieldC { + if !this.FieldC[i].Equal(that1.FieldC[i]) { + return fmt.Errorf("FieldC this[%v](%v) Not Equal that[%v](%v)", i, this.FieldC[i], i, that1.FieldC[i]) + } + } + if len(this.FieldD) != len(that1.FieldD) { + return fmt.Errorf("FieldD this(%v) Not Equal that(%v)", len(this.FieldD), len(that1.FieldD)) + } + for i := range this.FieldD { + if !this.FieldD[i].Equal(that1.FieldD[i]) { + return fmt.Errorf("FieldD this[%v](%v) Not Equal that[%v](%v)", i, this.FieldD[i], i, that1.FieldD[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *CustomNameCustomType) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*CustomNameCustomType) + if !ok { + that2, ok := that.(CustomNameCustomType) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + if this == nil { + return true + } + return false + } else if this == nil { + return false + } + if that1.FieldA == nil { + if this.FieldA != nil { + return false + } + } else if !this.FieldA.Equal(*that1.FieldA) { + return false + } + if that1.FieldB == nil { + if this.FieldB != nil { + return false + } + } else if !this.FieldB.Equal(*that1.FieldB) { + return false + } + if len(this.FieldC) != len(that1.FieldC) { + return false + } + for i := range this.FieldC { + if !this.FieldC[i].Equal(that1.FieldC[i]) { + return false + } + } + if len(this.FieldD) != len(that1.FieldD) { + return false + } + for i := range this.FieldD { + if !this.FieldD[i].Equal(that1.FieldD[i]) { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *CustomNameNinEmbeddedStructUnion) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*CustomNameNinEmbeddedStructUnion) + if !ok { + that2, ok := that.(CustomNameNinEmbeddedStructUnion) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *CustomNameNinEmbeddedStructUnion") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *CustomNameNinEmbeddedStructUnion but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *CustomNameNinEmbeddedStructUnion but is not nil && this == nil") + } + if !this.NidOptNative.Equal(that1.NidOptNative) { + return fmt.Errorf("NidOptNative this(%v) Not Equal that(%v)", this.NidOptNative, that1.NidOptNative) + } + if !this.FieldA.Equal(that1.FieldA) { + return fmt.Errorf("FieldA this(%v) Not Equal that(%v)", this.FieldA, that1.FieldA) + } + if this.FieldB != nil && that1.FieldB != nil { + if *this.FieldB != *that1.FieldB { + return fmt.Errorf("FieldB this(%v) Not Equal that(%v)", *this.FieldB, *that1.FieldB) + } + } else if this.FieldB != nil { + return fmt.Errorf("this.FieldB == nil && that.FieldB != nil") + } else if that1.FieldB != nil { + return fmt.Errorf("FieldB this(%v) Not Equal that(%v)", this.FieldB, that1.FieldB) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *CustomNameNinEmbeddedStructUnion) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*CustomNameNinEmbeddedStructUnion) + if !ok { + that2, ok := that.(CustomNameNinEmbeddedStructUnion) + 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.NidOptNative.Equal(that1.NidOptNative) { + return false + } + if !this.FieldA.Equal(that1.FieldA) { + return false + } + if this.FieldB != nil && that1.FieldB != nil { + if *this.FieldB != *that1.FieldB { + return false + } + } else if this.FieldB != nil { + return false + } else if that1.FieldB != nil { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *CustomNameEnum) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*CustomNameEnum) + if !ok { + that2, ok := that.(CustomNameEnum) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *CustomNameEnum") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *CustomNameEnum but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *CustomNameEnum but is not nil && this == nil") + } + if this.FieldA != nil && that1.FieldA != nil { + if *this.FieldA != *that1.FieldA { + return fmt.Errorf("FieldA this(%v) Not Equal that(%v)", *this.FieldA, *that1.FieldA) + } + } else if this.FieldA != nil { + return fmt.Errorf("this.FieldA == nil && that.FieldA != nil") + } else if that1.FieldA != nil { + return fmt.Errorf("FieldA this(%v) Not Equal that(%v)", this.FieldA, that1.FieldA) + } + if len(this.FieldB) != len(that1.FieldB) { + return fmt.Errorf("FieldB this(%v) Not Equal that(%v)", len(this.FieldB), len(that1.FieldB)) + } + for i := range this.FieldB { + if this.FieldB[i] != that1.FieldB[i] { + return fmt.Errorf("FieldB this[%v](%v) Not Equal that[%v](%v)", i, this.FieldB[i], i, that1.FieldB[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *CustomNameEnum) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*CustomNameEnum) + if !ok { + that2, ok := that.(CustomNameEnum) + 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.FieldA != nil && that1.FieldA != nil { + if *this.FieldA != *that1.FieldA { + return false + } + } else if this.FieldA != nil { + return false + } else if that1.FieldA != nil { + return false + } + if len(this.FieldB) != len(that1.FieldB) { + return false + } + for i := range this.FieldB { + if this.FieldB[i] != that1.FieldB[i] { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NoExtensionsMap) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NoExtensionsMap) + if !ok { + that2, ok := that.(NoExtensionsMap) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NoExtensionsMap") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NoExtensionsMap but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NoExtensionsMap but is not nil && this == nil") + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) + } + } else if this.Field1 != nil { + return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") + } else if that1.Field1 != nil { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) + } + if !bytes.Equal(this.XXX_extensions, that1.XXX_extensions) { + return fmt.Errorf("XXX_extensions this(%v) Not Equal that(%v)", this.XXX_extensions, that1.XXX_extensions) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NoExtensionsMap) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*NoExtensionsMap) + if !ok { + that2, ok := that.(NoExtensionsMap) + 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.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return false + } + } else if this.Field1 != nil { + return false + } else if that1.Field1 != nil { + return false + } + if !bytes.Equal(this.XXX_extensions, that1.XXX_extensions) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *Unrecognized) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*Unrecognized) + if !ok { + that2, ok := that.(Unrecognized) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *Unrecognized") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *Unrecognized but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *Unrecognized but is not nil && this == nil") + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) + } + } else if this.Field1 != nil { + return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") + } else if that1.Field1 != nil { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) + } + return nil +} +func (this *Unrecognized) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*Unrecognized) + if !ok { + that2, ok := that.(Unrecognized) + 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.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return false + } + } else if this.Field1 != nil { + return false + } else if that1.Field1 != nil { + return false + } + return true +} +func (this *UnrecognizedWithInner) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*UnrecognizedWithInner) + if !ok { + that2, ok := that.(UnrecognizedWithInner) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *UnrecognizedWithInner") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *UnrecognizedWithInner but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *UnrecognizedWithInner but is not nil && this == nil") + } + if len(this.Embedded) != len(that1.Embedded) { + return fmt.Errorf("Embedded this(%v) Not Equal that(%v)", len(this.Embedded), len(that1.Embedded)) + } + for i := range this.Embedded { + if !this.Embedded[i].Equal(that1.Embedded[i]) { + return fmt.Errorf("Embedded this[%v](%v) Not Equal that[%v](%v)", i, this.Embedded[i], i, that1.Embedded[i]) + } + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", *this.Field2, *that1.Field2) + } + } else if this.Field2 != nil { + return fmt.Errorf("this.Field2 == nil && that.Field2 != nil") + } else if that1.Field2 != nil { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *UnrecognizedWithInner) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*UnrecognizedWithInner) + if !ok { + that2, ok := that.(UnrecognizedWithInner) + 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.Embedded) != len(that1.Embedded) { + return false + } + for i := range this.Embedded { + if !this.Embedded[i].Equal(that1.Embedded[i]) { + return false + } + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + return false + } + } else if this.Field2 != nil { + return false + } else if that1.Field2 != nil { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *UnrecognizedWithInner_Inner) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*UnrecognizedWithInner_Inner) + if !ok { + that2, ok := that.(UnrecognizedWithInner_Inner) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *UnrecognizedWithInner_Inner") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *UnrecognizedWithInner_Inner but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *UnrecognizedWithInner_Inner but is not nil && this == nil") + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) + } + } else if this.Field1 != nil { + return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") + } else if that1.Field1 != nil { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) + } + return nil +} +func (this *UnrecognizedWithInner_Inner) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*UnrecognizedWithInner_Inner) + if !ok { + that2, ok := that.(UnrecognizedWithInner_Inner) + 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.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return false + } + } else if this.Field1 != nil { + return false + } else if that1.Field1 != nil { + return false + } + return true +} +func (this *UnrecognizedWithEmbed) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*UnrecognizedWithEmbed) + if !ok { + that2, ok := that.(UnrecognizedWithEmbed) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *UnrecognizedWithEmbed") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *UnrecognizedWithEmbed but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *UnrecognizedWithEmbed but is not nil && this == nil") + } + if !this.UnrecognizedWithEmbed_Embedded.Equal(&that1.UnrecognizedWithEmbed_Embedded) { + return fmt.Errorf("UnrecognizedWithEmbed_Embedded this(%v) Not Equal that(%v)", this.UnrecognizedWithEmbed_Embedded, that1.UnrecognizedWithEmbed_Embedded) + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", *this.Field2, *that1.Field2) + } + } else if this.Field2 != nil { + return fmt.Errorf("this.Field2 == nil && that.Field2 != nil") + } else if that1.Field2 != nil { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *UnrecognizedWithEmbed) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*UnrecognizedWithEmbed) + if !ok { + that2, ok := that.(UnrecognizedWithEmbed) + 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.UnrecognizedWithEmbed_Embedded.Equal(&that1.UnrecognizedWithEmbed_Embedded) { + return false + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + return false + } + } else if this.Field2 != nil { + return false + } else if that1.Field2 != nil { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *UnrecognizedWithEmbed_Embedded) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*UnrecognizedWithEmbed_Embedded) + if !ok { + that2, ok := that.(UnrecognizedWithEmbed_Embedded) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *UnrecognizedWithEmbed_Embedded") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *UnrecognizedWithEmbed_Embedded but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *UnrecognizedWithEmbed_Embedded but is not nil && this == nil") + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) + } + } else if this.Field1 != nil { + return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") + } else if that1.Field1 != nil { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) + } + return nil +} +func (this *UnrecognizedWithEmbed_Embedded) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*UnrecognizedWithEmbed_Embedded) + if !ok { + that2, ok := that.(UnrecognizedWithEmbed_Embedded) + 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.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return false + } + } else if this.Field1 != nil { + return false + } else if that1.Field1 != nil { + return false + } + return true +} +func (this *Node) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*Node) + if !ok { + that2, ok := that.(Node) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *Node") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *Node but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *Node but is not nil && this == nil") + } + if this.Label != nil && that1.Label != nil { + if *this.Label != *that1.Label { + return fmt.Errorf("Label this(%v) Not Equal that(%v)", *this.Label, *that1.Label) + } + } else if this.Label != nil { + return fmt.Errorf("this.Label == nil && that.Label != nil") + } else if that1.Label != nil { + return fmt.Errorf("Label this(%v) Not Equal that(%v)", this.Label, that1.Label) + } + if len(this.Children) != len(that1.Children) { + return fmt.Errorf("Children this(%v) Not Equal that(%v)", len(this.Children), len(that1.Children)) + } + for i := range this.Children { + if !this.Children[i].Equal(that1.Children[i]) { + return fmt.Errorf("Children this[%v](%v) Not Equal that[%v](%v)", i, this.Children[i], i, that1.Children[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *Node) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*Node) + if !ok { + that2, ok := that.(Node) + 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.Label != nil && that1.Label != nil { + if *this.Label != *that1.Label { + return false + } + } else if this.Label != nil { + return false + } else if that1.Label != nil { + return false + } + if len(this.Children) != len(that1.Children) { + return false + } + for i := range this.Children { + if !this.Children[i].Equal(that1.Children[i]) { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} + +type NidOptNativeFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetField1() float64 + GetField2() float32 + GetField3() int32 + GetField4() int64 + GetField5() uint32 + GetField6() uint64 + GetField7() int32 + GetField8() int64 + GetField9() uint32 + GetField10() int32 + GetField11() uint64 + GetField12() int64 + GetField13() bool + GetField14() string + GetField15() []byte +} + +func (this *NidOptNative) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NidOptNative) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNidOptNativeFromFace(this) +} + +func (this *NidOptNative) GetField1() float64 { + return this.Field1 +} + +func (this *NidOptNative) GetField2() float32 { + return this.Field2 +} + +func (this *NidOptNative) GetField3() int32 { + return this.Field3 +} + +func (this *NidOptNative) GetField4() int64 { + return this.Field4 +} + +func (this *NidOptNative) GetField5() uint32 { + return this.Field5 +} + +func (this *NidOptNative) GetField6() uint64 { + return this.Field6 +} + +func (this *NidOptNative) GetField7() int32 { + return this.Field7 +} + +func (this *NidOptNative) GetField8() int64 { + return this.Field8 +} + +func (this *NidOptNative) GetField9() uint32 { + return this.Field9 +} + +func (this *NidOptNative) GetField10() int32 { + return this.Field10 +} + +func (this *NidOptNative) GetField11() uint64 { + return this.Field11 +} + +func (this *NidOptNative) GetField12() int64 { + return this.Field12 +} + +func (this *NidOptNative) GetField13() bool { + return this.Field13 +} + +func (this *NidOptNative) GetField14() string { + return this.Field14 +} + +func (this *NidOptNative) GetField15() []byte { + return this.Field15 +} + +func NewNidOptNativeFromFace(that NidOptNativeFace) *NidOptNative { + this := &NidOptNative{} + this.Field1 = that.GetField1() + this.Field2 = that.GetField2() + this.Field3 = that.GetField3() + this.Field4 = that.GetField4() + this.Field5 = that.GetField5() + this.Field6 = that.GetField6() + this.Field7 = that.GetField7() + this.Field8 = that.GetField8() + this.Field9 = that.GetField9() + this.Field10 = that.GetField10() + this.Field11 = that.GetField11() + this.Field12 = that.GetField12() + this.Field13 = that.GetField13() + this.Field14 = that.GetField14() + this.Field15 = that.GetField15() + return this +} + +type NinOptNativeFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetField1() *float64 + GetField2() *float32 + GetField3() *int32 + GetField4() *int64 + GetField5() *uint32 + GetField6() *uint64 + GetField7() *int32 + GetField8() *int64 + GetField9() *uint32 + GetField10() *int32 + GetField11() *uint64 + GetField12() *int64 + GetField13() *bool + GetField14() *string + GetField15() []byte +} + +func (this *NinOptNative) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NinOptNative) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNinOptNativeFromFace(this) +} + +func (this *NinOptNative) GetField1() *float64 { + return this.Field1 +} + +func (this *NinOptNative) GetField2() *float32 { + return this.Field2 +} + +func (this *NinOptNative) GetField3() *int32 { + return this.Field3 +} + +func (this *NinOptNative) GetField4() *int64 { + return this.Field4 +} + +func (this *NinOptNative) GetField5() *uint32 { + return this.Field5 +} + +func (this *NinOptNative) GetField6() *uint64 { + return this.Field6 +} + +func (this *NinOptNative) GetField7() *int32 { + return this.Field7 +} + +func (this *NinOptNative) GetField8() *int64 { + return this.Field8 +} + +func (this *NinOptNative) GetField9() *uint32 { + return this.Field9 +} + +func (this *NinOptNative) GetField10() *int32 { + return this.Field10 +} + +func (this *NinOptNative) GetField11() *uint64 { + return this.Field11 +} + +func (this *NinOptNative) GetField12() *int64 { + return this.Field12 +} + +func (this *NinOptNative) GetField13() *bool { + return this.Field13 +} + +func (this *NinOptNative) GetField14() *string { + return this.Field14 +} + +func (this *NinOptNative) GetField15() []byte { + return this.Field15 +} + +func NewNinOptNativeFromFace(that NinOptNativeFace) *NinOptNative { + this := &NinOptNative{} + this.Field1 = that.GetField1() + this.Field2 = that.GetField2() + this.Field3 = that.GetField3() + this.Field4 = that.GetField4() + this.Field5 = that.GetField5() + this.Field6 = that.GetField6() + this.Field7 = that.GetField7() + this.Field8 = that.GetField8() + this.Field9 = that.GetField9() + this.Field10 = that.GetField10() + this.Field11 = that.GetField11() + this.Field12 = that.GetField12() + this.Field13 = that.GetField13() + this.Field14 = that.GetField14() + this.Field15 = that.GetField15() + return this +} + +type NidRepNativeFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetField1() []float64 + GetField2() []float32 + GetField3() []int32 + GetField4() []int64 + GetField5() []uint32 + GetField6() []uint64 + GetField7() []int32 + GetField8() []int64 + GetField9() []uint32 + GetField10() []int32 + GetField11() []uint64 + GetField12() []int64 + GetField13() []bool + GetField14() []string + GetField15() [][]byte +} + +func (this *NidRepNative) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NidRepNative) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNidRepNativeFromFace(this) +} + +func (this *NidRepNative) GetField1() []float64 { + return this.Field1 +} + +func (this *NidRepNative) GetField2() []float32 { + return this.Field2 +} + +func (this *NidRepNative) GetField3() []int32 { + return this.Field3 +} + +func (this *NidRepNative) GetField4() []int64 { + return this.Field4 +} + +func (this *NidRepNative) GetField5() []uint32 { + return this.Field5 +} + +func (this *NidRepNative) GetField6() []uint64 { + return this.Field6 +} + +func (this *NidRepNative) GetField7() []int32 { + return this.Field7 +} + +func (this *NidRepNative) GetField8() []int64 { + return this.Field8 +} + +func (this *NidRepNative) GetField9() []uint32 { + return this.Field9 +} + +func (this *NidRepNative) GetField10() []int32 { + return this.Field10 +} + +func (this *NidRepNative) GetField11() []uint64 { + return this.Field11 +} + +func (this *NidRepNative) GetField12() []int64 { + return this.Field12 +} + +func (this *NidRepNative) GetField13() []bool { + return this.Field13 +} + +func (this *NidRepNative) GetField14() []string { + return this.Field14 +} + +func (this *NidRepNative) GetField15() [][]byte { + return this.Field15 +} + +func NewNidRepNativeFromFace(that NidRepNativeFace) *NidRepNative { + this := &NidRepNative{} + this.Field1 = that.GetField1() + this.Field2 = that.GetField2() + this.Field3 = that.GetField3() + this.Field4 = that.GetField4() + this.Field5 = that.GetField5() + this.Field6 = that.GetField6() + this.Field7 = that.GetField7() + this.Field8 = that.GetField8() + this.Field9 = that.GetField9() + this.Field10 = that.GetField10() + this.Field11 = that.GetField11() + this.Field12 = that.GetField12() + this.Field13 = that.GetField13() + this.Field14 = that.GetField14() + this.Field15 = that.GetField15() + return this +} + +type NinRepNativeFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetField1() []float64 + GetField2() []float32 + GetField3() []int32 + GetField4() []int64 + GetField5() []uint32 + GetField6() []uint64 + GetField7() []int32 + GetField8() []int64 + GetField9() []uint32 + GetField10() []int32 + GetField11() []uint64 + GetField12() []int64 + GetField13() []bool + GetField14() []string + GetField15() [][]byte +} + +func (this *NinRepNative) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NinRepNative) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNinRepNativeFromFace(this) +} + +func (this *NinRepNative) GetField1() []float64 { + return this.Field1 +} + +func (this *NinRepNative) GetField2() []float32 { + return this.Field2 +} + +func (this *NinRepNative) GetField3() []int32 { + return this.Field3 +} + +func (this *NinRepNative) GetField4() []int64 { + return this.Field4 +} + +func (this *NinRepNative) GetField5() []uint32 { + return this.Field5 +} + +func (this *NinRepNative) GetField6() []uint64 { + return this.Field6 +} + +func (this *NinRepNative) GetField7() []int32 { + return this.Field7 +} + +func (this *NinRepNative) GetField8() []int64 { + return this.Field8 +} + +func (this *NinRepNative) GetField9() []uint32 { + return this.Field9 +} + +func (this *NinRepNative) GetField10() []int32 { + return this.Field10 +} + +func (this *NinRepNative) GetField11() []uint64 { + return this.Field11 +} + +func (this *NinRepNative) GetField12() []int64 { + return this.Field12 +} + +func (this *NinRepNative) GetField13() []bool { + return this.Field13 +} + +func (this *NinRepNative) GetField14() []string { + return this.Field14 +} + +func (this *NinRepNative) GetField15() [][]byte { + return this.Field15 +} + +func NewNinRepNativeFromFace(that NinRepNativeFace) *NinRepNative { + this := &NinRepNative{} + this.Field1 = that.GetField1() + this.Field2 = that.GetField2() + this.Field3 = that.GetField3() + this.Field4 = that.GetField4() + this.Field5 = that.GetField5() + this.Field6 = that.GetField6() + this.Field7 = that.GetField7() + this.Field8 = that.GetField8() + this.Field9 = that.GetField9() + this.Field10 = that.GetField10() + this.Field11 = that.GetField11() + this.Field12 = that.GetField12() + this.Field13 = that.GetField13() + this.Field14 = that.GetField14() + this.Field15 = that.GetField15() + return this +} + +type NidRepPackedNativeFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetField1() []float64 + GetField2() []float32 + GetField3() []int32 + GetField4() []int64 + GetField5() []uint32 + GetField6() []uint64 + GetField7() []int32 + GetField8() []int64 + GetField9() []uint32 + GetField10() []int32 + GetField11() []uint64 + GetField12() []int64 + GetField13() []bool +} + +func (this *NidRepPackedNative) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NidRepPackedNative) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNidRepPackedNativeFromFace(this) +} + +func (this *NidRepPackedNative) GetField1() []float64 { + return this.Field1 +} + +func (this *NidRepPackedNative) GetField2() []float32 { + return this.Field2 +} + +func (this *NidRepPackedNative) GetField3() []int32 { + return this.Field3 +} + +func (this *NidRepPackedNative) GetField4() []int64 { + return this.Field4 +} + +func (this *NidRepPackedNative) GetField5() []uint32 { + return this.Field5 +} + +func (this *NidRepPackedNative) GetField6() []uint64 { + return this.Field6 +} + +func (this *NidRepPackedNative) GetField7() []int32 { + return this.Field7 +} + +func (this *NidRepPackedNative) GetField8() []int64 { + return this.Field8 +} + +func (this *NidRepPackedNative) GetField9() []uint32 { + return this.Field9 +} + +func (this *NidRepPackedNative) GetField10() []int32 { + return this.Field10 +} + +func (this *NidRepPackedNative) GetField11() []uint64 { + return this.Field11 +} + +func (this *NidRepPackedNative) GetField12() []int64 { + return this.Field12 +} + +func (this *NidRepPackedNative) GetField13() []bool { + return this.Field13 +} + +func NewNidRepPackedNativeFromFace(that NidRepPackedNativeFace) *NidRepPackedNative { + this := &NidRepPackedNative{} + this.Field1 = that.GetField1() + this.Field2 = that.GetField2() + this.Field3 = that.GetField3() + this.Field4 = that.GetField4() + this.Field5 = that.GetField5() + this.Field6 = that.GetField6() + this.Field7 = that.GetField7() + this.Field8 = that.GetField8() + this.Field9 = that.GetField9() + this.Field10 = that.GetField10() + this.Field11 = that.GetField11() + this.Field12 = that.GetField12() + this.Field13 = that.GetField13() + return this +} + +type NinRepPackedNativeFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetField1() []float64 + GetField2() []float32 + GetField3() []int32 + GetField4() []int64 + GetField5() []uint32 + GetField6() []uint64 + GetField7() []int32 + GetField8() []int64 + GetField9() []uint32 + GetField10() []int32 + GetField11() []uint64 + GetField12() []int64 + GetField13() []bool +} + +func (this *NinRepPackedNative) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NinRepPackedNative) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNinRepPackedNativeFromFace(this) +} + +func (this *NinRepPackedNative) GetField1() []float64 { + return this.Field1 +} + +func (this *NinRepPackedNative) GetField2() []float32 { + return this.Field2 +} + +func (this *NinRepPackedNative) GetField3() []int32 { + return this.Field3 +} + +func (this *NinRepPackedNative) GetField4() []int64 { + return this.Field4 +} + +func (this *NinRepPackedNative) GetField5() []uint32 { + return this.Field5 +} + +func (this *NinRepPackedNative) GetField6() []uint64 { + return this.Field6 +} + +func (this *NinRepPackedNative) GetField7() []int32 { + return this.Field7 +} + +func (this *NinRepPackedNative) GetField8() []int64 { + return this.Field8 +} + +func (this *NinRepPackedNative) GetField9() []uint32 { + return this.Field9 +} + +func (this *NinRepPackedNative) GetField10() []int32 { + return this.Field10 +} + +func (this *NinRepPackedNative) GetField11() []uint64 { + return this.Field11 +} + +func (this *NinRepPackedNative) GetField12() []int64 { + return this.Field12 +} + +func (this *NinRepPackedNative) GetField13() []bool { + return this.Field13 +} + +func NewNinRepPackedNativeFromFace(that NinRepPackedNativeFace) *NinRepPackedNative { + this := &NinRepPackedNative{} + this.Field1 = that.GetField1() + this.Field2 = that.GetField2() + this.Field3 = that.GetField3() + this.Field4 = that.GetField4() + this.Field5 = that.GetField5() + this.Field6 = that.GetField6() + this.Field7 = that.GetField7() + this.Field8 = that.GetField8() + this.Field9 = that.GetField9() + this.Field10 = that.GetField10() + this.Field11 = that.GetField11() + this.Field12 = that.GetField12() + this.Field13 = that.GetField13() + return this +} + +type NidOptStructFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetField1() float64 + GetField2() float32 + GetField3() NidOptNative + GetField4() NinOptNative + GetField6() uint64 + GetField7() int32 + GetField8() NidOptNative + GetField13() bool + GetField14() string + GetField15() []byte +} + +func (this *NidOptStruct) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NidOptStruct) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNidOptStructFromFace(this) +} + +func (this *NidOptStruct) GetField1() float64 { + return this.Field1 +} + +func (this *NidOptStruct) GetField2() float32 { + return this.Field2 +} + +func (this *NidOptStruct) GetField3() NidOptNative { + return this.Field3 +} + +func (this *NidOptStruct) GetField4() NinOptNative { + return this.Field4 +} + +func (this *NidOptStruct) GetField6() uint64 { + return this.Field6 +} + +func (this *NidOptStruct) GetField7() int32 { + return this.Field7 +} + +func (this *NidOptStruct) GetField8() NidOptNative { + return this.Field8 +} + +func (this *NidOptStruct) GetField13() bool { + return this.Field13 +} + +func (this *NidOptStruct) GetField14() string { + return this.Field14 +} + +func (this *NidOptStruct) GetField15() []byte { + return this.Field15 +} + +func NewNidOptStructFromFace(that NidOptStructFace) *NidOptStruct { + this := &NidOptStruct{} + this.Field1 = that.GetField1() + this.Field2 = that.GetField2() + this.Field3 = that.GetField3() + this.Field4 = that.GetField4() + this.Field6 = that.GetField6() + this.Field7 = that.GetField7() + this.Field8 = that.GetField8() + this.Field13 = that.GetField13() + this.Field14 = that.GetField14() + this.Field15 = that.GetField15() + return this +} + +type NinOptStructFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetField1() *float64 + GetField2() *float32 + GetField3() *NidOptNative + GetField4() *NinOptNative + GetField6() *uint64 + GetField7() *int32 + GetField8() *NidOptNative + GetField13() *bool + GetField14() *string + GetField15() []byte +} + +func (this *NinOptStruct) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NinOptStruct) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNinOptStructFromFace(this) +} + +func (this *NinOptStruct) GetField1() *float64 { + return this.Field1 +} + +func (this *NinOptStruct) GetField2() *float32 { + return this.Field2 +} + +func (this *NinOptStruct) GetField3() *NidOptNative { + return this.Field3 +} + +func (this *NinOptStruct) GetField4() *NinOptNative { + return this.Field4 +} + +func (this *NinOptStruct) GetField6() *uint64 { + return this.Field6 +} + +func (this *NinOptStruct) GetField7() *int32 { + return this.Field7 +} + +func (this *NinOptStruct) GetField8() *NidOptNative { + return this.Field8 +} + +func (this *NinOptStruct) GetField13() *bool { + return this.Field13 +} + +func (this *NinOptStruct) GetField14() *string { + return this.Field14 +} + +func (this *NinOptStruct) GetField15() []byte { + return this.Field15 +} + +func NewNinOptStructFromFace(that NinOptStructFace) *NinOptStruct { + this := &NinOptStruct{} + this.Field1 = that.GetField1() + this.Field2 = that.GetField2() + this.Field3 = that.GetField3() + this.Field4 = that.GetField4() + this.Field6 = that.GetField6() + this.Field7 = that.GetField7() + this.Field8 = that.GetField8() + this.Field13 = that.GetField13() + this.Field14 = that.GetField14() + this.Field15 = that.GetField15() + return this +} + +type NidRepStructFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetField1() []float64 + GetField2() []float32 + GetField3() []NidOptNative + GetField4() []NinOptNative + GetField6() []uint64 + GetField7() []int32 + GetField8() []NidOptNative + GetField13() []bool + GetField14() []string + GetField15() [][]byte +} + +func (this *NidRepStruct) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NidRepStruct) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNidRepStructFromFace(this) +} + +func (this *NidRepStruct) GetField1() []float64 { + return this.Field1 +} + +func (this *NidRepStruct) GetField2() []float32 { + return this.Field2 +} + +func (this *NidRepStruct) GetField3() []NidOptNative { + return this.Field3 +} + +func (this *NidRepStruct) GetField4() []NinOptNative { + return this.Field4 +} + +func (this *NidRepStruct) GetField6() []uint64 { + return this.Field6 +} + +func (this *NidRepStruct) GetField7() []int32 { + return this.Field7 +} + +func (this *NidRepStruct) GetField8() []NidOptNative { + return this.Field8 +} + +func (this *NidRepStruct) GetField13() []bool { + return this.Field13 +} + +func (this *NidRepStruct) GetField14() []string { + return this.Field14 +} + +func (this *NidRepStruct) GetField15() [][]byte { + return this.Field15 +} + +func NewNidRepStructFromFace(that NidRepStructFace) *NidRepStruct { + this := &NidRepStruct{} + this.Field1 = that.GetField1() + this.Field2 = that.GetField2() + this.Field3 = that.GetField3() + this.Field4 = that.GetField4() + this.Field6 = that.GetField6() + this.Field7 = that.GetField7() + this.Field8 = that.GetField8() + this.Field13 = that.GetField13() + this.Field14 = that.GetField14() + this.Field15 = that.GetField15() + return this +} + +type NinRepStructFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetField1() []float64 + GetField2() []float32 + GetField3() []*NidOptNative + GetField4() []*NinOptNative + GetField6() []uint64 + GetField7() []int32 + GetField8() []*NidOptNative + GetField13() []bool + GetField14() []string + GetField15() [][]byte +} + +func (this *NinRepStruct) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NinRepStruct) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNinRepStructFromFace(this) +} + +func (this *NinRepStruct) GetField1() []float64 { + return this.Field1 +} + +func (this *NinRepStruct) GetField2() []float32 { + return this.Field2 +} + +func (this *NinRepStruct) GetField3() []*NidOptNative { + return this.Field3 +} + +func (this *NinRepStruct) GetField4() []*NinOptNative { + return this.Field4 +} + +func (this *NinRepStruct) GetField6() []uint64 { + return this.Field6 +} + +func (this *NinRepStruct) GetField7() []int32 { + return this.Field7 +} + +func (this *NinRepStruct) GetField8() []*NidOptNative { + return this.Field8 +} + +func (this *NinRepStruct) GetField13() []bool { + return this.Field13 +} + +func (this *NinRepStruct) GetField14() []string { + return this.Field14 +} + +func (this *NinRepStruct) GetField15() [][]byte { + return this.Field15 +} + +func NewNinRepStructFromFace(that NinRepStructFace) *NinRepStruct { + this := &NinRepStruct{} + this.Field1 = that.GetField1() + this.Field2 = that.GetField2() + this.Field3 = that.GetField3() + this.Field4 = that.GetField4() + this.Field6 = that.GetField6() + this.Field7 = that.GetField7() + this.Field8 = that.GetField8() + this.Field13 = that.GetField13() + this.Field14 = that.GetField14() + this.Field15 = that.GetField15() + return this +} + +type NidEmbeddedStructFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetNidOptNative() *NidOptNative + GetField200() NidOptNative + GetField210() bool +} + +func (this *NidEmbeddedStruct) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NidEmbeddedStruct) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNidEmbeddedStructFromFace(this) +} + +func (this *NidEmbeddedStruct) GetNidOptNative() *NidOptNative { + return this.NidOptNative +} + +func (this *NidEmbeddedStruct) GetField200() NidOptNative { + return this.Field200 +} + +func (this *NidEmbeddedStruct) GetField210() bool { + return this.Field210 +} + +func NewNidEmbeddedStructFromFace(that NidEmbeddedStructFace) *NidEmbeddedStruct { + this := &NidEmbeddedStruct{} + this.NidOptNative = that.GetNidOptNative() + this.Field200 = that.GetField200() + this.Field210 = that.GetField210() + return this +} + +type NinEmbeddedStructFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetNidOptNative() *NidOptNative + GetField200() *NidOptNative + GetField210() *bool +} + +func (this *NinEmbeddedStruct) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NinEmbeddedStruct) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNinEmbeddedStructFromFace(this) +} + +func (this *NinEmbeddedStruct) GetNidOptNative() *NidOptNative { + return this.NidOptNative +} + +func (this *NinEmbeddedStruct) GetField200() *NidOptNative { + return this.Field200 +} + +func (this *NinEmbeddedStruct) GetField210() *bool { + return this.Field210 +} + +func NewNinEmbeddedStructFromFace(that NinEmbeddedStructFace) *NinEmbeddedStruct { + this := &NinEmbeddedStruct{} + this.NidOptNative = that.GetNidOptNative() + this.Field200 = that.GetField200() + this.Field210 = that.GetField210() + return this +} + +type NidNestedStructFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetField1() NidOptStruct + GetField2() []NidRepStruct +} + +func (this *NidNestedStruct) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NidNestedStruct) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNidNestedStructFromFace(this) +} + +func (this *NidNestedStruct) GetField1() NidOptStruct { + return this.Field1 +} + +func (this *NidNestedStruct) GetField2() []NidRepStruct { + return this.Field2 +} + +func NewNidNestedStructFromFace(that NidNestedStructFace) *NidNestedStruct { + this := &NidNestedStruct{} + this.Field1 = that.GetField1() + this.Field2 = that.GetField2() + return this +} + +type NinNestedStructFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetField1() *NinOptStruct + GetField2() []*NinRepStruct +} + +func (this *NinNestedStruct) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NinNestedStruct) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNinNestedStructFromFace(this) +} + +func (this *NinNestedStruct) GetField1() *NinOptStruct { + return this.Field1 +} + +func (this *NinNestedStruct) GetField2() []*NinRepStruct { + return this.Field2 +} + +func NewNinNestedStructFromFace(that NinNestedStructFace) *NinNestedStruct { + this := &NinNestedStruct{} + this.Field1 = that.GetField1() + this.Field2 = that.GetField2() + return this +} + +type NidOptCustomFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetId() Uuid + GetValue() github_com_gogo_protobuf_test_custom.Uint128 +} + +func (this *NidOptCustom) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NidOptCustom) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNidOptCustomFromFace(this) +} + +func (this *NidOptCustom) GetId() Uuid { + return this.Id +} + +func (this *NidOptCustom) GetValue() github_com_gogo_protobuf_test_custom.Uint128 { + return this.Value +} + +func NewNidOptCustomFromFace(that NidOptCustomFace) *NidOptCustom { + this := &NidOptCustom{} + this.Id = that.GetId() + this.Value = that.GetValue() + return this +} + +type CustomDashFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetValue() *github_com_gogo_protobuf_test_custom_dash_type.Bytes +} + +func (this *CustomDash) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *CustomDash) TestProto() github_com_gogo_protobuf_proto.Message { + return NewCustomDashFromFace(this) +} + +func (this *CustomDash) GetValue() *github_com_gogo_protobuf_test_custom_dash_type.Bytes { + return this.Value +} + +func NewCustomDashFromFace(that CustomDashFace) *CustomDash { + this := &CustomDash{} + this.Value = that.GetValue() + return this +} + +type NinOptCustomFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetId() *Uuid + GetValue() *github_com_gogo_protobuf_test_custom.Uint128 +} + +func (this *NinOptCustom) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NinOptCustom) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNinOptCustomFromFace(this) +} + +func (this *NinOptCustom) GetId() *Uuid { + return this.Id +} + +func (this *NinOptCustom) GetValue() *github_com_gogo_protobuf_test_custom.Uint128 { + return this.Value +} + +func NewNinOptCustomFromFace(that NinOptCustomFace) *NinOptCustom { + this := &NinOptCustom{} + this.Id = that.GetId() + this.Value = that.GetValue() + return this +} + +type NidRepCustomFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetId() []Uuid + GetValue() []github_com_gogo_protobuf_test_custom.Uint128 +} + +func (this *NidRepCustom) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NidRepCustom) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNidRepCustomFromFace(this) +} + +func (this *NidRepCustom) GetId() []Uuid { + return this.Id +} + +func (this *NidRepCustom) GetValue() []github_com_gogo_protobuf_test_custom.Uint128 { + return this.Value +} + +func NewNidRepCustomFromFace(that NidRepCustomFace) *NidRepCustom { + this := &NidRepCustom{} + this.Id = that.GetId() + this.Value = that.GetValue() + return this +} + +type NinRepCustomFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetId() []Uuid + GetValue() []github_com_gogo_protobuf_test_custom.Uint128 +} + +func (this *NinRepCustom) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NinRepCustom) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNinRepCustomFromFace(this) +} + +func (this *NinRepCustom) GetId() []Uuid { + return this.Id +} + +func (this *NinRepCustom) GetValue() []github_com_gogo_protobuf_test_custom.Uint128 { + return this.Value +} + +func NewNinRepCustomFromFace(that NinRepCustomFace) *NinRepCustom { + this := &NinRepCustom{} + this.Id = that.GetId() + this.Value = that.GetValue() + return this +} + +type NinOptNativeUnionFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetField1() *float64 + GetField2() *float32 + GetField3() *int32 + GetField4() *int64 + GetField5() *uint32 + GetField6() *uint64 + GetField13() *bool + GetField14() *string + GetField15() []byte +} + +func (this *NinOptNativeUnion) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NinOptNativeUnion) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNinOptNativeUnionFromFace(this) +} + +func (this *NinOptNativeUnion) GetField1() *float64 { + return this.Field1 +} + +func (this *NinOptNativeUnion) GetField2() *float32 { + return this.Field2 +} + +func (this *NinOptNativeUnion) GetField3() *int32 { + return this.Field3 +} + +func (this *NinOptNativeUnion) GetField4() *int64 { + return this.Field4 +} + +func (this *NinOptNativeUnion) GetField5() *uint32 { + return this.Field5 +} + +func (this *NinOptNativeUnion) GetField6() *uint64 { + return this.Field6 +} + +func (this *NinOptNativeUnion) GetField13() *bool { + return this.Field13 +} + +func (this *NinOptNativeUnion) GetField14() *string { + return this.Field14 +} + +func (this *NinOptNativeUnion) GetField15() []byte { + return this.Field15 +} + +func NewNinOptNativeUnionFromFace(that NinOptNativeUnionFace) *NinOptNativeUnion { + this := &NinOptNativeUnion{} + this.Field1 = that.GetField1() + this.Field2 = that.GetField2() + this.Field3 = that.GetField3() + this.Field4 = that.GetField4() + this.Field5 = that.GetField5() + this.Field6 = that.GetField6() + this.Field13 = that.GetField13() + this.Field14 = that.GetField14() + this.Field15 = that.GetField15() + return this +} + +type NinOptStructUnionFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetField1() *float64 + GetField2() *float32 + GetField3() *NidOptNative + GetField4() *NinOptNative + GetField6() *uint64 + GetField7() *int32 + GetField13() *bool + GetField14() *string + GetField15() []byte +} + +func (this *NinOptStructUnion) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NinOptStructUnion) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNinOptStructUnionFromFace(this) +} + +func (this *NinOptStructUnion) GetField1() *float64 { + return this.Field1 +} + +func (this *NinOptStructUnion) GetField2() *float32 { + return this.Field2 +} + +func (this *NinOptStructUnion) GetField3() *NidOptNative { + return this.Field3 +} + +func (this *NinOptStructUnion) GetField4() *NinOptNative { + return this.Field4 +} + +func (this *NinOptStructUnion) GetField6() *uint64 { + return this.Field6 +} + +func (this *NinOptStructUnion) GetField7() *int32 { + return this.Field7 +} + +func (this *NinOptStructUnion) GetField13() *bool { + return this.Field13 +} + +func (this *NinOptStructUnion) GetField14() *string { + return this.Field14 +} + +func (this *NinOptStructUnion) GetField15() []byte { + return this.Field15 +} + +func NewNinOptStructUnionFromFace(that NinOptStructUnionFace) *NinOptStructUnion { + this := &NinOptStructUnion{} + this.Field1 = that.GetField1() + this.Field2 = that.GetField2() + this.Field3 = that.GetField3() + this.Field4 = that.GetField4() + this.Field6 = that.GetField6() + this.Field7 = that.GetField7() + this.Field13 = that.GetField13() + this.Field14 = that.GetField14() + this.Field15 = that.GetField15() + return this +} + +type NinEmbeddedStructUnionFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetNidOptNative() *NidOptNative + GetField200() *NinOptNative + GetField210() *bool +} + +func (this *NinEmbeddedStructUnion) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NinEmbeddedStructUnion) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNinEmbeddedStructUnionFromFace(this) +} + +func (this *NinEmbeddedStructUnion) GetNidOptNative() *NidOptNative { + return this.NidOptNative +} + +func (this *NinEmbeddedStructUnion) GetField200() *NinOptNative { + return this.Field200 +} + +func (this *NinEmbeddedStructUnion) GetField210() *bool { + return this.Field210 +} + +func NewNinEmbeddedStructUnionFromFace(that NinEmbeddedStructUnionFace) *NinEmbeddedStructUnion { + this := &NinEmbeddedStructUnion{} + this.NidOptNative = that.GetNidOptNative() + this.Field200 = that.GetField200() + this.Field210 = that.GetField210() + return this +} + +type NinNestedStructUnionFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetField1() *NinOptNativeUnion + GetField2() *NinOptStructUnion + GetField3() *NinEmbeddedStructUnion +} + +func (this *NinNestedStructUnion) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NinNestedStructUnion) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNinNestedStructUnionFromFace(this) +} + +func (this *NinNestedStructUnion) GetField1() *NinOptNativeUnion { + return this.Field1 +} + +func (this *NinNestedStructUnion) GetField2() *NinOptStructUnion { + return this.Field2 +} + +func (this *NinNestedStructUnion) GetField3() *NinEmbeddedStructUnion { + return this.Field3 +} + +func NewNinNestedStructUnionFromFace(that NinNestedStructUnionFace) *NinNestedStructUnion { + this := &NinNestedStructUnion{} + this.Field1 = that.GetField1() + this.Field2 = that.GetField2() + this.Field3 = that.GetField3() + return this +} + +type TreeFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetOr() *OrBranch + GetAnd() *AndBranch + GetLeaf() *Leaf +} + +func (this *Tree) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *Tree) TestProto() github_com_gogo_protobuf_proto.Message { + return NewTreeFromFace(this) +} + +func (this *Tree) GetOr() *OrBranch { + return this.Or +} + +func (this *Tree) GetAnd() *AndBranch { + return this.And +} + +func (this *Tree) GetLeaf() *Leaf { + return this.Leaf +} + +func NewTreeFromFace(that TreeFace) *Tree { + this := &Tree{} + this.Or = that.GetOr() + this.And = that.GetAnd() + this.Leaf = that.GetLeaf() + return this +} + +type OrBranchFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetLeft() Tree + GetRight() Tree +} + +func (this *OrBranch) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *OrBranch) TestProto() github_com_gogo_protobuf_proto.Message { + return NewOrBranchFromFace(this) +} + +func (this *OrBranch) GetLeft() Tree { + return this.Left +} + +func (this *OrBranch) GetRight() Tree { + return this.Right +} + +func NewOrBranchFromFace(that OrBranchFace) *OrBranch { + this := &OrBranch{} + this.Left = that.GetLeft() + this.Right = that.GetRight() + return this +} + +type AndBranchFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetLeft() Tree + GetRight() Tree +} + +func (this *AndBranch) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *AndBranch) TestProto() github_com_gogo_protobuf_proto.Message { + return NewAndBranchFromFace(this) +} + +func (this *AndBranch) GetLeft() Tree { + return this.Left +} + +func (this *AndBranch) GetRight() Tree { + return this.Right +} + +func NewAndBranchFromFace(that AndBranchFace) *AndBranch { + this := &AndBranch{} + this.Left = that.GetLeft() + this.Right = that.GetRight() + return this +} + +type LeafFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetValue() int64 + GetStrValue() string +} + +func (this *Leaf) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *Leaf) TestProto() github_com_gogo_protobuf_proto.Message { + return NewLeafFromFace(this) +} + +func (this *Leaf) GetValue() int64 { + return this.Value +} + +func (this *Leaf) GetStrValue() string { + return this.StrValue +} + +func NewLeafFromFace(that LeafFace) *Leaf { + this := &Leaf{} + this.Value = that.GetValue() + this.StrValue = that.GetStrValue() + return this +} + +type DeepTreeFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetDown() *ADeepBranch + GetAnd() *AndDeepBranch + GetLeaf() *DeepLeaf +} + +func (this *DeepTree) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *DeepTree) TestProto() github_com_gogo_protobuf_proto.Message { + return NewDeepTreeFromFace(this) +} + +func (this *DeepTree) GetDown() *ADeepBranch { + return this.Down +} + +func (this *DeepTree) GetAnd() *AndDeepBranch { + return this.And +} + +func (this *DeepTree) GetLeaf() *DeepLeaf { + return this.Leaf +} + +func NewDeepTreeFromFace(that DeepTreeFace) *DeepTree { + this := &DeepTree{} + this.Down = that.GetDown() + this.And = that.GetAnd() + this.Leaf = that.GetLeaf() + return this +} + +type ADeepBranchFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetDown() DeepTree +} + +func (this *ADeepBranch) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *ADeepBranch) TestProto() github_com_gogo_protobuf_proto.Message { + return NewADeepBranchFromFace(this) +} + +func (this *ADeepBranch) GetDown() DeepTree { + return this.Down +} + +func NewADeepBranchFromFace(that ADeepBranchFace) *ADeepBranch { + this := &ADeepBranch{} + this.Down = that.GetDown() + return this +} + +type AndDeepBranchFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetLeft() DeepTree + GetRight() DeepTree +} + +func (this *AndDeepBranch) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *AndDeepBranch) TestProto() github_com_gogo_protobuf_proto.Message { + return NewAndDeepBranchFromFace(this) +} + +func (this *AndDeepBranch) GetLeft() DeepTree { + return this.Left +} + +func (this *AndDeepBranch) GetRight() DeepTree { + return this.Right +} + +func NewAndDeepBranchFromFace(that AndDeepBranchFace) *AndDeepBranch { + this := &AndDeepBranch{} + this.Left = that.GetLeft() + this.Right = that.GetRight() + return this +} + +type DeepLeafFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetTree() Tree +} + +func (this *DeepLeaf) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *DeepLeaf) TestProto() github_com_gogo_protobuf_proto.Message { + return NewDeepLeafFromFace(this) +} + +func (this *DeepLeaf) GetTree() Tree { + return this.Tree +} + +func NewDeepLeafFromFace(that DeepLeafFace) *DeepLeaf { + this := &DeepLeaf{} + this.Tree = that.GetTree() + return this +} + +type NilFace interface { + Proto() github_com_gogo_protobuf_proto.Message +} + +func (this *Nil) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *Nil) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNilFromFace(this) +} + +func NewNilFromFace(that NilFace) *Nil { + this := &Nil{} + return this +} + +type NidOptEnumFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetField1() TheTestEnum +} + +func (this *NidOptEnum) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NidOptEnum) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNidOptEnumFromFace(this) +} + +func (this *NidOptEnum) GetField1() TheTestEnum { + return this.Field1 +} + +func NewNidOptEnumFromFace(that NidOptEnumFace) *NidOptEnum { + this := &NidOptEnum{} + this.Field1 = that.GetField1() + return this +} + +type NinOptEnumFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetField1() *TheTestEnum + GetField2() *YetAnotherTestEnum + GetField3() *YetYetAnotherTestEnum +} + +func (this *NinOptEnum) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NinOptEnum) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNinOptEnumFromFace(this) +} + +func (this *NinOptEnum) GetField1() *TheTestEnum { + return this.Field1 +} + +func (this *NinOptEnum) GetField2() *YetAnotherTestEnum { + return this.Field2 +} + +func (this *NinOptEnum) GetField3() *YetYetAnotherTestEnum { + return this.Field3 +} + +func NewNinOptEnumFromFace(that NinOptEnumFace) *NinOptEnum { + this := &NinOptEnum{} + this.Field1 = that.GetField1() + this.Field2 = that.GetField2() + this.Field3 = that.GetField3() + return this +} + +type NidRepEnumFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetField1() []TheTestEnum + GetField2() []YetAnotherTestEnum + GetField3() []YetYetAnotherTestEnum +} + +func (this *NidRepEnum) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NidRepEnum) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNidRepEnumFromFace(this) +} + +func (this *NidRepEnum) GetField1() []TheTestEnum { + return this.Field1 +} + +func (this *NidRepEnum) GetField2() []YetAnotherTestEnum { + return this.Field2 +} + +func (this *NidRepEnum) GetField3() []YetYetAnotherTestEnum { + return this.Field3 +} + +func NewNidRepEnumFromFace(that NidRepEnumFace) *NidRepEnum { + this := &NidRepEnum{} + this.Field1 = that.GetField1() + this.Field2 = that.GetField2() + this.Field3 = that.GetField3() + return this +} + +type NinRepEnumFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetField1() []TheTestEnum + GetField2() []YetAnotherTestEnum + GetField3() []YetYetAnotherTestEnum +} + +func (this *NinRepEnum) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NinRepEnum) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNinRepEnumFromFace(this) +} + +func (this *NinRepEnum) GetField1() []TheTestEnum { + return this.Field1 +} + +func (this *NinRepEnum) GetField2() []YetAnotherTestEnum { + return this.Field2 +} + +func (this *NinRepEnum) GetField3() []YetYetAnotherTestEnum { + return this.Field3 +} + +func NewNinRepEnumFromFace(that NinRepEnumFace) *NinRepEnum { + this := &NinRepEnum{} + this.Field1 = that.GetField1() + this.Field2 = that.GetField2() + this.Field3 = that.GetField3() + return this +} + +type AnotherNinOptEnumFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetField1() *AnotherTestEnum + GetField2() *YetAnotherTestEnum + GetField3() *YetYetAnotherTestEnum +} + +func (this *AnotherNinOptEnum) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *AnotherNinOptEnum) TestProto() github_com_gogo_protobuf_proto.Message { + return NewAnotherNinOptEnumFromFace(this) +} + +func (this *AnotherNinOptEnum) GetField1() *AnotherTestEnum { + return this.Field1 +} + +func (this *AnotherNinOptEnum) GetField2() *YetAnotherTestEnum { + return this.Field2 +} + +func (this *AnotherNinOptEnum) GetField3() *YetYetAnotherTestEnum { + return this.Field3 +} + +func NewAnotherNinOptEnumFromFace(that AnotherNinOptEnumFace) *AnotherNinOptEnum { + this := &AnotherNinOptEnum{} + this.Field1 = that.GetField1() + this.Field2 = that.GetField2() + this.Field3 = that.GetField3() + return this +} + +type TimerFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetTime1() int64 + GetTime2() int64 + GetData() []byte +} + +func (this *Timer) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *Timer) TestProto() github_com_gogo_protobuf_proto.Message { + return NewTimerFromFace(this) +} + +func (this *Timer) GetTime1() int64 { + return this.Time1 +} + +func (this *Timer) GetTime2() int64 { + return this.Time2 +} + +func (this *Timer) GetData() []byte { + return this.Data +} + +func NewTimerFromFace(that TimerFace) *Timer { + this := &Timer{} + this.Time1 = that.GetTime1() + this.Time2 = that.GetTime2() + this.Data = that.GetData() + return this +} + +type NestedDefinitionFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetField1() *int64 + GetEnumField() *NestedDefinition_NestedEnum + GetNNM() *NestedDefinition_NestedMessage_NestedNestedMsg + GetNM() *NestedDefinition_NestedMessage +} + +func (this *NestedDefinition) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NestedDefinition) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNestedDefinitionFromFace(this) +} + +func (this *NestedDefinition) GetField1() *int64 { + return this.Field1 +} + +func (this *NestedDefinition) GetEnumField() *NestedDefinition_NestedEnum { + return this.EnumField +} + +func (this *NestedDefinition) GetNNM() *NestedDefinition_NestedMessage_NestedNestedMsg { + return this.NNM +} + +func (this *NestedDefinition) GetNM() *NestedDefinition_NestedMessage { + return this.NM +} + +func NewNestedDefinitionFromFace(that NestedDefinitionFace) *NestedDefinition { + this := &NestedDefinition{} + this.Field1 = that.GetField1() + this.EnumField = that.GetEnumField() + this.NNM = that.GetNNM() + this.NM = that.GetNM() + return this +} + +type NestedDefinition_NestedMessageFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetNestedField1() *uint64 + GetNNM() *NestedDefinition_NestedMessage_NestedNestedMsg +} + +func (this *NestedDefinition_NestedMessage) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NestedDefinition_NestedMessage) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNestedDefinition_NestedMessageFromFace(this) +} + +func (this *NestedDefinition_NestedMessage) GetNestedField1() *uint64 { + return this.NestedField1 +} + +func (this *NestedDefinition_NestedMessage) GetNNM() *NestedDefinition_NestedMessage_NestedNestedMsg { + return this.NNM +} + +func NewNestedDefinition_NestedMessageFromFace(that NestedDefinition_NestedMessageFace) *NestedDefinition_NestedMessage { + this := &NestedDefinition_NestedMessage{} + this.NestedField1 = that.GetNestedField1() + this.NNM = that.GetNNM() + return this +} + +type NestedDefinition_NestedMessage_NestedNestedMsgFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetNestedNestedField1() *string +} + +func (this *NestedDefinition_NestedMessage_NestedNestedMsg) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NestedDefinition_NestedMessage_NestedNestedMsg) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNestedDefinition_NestedMessage_NestedNestedMsgFromFace(this) +} + +func (this *NestedDefinition_NestedMessage_NestedNestedMsg) GetNestedNestedField1() *string { + return this.NestedNestedField1 +} + +func NewNestedDefinition_NestedMessage_NestedNestedMsgFromFace(that NestedDefinition_NestedMessage_NestedNestedMsgFace) *NestedDefinition_NestedMessage_NestedNestedMsg { + this := &NestedDefinition_NestedMessage_NestedNestedMsg{} + this.NestedNestedField1 = that.GetNestedNestedField1() + return this +} + +type NestedScopeFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetA() *NestedDefinition_NestedMessage_NestedNestedMsg + GetB() *NestedDefinition_NestedEnum + GetC() *NestedDefinition_NestedMessage +} + +func (this *NestedScope) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NestedScope) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNestedScopeFromFace(this) +} + +func (this *NestedScope) GetA() *NestedDefinition_NestedMessage_NestedNestedMsg { + return this.A +} + +func (this *NestedScope) GetB() *NestedDefinition_NestedEnum { + return this.B +} + +func (this *NestedScope) GetC() *NestedDefinition_NestedMessage { + return this.C +} + +func NewNestedScopeFromFace(that NestedScopeFace) *NestedScope { + this := &NestedScope{} + this.A = that.GetA() + this.B = that.GetB() + this.C = that.GetC() + return this +} + +type CustomContainerFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetCustomStruct() NidOptCustom +} + +func (this *CustomContainer) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *CustomContainer) TestProto() github_com_gogo_protobuf_proto.Message { + return NewCustomContainerFromFace(this) +} + +func (this *CustomContainer) GetCustomStruct() NidOptCustom { + return this.CustomStruct +} + +func NewCustomContainerFromFace(that CustomContainerFace) *CustomContainer { + this := &CustomContainer{} + this.CustomStruct = that.GetCustomStruct() + return this +} + +type CustomNameNidOptNativeFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetFieldA() float64 + GetFieldB() float32 + GetFieldC() int32 + GetFieldD() int64 + GetFieldE() uint32 + GetFieldF() uint64 + GetFieldG() int32 + GetFieldH() int64 + GetFieldI() uint32 + GetFieldJ() int32 + GetFieldK() uint64 + GetFieldL() int64 + GetFieldM() bool + GetFieldN() string + GetFieldO() []byte +} + +func (this *CustomNameNidOptNative) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *CustomNameNidOptNative) TestProto() github_com_gogo_protobuf_proto.Message { + return NewCustomNameNidOptNativeFromFace(this) +} + +func (this *CustomNameNidOptNative) GetFieldA() float64 { + return this.FieldA +} + +func (this *CustomNameNidOptNative) GetFieldB() float32 { + return this.FieldB +} + +func (this *CustomNameNidOptNative) GetFieldC() int32 { + return this.FieldC +} + +func (this *CustomNameNidOptNative) GetFieldD() int64 { + return this.FieldD +} + +func (this *CustomNameNidOptNative) GetFieldE() uint32 { + return this.FieldE +} + +func (this *CustomNameNidOptNative) GetFieldF() uint64 { + return this.FieldF +} + +func (this *CustomNameNidOptNative) GetFieldG() int32 { + return this.FieldG +} + +func (this *CustomNameNidOptNative) GetFieldH() int64 { + return this.FieldH +} + +func (this *CustomNameNidOptNative) GetFieldI() uint32 { + return this.FieldI +} + +func (this *CustomNameNidOptNative) GetFieldJ() int32 { + return this.FieldJ +} + +func (this *CustomNameNidOptNative) GetFieldK() uint64 { + return this.FieldK +} + +func (this *CustomNameNidOptNative) GetFieldL() int64 { + return this.FieldL +} + +func (this *CustomNameNidOptNative) GetFieldM() bool { + return this.FieldM +} + +func (this *CustomNameNidOptNative) GetFieldN() string { + return this.FieldN +} + +func (this *CustomNameNidOptNative) GetFieldO() []byte { + return this.FieldO +} + +func NewCustomNameNidOptNativeFromFace(that CustomNameNidOptNativeFace) *CustomNameNidOptNative { + this := &CustomNameNidOptNative{} + this.FieldA = that.GetFieldA() + this.FieldB = that.GetFieldB() + this.FieldC = that.GetFieldC() + this.FieldD = that.GetFieldD() + this.FieldE = that.GetFieldE() + this.FieldF = that.GetFieldF() + this.FieldG = that.GetFieldG() + this.FieldH = that.GetFieldH() + this.FieldI = that.GetFieldI() + this.FieldJ = that.GetFieldJ() + this.FieldK = that.GetFieldK() + this.FieldL = that.GetFieldL() + this.FieldM = that.GetFieldM() + this.FieldN = that.GetFieldN() + this.FieldO = that.GetFieldO() + return this +} + +type CustomNameNinOptNativeFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetFieldA() *float64 + GetFieldB() *float32 + GetFieldC() *int32 + GetFieldD() *int64 + GetFieldE() *uint32 + GetFieldF() *uint64 + GetFieldG() *int32 + GetFieldH() *int64 + GetFieldI() *uint32 + GetFieldJ() *int32 + GetFieldK() *uint64 + GetFielL() *int64 + GetFieldM() *bool + GetFieldN() *string + GetFieldO() []byte +} + +func (this *CustomNameNinOptNative) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *CustomNameNinOptNative) TestProto() github_com_gogo_protobuf_proto.Message { + return NewCustomNameNinOptNativeFromFace(this) +} + +func (this *CustomNameNinOptNative) GetFieldA() *float64 { + return this.FieldA +} + +func (this *CustomNameNinOptNative) GetFieldB() *float32 { + return this.FieldB +} + +func (this *CustomNameNinOptNative) GetFieldC() *int32 { + return this.FieldC +} + +func (this *CustomNameNinOptNative) GetFieldD() *int64 { + return this.FieldD +} + +func (this *CustomNameNinOptNative) GetFieldE() *uint32 { + return this.FieldE +} + +func (this *CustomNameNinOptNative) GetFieldF() *uint64 { + return this.FieldF +} + +func (this *CustomNameNinOptNative) GetFieldG() *int32 { + return this.FieldG +} + +func (this *CustomNameNinOptNative) GetFieldH() *int64 { + return this.FieldH +} + +func (this *CustomNameNinOptNative) GetFieldI() *uint32 { + return this.FieldI +} + +func (this *CustomNameNinOptNative) GetFieldJ() *int32 { + return this.FieldJ +} + +func (this *CustomNameNinOptNative) GetFieldK() *uint64 { + return this.FieldK +} + +func (this *CustomNameNinOptNative) GetFielL() *int64 { + return this.FielL +} + +func (this *CustomNameNinOptNative) GetFieldM() *bool { + return this.FieldM +} + +func (this *CustomNameNinOptNative) GetFieldN() *string { + return this.FieldN +} + +func (this *CustomNameNinOptNative) GetFieldO() []byte { + return this.FieldO +} + +func NewCustomNameNinOptNativeFromFace(that CustomNameNinOptNativeFace) *CustomNameNinOptNative { + this := &CustomNameNinOptNative{} + this.FieldA = that.GetFieldA() + this.FieldB = that.GetFieldB() + this.FieldC = that.GetFieldC() + this.FieldD = that.GetFieldD() + this.FieldE = that.GetFieldE() + this.FieldF = that.GetFieldF() + this.FieldG = that.GetFieldG() + this.FieldH = that.GetFieldH() + this.FieldI = that.GetFieldI() + this.FieldJ = that.GetFieldJ() + this.FieldK = that.GetFieldK() + this.FielL = that.GetFielL() + this.FieldM = that.GetFieldM() + this.FieldN = that.GetFieldN() + this.FieldO = that.GetFieldO() + return this +} + +type CustomNameNinRepNativeFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetFieldA() []float64 + GetFieldB() []float32 + GetFieldC() []int32 + GetFieldD() []int64 + GetFieldE() []uint32 + GetFieldF() []uint64 + GetFieldG() []int32 + GetFieldH() []int64 + GetFieldI() []uint32 + GetFieldJ() []int32 + GetFieldK() []uint64 + GetFieldL() []int64 + GetFieldM() []bool + GetFieldN() []string + GetFieldO() [][]byte +} + +func (this *CustomNameNinRepNative) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *CustomNameNinRepNative) TestProto() github_com_gogo_protobuf_proto.Message { + return NewCustomNameNinRepNativeFromFace(this) +} + +func (this *CustomNameNinRepNative) GetFieldA() []float64 { + return this.FieldA +} + +func (this *CustomNameNinRepNative) GetFieldB() []float32 { + return this.FieldB +} + +func (this *CustomNameNinRepNative) GetFieldC() []int32 { + return this.FieldC +} + +func (this *CustomNameNinRepNative) GetFieldD() []int64 { + return this.FieldD +} + +func (this *CustomNameNinRepNative) GetFieldE() []uint32 { + return this.FieldE +} + +func (this *CustomNameNinRepNative) GetFieldF() []uint64 { + return this.FieldF +} + +func (this *CustomNameNinRepNative) GetFieldG() []int32 { + return this.FieldG +} + +func (this *CustomNameNinRepNative) GetFieldH() []int64 { + return this.FieldH +} + +func (this *CustomNameNinRepNative) GetFieldI() []uint32 { + return this.FieldI +} + +func (this *CustomNameNinRepNative) GetFieldJ() []int32 { + return this.FieldJ +} + +func (this *CustomNameNinRepNative) GetFieldK() []uint64 { + return this.FieldK +} + +func (this *CustomNameNinRepNative) GetFieldL() []int64 { + return this.FieldL +} + +func (this *CustomNameNinRepNative) GetFieldM() []bool { + return this.FieldM +} + +func (this *CustomNameNinRepNative) GetFieldN() []string { + return this.FieldN +} + +func (this *CustomNameNinRepNative) GetFieldO() [][]byte { + return this.FieldO +} + +func NewCustomNameNinRepNativeFromFace(that CustomNameNinRepNativeFace) *CustomNameNinRepNative { + this := &CustomNameNinRepNative{} + this.FieldA = that.GetFieldA() + this.FieldB = that.GetFieldB() + this.FieldC = that.GetFieldC() + this.FieldD = that.GetFieldD() + this.FieldE = that.GetFieldE() + this.FieldF = that.GetFieldF() + this.FieldG = that.GetFieldG() + this.FieldH = that.GetFieldH() + this.FieldI = that.GetFieldI() + this.FieldJ = that.GetFieldJ() + this.FieldK = that.GetFieldK() + this.FieldL = that.GetFieldL() + this.FieldM = that.GetFieldM() + this.FieldN = that.GetFieldN() + this.FieldO = that.GetFieldO() + return this +} + +type CustomNameNinStructFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetFieldA() *float64 + GetFieldB() *float32 + GetFieldC() *NidOptNative + GetFieldD() []*NinOptNative + GetFieldE() *uint64 + GetFieldF() *int32 + GetFieldG() *NidOptNative + GetFieldH() *bool + GetFieldI() *string + GetFieldJ() []byte +} + +func (this *CustomNameNinStruct) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *CustomNameNinStruct) TestProto() github_com_gogo_protobuf_proto.Message { + return NewCustomNameNinStructFromFace(this) +} + +func (this *CustomNameNinStruct) GetFieldA() *float64 { + return this.FieldA +} + +func (this *CustomNameNinStruct) GetFieldB() *float32 { + return this.FieldB +} + +func (this *CustomNameNinStruct) GetFieldC() *NidOptNative { + return this.FieldC +} + +func (this *CustomNameNinStruct) GetFieldD() []*NinOptNative { + return this.FieldD +} + +func (this *CustomNameNinStruct) GetFieldE() *uint64 { + return this.FieldE +} + +func (this *CustomNameNinStruct) GetFieldF() *int32 { + return this.FieldF +} + +func (this *CustomNameNinStruct) GetFieldG() *NidOptNative { + return this.FieldG +} + +func (this *CustomNameNinStruct) GetFieldH() *bool { + return this.FieldH +} + +func (this *CustomNameNinStruct) GetFieldI() *string { + return this.FieldI +} + +func (this *CustomNameNinStruct) GetFieldJ() []byte { + return this.FieldJ +} + +func NewCustomNameNinStructFromFace(that CustomNameNinStructFace) *CustomNameNinStruct { + this := &CustomNameNinStruct{} + this.FieldA = that.GetFieldA() + this.FieldB = that.GetFieldB() + this.FieldC = that.GetFieldC() + this.FieldD = that.GetFieldD() + this.FieldE = that.GetFieldE() + this.FieldF = that.GetFieldF() + this.FieldG = that.GetFieldG() + this.FieldH = that.GetFieldH() + this.FieldI = that.GetFieldI() + this.FieldJ = that.GetFieldJ() + return this +} + +type CustomNameCustomTypeFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetFieldA() *Uuid + GetFieldB() *github_com_gogo_protobuf_test_custom.Uint128 + GetFieldC() []Uuid + GetFieldD() []github_com_gogo_protobuf_test_custom.Uint128 +} + +func (this *CustomNameCustomType) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *CustomNameCustomType) TestProto() github_com_gogo_protobuf_proto.Message { + return NewCustomNameCustomTypeFromFace(this) +} + +func (this *CustomNameCustomType) GetFieldA() *Uuid { + return this.FieldA +} + +func (this *CustomNameCustomType) GetFieldB() *github_com_gogo_protobuf_test_custom.Uint128 { + return this.FieldB +} + +func (this *CustomNameCustomType) GetFieldC() []Uuid { + return this.FieldC +} + +func (this *CustomNameCustomType) GetFieldD() []github_com_gogo_protobuf_test_custom.Uint128 { + return this.FieldD +} + +func NewCustomNameCustomTypeFromFace(that CustomNameCustomTypeFace) *CustomNameCustomType { + this := &CustomNameCustomType{} + this.FieldA = that.GetFieldA() + this.FieldB = that.GetFieldB() + this.FieldC = that.GetFieldC() + this.FieldD = that.GetFieldD() + return this +} + +type CustomNameNinEmbeddedStructUnionFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetNidOptNative() *NidOptNative + GetFieldA() *NinOptNative + GetFieldB() *bool +} + +func (this *CustomNameNinEmbeddedStructUnion) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *CustomNameNinEmbeddedStructUnion) TestProto() github_com_gogo_protobuf_proto.Message { + return NewCustomNameNinEmbeddedStructUnionFromFace(this) +} + +func (this *CustomNameNinEmbeddedStructUnion) GetNidOptNative() *NidOptNative { + return this.NidOptNative +} + +func (this *CustomNameNinEmbeddedStructUnion) GetFieldA() *NinOptNative { + return this.FieldA +} + +func (this *CustomNameNinEmbeddedStructUnion) GetFieldB() *bool { + return this.FieldB +} + +func NewCustomNameNinEmbeddedStructUnionFromFace(that CustomNameNinEmbeddedStructUnionFace) *CustomNameNinEmbeddedStructUnion { + this := &CustomNameNinEmbeddedStructUnion{} + this.NidOptNative = that.GetNidOptNative() + this.FieldA = that.GetFieldA() + this.FieldB = that.GetFieldB() + return this +} + +type CustomNameEnumFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetFieldA() *TheTestEnum + GetFieldB() []TheTestEnum +} + +func (this *CustomNameEnum) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *CustomNameEnum) TestProto() github_com_gogo_protobuf_proto.Message { + return NewCustomNameEnumFromFace(this) +} + +func (this *CustomNameEnum) GetFieldA() *TheTestEnum { + return this.FieldA +} + +func (this *CustomNameEnum) GetFieldB() []TheTestEnum { + return this.FieldB +} + +func NewCustomNameEnumFromFace(that CustomNameEnumFace) *CustomNameEnum { + this := &CustomNameEnum{} + this.FieldA = that.GetFieldA() + this.FieldB = that.GetFieldB() + return this +} + +type UnrecognizedFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetField1() *string +} + +func (this *Unrecognized) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *Unrecognized) TestProto() github_com_gogo_protobuf_proto.Message { + return NewUnrecognizedFromFace(this) +} + +func (this *Unrecognized) GetField1() *string { + return this.Field1 +} + +func NewUnrecognizedFromFace(that UnrecognizedFace) *Unrecognized { + this := &Unrecognized{} + this.Field1 = that.GetField1() + return this +} + +type UnrecognizedWithInnerFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetEmbedded() []*UnrecognizedWithInner_Inner + GetField2() *string +} + +func (this *UnrecognizedWithInner) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *UnrecognizedWithInner) TestProto() github_com_gogo_protobuf_proto.Message { + return NewUnrecognizedWithInnerFromFace(this) +} + +func (this *UnrecognizedWithInner) GetEmbedded() []*UnrecognizedWithInner_Inner { + return this.Embedded +} + +func (this *UnrecognizedWithInner) GetField2() *string { + return this.Field2 +} + +func NewUnrecognizedWithInnerFromFace(that UnrecognizedWithInnerFace) *UnrecognizedWithInner { + this := &UnrecognizedWithInner{} + this.Embedded = that.GetEmbedded() + this.Field2 = that.GetField2() + return this +} + +type UnrecognizedWithInner_InnerFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetField1() *uint32 +} + +func (this *UnrecognizedWithInner_Inner) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *UnrecognizedWithInner_Inner) TestProto() github_com_gogo_protobuf_proto.Message { + return NewUnrecognizedWithInner_InnerFromFace(this) +} + +func (this *UnrecognizedWithInner_Inner) GetField1() *uint32 { + return this.Field1 +} + +func NewUnrecognizedWithInner_InnerFromFace(that UnrecognizedWithInner_InnerFace) *UnrecognizedWithInner_Inner { + this := &UnrecognizedWithInner_Inner{} + this.Field1 = that.GetField1() + return this +} + +type UnrecognizedWithEmbedFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetUnrecognizedWithEmbed_Embedded() UnrecognizedWithEmbed_Embedded + GetField2() *string +} + +func (this *UnrecognizedWithEmbed) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *UnrecognizedWithEmbed) TestProto() github_com_gogo_protobuf_proto.Message { + return NewUnrecognizedWithEmbedFromFace(this) +} + +func (this *UnrecognizedWithEmbed) GetUnrecognizedWithEmbed_Embedded() UnrecognizedWithEmbed_Embedded { + return this.UnrecognizedWithEmbed_Embedded +} + +func (this *UnrecognizedWithEmbed) GetField2() *string { + return this.Field2 +} + +func NewUnrecognizedWithEmbedFromFace(that UnrecognizedWithEmbedFace) *UnrecognizedWithEmbed { + this := &UnrecognizedWithEmbed{} + this.UnrecognizedWithEmbed_Embedded = that.GetUnrecognizedWithEmbed_Embedded() + this.Field2 = that.GetField2() + return this +} + +type UnrecognizedWithEmbed_EmbeddedFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetField1() *uint32 +} + +func (this *UnrecognizedWithEmbed_Embedded) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *UnrecognizedWithEmbed_Embedded) TestProto() github_com_gogo_protobuf_proto.Message { + return NewUnrecognizedWithEmbed_EmbeddedFromFace(this) +} + +func (this *UnrecognizedWithEmbed_Embedded) GetField1() *uint32 { + return this.Field1 +} + +func NewUnrecognizedWithEmbed_EmbeddedFromFace(that UnrecognizedWithEmbed_EmbeddedFace) *UnrecognizedWithEmbed_Embedded { + this := &UnrecognizedWithEmbed_Embedded{} + this.Field1 = that.GetField1() + return this +} + +type NodeFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetLabel() *string + GetChildren() []*Node +} + +func (this *Node) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *Node) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNodeFromFace(this) +} + +func (this *Node) GetLabel() *string { + return this.Label +} + +func (this *Node) GetChildren() []*Node { + return this.Children +} + +func NewNodeFromFace(that NodeFace) *Node { + this := &Node{} + this.Label = that.GetLabel() + this.Children = that.GetChildren() + return this +} + +func (this *NidOptNative) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 19) + s = append(s, "&test.NidOptNative{") + s = append(s, "Field1: "+fmt.Sprintf("%#v", this.Field1)+",\n") + s = append(s, "Field2: "+fmt.Sprintf("%#v", this.Field2)+",\n") + s = append(s, "Field3: "+fmt.Sprintf("%#v", this.Field3)+",\n") + s = append(s, "Field4: "+fmt.Sprintf("%#v", this.Field4)+",\n") + s = append(s, "Field5: "+fmt.Sprintf("%#v", this.Field5)+",\n") + s = append(s, "Field6: "+fmt.Sprintf("%#v", this.Field6)+",\n") + s = append(s, "Field7: "+fmt.Sprintf("%#v", this.Field7)+",\n") + s = append(s, "Field8: "+fmt.Sprintf("%#v", this.Field8)+",\n") + s = append(s, "Field9: "+fmt.Sprintf("%#v", this.Field9)+",\n") + s = append(s, "Field10: "+fmt.Sprintf("%#v", this.Field10)+",\n") + s = append(s, "Field11: "+fmt.Sprintf("%#v", this.Field11)+",\n") + s = append(s, "Field12: "+fmt.Sprintf("%#v", this.Field12)+",\n") + s = append(s, "Field13: "+fmt.Sprintf("%#v", this.Field13)+",\n") + s = append(s, "Field14: "+fmt.Sprintf("%#v", this.Field14)+",\n") + s = append(s, "Field15: "+fmt.Sprintf("%#v", this.Field15)+",\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 *NinOptNative) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 19) + s = append(s, "&test.NinOptNative{") + if this.Field1 != nil { + s = append(s, "Field1: "+valueToGoStringThetest(this.Field1, "float64")+",\n") + } + if this.Field2 != nil { + s = append(s, "Field2: "+valueToGoStringThetest(this.Field2, "float32")+",\n") + } + if this.Field3 != nil { + s = append(s, "Field3: "+valueToGoStringThetest(this.Field3, "int32")+",\n") + } + if this.Field4 != nil { + s = append(s, "Field4: "+valueToGoStringThetest(this.Field4, "int64")+",\n") + } + if this.Field5 != nil { + s = append(s, "Field5: "+valueToGoStringThetest(this.Field5, "uint32")+",\n") + } + if this.Field6 != nil { + s = append(s, "Field6: "+valueToGoStringThetest(this.Field6, "uint64")+",\n") + } + if this.Field7 != nil { + s = append(s, "Field7: "+valueToGoStringThetest(this.Field7, "int32")+",\n") + } + if this.Field8 != nil { + s = append(s, "Field8: "+valueToGoStringThetest(this.Field8, "int64")+",\n") + } + if this.Field9 != nil { + s = append(s, "Field9: "+valueToGoStringThetest(this.Field9, "uint32")+",\n") + } + if this.Field10 != nil { + s = append(s, "Field10: "+valueToGoStringThetest(this.Field10, "int32")+",\n") + } + if this.Field11 != nil { + s = append(s, "Field11: "+valueToGoStringThetest(this.Field11, "uint64")+",\n") + } + if this.Field12 != nil { + s = append(s, "Field12: "+valueToGoStringThetest(this.Field12, "int64")+",\n") + } + if this.Field13 != nil { + s = append(s, "Field13: "+valueToGoStringThetest(this.Field13, "bool")+",\n") + } + if this.Field14 != nil { + s = append(s, "Field14: "+valueToGoStringThetest(this.Field14, "string")+",\n") + } + if this.Field15 != nil { + s = append(s, "Field15: "+valueToGoStringThetest(this.Field15, "byte")+",\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 *NidRepNative) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 19) + s = append(s, "&test.NidRepNative{") + if this.Field1 != nil { + s = append(s, "Field1: "+fmt.Sprintf("%#v", this.Field1)+",\n") + } + if this.Field2 != nil { + s = append(s, "Field2: "+fmt.Sprintf("%#v", this.Field2)+",\n") + } + if this.Field3 != nil { + s = append(s, "Field3: "+fmt.Sprintf("%#v", this.Field3)+",\n") + } + if this.Field4 != nil { + s = append(s, "Field4: "+fmt.Sprintf("%#v", this.Field4)+",\n") + } + if this.Field5 != nil { + s = append(s, "Field5: "+fmt.Sprintf("%#v", this.Field5)+",\n") + } + if this.Field6 != nil { + s = append(s, "Field6: "+fmt.Sprintf("%#v", this.Field6)+",\n") + } + if this.Field7 != nil { + s = append(s, "Field7: "+fmt.Sprintf("%#v", this.Field7)+",\n") + } + if this.Field8 != nil { + s = append(s, "Field8: "+fmt.Sprintf("%#v", this.Field8)+",\n") + } + if this.Field9 != nil { + s = append(s, "Field9: "+fmt.Sprintf("%#v", this.Field9)+",\n") + } + if this.Field10 != nil { + s = append(s, "Field10: "+fmt.Sprintf("%#v", this.Field10)+",\n") + } + if this.Field11 != nil { + s = append(s, "Field11: "+fmt.Sprintf("%#v", this.Field11)+",\n") + } + if this.Field12 != nil { + s = append(s, "Field12: "+fmt.Sprintf("%#v", this.Field12)+",\n") + } + if this.Field13 != nil { + s = append(s, "Field13: "+fmt.Sprintf("%#v", this.Field13)+",\n") + } + if this.Field14 != nil { + s = append(s, "Field14: "+fmt.Sprintf("%#v", this.Field14)+",\n") + } + if this.Field15 != nil { + s = append(s, "Field15: "+fmt.Sprintf("%#v", this.Field15)+",\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 *NinRepNative) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 19) + s = append(s, "&test.NinRepNative{") + if this.Field1 != nil { + s = append(s, "Field1: "+fmt.Sprintf("%#v", this.Field1)+",\n") + } + if this.Field2 != nil { + s = append(s, "Field2: "+fmt.Sprintf("%#v", this.Field2)+",\n") + } + if this.Field3 != nil { + s = append(s, "Field3: "+fmt.Sprintf("%#v", this.Field3)+",\n") + } + if this.Field4 != nil { + s = append(s, "Field4: "+fmt.Sprintf("%#v", this.Field4)+",\n") + } + if this.Field5 != nil { + s = append(s, "Field5: "+fmt.Sprintf("%#v", this.Field5)+",\n") + } + if this.Field6 != nil { + s = append(s, "Field6: "+fmt.Sprintf("%#v", this.Field6)+",\n") + } + if this.Field7 != nil { + s = append(s, "Field7: "+fmt.Sprintf("%#v", this.Field7)+",\n") + } + if this.Field8 != nil { + s = append(s, "Field8: "+fmt.Sprintf("%#v", this.Field8)+",\n") + } + if this.Field9 != nil { + s = append(s, "Field9: "+fmt.Sprintf("%#v", this.Field9)+",\n") + } + if this.Field10 != nil { + s = append(s, "Field10: "+fmt.Sprintf("%#v", this.Field10)+",\n") + } + if this.Field11 != nil { + s = append(s, "Field11: "+fmt.Sprintf("%#v", this.Field11)+",\n") + } + if this.Field12 != nil { + s = append(s, "Field12: "+fmt.Sprintf("%#v", this.Field12)+",\n") + } + if this.Field13 != nil { + s = append(s, "Field13: "+fmt.Sprintf("%#v", this.Field13)+",\n") + } + if this.Field14 != nil { + s = append(s, "Field14: "+fmt.Sprintf("%#v", this.Field14)+",\n") + } + if this.Field15 != nil { + s = append(s, "Field15: "+fmt.Sprintf("%#v", this.Field15)+",\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 *NidRepPackedNative) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 17) + s = append(s, "&test.NidRepPackedNative{") + if this.Field1 != nil { + s = append(s, "Field1: "+fmt.Sprintf("%#v", this.Field1)+",\n") + } + if this.Field2 != nil { + s = append(s, "Field2: "+fmt.Sprintf("%#v", this.Field2)+",\n") + } + if this.Field3 != nil { + s = append(s, "Field3: "+fmt.Sprintf("%#v", this.Field3)+",\n") + } + if this.Field4 != nil { + s = append(s, "Field4: "+fmt.Sprintf("%#v", this.Field4)+",\n") + } + if this.Field5 != nil { + s = append(s, "Field5: "+fmt.Sprintf("%#v", this.Field5)+",\n") + } + if this.Field6 != nil { + s = append(s, "Field6: "+fmt.Sprintf("%#v", this.Field6)+",\n") + } + if this.Field7 != nil { + s = append(s, "Field7: "+fmt.Sprintf("%#v", this.Field7)+",\n") + } + if this.Field8 != nil { + s = append(s, "Field8: "+fmt.Sprintf("%#v", this.Field8)+",\n") + } + if this.Field9 != nil { + s = append(s, "Field9: "+fmt.Sprintf("%#v", this.Field9)+",\n") + } + if this.Field10 != nil { + s = append(s, "Field10: "+fmt.Sprintf("%#v", this.Field10)+",\n") + } + if this.Field11 != nil { + s = append(s, "Field11: "+fmt.Sprintf("%#v", this.Field11)+",\n") + } + if this.Field12 != nil { + s = append(s, "Field12: "+fmt.Sprintf("%#v", this.Field12)+",\n") + } + if this.Field13 != nil { + s = append(s, "Field13: "+fmt.Sprintf("%#v", this.Field13)+",\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 *NinRepPackedNative) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 17) + s = append(s, "&test.NinRepPackedNative{") + if this.Field1 != nil { + s = append(s, "Field1: "+fmt.Sprintf("%#v", this.Field1)+",\n") + } + if this.Field2 != nil { + s = append(s, "Field2: "+fmt.Sprintf("%#v", this.Field2)+",\n") + } + if this.Field3 != nil { + s = append(s, "Field3: "+fmt.Sprintf("%#v", this.Field3)+",\n") + } + if this.Field4 != nil { + s = append(s, "Field4: "+fmt.Sprintf("%#v", this.Field4)+",\n") + } + if this.Field5 != nil { + s = append(s, "Field5: "+fmt.Sprintf("%#v", this.Field5)+",\n") + } + if this.Field6 != nil { + s = append(s, "Field6: "+fmt.Sprintf("%#v", this.Field6)+",\n") + } + if this.Field7 != nil { + s = append(s, "Field7: "+fmt.Sprintf("%#v", this.Field7)+",\n") + } + if this.Field8 != nil { + s = append(s, "Field8: "+fmt.Sprintf("%#v", this.Field8)+",\n") + } + if this.Field9 != nil { + s = append(s, "Field9: "+fmt.Sprintf("%#v", this.Field9)+",\n") + } + if this.Field10 != nil { + s = append(s, "Field10: "+fmt.Sprintf("%#v", this.Field10)+",\n") + } + if this.Field11 != nil { + s = append(s, "Field11: "+fmt.Sprintf("%#v", this.Field11)+",\n") + } + if this.Field12 != nil { + s = append(s, "Field12: "+fmt.Sprintf("%#v", this.Field12)+",\n") + } + if this.Field13 != nil { + s = append(s, "Field13: "+fmt.Sprintf("%#v", this.Field13)+",\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 *NidOptStruct) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 14) + s = append(s, "&test.NidOptStruct{") + s = append(s, "Field1: "+fmt.Sprintf("%#v", this.Field1)+",\n") + s = append(s, "Field2: "+fmt.Sprintf("%#v", this.Field2)+",\n") + s = append(s, "Field3: "+strings.Replace(this.Field3.GoString(), `&`, ``, 1)+",\n") + s = append(s, "Field4: "+strings.Replace(this.Field4.GoString(), `&`, ``, 1)+",\n") + s = append(s, "Field6: "+fmt.Sprintf("%#v", this.Field6)+",\n") + s = append(s, "Field7: "+fmt.Sprintf("%#v", this.Field7)+",\n") + s = append(s, "Field8: "+strings.Replace(this.Field8.GoString(), `&`, ``, 1)+",\n") + s = append(s, "Field13: "+fmt.Sprintf("%#v", this.Field13)+",\n") + s = append(s, "Field14: "+fmt.Sprintf("%#v", this.Field14)+",\n") + s = append(s, "Field15: "+fmt.Sprintf("%#v", this.Field15)+",\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 *NinOptStruct) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 14) + s = append(s, "&test.NinOptStruct{") + if this.Field1 != nil { + s = append(s, "Field1: "+valueToGoStringThetest(this.Field1, "float64")+",\n") + } + if this.Field2 != nil { + s = append(s, "Field2: "+valueToGoStringThetest(this.Field2, "float32")+",\n") + } + if this.Field3 != nil { + s = append(s, "Field3: "+fmt.Sprintf("%#v", this.Field3)+",\n") + } + if this.Field4 != nil { + s = append(s, "Field4: "+fmt.Sprintf("%#v", this.Field4)+",\n") + } + if this.Field6 != nil { + s = append(s, "Field6: "+valueToGoStringThetest(this.Field6, "uint64")+",\n") + } + if this.Field7 != nil { + s = append(s, "Field7: "+valueToGoStringThetest(this.Field7, "int32")+",\n") + } + if this.Field8 != nil { + s = append(s, "Field8: "+fmt.Sprintf("%#v", this.Field8)+",\n") + } + if this.Field13 != nil { + s = append(s, "Field13: "+valueToGoStringThetest(this.Field13, "bool")+",\n") + } + if this.Field14 != nil { + s = append(s, "Field14: "+valueToGoStringThetest(this.Field14, "string")+",\n") + } + if this.Field15 != nil { + s = append(s, "Field15: "+valueToGoStringThetest(this.Field15, "byte")+",\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 *NidRepStruct) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 14) + s = append(s, "&test.NidRepStruct{") + if this.Field1 != nil { + s = append(s, "Field1: "+fmt.Sprintf("%#v", this.Field1)+",\n") + } + if this.Field2 != nil { + s = append(s, "Field2: "+fmt.Sprintf("%#v", this.Field2)+",\n") + } + if this.Field3 != nil { + s = append(s, "Field3: "+fmt.Sprintf("%#v", this.Field3)+",\n") + } + if this.Field4 != nil { + s = append(s, "Field4: "+fmt.Sprintf("%#v", this.Field4)+",\n") + } + if this.Field6 != nil { + s = append(s, "Field6: "+fmt.Sprintf("%#v", this.Field6)+",\n") + } + if this.Field7 != nil { + s = append(s, "Field7: "+fmt.Sprintf("%#v", this.Field7)+",\n") + } + if this.Field8 != nil { + s = append(s, "Field8: "+fmt.Sprintf("%#v", this.Field8)+",\n") + } + if this.Field13 != nil { + s = append(s, "Field13: "+fmt.Sprintf("%#v", this.Field13)+",\n") + } + if this.Field14 != nil { + s = append(s, "Field14: "+fmt.Sprintf("%#v", this.Field14)+",\n") + } + if this.Field15 != nil { + s = append(s, "Field15: "+fmt.Sprintf("%#v", this.Field15)+",\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 *NinRepStruct) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 14) + s = append(s, "&test.NinRepStruct{") + if this.Field1 != nil { + s = append(s, "Field1: "+fmt.Sprintf("%#v", this.Field1)+",\n") + } + if this.Field2 != nil { + s = append(s, "Field2: "+fmt.Sprintf("%#v", this.Field2)+",\n") + } + if this.Field3 != nil { + s = append(s, "Field3: "+fmt.Sprintf("%#v", this.Field3)+",\n") + } + if this.Field4 != nil { + s = append(s, "Field4: "+fmt.Sprintf("%#v", this.Field4)+",\n") + } + if this.Field6 != nil { + s = append(s, "Field6: "+fmt.Sprintf("%#v", this.Field6)+",\n") + } + if this.Field7 != nil { + s = append(s, "Field7: "+fmt.Sprintf("%#v", this.Field7)+",\n") + } + if this.Field8 != nil { + s = append(s, "Field8: "+fmt.Sprintf("%#v", this.Field8)+",\n") + } + if this.Field13 != nil { + s = append(s, "Field13: "+fmt.Sprintf("%#v", this.Field13)+",\n") + } + if this.Field14 != nil { + s = append(s, "Field14: "+fmt.Sprintf("%#v", this.Field14)+",\n") + } + if this.Field15 != nil { + s = append(s, "Field15: "+fmt.Sprintf("%#v", this.Field15)+",\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 *NidEmbeddedStruct) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 7) + s = append(s, "&test.NidEmbeddedStruct{") + if this.NidOptNative != nil { + s = append(s, "NidOptNative: "+fmt.Sprintf("%#v", this.NidOptNative)+",\n") + } + s = append(s, "Field200: "+strings.Replace(this.Field200.GoString(), `&`, ``, 1)+",\n") + s = append(s, "Field210: "+fmt.Sprintf("%#v", this.Field210)+",\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 *NinEmbeddedStruct) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 7) + s = append(s, "&test.NinEmbeddedStruct{") + if this.NidOptNative != nil { + s = append(s, "NidOptNative: "+fmt.Sprintf("%#v", this.NidOptNative)+",\n") + } + if this.Field200 != nil { + s = append(s, "Field200: "+fmt.Sprintf("%#v", this.Field200)+",\n") + } + if this.Field210 != nil { + s = append(s, "Field210: "+valueToGoStringThetest(this.Field210, "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 *NidNestedStruct) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 6) + s = append(s, "&test.NidNestedStruct{") + s = append(s, "Field1: "+strings.Replace(this.Field1.GoString(), `&`, ``, 1)+",\n") + if this.Field2 != nil { + s = append(s, "Field2: "+fmt.Sprintf("%#v", this.Field2)+",\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 *NinNestedStruct) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 6) + s = append(s, "&test.NinNestedStruct{") + if this.Field1 != nil { + s = append(s, "Field1: "+fmt.Sprintf("%#v", this.Field1)+",\n") + } + if this.Field2 != nil { + s = append(s, "Field2: "+fmt.Sprintf("%#v", this.Field2)+",\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 *NidOptCustom) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 6) + s = append(s, "&test.NidOptCustom{") + s = append(s, "Id: "+fmt.Sprintf("%#v", this.Id)+",\n") + s = append(s, "Value: "+fmt.Sprintf("%#v", this.Value)+",\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 *CustomDash) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&test.CustomDash{") + if this.Value != nil { + s = append(s, "Value: "+valueToGoStringThetest(this.Value, "github_com_gogo_protobuf_test_custom_dash_type.Bytes")+",\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 *NinOptCustom) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 6) + s = append(s, "&test.NinOptCustom{") + if this.Id != nil { + s = append(s, "Id: "+valueToGoStringThetest(this.Id, "Uuid")+",\n") + } + if this.Value != nil { + s = append(s, "Value: "+valueToGoStringThetest(this.Value, "github_com_gogo_protobuf_test_custom.Uint128")+",\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 *NidRepCustom) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 6) + s = append(s, "&test.NidRepCustom{") + if this.Id != nil { + s = append(s, "Id: "+fmt.Sprintf("%#v", this.Id)+",\n") + } + if this.Value != nil { + s = append(s, "Value: "+fmt.Sprintf("%#v", this.Value)+",\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 *NinRepCustom) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 6) + s = append(s, "&test.NinRepCustom{") + if this.Id != nil { + s = append(s, "Id: "+fmt.Sprintf("%#v", this.Id)+",\n") + } + if this.Value != nil { + s = append(s, "Value: "+fmt.Sprintf("%#v", this.Value)+",\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 *NinOptNativeUnion) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 13) + s = append(s, "&test.NinOptNativeUnion{") + if this.Field1 != nil { + s = append(s, "Field1: "+valueToGoStringThetest(this.Field1, "float64")+",\n") + } + if this.Field2 != nil { + s = append(s, "Field2: "+valueToGoStringThetest(this.Field2, "float32")+",\n") + } + if this.Field3 != nil { + s = append(s, "Field3: "+valueToGoStringThetest(this.Field3, "int32")+",\n") + } + if this.Field4 != nil { + s = append(s, "Field4: "+valueToGoStringThetest(this.Field4, "int64")+",\n") + } + if this.Field5 != nil { + s = append(s, "Field5: "+valueToGoStringThetest(this.Field5, "uint32")+",\n") + } + if this.Field6 != nil { + s = append(s, "Field6: "+valueToGoStringThetest(this.Field6, "uint64")+",\n") + } + if this.Field13 != nil { + s = append(s, "Field13: "+valueToGoStringThetest(this.Field13, "bool")+",\n") + } + if this.Field14 != nil { + s = append(s, "Field14: "+valueToGoStringThetest(this.Field14, "string")+",\n") + } + if this.Field15 != nil { + s = append(s, "Field15: "+valueToGoStringThetest(this.Field15, "byte")+",\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 *NinOptStructUnion) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 13) + s = append(s, "&test.NinOptStructUnion{") + if this.Field1 != nil { + s = append(s, "Field1: "+valueToGoStringThetest(this.Field1, "float64")+",\n") + } + if this.Field2 != nil { + s = append(s, "Field2: "+valueToGoStringThetest(this.Field2, "float32")+",\n") + } + if this.Field3 != nil { + s = append(s, "Field3: "+fmt.Sprintf("%#v", this.Field3)+",\n") + } + if this.Field4 != nil { + s = append(s, "Field4: "+fmt.Sprintf("%#v", this.Field4)+",\n") + } + if this.Field6 != nil { + s = append(s, "Field6: "+valueToGoStringThetest(this.Field6, "uint64")+",\n") + } + if this.Field7 != nil { + s = append(s, "Field7: "+valueToGoStringThetest(this.Field7, "int32")+",\n") + } + if this.Field13 != nil { + s = append(s, "Field13: "+valueToGoStringThetest(this.Field13, "bool")+",\n") + } + if this.Field14 != nil { + s = append(s, "Field14: "+valueToGoStringThetest(this.Field14, "string")+",\n") + } + if this.Field15 != nil { + s = append(s, "Field15: "+valueToGoStringThetest(this.Field15, "byte")+",\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 *NinEmbeddedStructUnion) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 7) + s = append(s, "&test.NinEmbeddedStructUnion{") + if this.NidOptNative != nil { + s = append(s, "NidOptNative: "+fmt.Sprintf("%#v", this.NidOptNative)+",\n") + } + if this.Field200 != nil { + s = append(s, "Field200: "+fmt.Sprintf("%#v", this.Field200)+",\n") + } + if this.Field210 != nil { + s = append(s, "Field210: "+valueToGoStringThetest(this.Field210, "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 *NinNestedStructUnion) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 7) + s = append(s, "&test.NinNestedStructUnion{") + if this.Field1 != nil { + s = append(s, "Field1: "+fmt.Sprintf("%#v", this.Field1)+",\n") + } + if this.Field2 != nil { + s = append(s, "Field2: "+fmt.Sprintf("%#v", this.Field2)+",\n") + } + if this.Field3 != nil { + s = append(s, "Field3: "+fmt.Sprintf("%#v", this.Field3)+",\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 *Tree) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 7) + s = append(s, "&test.Tree{") + if this.Or != nil { + s = append(s, "Or: "+fmt.Sprintf("%#v", this.Or)+",\n") + } + if this.And != nil { + s = append(s, "And: "+fmt.Sprintf("%#v", this.And)+",\n") + } + if this.Leaf != nil { + s = append(s, "Leaf: "+fmt.Sprintf("%#v", this.Leaf)+",\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 *OrBranch) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 6) + s = append(s, "&test.OrBranch{") + s = append(s, "Left: "+strings.Replace(this.Left.GoString(), `&`, ``, 1)+",\n") + s = append(s, "Right: "+strings.Replace(this.Right.GoString(), `&`, ``, 1)+",\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 *AndBranch) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 6) + s = append(s, "&test.AndBranch{") + s = append(s, "Left: "+strings.Replace(this.Left.GoString(), `&`, ``, 1)+",\n") + s = append(s, "Right: "+strings.Replace(this.Right.GoString(), `&`, ``, 1)+",\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 *Leaf) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 6) + s = append(s, "&test.Leaf{") + s = append(s, "Value: "+fmt.Sprintf("%#v", this.Value)+",\n") + s = append(s, "StrValue: "+fmt.Sprintf("%#v", this.StrValue)+",\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 *DeepTree) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 7) + s = append(s, "&test.DeepTree{") + if this.Down != nil { + s = append(s, "Down: "+fmt.Sprintf("%#v", this.Down)+",\n") + } + if this.And != nil { + s = append(s, "And: "+fmt.Sprintf("%#v", this.And)+",\n") + } + if this.Leaf != nil { + s = append(s, "Leaf: "+fmt.Sprintf("%#v", this.Leaf)+",\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 *ADeepBranch) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&test.ADeepBranch{") + s = append(s, "Down: "+strings.Replace(this.Down.GoString(), `&`, ``, 1)+",\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 *AndDeepBranch) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 6) + s = append(s, "&test.AndDeepBranch{") + s = append(s, "Left: "+strings.Replace(this.Left.GoString(), `&`, ``, 1)+",\n") + s = append(s, "Right: "+strings.Replace(this.Right.GoString(), `&`, ``, 1)+",\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 *DeepLeaf) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&test.DeepLeaf{") + s = append(s, "Tree: "+strings.Replace(this.Tree.GoString(), `&`, ``, 1)+",\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 *Nil) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 4) + s = append(s, "&test.Nil{") + 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 *NidOptEnum) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&test.NidOptEnum{") + s = append(s, "Field1: "+fmt.Sprintf("%#v", this.Field1)+",\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 *NinOptEnum) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 7) + s = append(s, "&test.NinOptEnum{") + if this.Field1 != nil { + s = append(s, "Field1: "+valueToGoStringThetest(this.Field1, "test.TheTestEnum")+",\n") + } + if this.Field2 != nil { + s = append(s, "Field2: "+valueToGoStringThetest(this.Field2, "test.YetAnotherTestEnum")+",\n") + } + if this.Field3 != nil { + s = append(s, "Field3: "+valueToGoStringThetest(this.Field3, "test.YetYetAnotherTestEnum")+",\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 *NidRepEnum) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 7) + s = append(s, "&test.NidRepEnum{") + if this.Field1 != nil { + s = append(s, "Field1: "+fmt.Sprintf("%#v", this.Field1)+",\n") + } + if this.Field2 != nil { + s = append(s, "Field2: "+fmt.Sprintf("%#v", this.Field2)+",\n") + } + if this.Field3 != nil { + s = append(s, "Field3: "+fmt.Sprintf("%#v", this.Field3)+",\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 *NinRepEnum) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 7) + s = append(s, "&test.NinRepEnum{") + if this.Field1 != nil { + s = append(s, "Field1: "+fmt.Sprintf("%#v", this.Field1)+",\n") + } + if this.Field2 != nil { + s = append(s, "Field2: "+fmt.Sprintf("%#v", this.Field2)+",\n") + } + if this.Field3 != nil { + s = append(s, "Field3: "+fmt.Sprintf("%#v", this.Field3)+",\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 *NinOptEnumDefault) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 7) + s = append(s, "&test.NinOptEnumDefault{") + if this.Field1 != nil { + s = append(s, "Field1: "+valueToGoStringThetest(this.Field1, "test.TheTestEnum")+",\n") + } + if this.Field2 != nil { + s = append(s, "Field2: "+valueToGoStringThetest(this.Field2, "test.YetAnotherTestEnum")+",\n") + } + if this.Field3 != nil { + s = append(s, "Field3: "+valueToGoStringThetest(this.Field3, "test.YetYetAnotherTestEnum")+",\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 *AnotherNinOptEnum) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 7) + s = append(s, "&test.AnotherNinOptEnum{") + if this.Field1 != nil { + s = append(s, "Field1: "+valueToGoStringThetest(this.Field1, "test.AnotherTestEnum")+",\n") + } + if this.Field2 != nil { + s = append(s, "Field2: "+valueToGoStringThetest(this.Field2, "test.YetAnotherTestEnum")+",\n") + } + if this.Field3 != nil { + s = append(s, "Field3: "+valueToGoStringThetest(this.Field3, "test.YetYetAnotherTestEnum")+",\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 *AnotherNinOptEnumDefault) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 7) + s = append(s, "&test.AnotherNinOptEnumDefault{") + if this.Field1 != nil { + s = append(s, "Field1: "+valueToGoStringThetest(this.Field1, "test.AnotherTestEnum")+",\n") + } + if this.Field2 != nil { + s = append(s, "Field2: "+valueToGoStringThetest(this.Field2, "test.YetAnotherTestEnum")+",\n") + } + if this.Field3 != nil { + s = append(s, "Field3: "+valueToGoStringThetest(this.Field3, "test.YetYetAnotherTestEnum")+",\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 *Timer) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 7) + s = append(s, "&test.Timer{") + s = append(s, "Time1: "+fmt.Sprintf("%#v", this.Time1)+",\n") + s = append(s, "Time2: "+fmt.Sprintf("%#v", this.Time2)+",\n") + s = append(s, "Data: "+fmt.Sprintf("%#v", this.Data)+",\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 *MyExtendable) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&test.MyExtendable{") + if this.Field1 != nil { + s = append(s, "Field1: "+valueToGoStringThetest(this.Field1, "int64")+",\n") + } + if this.XXX_extensions != nil { + s = append(s, "XXX_extensions: "+extensionToGoStringThetest(this.XXX_extensions)+",\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 *OtherExtenable) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 7) + s = append(s, "&test.OtherExtenable{") + if this.Field2 != nil { + s = append(s, "Field2: "+valueToGoStringThetest(this.Field2, "int64")+",\n") + } + if this.Field13 != nil { + s = append(s, "Field13: "+valueToGoStringThetest(this.Field13, "int64")+",\n") + } + if this.M != nil { + s = append(s, "M: "+fmt.Sprintf("%#v", this.M)+",\n") + } + if this.XXX_extensions != nil { + s = append(s, "XXX_extensions: "+extensionToGoStringThetest(this.XXX_extensions)+",\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 *NestedDefinition) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 8) + s = append(s, "&test.NestedDefinition{") + if this.Field1 != nil { + s = append(s, "Field1: "+valueToGoStringThetest(this.Field1, "int64")+",\n") + } + if this.EnumField != nil { + s = append(s, "EnumField: "+valueToGoStringThetest(this.EnumField, "test.NestedDefinition_NestedEnum")+",\n") + } + if this.NNM != nil { + s = append(s, "NNM: "+fmt.Sprintf("%#v", this.NNM)+",\n") + } + if this.NM != nil { + s = append(s, "NM: "+fmt.Sprintf("%#v", this.NM)+",\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 *NestedDefinition_NestedMessage) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 6) + s = append(s, "&test.NestedDefinition_NestedMessage{") + if this.NestedField1 != nil { + s = append(s, "NestedField1: "+valueToGoStringThetest(this.NestedField1, "uint64")+",\n") + } + if this.NNM != nil { + s = append(s, "NNM: "+fmt.Sprintf("%#v", this.NNM)+",\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 *NestedDefinition_NestedMessage_NestedNestedMsg) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&test.NestedDefinition_NestedMessage_NestedNestedMsg{") + if this.NestedNestedField1 != nil { + s = append(s, "NestedNestedField1: "+valueToGoStringThetest(this.NestedNestedField1, "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 *NestedScope) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 7) + s = append(s, "&test.NestedScope{") + if this.A != nil { + s = append(s, "A: "+fmt.Sprintf("%#v", this.A)+",\n") + } + if this.B != nil { + s = append(s, "B: "+valueToGoStringThetest(this.B, "test.NestedDefinition_NestedEnum")+",\n") + } + if this.C != nil { + s = append(s, "C: "+fmt.Sprintf("%#v", this.C)+",\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 *NinOptNativeDefault) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 19) + s = append(s, "&test.NinOptNativeDefault{") + if this.Field1 != nil { + s = append(s, "Field1: "+valueToGoStringThetest(this.Field1, "float64")+",\n") + } + if this.Field2 != nil { + s = append(s, "Field2: "+valueToGoStringThetest(this.Field2, "float32")+",\n") + } + if this.Field3 != nil { + s = append(s, "Field3: "+valueToGoStringThetest(this.Field3, "int32")+",\n") + } + if this.Field4 != nil { + s = append(s, "Field4: "+valueToGoStringThetest(this.Field4, "int64")+",\n") + } + if this.Field5 != nil { + s = append(s, "Field5: "+valueToGoStringThetest(this.Field5, "uint32")+",\n") + } + if this.Field6 != nil { + s = append(s, "Field6: "+valueToGoStringThetest(this.Field6, "uint64")+",\n") + } + if this.Field7 != nil { + s = append(s, "Field7: "+valueToGoStringThetest(this.Field7, "int32")+",\n") + } + if this.Field8 != nil { + s = append(s, "Field8: "+valueToGoStringThetest(this.Field8, "int64")+",\n") + } + if this.Field9 != nil { + s = append(s, "Field9: "+valueToGoStringThetest(this.Field9, "uint32")+",\n") + } + if this.Field10 != nil { + s = append(s, "Field10: "+valueToGoStringThetest(this.Field10, "int32")+",\n") + } + if this.Field11 != nil { + s = append(s, "Field11: "+valueToGoStringThetest(this.Field11, "uint64")+",\n") + } + if this.Field12 != nil { + s = append(s, "Field12: "+valueToGoStringThetest(this.Field12, "int64")+",\n") + } + if this.Field13 != nil { + s = append(s, "Field13: "+valueToGoStringThetest(this.Field13, "bool")+",\n") + } + if this.Field14 != nil { + s = append(s, "Field14: "+valueToGoStringThetest(this.Field14, "string")+",\n") + } + if this.Field15 != nil { + s = append(s, "Field15: "+valueToGoStringThetest(this.Field15, "byte")+",\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 *CustomContainer) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&test.CustomContainer{") + s = append(s, "CustomStruct: "+strings.Replace(this.CustomStruct.GoString(), `&`, ``, 1)+",\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 *CustomNameNidOptNative) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 19) + s = append(s, "&test.CustomNameNidOptNative{") + s = append(s, "FieldA: "+fmt.Sprintf("%#v", this.FieldA)+",\n") + s = append(s, "FieldB: "+fmt.Sprintf("%#v", this.FieldB)+",\n") + s = append(s, "FieldC: "+fmt.Sprintf("%#v", this.FieldC)+",\n") + s = append(s, "FieldD: "+fmt.Sprintf("%#v", this.FieldD)+",\n") + s = append(s, "FieldE: "+fmt.Sprintf("%#v", this.FieldE)+",\n") + s = append(s, "FieldF: "+fmt.Sprintf("%#v", this.FieldF)+",\n") + s = append(s, "FieldG: "+fmt.Sprintf("%#v", this.FieldG)+",\n") + s = append(s, "FieldH: "+fmt.Sprintf("%#v", this.FieldH)+",\n") + s = append(s, "FieldI: "+fmt.Sprintf("%#v", this.FieldI)+",\n") + s = append(s, "FieldJ: "+fmt.Sprintf("%#v", this.FieldJ)+",\n") + s = append(s, "FieldK: "+fmt.Sprintf("%#v", this.FieldK)+",\n") + s = append(s, "FieldL: "+fmt.Sprintf("%#v", this.FieldL)+",\n") + s = append(s, "FieldM: "+fmt.Sprintf("%#v", this.FieldM)+",\n") + s = append(s, "FieldN: "+fmt.Sprintf("%#v", this.FieldN)+",\n") + s = append(s, "FieldO: "+fmt.Sprintf("%#v", this.FieldO)+",\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 *CustomNameNinOptNative) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 19) + s = append(s, "&test.CustomNameNinOptNative{") + if this.FieldA != nil { + s = append(s, "FieldA: "+valueToGoStringThetest(this.FieldA, "float64")+",\n") + } + if this.FieldB != nil { + s = append(s, "FieldB: "+valueToGoStringThetest(this.FieldB, "float32")+",\n") + } + if this.FieldC != nil { + s = append(s, "FieldC: "+valueToGoStringThetest(this.FieldC, "int32")+",\n") + } + if this.FieldD != nil { + s = append(s, "FieldD: "+valueToGoStringThetest(this.FieldD, "int64")+",\n") + } + if this.FieldE != nil { + s = append(s, "FieldE: "+valueToGoStringThetest(this.FieldE, "uint32")+",\n") + } + if this.FieldF != nil { + s = append(s, "FieldF: "+valueToGoStringThetest(this.FieldF, "uint64")+",\n") + } + if this.FieldG != nil { + s = append(s, "FieldG: "+valueToGoStringThetest(this.FieldG, "int32")+",\n") + } + if this.FieldH != nil { + s = append(s, "FieldH: "+valueToGoStringThetest(this.FieldH, "int64")+",\n") + } + if this.FieldI != nil { + s = append(s, "FieldI: "+valueToGoStringThetest(this.FieldI, "uint32")+",\n") + } + if this.FieldJ != nil { + s = append(s, "FieldJ: "+valueToGoStringThetest(this.FieldJ, "int32")+",\n") + } + if this.FieldK != nil { + s = append(s, "FieldK: "+valueToGoStringThetest(this.FieldK, "uint64")+",\n") + } + if this.FielL != nil { + s = append(s, "FielL: "+valueToGoStringThetest(this.FielL, "int64")+",\n") + } + if this.FieldM != nil { + s = append(s, "FieldM: "+valueToGoStringThetest(this.FieldM, "bool")+",\n") + } + if this.FieldN != nil { + s = append(s, "FieldN: "+valueToGoStringThetest(this.FieldN, "string")+",\n") + } + if this.FieldO != nil { + s = append(s, "FieldO: "+valueToGoStringThetest(this.FieldO, "byte")+",\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 *CustomNameNinRepNative) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 19) + s = append(s, "&test.CustomNameNinRepNative{") + if this.FieldA != nil { + s = append(s, "FieldA: "+fmt.Sprintf("%#v", this.FieldA)+",\n") + } + if this.FieldB != nil { + s = append(s, "FieldB: "+fmt.Sprintf("%#v", this.FieldB)+",\n") + } + if this.FieldC != nil { + s = append(s, "FieldC: "+fmt.Sprintf("%#v", this.FieldC)+",\n") + } + if this.FieldD != nil { + s = append(s, "FieldD: "+fmt.Sprintf("%#v", this.FieldD)+",\n") + } + if this.FieldE != nil { + s = append(s, "FieldE: "+fmt.Sprintf("%#v", this.FieldE)+",\n") + } + if this.FieldF != nil { + s = append(s, "FieldF: "+fmt.Sprintf("%#v", this.FieldF)+",\n") + } + if this.FieldG != nil { + s = append(s, "FieldG: "+fmt.Sprintf("%#v", this.FieldG)+",\n") + } + if this.FieldH != nil { + s = append(s, "FieldH: "+fmt.Sprintf("%#v", this.FieldH)+",\n") + } + if this.FieldI != nil { + s = append(s, "FieldI: "+fmt.Sprintf("%#v", this.FieldI)+",\n") + } + if this.FieldJ != nil { + s = append(s, "FieldJ: "+fmt.Sprintf("%#v", this.FieldJ)+",\n") + } + if this.FieldK != nil { + s = append(s, "FieldK: "+fmt.Sprintf("%#v", this.FieldK)+",\n") + } + if this.FieldL != nil { + s = append(s, "FieldL: "+fmt.Sprintf("%#v", this.FieldL)+",\n") + } + if this.FieldM != nil { + s = append(s, "FieldM: "+fmt.Sprintf("%#v", this.FieldM)+",\n") + } + if this.FieldN != nil { + s = append(s, "FieldN: "+fmt.Sprintf("%#v", this.FieldN)+",\n") + } + if this.FieldO != nil { + s = append(s, "FieldO: "+fmt.Sprintf("%#v", this.FieldO)+",\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 *CustomNameNinStruct) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 14) + s = append(s, "&test.CustomNameNinStruct{") + if this.FieldA != nil { + s = append(s, "FieldA: "+valueToGoStringThetest(this.FieldA, "float64")+",\n") + } + if this.FieldB != nil { + s = append(s, "FieldB: "+valueToGoStringThetest(this.FieldB, "float32")+",\n") + } + if this.FieldC != nil { + s = append(s, "FieldC: "+fmt.Sprintf("%#v", this.FieldC)+",\n") + } + if this.FieldD != nil { + s = append(s, "FieldD: "+fmt.Sprintf("%#v", this.FieldD)+",\n") + } + if this.FieldE != nil { + s = append(s, "FieldE: "+valueToGoStringThetest(this.FieldE, "uint64")+",\n") + } + if this.FieldF != nil { + s = append(s, "FieldF: "+valueToGoStringThetest(this.FieldF, "int32")+",\n") + } + if this.FieldG != nil { + s = append(s, "FieldG: "+fmt.Sprintf("%#v", this.FieldG)+",\n") + } + if this.FieldH != nil { + s = append(s, "FieldH: "+valueToGoStringThetest(this.FieldH, "bool")+",\n") + } + if this.FieldI != nil { + s = append(s, "FieldI: "+valueToGoStringThetest(this.FieldI, "string")+",\n") + } + if this.FieldJ != nil { + s = append(s, "FieldJ: "+valueToGoStringThetest(this.FieldJ, "byte")+",\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 *CustomNameCustomType) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 8) + s = append(s, "&test.CustomNameCustomType{") + if this.FieldA != nil { + s = append(s, "FieldA: "+valueToGoStringThetest(this.FieldA, "Uuid")+",\n") + } + if this.FieldB != nil { + s = append(s, "FieldB: "+valueToGoStringThetest(this.FieldB, "github_com_gogo_protobuf_test_custom.Uint128")+",\n") + } + if this.FieldC != nil { + s = append(s, "FieldC: "+fmt.Sprintf("%#v", this.FieldC)+",\n") + } + if this.FieldD != nil { + s = append(s, "FieldD: "+fmt.Sprintf("%#v", this.FieldD)+",\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 *CustomNameNinEmbeddedStructUnion) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 7) + s = append(s, "&test.CustomNameNinEmbeddedStructUnion{") + if this.NidOptNative != nil { + s = append(s, "NidOptNative: "+fmt.Sprintf("%#v", this.NidOptNative)+",\n") + } + if this.FieldA != nil { + s = append(s, "FieldA: "+fmt.Sprintf("%#v", this.FieldA)+",\n") + } + if this.FieldB != nil { + s = append(s, "FieldB: "+valueToGoStringThetest(this.FieldB, "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 *CustomNameEnum) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 6) + s = append(s, "&test.CustomNameEnum{") + if this.FieldA != nil { + s = append(s, "FieldA: "+valueToGoStringThetest(this.FieldA, "test.TheTestEnum")+",\n") + } + if this.FieldB != nil { + s = append(s, "FieldB: "+fmt.Sprintf("%#v", this.FieldB)+",\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 *NoExtensionsMap) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&test.NoExtensionsMap{") + if this.Field1 != nil { + s = append(s, "Field1: "+valueToGoStringThetest(this.Field1, "int64")+",\n") + } + if this.XXX_extensions != nil { + s = append(s, "XXX_extensions: "+fmt.Sprintf("%#v", this.XXX_extensions)+",\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 *Unrecognized) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&test.Unrecognized{") + if this.Field1 != nil { + s = append(s, "Field1: "+valueToGoStringThetest(this.Field1, "string")+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *UnrecognizedWithInner) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 6) + s = append(s, "&test.UnrecognizedWithInner{") + if this.Embedded != nil { + s = append(s, "Embedded: "+fmt.Sprintf("%#v", this.Embedded)+",\n") + } + if this.Field2 != nil { + s = append(s, "Field2: "+valueToGoStringThetest(this.Field2, "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 *UnrecognizedWithInner_Inner) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&test.UnrecognizedWithInner_Inner{") + if this.Field1 != nil { + s = append(s, "Field1: "+valueToGoStringThetest(this.Field1, "uint32")+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *UnrecognizedWithEmbed) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 6) + s = append(s, "&test.UnrecognizedWithEmbed{") + s = append(s, "UnrecognizedWithEmbed_Embedded: "+strings.Replace(this.UnrecognizedWithEmbed_Embedded.GoString(), `&`, ``, 1)+",\n") + if this.Field2 != nil { + s = append(s, "Field2: "+valueToGoStringThetest(this.Field2, "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 *UnrecognizedWithEmbed_Embedded) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&test.UnrecognizedWithEmbed_Embedded{") + if this.Field1 != nil { + s = append(s, "Field1: "+valueToGoStringThetest(this.Field1, "uint32")+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *Node) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 6) + s = append(s, "&test.Node{") + if this.Label != nil { + s = append(s, "Label: "+valueToGoStringThetest(this.Label, "string")+",\n") + } + if this.Children != nil { + s = append(s, "Children: "+fmt.Sprintf("%#v", this.Children)+",\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 valueToGoStringThetest(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 extensionToGoStringThetest(e map[int32]github_com_gogo_protobuf_proto.Extension) string { + if e == nil { + return "nil" + } + s := "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 +} +func NewPopulatedNidOptNative(r randyThetest, easy bool) *NidOptNative { + this := &NidOptNative{} + this.Field1 = float64(r.Float64()) + if r.Intn(2) == 0 { + this.Field1 *= -1 + } + this.Field2 = float32(r.Float32()) + if r.Intn(2) == 0 { + this.Field2 *= -1 + } + this.Field3 = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Field3 *= -1 + } + this.Field4 = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Field4 *= -1 + } + this.Field5 = uint32(r.Uint32()) + this.Field6 = uint64(uint64(r.Uint32())) + this.Field7 = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Field7 *= -1 + } + this.Field8 = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Field8 *= -1 + } + this.Field9 = uint32(r.Uint32()) + this.Field10 = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Field10 *= -1 + } + this.Field11 = uint64(uint64(r.Uint32())) + this.Field12 = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Field12 *= -1 + } + this.Field13 = bool(bool(r.Intn(2) == 0)) + this.Field14 = randStringThetest(r) + v1 := r.Intn(100) + this.Field15 = make([]byte, v1) + for i := 0; i < v1; i++ { + this.Field15[i] = byte(r.Intn(256)) + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 16) + } + return this +} + +func NewPopulatedNinOptNative(r randyThetest, easy bool) *NinOptNative { + this := &NinOptNative{} + if r.Intn(10) != 0 { + v2 := float64(r.Float64()) + if r.Intn(2) == 0 { + v2 *= -1 + } + this.Field1 = &v2 + } + if r.Intn(10) != 0 { + v3 := float32(r.Float32()) + if r.Intn(2) == 0 { + v3 *= -1 + } + this.Field2 = &v3 + } + if r.Intn(10) != 0 { + v4 := int32(r.Int31()) + if r.Intn(2) == 0 { + v4 *= -1 + } + this.Field3 = &v4 + } + if r.Intn(10) != 0 { + v5 := int64(r.Int63()) + if r.Intn(2) == 0 { + v5 *= -1 + } + this.Field4 = &v5 + } + if r.Intn(10) != 0 { + v6 := uint32(r.Uint32()) + this.Field5 = &v6 + } + if r.Intn(10) != 0 { + v7 := uint64(uint64(r.Uint32())) + this.Field6 = &v7 + } + if r.Intn(10) != 0 { + v8 := int32(r.Int31()) + if r.Intn(2) == 0 { + v8 *= -1 + } + this.Field7 = &v8 + } + if r.Intn(10) != 0 { + v9 := int64(r.Int63()) + if r.Intn(2) == 0 { + v9 *= -1 + } + this.Field8 = &v9 + } + if r.Intn(10) != 0 { + v10 := uint32(r.Uint32()) + this.Field9 = &v10 + } + if r.Intn(10) != 0 { + v11 := int32(r.Int31()) + if r.Intn(2) == 0 { + v11 *= -1 + } + this.Field10 = &v11 + } + if r.Intn(10) != 0 { + v12 := uint64(uint64(r.Uint32())) + this.Field11 = &v12 + } + if r.Intn(10) != 0 { + v13 := int64(r.Int63()) + if r.Intn(2) == 0 { + v13 *= -1 + } + this.Field12 = &v13 + } + if r.Intn(10) != 0 { + v14 := bool(bool(r.Intn(2) == 0)) + this.Field13 = &v14 + } + if r.Intn(10) != 0 { + v15 := randStringThetest(r) + this.Field14 = &v15 + } + if r.Intn(10) != 0 { + v16 := r.Intn(100) + this.Field15 = make([]byte, v16) + for i := 0; i < v16; i++ { + this.Field15[i] = byte(r.Intn(256)) + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 16) + } + return this +} + +func NewPopulatedNidRepNative(r randyThetest, easy bool) *NidRepNative { + this := &NidRepNative{} + if r.Intn(10) != 0 { + v17 := r.Intn(10) + this.Field1 = make([]float64, v17) + for i := 0; i < v17; i++ { + this.Field1[i] = float64(r.Float64()) + if r.Intn(2) == 0 { + this.Field1[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v18 := r.Intn(10) + this.Field2 = make([]float32, v18) + for i := 0; i < v18; i++ { + this.Field2[i] = float32(r.Float32()) + if r.Intn(2) == 0 { + this.Field2[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v19 := r.Intn(10) + this.Field3 = make([]int32, v19) + for i := 0; i < v19; i++ { + this.Field3[i] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Field3[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v20 := r.Intn(10) + this.Field4 = make([]int64, v20) + for i := 0; i < v20; i++ { + this.Field4[i] = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Field4[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v21 := r.Intn(10) + this.Field5 = make([]uint32, v21) + for i := 0; i < v21; i++ { + this.Field5[i] = uint32(r.Uint32()) + } + } + if r.Intn(10) != 0 { + v22 := r.Intn(10) + this.Field6 = make([]uint64, v22) + for i := 0; i < v22; i++ { + this.Field6[i] = uint64(uint64(r.Uint32())) + } + } + if r.Intn(10) != 0 { + v23 := r.Intn(10) + this.Field7 = make([]int32, v23) + for i := 0; i < v23; i++ { + this.Field7[i] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Field7[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v24 := r.Intn(10) + this.Field8 = make([]int64, v24) + for i := 0; i < v24; i++ { + this.Field8[i] = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Field8[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v25 := r.Intn(10) + this.Field9 = make([]uint32, v25) + for i := 0; i < v25; i++ { + this.Field9[i] = uint32(r.Uint32()) + } + } + if r.Intn(10) != 0 { + v26 := r.Intn(10) + this.Field10 = make([]int32, v26) + for i := 0; i < v26; i++ { + this.Field10[i] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Field10[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v27 := r.Intn(10) + this.Field11 = make([]uint64, v27) + for i := 0; i < v27; i++ { + this.Field11[i] = uint64(uint64(r.Uint32())) + } + } + if r.Intn(10) != 0 { + v28 := r.Intn(10) + this.Field12 = make([]int64, v28) + for i := 0; i < v28; i++ { + this.Field12[i] = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Field12[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v29 := r.Intn(10) + this.Field13 = make([]bool, v29) + for i := 0; i < v29; i++ { + this.Field13[i] = bool(bool(r.Intn(2) == 0)) + } + } + if r.Intn(10) != 0 { + v30 := r.Intn(10) + this.Field14 = make([]string, v30) + for i := 0; i < v30; i++ { + this.Field14[i] = randStringThetest(r) + } + } + if r.Intn(10) != 0 { + v31 := r.Intn(10) + this.Field15 = make([][]byte, v31) + for i := 0; i < v31; i++ { + v32 := r.Intn(100) + this.Field15[i] = make([]byte, v32) + for j := 0; j < v32; j++ { + this.Field15[i][j] = byte(r.Intn(256)) + } + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 16) + } + return this +} + +func NewPopulatedNinRepNative(r randyThetest, easy bool) *NinRepNative { + this := &NinRepNative{} + if r.Intn(10) != 0 { + v33 := r.Intn(10) + this.Field1 = make([]float64, v33) + for i := 0; i < v33; i++ { + this.Field1[i] = float64(r.Float64()) + if r.Intn(2) == 0 { + this.Field1[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v34 := r.Intn(10) + this.Field2 = make([]float32, v34) + for i := 0; i < v34; i++ { + this.Field2[i] = float32(r.Float32()) + if r.Intn(2) == 0 { + this.Field2[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v35 := r.Intn(10) + this.Field3 = make([]int32, v35) + for i := 0; i < v35; i++ { + this.Field3[i] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Field3[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v36 := r.Intn(10) + this.Field4 = make([]int64, v36) + for i := 0; i < v36; i++ { + this.Field4[i] = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Field4[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v37 := r.Intn(10) + this.Field5 = make([]uint32, v37) + for i := 0; i < v37; i++ { + this.Field5[i] = uint32(r.Uint32()) + } + } + if r.Intn(10) != 0 { + v38 := r.Intn(10) + this.Field6 = make([]uint64, v38) + for i := 0; i < v38; i++ { + this.Field6[i] = uint64(uint64(r.Uint32())) + } + } + if r.Intn(10) != 0 { + v39 := r.Intn(10) + this.Field7 = make([]int32, v39) + for i := 0; i < v39; i++ { + this.Field7[i] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Field7[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v40 := r.Intn(10) + this.Field8 = make([]int64, v40) + for i := 0; i < v40; i++ { + this.Field8[i] = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Field8[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v41 := r.Intn(10) + this.Field9 = make([]uint32, v41) + for i := 0; i < v41; i++ { + this.Field9[i] = uint32(r.Uint32()) + } + } + if r.Intn(10) != 0 { + v42 := r.Intn(10) + this.Field10 = make([]int32, v42) + for i := 0; i < v42; i++ { + this.Field10[i] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Field10[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v43 := r.Intn(10) + this.Field11 = make([]uint64, v43) + for i := 0; i < v43; i++ { + this.Field11[i] = uint64(uint64(r.Uint32())) + } + } + if r.Intn(10) != 0 { + v44 := r.Intn(10) + this.Field12 = make([]int64, v44) + for i := 0; i < v44; i++ { + this.Field12[i] = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Field12[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v45 := r.Intn(10) + this.Field13 = make([]bool, v45) + for i := 0; i < v45; i++ { + this.Field13[i] = bool(bool(r.Intn(2) == 0)) + } + } + if r.Intn(10) != 0 { + v46 := r.Intn(10) + this.Field14 = make([]string, v46) + for i := 0; i < v46; i++ { + this.Field14[i] = randStringThetest(r) + } + } + if r.Intn(10) != 0 { + v47 := r.Intn(10) + this.Field15 = make([][]byte, v47) + for i := 0; i < v47; i++ { + v48 := r.Intn(100) + this.Field15[i] = make([]byte, v48) + for j := 0; j < v48; j++ { + this.Field15[i][j] = byte(r.Intn(256)) + } + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 16) + } + return this +} + +func NewPopulatedNidRepPackedNative(r randyThetest, easy bool) *NidRepPackedNative { + this := &NidRepPackedNative{} + if r.Intn(10) != 0 { + v49 := r.Intn(10) + this.Field1 = make([]float64, v49) + for i := 0; i < v49; i++ { + this.Field1[i] = float64(r.Float64()) + if r.Intn(2) == 0 { + this.Field1[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v50 := r.Intn(10) + this.Field2 = make([]float32, v50) + for i := 0; i < v50; i++ { + this.Field2[i] = float32(r.Float32()) + if r.Intn(2) == 0 { + this.Field2[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v51 := r.Intn(10) + this.Field3 = make([]int32, v51) + for i := 0; i < v51; i++ { + this.Field3[i] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Field3[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v52 := r.Intn(10) + this.Field4 = make([]int64, v52) + for i := 0; i < v52; i++ { + this.Field4[i] = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Field4[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v53 := r.Intn(10) + this.Field5 = make([]uint32, v53) + for i := 0; i < v53; i++ { + this.Field5[i] = uint32(r.Uint32()) + } + } + if r.Intn(10) != 0 { + v54 := r.Intn(10) + this.Field6 = make([]uint64, v54) + for i := 0; i < v54; i++ { + this.Field6[i] = uint64(uint64(r.Uint32())) + } + } + if r.Intn(10) != 0 { + v55 := r.Intn(10) + this.Field7 = make([]int32, v55) + for i := 0; i < v55; i++ { + this.Field7[i] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Field7[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v56 := r.Intn(10) + this.Field8 = make([]int64, v56) + for i := 0; i < v56; i++ { + this.Field8[i] = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Field8[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v57 := r.Intn(10) + this.Field9 = make([]uint32, v57) + for i := 0; i < v57; i++ { + this.Field9[i] = uint32(r.Uint32()) + } + } + if r.Intn(10) != 0 { + v58 := r.Intn(10) + this.Field10 = make([]int32, v58) + for i := 0; i < v58; i++ { + this.Field10[i] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Field10[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v59 := r.Intn(10) + this.Field11 = make([]uint64, v59) + for i := 0; i < v59; i++ { + this.Field11[i] = uint64(uint64(r.Uint32())) + } + } + if r.Intn(10) != 0 { + v60 := r.Intn(10) + this.Field12 = make([]int64, v60) + for i := 0; i < v60; i++ { + this.Field12[i] = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Field12[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v61 := r.Intn(10) + this.Field13 = make([]bool, v61) + for i := 0; i < v61; i++ { + this.Field13[i] = bool(bool(r.Intn(2) == 0)) + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 14) + } + return this +} + +func NewPopulatedNinRepPackedNative(r randyThetest, easy bool) *NinRepPackedNative { + this := &NinRepPackedNative{} + if r.Intn(10) != 0 { + v62 := r.Intn(10) + this.Field1 = make([]float64, v62) + for i := 0; i < v62; i++ { + this.Field1[i] = float64(r.Float64()) + if r.Intn(2) == 0 { + this.Field1[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v63 := r.Intn(10) + this.Field2 = make([]float32, v63) + for i := 0; i < v63; i++ { + this.Field2[i] = float32(r.Float32()) + if r.Intn(2) == 0 { + this.Field2[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v64 := r.Intn(10) + this.Field3 = make([]int32, v64) + for i := 0; i < v64; i++ { + this.Field3[i] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Field3[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v65 := r.Intn(10) + this.Field4 = make([]int64, v65) + for i := 0; i < v65; i++ { + this.Field4[i] = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Field4[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v66 := r.Intn(10) + this.Field5 = make([]uint32, v66) + for i := 0; i < v66; i++ { + this.Field5[i] = uint32(r.Uint32()) + } + } + if r.Intn(10) != 0 { + v67 := r.Intn(10) + this.Field6 = make([]uint64, v67) + for i := 0; i < v67; i++ { + this.Field6[i] = uint64(uint64(r.Uint32())) + } + } + if r.Intn(10) != 0 { + v68 := r.Intn(10) + this.Field7 = make([]int32, v68) + for i := 0; i < v68; i++ { + this.Field7[i] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Field7[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v69 := r.Intn(10) + this.Field8 = make([]int64, v69) + for i := 0; i < v69; i++ { + this.Field8[i] = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Field8[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v70 := r.Intn(10) + this.Field9 = make([]uint32, v70) + for i := 0; i < v70; i++ { + this.Field9[i] = uint32(r.Uint32()) + } + } + if r.Intn(10) != 0 { + v71 := r.Intn(10) + this.Field10 = make([]int32, v71) + for i := 0; i < v71; i++ { + this.Field10[i] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Field10[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v72 := r.Intn(10) + this.Field11 = make([]uint64, v72) + for i := 0; i < v72; i++ { + this.Field11[i] = uint64(uint64(r.Uint32())) + } + } + if r.Intn(10) != 0 { + v73 := r.Intn(10) + this.Field12 = make([]int64, v73) + for i := 0; i < v73; i++ { + this.Field12[i] = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Field12[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v74 := r.Intn(10) + this.Field13 = make([]bool, v74) + for i := 0; i < v74; i++ { + this.Field13[i] = bool(bool(r.Intn(2) == 0)) + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 14) + } + return this +} + +func NewPopulatedNidOptStruct(r randyThetest, easy bool) *NidOptStruct { + this := &NidOptStruct{} + this.Field1 = float64(r.Float64()) + if r.Intn(2) == 0 { + this.Field1 *= -1 + } + this.Field2 = float32(r.Float32()) + if r.Intn(2) == 0 { + this.Field2 *= -1 + } + v75 := NewPopulatedNidOptNative(r, easy) + this.Field3 = *v75 + v76 := NewPopulatedNinOptNative(r, easy) + this.Field4 = *v76 + this.Field6 = uint64(uint64(r.Uint32())) + this.Field7 = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Field7 *= -1 + } + v77 := NewPopulatedNidOptNative(r, easy) + this.Field8 = *v77 + this.Field13 = bool(bool(r.Intn(2) == 0)) + this.Field14 = randStringThetest(r) + v78 := r.Intn(100) + this.Field15 = make([]byte, v78) + for i := 0; i < v78; i++ { + this.Field15[i] = byte(r.Intn(256)) + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 16) + } + return this +} + +func NewPopulatedNinOptStruct(r randyThetest, easy bool) *NinOptStruct { + this := &NinOptStruct{} + if r.Intn(10) != 0 { + v79 := float64(r.Float64()) + if r.Intn(2) == 0 { + v79 *= -1 + } + this.Field1 = &v79 + } + if r.Intn(10) != 0 { + v80 := float32(r.Float32()) + if r.Intn(2) == 0 { + v80 *= -1 + } + this.Field2 = &v80 + } + if r.Intn(10) != 0 { + this.Field3 = NewPopulatedNidOptNative(r, easy) + } + if r.Intn(10) != 0 { + this.Field4 = NewPopulatedNinOptNative(r, easy) + } + if r.Intn(10) != 0 { + v81 := uint64(uint64(r.Uint32())) + this.Field6 = &v81 + } + if r.Intn(10) != 0 { + v82 := int32(r.Int31()) + if r.Intn(2) == 0 { + v82 *= -1 + } + this.Field7 = &v82 + } + if r.Intn(10) != 0 { + this.Field8 = NewPopulatedNidOptNative(r, easy) + } + if r.Intn(10) != 0 { + v83 := bool(bool(r.Intn(2) == 0)) + this.Field13 = &v83 + } + if r.Intn(10) != 0 { + v84 := randStringThetest(r) + this.Field14 = &v84 + } + if r.Intn(10) != 0 { + v85 := r.Intn(100) + this.Field15 = make([]byte, v85) + for i := 0; i < v85; i++ { + this.Field15[i] = byte(r.Intn(256)) + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 16) + } + return this +} + +func NewPopulatedNidRepStruct(r randyThetest, easy bool) *NidRepStruct { + this := &NidRepStruct{} + if r.Intn(10) != 0 { + v86 := r.Intn(10) + this.Field1 = make([]float64, v86) + for i := 0; i < v86; i++ { + this.Field1[i] = float64(r.Float64()) + if r.Intn(2) == 0 { + this.Field1[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v87 := r.Intn(10) + this.Field2 = make([]float32, v87) + for i := 0; i < v87; i++ { + this.Field2[i] = float32(r.Float32()) + if r.Intn(2) == 0 { + this.Field2[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v88 := r.Intn(5) + this.Field3 = make([]NidOptNative, v88) + for i := 0; i < v88; i++ { + v89 := NewPopulatedNidOptNative(r, easy) + this.Field3[i] = *v89 + } + } + if r.Intn(10) != 0 { + v90 := r.Intn(5) + this.Field4 = make([]NinOptNative, v90) + for i := 0; i < v90; i++ { + v91 := NewPopulatedNinOptNative(r, easy) + this.Field4[i] = *v91 + } + } + if r.Intn(10) != 0 { + v92 := r.Intn(10) + this.Field6 = make([]uint64, v92) + for i := 0; i < v92; i++ { + this.Field6[i] = uint64(uint64(r.Uint32())) + } + } + if r.Intn(10) != 0 { + v93 := r.Intn(10) + this.Field7 = make([]int32, v93) + for i := 0; i < v93; i++ { + this.Field7[i] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Field7[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v94 := r.Intn(5) + this.Field8 = make([]NidOptNative, v94) + for i := 0; i < v94; i++ { + v95 := NewPopulatedNidOptNative(r, easy) + this.Field8[i] = *v95 + } + } + if r.Intn(10) != 0 { + v96 := r.Intn(10) + this.Field13 = make([]bool, v96) + for i := 0; i < v96; i++ { + this.Field13[i] = bool(bool(r.Intn(2) == 0)) + } + } + if r.Intn(10) != 0 { + v97 := r.Intn(10) + this.Field14 = make([]string, v97) + for i := 0; i < v97; i++ { + this.Field14[i] = randStringThetest(r) + } + } + if r.Intn(10) != 0 { + v98 := r.Intn(10) + this.Field15 = make([][]byte, v98) + for i := 0; i < v98; i++ { + v99 := r.Intn(100) + this.Field15[i] = make([]byte, v99) + for j := 0; j < v99; j++ { + this.Field15[i][j] = byte(r.Intn(256)) + } + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 16) + } + return this +} + +func NewPopulatedNinRepStruct(r randyThetest, easy bool) *NinRepStruct { + this := &NinRepStruct{} + if r.Intn(10) != 0 { + v100 := r.Intn(10) + this.Field1 = make([]float64, v100) + for i := 0; i < v100; i++ { + this.Field1[i] = float64(r.Float64()) + if r.Intn(2) == 0 { + this.Field1[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v101 := r.Intn(10) + this.Field2 = make([]float32, v101) + for i := 0; i < v101; i++ { + this.Field2[i] = float32(r.Float32()) + if r.Intn(2) == 0 { + this.Field2[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v102 := r.Intn(5) + this.Field3 = make([]*NidOptNative, v102) + for i := 0; i < v102; i++ { + this.Field3[i] = NewPopulatedNidOptNative(r, easy) + } + } + if r.Intn(10) != 0 { + v103 := r.Intn(5) + this.Field4 = make([]*NinOptNative, v103) + for i := 0; i < v103; i++ { + this.Field4[i] = NewPopulatedNinOptNative(r, easy) + } + } + if r.Intn(10) != 0 { + v104 := r.Intn(10) + this.Field6 = make([]uint64, v104) + for i := 0; i < v104; i++ { + this.Field6[i] = uint64(uint64(r.Uint32())) + } + } + if r.Intn(10) != 0 { + v105 := r.Intn(10) + this.Field7 = make([]int32, v105) + for i := 0; i < v105; i++ { + this.Field7[i] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Field7[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v106 := r.Intn(5) + this.Field8 = make([]*NidOptNative, v106) + for i := 0; i < v106; i++ { + this.Field8[i] = NewPopulatedNidOptNative(r, easy) + } + } + if r.Intn(10) != 0 { + v107 := r.Intn(10) + this.Field13 = make([]bool, v107) + for i := 0; i < v107; i++ { + this.Field13[i] = bool(bool(r.Intn(2) == 0)) + } + } + if r.Intn(10) != 0 { + v108 := r.Intn(10) + this.Field14 = make([]string, v108) + for i := 0; i < v108; i++ { + this.Field14[i] = randStringThetest(r) + } + } + if r.Intn(10) != 0 { + v109 := r.Intn(10) + this.Field15 = make([][]byte, v109) + for i := 0; i < v109; i++ { + v110 := r.Intn(100) + this.Field15[i] = make([]byte, v110) + for j := 0; j < v110; j++ { + this.Field15[i][j] = byte(r.Intn(256)) + } + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 16) + } + return this +} + +func NewPopulatedNidEmbeddedStruct(r randyThetest, easy bool) *NidEmbeddedStruct { + this := &NidEmbeddedStruct{} + if r.Intn(10) != 0 { + this.NidOptNative = NewPopulatedNidOptNative(r, easy) + } + v111 := NewPopulatedNidOptNative(r, easy) + this.Field200 = *v111 + this.Field210 = bool(bool(r.Intn(2) == 0)) + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 211) + } + return this +} + +func NewPopulatedNinEmbeddedStruct(r randyThetest, easy bool) *NinEmbeddedStruct { + this := &NinEmbeddedStruct{} + if r.Intn(10) != 0 { + this.NidOptNative = NewPopulatedNidOptNative(r, easy) + } + if r.Intn(10) != 0 { + this.Field200 = NewPopulatedNidOptNative(r, easy) + } + if r.Intn(10) != 0 { + v112 := bool(bool(r.Intn(2) == 0)) + this.Field210 = &v112 + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 211) + } + return this +} + +func NewPopulatedNidNestedStruct(r randyThetest, easy bool) *NidNestedStruct { + this := &NidNestedStruct{} + v113 := NewPopulatedNidOptStruct(r, easy) + this.Field1 = *v113 + if r.Intn(10) != 0 { + v114 := r.Intn(5) + this.Field2 = make([]NidRepStruct, v114) + for i := 0; i < v114; i++ { + v115 := NewPopulatedNidRepStruct(r, easy) + this.Field2[i] = *v115 + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 3) + } + return this +} + +func NewPopulatedNinNestedStruct(r randyThetest, easy bool) *NinNestedStruct { + this := &NinNestedStruct{} + if r.Intn(10) != 0 { + this.Field1 = NewPopulatedNinOptStruct(r, easy) + } + if r.Intn(10) != 0 { + v116 := r.Intn(5) + this.Field2 = make([]*NinRepStruct, v116) + for i := 0; i < v116; i++ { + this.Field2[i] = NewPopulatedNinRepStruct(r, easy) + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 3) + } + return this +} + +func NewPopulatedNidOptCustom(r randyThetest, easy bool) *NidOptCustom { + this := &NidOptCustom{} + v117 := NewPopulatedUuid(r) + this.Id = *v117 + v118 := github_com_gogo_protobuf_test_custom.NewPopulatedUint128(r) + this.Value = *v118 + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 3) + } + return this +} + +func NewPopulatedCustomDash(r randyThetest, easy bool) *CustomDash { + this := &CustomDash{} + if r.Intn(10) != 0 { + this.Value = github_com_gogo_protobuf_test_custom_dash_type.NewPopulatedBytes(r) + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 2) + } + return this +} + +func NewPopulatedNinOptCustom(r randyThetest, easy bool) *NinOptCustom { + this := &NinOptCustom{} + if r.Intn(10) != 0 { + this.Id = NewPopulatedUuid(r) + } + if r.Intn(10) != 0 { + this.Value = github_com_gogo_protobuf_test_custom.NewPopulatedUint128(r) + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 3) + } + return this +} + +func NewPopulatedNidRepCustom(r randyThetest, easy bool) *NidRepCustom { + this := &NidRepCustom{} + if r.Intn(10) != 0 { + v119 := r.Intn(10) + this.Id = make([]Uuid, v119) + for i := 0; i < v119; i++ { + v120 := NewPopulatedUuid(r) + this.Id[i] = *v120 + } + } + if r.Intn(10) != 0 { + v121 := r.Intn(10) + this.Value = make([]github_com_gogo_protobuf_test_custom.Uint128, v121) + for i := 0; i < v121; i++ { + v122 := github_com_gogo_protobuf_test_custom.NewPopulatedUint128(r) + this.Value[i] = *v122 + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 3) + } + return this +} + +func NewPopulatedNinRepCustom(r randyThetest, easy bool) *NinRepCustom { + this := &NinRepCustom{} + if r.Intn(10) != 0 { + v123 := r.Intn(10) + this.Id = make([]Uuid, v123) + for i := 0; i < v123; i++ { + v124 := NewPopulatedUuid(r) + this.Id[i] = *v124 + } + } + if r.Intn(10) != 0 { + v125 := r.Intn(10) + this.Value = make([]github_com_gogo_protobuf_test_custom.Uint128, v125) + for i := 0; i < v125; i++ { + v126 := github_com_gogo_protobuf_test_custom.NewPopulatedUint128(r) + this.Value[i] = *v126 + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 3) + } + return this +} + +func NewPopulatedNinOptNativeUnion(r randyThetest, easy bool) *NinOptNativeUnion { + this := &NinOptNativeUnion{} + fieldNum := r.Intn(9) + switch fieldNum { + case 0: + v127 := float64(r.Float64()) + if r.Intn(2) == 0 { + v127 *= -1 + } + this.Field1 = &v127 + case 1: + v128 := float32(r.Float32()) + if r.Intn(2) == 0 { + v128 *= -1 + } + this.Field2 = &v128 + case 2: + v129 := int32(r.Int31()) + if r.Intn(2) == 0 { + v129 *= -1 + } + this.Field3 = &v129 + case 3: + v130 := int64(r.Int63()) + if r.Intn(2) == 0 { + v130 *= -1 + } + this.Field4 = &v130 + case 4: + v131 := uint32(r.Uint32()) + this.Field5 = &v131 + case 5: + v132 := uint64(uint64(r.Uint32())) + this.Field6 = &v132 + case 6: + v133 := bool(bool(r.Intn(2) == 0)) + this.Field13 = &v133 + case 7: + v134 := randStringThetest(r) + this.Field14 = &v134 + case 8: + v135 := r.Intn(100) + this.Field15 = make([]byte, v135) + for i := 0; i < v135; i++ { + this.Field15[i] = byte(r.Intn(256)) + } + } + return this +} + +func NewPopulatedNinOptStructUnion(r randyThetest, easy bool) *NinOptStructUnion { + this := &NinOptStructUnion{} + fieldNum := r.Intn(9) + switch fieldNum { + case 0: + v136 := float64(r.Float64()) + if r.Intn(2) == 0 { + v136 *= -1 + } + this.Field1 = &v136 + case 1: + v137 := float32(r.Float32()) + if r.Intn(2) == 0 { + v137 *= -1 + } + this.Field2 = &v137 + case 2: + this.Field3 = NewPopulatedNidOptNative(r, easy) + case 3: + this.Field4 = NewPopulatedNinOptNative(r, easy) + case 4: + v138 := uint64(uint64(r.Uint32())) + this.Field6 = &v138 + case 5: + v139 := int32(r.Int31()) + if r.Intn(2) == 0 { + v139 *= -1 + } + this.Field7 = &v139 + case 6: + v140 := bool(bool(r.Intn(2) == 0)) + this.Field13 = &v140 + case 7: + v141 := randStringThetest(r) + this.Field14 = &v141 + case 8: + v142 := r.Intn(100) + this.Field15 = make([]byte, v142) + for i := 0; i < v142; i++ { + this.Field15[i] = byte(r.Intn(256)) + } + } + return this +} + +func NewPopulatedNinEmbeddedStructUnion(r randyThetest, easy bool) *NinEmbeddedStructUnion { + this := &NinEmbeddedStructUnion{} + fieldNum := r.Intn(3) + switch fieldNum { + case 0: + this.NidOptNative = NewPopulatedNidOptNative(r, easy) + case 1: + this.Field200 = NewPopulatedNinOptNative(r, easy) + case 2: + v143 := bool(bool(r.Intn(2) == 0)) + this.Field210 = &v143 + } + return this +} + +func NewPopulatedNinNestedStructUnion(r randyThetest, easy bool) *NinNestedStructUnion { + this := &NinNestedStructUnion{} + fieldNum := r.Intn(3) + switch fieldNum { + case 0: + this.Field1 = NewPopulatedNinOptNativeUnion(r, easy) + case 1: + this.Field2 = NewPopulatedNinOptStructUnion(r, easy) + case 2: + this.Field3 = NewPopulatedNinEmbeddedStructUnion(r, easy) + } + return this +} + +func NewPopulatedTree(r randyThetest, easy bool) *Tree { + this := &Tree{} + fieldNum := r.Intn(102) + switch fieldNum { + case 0: + this.Or = NewPopulatedOrBranch(r, easy) + case 1: + this.And = NewPopulatedAndBranch(r, easy) + case 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101: + this.Leaf = NewPopulatedLeaf(r, easy) + } + return this +} + +func NewPopulatedOrBranch(r randyThetest, easy bool) *OrBranch { + this := &OrBranch{} + v144 := NewPopulatedTree(r, easy) + this.Left = *v144 + v145 := NewPopulatedTree(r, easy) + this.Right = *v145 + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 3) + } + return this +} + +func NewPopulatedAndBranch(r randyThetest, easy bool) *AndBranch { + this := &AndBranch{} + v146 := NewPopulatedTree(r, easy) + this.Left = *v146 + v147 := NewPopulatedTree(r, easy) + this.Right = *v147 + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 3) + } + return this +} + +func NewPopulatedLeaf(r randyThetest, easy bool) *Leaf { + this := &Leaf{} + this.Value = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Value *= -1 + } + this.StrValue = randStringThetest(r) + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 3) + } + return this +} + +func NewPopulatedDeepTree(r randyThetest, easy bool) *DeepTree { + this := &DeepTree{} + fieldNum := r.Intn(102) + switch fieldNum { + case 0: + this.Down = NewPopulatedADeepBranch(r, easy) + case 1: + this.And = NewPopulatedAndDeepBranch(r, easy) + case 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101: + this.Leaf = NewPopulatedDeepLeaf(r, easy) + } + return this +} + +func NewPopulatedADeepBranch(r randyThetest, easy bool) *ADeepBranch { + this := &ADeepBranch{} + v148 := NewPopulatedDeepTree(r, easy) + this.Down = *v148 + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 3) + } + return this +} + +func NewPopulatedAndDeepBranch(r randyThetest, easy bool) *AndDeepBranch { + this := &AndDeepBranch{} + v149 := NewPopulatedDeepTree(r, easy) + this.Left = *v149 + v150 := NewPopulatedDeepTree(r, easy) + this.Right = *v150 + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 3) + } + return this +} + +func NewPopulatedDeepLeaf(r randyThetest, easy bool) *DeepLeaf { + this := &DeepLeaf{} + v151 := NewPopulatedTree(r, easy) + this.Tree = *v151 + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 2) + } + return this +} + +func NewPopulatedNil(r randyThetest, easy bool) *Nil { + this := &Nil{} + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 1) + } + return this +} + +func NewPopulatedNidOptEnum(r randyThetest, easy bool) *NidOptEnum { + this := &NidOptEnum{} + this.Field1 = TheTestEnum([]int32{0, 1, 2}[r.Intn(3)]) + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 2) + } + return this +} + +func NewPopulatedNinOptEnum(r randyThetest, easy bool) *NinOptEnum { + this := &NinOptEnum{} + if r.Intn(10) != 0 { + v152 := TheTestEnum([]int32{0, 1, 2}[r.Intn(3)]) + this.Field1 = &v152 + } + if r.Intn(10) != 0 { + v153 := YetAnotherTestEnum([]int32{0, 1}[r.Intn(2)]) + this.Field2 = &v153 + } + if r.Intn(10) != 0 { + v154 := YetYetAnotherTestEnum([]int32{0, 1}[r.Intn(2)]) + this.Field3 = &v154 + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 4) + } + return this +} + +func NewPopulatedNidRepEnum(r randyThetest, easy bool) *NidRepEnum { + this := &NidRepEnum{} + if r.Intn(10) != 0 { + v155 := r.Intn(10) + this.Field1 = make([]TheTestEnum, v155) + for i := 0; i < v155; i++ { + this.Field1[i] = TheTestEnum([]int32{0, 1, 2}[r.Intn(3)]) + } + } + if r.Intn(10) != 0 { + v156 := r.Intn(10) + this.Field2 = make([]YetAnotherTestEnum, v156) + for i := 0; i < v156; i++ { + this.Field2[i] = YetAnotherTestEnum([]int32{0, 1}[r.Intn(2)]) + } + } + if r.Intn(10) != 0 { + v157 := r.Intn(10) + this.Field3 = make([]YetYetAnotherTestEnum, v157) + for i := 0; i < v157; i++ { + this.Field3[i] = YetYetAnotherTestEnum([]int32{0, 1}[r.Intn(2)]) + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 4) + } + return this +} + +func NewPopulatedNinRepEnum(r randyThetest, easy bool) *NinRepEnum { + this := &NinRepEnum{} + if r.Intn(10) != 0 { + v158 := r.Intn(10) + this.Field1 = make([]TheTestEnum, v158) + for i := 0; i < v158; i++ { + this.Field1[i] = TheTestEnum([]int32{0, 1, 2}[r.Intn(3)]) + } + } + if r.Intn(10) != 0 { + v159 := r.Intn(10) + this.Field2 = make([]YetAnotherTestEnum, v159) + for i := 0; i < v159; i++ { + this.Field2[i] = YetAnotherTestEnum([]int32{0, 1}[r.Intn(2)]) + } + } + if r.Intn(10) != 0 { + v160 := r.Intn(10) + this.Field3 = make([]YetYetAnotherTestEnum, v160) + for i := 0; i < v160; i++ { + this.Field3[i] = YetYetAnotherTestEnum([]int32{0, 1}[r.Intn(2)]) + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 4) + } + return this +} + +func NewPopulatedNinOptEnumDefault(r randyThetest, easy bool) *NinOptEnumDefault { + this := &NinOptEnumDefault{} + if r.Intn(10) != 0 { + v161 := TheTestEnum([]int32{0, 1, 2}[r.Intn(3)]) + this.Field1 = &v161 + } + if r.Intn(10) != 0 { + v162 := YetAnotherTestEnum([]int32{0, 1}[r.Intn(2)]) + this.Field2 = &v162 + } + if r.Intn(10) != 0 { + v163 := YetYetAnotherTestEnum([]int32{0, 1}[r.Intn(2)]) + this.Field3 = &v163 + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 4) + } + return this +} + +func NewPopulatedAnotherNinOptEnum(r randyThetest, easy bool) *AnotherNinOptEnum { + this := &AnotherNinOptEnum{} + if r.Intn(10) != 0 { + v164 := AnotherTestEnum([]int32{10, 11}[r.Intn(2)]) + this.Field1 = &v164 + } + if r.Intn(10) != 0 { + v165 := YetAnotherTestEnum([]int32{0, 1}[r.Intn(2)]) + this.Field2 = &v165 + } + if r.Intn(10) != 0 { + v166 := YetYetAnotherTestEnum([]int32{0, 1}[r.Intn(2)]) + this.Field3 = &v166 + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 4) + } + return this +} + +func NewPopulatedAnotherNinOptEnumDefault(r randyThetest, easy bool) *AnotherNinOptEnumDefault { + this := &AnotherNinOptEnumDefault{} + if r.Intn(10) != 0 { + v167 := AnotherTestEnum([]int32{10, 11}[r.Intn(2)]) + this.Field1 = &v167 + } + if r.Intn(10) != 0 { + v168 := YetAnotherTestEnum([]int32{0, 1}[r.Intn(2)]) + this.Field2 = &v168 + } + if r.Intn(10) != 0 { + v169 := YetYetAnotherTestEnum([]int32{0, 1}[r.Intn(2)]) + this.Field3 = &v169 + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 4) + } + return this +} + +func NewPopulatedTimer(r randyThetest, easy bool) *Timer { + this := &Timer{} + this.Time1 = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Time1 *= -1 + } + this.Time2 = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Time2 *= -1 + } + v170 := r.Intn(100) + this.Data = make([]byte, v170) + for i := 0; i < v170; i++ { + this.Data[i] = byte(r.Intn(256)) + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 4) + } + return this +} + +func NewPopulatedMyExtendable(r randyThetest, easy bool) *MyExtendable { + this := &MyExtendable{} + if r.Intn(10) != 0 { + v171 := int64(r.Int63()) + if r.Intn(2) == 0 { + v171 *= -1 + } + this.Field1 = &v171 + } + if !easy && r.Intn(10) != 0 { + l := r.Intn(5) + for i := 0; i < l; i++ { + fieldNumber := r.Intn(100) + 100 + wire := r.Intn(4) + if wire == 3 { + wire = 5 + } + data := randFieldThetest(nil, r, fieldNumber, wire) + github_com_gogo_protobuf_proto.SetRawExtension(this, int32(fieldNumber), data) + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 201) + } + return this +} + +func NewPopulatedOtherExtenable(r randyThetest, easy bool) *OtherExtenable { + this := &OtherExtenable{} + if r.Intn(10) != 0 { + v172 := int64(r.Int63()) + if r.Intn(2) == 0 { + v172 *= -1 + } + this.Field2 = &v172 + } + if r.Intn(10) != 0 { + v173 := int64(r.Int63()) + if r.Intn(2) == 0 { + v173 *= -1 + } + this.Field13 = &v173 + } + if r.Intn(10) != 0 { + this.M = NewPopulatedMyExtendable(r, easy) + } + if !easy && r.Intn(10) != 0 { + l := r.Intn(5) + for i := 0; i < l; i++ { + eIndex := r.Intn(2) + fieldNumber := 0 + switch eIndex { + case 0: + fieldNumber = r.Intn(3) + 14 + case 1: + fieldNumber = r.Intn(3) + 10 + } + wire := r.Intn(4) + if wire == 3 { + wire = 5 + } + data := randFieldThetest(nil, r, fieldNumber, wire) + github_com_gogo_protobuf_proto.SetRawExtension(this, int32(fieldNumber), data) + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 18) + } + return this +} + +func NewPopulatedNestedDefinition(r randyThetest, easy bool) *NestedDefinition { + this := &NestedDefinition{} + if r.Intn(10) != 0 { + v174 := int64(r.Int63()) + if r.Intn(2) == 0 { + v174 *= -1 + } + this.Field1 = &v174 + } + if r.Intn(10) != 0 { + v175 := NestedDefinition_NestedEnum([]int32{1}[r.Intn(1)]) + this.EnumField = &v175 + } + if r.Intn(10) != 0 { + this.NNM = NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(r, easy) + } + if r.Intn(10) != 0 { + this.NM = NewPopulatedNestedDefinition_NestedMessage(r, easy) + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 5) + } + return this +} + +func NewPopulatedNestedDefinition_NestedMessage(r randyThetest, easy bool) *NestedDefinition_NestedMessage { + this := &NestedDefinition_NestedMessage{} + if r.Intn(10) != 0 { + v176 := uint64(uint64(r.Uint32())) + this.NestedField1 = &v176 + } + if r.Intn(10) != 0 { + this.NNM = NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(r, easy) + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 3) + } + return this +} + +func NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(r randyThetest, easy bool) *NestedDefinition_NestedMessage_NestedNestedMsg { + this := &NestedDefinition_NestedMessage_NestedNestedMsg{} + if r.Intn(10) != 0 { + v177 := randStringThetest(r) + this.NestedNestedField1 = &v177 + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 11) + } + return this +} + +func NewPopulatedNestedScope(r randyThetest, easy bool) *NestedScope { + this := &NestedScope{} + if r.Intn(10) != 0 { + this.A = NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(r, easy) + } + if r.Intn(10) != 0 { + v178 := NestedDefinition_NestedEnum([]int32{1}[r.Intn(1)]) + this.B = &v178 + } + if r.Intn(10) != 0 { + this.C = NewPopulatedNestedDefinition_NestedMessage(r, easy) + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 4) + } + return this +} + +func NewPopulatedNinOptNativeDefault(r randyThetest, easy bool) *NinOptNativeDefault { + this := &NinOptNativeDefault{} + if r.Intn(10) != 0 { + v179 := float64(r.Float64()) + if r.Intn(2) == 0 { + v179 *= -1 + } + this.Field1 = &v179 + } + if r.Intn(10) != 0 { + v180 := float32(r.Float32()) + if r.Intn(2) == 0 { + v180 *= -1 + } + this.Field2 = &v180 + } + if r.Intn(10) != 0 { + v181 := int32(r.Int31()) + if r.Intn(2) == 0 { + v181 *= -1 + } + this.Field3 = &v181 + } + if r.Intn(10) != 0 { + v182 := int64(r.Int63()) + if r.Intn(2) == 0 { + v182 *= -1 + } + this.Field4 = &v182 + } + if r.Intn(10) != 0 { + v183 := uint32(r.Uint32()) + this.Field5 = &v183 + } + if r.Intn(10) != 0 { + v184 := uint64(uint64(r.Uint32())) + this.Field6 = &v184 + } + if r.Intn(10) != 0 { + v185 := int32(r.Int31()) + if r.Intn(2) == 0 { + v185 *= -1 + } + this.Field7 = &v185 + } + if r.Intn(10) != 0 { + v186 := int64(r.Int63()) + if r.Intn(2) == 0 { + v186 *= -1 + } + this.Field8 = &v186 + } + if r.Intn(10) != 0 { + v187 := uint32(r.Uint32()) + this.Field9 = &v187 + } + if r.Intn(10) != 0 { + v188 := int32(r.Int31()) + if r.Intn(2) == 0 { + v188 *= -1 + } + this.Field10 = &v188 + } + if r.Intn(10) != 0 { + v189 := uint64(uint64(r.Uint32())) + this.Field11 = &v189 + } + if r.Intn(10) != 0 { + v190 := int64(r.Int63()) + if r.Intn(2) == 0 { + v190 *= -1 + } + this.Field12 = &v190 + } + if r.Intn(10) != 0 { + v191 := bool(bool(r.Intn(2) == 0)) + this.Field13 = &v191 + } + if r.Intn(10) != 0 { + v192 := randStringThetest(r) + this.Field14 = &v192 + } + if r.Intn(10) != 0 { + v193 := r.Intn(100) + this.Field15 = make([]byte, v193) + for i := 0; i < v193; i++ { + this.Field15[i] = byte(r.Intn(256)) + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 16) + } + return this +} + +func NewPopulatedCustomContainer(r randyThetest, easy bool) *CustomContainer { + this := &CustomContainer{} + v194 := NewPopulatedNidOptCustom(r, easy) + this.CustomStruct = *v194 + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 2) + } + return this +} + +func NewPopulatedCustomNameNidOptNative(r randyThetest, easy bool) *CustomNameNidOptNative { + this := &CustomNameNidOptNative{} + this.FieldA = float64(r.Float64()) + if r.Intn(2) == 0 { + this.FieldA *= -1 + } + this.FieldB = float32(r.Float32()) + if r.Intn(2) == 0 { + this.FieldB *= -1 + } + this.FieldC = int32(r.Int31()) + if r.Intn(2) == 0 { + this.FieldC *= -1 + } + this.FieldD = int64(r.Int63()) + if r.Intn(2) == 0 { + this.FieldD *= -1 + } + this.FieldE = uint32(r.Uint32()) + this.FieldF = uint64(uint64(r.Uint32())) + this.FieldG = int32(r.Int31()) + if r.Intn(2) == 0 { + this.FieldG *= -1 + } + this.FieldH = int64(r.Int63()) + if r.Intn(2) == 0 { + this.FieldH *= -1 + } + this.FieldI = uint32(r.Uint32()) + this.FieldJ = int32(r.Int31()) + if r.Intn(2) == 0 { + this.FieldJ *= -1 + } + this.FieldK = uint64(uint64(r.Uint32())) + this.FieldL = int64(r.Int63()) + if r.Intn(2) == 0 { + this.FieldL *= -1 + } + this.FieldM = bool(bool(r.Intn(2) == 0)) + this.FieldN = randStringThetest(r) + v195 := r.Intn(100) + this.FieldO = make([]byte, v195) + for i := 0; i < v195; i++ { + this.FieldO[i] = byte(r.Intn(256)) + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 16) + } + return this +} + +func NewPopulatedCustomNameNinOptNative(r randyThetest, easy bool) *CustomNameNinOptNative { + this := &CustomNameNinOptNative{} + if r.Intn(10) != 0 { + v196 := float64(r.Float64()) + if r.Intn(2) == 0 { + v196 *= -1 + } + this.FieldA = &v196 + } + if r.Intn(10) != 0 { + v197 := float32(r.Float32()) + if r.Intn(2) == 0 { + v197 *= -1 + } + this.FieldB = &v197 + } + if r.Intn(10) != 0 { + v198 := int32(r.Int31()) + if r.Intn(2) == 0 { + v198 *= -1 + } + this.FieldC = &v198 + } + if r.Intn(10) != 0 { + v199 := int64(r.Int63()) + if r.Intn(2) == 0 { + v199 *= -1 + } + this.FieldD = &v199 + } + if r.Intn(10) != 0 { + v200 := uint32(r.Uint32()) + this.FieldE = &v200 + } + if r.Intn(10) != 0 { + v201 := uint64(uint64(r.Uint32())) + this.FieldF = &v201 + } + if r.Intn(10) != 0 { + v202 := int32(r.Int31()) + if r.Intn(2) == 0 { + v202 *= -1 + } + this.FieldG = &v202 + } + if r.Intn(10) != 0 { + v203 := int64(r.Int63()) + if r.Intn(2) == 0 { + v203 *= -1 + } + this.FieldH = &v203 + } + if r.Intn(10) != 0 { + v204 := uint32(r.Uint32()) + this.FieldI = &v204 + } + if r.Intn(10) != 0 { + v205 := int32(r.Int31()) + if r.Intn(2) == 0 { + v205 *= -1 + } + this.FieldJ = &v205 + } + if r.Intn(10) != 0 { + v206 := uint64(uint64(r.Uint32())) + this.FieldK = &v206 + } + if r.Intn(10) != 0 { + v207 := int64(r.Int63()) + if r.Intn(2) == 0 { + v207 *= -1 + } + this.FielL = &v207 + } + if r.Intn(10) != 0 { + v208 := bool(bool(r.Intn(2) == 0)) + this.FieldM = &v208 + } + if r.Intn(10) != 0 { + v209 := randStringThetest(r) + this.FieldN = &v209 + } + if r.Intn(10) != 0 { + v210 := r.Intn(100) + this.FieldO = make([]byte, v210) + for i := 0; i < v210; i++ { + this.FieldO[i] = byte(r.Intn(256)) + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 16) + } + return this +} + +func NewPopulatedCustomNameNinRepNative(r randyThetest, easy bool) *CustomNameNinRepNative { + this := &CustomNameNinRepNative{} + if r.Intn(10) != 0 { + v211 := r.Intn(10) + this.FieldA = make([]float64, v211) + for i := 0; i < v211; i++ { + this.FieldA[i] = float64(r.Float64()) + if r.Intn(2) == 0 { + this.FieldA[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v212 := r.Intn(10) + this.FieldB = make([]float32, v212) + for i := 0; i < v212; i++ { + this.FieldB[i] = float32(r.Float32()) + if r.Intn(2) == 0 { + this.FieldB[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v213 := r.Intn(10) + this.FieldC = make([]int32, v213) + for i := 0; i < v213; i++ { + this.FieldC[i] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.FieldC[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v214 := r.Intn(10) + this.FieldD = make([]int64, v214) + for i := 0; i < v214; i++ { + this.FieldD[i] = int64(r.Int63()) + if r.Intn(2) == 0 { + this.FieldD[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v215 := r.Intn(10) + this.FieldE = make([]uint32, v215) + for i := 0; i < v215; i++ { + this.FieldE[i] = uint32(r.Uint32()) + } + } + if r.Intn(10) != 0 { + v216 := r.Intn(10) + this.FieldF = make([]uint64, v216) + for i := 0; i < v216; i++ { + this.FieldF[i] = uint64(uint64(r.Uint32())) + } + } + if r.Intn(10) != 0 { + v217 := r.Intn(10) + this.FieldG = make([]int32, v217) + for i := 0; i < v217; i++ { + this.FieldG[i] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.FieldG[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v218 := r.Intn(10) + this.FieldH = make([]int64, v218) + for i := 0; i < v218; i++ { + this.FieldH[i] = int64(r.Int63()) + if r.Intn(2) == 0 { + this.FieldH[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v219 := r.Intn(10) + this.FieldI = make([]uint32, v219) + for i := 0; i < v219; i++ { + this.FieldI[i] = uint32(r.Uint32()) + } + } + if r.Intn(10) != 0 { + v220 := r.Intn(10) + this.FieldJ = make([]int32, v220) + for i := 0; i < v220; i++ { + this.FieldJ[i] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.FieldJ[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v221 := r.Intn(10) + this.FieldK = make([]uint64, v221) + for i := 0; i < v221; i++ { + this.FieldK[i] = uint64(uint64(r.Uint32())) + } + } + if r.Intn(10) != 0 { + v222 := r.Intn(10) + this.FieldL = make([]int64, v222) + for i := 0; i < v222; i++ { + this.FieldL[i] = int64(r.Int63()) + if r.Intn(2) == 0 { + this.FieldL[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v223 := r.Intn(10) + this.FieldM = make([]bool, v223) + for i := 0; i < v223; i++ { + this.FieldM[i] = bool(bool(r.Intn(2) == 0)) + } + } + if r.Intn(10) != 0 { + v224 := r.Intn(10) + this.FieldN = make([]string, v224) + for i := 0; i < v224; i++ { + this.FieldN[i] = randStringThetest(r) + } + } + if r.Intn(10) != 0 { + v225 := r.Intn(10) + this.FieldO = make([][]byte, v225) + for i := 0; i < v225; i++ { + v226 := r.Intn(100) + this.FieldO[i] = make([]byte, v226) + for j := 0; j < v226; j++ { + this.FieldO[i][j] = byte(r.Intn(256)) + } + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 16) + } + return this +} + +func NewPopulatedCustomNameNinStruct(r randyThetest, easy bool) *CustomNameNinStruct { + this := &CustomNameNinStruct{} + if r.Intn(10) != 0 { + v227 := float64(r.Float64()) + if r.Intn(2) == 0 { + v227 *= -1 + } + this.FieldA = &v227 + } + if r.Intn(10) != 0 { + v228 := float32(r.Float32()) + if r.Intn(2) == 0 { + v228 *= -1 + } + this.FieldB = &v228 + } + if r.Intn(10) != 0 { + this.FieldC = NewPopulatedNidOptNative(r, easy) + } + if r.Intn(10) != 0 { + v229 := r.Intn(5) + this.FieldD = make([]*NinOptNative, v229) + for i := 0; i < v229; i++ { + this.FieldD[i] = NewPopulatedNinOptNative(r, easy) + } + } + if r.Intn(10) != 0 { + v230 := uint64(uint64(r.Uint32())) + this.FieldE = &v230 + } + if r.Intn(10) != 0 { + v231 := int32(r.Int31()) + if r.Intn(2) == 0 { + v231 *= -1 + } + this.FieldF = &v231 + } + if r.Intn(10) != 0 { + this.FieldG = NewPopulatedNidOptNative(r, easy) + } + if r.Intn(10) != 0 { + v232 := bool(bool(r.Intn(2) == 0)) + this.FieldH = &v232 + } + if r.Intn(10) != 0 { + v233 := randStringThetest(r) + this.FieldI = &v233 + } + if r.Intn(10) != 0 { + v234 := r.Intn(100) + this.FieldJ = make([]byte, v234) + for i := 0; i < v234; i++ { + this.FieldJ[i] = byte(r.Intn(256)) + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 16) + } + return this +} + +func NewPopulatedCustomNameCustomType(r randyThetest, easy bool) *CustomNameCustomType { + this := &CustomNameCustomType{} + if r.Intn(10) != 0 { + this.FieldA = NewPopulatedUuid(r) + } + if r.Intn(10) != 0 { + this.FieldB = github_com_gogo_protobuf_test_custom.NewPopulatedUint128(r) + } + if r.Intn(10) != 0 { + v235 := r.Intn(10) + this.FieldC = make([]Uuid, v235) + for i := 0; i < v235; i++ { + v236 := NewPopulatedUuid(r) + this.FieldC[i] = *v236 + } + } + if r.Intn(10) != 0 { + v237 := r.Intn(10) + this.FieldD = make([]github_com_gogo_protobuf_test_custom.Uint128, v237) + for i := 0; i < v237; i++ { + v238 := github_com_gogo_protobuf_test_custom.NewPopulatedUint128(r) + this.FieldD[i] = *v238 + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 5) + } + return this +} + +func NewPopulatedCustomNameNinEmbeddedStructUnion(r randyThetest, easy bool) *CustomNameNinEmbeddedStructUnion { + this := &CustomNameNinEmbeddedStructUnion{} + fieldNum := r.Intn(3) + switch fieldNum { + case 0: + this.NidOptNative = NewPopulatedNidOptNative(r, easy) + case 1: + this.FieldA = NewPopulatedNinOptNative(r, easy) + case 2: + v239 := bool(bool(r.Intn(2) == 0)) + this.FieldB = &v239 + } + return this +} + +func NewPopulatedCustomNameEnum(r randyThetest, easy bool) *CustomNameEnum { + this := &CustomNameEnum{} + if r.Intn(10) != 0 { + v240 := TheTestEnum([]int32{0, 1, 2}[r.Intn(3)]) + this.FieldA = &v240 + } + if r.Intn(10) != 0 { + v241 := r.Intn(10) + this.FieldB = make([]TheTestEnum, v241) + for i := 0; i < v241; i++ { + this.FieldB[i] = TheTestEnum([]int32{0, 1, 2}[r.Intn(3)]) + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 3) + } + return this +} + +func NewPopulatedNoExtensionsMap(r randyThetest, easy bool) *NoExtensionsMap { + this := &NoExtensionsMap{} + if r.Intn(10) != 0 { + v242 := int64(r.Int63()) + if r.Intn(2) == 0 { + v242 *= -1 + } + this.Field1 = &v242 + } + if !easy && r.Intn(10) != 0 { + l := r.Intn(5) + for i := 0; i < l; i++ { + fieldNumber := r.Intn(100) + 100 + wire := r.Intn(4) + if wire == 3 { + wire = 5 + } + data := randFieldThetest(nil, r, fieldNumber, wire) + github_com_gogo_protobuf_proto.SetRawExtension(this, int32(fieldNumber), data) + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 201) + } + return this +} + +func NewPopulatedUnrecognized(r randyThetest, easy bool) *Unrecognized { + this := &Unrecognized{} + if r.Intn(10) != 0 { + v243 := randStringThetest(r) + this.Field1 = &v243 + } + if !easy && r.Intn(10) != 0 { + } + return this +} + +func NewPopulatedUnrecognizedWithInner(r randyThetest, easy bool) *UnrecognizedWithInner { + this := &UnrecognizedWithInner{} + if r.Intn(10) != 0 { + v244 := r.Intn(5) + this.Embedded = make([]*UnrecognizedWithInner_Inner, v244) + for i := 0; i < v244; i++ { + this.Embedded[i] = NewPopulatedUnrecognizedWithInner_Inner(r, easy) + } + } + if r.Intn(10) != 0 { + v245 := randStringThetest(r) + this.Field2 = &v245 + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 3) + } + return this +} + +func NewPopulatedUnrecognizedWithInner_Inner(r randyThetest, easy bool) *UnrecognizedWithInner_Inner { + this := &UnrecognizedWithInner_Inner{} + if r.Intn(10) != 0 { + v246 := uint32(r.Uint32()) + this.Field1 = &v246 + } + if !easy && r.Intn(10) != 0 { + } + return this +} + +func NewPopulatedUnrecognizedWithEmbed(r randyThetest, easy bool) *UnrecognizedWithEmbed { + this := &UnrecognizedWithEmbed{} + v247 := NewPopulatedUnrecognizedWithEmbed_Embedded(r, easy) + this.UnrecognizedWithEmbed_Embedded = *v247 + if r.Intn(10) != 0 { + v248 := randStringThetest(r) + this.Field2 = &v248 + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 3) + } + return this +} + +func NewPopulatedUnrecognizedWithEmbed_Embedded(r randyThetest, easy bool) *UnrecognizedWithEmbed_Embedded { + this := &UnrecognizedWithEmbed_Embedded{} + if r.Intn(10) != 0 { + v249 := uint32(r.Uint32()) + this.Field1 = &v249 + } + if !easy && r.Intn(10) != 0 { + } + return this +} + +func NewPopulatedNode(r randyThetest, easy bool) *Node { + this := &Node{} + if r.Intn(10) != 0 { + v250 := randStringThetest(r) + this.Label = &v250 + } + if r.Intn(10) == 0 { + v251 := r.Intn(5) + this.Children = make([]*Node, v251) + for i := 0; i < v251; i++ { + this.Children[i] = NewPopulatedNode(r, easy) + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 3) + } + return this +} + +type randyThetest interface { + Float32() float32 + Float64() float64 + Int63() int64 + Int31() int32 + Uint32() uint32 + Intn(n int) int +} + +func randUTF8RuneThetest(r randyThetest) 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 randStringThetest(r randyThetest) string { + v252 := r.Intn(100) + tmps := make([]rune, v252) + for i := 0; i < v252; i++ { + tmps[i] = randUTF8RuneThetest(r) + } + return string(tmps) +} +func randUnrecognizedThetest(r randyThetest, 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 = randFieldThetest(data, r, fieldNumber, wire) + } + return data +} +func randFieldThetest(data []byte, r randyThetest, fieldNumber int, wire int) []byte { + key := uint32(fieldNumber)<<3 | uint32(wire) + switch wire { + case 0: + data = encodeVarintPopulateThetest(data, uint64(key)) + v253 := r.Int63() + if r.Intn(2) == 0 { + v253 *= -1 + } + data = encodeVarintPopulateThetest(data, uint64(v253)) + case 1: + data = encodeVarintPopulateThetest(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 = encodeVarintPopulateThetest(data, uint64(key)) + ll := r.Intn(100) + data = encodeVarintPopulateThetest(data, uint64(ll)) + for j := 0; j < ll; j++ { + data = append(data, byte(r.Intn(256))) + } + default: + data = encodeVarintPopulateThetest(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 encodeVarintPopulateThetest(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 *NidOptNative) Size() (n int) { + var l int + _ = l + n += 9 + n += 5 + n += 1 + sovThetest(uint64(m.Field3)) + n += 1 + sovThetest(uint64(m.Field4)) + n += 1 + sovThetest(uint64(m.Field5)) + n += 1 + sovThetest(uint64(m.Field6)) + n += 1 + sozThetest(uint64(m.Field7)) + n += 1 + sozThetest(uint64(m.Field8)) + n += 5 + n += 5 + n += 9 + n += 9 + n += 2 + l = len(m.Field14) + n += 1 + l + sovThetest(uint64(l)) + if m.Field15 != nil { + l = len(m.Field15) + n += 1 + l + sovThetest(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NinOptNative) Size() (n int) { + var l int + _ = l + if m.Field1 != nil { + n += 9 + } + if m.Field2 != nil { + n += 5 + } + if m.Field3 != nil { + n += 1 + sovThetest(uint64(*m.Field3)) + } + if m.Field4 != nil { + n += 1 + sovThetest(uint64(*m.Field4)) + } + if m.Field5 != nil { + n += 1 + sovThetest(uint64(*m.Field5)) + } + if m.Field6 != nil { + n += 1 + sovThetest(uint64(*m.Field6)) + } + if m.Field7 != nil { + n += 1 + sozThetest(uint64(*m.Field7)) + } + if m.Field8 != nil { + n += 1 + sozThetest(uint64(*m.Field8)) + } + if m.Field9 != nil { + n += 5 + } + if m.Field10 != nil { + n += 5 + } + if m.Field11 != nil { + n += 9 + } + if m.Field12 != nil { + n += 9 + } + if m.Field13 != nil { + n += 2 + } + if m.Field14 != nil { + l = len(*m.Field14) + n += 1 + l + sovThetest(uint64(l)) + } + if m.Field15 != nil { + l = len(m.Field15) + n += 1 + l + sovThetest(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NidRepNative) Size() (n int) { + var l int + _ = l + if len(m.Field1) > 0 { + n += 9 * len(m.Field1) + } + if len(m.Field2) > 0 { + n += 5 * len(m.Field2) + } + if len(m.Field3) > 0 { + for _, e := range m.Field3 { + n += 1 + sovThetest(uint64(e)) + } + } + if len(m.Field4) > 0 { + for _, e := range m.Field4 { + n += 1 + sovThetest(uint64(e)) + } + } + if len(m.Field5) > 0 { + for _, e := range m.Field5 { + n += 1 + sovThetest(uint64(e)) + } + } + if len(m.Field6) > 0 { + for _, e := range m.Field6 { + n += 1 + sovThetest(uint64(e)) + } + } + if len(m.Field7) > 0 { + for _, e := range m.Field7 { + n += 1 + sozThetest(uint64(e)) + } + } + if len(m.Field8) > 0 { + for _, e := range m.Field8 { + n += 1 + sozThetest(uint64(e)) + } + } + if len(m.Field9) > 0 { + n += 5 * len(m.Field9) + } + if len(m.Field10) > 0 { + n += 5 * len(m.Field10) + } + if len(m.Field11) > 0 { + n += 9 * len(m.Field11) + } + if len(m.Field12) > 0 { + n += 9 * len(m.Field12) + } + if len(m.Field13) > 0 { + n += 2 * len(m.Field13) + } + if len(m.Field14) > 0 { + for _, s := range m.Field14 { + l = len(s) + n += 1 + l + sovThetest(uint64(l)) + } + } + if len(m.Field15) > 0 { + for _, b := range m.Field15 { + l = len(b) + n += 1 + l + sovThetest(uint64(l)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NinRepNative) Size() (n int) { + var l int + _ = l + if len(m.Field1) > 0 { + n += 9 * len(m.Field1) + } + if len(m.Field2) > 0 { + n += 5 * len(m.Field2) + } + if len(m.Field3) > 0 { + for _, e := range m.Field3 { + n += 1 + sovThetest(uint64(e)) + } + } + if len(m.Field4) > 0 { + for _, e := range m.Field4 { + n += 1 + sovThetest(uint64(e)) + } + } + if len(m.Field5) > 0 { + for _, e := range m.Field5 { + n += 1 + sovThetest(uint64(e)) + } + } + if len(m.Field6) > 0 { + for _, e := range m.Field6 { + n += 1 + sovThetest(uint64(e)) + } + } + if len(m.Field7) > 0 { + for _, e := range m.Field7 { + n += 1 + sozThetest(uint64(e)) + } + } + if len(m.Field8) > 0 { + for _, e := range m.Field8 { + n += 1 + sozThetest(uint64(e)) + } + } + if len(m.Field9) > 0 { + n += 5 * len(m.Field9) + } + if len(m.Field10) > 0 { + n += 5 * len(m.Field10) + } + if len(m.Field11) > 0 { + n += 9 * len(m.Field11) + } + if len(m.Field12) > 0 { + n += 9 * len(m.Field12) + } + if len(m.Field13) > 0 { + n += 2 * len(m.Field13) + } + if len(m.Field14) > 0 { + for _, s := range m.Field14 { + l = len(s) + n += 1 + l + sovThetest(uint64(l)) + } + } + if len(m.Field15) > 0 { + for _, b := range m.Field15 { + l = len(b) + n += 1 + l + sovThetest(uint64(l)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NidRepPackedNative) Size() (n int) { + var l int + _ = l + if len(m.Field1) > 0 { + n += 1 + sovThetest(uint64(len(m.Field1)*8)) + len(m.Field1)*8 + } + if len(m.Field2) > 0 { + n += 1 + sovThetest(uint64(len(m.Field2)*4)) + len(m.Field2)*4 + } + if len(m.Field3) > 0 { + l = 0 + for _, e := range m.Field3 { + l += sovThetest(uint64(e)) + } + n += 1 + sovThetest(uint64(l)) + l + } + if len(m.Field4) > 0 { + l = 0 + for _, e := range m.Field4 { + l += sovThetest(uint64(e)) + } + n += 1 + sovThetest(uint64(l)) + l + } + if len(m.Field5) > 0 { + l = 0 + for _, e := range m.Field5 { + l += sovThetest(uint64(e)) + } + n += 1 + sovThetest(uint64(l)) + l + } + if len(m.Field6) > 0 { + l = 0 + for _, e := range m.Field6 { + l += sovThetest(uint64(e)) + } + n += 1 + sovThetest(uint64(l)) + l + } + if len(m.Field7) > 0 { + l = 0 + for _, e := range m.Field7 { + l += sozThetest(uint64(e)) + } + n += 1 + sovThetest(uint64(l)) + l + } + if len(m.Field8) > 0 { + l = 0 + for _, e := range m.Field8 { + l += sozThetest(uint64(e)) + } + n += 1 + sovThetest(uint64(l)) + l + } + if len(m.Field9) > 0 { + n += 1 + sovThetest(uint64(len(m.Field9)*4)) + len(m.Field9)*4 + } + if len(m.Field10) > 0 { + n += 1 + sovThetest(uint64(len(m.Field10)*4)) + len(m.Field10)*4 + } + if len(m.Field11) > 0 { + n += 1 + sovThetest(uint64(len(m.Field11)*8)) + len(m.Field11)*8 + } + if len(m.Field12) > 0 { + n += 1 + sovThetest(uint64(len(m.Field12)*8)) + len(m.Field12)*8 + } + if len(m.Field13) > 0 { + n += 1 + sovThetest(uint64(len(m.Field13))) + len(m.Field13)*1 + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NinRepPackedNative) Size() (n int) { + var l int + _ = l + if len(m.Field1) > 0 { + n += 1 + sovThetest(uint64(len(m.Field1)*8)) + len(m.Field1)*8 + } + if len(m.Field2) > 0 { + n += 1 + sovThetest(uint64(len(m.Field2)*4)) + len(m.Field2)*4 + } + if len(m.Field3) > 0 { + l = 0 + for _, e := range m.Field3 { + l += sovThetest(uint64(e)) + } + n += 1 + sovThetest(uint64(l)) + l + } + if len(m.Field4) > 0 { + l = 0 + for _, e := range m.Field4 { + l += sovThetest(uint64(e)) + } + n += 1 + sovThetest(uint64(l)) + l + } + if len(m.Field5) > 0 { + l = 0 + for _, e := range m.Field5 { + l += sovThetest(uint64(e)) + } + n += 1 + sovThetest(uint64(l)) + l + } + if len(m.Field6) > 0 { + l = 0 + for _, e := range m.Field6 { + l += sovThetest(uint64(e)) + } + n += 1 + sovThetest(uint64(l)) + l + } + if len(m.Field7) > 0 { + l = 0 + for _, e := range m.Field7 { + l += sozThetest(uint64(e)) + } + n += 1 + sovThetest(uint64(l)) + l + } + if len(m.Field8) > 0 { + l = 0 + for _, e := range m.Field8 { + l += sozThetest(uint64(e)) + } + n += 1 + sovThetest(uint64(l)) + l + } + if len(m.Field9) > 0 { + n += 1 + sovThetest(uint64(len(m.Field9)*4)) + len(m.Field9)*4 + } + if len(m.Field10) > 0 { + n += 1 + sovThetest(uint64(len(m.Field10)*4)) + len(m.Field10)*4 + } + if len(m.Field11) > 0 { + n += 1 + sovThetest(uint64(len(m.Field11)*8)) + len(m.Field11)*8 + } + if len(m.Field12) > 0 { + n += 1 + sovThetest(uint64(len(m.Field12)*8)) + len(m.Field12)*8 + } + if len(m.Field13) > 0 { + n += 1 + sovThetest(uint64(len(m.Field13))) + len(m.Field13)*1 + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NidOptStruct) Size() (n int) { + var l int + _ = l + n += 9 + n += 5 + l = m.Field3.Size() + n += 1 + l + sovThetest(uint64(l)) + l = m.Field4.Size() + n += 1 + l + sovThetest(uint64(l)) + n += 1 + sovThetest(uint64(m.Field6)) + n += 1 + sozThetest(uint64(m.Field7)) + l = m.Field8.Size() + n += 1 + l + sovThetest(uint64(l)) + n += 2 + l = len(m.Field14) + n += 1 + l + sovThetest(uint64(l)) + if m.Field15 != nil { + l = len(m.Field15) + n += 1 + l + sovThetest(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NinOptStruct) Size() (n int) { + var l int + _ = l + if m.Field1 != nil { + n += 9 + } + if m.Field2 != nil { + n += 5 + } + if m.Field3 != nil { + l = m.Field3.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if m.Field4 != nil { + l = m.Field4.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if m.Field6 != nil { + n += 1 + sovThetest(uint64(*m.Field6)) + } + if m.Field7 != nil { + n += 1 + sozThetest(uint64(*m.Field7)) + } + if m.Field8 != nil { + l = m.Field8.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if m.Field13 != nil { + n += 2 + } + if m.Field14 != nil { + l = len(*m.Field14) + n += 1 + l + sovThetest(uint64(l)) + } + if m.Field15 != nil { + l = len(m.Field15) + n += 1 + l + sovThetest(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NidRepStruct) Size() (n int) { + var l int + _ = l + if len(m.Field1) > 0 { + n += 9 * len(m.Field1) + } + if len(m.Field2) > 0 { + n += 5 * len(m.Field2) + } + if len(m.Field3) > 0 { + for _, e := range m.Field3 { + l = e.Size() + n += 1 + l + sovThetest(uint64(l)) + } + } + if len(m.Field4) > 0 { + for _, e := range m.Field4 { + l = e.Size() + n += 1 + l + sovThetest(uint64(l)) + } + } + if len(m.Field6) > 0 { + for _, e := range m.Field6 { + n += 1 + sovThetest(uint64(e)) + } + } + if len(m.Field7) > 0 { + for _, e := range m.Field7 { + n += 1 + sozThetest(uint64(e)) + } + } + if len(m.Field8) > 0 { + for _, e := range m.Field8 { + l = e.Size() + n += 1 + l + sovThetest(uint64(l)) + } + } + if len(m.Field13) > 0 { + n += 2 * len(m.Field13) + } + if len(m.Field14) > 0 { + for _, s := range m.Field14 { + l = len(s) + n += 1 + l + sovThetest(uint64(l)) + } + } + if len(m.Field15) > 0 { + for _, b := range m.Field15 { + l = len(b) + n += 1 + l + sovThetest(uint64(l)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NinRepStruct) Size() (n int) { + var l int + _ = l + if len(m.Field1) > 0 { + n += 9 * len(m.Field1) + } + if len(m.Field2) > 0 { + n += 5 * len(m.Field2) + } + if len(m.Field3) > 0 { + for _, e := range m.Field3 { + l = e.Size() + n += 1 + l + sovThetest(uint64(l)) + } + } + if len(m.Field4) > 0 { + for _, e := range m.Field4 { + l = e.Size() + n += 1 + l + sovThetest(uint64(l)) + } + } + if len(m.Field6) > 0 { + for _, e := range m.Field6 { + n += 1 + sovThetest(uint64(e)) + } + } + if len(m.Field7) > 0 { + for _, e := range m.Field7 { + n += 1 + sozThetest(uint64(e)) + } + } + if len(m.Field8) > 0 { + for _, e := range m.Field8 { + l = e.Size() + n += 1 + l + sovThetest(uint64(l)) + } + } + if len(m.Field13) > 0 { + n += 2 * len(m.Field13) + } + if len(m.Field14) > 0 { + for _, s := range m.Field14 { + l = len(s) + n += 1 + l + sovThetest(uint64(l)) + } + } + if len(m.Field15) > 0 { + for _, b := range m.Field15 { + l = len(b) + n += 1 + l + sovThetest(uint64(l)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NidEmbeddedStruct) Size() (n int) { + var l int + _ = l + if m.NidOptNative != nil { + l = m.NidOptNative.Size() + n += 1 + l + sovThetest(uint64(l)) + } + l = m.Field200.Size() + n += 2 + l + sovThetest(uint64(l)) + n += 3 + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NinEmbeddedStruct) Size() (n int) { + var l int + _ = l + if m.NidOptNative != nil { + l = m.NidOptNative.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if m.Field200 != nil { + l = m.Field200.Size() + n += 2 + l + sovThetest(uint64(l)) + } + if m.Field210 != nil { + n += 3 + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NidNestedStruct) Size() (n int) { + var l int + _ = l + l = m.Field1.Size() + n += 1 + l + sovThetest(uint64(l)) + if len(m.Field2) > 0 { + for _, e := range m.Field2 { + l = e.Size() + n += 1 + l + sovThetest(uint64(l)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NinNestedStruct) Size() (n int) { + var l int + _ = l + if m.Field1 != nil { + l = m.Field1.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if len(m.Field2) > 0 { + for _, e := range m.Field2 { + l = e.Size() + n += 1 + l + sovThetest(uint64(l)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NidOptCustom) Size() (n int) { + var l int + _ = l + l = m.Id.Size() + n += 1 + l + sovThetest(uint64(l)) + l = m.Value.Size() + n += 1 + l + sovThetest(uint64(l)) + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *CustomDash) Size() (n int) { + var l int + _ = l + if m.Value != nil { + l = m.Value.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NinOptCustom) Size() (n int) { + var l int + _ = l + if m.Id != nil { + l = m.Id.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if m.Value != nil { + l = m.Value.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NidRepCustom) Size() (n int) { + var l int + _ = l + if len(m.Id) > 0 { + for _, e := range m.Id { + l = e.Size() + n += 1 + l + sovThetest(uint64(l)) + } + } + if len(m.Value) > 0 { + for _, e := range m.Value { + l = e.Size() + n += 1 + l + sovThetest(uint64(l)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NinRepCustom) Size() (n int) { + var l int + _ = l + if len(m.Id) > 0 { + for _, e := range m.Id { + l = e.Size() + n += 1 + l + sovThetest(uint64(l)) + } + } + if len(m.Value) > 0 { + for _, e := range m.Value { + l = e.Size() + n += 1 + l + sovThetest(uint64(l)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NinOptNativeUnion) Size() (n int) { + var l int + _ = l + if m.Field1 != nil { + n += 9 + } + if m.Field2 != nil { + n += 5 + } + if m.Field3 != nil { + n += 1 + sovThetest(uint64(*m.Field3)) + } + if m.Field4 != nil { + n += 1 + sovThetest(uint64(*m.Field4)) + } + if m.Field5 != nil { + n += 1 + sovThetest(uint64(*m.Field5)) + } + if m.Field6 != nil { + n += 1 + sovThetest(uint64(*m.Field6)) + } + if m.Field13 != nil { + n += 2 + } + if m.Field14 != nil { + l = len(*m.Field14) + n += 1 + l + sovThetest(uint64(l)) + } + if m.Field15 != nil { + l = len(m.Field15) + n += 1 + l + sovThetest(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NinOptStructUnion) Size() (n int) { + var l int + _ = l + if m.Field1 != nil { + n += 9 + } + if m.Field2 != nil { + n += 5 + } + if m.Field3 != nil { + l = m.Field3.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if m.Field4 != nil { + l = m.Field4.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if m.Field6 != nil { + n += 1 + sovThetest(uint64(*m.Field6)) + } + if m.Field7 != nil { + n += 1 + sozThetest(uint64(*m.Field7)) + } + if m.Field13 != nil { + n += 2 + } + if m.Field14 != nil { + l = len(*m.Field14) + n += 1 + l + sovThetest(uint64(l)) + } + if m.Field15 != nil { + l = len(m.Field15) + n += 1 + l + sovThetest(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NinEmbeddedStructUnion) Size() (n int) { + var l int + _ = l + if m.NidOptNative != nil { + l = m.NidOptNative.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if m.Field200 != nil { + l = m.Field200.Size() + n += 2 + l + sovThetest(uint64(l)) + } + if m.Field210 != nil { + n += 3 + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NinNestedStructUnion) Size() (n int) { + var l int + _ = l + if m.Field1 != nil { + l = m.Field1.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if m.Field2 != nil { + l = m.Field2.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if m.Field3 != nil { + l = m.Field3.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *Tree) Size() (n int) { + var l int + _ = l + if m.Or != nil { + l = m.Or.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if m.And != nil { + l = m.And.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if m.Leaf != nil { + l = m.Leaf.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *OrBranch) Size() (n int) { + var l int + _ = l + l = m.Left.Size() + n += 1 + l + sovThetest(uint64(l)) + l = m.Right.Size() + n += 1 + l + sovThetest(uint64(l)) + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *AndBranch) Size() (n int) { + var l int + _ = l + l = m.Left.Size() + n += 1 + l + sovThetest(uint64(l)) + l = m.Right.Size() + n += 1 + l + sovThetest(uint64(l)) + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *Leaf) Size() (n int) { + var l int + _ = l + n += 1 + sovThetest(uint64(m.Value)) + l = len(m.StrValue) + n += 1 + l + sovThetest(uint64(l)) + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *DeepTree) Size() (n int) { + var l int + _ = l + if m.Down != nil { + l = m.Down.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if m.And != nil { + l = m.And.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if m.Leaf != nil { + l = m.Leaf.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *ADeepBranch) Size() (n int) { + var l int + _ = l + l = m.Down.Size() + n += 1 + l + sovThetest(uint64(l)) + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *AndDeepBranch) Size() (n int) { + var l int + _ = l + l = m.Left.Size() + n += 1 + l + sovThetest(uint64(l)) + l = m.Right.Size() + n += 1 + l + sovThetest(uint64(l)) + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *DeepLeaf) Size() (n int) { + var l int + _ = l + l = m.Tree.Size() + n += 1 + l + sovThetest(uint64(l)) + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *Nil) Size() (n int) { + var l int + _ = l + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NidOptEnum) Size() (n int) { + var l int + _ = l + n += 1 + sovThetest(uint64(m.Field1)) + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NinOptEnum) Size() (n int) { + var l int + _ = l + if m.Field1 != nil { + n += 1 + sovThetest(uint64(*m.Field1)) + } + if m.Field2 != nil { + n += 1 + sovThetest(uint64(*m.Field2)) + } + if m.Field3 != nil { + n += 1 + sovThetest(uint64(*m.Field3)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NidRepEnum) Size() (n int) { + var l int + _ = l + if len(m.Field1) > 0 { + for _, e := range m.Field1 { + n += 1 + sovThetest(uint64(e)) + } + } + if len(m.Field2) > 0 { + for _, e := range m.Field2 { + n += 1 + sovThetest(uint64(e)) + } + } + if len(m.Field3) > 0 { + for _, e := range m.Field3 { + n += 1 + sovThetest(uint64(e)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NinRepEnum) Size() (n int) { + var l int + _ = l + if len(m.Field1) > 0 { + for _, e := range m.Field1 { + n += 1 + sovThetest(uint64(e)) + } + } + if len(m.Field2) > 0 { + for _, e := range m.Field2 { + n += 1 + sovThetest(uint64(e)) + } + } + if len(m.Field3) > 0 { + for _, e := range m.Field3 { + n += 1 + sovThetest(uint64(e)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NinOptEnumDefault) Size() (n int) { + var l int + _ = l + if m.Field1 != nil { + n += 1 + sovThetest(uint64(*m.Field1)) + } + if m.Field2 != nil { + n += 1 + sovThetest(uint64(*m.Field2)) + } + if m.Field3 != nil { + n += 1 + sovThetest(uint64(*m.Field3)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *AnotherNinOptEnum) Size() (n int) { + var l int + _ = l + if m.Field1 != nil { + n += 1 + sovThetest(uint64(*m.Field1)) + } + if m.Field2 != nil { + n += 1 + sovThetest(uint64(*m.Field2)) + } + if m.Field3 != nil { + n += 1 + sovThetest(uint64(*m.Field3)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *AnotherNinOptEnumDefault) Size() (n int) { + var l int + _ = l + if m.Field1 != nil { + n += 1 + sovThetest(uint64(*m.Field1)) + } + if m.Field2 != nil { + n += 1 + sovThetest(uint64(*m.Field2)) + } + if m.Field3 != nil { + n += 1 + sovThetest(uint64(*m.Field3)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *Timer) Size() (n int) { + var l int + _ = l + n += 9 + n += 9 + if m.Data != nil { + l = len(m.Data) + n += 1 + l + sovThetest(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *MyExtendable) Size() (n int) { + var l int + _ = l + if m.Field1 != nil { + n += 1 + sovThetest(uint64(*m.Field1)) + } + if m.XXX_extensions != nil { + n += github_com_gogo_protobuf_proto.SizeOfExtensionMap(m.XXX_extensions) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *OtherExtenable) Size() (n int) { + var l int + _ = l + if m.Field2 != nil { + n += 1 + sovThetest(uint64(*m.Field2)) + } + if m.Field13 != nil { + n += 1 + sovThetest(uint64(*m.Field13)) + } + if m.M != nil { + l = m.M.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if m.XXX_extensions != nil { + n += github_com_gogo_protobuf_proto.SizeOfExtensionMap(m.XXX_extensions) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NestedDefinition) Size() (n int) { + var l int + _ = l + if m.Field1 != nil { + n += 1 + sovThetest(uint64(*m.Field1)) + } + if m.EnumField != nil { + n += 1 + sovThetest(uint64(*m.EnumField)) + } + if m.NNM != nil { + l = m.NNM.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if m.NM != nil { + l = m.NM.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NestedDefinition_NestedMessage) Size() (n int) { + var l int + _ = l + if m.NestedField1 != nil { + n += 9 + } + if m.NNM != nil { + l = m.NNM.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NestedDefinition_NestedMessage_NestedNestedMsg) Size() (n int) { + var l int + _ = l + if m.NestedNestedField1 != nil { + l = len(*m.NestedNestedField1) + n += 1 + l + sovThetest(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NestedScope) Size() (n int) { + var l int + _ = l + if m.A != nil { + l = m.A.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if m.B != nil { + n += 1 + sovThetest(uint64(*m.B)) + } + if m.C != nil { + l = m.C.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NinOptNativeDefault) Size() (n int) { + var l int + _ = l + if m.Field1 != nil { + n += 9 + } + if m.Field2 != nil { + n += 5 + } + if m.Field3 != nil { + n += 1 + sovThetest(uint64(*m.Field3)) + } + if m.Field4 != nil { + n += 1 + sovThetest(uint64(*m.Field4)) + } + if m.Field5 != nil { + n += 1 + sovThetest(uint64(*m.Field5)) + } + if m.Field6 != nil { + n += 1 + sovThetest(uint64(*m.Field6)) + } + if m.Field7 != nil { + n += 1 + sozThetest(uint64(*m.Field7)) + } + if m.Field8 != nil { + n += 1 + sozThetest(uint64(*m.Field8)) + } + if m.Field9 != nil { + n += 5 + } + if m.Field10 != nil { + n += 5 + } + if m.Field11 != nil { + n += 9 + } + if m.Field12 != nil { + n += 9 + } + if m.Field13 != nil { + n += 2 + } + if m.Field14 != nil { + l = len(*m.Field14) + n += 1 + l + sovThetest(uint64(l)) + } + if m.Field15 != nil { + l = len(m.Field15) + n += 1 + l + sovThetest(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *CustomContainer) Size() (n int) { + var l int + _ = l + l = m.CustomStruct.Size() + n += 1 + l + sovThetest(uint64(l)) + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *CustomNameNidOptNative) Size() (n int) { + var l int + _ = l + n += 9 + n += 5 + n += 1 + sovThetest(uint64(m.FieldC)) + n += 1 + sovThetest(uint64(m.FieldD)) + n += 1 + sovThetest(uint64(m.FieldE)) + n += 1 + sovThetest(uint64(m.FieldF)) + n += 1 + sozThetest(uint64(m.FieldG)) + n += 1 + sozThetest(uint64(m.FieldH)) + n += 5 + n += 5 + n += 9 + n += 9 + n += 2 + l = len(m.FieldN) + n += 1 + l + sovThetest(uint64(l)) + if m.FieldO != nil { + l = len(m.FieldO) + n += 1 + l + sovThetest(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *CustomNameNinOptNative) Size() (n int) { + var l int + _ = l + if m.FieldA != nil { + n += 9 + } + if m.FieldB != nil { + n += 5 + } + if m.FieldC != nil { + n += 1 + sovThetest(uint64(*m.FieldC)) + } + if m.FieldD != nil { + n += 1 + sovThetest(uint64(*m.FieldD)) + } + if m.FieldE != nil { + n += 1 + sovThetest(uint64(*m.FieldE)) + } + if m.FieldF != nil { + n += 1 + sovThetest(uint64(*m.FieldF)) + } + if m.FieldG != nil { + n += 1 + sozThetest(uint64(*m.FieldG)) + } + if m.FieldH != nil { + n += 1 + sozThetest(uint64(*m.FieldH)) + } + if m.FieldI != nil { + n += 5 + } + if m.FieldJ != nil { + n += 5 + } + if m.FieldK != nil { + n += 9 + } + if m.FielL != nil { + n += 9 + } + if m.FieldM != nil { + n += 2 + } + if m.FieldN != nil { + l = len(*m.FieldN) + n += 1 + l + sovThetest(uint64(l)) + } + if m.FieldO != nil { + l = len(m.FieldO) + n += 1 + l + sovThetest(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *CustomNameNinRepNative) Size() (n int) { + var l int + _ = l + if len(m.FieldA) > 0 { + n += 9 * len(m.FieldA) + } + if len(m.FieldB) > 0 { + n += 5 * len(m.FieldB) + } + if len(m.FieldC) > 0 { + for _, e := range m.FieldC { + n += 1 + sovThetest(uint64(e)) + } + } + if len(m.FieldD) > 0 { + for _, e := range m.FieldD { + n += 1 + sovThetest(uint64(e)) + } + } + if len(m.FieldE) > 0 { + for _, e := range m.FieldE { + n += 1 + sovThetest(uint64(e)) + } + } + if len(m.FieldF) > 0 { + for _, e := range m.FieldF { + n += 1 + sovThetest(uint64(e)) + } + } + if len(m.FieldG) > 0 { + for _, e := range m.FieldG { + n += 1 + sozThetest(uint64(e)) + } + } + if len(m.FieldH) > 0 { + for _, e := range m.FieldH { + n += 1 + sozThetest(uint64(e)) + } + } + if len(m.FieldI) > 0 { + n += 5 * len(m.FieldI) + } + if len(m.FieldJ) > 0 { + n += 5 * len(m.FieldJ) + } + if len(m.FieldK) > 0 { + n += 9 * len(m.FieldK) + } + if len(m.FieldL) > 0 { + n += 9 * len(m.FieldL) + } + if len(m.FieldM) > 0 { + n += 2 * len(m.FieldM) + } + if len(m.FieldN) > 0 { + for _, s := range m.FieldN { + l = len(s) + n += 1 + l + sovThetest(uint64(l)) + } + } + if len(m.FieldO) > 0 { + for _, b := range m.FieldO { + l = len(b) + n += 1 + l + sovThetest(uint64(l)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *CustomNameNinStruct) Size() (n int) { + var l int + _ = l + if m.FieldA != nil { + n += 9 + } + if m.FieldB != nil { + n += 5 + } + if m.FieldC != nil { + l = m.FieldC.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if len(m.FieldD) > 0 { + for _, e := range m.FieldD { + l = e.Size() + n += 1 + l + sovThetest(uint64(l)) + } + } + if m.FieldE != nil { + n += 1 + sovThetest(uint64(*m.FieldE)) + } + if m.FieldF != nil { + n += 1 + sozThetest(uint64(*m.FieldF)) + } + if m.FieldG != nil { + l = m.FieldG.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if m.FieldH != nil { + n += 2 + } + if m.FieldI != nil { + l = len(*m.FieldI) + n += 1 + l + sovThetest(uint64(l)) + } + if m.FieldJ != nil { + l = len(m.FieldJ) + n += 1 + l + sovThetest(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *CustomNameCustomType) Size() (n int) { + var l int + _ = l + if m.FieldA != nil { + l = m.FieldA.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if m.FieldB != nil { + l = m.FieldB.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if len(m.FieldC) > 0 { + for _, e := range m.FieldC { + l = e.Size() + n += 1 + l + sovThetest(uint64(l)) + } + } + if len(m.FieldD) > 0 { + for _, e := range m.FieldD { + l = e.Size() + n += 1 + l + sovThetest(uint64(l)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *CustomNameNinEmbeddedStructUnion) Size() (n int) { + var l int + _ = l + if m.NidOptNative != nil { + l = m.NidOptNative.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if m.FieldA != nil { + l = m.FieldA.Size() + n += 2 + l + sovThetest(uint64(l)) + } + if m.FieldB != nil { + n += 3 + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *CustomNameEnum) Size() (n int) { + var l int + _ = l + if m.FieldA != nil { + n += 1 + sovThetest(uint64(*m.FieldA)) + } + if len(m.FieldB) > 0 { + for _, e := range m.FieldB { + n += 1 + sovThetest(uint64(e)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NoExtensionsMap) Size() (n int) { + var l int + _ = l + if m.Field1 != nil { + n += 1 + sovThetest(uint64(*m.Field1)) + } + if m.XXX_extensions != nil { + n += len(m.XXX_extensions) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *Unrecognized) Size() (n int) { + var l int + _ = l + if m.Field1 != nil { + l = len(*m.Field1) + n += 1 + l + sovThetest(uint64(l)) + } + return n +} + +func (m *UnrecognizedWithInner) Size() (n int) { + var l int + _ = l + if len(m.Embedded) > 0 { + for _, e := range m.Embedded { + l = e.Size() + n += 1 + l + sovThetest(uint64(l)) + } + } + if m.Field2 != nil { + l = len(*m.Field2) + n += 1 + l + sovThetest(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *UnrecognizedWithInner_Inner) Size() (n int) { + var l int + _ = l + if m.Field1 != nil { + n += 1 + sovThetest(uint64(*m.Field1)) + } + return n +} + +func (m *UnrecognizedWithEmbed) Size() (n int) { + var l int + _ = l + l = m.UnrecognizedWithEmbed_Embedded.Size() + n += 1 + l + sovThetest(uint64(l)) + if m.Field2 != nil { + l = len(*m.Field2) + n += 1 + l + sovThetest(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *UnrecognizedWithEmbed_Embedded) Size() (n int) { + var l int + _ = l + if m.Field1 != nil { + n += 1 + sovThetest(uint64(*m.Field1)) + } + return n +} + +func (m *Node) Size() (n int) { + var l int + _ = l + if m.Label != nil { + l = len(*m.Label) + n += 1 + l + sovThetest(uint64(l)) + } + if len(m.Children) > 0 { + for _, e := range m.Children { + l = e.Size() + n += 1 + l + sovThetest(uint64(l)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func sovThetest(x uint64) (n int) { + for { + n++ + x >>= 7 + if x == 0 { + break + } + } + return n +} +func sozThetest(x uint64) (n int) { + return sovThetest(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (this *NidOptNative) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NidOptNative{`, + `Field1:` + fmt.Sprintf("%v", this.Field1) + `,`, + `Field2:` + fmt.Sprintf("%v", this.Field2) + `,`, + `Field3:` + fmt.Sprintf("%v", this.Field3) + `,`, + `Field4:` + fmt.Sprintf("%v", this.Field4) + `,`, + `Field5:` + fmt.Sprintf("%v", this.Field5) + `,`, + `Field6:` + fmt.Sprintf("%v", this.Field6) + `,`, + `Field7:` + fmt.Sprintf("%v", this.Field7) + `,`, + `Field8:` + fmt.Sprintf("%v", this.Field8) + `,`, + `Field9:` + fmt.Sprintf("%v", this.Field9) + `,`, + `Field10:` + fmt.Sprintf("%v", this.Field10) + `,`, + `Field11:` + fmt.Sprintf("%v", this.Field11) + `,`, + `Field12:` + fmt.Sprintf("%v", this.Field12) + `,`, + `Field13:` + fmt.Sprintf("%v", this.Field13) + `,`, + `Field14:` + fmt.Sprintf("%v", this.Field14) + `,`, + `Field15:` + fmt.Sprintf("%v", this.Field15) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NinOptNative) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NinOptNative{`, + `Field1:` + valueToStringThetest(this.Field1) + `,`, + `Field2:` + valueToStringThetest(this.Field2) + `,`, + `Field3:` + valueToStringThetest(this.Field3) + `,`, + `Field4:` + valueToStringThetest(this.Field4) + `,`, + `Field5:` + valueToStringThetest(this.Field5) + `,`, + `Field6:` + valueToStringThetest(this.Field6) + `,`, + `Field7:` + valueToStringThetest(this.Field7) + `,`, + `Field8:` + valueToStringThetest(this.Field8) + `,`, + `Field9:` + valueToStringThetest(this.Field9) + `,`, + `Field10:` + valueToStringThetest(this.Field10) + `,`, + `Field11:` + valueToStringThetest(this.Field11) + `,`, + `Field12:` + valueToStringThetest(this.Field12) + `,`, + `Field13:` + valueToStringThetest(this.Field13) + `,`, + `Field14:` + valueToStringThetest(this.Field14) + `,`, + `Field15:` + valueToStringThetest(this.Field15) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NidRepNative) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NidRepNative{`, + `Field1:` + fmt.Sprintf("%v", this.Field1) + `,`, + `Field2:` + fmt.Sprintf("%v", this.Field2) + `,`, + `Field3:` + fmt.Sprintf("%v", this.Field3) + `,`, + `Field4:` + fmt.Sprintf("%v", this.Field4) + `,`, + `Field5:` + fmt.Sprintf("%v", this.Field5) + `,`, + `Field6:` + fmt.Sprintf("%v", this.Field6) + `,`, + `Field7:` + fmt.Sprintf("%v", this.Field7) + `,`, + `Field8:` + fmt.Sprintf("%v", this.Field8) + `,`, + `Field9:` + fmt.Sprintf("%v", this.Field9) + `,`, + `Field10:` + fmt.Sprintf("%v", this.Field10) + `,`, + `Field11:` + fmt.Sprintf("%v", this.Field11) + `,`, + `Field12:` + fmt.Sprintf("%v", this.Field12) + `,`, + `Field13:` + fmt.Sprintf("%v", this.Field13) + `,`, + `Field14:` + fmt.Sprintf("%v", this.Field14) + `,`, + `Field15:` + fmt.Sprintf("%v", this.Field15) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NinRepNative) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NinRepNative{`, + `Field1:` + fmt.Sprintf("%v", this.Field1) + `,`, + `Field2:` + fmt.Sprintf("%v", this.Field2) + `,`, + `Field3:` + fmt.Sprintf("%v", this.Field3) + `,`, + `Field4:` + fmt.Sprintf("%v", this.Field4) + `,`, + `Field5:` + fmt.Sprintf("%v", this.Field5) + `,`, + `Field6:` + fmt.Sprintf("%v", this.Field6) + `,`, + `Field7:` + fmt.Sprintf("%v", this.Field7) + `,`, + `Field8:` + fmt.Sprintf("%v", this.Field8) + `,`, + `Field9:` + fmt.Sprintf("%v", this.Field9) + `,`, + `Field10:` + fmt.Sprintf("%v", this.Field10) + `,`, + `Field11:` + fmt.Sprintf("%v", this.Field11) + `,`, + `Field12:` + fmt.Sprintf("%v", this.Field12) + `,`, + `Field13:` + fmt.Sprintf("%v", this.Field13) + `,`, + `Field14:` + fmt.Sprintf("%v", this.Field14) + `,`, + `Field15:` + fmt.Sprintf("%v", this.Field15) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NidRepPackedNative) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NidRepPackedNative{`, + `Field1:` + fmt.Sprintf("%v", this.Field1) + `,`, + `Field2:` + fmt.Sprintf("%v", this.Field2) + `,`, + `Field3:` + fmt.Sprintf("%v", this.Field3) + `,`, + `Field4:` + fmt.Sprintf("%v", this.Field4) + `,`, + `Field5:` + fmt.Sprintf("%v", this.Field5) + `,`, + `Field6:` + fmt.Sprintf("%v", this.Field6) + `,`, + `Field7:` + fmt.Sprintf("%v", this.Field7) + `,`, + `Field8:` + fmt.Sprintf("%v", this.Field8) + `,`, + `Field9:` + fmt.Sprintf("%v", this.Field9) + `,`, + `Field10:` + fmt.Sprintf("%v", this.Field10) + `,`, + `Field11:` + fmt.Sprintf("%v", this.Field11) + `,`, + `Field12:` + fmt.Sprintf("%v", this.Field12) + `,`, + `Field13:` + fmt.Sprintf("%v", this.Field13) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NinRepPackedNative) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NinRepPackedNative{`, + `Field1:` + fmt.Sprintf("%v", this.Field1) + `,`, + `Field2:` + fmt.Sprintf("%v", this.Field2) + `,`, + `Field3:` + fmt.Sprintf("%v", this.Field3) + `,`, + `Field4:` + fmt.Sprintf("%v", this.Field4) + `,`, + `Field5:` + fmt.Sprintf("%v", this.Field5) + `,`, + `Field6:` + fmt.Sprintf("%v", this.Field6) + `,`, + `Field7:` + fmt.Sprintf("%v", this.Field7) + `,`, + `Field8:` + fmt.Sprintf("%v", this.Field8) + `,`, + `Field9:` + fmt.Sprintf("%v", this.Field9) + `,`, + `Field10:` + fmt.Sprintf("%v", this.Field10) + `,`, + `Field11:` + fmt.Sprintf("%v", this.Field11) + `,`, + `Field12:` + fmt.Sprintf("%v", this.Field12) + `,`, + `Field13:` + fmt.Sprintf("%v", this.Field13) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NidOptStruct) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NidOptStruct{`, + `Field1:` + fmt.Sprintf("%v", this.Field1) + `,`, + `Field2:` + fmt.Sprintf("%v", this.Field2) + `,`, + `Field3:` + strings.Replace(strings.Replace(this.Field3.String(), "NidOptNative", "NidOptNative", 1), `&`, ``, 1) + `,`, + `Field4:` + strings.Replace(strings.Replace(this.Field4.String(), "NinOptNative", "NinOptNative", 1), `&`, ``, 1) + `,`, + `Field6:` + fmt.Sprintf("%v", this.Field6) + `,`, + `Field7:` + fmt.Sprintf("%v", this.Field7) + `,`, + `Field8:` + strings.Replace(strings.Replace(this.Field8.String(), "NidOptNative", "NidOptNative", 1), `&`, ``, 1) + `,`, + `Field13:` + fmt.Sprintf("%v", this.Field13) + `,`, + `Field14:` + fmt.Sprintf("%v", this.Field14) + `,`, + `Field15:` + fmt.Sprintf("%v", this.Field15) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NinOptStruct) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NinOptStruct{`, + `Field1:` + valueToStringThetest(this.Field1) + `,`, + `Field2:` + valueToStringThetest(this.Field2) + `,`, + `Field3:` + strings.Replace(fmt.Sprintf("%v", this.Field3), "NidOptNative", "NidOptNative", 1) + `,`, + `Field4:` + strings.Replace(fmt.Sprintf("%v", this.Field4), "NinOptNative", "NinOptNative", 1) + `,`, + `Field6:` + valueToStringThetest(this.Field6) + `,`, + `Field7:` + valueToStringThetest(this.Field7) + `,`, + `Field8:` + strings.Replace(fmt.Sprintf("%v", this.Field8), "NidOptNative", "NidOptNative", 1) + `,`, + `Field13:` + valueToStringThetest(this.Field13) + `,`, + `Field14:` + valueToStringThetest(this.Field14) + `,`, + `Field15:` + valueToStringThetest(this.Field15) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NidRepStruct) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NidRepStruct{`, + `Field1:` + fmt.Sprintf("%v", this.Field1) + `,`, + `Field2:` + fmt.Sprintf("%v", this.Field2) + `,`, + `Field3:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Field3), "NidOptNative", "NidOptNative", 1), `&`, ``, 1) + `,`, + `Field4:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Field4), "NinOptNative", "NinOptNative", 1), `&`, ``, 1) + `,`, + `Field6:` + fmt.Sprintf("%v", this.Field6) + `,`, + `Field7:` + fmt.Sprintf("%v", this.Field7) + `,`, + `Field8:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Field8), "NidOptNative", "NidOptNative", 1), `&`, ``, 1) + `,`, + `Field13:` + fmt.Sprintf("%v", this.Field13) + `,`, + `Field14:` + fmt.Sprintf("%v", this.Field14) + `,`, + `Field15:` + fmt.Sprintf("%v", this.Field15) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NinRepStruct) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NinRepStruct{`, + `Field1:` + fmt.Sprintf("%v", this.Field1) + `,`, + `Field2:` + fmt.Sprintf("%v", this.Field2) + `,`, + `Field3:` + strings.Replace(fmt.Sprintf("%v", this.Field3), "NidOptNative", "NidOptNative", 1) + `,`, + `Field4:` + strings.Replace(fmt.Sprintf("%v", this.Field4), "NinOptNative", "NinOptNative", 1) + `,`, + `Field6:` + fmt.Sprintf("%v", this.Field6) + `,`, + `Field7:` + fmt.Sprintf("%v", this.Field7) + `,`, + `Field8:` + strings.Replace(fmt.Sprintf("%v", this.Field8), "NidOptNative", "NidOptNative", 1) + `,`, + `Field13:` + fmt.Sprintf("%v", this.Field13) + `,`, + `Field14:` + fmt.Sprintf("%v", this.Field14) + `,`, + `Field15:` + fmt.Sprintf("%v", this.Field15) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NidEmbeddedStruct) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NidEmbeddedStruct{`, + `NidOptNative:` + strings.Replace(fmt.Sprintf("%v", this.NidOptNative), "NidOptNative", "NidOptNative", 1) + `,`, + `Field200:` + strings.Replace(strings.Replace(this.Field200.String(), "NidOptNative", "NidOptNative", 1), `&`, ``, 1) + `,`, + `Field210:` + fmt.Sprintf("%v", this.Field210) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NinEmbeddedStruct) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NinEmbeddedStruct{`, + `NidOptNative:` + strings.Replace(fmt.Sprintf("%v", this.NidOptNative), "NidOptNative", "NidOptNative", 1) + `,`, + `Field200:` + strings.Replace(fmt.Sprintf("%v", this.Field200), "NidOptNative", "NidOptNative", 1) + `,`, + `Field210:` + valueToStringThetest(this.Field210) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NidNestedStruct) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NidNestedStruct{`, + `Field1:` + strings.Replace(strings.Replace(this.Field1.String(), "NidOptStruct", "NidOptStruct", 1), `&`, ``, 1) + `,`, + `Field2:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Field2), "NidRepStruct", "NidRepStruct", 1), `&`, ``, 1) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NinNestedStruct) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NinNestedStruct{`, + `Field1:` + strings.Replace(fmt.Sprintf("%v", this.Field1), "NinOptStruct", "NinOptStruct", 1) + `,`, + `Field2:` + strings.Replace(fmt.Sprintf("%v", this.Field2), "NinRepStruct", "NinRepStruct", 1) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NidOptCustom) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NidOptCustom{`, + `Id:` + fmt.Sprintf("%v", this.Id) + `,`, + `Value:` + fmt.Sprintf("%v", this.Value) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *CustomDash) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&CustomDash{`, + `Value:` + valueToStringThetest(this.Value) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NinOptCustom) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NinOptCustom{`, + `Id:` + valueToStringThetest(this.Id) + `,`, + `Value:` + valueToStringThetest(this.Value) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NidRepCustom) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NidRepCustom{`, + `Id:` + fmt.Sprintf("%v", this.Id) + `,`, + `Value:` + fmt.Sprintf("%v", this.Value) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NinRepCustom) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NinRepCustom{`, + `Id:` + fmt.Sprintf("%v", this.Id) + `,`, + `Value:` + fmt.Sprintf("%v", this.Value) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NinOptNativeUnion) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NinOptNativeUnion{`, + `Field1:` + valueToStringThetest(this.Field1) + `,`, + `Field2:` + valueToStringThetest(this.Field2) + `,`, + `Field3:` + valueToStringThetest(this.Field3) + `,`, + `Field4:` + valueToStringThetest(this.Field4) + `,`, + `Field5:` + valueToStringThetest(this.Field5) + `,`, + `Field6:` + valueToStringThetest(this.Field6) + `,`, + `Field13:` + valueToStringThetest(this.Field13) + `,`, + `Field14:` + valueToStringThetest(this.Field14) + `,`, + `Field15:` + valueToStringThetest(this.Field15) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NinOptStructUnion) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NinOptStructUnion{`, + `Field1:` + valueToStringThetest(this.Field1) + `,`, + `Field2:` + valueToStringThetest(this.Field2) + `,`, + `Field3:` + strings.Replace(fmt.Sprintf("%v", this.Field3), "NidOptNative", "NidOptNative", 1) + `,`, + `Field4:` + strings.Replace(fmt.Sprintf("%v", this.Field4), "NinOptNative", "NinOptNative", 1) + `,`, + `Field6:` + valueToStringThetest(this.Field6) + `,`, + `Field7:` + valueToStringThetest(this.Field7) + `,`, + `Field13:` + valueToStringThetest(this.Field13) + `,`, + `Field14:` + valueToStringThetest(this.Field14) + `,`, + `Field15:` + valueToStringThetest(this.Field15) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NinEmbeddedStructUnion) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NinEmbeddedStructUnion{`, + `NidOptNative:` + strings.Replace(fmt.Sprintf("%v", this.NidOptNative), "NidOptNative", "NidOptNative", 1) + `,`, + `Field200:` + strings.Replace(fmt.Sprintf("%v", this.Field200), "NinOptNative", "NinOptNative", 1) + `,`, + `Field210:` + valueToStringThetest(this.Field210) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NinNestedStructUnion) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NinNestedStructUnion{`, + `Field1:` + strings.Replace(fmt.Sprintf("%v", this.Field1), "NinOptNativeUnion", "NinOptNativeUnion", 1) + `,`, + `Field2:` + strings.Replace(fmt.Sprintf("%v", this.Field2), "NinOptStructUnion", "NinOptStructUnion", 1) + `,`, + `Field3:` + strings.Replace(fmt.Sprintf("%v", this.Field3), "NinEmbeddedStructUnion", "NinEmbeddedStructUnion", 1) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *Tree) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&Tree{`, + `Or:` + strings.Replace(fmt.Sprintf("%v", this.Or), "OrBranch", "OrBranch", 1) + `,`, + `And:` + strings.Replace(fmt.Sprintf("%v", this.And), "AndBranch", "AndBranch", 1) + `,`, + `Leaf:` + strings.Replace(fmt.Sprintf("%v", this.Leaf), "Leaf", "Leaf", 1) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *OrBranch) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&OrBranch{`, + `Left:` + strings.Replace(strings.Replace(this.Left.String(), "Tree", "Tree", 1), `&`, ``, 1) + `,`, + `Right:` + strings.Replace(strings.Replace(this.Right.String(), "Tree", "Tree", 1), `&`, ``, 1) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *AndBranch) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&AndBranch{`, + `Left:` + strings.Replace(strings.Replace(this.Left.String(), "Tree", "Tree", 1), `&`, ``, 1) + `,`, + `Right:` + strings.Replace(strings.Replace(this.Right.String(), "Tree", "Tree", 1), `&`, ``, 1) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *Leaf) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&Leaf{`, + `Value:` + fmt.Sprintf("%v", this.Value) + `,`, + `StrValue:` + fmt.Sprintf("%v", this.StrValue) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *DeepTree) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&DeepTree{`, + `Down:` + strings.Replace(fmt.Sprintf("%v", this.Down), "ADeepBranch", "ADeepBranch", 1) + `,`, + `And:` + strings.Replace(fmt.Sprintf("%v", this.And), "AndDeepBranch", "AndDeepBranch", 1) + `,`, + `Leaf:` + strings.Replace(fmt.Sprintf("%v", this.Leaf), "DeepLeaf", "DeepLeaf", 1) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *ADeepBranch) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&ADeepBranch{`, + `Down:` + strings.Replace(strings.Replace(this.Down.String(), "DeepTree", "DeepTree", 1), `&`, ``, 1) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *AndDeepBranch) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&AndDeepBranch{`, + `Left:` + strings.Replace(strings.Replace(this.Left.String(), "DeepTree", "DeepTree", 1), `&`, ``, 1) + `,`, + `Right:` + strings.Replace(strings.Replace(this.Right.String(), "DeepTree", "DeepTree", 1), `&`, ``, 1) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *DeepLeaf) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&DeepLeaf{`, + `Tree:` + strings.Replace(strings.Replace(this.Tree.String(), "Tree", "Tree", 1), `&`, ``, 1) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *Nil) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&Nil{`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NidOptEnum) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NidOptEnum{`, + `Field1:` + fmt.Sprintf("%v", this.Field1) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NinOptEnum) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NinOptEnum{`, + `Field1:` + valueToStringThetest(this.Field1) + `,`, + `Field2:` + valueToStringThetest(this.Field2) + `,`, + `Field3:` + valueToStringThetest(this.Field3) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NidRepEnum) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NidRepEnum{`, + `Field1:` + fmt.Sprintf("%v", this.Field1) + `,`, + `Field2:` + fmt.Sprintf("%v", this.Field2) + `,`, + `Field3:` + fmt.Sprintf("%v", this.Field3) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NinRepEnum) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NinRepEnum{`, + `Field1:` + fmt.Sprintf("%v", this.Field1) + `,`, + `Field2:` + fmt.Sprintf("%v", this.Field2) + `,`, + `Field3:` + fmt.Sprintf("%v", this.Field3) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NinOptEnumDefault) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NinOptEnumDefault{`, + `Field1:` + valueToStringThetest(this.Field1) + `,`, + `Field2:` + valueToStringThetest(this.Field2) + `,`, + `Field3:` + valueToStringThetest(this.Field3) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *AnotherNinOptEnum) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&AnotherNinOptEnum{`, + `Field1:` + valueToStringThetest(this.Field1) + `,`, + `Field2:` + valueToStringThetest(this.Field2) + `,`, + `Field3:` + valueToStringThetest(this.Field3) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *AnotherNinOptEnumDefault) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&AnotherNinOptEnumDefault{`, + `Field1:` + valueToStringThetest(this.Field1) + `,`, + `Field2:` + valueToStringThetest(this.Field2) + `,`, + `Field3:` + valueToStringThetest(this.Field3) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *Timer) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&Timer{`, + `Time1:` + fmt.Sprintf("%v", this.Time1) + `,`, + `Time2:` + fmt.Sprintf("%v", this.Time2) + `,`, + `Data:` + fmt.Sprintf("%v", this.Data) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *MyExtendable) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&MyExtendable{`, + `Field1:` + valueToStringThetest(this.Field1) + `,`, + `XXX_extensions:` + proto.StringFromExtensionsMap(this.XXX_extensions) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *OtherExtenable) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&OtherExtenable{`, + `Field2:` + valueToStringThetest(this.Field2) + `,`, + `Field13:` + valueToStringThetest(this.Field13) + `,`, + `M:` + strings.Replace(fmt.Sprintf("%v", this.M), "MyExtendable", "MyExtendable", 1) + `,`, + `XXX_extensions:` + proto.StringFromExtensionsMap(this.XXX_extensions) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NestedDefinition) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NestedDefinition{`, + `Field1:` + valueToStringThetest(this.Field1) + `,`, + `EnumField:` + valueToStringThetest(this.EnumField) + `,`, + `NNM:` + strings.Replace(fmt.Sprintf("%v", this.NNM), "NestedDefinition_NestedMessage_NestedNestedMsg", "NestedDefinition_NestedMessage_NestedNestedMsg", 1) + `,`, + `NM:` + strings.Replace(fmt.Sprintf("%v", this.NM), "NestedDefinition_NestedMessage", "NestedDefinition_NestedMessage", 1) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NestedDefinition_NestedMessage) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NestedDefinition_NestedMessage{`, + `NestedField1:` + valueToStringThetest(this.NestedField1) + `,`, + `NNM:` + strings.Replace(fmt.Sprintf("%v", this.NNM), "NestedDefinition_NestedMessage_NestedNestedMsg", "NestedDefinition_NestedMessage_NestedNestedMsg", 1) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NestedDefinition_NestedMessage_NestedNestedMsg) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NestedDefinition_NestedMessage_NestedNestedMsg{`, + `NestedNestedField1:` + valueToStringThetest(this.NestedNestedField1) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NestedScope) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NestedScope{`, + `A:` + strings.Replace(fmt.Sprintf("%v", this.A), "NestedDefinition_NestedMessage_NestedNestedMsg", "NestedDefinition_NestedMessage_NestedNestedMsg", 1) + `,`, + `B:` + valueToStringThetest(this.B) + `,`, + `C:` + strings.Replace(fmt.Sprintf("%v", this.C), "NestedDefinition_NestedMessage", "NestedDefinition_NestedMessage", 1) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NinOptNativeDefault) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NinOptNativeDefault{`, + `Field1:` + valueToStringThetest(this.Field1) + `,`, + `Field2:` + valueToStringThetest(this.Field2) + `,`, + `Field3:` + valueToStringThetest(this.Field3) + `,`, + `Field4:` + valueToStringThetest(this.Field4) + `,`, + `Field5:` + valueToStringThetest(this.Field5) + `,`, + `Field6:` + valueToStringThetest(this.Field6) + `,`, + `Field7:` + valueToStringThetest(this.Field7) + `,`, + `Field8:` + valueToStringThetest(this.Field8) + `,`, + `Field9:` + valueToStringThetest(this.Field9) + `,`, + `Field10:` + valueToStringThetest(this.Field10) + `,`, + `Field11:` + valueToStringThetest(this.Field11) + `,`, + `Field12:` + valueToStringThetest(this.Field12) + `,`, + `Field13:` + valueToStringThetest(this.Field13) + `,`, + `Field14:` + valueToStringThetest(this.Field14) + `,`, + `Field15:` + valueToStringThetest(this.Field15) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *CustomContainer) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&CustomContainer{`, + `CustomStruct:` + strings.Replace(strings.Replace(this.CustomStruct.String(), "NidOptCustom", "NidOptCustom", 1), `&`, ``, 1) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *CustomNameNidOptNative) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&CustomNameNidOptNative{`, + `FieldA:` + fmt.Sprintf("%v", this.FieldA) + `,`, + `FieldB:` + fmt.Sprintf("%v", this.FieldB) + `,`, + `FieldC:` + fmt.Sprintf("%v", this.FieldC) + `,`, + `FieldD:` + fmt.Sprintf("%v", this.FieldD) + `,`, + `FieldE:` + fmt.Sprintf("%v", this.FieldE) + `,`, + `FieldF:` + fmt.Sprintf("%v", this.FieldF) + `,`, + `FieldG:` + fmt.Sprintf("%v", this.FieldG) + `,`, + `FieldH:` + fmt.Sprintf("%v", this.FieldH) + `,`, + `FieldI:` + fmt.Sprintf("%v", this.FieldI) + `,`, + `FieldJ:` + fmt.Sprintf("%v", this.FieldJ) + `,`, + `FieldK:` + fmt.Sprintf("%v", this.FieldK) + `,`, + `FieldL:` + fmt.Sprintf("%v", this.FieldL) + `,`, + `FieldM:` + fmt.Sprintf("%v", this.FieldM) + `,`, + `FieldN:` + fmt.Sprintf("%v", this.FieldN) + `,`, + `FieldO:` + fmt.Sprintf("%v", this.FieldO) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *CustomNameNinOptNative) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&CustomNameNinOptNative{`, + `FieldA:` + valueToStringThetest(this.FieldA) + `,`, + `FieldB:` + valueToStringThetest(this.FieldB) + `,`, + `FieldC:` + valueToStringThetest(this.FieldC) + `,`, + `FieldD:` + valueToStringThetest(this.FieldD) + `,`, + `FieldE:` + valueToStringThetest(this.FieldE) + `,`, + `FieldF:` + valueToStringThetest(this.FieldF) + `,`, + `FieldG:` + valueToStringThetest(this.FieldG) + `,`, + `FieldH:` + valueToStringThetest(this.FieldH) + `,`, + `FieldI:` + valueToStringThetest(this.FieldI) + `,`, + `FieldJ:` + valueToStringThetest(this.FieldJ) + `,`, + `FieldK:` + valueToStringThetest(this.FieldK) + `,`, + `FielL:` + valueToStringThetest(this.FielL) + `,`, + `FieldM:` + valueToStringThetest(this.FieldM) + `,`, + `FieldN:` + valueToStringThetest(this.FieldN) + `,`, + `FieldO:` + valueToStringThetest(this.FieldO) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *CustomNameNinRepNative) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&CustomNameNinRepNative{`, + `FieldA:` + fmt.Sprintf("%v", this.FieldA) + `,`, + `FieldB:` + fmt.Sprintf("%v", this.FieldB) + `,`, + `FieldC:` + fmt.Sprintf("%v", this.FieldC) + `,`, + `FieldD:` + fmt.Sprintf("%v", this.FieldD) + `,`, + `FieldE:` + fmt.Sprintf("%v", this.FieldE) + `,`, + `FieldF:` + fmt.Sprintf("%v", this.FieldF) + `,`, + `FieldG:` + fmt.Sprintf("%v", this.FieldG) + `,`, + `FieldH:` + fmt.Sprintf("%v", this.FieldH) + `,`, + `FieldI:` + fmt.Sprintf("%v", this.FieldI) + `,`, + `FieldJ:` + fmt.Sprintf("%v", this.FieldJ) + `,`, + `FieldK:` + fmt.Sprintf("%v", this.FieldK) + `,`, + `FieldL:` + fmt.Sprintf("%v", this.FieldL) + `,`, + `FieldM:` + fmt.Sprintf("%v", this.FieldM) + `,`, + `FieldN:` + fmt.Sprintf("%v", this.FieldN) + `,`, + `FieldO:` + fmt.Sprintf("%v", this.FieldO) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *CustomNameNinStruct) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&CustomNameNinStruct{`, + `FieldA:` + valueToStringThetest(this.FieldA) + `,`, + `FieldB:` + valueToStringThetest(this.FieldB) + `,`, + `FieldC:` + strings.Replace(fmt.Sprintf("%v", this.FieldC), "NidOptNative", "NidOptNative", 1) + `,`, + `FieldD:` + strings.Replace(fmt.Sprintf("%v", this.FieldD), "NinOptNative", "NinOptNative", 1) + `,`, + `FieldE:` + valueToStringThetest(this.FieldE) + `,`, + `FieldF:` + valueToStringThetest(this.FieldF) + `,`, + `FieldG:` + strings.Replace(fmt.Sprintf("%v", this.FieldG), "NidOptNative", "NidOptNative", 1) + `,`, + `FieldH:` + valueToStringThetest(this.FieldH) + `,`, + `FieldI:` + valueToStringThetest(this.FieldI) + `,`, + `FieldJ:` + valueToStringThetest(this.FieldJ) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *CustomNameCustomType) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&CustomNameCustomType{`, + `FieldA:` + valueToStringThetest(this.FieldA) + `,`, + `FieldB:` + valueToStringThetest(this.FieldB) + `,`, + `FieldC:` + fmt.Sprintf("%v", this.FieldC) + `,`, + `FieldD:` + fmt.Sprintf("%v", this.FieldD) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *CustomNameNinEmbeddedStructUnion) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&CustomNameNinEmbeddedStructUnion{`, + `NidOptNative:` + strings.Replace(fmt.Sprintf("%v", this.NidOptNative), "NidOptNative", "NidOptNative", 1) + `,`, + `FieldA:` + strings.Replace(fmt.Sprintf("%v", this.FieldA), "NinOptNative", "NinOptNative", 1) + `,`, + `FieldB:` + valueToStringThetest(this.FieldB) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *CustomNameEnum) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&CustomNameEnum{`, + `FieldA:` + valueToStringThetest(this.FieldA) + `,`, + `FieldB:` + fmt.Sprintf("%v", this.FieldB) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NoExtensionsMap) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NoExtensionsMap{`, + `Field1:` + valueToStringThetest(this.Field1) + `,`, + `XXX_extensions:` + proto.StringFromExtensionsBytes(this.XXX_extensions) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *Unrecognized) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&Unrecognized{`, + `Field1:` + valueToStringThetest(this.Field1) + `,`, + `}`, + }, "") + return s +} +func (this *UnrecognizedWithInner) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&UnrecognizedWithInner{`, + `Embedded:` + strings.Replace(fmt.Sprintf("%v", this.Embedded), "UnrecognizedWithInner_Inner", "UnrecognizedWithInner_Inner", 1) + `,`, + `Field2:` + valueToStringThetest(this.Field2) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *UnrecognizedWithInner_Inner) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&UnrecognizedWithInner_Inner{`, + `Field1:` + valueToStringThetest(this.Field1) + `,`, + `}`, + }, "") + return s +} +func (this *UnrecognizedWithEmbed) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&UnrecognizedWithEmbed{`, + `UnrecognizedWithEmbed_Embedded:` + strings.Replace(strings.Replace(this.UnrecognizedWithEmbed_Embedded.String(), "UnrecognizedWithEmbed_Embedded", "UnrecognizedWithEmbed_Embedded", 1), `&`, ``, 1) + `,`, + `Field2:` + valueToStringThetest(this.Field2) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *UnrecognizedWithEmbed_Embedded) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&UnrecognizedWithEmbed_Embedded{`, + `Field1:` + valueToStringThetest(this.Field1) + `,`, + `}`, + }, "") + return s +} +func (this *Node) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&Node{`, + `Label:` + valueToStringThetest(this.Label) + `,`, + `Children:` + strings.Replace(fmt.Sprintf("%v", this.Children), "Node", "Node", 1) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func valueToStringThetest(v interface{}) string { + rv := reflect.ValueOf(v) + if rv.IsNil() { + return "nil" + } + pv := reflect.Indirect(rv).Interface() + return fmt.Sprintf("*%v", pv) +} +func (this *NinOptNativeUnion) GetValue() interface{} { + if this.Field1 != nil { + return this.Field1 + } + if this.Field2 != nil { + return this.Field2 + } + if this.Field3 != nil { + return this.Field3 + } + if this.Field4 != nil { + return this.Field4 + } + if this.Field5 != nil { + return this.Field5 + } + if this.Field6 != nil { + return this.Field6 + } + if this.Field13 != nil { + return this.Field13 + } + if this.Field14 != nil { + return this.Field14 + } + if this.Field15 != nil { + return this.Field15 + } + return nil +} + +func (this *NinOptNativeUnion) SetValue(value interface{}) bool { + switch vt := value.(type) { + case *float64: + this.Field1 = vt + case *float32: + this.Field2 = vt + case *int32: + this.Field3 = vt + case *int64: + this.Field4 = vt + case *uint32: + this.Field5 = vt + case *uint64: + this.Field6 = vt + case *bool: + this.Field13 = vt + case *string: + this.Field14 = vt + case []byte: + this.Field15 = vt + default: + return false + } + return true +} +func (this *NinOptStructUnion) GetValue() interface{} { + if this.Field1 != nil { + return this.Field1 + } + if this.Field2 != nil { + return this.Field2 + } + if this.Field3 != nil { + return this.Field3 + } + if this.Field4 != nil { + return this.Field4 + } + if this.Field6 != nil { + return this.Field6 + } + if this.Field7 != nil { + return this.Field7 + } + if this.Field13 != nil { + return this.Field13 + } + if this.Field14 != nil { + return this.Field14 + } + if this.Field15 != nil { + return this.Field15 + } + return nil +} + +func (this *NinOptStructUnion) SetValue(value interface{}) bool { + switch vt := value.(type) { + case *float64: + this.Field1 = vt + case *float32: + this.Field2 = vt + case *NidOptNative: + this.Field3 = vt + case *NinOptNative: + this.Field4 = vt + case *uint64: + this.Field6 = vt + case *int32: + this.Field7 = vt + case *bool: + this.Field13 = vt + case *string: + this.Field14 = vt + case []byte: + this.Field15 = vt + default: + return false + } + return true +} +func (this *NinEmbeddedStructUnion) GetValue() interface{} { + if this.NidOptNative != nil { + return this.NidOptNative + } + if this.Field200 != nil { + return this.Field200 + } + if this.Field210 != nil { + return this.Field210 + } + return nil +} + +func (this *NinEmbeddedStructUnion) SetValue(value interface{}) bool { + switch vt := value.(type) { + case *NidOptNative: + this.NidOptNative = vt + case *NinOptNative: + this.Field200 = vt + case *bool: + this.Field210 = vt + default: + return false + } + return true +} +func (this *NinNestedStructUnion) GetValue() interface{} { + if this.Field1 != nil { + return this.Field1 + } + if this.Field2 != nil { + return this.Field2 + } + if this.Field3 != nil { + return this.Field3 + } + return nil +} + +func (this *NinNestedStructUnion) SetValue(value interface{}) bool { + switch vt := value.(type) { + case *NinOptNativeUnion: + this.Field1 = vt + case *NinOptStructUnion: + this.Field2 = vt + case *NinEmbeddedStructUnion: + this.Field3 = vt + default: + this.Field1 = new(NinOptNativeUnion) + if set := this.Field1.SetValue(value); set { + return true + } + this.Field1 = nil + this.Field2 = new(NinOptStructUnion) + if set := this.Field2.SetValue(value); set { + return true + } + this.Field2 = nil + this.Field3 = new(NinEmbeddedStructUnion) + if set := this.Field3.SetValue(value); set { + return true + } + this.Field3 = nil + return false + } + return true +} +func (this *Tree) GetValue() interface{} { + if this.Or != nil { + return this.Or + } + if this.And != nil { + return this.And + } + if this.Leaf != nil { + return this.Leaf + } + return nil +} + +func (this *Tree) SetValue(value interface{}) bool { + switch vt := value.(type) { + case *OrBranch: + this.Or = vt + case *AndBranch: + this.And = vt + case *Leaf: + this.Leaf = vt + default: + return false + } + return true +} +func (this *DeepTree) GetValue() interface{} { + if this.Down != nil { + return this.Down + } + if this.And != nil { + return this.And + } + if this.Leaf != nil { + return this.Leaf + } + return nil +} + +func (this *DeepTree) SetValue(value interface{}) bool { + switch vt := value.(type) { + case *ADeepBranch: + this.Down = vt + case *AndDeepBranch: + this.And = vt + case *DeepLeaf: + this.Leaf = vt + default: + return false + } + return true +} +func (this *CustomNameNinEmbeddedStructUnion) GetValue() interface{} { + if this.NidOptNative != nil { + return this.NidOptNative + } + if this.FieldA != nil { + return this.FieldA + } + if this.FieldB != nil { + return this.FieldB + } + return nil +} + +func (this *CustomNameNinEmbeddedStructUnion) SetValue(value interface{}) bool { + switch vt := value.(type) { + case *NidOptNative: + this.NidOptNative = vt + case *NinOptNative: + this.FieldA = vt + case *bool: + this.FieldB = vt + default: + return false + } + return true +} +func (m *NidOptNative) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *NidOptNative) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + data[i] = 0x9 + i++ + *(*float64)(unsafe.Pointer(&data[i])) = m.Field1 + i += 8 + data[i] = 0x15 + i++ + *(*float32)(unsafe.Pointer(&data[i])) = m.Field2 + i += 4 + data[i] = 0x18 + i++ + i = encodeVarintThetest(data, i, uint64(m.Field3)) + data[i] = 0x20 + i++ + i = encodeVarintThetest(data, i, uint64(m.Field4)) + data[i] = 0x28 + i++ + i = encodeVarintThetest(data, i, uint64(m.Field5)) + data[i] = 0x30 + i++ + i = encodeVarintThetest(data, i, uint64(m.Field6)) + data[i] = 0x38 + i++ + i = encodeVarintThetest(data, i, uint64((uint32(m.Field7)<<1)^uint32((m.Field7>>31)))) + data[i] = 0x40 + i++ + i = encodeVarintThetest(data, i, uint64((uint64(m.Field8)<<1)^uint64((m.Field8>>63)))) + data[i] = 0x4d + i++ + *(*uint32)(unsafe.Pointer(&data[i])) = m.Field9 + i += 4 + data[i] = 0x55 + i++ + *(*int32)(unsafe.Pointer(&data[i])) = m.Field10 + i += 4 + data[i] = 0x59 + i++ + *(*uint64)(unsafe.Pointer(&data[i])) = m.Field11 + i += 8 + data[i] = 0x61 + i++ + *(*int64)(unsafe.Pointer(&data[i])) = m.Field12 + i += 8 + data[i] = 0x68 + i++ + if m.Field13 { + data[i] = 1 + } else { + data[i] = 0 + } + i++ + data[i] = 0x72 + i++ + i = encodeVarintThetest(data, i, uint64(len(m.Field14))) + i += copy(data[i:], m.Field14) + if m.Field15 != nil { + data[i] = 0x7a + i++ + i = encodeVarintThetest(data, i, uint64(len(m.Field15))) + i += copy(data[i:], m.Field15) + } + if m.XXX_unrecognized != nil { + i += copy(data[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *NinOptNative) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *NinOptNative) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Field1 != nil { + data[i] = 0x9 + i++ + *(*float64)(unsafe.Pointer(&data[i])) = *m.Field1 + i += 8 + } + if m.Field2 != nil { + data[i] = 0x15 + i++ + *(*float32)(unsafe.Pointer(&data[i])) = *m.Field2 + i += 4 + } + if m.Field3 != nil { + data[i] = 0x18 + i++ + i = encodeVarintThetest(data, i, uint64(*m.Field3)) + } + if m.Field4 != nil { + data[i] = 0x20 + i++ + i = encodeVarintThetest(data, i, uint64(*m.Field4)) + } + if m.Field5 != nil { + data[i] = 0x28 + i++ + i = encodeVarintThetest(data, i, uint64(*m.Field5)) + } + if m.Field6 != nil { + data[i] = 0x30 + i++ + i = encodeVarintThetest(data, i, uint64(*m.Field6)) + } + if m.Field7 != nil { + data[i] = 0x38 + i++ + i = encodeVarintThetest(data, i, uint64((uint32(*m.Field7)<<1)^uint32((*m.Field7>>31)))) + } + if m.Field8 != nil { + data[i] = 0x40 + i++ + i = encodeVarintThetest(data, i, uint64((uint64(*m.Field8)<<1)^uint64((*m.Field8>>63)))) + } + if m.Field9 != nil { + data[i] = 0x4d + i++ + *(*uint32)(unsafe.Pointer(&data[i])) = *m.Field9 + i += 4 + } + if m.Field10 != nil { + data[i] = 0x55 + i++ + *(*int32)(unsafe.Pointer(&data[i])) = *m.Field10 + i += 4 + } + if m.Field11 != nil { + data[i] = 0x59 + i++ + *(*uint64)(unsafe.Pointer(&data[i])) = *m.Field11 + i += 8 + } + if m.Field12 != nil { + data[i] = 0x61 + i++ + *(*int64)(unsafe.Pointer(&data[i])) = *m.Field12 + i += 8 + } + if m.Field13 != nil { + data[i] = 0x68 + i++ + if *m.Field13 { + data[i] = 1 + } else { + data[i] = 0 + } + i++ + } + if m.Field14 != nil { + data[i] = 0x72 + i++ + i = encodeVarintThetest(data, i, uint64(len(*m.Field14))) + i += copy(data[i:], *m.Field14) + } + if m.Field15 != nil { + data[i] = 0x7a + i++ + i = encodeVarintThetest(data, i, uint64(len(m.Field15))) + i += copy(data[i:], m.Field15) + } + if m.XXX_unrecognized != nil { + i += copy(data[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *NidRepNative) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *NidRepNative) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Field1) > 0 { + for _, num := range m.Field1 { + data[i] = 0x9 + i++ + *(*float64)(unsafe.Pointer(&data[i])) = num + i += 8 + } + } + if len(m.Field2) > 0 { + for _, num := range m.Field2 { + data[i] = 0x15 + i++ + *(*float32)(unsafe.Pointer(&data[i])) = num + i += 4 + } + } + if len(m.Field3) > 0 { + for _, num := range m.Field3 { + data[i] = 0x18 + i++ + i = encodeVarintThetest(data, i, uint64(num)) + } + } + if len(m.Field4) > 0 { + for _, num := range m.Field4 { + data[i] = 0x20 + i++ + i = encodeVarintThetest(data, i, uint64(num)) + } + } + if len(m.Field5) > 0 { + for _, num := range m.Field5 { + data[i] = 0x28 + i++ + i = encodeVarintThetest(data, i, uint64(num)) + } + } + if len(m.Field6) > 0 { + for _, num := range m.Field6 { + data[i] = 0x30 + i++ + i = encodeVarintThetest(data, i, uint64(num)) + } + } + if len(m.Field7) > 0 { + for _, num := range m.Field7 { + data[i] = 0x38 + i++ + x1 := (uint32(num) << 1) ^ uint32((num >> 31)) + for x1 >= 1<<7 { + data[i] = uint8(uint64(x1)&0x7f | 0x80) + x1 >>= 7 + i++ + } + data[i] = uint8(x1) + i++ + } + } + if len(m.Field8) > 0 { + for _, num := range m.Field8 { + data[i] = 0x40 + i++ + x2 := (uint64(num) << 1) ^ uint64((num >> 63)) + for x2 >= 1<<7 { + data[i] = uint8(uint64(x2)&0x7f | 0x80) + x2 >>= 7 + i++ + } + data[i] = uint8(x2) + i++ + } + } + if len(m.Field9) > 0 { + for _, num := range m.Field9 { + data[i] = 0x4d + i++ + *(*uint32)(unsafe.Pointer(&data[i])) = num + i += 4 + } + } + if len(m.Field10) > 0 { + for _, num := range m.Field10 { + data[i] = 0x55 + i++ + *(*int32)(unsafe.Pointer(&data[i])) = num + i += 4 + } + } + if len(m.Field11) > 0 { + for _, num := range m.Field11 { + data[i] = 0x59 + i++ + *(*uint64)(unsafe.Pointer(&data[i])) = num + i += 8 + } + } + if len(m.Field12) > 0 { + for _, num := range m.Field12 { + data[i] = 0x61 + i++ + *(*int64)(unsafe.Pointer(&data[i])) = num + i += 8 + } + } + if len(m.Field13) > 0 { + for _, b := range m.Field13 { + data[i] = 0x68 + i++ + if b { + data[i] = 1 + } else { + data[i] = 0 + } + i++ + } + } + if len(m.Field14) > 0 { + for _, s := range m.Field14 { + data[i] = 0x72 + 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 len(m.Field15) > 0 { + for _, b := range m.Field15 { + data[i] = 0x7a + i++ + i = encodeVarintThetest(data, i, uint64(len(b))) + i += copy(data[i:], b) + } + } + if m.XXX_unrecognized != nil { + i += copy(data[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *NinRepNative) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *NinRepNative) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Field1) > 0 { + for _, num := range m.Field1 { + data[i] = 0x9 + i++ + *(*float64)(unsafe.Pointer(&data[i])) = num + i += 8 + } + } + if len(m.Field2) > 0 { + for _, num := range m.Field2 { + data[i] = 0x15 + i++ + *(*float32)(unsafe.Pointer(&data[i])) = num + i += 4 + } + } + if len(m.Field3) > 0 { + for _, num := range m.Field3 { + data[i] = 0x18 + i++ + i = encodeVarintThetest(data, i, uint64(num)) + } + } + if len(m.Field4) > 0 { + for _, num := range m.Field4 { + data[i] = 0x20 + i++ + i = encodeVarintThetest(data, i, uint64(num)) + } + } + if len(m.Field5) > 0 { + for _, num := range m.Field5 { + data[i] = 0x28 + i++ + i = encodeVarintThetest(data, i, uint64(num)) + } + } + if len(m.Field6) > 0 { + for _, num := range m.Field6 { + data[i] = 0x30 + i++ + i = encodeVarintThetest(data, i, uint64(num)) + } + } + if len(m.Field7) > 0 { + for _, num := range m.Field7 { + data[i] = 0x38 + i++ + x3 := (uint32(num) << 1) ^ uint32((num >> 31)) + for x3 >= 1<<7 { + data[i] = uint8(uint64(x3)&0x7f | 0x80) + x3 >>= 7 + i++ + } + data[i] = uint8(x3) + i++ + } + } + if len(m.Field8) > 0 { + for _, num := range m.Field8 { + data[i] = 0x40 + i++ + x4 := (uint64(num) << 1) ^ uint64((num >> 63)) + for x4 >= 1<<7 { + data[i] = uint8(uint64(x4)&0x7f | 0x80) + x4 >>= 7 + i++ + } + data[i] = uint8(x4) + i++ + } + } + if len(m.Field9) > 0 { + for _, num := range m.Field9 { + data[i] = 0x4d + i++ + *(*uint32)(unsafe.Pointer(&data[i])) = num + i += 4 + } + } + if len(m.Field10) > 0 { + for _, num := range m.Field10 { + data[i] = 0x55 + i++ + *(*int32)(unsafe.Pointer(&data[i])) = num + i += 4 + } + } + if len(m.Field11) > 0 { + for _, num := range m.Field11 { + data[i] = 0x59 + i++ + *(*uint64)(unsafe.Pointer(&data[i])) = num + i += 8 + } + } + if len(m.Field12) > 0 { + for _, num := range m.Field12 { + data[i] = 0x61 + i++ + *(*int64)(unsafe.Pointer(&data[i])) = num + i += 8 + } + } + if len(m.Field13) > 0 { + for _, b := range m.Field13 { + data[i] = 0x68 + i++ + if b { + data[i] = 1 + } else { + data[i] = 0 + } + i++ + } + } + if len(m.Field14) > 0 { + for _, s := range m.Field14 { + data[i] = 0x72 + 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 len(m.Field15) > 0 { + for _, b := range m.Field15 { + data[i] = 0x7a + i++ + i = encodeVarintThetest(data, i, uint64(len(b))) + i += copy(data[i:], b) + } + } + if m.XXX_unrecognized != nil { + i += copy(data[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *NidRepPackedNative) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *NidRepPackedNative) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Field1) > 0 { + data[i] = 0xa + i++ + i = encodeVarintThetest(data, i, uint64(len(m.Field1)*8)) + for _, num := range m.Field1 { + *(*float64)(unsafe.Pointer(&data[i])) = num + i += 8 + } + } + if len(m.Field2) > 0 { + data[i] = 0x12 + i++ + i = encodeVarintThetest(data, i, uint64(len(m.Field2)*4)) + for _, num := range m.Field2 { + *(*float32)(unsafe.Pointer(&data[i])) = num + i += 4 + } + } + if len(m.Field3) > 0 { + data6 := make([]byte, len(m.Field3)*10) + var j5 int + for _, num1 := range m.Field3 { + num := uint64(num1) + for num >= 1<<7 { + data6[j5] = uint8(uint64(num)&0x7f | 0x80) + num >>= 7 + j5++ + } + data6[j5] = uint8(num) + j5++ + } + data[i] = 0x1a + i++ + i = encodeVarintThetest(data, i, uint64(j5)) + i += copy(data[i:], data6[:j5]) + } + if len(m.Field4) > 0 { + data8 := make([]byte, len(m.Field4)*10) + var j7 int + for _, num1 := range m.Field4 { + num := uint64(num1) + for num >= 1<<7 { + data8[j7] = uint8(uint64(num)&0x7f | 0x80) + num >>= 7 + j7++ + } + data8[j7] = uint8(num) + j7++ + } + data[i] = 0x22 + i++ + i = encodeVarintThetest(data, i, uint64(j7)) + i += copy(data[i:], data8[:j7]) + } + if len(m.Field5) > 0 { + data10 := make([]byte, len(m.Field5)*10) + var j9 int + for _, num := range m.Field5 { + for num >= 1<<7 { + data10[j9] = uint8(uint64(num)&0x7f | 0x80) + num >>= 7 + j9++ + } + data10[j9] = uint8(num) + j9++ + } + data[i] = 0x2a + i++ + i = encodeVarintThetest(data, i, uint64(j9)) + i += copy(data[i:], data10[:j9]) + } + if len(m.Field6) > 0 { + data12 := make([]byte, len(m.Field6)*10) + var j11 int + for _, num := range m.Field6 { + for num >= 1<<7 { + data12[j11] = uint8(uint64(num)&0x7f | 0x80) + num >>= 7 + j11++ + } + data12[j11] = uint8(num) + j11++ + } + data[i] = 0x32 + i++ + i = encodeVarintThetest(data, i, uint64(j11)) + i += copy(data[i:], data12[:j11]) + } + if len(m.Field7) > 0 { + data13 := make([]byte, len(m.Field7)*5) + var j14 int + for _, num := range m.Field7 { + x15 := (uint32(num) << 1) ^ uint32((num >> 31)) + for x15 >= 1<<7 { + data13[j14] = uint8(uint64(x15)&0x7f | 0x80) + j14++ + x15 >>= 7 + } + data13[j14] = uint8(x15) + j14++ + } + data[i] = 0x3a + i++ + i = encodeVarintThetest(data, i, uint64(j14)) + i += copy(data[i:], data13[:j14]) + } + if len(m.Field8) > 0 { + var j16 int + data18 := make([]byte, len(m.Field8)*10) + for _, num := range m.Field8 { + x17 := (uint64(num) << 1) ^ uint64((num >> 63)) + for x17 >= 1<<7 { + data18[j16] = uint8(uint64(x17)&0x7f | 0x80) + j16++ + x17 >>= 7 + } + data18[j16] = uint8(x17) + j16++ + } + data[i] = 0x42 + i++ + i = encodeVarintThetest(data, i, uint64(j16)) + i += copy(data[i:], data18[:j16]) + } + if len(m.Field9) > 0 { + data[i] = 0x4a + i++ + i = encodeVarintThetest(data, i, uint64(len(m.Field9)*4)) + for _, num := range m.Field9 { + *(*uint32)(unsafe.Pointer(&data[i])) = num + i += 4 + } + } + if len(m.Field10) > 0 { + data[i] = 0x52 + i++ + i = encodeVarintThetest(data, i, uint64(len(m.Field10)*4)) + for _, num := range m.Field10 { + *(*int32)(unsafe.Pointer(&data[i])) = num + i += 4 + } + } + if len(m.Field11) > 0 { + data[i] = 0x5a + i++ + i = encodeVarintThetest(data, i, uint64(len(m.Field11)*8)) + for _, num := range m.Field11 { + *(*uint64)(unsafe.Pointer(&data[i])) = num + i += 8 + } + } + if len(m.Field12) > 0 { + data[i] = 0x62 + i++ + i = encodeVarintThetest(data, i, uint64(len(m.Field12)*8)) + for _, num := range m.Field12 { + *(*int64)(unsafe.Pointer(&data[i])) = num + i += 8 + } + } + if len(m.Field13) > 0 { + data[i] = 0x6a + i++ + i = encodeVarintThetest(data, i, uint64(len(m.Field13))) + for _, b := range m.Field13 { + if b { + data[i] = 1 + } else { + data[i] = 0 + } + i++ + } + } + if m.XXX_unrecognized != nil { + i += copy(data[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *NinRepPackedNative) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *NinRepPackedNative) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Field1) > 0 { + data[i] = 0xa + i++ + i = encodeVarintThetest(data, i, uint64(len(m.Field1)*8)) + for _, num := range m.Field1 { + *(*float64)(unsafe.Pointer(&data[i])) = num + i += 8 + } + } + if len(m.Field2) > 0 { + data[i] = 0x12 + i++ + i = encodeVarintThetest(data, i, uint64(len(m.Field2)*4)) + for _, num := range m.Field2 { + *(*float32)(unsafe.Pointer(&data[i])) = num + i += 4 + } + } + if len(m.Field3) > 0 { + data20 := make([]byte, len(m.Field3)*10) + var j19 int + for _, num1 := range m.Field3 { + num := uint64(num1) + for num >= 1<<7 { + data20[j19] = uint8(uint64(num)&0x7f | 0x80) + num >>= 7 + j19++ + } + data20[j19] = uint8(num) + j19++ + } + data[i] = 0x1a + i++ + i = encodeVarintThetest(data, i, uint64(j19)) + i += copy(data[i:], data20[:j19]) + } + if len(m.Field4) > 0 { + data22 := make([]byte, len(m.Field4)*10) + var j21 int + for _, num1 := range m.Field4 { + num := uint64(num1) + for num >= 1<<7 { + data22[j21] = uint8(uint64(num)&0x7f | 0x80) + num >>= 7 + j21++ + } + data22[j21] = uint8(num) + j21++ + } + data[i] = 0x22 + i++ + i = encodeVarintThetest(data, i, uint64(j21)) + i += copy(data[i:], data22[:j21]) + } + if len(m.Field5) > 0 { + data24 := make([]byte, len(m.Field5)*10) + var j23 int + for _, num := range m.Field5 { + for num >= 1<<7 { + data24[j23] = uint8(uint64(num)&0x7f | 0x80) + num >>= 7 + j23++ + } + data24[j23] = uint8(num) + j23++ + } + data[i] = 0x2a + i++ + i = encodeVarintThetest(data, i, uint64(j23)) + i += copy(data[i:], data24[:j23]) + } + if len(m.Field6) > 0 { + data26 := make([]byte, len(m.Field6)*10) + var j25 int + for _, num := range m.Field6 { + for num >= 1<<7 { + data26[j25] = uint8(uint64(num)&0x7f | 0x80) + num >>= 7 + j25++ + } + data26[j25] = uint8(num) + j25++ + } + data[i] = 0x32 + i++ + i = encodeVarintThetest(data, i, uint64(j25)) + i += copy(data[i:], data26[:j25]) + } + if len(m.Field7) > 0 { + data27 := make([]byte, len(m.Field7)*5) + var j28 int + for _, num := range m.Field7 { + x29 := (uint32(num) << 1) ^ uint32((num >> 31)) + for x29 >= 1<<7 { + data27[j28] = uint8(uint64(x29)&0x7f | 0x80) + j28++ + x29 >>= 7 + } + data27[j28] = uint8(x29) + j28++ + } + data[i] = 0x3a + i++ + i = encodeVarintThetest(data, i, uint64(j28)) + i += copy(data[i:], data27[:j28]) + } + if len(m.Field8) > 0 { + var j30 int + data32 := make([]byte, len(m.Field8)*10) + for _, num := range m.Field8 { + x31 := (uint64(num) << 1) ^ uint64((num >> 63)) + for x31 >= 1<<7 { + data32[j30] = uint8(uint64(x31)&0x7f | 0x80) + j30++ + x31 >>= 7 + } + data32[j30] = uint8(x31) + j30++ + } + data[i] = 0x42 + i++ + i = encodeVarintThetest(data, i, uint64(j30)) + i += copy(data[i:], data32[:j30]) + } + if len(m.Field9) > 0 { + data[i] = 0x4a + i++ + i = encodeVarintThetest(data, i, uint64(len(m.Field9)*4)) + for _, num := range m.Field9 { + *(*uint32)(unsafe.Pointer(&data[i])) = num + i += 4 + } + } + if len(m.Field10) > 0 { + data[i] = 0x52 + i++ + i = encodeVarintThetest(data, i, uint64(len(m.Field10)*4)) + for _, num := range m.Field10 { + *(*int32)(unsafe.Pointer(&data[i])) = num + i += 4 + } + } + if len(m.Field11) > 0 { + data[i] = 0x5a + i++ + i = encodeVarintThetest(data, i, uint64(len(m.Field11)*8)) + for _, num := range m.Field11 { + *(*uint64)(unsafe.Pointer(&data[i])) = num + i += 8 + } + } + if len(m.Field12) > 0 { + data[i] = 0x62 + i++ + i = encodeVarintThetest(data, i, uint64(len(m.Field12)*8)) + for _, num := range m.Field12 { + *(*int64)(unsafe.Pointer(&data[i])) = num + i += 8 + } + } + if len(m.Field13) > 0 { + data[i] = 0x6a + i++ + i = encodeVarintThetest(data, i, uint64(len(m.Field13))) + for _, b := range m.Field13 { + if b { + data[i] = 1 + } else { + data[i] = 0 + } + i++ + } + } + if m.XXX_unrecognized != nil { + i += copy(data[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *NidOptStruct) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *NidOptStruct) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + data[i] = 0x9 + i++ + *(*float64)(unsafe.Pointer(&data[i])) = m.Field1 + i += 8 + data[i] = 0x15 + i++ + *(*float32)(unsafe.Pointer(&data[i])) = m.Field2 + i += 4 + data[i] = 0x1a + i++ + i = encodeVarintThetest(data, i, uint64(m.Field3.Size())) + n33, err := m.Field3.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n33 + data[i] = 0x22 + i++ + i = encodeVarintThetest(data, i, uint64(m.Field4.Size())) + n34, err := m.Field4.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n34 + data[i] = 0x30 + i++ + i = encodeVarintThetest(data, i, uint64(m.Field6)) + data[i] = 0x38 + i++ + i = encodeVarintThetest(data, i, uint64((uint32(m.Field7)<<1)^uint32((m.Field7>>31)))) + data[i] = 0x42 + i++ + i = encodeVarintThetest(data, i, uint64(m.Field8.Size())) + n35, err := m.Field8.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n35 + data[i] = 0x68 + i++ + if m.Field13 { + data[i] = 1 + } else { + data[i] = 0 + } + i++ + data[i] = 0x72 + i++ + i = encodeVarintThetest(data, i, uint64(len(m.Field14))) + i += copy(data[i:], m.Field14) + if m.Field15 != nil { + data[i] = 0x7a + i++ + i = encodeVarintThetest(data, i, uint64(len(m.Field15))) + i += copy(data[i:], m.Field15) + } + if m.XXX_unrecognized != nil { + i += copy(data[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *NinOptStruct) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *NinOptStruct) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Field1 != nil { + data[i] = 0x9 + i++ + *(*float64)(unsafe.Pointer(&data[i])) = *m.Field1 + i += 8 + } + if m.Field2 != nil { + data[i] = 0x15 + i++ + *(*float32)(unsafe.Pointer(&data[i])) = *m.Field2 + i += 4 + } + if m.Field3 != nil { + data[i] = 0x1a + i++ + i = encodeVarintThetest(data, i, uint64(m.Field3.Size())) + n36, err := m.Field3.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n36 + } + if m.Field4 != nil { + data[i] = 0x22 + i++ + i = encodeVarintThetest(data, i, uint64(m.Field4.Size())) + n37, err := m.Field4.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n37 + } + if m.Field6 != nil { + data[i] = 0x30 + i++ + i = encodeVarintThetest(data, i, uint64(*m.Field6)) + } + if m.Field7 != nil { + data[i] = 0x38 + i++ + i = encodeVarintThetest(data, i, uint64((uint32(*m.Field7)<<1)^uint32((*m.Field7>>31)))) + } + if m.Field8 != nil { + data[i] = 0x42 + i++ + i = encodeVarintThetest(data, i, uint64(m.Field8.Size())) + n38, err := m.Field8.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n38 + } + if m.Field13 != nil { + data[i] = 0x68 + i++ + if *m.Field13 { + data[i] = 1 + } else { + data[i] = 0 + } + i++ + } + if m.Field14 != nil { + data[i] = 0x72 + i++ + i = encodeVarintThetest(data, i, uint64(len(*m.Field14))) + i += copy(data[i:], *m.Field14) + } + if m.Field15 != nil { + data[i] = 0x7a + i++ + i = encodeVarintThetest(data, i, uint64(len(m.Field15))) + i += copy(data[i:], m.Field15) + } + if m.XXX_unrecognized != nil { + i += copy(data[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *NidRepStruct) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *NidRepStruct) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Field1) > 0 { + for _, num := range m.Field1 { + data[i] = 0x9 + i++ + *(*float64)(unsafe.Pointer(&data[i])) = num + i += 8 + } + } + if len(m.Field2) > 0 { + for _, num := range m.Field2 { + data[i] = 0x15 + i++ + *(*float32)(unsafe.Pointer(&data[i])) = num + i += 4 + } + } + if len(m.Field3) > 0 { + for _, msg := range m.Field3 { + data[i] = 0x1a + i++ + i = encodeVarintThetest(data, i, uint64(msg.Size())) + n, err := msg.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n + } + } + if len(m.Field4) > 0 { + for _, msg := range m.Field4 { + data[i] = 0x22 + i++ + i = encodeVarintThetest(data, i, uint64(msg.Size())) + n, err := msg.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n + } + } + if len(m.Field6) > 0 { + for _, num := range m.Field6 { + data[i] = 0x30 + i++ + i = encodeVarintThetest(data, i, uint64(num)) + } + } + if len(m.Field7) > 0 { + for _, num := range m.Field7 { + data[i] = 0x38 + i++ + x39 := (uint32(num) << 1) ^ uint32((num >> 31)) + for x39 >= 1<<7 { + data[i] = uint8(uint64(x39)&0x7f | 0x80) + x39 >>= 7 + i++ + } + data[i] = uint8(x39) + i++ + } + } + if len(m.Field8) > 0 { + for _, msg := range m.Field8 { + data[i] = 0x42 + i++ + i = encodeVarintThetest(data, i, uint64(msg.Size())) + n, err := msg.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n + } + } + if len(m.Field13) > 0 { + for _, b := range m.Field13 { + data[i] = 0x68 + i++ + if b { + data[i] = 1 + } else { + data[i] = 0 + } + i++ + } + } + if len(m.Field14) > 0 { + for _, s := range m.Field14 { + data[i] = 0x72 + 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 len(m.Field15) > 0 { + for _, b := range m.Field15 { + data[i] = 0x7a + i++ + i = encodeVarintThetest(data, i, uint64(len(b))) + i += copy(data[i:], b) + } + } + if m.XXX_unrecognized != nil { + i += copy(data[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *NinRepStruct) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *NinRepStruct) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Field1) > 0 { + for _, num := range m.Field1 { + data[i] = 0x9 + i++ + *(*float64)(unsafe.Pointer(&data[i])) = num + i += 8 + } + } + if len(m.Field2) > 0 { + for _, num := range m.Field2 { + data[i] = 0x15 + i++ + *(*float32)(unsafe.Pointer(&data[i])) = num + i += 4 + } + } + if len(m.Field3) > 0 { + for _, msg := range m.Field3 { + data[i] = 0x1a + i++ + i = encodeVarintThetest(data, i, uint64(msg.Size())) + n, err := msg.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n + } + } + if len(m.Field4) > 0 { + for _, msg := range m.Field4 { + data[i] = 0x22 + i++ + i = encodeVarintThetest(data, i, uint64(msg.Size())) + n, err := msg.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n + } + } + if len(m.Field6) > 0 { + for _, num := range m.Field6 { + data[i] = 0x30 + i++ + i = encodeVarintThetest(data, i, uint64(num)) + } + } + if len(m.Field7) > 0 { + for _, num := range m.Field7 { + data[i] = 0x38 + i++ + x40 := (uint32(num) << 1) ^ uint32((num >> 31)) + for x40 >= 1<<7 { + data[i] = uint8(uint64(x40)&0x7f | 0x80) + x40 >>= 7 + i++ + } + data[i] = uint8(x40) + i++ + } + } + if len(m.Field8) > 0 { + for _, msg := range m.Field8 { + data[i] = 0x42 + i++ + i = encodeVarintThetest(data, i, uint64(msg.Size())) + n, err := msg.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n + } + } + if len(m.Field13) > 0 { + for _, b := range m.Field13 { + data[i] = 0x68 + i++ + if b { + data[i] = 1 + } else { + data[i] = 0 + } + i++ + } + } + if len(m.Field14) > 0 { + for _, s := range m.Field14 { + data[i] = 0x72 + 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 len(m.Field15) > 0 { + for _, b := range m.Field15 { + data[i] = 0x7a + i++ + i = encodeVarintThetest(data, i, uint64(len(b))) + i += copy(data[i:], b) + } + } + if m.XXX_unrecognized != nil { + i += copy(data[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *NidEmbeddedStruct) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *NidEmbeddedStruct) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.NidOptNative != nil { + data[i] = 0xa + i++ + i = encodeVarintThetest(data, i, uint64(m.NidOptNative.Size())) + n41, err := m.NidOptNative.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n41 + } + data[i] = 0xc2 + i++ + data[i] = 0xc + i++ + i = encodeVarintThetest(data, i, uint64(m.Field200.Size())) + n42, err := m.Field200.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n42 + data[i] = 0x90 + i++ + data[i] = 0xd + i++ + if m.Field210 { + data[i] = 1 + } else { + data[i] = 0 + } + i++ + if m.XXX_unrecognized != nil { + i += copy(data[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *NinEmbeddedStruct) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *NinEmbeddedStruct) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.NidOptNative != nil { + data[i] = 0xa + i++ + i = encodeVarintThetest(data, i, uint64(m.NidOptNative.Size())) + n43, err := m.NidOptNative.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n43 + } + if m.Field200 != nil { + data[i] = 0xc2 + i++ + data[i] = 0xc + i++ + i = encodeVarintThetest(data, i, uint64(m.Field200.Size())) + n44, err := m.Field200.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n44 + } + if m.Field210 != nil { + data[i] = 0x90 + i++ + data[i] = 0xd + i++ + if *m.Field210 { + data[i] = 1 + } else { + data[i] = 0 + } + i++ + } + if m.XXX_unrecognized != nil { + i += copy(data[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *NidNestedStruct) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *NidNestedStruct) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + data[i] = 0xa + i++ + i = encodeVarintThetest(data, i, uint64(m.Field1.Size())) + n45, err := m.Field1.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n45 + if len(m.Field2) > 0 { + for _, msg := range m.Field2 { + data[i] = 0x12 + i++ + i = encodeVarintThetest(data, i, uint64(msg.Size())) + n, err := msg.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n + } + } + if m.XXX_unrecognized != nil { + i += copy(data[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *NinNestedStruct) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *NinNestedStruct) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Field1 != nil { + data[i] = 0xa + i++ + i = encodeVarintThetest(data, i, uint64(m.Field1.Size())) + n46, err := m.Field1.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n46 + } + if len(m.Field2) > 0 { + for _, msg := range m.Field2 { + data[i] = 0x12 + i++ + i = encodeVarintThetest(data, i, uint64(msg.Size())) + n, err := msg.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n + } + } + if m.XXX_unrecognized != nil { + i += copy(data[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *NidOptCustom) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *NidOptCustom) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + data[i] = 0xa + i++ + i = encodeVarintThetest(data, i, uint64(m.Id.Size())) + n47, err := m.Id.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n47 + data[i] = 0x12 + i++ + i = encodeVarintThetest(data, i, uint64(m.Value.Size())) + n48, err := m.Value.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n48 + if m.XXX_unrecognized != nil { + i += copy(data[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *CustomDash) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *CustomDash) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Value != nil { + data[i] = 0xa + i++ + i = encodeVarintThetest(data, i, uint64(m.Value.Size())) + n49, err := m.Value.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n49 + } + if m.XXX_unrecognized != nil { + i += copy(data[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *NinOptCustom) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *NinOptCustom) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Id != nil { + data[i] = 0xa + i++ + i = encodeVarintThetest(data, i, uint64(m.Id.Size())) + n50, err := m.Id.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n50 + } + if m.Value != nil { + data[i] = 0x12 + i++ + i = encodeVarintThetest(data, i, uint64(m.Value.Size())) + n51, err := m.Value.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n51 + } + if m.XXX_unrecognized != nil { + i += copy(data[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *NidRepCustom) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *NidRepCustom) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Id) > 0 { + for _, msg := range m.Id { + data[i] = 0xa + i++ + i = encodeVarintThetest(data, i, uint64(msg.Size())) + n, err := msg.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n + } + } + if len(m.Value) > 0 { + for _, msg := range m.Value { + data[i] = 0x12 + i++ + i = encodeVarintThetest(data, i, uint64(msg.Size())) + n, err := msg.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n + } + } + if m.XXX_unrecognized != nil { + i += copy(data[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *NinRepCustom) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *NinRepCustom) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Id) > 0 { + for _, msg := range m.Id { + data[i] = 0xa + i++ + i = encodeVarintThetest(data, i, uint64(msg.Size())) + n, err := msg.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n + } + } + if len(m.Value) > 0 { + for _, msg := range m.Value { + data[i] = 0x12 + i++ + i = encodeVarintThetest(data, i, uint64(msg.Size())) + n, err := msg.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n + } + } + if m.XXX_unrecognized != nil { + i += copy(data[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *NinOptNativeUnion) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *NinOptNativeUnion) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Field1 != nil { + data[i] = 0x9 + i++ + *(*float64)(unsafe.Pointer(&data[i])) = *m.Field1 + i += 8 + } + if m.Field2 != nil { + data[i] = 0x15 + i++ + *(*float32)(unsafe.Pointer(&data[i])) = *m.Field2 + i += 4 + } + if m.Field3 != nil { + data[i] = 0x18 + i++ + i = encodeVarintThetest(data, i, uint64(*m.Field3)) + } + if m.Field4 != nil { + data[i] = 0x20 + i++ + i = encodeVarintThetest(data, i, uint64(*m.Field4)) + } + if m.Field5 != nil { + data[i] = 0x28 + i++ + i = encodeVarintThetest(data, i, uint64(*m.Field5)) + } + if m.Field6 != nil { + data[i] = 0x30 + i++ + i = encodeVarintThetest(data, i, uint64(*m.Field6)) + } + if m.Field13 != nil { + data[i] = 0x68 + i++ + if *m.Field13 { + data[i] = 1 + } else { + data[i] = 0 + } + i++ + } + if m.Field14 != nil { + data[i] = 0x72 + i++ + i = encodeVarintThetest(data, i, uint64(len(*m.Field14))) + i += copy(data[i:], *m.Field14) + } + if m.Field15 != nil { + data[i] = 0x7a + i++ + i = encodeVarintThetest(data, i, uint64(len(m.Field15))) + i += copy(data[i:], m.Field15) + } + if m.XXX_unrecognized != nil { + i += copy(data[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *NinOptStructUnion) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *NinOptStructUnion) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Field1 != nil { + data[i] = 0x9 + i++ + *(*float64)(unsafe.Pointer(&data[i])) = *m.Field1 + i += 8 + } + if m.Field2 != nil { + data[i] = 0x15 + i++ + *(*float32)(unsafe.Pointer(&data[i])) = *m.Field2 + i += 4 + } + if m.Field3 != nil { + data[i] = 0x1a + i++ + i = encodeVarintThetest(data, i, uint64(m.Field3.Size())) + n52, err := m.Field3.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n52 + } + if m.Field4 != nil { + data[i] = 0x22 + i++ + i = encodeVarintThetest(data, i, uint64(m.Field4.Size())) + n53, err := m.Field4.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n53 + } + if m.Field6 != nil { + data[i] = 0x30 + i++ + i = encodeVarintThetest(data, i, uint64(*m.Field6)) + } + if m.Field7 != nil { + data[i] = 0x38 + i++ + i = encodeVarintThetest(data, i, uint64((uint32(*m.Field7)<<1)^uint32((*m.Field7>>31)))) + } + if m.Field13 != nil { + data[i] = 0x68 + i++ + if *m.Field13 { + data[i] = 1 + } else { + data[i] = 0 + } + i++ + } + if m.Field14 != nil { + data[i] = 0x72 + i++ + i = encodeVarintThetest(data, i, uint64(len(*m.Field14))) + i += copy(data[i:], *m.Field14) + } + if m.Field15 != nil { + data[i] = 0x7a + i++ + i = encodeVarintThetest(data, i, uint64(len(m.Field15))) + i += copy(data[i:], m.Field15) + } + if m.XXX_unrecognized != nil { + i += copy(data[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *NinEmbeddedStructUnion) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *NinEmbeddedStructUnion) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.NidOptNative != nil { + data[i] = 0xa + i++ + i = encodeVarintThetest(data, i, uint64(m.NidOptNative.Size())) + n54, err := m.NidOptNative.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n54 + } + if m.Field200 != nil { + data[i] = 0xc2 + i++ + data[i] = 0xc + i++ + i = encodeVarintThetest(data, i, uint64(m.Field200.Size())) + n55, err := m.Field200.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n55 + } + if m.Field210 != nil { + data[i] = 0x90 + i++ + data[i] = 0xd + i++ + if *m.Field210 { + data[i] = 1 + } else { + data[i] = 0 + } + i++ + } + if m.XXX_unrecognized != nil { + i += copy(data[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *NinNestedStructUnion) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *NinNestedStructUnion) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Field1 != nil { + data[i] = 0xa + i++ + i = encodeVarintThetest(data, i, uint64(m.Field1.Size())) + n56, err := m.Field1.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n56 + } + if m.Field2 != nil { + data[i] = 0x12 + i++ + i = encodeVarintThetest(data, i, uint64(m.Field2.Size())) + n57, err := m.Field2.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n57 + } + if m.Field3 != nil { + data[i] = 0x1a + i++ + i = encodeVarintThetest(data, i, uint64(m.Field3.Size())) + n58, err := m.Field3.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n58 + } + if m.XXX_unrecognized != nil { + i += copy(data[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *Tree) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *Tree) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Or != nil { + data[i] = 0xa + i++ + i = encodeVarintThetest(data, i, uint64(m.Or.Size())) + n59, err := m.Or.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n59 + } + if m.And != nil { + data[i] = 0x12 + i++ + i = encodeVarintThetest(data, i, uint64(m.And.Size())) + n60, err := m.And.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n60 + } + if m.Leaf != nil { + data[i] = 0x1a + i++ + i = encodeVarintThetest(data, i, uint64(m.Leaf.Size())) + n61, err := m.Leaf.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n61 + } + if m.XXX_unrecognized != nil { + i += copy(data[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *OrBranch) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *OrBranch) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + data[i] = 0xa + i++ + i = encodeVarintThetest(data, i, uint64(m.Left.Size())) + n62, err := m.Left.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n62 + data[i] = 0x12 + i++ + i = encodeVarintThetest(data, i, uint64(m.Right.Size())) + n63, err := m.Right.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n63 + if m.XXX_unrecognized != nil { + i += copy(data[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *AndBranch) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *AndBranch) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + data[i] = 0xa + i++ + i = encodeVarintThetest(data, i, uint64(m.Left.Size())) + n64, err := m.Left.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n64 + data[i] = 0x12 + i++ + i = encodeVarintThetest(data, i, uint64(m.Right.Size())) + n65, err := m.Right.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n65 + if m.XXX_unrecognized != nil { + i += copy(data[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *Leaf) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *Leaf) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + data[i] = 0x8 + i++ + i = encodeVarintThetest(data, i, uint64(m.Value)) + data[i] = 0x12 + i++ + i = encodeVarintThetest(data, i, uint64(len(m.StrValue))) + i += copy(data[i:], m.StrValue) + if m.XXX_unrecognized != nil { + i += copy(data[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *DeepTree) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *DeepTree) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Down != nil { + data[i] = 0xa + i++ + i = encodeVarintThetest(data, i, uint64(m.Down.Size())) + n66, err := m.Down.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n66 + } + if m.And != nil { + data[i] = 0x12 + i++ + i = encodeVarintThetest(data, i, uint64(m.And.Size())) + n67, err := m.And.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n67 + } + if m.Leaf != nil { + data[i] = 0x1a + i++ + i = encodeVarintThetest(data, i, uint64(m.Leaf.Size())) + n68, err := m.Leaf.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n68 + } + if m.XXX_unrecognized != nil { + i += copy(data[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *ADeepBranch) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *ADeepBranch) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + data[i] = 0x12 + i++ + i = encodeVarintThetest(data, i, uint64(m.Down.Size())) + n69, err := m.Down.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n69 + if m.XXX_unrecognized != nil { + i += copy(data[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *AndDeepBranch) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *AndDeepBranch) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + data[i] = 0xa + i++ + i = encodeVarintThetest(data, i, uint64(m.Left.Size())) + n70, err := m.Left.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n70 + data[i] = 0x12 + i++ + i = encodeVarintThetest(data, i, uint64(m.Right.Size())) + n71, err := m.Right.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n71 + if m.XXX_unrecognized != nil { + i += copy(data[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *DeepLeaf) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *DeepLeaf) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + data[i] = 0xa + i++ + i = encodeVarintThetest(data, i, uint64(m.Tree.Size())) + n72, err := m.Tree.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n72 + if m.XXX_unrecognized != nil { + i += copy(data[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *Nil) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *Nil) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.XXX_unrecognized != nil { + i += copy(data[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *NidOptEnum) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *NidOptEnum) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + data[i] = 0x8 + i++ + i = encodeVarintThetest(data, i, uint64(m.Field1)) + if m.XXX_unrecognized != nil { + i += copy(data[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *NinOptEnum) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *NinOptEnum) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Field1 != nil { + data[i] = 0x8 + i++ + i = encodeVarintThetest(data, i, uint64(*m.Field1)) + } + if m.Field2 != nil { + data[i] = 0x10 + i++ + i = encodeVarintThetest(data, i, uint64(*m.Field2)) + } + if m.Field3 != nil { + data[i] = 0x18 + i++ + i = encodeVarintThetest(data, i, uint64(*m.Field3)) + } + if m.XXX_unrecognized != nil { + i += copy(data[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *NidRepEnum) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *NidRepEnum) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Field1) > 0 { + for _, num := range m.Field1 { + data[i] = 0x8 + i++ + i = encodeVarintThetest(data, i, uint64(num)) + } + } + if len(m.Field2) > 0 { + for _, num := range m.Field2 { + data[i] = 0x10 + i++ + i = encodeVarintThetest(data, i, uint64(num)) + } + } + if len(m.Field3) > 0 { + for _, num := range m.Field3 { + data[i] = 0x18 + i++ + i = encodeVarintThetest(data, i, uint64(num)) + } + } + if m.XXX_unrecognized != nil { + i += copy(data[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *NinRepEnum) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *NinRepEnum) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Field1) > 0 { + for _, num := range m.Field1 { + data[i] = 0x8 + i++ + i = encodeVarintThetest(data, i, uint64(num)) + } + } + if len(m.Field2) > 0 { + for _, num := range m.Field2 { + data[i] = 0x10 + i++ + i = encodeVarintThetest(data, i, uint64(num)) + } + } + if len(m.Field3) > 0 { + for _, num := range m.Field3 { + data[i] = 0x18 + i++ + i = encodeVarintThetest(data, i, uint64(num)) + } + } + if m.XXX_unrecognized != nil { + i += copy(data[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *NinOptEnumDefault) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *NinOptEnumDefault) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Field1 != nil { + data[i] = 0x8 + i++ + i = encodeVarintThetest(data, i, uint64(*m.Field1)) + } + if m.Field2 != nil { + data[i] = 0x10 + i++ + i = encodeVarintThetest(data, i, uint64(*m.Field2)) + } + if m.Field3 != nil { + data[i] = 0x18 + i++ + i = encodeVarintThetest(data, i, uint64(*m.Field3)) + } + if m.XXX_unrecognized != nil { + i += copy(data[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *AnotherNinOptEnum) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *AnotherNinOptEnum) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Field1 != nil { + data[i] = 0x8 + i++ + i = encodeVarintThetest(data, i, uint64(*m.Field1)) + } + if m.Field2 != nil { + data[i] = 0x10 + i++ + i = encodeVarintThetest(data, i, uint64(*m.Field2)) + } + if m.Field3 != nil { + data[i] = 0x18 + i++ + i = encodeVarintThetest(data, i, uint64(*m.Field3)) + } + if m.XXX_unrecognized != nil { + i += copy(data[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *AnotherNinOptEnumDefault) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *AnotherNinOptEnumDefault) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Field1 != nil { + data[i] = 0x8 + i++ + i = encodeVarintThetest(data, i, uint64(*m.Field1)) + } + if m.Field2 != nil { + data[i] = 0x10 + i++ + i = encodeVarintThetest(data, i, uint64(*m.Field2)) + } + if m.Field3 != nil { + data[i] = 0x18 + i++ + i = encodeVarintThetest(data, i, uint64(*m.Field3)) + } + if m.XXX_unrecognized != nil { + i += copy(data[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *Timer) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *Timer) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + data[i] = 0x9 + i++ + *(*int64)(unsafe.Pointer(&data[i])) = m.Time1 + i += 8 + data[i] = 0x11 + i++ + *(*int64)(unsafe.Pointer(&data[i])) = m.Time2 + i += 8 + if m.Data != nil { + data[i] = 0x1a + i++ + i = encodeVarintThetest(data, i, uint64(len(m.Data))) + i += copy(data[i:], m.Data) + } + if m.XXX_unrecognized != nil { + i += copy(data[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *MyExtendable) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *MyExtendable) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Field1 != nil { + data[i] = 0x8 + i++ + i = encodeVarintThetest(data, i, uint64(*m.Field1)) + } + if len(m.XXX_extensions) > 0 { + n, err := github_com_gogo_protobuf_proto.EncodeExtensionMap(m.XXX_extensions, data[i:]) + if err != nil { + return 0, err + } + i += n + } + if m.XXX_unrecognized != nil { + i += copy(data[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *OtherExtenable) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *OtherExtenable) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.M != nil { + data[i] = 0xa + i++ + i = encodeVarintThetest(data, i, uint64(m.M.Size())) + n73, err := m.M.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n73 + } + if m.Field2 != nil { + data[i] = 0x10 + i++ + i = encodeVarintThetest(data, i, uint64(*m.Field2)) + } + if m.Field13 != nil { + data[i] = 0x68 + i++ + i = encodeVarintThetest(data, i, uint64(*m.Field13)) + } + if len(m.XXX_extensions) > 0 { + n, err := github_com_gogo_protobuf_proto.EncodeExtensionMap(m.XXX_extensions, data[i:]) + if err != nil { + return 0, err + } + i += n + } + if m.XXX_unrecognized != nil { + i += copy(data[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *NestedDefinition) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *NestedDefinition) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Field1 != nil { + data[i] = 0x8 + i++ + i = encodeVarintThetest(data, i, uint64(*m.Field1)) + } + if m.EnumField != nil { + data[i] = 0x10 + i++ + i = encodeVarintThetest(data, i, uint64(*m.EnumField)) + } + if m.NNM != nil { + data[i] = 0x1a + i++ + i = encodeVarintThetest(data, i, uint64(m.NNM.Size())) + n74, err := m.NNM.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n74 + } + if m.NM != nil { + data[i] = 0x22 + i++ + i = encodeVarintThetest(data, i, uint64(m.NM.Size())) + n75, err := m.NM.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n75 + } + if m.XXX_unrecognized != nil { + i += copy(data[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *NestedDefinition_NestedMessage) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *NestedDefinition_NestedMessage) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.NestedField1 != nil { + data[i] = 0x9 + i++ + *(*uint64)(unsafe.Pointer(&data[i])) = *m.NestedField1 + i += 8 + } + if m.NNM != nil { + data[i] = 0x12 + i++ + i = encodeVarintThetest(data, i, uint64(m.NNM.Size())) + n76, err := m.NNM.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n76 + } + if m.XXX_unrecognized != nil { + i += copy(data[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *NestedDefinition_NestedMessage_NestedNestedMsg) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *NestedDefinition_NestedMessage_NestedNestedMsg) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.NestedNestedField1 != nil { + data[i] = 0x52 + i++ + i = encodeVarintThetest(data, i, uint64(len(*m.NestedNestedField1))) + i += copy(data[i:], *m.NestedNestedField1) + } + if m.XXX_unrecognized != nil { + i += copy(data[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *NestedScope) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *NestedScope) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.A != nil { + data[i] = 0xa + i++ + i = encodeVarintThetest(data, i, uint64(m.A.Size())) + n77, err := m.A.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n77 + } + if m.B != nil { + data[i] = 0x10 + i++ + i = encodeVarintThetest(data, i, uint64(*m.B)) + } + if m.C != nil { + data[i] = 0x1a + i++ + i = encodeVarintThetest(data, i, uint64(m.C.Size())) + n78, err := m.C.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n78 + } + if m.XXX_unrecognized != nil { + i += copy(data[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *NinOptNativeDefault) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *NinOptNativeDefault) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Field1 != nil { + data[i] = 0x9 + i++ + *(*float64)(unsafe.Pointer(&data[i])) = *m.Field1 + i += 8 + } + if m.Field2 != nil { + data[i] = 0x15 + i++ + *(*float32)(unsafe.Pointer(&data[i])) = *m.Field2 + i += 4 + } + if m.Field3 != nil { + data[i] = 0x18 + i++ + i = encodeVarintThetest(data, i, uint64(*m.Field3)) + } + if m.Field4 != nil { + data[i] = 0x20 + i++ + i = encodeVarintThetest(data, i, uint64(*m.Field4)) + } + if m.Field5 != nil { + data[i] = 0x28 + i++ + i = encodeVarintThetest(data, i, uint64(*m.Field5)) + } + if m.Field6 != nil { + data[i] = 0x30 + i++ + i = encodeVarintThetest(data, i, uint64(*m.Field6)) + } + if m.Field7 != nil { + data[i] = 0x38 + i++ + i = encodeVarintThetest(data, i, uint64((uint32(*m.Field7)<<1)^uint32((*m.Field7>>31)))) + } + if m.Field8 != nil { + data[i] = 0x40 + i++ + i = encodeVarintThetest(data, i, uint64((uint64(*m.Field8)<<1)^uint64((*m.Field8>>63)))) + } + if m.Field9 != nil { + data[i] = 0x4d + i++ + *(*uint32)(unsafe.Pointer(&data[i])) = *m.Field9 + i += 4 + } + if m.Field10 != nil { + data[i] = 0x55 + i++ + *(*int32)(unsafe.Pointer(&data[i])) = *m.Field10 + i += 4 + } + if m.Field11 != nil { + data[i] = 0x59 + i++ + *(*uint64)(unsafe.Pointer(&data[i])) = *m.Field11 + i += 8 + } + if m.Field12 != nil { + data[i] = 0x61 + i++ + *(*int64)(unsafe.Pointer(&data[i])) = *m.Field12 + i += 8 + } + if m.Field13 != nil { + data[i] = 0x68 + i++ + if *m.Field13 { + data[i] = 1 + } else { + data[i] = 0 + } + i++ + } + if m.Field14 != nil { + data[i] = 0x72 + i++ + i = encodeVarintThetest(data, i, uint64(len(*m.Field14))) + i += copy(data[i:], *m.Field14) + } + if m.Field15 != nil { + data[i] = 0x7a + i++ + i = encodeVarintThetest(data, i, uint64(len(m.Field15))) + i += copy(data[i:], m.Field15) + } + if m.XXX_unrecognized != nil { + i += copy(data[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *CustomContainer) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *CustomContainer) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + data[i] = 0xa + i++ + i = encodeVarintThetest(data, i, uint64(m.CustomStruct.Size())) + n79, err := m.CustomStruct.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n79 + if m.XXX_unrecognized != nil { + i += copy(data[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *CustomNameNidOptNative) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *CustomNameNidOptNative) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + data[i] = 0x9 + i++ + *(*float64)(unsafe.Pointer(&data[i])) = m.FieldA + i += 8 + data[i] = 0x15 + i++ + *(*float32)(unsafe.Pointer(&data[i])) = m.FieldB + i += 4 + data[i] = 0x18 + i++ + i = encodeVarintThetest(data, i, uint64(m.FieldC)) + data[i] = 0x20 + i++ + i = encodeVarintThetest(data, i, uint64(m.FieldD)) + data[i] = 0x28 + i++ + i = encodeVarintThetest(data, i, uint64(m.FieldE)) + data[i] = 0x30 + i++ + i = encodeVarintThetest(data, i, uint64(m.FieldF)) + data[i] = 0x38 + i++ + i = encodeVarintThetest(data, i, uint64((uint32(m.FieldG)<<1)^uint32((m.FieldG>>31)))) + data[i] = 0x40 + i++ + i = encodeVarintThetest(data, i, uint64((uint64(m.FieldH)<<1)^uint64((m.FieldH>>63)))) + data[i] = 0x4d + i++ + *(*uint32)(unsafe.Pointer(&data[i])) = m.FieldI + i += 4 + data[i] = 0x55 + i++ + *(*int32)(unsafe.Pointer(&data[i])) = m.FieldJ + i += 4 + data[i] = 0x59 + i++ + *(*uint64)(unsafe.Pointer(&data[i])) = m.FieldK + i += 8 + data[i] = 0x61 + i++ + *(*int64)(unsafe.Pointer(&data[i])) = m.FieldL + i += 8 + data[i] = 0x68 + i++ + if m.FieldM { + data[i] = 1 + } else { + data[i] = 0 + } + i++ + data[i] = 0x72 + i++ + i = encodeVarintThetest(data, i, uint64(len(m.FieldN))) + i += copy(data[i:], m.FieldN) + if m.FieldO != nil { + data[i] = 0x7a + i++ + i = encodeVarintThetest(data, i, uint64(len(m.FieldO))) + i += copy(data[i:], m.FieldO) + } + if m.XXX_unrecognized != nil { + i += copy(data[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *CustomNameNinOptNative) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *CustomNameNinOptNative) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.FieldA != nil { + data[i] = 0x9 + i++ + *(*float64)(unsafe.Pointer(&data[i])) = *m.FieldA + i += 8 + } + if m.FieldB != nil { + data[i] = 0x15 + i++ + *(*float32)(unsafe.Pointer(&data[i])) = *m.FieldB + i += 4 + } + if m.FieldC != nil { + data[i] = 0x18 + i++ + i = encodeVarintThetest(data, i, uint64(*m.FieldC)) + } + if m.FieldD != nil { + data[i] = 0x20 + i++ + i = encodeVarintThetest(data, i, uint64(*m.FieldD)) + } + if m.FieldE != nil { + data[i] = 0x28 + i++ + i = encodeVarintThetest(data, i, uint64(*m.FieldE)) + } + if m.FieldF != nil { + data[i] = 0x30 + i++ + i = encodeVarintThetest(data, i, uint64(*m.FieldF)) + } + if m.FieldG != nil { + data[i] = 0x38 + i++ + i = encodeVarintThetest(data, i, uint64((uint32(*m.FieldG)<<1)^uint32((*m.FieldG>>31)))) + } + if m.FieldH != nil { + data[i] = 0x40 + i++ + i = encodeVarintThetest(data, i, uint64((uint64(*m.FieldH)<<1)^uint64((*m.FieldH>>63)))) + } + if m.FieldI != nil { + data[i] = 0x4d + i++ + *(*uint32)(unsafe.Pointer(&data[i])) = *m.FieldI + i += 4 + } + if m.FieldJ != nil { + data[i] = 0x55 + i++ + *(*int32)(unsafe.Pointer(&data[i])) = *m.FieldJ + i += 4 + } + if m.FieldK != nil { + data[i] = 0x59 + i++ + *(*uint64)(unsafe.Pointer(&data[i])) = *m.FieldK + i += 8 + } + if m.FielL != nil { + data[i] = 0x61 + i++ + *(*int64)(unsafe.Pointer(&data[i])) = *m.FielL + i += 8 + } + if m.FieldM != nil { + data[i] = 0x68 + i++ + if *m.FieldM { + data[i] = 1 + } else { + data[i] = 0 + } + i++ + } + if m.FieldN != nil { + data[i] = 0x72 + i++ + i = encodeVarintThetest(data, i, uint64(len(*m.FieldN))) + i += copy(data[i:], *m.FieldN) + } + if m.FieldO != nil { + data[i] = 0x7a + i++ + i = encodeVarintThetest(data, i, uint64(len(m.FieldO))) + i += copy(data[i:], m.FieldO) + } + if m.XXX_unrecognized != nil { + i += copy(data[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *CustomNameNinRepNative) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *CustomNameNinRepNative) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.FieldA) > 0 { + for _, num := range m.FieldA { + data[i] = 0x9 + i++ + *(*float64)(unsafe.Pointer(&data[i])) = num + i += 8 + } + } + if len(m.FieldB) > 0 { + for _, num := range m.FieldB { + data[i] = 0x15 + i++ + *(*float32)(unsafe.Pointer(&data[i])) = num + i += 4 + } + } + if len(m.FieldC) > 0 { + for _, num := range m.FieldC { + data[i] = 0x18 + i++ + i = encodeVarintThetest(data, i, uint64(num)) + } + } + if len(m.FieldD) > 0 { + for _, num := range m.FieldD { + data[i] = 0x20 + i++ + i = encodeVarintThetest(data, i, uint64(num)) + } + } + if len(m.FieldE) > 0 { + for _, num := range m.FieldE { + data[i] = 0x28 + i++ + i = encodeVarintThetest(data, i, uint64(num)) + } + } + if len(m.FieldF) > 0 { + for _, num := range m.FieldF { + data[i] = 0x30 + i++ + i = encodeVarintThetest(data, i, uint64(num)) + } + } + if len(m.FieldG) > 0 { + for _, num := range m.FieldG { + data[i] = 0x38 + i++ + x80 := (uint32(num) << 1) ^ uint32((num >> 31)) + for x80 >= 1<<7 { + data[i] = uint8(uint64(x80)&0x7f | 0x80) + x80 >>= 7 + i++ + } + data[i] = uint8(x80) + i++ + } + } + if len(m.FieldH) > 0 { + for _, num := range m.FieldH { + data[i] = 0x40 + i++ + x81 := (uint64(num) << 1) ^ uint64((num >> 63)) + for x81 >= 1<<7 { + data[i] = uint8(uint64(x81)&0x7f | 0x80) + x81 >>= 7 + i++ + } + data[i] = uint8(x81) + i++ + } + } + if len(m.FieldI) > 0 { + for _, num := range m.FieldI { + data[i] = 0x4d + i++ + *(*uint32)(unsafe.Pointer(&data[i])) = num + i += 4 + } + } + if len(m.FieldJ) > 0 { + for _, num := range m.FieldJ { + data[i] = 0x55 + i++ + *(*int32)(unsafe.Pointer(&data[i])) = num + i += 4 + } + } + if len(m.FieldK) > 0 { + for _, num := range m.FieldK { + data[i] = 0x59 + i++ + *(*uint64)(unsafe.Pointer(&data[i])) = num + i += 8 + } + } + if len(m.FieldL) > 0 { + for _, num := range m.FieldL { + data[i] = 0x61 + i++ + *(*int64)(unsafe.Pointer(&data[i])) = num + i += 8 + } + } + if len(m.FieldM) > 0 { + for _, b := range m.FieldM { + data[i] = 0x68 + i++ + if b { + data[i] = 1 + } else { + data[i] = 0 + } + i++ + } + } + if len(m.FieldN) > 0 { + for _, s := range m.FieldN { + data[i] = 0x72 + 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 len(m.FieldO) > 0 { + for _, b := range m.FieldO { + data[i] = 0x7a + i++ + i = encodeVarintThetest(data, i, uint64(len(b))) + i += copy(data[i:], b) + } + } + if m.XXX_unrecognized != nil { + i += copy(data[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *CustomNameNinStruct) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *CustomNameNinStruct) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.FieldA != nil { + data[i] = 0x9 + i++ + *(*float64)(unsafe.Pointer(&data[i])) = *m.FieldA + i += 8 + } + if m.FieldB != nil { + data[i] = 0x15 + i++ + *(*float32)(unsafe.Pointer(&data[i])) = *m.FieldB + i += 4 + } + if m.FieldC != nil { + data[i] = 0x1a + i++ + i = encodeVarintThetest(data, i, uint64(m.FieldC.Size())) + n82, err := m.FieldC.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n82 + } + if len(m.FieldD) > 0 { + for _, msg := range m.FieldD { + data[i] = 0x22 + i++ + i = encodeVarintThetest(data, i, uint64(msg.Size())) + n, err := msg.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n + } + } + if m.FieldE != nil { + data[i] = 0x30 + i++ + i = encodeVarintThetest(data, i, uint64(*m.FieldE)) + } + if m.FieldF != nil { + data[i] = 0x38 + i++ + i = encodeVarintThetest(data, i, uint64((uint32(*m.FieldF)<<1)^uint32((*m.FieldF>>31)))) + } + if m.FieldG != nil { + data[i] = 0x42 + i++ + i = encodeVarintThetest(data, i, uint64(m.FieldG.Size())) + n83, err := m.FieldG.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n83 + } + if m.FieldH != nil { + data[i] = 0x68 + i++ + if *m.FieldH { + data[i] = 1 + } else { + data[i] = 0 + } + i++ + } + if m.FieldI != nil { + data[i] = 0x72 + i++ + i = encodeVarintThetest(data, i, uint64(len(*m.FieldI))) + i += copy(data[i:], *m.FieldI) + } + if m.FieldJ != nil { + data[i] = 0x7a + i++ + i = encodeVarintThetest(data, i, uint64(len(m.FieldJ))) + i += copy(data[i:], m.FieldJ) + } + if m.XXX_unrecognized != nil { + i += copy(data[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *CustomNameCustomType) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *CustomNameCustomType) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.FieldA != nil { + data[i] = 0xa + i++ + i = encodeVarintThetest(data, i, uint64(m.FieldA.Size())) + n84, err := m.FieldA.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n84 + } + if m.FieldB != nil { + data[i] = 0x12 + i++ + i = encodeVarintThetest(data, i, uint64(m.FieldB.Size())) + n85, err := m.FieldB.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n85 + } + if len(m.FieldC) > 0 { + for _, msg := range m.FieldC { + data[i] = 0x1a + i++ + i = encodeVarintThetest(data, i, uint64(msg.Size())) + n, err := msg.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n + } + } + if len(m.FieldD) > 0 { + for _, msg := range m.FieldD { + data[i] = 0x22 + i++ + i = encodeVarintThetest(data, i, uint64(msg.Size())) + n, err := msg.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n + } + } + if m.XXX_unrecognized != nil { + i += copy(data[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *CustomNameNinEmbeddedStructUnion) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *CustomNameNinEmbeddedStructUnion) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.NidOptNative != nil { + data[i] = 0xa + i++ + i = encodeVarintThetest(data, i, uint64(m.NidOptNative.Size())) + n86, err := m.NidOptNative.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n86 + } + if m.FieldA != nil { + data[i] = 0xc2 + i++ + data[i] = 0xc + i++ + i = encodeVarintThetest(data, i, uint64(m.FieldA.Size())) + n87, err := m.FieldA.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n87 + } + if m.FieldB != nil { + data[i] = 0x90 + i++ + data[i] = 0xd + i++ + if *m.FieldB { + data[i] = 1 + } else { + data[i] = 0 + } + i++ + } + if m.XXX_unrecognized != nil { + i += copy(data[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *CustomNameEnum) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *CustomNameEnum) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.FieldA != nil { + data[i] = 0x8 + i++ + i = encodeVarintThetest(data, i, uint64(*m.FieldA)) + } + if len(m.FieldB) > 0 { + for _, num := range m.FieldB { + data[i] = 0x10 + i++ + i = encodeVarintThetest(data, i, uint64(num)) + } + } + if m.XXX_unrecognized != nil { + i += copy(data[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *NoExtensionsMap) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *NoExtensionsMap) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Field1 != nil { + data[i] = 0x8 + i++ + i = encodeVarintThetest(data, i, uint64(*m.Field1)) + } + if m.XXX_extensions != nil { + i += copy(data[i:], m.XXX_extensions) + } + if m.XXX_unrecognized != nil { + i += copy(data[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *Unrecognized) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *Unrecognized) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Field1 != nil { + data[i] = 0xa + i++ + i = encodeVarintThetest(data, i, uint64(len(*m.Field1))) + i += copy(data[i:], *m.Field1) + } + return i, nil +} + +func (m *UnrecognizedWithInner) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *UnrecognizedWithInner) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Embedded) > 0 { + for _, msg := range m.Embedded { + data[i] = 0xa + i++ + i = encodeVarintThetest(data, i, uint64(msg.Size())) + n, err := msg.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n + } + } + if m.Field2 != nil { + data[i] = 0x12 + i++ + i = encodeVarintThetest(data, i, uint64(len(*m.Field2))) + i += copy(data[i:], *m.Field2) + } + if m.XXX_unrecognized != nil { + i += copy(data[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *UnrecognizedWithInner_Inner) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *UnrecognizedWithInner_Inner) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Field1 != nil { + data[i] = 0x8 + i++ + i = encodeVarintThetest(data, i, uint64(*m.Field1)) + } + return i, nil +} + +func (m *UnrecognizedWithEmbed) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *UnrecognizedWithEmbed) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + data[i] = 0xa + i++ + i = encodeVarintThetest(data, i, uint64(m.UnrecognizedWithEmbed_Embedded.Size())) + n88, err := m.UnrecognizedWithEmbed_Embedded.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n88 + if m.Field2 != nil { + data[i] = 0x12 + i++ + i = encodeVarintThetest(data, i, uint64(len(*m.Field2))) + i += copy(data[i:], *m.Field2) + } + if m.XXX_unrecognized != nil { + i += copy(data[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *UnrecognizedWithEmbed_Embedded) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *UnrecognizedWithEmbed_Embedded) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Field1 != nil { + data[i] = 0x8 + i++ + i = encodeVarintThetest(data, i, uint64(*m.Field1)) + } + return i, nil +} + +func (m *Node) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *Node) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Label != nil { + data[i] = 0xa + i++ + i = encodeVarintThetest(data, i, uint64(len(*m.Label))) + i += copy(data[i:], *m.Label) + } + if len(m.Children) > 0 { + for _, msg := range m.Children { + data[i] = 0x12 + i++ + i = encodeVarintThetest(data, i, uint64(msg.Size())) + n, err := msg.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n + } + } + if m.XXX_unrecognized != nil { + i += copy(data[i:], m.XXX_unrecognized) + } + return i, nil +} + +func encodeFixed64Thetest(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 encodeFixed32Thetest(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 encodeVarintThetest(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 (m *NidOptNative) 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 ErrIntOverflowThetestUnsafe + } + 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: NidOptNative: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: NidOptNative: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) + } + if iNdEx+8 > l { + return io.ErrUnexpectedEOF + } + m.Field1 = *(*float64)(unsafe.Pointer(&data[iNdEx])) + iNdEx += 8 + case 2: + if wireType != 5 { + return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType) + } + if iNdEx+4 > l { + return io.ErrUnexpectedEOF + } + m.Field2 = *(*float32)(unsafe.Pointer(&data[iNdEx])) + iNdEx += 4 + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field3", wireType) + } + m.Field3 = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + m.Field3 |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field4", wireType) + } + m.Field4 = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + m.Field4 |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + case 5: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field5", wireType) + } + m.Field5 = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + m.Field5 |= (uint32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + case 6: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field6", wireType) + } + m.Field6 = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + m.Field6 |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + case 7: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field7", wireType) + } + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + v = int32((uint32(v) >> 1) ^ uint32(((v&1)<<31)>>31)) + m.Field7 = v + case 8: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field8", wireType) + } + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + v = (v >> 1) ^ uint64((int64(v&1)<<63)>>63) + m.Field8 = int64(v) + case 9: + if wireType != 5 { + return fmt.Errorf("proto: wrong wireType = %d for field Field9", wireType) + } + if iNdEx+4 > l { + return io.ErrUnexpectedEOF + } + m.Field9 = *(*uint32)(unsafe.Pointer(&data[iNdEx])) + iNdEx += 4 + case 10: + if wireType != 5 { + return fmt.Errorf("proto: wrong wireType = %d for field Field10", wireType) + } + if iNdEx+4 > l { + return io.ErrUnexpectedEOF + } + m.Field10 = *(*int32)(unsafe.Pointer(&data[iNdEx])) + iNdEx += 4 + case 11: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field Field11", wireType) + } + if iNdEx+8 > l { + return io.ErrUnexpectedEOF + } + m.Field11 = *(*uint64)(unsafe.Pointer(&data[iNdEx])) + iNdEx += 8 + case 12: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field Field12", wireType) + } + if iNdEx+8 > l { + return io.ErrUnexpectedEOF + } + m.Field12 = *(*int64)(unsafe.Pointer(&data[iNdEx])) + iNdEx += 8 + case 13: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field13", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field13 = bool(v != 0) + case 14: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field14", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + 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 ErrInvalidLengthThetestUnsafe + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Field14 = string(data[iNdEx:postIndex]) + iNdEx = postIndex + case 15: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field15", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthThetestUnsafe + } + postIndex := iNdEx + byteLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Field15 = append(m.Field15[:0], data[iNdEx:postIndex]...) + if m.Field15 == nil { + m.Field15 = []byte{} + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipThetestUnsafe(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetestUnsafe + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *NinOptNative) 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 ErrIntOverflowThetestUnsafe + } + 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: NinOptNative: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: NinOptNative: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) + } + var v float64 + if iNdEx+8 > l { + return io.ErrUnexpectedEOF + } + v = *(*float64)(unsafe.Pointer(&data[iNdEx])) + iNdEx += 8 + m.Field1 = &v + case 2: + if wireType != 5 { + return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType) + } + var v float32 + if iNdEx+4 > l { + return io.ErrUnexpectedEOF + } + v = *(*float32)(unsafe.Pointer(&data[iNdEx])) + iNdEx += 4 + m.Field2 = &v + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field3", wireType) + } + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field3 = &v + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field4", wireType) + } + var v int64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field4 = &v + case 5: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field5", wireType) + } + var v uint32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (uint32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field5 = &v + case 6: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field6", wireType) + } + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field6 = &v + case 7: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field7", wireType) + } + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + v = int32((uint32(v) >> 1) ^ uint32(((v&1)<<31)>>31)) + m.Field7 = &v + case 8: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field8", wireType) + } + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + v = (v >> 1) ^ uint64((int64(v&1)<<63)>>63) + v2 := int64(v) + m.Field8 = &v2 + case 9: + if wireType != 5 { + return fmt.Errorf("proto: wrong wireType = %d for field Field9", wireType) + } + var v uint32 + if iNdEx+4 > l { + return io.ErrUnexpectedEOF + } + v = *(*uint32)(unsafe.Pointer(&data[iNdEx])) + iNdEx += 4 + m.Field9 = &v + case 10: + if wireType != 5 { + return fmt.Errorf("proto: wrong wireType = %d for field Field10", wireType) + } + var v int32 + if iNdEx+4 > l { + return io.ErrUnexpectedEOF + } + v = *(*int32)(unsafe.Pointer(&data[iNdEx])) + iNdEx += 4 + m.Field10 = &v + case 11: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field Field11", wireType) + } + var v uint64 + if iNdEx+8 > l { + return io.ErrUnexpectedEOF + } + v = *(*uint64)(unsafe.Pointer(&data[iNdEx])) + iNdEx += 8 + m.Field11 = &v + case 12: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field Field12", wireType) + } + var v int64 + if iNdEx+8 > l { + return io.ErrUnexpectedEOF + } + v = *(*int64)(unsafe.Pointer(&data[iNdEx])) + iNdEx += 8 + m.Field12 = &v + case 13: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field13", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + b := bool(v != 0) + m.Field13 = &b + case 14: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field14", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + 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 ErrInvalidLengthThetestUnsafe + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + s := string(data[iNdEx:postIndex]) + m.Field14 = &s + iNdEx = postIndex + case 15: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field15", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthThetestUnsafe + } + postIndex := iNdEx + byteLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Field15 = append(m.Field15[:0], data[iNdEx:postIndex]...) + if m.Field15 == nil { + m.Field15 = []byte{} + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipThetestUnsafe(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetestUnsafe + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *NidRepNative) 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 ErrIntOverflowThetestUnsafe + } + 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: NidRepNative: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: NidRepNative: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) + } + var v float64 + if iNdEx+8 > l { + return io.ErrUnexpectedEOF + } + v = *(*float64)(unsafe.Pointer(&data[iNdEx])) + iNdEx += 8 + m.Field1 = append(m.Field1, v) + case 2: + if wireType != 5 { + return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType) + } + var v float32 + if iNdEx+4 > l { + return io.ErrUnexpectedEOF + } + v = *(*float32)(unsafe.Pointer(&data[iNdEx])) + iNdEx += 4 + m.Field2 = append(m.Field2, v) + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field3", wireType) + } + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field3 = append(m.Field3, v) + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field4", wireType) + } + var v int64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field4 = append(m.Field4, v) + case 5: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field5", wireType) + } + var v uint32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (uint32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field5 = append(m.Field5, v) + case 6: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field6", wireType) + } + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field6 = append(m.Field6, v) + case 7: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field7", wireType) + } + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + v = int32((uint32(v) >> 1) ^ uint32(((v&1)<<31)>>31)) + m.Field7 = append(m.Field7, v) + case 8: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field8", wireType) + } + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + v = (v >> 1) ^ uint64((int64(v&1)<<63)>>63) + m.Field8 = append(m.Field8, int64(v)) + case 9: + if wireType != 5 { + return fmt.Errorf("proto: wrong wireType = %d for field Field9", wireType) + } + var v uint32 + if iNdEx+4 > l { + return io.ErrUnexpectedEOF + } + v = *(*uint32)(unsafe.Pointer(&data[iNdEx])) + iNdEx += 4 + m.Field9 = append(m.Field9, v) + case 10: + if wireType != 5 { + return fmt.Errorf("proto: wrong wireType = %d for field Field10", wireType) + } + var v int32 + if iNdEx+4 > l { + return io.ErrUnexpectedEOF + } + v = *(*int32)(unsafe.Pointer(&data[iNdEx])) + iNdEx += 4 + m.Field10 = append(m.Field10, v) + case 11: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field Field11", wireType) + } + var v uint64 + if iNdEx+8 > l { + return io.ErrUnexpectedEOF + } + v = *(*uint64)(unsafe.Pointer(&data[iNdEx])) + iNdEx += 8 + m.Field11 = append(m.Field11, v) + case 12: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field Field12", wireType) + } + var v int64 + if iNdEx+8 > l { + return io.ErrUnexpectedEOF + } + v = *(*int64)(unsafe.Pointer(&data[iNdEx])) + iNdEx += 8 + m.Field12 = append(m.Field12, v) + case 13: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field13", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field13 = append(m.Field13, bool(v != 0)) + case 14: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field14", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + 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 ErrInvalidLengthThetestUnsafe + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Field14 = append(m.Field14, string(data[iNdEx:postIndex])) + iNdEx = postIndex + case 15: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field15", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthThetestUnsafe + } + postIndex := iNdEx + byteLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Field15 = append(m.Field15, make([]byte, postIndex-iNdEx)) + copy(m.Field15[len(m.Field15)-1], data[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipThetestUnsafe(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetestUnsafe + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *NinRepNative) 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 ErrIntOverflowThetestUnsafe + } + 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: NinRepNative: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: NinRepNative: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) + } + var v float64 + if iNdEx+8 > l { + return io.ErrUnexpectedEOF + } + v = *(*float64)(unsafe.Pointer(&data[iNdEx])) + iNdEx += 8 + m.Field1 = append(m.Field1, v) + case 2: + if wireType != 5 { + return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType) + } + var v float32 + if iNdEx+4 > l { + return io.ErrUnexpectedEOF + } + v = *(*float32)(unsafe.Pointer(&data[iNdEx])) + iNdEx += 4 + m.Field2 = append(m.Field2, v) + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field3", wireType) + } + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field3 = append(m.Field3, v) + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field4", wireType) + } + var v int64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field4 = append(m.Field4, v) + case 5: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field5", wireType) + } + var v uint32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (uint32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field5 = append(m.Field5, v) + case 6: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field6", wireType) + } + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field6 = append(m.Field6, v) + case 7: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field7", wireType) + } + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + v = int32((uint32(v) >> 1) ^ uint32(((v&1)<<31)>>31)) + m.Field7 = append(m.Field7, v) + case 8: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field8", wireType) + } + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + v = (v >> 1) ^ uint64((int64(v&1)<<63)>>63) + m.Field8 = append(m.Field8, int64(v)) + case 9: + if wireType != 5 { + return fmt.Errorf("proto: wrong wireType = %d for field Field9", wireType) + } + var v uint32 + if iNdEx+4 > l { + return io.ErrUnexpectedEOF + } + v = *(*uint32)(unsafe.Pointer(&data[iNdEx])) + iNdEx += 4 + m.Field9 = append(m.Field9, v) + case 10: + if wireType != 5 { + return fmt.Errorf("proto: wrong wireType = %d for field Field10", wireType) + } + var v int32 + if iNdEx+4 > l { + return io.ErrUnexpectedEOF + } + v = *(*int32)(unsafe.Pointer(&data[iNdEx])) + iNdEx += 4 + m.Field10 = append(m.Field10, v) + case 11: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field Field11", wireType) + } + var v uint64 + if iNdEx+8 > l { + return io.ErrUnexpectedEOF + } + v = *(*uint64)(unsafe.Pointer(&data[iNdEx])) + iNdEx += 8 + m.Field11 = append(m.Field11, v) + case 12: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field Field12", wireType) + } + var v int64 + if iNdEx+8 > l { + return io.ErrUnexpectedEOF + } + v = *(*int64)(unsafe.Pointer(&data[iNdEx])) + iNdEx += 8 + m.Field12 = append(m.Field12, v) + case 13: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field13", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field13 = append(m.Field13, bool(v != 0)) + case 14: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field14", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + 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 ErrInvalidLengthThetestUnsafe + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Field14 = append(m.Field14, string(data[iNdEx:postIndex])) + iNdEx = postIndex + case 15: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field15", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthThetestUnsafe + } + postIndex := iNdEx + byteLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Field15 = append(m.Field15, make([]byte, postIndex-iNdEx)) + copy(m.Field15[len(m.Field15)-1], data[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipThetestUnsafe(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetestUnsafe + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *NidRepPackedNative) 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 ErrIntOverflowThetestUnsafe + } + 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: NidRepPackedNative: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: NidRepPackedNative: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthThetestUnsafe + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + for iNdEx < postIndex { + var v float64 + if iNdEx+8 > l { + return io.ErrUnexpectedEOF + } + v = *(*float64)(unsafe.Pointer(&data[iNdEx])) + iNdEx += 8 + m.Field1 = append(m.Field1, v) + } + } else if wireType == 1 { + var v float64 + if iNdEx+8 > l { + return io.ErrUnexpectedEOF + } + v = *(*float64)(unsafe.Pointer(&data[iNdEx])) + iNdEx += 8 + m.Field1 = append(m.Field1, v) + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) + } + case 2: + if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthThetestUnsafe + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + for iNdEx < postIndex { + var v float32 + if iNdEx+4 > l { + return io.ErrUnexpectedEOF + } + v = *(*float32)(unsafe.Pointer(&data[iNdEx])) + iNdEx += 4 + m.Field2 = append(m.Field2, v) + } + } else if wireType == 5 { + var v float32 + if iNdEx+4 > l { + return io.ErrUnexpectedEOF + } + v = *(*float32)(unsafe.Pointer(&data[iNdEx])) + iNdEx += 4 + m.Field2 = append(m.Field2, v) + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType) + } + case 3: + if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthThetestUnsafe + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + for iNdEx < postIndex { + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field3 = append(m.Field3, v) + } + } else if wireType == 0 { + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field3 = append(m.Field3, v) + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field3", wireType) + } + case 4: + if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthThetestUnsafe + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + for iNdEx < postIndex { + var v int64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field4 = append(m.Field4, v) + } + } else if wireType == 0 { + var v int64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field4 = append(m.Field4, v) + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field4", wireType) + } + case 5: + if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthThetestUnsafe + } + 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 ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (uint32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field5 = append(m.Field5, v) + } + } else if wireType == 0 { + var v uint32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (uint32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field5 = append(m.Field5, v) + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field5", wireType) + } + case 6: + if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthThetestUnsafe + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + for iNdEx < postIndex { + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field6 = append(m.Field6, v) + } + } else if wireType == 0 { + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field6 = append(m.Field6, v) + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field6", wireType) + } + case 7: + if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthThetestUnsafe + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + for iNdEx < postIndex { + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + v = int32((uint32(v) >> 1) ^ uint32(((v&1)<<31)>>31)) + m.Field7 = append(m.Field7, v) + } + } else if wireType == 0 { + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + v = int32((uint32(v) >> 1) ^ uint32(((v&1)<<31)>>31)) + m.Field7 = append(m.Field7, v) + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field7", wireType) + } + case 8: + if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthThetestUnsafe + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + for iNdEx < postIndex { + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + v = (v >> 1) ^ uint64((int64(v&1)<<63)>>63) + m.Field8 = append(m.Field8, int64(v)) + } + } else if wireType == 0 { + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + v = (v >> 1) ^ uint64((int64(v&1)<<63)>>63) + m.Field8 = append(m.Field8, int64(v)) + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field8", wireType) + } + case 9: + if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthThetestUnsafe + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + for iNdEx < postIndex { + var v uint32 + if iNdEx+4 > l { + return io.ErrUnexpectedEOF + } + v = *(*uint32)(unsafe.Pointer(&data[iNdEx])) + iNdEx += 4 + m.Field9 = append(m.Field9, v) + } + } else if wireType == 5 { + var v uint32 + if iNdEx+4 > l { + return io.ErrUnexpectedEOF + } + v = *(*uint32)(unsafe.Pointer(&data[iNdEx])) + iNdEx += 4 + m.Field9 = append(m.Field9, v) + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field9", wireType) + } + case 10: + if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthThetestUnsafe + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + for iNdEx < postIndex { + var v int32 + if iNdEx+4 > l { + return io.ErrUnexpectedEOF + } + v = *(*int32)(unsafe.Pointer(&data[iNdEx])) + iNdEx += 4 + m.Field10 = append(m.Field10, v) + } + } else if wireType == 5 { + var v int32 + if iNdEx+4 > l { + return io.ErrUnexpectedEOF + } + v = *(*int32)(unsafe.Pointer(&data[iNdEx])) + iNdEx += 4 + m.Field10 = append(m.Field10, v) + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field10", wireType) + } + case 11: + if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthThetestUnsafe + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + for iNdEx < postIndex { + var v uint64 + if iNdEx+8 > l { + return io.ErrUnexpectedEOF + } + v = *(*uint64)(unsafe.Pointer(&data[iNdEx])) + iNdEx += 8 + m.Field11 = append(m.Field11, v) + } + } else if wireType == 1 { + var v uint64 + if iNdEx+8 > l { + return io.ErrUnexpectedEOF + } + v = *(*uint64)(unsafe.Pointer(&data[iNdEx])) + iNdEx += 8 + m.Field11 = append(m.Field11, v) + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field11", wireType) + } + case 12: + if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthThetestUnsafe + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + for iNdEx < postIndex { + var v int64 + if iNdEx+8 > l { + return io.ErrUnexpectedEOF + } + v = *(*int64)(unsafe.Pointer(&data[iNdEx])) + iNdEx += 8 + m.Field12 = append(m.Field12, v) + } + } else if wireType == 1 { + var v int64 + if iNdEx+8 > l { + return io.ErrUnexpectedEOF + } + v = *(*int64)(unsafe.Pointer(&data[iNdEx])) + iNdEx += 8 + m.Field12 = append(m.Field12, v) + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field12", wireType) + } + case 13: + if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthThetestUnsafe + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + for iNdEx < postIndex { + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field13 = append(m.Field13, bool(v != 0)) + } + } else if wireType == 0 { + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field13 = append(m.Field13, bool(v != 0)) + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field13", wireType) + } + default: + iNdEx = preIndex + skippy, err := skipThetestUnsafe(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetestUnsafe + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *NinRepPackedNative) 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 ErrIntOverflowThetestUnsafe + } + 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: NinRepPackedNative: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: NinRepPackedNative: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthThetestUnsafe + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + for iNdEx < postIndex { + var v float64 + if iNdEx+8 > l { + return io.ErrUnexpectedEOF + } + v = *(*float64)(unsafe.Pointer(&data[iNdEx])) + iNdEx += 8 + m.Field1 = append(m.Field1, v) + } + } else if wireType == 1 { + var v float64 + if iNdEx+8 > l { + return io.ErrUnexpectedEOF + } + v = *(*float64)(unsafe.Pointer(&data[iNdEx])) + iNdEx += 8 + m.Field1 = append(m.Field1, v) + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) + } + case 2: + if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthThetestUnsafe + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + for iNdEx < postIndex { + var v float32 + if iNdEx+4 > l { + return io.ErrUnexpectedEOF + } + v = *(*float32)(unsafe.Pointer(&data[iNdEx])) + iNdEx += 4 + m.Field2 = append(m.Field2, v) + } + } else if wireType == 5 { + var v float32 + if iNdEx+4 > l { + return io.ErrUnexpectedEOF + } + v = *(*float32)(unsafe.Pointer(&data[iNdEx])) + iNdEx += 4 + m.Field2 = append(m.Field2, v) + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType) + } + case 3: + if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthThetestUnsafe + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + for iNdEx < postIndex { + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field3 = append(m.Field3, v) + } + } else if wireType == 0 { + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field3 = append(m.Field3, v) + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field3", wireType) + } + case 4: + if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthThetestUnsafe + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + for iNdEx < postIndex { + var v int64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field4 = append(m.Field4, v) + } + } else if wireType == 0 { + var v int64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field4 = append(m.Field4, v) + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field4", wireType) + } + case 5: + if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthThetestUnsafe + } + 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 ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (uint32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field5 = append(m.Field5, v) + } + } else if wireType == 0 { + var v uint32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (uint32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field5 = append(m.Field5, v) + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field5", wireType) + } + case 6: + if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthThetestUnsafe + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + for iNdEx < postIndex { + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field6 = append(m.Field6, v) + } + } else if wireType == 0 { + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field6 = append(m.Field6, v) + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field6", wireType) + } + case 7: + if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthThetestUnsafe + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + for iNdEx < postIndex { + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + v = int32((uint32(v) >> 1) ^ uint32(((v&1)<<31)>>31)) + m.Field7 = append(m.Field7, v) + } + } else if wireType == 0 { + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + v = int32((uint32(v) >> 1) ^ uint32(((v&1)<<31)>>31)) + m.Field7 = append(m.Field7, v) + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field7", wireType) + } + case 8: + if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthThetestUnsafe + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + for iNdEx < postIndex { + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + v = (v >> 1) ^ uint64((int64(v&1)<<63)>>63) + m.Field8 = append(m.Field8, int64(v)) + } + } else if wireType == 0 { + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + v = (v >> 1) ^ uint64((int64(v&1)<<63)>>63) + m.Field8 = append(m.Field8, int64(v)) + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field8", wireType) + } + case 9: + if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthThetestUnsafe + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + for iNdEx < postIndex { + var v uint32 + if iNdEx+4 > l { + return io.ErrUnexpectedEOF + } + v = *(*uint32)(unsafe.Pointer(&data[iNdEx])) + iNdEx += 4 + m.Field9 = append(m.Field9, v) + } + } else if wireType == 5 { + var v uint32 + if iNdEx+4 > l { + return io.ErrUnexpectedEOF + } + v = *(*uint32)(unsafe.Pointer(&data[iNdEx])) + iNdEx += 4 + m.Field9 = append(m.Field9, v) + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field9", wireType) + } + case 10: + if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthThetestUnsafe + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + for iNdEx < postIndex { + var v int32 + if iNdEx+4 > l { + return io.ErrUnexpectedEOF + } + v = *(*int32)(unsafe.Pointer(&data[iNdEx])) + iNdEx += 4 + m.Field10 = append(m.Field10, v) + } + } else if wireType == 5 { + var v int32 + if iNdEx+4 > l { + return io.ErrUnexpectedEOF + } + v = *(*int32)(unsafe.Pointer(&data[iNdEx])) + iNdEx += 4 + m.Field10 = append(m.Field10, v) + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field10", wireType) + } + case 11: + if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthThetestUnsafe + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + for iNdEx < postIndex { + var v uint64 + if iNdEx+8 > l { + return io.ErrUnexpectedEOF + } + v = *(*uint64)(unsafe.Pointer(&data[iNdEx])) + iNdEx += 8 + m.Field11 = append(m.Field11, v) + } + } else if wireType == 1 { + var v uint64 + if iNdEx+8 > l { + return io.ErrUnexpectedEOF + } + v = *(*uint64)(unsafe.Pointer(&data[iNdEx])) + iNdEx += 8 + m.Field11 = append(m.Field11, v) + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field11", wireType) + } + case 12: + if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthThetestUnsafe + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + for iNdEx < postIndex { + var v int64 + if iNdEx+8 > l { + return io.ErrUnexpectedEOF + } + v = *(*int64)(unsafe.Pointer(&data[iNdEx])) + iNdEx += 8 + m.Field12 = append(m.Field12, v) + } + } else if wireType == 1 { + var v int64 + if iNdEx+8 > l { + return io.ErrUnexpectedEOF + } + v = *(*int64)(unsafe.Pointer(&data[iNdEx])) + iNdEx += 8 + m.Field12 = append(m.Field12, v) + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field12", wireType) + } + case 13: + if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthThetestUnsafe + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + for iNdEx < postIndex { + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field13 = append(m.Field13, bool(v != 0)) + } + } else if wireType == 0 { + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field13 = append(m.Field13, bool(v != 0)) + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field13", wireType) + } + default: + iNdEx = preIndex + skippy, err := skipThetestUnsafe(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetestUnsafe + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *NidOptStruct) 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 ErrIntOverflowThetestUnsafe + } + 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: NidOptStruct: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: NidOptStruct: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) + } + if iNdEx+8 > l { + return io.ErrUnexpectedEOF + } + m.Field1 = *(*float64)(unsafe.Pointer(&data[iNdEx])) + iNdEx += 8 + case 2: + if wireType != 5 { + return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType) + } + if iNdEx+4 > l { + return io.ErrUnexpectedEOF + } + m.Field2 = *(*float32)(unsafe.Pointer(&data[iNdEx])) + iNdEx += 4 + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field3", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetestUnsafe + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Field3.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field4", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetestUnsafe + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Field4.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 6: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field6", wireType) + } + m.Field6 = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + m.Field6 |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + case 7: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field7", wireType) + } + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + v = int32((uint32(v) >> 1) ^ uint32(((v&1)<<31)>>31)) + m.Field7 = v + case 8: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field8", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetestUnsafe + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Field8.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 13: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field13", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field13 = bool(v != 0) + case 14: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field14", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + 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 ErrInvalidLengthThetestUnsafe + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Field14 = string(data[iNdEx:postIndex]) + iNdEx = postIndex + case 15: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field15", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthThetestUnsafe + } + postIndex := iNdEx + byteLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Field15 = append(m.Field15[:0], data[iNdEx:postIndex]...) + if m.Field15 == nil { + m.Field15 = []byte{} + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipThetestUnsafe(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetestUnsafe + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *NinOptStruct) 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 ErrIntOverflowThetestUnsafe + } + 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: NinOptStruct: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: NinOptStruct: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) + } + var v float64 + if iNdEx+8 > l { + return io.ErrUnexpectedEOF + } + v = *(*float64)(unsafe.Pointer(&data[iNdEx])) + iNdEx += 8 + m.Field1 = &v + case 2: + if wireType != 5 { + return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType) + } + var v float32 + if iNdEx+4 > l { + return io.ErrUnexpectedEOF + } + v = *(*float32)(unsafe.Pointer(&data[iNdEx])) + iNdEx += 4 + m.Field2 = &v + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field3", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetestUnsafe + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Field3 == nil { + m.Field3 = &NidOptNative{} + } + if err := m.Field3.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field4", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetestUnsafe + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Field4 == nil { + m.Field4 = &NinOptNative{} + } + if err := m.Field4.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 6: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field6", wireType) + } + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field6 = &v + case 7: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field7", wireType) + } + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + v = int32((uint32(v) >> 1) ^ uint32(((v&1)<<31)>>31)) + m.Field7 = &v + case 8: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field8", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetestUnsafe + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Field8 == nil { + m.Field8 = &NidOptNative{} + } + if err := m.Field8.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 13: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field13", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + b := bool(v != 0) + m.Field13 = &b + case 14: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field14", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + 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 ErrInvalidLengthThetestUnsafe + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + s := string(data[iNdEx:postIndex]) + m.Field14 = &s + iNdEx = postIndex + case 15: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field15", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthThetestUnsafe + } + postIndex := iNdEx + byteLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Field15 = append(m.Field15[:0], data[iNdEx:postIndex]...) + if m.Field15 == nil { + m.Field15 = []byte{} + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipThetestUnsafe(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetestUnsafe + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *NidRepStruct) 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 ErrIntOverflowThetestUnsafe + } + 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: NidRepStruct: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: NidRepStruct: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) + } + var v float64 + if iNdEx+8 > l { + return io.ErrUnexpectedEOF + } + v = *(*float64)(unsafe.Pointer(&data[iNdEx])) + iNdEx += 8 + m.Field1 = append(m.Field1, v) + case 2: + if wireType != 5 { + return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType) + } + var v float32 + if iNdEx+4 > l { + return io.ErrUnexpectedEOF + } + v = *(*float32)(unsafe.Pointer(&data[iNdEx])) + iNdEx += 4 + m.Field2 = append(m.Field2, v) + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field3", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetestUnsafe + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Field3 = append(m.Field3, NidOptNative{}) + if err := m.Field3[len(m.Field3)-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 Field4", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetestUnsafe + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Field4 = append(m.Field4, NinOptNative{}) + if err := m.Field4[len(m.Field4)-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 Field6", wireType) + } + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field6 = append(m.Field6, v) + case 7: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field7", wireType) + } + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + v = int32((uint32(v) >> 1) ^ uint32(((v&1)<<31)>>31)) + m.Field7 = append(m.Field7, v) + case 8: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field8", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetestUnsafe + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Field8 = append(m.Field8, NidOptNative{}) + if err := m.Field8[len(m.Field8)-1].Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 13: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field13", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field13 = append(m.Field13, bool(v != 0)) + case 14: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field14", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + 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 ErrInvalidLengthThetestUnsafe + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Field14 = append(m.Field14, string(data[iNdEx:postIndex])) + iNdEx = postIndex + case 15: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field15", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthThetestUnsafe + } + postIndex := iNdEx + byteLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Field15 = append(m.Field15, make([]byte, postIndex-iNdEx)) + copy(m.Field15[len(m.Field15)-1], data[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipThetestUnsafe(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetestUnsafe + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *NinRepStruct) 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 ErrIntOverflowThetestUnsafe + } + 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: NinRepStruct: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: NinRepStruct: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) + } + var v float64 + if iNdEx+8 > l { + return io.ErrUnexpectedEOF + } + v = *(*float64)(unsafe.Pointer(&data[iNdEx])) + iNdEx += 8 + m.Field1 = append(m.Field1, v) + case 2: + if wireType != 5 { + return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType) + } + var v float32 + if iNdEx+4 > l { + return io.ErrUnexpectedEOF + } + v = *(*float32)(unsafe.Pointer(&data[iNdEx])) + iNdEx += 4 + m.Field2 = append(m.Field2, v) + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field3", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetestUnsafe + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Field3 = append(m.Field3, &NidOptNative{}) + if err := m.Field3[len(m.Field3)-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 Field4", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetestUnsafe + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Field4 = append(m.Field4, &NinOptNative{}) + if err := m.Field4[len(m.Field4)-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 Field6", wireType) + } + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field6 = append(m.Field6, v) + case 7: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field7", wireType) + } + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + v = int32((uint32(v) >> 1) ^ uint32(((v&1)<<31)>>31)) + m.Field7 = append(m.Field7, v) + case 8: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field8", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetestUnsafe + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Field8 = append(m.Field8, &NidOptNative{}) + if err := m.Field8[len(m.Field8)-1].Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 13: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field13", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field13 = append(m.Field13, bool(v != 0)) + case 14: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field14", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + 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 ErrInvalidLengthThetestUnsafe + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Field14 = append(m.Field14, string(data[iNdEx:postIndex])) + iNdEx = postIndex + case 15: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field15", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthThetestUnsafe + } + postIndex := iNdEx + byteLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Field15 = append(m.Field15, make([]byte, postIndex-iNdEx)) + copy(m.Field15[len(m.Field15)-1], data[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipThetestUnsafe(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetestUnsafe + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *NidEmbeddedStruct) 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 ErrIntOverflowThetestUnsafe + } + 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: NidEmbeddedStruct: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: NidEmbeddedStruct: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NidOptNative", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetestUnsafe + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.NidOptNative == nil { + m.NidOptNative = &NidOptNative{} + } + if err := m.NidOptNative.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 200: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field200", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetestUnsafe + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Field200.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 210: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field210", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field210 = bool(v != 0) + default: + iNdEx = preIndex + skippy, err := skipThetestUnsafe(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetestUnsafe + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *NinEmbeddedStruct) 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 ErrIntOverflowThetestUnsafe + } + 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: NinEmbeddedStruct: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: NinEmbeddedStruct: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NidOptNative", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetestUnsafe + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.NidOptNative == nil { + m.NidOptNative = &NidOptNative{} + } + if err := m.NidOptNative.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 200: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field200", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetestUnsafe + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Field200 == nil { + m.Field200 = &NidOptNative{} + } + if err := m.Field200.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 210: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field210", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + b := bool(v != 0) + m.Field210 = &b + default: + iNdEx = preIndex + skippy, err := skipThetestUnsafe(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetestUnsafe + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *NidNestedStruct) 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 ErrIntOverflowThetestUnsafe + } + 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: NidNestedStruct: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: NidNestedStruct: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetestUnsafe + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Field1.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetestUnsafe + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Field2 = append(m.Field2, NidRepStruct{}) + if err := m.Field2[len(m.Field2)-1].Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipThetestUnsafe(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetestUnsafe + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *NinNestedStruct) 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 ErrIntOverflowThetestUnsafe + } + 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: NinNestedStruct: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: NinNestedStruct: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetestUnsafe + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Field1 == nil { + m.Field1 = &NinOptStruct{} + } + if err := m.Field1.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetestUnsafe + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Field2 = append(m.Field2, &NinRepStruct{}) + if err := m.Field2[len(m.Field2)-1].Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipThetestUnsafe(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetestUnsafe + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *NidOptCustom) 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 ErrIntOverflowThetestUnsafe + } + 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: NidOptCustom: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: NidOptCustom: 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 byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthThetestUnsafe + } + postIndex := iNdEx + byteLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + 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 Value", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthThetestUnsafe + } + postIndex := iNdEx + byteLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Value.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipThetestUnsafe(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetestUnsafe + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *CustomDash) 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 ErrIntOverflowThetestUnsafe + } + 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: CustomDash: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: CustomDash: 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 ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthThetestUnsafe + } + postIndex := iNdEx + byteLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var v github_com_gogo_protobuf_test_custom_dash_type.Bytes + m.Value = &v + if err := m.Value.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipThetestUnsafe(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetestUnsafe + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *NinOptCustom) 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 ErrIntOverflowThetestUnsafe + } + 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: NinOptCustom: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: NinOptCustom: 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 byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthThetestUnsafe + } + postIndex := iNdEx + byteLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var v Uuid + m.Id = &v + 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 Value", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthThetestUnsafe + } + postIndex := iNdEx + byteLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var v github_com_gogo_protobuf_test_custom.Uint128 + m.Value = &v + if err := m.Value.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipThetestUnsafe(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetestUnsafe + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *NidRepCustom) 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 ErrIntOverflowThetestUnsafe + } + 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: NidRepCustom: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: NidRepCustom: 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 byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthThetestUnsafe + } + postIndex := iNdEx + byteLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var v Uuid + m.Id = append(m.Id, v) + if err := m.Id[len(m.Id)-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 Value", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthThetestUnsafe + } + postIndex := iNdEx + byteLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var v github_com_gogo_protobuf_test_custom.Uint128 + m.Value = append(m.Value, v) + if err := m.Value[len(m.Value)-1].Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipThetestUnsafe(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetestUnsafe + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *NinRepCustom) 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 ErrIntOverflowThetestUnsafe + } + 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: NinRepCustom: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: NinRepCustom: 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 byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthThetestUnsafe + } + postIndex := iNdEx + byteLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var v Uuid + m.Id = append(m.Id, v) + if err := m.Id[len(m.Id)-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 Value", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthThetestUnsafe + } + postIndex := iNdEx + byteLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var v github_com_gogo_protobuf_test_custom.Uint128 + m.Value = append(m.Value, v) + if err := m.Value[len(m.Value)-1].Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipThetestUnsafe(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetestUnsafe + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *NinOptNativeUnion) 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 ErrIntOverflowThetestUnsafe + } + 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: NinOptNativeUnion: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: NinOptNativeUnion: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) + } + var v float64 + if iNdEx+8 > l { + return io.ErrUnexpectedEOF + } + v = *(*float64)(unsafe.Pointer(&data[iNdEx])) + iNdEx += 8 + m.Field1 = &v + case 2: + if wireType != 5 { + return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType) + } + var v float32 + if iNdEx+4 > l { + return io.ErrUnexpectedEOF + } + v = *(*float32)(unsafe.Pointer(&data[iNdEx])) + iNdEx += 4 + m.Field2 = &v + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field3", wireType) + } + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field3 = &v + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field4", wireType) + } + var v int64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field4 = &v + case 5: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field5", wireType) + } + var v uint32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (uint32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field5 = &v + case 6: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field6", wireType) + } + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field6 = &v + case 13: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field13", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + b := bool(v != 0) + m.Field13 = &b + case 14: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field14", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + 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 ErrInvalidLengthThetestUnsafe + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + s := string(data[iNdEx:postIndex]) + m.Field14 = &s + iNdEx = postIndex + case 15: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field15", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthThetestUnsafe + } + postIndex := iNdEx + byteLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Field15 = append(m.Field15[:0], data[iNdEx:postIndex]...) + if m.Field15 == nil { + m.Field15 = []byte{} + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipThetestUnsafe(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetestUnsafe + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *NinOptStructUnion) 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 ErrIntOverflowThetestUnsafe + } + 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: NinOptStructUnion: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: NinOptStructUnion: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) + } + var v float64 + if iNdEx+8 > l { + return io.ErrUnexpectedEOF + } + v = *(*float64)(unsafe.Pointer(&data[iNdEx])) + iNdEx += 8 + m.Field1 = &v + case 2: + if wireType != 5 { + return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType) + } + var v float32 + if iNdEx+4 > l { + return io.ErrUnexpectedEOF + } + v = *(*float32)(unsafe.Pointer(&data[iNdEx])) + iNdEx += 4 + m.Field2 = &v + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field3", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetestUnsafe + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Field3 == nil { + m.Field3 = &NidOptNative{} + } + if err := m.Field3.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field4", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetestUnsafe + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Field4 == nil { + m.Field4 = &NinOptNative{} + } + if err := m.Field4.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 6: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field6", wireType) + } + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field6 = &v + case 7: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field7", wireType) + } + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + v = int32((uint32(v) >> 1) ^ uint32(((v&1)<<31)>>31)) + m.Field7 = &v + case 13: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field13", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + b := bool(v != 0) + m.Field13 = &b + case 14: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field14", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + 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 ErrInvalidLengthThetestUnsafe + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + s := string(data[iNdEx:postIndex]) + m.Field14 = &s + iNdEx = postIndex + case 15: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field15", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthThetestUnsafe + } + postIndex := iNdEx + byteLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Field15 = append(m.Field15[:0], data[iNdEx:postIndex]...) + if m.Field15 == nil { + m.Field15 = []byte{} + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipThetestUnsafe(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetestUnsafe + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *NinEmbeddedStructUnion) 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 ErrIntOverflowThetestUnsafe + } + 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: NinEmbeddedStructUnion: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: NinEmbeddedStructUnion: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NidOptNative", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetestUnsafe + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.NidOptNative == nil { + m.NidOptNative = &NidOptNative{} + } + if err := m.NidOptNative.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 200: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field200", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetestUnsafe + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Field200 == nil { + m.Field200 = &NinOptNative{} + } + if err := m.Field200.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 210: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field210", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + b := bool(v != 0) + m.Field210 = &b + default: + iNdEx = preIndex + skippy, err := skipThetestUnsafe(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetestUnsafe + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *NinNestedStructUnion) 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 ErrIntOverflowThetestUnsafe + } + 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: NinNestedStructUnion: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: NinNestedStructUnion: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetestUnsafe + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Field1 == nil { + m.Field1 = &NinOptNativeUnion{} + } + if err := m.Field1.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetestUnsafe + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Field2 == nil { + m.Field2 = &NinOptStructUnion{} + } + if err := m.Field2.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field3", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetestUnsafe + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Field3 == nil { + m.Field3 = &NinEmbeddedStructUnion{} + } + if err := m.Field3.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipThetestUnsafe(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetestUnsafe + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Tree) 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 ErrIntOverflowThetestUnsafe + } + 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: Tree: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Tree: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Or", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetestUnsafe + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Or == nil { + m.Or = &OrBranch{} + } + if err := m.Or.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field And", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetestUnsafe + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.And == nil { + m.And = &AndBranch{} + } + if err := m.And.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Leaf", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetestUnsafe + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Leaf == nil { + m.Leaf = &Leaf{} + } + if err := m.Leaf.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipThetestUnsafe(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetestUnsafe + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *OrBranch) 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 ErrIntOverflowThetestUnsafe + } + 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: OrBranch: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: OrBranch: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Left", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetestUnsafe + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Left.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Right", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetestUnsafe + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Right.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipThetestUnsafe(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetestUnsafe + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *AndBranch) 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 ErrIntOverflowThetestUnsafe + } + 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: AndBranch: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: AndBranch: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Left", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetestUnsafe + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Left.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Right", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetestUnsafe + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Right.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipThetestUnsafe(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetestUnsafe + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Leaf) 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 ErrIntOverflowThetestUnsafe + } + 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: Leaf: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Leaf: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType) + } + m.Value = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + m.Value |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field StrValue", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + 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 ErrInvalidLengthThetestUnsafe + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.StrValue = string(data[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipThetestUnsafe(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetestUnsafe + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *DeepTree) 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 ErrIntOverflowThetestUnsafe + } + 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: DeepTree: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: DeepTree: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Down", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetestUnsafe + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Down == nil { + m.Down = &ADeepBranch{} + } + if err := m.Down.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field And", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetestUnsafe + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.And == nil { + m.And = &AndDeepBranch{} + } + if err := m.And.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Leaf", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetestUnsafe + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Leaf == nil { + m.Leaf = &DeepLeaf{} + } + if err := m.Leaf.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipThetestUnsafe(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetestUnsafe + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ADeepBranch) 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 ErrIntOverflowThetestUnsafe + } + 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: ADeepBranch: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ADeepBranch: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Down", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetestUnsafe + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Down.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipThetestUnsafe(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetestUnsafe + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *AndDeepBranch) 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 ErrIntOverflowThetestUnsafe + } + 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: AndDeepBranch: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: AndDeepBranch: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Left", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetestUnsafe + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Left.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Right", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetestUnsafe + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Right.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipThetestUnsafe(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetestUnsafe + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *DeepLeaf) 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 ErrIntOverflowThetestUnsafe + } + 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: DeepLeaf: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: DeepLeaf: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Tree", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetestUnsafe + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Tree.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipThetestUnsafe(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetestUnsafe + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Nil) 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 ErrIntOverflowThetestUnsafe + } + 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: Nil: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Nil: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipThetestUnsafe(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetestUnsafe + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *NidOptEnum) 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 ErrIntOverflowThetestUnsafe + } + 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: NidOptEnum: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: NidOptEnum: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) + } + m.Field1 = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + m.Field1 |= (TheTestEnum(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipThetestUnsafe(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetestUnsafe + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *NinOptEnum) 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 ErrIntOverflowThetestUnsafe + } + 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: NinOptEnum: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: NinOptEnum: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) + } + var v TheTestEnum + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (TheTestEnum(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field1 = &v + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType) + } + var v YetAnotherTestEnum + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (YetAnotherTestEnum(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field2 = &v + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field3", wireType) + } + var v YetYetAnotherTestEnum + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (YetYetAnotherTestEnum(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field3 = &v + default: + iNdEx = preIndex + skippy, err := skipThetestUnsafe(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetestUnsafe + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *NidRepEnum) 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 ErrIntOverflowThetestUnsafe + } + 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: NidRepEnum: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: NidRepEnum: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) + } + var v TheTestEnum + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (TheTestEnum(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field1 = append(m.Field1, v) + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType) + } + var v YetAnotherTestEnum + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (YetAnotherTestEnum(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field2 = append(m.Field2, v) + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field3", wireType) + } + var v YetYetAnotherTestEnum + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (YetYetAnotherTestEnum(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field3 = append(m.Field3, v) + default: + iNdEx = preIndex + skippy, err := skipThetestUnsafe(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetestUnsafe + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *NinRepEnum) 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 ErrIntOverflowThetestUnsafe + } + 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: NinRepEnum: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: NinRepEnum: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) + } + var v TheTestEnum + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (TheTestEnum(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field1 = append(m.Field1, v) + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType) + } + var v YetAnotherTestEnum + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (YetAnotherTestEnum(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field2 = append(m.Field2, v) + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field3", wireType) + } + var v YetYetAnotherTestEnum + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (YetYetAnotherTestEnum(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field3 = append(m.Field3, v) + default: + iNdEx = preIndex + skippy, err := skipThetestUnsafe(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetestUnsafe + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *NinOptEnumDefault) 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 ErrIntOverflowThetestUnsafe + } + 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: NinOptEnumDefault: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: NinOptEnumDefault: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) + } + var v TheTestEnum + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (TheTestEnum(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field1 = &v + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType) + } + var v YetAnotherTestEnum + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (YetAnotherTestEnum(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field2 = &v + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field3", wireType) + } + var v YetYetAnotherTestEnum + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (YetYetAnotherTestEnum(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field3 = &v + default: + iNdEx = preIndex + skippy, err := skipThetestUnsafe(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetestUnsafe + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *AnotherNinOptEnum) 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 ErrIntOverflowThetestUnsafe + } + 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: AnotherNinOptEnum: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: AnotherNinOptEnum: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) + } + var v AnotherTestEnum + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (AnotherTestEnum(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field1 = &v + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType) + } + var v YetAnotherTestEnum + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (YetAnotherTestEnum(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field2 = &v + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field3", wireType) + } + var v YetYetAnotherTestEnum + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (YetYetAnotherTestEnum(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field3 = &v + default: + iNdEx = preIndex + skippy, err := skipThetestUnsafe(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetestUnsafe + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *AnotherNinOptEnumDefault) 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 ErrIntOverflowThetestUnsafe + } + 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: AnotherNinOptEnumDefault: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: AnotherNinOptEnumDefault: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) + } + var v AnotherTestEnum + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (AnotherTestEnum(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field1 = &v + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType) + } + var v YetAnotherTestEnum + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (YetAnotherTestEnum(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field2 = &v + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field3", wireType) + } + var v YetYetAnotherTestEnum + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (YetYetAnotherTestEnum(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field3 = &v + default: + iNdEx = preIndex + skippy, err := skipThetestUnsafe(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetestUnsafe + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Timer) 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 ErrIntOverflowThetestUnsafe + } + 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: Timer: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Timer: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field Time1", wireType) + } + if iNdEx+8 > l { + return io.ErrUnexpectedEOF + } + m.Time1 = *(*int64)(unsafe.Pointer(&data[iNdEx])) + iNdEx += 8 + case 2: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field Time2", wireType) + } + if iNdEx+8 > l { + return io.ErrUnexpectedEOF + } + m.Time2 = *(*int64)(unsafe.Pointer(&data[iNdEx])) + iNdEx += 8 + 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 ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthThetestUnsafe + } + 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 := skipThetestUnsafe(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetestUnsafe + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MyExtendable) 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 ErrIntOverflowThetestUnsafe + } + 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: MyExtendable: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MyExtendable: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) + } + var v int64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field1 = &v + default: + if (fieldNum >= 100) && (fieldNum < 200) { + var sizeOfWire int + for { + sizeOfWire++ + wire >>= 7 + if wire == 0 { + break + } + } + iNdEx -= sizeOfWire + skippy, err := skipThetestUnsafe(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetestUnsafe + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + github_com_gogo_protobuf_proto.AppendExtension(m, int32(fieldNum), data[iNdEx:iNdEx+skippy]) + iNdEx += skippy + } else { + iNdEx = preIndex + skippy, err := skipThetestUnsafe(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetestUnsafe + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *OtherExtenable) 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 ErrIntOverflowThetestUnsafe + } + 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: OtherExtenable: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: OtherExtenable: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field M", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetestUnsafe + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.M == nil { + m.M = &MyExtendable{} + } + if err := m.M.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType) + } + var v int64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field2 = &v + case 13: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field13", wireType) + } + var v int64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field13 = &v + default: + if ((fieldNum >= 14) && (fieldNum < 17)) || ((fieldNum >= 10) && (fieldNum < 13)) { + var sizeOfWire int + for { + sizeOfWire++ + wire >>= 7 + if wire == 0 { + break + } + } + iNdEx -= sizeOfWire + skippy, err := skipThetestUnsafe(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetestUnsafe + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + github_com_gogo_protobuf_proto.AppendExtension(m, int32(fieldNum), data[iNdEx:iNdEx+skippy]) + iNdEx += skippy + } else { + iNdEx = preIndex + skippy, err := skipThetestUnsafe(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetestUnsafe + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *NestedDefinition) 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 ErrIntOverflowThetestUnsafe + } + 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: NestedDefinition: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: NestedDefinition: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) + } + var v int64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field1 = &v + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field EnumField", wireType) + } + var v NestedDefinition_NestedEnum + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (NestedDefinition_NestedEnum(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.EnumField = &v + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NNM", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetestUnsafe + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.NNM == nil { + m.NNM = &NestedDefinition_NestedMessage_NestedNestedMsg{} + } + if err := m.NNM.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NM", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetestUnsafe + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.NM == nil { + m.NM = &NestedDefinition_NestedMessage{} + } + if err := m.NM.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipThetestUnsafe(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetestUnsafe + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *NestedDefinition_NestedMessage) 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 ErrIntOverflowThetestUnsafe + } + 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: NestedMessage: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: NestedMessage: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field NestedField1", wireType) + } + var v uint64 + if iNdEx+8 > l { + return io.ErrUnexpectedEOF + } + v = *(*uint64)(unsafe.Pointer(&data[iNdEx])) + iNdEx += 8 + m.NestedField1 = &v + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NNM", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetestUnsafe + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.NNM == nil { + m.NNM = &NestedDefinition_NestedMessage_NestedNestedMsg{} + } + if err := m.NNM.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipThetestUnsafe(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetestUnsafe + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *NestedDefinition_NestedMessage_NestedNestedMsg) 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 ErrIntOverflowThetestUnsafe + } + 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: NestedNestedMsg: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: NestedNestedMsg: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 10: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NestedNestedField1", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + 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 ErrInvalidLengthThetestUnsafe + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + s := string(data[iNdEx:postIndex]) + m.NestedNestedField1 = &s + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipThetestUnsafe(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetestUnsafe + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *NestedScope) 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 ErrIntOverflowThetestUnsafe + } + 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: NestedScope: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: NestedScope: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field A", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetestUnsafe + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.A == nil { + m.A = &NestedDefinition_NestedMessage_NestedNestedMsg{} + } + if err := m.A.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field B", wireType) + } + var v NestedDefinition_NestedEnum + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (NestedDefinition_NestedEnum(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.B = &v + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field C", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetestUnsafe + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.C == nil { + m.C = &NestedDefinition_NestedMessage{} + } + if err := m.C.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipThetestUnsafe(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetestUnsafe + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *NinOptNativeDefault) 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 ErrIntOverflowThetestUnsafe + } + 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: NinOptNativeDefault: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: NinOptNativeDefault: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) + } + var v float64 + if iNdEx+8 > l { + return io.ErrUnexpectedEOF + } + v = *(*float64)(unsafe.Pointer(&data[iNdEx])) + iNdEx += 8 + m.Field1 = &v + case 2: + if wireType != 5 { + return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType) + } + var v float32 + if iNdEx+4 > l { + return io.ErrUnexpectedEOF + } + v = *(*float32)(unsafe.Pointer(&data[iNdEx])) + iNdEx += 4 + m.Field2 = &v + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field3", wireType) + } + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field3 = &v + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field4", wireType) + } + var v int64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field4 = &v + case 5: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field5", wireType) + } + var v uint32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (uint32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field5 = &v + case 6: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field6", wireType) + } + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field6 = &v + case 7: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field7", wireType) + } + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + v = int32((uint32(v) >> 1) ^ uint32(((v&1)<<31)>>31)) + m.Field7 = &v + case 8: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field8", wireType) + } + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + v = (v >> 1) ^ uint64((int64(v&1)<<63)>>63) + v2 := int64(v) + m.Field8 = &v2 + case 9: + if wireType != 5 { + return fmt.Errorf("proto: wrong wireType = %d for field Field9", wireType) + } + var v uint32 + if iNdEx+4 > l { + return io.ErrUnexpectedEOF + } + v = *(*uint32)(unsafe.Pointer(&data[iNdEx])) + iNdEx += 4 + m.Field9 = &v + case 10: + if wireType != 5 { + return fmt.Errorf("proto: wrong wireType = %d for field Field10", wireType) + } + var v int32 + if iNdEx+4 > l { + return io.ErrUnexpectedEOF + } + v = *(*int32)(unsafe.Pointer(&data[iNdEx])) + iNdEx += 4 + m.Field10 = &v + case 11: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field Field11", wireType) + } + var v uint64 + if iNdEx+8 > l { + return io.ErrUnexpectedEOF + } + v = *(*uint64)(unsafe.Pointer(&data[iNdEx])) + iNdEx += 8 + m.Field11 = &v + case 12: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field Field12", wireType) + } + var v int64 + if iNdEx+8 > l { + return io.ErrUnexpectedEOF + } + v = *(*int64)(unsafe.Pointer(&data[iNdEx])) + iNdEx += 8 + m.Field12 = &v + case 13: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field13", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + b := bool(v != 0) + m.Field13 = &b + case 14: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field14", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + 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 ErrInvalidLengthThetestUnsafe + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + s := string(data[iNdEx:postIndex]) + m.Field14 = &s + iNdEx = postIndex + case 15: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field15", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthThetestUnsafe + } + postIndex := iNdEx + byteLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Field15 = append(m.Field15[:0], data[iNdEx:postIndex]...) + if m.Field15 == nil { + m.Field15 = []byte{} + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipThetestUnsafe(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetestUnsafe + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *CustomContainer) 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 ErrIntOverflowThetestUnsafe + } + 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: CustomContainer: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: CustomContainer: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field CustomStruct", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetestUnsafe + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.CustomStruct.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipThetestUnsafe(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetestUnsafe + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *CustomNameNidOptNative) 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 ErrIntOverflowThetestUnsafe + } + 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: CustomNameNidOptNative: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: CustomNameNidOptNative: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field FieldA", wireType) + } + if iNdEx+8 > l { + return io.ErrUnexpectedEOF + } + m.FieldA = *(*float64)(unsafe.Pointer(&data[iNdEx])) + iNdEx += 8 + case 2: + if wireType != 5 { + return fmt.Errorf("proto: wrong wireType = %d for field FieldB", wireType) + } + if iNdEx+4 > l { + return io.ErrUnexpectedEOF + } + m.FieldB = *(*float32)(unsafe.Pointer(&data[iNdEx])) + iNdEx += 4 + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field FieldC", wireType) + } + m.FieldC = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + m.FieldC |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field FieldD", wireType) + } + m.FieldD = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + m.FieldD |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + case 5: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field FieldE", wireType) + } + m.FieldE = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + m.FieldE |= (uint32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + case 6: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field FieldF", wireType) + } + m.FieldF = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + m.FieldF |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + case 7: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field FieldG", wireType) + } + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + v = int32((uint32(v) >> 1) ^ uint32(((v&1)<<31)>>31)) + m.FieldG = v + case 8: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field FieldH", wireType) + } + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + v = (v >> 1) ^ uint64((int64(v&1)<<63)>>63) + m.FieldH = int64(v) + case 9: + if wireType != 5 { + return fmt.Errorf("proto: wrong wireType = %d for field FieldI", wireType) + } + if iNdEx+4 > l { + return io.ErrUnexpectedEOF + } + m.FieldI = *(*uint32)(unsafe.Pointer(&data[iNdEx])) + iNdEx += 4 + case 10: + if wireType != 5 { + return fmt.Errorf("proto: wrong wireType = %d for field FieldJ", wireType) + } + if iNdEx+4 > l { + return io.ErrUnexpectedEOF + } + m.FieldJ = *(*int32)(unsafe.Pointer(&data[iNdEx])) + iNdEx += 4 + case 11: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field FieldK", wireType) + } + if iNdEx+8 > l { + return io.ErrUnexpectedEOF + } + m.FieldK = *(*uint64)(unsafe.Pointer(&data[iNdEx])) + iNdEx += 8 + case 12: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field FieldL", wireType) + } + if iNdEx+8 > l { + return io.ErrUnexpectedEOF + } + m.FieldL = *(*int64)(unsafe.Pointer(&data[iNdEx])) + iNdEx += 8 + case 13: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field FieldM", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.FieldM = bool(v != 0) + case 14: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field FieldN", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + 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 ErrInvalidLengthThetestUnsafe + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.FieldN = string(data[iNdEx:postIndex]) + iNdEx = postIndex + case 15: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field FieldO", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthThetestUnsafe + } + postIndex := iNdEx + byteLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.FieldO = append(m.FieldO[:0], data[iNdEx:postIndex]...) + if m.FieldO == nil { + m.FieldO = []byte{} + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipThetestUnsafe(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetestUnsafe + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *CustomNameNinOptNative) 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 ErrIntOverflowThetestUnsafe + } + 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: CustomNameNinOptNative: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: CustomNameNinOptNative: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field FieldA", wireType) + } + var v float64 + if iNdEx+8 > l { + return io.ErrUnexpectedEOF + } + v = *(*float64)(unsafe.Pointer(&data[iNdEx])) + iNdEx += 8 + m.FieldA = &v + case 2: + if wireType != 5 { + return fmt.Errorf("proto: wrong wireType = %d for field FieldB", wireType) + } + var v float32 + if iNdEx+4 > l { + return io.ErrUnexpectedEOF + } + v = *(*float32)(unsafe.Pointer(&data[iNdEx])) + iNdEx += 4 + m.FieldB = &v + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field FieldC", wireType) + } + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.FieldC = &v + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field FieldD", wireType) + } + var v int64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.FieldD = &v + case 5: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field FieldE", wireType) + } + var v uint32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (uint32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.FieldE = &v + case 6: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field FieldF", wireType) + } + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.FieldF = &v + case 7: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field FieldG", wireType) + } + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + v = int32((uint32(v) >> 1) ^ uint32(((v&1)<<31)>>31)) + m.FieldG = &v + case 8: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field FieldH", wireType) + } + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + v = (v >> 1) ^ uint64((int64(v&1)<<63)>>63) + v2 := int64(v) + m.FieldH = &v2 + case 9: + if wireType != 5 { + return fmt.Errorf("proto: wrong wireType = %d for field FieldI", wireType) + } + var v uint32 + if iNdEx+4 > l { + return io.ErrUnexpectedEOF + } + v = *(*uint32)(unsafe.Pointer(&data[iNdEx])) + iNdEx += 4 + m.FieldI = &v + case 10: + if wireType != 5 { + return fmt.Errorf("proto: wrong wireType = %d for field FieldJ", wireType) + } + var v int32 + if iNdEx+4 > l { + return io.ErrUnexpectedEOF + } + v = *(*int32)(unsafe.Pointer(&data[iNdEx])) + iNdEx += 4 + m.FieldJ = &v + case 11: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field FieldK", wireType) + } + var v uint64 + if iNdEx+8 > l { + return io.ErrUnexpectedEOF + } + v = *(*uint64)(unsafe.Pointer(&data[iNdEx])) + iNdEx += 8 + m.FieldK = &v + case 12: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field FielL", wireType) + } + var v int64 + if iNdEx+8 > l { + return io.ErrUnexpectedEOF + } + v = *(*int64)(unsafe.Pointer(&data[iNdEx])) + iNdEx += 8 + m.FielL = &v + case 13: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field FieldM", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + b := bool(v != 0) + m.FieldM = &b + case 14: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field FieldN", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + 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 ErrInvalidLengthThetestUnsafe + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + s := string(data[iNdEx:postIndex]) + m.FieldN = &s + iNdEx = postIndex + case 15: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field FieldO", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthThetestUnsafe + } + postIndex := iNdEx + byteLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.FieldO = append(m.FieldO[:0], data[iNdEx:postIndex]...) + if m.FieldO == nil { + m.FieldO = []byte{} + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipThetestUnsafe(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetestUnsafe + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *CustomNameNinRepNative) 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 ErrIntOverflowThetestUnsafe + } + 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: CustomNameNinRepNative: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: CustomNameNinRepNative: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field FieldA", wireType) + } + var v float64 + if iNdEx+8 > l { + return io.ErrUnexpectedEOF + } + v = *(*float64)(unsafe.Pointer(&data[iNdEx])) + iNdEx += 8 + m.FieldA = append(m.FieldA, v) + case 2: + if wireType != 5 { + return fmt.Errorf("proto: wrong wireType = %d for field FieldB", wireType) + } + var v float32 + if iNdEx+4 > l { + return io.ErrUnexpectedEOF + } + v = *(*float32)(unsafe.Pointer(&data[iNdEx])) + iNdEx += 4 + m.FieldB = append(m.FieldB, v) + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field FieldC", wireType) + } + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.FieldC = append(m.FieldC, v) + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field FieldD", wireType) + } + var v int64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.FieldD = append(m.FieldD, v) + case 5: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field FieldE", wireType) + } + var v uint32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (uint32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.FieldE = append(m.FieldE, v) + case 6: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field FieldF", wireType) + } + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.FieldF = append(m.FieldF, v) + case 7: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field FieldG", wireType) + } + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + v = int32((uint32(v) >> 1) ^ uint32(((v&1)<<31)>>31)) + m.FieldG = append(m.FieldG, v) + case 8: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field FieldH", wireType) + } + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + v = (v >> 1) ^ uint64((int64(v&1)<<63)>>63) + m.FieldH = append(m.FieldH, int64(v)) + case 9: + if wireType != 5 { + return fmt.Errorf("proto: wrong wireType = %d for field FieldI", wireType) + } + var v uint32 + if iNdEx+4 > l { + return io.ErrUnexpectedEOF + } + v = *(*uint32)(unsafe.Pointer(&data[iNdEx])) + iNdEx += 4 + m.FieldI = append(m.FieldI, v) + case 10: + if wireType != 5 { + return fmt.Errorf("proto: wrong wireType = %d for field FieldJ", wireType) + } + var v int32 + if iNdEx+4 > l { + return io.ErrUnexpectedEOF + } + v = *(*int32)(unsafe.Pointer(&data[iNdEx])) + iNdEx += 4 + m.FieldJ = append(m.FieldJ, v) + case 11: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field FieldK", wireType) + } + var v uint64 + if iNdEx+8 > l { + return io.ErrUnexpectedEOF + } + v = *(*uint64)(unsafe.Pointer(&data[iNdEx])) + iNdEx += 8 + m.FieldK = append(m.FieldK, v) + case 12: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field FieldL", wireType) + } + var v int64 + if iNdEx+8 > l { + return io.ErrUnexpectedEOF + } + v = *(*int64)(unsafe.Pointer(&data[iNdEx])) + iNdEx += 8 + m.FieldL = append(m.FieldL, v) + case 13: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field FieldM", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.FieldM = append(m.FieldM, bool(v != 0)) + case 14: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field FieldN", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + 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 ErrInvalidLengthThetestUnsafe + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.FieldN = append(m.FieldN, string(data[iNdEx:postIndex])) + iNdEx = postIndex + case 15: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field FieldO", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthThetestUnsafe + } + postIndex := iNdEx + byteLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.FieldO = append(m.FieldO, make([]byte, postIndex-iNdEx)) + copy(m.FieldO[len(m.FieldO)-1], data[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipThetestUnsafe(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetestUnsafe + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *CustomNameNinStruct) 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 ErrIntOverflowThetestUnsafe + } + 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: CustomNameNinStruct: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: CustomNameNinStruct: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field FieldA", wireType) + } + var v float64 + if iNdEx+8 > l { + return io.ErrUnexpectedEOF + } + v = *(*float64)(unsafe.Pointer(&data[iNdEx])) + iNdEx += 8 + m.FieldA = &v + case 2: + if wireType != 5 { + return fmt.Errorf("proto: wrong wireType = %d for field FieldB", wireType) + } + var v float32 + if iNdEx+4 > l { + return io.ErrUnexpectedEOF + } + v = *(*float32)(unsafe.Pointer(&data[iNdEx])) + iNdEx += 4 + m.FieldB = &v + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field FieldC", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetestUnsafe + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.FieldC == nil { + m.FieldC = &NidOptNative{} + } + if err := m.FieldC.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field FieldD", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetestUnsafe + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.FieldD = append(m.FieldD, &NinOptNative{}) + if err := m.FieldD[len(m.FieldD)-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 FieldE", wireType) + } + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.FieldE = &v + case 7: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field FieldF", wireType) + } + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + v = int32((uint32(v) >> 1) ^ uint32(((v&1)<<31)>>31)) + m.FieldF = &v + case 8: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field FieldG", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetestUnsafe + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.FieldG == nil { + m.FieldG = &NidOptNative{} + } + if err := m.FieldG.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 13: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field FieldH", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + b := bool(v != 0) + m.FieldH = &b + case 14: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field FieldI", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + 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 ErrInvalidLengthThetestUnsafe + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + s := string(data[iNdEx:postIndex]) + m.FieldI = &s + iNdEx = postIndex + case 15: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field FieldJ", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthThetestUnsafe + } + postIndex := iNdEx + byteLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.FieldJ = append(m.FieldJ[:0], data[iNdEx:postIndex]...) + if m.FieldJ == nil { + m.FieldJ = []byte{} + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipThetestUnsafe(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetestUnsafe + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *CustomNameCustomType) 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 ErrIntOverflowThetestUnsafe + } + 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: CustomNameCustomType: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: CustomNameCustomType: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field FieldA", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthThetestUnsafe + } + postIndex := iNdEx + byteLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var v Uuid + m.FieldA = &v + if err := m.FieldA.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field FieldB", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthThetestUnsafe + } + postIndex := iNdEx + byteLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var v github_com_gogo_protobuf_test_custom.Uint128 + m.FieldB = &v + if err := m.FieldB.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field FieldC", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthThetestUnsafe + } + postIndex := iNdEx + byteLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var v Uuid + m.FieldC = append(m.FieldC, v) + if err := m.FieldC[len(m.FieldC)-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 FieldD", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthThetestUnsafe + } + postIndex := iNdEx + byteLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var v github_com_gogo_protobuf_test_custom.Uint128 + m.FieldD = append(m.FieldD, v) + if err := m.FieldD[len(m.FieldD)-1].Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipThetestUnsafe(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetestUnsafe + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *CustomNameNinEmbeddedStructUnion) 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 ErrIntOverflowThetestUnsafe + } + 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: CustomNameNinEmbeddedStructUnion: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: CustomNameNinEmbeddedStructUnion: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NidOptNative", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetestUnsafe + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.NidOptNative == nil { + m.NidOptNative = &NidOptNative{} + } + if err := m.NidOptNative.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 200: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field FieldA", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetestUnsafe + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.FieldA == nil { + m.FieldA = &NinOptNative{} + } + if err := m.FieldA.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 210: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field FieldB", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + b := bool(v != 0) + m.FieldB = &b + default: + iNdEx = preIndex + skippy, err := skipThetestUnsafe(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetestUnsafe + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *CustomNameEnum) 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 ErrIntOverflowThetestUnsafe + } + 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: CustomNameEnum: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: CustomNameEnum: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field FieldA", wireType) + } + var v TheTestEnum + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (TheTestEnum(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.FieldA = &v + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field FieldB", wireType) + } + var v TheTestEnum + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (TheTestEnum(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.FieldB = append(m.FieldB, v) + default: + iNdEx = preIndex + skippy, err := skipThetestUnsafe(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetestUnsafe + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *NoExtensionsMap) 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 ErrIntOverflowThetestUnsafe + } + 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: NoExtensionsMap: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: NoExtensionsMap: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) + } + var v int64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field1 = &v + default: + if (fieldNum >= 100) && (fieldNum < 200) { + var sizeOfWire int + for { + sizeOfWire++ + wire >>= 7 + if wire == 0 { + break + } + } + iNdEx -= sizeOfWire + skippy, err := skipThetestUnsafe(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetestUnsafe + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + github_com_gogo_protobuf_proto.AppendExtension(m, int32(fieldNum), data[iNdEx:iNdEx+skippy]) + iNdEx += skippy + } else { + iNdEx = preIndex + skippy, err := skipThetestUnsafe(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetestUnsafe + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Unrecognized) 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 ErrIntOverflowThetestUnsafe + } + 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: Unrecognized: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Unrecognized: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + 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 ErrInvalidLengthThetestUnsafe + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + s := string(data[iNdEx:postIndex]) + m.Field1 = &s + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipThetestUnsafe(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetestUnsafe + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *UnrecognizedWithInner) 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 ErrIntOverflowThetestUnsafe + } + 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: UnrecognizedWithInner: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: UnrecognizedWithInner: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Embedded", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetestUnsafe + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Embedded = append(m.Embedded, &UnrecognizedWithInner_Inner{}) + if err := m.Embedded[len(m.Embedded)-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 Field2", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + 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 ErrInvalidLengthThetestUnsafe + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + s := string(data[iNdEx:postIndex]) + m.Field2 = &s + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipThetestUnsafe(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetestUnsafe + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *UnrecognizedWithInner_Inner) 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 ErrIntOverflowThetestUnsafe + } + 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: Inner: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Inner: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) + } + var v uint32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (uint32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field1 = &v + default: + iNdEx = preIndex + skippy, err := skipThetestUnsafe(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetestUnsafe + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *UnrecognizedWithEmbed) 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 ErrIntOverflowThetestUnsafe + } + 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: UnrecognizedWithEmbed: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: UnrecognizedWithEmbed: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field UnrecognizedWithEmbed_Embedded", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetestUnsafe + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.UnrecognizedWithEmbed_Embedded.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + 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 ErrInvalidLengthThetestUnsafe + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + s := string(data[iNdEx:postIndex]) + m.Field2 = &s + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipThetestUnsafe(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetestUnsafe + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *UnrecognizedWithEmbed_Embedded) 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 ErrIntOverflowThetestUnsafe + } + 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: Embedded: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Embedded: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) + } + var v uint32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (uint32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field1 = &v + default: + iNdEx = preIndex + skippy, err := skipThetestUnsafe(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetestUnsafe + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Node) 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 ErrIntOverflowThetestUnsafe + } + 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: Node: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Node: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Label", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + 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 ErrInvalidLengthThetestUnsafe + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + s := string(data[iNdEx:postIndex]) + m.Label = &s + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Children", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetestUnsafe + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Children = append(m.Children, &Node{}) + if err := m.Children[len(m.Children)-1].Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipThetestUnsafe(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetestUnsafe + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipThetestUnsafe(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, ErrIntOverflowThetestUnsafe + } + 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, ErrIntOverflowThetestUnsafe + } + 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, ErrIntOverflowThetestUnsafe + } + 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, ErrInvalidLengthThetestUnsafe + } + return iNdEx, nil + case 3: + for { + var innerWire uint64 + var start int = iNdEx + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowThetestUnsafe + } + 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 := skipThetestUnsafe(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 ( + ErrInvalidLengthThetestUnsafe = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowThetestUnsafe = fmt.Errorf("proto: integer overflow") +) + +var fileDescriptorThetest = []byte{ + // 3011 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xcc, 0x5a, 0x4d, 0x6c, 0x1b, 0xc7, + 0xf5, 0xd7, 0xee, 0x90, 0x32, 0x35, 0xa2, 0x24, 0x7a, 0x13, 0x33, 0x0b, 0x46, 0x7f, 0x49, 0xde, + 0xbf, 0xa2, 0x2a, 0x84, 0x2d, 0x91, 0x14, 0x25, 0xcb, 0x4c, 0x93, 0x42, 0xfc, 0x70, 0x6d, 0xd7, + 0xa2, 0x0c, 0x46, 0x6e, 0x6b, 0xa0, 0x40, 0x41, 0x89, 0x2b, 0x89, 0xa8, 0xb4, 0x14, 0xc8, 0xa5, + 0x6b, 0xf7, 0x50, 0x04, 0x39, 0x14, 0x46, 0xaf, 0x45, 0x8f, 0x6d, 0x5c, 0x14, 0x05, 0xdc, 0x5b, + 0x0e, 0x45, 0x51, 0x14, 0x45, 0xe3, 0x4b, 0x01, 0xf5, 0x66, 0xf4, 0x54, 0x14, 0x85, 0x91, 0x38, + 0x97, 0x1c, 0xd3, 0x53, 0x73, 0xc8, 0xa1, 0xb3, 0xbb, 0x33, 0xb3, 0x33, 0xb3, 0xbb, 0xdc, 0xa5, + 0x25, 0xb7, 0x39, 0x2c, 0x3f, 0xe6, 0xbd, 0x37, 0xf3, 0xf6, 0xfd, 0x7e, 0x6f, 0xe6, 0xed, 0xce, + 0xc0, 0xd9, 0xdd, 0xce, 0xd1, 0x4e, 0xa7, 0xb7, 0xdc, 0x37, 0x7a, 0xcd, 0x3d, 0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0x2f, 0xcf, 0xbb, 0xf2, 0x82, 0x9a, 0x44, 0xf2, 0x14, 0x2f, 0x2f, 0xb8, + 0xf2, 0x15, 0x75, 0x02, 0xc9, 0x13, 0xbc, 0x7c, 0xc5, 0x95, 0x17, 0xd5, 0x49, 0x24, 0x1f, 0xe3, + 0xe5, 0x45, 0x57, 0xbe, 0xaa, 0x4e, 0x21, 0x79, 0x92, 0x97, 0xaf, 0x6a, 0xef, 0xdb, 0xf0, 0x1a, + 0x2e, 0xbc, 0x69, 0x1e, 0x5e, 0x0a, 0x6c, 0x9a, 0x07, 0x96, 0x42, 0x9a, 0xe6, 0x21, 0xa5, 0x60, + 0xa6, 0x79, 0x30, 0x29, 0x8c, 0x69, 0x1e, 0x46, 0x0a, 0x60, 0x9a, 0x07, 0x90, 0x42, 0x97, 0xe6, + 0xa1, 0xa3, 0xa0, 0xa5, 0x79, 0xd0, 0x28, 0x5c, 0x69, 0x1e, 0x2e, 0x0a, 0x94, 0x2a, 0x00, 0xe5, + 0x42, 0xa4, 0x0a, 0x10, 0xb9, 0xe0, 0xa8, 0x02, 0x38, 0x2e, 0x2c, 0xaa, 0x00, 0x8b, 0x0b, 0x88, + 0x2a, 0x00, 0xe2, 0x42, 0xa1, 0x0a, 0x50, 0xb8, 0x20, 0xe0, 0x1c, 0x6b, 0xe8, 0xc7, 0x3e, 0x39, + 0x06, 0x06, 0xe6, 0x18, 0x18, 0x98, 0x63, 0x60, 0x60, 0x8e, 0x81, 0x81, 0x39, 0x06, 0x06, 0xe6, + 0x18, 0x18, 0x98, 0x63, 0x60, 0x60, 0x8e, 0x81, 0x81, 0x39, 0x06, 0x06, 0xe7, 0x18, 0x08, 0xc9, + 0x31, 0x10, 0x92, 0x63, 0x20, 0x24, 0xc7, 0x40, 0x48, 0x8e, 0x81, 0x90, 0x1c, 0x03, 0x81, 0x39, + 0xe6, 0xc2, 0x9b, 0xe6, 0xe1, 0xf5, 0xcd, 0x31, 0x10, 0x90, 0x63, 0x20, 0x20, 0xc7, 0x40, 0x40, + 0x8e, 0x81, 0x80, 0x1c, 0x03, 0x01, 0x39, 0x06, 0x02, 0x72, 0x0c, 0x04, 0xe4, 0x18, 0x08, 0xca, + 0x31, 0x10, 0x98, 0x63, 0x20, 0x30, 0xc7, 0x40, 0x60, 0x8e, 0x81, 0xc0, 0x1c, 0x03, 0x81, 0x39, + 0x06, 0xd8, 0x1c, 0xfb, 0x13, 0x80, 0x8a, 0x93, 0x63, 0xb7, 0x9b, 0xbb, 0x3f, 0xd0, 0x5b, 0x18, + 0x8a, 0x19, 0x21, 0xd3, 0x46, 0x2d, 0xe8, 0x52, 0x2e, 0x24, 0x33, 0x42, 0xae, 0xf1, 0xf2, 0x02, + 0x95, 0x93, 0x6c, 0xe3, 0xe5, 0x2b, 0x54, 0x4e, 0xf2, 0x8d, 0x97, 0x17, 0xa9, 0x9c, 0x64, 0x1c, + 0x2f, 0x5f, 0xa5, 0x72, 0x92, 0x73, 0xbc, 0x7c, 0x8d, 0xca, 0x49, 0xd6, 0xf1, 0xf2, 0x2b, 0x54, + 0x4e, 0xf2, 0x8e, 0x97, 0xaf, 0x53, 0x39, 0xc9, 0x3c, 0x5e, 0x7e, 0x55, 0x99, 0x13, 0x73, 0x8f, + 0x28, 0x50, 0x68, 0xe7, 0xc4, 0xec, 0x13, 0x34, 0xf2, 0xae, 0x06, 0xc9, 0x3f, 0x41, 0xa3, 0xe0, + 0x6a, 0x90, 0x0c, 0x14, 0x34, 0x56, 0xb4, 0x87, 0x36, 0x7c, 0x86, 0x08, 0x5f, 0x46, 0x80, 0x4f, + 0x66, 0xa0, 0xcb, 0x08, 0xd0, 0xc9, 0x0c, 0x6c, 0x19, 0x01, 0x36, 0x99, 0x81, 0x2c, 0x23, 0x40, + 0x26, 0x33, 0x70, 0x65, 0x04, 0xb8, 0x64, 0x06, 0xaa, 0x8c, 0x00, 0x95, 0xcc, 0xc0, 0x94, 0x11, + 0x60, 0x92, 0x19, 0x88, 0x32, 0x02, 0x44, 0x32, 0x03, 0x4f, 0x46, 0x80, 0x47, 0x66, 0xa0, 0x99, + 0x16, 0xa1, 0x91, 0x59, 0x58, 0xa6, 0x45, 0x58, 0x64, 0x16, 0x92, 0x69, 0x11, 0x12, 0x99, 0x85, + 0x63, 0x5a, 0x84, 0x43, 0x66, 0xa1, 0xf8, 0x52, 0x26, 0x15, 0xe1, 0xbb, 0x66, 0xb7, 0xbf, 0x6b, + 0x9e, 0xaa, 0x22, 0xcc, 0x71, 0xe5, 0xc3, 0x78, 0x41, 0x59, 0xb2, 0x0b, 0x56, 0xb6, 0xe2, 0x14, + 0x56, 0xb0, 0x1c, 0x57, 0x58, 0x30, 0x16, 0x86, 0xbf, 0x45, 0xf1, 0x54, 0xb5, 0x61, 0x8e, 0x2b, + 0x33, 0xc2, 0xfd, 0x5b, 0x7f, 0xe9, 0x15, 0xdb, 0x13, 0x99, 0x54, 0x6c, 0x38, 0xfc, 0xc3, 0x56, + 0x6c, 0xd9, 0xf0, 0x90, 0xd3, 0x60, 0x67, 0xc3, 0x83, 0xed, 0x59, 0x75, 0xa2, 0x56, 0x70, 0xd9, + 0xf0, 0xd0, 0xd2, 0xa0, 0x9e, 0x6d, 0xbd, 0x85, 0x19, 0x8c, 0x26, 0x13, 0x1f, 0x06, 0x0f, 0x5b, + 0x6f, 0xe5, 0xb8, 0xa9, 0x64, 0x58, 0x06, 0x83, 0xa1, 0x19, 0x3c, 0x6c, 0xe5, 0x95, 0xe3, 0xa6, + 0x97, 0xa1, 0x19, 0xfc, 0x12, 0xea, 0x21, 0xcc, 0x60, 0x37, 0xfc, 0xc3, 0xd6, 0x43, 0xd9, 0xf0, + 0x90, 0xfb, 0x32, 0x18, 0x0c, 0xc1, 0xe0, 0x28, 0xf5, 0x51, 0x36, 0x3c, 0xb4, 0xfe, 0x0c, 0x3e, + 0x75, 0x35, 0xf3, 0x81, 0x04, 0xcf, 0xa3, 0x61, 0x6a, 0x47, 0x3b, 0x7a, 0xab, 0xa5, 0xb7, 0x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 0x9b, 0xc6, 0xee, 0x41, + 0x43, 0xee, 0x74, 0xd1, 0x62, 0x0b, 0x36, 0x8c, 0x16, 0xf6, 0x68, 0xca, 0x51, 0x40, 0x0d, 0x58, + 0x03, 0x34, 0x8d, 0x16, 0xea, 0x22, 0x76, 0x4b, 0x6f, 0xee, 0x61, 0x27, 0xa0, 0xa3, 0x63, 0xb5, + 0x34, 0x62, 0x87, 0xe8, 0x13, 0x0f, 0xf8, 0x5d, 0x98, 0x20, 0x1d, 0x2b, 0xf3, 0x96, 0xc5, 0x9e, + 0x89, 0x87, 0xc5, 0x16, 0x96, 0x3b, 0x78, 0xe5, 0x42, 0x76, 0x7b, 0xa6, 0xb2, 0x00, 0xe3, 0x8d, + 0xf6, 0xfe, 0x81, 0x89, 0x07, 0xf7, 0xaa, 0xc5, 0xbb, 0x96, 0x58, 0xbb, 0x0b, 0xc7, 0xa8, 0x47, + 0x67, 0xdc, 0x75, 0xd5, 0xb9, 0x35, 0xf4, 0x24, 0xcc, 0xac, 0x27, 0xe4, 0xbd, 0xa5, 0x33, 0x7b, + 0x29, 0x73, 0x30, 0x81, 0xc2, 0xec, 0x4e, 0xfa, 0xa4, 0x22, 0x4d, 0xf4, 0x70, 0xab, 0xf6, 0xbe, + 0x04, 0x13, 0x55, 0x5d, 0x3f, 0xb6, 0x03, 0xfe, 0x06, 0x8c, 0x55, 0x3b, 0x3f, 0x34, 0xb0, 0x83, + 0xe7, 0x71, 0x44, 0x2d, 0x31, 0x8e, 0x69, 0xac, 0x85, 0xc4, 0x48, 0x8d, 0x89, 0xfb, 0x2b, 0x34, + 0xee, 0x8c, 0x9e, 0x1d, 0x7b, 0x8d, 0x8b, 0x3d, 0x06, 0xd0, 0x52, 0xf2, 0xc4, 0xff, 0x0a, 0x1c, + 0x67, 0x46, 0x51, 0x16, 0xb1, 0x1b, 0xb2, 0x68, 0xc8, 0xc6, 0xca, 0xf2, 0x44, 0xd3, 0xe1, 0x04, + 0x37, 0xb0, 0x65, 0xca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 0x1d, 0x72, 0xaa, 0xa8, 0x56, 0x5a, 0xc6, 0xcb, 0xc8, 0x46, 0x5e, 0xb9, 0x40, 0x58, + 0xc0, 0xe5, 0x38, 0x0e, 0x90, 0xb3, 0xa2, 0x6c, 0xe4, 0xd1, 0x1d, 0x3a, 0x06, 0xe5, 0x40, 0x83, + 0xe0, 0x28, 0x39, 0x9d, 0x94, 0xf3, 0xa5, 0xeb, 0xb8, 0x93, 0x4a, 0x60, 0x27, 0x21, 0xa1, 0x72, + 0x7a, 0xaa, 0xe4, 0xcb, 0xdb, 0x27, 0x9f, 0xcc, 0x8c, 0x3c, 0x45, 0xd7, 0xdf, 0xd1, 0xf5, 0xf1, + 0x27, 0x33, 0xd2, 0x67, 0xe8, 0xfa, 0x1c, 0x5d, 0x5f, 0xa0, 0xeb, 0xbd, 0xe7, 0x33, 0xd2, 0x63, + 0x74, 0x7d, 0x88, 0xae, 0x3f, 0xa0, 0xeb, 0x09, 0xba, 0x4e, 0x9e, 0x23, 0x7d, 0x74, 0x7d, 0x8c, + 0x7e, 0x7f, 0x86, 0xbe, 0x3f, 0x47, 0xdf, 0x5f, 0xa0, 0xeb, 0xbd, 0x4f, 0x67, 0xa4, 0x47, 0x9f, + 0xce, 0x8c, 0x3c, 0x46, 0xdf, 0xff, 0x09, 0x00, 0x00, 0xff, 0xff, 0xcf, 0x5f, 0xbd, 0x69, 0xae, + 0x34, 0x00, 0x00, +} diff --git a/vendor/github.com/gogo/protobuf/test/combos/unsafeboth/thetest.proto b/vendor/github.com/gogo/protobuf/test/combos/unsafeboth/thetest.proto new file mode 100644 index 000000000..110d9b163 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/combos/unsafeboth/thetest.proto @@ -0,0 +1,624 @@ +// Copyright (c) 2013, Vastech SA (PTY) LTD. All rights reserved. +// http://github.com/gogo/protobuf/gogoproto +// +// 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 test; + +import "github.com/gogo/protobuf/gogoproto/gogo.proto"; + +option (gogoproto.goproto_stringer_all) = false; +option (gogoproto.goproto_enum_prefix_all) = false; +option (gogoproto.goproto_getters_all) = false; + +option (gogoproto.equal_all) = true; +option (gogoproto.verbose_equal_all) = true; +option (gogoproto.stringer_all) = true; +option (gogoproto.gostring_all) = true; +option (gogoproto.face_all) = true; +option (gogoproto.description_all) = true; + +option (gogoproto.testgen_all) = true; +option (gogoproto.populate_all) = true; +option (gogoproto.benchgen_all) = true; +option (gogoproto.unmarshaler_all) = false; +option (gogoproto.marshaler_all) = false; +option (gogoproto.sizer_all) = true; +option (gogoproto.protosizer_all) = false; + +option (gogoproto.goproto_enum_stringer_all) = false; +option (gogoproto.enum_stringer_all) = true; + +option (gogoproto.unsafe_marshaler_all) = true; +option (gogoproto.unsafe_unmarshaler_all) = true; + +option (gogoproto.compare_all) = true; + +message NidOptNative { + optional double Field1 = 1 [(gogoproto.nullable) = false]; + optional float Field2 = 2 [(gogoproto.nullable) = false]; + optional int32 Field3 = 3 [(gogoproto.nullable) = false]; + optional int64 Field4 = 4 [(gogoproto.nullable) = false]; + optional uint32 Field5 = 5 [(gogoproto.nullable) = false]; + optional uint64 Field6 = 6 [(gogoproto.nullable) = false]; + optional sint32 Field7 = 7 [(gogoproto.nullable) = false]; + optional sint64 Field8 = 8 [(gogoproto.nullable) = false]; + optional fixed32 Field9 = 9 [(gogoproto.nullable) = false]; + optional sfixed32 Field10 = 10 [(gogoproto.nullable) = false]; + optional fixed64 Field11 = 11 [(gogoproto.nullable) = false]; + optional sfixed64 Field12 = 12 [(gogoproto.nullable) = false]; + optional bool Field13 = 13 [(gogoproto.nullable) = false]; + optional string Field14 = 14 [(gogoproto.nullable) = false]; + optional bytes Field15 = 15 [(gogoproto.nullable) = false]; +} + +message NinOptNative { + optional double Field1 = 1; + optional float Field2 = 2; + optional int32 Field3 = 3; + optional int64 Field4 = 4; + optional uint32 Field5 = 5; + optional uint64 Field6 = 6; + optional sint32 Field7 = 7; + optional sint64 Field8 = 8; + optional fixed32 Field9 = 9; + optional sfixed32 Field10 = 10; + optional fixed64 Field11 = 11; + optional sfixed64 Field12 = 12; + optional bool Field13 = 13; + optional string Field14 = 14; + optional bytes Field15 = 15; +} + +message NidRepNative { + repeated double Field1 = 1 [(gogoproto.nullable) = false]; + repeated float Field2 = 2 [(gogoproto.nullable) = false]; + repeated int32 Field3 = 3 [(gogoproto.nullable) = false]; + repeated int64 Field4 = 4 [(gogoproto.nullable) = false]; + repeated uint32 Field5 = 5 [(gogoproto.nullable) = false]; + repeated uint64 Field6 = 6 [(gogoproto.nullable) = false]; + repeated sint32 Field7 = 7 [(gogoproto.nullable) = false]; + repeated sint64 Field8 = 8 [(gogoproto.nullable) = false]; + repeated fixed32 Field9 = 9 [(gogoproto.nullable) = false]; + repeated sfixed32 Field10 = 10 [(gogoproto.nullable) = false]; + repeated fixed64 Field11 = 11 [(gogoproto.nullable) = false]; + repeated sfixed64 Field12 = 12 [(gogoproto.nullable) = false]; + repeated bool Field13 = 13 [(gogoproto.nullable) = false]; + repeated string Field14 = 14 [(gogoproto.nullable) = false]; + repeated bytes Field15 = 15 [(gogoproto.nullable) = false]; +} + +message NinRepNative { + repeated double Field1 = 1; + repeated float Field2 = 2; + repeated int32 Field3 = 3; + repeated int64 Field4 = 4; + repeated uint32 Field5 = 5; + repeated uint64 Field6 = 6; + repeated sint32 Field7 = 7; + repeated sint64 Field8 = 8; + repeated fixed32 Field9 = 9; + repeated sfixed32 Field10 = 10; + repeated fixed64 Field11 = 11; + repeated sfixed64 Field12 = 12; + repeated bool Field13 = 13; + repeated string Field14 = 14; + repeated bytes Field15 = 15; +} + +message NidRepPackedNative { + repeated double Field1 = 1 [(gogoproto.nullable) = false, packed = true]; + repeated float Field2 = 2 [(gogoproto.nullable) = false, packed = true]; + repeated int32 Field3 = 3 [(gogoproto.nullable) = false, packed = true]; + repeated int64 Field4 = 4 [(gogoproto.nullable) = false, packed = true]; + repeated uint32 Field5 = 5 [(gogoproto.nullable) = false, packed = true]; + repeated uint64 Field6 = 6 [(gogoproto.nullable) = false, packed = true]; + repeated sint32 Field7 = 7 [(gogoproto.nullable) = false, packed = true]; + repeated sint64 Field8 = 8 [(gogoproto.nullable) = false, packed = true]; + repeated fixed32 Field9 = 9 [(gogoproto.nullable) = false, packed = true]; + repeated sfixed32 Field10 = 10 [(gogoproto.nullable) = false, packed = true]; + repeated fixed64 Field11 = 11 [(gogoproto.nullable) = false, packed = true]; + repeated sfixed64 Field12 = 12 [(gogoproto.nullable) = false, packed = true]; + repeated bool Field13 = 13 [(gogoproto.nullable) = false, packed = true]; +} + +message NinRepPackedNative { + repeated double Field1 = 1 [packed = true]; + repeated float Field2 = 2 [packed = true]; + repeated int32 Field3 = 3 [packed = true]; + repeated int64 Field4 = 4 [packed = true]; + repeated uint32 Field5 = 5 [packed = true]; + repeated uint64 Field6 = 6 [packed = true]; + repeated sint32 Field7 = 7 [packed = true]; + repeated sint64 Field8 = 8 [packed = true]; + repeated fixed32 Field9 = 9 [packed = true]; + repeated sfixed32 Field10 = 10 [packed = true]; + repeated fixed64 Field11 = 11 [packed = true]; + repeated sfixed64 Field12 = 12 [packed = true]; + repeated bool Field13 = 13 [packed = true]; +} + +message NidOptStruct { + optional double Field1 = 1 [(gogoproto.nullable) = false]; + optional float Field2 = 2 [(gogoproto.nullable) = false]; + optional NidOptNative Field3 = 3 [(gogoproto.nullable) = false]; + optional NinOptNative Field4 = 4 [(gogoproto.nullable) = false]; + optional uint64 Field6 = 6 [(gogoproto.nullable) = false]; + optional sint32 Field7 = 7 [(gogoproto.nullable) = false]; + optional NidOptNative Field8 = 8 [(gogoproto.nullable) = false]; + optional bool Field13 = 13 [(gogoproto.nullable) = false]; + optional string Field14 = 14 [(gogoproto.nullable) = false]; + optional bytes Field15 = 15 [(gogoproto.nullable) = false]; +} + +message NinOptStruct { + optional double Field1 = 1; + optional float Field2 = 2; + optional NidOptNative Field3 = 3; + optional NinOptNative Field4 = 4; + optional uint64 Field6 = 6; + optional sint32 Field7 = 7; + optional NidOptNative Field8 = 8; + optional bool Field13 = 13; + optional string Field14 = 14; + optional bytes Field15 = 15; +} + +message NidRepStruct { + repeated double Field1 = 1 [(gogoproto.nullable) = false]; + repeated float Field2 = 2 [(gogoproto.nullable) = false]; + repeated NidOptNative Field3 = 3 [(gogoproto.nullable) = false]; + repeated NinOptNative Field4 = 4 [(gogoproto.nullable) = false]; + repeated uint64 Field6 = 6 [(gogoproto.nullable) = false]; + repeated sint32 Field7 = 7 [(gogoproto.nullable) = false]; + repeated NidOptNative Field8 = 8 [(gogoproto.nullable) = false]; + repeated bool Field13 = 13 [(gogoproto.nullable) = false]; + repeated string Field14 = 14 [(gogoproto.nullable) = false]; + repeated bytes Field15 = 15 [(gogoproto.nullable) = false]; +} + +message NinRepStruct { + repeated double Field1 = 1; + repeated float Field2 = 2; + repeated NidOptNative Field3 = 3; + repeated NinOptNative Field4 = 4; + repeated uint64 Field6 = 6; + repeated sint32 Field7 = 7; + repeated NidOptNative Field8 = 8; + repeated bool Field13 = 13; + repeated string Field14 = 14; + repeated bytes Field15 = 15; +} + +message NidEmbeddedStruct { + optional NidOptNative Field1 = 1 [(gogoproto.embed) = true]; + optional NidOptNative Field200 = 200 [(gogoproto.nullable) = false]; + optional bool Field210 = 210 [(gogoproto.nullable) = false]; +} + +message NinEmbeddedStruct { + optional NidOptNative Field1 = 1 [(gogoproto.embed) = true]; + optional NidOptNative Field200 = 200; + optional bool Field210 = 210; +} + +message NidNestedStruct { + optional NidOptStruct Field1 = 1 [(gogoproto.nullable) = false]; + repeated NidRepStruct Field2 = 2 [(gogoproto.nullable) = false]; +} + +message NinNestedStruct { + optional NinOptStruct Field1 = 1; + repeated NinRepStruct Field2 = 2; +} + +message NidOptCustom { + optional bytes Id = 1 [(gogoproto.customtype) = "Uuid", (gogoproto.nullable) = false]; + optional bytes Value = 2 [(gogoproto.customtype) = "github.com/gogo/protobuf/test/custom.Uint128", (gogoproto.nullable) = false]; +} + +message CustomDash { + optional bytes Value = 1 [(gogoproto.customtype) = "github.com/gogo/protobuf/test/custom-dash-type.Bytes"]; +} + +message NinOptCustom { + optional bytes Id = 1 [(gogoproto.customtype) = "Uuid"]; + optional bytes Value = 2 [(gogoproto.customtype) = "github.com/gogo/protobuf/test/custom.Uint128"]; +} + +message NidRepCustom { + repeated bytes Id = 1 [(gogoproto.customtype) = "Uuid", (gogoproto.nullable) = false]; + repeated bytes Value = 2 [(gogoproto.customtype) = "github.com/gogo/protobuf/test/custom.Uint128", (gogoproto.nullable) = false]; +} + +message NinRepCustom { + repeated bytes Id = 1 [(gogoproto.customtype) = "Uuid"]; + repeated bytes Value = 2 [(gogoproto.customtype) = "github.com/gogo/protobuf/test/custom.Uint128"]; +} + +message NinOptNativeUnion { + option (gogoproto.onlyone) = true; + optional double Field1 = 1; + optional float Field2 = 2; + optional int32 Field3 = 3; + optional int64 Field4 = 4; + optional uint32 Field5 = 5; + optional uint64 Field6 = 6; + optional bool Field13 = 13; + optional string Field14 = 14; + optional bytes Field15 = 15; +} + +message NinOptStructUnion { + option (gogoproto.onlyone) = true; + optional double Field1 = 1; + optional float Field2 = 2; + optional NidOptNative Field3 = 3; + optional NinOptNative Field4 = 4; + optional uint64 Field6 = 6; + optional sint32 Field7 = 7; + optional bool Field13 = 13; + optional string Field14 = 14; + optional bytes Field15 = 15; +} + +message NinEmbeddedStructUnion { + option (gogoproto.onlyone) = true; + optional NidOptNative Field1 = 1 [(gogoproto.embed) = true]; + optional NinOptNative Field200 = 200; + optional bool Field210 = 210; +} + +message NinNestedStructUnion { + option (gogoproto.onlyone) = true; + optional NinOptNativeUnion Field1 = 1; + optional NinOptStructUnion Field2 = 2; + optional NinEmbeddedStructUnion Field3 = 3; +} + +message Tree { + option (gogoproto.onlyone) = true; + optional OrBranch Or = 1; + optional AndBranch And = 2; + optional Leaf Leaf = 3; +} + +message OrBranch { + optional Tree Left = 1 [(gogoproto.nullable) = false]; + optional Tree Right = 2 [(gogoproto.nullable) = false]; +} + +message AndBranch { + optional Tree Left = 1 [(gogoproto.nullable) = false]; + optional Tree Right = 2 [(gogoproto.nullable) = false]; +} + +message Leaf { + optional int64 Value = 1 [(gogoproto.nullable) = false]; + optional string StrValue = 2 [(gogoproto.nullable) = false]; +} + +message DeepTree { + option (gogoproto.onlyone) = true; + optional ADeepBranch Down = 1; + optional AndDeepBranch And = 2; + optional DeepLeaf Leaf = 3; +} + +message ADeepBranch { + optional DeepTree Down = 2 [(gogoproto.nullable) = false]; +} + +message AndDeepBranch { + optional DeepTree Left = 1 [(gogoproto.nullable) = false]; + optional DeepTree Right = 2 [(gogoproto.nullable) = false]; +} + +message DeepLeaf { + optional Tree Tree = 1 [(gogoproto.nullable) = false]; +} + +message Nil { + +} + +enum TheTestEnum { + A = 0; + B = 1; + C = 2; +} + +enum AnotherTestEnum { + option (gogoproto.goproto_enum_prefix) = false; + D = 10; + E = 11; +} + +// YetAnotherTestEnum is used to test cross-package import of custom name +// fields and default resolution. +enum YetAnotherTestEnum { + option (gogoproto.goproto_enum_prefix) = false; + AA = 0; + BB = 1 [(gogoproto.enumvalue_customname) = "BetterYetBB"]; +} + +// YetAnotherTestEnum is used to test cross-package import of custom name +// fields and default resolution. +enum YetYetAnotherTestEnum { + option (gogoproto.goproto_enum_prefix) = true; + CC = 0; + DD = 1 [(gogoproto.enumvalue_customname) = "BetterYetDD"]; +} + +message NidOptEnum { + optional TheTestEnum Field1 = 1 [(gogoproto.nullable) = false]; +} + +message NinOptEnum { + optional TheTestEnum Field1 = 1; + optional YetAnotherTestEnum Field2 = 2; + optional YetYetAnotherTestEnum Field3 = 3; +} + +message NidRepEnum { + repeated TheTestEnum Field1 = 1 [(gogoproto.nullable) = false]; + repeated YetAnotherTestEnum Field2 = 2 [(gogoproto.nullable) = false]; + repeated YetYetAnotherTestEnum Field3 = 3 [(gogoproto.nullable) = false]; +} + +message NinRepEnum { + repeated TheTestEnum Field1 = 1; + repeated YetAnotherTestEnum Field2 = 2; + repeated YetYetAnotherTestEnum Field3 = 3; +} + +message NinOptEnumDefault { + option (gogoproto.goproto_getters) = true; + option (gogoproto.face) = false; + optional TheTestEnum Field1 = 1 [default=C]; + optional YetAnotherTestEnum Field2 = 2 [default=BB]; + optional YetYetAnotherTestEnum Field3 = 3 [default=CC]; +} + +message AnotherNinOptEnum { + optional AnotherTestEnum Field1 = 1; + optional YetAnotherTestEnum Field2 = 2; + optional YetYetAnotherTestEnum Field3 = 3; +} + +message AnotherNinOptEnumDefault { + option (gogoproto.goproto_getters) = true; + option (gogoproto.face) = false; + optional AnotherTestEnum Field1 = 1 [default=E]; + optional YetAnotherTestEnum Field2 = 2 [default=BB]; + optional YetYetAnotherTestEnum Field3 = 3 [default=CC]; +} + + +message Timer { + optional sfixed64 Time1 = 1 [(gogoproto.nullable) = false]; + optional sfixed64 Time2 = 2 [(gogoproto.nullable) = false]; + optional bytes Data = 3 [(gogoproto.nullable) = false]; +} + +message MyExtendable { + option (gogoproto.face) = false; + optional int64 Field1 = 1; + extensions 100 to 199; +} + +extend MyExtendable { + optional double FieldA = 100; + optional NinOptNative FieldB = 101; + optional NinEmbeddedStruct FieldC = 102; + repeated int64 FieldD = 104; + repeated NinOptNative FieldE = 105; +} + +message OtherExtenable { + option (gogoproto.face) = false; + optional int64 Field2 = 2; + extensions 14 to 16; + optional int64 Field13 = 13; + extensions 10 to 12; + optional MyExtendable M = 1; +} + +message NestedDefinition { + optional int64 Field1 = 1; + message NestedMessage { + optional fixed64 NestedField1 = 1; + optional NestedNestedMsg NNM = 2; + message NestedNestedMsg { + optional string NestedNestedField1 = 10; + } + } + enum NestedEnum { + TYPE_NESTED = 1; + } + optional NestedEnum EnumField = 2; + optional NestedMessage.NestedNestedMsg NNM = 3; + optional NestedMessage NM = 4; +} + +message NestedScope { + optional NestedDefinition.NestedMessage.NestedNestedMsg A = 1; + optional NestedDefinition.NestedEnum B = 2; + optional NestedDefinition.NestedMessage C = 3; +} + +message NinOptNativeDefault { + option (gogoproto.goproto_getters) = true; + option (gogoproto.face) = false; + optional double Field1 = 1 [default = 1234.1234]; + optional float Field2 = 2 [default = 1234.1234]; + optional int32 Field3 = 3 [default = 1234]; + optional int64 Field4 = 4 [default = 1234]; + optional uint32 Field5 = 5 [default = 1234]; + optional uint64 Field6 = 6 [default = 1234]; + optional sint32 Field7 = 7 [default = 1234]; + optional sint64 Field8 = 8 [default = 1234]; + optional fixed32 Field9 = 9 [default = 1234]; + optional sfixed32 Field10 = 10 [default = 1234]; + optional fixed64 Field11 = 11 [default = 1234]; + optional sfixed64 Field12 = 12 [default = 1234]; + optional bool Field13 = 13 [default = true]; + optional string Field14 = 14 [default = "1234"]; + optional bytes Field15 = 15; +} + +message CustomContainer { + optional NidOptCustom CustomStruct = 1 [(gogoproto.nullable) = false]; +} + +message CustomNameNidOptNative { + optional double Field1 = 1 [(gogoproto.nullable) = false, (gogoproto.customname) = "FieldA"]; + optional float Field2 = 2 [(gogoproto.nullable) = false, (gogoproto.customname) = "FieldB"]; + optional int32 Field3 = 3 [(gogoproto.nullable) = false, (gogoproto.customname) = "FieldC"]; + optional int64 Field4 = 4 [(gogoproto.nullable) = false, (gogoproto.customname) = "FieldD"]; + optional uint32 Field5 = 5 [(gogoproto.nullable) = false, (gogoproto.customname) = "FieldE"]; + optional uint64 Field6 = 6 [(gogoproto.nullable) = false, (gogoproto.customname) = "FieldF"]; + optional sint32 Field7 = 7 [(gogoproto.nullable) = false, (gogoproto.customname) = "FieldG"]; + optional sint64 Field8 = 8 [(gogoproto.nullable) = false, (gogoproto.customname) = "FieldH"]; + optional fixed32 Field9 = 9 [(gogoproto.nullable) = false, (gogoproto.customname) = "FieldI"]; + optional sfixed32 Field10 = 10 [(gogoproto.nullable) = false, (gogoproto.customname) = "FieldJ"]; + optional fixed64 Field11 = 11 [(gogoproto.nullable) = false, (gogoproto.customname) = "FieldK"]; + optional sfixed64 Field12 = 12 [(gogoproto.nullable) = false, (gogoproto.customname) = "FieldL"]; + optional bool Field13 = 13 [(gogoproto.nullable) = false, (gogoproto.customname) = "FieldM"]; + optional string Field14 = 14 [(gogoproto.nullable) = false, (gogoproto.customname) = "FieldN"]; + optional bytes Field15 = 15 [(gogoproto.nullable) = false, (gogoproto.customname) = "FieldO"]; +} + +message CustomNameNinOptNative { + optional double Field1 = 1 [(gogoproto.customname) = "FieldA"]; + optional float Field2 = 2 [(gogoproto.customname) = "FieldB"]; + optional int32 Field3 = 3 [(gogoproto.customname) = "FieldC"]; + optional int64 Field4 = 4 [(gogoproto.customname) = "FieldD"]; + optional uint32 Field5 = 5 [(gogoproto.customname) = "FieldE"]; + optional uint64 Field6 = 6 [(gogoproto.customname) = "FieldF"]; + optional sint32 Field7 = 7 [(gogoproto.customname) = "FieldG"]; + optional sint64 Field8 = 8 [(gogoproto.customname) = "FieldH"]; + optional fixed32 Field9 = 9 [(gogoproto.customname) = "FieldI"]; + optional sfixed32 Field10 = 10 [(gogoproto.customname) = "FieldJ"]; + optional fixed64 Field11 = 11 [(gogoproto.customname) = "FieldK"]; + optional sfixed64 Field12 = 12 [(gogoproto.customname) = "FielL"]; + optional bool Field13 = 13 [(gogoproto.customname) = "FieldM"]; + optional string Field14 = 14 [(gogoproto.customname) = "FieldN"]; + optional bytes Field15 = 15 [(gogoproto.customname) = "FieldO"]; +} + +message CustomNameNinRepNative { + repeated double Field1 = 1 [(gogoproto.customname) = "FieldA"]; + repeated float Field2 = 2 [(gogoproto.customname) = "FieldB"]; + repeated int32 Field3 = 3 [(gogoproto.customname) = "FieldC"]; + repeated int64 Field4 = 4 [(gogoproto.customname) = "FieldD"]; + repeated uint32 Field5 = 5 [(gogoproto.customname) = "FieldE"]; + repeated uint64 Field6 = 6 [(gogoproto.customname) = "FieldF"]; + repeated sint32 Field7 = 7 [(gogoproto.customname) = "FieldG"]; + repeated sint64 Field8 = 8 [(gogoproto.customname) = "FieldH"]; + repeated fixed32 Field9 = 9 [(gogoproto.customname) = "FieldI"]; + repeated sfixed32 Field10 = 10 [(gogoproto.customname) = "FieldJ"]; + repeated fixed64 Field11 = 11 [(gogoproto.customname) = "FieldK"]; + repeated sfixed64 Field12 = 12 [(gogoproto.customname) = "FieldL"]; + repeated bool Field13 = 13 [(gogoproto.customname) = "FieldM"]; + repeated string Field14 = 14 [(gogoproto.customname) = "FieldN"]; + repeated bytes Field15 = 15 [(gogoproto.customname) = "FieldO"]; +} + +message CustomNameNinStruct { + optional double Field1 = 1 [(gogoproto.customname) = "FieldA"]; + optional float Field2 = 2 [(gogoproto.customname) = "FieldB"]; + optional NidOptNative Field3 = 3 [(gogoproto.customname) = "FieldC"]; + repeated NinOptNative Field4 = 4 [(gogoproto.customname) = "FieldD"]; + optional uint64 Field6 = 6 [(gogoproto.customname) = "FieldE"]; + optional sint32 Field7 = 7 [(gogoproto.customname) = "FieldF"]; + optional NidOptNative Field8 = 8 [(gogoproto.customname) = "FieldG"]; + optional bool Field13 = 13 [(gogoproto.customname) = "FieldH"]; + optional string Field14 = 14 [(gogoproto.customname) = "FieldI"]; + optional bytes Field15 = 15 [(gogoproto.customname) = "FieldJ"]; +} + +message CustomNameCustomType { + optional bytes Id = 1 [(gogoproto.customname) = "FieldA", (gogoproto.customtype) = "Uuid"]; + optional bytes Value = 2 [(gogoproto.customname) = "FieldB", (gogoproto.customtype) = "github.com/gogo/protobuf/test/custom.Uint128"]; + repeated bytes Ids = 3 [(gogoproto.customname) = "FieldC", (gogoproto.customtype) = "Uuid"]; + repeated bytes Values = 4 [(gogoproto.customname) = "FieldD", (gogoproto.customtype) = "github.com/gogo/protobuf/test/custom.Uint128"]; +} + +message CustomNameNinEmbeddedStructUnion { + option (gogoproto.onlyone) = true; + optional NidOptNative Field1 = 1 [(gogoproto.embed) = true]; + optional NinOptNative Field200 = 200 [(gogoproto.customname) = "FieldA"]; + optional bool Field210 = 210 [(gogoproto.customname) = "FieldB"]; +} + +message CustomNameEnum { + optional TheTestEnum Field1 = 1 [(gogoproto.customname) = "FieldA"]; + repeated TheTestEnum Field2 = 2 [(gogoproto.customname) = "FieldB"]; +} + +message NoExtensionsMap { + option (gogoproto.face) = false; + option (gogoproto.goproto_extensions_map) = false; + optional int64 Field1 = 1; + extensions 100 to 199; +} + +extend NoExtensionsMap { + optional double FieldA1 = 100; + optional NinOptNative FieldB1 = 101; + optional NinEmbeddedStruct FieldC1 = 102; +} + +message Unrecognized { + option (gogoproto.goproto_unrecognized) = false; + optional string Field1 = 1; +} + +message UnrecognizedWithInner { + message Inner { + option (gogoproto.goproto_unrecognized) = false; + optional uint32 Field1 = 1; + } + + repeated Inner embedded = 1; + optional string Field2 = 2; +} + +message UnrecognizedWithEmbed { + message Embedded { + option (gogoproto.goproto_unrecognized) = false; + optional uint32 Field1 = 1; + } + + optional Embedded embedded = 1 [(gogoproto.embed) = true, (gogoproto.nullable) = false]; + optional string Field2 = 2; +} + +message Node { + optional string Label = 1; + repeated Node Children = 2; +} + diff --git a/vendor/github.com/gogo/protobuf/test/combos/unsafeboth/thetestpb_test.go b/vendor/github.com/gogo/protobuf/test/combos/unsafeboth/thetestpb_test.go new file mode 100644 index 000000000..531ef799d --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/combos/unsafeboth/thetestpb_test.go @@ -0,0 +1,16373 @@ +// Code generated by protoc-gen-gogo. +// source: combos/unsafeboth/thetest.proto +// DO NOT EDIT! + +/* +Package test is a generated protocol buffer package. + +It is generated from these files: + combos/unsafeboth/thetest.proto + +It has these top-level messages: + NidOptNative + NinOptNative + NidRepNative + NinRepNative + NidRepPackedNative + NinRepPackedNative + NidOptStruct + NinOptStruct + NidRepStruct + NinRepStruct + NidEmbeddedStruct + NinEmbeddedStruct + NidNestedStruct + NinNestedStruct + NidOptCustom + CustomDash + NinOptCustom + NidRepCustom + NinRepCustom + NinOptNativeUnion + NinOptStructUnion + NinEmbeddedStructUnion + NinNestedStructUnion + Tree + OrBranch + AndBranch + Leaf + DeepTree + ADeepBranch + AndDeepBranch + DeepLeaf + Nil + NidOptEnum + NinOptEnum + NidRepEnum + NinRepEnum + NinOptEnumDefault + AnotherNinOptEnum + AnotherNinOptEnumDefault + Timer + MyExtendable + OtherExtenable + NestedDefinition + NestedScope + NinOptNativeDefault + CustomContainer + CustomNameNidOptNative + CustomNameNinOptNative + CustomNameNinRepNative + CustomNameNinStruct + CustomNameCustomType + CustomNameNinEmbeddedStructUnion + CustomNameEnum + NoExtensionsMap + Unrecognized + UnrecognizedWithInner + UnrecognizedWithEmbed + Node +*/ +package test + +import testing "testing" +import math_rand "math/rand" +import time "time" +import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" +import github_com_gogo_protobuf_jsonpb "github.com/gogo/protobuf/jsonpb" +import fmt "fmt" +import go_parser "go/parser" +import proto "github.com/gogo/protobuf/proto" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +func TestNidOptNativeProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidOptNative(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidOptNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestNidOptNativeMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidOptNative(popr, false) + size := p.Size() + data := make([]byte, size) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(data) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidOptNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkNidOptNativeProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NidOptNative, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNidOptNative(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNidOptNativeProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNidOptNative(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &NidOptNative{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinOptNativeProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptNative(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinOptNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestNinOptNativeMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptNative(popr, false) + size := p.Size() + data := make([]byte, size) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(data) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinOptNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkNinOptNativeProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinOptNative, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNinOptNative(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNinOptNativeProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinOptNative(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &NinOptNative{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNidRepNativeProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepNative(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidRepNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestNidRepNativeMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepNative(popr, false) + size := p.Size() + data := make([]byte, size) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(data) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidRepNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkNidRepNativeProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NidRepNative, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNidRepNative(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNidRepNativeProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNidRepNative(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &NidRepNative{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinRepNativeProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepNative(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinRepNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestNinRepNativeMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepNative(popr, false) + size := p.Size() + data := make([]byte, size) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(data) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinRepNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkNinRepNativeProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinRepNative, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNinRepNative(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNinRepNativeProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinRepNative(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &NinRepNative{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNidRepPackedNativeProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepPackedNative(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidRepPackedNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestNidRepPackedNativeMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepPackedNative(popr, false) + size := p.Size() + data := make([]byte, size) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(data) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidRepPackedNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkNidRepPackedNativeProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NidRepPackedNative, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNidRepPackedNative(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNidRepPackedNativeProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNidRepPackedNative(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &NidRepPackedNative{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinRepPackedNativeProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepPackedNative(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinRepPackedNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestNinRepPackedNativeMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepPackedNative(popr, false) + size := p.Size() + data := make([]byte, size) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(data) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinRepPackedNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkNinRepPackedNativeProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinRepPackedNative, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNinRepPackedNative(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNinRepPackedNativeProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinRepPackedNative(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &NinRepPackedNative{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNidOptStructProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidOptStruct(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidOptStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestNidOptStructMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidOptStruct(popr, false) + size := p.Size() + data := make([]byte, size) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(data) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidOptStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkNidOptStructProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NidOptStruct, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNidOptStruct(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNidOptStructProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNidOptStruct(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &NidOptStruct{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinOptStructProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptStruct(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinOptStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestNinOptStructMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptStruct(popr, false) + size := p.Size() + data := make([]byte, size) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(data) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinOptStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkNinOptStructProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinOptStruct, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNinOptStruct(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNinOptStructProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinOptStruct(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &NinOptStruct{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNidRepStructProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepStruct(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidRepStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestNidRepStructMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepStruct(popr, false) + size := p.Size() + data := make([]byte, size) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(data) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidRepStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkNidRepStructProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NidRepStruct, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNidRepStruct(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNidRepStructProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNidRepStruct(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &NidRepStruct{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinRepStructProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepStruct(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinRepStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestNinRepStructMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepStruct(popr, false) + size := p.Size() + data := make([]byte, size) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(data) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinRepStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkNinRepStructProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinRepStruct, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNinRepStruct(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNinRepStructProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinRepStruct(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &NinRepStruct{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNidEmbeddedStructProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidEmbeddedStruct(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidEmbeddedStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestNidEmbeddedStructMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidEmbeddedStruct(popr, false) + size := p.Size() + data := make([]byte, size) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(data) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidEmbeddedStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkNidEmbeddedStructProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NidEmbeddedStruct, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNidEmbeddedStruct(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNidEmbeddedStructProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNidEmbeddedStruct(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &NidEmbeddedStruct{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinEmbeddedStructProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinEmbeddedStruct(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinEmbeddedStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestNinEmbeddedStructMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinEmbeddedStruct(popr, false) + size := p.Size() + data := make([]byte, size) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(data) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinEmbeddedStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkNinEmbeddedStructProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinEmbeddedStruct, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNinEmbeddedStruct(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNinEmbeddedStructProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinEmbeddedStruct(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &NinEmbeddedStruct{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNidNestedStructProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidNestedStruct(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidNestedStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestNidNestedStructMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidNestedStruct(popr, false) + size := p.Size() + data := make([]byte, size) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(data) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidNestedStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkNidNestedStructProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NidNestedStruct, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNidNestedStruct(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNidNestedStructProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNidNestedStruct(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &NidNestedStruct{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinNestedStructProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinNestedStruct(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinNestedStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestNinNestedStructMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinNestedStruct(popr, false) + size := p.Size() + data := make([]byte, size) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(data) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinNestedStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkNinNestedStructProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinNestedStruct, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNinNestedStruct(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNinNestedStructProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinNestedStruct(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &NinNestedStruct{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNidOptCustomProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidOptCustom(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidOptCustom{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestNidOptCustomMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidOptCustom(popr, false) + size := p.Size() + data := make([]byte, size) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(data) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidOptCustom{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkNidOptCustomProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NidOptCustom, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNidOptCustom(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNidOptCustomProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNidOptCustom(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &NidOptCustom{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestCustomDashProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomDash(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &CustomDash{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestCustomDashMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomDash(popr, false) + size := p.Size() + data := make([]byte, size) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(data) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &CustomDash{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkCustomDashProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*CustomDash, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedCustomDash(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkCustomDashProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedCustomDash(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &CustomDash{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinOptCustomProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptCustom(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinOptCustom{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestNinOptCustomMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptCustom(popr, false) + size := p.Size() + data := make([]byte, size) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(data) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinOptCustom{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkNinOptCustomProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinOptCustom, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNinOptCustom(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNinOptCustomProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinOptCustom(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &NinOptCustom{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNidRepCustomProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepCustom(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidRepCustom{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestNidRepCustomMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepCustom(popr, false) + size := p.Size() + data := make([]byte, size) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(data) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidRepCustom{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkNidRepCustomProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NidRepCustom, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNidRepCustom(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNidRepCustomProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNidRepCustom(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &NidRepCustom{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinRepCustomProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepCustom(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinRepCustom{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestNinRepCustomMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepCustom(popr, false) + size := p.Size() + data := make([]byte, size) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(data) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinRepCustom{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkNinRepCustomProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinRepCustom, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNinRepCustom(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNinRepCustomProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinRepCustom(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &NinRepCustom{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinOptNativeUnionProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptNativeUnion(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinOptNativeUnion{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestNinOptNativeUnionMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptNativeUnion(popr, false) + size := p.Size() + data := make([]byte, size) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(data) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinOptNativeUnion{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkNinOptNativeUnionProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinOptNativeUnion, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNinOptNativeUnion(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNinOptNativeUnionProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinOptNativeUnion(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &NinOptNativeUnion{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinOptStructUnionProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptStructUnion(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinOptStructUnion{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestNinOptStructUnionMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptStructUnion(popr, false) + size := p.Size() + data := make([]byte, size) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(data) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinOptStructUnion{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkNinOptStructUnionProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinOptStructUnion, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNinOptStructUnion(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNinOptStructUnionProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinOptStructUnion(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &NinOptStructUnion{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinEmbeddedStructUnionProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinEmbeddedStructUnion(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinEmbeddedStructUnion{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestNinEmbeddedStructUnionMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinEmbeddedStructUnion(popr, false) + size := p.Size() + data := make([]byte, size) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(data) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinEmbeddedStructUnion{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkNinEmbeddedStructUnionProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinEmbeddedStructUnion, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNinEmbeddedStructUnion(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNinEmbeddedStructUnionProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinEmbeddedStructUnion(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &NinEmbeddedStructUnion{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinNestedStructUnionProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinNestedStructUnion(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinNestedStructUnion{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestNinNestedStructUnionMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinNestedStructUnion(popr, false) + size := p.Size() + data := make([]byte, size) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(data) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinNestedStructUnion{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkNinNestedStructUnionProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinNestedStructUnion, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNinNestedStructUnion(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNinNestedStructUnionProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinNestedStructUnion(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &NinNestedStructUnion{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestTreeProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedTree(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Tree{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestTreeMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedTree(popr, false) + size := p.Size() + data := make([]byte, size) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(data) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Tree{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkTreeProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Tree, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedTree(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkTreeProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedTree(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &Tree{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestOrBranchProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedOrBranch(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &OrBranch{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestOrBranchMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedOrBranch(popr, false) + size := p.Size() + data := make([]byte, size) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(data) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &OrBranch{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkOrBranchProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*OrBranch, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedOrBranch(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkOrBranchProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedOrBranch(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &OrBranch{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestAndBranchProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAndBranch(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &AndBranch{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestAndBranchMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAndBranch(popr, false) + size := p.Size() + data := make([]byte, size) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(data) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &AndBranch{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkAndBranchProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*AndBranch, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedAndBranch(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkAndBranchProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedAndBranch(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &AndBranch{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestLeafProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedLeaf(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Leaf{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestLeafMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedLeaf(popr, false) + size := p.Size() + data := make([]byte, size) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(data) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Leaf{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkLeafProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Leaf, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedLeaf(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkLeafProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedLeaf(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &Leaf{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestDeepTreeProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedDeepTree(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &DeepTree{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestDeepTreeMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedDeepTree(popr, false) + size := p.Size() + data := make([]byte, size) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(data) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &DeepTree{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkDeepTreeProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*DeepTree, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedDeepTree(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkDeepTreeProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedDeepTree(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &DeepTree{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestADeepBranchProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedADeepBranch(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &ADeepBranch{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestADeepBranchMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedADeepBranch(popr, false) + size := p.Size() + data := make([]byte, size) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(data) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &ADeepBranch{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkADeepBranchProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*ADeepBranch, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedADeepBranch(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkADeepBranchProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedADeepBranch(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &ADeepBranch{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestAndDeepBranchProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAndDeepBranch(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &AndDeepBranch{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestAndDeepBranchMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAndDeepBranch(popr, false) + size := p.Size() + data := make([]byte, size) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(data) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &AndDeepBranch{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkAndDeepBranchProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*AndDeepBranch, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedAndDeepBranch(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkAndDeepBranchProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedAndDeepBranch(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &AndDeepBranch{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestDeepLeafProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedDeepLeaf(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &DeepLeaf{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestDeepLeafMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedDeepLeaf(popr, false) + size := p.Size() + data := make([]byte, size) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(data) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &DeepLeaf{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkDeepLeafProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*DeepLeaf, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedDeepLeaf(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkDeepLeafProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedDeepLeaf(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &DeepLeaf{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNilProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNil(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Nil{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestNilMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNil(popr, false) + size := p.Size() + data := make([]byte, size) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(data) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Nil{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkNilProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Nil, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNil(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNilProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNil(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &Nil{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNidOptEnumProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidOptEnum(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidOptEnum{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestNidOptEnumMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidOptEnum(popr, false) + size := p.Size() + data := make([]byte, size) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(data) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidOptEnum{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkNidOptEnumProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NidOptEnum, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNidOptEnum(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNidOptEnumProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNidOptEnum(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &NidOptEnum{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinOptEnumProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptEnum(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinOptEnum{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestNinOptEnumMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptEnum(popr, false) + size := p.Size() + data := make([]byte, size) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(data) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinOptEnum{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkNinOptEnumProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinOptEnum, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNinOptEnum(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNinOptEnumProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinOptEnum(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &NinOptEnum{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNidRepEnumProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepEnum(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidRepEnum{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestNidRepEnumMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepEnum(popr, false) + size := p.Size() + data := make([]byte, size) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(data) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidRepEnum{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkNidRepEnumProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NidRepEnum, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNidRepEnum(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNidRepEnumProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNidRepEnum(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &NidRepEnum{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinRepEnumProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepEnum(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinRepEnum{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestNinRepEnumMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepEnum(popr, false) + size := p.Size() + data := make([]byte, size) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(data) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinRepEnum{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkNinRepEnumProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinRepEnum, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNinRepEnum(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNinRepEnumProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinRepEnum(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &NinRepEnum{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinOptEnumDefaultProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptEnumDefault(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinOptEnumDefault{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestNinOptEnumDefaultMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptEnumDefault(popr, false) + size := p.Size() + data := make([]byte, size) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(data) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinOptEnumDefault{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkNinOptEnumDefaultProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinOptEnumDefault, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNinOptEnumDefault(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNinOptEnumDefaultProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinOptEnumDefault(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &NinOptEnumDefault{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestAnotherNinOptEnumProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAnotherNinOptEnum(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &AnotherNinOptEnum{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestAnotherNinOptEnumMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAnotherNinOptEnum(popr, false) + size := p.Size() + data := make([]byte, size) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(data) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &AnotherNinOptEnum{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkAnotherNinOptEnumProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*AnotherNinOptEnum, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedAnotherNinOptEnum(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkAnotherNinOptEnumProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedAnotherNinOptEnum(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &AnotherNinOptEnum{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestAnotherNinOptEnumDefaultProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAnotherNinOptEnumDefault(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &AnotherNinOptEnumDefault{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestAnotherNinOptEnumDefaultMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAnotherNinOptEnumDefault(popr, false) + size := p.Size() + data := make([]byte, size) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(data) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &AnotherNinOptEnumDefault{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkAnotherNinOptEnumDefaultProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*AnotherNinOptEnumDefault, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedAnotherNinOptEnumDefault(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkAnotherNinOptEnumDefaultProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedAnotherNinOptEnumDefault(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &AnotherNinOptEnumDefault{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestTimerProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedTimer(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Timer{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestTimerMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedTimer(popr, false) + size := p.Size() + data := make([]byte, size) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(data) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Timer{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkTimerProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Timer, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedTimer(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkTimerProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedTimer(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &Timer{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestMyExtendableProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMyExtendable(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &MyExtendable{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestMyExtendableMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMyExtendable(popr, false) + size := p.Size() + data := make([]byte, size) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(data) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &MyExtendable{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkMyExtendableProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*MyExtendable, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedMyExtendable(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkMyExtendableProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedMyExtendable(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &MyExtendable{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestOtherExtenableProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedOtherExtenable(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &OtherExtenable{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestOtherExtenableMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedOtherExtenable(popr, false) + size := p.Size() + data := make([]byte, size) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(data) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &OtherExtenable{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkOtherExtenableProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*OtherExtenable, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedOtherExtenable(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkOtherExtenableProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedOtherExtenable(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &OtherExtenable{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNestedDefinitionProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNestedDefinition(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NestedDefinition{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestNestedDefinitionMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNestedDefinition(popr, false) + size := p.Size() + data := make([]byte, size) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(data) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NestedDefinition{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkNestedDefinitionProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NestedDefinition, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNestedDefinition(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNestedDefinitionProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNestedDefinition(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &NestedDefinition{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNestedDefinition_NestedMessageProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNestedDefinition_NestedMessage(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NestedDefinition_NestedMessage{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestNestedDefinition_NestedMessageMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNestedDefinition_NestedMessage(popr, false) + size := p.Size() + data := make([]byte, size) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(data) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NestedDefinition_NestedMessage{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkNestedDefinition_NestedMessageProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NestedDefinition_NestedMessage, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNestedDefinition_NestedMessage(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNestedDefinition_NestedMessageProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNestedDefinition_NestedMessage(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &NestedDefinition_NestedMessage{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNestedDefinition_NestedMessage_NestedNestedMsgProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NestedDefinition_NestedMessage_NestedNestedMsg{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestNestedDefinition_NestedMessage_NestedNestedMsgMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(popr, false) + size := p.Size() + data := make([]byte, size) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(data) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NestedDefinition_NestedMessage_NestedNestedMsg{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkNestedDefinition_NestedMessage_NestedNestedMsgProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NestedDefinition_NestedMessage_NestedNestedMsg, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNestedDefinition_NestedMessage_NestedNestedMsgProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &NestedDefinition_NestedMessage_NestedNestedMsg{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNestedScopeProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNestedScope(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NestedScope{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestNestedScopeMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNestedScope(popr, false) + size := p.Size() + data := make([]byte, size) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(data) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NestedScope{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkNestedScopeProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NestedScope, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNestedScope(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNestedScopeProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNestedScope(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &NestedScope{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinOptNativeDefaultProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptNativeDefault(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinOptNativeDefault{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestNinOptNativeDefaultMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptNativeDefault(popr, false) + size := p.Size() + data := make([]byte, size) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(data) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinOptNativeDefault{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkNinOptNativeDefaultProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinOptNativeDefault, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNinOptNativeDefault(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNinOptNativeDefaultProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinOptNativeDefault(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &NinOptNativeDefault{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestCustomContainerProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomContainer(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &CustomContainer{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestCustomContainerMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomContainer(popr, false) + size := p.Size() + data := make([]byte, size) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(data) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &CustomContainer{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkCustomContainerProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*CustomContainer, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedCustomContainer(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkCustomContainerProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedCustomContainer(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &CustomContainer{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestCustomNameNidOptNativeProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameNidOptNative(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &CustomNameNidOptNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestCustomNameNidOptNativeMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameNidOptNative(popr, false) + size := p.Size() + data := make([]byte, size) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(data) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &CustomNameNidOptNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkCustomNameNidOptNativeProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*CustomNameNidOptNative, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedCustomNameNidOptNative(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkCustomNameNidOptNativeProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedCustomNameNidOptNative(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &CustomNameNidOptNative{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestCustomNameNinOptNativeProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameNinOptNative(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &CustomNameNinOptNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestCustomNameNinOptNativeMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameNinOptNative(popr, false) + size := p.Size() + data := make([]byte, size) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(data) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &CustomNameNinOptNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkCustomNameNinOptNativeProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*CustomNameNinOptNative, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedCustomNameNinOptNative(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkCustomNameNinOptNativeProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedCustomNameNinOptNative(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &CustomNameNinOptNative{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestCustomNameNinRepNativeProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameNinRepNative(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &CustomNameNinRepNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestCustomNameNinRepNativeMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameNinRepNative(popr, false) + size := p.Size() + data := make([]byte, size) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(data) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &CustomNameNinRepNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkCustomNameNinRepNativeProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*CustomNameNinRepNative, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedCustomNameNinRepNative(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkCustomNameNinRepNativeProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedCustomNameNinRepNative(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &CustomNameNinRepNative{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestCustomNameNinStructProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameNinStruct(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &CustomNameNinStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestCustomNameNinStructMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameNinStruct(popr, false) + size := p.Size() + data := make([]byte, size) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(data) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &CustomNameNinStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkCustomNameNinStructProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*CustomNameNinStruct, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedCustomNameNinStruct(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkCustomNameNinStructProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedCustomNameNinStruct(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &CustomNameNinStruct{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestCustomNameCustomTypeProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameCustomType(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &CustomNameCustomType{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestCustomNameCustomTypeMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameCustomType(popr, false) + size := p.Size() + data := make([]byte, size) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(data) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &CustomNameCustomType{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkCustomNameCustomTypeProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*CustomNameCustomType, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedCustomNameCustomType(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkCustomNameCustomTypeProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedCustomNameCustomType(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &CustomNameCustomType{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestCustomNameNinEmbeddedStructUnionProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameNinEmbeddedStructUnion(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &CustomNameNinEmbeddedStructUnion{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestCustomNameNinEmbeddedStructUnionMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameNinEmbeddedStructUnion(popr, false) + size := p.Size() + data := make([]byte, size) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(data) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &CustomNameNinEmbeddedStructUnion{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkCustomNameNinEmbeddedStructUnionProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*CustomNameNinEmbeddedStructUnion, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedCustomNameNinEmbeddedStructUnion(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkCustomNameNinEmbeddedStructUnionProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedCustomNameNinEmbeddedStructUnion(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &CustomNameNinEmbeddedStructUnion{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestCustomNameEnumProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameEnum(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &CustomNameEnum{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestCustomNameEnumMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameEnum(popr, false) + size := p.Size() + data := make([]byte, size) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(data) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &CustomNameEnum{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkCustomNameEnumProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*CustomNameEnum, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedCustomNameEnum(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkCustomNameEnumProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedCustomNameEnum(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &CustomNameEnum{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNoExtensionsMapProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNoExtensionsMap(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NoExtensionsMap{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestNoExtensionsMapMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNoExtensionsMap(popr, false) + size := p.Size() + data := make([]byte, size) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(data) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NoExtensionsMap{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkNoExtensionsMapProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NoExtensionsMap, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNoExtensionsMap(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNoExtensionsMapProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNoExtensionsMap(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &NoExtensionsMap{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestUnrecognizedProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUnrecognized(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Unrecognized{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestUnrecognizedMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUnrecognized(popr, false) + size := p.Size() + data := make([]byte, size) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(data) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Unrecognized{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkUnrecognizedProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Unrecognized, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedUnrecognized(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkUnrecognizedProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedUnrecognized(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &Unrecognized{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestUnrecognizedWithInnerProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUnrecognizedWithInner(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &UnrecognizedWithInner{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestUnrecognizedWithInnerMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUnrecognizedWithInner(popr, false) + size := p.Size() + data := make([]byte, size) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(data) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &UnrecognizedWithInner{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkUnrecognizedWithInnerProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*UnrecognizedWithInner, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedUnrecognizedWithInner(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkUnrecognizedWithInnerProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedUnrecognizedWithInner(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &UnrecognizedWithInner{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestUnrecognizedWithInner_InnerProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUnrecognizedWithInner_Inner(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &UnrecognizedWithInner_Inner{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestUnrecognizedWithInner_InnerMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUnrecognizedWithInner_Inner(popr, false) + size := p.Size() + data := make([]byte, size) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(data) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &UnrecognizedWithInner_Inner{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkUnrecognizedWithInner_InnerProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*UnrecognizedWithInner_Inner, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedUnrecognizedWithInner_Inner(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkUnrecognizedWithInner_InnerProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedUnrecognizedWithInner_Inner(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &UnrecognizedWithInner_Inner{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestUnrecognizedWithEmbedProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUnrecognizedWithEmbed(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &UnrecognizedWithEmbed{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestUnrecognizedWithEmbedMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUnrecognizedWithEmbed(popr, false) + size := p.Size() + data := make([]byte, size) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(data) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &UnrecognizedWithEmbed{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkUnrecognizedWithEmbedProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*UnrecognizedWithEmbed, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedUnrecognizedWithEmbed(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkUnrecognizedWithEmbedProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedUnrecognizedWithEmbed(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &UnrecognizedWithEmbed{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestUnrecognizedWithEmbed_EmbeddedProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUnrecognizedWithEmbed_Embedded(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &UnrecognizedWithEmbed_Embedded{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestUnrecognizedWithEmbed_EmbeddedMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUnrecognizedWithEmbed_Embedded(popr, false) + size := p.Size() + data := make([]byte, size) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(data) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &UnrecognizedWithEmbed_Embedded{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkUnrecognizedWithEmbed_EmbeddedProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*UnrecognizedWithEmbed_Embedded, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedUnrecognizedWithEmbed_Embedded(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkUnrecognizedWithEmbed_EmbeddedProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedUnrecognizedWithEmbed_Embedded(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &UnrecognizedWithEmbed_Embedded{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNodeProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNode(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Node{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestNodeMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNode(popr, false) + size := p.Size() + data := make([]byte, size) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(data) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Node{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkNodeProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Node, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNode(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNodeProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNode(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &Node{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNidOptNativeJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidOptNative(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidOptNative{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNinOptNativeJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptNative(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinOptNative{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNidRepNativeJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepNative(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidRepNative{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNinRepNativeJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepNative(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinRepNative{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNidRepPackedNativeJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepPackedNative(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidRepPackedNative{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNinRepPackedNativeJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepPackedNative(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinRepPackedNative{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNidOptStructJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidOptStruct(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidOptStruct{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNinOptStructJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptStruct(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinOptStruct{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNidRepStructJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepStruct(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidRepStruct{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNinRepStructJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepStruct(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinRepStruct{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNidEmbeddedStructJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidEmbeddedStruct(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidEmbeddedStruct{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNinEmbeddedStructJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinEmbeddedStruct(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinEmbeddedStruct{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNidNestedStructJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidNestedStruct(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidNestedStruct{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNinNestedStructJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinNestedStruct(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinNestedStruct{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNidOptCustomJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidOptCustom(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidOptCustom{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestCustomDashJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomDash(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &CustomDash{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNinOptCustomJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptCustom(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinOptCustom{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNidRepCustomJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepCustom(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidRepCustom{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNinRepCustomJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepCustom(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinRepCustom{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNinOptNativeUnionJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptNativeUnion(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinOptNativeUnion{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNinOptStructUnionJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptStructUnion(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinOptStructUnion{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNinEmbeddedStructUnionJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinEmbeddedStructUnion(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinEmbeddedStructUnion{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNinNestedStructUnionJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinNestedStructUnion(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinNestedStructUnion{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestTreeJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedTree(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Tree{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestOrBranchJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedOrBranch(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &OrBranch{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestAndBranchJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAndBranch(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &AndBranch{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestLeafJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedLeaf(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Leaf{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestDeepTreeJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedDeepTree(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &DeepTree{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestADeepBranchJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedADeepBranch(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &ADeepBranch{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestAndDeepBranchJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAndDeepBranch(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &AndDeepBranch{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestDeepLeafJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedDeepLeaf(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &DeepLeaf{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNilJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNil(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Nil{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNidOptEnumJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidOptEnum(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidOptEnum{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNinOptEnumJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptEnum(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinOptEnum{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNidRepEnumJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepEnum(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidRepEnum{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNinRepEnumJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepEnum(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinRepEnum{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNinOptEnumDefaultJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptEnumDefault(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinOptEnumDefault{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestAnotherNinOptEnumJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAnotherNinOptEnum(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &AnotherNinOptEnum{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestAnotherNinOptEnumDefaultJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAnotherNinOptEnumDefault(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &AnotherNinOptEnumDefault{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestTimerJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedTimer(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Timer{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestMyExtendableJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMyExtendable(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &MyExtendable{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestOtherExtenableJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedOtherExtenable(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &OtherExtenable{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNestedDefinitionJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNestedDefinition(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NestedDefinition{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNestedDefinition_NestedMessageJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNestedDefinition_NestedMessage(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NestedDefinition_NestedMessage{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNestedDefinition_NestedMessage_NestedNestedMsgJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NestedDefinition_NestedMessage_NestedNestedMsg{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNestedScopeJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNestedScope(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NestedScope{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNinOptNativeDefaultJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptNativeDefault(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinOptNativeDefault{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestCustomContainerJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomContainer(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &CustomContainer{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestCustomNameNidOptNativeJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameNidOptNative(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &CustomNameNidOptNative{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestCustomNameNinOptNativeJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameNinOptNative(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &CustomNameNinOptNative{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestCustomNameNinRepNativeJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameNinRepNative(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &CustomNameNinRepNative{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestCustomNameNinStructJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameNinStruct(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &CustomNameNinStruct{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestCustomNameCustomTypeJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameCustomType(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &CustomNameCustomType{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestCustomNameNinEmbeddedStructUnionJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameNinEmbeddedStructUnion(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &CustomNameNinEmbeddedStructUnion{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestCustomNameEnumJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameEnum(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &CustomNameEnum{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNoExtensionsMapJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNoExtensionsMap(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NoExtensionsMap{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestUnrecognizedJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUnrecognized(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Unrecognized{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestUnrecognizedWithInnerJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUnrecognizedWithInner(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &UnrecognizedWithInner{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestUnrecognizedWithInner_InnerJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUnrecognizedWithInner_Inner(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &UnrecognizedWithInner_Inner{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestUnrecognizedWithEmbedJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUnrecognizedWithEmbed(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &UnrecognizedWithEmbed{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestUnrecognizedWithEmbed_EmbeddedJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUnrecognizedWithEmbed_Embedded(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &UnrecognizedWithEmbed_Embedded{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNodeJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNode(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Node{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNidOptNativeProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidOptNative(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NidOptNative{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNidOptNativeProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidOptNative(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NidOptNative{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinOptNativeProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptNative(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NinOptNative{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinOptNativeProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptNative(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NinOptNative{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNidRepNativeProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepNative(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NidRepNative{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNidRepNativeProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepNative(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NidRepNative{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinRepNativeProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepNative(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NinRepNative{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinRepNativeProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepNative(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NinRepNative{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNidRepPackedNativeProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepPackedNative(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NidRepPackedNative{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNidRepPackedNativeProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepPackedNative(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NidRepPackedNative{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinRepPackedNativeProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepPackedNative(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NinRepPackedNative{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinRepPackedNativeProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepPackedNative(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NinRepPackedNative{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNidOptStructProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidOptStruct(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NidOptStruct{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNidOptStructProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidOptStruct(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NidOptStruct{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinOptStructProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptStruct(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NinOptStruct{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinOptStructProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptStruct(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NinOptStruct{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNidRepStructProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepStruct(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NidRepStruct{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNidRepStructProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepStruct(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NidRepStruct{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinRepStructProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepStruct(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NinRepStruct{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinRepStructProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepStruct(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NinRepStruct{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNidEmbeddedStructProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidEmbeddedStruct(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NidEmbeddedStruct{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNidEmbeddedStructProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidEmbeddedStruct(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NidEmbeddedStruct{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinEmbeddedStructProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinEmbeddedStruct(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NinEmbeddedStruct{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinEmbeddedStructProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinEmbeddedStruct(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NinEmbeddedStruct{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNidNestedStructProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidNestedStruct(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NidNestedStruct{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNidNestedStructProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidNestedStruct(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NidNestedStruct{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinNestedStructProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinNestedStruct(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NinNestedStruct{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinNestedStructProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinNestedStruct(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NinNestedStruct{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNidOptCustomProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidOptCustom(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NidOptCustom{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNidOptCustomProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidOptCustom(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NidOptCustom{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestCustomDashProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomDash(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &CustomDash{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestCustomDashProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomDash(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &CustomDash{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinOptCustomProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptCustom(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NinOptCustom{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinOptCustomProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptCustom(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NinOptCustom{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNidRepCustomProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepCustom(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NidRepCustom{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNidRepCustomProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepCustom(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NidRepCustom{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinRepCustomProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepCustom(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NinRepCustom{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinRepCustomProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepCustom(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NinRepCustom{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinOptNativeUnionProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptNativeUnion(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NinOptNativeUnion{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinOptNativeUnionProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptNativeUnion(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NinOptNativeUnion{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinOptStructUnionProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptStructUnion(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NinOptStructUnion{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinOptStructUnionProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptStructUnion(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NinOptStructUnion{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinEmbeddedStructUnionProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinEmbeddedStructUnion(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NinEmbeddedStructUnion{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinEmbeddedStructUnionProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinEmbeddedStructUnion(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NinEmbeddedStructUnion{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinNestedStructUnionProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinNestedStructUnion(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NinNestedStructUnion{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinNestedStructUnionProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinNestedStructUnion(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NinNestedStructUnion{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestTreeProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedTree(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &Tree{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestTreeProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedTree(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &Tree{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestOrBranchProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedOrBranch(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &OrBranch{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestOrBranchProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedOrBranch(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &OrBranch{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestAndBranchProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAndBranch(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &AndBranch{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestAndBranchProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAndBranch(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &AndBranch{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestLeafProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedLeaf(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &Leaf{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestLeafProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedLeaf(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &Leaf{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestDeepTreeProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedDeepTree(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &DeepTree{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestDeepTreeProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedDeepTree(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &DeepTree{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestADeepBranchProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedADeepBranch(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &ADeepBranch{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestADeepBranchProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedADeepBranch(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &ADeepBranch{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestAndDeepBranchProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAndDeepBranch(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &AndDeepBranch{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestAndDeepBranchProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAndDeepBranch(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &AndDeepBranch{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestDeepLeafProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedDeepLeaf(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &DeepLeaf{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestDeepLeafProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedDeepLeaf(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &DeepLeaf{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNilProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNil(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &Nil{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNilProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNil(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &Nil{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNidOptEnumProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidOptEnum(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NidOptEnum{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNidOptEnumProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidOptEnum(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NidOptEnum{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinOptEnumProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptEnum(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NinOptEnum{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinOptEnumProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptEnum(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NinOptEnum{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNidRepEnumProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepEnum(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NidRepEnum{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNidRepEnumProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepEnum(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NidRepEnum{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinRepEnumProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepEnum(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NinRepEnum{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinRepEnumProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepEnum(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NinRepEnum{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinOptEnumDefaultProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptEnumDefault(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NinOptEnumDefault{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinOptEnumDefaultProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptEnumDefault(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NinOptEnumDefault{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestAnotherNinOptEnumProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAnotherNinOptEnum(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &AnotherNinOptEnum{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestAnotherNinOptEnumProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAnotherNinOptEnum(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &AnotherNinOptEnum{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestAnotherNinOptEnumDefaultProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAnotherNinOptEnumDefault(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &AnotherNinOptEnumDefault{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestAnotherNinOptEnumDefaultProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAnotherNinOptEnumDefault(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &AnotherNinOptEnumDefault{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestTimerProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedTimer(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &Timer{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestTimerProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedTimer(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &Timer{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestMyExtendableProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMyExtendable(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &MyExtendable{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestMyExtendableProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMyExtendable(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &MyExtendable{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestOtherExtenableProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedOtherExtenable(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &OtherExtenable{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestOtherExtenableProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedOtherExtenable(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &OtherExtenable{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNestedDefinitionProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNestedDefinition(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NestedDefinition{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNestedDefinitionProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNestedDefinition(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NestedDefinition{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNestedDefinition_NestedMessageProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNestedDefinition_NestedMessage(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NestedDefinition_NestedMessage{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNestedDefinition_NestedMessageProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNestedDefinition_NestedMessage(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NestedDefinition_NestedMessage{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNestedDefinition_NestedMessage_NestedNestedMsgProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NestedDefinition_NestedMessage_NestedNestedMsg{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNestedDefinition_NestedMessage_NestedNestedMsgProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NestedDefinition_NestedMessage_NestedNestedMsg{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNestedScopeProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNestedScope(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NestedScope{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNestedScopeProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNestedScope(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NestedScope{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinOptNativeDefaultProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptNativeDefault(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NinOptNativeDefault{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinOptNativeDefaultProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptNativeDefault(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NinOptNativeDefault{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestCustomContainerProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomContainer(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &CustomContainer{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestCustomContainerProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomContainer(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &CustomContainer{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestCustomNameNidOptNativeProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameNidOptNative(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &CustomNameNidOptNative{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestCustomNameNidOptNativeProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameNidOptNative(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &CustomNameNidOptNative{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestCustomNameNinOptNativeProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameNinOptNative(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &CustomNameNinOptNative{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestCustomNameNinOptNativeProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameNinOptNative(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &CustomNameNinOptNative{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestCustomNameNinRepNativeProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameNinRepNative(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &CustomNameNinRepNative{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestCustomNameNinRepNativeProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameNinRepNative(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &CustomNameNinRepNative{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestCustomNameNinStructProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameNinStruct(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &CustomNameNinStruct{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestCustomNameNinStructProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameNinStruct(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &CustomNameNinStruct{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestCustomNameCustomTypeProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameCustomType(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &CustomNameCustomType{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestCustomNameCustomTypeProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameCustomType(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &CustomNameCustomType{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestCustomNameNinEmbeddedStructUnionProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameNinEmbeddedStructUnion(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &CustomNameNinEmbeddedStructUnion{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestCustomNameNinEmbeddedStructUnionProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameNinEmbeddedStructUnion(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &CustomNameNinEmbeddedStructUnion{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestCustomNameEnumProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameEnum(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &CustomNameEnum{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestCustomNameEnumProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameEnum(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &CustomNameEnum{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNoExtensionsMapProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNoExtensionsMap(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NoExtensionsMap{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNoExtensionsMapProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNoExtensionsMap(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NoExtensionsMap{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestUnrecognizedProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUnrecognized(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &Unrecognized{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestUnrecognizedProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUnrecognized(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &Unrecognized{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestUnrecognizedWithInnerProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUnrecognizedWithInner(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &UnrecognizedWithInner{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestUnrecognizedWithInnerProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUnrecognizedWithInner(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &UnrecognizedWithInner{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestUnrecognizedWithInner_InnerProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUnrecognizedWithInner_Inner(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &UnrecognizedWithInner_Inner{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestUnrecognizedWithInner_InnerProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUnrecognizedWithInner_Inner(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &UnrecognizedWithInner_Inner{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestUnrecognizedWithEmbedProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUnrecognizedWithEmbed(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &UnrecognizedWithEmbed{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestUnrecognizedWithEmbedProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUnrecognizedWithEmbed(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &UnrecognizedWithEmbed{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestUnrecognizedWithEmbed_EmbeddedProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUnrecognizedWithEmbed_Embedded(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &UnrecognizedWithEmbed_Embedded{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestUnrecognizedWithEmbed_EmbeddedProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUnrecognizedWithEmbed_Embedded(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &UnrecognizedWithEmbed_Embedded{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNodeProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNode(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &Node{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNodeProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNode(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &Node{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNidOptNativeCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidOptNative(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NidOptNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNidOptNative(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNinOptNativeCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptNative(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinOptNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNinOptNative(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNidRepNativeCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidRepNative(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NidRepNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNidRepNative(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNinRepNativeCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinRepNative(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinRepNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNinRepNative(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNidRepPackedNativeCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidRepPackedNative(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NidRepPackedNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNidRepPackedNative(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNinRepPackedNativeCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinRepPackedNative(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinRepPackedNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNinRepPackedNative(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNidOptStructCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidOptStruct(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NidOptStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNidOptStruct(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNinOptStructCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptStruct(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinOptStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNinOptStruct(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNidRepStructCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidRepStruct(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NidRepStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNidRepStruct(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNinRepStructCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinRepStruct(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinRepStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNinRepStruct(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNidEmbeddedStructCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidEmbeddedStruct(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NidEmbeddedStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNidEmbeddedStruct(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNinEmbeddedStructCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinEmbeddedStruct(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinEmbeddedStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNinEmbeddedStruct(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNidNestedStructCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidNestedStruct(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NidNestedStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNidNestedStruct(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNinNestedStructCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinNestedStruct(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinNestedStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNinNestedStruct(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNidOptCustomCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidOptCustom(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NidOptCustom{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNidOptCustom(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestCustomDashCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomDash(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &CustomDash{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedCustomDash(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNinOptCustomCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptCustom(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinOptCustom{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNinOptCustom(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNidRepCustomCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidRepCustom(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NidRepCustom{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNidRepCustom(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNinRepCustomCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinRepCustom(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinRepCustom{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNinRepCustom(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNinOptNativeUnionCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptNativeUnion(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinOptNativeUnion{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNinOptNativeUnion(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNinOptStructUnionCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptStructUnion(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinOptStructUnion{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNinOptStructUnion(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNinEmbeddedStructUnionCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinEmbeddedStructUnion(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinEmbeddedStructUnion{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNinEmbeddedStructUnion(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNinNestedStructUnionCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinNestedStructUnion(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinNestedStructUnion{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNinNestedStructUnion(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestTreeCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedTree(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &Tree{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedTree(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestOrBranchCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedOrBranch(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &OrBranch{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedOrBranch(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestAndBranchCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAndBranch(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &AndBranch{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedAndBranch(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestLeafCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedLeaf(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &Leaf{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedLeaf(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestDeepTreeCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedDeepTree(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &DeepTree{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedDeepTree(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestADeepBranchCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedADeepBranch(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &ADeepBranch{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedADeepBranch(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestAndDeepBranchCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAndDeepBranch(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &AndDeepBranch{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedAndDeepBranch(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestDeepLeafCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedDeepLeaf(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &DeepLeaf{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedDeepLeaf(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNilCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNil(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &Nil{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNil(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNidOptEnumCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidOptEnum(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NidOptEnum{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNidOptEnum(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNinOptEnumCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptEnum(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinOptEnum{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNinOptEnum(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNidRepEnumCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidRepEnum(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NidRepEnum{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNidRepEnum(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNinRepEnumCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinRepEnum(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinRepEnum{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNinRepEnum(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNinOptEnumDefaultCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptEnumDefault(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinOptEnumDefault{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNinOptEnumDefault(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestAnotherNinOptEnumCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAnotherNinOptEnum(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &AnotherNinOptEnum{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedAnotherNinOptEnum(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestAnotherNinOptEnumDefaultCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAnotherNinOptEnumDefault(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &AnotherNinOptEnumDefault{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedAnotherNinOptEnumDefault(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestTimerCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedTimer(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &Timer{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedTimer(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestMyExtendableCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedMyExtendable(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &MyExtendable{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedMyExtendable(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestOtherExtenableCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedOtherExtenable(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &OtherExtenable{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedOtherExtenable(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNestedDefinitionCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNestedDefinition(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NestedDefinition{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNestedDefinition(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNestedDefinition_NestedMessageCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNestedDefinition_NestedMessage(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NestedDefinition_NestedMessage{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNestedDefinition_NestedMessage(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNestedDefinition_NestedMessage_NestedNestedMsgCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NestedDefinition_NestedMessage_NestedNestedMsg{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNestedScopeCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNestedScope(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NestedScope{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNestedScope(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNinOptNativeDefaultCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptNativeDefault(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinOptNativeDefault{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNinOptNativeDefault(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestCustomContainerCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomContainer(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &CustomContainer{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedCustomContainer(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestCustomNameNidOptNativeCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameNidOptNative(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &CustomNameNidOptNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedCustomNameNidOptNative(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestCustomNameNinOptNativeCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameNinOptNative(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &CustomNameNinOptNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedCustomNameNinOptNative(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestCustomNameNinRepNativeCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameNinRepNative(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &CustomNameNinRepNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedCustomNameNinRepNative(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestCustomNameNinStructCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameNinStruct(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &CustomNameNinStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedCustomNameNinStruct(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestCustomNameCustomTypeCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameCustomType(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &CustomNameCustomType{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedCustomNameCustomType(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestCustomNameNinEmbeddedStructUnionCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameNinEmbeddedStructUnion(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &CustomNameNinEmbeddedStructUnion{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedCustomNameNinEmbeddedStructUnion(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestCustomNameEnumCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameEnum(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &CustomNameEnum{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedCustomNameEnum(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNoExtensionsMapCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNoExtensionsMap(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NoExtensionsMap{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNoExtensionsMap(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestUnrecognizedCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedUnrecognized(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &Unrecognized{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedUnrecognized(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestUnrecognizedWithInnerCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedUnrecognizedWithInner(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &UnrecognizedWithInner{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedUnrecognizedWithInner(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestUnrecognizedWithInner_InnerCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedUnrecognizedWithInner_Inner(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &UnrecognizedWithInner_Inner{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedUnrecognizedWithInner_Inner(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestUnrecognizedWithEmbedCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedUnrecognizedWithEmbed(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &UnrecognizedWithEmbed{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedUnrecognizedWithEmbed(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestUnrecognizedWithEmbed_EmbeddedCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedUnrecognizedWithEmbed_Embedded(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &UnrecognizedWithEmbed_Embedded{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedUnrecognizedWithEmbed_Embedded(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNodeCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNode(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &Node{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNode(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestThetestDescription(t *testing.T) { + ThetestDescription() +} +func TestNidOptNativeVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidOptNative(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NidOptNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNinOptNativeVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptNative(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinOptNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNidRepNativeVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidRepNative(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NidRepNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNinRepNativeVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinRepNative(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinRepNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNidRepPackedNativeVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidRepPackedNative(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NidRepPackedNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNinRepPackedNativeVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinRepPackedNative(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinRepPackedNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNidOptStructVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidOptStruct(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NidOptStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNinOptStructVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptStruct(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinOptStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNidRepStructVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidRepStruct(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NidRepStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNinRepStructVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinRepStruct(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinRepStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNidEmbeddedStructVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidEmbeddedStruct(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NidEmbeddedStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNinEmbeddedStructVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinEmbeddedStruct(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinEmbeddedStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNidNestedStructVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidNestedStruct(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NidNestedStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNinNestedStructVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinNestedStruct(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinNestedStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNidOptCustomVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidOptCustom(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NidOptCustom{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestCustomDashVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomDash(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &CustomDash{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNinOptCustomVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptCustom(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinOptCustom{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNidRepCustomVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidRepCustom(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NidRepCustom{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNinRepCustomVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinRepCustom(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinRepCustom{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNinOptNativeUnionVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptNativeUnion(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinOptNativeUnion{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNinOptStructUnionVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptStructUnion(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinOptStructUnion{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNinEmbeddedStructUnionVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinEmbeddedStructUnion(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinEmbeddedStructUnion{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNinNestedStructUnionVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinNestedStructUnion(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinNestedStructUnion{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestTreeVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedTree(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &Tree{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestOrBranchVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedOrBranch(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &OrBranch{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestAndBranchVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAndBranch(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &AndBranch{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestLeafVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedLeaf(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &Leaf{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestDeepTreeVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedDeepTree(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &DeepTree{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestADeepBranchVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedADeepBranch(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &ADeepBranch{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestAndDeepBranchVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAndDeepBranch(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &AndDeepBranch{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestDeepLeafVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedDeepLeaf(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &DeepLeaf{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNilVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNil(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &Nil{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNidOptEnumVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidOptEnum(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NidOptEnum{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNinOptEnumVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptEnum(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinOptEnum{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNidRepEnumVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidRepEnum(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NidRepEnum{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNinRepEnumVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinRepEnum(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinRepEnum{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNinOptEnumDefaultVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptEnumDefault(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinOptEnumDefault{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestAnotherNinOptEnumVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAnotherNinOptEnum(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &AnotherNinOptEnum{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestAnotherNinOptEnumDefaultVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAnotherNinOptEnumDefault(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &AnotherNinOptEnumDefault{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestTimerVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedTimer(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &Timer{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestMyExtendableVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedMyExtendable(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &MyExtendable{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestOtherExtenableVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedOtherExtenable(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &OtherExtenable{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNestedDefinitionVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNestedDefinition(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NestedDefinition{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNestedDefinition_NestedMessageVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNestedDefinition_NestedMessage(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NestedDefinition_NestedMessage{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNestedDefinition_NestedMessage_NestedNestedMsgVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NestedDefinition_NestedMessage_NestedNestedMsg{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNestedScopeVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNestedScope(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NestedScope{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNinOptNativeDefaultVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptNativeDefault(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinOptNativeDefault{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestCustomContainerVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomContainer(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &CustomContainer{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestCustomNameNidOptNativeVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameNidOptNative(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &CustomNameNidOptNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestCustomNameNinOptNativeVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameNinOptNative(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &CustomNameNinOptNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestCustomNameNinRepNativeVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameNinRepNative(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &CustomNameNinRepNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestCustomNameNinStructVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameNinStruct(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &CustomNameNinStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestCustomNameCustomTypeVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameCustomType(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &CustomNameCustomType{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestCustomNameNinEmbeddedStructUnionVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameNinEmbeddedStructUnion(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &CustomNameNinEmbeddedStructUnion{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestCustomNameEnumVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameEnum(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &CustomNameEnum{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNoExtensionsMapVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNoExtensionsMap(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NoExtensionsMap{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestUnrecognizedVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedUnrecognized(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &Unrecognized{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestUnrecognizedWithInnerVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedUnrecognizedWithInner(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &UnrecognizedWithInner{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestUnrecognizedWithInner_InnerVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedUnrecognizedWithInner_Inner(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &UnrecognizedWithInner_Inner{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestUnrecognizedWithEmbedVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedUnrecognizedWithEmbed(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &UnrecognizedWithEmbed{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestUnrecognizedWithEmbed_EmbeddedVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedUnrecognizedWithEmbed_Embedded(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &UnrecognizedWithEmbed_Embedded{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNodeVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNode(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &Node{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNidOptNativeFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidOptNative(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNinOptNativeFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptNative(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNidRepNativeFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidRepNative(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNinRepNativeFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinRepNative(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNidRepPackedNativeFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidRepPackedNative(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNinRepPackedNativeFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinRepPackedNative(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNidOptStructFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidOptStruct(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNinOptStructFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptStruct(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNidRepStructFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidRepStruct(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNinRepStructFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinRepStruct(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNidEmbeddedStructFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidEmbeddedStruct(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNinEmbeddedStructFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinEmbeddedStruct(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNidNestedStructFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidNestedStruct(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNinNestedStructFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinNestedStruct(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNidOptCustomFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidOptCustom(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestCustomDashFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomDash(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNinOptCustomFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptCustom(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNidRepCustomFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidRepCustom(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNinRepCustomFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinRepCustom(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNinOptNativeUnionFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptNativeUnion(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNinOptStructUnionFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptStructUnion(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNinEmbeddedStructUnionFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinEmbeddedStructUnion(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNinNestedStructUnionFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinNestedStructUnion(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestTreeFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedTree(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestOrBranchFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedOrBranch(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestAndBranchFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAndBranch(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestLeafFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedLeaf(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestDeepTreeFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedDeepTree(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestADeepBranchFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedADeepBranch(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestAndDeepBranchFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAndDeepBranch(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestDeepLeafFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedDeepLeaf(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNilFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNil(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNidOptEnumFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidOptEnum(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNinOptEnumFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptEnum(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNidRepEnumFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidRepEnum(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNinRepEnumFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinRepEnum(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestAnotherNinOptEnumFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAnotherNinOptEnum(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestTimerFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedTimer(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNestedDefinitionFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNestedDefinition(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNestedDefinition_NestedMessageFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNestedDefinition_NestedMessage(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNestedDefinition_NestedMessage_NestedNestedMsgFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNestedScopeFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNestedScope(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestCustomContainerFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomContainer(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestCustomNameNidOptNativeFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameNidOptNative(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestCustomNameNinOptNativeFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameNinOptNative(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestCustomNameNinRepNativeFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameNinRepNative(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestCustomNameNinStructFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameNinStruct(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestCustomNameCustomTypeFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameCustomType(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestCustomNameNinEmbeddedStructUnionFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameNinEmbeddedStructUnion(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestCustomNameEnumFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameEnum(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestUnrecognizedFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedUnrecognized(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestUnrecognizedWithInnerFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedUnrecognizedWithInner(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestUnrecognizedWithInner_InnerFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedUnrecognizedWithInner_Inner(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestUnrecognizedWithEmbedFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedUnrecognizedWithEmbed(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestUnrecognizedWithEmbed_EmbeddedFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedUnrecognizedWithEmbed_Embedded(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNodeFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNode(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNidOptNativeGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidOptNative(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestNinOptNativeGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptNative(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestNidRepNativeGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidRepNative(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestNinRepNativeGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinRepNative(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestNidRepPackedNativeGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidRepPackedNative(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestNinRepPackedNativeGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinRepPackedNative(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestNidOptStructGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidOptStruct(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestNinOptStructGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptStruct(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestNidRepStructGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidRepStruct(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestNinRepStructGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinRepStruct(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestNidEmbeddedStructGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidEmbeddedStruct(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestNinEmbeddedStructGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinEmbeddedStruct(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestNidNestedStructGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidNestedStruct(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestNinNestedStructGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinNestedStruct(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestNidOptCustomGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidOptCustom(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestCustomDashGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomDash(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestNinOptCustomGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptCustom(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestNidRepCustomGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidRepCustom(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestNinRepCustomGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinRepCustom(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestNinOptNativeUnionGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptNativeUnion(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestNinOptStructUnionGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptStructUnion(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestNinEmbeddedStructUnionGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinEmbeddedStructUnion(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestNinNestedStructUnionGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinNestedStructUnion(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestTreeGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedTree(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestOrBranchGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedOrBranch(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestAndBranchGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAndBranch(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestLeafGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedLeaf(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestDeepTreeGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedDeepTree(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestADeepBranchGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedADeepBranch(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestAndDeepBranchGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAndDeepBranch(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestDeepLeafGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedDeepLeaf(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestNilGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNil(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestNidOptEnumGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidOptEnum(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestNinOptEnumGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptEnum(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestNidRepEnumGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidRepEnum(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestNinRepEnumGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinRepEnum(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestNinOptEnumDefaultGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptEnumDefault(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestAnotherNinOptEnumGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAnotherNinOptEnum(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestAnotherNinOptEnumDefaultGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAnotherNinOptEnumDefault(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestTimerGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedTimer(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestMyExtendableGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedMyExtendable(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestOtherExtenableGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedOtherExtenable(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestNestedDefinitionGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNestedDefinition(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestNestedDefinition_NestedMessageGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNestedDefinition_NestedMessage(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestNestedDefinition_NestedMessage_NestedNestedMsgGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestNestedScopeGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNestedScope(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestNinOptNativeDefaultGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptNativeDefault(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestCustomContainerGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomContainer(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestCustomNameNidOptNativeGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameNidOptNative(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestCustomNameNinOptNativeGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameNinOptNative(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestCustomNameNinRepNativeGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameNinRepNative(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestCustomNameNinStructGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameNinStruct(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestCustomNameCustomTypeGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameCustomType(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestCustomNameNinEmbeddedStructUnionGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameNinEmbeddedStructUnion(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestCustomNameEnumGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameEnum(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestNoExtensionsMapGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNoExtensionsMap(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestUnrecognizedGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedUnrecognized(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestUnrecognizedWithInnerGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedUnrecognizedWithInner(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestUnrecognizedWithInner_InnerGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedUnrecognizedWithInner_Inner(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestUnrecognizedWithEmbedGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedUnrecognizedWithEmbed(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestUnrecognizedWithEmbed_EmbeddedGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedUnrecognizedWithEmbed_Embedded(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestNodeGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNode(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestNidOptNativeSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidOptNative(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNidOptNativeSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NidOptNative, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNidOptNative(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinOptNativeSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptNative(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNinOptNativeSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinOptNative, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNinOptNative(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNidRepNativeSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepNative(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNidRepNativeSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NidRepNative, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNidRepNative(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinRepNativeSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepNative(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNinRepNativeSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinRepNative, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNinRepNative(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNidRepPackedNativeSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepPackedNative(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNidRepPackedNativeSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NidRepPackedNative, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNidRepPackedNative(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinRepPackedNativeSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepPackedNative(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNinRepPackedNativeSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinRepPackedNative, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNinRepPackedNative(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNidOptStructSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidOptStruct(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNidOptStructSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NidOptStruct, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNidOptStruct(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinOptStructSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptStruct(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNinOptStructSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinOptStruct, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNinOptStruct(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNidRepStructSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepStruct(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNidRepStructSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NidRepStruct, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNidRepStruct(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinRepStructSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepStruct(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNinRepStructSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinRepStruct, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNinRepStruct(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNidEmbeddedStructSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidEmbeddedStruct(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNidEmbeddedStructSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NidEmbeddedStruct, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNidEmbeddedStruct(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinEmbeddedStructSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinEmbeddedStruct(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNinEmbeddedStructSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinEmbeddedStruct, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNinEmbeddedStruct(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNidNestedStructSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidNestedStruct(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNidNestedStructSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NidNestedStruct, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNidNestedStruct(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinNestedStructSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinNestedStruct(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNinNestedStructSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinNestedStruct, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNinNestedStruct(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNidOptCustomSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidOptCustom(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNidOptCustomSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NidOptCustom, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNidOptCustom(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestCustomDashSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomDash(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkCustomDashSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*CustomDash, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedCustomDash(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinOptCustomSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptCustom(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNinOptCustomSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinOptCustom, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNinOptCustom(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNidRepCustomSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepCustom(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNidRepCustomSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NidRepCustom, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNidRepCustom(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinRepCustomSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepCustom(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNinRepCustomSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinRepCustom, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNinRepCustom(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinOptNativeUnionSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptNativeUnion(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNinOptNativeUnionSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinOptNativeUnion, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNinOptNativeUnion(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinOptStructUnionSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptStructUnion(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNinOptStructUnionSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinOptStructUnion, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNinOptStructUnion(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinEmbeddedStructUnionSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinEmbeddedStructUnion(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNinEmbeddedStructUnionSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinEmbeddedStructUnion, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNinEmbeddedStructUnion(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinNestedStructUnionSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinNestedStructUnion(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNinNestedStructUnionSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinNestedStructUnion, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNinNestedStructUnion(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestTreeSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedTree(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkTreeSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Tree, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedTree(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestOrBranchSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedOrBranch(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkOrBranchSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*OrBranch, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedOrBranch(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestAndBranchSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAndBranch(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkAndBranchSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*AndBranch, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedAndBranch(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestLeafSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedLeaf(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkLeafSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Leaf, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedLeaf(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestDeepTreeSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedDeepTree(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkDeepTreeSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*DeepTree, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedDeepTree(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestADeepBranchSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedADeepBranch(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkADeepBranchSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*ADeepBranch, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedADeepBranch(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestAndDeepBranchSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAndDeepBranch(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkAndDeepBranchSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*AndDeepBranch, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedAndDeepBranch(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestDeepLeafSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedDeepLeaf(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkDeepLeafSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*DeepLeaf, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedDeepLeaf(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNilSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNil(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNilSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Nil, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNil(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNidOptEnumSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidOptEnum(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNidOptEnumSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NidOptEnum, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNidOptEnum(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinOptEnumSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptEnum(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNinOptEnumSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinOptEnum, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNinOptEnum(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNidRepEnumSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepEnum(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNidRepEnumSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NidRepEnum, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNidRepEnum(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinRepEnumSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepEnum(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNinRepEnumSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinRepEnum, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNinRepEnum(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinOptEnumDefaultSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptEnumDefault(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNinOptEnumDefaultSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinOptEnumDefault, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNinOptEnumDefault(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestAnotherNinOptEnumSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAnotherNinOptEnum(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkAnotherNinOptEnumSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*AnotherNinOptEnum, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedAnotherNinOptEnum(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestAnotherNinOptEnumDefaultSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAnotherNinOptEnumDefault(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkAnotherNinOptEnumDefaultSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*AnotherNinOptEnumDefault, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedAnotherNinOptEnumDefault(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestTimerSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedTimer(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkTimerSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Timer, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedTimer(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestMyExtendableSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMyExtendable(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkMyExtendableSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*MyExtendable, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedMyExtendable(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestOtherExtenableSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedOtherExtenable(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkOtherExtenableSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*OtherExtenable, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedOtherExtenable(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNestedDefinitionSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNestedDefinition(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNestedDefinitionSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NestedDefinition, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNestedDefinition(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNestedDefinition_NestedMessageSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNestedDefinition_NestedMessage(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNestedDefinition_NestedMessageSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NestedDefinition_NestedMessage, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNestedDefinition_NestedMessage(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNestedDefinition_NestedMessage_NestedNestedMsgSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNestedDefinition_NestedMessage_NestedNestedMsgSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NestedDefinition_NestedMessage_NestedNestedMsg, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNestedScopeSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNestedScope(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNestedScopeSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NestedScope, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNestedScope(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinOptNativeDefaultSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptNativeDefault(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNinOptNativeDefaultSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinOptNativeDefault, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNinOptNativeDefault(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestCustomContainerSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomContainer(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkCustomContainerSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*CustomContainer, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedCustomContainer(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestCustomNameNidOptNativeSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameNidOptNative(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkCustomNameNidOptNativeSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*CustomNameNidOptNative, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedCustomNameNidOptNative(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestCustomNameNinOptNativeSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameNinOptNative(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkCustomNameNinOptNativeSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*CustomNameNinOptNative, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedCustomNameNinOptNative(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestCustomNameNinRepNativeSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameNinRepNative(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkCustomNameNinRepNativeSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*CustomNameNinRepNative, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedCustomNameNinRepNative(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestCustomNameNinStructSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameNinStruct(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkCustomNameNinStructSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*CustomNameNinStruct, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedCustomNameNinStruct(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestCustomNameCustomTypeSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameCustomType(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkCustomNameCustomTypeSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*CustomNameCustomType, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedCustomNameCustomType(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestCustomNameNinEmbeddedStructUnionSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameNinEmbeddedStructUnion(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkCustomNameNinEmbeddedStructUnionSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*CustomNameNinEmbeddedStructUnion, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedCustomNameNinEmbeddedStructUnion(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestCustomNameEnumSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameEnum(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkCustomNameEnumSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*CustomNameEnum, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedCustomNameEnum(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNoExtensionsMapSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNoExtensionsMap(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNoExtensionsMapSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NoExtensionsMap, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNoExtensionsMap(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestUnrecognizedSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUnrecognized(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkUnrecognizedSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Unrecognized, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedUnrecognized(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestUnrecognizedWithInnerSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUnrecognizedWithInner(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkUnrecognizedWithInnerSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*UnrecognizedWithInner, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedUnrecognizedWithInner(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestUnrecognizedWithInner_InnerSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUnrecognizedWithInner_Inner(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkUnrecognizedWithInner_InnerSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*UnrecognizedWithInner_Inner, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedUnrecognizedWithInner_Inner(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestUnrecognizedWithEmbedSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUnrecognizedWithEmbed(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkUnrecognizedWithEmbedSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*UnrecognizedWithEmbed, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedUnrecognizedWithEmbed(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestUnrecognizedWithEmbed_EmbeddedSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUnrecognizedWithEmbed_Embedded(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkUnrecognizedWithEmbed_EmbeddedSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*UnrecognizedWithEmbed_Embedded, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedUnrecognizedWithEmbed_Embedded(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNodeSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNode(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNodeSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Node, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNode(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNidOptNativeStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidOptNative(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNinOptNativeStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptNative(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNidRepNativeStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidRepNative(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNinRepNativeStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinRepNative(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNidRepPackedNativeStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidRepPackedNative(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNinRepPackedNativeStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinRepPackedNative(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNidOptStructStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidOptStruct(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNinOptStructStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptStruct(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNidRepStructStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidRepStruct(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNinRepStructStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinRepStruct(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNidEmbeddedStructStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidEmbeddedStruct(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNinEmbeddedStructStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinEmbeddedStruct(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNidNestedStructStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidNestedStruct(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNinNestedStructStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinNestedStruct(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNidOptCustomStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidOptCustom(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestCustomDashStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomDash(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNinOptCustomStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptCustom(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNidRepCustomStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidRepCustom(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNinRepCustomStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinRepCustom(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNinOptNativeUnionStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptNativeUnion(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNinOptStructUnionStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptStructUnion(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNinEmbeddedStructUnionStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinEmbeddedStructUnion(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNinNestedStructUnionStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinNestedStructUnion(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestTreeStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedTree(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestOrBranchStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedOrBranch(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestAndBranchStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAndBranch(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestLeafStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedLeaf(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestDeepTreeStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedDeepTree(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestADeepBranchStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedADeepBranch(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestAndDeepBranchStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAndDeepBranch(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestDeepLeafStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedDeepLeaf(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNilStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNil(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNidOptEnumStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidOptEnum(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNinOptEnumStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptEnum(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNidRepEnumStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidRepEnum(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNinRepEnumStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinRepEnum(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNinOptEnumDefaultStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptEnumDefault(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestAnotherNinOptEnumStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAnotherNinOptEnum(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestAnotherNinOptEnumDefaultStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAnotherNinOptEnumDefault(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestTimerStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedTimer(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestMyExtendableStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedMyExtendable(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestOtherExtenableStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedOtherExtenable(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNestedDefinitionStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNestedDefinition(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNestedDefinition_NestedMessageStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNestedDefinition_NestedMessage(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNestedDefinition_NestedMessage_NestedNestedMsgStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNestedScopeStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNestedScope(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNinOptNativeDefaultStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptNativeDefault(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestCustomContainerStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomContainer(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestCustomNameNidOptNativeStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameNidOptNative(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestCustomNameNinOptNativeStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameNinOptNative(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestCustomNameNinRepNativeStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameNinRepNative(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestCustomNameNinStructStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameNinStruct(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestCustomNameCustomTypeStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameCustomType(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestCustomNameNinEmbeddedStructUnionStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameNinEmbeddedStructUnion(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestCustomNameEnumStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameEnum(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNoExtensionsMapStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNoExtensionsMap(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestUnrecognizedStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedUnrecognized(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestUnrecognizedWithInnerStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedUnrecognizedWithInner(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestUnrecognizedWithInner_InnerStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedUnrecognizedWithInner_Inner(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestUnrecognizedWithEmbedStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedUnrecognizedWithEmbed(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestUnrecognizedWithEmbed_EmbeddedStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedUnrecognizedWithEmbed_Embedded(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNodeStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNode(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNinOptNativeUnionOnlyOne(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptNativeUnion(popr, true) + v := p.GetValue() + msg := &NinOptNativeUnion{} + if !msg.SetValue(v) { + t.Fatalf("OnlyOne: Could not set Value") + } + if !p.Equal(msg) { + t.Fatalf("%#v !OnlyOne Equal %#v", msg, p) + } +} +func TestNinOptStructUnionOnlyOne(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptStructUnion(popr, true) + v := p.GetValue() + msg := &NinOptStructUnion{} + if !msg.SetValue(v) { + t.Fatalf("OnlyOne: Could not set Value") + } + if !p.Equal(msg) { + t.Fatalf("%#v !OnlyOne Equal %#v", msg, p) + } +} +func TestNinEmbeddedStructUnionOnlyOne(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinEmbeddedStructUnion(popr, true) + v := p.GetValue() + msg := &NinEmbeddedStructUnion{} + if !msg.SetValue(v) { + t.Fatalf("OnlyOne: Could not set Value") + } + if !p.Equal(msg) { + t.Fatalf("%#v !OnlyOne Equal %#v", msg, p) + } +} +func TestNinNestedStructUnionOnlyOne(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinNestedStructUnion(popr, true) + v := p.GetValue() + msg := &NinNestedStructUnion{} + if !msg.SetValue(v) { + t.Fatalf("OnlyOne: Could not set Value") + } + if !p.Equal(msg) { + t.Fatalf("%#v !OnlyOne Equal %#v", msg, p) + } +} +func TestTreeOnlyOne(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedTree(popr, true) + v := p.GetValue() + msg := &Tree{} + if !msg.SetValue(v) { + t.Fatalf("OnlyOne: Could not set Value") + } + if !p.Equal(msg) { + t.Fatalf("%#v !OnlyOne Equal %#v", msg, p) + } +} +func TestDeepTreeOnlyOne(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedDeepTree(popr, true) + v := p.GetValue() + msg := &DeepTree{} + if !msg.SetValue(v) { + t.Fatalf("OnlyOne: Could not set Value") + } + if !p.Equal(msg) { + t.Fatalf("%#v !OnlyOne Equal %#v", msg, p) + } +} +func TestCustomNameNinEmbeddedStructUnionOnlyOne(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameNinEmbeddedStructUnion(popr, true) + v := p.GetValue() + msg := &CustomNameNinEmbeddedStructUnion{} + if !msg.SetValue(v) { + t.Fatalf("OnlyOne: Could not set Value") + } + if !p.Equal(msg) { + t.Fatalf("%#v !OnlyOne Equal %#v", msg, p) + } +} + +//These tests are generated by github.com/gogo/protobuf/plugin/testgen diff --git a/vendor/github.com/gogo/protobuf/test/combos/unsafeboth/uuid.go b/vendor/github.com/gogo/protobuf/test/combos/unsafeboth/uuid.go new file mode 100644 index 000000000..760111191 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/combos/unsafeboth/uuid.go @@ -0,0 +1,126 @@ +// Extensions for Protocol Buffers to create more go like structures. +// +// Copyright (c) 2013, Vastech SA (PTY) LTD. All rights reserved. +// http://github.com/gogo/protobuf/gogoproto +// +// 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 test + +import ( + "bytes" + "encoding/json" +) + +func PutLittleEndianUint64(b []byte, offset int, v uint64) { + b[offset] = byte(v) + b[offset+1] = byte(v >> 8) + b[offset+2] = byte(v >> 16) + b[offset+3] = byte(v >> 24) + b[offset+4] = byte(v >> 32) + b[offset+5] = byte(v >> 40) + b[offset+6] = byte(v >> 48) + b[offset+7] = byte(v >> 56) +} + +type Uuid []byte + +func (uuid Uuid) Marshal() ([]byte, error) { + if len(uuid) == 0 { + return nil, nil + } + return []byte(uuid), nil +} + +func (uuid Uuid) MarshalTo(data []byte) (n int, err error) { + if len(uuid) == 0 { + return 0, nil + } + copy(data, uuid) + return 16, nil +} + +func (uuid *Uuid) Unmarshal(data []byte) error { + if len(data) == 0 { + uuid = nil + return nil + } + id := Uuid(make([]byte, 16)) + copy(id, data) + *uuid = id + return nil +} + +func (uuid *Uuid) Size() int { + if uuid == nil { + return 0 + } + if len(*uuid) == 0 { + return 0 + } + return 16 +} + +func (uuid Uuid) MarshalJSON() ([]byte, error) { + return json.Marshal([]byte(uuid)) +} + +func (uuid *Uuid) UnmarshalJSON(data []byte) error { + v := new([]byte) + err := json.Unmarshal(data, v) + if err != nil { + return err + } + return uuid.Unmarshal(*v) +} + +func (uuid Uuid) Equal(other Uuid) bool { + return bytes.Equal(uuid[0:], other[0:]) +} + +func (uuid Uuid) Compare(other Uuid) int { + return bytes.Compare(uuid[0:], other[0:]) +} + +type int63 interface { + Int63() int64 +} + +func NewPopulatedUuid(r int63) *Uuid { + u := RandV4(r) + return &u +} + +func RandV4(r int63) Uuid { + uuid := make(Uuid, 16) + uuid.RandV4(r) + return uuid +} + +func (uuid Uuid) RandV4(r int63) { + PutLittleEndianUint64(uuid, 0, uint64(r.Int63())) + PutLittleEndianUint64(uuid, 8, uint64(r.Int63())) + uuid[6] = (uuid[6] & 0xf) | 0x40 + uuid[8] = (uuid[8] & 0x3f) | 0x80 +} diff --git a/vendor/github.com/gogo/protobuf/test/combos/unsafemarshaler/bug_test.go b/vendor/github.com/gogo/protobuf/test/combos/unsafemarshaler/bug_test.go new file mode 100644 index 000000000..2386c48e5 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/combos/unsafemarshaler/bug_test.go @@ -0,0 +1,250 @@ +// Copyright (c) 2013, Vastech SA (PTY) LTD. All rights reserved. +// http://github.com/gogo/protobuf/gogoproto +// +// 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 test + +import ( + "fmt" + "math" + "math/rand" + "testing" + "time" + + "github.com/gogo/protobuf/proto" +) + +//http://code.google.com/p/goprotobuf/issues/detail?id=39 +func TestBugUint32VarintSize(t *testing.T) { + temp := uint32(math.MaxUint32) + n := &NinOptNative{} + n.Field5 = &temp + data, err := proto.Marshal(n) + if err != nil { + panic(err) + } + if len(data) != 6 { + t.Fatalf("data should be length 6, but its %#v", data) + } +} + +func TestBugZeroLengthSliceSize(t *testing.T) { + n := &NinRepPackedNative{ + Field8: []int64{}, + } + size := n.Size() + data, err := proto.Marshal(n) + if err != nil { + panic(err) + } + if len(data) != size { + t.Fatalf("expected %v, but got %v", len(data), size) + } +} + +//http://code.google.com/p/goprotobuf/issues/detail?id=40 +func TestBugPackedProtoSize(t *testing.T) { + n := &NinRepPackedNative{ + Field4: []int64{172960727389894724, 2360337516664475010, 860833876131988189, 9068073014890763245, 7794843386260381831, 4023536436053141786, 8992311247496919020, 4330096163611305776, 4490411416244976467, 7873947349172707443, 2754969595834279669, 1360667855926938684, 4771480785172657389, 4875578924966668055, 8070579869808877481, 9128179594766551001, 4630419407064527516, 863844540220372892, 8208727650143073487, 7086117356301045838, 7779695211931506151, 5493835345187563535, 9119767633370806007, 9054342025895349248, 1887303228838508438, 7624573031734528281, 1874668389749611225, 3517684643468970593, 6677697606628877758, 7293473953189936168, 444475066704085538, 8594971141363049302, 1146643249094989673, 733393306232853371, 7721178528893916886, 7784452000911004429, 6436373110242711440, 6897422461738321237, 8772249155667732778, 6211871464311393541, 3061903718310406883, 7845488913176136641, 8342255034663902574, 3443058984649725748, 8410801047334832902, 7496541071517841153, 4305416923521577765, 7814967600020476457, 8671843803465481186, 3490266370361096855, 1447425664719091336, 653218597262334239, 8306243902880091940, 7851896059762409081, 5936760560798954978, 5755724498441478025, 7022701569985035966, 3707709584811468220, 529069456924666920, 7986469043681522462, 3092513330689518836, 5103541550470476202, 3577384161242626406, 3733428084624703294, 8388690542440473117, 3262468785346149388, 8788358556558007570, 5476276940198542020, 7277903243119461239, 5065861426928605020, 7533460976202697734, 1749213838654236956, 557497603941617931, 5496307611456481108, 6444547750062831720, 6992758776744205596, 7356719693428537399, 2896328872476734507, 381447079530132038, 598300737753233118, 3687980626612697715, 7240924191084283349, 8172414415307971170, 4847024388701257185, 2081764168600256551, 3394217778539123488, 6244660626429310923, 8301712215675381614, 5360615125359461174, 8410140945829785773, 3152963269026381373, 6197275282781459633, 4419829061407546410, 6262035523070047537, 2837207483933463885, 2158105736666826128, 8150764172235490711}, + Field7: []int32{249451845, 1409974015, 393609128, 435232428, 1817529040, 91769006, 861170933, 1556185603, 1568580279, 1236375273, 512276621, 693633711, 967580535, 1950715977, 853431462, 1362390253, 159591204, 111900629, 322985263, 279671129, 1592548430, 465651370, 733849989, 1172059400, 1574824441, 263541092, 1271612397, 1520584358, 467078791, 117698716, 1098255064, 2054264846, 1766452305, 1267576395, 1557505617, 1187833560, 956187431, 1970977586, 1160235159, 1610259028, 489585797, 459139078, 566263183, 954319278, 1545018565, 1753946743, 948214318, 422878159, 883926576, 1424009347, 824732372, 1290433180, 80297942, 417294230, 1402647904, 2078392782, 220505045, 787368129, 463781454, 293083578, 808156928, 293976361}, + Field9: []uint32{0xaa4976e8, 0x3da8cc4c, 0x8c470d83, 0x344d964e, 0x5b90925, 0xa4c4d34e, 0x666eff19, 0xc238e552, 0x9be53bb6, 0x56364245, 0x33ee079d, 0x96bf0ede, 0x7941b74f, 0xdb07cb47, 0x6d76d827, 0x9b211d5d, 0x2798adb6, 0xe48b0c3b, 0x87061b21, 0x48f4e4d2, 0x3e5d5c12, 0x5ee91288, 0x336d4f35, 0xe1d44941, 0xc065548d, 0x2953d73f, 0x873af451, 0xfc769db, 0x9f1bf8da, 0x9baafdfc, 0xf1d3d770, 0x5bb5d2b4, 0xc2c67c48, 0x6845c4c1, 0xa48f32b0, 0xbb04bb70, 0xa5b1ca36, 0x8d98356a, 0x2171f654, 0x5ae279b0, 0x6c4a3d6b, 0x4fff5468, 0xcf9bf851, 0x68513614, 0xdbecd9b0, 0x9553ed3c, 0xa494a736, 0x42205438, 0xbf8e5caa, 0xd3283c6, 0x76d20788, 0x9179826f, 0x96b24f85, 0xbc2eacf4, 0xe4afae0b, 0x4bca85cb, 0x35e63b5b, 0xd7ccee0c, 0x2b506bb9, 0xe78e9f44, 0x9ad232f1, 0x99a37335, 0xa5d6ffc8}, + Field11: []uint64{0x53c01ebc, 0x4fb85ba6, 0x8805eea1, 0xb20ec896, 0x93b63410, 0xec7c9492, 0x50765a28, 0x19592106, 0x2ecc59b3, 0x39cd474f, 0xe4c9e47, 0x444f48c5, 0xe7731d32, 0xf3f43975, 0x603caedd, 0xbb05a1af, 0xa808e34e, 0x88580b07, 0x4c96bbd1, 0x730b4ab9, 0xed126e2b, 0x6db48205, 0x154ba1b9, 0xc26bfb6a, 0x389aa052, 0x869d966c, 0x7c86b366, 0xcc8edbcd, 0xfa8d6dad, 0xcf5857d9, 0x2d9cda0f, 0x1218a0b8, 0x41bf997, 0xf0ca65ac, 0xa610d4b9, 0x8d362e28, 0xb7212d87, 0x8e0fe109, 0xbee041d9, 0x759be2f6, 0x35fef4f3, 0xaeacdb71, 0x10888852, 0xf4e28117, 0xe2a14812, 0x73b748dc, 0xd1c3c6b2, 0xfef41bf0, 0xc9b43b62, 0x810e4faa, 0xcaa41c06, 0x1893fe0d, 0xedc7c850, 0xd12b9eaa, 0x467ee1a9, 0xbe84756b, 0xda7b1680, 0xdc069ffe, 0xf1e7e9f9, 0xb3d95370, 0xa92b77df, 0x5693ac41, 0xd04b7287, 0x27aebf15, 0x837b316e, 0x4dbe2263, 0xbab70c67, 0x547dab21, 0x3c346c1f, 0xb8ef0e4e, 0xfe2d03ce, 0xe1d75955, 0xfec1306, 0xba35c23e, 0xb784ed04, 0x2a4e33aa, 0x7e19d09a, 0x3827c1fe, 0xf3a51561, 0xef765e2b, 0xb044256c, 0x62b322be, 0xf34d56be, 0xeb71b369, 0xffe1294f, 0x237fe8d0, 0x77a1473b, 0x239e1196, 0xdd19bf3d, 0x82c91fe1, 0x95361c57, 0xffea3f1b, 0x1a094c84}, + Field12: []int64{8308420747267165049, 3664160795077875961, 7868970059161834817, 7237335984251173739, 5254748003907196506, 3362259627111837480, 430460752854552122, 5119635556501066533, 1277716037866233522, 9185775384759813768, 833932430882717888, 7986528304451297640, 6792233378368656337, 2074207091120609721, 1788723326198279432, 7756514594746453657, 2283775964901597324, 3061497730110517191, 7733947890656120277, 626967303632386244, 7822928600388582821, 3489658753000061230, 168869995163005961, 248814782163480763, 477885608911386247, 4198422415674133867, 3379354662797976109, 9925112544736939, 1486335136459138480, 4561560414032850671, 1010864164014091267, 186722821683803084, 5106357936724819318, 1298160820191228988, 4675403242419953145, 7130634540106489752, 7101280006672440929, 7176058292431955718, 9109875054097770321, 6810974877085322872, 4736707874303993641, 8993135362721382187, 6857881554990254283, 3704748883307461680, 1099360832887634994, 5207691918707192633, 5984721695043995243}, + } + size := proto.Size(n) + data, err := proto.Marshal(n) + if err != nil { + panic(err) + } + if len(data) != size { + t.Fatalf("expected %v, but got %v diff is %v", len(data), size, len(data)-size) + } +} + +func testSize(m interface { + proto.Message + Size() int +}, desc string, expected int) ([]byte, error) { + data, err := proto.Marshal(m) + if err != nil { + return nil, err + } + protoSize := proto.Size(m) + mSize := m.Size() + lenData := len(data) + if protoSize != mSize || protoSize != lenData || mSize != lenData { + return nil, fmt.Errorf("%s proto.Size(m){%d} != m.Size(){%d} != len(data){%d}", desc, protoSize, mSize, lenData) + } + if got := protoSize; got != expected { + return nil, fmt.Errorf("%s proto.Size(m) got %d expected %d", desc, got, expected) + } + if got := mSize; got != expected { + return nil, fmt.Errorf("%s m.Size() got %d expected %d", desc, got, expected) + } + if got := lenData; got != expected { + return nil, fmt.Errorf("%s len(data) got %d expected %d", desc, got, expected) + } + return data, nil +} + +func TestInt32Int64Compatibility(t *testing.T) { + + //test nullable int32 and int64 + + data1, err := testSize(&NinOptNative{ + Field3: proto.Int32(-1), + }, "nullable", 11) + if err != nil { + t.Error(err) + } + //change marshaled data1 to unmarshal into 4th field which is an int64 + data1[0] = uint8(uint32(4 /*fieldNumber*/)<<3 | uint32(0 /*wireType*/)) + u1 := &NinOptNative{} + if err = proto.Unmarshal(data1, u1); err != nil { + t.Error(err) + } + if !u1.Equal(&NinOptNative{ + Field4: proto.Int64(-1), + }) { + t.Error("nullable unmarshaled int32 is not the same int64") + } + + //test non-nullable int32 and int64 + + data2, err := testSize(&NidOptNative{ + Field3: -1, + }, "non nullable", 67) + if err != nil { + t.Error(err) + } + //change marshaled data2 to unmarshal into 4th field which is an int64 + field3 := uint8(uint32(3 /*fieldNumber*/)<<3 | uint32(0 /*wireType*/)) + field4 := uint8(uint32(4 /*fieldNumber*/)<<3 | uint32(0 /*wireType*/)) + for i, c := range data2 { + if c == field4 { + data2[i] = field3 + } else if c == field3 { + data2[i] = field4 + } + } + u2 := &NidOptNative{} + if err = proto.Unmarshal(data2, u2); err != nil { + t.Error(err) + } + if !u2.Equal(&NidOptNative{ + Field4: -1, + }) { + t.Error("non nullable unmarshaled int32 is not the same int64") + } + + //test packed repeated int32 and int64 + + m4 := &NinRepPackedNative{ + Field3: []int32{-1}, + } + data4, err := testSize(m4, "packed", 12) + if err != nil { + t.Error(err) + } + u4 := &NinRepPackedNative{} + if err := proto.Unmarshal(data4, u4); err != nil { + t.Error(err) + } + if err := u4.VerboseEqual(m4); err != nil { + t.Fatalf("%#v", u4) + } + + //test repeated int32 and int64 + + if _, err := testSize(&NinRepNative{ + Field3: []int32{-1}, + }, "repeated", 11); err != nil { + t.Error(err) + } + + t.Logf("tested all") +} + +func TestRepeatedExtensionsMsgsIssue161(t *testing.T) { + r := rand.New(rand.NewSource(time.Now().UnixNano())) + rep := 10 + nins := make([]*NinOptNative, rep) + for i := range nins { + nins[i] = NewPopulatedNinOptNative(r, true) + } + input := &MyExtendable{} + if err := proto.SetExtension(input, E_FieldE, nins); err != nil { + t.Fatal(err) + } + data, err := proto.Marshal(input) + if err != nil { + t.Fatal(err) + } + output := &MyExtendable{} + if err := proto.Unmarshal(data, output); err != nil { + t.Fatal(err) + } + if !input.Equal(output) { + t.Fatal("expected equal") + } + data2, err2 := proto.Marshal(output) + if err2 != nil { + t.Fatal(err2) + } + if len(data) != len(data2) { + t.Fatal("expected equal length buffers") + } +} + +func TestRepeatedExtensionsFieldsIssue161(t *testing.T) { + r := rand.New(rand.NewSource(time.Now().UnixNano())) + rep := 10 + ints := make([]int64, rep) + for i := range ints { + ints[i] = r.Int63() + } + input := &MyExtendable{} + if err := proto.SetExtension(input, E_FieldD, ints); err != nil { + t.Fatal(err) + } + data, err := proto.Marshal(input) + if err != nil { + t.Fatal(err) + } + output := &MyExtendable{} + if err := proto.Unmarshal(data, output); err != nil { + t.Fatal(err) + } + if !input.Equal(output) { + t.Fatal("expected equal") + } + data2, err2 := proto.Marshal(output) + if err2 != nil { + t.Fatal(err2) + } + if len(data) != len(data2) { + t.Fatal("expected equal length buffers") + } +} diff --git a/vendor/github.com/gogo/protobuf/test/combos/unsafemarshaler/thetest.pb.go b/vendor/github.com/gogo/protobuf/test/combos/unsafemarshaler/thetest.pb.go new file mode 100644 index 000000000..a4cecca00 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/combos/unsafemarshaler/thetest.pb.go @@ -0,0 +1,28471 @@ +// Code generated by protoc-gen-gogo. +// source: combos/unsafemarshaler/thetest.proto +// DO NOT EDIT! + +/* + Package test is a generated protocol buffer package. + + It is generated from these files: + combos/unsafemarshaler/thetest.proto + + It has these top-level messages: + NidOptNative + NinOptNative + NidRepNative + NinRepNative + NidRepPackedNative + NinRepPackedNative + NidOptStruct + NinOptStruct + NidRepStruct + NinRepStruct + NidEmbeddedStruct + NinEmbeddedStruct + NidNestedStruct + NinNestedStruct + NidOptCustom + CustomDash + NinOptCustom + NidRepCustom + NinRepCustom + NinOptNativeUnion + NinOptStructUnion + NinEmbeddedStructUnion + NinNestedStructUnion + Tree + OrBranch + AndBranch + Leaf + DeepTree + ADeepBranch + AndDeepBranch + DeepLeaf + Nil + NidOptEnum + NinOptEnum + NidRepEnum + NinRepEnum + NinOptEnumDefault + AnotherNinOptEnum + AnotherNinOptEnumDefault + Timer + MyExtendable + OtherExtenable + NestedDefinition + NestedScope + NinOptNativeDefault + CustomContainer + CustomNameNidOptNative + CustomNameNinOptNative + CustomNameNinRepNative + CustomNameNinStruct + CustomNameCustomType + CustomNameNinEmbeddedStructUnion + CustomNameEnum + NoExtensionsMap + Unrecognized + UnrecognizedWithInner + UnrecognizedWithEmbed + Node +*/ +package test + +import proto "github.com/gogo/protobuf/proto" +import fmt "fmt" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" + +import github_com_gogo_protobuf_test_custom "github.com/gogo/protobuf/test/custom" +import github_com_gogo_protobuf_test_custom_dash_type "github.com/gogo/protobuf/test/custom-dash-type" + +import bytes "bytes" +import github_com_gogo_protobuf_sortkeys "github.com/gogo/protobuf/sortkeys" + +import github_com_gogo_protobuf_protoc_gen_gogo_descriptor "github.com/gogo/protobuf/protoc-gen-gogo/descriptor" +import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" +import compress_gzip "compress/gzip" +import io_ioutil "io/ioutil" + +import strconv "strconv" + +import strings "strings" +import sort "sort" +import reflect "reflect" + +import unsafe "unsafe" + +// 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. +const _ = proto.GoGoProtoPackageIsVersion1 + +type TheTestEnum int32 + +const ( + A TheTestEnum = 0 + B TheTestEnum = 1 + C TheTestEnum = 2 +) + +var TheTestEnum_name = map[int32]string{ + 0: "A", + 1: "B", + 2: "C", +} +var TheTestEnum_value = map[string]int32{ + "A": 0, + "B": 1, + "C": 2, +} + +func (x TheTestEnum) Enum() *TheTestEnum { + p := new(TheTestEnum) + *p = x + return p +} +func (x TheTestEnum) MarshalJSON() ([]byte, error) { + return proto.MarshalJSONEnum(TheTestEnum_name, int32(x)) +} +func (x *TheTestEnum) UnmarshalJSON(data []byte) error { + value, err := proto.UnmarshalJSONEnum(TheTestEnum_value, data, "TheTestEnum") + if err != nil { + return err + } + *x = TheTestEnum(value) + return nil +} +func (TheTestEnum) EnumDescriptor() ([]byte, []int) { return fileDescriptorThetest, []int{0} } + +type AnotherTestEnum int32 + +const ( + D AnotherTestEnum = 10 + E AnotherTestEnum = 11 +) + +var AnotherTestEnum_name = map[int32]string{ + 10: "D", + 11: "E", +} +var AnotherTestEnum_value = map[string]int32{ + "D": 10, + "E": 11, +} + +func (x AnotherTestEnum) Enum() *AnotherTestEnum { + p := new(AnotherTestEnum) + *p = x + return p +} +func (x AnotherTestEnum) MarshalJSON() ([]byte, error) { + return proto.MarshalJSONEnum(AnotherTestEnum_name, int32(x)) +} +func (x *AnotherTestEnum) UnmarshalJSON(data []byte) error { + value, err := proto.UnmarshalJSONEnum(AnotherTestEnum_value, data, "AnotherTestEnum") + if err != nil { + return err + } + *x = AnotherTestEnum(value) + return nil +} +func (AnotherTestEnum) EnumDescriptor() ([]byte, []int) { return fileDescriptorThetest, []int{1} } + +// YetAnotherTestEnum is used to test cross-package import of custom name +// fields and default resolution. +type YetAnotherTestEnum int32 + +const ( + AA YetAnotherTestEnum = 0 + BetterYetBB YetAnotherTestEnum = 1 +) + +var YetAnotherTestEnum_name = map[int32]string{ + 0: "AA", + 1: "BB", +} +var YetAnotherTestEnum_value = map[string]int32{ + "AA": 0, + "BB": 1, +} + +func (x YetAnotherTestEnum) Enum() *YetAnotherTestEnum { + p := new(YetAnotherTestEnum) + *p = x + return p +} +func (x YetAnotherTestEnum) MarshalJSON() ([]byte, error) { + return proto.MarshalJSONEnum(YetAnotherTestEnum_name, int32(x)) +} +func (x *YetAnotherTestEnum) UnmarshalJSON(data []byte) error { + value, err := proto.UnmarshalJSONEnum(YetAnotherTestEnum_value, data, "YetAnotherTestEnum") + if err != nil { + return err + } + *x = YetAnotherTestEnum(value) + return nil +} +func (YetAnotherTestEnum) EnumDescriptor() ([]byte, []int) { return fileDescriptorThetest, []int{2} } + +// YetAnotherTestEnum is used to test cross-package import of custom name +// fields and default resolution. +type YetYetAnotherTestEnum int32 + +const ( + YetYetAnotherTestEnum_CC YetYetAnotherTestEnum = 0 + YetYetAnotherTestEnum_BetterYetDD YetYetAnotherTestEnum = 1 +) + +var YetYetAnotherTestEnum_name = map[int32]string{ + 0: "CC", + 1: "DD", +} +var YetYetAnotherTestEnum_value = map[string]int32{ + "CC": 0, + "DD": 1, +} + +func (x YetYetAnotherTestEnum) Enum() *YetYetAnotherTestEnum { + p := new(YetYetAnotherTestEnum) + *p = x + return p +} +func (x YetYetAnotherTestEnum) MarshalJSON() ([]byte, error) { + return proto.MarshalJSONEnum(YetYetAnotherTestEnum_name, int32(x)) +} +func (x *YetYetAnotherTestEnum) UnmarshalJSON(data []byte) error { + value, err := proto.UnmarshalJSONEnum(YetYetAnotherTestEnum_value, data, "YetYetAnotherTestEnum") + if err != nil { + return err + } + *x = YetYetAnotherTestEnum(value) + return nil +} +func (YetYetAnotherTestEnum) EnumDescriptor() ([]byte, []int) { return fileDescriptorThetest, []int{3} } + +type NestedDefinition_NestedEnum int32 + +const ( + TYPE_NESTED NestedDefinition_NestedEnum = 1 +) + +var NestedDefinition_NestedEnum_name = map[int32]string{ + 1: "TYPE_NESTED", +} +var NestedDefinition_NestedEnum_value = map[string]int32{ + "TYPE_NESTED": 1, +} + +func (x NestedDefinition_NestedEnum) Enum() *NestedDefinition_NestedEnum { + p := new(NestedDefinition_NestedEnum) + *p = x + return p +} +func (x NestedDefinition_NestedEnum) MarshalJSON() ([]byte, error) { + return proto.MarshalJSONEnum(NestedDefinition_NestedEnum_name, int32(x)) +} +func (x *NestedDefinition_NestedEnum) UnmarshalJSON(data []byte) error { + value, err := proto.UnmarshalJSONEnum(NestedDefinition_NestedEnum_value, data, "NestedDefinition_NestedEnum") + if err != nil { + return err + } + *x = NestedDefinition_NestedEnum(value) + return nil +} +func (NestedDefinition_NestedEnum) EnumDescriptor() ([]byte, []int) { + return fileDescriptorThetest, []int{42, 0} +} + +type NidOptNative struct { + Field1 float64 `protobuf:"fixed64,1,opt,name=Field1,json=field1" json:"Field1"` + Field2 float32 `protobuf:"fixed32,2,opt,name=Field2,json=field2" json:"Field2"` + Field3 int32 `protobuf:"varint,3,opt,name=Field3,json=field3" json:"Field3"` + Field4 int64 `protobuf:"varint,4,opt,name=Field4,json=field4" json:"Field4"` + Field5 uint32 `protobuf:"varint,5,opt,name=Field5,json=field5" json:"Field5"` + Field6 uint64 `protobuf:"varint,6,opt,name=Field6,json=field6" json:"Field6"` + Field7 int32 `protobuf:"zigzag32,7,opt,name=Field7,json=field7" json:"Field7"` + Field8 int64 `protobuf:"zigzag64,8,opt,name=Field8,json=field8" json:"Field8"` + Field9 uint32 `protobuf:"fixed32,9,opt,name=Field9,json=field9" json:"Field9"` + Field10 int32 `protobuf:"fixed32,10,opt,name=Field10,json=field10" json:"Field10"` + Field11 uint64 `protobuf:"fixed64,11,opt,name=Field11,json=field11" json:"Field11"` + Field12 int64 `protobuf:"fixed64,12,opt,name=Field12,json=field12" json:"Field12"` + Field13 bool `protobuf:"varint,13,opt,name=Field13,json=field13" json:"Field13"` + Field14 string `protobuf:"bytes,14,opt,name=Field14,json=field14" json:"Field14"` + Field15 []byte `protobuf:"bytes,15,opt,name=Field15,json=field15" json:"Field15"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *NidOptNative) Reset() { *m = NidOptNative{} } +func (*NidOptNative) ProtoMessage() {} +func (*NidOptNative) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{0} } + +type NinOptNative struct { + Field1 *float64 `protobuf:"fixed64,1,opt,name=Field1,json=field1" json:"Field1,omitempty"` + Field2 *float32 `protobuf:"fixed32,2,opt,name=Field2,json=field2" json:"Field2,omitempty"` + Field3 *int32 `protobuf:"varint,3,opt,name=Field3,json=field3" json:"Field3,omitempty"` + Field4 *int64 `protobuf:"varint,4,opt,name=Field4,json=field4" json:"Field4,omitempty"` + Field5 *uint32 `protobuf:"varint,5,opt,name=Field5,json=field5" json:"Field5,omitempty"` + Field6 *uint64 `protobuf:"varint,6,opt,name=Field6,json=field6" json:"Field6,omitempty"` + Field7 *int32 `protobuf:"zigzag32,7,opt,name=Field7,json=field7" json:"Field7,omitempty"` + Field8 *int64 `protobuf:"zigzag64,8,opt,name=Field8,json=field8" json:"Field8,omitempty"` + Field9 *uint32 `protobuf:"fixed32,9,opt,name=Field9,json=field9" json:"Field9,omitempty"` + Field10 *int32 `protobuf:"fixed32,10,opt,name=Field10,json=field10" json:"Field10,omitempty"` + Field11 *uint64 `protobuf:"fixed64,11,opt,name=Field11,json=field11" json:"Field11,omitempty"` + Field12 *int64 `protobuf:"fixed64,12,opt,name=Field12,json=field12" json:"Field12,omitempty"` + Field13 *bool `protobuf:"varint,13,opt,name=Field13,json=field13" json:"Field13,omitempty"` + Field14 *string `protobuf:"bytes,14,opt,name=Field14,json=field14" json:"Field14,omitempty"` + Field15 []byte `protobuf:"bytes,15,opt,name=Field15,json=field15" json:"Field15,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *NinOptNative) Reset() { *m = NinOptNative{} } +func (*NinOptNative) ProtoMessage() {} +func (*NinOptNative) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{1} } + +type NidRepNative struct { + Field1 []float64 `protobuf:"fixed64,1,rep,name=Field1,json=field1" json:"Field1,omitempty"` + Field2 []float32 `protobuf:"fixed32,2,rep,name=Field2,json=field2" json:"Field2,omitempty"` + Field3 []int32 `protobuf:"varint,3,rep,name=Field3,json=field3" json:"Field3,omitempty"` + Field4 []int64 `protobuf:"varint,4,rep,name=Field4,json=field4" json:"Field4,omitempty"` + Field5 []uint32 `protobuf:"varint,5,rep,name=Field5,json=field5" json:"Field5,omitempty"` + Field6 []uint64 `protobuf:"varint,6,rep,name=Field6,json=field6" json:"Field6,omitempty"` + Field7 []int32 `protobuf:"zigzag32,7,rep,name=Field7,json=field7" json:"Field7,omitempty"` + Field8 []int64 `protobuf:"zigzag64,8,rep,name=Field8,json=field8" json:"Field8,omitempty"` + Field9 []uint32 `protobuf:"fixed32,9,rep,name=Field9,json=field9" json:"Field9,omitempty"` + Field10 []int32 `protobuf:"fixed32,10,rep,name=Field10,json=field10" json:"Field10,omitempty"` + Field11 []uint64 `protobuf:"fixed64,11,rep,name=Field11,json=field11" json:"Field11,omitempty"` + Field12 []int64 `protobuf:"fixed64,12,rep,name=Field12,json=field12" json:"Field12,omitempty"` + Field13 []bool `protobuf:"varint,13,rep,name=Field13,json=field13" json:"Field13,omitempty"` + Field14 []string `protobuf:"bytes,14,rep,name=Field14,json=field14" json:"Field14,omitempty"` + Field15 [][]byte `protobuf:"bytes,15,rep,name=Field15,json=field15" json:"Field15,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *NidRepNative) Reset() { *m = NidRepNative{} } +func (*NidRepNative) ProtoMessage() {} +func (*NidRepNative) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{2} } + +type NinRepNative struct { + Field1 []float64 `protobuf:"fixed64,1,rep,name=Field1,json=field1" json:"Field1,omitempty"` + Field2 []float32 `protobuf:"fixed32,2,rep,name=Field2,json=field2" json:"Field2,omitempty"` + Field3 []int32 `protobuf:"varint,3,rep,name=Field3,json=field3" json:"Field3,omitempty"` + Field4 []int64 `protobuf:"varint,4,rep,name=Field4,json=field4" json:"Field4,omitempty"` + Field5 []uint32 `protobuf:"varint,5,rep,name=Field5,json=field5" json:"Field5,omitempty"` + Field6 []uint64 `protobuf:"varint,6,rep,name=Field6,json=field6" json:"Field6,omitempty"` + Field7 []int32 `protobuf:"zigzag32,7,rep,name=Field7,json=field7" json:"Field7,omitempty"` + Field8 []int64 `protobuf:"zigzag64,8,rep,name=Field8,json=field8" json:"Field8,omitempty"` + Field9 []uint32 `protobuf:"fixed32,9,rep,name=Field9,json=field9" json:"Field9,omitempty"` + Field10 []int32 `protobuf:"fixed32,10,rep,name=Field10,json=field10" json:"Field10,omitempty"` + Field11 []uint64 `protobuf:"fixed64,11,rep,name=Field11,json=field11" json:"Field11,omitempty"` + Field12 []int64 `protobuf:"fixed64,12,rep,name=Field12,json=field12" json:"Field12,omitempty"` + Field13 []bool `protobuf:"varint,13,rep,name=Field13,json=field13" json:"Field13,omitempty"` + Field14 []string `protobuf:"bytes,14,rep,name=Field14,json=field14" json:"Field14,omitempty"` + Field15 [][]byte `protobuf:"bytes,15,rep,name=Field15,json=field15" json:"Field15,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *NinRepNative) Reset() { *m = NinRepNative{} } +func (*NinRepNative) ProtoMessage() {} +func (*NinRepNative) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{3} } + +type NidRepPackedNative struct { + Field1 []float64 `protobuf:"fixed64,1,rep,packed,name=Field1,json=field1" json:"Field1,omitempty"` + Field2 []float32 `protobuf:"fixed32,2,rep,packed,name=Field2,json=field2" json:"Field2,omitempty"` + Field3 []int32 `protobuf:"varint,3,rep,packed,name=Field3,json=field3" json:"Field3,omitempty"` + Field4 []int64 `protobuf:"varint,4,rep,packed,name=Field4,json=field4" json:"Field4,omitempty"` + Field5 []uint32 `protobuf:"varint,5,rep,packed,name=Field5,json=field5" json:"Field5,omitempty"` + Field6 []uint64 `protobuf:"varint,6,rep,packed,name=Field6,json=field6" json:"Field6,omitempty"` + Field7 []int32 `protobuf:"zigzag32,7,rep,packed,name=Field7,json=field7" json:"Field7,omitempty"` + Field8 []int64 `protobuf:"zigzag64,8,rep,packed,name=Field8,json=field8" json:"Field8,omitempty"` + Field9 []uint32 `protobuf:"fixed32,9,rep,packed,name=Field9,json=field9" json:"Field9,omitempty"` + Field10 []int32 `protobuf:"fixed32,10,rep,packed,name=Field10,json=field10" json:"Field10,omitempty"` + Field11 []uint64 `protobuf:"fixed64,11,rep,packed,name=Field11,json=field11" json:"Field11,omitempty"` + Field12 []int64 `protobuf:"fixed64,12,rep,packed,name=Field12,json=field12" json:"Field12,omitempty"` + Field13 []bool `protobuf:"varint,13,rep,packed,name=Field13,json=field13" json:"Field13,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *NidRepPackedNative) Reset() { *m = NidRepPackedNative{} } +func (*NidRepPackedNative) ProtoMessage() {} +func (*NidRepPackedNative) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{4} } + +type NinRepPackedNative struct { + Field1 []float64 `protobuf:"fixed64,1,rep,packed,name=Field1,json=field1" json:"Field1,omitempty"` + Field2 []float32 `protobuf:"fixed32,2,rep,packed,name=Field2,json=field2" json:"Field2,omitempty"` + Field3 []int32 `protobuf:"varint,3,rep,packed,name=Field3,json=field3" json:"Field3,omitempty"` + Field4 []int64 `protobuf:"varint,4,rep,packed,name=Field4,json=field4" json:"Field4,omitempty"` + Field5 []uint32 `protobuf:"varint,5,rep,packed,name=Field5,json=field5" json:"Field5,omitempty"` + Field6 []uint64 `protobuf:"varint,6,rep,packed,name=Field6,json=field6" json:"Field6,omitempty"` + Field7 []int32 `protobuf:"zigzag32,7,rep,packed,name=Field7,json=field7" json:"Field7,omitempty"` + Field8 []int64 `protobuf:"zigzag64,8,rep,packed,name=Field8,json=field8" json:"Field8,omitempty"` + Field9 []uint32 `protobuf:"fixed32,9,rep,packed,name=Field9,json=field9" json:"Field9,omitempty"` + Field10 []int32 `protobuf:"fixed32,10,rep,packed,name=Field10,json=field10" json:"Field10,omitempty"` + Field11 []uint64 `protobuf:"fixed64,11,rep,packed,name=Field11,json=field11" json:"Field11,omitempty"` + Field12 []int64 `protobuf:"fixed64,12,rep,packed,name=Field12,json=field12" json:"Field12,omitempty"` + Field13 []bool `protobuf:"varint,13,rep,packed,name=Field13,json=field13" json:"Field13,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *NinRepPackedNative) Reset() { *m = NinRepPackedNative{} } +func (*NinRepPackedNative) ProtoMessage() {} +func (*NinRepPackedNative) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{5} } + +type NidOptStruct struct { + Field1 float64 `protobuf:"fixed64,1,opt,name=Field1,json=field1" json:"Field1"` + Field2 float32 `protobuf:"fixed32,2,opt,name=Field2,json=field2" json:"Field2"` + Field3 NidOptNative `protobuf:"bytes,3,opt,name=Field3,json=field3" json:"Field3"` + Field4 NinOptNative `protobuf:"bytes,4,opt,name=Field4,json=field4" json:"Field4"` + Field6 uint64 `protobuf:"varint,6,opt,name=Field6,json=field6" json:"Field6"` + Field7 int32 `protobuf:"zigzag32,7,opt,name=Field7,json=field7" json:"Field7"` + Field8 NidOptNative `protobuf:"bytes,8,opt,name=Field8,json=field8" json:"Field8"` + Field13 bool `protobuf:"varint,13,opt,name=Field13,json=field13" json:"Field13"` + Field14 string `protobuf:"bytes,14,opt,name=Field14,json=field14" json:"Field14"` + Field15 []byte `protobuf:"bytes,15,opt,name=Field15,json=field15" json:"Field15"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *NidOptStruct) Reset() { *m = NidOptStruct{} } +func (*NidOptStruct) ProtoMessage() {} +func (*NidOptStruct) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{6} } + +type NinOptStruct struct { + Field1 *float64 `protobuf:"fixed64,1,opt,name=Field1,json=field1" json:"Field1,omitempty"` + Field2 *float32 `protobuf:"fixed32,2,opt,name=Field2,json=field2" json:"Field2,omitempty"` + Field3 *NidOptNative `protobuf:"bytes,3,opt,name=Field3,json=field3" json:"Field3,omitempty"` + Field4 *NinOptNative `protobuf:"bytes,4,opt,name=Field4,json=field4" json:"Field4,omitempty"` + Field6 *uint64 `protobuf:"varint,6,opt,name=Field6,json=field6" json:"Field6,omitempty"` + Field7 *int32 `protobuf:"zigzag32,7,opt,name=Field7,json=field7" json:"Field7,omitempty"` + Field8 *NidOptNative `protobuf:"bytes,8,opt,name=Field8,json=field8" json:"Field8,omitempty"` + Field13 *bool `protobuf:"varint,13,opt,name=Field13,json=field13" json:"Field13,omitempty"` + Field14 *string `protobuf:"bytes,14,opt,name=Field14,json=field14" json:"Field14,omitempty"` + Field15 []byte `protobuf:"bytes,15,opt,name=Field15,json=field15" json:"Field15,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *NinOptStruct) Reset() { *m = NinOptStruct{} } +func (*NinOptStruct) ProtoMessage() {} +func (*NinOptStruct) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{7} } + +type NidRepStruct struct { + Field1 []float64 `protobuf:"fixed64,1,rep,name=Field1,json=field1" json:"Field1,omitempty"` + Field2 []float32 `protobuf:"fixed32,2,rep,name=Field2,json=field2" json:"Field2,omitempty"` + Field3 []NidOptNative `protobuf:"bytes,3,rep,name=Field3,json=field3" json:"Field3"` + Field4 []NinOptNative `protobuf:"bytes,4,rep,name=Field4,json=field4" json:"Field4"` + Field6 []uint64 `protobuf:"varint,6,rep,name=Field6,json=field6" json:"Field6,omitempty"` + Field7 []int32 `protobuf:"zigzag32,7,rep,name=Field7,json=field7" json:"Field7,omitempty"` + Field8 []NidOptNative `protobuf:"bytes,8,rep,name=Field8,json=field8" json:"Field8"` + Field13 []bool `protobuf:"varint,13,rep,name=Field13,json=field13" json:"Field13,omitempty"` + Field14 []string `protobuf:"bytes,14,rep,name=Field14,json=field14" json:"Field14,omitempty"` + Field15 [][]byte `protobuf:"bytes,15,rep,name=Field15,json=field15" json:"Field15,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *NidRepStruct) Reset() { *m = NidRepStruct{} } +func (*NidRepStruct) ProtoMessage() {} +func (*NidRepStruct) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{8} } + +type NinRepStruct struct { + Field1 []float64 `protobuf:"fixed64,1,rep,name=Field1,json=field1" json:"Field1,omitempty"` + Field2 []float32 `protobuf:"fixed32,2,rep,name=Field2,json=field2" json:"Field2,omitempty"` + Field3 []*NidOptNative `protobuf:"bytes,3,rep,name=Field3,json=field3" json:"Field3,omitempty"` + Field4 []*NinOptNative `protobuf:"bytes,4,rep,name=Field4,json=field4" json:"Field4,omitempty"` + Field6 []uint64 `protobuf:"varint,6,rep,name=Field6,json=field6" json:"Field6,omitempty"` + Field7 []int32 `protobuf:"zigzag32,7,rep,name=Field7,json=field7" json:"Field7,omitempty"` + Field8 []*NidOptNative `protobuf:"bytes,8,rep,name=Field8,json=field8" json:"Field8,omitempty"` + Field13 []bool `protobuf:"varint,13,rep,name=Field13,json=field13" json:"Field13,omitempty"` + Field14 []string `protobuf:"bytes,14,rep,name=Field14,json=field14" json:"Field14,omitempty"` + Field15 [][]byte `protobuf:"bytes,15,rep,name=Field15,json=field15" json:"Field15,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *NinRepStruct) Reset() { *m = NinRepStruct{} } +func (*NinRepStruct) ProtoMessage() {} +func (*NinRepStruct) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{9} } + +type NidEmbeddedStruct struct { + *NidOptNative `protobuf:"bytes,1,opt,name=Field1,json=field1,embedded=Field1" json:"Field1,omitempty"` + Field200 NidOptNative `protobuf:"bytes,200,opt,name=Field200,json=field200" json:"Field200"` + Field210 bool `protobuf:"varint,210,opt,name=Field210,json=field210" json:"Field210"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *NidEmbeddedStruct) Reset() { *m = NidEmbeddedStruct{} } +func (*NidEmbeddedStruct) ProtoMessage() {} +func (*NidEmbeddedStruct) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{10} } + +type NinEmbeddedStruct struct { + *NidOptNative `protobuf:"bytes,1,opt,name=Field1,json=field1,embedded=Field1" json:"Field1,omitempty"` + Field200 *NidOptNative `protobuf:"bytes,200,opt,name=Field200,json=field200" json:"Field200,omitempty"` + Field210 *bool `protobuf:"varint,210,opt,name=Field210,json=field210" json:"Field210,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *NinEmbeddedStruct) Reset() { *m = NinEmbeddedStruct{} } +func (*NinEmbeddedStruct) ProtoMessage() {} +func (*NinEmbeddedStruct) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{11} } + +type NidNestedStruct struct { + Field1 NidOptStruct `protobuf:"bytes,1,opt,name=Field1,json=field1" json:"Field1"` + Field2 []NidRepStruct `protobuf:"bytes,2,rep,name=Field2,json=field2" json:"Field2"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *NidNestedStruct) Reset() { *m = NidNestedStruct{} } +func (*NidNestedStruct) ProtoMessage() {} +func (*NidNestedStruct) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{12} } + +type NinNestedStruct struct { + Field1 *NinOptStruct `protobuf:"bytes,1,opt,name=Field1,json=field1" json:"Field1,omitempty"` + Field2 []*NinRepStruct `protobuf:"bytes,2,rep,name=Field2,json=field2" json:"Field2,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *NinNestedStruct) Reset() { *m = NinNestedStruct{} } +func (*NinNestedStruct) ProtoMessage() {} +func (*NinNestedStruct) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{13} } + +type NidOptCustom struct { + Id Uuid `protobuf:"bytes,1,opt,name=Id,json=id,customtype=Uuid" json:"Id"` + Value github_com_gogo_protobuf_test_custom.Uint128 `protobuf:"bytes,2,opt,name=Value,json=value,customtype=github.com/gogo/protobuf/test/custom.Uint128" json:"Value"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *NidOptCustom) Reset() { *m = NidOptCustom{} } +func (*NidOptCustom) ProtoMessage() {} +func (*NidOptCustom) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{14} } + +type CustomDash struct { + Value *github_com_gogo_protobuf_test_custom_dash_type.Bytes `protobuf:"bytes,1,opt,name=Value,json=value,customtype=github.com/gogo/protobuf/test/custom-dash-type.Bytes" json:"Value,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *CustomDash) Reset() { *m = CustomDash{} } +func (*CustomDash) ProtoMessage() {} +func (*CustomDash) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{15} } + +type NinOptCustom struct { + Id *Uuid `protobuf:"bytes,1,opt,name=Id,json=id,customtype=Uuid" json:"Id,omitempty"` + Value *github_com_gogo_protobuf_test_custom.Uint128 `protobuf:"bytes,2,opt,name=Value,json=value,customtype=github.com/gogo/protobuf/test/custom.Uint128" json:"Value,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *NinOptCustom) Reset() { *m = NinOptCustom{} } +func (*NinOptCustom) ProtoMessage() {} +func (*NinOptCustom) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{16} } + +type NidRepCustom struct { + Id []Uuid `protobuf:"bytes,1,rep,name=Id,json=id,customtype=Uuid" json:"Id"` + Value []github_com_gogo_protobuf_test_custom.Uint128 `protobuf:"bytes,2,rep,name=Value,json=value,customtype=github.com/gogo/protobuf/test/custom.Uint128" json:"Value"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *NidRepCustom) Reset() { *m = NidRepCustom{} } +func (*NidRepCustom) ProtoMessage() {} +func (*NidRepCustom) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{17} } + +type NinRepCustom struct { + Id []Uuid `protobuf:"bytes,1,rep,name=Id,json=id,customtype=Uuid" json:"Id,omitempty"` + Value []github_com_gogo_protobuf_test_custom.Uint128 `protobuf:"bytes,2,rep,name=Value,json=value,customtype=github.com/gogo/protobuf/test/custom.Uint128" json:"Value,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *NinRepCustom) Reset() { *m = NinRepCustom{} } +func (*NinRepCustom) ProtoMessage() {} +func (*NinRepCustom) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{18} } + +type NinOptNativeUnion struct { + Field1 *float64 `protobuf:"fixed64,1,opt,name=Field1,json=field1" json:"Field1,omitempty"` + Field2 *float32 `protobuf:"fixed32,2,opt,name=Field2,json=field2" json:"Field2,omitempty"` + Field3 *int32 `protobuf:"varint,3,opt,name=Field3,json=field3" json:"Field3,omitempty"` + Field4 *int64 `protobuf:"varint,4,opt,name=Field4,json=field4" json:"Field4,omitempty"` + Field5 *uint32 `protobuf:"varint,5,opt,name=Field5,json=field5" json:"Field5,omitempty"` + Field6 *uint64 `protobuf:"varint,6,opt,name=Field6,json=field6" json:"Field6,omitempty"` + Field13 *bool `protobuf:"varint,13,opt,name=Field13,json=field13" json:"Field13,omitempty"` + Field14 *string `protobuf:"bytes,14,opt,name=Field14,json=field14" json:"Field14,omitempty"` + Field15 []byte `protobuf:"bytes,15,opt,name=Field15,json=field15" json:"Field15,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *NinOptNativeUnion) Reset() { *m = NinOptNativeUnion{} } +func (*NinOptNativeUnion) ProtoMessage() {} +func (*NinOptNativeUnion) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{19} } + +type NinOptStructUnion struct { + Field1 *float64 `protobuf:"fixed64,1,opt,name=Field1,json=field1" json:"Field1,omitempty"` + Field2 *float32 `protobuf:"fixed32,2,opt,name=Field2,json=field2" json:"Field2,omitempty"` + Field3 *NidOptNative `protobuf:"bytes,3,opt,name=Field3,json=field3" json:"Field3,omitempty"` + Field4 *NinOptNative `protobuf:"bytes,4,opt,name=Field4,json=field4" json:"Field4,omitempty"` + Field6 *uint64 `protobuf:"varint,6,opt,name=Field6,json=field6" json:"Field6,omitempty"` + Field7 *int32 `protobuf:"zigzag32,7,opt,name=Field7,json=field7" json:"Field7,omitempty"` + Field13 *bool `protobuf:"varint,13,opt,name=Field13,json=field13" json:"Field13,omitempty"` + Field14 *string `protobuf:"bytes,14,opt,name=Field14,json=field14" json:"Field14,omitempty"` + Field15 []byte `protobuf:"bytes,15,opt,name=Field15,json=field15" json:"Field15,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *NinOptStructUnion) Reset() { *m = NinOptStructUnion{} } +func (*NinOptStructUnion) ProtoMessage() {} +func (*NinOptStructUnion) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{20} } + +type NinEmbeddedStructUnion struct { + *NidOptNative `protobuf:"bytes,1,opt,name=Field1,json=field1,embedded=Field1" json:"Field1,omitempty"` + Field200 *NinOptNative `protobuf:"bytes,200,opt,name=Field200,json=field200" json:"Field200,omitempty"` + Field210 *bool `protobuf:"varint,210,opt,name=Field210,json=field210" json:"Field210,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *NinEmbeddedStructUnion) Reset() { *m = NinEmbeddedStructUnion{} } +func (*NinEmbeddedStructUnion) ProtoMessage() {} +func (*NinEmbeddedStructUnion) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{21} } + +type NinNestedStructUnion struct { + Field1 *NinOptNativeUnion `protobuf:"bytes,1,opt,name=Field1,json=field1" json:"Field1,omitempty"` + Field2 *NinOptStructUnion `protobuf:"bytes,2,opt,name=Field2,json=field2" json:"Field2,omitempty"` + Field3 *NinEmbeddedStructUnion `protobuf:"bytes,3,opt,name=Field3,json=field3" json:"Field3,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *NinNestedStructUnion) Reset() { *m = NinNestedStructUnion{} } +func (*NinNestedStructUnion) ProtoMessage() {} +func (*NinNestedStructUnion) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{22} } + +type Tree struct { + Or *OrBranch `protobuf:"bytes,1,opt,name=Or,json=or" json:"Or,omitempty"` + And *AndBranch `protobuf:"bytes,2,opt,name=And,json=and" json:"And,omitempty"` + Leaf *Leaf `protobuf:"bytes,3,opt,name=Leaf,json=leaf" json:"Leaf,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *Tree) Reset() { *m = Tree{} } +func (*Tree) ProtoMessage() {} +func (*Tree) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{23} } + +type OrBranch struct { + Left Tree `protobuf:"bytes,1,opt,name=Left,json=left" json:"Left"` + Right Tree `protobuf:"bytes,2,opt,name=Right,json=right" json:"Right"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *OrBranch) Reset() { *m = OrBranch{} } +func (*OrBranch) ProtoMessage() {} +func (*OrBranch) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{24} } + +type AndBranch struct { + Left Tree `protobuf:"bytes,1,opt,name=Left,json=left" json:"Left"` + Right Tree `protobuf:"bytes,2,opt,name=Right,json=right" json:"Right"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *AndBranch) Reset() { *m = AndBranch{} } +func (*AndBranch) ProtoMessage() {} +func (*AndBranch) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{25} } + +type Leaf struct { + Value int64 `protobuf:"varint,1,opt,name=Value,json=value" json:"Value"` + StrValue string `protobuf:"bytes,2,opt,name=StrValue,json=strValue" json:"StrValue"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *Leaf) Reset() { *m = Leaf{} } +func (*Leaf) ProtoMessage() {} +func (*Leaf) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{26} } + +type DeepTree struct { + Down *ADeepBranch `protobuf:"bytes,1,opt,name=Down,json=down" json:"Down,omitempty"` + And *AndDeepBranch `protobuf:"bytes,2,opt,name=And,json=and" json:"And,omitempty"` + Leaf *DeepLeaf `protobuf:"bytes,3,opt,name=Leaf,json=leaf" json:"Leaf,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *DeepTree) Reset() { *m = DeepTree{} } +func (*DeepTree) ProtoMessage() {} +func (*DeepTree) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{27} } + +type ADeepBranch struct { + Down DeepTree `protobuf:"bytes,2,opt,name=Down,json=down" json:"Down"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *ADeepBranch) Reset() { *m = ADeepBranch{} } +func (*ADeepBranch) ProtoMessage() {} +func (*ADeepBranch) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{28} } + +type AndDeepBranch struct { + Left DeepTree `protobuf:"bytes,1,opt,name=Left,json=left" json:"Left"` + Right DeepTree `protobuf:"bytes,2,opt,name=Right,json=right" json:"Right"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *AndDeepBranch) Reset() { *m = AndDeepBranch{} } +func (*AndDeepBranch) ProtoMessage() {} +func (*AndDeepBranch) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{29} } + +type DeepLeaf struct { + Tree Tree `protobuf:"bytes,1,opt,name=Tree,json=tree" json:"Tree"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *DeepLeaf) Reset() { *m = DeepLeaf{} } +func (*DeepLeaf) ProtoMessage() {} +func (*DeepLeaf) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{30} } + +type Nil struct { + XXX_unrecognized []byte `json:"-"` +} + +func (m *Nil) Reset() { *m = Nil{} } +func (*Nil) ProtoMessage() {} +func (*Nil) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{31} } + +type NidOptEnum struct { + Field1 TheTestEnum `protobuf:"varint,1,opt,name=Field1,json=field1,enum=test.TheTestEnum" json:"Field1"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *NidOptEnum) Reset() { *m = NidOptEnum{} } +func (*NidOptEnum) ProtoMessage() {} +func (*NidOptEnum) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{32} } + +type NinOptEnum struct { + Field1 *TheTestEnum `protobuf:"varint,1,opt,name=Field1,json=field1,enum=test.TheTestEnum" json:"Field1,omitempty"` + Field2 *YetAnotherTestEnum `protobuf:"varint,2,opt,name=Field2,json=field2,enum=test.YetAnotherTestEnum" json:"Field2,omitempty"` + Field3 *YetYetAnotherTestEnum `protobuf:"varint,3,opt,name=Field3,json=field3,enum=test.YetYetAnotherTestEnum" json:"Field3,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *NinOptEnum) Reset() { *m = NinOptEnum{} } +func (*NinOptEnum) ProtoMessage() {} +func (*NinOptEnum) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{33} } + +type NidRepEnum struct { + Field1 []TheTestEnum `protobuf:"varint,1,rep,name=Field1,json=field1,enum=test.TheTestEnum" json:"Field1,omitempty"` + Field2 []YetAnotherTestEnum `protobuf:"varint,2,rep,name=Field2,json=field2,enum=test.YetAnotherTestEnum" json:"Field2,omitempty"` + Field3 []YetYetAnotherTestEnum `protobuf:"varint,3,rep,name=Field3,json=field3,enum=test.YetYetAnotherTestEnum" json:"Field3,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *NidRepEnum) Reset() { *m = NidRepEnum{} } +func (*NidRepEnum) ProtoMessage() {} +func (*NidRepEnum) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{34} } + +type NinRepEnum struct { + Field1 []TheTestEnum `protobuf:"varint,1,rep,name=Field1,json=field1,enum=test.TheTestEnum" json:"Field1,omitempty"` + Field2 []YetAnotherTestEnum `protobuf:"varint,2,rep,name=Field2,json=field2,enum=test.YetAnotherTestEnum" json:"Field2,omitempty"` + Field3 []YetYetAnotherTestEnum `protobuf:"varint,3,rep,name=Field3,json=field3,enum=test.YetYetAnotherTestEnum" json:"Field3,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *NinRepEnum) Reset() { *m = NinRepEnum{} } +func (*NinRepEnum) ProtoMessage() {} +func (*NinRepEnum) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{35} } + +type NinOptEnumDefault struct { + Field1 *TheTestEnum `protobuf:"varint,1,opt,name=Field1,json=field1,enum=test.TheTestEnum,def=2" json:"Field1,omitempty"` + Field2 *YetAnotherTestEnum `protobuf:"varint,2,opt,name=Field2,json=field2,enum=test.YetAnotherTestEnum,def=1" json:"Field2,omitempty"` + Field3 *YetYetAnotherTestEnum `protobuf:"varint,3,opt,name=Field3,json=field3,enum=test.YetYetAnotherTestEnum,def=0" json:"Field3,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *NinOptEnumDefault) Reset() { *m = NinOptEnumDefault{} } +func (*NinOptEnumDefault) ProtoMessage() {} +func (*NinOptEnumDefault) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{36} } + +const Default_NinOptEnumDefault_Field1 TheTestEnum = C +const Default_NinOptEnumDefault_Field2 YetAnotherTestEnum = BetterYetBB +const Default_NinOptEnumDefault_Field3 YetYetAnotherTestEnum = YetYetAnotherTestEnum_CC + +func (m *NinOptEnumDefault) GetField1() TheTestEnum { + if m != nil && m.Field1 != nil { + return *m.Field1 + } + return Default_NinOptEnumDefault_Field1 +} + +func (m *NinOptEnumDefault) GetField2() YetAnotherTestEnum { + if m != nil && m.Field2 != nil { + return *m.Field2 + } + return Default_NinOptEnumDefault_Field2 +} + +func (m *NinOptEnumDefault) GetField3() YetYetAnotherTestEnum { + if m != nil && m.Field3 != nil { + return *m.Field3 + } + return Default_NinOptEnumDefault_Field3 +} + +type AnotherNinOptEnum struct { + Field1 *AnotherTestEnum `protobuf:"varint,1,opt,name=Field1,json=field1,enum=test.AnotherTestEnum" json:"Field1,omitempty"` + Field2 *YetAnotherTestEnum `protobuf:"varint,2,opt,name=Field2,json=field2,enum=test.YetAnotherTestEnum" json:"Field2,omitempty"` + Field3 *YetYetAnotherTestEnum `protobuf:"varint,3,opt,name=Field3,json=field3,enum=test.YetYetAnotherTestEnum" json:"Field3,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *AnotherNinOptEnum) Reset() { *m = AnotherNinOptEnum{} } +func (*AnotherNinOptEnum) ProtoMessage() {} +func (*AnotherNinOptEnum) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{37} } + +type AnotherNinOptEnumDefault struct { + Field1 *AnotherTestEnum `protobuf:"varint,1,opt,name=Field1,json=field1,enum=test.AnotherTestEnum,def=11" json:"Field1,omitempty"` + Field2 *YetAnotherTestEnum `protobuf:"varint,2,opt,name=Field2,json=field2,enum=test.YetAnotherTestEnum,def=1" json:"Field2,omitempty"` + Field3 *YetYetAnotherTestEnum `protobuf:"varint,3,opt,name=Field3,json=field3,enum=test.YetYetAnotherTestEnum,def=0" json:"Field3,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *AnotherNinOptEnumDefault) Reset() { *m = AnotherNinOptEnumDefault{} } +func (*AnotherNinOptEnumDefault) ProtoMessage() {} +func (*AnotherNinOptEnumDefault) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{38} } + +const Default_AnotherNinOptEnumDefault_Field1 AnotherTestEnum = E +const Default_AnotherNinOptEnumDefault_Field2 YetAnotherTestEnum = BetterYetBB +const Default_AnotherNinOptEnumDefault_Field3 YetYetAnotherTestEnum = YetYetAnotherTestEnum_CC + +func (m *AnotherNinOptEnumDefault) GetField1() AnotherTestEnum { + if m != nil && m.Field1 != nil { + return *m.Field1 + } + return Default_AnotherNinOptEnumDefault_Field1 +} + +func (m *AnotherNinOptEnumDefault) GetField2() YetAnotherTestEnum { + if m != nil && m.Field2 != nil { + return *m.Field2 + } + return Default_AnotherNinOptEnumDefault_Field2 +} + +func (m *AnotherNinOptEnumDefault) GetField3() YetYetAnotherTestEnum { + if m != nil && m.Field3 != nil { + return *m.Field3 + } + return Default_AnotherNinOptEnumDefault_Field3 +} + +type Timer struct { + Time1 int64 `protobuf:"fixed64,1,opt,name=Time1,json=time1" json:"Time1"` + Time2 int64 `protobuf:"fixed64,2,opt,name=Time2,json=time2" json:"Time2"` + Data []byte `protobuf:"bytes,3,opt,name=Data,json=data" json:"Data"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *Timer) Reset() { *m = Timer{} } +func (*Timer) ProtoMessage() {} +func (*Timer) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{39} } + +type MyExtendable struct { + Field1 *int64 `protobuf:"varint,1,opt,name=Field1,json=field1" json:"Field1,omitempty"` + XXX_extensions map[int32]proto.Extension `json:"-"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *MyExtendable) Reset() { *m = MyExtendable{} } +func (*MyExtendable) ProtoMessage() {} +func (*MyExtendable) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{40} } + +var extRange_MyExtendable = []proto.ExtensionRange{ + {100, 199}, +} + +func (*MyExtendable) ExtensionRangeArray() []proto.ExtensionRange { + return extRange_MyExtendable +} +func (m *MyExtendable) ExtensionMap() map[int32]proto.Extension { + if m.XXX_extensions == nil { + m.XXX_extensions = make(map[int32]proto.Extension) + } + return m.XXX_extensions +} + +type OtherExtenable struct { + Field2 *int64 `protobuf:"varint,2,opt,name=Field2,json=field2" json:"Field2,omitempty"` + Field13 *int64 `protobuf:"varint,13,opt,name=Field13,json=field13" json:"Field13,omitempty"` + M *MyExtendable `protobuf:"bytes,1,opt,name=M,json=m" json:"M,omitempty"` + XXX_extensions map[int32]proto.Extension `json:"-"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *OtherExtenable) Reset() { *m = OtherExtenable{} } +func (*OtherExtenable) ProtoMessage() {} +func (*OtherExtenable) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{41} } + +var extRange_OtherExtenable = []proto.ExtensionRange{ + {14, 16}, + {10, 12}, +} + +func (*OtherExtenable) ExtensionRangeArray() []proto.ExtensionRange { + return extRange_OtherExtenable +} +func (m *OtherExtenable) ExtensionMap() map[int32]proto.Extension { + if m.XXX_extensions == nil { + m.XXX_extensions = make(map[int32]proto.Extension) + } + return m.XXX_extensions +} + +type NestedDefinition struct { + Field1 *int64 `protobuf:"varint,1,opt,name=Field1,json=field1" json:"Field1,omitempty"` + EnumField *NestedDefinition_NestedEnum `protobuf:"varint,2,opt,name=EnumField,json=enumField,enum=test.NestedDefinition_NestedEnum" json:"EnumField,omitempty"` + NNM *NestedDefinition_NestedMessage_NestedNestedMsg `protobuf:"bytes,3,opt,name=NNM,json=nNM" json:"NNM,omitempty"` + NM *NestedDefinition_NestedMessage `protobuf:"bytes,4,opt,name=NM,json=nM" json:"NM,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *NestedDefinition) Reset() { *m = NestedDefinition{} } +func (*NestedDefinition) ProtoMessage() {} +func (*NestedDefinition) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{42} } + +type NestedDefinition_NestedMessage struct { + NestedField1 *uint64 `protobuf:"fixed64,1,opt,name=NestedField1,json=nestedField1" json:"NestedField1,omitempty"` + NNM *NestedDefinition_NestedMessage_NestedNestedMsg `protobuf:"bytes,2,opt,name=NNM,json=nNM" json:"NNM,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *NestedDefinition_NestedMessage) Reset() { *m = NestedDefinition_NestedMessage{} } +func (*NestedDefinition_NestedMessage) ProtoMessage() {} +func (*NestedDefinition_NestedMessage) Descriptor() ([]byte, []int) { + return fileDescriptorThetest, []int{42, 0} +} + +type NestedDefinition_NestedMessage_NestedNestedMsg struct { + NestedNestedField1 *string `protobuf:"bytes,10,opt,name=NestedNestedField1,json=nestedNestedField1" json:"NestedNestedField1,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *NestedDefinition_NestedMessage_NestedNestedMsg) Reset() { + *m = NestedDefinition_NestedMessage_NestedNestedMsg{} +} +func (*NestedDefinition_NestedMessage_NestedNestedMsg) ProtoMessage() {} +func (*NestedDefinition_NestedMessage_NestedNestedMsg) Descriptor() ([]byte, []int) { + return fileDescriptorThetest, []int{42, 0, 0} +} + +type NestedScope struct { + A *NestedDefinition_NestedMessage_NestedNestedMsg `protobuf:"bytes,1,opt,name=A,json=a" json:"A,omitempty"` + B *NestedDefinition_NestedEnum `protobuf:"varint,2,opt,name=B,json=b,enum=test.NestedDefinition_NestedEnum" json:"B,omitempty"` + C *NestedDefinition_NestedMessage `protobuf:"bytes,3,opt,name=C,json=c" json:"C,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *NestedScope) Reset() { *m = NestedScope{} } +func (*NestedScope) ProtoMessage() {} +func (*NestedScope) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{43} } + +type NinOptNativeDefault struct { + Field1 *float64 `protobuf:"fixed64,1,opt,name=Field1,json=field1,def=1234.1234" json:"Field1,omitempty"` + Field2 *float32 `protobuf:"fixed32,2,opt,name=Field2,json=field2,def=1234.1234" json:"Field2,omitempty"` + Field3 *int32 `protobuf:"varint,3,opt,name=Field3,json=field3,def=1234" json:"Field3,omitempty"` + Field4 *int64 `protobuf:"varint,4,opt,name=Field4,json=field4,def=1234" json:"Field4,omitempty"` + Field5 *uint32 `protobuf:"varint,5,opt,name=Field5,json=field5,def=1234" json:"Field5,omitempty"` + Field6 *uint64 `protobuf:"varint,6,opt,name=Field6,json=field6,def=1234" json:"Field6,omitempty"` + Field7 *int32 `protobuf:"zigzag32,7,opt,name=Field7,json=field7,def=1234" json:"Field7,omitempty"` + Field8 *int64 `protobuf:"zigzag64,8,opt,name=Field8,json=field8,def=1234" json:"Field8,omitempty"` + Field9 *uint32 `protobuf:"fixed32,9,opt,name=Field9,json=field9,def=1234" json:"Field9,omitempty"` + Field10 *int32 `protobuf:"fixed32,10,opt,name=Field10,json=field10,def=1234" json:"Field10,omitempty"` + Field11 *uint64 `protobuf:"fixed64,11,opt,name=Field11,json=field11,def=1234" json:"Field11,omitempty"` + Field12 *int64 `protobuf:"fixed64,12,opt,name=Field12,json=field12,def=1234" json:"Field12,omitempty"` + Field13 *bool `protobuf:"varint,13,opt,name=Field13,json=field13,def=1" json:"Field13,omitempty"` + Field14 *string `protobuf:"bytes,14,opt,name=Field14,json=field14,def=1234" json:"Field14,omitempty"` + Field15 []byte `protobuf:"bytes,15,opt,name=Field15,json=field15" json:"Field15,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *NinOptNativeDefault) Reset() { *m = NinOptNativeDefault{} } +func (*NinOptNativeDefault) ProtoMessage() {} +func (*NinOptNativeDefault) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{44} } + +const Default_NinOptNativeDefault_Field1 float64 = 1234.1234 +const Default_NinOptNativeDefault_Field2 float32 = 1234.1234 +const Default_NinOptNativeDefault_Field3 int32 = 1234 +const Default_NinOptNativeDefault_Field4 int64 = 1234 +const Default_NinOptNativeDefault_Field5 uint32 = 1234 +const Default_NinOptNativeDefault_Field6 uint64 = 1234 +const Default_NinOptNativeDefault_Field7 int32 = 1234 +const Default_NinOptNativeDefault_Field8 int64 = 1234 +const Default_NinOptNativeDefault_Field9 uint32 = 1234 +const Default_NinOptNativeDefault_Field10 int32 = 1234 +const Default_NinOptNativeDefault_Field11 uint64 = 1234 +const Default_NinOptNativeDefault_Field12 int64 = 1234 +const Default_NinOptNativeDefault_Field13 bool = true +const Default_NinOptNativeDefault_Field14 string = "1234" + +func (m *NinOptNativeDefault) GetField1() float64 { + if m != nil && m.Field1 != nil { + return *m.Field1 + } + return Default_NinOptNativeDefault_Field1 +} + +func (m *NinOptNativeDefault) GetField2() float32 { + if m != nil && m.Field2 != nil { + return *m.Field2 + } + return Default_NinOptNativeDefault_Field2 +} + +func (m *NinOptNativeDefault) GetField3() int32 { + if m != nil && m.Field3 != nil { + return *m.Field3 + } + return Default_NinOptNativeDefault_Field3 +} + +func (m *NinOptNativeDefault) GetField4() int64 { + if m != nil && m.Field4 != nil { + return *m.Field4 + } + return Default_NinOptNativeDefault_Field4 +} + +func (m *NinOptNativeDefault) GetField5() uint32 { + if m != nil && m.Field5 != nil { + return *m.Field5 + } + return Default_NinOptNativeDefault_Field5 +} + +func (m *NinOptNativeDefault) GetField6() uint64 { + if m != nil && m.Field6 != nil { + return *m.Field6 + } + return Default_NinOptNativeDefault_Field6 +} + +func (m *NinOptNativeDefault) GetField7() int32 { + if m != nil && m.Field7 != nil { + return *m.Field7 + } + return Default_NinOptNativeDefault_Field7 +} + +func (m *NinOptNativeDefault) GetField8() int64 { + if m != nil && m.Field8 != nil { + return *m.Field8 + } + return Default_NinOptNativeDefault_Field8 +} + +func (m *NinOptNativeDefault) GetField9() uint32 { + if m != nil && m.Field9 != nil { + return *m.Field9 + } + return Default_NinOptNativeDefault_Field9 +} + +func (m *NinOptNativeDefault) GetField10() int32 { + if m != nil && m.Field10 != nil { + return *m.Field10 + } + return Default_NinOptNativeDefault_Field10 +} + +func (m *NinOptNativeDefault) GetField11() uint64 { + if m != nil && m.Field11 != nil { + return *m.Field11 + } + return Default_NinOptNativeDefault_Field11 +} + +func (m *NinOptNativeDefault) GetField12() int64 { + if m != nil && m.Field12 != nil { + return *m.Field12 + } + return Default_NinOptNativeDefault_Field12 +} + +func (m *NinOptNativeDefault) GetField13() bool { + if m != nil && m.Field13 != nil { + return *m.Field13 + } + return Default_NinOptNativeDefault_Field13 +} + +func (m *NinOptNativeDefault) GetField14() string { + if m != nil && m.Field14 != nil { + return *m.Field14 + } + return Default_NinOptNativeDefault_Field14 +} + +func (m *NinOptNativeDefault) GetField15() []byte { + if m != nil { + return m.Field15 + } + return nil +} + +type CustomContainer struct { + CustomStruct NidOptCustom `protobuf:"bytes,1,opt,name=CustomStruct,json=customStruct" json:"CustomStruct"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *CustomContainer) Reset() { *m = CustomContainer{} } +func (*CustomContainer) ProtoMessage() {} +func (*CustomContainer) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{45} } + +type CustomNameNidOptNative struct { + FieldA float64 `protobuf:"fixed64,1,opt,name=Field1,json=field1" json:"Field1"` + FieldB float32 `protobuf:"fixed32,2,opt,name=Field2,json=field2" json:"Field2"` + FieldC int32 `protobuf:"varint,3,opt,name=Field3,json=field3" json:"Field3"` + FieldD int64 `protobuf:"varint,4,opt,name=Field4,json=field4" json:"Field4"` + FieldE uint32 `protobuf:"varint,5,opt,name=Field5,json=field5" json:"Field5"` + FieldF uint64 `protobuf:"varint,6,opt,name=Field6,json=field6" json:"Field6"` + FieldG int32 `protobuf:"zigzag32,7,opt,name=Field7,json=field7" json:"Field7"` + FieldH int64 `protobuf:"zigzag64,8,opt,name=Field8,json=field8" json:"Field8"` + FieldI uint32 `protobuf:"fixed32,9,opt,name=Field9,json=field9" json:"Field9"` + FieldJ int32 `protobuf:"fixed32,10,opt,name=Field10,json=field10" json:"Field10"` + FieldK uint64 `protobuf:"fixed64,11,opt,name=Field11,json=field11" json:"Field11"` + FieldL int64 `protobuf:"fixed64,12,opt,name=Field12,json=field12" json:"Field12"` + FieldM bool `protobuf:"varint,13,opt,name=Field13,json=field13" json:"Field13"` + FieldN string `protobuf:"bytes,14,opt,name=Field14,json=field14" json:"Field14"` + FieldO []byte `protobuf:"bytes,15,opt,name=Field15,json=field15" json:"Field15"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *CustomNameNidOptNative) Reset() { *m = CustomNameNidOptNative{} } +func (*CustomNameNidOptNative) ProtoMessage() {} +func (*CustomNameNidOptNative) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{46} } + +type CustomNameNinOptNative struct { + FieldA *float64 `protobuf:"fixed64,1,opt,name=Field1,json=field1" json:"Field1,omitempty"` + FieldB *float32 `protobuf:"fixed32,2,opt,name=Field2,json=field2" json:"Field2,omitempty"` + FieldC *int32 `protobuf:"varint,3,opt,name=Field3,json=field3" json:"Field3,omitempty"` + FieldD *int64 `protobuf:"varint,4,opt,name=Field4,json=field4" json:"Field4,omitempty"` + FieldE *uint32 `protobuf:"varint,5,opt,name=Field5,json=field5" json:"Field5,omitempty"` + FieldF *uint64 `protobuf:"varint,6,opt,name=Field6,json=field6" json:"Field6,omitempty"` + FieldG *int32 `protobuf:"zigzag32,7,opt,name=Field7,json=field7" json:"Field7,omitempty"` + FieldH *int64 `protobuf:"zigzag64,8,opt,name=Field8,json=field8" json:"Field8,omitempty"` + FieldI *uint32 `protobuf:"fixed32,9,opt,name=Field9,json=field9" json:"Field9,omitempty"` + FieldJ *int32 `protobuf:"fixed32,10,opt,name=Field10,json=field10" json:"Field10,omitempty"` + FieldK *uint64 `protobuf:"fixed64,11,opt,name=Field11,json=field11" json:"Field11,omitempty"` + FielL *int64 `protobuf:"fixed64,12,opt,name=Field12,json=field12" json:"Field12,omitempty"` + FieldM *bool `protobuf:"varint,13,opt,name=Field13,json=field13" json:"Field13,omitempty"` + FieldN *string `protobuf:"bytes,14,opt,name=Field14,json=field14" json:"Field14,omitempty"` + FieldO []byte `protobuf:"bytes,15,opt,name=Field15,json=field15" json:"Field15,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *CustomNameNinOptNative) Reset() { *m = CustomNameNinOptNative{} } +func (*CustomNameNinOptNative) ProtoMessage() {} +func (*CustomNameNinOptNative) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{47} } + +type CustomNameNinRepNative struct { + FieldA []float64 `protobuf:"fixed64,1,rep,name=Field1,json=field1" json:"Field1,omitempty"` + FieldB []float32 `protobuf:"fixed32,2,rep,name=Field2,json=field2" json:"Field2,omitempty"` + FieldC []int32 `protobuf:"varint,3,rep,name=Field3,json=field3" json:"Field3,omitempty"` + FieldD []int64 `protobuf:"varint,4,rep,name=Field4,json=field4" json:"Field4,omitempty"` + FieldE []uint32 `protobuf:"varint,5,rep,name=Field5,json=field5" json:"Field5,omitempty"` + FieldF []uint64 `protobuf:"varint,6,rep,name=Field6,json=field6" json:"Field6,omitempty"` + FieldG []int32 `protobuf:"zigzag32,7,rep,name=Field7,json=field7" json:"Field7,omitempty"` + FieldH []int64 `protobuf:"zigzag64,8,rep,name=Field8,json=field8" json:"Field8,omitempty"` + FieldI []uint32 `protobuf:"fixed32,9,rep,name=Field9,json=field9" json:"Field9,omitempty"` + FieldJ []int32 `protobuf:"fixed32,10,rep,name=Field10,json=field10" json:"Field10,omitempty"` + FieldK []uint64 `protobuf:"fixed64,11,rep,name=Field11,json=field11" json:"Field11,omitempty"` + FieldL []int64 `protobuf:"fixed64,12,rep,name=Field12,json=field12" json:"Field12,omitempty"` + FieldM []bool `protobuf:"varint,13,rep,name=Field13,json=field13" json:"Field13,omitempty"` + FieldN []string `protobuf:"bytes,14,rep,name=Field14,json=field14" json:"Field14,omitempty"` + FieldO [][]byte `protobuf:"bytes,15,rep,name=Field15,json=field15" json:"Field15,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *CustomNameNinRepNative) Reset() { *m = CustomNameNinRepNative{} } +func (*CustomNameNinRepNative) ProtoMessage() {} +func (*CustomNameNinRepNative) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{48} } + +type CustomNameNinStruct struct { + FieldA *float64 `protobuf:"fixed64,1,opt,name=Field1,json=field1" json:"Field1,omitempty"` + FieldB *float32 `protobuf:"fixed32,2,opt,name=Field2,json=field2" json:"Field2,omitempty"` + FieldC *NidOptNative `protobuf:"bytes,3,opt,name=Field3,json=field3" json:"Field3,omitempty"` + FieldD []*NinOptNative `protobuf:"bytes,4,rep,name=Field4,json=field4" json:"Field4,omitempty"` + FieldE *uint64 `protobuf:"varint,6,opt,name=Field6,json=field6" json:"Field6,omitempty"` + FieldF *int32 `protobuf:"zigzag32,7,opt,name=Field7,json=field7" json:"Field7,omitempty"` + FieldG *NidOptNative `protobuf:"bytes,8,opt,name=Field8,json=field8" json:"Field8,omitempty"` + FieldH *bool `protobuf:"varint,13,opt,name=Field13,json=field13" json:"Field13,omitempty"` + FieldI *string `protobuf:"bytes,14,opt,name=Field14,json=field14" json:"Field14,omitempty"` + FieldJ []byte `protobuf:"bytes,15,opt,name=Field15,json=field15" json:"Field15,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *CustomNameNinStruct) Reset() { *m = CustomNameNinStruct{} } +func (*CustomNameNinStruct) ProtoMessage() {} +func (*CustomNameNinStruct) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{49} } + +type CustomNameCustomType struct { + FieldA *Uuid `protobuf:"bytes,1,opt,name=Id,json=id,customtype=Uuid" json:"Id,omitempty"` + FieldB *github_com_gogo_protobuf_test_custom.Uint128 `protobuf:"bytes,2,opt,name=Value,json=value,customtype=github.com/gogo/protobuf/test/custom.Uint128" json:"Value,omitempty"` + FieldC []Uuid `protobuf:"bytes,3,rep,name=Ids,json=ids,customtype=Uuid" json:"Ids,omitempty"` + FieldD []github_com_gogo_protobuf_test_custom.Uint128 `protobuf:"bytes,4,rep,name=Values,json=values,customtype=github.com/gogo/protobuf/test/custom.Uint128" json:"Values,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *CustomNameCustomType) Reset() { *m = CustomNameCustomType{} } +func (*CustomNameCustomType) ProtoMessage() {} +func (*CustomNameCustomType) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{50} } + +type CustomNameNinEmbeddedStructUnion struct { + *NidOptNative `protobuf:"bytes,1,opt,name=Field1,json=field1,embedded=Field1" json:"Field1,omitempty"` + FieldA *NinOptNative `protobuf:"bytes,200,opt,name=Field200,json=field200" json:"Field200,omitempty"` + FieldB *bool `protobuf:"varint,210,opt,name=Field210,json=field210" json:"Field210,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *CustomNameNinEmbeddedStructUnion) Reset() { *m = CustomNameNinEmbeddedStructUnion{} } +func (*CustomNameNinEmbeddedStructUnion) ProtoMessage() {} +func (*CustomNameNinEmbeddedStructUnion) Descriptor() ([]byte, []int) { + return fileDescriptorThetest, []int{51} +} + +type CustomNameEnum struct { + FieldA *TheTestEnum `protobuf:"varint,1,opt,name=Field1,json=field1,enum=test.TheTestEnum" json:"Field1,omitempty"` + FieldB []TheTestEnum `protobuf:"varint,2,rep,name=Field2,json=field2,enum=test.TheTestEnum" json:"Field2,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *CustomNameEnum) Reset() { *m = CustomNameEnum{} } +func (*CustomNameEnum) ProtoMessage() {} +func (*CustomNameEnum) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{52} } + +type NoExtensionsMap struct { + Field1 *int64 `protobuf:"varint,1,opt,name=Field1,json=field1" json:"Field1,omitempty"` + XXX_extensions []byte `protobuf:"bytes,0,opt" json:"-"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *NoExtensionsMap) Reset() { *m = NoExtensionsMap{} } +func (*NoExtensionsMap) ProtoMessage() {} +func (*NoExtensionsMap) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{53} } + +var extRange_NoExtensionsMap = []proto.ExtensionRange{ + {100, 199}, +} + +func (*NoExtensionsMap) ExtensionRangeArray() []proto.ExtensionRange { + return extRange_NoExtensionsMap +} +func (m *NoExtensionsMap) GetExtensions() *[]byte { + if m.XXX_extensions == nil { + m.XXX_extensions = make([]byte, 0) + } + return &m.XXX_extensions +} + +type Unrecognized struct { + Field1 *string `protobuf:"bytes,1,opt,name=Field1,json=field1" json:"Field1,omitempty"` +} + +func (m *Unrecognized) Reset() { *m = Unrecognized{} } +func (*Unrecognized) ProtoMessage() {} +func (*Unrecognized) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{54} } + +type UnrecognizedWithInner struct { + Embedded []*UnrecognizedWithInner_Inner `protobuf:"bytes,1,rep,name=embedded" json:"embedded,omitempty"` + Field2 *string `protobuf:"bytes,2,opt,name=Field2,json=field2" json:"Field2,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *UnrecognizedWithInner) Reset() { *m = UnrecognizedWithInner{} } +func (*UnrecognizedWithInner) ProtoMessage() {} +func (*UnrecognizedWithInner) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{55} } + +type UnrecognizedWithInner_Inner struct { + Field1 *uint32 `protobuf:"varint,1,opt,name=Field1,json=field1" json:"Field1,omitempty"` +} + +func (m *UnrecognizedWithInner_Inner) Reset() { *m = UnrecognizedWithInner_Inner{} } +func (*UnrecognizedWithInner_Inner) ProtoMessage() {} +func (*UnrecognizedWithInner_Inner) Descriptor() ([]byte, []int) { + return fileDescriptorThetest, []int{55, 0} +} + +type UnrecognizedWithEmbed struct { + UnrecognizedWithEmbed_Embedded `protobuf:"bytes,1,opt,name=embedded,embedded=embedded" json:"embedded"` + Field2 *string `protobuf:"bytes,2,opt,name=Field2,json=field2" json:"Field2,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *UnrecognizedWithEmbed) Reset() { *m = UnrecognizedWithEmbed{} } +func (*UnrecognizedWithEmbed) ProtoMessage() {} +func (*UnrecognizedWithEmbed) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{56} } + +type UnrecognizedWithEmbed_Embedded struct { + Field1 *uint32 `protobuf:"varint,1,opt,name=Field1,json=field1" json:"Field1,omitempty"` +} + +func (m *UnrecognizedWithEmbed_Embedded) Reset() { *m = UnrecognizedWithEmbed_Embedded{} } +func (*UnrecognizedWithEmbed_Embedded) ProtoMessage() {} +func (*UnrecognizedWithEmbed_Embedded) Descriptor() ([]byte, []int) { + return fileDescriptorThetest, []int{56, 0} +} + +type Node struct { + Label *string `protobuf:"bytes,1,opt,name=Label,json=label" json:"Label,omitempty"` + Children []*Node `protobuf:"bytes,2,rep,name=Children,json=children" json:"Children,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *Node) Reset() { *m = Node{} } +func (*Node) ProtoMessage() {} +func (*Node) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{57} } + +var E_FieldA = &proto.ExtensionDesc{ + ExtendedType: (*MyExtendable)(nil), + ExtensionType: (*float64)(nil), + Field: 100, + Name: "test.FieldA", + Tag: "fixed64,100,opt,name=FieldA,json=fieldA", +} + +var E_FieldB = &proto.ExtensionDesc{ + ExtendedType: (*MyExtendable)(nil), + ExtensionType: (*NinOptNative)(nil), + Field: 101, + Name: "test.FieldB", + Tag: "bytes,101,opt,name=FieldB,json=fieldB", +} + +var E_FieldC = &proto.ExtensionDesc{ + ExtendedType: (*MyExtendable)(nil), + ExtensionType: (*NinEmbeddedStruct)(nil), + Field: 102, + Name: "test.FieldC", + Tag: "bytes,102,opt,name=FieldC,json=fieldC", +} + +var E_FieldD = &proto.ExtensionDesc{ + ExtendedType: (*MyExtendable)(nil), + ExtensionType: ([]int64)(nil), + Field: 104, + Name: "test.FieldD", + Tag: "varint,104,rep,name=FieldD,json=fieldD", +} + +var E_FieldE = &proto.ExtensionDesc{ + ExtendedType: (*MyExtendable)(nil), + ExtensionType: ([]*NinOptNative)(nil), + Field: 105, + Name: "test.FieldE", + Tag: "bytes,105,rep,name=FieldE,json=fieldE", +} + +var E_FieldA1 = &proto.ExtensionDesc{ + ExtendedType: (*NoExtensionsMap)(nil), + ExtensionType: (*float64)(nil), + Field: 100, + Name: "test.FieldA1", + Tag: "fixed64,100,opt,name=FieldA1,json=fieldA1", +} + +var E_FieldB1 = &proto.ExtensionDesc{ + ExtendedType: (*NoExtensionsMap)(nil), + ExtensionType: (*NinOptNative)(nil), + Field: 101, + Name: "test.FieldB1", + Tag: "bytes,101,opt,name=FieldB1,json=fieldB1", +} + +var E_FieldC1 = &proto.ExtensionDesc{ + ExtendedType: (*NoExtensionsMap)(nil), + ExtensionType: (*NinEmbeddedStruct)(nil), + Field: 102, + Name: "test.FieldC1", + Tag: "bytes,102,opt,name=FieldC1,json=fieldC1", +} + +func init() { + proto.RegisterType((*NidOptNative)(nil), "test.NidOptNative") + proto.RegisterType((*NinOptNative)(nil), "test.NinOptNative") + proto.RegisterType((*NidRepNative)(nil), "test.NidRepNative") + proto.RegisterType((*NinRepNative)(nil), "test.NinRepNative") + proto.RegisterType((*NidRepPackedNative)(nil), "test.NidRepPackedNative") + proto.RegisterType((*NinRepPackedNative)(nil), "test.NinRepPackedNative") + proto.RegisterType((*NidOptStruct)(nil), "test.NidOptStruct") + proto.RegisterType((*NinOptStruct)(nil), "test.NinOptStruct") + proto.RegisterType((*NidRepStruct)(nil), "test.NidRepStruct") + proto.RegisterType((*NinRepStruct)(nil), "test.NinRepStruct") + proto.RegisterType((*NidEmbeddedStruct)(nil), "test.NidEmbeddedStruct") + proto.RegisterType((*NinEmbeddedStruct)(nil), "test.NinEmbeddedStruct") + proto.RegisterType((*NidNestedStruct)(nil), "test.NidNestedStruct") + proto.RegisterType((*NinNestedStruct)(nil), "test.NinNestedStruct") + proto.RegisterType((*NidOptCustom)(nil), "test.NidOptCustom") + proto.RegisterType((*CustomDash)(nil), "test.CustomDash") + proto.RegisterType((*NinOptCustom)(nil), "test.NinOptCustom") + proto.RegisterType((*NidRepCustom)(nil), "test.NidRepCustom") + proto.RegisterType((*NinRepCustom)(nil), "test.NinRepCustom") + proto.RegisterType((*NinOptNativeUnion)(nil), "test.NinOptNativeUnion") + proto.RegisterType((*NinOptStructUnion)(nil), "test.NinOptStructUnion") + proto.RegisterType((*NinEmbeddedStructUnion)(nil), "test.NinEmbeddedStructUnion") + proto.RegisterType((*NinNestedStructUnion)(nil), "test.NinNestedStructUnion") + proto.RegisterType((*Tree)(nil), "test.Tree") + proto.RegisterType((*OrBranch)(nil), "test.OrBranch") + proto.RegisterType((*AndBranch)(nil), "test.AndBranch") + proto.RegisterType((*Leaf)(nil), "test.Leaf") + proto.RegisterType((*DeepTree)(nil), "test.DeepTree") + proto.RegisterType((*ADeepBranch)(nil), "test.ADeepBranch") + proto.RegisterType((*AndDeepBranch)(nil), "test.AndDeepBranch") + proto.RegisterType((*DeepLeaf)(nil), "test.DeepLeaf") + proto.RegisterType((*Nil)(nil), "test.Nil") + proto.RegisterType((*NidOptEnum)(nil), "test.NidOptEnum") + proto.RegisterType((*NinOptEnum)(nil), "test.NinOptEnum") + proto.RegisterType((*NidRepEnum)(nil), "test.NidRepEnum") + proto.RegisterType((*NinRepEnum)(nil), "test.NinRepEnum") + proto.RegisterType((*NinOptEnumDefault)(nil), "test.NinOptEnumDefault") + proto.RegisterType((*AnotherNinOptEnum)(nil), "test.AnotherNinOptEnum") + proto.RegisterType((*AnotherNinOptEnumDefault)(nil), "test.AnotherNinOptEnumDefault") + proto.RegisterType((*Timer)(nil), "test.Timer") + proto.RegisterType((*MyExtendable)(nil), "test.MyExtendable") + proto.RegisterType((*OtherExtenable)(nil), "test.OtherExtenable") + proto.RegisterType((*NestedDefinition)(nil), "test.NestedDefinition") + proto.RegisterType((*NestedDefinition_NestedMessage)(nil), "test.NestedDefinition.NestedMessage") + proto.RegisterType((*NestedDefinition_NestedMessage_NestedNestedMsg)(nil), "test.NestedDefinition.NestedMessage.NestedNestedMsg") + proto.RegisterType((*NestedScope)(nil), "test.NestedScope") + proto.RegisterType((*NinOptNativeDefault)(nil), "test.NinOptNativeDefault") + proto.RegisterType((*CustomContainer)(nil), "test.CustomContainer") + proto.RegisterType((*CustomNameNidOptNative)(nil), "test.CustomNameNidOptNative") + proto.RegisterType((*CustomNameNinOptNative)(nil), "test.CustomNameNinOptNative") + proto.RegisterType((*CustomNameNinRepNative)(nil), "test.CustomNameNinRepNative") + proto.RegisterType((*CustomNameNinStruct)(nil), "test.CustomNameNinStruct") + proto.RegisterType((*CustomNameCustomType)(nil), "test.CustomNameCustomType") + proto.RegisterType((*CustomNameNinEmbeddedStructUnion)(nil), "test.CustomNameNinEmbeddedStructUnion") + proto.RegisterType((*CustomNameEnum)(nil), "test.CustomNameEnum") + proto.RegisterType((*NoExtensionsMap)(nil), "test.NoExtensionsMap") + proto.RegisterType((*Unrecognized)(nil), "test.Unrecognized") + proto.RegisterType((*UnrecognizedWithInner)(nil), "test.UnrecognizedWithInner") + proto.RegisterType((*UnrecognizedWithInner_Inner)(nil), "test.UnrecognizedWithInner.Inner") + proto.RegisterType((*UnrecognizedWithEmbed)(nil), "test.UnrecognizedWithEmbed") + proto.RegisterType((*UnrecognizedWithEmbed_Embedded)(nil), "test.UnrecognizedWithEmbed.Embedded") + proto.RegisterType((*Node)(nil), "test.Node") + proto.RegisterEnum("test.TheTestEnum", TheTestEnum_name, TheTestEnum_value) + proto.RegisterEnum("test.AnotherTestEnum", AnotherTestEnum_name, AnotherTestEnum_value) + proto.RegisterEnum("test.YetAnotherTestEnum", YetAnotherTestEnum_name, YetAnotherTestEnum_value) + proto.RegisterEnum("test.YetYetAnotherTestEnum", YetYetAnotherTestEnum_name, YetYetAnotherTestEnum_value) + proto.RegisterEnum("test.NestedDefinition_NestedEnum", NestedDefinition_NestedEnum_name, NestedDefinition_NestedEnum_value) + proto.RegisterExtension(E_FieldA) + proto.RegisterExtension(E_FieldB) + proto.RegisterExtension(E_FieldC) + proto.RegisterExtension(E_FieldD) + proto.RegisterExtension(E_FieldE) + proto.RegisterExtension(E_FieldA1) + proto.RegisterExtension(E_FieldB1) + proto.RegisterExtension(E_FieldC1) +} +func (this *NidOptNative) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NidOptNative) + if !ok { + that2, ok := that.(NidOptNative) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.Field1 != that1.Field1 { + if this.Field1 < that1.Field1 { + return -1 + } + return 1 + } + if this.Field2 != that1.Field2 { + if this.Field2 < that1.Field2 { + return -1 + } + return 1 + } + if this.Field3 != that1.Field3 { + if this.Field3 < that1.Field3 { + return -1 + } + return 1 + } + if this.Field4 != that1.Field4 { + if this.Field4 < that1.Field4 { + return -1 + } + return 1 + } + if this.Field5 != that1.Field5 { + if this.Field5 < that1.Field5 { + return -1 + } + return 1 + } + if this.Field6 != that1.Field6 { + if this.Field6 < that1.Field6 { + return -1 + } + return 1 + } + if this.Field7 != that1.Field7 { + if this.Field7 < that1.Field7 { + return -1 + } + return 1 + } + if this.Field8 != that1.Field8 { + if this.Field8 < that1.Field8 { + return -1 + } + return 1 + } + if this.Field9 != that1.Field9 { + if this.Field9 < that1.Field9 { + return -1 + } + return 1 + } + if this.Field10 != that1.Field10 { + if this.Field10 < that1.Field10 { + return -1 + } + return 1 + } + if this.Field11 != that1.Field11 { + if this.Field11 < that1.Field11 { + return -1 + } + return 1 + } + if this.Field12 != that1.Field12 { + if this.Field12 < that1.Field12 { + return -1 + } + return 1 + } + if this.Field13 != that1.Field13 { + if !this.Field13 { + return -1 + } + return 1 + } + if this.Field14 != that1.Field14 { + if this.Field14 < that1.Field14 { + return -1 + } + return 1 + } + if c := bytes.Compare(this.Field15, that1.Field15); c != 0 { + return c + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NinOptNative) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NinOptNative) + if !ok { + that2, ok := that.(NinOptNative) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + if *this.Field1 < *that1.Field1 { + return -1 + } + return 1 + } + } else if this.Field1 != nil { + return 1 + } else if that1.Field1 != nil { + return -1 + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + if *this.Field2 < *that1.Field2 { + return -1 + } + return 1 + } + } else if this.Field2 != nil { + return 1 + } else if that1.Field2 != nil { + return -1 + } + if this.Field3 != nil && that1.Field3 != nil { + if *this.Field3 != *that1.Field3 { + if *this.Field3 < *that1.Field3 { + return -1 + } + return 1 + } + } else if this.Field3 != nil { + return 1 + } else if that1.Field3 != nil { + return -1 + } + if this.Field4 != nil && that1.Field4 != nil { + if *this.Field4 != *that1.Field4 { + if *this.Field4 < *that1.Field4 { + return -1 + } + return 1 + } + } else if this.Field4 != nil { + return 1 + } else if that1.Field4 != nil { + return -1 + } + if this.Field5 != nil && that1.Field5 != nil { + if *this.Field5 != *that1.Field5 { + if *this.Field5 < *that1.Field5 { + return -1 + } + return 1 + } + } else if this.Field5 != nil { + return 1 + } else if that1.Field5 != nil { + return -1 + } + if this.Field6 != nil && that1.Field6 != nil { + if *this.Field6 != *that1.Field6 { + if *this.Field6 < *that1.Field6 { + return -1 + } + return 1 + } + } else if this.Field6 != nil { + return 1 + } else if that1.Field6 != nil { + return -1 + } + if this.Field7 != nil && that1.Field7 != nil { + if *this.Field7 != *that1.Field7 { + if *this.Field7 < *that1.Field7 { + return -1 + } + return 1 + } + } else if this.Field7 != nil { + return 1 + } else if that1.Field7 != nil { + return -1 + } + if this.Field8 != nil && that1.Field8 != nil { + if *this.Field8 != *that1.Field8 { + if *this.Field8 < *that1.Field8 { + return -1 + } + return 1 + } + } else if this.Field8 != nil { + return 1 + } else if that1.Field8 != nil { + return -1 + } + if this.Field9 != nil && that1.Field9 != nil { + if *this.Field9 != *that1.Field9 { + if *this.Field9 < *that1.Field9 { + return -1 + } + return 1 + } + } else if this.Field9 != nil { + return 1 + } else if that1.Field9 != nil { + return -1 + } + if this.Field10 != nil && that1.Field10 != nil { + if *this.Field10 != *that1.Field10 { + if *this.Field10 < *that1.Field10 { + return -1 + } + return 1 + } + } else if this.Field10 != nil { + return 1 + } else if that1.Field10 != nil { + return -1 + } + if this.Field11 != nil && that1.Field11 != nil { + if *this.Field11 != *that1.Field11 { + if *this.Field11 < *that1.Field11 { + return -1 + } + return 1 + } + } else if this.Field11 != nil { + return 1 + } else if that1.Field11 != nil { + return -1 + } + if this.Field12 != nil && that1.Field12 != nil { + if *this.Field12 != *that1.Field12 { + if *this.Field12 < *that1.Field12 { + return -1 + } + return 1 + } + } else if this.Field12 != nil { + return 1 + } else if that1.Field12 != nil { + return -1 + } + if this.Field13 != nil && that1.Field13 != nil { + if *this.Field13 != *that1.Field13 { + if !*this.Field13 { + return -1 + } + return 1 + } + } else if this.Field13 != nil { + return 1 + } else if that1.Field13 != nil { + return -1 + } + if this.Field14 != nil && that1.Field14 != nil { + if *this.Field14 != *that1.Field14 { + if *this.Field14 < *that1.Field14 { + return -1 + } + return 1 + } + } else if this.Field14 != nil { + return 1 + } else if that1.Field14 != nil { + return -1 + } + if c := bytes.Compare(this.Field15, that1.Field15); c != 0 { + return c + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NidRepNative) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NidRepNative) + if !ok { + that2, ok := that.(NidRepNative) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if len(this.Field1) != len(that1.Field1) { + if len(this.Field1) < len(that1.Field1) { + return -1 + } + return 1 + } + for i := range this.Field1 { + if this.Field1[i] != that1.Field1[i] { + if this.Field1[i] < that1.Field1[i] { + return -1 + } + return 1 + } + } + if len(this.Field2) != len(that1.Field2) { + if len(this.Field2) < len(that1.Field2) { + return -1 + } + return 1 + } + for i := range this.Field2 { + if this.Field2[i] != that1.Field2[i] { + if this.Field2[i] < that1.Field2[i] { + return -1 + } + return 1 + } + } + if len(this.Field3) != len(that1.Field3) { + if len(this.Field3) < len(that1.Field3) { + return -1 + } + return 1 + } + for i := range this.Field3 { + if this.Field3[i] != that1.Field3[i] { + if this.Field3[i] < that1.Field3[i] { + return -1 + } + return 1 + } + } + if len(this.Field4) != len(that1.Field4) { + if len(this.Field4) < len(that1.Field4) { + return -1 + } + return 1 + } + for i := range this.Field4 { + if this.Field4[i] != that1.Field4[i] { + if this.Field4[i] < that1.Field4[i] { + return -1 + } + return 1 + } + } + if len(this.Field5) != len(that1.Field5) { + if len(this.Field5) < len(that1.Field5) { + return -1 + } + return 1 + } + for i := range this.Field5 { + if this.Field5[i] != that1.Field5[i] { + if this.Field5[i] < that1.Field5[i] { + return -1 + } + return 1 + } + } + if len(this.Field6) != len(that1.Field6) { + if len(this.Field6) < len(that1.Field6) { + return -1 + } + return 1 + } + for i := range this.Field6 { + if this.Field6[i] != that1.Field6[i] { + if this.Field6[i] < that1.Field6[i] { + return -1 + } + return 1 + } + } + if len(this.Field7) != len(that1.Field7) { + if len(this.Field7) < len(that1.Field7) { + return -1 + } + return 1 + } + for i := range this.Field7 { + if this.Field7[i] != that1.Field7[i] { + if this.Field7[i] < that1.Field7[i] { + return -1 + } + return 1 + } + } + if len(this.Field8) != len(that1.Field8) { + if len(this.Field8) < len(that1.Field8) { + return -1 + } + return 1 + } + for i := range this.Field8 { + if this.Field8[i] != that1.Field8[i] { + if this.Field8[i] < that1.Field8[i] { + return -1 + } + return 1 + } + } + if len(this.Field9) != len(that1.Field9) { + if len(this.Field9) < len(that1.Field9) { + return -1 + } + return 1 + } + for i := range this.Field9 { + if this.Field9[i] != that1.Field9[i] { + if this.Field9[i] < that1.Field9[i] { + return -1 + } + return 1 + } + } + if len(this.Field10) != len(that1.Field10) { + if len(this.Field10) < len(that1.Field10) { + return -1 + } + return 1 + } + for i := range this.Field10 { + if this.Field10[i] != that1.Field10[i] { + if this.Field10[i] < that1.Field10[i] { + return -1 + } + return 1 + } + } + if len(this.Field11) != len(that1.Field11) { + if len(this.Field11) < len(that1.Field11) { + return -1 + } + return 1 + } + for i := range this.Field11 { + if this.Field11[i] != that1.Field11[i] { + if this.Field11[i] < that1.Field11[i] { + return -1 + } + return 1 + } + } + if len(this.Field12) != len(that1.Field12) { + if len(this.Field12) < len(that1.Field12) { + return -1 + } + return 1 + } + for i := range this.Field12 { + if this.Field12[i] != that1.Field12[i] { + if this.Field12[i] < that1.Field12[i] { + return -1 + } + return 1 + } + } + if len(this.Field13) != len(that1.Field13) { + if len(this.Field13) < len(that1.Field13) { + return -1 + } + return 1 + } + for i := range this.Field13 { + if this.Field13[i] != that1.Field13[i] { + if !this.Field13[i] { + return -1 + } + return 1 + } + } + if len(this.Field14) != len(that1.Field14) { + if len(this.Field14) < len(that1.Field14) { + return -1 + } + return 1 + } + for i := range this.Field14 { + if this.Field14[i] != that1.Field14[i] { + if this.Field14[i] < that1.Field14[i] { + return -1 + } + return 1 + } + } + if len(this.Field15) != len(that1.Field15) { + if len(this.Field15) < len(that1.Field15) { + return -1 + } + return 1 + } + for i := range this.Field15 { + if c := bytes.Compare(this.Field15[i], that1.Field15[i]); c != 0 { + return c + } + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NinRepNative) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NinRepNative) + if !ok { + that2, ok := that.(NinRepNative) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if len(this.Field1) != len(that1.Field1) { + if len(this.Field1) < len(that1.Field1) { + return -1 + } + return 1 + } + for i := range this.Field1 { + if this.Field1[i] != that1.Field1[i] { + if this.Field1[i] < that1.Field1[i] { + return -1 + } + return 1 + } + } + if len(this.Field2) != len(that1.Field2) { + if len(this.Field2) < len(that1.Field2) { + return -1 + } + return 1 + } + for i := range this.Field2 { + if this.Field2[i] != that1.Field2[i] { + if this.Field2[i] < that1.Field2[i] { + return -1 + } + return 1 + } + } + if len(this.Field3) != len(that1.Field3) { + if len(this.Field3) < len(that1.Field3) { + return -1 + } + return 1 + } + for i := range this.Field3 { + if this.Field3[i] != that1.Field3[i] { + if this.Field3[i] < that1.Field3[i] { + return -1 + } + return 1 + } + } + if len(this.Field4) != len(that1.Field4) { + if len(this.Field4) < len(that1.Field4) { + return -1 + } + return 1 + } + for i := range this.Field4 { + if this.Field4[i] != that1.Field4[i] { + if this.Field4[i] < that1.Field4[i] { + return -1 + } + return 1 + } + } + if len(this.Field5) != len(that1.Field5) { + if len(this.Field5) < len(that1.Field5) { + return -1 + } + return 1 + } + for i := range this.Field5 { + if this.Field5[i] != that1.Field5[i] { + if this.Field5[i] < that1.Field5[i] { + return -1 + } + return 1 + } + } + if len(this.Field6) != len(that1.Field6) { + if len(this.Field6) < len(that1.Field6) { + return -1 + } + return 1 + } + for i := range this.Field6 { + if this.Field6[i] != that1.Field6[i] { + if this.Field6[i] < that1.Field6[i] { + return -1 + } + return 1 + } + } + if len(this.Field7) != len(that1.Field7) { + if len(this.Field7) < len(that1.Field7) { + return -1 + } + return 1 + } + for i := range this.Field7 { + if this.Field7[i] != that1.Field7[i] { + if this.Field7[i] < that1.Field7[i] { + return -1 + } + return 1 + } + } + if len(this.Field8) != len(that1.Field8) { + if len(this.Field8) < len(that1.Field8) { + return -1 + } + return 1 + } + for i := range this.Field8 { + if this.Field8[i] != that1.Field8[i] { + if this.Field8[i] < that1.Field8[i] { + return -1 + } + return 1 + } + } + if len(this.Field9) != len(that1.Field9) { + if len(this.Field9) < len(that1.Field9) { + return -1 + } + return 1 + } + for i := range this.Field9 { + if this.Field9[i] != that1.Field9[i] { + if this.Field9[i] < that1.Field9[i] { + return -1 + } + return 1 + } + } + if len(this.Field10) != len(that1.Field10) { + if len(this.Field10) < len(that1.Field10) { + return -1 + } + return 1 + } + for i := range this.Field10 { + if this.Field10[i] != that1.Field10[i] { + if this.Field10[i] < that1.Field10[i] { + return -1 + } + return 1 + } + } + if len(this.Field11) != len(that1.Field11) { + if len(this.Field11) < len(that1.Field11) { + return -1 + } + return 1 + } + for i := range this.Field11 { + if this.Field11[i] != that1.Field11[i] { + if this.Field11[i] < that1.Field11[i] { + return -1 + } + return 1 + } + } + if len(this.Field12) != len(that1.Field12) { + if len(this.Field12) < len(that1.Field12) { + return -1 + } + return 1 + } + for i := range this.Field12 { + if this.Field12[i] != that1.Field12[i] { + if this.Field12[i] < that1.Field12[i] { + return -1 + } + return 1 + } + } + if len(this.Field13) != len(that1.Field13) { + if len(this.Field13) < len(that1.Field13) { + return -1 + } + return 1 + } + for i := range this.Field13 { + if this.Field13[i] != that1.Field13[i] { + if !this.Field13[i] { + return -1 + } + return 1 + } + } + if len(this.Field14) != len(that1.Field14) { + if len(this.Field14) < len(that1.Field14) { + return -1 + } + return 1 + } + for i := range this.Field14 { + if this.Field14[i] != that1.Field14[i] { + if this.Field14[i] < that1.Field14[i] { + return -1 + } + return 1 + } + } + if len(this.Field15) != len(that1.Field15) { + if len(this.Field15) < len(that1.Field15) { + return -1 + } + return 1 + } + for i := range this.Field15 { + if c := bytes.Compare(this.Field15[i], that1.Field15[i]); c != 0 { + return c + } + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NidRepPackedNative) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NidRepPackedNative) + if !ok { + that2, ok := that.(NidRepPackedNative) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if len(this.Field1) != len(that1.Field1) { + if len(this.Field1) < len(that1.Field1) { + return -1 + } + return 1 + } + for i := range this.Field1 { + if this.Field1[i] != that1.Field1[i] { + if this.Field1[i] < that1.Field1[i] { + return -1 + } + return 1 + } + } + if len(this.Field2) != len(that1.Field2) { + if len(this.Field2) < len(that1.Field2) { + return -1 + } + return 1 + } + for i := range this.Field2 { + if this.Field2[i] != that1.Field2[i] { + if this.Field2[i] < that1.Field2[i] { + return -1 + } + return 1 + } + } + if len(this.Field3) != len(that1.Field3) { + if len(this.Field3) < len(that1.Field3) { + return -1 + } + return 1 + } + for i := range this.Field3 { + if this.Field3[i] != that1.Field3[i] { + if this.Field3[i] < that1.Field3[i] { + return -1 + } + return 1 + } + } + if len(this.Field4) != len(that1.Field4) { + if len(this.Field4) < len(that1.Field4) { + return -1 + } + return 1 + } + for i := range this.Field4 { + if this.Field4[i] != that1.Field4[i] { + if this.Field4[i] < that1.Field4[i] { + return -1 + } + return 1 + } + } + if len(this.Field5) != len(that1.Field5) { + if len(this.Field5) < len(that1.Field5) { + return -1 + } + return 1 + } + for i := range this.Field5 { + if this.Field5[i] != that1.Field5[i] { + if this.Field5[i] < that1.Field5[i] { + return -1 + } + return 1 + } + } + if len(this.Field6) != len(that1.Field6) { + if len(this.Field6) < len(that1.Field6) { + return -1 + } + return 1 + } + for i := range this.Field6 { + if this.Field6[i] != that1.Field6[i] { + if this.Field6[i] < that1.Field6[i] { + return -1 + } + return 1 + } + } + if len(this.Field7) != len(that1.Field7) { + if len(this.Field7) < len(that1.Field7) { + return -1 + } + return 1 + } + for i := range this.Field7 { + if this.Field7[i] != that1.Field7[i] { + if this.Field7[i] < that1.Field7[i] { + return -1 + } + return 1 + } + } + if len(this.Field8) != len(that1.Field8) { + if len(this.Field8) < len(that1.Field8) { + return -1 + } + return 1 + } + for i := range this.Field8 { + if this.Field8[i] != that1.Field8[i] { + if this.Field8[i] < that1.Field8[i] { + return -1 + } + return 1 + } + } + if len(this.Field9) != len(that1.Field9) { + if len(this.Field9) < len(that1.Field9) { + return -1 + } + return 1 + } + for i := range this.Field9 { + if this.Field9[i] != that1.Field9[i] { + if this.Field9[i] < that1.Field9[i] { + return -1 + } + return 1 + } + } + if len(this.Field10) != len(that1.Field10) { + if len(this.Field10) < len(that1.Field10) { + return -1 + } + return 1 + } + for i := range this.Field10 { + if this.Field10[i] != that1.Field10[i] { + if this.Field10[i] < that1.Field10[i] { + return -1 + } + return 1 + } + } + if len(this.Field11) != len(that1.Field11) { + if len(this.Field11) < len(that1.Field11) { + return -1 + } + return 1 + } + for i := range this.Field11 { + if this.Field11[i] != that1.Field11[i] { + if this.Field11[i] < that1.Field11[i] { + return -1 + } + return 1 + } + } + if len(this.Field12) != len(that1.Field12) { + if len(this.Field12) < len(that1.Field12) { + return -1 + } + return 1 + } + for i := range this.Field12 { + if this.Field12[i] != that1.Field12[i] { + if this.Field12[i] < that1.Field12[i] { + return -1 + } + return 1 + } + } + if len(this.Field13) != len(that1.Field13) { + if len(this.Field13) < len(that1.Field13) { + return -1 + } + return 1 + } + for i := range this.Field13 { + if this.Field13[i] != that1.Field13[i] { + if !this.Field13[i] { + return -1 + } + return 1 + } + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NinRepPackedNative) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NinRepPackedNative) + if !ok { + that2, ok := that.(NinRepPackedNative) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if len(this.Field1) != len(that1.Field1) { + if len(this.Field1) < len(that1.Field1) { + return -1 + } + return 1 + } + for i := range this.Field1 { + if this.Field1[i] != that1.Field1[i] { + if this.Field1[i] < that1.Field1[i] { + return -1 + } + return 1 + } + } + if len(this.Field2) != len(that1.Field2) { + if len(this.Field2) < len(that1.Field2) { + return -1 + } + return 1 + } + for i := range this.Field2 { + if this.Field2[i] != that1.Field2[i] { + if this.Field2[i] < that1.Field2[i] { + return -1 + } + return 1 + } + } + if len(this.Field3) != len(that1.Field3) { + if len(this.Field3) < len(that1.Field3) { + return -1 + } + return 1 + } + for i := range this.Field3 { + if this.Field3[i] != that1.Field3[i] { + if this.Field3[i] < that1.Field3[i] { + return -1 + } + return 1 + } + } + if len(this.Field4) != len(that1.Field4) { + if len(this.Field4) < len(that1.Field4) { + return -1 + } + return 1 + } + for i := range this.Field4 { + if this.Field4[i] != that1.Field4[i] { + if this.Field4[i] < that1.Field4[i] { + return -1 + } + return 1 + } + } + if len(this.Field5) != len(that1.Field5) { + if len(this.Field5) < len(that1.Field5) { + return -1 + } + return 1 + } + for i := range this.Field5 { + if this.Field5[i] != that1.Field5[i] { + if this.Field5[i] < that1.Field5[i] { + return -1 + } + return 1 + } + } + if len(this.Field6) != len(that1.Field6) { + if len(this.Field6) < len(that1.Field6) { + return -1 + } + return 1 + } + for i := range this.Field6 { + if this.Field6[i] != that1.Field6[i] { + if this.Field6[i] < that1.Field6[i] { + return -1 + } + return 1 + } + } + if len(this.Field7) != len(that1.Field7) { + if len(this.Field7) < len(that1.Field7) { + return -1 + } + return 1 + } + for i := range this.Field7 { + if this.Field7[i] != that1.Field7[i] { + if this.Field7[i] < that1.Field7[i] { + return -1 + } + return 1 + } + } + if len(this.Field8) != len(that1.Field8) { + if len(this.Field8) < len(that1.Field8) { + return -1 + } + return 1 + } + for i := range this.Field8 { + if this.Field8[i] != that1.Field8[i] { + if this.Field8[i] < that1.Field8[i] { + return -1 + } + return 1 + } + } + if len(this.Field9) != len(that1.Field9) { + if len(this.Field9) < len(that1.Field9) { + return -1 + } + return 1 + } + for i := range this.Field9 { + if this.Field9[i] != that1.Field9[i] { + if this.Field9[i] < that1.Field9[i] { + return -1 + } + return 1 + } + } + if len(this.Field10) != len(that1.Field10) { + if len(this.Field10) < len(that1.Field10) { + return -1 + } + return 1 + } + for i := range this.Field10 { + if this.Field10[i] != that1.Field10[i] { + if this.Field10[i] < that1.Field10[i] { + return -1 + } + return 1 + } + } + if len(this.Field11) != len(that1.Field11) { + if len(this.Field11) < len(that1.Field11) { + return -1 + } + return 1 + } + for i := range this.Field11 { + if this.Field11[i] != that1.Field11[i] { + if this.Field11[i] < that1.Field11[i] { + return -1 + } + return 1 + } + } + if len(this.Field12) != len(that1.Field12) { + if len(this.Field12) < len(that1.Field12) { + return -1 + } + return 1 + } + for i := range this.Field12 { + if this.Field12[i] != that1.Field12[i] { + if this.Field12[i] < that1.Field12[i] { + return -1 + } + return 1 + } + } + if len(this.Field13) != len(that1.Field13) { + if len(this.Field13) < len(that1.Field13) { + return -1 + } + return 1 + } + for i := range this.Field13 { + if this.Field13[i] != that1.Field13[i] { + if !this.Field13[i] { + return -1 + } + return 1 + } + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NidOptStruct) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NidOptStruct) + if !ok { + that2, ok := that.(NidOptStruct) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.Field1 != that1.Field1 { + if this.Field1 < that1.Field1 { + return -1 + } + return 1 + } + if this.Field2 != that1.Field2 { + if this.Field2 < that1.Field2 { + return -1 + } + return 1 + } + if c := this.Field3.Compare(&that1.Field3); c != 0 { + return c + } + if c := this.Field4.Compare(&that1.Field4); c != 0 { + return c + } + if this.Field6 != that1.Field6 { + if this.Field6 < that1.Field6 { + return -1 + } + return 1 + } + if this.Field7 != that1.Field7 { + if this.Field7 < that1.Field7 { + return -1 + } + return 1 + } + if c := this.Field8.Compare(&that1.Field8); c != 0 { + return c + } + if this.Field13 != that1.Field13 { + if !this.Field13 { + return -1 + } + return 1 + } + if this.Field14 != that1.Field14 { + if this.Field14 < that1.Field14 { + return -1 + } + return 1 + } + if c := bytes.Compare(this.Field15, that1.Field15); c != 0 { + return c + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NinOptStruct) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NinOptStruct) + if !ok { + that2, ok := that.(NinOptStruct) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + if *this.Field1 < *that1.Field1 { + return -1 + } + return 1 + } + } else if this.Field1 != nil { + return 1 + } else if that1.Field1 != nil { + return -1 + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + if *this.Field2 < *that1.Field2 { + return -1 + } + return 1 + } + } else if this.Field2 != nil { + return 1 + } else if that1.Field2 != nil { + return -1 + } + if c := this.Field3.Compare(that1.Field3); c != 0 { + return c + } + if c := this.Field4.Compare(that1.Field4); c != 0 { + return c + } + if this.Field6 != nil && that1.Field6 != nil { + if *this.Field6 != *that1.Field6 { + if *this.Field6 < *that1.Field6 { + return -1 + } + return 1 + } + } else if this.Field6 != nil { + return 1 + } else if that1.Field6 != nil { + return -1 + } + if this.Field7 != nil && that1.Field7 != nil { + if *this.Field7 != *that1.Field7 { + if *this.Field7 < *that1.Field7 { + return -1 + } + return 1 + } + } else if this.Field7 != nil { + return 1 + } else if that1.Field7 != nil { + return -1 + } + if c := this.Field8.Compare(that1.Field8); c != 0 { + return c + } + if this.Field13 != nil && that1.Field13 != nil { + if *this.Field13 != *that1.Field13 { + if !*this.Field13 { + return -1 + } + return 1 + } + } else if this.Field13 != nil { + return 1 + } else if that1.Field13 != nil { + return -1 + } + if this.Field14 != nil && that1.Field14 != nil { + if *this.Field14 != *that1.Field14 { + if *this.Field14 < *that1.Field14 { + return -1 + } + return 1 + } + } else if this.Field14 != nil { + return 1 + } else if that1.Field14 != nil { + return -1 + } + if c := bytes.Compare(this.Field15, that1.Field15); c != 0 { + return c + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NidRepStruct) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NidRepStruct) + if !ok { + that2, ok := that.(NidRepStruct) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if len(this.Field1) != len(that1.Field1) { + if len(this.Field1) < len(that1.Field1) { + return -1 + } + return 1 + } + for i := range this.Field1 { + if this.Field1[i] != that1.Field1[i] { + if this.Field1[i] < that1.Field1[i] { + return -1 + } + return 1 + } + } + if len(this.Field2) != len(that1.Field2) { + if len(this.Field2) < len(that1.Field2) { + return -1 + } + return 1 + } + for i := range this.Field2 { + if this.Field2[i] != that1.Field2[i] { + if this.Field2[i] < that1.Field2[i] { + return -1 + } + return 1 + } + } + if len(this.Field3) != len(that1.Field3) { + if len(this.Field3) < len(that1.Field3) { + return -1 + } + return 1 + } + for i := range this.Field3 { + if c := this.Field3[i].Compare(&that1.Field3[i]); c != 0 { + return c + } + } + if len(this.Field4) != len(that1.Field4) { + if len(this.Field4) < len(that1.Field4) { + return -1 + } + return 1 + } + for i := range this.Field4 { + if c := this.Field4[i].Compare(&that1.Field4[i]); c != 0 { + return c + } + } + if len(this.Field6) != len(that1.Field6) { + if len(this.Field6) < len(that1.Field6) { + return -1 + } + return 1 + } + for i := range this.Field6 { + if this.Field6[i] != that1.Field6[i] { + if this.Field6[i] < that1.Field6[i] { + return -1 + } + return 1 + } + } + if len(this.Field7) != len(that1.Field7) { + if len(this.Field7) < len(that1.Field7) { + return -1 + } + return 1 + } + for i := range this.Field7 { + if this.Field7[i] != that1.Field7[i] { + if this.Field7[i] < that1.Field7[i] { + return -1 + } + return 1 + } + } + if len(this.Field8) != len(that1.Field8) { + if len(this.Field8) < len(that1.Field8) { + return -1 + } + return 1 + } + for i := range this.Field8 { + if c := this.Field8[i].Compare(&that1.Field8[i]); c != 0 { + return c + } + } + if len(this.Field13) != len(that1.Field13) { + if len(this.Field13) < len(that1.Field13) { + return -1 + } + return 1 + } + for i := range this.Field13 { + if this.Field13[i] != that1.Field13[i] { + if !this.Field13[i] { + return -1 + } + return 1 + } + } + if len(this.Field14) != len(that1.Field14) { + if len(this.Field14) < len(that1.Field14) { + return -1 + } + return 1 + } + for i := range this.Field14 { + if this.Field14[i] != that1.Field14[i] { + if this.Field14[i] < that1.Field14[i] { + return -1 + } + return 1 + } + } + if len(this.Field15) != len(that1.Field15) { + if len(this.Field15) < len(that1.Field15) { + return -1 + } + return 1 + } + for i := range this.Field15 { + if c := bytes.Compare(this.Field15[i], that1.Field15[i]); c != 0 { + return c + } + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NinRepStruct) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NinRepStruct) + if !ok { + that2, ok := that.(NinRepStruct) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if len(this.Field1) != len(that1.Field1) { + if len(this.Field1) < len(that1.Field1) { + return -1 + } + return 1 + } + for i := range this.Field1 { + if this.Field1[i] != that1.Field1[i] { + if this.Field1[i] < that1.Field1[i] { + return -1 + } + return 1 + } + } + if len(this.Field2) != len(that1.Field2) { + if len(this.Field2) < len(that1.Field2) { + return -1 + } + return 1 + } + for i := range this.Field2 { + if this.Field2[i] != that1.Field2[i] { + if this.Field2[i] < that1.Field2[i] { + return -1 + } + return 1 + } + } + if len(this.Field3) != len(that1.Field3) { + if len(this.Field3) < len(that1.Field3) { + return -1 + } + return 1 + } + for i := range this.Field3 { + if c := this.Field3[i].Compare(that1.Field3[i]); c != 0 { + return c + } + } + if len(this.Field4) != len(that1.Field4) { + if len(this.Field4) < len(that1.Field4) { + return -1 + } + return 1 + } + for i := range this.Field4 { + if c := this.Field4[i].Compare(that1.Field4[i]); c != 0 { + return c + } + } + if len(this.Field6) != len(that1.Field6) { + if len(this.Field6) < len(that1.Field6) { + return -1 + } + return 1 + } + for i := range this.Field6 { + if this.Field6[i] != that1.Field6[i] { + if this.Field6[i] < that1.Field6[i] { + return -1 + } + return 1 + } + } + if len(this.Field7) != len(that1.Field7) { + if len(this.Field7) < len(that1.Field7) { + return -1 + } + return 1 + } + for i := range this.Field7 { + if this.Field7[i] != that1.Field7[i] { + if this.Field7[i] < that1.Field7[i] { + return -1 + } + return 1 + } + } + if len(this.Field8) != len(that1.Field8) { + if len(this.Field8) < len(that1.Field8) { + return -1 + } + return 1 + } + for i := range this.Field8 { + if c := this.Field8[i].Compare(that1.Field8[i]); c != 0 { + return c + } + } + if len(this.Field13) != len(that1.Field13) { + if len(this.Field13) < len(that1.Field13) { + return -1 + } + return 1 + } + for i := range this.Field13 { + if this.Field13[i] != that1.Field13[i] { + if !this.Field13[i] { + return -1 + } + return 1 + } + } + if len(this.Field14) != len(that1.Field14) { + if len(this.Field14) < len(that1.Field14) { + return -1 + } + return 1 + } + for i := range this.Field14 { + if this.Field14[i] != that1.Field14[i] { + if this.Field14[i] < that1.Field14[i] { + return -1 + } + return 1 + } + } + if len(this.Field15) != len(that1.Field15) { + if len(this.Field15) < len(that1.Field15) { + return -1 + } + return 1 + } + for i := range this.Field15 { + if c := bytes.Compare(this.Field15[i], that1.Field15[i]); c != 0 { + return c + } + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NidEmbeddedStruct) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NidEmbeddedStruct) + if !ok { + that2, ok := that.(NidEmbeddedStruct) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if c := this.NidOptNative.Compare(that1.NidOptNative); c != 0 { + return c + } + if c := this.Field200.Compare(&that1.Field200); c != 0 { + return c + } + if this.Field210 != that1.Field210 { + if !this.Field210 { + return -1 + } + return 1 + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NinEmbeddedStruct) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NinEmbeddedStruct) + if !ok { + that2, ok := that.(NinEmbeddedStruct) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if c := this.NidOptNative.Compare(that1.NidOptNative); c != 0 { + return c + } + if c := this.Field200.Compare(that1.Field200); c != 0 { + return c + } + if this.Field210 != nil && that1.Field210 != nil { + if *this.Field210 != *that1.Field210 { + if !*this.Field210 { + return -1 + } + return 1 + } + } else if this.Field210 != nil { + return 1 + } else if that1.Field210 != nil { + return -1 + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NidNestedStruct) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NidNestedStruct) + if !ok { + that2, ok := that.(NidNestedStruct) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if c := this.Field1.Compare(&that1.Field1); c != 0 { + return c + } + if len(this.Field2) != len(that1.Field2) { + if len(this.Field2) < len(that1.Field2) { + return -1 + } + return 1 + } + for i := range this.Field2 { + if c := this.Field2[i].Compare(&that1.Field2[i]); c != 0 { + return c + } + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NinNestedStruct) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NinNestedStruct) + if !ok { + that2, ok := that.(NinNestedStruct) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if c := this.Field1.Compare(that1.Field1); c != 0 { + return c + } + if len(this.Field2) != len(that1.Field2) { + if len(this.Field2) < len(that1.Field2) { + return -1 + } + return 1 + } + for i := range this.Field2 { + if c := this.Field2[i].Compare(that1.Field2[i]); c != 0 { + return c + } + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NidOptCustom) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NidOptCustom) + if !ok { + that2, ok := that.(NidOptCustom) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if c := this.Id.Compare(that1.Id); c != 0 { + return c + } + if c := this.Value.Compare(that1.Value); c != 0 { + return c + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *CustomDash) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*CustomDash) + if !ok { + that2, ok := that.(CustomDash) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if that1.Value == nil { + if this.Value != nil { + return 1 + } + } else if this.Value == nil { + return -1 + } else if c := this.Value.Compare(*that1.Value); c != 0 { + return c + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NinOptCustom) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NinOptCustom) + if !ok { + that2, ok := that.(NinOptCustom) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if that1.Id == nil { + if this.Id != nil { + return 1 + } + } else if this.Id == nil { + return -1 + } else if c := this.Id.Compare(*that1.Id); c != 0 { + return c + } + if that1.Value == nil { + if this.Value != nil { + return 1 + } + } else if this.Value == nil { + return -1 + } else if c := this.Value.Compare(*that1.Value); c != 0 { + return c + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NidRepCustom) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NidRepCustom) + if !ok { + that2, ok := that.(NidRepCustom) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if len(this.Id) != len(that1.Id) { + if len(this.Id) < len(that1.Id) { + return -1 + } + return 1 + } + for i := range this.Id { + if c := this.Id[i].Compare(that1.Id[i]); c != 0 { + return c + } + } + if len(this.Value) != len(that1.Value) { + if len(this.Value) < len(that1.Value) { + return -1 + } + return 1 + } + for i := range this.Value { + if c := this.Value[i].Compare(that1.Value[i]); c != 0 { + return c + } + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NinRepCustom) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NinRepCustom) + if !ok { + that2, ok := that.(NinRepCustom) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if len(this.Id) != len(that1.Id) { + if len(this.Id) < len(that1.Id) { + return -1 + } + return 1 + } + for i := range this.Id { + if c := this.Id[i].Compare(that1.Id[i]); c != 0 { + return c + } + } + if len(this.Value) != len(that1.Value) { + if len(this.Value) < len(that1.Value) { + return -1 + } + return 1 + } + for i := range this.Value { + if c := this.Value[i].Compare(that1.Value[i]); c != 0 { + return c + } + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NinOptNativeUnion) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NinOptNativeUnion) + if !ok { + that2, ok := that.(NinOptNativeUnion) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + if *this.Field1 < *that1.Field1 { + return -1 + } + return 1 + } + } else if this.Field1 != nil { + return 1 + } else if that1.Field1 != nil { + return -1 + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + if *this.Field2 < *that1.Field2 { + return -1 + } + return 1 + } + } else if this.Field2 != nil { + return 1 + } else if that1.Field2 != nil { + return -1 + } + if this.Field3 != nil && that1.Field3 != nil { + if *this.Field3 != *that1.Field3 { + if *this.Field3 < *that1.Field3 { + return -1 + } + return 1 + } + } else if this.Field3 != nil { + return 1 + } else if that1.Field3 != nil { + return -1 + } + if this.Field4 != nil && that1.Field4 != nil { + if *this.Field4 != *that1.Field4 { + if *this.Field4 < *that1.Field4 { + return -1 + } + return 1 + } + } else if this.Field4 != nil { + return 1 + } else if that1.Field4 != nil { + return -1 + } + if this.Field5 != nil && that1.Field5 != nil { + if *this.Field5 != *that1.Field5 { + if *this.Field5 < *that1.Field5 { + return -1 + } + return 1 + } + } else if this.Field5 != nil { + return 1 + } else if that1.Field5 != nil { + return -1 + } + if this.Field6 != nil && that1.Field6 != nil { + if *this.Field6 != *that1.Field6 { + if *this.Field6 < *that1.Field6 { + return -1 + } + return 1 + } + } else if this.Field6 != nil { + return 1 + } else if that1.Field6 != nil { + return -1 + } + if this.Field13 != nil && that1.Field13 != nil { + if *this.Field13 != *that1.Field13 { + if !*this.Field13 { + return -1 + } + return 1 + } + } else if this.Field13 != nil { + return 1 + } else if that1.Field13 != nil { + return -1 + } + if this.Field14 != nil && that1.Field14 != nil { + if *this.Field14 != *that1.Field14 { + if *this.Field14 < *that1.Field14 { + return -1 + } + return 1 + } + } else if this.Field14 != nil { + return 1 + } else if that1.Field14 != nil { + return -1 + } + if c := bytes.Compare(this.Field15, that1.Field15); c != 0 { + return c + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NinOptStructUnion) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NinOptStructUnion) + if !ok { + that2, ok := that.(NinOptStructUnion) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + if *this.Field1 < *that1.Field1 { + return -1 + } + return 1 + } + } else if this.Field1 != nil { + return 1 + } else if that1.Field1 != nil { + return -1 + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + if *this.Field2 < *that1.Field2 { + return -1 + } + return 1 + } + } else if this.Field2 != nil { + return 1 + } else if that1.Field2 != nil { + return -1 + } + if c := this.Field3.Compare(that1.Field3); c != 0 { + return c + } + if c := this.Field4.Compare(that1.Field4); c != 0 { + return c + } + if this.Field6 != nil && that1.Field6 != nil { + if *this.Field6 != *that1.Field6 { + if *this.Field6 < *that1.Field6 { + return -1 + } + return 1 + } + } else if this.Field6 != nil { + return 1 + } else if that1.Field6 != nil { + return -1 + } + if this.Field7 != nil && that1.Field7 != nil { + if *this.Field7 != *that1.Field7 { + if *this.Field7 < *that1.Field7 { + return -1 + } + return 1 + } + } else if this.Field7 != nil { + return 1 + } else if that1.Field7 != nil { + return -1 + } + if this.Field13 != nil && that1.Field13 != nil { + if *this.Field13 != *that1.Field13 { + if !*this.Field13 { + return -1 + } + return 1 + } + } else if this.Field13 != nil { + return 1 + } else if that1.Field13 != nil { + return -1 + } + if this.Field14 != nil && that1.Field14 != nil { + if *this.Field14 != *that1.Field14 { + if *this.Field14 < *that1.Field14 { + return -1 + } + return 1 + } + } else if this.Field14 != nil { + return 1 + } else if that1.Field14 != nil { + return -1 + } + if c := bytes.Compare(this.Field15, that1.Field15); c != 0 { + return c + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NinEmbeddedStructUnion) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NinEmbeddedStructUnion) + if !ok { + that2, ok := that.(NinEmbeddedStructUnion) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if c := this.NidOptNative.Compare(that1.NidOptNative); c != 0 { + return c + } + if c := this.Field200.Compare(that1.Field200); c != 0 { + return c + } + if this.Field210 != nil && that1.Field210 != nil { + if *this.Field210 != *that1.Field210 { + if !*this.Field210 { + return -1 + } + return 1 + } + } else if this.Field210 != nil { + return 1 + } else if that1.Field210 != nil { + return -1 + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NinNestedStructUnion) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NinNestedStructUnion) + if !ok { + that2, ok := that.(NinNestedStructUnion) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if c := this.Field1.Compare(that1.Field1); c != 0 { + return c + } + if c := this.Field2.Compare(that1.Field2); c != 0 { + return c + } + if c := this.Field3.Compare(that1.Field3); c != 0 { + return c + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *Tree) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*Tree) + if !ok { + that2, ok := that.(Tree) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if c := this.Or.Compare(that1.Or); c != 0 { + return c + } + if c := this.And.Compare(that1.And); c != 0 { + return c + } + if c := this.Leaf.Compare(that1.Leaf); c != 0 { + return c + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *OrBranch) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*OrBranch) + if !ok { + that2, ok := that.(OrBranch) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if c := this.Left.Compare(&that1.Left); c != 0 { + return c + } + if c := this.Right.Compare(&that1.Right); c != 0 { + return c + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *AndBranch) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*AndBranch) + if !ok { + that2, ok := that.(AndBranch) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if c := this.Left.Compare(&that1.Left); c != 0 { + return c + } + if c := this.Right.Compare(&that1.Right); c != 0 { + return c + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *Leaf) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*Leaf) + if !ok { + that2, ok := that.(Leaf) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.Value != that1.Value { + if this.Value < that1.Value { + return -1 + } + return 1 + } + if this.StrValue != that1.StrValue { + if this.StrValue < that1.StrValue { + return -1 + } + return 1 + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *DeepTree) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*DeepTree) + if !ok { + that2, ok := that.(DeepTree) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if c := this.Down.Compare(that1.Down); c != 0 { + return c + } + if c := this.And.Compare(that1.And); c != 0 { + return c + } + if c := this.Leaf.Compare(that1.Leaf); c != 0 { + return c + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *ADeepBranch) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*ADeepBranch) + if !ok { + that2, ok := that.(ADeepBranch) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if c := this.Down.Compare(&that1.Down); c != 0 { + return c + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *AndDeepBranch) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*AndDeepBranch) + if !ok { + that2, ok := that.(AndDeepBranch) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if c := this.Left.Compare(&that1.Left); c != 0 { + return c + } + if c := this.Right.Compare(&that1.Right); c != 0 { + return c + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *DeepLeaf) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*DeepLeaf) + if !ok { + that2, ok := that.(DeepLeaf) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if c := this.Tree.Compare(&that1.Tree); c != 0 { + return c + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *Nil) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*Nil) + if !ok { + that2, ok := that.(Nil) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NidOptEnum) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NidOptEnum) + if !ok { + that2, ok := that.(NidOptEnum) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.Field1 != that1.Field1 { + if this.Field1 < that1.Field1 { + return -1 + } + return 1 + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NinOptEnum) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NinOptEnum) + if !ok { + that2, ok := that.(NinOptEnum) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + if *this.Field1 < *that1.Field1 { + return -1 + } + return 1 + } + } else if this.Field1 != nil { + return 1 + } else if that1.Field1 != nil { + return -1 + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + if *this.Field2 < *that1.Field2 { + return -1 + } + return 1 + } + } else if this.Field2 != nil { + return 1 + } else if that1.Field2 != nil { + return -1 + } + if this.Field3 != nil && that1.Field3 != nil { + if *this.Field3 != *that1.Field3 { + if *this.Field3 < *that1.Field3 { + return -1 + } + return 1 + } + } else if this.Field3 != nil { + return 1 + } else if that1.Field3 != nil { + return -1 + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NidRepEnum) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NidRepEnum) + if !ok { + that2, ok := that.(NidRepEnum) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if len(this.Field1) != len(that1.Field1) { + if len(this.Field1) < len(that1.Field1) { + return -1 + } + return 1 + } + for i := range this.Field1 { + if this.Field1[i] != that1.Field1[i] { + if this.Field1[i] < that1.Field1[i] { + return -1 + } + return 1 + } + } + if len(this.Field2) != len(that1.Field2) { + if len(this.Field2) < len(that1.Field2) { + return -1 + } + return 1 + } + for i := range this.Field2 { + if this.Field2[i] != that1.Field2[i] { + if this.Field2[i] < that1.Field2[i] { + return -1 + } + return 1 + } + } + if len(this.Field3) != len(that1.Field3) { + if len(this.Field3) < len(that1.Field3) { + return -1 + } + return 1 + } + for i := range this.Field3 { + if this.Field3[i] != that1.Field3[i] { + if this.Field3[i] < that1.Field3[i] { + return -1 + } + return 1 + } + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NinRepEnum) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NinRepEnum) + if !ok { + that2, ok := that.(NinRepEnum) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if len(this.Field1) != len(that1.Field1) { + if len(this.Field1) < len(that1.Field1) { + return -1 + } + return 1 + } + for i := range this.Field1 { + if this.Field1[i] != that1.Field1[i] { + if this.Field1[i] < that1.Field1[i] { + return -1 + } + return 1 + } + } + if len(this.Field2) != len(that1.Field2) { + if len(this.Field2) < len(that1.Field2) { + return -1 + } + return 1 + } + for i := range this.Field2 { + if this.Field2[i] != that1.Field2[i] { + if this.Field2[i] < that1.Field2[i] { + return -1 + } + return 1 + } + } + if len(this.Field3) != len(that1.Field3) { + if len(this.Field3) < len(that1.Field3) { + return -1 + } + return 1 + } + for i := range this.Field3 { + if this.Field3[i] != that1.Field3[i] { + if this.Field3[i] < that1.Field3[i] { + return -1 + } + return 1 + } + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NinOptEnumDefault) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NinOptEnumDefault) + if !ok { + that2, ok := that.(NinOptEnumDefault) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + if *this.Field1 < *that1.Field1 { + return -1 + } + return 1 + } + } else if this.Field1 != nil { + return 1 + } else if that1.Field1 != nil { + return -1 + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + if *this.Field2 < *that1.Field2 { + return -1 + } + return 1 + } + } else if this.Field2 != nil { + return 1 + } else if that1.Field2 != nil { + return -1 + } + if this.Field3 != nil && that1.Field3 != nil { + if *this.Field3 != *that1.Field3 { + if *this.Field3 < *that1.Field3 { + return -1 + } + return 1 + } + } else if this.Field3 != nil { + return 1 + } else if that1.Field3 != nil { + return -1 + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *AnotherNinOptEnum) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*AnotherNinOptEnum) + if !ok { + that2, ok := that.(AnotherNinOptEnum) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + if *this.Field1 < *that1.Field1 { + return -1 + } + return 1 + } + } else if this.Field1 != nil { + return 1 + } else if that1.Field1 != nil { + return -1 + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + if *this.Field2 < *that1.Field2 { + return -1 + } + return 1 + } + } else if this.Field2 != nil { + return 1 + } else if that1.Field2 != nil { + return -1 + } + if this.Field3 != nil && that1.Field3 != nil { + if *this.Field3 != *that1.Field3 { + if *this.Field3 < *that1.Field3 { + return -1 + } + return 1 + } + } else if this.Field3 != nil { + return 1 + } else if that1.Field3 != nil { + return -1 + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *AnotherNinOptEnumDefault) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*AnotherNinOptEnumDefault) + if !ok { + that2, ok := that.(AnotherNinOptEnumDefault) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + if *this.Field1 < *that1.Field1 { + return -1 + } + return 1 + } + } else if this.Field1 != nil { + return 1 + } else if that1.Field1 != nil { + return -1 + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + if *this.Field2 < *that1.Field2 { + return -1 + } + return 1 + } + } else if this.Field2 != nil { + return 1 + } else if that1.Field2 != nil { + return -1 + } + if this.Field3 != nil && that1.Field3 != nil { + if *this.Field3 != *that1.Field3 { + if *this.Field3 < *that1.Field3 { + return -1 + } + return 1 + } + } else if this.Field3 != nil { + return 1 + } else if that1.Field3 != nil { + return -1 + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *Timer) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*Timer) + if !ok { + that2, ok := that.(Timer) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.Time1 != that1.Time1 { + if this.Time1 < that1.Time1 { + return -1 + } + return 1 + } + if this.Time2 != that1.Time2 { + if this.Time2 < that1.Time2 { + return -1 + } + return 1 + } + if c := bytes.Compare(this.Data, that1.Data); c != 0 { + return c + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *MyExtendable) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*MyExtendable) + if !ok { + that2, ok := that.(MyExtendable) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + if *this.Field1 < *that1.Field1 { + return -1 + } + return 1 + } + } else if this.Field1 != nil { + return 1 + } else if that1.Field1 != nil { + return -1 + } + extkeys := make([]int32, 0, len(this.XXX_extensions)+len(that1.XXX_extensions)) + for k := range this.XXX_extensions { + extkeys = append(extkeys, k) + } + for k := range that1.XXX_extensions { + if _, ok := this.XXX_extensions[k]; !ok { + extkeys = append(extkeys, k) + } + } + github_com_gogo_protobuf_sortkeys.Int32s(extkeys) + for _, k := range extkeys { + if v, ok := this.XXX_extensions[k]; ok { + if v2, ok := that1.XXX_extensions[k]; ok { + if c := v.Compare(&v2); c != 0 { + return c + } + } else { + return 1 + } + } else { + return -1 + } + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *OtherExtenable) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*OtherExtenable) + if !ok { + that2, ok := that.(OtherExtenable) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + if *this.Field2 < *that1.Field2 { + return -1 + } + return 1 + } + } else if this.Field2 != nil { + return 1 + } else if that1.Field2 != nil { + return -1 + } + if this.Field13 != nil && that1.Field13 != nil { + if *this.Field13 != *that1.Field13 { + if *this.Field13 < *that1.Field13 { + return -1 + } + return 1 + } + } else if this.Field13 != nil { + return 1 + } else if that1.Field13 != nil { + return -1 + } + if c := this.M.Compare(that1.M); c != 0 { + return c + } + extkeys := make([]int32, 0, len(this.XXX_extensions)+len(that1.XXX_extensions)) + for k := range this.XXX_extensions { + extkeys = append(extkeys, k) + } + for k := range that1.XXX_extensions { + if _, ok := this.XXX_extensions[k]; !ok { + extkeys = append(extkeys, k) + } + } + github_com_gogo_protobuf_sortkeys.Int32s(extkeys) + for _, k := range extkeys { + if v, ok := this.XXX_extensions[k]; ok { + if v2, ok := that1.XXX_extensions[k]; ok { + if c := v.Compare(&v2); c != 0 { + return c + } + } else { + return 1 + } + } else { + return -1 + } + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NestedDefinition) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NestedDefinition) + if !ok { + that2, ok := that.(NestedDefinition) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + if *this.Field1 < *that1.Field1 { + return -1 + } + return 1 + } + } else if this.Field1 != nil { + return 1 + } else if that1.Field1 != nil { + return -1 + } + if this.EnumField != nil && that1.EnumField != nil { + if *this.EnumField != *that1.EnumField { + if *this.EnumField < *that1.EnumField { + return -1 + } + return 1 + } + } else if this.EnumField != nil { + return 1 + } else if that1.EnumField != nil { + return -1 + } + if c := this.NNM.Compare(that1.NNM); c != 0 { + return c + } + if c := this.NM.Compare(that1.NM); c != 0 { + return c + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NestedDefinition_NestedMessage) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NestedDefinition_NestedMessage) + if !ok { + that2, ok := that.(NestedDefinition_NestedMessage) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.NestedField1 != nil && that1.NestedField1 != nil { + if *this.NestedField1 != *that1.NestedField1 { + if *this.NestedField1 < *that1.NestedField1 { + return -1 + } + return 1 + } + } else if this.NestedField1 != nil { + return 1 + } else if that1.NestedField1 != nil { + return -1 + } + if c := this.NNM.Compare(that1.NNM); c != 0 { + return c + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NestedDefinition_NestedMessage_NestedNestedMsg) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NestedDefinition_NestedMessage_NestedNestedMsg) + if !ok { + that2, ok := that.(NestedDefinition_NestedMessage_NestedNestedMsg) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.NestedNestedField1 != nil && that1.NestedNestedField1 != nil { + if *this.NestedNestedField1 != *that1.NestedNestedField1 { + if *this.NestedNestedField1 < *that1.NestedNestedField1 { + return -1 + } + return 1 + } + } else if this.NestedNestedField1 != nil { + return 1 + } else if that1.NestedNestedField1 != nil { + return -1 + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NestedScope) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NestedScope) + if !ok { + that2, ok := that.(NestedScope) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if c := this.A.Compare(that1.A); c != 0 { + return c + } + if this.B != nil && that1.B != nil { + if *this.B != *that1.B { + if *this.B < *that1.B { + return -1 + } + return 1 + } + } else if this.B != nil { + return 1 + } else if that1.B != nil { + return -1 + } + if c := this.C.Compare(that1.C); c != 0 { + return c + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NinOptNativeDefault) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NinOptNativeDefault) + if !ok { + that2, ok := that.(NinOptNativeDefault) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + if *this.Field1 < *that1.Field1 { + return -1 + } + return 1 + } + } else if this.Field1 != nil { + return 1 + } else if that1.Field1 != nil { + return -1 + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + if *this.Field2 < *that1.Field2 { + return -1 + } + return 1 + } + } else if this.Field2 != nil { + return 1 + } else if that1.Field2 != nil { + return -1 + } + if this.Field3 != nil && that1.Field3 != nil { + if *this.Field3 != *that1.Field3 { + if *this.Field3 < *that1.Field3 { + return -1 + } + return 1 + } + } else if this.Field3 != nil { + return 1 + } else if that1.Field3 != nil { + return -1 + } + if this.Field4 != nil && that1.Field4 != nil { + if *this.Field4 != *that1.Field4 { + if *this.Field4 < *that1.Field4 { + return -1 + } + return 1 + } + } else if this.Field4 != nil { + return 1 + } else if that1.Field4 != nil { + return -1 + } + if this.Field5 != nil && that1.Field5 != nil { + if *this.Field5 != *that1.Field5 { + if *this.Field5 < *that1.Field5 { + return -1 + } + return 1 + } + } else if this.Field5 != nil { + return 1 + } else if that1.Field5 != nil { + return -1 + } + if this.Field6 != nil && that1.Field6 != nil { + if *this.Field6 != *that1.Field6 { + if *this.Field6 < *that1.Field6 { + return -1 + } + return 1 + } + } else if this.Field6 != nil { + return 1 + } else if that1.Field6 != nil { + return -1 + } + if this.Field7 != nil && that1.Field7 != nil { + if *this.Field7 != *that1.Field7 { + if *this.Field7 < *that1.Field7 { + return -1 + } + return 1 + } + } else if this.Field7 != nil { + return 1 + } else if that1.Field7 != nil { + return -1 + } + if this.Field8 != nil && that1.Field8 != nil { + if *this.Field8 != *that1.Field8 { + if *this.Field8 < *that1.Field8 { + return -1 + } + return 1 + } + } else if this.Field8 != nil { + return 1 + } else if that1.Field8 != nil { + return -1 + } + if this.Field9 != nil && that1.Field9 != nil { + if *this.Field9 != *that1.Field9 { + if *this.Field9 < *that1.Field9 { + return -1 + } + return 1 + } + } else if this.Field9 != nil { + return 1 + } else if that1.Field9 != nil { + return -1 + } + if this.Field10 != nil && that1.Field10 != nil { + if *this.Field10 != *that1.Field10 { + if *this.Field10 < *that1.Field10 { + return -1 + } + return 1 + } + } else if this.Field10 != nil { + return 1 + } else if that1.Field10 != nil { + return -1 + } + if this.Field11 != nil && that1.Field11 != nil { + if *this.Field11 != *that1.Field11 { + if *this.Field11 < *that1.Field11 { + return -1 + } + return 1 + } + } else if this.Field11 != nil { + return 1 + } else if that1.Field11 != nil { + return -1 + } + if this.Field12 != nil && that1.Field12 != nil { + if *this.Field12 != *that1.Field12 { + if *this.Field12 < *that1.Field12 { + return -1 + } + return 1 + } + } else if this.Field12 != nil { + return 1 + } else if that1.Field12 != nil { + return -1 + } + if this.Field13 != nil && that1.Field13 != nil { + if *this.Field13 != *that1.Field13 { + if !*this.Field13 { + return -1 + } + return 1 + } + } else if this.Field13 != nil { + return 1 + } else if that1.Field13 != nil { + return -1 + } + if this.Field14 != nil && that1.Field14 != nil { + if *this.Field14 != *that1.Field14 { + if *this.Field14 < *that1.Field14 { + return -1 + } + return 1 + } + } else if this.Field14 != nil { + return 1 + } else if that1.Field14 != nil { + return -1 + } + if c := bytes.Compare(this.Field15, that1.Field15); c != 0 { + return c + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *CustomContainer) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*CustomContainer) + if !ok { + that2, ok := that.(CustomContainer) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if c := this.CustomStruct.Compare(&that1.CustomStruct); c != 0 { + return c + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *CustomNameNidOptNative) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*CustomNameNidOptNative) + if !ok { + that2, ok := that.(CustomNameNidOptNative) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.FieldA != that1.FieldA { + if this.FieldA < that1.FieldA { + return -1 + } + return 1 + } + if this.FieldB != that1.FieldB { + if this.FieldB < that1.FieldB { + return -1 + } + return 1 + } + if this.FieldC != that1.FieldC { + if this.FieldC < that1.FieldC { + return -1 + } + return 1 + } + if this.FieldD != that1.FieldD { + if this.FieldD < that1.FieldD { + return -1 + } + return 1 + } + if this.FieldE != that1.FieldE { + if this.FieldE < that1.FieldE { + return -1 + } + return 1 + } + if this.FieldF != that1.FieldF { + if this.FieldF < that1.FieldF { + return -1 + } + return 1 + } + if this.FieldG != that1.FieldG { + if this.FieldG < that1.FieldG { + return -1 + } + return 1 + } + if this.FieldH != that1.FieldH { + if this.FieldH < that1.FieldH { + return -1 + } + return 1 + } + if this.FieldI != that1.FieldI { + if this.FieldI < that1.FieldI { + return -1 + } + return 1 + } + if this.FieldJ != that1.FieldJ { + if this.FieldJ < that1.FieldJ { + return -1 + } + return 1 + } + if this.FieldK != that1.FieldK { + if this.FieldK < that1.FieldK { + return -1 + } + return 1 + } + if this.FieldL != that1.FieldL { + if this.FieldL < that1.FieldL { + return -1 + } + return 1 + } + if this.FieldM != that1.FieldM { + if !this.FieldM { + return -1 + } + return 1 + } + if this.FieldN != that1.FieldN { + if this.FieldN < that1.FieldN { + return -1 + } + return 1 + } + if c := bytes.Compare(this.FieldO, that1.FieldO); c != 0 { + return c + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *CustomNameNinOptNative) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*CustomNameNinOptNative) + if !ok { + that2, ok := that.(CustomNameNinOptNative) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.FieldA != nil && that1.FieldA != nil { + if *this.FieldA != *that1.FieldA { + if *this.FieldA < *that1.FieldA { + return -1 + } + return 1 + } + } else if this.FieldA != nil { + return 1 + } else if that1.FieldA != nil { + return -1 + } + if this.FieldB != nil && that1.FieldB != nil { + if *this.FieldB != *that1.FieldB { + if *this.FieldB < *that1.FieldB { + return -1 + } + return 1 + } + } else if this.FieldB != nil { + return 1 + } else if that1.FieldB != nil { + return -1 + } + if this.FieldC != nil && that1.FieldC != nil { + if *this.FieldC != *that1.FieldC { + if *this.FieldC < *that1.FieldC { + return -1 + } + return 1 + } + } else if this.FieldC != nil { + return 1 + } else if that1.FieldC != nil { + return -1 + } + if this.FieldD != nil && that1.FieldD != nil { + if *this.FieldD != *that1.FieldD { + if *this.FieldD < *that1.FieldD { + return -1 + } + return 1 + } + } else if this.FieldD != nil { + return 1 + } else if that1.FieldD != nil { + return -1 + } + if this.FieldE != nil && that1.FieldE != nil { + if *this.FieldE != *that1.FieldE { + if *this.FieldE < *that1.FieldE { + return -1 + } + return 1 + } + } else if this.FieldE != nil { + return 1 + } else if that1.FieldE != nil { + return -1 + } + if this.FieldF != nil && that1.FieldF != nil { + if *this.FieldF != *that1.FieldF { + if *this.FieldF < *that1.FieldF { + return -1 + } + return 1 + } + } else if this.FieldF != nil { + return 1 + } else if that1.FieldF != nil { + return -1 + } + if this.FieldG != nil && that1.FieldG != nil { + if *this.FieldG != *that1.FieldG { + if *this.FieldG < *that1.FieldG { + return -1 + } + return 1 + } + } else if this.FieldG != nil { + return 1 + } else if that1.FieldG != nil { + return -1 + } + if this.FieldH != nil && that1.FieldH != nil { + if *this.FieldH != *that1.FieldH { + if *this.FieldH < *that1.FieldH { + return -1 + } + return 1 + } + } else if this.FieldH != nil { + return 1 + } else if that1.FieldH != nil { + return -1 + } + if this.FieldI != nil && that1.FieldI != nil { + if *this.FieldI != *that1.FieldI { + if *this.FieldI < *that1.FieldI { + return -1 + } + return 1 + } + } else if this.FieldI != nil { + return 1 + } else if that1.FieldI != nil { + return -1 + } + if this.FieldJ != nil && that1.FieldJ != nil { + if *this.FieldJ != *that1.FieldJ { + if *this.FieldJ < *that1.FieldJ { + return -1 + } + return 1 + } + } else if this.FieldJ != nil { + return 1 + } else if that1.FieldJ != nil { + return -1 + } + if this.FieldK != nil && that1.FieldK != nil { + if *this.FieldK != *that1.FieldK { + if *this.FieldK < *that1.FieldK { + return -1 + } + return 1 + } + } else if this.FieldK != nil { + return 1 + } else if that1.FieldK != nil { + return -1 + } + if this.FielL != nil && that1.FielL != nil { + if *this.FielL != *that1.FielL { + if *this.FielL < *that1.FielL { + return -1 + } + return 1 + } + } else if this.FielL != nil { + return 1 + } else if that1.FielL != nil { + return -1 + } + if this.FieldM != nil && that1.FieldM != nil { + if *this.FieldM != *that1.FieldM { + if !*this.FieldM { + return -1 + } + return 1 + } + } else if this.FieldM != nil { + return 1 + } else if that1.FieldM != nil { + return -1 + } + if this.FieldN != nil && that1.FieldN != nil { + if *this.FieldN != *that1.FieldN { + if *this.FieldN < *that1.FieldN { + return -1 + } + return 1 + } + } else if this.FieldN != nil { + return 1 + } else if that1.FieldN != nil { + return -1 + } + if c := bytes.Compare(this.FieldO, that1.FieldO); c != 0 { + return c + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *CustomNameNinRepNative) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*CustomNameNinRepNative) + if !ok { + that2, ok := that.(CustomNameNinRepNative) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if len(this.FieldA) != len(that1.FieldA) { + if len(this.FieldA) < len(that1.FieldA) { + return -1 + } + return 1 + } + for i := range this.FieldA { + if this.FieldA[i] != that1.FieldA[i] { + if this.FieldA[i] < that1.FieldA[i] { + return -1 + } + return 1 + } + } + if len(this.FieldB) != len(that1.FieldB) { + if len(this.FieldB) < len(that1.FieldB) { + return -1 + } + return 1 + } + for i := range this.FieldB { + if this.FieldB[i] != that1.FieldB[i] { + if this.FieldB[i] < that1.FieldB[i] { + return -1 + } + return 1 + } + } + if len(this.FieldC) != len(that1.FieldC) { + if len(this.FieldC) < len(that1.FieldC) { + return -1 + } + return 1 + } + for i := range this.FieldC { + if this.FieldC[i] != that1.FieldC[i] { + if this.FieldC[i] < that1.FieldC[i] { + return -1 + } + return 1 + } + } + if len(this.FieldD) != len(that1.FieldD) { + if len(this.FieldD) < len(that1.FieldD) { + return -1 + } + return 1 + } + for i := range this.FieldD { + if this.FieldD[i] != that1.FieldD[i] { + if this.FieldD[i] < that1.FieldD[i] { + return -1 + } + return 1 + } + } + if len(this.FieldE) != len(that1.FieldE) { + if len(this.FieldE) < len(that1.FieldE) { + return -1 + } + return 1 + } + for i := range this.FieldE { + if this.FieldE[i] != that1.FieldE[i] { + if this.FieldE[i] < that1.FieldE[i] { + return -1 + } + return 1 + } + } + if len(this.FieldF) != len(that1.FieldF) { + if len(this.FieldF) < len(that1.FieldF) { + return -1 + } + return 1 + } + for i := range this.FieldF { + if this.FieldF[i] != that1.FieldF[i] { + if this.FieldF[i] < that1.FieldF[i] { + return -1 + } + return 1 + } + } + if len(this.FieldG) != len(that1.FieldG) { + if len(this.FieldG) < len(that1.FieldG) { + return -1 + } + return 1 + } + for i := range this.FieldG { + if this.FieldG[i] != that1.FieldG[i] { + if this.FieldG[i] < that1.FieldG[i] { + return -1 + } + return 1 + } + } + if len(this.FieldH) != len(that1.FieldH) { + if len(this.FieldH) < len(that1.FieldH) { + return -1 + } + return 1 + } + for i := range this.FieldH { + if this.FieldH[i] != that1.FieldH[i] { + if this.FieldH[i] < that1.FieldH[i] { + return -1 + } + return 1 + } + } + if len(this.FieldI) != len(that1.FieldI) { + if len(this.FieldI) < len(that1.FieldI) { + return -1 + } + return 1 + } + for i := range this.FieldI { + if this.FieldI[i] != that1.FieldI[i] { + if this.FieldI[i] < that1.FieldI[i] { + return -1 + } + return 1 + } + } + if len(this.FieldJ) != len(that1.FieldJ) { + if len(this.FieldJ) < len(that1.FieldJ) { + return -1 + } + return 1 + } + for i := range this.FieldJ { + if this.FieldJ[i] != that1.FieldJ[i] { + if this.FieldJ[i] < that1.FieldJ[i] { + return -1 + } + return 1 + } + } + if len(this.FieldK) != len(that1.FieldK) { + if len(this.FieldK) < len(that1.FieldK) { + return -1 + } + return 1 + } + for i := range this.FieldK { + if this.FieldK[i] != that1.FieldK[i] { + if this.FieldK[i] < that1.FieldK[i] { + return -1 + } + return 1 + } + } + if len(this.FieldL) != len(that1.FieldL) { + if len(this.FieldL) < len(that1.FieldL) { + return -1 + } + return 1 + } + for i := range this.FieldL { + if this.FieldL[i] != that1.FieldL[i] { + if this.FieldL[i] < that1.FieldL[i] { + return -1 + } + return 1 + } + } + if len(this.FieldM) != len(that1.FieldM) { + if len(this.FieldM) < len(that1.FieldM) { + return -1 + } + return 1 + } + for i := range this.FieldM { + if this.FieldM[i] != that1.FieldM[i] { + if !this.FieldM[i] { + return -1 + } + return 1 + } + } + if len(this.FieldN) != len(that1.FieldN) { + if len(this.FieldN) < len(that1.FieldN) { + return -1 + } + return 1 + } + for i := range this.FieldN { + if this.FieldN[i] != that1.FieldN[i] { + if this.FieldN[i] < that1.FieldN[i] { + return -1 + } + return 1 + } + } + if len(this.FieldO) != len(that1.FieldO) { + if len(this.FieldO) < len(that1.FieldO) { + return -1 + } + return 1 + } + for i := range this.FieldO { + if c := bytes.Compare(this.FieldO[i], that1.FieldO[i]); c != 0 { + return c + } + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *CustomNameNinStruct) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*CustomNameNinStruct) + if !ok { + that2, ok := that.(CustomNameNinStruct) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.FieldA != nil && that1.FieldA != nil { + if *this.FieldA != *that1.FieldA { + if *this.FieldA < *that1.FieldA { + return -1 + } + return 1 + } + } else if this.FieldA != nil { + return 1 + } else if that1.FieldA != nil { + return -1 + } + if this.FieldB != nil && that1.FieldB != nil { + if *this.FieldB != *that1.FieldB { + if *this.FieldB < *that1.FieldB { + return -1 + } + return 1 + } + } else if this.FieldB != nil { + return 1 + } else if that1.FieldB != nil { + return -1 + } + if c := this.FieldC.Compare(that1.FieldC); c != 0 { + return c + } + if len(this.FieldD) != len(that1.FieldD) { + if len(this.FieldD) < len(that1.FieldD) { + return -1 + } + return 1 + } + for i := range this.FieldD { + if c := this.FieldD[i].Compare(that1.FieldD[i]); c != 0 { + return c + } + } + if this.FieldE != nil && that1.FieldE != nil { + if *this.FieldE != *that1.FieldE { + if *this.FieldE < *that1.FieldE { + return -1 + } + return 1 + } + } else if this.FieldE != nil { + return 1 + } else if that1.FieldE != nil { + return -1 + } + if this.FieldF != nil && that1.FieldF != nil { + if *this.FieldF != *that1.FieldF { + if *this.FieldF < *that1.FieldF { + return -1 + } + return 1 + } + } else if this.FieldF != nil { + return 1 + } else if that1.FieldF != nil { + return -1 + } + if c := this.FieldG.Compare(that1.FieldG); c != 0 { + return c + } + if this.FieldH != nil && that1.FieldH != nil { + if *this.FieldH != *that1.FieldH { + if !*this.FieldH { + return -1 + } + return 1 + } + } else if this.FieldH != nil { + return 1 + } else if that1.FieldH != nil { + return -1 + } + if this.FieldI != nil && that1.FieldI != nil { + if *this.FieldI != *that1.FieldI { + if *this.FieldI < *that1.FieldI { + return -1 + } + return 1 + } + } else if this.FieldI != nil { + return 1 + } else if that1.FieldI != nil { + return -1 + } + if c := bytes.Compare(this.FieldJ, that1.FieldJ); c != 0 { + return c + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *CustomNameCustomType) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*CustomNameCustomType) + if !ok { + that2, ok := that.(CustomNameCustomType) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if that1.FieldA == nil { + if this.FieldA != nil { + return 1 + } + } else if this.FieldA == nil { + return -1 + } else if c := this.FieldA.Compare(*that1.FieldA); c != 0 { + return c + } + if that1.FieldB == nil { + if this.FieldB != nil { + return 1 + } + } else if this.FieldB == nil { + return -1 + } else if c := this.FieldB.Compare(*that1.FieldB); c != 0 { + return c + } + if len(this.FieldC) != len(that1.FieldC) { + if len(this.FieldC) < len(that1.FieldC) { + return -1 + } + return 1 + } + for i := range this.FieldC { + if c := this.FieldC[i].Compare(that1.FieldC[i]); c != 0 { + return c + } + } + if len(this.FieldD) != len(that1.FieldD) { + if len(this.FieldD) < len(that1.FieldD) { + return -1 + } + return 1 + } + for i := range this.FieldD { + if c := this.FieldD[i].Compare(that1.FieldD[i]); c != 0 { + return c + } + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *CustomNameNinEmbeddedStructUnion) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*CustomNameNinEmbeddedStructUnion) + if !ok { + that2, ok := that.(CustomNameNinEmbeddedStructUnion) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if c := this.NidOptNative.Compare(that1.NidOptNative); c != 0 { + return c + } + if c := this.FieldA.Compare(that1.FieldA); c != 0 { + return c + } + if this.FieldB != nil && that1.FieldB != nil { + if *this.FieldB != *that1.FieldB { + if !*this.FieldB { + return -1 + } + return 1 + } + } else if this.FieldB != nil { + return 1 + } else if that1.FieldB != nil { + return -1 + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *CustomNameEnum) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*CustomNameEnum) + if !ok { + that2, ok := that.(CustomNameEnum) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.FieldA != nil && that1.FieldA != nil { + if *this.FieldA != *that1.FieldA { + if *this.FieldA < *that1.FieldA { + return -1 + } + return 1 + } + } else if this.FieldA != nil { + return 1 + } else if that1.FieldA != nil { + return -1 + } + if len(this.FieldB) != len(that1.FieldB) { + if len(this.FieldB) < len(that1.FieldB) { + return -1 + } + return 1 + } + for i := range this.FieldB { + if this.FieldB[i] != that1.FieldB[i] { + if this.FieldB[i] < that1.FieldB[i] { + return -1 + } + return 1 + } + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NoExtensionsMap) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NoExtensionsMap) + if !ok { + that2, ok := that.(NoExtensionsMap) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + if *this.Field1 < *that1.Field1 { + return -1 + } + return 1 + } + } else if this.Field1 != nil { + return 1 + } else if that1.Field1 != nil { + return -1 + } + if c := bytes.Compare(this.XXX_extensions, that1.XXX_extensions); c != 0 { + return c + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *Unrecognized) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*Unrecognized) + if !ok { + that2, ok := that.(Unrecognized) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + if *this.Field1 < *that1.Field1 { + return -1 + } + return 1 + } + } else if this.Field1 != nil { + return 1 + } else if that1.Field1 != nil { + return -1 + } + return 0 +} +func (this *UnrecognizedWithInner) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*UnrecognizedWithInner) + if !ok { + that2, ok := that.(UnrecognizedWithInner) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if len(this.Embedded) != len(that1.Embedded) { + if len(this.Embedded) < len(that1.Embedded) { + return -1 + } + return 1 + } + for i := range this.Embedded { + if c := this.Embedded[i].Compare(that1.Embedded[i]); c != 0 { + return c + } + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + if *this.Field2 < *that1.Field2 { + return -1 + } + return 1 + } + } else if this.Field2 != nil { + return 1 + } else if that1.Field2 != nil { + return -1 + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *UnrecognizedWithInner_Inner) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*UnrecognizedWithInner_Inner) + if !ok { + that2, ok := that.(UnrecognizedWithInner_Inner) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + if *this.Field1 < *that1.Field1 { + return -1 + } + return 1 + } + } else if this.Field1 != nil { + return 1 + } else if that1.Field1 != nil { + return -1 + } + return 0 +} +func (this *UnrecognizedWithEmbed) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*UnrecognizedWithEmbed) + if !ok { + that2, ok := that.(UnrecognizedWithEmbed) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if c := this.UnrecognizedWithEmbed_Embedded.Compare(&that1.UnrecognizedWithEmbed_Embedded); c != 0 { + return c + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + if *this.Field2 < *that1.Field2 { + return -1 + } + return 1 + } + } else if this.Field2 != nil { + return 1 + } else if that1.Field2 != nil { + return -1 + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *UnrecognizedWithEmbed_Embedded) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*UnrecognizedWithEmbed_Embedded) + if !ok { + that2, ok := that.(UnrecognizedWithEmbed_Embedded) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + if *this.Field1 < *that1.Field1 { + return -1 + } + return 1 + } + } else if this.Field1 != nil { + return 1 + } else if that1.Field1 != nil { + return -1 + } + return 0 +} +func (this *Node) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*Node) + if !ok { + that2, ok := that.(Node) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.Label != nil && that1.Label != nil { + if *this.Label != *that1.Label { + if *this.Label < *that1.Label { + return -1 + } + return 1 + } + } else if this.Label != nil { + return 1 + } else if that1.Label != nil { + return -1 + } + if len(this.Children) != len(that1.Children) { + if len(this.Children) < len(that1.Children) { + return -1 + } + return 1 + } + for i := range this.Children { + if c := this.Children[i].Compare(that1.Children[i]); c != 0 { + return c + } + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NidOptNative) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NinOptNative) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NidRepNative) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NinRepNative) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NidRepPackedNative) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NinRepPackedNative) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NidOptStruct) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NinOptStruct) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NidRepStruct) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NinRepStruct) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NidEmbeddedStruct) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NinEmbeddedStruct) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NidNestedStruct) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NinNestedStruct) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NidOptCustom) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *CustomDash) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NinOptCustom) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NidRepCustom) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NinRepCustom) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NinOptNativeUnion) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NinOptStructUnion) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NinEmbeddedStructUnion) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NinNestedStructUnion) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *Tree) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *OrBranch) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *AndBranch) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *Leaf) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *DeepTree) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *ADeepBranch) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *AndDeepBranch) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *DeepLeaf) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *Nil) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NidOptEnum) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NinOptEnum) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NidRepEnum) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NinRepEnum) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NinOptEnumDefault) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *AnotherNinOptEnum) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *AnotherNinOptEnumDefault) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *Timer) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *MyExtendable) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *OtherExtenable) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NestedDefinition) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NestedDefinition_NestedMessage) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NestedDefinition_NestedMessage_NestedNestedMsg) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NestedScope) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NinOptNativeDefault) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *CustomContainer) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *CustomNameNidOptNative) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *CustomNameNinOptNative) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *CustomNameNinRepNative) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *CustomNameNinStruct) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *CustomNameCustomType) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *CustomNameNinEmbeddedStructUnion) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *CustomNameEnum) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NoExtensionsMap) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *Unrecognized) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *UnrecognizedWithInner) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *UnrecognizedWithInner_Inner) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *UnrecognizedWithEmbed) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *UnrecognizedWithEmbed_Embedded) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *Node) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func ThetestDescription() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + d := &github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet{} + var gzipped = []byte{ + // 6123 bytes of a gzipped FileDescriptorSet + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xcc, 0x5c, 0x6b, 0x6c, 0x23, 0xd7, + 0x75, 0xde, 0xe1, 0x90, 0x12, 0x75, 0x28, 0x51, 0xd4, 0xac, 0x56, 0xa6, 0xe5, 0xf5, 0x3e, 0x68, + 0x59, 0x96, 0x15, 0x5b, 0xaf, 0xd5, 0xbe, 0xe8, 0xc4, 0x01, 0x5f, 0x2b, 0x6b, 0xab, 0x57, 0x47, + 0x52, 0x62, 0xa7, 0x05, 0x08, 0x2e, 0x39, 0x92, 0x68, 0x53, 0x43, 0x96, 0x43, 0xda, 0xde, 0xfc, + 0x28, 0x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xd4, 0xa0, + 0xde, 0xeb, 0xb8, 0xd2, 0x42, 0x61, 0xd3, 0x69, 0xdf, 0x26, 0xdd, 0x5b, 0xdc, 0x8c, 0xa3, 0x81, + 0x12, 0xfe, 0xfc, 0xfa, 0xf9, 0xc0, 0x6b, 0xc7, 0x7f, 0xd7, 0x61, 0xd4, 0xdb, 0xc1, 0xe1, 0x86, + 0xb8, 0x4a, 0xca, 0xbc, 0x46, 0xaa, 0xc0, 0x03, 0x03, 0xfb, 0xbd, 0x85, 0x02, 0xae, 0xff, 0xd9, + 0x21, 0xda, 0x57, 0x99, 0x14, 0x89, 0xe7, 0x5e, 0x1c, 0x6b, 0x16, 0xed, 0xd6, 0xe3, 0x26, 0xfb, + 0x84, 0x8a, 0xdd, 0xd0, 0xd3, 0x0e, 0x91, 0x3d, 0x44, 0x64, 0xcf, 0x0c, 0x96, 0x7d, 0x73, 0x97, + 0x08, 0x1f, 0xb9, 0xb9, 0x5b, 0xde, 0xda, 0x36, 0x37, 0x73, 0x1b, 0x26, 0x83, 0x1b, 0xf7, 0x42, + 0xb4, 0x51, 0x79, 0xfb, 0x6d, 0x79, 0xa6, 0x20, 0x43, 0x61, 0x0d, 0x8f, 0x24, 0xe0, 0x25, 0x0f, + 0xb9, 0x3e, 0x93, 0xa1, 0xd7, 0x31, 0xf4, 0x17, 0x21, 0x46, 0xec, 0x65, 0x00, 0x30, 0x8b, 0xa5, + 0x4e, 0x19, 0x71, 0x88, 0x16, 0xb6, 0x4d, 0x1c, 0xfe, 0x28, 0xde, 0xe9, 0x68, 0x79, 0x67, 0xbd, + 0x54, 0x40, 0x19, 0x90, 0xb9, 0x0c, 0x43, 0xd4, 0x08, 0x38, 0x35, 0x84, 0x19, 0x10, 0x88, 0x7e, + 0x64, 0x32, 0x34, 0x4e, 0xdd, 0xdf, 0xcc, 0x97, 0xcc, 0x54, 0xc4, 0xeb, 0xde, 0x2f, 0x69, 0x90, + 0xf0, 0x34, 0x54, 0x78, 0x2a, 0xaf, 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0x95, 0x3d, 0xb1, 0x46, 0x91, 0xb9, 0x46, 0x23, 0xbb, + 0x0f, 0xf7, 0xf8, 0x78, 0x36, 0x84, 0xcc, 0x0f, 0x32, 0x99, 0x93, 0x3d, 0xde, 0xc5, 0x62, 0x77, + 0x80, 0x8f, 0x0b, 0x7f, 0x84, 0x90, 0xf9, 0x21, 0x26, 0xd3, 0x60, 0x58, 0xee, 0x16, 0x2c, 0xf1, + 0x26, 0x4c, 0xa0, 0x27, 0xf5, 0x5b, 0x4d, 0x87, 0x3d, 0xf7, 0x86, 0x10, 0xf7, 0x61, 0x26, 0x6e, + 0x9c, 0x01, 0xc9, 0x53, 0x30, 0x96, 0x75, 0x1d, 0xe2, 0x07, 0xe8, 0x01, 0x28, 0x84, 0x88, 0x8f, + 0x30, 0x11, 0xc3, 0x98, 0x1f, 0x43, 0x73, 0x30, 0x7a, 0xd8, 0x64, 0x65, 0x38, 0x18, 0xfe, 0x51, + 0x06, 0x4f, 0x70, 0x0c, 0x13, 0xd1, 0x6a, 0xb6, 0xba, 0x0d, 0x5c, 0xa3, 0x83, 0x45, 0x7c, 0x8c, + 0x8b, 0xe0, 0x18, 0x26, 0xe2, 0x04, 0x66, 0x7d, 0x81, 0x8b, 0x70, 0x3c, 0xf6, 0x7c, 0x33, 0x5e, + 0xeb, 0x6d, 0xdc, 0x6e, 0xda, 0x61, 0x94, 0xf8, 0x38, 0x93, 0x00, 0x0c, 0x82, 0x05, 0x3c, 0x06, + 0x23, 0x61, 0x1d, 0xf1, 0x49, 0x06, 0x8f, 0x5b, 0xdc, 0x03, 0x28, 0xcf, 0x78, 0x91, 0xc1, 0x7b, + 0x2b, 0xc1, 0x22, 0xfe, 0x84, 0x89, 0x48, 0x7a, 0x60, 0xec, 0x36, 0x3a, 0x96, 0xd3, 0x41, 0x8f, + 0xea, 0x21, 0x84, 0x7c, 0x8a, 0xdf, 0x06, 0x83, 0x30, 0x53, 0xde, 0xb2, 0xec, 0xea, 0x51, 0x38, + 0x09,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x09, 0xbd, 0x8c, 0x12, + 0x7a, 0xe0, 0x13, 0x76, 0x19, 0x25, 0xec, 0xc0, 0x27, 0xe4, 0x32, 0x4a, 0xc8, 0x81, 0x4f, 0xb8, + 0x65, 0x94, 0x70, 0x03, 0x9f, 0x50, 0xcb, 0x28, 0xa1, 0x06, 0x3e, 0x61, 0x96, 0x51, 0xc2, 0x0c, + 0x7c, 0x42, 0x2c, 0xa3, 0x84, 0x18, 0xf8, 0x84, 0x57, 0x46, 0x09, 0x2f, 0xf0, 0x09, 0xad, 0x19, + 0x35, 0xb4, 0xc0, 0x2f, 0xac, 0x66, 0xd4, 0xb0, 0x02, 0xbf, 0x90, 0x7a, 0x40, 0x0d, 0xa9, 0x11, + 0xc4, 0x15, 0xc3, 0x43, 0x9e, 0x68, 0x9a, 0x51, 0xa3, 0x09, 0xfc, 0x22, 0x69, 0x46, 0x8d, 0x24, + 0xf0, 0x8b, 0xa2, 0x19, 0x35, 0x8a, 0xc0, 0x2f, 0x82, 0x5e, 0x52, 0x23, 0xc8, 0x3d, 0xe2, 0x93, + 0x51, 0x76, 0x14, 0x83, 0x22, 0x48, 0x0f, 0x11, 0x41, 0x7a, 0x88, 0x08, 0xd2, 0x43, 0x44, 0x90, + 0x1e, 0x22, 0x82, 0xf4, 0x10, 0x11, 0xa4, 0x87, 0x88, 0x20, 0x3d, 0x44, 0x04, 0xe9, 0x61, 0x22, + 0x48, 0x0f, 0x15, 0x41, 0x7a, 0xbf, 0x08, 0x9a, 0x51, 0x0f, 0x3c, 0x80, 0x5f, 0x41, 0x9a, 0x51, + 0x77, 0x3e, 0x83, 0x43, 0x48, 0x0f, 0x15, 0x42, 0x7a, 0xbf, 0x10, 0xfa, 0x32, 0x6a, 0xa4, 0xa4, + 0x10, 0x62, 0xdb, 0x43, 0xaf, 0x55, 0x05, 0xba, 0x12, 0xe2, 0x7c, 0x85, 0x5f, 0x4c, 0x5d, 0x09, + 0xb1, 0x47, 0x3d, 0x28, 0xce, 0x7a, 0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d7, 0xd1, 0xfb, 0xef, 0xa0, 0xbf, 0xdf, 0x43, 0x7f, 0x7f, 0x88, 0x5e, + 0xef, 0xf8, 0xd6, 0xb9, 0x53, 0x2f, 0xa0, 0xd7, 0x8b, 0xdf, 0x3a, 0xa7, 0xfd, 0x7f, 0x00, 0x00, + 0x00, 0xff, 0xff, 0xde, 0xd7, 0x3e, 0x4d, 0x20, 0x5f, 0x00, 0x00, + } + r := bytes.NewReader(gzipped) + gzipr, err := compress_gzip.NewReader(r) + if err != nil { + panic(err) + } + ungzipped, err := io_ioutil.ReadAll(gzipr) + if err != nil { + panic(err) + } + if err := github_com_gogo_protobuf_proto.Unmarshal(ungzipped, d); err != nil { + panic(err) + } + return d +} +func (x TheTestEnum) String() string { + s, ok := TheTestEnum_name[int32(x)] + if ok { + return s + } + return strconv.Itoa(int(x)) +} +func (x AnotherTestEnum) String() string { + s, ok := AnotherTestEnum_name[int32(x)] + if ok { + return s + } + return strconv.Itoa(int(x)) +} +func (x YetAnotherTestEnum) String() string { + s, ok := YetAnotherTestEnum_name[int32(x)] + if ok { + return s + } + return strconv.Itoa(int(x)) +} +func (x YetYetAnotherTestEnum) String() string { + s, ok := YetYetAnotherTestEnum_name[int32(x)] + if ok { + return s + } + return strconv.Itoa(int(x)) +} +func (x NestedDefinition_NestedEnum) String() string { + s, ok := NestedDefinition_NestedEnum_name[int32(x)] + if ok { + return s + } + return strconv.Itoa(int(x)) +} +func (this *NidOptNative) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NidOptNative) + if !ok { + that2, ok := that.(NidOptNative) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NidOptNative") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NidOptNative but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NidOptNative but is not nil && this == nil") + } + if this.Field1 != that1.Field1 { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) + } + if this.Field2 != that1.Field2 { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) + } + if this.Field3 != that1.Field3 { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", this.Field3, that1.Field3) + } + if this.Field4 != that1.Field4 { + return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", this.Field4, that1.Field4) + } + if this.Field5 != that1.Field5 { + return fmt.Errorf("Field5 this(%v) Not Equal that(%v)", this.Field5, that1.Field5) + } + if this.Field6 != that1.Field6 { + return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", this.Field6, that1.Field6) + } + if this.Field7 != that1.Field7 { + return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", this.Field7, that1.Field7) + } + if this.Field8 != that1.Field8 { + return fmt.Errorf("Field8 this(%v) Not Equal that(%v)", this.Field8, that1.Field8) + } + if this.Field9 != that1.Field9 { + return fmt.Errorf("Field9 this(%v) Not Equal that(%v)", this.Field9, that1.Field9) + } + if this.Field10 != that1.Field10 { + return fmt.Errorf("Field10 this(%v) Not Equal that(%v)", this.Field10, that1.Field10) + } + if this.Field11 != that1.Field11 { + return fmt.Errorf("Field11 this(%v) Not Equal that(%v)", this.Field11, that1.Field11) + } + if this.Field12 != that1.Field12 { + return fmt.Errorf("Field12 this(%v) Not Equal that(%v)", this.Field12, that1.Field12) + } + if this.Field13 != that1.Field13 { + return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", this.Field13, that1.Field13) + } + if this.Field14 != that1.Field14 { + return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", this.Field14, that1.Field14) + } + if !bytes.Equal(this.Field15, that1.Field15) { + return fmt.Errorf("Field15 this(%v) Not Equal that(%v)", this.Field15, that1.Field15) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NidOptNative) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*NidOptNative) + if !ok { + that2, ok := that.(NidOptNative) + 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.Field1 != that1.Field1 { + return false + } + if this.Field2 != that1.Field2 { + return false + } + if this.Field3 != that1.Field3 { + return false + } + if this.Field4 != that1.Field4 { + return false + } + if this.Field5 != that1.Field5 { + return false + } + if this.Field6 != that1.Field6 { + return false + } + if this.Field7 != that1.Field7 { + return false + } + if this.Field8 != that1.Field8 { + return false + } + if this.Field9 != that1.Field9 { + return false + } + if this.Field10 != that1.Field10 { + return false + } + if this.Field11 != that1.Field11 { + return false + } + if this.Field12 != that1.Field12 { + return false + } + if this.Field13 != that1.Field13 { + return false + } + if this.Field14 != that1.Field14 { + return false + } + if !bytes.Equal(this.Field15, that1.Field15) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NinOptNative) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NinOptNative) + if !ok { + that2, ok := that.(NinOptNative) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NinOptNative") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NinOptNative but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NinOptNative but is not nil && this == nil") + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) + } + } else if this.Field1 != nil { + return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") + } else if that1.Field1 != nil { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", *this.Field2, *that1.Field2) + } + } else if this.Field2 != nil { + return fmt.Errorf("this.Field2 == nil && that.Field2 != nil") + } else if that1.Field2 != nil { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) + } + if this.Field3 != nil && that1.Field3 != nil { + if *this.Field3 != *that1.Field3 { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", *this.Field3, *that1.Field3) + } + } else if this.Field3 != nil { + return fmt.Errorf("this.Field3 == nil && that.Field3 != nil") + } else if that1.Field3 != nil { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", this.Field3, that1.Field3) + } + if this.Field4 != nil && that1.Field4 != nil { + if *this.Field4 != *that1.Field4 { + return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", *this.Field4, *that1.Field4) + } + } else if this.Field4 != nil { + return fmt.Errorf("this.Field4 == nil && that.Field4 != nil") + } else if that1.Field4 != nil { + return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", this.Field4, that1.Field4) + } + if this.Field5 != nil && that1.Field5 != nil { + if *this.Field5 != *that1.Field5 { + return fmt.Errorf("Field5 this(%v) Not Equal that(%v)", *this.Field5, *that1.Field5) + } + } else if this.Field5 != nil { + return fmt.Errorf("this.Field5 == nil && that.Field5 != nil") + } else if that1.Field5 != nil { + return fmt.Errorf("Field5 this(%v) Not Equal that(%v)", this.Field5, that1.Field5) + } + if this.Field6 != nil && that1.Field6 != nil { + if *this.Field6 != *that1.Field6 { + return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", *this.Field6, *that1.Field6) + } + } else if this.Field6 != nil { + return fmt.Errorf("this.Field6 == nil && that.Field6 != nil") + } else if that1.Field6 != nil { + return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", this.Field6, that1.Field6) + } + if this.Field7 != nil && that1.Field7 != nil { + if *this.Field7 != *that1.Field7 { + return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", *this.Field7, *that1.Field7) + } + } else if this.Field7 != nil { + return fmt.Errorf("this.Field7 == nil && that.Field7 != nil") + } else if that1.Field7 != nil { + return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", this.Field7, that1.Field7) + } + if this.Field8 != nil && that1.Field8 != nil { + if *this.Field8 != *that1.Field8 { + return fmt.Errorf("Field8 this(%v) Not Equal that(%v)", *this.Field8, *that1.Field8) + } + } else if this.Field8 != nil { + return fmt.Errorf("this.Field8 == nil && that.Field8 != nil") + } else if that1.Field8 != nil { + return fmt.Errorf("Field8 this(%v) Not Equal that(%v)", this.Field8, that1.Field8) + } + if this.Field9 != nil && that1.Field9 != nil { + if *this.Field9 != *that1.Field9 { + return fmt.Errorf("Field9 this(%v) Not Equal that(%v)", *this.Field9, *that1.Field9) + } + } else if this.Field9 != nil { + return fmt.Errorf("this.Field9 == nil && that.Field9 != nil") + } else if that1.Field9 != nil { + return fmt.Errorf("Field9 this(%v) Not Equal that(%v)", this.Field9, that1.Field9) + } + if this.Field10 != nil && that1.Field10 != nil { + if *this.Field10 != *that1.Field10 { + return fmt.Errorf("Field10 this(%v) Not Equal that(%v)", *this.Field10, *that1.Field10) + } + } else if this.Field10 != nil { + return fmt.Errorf("this.Field10 == nil && that.Field10 != nil") + } else if that1.Field10 != nil { + return fmt.Errorf("Field10 this(%v) Not Equal that(%v)", this.Field10, that1.Field10) + } + if this.Field11 != nil && that1.Field11 != nil { + if *this.Field11 != *that1.Field11 { + return fmt.Errorf("Field11 this(%v) Not Equal that(%v)", *this.Field11, *that1.Field11) + } + } else if this.Field11 != nil { + return fmt.Errorf("this.Field11 == nil && that.Field11 != nil") + } else if that1.Field11 != nil { + return fmt.Errorf("Field11 this(%v) Not Equal that(%v)", this.Field11, that1.Field11) + } + if this.Field12 != nil && that1.Field12 != nil { + if *this.Field12 != *that1.Field12 { + return fmt.Errorf("Field12 this(%v) Not Equal that(%v)", *this.Field12, *that1.Field12) + } + } else if this.Field12 != nil { + return fmt.Errorf("this.Field12 == nil && that.Field12 != nil") + } else if that1.Field12 != nil { + return fmt.Errorf("Field12 this(%v) Not Equal that(%v)", this.Field12, that1.Field12) + } + if this.Field13 != nil && that1.Field13 != nil { + if *this.Field13 != *that1.Field13 { + return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", *this.Field13, *that1.Field13) + } + } else if this.Field13 != nil { + return fmt.Errorf("this.Field13 == nil && that.Field13 != nil") + } else if that1.Field13 != nil { + return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", this.Field13, that1.Field13) + } + if this.Field14 != nil && that1.Field14 != nil { + if *this.Field14 != *that1.Field14 { + return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", *this.Field14, *that1.Field14) + } + } else if this.Field14 != nil { + return fmt.Errorf("this.Field14 == nil && that.Field14 != nil") + } else if that1.Field14 != nil { + return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", this.Field14, that1.Field14) + } + if !bytes.Equal(this.Field15, that1.Field15) { + return fmt.Errorf("Field15 this(%v) Not Equal that(%v)", this.Field15, that1.Field15) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NinOptNative) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*NinOptNative) + if !ok { + that2, ok := that.(NinOptNative) + 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.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return false + } + } else if this.Field1 != nil { + return false + } else if that1.Field1 != nil { + return false + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + return false + } + } else if this.Field2 != nil { + return false + } else if that1.Field2 != nil { + return false + } + if this.Field3 != nil && that1.Field3 != nil { + if *this.Field3 != *that1.Field3 { + return false + } + } else if this.Field3 != nil { + return false + } else if that1.Field3 != nil { + return false + } + if this.Field4 != nil && that1.Field4 != nil { + if *this.Field4 != *that1.Field4 { + return false + } + } else if this.Field4 != nil { + return false + } else if that1.Field4 != nil { + return false + } + if this.Field5 != nil && that1.Field5 != nil { + if *this.Field5 != *that1.Field5 { + return false + } + } else if this.Field5 != nil { + return false + } else if that1.Field5 != nil { + return false + } + if this.Field6 != nil && that1.Field6 != nil { + if *this.Field6 != *that1.Field6 { + return false + } + } else if this.Field6 != nil { + return false + } else if that1.Field6 != nil { + return false + } + if this.Field7 != nil && that1.Field7 != nil { + if *this.Field7 != *that1.Field7 { + return false + } + } else if this.Field7 != nil { + return false + } else if that1.Field7 != nil { + return false + } + if this.Field8 != nil && that1.Field8 != nil { + if *this.Field8 != *that1.Field8 { + return false + } + } else if this.Field8 != nil { + return false + } else if that1.Field8 != nil { + return false + } + if this.Field9 != nil && that1.Field9 != nil { + if *this.Field9 != *that1.Field9 { + return false + } + } else if this.Field9 != nil { + return false + } else if that1.Field9 != nil { + return false + } + if this.Field10 != nil && that1.Field10 != nil { + if *this.Field10 != *that1.Field10 { + return false + } + } else if this.Field10 != nil { + return false + } else if that1.Field10 != nil { + return false + } + if this.Field11 != nil && that1.Field11 != nil { + if *this.Field11 != *that1.Field11 { + return false + } + } else if this.Field11 != nil { + return false + } else if that1.Field11 != nil { + return false + } + if this.Field12 != nil && that1.Field12 != nil { + if *this.Field12 != *that1.Field12 { + return false + } + } else if this.Field12 != nil { + return false + } else if that1.Field12 != nil { + return false + } + if this.Field13 != nil && that1.Field13 != nil { + if *this.Field13 != *that1.Field13 { + return false + } + } else if this.Field13 != nil { + return false + } else if that1.Field13 != nil { + return false + } + if this.Field14 != nil && that1.Field14 != nil { + if *this.Field14 != *that1.Field14 { + return false + } + } else if this.Field14 != nil { + return false + } else if that1.Field14 != nil { + return false + } + if !bytes.Equal(this.Field15, that1.Field15) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NidRepNative) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NidRepNative) + if !ok { + that2, ok := that.(NidRepNative) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NidRepNative") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NidRepNative but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NidRepNative but is not nil && this == nil") + } + if len(this.Field1) != len(that1.Field1) { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", len(this.Field1), len(that1.Field1)) + } + for i := range this.Field1 { + if this.Field1[i] != that1.Field1[i] { + return fmt.Errorf("Field1 this[%v](%v) Not Equal that[%v](%v)", i, this.Field1[i], i, that1.Field1[i]) + } + } + if len(this.Field2) != len(that1.Field2) { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", len(this.Field2), len(that1.Field2)) + } + for i := range this.Field2 { + if this.Field2[i] != that1.Field2[i] { + return fmt.Errorf("Field2 this[%v](%v) Not Equal that[%v](%v)", i, this.Field2[i], i, that1.Field2[i]) + } + } + if len(this.Field3) != len(that1.Field3) { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", len(this.Field3), len(that1.Field3)) + } + for i := range this.Field3 { + if this.Field3[i] != that1.Field3[i] { + return fmt.Errorf("Field3 this[%v](%v) Not Equal that[%v](%v)", i, this.Field3[i], i, that1.Field3[i]) + } + } + if len(this.Field4) != len(that1.Field4) { + return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", len(this.Field4), len(that1.Field4)) + } + for i := range this.Field4 { + if this.Field4[i] != that1.Field4[i] { + return fmt.Errorf("Field4 this[%v](%v) Not Equal that[%v](%v)", i, this.Field4[i], i, that1.Field4[i]) + } + } + if len(this.Field5) != len(that1.Field5) { + return fmt.Errorf("Field5 this(%v) Not Equal that(%v)", len(this.Field5), len(that1.Field5)) + } + for i := range this.Field5 { + if this.Field5[i] != that1.Field5[i] { + return fmt.Errorf("Field5 this[%v](%v) Not Equal that[%v](%v)", i, this.Field5[i], i, that1.Field5[i]) + } + } + if len(this.Field6) != len(that1.Field6) { + return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", len(this.Field6), len(that1.Field6)) + } + for i := range this.Field6 { + if this.Field6[i] != that1.Field6[i] { + return fmt.Errorf("Field6 this[%v](%v) Not Equal that[%v](%v)", i, this.Field6[i], i, that1.Field6[i]) + } + } + if len(this.Field7) != len(that1.Field7) { + return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", len(this.Field7), len(that1.Field7)) + } + for i := range this.Field7 { + if this.Field7[i] != that1.Field7[i] { + return fmt.Errorf("Field7 this[%v](%v) Not Equal that[%v](%v)", i, this.Field7[i], i, that1.Field7[i]) + } + } + if len(this.Field8) != len(that1.Field8) { + return fmt.Errorf("Field8 this(%v) Not Equal that(%v)", len(this.Field8), len(that1.Field8)) + } + for i := range this.Field8 { + if this.Field8[i] != that1.Field8[i] { + return fmt.Errorf("Field8 this[%v](%v) Not Equal that[%v](%v)", i, this.Field8[i], i, that1.Field8[i]) + } + } + if len(this.Field9) != len(that1.Field9) { + return fmt.Errorf("Field9 this(%v) Not Equal that(%v)", len(this.Field9), len(that1.Field9)) + } + for i := range this.Field9 { + if this.Field9[i] != that1.Field9[i] { + return fmt.Errorf("Field9 this[%v](%v) Not Equal that[%v](%v)", i, this.Field9[i], i, that1.Field9[i]) + } + } + if len(this.Field10) != len(that1.Field10) { + return fmt.Errorf("Field10 this(%v) Not Equal that(%v)", len(this.Field10), len(that1.Field10)) + } + for i := range this.Field10 { + if this.Field10[i] != that1.Field10[i] { + return fmt.Errorf("Field10 this[%v](%v) Not Equal that[%v](%v)", i, this.Field10[i], i, that1.Field10[i]) + } + } + if len(this.Field11) != len(that1.Field11) { + return fmt.Errorf("Field11 this(%v) Not Equal that(%v)", len(this.Field11), len(that1.Field11)) + } + for i := range this.Field11 { + if this.Field11[i] != that1.Field11[i] { + return fmt.Errorf("Field11 this[%v](%v) Not Equal that[%v](%v)", i, this.Field11[i], i, that1.Field11[i]) + } + } + if len(this.Field12) != len(that1.Field12) { + return fmt.Errorf("Field12 this(%v) Not Equal that(%v)", len(this.Field12), len(that1.Field12)) + } + for i := range this.Field12 { + if this.Field12[i] != that1.Field12[i] { + return fmt.Errorf("Field12 this[%v](%v) Not Equal that[%v](%v)", i, this.Field12[i], i, that1.Field12[i]) + } + } + if len(this.Field13) != len(that1.Field13) { + return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", len(this.Field13), len(that1.Field13)) + } + for i := range this.Field13 { + if this.Field13[i] != that1.Field13[i] { + return fmt.Errorf("Field13 this[%v](%v) Not Equal that[%v](%v)", i, this.Field13[i], i, that1.Field13[i]) + } + } + if len(this.Field14) != len(that1.Field14) { + return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", len(this.Field14), len(that1.Field14)) + } + for i := range this.Field14 { + if this.Field14[i] != that1.Field14[i] { + return fmt.Errorf("Field14 this[%v](%v) Not Equal that[%v](%v)", i, this.Field14[i], i, that1.Field14[i]) + } + } + if len(this.Field15) != len(that1.Field15) { + return fmt.Errorf("Field15 this(%v) Not Equal that(%v)", len(this.Field15), len(that1.Field15)) + } + for i := range this.Field15 { + if !bytes.Equal(this.Field15[i], that1.Field15[i]) { + return fmt.Errorf("Field15 this[%v](%v) Not Equal that[%v](%v)", i, this.Field15[i], i, that1.Field15[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NidRepNative) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*NidRepNative) + if !ok { + that2, ok := that.(NidRepNative) + 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.Field1) != len(that1.Field1) { + return false + } + for i := range this.Field1 { + if this.Field1[i] != that1.Field1[i] { + return false + } + } + if len(this.Field2) != len(that1.Field2) { + return false + } + for i := range this.Field2 { + if this.Field2[i] != that1.Field2[i] { + return false + } + } + if len(this.Field3) != len(that1.Field3) { + return false + } + for i := range this.Field3 { + if this.Field3[i] != that1.Field3[i] { + return false + } + } + if len(this.Field4) != len(that1.Field4) { + return false + } + for i := range this.Field4 { + if this.Field4[i] != that1.Field4[i] { + return false + } + } + if len(this.Field5) != len(that1.Field5) { + return false + } + for i := range this.Field5 { + if this.Field5[i] != that1.Field5[i] { + return false + } + } + if len(this.Field6) != len(that1.Field6) { + return false + } + for i := range this.Field6 { + if this.Field6[i] != that1.Field6[i] { + return false + } + } + if len(this.Field7) != len(that1.Field7) { + return false + } + for i := range this.Field7 { + if this.Field7[i] != that1.Field7[i] { + return false + } + } + if len(this.Field8) != len(that1.Field8) { + return false + } + for i := range this.Field8 { + if this.Field8[i] != that1.Field8[i] { + return false + } + } + if len(this.Field9) != len(that1.Field9) { + return false + } + for i := range this.Field9 { + if this.Field9[i] != that1.Field9[i] { + return false + } + } + if len(this.Field10) != len(that1.Field10) { + return false + } + for i := range this.Field10 { + if this.Field10[i] != that1.Field10[i] { + return false + } + } + if len(this.Field11) != len(that1.Field11) { + return false + } + for i := range this.Field11 { + if this.Field11[i] != that1.Field11[i] { + return false + } + } + if len(this.Field12) != len(that1.Field12) { + return false + } + for i := range this.Field12 { + if this.Field12[i] != that1.Field12[i] { + return false + } + } + if len(this.Field13) != len(that1.Field13) { + return false + } + for i := range this.Field13 { + if this.Field13[i] != that1.Field13[i] { + return false + } + } + if len(this.Field14) != len(that1.Field14) { + return false + } + for i := range this.Field14 { + if this.Field14[i] != that1.Field14[i] { + return false + } + } + if len(this.Field15) != len(that1.Field15) { + return false + } + for i := range this.Field15 { + if !bytes.Equal(this.Field15[i], that1.Field15[i]) { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NinRepNative) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NinRepNative) + if !ok { + that2, ok := that.(NinRepNative) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NinRepNative") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NinRepNative but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NinRepNative but is not nil && this == nil") + } + if len(this.Field1) != len(that1.Field1) { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", len(this.Field1), len(that1.Field1)) + } + for i := range this.Field1 { + if this.Field1[i] != that1.Field1[i] { + return fmt.Errorf("Field1 this[%v](%v) Not Equal that[%v](%v)", i, this.Field1[i], i, that1.Field1[i]) + } + } + if len(this.Field2) != len(that1.Field2) { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", len(this.Field2), len(that1.Field2)) + } + for i := range this.Field2 { + if this.Field2[i] != that1.Field2[i] { + return fmt.Errorf("Field2 this[%v](%v) Not Equal that[%v](%v)", i, this.Field2[i], i, that1.Field2[i]) + } + } + if len(this.Field3) != len(that1.Field3) { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", len(this.Field3), len(that1.Field3)) + } + for i := range this.Field3 { + if this.Field3[i] != that1.Field3[i] { + return fmt.Errorf("Field3 this[%v](%v) Not Equal that[%v](%v)", i, this.Field3[i], i, that1.Field3[i]) + } + } + if len(this.Field4) != len(that1.Field4) { + return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", len(this.Field4), len(that1.Field4)) + } + for i := range this.Field4 { + if this.Field4[i] != that1.Field4[i] { + return fmt.Errorf("Field4 this[%v](%v) Not Equal that[%v](%v)", i, this.Field4[i], i, that1.Field4[i]) + } + } + if len(this.Field5) != len(that1.Field5) { + return fmt.Errorf("Field5 this(%v) Not Equal that(%v)", len(this.Field5), len(that1.Field5)) + } + for i := range this.Field5 { + if this.Field5[i] != that1.Field5[i] { + return fmt.Errorf("Field5 this[%v](%v) Not Equal that[%v](%v)", i, this.Field5[i], i, that1.Field5[i]) + } + } + if len(this.Field6) != len(that1.Field6) { + return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", len(this.Field6), len(that1.Field6)) + } + for i := range this.Field6 { + if this.Field6[i] != that1.Field6[i] { + return fmt.Errorf("Field6 this[%v](%v) Not Equal that[%v](%v)", i, this.Field6[i], i, that1.Field6[i]) + } + } + if len(this.Field7) != len(that1.Field7) { + return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", len(this.Field7), len(that1.Field7)) + } + for i := range this.Field7 { + if this.Field7[i] != that1.Field7[i] { + return fmt.Errorf("Field7 this[%v](%v) Not Equal that[%v](%v)", i, this.Field7[i], i, that1.Field7[i]) + } + } + if len(this.Field8) != len(that1.Field8) { + return fmt.Errorf("Field8 this(%v) Not Equal that(%v)", len(this.Field8), len(that1.Field8)) + } + for i := range this.Field8 { + if this.Field8[i] != that1.Field8[i] { + return fmt.Errorf("Field8 this[%v](%v) Not Equal that[%v](%v)", i, this.Field8[i], i, that1.Field8[i]) + } + } + if len(this.Field9) != len(that1.Field9) { + return fmt.Errorf("Field9 this(%v) Not Equal that(%v)", len(this.Field9), len(that1.Field9)) + } + for i := range this.Field9 { + if this.Field9[i] != that1.Field9[i] { + return fmt.Errorf("Field9 this[%v](%v) Not Equal that[%v](%v)", i, this.Field9[i], i, that1.Field9[i]) + } + } + if len(this.Field10) != len(that1.Field10) { + return fmt.Errorf("Field10 this(%v) Not Equal that(%v)", len(this.Field10), len(that1.Field10)) + } + for i := range this.Field10 { + if this.Field10[i] != that1.Field10[i] { + return fmt.Errorf("Field10 this[%v](%v) Not Equal that[%v](%v)", i, this.Field10[i], i, that1.Field10[i]) + } + } + if len(this.Field11) != len(that1.Field11) { + return fmt.Errorf("Field11 this(%v) Not Equal that(%v)", len(this.Field11), len(that1.Field11)) + } + for i := range this.Field11 { + if this.Field11[i] != that1.Field11[i] { + return fmt.Errorf("Field11 this[%v](%v) Not Equal that[%v](%v)", i, this.Field11[i], i, that1.Field11[i]) + } + } + if len(this.Field12) != len(that1.Field12) { + return fmt.Errorf("Field12 this(%v) Not Equal that(%v)", len(this.Field12), len(that1.Field12)) + } + for i := range this.Field12 { + if this.Field12[i] != that1.Field12[i] { + return fmt.Errorf("Field12 this[%v](%v) Not Equal that[%v](%v)", i, this.Field12[i], i, that1.Field12[i]) + } + } + if len(this.Field13) != len(that1.Field13) { + return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", len(this.Field13), len(that1.Field13)) + } + for i := range this.Field13 { + if this.Field13[i] != that1.Field13[i] { + return fmt.Errorf("Field13 this[%v](%v) Not Equal that[%v](%v)", i, this.Field13[i], i, that1.Field13[i]) + } + } + if len(this.Field14) != len(that1.Field14) { + return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", len(this.Field14), len(that1.Field14)) + } + for i := range this.Field14 { + if this.Field14[i] != that1.Field14[i] { + return fmt.Errorf("Field14 this[%v](%v) Not Equal that[%v](%v)", i, this.Field14[i], i, that1.Field14[i]) + } + } + if len(this.Field15) != len(that1.Field15) { + return fmt.Errorf("Field15 this(%v) Not Equal that(%v)", len(this.Field15), len(that1.Field15)) + } + for i := range this.Field15 { + if !bytes.Equal(this.Field15[i], that1.Field15[i]) { + return fmt.Errorf("Field15 this[%v](%v) Not Equal that[%v](%v)", i, this.Field15[i], i, that1.Field15[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NinRepNative) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*NinRepNative) + if !ok { + that2, ok := that.(NinRepNative) + 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.Field1) != len(that1.Field1) { + return false + } + for i := range this.Field1 { + if this.Field1[i] != that1.Field1[i] { + return false + } + } + if len(this.Field2) != len(that1.Field2) { + return false + } + for i := range this.Field2 { + if this.Field2[i] != that1.Field2[i] { + return false + } + } + if len(this.Field3) != len(that1.Field3) { + return false + } + for i := range this.Field3 { + if this.Field3[i] != that1.Field3[i] { + return false + } + } + if len(this.Field4) != len(that1.Field4) { + return false + } + for i := range this.Field4 { + if this.Field4[i] != that1.Field4[i] { + return false + } + } + if len(this.Field5) != len(that1.Field5) { + return false + } + for i := range this.Field5 { + if this.Field5[i] != that1.Field5[i] { + return false + } + } + if len(this.Field6) != len(that1.Field6) { + return false + } + for i := range this.Field6 { + if this.Field6[i] != that1.Field6[i] { + return false + } + } + if len(this.Field7) != len(that1.Field7) { + return false + } + for i := range this.Field7 { + if this.Field7[i] != that1.Field7[i] { + return false + } + } + if len(this.Field8) != len(that1.Field8) { + return false + } + for i := range this.Field8 { + if this.Field8[i] != that1.Field8[i] { + return false + } + } + if len(this.Field9) != len(that1.Field9) { + return false + } + for i := range this.Field9 { + if this.Field9[i] != that1.Field9[i] { + return false + } + } + if len(this.Field10) != len(that1.Field10) { + return false + } + for i := range this.Field10 { + if this.Field10[i] != that1.Field10[i] { + return false + } + } + if len(this.Field11) != len(that1.Field11) { + return false + } + for i := range this.Field11 { + if this.Field11[i] != that1.Field11[i] { + return false + } + } + if len(this.Field12) != len(that1.Field12) { + return false + } + for i := range this.Field12 { + if this.Field12[i] != that1.Field12[i] { + return false + } + } + if len(this.Field13) != len(that1.Field13) { + return false + } + for i := range this.Field13 { + if this.Field13[i] != that1.Field13[i] { + return false + } + } + if len(this.Field14) != len(that1.Field14) { + return false + } + for i := range this.Field14 { + if this.Field14[i] != that1.Field14[i] { + return false + } + } + if len(this.Field15) != len(that1.Field15) { + return false + } + for i := range this.Field15 { + if !bytes.Equal(this.Field15[i], that1.Field15[i]) { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NidRepPackedNative) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NidRepPackedNative) + if !ok { + that2, ok := that.(NidRepPackedNative) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NidRepPackedNative") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NidRepPackedNative but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NidRepPackedNative but is not nil && this == nil") + } + if len(this.Field1) != len(that1.Field1) { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", len(this.Field1), len(that1.Field1)) + } + for i := range this.Field1 { + if this.Field1[i] != that1.Field1[i] { + return fmt.Errorf("Field1 this[%v](%v) Not Equal that[%v](%v)", i, this.Field1[i], i, that1.Field1[i]) + } + } + if len(this.Field2) != len(that1.Field2) { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", len(this.Field2), len(that1.Field2)) + } + for i := range this.Field2 { + if this.Field2[i] != that1.Field2[i] { + return fmt.Errorf("Field2 this[%v](%v) Not Equal that[%v](%v)", i, this.Field2[i], i, that1.Field2[i]) + } + } + if len(this.Field3) != len(that1.Field3) { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", len(this.Field3), len(that1.Field3)) + } + for i := range this.Field3 { + if this.Field3[i] != that1.Field3[i] { + return fmt.Errorf("Field3 this[%v](%v) Not Equal that[%v](%v)", i, this.Field3[i], i, that1.Field3[i]) + } + } + if len(this.Field4) != len(that1.Field4) { + return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", len(this.Field4), len(that1.Field4)) + } + for i := range this.Field4 { + if this.Field4[i] != that1.Field4[i] { + return fmt.Errorf("Field4 this[%v](%v) Not Equal that[%v](%v)", i, this.Field4[i], i, that1.Field4[i]) + } + } + if len(this.Field5) != len(that1.Field5) { + return fmt.Errorf("Field5 this(%v) Not Equal that(%v)", len(this.Field5), len(that1.Field5)) + } + for i := range this.Field5 { + if this.Field5[i] != that1.Field5[i] { + return fmt.Errorf("Field5 this[%v](%v) Not Equal that[%v](%v)", i, this.Field5[i], i, that1.Field5[i]) + } + } + if len(this.Field6) != len(that1.Field6) { + return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", len(this.Field6), len(that1.Field6)) + } + for i := range this.Field6 { + if this.Field6[i] != that1.Field6[i] { + return fmt.Errorf("Field6 this[%v](%v) Not Equal that[%v](%v)", i, this.Field6[i], i, that1.Field6[i]) + } + } + if len(this.Field7) != len(that1.Field7) { + return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", len(this.Field7), len(that1.Field7)) + } + for i := range this.Field7 { + if this.Field7[i] != that1.Field7[i] { + return fmt.Errorf("Field7 this[%v](%v) Not Equal that[%v](%v)", i, this.Field7[i], i, that1.Field7[i]) + } + } + if len(this.Field8) != len(that1.Field8) { + return fmt.Errorf("Field8 this(%v) Not Equal that(%v)", len(this.Field8), len(that1.Field8)) + } + for i := range this.Field8 { + if this.Field8[i] != that1.Field8[i] { + return fmt.Errorf("Field8 this[%v](%v) Not Equal that[%v](%v)", i, this.Field8[i], i, that1.Field8[i]) + } + } + if len(this.Field9) != len(that1.Field9) { + return fmt.Errorf("Field9 this(%v) Not Equal that(%v)", len(this.Field9), len(that1.Field9)) + } + for i := range this.Field9 { + if this.Field9[i] != that1.Field9[i] { + return fmt.Errorf("Field9 this[%v](%v) Not Equal that[%v](%v)", i, this.Field9[i], i, that1.Field9[i]) + } + } + if len(this.Field10) != len(that1.Field10) { + return fmt.Errorf("Field10 this(%v) Not Equal that(%v)", len(this.Field10), len(that1.Field10)) + } + for i := range this.Field10 { + if this.Field10[i] != that1.Field10[i] { + return fmt.Errorf("Field10 this[%v](%v) Not Equal that[%v](%v)", i, this.Field10[i], i, that1.Field10[i]) + } + } + if len(this.Field11) != len(that1.Field11) { + return fmt.Errorf("Field11 this(%v) Not Equal that(%v)", len(this.Field11), len(that1.Field11)) + } + for i := range this.Field11 { + if this.Field11[i] != that1.Field11[i] { + return fmt.Errorf("Field11 this[%v](%v) Not Equal that[%v](%v)", i, this.Field11[i], i, that1.Field11[i]) + } + } + if len(this.Field12) != len(that1.Field12) { + return fmt.Errorf("Field12 this(%v) Not Equal that(%v)", len(this.Field12), len(that1.Field12)) + } + for i := range this.Field12 { + if this.Field12[i] != that1.Field12[i] { + return fmt.Errorf("Field12 this[%v](%v) Not Equal that[%v](%v)", i, this.Field12[i], i, that1.Field12[i]) + } + } + if len(this.Field13) != len(that1.Field13) { + return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", len(this.Field13), len(that1.Field13)) + } + for i := range this.Field13 { + if this.Field13[i] != that1.Field13[i] { + return fmt.Errorf("Field13 this[%v](%v) Not Equal that[%v](%v)", i, this.Field13[i], i, that1.Field13[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NidRepPackedNative) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*NidRepPackedNative) + if !ok { + that2, ok := that.(NidRepPackedNative) + 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.Field1) != len(that1.Field1) { + return false + } + for i := range this.Field1 { + if this.Field1[i] != that1.Field1[i] { + return false + } + } + if len(this.Field2) != len(that1.Field2) { + return false + } + for i := range this.Field2 { + if this.Field2[i] != that1.Field2[i] { + return false + } + } + if len(this.Field3) != len(that1.Field3) { + return false + } + for i := range this.Field3 { + if this.Field3[i] != that1.Field3[i] { + return false + } + } + if len(this.Field4) != len(that1.Field4) { + return false + } + for i := range this.Field4 { + if this.Field4[i] != that1.Field4[i] { + return false + } + } + if len(this.Field5) != len(that1.Field5) { + return false + } + for i := range this.Field5 { + if this.Field5[i] != that1.Field5[i] { + return false + } + } + if len(this.Field6) != len(that1.Field6) { + return false + } + for i := range this.Field6 { + if this.Field6[i] != that1.Field6[i] { + return false + } + } + if len(this.Field7) != len(that1.Field7) { + return false + } + for i := range this.Field7 { + if this.Field7[i] != that1.Field7[i] { + return false + } + } + if len(this.Field8) != len(that1.Field8) { + return false + } + for i := range this.Field8 { + if this.Field8[i] != that1.Field8[i] { + return false + } + } + if len(this.Field9) != len(that1.Field9) { + return false + } + for i := range this.Field9 { + if this.Field9[i] != that1.Field9[i] { + return false + } + } + if len(this.Field10) != len(that1.Field10) { + return false + } + for i := range this.Field10 { + if this.Field10[i] != that1.Field10[i] { + return false + } + } + if len(this.Field11) != len(that1.Field11) { + return false + } + for i := range this.Field11 { + if this.Field11[i] != that1.Field11[i] { + return false + } + } + if len(this.Field12) != len(that1.Field12) { + return false + } + for i := range this.Field12 { + if this.Field12[i] != that1.Field12[i] { + return false + } + } + if len(this.Field13) != len(that1.Field13) { + return false + } + for i := range this.Field13 { + if this.Field13[i] != that1.Field13[i] { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NinRepPackedNative) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NinRepPackedNative) + if !ok { + that2, ok := that.(NinRepPackedNative) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NinRepPackedNative") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NinRepPackedNative but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NinRepPackedNative but is not nil && this == nil") + } + if len(this.Field1) != len(that1.Field1) { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", len(this.Field1), len(that1.Field1)) + } + for i := range this.Field1 { + if this.Field1[i] != that1.Field1[i] { + return fmt.Errorf("Field1 this[%v](%v) Not Equal that[%v](%v)", i, this.Field1[i], i, that1.Field1[i]) + } + } + if len(this.Field2) != len(that1.Field2) { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", len(this.Field2), len(that1.Field2)) + } + for i := range this.Field2 { + if this.Field2[i] != that1.Field2[i] { + return fmt.Errorf("Field2 this[%v](%v) Not Equal that[%v](%v)", i, this.Field2[i], i, that1.Field2[i]) + } + } + if len(this.Field3) != len(that1.Field3) { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", len(this.Field3), len(that1.Field3)) + } + for i := range this.Field3 { + if this.Field3[i] != that1.Field3[i] { + return fmt.Errorf("Field3 this[%v](%v) Not Equal that[%v](%v)", i, this.Field3[i], i, that1.Field3[i]) + } + } + if len(this.Field4) != len(that1.Field4) { + return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", len(this.Field4), len(that1.Field4)) + } + for i := range this.Field4 { + if this.Field4[i] != that1.Field4[i] { + return fmt.Errorf("Field4 this[%v](%v) Not Equal that[%v](%v)", i, this.Field4[i], i, that1.Field4[i]) + } + } + if len(this.Field5) != len(that1.Field5) { + return fmt.Errorf("Field5 this(%v) Not Equal that(%v)", len(this.Field5), len(that1.Field5)) + } + for i := range this.Field5 { + if this.Field5[i] != that1.Field5[i] { + return fmt.Errorf("Field5 this[%v](%v) Not Equal that[%v](%v)", i, this.Field5[i], i, that1.Field5[i]) + } + } + if len(this.Field6) != len(that1.Field6) { + return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", len(this.Field6), len(that1.Field6)) + } + for i := range this.Field6 { + if this.Field6[i] != that1.Field6[i] { + return fmt.Errorf("Field6 this[%v](%v) Not Equal that[%v](%v)", i, this.Field6[i], i, that1.Field6[i]) + } + } + if len(this.Field7) != len(that1.Field7) { + return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", len(this.Field7), len(that1.Field7)) + } + for i := range this.Field7 { + if this.Field7[i] != that1.Field7[i] { + return fmt.Errorf("Field7 this[%v](%v) Not Equal that[%v](%v)", i, this.Field7[i], i, that1.Field7[i]) + } + } + if len(this.Field8) != len(that1.Field8) { + return fmt.Errorf("Field8 this(%v) Not Equal that(%v)", len(this.Field8), len(that1.Field8)) + } + for i := range this.Field8 { + if this.Field8[i] != that1.Field8[i] { + return fmt.Errorf("Field8 this[%v](%v) Not Equal that[%v](%v)", i, this.Field8[i], i, that1.Field8[i]) + } + } + if len(this.Field9) != len(that1.Field9) { + return fmt.Errorf("Field9 this(%v) Not Equal that(%v)", len(this.Field9), len(that1.Field9)) + } + for i := range this.Field9 { + if this.Field9[i] != that1.Field9[i] { + return fmt.Errorf("Field9 this[%v](%v) Not Equal that[%v](%v)", i, this.Field9[i], i, that1.Field9[i]) + } + } + if len(this.Field10) != len(that1.Field10) { + return fmt.Errorf("Field10 this(%v) Not Equal that(%v)", len(this.Field10), len(that1.Field10)) + } + for i := range this.Field10 { + if this.Field10[i] != that1.Field10[i] { + return fmt.Errorf("Field10 this[%v](%v) Not Equal that[%v](%v)", i, this.Field10[i], i, that1.Field10[i]) + } + } + if len(this.Field11) != len(that1.Field11) { + return fmt.Errorf("Field11 this(%v) Not Equal that(%v)", len(this.Field11), len(that1.Field11)) + } + for i := range this.Field11 { + if this.Field11[i] != that1.Field11[i] { + return fmt.Errorf("Field11 this[%v](%v) Not Equal that[%v](%v)", i, this.Field11[i], i, that1.Field11[i]) + } + } + if len(this.Field12) != len(that1.Field12) { + return fmt.Errorf("Field12 this(%v) Not Equal that(%v)", len(this.Field12), len(that1.Field12)) + } + for i := range this.Field12 { + if this.Field12[i] != that1.Field12[i] { + return fmt.Errorf("Field12 this[%v](%v) Not Equal that[%v](%v)", i, this.Field12[i], i, that1.Field12[i]) + } + } + if len(this.Field13) != len(that1.Field13) { + return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", len(this.Field13), len(that1.Field13)) + } + for i := range this.Field13 { + if this.Field13[i] != that1.Field13[i] { + return fmt.Errorf("Field13 this[%v](%v) Not Equal that[%v](%v)", i, this.Field13[i], i, that1.Field13[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NinRepPackedNative) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*NinRepPackedNative) + if !ok { + that2, ok := that.(NinRepPackedNative) + 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.Field1) != len(that1.Field1) { + return false + } + for i := range this.Field1 { + if this.Field1[i] != that1.Field1[i] { + return false + } + } + if len(this.Field2) != len(that1.Field2) { + return false + } + for i := range this.Field2 { + if this.Field2[i] != that1.Field2[i] { + return false + } + } + if len(this.Field3) != len(that1.Field3) { + return false + } + for i := range this.Field3 { + if this.Field3[i] != that1.Field3[i] { + return false + } + } + if len(this.Field4) != len(that1.Field4) { + return false + } + for i := range this.Field4 { + if this.Field4[i] != that1.Field4[i] { + return false + } + } + if len(this.Field5) != len(that1.Field5) { + return false + } + for i := range this.Field5 { + if this.Field5[i] != that1.Field5[i] { + return false + } + } + if len(this.Field6) != len(that1.Field6) { + return false + } + for i := range this.Field6 { + if this.Field6[i] != that1.Field6[i] { + return false + } + } + if len(this.Field7) != len(that1.Field7) { + return false + } + for i := range this.Field7 { + if this.Field7[i] != that1.Field7[i] { + return false + } + } + if len(this.Field8) != len(that1.Field8) { + return false + } + for i := range this.Field8 { + if this.Field8[i] != that1.Field8[i] { + return false + } + } + if len(this.Field9) != len(that1.Field9) { + return false + } + for i := range this.Field9 { + if this.Field9[i] != that1.Field9[i] { + return false + } + } + if len(this.Field10) != len(that1.Field10) { + return false + } + for i := range this.Field10 { + if this.Field10[i] != that1.Field10[i] { + return false + } + } + if len(this.Field11) != len(that1.Field11) { + return false + } + for i := range this.Field11 { + if this.Field11[i] != that1.Field11[i] { + return false + } + } + if len(this.Field12) != len(that1.Field12) { + return false + } + for i := range this.Field12 { + if this.Field12[i] != that1.Field12[i] { + return false + } + } + if len(this.Field13) != len(that1.Field13) { + return false + } + for i := range this.Field13 { + if this.Field13[i] != that1.Field13[i] { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NidOptStruct) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NidOptStruct) + if !ok { + that2, ok := that.(NidOptStruct) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NidOptStruct") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NidOptStruct but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NidOptStruct but is not nil && this == nil") + } + if this.Field1 != that1.Field1 { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) + } + if this.Field2 != that1.Field2 { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) + } + if !this.Field3.Equal(&that1.Field3) { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", this.Field3, that1.Field3) + } + if !this.Field4.Equal(&that1.Field4) { + return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", this.Field4, that1.Field4) + } + if this.Field6 != that1.Field6 { + return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", this.Field6, that1.Field6) + } + if this.Field7 != that1.Field7 { + return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", this.Field7, that1.Field7) + } + if !this.Field8.Equal(&that1.Field8) { + return fmt.Errorf("Field8 this(%v) Not Equal that(%v)", this.Field8, that1.Field8) + } + if this.Field13 != that1.Field13 { + return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", this.Field13, that1.Field13) + } + if this.Field14 != that1.Field14 { + return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", this.Field14, that1.Field14) + } + if !bytes.Equal(this.Field15, that1.Field15) { + return fmt.Errorf("Field15 this(%v) Not Equal that(%v)", this.Field15, that1.Field15) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NidOptStruct) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*NidOptStruct) + if !ok { + that2, ok := that.(NidOptStruct) + 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.Field1 != that1.Field1 { + return false + } + if this.Field2 != that1.Field2 { + return false + } + if !this.Field3.Equal(&that1.Field3) { + return false + } + if !this.Field4.Equal(&that1.Field4) { + return false + } + if this.Field6 != that1.Field6 { + return false + } + if this.Field7 != that1.Field7 { + return false + } + if !this.Field8.Equal(&that1.Field8) { + return false + } + if this.Field13 != that1.Field13 { + return false + } + if this.Field14 != that1.Field14 { + return false + } + if !bytes.Equal(this.Field15, that1.Field15) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NinOptStruct) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NinOptStruct) + if !ok { + that2, ok := that.(NinOptStruct) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NinOptStruct") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NinOptStruct but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NinOptStruct but is not nil && this == nil") + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) + } + } else if this.Field1 != nil { + return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") + } else if that1.Field1 != nil { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", *this.Field2, *that1.Field2) + } + } else if this.Field2 != nil { + return fmt.Errorf("this.Field2 == nil && that.Field2 != nil") + } else if that1.Field2 != nil { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) + } + if !this.Field3.Equal(that1.Field3) { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", this.Field3, that1.Field3) + } + if !this.Field4.Equal(that1.Field4) { + return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", this.Field4, that1.Field4) + } + if this.Field6 != nil && that1.Field6 != nil { + if *this.Field6 != *that1.Field6 { + return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", *this.Field6, *that1.Field6) + } + } else if this.Field6 != nil { + return fmt.Errorf("this.Field6 == nil && that.Field6 != nil") + } else if that1.Field6 != nil { + return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", this.Field6, that1.Field6) + } + if this.Field7 != nil && that1.Field7 != nil { + if *this.Field7 != *that1.Field7 { + return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", *this.Field7, *that1.Field7) + } + } else if this.Field7 != nil { + return fmt.Errorf("this.Field7 == nil && that.Field7 != nil") + } else if that1.Field7 != nil { + return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", this.Field7, that1.Field7) + } + if !this.Field8.Equal(that1.Field8) { + return fmt.Errorf("Field8 this(%v) Not Equal that(%v)", this.Field8, that1.Field8) + } + if this.Field13 != nil && that1.Field13 != nil { + if *this.Field13 != *that1.Field13 { + return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", *this.Field13, *that1.Field13) + } + } else if this.Field13 != nil { + return fmt.Errorf("this.Field13 == nil && that.Field13 != nil") + } else if that1.Field13 != nil { + return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", this.Field13, that1.Field13) + } + if this.Field14 != nil && that1.Field14 != nil { + if *this.Field14 != *that1.Field14 { + return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", *this.Field14, *that1.Field14) + } + } else if this.Field14 != nil { + return fmt.Errorf("this.Field14 == nil && that.Field14 != nil") + } else if that1.Field14 != nil { + return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", this.Field14, that1.Field14) + } + if !bytes.Equal(this.Field15, that1.Field15) { + return fmt.Errorf("Field15 this(%v) Not Equal that(%v)", this.Field15, that1.Field15) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NinOptStruct) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*NinOptStruct) + if !ok { + that2, ok := that.(NinOptStruct) + 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.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return false + } + } else if this.Field1 != nil { + return false + } else if that1.Field1 != nil { + return false + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + return false + } + } else if this.Field2 != nil { + return false + } else if that1.Field2 != nil { + return false + } + if !this.Field3.Equal(that1.Field3) { + return false + } + if !this.Field4.Equal(that1.Field4) { + return false + } + if this.Field6 != nil && that1.Field6 != nil { + if *this.Field6 != *that1.Field6 { + return false + } + } else if this.Field6 != nil { + return false + } else if that1.Field6 != nil { + return false + } + if this.Field7 != nil && that1.Field7 != nil { + if *this.Field7 != *that1.Field7 { + return false + } + } else if this.Field7 != nil { + return false + } else if that1.Field7 != nil { + return false + } + if !this.Field8.Equal(that1.Field8) { + return false + } + if this.Field13 != nil && that1.Field13 != nil { + if *this.Field13 != *that1.Field13 { + return false + } + } else if this.Field13 != nil { + return false + } else if that1.Field13 != nil { + return false + } + if this.Field14 != nil && that1.Field14 != nil { + if *this.Field14 != *that1.Field14 { + return false + } + } else if this.Field14 != nil { + return false + } else if that1.Field14 != nil { + return false + } + if !bytes.Equal(this.Field15, that1.Field15) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NidRepStruct) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NidRepStruct) + if !ok { + that2, ok := that.(NidRepStruct) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NidRepStruct") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NidRepStruct but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NidRepStruct but is not nil && this == nil") + } + if len(this.Field1) != len(that1.Field1) { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", len(this.Field1), len(that1.Field1)) + } + for i := range this.Field1 { + if this.Field1[i] != that1.Field1[i] { + return fmt.Errorf("Field1 this[%v](%v) Not Equal that[%v](%v)", i, this.Field1[i], i, that1.Field1[i]) + } + } + if len(this.Field2) != len(that1.Field2) { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", len(this.Field2), len(that1.Field2)) + } + for i := range this.Field2 { + if this.Field2[i] != that1.Field2[i] { + return fmt.Errorf("Field2 this[%v](%v) Not Equal that[%v](%v)", i, this.Field2[i], i, that1.Field2[i]) + } + } + if len(this.Field3) != len(that1.Field3) { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", len(this.Field3), len(that1.Field3)) + } + for i := range this.Field3 { + if !this.Field3[i].Equal(&that1.Field3[i]) { + return fmt.Errorf("Field3 this[%v](%v) Not Equal that[%v](%v)", i, this.Field3[i], i, that1.Field3[i]) + } + } + if len(this.Field4) != len(that1.Field4) { + return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", len(this.Field4), len(that1.Field4)) + } + for i := range this.Field4 { + if !this.Field4[i].Equal(&that1.Field4[i]) { + return fmt.Errorf("Field4 this[%v](%v) Not Equal that[%v](%v)", i, this.Field4[i], i, that1.Field4[i]) + } + } + if len(this.Field6) != len(that1.Field6) { + return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", len(this.Field6), len(that1.Field6)) + } + for i := range this.Field6 { + if this.Field6[i] != that1.Field6[i] { + return fmt.Errorf("Field6 this[%v](%v) Not Equal that[%v](%v)", i, this.Field6[i], i, that1.Field6[i]) + } + } + if len(this.Field7) != len(that1.Field7) { + return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", len(this.Field7), len(that1.Field7)) + } + for i := range this.Field7 { + if this.Field7[i] != that1.Field7[i] { + return fmt.Errorf("Field7 this[%v](%v) Not Equal that[%v](%v)", i, this.Field7[i], i, that1.Field7[i]) + } + } + if len(this.Field8) != len(that1.Field8) { + return fmt.Errorf("Field8 this(%v) Not Equal that(%v)", len(this.Field8), len(that1.Field8)) + } + for i := range this.Field8 { + if !this.Field8[i].Equal(&that1.Field8[i]) { + return fmt.Errorf("Field8 this[%v](%v) Not Equal that[%v](%v)", i, this.Field8[i], i, that1.Field8[i]) + } + } + if len(this.Field13) != len(that1.Field13) { + return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", len(this.Field13), len(that1.Field13)) + } + for i := range this.Field13 { + if this.Field13[i] != that1.Field13[i] { + return fmt.Errorf("Field13 this[%v](%v) Not Equal that[%v](%v)", i, this.Field13[i], i, that1.Field13[i]) + } + } + if len(this.Field14) != len(that1.Field14) { + return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", len(this.Field14), len(that1.Field14)) + } + for i := range this.Field14 { + if this.Field14[i] != that1.Field14[i] { + return fmt.Errorf("Field14 this[%v](%v) Not Equal that[%v](%v)", i, this.Field14[i], i, that1.Field14[i]) + } + } + if len(this.Field15) != len(that1.Field15) { + return fmt.Errorf("Field15 this(%v) Not Equal that(%v)", len(this.Field15), len(that1.Field15)) + } + for i := range this.Field15 { + if !bytes.Equal(this.Field15[i], that1.Field15[i]) { + return fmt.Errorf("Field15 this[%v](%v) Not Equal that[%v](%v)", i, this.Field15[i], i, that1.Field15[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NidRepStruct) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*NidRepStruct) + if !ok { + that2, ok := that.(NidRepStruct) + 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.Field1) != len(that1.Field1) { + return false + } + for i := range this.Field1 { + if this.Field1[i] != that1.Field1[i] { + return false + } + } + if len(this.Field2) != len(that1.Field2) { + return false + } + for i := range this.Field2 { + if this.Field2[i] != that1.Field2[i] { + return false + } + } + if len(this.Field3) != len(that1.Field3) { + return false + } + for i := range this.Field3 { + if !this.Field3[i].Equal(&that1.Field3[i]) { + return false + } + } + if len(this.Field4) != len(that1.Field4) { + return false + } + for i := range this.Field4 { + if !this.Field4[i].Equal(&that1.Field4[i]) { + return false + } + } + if len(this.Field6) != len(that1.Field6) { + return false + } + for i := range this.Field6 { + if this.Field6[i] != that1.Field6[i] { + return false + } + } + if len(this.Field7) != len(that1.Field7) { + return false + } + for i := range this.Field7 { + if this.Field7[i] != that1.Field7[i] { + return false + } + } + if len(this.Field8) != len(that1.Field8) { + return false + } + for i := range this.Field8 { + if !this.Field8[i].Equal(&that1.Field8[i]) { + return false + } + } + if len(this.Field13) != len(that1.Field13) { + return false + } + for i := range this.Field13 { + if this.Field13[i] != that1.Field13[i] { + return false + } + } + if len(this.Field14) != len(that1.Field14) { + return false + } + for i := range this.Field14 { + if this.Field14[i] != that1.Field14[i] { + return false + } + } + if len(this.Field15) != len(that1.Field15) { + return false + } + for i := range this.Field15 { + if !bytes.Equal(this.Field15[i], that1.Field15[i]) { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NinRepStruct) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NinRepStruct) + if !ok { + that2, ok := that.(NinRepStruct) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NinRepStruct") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NinRepStruct but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NinRepStruct but is not nil && this == nil") + } + if len(this.Field1) != len(that1.Field1) { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", len(this.Field1), len(that1.Field1)) + } + for i := range this.Field1 { + if this.Field1[i] != that1.Field1[i] { + return fmt.Errorf("Field1 this[%v](%v) Not Equal that[%v](%v)", i, this.Field1[i], i, that1.Field1[i]) + } + } + if len(this.Field2) != len(that1.Field2) { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", len(this.Field2), len(that1.Field2)) + } + for i := range this.Field2 { + if this.Field2[i] != that1.Field2[i] { + return fmt.Errorf("Field2 this[%v](%v) Not Equal that[%v](%v)", i, this.Field2[i], i, that1.Field2[i]) + } + } + if len(this.Field3) != len(that1.Field3) { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", len(this.Field3), len(that1.Field3)) + } + for i := range this.Field3 { + if !this.Field3[i].Equal(that1.Field3[i]) { + return fmt.Errorf("Field3 this[%v](%v) Not Equal that[%v](%v)", i, this.Field3[i], i, that1.Field3[i]) + } + } + if len(this.Field4) != len(that1.Field4) { + return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", len(this.Field4), len(that1.Field4)) + } + for i := range this.Field4 { + if !this.Field4[i].Equal(that1.Field4[i]) { + return fmt.Errorf("Field4 this[%v](%v) Not Equal that[%v](%v)", i, this.Field4[i], i, that1.Field4[i]) + } + } + if len(this.Field6) != len(that1.Field6) { + return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", len(this.Field6), len(that1.Field6)) + } + for i := range this.Field6 { + if this.Field6[i] != that1.Field6[i] { + return fmt.Errorf("Field6 this[%v](%v) Not Equal that[%v](%v)", i, this.Field6[i], i, that1.Field6[i]) + } + } + if len(this.Field7) != len(that1.Field7) { + return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", len(this.Field7), len(that1.Field7)) + } + for i := range this.Field7 { + if this.Field7[i] != that1.Field7[i] { + return fmt.Errorf("Field7 this[%v](%v) Not Equal that[%v](%v)", i, this.Field7[i], i, that1.Field7[i]) + } + } + if len(this.Field8) != len(that1.Field8) { + return fmt.Errorf("Field8 this(%v) Not Equal that(%v)", len(this.Field8), len(that1.Field8)) + } + for i := range this.Field8 { + if !this.Field8[i].Equal(that1.Field8[i]) { + return fmt.Errorf("Field8 this[%v](%v) Not Equal that[%v](%v)", i, this.Field8[i], i, that1.Field8[i]) + } + } + if len(this.Field13) != len(that1.Field13) { + return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", len(this.Field13), len(that1.Field13)) + } + for i := range this.Field13 { + if this.Field13[i] != that1.Field13[i] { + return fmt.Errorf("Field13 this[%v](%v) Not Equal that[%v](%v)", i, this.Field13[i], i, that1.Field13[i]) + } + } + if len(this.Field14) != len(that1.Field14) { + return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", len(this.Field14), len(that1.Field14)) + } + for i := range this.Field14 { + if this.Field14[i] != that1.Field14[i] { + return fmt.Errorf("Field14 this[%v](%v) Not Equal that[%v](%v)", i, this.Field14[i], i, that1.Field14[i]) + } + } + if len(this.Field15) != len(that1.Field15) { + return fmt.Errorf("Field15 this(%v) Not Equal that(%v)", len(this.Field15), len(that1.Field15)) + } + for i := range this.Field15 { + if !bytes.Equal(this.Field15[i], that1.Field15[i]) { + return fmt.Errorf("Field15 this[%v](%v) Not Equal that[%v](%v)", i, this.Field15[i], i, that1.Field15[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NinRepStruct) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*NinRepStruct) + if !ok { + that2, ok := that.(NinRepStruct) + 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.Field1) != len(that1.Field1) { + return false + } + for i := range this.Field1 { + if this.Field1[i] != that1.Field1[i] { + return false + } + } + if len(this.Field2) != len(that1.Field2) { + return false + } + for i := range this.Field2 { + if this.Field2[i] != that1.Field2[i] { + return false + } + } + if len(this.Field3) != len(that1.Field3) { + return false + } + for i := range this.Field3 { + if !this.Field3[i].Equal(that1.Field3[i]) { + return false + } + } + if len(this.Field4) != len(that1.Field4) { + return false + } + for i := range this.Field4 { + if !this.Field4[i].Equal(that1.Field4[i]) { + return false + } + } + if len(this.Field6) != len(that1.Field6) { + return false + } + for i := range this.Field6 { + if this.Field6[i] != that1.Field6[i] { + return false + } + } + if len(this.Field7) != len(that1.Field7) { + return false + } + for i := range this.Field7 { + if this.Field7[i] != that1.Field7[i] { + return false + } + } + if len(this.Field8) != len(that1.Field8) { + return false + } + for i := range this.Field8 { + if !this.Field8[i].Equal(that1.Field8[i]) { + return false + } + } + if len(this.Field13) != len(that1.Field13) { + return false + } + for i := range this.Field13 { + if this.Field13[i] != that1.Field13[i] { + return false + } + } + if len(this.Field14) != len(that1.Field14) { + return false + } + for i := range this.Field14 { + if this.Field14[i] != that1.Field14[i] { + return false + } + } + if len(this.Field15) != len(that1.Field15) { + return false + } + for i := range this.Field15 { + if !bytes.Equal(this.Field15[i], that1.Field15[i]) { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NidEmbeddedStruct) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NidEmbeddedStruct) + if !ok { + that2, ok := that.(NidEmbeddedStruct) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NidEmbeddedStruct") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NidEmbeddedStruct but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NidEmbeddedStruct but is not nil && this == nil") + } + if !this.NidOptNative.Equal(that1.NidOptNative) { + return fmt.Errorf("NidOptNative this(%v) Not Equal that(%v)", this.NidOptNative, that1.NidOptNative) + } + if !this.Field200.Equal(&that1.Field200) { + return fmt.Errorf("Field200 this(%v) Not Equal that(%v)", this.Field200, that1.Field200) + } + if this.Field210 != that1.Field210 { + return fmt.Errorf("Field210 this(%v) Not Equal that(%v)", this.Field210, that1.Field210) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NidEmbeddedStruct) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*NidEmbeddedStruct) + if !ok { + that2, ok := that.(NidEmbeddedStruct) + 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.NidOptNative.Equal(that1.NidOptNative) { + return false + } + if !this.Field200.Equal(&that1.Field200) { + return false + } + if this.Field210 != that1.Field210 { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NinEmbeddedStruct) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NinEmbeddedStruct) + if !ok { + that2, ok := that.(NinEmbeddedStruct) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NinEmbeddedStruct") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NinEmbeddedStruct but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NinEmbeddedStruct but is not nil && this == nil") + } + if !this.NidOptNative.Equal(that1.NidOptNative) { + return fmt.Errorf("NidOptNative this(%v) Not Equal that(%v)", this.NidOptNative, that1.NidOptNative) + } + if !this.Field200.Equal(that1.Field200) { + return fmt.Errorf("Field200 this(%v) Not Equal that(%v)", this.Field200, that1.Field200) + } + if this.Field210 != nil && that1.Field210 != nil { + if *this.Field210 != *that1.Field210 { + return fmt.Errorf("Field210 this(%v) Not Equal that(%v)", *this.Field210, *that1.Field210) + } + } else if this.Field210 != nil { + return fmt.Errorf("this.Field210 == nil && that.Field210 != nil") + } else if that1.Field210 != nil { + return fmt.Errorf("Field210 this(%v) Not Equal that(%v)", this.Field210, that1.Field210) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NinEmbeddedStruct) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*NinEmbeddedStruct) + if !ok { + that2, ok := that.(NinEmbeddedStruct) + 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.NidOptNative.Equal(that1.NidOptNative) { + return false + } + if !this.Field200.Equal(that1.Field200) { + return false + } + if this.Field210 != nil && that1.Field210 != nil { + if *this.Field210 != *that1.Field210 { + return false + } + } else if this.Field210 != nil { + return false + } else if that1.Field210 != nil { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NidNestedStruct) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NidNestedStruct) + if !ok { + that2, ok := that.(NidNestedStruct) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NidNestedStruct") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NidNestedStruct but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NidNestedStruct but is not nil && this == nil") + } + if !this.Field1.Equal(&that1.Field1) { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) + } + if len(this.Field2) != len(that1.Field2) { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", len(this.Field2), len(that1.Field2)) + } + for i := range this.Field2 { + if !this.Field2[i].Equal(&that1.Field2[i]) { + return fmt.Errorf("Field2 this[%v](%v) Not Equal that[%v](%v)", i, this.Field2[i], i, that1.Field2[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NidNestedStruct) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*NidNestedStruct) + if !ok { + that2, ok := that.(NidNestedStruct) + 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.Field1.Equal(&that1.Field1) { + return false + } + if len(this.Field2) != len(that1.Field2) { + return false + } + for i := range this.Field2 { + if !this.Field2[i].Equal(&that1.Field2[i]) { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NinNestedStruct) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NinNestedStruct) + if !ok { + that2, ok := that.(NinNestedStruct) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NinNestedStruct") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NinNestedStruct but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NinNestedStruct but is not nil && this == nil") + } + if !this.Field1.Equal(that1.Field1) { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) + } + if len(this.Field2) != len(that1.Field2) { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", len(this.Field2), len(that1.Field2)) + } + for i := range this.Field2 { + if !this.Field2[i].Equal(that1.Field2[i]) { + return fmt.Errorf("Field2 this[%v](%v) Not Equal that[%v](%v)", i, this.Field2[i], i, that1.Field2[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NinNestedStruct) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*NinNestedStruct) + if !ok { + that2, ok := that.(NinNestedStruct) + 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.Field1.Equal(that1.Field1) { + return false + } + if len(this.Field2) != len(that1.Field2) { + return false + } + for i := range this.Field2 { + if !this.Field2[i].Equal(that1.Field2[i]) { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NidOptCustom) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NidOptCustom) + if !ok { + that2, ok := that.(NidOptCustom) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NidOptCustom") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NidOptCustom but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NidOptCustom 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.Value.Equal(that1.Value) { + return fmt.Errorf("Value this(%v) Not Equal that(%v)", this.Value, that1.Value) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NidOptCustom) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*NidOptCustom) + if !ok { + that2, ok := that.(NidOptCustom) + 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.Value.Equal(that1.Value) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *CustomDash) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*CustomDash) + if !ok { + that2, ok := that.(CustomDash) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *CustomDash") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *CustomDash but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *CustomDash but is not nil && this == nil") + } + if that1.Value == nil { + if this.Value != nil { + return fmt.Errorf("this.Value != nil && that1.Value == nil") + } + } else if !this.Value.Equal(*that1.Value) { + return fmt.Errorf("Value this(%v) Not Equal that(%v)", this.Value, that1.Value) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *CustomDash) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*CustomDash) + if !ok { + that2, ok := that.(CustomDash) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + if this == nil { + return true + } + return false + } else if this == nil { + return false + } + if that1.Value == nil { + if this.Value != nil { + return false + } + } else if !this.Value.Equal(*that1.Value) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NinOptCustom) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NinOptCustom) + if !ok { + that2, ok := that.(NinOptCustom) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NinOptCustom") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NinOptCustom but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NinOptCustom but is not nil && this == nil") + } + if that1.Id == nil { + if this.Id != nil { + return fmt.Errorf("this.Id != nil && that1.Id == nil") + } + } else if !this.Id.Equal(*that1.Id) { + return fmt.Errorf("Id this(%v) Not Equal that(%v)", this.Id, that1.Id) + } + if that1.Value == nil { + if this.Value != nil { + return fmt.Errorf("this.Value != nil && that1.Value == nil") + } + } else if !this.Value.Equal(*that1.Value) { + return fmt.Errorf("Value this(%v) Not Equal that(%v)", this.Value, that1.Value) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NinOptCustom) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*NinOptCustom) + if !ok { + that2, ok := that.(NinOptCustom) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + if this == nil { + return true + } + return false + } else if this == nil { + return false + } + if that1.Id == nil { + if this.Id != nil { + return false + } + } else if !this.Id.Equal(*that1.Id) { + return false + } + if that1.Value == nil { + if this.Value != nil { + return false + } + } else if !this.Value.Equal(*that1.Value) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NidRepCustom) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NidRepCustom) + if !ok { + that2, ok := that.(NidRepCustom) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NidRepCustom") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NidRepCustom but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NidRepCustom but is not nil && this == nil") + } + if len(this.Id) != len(that1.Id) { + return fmt.Errorf("Id this(%v) Not Equal that(%v)", len(this.Id), len(that1.Id)) + } + for i := range this.Id { + if !this.Id[i].Equal(that1.Id[i]) { + return fmt.Errorf("Id this[%v](%v) Not Equal that[%v](%v)", i, this.Id[i], i, that1.Id[i]) + } + } + if len(this.Value) != len(that1.Value) { + return fmt.Errorf("Value this(%v) Not Equal that(%v)", len(this.Value), len(that1.Value)) + } + for i := range this.Value { + if !this.Value[i].Equal(that1.Value[i]) { + return fmt.Errorf("Value this[%v](%v) Not Equal that[%v](%v)", i, this.Value[i], i, that1.Value[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NidRepCustom) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*NidRepCustom) + if !ok { + that2, ok := that.(NidRepCustom) + 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.Id) != len(that1.Id) { + return false + } + for i := range this.Id { + if !this.Id[i].Equal(that1.Id[i]) { + return false + } + } + if len(this.Value) != len(that1.Value) { + return false + } + for i := range this.Value { + if !this.Value[i].Equal(that1.Value[i]) { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NinRepCustom) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NinRepCustom) + if !ok { + that2, ok := that.(NinRepCustom) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NinRepCustom") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NinRepCustom but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NinRepCustom but is not nil && this == nil") + } + if len(this.Id) != len(that1.Id) { + return fmt.Errorf("Id this(%v) Not Equal that(%v)", len(this.Id), len(that1.Id)) + } + for i := range this.Id { + if !this.Id[i].Equal(that1.Id[i]) { + return fmt.Errorf("Id this[%v](%v) Not Equal that[%v](%v)", i, this.Id[i], i, that1.Id[i]) + } + } + if len(this.Value) != len(that1.Value) { + return fmt.Errorf("Value this(%v) Not Equal that(%v)", len(this.Value), len(that1.Value)) + } + for i := range this.Value { + if !this.Value[i].Equal(that1.Value[i]) { + return fmt.Errorf("Value this[%v](%v) Not Equal that[%v](%v)", i, this.Value[i], i, that1.Value[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NinRepCustom) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*NinRepCustom) + if !ok { + that2, ok := that.(NinRepCustom) + 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.Id) != len(that1.Id) { + return false + } + for i := range this.Id { + if !this.Id[i].Equal(that1.Id[i]) { + return false + } + } + if len(this.Value) != len(that1.Value) { + return false + } + for i := range this.Value { + if !this.Value[i].Equal(that1.Value[i]) { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NinOptNativeUnion) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NinOptNativeUnion) + if !ok { + that2, ok := that.(NinOptNativeUnion) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NinOptNativeUnion") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NinOptNativeUnion but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NinOptNativeUnion but is not nil && this == nil") + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) + } + } else if this.Field1 != nil { + return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") + } else if that1.Field1 != nil { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", *this.Field2, *that1.Field2) + } + } else if this.Field2 != nil { + return fmt.Errorf("this.Field2 == nil && that.Field2 != nil") + } else if that1.Field2 != nil { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) + } + if this.Field3 != nil && that1.Field3 != nil { + if *this.Field3 != *that1.Field3 { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", *this.Field3, *that1.Field3) + } + } else if this.Field3 != nil { + return fmt.Errorf("this.Field3 == nil && that.Field3 != nil") + } else if that1.Field3 != nil { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", this.Field3, that1.Field3) + } + if this.Field4 != nil && that1.Field4 != nil { + if *this.Field4 != *that1.Field4 { + return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", *this.Field4, *that1.Field4) + } + } else if this.Field4 != nil { + return fmt.Errorf("this.Field4 == nil && that.Field4 != nil") + } else if that1.Field4 != nil { + return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", this.Field4, that1.Field4) + } + if this.Field5 != nil && that1.Field5 != nil { + if *this.Field5 != *that1.Field5 { + return fmt.Errorf("Field5 this(%v) Not Equal that(%v)", *this.Field5, *that1.Field5) + } + } else if this.Field5 != nil { + return fmt.Errorf("this.Field5 == nil && that.Field5 != nil") + } else if that1.Field5 != nil { + return fmt.Errorf("Field5 this(%v) Not Equal that(%v)", this.Field5, that1.Field5) + } + if this.Field6 != nil && that1.Field6 != nil { + if *this.Field6 != *that1.Field6 { + return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", *this.Field6, *that1.Field6) + } + } else if this.Field6 != nil { + return fmt.Errorf("this.Field6 == nil && that.Field6 != nil") + } else if that1.Field6 != nil { + return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", this.Field6, that1.Field6) + } + if this.Field13 != nil && that1.Field13 != nil { + if *this.Field13 != *that1.Field13 { + return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", *this.Field13, *that1.Field13) + } + } else if this.Field13 != nil { + return fmt.Errorf("this.Field13 == nil && that.Field13 != nil") + } else if that1.Field13 != nil { + return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", this.Field13, that1.Field13) + } + if this.Field14 != nil && that1.Field14 != nil { + if *this.Field14 != *that1.Field14 { + return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", *this.Field14, *that1.Field14) + } + } else if this.Field14 != nil { + return fmt.Errorf("this.Field14 == nil && that.Field14 != nil") + } else if that1.Field14 != nil { + return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", this.Field14, that1.Field14) + } + if !bytes.Equal(this.Field15, that1.Field15) { + return fmt.Errorf("Field15 this(%v) Not Equal that(%v)", this.Field15, that1.Field15) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NinOptNativeUnion) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*NinOptNativeUnion) + if !ok { + that2, ok := that.(NinOptNativeUnion) + 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.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return false + } + } else if this.Field1 != nil { + return false + } else if that1.Field1 != nil { + return false + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + return false + } + } else if this.Field2 != nil { + return false + } else if that1.Field2 != nil { + return false + } + if this.Field3 != nil && that1.Field3 != nil { + if *this.Field3 != *that1.Field3 { + return false + } + } else if this.Field3 != nil { + return false + } else if that1.Field3 != nil { + return false + } + if this.Field4 != nil && that1.Field4 != nil { + if *this.Field4 != *that1.Field4 { + return false + } + } else if this.Field4 != nil { + return false + } else if that1.Field4 != nil { + return false + } + if this.Field5 != nil && that1.Field5 != nil { + if *this.Field5 != *that1.Field5 { + return false + } + } else if this.Field5 != nil { + return false + } else if that1.Field5 != nil { + return false + } + if this.Field6 != nil && that1.Field6 != nil { + if *this.Field6 != *that1.Field6 { + return false + } + } else if this.Field6 != nil { + return false + } else if that1.Field6 != nil { + return false + } + if this.Field13 != nil && that1.Field13 != nil { + if *this.Field13 != *that1.Field13 { + return false + } + } else if this.Field13 != nil { + return false + } else if that1.Field13 != nil { + return false + } + if this.Field14 != nil && that1.Field14 != nil { + if *this.Field14 != *that1.Field14 { + return false + } + } else if this.Field14 != nil { + return false + } else if that1.Field14 != nil { + return false + } + if !bytes.Equal(this.Field15, that1.Field15) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NinOptStructUnion) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NinOptStructUnion) + if !ok { + that2, ok := that.(NinOptStructUnion) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NinOptStructUnion") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NinOptStructUnion but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NinOptStructUnion but is not nil && this == nil") + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) + } + } else if this.Field1 != nil { + return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") + } else if that1.Field1 != nil { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", *this.Field2, *that1.Field2) + } + } else if this.Field2 != nil { + return fmt.Errorf("this.Field2 == nil && that.Field2 != nil") + } else if that1.Field2 != nil { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) + } + if !this.Field3.Equal(that1.Field3) { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", this.Field3, that1.Field3) + } + if !this.Field4.Equal(that1.Field4) { + return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", this.Field4, that1.Field4) + } + if this.Field6 != nil && that1.Field6 != nil { + if *this.Field6 != *that1.Field6 { + return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", *this.Field6, *that1.Field6) + } + } else if this.Field6 != nil { + return fmt.Errorf("this.Field6 == nil && that.Field6 != nil") + } else if that1.Field6 != nil { + return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", this.Field6, that1.Field6) + } + if this.Field7 != nil && that1.Field7 != nil { + if *this.Field7 != *that1.Field7 { + return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", *this.Field7, *that1.Field7) + } + } else if this.Field7 != nil { + return fmt.Errorf("this.Field7 == nil && that.Field7 != nil") + } else if that1.Field7 != nil { + return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", this.Field7, that1.Field7) + } + if this.Field13 != nil && that1.Field13 != nil { + if *this.Field13 != *that1.Field13 { + return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", *this.Field13, *that1.Field13) + } + } else if this.Field13 != nil { + return fmt.Errorf("this.Field13 == nil && that.Field13 != nil") + } else if that1.Field13 != nil { + return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", this.Field13, that1.Field13) + } + if this.Field14 != nil && that1.Field14 != nil { + if *this.Field14 != *that1.Field14 { + return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", *this.Field14, *that1.Field14) + } + } else if this.Field14 != nil { + return fmt.Errorf("this.Field14 == nil && that.Field14 != nil") + } else if that1.Field14 != nil { + return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", this.Field14, that1.Field14) + } + if !bytes.Equal(this.Field15, that1.Field15) { + return fmt.Errorf("Field15 this(%v) Not Equal that(%v)", this.Field15, that1.Field15) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NinOptStructUnion) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*NinOptStructUnion) + if !ok { + that2, ok := that.(NinOptStructUnion) + 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.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return false + } + } else if this.Field1 != nil { + return false + } else if that1.Field1 != nil { + return false + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + return false + } + } else if this.Field2 != nil { + return false + } else if that1.Field2 != nil { + return false + } + if !this.Field3.Equal(that1.Field3) { + return false + } + if !this.Field4.Equal(that1.Field4) { + return false + } + if this.Field6 != nil && that1.Field6 != nil { + if *this.Field6 != *that1.Field6 { + return false + } + } else if this.Field6 != nil { + return false + } else if that1.Field6 != nil { + return false + } + if this.Field7 != nil && that1.Field7 != nil { + if *this.Field7 != *that1.Field7 { + return false + } + } else if this.Field7 != nil { + return false + } else if that1.Field7 != nil { + return false + } + if this.Field13 != nil && that1.Field13 != nil { + if *this.Field13 != *that1.Field13 { + return false + } + } else if this.Field13 != nil { + return false + } else if that1.Field13 != nil { + return false + } + if this.Field14 != nil && that1.Field14 != nil { + if *this.Field14 != *that1.Field14 { + return false + } + } else if this.Field14 != nil { + return false + } else if that1.Field14 != nil { + return false + } + if !bytes.Equal(this.Field15, that1.Field15) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NinEmbeddedStructUnion) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NinEmbeddedStructUnion) + if !ok { + that2, ok := that.(NinEmbeddedStructUnion) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NinEmbeddedStructUnion") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NinEmbeddedStructUnion but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NinEmbeddedStructUnion but is not nil && this == nil") + } + if !this.NidOptNative.Equal(that1.NidOptNative) { + return fmt.Errorf("NidOptNative this(%v) Not Equal that(%v)", this.NidOptNative, that1.NidOptNative) + } + if !this.Field200.Equal(that1.Field200) { + return fmt.Errorf("Field200 this(%v) Not Equal that(%v)", this.Field200, that1.Field200) + } + if this.Field210 != nil && that1.Field210 != nil { + if *this.Field210 != *that1.Field210 { + return fmt.Errorf("Field210 this(%v) Not Equal that(%v)", *this.Field210, *that1.Field210) + } + } else if this.Field210 != nil { + return fmt.Errorf("this.Field210 == nil && that.Field210 != nil") + } else if that1.Field210 != nil { + return fmt.Errorf("Field210 this(%v) Not Equal that(%v)", this.Field210, that1.Field210) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NinEmbeddedStructUnion) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*NinEmbeddedStructUnion) + if !ok { + that2, ok := that.(NinEmbeddedStructUnion) + 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.NidOptNative.Equal(that1.NidOptNative) { + return false + } + if !this.Field200.Equal(that1.Field200) { + return false + } + if this.Field210 != nil && that1.Field210 != nil { + if *this.Field210 != *that1.Field210 { + return false + } + } else if this.Field210 != nil { + return false + } else if that1.Field210 != nil { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NinNestedStructUnion) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NinNestedStructUnion) + if !ok { + that2, ok := that.(NinNestedStructUnion) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NinNestedStructUnion") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NinNestedStructUnion but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NinNestedStructUnion but is not nil && this == nil") + } + if !this.Field1.Equal(that1.Field1) { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) + } + if !this.Field2.Equal(that1.Field2) { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) + } + if !this.Field3.Equal(that1.Field3) { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", this.Field3, that1.Field3) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NinNestedStructUnion) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*NinNestedStructUnion) + if !ok { + that2, ok := that.(NinNestedStructUnion) + 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.Field1.Equal(that1.Field1) { + return false + } + if !this.Field2.Equal(that1.Field2) { + return false + } + if !this.Field3.Equal(that1.Field3) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *Tree) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*Tree) + if !ok { + that2, ok := that.(Tree) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *Tree") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *Tree but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *Tree but is not nil && this == nil") + } + if !this.Or.Equal(that1.Or) { + return fmt.Errorf("Or this(%v) Not Equal that(%v)", this.Or, that1.Or) + } + if !this.And.Equal(that1.And) { + return fmt.Errorf("And this(%v) Not Equal that(%v)", this.And, that1.And) + } + if !this.Leaf.Equal(that1.Leaf) { + return fmt.Errorf("Leaf this(%v) Not Equal that(%v)", this.Leaf, that1.Leaf) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *Tree) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*Tree) + if !ok { + that2, ok := that.(Tree) + 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.Or.Equal(that1.Or) { + return false + } + if !this.And.Equal(that1.And) { + return false + } + if !this.Leaf.Equal(that1.Leaf) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *OrBranch) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*OrBranch) + if !ok { + that2, ok := that.(OrBranch) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *OrBranch") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *OrBranch but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *OrBranch but is not nil && this == nil") + } + if !this.Left.Equal(&that1.Left) { + return fmt.Errorf("Left this(%v) Not Equal that(%v)", this.Left, that1.Left) + } + if !this.Right.Equal(&that1.Right) { + return fmt.Errorf("Right this(%v) Not Equal that(%v)", this.Right, that1.Right) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *OrBranch) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*OrBranch) + if !ok { + that2, ok := that.(OrBranch) + 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.Left.Equal(&that1.Left) { + return false + } + if !this.Right.Equal(&that1.Right) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *AndBranch) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*AndBranch) + if !ok { + that2, ok := that.(AndBranch) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *AndBranch") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *AndBranch but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *AndBranch but is not nil && this == nil") + } + if !this.Left.Equal(&that1.Left) { + return fmt.Errorf("Left this(%v) Not Equal that(%v)", this.Left, that1.Left) + } + if !this.Right.Equal(&that1.Right) { + return fmt.Errorf("Right this(%v) Not Equal that(%v)", this.Right, that1.Right) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *AndBranch) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*AndBranch) + if !ok { + that2, ok := that.(AndBranch) + 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.Left.Equal(&that1.Left) { + return false + } + if !this.Right.Equal(&that1.Right) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *Leaf) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*Leaf) + if !ok { + that2, ok := that.(Leaf) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *Leaf") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *Leaf but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *Leaf 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.StrValue != that1.StrValue { + return fmt.Errorf("StrValue this(%v) Not Equal that(%v)", this.StrValue, that1.StrValue) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *Leaf) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*Leaf) + if !ok { + that2, ok := that.(Leaf) + 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.StrValue != that1.StrValue { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *DeepTree) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*DeepTree) + if !ok { + that2, ok := that.(DeepTree) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *DeepTree") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *DeepTree but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *DeepTree but is not nil && this == nil") + } + if !this.Down.Equal(that1.Down) { + return fmt.Errorf("Down this(%v) Not Equal that(%v)", this.Down, that1.Down) + } + if !this.And.Equal(that1.And) { + return fmt.Errorf("And this(%v) Not Equal that(%v)", this.And, that1.And) + } + if !this.Leaf.Equal(that1.Leaf) { + return fmt.Errorf("Leaf this(%v) Not Equal that(%v)", this.Leaf, that1.Leaf) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *DeepTree) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*DeepTree) + if !ok { + that2, ok := that.(DeepTree) + 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.Down.Equal(that1.Down) { + return false + } + if !this.And.Equal(that1.And) { + return false + } + if !this.Leaf.Equal(that1.Leaf) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *ADeepBranch) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*ADeepBranch) + if !ok { + that2, ok := that.(ADeepBranch) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *ADeepBranch") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *ADeepBranch but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *ADeepBranch but is not nil && this == nil") + } + if !this.Down.Equal(&that1.Down) { + return fmt.Errorf("Down this(%v) Not Equal that(%v)", this.Down, that1.Down) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *ADeepBranch) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*ADeepBranch) + if !ok { + that2, ok := that.(ADeepBranch) + 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.Down.Equal(&that1.Down) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *AndDeepBranch) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*AndDeepBranch) + if !ok { + that2, ok := that.(AndDeepBranch) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *AndDeepBranch") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *AndDeepBranch but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *AndDeepBranch but is not nil && this == nil") + } + if !this.Left.Equal(&that1.Left) { + return fmt.Errorf("Left this(%v) Not Equal that(%v)", this.Left, that1.Left) + } + if !this.Right.Equal(&that1.Right) { + return fmt.Errorf("Right this(%v) Not Equal that(%v)", this.Right, that1.Right) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *AndDeepBranch) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*AndDeepBranch) + if !ok { + that2, ok := that.(AndDeepBranch) + 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.Left.Equal(&that1.Left) { + return false + } + if !this.Right.Equal(&that1.Right) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *DeepLeaf) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*DeepLeaf) + if !ok { + that2, ok := that.(DeepLeaf) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *DeepLeaf") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *DeepLeaf but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *DeepLeaf but is not nil && this == nil") + } + if !this.Tree.Equal(&that1.Tree) { + return fmt.Errorf("Tree this(%v) Not Equal that(%v)", this.Tree, that1.Tree) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *DeepLeaf) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*DeepLeaf) + if !ok { + that2, ok := that.(DeepLeaf) + 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.Tree.Equal(&that1.Tree) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *Nil) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*Nil) + if !ok { + that2, ok := that.(Nil) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *Nil") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *Nil but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *Nil but is not nil && this == nil") + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *Nil) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*Nil) + if !ok { + that2, ok := that.(Nil) + 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.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NidOptEnum) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NidOptEnum) + if !ok { + that2, ok := that.(NidOptEnum) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NidOptEnum") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NidOptEnum but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NidOptEnum but is not nil && this == nil") + } + if this.Field1 != that1.Field1 { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NidOptEnum) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*NidOptEnum) + if !ok { + that2, ok := that.(NidOptEnum) + 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.Field1 != that1.Field1 { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NinOptEnum) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NinOptEnum) + if !ok { + that2, ok := that.(NinOptEnum) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NinOptEnum") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NinOptEnum but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NinOptEnum but is not nil && this == nil") + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) + } + } else if this.Field1 != nil { + return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") + } else if that1.Field1 != nil { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", *this.Field2, *that1.Field2) + } + } else if this.Field2 != nil { + return fmt.Errorf("this.Field2 == nil && that.Field2 != nil") + } else if that1.Field2 != nil { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) + } + if this.Field3 != nil && that1.Field3 != nil { + if *this.Field3 != *that1.Field3 { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", *this.Field3, *that1.Field3) + } + } else if this.Field3 != nil { + return fmt.Errorf("this.Field3 == nil && that.Field3 != nil") + } else if that1.Field3 != nil { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", this.Field3, that1.Field3) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NinOptEnum) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*NinOptEnum) + if !ok { + that2, ok := that.(NinOptEnum) + 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.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return false + } + } else if this.Field1 != nil { + return false + } else if that1.Field1 != nil { + return false + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + return false + } + } else if this.Field2 != nil { + return false + } else if that1.Field2 != nil { + return false + } + if this.Field3 != nil && that1.Field3 != nil { + if *this.Field3 != *that1.Field3 { + return false + } + } else if this.Field3 != nil { + return false + } else if that1.Field3 != nil { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NidRepEnum) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NidRepEnum) + if !ok { + that2, ok := that.(NidRepEnum) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NidRepEnum") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NidRepEnum but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NidRepEnum but is not nil && this == nil") + } + if len(this.Field1) != len(that1.Field1) { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", len(this.Field1), len(that1.Field1)) + } + for i := range this.Field1 { + if this.Field1[i] != that1.Field1[i] { + return fmt.Errorf("Field1 this[%v](%v) Not Equal that[%v](%v)", i, this.Field1[i], i, that1.Field1[i]) + } + } + if len(this.Field2) != len(that1.Field2) { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", len(this.Field2), len(that1.Field2)) + } + for i := range this.Field2 { + if this.Field2[i] != that1.Field2[i] { + return fmt.Errorf("Field2 this[%v](%v) Not Equal that[%v](%v)", i, this.Field2[i], i, that1.Field2[i]) + } + } + if len(this.Field3) != len(that1.Field3) { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", len(this.Field3), len(that1.Field3)) + } + for i := range this.Field3 { + if this.Field3[i] != that1.Field3[i] { + return fmt.Errorf("Field3 this[%v](%v) Not Equal that[%v](%v)", i, this.Field3[i], i, that1.Field3[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NidRepEnum) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*NidRepEnum) + if !ok { + that2, ok := that.(NidRepEnum) + 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.Field1) != len(that1.Field1) { + return false + } + for i := range this.Field1 { + if this.Field1[i] != that1.Field1[i] { + return false + } + } + if len(this.Field2) != len(that1.Field2) { + return false + } + for i := range this.Field2 { + if this.Field2[i] != that1.Field2[i] { + return false + } + } + if len(this.Field3) != len(that1.Field3) { + return false + } + for i := range this.Field3 { + if this.Field3[i] != that1.Field3[i] { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NinRepEnum) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NinRepEnum) + if !ok { + that2, ok := that.(NinRepEnum) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NinRepEnum") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NinRepEnum but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NinRepEnum but is not nil && this == nil") + } + if len(this.Field1) != len(that1.Field1) { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", len(this.Field1), len(that1.Field1)) + } + for i := range this.Field1 { + if this.Field1[i] != that1.Field1[i] { + return fmt.Errorf("Field1 this[%v](%v) Not Equal that[%v](%v)", i, this.Field1[i], i, that1.Field1[i]) + } + } + if len(this.Field2) != len(that1.Field2) { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", len(this.Field2), len(that1.Field2)) + } + for i := range this.Field2 { + if this.Field2[i] != that1.Field2[i] { + return fmt.Errorf("Field2 this[%v](%v) Not Equal that[%v](%v)", i, this.Field2[i], i, that1.Field2[i]) + } + } + if len(this.Field3) != len(that1.Field3) { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", len(this.Field3), len(that1.Field3)) + } + for i := range this.Field3 { + if this.Field3[i] != that1.Field3[i] { + return fmt.Errorf("Field3 this[%v](%v) Not Equal that[%v](%v)", i, this.Field3[i], i, that1.Field3[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NinRepEnum) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*NinRepEnum) + if !ok { + that2, ok := that.(NinRepEnum) + 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.Field1) != len(that1.Field1) { + return false + } + for i := range this.Field1 { + if this.Field1[i] != that1.Field1[i] { + return false + } + } + if len(this.Field2) != len(that1.Field2) { + return false + } + for i := range this.Field2 { + if this.Field2[i] != that1.Field2[i] { + return false + } + } + if len(this.Field3) != len(that1.Field3) { + return false + } + for i := range this.Field3 { + if this.Field3[i] != that1.Field3[i] { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NinOptEnumDefault) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NinOptEnumDefault) + if !ok { + that2, ok := that.(NinOptEnumDefault) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NinOptEnumDefault") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NinOptEnumDefault but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NinOptEnumDefault but is not nil && this == nil") + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) + } + } else if this.Field1 != nil { + return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") + } else if that1.Field1 != nil { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", *this.Field2, *that1.Field2) + } + } else if this.Field2 != nil { + return fmt.Errorf("this.Field2 == nil && that.Field2 != nil") + } else if that1.Field2 != nil { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) + } + if this.Field3 != nil && that1.Field3 != nil { + if *this.Field3 != *that1.Field3 { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", *this.Field3, *that1.Field3) + } + } else if this.Field3 != nil { + return fmt.Errorf("this.Field3 == nil && that.Field3 != nil") + } else if that1.Field3 != nil { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", this.Field3, that1.Field3) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NinOptEnumDefault) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*NinOptEnumDefault) + if !ok { + that2, ok := that.(NinOptEnumDefault) + 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.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return false + } + } else if this.Field1 != nil { + return false + } else if that1.Field1 != nil { + return false + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + return false + } + } else if this.Field2 != nil { + return false + } else if that1.Field2 != nil { + return false + } + if this.Field3 != nil && that1.Field3 != nil { + if *this.Field3 != *that1.Field3 { + return false + } + } else if this.Field3 != nil { + return false + } else if that1.Field3 != nil { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *AnotherNinOptEnum) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*AnotherNinOptEnum) + if !ok { + that2, ok := that.(AnotherNinOptEnum) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *AnotherNinOptEnum") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *AnotherNinOptEnum but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *AnotherNinOptEnum but is not nil && this == nil") + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) + } + } else if this.Field1 != nil { + return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") + } else if that1.Field1 != nil { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", *this.Field2, *that1.Field2) + } + } else if this.Field2 != nil { + return fmt.Errorf("this.Field2 == nil && that.Field2 != nil") + } else if that1.Field2 != nil { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) + } + if this.Field3 != nil && that1.Field3 != nil { + if *this.Field3 != *that1.Field3 { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", *this.Field3, *that1.Field3) + } + } else if this.Field3 != nil { + return fmt.Errorf("this.Field3 == nil && that.Field3 != nil") + } else if that1.Field3 != nil { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", this.Field3, that1.Field3) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *AnotherNinOptEnum) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*AnotherNinOptEnum) + if !ok { + that2, ok := that.(AnotherNinOptEnum) + 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.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return false + } + } else if this.Field1 != nil { + return false + } else if that1.Field1 != nil { + return false + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + return false + } + } else if this.Field2 != nil { + return false + } else if that1.Field2 != nil { + return false + } + if this.Field3 != nil && that1.Field3 != nil { + if *this.Field3 != *that1.Field3 { + return false + } + } else if this.Field3 != nil { + return false + } else if that1.Field3 != nil { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *AnotherNinOptEnumDefault) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*AnotherNinOptEnumDefault) + if !ok { + that2, ok := that.(AnotherNinOptEnumDefault) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *AnotherNinOptEnumDefault") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *AnotherNinOptEnumDefault but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *AnotherNinOptEnumDefault but is not nil && this == nil") + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) + } + } else if this.Field1 != nil { + return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") + } else if that1.Field1 != nil { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", *this.Field2, *that1.Field2) + } + } else if this.Field2 != nil { + return fmt.Errorf("this.Field2 == nil && that.Field2 != nil") + } else if that1.Field2 != nil { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) + } + if this.Field3 != nil && that1.Field3 != nil { + if *this.Field3 != *that1.Field3 { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", *this.Field3, *that1.Field3) + } + } else if this.Field3 != nil { + return fmt.Errorf("this.Field3 == nil && that.Field3 != nil") + } else if that1.Field3 != nil { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", this.Field3, that1.Field3) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *AnotherNinOptEnumDefault) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*AnotherNinOptEnumDefault) + if !ok { + that2, ok := that.(AnotherNinOptEnumDefault) + 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.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return false + } + } else if this.Field1 != nil { + return false + } else if that1.Field1 != nil { + return false + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + return false + } + } else if this.Field2 != nil { + return false + } else if that1.Field2 != nil { + return false + } + if this.Field3 != nil && that1.Field3 != nil { + if *this.Field3 != *that1.Field3 { + return false + } + } else if this.Field3 != nil { + return false + } else if that1.Field3 != nil { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *Timer) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*Timer) + if !ok { + that2, ok := that.(Timer) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *Timer") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *Timer but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *Timer but is not nil && this == nil") + } + if this.Time1 != that1.Time1 { + return fmt.Errorf("Time1 this(%v) Not Equal that(%v)", this.Time1, that1.Time1) + } + if this.Time2 != that1.Time2 { + return fmt.Errorf("Time2 this(%v) Not Equal that(%v)", this.Time2, that1.Time2) + } + if !bytes.Equal(this.Data, that1.Data) { + return fmt.Errorf("Data this(%v) Not Equal that(%v)", this.Data, that1.Data) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *Timer) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*Timer) + if !ok { + that2, ok := that.(Timer) + 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.Time1 != that1.Time1 { + return false + } + if this.Time2 != that1.Time2 { + return false + } + if !bytes.Equal(this.Data, that1.Data) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *MyExtendable) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*MyExtendable) + if !ok { + that2, ok := that.(MyExtendable) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *MyExtendable") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *MyExtendable but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *MyExtendable but is not nil && this == nil") + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) + } + } else if this.Field1 != nil { + return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") + } else if that1.Field1 != nil { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) + } + for k, v := range this.XXX_extensions { + if v2, ok := that1.XXX_extensions[k]; ok { + if !v.Equal(&v2) { + return fmt.Errorf("XXX_extensions this[%v](%v) Not Equal that[%v](%v)", k, this.XXX_extensions[k], k, that1.XXX_extensions[k]) + } + } else { + return fmt.Errorf("XXX_extensions[%v] Not In that", k) + } + } + for k := range that1.XXX_extensions { + if _, ok := this.XXX_extensions[k]; !ok { + return fmt.Errorf("XXX_extensions[%v] Not In this", k) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *MyExtendable) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*MyExtendable) + if !ok { + that2, ok := that.(MyExtendable) + 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.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return false + } + } else if this.Field1 != nil { + return false + } else if that1.Field1 != nil { + return false + } + for k, v := range this.XXX_extensions { + if v2, ok := that1.XXX_extensions[k]; ok { + if !v.Equal(&v2) { + return false + } + } else { + return false + } + } + for k := range that1.XXX_extensions { + if _, ok := this.XXX_extensions[k]; !ok { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *OtherExtenable) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*OtherExtenable) + if !ok { + that2, ok := that.(OtherExtenable) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *OtherExtenable") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *OtherExtenable but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *OtherExtenable but is not nil && this == nil") + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", *this.Field2, *that1.Field2) + } + } else if this.Field2 != nil { + return fmt.Errorf("this.Field2 == nil && that.Field2 != nil") + } else if that1.Field2 != nil { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) + } + if this.Field13 != nil && that1.Field13 != nil { + if *this.Field13 != *that1.Field13 { + return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", *this.Field13, *that1.Field13) + } + } else if this.Field13 != nil { + return fmt.Errorf("this.Field13 == nil && that.Field13 != nil") + } else if that1.Field13 != nil { + return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", this.Field13, that1.Field13) + } + if !this.M.Equal(that1.M) { + return fmt.Errorf("M this(%v) Not Equal that(%v)", this.M, that1.M) + } + for k, v := range this.XXX_extensions { + if v2, ok := that1.XXX_extensions[k]; ok { + if !v.Equal(&v2) { + return fmt.Errorf("XXX_extensions this[%v](%v) Not Equal that[%v](%v)", k, this.XXX_extensions[k], k, that1.XXX_extensions[k]) + } + } else { + return fmt.Errorf("XXX_extensions[%v] Not In that", k) + } + } + for k := range that1.XXX_extensions { + if _, ok := this.XXX_extensions[k]; !ok { + return fmt.Errorf("XXX_extensions[%v] Not In this", k) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *OtherExtenable) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*OtherExtenable) + if !ok { + that2, ok := that.(OtherExtenable) + 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.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + return false + } + } else if this.Field2 != nil { + return false + } else if that1.Field2 != nil { + return false + } + if this.Field13 != nil && that1.Field13 != nil { + if *this.Field13 != *that1.Field13 { + return false + } + } else if this.Field13 != nil { + return false + } else if that1.Field13 != nil { + return false + } + if !this.M.Equal(that1.M) { + return false + } + for k, v := range this.XXX_extensions { + if v2, ok := that1.XXX_extensions[k]; ok { + if !v.Equal(&v2) { + return false + } + } else { + return false + } + } + for k := range that1.XXX_extensions { + if _, ok := this.XXX_extensions[k]; !ok { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NestedDefinition) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NestedDefinition) + if !ok { + that2, ok := that.(NestedDefinition) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NestedDefinition") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NestedDefinition but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NestedDefinition but is not nil && this == nil") + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) + } + } else if this.Field1 != nil { + return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") + } else if that1.Field1 != nil { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) + } + if this.EnumField != nil && that1.EnumField != nil { + if *this.EnumField != *that1.EnumField { + return fmt.Errorf("EnumField this(%v) Not Equal that(%v)", *this.EnumField, *that1.EnumField) + } + } else if this.EnumField != nil { + return fmt.Errorf("this.EnumField == nil && that.EnumField != nil") + } else if that1.EnumField != nil { + return fmt.Errorf("EnumField this(%v) Not Equal that(%v)", this.EnumField, that1.EnumField) + } + if !this.NNM.Equal(that1.NNM) { + return fmt.Errorf("NNM this(%v) Not Equal that(%v)", this.NNM, that1.NNM) + } + if !this.NM.Equal(that1.NM) { + return fmt.Errorf("NM this(%v) Not Equal that(%v)", this.NM, that1.NM) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NestedDefinition) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*NestedDefinition) + if !ok { + that2, ok := that.(NestedDefinition) + 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.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return false + } + } else if this.Field1 != nil { + return false + } else if that1.Field1 != nil { + return false + } + if this.EnumField != nil && that1.EnumField != nil { + if *this.EnumField != *that1.EnumField { + return false + } + } else if this.EnumField != nil { + return false + } else if that1.EnumField != nil { + return false + } + if !this.NNM.Equal(that1.NNM) { + return false + } + if !this.NM.Equal(that1.NM) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NestedDefinition_NestedMessage) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NestedDefinition_NestedMessage) + if !ok { + that2, ok := that.(NestedDefinition_NestedMessage) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NestedDefinition_NestedMessage") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NestedDefinition_NestedMessage but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NestedDefinition_NestedMessage but is not nil && this == nil") + } + if this.NestedField1 != nil && that1.NestedField1 != nil { + if *this.NestedField1 != *that1.NestedField1 { + return fmt.Errorf("NestedField1 this(%v) Not Equal that(%v)", *this.NestedField1, *that1.NestedField1) + } + } else if this.NestedField1 != nil { + return fmt.Errorf("this.NestedField1 == nil && that.NestedField1 != nil") + } else if that1.NestedField1 != nil { + return fmt.Errorf("NestedField1 this(%v) Not Equal that(%v)", this.NestedField1, that1.NestedField1) + } + if !this.NNM.Equal(that1.NNM) { + return fmt.Errorf("NNM this(%v) Not Equal that(%v)", this.NNM, that1.NNM) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NestedDefinition_NestedMessage) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*NestedDefinition_NestedMessage) + if !ok { + that2, ok := that.(NestedDefinition_NestedMessage) + 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.NestedField1 != nil && that1.NestedField1 != nil { + if *this.NestedField1 != *that1.NestedField1 { + return false + } + } else if this.NestedField1 != nil { + return false + } else if that1.NestedField1 != nil { + return false + } + if !this.NNM.Equal(that1.NNM) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NestedDefinition_NestedMessage_NestedNestedMsg) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NestedDefinition_NestedMessage_NestedNestedMsg) + if !ok { + that2, ok := that.(NestedDefinition_NestedMessage_NestedNestedMsg) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NestedDefinition_NestedMessage_NestedNestedMsg") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NestedDefinition_NestedMessage_NestedNestedMsg but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NestedDefinition_NestedMessage_NestedNestedMsg but is not nil && this == nil") + } + if this.NestedNestedField1 != nil && that1.NestedNestedField1 != nil { + if *this.NestedNestedField1 != *that1.NestedNestedField1 { + return fmt.Errorf("NestedNestedField1 this(%v) Not Equal that(%v)", *this.NestedNestedField1, *that1.NestedNestedField1) + } + } else if this.NestedNestedField1 != nil { + return fmt.Errorf("this.NestedNestedField1 == nil && that.NestedNestedField1 != nil") + } else if that1.NestedNestedField1 != nil { + return fmt.Errorf("NestedNestedField1 this(%v) Not Equal that(%v)", this.NestedNestedField1, that1.NestedNestedField1) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NestedDefinition_NestedMessage_NestedNestedMsg) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*NestedDefinition_NestedMessage_NestedNestedMsg) + if !ok { + that2, ok := that.(NestedDefinition_NestedMessage_NestedNestedMsg) + 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.NestedNestedField1 != nil && that1.NestedNestedField1 != nil { + if *this.NestedNestedField1 != *that1.NestedNestedField1 { + return false + } + } else if this.NestedNestedField1 != nil { + return false + } else if that1.NestedNestedField1 != nil { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NestedScope) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NestedScope) + if !ok { + that2, ok := that.(NestedScope) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NestedScope") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NestedScope but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NestedScope but is not nil && this == nil") + } + if !this.A.Equal(that1.A) { + return fmt.Errorf("A this(%v) Not Equal that(%v)", this.A, that1.A) + } + if this.B != nil && that1.B != nil { + if *this.B != *that1.B { + return fmt.Errorf("B this(%v) Not Equal that(%v)", *this.B, *that1.B) + } + } else if this.B != nil { + return fmt.Errorf("this.B == nil && that.B != nil") + } else if that1.B != nil { + return fmt.Errorf("B this(%v) Not Equal that(%v)", this.B, that1.B) + } + if !this.C.Equal(that1.C) { + return fmt.Errorf("C this(%v) Not Equal that(%v)", this.C, that1.C) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NestedScope) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*NestedScope) + if !ok { + that2, ok := that.(NestedScope) + 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.A.Equal(that1.A) { + return false + } + if this.B != nil && that1.B != nil { + if *this.B != *that1.B { + return false + } + } else if this.B != nil { + return false + } else if that1.B != nil { + return false + } + if !this.C.Equal(that1.C) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NinOptNativeDefault) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NinOptNativeDefault) + if !ok { + that2, ok := that.(NinOptNativeDefault) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NinOptNativeDefault") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NinOptNativeDefault but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NinOptNativeDefault but is not nil && this == nil") + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) + } + } else if this.Field1 != nil { + return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") + } else if that1.Field1 != nil { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", *this.Field2, *that1.Field2) + } + } else if this.Field2 != nil { + return fmt.Errorf("this.Field2 == nil && that.Field2 != nil") + } else if that1.Field2 != nil { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) + } + if this.Field3 != nil && that1.Field3 != nil { + if *this.Field3 != *that1.Field3 { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", *this.Field3, *that1.Field3) + } + } else if this.Field3 != nil { + return fmt.Errorf("this.Field3 == nil && that.Field3 != nil") + } else if that1.Field3 != nil { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", this.Field3, that1.Field3) + } + if this.Field4 != nil && that1.Field4 != nil { + if *this.Field4 != *that1.Field4 { + return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", *this.Field4, *that1.Field4) + } + } else if this.Field4 != nil { + return fmt.Errorf("this.Field4 == nil && that.Field4 != nil") + } else if that1.Field4 != nil { + return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", this.Field4, that1.Field4) + } + if this.Field5 != nil && that1.Field5 != nil { + if *this.Field5 != *that1.Field5 { + return fmt.Errorf("Field5 this(%v) Not Equal that(%v)", *this.Field5, *that1.Field5) + } + } else if this.Field5 != nil { + return fmt.Errorf("this.Field5 == nil && that.Field5 != nil") + } else if that1.Field5 != nil { + return fmt.Errorf("Field5 this(%v) Not Equal that(%v)", this.Field5, that1.Field5) + } + if this.Field6 != nil && that1.Field6 != nil { + if *this.Field6 != *that1.Field6 { + return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", *this.Field6, *that1.Field6) + } + } else if this.Field6 != nil { + return fmt.Errorf("this.Field6 == nil && that.Field6 != nil") + } else if that1.Field6 != nil { + return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", this.Field6, that1.Field6) + } + if this.Field7 != nil && that1.Field7 != nil { + if *this.Field7 != *that1.Field7 { + return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", *this.Field7, *that1.Field7) + } + } else if this.Field7 != nil { + return fmt.Errorf("this.Field7 == nil && that.Field7 != nil") + } else if that1.Field7 != nil { + return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", this.Field7, that1.Field7) + } + if this.Field8 != nil && that1.Field8 != nil { + if *this.Field8 != *that1.Field8 { + return fmt.Errorf("Field8 this(%v) Not Equal that(%v)", *this.Field8, *that1.Field8) + } + } else if this.Field8 != nil { + return fmt.Errorf("this.Field8 == nil && that.Field8 != nil") + } else if that1.Field8 != nil { + return fmt.Errorf("Field8 this(%v) Not Equal that(%v)", this.Field8, that1.Field8) + } + if this.Field9 != nil && that1.Field9 != nil { + if *this.Field9 != *that1.Field9 { + return fmt.Errorf("Field9 this(%v) Not Equal that(%v)", *this.Field9, *that1.Field9) + } + } else if this.Field9 != nil { + return fmt.Errorf("this.Field9 == nil && that.Field9 != nil") + } else if that1.Field9 != nil { + return fmt.Errorf("Field9 this(%v) Not Equal that(%v)", this.Field9, that1.Field9) + } + if this.Field10 != nil && that1.Field10 != nil { + if *this.Field10 != *that1.Field10 { + return fmt.Errorf("Field10 this(%v) Not Equal that(%v)", *this.Field10, *that1.Field10) + } + } else if this.Field10 != nil { + return fmt.Errorf("this.Field10 == nil && that.Field10 != nil") + } else if that1.Field10 != nil { + return fmt.Errorf("Field10 this(%v) Not Equal that(%v)", this.Field10, that1.Field10) + } + if this.Field11 != nil && that1.Field11 != nil { + if *this.Field11 != *that1.Field11 { + return fmt.Errorf("Field11 this(%v) Not Equal that(%v)", *this.Field11, *that1.Field11) + } + } else if this.Field11 != nil { + return fmt.Errorf("this.Field11 == nil && that.Field11 != nil") + } else if that1.Field11 != nil { + return fmt.Errorf("Field11 this(%v) Not Equal that(%v)", this.Field11, that1.Field11) + } + if this.Field12 != nil && that1.Field12 != nil { + if *this.Field12 != *that1.Field12 { + return fmt.Errorf("Field12 this(%v) Not Equal that(%v)", *this.Field12, *that1.Field12) + } + } else if this.Field12 != nil { + return fmt.Errorf("this.Field12 == nil && that.Field12 != nil") + } else if that1.Field12 != nil { + return fmt.Errorf("Field12 this(%v) Not Equal that(%v)", this.Field12, that1.Field12) + } + if this.Field13 != nil && that1.Field13 != nil { + if *this.Field13 != *that1.Field13 { + return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", *this.Field13, *that1.Field13) + } + } else if this.Field13 != nil { + return fmt.Errorf("this.Field13 == nil && that.Field13 != nil") + } else if that1.Field13 != nil { + return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", this.Field13, that1.Field13) + } + if this.Field14 != nil && that1.Field14 != nil { + if *this.Field14 != *that1.Field14 { + return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", *this.Field14, *that1.Field14) + } + } else if this.Field14 != nil { + return fmt.Errorf("this.Field14 == nil && that.Field14 != nil") + } else if that1.Field14 != nil { + return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", this.Field14, that1.Field14) + } + if !bytes.Equal(this.Field15, that1.Field15) { + return fmt.Errorf("Field15 this(%v) Not Equal that(%v)", this.Field15, that1.Field15) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NinOptNativeDefault) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*NinOptNativeDefault) + if !ok { + that2, ok := that.(NinOptNativeDefault) + 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.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return false + } + } else if this.Field1 != nil { + return false + } else if that1.Field1 != nil { + return false + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + return false + } + } else if this.Field2 != nil { + return false + } else if that1.Field2 != nil { + return false + } + if this.Field3 != nil && that1.Field3 != nil { + if *this.Field3 != *that1.Field3 { + return false + } + } else if this.Field3 != nil { + return false + } else if that1.Field3 != nil { + return false + } + if this.Field4 != nil && that1.Field4 != nil { + if *this.Field4 != *that1.Field4 { + return false + } + } else if this.Field4 != nil { + return false + } else if that1.Field4 != nil { + return false + } + if this.Field5 != nil && that1.Field5 != nil { + if *this.Field5 != *that1.Field5 { + return false + } + } else if this.Field5 != nil { + return false + } else if that1.Field5 != nil { + return false + } + if this.Field6 != nil && that1.Field6 != nil { + if *this.Field6 != *that1.Field6 { + return false + } + } else if this.Field6 != nil { + return false + } else if that1.Field6 != nil { + return false + } + if this.Field7 != nil && that1.Field7 != nil { + if *this.Field7 != *that1.Field7 { + return false + } + } else if this.Field7 != nil { + return false + } else if that1.Field7 != nil { + return false + } + if this.Field8 != nil && that1.Field8 != nil { + if *this.Field8 != *that1.Field8 { + return false + } + } else if this.Field8 != nil { + return false + } else if that1.Field8 != nil { + return false + } + if this.Field9 != nil && that1.Field9 != nil { + if *this.Field9 != *that1.Field9 { + return false + } + } else if this.Field9 != nil { + return false + } else if that1.Field9 != nil { + return false + } + if this.Field10 != nil && that1.Field10 != nil { + if *this.Field10 != *that1.Field10 { + return false + } + } else if this.Field10 != nil { + return false + } else if that1.Field10 != nil { + return false + } + if this.Field11 != nil && that1.Field11 != nil { + if *this.Field11 != *that1.Field11 { + return false + } + } else if this.Field11 != nil { + return false + } else if that1.Field11 != nil { + return false + } + if this.Field12 != nil && that1.Field12 != nil { + if *this.Field12 != *that1.Field12 { + return false + } + } else if this.Field12 != nil { + return false + } else if that1.Field12 != nil { + return false + } + if this.Field13 != nil && that1.Field13 != nil { + if *this.Field13 != *that1.Field13 { + return false + } + } else if this.Field13 != nil { + return false + } else if that1.Field13 != nil { + return false + } + if this.Field14 != nil && that1.Field14 != nil { + if *this.Field14 != *that1.Field14 { + return false + } + } else if this.Field14 != nil { + return false + } else if that1.Field14 != nil { + return false + } + if !bytes.Equal(this.Field15, that1.Field15) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *CustomContainer) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*CustomContainer) + if !ok { + that2, ok := that.(CustomContainer) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *CustomContainer") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *CustomContainer but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *CustomContainer but is not nil && this == nil") + } + if !this.CustomStruct.Equal(&that1.CustomStruct) { + return fmt.Errorf("CustomStruct this(%v) Not Equal that(%v)", this.CustomStruct, that1.CustomStruct) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *CustomContainer) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*CustomContainer) + if !ok { + that2, ok := that.(CustomContainer) + 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.CustomStruct.Equal(&that1.CustomStruct) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *CustomNameNidOptNative) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*CustomNameNidOptNative) + if !ok { + that2, ok := that.(CustomNameNidOptNative) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *CustomNameNidOptNative") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *CustomNameNidOptNative but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *CustomNameNidOptNative but is not nil && this == nil") + } + if this.FieldA != that1.FieldA { + return fmt.Errorf("FieldA this(%v) Not Equal that(%v)", this.FieldA, that1.FieldA) + } + if this.FieldB != that1.FieldB { + return fmt.Errorf("FieldB this(%v) Not Equal that(%v)", this.FieldB, that1.FieldB) + } + if this.FieldC != that1.FieldC { + return fmt.Errorf("FieldC this(%v) Not Equal that(%v)", this.FieldC, that1.FieldC) + } + if this.FieldD != that1.FieldD { + return fmt.Errorf("FieldD this(%v) Not Equal that(%v)", this.FieldD, that1.FieldD) + } + if this.FieldE != that1.FieldE { + return fmt.Errorf("FieldE this(%v) Not Equal that(%v)", this.FieldE, that1.FieldE) + } + if this.FieldF != that1.FieldF { + return fmt.Errorf("FieldF this(%v) Not Equal that(%v)", this.FieldF, that1.FieldF) + } + if this.FieldG != that1.FieldG { + return fmt.Errorf("FieldG this(%v) Not Equal that(%v)", this.FieldG, that1.FieldG) + } + if this.FieldH != that1.FieldH { + return fmt.Errorf("FieldH this(%v) Not Equal that(%v)", this.FieldH, that1.FieldH) + } + if this.FieldI != that1.FieldI { + return fmt.Errorf("FieldI this(%v) Not Equal that(%v)", this.FieldI, that1.FieldI) + } + if this.FieldJ != that1.FieldJ { + return fmt.Errorf("FieldJ this(%v) Not Equal that(%v)", this.FieldJ, that1.FieldJ) + } + if this.FieldK != that1.FieldK { + return fmt.Errorf("FieldK this(%v) Not Equal that(%v)", this.FieldK, that1.FieldK) + } + if this.FieldL != that1.FieldL { + return fmt.Errorf("FieldL this(%v) Not Equal that(%v)", this.FieldL, that1.FieldL) + } + if this.FieldM != that1.FieldM { + return fmt.Errorf("FieldM this(%v) Not Equal that(%v)", this.FieldM, that1.FieldM) + } + if this.FieldN != that1.FieldN { + return fmt.Errorf("FieldN this(%v) Not Equal that(%v)", this.FieldN, that1.FieldN) + } + if !bytes.Equal(this.FieldO, that1.FieldO) { + return fmt.Errorf("FieldO this(%v) Not Equal that(%v)", this.FieldO, that1.FieldO) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *CustomNameNidOptNative) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*CustomNameNidOptNative) + if !ok { + that2, ok := that.(CustomNameNidOptNative) + 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.FieldA != that1.FieldA { + return false + } + if this.FieldB != that1.FieldB { + return false + } + if this.FieldC != that1.FieldC { + return false + } + if this.FieldD != that1.FieldD { + return false + } + if this.FieldE != that1.FieldE { + return false + } + if this.FieldF != that1.FieldF { + return false + } + if this.FieldG != that1.FieldG { + return false + } + if this.FieldH != that1.FieldH { + return false + } + if this.FieldI != that1.FieldI { + return false + } + if this.FieldJ != that1.FieldJ { + return false + } + if this.FieldK != that1.FieldK { + return false + } + if this.FieldL != that1.FieldL { + return false + } + if this.FieldM != that1.FieldM { + return false + } + if this.FieldN != that1.FieldN { + return false + } + if !bytes.Equal(this.FieldO, that1.FieldO) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *CustomNameNinOptNative) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*CustomNameNinOptNative) + if !ok { + that2, ok := that.(CustomNameNinOptNative) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *CustomNameNinOptNative") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *CustomNameNinOptNative but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *CustomNameNinOptNative but is not nil && this == nil") + } + if this.FieldA != nil && that1.FieldA != nil { + if *this.FieldA != *that1.FieldA { + return fmt.Errorf("FieldA this(%v) Not Equal that(%v)", *this.FieldA, *that1.FieldA) + } + } else if this.FieldA != nil { + return fmt.Errorf("this.FieldA == nil && that.FieldA != nil") + } else if that1.FieldA != nil { + return fmt.Errorf("FieldA this(%v) Not Equal that(%v)", this.FieldA, that1.FieldA) + } + if this.FieldB != nil && that1.FieldB != nil { + if *this.FieldB != *that1.FieldB { + return fmt.Errorf("FieldB this(%v) Not Equal that(%v)", *this.FieldB, *that1.FieldB) + } + } else if this.FieldB != nil { + return fmt.Errorf("this.FieldB == nil && that.FieldB != nil") + } else if that1.FieldB != nil { + return fmt.Errorf("FieldB this(%v) Not Equal that(%v)", this.FieldB, that1.FieldB) + } + if this.FieldC != nil && that1.FieldC != nil { + if *this.FieldC != *that1.FieldC { + return fmt.Errorf("FieldC this(%v) Not Equal that(%v)", *this.FieldC, *that1.FieldC) + } + } else if this.FieldC != nil { + return fmt.Errorf("this.FieldC == nil && that.FieldC != nil") + } else if that1.FieldC != nil { + return fmt.Errorf("FieldC this(%v) Not Equal that(%v)", this.FieldC, that1.FieldC) + } + if this.FieldD != nil && that1.FieldD != nil { + if *this.FieldD != *that1.FieldD { + return fmt.Errorf("FieldD this(%v) Not Equal that(%v)", *this.FieldD, *that1.FieldD) + } + } else if this.FieldD != nil { + return fmt.Errorf("this.FieldD == nil && that.FieldD != nil") + } else if that1.FieldD != nil { + return fmt.Errorf("FieldD this(%v) Not Equal that(%v)", this.FieldD, that1.FieldD) + } + if this.FieldE != nil && that1.FieldE != nil { + if *this.FieldE != *that1.FieldE { + return fmt.Errorf("FieldE this(%v) Not Equal that(%v)", *this.FieldE, *that1.FieldE) + } + } else if this.FieldE != nil { + return fmt.Errorf("this.FieldE == nil && that.FieldE != nil") + } else if that1.FieldE != nil { + return fmt.Errorf("FieldE this(%v) Not Equal that(%v)", this.FieldE, that1.FieldE) + } + if this.FieldF != nil && that1.FieldF != nil { + if *this.FieldF != *that1.FieldF { + return fmt.Errorf("FieldF this(%v) Not Equal that(%v)", *this.FieldF, *that1.FieldF) + } + } else if this.FieldF != nil { + return fmt.Errorf("this.FieldF == nil && that.FieldF != nil") + } else if that1.FieldF != nil { + return fmt.Errorf("FieldF this(%v) Not Equal that(%v)", this.FieldF, that1.FieldF) + } + if this.FieldG != nil && that1.FieldG != nil { + if *this.FieldG != *that1.FieldG { + return fmt.Errorf("FieldG this(%v) Not Equal that(%v)", *this.FieldG, *that1.FieldG) + } + } else if this.FieldG != nil { + return fmt.Errorf("this.FieldG == nil && that.FieldG != nil") + } else if that1.FieldG != nil { + return fmt.Errorf("FieldG this(%v) Not Equal that(%v)", this.FieldG, that1.FieldG) + } + if this.FieldH != nil && that1.FieldH != nil { + if *this.FieldH != *that1.FieldH { + return fmt.Errorf("FieldH this(%v) Not Equal that(%v)", *this.FieldH, *that1.FieldH) + } + } else if this.FieldH != nil { + return fmt.Errorf("this.FieldH == nil && that.FieldH != nil") + } else if that1.FieldH != nil { + return fmt.Errorf("FieldH this(%v) Not Equal that(%v)", this.FieldH, that1.FieldH) + } + if this.FieldI != nil && that1.FieldI != nil { + if *this.FieldI != *that1.FieldI { + return fmt.Errorf("FieldI this(%v) Not Equal that(%v)", *this.FieldI, *that1.FieldI) + } + } else if this.FieldI != nil { + return fmt.Errorf("this.FieldI == nil && that.FieldI != nil") + } else if that1.FieldI != nil { + return fmt.Errorf("FieldI this(%v) Not Equal that(%v)", this.FieldI, that1.FieldI) + } + if this.FieldJ != nil && that1.FieldJ != nil { + if *this.FieldJ != *that1.FieldJ { + return fmt.Errorf("FieldJ this(%v) Not Equal that(%v)", *this.FieldJ, *that1.FieldJ) + } + } else if this.FieldJ != nil { + return fmt.Errorf("this.FieldJ == nil && that.FieldJ != nil") + } else if that1.FieldJ != nil { + return fmt.Errorf("FieldJ this(%v) Not Equal that(%v)", this.FieldJ, that1.FieldJ) + } + if this.FieldK != nil && that1.FieldK != nil { + if *this.FieldK != *that1.FieldK { + return fmt.Errorf("FieldK this(%v) Not Equal that(%v)", *this.FieldK, *that1.FieldK) + } + } else if this.FieldK != nil { + return fmt.Errorf("this.FieldK == nil && that.FieldK != nil") + } else if that1.FieldK != nil { + return fmt.Errorf("FieldK this(%v) Not Equal that(%v)", this.FieldK, that1.FieldK) + } + if this.FielL != nil && that1.FielL != nil { + if *this.FielL != *that1.FielL { + return fmt.Errorf("FielL this(%v) Not Equal that(%v)", *this.FielL, *that1.FielL) + } + } else if this.FielL != nil { + return fmt.Errorf("this.FielL == nil && that.FielL != nil") + } else if that1.FielL != nil { + return fmt.Errorf("FielL this(%v) Not Equal that(%v)", this.FielL, that1.FielL) + } + if this.FieldM != nil && that1.FieldM != nil { + if *this.FieldM != *that1.FieldM { + return fmt.Errorf("FieldM this(%v) Not Equal that(%v)", *this.FieldM, *that1.FieldM) + } + } else if this.FieldM != nil { + return fmt.Errorf("this.FieldM == nil && that.FieldM != nil") + } else if that1.FieldM != nil { + return fmt.Errorf("FieldM this(%v) Not Equal that(%v)", this.FieldM, that1.FieldM) + } + if this.FieldN != nil && that1.FieldN != nil { + if *this.FieldN != *that1.FieldN { + return fmt.Errorf("FieldN this(%v) Not Equal that(%v)", *this.FieldN, *that1.FieldN) + } + } else if this.FieldN != nil { + return fmt.Errorf("this.FieldN == nil && that.FieldN != nil") + } else if that1.FieldN != nil { + return fmt.Errorf("FieldN this(%v) Not Equal that(%v)", this.FieldN, that1.FieldN) + } + if !bytes.Equal(this.FieldO, that1.FieldO) { + return fmt.Errorf("FieldO this(%v) Not Equal that(%v)", this.FieldO, that1.FieldO) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *CustomNameNinOptNative) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*CustomNameNinOptNative) + if !ok { + that2, ok := that.(CustomNameNinOptNative) + 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.FieldA != nil && that1.FieldA != nil { + if *this.FieldA != *that1.FieldA { + return false + } + } else if this.FieldA != nil { + return false + } else if that1.FieldA != nil { + return false + } + if this.FieldB != nil && that1.FieldB != nil { + if *this.FieldB != *that1.FieldB { + return false + } + } else if this.FieldB != nil { + return false + } else if that1.FieldB != nil { + return false + } + if this.FieldC != nil && that1.FieldC != nil { + if *this.FieldC != *that1.FieldC { + return false + } + } else if this.FieldC != nil { + return false + } else if that1.FieldC != nil { + return false + } + if this.FieldD != nil && that1.FieldD != nil { + if *this.FieldD != *that1.FieldD { + return false + } + } else if this.FieldD != nil { + return false + } else if that1.FieldD != nil { + return false + } + if this.FieldE != nil && that1.FieldE != nil { + if *this.FieldE != *that1.FieldE { + return false + } + } else if this.FieldE != nil { + return false + } else if that1.FieldE != nil { + return false + } + if this.FieldF != nil && that1.FieldF != nil { + if *this.FieldF != *that1.FieldF { + return false + } + } else if this.FieldF != nil { + return false + } else if that1.FieldF != nil { + return false + } + if this.FieldG != nil && that1.FieldG != nil { + if *this.FieldG != *that1.FieldG { + return false + } + } else if this.FieldG != nil { + return false + } else if that1.FieldG != nil { + return false + } + if this.FieldH != nil && that1.FieldH != nil { + if *this.FieldH != *that1.FieldH { + return false + } + } else if this.FieldH != nil { + return false + } else if that1.FieldH != nil { + return false + } + if this.FieldI != nil && that1.FieldI != nil { + if *this.FieldI != *that1.FieldI { + return false + } + } else if this.FieldI != nil { + return false + } else if that1.FieldI != nil { + return false + } + if this.FieldJ != nil && that1.FieldJ != nil { + if *this.FieldJ != *that1.FieldJ { + return false + } + } else if this.FieldJ != nil { + return false + } else if that1.FieldJ != nil { + return false + } + if this.FieldK != nil && that1.FieldK != nil { + if *this.FieldK != *that1.FieldK { + return false + } + } else if this.FieldK != nil { + return false + } else if that1.FieldK != nil { + return false + } + if this.FielL != nil && that1.FielL != nil { + if *this.FielL != *that1.FielL { + return false + } + } else if this.FielL != nil { + return false + } else if that1.FielL != nil { + return false + } + if this.FieldM != nil && that1.FieldM != nil { + if *this.FieldM != *that1.FieldM { + return false + } + } else if this.FieldM != nil { + return false + } else if that1.FieldM != nil { + return false + } + if this.FieldN != nil && that1.FieldN != nil { + if *this.FieldN != *that1.FieldN { + return false + } + } else if this.FieldN != nil { + return false + } else if that1.FieldN != nil { + return false + } + if !bytes.Equal(this.FieldO, that1.FieldO) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *CustomNameNinRepNative) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*CustomNameNinRepNative) + if !ok { + that2, ok := that.(CustomNameNinRepNative) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *CustomNameNinRepNative") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *CustomNameNinRepNative but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *CustomNameNinRepNative but is not nil && this == nil") + } + if len(this.FieldA) != len(that1.FieldA) { + return fmt.Errorf("FieldA this(%v) Not Equal that(%v)", len(this.FieldA), len(that1.FieldA)) + } + for i := range this.FieldA { + if this.FieldA[i] != that1.FieldA[i] { + return fmt.Errorf("FieldA this[%v](%v) Not Equal that[%v](%v)", i, this.FieldA[i], i, that1.FieldA[i]) + } + } + if len(this.FieldB) != len(that1.FieldB) { + return fmt.Errorf("FieldB this(%v) Not Equal that(%v)", len(this.FieldB), len(that1.FieldB)) + } + for i := range this.FieldB { + if this.FieldB[i] != that1.FieldB[i] { + return fmt.Errorf("FieldB this[%v](%v) Not Equal that[%v](%v)", i, this.FieldB[i], i, that1.FieldB[i]) + } + } + if len(this.FieldC) != len(that1.FieldC) { + return fmt.Errorf("FieldC this(%v) Not Equal that(%v)", len(this.FieldC), len(that1.FieldC)) + } + for i := range this.FieldC { + if this.FieldC[i] != that1.FieldC[i] { + return fmt.Errorf("FieldC this[%v](%v) Not Equal that[%v](%v)", i, this.FieldC[i], i, that1.FieldC[i]) + } + } + if len(this.FieldD) != len(that1.FieldD) { + return fmt.Errorf("FieldD this(%v) Not Equal that(%v)", len(this.FieldD), len(that1.FieldD)) + } + for i := range this.FieldD { + if this.FieldD[i] != that1.FieldD[i] { + return fmt.Errorf("FieldD this[%v](%v) Not Equal that[%v](%v)", i, this.FieldD[i], i, that1.FieldD[i]) + } + } + if len(this.FieldE) != len(that1.FieldE) { + return fmt.Errorf("FieldE this(%v) Not Equal that(%v)", len(this.FieldE), len(that1.FieldE)) + } + for i := range this.FieldE { + if this.FieldE[i] != that1.FieldE[i] { + return fmt.Errorf("FieldE this[%v](%v) Not Equal that[%v](%v)", i, this.FieldE[i], i, that1.FieldE[i]) + } + } + if len(this.FieldF) != len(that1.FieldF) { + return fmt.Errorf("FieldF this(%v) Not Equal that(%v)", len(this.FieldF), len(that1.FieldF)) + } + for i := range this.FieldF { + if this.FieldF[i] != that1.FieldF[i] { + return fmt.Errorf("FieldF this[%v](%v) Not Equal that[%v](%v)", i, this.FieldF[i], i, that1.FieldF[i]) + } + } + if len(this.FieldG) != len(that1.FieldG) { + return fmt.Errorf("FieldG this(%v) Not Equal that(%v)", len(this.FieldG), len(that1.FieldG)) + } + for i := range this.FieldG { + if this.FieldG[i] != that1.FieldG[i] { + return fmt.Errorf("FieldG this[%v](%v) Not Equal that[%v](%v)", i, this.FieldG[i], i, that1.FieldG[i]) + } + } + if len(this.FieldH) != len(that1.FieldH) { + return fmt.Errorf("FieldH this(%v) Not Equal that(%v)", len(this.FieldH), len(that1.FieldH)) + } + for i := range this.FieldH { + if this.FieldH[i] != that1.FieldH[i] { + return fmt.Errorf("FieldH this[%v](%v) Not Equal that[%v](%v)", i, this.FieldH[i], i, that1.FieldH[i]) + } + } + if len(this.FieldI) != len(that1.FieldI) { + return fmt.Errorf("FieldI this(%v) Not Equal that(%v)", len(this.FieldI), len(that1.FieldI)) + } + for i := range this.FieldI { + if this.FieldI[i] != that1.FieldI[i] { + return fmt.Errorf("FieldI this[%v](%v) Not Equal that[%v](%v)", i, this.FieldI[i], i, that1.FieldI[i]) + } + } + if len(this.FieldJ) != len(that1.FieldJ) { + return fmt.Errorf("FieldJ this(%v) Not Equal that(%v)", len(this.FieldJ), len(that1.FieldJ)) + } + for i := range this.FieldJ { + if this.FieldJ[i] != that1.FieldJ[i] { + return fmt.Errorf("FieldJ this[%v](%v) Not Equal that[%v](%v)", i, this.FieldJ[i], i, that1.FieldJ[i]) + } + } + if len(this.FieldK) != len(that1.FieldK) { + return fmt.Errorf("FieldK this(%v) Not Equal that(%v)", len(this.FieldK), len(that1.FieldK)) + } + for i := range this.FieldK { + if this.FieldK[i] != that1.FieldK[i] { + return fmt.Errorf("FieldK this[%v](%v) Not Equal that[%v](%v)", i, this.FieldK[i], i, that1.FieldK[i]) + } + } + if len(this.FieldL) != len(that1.FieldL) { + return fmt.Errorf("FieldL this(%v) Not Equal that(%v)", len(this.FieldL), len(that1.FieldL)) + } + for i := range this.FieldL { + if this.FieldL[i] != that1.FieldL[i] { + return fmt.Errorf("FieldL this[%v](%v) Not Equal that[%v](%v)", i, this.FieldL[i], i, that1.FieldL[i]) + } + } + if len(this.FieldM) != len(that1.FieldM) { + return fmt.Errorf("FieldM this(%v) Not Equal that(%v)", len(this.FieldM), len(that1.FieldM)) + } + for i := range this.FieldM { + if this.FieldM[i] != that1.FieldM[i] { + return fmt.Errorf("FieldM this[%v](%v) Not Equal that[%v](%v)", i, this.FieldM[i], i, that1.FieldM[i]) + } + } + if len(this.FieldN) != len(that1.FieldN) { + return fmt.Errorf("FieldN this(%v) Not Equal that(%v)", len(this.FieldN), len(that1.FieldN)) + } + for i := range this.FieldN { + if this.FieldN[i] != that1.FieldN[i] { + return fmt.Errorf("FieldN this[%v](%v) Not Equal that[%v](%v)", i, this.FieldN[i], i, that1.FieldN[i]) + } + } + if len(this.FieldO) != len(that1.FieldO) { + return fmt.Errorf("FieldO this(%v) Not Equal that(%v)", len(this.FieldO), len(that1.FieldO)) + } + for i := range this.FieldO { + if !bytes.Equal(this.FieldO[i], that1.FieldO[i]) { + return fmt.Errorf("FieldO this[%v](%v) Not Equal that[%v](%v)", i, this.FieldO[i], i, that1.FieldO[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *CustomNameNinRepNative) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*CustomNameNinRepNative) + if !ok { + that2, ok := that.(CustomNameNinRepNative) + 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.FieldA) != len(that1.FieldA) { + return false + } + for i := range this.FieldA { + if this.FieldA[i] != that1.FieldA[i] { + return false + } + } + if len(this.FieldB) != len(that1.FieldB) { + return false + } + for i := range this.FieldB { + if this.FieldB[i] != that1.FieldB[i] { + return false + } + } + if len(this.FieldC) != len(that1.FieldC) { + return false + } + for i := range this.FieldC { + if this.FieldC[i] != that1.FieldC[i] { + return false + } + } + if len(this.FieldD) != len(that1.FieldD) { + return false + } + for i := range this.FieldD { + if this.FieldD[i] != that1.FieldD[i] { + return false + } + } + if len(this.FieldE) != len(that1.FieldE) { + return false + } + for i := range this.FieldE { + if this.FieldE[i] != that1.FieldE[i] { + return false + } + } + if len(this.FieldF) != len(that1.FieldF) { + return false + } + for i := range this.FieldF { + if this.FieldF[i] != that1.FieldF[i] { + return false + } + } + if len(this.FieldG) != len(that1.FieldG) { + return false + } + for i := range this.FieldG { + if this.FieldG[i] != that1.FieldG[i] { + return false + } + } + if len(this.FieldH) != len(that1.FieldH) { + return false + } + for i := range this.FieldH { + if this.FieldH[i] != that1.FieldH[i] { + return false + } + } + if len(this.FieldI) != len(that1.FieldI) { + return false + } + for i := range this.FieldI { + if this.FieldI[i] != that1.FieldI[i] { + return false + } + } + if len(this.FieldJ) != len(that1.FieldJ) { + return false + } + for i := range this.FieldJ { + if this.FieldJ[i] != that1.FieldJ[i] { + return false + } + } + if len(this.FieldK) != len(that1.FieldK) { + return false + } + for i := range this.FieldK { + if this.FieldK[i] != that1.FieldK[i] { + return false + } + } + if len(this.FieldL) != len(that1.FieldL) { + return false + } + for i := range this.FieldL { + if this.FieldL[i] != that1.FieldL[i] { + return false + } + } + if len(this.FieldM) != len(that1.FieldM) { + return false + } + for i := range this.FieldM { + if this.FieldM[i] != that1.FieldM[i] { + return false + } + } + if len(this.FieldN) != len(that1.FieldN) { + return false + } + for i := range this.FieldN { + if this.FieldN[i] != that1.FieldN[i] { + return false + } + } + if len(this.FieldO) != len(that1.FieldO) { + return false + } + for i := range this.FieldO { + if !bytes.Equal(this.FieldO[i], that1.FieldO[i]) { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *CustomNameNinStruct) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*CustomNameNinStruct) + if !ok { + that2, ok := that.(CustomNameNinStruct) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *CustomNameNinStruct") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *CustomNameNinStruct but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *CustomNameNinStruct but is not nil && this == nil") + } + if this.FieldA != nil && that1.FieldA != nil { + if *this.FieldA != *that1.FieldA { + return fmt.Errorf("FieldA this(%v) Not Equal that(%v)", *this.FieldA, *that1.FieldA) + } + } else if this.FieldA != nil { + return fmt.Errorf("this.FieldA == nil && that.FieldA != nil") + } else if that1.FieldA != nil { + return fmt.Errorf("FieldA this(%v) Not Equal that(%v)", this.FieldA, that1.FieldA) + } + if this.FieldB != nil && that1.FieldB != nil { + if *this.FieldB != *that1.FieldB { + return fmt.Errorf("FieldB this(%v) Not Equal that(%v)", *this.FieldB, *that1.FieldB) + } + } else if this.FieldB != nil { + return fmt.Errorf("this.FieldB == nil && that.FieldB != nil") + } else if that1.FieldB != nil { + return fmt.Errorf("FieldB this(%v) Not Equal that(%v)", this.FieldB, that1.FieldB) + } + if !this.FieldC.Equal(that1.FieldC) { + return fmt.Errorf("FieldC this(%v) Not Equal that(%v)", this.FieldC, that1.FieldC) + } + if len(this.FieldD) != len(that1.FieldD) { + return fmt.Errorf("FieldD this(%v) Not Equal that(%v)", len(this.FieldD), len(that1.FieldD)) + } + for i := range this.FieldD { + if !this.FieldD[i].Equal(that1.FieldD[i]) { + return fmt.Errorf("FieldD this[%v](%v) Not Equal that[%v](%v)", i, this.FieldD[i], i, that1.FieldD[i]) + } + } + if this.FieldE != nil && that1.FieldE != nil { + if *this.FieldE != *that1.FieldE { + return fmt.Errorf("FieldE this(%v) Not Equal that(%v)", *this.FieldE, *that1.FieldE) + } + } else if this.FieldE != nil { + return fmt.Errorf("this.FieldE == nil && that.FieldE != nil") + } else if that1.FieldE != nil { + return fmt.Errorf("FieldE this(%v) Not Equal that(%v)", this.FieldE, that1.FieldE) + } + if this.FieldF != nil && that1.FieldF != nil { + if *this.FieldF != *that1.FieldF { + return fmt.Errorf("FieldF this(%v) Not Equal that(%v)", *this.FieldF, *that1.FieldF) + } + } else if this.FieldF != nil { + return fmt.Errorf("this.FieldF == nil && that.FieldF != nil") + } else if that1.FieldF != nil { + return fmt.Errorf("FieldF this(%v) Not Equal that(%v)", this.FieldF, that1.FieldF) + } + if !this.FieldG.Equal(that1.FieldG) { + return fmt.Errorf("FieldG this(%v) Not Equal that(%v)", this.FieldG, that1.FieldG) + } + if this.FieldH != nil && that1.FieldH != nil { + if *this.FieldH != *that1.FieldH { + return fmt.Errorf("FieldH this(%v) Not Equal that(%v)", *this.FieldH, *that1.FieldH) + } + } else if this.FieldH != nil { + return fmt.Errorf("this.FieldH == nil && that.FieldH != nil") + } else if that1.FieldH != nil { + return fmt.Errorf("FieldH this(%v) Not Equal that(%v)", this.FieldH, that1.FieldH) + } + if this.FieldI != nil && that1.FieldI != nil { + if *this.FieldI != *that1.FieldI { + return fmt.Errorf("FieldI this(%v) Not Equal that(%v)", *this.FieldI, *that1.FieldI) + } + } else if this.FieldI != nil { + return fmt.Errorf("this.FieldI == nil && that.FieldI != nil") + } else if that1.FieldI != nil { + return fmt.Errorf("FieldI this(%v) Not Equal that(%v)", this.FieldI, that1.FieldI) + } + if !bytes.Equal(this.FieldJ, that1.FieldJ) { + return fmt.Errorf("FieldJ this(%v) Not Equal that(%v)", this.FieldJ, that1.FieldJ) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *CustomNameNinStruct) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*CustomNameNinStruct) + if !ok { + that2, ok := that.(CustomNameNinStruct) + 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.FieldA != nil && that1.FieldA != nil { + if *this.FieldA != *that1.FieldA { + return false + } + } else if this.FieldA != nil { + return false + } else if that1.FieldA != nil { + return false + } + if this.FieldB != nil && that1.FieldB != nil { + if *this.FieldB != *that1.FieldB { + return false + } + } else if this.FieldB != nil { + return false + } else if that1.FieldB != nil { + return false + } + if !this.FieldC.Equal(that1.FieldC) { + return false + } + if len(this.FieldD) != len(that1.FieldD) { + return false + } + for i := range this.FieldD { + if !this.FieldD[i].Equal(that1.FieldD[i]) { + return false + } + } + if this.FieldE != nil && that1.FieldE != nil { + if *this.FieldE != *that1.FieldE { + return false + } + } else if this.FieldE != nil { + return false + } else if that1.FieldE != nil { + return false + } + if this.FieldF != nil && that1.FieldF != nil { + if *this.FieldF != *that1.FieldF { + return false + } + } else if this.FieldF != nil { + return false + } else if that1.FieldF != nil { + return false + } + if !this.FieldG.Equal(that1.FieldG) { + return false + } + if this.FieldH != nil && that1.FieldH != nil { + if *this.FieldH != *that1.FieldH { + return false + } + } else if this.FieldH != nil { + return false + } else if that1.FieldH != nil { + return false + } + if this.FieldI != nil && that1.FieldI != nil { + if *this.FieldI != *that1.FieldI { + return false + } + } else if this.FieldI != nil { + return false + } else if that1.FieldI != nil { + return false + } + if !bytes.Equal(this.FieldJ, that1.FieldJ) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *CustomNameCustomType) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*CustomNameCustomType) + if !ok { + that2, ok := that.(CustomNameCustomType) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *CustomNameCustomType") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *CustomNameCustomType but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *CustomNameCustomType but is not nil && this == nil") + } + if that1.FieldA == nil { + if this.FieldA != nil { + return fmt.Errorf("this.FieldA != nil && that1.FieldA == nil") + } + } else if !this.FieldA.Equal(*that1.FieldA) { + return fmt.Errorf("FieldA this(%v) Not Equal that(%v)", this.FieldA, that1.FieldA) + } + if that1.FieldB == nil { + if this.FieldB != nil { + return fmt.Errorf("this.FieldB != nil && that1.FieldB == nil") + } + } else if !this.FieldB.Equal(*that1.FieldB) { + return fmt.Errorf("FieldB this(%v) Not Equal that(%v)", this.FieldB, that1.FieldB) + } + if len(this.FieldC) != len(that1.FieldC) { + return fmt.Errorf("FieldC this(%v) Not Equal that(%v)", len(this.FieldC), len(that1.FieldC)) + } + for i := range this.FieldC { + if !this.FieldC[i].Equal(that1.FieldC[i]) { + return fmt.Errorf("FieldC this[%v](%v) Not Equal that[%v](%v)", i, this.FieldC[i], i, that1.FieldC[i]) + } + } + if len(this.FieldD) != len(that1.FieldD) { + return fmt.Errorf("FieldD this(%v) Not Equal that(%v)", len(this.FieldD), len(that1.FieldD)) + } + for i := range this.FieldD { + if !this.FieldD[i].Equal(that1.FieldD[i]) { + return fmt.Errorf("FieldD this[%v](%v) Not Equal that[%v](%v)", i, this.FieldD[i], i, that1.FieldD[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *CustomNameCustomType) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*CustomNameCustomType) + if !ok { + that2, ok := that.(CustomNameCustomType) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + if this == nil { + return true + } + return false + } else if this == nil { + return false + } + if that1.FieldA == nil { + if this.FieldA != nil { + return false + } + } else if !this.FieldA.Equal(*that1.FieldA) { + return false + } + if that1.FieldB == nil { + if this.FieldB != nil { + return false + } + } else if !this.FieldB.Equal(*that1.FieldB) { + return false + } + if len(this.FieldC) != len(that1.FieldC) { + return false + } + for i := range this.FieldC { + if !this.FieldC[i].Equal(that1.FieldC[i]) { + return false + } + } + if len(this.FieldD) != len(that1.FieldD) { + return false + } + for i := range this.FieldD { + if !this.FieldD[i].Equal(that1.FieldD[i]) { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *CustomNameNinEmbeddedStructUnion) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*CustomNameNinEmbeddedStructUnion) + if !ok { + that2, ok := that.(CustomNameNinEmbeddedStructUnion) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *CustomNameNinEmbeddedStructUnion") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *CustomNameNinEmbeddedStructUnion but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *CustomNameNinEmbeddedStructUnion but is not nil && this == nil") + } + if !this.NidOptNative.Equal(that1.NidOptNative) { + return fmt.Errorf("NidOptNative this(%v) Not Equal that(%v)", this.NidOptNative, that1.NidOptNative) + } + if !this.FieldA.Equal(that1.FieldA) { + return fmt.Errorf("FieldA this(%v) Not Equal that(%v)", this.FieldA, that1.FieldA) + } + if this.FieldB != nil && that1.FieldB != nil { + if *this.FieldB != *that1.FieldB { + return fmt.Errorf("FieldB this(%v) Not Equal that(%v)", *this.FieldB, *that1.FieldB) + } + } else if this.FieldB != nil { + return fmt.Errorf("this.FieldB == nil && that.FieldB != nil") + } else if that1.FieldB != nil { + return fmt.Errorf("FieldB this(%v) Not Equal that(%v)", this.FieldB, that1.FieldB) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *CustomNameNinEmbeddedStructUnion) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*CustomNameNinEmbeddedStructUnion) + if !ok { + that2, ok := that.(CustomNameNinEmbeddedStructUnion) + 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.NidOptNative.Equal(that1.NidOptNative) { + return false + } + if !this.FieldA.Equal(that1.FieldA) { + return false + } + if this.FieldB != nil && that1.FieldB != nil { + if *this.FieldB != *that1.FieldB { + return false + } + } else if this.FieldB != nil { + return false + } else if that1.FieldB != nil { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *CustomNameEnum) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*CustomNameEnum) + if !ok { + that2, ok := that.(CustomNameEnum) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *CustomNameEnum") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *CustomNameEnum but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *CustomNameEnum but is not nil && this == nil") + } + if this.FieldA != nil && that1.FieldA != nil { + if *this.FieldA != *that1.FieldA { + return fmt.Errorf("FieldA this(%v) Not Equal that(%v)", *this.FieldA, *that1.FieldA) + } + } else if this.FieldA != nil { + return fmt.Errorf("this.FieldA == nil && that.FieldA != nil") + } else if that1.FieldA != nil { + return fmt.Errorf("FieldA this(%v) Not Equal that(%v)", this.FieldA, that1.FieldA) + } + if len(this.FieldB) != len(that1.FieldB) { + return fmt.Errorf("FieldB this(%v) Not Equal that(%v)", len(this.FieldB), len(that1.FieldB)) + } + for i := range this.FieldB { + if this.FieldB[i] != that1.FieldB[i] { + return fmt.Errorf("FieldB this[%v](%v) Not Equal that[%v](%v)", i, this.FieldB[i], i, that1.FieldB[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *CustomNameEnum) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*CustomNameEnum) + if !ok { + that2, ok := that.(CustomNameEnum) + 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.FieldA != nil && that1.FieldA != nil { + if *this.FieldA != *that1.FieldA { + return false + } + } else if this.FieldA != nil { + return false + } else if that1.FieldA != nil { + return false + } + if len(this.FieldB) != len(that1.FieldB) { + return false + } + for i := range this.FieldB { + if this.FieldB[i] != that1.FieldB[i] { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NoExtensionsMap) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NoExtensionsMap) + if !ok { + that2, ok := that.(NoExtensionsMap) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NoExtensionsMap") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NoExtensionsMap but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NoExtensionsMap but is not nil && this == nil") + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) + } + } else if this.Field1 != nil { + return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") + } else if that1.Field1 != nil { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) + } + if !bytes.Equal(this.XXX_extensions, that1.XXX_extensions) { + return fmt.Errorf("XXX_extensions this(%v) Not Equal that(%v)", this.XXX_extensions, that1.XXX_extensions) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NoExtensionsMap) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*NoExtensionsMap) + if !ok { + that2, ok := that.(NoExtensionsMap) + 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.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return false + } + } else if this.Field1 != nil { + return false + } else if that1.Field1 != nil { + return false + } + if !bytes.Equal(this.XXX_extensions, that1.XXX_extensions) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *Unrecognized) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*Unrecognized) + if !ok { + that2, ok := that.(Unrecognized) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *Unrecognized") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *Unrecognized but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *Unrecognized but is not nil && this == nil") + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) + } + } else if this.Field1 != nil { + return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") + } else if that1.Field1 != nil { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) + } + return nil +} +func (this *Unrecognized) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*Unrecognized) + if !ok { + that2, ok := that.(Unrecognized) + 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.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return false + } + } else if this.Field1 != nil { + return false + } else if that1.Field1 != nil { + return false + } + return true +} +func (this *UnrecognizedWithInner) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*UnrecognizedWithInner) + if !ok { + that2, ok := that.(UnrecognizedWithInner) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *UnrecognizedWithInner") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *UnrecognizedWithInner but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *UnrecognizedWithInner but is not nil && this == nil") + } + if len(this.Embedded) != len(that1.Embedded) { + return fmt.Errorf("Embedded this(%v) Not Equal that(%v)", len(this.Embedded), len(that1.Embedded)) + } + for i := range this.Embedded { + if !this.Embedded[i].Equal(that1.Embedded[i]) { + return fmt.Errorf("Embedded this[%v](%v) Not Equal that[%v](%v)", i, this.Embedded[i], i, that1.Embedded[i]) + } + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", *this.Field2, *that1.Field2) + } + } else if this.Field2 != nil { + return fmt.Errorf("this.Field2 == nil && that.Field2 != nil") + } else if that1.Field2 != nil { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *UnrecognizedWithInner) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*UnrecognizedWithInner) + if !ok { + that2, ok := that.(UnrecognizedWithInner) + 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.Embedded) != len(that1.Embedded) { + return false + } + for i := range this.Embedded { + if !this.Embedded[i].Equal(that1.Embedded[i]) { + return false + } + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + return false + } + } else if this.Field2 != nil { + return false + } else if that1.Field2 != nil { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *UnrecognizedWithInner_Inner) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*UnrecognizedWithInner_Inner) + if !ok { + that2, ok := that.(UnrecognizedWithInner_Inner) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *UnrecognizedWithInner_Inner") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *UnrecognizedWithInner_Inner but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *UnrecognizedWithInner_Inner but is not nil && this == nil") + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) + } + } else if this.Field1 != nil { + return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") + } else if that1.Field1 != nil { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) + } + return nil +} +func (this *UnrecognizedWithInner_Inner) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*UnrecognizedWithInner_Inner) + if !ok { + that2, ok := that.(UnrecognizedWithInner_Inner) + 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.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return false + } + } else if this.Field1 != nil { + return false + } else if that1.Field1 != nil { + return false + } + return true +} +func (this *UnrecognizedWithEmbed) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*UnrecognizedWithEmbed) + if !ok { + that2, ok := that.(UnrecognizedWithEmbed) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *UnrecognizedWithEmbed") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *UnrecognizedWithEmbed but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *UnrecognizedWithEmbed but is not nil && this == nil") + } + if !this.UnrecognizedWithEmbed_Embedded.Equal(&that1.UnrecognizedWithEmbed_Embedded) { + return fmt.Errorf("UnrecognizedWithEmbed_Embedded this(%v) Not Equal that(%v)", this.UnrecognizedWithEmbed_Embedded, that1.UnrecognizedWithEmbed_Embedded) + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", *this.Field2, *that1.Field2) + } + } else if this.Field2 != nil { + return fmt.Errorf("this.Field2 == nil && that.Field2 != nil") + } else if that1.Field2 != nil { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *UnrecognizedWithEmbed) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*UnrecognizedWithEmbed) + if !ok { + that2, ok := that.(UnrecognizedWithEmbed) + 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.UnrecognizedWithEmbed_Embedded.Equal(&that1.UnrecognizedWithEmbed_Embedded) { + return false + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + return false + } + } else if this.Field2 != nil { + return false + } else if that1.Field2 != nil { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *UnrecognizedWithEmbed_Embedded) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*UnrecognizedWithEmbed_Embedded) + if !ok { + that2, ok := that.(UnrecognizedWithEmbed_Embedded) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *UnrecognizedWithEmbed_Embedded") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *UnrecognizedWithEmbed_Embedded but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *UnrecognizedWithEmbed_Embedded but is not nil && this == nil") + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) + } + } else if this.Field1 != nil { + return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") + } else if that1.Field1 != nil { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) + } + return nil +} +func (this *UnrecognizedWithEmbed_Embedded) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*UnrecognizedWithEmbed_Embedded) + if !ok { + that2, ok := that.(UnrecognizedWithEmbed_Embedded) + 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.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return false + } + } else if this.Field1 != nil { + return false + } else if that1.Field1 != nil { + return false + } + return true +} +func (this *Node) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*Node) + if !ok { + that2, ok := that.(Node) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *Node") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *Node but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *Node but is not nil && this == nil") + } + if this.Label != nil && that1.Label != nil { + if *this.Label != *that1.Label { + return fmt.Errorf("Label this(%v) Not Equal that(%v)", *this.Label, *that1.Label) + } + } else if this.Label != nil { + return fmt.Errorf("this.Label == nil && that.Label != nil") + } else if that1.Label != nil { + return fmt.Errorf("Label this(%v) Not Equal that(%v)", this.Label, that1.Label) + } + if len(this.Children) != len(that1.Children) { + return fmt.Errorf("Children this(%v) Not Equal that(%v)", len(this.Children), len(that1.Children)) + } + for i := range this.Children { + if !this.Children[i].Equal(that1.Children[i]) { + return fmt.Errorf("Children this[%v](%v) Not Equal that[%v](%v)", i, this.Children[i], i, that1.Children[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *Node) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*Node) + if !ok { + that2, ok := that.(Node) + 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.Label != nil && that1.Label != nil { + if *this.Label != *that1.Label { + return false + } + } else if this.Label != nil { + return false + } else if that1.Label != nil { + return false + } + if len(this.Children) != len(that1.Children) { + return false + } + for i := range this.Children { + if !this.Children[i].Equal(that1.Children[i]) { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} + +type NidOptNativeFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetField1() float64 + GetField2() float32 + GetField3() int32 + GetField4() int64 + GetField5() uint32 + GetField6() uint64 + GetField7() int32 + GetField8() int64 + GetField9() uint32 + GetField10() int32 + GetField11() uint64 + GetField12() int64 + GetField13() bool + GetField14() string + GetField15() []byte +} + +func (this *NidOptNative) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NidOptNative) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNidOptNativeFromFace(this) +} + +func (this *NidOptNative) GetField1() float64 { + return this.Field1 +} + +func (this *NidOptNative) GetField2() float32 { + return this.Field2 +} + +func (this *NidOptNative) GetField3() int32 { + return this.Field3 +} + +func (this *NidOptNative) GetField4() int64 { + return this.Field4 +} + +func (this *NidOptNative) GetField5() uint32 { + return this.Field5 +} + +func (this *NidOptNative) GetField6() uint64 { + return this.Field6 +} + +func (this *NidOptNative) GetField7() int32 { + return this.Field7 +} + +func (this *NidOptNative) GetField8() int64 { + return this.Field8 +} + +func (this *NidOptNative) GetField9() uint32 { + return this.Field9 +} + +func (this *NidOptNative) GetField10() int32 { + return this.Field10 +} + +func (this *NidOptNative) GetField11() uint64 { + return this.Field11 +} + +func (this *NidOptNative) GetField12() int64 { + return this.Field12 +} + +func (this *NidOptNative) GetField13() bool { + return this.Field13 +} + +func (this *NidOptNative) GetField14() string { + return this.Field14 +} + +func (this *NidOptNative) GetField15() []byte { + return this.Field15 +} + +func NewNidOptNativeFromFace(that NidOptNativeFace) *NidOptNative { + this := &NidOptNative{} + this.Field1 = that.GetField1() + this.Field2 = that.GetField2() + this.Field3 = that.GetField3() + this.Field4 = that.GetField4() + this.Field5 = that.GetField5() + this.Field6 = that.GetField6() + this.Field7 = that.GetField7() + this.Field8 = that.GetField8() + this.Field9 = that.GetField9() + this.Field10 = that.GetField10() + this.Field11 = that.GetField11() + this.Field12 = that.GetField12() + this.Field13 = that.GetField13() + this.Field14 = that.GetField14() + this.Field15 = that.GetField15() + return this +} + +type NinOptNativeFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetField1() *float64 + GetField2() *float32 + GetField3() *int32 + GetField4() *int64 + GetField5() *uint32 + GetField6() *uint64 + GetField7() *int32 + GetField8() *int64 + GetField9() *uint32 + GetField10() *int32 + GetField11() *uint64 + GetField12() *int64 + GetField13() *bool + GetField14() *string + GetField15() []byte +} + +func (this *NinOptNative) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NinOptNative) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNinOptNativeFromFace(this) +} + +func (this *NinOptNative) GetField1() *float64 { + return this.Field1 +} + +func (this *NinOptNative) GetField2() *float32 { + return this.Field2 +} + +func (this *NinOptNative) GetField3() *int32 { + return this.Field3 +} + +func (this *NinOptNative) GetField4() *int64 { + return this.Field4 +} + +func (this *NinOptNative) GetField5() *uint32 { + return this.Field5 +} + +func (this *NinOptNative) GetField6() *uint64 { + return this.Field6 +} + +func (this *NinOptNative) GetField7() *int32 { + return this.Field7 +} + +func (this *NinOptNative) GetField8() *int64 { + return this.Field8 +} + +func (this *NinOptNative) GetField9() *uint32 { + return this.Field9 +} + +func (this *NinOptNative) GetField10() *int32 { + return this.Field10 +} + +func (this *NinOptNative) GetField11() *uint64 { + return this.Field11 +} + +func (this *NinOptNative) GetField12() *int64 { + return this.Field12 +} + +func (this *NinOptNative) GetField13() *bool { + return this.Field13 +} + +func (this *NinOptNative) GetField14() *string { + return this.Field14 +} + +func (this *NinOptNative) GetField15() []byte { + return this.Field15 +} + +func NewNinOptNativeFromFace(that NinOptNativeFace) *NinOptNative { + this := &NinOptNative{} + this.Field1 = that.GetField1() + this.Field2 = that.GetField2() + this.Field3 = that.GetField3() + this.Field4 = that.GetField4() + this.Field5 = that.GetField5() + this.Field6 = that.GetField6() + this.Field7 = that.GetField7() + this.Field8 = that.GetField8() + this.Field9 = that.GetField9() + this.Field10 = that.GetField10() + this.Field11 = that.GetField11() + this.Field12 = that.GetField12() + this.Field13 = that.GetField13() + this.Field14 = that.GetField14() + this.Field15 = that.GetField15() + return this +} + +type NidRepNativeFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetField1() []float64 + GetField2() []float32 + GetField3() []int32 + GetField4() []int64 + GetField5() []uint32 + GetField6() []uint64 + GetField7() []int32 + GetField8() []int64 + GetField9() []uint32 + GetField10() []int32 + GetField11() []uint64 + GetField12() []int64 + GetField13() []bool + GetField14() []string + GetField15() [][]byte +} + +func (this *NidRepNative) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NidRepNative) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNidRepNativeFromFace(this) +} + +func (this *NidRepNative) GetField1() []float64 { + return this.Field1 +} + +func (this *NidRepNative) GetField2() []float32 { + return this.Field2 +} + +func (this *NidRepNative) GetField3() []int32 { + return this.Field3 +} + +func (this *NidRepNative) GetField4() []int64 { + return this.Field4 +} + +func (this *NidRepNative) GetField5() []uint32 { + return this.Field5 +} + +func (this *NidRepNative) GetField6() []uint64 { + return this.Field6 +} + +func (this *NidRepNative) GetField7() []int32 { + return this.Field7 +} + +func (this *NidRepNative) GetField8() []int64 { + return this.Field8 +} + +func (this *NidRepNative) GetField9() []uint32 { + return this.Field9 +} + +func (this *NidRepNative) GetField10() []int32 { + return this.Field10 +} + +func (this *NidRepNative) GetField11() []uint64 { + return this.Field11 +} + +func (this *NidRepNative) GetField12() []int64 { + return this.Field12 +} + +func (this *NidRepNative) GetField13() []bool { + return this.Field13 +} + +func (this *NidRepNative) GetField14() []string { + return this.Field14 +} + +func (this *NidRepNative) GetField15() [][]byte { + return this.Field15 +} + +func NewNidRepNativeFromFace(that NidRepNativeFace) *NidRepNative { + this := &NidRepNative{} + this.Field1 = that.GetField1() + this.Field2 = that.GetField2() + this.Field3 = that.GetField3() + this.Field4 = that.GetField4() + this.Field5 = that.GetField5() + this.Field6 = that.GetField6() + this.Field7 = that.GetField7() + this.Field8 = that.GetField8() + this.Field9 = that.GetField9() + this.Field10 = that.GetField10() + this.Field11 = that.GetField11() + this.Field12 = that.GetField12() + this.Field13 = that.GetField13() + this.Field14 = that.GetField14() + this.Field15 = that.GetField15() + return this +} + +type NinRepNativeFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetField1() []float64 + GetField2() []float32 + GetField3() []int32 + GetField4() []int64 + GetField5() []uint32 + GetField6() []uint64 + GetField7() []int32 + GetField8() []int64 + GetField9() []uint32 + GetField10() []int32 + GetField11() []uint64 + GetField12() []int64 + GetField13() []bool + GetField14() []string + GetField15() [][]byte +} + +func (this *NinRepNative) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NinRepNative) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNinRepNativeFromFace(this) +} + +func (this *NinRepNative) GetField1() []float64 { + return this.Field1 +} + +func (this *NinRepNative) GetField2() []float32 { + return this.Field2 +} + +func (this *NinRepNative) GetField3() []int32 { + return this.Field3 +} + +func (this *NinRepNative) GetField4() []int64 { + return this.Field4 +} + +func (this *NinRepNative) GetField5() []uint32 { + return this.Field5 +} + +func (this *NinRepNative) GetField6() []uint64 { + return this.Field6 +} + +func (this *NinRepNative) GetField7() []int32 { + return this.Field7 +} + +func (this *NinRepNative) GetField8() []int64 { + return this.Field8 +} + +func (this *NinRepNative) GetField9() []uint32 { + return this.Field9 +} + +func (this *NinRepNative) GetField10() []int32 { + return this.Field10 +} + +func (this *NinRepNative) GetField11() []uint64 { + return this.Field11 +} + +func (this *NinRepNative) GetField12() []int64 { + return this.Field12 +} + +func (this *NinRepNative) GetField13() []bool { + return this.Field13 +} + +func (this *NinRepNative) GetField14() []string { + return this.Field14 +} + +func (this *NinRepNative) GetField15() [][]byte { + return this.Field15 +} + +func NewNinRepNativeFromFace(that NinRepNativeFace) *NinRepNative { + this := &NinRepNative{} + this.Field1 = that.GetField1() + this.Field2 = that.GetField2() + this.Field3 = that.GetField3() + this.Field4 = that.GetField4() + this.Field5 = that.GetField5() + this.Field6 = that.GetField6() + this.Field7 = that.GetField7() + this.Field8 = that.GetField8() + this.Field9 = that.GetField9() + this.Field10 = that.GetField10() + this.Field11 = that.GetField11() + this.Field12 = that.GetField12() + this.Field13 = that.GetField13() + this.Field14 = that.GetField14() + this.Field15 = that.GetField15() + return this +} + +type NidRepPackedNativeFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetField1() []float64 + GetField2() []float32 + GetField3() []int32 + GetField4() []int64 + GetField5() []uint32 + GetField6() []uint64 + GetField7() []int32 + GetField8() []int64 + GetField9() []uint32 + GetField10() []int32 + GetField11() []uint64 + GetField12() []int64 + GetField13() []bool +} + +func (this *NidRepPackedNative) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NidRepPackedNative) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNidRepPackedNativeFromFace(this) +} + +func (this *NidRepPackedNative) GetField1() []float64 { + return this.Field1 +} + +func (this *NidRepPackedNative) GetField2() []float32 { + return this.Field2 +} + +func (this *NidRepPackedNative) GetField3() []int32 { + return this.Field3 +} + +func (this *NidRepPackedNative) GetField4() []int64 { + return this.Field4 +} + +func (this *NidRepPackedNative) GetField5() []uint32 { + return this.Field5 +} + +func (this *NidRepPackedNative) GetField6() []uint64 { + return this.Field6 +} + +func (this *NidRepPackedNative) GetField7() []int32 { + return this.Field7 +} + +func (this *NidRepPackedNative) GetField8() []int64 { + return this.Field8 +} + +func (this *NidRepPackedNative) GetField9() []uint32 { + return this.Field9 +} + +func (this *NidRepPackedNative) GetField10() []int32 { + return this.Field10 +} + +func (this *NidRepPackedNative) GetField11() []uint64 { + return this.Field11 +} + +func (this *NidRepPackedNative) GetField12() []int64 { + return this.Field12 +} + +func (this *NidRepPackedNative) GetField13() []bool { + return this.Field13 +} + +func NewNidRepPackedNativeFromFace(that NidRepPackedNativeFace) *NidRepPackedNative { + this := &NidRepPackedNative{} + this.Field1 = that.GetField1() + this.Field2 = that.GetField2() + this.Field3 = that.GetField3() + this.Field4 = that.GetField4() + this.Field5 = that.GetField5() + this.Field6 = that.GetField6() + this.Field7 = that.GetField7() + this.Field8 = that.GetField8() + this.Field9 = that.GetField9() + this.Field10 = that.GetField10() + this.Field11 = that.GetField11() + this.Field12 = that.GetField12() + this.Field13 = that.GetField13() + return this +} + +type NinRepPackedNativeFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetField1() []float64 + GetField2() []float32 + GetField3() []int32 + GetField4() []int64 + GetField5() []uint32 + GetField6() []uint64 + GetField7() []int32 + GetField8() []int64 + GetField9() []uint32 + GetField10() []int32 + GetField11() []uint64 + GetField12() []int64 + GetField13() []bool +} + +func (this *NinRepPackedNative) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NinRepPackedNative) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNinRepPackedNativeFromFace(this) +} + +func (this *NinRepPackedNative) GetField1() []float64 { + return this.Field1 +} + +func (this *NinRepPackedNative) GetField2() []float32 { + return this.Field2 +} + +func (this *NinRepPackedNative) GetField3() []int32 { + return this.Field3 +} + +func (this *NinRepPackedNative) GetField4() []int64 { + return this.Field4 +} + +func (this *NinRepPackedNative) GetField5() []uint32 { + return this.Field5 +} + +func (this *NinRepPackedNative) GetField6() []uint64 { + return this.Field6 +} + +func (this *NinRepPackedNative) GetField7() []int32 { + return this.Field7 +} + +func (this *NinRepPackedNative) GetField8() []int64 { + return this.Field8 +} + +func (this *NinRepPackedNative) GetField9() []uint32 { + return this.Field9 +} + +func (this *NinRepPackedNative) GetField10() []int32 { + return this.Field10 +} + +func (this *NinRepPackedNative) GetField11() []uint64 { + return this.Field11 +} + +func (this *NinRepPackedNative) GetField12() []int64 { + return this.Field12 +} + +func (this *NinRepPackedNative) GetField13() []bool { + return this.Field13 +} + +func NewNinRepPackedNativeFromFace(that NinRepPackedNativeFace) *NinRepPackedNative { + this := &NinRepPackedNative{} + this.Field1 = that.GetField1() + this.Field2 = that.GetField2() + this.Field3 = that.GetField3() + this.Field4 = that.GetField4() + this.Field5 = that.GetField5() + this.Field6 = that.GetField6() + this.Field7 = that.GetField7() + this.Field8 = that.GetField8() + this.Field9 = that.GetField9() + this.Field10 = that.GetField10() + this.Field11 = that.GetField11() + this.Field12 = that.GetField12() + this.Field13 = that.GetField13() + return this +} + +type NidOptStructFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetField1() float64 + GetField2() float32 + GetField3() NidOptNative + GetField4() NinOptNative + GetField6() uint64 + GetField7() int32 + GetField8() NidOptNative + GetField13() bool + GetField14() string + GetField15() []byte +} + +func (this *NidOptStruct) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NidOptStruct) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNidOptStructFromFace(this) +} + +func (this *NidOptStruct) GetField1() float64 { + return this.Field1 +} + +func (this *NidOptStruct) GetField2() float32 { + return this.Field2 +} + +func (this *NidOptStruct) GetField3() NidOptNative { + return this.Field3 +} + +func (this *NidOptStruct) GetField4() NinOptNative { + return this.Field4 +} + +func (this *NidOptStruct) GetField6() uint64 { + return this.Field6 +} + +func (this *NidOptStruct) GetField7() int32 { + return this.Field7 +} + +func (this *NidOptStruct) GetField8() NidOptNative { + return this.Field8 +} + +func (this *NidOptStruct) GetField13() bool { + return this.Field13 +} + +func (this *NidOptStruct) GetField14() string { + return this.Field14 +} + +func (this *NidOptStruct) GetField15() []byte { + return this.Field15 +} + +func NewNidOptStructFromFace(that NidOptStructFace) *NidOptStruct { + this := &NidOptStruct{} + this.Field1 = that.GetField1() + this.Field2 = that.GetField2() + this.Field3 = that.GetField3() + this.Field4 = that.GetField4() + this.Field6 = that.GetField6() + this.Field7 = that.GetField7() + this.Field8 = that.GetField8() + this.Field13 = that.GetField13() + this.Field14 = that.GetField14() + this.Field15 = that.GetField15() + return this +} + +type NinOptStructFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetField1() *float64 + GetField2() *float32 + GetField3() *NidOptNative + GetField4() *NinOptNative + GetField6() *uint64 + GetField7() *int32 + GetField8() *NidOptNative + GetField13() *bool + GetField14() *string + GetField15() []byte +} + +func (this *NinOptStruct) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NinOptStruct) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNinOptStructFromFace(this) +} + +func (this *NinOptStruct) GetField1() *float64 { + return this.Field1 +} + +func (this *NinOptStruct) GetField2() *float32 { + return this.Field2 +} + +func (this *NinOptStruct) GetField3() *NidOptNative { + return this.Field3 +} + +func (this *NinOptStruct) GetField4() *NinOptNative { + return this.Field4 +} + +func (this *NinOptStruct) GetField6() *uint64 { + return this.Field6 +} + +func (this *NinOptStruct) GetField7() *int32 { + return this.Field7 +} + +func (this *NinOptStruct) GetField8() *NidOptNative { + return this.Field8 +} + +func (this *NinOptStruct) GetField13() *bool { + return this.Field13 +} + +func (this *NinOptStruct) GetField14() *string { + return this.Field14 +} + +func (this *NinOptStruct) GetField15() []byte { + return this.Field15 +} + +func NewNinOptStructFromFace(that NinOptStructFace) *NinOptStruct { + this := &NinOptStruct{} + this.Field1 = that.GetField1() + this.Field2 = that.GetField2() + this.Field3 = that.GetField3() + this.Field4 = that.GetField4() + this.Field6 = that.GetField6() + this.Field7 = that.GetField7() + this.Field8 = that.GetField8() + this.Field13 = that.GetField13() + this.Field14 = that.GetField14() + this.Field15 = that.GetField15() + return this +} + +type NidRepStructFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetField1() []float64 + GetField2() []float32 + GetField3() []NidOptNative + GetField4() []NinOptNative + GetField6() []uint64 + GetField7() []int32 + GetField8() []NidOptNative + GetField13() []bool + GetField14() []string + GetField15() [][]byte +} + +func (this *NidRepStruct) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NidRepStruct) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNidRepStructFromFace(this) +} + +func (this *NidRepStruct) GetField1() []float64 { + return this.Field1 +} + +func (this *NidRepStruct) GetField2() []float32 { + return this.Field2 +} + +func (this *NidRepStruct) GetField3() []NidOptNative { + return this.Field3 +} + +func (this *NidRepStruct) GetField4() []NinOptNative { + return this.Field4 +} + +func (this *NidRepStruct) GetField6() []uint64 { + return this.Field6 +} + +func (this *NidRepStruct) GetField7() []int32 { + return this.Field7 +} + +func (this *NidRepStruct) GetField8() []NidOptNative { + return this.Field8 +} + +func (this *NidRepStruct) GetField13() []bool { + return this.Field13 +} + +func (this *NidRepStruct) GetField14() []string { + return this.Field14 +} + +func (this *NidRepStruct) GetField15() [][]byte { + return this.Field15 +} + +func NewNidRepStructFromFace(that NidRepStructFace) *NidRepStruct { + this := &NidRepStruct{} + this.Field1 = that.GetField1() + this.Field2 = that.GetField2() + this.Field3 = that.GetField3() + this.Field4 = that.GetField4() + this.Field6 = that.GetField6() + this.Field7 = that.GetField7() + this.Field8 = that.GetField8() + this.Field13 = that.GetField13() + this.Field14 = that.GetField14() + this.Field15 = that.GetField15() + return this +} + +type NinRepStructFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetField1() []float64 + GetField2() []float32 + GetField3() []*NidOptNative + GetField4() []*NinOptNative + GetField6() []uint64 + GetField7() []int32 + GetField8() []*NidOptNative + GetField13() []bool + GetField14() []string + GetField15() [][]byte +} + +func (this *NinRepStruct) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NinRepStruct) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNinRepStructFromFace(this) +} + +func (this *NinRepStruct) GetField1() []float64 { + return this.Field1 +} + +func (this *NinRepStruct) GetField2() []float32 { + return this.Field2 +} + +func (this *NinRepStruct) GetField3() []*NidOptNative { + return this.Field3 +} + +func (this *NinRepStruct) GetField4() []*NinOptNative { + return this.Field4 +} + +func (this *NinRepStruct) GetField6() []uint64 { + return this.Field6 +} + +func (this *NinRepStruct) GetField7() []int32 { + return this.Field7 +} + +func (this *NinRepStruct) GetField8() []*NidOptNative { + return this.Field8 +} + +func (this *NinRepStruct) GetField13() []bool { + return this.Field13 +} + +func (this *NinRepStruct) GetField14() []string { + return this.Field14 +} + +func (this *NinRepStruct) GetField15() [][]byte { + return this.Field15 +} + +func NewNinRepStructFromFace(that NinRepStructFace) *NinRepStruct { + this := &NinRepStruct{} + this.Field1 = that.GetField1() + this.Field2 = that.GetField2() + this.Field3 = that.GetField3() + this.Field4 = that.GetField4() + this.Field6 = that.GetField6() + this.Field7 = that.GetField7() + this.Field8 = that.GetField8() + this.Field13 = that.GetField13() + this.Field14 = that.GetField14() + this.Field15 = that.GetField15() + return this +} + +type NidEmbeddedStructFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetNidOptNative() *NidOptNative + GetField200() NidOptNative + GetField210() bool +} + +func (this *NidEmbeddedStruct) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NidEmbeddedStruct) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNidEmbeddedStructFromFace(this) +} + +func (this *NidEmbeddedStruct) GetNidOptNative() *NidOptNative { + return this.NidOptNative +} + +func (this *NidEmbeddedStruct) GetField200() NidOptNative { + return this.Field200 +} + +func (this *NidEmbeddedStruct) GetField210() bool { + return this.Field210 +} + +func NewNidEmbeddedStructFromFace(that NidEmbeddedStructFace) *NidEmbeddedStruct { + this := &NidEmbeddedStruct{} + this.NidOptNative = that.GetNidOptNative() + this.Field200 = that.GetField200() + this.Field210 = that.GetField210() + return this +} + +type NinEmbeddedStructFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetNidOptNative() *NidOptNative + GetField200() *NidOptNative + GetField210() *bool +} + +func (this *NinEmbeddedStruct) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NinEmbeddedStruct) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNinEmbeddedStructFromFace(this) +} + +func (this *NinEmbeddedStruct) GetNidOptNative() *NidOptNative { + return this.NidOptNative +} + +func (this *NinEmbeddedStruct) GetField200() *NidOptNative { + return this.Field200 +} + +func (this *NinEmbeddedStruct) GetField210() *bool { + return this.Field210 +} + +func NewNinEmbeddedStructFromFace(that NinEmbeddedStructFace) *NinEmbeddedStruct { + this := &NinEmbeddedStruct{} + this.NidOptNative = that.GetNidOptNative() + this.Field200 = that.GetField200() + this.Field210 = that.GetField210() + return this +} + +type NidNestedStructFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetField1() NidOptStruct + GetField2() []NidRepStruct +} + +func (this *NidNestedStruct) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NidNestedStruct) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNidNestedStructFromFace(this) +} + +func (this *NidNestedStruct) GetField1() NidOptStruct { + return this.Field1 +} + +func (this *NidNestedStruct) GetField2() []NidRepStruct { + return this.Field2 +} + +func NewNidNestedStructFromFace(that NidNestedStructFace) *NidNestedStruct { + this := &NidNestedStruct{} + this.Field1 = that.GetField1() + this.Field2 = that.GetField2() + return this +} + +type NinNestedStructFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetField1() *NinOptStruct + GetField2() []*NinRepStruct +} + +func (this *NinNestedStruct) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NinNestedStruct) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNinNestedStructFromFace(this) +} + +func (this *NinNestedStruct) GetField1() *NinOptStruct { + return this.Field1 +} + +func (this *NinNestedStruct) GetField2() []*NinRepStruct { + return this.Field2 +} + +func NewNinNestedStructFromFace(that NinNestedStructFace) *NinNestedStruct { + this := &NinNestedStruct{} + this.Field1 = that.GetField1() + this.Field2 = that.GetField2() + return this +} + +type NidOptCustomFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetId() Uuid + GetValue() github_com_gogo_protobuf_test_custom.Uint128 +} + +func (this *NidOptCustom) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NidOptCustom) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNidOptCustomFromFace(this) +} + +func (this *NidOptCustom) GetId() Uuid { + return this.Id +} + +func (this *NidOptCustom) GetValue() github_com_gogo_protobuf_test_custom.Uint128 { + return this.Value +} + +func NewNidOptCustomFromFace(that NidOptCustomFace) *NidOptCustom { + this := &NidOptCustom{} + this.Id = that.GetId() + this.Value = that.GetValue() + return this +} + +type CustomDashFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetValue() *github_com_gogo_protobuf_test_custom_dash_type.Bytes +} + +func (this *CustomDash) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *CustomDash) TestProto() github_com_gogo_protobuf_proto.Message { + return NewCustomDashFromFace(this) +} + +func (this *CustomDash) GetValue() *github_com_gogo_protobuf_test_custom_dash_type.Bytes { + return this.Value +} + +func NewCustomDashFromFace(that CustomDashFace) *CustomDash { + this := &CustomDash{} + this.Value = that.GetValue() + return this +} + +type NinOptCustomFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetId() *Uuid + GetValue() *github_com_gogo_protobuf_test_custom.Uint128 +} + +func (this *NinOptCustom) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NinOptCustom) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNinOptCustomFromFace(this) +} + +func (this *NinOptCustom) GetId() *Uuid { + return this.Id +} + +func (this *NinOptCustom) GetValue() *github_com_gogo_protobuf_test_custom.Uint128 { + return this.Value +} + +func NewNinOptCustomFromFace(that NinOptCustomFace) *NinOptCustom { + this := &NinOptCustom{} + this.Id = that.GetId() + this.Value = that.GetValue() + return this +} + +type NidRepCustomFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetId() []Uuid + GetValue() []github_com_gogo_protobuf_test_custom.Uint128 +} + +func (this *NidRepCustom) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NidRepCustom) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNidRepCustomFromFace(this) +} + +func (this *NidRepCustom) GetId() []Uuid { + return this.Id +} + +func (this *NidRepCustom) GetValue() []github_com_gogo_protobuf_test_custom.Uint128 { + return this.Value +} + +func NewNidRepCustomFromFace(that NidRepCustomFace) *NidRepCustom { + this := &NidRepCustom{} + this.Id = that.GetId() + this.Value = that.GetValue() + return this +} + +type NinRepCustomFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetId() []Uuid + GetValue() []github_com_gogo_protobuf_test_custom.Uint128 +} + +func (this *NinRepCustom) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NinRepCustom) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNinRepCustomFromFace(this) +} + +func (this *NinRepCustom) GetId() []Uuid { + return this.Id +} + +func (this *NinRepCustom) GetValue() []github_com_gogo_protobuf_test_custom.Uint128 { + return this.Value +} + +func NewNinRepCustomFromFace(that NinRepCustomFace) *NinRepCustom { + this := &NinRepCustom{} + this.Id = that.GetId() + this.Value = that.GetValue() + return this +} + +type NinOptNativeUnionFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetField1() *float64 + GetField2() *float32 + GetField3() *int32 + GetField4() *int64 + GetField5() *uint32 + GetField6() *uint64 + GetField13() *bool + GetField14() *string + GetField15() []byte +} + +func (this *NinOptNativeUnion) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NinOptNativeUnion) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNinOptNativeUnionFromFace(this) +} + +func (this *NinOptNativeUnion) GetField1() *float64 { + return this.Field1 +} + +func (this *NinOptNativeUnion) GetField2() *float32 { + return this.Field2 +} + +func (this *NinOptNativeUnion) GetField3() *int32 { + return this.Field3 +} + +func (this *NinOptNativeUnion) GetField4() *int64 { + return this.Field4 +} + +func (this *NinOptNativeUnion) GetField5() *uint32 { + return this.Field5 +} + +func (this *NinOptNativeUnion) GetField6() *uint64 { + return this.Field6 +} + +func (this *NinOptNativeUnion) GetField13() *bool { + return this.Field13 +} + +func (this *NinOptNativeUnion) GetField14() *string { + return this.Field14 +} + +func (this *NinOptNativeUnion) GetField15() []byte { + return this.Field15 +} + +func NewNinOptNativeUnionFromFace(that NinOptNativeUnionFace) *NinOptNativeUnion { + this := &NinOptNativeUnion{} + this.Field1 = that.GetField1() + this.Field2 = that.GetField2() + this.Field3 = that.GetField3() + this.Field4 = that.GetField4() + this.Field5 = that.GetField5() + this.Field6 = that.GetField6() + this.Field13 = that.GetField13() + this.Field14 = that.GetField14() + this.Field15 = that.GetField15() + return this +} + +type NinOptStructUnionFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetField1() *float64 + GetField2() *float32 + GetField3() *NidOptNative + GetField4() *NinOptNative + GetField6() *uint64 + GetField7() *int32 + GetField13() *bool + GetField14() *string + GetField15() []byte +} + +func (this *NinOptStructUnion) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NinOptStructUnion) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNinOptStructUnionFromFace(this) +} + +func (this *NinOptStructUnion) GetField1() *float64 { + return this.Field1 +} + +func (this *NinOptStructUnion) GetField2() *float32 { + return this.Field2 +} + +func (this *NinOptStructUnion) GetField3() *NidOptNative { + return this.Field3 +} + +func (this *NinOptStructUnion) GetField4() *NinOptNative { + return this.Field4 +} + +func (this *NinOptStructUnion) GetField6() *uint64 { + return this.Field6 +} + +func (this *NinOptStructUnion) GetField7() *int32 { + return this.Field7 +} + +func (this *NinOptStructUnion) GetField13() *bool { + return this.Field13 +} + +func (this *NinOptStructUnion) GetField14() *string { + return this.Field14 +} + +func (this *NinOptStructUnion) GetField15() []byte { + return this.Field15 +} + +func NewNinOptStructUnionFromFace(that NinOptStructUnionFace) *NinOptStructUnion { + this := &NinOptStructUnion{} + this.Field1 = that.GetField1() + this.Field2 = that.GetField2() + this.Field3 = that.GetField3() + this.Field4 = that.GetField4() + this.Field6 = that.GetField6() + this.Field7 = that.GetField7() + this.Field13 = that.GetField13() + this.Field14 = that.GetField14() + this.Field15 = that.GetField15() + return this +} + +type NinEmbeddedStructUnionFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetNidOptNative() *NidOptNative + GetField200() *NinOptNative + GetField210() *bool +} + +func (this *NinEmbeddedStructUnion) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NinEmbeddedStructUnion) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNinEmbeddedStructUnionFromFace(this) +} + +func (this *NinEmbeddedStructUnion) GetNidOptNative() *NidOptNative { + return this.NidOptNative +} + +func (this *NinEmbeddedStructUnion) GetField200() *NinOptNative { + return this.Field200 +} + +func (this *NinEmbeddedStructUnion) GetField210() *bool { + return this.Field210 +} + +func NewNinEmbeddedStructUnionFromFace(that NinEmbeddedStructUnionFace) *NinEmbeddedStructUnion { + this := &NinEmbeddedStructUnion{} + this.NidOptNative = that.GetNidOptNative() + this.Field200 = that.GetField200() + this.Field210 = that.GetField210() + return this +} + +type NinNestedStructUnionFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetField1() *NinOptNativeUnion + GetField2() *NinOptStructUnion + GetField3() *NinEmbeddedStructUnion +} + +func (this *NinNestedStructUnion) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NinNestedStructUnion) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNinNestedStructUnionFromFace(this) +} + +func (this *NinNestedStructUnion) GetField1() *NinOptNativeUnion { + return this.Field1 +} + +func (this *NinNestedStructUnion) GetField2() *NinOptStructUnion { + return this.Field2 +} + +func (this *NinNestedStructUnion) GetField3() *NinEmbeddedStructUnion { + return this.Field3 +} + +func NewNinNestedStructUnionFromFace(that NinNestedStructUnionFace) *NinNestedStructUnion { + this := &NinNestedStructUnion{} + this.Field1 = that.GetField1() + this.Field2 = that.GetField2() + this.Field3 = that.GetField3() + return this +} + +type TreeFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetOr() *OrBranch + GetAnd() *AndBranch + GetLeaf() *Leaf +} + +func (this *Tree) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *Tree) TestProto() github_com_gogo_protobuf_proto.Message { + return NewTreeFromFace(this) +} + +func (this *Tree) GetOr() *OrBranch { + return this.Or +} + +func (this *Tree) GetAnd() *AndBranch { + return this.And +} + +func (this *Tree) GetLeaf() *Leaf { + return this.Leaf +} + +func NewTreeFromFace(that TreeFace) *Tree { + this := &Tree{} + this.Or = that.GetOr() + this.And = that.GetAnd() + this.Leaf = that.GetLeaf() + return this +} + +type OrBranchFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetLeft() Tree + GetRight() Tree +} + +func (this *OrBranch) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *OrBranch) TestProto() github_com_gogo_protobuf_proto.Message { + return NewOrBranchFromFace(this) +} + +func (this *OrBranch) GetLeft() Tree { + return this.Left +} + +func (this *OrBranch) GetRight() Tree { + return this.Right +} + +func NewOrBranchFromFace(that OrBranchFace) *OrBranch { + this := &OrBranch{} + this.Left = that.GetLeft() + this.Right = that.GetRight() + return this +} + +type AndBranchFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetLeft() Tree + GetRight() Tree +} + +func (this *AndBranch) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *AndBranch) TestProto() github_com_gogo_protobuf_proto.Message { + return NewAndBranchFromFace(this) +} + +func (this *AndBranch) GetLeft() Tree { + return this.Left +} + +func (this *AndBranch) GetRight() Tree { + return this.Right +} + +func NewAndBranchFromFace(that AndBranchFace) *AndBranch { + this := &AndBranch{} + this.Left = that.GetLeft() + this.Right = that.GetRight() + return this +} + +type LeafFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetValue() int64 + GetStrValue() string +} + +func (this *Leaf) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *Leaf) TestProto() github_com_gogo_protobuf_proto.Message { + return NewLeafFromFace(this) +} + +func (this *Leaf) GetValue() int64 { + return this.Value +} + +func (this *Leaf) GetStrValue() string { + return this.StrValue +} + +func NewLeafFromFace(that LeafFace) *Leaf { + this := &Leaf{} + this.Value = that.GetValue() + this.StrValue = that.GetStrValue() + return this +} + +type DeepTreeFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetDown() *ADeepBranch + GetAnd() *AndDeepBranch + GetLeaf() *DeepLeaf +} + +func (this *DeepTree) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *DeepTree) TestProto() github_com_gogo_protobuf_proto.Message { + return NewDeepTreeFromFace(this) +} + +func (this *DeepTree) GetDown() *ADeepBranch { + return this.Down +} + +func (this *DeepTree) GetAnd() *AndDeepBranch { + return this.And +} + +func (this *DeepTree) GetLeaf() *DeepLeaf { + return this.Leaf +} + +func NewDeepTreeFromFace(that DeepTreeFace) *DeepTree { + this := &DeepTree{} + this.Down = that.GetDown() + this.And = that.GetAnd() + this.Leaf = that.GetLeaf() + return this +} + +type ADeepBranchFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetDown() DeepTree +} + +func (this *ADeepBranch) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *ADeepBranch) TestProto() github_com_gogo_protobuf_proto.Message { + return NewADeepBranchFromFace(this) +} + +func (this *ADeepBranch) GetDown() DeepTree { + return this.Down +} + +func NewADeepBranchFromFace(that ADeepBranchFace) *ADeepBranch { + this := &ADeepBranch{} + this.Down = that.GetDown() + return this +} + +type AndDeepBranchFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetLeft() DeepTree + GetRight() DeepTree +} + +func (this *AndDeepBranch) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *AndDeepBranch) TestProto() github_com_gogo_protobuf_proto.Message { + return NewAndDeepBranchFromFace(this) +} + +func (this *AndDeepBranch) GetLeft() DeepTree { + return this.Left +} + +func (this *AndDeepBranch) GetRight() DeepTree { + return this.Right +} + +func NewAndDeepBranchFromFace(that AndDeepBranchFace) *AndDeepBranch { + this := &AndDeepBranch{} + this.Left = that.GetLeft() + this.Right = that.GetRight() + return this +} + +type DeepLeafFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetTree() Tree +} + +func (this *DeepLeaf) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *DeepLeaf) TestProto() github_com_gogo_protobuf_proto.Message { + return NewDeepLeafFromFace(this) +} + +func (this *DeepLeaf) GetTree() Tree { + return this.Tree +} + +func NewDeepLeafFromFace(that DeepLeafFace) *DeepLeaf { + this := &DeepLeaf{} + this.Tree = that.GetTree() + return this +} + +type NilFace interface { + Proto() github_com_gogo_protobuf_proto.Message +} + +func (this *Nil) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *Nil) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNilFromFace(this) +} + +func NewNilFromFace(that NilFace) *Nil { + this := &Nil{} + return this +} + +type NidOptEnumFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetField1() TheTestEnum +} + +func (this *NidOptEnum) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NidOptEnum) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNidOptEnumFromFace(this) +} + +func (this *NidOptEnum) GetField1() TheTestEnum { + return this.Field1 +} + +func NewNidOptEnumFromFace(that NidOptEnumFace) *NidOptEnum { + this := &NidOptEnum{} + this.Field1 = that.GetField1() + return this +} + +type NinOptEnumFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetField1() *TheTestEnum + GetField2() *YetAnotherTestEnum + GetField3() *YetYetAnotherTestEnum +} + +func (this *NinOptEnum) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NinOptEnum) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNinOptEnumFromFace(this) +} + +func (this *NinOptEnum) GetField1() *TheTestEnum { + return this.Field1 +} + +func (this *NinOptEnum) GetField2() *YetAnotherTestEnum { + return this.Field2 +} + +func (this *NinOptEnum) GetField3() *YetYetAnotherTestEnum { + return this.Field3 +} + +func NewNinOptEnumFromFace(that NinOptEnumFace) *NinOptEnum { + this := &NinOptEnum{} + this.Field1 = that.GetField1() + this.Field2 = that.GetField2() + this.Field3 = that.GetField3() + return this +} + +type NidRepEnumFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetField1() []TheTestEnum + GetField2() []YetAnotherTestEnum + GetField3() []YetYetAnotherTestEnum +} + +func (this *NidRepEnum) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NidRepEnum) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNidRepEnumFromFace(this) +} + +func (this *NidRepEnum) GetField1() []TheTestEnum { + return this.Field1 +} + +func (this *NidRepEnum) GetField2() []YetAnotherTestEnum { + return this.Field2 +} + +func (this *NidRepEnum) GetField3() []YetYetAnotherTestEnum { + return this.Field3 +} + +func NewNidRepEnumFromFace(that NidRepEnumFace) *NidRepEnum { + this := &NidRepEnum{} + this.Field1 = that.GetField1() + this.Field2 = that.GetField2() + this.Field3 = that.GetField3() + return this +} + +type NinRepEnumFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetField1() []TheTestEnum + GetField2() []YetAnotherTestEnum + GetField3() []YetYetAnotherTestEnum +} + +func (this *NinRepEnum) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NinRepEnum) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNinRepEnumFromFace(this) +} + +func (this *NinRepEnum) GetField1() []TheTestEnum { + return this.Field1 +} + +func (this *NinRepEnum) GetField2() []YetAnotherTestEnum { + return this.Field2 +} + +func (this *NinRepEnum) GetField3() []YetYetAnotherTestEnum { + return this.Field3 +} + +func NewNinRepEnumFromFace(that NinRepEnumFace) *NinRepEnum { + this := &NinRepEnum{} + this.Field1 = that.GetField1() + this.Field2 = that.GetField2() + this.Field3 = that.GetField3() + return this +} + +type AnotherNinOptEnumFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetField1() *AnotherTestEnum + GetField2() *YetAnotherTestEnum + GetField3() *YetYetAnotherTestEnum +} + +func (this *AnotherNinOptEnum) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *AnotherNinOptEnum) TestProto() github_com_gogo_protobuf_proto.Message { + return NewAnotherNinOptEnumFromFace(this) +} + +func (this *AnotherNinOptEnum) GetField1() *AnotherTestEnum { + return this.Field1 +} + +func (this *AnotherNinOptEnum) GetField2() *YetAnotherTestEnum { + return this.Field2 +} + +func (this *AnotherNinOptEnum) GetField3() *YetYetAnotherTestEnum { + return this.Field3 +} + +func NewAnotherNinOptEnumFromFace(that AnotherNinOptEnumFace) *AnotherNinOptEnum { + this := &AnotherNinOptEnum{} + this.Field1 = that.GetField1() + this.Field2 = that.GetField2() + this.Field3 = that.GetField3() + return this +} + +type TimerFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetTime1() int64 + GetTime2() int64 + GetData() []byte +} + +func (this *Timer) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *Timer) TestProto() github_com_gogo_protobuf_proto.Message { + return NewTimerFromFace(this) +} + +func (this *Timer) GetTime1() int64 { + return this.Time1 +} + +func (this *Timer) GetTime2() int64 { + return this.Time2 +} + +func (this *Timer) GetData() []byte { + return this.Data +} + +func NewTimerFromFace(that TimerFace) *Timer { + this := &Timer{} + this.Time1 = that.GetTime1() + this.Time2 = that.GetTime2() + this.Data = that.GetData() + return this +} + +type NestedDefinitionFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetField1() *int64 + GetEnumField() *NestedDefinition_NestedEnum + GetNNM() *NestedDefinition_NestedMessage_NestedNestedMsg + GetNM() *NestedDefinition_NestedMessage +} + +func (this *NestedDefinition) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NestedDefinition) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNestedDefinitionFromFace(this) +} + +func (this *NestedDefinition) GetField1() *int64 { + return this.Field1 +} + +func (this *NestedDefinition) GetEnumField() *NestedDefinition_NestedEnum { + return this.EnumField +} + +func (this *NestedDefinition) GetNNM() *NestedDefinition_NestedMessage_NestedNestedMsg { + return this.NNM +} + +func (this *NestedDefinition) GetNM() *NestedDefinition_NestedMessage { + return this.NM +} + +func NewNestedDefinitionFromFace(that NestedDefinitionFace) *NestedDefinition { + this := &NestedDefinition{} + this.Field1 = that.GetField1() + this.EnumField = that.GetEnumField() + this.NNM = that.GetNNM() + this.NM = that.GetNM() + return this +} + +type NestedDefinition_NestedMessageFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetNestedField1() *uint64 + GetNNM() *NestedDefinition_NestedMessage_NestedNestedMsg +} + +func (this *NestedDefinition_NestedMessage) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NestedDefinition_NestedMessage) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNestedDefinition_NestedMessageFromFace(this) +} + +func (this *NestedDefinition_NestedMessage) GetNestedField1() *uint64 { + return this.NestedField1 +} + +func (this *NestedDefinition_NestedMessage) GetNNM() *NestedDefinition_NestedMessage_NestedNestedMsg { + return this.NNM +} + +func NewNestedDefinition_NestedMessageFromFace(that NestedDefinition_NestedMessageFace) *NestedDefinition_NestedMessage { + this := &NestedDefinition_NestedMessage{} + this.NestedField1 = that.GetNestedField1() + this.NNM = that.GetNNM() + return this +} + +type NestedDefinition_NestedMessage_NestedNestedMsgFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetNestedNestedField1() *string +} + +func (this *NestedDefinition_NestedMessage_NestedNestedMsg) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NestedDefinition_NestedMessage_NestedNestedMsg) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNestedDefinition_NestedMessage_NestedNestedMsgFromFace(this) +} + +func (this *NestedDefinition_NestedMessage_NestedNestedMsg) GetNestedNestedField1() *string { + return this.NestedNestedField1 +} + +func NewNestedDefinition_NestedMessage_NestedNestedMsgFromFace(that NestedDefinition_NestedMessage_NestedNestedMsgFace) *NestedDefinition_NestedMessage_NestedNestedMsg { + this := &NestedDefinition_NestedMessage_NestedNestedMsg{} + this.NestedNestedField1 = that.GetNestedNestedField1() + return this +} + +type NestedScopeFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetA() *NestedDefinition_NestedMessage_NestedNestedMsg + GetB() *NestedDefinition_NestedEnum + GetC() *NestedDefinition_NestedMessage +} + +func (this *NestedScope) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NestedScope) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNestedScopeFromFace(this) +} + +func (this *NestedScope) GetA() *NestedDefinition_NestedMessage_NestedNestedMsg { + return this.A +} + +func (this *NestedScope) GetB() *NestedDefinition_NestedEnum { + return this.B +} + +func (this *NestedScope) GetC() *NestedDefinition_NestedMessage { + return this.C +} + +func NewNestedScopeFromFace(that NestedScopeFace) *NestedScope { + this := &NestedScope{} + this.A = that.GetA() + this.B = that.GetB() + this.C = that.GetC() + return this +} + +type CustomContainerFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetCustomStruct() NidOptCustom +} + +func (this *CustomContainer) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *CustomContainer) TestProto() github_com_gogo_protobuf_proto.Message { + return NewCustomContainerFromFace(this) +} + +func (this *CustomContainer) GetCustomStruct() NidOptCustom { + return this.CustomStruct +} + +func NewCustomContainerFromFace(that CustomContainerFace) *CustomContainer { + this := &CustomContainer{} + this.CustomStruct = that.GetCustomStruct() + return this +} + +type CustomNameNidOptNativeFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetFieldA() float64 + GetFieldB() float32 + GetFieldC() int32 + GetFieldD() int64 + GetFieldE() uint32 + GetFieldF() uint64 + GetFieldG() int32 + GetFieldH() int64 + GetFieldI() uint32 + GetFieldJ() int32 + GetFieldK() uint64 + GetFieldL() int64 + GetFieldM() bool + GetFieldN() string + GetFieldO() []byte +} + +func (this *CustomNameNidOptNative) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *CustomNameNidOptNative) TestProto() github_com_gogo_protobuf_proto.Message { + return NewCustomNameNidOptNativeFromFace(this) +} + +func (this *CustomNameNidOptNative) GetFieldA() float64 { + return this.FieldA +} + +func (this *CustomNameNidOptNative) GetFieldB() float32 { + return this.FieldB +} + +func (this *CustomNameNidOptNative) GetFieldC() int32 { + return this.FieldC +} + +func (this *CustomNameNidOptNative) GetFieldD() int64 { + return this.FieldD +} + +func (this *CustomNameNidOptNative) GetFieldE() uint32 { + return this.FieldE +} + +func (this *CustomNameNidOptNative) GetFieldF() uint64 { + return this.FieldF +} + +func (this *CustomNameNidOptNative) GetFieldG() int32 { + return this.FieldG +} + +func (this *CustomNameNidOptNative) GetFieldH() int64 { + return this.FieldH +} + +func (this *CustomNameNidOptNative) GetFieldI() uint32 { + return this.FieldI +} + +func (this *CustomNameNidOptNative) GetFieldJ() int32 { + return this.FieldJ +} + +func (this *CustomNameNidOptNative) GetFieldK() uint64 { + return this.FieldK +} + +func (this *CustomNameNidOptNative) GetFieldL() int64 { + return this.FieldL +} + +func (this *CustomNameNidOptNative) GetFieldM() bool { + return this.FieldM +} + +func (this *CustomNameNidOptNative) GetFieldN() string { + return this.FieldN +} + +func (this *CustomNameNidOptNative) GetFieldO() []byte { + return this.FieldO +} + +func NewCustomNameNidOptNativeFromFace(that CustomNameNidOptNativeFace) *CustomNameNidOptNative { + this := &CustomNameNidOptNative{} + this.FieldA = that.GetFieldA() + this.FieldB = that.GetFieldB() + this.FieldC = that.GetFieldC() + this.FieldD = that.GetFieldD() + this.FieldE = that.GetFieldE() + this.FieldF = that.GetFieldF() + this.FieldG = that.GetFieldG() + this.FieldH = that.GetFieldH() + this.FieldI = that.GetFieldI() + this.FieldJ = that.GetFieldJ() + this.FieldK = that.GetFieldK() + this.FieldL = that.GetFieldL() + this.FieldM = that.GetFieldM() + this.FieldN = that.GetFieldN() + this.FieldO = that.GetFieldO() + return this +} + +type CustomNameNinOptNativeFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetFieldA() *float64 + GetFieldB() *float32 + GetFieldC() *int32 + GetFieldD() *int64 + GetFieldE() *uint32 + GetFieldF() *uint64 + GetFieldG() *int32 + GetFieldH() *int64 + GetFieldI() *uint32 + GetFieldJ() *int32 + GetFieldK() *uint64 + GetFielL() *int64 + GetFieldM() *bool + GetFieldN() *string + GetFieldO() []byte +} + +func (this *CustomNameNinOptNative) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *CustomNameNinOptNative) TestProto() github_com_gogo_protobuf_proto.Message { + return NewCustomNameNinOptNativeFromFace(this) +} + +func (this *CustomNameNinOptNative) GetFieldA() *float64 { + return this.FieldA +} + +func (this *CustomNameNinOptNative) GetFieldB() *float32 { + return this.FieldB +} + +func (this *CustomNameNinOptNative) GetFieldC() *int32 { + return this.FieldC +} + +func (this *CustomNameNinOptNative) GetFieldD() *int64 { + return this.FieldD +} + +func (this *CustomNameNinOptNative) GetFieldE() *uint32 { + return this.FieldE +} + +func (this *CustomNameNinOptNative) GetFieldF() *uint64 { + return this.FieldF +} + +func (this *CustomNameNinOptNative) GetFieldG() *int32 { + return this.FieldG +} + +func (this *CustomNameNinOptNative) GetFieldH() *int64 { + return this.FieldH +} + +func (this *CustomNameNinOptNative) GetFieldI() *uint32 { + return this.FieldI +} + +func (this *CustomNameNinOptNative) GetFieldJ() *int32 { + return this.FieldJ +} + +func (this *CustomNameNinOptNative) GetFieldK() *uint64 { + return this.FieldK +} + +func (this *CustomNameNinOptNative) GetFielL() *int64 { + return this.FielL +} + +func (this *CustomNameNinOptNative) GetFieldM() *bool { + return this.FieldM +} + +func (this *CustomNameNinOptNative) GetFieldN() *string { + return this.FieldN +} + +func (this *CustomNameNinOptNative) GetFieldO() []byte { + return this.FieldO +} + +func NewCustomNameNinOptNativeFromFace(that CustomNameNinOptNativeFace) *CustomNameNinOptNative { + this := &CustomNameNinOptNative{} + this.FieldA = that.GetFieldA() + this.FieldB = that.GetFieldB() + this.FieldC = that.GetFieldC() + this.FieldD = that.GetFieldD() + this.FieldE = that.GetFieldE() + this.FieldF = that.GetFieldF() + this.FieldG = that.GetFieldG() + this.FieldH = that.GetFieldH() + this.FieldI = that.GetFieldI() + this.FieldJ = that.GetFieldJ() + this.FieldK = that.GetFieldK() + this.FielL = that.GetFielL() + this.FieldM = that.GetFieldM() + this.FieldN = that.GetFieldN() + this.FieldO = that.GetFieldO() + return this +} + +type CustomNameNinRepNativeFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetFieldA() []float64 + GetFieldB() []float32 + GetFieldC() []int32 + GetFieldD() []int64 + GetFieldE() []uint32 + GetFieldF() []uint64 + GetFieldG() []int32 + GetFieldH() []int64 + GetFieldI() []uint32 + GetFieldJ() []int32 + GetFieldK() []uint64 + GetFieldL() []int64 + GetFieldM() []bool + GetFieldN() []string + GetFieldO() [][]byte +} + +func (this *CustomNameNinRepNative) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *CustomNameNinRepNative) TestProto() github_com_gogo_protobuf_proto.Message { + return NewCustomNameNinRepNativeFromFace(this) +} + +func (this *CustomNameNinRepNative) GetFieldA() []float64 { + return this.FieldA +} + +func (this *CustomNameNinRepNative) GetFieldB() []float32 { + return this.FieldB +} + +func (this *CustomNameNinRepNative) GetFieldC() []int32 { + return this.FieldC +} + +func (this *CustomNameNinRepNative) GetFieldD() []int64 { + return this.FieldD +} + +func (this *CustomNameNinRepNative) GetFieldE() []uint32 { + return this.FieldE +} + +func (this *CustomNameNinRepNative) GetFieldF() []uint64 { + return this.FieldF +} + +func (this *CustomNameNinRepNative) GetFieldG() []int32 { + return this.FieldG +} + +func (this *CustomNameNinRepNative) GetFieldH() []int64 { + return this.FieldH +} + +func (this *CustomNameNinRepNative) GetFieldI() []uint32 { + return this.FieldI +} + +func (this *CustomNameNinRepNative) GetFieldJ() []int32 { + return this.FieldJ +} + +func (this *CustomNameNinRepNative) GetFieldK() []uint64 { + return this.FieldK +} + +func (this *CustomNameNinRepNative) GetFieldL() []int64 { + return this.FieldL +} + +func (this *CustomNameNinRepNative) GetFieldM() []bool { + return this.FieldM +} + +func (this *CustomNameNinRepNative) GetFieldN() []string { + return this.FieldN +} + +func (this *CustomNameNinRepNative) GetFieldO() [][]byte { + return this.FieldO +} + +func NewCustomNameNinRepNativeFromFace(that CustomNameNinRepNativeFace) *CustomNameNinRepNative { + this := &CustomNameNinRepNative{} + this.FieldA = that.GetFieldA() + this.FieldB = that.GetFieldB() + this.FieldC = that.GetFieldC() + this.FieldD = that.GetFieldD() + this.FieldE = that.GetFieldE() + this.FieldF = that.GetFieldF() + this.FieldG = that.GetFieldG() + this.FieldH = that.GetFieldH() + this.FieldI = that.GetFieldI() + this.FieldJ = that.GetFieldJ() + this.FieldK = that.GetFieldK() + this.FieldL = that.GetFieldL() + this.FieldM = that.GetFieldM() + this.FieldN = that.GetFieldN() + this.FieldO = that.GetFieldO() + return this +} + +type CustomNameNinStructFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetFieldA() *float64 + GetFieldB() *float32 + GetFieldC() *NidOptNative + GetFieldD() []*NinOptNative + GetFieldE() *uint64 + GetFieldF() *int32 + GetFieldG() *NidOptNative + GetFieldH() *bool + GetFieldI() *string + GetFieldJ() []byte +} + +func (this *CustomNameNinStruct) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *CustomNameNinStruct) TestProto() github_com_gogo_protobuf_proto.Message { + return NewCustomNameNinStructFromFace(this) +} + +func (this *CustomNameNinStruct) GetFieldA() *float64 { + return this.FieldA +} + +func (this *CustomNameNinStruct) GetFieldB() *float32 { + return this.FieldB +} + +func (this *CustomNameNinStruct) GetFieldC() *NidOptNative { + return this.FieldC +} + +func (this *CustomNameNinStruct) GetFieldD() []*NinOptNative { + return this.FieldD +} + +func (this *CustomNameNinStruct) GetFieldE() *uint64 { + return this.FieldE +} + +func (this *CustomNameNinStruct) GetFieldF() *int32 { + return this.FieldF +} + +func (this *CustomNameNinStruct) GetFieldG() *NidOptNative { + return this.FieldG +} + +func (this *CustomNameNinStruct) GetFieldH() *bool { + return this.FieldH +} + +func (this *CustomNameNinStruct) GetFieldI() *string { + return this.FieldI +} + +func (this *CustomNameNinStruct) GetFieldJ() []byte { + return this.FieldJ +} + +func NewCustomNameNinStructFromFace(that CustomNameNinStructFace) *CustomNameNinStruct { + this := &CustomNameNinStruct{} + this.FieldA = that.GetFieldA() + this.FieldB = that.GetFieldB() + this.FieldC = that.GetFieldC() + this.FieldD = that.GetFieldD() + this.FieldE = that.GetFieldE() + this.FieldF = that.GetFieldF() + this.FieldG = that.GetFieldG() + this.FieldH = that.GetFieldH() + this.FieldI = that.GetFieldI() + this.FieldJ = that.GetFieldJ() + return this +} + +type CustomNameCustomTypeFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetFieldA() *Uuid + GetFieldB() *github_com_gogo_protobuf_test_custom.Uint128 + GetFieldC() []Uuid + GetFieldD() []github_com_gogo_protobuf_test_custom.Uint128 +} + +func (this *CustomNameCustomType) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *CustomNameCustomType) TestProto() github_com_gogo_protobuf_proto.Message { + return NewCustomNameCustomTypeFromFace(this) +} + +func (this *CustomNameCustomType) GetFieldA() *Uuid { + return this.FieldA +} + +func (this *CustomNameCustomType) GetFieldB() *github_com_gogo_protobuf_test_custom.Uint128 { + return this.FieldB +} + +func (this *CustomNameCustomType) GetFieldC() []Uuid { + return this.FieldC +} + +func (this *CustomNameCustomType) GetFieldD() []github_com_gogo_protobuf_test_custom.Uint128 { + return this.FieldD +} + +func NewCustomNameCustomTypeFromFace(that CustomNameCustomTypeFace) *CustomNameCustomType { + this := &CustomNameCustomType{} + this.FieldA = that.GetFieldA() + this.FieldB = that.GetFieldB() + this.FieldC = that.GetFieldC() + this.FieldD = that.GetFieldD() + return this +} + +type CustomNameNinEmbeddedStructUnionFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetNidOptNative() *NidOptNative + GetFieldA() *NinOptNative + GetFieldB() *bool +} + +func (this *CustomNameNinEmbeddedStructUnion) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *CustomNameNinEmbeddedStructUnion) TestProto() github_com_gogo_protobuf_proto.Message { + return NewCustomNameNinEmbeddedStructUnionFromFace(this) +} + +func (this *CustomNameNinEmbeddedStructUnion) GetNidOptNative() *NidOptNative { + return this.NidOptNative +} + +func (this *CustomNameNinEmbeddedStructUnion) GetFieldA() *NinOptNative { + return this.FieldA +} + +func (this *CustomNameNinEmbeddedStructUnion) GetFieldB() *bool { + return this.FieldB +} + +func NewCustomNameNinEmbeddedStructUnionFromFace(that CustomNameNinEmbeddedStructUnionFace) *CustomNameNinEmbeddedStructUnion { + this := &CustomNameNinEmbeddedStructUnion{} + this.NidOptNative = that.GetNidOptNative() + this.FieldA = that.GetFieldA() + this.FieldB = that.GetFieldB() + return this +} + +type CustomNameEnumFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetFieldA() *TheTestEnum + GetFieldB() []TheTestEnum +} + +func (this *CustomNameEnum) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *CustomNameEnum) TestProto() github_com_gogo_protobuf_proto.Message { + return NewCustomNameEnumFromFace(this) +} + +func (this *CustomNameEnum) GetFieldA() *TheTestEnum { + return this.FieldA +} + +func (this *CustomNameEnum) GetFieldB() []TheTestEnum { + return this.FieldB +} + +func NewCustomNameEnumFromFace(that CustomNameEnumFace) *CustomNameEnum { + this := &CustomNameEnum{} + this.FieldA = that.GetFieldA() + this.FieldB = that.GetFieldB() + return this +} + +type UnrecognizedFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetField1() *string +} + +func (this *Unrecognized) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *Unrecognized) TestProto() github_com_gogo_protobuf_proto.Message { + return NewUnrecognizedFromFace(this) +} + +func (this *Unrecognized) GetField1() *string { + return this.Field1 +} + +func NewUnrecognizedFromFace(that UnrecognizedFace) *Unrecognized { + this := &Unrecognized{} + this.Field1 = that.GetField1() + return this +} + +type UnrecognizedWithInnerFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetEmbedded() []*UnrecognizedWithInner_Inner + GetField2() *string +} + +func (this *UnrecognizedWithInner) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *UnrecognizedWithInner) TestProto() github_com_gogo_protobuf_proto.Message { + return NewUnrecognizedWithInnerFromFace(this) +} + +func (this *UnrecognizedWithInner) GetEmbedded() []*UnrecognizedWithInner_Inner { + return this.Embedded +} + +func (this *UnrecognizedWithInner) GetField2() *string { + return this.Field2 +} + +func NewUnrecognizedWithInnerFromFace(that UnrecognizedWithInnerFace) *UnrecognizedWithInner { + this := &UnrecognizedWithInner{} + this.Embedded = that.GetEmbedded() + this.Field2 = that.GetField2() + return this +} + +type UnrecognizedWithInner_InnerFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetField1() *uint32 +} + +func (this *UnrecognizedWithInner_Inner) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *UnrecognizedWithInner_Inner) TestProto() github_com_gogo_protobuf_proto.Message { + return NewUnrecognizedWithInner_InnerFromFace(this) +} + +func (this *UnrecognizedWithInner_Inner) GetField1() *uint32 { + return this.Field1 +} + +func NewUnrecognizedWithInner_InnerFromFace(that UnrecognizedWithInner_InnerFace) *UnrecognizedWithInner_Inner { + this := &UnrecognizedWithInner_Inner{} + this.Field1 = that.GetField1() + return this +} + +type UnrecognizedWithEmbedFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetUnrecognizedWithEmbed_Embedded() UnrecognizedWithEmbed_Embedded + GetField2() *string +} + +func (this *UnrecognizedWithEmbed) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *UnrecognizedWithEmbed) TestProto() github_com_gogo_protobuf_proto.Message { + return NewUnrecognizedWithEmbedFromFace(this) +} + +func (this *UnrecognizedWithEmbed) GetUnrecognizedWithEmbed_Embedded() UnrecognizedWithEmbed_Embedded { + return this.UnrecognizedWithEmbed_Embedded +} + +func (this *UnrecognizedWithEmbed) GetField2() *string { + return this.Field2 +} + +func NewUnrecognizedWithEmbedFromFace(that UnrecognizedWithEmbedFace) *UnrecognizedWithEmbed { + this := &UnrecognizedWithEmbed{} + this.UnrecognizedWithEmbed_Embedded = that.GetUnrecognizedWithEmbed_Embedded() + this.Field2 = that.GetField2() + return this +} + +type UnrecognizedWithEmbed_EmbeddedFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetField1() *uint32 +} + +func (this *UnrecognizedWithEmbed_Embedded) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *UnrecognizedWithEmbed_Embedded) TestProto() github_com_gogo_protobuf_proto.Message { + return NewUnrecognizedWithEmbed_EmbeddedFromFace(this) +} + +func (this *UnrecognizedWithEmbed_Embedded) GetField1() *uint32 { + return this.Field1 +} + +func NewUnrecognizedWithEmbed_EmbeddedFromFace(that UnrecognizedWithEmbed_EmbeddedFace) *UnrecognizedWithEmbed_Embedded { + this := &UnrecognizedWithEmbed_Embedded{} + this.Field1 = that.GetField1() + return this +} + +type NodeFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetLabel() *string + GetChildren() []*Node +} + +func (this *Node) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *Node) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNodeFromFace(this) +} + +func (this *Node) GetLabel() *string { + return this.Label +} + +func (this *Node) GetChildren() []*Node { + return this.Children +} + +func NewNodeFromFace(that NodeFace) *Node { + this := &Node{} + this.Label = that.GetLabel() + this.Children = that.GetChildren() + return this +} + +func (this *NidOptNative) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 19) + s = append(s, "&test.NidOptNative{") + s = append(s, "Field1: "+fmt.Sprintf("%#v", this.Field1)+",\n") + s = append(s, "Field2: "+fmt.Sprintf("%#v", this.Field2)+",\n") + s = append(s, "Field3: "+fmt.Sprintf("%#v", this.Field3)+",\n") + s = append(s, "Field4: "+fmt.Sprintf("%#v", this.Field4)+",\n") + s = append(s, "Field5: "+fmt.Sprintf("%#v", this.Field5)+",\n") + s = append(s, "Field6: "+fmt.Sprintf("%#v", this.Field6)+",\n") + s = append(s, "Field7: "+fmt.Sprintf("%#v", this.Field7)+",\n") + s = append(s, "Field8: "+fmt.Sprintf("%#v", this.Field8)+",\n") + s = append(s, "Field9: "+fmt.Sprintf("%#v", this.Field9)+",\n") + s = append(s, "Field10: "+fmt.Sprintf("%#v", this.Field10)+",\n") + s = append(s, "Field11: "+fmt.Sprintf("%#v", this.Field11)+",\n") + s = append(s, "Field12: "+fmt.Sprintf("%#v", this.Field12)+",\n") + s = append(s, "Field13: "+fmt.Sprintf("%#v", this.Field13)+",\n") + s = append(s, "Field14: "+fmt.Sprintf("%#v", this.Field14)+",\n") + s = append(s, "Field15: "+fmt.Sprintf("%#v", this.Field15)+",\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 *NinOptNative) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 19) + s = append(s, "&test.NinOptNative{") + if this.Field1 != nil { + s = append(s, "Field1: "+valueToGoStringThetest(this.Field1, "float64")+",\n") + } + if this.Field2 != nil { + s = append(s, "Field2: "+valueToGoStringThetest(this.Field2, "float32")+",\n") + } + if this.Field3 != nil { + s = append(s, "Field3: "+valueToGoStringThetest(this.Field3, "int32")+",\n") + } + if this.Field4 != nil { + s = append(s, "Field4: "+valueToGoStringThetest(this.Field4, "int64")+",\n") + } + if this.Field5 != nil { + s = append(s, "Field5: "+valueToGoStringThetest(this.Field5, "uint32")+",\n") + } + if this.Field6 != nil { + s = append(s, "Field6: "+valueToGoStringThetest(this.Field6, "uint64")+",\n") + } + if this.Field7 != nil { + s = append(s, "Field7: "+valueToGoStringThetest(this.Field7, "int32")+",\n") + } + if this.Field8 != nil { + s = append(s, "Field8: "+valueToGoStringThetest(this.Field8, "int64")+",\n") + } + if this.Field9 != nil { + s = append(s, "Field9: "+valueToGoStringThetest(this.Field9, "uint32")+",\n") + } + if this.Field10 != nil { + s = append(s, "Field10: "+valueToGoStringThetest(this.Field10, "int32")+",\n") + } + if this.Field11 != nil { + s = append(s, "Field11: "+valueToGoStringThetest(this.Field11, "uint64")+",\n") + } + if this.Field12 != nil { + s = append(s, "Field12: "+valueToGoStringThetest(this.Field12, "int64")+",\n") + } + if this.Field13 != nil { + s = append(s, "Field13: "+valueToGoStringThetest(this.Field13, "bool")+",\n") + } + if this.Field14 != nil { + s = append(s, "Field14: "+valueToGoStringThetest(this.Field14, "string")+",\n") + } + if this.Field15 != nil { + s = append(s, "Field15: "+valueToGoStringThetest(this.Field15, "byte")+",\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 *NidRepNative) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 19) + s = append(s, "&test.NidRepNative{") + if this.Field1 != nil { + s = append(s, "Field1: "+fmt.Sprintf("%#v", this.Field1)+",\n") + } + if this.Field2 != nil { + s = append(s, "Field2: "+fmt.Sprintf("%#v", this.Field2)+",\n") + } + if this.Field3 != nil { + s = append(s, "Field3: "+fmt.Sprintf("%#v", this.Field3)+",\n") + } + if this.Field4 != nil { + s = append(s, "Field4: "+fmt.Sprintf("%#v", this.Field4)+",\n") + } + if this.Field5 != nil { + s = append(s, "Field5: "+fmt.Sprintf("%#v", this.Field5)+",\n") + } + if this.Field6 != nil { + s = append(s, "Field6: "+fmt.Sprintf("%#v", this.Field6)+",\n") + } + if this.Field7 != nil { + s = append(s, "Field7: "+fmt.Sprintf("%#v", this.Field7)+",\n") + } + if this.Field8 != nil { + s = append(s, "Field8: "+fmt.Sprintf("%#v", this.Field8)+",\n") + } + if this.Field9 != nil { + s = append(s, "Field9: "+fmt.Sprintf("%#v", this.Field9)+",\n") + } + if this.Field10 != nil { + s = append(s, "Field10: "+fmt.Sprintf("%#v", this.Field10)+",\n") + } + if this.Field11 != nil { + s = append(s, "Field11: "+fmt.Sprintf("%#v", this.Field11)+",\n") + } + if this.Field12 != nil { + s = append(s, "Field12: "+fmt.Sprintf("%#v", this.Field12)+",\n") + } + if this.Field13 != nil { + s = append(s, "Field13: "+fmt.Sprintf("%#v", this.Field13)+",\n") + } + if this.Field14 != nil { + s = append(s, "Field14: "+fmt.Sprintf("%#v", this.Field14)+",\n") + } + if this.Field15 != nil { + s = append(s, "Field15: "+fmt.Sprintf("%#v", this.Field15)+",\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 *NinRepNative) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 19) + s = append(s, "&test.NinRepNative{") + if this.Field1 != nil { + s = append(s, "Field1: "+fmt.Sprintf("%#v", this.Field1)+",\n") + } + if this.Field2 != nil { + s = append(s, "Field2: "+fmt.Sprintf("%#v", this.Field2)+",\n") + } + if this.Field3 != nil { + s = append(s, "Field3: "+fmt.Sprintf("%#v", this.Field3)+",\n") + } + if this.Field4 != nil { + s = append(s, "Field4: "+fmt.Sprintf("%#v", this.Field4)+",\n") + } + if this.Field5 != nil { + s = append(s, "Field5: "+fmt.Sprintf("%#v", this.Field5)+",\n") + } + if this.Field6 != nil { + s = append(s, "Field6: "+fmt.Sprintf("%#v", this.Field6)+",\n") + } + if this.Field7 != nil { + s = append(s, "Field7: "+fmt.Sprintf("%#v", this.Field7)+",\n") + } + if this.Field8 != nil { + s = append(s, "Field8: "+fmt.Sprintf("%#v", this.Field8)+",\n") + } + if this.Field9 != nil { + s = append(s, "Field9: "+fmt.Sprintf("%#v", this.Field9)+",\n") + } + if this.Field10 != nil { + s = append(s, "Field10: "+fmt.Sprintf("%#v", this.Field10)+",\n") + } + if this.Field11 != nil { + s = append(s, "Field11: "+fmt.Sprintf("%#v", this.Field11)+",\n") + } + if this.Field12 != nil { + s = append(s, "Field12: "+fmt.Sprintf("%#v", this.Field12)+",\n") + } + if this.Field13 != nil { + s = append(s, "Field13: "+fmt.Sprintf("%#v", this.Field13)+",\n") + } + if this.Field14 != nil { + s = append(s, "Field14: "+fmt.Sprintf("%#v", this.Field14)+",\n") + } + if this.Field15 != nil { + s = append(s, "Field15: "+fmt.Sprintf("%#v", this.Field15)+",\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 *NidRepPackedNative) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 17) + s = append(s, "&test.NidRepPackedNative{") + if this.Field1 != nil { + s = append(s, "Field1: "+fmt.Sprintf("%#v", this.Field1)+",\n") + } + if this.Field2 != nil { + s = append(s, "Field2: "+fmt.Sprintf("%#v", this.Field2)+",\n") + } + if this.Field3 != nil { + s = append(s, "Field3: "+fmt.Sprintf("%#v", this.Field3)+",\n") + } + if this.Field4 != nil { + s = append(s, "Field4: "+fmt.Sprintf("%#v", this.Field4)+",\n") + } + if this.Field5 != nil { + s = append(s, "Field5: "+fmt.Sprintf("%#v", this.Field5)+",\n") + } + if this.Field6 != nil { + s = append(s, "Field6: "+fmt.Sprintf("%#v", this.Field6)+",\n") + } + if this.Field7 != nil { + s = append(s, "Field7: "+fmt.Sprintf("%#v", this.Field7)+",\n") + } + if this.Field8 != nil { + s = append(s, "Field8: "+fmt.Sprintf("%#v", this.Field8)+",\n") + } + if this.Field9 != nil { + s = append(s, "Field9: "+fmt.Sprintf("%#v", this.Field9)+",\n") + } + if this.Field10 != nil { + s = append(s, "Field10: "+fmt.Sprintf("%#v", this.Field10)+",\n") + } + if this.Field11 != nil { + s = append(s, "Field11: "+fmt.Sprintf("%#v", this.Field11)+",\n") + } + if this.Field12 != nil { + s = append(s, "Field12: "+fmt.Sprintf("%#v", this.Field12)+",\n") + } + if this.Field13 != nil { + s = append(s, "Field13: "+fmt.Sprintf("%#v", this.Field13)+",\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 *NinRepPackedNative) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 17) + s = append(s, "&test.NinRepPackedNative{") + if this.Field1 != nil { + s = append(s, "Field1: "+fmt.Sprintf("%#v", this.Field1)+",\n") + } + if this.Field2 != nil { + s = append(s, "Field2: "+fmt.Sprintf("%#v", this.Field2)+",\n") + } + if this.Field3 != nil { + s = append(s, "Field3: "+fmt.Sprintf("%#v", this.Field3)+",\n") + } + if this.Field4 != nil { + s = append(s, "Field4: "+fmt.Sprintf("%#v", this.Field4)+",\n") + } + if this.Field5 != nil { + s = append(s, "Field5: "+fmt.Sprintf("%#v", this.Field5)+",\n") + } + if this.Field6 != nil { + s = append(s, "Field6: "+fmt.Sprintf("%#v", this.Field6)+",\n") + } + if this.Field7 != nil { + s = append(s, "Field7: "+fmt.Sprintf("%#v", this.Field7)+",\n") + } + if this.Field8 != nil { + s = append(s, "Field8: "+fmt.Sprintf("%#v", this.Field8)+",\n") + } + if this.Field9 != nil { + s = append(s, "Field9: "+fmt.Sprintf("%#v", this.Field9)+",\n") + } + if this.Field10 != nil { + s = append(s, "Field10: "+fmt.Sprintf("%#v", this.Field10)+",\n") + } + if this.Field11 != nil { + s = append(s, "Field11: "+fmt.Sprintf("%#v", this.Field11)+",\n") + } + if this.Field12 != nil { + s = append(s, "Field12: "+fmt.Sprintf("%#v", this.Field12)+",\n") + } + if this.Field13 != nil { + s = append(s, "Field13: "+fmt.Sprintf("%#v", this.Field13)+",\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 *NidOptStruct) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 14) + s = append(s, "&test.NidOptStruct{") + s = append(s, "Field1: "+fmt.Sprintf("%#v", this.Field1)+",\n") + s = append(s, "Field2: "+fmt.Sprintf("%#v", this.Field2)+",\n") + s = append(s, "Field3: "+strings.Replace(this.Field3.GoString(), `&`, ``, 1)+",\n") + s = append(s, "Field4: "+strings.Replace(this.Field4.GoString(), `&`, ``, 1)+",\n") + s = append(s, "Field6: "+fmt.Sprintf("%#v", this.Field6)+",\n") + s = append(s, "Field7: "+fmt.Sprintf("%#v", this.Field7)+",\n") + s = append(s, "Field8: "+strings.Replace(this.Field8.GoString(), `&`, ``, 1)+",\n") + s = append(s, "Field13: "+fmt.Sprintf("%#v", this.Field13)+",\n") + s = append(s, "Field14: "+fmt.Sprintf("%#v", this.Field14)+",\n") + s = append(s, "Field15: "+fmt.Sprintf("%#v", this.Field15)+",\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 *NinOptStruct) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 14) + s = append(s, "&test.NinOptStruct{") + if this.Field1 != nil { + s = append(s, "Field1: "+valueToGoStringThetest(this.Field1, "float64")+",\n") + } + if this.Field2 != nil { + s = append(s, "Field2: "+valueToGoStringThetest(this.Field2, "float32")+",\n") + } + if this.Field3 != nil { + s = append(s, "Field3: "+fmt.Sprintf("%#v", this.Field3)+",\n") + } + if this.Field4 != nil { + s = append(s, "Field4: "+fmt.Sprintf("%#v", this.Field4)+",\n") + } + if this.Field6 != nil { + s = append(s, "Field6: "+valueToGoStringThetest(this.Field6, "uint64")+",\n") + } + if this.Field7 != nil { + s = append(s, "Field7: "+valueToGoStringThetest(this.Field7, "int32")+",\n") + } + if this.Field8 != nil { + s = append(s, "Field8: "+fmt.Sprintf("%#v", this.Field8)+",\n") + } + if this.Field13 != nil { + s = append(s, "Field13: "+valueToGoStringThetest(this.Field13, "bool")+",\n") + } + if this.Field14 != nil { + s = append(s, "Field14: "+valueToGoStringThetest(this.Field14, "string")+",\n") + } + if this.Field15 != nil { + s = append(s, "Field15: "+valueToGoStringThetest(this.Field15, "byte")+",\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 *NidRepStruct) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 14) + s = append(s, "&test.NidRepStruct{") + if this.Field1 != nil { + s = append(s, "Field1: "+fmt.Sprintf("%#v", this.Field1)+",\n") + } + if this.Field2 != nil { + s = append(s, "Field2: "+fmt.Sprintf("%#v", this.Field2)+",\n") + } + if this.Field3 != nil { + s = append(s, "Field3: "+fmt.Sprintf("%#v", this.Field3)+",\n") + } + if this.Field4 != nil { + s = append(s, "Field4: "+fmt.Sprintf("%#v", this.Field4)+",\n") + } + if this.Field6 != nil { + s = append(s, "Field6: "+fmt.Sprintf("%#v", this.Field6)+",\n") + } + if this.Field7 != nil { + s = append(s, "Field7: "+fmt.Sprintf("%#v", this.Field7)+",\n") + } + if this.Field8 != nil { + s = append(s, "Field8: "+fmt.Sprintf("%#v", this.Field8)+",\n") + } + if this.Field13 != nil { + s = append(s, "Field13: "+fmt.Sprintf("%#v", this.Field13)+",\n") + } + if this.Field14 != nil { + s = append(s, "Field14: "+fmt.Sprintf("%#v", this.Field14)+",\n") + } + if this.Field15 != nil { + s = append(s, "Field15: "+fmt.Sprintf("%#v", this.Field15)+",\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 *NinRepStruct) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 14) + s = append(s, "&test.NinRepStruct{") + if this.Field1 != nil { + s = append(s, "Field1: "+fmt.Sprintf("%#v", this.Field1)+",\n") + } + if this.Field2 != nil { + s = append(s, "Field2: "+fmt.Sprintf("%#v", this.Field2)+",\n") + } + if this.Field3 != nil { + s = append(s, "Field3: "+fmt.Sprintf("%#v", this.Field3)+",\n") + } + if this.Field4 != nil { + s = append(s, "Field4: "+fmt.Sprintf("%#v", this.Field4)+",\n") + } + if this.Field6 != nil { + s = append(s, "Field6: "+fmt.Sprintf("%#v", this.Field6)+",\n") + } + if this.Field7 != nil { + s = append(s, "Field7: "+fmt.Sprintf("%#v", this.Field7)+",\n") + } + if this.Field8 != nil { + s = append(s, "Field8: "+fmt.Sprintf("%#v", this.Field8)+",\n") + } + if this.Field13 != nil { + s = append(s, "Field13: "+fmt.Sprintf("%#v", this.Field13)+",\n") + } + if this.Field14 != nil { + s = append(s, "Field14: "+fmt.Sprintf("%#v", this.Field14)+",\n") + } + if this.Field15 != nil { + s = append(s, "Field15: "+fmt.Sprintf("%#v", this.Field15)+",\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 *NidEmbeddedStruct) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 7) + s = append(s, "&test.NidEmbeddedStruct{") + if this.NidOptNative != nil { + s = append(s, "NidOptNative: "+fmt.Sprintf("%#v", this.NidOptNative)+",\n") + } + s = append(s, "Field200: "+strings.Replace(this.Field200.GoString(), `&`, ``, 1)+",\n") + s = append(s, "Field210: "+fmt.Sprintf("%#v", this.Field210)+",\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 *NinEmbeddedStruct) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 7) + s = append(s, "&test.NinEmbeddedStruct{") + if this.NidOptNative != nil { + s = append(s, "NidOptNative: "+fmt.Sprintf("%#v", this.NidOptNative)+",\n") + } + if this.Field200 != nil { + s = append(s, "Field200: "+fmt.Sprintf("%#v", this.Field200)+",\n") + } + if this.Field210 != nil { + s = append(s, "Field210: "+valueToGoStringThetest(this.Field210, "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 *NidNestedStruct) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 6) + s = append(s, "&test.NidNestedStruct{") + s = append(s, "Field1: "+strings.Replace(this.Field1.GoString(), `&`, ``, 1)+",\n") + if this.Field2 != nil { + s = append(s, "Field2: "+fmt.Sprintf("%#v", this.Field2)+",\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 *NinNestedStruct) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 6) + s = append(s, "&test.NinNestedStruct{") + if this.Field1 != nil { + s = append(s, "Field1: "+fmt.Sprintf("%#v", this.Field1)+",\n") + } + if this.Field2 != nil { + s = append(s, "Field2: "+fmt.Sprintf("%#v", this.Field2)+",\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 *NidOptCustom) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 6) + s = append(s, "&test.NidOptCustom{") + s = append(s, "Id: "+fmt.Sprintf("%#v", this.Id)+",\n") + s = append(s, "Value: "+fmt.Sprintf("%#v", this.Value)+",\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 *CustomDash) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&test.CustomDash{") + if this.Value != nil { + s = append(s, "Value: "+valueToGoStringThetest(this.Value, "github_com_gogo_protobuf_test_custom_dash_type.Bytes")+",\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 *NinOptCustom) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 6) + s = append(s, "&test.NinOptCustom{") + if this.Id != nil { + s = append(s, "Id: "+valueToGoStringThetest(this.Id, "Uuid")+",\n") + } + if this.Value != nil { + s = append(s, "Value: "+valueToGoStringThetest(this.Value, "github_com_gogo_protobuf_test_custom.Uint128")+",\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 *NidRepCustom) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 6) + s = append(s, "&test.NidRepCustom{") + if this.Id != nil { + s = append(s, "Id: "+fmt.Sprintf("%#v", this.Id)+",\n") + } + if this.Value != nil { + s = append(s, "Value: "+fmt.Sprintf("%#v", this.Value)+",\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 *NinRepCustom) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 6) + s = append(s, "&test.NinRepCustom{") + if this.Id != nil { + s = append(s, "Id: "+fmt.Sprintf("%#v", this.Id)+",\n") + } + if this.Value != nil { + s = append(s, "Value: "+fmt.Sprintf("%#v", this.Value)+",\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 *NinOptNativeUnion) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 13) + s = append(s, "&test.NinOptNativeUnion{") + if this.Field1 != nil { + s = append(s, "Field1: "+valueToGoStringThetest(this.Field1, "float64")+",\n") + } + if this.Field2 != nil { + s = append(s, "Field2: "+valueToGoStringThetest(this.Field2, "float32")+",\n") + } + if this.Field3 != nil { + s = append(s, "Field3: "+valueToGoStringThetest(this.Field3, "int32")+",\n") + } + if this.Field4 != nil { + s = append(s, "Field4: "+valueToGoStringThetest(this.Field4, "int64")+",\n") + } + if this.Field5 != nil { + s = append(s, "Field5: "+valueToGoStringThetest(this.Field5, "uint32")+",\n") + } + if this.Field6 != nil { + s = append(s, "Field6: "+valueToGoStringThetest(this.Field6, "uint64")+",\n") + } + if this.Field13 != nil { + s = append(s, "Field13: "+valueToGoStringThetest(this.Field13, "bool")+",\n") + } + if this.Field14 != nil { + s = append(s, "Field14: "+valueToGoStringThetest(this.Field14, "string")+",\n") + } + if this.Field15 != nil { + s = append(s, "Field15: "+valueToGoStringThetest(this.Field15, "byte")+",\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 *NinOptStructUnion) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 13) + s = append(s, "&test.NinOptStructUnion{") + if this.Field1 != nil { + s = append(s, "Field1: "+valueToGoStringThetest(this.Field1, "float64")+",\n") + } + if this.Field2 != nil { + s = append(s, "Field2: "+valueToGoStringThetest(this.Field2, "float32")+",\n") + } + if this.Field3 != nil { + s = append(s, "Field3: "+fmt.Sprintf("%#v", this.Field3)+",\n") + } + if this.Field4 != nil { + s = append(s, "Field4: "+fmt.Sprintf("%#v", this.Field4)+",\n") + } + if this.Field6 != nil { + s = append(s, "Field6: "+valueToGoStringThetest(this.Field6, "uint64")+",\n") + } + if this.Field7 != nil { + s = append(s, "Field7: "+valueToGoStringThetest(this.Field7, "int32")+",\n") + } + if this.Field13 != nil { + s = append(s, "Field13: "+valueToGoStringThetest(this.Field13, "bool")+",\n") + } + if this.Field14 != nil { + s = append(s, "Field14: "+valueToGoStringThetest(this.Field14, "string")+",\n") + } + if this.Field15 != nil { + s = append(s, "Field15: "+valueToGoStringThetest(this.Field15, "byte")+",\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 *NinEmbeddedStructUnion) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 7) + s = append(s, "&test.NinEmbeddedStructUnion{") + if this.NidOptNative != nil { + s = append(s, "NidOptNative: "+fmt.Sprintf("%#v", this.NidOptNative)+",\n") + } + if this.Field200 != nil { + s = append(s, "Field200: "+fmt.Sprintf("%#v", this.Field200)+",\n") + } + if this.Field210 != nil { + s = append(s, "Field210: "+valueToGoStringThetest(this.Field210, "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 *NinNestedStructUnion) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 7) + s = append(s, "&test.NinNestedStructUnion{") + if this.Field1 != nil { + s = append(s, "Field1: "+fmt.Sprintf("%#v", this.Field1)+",\n") + } + if this.Field2 != nil { + s = append(s, "Field2: "+fmt.Sprintf("%#v", this.Field2)+",\n") + } + if this.Field3 != nil { + s = append(s, "Field3: "+fmt.Sprintf("%#v", this.Field3)+",\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 *Tree) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 7) + s = append(s, "&test.Tree{") + if this.Or != nil { + s = append(s, "Or: "+fmt.Sprintf("%#v", this.Or)+",\n") + } + if this.And != nil { + s = append(s, "And: "+fmt.Sprintf("%#v", this.And)+",\n") + } + if this.Leaf != nil { + s = append(s, "Leaf: "+fmt.Sprintf("%#v", this.Leaf)+",\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 *OrBranch) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 6) + s = append(s, "&test.OrBranch{") + s = append(s, "Left: "+strings.Replace(this.Left.GoString(), `&`, ``, 1)+",\n") + s = append(s, "Right: "+strings.Replace(this.Right.GoString(), `&`, ``, 1)+",\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 *AndBranch) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 6) + s = append(s, "&test.AndBranch{") + s = append(s, "Left: "+strings.Replace(this.Left.GoString(), `&`, ``, 1)+",\n") + s = append(s, "Right: "+strings.Replace(this.Right.GoString(), `&`, ``, 1)+",\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 *Leaf) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 6) + s = append(s, "&test.Leaf{") + s = append(s, "Value: "+fmt.Sprintf("%#v", this.Value)+",\n") + s = append(s, "StrValue: "+fmt.Sprintf("%#v", this.StrValue)+",\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 *DeepTree) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 7) + s = append(s, "&test.DeepTree{") + if this.Down != nil { + s = append(s, "Down: "+fmt.Sprintf("%#v", this.Down)+",\n") + } + if this.And != nil { + s = append(s, "And: "+fmt.Sprintf("%#v", this.And)+",\n") + } + if this.Leaf != nil { + s = append(s, "Leaf: "+fmt.Sprintf("%#v", this.Leaf)+",\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 *ADeepBranch) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&test.ADeepBranch{") + s = append(s, "Down: "+strings.Replace(this.Down.GoString(), `&`, ``, 1)+",\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 *AndDeepBranch) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 6) + s = append(s, "&test.AndDeepBranch{") + s = append(s, "Left: "+strings.Replace(this.Left.GoString(), `&`, ``, 1)+",\n") + s = append(s, "Right: "+strings.Replace(this.Right.GoString(), `&`, ``, 1)+",\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 *DeepLeaf) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&test.DeepLeaf{") + s = append(s, "Tree: "+strings.Replace(this.Tree.GoString(), `&`, ``, 1)+",\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 *Nil) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 4) + s = append(s, "&test.Nil{") + 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 *NidOptEnum) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&test.NidOptEnum{") + s = append(s, "Field1: "+fmt.Sprintf("%#v", this.Field1)+",\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 *NinOptEnum) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 7) + s = append(s, "&test.NinOptEnum{") + if this.Field1 != nil { + s = append(s, "Field1: "+valueToGoStringThetest(this.Field1, "test.TheTestEnum")+",\n") + } + if this.Field2 != nil { + s = append(s, "Field2: "+valueToGoStringThetest(this.Field2, "test.YetAnotherTestEnum")+",\n") + } + if this.Field3 != nil { + s = append(s, "Field3: "+valueToGoStringThetest(this.Field3, "test.YetYetAnotherTestEnum")+",\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 *NidRepEnum) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 7) + s = append(s, "&test.NidRepEnum{") + if this.Field1 != nil { + s = append(s, "Field1: "+fmt.Sprintf("%#v", this.Field1)+",\n") + } + if this.Field2 != nil { + s = append(s, "Field2: "+fmt.Sprintf("%#v", this.Field2)+",\n") + } + if this.Field3 != nil { + s = append(s, "Field3: "+fmt.Sprintf("%#v", this.Field3)+",\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 *NinRepEnum) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 7) + s = append(s, "&test.NinRepEnum{") + if this.Field1 != nil { + s = append(s, "Field1: "+fmt.Sprintf("%#v", this.Field1)+",\n") + } + if this.Field2 != nil { + s = append(s, "Field2: "+fmt.Sprintf("%#v", this.Field2)+",\n") + } + if this.Field3 != nil { + s = append(s, "Field3: "+fmt.Sprintf("%#v", this.Field3)+",\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 *NinOptEnumDefault) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 7) + s = append(s, "&test.NinOptEnumDefault{") + if this.Field1 != nil { + s = append(s, "Field1: "+valueToGoStringThetest(this.Field1, "test.TheTestEnum")+",\n") + } + if this.Field2 != nil { + s = append(s, "Field2: "+valueToGoStringThetest(this.Field2, "test.YetAnotherTestEnum")+",\n") + } + if this.Field3 != nil { + s = append(s, "Field3: "+valueToGoStringThetest(this.Field3, "test.YetYetAnotherTestEnum")+",\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 *AnotherNinOptEnum) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 7) + s = append(s, "&test.AnotherNinOptEnum{") + if this.Field1 != nil { + s = append(s, "Field1: "+valueToGoStringThetest(this.Field1, "test.AnotherTestEnum")+",\n") + } + if this.Field2 != nil { + s = append(s, "Field2: "+valueToGoStringThetest(this.Field2, "test.YetAnotherTestEnum")+",\n") + } + if this.Field3 != nil { + s = append(s, "Field3: "+valueToGoStringThetest(this.Field3, "test.YetYetAnotherTestEnum")+",\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 *AnotherNinOptEnumDefault) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 7) + s = append(s, "&test.AnotherNinOptEnumDefault{") + if this.Field1 != nil { + s = append(s, "Field1: "+valueToGoStringThetest(this.Field1, "test.AnotherTestEnum")+",\n") + } + if this.Field2 != nil { + s = append(s, "Field2: "+valueToGoStringThetest(this.Field2, "test.YetAnotherTestEnum")+",\n") + } + if this.Field3 != nil { + s = append(s, "Field3: "+valueToGoStringThetest(this.Field3, "test.YetYetAnotherTestEnum")+",\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 *Timer) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 7) + s = append(s, "&test.Timer{") + s = append(s, "Time1: "+fmt.Sprintf("%#v", this.Time1)+",\n") + s = append(s, "Time2: "+fmt.Sprintf("%#v", this.Time2)+",\n") + s = append(s, "Data: "+fmt.Sprintf("%#v", this.Data)+",\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 *MyExtendable) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&test.MyExtendable{") + if this.Field1 != nil { + s = append(s, "Field1: "+valueToGoStringThetest(this.Field1, "int64")+",\n") + } + if this.XXX_extensions != nil { + s = append(s, "XXX_extensions: "+extensionToGoStringThetest(this.XXX_extensions)+",\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 *OtherExtenable) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 7) + s = append(s, "&test.OtherExtenable{") + if this.Field2 != nil { + s = append(s, "Field2: "+valueToGoStringThetest(this.Field2, "int64")+",\n") + } + if this.Field13 != nil { + s = append(s, "Field13: "+valueToGoStringThetest(this.Field13, "int64")+",\n") + } + if this.M != nil { + s = append(s, "M: "+fmt.Sprintf("%#v", this.M)+",\n") + } + if this.XXX_extensions != nil { + s = append(s, "XXX_extensions: "+extensionToGoStringThetest(this.XXX_extensions)+",\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 *NestedDefinition) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 8) + s = append(s, "&test.NestedDefinition{") + if this.Field1 != nil { + s = append(s, "Field1: "+valueToGoStringThetest(this.Field1, "int64")+",\n") + } + if this.EnumField != nil { + s = append(s, "EnumField: "+valueToGoStringThetest(this.EnumField, "test.NestedDefinition_NestedEnum")+",\n") + } + if this.NNM != nil { + s = append(s, "NNM: "+fmt.Sprintf("%#v", this.NNM)+",\n") + } + if this.NM != nil { + s = append(s, "NM: "+fmt.Sprintf("%#v", this.NM)+",\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 *NestedDefinition_NestedMessage) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 6) + s = append(s, "&test.NestedDefinition_NestedMessage{") + if this.NestedField1 != nil { + s = append(s, "NestedField1: "+valueToGoStringThetest(this.NestedField1, "uint64")+",\n") + } + if this.NNM != nil { + s = append(s, "NNM: "+fmt.Sprintf("%#v", this.NNM)+",\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 *NestedDefinition_NestedMessage_NestedNestedMsg) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&test.NestedDefinition_NestedMessage_NestedNestedMsg{") + if this.NestedNestedField1 != nil { + s = append(s, "NestedNestedField1: "+valueToGoStringThetest(this.NestedNestedField1, "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 *NestedScope) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 7) + s = append(s, "&test.NestedScope{") + if this.A != nil { + s = append(s, "A: "+fmt.Sprintf("%#v", this.A)+",\n") + } + if this.B != nil { + s = append(s, "B: "+valueToGoStringThetest(this.B, "test.NestedDefinition_NestedEnum")+",\n") + } + if this.C != nil { + s = append(s, "C: "+fmt.Sprintf("%#v", this.C)+",\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 *NinOptNativeDefault) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 19) + s = append(s, "&test.NinOptNativeDefault{") + if this.Field1 != nil { + s = append(s, "Field1: "+valueToGoStringThetest(this.Field1, "float64")+",\n") + } + if this.Field2 != nil { + s = append(s, "Field2: "+valueToGoStringThetest(this.Field2, "float32")+",\n") + } + if this.Field3 != nil { + s = append(s, "Field3: "+valueToGoStringThetest(this.Field3, "int32")+",\n") + } + if this.Field4 != nil { + s = append(s, "Field4: "+valueToGoStringThetest(this.Field4, "int64")+",\n") + } + if this.Field5 != nil { + s = append(s, "Field5: "+valueToGoStringThetest(this.Field5, "uint32")+",\n") + } + if this.Field6 != nil { + s = append(s, "Field6: "+valueToGoStringThetest(this.Field6, "uint64")+",\n") + } + if this.Field7 != nil { + s = append(s, "Field7: "+valueToGoStringThetest(this.Field7, "int32")+",\n") + } + if this.Field8 != nil { + s = append(s, "Field8: "+valueToGoStringThetest(this.Field8, "int64")+",\n") + } + if this.Field9 != nil { + s = append(s, "Field9: "+valueToGoStringThetest(this.Field9, "uint32")+",\n") + } + if this.Field10 != nil { + s = append(s, "Field10: "+valueToGoStringThetest(this.Field10, "int32")+",\n") + } + if this.Field11 != nil { + s = append(s, "Field11: "+valueToGoStringThetest(this.Field11, "uint64")+",\n") + } + if this.Field12 != nil { + s = append(s, "Field12: "+valueToGoStringThetest(this.Field12, "int64")+",\n") + } + if this.Field13 != nil { + s = append(s, "Field13: "+valueToGoStringThetest(this.Field13, "bool")+",\n") + } + if this.Field14 != nil { + s = append(s, "Field14: "+valueToGoStringThetest(this.Field14, "string")+",\n") + } + if this.Field15 != nil { + s = append(s, "Field15: "+valueToGoStringThetest(this.Field15, "byte")+",\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 *CustomContainer) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&test.CustomContainer{") + s = append(s, "CustomStruct: "+strings.Replace(this.CustomStruct.GoString(), `&`, ``, 1)+",\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 *CustomNameNidOptNative) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 19) + s = append(s, "&test.CustomNameNidOptNative{") + s = append(s, "FieldA: "+fmt.Sprintf("%#v", this.FieldA)+",\n") + s = append(s, "FieldB: "+fmt.Sprintf("%#v", this.FieldB)+",\n") + s = append(s, "FieldC: "+fmt.Sprintf("%#v", this.FieldC)+",\n") + s = append(s, "FieldD: "+fmt.Sprintf("%#v", this.FieldD)+",\n") + s = append(s, "FieldE: "+fmt.Sprintf("%#v", this.FieldE)+",\n") + s = append(s, "FieldF: "+fmt.Sprintf("%#v", this.FieldF)+",\n") + s = append(s, "FieldG: "+fmt.Sprintf("%#v", this.FieldG)+",\n") + s = append(s, "FieldH: "+fmt.Sprintf("%#v", this.FieldH)+",\n") + s = append(s, "FieldI: "+fmt.Sprintf("%#v", this.FieldI)+",\n") + s = append(s, "FieldJ: "+fmt.Sprintf("%#v", this.FieldJ)+",\n") + s = append(s, "FieldK: "+fmt.Sprintf("%#v", this.FieldK)+",\n") + s = append(s, "FieldL: "+fmt.Sprintf("%#v", this.FieldL)+",\n") + s = append(s, "FieldM: "+fmt.Sprintf("%#v", this.FieldM)+",\n") + s = append(s, "FieldN: "+fmt.Sprintf("%#v", this.FieldN)+",\n") + s = append(s, "FieldO: "+fmt.Sprintf("%#v", this.FieldO)+",\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 *CustomNameNinOptNative) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 19) + s = append(s, "&test.CustomNameNinOptNative{") + if this.FieldA != nil { + s = append(s, "FieldA: "+valueToGoStringThetest(this.FieldA, "float64")+",\n") + } + if this.FieldB != nil { + s = append(s, "FieldB: "+valueToGoStringThetest(this.FieldB, "float32")+",\n") + } + if this.FieldC != nil { + s = append(s, "FieldC: "+valueToGoStringThetest(this.FieldC, "int32")+",\n") + } + if this.FieldD != nil { + s = append(s, "FieldD: "+valueToGoStringThetest(this.FieldD, "int64")+",\n") + } + if this.FieldE != nil { + s = append(s, "FieldE: "+valueToGoStringThetest(this.FieldE, "uint32")+",\n") + } + if this.FieldF != nil { + s = append(s, "FieldF: "+valueToGoStringThetest(this.FieldF, "uint64")+",\n") + } + if this.FieldG != nil { + s = append(s, "FieldG: "+valueToGoStringThetest(this.FieldG, "int32")+",\n") + } + if this.FieldH != nil { + s = append(s, "FieldH: "+valueToGoStringThetest(this.FieldH, "int64")+",\n") + } + if this.FieldI != nil { + s = append(s, "FieldI: "+valueToGoStringThetest(this.FieldI, "uint32")+",\n") + } + if this.FieldJ != nil { + s = append(s, "FieldJ: "+valueToGoStringThetest(this.FieldJ, "int32")+",\n") + } + if this.FieldK != nil { + s = append(s, "FieldK: "+valueToGoStringThetest(this.FieldK, "uint64")+",\n") + } + if this.FielL != nil { + s = append(s, "FielL: "+valueToGoStringThetest(this.FielL, "int64")+",\n") + } + if this.FieldM != nil { + s = append(s, "FieldM: "+valueToGoStringThetest(this.FieldM, "bool")+",\n") + } + if this.FieldN != nil { + s = append(s, "FieldN: "+valueToGoStringThetest(this.FieldN, "string")+",\n") + } + if this.FieldO != nil { + s = append(s, "FieldO: "+valueToGoStringThetest(this.FieldO, "byte")+",\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 *CustomNameNinRepNative) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 19) + s = append(s, "&test.CustomNameNinRepNative{") + if this.FieldA != nil { + s = append(s, "FieldA: "+fmt.Sprintf("%#v", this.FieldA)+",\n") + } + if this.FieldB != nil { + s = append(s, "FieldB: "+fmt.Sprintf("%#v", this.FieldB)+",\n") + } + if this.FieldC != nil { + s = append(s, "FieldC: "+fmt.Sprintf("%#v", this.FieldC)+",\n") + } + if this.FieldD != nil { + s = append(s, "FieldD: "+fmt.Sprintf("%#v", this.FieldD)+",\n") + } + if this.FieldE != nil { + s = append(s, "FieldE: "+fmt.Sprintf("%#v", this.FieldE)+",\n") + } + if this.FieldF != nil { + s = append(s, "FieldF: "+fmt.Sprintf("%#v", this.FieldF)+",\n") + } + if this.FieldG != nil { + s = append(s, "FieldG: "+fmt.Sprintf("%#v", this.FieldG)+",\n") + } + if this.FieldH != nil { + s = append(s, "FieldH: "+fmt.Sprintf("%#v", this.FieldH)+",\n") + } + if this.FieldI != nil { + s = append(s, "FieldI: "+fmt.Sprintf("%#v", this.FieldI)+",\n") + } + if this.FieldJ != nil { + s = append(s, "FieldJ: "+fmt.Sprintf("%#v", this.FieldJ)+",\n") + } + if this.FieldK != nil { + s = append(s, "FieldK: "+fmt.Sprintf("%#v", this.FieldK)+",\n") + } + if this.FieldL != nil { + s = append(s, "FieldL: "+fmt.Sprintf("%#v", this.FieldL)+",\n") + } + if this.FieldM != nil { + s = append(s, "FieldM: "+fmt.Sprintf("%#v", this.FieldM)+",\n") + } + if this.FieldN != nil { + s = append(s, "FieldN: "+fmt.Sprintf("%#v", this.FieldN)+",\n") + } + if this.FieldO != nil { + s = append(s, "FieldO: "+fmt.Sprintf("%#v", this.FieldO)+",\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 *CustomNameNinStruct) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 14) + s = append(s, "&test.CustomNameNinStruct{") + if this.FieldA != nil { + s = append(s, "FieldA: "+valueToGoStringThetest(this.FieldA, "float64")+",\n") + } + if this.FieldB != nil { + s = append(s, "FieldB: "+valueToGoStringThetest(this.FieldB, "float32")+",\n") + } + if this.FieldC != nil { + s = append(s, "FieldC: "+fmt.Sprintf("%#v", this.FieldC)+",\n") + } + if this.FieldD != nil { + s = append(s, "FieldD: "+fmt.Sprintf("%#v", this.FieldD)+",\n") + } + if this.FieldE != nil { + s = append(s, "FieldE: "+valueToGoStringThetest(this.FieldE, "uint64")+",\n") + } + if this.FieldF != nil { + s = append(s, "FieldF: "+valueToGoStringThetest(this.FieldF, "int32")+",\n") + } + if this.FieldG != nil { + s = append(s, "FieldG: "+fmt.Sprintf("%#v", this.FieldG)+",\n") + } + if this.FieldH != nil { + s = append(s, "FieldH: "+valueToGoStringThetest(this.FieldH, "bool")+",\n") + } + if this.FieldI != nil { + s = append(s, "FieldI: "+valueToGoStringThetest(this.FieldI, "string")+",\n") + } + if this.FieldJ != nil { + s = append(s, "FieldJ: "+valueToGoStringThetest(this.FieldJ, "byte")+",\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 *CustomNameCustomType) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 8) + s = append(s, "&test.CustomNameCustomType{") + if this.FieldA != nil { + s = append(s, "FieldA: "+valueToGoStringThetest(this.FieldA, "Uuid")+",\n") + } + if this.FieldB != nil { + s = append(s, "FieldB: "+valueToGoStringThetest(this.FieldB, "github_com_gogo_protobuf_test_custom.Uint128")+",\n") + } + if this.FieldC != nil { + s = append(s, "FieldC: "+fmt.Sprintf("%#v", this.FieldC)+",\n") + } + if this.FieldD != nil { + s = append(s, "FieldD: "+fmt.Sprintf("%#v", this.FieldD)+",\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 *CustomNameNinEmbeddedStructUnion) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 7) + s = append(s, "&test.CustomNameNinEmbeddedStructUnion{") + if this.NidOptNative != nil { + s = append(s, "NidOptNative: "+fmt.Sprintf("%#v", this.NidOptNative)+",\n") + } + if this.FieldA != nil { + s = append(s, "FieldA: "+fmt.Sprintf("%#v", this.FieldA)+",\n") + } + if this.FieldB != nil { + s = append(s, "FieldB: "+valueToGoStringThetest(this.FieldB, "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 *CustomNameEnum) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 6) + s = append(s, "&test.CustomNameEnum{") + if this.FieldA != nil { + s = append(s, "FieldA: "+valueToGoStringThetest(this.FieldA, "test.TheTestEnum")+",\n") + } + if this.FieldB != nil { + s = append(s, "FieldB: "+fmt.Sprintf("%#v", this.FieldB)+",\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 *NoExtensionsMap) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&test.NoExtensionsMap{") + if this.Field1 != nil { + s = append(s, "Field1: "+valueToGoStringThetest(this.Field1, "int64")+",\n") + } + if this.XXX_extensions != nil { + s = append(s, "XXX_extensions: "+fmt.Sprintf("%#v", this.XXX_extensions)+",\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 *Unrecognized) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&test.Unrecognized{") + if this.Field1 != nil { + s = append(s, "Field1: "+valueToGoStringThetest(this.Field1, "string")+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *UnrecognizedWithInner) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 6) + s = append(s, "&test.UnrecognizedWithInner{") + if this.Embedded != nil { + s = append(s, "Embedded: "+fmt.Sprintf("%#v", this.Embedded)+",\n") + } + if this.Field2 != nil { + s = append(s, "Field2: "+valueToGoStringThetest(this.Field2, "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 *UnrecognizedWithInner_Inner) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&test.UnrecognizedWithInner_Inner{") + if this.Field1 != nil { + s = append(s, "Field1: "+valueToGoStringThetest(this.Field1, "uint32")+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *UnrecognizedWithEmbed) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 6) + s = append(s, "&test.UnrecognizedWithEmbed{") + s = append(s, "UnrecognizedWithEmbed_Embedded: "+strings.Replace(this.UnrecognizedWithEmbed_Embedded.GoString(), `&`, ``, 1)+",\n") + if this.Field2 != nil { + s = append(s, "Field2: "+valueToGoStringThetest(this.Field2, "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 *UnrecognizedWithEmbed_Embedded) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&test.UnrecognizedWithEmbed_Embedded{") + if this.Field1 != nil { + s = append(s, "Field1: "+valueToGoStringThetest(this.Field1, "uint32")+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *Node) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 6) + s = append(s, "&test.Node{") + if this.Label != nil { + s = append(s, "Label: "+valueToGoStringThetest(this.Label, "string")+",\n") + } + if this.Children != nil { + s = append(s, "Children: "+fmt.Sprintf("%#v", this.Children)+",\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 valueToGoStringThetest(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 extensionToGoStringThetest(e map[int32]github_com_gogo_protobuf_proto.Extension) string { + if e == nil { + return "nil" + } + s := "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 +} +func NewPopulatedNidOptNative(r randyThetest, easy bool) *NidOptNative { + this := &NidOptNative{} + this.Field1 = float64(r.Float64()) + if r.Intn(2) == 0 { + this.Field1 *= -1 + } + this.Field2 = float32(r.Float32()) + if r.Intn(2) == 0 { + this.Field2 *= -1 + } + this.Field3 = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Field3 *= -1 + } + this.Field4 = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Field4 *= -1 + } + this.Field5 = uint32(r.Uint32()) + this.Field6 = uint64(uint64(r.Uint32())) + this.Field7 = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Field7 *= -1 + } + this.Field8 = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Field8 *= -1 + } + this.Field9 = uint32(r.Uint32()) + this.Field10 = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Field10 *= -1 + } + this.Field11 = uint64(uint64(r.Uint32())) + this.Field12 = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Field12 *= -1 + } + this.Field13 = bool(bool(r.Intn(2) == 0)) + this.Field14 = randStringThetest(r) + v1 := r.Intn(100) + this.Field15 = make([]byte, v1) + for i := 0; i < v1; i++ { + this.Field15[i] = byte(r.Intn(256)) + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 16) + } + return this +} + +func NewPopulatedNinOptNative(r randyThetest, easy bool) *NinOptNative { + this := &NinOptNative{} + if r.Intn(10) != 0 { + v2 := float64(r.Float64()) + if r.Intn(2) == 0 { + v2 *= -1 + } + this.Field1 = &v2 + } + if r.Intn(10) != 0 { + v3 := float32(r.Float32()) + if r.Intn(2) == 0 { + v3 *= -1 + } + this.Field2 = &v3 + } + if r.Intn(10) != 0 { + v4 := int32(r.Int31()) + if r.Intn(2) == 0 { + v4 *= -1 + } + this.Field3 = &v4 + } + if r.Intn(10) != 0 { + v5 := int64(r.Int63()) + if r.Intn(2) == 0 { + v5 *= -1 + } + this.Field4 = &v5 + } + if r.Intn(10) != 0 { + v6 := uint32(r.Uint32()) + this.Field5 = &v6 + } + if r.Intn(10) != 0 { + v7 := uint64(uint64(r.Uint32())) + this.Field6 = &v7 + } + if r.Intn(10) != 0 { + v8 := int32(r.Int31()) + if r.Intn(2) == 0 { + v8 *= -1 + } + this.Field7 = &v8 + } + if r.Intn(10) != 0 { + v9 := int64(r.Int63()) + if r.Intn(2) == 0 { + v9 *= -1 + } + this.Field8 = &v9 + } + if r.Intn(10) != 0 { + v10 := uint32(r.Uint32()) + this.Field9 = &v10 + } + if r.Intn(10) != 0 { + v11 := int32(r.Int31()) + if r.Intn(2) == 0 { + v11 *= -1 + } + this.Field10 = &v11 + } + if r.Intn(10) != 0 { + v12 := uint64(uint64(r.Uint32())) + this.Field11 = &v12 + } + if r.Intn(10) != 0 { + v13 := int64(r.Int63()) + if r.Intn(2) == 0 { + v13 *= -1 + } + this.Field12 = &v13 + } + if r.Intn(10) != 0 { + v14 := bool(bool(r.Intn(2) == 0)) + this.Field13 = &v14 + } + if r.Intn(10) != 0 { + v15 := randStringThetest(r) + this.Field14 = &v15 + } + if r.Intn(10) != 0 { + v16 := r.Intn(100) + this.Field15 = make([]byte, v16) + for i := 0; i < v16; i++ { + this.Field15[i] = byte(r.Intn(256)) + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 16) + } + return this +} + +func NewPopulatedNidRepNative(r randyThetest, easy bool) *NidRepNative { + this := &NidRepNative{} + if r.Intn(10) != 0 { + v17 := r.Intn(10) + this.Field1 = make([]float64, v17) + for i := 0; i < v17; i++ { + this.Field1[i] = float64(r.Float64()) + if r.Intn(2) == 0 { + this.Field1[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v18 := r.Intn(10) + this.Field2 = make([]float32, v18) + for i := 0; i < v18; i++ { + this.Field2[i] = float32(r.Float32()) + if r.Intn(2) == 0 { + this.Field2[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v19 := r.Intn(10) + this.Field3 = make([]int32, v19) + for i := 0; i < v19; i++ { + this.Field3[i] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Field3[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v20 := r.Intn(10) + this.Field4 = make([]int64, v20) + for i := 0; i < v20; i++ { + this.Field4[i] = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Field4[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v21 := r.Intn(10) + this.Field5 = make([]uint32, v21) + for i := 0; i < v21; i++ { + this.Field5[i] = uint32(r.Uint32()) + } + } + if r.Intn(10) != 0 { + v22 := r.Intn(10) + this.Field6 = make([]uint64, v22) + for i := 0; i < v22; i++ { + this.Field6[i] = uint64(uint64(r.Uint32())) + } + } + if r.Intn(10) != 0 { + v23 := r.Intn(10) + this.Field7 = make([]int32, v23) + for i := 0; i < v23; i++ { + this.Field7[i] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Field7[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v24 := r.Intn(10) + this.Field8 = make([]int64, v24) + for i := 0; i < v24; i++ { + this.Field8[i] = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Field8[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v25 := r.Intn(10) + this.Field9 = make([]uint32, v25) + for i := 0; i < v25; i++ { + this.Field9[i] = uint32(r.Uint32()) + } + } + if r.Intn(10) != 0 { + v26 := r.Intn(10) + this.Field10 = make([]int32, v26) + for i := 0; i < v26; i++ { + this.Field10[i] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Field10[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v27 := r.Intn(10) + this.Field11 = make([]uint64, v27) + for i := 0; i < v27; i++ { + this.Field11[i] = uint64(uint64(r.Uint32())) + } + } + if r.Intn(10) != 0 { + v28 := r.Intn(10) + this.Field12 = make([]int64, v28) + for i := 0; i < v28; i++ { + this.Field12[i] = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Field12[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v29 := r.Intn(10) + this.Field13 = make([]bool, v29) + for i := 0; i < v29; i++ { + this.Field13[i] = bool(bool(r.Intn(2) == 0)) + } + } + if r.Intn(10) != 0 { + v30 := r.Intn(10) + this.Field14 = make([]string, v30) + for i := 0; i < v30; i++ { + this.Field14[i] = randStringThetest(r) + } + } + if r.Intn(10) != 0 { + v31 := r.Intn(10) + this.Field15 = make([][]byte, v31) + for i := 0; i < v31; i++ { + v32 := r.Intn(100) + this.Field15[i] = make([]byte, v32) + for j := 0; j < v32; j++ { + this.Field15[i][j] = byte(r.Intn(256)) + } + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 16) + } + return this +} + +func NewPopulatedNinRepNative(r randyThetest, easy bool) *NinRepNative { + this := &NinRepNative{} + if r.Intn(10) != 0 { + v33 := r.Intn(10) + this.Field1 = make([]float64, v33) + for i := 0; i < v33; i++ { + this.Field1[i] = float64(r.Float64()) + if r.Intn(2) == 0 { + this.Field1[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v34 := r.Intn(10) + this.Field2 = make([]float32, v34) + for i := 0; i < v34; i++ { + this.Field2[i] = float32(r.Float32()) + if r.Intn(2) == 0 { + this.Field2[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v35 := r.Intn(10) + this.Field3 = make([]int32, v35) + for i := 0; i < v35; i++ { + this.Field3[i] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Field3[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v36 := r.Intn(10) + this.Field4 = make([]int64, v36) + for i := 0; i < v36; i++ { + this.Field4[i] = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Field4[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v37 := r.Intn(10) + this.Field5 = make([]uint32, v37) + for i := 0; i < v37; i++ { + this.Field5[i] = uint32(r.Uint32()) + } + } + if r.Intn(10) != 0 { + v38 := r.Intn(10) + this.Field6 = make([]uint64, v38) + for i := 0; i < v38; i++ { + this.Field6[i] = uint64(uint64(r.Uint32())) + } + } + if r.Intn(10) != 0 { + v39 := r.Intn(10) + this.Field7 = make([]int32, v39) + for i := 0; i < v39; i++ { + this.Field7[i] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Field7[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v40 := r.Intn(10) + this.Field8 = make([]int64, v40) + for i := 0; i < v40; i++ { + this.Field8[i] = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Field8[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v41 := r.Intn(10) + this.Field9 = make([]uint32, v41) + for i := 0; i < v41; i++ { + this.Field9[i] = uint32(r.Uint32()) + } + } + if r.Intn(10) != 0 { + v42 := r.Intn(10) + this.Field10 = make([]int32, v42) + for i := 0; i < v42; i++ { + this.Field10[i] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Field10[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v43 := r.Intn(10) + this.Field11 = make([]uint64, v43) + for i := 0; i < v43; i++ { + this.Field11[i] = uint64(uint64(r.Uint32())) + } + } + if r.Intn(10) != 0 { + v44 := r.Intn(10) + this.Field12 = make([]int64, v44) + for i := 0; i < v44; i++ { + this.Field12[i] = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Field12[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v45 := r.Intn(10) + this.Field13 = make([]bool, v45) + for i := 0; i < v45; i++ { + this.Field13[i] = bool(bool(r.Intn(2) == 0)) + } + } + if r.Intn(10) != 0 { + v46 := r.Intn(10) + this.Field14 = make([]string, v46) + for i := 0; i < v46; i++ { + this.Field14[i] = randStringThetest(r) + } + } + if r.Intn(10) != 0 { + v47 := r.Intn(10) + this.Field15 = make([][]byte, v47) + for i := 0; i < v47; i++ { + v48 := r.Intn(100) + this.Field15[i] = make([]byte, v48) + for j := 0; j < v48; j++ { + this.Field15[i][j] = byte(r.Intn(256)) + } + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 16) + } + return this +} + +func NewPopulatedNidRepPackedNative(r randyThetest, easy bool) *NidRepPackedNative { + this := &NidRepPackedNative{} + if r.Intn(10) != 0 { + v49 := r.Intn(10) + this.Field1 = make([]float64, v49) + for i := 0; i < v49; i++ { + this.Field1[i] = float64(r.Float64()) + if r.Intn(2) == 0 { + this.Field1[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v50 := r.Intn(10) + this.Field2 = make([]float32, v50) + for i := 0; i < v50; i++ { + this.Field2[i] = float32(r.Float32()) + if r.Intn(2) == 0 { + this.Field2[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v51 := r.Intn(10) + this.Field3 = make([]int32, v51) + for i := 0; i < v51; i++ { + this.Field3[i] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Field3[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v52 := r.Intn(10) + this.Field4 = make([]int64, v52) + for i := 0; i < v52; i++ { + this.Field4[i] = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Field4[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v53 := r.Intn(10) + this.Field5 = make([]uint32, v53) + for i := 0; i < v53; i++ { + this.Field5[i] = uint32(r.Uint32()) + } + } + if r.Intn(10) != 0 { + v54 := r.Intn(10) + this.Field6 = make([]uint64, v54) + for i := 0; i < v54; i++ { + this.Field6[i] = uint64(uint64(r.Uint32())) + } + } + if r.Intn(10) != 0 { + v55 := r.Intn(10) + this.Field7 = make([]int32, v55) + for i := 0; i < v55; i++ { + this.Field7[i] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Field7[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v56 := r.Intn(10) + this.Field8 = make([]int64, v56) + for i := 0; i < v56; i++ { + this.Field8[i] = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Field8[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v57 := r.Intn(10) + this.Field9 = make([]uint32, v57) + for i := 0; i < v57; i++ { + this.Field9[i] = uint32(r.Uint32()) + } + } + if r.Intn(10) != 0 { + v58 := r.Intn(10) + this.Field10 = make([]int32, v58) + for i := 0; i < v58; i++ { + this.Field10[i] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Field10[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v59 := r.Intn(10) + this.Field11 = make([]uint64, v59) + for i := 0; i < v59; i++ { + this.Field11[i] = uint64(uint64(r.Uint32())) + } + } + if r.Intn(10) != 0 { + v60 := r.Intn(10) + this.Field12 = make([]int64, v60) + for i := 0; i < v60; i++ { + this.Field12[i] = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Field12[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v61 := r.Intn(10) + this.Field13 = make([]bool, v61) + for i := 0; i < v61; i++ { + this.Field13[i] = bool(bool(r.Intn(2) == 0)) + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 14) + } + return this +} + +func NewPopulatedNinRepPackedNative(r randyThetest, easy bool) *NinRepPackedNative { + this := &NinRepPackedNative{} + if r.Intn(10) != 0 { + v62 := r.Intn(10) + this.Field1 = make([]float64, v62) + for i := 0; i < v62; i++ { + this.Field1[i] = float64(r.Float64()) + if r.Intn(2) == 0 { + this.Field1[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v63 := r.Intn(10) + this.Field2 = make([]float32, v63) + for i := 0; i < v63; i++ { + this.Field2[i] = float32(r.Float32()) + if r.Intn(2) == 0 { + this.Field2[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v64 := r.Intn(10) + this.Field3 = make([]int32, v64) + for i := 0; i < v64; i++ { + this.Field3[i] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Field3[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v65 := r.Intn(10) + this.Field4 = make([]int64, v65) + for i := 0; i < v65; i++ { + this.Field4[i] = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Field4[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v66 := r.Intn(10) + this.Field5 = make([]uint32, v66) + for i := 0; i < v66; i++ { + this.Field5[i] = uint32(r.Uint32()) + } + } + if r.Intn(10) != 0 { + v67 := r.Intn(10) + this.Field6 = make([]uint64, v67) + for i := 0; i < v67; i++ { + this.Field6[i] = uint64(uint64(r.Uint32())) + } + } + if r.Intn(10) != 0 { + v68 := r.Intn(10) + this.Field7 = make([]int32, v68) + for i := 0; i < v68; i++ { + this.Field7[i] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Field7[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v69 := r.Intn(10) + this.Field8 = make([]int64, v69) + for i := 0; i < v69; i++ { + this.Field8[i] = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Field8[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v70 := r.Intn(10) + this.Field9 = make([]uint32, v70) + for i := 0; i < v70; i++ { + this.Field9[i] = uint32(r.Uint32()) + } + } + if r.Intn(10) != 0 { + v71 := r.Intn(10) + this.Field10 = make([]int32, v71) + for i := 0; i < v71; i++ { + this.Field10[i] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Field10[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v72 := r.Intn(10) + this.Field11 = make([]uint64, v72) + for i := 0; i < v72; i++ { + this.Field11[i] = uint64(uint64(r.Uint32())) + } + } + if r.Intn(10) != 0 { + v73 := r.Intn(10) + this.Field12 = make([]int64, v73) + for i := 0; i < v73; i++ { + this.Field12[i] = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Field12[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v74 := r.Intn(10) + this.Field13 = make([]bool, v74) + for i := 0; i < v74; i++ { + this.Field13[i] = bool(bool(r.Intn(2) == 0)) + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 14) + } + return this +} + +func NewPopulatedNidOptStruct(r randyThetest, easy bool) *NidOptStruct { + this := &NidOptStruct{} + this.Field1 = float64(r.Float64()) + if r.Intn(2) == 0 { + this.Field1 *= -1 + } + this.Field2 = float32(r.Float32()) + if r.Intn(2) == 0 { + this.Field2 *= -1 + } + v75 := NewPopulatedNidOptNative(r, easy) + this.Field3 = *v75 + v76 := NewPopulatedNinOptNative(r, easy) + this.Field4 = *v76 + this.Field6 = uint64(uint64(r.Uint32())) + this.Field7 = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Field7 *= -1 + } + v77 := NewPopulatedNidOptNative(r, easy) + this.Field8 = *v77 + this.Field13 = bool(bool(r.Intn(2) == 0)) + this.Field14 = randStringThetest(r) + v78 := r.Intn(100) + this.Field15 = make([]byte, v78) + for i := 0; i < v78; i++ { + this.Field15[i] = byte(r.Intn(256)) + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 16) + } + return this +} + +func NewPopulatedNinOptStruct(r randyThetest, easy bool) *NinOptStruct { + this := &NinOptStruct{} + if r.Intn(10) != 0 { + v79 := float64(r.Float64()) + if r.Intn(2) == 0 { + v79 *= -1 + } + this.Field1 = &v79 + } + if r.Intn(10) != 0 { + v80 := float32(r.Float32()) + if r.Intn(2) == 0 { + v80 *= -1 + } + this.Field2 = &v80 + } + if r.Intn(10) != 0 { + this.Field3 = NewPopulatedNidOptNative(r, easy) + } + if r.Intn(10) != 0 { + this.Field4 = NewPopulatedNinOptNative(r, easy) + } + if r.Intn(10) != 0 { + v81 := uint64(uint64(r.Uint32())) + this.Field6 = &v81 + } + if r.Intn(10) != 0 { + v82 := int32(r.Int31()) + if r.Intn(2) == 0 { + v82 *= -1 + } + this.Field7 = &v82 + } + if r.Intn(10) != 0 { + this.Field8 = NewPopulatedNidOptNative(r, easy) + } + if r.Intn(10) != 0 { + v83 := bool(bool(r.Intn(2) == 0)) + this.Field13 = &v83 + } + if r.Intn(10) != 0 { + v84 := randStringThetest(r) + this.Field14 = &v84 + } + if r.Intn(10) != 0 { + v85 := r.Intn(100) + this.Field15 = make([]byte, v85) + for i := 0; i < v85; i++ { + this.Field15[i] = byte(r.Intn(256)) + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 16) + } + return this +} + +func NewPopulatedNidRepStruct(r randyThetest, easy bool) *NidRepStruct { + this := &NidRepStruct{} + if r.Intn(10) != 0 { + v86 := r.Intn(10) + this.Field1 = make([]float64, v86) + for i := 0; i < v86; i++ { + this.Field1[i] = float64(r.Float64()) + if r.Intn(2) == 0 { + this.Field1[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v87 := r.Intn(10) + this.Field2 = make([]float32, v87) + for i := 0; i < v87; i++ { + this.Field2[i] = float32(r.Float32()) + if r.Intn(2) == 0 { + this.Field2[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v88 := r.Intn(5) + this.Field3 = make([]NidOptNative, v88) + for i := 0; i < v88; i++ { + v89 := NewPopulatedNidOptNative(r, easy) + this.Field3[i] = *v89 + } + } + if r.Intn(10) != 0 { + v90 := r.Intn(5) + this.Field4 = make([]NinOptNative, v90) + for i := 0; i < v90; i++ { + v91 := NewPopulatedNinOptNative(r, easy) + this.Field4[i] = *v91 + } + } + if r.Intn(10) != 0 { + v92 := r.Intn(10) + this.Field6 = make([]uint64, v92) + for i := 0; i < v92; i++ { + this.Field6[i] = uint64(uint64(r.Uint32())) + } + } + if r.Intn(10) != 0 { + v93 := r.Intn(10) + this.Field7 = make([]int32, v93) + for i := 0; i < v93; i++ { + this.Field7[i] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Field7[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v94 := r.Intn(5) + this.Field8 = make([]NidOptNative, v94) + for i := 0; i < v94; i++ { + v95 := NewPopulatedNidOptNative(r, easy) + this.Field8[i] = *v95 + } + } + if r.Intn(10) != 0 { + v96 := r.Intn(10) + this.Field13 = make([]bool, v96) + for i := 0; i < v96; i++ { + this.Field13[i] = bool(bool(r.Intn(2) == 0)) + } + } + if r.Intn(10) != 0 { + v97 := r.Intn(10) + this.Field14 = make([]string, v97) + for i := 0; i < v97; i++ { + this.Field14[i] = randStringThetest(r) + } + } + if r.Intn(10) != 0 { + v98 := r.Intn(10) + this.Field15 = make([][]byte, v98) + for i := 0; i < v98; i++ { + v99 := r.Intn(100) + this.Field15[i] = make([]byte, v99) + for j := 0; j < v99; j++ { + this.Field15[i][j] = byte(r.Intn(256)) + } + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 16) + } + return this +} + +func NewPopulatedNinRepStruct(r randyThetest, easy bool) *NinRepStruct { + this := &NinRepStruct{} + if r.Intn(10) != 0 { + v100 := r.Intn(10) + this.Field1 = make([]float64, v100) + for i := 0; i < v100; i++ { + this.Field1[i] = float64(r.Float64()) + if r.Intn(2) == 0 { + this.Field1[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v101 := r.Intn(10) + this.Field2 = make([]float32, v101) + for i := 0; i < v101; i++ { + this.Field2[i] = float32(r.Float32()) + if r.Intn(2) == 0 { + this.Field2[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v102 := r.Intn(5) + this.Field3 = make([]*NidOptNative, v102) + for i := 0; i < v102; i++ { + this.Field3[i] = NewPopulatedNidOptNative(r, easy) + } + } + if r.Intn(10) != 0 { + v103 := r.Intn(5) + this.Field4 = make([]*NinOptNative, v103) + for i := 0; i < v103; i++ { + this.Field4[i] = NewPopulatedNinOptNative(r, easy) + } + } + if r.Intn(10) != 0 { + v104 := r.Intn(10) + this.Field6 = make([]uint64, v104) + for i := 0; i < v104; i++ { + this.Field6[i] = uint64(uint64(r.Uint32())) + } + } + if r.Intn(10) != 0 { + v105 := r.Intn(10) + this.Field7 = make([]int32, v105) + for i := 0; i < v105; i++ { + this.Field7[i] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Field7[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v106 := r.Intn(5) + this.Field8 = make([]*NidOptNative, v106) + for i := 0; i < v106; i++ { + this.Field8[i] = NewPopulatedNidOptNative(r, easy) + } + } + if r.Intn(10) != 0 { + v107 := r.Intn(10) + this.Field13 = make([]bool, v107) + for i := 0; i < v107; i++ { + this.Field13[i] = bool(bool(r.Intn(2) == 0)) + } + } + if r.Intn(10) != 0 { + v108 := r.Intn(10) + this.Field14 = make([]string, v108) + for i := 0; i < v108; i++ { + this.Field14[i] = randStringThetest(r) + } + } + if r.Intn(10) != 0 { + v109 := r.Intn(10) + this.Field15 = make([][]byte, v109) + for i := 0; i < v109; i++ { + v110 := r.Intn(100) + this.Field15[i] = make([]byte, v110) + for j := 0; j < v110; j++ { + this.Field15[i][j] = byte(r.Intn(256)) + } + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 16) + } + return this +} + +func NewPopulatedNidEmbeddedStruct(r randyThetest, easy bool) *NidEmbeddedStruct { + this := &NidEmbeddedStruct{} + if r.Intn(10) != 0 { + this.NidOptNative = NewPopulatedNidOptNative(r, easy) + } + v111 := NewPopulatedNidOptNative(r, easy) + this.Field200 = *v111 + this.Field210 = bool(bool(r.Intn(2) == 0)) + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 211) + } + return this +} + +func NewPopulatedNinEmbeddedStruct(r randyThetest, easy bool) *NinEmbeddedStruct { + this := &NinEmbeddedStruct{} + if r.Intn(10) != 0 { + this.NidOptNative = NewPopulatedNidOptNative(r, easy) + } + if r.Intn(10) != 0 { + this.Field200 = NewPopulatedNidOptNative(r, easy) + } + if r.Intn(10) != 0 { + v112 := bool(bool(r.Intn(2) == 0)) + this.Field210 = &v112 + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 211) + } + return this +} + +func NewPopulatedNidNestedStruct(r randyThetest, easy bool) *NidNestedStruct { + this := &NidNestedStruct{} + v113 := NewPopulatedNidOptStruct(r, easy) + this.Field1 = *v113 + if r.Intn(10) != 0 { + v114 := r.Intn(5) + this.Field2 = make([]NidRepStruct, v114) + for i := 0; i < v114; i++ { + v115 := NewPopulatedNidRepStruct(r, easy) + this.Field2[i] = *v115 + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 3) + } + return this +} + +func NewPopulatedNinNestedStruct(r randyThetest, easy bool) *NinNestedStruct { + this := &NinNestedStruct{} + if r.Intn(10) != 0 { + this.Field1 = NewPopulatedNinOptStruct(r, easy) + } + if r.Intn(10) != 0 { + v116 := r.Intn(5) + this.Field2 = make([]*NinRepStruct, v116) + for i := 0; i < v116; i++ { + this.Field2[i] = NewPopulatedNinRepStruct(r, easy) + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 3) + } + return this +} + +func NewPopulatedNidOptCustom(r randyThetest, easy bool) *NidOptCustom { + this := &NidOptCustom{} + v117 := NewPopulatedUuid(r) + this.Id = *v117 + v118 := github_com_gogo_protobuf_test_custom.NewPopulatedUint128(r) + this.Value = *v118 + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 3) + } + return this +} + +func NewPopulatedCustomDash(r randyThetest, easy bool) *CustomDash { + this := &CustomDash{} + if r.Intn(10) != 0 { + this.Value = github_com_gogo_protobuf_test_custom_dash_type.NewPopulatedBytes(r) + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 2) + } + return this +} + +func NewPopulatedNinOptCustom(r randyThetest, easy bool) *NinOptCustom { + this := &NinOptCustom{} + if r.Intn(10) != 0 { + this.Id = NewPopulatedUuid(r) + } + if r.Intn(10) != 0 { + this.Value = github_com_gogo_protobuf_test_custom.NewPopulatedUint128(r) + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 3) + } + return this +} + +func NewPopulatedNidRepCustom(r randyThetest, easy bool) *NidRepCustom { + this := &NidRepCustom{} + if r.Intn(10) != 0 { + v119 := r.Intn(10) + this.Id = make([]Uuid, v119) + for i := 0; i < v119; i++ { + v120 := NewPopulatedUuid(r) + this.Id[i] = *v120 + } + } + if r.Intn(10) != 0 { + v121 := r.Intn(10) + this.Value = make([]github_com_gogo_protobuf_test_custom.Uint128, v121) + for i := 0; i < v121; i++ { + v122 := github_com_gogo_protobuf_test_custom.NewPopulatedUint128(r) + this.Value[i] = *v122 + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 3) + } + return this +} + +func NewPopulatedNinRepCustom(r randyThetest, easy bool) *NinRepCustom { + this := &NinRepCustom{} + if r.Intn(10) != 0 { + v123 := r.Intn(10) + this.Id = make([]Uuid, v123) + for i := 0; i < v123; i++ { + v124 := NewPopulatedUuid(r) + this.Id[i] = *v124 + } + } + if r.Intn(10) != 0 { + v125 := r.Intn(10) + this.Value = make([]github_com_gogo_protobuf_test_custom.Uint128, v125) + for i := 0; i < v125; i++ { + v126 := github_com_gogo_protobuf_test_custom.NewPopulatedUint128(r) + this.Value[i] = *v126 + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 3) + } + return this +} + +func NewPopulatedNinOptNativeUnion(r randyThetest, easy bool) *NinOptNativeUnion { + this := &NinOptNativeUnion{} + fieldNum := r.Intn(9) + switch fieldNum { + case 0: + v127 := float64(r.Float64()) + if r.Intn(2) == 0 { + v127 *= -1 + } + this.Field1 = &v127 + case 1: + v128 := float32(r.Float32()) + if r.Intn(2) == 0 { + v128 *= -1 + } + this.Field2 = &v128 + case 2: + v129 := int32(r.Int31()) + if r.Intn(2) == 0 { + v129 *= -1 + } + this.Field3 = &v129 + case 3: + v130 := int64(r.Int63()) + if r.Intn(2) == 0 { + v130 *= -1 + } + this.Field4 = &v130 + case 4: + v131 := uint32(r.Uint32()) + this.Field5 = &v131 + case 5: + v132 := uint64(uint64(r.Uint32())) + this.Field6 = &v132 + case 6: + v133 := bool(bool(r.Intn(2) == 0)) + this.Field13 = &v133 + case 7: + v134 := randStringThetest(r) + this.Field14 = &v134 + case 8: + v135 := r.Intn(100) + this.Field15 = make([]byte, v135) + for i := 0; i < v135; i++ { + this.Field15[i] = byte(r.Intn(256)) + } + } + return this +} + +func NewPopulatedNinOptStructUnion(r randyThetest, easy bool) *NinOptStructUnion { + this := &NinOptStructUnion{} + fieldNum := r.Intn(9) + switch fieldNum { + case 0: + v136 := float64(r.Float64()) + if r.Intn(2) == 0 { + v136 *= -1 + } + this.Field1 = &v136 + case 1: + v137 := float32(r.Float32()) + if r.Intn(2) == 0 { + v137 *= -1 + } + this.Field2 = &v137 + case 2: + this.Field3 = NewPopulatedNidOptNative(r, easy) + case 3: + this.Field4 = NewPopulatedNinOptNative(r, easy) + case 4: + v138 := uint64(uint64(r.Uint32())) + this.Field6 = &v138 + case 5: + v139 := int32(r.Int31()) + if r.Intn(2) == 0 { + v139 *= -1 + } + this.Field7 = &v139 + case 6: + v140 := bool(bool(r.Intn(2) == 0)) + this.Field13 = &v140 + case 7: + v141 := randStringThetest(r) + this.Field14 = &v141 + case 8: + v142 := r.Intn(100) + this.Field15 = make([]byte, v142) + for i := 0; i < v142; i++ { + this.Field15[i] = byte(r.Intn(256)) + } + } + return this +} + +func NewPopulatedNinEmbeddedStructUnion(r randyThetest, easy bool) *NinEmbeddedStructUnion { + this := &NinEmbeddedStructUnion{} + fieldNum := r.Intn(3) + switch fieldNum { + case 0: + this.NidOptNative = NewPopulatedNidOptNative(r, easy) + case 1: + this.Field200 = NewPopulatedNinOptNative(r, easy) + case 2: + v143 := bool(bool(r.Intn(2) == 0)) + this.Field210 = &v143 + } + return this +} + +func NewPopulatedNinNestedStructUnion(r randyThetest, easy bool) *NinNestedStructUnion { + this := &NinNestedStructUnion{} + fieldNum := r.Intn(3) + switch fieldNum { + case 0: + this.Field1 = NewPopulatedNinOptNativeUnion(r, easy) + case 1: + this.Field2 = NewPopulatedNinOptStructUnion(r, easy) + case 2: + this.Field3 = NewPopulatedNinEmbeddedStructUnion(r, easy) + } + return this +} + +func NewPopulatedTree(r randyThetest, easy bool) *Tree { + this := &Tree{} + fieldNum := r.Intn(102) + switch fieldNum { + case 0: + this.Or = NewPopulatedOrBranch(r, easy) + case 1: + this.And = NewPopulatedAndBranch(r, easy) + case 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101: + this.Leaf = NewPopulatedLeaf(r, easy) + } + return this +} + +func NewPopulatedOrBranch(r randyThetest, easy bool) *OrBranch { + this := &OrBranch{} + v144 := NewPopulatedTree(r, easy) + this.Left = *v144 + v145 := NewPopulatedTree(r, easy) + this.Right = *v145 + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 3) + } + return this +} + +func NewPopulatedAndBranch(r randyThetest, easy bool) *AndBranch { + this := &AndBranch{} + v146 := NewPopulatedTree(r, easy) + this.Left = *v146 + v147 := NewPopulatedTree(r, easy) + this.Right = *v147 + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 3) + } + return this +} + +func NewPopulatedLeaf(r randyThetest, easy bool) *Leaf { + this := &Leaf{} + this.Value = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Value *= -1 + } + this.StrValue = randStringThetest(r) + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 3) + } + return this +} + +func NewPopulatedDeepTree(r randyThetest, easy bool) *DeepTree { + this := &DeepTree{} + fieldNum := r.Intn(102) + switch fieldNum { + case 0: + this.Down = NewPopulatedADeepBranch(r, easy) + case 1: + this.And = NewPopulatedAndDeepBranch(r, easy) + case 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101: + this.Leaf = NewPopulatedDeepLeaf(r, easy) + } + return this +} + +func NewPopulatedADeepBranch(r randyThetest, easy bool) *ADeepBranch { + this := &ADeepBranch{} + v148 := NewPopulatedDeepTree(r, easy) + this.Down = *v148 + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 3) + } + return this +} + +func NewPopulatedAndDeepBranch(r randyThetest, easy bool) *AndDeepBranch { + this := &AndDeepBranch{} + v149 := NewPopulatedDeepTree(r, easy) + this.Left = *v149 + v150 := NewPopulatedDeepTree(r, easy) + this.Right = *v150 + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 3) + } + return this +} + +func NewPopulatedDeepLeaf(r randyThetest, easy bool) *DeepLeaf { + this := &DeepLeaf{} + v151 := NewPopulatedTree(r, easy) + this.Tree = *v151 + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 2) + } + return this +} + +func NewPopulatedNil(r randyThetest, easy bool) *Nil { + this := &Nil{} + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 1) + } + return this +} + +func NewPopulatedNidOptEnum(r randyThetest, easy bool) *NidOptEnum { + this := &NidOptEnum{} + this.Field1 = TheTestEnum([]int32{0, 1, 2}[r.Intn(3)]) + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 2) + } + return this +} + +func NewPopulatedNinOptEnum(r randyThetest, easy bool) *NinOptEnum { + this := &NinOptEnum{} + if r.Intn(10) != 0 { + v152 := TheTestEnum([]int32{0, 1, 2}[r.Intn(3)]) + this.Field1 = &v152 + } + if r.Intn(10) != 0 { + v153 := YetAnotherTestEnum([]int32{0, 1}[r.Intn(2)]) + this.Field2 = &v153 + } + if r.Intn(10) != 0 { + v154 := YetYetAnotherTestEnum([]int32{0, 1}[r.Intn(2)]) + this.Field3 = &v154 + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 4) + } + return this +} + +func NewPopulatedNidRepEnum(r randyThetest, easy bool) *NidRepEnum { + this := &NidRepEnum{} + if r.Intn(10) != 0 { + v155 := r.Intn(10) + this.Field1 = make([]TheTestEnum, v155) + for i := 0; i < v155; i++ { + this.Field1[i] = TheTestEnum([]int32{0, 1, 2}[r.Intn(3)]) + } + } + if r.Intn(10) != 0 { + v156 := r.Intn(10) + this.Field2 = make([]YetAnotherTestEnum, v156) + for i := 0; i < v156; i++ { + this.Field2[i] = YetAnotherTestEnum([]int32{0, 1}[r.Intn(2)]) + } + } + if r.Intn(10) != 0 { + v157 := r.Intn(10) + this.Field3 = make([]YetYetAnotherTestEnum, v157) + for i := 0; i < v157; i++ { + this.Field3[i] = YetYetAnotherTestEnum([]int32{0, 1}[r.Intn(2)]) + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 4) + } + return this +} + +func NewPopulatedNinRepEnum(r randyThetest, easy bool) *NinRepEnum { + this := &NinRepEnum{} + if r.Intn(10) != 0 { + v158 := r.Intn(10) + this.Field1 = make([]TheTestEnum, v158) + for i := 0; i < v158; i++ { + this.Field1[i] = TheTestEnum([]int32{0, 1, 2}[r.Intn(3)]) + } + } + if r.Intn(10) != 0 { + v159 := r.Intn(10) + this.Field2 = make([]YetAnotherTestEnum, v159) + for i := 0; i < v159; i++ { + this.Field2[i] = YetAnotherTestEnum([]int32{0, 1}[r.Intn(2)]) + } + } + if r.Intn(10) != 0 { + v160 := r.Intn(10) + this.Field3 = make([]YetYetAnotherTestEnum, v160) + for i := 0; i < v160; i++ { + this.Field3[i] = YetYetAnotherTestEnum([]int32{0, 1}[r.Intn(2)]) + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 4) + } + return this +} + +func NewPopulatedNinOptEnumDefault(r randyThetest, easy bool) *NinOptEnumDefault { + this := &NinOptEnumDefault{} + if r.Intn(10) != 0 { + v161 := TheTestEnum([]int32{0, 1, 2}[r.Intn(3)]) + this.Field1 = &v161 + } + if r.Intn(10) != 0 { + v162 := YetAnotherTestEnum([]int32{0, 1}[r.Intn(2)]) + this.Field2 = &v162 + } + if r.Intn(10) != 0 { + v163 := YetYetAnotherTestEnum([]int32{0, 1}[r.Intn(2)]) + this.Field3 = &v163 + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 4) + } + return this +} + +func NewPopulatedAnotherNinOptEnum(r randyThetest, easy bool) *AnotherNinOptEnum { + this := &AnotherNinOptEnum{} + if r.Intn(10) != 0 { + v164 := AnotherTestEnum([]int32{10, 11}[r.Intn(2)]) + this.Field1 = &v164 + } + if r.Intn(10) != 0 { + v165 := YetAnotherTestEnum([]int32{0, 1}[r.Intn(2)]) + this.Field2 = &v165 + } + if r.Intn(10) != 0 { + v166 := YetYetAnotherTestEnum([]int32{0, 1}[r.Intn(2)]) + this.Field3 = &v166 + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 4) + } + return this +} + +func NewPopulatedAnotherNinOptEnumDefault(r randyThetest, easy bool) *AnotherNinOptEnumDefault { + this := &AnotherNinOptEnumDefault{} + if r.Intn(10) != 0 { + v167 := AnotherTestEnum([]int32{10, 11}[r.Intn(2)]) + this.Field1 = &v167 + } + if r.Intn(10) != 0 { + v168 := YetAnotherTestEnum([]int32{0, 1}[r.Intn(2)]) + this.Field2 = &v168 + } + if r.Intn(10) != 0 { + v169 := YetYetAnotherTestEnum([]int32{0, 1}[r.Intn(2)]) + this.Field3 = &v169 + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 4) + } + return this +} + +func NewPopulatedTimer(r randyThetest, easy bool) *Timer { + this := &Timer{} + this.Time1 = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Time1 *= -1 + } + this.Time2 = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Time2 *= -1 + } + v170 := r.Intn(100) + this.Data = make([]byte, v170) + for i := 0; i < v170; i++ { + this.Data[i] = byte(r.Intn(256)) + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 4) + } + return this +} + +func NewPopulatedMyExtendable(r randyThetest, easy bool) *MyExtendable { + this := &MyExtendable{} + if r.Intn(10) != 0 { + v171 := int64(r.Int63()) + if r.Intn(2) == 0 { + v171 *= -1 + } + this.Field1 = &v171 + } + if !easy && r.Intn(10) != 0 { + l := r.Intn(5) + for i := 0; i < l; i++ { + fieldNumber := r.Intn(100) + 100 + wire := r.Intn(4) + if wire == 3 { + wire = 5 + } + data := randFieldThetest(nil, r, fieldNumber, wire) + github_com_gogo_protobuf_proto.SetRawExtension(this, int32(fieldNumber), data) + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 201) + } + return this +} + +func NewPopulatedOtherExtenable(r randyThetest, easy bool) *OtherExtenable { + this := &OtherExtenable{} + if r.Intn(10) != 0 { + v172 := int64(r.Int63()) + if r.Intn(2) == 0 { + v172 *= -1 + } + this.Field2 = &v172 + } + if r.Intn(10) != 0 { + v173 := int64(r.Int63()) + if r.Intn(2) == 0 { + v173 *= -1 + } + this.Field13 = &v173 + } + if r.Intn(10) != 0 { + this.M = NewPopulatedMyExtendable(r, easy) + } + if !easy && r.Intn(10) != 0 { + l := r.Intn(5) + for i := 0; i < l; i++ { + eIndex := r.Intn(2) + fieldNumber := 0 + switch eIndex { + case 0: + fieldNumber = r.Intn(3) + 14 + case 1: + fieldNumber = r.Intn(3) + 10 + } + wire := r.Intn(4) + if wire == 3 { + wire = 5 + } + data := randFieldThetest(nil, r, fieldNumber, wire) + github_com_gogo_protobuf_proto.SetRawExtension(this, int32(fieldNumber), data) + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 18) + } + return this +} + +func NewPopulatedNestedDefinition(r randyThetest, easy bool) *NestedDefinition { + this := &NestedDefinition{} + if r.Intn(10) != 0 { + v174 := int64(r.Int63()) + if r.Intn(2) == 0 { + v174 *= -1 + } + this.Field1 = &v174 + } + if r.Intn(10) != 0 { + v175 := NestedDefinition_NestedEnum([]int32{1}[r.Intn(1)]) + this.EnumField = &v175 + } + if r.Intn(10) != 0 { + this.NNM = NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(r, easy) + } + if r.Intn(10) != 0 { + this.NM = NewPopulatedNestedDefinition_NestedMessage(r, easy) + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 5) + } + return this +} + +func NewPopulatedNestedDefinition_NestedMessage(r randyThetest, easy bool) *NestedDefinition_NestedMessage { + this := &NestedDefinition_NestedMessage{} + if r.Intn(10) != 0 { + v176 := uint64(uint64(r.Uint32())) + this.NestedField1 = &v176 + } + if r.Intn(10) != 0 { + this.NNM = NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(r, easy) + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 3) + } + return this +} + +func NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(r randyThetest, easy bool) *NestedDefinition_NestedMessage_NestedNestedMsg { + this := &NestedDefinition_NestedMessage_NestedNestedMsg{} + if r.Intn(10) != 0 { + v177 := randStringThetest(r) + this.NestedNestedField1 = &v177 + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 11) + } + return this +} + +func NewPopulatedNestedScope(r randyThetest, easy bool) *NestedScope { + this := &NestedScope{} + if r.Intn(10) != 0 { + this.A = NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(r, easy) + } + if r.Intn(10) != 0 { + v178 := NestedDefinition_NestedEnum([]int32{1}[r.Intn(1)]) + this.B = &v178 + } + if r.Intn(10) != 0 { + this.C = NewPopulatedNestedDefinition_NestedMessage(r, easy) + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 4) + } + return this +} + +func NewPopulatedNinOptNativeDefault(r randyThetest, easy bool) *NinOptNativeDefault { + this := &NinOptNativeDefault{} + if r.Intn(10) != 0 { + v179 := float64(r.Float64()) + if r.Intn(2) == 0 { + v179 *= -1 + } + this.Field1 = &v179 + } + if r.Intn(10) != 0 { + v180 := float32(r.Float32()) + if r.Intn(2) == 0 { + v180 *= -1 + } + this.Field2 = &v180 + } + if r.Intn(10) != 0 { + v181 := int32(r.Int31()) + if r.Intn(2) == 0 { + v181 *= -1 + } + this.Field3 = &v181 + } + if r.Intn(10) != 0 { + v182 := int64(r.Int63()) + if r.Intn(2) == 0 { + v182 *= -1 + } + this.Field4 = &v182 + } + if r.Intn(10) != 0 { + v183 := uint32(r.Uint32()) + this.Field5 = &v183 + } + if r.Intn(10) != 0 { + v184 := uint64(uint64(r.Uint32())) + this.Field6 = &v184 + } + if r.Intn(10) != 0 { + v185 := int32(r.Int31()) + if r.Intn(2) == 0 { + v185 *= -1 + } + this.Field7 = &v185 + } + if r.Intn(10) != 0 { + v186 := int64(r.Int63()) + if r.Intn(2) == 0 { + v186 *= -1 + } + this.Field8 = &v186 + } + if r.Intn(10) != 0 { + v187 := uint32(r.Uint32()) + this.Field9 = &v187 + } + if r.Intn(10) != 0 { + v188 := int32(r.Int31()) + if r.Intn(2) == 0 { + v188 *= -1 + } + this.Field10 = &v188 + } + if r.Intn(10) != 0 { + v189 := uint64(uint64(r.Uint32())) + this.Field11 = &v189 + } + if r.Intn(10) != 0 { + v190 := int64(r.Int63()) + if r.Intn(2) == 0 { + v190 *= -1 + } + this.Field12 = &v190 + } + if r.Intn(10) != 0 { + v191 := bool(bool(r.Intn(2) == 0)) + this.Field13 = &v191 + } + if r.Intn(10) != 0 { + v192 := randStringThetest(r) + this.Field14 = &v192 + } + if r.Intn(10) != 0 { + v193 := r.Intn(100) + this.Field15 = make([]byte, v193) + for i := 0; i < v193; i++ { + this.Field15[i] = byte(r.Intn(256)) + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 16) + } + return this +} + +func NewPopulatedCustomContainer(r randyThetest, easy bool) *CustomContainer { + this := &CustomContainer{} + v194 := NewPopulatedNidOptCustom(r, easy) + this.CustomStruct = *v194 + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 2) + } + return this +} + +func NewPopulatedCustomNameNidOptNative(r randyThetest, easy bool) *CustomNameNidOptNative { + this := &CustomNameNidOptNative{} + this.FieldA = float64(r.Float64()) + if r.Intn(2) == 0 { + this.FieldA *= -1 + } + this.FieldB = float32(r.Float32()) + if r.Intn(2) == 0 { + this.FieldB *= -1 + } + this.FieldC = int32(r.Int31()) + if r.Intn(2) == 0 { + this.FieldC *= -1 + } + this.FieldD = int64(r.Int63()) + if r.Intn(2) == 0 { + this.FieldD *= -1 + } + this.FieldE = uint32(r.Uint32()) + this.FieldF = uint64(uint64(r.Uint32())) + this.FieldG = int32(r.Int31()) + if r.Intn(2) == 0 { + this.FieldG *= -1 + } + this.FieldH = int64(r.Int63()) + if r.Intn(2) == 0 { + this.FieldH *= -1 + } + this.FieldI = uint32(r.Uint32()) + this.FieldJ = int32(r.Int31()) + if r.Intn(2) == 0 { + this.FieldJ *= -1 + } + this.FieldK = uint64(uint64(r.Uint32())) + this.FieldL = int64(r.Int63()) + if r.Intn(2) == 0 { + this.FieldL *= -1 + } + this.FieldM = bool(bool(r.Intn(2) == 0)) + this.FieldN = randStringThetest(r) + v195 := r.Intn(100) + this.FieldO = make([]byte, v195) + for i := 0; i < v195; i++ { + this.FieldO[i] = byte(r.Intn(256)) + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 16) + } + return this +} + +func NewPopulatedCustomNameNinOptNative(r randyThetest, easy bool) *CustomNameNinOptNative { + this := &CustomNameNinOptNative{} + if r.Intn(10) != 0 { + v196 := float64(r.Float64()) + if r.Intn(2) == 0 { + v196 *= -1 + } + this.FieldA = &v196 + } + if r.Intn(10) != 0 { + v197 := float32(r.Float32()) + if r.Intn(2) == 0 { + v197 *= -1 + } + this.FieldB = &v197 + } + if r.Intn(10) != 0 { + v198 := int32(r.Int31()) + if r.Intn(2) == 0 { + v198 *= -1 + } + this.FieldC = &v198 + } + if r.Intn(10) != 0 { + v199 := int64(r.Int63()) + if r.Intn(2) == 0 { + v199 *= -1 + } + this.FieldD = &v199 + } + if r.Intn(10) != 0 { + v200 := uint32(r.Uint32()) + this.FieldE = &v200 + } + if r.Intn(10) != 0 { + v201 := uint64(uint64(r.Uint32())) + this.FieldF = &v201 + } + if r.Intn(10) != 0 { + v202 := int32(r.Int31()) + if r.Intn(2) == 0 { + v202 *= -1 + } + this.FieldG = &v202 + } + if r.Intn(10) != 0 { + v203 := int64(r.Int63()) + if r.Intn(2) == 0 { + v203 *= -1 + } + this.FieldH = &v203 + } + if r.Intn(10) != 0 { + v204 := uint32(r.Uint32()) + this.FieldI = &v204 + } + if r.Intn(10) != 0 { + v205 := int32(r.Int31()) + if r.Intn(2) == 0 { + v205 *= -1 + } + this.FieldJ = &v205 + } + if r.Intn(10) != 0 { + v206 := uint64(uint64(r.Uint32())) + this.FieldK = &v206 + } + if r.Intn(10) != 0 { + v207 := int64(r.Int63()) + if r.Intn(2) == 0 { + v207 *= -1 + } + this.FielL = &v207 + } + if r.Intn(10) != 0 { + v208 := bool(bool(r.Intn(2) == 0)) + this.FieldM = &v208 + } + if r.Intn(10) != 0 { + v209 := randStringThetest(r) + this.FieldN = &v209 + } + if r.Intn(10) != 0 { + v210 := r.Intn(100) + this.FieldO = make([]byte, v210) + for i := 0; i < v210; i++ { + this.FieldO[i] = byte(r.Intn(256)) + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 16) + } + return this +} + +func NewPopulatedCustomNameNinRepNative(r randyThetest, easy bool) *CustomNameNinRepNative { + this := &CustomNameNinRepNative{} + if r.Intn(10) != 0 { + v211 := r.Intn(10) + this.FieldA = make([]float64, v211) + for i := 0; i < v211; i++ { + this.FieldA[i] = float64(r.Float64()) + if r.Intn(2) == 0 { + this.FieldA[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v212 := r.Intn(10) + this.FieldB = make([]float32, v212) + for i := 0; i < v212; i++ { + this.FieldB[i] = float32(r.Float32()) + if r.Intn(2) == 0 { + this.FieldB[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v213 := r.Intn(10) + this.FieldC = make([]int32, v213) + for i := 0; i < v213; i++ { + this.FieldC[i] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.FieldC[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v214 := r.Intn(10) + this.FieldD = make([]int64, v214) + for i := 0; i < v214; i++ { + this.FieldD[i] = int64(r.Int63()) + if r.Intn(2) == 0 { + this.FieldD[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v215 := r.Intn(10) + this.FieldE = make([]uint32, v215) + for i := 0; i < v215; i++ { + this.FieldE[i] = uint32(r.Uint32()) + } + } + if r.Intn(10) != 0 { + v216 := r.Intn(10) + this.FieldF = make([]uint64, v216) + for i := 0; i < v216; i++ { + this.FieldF[i] = uint64(uint64(r.Uint32())) + } + } + if r.Intn(10) != 0 { + v217 := r.Intn(10) + this.FieldG = make([]int32, v217) + for i := 0; i < v217; i++ { + this.FieldG[i] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.FieldG[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v218 := r.Intn(10) + this.FieldH = make([]int64, v218) + for i := 0; i < v218; i++ { + this.FieldH[i] = int64(r.Int63()) + if r.Intn(2) == 0 { + this.FieldH[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v219 := r.Intn(10) + this.FieldI = make([]uint32, v219) + for i := 0; i < v219; i++ { + this.FieldI[i] = uint32(r.Uint32()) + } + } + if r.Intn(10) != 0 { + v220 := r.Intn(10) + this.FieldJ = make([]int32, v220) + for i := 0; i < v220; i++ { + this.FieldJ[i] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.FieldJ[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v221 := r.Intn(10) + this.FieldK = make([]uint64, v221) + for i := 0; i < v221; i++ { + this.FieldK[i] = uint64(uint64(r.Uint32())) + } + } + if r.Intn(10) != 0 { + v222 := r.Intn(10) + this.FieldL = make([]int64, v222) + for i := 0; i < v222; i++ { + this.FieldL[i] = int64(r.Int63()) + if r.Intn(2) == 0 { + this.FieldL[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v223 := r.Intn(10) + this.FieldM = make([]bool, v223) + for i := 0; i < v223; i++ { + this.FieldM[i] = bool(bool(r.Intn(2) == 0)) + } + } + if r.Intn(10) != 0 { + v224 := r.Intn(10) + this.FieldN = make([]string, v224) + for i := 0; i < v224; i++ { + this.FieldN[i] = randStringThetest(r) + } + } + if r.Intn(10) != 0 { + v225 := r.Intn(10) + this.FieldO = make([][]byte, v225) + for i := 0; i < v225; i++ { + v226 := r.Intn(100) + this.FieldO[i] = make([]byte, v226) + for j := 0; j < v226; j++ { + this.FieldO[i][j] = byte(r.Intn(256)) + } + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 16) + } + return this +} + +func NewPopulatedCustomNameNinStruct(r randyThetest, easy bool) *CustomNameNinStruct { + this := &CustomNameNinStruct{} + if r.Intn(10) != 0 { + v227 := float64(r.Float64()) + if r.Intn(2) == 0 { + v227 *= -1 + } + this.FieldA = &v227 + } + if r.Intn(10) != 0 { + v228 := float32(r.Float32()) + if r.Intn(2) == 0 { + v228 *= -1 + } + this.FieldB = &v228 + } + if r.Intn(10) != 0 { + this.FieldC = NewPopulatedNidOptNative(r, easy) + } + if r.Intn(10) != 0 { + v229 := r.Intn(5) + this.FieldD = make([]*NinOptNative, v229) + for i := 0; i < v229; i++ { + this.FieldD[i] = NewPopulatedNinOptNative(r, easy) + } + } + if r.Intn(10) != 0 { + v230 := uint64(uint64(r.Uint32())) + this.FieldE = &v230 + } + if r.Intn(10) != 0 { + v231 := int32(r.Int31()) + if r.Intn(2) == 0 { + v231 *= -1 + } + this.FieldF = &v231 + } + if r.Intn(10) != 0 { + this.FieldG = NewPopulatedNidOptNative(r, easy) + } + if r.Intn(10) != 0 { + v232 := bool(bool(r.Intn(2) == 0)) + this.FieldH = &v232 + } + if r.Intn(10) != 0 { + v233 := randStringThetest(r) + this.FieldI = &v233 + } + if r.Intn(10) != 0 { + v234 := r.Intn(100) + this.FieldJ = make([]byte, v234) + for i := 0; i < v234; i++ { + this.FieldJ[i] = byte(r.Intn(256)) + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 16) + } + return this +} + +func NewPopulatedCustomNameCustomType(r randyThetest, easy bool) *CustomNameCustomType { + this := &CustomNameCustomType{} + if r.Intn(10) != 0 { + this.FieldA = NewPopulatedUuid(r) + } + if r.Intn(10) != 0 { + this.FieldB = github_com_gogo_protobuf_test_custom.NewPopulatedUint128(r) + } + if r.Intn(10) != 0 { + v235 := r.Intn(10) + this.FieldC = make([]Uuid, v235) + for i := 0; i < v235; i++ { + v236 := NewPopulatedUuid(r) + this.FieldC[i] = *v236 + } + } + if r.Intn(10) != 0 { + v237 := r.Intn(10) + this.FieldD = make([]github_com_gogo_protobuf_test_custom.Uint128, v237) + for i := 0; i < v237; i++ { + v238 := github_com_gogo_protobuf_test_custom.NewPopulatedUint128(r) + this.FieldD[i] = *v238 + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 5) + } + return this +} + +func NewPopulatedCustomNameNinEmbeddedStructUnion(r randyThetest, easy bool) *CustomNameNinEmbeddedStructUnion { + this := &CustomNameNinEmbeddedStructUnion{} + fieldNum := r.Intn(3) + switch fieldNum { + case 0: + this.NidOptNative = NewPopulatedNidOptNative(r, easy) + case 1: + this.FieldA = NewPopulatedNinOptNative(r, easy) + case 2: + v239 := bool(bool(r.Intn(2) == 0)) + this.FieldB = &v239 + } + return this +} + +func NewPopulatedCustomNameEnum(r randyThetest, easy bool) *CustomNameEnum { + this := &CustomNameEnum{} + if r.Intn(10) != 0 { + v240 := TheTestEnum([]int32{0, 1, 2}[r.Intn(3)]) + this.FieldA = &v240 + } + if r.Intn(10) != 0 { + v241 := r.Intn(10) + this.FieldB = make([]TheTestEnum, v241) + for i := 0; i < v241; i++ { + this.FieldB[i] = TheTestEnum([]int32{0, 1, 2}[r.Intn(3)]) + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 3) + } + return this +} + +func NewPopulatedNoExtensionsMap(r randyThetest, easy bool) *NoExtensionsMap { + this := &NoExtensionsMap{} + if r.Intn(10) != 0 { + v242 := int64(r.Int63()) + if r.Intn(2) == 0 { + v242 *= -1 + } + this.Field1 = &v242 + } + if !easy && r.Intn(10) != 0 { + l := r.Intn(5) + for i := 0; i < l; i++ { + fieldNumber := r.Intn(100) + 100 + wire := r.Intn(4) + if wire == 3 { + wire = 5 + } + data := randFieldThetest(nil, r, fieldNumber, wire) + github_com_gogo_protobuf_proto.SetRawExtension(this, int32(fieldNumber), data) + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 201) + } + return this +} + +func NewPopulatedUnrecognized(r randyThetest, easy bool) *Unrecognized { + this := &Unrecognized{} + if r.Intn(10) != 0 { + v243 := randStringThetest(r) + this.Field1 = &v243 + } + if !easy && r.Intn(10) != 0 { + } + return this +} + +func NewPopulatedUnrecognizedWithInner(r randyThetest, easy bool) *UnrecognizedWithInner { + this := &UnrecognizedWithInner{} + if r.Intn(10) != 0 { + v244 := r.Intn(5) + this.Embedded = make([]*UnrecognizedWithInner_Inner, v244) + for i := 0; i < v244; i++ { + this.Embedded[i] = NewPopulatedUnrecognizedWithInner_Inner(r, easy) + } + } + if r.Intn(10) != 0 { + v245 := randStringThetest(r) + this.Field2 = &v245 + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 3) + } + return this +} + +func NewPopulatedUnrecognizedWithInner_Inner(r randyThetest, easy bool) *UnrecognizedWithInner_Inner { + this := &UnrecognizedWithInner_Inner{} + if r.Intn(10) != 0 { + v246 := uint32(r.Uint32()) + this.Field1 = &v246 + } + if !easy && r.Intn(10) != 0 { + } + return this +} + +func NewPopulatedUnrecognizedWithEmbed(r randyThetest, easy bool) *UnrecognizedWithEmbed { + this := &UnrecognizedWithEmbed{} + v247 := NewPopulatedUnrecognizedWithEmbed_Embedded(r, easy) + this.UnrecognizedWithEmbed_Embedded = *v247 + if r.Intn(10) != 0 { + v248 := randStringThetest(r) + this.Field2 = &v248 + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 3) + } + return this +} + +func NewPopulatedUnrecognizedWithEmbed_Embedded(r randyThetest, easy bool) *UnrecognizedWithEmbed_Embedded { + this := &UnrecognizedWithEmbed_Embedded{} + if r.Intn(10) != 0 { + v249 := uint32(r.Uint32()) + this.Field1 = &v249 + } + if !easy && r.Intn(10) != 0 { + } + return this +} + +func NewPopulatedNode(r randyThetest, easy bool) *Node { + this := &Node{} + if r.Intn(10) != 0 { + v250 := randStringThetest(r) + this.Label = &v250 + } + if r.Intn(10) == 0 { + v251 := r.Intn(5) + this.Children = make([]*Node, v251) + for i := 0; i < v251; i++ { + this.Children[i] = NewPopulatedNode(r, easy) + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 3) + } + return this +} + +type randyThetest interface { + Float32() float32 + Float64() float64 + Int63() int64 + Int31() int32 + Uint32() uint32 + Intn(n int) int +} + +func randUTF8RuneThetest(r randyThetest) 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 randStringThetest(r randyThetest) string { + v252 := r.Intn(100) + tmps := make([]rune, v252) + for i := 0; i < v252; i++ { + tmps[i] = randUTF8RuneThetest(r) + } + return string(tmps) +} +func randUnrecognizedThetest(r randyThetest, 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 = randFieldThetest(data, r, fieldNumber, wire) + } + return data +} +func randFieldThetest(data []byte, r randyThetest, fieldNumber int, wire int) []byte { + key := uint32(fieldNumber)<<3 | uint32(wire) + switch wire { + case 0: + data = encodeVarintPopulateThetest(data, uint64(key)) + v253 := r.Int63() + if r.Intn(2) == 0 { + v253 *= -1 + } + data = encodeVarintPopulateThetest(data, uint64(v253)) + case 1: + data = encodeVarintPopulateThetest(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 = encodeVarintPopulateThetest(data, uint64(key)) + ll := r.Intn(100) + data = encodeVarintPopulateThetest(data, uint64(ll)) + for j := 0; j < ll; j++ { + data = append(data, byte(r.Intn(256))) + } + default: + data = encodeVarintPopulateThetest(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 encodeVarintPopulateThetest(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 *NidOptNative) Size() (n int) { + var l int + _ = l + n += 9 + n += 5 + n += 1 + sovThetest(uint64(m.Field3)) + n += 1 + sovThetest(uint64(m.Field4)) + n += 1 + sovThetest(uint64(m.Field5)) + n += 1 + sovThetest(uint64(m.Field6)) + n += 1 + sozThetest(uint64(m.Field7)) + n += 1 + sozThetest(uint64(m.Field8)) + n += 5 + n += 5 + n += 9 + n += 9 + n += 2 + l = len(m.Field14) + n += 1 + l + sovThetest(uint64(l)) + if m.Field15 != nil { + l = len(m.Field15) + n += 1 + l + sovThetest(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NinOptNative) Size() (n int) { + var l int + _ = l + if m.Field1 != nil { + n += 9 + } + if m.Field2 != nil { + n += 5 + } + if m.Field3 != nil { + n += 1 + sovThetest(uint64(*m.Field3)) + } + if m.Field4 != nil { + n += 1 + sovThetest(uint64(*m.Field4)) + } + if m.Field5 != nil { + n += 1 + sovThetest(uint64(*m.Field5)) + } + if m.Field6 != nil { + n += 1 + sovThetest(uint64(*m.Field6)) + } + if m.Field7 != nil { + n += 1 + sozThetest(uint64(*m.Field7)) + } + if m.Field8 != nil { + n += 1 + sozThetest(uint64(*m.Field8)) + } + if m.Field9 != nil { + n += 5 + } + if m.Field10 != nil { + n += 5 + } + if m.Field11 != nil { + n += 9 + } + if m.Field12 != nil { + n += 9 + } + if m.Field13 != nil { + n += 2 + } + if m.Field14 != nil { + l = len(*m.Field14) + n += 1 + l + sovThetest(uint64(l)) + } + if m.Field15 != nil { + l = len(m.Field15) + n += 1 + l + sovThetest(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NidRepNative) Size() (n int) { + var l int + _ = l + if len(m.Field1) > 0 { + n += 9 * len(m.Field1) + } + if len(m.Field2) > 0 { + n += 5 * len(m.Field2) + } + if len(m.Field3) > 0 { + for _, e := range m.Field3 { + n += 1 + sovThetest(uint64(e)) + } + } + if len(m.Field4) > 0 { + for _, e := range m.Field4 { + n += 1 + sovThetest(uint64(e)) + } + } + if len(m.Field5) > 0 { + for _, e := range m.Field5 { + n += 1 + sovThetest(uint64(e)) + } + } + if len(m.Field6) > 0 { + for _, e := range m.Field6 { + n += 1 + sovThetest(uint64(e)) + } + } + if len(m.Field7) > 0 { + for _, e := range m.Field7 { + n += 1 + sozThetest(uint64(e)) + } + } + if len(m.Field8) > 0 { + for _, e := range m.Field8 { + n += 1 + sozThetest(uint64(e)) + } + } + if len(m.Field9) > 0 { + n += 5 * len(m.Field9) + } + if len(m.Field10) > 0 { + n += 5 * len(m.Field10) + } + if len(m.Field11) > 0 { + n += 9 * len(m.Field11) + } + if len(m.Field12) > 0 { + n += 9 * len(m.Field12) + } + if len(m.Field13) > 0 { + n += 2 * len(m.Field13) + } + if len(m.Field14) > 0 { + for _, s := range m.Field14 { + l = len(s) + n += 1 + l + sovThetest(uint64(l)) + } + } + if len(m.Field15) > 0 { + for _, b := range m.Field15 { + l = len(b) + n += 1 + l + sovThetest(uint64(l)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NinRepNative) Size() (n int) { + var l int + _ = l + if len(m.Field1) > 0 { + n += 9 * len(m.Field1) + } + if len(m.Field2) > 0 { + n += 5 * len(m.Field2) + } + if len(m.Field3) > 0 { + for _, e := range m.Field3 { + n += 1 + sovThetest(uint64(e)) + } + } + if len(m.Field4) > 0 { + for _, e := range m.Field4 { + n += 1 + sovThetest(uint64(e)) + } + } + if len(m.Field5) > 0 { + for _, e := range m.Field5 { + n += 1 + sovThetest(uint64(e)) + } + } + if len(m.Field6) > 0 { + for _, e := range m.Field6 { + n += 1 + sovThetest(uint64(e)) + } + } + if len(m.Field7) > 0 { + for _, e := range m.Field7 { + n += 1 + sozThetest(uint64(e)) + } + } + if len(m.Field8) > 0 { + for _, e := range m.Field8 { + n += 1 + sozThetest(uint64(e)) + } + } + if len(m.Field9) > 0 { + n += 5 * len(m.Field9) + } + if len(m.Field10) > 0 { + n += 5 * len(m.Field10) + } + if len(m.Field11) > 0 { + n += 9 * len(m.Field11) + } + if len(m.Field12) > 0 { + n += 9 * len(m.Field12) + } + if len(m.Field13) > 0 { + n += 2 * len(m.Field13) + } + if len(m.Field14) > 0 { + for _, s := range m.Field14 { + l = len(s) + n += 1 + l + sovThetest(uint64(l)) + } + } + if len(m.Field15) > 0 { + for _, b := range m.Field15 { + l = len(b) + n += 1 + l + sovThetest(uint64(l)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NidRepPackedNative) Size() (n int) { + var l int + _ = l + if len(m.Field1) > 0 { + n += 1 + sovThetest(uint64(len(m.Field1)*8)) + len(m.Field1)*8 + } + if len(m.Field2) > 0 { + n += 1 + sovThetest(uint64(len(m.Field2)*4)) + len(m.Field2)*4 + } + if len(m.Field3) > 0 { + l = 0 + for _, e := range m.Field3 { + l += sovThetest(uint64(e)) + } + n += 1 + sovThetest(uint64(l)) + l + } + if len(m.Field4) > 0 { + l = 0 + for _, e := range m.Field4 { + l += sovThetest(uint64(e)) + } + n += 1 + sovThetest(uint64(l)) + l + } + if len(m.Field5) > 0 { + l = 0 + for _, e := range m.Field5 { + l += sovThetest(uint64(e)) + } + n += 1 + sovThetest(uint64(l)) + l + } + if len(m.Field6) > 0 { + l = 0 + for _, e := range m.Field6 { + l += sovThetest(uint64(e)) + } + n += 1 + sovThetest(uint64(l)) + l + } + if len(m.Field7) > 0 { + l = 0 + for _, e := range m.Field7 { + l += sozThetest(uint64(e)) + } + n += 1 + sovThetest(uint64(l)) + l + } + if len(m.Field8) > 0 { + l = 0 + for _, e := range m.Field8 { + l += sozThetest(uint64(e)) + } + n += 1 + sovThetest(uint64(l)) + l + } + if len(m.Field9) > 0 { + n += 1 + sovThetest(uint64(len(m.Field9)*4)) + len(m.Field9)*4 + } + if len(m.Field10) > 0 { + n += 1 + sovThetest(uint64(len(m.Field10)*4)) + len(m.Field10)*4 + } + if len(m.Field11) > 0 { + n += 1 + sovThetest(uint64(len(m.Field11)*8)) + len(m.Field11)*8 + } + if len(m.Field12) > 0 { + n += 1 + sovThetest(uint64(len(m.Field12)*8)) + len(m.Field12)*8 + } + if len(m.Field13) > 0 { + n += 1 + sovThetest(uint64(len(m.Field13))) + len(m.Field13)*1 + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NinRepPackedNative) Size() (n int) { + var l int + _ = l + if len(m.Field1) > 0 { + n += 1 + sovThetest(uint64(len(m.Field1)*8)) + len(m.Field1)*8 + } + if len(m.Field2) > 0 { + n += 1 + sovThetest(uint64(len(m.Field2)*4)) + len(m.Field2)*4 + } + if len(m.Field3) > 0 { + l = 0 + for _, e := range m.Field3 { + l += sovThetest(uint64(e)) + } + n += 1 + sovThetest(uint64(l)) + l + } + if len(m.Field4) > 0 { + l = 0 + for _, e := range m.Field4 { + l += sovThetest(uint64(e)) + } + n += 1 + sovThetest(uint64(l)) + l + } + if len(m.Field5) > 0 { + l = 0 + for _, e := range m.Field5 { + l += sovThetest(uint64(e)) + } + n += 1 + sovThetest(uint64(l)) + l + } + if len(m.Field6) > 0 { + l = 0 + for _, e := range m.Field6 { + l += sovThetest(uint64(e)) + } + n += 1 + sovThetest(uint64(l)) + l + } + if len(m.Field7) > 0 { + l = 0 + for _, e := range m.Field7 { + l += sozThetest(uint64(e)) + } + n += 1 + sovThetest(uint64(l)) + l + } + if len(m.Field8) > 0 { + l = 0 + for _, e := range m.Field8 { + l += sozThetest(uint64(e)) + } + n += 1 + sovThetest(uint64(l)) + l + } + if len(m.Field9) > 0 { + n += 1 + sovThetest(uint64(len(m.Field9)*4)) + len(m.Field9)*4 + } + if len(m.Field10) > 0 { + n += 1 + sovThetest(uint64(len(m.Field10)*4)) + len(m.Field10)*4 + } + if len(m.Field11) > 0 { + n += 1 + sovThetest(uint64(len(m.Field11)*8)) + len(m.Field11)*8 + } + if len(m.Field12) > 0 { + n += 1 + sovThetest(uint64(len(m.Field12)*8)) + len(m.Field12)*8 + } + if len(m.Field13) > 0 { + n += 1 + sovThetest(uint64(len(m.Field13))) + len(m.Field13)*1 + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NidOptStruct) Size() (n int) { + var l int + _ = l + n += 9 + n += 5 + l = m.Field3.Size() + n += 1 + l + sovThetest(uint64(l)) + l = m.Field4.Size() + n += 1 + l + sovThetest(uint64(l)) + n += 1 + sovThetest(uint64(m.Field6)) + n += 1 + sozThetest(uint64(m.Field7)) + l = m.Field8.Size() + n += 1 + l + sovThetest(uint64(l)) + n += 2 + l = len(m.Field14) + n += 1 + l + sovThetest(uint64(l)) + if m.Field15 != nil { + l = len(m.Field15) + n += 1 + l + sovThetest(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NinOptStruct) Size() (n int) { + var l int + _ = l + if m.Field1 != nil { + n += 9 + } + if m.Field2 != nil { + n += 5 + } + if m.Field3 != nil { + l = m.Field3.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if m.Field4 != nil { + l = m.Field4.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if m.Field6 != nil { + n += 1 + sovThetest(uint64(*m.Field6)) + } + if m.Field7 != nil { + n += 1 + sozThetest(uint64(*m.Field7)) + } + if m.Field8 != nil { + l = m.Field8.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if m.Field13 != nil { + n += 2 + } + if m.Field14 != nil { + l = len(*m.Field14) + n += 1 + l + sovThetest(uint64(l)) + } + if m.Field15 != nil { + l = len(m.Field15) + n += 1 + l + sovThetest(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NidRepStruct) Size() (n int) { + var l int + _ = l + if len(m.Field1) > 0 { + n += 9 * len(m.Field1) + } + if len(m.Field2) > 0 { + n += 5 * len(m.Field2) + } + if len(m.Field3) > 0 { + for _, e := range m.Field3 { + l = e.Size() + n += 1 + l + sovThetest(uint64(l)) + } + } + if len(m.Field4) > 0 { + for _, e := range m.Field4 { + l = e.Size() + n += 1 + l + sovThetest(uint64(l)) + } + } + if len(m.Field6) > 0 { + for _, e := range m.Field6 { + n += 1 + sovThetest(uint64(e)) + } + } + if len(m.Field7) > 0 { + for _, e := range m.Field7 { + n += 1 + sozThetest(uint64(e)) + } + } + if len(m.Field8) > 0 { + for _, e := range m.Field8 { + l = e.Size() + n += 1 + l + sovThetest(uint64(l)) + } + } + if len(m.Field13) > 0 { + n += 2 * len(m.Field13) + } + if len(m.Field14) > 0 { + for _, s := range m.Field14 { + l = len(s) + n += 1 + l + sovThetest(uint64(l)) + } + } + if len(m.Field15) > 0 { + for _, b := range m.Field15 { + l = len(b) + n += 1 + l + sovThetest(uint64(l)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NinRepStruct) Size() (n int) { + var l int + _ = l + if len(m.Field1) > 0 { + n += 9 * len(m.Field1) + } + if len(m.Field2) > 0 { + n += 5 * len(m.Field2) + } + if len(m.Field3) > 0 { + for _, e := range m.Field3 { + l = e.Size() + n += 1 + l + sovThetest(uint64(l)) + } + } + if len(m.Field4) > 0 { + for _, e := range m.Field4 { + l = e.Size() + n += 1 + l + sovThetest(uint64(l)) + } + } + if len(m.Field6) > 0 { + for _, e := range m.Field6 { + n += 1 + sovThetest(uint64(e)) + } + } + if len(m.Field7) > 0 { + for _, e := range m.Field7 { + n += 1 + sozThetest(uint64(e)) + } + } + if len(m.Field8) > 0 { + for _, e := range m.Field8 { + l = e.Size() + n += 1 + l + sovThetest(uint64(l)) + } + } + if len(m.Field13) > 0 { + n += 2 * len(m.Field13) + } + if len(m.Field14) > 0 { + for _, s := range m.Field14 { + l = len(s) + n += 1 + l + sovThetest(uint64(l)) + } + } + if len(m.Field15) > 0 { + for _, b := range m.Field15 { + l = len(b) + n += 1 + l + sovThetest(uint64(l)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NidEmbeddedStruct) Size() (n int) { + var l int + _ = l + if m.NidOptNative != nil { + l = m.NidOptNative.Size() + n += 1 + l + sovThetest(uint64(l)) + } + l = m.Field200.Size() + n += 2 + l + sovThetest(uint64(l)) + n += 3 + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NinEmbeddedStruct) Size() (n int) { + var l int + _ = l + if m.NidOptNative != nil { + l = m.NidOptNative.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if m.Field200 != nil { + l = m.Field200.Size() + n += 2 + l + sovThetest(uint64(l)) + } + if m.Field210 != nil { + n += 3 + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NidNestedStruct) Size() (n int) { + var l int + _ = l + l = m.Field1.Size() + n += 1 + l + sovThetest(uint64(l)) + if len(m.Field2) > 0 { + for _, e := range m.Field2 { + l = e.Size() + n += 1 + l + sovThetest(uint64(l)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NinNestedStruct) Size() (n int) { + var l int + _ = l + if m.Field1 != nil { + l = m.Field1.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if len(m.Field2) > 0 { + for _, e := range m.Field2 { + l = e.Size() + n += 1 + l + sovThetest(uint64(l)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NidOptCustom) Size() (n int) { + var l int + _ = l + l = m.Id.Size() + n += 1 + l + sovThetest(uint64(l)) + l = m.Value.Size() + n += 1 + l + sovThetest(uint64(l)) + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *CustomDash) Size() (n int) { + var l int + _ = l + if m.Value != nil { + l = m.Value.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NinOptCustom) Size() (n int) { + var l int + _ = l + if m.Id != nil { + l = m.Id.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if m.Value != nil { + l = m.Value.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NidRepCustom) Size() (n int) { + var l int + _ = l + if len(m.Id) > 0 { + for _, e := range m.Id { + l = e.Size() + n += 1 + l + sovThetest(uint64(l)) + } + } + if len(m.Value) > 0 { + for _, e := range m.Value { + l = e.Size() + n += 1 + l + sovThetest(uint64(l)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NinRepCustom) Size() (n int) { + var l int + _ = l + if len(m.Id) > 0 { + for _, e := range m.Id { + l = e.Size() + n += 1 + l + sovThetest(uint64(l)) + } + } + if len(m.Value) > 0 { + for _, e := range m.Value { + l = e.Size() + n += 1 + l + sovThetest(uint64(l)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NinOptNativeUnion) Size() (n int) { + var l int + _ = l + if m.Field1 != nil { + n += 9 + } + if m.Field2 != nil { + n += 5 + } + if m.Field3 != nil { + n += 1 + sovThetest(uint64(*m.Field3)) + } + if m.Field4 != nil { + n += 1 + sovThetest(uint64(*m.Field4)) + } + if m.Field5 != nil { + n += 1 + sovThetest(uint64(*m.Field5)) + } + if m.Field6 != nil { + n += 1 + sovThetest(uint64(*m.Field6)) + } + if m.Field13 != nil { + n += 2 + } + if m.Field14 != nil { + l = len(*m.Field14) + n += 1 + l + sovThetest(uint64(l)) + } + if m.Field15 != nil { + l = len(m.Field15) + n += 1 + l + sovThetest(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NinOptStructUnion) Size() (n int) { + var l int + _ = l + if m.Field1 != nil { + n += 9 + } + if m.Field2 != nil { + n += 5 + } + if m.Field3 != nil { + l = m.Field3.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if m.Field4 != nil { + l = m.Field4.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if m.Field6 != nil { + n += 1 + sovThetest(uint64(*m.Field6)) + } + if m.Field7 != nil { + n += 1 + sozThetest(uint64(*m.Field7)) + } + if m.Field13 != nil { + n += 2 + } + if m.Field14 != nil { + l = len(*m.Field14) + n += 1 + l + sovThetest(uint64(l)) + } + if m.Field15 != nil { + l = len(m.Field15) + n += 1 + l + sovThetest(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NinEmbeddedStructUnion) Size() (n int) { + var l int + _ = l + if m.NidOptNative != nil { + l = m.NidOptNative.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if m.Field200 != nil { + l = m.Field200.Size() + n += 2 + l + sovThetest(uint64(l)) + } + if m.Field210 != nil { + n += 3 + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NinNestedStructUnion) Size() (n int) { + var l int + _ = l + if m.Field1 != nil { + l = m.Field1.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if m.Field2 != nil { + l = m.Field2.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if m.Field3 != nil { + l = m.Field3.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *Tree) Size() (n int) { + var l int + _ = l + if m.Or != nil { + l = m.Or.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if m.And != nil { + l = m.And.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if m.Leaf != nil { + l = m.Leaf.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *OrBranch) Size() (n int) { + var l int + _ = l + l = m.Left.Size() + n += 1 + l + sovThetest(uint64(l)) + l = m.Right.Size() + n += 1 + l + sovThetest(uint64(l)) + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *AndBranch) Size() (n int) { + var l int + _ = l + l = m.Left.Size() + n += 1 + l + sovThetest(uint64(l)) + l = m.Right.Size() + n += 1 + l + sovThetest(uint64(l)) + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *Leaf) Size() (n int) { + var l int + _ = l + n += 1 + sovThetest(uint64(m.Value)) + l = len(m.StrValue) + n += 1 + l + sovThetest(uint64(l)) + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *DeepTree) Size() (n int) { + var l int + _ = l + if m.Down != nil { + l = m.Down.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if m.And != nil { + l = m.And.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if m.Leaf != nil { + l = m.Leaf.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *ADeepBranch) Size() (n int) { + var l int + _ = l + l = m.Down.Size() + n += 1 + l + sovThetest(uint64(l)) + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *AndDeepBranch) Size() (n int) { + var l int + _ = l + l = m.Left.Size() + n += 1 + l + sovThetest(uint64(l)) + l = m.Right.Size() + n += 1 + l + sovThetest(uint64(l)) + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *DeepLeaf) Size() (n int) { + var l int + _ = l + l = m.Tree.Size() + n += 1 + l + sovThetest(uint64(l)) + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *Nil) Size() (n int) { + var l int + _ = l + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NidOptEnum) Size() (n int) { + var l int + _ = l + n += 1 + sovThetest(uint64(m.Field1)) + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NinOptEnum) Size() (n int) { + var l int + _ = l + if m.Field1 != nil { + n += 1 + sovThetest(uint64(*m.Field1)) + } + if m.Field2 != nil { + n += 1 + sovThetest(uint64(*m.Field2)) + } + if m.Field3 != nil { + n += 1 + sovThetest(uint64(*m.Field3)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NidRepEnum) Size() (n int) { + var l int + _ = l + if len(m.Field1) > 0 { + for _, e := range m.Field1 { + n += 1 + sovThetest(uint64(e)) + } + } + if len(m.Field2) > 0 { + for _, e := range m.Field2 { + n += 1 + sovThetest(uint64(e)) + } + } + if len(m.Field3) > 0 { + for _, e := range m.Field3 { + n += 1 + sovThetest(uint64(e)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NinRepEnum) Size() (n int) { + var l int + _ = l + if len(m.Field1) > 0 { + for _, e := range m.Field1 { + n += 1 + sovThetest(uint64(e)) + } + } + if len(m.Field2) > 0 { + for _, e := range m.Field2 { + n += 1 + sovThetest(uint64(e)) + } + } + if len(m.Field3) > 0 { + for _, e := range m.Field3 { + n += 1 + sovThetest(uint64(e)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NinOptEnumDefault) Size() (n int) { + var l int + _ = l + if m.Field1 != nil { + n += 1 + sovThetest(uint64(*m.Field1)) + } + if m.Field2 != nil { + n += 1 + sovThetest(uint64(*m.Field2)) + } + if m.Field3 != nil { + n += 1 + sovThetest(uint64(*m.Field3)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *AnotherNinOptEnum) Size() (n int) { + var l int + _ = l + if m.Field1 != nil { + n += 1 + sovThetest(uint64(*m.Field1)) + } + if m.Field2 != nil { + n += 1 + sovThetest(uint64(*m.Field2)) + } + if m.Field3 != nil { + n += 1 + sovThetest(uint64(*m.Field3)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *AnotherNinOptEnumDefault) Size() (n int) { + var l int + _ = l + if m.Field1 != nil { + n += 1 + sovThetest(uint64(*m.Field1)) + } + if m.Field2 != nil { + n += 1 + sovThetest(uint64(*m.Field2)) + } + if m.Field3 != nil { + n += 1 + sovThetest(uint64(*m.Field3)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *Timer) Size() (n int) { + var l int + _ = l + n += 9 + n += 9 + if m.Data != nil { + l = len(m.Data) + n += 1 + l + sovThetest(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *MyExtendable) Size() (n int) { + var l int + _ = l + if m.Field1 != nil { + n += 1 + sovThetest(uint64(*m.Field1)) + } + if m.XXX_extensions != nil { + n += github_com_gogo_protobuf_proto.SizeOfExtensionMap(m.XXX_extensions) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *OtherExtenable) Size() (n int) { + var l int + _ = l + if m.Field2 != nil { + n += 1 + sovThetest(uint64(*m.Field2)) + } + if m.Field13 != nil { + n += 1 + sovThetest(uint64(*m.Field13)) + } + if m.M != nil { + l = m.M.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if m.XXX_extensions != nil { + n += github_com_gogo_protobuf_proto.SizeOfExtensionMap(m.XXX_extensions) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NestedDefinition) Size() (n int) { + var l int + _ = l + if m.Field1 != nil { + n += 1 + sovThetest(uint64(*m.Field1)) + } + if m.EnumField != nil { + n += 1 + sovThetest(uint64(*m.EnumField)) + } + if m.NNM != nil { + l = m.NNM.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if m.NM != nil { + l = m.NM.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NestedDefinition_NestedMessage) Size() (n int) { + var l int + _ = l + if m.NestedField1 != nil { + n += 9 + } + if m.NNM != nil { + l = m.NNM.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NestedDefinition_NestedMessage_NestedNestedMsg) Size() (n int) { + var l int + _ = l + if m.NestedNestedField1 != nil { + l = len(*m.NestedNestedField1) + n += 1 + l + sovThetest(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NestedScope) Size() (n int) { + var l int + _ = l + if m.A != nil { + l = m.A.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if m.B != nil { + n += 1 + sovThetest(uint64(*m.B)) + } + if m.C != nil { + l = m.C.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NinOptNativeDefault) Size() (n int) { + var l int + _ = l + if m.Field1 != nil { + n += 9 + } + if m.Field2 != nil { + n += 5 + } + if m.Field3 != nil { + n += 1 + sovThetest(uint64(*m.Field3)) + } + if m.Field4 != nil { + n += 1 + sovThetest(uint64(*m.Field4)) + } + if m.Field5 != nil { + n += 1 + sovThetest(uint64(*m.Field5)) + } + if m.Field6 != nil { + n += 1 + sovThetest(uint64(*m.Field6)) + } + if m.Field7 != nil { + n += 1 + sozThetest(uint64(*m.Field7)) + } + if m.Field8 != nil { + n += 1 + sozThetest(uint64(*m.Field8)) + } + if m.Field9 != nil { + n += 5 + } + if m.Field10 != nil { + n += 5 + } + if m.Field11 != nil { + n += 9 + } + if m.Field12 != nil { + n += 9 + } + if m.Field13 != nil { + n += 2 + } + if m.Field14 != nil { + l = len(*m.Field14) + n += 1 + l + sovThetest(uint64(l)) + } + if m.Field15 != nil { + l = len(m.Field15) + n += 1 + l + sovThetest(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *CustomContainer) Size() (n int) { + var l int + _ = l + l = m.CustomStruct.Size() + n += 1 + l + sovThetest(uint64(l)) + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *CustomNameNidOptNative) Size() (n int) { + var l int + _ = l + n += 9 + n += 5 + n += 1 + sovThetest(uint64(m.FieldC)) + n += 1 + sovThetest(uint64(m.FieldD)) + n += 1 + sovThetest(uint64(m.FieldE)) + n += 1 + sovThetest(uint64(m.FieldF)) + n += 1 + sozThetest(uint64(m.FieldG)) + n += 1 + sozThetest(uint64(m.FieldH)) + n += 5 + n += 5 + n += 9 + n += 9 + n += 2 + l = len(m.FieldN) + n += 1 + l + sovThetest(uint64(l)) + if m.FieldO != nil { + l = len(m.FieldO) + n += 1 + l + sovThetest(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *CustomNameNinOptNative) Size() (n int) { + var l int + _ = l + if m.FieldA != nil { + n += 9 + } + if m.FieldB != nil { + n += 5 + } + if m.FieldC != nil { + n += 1 + sovThetest(uint64(*m.FieldC)) + } + if m.FieldD != nil { + n += 1 + sovThetest(uint64(*m.FieldD)) + } + if m.FieldE != nil { + n += 1 + sovThetest(uint64(*m.FieldE)) + } + if m.FieldF != nil { + n += 1 + sovThetest(uint64(*m.FieldF)) + } + if m.FieldG != nil { + n += 1 + sozThetest(uint64(*m.FieldG)) + } + if m.FieldH != nil { + n += 1 + sozThetest(uint64(*m.FieldH)) + } + if m.FieldI != nil { + n += 5 + } + if m.FieldJ != nil { + n += 5 + } + if m.FieldK != nil { + n += 9 + } + if m.FielL != nil { + n += 9 + } + if m.FieldM != nil { + n += 2 + } + if m.FieldN != nil { + l = len(*m.FieldN) + n += 1 + l + sovThetest(uint64(l)) + } + if m.FieldO != nil { + l = len(m.FieldO) + n += 1 + l + sovThetest(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *CustomNameNinRepNative) Size() (n int) { + var l int + _ = l + if len(m.FieldA) > 0 { + n += 9 * len(m.FieldA) + } + if len(m.FieldB) > 0 { + n += 5 * len(m.FieldB) + } + if len(m.FieldC) > 0 { + for _, e := range m.FieldC { + n += 1 + sovThetest(uint64(e)) + } + } + if len(m.FieldD) > 0 { + for _, e := range m.FieldD { + n += 1 + sovThetest(uint64(e)) + } + } + if len(m.FieldE) > 0 { + for _, e := range m.FieldE { + n += 1 + sovThetest(uint64(e)) + } + } + if len(m.FieldF) > 0 { + for _, e := range m.FieldF { + n += 1 + sovThetest(uint64(e)) + } + } + if len(m.FieldG) > 0 { + for _, e := range m.FieldG { + n += 1 + sozThetest(uint64(e)) + } + } + if len(m.FieldH) > 0 { + for _, e := range m.FieldH { + n += 1 + sozThetest(uint64(e)) + } + } + if len(m.FieldI) > 0 { + n += 5 * len(m.FieldI) + } + if len(m.FieldJ) > 0 { + n += 5 * len(m.FieldJ) + } + if len(m.FieldK) > 0 { + n += 9 * len(m.FieldK) + } + if len(m.FieldL) > 0 { + n += 9 * len(m.FieldL) + } + if len(m.FieldM) > 0 { + n += 2 * len(m.FieldM) + } + if len(m.FieldN) > 0 { + for _, s := range m.FieldN { + l = len(s) + n += 1 + l + sovThetest(uint64(l)) + } + } + if len(m.FieldO) > 0 { + for _, b := range m.FieldO { + l = len(b) + n += 1 + l + sovThetest(uint64(l)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *CustomNameNinStruct) Size() (n int) { + var l int + _ = l + if m.FieldA != nil { + n += 9 + } + if m.FieldB != nil { + n += 5 + } + if m.FieldC != nil { + l = m.FieldC.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if len(m.FieldD) > 0 { + for _, e := range m.FieldD { + l = e.Size() + n += 1 + l + sovThetest(uint64(l)) + } + } + if m.FieldE != nil { + n += 1 + sovThetest(uint64(*m.FieldE)) + } + if m.FieldF != nil { + n += 1 + sozThetest(uint64(*m.FieldF)) + } + if m.FieldG != nil { + l = m.FieldG.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if m.FieldH != nil { + n += 2 + } + if m.FieldI != nil { + l = len(*m.FieldI) + n += 1 + l + sovThetest(uint64(l)) + } + if m.FieldJ != nil { + l = len(m.FieldJ) + n += 1 + l + sovThetest(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *CustomNameCustomType) Size() (n int) { + var l int + _ = l + if m.FieldA != nil { + l = m.FieldA.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if m.FieldB != nil { + l = m.FieldB.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if len(m.FieldC) > 0 { + for _, e := range m.FieldC { + l = e.Size() + n += 1 + l + sovThetest(uint64(l)) + } + } + if len(m.FieldD) > 0 { + for _, e := range m.FieldD { + l = e.Size() + n += 1 + l + sovThetest(uint64(l)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *CustomNameNinEmbeddedStructUnion) Size() (n int) { + var l int + _ = l + if m.NidOptNative != nil { + l = m.NidOptNative.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if m.FieldA != nil { + l = m.FieldA.Size() + n += 2 + l + sovThetest(uint64(l)) + } + if m.FieldB != nil { + n += 3 + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *CustomNameEnum) Size() (n int) { + var l int + _ = l + if m.FieldA != nil { + n += 1 + sovThetest(uint64(*m.FieldA)) + } + if len(m.FieldB) > 0 { + for _, e := range m.FieldB { + n += 1 + sovThetest(uint64(e)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NoExtensionsMap) Size() (n int) { + var l int + _ = l + if m.Field1 != nil { + n += 1 + sovThetest(uint64(*m.Field1)) + } + if m.XXX_extensions != nil { + n += len(m.XXX_extensions) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *Unrecognized) Size() (n int) { + var l int + _ = l + if m.Field1 != nil { + l = len(*m.Field1) + n += 1 + l + sovThetest(uint64(l)) + } + return n +} + +func (m *UnrecognizedWithInner) Size() (n int) { + var l int + _ = l + if len(m.Embedded) > 0 { + for _, e := range m.Embedded { + l = e.Size() + n += 1 + l + sovThetest(uint64(l)) + } + } + if m.Field2 != nil { + l = len(*m.Field2) + n += 1 + l + sovThetest(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *UnrecognizedWithInner_Inner) Size() (n int) { + var l int + _ = l + if m.Field1 != nil { + n += 1 + sovThetest(uint64(*m.Field1)) + } + return n +} + +func (m *UnrecognizedWithEmbed) Size() (n int) { + var l int + _ = l + l = m.UnrecognizedWithEmbed_Embedded.Size() + n += 1 + l + sovThetest(uint64(l)) + if m.Field2 != nil { + l = len(*m.Field2) + n += 1 + l + sovThetest(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *UnrecognizedWithEmbed_Embedded) Size() (n int) { + var l int + _ = l + if m.Field1 != nil { + n += 1 + sovThetest(uint64(*m.Field1)) + } + return n +} + +func (m *Node) Size() (n int) { + var l int + _ = l + if m.Label != nil { + l = len(*m.Label) + n += 1 + l + sovThetest(uint64(l)) + } + if len(m.Children) > 0 { + for _, e := range m.Children { + l = e.Size() + n += 1 + l + sovThetest(uint64(l)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func sovThetest(x uint64) (n int) { + for { + n++ + x >>= 7 + if x == 0 { + break + } + } + return n +} +func sozThetest(x uint64) (n int) { + return sovThetest(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (this *NidOptNative) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NidOptNative{`, + `Field1:` + fmt.Sprintf("%v", this.Field1) + `,`, + `Field2:` + fmt.Sprintf("%v", this.Field2) + `,`, + `Field3:` + fmt.Sprintf("%v", this.Field3) + `,`, + `Field4:` + fmt.Sprintf("%v", this.Field4) + `,`, + `Field5:` + fmt.Sprintf("%v", this.Field5) + `,`, + `Field6:` + fmt.Sprintf("%v", this.Field6) + `,`, + `Field7:` + fmt.Sprintf("%v", this.Field7) + `,`, + `Field8:` + fmt.Sprintf("%v", this.Field8) + `,`, + `Field9:` + fmt.Sprintf("%v", this.Field9) + `,`, + `Field10:` + fmt.Sprintf("%v", this.Field10) + `,`, + `Field11:` + fmt.Sprintf("%v", this.Field11) + `,`, + `Field12:` + fmt.Sprintf("%v", this.Field12) + `,`, + `Field13:` + fmt.Sprintf("%v", this.Field13) + `,`, + `Field14:` + fmt.Sprintf("%v", this.Field14) + `,`, + `Field15:` + fmt.Sprintf("%v", this.Field15) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NinOptNative) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NinOptNative{`, + `Field1:` + valueToStringThetest(this.Field1) + `,`, + `Field2:` + valueToStringThetest(this.Field2) + `,`, + `Field3:` + valueToStringThetest(this.Field3) + `,`, + `Field4:` + valueToStringThetest(this.Field4) + `,`, + `Field5:` + valueToStringThetest(this.Field5) + `,`, + `Field6:` + valueToStringThetest(this.Field6) + `,`, + `Field7:` + valueToStringThetest(this.Field7) + `,`, + `Field8:` + valueToStringThetest(this.Field8) + `,`, + `Field9:` + valueToStringThetest(this.Field9) + `,`, + `Field10:` + valueToStringThetest(this.Field10) + `,`, + `Field11:` + valueToStringThetest(this.Field11) + `,`, + `Field12:` + valueToStringThetest(this.Field12) + `,`, + `Field13:` + valueToStringThetest(this.Field13) + `,`, + `Field14:` + valueToStringThetest(this.Field14) + `,`, + `Field15:` + valueToStringThetest(this.Field15) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NidRepNative) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NidRepNative{`, + `Field1:` + fmt.Sprintf("%v", this.Field1) + `,`, + `Field2:` + fmt.Sprintf("%v", this.Field2) + `,`, + `Field3:` + fmt.Sprintf("%v", this.Field3) + `,`, + `Field4:` + fmt.Sprintf("%v", this.Field4) + `,`, + `Field5:` + fmt.Sprintf("%v", this.Field5) + `,`, + `Field6:` + fmt.Sprintf("%v", this.Field6) + `,`, + `Field7:` + fmt.Sprintf("%v", this.Field7) + `,`, + `Field8:` + fmt.Sprintf("%v", this.Field8) + `,`, + `Field9:` + fmt.Sprintf("%v", this.Field9) + `,`, + `Field10:` + fmt.Sprintf("%v", this.Field10) + `,`, + `Field11:` + fmt.Sprintf("%v", this.Field11) + `,`, + `Field12:` + fmt.Sprintf("%v", this.Field12) + `,`, + `Field13:` + fmt.Sprintf("%v", this.Field13) + `,`, + `Field14:` + fmt.Sprintf("%v", this.Field14) + `,`, + `Field15:` + fmt.Sprintf("%v", this.Field15) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NinRepNative) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NinRepNative{`, + `Field1:` + fmt.Sprintf("%v", this.Field1) + `,`, + `Field2:` + fmt.Sprintf("%v", this.Field2) + `,`, + `Field3:` + fmt.Sprintf("%v", this.Field3) + `,`, + `Field4:` + fmt.Sprintf("%v", this.Field4) + `,`, + `Field5:` + fmt.Sprintf("%v", this.Field5) + `,`, + `Field6:` + fmt.Sprintf("%v", this.Field6) + `,`, + `Field7:` + fmt.Sprintf("%v", this.Field7) + `,`, + `Field8:` + fmt.Sprintf("%v", this.Field8) + `,`, + `Field9:` + fmt.Sprintf("%v", this.Field9) + `,`, + `Field10:` + fmt.Sprintf("%v", this.Field10) + `,`, + `Field11:` + fmt.Sprintf("%v", this.Field11) + `,`, + `Field12:` + fmt.Sprintf("%v", this.Field12) + `,`, + `Field13:` + fmt.Sprintf("%v", this.Field13) + `,`, + `Field14:` + fmt.Sprintf("%v", this.Field14) + `,`, + `Field15:` + fmt.Sprintf("%v", this.Field15) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NidRepPackedNative) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NidRepPackedNative{`, + `Field1:` + fmt.Sprintf("%v", this.Field1) + `,`, + `Field2:` + fmt.Sprintf("%v", this.Field2) + `,`, + `Field3:` + fmt.Sprintf("%v", this.Field3) + `,`, + `Field4:` + fmt.Sprintf("%v", this.Field4) + `,`, + `Field5:` + fmt.Sprintf("%v", this.Field5) + `,`, + `Field6:` + fmt.Sprintf("%v", this.Field6) + `,`, + `Field7:` + fmt.Sprintf("%v", this.Field7) + `,`, + `Field8:` + fmt.Sprintf("%v", this.Field8) + `,`, + `Field9:` + fmt.Sprintf("%v", this.Field9) + `,`, + `Field10:` + fmt.Sprintf("%v", this.Field10) + `,`, + `Field11:` + fmt.Sprintf("%v", this.Field11) + `,`, + `Field12:` + fmt.Sprintf("%v", this.Field12) + `,`, + `Field13:` + fmt.Sprintf("%v", this.Field13) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NinRepPackedNative) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NinRepPackedNative{`, + `Field1:` + fmt.Sprintf("%v", this.Field1) + `,`, + `Field2:` + fmt.Sprintf("%v", this.Field2) + `,`, + `Field3:` + fmt.Sprintf("%v", this.Field3) + `,`, + `Field4:` + fmt.Sprintf("%v", this.Field4) + `,`, + `Field5:` + fmt.Sprintf("%v", this.Field5) + `,`, + `Field6:` + fmt.Sprintf("%v", this.Field6) + `,`, + `Field7:` + fmt.Sprintf("%v", this.Field7) + `,`, + `Field8:` + fmt.Sprintf("%v", this.Field8) + `,`, + `Field9:` + fmt.Sprintf("%v", this.Field9) + `,`, + `Field10:` + fmt.Sprintf("%v", this.Field10) + `,`, + `Field11:` + fmt.Sprintf("%v", this.Field11) + `,`, + `Field12:` + fmt.Sprintf("%v", this.Field12) + `,`, + `Field13:` + fmt.Sprintf("%v", this.Field13) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NidOptStruct) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NidOptStruct{`, + `Field1:` + fmt.Sprintf("%v", this.Field1) + `,`, + `Field2:` + fmt.Sprintf("%v", this.Field2) + `,`, + `Field3:` + strings.Replace(strings.Replace(this.Field3.String(), "NidOptNative", "NidOptNative", 1), `&`, ``, 1) + `,`, + `Field4:` + strings.Replace(strings.Replace(this.Field4.String(), "NinOptNative", "NinOptNative", 1), `&`, ``, 1) + `,`, + `Field6:` + fmt.Sprintf("%v", this.Field6) + `,`, + `Field7:` + fmt.Sprintf("%v", this.Field7) + `,`, + `Field8:` + strings.Replace(strings.Replace(this.Field8.String(), "NidOptNative", "NidOptNative", 1), `&`, ``, 1) + `,`, + `Field13:` + fmt.Sprintf("%v", this.Field13) + `,`, + `Field14:` + fmt.Sprintf("%v", this.Field14) + `,`, + `Field15:` + fmt.Sprintf("%v", this.Field15) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NinOptStruct) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NinOptStruct{`, + `Field1:` + valueToStringThetest(this.Field1) + `,`, + `Field2:` + valueToStringThetest(this.Field2) + `,`, + `Field3:` + strings.Replace(fmt.Sprintf("%v", this.Field3), "NidOptNative", "NidOptNative", 1) + `,`, + `Field4:` + strings.Replace(fmt.Sprintf("%v", this.Field4), "NinOptNative", "NinOptNative", 1) + `,`, + `Field6:` + valueToStringThetest(this.Field6) + `,`, + `Field7:` + valueToStringThetest(this.Field7) + `,`, + `Field8:` + strings.Replace(fmt.Sprintf("%v", this.Field8), "NidOptNative", "NidOptNative", 1) + `,`, + `Field13:` + valueToStringThetest(this.Field13) + `,`, + `Field14:` + valueToStringThetest(this.Field14) + `,`, + `Field15:` + valueToStringThetest(this.Field15) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NidRepStruct) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NidRepStruct{`, + `Field1:` + fmt.Sprintf("%v", this.Field1) + `,`, + `Field2:` + fmt.Sprintf("%v", this.Field2) + `,`, + `Field3:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Field3), "NidOptNative", "NidOptNative", 1), `&`, ``, 1) + `,`, + `Field4:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Field4), "NinOptNative", "NinOptNative", 1), `&`, ``, 1) + `,`, + `Field6:` + fmt.Sprintf("%v", this.Field6) + `,`, + `Field7:` + fmt.Sprintf("%v", this.Field7) + `,`, + `Field8:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Field8), "NidOptNative", "NidOptNative", 1), `&`, ``, 1) + `,`, + `Field13:` + fmt.Sprintf("%v", this.Field13) + `,`, + `Field14:` + fmt.Sprintf("%v", this.Field14) + `,`, + `Field15:` + fmt.Sprintf("%v", this.Field15) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NinRepStruct) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NinRepStruct{`, + `Field1:` + fmt.Sprintf("%v", this.Field1) + `,`, + `Field2:` + fmt.Sprintf("%v", this.Field2) + `,`, + `Field3:` + strings.Replace(fmt.Sprintf("%v", this.Field3), "NidOptNative", "NidOptNative", 1) + `,`, + `Field4:` + strings.Replace(fmt.Sprintf("%v", this.Field4), "NinOptNative", "NinOptNative", 1) + `,`, + `Field6:` + fmt.Sprintf("%v", this.Field6) + `,`, + `Field7:` + fmt.Sprintf("%v", this.Field7) + `,`, + `Field8:` + strings.Replace(fmt.Sprintf("%v", this.Field8), "NidOptNative", "NidOptNative", 1) + `,`, + `Field13:` + fmt.Sprintf("%v", this.Field13) + `,`, + `Field14:` + fmt.Sprintf("%v", this.Field14) + `,`, + `Field15:` + fmt.Sprintf("%v", this.Field15) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NidEmbeddedStruct) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NidEmbeddedStruct{`, + `NidOptNative:` + strings.Replace(fmt.Sprintf("%v", this.NidOptNative), "NidOptNative", "NidOptNative", 1) + `,`, + `Field200:` + strings.Replace(strings.Replace(this.Field200.String(), "NidOptNative", "NidOptNative", 1), `&`, ``, 1) + `,`, + `Field210:` + fmt.Sprintf("%v", this.Field210) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NinEmbeddedStruct) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NinEmbeddedStruct{`, + `NidOptNative:` + strings.Replace(fmt.Sprintf("%v", this.NidOptNative), "NidOptNative", "NidOptNative", 1) + `,`, + `Field200:` + strings.Replace(fmt.Sprintf("%v", this.Field200), "NidOptNative", "NidOptNative", 1) + `,`, + `Field210:` + valueToStringThetest(this.Field210) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NidNestedStruct) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NidNestedStruct{`, + `Field1:` + strings.Replace(strings.Replace(this.Field1.String(), "NidOptStruct", "NidOptStruct", 1), `&`, ``, 1) + `,`, + `Field2:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Field2), "NidRepStruct", "NidRepStruct", 1), `&`, ``, 1) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NinNestedStruct) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NinNestedStruct{`, + `Field1:` + strings.Replace(fmt.Sprintf("%v", this.Field1), "NinOptStruct", "NinOptStruct", 1) + `,`, + `Field2:` + strings.Replace(fmt.Sprintf("%v", this.Field2), "NinRepStruct", "NinRepStruct", 1) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NidOptCustom) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NidOptCustom{`, + `Id:` + fmt.Sprintf("%v", this.Id) + `,`, + `Value:` + fmt.Sprintf("%v", this.Value) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *CustomDash) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&CustomDash{`, + `Value:` + valueToStringThetest(this.Value) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NinOptCustom) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NinOptCustom{`, + `Id:` + valueToStringThetest(this.Id) + `,`, + `Value:` + valueToStringThetest(this.Value) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NidRepCustom) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NidRepCustom{`, + `Id:` + fmt.Sprintf("%v", this.Id) + `,`, + `Value:` + fmt.Sprintf("%v", this.Value) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NinRepCustom) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NinRepCustom{`, + `Id:` + fmt.Sprintf("%v", this.Id) + `,`, + `Value:` + fmt.Sprintf("%v", this.Value) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NinOptNativeUnion) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NinOptNativeUnion{`, + `Field1:` + valueToStringThetest(this.Field1) + `,`, + `Field2:` + valueToStringThetest(this.Field2) + `,`, + `Field3:` + valueToStringThetest(this.Field3) + `,`, + `Field4:` + valueToStringThetest(this.Field4) + `,`, + `Field5:` + valueToStringThetest(this.Field5) + `,`, + `Field6:` + valueToStringThetest(this.Field6) + `,`, + `Field13:` + valueToStringThetest(this.Field13) + `,`, + `Field14:` + valueToStringThetest(this.Field14) + `,`, + `Field15:` + valueToStringThetest(this.Field15) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NinOptStructUnion) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NinOptStructUnion{`, + `Field1:` + valueToStringThetest(this.Field1) + `,`, + `Field2:` + valueToStringThetest(this.Field2) + `,`, + `Field3:` + strings.Replace(fmt.Sprintf("%v", this.Field3), "NidOptNative", "NidOptNative", 1) + `,`, + `Field4:` + strings.Replace(fmt.Sprintf("%v", this.Field4), "NinOptNative", "NinOptNative", 1) + `,`, + `Field6:` + valueToStringThetest(this.Field6) + `,`, + `Field7:` + valueToStringThetest(this.Field7) + `,`, + `Field13:` + valueToStringThetest(this.Field13) + `,`, + `Field14:` + valueToStringThetest(this.Field14) + `,`, + `Field15:` + valueToStringThetest(this.Field15) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NinEmbeddedStructUnion) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NinEmbeddedStructUnion{`, + `NidOptNative:` + strings.Replace(fmt.Sprintf("%v", this.NidOptNative), "NidOptNative", "NidOptNative", 1) + `,`, + `Field200:` + strings.Replace(fmt.Sprintf("%v", this.Field200), "NinOptNative", "NinOptNative", 1) + `,`, + `Field210:` + valueToStringThetest(this.Field210) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NinNestedStructUnion) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NinNestedStructUnion{`, + `Field1:` + strings.Replace(fmt.Sprintf("%v", this.Field1), "NinOptNativeUnion", "NinOptNativeUnion", 1) + `,`, + `Field2:` + strings.Replace(fmt.Sprintf("%v", this.Field2), "NinOptStructUnion", "NinOptStructUnion", 1) + `,`, + `Field3:` + strings.Replace(fmt.Sprintf("%v", this.Field3), "NinEmbeddedStructUnion", "NinEmbeddedStructUnion", 1) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *Tree) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&Tree{`, + `Or:` + strings.Replace(fmt.Sprintf("%v", this.Or), "OrBranch", "OrBranch", 1) + `,`, + `And:` + strings.Replace(fmt.Sprintf("%v", this.And), "AndBranch", "AndBranch", 1) + `,`, + `Leaf:` + strings.Replace(fmt.Sprintf("%v", this.Leaf), "Leaf", "Leaf", 1) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *OrBranch) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&OrBranch{`, + `Left:` + strings.Replace(strings.Replace(this.Left.String(), "Tree", "Tree", 1), `&`, ``, 1) + `,`, + `Right:` + strings.Replace(strings.Replace(this.Right.String(), "Tree", "Tree", 1), `&`, ``, 1) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *AndBranch) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&AndBranch{`, + `Left:` + strings.Replace(strings.Replace(this.Left.String(), "Tree", "Tree", 1), `&`, ``, 1) + `,`, + `Right:` + strings.Replace(strings.Replace(this.Right.String(), "Tree", "Tree", 1), `&`, ``, 1) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *Leaf) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&Leaf{`, + `Value:` + fmt.Sprintf("%v", this.Value) + `,`, + `StrValue:` + fmt.Sprintf("%v", this.StrValue) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *DeepTree) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&DeepTree{`, + `Down:` + strings.Replace(fmt.Sprintf("%v", this.Down), "ADeepBranch", "ADeepBranch", 1) + `,`, + `And:` + strings.Replace(fmt.Sprintf("%v", this.And), "AndDeepBranch", "AndDeepBranch", 1) + `,`, + `Leaf:` + strings.Replace(fmt.Sprintf("%v", this.Leaf), "DeepLeaf", "DeepLeaf", 1) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *ADeepBranch) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&ADeepBranch{`, + `Down:` + strings.Replace(strings.Replace(this.Down.String(), "DeepTree", "DeepTree", 1), `&`, ``, 1) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *AndDeepBranch) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&AndDeepBranch{`, + `Left:` + strings.Replace(strings.Replace(this.Left.String(), "DeepTree", "DeepTree", 1), `&`, ``, 1) + `,`, + `Right:` + strings.Replace(strings.Replace(this.Right.String(), "DeepTree", "DeepTree", 1), `&`, ``, 1) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *DeepLeaf) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&DeepLeaf{`, + `Tree:` + strings.Replace(strings.Replace(this.Tree.String(), "Tree", "Tree", 1), `&`, ``, 1) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *Nil) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&Nil{`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NidOptEnum) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NidOptEnum{`, + `Field1:` + fmt.Sprintf("%v", this.Field1) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NinOptEnum) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NinOptEnum{`, + `Field1:` + valueToStringThetest(this.Field1) + `,`, + `Field2:` + valueToStringThetest(this.Field2) + `,`, + `Field3:` + valueToStringThetest(this.Field3) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NidRepEnum) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NidRepEnum{`, + `Field1:` + fmt.Sprintf("%v", this.Field1) + `,`, + `Field2:` + fmt.Sprintf("%v", this.Field2) + `,`, + `Field3:` + fmt.Sprintf("%v", this.Field3) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NinRepEnum) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NinRepEnum{`, + `Field1:` + fmt.Sprintf("%v", this.Field1) + `,`, + `Field2:` + fmt.Sprintf("%v", this.Field2) + `,`, + `Field3:` + fmt.Sprintf("%v", this.Field3) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NinOptEnumDefault) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NinOptEnumDefault{`, + `Field1:` + valueToStringThetest(this.Field1) + `,`, + `Field2:` + valueToStringThetest(this.Field2) + `,`, + `Field3:` + valueToStringThetest(this.Field3) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *AnotherNinOptEnum) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&AnotherNinOptEnum{`, + `Field1:` + valueToStringThetest(this.Field1) + `,`, + `Field2:` + valueToStringThetest(this.Field2) + `,`, + `Field3:` + valueToStringThetest(this.Field3) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *AnotherNinOptEnumDefault) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&AnotherNinOptEnumDefault{`, + `Field1:` + valueToStringThetest(this.Field1) + `,`, + `Field2:` + valueToStringThetest(this.Field2) + `,`, + `Field3:` + valueToStringThetest(this.Field3) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *Timer) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&Timer{`, + `Time1:` + fmt.Sprintf("%v", this.Time1) + `,`, + `Time2:` + fmt.Sprintf("%v", this.Time2) + `,`, + `Data:` + fmt.Sprintf("%v", this.Data) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *MyExtendable) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&MyExtendable{`, + `Field1:` + valueToStringThetest(this.Field1) + `,`, + `XXX_extensions:` + proto.StringFromExtensionsMap(this.XXX_extensions) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *OtherExtenable) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&OtherExtenable{`, + `Field2:` + valueToStringThetest(this.Field2) + `,`, + `Field13:` + valueToStringThetest(this.Field13) + `,`, + `M:` + strings.Replace(fmt.Sprintf("%v", this.M), "MyExtendable", "MyExtendable", 1) + `,`, + `XXX_extensions:` + proto.StringFromExtensionsMap(this.XXX_extensions) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NestedDefinition) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NestedDefinition{`, + `Field1:` + valueToStringThetest(this.Field1) + `,`, + `EnumField:` + valueToStringThetest(this.EnumField) + `,`, + `NNM:` + strings.Replace(fmt.Sprintf("%v", this.NNM), "NestedDefinition_NestedMessage_NestedNestedMsg", "NestedDefinition_NestedMessage_NestedNestedMsg", 1) + `,`, + `NM:` + strings.Replace(fmt.Sprintf("%v", this.NM), "NestedDefinition_NestedMessage", "NestedDefinition_NestedMessage", 1) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NestedDefinition_NestedMessage) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NestedDefinition_NestedMessage{`, + `NestedField1:` + valueToStringThetest(this.NestedField1) + `,`, + `NNM:` + strings.Replace(fmt.Sprintf("%v", this.NNM), "NestedDefinition_NestedMessage_NestedNestedMsg", "NestedDefinition_NestedMessage_NestedNestedMsg", 1) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NestedDefinition_NestedMessage_NestedNestedMsg) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NestedDefinition_NestedMessage_NestedNestedMsg{`, + `NestedNestedField1:` + valueToStringThetest(this.NestedNestedField1) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NestedScope) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NestedScope{`, + `A:` + strings.Replace(fmt.Sprintf("%v", this.A), "NestedDefinition_NestedMessage_NestedNestedMsg", "NestedDefinition_NestedMessage_NestedNestedMsg", 1) + `,`, + `B:` + valueToStringThetest(this.B) + `,`, + `C:` + strings.Replace(fmt.Sprintf("%v", this.C), "NestedDefinition_NestedMessage", "NestedDefinition_NestedMessage", 1) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NinOptNativeDefault) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NinOptNativeDefault{`, + `Field1:` + valueToStringThetest(this.Field1) + `,`, + `Field2:` + valueToStringThetest(this.Field2) + `,`, + `Field3:` + valueToStringThetest(this.Field3) + `,`, + `Field4:` + valueToStringThetest(this.Field4) + `,`, + `Field5:` + valueToStringThetest(this.Field5) + `,`, + `Field6:` + valueToStringThetest(this.Field6) + `,`, + `Field7:` + valueToStringThetest(this.Field7) + `,`, + `Field8:` + valueToStringThetest(this.Field8) + `,`, + `Field9:` + valueToStringThetest(this.Field9) + `,`, + `Field10:` + valueToStringThetest(this.Field10) + `,`, + `Field11:` + valueToStringThetest(this.Field11) + `,`, + `Field12:` + valueToStringThetest(this.Field12) + `,`, + `Field13:` + valueToStringThetest(this.Field13) + `,`, + `Field14:` + valueToStringThetest(this.Field14) + `,`, + `Field15:` + valueToStringThetest(this.Field15) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *CustomContainer) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&CustomContainer{`, + `CustomStruct:` + strings.Replace(strings.Replace(this.CustomStruct.String(), "NidOptCustom", "NidOptCustom", 1), `&`, ``, 1) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *CustomNameNidOptNative) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&CustomNameNidOptNative{`, + `FieldA:` + fmt.Sprintf("%v", this.FieldA) + `,`, + `FieldB:` + fmt.Sprintf("%v", this.FieldB) + `,`, + `FieldC:` + fmt.Sprintf("%v", this.FieldC) + `,`, + `FieldD:` + fmt.Sprintf("%v", this.FieldD) + `,`, + `FieldE:` + fmt.Sprintf("%v", this.FieldE) + `,`, + `FieldF:` + fmt.Sprintf("%v", this.FieldF) + `,`, + `FieldG:` + fmt.Sprintf("%v", this.FieldG) + `,`, + `FieldH:` + fmt.Sprintf("%v", this.FieldH) + `,`, + `FieldI:` + fmt.Sprintf("%v", this.FieldI) + `,`, + `FieldJ:` + fmt.Sprintf("%v", this.FieldJ) + `,`, + `FieldK:` + fmt.Sprintf("%v", this.FieldK) + `,`, + `FieldL:` + fmt.Sprintf("%v", this.FieldL) + `,`, + `FieldM:` + fmt.Sprintf("%v", this.FieldM) + `,`, + `FieldN:` + fmt.Sprintf("%v", this.FieldN) + `,`, + `FieldO:` + fmt.Sprintf("%v", this.FieldO) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *CustomNameNinOptNative) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&CustomNameNinOptNative{`, + `FieldA:` + valueToStringThetest(this.FieldA) + `,`, + `FieldB:` + valueToStringThetest(this.FieldB) + `,`, + `FieldC:` + valueToStringThetest(this.FieldC) + `,`, + `FieldD:` + valueToStringThetest(this.FieldD) + `,`, + `FieldE:` + valueToStringThetest(this.FieldE) + `,`, + `FieldF:` + valueToStringThetest(this.FieldF) + `,`, + `FieldG:` + valueToStringThetest(this.FieldG) + `,`, + `FieldH:` + valueToStringThetest(this.FieldH) + `,`, + `FieldI:` + valueToStringThetest(this.FieldI) + `,`, + `FieldJ:` + valueToStringThetest(this.FieldJ) + `,`, + `FieldK:` + valueToStringThetest(this.FieldK) + `,`, + `FielL:` + valueToStringThetest(this.FielL) + `,`, + `FieldM:` + valueToStringThetest(this.FieldM) + `,`, + `FieldN:` + valueToStringThetest(this.FieldN) + `,`, + `FieldO:` + valueToStringThetest(this.FieldO) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *CustomNameNinRepNative) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&CustomNameNinRepNative{`, + `FieldA:` + fmt.Sprintf("%v", this.FieldA) + `,`, + `FieldB:` + fmt.Sprintf("%v", this.FieldB) + `,`, + `FieldC:` + fmt.Sprintf("%v", this.FieldC) + `,`, + `FieldD:` + fmt.Sprintf("%v", this.FieldD) + `,`, + `FieldE:` + fmt.Sprintf("%v", this.FieldE) + `,`, + `FieldF:` + fmt.Sprintf("%v", this.FieldF) + `,`, + `FieldG:` + fmt.Sprintf("%v", this.FieldG) + `,`, + `FieldH:` + fmt.Sprintf("%v", this.FieldH) + `,`, + `FieldI:` + fmt.Sprintf("%v", this.FieldI) + `,`, + `FieldJ:` + fmt.Sprintf("%v", this.FieldJ) + `,`, + `FieldK:` + fmt.Sprintf("%v", this.FieldK) + `,`, + `FieldL:` + fmt.Sprintf("%v", this.FieldL) + `,`, + `FieldM:` + fmt.Sprintf("%v", this.FieldM) + `,`, + `FieldN:` + fmt.Sprintf("%v", this.FieldN) + `,`, + `FieldO:` + fmt.Sprintf("%v", this.FieldO) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *CustomNameNinStruct) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&CustomNameNinStruct{`, + `FieldA:` + valueToStringThetest(this.FieldA) + `,`, + `FieldB:` + valueToStringThetest(this.FieldB) + `,`, + `FieldC:` + strings.Replace(fmt.Sprintf("%v", this.FieldC), "NidOptNative", "NidOptNative", 1) + `,`, + `FieldD:` + strings.Replace(fmt.Sprintf("%v", this.FieldD), "NinOptNative", "NinOptNative", 1) + `,`, + `FieldE:` + valueToStringThetest(this.FieldE) + `,`, + `FieldF:` + valueToStringThetest(this.FieldF) + `,`, + `FieldG:` + strings.Replace(fmt.Sprintf("%v", this.FieldG), "NidOptNative", "NidOptNative", 1) + `,`, + `FieldH:` + valueToStringThetest(this.FieldH) + `,`, + `FieldI:` + valueToStringThetest(this.FieldI) + `,`, + `FieldJ:` + valueToStringThetest(this.FieldJ) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *CustomNameCustomType) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&CustomNameCustomType{`, + `FieldA:` + valueToStringThetest(this.FieldA) + `,`, + `FieldB:` + valueToStringThetest(this.FieldB) + `,`, + `FieldC:` + fmt.Sprintf("%v", this.FieldC) + `,`, + `FieldD:` + fmt.Sprintf("%v", this.FieldD) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *CustomNameNinEmbeddedStructUnion) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&CustomNameNinEmbeddedStructUnion{`, + `NidOptNative:` + strings.Replace(fmt.Sprintf("%v", this.NidOptNative), "NidOptNative", "NidOptNative", 1) + `,`, + `FieldA:` + strings.Replace(fmt.Sprintf("%v", this.FieldA), "NinOptNative", "NinOptNative", 1) + `,`, + `FieldB:` + valueToStringThetest(this.FieldB) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *CustomNameEnum) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&CustomNameEnum{`, + `FieldA:` + valueToStringThetest(this.FieldA) + `,`, + `FieldB:` + fmt.Sprintf("%v", this.FieldB) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NoExtensionsMap) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NoExtensionsMap{`, + `Field1:` + valueToStringThetest(this.Field1) + `,`, + `XXX_extensions:` + proto.StringFromExtensionsBytes(this.XXX_extensions) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *Unrecognized) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&Unrecognized{`, + `Field1:` + valueToStringThetest(this.Field1) + `,`, + `}`, + }, "") + return s +} +func (this *UnrecognizedWithInner) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&UnrecognizedWithInner{`, + `Embedded:` + strings.Replace(fmt.Sprintf("%v", this.Embedded), "UnrecognizedWithInner_Inner", "UnrecognizedWithInner_Inner", 1) + `,`, + `Field2:` + valueToStringThetest(this.Field2) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *UnrecognizedWithInner_Inner) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&UnrecognizedWithInner_Inner{`, + `Field1:` + valueToStringThetest(this.Field1) + `,`, + `}`, + }, "") + return s +} +func (this *UnrecognizedWithEmbed) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&UnrecognizedWithEmbed{`, + `UnrecognizedWithEmbed_Embedded:` + strings.Replace(strings.Replace(this.UnrecognizedWithEmbed_Embedded.String(), "UnrecognizedWithEmbed_Embedded", "UnrecognizedWithEmbed_Embedded", 1), `&`, ``, 1) + `,`, + `Field2:` + valueToStringThetest(this.Field2) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *UnrecognizedWithEmbed_Embedded) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&UnrecognizedWithEmbed_Embedded{`, + `Field1:` + valueToStringThetest(this.Field1) + `,`, + `}`, + }, "") + return s +} +func (this *Node) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&Node{`, + `Label:` + valueToStringThetest(this.Label) + `,`, + `Children:` + strings.Replace(fmt.Sprintf("%v", this.Children), "Node", "Node", 1) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func valueToStringThetest(v interface{}) string { + rv := reflect.ValueOf(v) + if rv.IsNil() { + return "nil" + } + pv := reflect.Indirect(rv).Interface() + return fmt.Sprintf("*%v", pv) +} +func (this *NinOptNativeUnion) GetValue() interface{} { + if this.Field1 != nil { + return this.Field1 + } + if this.Field2 != nil { + return this.Field2 + } + if this.Field3 != nil { + return this.Field3 + } + if this.Field4 != nil { + return this.Field4 + } + if this.Field5 != nil { + return this.Field5 + } + if this.Field6 != nil { + return this.Field6 + } + if this.Field13 != nil { + return this.Field13 + } + if this.Field14 != nil { + return this.Field14 + } + if this.Field15 != nil { + return this.Field15 + } + return nil +} + +func (this *NinOptNativeUnion) SetValue(value interface{}) bool { + switch vt := value.(type) { + case *float64: + this.Field1 = vt + case *float32: + this.Field2 = vt + case *int32: + this.Field3 = vt + case *int64: + this.Field4 = vt + case *uint32: + this.Field5 = vt + case *uint64: + this.Field6 = vt + case *bool: + this.Field13 = vt + case *string: + this.Field14 = vt + case []byte: + this.Field15 = vt + default: + return false + } + return true +} +func (this *NinOptStructUnion) GetValue() interface{} { + if this.Field1 != nil { + return this.Field1 + } + if this.Field2 != nil { + return this.Field2 + } + if this.Field3 != nil { + return this.Field3 + } + if this.Field4 != nil { + return this.Field4 + } + if this.Field6 != nil { + return this.Field6 + } + if this.Field7 != nil { + return this.Field7 + } + if this.Field13 != nil { + return this.Field13 + } + if this.Field14 != nil { + return this.Field14 + } + if this.Field15 != nil { + return this.Field15 + } + return nil +} + +func (this *NinOptStructUnion) SetValue(value interface{}) bool { + switch vt := value.(type) { + case *float64: + this.Field1 = vt + case *float32: + this.Field2 = vt + case *NidOptNative: + this.Field3 = vt + case *NinOptNative: + this.Field4 = vt + case *uint64: + this.Field6 = vt + case *int32: + this.Field7 = vt + case *bool: + this.Field13 = vt + case *string: + this.Field14 = vt + case []byte: + this.Field15 = vt + default: + return false + } + return true +} +func (this *NinEmbeddedStructUnion) GetValue() interface{} { + if this.NidOptNative != nil { + return this.NidOptNative + } + if this.Field200 != nil { + return this.Field200 + } + if this.Field210 != nil { + return this.Field210 + } + return nil +} + +func (this *NinEmbeddedStructUnion) SetValue(value interface{}) bool { + switch vt := value.(type) { + case *NidOptNative: + this.NidOptNative = vt + case *NinOptNative: + this.Field200 = vt + case *bool: + this.Field210 = vt + default: + return false + } + return true +} +func (this *NinNestedStructUnion) GetValue() interface{} { + if this.Field1 != nil { + return this.Field1 + } + if this.Field2 != nil { + return this.Field2 + } + if this.Field3 != nil { + return this.Field3 + } + return nil +} + +func (this *NinNestedStructUnion) SetValue(value interface{}) bool { + switch vt := value.(type) { + case *NinOptNativeUnion: + this.Field1 = vt + case *NinOptStructUnion: + this.Field2 = vt + case *NinEmbeddedStructUnion: + this.Field3 = vt + default: + this.Field1 = new(NinOptNativeUnion) + if set := this.Field1.SetValue(value); set { + return true + } + this.Field1 = nil + this.Field2 = new(NinOptStructUnion) + if set := this.Field2.SetValue(value); set { + return true + } + this.Field2 = nil + this.Field3 = new(NinEmbeddedStructUnion) + if set := this.Field3.SetValue(value); set { + return true + } + this.Field3 = nil + return false + } + return true +} +func (this *Tree) GetValue() interface{} { + if this.Or != nil { + return this.Or + } + if this.And != nil { + return this.And + } + if this.Leaf != nil { + return this.Leaf + } + return nil +} + +func (this *Tree) SetValue(value interface{}) bool { + switch vt := value.(type) { + case *OrBranch: + this.Or = vt + case *AndBranch: + this.And = vt + case *Leaf: + this.Leaf = vt + default: + return false + } + return true +} +func (this *DeepTree) GetValue() interface{} { + if this.Down != nil { + return this.Down + } + if this.And != nil { + return this.And + } + if this.Leaf != nil { + return this.Leaf + } + return nil +} + +func (this *DeepTree) SetValue(value interface{}) bool { + switch vt := value.(type) { + case *ADeepBranch: + this.Down = vt + case *AndDeepBranch: + this.And = vt + case *DeepLeaf: + this.Leaf = vt + default: + return false + } + return true +} +func (this *CustomNameNinEmbeddedStructUnion) GetValue() interface{} { + if this.NidOptNative != nil { + return this.NidOptNative + } + if this.FieldA != nil { + return this.FieldA + } + if this.FieldB != nil { + return this.FieldB + } + return nil +} + +func (this *CustomNameNinEmbeddedStructUnion) SetValue(value interface{}) bool { + switch vt := value.(type) { + case *NidOptNative: + this.NidOptNative = vt + case *NinOptNative: + this.FieldA = vt + case *bool: + this.FieldB = vt + default: + return false + } + return true +} +func (m *NidOptNative) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *NidOptNative) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + data[i] = 0x9 + i++ + *(*float64)(unsafe.Pointer(&data[i])) = m.Field1 + i += 8 + data[i] = 0x15 + i++ + *(*float32)(unsafe.Pointer(&data[i])) = m.Field2 + i += 4 + data[i] = 0x18 + i++ + i = encodeVarintThetest(data, i, uint64(m.Field3)) + data[i] = 0x20 + i++ + i = encodeVarintThetest(data, i, uint64(m.Field4)) + data[i] = 0x28 + i++ + i = encodeVarintThetest(data, i, uint64(m.Field5)) + data[i] = 0x30 + i++ + i = encodeVarintThetest(data, i, uint64(m.Field6)) + data[i] = 0x38 + i++ + i = encodeVarintThetest(data, i, uint64((uint32(m.Field7)<<1)^uint32((m.Field7>>31)))) + data[i] = 0x40 + i++ + i = encodeVarintThetest(data, i, uint64((uint64(m.Field8)<<1)^uint64((m.Field8>>63)))) + data[i] = 0x4d + i++ + *(*uint32)(unsafe.Pointer(&data[i])) = m.Field9 + i += 4 + data[i] = 0x55 + i++ + *(*int32)(unsafe.Pointer(&data[i])) = m.Field10 + i += 4 + data[i] = 0x59 + i++ + *(*uint64)(unsafe.Pointer(&data[i])) = m.Field11 + i += 8 + data[i] = 0x61 + i++ + *(*int64)(unsafe.Pointer(&data[i])) = m.Field12 + i += 8 + data[i] = 0x68 + i++ + if m.Field13 { + data[i] = 1 + } else { + data[i] = 0 + } + i++ + data[i] = 0x72 + i++ + i = encodeVarintThetest(data, i, uint64(len(m.Field14))) + i += copy(data[i:], m.Field14) + if m.Field15 != nil { + data[i] = 0x7a + i++ + i = encodeVarintThetest(data, i, uint64(len(m.Field15))) + i += copy(data[i:], m.Field15) + } + if m.XXX_unrecognized != nil { + i += copy(data[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *NinOptNative) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *NinOptNative) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Field1 != nil { + data[i] = 0x9 + i++ + *(*float64)(unsafe.Pointer(&data[i])) = *m.Field1 + i += 8 + } + if m.Field2 != nil { + data[i] = 0x15 + i++ + *(*float32)(unsafe.Pointer(&data[i])) = *m.Field2 + i += 4 + } + if m.Field3 != nil { + data[i] = 0x18 + i++ + i = encodeVarintThetest(data, i, uint64(*m.Field3)) + } + if m.Field4 != nil { + data[i] = 0x20 + i++ + i = encodeVarintThetest(data, i, uint64(*m.Field4)) + } + if m.Field5 != nil { + data[i] = 0x28 + i++ + i = encodeVarintThetest(data, i, uint64(*m.Field5)) + } + if m.Field6 != nil { + data[i] = 0x30 + i++ + i = encodeVarintThetest(data, i, uint64(*m.Field6)) + } + if m.Field7 != nil { + data[i] = 0x38 + i++ + i = encodeVarintThetest(data, i, uint64((uint32(*m.Field7)<<1)^uint32((*m.Field7>>31)))) + } + if m.Field8 != nil { + data[i] = 0x40 + i++ + i = encodeVarintThetest(data, i, uint64((uint64(*m.Field8)<<1)^uint64((*m.Field8>>63)))) + } + if m.Field9 != nil { + data[i] = 0x4d + i++ + *(*uint32)(unsafe.Pointer(&data[i])) = *m.Field9 + i += 4 + } + if m.Field10 != nil { + data[i] = 0x55 + i++ + *(*int32)(unsafe.Pointer(&data[i])) = *m.Field10 + i += 4 + } + if m.Field11 != nil { + data[i] = 0x59 + i++ + *(*uint64)(unsafe.Pointer(&data[i])) = *m.Field11 + i += 8 + } + if m.Field12 != nil { + data[i] = 0x61 + i++ + *(*int64)(unsafe.Pointer(&data[i])) = *m.Field12 + i += 8 + } + if m.Field13 != nil { + data[i] = 0x68 + i++ + if *m.Field13 { + data[i] = 1 + } else { + data[i] = 0 + } + i++ + } + if m.Field14 != nil { + data[i] = 0x72 + i++ + i = encodeVarintThetest(data, i, uint64(len(*m.Field14))) + i += copy(data[i:], *m.Field14) + } + if m.Field15 != nil { + data[i] = 0x7a + i++ + i = encodeVarintThetest(data, i, uint64(len(m.Field15))) + i += copy(data[i:], m.Field15) + } + if m.XXX_unrecognized != nil { + i += copy(data[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *NidRepNative) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *NidRepNative) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Field1) > 0 { + for _, num := range m.Field1 { + data[i] = 0x9 + i++ + *(*float64)(unsafe.Pointer(&data[i])) = num + i += 8 + } + } + if len(m.Field2) > 0 { + for _, num := range m.Field2 { + data[i] = 0x15 + i++ + *(*float32)(unsafe.Pointer(&data[i])) = num + i += 4 + } + } + if len(m.Field3) > 0 { + for _, num := range m.Field3 { + data[i] = 0x18 + i++ + i = encodeVarintThetest(data, i, uint64(num)) + } + } + if len(m.Field4) > 0 { + for _, num := range m.Field4 { + data[i] = 0x20 + i++ + i = encodeVarintThetest(data, i, uint64(num)) + } + } + if len(m.Field5) > 0 { + for _, num := range m.Field5 { + data[i] = 0x28 + i++ + i = encodeVarintThetest(data, i, uint64(num)) + } + } + if len(m.Field6) > 0 { + for _, num := range m.Field6 { + data[i] = 0x30 + i++ + i = encodeVarintThetest(data, i, uint64(num)) + } + } + if len(m.Field7) > 0 { + for _, num := range m.Field7 { + data[i] = 0x38 + i++ + x1 := (uint32(num) << 1) ^ uint32((num >> 31)) + for x1 >= 1<<7 { + data[i] = uint8(uint64(x1)&0x7f | 0x80) + x1 >>= 7 + i++ + } + data[i] = uint8(x1) + i++ + } + } + if len(m.Field8) > 0 { + for _, num := range m.Field8 { + data[i] = 0x40 + i++ + x2 := (uint64(num) << 1) ^ uint64((num >> 63)) + for x2 >= 1<<7 { + data[i] = uint8(uint64(x2)&0x7f | 0x80) + x2 >>= 7 + i++ + } + data[i] = uint8(x2) + i++ + } + } + if len(m.Field9) > 0 { + for _, num := range m.Field9 { + data[i] = 0x4d + i++ + *(*uint32)(unsafe.Pointer(&data[i])) = num + i += 4 + } + } + if len(m.Field10) > 0 { + for _, num := range m.Field10 { + data[i] = 0x55 + i++ + *(*int32)(unsafe.Pointer(&data[i])) = num + i += 4 + } + } + if len(m.Field11) > 0 { + for _, num := range m.Field11 { + data[i] = 0x59 + i++ + *(*uint64)(unsafe.Pointer(&data[i])) = num + i += 8 + } + } + if len(m.Field12) > 0 { + for _, num := range m.Field12 { + data[i] = 0x61 + i++ + *(*int64)(unsafe.Pointer(&data[i])) = num + i += 8 + } + } + if len(m.Field13) > 0 { + for _, b := range m.Field13 { + data[i] = 0x68 + i++ + if b { + data[i] = 1 + } else { + data[i] = 0 + } + i++ + } + } + if len(m.Field14) > 0 { + for _, s := range m.Field14 { + data[i] = 0x72 + 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 len(m.Field15) > 0 { + for _, b := range m.Field15 { + data[i] = 0x7a + i++ + i = encodeVarintThetest(data, i, uint64(len(b))) + i += copy(data[i:], b) + } + } + if m.XXX_unrecognized != nil { + i += copy(data[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *NinRepNative) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *NinRepNative) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Field1) > 0 { + for _, num := range m.Field1 { + data[i] = 0x9 + i++ + *(*float64)(unsafe.Pointer(&data[i])) = num + i += 8 + } + } + if len(m.Field2) > 0 { + for _, num := range m.Field2 { + data[i] = 0x15 + i++ + *(*float32)(unsafe.Pointer(&data[i])) = num + i += 4 + } + } + if len(m.Field3) > 0 { + for _, num := range m.Field3 { + data[i] = 0x18 + i++ + i = encodeVarintThetest(data, i, uint64(num)) + } + } + if len(m.Field4) > 0 { + for _, num := range m.Field4 { + data[i] = 0x20 + i++ + i = encodeVarintThetest(data, i, uint64(num)) + } + } + if len(m.Field5) > 0 { + for _, num := range m.Field5 { + data[i] = 0x28 + i++ + i = encodeVarintThetest(data, i, uint64(num)) + } + } + if len(m.Field6) > 0 { + for _, num := range m.Field6 { + data[i] = 0x30 + i++ + i = encodeVarintThetest(data, i, uint64(num)) + } + } + if len(m.Field7) > 0 { + for _, num := range m.Field7 { + data[i] = 0x38 + i++ + x3 := (uint32(num) << 1) ^ uint32((num >> 31)) + for x3 >= 1<<7 { + data[i] = uint8(uint64(x3)&0x7f | 0x80) + x3 >>= 7 + i++ + } + data[i] = uint8(x3) + i++ + } + } + if len(m.Field8) > 0 { + for _, num := range m.Field8 { + data[i] = 0x40 + i++ + x4 := (uint64(num) << 1) ^ uint64((num >> 63)) + for x4 >= 1<<7 { + data[i] = uint8(uint64(x4)&0x7f | 0x80) + x4 >>= 7 + i++ + } + data[i] = uint8(x4) + i++ + } + } + if len(m.Field9) > 0 { + for _, num := range m.Field9 { + data[i] = 0x4d + i++ + *(*uint32)(unsafe.Pointer(&data[i])) = num + i += 4 + } + } + if len(m.Field10) > 0 { + for _, num := range m.Field10 { + data[i] = 0x55 + i++ + *(*int32)(unsafe.Pointer(&data[i])) = num + i += 4 + } + } + if len(m.Field11) > 0 { + for _, num := range m.Field11 { + data[i] = 0x59 + i++ + *(*uint64)(unsafe.Pointer(&data[i])) = num + i += 8 + } + } + if len(m.Field12) > 0 { + for _, num := range m.Field12 { + data[i] = 0x61 + i++ + *(*int64)(unsafe.Pointer(&data[i])) = num + i += 8 + } + } + if len(m.Field13) > 0 { + for _, b := range m.Field13 { + data[i] = 0x68 + i++ + if b { + data[i] = 1 + } else { + data[i] = 0 + } + i++ + } + } + if len(m.Field14) > 0 { + for _, s := range m.Field14 { + data[i] = 0x72 + 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 len(m.Field15) > 0 { + for _, b := range m.Field15 { + data[i] = 0x7a + i++ + i = encodeVarintThetest(data, i, uint64(len(b))) + i += copy(data[i:], b) + } + } + if m.XXX_unrecognized != nil { + i += copy(data[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *NidRepPackedNative) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *NidRepPackedNative) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Field1) > 0 { + data[i] = 0xa + i++ + i = encodeVarintThetest(data, i, uint64(len(m.Field1)*8)) + for _, num := range m.Field1 { + *(*float64)(unsafe.Pointer(&data[i])) = num + i += 8 + } + } + if len(m.Field2) > 0 { + data[i] = 0x12 + i++ + i = encodeVarintThetest(data, i, uint64(len(m.Field2)*4)) + for _, num := range m.Field2 { + *(*float32)(unsafe.Pointer(&data[i])) = num + i += 4 + } + } + if len(m.Field3) > 0 { + data6 := make([]byte, len(m.Field3)*10) + var j5 int + for _, num1 := range m.Field3 { + num := uint64(num1) + for num >= 1<<7 { + data6[j5] = uint8(uint64(num)&0x7f | 0x80) + num >>= 7 + j5++ + } + data6[j5] = uint8(num) + j5++ + } + data[i] = 0x1a + i++ + i = encodeVarintThetest(data, i, uint64(j5)) + i += copy(data[i:], data6[:j5]) + } + if len(m.Field4) > 0 { + data8 := make([]byte, len(m.Field4)*10) + var j7 int + for _, num1 := range m.Field4 { + num := uint64(num1) + for num >= 1<<7 { + data8[j7] = uint8(uint64(num)&0x7f | 0x80) + num >>= 7 + j7++ + } + data8[j7] = uint8(num) + j7++ + } + data[i] = 0x22 + i++ + i = encodeVarintThetest(data, i, uint64(j7)) + i += copy(data[i:], data8[:j7]) + } + if len(m.Field5) > 0 { + data10 := make([]byte, len(m.Field5)*10) + var j9 int + for _, num := range m.Field5 { + for num >= 1<<7 { + data10[j9] = uint8(uint64(num)&0x7f | 0x80) + num >>= 7 + j9++ + } + data10[j9] = uint8(num) + j9++ + } + data[i] = 0x2a + i++ + i = encodeVarintThetest(data, i, uint64(j9)) + i += copy(data[i:], data10[:j9]) + } + if len(m.Field6) > 0 { + data12 := make([]byte, len(m.Field6)*10) + var j11 int + for _, num := range m.Field6 { + for num >= 1<<7 { + data12[j11] = uint8(uint64(num)&0x7f | 0x80) + num >>= 7 + j11++ + } + data12[j11] = uint8(num) + j11++ + } + data[i] = 0x32 + i++ + i = encodeVarintThetest(data, i, uint64(j11)) + i += copy(data[i:], data12[:j11]) + } + if len(m.Field7) > 0 { + data13 := make([]byte, len(m.Field7)*5) + var j14 int + for _, num := range m.Field7 { + x15 := (uint32(num) << 1) ^ uint32((num >> 31)) + for x15 >= 1<<7 { + data13[j14] = uint8(uint64(x15)&0x7f | 0x80) + j14++ + x15 >>= 7 + } + data13[j14] = uint8(x15) + j14++ + } + data[i] = 0x3a + i++ + i = encodeVarintThetest(data, i, uint64(j14)) + i += copy(data[i:], data13[:j14]) + } + if len(m.Field8) > 0 { + var j16 int + data18 := make([]byte, len(m.Field8)*10) + for _, num := range m.Field8 { + x17 := (uint64(num) << 1) ^ uint64((num >> 63)) + for x17 >= 1<<7 { + data18[j16] = uint8(uint64(x17)&0x7f | 0x80) + j16++ + x17 >>= 7 + } + data18[j16] = uint8(x17) + j16++ + } + data[i] = 0x42 + i++ + i = encodeVarintThetest(data, i, uint64(j16)) + i += copy(data[i:], data18[:j16]) + } + if len(m.Field9) > 0 { + data[i] = 0x4a + i++ + i = encodeVarintThetest(data, i, uint64(len(m.Field9)*4)) + for _, num := range m.Field9 { + *(*uint32)(unsafe.Pointer(&data[i])) = num + i += 4 + } + } + if len(m.Field10) > 0 { + data[i] = 0x52 + i++ + i = encodeVarintThetest(data, i, uint64(len(m.Field10)*4)) + for _, num := range m.Field10 { + *(*int32)(unsafe.Pointer(&data[i])) = num + i += 4 + } + } + if len(m.Field11) > 0 { + data[i] = 0x5a + i++ + i = encodeVarintThetest(data, i, uint64(len(m.Field11)*8)) + for _, num := range m.Field11 { + *(*uint64)(unsafe.Pointer(&data[i])) = num + i += 8 + } + } + if len(m.Field12) > 0 { + data[i] = 0x62 + i++ + i = encodeVarintThetest(data, i, uint64(len(m.Field12)*8)) + for _, num := range m.Field12 { + *(*int64)(unsafe.Pointer(&data[i])) = num + i += 8 + } + } + if len(m.Field13) > 0 { + data[i] = 0x6a + i++ + i = encodeVarintThetest(data, i, uint64(len(m.Field13))) + for _, b := range m.Field13 { + if b { + data[i] = 1 + } else { + data[i] = 0 + } + i++ + } + } + if m.XXX_unrecognized != nil { + i += copy(data[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *NinRepPackedNative) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *NinRepPackedNative) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Field1) > 0 { + data[i] = 0xa + i++ + i = encodeVarintThetest(data, i, uint64(len(m.Field1)*8)) + for _, num := range m.Field1 { + *(*float64)(unsafe.Pointer(&data[i])) = num + i += 8 + } + } + if len(m.Field2) > 0 { + data[i] = 0x12 + i++ + i = encodeVarintThetest(data, i, uint64(len(m.Field2)*4)) + for _, num := range m.Field2 { + *(*float32)(unsafe.Pointer(&data[i])) = num + i += 4 + } + } + if len(m.Field3) > 0 { + data20 := make([]byte, len(m.Field3)*10) + var j19 int + for _, num1 := range m.Field3 { + num := uint64(num1) + for num >= 1<<7 { + data20[j19] = uint8(uint64(num)&0x7f | 0x80) + num >>= 7 + j19++ + } + data20[j19] = uint8(num) + j19++ + } + data[i] = 0x1a + i++ + i = encodeVarintThetest(data, i, uint64(j19)) + i += copy(data[i:], data20[:j19]) + } + if len(m.Field4) > 0 { + data22 := make([]byte, len(m.Field4)*10) + var j21 int + for _, num1 := range m.Field4 { + num := uint64(num1) + for num >= 1<<7 { + data22[j21] = uint8(uint64(num)&0x7f | 0x80) + num >>= 7 + j21++ + } + data22[j21] = uint8(num) + j21++ + } + data[i] = 0x22 + i++ + i = encodeVarintThetest(data, i, uint64(j21)) + i += copy(data[i:], data22[:j21]) + } + if len(m.Field5) > 0 { + data24 := make([]byte, len(m.Field5)*10) + var j23 int + for _, num := range m.Field5 { + for num >= 1<<7 { + data24[j23] = uint8(uint64(num)&0x7f | 0x80) + num >>= 7 + j23++ + } + data24[j23] = uint8(num) + j23++ + } + data[i] = 0x2a + i++ + i = encodeVarintThetest(data, i, uint64(j23)) + i += copy(data[i:], data24[:j23]) + } + if len(m.Field6) > 0 { + data26 := make([]byte, len(m.Field6)*10) + var j25 int + for _, num := range m.Field6 { + for num >= 1<<7 { + data26[j25] = uint8(uint64(num)&0x7f | 0x80) + num >>= 7 + j25++ + } + data26[j25] = uint8(num) + j25++ + } + data[i] = 0x32 + i++ + i = encodeVarintThetest(data, i, uint64(j25)) + i += copy(data[i:], data26[:j25]) + } + if len(m.Field7) > 0 { + data27 := make([]byte, len(m.Field7)*5) + var j28 int + for _, num := range m.Field7 { + x29 := (uint32(num) << 1) ^ uint32((num >> 31)) + for x29 >= 1<<7 { + data27[j28] = uint8(uint64(x29)&0x7f | 0x80) + j28++ + x29 >>= 7 + } + data27[j28] = uint8(x29) + j28++ + } + data[i] = 0x3a + i++ + i = encodeVarintThetest(data, i, uint64(j28)) + i += copy(data[i:], data27[:j28]) + } + if len(m.Field8) > 0 { + var j30 int + data32 := make([]byte, len(m.Field8)*10) + for _, num := range m.Field8 { + x31 := (uint64(num) << 1) ^ uint64((num >> 63)) + for x31 >= 1<<7 { + data32[j30] = uint8(uint64(x31)&0x7f | 0x80) + j30++ + x31 >>= 7 + } + data32[j30] = uint8(x31) + j30++ + } + data[i] = 0x42 + i++ + i = encodeVarintThetest(data, i, uint64(j30)) + i += copy(data[i:], data32[:j30]) + } + if len(m.Field9) > 0 { + data[i] = 0x4a + i++ + i = encodeVarintThetest(data, i, uint64(len(m.Field9)*4)) + for _, num := range m.Field9 { + *(*uint32)(unsafe.Pointer(&data[i])) = num + i += 4 + } + } + if len(m.Field10) > 0 { + data[i] = 0x52 + i++ + i = encodeVarintThetest(data, i, uint64(len(m.Field10)*4)) + for _, num := range m.Field10 { + *(*int32)(unsafe.Pointer(&data[i])) = num + i += 4 + } + } + if len(m.Field11) > 0 { + data[i] = 0x5a + i++ + i = encodeVarintThetest(data, i, uint64(len(m.Field11)*8)) + for _, num := range m.Field11 { + *(*uint64)(unsafe.Pointer(&data[i])) = num + i += 8 + } + } + if len(m.Field12) > 0 { + data[i] = 0x62 + i++ + i = encodeVarintThetest(data, i, uint64(len(m.Field12)*8)) + for _, num := range m.Field12 { + *(*int64)(unsafe.Pointer(&data[i])) = num + i += 8 + } + } + if len(m.Field13) > 0 { + data[i] = 0x6a + i++ + i = encodeVarintThetest(data, i, uint64(len(m.Field13))) + for _, b := range m.Field13 { + if b { + data[i] = 1 + } else { + data[i] = 0 + } + i++ + } + } + if m.XXX_unrecognized != nil { + i += copy(data[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *NidOptStruct) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *NidOptStruct) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + data[i] = 0x9 + i++ + *(*float64)(unsafe.Pointer(&data[i])) = m.Field1 + i += 8 + data[i] = 0x15 + i++ + *(*float32)(unsafe.Pointer(&data[i])) = m.Field2 + i += 4 + data[i] = 0x1a + i++ + i = encodeVarintThetest(data, i, uint64(m.Field3.Size())) + n33, err := m.Field3.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n33 + data[i] = 0x22 + i++ + i = encodeVarintThetest(data, i, uint64(m.Field4.Size())) + n34, err := m.Field4.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n34 + data[i] = 0x30 + i++ + i = encodeVarintThetest(data, i, uint64(m.Field6)) + data[i] = 0x38 + i++ + i = encodeVarintThetest(data, i, uint64((uint32(m.Field7)<<1)^uint32((m.Field7>>31)))) + data[i] = 0x42 + i++ + i = encodeVarintThetest(data, i, uint64(m.Field8.Size())) + n35, err := m.Field8.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n35 + data[i] = 0x68 + i++ + if m.Field13 { + data[i] = 1 + } else { + data[i] = 0 + } + i++ + data[i] = 0x72 + i++ + i = encodeVarintThetest(data, i, uint64(len(m.Field14))) + i += copy(data[i:], m.Field14) + if m.Field15 != nil { + data[i] = 0x7a + i++ + i = encodeVarintThetest(data, i, uint64(len(m.Field15))) + i += copy(data[i:], m.Field15) + } + if m.XXX_unrecognized != nil { + i += copy(data[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *NinOptStruct) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *NinOptStruct) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Field1 != nil { + data[i] = 0x9 + i++ + *(*float64)(unsafe.Pointer(&data[i])) = *m.Field1 + i += 8 + } + if m.Field2 != nil { + data[i] = 0x15 + i++ + *(*float32)(unsafe.Pointer(&data[i])) = *m.Field2 + i += 4 + } + if m.Field3 != nil { + data[i] = 0x1a + i++ + i = encodeVarintThetest(data, i, uint64(m.Field3.Size())) + n36, err := m.Field3.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n36 + } + if m.Field4 != nil { + data[i] = 0x22 + i++ + i = encodeVarintThetest(data, i, uint64(m.Field4.Size())) + n37, err := m.Field4.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n37 + } + if m.Field6 != nil { + data[i] = 0x30 + i++ + i = encodeVarintThetest(data, i, uint64(*m.Field6)) + } + if m.Field7 != nil { + data[i] = 0x38 + i++ + i = encodeVarintThetest(data, i, uint64((uint32(*m.Field7)<<1)^uint32((*m.Field7>>31)))) + } + if m.Field8 != nil { + data[i] = 0x42 + i++ + i = encodeVarintThetest(data, i, uint64(m.Field8.Size())) + n38, err := m.Field8.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n38 + } + if m.Field13 != nil { + data[i] = 0x68 + i++ + if *m.Field13 { + data[i] = 1 + } else { + data[i] = 0 + } + i++ + } + if m.Field14 != nil { + data[i] = 0x72 + i++ + i = encodeVarintThetest(data, i, uint64(len(*m.Field14))) + i += copy(data[i:], *m.Field14) + } + if m.Field15 != nil { + data[i] = 0x7a + i++ + i = encodeVarintThetest(data, i, uint64(len(m.Field15))) + i += copy(data[i:], m.Field15) + } + if m.XXX_unrecognized != nil { + i += copy(data[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *NidRepStruct) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *NidRepStruct) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Field1) > 0 { + for _, num := range m.Field1 { + data[i] = 0x9 + i++ + *(*float64)(unsafe.Pointer(&data[i])) = num + i += 8 + } + } + if len(m.Field2) > 0 { + for _, num := range m.Field2 { + data[i] = 0x15 + i++ + *(*float32)(unsafe.Pointer(&data[i])) = num + i += 4 + } + } + if len(m.Field3) > 0 { + for _, msg := range m.Field3 { + data[i] = 0x1a + i++ + i = encodeVarintThetest(data, i, uint64(msg.Size())) + n, err := msg.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n + } + } + if len(m.Field4) > 0 { + for _, msg := range m.Field4 { + data[i] = 0x22 + i++ + i = encodeVarintThetest(data, i, uint64(msg.Size())) + n, err := msg.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n + } + } + if len(m.Field6) > 0 { + for _, num := range m.Field6 { + data[i] = 0x30 + i++ + i = encodeVarintThetest(data, i, uint64(num)) + } + } + if len(m.Field7) > 0 { + for _, num := range m.Field7 { + data[i] = 0x38 + i++ + x39 := (uint32(num) << 1) ^ uint32((num >> 31)) + for x39 >= 1<<7 { + data[i] = uint8(uint64(x39)&0x7f | 0x80) + x39 >>= 7 + i++ + } + data[i] = uint8(x39) + i++ + } + } + if len(m.Field8) > 0 { + for _, msg := range m.Field8 { + data[i] = 0x42 + i++ + i = encodeVarintThetest(data, i, uint64(msg.Size())) + n, err := msg.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n + } + } + if len(m.Field13) > 0 { + for _, b := range m.Field13 { + data[i] = 0x68 + i++ + if b { + data[i] = 1 + } else { + data[i] = 0 + } + i++ + } + } + if len(m.Field14) > 0 { + for _, s := range m.Field14 { + data[i] = 0x72 + 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 len(m.Field15) > 0 { + for _, b := range m.Field15 { + data[i] = 0x7a + i++ + i = encodeVarintThetest(data, i, uint64(len(b))) + i += copy(data[i:], b) + } + } + if m.XXX_unrecognized != nil { + i += copy(data[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *NinRepStruct) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *NinRepStruct) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Field1) > 0 { + for _, num := range m.Field1 { + data[i] = 0x9 + i++ + *(*float64)(unsafe.Pointer(&data[i])) = num + i += 8 + } + } + if len(m.Field2) > 0 { + for _, num := range m.Field2 { + data[i] = 0x15 + i++ + *(*float32)(unsafe.Pointer(&data[i])) = num + i += 4 + } + } + if len(m.Field3) > 0 { + for _, msg := range m.Field3 { + data[i] = 0x1a + i++ + i = encodeVarintThetest(data, i, uint64(msg.Size())) + n, err := msg.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n + } + } + if len(m.Field4) > 0 { + for _, msg := range m.Field4 { + data[i] = 0x22 + i++ + i = encodeVarintThetest(data, i, uint64(msg.Size())) + n, err := msg.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n + } + } + if len(m.Field6) > 0 { + for _, num := range m.Field6 { + data[i] = 0x30 + i++ + i = encodeVarintThetest(data, i, uint64(num)) + } + } + if len(m.Field7) > 0 { + for _, num := range m.Field7 { + data[i] = 0x38 + i++ + x40 := (uint32(num) << 1) ^ uint32((num >> 31)) + for x40 >= 1<<7 { + data[i] = uint8(uint64(x40)&0x7f | 0x80) + x40 >>= 7 + i++ + } + data[i] = uint8(x40) + i++ + } + } + if len(m.Field8) > 0 { + for _, msg := range m.Field8 { + data[i] = 0x42 + i++ + i = encodeVarintThetest(data, i, uint64(msg.Size())) + n, err := msg.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n + } + } + if len(m.Field13) > 0 { + for _, b := range m.Field13 { + data[i] = 0x68 + i++ + if b { + data[i] = 1 + } else { + data[i] = 0 + } + i++ + } + } + if len(m.Field14) > 0 { + for _, s := range m.Field14 { + data[i] = 0x72 + 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 len(m.Field15) > 0 { + for _, b := range m.Field15 { + data[i] = 0x7a + i++ + i = encodeVarintThetest(data, i, uint64(len(b))) + i += copy(data[i:], b) + } + } + if m.XXX_unrecognized != nil { + i += copy(data[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *NidEmbeddedStruct) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *NidEmbeddedStruct) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.NidOptNative != nil { + data[i] = 0xa + i++ + i = encodeVarintThetest(data, i, uint64(m.NidOptNative.Size())) + n41, err := m.NidOptNative.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n41 + } + data[i] = 0xc2 + i++ + data[i] = 0xc + i++ + i = encodeVarintThetest(data, i, uint64(m.Field200.Size())) + n42, err := m.Field200.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n42 + data[i] = 0x90 + i++ + data[i] = 0xd + i++ + if m.Field210 { + data[i] = 1 + } else { + data[i] = 0 + } + i++ + if m.XXX_unrecognized != nil { + i += copy(data[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *NinEmbeddedStruct) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *NinEmbeddedStruct) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.NidOptNative != nil { + data[i] = 0xa + i++ + i = encodeVarintThetest(data, i, uint64(m.NidOptNative.Size())) + n43, err := m.NidOptNative.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n43 + } + if m.Field200 != nil { + data[i] = 0xc2 + i++ + data[i] = 0xc + i++ + i = encodeVarintThetest(data, i, uint64(m.Field200.Size())) + n44, err := m.Field200.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n44 + } + if m.Field210 != nil { + data[i] = 0x90 + i++ + data[i] = 0xd + i++ + if *m.Field210 { + data[i] = 1 + } else { + data[i] = 0 + } + i++ + } + if m.XXX_unrecognized != nil { + i += copy(data[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *NidNestedStruct) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *NidNestedStruct) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + data[i] = 0xa + i++ + i = encodeVarintThetest(data, i, uint64(m.Field1.Size())) + n45, err := m.Field1.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n45 + if len(m.Field2) > 0 { + for _, msg := range m.Field2 { + data[i] = 0x12 + i++ + i = encodeVarintThetest(data, i, uint64(msg.Size())) + n, err := msg.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n + } + } + if m.XXX_unrecognized != nil { + i += copy(data[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *NinNestedStruct) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *NinNestedStruct) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Field1 != nil { + data[i] = 0xa + i++ + i = encodeVarintThetest(data, i, uint64(m.Field1.Size())) + n46, err := m.Field1.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n46 + } + if len(m.Field2) > 0 { + for _, msg := range m.Field2 { + data[i] = 0x12 + i++ + i = encodeVarintThetest(data, i, uint64(msg.Size())) + n, err := msg.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n + } + } + if m.XXX_unrecognized != nil { + i += copy(data[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *NidOptCustom) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *NidOptCustom) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + data[i] = 0xa + i++ + i = encodeVarintThetest(data, i, uint64(m.Id.Size())) + n47, err := m.Id.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n47 + data[i] = 0x12 + i++ + i = encodeVarintThetest(data, i, uint64(m.Value.Size())) + n48, err := m.Value.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n48 + if m.XXX_unrecognized != nil { + i += copy(data[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *CustomDash) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *CustomDash) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Value != nil { + data[i] = 0xa + i++ + i = encodeVarintThetest(data, i, uint64(m.Value.Size())) + n49, err := m.Value.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n49 + } + if m.XXX_unrecognized != nil { + i += copy(data[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *NinOptCustom) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *NinOptCustom) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Id != nil { + data[i] = 0xa + i++ + i = encodeVarintThetest(data, i, uint64(m.Id.Size())) + n50, err := m.Id.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n50 + } + if m.Value != nil { + data[i] = 0x12 + i++ + i = encodeVarintThetest(data, i, uint64(m.Value.Size())) + n51, err := m.Value.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n51 + } + if m.XXX_unrecognized != nil { + i += copy(data[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *NidRepCustom) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *NidRepCustom) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Id) > 0 { + for _, msg := range m.Id { + data[i] = 0xa + i++ + i = encodeVarintThetest(data, i, uint64(msg.Size())) + n, err := msg.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n + } + } + if len(m.Value) > 0 { + for _, msg := range m.Value { + data[i] = 0x12 + i++ + i = encodeVarintThetest(data, i, uint64(msg.Size())) + n, err := msg.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n + } + } + if m.XXX_unrecognized != nil { + i += copy(data[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *NinRepCustom) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *NinRepCustom) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Id) > 0 { + for _, msg := range m.Id { + data[i] = 0xa + i++ + i = encodeVarintThetest(data, i, uint64(msg.Size())) + n, err := msg.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n + } + } + if len(m.Value) > 0 { + for _, msg := range m.Value { + data[i] = 0x12 + i++ + i = encodeVarintThetest(data, i, uint64(msg.Size())) + n, err := msg.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n + } + } + if m.XXX_unrecognized != nil { + i += copy(data[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *NinOptNativeUnion) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *NinOptNativeUnion) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Field1 != nil { + data[i] = 0x9 + i++ + *(*float64)(unsafe.Pointer(&data[i])) = *m.Field1 + i += 8 + } + if m.Field2 != nil { + data[i] = 0x15 + i++ + *(*float32)(unsafe.Pointer(&data[i])) = *m.Field2 + i += 4 + } + if m.Field3 != nil { + data[i] = 0x18 + i++ + i = encodeVarintThetest(data, i, uint64(*m.Field3)) + } + if m.Field4 != nil { + data[i] = 0x20 + i++ + i = encodeVarintThetest(data, i, uint64(*m.Field4)) + } + if m.Field5 != nil { + data[i] = 0x28 + i++ + i = encodeVarintThetest(data, i, uint64(*m.Field5)) + } + if m.Field6 != nil { + data[i] = 0x30 + i++ + i = encodeVarintThetest(data, i, uint64(*m.Field6)) + } + if m.Field13 != nil { + data[i] = 0x68 + i++ + if *m.Field13 { + data[i] = 1 + } else { + data[i] = 0 + } + i++ + } + if m.Field14 != nil { + data[i] = 0x72 + i++ + i = encodeVarintThetest(data, i, uint64(len(*m.Field14))) + i += copy(data[i:], *m.Field14) + } + if m.Field15 != nil { + data[i] = 0x7a + i++ + i = encodeVarintThetest(data, i, uint64(len(m.Field15))) + i += copy(data[i:], m.Field15) + } + if m.XXX_unrecognized != nil { + i += copy(data[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *NinOptStructUnion) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *NinOptStructUnion) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Field1 != nil { + data[i] = 0x9 + i++ + *(*float64)(unsafe.Pointer(&data[i])) = *m.Field1 + i += 8 + } + if m.Field2 != nil { + data[i] = 0x15 + i++ + *(*float32)(unsafe.Pointer(&data[i])) = *m.Field2 + i += 4 + } + if m.Field3 != nil { + data[i] = 0x1a + i++ + i = encodeVarintThetest(data, i, uint64(m.Field3.Size())) + n52, err := m.Field3.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n52 + } + if m.Field4 != nil { + data[i] = 0x22 + i++ + i = encodeVarintThetest(data, i, uint64(m.Field4.Size())) + n53, err := m.Field4.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n53 + } + if m.Field6 != nil { + data[i] = 0x30 + i++ + i = encodeVarintThetest(data, i, uint64(*m.Field6)) + } + if m.Field7 != nil { + data[i] = 0x38 + i++ + i = encodeVarintThetest(data, i, uint64((uint32(*m.Field7)<<1)^uint32((*m.Field7>>31)))) + } + if m.Field13 != nil { + data[i] = 0x68 + i++ + if *m.Field13 { + data[i] = 1 + } else { + data[i] = 0 + } + i++ + } + if m.Field14 != nil { + data[i] = 0x72 + i++ + i = encodeVarintThetest(data, i, uint64(len(*m.Field14))) + i += copy(data[i:], *m.Field14) + } + if m.Field15 != nil { + data[i] = 0x7a + i++ + i = encodeVarintThetest(data, i, uint64(len(m.Field15))) + i += copy(data[i:], m.Field15) + } + if m.XXX_unrecognized != nil { + i += copy(data[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *NinEmbeddedStructUnion) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *NinEmbeddedStructUnion) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.NidOptNative != nil { + data[i] = 0xa + i++ + i = encodeVarintThetest(data, i, uint64(m.NidOptNative.Size())) + n54, err := m.NidOptNative.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n54 + } + if m.Field200 != nil { + data[i] = 0xc2 + i++ + data[i] = 0xc + i++ + i = encodeVarintThetest(data, i, uint64(m.Field200.Size())) + n55, err := m.Field200.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n55 + } + if m.Field210 != nil { + data[i] = 0x90 + i++ + data[i] = 0xd + i++ + if *m.Field210 { + data[i] = 1 + } else { + data[i] = 0 + } + i++ + } + if m.XXX_unrecognized != nil { + i += copy(data[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *NinNestedStructUnion) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *NinNestedStructUnion) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Field1 != nil { + data[i] = 0xa + i++ + i = encodeVarintThetest(data, i, uint64(m.Field1.Size())) + n56, err := m.Field1.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n56 + } + if m.Field2 != nil { + data[i] = 0x12 + i++ + i = encodeVarintThetest(data, i, uint64(m.Field2.Size())) + n57, err := m.Field2.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n57 + } + if m.Field3 != nil { + data[i] = 0x1a + i++ + i = encodeVarintThetest(data, i, uint64(m.Field3.Size())) + n58, err := m.Field3.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n58 + } + if m.XXX_unrecognized != nil { + i += copy(data[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *Tree) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *Tree) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Or != nil { + data[i] = 0xa + i++ + i = encodeVarintThetest(data, i, uint64(m.Or.Size())) + n59, err := m.Or.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n59 + } + if m.And != nil { + data[i] = 0x12 + i++ + i = encodeVarintThetest(data, i, uint64(m.And.Size())) + n60, err := m.And.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n60 + } + if m.Leaf != nil { + data[i] = 0x1a + i++ + i = encodeVarintThetest(data, i, uint64(m.Leaf.Size())) + n61, err := m.Leaf.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n61 + } + if m.XXX_unrecognized != nil { + i += copy(data[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *OrBranch) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *OrBranch) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + data[i] = 0xa + i++ + i = encodeVarintThetest(data, i, uint64(m.Left.Size())) + n62, err := m.Left.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n62 + data[i] = 0x12 + i++ + i = encodeVarintThetest(data, i, uint64(m.Right.Size())) + n63, err := m.Right.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n63 + if m.XXX_unrecognized != nil { + i += copy(data[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *AndBranch) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *AndBranch) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + data[i] = 0xa + i++ + i = encodeVarintThetest(data, i, uint64(m.Left.Size())) + n64, err := m.Left.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n64 + data[i] = 0x12 + i++ + i = encodeVarintThetest(data, i, uint64(m.Right.Size())) + n65, err := m.Right.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n65 + if m.XXX_unrecognized != nil { + i += copy(data[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *Leaf) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *Leaf) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + data[i] = 0x8 + i++ + i = encodeVarintThetest(data, i, uint64(m.Value)) + data[i] = 0x12 + i++ + i = encodeVarintThetest(data, i, uint64(len(m.StrValue))) + i += copy(data[i:], m.StrValue) + if m.XXX_unrecognized != nil { + i += copy(data[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *DeepTree) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *DeepTree) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Down != nil { + data[i] = 0xa + i++ + i = encodeVarintThetest(data, i, uint64(m.Down.Size())) + n66, err := m.Down.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n66 + } + if m.And != nil { + data[i] = 0x12 + i++ + i = encodeVarintThetest(data, i, uint64(m.And.Size())) + n67, err := m.And.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n67 + } + if m.Leaf != nil { + data[i] = 0x1a + i++ + i = encodeVarintThetest(data, i, uint64(m.Leaf.Size())) + n68, err := m.Leaf.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n68 + } + if m.XXX_unrecognized != nil { + i += copy(data[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *ADeepBranch) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *ADeepBranch) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + data[i] = 0x12 + i++ + i = encodeVarintThetest(data, i, uint64(m.Down.Size())) + n69, err := m.Down.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n69 + if m.XXX_unrecognized != nil { + i += copy(data[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *AndDeepBranch) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *AndDeepBranch) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + data[i] = 0xa + i++ + i = encodeVarintThetest(data, i, uint64(m.Left.Size())) + n70, err := m.Left.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n70 + data[i] = 0x12 + i++ + i = encodeVarintThetest(data, i, uint64(m.Right.Size())) + n71, err := m.Right.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n71 + if m.XXX_unrecognized != nil { + i += copy(data[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *DeepLeaf) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *DeepLeaf) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + data[i] = 0xa + i++ + i = encodeVarintThetest(data, i, uint64(m.Tree.Size())) + n72, err := m.Tree.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n72 + if m.XXX_unrecognized != nil { + i += copy(data[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *Nil) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *Nil) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.XXX_unrecognized != nil { + i += copy(data[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *NidOptEnum) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *NidOptEnum) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + data[i] = 0x8 + i++ + i = encodeVarintThetest(data, i, uint64(m.Field1)) + if m.XXX_unrecognized != nil { + i += copy(data[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *NinOptEnum) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *NinOptEnum) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Field1 != nil { + data[i] = 0x8 + i++ + i = encodeVarintThetest(data, i, uint64(*m.Field1)) + } + if m.Field2 != nil { + data[i] = 0x10 + i++ + i = encodeVarintThetest(data, i, uint64(*m.Field2)) + } + if m.Field3 != nil { + data[i] = 0x18 + i++ + i = encodeVarintThetest(data, i, uint64(*m.Field3)) + } + if m.XXX_unrecognized != nil { + i += copy(data[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *NidRepEnum) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *NidRepEnum) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Field1) > 0 { + for _, num := range m.Field1 { + data[i] = 0x8 + i++ + i = encodeVarintThetest(data, i, uint64(num)) + } + } + if len(m.Field2) > 0 { + for _, num := range m.Field2 { + data[i] = 0x10 + i++ + i = encodeVarintThetest(data, i, uint64(num)) + } + } + if len(m.Field3) > 0 { + for _, num := range m.Field3 { + data[i] = 0x18 + i++ + i = encodeVarintThetest(data, i, uint64(num)) + } + } + if m.XXX_unrecognized != nil { + i += copy(data[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *NinRepEnum) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *NinRepEnum) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Field1) > 0 { + for _, num := range m.Field1 { + data[i] = 0x8 + i++ + i = encodeVarintThetest(data, i, uint64(num)) + } + } + if len(m.Field2) > 0 { + for _, num := range m.Field2 { + data[i] = 0x10 + i++ + i = encodeVarintThetest(data, i, uint64(num)) + } + } + if len(m.Field3) > 0 { + for _, num := range m.Field3 { + data[i] = 0x18 + i++ + i = encodeVarintThetest(data, i, uint64(num)) + } + } + if m.XXX_unrecognized != nil { + i += copy(data[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *NinOptEnumDefault) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *NinOptEnumDefault) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Field1 != nil { + data[i] = 0x8 + i++ + i = encodeVarintThetest(data, i, uint64(*m.Field1)) + } + if m.Field2 != nil { + data[i] = 0x10 + i++ + i = encodeVarintThetest(data, i, uint64(*m.Field2)) + } + if m.Field3 != nil { + data[i] = 0x18 + i++ + i = encodeVarintThetest(data, i, uint64(*m.Field3)) + } + if m.XXX_unrecognized != nil { + i += copy(data[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *AnotherNinOptEnum) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *AnotherNinOptEnum) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Field1 != nil { + data[i] = 0x8 + i++ + i = encodeVarintThetest(data, i, uint64(*m.Field1)) + } + if m.Field2 != nil { + data[i] = 0x10 + i++ + i = encodeVarintThetest(data, i, uint64(*m.Field2)) + } + if m.Field3 != nil { + data[i] = 0x18 + i++ + i = encodeVarintThetest(data, i, uint64(*m.Field3)) + } + if m.XXX_unrecognized != nil { + i += copy(data[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *AnotherNinOptEnumDefault) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *AnotherNinOptEnumDefault) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Field1 != nil { + data[i] = 0x8 + i++ + i = encodeVarintThetest(data, i, uint64(*m.Field1)) + } + if m.Field2 != nil { + data[i] = 0x10 + i++ + i = encodeVarintThetest(data, i, uint64(*m.Field2)) + } + if m.Field3 != nil { + data[i] = 0x18 + i++ + i = encodeVarintThetest(data, i, uint64(*m.Field3)) + } + if m.XXX_unrecognized != nil { + i += copy(data[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *Timer) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *Timer) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + data[i] = 0x9 + i++ + *(*int64)(unsafe.Pointer(&data[i])) = m.Time1 + i += 8 + data[i] = 0x11 + i++ + *(*int64)(unsafe.Pointer(&data[i])) = m.Time2 + i += 8 + if m.Data != nil { + data[i] = 0x1a + i++ + i = encodeVarintThetest(data, i, uint64(len(m.Data))) + i += copy(data[i:], m.Data) + } + if m.XXX_unrecognized != nil { + i += copy(data[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *MyExtendable) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *MyExtendable) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Field1 != nil { + data[i] = 0x8 + i++ + i = encodeVarintThetest(data, i, uint64(*m.Field1)) + } + if len(m.XXX_extensions) > 0 { + n, err := github_com_gogo_protobuf_proto.EncodeExtensionMap(m.XXX_extensions, data[i:]) + if err != nil { + return 0, err + } + i += n + } + if m.XXX_unrecognized != nil { + i += copy(data[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *OtherExtenable) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *OtherExtenable) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.M != nil { + data[i] = 0xa + i++ + i = encodeVarintThetest(data, i, uint64(m.M.Size())) + n73, err := m.M.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n73 + } + if m.Field2 != nil { + data[i] = 0x10 + i++ + i = encodeVarintThetest(data, i, uint64(*m.Field2)) + } + if m.Field13 != nil { + data[i] = 0x68 + i++ + i = encodeVarintThetest(data, i, uint64(*m.Field13)) + } + if len(m.XXX_extensions) > 0 { + n, err := github_com_gogo_protobuf_proto.EncodeExtensionMap(m.XXX_extensions, data[i:]) + if err != nil { + return 0, err + } + i += n + } + if m.XXX_unrecognized != nil { + i += copy(data[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *NestedDefinition) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *NestedDefinition) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Field1 != nil { + data[i] = 0x8 + i++ + i = encodeVarintThetest(data, i, uint64(*m.Field1)) + } + if m.EnumField != nil { + data[i] = 0x10 + i++ + i = encodeVarintThetest(data, i, uint64(*m.EnumField)) + } + if m.NNM != nil { + data[i] = 0x1a + i++ + i = encodeVarintThetest(data, i, uint64(m.NNM.Size())) + n74, err := m.NNM.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n74 + } + if m.NM != nil { + data[i] = 0x22 + i++ + i = encodeVarintThetest(data, i, uint64(m.NM.Size())) + n75, err := m.NM.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n75 + } + if m.XXX_unrecognized != nil { + i += copy(data[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *NestedDefinition_NestedMessage) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *NestedDefinition_NestedMessage) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.NestedField1 != nil { + data[i] = 0x9 + i++ + *(*uint64)(unsafe.Pointer(&data[i])) = *m.NestedField1 + i += 8 + } + if m.NNM != nil { + data[i] = 0x12 + i++ + i = encodeVarintThetest(data, i, uint64(m.NNM.Size())) + n76, err := m.NNM.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n76 + } + if m.XXX_unrecognized != nil { + i += copy(data[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *NestedDefinition_NestedMessage_NestedNestedMsg) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *NestedDefinition_NestedMessage_NestedNestedMsg) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.NestedNestedField1 != nil { + data[i] = 0x52 + i++ + i = encodeVarintThetest(data, i, uint64(len(*m.NestedNestedField1))) + i += copy(data[i:], *m.NestedNestedField1) + } + if m.XXX_unrecognized != nil { + i += copy(data[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *NestedScope) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *NestedScope) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.A != nil { + data[i] = 0xa + i++ + i = encodeVarintThetest(data, i, uint64(m.A.Size())) + n77, err := m.A.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n77 + } + if m.B != nil { + data[i] = 0x10 + i++ + i = encodeVarintThetest(data, i, uint64(*m.B)) + } + if m.C != nil { + data[i] = 0x1a + i++ + i = encodeVarintThetest(data, i, uint64(m.C.Size())) + n78, err := m.C.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n78 + } + if m.XXX_unrecognized != nil { + i += copy(data[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *NinOptNativeDefault) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *NinOptNativeDefault) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Field1 != nil { + data[i] = 0x9 + i++ + *(*float64)(unsafe.Pointer(&data[i])) = *m.Field1 + i += 8 + } + if m.Field2 != nil { + data[i] = 0x15 + i++ + *(*float32)(unsafe.Pointer(&data[i])) = *m.Field2 + i += 4 + } + if m.Field3 != nil { + data[i] = 0x18 + i++ + i = encodeVarintThetest(data, i, uint64(*m.Field3)) + } + if m.Field4 != nil { + data[i] = 0x20 + i++ + i = encodeVarintThetest(data, i, uint64(*m.Field4)) + } + if m.Field5 != nil { + data[i] = 0x28 + i++ + i = encodeVarintThetest(data, i, uint64(*m.Field5)) + } + if m.Field6 != nil { + data[i] = 0x30 + i++ + i = encodeVarintThetest(data, i, uint64(*m.Field6)) + } + if m.Field7 != nil { + data[i] = 0x38 + i++ + i = encodeVarintThetest(data, i, uint64((uint32(*m.Field7)<<1)^uint32((*m.Field7>>31)))) + } + if m.Field8 != nil { + data[i] = 0x40 + i++ + i = encodeVarintThetest(data, i, uint64((uint64(*m.Field8)<<1)^uint64((*m.Field8>>63)))) + } + if m.Field9 != nil { + data[i] = 0x4d + i++ + *(*uint32)(unsafe.Pointer(&data[i])) = *m.Field9 + i += 4 + } + if m.Field10 != nil { + data[i] = 0x55 + i++ + *(*int32)(unsafe.Pointer(&data[i])) = *m.Field10 + i += 4 + } + if m.Field11 != nil { + data[i] = 0x59 + i++ + *(*uint64)(unsafe.Pointer(&data[i])) = *m.Field11 + i += 8 + } + if m.Field12 != nil { + data[i] = 0x61 + i++ + *(*int64)(unsafe.Pointer(&data[i])) = *m.Field12 + i += 8 + } + if m.Field13 != nil { + data[i] = 0x68 + i++ + if *m.Field13 { + data[i] = 1 + } else { + data[i] = 0 + } + i++ + } + if m.Field14 != nil { + data[i] = 0x72 + i++ + i = encodeVarintThetest(data, i, uint64(len(*m.Field14))) + i += copy(data[i:], *m.Field14) + } + if m.Field15 != nil { + data[i] = 0x7a + i++ + i = encodeVarintThetest(data, i, uint64(len(m.Field15))) + i += copy(data[i:], m.Field15) + } + if m.XXX_unrecognized != nil { + i += copy(data[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *CustomContainer) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *CustomContainer) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + data[i] = 0xa + i++ + i = encodeVarintThetest(data, i, uint64(m.CustomStruct.Size())) + n79, err := m.CustomStruct.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n79 + if m.XXX_unrecognized != nil { + i += copy(data[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *CustomNameNidOptNative) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *CustomNameNidOptNative) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + data[i] = 0x9 + i++ + *(*float64)(unsafe.Pointer(&data[i])) = m.FieldA + i += 8 + data[i] = 0x15 + i++ + *(*float32)(unsafe.Pointer(&data[i])) = m.FieldB + i += 4 + data[i] = 0x18 + i++ + i = encodeVarintThetest(data, i, uint64(m.FieldC)) + data[i] = 0x20 + i++ + i = encodeVarintThetest(data, i, uint64(m.FieldD)) + data[i] = 0x28 + i++ + i = encodeVarintThetest(data, i, uint64(m.FieldE)) + data[i] = 0x30 + i++ + i = encodeVarintThetest(data, i, uint64(m.FieldF)) + data[i] = 0x38 + i++ + i = encodeVarintThetest(data, i, uint64((uint32(m.FieldG)<<1)^uint32((m.FieldG>>31)))) + data[i] = 0x40 + i++ + i = encodeVarintThetest(data, i, uint64((uint64(m.FieldH)<<1)^uint64((m.FieldH>>63)))) + data[i] = 0x4d + i++ + *(*uint32)(unsafe.Pointer(&data[i])) = m.FieldI + i += 4 + data[i] = 0x55 + i++ + *(*int32)(unsafe.Pointer(&data[i])) = m.FieldJ + i += 4 + data[i] = 0x59 + i++ + *(*uint64)(unsafe.Pointer(&data[i])) = m.FieldK + i += 8 + data[i] = 0x61 + i++ + *(*int64)(unsafe.Pointer(&data[i])) = m.FieldL + i += 8 + data[i] = 0x68 + i++ + if m.FieldM { + data[i] = 1 + } else { + data[i] = 0 + } + i++ + data[i] = 0x72 + i++ + i = encodeVarintThetest(data, i, uint64(len(m.FieldN))) + i += copy(data[i:], m.FieldN) + if m.FieldO != nil { + data[i] = 0x7a + i++ + i = encodeVarintThetest(data, i, uint64(len(m.FieldO))) + i += copy(data[i:], m.FieldO) + } + if m.XXX_unrecognized != nil { + i += copy(data[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *CustomNameNinOptNative) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *CustomNameNinOptNative) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.FieldA != nil { + data[i] = 0x9 + i++ + *(*float64)(unsafe.Pointer(&data[i])) = *m.FieldA + i += 8 + } + if m.FieldB != nil { + data[i] = 0x15 + i++ + *(*float32)(unsafe.Pointer(&data[i])) = *m.FieldB + i += 4 + } + if m.FieldC != nil { + data[i] = 0x18 + i++ + i = encodeVarintThetest(data, i, uint64(*m.FieldC)) + } + if m.FieldD != nil { + data[i] = 0x20 + i++ + i = encodeVarintThetest(data, i, uint64(*m.FieldD)) + } + if m.FieldE != nil { + data[i] = 0x28 + i++ + i = encodeVarintThetest(data, i, uint64(*m.FieldE)) + } + if m.FieldF != nil { + data[i] = 0x30 + i++ + i = encodeVarintThetest(data, i, uint64(*m.FieldF)) + } + if m.FieldG != nil { + data[i] = 0x38 + i++ + i = encodeVarintThetest(data, i, uint64((uint32(*m.FieldG)<<1)^uint32((*m.FieldG>>31)))) + } + if m.FieldH != nil { + data[i] = 0x40 + i++ + i = encodeVarintThetest(data, i, uint64((uint64(*m.FieldH)<<1)^uint64((*m.FieldH>>63)))) + } + if m.FieldI != nil { + data[i] = 0x4d + i++ + *(*uint32)(unsafe.Pointer(&data[i])) = *m.FieldI + i += 4 + } + if m.FieldJ != nil { + data[i] = 0x55 + i++ + *(*int32)(unsafe.Pointer(&data[i])) = *m.FieldJ + i += 4 + } + if m.FieldK != nil { + data[i] = 0x59 + i++ + *(*uint64)(unsafe.Pointer(&data[i])) = *m.FieldK + i += 8 + } + if m.FielL != nil { + data[i] = 0x61 + i++ + *(*int64)(unsafe.Pointer(&data[i])) = *m.FielL + i += 8 + } + if m.FieldM != nil { + data[i] = 0x68 + i++ + if *m.FieldM { + data[i] = 1 + } else { + data[i] = 0 + } + i++ + } + if m.FieldN != nil { + data[i] = 0x72 + i++ + i = encodeVarintThetest(data, i, uint64(len(*m.FieldN))) + i += copy(data[i:], *m.FieldN) + } + if m.FieldO != nil { + data[i] = 0x7a + i++ + i = encodeVarintThetest(data, i, uint64(len(m.FieldO))) + i += copy(data[i:], m.FieldO) + } + if m.XXX_unrecognized != nil { + i += copy(data[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *CustomNameNinRepNative) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *CustomNameNinRepNative) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.FieldA) > 0 { + for _, num := range m.FieldA { + data[i] = 0x9 + i++ + *(*float64)(unsafe.Pointer(&data[i])) = num + i += 8 + } + } + if len(m.FieldB) > 0 { + for _, num := range m.FieldB { + data[i] = 0x15 + i++ + *(*float32)(unsafe.Pointer(&data[i])) = num + i += 4 + } + } + if len(m.FieldC) > 0 { + for _, num := range m.FieldC { + data[i] = 0x18 + i++ + i = encodeVarintThetest(data, i, uint64(num)) + } + } + if len(m.FieldD) > 0 { + for _, num := range m.FieldD { + data[i] = 0x20 + i++ + i = encodeVarintThetest(data, i, uint64(num)) + } + } + if len(m.FieldE) > 0 { + for _, num := range m.FieldE { + data[i] = 0x28 + i++ + i = encodeVarintThetest(data, i, uint64(num)) + } + } + if len(m.FieldF) > 0 { + for _, num := range m.FieldF { + data[i] = 0x30 + i++ + i = encodeVarintThetest(data, i, uint64(num)) + } + } + if len(m.FieldG) > 0 { + for _, num := range m.FieldG { + data[i] = 0x38 + i++ + x80 := (uint32(num) << 1) ^ uint32((num >> 31)) + for x80 >= 1<<7 { + data[i] = uint8(uint64(x80)&0x7f | 0x80) + x80 >>= 7 + i++ + } + data[i] = uint8(x80) + i++ + } + } + if len(m.FieldH) > 0 { + for _, num := range m.FieldH { + data[i] = 0x40 + i++ + x81 := (uint64(num) << 1) ^ uint64((num >> 63)) + for x81 >= 1<<7 { + data[i] = uint8(uint64(x81)&0x7f | 0x80) + x81 >>= 7 + i++ + } + data[i] = uint8(x81) + i++ + } + } + if len(m.FieldI) > 0 { + for _, num := range m.FieldI { + data[i] = 0x4d + i++ + *(*uint32)(unsafe.Pointer(&data[i])) = num + i += 4 + } + } + if len(m.FieldJ) > 0 { + for _, num := range m.FieldJ { + data[i] = 0x55 + i++ + *(*int32)(unsafe.Pointer(&data[i])) = num + i += 4 + } + } + if len(m.FieldK) > 0 { + for _, num := range m.FieldK { + data[i] = 0x59 + i++ + *(*uint64)(unsafe.Pointer(&data[i])) = num + i += 8 + } + } + if len(m.FieldL) > 0 { + for _, num := range m.FieldL { + data[i] = 0x61 + i++ + *(*int64)(unsafe.Pointer(&data[i])) = num + i += 8 + } + } + if len(m.FieldM) > 0 { + for _, b := range m.FieldM { + data[i] = 0x68 + i++ + if b { + data[i] = 1 + } else { + data[i] = 0 + } + i++ + } + } + if len(m.FieldN) > 0 { + for _, s := range m.FieldN { + data[i] = 0x72 + 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 len(m.FieldO) > 0 { + for _, b := range m.FieldO { + data[i] = 0x7a + i++ + i = encodeVarintThetest(data, i, uint64(len(b))) + i += copy(data[i:], b) + } + } + if m.XXX_unrecognized != nil { + i += copy(data[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *CustomNameNinStruct) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *CustomNameNinStruct) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.FieldA != nil { + data[i] = 0x9 + i++ + *(*float64)(unsafe.Pointer(&data[i])) = *m.FieldA + i += 8 + } + if m.FieldB != nil { + data[i] = 0x15 + i++ + *(*float32)(unsafe.Pointer(&data[i])) = *m.FieldB + i += 4 + } + if m.FieldC != nil { + data[i] = 0x1a + i++ + i = encodeVarintThetest(data, i, uint64(m.FieldC.Size())) + n82, err := m.FieldC.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n82 + } + if len(m.FieldD) > 0 { + for _, msg := range m.FieldD { + data[i] = 0x22 + i++ + i = encodeVarintThetest(data, i, uint64(msg.Size())) + n, err := msg.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n + } + } + if m.FieldE != nil { + data[i] = 0x30 + i++ + i = encodeVarintThetest(data, i, uint64(*m.FieldE)) + } + if m.FieldF != nil { + data[i] = 0x38 + i++ + i = encodeVarintThetest(data, i, uint64((uint32(*m.FieldF)<<1)^uint32((*m.FieldF>>31)))) + } + if m.FieldG != nil { + data[i] = 0x42 + i++ + i = encodeVarintThetest(data, i, uint64(m.FieldG.Size())) + n83, err := m.FieldG.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n83 + } + if m.FieldH != nil { + data[i] = 0x68 + i++ + if *m.FieldH { + data[i] = 1 + } else { + data[i] = 0 + } + i++ + } + if m.FieldI != nil { + data[i] = 0x72 + i++ + i = encodeVarintThetest(data, i, uint64(len(*m.FieldI))) + i += copy(data[i:], *m.FieldI) + } + if m.FieldJ != nil { + data[i] = 0x7a + i++ + i = encodeVarintThetest(data, i, uint64(len(m.FieldJ))) + i += copy(data[i:], m.FieldJ) + } + if m.XXX_unrecognized != nil { + i += copy(data[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *CustomNameCustomType) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *CustomNameCustomType) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.FieldA != nil { + data[i] = 0xa + i++ + i = encodeVarintThetest(data, i, uint64(m.FieldA.Size())) + n84, err := m.FieldA.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n84 + } + if m.FieldB != nil { + data[i] = 0x12 + i++ + i = encodeVarintThetest(data, i, uint64(m.FieldB.Size())) + n85, err := m.FieldB.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n85 + } + if len(m.FieldC) > 0 { + for _, msg := range m.FieldC { + data[i] = 0x1a + i++ + i = encodeVarintThetest(data, i, uint64(msg.Size())) + n, err := msg.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n + } + } + if len(m.FieldD) > 0 { + for _, msg := range m.FieldD { + data[i] = 0x22 + i++ + i = encodeVarintThetest(data, i, uint64(msg.Size())) + n, err := msg.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n + } + } + if m.XXX_unrecognized != nil { + i += copy(data[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *CustomNameNinEmbeddedStructUnion) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *CustomNameNinEmbeddedStructUnion) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.NidOptNative != nil { + data[i] = 0xa + i++ + i = encodeVarintThetest(data, i, uint64(m.NidOptNative.Size())) + n86, err := m.NidOptNative.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n86 + } + if m.FieldA != nil { + data[i] = 0xc2 + i++ + data[i] = 0xc + i++ + i = encodeVarintThetest(data, i, uint64(m.FieldA.Size())) + n87, err := m.FieldA.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n87 + } + if m.FieldB != nil { + data[i] = 0x90 + i++ + data[i] = 0xd + i++ + if *m.FieldB { + data[i] = 1 + } else { + data[i] = 0 + } + i++ + } + if m.XXX_unrecognized != nil { + i += copy(data[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *CustomNameEnum) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *CustomNameEnum) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.FieldA != nil { + data[i] = 0x8 + i++ + i = encodeVarintThetest(data, i, uint64(*m.FieldA)) + } + if len(m.FieldB) > 0 { + for _, num := range m.FieldB { + data[i] = 0x10 + i++ + i = encodeVarintThetest(data, i, uint64(num)) + } + } + if m.XXX_unrecognized != nil { + i += copy(data[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *NoExtensionsMap) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *NoExtensionsMap) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Field1 != nil { + data[i] = 0x8 + i++ + i = encodeVarintThetest(data, i, uint64(*m.Field1)) + } + if m.XXX_extensions != nil { + i += copy(data[i:], m.XXX_extensions) + } + if m.XXX_unrecognized != nil { + i += copy(data[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *Unrecognized) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *Unrecognized) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Field1 != nil { + data[i] = 0xa + i++ + i = encodeVarintThetest(data, i, uint64(len(*m.Field1))) + i += copy(data[i:], *m.Field1) + } + return i, nil +} + +func (m *UnrecognizedWithInner) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *UnrecognizedWithInner) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Embedded) > 0 { + for _, msg := range m.Embedded { + data[i] = 0xa + i++ + i = encodeVarintThetest(data, i, uint64(msg.Size())) + n, err := msg.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n + } + } + if m.Field2 != nil { + data[i] = 0x12 + i++ + i = encodeVarintThetest(data, i, uint64(len(*m.Field2))) + i += copy(data[i:], *m.Field2) + } + if m.XXX_unrecognized != nil { + i += copy(data[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *UnrecognizedWithInner_Inner) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *UnrecognizedWithInner_Inner) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Field1 != nil { + data[i] = 0x8 + i++ + i = encodeVarintThetest(data, i, uint64(*m.Field1)) + } + return i, nil +} + +func (m *UnrecognizedWithEmbed) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *UnrecognizedWithEmbed) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + data[i] = 0xa + i++ + i = encodeVarintThetest(data, i, uint64(m.UnrecognizedWithEmbed_Embedded.Size())) + n88, err := m.UnrecognizedWithEmbed_Embedded.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n88 + if m.Field2 != nil { + data[i] = 0x12 + i++ + i = encodeVarintThetest(data, i, uint64(len(*m.Field2))) + i += copy(data[i:], *m.Field2) + } + if m.XXX_unrecognized != nil { + i += copy(data[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *UnrecognizedWithEmbed_Embedded) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *UnrecognizedWithEmbed_Embedded) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Field1 != nil { + data[i] = 0x8 + i++ + i = encodeVarintThetest(data, i, uint64(*m.Field1)) + } + return i, nil +} + +func (m *Node) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *Node) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Label != nil { + data[i] = 0xa + i++ + i = encodeVarintThetest(data, i, uint64(len(*m.Label))) + i += copy(data[i:], *m.Label) + } + if len(m.Children) > 0 { + for _, msg := range m.Children { + data[i] = 0x12 + i++ + i = encodeVarintThetest(data, i, uint64(msg.Size())) + n, err := msg.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n + } + } + if m.XXX_unrecognized != nil { + i += copy(data[i:], m.XXX_unrecognized) + } + return i, nil +} + +func encodeFixed64Thetest(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 encodeFixed32Thetest(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 encodeVarintThetest(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 +} + +var fileDescriptorThetest = []byte{ + // 3015 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xcc, 0x5a, 0x4d, 0x6c, 0x1b, 0xc7, + 0xf5, 0xd7, 0xee, 0x90, 0x32, 0x35, 0xa2, 0x24, 0x7a, 0x13, 0x33, 0x0b, 0x46, 0x7f, 0x49, 0xde, + 0x3f, 0xa3, 0x2a, 0x84, 0x2d, 0x91, 0x14, 0x25, 0xcb, 0x4c, 0x93, 0x42, 0xfc, 0x70, 0x6d, 0xd7, + 0xa2, 0x0c, 0x46, 0x6e, 0x6b, 0xa0, 0x40, 0x41, 0x89, 0x2b, 0x89, 0xa8, 0xb4, 0x14, 0xc8, 0x95, + 0x6b, 0xf7, 0x50, 0x04, 0x39, 0x14, 0x46, 0xaf, 0x45, 0x8f, 0x6d, 0x5c, 0x14, 0x05, 0xdc, 0x5b, + 0x0e, 0x45, 0x51, 0x14, 0x45, 0xe3, 0x4b, 0x01, 0xf5, 0x66, 0xf4, 0x54, 0x14, 0x85, 0x91, 0x38, + 0x97, 0x1c, 0xd3, 0x53, 0x73, 0xc8, 0xa1, 0xb3, 0xbb, 0x33, 0xb3, 0x33, 0xb3, 0xbb, 0xdc, 0xa5, + 0x25, 0xb7, 0x39, 0x2c, 0x3f, 0xe6, 0xbd, 0x37, 0xf3, 0xf6, 0xfd, 0x7e, 0x6f, 0xe6, 0xed, 0xce, + 0xc0, 0xec, 0x4e, 0xf7, 0x70, 0xbb, 0xdb, 0x5f, 0x3a, 0x36, 0xfa, 0xad, 0x5d, 0xfd, 0xb0, 0xd5, + 0xe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 0x3e, 0xca, 0xcb, 0x0b, 0xae, 0xbc, 0xa8, 0x26, 0x91, + 0x3c, 0xc5, 0xcb, 0x8b, 0xae, 0x7c, 0x59, 0x9d, 0x40, 0xf2, 0x04, 0x2f, 0x5f, 0x76, 0xe5, 0x25, + 0x75, 0x12, 0xc9, 0xc7, 0x78, 0x79, 0xc9, 0x95, 0xaf, 0xa8, 0x53, 0x48, 0x9e, 0xe4, 0xe5, 0x2b, + 0xda, 0xfb, 0x36, 0xbc, 0x86, 0x0b, 0x6f, 0x9a, 0x87, 0x97, 0x02, 0x9b, 0xe6, 0x81, 0xa5, 0x90, + 0xa6, 0x79, 0x48, 0x29, 0x98, 0x69, 0x1e, 0x4c, 0x0a, 0x63, 0x9a, 0x87, 0x91, 0x02, 0x98, 0xe6, + 0x01, 0xa4, 0xd0, 0xa5, 0x79, 0xe8, 0x28, 0x68, 0x69, 0x1e, 0x34, 0x0a, 0x57, 0x9a, 0x87, 0x8b, + 0x02, 0xa5, 0x0a, 0x40, 0xb9, 0x10, 0xa9, 0x02, 0x44, 0x2e, 0x38, 0xaa, 0x00, 0x8e, 0x0b, 0x8b, + 0x2a, 0xc0, 0xe2, 0x02, 0xa2, 0x0a, 0x80, 0xb8, 0x50, 0xa8, 0x02, 0x14, 0x2e, 0x08, 0x38, 0xc7, + 0x9a, 0xfa, 0x91, 0x4f, 0x8e, 0x81, 0x81, 0x39, 0x06, 0x06, 0xe6, 0x18, 0x18, 0x98, 0x63, 0x60, + 0x60, 0x8e, 0x81, 0x81, 0x39, 0x06, 0x06, 0xe6, 0x18, 0x18, 0x98, 0x63, 0x60, 0x60, 0x8e, 0x81, + 0xc1, 0x39, 0x06, 0x42, 0x72, 0x0c, 0x84, 0xe4, 0x18, 0x08, 0xc9, 0x31, 0x10, 0x92, 0x63, 0x20, + 0x24, 0xc7, 0x40, 0x60, 0x8e, 0xb9, 0xf0, 0xa6, 0x79, 0x78, 0x7d, 0x73, 0x0c, 0x04, 0xe4, 0x18, + 0x08, 0xc8, 0x31, 0x10, 0x90, 0x63, 0x20, 0x20, 0xc7, 0x40, 0x40, 0x8e, 0x81, 0x80, 0x1c, 0x03, + 0x01, 0x39, 0x06, 0x82, 0x72, 0x0c, 0x04, 0xe6, 0x18, 0x08, 0xcc, 0x31, 0x10, 0x98, 0x63, 0x20, + 0x30, 0xc7, 0x40, 0x60, 0x8e, 0x01, 0x36, 0xc7, 0xfe, 0x04, 0xa0, 0xe2, 0xe4, 0xd8, 0xed, 0xd6, + 0xce, 0x0f, 0xf4, 0x36, 0x86, 0x62, 0x46, 0xc8, 0xb4, 0x51, 0x0b, 0xba, 0x94, 0x0b, 0xc9, 0x8c, + 0x90, 0x6b, 0xbc, 0xbc, 0x48, 0xe5, 0x24, 0xdb, 0x78, 0xf9, 0x32, 0x95, 0x93, 0x7c, 0xe3, 0xe5, + 0x25, 0x2a, 0x27, 0x19, 0xc7, 0xcb, 0x57, 0xa8, 0x9c, 0xe4, 0x1c, 0x2f, 0x5f, 0xa5, 0x72, 0x92, + 0x75, 0xbc, 0xfc, 0x0a, 0x95, 0x93, 0xbc, 0xe3, 0xe5, 0x6b, 0x54, 0x4e, 0x32, 0x8f, 0x97, 0x5f, + 0x55, 0xe6, 0xc4, 0xdc, 0x23, 0x0a, 0x14, 0xda, 0x39, 0x31, 0xfb, 0x04, 0x8d, 0x82, 0xab, 0x41, + 0xf2, 0x4f, 0xd0, 0x28, 0xba, 0x1a, 0x24, 0x03, 0x05, 0x8d, 0x65, 0xed, 0xa1, 0x0d, 0x9f, 0x21, + 0xc2, 0x97, 0x11, 0xe0, 0x93, 0x19, 0xe8, 0x32, 0x02, 0x74, 0x32, 0x03, 0x5b, 0x46, 0x80, 0x4d, + 0x66, 0x20, 0xcb, 0x08, 0x90, 0xc9, 0x0c, 0x5c, 0x19, 0x01, 0x2e, 0x99, 0x81, 0x2a, 0x23, 0x40, + 0x25, 0x33, 0x30, 0x65, 0x04, 0x98, 0x64, 0x06, 0xa2, 0x8c, 0x00, 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0x87, 0x13, 0xdc, 0xc0, 0x96, 0x29, 0x13, 0xe2, 0x00, 0x53, 0x3b, 0xcc, 0x39, + 0x3e, 0xcc, 0xfe, 0xaa, 0x38, 0xd4, 0x79, 0x27, 0x46, 0x76, 0xb8, 0xb3, 0x0e, 0x39, 0x83, 0x41, + 0x34, 0xd1, 0x6f, 0x2d, 0x0e, 0x41, 0xa3, 0x73, 0xa0, 0xbd, 0x0d, 0xa1, 0x93, 0xf2, 0x75, 0xe3, + 0xf8, 0x50, 0xc8, 0xba, 0x49, 0x12, 0xe0, 0xad, 0x7d, 0x7d, 0x0b, 0x7d, 0x5b, 0x2a, 0x7c, 0x3d, + 0x65, 0x4d, 0x30, 0xd0, 0x49, 0x31, 0xdb, 0xfe, 0xcd, 0x50, 0x7b, 0xdf, 0x4a, 0xcc, 0x52, 0x55, + 0x1d, 0xd5, 0xbb, 0xba, 0xb9, 0x6e, 0x74, 0xcd, 0x7d, 0xbd, 0x27, 0x58, 0x14, 0x95, 0x65, 0x2e, + 0x61, 0x27, 0x8b, 0xaf, 0x53, 0x8b, 0x40, 0xa3, 0x65, 0xed, 0x43, 0xdb, 0x41, 0xab, 0x14, 0xf0, + 0xdc, 0x20, 0x88, 0x70, 0x83, 0xca, 0x2a, 0x57, 0xbf, 0x0d, 0x70, 0x53, 0x78, 0xb4, 0xbc, 0xca, + 0x3d, 0xe7, 0x0c, 0x76, 0x96, 0x7f, 0xc6, 0x24, 0x31, 0x25, 0x2e, 0xbf, 0x19, 0xea, 0x72, 0x40, + 0x75, 0x3b, 0x6c, 0x4c, 0x41, 0xd4, 0x98, 0xfe, 0x91, 0x56, 0x1c, 0x56, 0x73, 0x4d, 0xdf, 0x6d, + 0x1d, 0x1f, 0x98, 0xca, 0xa5, 0x50, 0xec, 0xcb, 0x52, 0x95, 0xba, 0x5a, 0x8a, 0x0a, 0x7f, 0x59, + 0xae, 0x54, 0xa8, 0xbb, 0x57, 0x86, 0xa0, 0x40, 0x59, 0xae, 0x56, 0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, 0x94, 0xbc, 0xc8, 0x3f, 0x42, 0x79, 0x55, 0x3c, 0xc7, 0x44, + 0xca, 0x31, 0x46, 0xea, 0x39, 0x26, 0xc2, 0x49, 0x3d, 0xc7, 0x44, 0x38, 0xa9, 0xe7, 0x98, 0x08, + 0x27, 0xf5, 0x6c, 0x05, 0x70, 0x52, 0xcf, 0x31, 0x11, 0x4e, 0xea, 0x39, 0x26, 0xc2, 0x49, 0xbd, + 0xc7, 0x44, 0xb0, 0x38, 0xf0, 0x98, 0x08, 0x2f, 0xf7, 0x1e, 0x13, 0xe1, 0xe5, 0xde, 0x63, 0x22, + 0x65, 0x54, 0x9f, 0x1d, 0xeb, 0xc1, 0x9b, 0x0e, 0xbc, 0xfd, 0xa0, 0x67, 0x40, 0x77, 0x02, 0xde, + 0x84, 0x53, 0xce, 0xfb, 0x88, 0x6a, 0xd7, 0x30, 0x5b, 0x1d, 0x03, 0x4d, 0xc5, 0x5f, 0x87, 0x49, + 0xa7, 0xc9, 0x79, 0xca, 0xf1, 0x7b, 0x0a, 0x74, 0xe4, 0x78, 0xba, 0x4d, 0xee, 0x30, 0xda, 0xda, + 0x97, 0x31, 0x98, 0x76, 0xc4, 0x8d, 0xd6, 0xa1, 0xce, 0x1d, 0x32, 0x9a, 0x17, 0xb6, 0x94, 0x26, + 0x2d, 0xf3, 0xe7, 0xcf, 0x66, 0x9d, 0xd6, 0x75, 0x4a, 0xa6, 0x79, 0x61, 0x73, 0x89, 0xd7, 0x73, + 0xd7, 0x9f, 0x79, 0xe1, 0xe0, 0x11, 0xaf, 0x47, 0x97, 0x1b, 0xaa, 0x47, 0x8e, 0x20, 0xf1, 0x7a, + 0x35, 0xca, 0xb2, 0x79, 0xe1, 0x30, 0x12, 0xaf, 0x57, 0xa7, 0x7c, 0x9b, 0x17, 0xb6, 0x9e, 0x78, + 0xbd, 0x6b, 0x94, 0x79, 0xf3, 0xc2, 0x26, 0x14, 0xaf, 0xf7, 0x4d, 0xca, 0xc1, 0x79, 0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 0x20, 0x10, 0x81, 0x41, 0x20, 0x02, 0x83, 0x40, 0x04, 0x06, 0x81, 0x08, 0x0c, + 0x02, 0x11, 0x18, 0x04, 0x22, 0x30, 0x08, 0x44, 0x60, 0x10, 0x88, 0xc2, 0x20, 0x10, 0x89, 0x41, + 0x20, 0x88, 0x41, 0x59, 0xf1, 0xc0, 0x03, 0xf4, 0x9b, 0x90, 0xb2, 0xe2, 0xce, 0x67, 0x38, 0x85, + 0x40, 0x24, 0x0a, 0x81, 0x20, 0x0a, 0x7d, 0x84, 0x0a, 0x29, 0x8e, 0x42, 0x78, 0x7b, 0xe8, 0xac, + 0x66, 0xa0, 0xd5, 0x08, 0xe7, 0x2b, 0xfc, 0x38, 0xb5, 0x1a, 0x61, 0x8f, 0x7a, 0x10, 0xcf, 0xbc, + 0xb3, 0x50, 0x3d, 0xc2, 0x2c, 0x74, 0x8d, 0x72, 0x68, 0x35, 0xc2, 0xb9, 0x0b, 0x2f, 0xf7, 0xd6, + 0x06, 0x4d, 0x02, 0xd7, 0x23, 0x4d, 0x02, 0x37, 0x22, 0x4d, 0x02, 0x37, 0x5d, 0x04, 0x7f, 0x22, + 0xc3, 0x57, 0x5d, 0x04, 0x9d, 0x5f, 0x5b, 0x0f, 0x8e, 0xac, 0x29, 0xc0, 0xdd, 0xa1, 0x52, 0xc8, + 0xae, 0x0d, 0x03, 0xa3, 0xb5, 0x7f, 0x73, 0x9b, 0xdf, 0xab, 0x2a, 0x0f, 0xbb, 0x7f, 0xc3, 0x20, + 0x8e, 0xdf, 0x85, 0x66, 0x21, 0xb8, 0xd1, 0xee, 0xdb, 0xb3, 0x85, 0xdf, 0xb0, 0xd5, 0x26, 0xe8, + 0xb4, 0xfb, 0x4a, 0x13, 0x8e, 0xda, 0xe3, 0xf6, 0x6d, 0x78, 0x4f, 0x33, 0x30, 0x82, 0xde, 0x1e, + 0xb8, 0xaf, 0x3d, 0x91, 0xe0, 0x1c, 0x47, 0xe5, 0xb3, 0xd9, 0x31, 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xba, 0x9d, 0x90, 0x53, 0x45, 0xf5, 0xf2, 0x12, 0x5e, 0x46, 0xd6, + 0x0b, 0xca, 0x05, 0xc2, 0x02, 0x2e, 0xc7, 0x71, 0x80, 0x9c, 0x15, 0x65, 0xbd, 0x80, 0xee, 0xd0, + 0x31, 0xa8, 0x04, 0x1a, 0x04, 0x47, 0xc9, 0xe9, 0xa4, 0x52, 0x28, 0x5f, 0xc7, 0x9d, 0x54, 0x03, + 0x3b, 0x09, 0x09, 0x95, 0xd3, 0x53, 0xb5, 0x50, 0xd9, 0x3a, 0xf9, 0x64, 0x66, 0xe4, 0x29, 0xba, + 0xfe, 0x8e, 0xae, 0x8f, 0x3f, 0x99, 0x91, 0x3e, 0x43, 0xd7, 0xe7, 0xe8, 0xfa, 0x02, 0x5d, 0xef, + 0x3d, 0x9f, 0x91, 0x1e, 0xa3, 0xeb, 0x43, 0x74, 0xfd, 0x01, 0x5d, 0x4f, 0xd0, 0x75, 0xf2, 0x1c, + 0xe9, 0xa3, 0xeb, 0x63, 0xf4, 0xfb, 0x33, 0xf4, 0xfd, 0x39, 0xfa, 0xfe, 0x02, 0x5d, 0xef, 0x7d, + 0x3a, 0x33, 0xf2, 0x08, 0x5d, 0x8f, 0x3f, 0x9d, 0x91, 0xfe, 0x13, 0x00, 0x00, 0xff, 0xff, 0xe3, + 0x57, 0x38, 0x0d, 0xb3, 0x34, 0x00, 0x00, +} diff --git a/vendor/github.com/gogo/protobuf/test/combos/unsafemarshaler/thetest.proto b/vendor/github.com/gogo/protobuf/test/combos/unsafemarshaler/thetest.proto new file mode 100644 index 000000000..4bba611d9 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/combos/unsafemarshaler/thetest.proto @@ -0,0 +1,624 @@ +// Copyright (c) 2013, Vastech SA (PTY) LTD. All rights reserved. +// http://github.com/gogo/protobuf/gogoproto +// +// 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 test; + +import "github.com/gogo/protobuf/gogoproto/gogo.proto"; + +option (gogoproto.goproto_stringer_all) = false; +option (gogoproto.goproto_enum_prefix_all) = false; +option (gogoproto.goproto_getters_all) = false; + +option (gogoproto.equal_all) = true; +option (gogoproto.verbose_equal_all) = true; +option (gogoproto.stringer_all) = true; +option (gogoproto.gostring_all) = true; +option (gogoproto.face_all) = true; +option (gogoproto.description_all) = true; + +option (gogoproto.testgen_all) = true; +option (gogoproto.populate_all) = true; +option (gogoproto.benchgen_all) = true; +option (gogoproto.unmarshaler_all) = false; +option (gogoproto.marshaler_all) = false; +option (gogoproto.sizer_all) = true; +option (gogoproto.protosizer_all) = false; + +option (gogoproto.goproto_enum_stringer_all) = false; +option (gogoproto.enum_stringer_all) = true; + +option (gogoproto.unsafe_marshaler_all) = true; +option (gogoproto.unsafe_unmarshaler_all) = false; + +option (gogoproto.compare_all) = true; + +message NidOptNative { + optional double Field1 = 1 [(gogoproto.nullable) = false]; + optional float Field2 = 2 [(gogoproto.nullable) = false]; + optional int32 Field3 = 3 [(gogoproto.nullable) = false]; + optional int64 Field4 = 4 [(gogoproto.nullable) = false]; + optional uint32 Field5 = 5 [(gogoproto.nullable) = false]; + optional uint64 Field6 = 6 [(gogoproto.nullable) = false]; + optional sint32 Field7 = 7 [(gogoproto.nullable) = false]; + optional sint64 Field8 = 8 [(gogoproto.nullable) = false]; + optional fixed32 Field9 = 9 [(gogoproto.nullable) = false]; + optional sfixed32 Field10 = 10 [(gogoproto.nullable) = false]; + optional fixed64 Field11 = 11 [(gogoproto.nullable) = false]; + optional sfixed64 Field12 = 12 [(gogoproto.nullable) = false]; + optional bool Field13 = 13 [(gogoproto.nullable) = false]; + optional string Field14 = 14 [(gogoproto.nullable) = false]; + optional bytes Field15 = 15 [(gogoproto.nullable) = false]; +} + +message NinOptNative { + optional double Field1 = 1; + optional float Field2 = 2; + optional int32 Field3 = 3; + optional int64 Field4 = 4; + optional uint32 Field5 = 5; + optional uint64 Field6 = 6; + optional sint32 Field7 = 7; + optional sint64 Field8 = 8; + optional fixed32 Field9 = 9; + optional sfixed32 Field10 = 10; + optional fixed64 Field11 = 11; + optional sfixed64 Field12 = 12; + optional bool Field13 = 13; + optional string Field14 = 14; + optional bytes Field15 = 15; +} + +message NidRepNative { + repeated double Field1 = 1 [(gogoproto.nullable) = false]; + repeated float Field2 = 2 [(gogoproto.nullable) = false]; + repeated int32 Field3 = 3 [(gogoproto.nullable) = false]; + repeated int64 Field4 = 4 [(gogoproto.nullable) = false]; + repeated uint32 Field5 = 5 [(gogoproto.nullable) = false]; + repeated uint64 Field6 = 6 [(gogoproto.nullable) = false]; + repeated sint32 Field7 = 7 [(gogoproto.nullable) = false]; + repeated sint64 Field8 = 8 [(gogoproto.nullable) = false]; + repeated fixed32 Field9 = 9 [(gogoproto.nullable) = false]; + repeated sfixed32 Field10 = 10 [(gogoproto.nullable) = false]; + repeated fixed64 Field11 = 11 [(gogoproto.nullable) = false]; + repeated sfixed64 Field12 = 12 [(gogoproto.nullable) = false]; + repeated bool Field13 = 13 [(gogoproto.nullable) = false]; + repeated string Field14 = 14 [(gogoproto.nullable) = false]; + repeated bytes Field15 = 15 [(gogoproto.nullable) = false]; +} + +message NinRepNative { + repeated double Field1 = 1; + repeated float Field2 = 2; + repeated int32 Field3 = 3; + repeated int64 Field4 = 4; + repeated uint32 Field5 = 5; + repeated uint64 Field6 = 6; + repeated sint32 Field7 = 7; + repeated sint64 Field8 = 8; + repeated fixed32 Field9 = 9; + repeated sfixed32 Field10 = 10; + repeated fixed64 Field11 = 11; + repeated sfixed64 Field12 = 12; + repeated bool Field13 = 13; + repeated string Field14 = 14; + repeated bytes Field15 = 15; +} + +message NidRepPackedNative { + repeated double Field1 = 1 [(gogoproto.nullable) = false, packed = true]; + repeated float Field2 = 2 [(gogoproto.nullable) = false, packed = true]; + repeated int32 Field3 = 3 [(gogoproto.nullable) = false, packed = true]; + repeated int64 Field4 = 4 [(gogoproto.nullable) = false, packed = true]; + repeated uint32 Field5 = 5 [(gogoproto.nullable) = false, packed = true]; + repeated uint64 Field6 = 6 [(gogoproto.nullable) = false, packed = true]; + repeated sint32 Field7 = 7 [(gogoproto.nullable) = false, packed = true]; + repeated sint64 Field8 = 8 [(gogoproto.nullable) = false, packed = true]; + repeated fixed32 Field9 = 9 [(gogoproto.nullable) = false, packed = true]; + repeated sfixed32 Field10 = 10 [(gogoproto.nullable) = false, packed = true]; + repeated fixed64 Field11 = 11 [(gogoproto.nullable) = false, packed = true]; + repeated sfixed64 Field12 = 12 [(gogoproto.nullable) = false, packed = true]; + repeated bool Field13 = 13 [(gogoproto.nullable) = false, packed = true]; +} + +message NinRepPackedNative { + repeated double Field1 = 1 [packed = true]; + repeated float Field2 = 2 [packed = true]; + repeated int32 Field3 = 3 [packed = true]; + repeated int64 Field4 = 4 [packed = true]; + repeated uint32 Field5 = 5 [packed = true]; + repeated uint64 Field6 = 6 [packed = true]; + repeated sint32 Field7 = 7 [packed = true]; + repeated sint64 Field8 = 8 [packed = true]; + repeated fixed32 Field9 = 9 [packed = true]; + repeated sfixed32 Field10 = 10 [packed = true]; + repeated fixed64 Field11 = 11 [packed = true]; + repeated sfixed64 Field12 = 12 [packed = true]; + repeated bool Field13 = 13 [packed = true]; +} + +message NidOptStruct { + optional double Field1 = 1 [(gogoproto.nullable) = false]; + optional float Field2 = 2 [(gogoproto.nullable) = false]; + optional NidOptNative Field3 = 3 [(gogoproto.nullable) = false]; + optional NinOptNative Field4 = 4 [(gogoproto.nullable) = false]; + optional uint64 Field6 = 6 [(gogoproto.nullable) = false]; + optional sint32 Field7 = 7 [(gogoproto.nullable) = false]; + optional NidOptNative Field8 = 8 [(gogoproto.nullable) = false]; + optional bool Field13 = 13 [(gogoproto.nullable) = false]; + optional string Field14 = 14 [(gogoproto.nullable) = false]; + optional bytes Field15 = 15 [(gogoproto.nullable) = false]; +} + +message NinOptStruct { + optional double Field1 = 1; + optional float Field2 = 2; + optional NidOptNative Field3 = 3; + optional NinOptNative Field4 = 4; + optional uint64 Field6 = 6; + optional sint32 Field7 = 7; + optional NidOptNative Field8 = 8; + optional bool Field13 = 13; + optional string Field14 = 14; + optional bytes Field15 = 15; +} + +message NidRepStruct { + repeated double Field1 = 1 [(gogoproto.nullable) = false]; + repeated float Field2 = 2 [(gogoproto.nullable) = false]; + repeated NidOptNative Field3 = 3 [(gogoproto.nullable) = false]; + repeated NinOptNative Field4 = 4 [(gogoproto.nullable) = false]; + repeated uint64 Field6 = 6 [(gogoproto.nullable) = false]; + repeated sint32 Field7 = 7 [(gogoproto.nullable) = false]; + repeated NidOptNative Field8 = 8 [(gogoproto.nullable) = false]; + repeated bool Field13 = 13 [(gogoproto.nullable) = false]; + repeated string Field14 = 14 [(gogoproto.nullable) = false]; + repeated bytes Field15 = 15 [(gogoproto.nullable) = false]; +} + +message NinRepStruct { + repeated double Field1 = 1; + repeated float Field2 = 2; + repeated NidOptNative Field3 = 3; + repeated NinOptNative Field4 = 4; + repeated uint64 Field6 = 6; + repeated sint32 Field7 = 7; + repeated NidOptNative Field8 = 8; + repeated bool Field13 = 13; + repeated string Field14 = 14; + repeated bytes Field15 = 15; +} + +message NidEmbeddedStruct { + optional NidOptNative Field1 = 1 [(gogoproto.embed) = true]; + optional NidOptNative Field200 = 200 [(gogoproto.nullable) = false]; + optional bool Field210 = 210 [(gogoproto.nullable) = false]; +} + +message NinEmbeddedStruct { + optional NidOptNative Field1 = 1 [(gogoproto.embed) = true]; + optional NidOptNative Field200 = 200; + optional bool Field210 = 210; +} + +message NidNestedStruct { + optional NidOptStruct Field1 = 1 [(gogoproto.nullable) = false]; + repeated NidRepStruct Field2 = 2 [(gogoproto.nullable) = false]; +} + +message NinNestedStruct { + optional NinOptStruct Field1 = 1; + repeated NinRepStruct Field2 = 2; +} + +message NidOptCustom { + optional bytes Id = 1 [(gogoproto.customtype) = "Uuid", (gogoproto.nullable) = false]; + optional bytes Value = 2 [(gogoproto.customtype) = "github.com/gogo/protobuf/test/custom.Uint128", (gogoproto.nullable) = false]; +} + +message CustomDash { + optional bytes Value = 1 [(gogoproto.customtype) = "github.com/gogo/protobuf/test/custom-dash-type.Bytes"]; +} + +message NinOptCustom { + optional bytes Id = 1 [(gogoproto.customtype) = "Uuid"]; + optional bytes Value = 2 [(gogoproto.customtype) = "github.com/gogo/protobuf/test/custom.Uint128"]; +} + +message NidRepCustom { + repeated bytes Id = 1 [(gogoproto.customtype) = "Uuid", (gogoproto.nullable) = false]; + repeated bytes Value = 2 [(gogoproto.customtype) = "github.com/gogo/protobuf/test/custom.Uint128", (gogoproto.nullable) = false]; +} + +message NinRepCustom { + repeated bytes Id = 1 [(gogoproto.customtype) = "Uuid"]; + repeated bytes Value = 2 [(gogoproto.customtype) = "github.com/gogo/protobuf/test/custom.Uint128"]; +} + +message NinOptNativeUnion { + option (gogoproto.onlyone) = true; + optional double Field1 = 1; + optional float Field2 = 2; + optional int32 Field3 = 3; + optional int64 Field4 = 4; + optional uint32 Field5 = 5; + optional uint64 Field6 = 6; + optional bool Field13 = 13; + optional string Field14 = 14; + optional bytes Field15 = 15; +} + +message NinOptStructUnion { + option (gogoproto.onlyone) = true; + optional double Field1 = 1; + optional float Field2 = 2; + optional NidOptNative Field3 = 3; + optional NinOptNative Field4 = 4; + optional uint64 Field6 = 6; + optional sint32 Field7 = 7; + optional bool Field13 = 13; + optional string Field14 = 14; + optional bytes Field15 = 15; +} + +message NinEmbeddedStructUnion { + option (gogoproto.onlyone) = true; + optional NidOptNative Field1 = 1 [(gogoproto.embed) = true]; + optional NinOptNative Field200 = 200; + optional bool Field210 = 210; +} + +message NinNestedStructUnion { + option (gogoproto.onlyone) = true; + optional NinOptNativeUnion Field1 = 1; + optional NinOptStructUnion Field2 = 2; + optional NinEmbeddedStructUnion Field3 = 3; +} + +message Tree { + option (gogoproto.onlyone) = true; + optional OrBranch Or = 1; + optional AndBranch And = 2; + optional Leaf Leaf = 3; +} + +message OrBranch { + optional Tree Left = 1 [(gogoproto.nullable) = false]; + optional Tree Right = 2 [(gogoproto.nullable) = false]; +} + +message AndBranch { + optional Tree Left = 1 [(gogoproto.nullable) = false]; + optional Tree Right = 2 [(gogoproto.nullable) = false]; +} + +message Leaf { + optional int64 Value = 1 [(gogoproto.nullable) = false]; + optional string StrValue = 2 [(gogoproto.nullable) = false]; +} + +message DeepTree { + option (gogoproto.onlyone) = true; + optional ADeepBranch Down = 1; + optional AndDeepBranch And = 2; + optional DeepLeaf Leaf = 3; +} + +message ADeepBranch { + optional DeepTree Down = 2 [(gogoproto.nullable) = false]; +} + +message AndDeepBranch { + optional DeepTree Left = 1 [(gogoproto.nullable) = false]; + optional DeepTree Right = 2 [(gogoproto.nullable) = false]; +} + +message DeepLeaf { + optional Tree Tree = 1 [(gogoproto.nullable) = false]; +} + +message Nil { + +} + +enum TheTestEnum { + A = 0; + B = 1; + C = 2; +} + +enum AnotherTestEnum { + option (gogoproto.goproto_enum_prefix) = false; + D = 10; + E = 11; +} + +// YetAnotherTestEnum is used to test cross-package import of custom name +// fields and default resolution. +enum YetAnotherTestEnum { + option (gogoproto.goproto_enum_prefix) = false; + AA = 0; + BB = 1 [(gogoproto.enumvalue_customname) = "BetterYetBB"]; +} + +// YetAnotherTestEnum is used to test cross-package import of custom name +// fields and default resolution. +enum YetYetAnotherTestEnum { + option (gogoproto.goproto_enum_prefix) = true; + CC = 0; + DD = 1 [(gogoproto.enumvalue_customname) = "BetterYetDD"]; +} + +message NidOptEnum { + optional TheTestEnum Field1 = 1 [(gogoproto.nullable) = false]; +} + +message NinOptEnum { + optional TheTestEnum Field1 = 1; + optional YetAnotherTestEnum Field2 = 2; + optional YetYetAnotherTestEnum Field3 = 3; +} + +message NidRepEnum { + repeated TheTestEnum Field1 = 1 [(gogoproto.nullable) = false]; + repeated YetAnotherTestEnum Field2 = 2 [(gogoproto.nullable) = false]; + repeated YetYetAnotherTestEnum Field3 = 3 [(gogoproto.nullable) = false]; +} + +message NinRepEnum { + repeated TheTestEnum Field1 = 1; + repeated YetAnotherTestEnum Field2 = 2; + repeated YetYetAnotherTestEnum Field3 = 3; +} + +message NinOptEnumDefault { + option (gogoproto.goproto_getters) = true; + option (gogoproto.face) = false; + optional TheTestEnum Field1 = 1 [default=C]; + optional YetAnotherTestEnum Field2 = 2 [default=BB]; + optional YetYetAnotherTestEnum Field3 = 3 [default=CC]; +} + +message AnotherNinOptEnum { + optional AnotherTestEnum Field1 = 1; + optional YetAnotherTestEnum Field2 = 2; + optional YetYetAnotherTestEnum Field3 = 3; +} + +message AnotherNinOptEnumDefault { + option (gogoproto.goproto_getters) = true; + option (gogoproto.face) = false; + optional AnotherTestEnum Field1 = 1 [default=E]; + optional YetAnotherTestEnum Field2 = 2 [default=BB]; + optional YetYetAnotherTestEnum Field3 = 3 [default=CC]; +} + + +message Timer { + optional sfixed64 Time1 = 1 [(gogoproto.nullable) = false]; + optional sfixed64 Time2 = 2 [(gogoproto.nullable) = false]; + optional bytes Data = 3 [(gogoproto.nullable) = false]; +} + +message MyExtendable { + option (gogoproto.face) = false; + optional int64 Field1 = 1; + extensions 100 to 199; +} + +extend MyExtendable { + optional double FieldA = 100; + optional NinOptNative FieldB = 101; + optional NinEmbeddedStruct FieldC = 102; + repeated int64 FieldD = 104; + repeated NinOptNative FieldE = 105; +} + +message OtherExtenable { + option (gogoproto.face) = false; + optional int64 Field2 = 2; + extensions 14 to 16; + optional int64 Field13 = 13; + extensions 10 to 12; + optional MyExtendable M = 1; +} + +message NestedDefinition { + optional int64 Field1 = 1; + message NestedMessage { + optional fixed64 NestedField1 = 1; + optional NestedNestedMsg NNM = 2; + message NestedNestedMsg { + optional string NestedNestedField1 = 10; + } + } + enum NestedEnum { + TYPE_NESTED = 1; + } + optional NestedEnum EnumField = 2; + optional NestedMessage.NestedNestedMsg NNM = 3; + optional NestedMessage NM = 4; +} + +message NestedScope { + optional NestedDefinition.NestedMessage.NestedNestedMsg A = 1; + optional NestedDefinition.NestedEnum B = 2; + optional NestedDefinition.NestedMessage C = 3; +} + +message NinOptNativeDefault { + option (gogoproto.goproto_getters) = true; + option (gogoproto.face) = false; + optional double Field1 = 1 [default = 1234.1234]; + optional float Field2 = 2 [default = 1234.1234]; + optional int32 Field3 = 3 [default = 1234]; + optional int64 Field4 = 4 [default = 1234]; + optional uint32 Field5 = 5 [default = 1234]; + optional uint64 Field6 = 6 [default = 1234]; + optional sint32 Field7 = 7 [default = 1234]; + optional sint64 Field8 = 8 [default = 1234]; + optional fixed32 Field9 = 9 [default = 1234]; + optional sfixed32 Field10 = 10 [default = 1234]; + optional fixed64 Field11 = 11 [default = 1234]; + optional sfixed64 Field12 = 12 [default = 1234]; + optional bool Field13 = 13 [default = true]; + optional string Field14 = 14 [default = "1234"]; + optional bytes Field15 = 15; +} + +message CustomContainer { + optional NidOptCustom CustomStruct = 1 [(gogoproto.nullable) = false]; +} + +message CustomNameNidOptNative { + optional double Field1 = 1 [(gogoproto.nullable) = false, (gogoproto.customname) = "FieldA"]; + optional float Field2 = 2 [(gogoproto.nullable) = false, (gogoproto.customname) = "FieldB"]; + optional int32 Field3 = 3 [(gogoproto.nullable) = false, (gogoproto.customname) = "FieldC"]; + optional int64 Field4 = 4 [(gogoproto.nullable) = false, (gogoproto.customname) = "FieldD"]; + optional uint32 Field5 = 5 [(gogoproto.nullable) = false, (gogoproto.customname) = "FieldE"]; + optional uint64 Field6 = 6 [(gogoproto.nullable) = false, (gogoproto.customname) = "FieldF"]; + optional sint32 Field7 = 7 [(gogoproto.nullable) = false, (gogoproto.customname) = "FieldG"]; + optional sint64 Field8 = 8 [(gogoproto.nullable) = false, (gogoproto.customname) = "FieldH"]; + optional fixed32 Field9 = 9 [(gogoproto.nullable) = false, (gogoproto.customname) = "FieldI"]; + optional sfixed32 Field10 = 10 [(gogoproto.nullable) = false, (gogoproto.customname) = "FieldJ"]; + optional fixed64 Field11 = 11 [(gogoproto.nullable) = false, (gogoproto.customname) = "FieldK"]; + optional sfixed64 Field12 = 12 [(gogoproto.nullable) = false, (gogoproto.customname) = "FieldL"]; + optional bool Field13 = 13 [(gogoproto.nullable) = false, (gogoproto.customname) = "FieldM"]; + optional string Field14 = 14 [(gogoproto.nullable) = false, (gogoproto.customname) = "FieldN"]; + optional bytes Field15 = 15 [(gogoproto.nullable) = false, (gogoproto.customname) = "FieldO"]; +} + +message CustomNameNinOptNative { + optional double Field1 = 1 [(gogoproto.customname) = "FieldA"]; + optional float Field2 = 2 [(gogoproto.customname) = "FieldB"]; + optional int32 Field3 = 3 [(gogoproto.customname) = "FieldC"]; + optional int64 Field4 = 4 [(gogoproto.customname) = "FieldD"]; + optional uint32 Field5 = 5 [(gogoproto.customname) = "FieldE"]; + optional uint64 Field6 = 6 [(gogoproto.customname) = "FieldF"]; + optional sint32 Field7 = 7 [(gogoproto.customname) = "FieldG"]; + optional sint64 Field8 = 8 [(gogoproto.customname) = "FieldH"]; + optional fixed32 Field9 = 9 [(gogoproto.customname) = "FieldI"]; + optional sfixed32 Field10 = 10 [(gogoproto.customname) = "FieldJ"]; + optional fixed64 Field11 = 11 [(gogoproto.customname) = "FieldK"]; + optional sfixed64 Field12 = 12 [(gogoproto.customname) = "FielL"]; + optional bool Field13 = 13 [(gogoproto.customname) = "FieldM"]; + optional string Field14 = 14 [(gogoproto.customname) = "FieldN"]; + optional bytes Field15 = 15 [(gogoproto.customname) = "FieldO"]; +} + +message CustomNameNinRepNative { + repeated double Field1 = 1 [(gogoproto.customname) = "FieldA"]; + repeated float Field2 = 2 [(gogoproto.customname) = "FieldB"]; + repeated int32 Field3 = 3 [(gogoproto.customname) = "FieldC"]; + repeated int64 Field4 = 4 [(gogoproto.customname) = "FieldD"]; + repeated uint32 Field5 = 5 [(gogoproto.customname) = "FieldE"]; + repeated uint64 Field6 = 6 [(gogoproto.customname) = "FieldF"]; + repeated sint32 Field7 = 7 [(gogoproto.customname) = "FieldG"]; + repeated sint64 Field8 = 8 [(gogoproto.customname) = "FieldH"]; + repeated fixed32 Field9 = 9 [(gogoproto.customname) = "FieldI"]; + repeated sfixed32 Field10 = 10 [(gogoproto.customname) = "FieldJ"]; + repeated fixed64 Field11 = 11 [(gogoproto.customname) = "FieldK"]; + repeated sfixed64 Field12 = 12 [(gogoproto.customname) = "FieldL"]; + repeated bool Field13 = 13 [(gogoproto.customname) = "FieldM"]; + repeated string Field14 = 14 [(gogoproto.customname) = "FieldN"]; + repeated bytes Field15 = 15 [(gogoproto.customname) = "FieldO"]; +} + +message CustomNameNinStruct { + optional double Field1 = 1 [(gogoproto.customname) = "FieldA"]; + optional float Field2 = 2 [(gogoproto.customname) = "FieldB"]; + optional NidOptNative Field3 = 3 [(gogoproto.customname) = "FieldC"]; + repeated NinOptNative Field4 = 4 [(gogoproto.customname) = "FieldD"]; + optional uint64 Field6 = 6 [(gogoproto.customname) = "FieldE"]; + optional sint32 Field7 = 7 [(gogoproto.customname) = "FieldF"]; + optional NidOptNative Field8 = 8 [(gogoproto.customname) = "FieldG"]; + optional bool Field13 = 13 [(gogoproto.customname) = "FieldH"]; + optional string Field14 = 14 [(gogoproto.customname) = "FieldI"]; + optional bytes Field15 = 15 [(gogoproto.customname) = "FieldJ"]; +} + +message CustomNameCustomType { + optional bytes Id = 1 [(gogoproto.customname) = "FieldA", (gogoproto.customtype) = "Uuid"]; + optional bytes Value = 2 [(gogoproto.customname) = "FieldB", (gogoproto.customtype) = "github.com/gogo/protobuf/test/custom.Uint128"]; + repeated bytes Ids = 3 [(gogoproto.customname) = "FieldC", (gogoproto.customtype) = "Uuid"]; + repeated bytes Values = 4 [(gogoproto.customname) = "FieldD", (gogoproto.customtype) = "github.com/gogo/protobuf/test/custom.Uint128"]; +} + +message CustomNameNinEmbeddedStructUnion { + option (gogoproto.onlyone) = true; + optional NidOptNative Field1 = 1 [(gogoproto.embed) = true]; + optional NinOptNative Field200 = 200 [(gogoproto.customname) = "FieldA"]; + optional bool Field210 = 210 [(gogoproto.customname) = "FieldB"]; +} + +message CustomNameEnum { + optional TheTestEnum Field1 = 1 [(gogoproto.customname) = "FieldA"]; + repeated TheTestEnum Field2 = 2 [(gogoproto.customname) = "FieldB"]; +} + +message NoExtensionsMap { + option (gogoproto.face) = false; + option (gogoproto.goproto_extensions_map) = false; + optional int64 Field1 = 1; + extensions 100 to 199; +} + +extend NoExtensionsMap { + optional double FieldA1 = 100; + optional NinOptNative FieldB1 = 101; + optional NinEmbeddedStruct FieldC1 = 102; +} + +message Unrecognized { + option (gogoproto.goproto_unrecognized) = false; + optional string Field1 = 1; +} + +message UnrecognizedWithInner { + message Inner { + option (gogoproto.goproto_unrecognized) = false; + optional uint32 Field1 = 1; + } + + repeated Inner embedded = 1; + optional string Field2 = 2; +} + +message UnrecognizedWithEmbed { + message Embedded { + option (gogoproto.goproto_unrecognized) = false; + optional uint32 Field1 = 1; + } + + optional Embedded embedded = 1 [(gogoproto.embed) = true, (gogoproto.nullable) = false]; + optional string Field2 = 2; +} + +message Node { + optional string Label = 1; + repeated Node Children = 2; +} + diff --git a/vendor/github.com/gogo/protobuf/test/combos/unsafemarshaler/thetestpb_test.go b/vendor/github.com/gogo/protobuf/test/combos/unsafemarshaler/thetestpb_test.go new file mode 100644 index 000000000..44c7b7bf1 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/combos/unsafemarshaler/thetestpb_test.go @@ -0,0 +1,16373 @@ +// Code generated by protoc-gen-gogo. +// source: combos/unsafemarshaler/thetest.proto +// DO NOT EDIT! + +/* +Package test is a generated protocol buffer package. + +It is generated from these files: + combos/unsafemarshaler/thetest.proto + +It has these top-level messages: + NidOptNative + NinOptNative + NidRepNative + NinRepNative + NidRepPackedNative + NinRepPackedNative + NidOptStruct + NinOptStruct + NidRepStruct + NinRepStruct + NidEmbeddedStruct + NinEmbeddedStruct + NidNestedStruct + NinNestedStruct + NidOptCustom + CustomDash + NinOptCustom + NidRepCustom + NinRepCustom + NinOptNativeUnion + NinOptStructUnion + NinEmbeddedStructUnion + NinNestedStructUnion + Tree + OrBranch + AndBranch + Leaf + DeepTree + ADeepBranch + AndDeepBranch + DeepLeaf + Nil + NidOptEnum + NinOptEnum + NidRepEnum + NinRepEnum + NinOptEnumDefault + AnotherNinOptEnum + AnotherNinOptEnumDefault + Timer + MyExtendable + OtherExtenable + NestedDefinition + NestedScope + NinOptNativeDefault + CustomContainer + CustomNameNidOptNative + CustomNameNinOptNative + CustomNameNinRepNative + CustomNameNinStruct + CustomNameCustomType + CustomNameNinEmbeddedStructUnion + CustomNameEnum + NoExtensionsMap + Unrecognized + UnrecognizedWithInner + UnrecognizedWithEmbed + Node +*/ +package test + +import testing "testing" +import math_rand "math/rand" +import time "time" +import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" +import github_com_gogo_protobuf_jsonpb "github.com/gogo/protobuf/jsonpb" +import fmt "fmt" +import go_parser "go/parser" +import proto "github.com/gogo/protobuf/proto" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +func TestNidOptNativeProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidOptNative(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidOptNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestNidOptNativeMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidOptNative(popr, false) + size := p.Size() + data := make([]byte, size) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(data) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidOptNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkNidOptNativeProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NidOptNative, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNidOptNative(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNidOptNativeProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNidOptNative(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &NidOptNative{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinOptNativeProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptNative(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinOptNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestNinOptNativeMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptNative(popr, false) + size := p.Size() + data := make([]byte, size) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(data) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinOptNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkNinOptNativeProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinOptNative, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNinOptNative(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNinOptNativeProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinOptNative(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &NinOptNative{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNidRepNativeProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepNative(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidRepNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestNidRepNativeMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepNative(popr, false) + size := p.Size() + data := make([]byte, size) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(data) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidRepNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkNidRepNativeProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NidRepNative, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNidRepNative(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNidRepNativeProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNidRepNative(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &NidRepNative{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinRepNativeProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepNative(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinRepNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestNinRepNativeMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepNative(popr, false) + size := p.Size() + data := make([]byte, size) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(data) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinRepNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkNinRepNativeProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinRepNative, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNinRepNative(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNinRepNativeProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinRepNative(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &NinRepNative{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNidRepPackedNativeProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepPackedNative(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidRepPackedNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestNidRepPackedNativeMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepPackedNative(popr, false) + size := p.Size() + data := make([]byte, size) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(data) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidRepPackedNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkNidRepPackedNativeProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NidRepPackedNative, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNidRepPackedNative(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNidRepPackedNativeProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNidRepPackedNative(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &NidRepPackedNative{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinRepPackedNativeProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepPackedNative(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinRepPackedNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestNinRepPackedNativeMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepPackedNative(popr, false) + size := p.Size() + data := make([]byte, size) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(data) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinRepPackedNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkNinRepPackedNativeProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinRepPackedNative, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNinRepPackedNative(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNinRepPackedNativeProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinRepPackedNative(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &NinRepPackedNative{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNidOptStructProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidOptStruct(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidOptStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestNidOptStructMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidOptStruct(popr, false) + size := p.Size() + data := make([]byte, size) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(data) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidOptStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkNidOptStructProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NidOptStruct, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNidOptStruct(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNidOptStructProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNidOptStruct(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &NidOptStruct{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinOptStructProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptStruct(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinOptStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestNinOptStructMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptStruct(popr, false) + size := p.Size() + data := make([]byte, size) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(data) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinOptStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkNinOptStructProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinOptStruct, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNinOptStruct(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNinOptStructProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinOptStruct(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &NinOptStruct{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNidRepStructProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepStruct(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidRepStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestNidRepStructMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepStruct(popr, false) + size := p.Size() + data := make([]byte, size) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(data) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidRepStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkNidRepStructProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NidRepStruct, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNidRepStruct(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNidRepStructProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNidRepStruct(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &NidRepStruct{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinRepStructProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepStruct(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinRepStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestNinRepStructMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepStruct(popr, false) + size := p.Size() + data := make([]byte, size) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(data) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinRepStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkNinRepStructProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinRepStruct, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNinRepStruct(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNinRepStructProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinRepStruct(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &NinRepStruct{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNidEmbeddedStructProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidEmbeddedStruct(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidEmbeddedStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestNidEmbeddedStructMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidEmbeddedStruct(popr, false) + size := p.Size() + data := make([]byte, size) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(data) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidEmbeddedStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkNidEmbeddedStructProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NidEmbeddedStruct, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNidEmbeddedStruct(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNidEmbeddedStructProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNidEmbeddedStruct(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &NidEmbeddedStruct{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinEmbeddedStructProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinEmbeddedStruct(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinEmbeddedStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestNinEmbeddedStructMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinEmbeddedStruct(popr, false) + size := p.Size() + data := make([]byte, size) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(data) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinEmbeddedStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkNinEmbeddedStructProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinEmbeddedStruct, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNinEmbeddedStruct(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNinEmbeddedStructProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinEmbeddedStruct(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &NinEmbeddedStruct{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNidNestedStructProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidNestedStruct(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidNestedStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestNidNestedStructMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidNestedStruct(popr, false) + size := p.Size() + data := make([]byte, size) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(data) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidNestedStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkNidNestedStructProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NidNestedStruct, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNidNestedStruct(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNidNestedStructProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNidNestedStruct(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &NidNestedStruct{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinNestedStructProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinNestedStruct(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinNestedStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestNinNestedStructMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinNestedStruct(popr, false) + size := p.Size() + data := make([]byte, size) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(data) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinNestedStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkNinNestedStructProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinNestedStruct, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNinNestedStruct(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNinNestedStructProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinNestedStruct(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &NinNestedStruct{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNidOptCustomProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidOptCustom(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidOptCustom{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestNidOptCustomMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidOptCustom(popr, false) + size := p.Size() + data := make([]byte, size) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(data) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidOptCustom{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkNidOptCustomProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NidOptCustom, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNidOptCustom(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNidOptCustomProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNidOptCustom(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &NidOptCustom{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestCustomDashProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomDash(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &CustomDash{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestCustomDashMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomDash(popr, false) + size := p.Size() + data := make([]byte, size) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(data) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &CustomDash{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkCustomDashProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*CustomDash, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedCustomDash(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkCustomDashProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedCustomDash(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &CustomDash{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinOptCustomProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptCustom(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinOptCustom{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestNinOptCustomMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptCustom(popr, false) + size := p.Size() + data := make([]byte, size) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(data) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinOptCustom{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkNinOptCustomProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinOptCustom, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNinOptCustom(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNinOptCustomProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinOptCustom(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &NinOptCustom{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNidRepCustomProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepCustom(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidRepCustom{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestNidRepCustomMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepCustom(popr, false) + size := p.Size() + data := make([]byte, size) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(data) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidRepCustom{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkNidRepCustomProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NidRepCustom, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNidRepCustom(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNidRepCustomProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNidRepCustom(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &NidRepCustom{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinRepCustomProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepCustom(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinRepCustom{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestNinRepCustomMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepCustom(popr, false) + size := p.Size() + data := make([]byte, size) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(data) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinRepCustom{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkNinRepCustomProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinRepCustom, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNinRepCustom(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNinRepCustomProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinRepCustom(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &NinRepCustom{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinOptNativeUnionProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptNativeUnion(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinOptNativeUnion{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestNinOptNativeUnionMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptNativeUnion(popr, false) + size := p.Size() + data := make([]byte, size) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(data) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinOptNativeUnion{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkNinOptNativeUnionProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinOptNativeUnion, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNinOptNativeUnion(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNinOptNativeUnionProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinOptNativeUnion(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &NinOptNativeUnion{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinOptStructUnionProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptStructUnion(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinOptStructUnion{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestNinOptStructUnionMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptStructUnion(popr, false) + size := p.Size() + data := make([]byte, size) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(data) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinOptStructUnion{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkNinOptStructUnionProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinOptStructUnion, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNinOptStructUnion(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNinOptStructUnionProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinOptStructUnion(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &NinOptStructUnion{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinEmbeddedStructUnionProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinEmbeddedStructUnion(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinEmbeddedStructUnion{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestNinEmbeddedStructUnionMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinEmbeddedStructUnion(popr, false) + size := p.Size() + data := make([]byte, size) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(data) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinEmbeddedStructUnion{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkNinEmbeddedStructUnionProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinEmbeddedStructUnion, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNinEmbeddedStructUnion(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNinEmbeddedStructUnionProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinEmbeddedStructUnion(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &NinEmbeddedStructUnion{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinNestedStructUnionProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinNestedStructUnion(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinNestedStructUnion{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestNinNestedStructUnionMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinNestedStructUnion(popr, false) + size := p.Size() + data := make([]byte, size) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(data) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinNestedStructUnion{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkNinNestedStructUnionProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinNestedStructUnion, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNinNestedStructUnion(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNinNestedStructUnionProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinNestedStructUnion(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &NinNestedStructUnion{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestTreeProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedTree(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Tree{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestTreeMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedTree(popr, false) + size := p.Size() + data := make([]byte, size) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(data) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Tree{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkTreeProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Tree, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedTree(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkTreeProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedTree(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &Tree{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestOrBranchProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedOrBranch(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &OrBranch{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestOrBranchMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedOrBranch(popr, false) + size := p.Size() + data := make([]byte, size) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(data) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &OrBranch{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkOrBranchProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*OrBranch, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedOrBranch(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkOrBranchProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedOrBranch(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &OrBranch{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestAndBranchProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAndBranch(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &AndBranch{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestAndBranchMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAndBranch(popr, false) + size := p.Size() + data := make([]byte, size) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(data) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &AndBranch{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkAndBranchProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*AndBranch, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedAndBranch(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkAndBranchProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedAndBranch(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &AndBranch{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestLeafProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedLeaf(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Leaf{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestLeafMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedLeaf(popr, false) + size := p.Size() + data := make([]byte, size) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(data) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Leaf{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkLeafProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Leaf, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedLeaf(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkLeafProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedLeaf(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &Leaf{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestDeepTreeProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedDeepTree(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &DeepTree{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestDeepTreeMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedDeepTree(popr, false) + size := p.Size() + data := make([]byte, size) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(data) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &DeepTree{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkDeepTreeProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*DeepTree, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedDeepTree(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkDeepTreeProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedDeepTree(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &DeepTree{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestADeepBranchProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedADeepBranch(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &ADeepBranch{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestADeepBranchMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedADeepBranch(popr, false) + size := p.Size() + data := make([]byte, size) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(data) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &ADeepBranch{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkADeepBranchProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*ADeepBranch, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedADeepBranch(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkADeepBranchProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedADeepBranch(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &ADeepBranch{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestAndDeepBranchProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAndDeepBranch(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &AndDeepBranch{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestAndDeepBranchMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAndDeepBranch(popr, false) + size := p.Size() + data := make([]byte, size) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(data) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &AndDeepBranch{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkAndDeepBranchProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*AndDeepBranch, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedAndDeepBranch(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkAndDeepBranchProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedAndDeepBranch(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &AndDeepBranch{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestDeepLeafProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedDeepLeaf(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &DeepLeaf{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestDeepLeafMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedDeepLeaf(popr, false) + size := p.Size() + data := make([]byte, size) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(data) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &DeepLeaf{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkDeepLeafProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*DeepLeaf, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedDeepLeaf(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkDeepLeafProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedDeepLeaf(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &DeepLeaf{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNilProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNil(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Nil{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestNilMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNil(popr, false) + size := p.Size() + data := make([]byte, size) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(data) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Nil{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkNilProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Nil, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNil(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNilProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNil(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &Nil{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNidOptEnumProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidOptEnum(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidOptEnum{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestNidOptEnumMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidOptEnum(popr, false) + size := p.Size() + data := make([]byte, size) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(data) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidOptEnum{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkNidOptEnumProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NidOptEnum, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNidOptEnum(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNidOptEnumProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNidOptEnum(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &NidOptEnum{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinOptEnumProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptEnum(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinOptEnum{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestNinOptEnumMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptEnum(popr, false) + size := p.Size() + data := make([]byte, size) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(data) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinOptEnum{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkNinOptEnumProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinOptEnum, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNinOptEnum(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNinOptEnumProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinOptEnum(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &NinOptEnum{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNidRepEnumProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepEnum(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidRepEnum{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestNidRepEnumMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepEnum(popr, false) + size := p.Size() + data := make([]byte, size) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(data) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidRepEnum{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkNidRepEnumProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NidRepEnum, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNidRepEnum(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNidRepEnumProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNidRepEnum(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &NidRepEnum{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinRepEnumProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepEnum(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinRepEnum{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestNinRepEnumMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepEnum(popr, false) + size := p.Size() + data := make([]byte, size) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(data) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinRepEnum{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkNinRepEnumProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinRepEnum, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNinRepEnum(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNinRepEnumProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinRepEnum(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &NinRepEnum{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinOptEnumDefaultProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptEnumDefault(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinOptEnumDefault{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestNinOptEnumDefaultMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptEnumDefault(popr, false) + size := p.Size() + data := make([]byte, size) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(data) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinOptEnumDefault{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkNinOptEnumDefaultProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinOptEnumDefault, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNinOptEnumDefault(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNinOptEnumDefaultProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinOptEnumDefault(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &NinOptEnumDefault{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestAnotherNinOptEnumProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAnotherNinOptEnum(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &AnotherNinOptEnum{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestAnotherNinOptEnumMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAnotherNinOptEnum(popr, false) + size := p.Size() + data := make([]byte, size) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(data) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &AnotherNinOptEnum{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkAnotherNinOptEnumProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*AnotherNinOptEnum, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedAnotherNinOptEnum(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkAnotherNinOptEnumProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedAnotherNinOptEnum(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &AnotherNinOptEnum{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestAnotherNinOptEnumDefaultProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAnotherNinOptEnumDefault(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &AnotherNinOptEnumDefault{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestAnotherNinOptEnumDefaultMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAnotherNinOptEnumDefault(popr, false) + size := p.Size() + data := make([]byte, size) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(data) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &AnotherNinOptEnumDefault{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkAnotherNinOptEnumDefaultProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*AnotherNinOptEnumDefault, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedAnotherNinOptEnumDefault(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkAnotherNinOptEnumDefaultProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedAnotherNinOptEnumDefault(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &AnotherNinOptEnumDefault{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestTimerProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedTimer(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Timer{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestTimerMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedTimer(popr, false) + size := p.Size() + data := make([]byte, size) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(data) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Timer{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkTimerProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Timer, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedTimer(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkTimerProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedTimer(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &Timer{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestMyExtendableProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMyExtendable(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &MyExtendable{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestMyExtendableMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMyExtendable(popr, false) + size := p.Size() + data := make([]byte, size) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(data) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &MyExtendable{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkMyExtendableProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*MyExtendable, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedMyExtendable(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkMyExtendableProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedMyExtendable(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &MyExtendable{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestOtherExtenableProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedOtherExtenable(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &OtherExtenable{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestOtherExtenableMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedOtherExtenable(popr, false) + size := p.Size() + data := make([]byte, size) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(data) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &OtherExtenable{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkOtherExtenableProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*OtherExtenable, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedOtherExtenable(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkOtherExtenableProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedOtherExtenable(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &OtherExtenable{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNestedDefinitionProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNestedDefinition(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NestedDefinition{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestNestedDefinitionMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNestedDefinition(popr, false) + size := p.Size() + data := make([]byte, size) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(data) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NestedDefinition{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkNestedDefinitionProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NestedDefinition, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNestedDefinition(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNestedDefinitionProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNestedDefinition(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &NestedDefinition{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNestedDefinition_NestedMessageProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNestedDefinition_NestedMessage(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NestedDefinition_NestedMessage{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestNestedDefinition_NestedMessageMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNestedDefinition_NestedMessage(popr, false) + size := p.Size() + data := make([]byte, size) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(data) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NestedDefinition_NestedMessage{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkNestedDefinition_NestedMessageProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NestedDefinition_NestedMessage, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNestedDefinition_NestedMessage(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNestedDefinition_NestedMessageProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNestedDefinition_NestedMessage(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &NestedDefinition_NestedMessage{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNestedDefinition_NestedMessage_NestedNestedMsgProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NestedDefinition_NestedMessage_NestedNestedMsg{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestNestedDefinition_NestedMessage_NestedNestedMsgMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(popr, false) + size := p.Size() + data := make([]byte, size) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(data) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NestedDefinition_NestedMessage_NestedNestedMsg{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkNestedDefinition_NestedMessage_NestedNestedMsgProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NestedDefinition_NestedMessage_NestedNestedMsg, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNestedDefinition_NestedMessage_NestedNestedMsgProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &NestedDefinition_NestedMessage_NestedNestedMsg{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNestedScopeProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNestedScope(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NestedScope{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestNestedScopeMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNestedScope(popr, false) + size := p.Size() + data := make([]byte, size) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(data) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NestedScope{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkNestedScopeProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NestedScope, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNestedScope(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNestedScopeProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNestedScope(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &NestedScope{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinOptNativeDefaultProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptNativeDefault(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinOptNativeDefault{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestNinOptNativeDefaultMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptNativeDefault(popr, false) + size := p.Size() + data := make([]byte, size) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(data) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinOptNativeDefault{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkNinOptNativeDefaultProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinOptNativeDefault, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNinOptNativeDefault(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNinOptNativeDefaultProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinOptNativeDefault(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &NinOptNativeDefault{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestCustomContainerProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomContainer(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &CustomContainer{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestCustomContainerMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomContainer(popr, false) + size := p.Size() + data := make([]byte, size) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(data) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &CustomContainer{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkCustomContainerProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*CustomContainer, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedCustomContainer(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkCustomContainerProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedCustomContainer(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &CustomContainer{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestCustomNameNidOptNativeProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameNidOptNative(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &CustomNameNidOptNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestCustomNameNidOptNativeMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameNidOptNative(popr, false) + size := p.Size() + data := make([]byte, size) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(data) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &CustomNameNidOptNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkCustomNameNidOptNativeProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*CustomNameNidOptNative, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedCustomNameNidOptNative(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkCustomNameNidOptNativeProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedCustomNameNidOptNative(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &CustomNameNidOptNative{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestCustomNameNinOptNativeProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameNinOptNative(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &CustomNameNinOptNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestCustomNameNinOptNativeMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameNinOptNative(popr, false) + size := p.Size() + data := make([]byte, size) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(data) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &CustomNameNinOptNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkCustomNameNinOptNativeProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*CustomNameNinOptNative, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedCustomNameNinOptNative(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkCustomNameNinOptNativeProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedCustomNameNinOptNative(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &CustomNameNinOptNative{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestCustomNameNinRepNativeProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameNinRepNative(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &CustomNameNinRepNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestCustomNameNinRepNativeMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameNinRepNative(popr, false) + size := p.Size() + data := make([]byte, size) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(data) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &CustomNameNinRepNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkCustomNameNinRepNativeProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*CustomNameNinRepNative, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedCustomNameNinRepNative(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkCustomNameNinRepNativeProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedCustomNameNinRepNative(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &CustomNameNinRepNative{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestCustomNameNinStructProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameNinStruct(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &CustomNameNinStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestCustomNameNinStructMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameNinStruct(popr, false) + size := p.Size() + data := make([]byte, size) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(data) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &CustomNameNinStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkCustomNameNinStructProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*CustomNameNinStruct, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedCustomNameNinStruct(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkCustomNameNinStructProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedCustomNameNinStruct(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &CustomNameNinStruct{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestCustomNameCustomTypeProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameCustomType(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &CustomNameCustomType{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestCustomNameCustomTypeMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameCustomType(popr, false) + size := p.Size() + data := make([]byte, size) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(data) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &CustomNameCustomType{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkCustomNameCustomTypeProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*CustomNameCustomType, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedCustomNameCustomType(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkCustomNameCustomTypeProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedCustomNameCustomType(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &CustomNameCustomType{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestCustomNameNinEmbeddedStructUnionProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameNinEmbeddedStructUnion(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &CustomNameNinEmbeddedStructUnion{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestCustomNameNinEmbeddedStructUnionMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameNinEmbeddedStructUnion(popr, false) + size := p.Size() + data := make([]byte, size) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(data) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &CustomNameNinEmbeddedStructUnion{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkCustomNameNinEmbeddedStructUnionProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*CustomNameNinEmbeddedStructUnion, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedCustomNameNinEmbeddedStructUnion(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkCustomNameNinEmbeddedStructUnionProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedCustomNameNinEmbeddedStructUnion(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &CustomNameNinEmbeddedStructUnion{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestCustomNameEnumProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameEnum(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &CustomNameEnum{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestCustomNameEnumMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameEnum(popr, false) + size := p.Size() + data := make([]byte, size) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(data) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &CustomNameEnum{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkCustomNameEnumProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*CustomNameEnum, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedCustomNameEnum(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkCustomNameEnumProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedCustomNameEnum(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &CustomNameEnum{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNoExtensionsMapProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNoExtensionsMap(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NoExtensionsMap{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestNoExtensionsMapMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNoExtensionsMap(popr, false) + size := p.Size() + data := make([]byte, size) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(data) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NoExtensionsMap{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkNoExtensionsMapProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NoExtensionsMap, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNoExtensionsMap(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNoExtensionsMapProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNoExtensionsMap(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &NoExtensionsMap{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestUnrecognizedProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUnrecognized(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Unrecognized{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestUnrecognizedMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUnrecognized(popr, false) + size := p.Size() + data := make([]byte, size) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(data) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Unrecognized{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkUnrecognizedProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Unrecognized, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedUnrecognized(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkUnrecognizedProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedUnrecognized(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &Unrecognized{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestUnrecognizedWithInnerProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUnrecognizedWithInner(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &UnrecognizedWithInner{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestUnrecognizedWithInnerMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUnrecognizedWithInner(popr, false) + size := p.Size() + data := make([]byte, size) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(data) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &UnrecognizedWithInner{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkUnrecognizedWithInnerProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*UnrecognizedWithInner, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedUnrecognizedWithInner(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkUnrecognizedWithInnerProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedUnrecognizedWithInner(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &UnrecognizedWithInner{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestUnrecognizedWithInner_InnerProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUnrecognizedWithInner_Inner(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &UnrecognizedWithInner_Inner{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestUnrecognizedWithInner_InnerMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUnrecognizedWithInner_Inner(popr, false) + size := p.Size() + data := make([]byte, size) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(data) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &UnrecognizedWithInner_Inner{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkUnrecognizedWithInner_InnerProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*UnrecognizedWithInner_Inner, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedUnrecognizedWithInner_Inner(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkUnrecognizedWithInner_InnerProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedUnrecognizedWithInner_Inner(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &UnrecognizedWithInner_Inner{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestUnrecognizedWithEmbedProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUnrecognizedWithEmbed(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &UnrecognizedWithEmbed{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestUnrecognizedWithEmbedMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUnrecognizedWithEmbed(popr, false) + size := p.Size() + data := make([]byte, size) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(data) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &UnrecognizedWithEmbed{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkUnrecognizedWithEmbedProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*UnrecognizedWithEmbed, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedUnrecognizedWithEmbed(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkUnrecognizedWithEmbedProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedUnrecognizedWithEmbed(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &UnrecognizedWithEmbed{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestUnrecognizedWithEmbed_EmbeddedProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUnrecognizedWithEmbed_Embedded(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &UnrecognizedWithEmbed_Embedded{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestUnrecognizedWithEmbed_EmbeddedMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUnrecognizedWithEmbed_Embedded(popr, false) + size := p.Size() + data := make([]byte, size) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(data) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &UnrecognizedWithEmbed_Embedded{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkUnrecognizedWithEmbed_EmbeddedProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*UnrecognizedWithEmbed_Embedded, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedUnrecognizedWithEmbed_Embedded(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkUnrecognizedWithEmbed_EmbeddedProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedUnrecognizedWithEmbed_Embedded(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &UnrecognizedWithEmbed_Embedded{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNodeProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNode(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Node{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestNodeMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNode(popr, false) + size := p.Size() + data := make([]byte, size) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(data) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Node{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkNodeProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Node, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNode(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNodeProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNode(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &Node{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNidOptNativeJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidOptNative(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidOptNative{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNinOptNativeJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptNative(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinOptNative{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNidRepNativeJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepNative(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidRepNative{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNinRepNativeJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepNative(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinRepNative{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNidRepPackedNativeJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepPackedNative(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidRepPackedNative{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNinRepPackedNativeJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepPackedNative(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinRepPackedNative{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNidOptStructJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidOptStruct(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidOptStruct{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNinOptStructJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptStruct(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinOptStruct{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNidRepStructJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepStruct(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidRepStruct{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNinRepStructJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepStruct(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinRepStruct{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNidEmbeddedStructJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidEmbeddedStruct(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidEmbeddedStruct{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNinEmbeddedStructJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinEmbeddedStruct(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinEmbeddedStruct{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNidNestedStructJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidNestedStruct(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidNestedStruct{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNinNestedStructJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinNestedStruct(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinNestedStruct{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNidOptCustomJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidOptCustom(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidOptCustom{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestCustomDashJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomDash(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &CustomDash{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNinOptCustomJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptCustom(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinOptCustom{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNidRepCustomJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepCustom(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidRepCustom{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNinRepCustomJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepCustom(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinRepCustom{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNinOptNativeUnionJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptNativeUnion(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinOptNativeUnion{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNinOptStructUnionJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptStructUnion(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinOptStructUnion{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNinEmbeddedStructUnionJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinEmbeddedStructUnion(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinEmbeddedStructUnion{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNinNestedStructUnionJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinNestedStructUnion(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinNestedStructUnion{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestTreeJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedTree(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Tree{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestOrBranchJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedOrBranch(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &OrBranch{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestAndBranchJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAndBranch(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &AndBranch{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestLeafJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedLeaf(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Leaf{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestDeepTreeJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedDeepTree(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &DeepTree{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestADeepBranchJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedADeepBranch(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &ADeepBranch{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestAndDeepBranchJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAndDeepBranch(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &AndDeepBranch{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestDeepLeafJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedDeepLeaf(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &DeepLeaf{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNilJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNil(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Nil{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNidOptEnumJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidOptEnum(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidOptEnum{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNinOptEnumJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptEnum(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinOptEnum{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNidRepEnumJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepEnum(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidRepEnum{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNinRepEnumJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepEnum(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinRepEnum{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNinOptEnumDefaultJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptEnumDefault(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinOptEnumDefault{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestAnotherNinOptEnumJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAnotherNinOptEnum(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &AnotherNinOptEnum{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestAnotherNinOptEnumDefaultJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAnotherNinOptEnumDefault(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &AnotherNinOptEnumDefault{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestTimerJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedTimer(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Timer{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestMyExtendableJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMyExtendable(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &MyExtendable{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestOtherExtenableJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedOtherExtenable(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &OtherExtenable{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNestedDefinitionJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNestedDefinition(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NestedDefinition{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNestedDefinition_NestedMessageJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNestedDefinition_NestedMessage(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NestedDefinition_NestedMessage{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNestedDefinition_NestedMessage_NestedNestedMsgJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NestedDefinition_NestedMessage_NestedNestedMsg{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNestedScopeJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNestedScope(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NestedScope{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNinOptNativeDefaultJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptNativeDefault(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinOptNativeDefault{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestCustomContainerJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomContainer(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &CustomContainer{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestCustomNameNidOptNativeJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameNidOptNative(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &CustomNameNidOptNative{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestCustomNameNinOptNativeJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameNinOptNative(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &CustomNameNinOptNative{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestCustomNameNinRepNativeJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameNinRepNative(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &CustomNameNinRepNative{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestCustomNameNinStructJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameNinStruct(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &CustomNameNinStruct{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestCustomNameCustomTypeJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameCustomType(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &CustomNameCustomType{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestCustomNameNinEmbeddedStructUnionJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameNinEmbeddedStructUnion(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &CustomNameNinEmbeddedStructUnion{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestCustomNameEnumJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameEnum(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &CustomNameEnum{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNoExtensionsMapJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNoExtensionsMap(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NoExtensionsMap{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestUnrecognizedJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUnrecognized(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Unrecognized{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestUnrecognizedWithInnerJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUnrecognizedWithInner(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &UnrecognizedWithInner{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestUnrecognizedWithInner_InnerJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUnrecognizedWithInner_Inner(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &UnrecognizedWithInner_Inner{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestUnrecognizedWithEmbedJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUnrecognizedWithEmbed(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &UnrecognizedWithEmbed{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestUnrecognizedWithEmbed_EmbeddedJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUnrecognizedWithEmbed_Embedded(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &UnrecognizedWithEmbed_Embedded{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNodeJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNode(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Node{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNidOptNativeProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidOptNative(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NidOptNative{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNidOptNativeProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidOptNative(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NidOptNative{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinOptNativeProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptNative(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NinOptNative{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinOptNativeProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptNative(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NinOptNative{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNidRepNativeProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepNative(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NidRepNative{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNidRepNativeProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepNative(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NidRepNative{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinRepNativeProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepNative(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NinRepNative{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinRepNativeProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepNative(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NinRepNative{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNidRepPackedNativeProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepPackedNative(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NidRepPackedNative{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNidRepPackedNativeProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepPackedNative(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NidRepPackedNative{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinRepPackedNativeProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepPackedNative(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NinRepPackedNative{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinRepPackedNativeProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepPackedNative(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NinRepPackedNative{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNidOptStructProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidOptStruct(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NidOptStruct{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNidOptStructProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidOptStruct(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NidOptStruct{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinOptStructProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptStruct(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NinOptStruct{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinOptStructProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptStruct(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NinOptStruct{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNidRepStructProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepStruct(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NidRepStruct{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNidRepStructProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepStruct(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NidRepStruct{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinRepStructProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepStruct(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NinRepStruct{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinRepStructProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepStruct(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NinRepStruct{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNidEmbeddedStructProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidEmbeddedStruct(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NidEmbeddedStruct{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNidEmbeddedStructProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidEmbeddedStruct(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NidEmbeddedStruct{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinEmbeddedStructProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinEmbeddedStruct(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NinEmbeddedStruct{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinEmbeddedStructProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinEmbeddedStruct(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NinEmbeddedStruct{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNidNestedStructProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidNestedStruct(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NidNestedStruct{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNidNestedStructProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidNestedStruct(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NidNestedStruct{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinNestedStructProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinNestedStruct(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NinNestedStruct{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinNestedStructProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinNestedStruct(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NinNestedStruct{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNidOptCustomProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidOptCustom(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NidOptCustom{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNidOptCustomProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidOptCustom(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NidOptCustom{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestCustomDashProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomDash(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &CustomDash{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestCustomDashProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomDash(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &CustomDash{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinOptCustomProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptCustom(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NinOptCustom{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinOptCustomProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptCustom(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NinOptCustom{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNidRepCustomProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepCustom(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NidRepCustom{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNidRepCustomProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepCustom(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NidRepCustom{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinRepCustomProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepCustom(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NinRepCustom{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinRepCustomProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepCustom(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NinRepCustom{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinOptNativeUnionProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptNativeUnion(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NinOptNativeUnion{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinOptNativeUnionProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptNativeUnion(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NinOptNativeUnion{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinOptStructUnionProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptStructUnion(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NinOptStructUnion{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinOptStructUnionProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptStructUnion(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NinOptStructUnion{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinEmbeddedStructUnionProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinEmbeddedStructUnion(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NinEmbeddedStructUnion{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinEmbeddedStructUnionProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinEmbeddedStructUnion(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NinEmbeddedStructUnion{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinNestedStructUnionProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinNestedStructUnion(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NinNestedStructUnion{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinNestedStructUnionProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinNestedStructUnion(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NinNestedStructUnion{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestTreeProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedTree(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &Tree{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestTreeProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedTree(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &Tree{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestOrBranchProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedOrBranch(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &OrBranch{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestOrBranchProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedOrBranch(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &OrBranch{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestAndBranchProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAndBranch(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &AndBranch{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestAndBranchProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAndBranch(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &AndBranch{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestLeafProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedLeaf(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &Leaf{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestLeafProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedLeaf(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &Leaf{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestDeepTreeProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedDeepTree(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &DeepTree{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestDeepTreeProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedDeepTree(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &DeepTree{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestADeepBranchProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedADeepBranch(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &ADeepBranch{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestADeepBranchProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedADeepBranch(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &ADeepBranch{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestAndDeepBranchProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAndDeepBranch(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &AndDeepBranch{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestAndDeepBranchProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAndDeepBranch(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &AndDeepBranch{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestDeepLeafProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedDeepLeaf(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &DeepLeaf{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestDeepLeafProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedDeepLeaf(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &DeepLeaf{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNilProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNil(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &Nil{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNilProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNil(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &Nil{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNidOptEnumProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidOptEnum(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NidOptEnum{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNidOptEnumProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidOptEnum(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NidOptEnum{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinOptEnumProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptEnum(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NinOptEnum{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinOptEnumProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptEnum(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NinOptEnum{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNidRepEnumProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepEnum(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NidRepEnum{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNidRepEnumProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepEnum(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NidRepEnum{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinRepEnumProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepEnum(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NinRepEnum{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinRepEnumProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepEnum(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NinRepEnum{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinOptEnumDefaultProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptEnumDefault(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NinOptEnumDefault{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinOptEnumDefaultProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptEnumDefault(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NinOptEnumDefault{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestAnotherNinOptEnumProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAnotherNinOptEnum(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &AnotherNinOptEnum{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestAnotherNinOptEnumProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAnotherNinOptEnum(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &AnotherNinOptEnum{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestAnotherNinOptEnumDefaultProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAnotherNinOptEnumDefault(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &AnotherNinOptEnumDefault{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestAnotherNinOptEnumDefaultProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAnotherNinOptEnumDefault(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &AnotherNinOptEnumDefault{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestTimerProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedTimer(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &Timer{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestTimerProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedTimer(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &Timer{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestMyExtendableProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMyExtendable(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &MyExtendable{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestMyExtendableProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMyExtendable(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &MyExtendable{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestOtherExtenableProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedOtherExtenable(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &OtherExtenable{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestOtherExtenableProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedOtherExtenable(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &OtherExtenable{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNestedDefinitionProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNestedDefinition(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NestedDefinition{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNestedDefinitionProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNestedDefinition(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NestedDefinition{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNestedDefinition_NestedMessageProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNestedDefinition_NestedMessage(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NestedDefinition_NestedMessage{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNestedDefinition_NestedMessageProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNestedDefinition_NestedMessage(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NestedDefinition_NestedMessage{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNestedDefinition_NestedMessage_NestedNestedMsgProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NestedDefinition_NestedMessage_NestedNestedMsg{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNestedDefinition_NestedMessage_NestedNestedMsgProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NestedDefinition_NestedMessage_NestedNestedMsg{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNestedScopeProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNestedScope(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NestedScope{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNestedScopeProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNestedScope(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NestedScope{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinOptNativeDefaultProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptNativeDefault(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NinOptNativeDefault{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinOptNativeDefaultProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptNativeDefault(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NinOptNativeDefault{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestCustomContainerProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomContainer(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &CustomContainer{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestCustomContainerProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomContainer(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &CustomContainer{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestCustomNameNidOptNativeProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameNidOptNative(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &CustomNameNidOptNative{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestCustomNameNidOptNativeProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameNidOptNative(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &CustomNameNidOptNative{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestCustomNameNinOptNativeProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameNinOptNative(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &CustomNameNinOptNative{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestCustomNameNinOptNativeProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameNinOptNative(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &CustomNameNinOptNative{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestCustomNameNinRepNativeProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameNinRepNative(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &CustomNameNinRepNative{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestCustomNameNinRepNativeProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameNinRepNative(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &CustomNameNinRepNative{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestCustomNameNinStructProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameNinStruct(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &CustomNameNinStruct{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestCustomNameNinStructProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameNinStruct(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &CustomNameNinStruct{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestCustomNameCustomTypeProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameCustomType(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &CustomNameCustomType{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestCustomNameCustomTypeProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameCustomType(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &CustomNameCustomType{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestCustomNameNinEmbeddedStructUnionProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameNinEmbeddedStructUnion(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &CustomNameNinEmbeddedStructUnion{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestCustomNameNinEmbeddedStructUnionProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameNinEmbeddedStructUnion(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &CustomNameNinEmbeddedStructUnion{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestCustomNameEnumProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameEnum(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &CustomNameEnum{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestCustomNameEnumProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameEnum(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &CustomNameEnum{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNoExtensionsMapProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNoExtensionsMap(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NoExtensionsMap{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNoExtensionsMapProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNoExtensionsMap(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NoExtensionsMap{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestUnrecognizedProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUnrecognized(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &Unrecognized{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestUnrecognizedProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUnrecognized(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &Unrecognized{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestUnrecognizedWithInnerProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUnrecognizedWithInner(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &UnrecognizedWithInner{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestUnrecognizedWithInnerProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUnrecognizedWithInner(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &UnrecognizedWithInner{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestUnrecognizedWithInner_InnerProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUnrecognizedWithInner_Inner(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &UnrecognizedWithInner_Inner{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestUnrecognizedWithInner_InnerProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUnrecognizedWithInner_Inner(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &UnrecognizedWithInner_Inner{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestUnrecognizedWithEmbedProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUnrecognizedWithEmbed(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &UnrecognizedWithEmbed{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestUnrecognizedWithEmbedProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUnrecognizedWithEmbed(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &UnrecognizedWithEmbed{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestUnrecognizedWithEmbed_EmbeddedProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUnrecognizedWithEmbed_Embedded(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &UnrecognizedWithEmbed_Embedded{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestUnrecognizedWithEmbed_EmbeddedProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUnrecognizedWithEmbed_Embedded(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &UnrecognizedWithEmbed_Embedded{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNodeProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNode(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &Node{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNodeProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNode(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &Node{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNidOptNativeCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidOptNative(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NidOptNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNidOptNative(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNinOptNativeCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptNative(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinOptNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNinOptNative(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNidRepNativeCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidRepNative(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NidRepNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNidRepNative(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNinRepNativeCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinRepNative(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinRepNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNinRepNative(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNidRepPackedNativeCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidRepPackedNative(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NidRepPackedNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNidRepPackedNative(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNinRepPackedNativeCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinRepPackedNative(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinRepPackedNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNinRepPackedNative(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNidOptStructCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidOptStruct(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NidOptStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNidOptStruct(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNinOptStructCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptStruct(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinOptStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNinOptStruct(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNidRepStructCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidRepStruct(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NidRepStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNidRepStruct(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNinRepStructCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinRepStruct(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinRepStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNinRepStruct(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNidEmbeddedStructCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidEmbeddedStruct(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NidEmbeddedStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNidEmbeddedStruct(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNinEmbeddedStructCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinEmbeddedStruct(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinEmbeddedStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNinEmbeddedStruct(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNidNestedStructCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidNestedStruct(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NidNestedStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNidNestedStruct(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNinNestedStructCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinNestedStruct(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinNestedStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNinNestedStruct(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNidOptCustomCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidOptCustom(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NidOptCustom{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNidOptCustom(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestCustomDashCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomDash(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &CustomDash{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedCustomDash(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNinOptCustomCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptCustom(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinOptCustom{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNinOptCustom(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNidRepCustomCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidRepCustom(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NidRepCustom{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNidRepCustom(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNinRepCustomCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinRepCustom(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinRepCustom{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNinRepCustom(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNinOptNativeUnionCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptNativeUnion(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinOptNativeUnion{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNinOptNativeUnion(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNinOptStructUnionCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptStructUnion(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinOptStructUnion{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNinOptStructUnion(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNinEmbeddedStructUnionCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinEmbeddedStructUnion(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinEmbeddedStructUnion{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNinEmbeddedStructUnion(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNinNestedStructUnionCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinNestedStructUnion(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinNestedStructUnion{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNinNestedStructUnion(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestTreeCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedTree(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &Tree{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedTree(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestOrBranchCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedOrBranch(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &OrBranch{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedOrBranch(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestAndBranchCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAndBranch(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &AndBranch{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedAndBranch(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestLeafCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedLeaf(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &Leaf{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedLeaf(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestDeepTreeCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedDeepTree(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &DeepTree{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedDeepTree(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestADeepBranchCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedADeepBranch(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &ADeepBranch{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedADeepBranch(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestAndDeepBranchCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAndDeepBranch(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &AndDeepBranch{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedAndDeepBranch(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestDeepLeafCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedDeepLeaf(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &DeepLeaf{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedDeepLeaf(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNilCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNil(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &Nil{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNil(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNidOptEnumCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidOptEnum(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NidOptEnum{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNidOptEnum(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNinOptEnumCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptEnum(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinOptEnum{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNinOptEnum(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNidRepEnumCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidRepEnum(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NidRepEnum{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNidRepEnum(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNinRepEnumCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinRepEnum(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinRepEnum{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNinRepEnum(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNinOptEnumDefaultCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptEnumDefault(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinOptEnumDefault{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNinOptEnumDefault(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestAnotherNinOptEnumCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAnotherNinOptEnum(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &AnotherNinOptEnum{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedAnotherNinOptEnum(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestAnotherNinOptEnumDefaultCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAnotherNinOptEnumDefault(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &AnotherNinOptEnumDefault{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedAnotherNinOptEnumDefault(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestTimerCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedTimer(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &Timer{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedTimer(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestMyExtendableCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedMyExtendable(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &MyExtendable{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedMyExtendable(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestOtherExtenableCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedOtherExtenable(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &OtherExtenable{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedOtherExtenable(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNestedDefinitionCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNestedDefinition(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NestedDefinition{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNestedDefinition(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNestedDefinition_NestedMessageCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNestedDefinition_NestedMessage(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NestedDefinition_NestedMessage{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNestedDefinition_NestedMessage(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNestedDefinition_NestedMessage_NestedNestedMsgCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NestedDefinition_NestedMessage_NestedNestedMsg{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNestedScopeCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNestedScope(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NestedScope{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNestedScope(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNinOptNativeDefaultCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptNativeDefault(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinOptNativeDefault{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNinOptNativeDefault(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestCustomContainerCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomContainer(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &CustomContainer{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedCustomContainer(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestCustomNameNidOptNativeCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameNidOptNative(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &CustomNameNidOptNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedCustomNameNidOptNative(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestCustomNameNinOptNativeCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameNinOptNative(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &CustomNameNinOptNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedCustomNameNinOptNative(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestCustomNameNinRepNativeCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameNinRepNative(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &CustomNameNinRepNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedCustomNameNinRepNative(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestCustomNameNinStructCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameNinStruct(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &CustomNameNinStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedCustomNameNinStruct(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestCustomNameCustomTypeCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameCustomType(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &CustomNameCustomType{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedCustomNameCustomType(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestCustomNameNinEmbeddedStructUnionCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameNinEmbeddedStructUnion(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &CustomNameNinEmbeddedStructUnion{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedCustomNameNinEmbeddedStructUnion(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestCustomNameEnumCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameEnum(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &CustomNameEnum{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedCustomNameEnum(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNoExtensionsMapCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNoExtensionsMap(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NoExtensionsMap{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNoExtensionsMap(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestUnrecognizedCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedUnrecognized(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &Unrecognized{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedUnrecognized(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestUnrecognizedWithInnerCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedUnrecognizedWithInner(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &UnrecognizedWithInner{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedUnrecognizedWithInner(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestUnrecognizedWithInner_InnerCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedUnrecognizedWithInner_Inner(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &UnrecognizedWithInner_Inner{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedUnrecognizedWithInner_Inner(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestUnrecognizedWithEmbedCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedUnrecognizedWithEmbed(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &UnrecognizedWithEmbed{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedUnrecognizedWithEmbed(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestUnrecognizedWithEmbed_EmbeddedCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedUnrecognizedWithEmbed_Embedded(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &UnrecognizedWithEmbed_Embedded{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedUnrecognizedWithEmbed_Embedded(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNodeCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNode(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &Node{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNode(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestThetestDescription(t *testing.T) { + ThetestDescription() +} +func TestNidOptNativeVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidOptNative(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NidOptNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNinOptNativeVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptNative(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinOptNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNidRepNativeVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidRepNative(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NidRepNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNinRepNativeVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinRepNative(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinRepNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNidRepPackedNativeVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidRepPackedNative(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NidRepPackedNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNinRepPackedNativeVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinRepPackedNative(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinRepPackedNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNidOptStructVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidOptStruct(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NidOptStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNinOptStructVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptStruct(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinOptStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNidRepStructVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidRepStruct(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NidRepStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNinRepStructVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinRepStruct(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinRepStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNidEmbeddedStructVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidEmbeddedStruct(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NidEmbeddedStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNinEmbeddedStructVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinEmbeddedStruct(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinEmbeddedStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNidNestedStructVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidNestedStruct(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NidNestedStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNinNestedStructVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinNestedStruct(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinNestedStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNidOptCustomVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidOptCustom(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NidOptCustom{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestCustomDashVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomDash(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &CustomDash{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNinOptCustomVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptCustom(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinOptCustom{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNidRepCustomVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidRepCustom(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NidRepCustom{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNinRepCustomVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinRepCustom(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinRepCustom{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNinOptNativeUnionVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptNativeUnion(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinOptNativeUnion{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNinOptStructUnionVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptStructUnion(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinOptStructUnion{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNinEmbeddedStructUnionVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinEmbeddedStructUnion(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinEmbeddedStructUnion{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNinNestedStructUnionVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinNestedStructUnion(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinNestedStructUnion{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestTreeVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedTree(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &Tree{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestOrBranchVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedOrBranch(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &OrBranch{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestAndBranchVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAndBranch(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &AndBranch{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestLeafVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedLeaf(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &Leaf{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestDeepTreeVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedDeepTree(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &DeepTree{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestADeepBranchVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedADeepBranch(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &ADeepBranch{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestAndDeepBranchVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAndDeepBranch(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &AndDeepBranch{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestDeepLeafVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedDeepLeaf(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &DeepLeaf{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNilVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNil(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &Nil{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNidOptEnumVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidOptEnum(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NidOptEnum{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNinOptEnumVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptEnum(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinOptEnum{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNidRepEnumVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidRepEnum(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NidRepEnum{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNinRepEnumVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinRepEnum(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinRepEnum{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNinOptEnumDefaultVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptEnumDefault(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinOptEnumDefault{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestAnotherNinOptEnumVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAnotherNinOptEnum(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &AnotherNinOptEnum{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestAnotherNinOptEnumDefaultVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAnotherNinOptEnumDefault(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &AnotherNinOptEnumDefault{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestTimerVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedTimer(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &Timer{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestMyExtendableVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedMyExtendable(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &MyExtendable{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestOtherExtenableVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedOtherExtenable(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &OtherExtenable{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNestedDefinitionVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNestedDefinition(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NestedDefinition{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNestedDefinition_NestedMessageVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNestedDefinition_NestedMessage(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NestedDefinition_NestedMessage{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNestedDefinition_NestedMessage_NestedNestedMsgVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NestedDefinition_NestedMessage_NestedNestedMsg{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNestedScopeVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNestedScope(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NestedScope{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNinOptNativeDefaultVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptNativeDefault(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinOptNativeDefault{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestCustomContainerVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomContainer(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &CustomContainer{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestCustomNameNidOptNativeVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameNidOptNative(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &CustomNameNidOptNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestCustomNameNinOptNativeVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameNinOptNative(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &CustomNameNinOptNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestCustomNameNinRepNativeVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameNinRepNative(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &CustomNameNinRepNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestCustomNameNinStructVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameNinStruct(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &CustomNameNinStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestCustomNameCustomTypeVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameCustomType(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &CustomNameCustomType{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestCustomNameNinEmbeddedStructUnionVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameNinEmbeddedStructUnion(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &CustomNameNinEmbeddedStructUnion{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestCustomNameEnumVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameEnum(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &CustomNameEnum{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNoExtensionsMapVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNoExtensionsMap(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NoExtensionsMap{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestUnrecognizedVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedUnrecognized(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &Unrecognized{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestUnrecognizedWithInnerVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedUnrecognizedWithInner(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &UnrecognizedWithInner{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestUnrecognizedWithInner_InnerVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedUnrecognizedWithInner_Inner(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &UnrecognizedWithInner_Inner{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestUnrecognizedWithEmbedVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedUnrecognizedWithEmbed(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &UnrecognizedWithEmbed{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestUnrecognizedWithEmbed_EmbeddedVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedUnrecognizedWithEmbed_Embedded(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &UnrecognizedWithEmbed_Embedded{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNodeVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNode(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &Node{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNidOptNativeFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidOptNative(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNinOptNativeFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptNative(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNidRepNativeFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidRepNative(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNinRepNativeFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinRepNative(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNidRepPackedNativeFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidRepPackedNative(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNinRepPackedNativeFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinRepPackedNative(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNidOptStructFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidOptStruct(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNinOptStructFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptStruct(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNidRepStructFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidRepStruct(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNinRepStructFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinRepStruct(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNidEmbeddedStructFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidEmbeddedStruct(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNinEmbeddedStructFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinEmbeddedStruct(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNidNestedStructFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidNestedStruct(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNinNestedStructFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinNestedStruct(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNidOptCustomFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidOptCustom(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestCustomDashFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomDash(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNinOptCustomFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptCustom(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNidRepCustomFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidRepCustom(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNinRepCustomFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinRepCustom(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNinOptNativeUnionFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptNativeUnion(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNinOptStructUnionFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptStructUnion(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNinEmbeddedStructUnionFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinEmbeddedStructUnion(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNinNestedStructUnionFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinNestedStructUnion(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestTreeFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedTree(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestOrBranchFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedOrBranch(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestAndBranchFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAndBranch(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestLeafFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedLeaf(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestDeepTreeFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedDeepTree(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestADeepBranchFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedADeepBranch(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestAndDeepBranchFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAndDeepBranch(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestDeepLeafFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedDeepLeaf(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNilFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNil(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNidOptEnumFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidOptEnum(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNinOptEnumFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptEnum(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNidRepEnumFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidRepEnum(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNinRepEnumFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinRepEnum(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestAnotherNinOptEnumFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAnotherNinOptEnum(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestTimerFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedTimer(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNestedDefinitionFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNestedDefinition(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNestedDefinition_NestedMessageFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNestedDefinition_NestedMessage(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNestedDefinition_NestedMessage_NestedNestedMsgFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNestedScopeFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNestedScope(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestCustomContainerFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomContainer(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestCustomNameNidOptNativeFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameNidOptNative(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestCustomNameNinOptNativeFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameNinOptNative(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestCustomNameNinRepNativeFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameNinRepNative(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestCustomNameNinStructFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameNinStruct(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestCustomNameCustomTypeFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameCustomType(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestCustomNameNinEmbeddedStructUnionFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameNinEmbeddedStructUnion(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestCustomNameEnumFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameEnum(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestUnrecognizedFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedUnrecognized(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestUnrecognizedWithInnerFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedUnrecognizedWithInner(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestUnrecognizedWithInner_InnerFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedUnrecognizedWithInner_Inner(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestUnrecognizedWithEmbedFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedUnrecognizedWithEmbed(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestUnrecognizedWithEmbed_EmbeddedFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedUnrecognizedWithEmbed_Embedded(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNodeFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNode(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNidOptNativeGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidOptNative(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestNinOptNativeGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptNative(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestNidRepNativeGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidRepNative(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestNinRepNativeGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinRepNative(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestNidRepPackedNativeGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidRepPackedNative(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestNinRepPackedNativeGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinRepPackedNative(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestNidOptStructGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidOptStruct(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestNinOptStructGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptStruct(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestNidRepStructGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidRepStruct(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestNinRepStructGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinRepStruct(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestNidEmbeddedStructGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidEmbeddedStruct(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestNinEmbeddedStructGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinEmbeddedStruct(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestNidNestedStructGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidNestedStruct(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestNinNestedStructGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinNestedStruct(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestNidOptCustomGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidOptCustom(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestCustomDashGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomDash(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestNinOptCustomGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptCustom(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestNidRepCustomGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidRepCustom(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestNinRepCustomGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinRepCustom(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestNinOptNativeUnionGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptNativeUnion(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestNinOptStructUnionGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptStructUnion(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestNinEmbeddedStructUnionGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinEmbeddedStructUnion(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestNinNestedStructUnionGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinNestedStructUnion(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestTreeGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedTree(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestOrBranchGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedOrBranch(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestAndBranchGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAndBranch(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestLeafGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedLeaf(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestDeepTreeGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedDeepTree(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestADeepBranchGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedADeepBranch(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestAndDeepBranchGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAndDeepBranch(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestDeepLeafGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedDeepLeaf(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestNilGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNil(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestNidOptEnumGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidOptEnum(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestNinOptEnumGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptEnum(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestNidRepEnumGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidRepEnum(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestNinRepEnumGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinRepEnum(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestNinOptEnumDefaultGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptEnumDefault(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestAnotherNinOptEnumGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAnotherNinOptEnum(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestAnotherNinOptEnumDefaultGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAnotherNinOptEnumDefault(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestTimerGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedTimer(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestMyExtendableGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedMyExtendable(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestOtherExtenableGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedOtherExtenable(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestNestedDefinitionGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNestedDefinition(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestNestedDefinition_NestedMessageGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNestedDefinition_NestedMessage(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestNestedDefinition_NestedMessage_NestedNestedMsgGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestNestedScopeGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNestedScope(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestNinOptNativeDefaultGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptNativeDefault(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestCustomContainerGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomContainer(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestCustomNameNidOptNativeGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameNidOptNative(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestCustomNameNinOptNativeGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameNinOptNative(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestCustomNameNinRepNativeGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameNinRepNative(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestCustomNameNinStructGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameNinStruct(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestCustomNameCustomTypeGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameCustomType(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestCustomNameNinEmbeddedStructUnionGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameNinEmbeddedStructUnion(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestCustomNameEnumGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameEnum(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestNoExtensionsMapGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNoExtensionsMap(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestUnrecognizedGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedUnrecognized(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestUnrecognizedWithInnerGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedUnrecognizedWithInner(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestUnrecognizedWithInner_InnerGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedUnrecognizedWithInner_Inner(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestUnrecognizedWithEmbedGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedUnrecognizedWithEmbed(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestUnrecognizedWithEmbed_EmbeddedGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedUnrecognizedWithEmbed_Embedded(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestNodeGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNode(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestNidOptNativeSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidOptNative(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNidOptNativeSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NidOptNative, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNidOptNative(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinOptNativeSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptNative(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNinOptNativeSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinOptNative, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNinOptNative(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNidRepNativeSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepNative(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNidRepNativeSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NidRepNative, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNidRepNative(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinRepNativeSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepNative(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNinRepNativeSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinRepNative, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNinRepNative(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNidRepPackedNativeSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepPackedNative(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNidRepPackedNativeSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NidRepPackedNative, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNidRepPackedNative(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinRepPackedNativeSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepPackedNative(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNinRepPackedNativeSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinRepPackedNative, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNinRepPackedNative(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNidOptStructSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidOptStruct(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNidOptStructSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NidOptStruct, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNidOptStruct(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinOptStructSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptStruct(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNinOptStructSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinOptStruct, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNinOptStruct(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNidRepStructSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepStruct(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNidRepStructSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NidRepStruct, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNidRepStruct(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinRepStructSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepStruct(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNinRepStructSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinRepStruct, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNinRepStruct(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNidEmbeddedStructSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidEmbeddedStruct(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNidEmbeddedStructSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NidEmbeddedStruct, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNidEmbeddedStruct(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinEmbeddedStructSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinEmbeddedStruct(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNinEmbeddedStructSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinEmbeddedStruct, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNinEmbeddedStruct(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNidNestedStructSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidNestedStruct(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNidNestedStructSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NidNestedStruct, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNidNestedStruct(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinNestedStructSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinNestedStruct(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNinNestedStructSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinNestedStruct, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNinNestedStruct(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNidOptCustomSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidOptCustom(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNidOptCustomSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NidOptCustom, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNidOptCustom(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestCustomDashSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomDash(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkCustomDashSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*CustomDash, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedCustomDash(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinOptCustomSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptCustom(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNinOptCustomSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinOptCustom, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNinOptCustom(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNidRepCustomSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepCustom(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNidRepCustomSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NidRepCustom, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNidRepCustom(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinRepCustomSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepCustom(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNinRepCustomSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinRepCustom, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNinRepCustom(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinOptNativeUnionSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptNativeUnion(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNinOptNativeUnionSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinOptNativeUnion, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNinOptNativeUnion(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinOptStructUnionSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptStructUnion(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNinOptStructUnionSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinOptStructUnion, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNinOptStructUnion(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinEmbeddedStructUnionSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinEmbeddedStructUnion(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNinEmbeddedStructUnionSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinEmbeddedStructUnion, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNinEmbeddedStructUnion(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinNestedStructUnionSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinNestedStructUnion(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNinNestedStructUnionSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinNestedStructUnion, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNinNestedStructUnion(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestTreeSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedTree(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkTreeSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Tree, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedTree(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestOrBranchSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedOrBranch(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkOrBranchSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*OrBranch, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedOrBranch(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestAndBranchSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAndBranch(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkAndBranchSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*AndBranch, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedAndBranch(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestLeafSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedLeaf(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkLeafSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Leaf, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedLeaf(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestDeepTreeSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedDeepTree(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkDeepTreeSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*DeepTree, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedDeepTree(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestADeepBranchSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedADeepBranch(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkADeepBranchSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*ADeepBranch, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedADeepBranch(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestAndDeepBranchSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAndDeepBranch(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkAndDeepBranchSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*AndDeepBranch, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedAndDeepBranch(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestDeepLeafSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedDeepLeaf(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkDeepLeafSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*DeepLeaf, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedDeepLeaf(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNilSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNil(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNilSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Nil, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNil(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNidOptEnumSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidOptEnum(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNidOptEnumSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NidOptEnum, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNidOptEnum(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinOptEnumSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptEnum(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNinOptEnumSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinOptEnum, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNinOptEnum(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNidRepEnumSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepEnum(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNidRepEnumSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NidRepEnum, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNidRepEnum(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinRepEnumSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepEnum(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNinRepEnumSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinRepEnum, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNinRepEnum(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinOptEnumDefaultSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptEnumDefault(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNinOptEnumDefaultSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinOptEnumDefault, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNinOptEnumDefault(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestAnotherNinOptEnumSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAnotherNinOptEnum(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkAnotherNinOptEnumSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*AnotherNinOptEnum, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedAnotherNinOptEnum(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestAnotherNinOptEnumDefaultSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAnotherNinOptEnumDefault(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkAnotherNinOptEnumDefaultSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*AnotherNinOptEnumDefault, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedAnotherNinOptEnumDefault(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestTimerSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedTimer(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkTimerSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Timer, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedTimer(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestMyExtendableSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMyExtendable(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkMyExtendableSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*MyExtendable, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedMyExtendable(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestOtherExtenableSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedOtherExtenable(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkOtherExtenableSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*OtherExtenable, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedOtherExtenable(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNestedDefinitionSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNestedDefinition(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNestedDefinitionSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NestedDefinition, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNestedDefinition(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNestedDefinition_NestedMessageSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNestedDefinition_NestedMessage(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNestedDefinition_NestedMessageSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NestedDefinition_NestedMessage, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNestedDefinition_NestedMessage(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNestedDefinition_NestedMessage_NestedNestedMsgSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNestedDefinition_NestedMessage_NestedNestedMsgSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NestedDefinition_NestedMessage_NestedNestedMsg, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNestedScopeSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNestedScope(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNestedScopeSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NestedScope, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNestedScope(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinOptNativeDefaultSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptNativeDefault(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNinOptNativeDefaultSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinOptNativeDefault, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNinOptNativeDefault(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestCustomContainerSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomContainer(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkCustomContainerSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*CustomContainer, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedCustomContainer(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestCustomNameNidOptNativeSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameNidOptNative(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkCustomNameNidOptNativeSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*CustomNameNidOptNative, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedCustomNameNidOptNative(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestCustomNameNinOptNativeSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameNinOptNative(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkCustomNameNinOptNativeSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*CustomNameNinOptNative, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedCustomNameNinOptNative(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestCustomNameNinRepNativeSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameNinRepNative(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkCustomNameNinRepNativeSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*CustomNameNinRepNative, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedCustomNameNinRepNative(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestCustomNameNinStructSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameNinStruct(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkCustomNameNinStructSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*CustomNameNinStruct, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedCustomNameNinStruct(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestCustomNameCustomTypeSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameCustomType(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkCustomNameCustomTypeSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*CustomNameCustomType, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedCustomNameCustomType(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestCustomNameNinEmbeddedStructUnionSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameNinEmbeddedStructUnion(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkCustomNameNinEmbeddedStructUnionSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*CustomNameNinEmbeddedStructUnion, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedCustomNameNinEmbeddedStructUnion(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestCustomNameEnumSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameEnum(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkCustomNameEnumSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*CustomNameEnum, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedCustomNameEnum(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNoExtensionsMapSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNoExtensionsMap(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNoExtensionsMapSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NoExtensionsMap, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNoExtensionsMap(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestUnrecognizedSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUnrecognized(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkUnrecognizedSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Unrecognized, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedUnrecognized(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestUnrecognizedWithInnerSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUnrecognizedWithInner(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkUnrecognizedWithInnerSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*UnrecognizedWithInner, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedUnrecognizedWithInner(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestUnrecognizedWithInner_InnerSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUnrecognizedWithInner_Inner(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkUnrecognizedWithInner_InnerSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*UnrecognizedWithInner_Inner, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedUnrecognizedWithInner_Inner(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestUnrecognizedWithEmbedSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUnrecognizedWithEmbed(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkUnrecognizedWithEmbedSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*UnrecognizedWithEmbed, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedUnrecognizedWithEmbed(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestUnrecognizedWithEmbed_EmbeddedSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUnrecognizedWithEmbed_Embedded(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkUnrecognizedWithEmbed_EmbeddedSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*UnrecognizedWithEmbed_Embedded, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedUnrecognizedWithEmbed_Embedded(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNodeSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNode(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNodeSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Node, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNode(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNidOptNativeStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidOptNative(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNinOptNativeStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptNative(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNidRepNativeStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidRepNative(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNinRepNativeStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinRepNative(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNidRepPackedNativeStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidRepPackedNative(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNinRepPackedNativeStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinRepPackedNative(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNidOptStructStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidOptStruct(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNinOptStructStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptStruct(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNidRepStructStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidRepStruct(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNinRepStructStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinRepStruct(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNidEmbeddedStructStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidEmbeddedStruct(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNinEmbeddedStructStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinEmbeddedStruct(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNidNestedStructStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidNestedStruct(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNinNestedStructStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinNestedStruct(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNidOptCustomStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidOptCustom(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestCustomDashStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomDash(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNinOptCustomStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptCustom(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNidRepCustomStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidRepCustom(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNinRepCustomStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinRepCustom(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNinOptNativeUnionStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptNativeUnion(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNinOptStructUnionStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptStructUnion(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNinEmbeddedStructUnionStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinEmbeddedStructUnion(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNinNestedStructUnionStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinNestedStructUnion(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestTreeStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedTree(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestOrBranchStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedOrBranch(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestAndBranchStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAndBranch(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestLeafStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedLeaf(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestDeepTreeStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedDeepTree(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestADeepBranchStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedADeepBranch(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestAndDeepBranchStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAndDeepBranch(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestDeepLeafStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedDeepLeaf(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNilStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNil(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNidOptEnumStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidOptEnum(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNinOptEnumStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptEnum(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNidRepEnumStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidRepEnum(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNinRepEnumStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinRepEnum(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNinOptEnumDefaultStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptEnumDefault(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestAnotherNinOptEnumStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAnotherNinOptEnum(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestAnotherNinOptEnumDefaultStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAnotherNinOptEnumDefault(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestTimerStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedTimer(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestMyExtendableStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedMyExtendable(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestOtherExtenableStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedOtherExtenable(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNestedDefinitionStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNestedDefinition(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNestedDefinition_NestedMessageStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNestedDefinition_NestedMessage(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNestedDefinition_NestedMessage_NestedNestedMsgStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNestedScopeStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNestedScope(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNinOptNativeDefaultStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptNativeDefault(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestCustomContainerStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomContainer(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestCustomNameNidOptNativeStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameNidOptNative(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestCustomNameNinOptNativeStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameNinOptNative(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestCustomNameNinRepNativeStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameNinRepNative(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestCustomNameNinStructStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameNinStruct(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestCustomNameCustomTypeStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameCustomType(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestCustomNameNinEmbeddedStructUnionStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameNinEmbeddedStructUnion(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestCustomNameEnumStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameEnum(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNoExtensionsMapStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNoExtensionsMap(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestUnrecognizedStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedUnrecognized(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestUnrecognizedWithInnerStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedUnrecognizedWithInner(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestUnrecognizedWithInner_InnerStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedUnrecognizedWithInner_Inner(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestUnrecognizedWithEmbedStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedUnrecognizedWithEmbed(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestUnrecognizedWithEmbed_EmbeddedStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedUnrecognizedWithEmbed_Embedded(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNodeStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNode(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNinOptNativeUnionOnlyOne(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptNativeUnion(popr, true) + v := p.GetValue() + msg := &NinOptNativeUnion{} + if !msg.SetValue(v) { + t.Fatalf("OnlyOne: Could not set Value") + } + if !p.Equal(msg) { + t.Fatalf("%#v !OnlyOne Equal %#v", msg, p) + } +} +func TestNinOptStructUnionOnlyOne(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptStructUnion(popr, true) + v := p.GetValue() + msg := &NinOptStructUnion{} + if !msg.SetValue(v) { + t.Fatalf("OnlyOne: Could not set Value") + } + if !p.Equal(msg) { + t.Fatalf("%#v !OnlyOne Equal %#v", msg, p) + } +} +func TestNinEmbeddedStructUnionOnlyOne(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinEmbeddedStructUnion(popr, true) + v := p.GetValue() + msg := &NinEmbeddedStructUnion{} + if !msg.SetValue(v) { + t.Fatalf("OnlyOne: Could not set Value") + } + if !p.Equal(msg) { + t.Fatalf("%#v !OnlyOne Equal %#v", msg, p) + } +} +func TestNinNestedStructUnionOnlyOne(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinNestedStructUnion(popr, true) + v := p.GetValue() + msg := &NinNestedStructUnion{} + if !msg.SetValue(v) { + t.Fatalf("OnlyOne: Could not set Value") + } + if !p.Equal(msg) { + t.Fatalf("%#v !OnlyOne Equal %#v", msg, p) + } +} +func TestTreeOnlyOne(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedTree(popr, true) + v := p.GetValue() + msg := &Tree{} + if !msg.SetValue(v) { + t.Fatalf("OnlyOne: Could not set Value") + } + if !p.Equal(msg) { + t.Fatalf("%#v !OnlyOne Equal %#v", msg, p) + } +} +func TestDeepTreeOnlyOne(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedDeepTree(popr, true) + v := p.GetValue() + msg := &DeepTree{} + if !msg.SetValue(v) { + t.Fatalf("OnlyOne: Could not set Value") + } + if !p.Equal(msg) { + t.Fatalf("%#v !OnlyOne Equal %#v", msg, p) + } +} +func TestCustomNameNinEmbeddedStructUnionOnlyOne(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameNinEmbeddedStructUnion(popr, true) + v := p.GetValue() + msg := &CustomNameNinEmbeddedStructUnion{} + if !msg.SetValue(v) { + t.Fatalf("OnlyOne: Could not set Value") + } + if !p.Equal(msg) { + t.Fatalf("%#v !OnlyOne Equal %#v", msg, p) + } +} + +//These tests are generated by github.com/gogo/protobuf/plugin/testgen diff --git a/vendor/github.com/gogo/protobuf/test/combos/unsafemarshaler/uuid.go b/vendor/github.com/gogo/protobuf/test/combos/unsafemarshaler/uuid.go new file mode 100644 index 000000000..760111191 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/combos/unsafemarshaler/uuid.go @@ -0,0 +1,126 @@ +// Extensions for Protocol Buffers to create more go like structures. +// +// Copyright (c) 2013, Vastech SA (PTY) LTD. All rights reserved. +// http://github.com/gogo/protobuf/gogoproto +// +// 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 test + +import ( + "bytes" + "encoding/json" +) + +func PutLittleEndianUint64(b []byte, offset int, v uint64) { + b[offset] = byte(v) + b[offset+1] = byte(v >> 8) + b[offset+2] = byte(v >> 16) + b[offset+3] = byte(v >> 24) + b[offset+4] = byte(v >> 32) + b[offset+5] = byte(v >> 40) + b[offset+6] = byte(v >> 48) + b[offset+7] = byte(v >> 56) +} + +type Uuid []byte + +func (uuid Uuid) Marshal() ([]byte, error) { + if len(uuid) == 0 { + return nil, nil + } + return []byte(uuid), nil +} + +func (uuid Uuid) MarshalTo(data []byte) (n int, err error) { + if len(uuid) == 0 { + return 0, nil + } + copy(data, uuid) + return 16, nil +} + +func (uuid *Uuid) Unmarshal(data []byte) error { + if len(data) == 0 { + uuid = nil + return nil + } + id := Uuid(make([]byte, 16)) + copy(id, data) + *uuid = id + return nil +} + +func (uuid *Uuid) Size() int { + if uuid == nil { + return 0 + } + if len(*uuid) == 0 { + return 0 + } + return 16 +} + +func (uuid Uuid) MarshalJSON() ([]byte, error) { + return json.Marshal([]byte(uuid)) +} + +func (uuid *Uuid) UnmarshalJSON(data []byte) error { + v := new([]byte) + err := json.Unmarshal(data, v) + if err != nil { + return err + } + return uuid.Unmarshal(*v) +} + +func (uuid Uuid) Equal(other Uuid) bool { + return bytes.Equal(uuid[0:], other[0:]) +} + +func (uuid Uuid) Compare(other Uuid) int { + return bytes.Compare(uuid[0:], other[0:]) +} + +type int63 interface { + Int63() int64 +} + +func NewPopulatedUuid(r int63) *Uuid { + u := RandV4(r) + return &u +} + +func RandV4(r int63) Uuid { + uuid := make(Uuid, 16) + uuid.RandV4(r) + return uuid +} + +func (uuid Uuid) RandV4(r int63) { + PutLittleEndianUint64(uuid, 0, uint64(r.Int63())) + PutLittleEndianUint64(uuid, 8, uint64(r.Int63())) + uuid[6] = (uuid[6] & 0xf) | 0x40 + uuid[8] = (uuid[8] & 0x3f) | 0x80 +} diff --git a/vendor/github.com/gogo/protobuf/test/combos/unsafeunmarshaler/bug_test.go b/vendor/github.com/gogo/protobuf/test/combos/unsafeunmarshaler/bug_test.go new file mode 100644 index 000000000..2386c48e5 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/combos/unsafeunmarshaler/bug_test.go @@ -0,0 +1,250 @@ +// Copyright (c) 2013, Vastech SA (PTY) LTD. All rights reserved. +// http://github.com/gogo/protobuf/gogoproto +// +// 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 test + +import ( + "fmt" + "math" + "math/rand" + "testing" + "time" + + "github.com/gogo/protobuf/proto" +) + +//http://code.google.com/p/goprotobuf/issues/detail?id=39 +func TestBugUint32VarintSize(t *testing.T) { + temp := uint32(math.MaxUint32) + n := &NinOptNative{} + n.Field5 = &temp + data, err := proto.Marshal(n) + if err != nil { + panic(err) + } + if len(data) != 6 { + t.Fatalf("data should be length 6, but its %#v", data) + } +} + +func TestBugZeroLengthSliceSize(t *testing.T) { + n := &NinRepPackedNative{ + Field8: []int64{}, + } + size := n.Size() + data, err := proto.Marshal(n) + if err != nil { + panic(err) + } + if len(data) != size { + t.Fatalf("expected %v, but got %v", len(data), size) + } +} + +//http://code.google.com/p/goprotobuf/issues/detail?id=40 +func TestBugPackedProtoSize(t *testing.T) { + n := &NinRepPackedNative{ + Field4: []int64{172960727389894724, 2360337516664475010, 860833876131988189, 9068073014890763245, 7794843386260381831, 4023536436053141786, 8992311247496919020, 4330096163611305776, 4490411416244976467, 7873947349172707443, 2754969595834279669, 1360667855926938684, 4771480785172657389, 4875578924966668055, 8070579869808877481, 9128179594766551001, 4630419407064527516, 863844540220372892, 8208727650143073487, 7086117356301045838, 7779695211931506151, 5493835345187563535, 9119767633370806007, 9054342025895349248, 1887303228838508438, 7624573031734528281, 1874668389749611225, 3517684643468970593, 6677697606628877758, 7293473953189936168, 444475066704085538, 8594971141363049302, 1146643249094989673, 733393306232853371, 7721178528893916886, 7784452000911004429, 6436373110242711440, 6897422461738321237, 8772249155667732778, 6211871464311393541, 3061903718310406883, 7845488913176136641, 8342255034663902574, 3443058984649725748, 8410801047334832902, 7496541071517841153, 4305416923521577765, 7814967600020476457, 8671843803465481186, 3490266370361096855, 1447425664719091336, 653218597262334239, 8306243902880091940, 7851896059762409081, 5936760560798954978, 5755724498441478025, 7022701569985035966, 3707709584811468220, 529069456924666920, 7986469043681522462, 3092513330689518836, 5103541550470476202, 3577384161242626406, 3733428084624703294, 8388690542440473117, 3262468785346149388, 8788358556558007570, 5476276940198542020, 7277903243119461239, 5065861426928605020, 7533460976202697734, 1749213838654236956, 557497603941617931, 5496307611456481108, 6444547750062831720, 6992758776744205596, 7356719693428537399, 2896328872476734507, 381447079530132038, 598300737753233118, 3687980626612697715, 7240924191084283349, 8172414415307971170, 4847024388701257185, 2081764168600256551, 3394217778539123488, 6244660626429310923, 8301712215675381614, 5360615125359461174, 8410140945829785773, 3152963269026381373, 6197275282781459633, 4419829061407546410, 6262035523070047537, 2837207483933463885, 2158105736666826128, 8150764172235490711}, + Field7: []int32{249451845, 1409974015, 393609128, 435232428, 1817529040, 91769006, 861170933, 1556185603, 1568580279, 1236375273, 512276621, 693633711, 967580535, 1950715977, 853431462, 1362390253, 159591204, 111900629, 322985263, 279671129, 1592548430, 465651370, 733849989, 1172059400, 1574824441, 263541092, 1271612397, 1520584358, 467078791, 117698716, 1098255064, 2054264846, 1766452305, 1267576395, 1557505617, 1187833560, 956187431, 1970977586, 1160235159, 1610259028, 489585797, 459139078, 566263183, 954319278, 1545018565, 1753946743, 948214318, 422878159, 883926576, 1424009347, 824732372, 1290433180, 80297942, 417294230, 1402647904, 2078392782, 220505045, 787368129, 463781454, 293083578, 808156928, 293976361}, + Field9: []uint32{0xaa4976e8, 0x3da8cc4c, 0x8c470d83, 0x344d964e, 0x5b90925, 0xa4c4d34e, 0x666eff19, 0xc238e552, 0x9be53bb6, 0x56364245, 0x33ee079d, 0x96bf0ede, 0x7941b74f, 0xdb07cb47, 0x6d76d827, 0x9b211d5d, 0x2798adb6, 0xe48b0c3b, 0x87061b21, 0x48f4e4d2, 0x3e5d5c12, 0x5ee91288, 0x336d4f35, 0xe1d44941, 0xc065548d, 0x2953d73f, 0x873af451, 0xfc769db, 0x9f1bf8da, 0x9baafdfc, 0xf1d3d770, 0x5bb5d2b4, 0xc2c67c48, 0x6845c4c1, 0xa48f32b0, 0xbb04bb70, 0xa5b1ca36, 0x8d98356a, 0x2171f654, 0x5ae279b0, 0x6c4a3d6b, 0x4fff5468, 0xcf9bf851, 0x68513614, 0xdbecd9b0, 0x9553ed3c, 0xa494a736, 0x42205438, 0xbf8e5caa, 0xd3283c6, 0x76d20788, 0x9179826f, 0x96b24f85, 0xbc2eacf4, 0xe4afae0b, 0x4bca85cb, 0x35e63b5b, 0xd7ccee0c, 0x2b506bb9, 0xe78e9f44, 0x9ad232f1, 0x99a37335, 0xa5d6ffc8}, + Field11: []uint64{0x53c01ebc, 0x4fb85ba6, 0x8805eea1, 0xb20ec896, 0x93b63410, 0xec7c9492, 0x50765a28, 0x19592106, 0x2ecc59b3, 0x39cd474f, 0xe4c9e47, 0x444f48c5, 0xe7731d32, 0xf3f43975, 0x603caedd, 0xbb05a1af, 0xa808e34e, 0x88580b07, 0x4c96bbd1, 0x730b4ab9, 0xed126e2b, 0x6db48205, 0x154ba1b9, 0xc26bfb6a, 0x389aa052, 0x869d966c, 0x7c86b366, 0xcc8edbcd, 0xfa8d6dad, 0xcf5857d9, 0x2d9cda0f, 0x1218a0b8, 0x41bf997, 0xf0ca65ac, 0xa610d4b9, 0x8d362e28, 0xb7212d87, 0x8e0fe109, 0xbee041d9, 0x759be2f6, 0x35fef4f3, 0xaeacdb71, 0x10888852, 0xf4e28117, 0xe2a14812, 0x73b748dc, 0xd1c3c6b2, 0xfef41bf0, 0xc9b43b62, 0x810e4faa, 0xcaa41c06, 0x1893fe0d, 0xedc7c850, 0xd12b9eaa, 0x467ee1a9, 0xbe84756b, 0xda7b1680, 0xdc069ffe, 0xf1e7e9f9, 0xb3d95370, 0xa92b77df, 0x5693ac41, 0xd04b7287, 0x27aebf15, 0x837b316e, 0x4dbe2263, 0xbab70c67, 0x547dab21, 0x3c346c1f, 0xb8ef0e4e, 0xfe2d03ce, 0xe1d75955, 0xfec1306, 0xba35c23e, 0xb784ed04, 0x2a4e33aa, 0x7e19d09a, 0x3827c1fe, 0xf3a51561, 0xef765e2b, 0xb044256c, 0x62b322be, 0xf34d56be, 0xeb71b369, 0xffe1294f, 0x237fe8d0, 0x77a1473b, 0x239e1196, 0xdd19bf3d, 0x82c91fe1, 0x95361c57, 0xffea3f1b, 0x1a094c84}, + Field12: []int64{8308420747267165049, 3664160795077875961, 7868970059161834817, 7237335984251173739, 5254748003907196506, 3362259627111837480, 430460752854552122, 5119635556501066533, 1277716037866233522, 9185775384759813768, 833932430882717888, 7986528304451297640, 6792233378368656337, 2074207091120609721, 1788723326198279432, 7756514594746453657, 2283775964901597324, 3061497730110517191, 7733947890656120277, 626967303632386244, 7822928600388582821, 3489658753000061230, 168869995163005961, 248814782163480763, 477885608911386247, 4198422415674133867, 3379354662797976109, 9925112544736939, 1486335136459138480, 4561560414032850671, 1010864164014091267, 186722821683803084, 5106357936724819318, 1298160820191228988, 4675403242419953145, 7130634540106489752, 7101280006672440929, 7176058292431955718, 9109875054097770321, 6810974877085322872, 4736707874303993641, 8993135362721382187, 6857881554990254283, 3704748883307461680, 1099360832887634994, 5207691918707192633, 5984721695043995243}, + } + size := proto.Size(n) + data, err := proto.Marshal(n) + if err != nil { + panic(err) + } + if len(data) != size { + t.Fatalf("expected %v, but got %v diff is %v", len(data), size, len(data)-size) + } +} + +func testSize(m interface { + proto.Message + Size() int +}, desc string, expected int) ([]byte, error) { + data, err := proto.Marshal(m) + if err != nil { + return nil, err + } + protoSize := proto.Size(m) + mSize := m.Size() + lenData := len(data) + if protoSize != mSize || protoSize != lenData || mSize != lenData { + return nil, fmt.Errorf("%s proto.Size(m){%d} != m.Size(){%d} != len(data){%d}", desc, protoSize, mSize, lenData) + } + if got := protoSize; got != expected { + return nil, fmt.Errorf("%s proto.Size(m) got %d expected %d", desc, got, expected) + } + if got := mSize; got != expected { + return nil, fmt.Errorf("%s m.Size() got %d expected %d", desc, got, expected) + } + if got := lenData; got != expected { + return nil, fmt.Errorf("%s len(data) got %d expected %d", desc, got, expected) + } + return data, nil +} + +func TestInt32Int64Compatibility(t *testing.T) { + + //test nullable int32 and int64 + + data1, err := testSize(&NinOptNative{ + Field3: proto.Int32(-1), + }, "nullable", 11) + if err != nil { + t.Error(err) + } + //change marshaled data1 to unmarshal into 4th field which is an int64 + data1[0] = uint8(uint32(4 /*fieldNumber*/)<<3 | uint32(0 /*wireType*/)) + u1 := &NinOptNative{} + if err = proto.Unmarshal(data1, u1); err != nil { + t.Error(err) + } + if !u1.Equal(&NinOptNative{ + Field4: proto.Int64(-1), + }) { + t.Error("nullable unmarshaled int32 is not the same int64") + } + + //test non-nullable int32 and int64 + + data2, err := testSize(&NidOptNative{ + Field3: -1, + }, "non nullable", 67) + if err != nil { + t.Error(err) + } + //change marshaled data2 to unmarshal into 4th field which is an int64 + field3 := uint8(uint32(3 /*fieldNumber*/)<<3 | uint32(0 /*wireType*/)) + field4 := uint8(uint32(4 /*fieldNumber*/)<<3 | uint32(0 /*wireType*/)) + for i, c := range data2 { + if c == field4 { + data2[i] = field3 + } else if c == field3 { + data2[i] = field4 + } + } + u2 := &NidOptNative{} + if err = proto.Unmarshal(data2, u2); err != nil { + t.Error(err) + } + if !u2.Equal(&NidOptNative{ + Field4: -1, + }) { + t.Error("non nullable unmarshaled int32 is not the same int64") + } + + //test packed repeated int32 and int64 + + m4 := &NinRepPackedNative{ + Field3: []int32{-1}, + } + data4, err := testSize(m4, "packed", 12) + if err != nil { + t.Error(err) + } + u4 := &NinRepPackedNative{} + if err := proto.Unmarshal(data4, u4); err != nil { + t.Error(err) + } + if err := u4.VerboseEqual(m4); err != nil { + t.Fatalf("%#v", u4) + } + + //test repeated int32 and int64 + + if _, err := testSize(&NinRepNative{ + Field3: []int32{-1}, + }, "repeated", 11); err != nil { + t.Error(err) + } + + t.Logf("tested all") +} + +func TestRepeatedExtensionsMsgsIssue161(t *testing.T) { + r := rand.New(rand.NewSource(time.Now().UnixNano())) + rep := 10 + nins := make([]*NinOptNative, rep) + for i := range nins { + nins[i] = NewPopulatedNinOptNative(r, true) + } + input := &MyExtendable{} + if err := proto.SetExtension(input, E_FieldE, nins); err != nil { + t.Fatal(err) + } + data, err := proto.Marshal(input) + if err != nil { + t.Fatal(err) + } + output := &MyExtendable{} + if err := proto.Unmarshal(data, output); err != nil { + t.Fatal(err) + } + if !input.Equal(output) { + t.Fatal("expected equal") + } + data2, err2 := proto.Marshal(output) + if err2 != nil { + t.Fatal(err2) + } + if len(data) != len(data2) { + t.Fatal("expected equal length buffers") + } +} + +func TestRepeatedExtensionsFieldsIssue161(t *testing.T) { + r := rand.New(rand.NewSource(time.Now().UnixNano())) + rep := 10 + ints := make([]int64, rep) + for i := range ints { + ints[i] = r.Int63() + } + input := &MyExtendable{} + if err := proto.SetExtension(input, E_FieldD, ints); err != nil { + t.Fatal(err) + } + data, err := proto.Marshal(input) + if err != nil { + t.Fatal(err) + } + output := &MyExtendable{} + if err := proto.Unmarshal(data, output); err != nil { + t.Fatal(err) + } + if !input.Equal(output) { + t.Fatal("expected equal") + } + data2, err2 := proto.Marshal(output) + if err2 != nil { + t.Fatal(err2) + } + if len(data) != len(data2) { + t.Fatal("expected equal length buffers") + } +} diff --git a/vendor/github.com/gogo/protobuf/test/combos/unsafeunmarshaler/thetest.pb.go b/vendor/github.com/gogo/protobuf/test/combos/unsafeunmarshaler/thetest.pb.go new file mode 100644 index 000000000..421d06cd3 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/combos/unsafeunmarshaler/thetest.pb.go @@ -0,0 +1,35689 @@ +// Code generated by protoc-gen-gogo. +// source: combos/unsafeunmarshaler/thetest.proto +// DO NOT EDIT! + +/* + Package test is a generated protocol buffer package. + + It is generated from these files: + combos/unsafeunmarshaler/thetest.proto + + It has these top-level messages: + NidOptNative + NinOptNative + NidRepNative + NinRepNative + NidRepPackedNative + NinRepPackedNative + NidOptStruct + NinOptStruct + NidRepStruct + NinRepStruct + NidEmbeddedStruct + NinEmbeddedStruct + NidNestedStruct + NinNestedStruct + NidOptCustom + CustomDash + NinOptCustom + NidRepCustom + NinRepCustom + NinOptNativeUnion + NinOptStructUnion + NinEmbeddedStructUnion + NinNestedStructUnion + Tree + OrBranch + AndBranch + Leaf + DeepTree + ADeepBranch + AndDeepBranch + DeepLeaf + Nil + NidOptEnum + NinOptEnum + NidRepEnum + NinRepEnum + NinOptEnumDefault + AnotherNinOptEnum + AnotherNinOptEnumDefault + Timer + MyExtendable + OtherExtenable + NestedDefinition + NestedScope + NinOptNativeDefault + CustomContainer + CustomNameNidOptNative + CustomNameNinOptNative + CustomNameNinRepNative + CustomNameNinStruct + CustomNameCustomType + CustomNameNinEmbeddedStructUnion + CustomNameEnum + NoExtensionsMap + Unrecognized + UnrecognizedWithInner + UnrecognizedWithEmbed + Node +*/ +package test + +import proto "github.com/gogo/protobuf/proto" +import fmt "fmt" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" + +import github_com_gogo_protobuf_test_custom "github.com/gogo/protobuf/test/custom" +import github_com_gogo_protobuf_test_custom_dash_type "github.com/gogo/protobuf/test/custom-dash-type" + +import bytes "bytes" +import github_com_gogo_protobuf_sortkeys "github.com/gogo/protobuf/sortkeys" + +import github_com_gogo_protobuf_protoc_gen_gogo_descriptor "github.com/gogo/protobuf/protoc-gen-gogo/descriptor" +import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" +import compress_gzip "compress/gzip" +import io_ioutil "io/ioutil" + +import strconv "strconv" + +import strings "strings" +import sort "sort" +import reflect "reflect" + +import io "io" +import unsafe "unsafe" + +// 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. +const _ = proto.GoGoProtoPackageIsVersion1 + +type TheTestEnum int32 + +const ( + A TheTestEnum = 0 + B TheTestEnum = 1 + C TheTestEnum = 2 +) + +var TheTestEnum_name = map[int32]string{ + 0: "A", + 1: "B", + 2: "C", +} +var TheTestEnum_value = map[string]int32{ + "A": 0, + "B": 1, + "C": 2, +} + +func (x TheTestEnum) Enum() *TheTestEnum { + p := new(TheTestEnum) + *p = x + return p +} +func (x TheTestEnum) MarshalJSON() ([]byte, error) { + return proto.MarshalJSONEnum(TheTestEnum_name, int32(x)) +} +func (x *TheTestEnum) UnmarshalJSON(data []byte) error { + value, err := proto.UnmarshalJSONEnum(TheTestEnum_value, data, "TheTestEnum") + if err != nil { + return err + } + *x = TheTestEnum(value) + return nil +} +func (TheTestEnum) EnumDescriptor() ([]byte, []int) { return fileDescriptorThetest, []int{0} } + +type AnotherTestEnum int32 + +const ( + D AnotherTestEnum = 10 + E AnotherTestEnum = 11 +) + +var AnotherTestEnum_name = map[int32]string{ + 10: "D", + 11: "E", +} +var AnotherTestEnum_value = map[string]int32{ + "D": 10, + "E": 11, +} + +func (x AnotherTestEnum) Enum() *AnotherTestEnum { + p := new(AnotherTestEnum) + *p = x + return p +} +func (x AnotherTestEnum) MarshalJSON() ([]byte, error) { + return proto.MarshalJSONEnum(AnotherTestEnum_name, int32(x)) +} +func (x *AnotherTestEnum) UnmarshalJSON(data []byte) error { + value, err := proto.UnmarshalJSONEnum(AnotherTestEnum_value, data, "AnotherTestEnum") + if err != nil { + return err + } + *x = AnotherTestEnum(value) + return nil +} +func (AnotherTestEnum) EnumDescriptor() ([]byte, []int) { return fileDescriptorThetest, []int{1} } + +// YetAnotherTestEnum is used to test cross-package import of custom name +// fields and default resolution. +type YetAnotherTestEnum int32 + +const ( + AA YetAnotherTestEnum = 0 + BetterYetBB YetAnotherTestEnum = 1 +) + +var YetAnotherTestEnum_name = map[int32]string{ + 0: "AA", + 1: "BB", +} +var YetAnotherTestEnum_value = map[string]int32{ + "AA": 0, + "BB": 1, +} + +func (x YetAnotherTestEnum) Enum() *YetAnotherTestEnum { + p := new(YetAnotherTestEnum) + *p = x + return p +} +func (x YetAnotherTestEnum) MarshalJSON() ([]byte, error) { + return proto.MarshalJSONEnum(YetAnotherTestEnum_name, int32(x)) +} +func (x *YetAnotherTestEnum) UnmarshalJSON(data []byte) error { + value, err := proto.UnmarshalJSONEnum(YetAnotherTestEnum_value, data, "YetAnotherTestEnum") + if err != nil { + return err + } + *x = YetAnotherTestEnum(value) + return nil +} +func (YetAnotherTestEnum) EnumDescriptor() ([]byte, []int) { return fileDescriptorThetest, []int{2} } + +// YetAnotherTestEnum is used to test cross-package import of custom name +// fields and default resolution. +type YetYetAnotherTestEnum int32 + +const ( + YetYetAnotherTestEnum_CC YetYetAnotherTestEnum = 0 + YetYetAnotherTestEnum_BetterYetDD YetYetAnotherTestEnum = 1 +) + +var YetYetAnotherTestEnum_name = map[int32]string{ + 0: "CC", + 1: "DD", +} +var YetYetAnotherTestEnum_value = map[string]int32{ + "CC": 0, + "DD": 1, +} + +func (x YetYetAnotherTestEnum) Enum() *YetYetAnotherTestEnum { + p := new(YetYetAnotherTestEnum) + *p = x + return p +} +func (x YetYetAnotherTestEnum) MarshalJSON() ([]byte, error) { + return proto.MarshalJSONEnum(YetYetAnotherTestEnum_name, int32(x)) +} +func (x *YetYetAnotherTestEnum) UnmarshalJSON(data []byte) error { + value, err := proto.UnmarshalJSONEnum(YetYetAnotherTestEnum_value, data, "YetYetAnotherTestEnum") + if err != nil { + return err + } + *x = YetYetAnotherTestEnum(value) + return nil +} +func (YetYetAnotherTestEnum) EnumDescriptor() ([]byte, []int) { return fileDescriptorThetest, []int{3} } + +type NestedDefinition_NestedEnum int32 + +const ( + TYPE_NESTED NestedDefinition_NestedEnum = 1 +) + +var NestedDefinition_NestedEnum_name = map[int32]string{ + 1: "TYPE_NESTED", +} +var NestedDefinition_NestedEnum_value = map[string]int32{ + "TYPE_NESTED": 1, +} + +func (x NestedDefinition_NestedEnum) Enum() *NestedDefinition_NestedEnum { + p := new(NestedDefinition_NestedEnum) + *p = x + return p +} +func (x NestedDefinition_NestedEnum) MarshalJSON() ([]byte, error) { + return proto.MarshalJSONEnum(NestedDefinition_NestedEnum_name, int32(x)) +} +func (x *NestedDefinition_NestedEnum) UnmarshalJSON(data []byte) error { + value, err := proto.UnmarshalJSONEnum(NestedDefinition_NestedEnum_value, data, "NestedDefinition_NestedEnum") + if err != nil { + return err + } + *x = NestedDefinition_NestedEnum(value) + return nil +} +func (NestedDefinition_NestedEnum) EnumDescriptor() ([]byte, []int) { + return fileDescriptorThetest, []int{42, 0} +} + +type NidOptNative struct { + Field1 float64 `protobuf:"fixed64,1,opt,name=Field1,json=field1" json:"Field1"` + Field2 float32 `protobuf:"fixed32,2,opt,name=Field2,json=field2" json:"Field2"` + Field3 int32 `protobuf:"varint,3,opt,name=Field3,json=field3" json:"Field3"` + Field4 int64 `protobuf:"varint,4,opt,name=Field4,json=field4" json:"Field4"` + Field5 uint32 `protobuf:"varint,5,opt,name=Field5,json=field5" json:"Field5"` + Field6 uint64 `protobuf:"varint,6,opt,name=Field6,json=field6" json:"Field6"` + Field7 int32 `protobuf:"zigzag32,7,opt,name=Field7,json=field7" json:"Field7"` + Field8 int64 `protobuf:"zigzag64,8,opt,name=Field8,json=field8" json:"Field8"` + Field9 uint32 `protobuf:"fixed32,9,opt,name=Field9,json=field9" json:"Field9"` + Field10 int32 `protobuf:"fixed32,10,opt,name=Field10,json=field10" json:"Field10"` + Field11 uint64 `protobuf:"fixed64,11,opt,name=Field11,json=field11" json:"Field11"` + Field12 int64 `protobuf:"fixed64,12,opt,name=Field12,json=field12" json:"Field12"` + Field13 bool `protobuf:"varint,13,opt,name=Field13,json=field13" json:"Field13"` + Field14 string `protobuf:"bytes,14,opt,name=Field14,json=field14" json:"Field14"` + Field15 []byte `protobuf:"bytes,15,opt,name=Field15,json=field15" json:"Field15"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *NidOptNative) Reset() { *m = NidOptNative{} } +func (*NidOptNative) ProtoMessage() {} +func (*NidOptNative) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{0} } + +type NinOptNative struct { + Field1 *float64 `protobuf:"fixed64,1,opt,name=Field1,json=field1" json:"Field1,omitempty"` + Field2 *float32 `protobuf:"fixed32,2,opt,name=Field2,json=field2" json:"Field2,omitempty"` + Field3 *int32 `protobuf:"varint,3,opt,name=Field3,json=field3" json:"Field3,omitempty"` + Field4 *int64 `protobuf:"varint,4,opt,name=Field4,json=field4" json:"Field4,omitempty"` + Field5 *uint32 `protobuf:"varint,5,opt,name=Field5,json=field5" json:"Field5,omitempty"` + Field6 *uint64 `protobuf:"varint,6,opt,name=Field6,json=field6" json:"Field6,omitempty"` + Field7 *int32 `protobuf:"zigzag32,7,opt,name=Field7,json=field7" json:"Field7,omitempty"` + Field8 *int64 `protobuf:"zigzag64,8,opt,name=Field8,json=field8" json:"Field8,omitempty"` + Field9 *uint32 `protobuf:"fixed32,9,opt,name=Field9,json=field9" json:"Field9,omitempty"` + Field10 *int32 `protobuf:"fixed32,10,opt,name=Field10,json=field10" json:"Field10,omitempty"` + Field11 *uint64 `protobuf:"fixed64,11,opt,name=Field11,json=field11" json:"Field11,omitempty"` + Field12 *int64 `protobuf:"fixed64,12,opt,name=Field12,json=field12" json:"Field12,omitempty"` + Field13 *bool `protobuf:"varint,13,opt,name=Field13,json=field13" json:"Field13,omitempty"` + Field14 *string `protobuf:"bytes,14,opt,name=Field14,json=field14" json:"Field14,omitempty"` + Field15 []byte `protobuf:"bytes,15,opt,name=Field15,json=field15" json:"Field15,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *NinOptNative) Reset() { *m = NinOptNative{} } +func (*NinOptNative) ProtoMessage() {} +func (*NinOptNative) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{1} } + +type NidRepNative struct { + Field1 []float64 `protobuf:"fixed64,1,rep,name=Field1,json=field1" json:"Field1,omitempty"` + Field2 []float32 `protobuf:"fixed32,2,rep,name=Field2,json=field2" json:"Field2,omitempty"` + Field3 []int32 `protobuf:"varint,3,rep,name=Field3,json=field3" json:"Field3,omitempty"` + Field4 []int64 `protobuf:"varint,4,rep,name=Field4,json=field4" json:"Field4,omitempty"` + Field5 []uint32 `protobuf:"varint,5,rep,name=Field5,json=field5" json:"Field5,omitempty"` + Field6 []uint64 `protobuf:"varint,6,rep,name=Field6,json=field6" json:"Field6,omitempty"` + Field7 []int32 `protobuf:"zigzag32,7,rep,name=Field7,json=field7" json:"Field7,omitempty"` + Field8 []int64 `protobuf:"zigzag64,8,rep,name=Field8,json=field8" json:"Field8,omitempty"` + Field9 []uint32 `protobuf:"fixed32,9,rep,name=Field9,json=field9" json:"Field9,omitempty"` + Field10 []int32 `protobuf:"fixed32,10,rep,name=Field10,json=field10" json:"Field10,omitempty"` + Field11 []uint64 `protobuf:"fixed64,11,rep,name=Field11,json=field11" json:"Field11,omitempty"` + Field12 []int64 `protobuf:"fixed64,12,rep,name=Field12,json=field12" json:"Field12,omitempty"` + Field13 []bool `protobuf:"varint,13,rep,name=Field13,json=field13" json:"Field13,omitempty"` + Field14 []string `protobuf:"bytes,14,rep,name=Field14,json=field14" json:"Field14,omitempty"` + Field15 [][]byte `protobuf:"bytes,15,rep,name=Field15,json=field15" json:"Field15,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *NidRepNative) Reset() { *m = NidRepNative{} } +func (*NidRepNative) ProtoMessage() {} +func (*NidRepNative) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{2} } + +type NinRepNative struct { + Field1 []float64 `protobuf:"fixed64,1,rep,name=Field1,json=field1" json:"Field1,omitempty"` + Field2 []float32 `protobuf:"fixed32,2,rep,name=Field2,json=field2" json:"Field2,omitempty"` + Field3 []int32 `protobuf:"varint,3,rep,name=Field3,json=field3" json:"Field3,omitempty"` + Field4 []int64 `protobuf:"varint,4,rep,name=Field4,json=field4" json:"Field4,omitempty"` + Field5 []uint32 `protobuf:"varint,5,rep,name=Field5,json=field5" json:"Field5,omitempty"` + Field6 []uint64 `protobuf:"varint,6,rep,name=Field6,json=field6" json:"Field6,omitempty"` + Field7 []int32 `protobuf:"zigzag32,7,rep,name=Field7,json=field7" json:"Field7,omitempty"` + Field8 []int64 `protobuf:"zigzag64,8,rep,name=Field8,json=field8" json:"Field8,omitempty"` + Field9 []uint32 `protobuf:"fixed32,9,rep,name=Field9,json=field9" json:"Field9,omitempty"` + Field10 []int32 `protobuf:"fixed32,10,rep,name=Field10,json=field10" json:"Field10,omitempty"` + Field11 []uint64 `protobuf:"fixed64,11,rep,name=Field11,json=field11" json:"Field11,omitempty"` + Field12 []int64 `protobuf:"fixed64,12,rep,name=Field12,json=field12" json:"Field12,omitempty"` + Field13 []bool `protobuf:"varint,13,rep,name=Field13,json=field13" json:"Field13,omitempty"` + Field14 []string `protobuf:"bytes,14,rep,name=Field14,json=field14" json:"Field14,omitempty"` + Field15 [][]byte `protobuf:"bytes,15,rep,name=Field15,json=field15" json:"Field15,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *NinRepNative) Reset() { *m = NinRepNative{} } +func (*NinRepNative) ProtoMessage() {} +func (*NinRepNative) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{3} } + +type NidRepPackedNative struct { + Field1 []float64 `protobuf:"fixed64,1,rep,packed,name=Field1,json=field1" json:"Field1,omitempty"` + Field2 []float32 `protobuf:"fixed32,2,rep,packed,name=Field2,json=field2" json:"Field2,omitempty"` + Field3 []int32 `protobuf:"varint,3,rep,packed,name=Field3,json=field3" json:"Field3,omitempty"` + Field4 []int64 `protobuf:"varint,4,rep,packed,name=Field4,json=field4" json:"Field4,omitempty"` + Field5 []uint32 `protobuf:"varint,5,rep,packed,name=Field5,json=field5" json:"Field5,omitempty"` + Field6 []uint64 `protobuf:"varint,6,rep,packed,name=Field6,json=field6" json:"Field6,omitempty"` + Field7 []int32 `protobuf:"zigzag32,7,rep,packed,name=Field7,json=field7" json:"Field7,omitempty"` + Field8 []int64 `protobuf:"zigzag64,8,rep,packed,name=Field8,json=field8" json:"Field8,omitempty"` + Field9 []uint32 `protobuf:"fixed32,9,rep,packed,name=Field9,json=field9" json:"Field9,omitempty"` + Field10 []int32 `protobuf:"fixed32,10,rep,packed,name=Field10,json=field10" json:"Field10,omitempty"` + Field11 []uint64 `protobuf:"fixed64,11,rep,packed,name=Field11,json=field11" json:"Field11,omitempty"` + Field12 []int64 `protobuf:"fixed64,12,rep,packed,name=Field12,json=field12" json:"Field12,omitempty"` + Field13 []bool `protobuf:"varint,13,rep,packed,name=Field13,json=field13" json:"Field13,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *NidRepPackedNative) Reset() { *m = NidRepPackedNative{} } +func (*NidRepPackedNative) ProtoMessage() {} +func (*NidRepPackedNative) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{4} } + +type NinRepPackedNative struct { + Field1 []float64 `protobuf:"fixed64,1,rep,packed,name=Field1,json=field1" json:"Field1,omitempty"` + Field2 []float32 `protobuf:"fixed32,2,rep,packed,name=Field2,json=field2" json:"Field2,omitempty"` + Field3 []int32 `protobuf:"varint,3,rep,packed,name=Field3,json=field3" json:"Field3,omitempty"` + Field4 []int64 `protobuf:"varint,4,rep,packed,name=Field4,json=field4" json:"Field4,omitempty"` + Field5 []uint32 `protobuf:"varint,5,rep,packed,name=Field5,json=field5" json:"Field5,omitempty"` + Field6 []uint64 `protobuf:"varint,6,rep,packed,name=Field6,json=field6" json:"Field6,omitempty"` + Field7 []int32 `protobuf:"zigzag32,7,rep,packed,name=Field7,json=field7" json:"Field7,omitempty"` + Field8 []int64 `protobuf:"zigzag64,8,rep,packed,name=Field8,json=field8" json:"Field8,omitempty"` + Field9 []uint32 `protobuf:"fixed32,9,rep,packed,name=Field9,json=field9" json:"Field9,omitempty"` + Field10 []int32 `protobuf:"fixed32,10,rep,packed,name=Field10,json=field10" json:"Field10,omitempty"` + Field11 []uint64 `protobuf:"fixed64,11,rep,packed,name=Field11,json=field11" json:"Field11,omitempty"` + Field12 []int64 `protobuf:"fixed64,12,rep,packed,name=Field12,json=field12" json:"Field12,omitempty"` + Field13 []bool `protobuf:"varint,13,rep,packed,name=Field13,json=field13" json:"Field13,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *NinRepPackedNative) Reset() { *m = NinRepPackedNative{} } +func (*NinRepPackedNative) ProtoMessage() {} +func (*NinRepPackedNative) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{5} } + +type NidOptStruct struct { + Field1 float64 `protobuf:"fixed64,1,opt,name=Field1,json=field1" json:"Field1"` + Field2 float32 `protobuf:"fixed32,2,opt,name=Field2,json=field2" json:"Field2"` + Field3 NidOptNative `protobuf:"bytes,3,opt,name=Field3,json=field3" json:"Field3"` + Field4 NinOptNative `protobuf:"bytes,4,opt,name=Field4,json=field4" json:"Field4"` + Field6 uint64 `protobuf:"varint,6,opt,name=Field6,json=field6" json:"Field6"` + Field7 int32 `protobuf:"zigzag32,7,opt,name=Field7,json=field7" json:"Field7"` + Field8 NidOptNative `protobuf:"bytes,8,opt,name=Field8,json=field8" json:"Field8"` + Field13 bool `protobuf:"varint,13,opt,name=Field13,json=field13" json:"Field13"` + Field14 string `protobuf:"bytes,14,opt,name=Field14,json=field14" json:"Field14"` + Field15 []byte `protobuf:"bytes,15,opt,name=Field15,json=field15" json:"Field15"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *NidOptStruct) Reset() { *m = NidOptStruct{} } +func (*NidOptStruct) ProtoMessage() {} +func (*NidOptStruct) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{6} } + +type NinOptStruct struct { + Field1 *float64 `protobuf:"fixed64,1,opt,name=Field1,json=field1" json:"Field1,omitempty"` + Field2 *float32 `protobuf:"fixed32,2,opt,name=Field2,json=field2" json:"Field2,omitempty"` + Field3 *NidOptNative `protobuf:"bytes,3,opt,name=Field3,json=field3" json:"Field3,omitempty"` + Field4 *NinOptNative `protobuf:"bytes,4,opt,name=Field4,json=field4" json:"Field4,omitempty"` + Field6 *uint64 `protobuf:"varint,6,opt,name=Field6,json=field6" json:"Field6,omitempty"` + Field7 *int32 `protobuf:"zigzag32,7,opt,name=Field7,json=field7" json:"Field7,omitempty"` + Field8 *NidOptNative `protobuf:"bytes,8,opt,name=Field8,json=field8" json:"Field8,omitempty"` + Field13 *bool `protobuf:"varint,13,opt,name=Field13,json=field13" json:"Field13,omitempty"` + Field14 *string `protobuf:"bytes,14,opt,name=Field14,json=field14" json:"Field14,omitempty"` + Field15 []byte `protobuf:"bytes,15,opt,name=Field15,json=field15" json:"Field15,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *NinOptStruct) Reset() { *m = NinOptStruct{} } +func (*NinOptStruct) ProtoMessage() {} +func (*NinOptStruct) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{7} } + +type NidRepStruct struct { + Field1 []float64 `protobuf:"fixed64,1,rep,name=Field1,json=field1" json:"Field1,omitempty"` + Field2 []float32 `protobuf:"fixed32,2,rep,name=Field2,json=field2" json:"Field2,omitempty"` + Field3 []NidOptNative `protobuf:"bytes,3,rep,name=Field3,json=field3" json:"Field3"` + Field4 []NinOptNative `protobuf:"bytes,4,rep,name=Field4,json=field4" json:"Field4"` + Field6 []uint64 `protobuf:"varint,6,rep,name=Field6,json=field6" json:"Field6,omitempty"` + Field7 []int32 `protobuf:"zigzag32,7,rep,name=Field7,json=field7" json:"Field7,omitempty"` + Field8 []NidOptNative `protobuf:"bytes,8,rep,name=Field8,json=field8" json:"Field8"` + Field13 []bool `protobuf:"varint,13,rep,name=Field13,json=field13" json:"Field13,omitempty"` + Field14 []string `protobuf:"bytes,14,rep,name=Field14,json=field14" json:"Field14,omitempty"` + Field15 [][]byte `protobuf:"bytes,15,rep,name=Field15,json=field15" json:"Field15,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *NidRepStruct) Reset() { *m = NidRepStruct{} } +func (*NidRepStruct) ProtoMessage() {} +func (*NidRepStruct) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{8} } + +type NinRepStruct struct { + Field1 []float64 `protobuf:"fixed64,1,rep,name=Field1,json=field1" json:"Field1,omitempty"` + Field2 []float32 `protobuf:"fixed32,2,rep,name=Field2,json=field2" json:"Field2,omitempty"` + Field3 []*NidOptNative `protobuf:"bytes,3,rep,name=Field3,json=field3" json:"Field3,omitempty"` + Field4 []*NinOptNative `protobuf:"bytes,4,rep,name=Field4,json=field4" json:"Field4,omitempty"` + Field6 []uint64 `protobuf:"varint,6,rep,name=Field6,json=field6" json:"Field6,omitempty"` + Field7 []int32 `protobuf:"zigzag32,7,rep,name=Field7,json=field7" json:"Field7,omitempty"` + Field8 []*NidOptNative `protobuf:"bytes,8,rep,name=Field8,json=field8" json:"Field8,omitempty"` + Field13 []bool `protobuf:"varint,13,rep,name=Field13,json=field13" json:"Field13,omitempty"` + Field14 []string `protobuf:"bytes,14,rep,name=Field14,json=field14" json:"Field14,omitempty"` + Field15 [][]byte `protobuf:"bytes,15,rep,name=Field15,json=field15" json:"Field15,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *NinRepStruct) Reset() { *m = NinRepStruct{} } +func (*NinRepStruct) ProtoMessage() {} +func (*NinRepStruct) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{9} } + +type NidEmbeddedStruct struct { + *NidOptNative `protobuf:"bytes,1,opt,name=Field1,json=field1,embedded=Field1" json:"Field1,omitempty"` + Field200 NidOptNative `protobuf:"bytes,200,opt,name=Field200,json=field200" json:"Field200"` + Field210 bool `protobuf:"varint,210,opt,name=Field210,json=field210" json:"Field210"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *NidEmbeddedStruct) Reset() { *m = NidEmbeddedStruct{} } +func (*NidEmbeddedStruct) ProtoMessage() {} +func (*NidEmbeddedStruct) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{10} } + +type NinEmbeddedStruct struct { + *NidOptNative `protobuf:"bytes,1,opt,name=Field1,json=field1,embedded=Field1" json:"Field1,omitempty"` + Field200 *NidOptNative `protobuf:"bytes,200,opt,name=Field200,json=field200" json:"Field200,omitempty"` + Field210 *bool `protobuf:"varint,210,opt,name=Field210,json=field210" json:"Field210,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *NinEmbeddedStruct) Reset() { *m = NinEmbeddedStruct{} } +func (*NinEmbeddedStruct) ProtoMessage() {} +func (*NinEmbeddedStruct) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{11} } + +type NidNestedStruct struct { + Field1 NidOptStruct `protobuf:"bytes,1,opt,name=Field1,json=field1" json:"Field1"` + Field2 []NidRepStruct `protobuf:"bytes,2,rep,name=Field2,json=field2" json:"Field2"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *NidNestedStruct) Reset() { *m = NidNestedStruct{} } +func (*NidNestedStruct) ProtoMessage() {} +func (*NidNestedStruct) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{12} } + +type NinNestedStruct struct { + Field1 *NinOptStruct `protobuf:"bytes,1,opt,name=Field1,json=field1" json:"Field1,omitempty"` + Field2 []*NinRepStruct `protobuf:"bytes,2,rep,name=Field2,json=field2" json:"Field2,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *NinNestedStruct) Reset() { *m = NinNestedStruct{} } +func (*NinNestedStruct) ProtoMessage() {} +func (*NinNestedStruct) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{13} } + +type NidOptCustom struct { + Id Uuid `protobuf:"bytes,1,opt,name=Id,json=id,customtype=Uuid" json:"Id"` + Value github_com_gogo_protobuf_test_custom.Uint128 `protobuf:"bytes,2,opt,name=Value,json=value,customtype=github.com/gogo/protobuf/test/custom.Uint128" json:"Value"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *NidOptCustom) Reset() { *m = NidOptCustom{} } +func (*NidOptCustom) ProtoMessage() {} +func (*NidOptCustom) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{14} } + +type CustomDash struct { + Value *github_com_gogo_protobuf_test_custom_dash_type.Bytes `protobuf:"bytes,1,opt,name=Value,json=value,customtype=github.com/gogo/protobuf/test/custom-dash-type.Bytes" json:"Value,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *CustomDash) Reset() { *m = CustomDash{} } +func (*CustomDash) ProtoMessage() {} +func (*CustomDash) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{15} } + +type NinOptCustom struct { + Id *Uuid `protobuf:"bytes,1,opt,name=Id,json=id,customtype=Uuid" json:"Id,omitempty"` + Value *github_com_gogo_protobuf_test_custom.Uint128 `protobuf:"bytes,2,opt,name=Value,json=value,customtype=github.com/gogo/protobuf/test/custom.Uint128" json:"Value,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *NinOptCustom) Reset() { *m = NinOptCustom{} } +func (*NinOptCustom) ProtoMessage() {} +func (*NinOptCustom) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{16} } + +type NidRepCustom struct { + Id []Uuid `protobuf:"bytes,1,rep,name=Id,json=id,customtype=Uuid" json:"Id"` + Value []github_com_gogo_protobuf_test_custom.Uint128 `protobuf:"bytes,2,rep,name=Value,json=value,customtype=github.com/gogo/protobuf/test/custom.Uint128" json:"Value"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *NidRepCustom) Reset() { *m = NidRepCustom{} } +func (*NidRepCustom) ProtoMessage() {} +func (*NidRepCustom) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{17} } + +type NinRepCustom struct { + Id []Uuid `protobuf:"bytes,1,rep,name=Id,json=id,customtype=Uuid" json:"Id,omitempty"` + Value []github_com_gogo_protobuf_test_custom.Uint128 `protobuf:"bytes,2,rep,name=Value,json=value,customtype=github.com/gogo/protobuf/test/custom.Uint128" json:"Value,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *NinRepCustom) Reset() { *m = NinRepCustom{} } +func (*NinRepCustom) ProtoMessage() {} +func (*NinRepCustom) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{18} } + +type NinOptNativeUnion struct { + Field1 *float64 `protobuf:"fixed64,1,opt,name=Field1,json=field1" json:"Field1,omitempty"` + Field2 *float32 `protobuf:"fixed32,2,opt,name=Field2,json=field2" json:"Field2,omitempty"` + Field3 *int32 `protobuf:"varint,3,opt,name=Field3,json=field3" json:"Field3,omitempty"` + Field4 *int64 `protobuf:"varint,4,opt,name=Field4,json=field4" json:"Field4,omitempty"` + Field5 *uint32 `protobuf:"varint,5,opt,name=Field5,json=field5" json:"Field5,omitempty"` + Field6 *uint64 `protobuf:"varint,6,opt,name=Field6,json=field6" json:"Field6,omitempty"` + Field13 *bool `protobuf:"varint,13,opt,name=Field13,json=field13" json:"Field13,omitempty"` + Field14 *string `protobuf:"bytes,14,opt,name=Field14,json=field14" json:"Field14,omitempty"` + Field15 []byte `protobuf:"bytes,15,opt,name=Field15,json=field15" json:"Field15,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *NinOptNativeUnion) Reset() { *m = NinOptNativeUnion{} } +func (*NinOptNativeUnion) ProtoMessage() {} +func (*NinOptNativeUnion) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{19} } + +type NinOptStructUnion struct { + Field1 *float64 `protobuf:"fixed64,1,opt,name=Field1,json=field1" json:"Field1,omitempty"` + Field2 *float32 `protobuf:"fixed32,2,opt,name=Field2,json=field2" json:"Field2,omitempty"` + Field3 *NidOptNative `protobuf:"bytes,3,opt,name=Field3,json=field3" json:"Field3,omitempty"` + Field4 *NinOptNative `protobuf:"bytes,4,opt,name=Field4,json=field4" json:"Field4,omitempty"` + Field6 *uint64 `protobuf:"varint,6,opt,name=Field6,json=field6" json:"Field6,omitempty"` + Field7 *int32 `protobuf:"zigzag32,7,opt,name=Field7,json=field7" json:"Field7,omitempty"` + Field13 *bool `protobuf:"varint,13,opt,name=Field13,json=field13" json:"Field13,omitempty"` + Field14 *string `protobuf:"bytes,14,opt,name=Field14,json=field14" json:"Field14,omitempty"` + Field15 []byte `protobuf:"bytes,15,opt,name=Field15,json=field15" json:"Field15,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *NinOptStructUnion) Reset() { *m = NinOptStructUnion{} } +func (*NinOptStructUnion) ProtoMessage() {} +func (*NinOptStructUnion) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{20} } + +type NinEmbeddedStructUnion struct { + *NidOptNative `protobuf:"bytes,1,opt,name=Field1,json=field1,embedded=Field1" json:"Field1,omitempty"` + Field200 *NinOptNative `protobuf:"bytes,200,opt,name=Field200,json=field200" json:"Field200,omitempty"` + Field210 *bool `protobuf:"varint,210,opt,name=Field210,json=field210" json:"Field210,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *NinEmbeddedStructUnion) Reset() { *m = NinEmbeddedStructUnion{} } +func (*NinEmbeddedStructUnion) ProtoMessage() {} +func (*NinEmbeddedStructUnion) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{21} } + +type NinNestedStructUnion struct { + Field1 *NinOptNativeUnion `protobuf:"bytes,1,opt,name=Field1,json=field1" json:"Field1,omitempty"` + Field2 *NinOptStructUnion `protobuf:"bytes,2,opt,name=Field2,json=field2" json:"Field2,omitempty"` + Field3 *NinEmbeddedStructUnion `protobuf:"bytes,3,opt,name=Field3,json=field3" json:"Field3,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *NinNestedStructUnion) Reset() { *m = NinNestedStructUnion{} } +func (*NinNestedStructUnion) ProtoMessage() {} +func (*NinNestedStructUnion) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{22} } + +type Tree struct { + Or *OrBranch `protobuf:"bytes,1,opt,name=Or,json=or" json:"Or,omitempty"` + And *AndBranch `protobuf:"bytes,2,opt,name=And,json=and" json:"And,omitempty"` + Leaf *Leaf `protobuf:"bytes,3,opt,name=Leaf,json=leaf" json:"Leaf,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *Tree) Reset() { *m = Tree{} } +func (*Tree) ProtoMessage() {} +func (*Tree) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{23} } + +type OrBranch struct { + Left Tree `protobuf:"bytes,1,opt,name=Left,json=left" json:"Left"` + Right Tree `protobuf:"bytes,2,opt,name=Right,json=right" json:"Right"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *OrBranch) Reset() { *m = OrBranch{} } +func (*OrBranch) ProtoMessage() {} +func (*OrBranch) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{24} } + +type AndBranch struct { + Left Tree `protobuf:"bytes,1,opt,name=Left,json=left" json:"Left"` + Right Tree `protobuf:"bytes,2,opt,name=Right,json=right" json:"Right"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *AndBranch) Reset() { *m = AndBranch{} } +func (*AndBranch) ProtoMessage() {} +func (*AndBranch) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{25} } + +type Leaf struct { + Value int64 `protobuf:"varint,1,opt,name=Value,json=value" json:"Value"` + StrValue string `protobuf:"bytes,2,opt,name=StrValue,json=strValue" json:"StrValue"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *Leaf) Reset() { *m = Leaf{} } +func (*Leaf) ProtoMessage() {} +func (*Leaf) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{26} } + +type DeepTree struct { + Down *ADeepBranch `protobuf:"bytes,1,opt,name=Down,json=down" json:"Down,omitempty"` + And *AndDeepBranch `protobuf:"bytes,2,opt,name=And,json=and" json:"And,omitempty"` + Leaf *DeepLeaf `protobuf:"bytes,3,opt,name=Leaf,json=leaf" json:"Leaf,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *DeepTree) Reset() { *m = DeepTree{} } +func (*DeepTree) ProtoMessage() {} +func (*DeepTree) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{27} } + +type ADeepBranch struct { + Down DeepTree `protobuf:"bytes,2,opt,name=Down,json=down" json:"Down"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *ADeepBranch) Reset() { *m = ADeepBranch{} } +func (*ADeepBranch) ProtoMessage() {} +func (*ADeepBranch) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{28} } + +type AndDeepBranch struct { + Left DeepTree `protobuf:"bytes,1,opt,name=Left,json=left" json:"Left"` + Right DeepTree `protobuf:"bytes,2,opt,name=Right,json=right" json:"Right"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *AndDeepBranch) Reset() { *m = AndDeepBranch{} } +func (*AndDeepBranch) ProtoMessage() {} +func (*AndDeepBranch) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{29} } + +type DeepLeaf struct { + Tree Tree `protobuf:"bytes,1,opt,name=Tree,json=tree" json:"Tree"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *DeepLeaf) Reset() { *m = DeepLeaf{} } +func (*DeepLeaf) ProtoMessage() {} +func (*DeepLeaf) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{30} } + +type Nil struct { + XXX_unrecognized []byte `json:"-"` +} + +func (m *Nil) Reset() { *m = Nil{} } +func (*Nil) ProtoMessage() {} +func (*Nil) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{31} } + +type NidOptEnum struct { + Field1 TheTestEnum `protobuf:"varint,1,opt,name=Field1,json=field1,enum=test.TheTestEnum" json:"Field1"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *NidOptEnum) Reset() { *m = NidOptEnum{} } +func (*NidOptEnum) ProtoMessage() {} +func (*NidOptEnum) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{32} } + +type NinOptEnum struct { + Field1 *TheTestEnum `protobuf:"varint,1,opt,name=Field1,json=field1,enum=test.TheTestEnum" json:"Field1,omitempty"` + Field2 *YetAnotherTestEnum `protobuf:"varint,2,opt,name=Field2,json=field2,enum=test.YetAnotherTestEnum" json:"Field2,omitempty"` + Field3 *YetYetAnotherTestEnum `protobuf:"varint,3,opt,name=Field3,json=field3,enum=test.YetYetAnotherTestEnum" json:"Field3,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *NinOptEnum) Reset() { *m = NinOptEnum{} } +func (*NinOptEnum) ProtoMessage() {} +func (*NinOptEnum) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{33} } + +type NidRepEnum struct { + Field1 []TheTestEnum `protobuf:"varint,1,rep,name=Field1,json=field1,enum=test.TheTestEnum" json:"Field1,omitempty"` + Field2 []YetAnotherTestEnum `protobuf:"varint,2,rep,name=Field2,json=field2,enum=test.YetAnotherTestEnum" json:"Field2,omitempty"` + Field3 []YetYetAnotherTestEnum `protobuf:"varint,3,rep,name=Field3,json=field3,enum=test.YetYetAnotherTestEnum" json:"Field3,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *NidRepEnum) Reset() { *m = NidRepEnum{} } +func (*NidRepEnum) ProtoMessage() {} +func (*NidRepEnum) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{34} } + +type NinRepEnum struct { + Field1 []TheTestEnum `protobuf:"varint,1,rep,name=Field1,json=field1,enum=test.TheTestEnum" json:"Field1,omitempty"` + Field2 []YetAnotherTestEnum `protobuf:"varint,2,rep,name=Field2,json=field2,enum=test.YetAnotherTestEnum" json:"Field2,omitempty"` + Field3 []YetYetAnotherTestEnum `protobuf:"varint,3,rep,name=Field3,json=field3,enum=test.YetYetAnotherTestEnum" json:"Field3,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *NinRepEnum) Reset() { *m = NinRepEnum{} } +func (*NinRepEnum) ProtoMessage() {} +func (*NinRepEnum) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{35} } + +type NinOptEnumDefault struct { + Field1 *TheTestEnum `protobuf:"varint,1,opt,name=Field1,json=field1,enum=test.TheTestEnum,def=2" json:"Field1,omitempty"` + Field2 *YetAnotherTestEnum `protobuf:"varint,2,opt,name=Field2,json=field2,enum=test.YetAnotherTestEnum,def=1" json:"Field2,omitempty"` + Field3 *YetYetAnotherTestEnum `protobuf:"varint,3,opt,name=Field3,json=field3,enum=test.YetYetAnotherTestEnum,def=0" json:"Field3,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *NinOptEnumDefault) Reset() { *m = NinOptEnumDefault{} } +func (*NinOptEnumDefault) ProtoMessage() {} +func (*NinOptEnumDefault) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{36} } + +const Default_NinOptEnumDefault_Field1 TheTestEnum = C +const Default_NinOptEnumDefault_Field2 YetAnotherTestEnum = BetterYetBB +const Default_NinOptEnumDefault_Field3 YetYetAnotherTestEnum = YetYetAnotherTestEnum_CC + +func (m *NinOptEnumDefault) GetField1() TheTestEnum { + if m != nil && m.Field1 != nil { + return *m.Field1 + } + return Default_NinOptEnumDefault_Field1 +} + +func (m *NinOptEnumDefault) GetField2() YetAnotherTestEnum { + if m != nil && m.Field2 != nil { + return *m.Field2 + } + return Default_NinOptEnumDefault_Field2 +} + +func (m *NinOptEnumDefault) GetField3() YetYetAnotherTestEnum { + if m != nil && m.Field3 != nil { + return *m.Field3 + } + return Default_NinOptEnumDefault_Field3 +} + +type AnotherNinOptEnum struct { + Field1 *AnotherTestEnum `protobuf:"varint,1,opt,name=Field1,json=field1,enum=test.AnotherTestEnum" json:"Field1,omitempty"` + Field2 *YetAnotherTestEnum `protobuf:"varint,2,opt,name=Field2,json=field2,enum=test.YetAnotherTestEnum" json:"Field2,omitempty"` + Field3 *YetYetAnotherTestEnum `protobuf:"varint,3,opt,name=Field3,json=field3,enum=test.YetYetAnotherTestEnum" json:"Field3,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *AnotherNinOptEnum) Reset() { *m = AnotherNinOptEnum{} } +func (*AnotherNinOptEnum) ProtoMessage() {} +func (*AnotherNinOptEnum) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{37} } + +type AnotherNinOptEnumDefault struct { + Field1 *AnotherTestEnum `protobuf:"varint,1,opt,name=Field1,json=field1,enum=test.AnotherTestEnum,def=11" json:"Field1,omitempty"` + Field2 *YetAnotherTestEnum `protobuf:"varint,2,opt,name=Field2,json=field2,enum=test.YetAnotherTestEnum,def=1" json:"Field2,omitempty"` + Field3 *YetYetAnotherTestEnum `protobuf:"varint,3,opt,name=Field3,json=field3,enum=test.YetYetAnotherTestEnum,def=0" json:"Field3,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *AnotherNinOptEnumDefault) Reset() { *m = AnotherNinOptEnumDefault{} } +func (*AnotherNinOptEnumDefault) ProtoMessage() {} +func (*AnotherNinOptEnumDefault) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{38} } + +const Default_AnotherNinOptEnumDefault_Field1 AnotherTestEnum = E +const Default_AnotherNinOptEnumDefault_Field2 YetAnotherTestEnum = BetterYetBB +const Default_AnotherNinOptEnumDefault_Field3 YetYetAnotherTestEnum = YetYetAnotherTestEnum_CC + +func (m *AnotherNinOptEnumDefault) GetField1() AnotherTestEnum { + if m != nil && m.Field1 != nil { + return *m.Field1 + } + return Default_AnotherNinOptEnumDefault_Field1 +} + +func (m *AnotherNinOptEnumDefault) GetField2() YetAnotherTestEnum { + if m != nil && m.Field2 != nil { + return *m.Field2 + } + return Default_AnotherNinOptEnumDefault_Field2 +} + +func (m *AnotherNinOptEnumDefault) GetField3() YetYetAnotherTestEnum { + if m != nil && m.Field3 != nil { + return *m.Field3 + } + return Default_AnotherNinOptEnumDefault_Field3 +} + +type Timer struct { + Time1 int64 `protobuf:"fixed64,1,opt,name=Time1,json=time1" json:"Time1"` + Time2 int64 `protobuf:"fixed64,2,opt,name=Time2,json=time2" json:"Time2"` + Data []byte `protobuf:"bytes,3,opt,name=Data,json=data" json:"Data"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *Timer) Reset() { *m = Timer{} } +func (*Timer) ProtoMessage() {} +func (*Timer) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{39} } + +type MyExtendable struct { + Field1 *int64 `protobuf:"varint,1,opt,name=Field1,json=field1" json:"Field1,omitempty"` + XXX_extensions map[int32]proto.Extension `json:"-"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *MyExtendable) Reset() { *m = MyExtendable{} } +func (*MyExtendable) ProtoMessage() {} +func (*MyExtendable) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{40} } + +var extRange_MyExtendable = []proto.ExtensionRange{ + {100, 199}, +} + +func (*MyExtendable) ExtensionRangeArray() []proto.ExtensionRange { + return extRange_MyExtendable +} +func (m *MyExtendable) ExtensionMap() map[int32]proto.Extension { + if m.XXX_extensions == nil { + m.XXX_extensions = make(map[int32]proto.Extension) + } + return m.XXX_extensions +} + +type OtherExtenable struct { + Field2 *int64 `protobuf:"varint,2,opt,name=Field2,json=field2" json:"Field2,omitempty"` + Field13 *int64 `protobuf:"varint,13,opt,name=Field13,json=field13" json:"Field13,omitempty"` + M *MyExtendable `protobuf:"bytes,1,opt,name=M,json=m" json:"M,omitempty"` + XXX_extensions map[int32]proto.Extension `json:"-"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *OtherExtenable) Reset() { *m = OtherExtenable{} } +func (*OtherExtenable) ProtoMessage() {} +func (*OtherExtenable) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{41} } + +var extRange_OtherExtenable = []proto.ExtensionRange{ + {14, 16}, + {10, 12}, +} + +func (*OtherExtenable) ExtensionRangeArray() []proto.ExtensionRange { + return extRange_OtherExtenable +} +func (m *OtherExtenable) ExtensionMap() map[int32]proto.Extension { + if m.XXX_extensions == nil { + m.XXX_extensions = make(map[int32]proto.Extension) + } + return m.XXX_extensions +} + +type NestedDefinition struct { + Field1 *int64 `protobuf:"varint,1,opt,name=Field1,json=field1" json:"Field1,omitempty"` + EnumField *NestedDefinition_NestedEnum `protobuf:"varint,2,opt,name=EnumField,json=enumField,enum=test.NestedDefinition_NestedEnum" json:"EnumField,omitempty"` + NNM *NestedDefinition_NestedMessage_NestedNestedMsg `protobuf:"bytes,3,opt,name=NNM,json=nNM" json:"NNM,omitempty"` + NM *NestedDefinition_NestedMessage `protobuf:"bytes,4,opt,name=NM,json=nM" json:"NM,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *NestedDefinition) Reset() { *m = NestedDefinition{} } +func (*NestedDefinition) ProtoMessage() {} +func (*NestedDefinition) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{42} } + +type NestedDefinition_NestedMessage struct { + NestedField1 *uint64 `protobuf:"fixed64,1,opt,name=NestedField1,json=nestedField1" json:"NestedField1,omitempty"` + NNM *NestedDefinition_NestedMessage_NestedNestedMsg `protobuf:"bytes,2,opt,name=NNM,json=nNM" json:"NNM,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *NestedDefinition_NestedMessage) Reset() { *m = NestedDefinition_NestedMessage{} } +func (*NestedDefinition_NestedMessage) ProtoMessage() {} +func (*NestedDefinition_NestedMessage) Descriptor() ([]byte, []int) { + return fileDescriptorThetest, []int{42, 0} +} + +type NestedDefinition_NestedMessage_NestedNestedMsg struct { + NestedNestedField1 *string `protobuf:"bytes,10,opt,name=NestedNestedField1,json=nestedNestedField1" json:"NestedNestedField1,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *NestedDefinition_NestedMessage_NestedNestedMsg) Reset() { + *m = NestedDefinition_NestedMessage_NestedNestedMsg{} +} +func (*NestedDefinition_NestedMessage_NestedNestedMsg) ProtoMessage() {} +func (*NestedDefinition_NestedMessage_NestedNestedMsg) Descriptor() ([]byte, []int) { + return fileDescriptorThetest, []int{42, 0, 0} +} + +type NestedScope struct { + A *NestedDefinition_NestedMessage_NestedNestedMsg `protobuf:"bytes,1,opt,name=A,json=a" json:"A,omitempty"` + B *NestedDefinition_NestedEnum `protobuf:"varint,2,opt,name=B,json=b,enum=test.NestedDefinition_NestedEnum" json:"B,omitempty"` + C *NestedDefinition_NestedMessage `protobuf:"bytes,3,opt,name=C,json=c" json:"C,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *NestedScope) Reset() { *m = NestedScope{} } +func (*NestedScope) ProtoMessage() {} +func (*NestedScope) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{43} } + +type NinOptNativeDefault struct { + Field1 *float64 `protobuf:"fixed64,1,opt,name=Field1,json=field1,def=1234.1234" json:"Field1,omitempty"` + Field2 *float32 `protobuf:"fixed32,2,opt,name=Field2,json=field2,def=1234.1234" json:"Field2,omitempty"` + Field3 *int32 `protobuf:"varint,3,opt,name=Field3,json=field3,def=1234" json:"Field3,omitempty"` + Field4 *int64 `protobuf:"varint,4,opt,name=Field4,json=field4,def=1234" json:"Field4,omitempty"` + Field5 *uint32 `protobuf:"varint,5,opt,name=Field5,json=field5,def=1234" json:"Field5,omitempty"` + Field6 *uint64 `protobuf:"varint,6,opt,name=Field6,json=field6,def=1234" json:"Field6,omitempty"` + Field7 *int32 `protobuf:"zigzag32,7,opt,name=Field7,json=field7,def=1234" json:"Field7,omitempty"` + Field8 *int64 `protobuf:"zigzag64,8,opt,name=Field8,json=field8,def=1234" json:"Field8,omitempty"` + Field9 *uint32 `protobuf:"fixed32,9,opt,name=Field9,json=field9,def=1234" json:"Field9,omitempty"` + Field10 *int32 `protobuf:"fixed32,10,opt,name=Field10,json=field10,def=1234" json:"Field10,omitempty"` + Field11 *uint64 `protobuf:"fixed64,11,opt,name=Field11,json=field11,def=1234" json:"Field11,omitempty"` + Field12 *int64 `protobuf:"fixed64,12,opt,name=Field12,json=field12,def=1234" json:"Field12,omitempty"` + Field13 *bool `protobuf:"varint,13,opt,name=Field13,json=field13,def=1" json:"Field13,omitempty"` + Field14 *string `protobuf:"bytes,14,opt,name=Field14,json=field14,def=1234" json:"Field14,omitempty"` + Field15 []byte `protobuf:"bytes,15,opt,name=Field15,json=field15" json:"Field15,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *NinOptNativeDefault) Reset() { *m = NinOptNativeDefault{} } +func (*NinOptNativeDefault) ProtoMessage() {} +func (*NinOptNativeDefault) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{44} } + +const Default_NinOptNativeDefault_Field1 float64 = 1234.1234 +const Default_NinOptNativeDefault_Field2 float32 = 1234.1234 +const Default_NinOptNativeDefault_Field3 int32 = 1234 +const Default_NinOptNativeDefault_Field4 int64 = 1234 +const Default_NinOptNativeDefault_Field5 uint32 = 1234 +const Default_NinOptNativeDefault_Field6 uint64 = 1234 +const Default_NinOptNativeDefault_Field7 int32 = 1234 +const Default_NinOptNativeDefault_Field8 int64 = 1234 +const Default_NinOptNativeDefault_Field9 uint32 = 1234 +const Default_NinOptNativeDefault_Field10 int32 = 1234 +const Default_NinOptNativeDefault_Field11 uint64 = 1234 +const Default_NinOptNativeDefault_Field12 int64 = 1234 +const Default_NinOptNativeDefault_Field13 bool = true +const Default_NinOptNativeDefault_Field14 string = "1234" + +func (m *NinOptNativeDefault) GetField1() float64 { + if m != nil && m.Field1 != nil { + return *m.Field1 + } + return Default_NinOptNativeDefault_Field1 +} + +func (m *NinOptNativeDefault) GetField2() float32 { + if m != nil && m.Field2 != nil { + return *m.Field2 + } + return Default_NinOptNativeDefault_Field2 +} + +func (m *NinOptNativeDefault) GetField3() int32 { + if m != nil && m.Field3 != nil { + return *m.Field3 + } + return Default_NinOptNativeDefault_Field3 +} + +func (m *NinOptNativeDefault) GetField4() int64 { + if m != nil && m.Field4 != nil { + return *m.Field4 + } + return Default_NinOptNativeDefault_Field4 +} + +func (m *NinOptNativeDefault) GetField5() uint32 { + if m != nil && m.Field5 != nil { + return *m.Field5 + } + return Default_NinOptNativeDefault_Field5 +} + +func (m *NinOptNativeDefault) GetField6() uint64 { + if m != nil && m.Field6 != nil { + return *m.Field6 + } + return Default_NinOptNativeDefault_Field6 +} + +func (m *NinOptNativeDefault) GetField7() int32 { + if m != nil && m.Field7 != nil { + return *m.Field7 + } + return Default_NinOptNativeDefault_Field7 +} + +func (m *NinOptNativeDefault) GetField8() int64 { + if m != nil && m.Field8 != nil { + return *m.Field8 + } + return Default_NinOptNativeDefault_Field8 +} + +func (m *NinOptNativeDefault) GetField9() uint32 { + if m != nil && m.Field9 != nil { + return *m.Field9 + } + return Default_NinOptNativeDefault_Field9 +} + +func (m *NinOptNativeDefault) GetField10() int32 { + if m != nil && m.Field10 != nil { + return *m.Field10 + } + return Default_NinOptNativeDefault_Field10 +} + +func (m *NinOptNativeDefault) GetField11() uint64 { + if m != nil && m.Field11 != nil { + return *m.Field11 + } + return Default_NinOptNativeDefault_Field11 +} + +func (m *NinOptNativeDefault) GetField12() int64 { + if m != nil && m.Field12 != nil { + return *m.Field12 + } + return Default_NinOptNativeDefault_Field12 +} + +func (m *NinOptNativeDefault) GetField13() bool { + if m != nil && m.Field13 != nil { + return *m.Field13 + } + return Default_NinOptNativeDefault_Field13 +} + +func (m *NinOptNativeDefault) GetField14() string { + if m != nil && m.Field14 != nil { + return *m.Field14 + } + return Default_NinOptNativeDefault_Field14 +} + +func (m *NinOptNativeDefault) GetField15() []byte { + if m != nil { + return m.Field15 + } + return nil +} + +type CustomContainer struct { + CustomStruct NidOptCustom `protobuf:"bytes,1,opt,name=CustomStruct,json=customStruct" json:"CustomStruct"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *CustomContainer) Reset() { *m = CustomContainer{} } +func (*CustomContainer) ProtoMessage() {} +func (*CustomContainer) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{45} } + +type CustomNameNidOptNative struct { + FieldA float64 `protobuf:"fixed64,1,opt,name=Field1,json=field1" json:"Field1"` + FieldB float32 `protobuf:"fixed32,2,opt,name=Field2,json=field2" json:"Field2"` + FieldC int32 `protobuf:"varint,3,opt,name=Field3,json=field3" json:"Field3"` + FieldD int64 `protobuf:"varint,4,opt,name=Field4,json=field4" json:"Field4"` + FieldE uint32 `protobuf:"varint,5,opt,name=Field5,json=field5" json:"Field5"` + FieldF uint64 `protobuf:"varint,6,opt,name=Field6,json=field6" json:"Field6"` + FieldG int32 `protobuf:"zigzag32,7,opt,name=Field7,json=field7" json:"Field7"` + FieldH int64 `protobuf:"zigzag64,8,opt,name=Field8,json=field8" json:"Field8"` + FieldI uint32 `protobuf:"fixed32,9,opt,name=Field9,json=field9" json:"Field9"` + FieldJ int32 `protobuf:"fixed32,10,opt,name=Field10,json=field10" json:"Field10"` + FieldK uint64 `protobuf:"fixed64,11,opt,name=Field11,json=field11" json:"Field11"` + FieldL int64 `protobuf:"fixed64,12,opt,name=Field12,json=field12" json:"Field12"` + FieldM bool `protobuf:"varint,13,opt,name=Field13,json=field13" json:"Field13"` + FieldN string `protobuf:"bytes,14,opt,name=Field14,json=field14" json:"Field14"` + FieldO []byte `protobuf:"bytes,15,opt,name=Field15,json=field15" json:"Field15"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *CustomNameNidOptNative) Reset() { *m = CustomNameNidOptNative{} } +func (*CustomNameNidOptNative) ProtoMessage() {} +func (*CustomNameNidOptNative) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{46} } + +type CustomNameNinOptNative struct { + FieldA *float64 `protobuf:"fixed64,1,opt,name=Field1,json=field1" json:"Field1,omitempty"` + FieldB *float32 `protobuf:"fixed32,2,opt,name=Field2,json=field2" json:"Field2,omitempty"` + FieldC *int32 `protobuf:"varint,3,opt,name=Field3,json=field3" json:"Field3,omitempty"` + FieldD *int64 `protobuf:"varint,4,opt,name=Field4,json=field4" json:"Field4,omitempty"` + FieldE *uint32 `protobuf:"varint,5,opt,name=Field5,json=field5" json:"Field5,omitempty"` + FieldF *uint64 `protobuf:"varint,6,opt,name=Field6,json=field6" json:"Field6,omitempty"` + FieldG *int32 `protobuf:"zigzag32,7,opt,name=Field7,json=field7" json:"Field7,omitempty"` + FieldH *int64 `protobuf:"zigzag64,8,opt,name=Field8,json=field8" json:"Field8,omitempty"` + FieldI *uint32 `protobuf:"fixed32,9,opt,name=Field9,json=field9" json:"Field9,omitempty"` + FieldJ *int32 `protobuf:"fixed32,10,opt,name=Field10,json=field10" json:"Field10,omitempty"` + FieldK *uint64 `protobuf:"fixed64,11,opt,name=Field11,json=field11" json:"Field11,omitempty"` + FielL *int64 `protobuf:"fixed64,12,opt,name=Field12,json=field12" json:"Field12,omitempty"` + FieldM *bool `protobuf:"varint,13,opt,name=Field13,json=field13" json:"Field13,omitempty"` + FieldN *string `protobuf:"bytes,14,opt,name=Field14,json=field14" json:"Field14,omitempty"` + FieldO []byte `protobuf:"bytes,15,opt,name=Field15,json=field15" json:"Field15,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *CustomNameNinOptNative) Reset() { *m = CustomNameNinOptNative{} } +func (*CustomNameNinOptNative) ProtoMessage() {} +func (*CustomNameNinOptNative) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{47} } + +type CustomNameNinRepNative struct { + FieldA []float64 `protobuf:"fixed64,1,rep,name=Field1,json=field1" json:"Field1,omitempty"` + FieldB []float32 `protobuf:"fixed32,2,rep,name=Field2,json=field2" json:"Field2,omitempty"` + FieldC []int32 `protobuf:"varint,3,rep,name=Field3,json=field3" json:"Field3,omitempty"` + FieldD []int64 `protobuf:"varint,4,rep,name=Field4,json=field4" json:"Field4,omitempty"` + FieldE []uint32 `protobuf:"varint,5,rep,name=Field5,json=field5" json:"Field5,omitempty"` + FieldF []uint64 `protobuf:"varint,6,rep,name=Field6,json=field6" json:"Field6,omitempty"` + FieldG []int32 `protobuf:"zigzag32,7,rep,name=Field7,json=field7" json:"Field7,omitempty"` + FieldH []int64 `protobuf:"zigzag64,8,rep,name=Field8,json=field8" json:"Field8,omitempty"` + FieldI []uint32 `protobuf:"fixed32,9,rep,name=Field9,json=field9" json:"Field9,omitempty"` + FieldJ []int32 `protobuf:"fixed32,10,rep,name=Field10,json=field10" json:"Field10,omitempty"` + FieldK []uint64 `protobuf:"fixed64,11,rep,name=Field11,json=field11" json:"Field11,omitempty"` + FieldL []int64 `protobuf:"fixed64,12,rep,name=Field12,json=field12" json:"Field12,omitempty"` + FieldM []bool `protobuf:"varint,13,rep,name=Field13,json=field13" json:"Field13,omitempty"` + FieldN []string `protobuf:"bytes,14,rep,name=Field14,json=field14" json:"Field14,omitempty"` + FieldO [][]byte `protobuf:"bytes,15,rep,name=Field15,json=field15" json:"Field15,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *CustomNameNinRepNative) Reset() { *m = CustomNameNinRepNative{} } +func (*CustomNameNinRepNative) ProtoMessage() {} +func (*CustomNameNinRepNative) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{48} } + +type CustomNameNinStruct struct { + FieldA *float64 `protobuf:"fixed64,1,opt,name=Field1,json=field1" json:"Field1,omitempty"` + FieldB *float32 `protobuf:"fixed32,2,opt,name=Field2,json=field2" json:"Field2,omitempty"` + FieldC *NidOptNative `protobuf:"bytes,3,opt,name=Field3,json=field3" json:"Field3,omitempty"` + FieldD []*NinOptNative `protobuf:"bytes,4,rep,name=Field4,json=field4" json:"Field4,omitempty"` + FieldE *uint64 `protobuf:"varint,6,opt,name=Field6,json=field6" json:"Field6,omitempty"` + FieldF *int32 `protobuf:"zigzag32,7,opt,name=Field7,json=field7" json:"Field7,omitempty"` + FieldG *NidOptNative `protobuf:"bytes,8,opt,name=Field8,json=field8" json:"Field8,omitempty"` + FieldH *bool `protobuf:"varint,13,opt,name=Field13,json=field13" json:"Field13,omitempty"` + FieldI *string `protobuf:"bytes,14,opt,name=Field14,json=field14" json:"Field14,omitempty"` + FieldJ []byte `protobuf:"bytes,15,opt,name=Field15,json=field15" json:"Field15,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *CustomNameNinStruct) Reset() { *m = CustomNameNinStruct{} } +func (*CustomNameNinStruct) ProtoMessage() {} +func (*CustomNameNinStruct) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{49} } + +type CustomNameCustomType struct { + FieldA *Uuid `protobuf:"bytes,1,opt,name=Id,json=id,customtype=Uuid" json:"Id,omitempty"` + FieldB *github_com_gogo_protobuf_test_custom.Uint128 `protobuf:"bytes,2,opt,name=Value,json=value,customtype=github.com/gogo/protobuf/test/custom.Uint128" json:"Value,omitempty"` + FieldC []Uuid `protobuf:"bytes,3,rep,name=Ids,json=ids,customtype=Uuid" json:"Ids,omitempty"` + FieldD []github_com_gogo_protobuf_test_custom.Uint128 `protobuf:"bytes,4,rep,name=Values,json=values,customtype=github.com/gogo/protobuf/test/custom.Uint128" json:"Values,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *CustomNameCustomType) Reset() { *m = CustomNameCustomType{} } +func (*CustomNameCustomType) ProtoMessage() {} +func (*CustomNameCustomType) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{50} } + +type CustomNameNinEmbeddedStructUnion struct { + *NidOptNative `protobuf:"bytes,1,opt,name=Field1,json=field1,embedded=Field1" json:"Field1,omitempty"` + FieldA *NinOptNative `protobuf:"bytes,200,opt,name=Field200,json=field200" json:"Field200,omitempty"` + FieldB *bool `protobuf:"varint,210,opt,name=Field210,json=field210" json:"Field210,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *CustomNameNinEmbeddedStructUnion) Reset() { *m = CustomNameNinEmbeddedStructUnion{} } +func (*CustomNameNinEmbeddedStructUnion) ProtoMessage() {} +func (*CustomNameNinEmbeddedStructUnion) Descriptor() ([]byte, []int) { + return fileDescriptorThetest, []int{51} +} + +type CustomNameEnum struct { + FieldA *TheTestEnum `protobuf:"varint,1,opt,name=Field1,json=field1,enum=test.TheTestEnum" json:"Field1,omitempty"` + FieldB []TheTestEnum `protobuf:"varint,2,rep,name=Field2,json=field2,enum=test.TheTestEnum" json:"Field2,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *CustomNameEnum) Reset() { *m = CustomNameEnum{} } +func (*CustomNameEnum) ProtoMessage() {} +func (*CustomNameEnum) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{52} } + +type NoExtensionsMap struct { + Field1 *int64 `protobuf:"varint,1,opt,name=Field1,json=field1" json:"Field1,omitempty"` + XXX_extensions []byte `protobuf:"bytes,0,opt" json:"-"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *NoExtensionsMap) Reset() { *m = NoExtensionsMap{} } +func (*NoExtensionsMap) ProtoMessage() {} +func (*NoExtensionsMap) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{53} } + +var extRange_NoExtensionsMap = []proto.ExtensionRange{ + {100, 199}, +} + +func (*NoExtensionsMap) ExtensionRangeArray() []proto.ExtensionRange { + return extRange_NoExtensionsMap +} +func (m *NoExtensionsMap) GetExtensions() *[]byte { + if m.XXX_extensions == nil { + m.XXX_extensions = make([]byte, 0) + } + return &m.XXX_extensions +} + +type Unrecognized struct { + Field1 *string `protobuf:"bytes,1,opt,name=Field1,json=field1" json:"Field1,omitempty"` +} + +func (m *Unrecognized) Reset() { *m = Unrecognized{} } +func (*Unrecognized) ProtoMessage() {} +func (*Unrecognized) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{54} } + +type UnrecognizedWithInner struct { + Embedded []*UnrecognizedWithInner_Inner `protobuf:"bytes,1,rep,name=embedded" json:"embedded,omitempty"` + Field2 *string `protobuf:"bytes,2,opt,name=Field2,json=field2" json:"Field2,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *UnrecognizedWithInner) Reset() { *m = UnrecognizedWithInner{} } +func (*UnrecognizedWithInner) ProtoMessage() {} +func (*UnrecognizedWithInner) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{55} } + +type UnrecognizedWithInner_Inner struct { + Field1 *uint32 `protobuf:"varint,1,opt,name=Field1,json=field1" json:"Field1,omitempty"` +} + +func (m *UnrecognizedWithInner_Inner) Reset() { *m = UnrecognizedWithInner_Inner{} } +func (*UnrecognizedWithInner_Inner) ProtoMessage() {} +func (*UnrecognizedWithInner_Inner) Descriptor() ([]byte, []int) { + return fileDescriptorThetest, []int{55, 0} +} + +type UnrecognizedWithEmbed struct { + UnrecognizedWithEmbed_Embedded `protobuf:"bytes,1,opt,name=embedded,embedded=embedded" json:"embedded"` + Field2 *string `protobuf:"bytes,2,opt,name=Field2,json=field2" json:"Field2,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *UnrecognizedWithEmbed) Reset() { *m = UnrecognizedWithEmbed{} } +func (*UnrecognizedWithEmbed) ProtoMessage() {} +func (*UnrecognizedWithEmbed) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{56} } + +type UnrecognizedWithEmbed_Embedded struct { + Field1 *uint32 `protobuf:"varint,1,opt,name=Field1,json=field1" json:"Field1,omitempty"` +} + +func (m *UnrecognizedWithEmbed_Embedded) Reset() { *m = UnrecognizedWithEmbed_Embedded{} } +func (*UnrecognizedWithEmbed_Embedded) ProtoMessage() {} +func (*UnrecognizedWithEmbed_Embedded) Descriptor() ([]byte, []int) { + return fileDescriptorThetest, []int{56, 0} +} + +type Node struct { + Label *string `protobuf:"bytes,1,opt,name=Label,json=label" json:"Label,omitempty"` + Children []*Node `protobuf:"bytes,2,rep,name=Children,json=children" json:"Children,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *Node) Reset() { *m = Node{} } +func (*Node) ProtoMessage() {} +func (*Node) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{57} } + +var E_FieldA = &proto.ExtensionDesc{ + ExtendedType: (*MyExtendable)(nil), + ExtensionType: (*float64)(nil), + Field: 100, + Name: "test.FieldA", + Tag: "fixed64,100,opt,name=FieldA,json=fieldA", +} + +var E_FieldB = &proto.ExtensionDesc{ + ExtendedType: (*MyExtendable)(nil), + ExtensionType: (*NinOptNative)(nil), + Field: 101, + Name: "test.FieldB", + Tag: "bytes,101,opt,name=FieldB,json=fieldB", +} + +var E_FieldC = &proto.ExtensionDesc{ + ExtendedType: (*MyExtendable)(nil), + ExtensionType: (*NinEmbeddedStruct)(nil), + Field: 102, + Name: "test.FieldC", + Tag: "bytes,102,opt,name=FieldC,json=fieldC", +} + +var E_FieldD = &proto.ExtensionDesc{ + ExtendedType: (*MyExtendable)(nil), + ExtensionType: ([]int64)(nil), + Field: 104, + Name: "test.FieldD", + Tag: "varint,104,rep,name=FieldD,json=fieldD", +} + +var E_FieldE = &proto.ExtensionDesc{ + ExtendedType: (*MyExtendable)(nil), + ExtensionType: ([]*NinOptNative)(nil), + Field: 105, + Name: "test.FieldE", + Tag: "bytes,105,rep,name=FieldE,json=fieldE", +} + +var E_FieldA1 = &proto.ExtensionDesc{ + ExtendedType: (*NoExtensionsMap)(nil), + ExtensionType: (*float64)(nil), + Field: 100, + Name: "test.FieldA1", + Tag: "fixed64,100,opt,name=FieldA1,json=fieldA1", +} + +var E_FieldB1 = &proto.ExtensionDesc{ + ExtendedType: (*NoExtensionsMap)(nil), + ExtensionType: (*NinOptNative)(nil), + Field: 101, + Name: "test.FieldB1", + Tag: "bytes,101,opt,name=FieldB1,json=fieldB1", +} + +var E_FieldC1 = &proto.ExtensionDesc{ + ExtendedType: (*NoExtensionsMap)(nil), + ExtensionType: (*NinEmbeddedStruct)(nil), + Field: 102, + Name: "test.FieldC1", + Tag: "bytes,102,opt,name=FieldC1,json=fieldC1", +} + +func init() { + proto.RegisterType((*NidOptNative)(nil), "test.NidOptNative") + proto.RegisterType((*NinOptNative)(nil), "test.NinOptNative") + proto.RegisterType((*NidRepNative)(nil), "test.NidRepNative") + proto.RegisterType((*NinRepNative)(nil), "test.NinRepNative") + proto.RegisterType((*NidRepPackedNative)(nil), "test.NidRepPackedNative") + proto.RegisterType((*NinRepPackedNative)(nil), "test.NinRepPackedNative") + proto.RegisterType((*NidOptStruct)(nil), "test.NidOptStruct") + proto.RegisterType((*NinOptStruct)(nil), "test.NinOptStruct") + proto.RegisterType((*NidRepStruct)(nil), "test.NidRepStruct") + proto.RegisterType((*NinRepStruct)(nil), "test.NinRepStruct") + proto.RegisterType((*NidEmbeddedStruct)(nil), "test.NidEmbeddedStruct") + proto.RegisterType((*NinEmbeddedStruct)(nil), "test.NinEmbeddedStruct") + proto.RegisterType((*NidNestedStruct)(nil), "test.NidNestedStruct") + proto.RegisterType((*NinNestedStruct)(nil), "test.NinNestedStruct") + proto.RegisterType((*NidOptCustom)(nil), "test.NidOptCustom") + proto.RegisterType((*CustomDash)(nil), "test.CustomDash") + proto.RegisterType((*NinOptCustom)(nil), "test.NinOptCustom") + proto.RegisterType((*NidRepCustom)(nil), "test.NidRepCustom") + proto.RegisterType((*NinRepCustom)(nil), "test.NinRepCustom") + proto.RegisterType((*NinOptNativeUnion)(nil), "test.NinOptNativeUnion") + proto.RegisterType((*NinOptStructUnion)(nil), "test.NinOptStructUnion") + proto.RegisterType((*NinEmbeddedStructUnion)(nil), "test.NinEmbeddedStructUnion") + proto.RegisterType((*NinNestedStructUnion)(nil), "test.NinNestedStructUnion") + proto.RegisterType((*Tree)(nil), "test.Tree") + proto.RegisterType((*OrBranch)(nil), "test.OrBranch") + proto.RegisterType((*AndBranch)(nil), "test.AndBranch") + proto.RegisterType((*Leaf)(nil), "test.Leaf") + proto.RegisterType((*DeepTree)(nil), "test.DeepTree") + proto.RegisterType((*ADeepBranch)(nil), "test.ADeepBranch") + proto.RegisterType((*AndDeepBranch)(nil), "test.AndDeepBranch") + proto.RegisterType((*DeepLeaf)(nil), "test.DeepLeaf") + proto.RegisterType((*Nil)(nil), "test.Nil") + proto.RegisterType((*NidOptEnum)(nil), "test.NidOptEnum") + proto.RegisterType((*NinOptEnum)(nil), "test.NinOptEnum") + proto.RegisterType((*NidRepEnum)(nil), "test.NidRepEnum") + proto.RegisterType((*NinRepEnum)(nil), "test.NinRepEnum") + proto.RegisterType((*NinOptEnumDefault)(nil), "test.NinOptEnumDefault") + proto.RegisterType((*AnotherNinOptEnum)(nil), "test.AnotherNinOptEnum") + proto.RegisterType((*AnotherNinOptEnumDefault)(nil), "test.AnotherNinOptEnumDefault") + proto.RegisterType((*Timer)(nil), "test.Timer") + proto.RegisterType((*MyExtendable)(nil), "test.MyExtendable") + proto.RegisterType((*OtherExtenable)(nil), "test.OtherExtenable") + proto.RegisterType((*NestedDefinition)(nil), "test.NestedDefinition") + proto.RegisterType((*NestedDefinition_NestedMessage)(nil), "test.NestedDefinition.NestedMessage") + proto.RegisterType((*NestedDefinition_NestedMessage_NestedNestedMsg)(nil), "test.NestedDefinition.NestedMessage.NestedNestedMsg") + proto.RegisterType((*NestedScope)(nil), "test.NestedScope") + proto.RegisterType((*NinOptNativeDefault)(nil), "test.NinOptNativeDefault") + proto.RegisterType((*CustomContainer)(nil), "test.CustomContainer") + proto.RegisterType((*CustomNameNidOptNative)(nil), "test.CustomNameNidOptNative") + proto.RegisterType((*CustomNameNinOptNative)(nil), "test.CustomNameNinOptNative") + proto.RegisterType((*CustomNameNinRepNative)(nil), "test.CustomNameNinRepNative") + proto.RegisterType((*CustomNameNinStruct)(nil), "test.CustomNameNinStruct") + proto.RegisterType((*CustomNameCustomType)(nil), "test.CustomNameCustomType") + proto.RegisterType((*CustomNameNinEmbeddedStructUnion)(nil), "test.CustomNameNinEmbeddedStructUnion") + proto.RegisterType((*CustomNameEnum)(nil), "test.CustomNameEnum") + proto.RegisterType((*NoExtensionsMap)(nil), "test.NoExtensionsMap") + proto.RegisterType((*Unrecognized)(nil), "test.Unrecognized") + proto.RegisterType((*UnrecognizedWithInner)(nil), "test.UnrecognizedWithInner") + proto.RegisterType((*UnrecognizedWithInner_Inner)(nil), "test.UnrecognizedWithInner.Inner") + proto.RegisterType((*UnrecognizedWithEmbed)(nil), "test.UnrecognizedWithEmbed") + proto.RegisterType((*UnrecognizedWithEmbed_Embedded)(nil), "test.UnrecognizedWithEmbed.Embedded") + proto.RegisterType((*Node)(nil), "test.Node") + proto.RegisterEnum("test.TheTestEnum", TheTestEnum_name, TheTestEnum_value) + proto.RegisterEnum("test.AnotherTestEnum", AnotherTestEnum_name, AnotherTestEnum_value) + proto.RegisterEnum("test.YetAnotherTestEnum", YetAnotherTestEnum_name, YetAnotherTestEnum_value) + proto.RegisterEnum("test.YetYetAnotherTestEnum", YetYetAnotherTestEnum_name, YetYetAnotherTestEnum_value) + proto.RegisterEnum("test.NestedDefinition_NestedEnum", NestedDefinition_NestedEnum_name, NestedDefinition_NestedEnum_value) + proto.RegisterExtension(E_FieldA) + proto.RegisterExtension(E_FieldB) + proto.RegisterExtension(E_FieldC) + proto.RegisterExtension(E_FieldD) + proto.RegisterExtension(E_FieldE) + proto.RegisterExtension(E_FieldA1) + proto.RegisterExtension(E_FieldB1) + proto.RegisterExtension(E_FieldC1) +} +func (this *NidOptNative) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NidOptNative) + if !ok { + that2, ok := that.(NidOptNative) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.Field1 != that1.Field1 { + if this.Field1 < that1.Field1 { + return -1 + } + return 1 + } + if this.Field2 != that1.Field2 { + if this.Field2 < that1.Field2 { + return -1 + } + return 1 + } + if this.Field3 != that1.Field3 { + if this.Field3 < that1.Field3 { + return -1 + } + return 1 + } + if this.Field4 != that1.Field4 { + if this.Field4 < that1.Field4 { + return -1 + } + return 1 + } + if this.Field5 != that1.Field5 { + if this.Field5 < that1.Field5 { + return -1 + } + return 1 + } + if this.Field6 != that1.Field6 { + if this.Field6 < that1.Field6 { + return -1 + } + return 1 + } + if this.Field7 != that1.Field7 { + if this.Field7 < that1.Field7 { + return -1 + } + return 1 + } + if this.Field8 != that1.Field8 { + if this.Field8 < that1.Field8 { + return -1 + } + return 1 + } + if this.Field9 != that1.Field9 { + if this.Field9 < that1.Field9 { + return -1 + } + return 1 + } + if this.Field10 != that1.Field10 { + if this.Field10 < that1.Field10 { + return -1 + } + return 1 + } + if this.Field11 != that1.Field11 { + if this.Field11 < that1.Field11 { + return -1 + } + return 1 + } + if this.Field12 != that1.Field12 { + if this.Field12 < that1.Field12 { + return -1 + } + return 1 + } + if this.Field13 != that1.Field13 { + if !this.Field13 { + return -1 + } + return 1 + } + if this.Field14 != that1.Field14 { + if this.Field14 < that1.Field14 { + return -1 + } + return 1 + } + if c := bytes.Compare(this.Field15, that1.Field15); c != 0 { + return c + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NinOptNative) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NinOptNative) + if !ok { + that2, ok := that.(NinOptNative) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + if *this.Field1 < *that1.Field1 { + return -1 + } + return 1 + } + } else if this.Field1 != nil { + return 1 + } else if that1.Field1 != nil { + return -1 + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + if *this.Field2 < *that1.Field2 { + return -1 + } + return 1 + } + } else if this.Field2 != nil { + return 1 + } else if that1.Field2 != nil { + return -1 + } + if this.Field3 != nil && that1.Field3 != nil { + if *this.Field3 != *that1.Field3 { + if *this.Field3 < *that1.Field3 { + return -1 + } + return 1 + } + } else if this.Field3 != nil { + return 1 + } else if that1.Field3 != nil { + return -1 + } + if this.Field4 != nil && that1.Field4 != nil { + if *this.Field4 != *that1.Field4 { + if *this.Field4 < *that1.Field4 { + return -1 + } + return 1 + } + } else if this.Field4 != nil { + return 1 + } else if that1.Field4 != nil { + return -1 + } + if this.Field5 != nil && that1.Field5 != nil { + if *this.Field5 != *that1.Field5 { + if *this.Field5 < *that1.Field5 { + return -1 + } + return 1 + } + } else if this.Field5 != nil { + return 1 + } else if that1.Field5 != nil { + return -1 + } + if this.Field6 != nil && that1.Field6 != nil { + if *this.Field6 != *that1.Field6 { + if *this.Field6 < *that1.Field6 { + return -1 + } + return 1 + } + } else if this.Field6 != nil { + return 1 + } else if that1.Field6 != nil { + return -1 + } + if this.Field7 != nil && that1.Field7 != nil { + if *this.Field7 != *that1.Field7 { + if *this.Field7 < *that1.Field7 { + return -1 + } + return 1 + } + } else if this.Field7 != nil { + return 1 + } else if that1.Field7 != nil { + return -1 + } + if this.Field8 != nil && that1.Field8 != nil { + if *this.Field8 != *that1.Field8 { + if *this.Field8 < *that1.Field8 { + return -1 + } + return 1 + } + } else if this.Field8 != nil { + return 1 + } else if that1.Field8 != nil { + return -1 + } + if this.Field9 != nil && that1.Field9 != nil { + if *this.Field9 != *that1.Field9 { + if *this.Field9 < *that1.Field9 { + return -1 + } + return 1 + } + } else if this.Field9 != nil { + return 1 + } else if that1.Field9 != nil { + return -1 + } + if this.Field10 != nil && that1.Field10 != nil { + if *this.Field10 != *that1.Field10 { + if *this.Field10 < *that1.Field10 { + return -1 + } + return 1 + } + } else if this.Field10 != nil { + return 1 + } else if that1.Field10 != nil { + return -1 + } + if this.Field11 != nil && that1.Field11 != nil { + if *this.Field11 != *that1.Field11 { + if *this.Field11 < *that1.Field11 { + return -1 + } + return 1 + } + } else if this.Field11 != nil { + return 1 + } else if that1.Field11 != nil { + return -1 + } + if this.Field12 != nil && that1.Field12 != nil { + if *this.Field12 != *that1.Field12 { + if *this.Field12 < *that1.Field12 { + return -1 + } + return 1 + } + } else if this.Field12 != nil { + return 1 + } else if that1.Field12 != nil { + return -1 + } + if this.Field13 != nil && that1.Field13 != nil { + if *this.Field13 != *that1.Field13 { + if !*this.Field13 { + return -1 + } + return 1 + } + } else if this.Field13 != nil { + return 1 + } else if that1.Field13 != nil { + return -1 + } + if this.Field14 != nil && that1.Field14 != nil { + if *this.Field14 != *that1.Field14 { + if *this.Field14 < *that1.Field14 { + return -1 + } + return 1 + } + } else if this.Field14 != nil { + return 1 + } else if that1.Field14 != nil { + return -1 + } + if c := bytes.Compare(this.Field15, that1.Field15); c != 0 { + return c + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NidRepNative) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NidRepNative) + if !ok { + that2, ok := that.(NidRepNative) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if len(this.Field1) != len(that1.Field1) { + if len(this.Field1) < len(that1.Field1) { + return -1 + } + return 1 + } + for i := range this.Field1 { + if this.Field1[i] != that1.Field1[i] { + if this.Field1[i] < that1.Field1[i] { + return -1 + } + return 1 + } + } + if len(this.Field2) != len(that1.Field2) { + if len(this.Field2) < len(that1.Field2) { + return -1 + } + return 1 + } + for i := range this.Field2 { + if this.Field2[i] != that1.Field2[i] { + if this.Field2[i] < that1.Field2[i] { + return -1 + } + return 1 + } + } + if len(this.Field3) != len(that1.Field3) { + if len(this.Field3) < len(that1.Field3) { + return -1 + } + return 1 + } + for i := range this.Field3 { + if this.Field3[i] != that1.Field3[i] { + if this.Field3[i] < that1.Field3[i] { + return -1 + } + return 1 + } + } + if len(this.Field4) != len(that1.Field4) { + if len(this.Field4) < len(that1.Field4) { + return -1 + } + return 1 + } + for i := range this.Field4 { + if this.Field4[i] != that1.Field4[i] { + if this.Field4[i] < that1.Field4[i] { + return -1 + } + return 1 + } + } + if len(this.Field5) != len(that1.Field5) { + if len(this.Field5) < len(that1.Field5) { + return -1 + } + return 1 + } + for i := range this.Field5 { + if this.Field5[i] != that1.Field5[i] { + if this.Field5[i] < that1.Field5[i] { + return -1 + } + return 1 + } + } + if len(this.Field6) != len(that1.Field6) { + if len(this.Field6) < len(that1.Field6) { + return -1 + } + return 1 + } + for i := range this.Field6 { + if this.Field6[i] != that1.Field6[i] { + if this.Field6[i] < that1.Field6[i] { + return -1 + } + return 1 + } + } + if len(this.Field7) != len(that1.Field7) { + if len(this.Field7) < len(that1.Field7) { + return -1 + } + return 1 + } + for i := range this.Field7 { + if this.Field7[i] != that1.Field7[i] { + if this.Field7[i] < that1.Field7[i] { + return -1 + } + return 1 + } + } + if len(this.Field8) != len(that1.Field8) { + if len(this.Field8) < len(that1.Field8) { + return -1 + } + return 1 + } + for i := range this.Field8 { + if this.Field8[i] != that1.Field8[i] { + if this.Field8[i] < that1.Field8[i] { + return -1 + } + return 1 + } + } + if len(this.Field9) != len(that1.Field9) { + if len(this.Field9) < len(that1.Field9) { + return -1 + } + return 1 + } + for i := range this.Field9 { + if this.Field9[i] != that1.Field9[i] { + if this.Field9[i] < that1.Field9[i] { + return -1 + } + return 1 + } + } + if len(this.Field10) != len(that1.Field10) { + if len(this.Field10) < len(that1.Field10) { + return -1 + } + return 1 + } + for i := range this.Field10 { + if this.Field10[i] != that1.Field10[i] { + if this.Field10[i] < that1.Field10[i] { + return -1 + } + return 1 + } + } + if len(this.Field11) != len(that1.Field11) { + if len(this.Field11) < len(that1.Field11) { + return -1 + } + return 1 + } + for i := range this.Field11 { + if this.Field11[i] != that1.Field11[i] { + if this.Field11[i] < that1.Field11[i] { + return -1 + } + return 1 + } + } + if len(this.Field12) != len(that1.Field12) { + if len(this.Field12) < len(that1.Field12) { + return -1 + } + return 1 + } + for i := range this.Field12 { + if this.Field12[i] != that1.Field12[i] { + if this.Field12[i] < that1.Field12[i] { + return -1 + } + return 1 + } + } + if len(this.Field13) != len(that1.Field13) { + if len(this.Field13) < len(that1.Field13) { + return -1 + } + return 1 + } + for i := range this.Field13 { + if this.Field13[i] != that1.Field13[i] { + if !this.Field13[i] { + return -1 + } + return 1 + } + } + if len(this.Field14) != len(that1.Field14) { + if len(this.Field14) < len(that1.Field14) { + return -1 + } + return 1 + } + for i := range this.Field14 { + if this.Field14[i] != that1.Field14[i] { + if this.Field14[i] < that1.Field14[i] { + return -1 + } + return 1 + } + } + if len(this.Field15) != len(that1.Field15) { + if len(this.Field15) < len(that1.Field15) { + return -1 + } + return 1 + } + for i := range this.Field15 { + if c := bytes.Compare(this.Field15[i], that1.Field15[i]); c != 0 { + return c + } + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NinRepNative) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NinRepNative) + if !ok { + that2, ok := that.(NinRepNative) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if len(this.Field1) != len(that1.Field1) { + if len(this.Field1) < len(that1.Field1) { + return -1 + } + return 1 + } + for i := range this.Field1 { + if this.Field1[i] != that1.Field1[i] { + if this.Field1[i] < that1.Field1[i] { + return -1 + } + return 1 + } + } + if len(this.Field2) != len(that1.Field2) { + if len(this.Field2) < len(that1.Field2) { + return -1 + } + return 1 + } + for i := range this.Field2 { + if this.Field2[i] != that1.Field2[i] { + if this.Field2[i] < that1.Field2[i] { + return -1 + } + return 1 + } + } + if len(this.Field3) != len(that1.Field3) { + if len(this.Field3) < len(that1.Field3) { + return -1 + } + return 1 + } + for i := range this.Field3 { + if this.Field3[i] != that1.Field3[i] { + if this.Field3[i] < that1.Field3[i] { + return -1 + } + return 1 + } + } + if len(this.Field4) != len(that1.Field4) { + if len(this.Field4) < len(that1.Field4) { + return -1 + } + return 1 + } + for i := range this.Field4 { + if this.Field4[i] != that1.Field4[i] { + if this.Field4[i] < that1.Field4[i] { + return -1 + } + return 1 + } + } + if len(this.Field5) != len(that1.Field5) { + if len(this.Field5) < len(that1.Field5) { + return -1 + } + return 1 + } + for i := range this.Field5 { + if this.Field5[i] != that1.Field5[i] { + if this.Field5[i] < that1.Field5[i] { + return -1 + } + return 1 + } + } + if len(this.Field6) != len(that1.Field6) { + if len(this.Field6) < len(that1.Field6) { + return -1 + } + return 1 + } + for i := range this.Field6 { + if this.Field6[i] != that1.Field6[i] { + if this.Field6[i] < that1.Field6[i] { + return -1 + } + return 1 + } + } + if len(this.Field7) != len(that1.Field7) { + if len(this.Field7) < len(that1.Field7) { + return -1 + } + return 1 + } + for i := range this.Field7 { + if this.Field7[i] != that1.Field7[i] { + if this.Field7[i] < that1.Field7[i] { + return -1 + } + return 1 + } + } + if len(this.Field8) != len(that1.Field8) { + if len(this.Field8) < len(that1.Field8) { + return -1 + } + return 1 + } + for i := range this.Field8 { + if this.Field8[i] != that1.Field8[i] { + if this.Field8[i] < that1.Field8[i] { + return -1 + } + return 1 + } + } + if len(this.Field9) != len(that1.Field9) { + if len(this.Field9) < len(that1.Field9) { + return -1 + } + return 1 + } + for i := range this.Field9 { + if this.Field9[i] != that1.Field9[i] { + if this.Field9[i] < that1.Field9[i] { + return -1 + } + return 1 + } + } + if len(this.Field10) != len(that1.Field10) { + if len(this.Field10) < len(that1.Field10) { + return -1 + } + return 1 + } + for i := range this.Field10 { + if this.Field10[i] != that1.Field10[i] { + if this.Field10[i] < that1.Field10[i] { + return -1 + } + return 1 + } + } + if len(this.Field11) != len(that1.Field11) { + if len(this.Field11) < len(that1.Field11) { + return -1 + } + return 1 + } + for i := range this.Field11 { + if this.Field11[i] != that1.Field11[i] { + if this.Field11[i] < that1.Field11[i] { + return -1 + } + return 1 + } + } + if len(this.Field12) != len(that1.Field12) { + if len(this.Field12) < len(that1.Field12) { + return -1 + } + return 1 + } + for i := range this.Field12 { + if this.Field12[i] != that1.Field12[i] { + if this.Field12[i] < that1.Field12[i] { + return -1 + } + return 1 + } + } + if len(this.Field13) != len(that1.Field13) { + if len(this.Field13) < len(that1.Field13) { + return -1 + } + return 1 + } + for i := range this.Field13 { + if this.Field13[i] != that1.Field13[i] { + if !this.Field13[i] { + return -1 + } + return 1 + } + } + if len(this.Field14) != len(that1.Field14) { + if len(this.Field14) < len(that1.Field14) { + return -1 + } + return 1 + } + for i := range this.Field14 { + if this.Field14[i] != that1.Field14[i] { + if this.Field14[i] < that1.Field14[i] { + return -1 + } + return 1 + } + } + if len(this.Field15) != len(that1.Field15) { + if len(this.Field15) < len(that1.Field15) { + return -1 + } + return 1 + } + for i := range this.Field15 { + if c := bytes.Compare(this.Field15[i], that1.Field15[i]); c != 0 { + return c + } + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NidRepPackedNative) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NidRepPackedNative) + if !ok { + that2, ok := that.(NidRepPackedNative) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if len(this.Field1) != len(that1.Field1) { + if len(this.Field1) < len(that1.Field1) { + return -1 + } + return 1 + } + for i := range this.Field1 { + if this.Field1[i] != that1.Field1[i] { + if this.Field1[i] < that1.Field1[i] { + return -1 + } + return 1 + } + } + if len(this.Field2) != len(that1.Field2) { + if len(this.Field2) < len(that1.Field2) { + return -1 + } + return 1 + } + for i := range this.Field2 { + if this.Field2[i] != that1.Field2[i] { + if this.Field2[i] < that1.Field2[i] { + return -1 + } + return 1 + } + } + if len(this.Field3) != len(that1.Field3) { + if len(this.Field3) < len(that1.Field3) { + return -1 + } + return 1 + } + for i := range this.Field3 { + if this.Field3[i] != that1.Field3[i] { + if this.Field3[i] < that1.Field3[i] { + return -1 + } + return 1 + } + } + if len(this.Field4) != len(that1.Field4) { + if len(this.Field4) < len(that1.Field4) { + return -1 + } + return 1 + } + for i := range this.Field4 { + if this.Field4[i] != that1.Field4[i] { + if this.Field4[i] < that1.Field4[i] { + return -1 + } + return 1 + } + } + if len(this.Field5) != len(that1.Field5) { + if len(this.Field5) < len(that1.Field5) { + return -1 + } + return 1 + } + for i := range this.Field5 { + if this.Field5[i] != that1.Field5[i] { + if this.Field5[i] < that1.Field5[i] { + return -1 + } + return 1 + } + } + if len(this.Field6) != len(that1.Field6) { + if len(this.Field6) < len(that1.Field6) { + return -1 + } + return 1 + } + for i := range this.Field6 { + if this.Field6[i] != that1.Field6[i] { + if this.Field6[i] < that1.Field6[i] { + return -1 + } + return 1 + } + } + if len(this.Field7) != len(that1.Field7) { + if len(this.Field7) < len(that1.Field7) { + return -1 + } + return 1 + } + for i := range this.Field7 { + if this.Field7[i] != that1.Field7[i] { + if this.Field7[i] < that1.Field7[i] { + return -1 + } + return 1 + } + } + if len(this.Field8) != len(that1.Field8) { + if len(this.Field8) < len(that1.Field8) { + return -1 + } + return 1 + } + for i := range this.Field8 { + if this.Field8[i] != that1.Field8[i] { + if this.Field8[i] < that1.Field8[i] { + return -1 + } + return 1 + } + } + if len(this.Field9) != len(that1.Field9) { + if len(this.Field9) < len(that1.Field9) { + return -1 + } + return 1 + } + for i := range this.Field9 { + if this.Field9[i] != that1.Field9[i] { + if this.Field9[i] < that1.Field9[i] { + return -1 + } + return 1 + } + } + if len(this.Field10) != len(that1.Field10) { + if len(this.Field10) < len(that1.Field10) { + return -1 + } + return 1 + } + for i := range this.Field10 { + if this.Field10[i] != that1.Field10[i] { + if this.Field10[i] < that1.Field10[i] { + return -1 + } + return 1 + } + } + if len(this.Field11) != len(that1.Field11) { + if len(this.Field11) < len(that1.Field11) { + return -1 + } + return 1 + } + for i := range this.Field11 { + if this.Field11[i] != that1.Field11[i] { + if this.Field11[i] < that1.Field11[i] { + return -1 + } + return 1 + } + } + if len(this.Field12) != len(that1.Field12) { + if len(this.Field12) < len(that1.Field12) { + return -1 + } + return 1 + } + for i := range this.Field12 { + if this.Field12[i] != that1.Field12[i] { + if this.Field12[i] < that1.Field12[i] { + return -1 + } + return 1 + } + } + if len(this.Field13) != len(that1.Field13) { + if len(this.Field13) < len(that1.Field13) { + return -1 + } + return 1 + } + for i := range this.Field13 { + if this.Field13[i] != that1.Field13[i] { + if !this.Field13[i] { + return -1 + } + return 1 + } + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NinRepPackedNative) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NinRepPackedNative) + if !ok { + that2, ok := that.(NinRepPackedNative) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if len(this.Field1) != len(that1.Field1) { + if len(this.Field1) < len(that1.Field1) { + return -1 + } + return 1 + } + for i := range this.Field1 { + if this.Field1[i] != that1.Field1[i] { + if this.Field1[i] < that1.Field1[i] { + return -1 + } + return 1 + } + } + if len(this.Field2) != len(that1.Field2) { + if len(this.Field2) < len(that1.Field2) { + return -1 + } + return 1 + } + for i := range this.Field2 { + if this.Field2[i] != that1.Field2[i] { + if this.Field2[i] < that1.Field2[i] { + return -1 + } + return 1 + } + } + if len(this.Field3) != len(that1.Field3) { + if len(this.Field3) < len(that1.Field3) { + return -1 + } + return 1 + } + for i := range this.Field3 { + if this.Field3[i] != that1.Field3[i] { + if this.Field3[i] < that1.Field3[i] { + return -1 + } + return 1 + } + } + if len(this.Field4) != len(that1.Field4) { + if len(this.Field4) < len(that1.Field4) { + return -1 + } + return 1 + } + for i := range this.Field4 { + if this.Field4[i] != that1.Field4[i] { + if this.Field4[i] < that1.Field4[i] { + return -1 + } + return 1 + } + } + if len(this.Field5) != len(that1.Field5) { + if len(this.Field5) < len(that1.Field5) { + return -1 + } + return 1 + } + for i := range this.Field5 { + if this.Field5[i] != that1.Field5[i] { + if this.Field5[i] < that1.Field5[i] { + return -1 + } + return 1 + } + } + if len(this.Field6) != len(that1.Field6) { + if len(this.Field6) < len(that1.Field6) { + return -1 + } + return 1 + } + for i := range this.Field6 { + if this.Field6[i] != that1.Field6[i] { + if this.Field6[i] < that1.Field6[i] { + return -1 + } + return 1 + } + } + if len(this.Field7) != len(that1.Field7) { + if len(this.Field7) < len(that1.Field7) { + return -1 + } + return 1 + } + for i := range this.Field7 { + if this.Field7[i] != that1.Field7[i] { + if this.Field7[i] < that1.Field7[i] { + return -1 + } + return 1 + } + } + if len(this.Field8) != len(that1.Field8) { + if len(this.Field8) < len(that1.Field8) { + return -1 + } + return 1 + } + for i := range this.Field8 { + if this.Field8[i] != that1.Field8[i] { + if this.Field8[i] < that1.Field8[i] { + return -1 + } + return 1 + } + } + if len(this.Field9) != len(that1.Field9) { + if len(this.Field9) < len(that1.Field9) { + return -1 + } + return 1 + } + for i := range this.Field9 { + if this.Field9[i] != that1.Field9[i] { + if this.Field9[i] < that1.Field9[i] { + return -1 + } + return 1 + } + } + if len(this.Field10) != len(that1.Field10) { + if len(this.Field10) < len(that1.Field10) { + return -1 + } + return 1 + } + for i := range this.Field10 { + if this.Field10[i] != that1.Field10[i] { + if this.Field10[i] < that1.Field10[i] { + return -1 + } + return 1 + } + } + if len(this.Field11) != len(that1.Field11) { + if len(this.Field11) < len(that1.Field11) { + return -1 + } + return 1 + } + for i := range this.Field11 { + if this.Field11[i] != that1.Field11[i] { + if this.Field11[i] < that1.Field11[i] { + return -1 + } + return 1 + } + } + if len(this.Field12) != len(that1.Field12) { + if len(this.Field12) < len(that1.Field12) { + return -1 + } + return 1 + } + for i := range this.Field12 { + if this.Field12[i] != that1.Field12[i] { + if this.Field12[i] < that1.Field12[i] { + return -1 + } + return 1 + } + } + if len(this.Field13) != len(that1.Field13) { + if len(this.Field13) < len(that1.Field13) { + return -1 + } + return 1 + } + for i := range this.Field13 { + if this.Field13[i] != that1.Field13[i] { + if !this.Field13[i] { + return -1 + } + return 1 + } + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NidOptStruct) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NidOptStruct) + if !ok { + that2, ok := that.(NidOptStruct) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.Field1 != that1.Field1 { + if this.Field1 < that1.Field1 { + return -1 + } + return 1 + } + if this.Field2 != that1.Field2 { + if this.Field2 < that1.Field2 { + return -1 + } + return 1 + } + if c := this.Field3.Compare(&that1.Field3); c != 0 { + return c + } + if c := this.Field4.Compare(&that1.Field4); c != 0 { + return c + } + if this.Field6 != that1.Field6 { + if this.Field6 < that1.Field6 { + return -1 + } + return 1 + } + if this.Field7 != that1.Field7 { + if this.Field7 < that1.Field7 { + return -1 + } + return 1 + } + if c := this.Field8.Compare(&that1.Field8); c != 0 { + return c + } + if this.Field13 != that1.Field13 { + if !this.Field13 { + return -1 + } + return 1 + } + if this.Field14 != that1.Field14 { + if this.Field14 < that1.Field14 { + return -1 + } + return 1 + } + if c := bytes.Compare(this.Field15, that1.Field15); c != 0 { + return c + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NinOptStruct) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NinOptStruct) + if !ok { + that2, ok := that.(NinOptStruct) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + if *this.Field1 < *that1.Field1 { + return -1 + } + return 1 + } + } else if this.Field1 != nil { + return 1 + } else if that1.Field1 != nil { + return -1 + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + if *this.Field2 < *that1.Field2 { + return -1 + } + return 1 + } + } else if this.Field2 != nil { + return 1 + } else if that1.Field2 != nil { + return -1 + } + if c := this.Field3.Compare(that1.Field3); c != 0 { + return c + } + if c := this.Field4.Compare(that1.Field4); c != 0 { + return c + } + if this.Field6 != nil && that1.Field6 != nil { + if *this.Field6 != *that1.Field6 { + if *this.Field6 < *that1.Field6 { + return -1 + } + return 1 + } + } else if this.Field6 != nil { + return 1 + } else if that1.Field6 != nil { + return -1 + } + if this.Field7 != nil && that1.Field7 != nil { + if *this.Field7 != *that1.Field7 { + if *this.Field7 < *that1.Field7 { + return -1 + } + return 1 + } + } else if this.Field7 != nil { + return 1 + } else if that1.Field7 != nil { + return -1 + } + if c := this.Field8.Compare(that1.Field8); c != 0 { + return c + } + if this.Field13 != nil && that1.Field13 != nil { + if *this.Field13 != *that1.Field13 { + if !*this.Field13 { + return -1 + } + return 1 + } + } else if this.Field13 != nil { + return 1 + } else if that1.Field13 != nil { + return -1 + } + if this.Field14 != nil && that1.Field14 != nil { + if *this.Field14 != *that1.Field14 { + if *this.Field14 < *that1.Field14 { + return -1 + } + return 1 + } + } else if this.Field14 != nil { + return 1 + } else if that1.Field14 != nil { + return -1 + } + if c := bytes.Compare(this.Field15, that1.Field15); c != 0 { + return c + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NidRepStruct) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NidRepStruct) + if !ok { + that2, ok := that.(NidRepStruct) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if len(this.Field1) != len(that1.Field1) { + if len(this.Field1) < len(that1.Field1) { + return -1 + } + return 1 + } + for i := range this.Field1 { + if this.Field1[i] != that1.Field1[i] { + if this.Field1[i] < that1.Field1[i] { + return -1 + } + return 1 + } + } + if len(this.Field2) != len(that1.Field2) { + if len(this.Field2) < len(that1.Field2) { + return -1 + } + return 1 + } + for i := range this.Field2 { + if this.Field2[i] != that1.Field2[i] { + if this.Field2[i] < that1.Field2[i] { + return -1 + } + return 1 + } + } + if len(this.Field3) != len(that1.Field3) { + if len(this.Field3) < len(that1.Field3) { + return -1 + } + return 1 + } + for i := range this.Field3 { + if c := this.Field3[i].Compare(&that1.Field3[i]); c != 0 { + return c + } + } + if len(this.Field4) != len(that1.Field4) { + if len(this.Field4) < len(that1.Field4) { + return -1 + } + return 1 + } + for i := range this.Field4 { + if c := this.Field4[i].Compare(&that1.Field4[i]); c != 0 { + return c + } + } + if len(this.Field6) != len(that1.Field6) { + if len(this.Field6) < len(that1.Field6) { + return -1 + } + return 1 + } + for i := range this.Field6 { + if this.Field6[i] != that1.Field6[i] { + if this.Field6[i] < that1.Field6[i] { + return -1 + } + return 1 + } + } + if len(this.Field7) != len(that1.Field7) { + if len(this.Field7) < len(that1.Field7) { + return -1 + } + return 1 + } + for i := range this.Field7 { + if this.Field7[i] != that1.Field7[i] { + if this.Field7[i] < that1.Field7[i] { + return -1 + } + return 1 + } + } + if len(this.Field8) != len(that1.Field8) { + if len(this.Field8) < len(that1.Field8) { + return -1 + } + return 1 + } + for i := range this.Field8 { + if c := this.Field8[i].Compare(&that1.Field8[i]); c != 0 { + return c + } + } + if len(this.Field13) != len(that1.Field13) { + if len(this.Field13) < len(that1.Field13) { + return -1 + } + return 1 + } + for i := range this.Field13 { + if this.Field13[i] != that1.Field13[i] { + if !this.Field13[i] { + return -1 + } + return 1 + } + } + if len(this.Field14) != len(that1.Field14) { + if len(this.Field14) < len(that1.Field14) { + return -1 + } + return 1 + } + for i := range this.Field14 { + if this.Field14[i] != that1.Field14[i] { + if this.Field14[i] < that1.Field14[i] { + return -1 + } + return 1 + } + } + if len(this.Field15) != len(that1.Field15) { + if len(this.Field15) < len(that1.Field15) { + return -1 + } + return 1 + } + for i := range this.Field15 { + if c := bytes.Compare(this.Field15[i], that1.Field15[i]); c != 0 { + return c + } + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NinRepStruct) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NinRepStruct) + if !ok { + that2, ok := that.(NinRepStruct) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if len(this.Field1) != len(that1.Field1) { + if len(this.Field1) < len(that1.Field1) { + return -1 + } + return 1 + } + for i := range this.Field1 { + if this.Field1[i] != that1.Field1[i] { + if this.Field1[i] < that1.Field1[i] { + return -1 + } + return 1 + } + } + if len(this.Field2) != len(that1.Field2) { + if len(this.Field2) < len(that1.Field2) { + return -1 + } + return 1 + } + for i := range this.Field2 { + if this.Field2[i] != that1.Field2[i] { + if this.Field2[i] < that1.Field2[i] { + return -1 + } + return 1 + } + } + if len(this.Field3) != len(that1.Field3) { + if len(this.Field3) < len(that1.Field3) { + return -1 + } + return 1 + } + for i := range this.Field3 { + if c := this.Field3[i].Compare(that1.Field3[i]); c != 0 { + return c + } + } + if len(this.Field4) != len(that1.Field4) { + if len(this.Field4) < len(that1.Field4) { + return -1 + } + return 1 + } + for i := range this.Field4 { + if c := this.Field4[i].Compare(that1.Field4[i]); c != 0 { + return c + } + } + if len(this.Field6) != len(that1.Field6) { + if len(this.Field6) < len(that1.Field6) { + return -1 + } + return 1 + } + for i := range this.Field6 { + if this.Field6[i] != that1.Field6[i] { + if this.Field6[i] < that1.Field6[i] { + return -1 + } + return 1 + } + } + if len(this.Field7) != len(that1.Field7) { + if len(this.Field7) < len(that1.Field7) { + return -1 + } + return 1 + } + for i := range this.Field7 { + if this.Field7[i] != that1.Field7[i] { + if this.Field7[i] < that1.Field7[i] { + return -1 + } + return 1 + } + } + if len(this.Field8) != len(that1.Field8) { + if len(this.Field8) < len(that1.Field8) { + return -1 + } + return 1 + } + for i := range this.Field8 { + if c := this.Field8[i].Compare(that1.Field8[i]); c != 0 { + return c + } + } + if len(this.Field13) != len(that1.Field13) { + if len(this.Field13) < len(that1.Field13) { + return -1 + } + return 1 + } + for i := range this.Field13 { + if this.Field13[i] != that1.Field13[i] { + if !this.Field13[i] { + return -1 + } + return 1 + } + } + if len(this.Field14) != len(that1.Field14) { + if len(this.Field14) < len(that1.Field14) { + return -1 + } + return 1 + } + for i := range this.Field14 { + if this.Field14[i] != that1.Field14[i] { + if this.Field14[i] < that1.Field14[i] { + return -1 + } + return 1 + } + } + if len(this.Field15) != len(that1.Field15) { + if len(this.Field15) < len(that1.Field15) { + return -1 + } + return 1 + } + for i := range this.Field15 { + if c := bytes.Compare(this.Field15[i], that1.Field15[i]); c != 0 { + return c + } + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NidEmbeddedStruct) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NidEmbeddedStruct) + if !ok { + that2, ok := that.(NidEmbeddedStruct) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if c := this.NidOptNative.Compare(that1.NidOptNative); c != 0 { + return c + } + if c := this.Field200.Compare(&that1.Field200); c != 0 { + return c + } + if this.Field210 != that1.Field210 { + if !this.Field210 { + return -1 + } + return 1 + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NinEmbeddedStruct) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NinEmbeddedStruct) + if !ok { + that2, ok := that.(NinEmbeddedStruct) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if c := this.NidOptNative.Compare(that1.NidOptNative); c != 0 { + return c + } + if c := this.Field200.Compare(that1.Field200); c != 0 { + return c + } + if this.Field210 != nil && that1.Field210 != nil { + if *this.Field210 != *that1.Field210 { + if !*this.Field210 { + return -1 + } + return 1 + } + } else if this.Field210 != nil { + return 1 + } else if that1.Field210 != nil { + return -1 + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NidNestedStruct) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NidNestedStruct) + if !ok { + that2, ok := that.(NidNestedStruct) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if c := this.Field1.Compare(&that1.Field1); c != 0 { + return c + } + if len(this.Field2) != len(that1.Field2) { + if len(this.Field2) < len(that1.Field2) { + return -1 + } + return 1 + } + for i := range this.Field2 { + if c := this.Field2[i].Compare(&that1.Field2[i]); c != 0 { + return c + } + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NinNestedStruct) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NinNestedStruct) + if !ok { + that2, ok := that.(NinNestedStruct) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if c := this.Field1.Compare(that1.Field1); c != 0 { + return c + } + if len(this.Field2) != len(that1.Field2) { + if len(this.Field2) < len(that1.Field2) { + return -1 + } + return 1 + } + for i := range this.Field2 { + if c := this.Field2[i].Compare(that1.Field2[i]); c != 0 { + return c + } + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NidOptCustom) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NidOptCustom) + if !ok { + that2, ok := that.(NidOptCustom) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if c := this.Id.Compare(that1.Id); c != 0 { + return c + } + if c := this.Value.Compare(that1.Value); c != 0 { + return c + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *CustomDash) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*CustomDash) + if !ok { + that2, ok := that.(CustomDash) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if that1.Value == nil { + if this.Value != nil { + return 1 + } + } else if this.Value == nil { + return -1 + } else if c := this.Value.Compare(*that1.Value); c != 0 { + return c + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NinOptCustom) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NinOptCustom) + if !ok { + that2, ok := that.(NinOptCustom) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if that1.Id == nil { + if this.Id != nil { + return 1 + } + } else if this.Id == nil { + return -1 + } else if c := this.Id.Compare(*that1.Id); c != 0 { + return c + } + if that1.Value == nil { + if this.Value != nil { + return 1 + } + } else if this.Value == nil { + return -1 + } else if c := this.Value.Compare(*that1.Value); c != 0 { + return c + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NidRepCustom) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NidRepCustom) + if !ok { + that2, ok := that.(NidRepCustom) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if len(this.Id) != len(that1.Id) { + if len(this.Id) < len(that1.Id) { + return -1 + } + return 1 + } + for i := range this.Id { + if c := this.Id[i].Compare(that1.Id[i]); c != 0 { + return c + } + } + if len(this.Value) != len(that1.Value) { + if len(this.Value) < len(that1.Value) { + return -1 + } + return 1 + } + for i := range this.Value { + if c := this.Value[i].Compare(that1.Value[i]); c != 0 { + return c + } + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NinRepCustom) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NinRepCustom) + if !ok { + that2, ok := that.(NinRepCustom) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if len(this.Id) != len(that1.Id) { + if len(this.Id) < len(that1.Id) { + return -1 + } + return 1 + } + for i := range this.Id { + if c := this.Id[i].Compare(that1.Id[i]); c != 0 { + return c + } + } + if len(this.Value) != len(that1.Value) { + if len(this.Value) < len(that1.Value) { + return -1 + } + return 1 + } + for i := range this.Value { + if c := this.Value[i].Compare(that1.Value[i]); c != 0 { + return c + } + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NinOptNativeUnion) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NinOptNativeUnion) + if !ok { + that2, ok := that.(NinOptNativeUnion) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + if *this.Field1 < *that1.Field1 { + return -1 + } + return 1 + } + } else if this.Field1 != nil { + return 1 + } else if that1.Field1 != nil { + return -1 + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + if *this.Field2 < *that1.Field2 { + return -1 + } + return 1 + } + } else if this.Field2 != nil { + return 1 + } else if that1.Field2 != nil { + return -1 + } + if this.Field3 != nil && that1.Field3 != nil { + if *this.Field3 != *that1.Field3 { + if *this.Field3 < *that1.Field3 { + return -1 + } + return 1 + } + } else if this.Field3 != nil { + return 1 + } else if that1.Field3 != nil { + return -1 + } + if this.Field4 != nil && that1.Field4 != nil { + if *this.Field4 != *that1.Field4 { + if *this.Field4 < *that1.Field4 { + return -1 + } + return 1 + } + } else if this.Field4 != nil { + return 1 + } else if that1.Field4 != nil { + return -1 + } + if this.Field5 != nil && that1.Field5 != nil { + if *this.Field5 != *that1.Field5 { + if *this.Field5 < *that1.Field5 { + return -1 + } + return 1 + } + } else if this.Field5 != nil { + return 1 + } else if that1.Field5 != nil { + return -1 + } + if this.Field6 != nil && that1.Field6 != nil { + if *this.Field6 != *that1.Field6 { + if *this.Field6 < *that1.Field6 { + return -1 + } + return 1 + } + } else if this.Field6 != nil { + return 1 + } else if that1.Field6 != nil { + return -1 + } + if this.Field13 != nil && that1.Field13 != nil { + if *this.Field13 != *that1.Field13 { + if !*this.Field13 { + return -1 + } + return 1 + } + } else if this.Field13 != nil { + return 1 + } else if that1.Field13 != nil { + return -1 + } + if this.Field14 != nil && that1.Field14 != nil { + if *this.Field14 != *that1.Field14 { + if *this.Field14 < *that1.Field14 { + return -1 + } + return 1 + } + } else if this.Field14 != nil { + return 1 + } else if that1.Field14 != nil { + return -1 + } + if c := bytes.Compare(this.Field15, that1.Field15); c != 0 { + return c + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NinOptStructUnion) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NinOptStructUnion) + if !ok { + that2, ok := that.(NinOptStructUnion) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + if *this.Field1 < *that1.Field1 { + return -1 + } + return 1 + } + } else if this.Field1 != nil { + return 1 + } else if that1.Field1 != nil { + return -1 + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + if *this.Field2 < *that1.Field2 { + return -1 + } + return 1 + } + } else if this.Field2 != nil { + return 1 + } else if that1.Field2 != nil { + return -1 + } + if c := this.Field3.Compare(that1.Field3); c != 0 { + return c + } + if c := this.Field4.Compare(that1.Field4); c != 0 { + return c + } + if this.Field6 != nil && that1.Field6 != nil { + if *this.Field6 != *that1.Field6 { + if *this.Field6 < *that1.Field6 { + return -1 + } + return 1 + } + } else if this.Field6 != nil { + return 1 + } else if that1.Field6 != nil { + return -1 + } + if this.Field7 != nil && that1.Field7 != nil { + if *this.Field7 != *that1.Field7 { + if *this.Field7 < *that1.Field7 { + return -1 + } + return 1 + } + } else if this.Field7 != nil { + return 1 + } else if that1.Field7 != nil { + return -1 + } + if this.Field13 != nil && that1.Field13 != nil { + if *this.Field13 != *that1.Field13 { + if !*this.Field13 { + return -1 + } + return 1 + } + } else if this.Field13 != nil { + return 1 + } else if that1.Field13 != nil { + return -1 + } + if this.Field14 != nil && that1.Field14 != nil { + if *this.Field14 != *that1.Field14 { + if *this.Field14 < *that1.Field14 { + return -1 + } + return 1 + } + } else if this.Field14 != nil { + return 1 + } else if that1.Field14 != nil { + return -1 + } + if c := bytes.Compare(this.Field15, that1.Field15); c != 0 { + return c + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NinEmbeddedStructUnion) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NinEmbeddedStructUnion) + if !ok { + that2, ok := that.(NinEmbeddedStructUnion) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if c := this.NidOptNative.Compare(that1.NidOptNative); c != 0 { + return c + } + if c := this.Field200.Compare(that1.Field200); c != 0 { + return c + } + if this.Field210 != nil && that1.Field210 != nil { + if *this.Field210 != *that1.Field210 { + if !*this.Field210 { + return -1 + } + return 1 + } + } else if this.Field210 != nil { + return 1 + } else if that1.Field210 != nil { + return -1 + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NinNestedStructUnion) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NinNestedStructUnion) + if !ok { + that2, ok := that.(NinNestedStructUnion) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if c := this.Field1.Compare(that1.Field1); c != 0 { + return c + } + if c := this.Field2.Compare(that1.Field2); c != 0 { + return c + } + if c := this.Field3.Compare(that1.Field3); c != 0 { + return c + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *Tree) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*Tree) + if !ok { + that2, ok := that.(Tree) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if c := this.Or.Compare(that1.Or); c != 0 { + return c + } + if c := this.And.Compare(that1.And); c != 0 { + return c + } + if c := this.Leaf.Compare(that1.Leaf); c != 0 { + return c + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *OrBranch) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*OrBranch) + if !ok { + that2, ok := that.(OrBranch) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if c := this.Left.Compare(&that1.Left); c != 0 { + return c + } + if c := this.Right.Compare(&that1.Right); c != 0 { + return c + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *AndBranch) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*AndBranch) + if !ok { + that2, ok := that.(AndBranch) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if c := this.Left.Compare(&that1.Left); c != 0 { + return c + } + if c := this.Right.Compare(&that1.Right); c != 0 { + return c + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *Leaf) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*Leaf) + if !ok { + that2, ok := that.(Leaf) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.Value != that1.Value { + if this.Value < that1.Value { + return -1 + } + return 1 + } + if this.StrValue != that1.StrValue { + if this.StrValue < that1.StrValue { + return -1 + } + return 1 + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *DeepTree) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*DeepTree) + if !ok { + that2, ok := that.(DeepTree) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if c := this.Down.Compare(that1.Down); c != 0 { + return c + } + if c := this.And.Compare(that1.And); c != 0 { + return c + } + if c := this.Leaf.Compare(that1.Leaf); c != 0 { + return c + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *ADeepBranch) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*ADeepBranch) + if !ok { + that2, ok := that.(ADeepBranch) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if c := this.Down.Compare(&that1.Down); c != 0 { + return c + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *AndDeepBranch) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*AndDeepBranch) + if !ok { + that2, ok := that.(AndDeepBranch) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if c := this.Left.Compare(&that1.Left); c != 0 { + return c + } + if c := this.Right.Compare(&that1.Right); c != 0 { + return c + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *DeepLeaf) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*DeepLeaf) + if !ok { + that2, ok := that.(DeepLeaf) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if c := this.Tree.Compare(&that1.Tree); c != 0 { + return c + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *Nil) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*Nil) + if !ok { + that2, ok := that.(Nil) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NidOptEnum) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NidOptEnum) + if !ok { + that2, ok := that.(NidOptEnum) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.Field1 != that1.Field1 { + if this.Field1 < that1.Field1 { + return -1 + } + return 1 + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NinOptEnum) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NinOptEnum) + if !ok { + that2, ok := that.(NinOptEnum) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + if *this.Field1 < *that1.Field1 { + return -1 + } + return 1 + } + } else if this.Field1 != nil { + return 1 + } else if that1.Field1 != nil { + return -1 + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + if *this.Field2 < *that1.Field2 { + return -1 + } + return 1 + } + } else if this.Field2 != nil { + return 1 + } else if that1.Field2 != nil { + return -1 + } + if this.Field3 != nil && that1.Field3 != nil { + if *this.Field3 != *that1.Field3 { + if *this.Field3 < *that1.Field3 { + return -1 + } + return 1 + } + } else if this.Field3 != nil { + return 1 + } else if that1.Field3 != nil { + return -1 + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NidRepEnum) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NidRepEnum) + if !ok { + that2, ok := that.(NidRepEnum) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if len(this.Field1) != len(that1.Field1) { + if len(this.Field1) < len(that1.Field1) { + return -1 + } + return 1 + } + for i := range this.Field1 { + if this.Field1[i] != that1.Field1[i] { + if this.Field1[i] < that1.Field1[i] { + return -1 + } + return 1 + } + } + if len(this.Field2) != len(that1.Field2) { + if len(this.Field2) < len(that1.Field2) { + return -1 + } + return 1 + } + for i := range this.Field2 { + if this.Field2[i] != that1.Field2[i] { + if this.Field2[i] < that1.Field2[i] { + return -1 + } + return 1 + } + } + if len(this.Field3) != len(that1.Field3) { + if len(this.Field3) < len(that1.Field3) { + return -1 + } + return 1 + } + for i := range this.Field3 { + if this.Field3[i] != that1.Field3[i] { + if this.Field3[i] < that1.Field3[i] { + return -1 + } + return 1 + } + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NinRepEnum) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NinRepEnum) + if !ok { + that2, ok := that.(NinRepEnum) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if len(this.Field1) != len(that1.Field1) { + if len(this.Field1) < len(that1.Field1) { + return -1 + } + return 1 + } + for i := range this.Field1 { + if this.Field1[i] != that1.Field1[i] { + if this.Field1[i] < that1.Field1[i] { + return -1 + } + return 1 + } + } + if len(this.Field2) != len(that1.Field2) { + if len(this.Field2) < len(that1.Field2) { + return -1 + } + return 1 + } + for i := range this.Field2 { + if this.Field2[i] != that1.Field2[i] { + if this.Field2[i] < that1.Field2[i] { + return -1 + } + return 1 + } + } + if len(this.Field3) != len(that1.Field3) { + if len(this.Field3) < len(that1.Field3) { + return -1 + } + return 1 + } + for i := range this.Field3 { + if this.Field3[i] != that1.Field3[i] { + if this.Field3[i] < that1.Field3[i] { + return -1 + } + return 1 + } + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NinOptEnumDefault) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NinOptEnumDefault) + if !ok { + that2, ok := that.(NinOptEnumDefault) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + if *this.Field1 < *that1.Field1 { + return -1 + } + return 1 + } + } else if this.Field1 != nil { + return 1 + } else if that1.Field1 != nil { + return -1 + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + if *this.Field2 < *that1.Field2 { + return -1 + } + return 1 + } + } else if this.Field2 != nil { + return 1 + } else if that1.Field2 != nil { + return -1 + } + if this.Field3 != nil && that1.Field3 != nil { + if *this.Field3 != *that1.Field3 { + if *this.Field3 < *that1.Field3 { + return -1 + } + return 1 + } + } else if this.Field3 != nil { + return 1 + } else if that1.Field3 != nil { + return -1 + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *AnotherNinOptEnum) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*AnotherNinOptEnum) + if !ok { + that2, ok := that.(AnotherNinOptEnum) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + if *this.Field1 < *that1.Field1 { + return -1 + } + return 1 + } + } else if this.Field1 != nil { + return 1 + } else if that1.Field1 != nil { + return -1 + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + if *this.Field2 < *that1.Field2 { + return -1 + } + return 1 + } + } else if this.Field2 != nil { + return 1 + } else if that1.Field2 != nil { + return -1 + } + if this.Field3 != nil && that1.Field3 != nil { + if *this.Field3 != *that1.Field3 { + if *this.Field3 < *that1.Field3 { + return -1 + } + return 1 + } + } else if this.Field3 != nil { + return 1 + } else if that1.Field3 != nil { + return -1 + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *AnotherNinOptEnumDefault) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*AnotherNinOptEnumDefault) + if !ok { + that2, ok := that.(AnotherNinOptEnumDefault) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + if *this.Field1 < *that1.Field1 { + return -1 + } + return 1 + } + } else if this.Field1 != nil { + return 1 + } else if that1.Field1 != nil { + return -1 + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + if *this.Field2 < *that1.Field2 { + return -1 + } + return 1 + } + } else if this.Field2 != nil { + return 1 + } else if that1.Field2 != nil { + return -1 + } + if this.Field3 != nil && that1.Field3 != nil { + if *this.Field3 != *that1.Field3 { + if *this.Field3 < *that1.Field3 { + return -1 + } + return 1 + } + } else if this.Field3 != nil { + return 1 + } else if that1.Field3 != nil { + return -1 + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *Timer) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*Timer) + if !ok { + that2, ok := that.(Timer) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.Time1 != that1.Time1 { + if this.Time1 < that1.Time1 { + return -1 + } + return 1 + } + if this.Time2 != that1.Time2 { + if this.Time2 < that1.Time2 { + return -1 + } + return 1 + } + if c := bytes.Compare(this.Data, that1.Data); c != 0 { + return c + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *MyExtendable) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*MyExtendable) + if !ok { + that2, ok := that.(MyExtendable) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + if *this.Field1 < *that1.Field1 { + return -1 + } + return 1 + } + } else if this.Field1 != nil { + return 1 + } else if that1.Field1 != nil { + return -1 + } + extkeys := make([]int32, 0, len(this.XXX_extensions)+len(that1.XXX_extensions)) + for k := range this.XXX_extensions { + extkeys = append(extkeys, k) + } + for k := range that1.XXX_extensions { + if _, ok := this.XXX_extensions[k]; !ok { + extkeys = append(extkeys, k) + } + } + github_com_gogo_protobuf_sortkeys.Int32s(extkeys) + for _, k := range extkeys { + if v, ok := this.XXX_extensions[k]; ok { + if v2, ok := that1.XXX_extensions[k]; ok { + if c := v.Compare(&v2); c != 0 { + return c + } + } else { + return 1 + } + } else { + return -1 + } + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *OtherExtenable) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*OtherExtenable) + if !ok { + that2, ok := that.(OtherExtenable) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + if *this.Field2 < *that1.Field2 { + return -1 + } + return 1 + } + } else if this.Field2 != nil { + return 1 + } else if that1.Field2 != nil { + return -1 + } + if this.Field13 != nil && that1.Field13 != nil { + if *this.Field13 != *that1.Field13 { + if *this.Field13 < *that1.Field13 { + return -1 + } + return 1 + } + } else if this.Field13 != nil { + return 1 + } else if that1.Field13 != nil { + return -1 + } + if c := this.M.Compare(that1.M); c != 0 { + return c + } + extkeys := make([]int32, 0, len(this.XXX_extensions)+len(that1.XXX_extensions)) + for k := range this.XXX_extensions { + extkeys = append(extkeys, k) + } + for k := range that1.XXX_extensions { + if _, ok := this.XXX_extensions[k]; !ok { + extkeys = append(extkeys, k) + } + } + github_com_gogo_protobuf_sortkeys.Int32s(extkeys) + for _, k := range extkeys { + if v, ok := this.XXX_extensions[k]; ok { + if v2, ok := that1.XXX_extensions[k]; ok { + if c := v.Compare(&v2); c != 0 { + return c + } + } else { + return 1 + } + } else { + return -1 + } + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NestedDefinition) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NestedDefinition) + if !ok { + that2, ok := that.(NestedDefinition) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + if *this.Field1 < *that1.Field1 { + return -1 + } + return 1 + } + } else if this.Field1 != nil { + return 1 + } else if that1.Field1 != nil { + return -1 + } + if this.EnumField != nil && that1.EnumField != nil { + if *this.EnumField != *that1.EnumField { + if *this.EnumField < *that1.EnumField { + return -1 + } + return 1 + } + } else if this.EnumField != nil { + return 1 + } else if that1.EnumField != nil { + return -1 + } + if c := this.NNM.Compare(that1.NNM); c != 0 { + return c + } + if c := this.NM.Compare(that1.NM); c != 0 { + return c + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NestedDefinition_NestedMessage) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NestedDefinition_NestedMessage) + if !ok { + that2, ok := that.(NestedDefinition_NestedMessage) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.NestedField1 != nil && that1.NestedField1 != nil { + if *this.NestedField1 != *that1.NestedField1 { + if *this.NestedField1 < *that1.NestedField1 { + return -1 + } + return 1 + } + } else if this.NestedField1 != nil { + return 1 + } else if that1.NestedField1 != nil { + return -1 + } + if c := this.NNM.Compare(that1.NNM); c != 0 { + return c + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NestedDefinition_NestedMessage_NestedNestedMsg) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NestedDefinition_NestedMessage_NestedNestedMsg) + if !ok { + that2, ok := that.(NestedDefinition_NestedMessage_NestedNestedMsg) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.NestedNestedField1 != nil && that1.NestedNestedField1 != nil { + if *this.NestedNestedField1 != *that1.NestedNestedField1 { + if *this.NestedNestedField1 < *that1.NestedNestedField1 { + return -1 + } + return 1 + } + } else if this.NestedNestedField1 != nil { + return 1 + } else if that1.NestedNestedField1 != nil { + return -1 + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NestedScope) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NestedScope) + if !ok { + that2, ok := that.(NestedScope) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if c := this.A.Compare(that1.A); c != 0 { + return c + } + if this.B != nil && that1.B != nil { + if *this.B != *that1.B { + if *this.B < *that1.B { + return -1 + } + return 1 + } + } else if this.B != nil { + return 1 + } else if that1.B != nil { + return -1 + } + if c := this.C.Compare(that1.C); c != 0 { + return c + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NinOptNativeDefault) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NinOptNativeDefault) + if !ok { + that2, ok := that.(NinOptNativeDefault) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + if *this.Field1 < *that1.Field1 { + return -1 + } + return 1 + } + } else if this.Field1 != nil { + return 1 + } else if that1.Field1 != nil { + return -1 + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + if *this.Field2 < *that1.Field2 { + return -1 + } + return 1 + } + } else if this.Field2 != nil { + return 1 + } else if that1.Field2 != nil { + return -1 + } + if this.Field3 != nil && that1.Field3 != nil { + if *this.Field3 != *that1.Field3 { + if *this.Field3 < *that1.Field3 { + return -1 + } + return 1 + } + } else if this.Field3 != nil { + return 1 + } else if that1.Field3 != nil { + return -1 + } + if this.Field4 != nil && that1.Field4 != nil { + if *this.Field4 != *that1.Field4 { + if *this.Field4 < *that1.Field4 { + return -1 + } + return 1 + } + } else if this.Field4 != nil { + return 1 + } else if that1.Field4 != nil { + return -1 + } + if this.Field5 != nil && that1.Field5 != nil { + if *this.Field5 != *that1.Field5 { + if *this.Field5 < *that1.Field5 { + return -1 + } + return 1 + } + } else if this.Field5 != nil { + return 1 + } else if that1.Field5 != nil { + return -1 + } + if this.Field6 != nil && that1.Field6 != nil { + if *this.Field6 != *that1.Field6 { + if *this.Field6 < *that1.Field6 { + return -1 + } + return 1 + } + } else if this.Field6 != nil { + return 1 + } else if that1.Field6 != nil { + return -1 + } + if this.Field7 != nil && that1.Field7 != nil { + if *this.Field7 != *that1.Field7 { + if *this.Field7 < *that1.Field7 { + return -1 + } + return 1 + } + } else if this.Field7 != nil { + return 1 + } else if that1.Field7 != nil { + return -1 + } + if this.Field8 != nil && that1.Field8 != nil { + if *this.Field8 != *that1.Field8 { + if *this.Field8 < *that1.Field8 { + return -1 + } + return 1 + } + } else if this.Field8 != nil { + return 1 + } else if that1.Field8 != nil { + return -1 + } + if this.Field9 != nil && that1.Field9 != nil { + if *this.Field9 != *that1.Field9 { + if *this.Field9 < *that1.Field9 { + return -1 + } + return 1 + } + } else if this.Field9 != nil { + return 1 + } else if that1.Field9 != nil { + return -1 + } + if this.Field10 != nil && that1.Field10 != nil { + if *this.Field10 != *that1.Field10 { + if *this.Field10 < *that1.Field10 { + return -1 + } + return 1 + } + } else if this.Field10 != nil { + return 1 + } else if that1.Field10 != nil { + return -1 + } + if this.Field11 != nil && that1.Field11 != nil { + if *this.Field11 != *that1.Field11 { + if *this.Field11 < *that1.Field11 { + return -1 + } + return 1 + } + } else if this.Field11 != nil { + return 1 + } else if that1.Field11 != nil { + return -1 + } + if this.Field12 != nil && that1.Field12 != nil { + if *this.Field12 != *that1.Field12 { + if *this.Field12 < *that1.Field12 { + return -1 + } + return 1 + } + } else if this.Field12 != nil { + return 1 + } else if that1.Field12 != nil { + return -1 + } + if this.Field13 != nil && that1.Field13 != nil { + if *this.Field13 != *that1.Field13 { + if !*this.Field13 { + return -1 + } + return 1 + } + } else if this.Field13 != nil { + return 1 + } else if that1.Field13 != nil { + return -1 + } + if this.Field14 != nil && that1.Field14 != nil { + if *this.Field14 != *that1.Field14 { + if *this.Field14 < *that1.Field14 { + return -1 + } + return 1 + } + } else if this.Field14 != nil { + return 1 + } else if that1.Field14 != nil { + return -1 + } + if c := bytes.Compare(this.Field15, that1.Field15); c != 0 { + return c + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *CustomContainer) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*CustomContainer) + if !ok { + that2, ok := that.(CustomContainer) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if c := this.CustomStruct.Compare(&that1.CustomStruct); c != 0 { + return c + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *CustomNameNidOptNative) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*CustomNameNidOptNative) + if !ok { + that2, ok := that.(CustomNameNidOptNative) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.FieldA != that1.FieldA { + if this.FieldA < that1.FieldA { + return -1 + } + return 1 + } + if this.FieldB != that1.FieldB { + if this.FieldB < that1.FieldB { + return -1 + } + return 1 + } + if this.FieldC != that1.FieldC { + if this.FieldC < that1.FieldC { + return -1 + } + return 1 + } + if this.FieldD != that1.FieldD { + if this.FieldD < that1.FieldD { + return -1 + } + return 1 + } + if this.FieldE != that1.FieldE { + if this.FieldE < that1.FieldE { + return -1 + } + return 1 + } + if this.FieldF != that1.FieldF { + if this.FieldF < that1.FieldF { + return -1 + } + return 1 + } + if this.FieldG != that1.FieldG { + if this.FieldG < that1.FieldG { + return -1 + } + return 1 + } + if this.FieldH != that1.FieldH { + if this.FieldH < that1.FieldH { + return -1 + } + return 1 + } + if this.FieldI != that1.FieldI { + if this.FieldI < that1.FieldI { + return -1 + } + return 1 + } + if this.FieldJ != that1.FieldJ { + if this.FieldJ < that1.FieldJ { + return -1 + } + return 1 + } + if this.FieldK != that1.FieldK { + if this.FieldK < that1.FieldK { + return -1 + } + return 1 + } + if this.FieldL != that1.FieldL { + if this.FieldL < that1.FieldL { + return -1 + } + return 1 + } + if this.FieldM != that1.FieldM { + if !this.FieldM { + return -1 + } + return 1 + } + if this.FieldN != that1.FieldN { + if this.FieldN < that1.FieldN { + return -1 + } + return 1 + } + if c := bytes.Compare(this.FieldO, that1.FieldO); c != 0 { + return c + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *CustomNameNinOptNative) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*CustomNameNinOptNative) + if !ok { + that2, ok := that.(CustomNameNinOptNative) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.FieldA != nil && that1.FieldA != nil { + if *this.FieldA != *that1.FieldA { + if *this.FieldA < *that1.FieldA { + return -1 + } + return 1 + } + } else if this.FieldA != nil { + return 1 + } else if that1.FieldA != nil { + return -1 + } + if this.FieldB != nil && that1.FieldB != nil { + if *this.FieldB != *that1.FieldB { + if *this.FieldB < *that1.FieldB { + return -1 + } + return 1 + } + } else if this.FieldB != nil { + return 1 + } else if that1.FieldB != nil { + return -1 + } + if this.FieldC != nil && that1.FieldC != nil { + if *this.FieldC != *that1.FieldC { + if *this.FieldC < *that1.FieldC { + return -1 + } + return 1 + } + } else if this.FieldC != nil { + return 1 + } else if that1.FieldC != nil { + return -1 + } + if this.FieldD != nil && that1.FieldD != nil { + if *this.FieldD != *that1.FieldD { + if *this.FieldD < *that1.FieldD { + return -1 + } + return 1 + } + } else if this.FieldD != nil { + return 1 + } else if that1.FieldD != nil { + return -1 + } + if this.FieldE != nil && that1.FieldE != nil { + if *this.FieldE != *that1.FieldE { + if *this.FieldE < *that1.FieldE { + return -1 + } + return 1 + } + } else if this.FieldE != nil { + return 1 + } else if that1.FieldE != nil { + return -1 + } + if this.FieldF != nil && that1.FieldF != nil { + if *this.FieldF != *that1.FieldF { + if *this.FieldF < *that1.FieldF { + return -1 + } + return 1 + } + } else if this.FieldF != nil { + return 1 + } else if that1.FieldF != nil { + return -1 + } + if this.FieldG != nil && that1.FieldG != nil { + if *this.FieldG != *that1.FieldG { + if *this.FieldG < *that1.FieldG { + return -1 + } + return 1 + } + } else if this.FieldG != nil { + return 1 + } else if that1.FieldG != nil { + return -1 + } + if this.FieldH != nil && that1.FieldH != nil { + if *this.FieldH != *that1.FieldH { + if *this.FieldH < *that1.FieldH { + return -1 + } + return 1 + } + } else if this.FieldH != nil { + return 1 + } else if that1.FieldH != nil { + return -1 + } + if this.FieldI != nil && that1.FieldI != nil { + if *this.FieldI != *that1.FieldI { + if *this.FieldI < *that1.FieldI { + return -1 + } + return 1 + } + } else if this.FieldI != nil { + return 1 + } else if that1.FieldI != nil { + return -1 + } + if this.FieldJ != nil && that1.FieldJ != nil { + if *this.FieldJ != *that1.FieldJ { + if *this.FieldJ < *that1.FieldJ { + return -1 + } + return 1 + } + } else if this.FieldJ != nil { + return 1 + } else if that1.FieldJ != nil { + return -1 + } + if this.FieldK != nil && that1.FieldK != nil { + if *this.FieldK != *that1.FieldK { + if *this.FieldK < *that1.FieldK { + return -1 + } + return 1 + } + } else if this.FieldK != nil { + return 1 + } else if that1.FieldK != nil { + return -1 + } + if this.FielL != nil && that1.FielL != nil { + if *this.FielL != *that1.FielL { + if *this.FielL < *that1.FielL { + return -1 + } + return 1 + } + } else if this.FielL != nil { + return 1 + } else if that1.FielL != nil { + return -1 + } + if this.FieldM != nil && that1.FieldM != nil { + if *this.FieldM != *that1.FieldM { + if !*this.FieldM { + return -1 + } + return 1 + } + } else if this.FieldM != nil { + return 1 + } else if that1.FieldM != nil { + return -1 + } + if this.FieldN != nil && that1.FieldN != nil { + if *this.FieldN != *that1.FieldN { + if *this.FieldN < *that1.FieldN { + return -1 + } + return 1 + } + } else if this.FieldN != nil { + return 1 + } else if that1.FieldN != nil { + return -1 + } + if c := bytes.Compare(this.FieldO, that1.FieldO); c != 0 { + return c + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *CustomNameNinRepNative) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*CustomNameNinRepNative) + if !ok { + that2, ok := that.(CustomNameNinRepNative) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if len(this.FieldA) != len(that1.FieldA) { + if len(this.FieldA) < len(that1.FieldA) { + return -1 + } + return 1 + } + for i := range this.FieldA { + if this.FieldA[i] != that1.FieldA[i] { + if this.FieldA[i] < that1.FieldA[i] { + return -1 + } + return 1 + } + } + if len(this.FieldB) != len(that1.FieldB) { + if len(this.FieldB) < len(that1.FieldB) { + return -1 + } + return 1 + } + for i := range this.FieldB { + if this.FieldB[i] != that1.FieldB[i] { + if this.FieldB[i] < that1.FieldB[i] { + return -1 + } + return 1 + } + } + if len(this.FieldC) != len(that1.FieldC) { + if len(this.FieldC) < len(that1.FieldC) { + return -1 + } + return 1 + } + for i := range this.FieldC { + if this.FieldC[i] != that1.FieldC[i] { + if this.FieldC[i] < that1.FieldC[i] { + return -1 + } + return 1 + } + } + if len(this.FieldD) != len(that1.FieldD) { + if len(this.FieldD) < len(that1.FieldD) { + return -1 + } + return 1 + } + for i := range this.FieldD { + if this.FieldD[i] != that1.FieldD[i] { + if this.FieldD[i] < that1.FieldD[i] { + return -1 + } + return 1 + } + } + if len(this.FieldE) != len(that1.FieldE) { + if len(this.FieldE) < len(that1.FieldE) { + return -1 + } + return 1 + } + for i := range this.FieldE { + if this.FieldE[i] != that1.FieldE[i] { + if this.FieldE[i] < that1.FieldE[i] { + return -1 + } + return 1 + } + } + if len(this.FieldF) != len(that1.FieldF) { + if len(this.FieldF) < len(that1.FieldF) { + return -1 + } + return 1 + } + for i := range this.FieldF { + if this.FieldF[i] != that1.FieldF[i] { + if this.FieldF[i] < that1.FieldF[i] { + return -1 + } + return 1 + } + } + if len(this.FieldG) != len(that1.FieldG) { + if len(this.FieldG) < len(that1.FieldG) { + return -1 + } + return 1 + } + for i := range this.FieldG { + if this.FieldG[i] != that1.FieldG[i] { + if this.FieldG[i] < that1.FieldG[i] { + return -1 + } + return 1 + } + } + if len(this.FieldH) != len(that1.FieldH) { + if len(this.FieldH) < len(that1.FieldH) { + return -1 + } + return 1 + } + for i := range this.FieldH { + if this.FieldH[i] != that1.FieldH[i] { + if this.FieldH[i] < that1.FieldH[i] { + return -1 + } + return 1 + } + } + if len(this.FieldI) != len(that1.FieldI) { + if len(this.FieldI) < len(that1.FieldI) { + return -1 + } + return 1 + } + for i := range this.FieldI { + if this.FieldI[i] != that1.FieldI[i] { + if this.FieldI[i] < that1.FieldI[i] { + return -1 + } + return 1 + } + } + if len(this.FieldJ) != len(that1.FieldJ) { + if len(this.FieldJ) < len(that1.FieldJ) { + return -1 + } + return 1 + } + for i := range this.FieldJ { + if this.FieldJ[i] != that1.FieldJ[i] { + if this.FieldJ[i] < that1.FieldJ[i] { + return -1 + } + return 1 + } + } + if len(this.FieldK) != len(that1.FieldK) { + if len(this.FieldK) < len(that1.FieldK) { + return -1 + } + return 1 + } + for i := range this.FieldK { + if this.FieldK[i] != that1.FieldK[i] { + if this.FieldK[i] < that1.FieldK[i] { + return -1 + } + return 1 + } + } + if len(this.FieldL) != len(that1.FieldL) { + if len(this.FieldL) < len(that1.FieldL) { + return -1 + } + return 1 + } + for i := range this.FieldL { + if this.FieldL[i] != that1.FieldL[i] { + if this.FieldL[i] < that1.FieldL[i] { + return -1 + } + return 1 + } + } + if len(this.FieldM) != len(that1.FieldM) { + if len(this.FieldM) < len(that1.FieldM) { + return -1 + } + return 1 + } + for i := range this.FieldM { + if this.FieldM[i] != that1.FieldM[i] { + if !this.FieldM[i] { + return -1 + } + return 1 + } + } + if len(this.FieldN) != len(that1.FieldN) { + if len(this.FieldN) < len(that1.FieldN) { + return -1 + } + return 1 + } + for i := range this.FieldN { + if this.FieldN[i] != that1.FieldN[i] { + if this.FieldN[i] < that1.FieldN[i] { + return -1 + } + return 1 + } + } + if len(this.FieldO) != len(that1.FieldO) { + if len(this.FieldO) < len(that1.FieldO) { + return -1 + } + return 1 + } + for i := range this.FieldO { + if c := bytes.Compare(this.FieldO[i], that1.FieldO[i]); c != 0 { + return c + } + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *CustomNameNinStruct) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*CustomNameNinStruct) + if !ok { + that2, ok := that.(CustomNameNinStruct) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.FieldA != nil && that1.FieldA != nil { + if *this.FieldA != *that1.FieldA { + if *this.FieldA < *that1.FieldA { + return -1 + } + return 1 + } + } else if this.FieldA != nil { + return 1 + } else if that1.FieldA != nil { + return -1 + } + if this.FieldB != nil && that1.FieldB != nil { + if *this.FieldB != *that1.FieldB { + if *this.FieldB < *that1.FieldB { + return -1 + } + return 1 + } + } else if this.FieldB != nil { + return 1 + } else if that1.FieldB != nil { + return -1 + } + if c := this.FieldC.Compare(that1.FieldC); c != 0 { + return c + } + if len(this.FieldD) != len(that1.FieldD) { + if len(this.FieldD) < len(that1.FieldD) { + return -1 + } + return 1 + } + for i := range this.FieldD { + if c := this.FieldD[i].Compare(that1.FieldD[i]); c != 0 { + return c + } + } + if this.FieldE != nil && that1.FieldE != nil { + if *this.FieldE != *that1.FieldE { + if *this.FieldE < *that1.FieldE { + return -1 + } + return 1 + } + } else if this.FieldE != nil { + return 1 + } else if that1.FieldE != nil { + return -1 + } + if this.FieldF != nil && that1.FieldF != nil { + if *this.FieldF != *that1.FieldF { + if *this.FieldF < *that1.FieldF { + return -1 + } + return 1 + } + } else if this.FieldF != nil { + return 1 + } else if that1.FieldF != nil { + return -1 + } + if c := this.FieldG.Compare(that1.FieldG); c != 0 { + return c + } + if this.FieldH != nil && that1.FieldH != nil { + if *this.FieldH != *that1.FieldH { + if !*this.FieldH { + return -1 + } + return 1 + } + } else if this.FieldH != nil { + return 1 + } else if that1.FieldH != nil { + return -1 + } + if this.FieldI != nil && that1.FieldI != nil { + if *this.FieldI != *that1.FieldI { + if *this.FieldI < *that1.FieldI { + return -1 + } + return 1 + } + } else if this.FieldI != nil { + return 1 + } else if that1.FieldI != nil { + return -1 + } + if c := bytes.Compare(this.FieldJ, that1.FieldJ); c != 0 { + return c + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *CustomNameCustomType) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*CustomNameCustomType) + if !ok { + that2, ok := that.(CustomNameCustomType) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if that1.FieldA == nil { + if this.FieldA != nil { + return 1 + } + } else if this.FieldA == nil { + return -1 + } else if c := this.FieldA.Compare(*that1.FieldA); c != 0 { + return c + } + if that1.FieldB == nil { + if this.FieldB != nil { + return 1 + } + } else if this.FieldB == nil { + return -1 + } else if c := this.FieldB.Compare(*that1.FieldB); c != 0 { + return c + } + if len(this.FieldC) != len(that1.FieldC) { + if len(this.FieldC) < len(that1.FieldC) { + return -1 + } + return 1 + } + for i := range this.FieldC { + if c := this.FieldC[i].Compare(that1.FieldC[i]); c != 0 { + return c + } + } + if len(this.FieldD) != len(that1.FieldD) { + if len(this.FieldD) < len(that1.FieldD) { + return -1 + } + return 1 + } + for i := range this.FieldD { + if c := this.FieldD[i].Compare(that1.FieldD[i]); c != 0 { + return c + } + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *CustomNameNinEmbeddedStructUnion) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*CustomNameNinEmbeddedStructUnion) + if !ok { + that2, ok := that.(CustomNameNinEmbeddedStructUnion) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if c := this.NidOptNative.Compare(that1.NidOptNative); c != 0 { + return c + } + if c := this.FieldA.Compare(that1.FieldA); c != 0 { + return c + } + if this.FieldB != nil && that1.FieldB != nil { + if *this.FieldB != *that1.FieldB { + if !*this.FieldB { + return -1 + } + return 1 + } + } else if this.FieldB != nil { + return 1 + } else if that1.FieldB != nil { + return -1 + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *CustomNameEnum) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*CustomNameEnum) + if !ok { + that2, ok := that.(CustomNameEnum) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.FieldA != nil && that1.FieldA != nil { + if *this.FieldA != *that1.FieldA { + if *this.FieldA < *that1.FieldA { + return -1 + } + return 1 + } + } else if this.FieldA != nil { + return 1 + } else if that1.FieldA != nil { + return -1 + } + if len(this.FieldB) != len(that1.FieldB) { + if len(this.FieldB) < len(that1.FieldB) { + return -1 + } + return 1 + } + for i := range this.FieldB { + if this.FieldB[i] != that1.FieldB[i] { + if this.FieldB[i] < that1.FieldB[i] { + return -1 + } + return 1 + } + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NoExtensionsMap) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NoExtensionsMap) + if !ok { + that2, ok := that.(NoExtensionsMap) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + if *this.Field1 < *that1.Field1 { + return -1 + } + return 1 + } + } else if this.Field1 != nil { + return 1 + } else if that1.Field1 != nil { + return -1 + } + if c := bytes.Compare(this.XXX_extensions, that1.XXX_extensions); c != 0 { + return c + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *Unrecognized) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*Unrecognized) + if !ok { + that2, ok := that.(Unrecognized) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + if *this.Field1 < *that1.Field1 { + return -1 + } + return 1 + } + } else if this.Field1 != nil { + return 1 + } else if that1.Field1 != nil { + return -1 + } + return 0 +} +func (this *UnrecognizedWithInner) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*UnrecognizedWithInner) + if !ok { + that2, ok := that.(UnrecognizedWithInner) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if len(this.Embedded) != len(that1.Embedded) { + if len(this.Embedded) < len(that1.Embedded) { + return -1 + } + return 1 + } + for i := range this.Embedded { + if c := this.Embedded[i].Compare(that1.Embedded[i]); c != 0 { + return c + } + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + if *this.Field2 < *that1.Field2 { + return -1 + } + return 1 + } + } else if this.Field2 != nil { + return 1 + } else if that1.Field2 != nil { + return -1 + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *UnrecognizedWithInner_Inner) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*UnrecognizedWithInner_Inner) + if !ok { + that2, ok := that.(UnrecognizedWithInner_Inner) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + if *this.Field1 < *that1.Field1 { + return -1 + } + return 1 + } + } else if this.Field1 != nil { + return 1 + } else if that1.Field1 != nil { + return -1 + } + return 0 +} +func (this *UnrecognizedWithEmbed) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*UnrecognizedWithEmbed) + if !ok { + that2, ok := that.(UnrecognizedWithEmbed) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if c := this.UnrecognizedWithEmbed_Embedded.Compare(&that1.UnrecognizedWithEmbed_Embedded); c != 0 { + return c + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + if *this.Field2 < *that1.Field2 { + return -1 + } + return 1 + } + } else if this.Field2 != nil { + return 1 + } else if that1.Field2 != nil { + return -1 + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *UnrecognizedWithEmbed_Embedded) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*UnrecognizedWithEmbed_Embedded) + if !ok { + that2, ok := that.(UnrecognizedWithEmbed_Embedded) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + if *this.Field1 < *that1.Field1 { + return -1 + } + return 1 + } + } else if this.Field1 != nil { + return 1 + } else if that1.Field1 != nil { + return -1 + } + return 0 +} +func (this *Node) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*Node) + if !ok { + that2, ok := that.(Node) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.Label != nil && that1.Label != nil { + if *this.Label != *that1.Label { + if *this.Label < *that1.Label { + return -1 + } + return 1 + } + } else if this.Label != nil { + return 1 + } else if that1.Label != nil { + return -1 + } + if len(this.Children) != len(that1.Children) { + if len(this.Children) < len(that1.Children) { + return -1 + } + return 1 + } + for i := range this.Children { + if c := this.Children[i].Compare(that1.Children[i]); c != 0 { + return c + } + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NidOptNative) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NinOptNative) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NidRepNative) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NinRepNative) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NidRepPackedNative) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NinRepPackedNative) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NidOptStruct) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NinOptStruct) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NidRepStruct) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NinRepStruct) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NidEmbeddedStruct) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NinEmbeddedStruct) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NidNestedStruct) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NinNestedStruct) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NidOptCustom) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *CustomDash) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NinOptCustom) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NidRepCustom) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NinRepCustom) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NinOptNativeUnion) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NinOptStructUnion) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NinEmbeddedStructUnion) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NinNestedStructUnion) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *Tree) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *OrBranch) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *AndBranch) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *Leaf) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *DeepTree) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *ADeepBranch) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *AndDeepBranch) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *DeepLeaf) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *Nil) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NidOptEnum) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NinOptEnum) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NidRepEnum) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NinRepEnum) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NinOptEnumDefault) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *AnotherNinOptEnum) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *AnotherNinOptEnumDefault) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *Timer) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *MyExtendable) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *OtherExtenable) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NestedDefinition) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NestedDefinition_NestedMessage) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NestedDefinition_NestedMessage_NestedNestedMsg) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NestedScope) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NinOptNativeDefault) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *CustomContainer) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *CustomNameNidOptNative) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *CustomNameNinOptNative) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *CustomNameNinRepNative) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *CustomNameNinStruct) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *CustomNameCustomType) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *CustomNameNinEmbeddedStructUnion) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *CustomNameEnum) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NoExtensionsMap) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *Unrecognized) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *UnrecognizedWithInner) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *UnrecognizedWithInner_Inner) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *UnrecognizedWithEmbed) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *UnrecognizedWithEmbed_Embedded) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *Node) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func ThetestDescription() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + d := &github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet{} + var gzipped = []byte{ + // 6123 bytes of a gzipped FileDescriptorSet + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xcc, 0x5c, 0x6b, 0x6c, 0x23, 0xd7, + 0x75, 0xde, 0xe1, 0x90, 0x12, 0x75, 0x28, 0x51, 0xd4, 0xac, 0x56, 0xa6, 0xe5, 0xf5, 0x3e, 0x68, + 0x59, 0x96, 0x15, 0x5b, 0xaf, 0xd5, 0xbe, 0xe8, 0xc4, 0x01, 0x5f, 0x2b, 0x6b, 0xab, 0x57, 0x47, + 0x52, 0x62, 0xa7, 0x05, 0x08, 0x2e, 0x39, 0x92, 0x68, 0x53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x87, + 0x8d, 0x12, 0x9c, 0xc7, 0x37, 0x6f, 0x57, 0xec, 0x66, 0xb9, 0xeb, 0x58, 0x65, 0x57, 0x45, 0xe1, + 0x8b, 0x59, 0xac, 0x96, 0x79, 0x96, 0xb3, 0xed, 0x3b, 0xa8, 0x98, 0x71, 0x26, 0xee, 0x9e, 0x27, + 0x61, 0xb2, 0x6b, 0xd7, 0x6d, 0x14, 0xe2, 0x88, 0x82, 0xc1, 0x34, 0x61, 0xd3, 0xff, 0x31, 0xdc, + 0xa7, 0xe9, 0xde, 0xf7, 0x72, 0xd3, 0x20, 0x31, 0x4f, 0x77, 0x7b, 0x07, 0x33, 0x59, 0x18, 0xf5, + 0xc6, 0x8e, 0x31, 0x02, 0x34, 0x7a, 0xd0, 0xec, 0x86, 0x66, 0xd4, 0xc2, 0x76, 0x11, 0xcf, 0x85, + 0x6f, 0x2b, 0xa1, 0x89, 0x0d, 0xcd, 0xc9, 0x1b, 0xeb, 0x7b, 0xa5, 0xb2, 0xb9, 0xbf, 0xb5, 0xb7, + 0xbe, 0x59, 0x4a, 0xe9, 0xf3, 0x23, 0xf1, 0xef, 0x0c, 0xa7, 0xde, 0x81, 0xfe, 0x45, 0x32, 0x5f, + 0x89, 0x40, 0x52, 0xee, 0x83, 0x8d, 0x37, 0xc2, 0x3d, 0xfc, 0xa1, 0xd5, 0xb1, 0x3a, 0xe5, 0xe7, + 0xea, 0x6d, 0x12, 0xce, 0xc7, 0x15, 0xda, 0x49, 0x0a, 0x4f, 0x4c, 0x32, 0x2e, 0xf4, 0x78, 0xff, + 0x56, 0xc4, 0x73, 0x83, 0xb0, 0x18, 0x1b, 0x70, 0x1e, 0x99, 0x0c, 0xf5, 0x9a, 0x76, 0xad, 0xd2, + 0xae, 0x95, 0xdd, 0xe5, 0x82, 0x72, 0xa5, 0x8a, 0xe2, 0xc0, 0x69, 0xd2, 0x99, 0x44, 0x48, 0x39, + 0x6b, 0x37, 0x77, 0x19, 0xb3, 0x5b, 0x62, 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 0x63, 0xe0, 0x1e, 0x43, 0xfa, 0x03, 0xdf, 0x95, 0x3d, 0xb1, 0x46, 0x91, 0xb9, 0x46, 0x23, 0xbb, + 0x0f, 0xf7, 0xf8, 0x78, 0x36, 0x84, 0xcc, 0x0f, 0x32, 0x99, 0x93, 0x3d, 0xde, 0xc5, 0x62, 0x77, + 0x80, 0x8f, 0x0b, 0x7f, 0x84, 0x90, 0xf9, 0x21, 0x26, 0xd3, 0x60, 0x58, 0xee, 0x16, 0x2c, 0xf1, + 0x26, 0x4c, 0xa0, 0x27, 0xf5, 0x5b, 0x4d, 0x87, 0x3d, 0xf7, 0x86, 0x10, 0xf7, 0x61, 0x26, 0x6e, + 0x9c, 0x01, 0xc9, 0x53, 0x30, 0x96, 0x75, 0x1d, 0xe2, 0x07, 0xe8, 0x01, 0x28, 0x84, 0x88, 0x8f, + 0x30, 0x11, 0xc3, 0x98, 0x1f, 0x43, 0x73, 0x30, 0x7a, 0xd8, 0x64, 0x65, 0x38, 0x18, 0xfe, 0x51, + 0x06, 0x4f, 0x70, 0x0c, 0x13, 0xd1, 0x6a, 0xb6, 0xba, 0x0d, 0x5c, 0xa3, 0x83, 0x45, 0x7c, 0x8c, + 0x8b, 0xe0, 0x18, 0x26, 0xe2, 0x04, 0x66, 0x7d, 0x81, 0x8b, 0x70, 0x3c, 0xf6, 0x7c, 0x33, 0x5e, + 0xeb, 0x6d, 0xdc, 0x6e, 0xda, 0x61, 0x94, 0xf8, 0x38, 0x93, 0x00, 0x0c, 0x82, 0x05, 0x3c, 0x06, + 0x23, 0x61, 0x1d, 0xf1, 0x49, 0x06, 0x8f, 0x5b, 0xdc, 0x03, 0x28, 0xcf, 0x78, 0x91, 0xc1, 0x7b, + 0x2b, 0xc1, 0x22, 0xfe, 0x84, 0x89, 0x48, 0x7a, 0x60, 0xec, 0x36, 0x3a, 0x96, 0xd3, 0x41, 0x8f, + 0xea, 0x21, 0x84, 0x7c, 0x8a, 0xdf, 0x06, 0x83, 0x30, 0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9e, 0x43, 0x50, 0x19, 0x25, 0xfc, 0xc0, 0x27, 0xf4, 0x32, 0x4a, + 0xe8, 0x81, 0x4f, 0xd8, 0x65, 0x94, 0xb0, 0x03, 0x9f, 0x90, 0xcb, 0x28, 0x21, 0x07, 0x3e, 0xe1, + 0x96, 0x51, 0xc2, 0x0d, 0x7c, 0x42, 0x2d, 0xa3, 0x84, 0x1a, 0xf8, 0x84, 0x59, 0x46, 0x09, 0x33, + 0xf0, 0x09, 0xb1, 0x8c, 0x12, 0x62, 0xe0, 0x13, 0x5e, 0x19, 0x25, 0xbc, 0xc0, 0x27, 0xb4, 0x66, + 0xd4, 0xd0, 0x02, 0xbf, 0xb0, 0x9a, 0x51, 0xc3, 0x0a, 0xfc, 0x42, 0xea, 0x01, 0x35, 0xa4, 0x46, + 0x10, 0x57, 0x0c, 0x0f, 0x79, 0xa2, 0x69, 0x46, 0x8d, 0x26, 0xf0, 0x8b, 0xa4, 0x19, 0x35, 0x92, + 0xc0, 0x2f, 0x8a, 0x66, 0xd4, 0x28, 0x02, 0xbf, 0x08, 0x7a, 0x49, 0x8d, 0x20, 0xf7, 0x88, 0x4f, + 0x46, 0xd9, 0x51, 0x0c, 0x8a, 0x20, 0x3d, 0x44, 0x04, 0xe9, 0x21, 0x22, 0x48, 0x0f, 0x11, 0x41, + 0x7a, 0x88, 0x08, 0xd2, 0x43, 0x44, 0x90, 0x1e, 0x22, 0x82, 0xf4, 0x10, 0x11, 0xa4, 0x87, 0x89, + 0x20, 0x3d, 0x54, 0x04, 0xe9, 0xfd, 0x22, 0x68, 0x46, 0x3d, 0xf0, 0x00, 0x7e, 0x05, 0x69, 0x46, + 0xdd, 0xf9, 0x0c, 0x0e, 0x21, 0x3d, 0x54, 0x08, 0xe9, 0xfd, 0x42, 0xe8, 0xcb, 0xa8, 0x91, 0x92, + 0x42, 0x88, 0x6d, 0x0f, 0xbd, 0x56, 0x15, 0xe8, 0x4a, 0x88, 0xf3, 0x15, 0x7e, 0x31, 0x75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xc4, 0x8f, 0x5e, 0x5f, 0x47, 0xef, 0xbf, 0x83, 0xfe, 0x7e, 0x0f, 0xfd, 0xfd, 0x21, 0xfa, + 0xfb, 0x8e, 0x6f, 0x9d, 0xd3, 0x5e, 0xf8, 0xd6, 0xb9, 0x53, 0x2f, 0xa2, 0xbf, 0xff, 0x1f, 0x00, + 0x00, 0xff, 0xff, 0x5d, 0x08, 0x16, 0x1e, 0x22, 0x5f, 0x00, 0x00, + } + r := bytes.NewReader(gzipped) + gzipr, err := compress_gzip.NewReader(r) + if err != nil { + panic(err) + } + ungzipped, err := io_ioutil.ReadAll(gzipr) + if err != nil { + panic(err) + } + if err := github_com_gogo_protobuf_proto.Unmarshal(ungzipped, d); err != nil { + panic(err) + } + return d +} +func (x TheTestEnum) String() string { + s, ok := TheTestEnum_name[int32(x)] + if ok { + return s + } + return strconv.Itoa(int(x)) +} +func (x AnotherTestEnum) String() string { + s, ok := AnotherTestEnum_name[int32(x)] + if ok { + return s + } + return strconv.Itoa(int(x)) +} +func (x YetAnotherTestEnum) String() string { + s, ok := YetAnotherTestEnum_name[int32(x)] + if ok { + return s + } + return strconv.Itoa(int(x)) +} +func (x YetYetAnotherTestEnum) String() string { + s, ok := YetYetAnotherTestEnum_name[int32(x)] + if ok { + return s + } + return strconv.Itoa(int(x)) +} +func (x NestedDefinition_NestedEnum) String() string { + s, ok := NestedDefinition_NestedEnum_name[int32(x)] + if ok { + return s + } + return strconv.Itoa(int(x)) +} +func (this *NidOptNative) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NidOptNative) + if !ok { + that2, ok := that.(NidOptNative) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NidOptNative") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NidOptNative but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NidOptNative but is not nil && this == nil") + } + if this.Field1 != that1.Field1 { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) + } + if this.Field2 != that1.Field2 { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) + } + if this.Field3 != that1.Field3 { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", this.Field3, that1.Field3) + } + if this.Field4 != that1.Field4 { + return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", this.Field4, that1.Field4) + } + if this.Field5 != that1.Field5 { + return fmt.Errorf("Field5 this(%v) Not Equal that(%v)", this.Field5, that1.Field5) + } + if this.Field6 != that1.Field6 { + return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", this.Field6, that1.Field6) + } + if this.Field7 != that1.Field7 { + return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", this.Field7, that1.Field7) + } + if this.Field8 != that1.Field8 { + return fmt.Errorf("Field8 this(%v) Not Equal that(%v)", this.Field8, that1.Field8) + } + if this.Field9 != that1.Field9 { + return fmt.Errorf("Field9 this(%v) Not Equal that(%v)", this.Field9, that1.Field9) + } + if this.Field10 != that1.Field10 { + return fmt.Errorf("Field10 this(%v) Not Equal that(%v)", this.Field10, that1.Field10) + } + if this.Field11 != that1.Field11 { + return fmt.Errorf("Field11 this(%v) Not Equal that(%v)", this.Field11, that1.Field11) + } + if this.Field12 != that1.Field12 { + return fmt.Errorf("Field12 this(%v) Not Equal that(%v)", this.Field12, that1.Field12) + } + if this.Field13 != that1.Field13 { + return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", this.Field13, that1.Field13) + } + if this.Field14 != that1.Field14 { + return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", this.Field14, that1.Field14) + } + if !bytes.Equal(this.Field15, that1.Field15) { + return fmt.Errorf("Field15 this(%v) Not Equal that(%v)", this.Field15, that1.Field15) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NidOptNative) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*NidOptNative) + if !ok { + that2, ok := that.(NidOptNative) + 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.Field1 != that1.Field1 { + return false + } + if this.Field2 != that1.Field2 { + return false + } + if this.Field3 != that1.Field3 { + return false + } + if this.Field4 != that1.Field4 { + return false + } + if this.Field5 != that1.Field5 { + return false + } + if this.Field6 != that1.Field6 { + return false + } + if this.Field7 != that1.Field7 { + return false + } + if this.Field8 != that1.Field8 { + return false + } + if this.Field9 != that1.Field9 { + return false + } + if this.Field10 != that1.Field10 { + return false + } + if this.Field11 != that1.Field11 { + return false + } + if this.Field12 != that1.Field12 { + return false + } + if this.Field13 != that1.Field13 { + return false + } + if this.Field14 != that1.Field14 { + return false + } + if !bytes.Equal(this.Field15, that1.Field15) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NinOptNative) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NinOptNative) + if !ok { + that2, ok := that.(NinOptNative) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NinOptNative") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NinOptNative but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NinOptNative but is not nil && this == nil") + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) + } + } else if this.Field1 != nil { + return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") + } else if that1.Field1 != nil { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", *this.Field2, *that1.Field2) + } + } else if this.Field2 != nil { + return fmt.Errorf("this.Field2 == nil && that.Field2 != nil") + } else if that1.Field2 != nil { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) + } + if this.Field3 != nil && that1.Field3 != nil { + if *this.Field3 != *that1.Field3 { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", *this.Field3, *that1.Field3) + } + } else if this.Field3 != nil { + return fmt.Errorf("this.Field3 == nil && that.Field3 != nil") + } else if that1.Field3 != nil { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", this.Field3, that1.Field3) + } + if this.Field4 != nil && that1.Field4 != nil { + if *this.Field4 != *that1.Field4 { + return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", *this.Field4, *that1.Field4) + } + } else if this.Field4 != nil { + return fmt.Errorf("this.Field4 == nil && that.Field4 != nil") + } else if that1.Field4 != nil { + return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", this.Field4, that1.Field4) + } + if this.Field5 != nil && that1.Field5 != nil { + if *this.Field5 != *that1.Field5 { + return fmt.Errorf("Field5 this(%v) Not Equal that(%v)", *this.Field5, *that1.Field5) + } + } else if this.Field5 != nil { + return fmt.Errorf("this.Field5 == nil && that.Field5 != nil") + } else if that1.Field5 != nil { + return fmt.Errorf("Field5 this(%v) Not Equal that(%v)", this.Field5, that1.Field5) + } + if this.Field6 != nil && that1.Field6 != nil { + if *this.Field6 != *that1.Field6 { + return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", *this.Field6, *that1.Field6) + } + } else if this.Field6 != nil { + return fmt.Errorf("this.Field6 == nil && that.Field6 != nil") + } else if that1.Field6 != nil { + return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", this.Field6, that1.Field6) + } + if this.Field7 != nil && that1.Field7 != nil { + if *this.Field7 != *that1.Field7 { + return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", *this.Field7, *that1.Field7) + } + } else if this.Field7 != nil { + return fmt.Errorf("this.Field7 == nil && that.Field7 != nil") + } else if that1.Field7 != nil { + return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", this.Field7, that1.Field7) + } + if this.Field8 != nil && that1.Field8 != nil { + if *this.Field8 != *that1.Field8 { + return fmt.Errorf("Field8 this(%v) Not Equal that(%v)", *this.Field8, *that1.Field8) + } + } else if this.Field8 != nil { + return fmt.Errorf("this.Field8 == nil && that.Field8 != nil") + } else if that1.Field8 != nil { + return fmt.Errorf("Field8 this(%v) Not Equal that(%v)", this.Field8, that1.Field8) + } + if this.Field9 != nil && that1.Field9 != nil { + if *this.Field9 != *that1.Field9 { + return fmt.Errorf("Field9 this(%v) Not Equal that(%v)", *this.Field9, *that1.Field9) + } + } else if this.Field9 != nil { + return fmt.Errorf("this.Field9 == nil && that.Field9 != nil") + } else if that1.Field9 != nil { + return fmt.Errorf("Field9 this(%v) Not Equal that(%v)", this.Field9, that1.Field9) + } + if this.Field10 != nil && that1.Field10 != nil { + if *this.Field10 != *that1.Field10 { + return fmt.Errorf("Field10 this(%v) Not Equal that(%v)", *this.Field10, *that1.Field10) + } + } else if this.Field10 != nil { + return fmt.Errorf("this.Field10 == nil && that.Field10 != nil") + } else if that1.Field10 != nil { + return fmt.Errorf("Field10 this(%v) Not Equal that(%v)", this.Field10, that1.Field10) + } + if this.Field11 != nil && that1.Field11 != nil { + if *this.Field11 != *that1.Field11 { + return fmt.Errorf("Field11 this(%v) Not Equal that(%v)", *this.Field11, *that1.Field11) + } + } else if this.Field11 != nil { + return fmt.Errorf("this.Field11 == nil && that.Field11 != nil") + } else if that1.Field11 != nil { + return fmt.Errorf("Field11 this(%v) Not Equal that(%v)", this.Field11, that1.Field11) + } + if this.Field12 != nil && that1.Field12 != nil { + if *this.Field12 != *that1.Field12 { + return fmt.Errorf("Field12 this(%v) Not Equal that(%v)", *this.Field12, *that1.Field12) + } + } else if this.Field12 != nil { + return fmt.Errorf("this.Field12 == nil && that.Field12 != nil") + } else if that1.Field12 != nil { + return fmt.Errorf("Field12 this(%v) Not Equal that(%v)", this.Field12, that1.Field12) + } + if this.Field13 != nil && that1.Field13 != nil { + if *this.Field13 != *that1.Field13 { + return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", *this.Field13, *that1.Field13) + } + } else if this.Field13 != nil { + return fmt.Errorf("this.Field13 == nil && that.Field13 != nil") + } else if that1.Field13 != nil { + return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", this.Field13, that1.Field13) + } + if this.Field14 != nil && that1.Field14 != nil { + if *this.Field14 != *that1.Field14 { + return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", *this.Field14, *that1.Field14) + } + } else if this.Field14 != nil { + return fmt.Errorf("this.Field14 == nil && that.Field14 != nil") + } else if that1.Field14 != nil { + return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", this.Field14, that1.Field14) + } + if !bytes.Equal(this.Field15, that1.Field15) { + return fmt.Errorf("Field15 this(%v) Not Equal that(%v)", this.Field15, that1.Field15) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NinOptNative) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*NinOptNative) + if !ok { + that2, ok := that.(NinOptNative) + 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.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return false + } + } else if this.Field1 != nil { + return false + } else if that1.Field1 != nil { + return false + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + return false + } + } else if this.Field2 != nil { + return false + } else if that1.Field2 != nil { + return false + } + if this.Field3 != nil && that1.Field3 != nil { + if *this.Field3 != *that1.Field3 { + return false + } + } else if this.Field3 != nil { + return false + } else if that1.Field3 != nil { + return false + } + if this.Field4 != nil && that1.Field4 != nil { + if *this.Field4 != *that1.Field4 { + return false + } + } else if this.Field4 != nil { + return false + } else if that1.Field4 != nil { + return false + } + if this.Field5 != nil && that1.Field5 != nil { + if *this.Field5 != *that1.Field5 { + return false + } + } else if this.Field5 != nil { + return false + } else if that1.Field5 != nil { + return false + } + if this.Field6 != nil && that1.Field6 != nil { + if *this.Field6 != *that1.Field6 { + return false + } + } else if this.Field6 != nil { + return false + } else if that1.Field6 != nil { + return false + } + if this.Field7 != nil && that1.Field7 != nil { + if *this.Field7 != *that1.Field7 { + return false + } + } else if this.Field7 != nil { + return false + } else if that1.Field7 != nil { + return false + } + if this.Field8 != nil && that1.Field8 != nil { + if *this.Field8 != *that1.Field8 { + return false + } + } else if this.Field8 != nil { + return false + } else if that1.Field8 != nil { + return false + } + if this.Field9 != nil && that1.Field9 != nil { + if *this.Field9 != *that1.Field9 { + return false + } + } else if this.Field9 != nil { + return false + } else if that1.Field9 != nil { + return false + } + if this.Field10 != nil && that1.Field10 != nil { + if *this.Field10 != *that1.Field10 { + return false + } + } else if this.Field10 != nil { + return false + } else if that1.Field10 != nil { + return false + } + if this.Field11 != nil && that1.Field11 != nil { + if *this.Field11 != *that1.Field11 { + return false + } + } else if this.Field11 != nil { + return false + } else if that1.Field11 != nil { + return false + } + if this.Field12 != nil && that1.Field12 != nil { + if *this.Field12 != *that1.Field12 { + return false + } + } else if this.Field12 != nil { + return false + } else if that1.Field12 != nil { + return false + } + if this.Field13 != nil && that1.Field13 != nil { + if *this.Field13 != *that1.Field13 { + return false + } + } else if this.Field13 != nil { + return false + } else if that1.Field13 != nil { + return false + } + if this.Field14 != nil && that1.Field14 != nil { + if *this.Field14 != *that1.Field14 { + return false + } + } else if this.Field14 != nil { + return false + } else if that1.Field14 != nil { + return false + } + if !bytes.Equal(this.Field15, that1.Field15) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NidRepNative) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NidRepNative) + if !ok { + that2, ok := that.(NidRepNative) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NidRepNative") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NidRepNative but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NidRepNative but is not nil && this == nil") + } + if len(this.Field1) != len(that1.Field1) { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", len(this.Field1), len(that1.Field1)) + } + for i := range this.Field1 { + if this.Field1[i] != that1.Field1[i] { + return fmt.Errorf("Field1 this[%v](%v) Not Equal that[%v](%v)", i, this.Field1[i], i, that1.Field1[i]) + } + } + if len(this.Field2) != len(that1.Field2) { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", len(this.Field2), len(that1.Field2)) + } + for i := range this.Field2 { + if this.Field2[i] != that1.Field2[i] { + return fmt.Errorf("Field2 this[%v](%v) Not Equal that[%v](%v)", i, this.Field2[i], i, that1.Field2[i]) + } + } + if len(this.Field3) != len(that1.Field3) { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", len(this.Field3), len(that1.Field3)) + } + for i := range this.Field3 { + if this.Field3[i] != that1.Field3[i] { + return fmt.Errorf("Field3 this[%v](%v) Not Equal that[%v](%v)", i, this.Field3[i], i, that1.Field3[i]) + } + } + if len(this.Field4) != len(that1.Field4) { + return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", len(this.Field4), len(that1.Field4)) + } + for i := range this.Field4 { + if this.Field4[i] != that1.Field4[i] { + return fmt.Errorf("Field4 this[%v](%v) Not Equal that[%v](%v)", i, this.Field4[i], i, that1.Field4[i]) + } + } + if len(this.Field5) != len(that1.Field5) { + return fmt.Errorf("Field5 this(%v) Not Equal that(%v)", len(this.Field5), len(that1.Field5)) + } + for i := range this.Field5 { + if this.Field5[i] != that1.Field5[i] { + return fmt.Errorf("Field5 this[%v](%v) Not Equal that[%v](%v)", i, this.Field5[i], i, that1.Field5[i]) + } + } + if len(this.Field6) != len(that1.Field6) { + return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", len(this.Field6), len(that1.Field6)) + } + for i := range this.Field6 { + if this.Field6[i] != that1.Field6[i] { + return fmt.Errorf("Field6 this[%v](%v) Not Equal that[%v](%v)", i, this.Field6[i], i, that1.Field6[i]) + } + } + if len(this.Field7) != len(that1.Field7) { + return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", len(this.Field7), len(that1.Field7)) + } + for i := range this.Field7 { + if this.Field7[i] != that1.Field7[i] { + return fmt.Errorf("Field7 this[%v](%v) Not Equal that[%v](%v)", i, this.Field7[i], i, that1.Field7[i]) + } + } + if len(this.Field8) != len(that1.Field8) { + return fmt.Errorf("Field8 this(%v) Not Equal that(%v)", len(this.Field8), len(that1.Field8)) + } + for i := range this.Field8 { + if this.Field8[i] != that1.Field8[i] { + return fmt.Errorf("Field8 this[%v](%v) Not Equal that[%v](%v)", i, this.Field8[i], i, that1.Field8[i]) + } + } + if len(this.Field9) != len(that1.Field9) { + return fmt.Errorf("Field9 this(%v) Not Equal that(%v)", len(this.Field9), len(that1.Field9)) + } + for i := range this.Field9 { + if this.Field9[i] != that1.Field9[i] { + return fmt.Errorf("Field9 this[%v](%v) Not Equal that[%v](%v)", i, this.Field9[i], i, that1.Field9[i]) + } + } + if len(this.Field10) != len(that1.Field10) { + return fmt.Errorf("Field10 this(%v) Not Equal that(%v)", len(this.Field10), len(that1.Field10)) + } + for i := range this.Field10 { + if this.Field10[i] != that1.Field10[i] { + return fmt.Errorf("Field10 this[%v](%v) Not Equal that[%v](%v)", i, this.Field10[i], i, that1.Field10[i]) + } + } + if len(this.Field11) != len(that1.Field11) { + return fmt.Errorf("Field11 this(%v) Not Equal that(%v)", len(this.Field11), len(that1.Field11)) + } + for i := range this.Field11 { + if this.Field11[i] != that1.Field11[i] { + return fmt.Errorf("Field11 this[%v](%v) Not Equal that[%v](%v)", i, this.Field11[i], i, that1.Field11[i]) + } + } + if len(this.Field12) != len(that1.Field12) { + return fmt.Errorf("Field12 this(%v) Not Equal that(%v)", len(this.Field12), len(that1.Field12)) + } + for i := range this.Field12 { + if this.Field12[i] != that1.Field12[i] { + return fmt.Errorf("Field12 this[%v](%v) Not Equal that[%v](%v)", i, this.Field12[i], i, that1.Field12[i]) + } + } + if len(this.Field13) != len(that1.Field13) { + return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", len(this.Field13), len(that1.Field13)) + } + for i := range this.Field13 { + if this.Field13[i] != that1.Field13[i] { + return fmt.Errorf("Field13 this[%v](%v) Not Equal that[%v](%v)", i, this.Field13[i], i, that1.Field13[i]) + } + } + if len(this.Field14) != len(that1.Field14) { + return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", len(this.Field14), len(that1.Field14)) + } + for i := range this.Field14 { + if this.Field14[i] != that1.Field14[i] { + return fmt.Errorf("Field14 this[%v](%v) Not Equal that[%v](%v)", i, this.Field14[i], i, that1.Field14[i]) + } + } + if len(this.Field15) != len(that1.Field15) { + return fmt.Errorf("Field15 this(%v) Not Equal that(%v)", len(this.Field15), len(that1.Field15)) + } + for i := range this.Field15 { + if !bytes.Equal(this.Field15[i], that1.Field15[i]) { + return fmt.Errorf("Field15 this[%v](%v) Not Equal that[%v](%v)", i, this.Field15[i], i, that1.Field15[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NidRepNative) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*NidRepNative) + if !ok { + that2, ok := that.(NidRepNative) + 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.Field1) != len(that1.Field1) { + return false + } + for i := range this.Field1 { + if this.Field1[i] != that1.Field1[i] { + return false + } + } + if len(this.Field2) != len(that1.Field2) { + return false + } + for i := range this.Field2 { + if this.Field2[i] != that1.Field2[i] { + return false + } + } + if len(this.Field3) != len(that1.Field3) { + return false + } + for i := range this.Field3 { + if this.Field3[i] != that1.Field3[i] { + return false + } + } + if len(this.Field4) != len(that1.Field4) { + return false + } + for i := range this.Field4 { + if this.Field4[i] != that1.Field4[i] { + return false + } + } + if len(this.Field5) != len(that1.Field5) { + return false + } + for i := range this.Field5 { + if this.Field5[i] != that1.Field5[i] { + return false + } + } + if len(this.Field6) != len(that1.Field6) { + return false + } + for i := range this.Field6 { + if this.Field6[i] != that1.Field6[i] { + return false + } + } + if len(this.Field7) != len(that1.Field7) { + return false + } + for i := range this.Field7 { + if this.Field7[i] != that1.Field7[i] { + return false + } + } + if len(this.Field8) != len(that1.Field8) { + return false + } + for i := range this.Field8 { + if this.Field8[i] != that1.Field8[i] { + return false + } + } + if len(this.Field9) != len(that1.Field9) { + return false + } + for i := range this.Field9 { + if this.Field9[i] != that1.Field9[i] { + return false + } + } + if len(this.Field10) != len(that1.Field10) { + return false + } + for i := range this.Field10 { + if this.Field10[i] != that1.Field10[i] { + return false + } + } + if len(this.Field11) != len(that1.Field11) { + return false + } + for i := range this.Field11 { + if this.Field11[i] != that1.Field11[i] { + return false + } + } + if len(this.Field12) != len(that1.Field12) { + return false + } + for i := range this.Field12 { + if this.Field12[i] != that1.Field12[i] { + return false + } + } + if len(this.Field13) != len(that1.Field13) { + return false + } + for i := range this.Field13 { + if this.Field13[i] != that1.Field13[i] { + return false + } + } + if len(this.Field14) != len(that1.Field14) { + return false + } + for i := range this.Field14 { + if this.Field14[i] != that1.Field14[i] { + return false + } + } + if len(this.Field15) != len(that1.Field15) { + return false + } + for i := range this.Field15 { + if !bytes.Equal(this.Field15[i], that1.Field15[i]) { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NinRepNative) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NinRepNative) + if !ok { + that2, ok := that.(NinRepNative) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NinRepNative") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NinRepNative but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NinRepNative but is not nil && this == nil") + } + if len(this.Field1) != len(that1.Field1) { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", len(this.Field1), len(that1.Field1)) + } + for i := range this.Field1 { + if this.Field1[i] != that1.Field1[i] { + return fmt.Errorf("Field1 this[%v](%v) Not Equal that[%v](%v)", i, this.Field1[i], i, that1.Field1[i]) + } + } + if len(this.Field2) != len(that1.Field2) { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", len(this.Field2), len(that1.Field2)) + } + for i := range this.Field2 { + if this.Field2[i] != that1.Field2[i] { + return fmt.Errorf("Field2 this[%v](%v) Not Equal that[%v](%v)", i, this.Field2[i], i, that1.Field2[i]) + } + } + if len(this.Field3) != len(that1.Field3) { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", len(this.Field3), len(that1.Field3)) + } + for i := range this.Field3 { + if this.Field3[i] != that1.Field3[i] { + return fmt.Errorf("Field3 this[%v](%v) Not Equal that[%v](%v)", i, this.Field3[i], i, that1.Field3[i]) + } + } + if len(this.Field4) != len(that1.Field4) { + return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", len(this.Field4), len(that1.Field4)) + } + for i := range this.Field4 { + if this.Field4[i] != that1.Field4[i] { + return fmt.Errorf("Field4 this[%v](%v) Not Equal that[%v](%v)", i, this.Field4[i], i, that1.Field4[i]) + } + } + if len(this.Field5) != len(that1.Field5) { + return fmt.Errorf("Field5 this(%v) Not Equal that(%v)", len(this.Field5), len(that1.Field5)) + } + for i := range this.Field5 { + if this.Field5[i] != that1.Field5[i] { + return fmt.Errorf("Field5 this[%v](%v) Not Equal that[%v](%v)", i, this.Field5[i], i, that1.Field5[i]) + } + } + if len(this.Field6) != len(that1.Field6) { + return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", len(this.Field6), len(that1.Field6)) + } + for i := range this.Field6 { + if this.Field6[i] != that1.Field6[i] { + return fmt.Errorf("Field6 this[%v](%v) Not Equal that[%v](%v)", i, this.Field6[i], i, that1.Field6[i]) + } + } + if len(this.Field7) != len(that1.Field7) { + return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", len(this.Field7), len(that1.Field7)) + } + for i := range this.Field7 { + if this.Field7[i] != that1.Field7[i] { + return fmt.Errorf("Field7 this[%v](%v) Not Equal that[%v](%v)", i, this.Field7[i], i, that1.Field7[i]) + } + } + if len(this.Field8) != len(that1.Field8) { + return fmt.Errorf("Field8 this(%v) Not Equal that(%v)", len(this.Field8), len(that1.Field8)) + } + for i := range this.Field8 { + if this.Field8[i] != that1.Field8[i] { + return fmt.Errorf("Field8 this[%v](%v) Not Equal that[%v](%v)", i, this.Field8[i], i, that1.Field8[i]) + } + } + if len(this.Field9) != len(that1.Field9) { + return fmt.Errorf("Field9 this(%v) Not Equal that(%v)", len(this.Field9), len(that1.Field9)) + } + for i := range this.Field9 { + if this.Field9[i] != that1.Field9[i] { + return fmt.Errorf("Field9 this[%v](%v) Not Equal that[%v](%v)", i, this.Field9[i], i, that1.Field9[i]) + } + } + if len(this.Field10) != len(that1.Field10) { + return fmt.Errorf("Field10 this(%v) Not Equal that(%v)", len(this.Field10), len(that1.Field10)) + } + for i := range this.Field10 { + if this.Field10[i] != that1.Field10[i] { + return fmt.Errorf("Field10 this[%v](%v) Not Equal that[%v](%v)", i, this.Field10[i], i, that1.Field10[i]) + } + } + if len(this.Field11) != len(that1.Field11) { + return fmt.Errorf("Field11 this(%v) Not Equal that(%v)", len(this.Field11), len(that1.Field11)) + } + for i := range this.Field11 { + if this.Field11[i] != that1.Field11[i] { + return fmt.Errorf("Field11 this[%v](%v) Not Equal that[%v](%v)", i, this.Field11[i], i, that1.Field11[i]) + } + } + if len(this.Field12) != len(that1.Field12) { + return fmt.Errorf("Field12 this(%v) Not Equal that(%v)", len(this.Field12), len(that1.Field12)) + } + for i := range this.Field12 { + if this.Field12[i] != that1.Field12[i] { + return fmt.Errorf("Field12 this[%v](%v) Not Equal that[%v](%v)", i, this.Field12[i], i, that1.Field12[i]) + } + } + if len(this.Field13) != len(that1.Field13) { + return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", len(this.Field13), len(that1.Field13)) + } + for i := range this.Field13 { + if this.Field13[i] != that1.Field13[i] { + return fmt.Errorf("Field13 this[%v](%v) Not Equal that[%v](%v)", i, this.Field13[i], i, that1.Field13[i]) + } + } + if len(this.Field14) != len(that1.Field14) { + return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", len(this.Field14), len(that1.Field14)) + } + for i := range this.Field14 { + if this.Field14[i] != that1.Field14[i] { + return fmt.Errorf("Field14 this[%v](%v) Not Equal that[%v](%v)", i, this.Field14[i], i, that1.Field14[i]) + } + } + if len(this.Field15) != len(that1.Field15) { + return fmt.Errorf("Field15 this(%v) Not Equal that(%v)", len(this.Field15), len(that1.Field15)) + } + for i := range this.Field15 { + if !bytes.Equal(this.Field15[i], that1.Field15[i]) { + return fmt.Errorf("Field15 this[%v](%v) Not Equal that[%v](%v)", i, this.Field15[i], i, that1.Field15[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NinRepNative) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*NinRepNative) + if !ok { + that2, ok := that.(NinRepNative) + 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.Field1) != len(that1.Field1) { + return false + } + for i := range this.Field1 { + if this.Field1[i] != that1.Field1[i] { + return false + } + } + if len(this.Field2) != len(that1.Field2) { + return false + } + for i := range this.Field2 { + if this.Field2[i] != that1.Field2[i] { + return false + } + } + if len(this.Field3) != len(that1.Field3) { + return false + } + for i := range this.Field3 { + if this.Field3[i] != that1.Field3[i] { + return false + } + } + if len(this.Field4) != len(that1.Field4) { + return false + } + for i := range this.Field4 { + if this.Field4[i] != that1.Field4[i] { + return false + } + } + if len(this.Field5) != len(that1.Field5) { + return false + } + for i := range this.Field5 { + if this.Field5[i] != that1.Field5[i] { + return false + } + } + if len(this.Field6) != len(that1.Field6) { + return false + } + for i := range this.Field6 { + if this.Field6[i] != that1.Field6[i] { + return false + } + } + if len(this.Field7) != len(that1.Field7) { + return false + } + for i := range this.Field7 { + if this.Field7[i] != that1.Field7[i] { + return false + } + } + if len(this.Field8) != len(that1.Field8) { + return false + } + for i := range this.Field8 { + if this.Field8[i] != that1.Field8[i] { + return false + } + } + if len(this.Field9) != len(that1.Field9) { + return false + } + for i := range this.Field9 { + if this.Field9[i] != that1.Field9[i] { + return false + } + } + if len(this.Field10) != len(that1.Field10) { + return false + } + for i := range this.Field10 { + if this.Field10[i] != that1.Field10[i] { + return false + } + } + if len(this.Field11) != len(that1.Field11) { + return false + } + for i := range this.Field11 { + if this.Field11[i] != that1.Field11[i] { + return false + } + } + if len(this.Field12) != len(that1.Field12) { + return false + } + for i := range this.Field12 { + if this.Field12[i] != that1.Field12[i] { + return false + } + } + if len(this.Field13) != len(that1.Field13) { + return false + } + for i := range this.Field13 { + if this.Field13[i] != that1.Field13[i] { + return false + } + } + if len(this.Field14) != len(that1.Field14) { + return false + } + for i := range this.Field14 { + if this.Field14[i] != that1.Field14[i] { + return false + } + } + if len(this.Field15) != len(that1.Field15) { + return false + } + for i := range this.Field15 { + if !bytes.Equal(this.Field15[i], that1.Field15[i]) { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NidRepPackedNative) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NidRepPackedNative) + if !ok { + that2, ok := that.(NidRepPackedNative) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NidRepPackedNative") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NidRepPackedNative but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NidRepPackedNative but is not nil && this == nil") + } + if len(this.Field1) != len(that1.Field1) { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", len(this.Field1), len(that1.Field1)) + } + for i := range this.Field1 { + if this.Field1[i] != that1.Field1[i] { + return fmt.Errorf("Field1 this[%v](%v) Not Equal that[%v](%v)", i, this.Field1[i], i, that1.Field1[i]) + } + } + if len(this.Field2) != len(that1.Field2) { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", len(this.Field2), len(that1.Field2)) + } + for i := range this.Field2 { + if this.Field2[i] != that1.Field2[i] { + return fmt.Errorf("Field2 this[%v](%v) Not Equal that[%v](%v)", i, this.Field2[i], i, that1.Field2[i]) + } + } + if len(this.Field3) != len(that1.Field3) { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", len(this.Field3), len(that1.Field3)) + } + for i := range this.Field3 { + if this.Field3[i] != that1.Field3[i] { + return fmt.Errorf("Field3 this[%v](%v) Not Equal that[%v](%v)", i, this.Field3[i], i, that1.Field3[i]) + } + } + if len(this.Field4) != len(that1.Field4) { + return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", len(this.Field4), len(that1.Field4)) + } + for i := range this.Field4 { + if this.Field4[i] != that1.Field4[i] { + return fmt.Errorf("Field4 this[%v](%v) Not Equal that[%v](%v)", i, this.Field4[i], i, that1.Field4[i]) + } + } + if len(this.Field5) != len(that1.Field5) { + return fmt.Errorf("Field5 this(%v) Not Equal that(%v)", len(this.Field5), len(that1.Field5)) + } + for i := range this.Field5 { + if this.Field5[i] != that1.Field5[i] { + return fmt.Errorf("Field5 this[%v](%v) Not Equal that[%v](%v)", i, this.Field5[i], i, that1.Field5[i]) + } + } + if len(this.Field6) != len(that1.Field6) { + return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", len(this.Field6), len(that1.Field6)) + } + for i := range this.Field6 { + if this.Field6[i] != that1.Field6[i] { + return fmt.Errorf("Field6 this[%v](%v) Not Equal that[%v](%v)", i, this.Field6[i], i, that1.Field6[i]) + } + } + if len(this.Field7) != len(that1.Field7) { + return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", len(this.Field7), len(that1.Field7)) + } + for i := range this.Field7 { + if this.Field7[i] != that1.Field7[i] { + return fmt.Errorf("Field7 this[%v](%v) Not Equal that[%v](%v)", i, this.Field7[i], i, that1.Field7[i]) + } + } + if len(this.Field8) != len(that1.Field8) { + return fmt.Errorf("Field8 this(%v) Not Equal that(%v)", len(this.Field8), len(that1.Field8)) + } + for i := range this.Field8 { + if this.Field8[i] != that1.Field8[i] { + return fmt.Errorf("Field8 this[%v](%v) Not Equal that[%v](%v)", i, this.Field8[i], i, that1.Field8[i]) + } + } + if len(this.Field9) != len(that1.Field9) { + return fmt.Errorf("Field9 this(%v) Not Equal that(%v)", len(this.Field9), len(that1.Field9)) + } + for i := range this.Field9 { + if this.Field9[i] != that1.Field9[i] { + return fmt.Errorf("Field9 this[%v](%v) Not Equal that[%v](%v)", i, this.Field9[i], i, that1.Field9[i]) + } + } + if len(this.Field10) != len(that1.Field10) { + return fmt.Errorf("Field10 this(%v) Not Equal that(%v)", len(this.Field10), len(that1.Field10)) + } + for i := range this.Field10 { + if this.Field10[i] != that1.Field10[i] { + return fmt.Errorf("Field10 this[%v](%v) Not Equal that[%v](%v)", i, this.Field10[i], i, that1.Field10[i]) + } + } + if len(this.Field11) != len(that1.Field11) { + return fmt.Errorf("Field11 this(%v) Not Equal that(%v)", len(this.Field11), len(that1.Field11)) + } + for i := range this.Field11 { + if this.Field11[i] != that1.Field11[i] { + return fmt.Errorf("Field11 this[%v](%v) Not Equal that[%v](%v)", i, this.Field11[i], i, that1.Field11[i]) + } + } + if len(this.Field12) != len(that1.Field12) { + return fmt.Errorf("Field12 this(%v) Not Equal that(%v)", len(this.Field12), len(that1.Field12)) + } + for i := range this.Field12 { + if this.Field12[i] != that1.Field12[i] { + return fmt.Errorf("Field12 this[%v](%v) Not Equal that[%v](%v)", i, this.Field12[i], i, that1.Field12[i]) + } + } + if len(this.Field13) != len(that1.Field13) { + return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", len(this.Field13), len(that1.Field13)) + } + for i := range this.Field13 { + if this.Field13[i] != that1.Field13[i] { + return fmt.Errorf("Field13 this[%v](%v) Not Equal that[%v](%v)", i, this.Field13[i], i, that1.Field13[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NidRepPackedNative) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*NidRepPackedNative) + if !ok { + that2, ok := that.(NidRepPackedNative) + 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.Field1) != len(that1.Field1) { + return false + } + for i := range this.Field1 { + if this.Field1[i] != that1.Field1[i] { + return false + } + } + if len(this.Field2) != len(that1.Field2) { + return false + } + for i := range this.Field2 { + if this.Field2[i] != that1.Field2[i] { + return false + } + } + if len(this.Field3) != len(that1.Field3) { + return false + } + for i := range this.Field3 { + if this.Field3[i] != that1.Field3[i] { + return false + } + } + if len(this.Field4) != len(that1.Field4) { + return false + } + for i := range this.Field4 { + if this.Field4[i] != that1.Field4[i] { + return false + } + } + if len(this.Field5) != len(that1.Field5) { + return false + } + for i := range this.Field5 { + if this.Field5[i] != that1.Field5[i] { + return false + } + } + if len(this.Field6) != len(that1.Field6) { + return false + } + for i := range this.Field6 { + if this.Field6[i] != that1.Field6[i] { + return false + } + } + if len(this.Field7) != len(that1.Field7) { + return false + } + for i := range this.Field7 { + if this.Field7[i] != that1.Field7[i] { + return false + } + } + if len(this.Field8) != len(that1.Field8) { + return false + } + for i := range this.Field8 { + if this.Field8[i] != that1.Field8[i] { + return false + } + } + if len(this.Field9) != len(that1.Field9) { + return false + } + for i := range this.Field9 { + if this.Field9[i] != that1.Field9[i] { + return false + } + } + if len(this.Field10) != len(that1.Field10) { + return false + } + for i := range this.Field10 { + if this.Field10[i] != that1.Field10[i] { + return false + } + } + if len(this.Field11) != len(that1.Field11) { + return false + } + for i := range this.Field11 { + if this.Field11[i] != that1.Field11[i] { + return false + } + } + if len(this.Field12) != len(that1.Field12) { + return false + } + for i := range this.Field12 { + if this.Field12[i] != that1.Field12[i] { + return false + } + } + if len(this.Field13) != len(that1.Field13) { + return false + } + for i := range this.Field13 { + if this.Field13[i] != that1.Field13[i] { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NinRepPackedNative) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NinRepPackedNative) + if !ok { + that2, ok := that.(NinRepPackedNative) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NinRepPackedNative") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NinRepPackedNative but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NinRepPackedNative but is not nil && this == nil") + } + if len(this.Field1) != len(that1.Field1) { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", len(this.Field1), len(that1.Field1)) + } + for i := range this.Field1 { + if this.Field1[i] != that1.Field1[i] { + return fmt.Errorf("Field1 this[%v](%v) Not Equal that[%v](%v)", i, this.Field1[i], i, that1.Field1[i]) + } + } + if len(this.Field2) != len(that1.Field2) { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", len(this.Field2), len(that1.Field2)) + } + for i := range this.Field2 { + if this.Field2[i] != that1.Field2[i] { + return fmt.Errorf("Field2 this[%v](%v) Not Equal that[%v](%v)", i, this.Field2[i], i, that1.Field2[i]) + } + } + if len(this.Field3) != len(that1.Field3) { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", len(this.Field3), len(that1.Field3)) + } + for i := range this.Field3 { + if this.Field3[i] != that1.Field3[i] { + return fmt.Errorf("Field3 this[%v](%v) Not Equal that[%v](%v)", i, this.Field3[i], i, that1.Field3[i]) + } + } + if len(this.Field4) != len(that1.Field4) { + return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", len(this.Field4), len(that1.Field4)) + } + for i := range this.Field4 { + if this.Field4[i] != that1.Field4[i] { + return fmt.Errorf("Field4 this[%v](%v) Not Equal that[%v](%v)", i, this.Field4[i], i, that1.Field4[i]) + } + } + if len(this.Field5) != len(that1.Field5) { + return fmt.Errorf("Field5 this(%v) Not Equal that(%v)", len(this.Field5), len(that1.Field5)) + } + for i := range this.Field5 { + if this.Field5[i] != that1.Field5[i] { + return fmt.Errorf("Field5 this[%v](%v) Not Equal that[%v](%v)", i, this.Field5[i], i, that1.Field5[i]) + } + } + if len(this.Field6) != len(that1.Field6) { + return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", len(this.Field6), len(that1.Field6)) + } + for i := range this.Field6 { + if this.Field6[i] != that1.Field6[i] { + return fmt.Errorf("Field6 this[%v](%v) Not Equal that[%v](%v)", i, this.Field6[i], i, that1.Field6[i]) + } + } + if len(this.Field7) != len(that1.Field7) { + return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", len(this.Field7), len(that1.Field7)) + } + for i := range this.Field7 { + if this.Field7[i] != that1.Field7[i] { + return fmt.Errorf("Field7 this[%v](%v) Not Equal that[%v](%v)", i, this.Field7[i], i, that1.Field7[i]) + } + } + if len(this.Field8) != len(that1.Field8) { + return fmt.Errorf("Field8 this(%v) Not Equal that(%v)", len(this.Field8), len(that1.Field8)) + } + for i := range this.Field8 { + if this.Field8[i] != that1.Field8[i] { + return fmt.Errorf("Field8 this[%v](%v) Not Equal that[%v](%v)", i, this.Field8[i], i, that1.Field8[i]) + } + } + if len(this.Field9) != len(that1.Field9) { + return fmt.Errorf("Field9 this(%v) Not Equal that(%v)", len(this.Field9), len(that1.Field9)) + } + for i := range this.Field9 { + if this.Field9[i] != that1.Field9[i] { + return fmt.Errorf("Field9 this[%v](%v) Not Equal that[%v](%v)", i, this.Field9[i], i, that1.Field9[i]) + } + } + if len(this.Field10) != len(that1.Field10) { + return fmt.Errorf("Field10 this(%v) Not Equal that(%v)", len(this.Field10), len(that1.Field10)) + } + for i := range this.Field10 { + if this.Field10[i] != that1.Field10[i] { + return fmt.Errorf("Field10 this[%v](%v) Not Equal that[%v](%v)", i, this.Field10[i], i, that1.Field10[i]) + } + } + if len(this.Field11) != len(that1.Field11) { + return fmt.Errorf("Field11 this(%v) Not Equal that(%v)", len(this.Field11), len(that1.Field11)) + } + for i := range this.Field11 { + if this.Field11[i] != that1.Field11[i] { + return fmt.Errorf("Field11 this[%v](%v) Not Equal that[%v](%v)", i, this.Field11[i], i, that1.Field11[i]) + } + } + if len(this.Field12) != len(that1.Field12) { + return fmt.Errorf("Field12 this(%v) Not Equal that(%v)", len(this.Field12), len(that1.Field12)) + } + for i := range this.Field12 { + if this.Field12[i] != that1.Field12[i] { + return fmt.Errorf("Field12 this[%v](%v) Not Equal that[%v](%v)", i, this.Field12[i], i, that1.Field12[i]) + } + } + if len(this.Field13) != len(that1.Field13) { + return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", len(this.Field13), len(that1.Field13)) + } + for i := range this.Field13 { + if this.Field13[i] != that1.Field13[i] { + return fmt.Errorf("Field13 this[%v](%v) Not Equal that[%v](%v)", i, this.Field13[i], i, that1.Field13[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NinRepPackedNative) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*NinRepPackedNative) + if !ok { + that2, ok := that.(NinRepPackedNative) + 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.Field1) != len(that1.Field1) { + return false + } + for i := range this.Field1 { + if this.Field1[i] != that1.Field1[i] { + return false + } + } + if len(this.Field2) != len(that1.Field2) { + return false + } + for i := range this.Field2 { + if this.Field2[i] != that1.Field2[i] { + return false + } + } + if len(this.Field3) != len(that1.Field3) { + return false + } + for i := range this.Field3 { + if this.Field3[i] != that1.Field3[i] { + return false + } + } + if len(this.Field4) != len(that1.Field4) { + return false + } + for i := range this.Field4 { + if this.Field4[i] != that1.Field4[i] { + return false + } + } + if len(this.Field5) != len(that1.Field5) { + return false + } + for i := range this.Field5 { + if this.Field5[i] != that1.Field5[i] { + return false + } + } + if len(this.Field6) != len(that1.Field6) { + return false + } + for i := range this.Field6 { + if this.Field6[i] != that1.Field6[i] { + return false + } + } + if len(this.Field7) != len(that1.Field7) { + return false + } + for i := range this.Field7 { + if this.Field7[i] != that1.Field7[i] { + return false + } + } + if len(this.Field8) != len(that1.Field8) { + return false + } + for i := range this.Field8 { + if this.Field8[i] != that1.Field8[i] { + return false + } + } + if len(this.Field9) != len(that1.Field9) { + return false + } + for i := range this.Field9 { + if this.Field9[i] != that1.Field9[i] { + return false + } + } + if len(this.Field10) != len(that1.Field10) { + return false + } + for i := range this.Field10 { + if this.Field10[i] != that1.Field10[i] { + return false + } + } + if len(this.Field11) != len(that1.Field11) { + return false + } + for i := range this.Field11 { + if this.Field11[i] != that1.Field11[i] { + return false + } + } + if len(this.Field12) != len(that1.Field12) { + return false + } + for i := range this.Field12 { + if this.Field12[i] != that1.Field12[i] { + return false + } + } + if len(this.Field13) != len(that1.Field13) { + return false + } + for i := range this.Field13 { + if this.Field13[i] != that1.Field13[i] { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NidOptStruct) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NidOptStruct) + if !ok { + that2, ok := that.(NidOptStruct) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NidOptStruct") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NidOptStruct but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NidOptStruct but is not nil && this == nil") + } + if this.Field1 != that1.Field1 { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) + } + if this.Field2 != that1.Field2 { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) + } + if !this.Field3.Equal(&that1.Field3) { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", this.Field3, that1.Field3) + } + if !this.Field4.Equal(&that1.Field4) { + return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", this.Field4, that1.Field4) + } + if this.Field6 != that1.Field6 { + return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", this.Field6, that1.Field6) + } + if this.Field7 != that1.Field7 { + return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", this.Field7, that1.Field7) + } + if !this.Field8.Equal(&that1.Field8) { + return fmt.Errorf("Field8 this(%v) Not Equal that(%v)", this.Field8, that1.Field8) + } + if this.Field13 != that1.Field13 { + return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", this.Field13, that1.Field13) + } + if this.Field14 != that1.Field14 { + return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", this.Field14, that1.Field14) + } + if !bytes.Equal(this.Field15, that1.Field15) { + return fmt.Errorf("Field15 this(%v) Not Equal that(%v)", this.Field15, that1.Field15) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NidOptStruct) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*NidOptStruct) + if !ok { + that2, ok := that.(NidOptStruct) + 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.Field1 != that1.Field1 { + return false + } + if this.Field2 != that1.Field2 { + return false + } + if !this.Field3.Equal(&that1.Field3) { + return false + } + if !this.Field4.Equal(&that1.Field4) { + return false + } + if this.Field6 != that1.Field6 { + return false + } + if this.Field7 != that1.Field7 { + return false + } + if !this.Field8.Equal(&that1.Field8) { + return false + } + if this.Field13 != that1.Field13 { + return false + } + if this.Field14 != that1.Field14 { + return false + } + if !bytes.Equal(this.Field15, that1.Field15) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NinOptStruct) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NinOptStruct) + if !ok { + that2, ok := that.(NinOptStruct) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NinOptStruct") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NinOptStruct but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NinOptStruct but is not nil && this == nil") + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) + } + } else if this.Field1 != nil { + return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") + } else if that1.Field1 != nil { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", *this.Field2, *that1.Field2) + } + } else if this.Field2 != nil { + return fmt.Errorf("this.Field2 == nil && that.Field2 != nil") + } else if that1.Field2 != nil { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) + } + if !this.Field3.Equal(that1.Field3) { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", this.Field3, that1.Field3) + } + if !this.Field4.Equal(that1.Field4) { + return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", this.Field4, that1.Field4) + } + if this.Field6 != nil && that1.Field6 != nil { + if *this.Field6 != *that1.Field6 { + return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", *this.Field6, *that1.Field6) + } + } else if this.Field6 != nil { + return fmt.Errorf("this.Field6 == nil && that.Field6 != nil") + } else if that1.Field6 != nil { + return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", this.Field6, that1.Field6) + } + if this.Field7 != nil && that1.Field7 != nil { + if *this.Field7 != *that1.Field7 { + return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", *this.Field7, *that1.Field7) + } + } else if this.Field7 != nil { + return fmt.Errorf("this.Field7 == nil && that.Field7 != nil") + } else if that1.Field7 != nil { + return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", this.Field7, that1.Field7) + } + if !this.Field8.Equal(that1.Field8) { + return fmt.Errorf("Field8 this(%v) Not Equal that(%v)", this.Field8, that1.Field8) + } + if this.Field13 != nil && that1.Field13 != nil { + if *this.Field13 != *that1.Field13 { + return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", *this.Field13, *that1.Field13) + } + } else if this.Field13 != nil { + return fmt.Errorf("this.Field13 == nil && that.Field13 != nil") + } else if that1.Field13 != nil { + return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", this.Field13, that1.Field13) + } + if this.Field14 != nil && that1.Field14 != nil { + if *this.Field14 != *that1.Field14 { + return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", *this.Field14, *that1.Field14) + } + } else if this.Field14 != nil { + return fmt.Errorf("this.Field14 == nil && that.Field14 != nil") + } else if that1.Field14 != nil { + return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", this.Field14, that1.Field14) + } + if !bytes.Equal(this.Field15, that1.Field15) { + return fmt.Errorf("Field15 this(%v) Not Equal that(%v)", this.Field15, that1.Field15) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NinOptStruct) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*NinOptStruct) + if !ok { + that2, ok := that.(NinOptStruct) + 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.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return false + } + } else if this.Field1 != nil { + return false + } else if that1.Field1 != nil { + return false + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + return false + } + } else if this.Field2 != nil { + return false + } else if that1.Field2 != nil { + return false + } + if !this.Field3.Equal(that1.Field3) { + return false + } + if !this.Field4.Equal(that1.Field4) { + return false + } + if this.Field6 != nil && that1.Field6 != nil { + if *this.Field6 != *that1.Field6 { + return false + } + } else if this.Field6 != nil { + return false + } else if that1.Field6 != nil { + return false + } + if this.Field7 != nil && that1.Field7 != nil { + if *this.Field7 != *that1.Field7 { + return false + } + } else if this.Field7 != nil { + return false + } else if that1.Field7 != nil { + return false + } + if !this.Field8.Equal(that1.Field8) { + return false + } + if this.Field13 != nil && that1.Field13 != nil { + if *this.Field13 != *that1.Field13 { + return false + } + } else if this.Field13 != nil { + return false + } else if that1.Field13 != nil { + return false + } + if this.Field14 != nil && that1.Field14 != nil { + if *this.Field14 != *that1.Field14 { + return false + } + } else if this.Field14 != nil { + return false + } else if that1.Field14 != nil { + return false + } + if !bytes.Equal(this.Field15, that1.Field15) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NidRepStruct) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NidRepStruct) + if !ok { + that2, ok := that.(NidRepStruct) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NidRepStruct") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NidRepStruct but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NidRepStruct but is not nil && this == nil") + } + if len(this.Field1) != len(that1.Field1) { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", len(this.Field1), len(that1.Field1)) + } + for i := range this.Field1 { + if this.Field1[i] != that1.Field1[i] { + return fmt.Errorf("Field1 this[%v](%v) Not Equal that[%v](%v)", i, this.Field1[i], i, that1.Field1[i]) + } + } + if len(this.Field2) != len(that1.Field2) { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", len(this.Field2), len(that1.Field2)) + } + for i := range this.Field2 { + if this.Field2[i] != that1.Field2[i] { + return fmt.Errorf("Field2 this[%v](%v) Not Equal that[%v](%v)", i, this.Field2[i], i, that1.Field2[i]) + } + } + if len(this.Field3) != len(that1.Field3) { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", len(this.Field3), len(that1.Field3)) + } + for i := range this.Field3 { + if !this.Field3[i].Equal(&that1.Field3[i]) { + return fmt.Errorf("Field3 this[%v](%v) Not Equal that[%v](%v)", i, this.Field3[i], i, that1.Field3[i]) + } + } + if len(this.Field4) != len(that1.Field4) { + return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", len(this.Field4), len(that1.Field4)) + } + for i := range this.Field4 { + if !this.Field4[i].Equal(&that1.Field4[i]) { + return fmt.Errorf("Field4 this[%v](%v) Not Equal that[%v](%v)", i, this.Field4[i], i, that1.Field4[i]) + } + } + if len(this.Field6) != len(that1.Field6) { + return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", len(this.Field6), len(that1.Field6)) + } + for i := range this.Field6 { + if this.Field6[i] != that1.Field6[i] { + return fmt.Errorf("Field6 this[%v](%v) Not Equal that[%v](%v)", i, this.Field6[i], i, that1.Field6[i]) + } + } + if len(this.Field7) != len(that1.Field7) { + return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", len(this.Field7), len(that1.Field7)) + } + for i := range this.Field7 { + if this.Field7[i] != that1.Field7[i] { + return fmt.Errorf("Field7 this[%v](%v) Not Equal that[%v](%v)", i, this.Field7[i], i, that1.Field7[i]) + } + } + if len(this.Field8) != len(that1.Field8) { + return fmt.Errorf("Field8 this(%v) Not Equal that(%v)", len(this.Field8), len(that1.Field8)) + } + for i := range this.Field8 { + if !this.Field8[i].Equal(&that1.Field8[i]) { + return fmt.Errorf("Field8 this[%v](%v) Not Equal that[%v](%v)", i, this.Field8[i], i, that1.Field8[i]) + } + } + if len(this.Field13) != len(that1.Field13) { + return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", len(this.Field13), len(that1.Field13)) + } + for i := range this.Field13 { + if this.Field13[i] != that1.Field13[i] { + return fmt.Errorf("Field13 this[%v](%v) Not Equal that[%v](%v)", i, this.Field13[i], i, that1.Field13[i]) + } + } + if len(this.Field14) != len(that1.Field14) { + return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", len(this.Field14), len(that1.Field14)) + } + for i := range this.Field14 { + if this.Field14[i] != that1.Field14[i] { + return fmt.Errorf("Field14 this[%v](%v) Not Equal that[%v](%v)", i, this.Field14[i], i, that1.Field14[i]) + } + } + if len(this.Field15) != len(that1.Field15) { + return fmt.Errorf("Field15 this(%v) Not Equal that(%v)", len(this.Field15), len(that1.Field15)) + } + for i := range this.Field15 { + if !bytes.Equal(this.Field15[i], that1.Field15[i]) { + return fmt.Errorf("Field15 this[%v](%v) Not Equal that[%v](%v)", i, this.Field15[i], i, that1.Field15[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NidRepStruct) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*NidRepStruct) + if !ok { + that2, ok := that.(NidRepStruct) + 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.Field1) != len(that1.Field1) { + return false + } + for i := range this.Field1 { + if this.Field1[i] != that1.Field1[i] { + return false + } + } + if len(this.Field2) != len(that1.Field2) { + return false + } + for i := range this.Field2 { + if this.Field2[i] != that1.Field2[i] { + return false + } + } + if len(this.Field3) != len(that1.Field3) { + return false + } + for i := range this.Field3 { + if !this.Field3[i].Equal(&that1.Field3[i]) { + return false + } + } + if len(this.Field4) != len(that1.Field4) { + return false + } + for i := range this.Field4 { + if !this.Field4[i].Equal(&that1.Field4[i]) { + return false + } + } + if len(this.Field6) != len(that1.Field6) { + return false + } + for i := range this.Field6 { + if this.Field6[i] != that1.Field6[i] { + return false + } + } + if len(this.Field7) != len(that1.Field7) { + return false + } + for i := range this.Field7 { + if this.Field7[i] != that1.Field7[i] { + return false + } + } + if len(this.Field8) != len(that1.Field8) { + return false + } + for i := range this.Field8 { + if !this.Field8[i].Equal(&that1.Field8[i]) { + return false + } + } + if len(this.Field13) != len(that1.Field13) { + return false + } + for i := range this.Field13 { + if this.Field13[i] != that1.Field13[i] { + return false + } + } + if len(this.Field14) != len(that1.Field14) { + return false + } + for i := range this.Field14 { + if this.Field14[i] != that1.Field14[i] { + return false + } + } + if len(this.Field15) != len(that1.Field15) { + return false + } + for i := range this.Field15 { + if !bytes.Equal(this.Field15[i], that1.Field15[i]) { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NinRepStruct) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NinRepStruct) + if !ok { + that2, ok := that.(NinRepStruct) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NinRepStruct") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NinRepStruct but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NinRepStruct but is not nil && this == nil") + } + if len(this.Field1) != len(that1.Field1) { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", len(this.Field1), len(that1.Field1)) + } + for i := range this.Field1 { + if this.Field1[i] != that1.Field1[i] { + return fmt.Errorf("Field1 this[%v](%v) Not Equal that[%v](%v)", i, this.Field1[i], i, that1.Field1[i]) + } + } + if len(this.Field2) != len(that1.Field2) { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", len(this.Field2), len(that1.Field2)) + } + for i := range this.Field2 { + if this.Field2[i] != that1.Field2[i] { + return fmt.Errorf("Field2 this[%v](%v) Not Equal that[%v](%v)", i, this.Field2[i], i, that1.Field2[i]) + } + } + if len(this.Field3) != len(that1.Field3) { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", len(this.Field3), len(that1.Field3)) + } + for i := range this.Field3 { + if !this.Field3[i].Equal(that1.Field3[i]) { + return fmt.Errorf("Field3 this[%v](%v) Not Equal that[%v](%v)", i, this.Field3[i], i, that1.Field3[i]) + } + } + if len(this.Field4) != len(that1.Field4) { + return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", len(this.Field4), len(that1.Field4)) + } + for i := range this.Field4 { + if !this.Field4[i].Equal(that1.Field4[i]) { + return fmt.Errorf("Field4 this[%v](%v) Not Equal that[%v](%v)", i, this.Field4[i], i, that1.Field4[i]) + } + } + if len(this.Field6) != len(that1.Field6) { + return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", len(this.Field6), len(that1.Field6)) + } + for i := range this.Field6 { + if this.Field6[i] != that1.Field6[i] { + return fmt.Errorf("Field6 this[%v](%v) Not Equal that[%v](%v)", i, this.Field6[i], i, that1.Field6[i]) + } + } + if len(this.Field7) != len(that1.Field7) { + return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", len(this.Field7), len(that1.Field7)) + } + for i := range this.Field7 { + if this.Field7[i] != that1.Field7[i] { + return fmt.Errorf("Field7 this[%v](%v) Not Equal that[%v](%v)", i, this.Field7[i], i, that1.Field7[i]) + } + } + if len(this.Field8) != len(that1.Field8) { + return fmt.Errorf("Field8 this(%v) Not Equal that(%v)", len(this.Field8), len(that1.Field8)) + } + for i := range this.Field8 { + if !this.Field8[i].Equal(that1.Field8[i]) { + return fmt.Errorf("Field8 this[%v](%v) Not Equal that[%v](%v)", i, this.Field8[i], i, that1.Field8[i]) + } + } + if len(this.Field13) != len(that1.Field13) { + return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", len(this.Field13), len(that1.Field13)) + } + for i := range this.Field13 { + if this.Field13[i] != that1.Field13[i] { + return fmt.Errorf("Field13 this[%v](%v) Not Equal that[%v](%v)", i, this.Field13[i], i, that1.Field13[i]) + } + } + if len(this.Field14) != len(that1.Field14) { + return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", len(this.Field14), len(that1.Field14)) + } + for i := range this.Field14 { + if this.Field14[i] != that1.Field14[i] { + return fmt.Errorf("Field14 this[%v](%v) Not Equal that[%v](%v)", i, this.Field14[i], i, that1.Field14[i]) + } + } + if len(this.Field15) != len(that1.Field15) { + return fmt.Errorf("Field15 this(%v) Not Equal that(%v)", len(this.Field15), len(that1.Field15)) + } + for i := range this.Field15 { + if !bytes.Equal(this.Field15[i], that1.Field15[i]) { + return fmt.Errorf("Field15 this[%v](%v) Not Equal that[%v](%v)", i, this.Field15[i], i, that1.Field15[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NinRepStruct) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*NinRepStruct) + if !ok { + that2, ok := that.(NinRepStruct) + 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.Field1) != len(that1.Field1) { + return false + } + for i := range this.Field1 { + if this.Field1[i] != that1.Field1[i] { + return false + } + } + if len(this.Field2) != len(that1.Field2) { + return false + } + for i := range this.Field2 { + if this.Field2[i] != that1.Field2[i] { + return false + } + } + if len(this.Field3) != len(that1.Field3) { + return false + } + for i := range this.Field3 { + if !this.Field3[i].Equal(that1.Field3[i]) { + return false + } + } + if len(this.Field4) != len(that1.Field4) { + return false + } + for i := range this.Field4 { + if !this.Field4[i].Equal(that1.Field4[i]) { + return false + } + } + if len(this.Field6) != len(that1.Field6) { + return false + } + for i := range this.Field6 { + if this.Field6[i] != that1.Field6[i] { + return false + } + } + if len(this.Field7) != len(that1.Field7) { + return false + } + for i := range this.Field7 { + if this.Field7[i] != that1.Field7[i] { + return false + } + } + if len(this.Field8) != len(that1.Field8) { + return false + } + for i := range this.Field8 { + if !this.Field8[i].Equal(that1.Field8[i]) { + return false + } + } + if len(this.Field13) != len(that1.Field13) { + return false + } + for i := range this.Field13 { + if this.Field13[i] != that1.Field13[i] { + return false + } + } + if len(this.Field14) != len(that1.Field14) { + return false + } + for i := range this.Field14 { + if this.Field14[i] != that1.Field14[i] { + return false + } + } + if len(this.Field15) != len(that1.Field15) { + return false + } + for i := range this.Field15 { + if !bytes.Equal(this.Field15[i], that1.Field15[i]) { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NidEmbeddedStruct) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NidEmbeddedStruct) + if !ok { + that2, ok := that.(NidEmbeddedStruct) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NidEmbeddedStruct") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NidEmbeddedStruct but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NidEmbeddedStruct but is not nil && this == nil") + } + if !this.NidOptNative.Equal(that1.NidOptNative) { + return fmt.Errorf("NidOptNative this(%v) Not Equal that(%v)", this.NidOptNative, that1.NidOptNative) + } + if !this.Field200.Equal(&that1.Field200) { + return fmt.Errorf("Field200 this(%v) Not Equal that(%v)", this.Field200, that1.Field200) + } + if this.Field210 != that1.Field210 { + return fmt.Errorf("Field210 this(%v) Not Equal that(%v)", this.Field210, that1.Field210) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NidEmbeddedStruct) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*NidEmbeddedStruct) + if !ok { + that2, ok := that.(NidEmbeddedStruct) + 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.NidOptNative.Equal(that1.NidOptNative) { + return false + } + if !this.Field200.Equal(&that1.Field200) { + return false + } + if this.Field210 != that1.Field210 { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NinEmbeddedStruct) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NinEmbeddedStruct) + if !ok { + that2, ok := that.(NinEmbeddedStruct) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NinEmbeddedStruct") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NinEmbeddedStruct but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NinEmbeddedStruct but is not nil && this == nil") + } + if !this.NidOptNative.Equal(that1.NidOptNative) { + return fmt.Errorf("NidOptNative this(%v) Not Equal that(%v)", this.NidOptNative, that1.NidOptNative) + } + if !this.Field200.Equal(that1.Field200) { + return fmt.Errorf("Field200 this(%v) Not Equal that(%v)", this.Field200, that1.Field200) + } + if this.Field210 != nil && that1.Field210 != nil { + if *this.Field210 != *that1.Field210 { + return fmt.Errorf("Field210 this(%v) Not Equal that(%v)", *this.Field210, *that1.Field210) + } + } else if this.Field210 != nil { + return fmt.Errorf("this.Field210 == nil && that.Field210 != nil") + } else if that1.Field210 != nil { + return fmt.Errorf("Field210 this(%v) Not Equal that(%v)", this.Field210, that1.Field210) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NinEmbeddedStruct) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*NinEmbeddedStruct) + if !ok { + that2, ok := that.(NinEmbeddedStruct) + 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.NidOptNative.Equal(that1.NidOptNative) { + return false + } + if !this.Field200.Equal(that1.Field200) { + return false + } + if this.Field210 != nil && that1.Field210 != nil { + if *this.Field210 != *that1.Field210 { + return false + } + } else if this.Field210 != nil { + return false + } else if that1.Field210 != nil { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NidNestedStruct) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NidNestedStruct) + if !ok { + that2, ok := that.(NidNestedStruct) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NidNestedStruct") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NidNestedStruct but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NidNestedStruct but is not nil && this == nil") + } + if !this.Field1.Equal(&that1.Field1) { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) + } + if len(this.Field2) != len(that1.Field2) { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", len(this.Field2), len(that1.Field2)) + } + for i := range this.Field2 { + if !this.Field2[i].Equal(&that1.Field2[i]) { + return fmt.Errorf("Field2 this[%v](%v) Not Equal that[%v](%v)", i, this.Field2[i], i, that1.Field2[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NidNestedStruct) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*NidNestedStruct) + if !ok { + that2, ok := that.(NidNestedStruct) + 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.Field1.Equal(&that1.Field1) { + return false + } + if len(this.Field2) != len(that1.Field2) { + return false + } + for i := range this.Field2 { + if !this.Field2[i].Equal(&that1.Field2[i]) { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NinNestedStruct) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NinNestedStruct) + if !ok { + that2, ok := that.(NinNestedStruct) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NinNestedStruct") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NinNestedStruct but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NinNestedStruct but is not nil && this == nil") + } + if !this.Field1.Equal(that1.Field1) { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) + } + if len(this.Field2) != len(that1.Field2) { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", len(this.Field2), len(that1.Field2)) + } + for i := range this.Field2 { + if !this.Field2[i].Equal(that1.Field2[i]) { + return fmt.Errorf("Field2 this[%v](%v) Not Equal that[%v](%v)", i, this.Field2[i], i, that1.Field2[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NinNestedStruct) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*NinNestedStruct) + if !ok { + that2, ok := that.(NinNestedStruct) + 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.Field1.Equal(that1.Field1) { + return false + } + if len(this.Field2) != len(that1.Field2) { + return false + } + for i := range this.Field2 { + if !this.Field2[i].Equal(that1.Field2[i]) { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NidOptCustom) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NidOptCustom) + if !ok { + that2, ok := that.(NidOptCustom) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NidOptCustom") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NidOptCustom but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NidOptCustom 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.Value.Equal(that1.Value) { + return fmt.Errorf("Value this(%v) Not Equal that(%v)", this.Value, that1.Value) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NidOptCustom) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*NidOptCustom) + if !ok { + that2, ok := that.(NidOptCustom) + 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.Value.Equal(that1.Value) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *CustomDash) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*CustomDash) + if !ok { + that2, ok := that.(CustomDash) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *CustomDash") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *CustomDash but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *CustomDash but is not nil && this == nil") + } + if that1.Value == nil { + if this.Value != nil { + return fmt.Errorf("this.Value != nil && that1.Value == nil") + } + } else if !this.Value.Equal(*that1.Value) { + return fmt.Errorf("Value this(%v) Not Equal that(%v)", this.Value, that1.Value) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *CustomDash) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*CustomDash) + if !ok { + that2, ok := that.(CustomDash) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + if this == nil { + return true + } + return false + } else if this == nil { + return false + } + if that1.Value == nil { + if this.Value != nil { + return false + } + } else if !this.Value.Equal(*that1.Value) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NinOptCustom) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NinOptCustom) + if !ok { + that2, ok := that.(NinOptCustom) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NinOptCustom") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NinOptCustom but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NinOptCustom but is not nil && this == nil") + } + if that1.Id == nil { + if this.Id != nil { + return fmt.Errorf("this.Id != nil && that1.Id == nil") + } + } else if !this.Id.Equal(*that1.Id) { + return fmt.Errorf("Id this(%v) Not Equal that(%v)", this.Id, that1.Id) + } + if that1.Value == nil { + if this.Value != nil { + return fmt.Errorf("this.Value != nil && that1.Value == nil") + } + } else if !this.Value.Equal(*that1.Value) { + return fmt.Errorf("Value this(%v) Not Equal that(%v)", this.Value, that1.Value) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NinOptCustom) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*NinOptCustom) + if !ok { + that2, ok := that.(NinOptCustom) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + if this == nil { + return true + } + return false + } else if this == nil { + return false + } + if that1.Id == nil { + if this.Id != nil { + return false + } + } else if !this.Id.Equal(*that1.Id) { + return false + } + if that1.Value == nil { + if this.Value != nil { + return false + } + } else if !this.Value.Equal(*that1.Value) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NidRepCustom) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NidRepCustom) + if !ok { + that2, ok := that.(NidRepCustom) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NidRepCustom") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NidRepCustom but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NidRepCustom but is not nil && this == nil") + } + if len(this.Id) != len(that1.Id) { + return fmt.Errorf("Id this(%v) Not Equal that(%v)", len(this.Id), len(that1.Id)) + } + for i := range this.Id { + if !this.Id[i].Equal(that1.Id[i]) { + return fmt.Errorf("Id this[%v](%v) Not Equal that[%v](%v)", i, this.Id[i], i, that1.Id[i]) + } + } + if len(this.Value) != len(that1.Value) { + return fmt.Errorf("Value this(%v) Not Equal that(%v)", len(this.Value), len(that1.Value)) + } + for i := range this.Value { + if !this.Value[i].Equal(that1.Value[i]) { + return fmt.Errorf("Value this[%v](%v) Not Equal that[%v](%v)", i, this.Value[i], i, that1.Value[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NidRepCustom) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*NidRepCustom) + if !ok { + that2, ok := that.(NidRepCustom) + 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.Id) != len(that1.Id) { + return false + } + for i := range this.Id { + if !this.Id[i].Equal(that1.Id[i]) { + return false + } + } + if len(this.Value) != len(that1.Value) { + return false + } + for i := range this.Value { + if !this.Value[i].Equal(that1.Value[i]) { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NinRepCustom) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NinRepCustom) + if !ok { + that2, ok := that.(NinRepCustom) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NinRepCustom") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NinRepCustom but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NinRepCustom but is not nil && this == nil") + } + if len(this.Id) != len(that1.Id) { + return fmt.Errorf("Id this(%v) Not Equal that(%v)", len(this.Id), len(that1.Id)) + } + for i := range this.Id { + if !this.Id[i].Equal(that1.Id[i]) { + return fmt.Errorf("Id this[%v](%v) Not Equal that[%v](%v)", i, this.Id[i], i, that1.Id[i]) + } + } + if len(this.Value) != len(that1.Value) { + return fmt.Errorf("Value this(%v) Not Equal that(%v)", len(this.Value), len(that1.Value)) + } + for i := range this.Value { + if !this.Value[i].Equal(that1.Value[i]) { + return fmt.Errorf("Value this[%v](%v) Not Equal that[%v](%v)", i, this.Value[i], i, that1.Value[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NinRepCustom) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*NinRepCustom) + if !ok { + that2, ok := that.(NinRepCustom) + 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.Id) != len(that1.Id) { + return false + } + for i := range this.Id { + if !this.Id[i].Equal(that1.Id[i]) { + return false + } + } + if len(this.Value) != len(that1.Value) { + return false + } + for i := range this.Value { + if !this.Value[i].Equal(that1.Value[i]) { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NinOptNativeUnion) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NinOptNativeUnion) + if !ok { + that2, ok := that.(NinOptNativeUnion) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NinOptNativeUnion") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NinOptNativeUnion but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NinOptNativeUnion but is not nil && this == nil") + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) + } + } else if this.Field1 != nil { + return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") + } else if that1.Field1 != nil { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", *this.Field2, *that1.Field2) + } + } else if this.Field2 != nil { + return fmt.Errorf("this.Field2 == nil && that.Field2 != nil") + } else if that1.Field2 != nil { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) + } + if this.Field3 != nil && that1.Field3 != nil { + if *this.Field3 != *that1.Field3 { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", *this.Field3, *that1.Field3) + } + } else if this.Field3 != nil { + return fmt.Errorf("this.Field3 == nil && that.Field3 != nil") + } else if that1.Field3 != nil { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", this.Field3, that1.Field3) + } + if this.Field4 != nil && that1.Field4 != nil { + if *this.Field4 != *that1.Field4 { + return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", *this.Field4, *that1.Field4) + } + } else if this.Field4 != nil { + return fmt.Errorf("this.Field4 == nil && that.Field4 != nil") + } else if that1.Field4 != nil { + return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", this.Field4, that1.Field4) + } + if this.Field5 != nil && that1.Field5 != nil { + if *this.Field5 != *that1.Field5 { + return fmt.Errorf("Field5 this(%v) Not Equal that(%v)", *this.Field5, *that1.Field5) + } + } else if this.Field5 != nil { + return fmt.Errorf("this.Field5 == nil && that.Field5 != nil") + } else if that1.Field5 != nil { + return fmt.Errorf("Field5 this(%v) Not Equal that(%v)", this.Field5, that1.Field5) + } + if this.Field6 != nil && that1.Field6 != nil { + if *this.Field6 != *that1.Field6 { + return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", *this.Field6, *that1.Field6) + } + } else if this.Field6 != nil { + return fmt.Errorf("this.Field6 == nil && that.Field6 != nil") + } else if that1.Field6 != nil { + return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", this.Field6, that1.Field6) + } + if this.Field13 != nil && that1.Field13 != nil { + if *this.Field13 != *that1.Field13 { + return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", *this.Field13, *that1.Field13) + } + } else if this.Field13 != nil { + return fmt.Errorf("this.Field13 == nil && that.Field13 != nil") + } else if that1.Field13 != nil { + return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", this.Field13, that1.Field13) + } + if this.Field14 != nil && that1.Field14 != nil { + if *this.Field14 != *that1.Field14 { + return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", *this.Field14, *that1.Field14) + } + } else if this.Field14 != nil { + return fmt.Errorf("this.Field14 == nil && that.Field14 != nil") + } else if that1.Field14 != nil { + return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", this.Field14, that1.Field14) + } + if !bytes.Equal(this.Field15, that1.Field15) { + return fmt.Errorf("Field15 this(%v) Not Equal that(%v)", this.Field15, that1.Field15) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NinOptNativeUnion) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*NinOptNativeUnion) + if !ok { + that2, ok := that.(NinOptNativeUnion) + 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.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return false + } + } else if this.Field1 != nil { + return false + } else if that1.Field1 != nil { + return false + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + return false + } + } else if this.Field2 != nil { + return false + } else if that1.Field2 != nil { + return false + } + if this.Field3 != nil && that1.Field3 != nil { + if *this.Field3 != *that1.Field3 { + return false + } + } else if this.Field3 != nil { + return false + } else if that1.Field3 != nil { + return false + } + if this.Field4 != nil && that1.Field4 != nil { + if *this.Field4 != *that1.Field4 { + return false + } + } else if this.Field4 != nil { + return false + } else if that1.Field4 != nil { + return false + } + if this.Field5 != nil && that1.Field5 != nil { + if *this.Field5 != *that1.Field5 { + return false + } + } else if this.Field5 != nil { + return false + } else if that1.Field5 != nil { + return false + } + if this.Field6 != nil && that1.Field6 != nil { + if *this.Field6 != *that1.Field6 { + return false + } + } else if this.Field6 != nil { + return false + } else if that1.Field6 != nil { + return false + } + if this.Field13 != nil && that1.Field13 != nil { + if *this.Field13 != *that1.Field13 { + return false + } + } else if this.Field13 != nil { + return false + } else if that1.Field13 != nil { + return false + } + if this.Field14 != nil && that1.Field14 != nil { + if *this.Field14 != *that1.Field14 { + return false + } + } else if this.Field14 != nil { + return false + } else if that1.Field14 != nil { + return false + } + if !bytes.Equal(this.Field15, that1.Field15) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NinOptStructUnion) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NinOptStructUnion) + if !ok { + that2, ok := that.(NinOptStructUnion) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NinOptStructUnion") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NinOptStructUnion but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NinOptStructUnion but is not nil && this == nil") + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) + } + } else if this.Field1 != nil { + return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") + } else if that1.Field1 != nil { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", *this.Field2, *that1.Field2) + } + } else if this.Field2 != nil { + return fmt.Errorf("this.Field2 == nil && that.Field2 != nil") + } else if that1.Field2 != nil { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) + } + if !this.Field3.Equal(that1.Field3) { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", this.Field3, that1.Field3) + } + if !this.Field4.Equal(that1.Field4) { + return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", this.Field4, that1.Field4) + } + if this.Field6 != nil && that1.Field6 != nil { + if *this.Field6 != *that1.Field6 { + return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", *this.Field6, *that1.Field6) + } + } else if this.Field6 != nil { + return fmt.Errorf("this.Field6 == nil && that.Field6 != nil") + } else if that1.Field6 != nil { + return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", this.Field6, that1.Field6) + } + if this.Field7 != nil && that1.Field7 != nil { + if *this.Field7 != *that1.Field7 { + return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", *this.Field7, *that1.Field7) + } + } else if this.Field7 != nil { + return fmt.Errorf("this.Field7 == nil && that.Field7 != nil") + } else if that1.Field7 != nil { + return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", this.Field7, that1.Field7) + } + if this.Field13 != nil && that1.Field13 != nil { + if *this.Field13 != *that1.Field13 { + return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", *this.Field13, *that1.Field13) + } + } else if this.Field13 != nil { + return fmt.Errorf("this.Field13 == nil && that.Field13 != nil") + } else if that1.Field13 != nil { + return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", this.Field13, that1.Field13) + } + if this.Field14 != nil && that1.Field14 != nil { + if *this.Field14 != *that1.Field14 { + return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", *this.Field14, *that1.Field14) + } + } else if this.Field14 != nil { + return fmt.Errorf("this.Field14 == nil && that.Field14 != nil") + } else if that1.Field14 != nil { + return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", this.Field14, that1.Field14) + } + if !bytes.Equal(this.Field15, that1.Field15) { + return fmt.Errorf("Field15 this(%v) Not Equal that(%v)", this.Field15, that1.Field15) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NinOptStructUnion) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*NinOptStructUnion) + if !ok { + that2, ok := that.(NinOptStructUnion) + 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.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return false + } + } else if this.Field1 != nil { + return false + } else if that1.Field1 != nil { + return false + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + return false + } + } else if this.Field2 != nil { + return false + } else if that1.Field2 != nil { + return false + } + if !this.Field3.Equal(that1.Field3) { + return false + } + if !this.Field4.Equal(that1.Field4) { + return false + } + if this.Field6 != nil && that1.Field6 != nil { + if *this.Field6 != *that1.Field6 { + return false + } + } else if this.Field6 != nil { + return false + } else if that1.Field6 != nil { + return false + } + if this.Field7 != nil && that1.Field7 != nil { + if *this.Field7 != *that1.Field7 { + return false + } + } else if this.Field7 != nil { + return false + } else if that1.Field7 != nil { + return false + } + if this.Field13 != nil && that1.Field13 != nil { + if *this.Field13 != *that1.Field13 { + return false + } + } else if this.Field13 != nil { + return false + } else if that1.Field13 != nil { + return false + } + if this.Field14 != nil && that1.Field14 != nil { + if *this.Field14 != *that1.Field14 { + return false + } + } else if this.Field14 != nil { + return false + } else if that1.Field14 != nil { + return false + } + if !bytes.Equal(this.Field15, that1.Field15) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NinEmbeddedStructUnion) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NinEmbeddedStructUnion) + if !ok { + that2, ok := that.(NinEmbeddedStructUnion) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NinEmbeddedStructUnion") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NinEmbeddedStructUnion but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NinEmbeddedStructUnion but is not nil && this == nil") + } + if !this.NidOptNative.Equal(that1.NidOptNative) { + return fmt.Errorf("NidOptNative this(%v) Not Equal that(%v)", this.NidOptNative, that1.NidOptNative) + } + if !this.Field200.Equal(that1.Field200) { + return fmt.Errorf("Field200 this(%v) Not Equal that(%v)", this.Field200, that1.Field200) + } + if this.Field210 != nil && that1.Field210 != nil { + if *this.Field210 != *that1.Field210 { + return fmt.Errorf("Field210 this(%v) Not Equal that(%v)", *this.Field210, *that1.Field210) + } + } else if this.Field210 != nil { + return fmt.Errorf("this.Field210 == nil && that.Field210 != nil") + } else if that1.Field210 != nil { + return fmt.Errorf("Field210 this(%v) Not Equal that(%v)", this.Field210, that1.Field210) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NinEmbeddedStructUnion) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*NinEmbeddedStructUnion) + if !ok { + that2, ok := that.(NinEmbeddedStructUnion) + 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.NidOptNative.Equal(that1.NidOptNative) { + return false + } + if !this.Field200.Equal(that1.Field200) { + return false + } + if this.Field210 != nil && that1.Field210 != nil { + if *this.Field210 != *that1.Field210 { + return false + } + } else if this.Field210 != nil { + return false + } else if that1.Field210 != nil { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NinNestedStructUnion) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NinNestedStructUnion) + if !ok { + that2, ok := that.(NinNestedStructUnion) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NinNestedStructUnion") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NinNestedStructUnion but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NinNestedStructUnion but is not nil && this == nil") + } + if !this.Field1.Equal(that1.Field1) { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) + } + if !this.Field2.Equal(that1.Field2) { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) + } + if !this.Field3.Equal(that1.Field3) { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", this.Field3, that1.Field3) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NinNestedStructUnion) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*NinNestedStructUnion) + if !ok { + that2, ok := that.(NinNestedStructUnion) + 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.Field1.Equal(that1.Field1) { + return false + } + if !this.Field2.Equal(that1.Field2) { + return false + } + if !this.Field3.Equal(that1.Field3) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *Tree) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*Tree) + if !ok { + that2, ok := that.(Tree) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *Tree") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *Tree but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *Tree but is not nil && this == nil") + } + if !this.Or.Equal(that1.Or) { + return fmt.Errorf("Or this(%v) Not Equal that(%v)", this.Or, that1.Or) + } + if !this.And.Equal(that1.And) { + return fmt.Errorf("And this(%v) Not Equal that(%v)", this.And, that1.And) + } + if !this.Leaf.Equal(that1.Leaf) { + return fmt.Errorf("Leaf this(%v) Not Equal that(%v)", this.Leaf, that1.Leaf) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *Tree) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*Tree) + if !ok { + that2, ok := that.(Tree) + 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.Or.Equal(that1.Or) { + return false + } + if !this.And.Equal(that1.And) { + return false + } + if !this.Leaf.Equal(that1.Leaf) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *OrBranch) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*OrBranch) + if !ok { + that2, ok := that.(OrBranch) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *OrBranch") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *OrBranch but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *OrBranch but is not nil && this == nil") + } + if !this.Left.Equal(&that1.Left) { + return fmt.Errorf("Left this(%v) Not Equal that(%v)", this.Left, that1.Left) + } + if !this.Right.Equal(&that1.Right) { + return fmt.Errorf("Right this(%v) Not Equal that(%v)", this.Right, that1.Right) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *OrBranch) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*OrBranch) + if !ok { + that2, ok := that.(OrBranch) + 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.Left.Equal(&that1.Left) { + return false + } + if !this.Right.Equal(&that1.Right) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *AndBranch) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*AndBranch) + if !ok { + that2, ok := that.(AndBranch) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *AndBranch") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *AndBranch but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *AndBranch but is not nil && this == nil") + } + if !this.Left.Equal(&that1.Left) { + return fmt.Errorf("Left this(%v) Not Equal that(%v)", this.Left, that1.Left) + } + if !this.Right.Equal(&that1.Right) { + return fmt.Errorf("Right this(%v) Not Equal that(%v)", this.Right, that1.Right) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *AndBranch) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*AndBranch) + if !ok { + that2, ok := that.(AndBranch) + 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.Left.Equal(&that1.Left) { + return false + } + if !this.Right.Equal(&that1.Right) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *Leaf) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*Leaf) + if !ok { + that2, ok := that.(Leaf) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *Leaf") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *Leaf but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *Leaf 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.StrValue != that1.StrValue { + return fmt.Errorf("StrValue this(%v) Not Equal that(%v)", this.StrValue, that1.StrValue) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *Leaf) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*Leaf) + if !ok { + that2, ok := that.(Leaf) + 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.StrValue != that1.StrValue { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *DeepTree) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*DeepTree) + if !ok { + that2, ok := that.(DeepTree) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *DeepTree") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *DeepTree but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *DeepTree but is not nil && this == nil") + } + if !this.Down.Equal(that1.Down) { + return fmt.Errorf("Down this(%v) Not Equal that(%v)", this.Down, that1.Down) + } + if !this.And.Equal(that1.And) { + return fmt.Errorf("And this(%v) Not Equal that(%v)", this.And, that1.And) + } + if !this.Leaf.Equal(that1.Leaf) { + return fmt.Errorf("Leaf this(%v) Not Equal that(%v)", this.Leaf, that1.Leaf) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *DeepTree) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*DeepTree) + if !ok { + that2, ok := that.(DeepTree) + 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.Down.Equal(that1.Down) { + return false + } + if !this.And.Equal(that1.And) { + return false + } + if !this.Leaf.Equal(that1.Leaf) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *ADeepBranch) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*ADeepBranch) + if !ok { + that2, ok := that.(ADeepBranch) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *ADeepBranch") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *ADeepBranch but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *ADeepBranch but is not nil && this == nil") + } + if !this.Down.Equal(&that1.Down) { + return fmt.Errorf("Down this(%v) Not Equal that(%v)", this.Down, that1.Down) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *ADeepBranch) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*ADeepBranch) + if !ok { + that2, ok := that.(ADeepBranch) + 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.Down.Equal(&that1.Down) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *AndDeepBranch) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*AndDeepBranch) + if !ok { + that2, ok := that.(AndDeepBranch) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *AndDeepBranch") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *AndDeepBranch but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *AndDeepBranch but is not nil && this == nil") + } + if !this.Left.Equal(&that1.Left) { + return fmt.Errorf("Left this(%v) Not Equal that(%v)", this.Left, that1.Left) + } + if !this.Right.Equal(&that1.Right) { + return fmt.Errorf("Right this(%v) Not Equal that(%v)", this.Right, that1.Right) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *AndDeepBranch) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*AndDeepBranch) + if !ok { + that2, ok := that.(AndDeepBranch) + 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.Left.Equal(&that1.Left) { + return false + } + if !this.Right.Equal(&that1.Right) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *DeepLeaf) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*DeepLeaf) + if !ok { + that2, ok := that.(DeepLeaf) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *DeepLeaf") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *DeepLeaf but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *DeepLeaf but is not nil && this == nil") + } + if !this.Tree.Equal(&that1.Tree) { + return fmt.Errorf("Tree this(%v) Not Equal that(%v)", this.Tree, that1.Tree) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *DeepLeaf) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*DeepLeaf) + if !ok { + that2, ok := that.(DeepLeaf) + 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.Tree.Equal(&that1.Tree) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *Nil) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*Nil) + if !ok { + that2, ok := that.(Nil) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *Nil") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *Nil but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *Nil but is not nil && this == nil") + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *Nil) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*Nil) + if !ok { + that2, ok := that.(Nil) + 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.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NidOptEnum) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NidOptEnum) + if !ok { + that2, ok := that.(NidOptEnum) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NidOptEnum") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NidOptEnum but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NidOptEnum but is not nil && this == nil") + } + if this.Field1 != that1.Field1 { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NidOptEnum) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*NidOptEnum) + if !ok { + that2, ok := that.(NidOptEnum) + 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.Field1 != that1.Field1 { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NinOptEnum) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NinOptEnum) + if !ok { + that2, ok := that.(NinOptEnum) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NinOptEnum") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NinOptEnum but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NinOptEnum but is not nil && this == nil") + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) + } + } else if this.Field1 != nil { + return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") + } else if that1.Field1 != nil { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", *this.Field2, *that1.Field2) + } + } else if this.Field2 != nil { + return fmt.Errorf("this.Field2 == nil && that.Field2 != nil") + } else if that1.Field2 != nil { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) + } + if this.Field3 != nil && that1.Field3 != nil { + if *this.Field3 != *that1.Field3 { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", *this.Field3, *that1.Field3) + } + } else if this.Field3 != nil { + return fmt.Errorf("this.Field3 == nil && that.Field3 != nil") + } else if that1.Field3 != nil { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", this.Field3, that1.Field3) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NinOptEnum) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*NinOptEnum) + if !ok { + that2, ok := that.(NinOptEnum) + 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.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return false + } + } else if this.Field1 != nil { + return false + } else if that1.Field1 != nil { + return false + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + return false + } + } else if this.Field2 != nil { + return false + } else if that1.Field2 != nil { + return false + } + if this.Field3 != nil && that1.Field3 != nil { + if *this.Field3 != *that1.Field3 { + return false + } + } else if this.Field3 != nil { + return false + } else if that1.Field3 != nil { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NidRepEnum) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NidRepEnum) + if !ok { + that2, ok := that.(NidRepEnum) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NidRepEnum") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NidRepEnum but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NidRepEnum but is not nil && this == nil") + } + if len(this.Field1) != len(that1.Field1) { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", len(this.Field1), len(that1.Field1)) + } + for i := range this.Field1 { + if this.Field1[i] != that1.Field1[i] { + return fmt.Errorf("Field1 this[%v](%v) Not Equal that[%v](%v)", i, this.Field1[i], i, that1.Field1[i]) + } + } + if len(this.Field2) != len(that1.Field2) { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", len(this.Field2), len(that1.Field2)) + } + for i := range this.Field2 { + if this.Field2[i] != that1.Field2[i] { + return fmt.Errorf("Field2 this[%v](%v) Not Equal that[%v](%v)", i, this.Field2[i], i, that1.Field2[i]) + } + } + if len(this.Field3) != len(that1.Field3) { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", len(this.Field3), len(that1.Field3)) + } + for i := range this.Field3 { + if this.Field3[i] != that1.Field3[i] { + return fmt.Errorf("Field3 this[%v](%v) Not Equal that[%v](%v)", i, this.Field3[i], i, that1.Field3[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NidRepEnum) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*NidRepEnum) + if !ok { + that2, ok := that.(NidRepEnum) + 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.Field1) != len(that1.Field1) { + return false + } + for i := range this.Field1 { + if this.Field1[i] != that1.Field1[i] { + return false + } + } + if len(this.Field2) != len(that1.Field2) { + return false + } + for i := range this.Field2 { + if this.Field2[i] != that1.Field2[i] { + return false + } + } + if len(this.Field3) != len(that1.Field3) { + return false + } + for i := range this.Field3 { + if this.Field3[i] != that1.Field3[i] { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NinRepEnum) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NinRepEnum) + if !ok { + that2, ok := that.(NinRepEnum) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NinRepEnum") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NinRepEnum but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NinRepEnum but is not nil && this == nil") + } + if len(this.Field1) != len(that1.Field1) { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", len(this.Field1), len(that1.Field1)) + } + for i := range this.Field1 { + if this.Field1[i] != that1.Field1[i] { + return fmt.Errorf("Field1 this[%v](%v) Not Equal that[%v](%v)", i, this.Field1[i], i, that1.Field1[i]) + } + } + if len(this.Field2) != len(that1.Field2) { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", len(this.Field2), len(that1.Field2)) + } + for i := range this.Field2 { + if this.Field2[i] != that1.Field2[i] { + return fmt.Errorf("Field2 this[%v](%v) Not Equal that[%v](%v)", i, this.Field2[i], i, that1.Field2[i]) + } + } + if len(this.Field3) != len(that1.Field3) { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", len(this.Field3), len(that1.Field3)) + } + for i := range this.Field3 { + if this.Field3[i] != that1.Field3[i] { + return fmt.Errorf("Field3 this[%v](%v) Not Equal that[%v](%v)", i, this.Field3[i], i, that1.Field3[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NinRepEnum) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*NinRepEnum) + if !ok { + that2, ok := that.(NinRepEnum) + 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.Field1) != len(that1.Field1) { + return false + } + for i := range this.Field1 { + if this.Field1[i] != that1.Field1[i] { + return false + } + } + if len(this.Field2) != len(that1.Field2) { + return false + } + for i := range this.Field2 { + if this.Field2[i] != that1.Field2[i] { + return false + } + } + if len(this.Field3) != len(that1.Field3) { + return false + } + for i := range this.Field3 { + if this.Field3[i] != that1.Field3[i] { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NinOptEnumDefault) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NinOptEnumDefault) + if !ok { + that2, ok := that.(NinOptEnumDefault) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NinOptEnumDefault") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NinOptEnumDefault but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NinOptEnumDefault but is not nil && this == nil") + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) + } + } else if this.Field1 != nil { + return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") + } else if that1.Field1 != nil { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", *this.Field2, *that1.Field2) + } + } else if this.Field2 != nil { + return fmt.Errorf("this.Field2 == nil && that.Field2 != nil") + } else if that1.Field2 != nil { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) + } + if this.Field3 != nil && that1.Field3 != nil { + if *this.Field3 != *that1.Field3 { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", *this.Field3, *that1.Field3) + } + } else if this.Field3 != nil { + return fmt.Errorf("this.Field3 == nil && that.Field3 != nil") + } else if that1.Field3 != nil { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", this.Field3, that1.Field3) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NinOptEnumDefault) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*NinOptEnumDefault) + if !ok { + that2, ok := that.(NinOptEnumDefault) + 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.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return false + } + } else if this.Field1 != nil { + return false + } else if that1.Field1 != nil { + return false + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + return false + } + } else if this.Field2 != nil { + return false + } else if that1.Field2 != nil { + return false + } + if this.Field3 != nil && that1.Field3 != nil { + if *this.Field3 != *that1.Field3 { + return false + } + } else if this.Field3 != nil { + return false + } else if that1.Field3 != nil { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *AnotherNinOptEnum) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*AnotherNinOptEnum) + if !ok { + that2, ok := that.(AnotherNinOptEnum) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *AnotherNinOptEnum") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *AnotherNinOptEnum but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *AnotherNinOptEnum but is not nil && this == nil") + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) + } + } else if this.Field1 != nil { + return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") + } else if that1.Field1 != nil { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", *this.Field2, *that1.Field2) + } + } else if this.Field2 != nil { + return fmt.Errorf("this.Field2 == nil && that.Field2 != nil") + } else if that1.Field2 != nil { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) + } + if this.Field3 != nil && that1.Field3 != nil { + if *this.Field3 != *that1.Field3 { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", *this.Field3, *that1.Field3) + } + } else if this.Field3 != nil { + return fmt.Errorf("this.Field3 == nil && that.Field3 != nil") + } else if that1.Field3 != nil { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", this.Field3, that1.Field3) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *AnotherNinOptEnum) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*AnotherNinOptEnum) + if !ok { + that2, ok := that.(AnotherNinOptEnum) + 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.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return false + } + } else if this.Field1 != nil { + return false + } else if that1.Field1 != nil { + return false + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + return false + } + } else if this.Field2 != nil { + return false + } else if that1.Field2 != nil { + return false + } + if this.Field3 != nil && that1.Field3 != nil { + if *this.Field3 != *that1.Field3 { + return false + } + } else if this.Field3 != nil { + return false + } else if that1.Field3 != nil { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *AnotherNinOptEnumDefault) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*AnotherNinOptEnumDefault) + if !ok { + that2, ok := that.(AnotherNinOptEnumDefault) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *AnotherNinOptEnumDefault") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *AnotherNinOptEnumDefault but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *AnotherNinOptEnumDefault but is not nil && this == nil") + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) + } + } else if this.Field1 != nil { + return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") + } else if that1.Field1 != nil { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", *this.Field2, *that1.Field2) + } + } else if this.Field2 != nil { + return fmt.Errorf("this.Field2 == nil && that.Field2 != nil") + } else if that1.Field2 != nil { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) + } + if this.Field3 != nil && that1.Field3 != nil { + if *this.Field3 != *that1.Field3 { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", *this.Field3, *that1.Field3) + } + } else if this.Field3 != nil { + return fmt.Errorf("this.Field3 == nil && that.Field3 != nil") + } else if that1.Field3 != nil { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", this.Field3, that1.Field3) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *AnotherNinOptEnumDefault) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*AnotherNinOptEnumDefault) + if !ok { + that2, ok := that.(AnotherNinOptEnumDefault) + 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.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return false + } + } else if this.Field1 != nil { + return false + } else if that1.Field1 != nil { + return false + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + return false + } + } else if this.Field2 != nil { + return false + } else if that1.Field2 != nil { + return false + } + if this.Field3 != nil && that1.Field3 != nil { + if *this.Field3 != *that1.Field3 { + return false + } + } else if this.Field3 != nil { + return false + } else if that1.Field3 != nil { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *Timer) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*Timer) + if !ok { + that2, ok := that.(Timer) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *Timer") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *Timer but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *Timer but is not nil && this == nil") + } + if this.Time1 != that1.Time1 { + return fmt.Errorf("Time1 this(%v) Not Equal that(%v)", this.Time1, that1.Time1) + } + if this.Time2 != that1.Time2 { + return fmt.Errorf("Time2 this(%v) Not Equal that(%v)", this.Time2, that1.Time2) + } + if !bytes.Equal(this.Data, that1.Data) { + return fmt.Errorf("Data this(%v) Not Equal that(%v)", this.Data, that1.Data) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *Timer) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*Timer) + if !ok { + that2, ok := that.(Timer) + 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.Time1 != that1.Time1 { + return false + } + if this.Time2 != that1.Time2 { + return false + } + if !bytes.Equal(this.Data, that1.Data) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *MyExtendable) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*MyExtendable) + if !ok { + that2, ok := that.(MyExtendable) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *MyExtendable") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *MyExtendable but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *MyExtendable but is not nil && this == nil") + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) + } + } else if this.Field1 != nil { + return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") + } else if that1.Field1 != nil { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) + } + for k, v := range this.XXX_extensions { + if v2, ok := that1.XXX_extensions[k]; ok { + if !v.Equal(&v2) { + return fmt.Errorf("XXX_extensions this[%v](%v) Not Equal that[%v](%v)", k, this.XXX_extensions[k], k, that1.XXX_extensions[k]) + } + } else { + return fmt.Errorf("XXX_extensions[%v] Not In that", k) + } + } + for k := range that1.XXX_extensions { + if _, ok := this.XXX_extensions[k]; !ok { + return fmt.Errorf("XXX_extensions[%v] Not In this", k) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *MyExtendable) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*MyExtendable) + if !ok { + that2, ok := that.(MyExtendable) + 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.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return false + } + } else if this.Field1 != nil { + return false + } else if that1.Field1 != nil { + return false + } + for k, v := range this.XXX_extensions { + if v2, ok := that1.XXX_extensions[k]; ok { + if !v.Equal(&v2) { + return false + } + } else { + return false + } + } + for k := range that1.XXX_extensions { + if _, ok := this.XXX_extensions[k]; !ok { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *OtherExtenable) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*OtherExtenable) + if !ok { + that2, ok := that.(OtherExtenable) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *OtherExtenable") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *OtherExtenable but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *OtherExtenable but is not nil && this == nil") + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", *this.Field2, *that1.Field2) + } + } else if this.Field2 != nil { + return fmt.Errorf("this.Field2 == nil && that.Field2 != nil") + } else if that1.Field2 != nil { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) + } + if this.Field13 != nil && that1.Field13 != nil { + if *this.Field13 != *that1.Field13 { + return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", *this.Field13, *that1.Field13) + } + } else if this.Field13 != nil { + return fmt.Errorf("this.Field13 == nil && that.Field13 != nil") + } else if that1.Field13 != nil { + return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", this.Field13, that1.Field13) + } + if !this.M.Equal(that1.M) { + return fmt.Errorf("M this(%v) Not Equal that(%v)", this.M, that1.M) + } + for k, v := range this.XXX_extensions { + if v2, ok := that1.XXX_extensions[k]; ok { + if !v.Equal(&v2) { + return fmt.Errorf("XXX_extensions this[%v](%v) Not Equal that[%v](%v)", k, this.XXX_extensions[k], k, that1.XXX_extensions[k]) + } + } else { + return fmt.Errorf("XXX_extensions[%v] Not In that", k) + } + } + for k := range that1.XXX_extensions { + if _, ok := this.XXX_extensions[k]; !ok { + return fmt.Errorf("XXX_extensions[%v] Not In this", k) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *OtherExtenable) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*OtherExtenable) + if !ok { + that2, ok := that.(OtherExtenable) + 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.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + return false + } + } else if this.Field2 != nil { + return false + } else if that1.Field2 != nil { + return false + } + if this.Field13 != nil && that1.Field13 != nil { + if *this.Field13 != *that1.Field13 { + return false + } + } else if this.Field13 != nil { + return false + } else if that1.Field13 != nil { + return false + } + if !this.M.Equal(that1.M) { + return false + } + for k, v := range this.XXX_extensions { + if v2, ok := that1.XXX_extensions[k]; ok { + if !v.Equal(&v2) { + return false + } + } else { + return false + } + } + for k := range that1.XXX_extensions { + if _, ok := this.XXX_extensions[k]; !ok { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NestedDefinition) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NestedDefinition) + if !ok { + that2, ok := that.(NestedDefinition) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NestedDefinition") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NestedDefinition but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NestedDefinition but is not nil && this == nil") + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) + } + } else if this.Field1 != nil { + return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") + } else if that1.Field1 != nil { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) + } + if this.EnumField != nil && that1.EnumField != nil { + if *this.EnumField != *that1.EnumField { + return fmt.Errorf("EnumField this(%v) Not Equal that(%v)", *this.EnumField, *that1.EnumField) + } + } else if this.EnumField != nil { + return fmt.Errorf("this.EnumField == nil && that.EnumField != nil") + } else if that1.EnumField != nil { + return fmt.Errorf("EnumField this(%v) Not Equal that(%v)", this.EnumField, that1.EnumField) + } + if !this.NNM.Equal(that1.NNM) { + return fmt.Errorf("NNM this(%v) Not Equal that(%v)", this.NNM, that1.NNM) + } + if !this.NM.Equal(that1.NM) { + return fmt.Errorf("NM this(%v) Not Equal that(%v)", this.NM, that1.NM) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NestedDefinition) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*NestedDefinition) + if !ok { + that2, ok := that.(NestedDefinition) + 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.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return false + } + } else if this.Field1 != nil { + return false + } else if that1.Field1 != nil { + return false + } + if this.EnumField != nil && that1.EnumField != nil { + if *this.EnumField != *that1.EnumField { + return false + } + } else if this.EnumField != nil { + return false + } else if that1.EnumField != nil { + return false + } + if !this.NNM.Equal(that1.NNM) { + return false + } + if !this.NM.Equal(that1.NM) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NestedDefinition_NestedMessage) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NestedDefinition_NestedMessage) + if !ok { + that2, ok := that.(NestedDefinition_NestedMessage) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NestedDefinition_NestedMessage") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NestedDefinition_NestedMessage but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NestedDefinition_NestedMessage but is not nil && this == nil") + } + if this.NestedField1 != nil && that1.NestedField1 != nil { + if *this.NestedField1 != *that1.NestedField1 { + return fmt.Errorf("NestedField1 this(%v) Not Equal that(%v)", *this.NestedField1, *that1.NestedField1) + } + } else if this.NestedField1 != nil { + return fmt.Errorf("this.NestedField1 == nil && that.NestedField1 != nil") + } else if that1.NestedField1 != nil { + return fmt.Errorf("NestedField1 this(%v) Not Equal that(%v)", this.NestedField1, that1.NestedField1) + } + if !this.NNM.Equal(that1.NNM) { + return fmt.Errorf("NNM this(%v) Not Equal that(%v)", this.NNM, that1.NNM) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NestedDefinition_NestedMessage) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*NestedDefinition_NestedMessage) + if !ok { + that2, ok := that.(NestedDefinition_NestedMessage) + 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.NestedField1 != nil && that1.NestedField1 != nil { + if *this.NestedField1 != *that1.NestedField1 { + return false + } + } else if this.NestedField1 != nil { + return false + } else if that1.NestedField1 != nil { + return false + } + if !this.NNM.Equal(that1.NNM) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NestedDefinition_NestedMessage_NestedNestedMsg) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NestedDefinition_NestedMessage_NestedNestedMsg) + if !ok { + that2, ok := that.(NestedDefinition_NestedMessage_NestedNestedMsg) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NestedDefinition_NestedMessage_NestedNestedMsg") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NestedDefinition_NestedMessage_NestedNestedMsg but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NestedDefinition_NestedMessage_NestedNestedMsg but is not nil && this == nil") + } + if this.NestedNestedField1 != nil && that1.NestedNestedField1 != nil { + if *this.NestedNestedField1 != *that1.NestedNestedField1 { + return fmt.Errorf("NestedNestedField1 this(%v) Not Equal that(%v)", *this.NestedNestedField1, *that1.NestedNestedField1) + } + } else if this.NestedNestedField1 != nil { + return fmt.Errorf("this.NestedNestedField1 == nil && that.NestedNestedField1 != nil") + } else if that1.NestedNestedField1 != nil { + return fmt.Errorf("NestedNestedField1 this(%v) Not Equal that(%v)", this.NestedNestedField1, that1.NestedNestedField1) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NestedDefinition_NestedMessage_NestedNestedMsg) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*NestedDefinition_NestedMessage_NestedNestedMsg) + if !ok { + that2, ok := that.(NestedDefinition_NestedMessage_NestedNestedMsg) + 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.NestedNestedField1 != nil && that1.NestedNestedField1 != nil { + if *this.NestedNestedField1 != *that1.NestedNestedField1 { + return false + } + } else if this.NestedNestedField1 != nil { + return false + } else if that1.NestedNestedField1 != nil { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NestedScope) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NestedScope) + if !ok { + that2, ok := that.(NestedScope) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NestedScope") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NestedScope but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NestedScope but is not nil && this == nil") + } + if !this.A.Equal(that1.A) { + return fmt.Errorf("A this(%v) Not Equal that(%v)", this.A, that1.A) + } + if this.B != nil && that1.B != nil { + if *this.B != *that1.B { + return fmt.Errorf("B this(%v) Not Equal that(%v)", *this.B, *that1.B) + } + } else if this.B != nil { + return fmt.Errorf("this.B == nil && that.B != nil") + } else if that1.B != nil { + return fmt.Errorf("B this(%v) Not Equal that(%v)", this.B, that1.B) + } + if !this.C.Equal(that1.C) { + return fmt.Errorf("C this(%v) Not Equal that(%v)", this.C, that1.C) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NestedScope) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*NestedScope) + if !ok { + that2, ok := that.(NestedScope) + 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.A.Equal(that1.A) { + return false + } + if this.B != nil && that1.B != nil { + if *this.B != *that1.B { + return false + } + } else if this.B != nil { + return false + } else if that1.B != nil { + return false + } + if !this.C.Equal(that1.C) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NinOptNativeDefault) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NinOptNativeDefault) + if !ok { + that2, ok := that.(NinOptNativeDefault) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NinOptNativeDefault") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NinOptNativeDefault but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NinOptNativeDefault but is not nil && this == nil") + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) + } + } else if this.Field1 != nil { + return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") + } else if that1.Field1 != nil { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", *this.Field2, *that1.Field2) + } + } else if this.Field2 != nil { + return fmt.Errorf("this.Field2 == nil && that.Field2 != nil") + } else if that1.Field2 != nil { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) + } + if this.Field3 != nil && that1.Field3 != nil { + if *this.Field3 != *that1.Field3 { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", *this.Field3, *that1.Field3) + } + } else if this.Field3 != nil { + return fmt.Errorf("this.Field3 == nil && that.Field3 != nil") + } else if that1.Field3 != nil { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", this.Field3, that1.Field3) + } + if this.Field4 != nil && that1.Field4 != nil { + if *this.Field4 != *that1.Field4 { + return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", *this.Field4, *that1.Field4) + } + } else if this.Field4 != nil { + return fmt.Errorf("this.Field4 == nil && that.Field4 != nil") + } else if that1.Field4 != nil { + return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", this.Field4, that1.Field4) + } + if this.Field5 != nil && that1.Field5 != nil { + if *this.Field5 != *that1.Field5 { + return fmt.Errorf("Field5 this(%v) Not Equal that(%v)", *this.Field5, *that1.Field5) + } + } else if this.Field5 != nil { + return fmt.Errorf("this.Field5 == nil && that.Field5 != nil") + } else if that1.Field5 != nil { + return fmt.Errorf("Field5 this(%v) Not Equal that(%v)", this.Field5, that1.Field5) + } + if this.Field6 != nil && that1.Field6 != nil { + if *this.Field6 != *that1.Field6 { + return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", *this.Field6, *that1.Field6) + } + } else if this.Field6 != nil { + return fmt.Errorf("this.Field6 == nil && that.Field6 != nil") + } else if that1.Field6 != nil { + return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", this.Field6, that1.Field6) + } + if this.Field7 != nil && that1.Field7 != nil { + if *this.Field7 != *that1.Field7 { + return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", *this.Field7, *that1.Field7) + } + } else if this.Field7 != nil { + return fmt.Errorf("this.Field7 == nil && that.Field7 != nil") + } else if that1.Field7 != nil { + return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", this.Field7, that1.Field7) + } + if this.Field8 != nil && that1.Field8 != nil { + if *this.Field8 != *that1.Field8 { + return fmt.Errorf("Field8 this(%v) Not Equal that(%v)", *this.Field8, *that1.Field8) + } + } else if this.Field8 != nil { + return fmt.Errorf("this.Field8 == nil && that.Field8 != nil") + } else if that1.Field8 != nil { + return fmt.Errorf("Field8 this(%v) Not Equal that(%v)", this.Field8, that1.Field8) + } + if this.Field9 != nil && that1.Field9 != nil { + if *this.Field9 != *that1.Field9 { + return fmt.Errorf("Field9 this(%v) Not Equal that(%v)", *this.Field9, *that1.Field9) + } + } else if this.Field9 != nil { + return fmt.Errorf("this.Field9 == nil && that.Field9 != nil") + } else if that1.Field9 != nil { + return fmt.Errorf("Field9 this(%v) Not Equal that(%v)", this.Field9, that1.Field9) + } + if this.Field10 != nil && that1.Field10 != nil { + if *this.Field10 != *that1.Field10 { + return fmt.Errorf("Field10 this(%v) Not Equal that(%v)", *this.Field10, *that1.Field10) + } + } else if this.Field10 != nil { + return fmt.Errorf("this.Field10 == nil && that.Field10 != nil") + } else if that1.Field10 != nil { + return fmt.Errorf("Field10 this(%v) Not Equal that(%v)", this.Field10, that1.Field10) + } + if this.Field11 != nil && that1.Field11 != nil { + if *this.Field11 != *that1.Field11 { + return fmt.Errorf("Field11 this(%v) Not Equal that(%v)", *this.Field11, *that1.Field11) + } + } else if this.Field11 != nil { + return fmt.Errorf("this.Field11 == nil && that.Field11 != nil") + } else if that1.Field11 != nil { + return fmt.Errorf("Field11 this(%v) Not Equal that(%v)", this.Field11, that1.Field11) + } + if this.Field12 != nil && that1.Field12 != nil { + if *this.Field12 != *that1.Field12 { + return fmt.Errorf("Field12 this(%v) Not Equal that(%v)", *this.Field12, *that1.Field12) + } + } else if this.Field12 != nil { + return fmt.Errorf("this.Field12 == nil && that.Field12 != nil") + } else if that1.Field12 != nil { + return fmt.Errorf("Field12 this(%v) Not Equal that(%v)", this.Field12, that1.Field12) + } + if this.Field13 != nil && that1.Field13 != nil { + if *this.Field13 != *that1.Field13 { + return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", *this.Field13, *that1.Field13) + } + } else if this.Field13 != nil { + return fmt.Errorf("this.Field13 == nil && that.Field13 != nil") + } else if that1.Field13 != nil { + return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", this.Field13, that1.Field13) + } + if this.Field14 != nil && that1.Field14 != nil { + if *this.Field14 != *that1.Field14 { + return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", *this.Field14, *that1.Field14) + } + } else if this.Field14 != nil { + return fmt.Errorf("this.Field14 == nil && that.Field14 != nil") + } else if that1.Field14 != nil { + return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", this.Field14, that1.Field14) + } + if !bytes.Equal(this.Field15, that1.Field15) { + return fmt.Errorf("Field15 this(%v) Not Equal that(%v)", this.Field15, that1.Field15) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NinOptNativeDefault) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*NinOptNativeDefault) + if !ok { + that2, ok := that.(NinOptNativeDefault) + 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.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return false + } + } else if this.Field1 != nil { + return false + } else if that1.Field1 != nil { + return false + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + return false + } + } else if this.Field2 != nil { + return false + } else if that1.Field2 != nil { + return false + } + if this.Field3 != nil && that1.Field3 != nil { + if *this.Field3 != *that1.Field3 { + return false + } + } else if this.Field3 != nil { + return false + } else if that1.Field3 != nil { + return false + } + if this.Field4 != nil && that1.Field4 != nil { + if *this.Field4 != *that1.Field4 { + return false + } + } else if this.Field4 != nil { + return false + } else if that1.Field4 != nil { + return false + } + if this.Field5 != nil && that1.Field5 != nil { + if *this.Field5 != *that1.Field5 { + return false + } + } else if this.Field5 != nil { + return false + } else if that1.Field5 != nil { + return false + } + if this.Field6 != nil && that1.Field6 != nil { + if *this.Field6 != *that1.Field6 { + return false + } + } else if this.Field6 != nil { + return false + } else if that1.Field6 != nil { + return false + } + if this.Field7 != nil && that1.Field7 != nil { + if *this.Field7 != *that1.Field7 { + return false + } + } else if this.Field7 != nil { + return false + } else if that1.Field7 != nil { + return false + } + if this.Field8 != nil && that1.Field8 != nil { + if *this.Field8 != *that1.Field8 { + return false + } + } else if this.Field8 != nil { + return false + } else if that1.Field8 != nil { + return false + } + if this.Field9 != nil && that1.Field9 != nil { + if *this.Field9 != *that1.Field9 { + return false + } + } else if this.Field9 != nil { + return false + } else if that1.Field9 != nil { + return false + } + if this.Field10 != nil && that1.Field10 != nil { + if *this.Field10 != *that1.Field10 { + return false + } + } else if this.Field10 != nil { + return false + } else if that1.Field10 != nil { + return false + } + if this.Field11 != nil && that1.Field11 != nil { + if *this.Field11 != *that1.Field11 { + return false + } + } else if this.Field11 != nil { + return false + } else if that1.Field11 != nil { + return false + } + if this.Field12 != nil && that1.Field12 != nil { + if *this.Field12 != *that1.Field12 { + return false + } + } else if this.Field12 != nil { + return false + } else if that1.Field12 != nil { + return false + } + if this.Field13 != nil && that1.Field13 != nil { + if *this.Field13 != *that1.Field13 { + return false + } + } else if this.Field13 != nil { + return false + } else if that1.Field13 != nil { + return false + } + if this.Field14 != nil && that1.Field14 != nil { + if *this.Field14 != *that1.Field14 { + return false + } + } else if this.Field14 != nil { + return false + } else if that1.Field14 != nil { + return false + } + if !bytes.Equal(this.Field15, that1.Field15) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *CustomContainer) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*CustomContainer) + if !ok { + that2, ok := that.(CustomContainer) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *CustomContainer") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *CustomContainer but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *CustomContainer but is not nil && this == nil") + } + if !this.CustomStruct.Equal(&that1.CustomStruct) { + return fmt.Errorf("CustomStruct this(%v) Not Equal that(%v)", this.CustomStruct, that1.CustomStruct) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *CustomContainer) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*CustomContainer) + if !ok { + that2, ok := that.(CustomContainer) + 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.CustomStruct.Equal(&that1.CustomStruct) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *CustomNameNidOptNative) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*CustomNameNidOptNative) + if !ok { + that2, ok := that.(CustomNameNidOptNative) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *CustomNameNidOptNative") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *CustomNameNidOptNative but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *CustomNameNidOptNative but is not nil && this == nil") + } + if this.FieldA != that1.FieldA { + return fmt.Errorf("FieldA this(%v) Not Equal that(%v)", this.FieldA, that1.FieldA) + } + if this.FieldB != that1.FieldB { + return fmt.Errorf("FieldB this(%v) Not Equal that(%v)", this.FieldB, that1.FieldB) + } + if this.FieldC != that1.FieldC { + return fmt.Errorf("FieldC this(%v) Not Equal that(%v)", this.FieldC, that1.FieldC) + } + if this.FieldD != that1.FieldD { + return fmt.Errorf("FieldD this(%v) Not Equal that(%v)", this.FieldD, that1.FieldD) + } + if this.FieldE != that1.FieldE { + return fmt.Errorf("FieldE this(%v) Not Equal that(%v)", this.FieldE, that1.FieldE) + } + if this.FieldF != that1.FieldF { + return fmt.Errorf("FieldF this(%v) Not Equal that(%v)", this.FieldF, that1.FieldF) + } + if this.FieldG != that1.FieldG { + return fmt.Errorf("FieldG this(%v) Not Equal that(%v)", this.FieldG, that1.FieldG) + } + if this.FieldH != that1.FieldH { + return fmt.Errorf("FieldH this(%v) Not Equal that(%v)", this.FieldH, that1.FieldH) + } + if this.FieldI != that1.FieldI { + return fmt.Errorf("FieldI this(%v) Not Equal that(%v)", this.FieldI, that1.FieldI) + } + if this.FieldJ != that1.FieldJ { + return fmt.Errorf("FieldJ this(%v) Not Equal that(%v)", this.FieldJ, that1.FieldJ) + } + if this.FieldK != that1.FieldK { + return fmt.Errorf("FieldK this(%v) Not Equal that(%v)", this.FieldK, that1.FieldK) + } + if this.FieldL != that1.FieldL { + return fmt.Errorf("FieldL this(%v) Not Equal that(%v)", this.FieldL, that1.FieldL) + } + if this.FieldM != that1.FieldM { + return fmt.Errorf("FieldM this(%v) Not Equal that(%v)", this.FieldM, that1.FieldM) + } + if this.FieldN != that1.FieldN { + return fmt.Errorf("FieldN this(%v) Not Equal that(%v)", this.FieldN, that1.FieldN) + } + if !bytes.Equal(this.FieldO, that1.FieldO) { + return fmt.Errorf("FieldO this(%v) Not Equal that(%v)", this.FieldO, that1.FieldO) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *CustomNameNidOptNative) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*CustomNameNidOptNative) + if !ok { + that2, ok := that.(CustomNameNidOptNative) + 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.FieldA != that1.FieldA { + return false + } + if this.FieldB != that1.FieldB { + return false + } + if this.FieldC != that1.FieldC { + return false + } + if this.FieldD != that1.FieldD { + return false + } + if this.FieldE != that1.FieldE { + return false + } + if this.FieldF != that1.FieldF { + return false + } + if this.FieldG != that1.FieldG { + return false + } + if this.FieldH != that1.FieldH { + return false + } + if this.FieldI != that1.FieldI { + return false + } + if this.FieldJ != that1.FieldJ { + return false + } + if this.FieldK != that1.FieldK { + return false + } + if this.FieldL != that1.FieldL { + return false + } + if this.FieldM != that1.FieldM { + return false + } + if this.FieldN != that1.FieldN { + return false + } + if !bytes.Equal(this.FieldO, that1.FieldO) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *CustomNameNinOptNative) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*CustomNameNinOptNative) + if !ok { + that2, ok := that.(CustomNameNinOptNative) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *CustomNameNinOptNative") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *CustomNameNinOptNative but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *CustomNameNinOptNative but is not nil && this == nil") + } + if this.FieldA != nil && that1.FieldA != nil { + if *this.FieldA != *that1.FieldA { + return fmt.Errorf("FieldA this(%v) Not Equal that(%v)", *this.FieldA, *that1.FieldA) + } + } else if this.FieldA != nil { + return fmt.Errorf("this.FieldA == nil && that.FieldA != nil") + } else if that1.FieldA != nil { + return fmt.Errorf("FieldA this(%v) Not Equal that(%v)", this.FieldA, that1.FieldA) + } + if this.FieldB != nil && that1.FieldB != nil { + if *this.FieldB != *that1.FieldB { + return fmt.Errorf("FieldB this(%v) Not Equal that(%v)", *this.FieldB, *that1.FieldB) + } + } else if this.FieldB != nil { + return fmt.Errorf("this.FieldB == nil && that.FieldB != nil") + } else if that1.FieldB != nil { + return fmt.Errorf("FieldB this(%v) Not Equal that(%v)", this.FieldB, that1.FieldB) + } + if this.FieldC != nil && that1.FieldC != nil { + if *this.FieldC != *that1.FieldC { + return fmt.Errorf("FieldC this(%v) Not Equal that(%v)", *this.FieldC, *that1.FieldC) + } + } else if this.FieldC != nil { + return fmt.Errorf("this.FieldC == nil && that.FieldC != nil") + } else if that1.FieldC != nil { + return fmt.Errorf("FieldC this(%v) Not Equal that(%v)", this.FieldC, that1.FieldC) + } + if this.FieldD != nil && that1.FieldD != nil { + if *this.FieldD != *that1.FieldD { + return fmt.Errorf("FieldD this(%v) Not Equal that(%v)", *this.FieldD, *that1.FieldD) + } + } else if this.FieldD != nil { + return fmt.Errorf("this.FieldD == nil && that.FieldD != nil") + } else if that1.FieldD != nil { + return fmt.Errorf("FieldD this(%v) Not Equal that(%v)", this.FieldD, that1.FieldD) + } + if this.FieldE != nil && that1.FieldE != nil { + if *this.FieldE != *that1.FieldE { + return fmt.Errorf("FieldE this(%v) Not Equal that(%v)", *this.FieldE, *that1.FieldE) + } + } else if this.FieldE != nil { + return fmt.Errorf("this.FieldE == nil && that.FieldE != nil") + } else if that1.FieldE != nil { + return fmt.Errorf("FieldE this(%v) Not Equal that(%v)", this.FieldE, that1.FieldE) + } + if this.FieldF != nil && that1.FieldF != nil { + if *this.FieldF != *that1.FieldF { + return fmt.Errorf("FieldF this(%v) Not Equal that(%v)", *this.FieldF, *that1.FieldF) + } + } else if this.FieldF != nil { + return fmt.Errorf("this.FieldF == nil && that.FieldF != nil") + } else if that1.FieldF != nil { + return fmt.Errorf("FieldF this(%v) Not Equal that(%v)", this.FieldF, that1.FieldF) + } + if this.FieldG != nil && that1.FieldG != nil { + if *this.FieldG != *that1.FieldG { + return fmt.Errorf("FieldG this(%v) Not Equal that(%v)", *this.FieldG, *that1.FieldG) + } + } else if this.FieldG != nil { + return fmt.Errorf("this.FieldG == nil && that.FieldG != nil") + } else if that1.FieldG != nil { + return fmt.Errorf("FieldG this(%v) Not Equal that(%v)", this.FieldG, that1.FieldG) + } + if this.FieldH != nil && that1.FieldH != nil { + if *this.FieldH != *that1.FieldH { + return fmt.Errorf("FieldH this(%v) Not Equal that(%v)", *this.FieldH, *that1.FieldH) + } + } else if this.FieldH != nil { + return fmt.Errorf("this.FieldH == nil && that.FieldH != nil") + } else if that1.FieldH != nil { + return fmt.Errorf("FieldH this(%v) Not Equal that(%v)", this.FieldH, that1.FieldH) + } + if this.FieldI != nil && that1.FieldI != nil { + if *this.FieldI != *that1.FieldI { + return fmt.Errorf("FieldI this(%v) Not Equal that(%v)", *this.FieldI, *that1.FieldI) + } + } else if this.FieldI != nil { + return fmt.Errorf("this.FieldI == nil && that.FieldI != nil") + } else if that1.FieldI != nil { + return fmt.Errorf("FieldI this(%v) Not Equal that(%v)", this.FieldI, that1.FieldI) + } + if this.FieldJ != nil && that1.FieldJ != nil { + if *this.FieldJ != *that1.FieldJ { + return fmt.Errorf("FieldJ this(%v) Not Equal that(%v)", *this.FieldJ, *that1.FieldJ) + } + } else if this.FieldJ != nil { + return fmt.Errorf("this.FieldJ == nil && that.FieldJ != nil") + } else if that1.FieldJ != nil { + return fmt.Errorf("FieldJ this(%v) Not Equal that(%v)", this.FieldJ, that1.FieldJ) + } + if this.FieldK != nil && that1.FieldK != nil { + if *this.FieldK != *that1.FieldK { + return fmt.Errorf("FieldK this(%v) Not Equal that(%v)", *this.FieldK, *that1.FieldK) + } + } else if this.FieldK != nil { + return fmt.Errorf("this.FieldK == nil && that.FieldK != nil") + } else if that1.FieldK != nil { + return fmt.Errorf("FieldK this(%v) Not Equal that(%v)", this.FieldK, that1.FieldK) + } + if this.FielL != nil && that1.FielL != nil { + if *this.FielL != *that1.FielL { + return fmt.Errorf("FielL this(%v) Not Equal that(%v)", *this.FielL, *that1.FielL) + } + } else if this.FielL != nil { + return fmt.Errorf("this.FielL == nil && that.FielL != nil") + } else if that1.FielL != nil { + return fmt.Errorf("FielL this(%v) Not Equal that(%v)", this.FielL, that1.FielL) + } + if this.FieldM != nil && that1.FieldM != nil { + if *this.FieldM != *that1.FieldM { + return fmt.Errorf("FieldM this(%v) Not Equal that(%v)", *this.FieldM, *that1.FieldM) + } + } else if this.FieldM != nil { + return fmt.Errorf("this.FieldM == nil && that.FieldM != nil") + } else if that1.FieldM != nil { + return fmt.Errorf("FieldM this(%v) Not Equal that(%v)", this.FieldM, that1.FieldM) + } + if this.FieldN != nil && that1.FieldN != nil { + if *this.FieldN != *that1.FieldN { + return fmt.Errorf("FieldN this(%v) Not Equal that(%v)", *this.FieldN, *that1.FieldN) + } + } else if this.FieldN != nil { + return fmt.Errorf("this.FieldN == nil && that.FieldN != nil") + } else if that1.FieldN != nil { + return fmt.Errorf("FieldN this(%v) Not Equal that(%v)", this.FieldN, that1.FieldN) + } + if !bytes.Equal(this.FieldO, that1.FieldO) { + return fmt.Errorf("FieldO this(%v) Not Equal that(%v)", this.FieldO, that1.FieldO) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *CustomNameNinOptNative) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*CustomNameNinOptNative) + if !ok { + that2, ok := that.(CustomNameNinOptNative) + 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.FieldA != nil && that1.FieldA != nil { + if *this.FieldA != *that1.FieldA { + return false + } + } else if this.FieldA != nil { + return false + } else if that1.FieldA != nil { + return false + } + if this.FieldB != nil && that1.FieldB != nil { + if *this.FieldB != *that1.FieldB { + return false + } + } else if this.FieldB != nil { + return false + } else if that1.FieldB != nil { + return false + } + if this.FieldC != nil && that1.FieldC != nil { + if *this.FieldC != *that1.FieldC { + return false + } + } else if this.FieldC != nil { + return false + } else if that1.FieldC != nil { + return false + } + if this.FieldD != nil && that1.FieldD != nil { + if *this.FieldD != *that1.FieldD { + return false + } + } else if this.FieldD != nil { + return false + } else if that1.FieldD != nil { + return false + } + if this.FieldE != nil && that1.FieldE != nil { + if *this.FieldE != *that1.FieldE { + return false + } + } else if this.FieldE != nil { + return false + } else if that1.FieldE != nil { + return false + } + if this.FieldF != nil && that1.FieldF != nil { + if *this.FieldF != *that1.FieldF { + return false + } + } else if this.FieldF != nil { + return false + } else if that1.FieldF != nil { + return false + } + if this.FieldG != nil && that1.FieldG != nil { + if *this.FieldG != *that1.FieldG { + return false + } + } else if this.FieldG != nil { + return false + } else if that1.FieldG != nil { + return false + } + if this.FieldH != nil && that1.FieldH != nil { + if *this.FieldH != *that1.FieldH { + return false + } + } else if this.FieldH != nil { + return false + } else if that1.FieldH != nil { + return false + } + if this.FieldI != nil && that1.FieldI != nil { + if *this.FieldI != *that1.FieldI { + return false + } + } else if this.FieldI != nil { + return false + } else if that1.FieldI != nil { + return false + } + if this.FieldJ != nil && that1.FieldJ != nil { + if *this.FieldJ != *that1.FieldJ { + return false + } + } else if this.FieldJ != nil { + return false + } else if that1.FieldJ != nil { + return false + } + if this.FieldK != nil && that1.FieldK != nil { + if *this.FieldK != *that1.FieldK { + return false + } + } else if this.FieldK != nil { + return false + } else if that1.FieldK != nil { + return false + } + if this.FielL != nil && that1.FielL != nil { + if *this.FielL != *that1.FielL { + return false + } + } else if this.FielL != nil { + return false + } else if that1.FielL != nil { + return false + } + if this.FieldM != nil && that1.FieldM != nil { + if *this.FieldM != *that1.FieldM { + return false + } + } else if this.FieldM != nil { + return false + } else if that1.FieldM != nil { + return false + } + if this.FieldN != nil && that1.FieldN != nil { + if *this.FieldN != *that1.FieldN { + return false + } + } else if this.FieldN != nil { + return false + } else if that1.FieldN != nil { + return false + } + if !bytes.Equal(this.FieldO, that1.FieldO) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *CustomNameNinRepNative) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*CustomNameNinRepNative) + if !ok { + that2, ok := that.(CustomNameNinRepNative) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *CustomNameNinRepNative") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *CustomNameNinRepNative but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *CustomNameNinRepNative but is not nil && this == nil") + } + if len(this.FieldA) != len(that1.FieldA) { + return fmt.Errorf("FieldA this(%v) Not Equal that(%v)", len(this.FieldA), len(that1.FieldA)) + } + for i := range this.FieldA { + if this.FieldA[i] != that1.FieldA[i] { + return fmt.Errorf("FieldA this[%v](%v) Not Equal that[%v](%v)", i, this.FieldA[i], i, that1.FieldA[i]) + } + } + if len(this.FieldB) != len(that1.FieldB) { + return fmt.Errorf("FieldB this(%v) Not Equal that(%v)", len(this.FieldB), len(that1.FieldB)) + } + for i := range this.FieldB { + if this.FieldB[i] != that1.FieldB[i] { + return fmt.Errorf("FieldB this[%v](%v) Not Equal that[%v](%v)", i, this.FieldB[i], i, that1.FieldB[i]) + } + } + if len(this.FieldC) != len(that1.FieldC) { + return fmt.Errorf("FieldC this(%v) Not Equal that(%v)", len(this.FieldC), len(that1.FieldC)) + } + for i := range this.FieldC { + if this.FieldC[i] != that1.FieldC[i] { + return fmt.Errorf("FieldC this[%v](%v) Not Equal that[%v](%v)", i, this.FieldC[i], i, that1.FieldC[i]) + } + } + if len(this.FieldD) != len(that1.FieldD) { + return fmt.Errorf("FieldD this(%v) Not Equal that(%v)", len(this.FieldD), len(that1.FieldD)) + } + for i := range this.FieldD { + if this.FieldD[i] != that1.FieldD[i] { + return fmt.Errorf("FieldD this[%v](%v) Not Equal that[%v](%v)", i, this.FieldD[i], i, that1.FieldD[i]) + } + } + if len(this.FieldE) != len(that1.FieldE) { + return fmt.Errorf("FieldE this(%v) Not Equal that(%v)", len(this.FieldE), len(that1.FieldE)) + } + for i := range this.FieldE { + if this.FieldE[i] != that1.FieldE[i] { + return fmt.Errorf("FieldE this[%v](%v) Not Equal that[%v](%v)", i, this.FieldE[i], i, that1.FieldE[i]) + } + } + if len(this.FieldF) != len(that1.FieldF) { + return fmt.Errorf("FieldF this(%v) Not Equal that(%v)", len(this.FieldF), len(that1.FieldF)) + } + for i := range this.FieldF { + if this.FieldF[i] != that1.FieldF[i] { + return fmt.Errorf("FieldF this[%v](%v) Not Equal that[%v](%v)", i, this.FieldF[i], i, that1.FieldF[i]) + } + } + if len(this.FieldG) != len(that1.FieldG) { + return fmt.Errorf("FieldG this(%v) Not Equal that(%v)", len(this.FieldG), len(that1.FieldG)) + } + for i := range this.FieldG { + if this.FieldG[i] != that1.FieldG[i] { + return fmt.Errorf("FieldG this[%v](%v) Not Equal that[%v](%v)", i, this.FieldG[i], i, that1.FieldG[i]) + } + } + if len(this.FieldH) != len(that1.FieldH) { + return fmt.Errorf("FieldH this(%v) Not Equal that(%v)", len(this.FieldH), len(that1.FieldH)) + } + for i := range this.FieldH { + if this.FieldH[i] != that1.FieldH[i] { + return fmt.Errorf("FieldH this[%v](%v) Not Equal that[%v](%v)", i, this.FieldH[i], i, that1.FieldH[i]) + } + } + if len(this.FieldI) != len(that1.FieldI) { + return fmt.Errorf("FieldI this(%v) Not Equal that(%v)", len(this.FieldI), len(that1.FieldI)) + } + for i := range this.FieldI { + if this.FieldI[i] != that1.FieldI[i] { + return fmt.Errorf("FieldI this[%v](%v) Not Equal that[%v](%v)", i, this.FieldI[i], i, that1.FieldI[i]) + } + } + if len(this.FieldJ) != len(that1.FieldJ) { + return fmt.Errorf("FieldJ this(%v) Not Equal that(%v)", len(this.FieldJ), len(that1.FieldJ)) + } + for i := range this.FieldJ { + if this.FieldJ[i] != that1.FieldJ[i] { + return fmt.Errorf("FieldJ this[%v](%v) Not Equal that[%v](%v)", i, this.FieldJ[i], i, that1.FieldJ[i]) + } + } + if len(this.FieldK) != len(that1.FieldK) { + return fmt.Errorf("FieldK this(%v) Not Equal that(%v)", len(this.FieldK), len(that1.FieldK)) + } + for i := range this.FieldK { + if this.FieldK[i] != that1.FieldK[i] { + return fmt.Errorf("FieldK this[%v](%v) Not Equal that[%v](%v)", i, this.FieldK[i], i, that1.FieldK[i]) + } + } + if len(this.FieldL) != len(that1.FieldL) { + return fmt.Errorf("FieldL this(%v) Not Equal that(%v)", len(this.FieldL), len(that1.FieldL)) + } + for i := range this.FieldL { + if this.FieldL[i] != that1.FieldL[i] { + return fmt.Errorf("FieldL this[%v](%v) Not Equal that[%v](%v)", i, this.FieldL[i], i, that1.FieldL[i]) + } + } + if len(this.FieldM) != len(that1.FieldM) { + return fmt.Errorf("FieldM this(%v) Not Equal that(%v)", len(this.FieldM), len(that1.FieldM)) + } + for i := range this.FieldM { + if this.FieldM[i] != that1.FieldM[i] { + return fmt.Errorf("FieldM this[%v](%v) Not Equal that[%v](%v)", i, this.FieldM[i], i, that1.FieldM[i]) + } + } + if len(this.FieldN) != len(that1.FieldN) { + return fmt.Errorf("FieldN this(%v) Not Equal that(%v)", len(this.FieldN), len(that1.FieldN)) + } + for i := range this.FieldN { + if this.FieldN[i] != that1.FieldN[i] { + return fmt.Errorf("FieldN this[%v](%v) Not Equal that[%v](%v)", i, this.FieldN[i], i, that1.FieldN[i]) + } + } + if len(this.FieldO) != len(that1.FieldO) { + return fmt.Errorf("FieldO this(%v) Not Equal that(%v)", len(this.FieldO), len(that1.FieldO)) + } + for i := range this.FieldO { + if !bytes.Equal(this.FieldO[i], that1.FieldO[i]) { + return fmt.Errorf("FieldO this[%v](%v) Not Equal that[%v](%v)", i, this.FieldO[i], i, that1.FieldO[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *CustomNameNinRepNative) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*CustomNameNinRepNative) + if !ok { + that2, ok := that.(CustomNameNinRepNative) + 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.FieldA) != len(that1.FieldA) { + return false + } + for i := range this.FieldA { + if this.FieldA[i] != that1.FieldA[i] { + return false + } + } + if len(this.FieldB) != len(that1.FieldB) { + return false + } + for i := range this.FieldB { + if this.FieldB[i] != that1.FieldB[i] { + return false + } + } + if len(this.FieldC) != len(that1.FieldC) { + return false + } + for i := range this.FieldC { + if this.FieldC[i] != that1.FieldC[i] { + return false + } + } + if len(this.FieldD) != len(that1.FieldD) { + return false + } + for i := range this.FieldD { + if this.FieldD[i] != that1.FieldD[i] { + return false + } + } + if len(this.FieldE) != len(that1.FieldE) { + return false + } + for i := range this.FieldE { + if this.FieldE[i] != that1.FieldE[i] { + return false + } + } + if len(this.FieldF) != len(that1.FieldF) { + return false + } + for i := range this.FieldF { + if this.FieldF[i] != that1.FieldF[i] { + return false + } + } + if len(this.FieldG) != len(that1.FieldG) { + return false + } + for i := range this.FieldG { + if this.FieldG[i] != that1.FieldG[i] { + return false + } + } + if len(this.FieldH) != len(that1.FieldH) { + return false + } + for i := range this.FieldH { + if this.FieldH[i] != that1.FieldH[i] { + return false + } + } + if len(this.FieldI) != len(that1.FieldI) { + return false + } + for i := range this.FieldI { + if this.FieldI[i] != that1.FieldI[i] { + return false + } + } + if len(this.FieldJ) != len(that1.FieldJ) { + return false + } + for i := range this.FieldJ { + if this.FieldJ[i] != that1.FieldJ[i] { + return false + } + } + if len(this.FieldK) != len(that1.FieldK) { + return false + } + for i := range this.FieldK { + if this.FieldK[i] != that1.FieldK[i] { + return false + } + } + if len(this.FieldL) != len(that1.FieldL) { + return false + } + for i := range this.FieldL { + if this.FieldL[i] != that1.FieldL[i] { + return false + } + } + if len(this.FieldM) != len(that1.FieldM) { + return false + } + for i := range this.FieldM { + if this.FieldM[i] != that1.FieldM[i] { + return false + } + } + if len(this.FieldN) != len(that1.FieldN) { + return false + } + for i := range this.FieldN { + if this.FieldN[i] != that1.FieldN[i] { + return false + } + } + if len(this.FieldO) != len(that1.FieldO) { + return false + } + for i := range this.FieldO { + if !bytes.Equal(this.FieldO[i], that1.FieldO[i]) { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *CustomNameNinStruct) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*CustomNameNinStruct) + if !ok { + that2, ok := that.(CustomNameNinStruct) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *CustomNameNinStruct") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *CustomNameNinStruct but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *CustomNameNinStruct but is not nil && this == nil") + } + if this.FieldA != nil && that1.FieldA != nil { + if *this.FieldA != *that1.FieldA { + return fmt.Errorf("FieldA this(%v) Not Equal that(%v)", *this.FieldA, *that1.FieldA) + } + } else if this.FieldA != nil { + return fmt.Errorf("this.FieldA == nil && that.FieldA != nil") + } else if that1.FieldA != nil { + return fmt.Errorf("FieldA this(%v) Not Equal that(%v)", this.FieldA, that1.FieldA) + } + if this.FieldB != nil && that1.FieldB != nil { + if *this.FieldB != *that1.FieldB { + return fmt.Errorf("FieldB this(%v) Not Equal that(%v)", *this.FieldB, *that1.FieldB) + } + } else if this.FieldB != nil { + return fmt.Errorf("this.FieldB == nil && that.FieldB != nil") + } else if that1.FieldB != nil { + return fmt.Errorf("FieldB this(%v) Not Equal that(%v)", this.FieldB, that1.FieldB) + } + if !this.FieldC.Equal(that1.FieldC) { + return fmt.Errorf("FieldC this(%v) Not Equal that(%v)", this.FieldC, that1.FieldC) + } + if len(this.FieldD) != len(that1.FieldD) { + return fmt.Errorf("FieldD this(%v) Not Equal that(%v)", len(this.FieldD), len(that1.FieldD)) + } + for i := range this.FieldD { + if !this.FieldD[i].Equal(that1.FieldD[i]) { + return fmt.Errorf("FieldD this[%v](%v) Not Equal that[%v](%v)", i, this.FieldD[i], i, that1.FieldD[i]) + } + } + if this.FieldE != nil && that1.FieldE != nil { + if *this.FieldE != *that1.FieldE { + return fmt.Errorf("FieldE this(%v) Not Equal that(%v)", *this.FieldE, *that1.FieldE) + } + } else if this.FieldE != nil { + return fmt.Errorf("this.FieldE == nil && that.FieldE != nil") + } else if that1.FieldE != nil { + return fmt.Errorf("FieldE this(%v) Not Equal that(%v)", this.FieldE, that1.FieldE) + } + if this.FieldF != nil && that1.FieldF != nil { + if *this.FieldF != *that1.FieldF { + return fmt.Errorf("FieldF this(%v) Not Equal that(%v)", *this.FieldF, *that1.FieldF) + } + } else if this.FieldF != nil { + return fmt.Errorf("this.FieldF == nil && that.FieldF != nil") + } else if that1.FieldF != nil { + return fmt.Errorf("FieldF this(%v) Not Equal that(%v)", this.FieldF, that1.FieldF) + } + if !this.FieldG.Equal(that1.FieldG) { + return fmt.Errorf("FieldG this(%v) Not Equal that(%v)", this.FieldG, that1.FieldG) + } + if this.FieldH != nil && that1.FieldH != nil { + if *this.FieldH != *that1.FieldH { + return fmt.Errorf("FieldH this(%v) Not Equal that(%v)", *this.FieldH, *that1.FieldH) + } + } else if this.FieldH != nil { + return fmt.Errorf("this.FieldH == nil && that.FieldH != nil") + } else if that1.FieldH != nil { + return fmt.Errorf("FieldH this(%v) Not Equal that(%v)", this.FieldH, that1.FieldH) + } + if this.FieldI != nil && that1.FieldI != nil { + if *this.FieldI != *that1.FieldI { + return fmt.Errorf("FieldI this(%v) Not Equal that(%v)", *this.FieldI, *that1.FieldI) + } + } else if this.FieldI != nil { + return fmt.Errorf("this.FieldI == nil && that.FieldI != nil") + } else if that1.FieldI != nil { + return fmt.Errorf("FieldI this(%v) Not Equal that(%v)", this.FieldI, that1.FieldI) + } + if !bytes.Equal(this.FieldJ, that1.FieldJ) { + return fmt.Errorf("FieldJ this(%v) Not Equal that(%v)", this.FieldJ, that1.FieldJ) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *CustomNameNinStruct) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*CustomNameNinStruct) + if !ok { + that2, ok := that.(CustomNameNinStruct) + 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.FieldA != nil && that1.FieldA != nil { + if *this.FieldA != *that1.FieldA { + return false + } + } else if this.FieldA != nil { + return false + } else if that1.FieldA != nil { + return false + } + if this.FieldB != nil && that1.FieldB != nil { + if *this.FieldB != *that1.FieldB { + return false + } + } else if this.FieldB != nil { + return false + } else if that1.FieldB != nil { + return false + } + if !this.FieldC.Equal(that1.FieldC) { + return false + } + if len(this.FieldD) != len(that1.FieldD) { + return false + } + for i := range this.FieldD { + if !this.FieldD[i].Equal(that1.FieldD[i]) { + return false + } + } + if this.FieldE != nil && that1.FieldE != nil { + if *this.FieldE != *that1.FieldE { + return false + } + } else if this.FieldE != nil { + return false + } else if that1.FieldE != nil { + return false + } + if this.FieldF != nil && that1.FieldF != nil { + if *this.FieldF != *that1.FieldF { + return false + } + } else if this.FieldF != nil { + return false + } else if that1.FieldF != nil { + return false + } + if !this.FieldG.Equal(that1.FieldG) { + return false + } + if this.FieldH != nil && that1.FieldH != nil { + if *this.FieldH != *that1.FieldH { + return false + } + } else if this.FieldH != nil { + return false + } else if that1.FieldH != nil { + return false + } + if this.FieldI != nil && that1.FieldI != nil { + if *this.FieldI != *that1.FieldI { + return false + } + } else if this.FieldI != nil { + return false + } else if that1.FieldI != nil { + return false + } + if !bytes.Equal(this.FieldJ, that1.FieldJ) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *CustomNameCustomType) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*CustomNameCustomType) + if !ok { + that2, ok := that.(CustomNameCustomType) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *CustomNameCustomType") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *CustomNameCustomType but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *CustomNameCustomType but is not nil && this == nil") + } + if that1.FieldA == nil { + if this.FieldA != nil { + return fmt.Errorf("this.FieldA != nil && that1.FieldA == nil") + } + } else if !this.FieldA.Equal(*that1.FieldA) { + return fmt.Errorf("FieldA this(%v) Not Equal that(%v)", this.FieldA, that1.FieldA) + } + if that1.FieldB == nil { + if this.FieldB != nil { + return fmt.Errorf("this.FieldB != nil && that1.FieldB == nil") + } + } else if !this.FieldB.Equal(*that1.FieldB) { + return fmt.Errorf("FieldB this(%v) Not Equal that(%v)", this.FieldB, that1.FieldB) + } + if len(this.FieldC) != len(that1.FieldC) { + return fmt.Errorf("FieldC this(%v) Not Equal that(%v)", len(this.FieldC), len(that1.FieldC)) + } + for i := range this.FieldC { + if !this.FieldC[i].Equal(that1.FieldC[i]) { + return fmt.Errorf("FieldC this[%v](%v) Not Equal that[%v](%v)", i, this.FieldC[i], i, that1.FieldC[i]) + } + } + if len(this.FieldD) != len(that1.FieldD) { + return fmt.Errorf("FieldD this(%v) Not Equal that(%v)", len(this.FieldD), len(that1.FieldD)) + } + for i := range this.FieldD { + if !this.FieldD[i].Equal(that1.FieldD[i]) { + return fmt.Errorf("FieldD this[%v](%v) Not Equal that[%v](%v)", i, this.FieldD[i], i, that1.FieldD[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *CustomNameCustomType) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*CustomNameCustomType) + if !ok { + that2, ok := that.(CustomNameCustomType) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + if this == nil { + return true + } + return false + } else if this == nil { + return false + } + if that1.FieldA == nil { + if this.FieldA != nil { + return false + } + } else if !this.FieldA.Equal(*that1.FieldA) { + return false + } + if that1.FieldB == nil { + if this.FieldB != nil { + return false + } + } else if !this.FieldB.Equal(*that1.FieldB) { + return false + } + if len(this.FieldC) != len(that1.FieldC) { + return false + } + for i := range this.FieldC { + if !this.FieldC[i].Equal(that1.FieldC[i]) { + return false + } + } + if len(this.FieldD) != len(that1.FieldD) { + return false + } + for i := range this.FieldD { + if !this.FieldD[i].Equal(that1.FieldD[i]) { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *CustomNameNinEmbeddedStructUnion) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*CustomNameNinEmbeddedStructUnion) + if !ok { + that2, ok := that.(CustomNameNinEmbeddedStructUnion) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *CustomNameNinEmbeddedStructUnion") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *CustomNameNinEmbeddedStructUnion but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *CustomNameNinEmbeddedStructUnion but is not nil && this == nil") + } + if !this.NidOptNative.Equal(that1.NidOptNative) { + return fmt.Errorf("NidOptNative this(%v) Not Equal that(%v)", this.NidOptNative, that1.NidOptNative) + } + if !this.FieldA.Equal(that1.FieldA) { + return fmt.Errorf("FieldA this(%v) Not Equal that(%v)", this.FieldA, that1.FieldA) + } + if this.FieldB != nil && that1.FieldB != nil { + if *this.FieldB != *that1.FieldB { + return fmt.Errorf("FieldB this(%v) Not Equal that(%v)", *this.FieldB, *that1.FieldB) + } + } else if this.FieldB != nil { + return fmt.Errorf("this.FieldB == nil && that.FieldB != nil") + } else if that1.FieldB != nil { + return fmt.Errorf("FieldB this(%v) Not Equal that(%v)", this.FieldB, that1.FieldB) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *CustomNameNinEmbeddedStructUnion) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*CustomNameNinEmbeddedStructUnion) + if !ok { + that2, ok := that.(CustomNameNinEmbeddedStructUnion) + 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.NidOptNative.Equal(that1.NidOptNative) { + return false + } + if !this.FieldA.Equal(that1.FieldA) { + return false + } + if this.FieldB != nil && that1.FieldB != nil { + if *this.FieldB != *that1.FieldB { + return false + } + } else if this.FieldB != nil { + return false + } else if that1.FieldB != nil { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *CustomNameEnum) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*CustomNameEnum) + if !ok { + that2, ok := that.(CustomNameEnum) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *CustomNameEnum") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *CustomNameEnum but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *CustomNameEnum but is not nil && this == nil") + } + if this.FieldA != nil && that1.FieldA != nil { + if *this.FieldA != *that1.FieldA { + return fmt.Errorf("FieldA this(%v) Not Equal that(%v)", *this.FieldA, *that1.FieldA) + } + } else if this.FieldA != nil { + return fmt.Errorf("this.FieldA == nil && that.FieldA != nil") + } else if that1.FieldA != nil { + return fmt.Errorf("FieldA this(%v) Not Equal that(%v)", this.FieldA, that1.FieldA) + } + if len(this.FieldB) != len(that1.FieldB) { + return fmt.Errorf("FieldB this(%v) Not Equal that(%v)", len(this.FieldB), len(that1.FieldB)) + } + for i := range this.FieldB { + if this.FieldB[i] != that1.FieldB[i] { + return fmt.Errorf("FieldB this[%v](%v) Not Equal that[%v](%v)", i, this.FieldB[i], i, that1.FieldB[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *CustomNameEnum) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*CustomNameEnum) + if !ok { + that2, ok := that.(CustomNameEnum) + 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.FieldA != nil && that1.FieldA != nil { + if *this.FieldA != *that1.FieldA { + return false + } + } else if this.FieldA != nil { + return false + } else if that1.FieldA != nil { + return false + } + if len(this.FieldB) != len(that1.FieldB) { + return false + } + for i := range this.FieldB { + if this.FieldB[i] != that1.FieldB[i] { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NoExtensionsMap) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NoExtensionsMap) + if !ok { + that2, ok := that.(NoExtensionsMap) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NoExtensionsMap") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NoExtensionsMap but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NoExtensionsMap but is not nil && this == nil") + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) + } + } else if this.Field1 != nil { + return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") + } else if that1.Field1 != nil { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) + } + if !bytes.Equal(this.XXX_extensions, that1.XXX_extensions) { + return fmt.Errorf("XXX_extensions this(%v) Not Equal that(%v)", this.XXX_extensions, that1.XXX_extensions) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NoExtensionsMap) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*NoExtensionsMap) + if !ok { + that2, ok := that.(NoExtensionsMap) + 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.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return false + } + } else if this.Field1 != nil { + return false + } else if that1.Field1 != nil { + return false + } + if !bytes.Equal(this.XXX_extensions, that1.XXX_extensions) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *Unrecognized) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*Unrecognized) + if !ok { + that2, ok := that.(Unrecognized) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *Unrecognized") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *Unrecognized but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *Unrecognized but is not nil && this == nil") + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) + } + } else if this.Field1 != nil { + return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") + } else if that1.Field1 != nil { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) + } + return nil +} +func (this *Unrecognized) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*Unrecognized) + if !ok { + that2, ok := that.(Unrecognized) + 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.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return false + } + } else if this.Field1 != nil { + return false + } else if that1.Field1 != nil { + return false + } + return true +} +func (this *UnrecognizedWithInner) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*UnrecognizedWithInner) + if !ok { + that2, ok := that.(UnrecognizedWithInner) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *UnrecognizedWithInner") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *UnrecognizedWithInner but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *UnrecognizedWithInner but is not nil && this == nil") + } + if len(this.Embedded) != len(that1.Embedded) { + return fmt.Errorf("Embedded this(%v) Not Equal that(%v)", len(this.Embedded), len(that1.Embedded)) + } + for i := range this.Embedded { + if !this.Embedded[i].Equal(that1.Embedded[i]) { + return fmt.Errorf("Embedded this[%v](%v) Not Equal that[%v](%v)", i, this.Embedded[i], i, that1.Embedded[i]) + } + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", *this.Field2, *that1.Field2) + } + } else if this.Field2 != nil { + return fmt.Errorf("this.Field2 == nil && that.Field2 != nil") + } else if that1.Field2 != nil { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *UnrecognizedWithInner) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*UnrecognizedWithInner) + if !ok { + that2, ok := that.(UnrecognizedWithInner) + 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.Embedded) != len(that1.Embedded) { + return false + } + for i := range this.Embedded { + if !this.Embedded[i].Equal(that1.Embedded[i]) { + return false + } + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + return false + } + } else if this.Field2 != nil { + return false + } else if that1.Field2 != nil { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *UnrecognizedWithInner_Inner) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*UnrecognizedWithInner_Inner) + if !ok { + that2, ok := that.(UnrecognizedWithInner_Inner) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *UnrecognizedWithInner_Inner") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *UnrecognizedWithInner_Inner but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *UnrecognizedWithInner_Inner but is not nil && this == nil") + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) + } + } else if this.Field1 != nil { + return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") + } else if that1.Field1 != nil { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) + } + return nil +} +func (this *UnrecognizedWithInner_Inner) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*UnrecognizedWithInner_Inner) + if !ok { + that2, ok := that.(UnrecognizedWithInner_Inner) + 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.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return false + } + } else if this.Field1 != nil { + return false + } else if that1.Field1 != nil { + return false + } + return true +} +func (this *UnrecognizedWithEmbed) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*UnrecognizedWithEmbed) + if !ok { + that2, ok := that.(UnrecognizedWithEmbed) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *UnrecognizedWithEmbed") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *UnrecognizedWithEmbed but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *UnrecognizedWithEmbed but is not nil && this == nil") + } + if !this.UnrecognizedWithEmbed_Embedded.Equal(&that1.UnrecognizedWithEmbed_Embedded) { + return fmt.Errorf("UnrecognizedWithEmbed_Embedded this(%v) Not Equal that(%v)", this.UnrecognizedWithEmbed_Embedded, that1.UnrecognizedWithEmbed_Embedded) + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", *this.Field2, *that1.Field2) + } + } else if this.Field2 != nil { + return fmt.Errorf("this.Field2 == nil && that.Field2 != nil") + } else if that1.Field2 != nil { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *UnrecognizedWithEmbed) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*UnrecognizedWithEmbed) + if !ok { + that2, ok := that.(UnrecognizedWithEmbed) + 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.UnrecognizedWithEmbed_Embedded.Equal(&that1.UnrecognizedWithEmbed_Embedded) { + return false + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + return false + } + } else if this.Field2 != nil { + return false + } else if that1.Field2 != nil { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *UnrecognizedWithEmbed_Embedded) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*UnrecognizedWithEmbed_Embedded) + if !ok { + that2, ok := that.(UnrecognizedWithEmbed_Embedded) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *UnrecognizedWithEmbed_Embedded") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *UnrecognizedWithEmbed_Embedded but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *UnrecognizedWithEmbed_Embedded but is not nil && this == nil") + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) + } + } else if this.Field1 != nil { + return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") + } else if that1.Field1 != nil { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) + } + return nil +} +func (this *UnrecognizedWithEmbed_Embedded) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*UnrecognizedWithEmbed_Embedded) + if !ok { + that2, ok := that.(UnrecognizedWithEmbed_Embedded) + 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.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return false + } + } else if this.Field1 != nil { + return false + } else if that1.Field1 != nil { + return false + } + return true +} +func (this *Node) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*Node) + if !ok { + that2, ok := that.(Node) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *Node") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *Node but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *Node but is not nil && this == nil") + } + if this.Label != nil && that1.Label != nil { + if *this.Label != *that1.Label { + return fmt.Errorf("Label this(%v) Not Equal that(%v)", *this.Label, *that1.Label) + } + } else if this.Label != nil { + return fmt.Errorf("this.Label == nil && that.Label != nil") + } else if that1.Label != nil { + return fmt.Errorf("Label this(%v) Not Equal that(%v)", this.Label, that1.Label) + } + if len(this.Children) != len(that1.Children) { + return fmt.Errorf("Children this(%v) Not Equal that(%v)", len(this.Children), len(that1.Children)) + } + for i := range this.Children { + if !this.Children[i].Equal(that1.Children[i]) { + return fmt.Errorf("Children this[%v](%v) Not Equal that[%v](%v)", i, this.Children[i], i, that1.Children[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *Node) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*Node) + if !ok { + that2, ok := that.(Node) + 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.Label != nil && that1.Label != nil { + if *this.Label != *that1.Label { + return false + } + } else if this.Label != nil { + return false + } else if that1.Label != nil { + return false + } + if len(this.Children) != len(that1.Children) { + return false + } + for i := range this.Children { + if !this.Children[i].Equal(that1.Children[i]) { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} + +type NidOptNativeFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetField1() float64 + GetField2() float32 + GetField3() int32 + GetField4() int64 + GetField5() uint32 + GetField6() uint64 + GetField7() int32 + GetField8() int64 + GetField9() uint32 + GetField10() int32 + GetField11() uint64 + GetField12() int64 + GetField13() bool + GetField14() string + GetField15() []byte +} + +func (this *NidOptNative) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NidOptNative) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNidOptNativeFromFace(this) +} + +func (this *NidOptNative) GetField1() float64 { + return this.Field1 +} + +func (this *NidOptNative) GetField2() float32 { + return this.Field2 +} + +func (this *NidOptNative) GetField3() int32 { + return this.Field3 +} + +func (this *NidOptNative) GetField4() int64 { + return this.Field4 +} + +func (this *NidOptNative) GetField5() uint32 { + return this.Field5 +} + +func (this *NidOptNative) GetField6() uint64 { + return this.Field6 +} + +func (this *NidOptNative) GetField7() int32 { + return this.Field7 +} + +func (this *NidOptNative) GetField8() int64 { + return this.Field8 +} + +func (this *NidOptNative) GetField9() uint32 { + return this.Field9 +} + +func (this *NidOptNative) GetField10() int32 { + return this.Field10 +} + +func (this *NidOptNative) GetField11() uint64 { + return this.Field11 +} + +func (this *NidOptNative) GetField12() int64 { + return this.Field12 +} + +func (this *NidOptNative) GetField13() bool { + return this.Field13 +} + +func (this *NidOptNative) GetField14() string { + return this.Field14 +} + +func (this *NidOptNative) GetField15() []byte { + return this.Field15 +} + +func NewNidOptNativeFromFace(that NidOptNativeFace) *NidOptNative { + this := &NidOptNative{} + this.Field1 = that.GetField1() + this.Field2 = that.GetField2() + this.Field3 = that.GetField3() + this.Field4 = that.GetField4() + this.Field5 = that.GetField5() + this.Field6 = that.GetField6() + this.Field7 = that.GetField7() + this.Field8 = that.GetField8() + this.Field9 = that.GetField9() + this.Field10 = that.GetField10() + this.Field11 = that.GetField11() + this.Field12 = that.GetField12() + this.Field13 = that.GetField13() + this.Field14 = that.GetField14() + this.Field15 = that.GetField15() + return this +} + +type NinOptNativeFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetField1() *float64 + GetField2() *float32 + GetField3() *int32 + GetField4() *int64 + GetField5() *uint32 + GetField6() *uint64 + GetField7() *int32 + GetField8() *int64 + GetField9() *uint32 + GetField10() *int32 + GetField11() *uint64 + GetField12() *int64 + GetField13() *bool + GetField14() *string + GetField15() []byte +} + +func (this *NinOptNative) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NinOptNative) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNinOptNativeFromFace(this) +} + +func (this *NinOptNative) GetField1() *float64 { + return this.Field1 +} + +func (this *NinOptNative) GetField2() *float32 { + return this.Field2 +} + +func (this *NinOptNative) GetField3() *int32 { + return this.Field3 +} + +func (this *NinOptNative) GetField4() *int64 { + return this.Field4 +} + +func (this *NinOptNative) GetField5() *uint32 { + return this.Field5 +} + +func (this *NinOptNative) GetField6() *uint64 { + return this.Field6 +} + +func (this *NinOptNative) GetField7() *int32 { + return this.Field7 +} + +func (this *NinOptNative) GetField8() *int64 { + return this.Field8 +} + +func (this *NinOptNative) GetField9() *uint32 { + return this.Field9 +} + +func (this *NinOptNative) GetField10() *int32 { + return this.Field10 +} + +func (this *NinOptNative) GetField11() *uint64 { + return this.Field11 +} + +func (this *NinOptNative) GetField12() *int64 { + return this.Field12 +} + +func (this *NinOptNative) GetField13() *bool { + return this.Field13 +} + +func (this *NinOptNative) GetField14() *string { + return this.Field14 +} + +func (this *NinOptNative) GetField15() []byte { + return this.Field15 +} + +func NewNinOptNativeFromFace(that NinOptNativeFace) *NinOptNative { + this := &NinOptNative{} + this.Field1 = that.GetField1() + this.Field2 = that.GetField2() + this.Field3 = that.GetField3() + this.Field4 = that.GetField4() + this.Field5 = that.GetField5() + this.Field6 = that.GetField6() + this.Field7 = that.GetField7() + this.Field8 = that.GetField8() + this.Field9 = that.GetField9() + this.Field10 = that.GetField10() + this.Field11 = that.GetField11() + this.Field12 = that.GetField12() + this.Field13 = that.GetField13() + this.Field14 = that.GetField14() + this.Field15 = that.GetField15() + return this +} + +type NidRepNativeFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetField1() []float64 + GetField2() []float32 + GetField3() []int32 + GetField4() []int64 + GetField5() []uint32 + GetField6() []uint64 + GetField7() []int32 + GetField8() []int64 + GetField9() []uint32 + GetField10() []int32 + GetField11() []uint64 + GetField12() []int64 + GetField13() []bool + GetField14() []string + GetField15() [][]byte +} + +func (this *NidRepNative) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NidRepNative) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNidRepNativeFromFace(this) +} + +func (this *NidRepNative) GetField1() []float64 { + return this.Field1 +} + +func (this *NidRepNative) GetField2() []float32 { + return this.Field2 +} + +func (this *NidRepNative) GetField3() []int32 { + return this.Field3 +} + +func (this *NidRepNative) GetField4() []int64 { + return this.Field4 +} + +func (this *NidRepNative) GetField5() []uint32 { + return this.Field5 +} + +func (this *NidRepNative) GetField6() []uint64 { + return this.Field6 +} + +func (this *NidRepNative) GetField7() []int32 { + return this.Field7 +} + +func (this *NidRepNative) GetField8() []int64 { + return this.Field8 +} + +func (this *NidRepNative) GetField9() []uint32 { + return this.Field9 +} + +func (this *NidRepNative) GetField10() []int32 { + return this.Field10 +} + +func (this *NidRepNative) GetField11() []uint64 { + return this.Field11 +} + +func (this *NidRepNative) GetField12() []int64 { + return this.Field12 +} + +func (this *NidRepNative) GetField13() []bool { + return this.Field13 +} + +func (this *NidRepNative) GetField14() []string { + return this.Field14 +} + +func (this *NidRepNative) GetField15() [][]byte { + return this.Field15 +} + +func NewNidRepNativeFromFace(that NidRepNativeFace) *NidRepNative { + this := &NidRepNative{} + this.Field1 = that.GetField1() + this.Field2 = that.GetField2() + this.Field3 = that.GetField3() + this.Field4 = that.GetField4() + this.Field5 = that.GetField5() + this.Field6 = that.GetField6() + this.Field7 = that.GetField7() + this.Field8 = that.GetField8() + this.Field9 = that.GetField9() + this.Field10 = that.GetField10() + this.Field11 = that.GetField11() + this.Field12 = that.GetField12() + this.Field13 = that.GetField13() + this.Field14 = that.GetField14() + this.Field15 = that.GetField15() + return this +} + +type NinRepNativeFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetField1() []float64 + GetField2() []float32 + GetField3() []int32 + GetField4() []int64 + GetField5() []uint32 + GetField6() []uint64 + GetField7() []int32 + GetField8() []int64 + GetField9() []uint32 + GetField10() []int32 + GetField11() []uint64 + GetField12() []int64 + GetField13() []bool + GetField14() []string + GetField15() [][]byte +} + +func (this *NinRepNative) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NinRepNative) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNinRepNativeFromFace(this) +} + +func (this *NinRepNative) GetField1() []float64 { + return this.Field1 +} + +func (this *NinRepNative) GetField2() []float32 { + return this.Field2 +} + +func (this *NinRepNative) GetField3() []int32 { + return this.Field3 +} + +func (this *NinRepNative) GetField4() []int64 { + return this.Field4 +} + +func (this *NinRepNative) GetField5() []uint32 { + return this.Field5 +} + +func (this *NinRepNative) GetField6() []uint64 { + return this.Field6 +} + +func (this *NinRepNative) GetField7() []int32 { + return this.Field7 +} + +func (this *NinRepNative) GetField8() []int64 { + return this.Field8 +} + +func (this *NinRepNative) GetField9() []uint32 { + return this.Field9 +} + +func (this *NinRepNative) GetField10() []int32 { + return this.Field10 +} + +func (this *NinRepNative) GetField11() []uint64 { + return this.Field11 +} + +func (this *NinRepNative) GetField12() []int64 { + return this.Field12 +} + +func (this *NinRepNative) GetField13() []bool { + return this.Field13 +} + +func (this *NinRepNative) GetField14() []string { + return this.Field14 +} + +func (this *NinRepNative) GetField15() [][]byte { + return this.Field15 +} + +func NewNinRepNativeFromFace(that NinRepNativeFace) *NinRepNative { + this := &NinRepNative{} + this.Field1 = that.GetField1() + this.Field2 = that.GetField2() + this.Field3 = that.GetField3() + this.Field4 = that.GetField4() + this.Field5 = that.GetField5() + this.Field6 = that.GetField6() + this.Field7 = that.GetField7() + this.Field8 = that.GetField8() + this.Field9 = that.GetField9() + this.Field10 = that.GetField10() + this.Field11 = that.GetField11() + this.Field12 = that.GetField12() + this.Field13 = that.GetField13() + this.Field14 = that.GetField14() + this.Field15 = that.GetField15() + return this +} + +type NidRepPackedNativeFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetField1() []float64 + GetField2() []float32 + GetField3() []int32 + GetField4() []int64 + GetField5() []uint32 + GetField6() []uint64 + GetField7() []int32 + GetField8() []int64 + GetField9() []uint32 + GetField10() []int32 + GetField11() []uint64 + GetField12() []int64 + GetField13() []bool +} + +func (this *NidRepPackedNative) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NidRepPackedNative) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNidRepPackedNativeFromFace(this) +} + +func (this *NidRepPackedNative) GetField1() []float64 { + return this.Field1 +} + +func (this *NidRepPackedNative) GetField2() []float32 { + return this.Field2 +} + +func (this *NidRepPackedNative) GetField3() []int32 { + return this.Field3 +} + +func (this *NidRepPackedNative) GetField4() []int64 { + return this.Field4 +} + +func (this *NidRepPackedNative) GetField5() []uint32 { + return this.Field5 +} + +func (this *NidRepPackedNative) GetField6() []uint64 { + return this.Field6 +} + +func (this *NidRepPackedNative) GetField7() []int32 { + return this.Field7 +} + +func (this *NidRepPackedNative) GetField8() []int64 { + return this.Field8 +} + +func (this *NidRepPackedNative) GetField9() []uint32 { + return this.Field9 +} + +func (this *NidRepPackedNative) GetField10() []int32 { + return this.Field10 +} + +func (this *NidRepPackedNative) GetField11() []uint64 { + return this.Field11 +} + +func (this *NidRepPackedNative) GetField12() []int64 { + return this.Field12 +} + +func (this *NidRepPackedNative) GetField13() []bool { + return this.Field13 +} + +func NewNidRepPackedNativeFromFace(that NidRepPackedNativeFace) *NidRepPackedNative { + this := &NidRepPackedNative{} + this.Field1 = that.GetField1() + this.Field2 = that.GetField2() + this.Field3 = that.GetField3() + this.Field4 = that.GetField4() + this.Field5 = that.GetField5() + this.Field6 = that.GetField6() + this.Field7 = that.GetField7() + this.Field8 = that.GetField8() + this.Field9 = that.GetField9() + this.Field10 = that.GetField10() + this.Field11 = that.GetField11() + this.Field12 = that.GetField12() + this.Field13 = that.GetField13() + return this +} + +type NinRepPackedNativeFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetField1() []float64 + GetField2() []float32 + GetField3() []int32 + GetField4() []int64 + GetField5() []uint32 + GetField6() []uint64 + GetField7() []int32 + GetField8() []int64 + GetField9() []uint32 + GetField10() []int32 + GetField11() []uint64 + GetField12() []int64 + GetField13() []bool +} + +func (this *NinRepPackedNative) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NinRepPackedNative) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNinRepPackedNativeFromFace(this) +} + +func (this *NinRepPackedNative) GetField1() []float64 { + return this.Field1 +} + +func (this *NinRepPackedNative) GetField2() []float32 { + return this.Field2 +} + +func (this *NinRepPackedNative) GetField3() []int32 { + return this.Field3 +} + +func (this *NinRepPackedNative) GetField4() []int64 { + return this.Field4 +} + +func (this *NinRepPackedNative) GetField5() []uint32 { + return this.Field5 +} + +func (this *NinRepPackedNative) GetField6() []uint64 { + return this.Field6 +} + +func (this *NinRepPackedNative) GetField7() []int32 { + return this.Field7 +} + +func (this *NinRepPackedNative) GetField8() []int64 { + return this.Field8 +} + +func (this *NinRepPackedNative) GetField9() []uint32 { + return this.Field9 +} + +func (this *NinRepPackedNative) GetField10() []int32 { + return this.Field10 +} + +func (this *NinRepPackedNative) GetField11() []uint64 { + return this.Field11 +} + +func (this *NinRepPackedNative) GetField12() []int64 { + return this.Field12 +} + +func (this *NinRepPackedNative) GetField13() []bool { + return this.Field13 +} + +func NewNinRepPackedNativeFromFace(that NinRepPackedNativeFace) *NinRepPackedNative { + this := &NinRepPackedNative{} + this.Field1 = that.GetField1() + this.Field2 = that.GetField2() + this.Field3 = that.GetField3() + this.Field4 = that.GetField4() + this.Field5 = that.GetField5() + this.Field6 = that.GetField6() + this.Field7 = that.GetField7() + this.Field8 = that.GetField8() + this.Field9 = that.GetField9() + this.Field10 = that.GetField10() + this.Field11 = that.GetField11() + this.Field12 = that.GetField12() + this.Field13 = that.GetField13() + return this +} + +type NidOptStructFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetField1() float64 + GetField2() float32 + GetField3() NidOptNative + GetField4() NinOptNative + GetField6() uint64 + GetField7() int32 + GetField8() NidOptNative + GetField13() bool + GetField14() string + GetField15() []byte +} + +func (this *NidOptStruct) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NidOptStruct) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNidOptStructFromFace(this) +} + +func (this *NidOptStruct) GetField1() float64 { + return this.Field1 +} + +func (this *NidOptStruct) GetField2() float32 { + return this.Field2 +} + +func (this *NidOptStruct) GetField3() NidOptNative { + return this.Field3 +} + +func (this *NidOptStruct) GetField4() NinOptNative { + return this.Field4 +} + +func (this *NidOptStruct) GetField6() uint64 { + return this.Field6 +} + +func (this *NidOptStruct) GetField7() int32 { + return this.Field7 +} + +func (this *NidOptStruct) GetField8() NidOptNative { + return this.Field8 +} + +func (this *NidOptStruct) GetField13() bool { + return this.Field13 +} + +func (this *NidOptStruct) GetField14() string { + return this.Field14 +} + +func (this *NidOptStruct) GetField15() []byte { + return this.Field15 +} + +func NewNidOptStructFromFace(that NidOptStructFace) *NidOptStruct { + this := &NidOptStruct{} + this.Field1 = that.GetField1() + this.Field2 = that.GetField2() + this.Field3 = that.GetField3() + this.Field4 = that.GetField4() + this.Field6 = that.GetField6() + this.Field7 = that.GetField7() + this.Field8 = that.GetField8() + this.Field13 = that.GetField13() + this.Field14 = that.GetField14() + this.Field15 = that.GetField15() + return this +} + +type NinOptStructFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetField1() *float64 + GetField2() *float32 + GetField3() *NidOptNative + GetField4() *NinOptNative + GetField6() *uint64 + GetField7() *int32 + GetField8() *NidOptNative + GetField13() *bool + GetField14() *string + GetField15() []byte +} + +func (this *NinOptStruct) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NinOptStruct) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNinOptStructFromFace(this) +} + +func (this *NinOptStruct) GetField1() *float64 { + return this.Field1 +} + +func (this *NinOptStruct) GetField2() *float32 { + return this.Field2 +} + +func (this *NinOptStruct) GetField3() *NidOptNative { + return this.Field3 +} + +func (this *NinOptStruct) GetField4() *NinOptNative { + return this.Field4 +} + +func (this *NinOptStruct) GetField6() *uint64 { + return this.Field6 +} + +func (this *NinOptStruct) GetField7() *int32 { + return this.Field7 +} + +func (this *NinOptStruct) GetField8() *NidOptNative { + return this.Field8 +} + +func (this *NinOptStruct) GetField13() *bool { + return this.Field13 +} + +func (this *NinOptStruct) GetField14() *string { + return this.Field14 +} + +func (this *NinOptStruct) GetField15() []byte { + return this.Field15 +} + +func NewNinOptStructFromFace(that NinOptStructFace) *NinOptStruct { + this := &NinOptStruct{} + this.Field1 = that.GetField1() + this.Field2 = that.GetField2() + this.Field3 = that.GetField3() + this.Field4 = that.GetField4() + this.Field6 = that.GetField6() + this.Field7 = that.GetField7() + this.Field8 = that.GetField8() + this.Field13 = that.GetField13() + this.Field14 = that.GetField14() + this.Field15 = that.GetField15() + return this +} + +type NidRepStructFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetField1() []float64 + GetField2() []float32 + GetField3() []NidOptNative + GetField4() []NinOptNative + GetField6() []uint64 + GetField7() []int32 + GetField8() []NidOptNative + GetField13() []bool + GetField14() []string + GetField15() [][]byte +} + +func (this *NidRepStruct) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NidRepStruct) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNidRepStructFromFace(this) +} + +func (this *NidRepStruct) GetField1() []float64 { + return this.Field1 +} + +func (this *NidRepStruct) GetField2() []float32 { + return this.Field2 +} + +func (this *NidRepStruct) GetField3() []NidOptNative { + return this.Field3 +} + +func (this *NidRepStruct) GetField4() []NinOptNative { + return this.Field4 +} + +func (this *NidRepStruct) GetField6() []uint64 { + return this.Field6 +} + +func (this *NidRepStruct) GetField7() []int32 { + return this.Field7 +} + +func (this *NidRepStruct) GetField8() []NidOptNative { + return this.Field8 +} + +func (this *NidRepStruct) GetField13() []bool { + return this.Field13 +} + +func (this *NidRepStruct) GetField14() []string { + return this.Field14 +} + +func (this *NidRepStruct) GetField15() [][]byte { + return this.Field15 +} + +func NewNidRepStructFromFace(that NidRepStructFace) *NidRepStruct { + this := &NidRepStruct{} + this.Field1 = that.GetField1() + this.Field2 = that.GetField2() + this.Field3 = that.GetField3() + this.Field4 = that.GetField4() + this.Field6 = that.GetField6() + this.Field7 = that.GetField7() + this.Field8 = that.GetField8() + this.Field13 = that.GetField13() + this.Field14 = that.GetField14() + this.Field15 = that.GetField15() + return this +} + +type NinRepStructFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetField1() []float64 + GetField2() []float32 + GetField3() []*NidOptNative + GetField4() []*NinOptNative + GetField6() []uint64 + GetField7() []int32 + GetField8() []*NidOptNative + GetField13() []bool + GetField14() []string + GetField15() [][]byte +} + +func (this *NinRepStruct) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NinRepStruct) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNinRepStructFromFace(this) +} + +func (this *NinRepStruct) GetField1() []float64 { + return this.Field1 +} + +func (this *NinRepStruct) GetField2() []float32 { + return this.Field2 +} + +func (this *NinRepStruct) GetField3() []*NidOptNative { + return this.Field3 +} + +func (this *NinRepStruct) GetField4() []*NinOptNative { + return this.Field4 +} + +func (this *NinRepStruct) GetField6() []uint64 { + return this.Field6 +} + +func (this *NinRepStruct) GetField7() []int32 { + return this.Field7 +} + +func (this *NinRepStruct) GetField8() []*NidOptNative { + return this.Field8 +} + +func (this *NinRepStruct) GetField13() []bool { + return this.Field13 +} + +func (this *NinRepStruct) GetField14() []string { + return this.Field14 +} + +func (this *NinRepStruct) GetField15() [][]byte { + return this.Field15 +} + +func NewNinRepStructFromFace(that NinRepStructFace) *NinRepStruct { + this := &NinRepStruct{} + this.Field1 = that.GetField1() + this.Field2 = that.GetField2() + this.Field3 = that.GetField3() + this.Field4 = that.GetField4() + this.Field6 = that.GetField6() + this.Field7 = that.GetField7() + this.Field8 = that.GetField8() + this.Field13 = that.GetField13() + this.Field14 = that.GetField14() + this.Field15 = that.GetField15() + return this +} + +type NidEmbeddedStructFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetNidOptNative() *NidOptNative + GetField200() NidOptNative + GetField210() bool +} + +func (this *NidEmbeddedStruct) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NidEmbeddedStruct) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNidEmbeddedStructFromFace(this) +} + +func (this *NidEmbeddedStruct) GetNidOptNative() *NidOptNative { + return this.NidOptNative +} + +func (this *NidEmbeddedStruct) GetField200() NidOptNative { + return this.Field200 +} + +func (this *NidEmbeddedStruct) GetField210() bool { + return this.Field210 +} + +func NewNidEmbeddedStructFromFace(that NidEmbeddedStructFace) *NidEmbeddedStruct { + this := &NidEmbeddedStruct{} + this.NidOptNative = that.GetNidOptNative() + this.Field200 = that.GetField200() + this.Field210 = that.GetField210() + return this +} + +type NinEmbeddedStructFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetNidOptNative() *NidOptNative + GetField200() *NidOptNative + GetField210() *bool +} + +func (this *NinEmbeddedStruct) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NinEmbeddedStruct) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNinEmbeddedStructFromFace(this) +} + +func (this *NinEmbeddedStruct) GetNidOptNative() *NidOptNative { + return this.NidOptNative +} + +func (this *NinEmbeddedStruct) GetField200() *NidOptNative { + return this.Field200 +} + +func (this *NinEmbeddedStruct) GetField210() *bool { + return this.Field210 +} + +func NewNinEmbeddedStructFromFace(that NinEmbeddedStructFace) *NinEmbeddedStruct { + this := &NinEmbeddedStruct{} + this.NidOptNative = that.GetNidOptNative() + this.Field200 = that.GetField200() + this.Field210 = that.GetField210() + return this +} + +type NidNestedStructFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetField1() NidOptStruct + GetField2() []NidRepStruct +} + +func (this *NidNestedStruct) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NidNestedStruct) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNidNestedStructFromFace(this) +} + +func (this *NidNestedStruct) GetField1() NidOptStruct { + return this.Field1 +} + +func (this *NidNestedStruct) GetField2() []NidRepStruct { + return this.Field2 +} + +func NewNidNestedStructFromFace(that NidNestedStructFace) *NidNestedStruct { + this := &NidNestedStruct{} + this.Field1 = that.GetField1() + this.Field2 = that.GetField2() + return this +} + +type NinNestedStructFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetField1() *NinOptStruct + GetField2() []*NinRepStruct +} + +func (this *NinNestedStruct) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NinNestedStruct) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNinNestedStructFromFace(this) +} + +func (this *NinNestedStruct) GetField1() *NinOptStruct { + return this.Field1 +} + +func (this *NinNestedStruct) GetField2() []*NinRepStruct { + return this.Field2 +} + +func NewNinNestedStructFromFace(that NinNestedStructFace) *NinNestedStruct { + this := &NinNestedStruct{} + this.Field1 = that.GetField1() + this.Field2 = that.GetField2() + return this +} + +type NidOptCustomFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetId() Uuid + GetValue() github_com_gogo_protobuf_test_custom.Uint128 +} + +func (this *NidOptCustom) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NidOptCustom) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNidOptCustomFromFace(this) +} + +func (this *NidOptCustom) GetId() Uuid { + return this.Id +} + +func (this *NidOptCustom) GetValue() github_com_gogo_protobuf_test_custom.Uint128 { + return this.Value +} + +func NewNidOptCustomFromFace(that NidOptCustomFace) *NidOptCustom { + this := &NidOptCustom{} + this.Id = that.GetId() + this.Value = that.GetValue() + return this +} + +type CustomDashFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetValue() *github_com_gogo_protobuf_test_custom_dash_type.Bytes +} + +func (this *CustomDash) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *CustomDash) TestProto() github_com_gogo_protobuf_proto.Message { + return NewCustomDashFromFace(this) +} + +func (this *CustomDash) GetValue() *github_com_gogo_protobuf_test_custom_dash_type.Bytes { + return this.Value +} + +func NewCustomDashFromFace(that CustomDashFace) *CustomDash { + this := &CustomDash{} + this.Value = that.GetValue() + return this +} + +type NinOptCustomFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetId() *Uuid + GetValue() *github_com_gogo_protobuf_test_custom.Uint128 +} + +func (this *NinOptCustom) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NinOptCustom) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNinOptCustomFromFace(this) +} + +func (this *NinOptCustom) GetId() *Uuid { + return this.Id +} + +func (this *NinOptCustom) GetValue() *github_com_gogo_protobuf_test_custom.Uint128 { + return this.Value +} + +func NewNinOptCustomFromFace(that NinOptCustomFace) *NinOptCustom { + this := &NinOptCustom{} + this.Id = that.GetId() + this.Value = that.GetValue() + return this +} + +type NidRepCustomFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetId() []Uuid + GetValue() []github_com_gogo_protobuf_test_custom.Uint128 +} + +func (this *NidRepCustom) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NidRepCustom) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNidRepCustomFromFace(this) +} + +func (this *NidRepCustom) GetId() []Uuid { + return this.Id +} + +func (this *NidRepCustom) GetValue() []github_com_gogo_protobuf_test_custom.Uint128 { + return this.Value +} + +func NewNidRepCustomFromFace(that NidRepCustomFace) *NidRepCustom { + this := &NidRepCustom{} + this.Id = that.GetId() + this.Value = that.GetValue() + return this +} + +type NinRepCustomFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetId() []Uuid + GetValue() []github_com_gogo_protobuf_test_custom.Uint128 +} + +func (this *NinRepCustom) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NinRepCustom) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNinRepCustomFromFace(this) +} + +func (this *NinRepCustom) GetId() []Uuid { + return this.Id +} + +func (this *NinRepCustom) GetValue() []github_com_gogo_protobuf_test_custom.Uint128 { + return this.Value +} + +func NewNinRepCustomFromFace(that NinRepCustomFace) *NinRepCustom { + this := &NinRepCustom{} + this.Id = that.GetId() + this.Value = that.GetValue() + return this +} + +type NinOptNativeUnionFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetField1() *float64 + GetField2() *float32 + GetField3() *int32 + GetField4() *int64 + GetField5() *uint32 + GetField6() *uint64 + GetField13() *bool + GetField14() *string + GetField15() []byte +} + +func (this *NinOptNativeUnion) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NinOptNativeUnion) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNinOptNativeUnionFromFace(this) +} + +func (this *NinOptNativeUnion) GetField1() *float64 { + return this.Field1 +} + +func (this *NinOptNativeUnion) GetField2() *float32 { + return this.Field2 +} + +func (this *NinOptNativeUnion) GetField3() *int32 { + return this.Field3 +} + +func (this *NinOptNativeUnion) GetField4() *int64 { + return this.Field4 +} + +func (this *NinOptNativeUnion) GetField5() *uint32 { + return this.Field5 +} + +func (this *NinOptNativeUnion) GetField6() *uint64 { + return this.Field6 +} + +func (this *NinOptNativeUnion) GetField13() *bool { + return this.Field13 +} + +func (this *NinOptNativeUnion) GetField14() *string { + return this.Field14 +} + +func (this *NinOptNativeUnion) GetField15() []byte { + return this.Field15 +} + +func NewNinOptNativeUnionFromFace(that NinOptNativeUnionFace) *NinOptNativeUnion { + this := &NinOptNativeUnion{} + this.Field1 = that.GetField1() + this.Field2 = that.GetField2() + this.Field3 = that.GetField3() + this.Field4 = that.GetField4() + this.Field5 = that.GetField5() + this.Field6 = that.GetField6() + this.Field13 = that.GetField13() + this.Field14 = that.GetField14() + this.Field15 = that.GetField15() + return this +} + +type NinOptStructUnionFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetField1() *float64 + GetField2() *float32 + GetField3() *NidOptNative + GetField4() *NinOptNative + GetField6() *uint64 + GetField7() *int32 + GetField13() *bool + GetField14() *string + GetField15() []byte +} + +func (this *NinOptStructUnion) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NinOptStructUnion) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNinOptStructUnionFromFace(this) +} + +func (this *NinOptStructUnion) GetField1() *float64 { + return this.Field1 +} + +func (this *NinOptStructUnion) GetField2() *float32 { + return this.Field2 +} + +func (this *NinOptStructUnion) GetField3() *NidOptNative { + return this.Field3 +} + +func (this *NinOptStructUnion) GetField4() *NinOptNative { + return this.Field4 +} + +func (this *NinOptStructUnion) GetField6() *uint64 { + return this.Field6 +} + +func (this *NinOptStructUnion) GetField7() *int32 { + return this.Field7 +} + +func (this *NinOptStructUnion) GetField13() *bool { + return this.Field13 +} + +func (this *NinOptStructUnion) GetField14() *string { + return this.Field14 +} + +func (this *NinOptStructUnion) GetField15() []byte { + return this.Field15 +} + +func NewNinOptStructUnionFromFace(that NinOptStructUnionFace) *NinOptStructUnion { + this := &NinOptStructUnion{} + this.Field1 = that.GetField1() + this.Field2 = that.GetField2() + this.Field3 = that.GetField3() + this.Field4 = that.GetField4() + this.Field6 = that.GetField6() + this.Field7 = that.GetField7() + this.Field13 = that.GetField13() + this.Field14 = that.GetField14() + this.Field15 = that.GetField15() + return this +} + +type NinEmbeddedStructUnionFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetNidOptNative() *NidOptNative + GetField200() *NinOptNative + GetField210() *bool +} + +func (this *NinEmbeddedStructUnion) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NinEmbeddedStructUnion) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNinEmbeddedStructUnionFromFace(this) +} + +func (this *NinEmbeddedStructUnion) GetNidOptNative() *NidOptNative { + return this.NidOptNative +} + +func (this *NinEmbeddedStructUnion) GetField200() *NinOptNative { + return this.Field200 +} + +func (this *NinEmbeddedStructUnion) GetField210() *bool { + return this.Field210 +} + +func NewNinEmbeddedStructUnionFromFace(that NinEmbeddedStructUnionFace) *NinEmbeddedStructUnion { + this := &NinEmbeddedStructUnion{} + this.NidOptNative = that.GetNidOptNative() + this.Field200 = that.GetField200() + this.Field210 = that.GetField210() + return this +} + +type NinNestedStructUnionFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetField1() *NinOptNativeUnion + GetField2() *NinOptStructUnion + GetField3() *NinEmbeddedStructUnion +} + +func (this *NinNestedStructUnion) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NinNestedStructUnion) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNinNestedStructUnionFromFace(this) +} + +func (this *NinNestedStructUnion) GetField1() *NinOptNativeUnion { + return this.Field1 +} + +func (this *NinNestedStructUnion) GetField2() *NinOptStructUnion { + return this.Field2 +} + +func (this *NinNestedStructUnion) GetField3() *NinEmbeddedStructUnion { + return this.Field3 +} + +func NewNinNestedStructUnionFromFace(that NinNestedStructUnionFace) *NinNestedStructUnion { + this := &NinNestedStructUnion{} + this.Field1 = that.GetField1() + this.Field2 = that.GetField2() + this.Field3 = that.GetField3() + return this +} + +type TreeFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetOr() *OrBranch + GetAnd() *AndBranch + GetLeaf() *Leaf +} + +func (this *Tree) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *Tree) TestProto() github_com_gogo_protobuf_proto.Message { + return NewTreeFromFace(this) +} + +func (this *Tree) GetOr() *OrBranch { + return this.Or +} + +func (this *Tree) GetAnd() *AndBranch { + return this.And +} + +func (this *Tree) GetLeaf() *Leaf { + return this.Leaf +} + +func NewTreeFromFace(that TreeFace) *Tree { + this := &Tree{} + this.Or = that.GetOr() + this.And = that.GetAnd() + this.Leaf = that.GetLeaf() + return this +} + +type OrBranchFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetLeft() Tree + GetRight() Tree +} + +func (this *OrBranch) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *OrBranch) TestProto() github_com_gogo_protobuf_proto.Message { + return NewOrBranchFromFace(this) +} + +func (this *OrBranch) GetLeft() Tree { + return this.Left +} + +func (this *OrBranch) GetRight() Tree { + return this.Right +} + +func NewOrBranchFromFace(that OrBranchFace) *OrBranch { + this := &OrBranch{} + this.Left = that.GetLeft() + this.Right = that.GetRight() + return this +} + +type AndBranchFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetLeft() Tree + GetRight() Tree +} + +func (this *AndBranch) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *AndBranch) TestProto() github_com_gogo_protobuf_proto.Message { + return NewAndBranchFromFace(this) +} + +func (this *AndBranch) GetLeft() Tree { + return this.Left +} + +func (this *AndBranch) GetRight() Tree { + return this.Right +} + +func NewAndBranchFromFace(that AndBranchFace) *AndBranch { + this := &AndBranch{} + this.Left = that.GetLeft() + this.Right = that.GetRight() + return this +} + +type LeafFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetValue() int64 + GetStrValue() string +} + +func (this *Leaf) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *Leaf) TestProto() github_com_gogo_protobuf_proto.Message { + return NewLeafFromFace(this) +} + +func (this *Leaf) GetValue() int64 { + return this.Value +} + +func (this *Leaf) GetStrValue() string { + return this.StrValue +} + +func NewLeafFromFace(that LeafFace) *Leaf { + this := &Leaf{} + this.Value = that.GetValue() + this.StrValue = that.GetStrValue() + return this +} + +type DeepTreeFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetDown() *ADeepBranch + GetAnd() *AndDeepBranch + GetLeaf() *DeepLeaf +} + +func (this *DeepTree) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *DeepTree) TestProto() github_com_gogo_protobuf_proto.Message { + return NewDeepTreeFromFace(this) +} + +func (this *DeepTree) GetDown() *ADeepBranch { + return this.Down +} + +func (this *DeepTree) GetAnd() *AndDeepBranch { + return this.And +} + +func (this *DeepTree) GetLeaf() *DeepLeaf { + return this.Leaf +} + +func NewDeepTreeFromFace(that DeepTreeFace) *DeepTree { + this := &DeepTree{} + this.Down = that.GetDown() + this.And = that.GetAnd() + this.Leaf = that.GetLeaf() + return this +} + +type ADeepBranchFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetDown() DeepTree +} + +func (this *ADeepBranch) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *ADeepBranch) TestProto() github_com_gogo_protobuf_proto.Message { + return NewADeepBranchFromFace(this) +} + +func (this *ADeepBranch) GetDown() DeepTree { + return this.Down +} + +func NewADeepBranchFromFace(that ADeepBranchFace) *ADeepBranch { + this := &ADeepBranch{} + this.Down = that.GetDown() + return this +} + +type AndDeepBranchFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetLeft() DeepTree + GetRight() DeepTree +} + +func (this *AndDeepBranch) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *AndDeepBranch) TestProto() github_com_gogo_protobuf_proto.Message { + return NewAndDeepBranchFromFace(this) +} + +func (this *AndDeepBranch) GetLeft() DeepTree { + return this.Left +} + +func (this *AndDeepBranch) GetRight() DeepTree { + return this.Right +} + +func NewAndDeepBranchFromFace(that AndDeepBranchFace) *AndDeepBranch { + this := &AndDeepBranch{} + this.Left = that.GetLeft() + this.Right = that.GetRight() + return this +} + +type DeepLeafFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetTree() Tree +} + +func (this *DeepLeaf) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *DeepLeaf) TestProto() github_com_gogo_protobuf_proto.Message { + return NewDeepLeafFromFace(this) +} + +func (this *DeepLeaf) GetTree() Tree { + return this.Tree +} + +func NewDeepLeafFromFace(that DeepLeafFace) *DeepLeaf { + this := &DeepLeaf{} + this.Tree = that.GetTree() + return this +} + +type NilFace interface { + Proto() github_com_gogo_protobuf_proto.Message +} + +func (this *Nil) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *Nil) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNilFromFace(this) +} + +func NewNilFromFace(that NilFace) *Nil { + this := &Nil{} + return this +} + +type NidOptEnumFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetField1() TheTestEnum +} + +func (this *NidOptEnum) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NidOptEnum) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNidOptEnumFromFace(this) +} + +func (this *NidOptEnum) GetField1() TheTestEnum { + return this.Field1 +} + +func NewNidOptEnumFromFace(that NidOptEnumFace) *NidOptEnum { + this := &NidOptEnum{} + this.Field1 = that.GetField1() + return this +} + +type NinOptEnumFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetField1() *TheTestEnum + GetField2() *YetAnotherTestEnum + GetField3() *YetYetAnotherTestEnum +} + +func (this *NinOptEnum) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NinOptEnum) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNinOptEnumFromFace(this) +} + +func (this *NinOptEnum) GetField1() *TheTestEnum { + return this.Field1 +} + +func (this *NinOptEnum) GetField2() *YetAnotherTestEnum { + return this.Field2 +} + +func (this *NinOptEnum) GetField3() *YetYetAnotherTestEnum { + return this.Field3 +} + +func NewNinOptEnumFromFace(that NinOptEnumFace) *NinOptEnum { + this := &NinOptEnum{} + this.Field1 = that.GetField1() + this.Field2 = that.GetField2() + this.Field3 = that.GetField3() + return this +} + +type NidRepEnumFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetField1() []TheTestEnum + GetField2() []YetAnotherTestEnum + GetField3() []YetYetAnotherTestEnum +} + +func (this *NidRepEnum) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NidRepEnum) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNidRepEnumFromFace(this) +} + +func (this *NidRepEnum) GetField1() []TheTestEnum { + return this.Field1 +} + +func (this *NidRepEnum) GetField2() []YetAnotherTestEnum { + return this.Field2 +} + +func (this *NidRepEnum) GetField3() []YetYetAnotherTestEnum { + return this.Field3 +} + +func NewNidRepEnumFromFace(that NidRepEnumFace) *NidRepEnum { + this := &NidRepEnum{} + this.Field1 = that.GetField1() + this.Field2 = that.GetField2() + this.Field3 = that.GetField3() + return this +} + +type NinRepEnumFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetField1() []TheTestEnum + GetField2() []YetAnotherTestEnum + GetField3() []YetYetAnotherTestEnum +} + +func (this *NinRepEnum) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NinRepEnum) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNinRepEnumFromFace(this) +} + +func (this *NinRepEnum) GetField1() []TheTestEnum { + return this.Field1 +} + +func (this *NinRepEnum) GetField2() []YetAnotherTestEnum { + return this.Field2 +} + +func (this *NinRepEnum) GetField3() []YetYetAnotherTestEnum { + return this.Field3 +} + +func NewNinRepEnumFromFace(that NinRepEnumFace) *NinRepEnum { + this := &NinRepEnum{} + this.Field1 = that.GetField1() + this.Field2 = that.GetField2() + this.Field3 = that.GetField3() + return this +} + +type AnotherNinOptEnumFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetField1() *AnotherTestEnum + GetField2() *YetAnotherTestEnum + GetField3() *YetYetAnotherTestEnum +} + +func (this *AnotherNinOptEnum) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *AnotherNinOptEnum) TestProto() github_com_gogo_protobuf_proto.Message { + return NewAnotherNinOptEnumFromFace(this) +} + +func (this *AnotherNinOptEnum) GetField1() *AnotherTestEnum { + return this.Field1 +} + +func (this *AnotherNinOptEnum) GetField2() *YetAnotherTestEnum { + return this.Field2 +} + +func (this *AnotherNinOptEnum) GetField3() *YetYetAnotherTestEnum { + return this.Field3 +} + +func NewAnotherNinOptEnumFromFace(that AnotherNinOptEnumFace) *AnotherNinOptEnum { + this := &AnotherNinOptEnum{} + this.Field1 = that.GetField1() + this.Field2 = that.GetField2() + this.Field3 = that.GetField3() + return this +} + +type TimerFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetTime1() int64 + GetTime2() int64 + GetData() []byte +} + +func (this *Timer) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *Timer) TestProto() github_com_gogo_protobuf_proto.Message { + return NewTimerFromFace(this) +} + +func (this *Timer) GetTime1() int64 { + return this.Time1 +} + +func (this *Timer) GetTime2() int64 { + return this.Time2 +} + +func (this *Timer) GetData() []byte { + return this.Data +} + +func NewTimerFromFace(that TimerFace) *Timer { + this := &Timer{} + this.Time1 = that.GetTime1() + this.Time2 = that.GetTime2() + this.Data = that.GetData() + return this +} + +type NestedDefinitionFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetField1() *int64 + GetEnumField() *NestedDefinition_NestedEnum + GetNNM() *NestedDefinition_NestedMessage_NestedNestedMsg + GetNM() *NestedDefinition_NestedMessage +} + +func (this *NestedDefinition) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NestedDefinition) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNestedDefinitionFromFace(this) +} + +func (this *NestedDefinition) GetField1() *int64 { + return this.Field1 +} + +func (this *NestedDefinition) GetEnumField() *NestedDefinition_NestedEnum { + return this.EnumField +} + +func (this *NestedDefinition) GetNNM() *NestedDefinition_NestedMessage_NestedNestedMsg { + return this.NNM +} + +func (this *NestedDefinition) GetNM() *NestedDefinition_NestedMessage { + return this.NM +} + +func NewNestedDefinitionFromFace(that NestedDefinitionFace) *NestedDefinition { + this := &NestedDefinition{} + this.Field1 = that.GetField1() + this.EnumField = that.GetEnumField() + this.NNM = that.GetNNM() + this.NM = that.GetNM() + return this +} + +type NestedDefinition_NestedMessageFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetNestedField1() *uint64 + GetNNM() *NestedDefinition_NestedMessage_NestedNestedMsg +} + +func (this *NestedDefinition_NestedMessage) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NestedDefinition_NestedMessage) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNestedDefinition_NestedMessageFromFace(this) +} + +func (this *NestedDefinition_NestedMessage) GetNestedField1() *uint64 { + return this.NestedField1 +} + +func (this *NestedDefinition_NestedMessage) GetNNM() *NestedDefinition_NestedMessage_NestedNestedMsg { + return this.NNM +} + +func NewNestedDefinition_NestedMessageFromFace(that NestedDefinition_NestedMessageFace) *NestedDefinition_NestedMessage { + this := &NestedDefinition_NestedMessage{} + this.NestedField1 = that.GetNestedField1() + this.NNM = that.GetNNM() + return this +} + +type NestedDefinition_NestedMessage_NestedNestedMsgFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetNestedNestedField1() *string +} + +func (this *NestedDefinition_NestedMessage_NestedNestedMsg) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NestedDefinition_NestedMessage_NestedNestedMsg) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNestedDefinition_NestedMessage_NestedNestedMsgFromFace(this) +} + +func (this *NestedDefinition_NestedMessage_NestedNestedMsg) GetNestedNestedField1() *string { + return this.NestedNestedField1 +} + +func NewNestedDefinition_NestedMessage_NestedNestedMsgFromFace(that NestedDefinition_NestedMessage_NestedNestedMsgFace) *NestedDefinition_NestedMessage_NestedNestedMsg { + this := &NestedDefinition_NestedMessage_NestedNestedMsg{} + this.NestedNestedField1 = that.GetNestedNestedField1() + return this +} + +type NestedScopeFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetA() *NestedDefinition_NestedMessage_NestedNestedMsg + GetB() *NestedDefinition_NestedEnum + GetC() *NestedDefinition_NestedMessage +} + +func (this *NestedScope) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NestedScope) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNestedScopeFromFace(this) +} + +func (this *NestedScope) GetA() *NestedDefinition_NestedMessage_NestedNestedMsg { + return this.A +} + +func (this *NestedScope) GetB() *NestedDefinition_NestedEnum { + return this.B +} + +func (this *NestedScope) GetC() *NestedDefinition_NestedMessage { + return this.C +} + +func NewNestedScopeFromFace(that NestedScopeFace) *NestedScope { + this := &NestedScope{} + this.A = that.GetA() + this.B = that.GetB() + this.C = that.GetC() + return this +} + +type CustomContainerFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetCustomStruct() NidOptCustom +} + +func (this *CustomContainer) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *CustomContainer) TestProto() github_com_gogo_protobuf_proto.Message { + return NewCustomContainerFromFace(this) +} + +func (this *CustomContainer) GetCustomStruct() NidOptCustom { + return this.CustomStruct +} + +func NewCustomContainerFromFace(that CustomContainerFace) *CustomContainer { + this := &CustomContainer{} + this.CustomStruct = that.GetCustomStruct() + return this +} + +type CustomNameNidOptNativeFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetFieldA() float64 + GetFieldB() float32 + GetFieldC() int32 + GetFieldD() int64 + GetFieldE() uint32 + GetFieldF() uint64 + GetFieldG() int32 + GetFieldH() int64 + GetFieldI() uint32 + GetFieldJ() int32 + GetFieldK() uint64 + GetFieldL() int64 + GetFieldM() bool + GetFieldN() string + GetFieldO() []byte +} + +func (this *CustomNameNidOptNative) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *CustomNameNidOptNative) TestProto() github_com_gogo_protobuf_proto.Message { + return NewCustomNameNidOptNativeFromFace(this) +} + +func (this *CustomNameNidOptNative) GetFieldA() float64 { + return this.FieldA +} + +func (this *CustomNameNidOptNative) GetFieldB() float32 { + return this.FieldB +} + +func (this *CustomNameNidOptNative) GetFieldC() int32 { + return this.FieldC +} + +func (this *CustomNameNidOptNative) GetFieldD() int64 { + return this.FieldD +} + +func (this *CustomNameNidOptNative) GetFieldE() uint32 { + return this.FieldE +} + +func (this *CustomNameNidOptNative) GetFieldF() uint64 { + return this.FieldF +} + +func (this *CustomNameNidOptNative) GetFieldG() int32 { + return this.FieldG +} + +func (this *CustomNameNidOptNative) GetFieldH() int64 { + return this.FieldH +} + +func (this *CustomNameNidOptNative) GetFieldI() uint32 { + return this.FieldI +} + +func (this *CustomNameNidOptNative) GetFieldJ() int32 { + return this.FieldJ +} + +func (this *CustomNameNidOptNative) GetFieldK() uint64 { + return this.FieldK +} + +func (this *CustomNameNidOptNative) GetFieldL() int64 { + return this.FieldL +} + +func (this *CustomNameNidOptNative) GetFieldM() bool { + return this.FieldM +} + +func (this *CustomNameNidOptNative) GetFieldN() string { + return this.FieldN +} + +func (this *CustomNameNidOptNative) GetFieldO() []byte { + return this.FieldO +} + +func NewCustomNameNidOptNativeFromFace(that CustomNameNidOptNativeFace) *CustomNameNidOptNative { + this := &CustomNameNidOptNative{} + this.FieldA = that.GetFieldA() + this.FieldB = that.GetFieldB() + this.FieldC = that.GetFieldC() + this.FieldD = that.GetFieldD() + this.FieldE = that.GetFieldE() + this.FieldF = that.GetFieldF() + this.FieldG = that.GetFieldG() + this.FieldH = that.GetFieldH() + this.FieldI = that.GetFieldI() + this.FieldJ = that.GetFieldJ() + this.FieldK = that.GetFieldK() + this.FieldL = that.GetFieldL() + this.FieldM = that.GetFieldM() + this.FieldN = that.GetFieldN() + this.FieldO = that.GetFieldO() + return this +} + +type CustomNameNinOptNativeFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetFieldA() *float64 + GetFieldB() *float32 + GetFieldC() *int32 + GetFieldD() *int64 + GetFieldE() *uint32 + GetFieldF() *uint64 + GetFieldG() *int32 + GetFieldH() *int64 + GetFieldI() *uint32 + GetFieldJ() *int32 + GetFieldK() *uint64 + GetFielL() *int64 + GetFieldM() *bool + GetFieldN() *string + GetFieldO() []byte +} + +func (this *CustomNameNinOptNative) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *CustomNameNinOptNative) TestProto() github_com_gogo_protobuf_proto.Message { + return NewCustomNameNinOptNativeFromFace(this) +} + +func (this *CustomNameNinOptNative) GetFieldA() *float64 { + return this.FieldA +} + +func (this *CustomNameNinOptNative) GetFieldB() *float32 { + return this.FieldB +} + +func (this *CustomNameNinOptNative) GetFieldC() *int32 { + return this.FieldC +} + +func (this *CustomNameNinOptNative) GetFieldD() *int64 { + return this.FieldD +} + +func (this *CustomNameNinOptNative) GetFieldE() *uint32 { + return this.FieldE +} + +func (this *CustomNameNinOptNative) GetFieldF() *uint64 { + return this.FieldF +} + +func (this *CustomNameNinOptNative) GetFieldG() *int32 { + return this.FieldG +} + +func (this *CustomNameNinOptNative) GetFieldH() *int64 { + return this.FieldH +} + +func (this *CustomNameNinOptNative) GetFieldI() *uint32 { + return this.FieldI +} + +func (this *CustomNameNinOptNative) GetFieldJ() *int32 { + return this.FieldJ +} + +func (this *CustomNameNinOptNative) GetFieldK() *uint64 { + return this.FieldK +} + +func (this *CustomNameNinOptNative) GetFielL() *int64 { + return this.FielL +} + +func (this *CustomNameNinOptNative) GetFieldM() *bool { + return this.FieldM +} + +func (this *CustomNameNinOptNative) GetFieldN() *string { + return this.FieldN +} + +func (this *CustomNameNinOptNative) GetFieldO() []byte { + return this.FieldO +} + +func NewCustomNameNinOptNativeFromFace(that CustomNameNinOptNativeFace) *CustomNameNinOptNative { + this := &CustomNameNinOptNative{} + this.FieldA = that.GetFieldA() + this.FieldB = that.GetFieldB() + this.FieldC = that.GetFieldC() + this.FieldD = that.GetFieldD() + this.FieldE = that.GetFieldE() + this.FieldF = that.GetFieldF() + this.FieldG = that.GetFieldG() + this.FieldH = that.GetFieldH() + this.FieldI = that.GetFieldI() + this.FieldJ = that.GetFieldJ() + this.FieldK = that.GetFieldK() + this.FielL = that.GetFielL() + this.FieldM = that.GetFieldM() + this.FieldN = that.GetFieldN() + this.FieldO = that.GetFieldO() + return this +} + +type CustomNameNinRepNativeFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetFieldA() []float64 + GetFieldB() []float32 + GetFieldC() []int32 + GetFieldD() []int64 + GetFieldE() []uint32 + GetFieldF() []uint64 + GetFieldG() []int32 + GetFieldH() []int64 + GetFieldI() []uint32 + GetFieldJ() []int32 + GetFieldK() []uint64 + GetFieldL() []int64 + GetFieldM() []bool + GetFieldN() []string + GetFieldO() [][]byte +} + +func (this *CustomNameNinRepNative) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *CustomNameNinRepNative) TestProto() github_com_gogo_protobuf_proto.Message { + return NewCustomNameNinRepNativeFromFace(this) +} + +func (this *CustomNameNinRepNative) GetFieldA() []float64 { + return this.FieldA +} + +func (this *CustomNameNinRepNative) GetFieldB() []float32 { + return this.FieldB +} + +func (this *CustomNameNinRepNative) GetFieldC() []int32 { + return this.FieldC +} + +func (this *CustomNameNinRepNative) GetFieldD() []int64 { + return this.FieldD +} + +func (this *CustomNameNinRepNative) GetFieldE() []uint32 { + return this.FieldE +} + +func (this *CustomNameNinRepNative) GetFieldF() []uint64 { + return this.FieldF +} + +func (this *CustomNameNinRepNative) GetFieldG() []int32 { + return this.FieldG +} + +func (this *CustomNameNinRepNative) GetFieldH() []int64 { + return this.FieldH +} + +func (this *CustomNameNinRepNative) GetFieldI() []uint32 { + return this.FieldI +} + +func (this *CustomNameNinRepNative) GetFieldJ() []int32 { + return this.FieldJ +} + +func (this *CustomNameNinRepNative) GetFieldK() []uint64 { + return this.FieldK +} + +func (this *CustomNameNinRepNative) GetFieldL() []int64 { + return this.FieldL +} + +func (this *CustomNameNinRepNative) GetFieldM() []bool { + return this.FieldM +} + +func (this *CustomNameNinRepNative) GetFieldN() []string { + return this.FieldN +} + +func (this *CustomNameNinRepNative) GetFieldO() [][]byte { + return this.FieldO +} + +func NewCustomNameNinRepNativeFromFace(that CustomNameNinRepNativeFace) *CustomNameNinRepNative { + this := &CustomNameNinRepNative{} + this.FieldA = that.GetFieldA() + this.FieldB = that.GetFieldB() + this.FieldC = that.GetFieldC() + this.FieldD = that.GetFieldD() + this.FieldE = that.GetFieldE() + this.FieldF = that.GetFieldF() + this.FieldG = that.GetFieldG() + this.FieldH = that.GetFieldH() + this.FieldI = that.GetFieldI() + this.FieldJ = that.GetFieldJ() + this.FieldK = that.GetFieldK() + this.FieldL = that.GetFieldL() + this.FieldM = that.GetFieldM() + this.FieldN = that.GetFieldN() + this.FieldO = that.GetFieldO() + return this +} + +type CustomNameNinStructFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetFieldA() *float64 + GetFieldB() *float32 + GetFieldC() *NidOptNative + GetFieldD() []*NinOptNative + GetFieldE() *uint64 + GetFieldF() *int32 + GetFieldG() *NidOptNative + GetFieldH() *bool + GetFieldI() *string + GetFieldJ() []byte +} + +func (this *CustomNameNinStruct) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *CustomNameNinStruct) TestProto() github_com_gogo_protobuf_proto.Message { + return NewCustomNameNinStructFromFace(this) +} + +func (this *CustomNameNinStruct) GetFieldA() *float64 { + return this.FieldA +} + +func (this *CustomNameNinStruct) GetFieldB() *float32 { + return this.FieldB +} + +func (this *CustomNameNinStruct) GetFieldC() *NidOptNative { + return this.FieldC +} + +func (this *CustomNameNinStruct) GetFieldD() []*NinOptNative { + return this.FieldD +} + +func (this *CustomNameNinStruct) GetFieldE() *uint64 { + return this.FieldE +} + +func (this *CustomNameNinStruct) GetFieldF() *int32 { + return this.FieldF +} + +func (this *CustomNameNinStruct) GetFieldG() *NidOptNative { + return this.FieldG +} + +func (this *CustomNameNinStruct) GetFieldH() *bool { + return this.FieldH +} + +func (this *CustomNameNinStruct) GetFieldI() *string { + return this.FieldI +} + +func (this *CustomNameNinStruct) GetFieldJ() []byte { + return this.FieldJ +} + +func NewCustomNameNinStructFromFace(that CustomNameNinStructFace) *CustomNameNinStruct { + this := &CustomNameNinStruct{} + this.FieldA = that.GetFieldA() + this.FieldB = that.GetFieldB() + this.FieldC = that.GetFieldC() + this.FieldD = that.GetFieldD() + this.FieldE = that.GetFieldE() + this.FieldF = that.GetFieldF() + this.FieldG = that.GetFieldG() + this.FieldH = that.GetFieldH() + this.FieldI = that.GetFieldI() + this.FieldJ = that.GetFieldJ() + return this +} + +type CustomNameCustomTypeFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetFieldA() *Uuid + GetFieldB() *github_com_gogo_protobuf_test_custom.Uint128 + GetFieldC() []Uuid + GetFieldD() []github_com_gogo_protobuf_test_custom.Uint128 +} + +func (this *CustomNameCustomType) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *CustomNameCustomType) TestProto() github_com_gogo_protobuf_proto.Message { + return NewCustomNameCustomTypeFromFace(this) +} + +func (this *CustomNameCustomType) GetFieldA() *Uuid { + return this.FieldA +} + +func (this *CustomNameCustomType) GetFieldB() *github_com_gogo_protobuf_test_custom.Uint128 { + return this.FieldB +} + +func (this *CustomNameCustomType) GetFieldC() []Uuid { + return this.FieldC +} + +func (this *CustomNameCustomType) GetFieldD() []github_com_gogo_protobuf_test_custom.Uint128 { + return this.FieldD +} + +func NewCustomNameCustomTypeFromFace(that CustomNameCustomTypeFace) *CustomNameCustomType { + this := &CustomNameCustomType{} + this.FieldA = that.GetFieldA() + this.FieldB = that.GetFieldB() + this.FieldC = that.GetFieldC() + this.FieldD = that.GetFieldD() + return this +} + +type CustomNameNinEmbeddedStructUnionFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetNidOptNative() *NidOptNative + GetFieldA() *NinOptNative + GetFieldB() *bool +} + +func (this *CustomNameNinEmbeddedStructUnion) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *CustomNameNinEmbeddedStructUnion) TestProto() github_com_gogo_protobuf_proto.Message { + return NewCustomNameNinEmbeddedStructUnionFromFace(this) +} + +func (this *CustomNameNinEmbeddedStructUnion) GetNidOptNative() *NidOptNative { + return this.NidOptNative +} + +func (this *CustomNameNinEmbeddedStructUnion) GetFieldA() *NinOptNative { + return this.FieldA +} + +func (this *CustomNameNinEmbeddedStructUnion) GetFieldB() *bool { + return this.FieldB +} + +func NewCustomNameNinEmbeddedStructUnionFromFace(that CustomNameNinEmbeddedStructUnionFace) *CustomNameNinEmbeddedStructUnion { + this := &CustomNameNinEmbeddedStructUnion{} + this.NidOptNative = that.GetNidOptNative() + this.FieldA = that.GetFieldA() + this.FieldB = that.GetFieldB() + return this +} + +type CustomNameEnumFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetFieldA() *TheTestEnum + GetFieldB() []TheTestEnum +} + +func (this *CustomNameEnum) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *CustomNameEnum) TestProto() github_com_gogo_protobuf_proto.Message { + return NewCustomNameEnumFromFace(this) +} + +func (this *CustomNameEnum) GetFieldA() *TheTestEnum { + return this.FieldA +} + +func (this *CustomNameEnum) GetFieldB() []TheTestEnum { + return this.FieldB +} + +func NewCustomNameEnumFromFace(that CustomNameEnumFace) *CustomNameEnum { + this := &CustomNameEnum{} + this.FieldA = that.GetFieldA() + this.FieldB = that.GetFieldB() + return this +} + +type UnrecognizedFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetField1() *string +} + +func (this *Unrecognized) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *Unrecognized) TestProto() github_com_gogo_protobuf_proto.Message { + return NewUnrecognizedFromFace(this) +} + +func (this *Unrecognized) GetField1() *string { + return this.Field1 +} + +func NewUnrecognizedFromFace(that UnrecognizedFace) *Unrecognized { + this := &Unrecognized{} + this.Field1 = that.GetField1() + return this +} + +type UnrecognizedWithInnerFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetEmbedded() []*UnrecognizedWithInner_Inner + GetField2() *string +} + +func (this *UnrecognizedWithInner) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *UnrecognizedWithInner) TestProto() github_com_gogo_protobuf_proto.Message { + return NewUnrecognizedWithInnerFromFace(this) +} + +func (this *UnrecognizedWithInner) GetEmbedded() []*UnrecognizedWithInner_Inner { + return this.Embedded +} + +func (this *UnrecognizedWithInner) GetField2() *string { + return this.Field2 +} + +func NewUnrecognizedWithInnerFromFace(that UnrecognizedWithInnerFace) *UnrecognizedWithInner { + this := &UnrecognizedWithInner{} + this.Embedded = that.GetEmbedded() + this.Field2 = that.GetField2() + return this +} + +type UnrecognizedWithInner_InnerFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetField1() *uint32 +} + +func (this *UnrecognizedWithInner_Inner) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *UnrecognizedWithInner_Inner) TestProto() github_com_gogo_protobuf_proto.Message { + return NewUnrecognizedWithInner_InnerFromFace(this) +} + +func (this *UnrecognizedWithInner_Inner) GetField1() *uint32 { + return this.Field1 +} + +func NewUnrecognizedWithInner_InnerFromFace(that UnrecognizedWithInner_InnerFace) *UnrecognizedWithInner_Inner { + this := &UnrecognizedWithInner_Inner{} + this.Field1 = that.GetField1() + return this +} + +type UnrecognizedWithEmbedFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetUnrecognizedWithEmbed_Embedded() UnrecognizedWithEmbed_Embedded + GetField2() *string +} + +func (this *UnrecognizedWithEmbed) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *UnrecognizedWithEmbed) TestProto() github_com_gogo_protobuf_proto.Message { + return NewUnrecognizedWithEmbedFromFace(this) +} + +func (this *UnrecognizedWithEmbed) GetUnrecognizedWithEmbed_Embedded() UnrecognizedWithEmbed_Embedded { + return this.UnrecognizedWithEmbed_Embedded +} + +func (this *UnrecognizedWithEmbed) GetField2() *string { + return this.Field2 +} + +func NewUnrecognizedWithEmbedFromFace(that UnrecognizedWithEmbedFace) *UnrecognizedWithEmbed { + this := &UnrecognizedWithEmbed{} + this.UnrecognizedWithEmbed_Embedded = that.GetUnrecognizedWithEmbed_Embedded() + this.Field2 = that.GetField2() + return this +} + +type UnrecognizedWithEmbed_EmbeddedFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetField1() *uint32 +} + +func (this *UnrecognizedWithEmbed_Embedded) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *UnrecognizedWithEmbed_Embedded) TestProto() github_com_gogo_protobuf_proto.Message { + return NewUnrecognizedWithEmbed_EmbeddedFromFace(this) +} + +func (this *UnrecognizedWithEmbed_Embedded) GetField1() *uint32 { + return this.Field1 +} + +func NewUnrecognizedWithEmbed_EmbeddedFromFace(that UnrecognizedWithEmbed_EmbeddedFace) *UnrecognizedWithEmbed_Embedded { + this := &UnrecognizedWithEmbed_Embedded{} + this.Field1 = that.GetField1() + return this +} + +type NodeFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetLabel() *string + GetChildren() []*Node +} + +func (this *Node) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *Node) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNodeFromFace(this) +} + +func (this *Node) GetLabel() *string { + return this.Label +} + +func (this *Node) GetChildren() []*Node { + return this.Children +} + +func NewNodeFromFace(that NodeFace) *Node { + this := &Node{} + this.Label = that.GetLabel() + this.Children = that.GetChildren() + return this +} + +func (this *NidOptNative) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 19) + s = append(s, "&test.NidOptNative{") + s = append(s, "Field1: "+fmt.Sprintf("%#v", this.Field1)+",\n") + s = append(s, "Field2: "+fmt.Sprintf("%#v", this.Field2)+",\n") + s = append(s, "Field3: "+fmt.Sprintf("%#v", this.Field3)+",\n") + s = append(s, "Field4: "+fmt.Sprintf("%#v", this.Field4)+",\n") + s = append(s, "Field5: "+fmt.Sprintf("%#v", this.Field5)+",\n") + s = append(s, "Field6: "+fmt.Sprintf("%#v", this.Field6)+",\n") + s = append(s, "Field7: "+fmt.Sprintf("%#v", this.Field7)+",\n") + s = append(s, "Field8: "+fmt.Sprintf("%#v", this.Field8)+",\n") + s = append(s, "Field9: "+fmt.Sprintf("%#v", this.Field9)+",\n") + s = append(s, "Field10: "+fmt.Sprintf("%#v", this.Field10)+",\n") + s = append(s, "Field11: "+fmt.Sprintf("%#v", this.Field11)+",\n") + s = append(s, "Field12: "+fmt.Sprintf("%#v", this.Field12)+",\n") + s = append(s, "Field13: "+fmt.Sprintf("%#v", this.Field13)+",\n") + s = append(s, "Field14: "+fmt.Sprintf("%#v", this.Field14)+",\n") + s = append(s, "Field15: "+fmt.Sprintf("%#v", this.Field15)+",\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 *NinOptNative) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 19) + s = append(s, "&test.NinOptNative{") + if this.Field1 != nil { + s = append(s, "Field1: "+valueToGoStringThetest(this.Field1, "float64")+",\n") + } + if this.Field2 != nil { + s = append(s, "Field2: "+valueToGoStringThetest(this.Field2, "float32")+",\n") + } + if this.Field3 != nil { + s = append(s, "Field3: "+valueToGoStringThetest(this.Field3, "int32")+",\n") + } + if this.Field4 != nil { + s = append(s, "Field4: "+valueToGoStringThetest(this.Field4, "int64")+",\n") + } + if this.Field5 != nil { + s = append(s, "Field5: "+valueToGoStringThetest(this.Field5, "uint32")+",\n") + } + if this.Field6 != nil { + s = append(s, "Field6: "+valueToGoStringThetest(this.Field6, "uint64")+",\n") + } + if this.Field7 != nil { + s = append(s, "Field7: "+valueToGoStringThetest(this.Field7, "int32")+",\n") + } + if this.Field8 != nil { + s = append(s, "Field8: "+valueToGoStringThetest(this.Field8, "int64")+",\n") + } + if this.Field9 != nil { + s = append(s, "Field9: "+valueToGoStringThetest(this.Field9, "uint32")+",\n") + } + if this.Field10 != nil { + s = append(s, "Field10: "+valueToGoStringThetest(this.Field10, "int32")+",\n") + } + if this.Field11 != nil { + s = append(s, "Field11: "+valueToGoStringThetest(this.Field11, "uint64")+",\n") + } + if this.Field12 != nil { + s = append(s, "Field12: "+valueToGoStringThetest(this.Field12, "int64")+",\n") + } + if this.Field13 != nil { + s = append(s, "Field13: "+valueToGoStringThetest(this.Field13, "bool")+",\n") + } + if this.Field14 != nil { + s = append(s, "Field14: "+valueToGoStringThetest(this.Field14, "string")+",\n") + } + if this.Field15 != nil { + s = append(s, "Field15: "+valueToGoStringThetest(this.Field15, "byte")+",\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 *NidRepNative) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 19) + s = append(s, "&test.NidRepNative{") + if this.Field1 != nil { + s = append(s, "Field1: "+fmt.Sprintf("%#v", this.Field1)+",\n") + } + if this.Field2 != nil { + s = append(s, "Field2: "+fmt.Sprintf("%#v", this.Field2)+",\n") + } + if this.Field3 != nil { + s = append(s, "Field3: "+fmt.Sprintf("%#v", this.Field3)+",\n") + } + if this.Field4 != nil { + s = append(s, "Field4: "+fmt.Sprintf("%#v", this.Field4)+",\n") + } + if this.Field5 != nil { + s = append(s, "Field5: "+fmt.Sprintf("%#v", this.Field5)+",\n") + } + if this.Field6 != nil { + s = append(s, "Field6: "+fmt.Sprintf("%#v", this.Field6)+",\n") + } + if this.Field7 != nil { + s = append(s, "Field7: "+fmt.Sprintf("%#v", this.Field7)+",\n") + } + if this.Field8 != nil { + s = append(s, "Field8: "+fmt.Sprintf("%#v", this.Field8)+",\n") + } + if this.Field9 != nil { + s = append(s, "Field9: "+fmt.Sprintf("%#v", this.Field9)+",\n") + } + if this.Field10 != nil { + s = append(s, "Field10: "+fmt.Sprintf("%#v", this.Field10)+",\n") + } + if this.Field11 != nil { + s = append(s, "Field11: "+fmt.Sprintf("%#v", this.Field11)+",\n") + } + if this.Field12 != nil { + s = append(s, "Field12: "+fmt.Sprintf("%#v", this.Field12)+",\n") + } + if this.Field13 != nil { + s = append(s, "Field13: "+fmt.Sprintf("%#v", this.Field13)+",\n") + } + if this.Field14 != nil { + s = append(s, "Field14: "+fmt.Sprintf("%#v", this.Field14)+",\n") + } + if this.Field15 != nil { + s = append(s, "Field15: "+fmt.Sprintf("%#v", this.Field15)+",\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 *NinRepNative) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 19) + s = append(s, "&test.NinRepNative{") + if this.Field1 != nil { + s = append(s, "Field1: "+fmt.Sprintf("%#v", this.Field1)+",\n") + } + if this.Field2 != nil { + s = append(s, "Field2: "+fmt.Sprintf("%#v", this.Field2)+",\n") + } + if this.Field3 != nil { + s = append(s, "Field3: "+fmt.Sprintf("%#v", this.Field3)+",\n") + } + if this.Field4 != nil { + s = append(s, "Field4: "+fmt.Sprintf("%#v", this.Field4)+",\n") + } + if this.Field5 != nil { + s = append(s, "Field5: "+fmt.Sprintf("%#v", this.Field5)+",\n") + } + if this.Field6 != nil { + s = append(s, "Field6: "+fmt.Sprintf("%#v", this.Field6)+",\n") + } + if this.Field7 != nil { + s = append(s, "Field7: "+fmt.Sprintf("%#v", this.Field7)+",\n") + } + if this.Field8 != nil { + s = append(s, "Field8: "+fmt.Sprintf("%#v", this.Field8)+",\n") + } + if this.Field9 != nil { + s = append(s, "Field9: "+fmt.Sprintf("%#v", this.Field9)+",\n") + } + if this.Field10 != nil { + s = append(s, "Field10: "+fmt.Sprintf("%#v", this.Field10)+",\n") + } + if this.Field11 != nil { + s = append(s, "Field11: "+fmt.Sprintf("%#v", this.Field11)+",\n") + } + if this.Field12 != nil { + s = append(s, "Field12: "+fmt.Sprintf("%#v", this.Field12)+",\n") + } + if this.Field13 != nil { + s = append(s, "Field13: "+fmt.Sprintf("%#v", this.Field13)+",\n") + } + if this.Field14 != nil { + s = append(s, "Field14: "+fmt.Sprintf("%#v", this.Field14)+",\n") + } + if this.Field15 != nil { + s = append(s, "Field15: "+fmt.Sprintf("%#v", this.Field15)+",\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 *NidRepPackedNative) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 17) + s = append(s, "&test.NidRepPackedNative{") + if this.Field1 != nil { + s = append(s, "Field1: "+fmt.Sprintf("%#v", this.Field1)+",\n") + } + if this.Field2 != nil { + s = append(s, "Field2: "+fmt.Sprintf("%#v", this.Field2)+",\n") + } + if this.Field3 != nil { + s = append(s, "Field3: "+fmt.Sprintf("%#v", this.Field3)+",\n") + } + if this.Field4 != nil { + s = append(s, "Field4: "+fmt.Sprintf("%#v", this.Field4)+",\n") + } + if this.Field5 != nil { + s = append(s, "Field5: "+fmt.Sprintf("%#v", this.Field5)+",\n") + } + if this.Field6 != nil { + s = append(s, "Field6: "+fmt.Sprintf("%#v", this.Field6)+",\n") + } + if this.Field7 != nil { + s = append(s, "Field7: "+fmt.Sprintf("%#v", this.Field7)+",\n") + } + if this.Field8 != nil { + s = append(s, "Field8: "+fmt.Sprintf("%#v", this.Field8)+",\n") + } + if this.Field9 != nil { + s = append(s, "Field9: "+fmt.Sprintf("%#v", this.Field9)+",\n") + } + if this.Field10 != nil { + s = append(s, "Field10: "+fmt.Sprintf("%#v", this.Field10)+",\n") + } + if this.Field11 != nil { + s = append(s, "Field11: "+fmt.Sprintf("%#v", this.Field11)+",\n") + } + if this.Field12 != nil { + s = append(s, "Field12: "+fmt.Sprintf("%#v", this.Field12)+",\n") + } + if this.Field13 != nil { + s = append(s, "Field13: "+fmt.Sprintf("%#v", this.Field13)+",\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 *NinRepPackedNative) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 17) + s = append(s, "&test.NinRepPackedNative{") + if this.Field1 != nil { + s = append(s, "Field1: "+fmt.Sprintf("%#v", this.Field1)+",\n") + } + if this.Field2 != nil { + s = append(s, "Field2: "+fmt.Sprintf("%#v", this.Field2)+",\n") + } + if this.Field3 != nil { + s = append(s, "Field3: "+fmt.Sprintf("%#v", this.Field3)+",\n") + } + if this.Field4 != nil { + s = append(s, "Field4: "+fmt.Sprintf("%#v", this.Field4)+",\n") + } + if this.Field5 != nil { + s = append(s, "Field5: "+fmt.Sprintf("%#v", this.Field5)+",\n") + } + if this.Field6 != nil { + s = append(s, "Field6: "+fmt.Sprintf("%#v", this.Field6)+",\n") + } + if this.Field7 != nil { + s = append(s, "Field7: "+fmt.Sprintf("%#v", this.Field7)+",\n") + } + if this.Field8 != nil { + s = append(s, "Field8: "+fmt.Sprintf("%#v", this.Field8)+",\n") + } + if this.Field9 != nil { + s = append(s, "Field9: "+fmt.Sprintf("%#v", this.Field9)+",\n") + } + if this.Field10 != nil { + s = append(s, "Field10: "+fmt.Sprintf("%#v", this.Field10)+",\n") + } + if this.Field11 != nil { + s = append(s, "Field11: "+fmt.Sprintf("%#v", this.Field11)+",\n") + } + if this.Field12 != nil { + s = append(s, "Field12: "+fmt.Sprintf("%#v", this.Field12)+",\n") + } + if this.Field13 != nil { + s = append(s, "Field13: "+fmt.Sprintf("%#v", this.Field13)+",\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 *NidOptStruct) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 14) + s = append(s, "&test.NidOptStruct{") + s = append(s, "Field1: "+fmt.Sprintf("%#v", this.Field1)+",\n") + s = append(s, "Field2: "+fmt.Sprintf("%#v", this.Field2)+",\n") + s = append(s, "Field3: "+strings.Replace(this.Field3.GoString(), `&`, ``, 1)+",\n") + s = append(s, "Field4: "+strings.Replace(this.Field4.GoString(), `&`, ``, 1)+",\n") + s = append(s, "Field6: "+fmt.Sprintf("%#v", this.Field6)+",\n") + s = append(s, "Field7: "+fmt.Sprintf("%#v", this.Field7)+",\n") + s = append(s, "Field8: "+strings.Replace(this.Field8.GoString(), `&`, ``, 1)+",\n") + s = append(s, "Field13: "+fmt.Sprintf("%#v", this.Field13)+",\n") + s = append(s, "Field14: "+fmt.Sprintf("%#v", this.Field14)+",\n") + s = append(s, "Field15: "+fmt.Sprintf("%#v", this.Field15)+",\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 *NinOptStruct) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 14) + s = append(s, "&test.NinOptStruct{") + if this.Field1 != nil { + s = append(s, "Field1: "+valueToGoStringThetest(this.Field1, "float64")+",\n") + } + if this.Field2 != nil { + s = append(s, "Field2: "+valueToGoStringThetest(this.Field2, "float32")+",\n") + } + if this.Field3 != nil { + s = append(s, "Field3: "+fmt.Sprintf("%#v", this.Field3)+",\n") + } + if this.Field4 != nil { + s = append(s, "Field4: "+fmt.Sprintf("%#v", this.Field4)+",\n") + } + if this.Field6 != nil { + s = append(s, "Field6: "+valueToGoStringThetest(this.Field6, "uint64")+",\n") + } + if this.Field7 != nil { + s = append(s, "Field7: "+valueToGoStringThetest(this.Field7, "int32")+",\n") + } + if this.Field8 != nil { + s = append(s, "Field8: "+fmt.Sprintf("%#v", this.Field8)+",\n") + } + if this.Field13 != nil { + s = append(s, "Field13: "+valueToGoStringThetest(this.Field13, "bool")+",\n") + } + if this.Field14 != nil { + s = append(s, "Field14: "+valueToGoStringThetest(this.Field14, "string")+",\n") + } + if this.Field15 != nil { + s = append(s, "Field15: "+valueToGoStringThetest(this.Field15, "byte")+",\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 *NidRepStruct) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 14) + s = append(s, "&test.NidRepStruct{") + if this.Field1 != nil { + s = append(s, "Field1: "+fmt.Sprintf("%#v", this.Field1)+",\n") + } + if this.Field2 != nil { + s = append(s, "Field2: "+fmt.Sprintf("%#v", this.Field2)+",\n") + } + if this.Field3 != nil { + s = append(s, "Field3: "+fmt.Sprintf("%#v", this.Field3)+",\n") + } + if this.Field4 != nil { + s = append(s, "Field4: "+fmt.Sprintf("%#v", this.Field4)+",\n") + } + if this.Field6 != nil { + s = append(s, "Field6: "+fmt.Sprintf("%#v", this.Field6)+",\n") + } + if this.Field7 != nil { + s = append(s, "Field7: "+fmt.Sprintf("%#v", this.Field7)+",\n") + } + if this.Field8 != nil { + s = append(s, "Field8: "+fmt.Sprintf("%#v", this.Field8)+",\n") + } + if this.Field13 != nil { + s = append(s, "Field13: "+fmt.Sprintf("%#v", this.Field13)+",\n") + } + if this.Field14 != nil { + s = append(s, "Field14: "+fmt.Sprintf("%#v", this.Field14)+",\n") + } + if this.Field15 != nil { + s = append(s, "Field15: "+fmt.Sprintf("%#v", this.Field15)+",\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 *NinRepStruct) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 14) + s = append(s, "&test.NinRepStruct{") + if this.Field1 != nil { + s = append(s, "Field1: "+fmt.Sprintf("%#v", this.Field1)+",\n") + } + if this.Field2 != nil { + s = append(s, "Field2: "+fmt.Sprintf("%#v", this.Field2)+",\n") + } + if this.Field3 != nil { + s = append(s, "Field3: "+fmt.Sprintf("%#v", this.Field3)+",\n") + } + if this.Field4 != nil { + s = append(s, "Field4: "+fmt.Sprintf("%#v", this.Field4)+",\n") + } + if this.Field6 != nil { + s = append(s, "Field6: "+fmt.Sprintf("%#v", this.Field6)+",\n") + } + if this.Field7 != nil { + s = append(s, "Field7: "+fmt.Sprintf("%#v", this.Field7)+",\n") + } + if this.Field8 != nil { + s = append(s, "Field8: "+fmt.Sprintf("%#v", this.Field8)+",\n") + } + if this.Field13 != nil { + s = append(s, "Field13: "+fmt.Sprintf("%#v", this.Field13)+",\n") + } + if this.Field14 != nil { + s = append(s, "Field14: "+fmt.Sprintf("%#v", this.Field14)+",\n") + } + if this.Field15 != nil { + s = append(s, "Field15: "+fmt.Sprintf("%#v", this.Field15)+",\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 *NidEmbeddedStruct) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 7) + s = append(s, "&test.NidEmbeddedStruct{") + if this.NidOptNative != nil { + s = append(s, "NidOptNative: "+fmt.Sprintf("%#v", this.NidOptNative)+",\n") + } + s = append(s, "Field200: "+strings.Replace(this.Field200.GoString(), `&`, ``, 1)+",\n") + s = append(s, "Field210: "+fmt.Sprintf("%#v", this.Field210)+",\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 *NinEmbeddedStruct) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 7) + s = append(s, "&test.NinEmbeddedStruct{") + if this.NidOptNative != nil { + s = append(s, "NidOptNative: "+fmt.Sprintf("%#v", this.NidOptNative)+",\n") + } + if this.Field200 != nil { + s = append(s, "Field200: "+fmt.Sprintf("%#v", this.Field200)+",\n") + } + if this.Field210 != nil { + s = append(s, "Field210: "+valueToGoStringThetest(this.Field210, "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 *NidNestedStruct) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 6) + s = append(s, "&test.NidNestedStruct{") + s = append(s, "Field1: "+strings.Replace(this.Field1.GoString(), `&`, ``, 1)+",\n") + if this.Field2 != nil { + s = append(s, "Field2: "+fmt.Sprintf("%#v", this.Field2)+",\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 *NinNestedStruct) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 6) + s = append(s, "&test.NinNestedStruct{") + if this.Field1 != nil { + s = append(s, "Field1: "+fmt.Sprintf("%#v", this.Field1)+",\n") + } + if this.Field2 != nil { + s = append(s, "Field2: "+fmt.Sprintf("%#v", this.Field2)+",\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 *NidOptCustom) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 6) + s = append(s, "&test.NidOptCustom{") + s = append(s, "Id: "+fmt.Sprintf("%#v", this.Id)+",\n") + s = append(s, "Value: "+fmt.Sprintf("%#v", this.Value)+",\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 *CustomDash) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&test.CustomDash{") + if this.Value != nil { + s = append(s, "Value: "+valueToGoStringThetest(this.Value, "github_com_gogo_protobuf_test_custom_dash_type.Bytes")+",\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 *NinOptCustom) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 6) + s = append(s, "&test.NinOptCustom{") + if this.Id != nil { + s = append(s, "Id: "+valueToGoStringThetest(this.Id, "Uuid")+",\n") + } + if this.Value != nil { + s = append(s, "Value: "+valueToGoStringThetest(this.Value, "github_com_gogo_protobuf_test_custom.Uint128")+",\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 *NidRepCustom) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 6) + s = append(s, "&test.NidRepCustom{") + if this.Id != nil { + s = append(s, "Id: "+fmt.Sprintf("%#v", this.Id)+",\n") + } + if this.Value != nil { + s = append(s, "Value: "+fmt.Sprintf("%#v", this.Value)+",\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 *NinRepCustom) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 6) + s = append(s, "&test.NinRepCustom{") + if this.Id != nil { + s = append(s, "Id: "+fmt.Sprintf("%#v", this.Id)+",\n") + } + if this.Value != nil { + s = append(s, "Value: "+fmt.Sprintf("%#v", this.Value)+",\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 *NinOptNativeUnion) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 13) + s = append(s, "&test.NinOptNativeUnion{") + if this.Field1 != nil { + s = append(s, "Field1: "+valueToGoStringThetest(this.Field1, "float64")+",\n") + } + if this.Field2 != nil { + s = append(s, "Field2: "+valueToGoStringThetest(this.Field2, "float32")+",\n") + } + if this.Field3 != nil { + s = append(s, "Field3: "+valueToGoStringThetest(this.Field3, "int32")+",\n") + } + if this.Field4 != nil { + s = append(s, "Field4: "+valueToGoStringThetest(this.Field4, "int64")+",\n") + } + if this.Field5 != nil { + s = append(s, "Field5: "+valueToGoStringThetest(this.Field5, "uint32")+",\n") + } + if this.Field6 != nil { + s = append(s, "Field6: "+valueToGoStringThetest(this.Field6, "uint64")+",\n") + } + if this.Field13 != nil { + s = append(s, "Field13: "+valueToGoStringThetest(this.Field13, "bool")+",\n") + } + if this.Field14 != nil { + s = append(s, "Field14: "+valueToGoStringThetest(this.Field14, "string")+",\n") + } + if this.Field15 != nil { + s = append(s, "Field15: "+valueToGoStringThetest(this.Field15, "byte")+",\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 *NinOptStructUnion) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 13) + s = append(s, "&test.NinOptStructUnion{") + if this.Field1 != nil { + s = append(s, "Field1: "+valueToGoStringThetest(this.Field1, "float64")+",\n") + } + if this.Field2 != nil { + s = append(s, "Field2: "+valueToGoStringThetest(this.Field2, "float32")+",\n") + } + if this.Field3 != nil { + s = append(s, "Field3: "+fmt.Sprintf("%#v", this.Field3)+",\n") + } + if this.Field4 != nil { + s = append(s, "Field4: "+fmt.Sprintf("%#v", this.Field4)+",\n") + } + if this.Field6 != nil { + s = append(s, "Field6: "+valueToGoStringThetest(this.Field6, "uint64")+",\n") + } + if this.Field7 != nil { + s = append(s, "Field7: "+valueToGoStringThetest(this.Field7, "int32")+",\n") + } + if this.Field13 != nil { + s = append(s, "Field13: "+valueToGoStringThetest(this.Field13, "bool")+",\n") + } + if this.Field14 != nil { + s = append(s, "Field14: "+valueToGoStringThetest(this.Field14, "string")+",\n") + } + if this.Field15 != nil { + s = append(s, "Field15: "+valueToGoStringThetest(this.Field15, "byte")+",\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 *NinEmbeddedStructUnion) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 7) + s = append(s, "&test.NinEmbeddedStructUnion{") + if this.NidOptNative != nil { + s = append(s, "NidOptNative: "+fmt.Sprintf("%#v", this.NidOptNative)+",\n") + } + if this.Field200 != nil { + s = append(s, "Field200: "+fmt.Sprintf("%#v", this.Field200)+",\n") + } + if this.Field210 != nil { + s = append(s, "Field210: "+valueToGoStringThetest(this.Field210, "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 *NinNestedStructUnion) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 7) + s = append(s, "&test.NinNestedStructUnion{") + if this.Field1 != nil { + s = append(s, "Field1: "+fmt.Sprintf("%#v", this.Field1)+",\n") + } + if this.Field2 != nil { + s = append(s, "Field2: "+fmt.Sprintf("%#v", this.Field2)+",\n") + } + if this.Field3 != nil { + s = append(s, "Field3: "+fmt.Sprintf("%#v", this.Field3)+",\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 *Tree) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 7) + s = append(s, "&test.Tree{") + if this.Or != nil { + s = append(s, "Or: "+fmt.Sprintf("%#v", this.Or)+",\n") + } + if this.And != nil { + s = append(s, "And: "+fmt.Sprintf("%#v", this.And)+",\n") + } + if this.Leaf != nil { + s = append(s, "Leaf: "+fmt.Sprintf("%#v", this.Leaf)+",\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 *OrBranch) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 6) + s = append(s, "&test.OrBranch{") + s = append(s, "Left: "+strings.Replace(this.Left.GoString(), `&`, ``, 1)+",\n") + s = append(s, "Right: "+strings.Replace(this.Right.GoString(), `&`, ``, 1)+",\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 *AndBranch) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 6) + s = append(s, "&test.AndBranch{") + s = append(s, "Left: "+strings.Replace(this.Left.GoString(), `&`, ``, 1)+",\n") + s = append(s, "Right: "+strings.Replace(this.Right.GoString(), `&`, ``, 1)+",\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 *Leaf) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 6) + s = append(s, "&test.Leaf{") + s = append(s, "Value: "+fmt.Sprintf("%#v", this.Value)+",\n") + s = append(s, "StrValue: "+fmt.Sprintf("%#v", this.StrValue)+",\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 *DeepTree) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 7) + s = append(s, "&test.DeepTree{") + if this.Down != nil { + s = append(s, "Down: "+fmt.Sprintf("%#v", this.Down)+",\n") + } + if this.And != nil { + s = append(s, "And: "+fmt.Sprintf("%#v", this.And)+",\n") + } + if this.Leaf != nil { + s = append(s, "Leaf: "+fmt.Sprintf("%#v", this.Leaf)+",\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 *ADeepBranch) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&test.ADeepBranch{") + s = append(s, "Down: "+strings.Replace(this.Down.GoString(), `&`, ``, 1)+",\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 *AndDeepBranch) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 6) + s = append(s, "&test.AndDeepBranch{") + s = append(s, "Left: "+strings.Replace(this.Left.GoString(), `&`, ``, 1)+",\n") + s = append(s, "Right: "+strings.Replace(this.Right.GoString(), `&`, ``, 1)+",\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 *DeepLeaf) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&test.DeepLeaf{") + s = append(s, "Tree: "+strings.Replace(this.Tree.GoString(), `&`, ``, 1)+",\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 *Nil) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 4) + s = append(s, "&test.Nil{") + 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 *NidOptEnum) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&test.NidOptEnum{") + s = append(s, "Field1: "+fmt.Sprintf("%#v", this.Field1)+",\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 *NinOptEnum) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 7) + s = append(s, "&test.NinOptEnum{") + if this.Field1 != nil { + s = append(s, "Field1: "+valueToGoStringThetest(this.Field1, "test.TheTestEnum")+",\n") + } + if this.Field2 != nil { + s = append(s, "Field2: "+valueToGoStringThetest(this.Field2, "test.YetAnotherTestEnum")+",\n") + } + if this.Field3 != nil { + s = append(s, "Field3: "+valueToGoStringThetest(this.Field3, "test.YetYetAnotherTestEnum")+",\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 *NidRepEnum) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 7) + s = append(s, "&test.NidRepEnum{") + if this.Field1 != nil { + s = append(s, "Field1: "+fmt.Sprintf("%#v", this.Field1)+",\n") + } + if this.Field2 != nil { + s = append(s, "Field2: "+fmt.Sprintf("%#v", this.Field2)+",\n") + } + if this.Field3 != nil { + s = append(s, "Field3: "+fmt.Sprintf("%#v", this.Field3)+",\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 *NinRepEnum) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 7) + s = append(s, "&test.NinRepEnum{") + if this.Field1 != nil { + s = append(s, "Field1: "+fmt.Sprintf("%#v", this.Field1)+",\n") + } + if this.Field2 != nil { + s = append(s, "Field2: "+fmt.Sprintf("%#v", this.Field2)+",\n") + } + if this.Field3 != nil { + s = append(s, "Field3: "+fmt.Sprintf("%#v", this.Field3)+",\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 *NinOptEnumDefault) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 7) + s = append(s, "&test.NinOptEnumDefault{") + if this.Field1 != nil { + s = append(s, "Field1: "+valueToGoStringThetest(this.Field1, "test.TheTestEnum")+",\n") + } + if this.Field2 != nil { + s = append(s, "Field2: "+valueToGoStringThetest(this.Field2, "test.YetAnotherTestEnum")+",\n") + } + if this.Field3 != nil { + s = append(s, "Field3: "+valueToGoStringThetest(this.Field3, "test.YetYetAnotherTestEnum")+",\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 *AnotherNinOptEnum) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 7) + s = append(s, "&test.AnotherNinOptEnum{") + if this.Field1 != nil { + s = append(s, "Field1: "+valueToGoStringThetest(this.Field1, "test.AnotherTestEnum")+",\n") + } + if this.Field2 != nil { + s = append(s, "Field2: "+valueToGoStringThetest(this.Field2, "test.YetAnotherTestEnum")+",\n") + } + if this.Field3 != nil { + s = append(s, "Field3: "+valueToGoStringThetest(this.Field3, "test.YetYetAnotherTestEnum")+",\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 *AnotherNinOptEnumDefault) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 7) + s = append(s, "&test.AnotherNinOptEnumDefault{") + if this.Field1 != nil { + s = append(s, "Field1: "+valueToGoStringThetest(this.Field1, "test.AnotherTestEnum")+",\n") + } + if this.Field2 != nil { + s = append(s, "Field2: "+valueToGoStringThetest(this.Field2, "test.YetAnotherTestEnum")+",\n") + } + if this.Field3 != nil { + s = append(s, "Field3: "+valueToGoStringThetest(this.Field3, "test.YetYetAnotherTestEnum")+",\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 *Timer) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 7) + s = append(s, "&test.Timer{") + s = append(s, "Time1: "+fmt.Sprintf("%#v", this.Time1)+",\n") + s = append(s, "Time2: "+fmt.Sprintf("%#v", this.Time2)+",\n") + s = append(s, "Data: "+fmt.Sprintf("%#v", this.Data)+",\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 *MyExtendable) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&test.MyExtendable{") + if this.Field1 != nil { + s = append(s, "Field1: "+valueToGoStringThetest(this.Field1, "int64")+",\n") + } + if this.XXX_extensions != nil { + s = append(s, "XXX_extensions: "+extensionToGoStringThetest(this.XXX_extensions)+",\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 *OtherExtenable) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 7) + s = append(s, "&test.OtherExtenable{") + if this.Field2 != nil { + s = append(s, "Field2: "+valueToGoStringThetest(this.Field2, "int64")+",\n") + } + if this.Field13 != nil { + s = append(s, "Field13: "+valueToGoStringThetest(this.Field13, "int64")+",\n") + } + if this.M != nil { + s = append(s, "M: "+fmt.Sprintf("%#v", this.M)+",\n") + } + if this.XXX_extensions != nil { + s = append(s, "XXX_extensions: "+extensionToGoStringThetest(this.XXX_extensions)+",\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 *NestedDefinition) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 8) + s = append(s, "&test.NestedDefinition{") + if this.Field1 != nil { + s = append(s, "Field1: "+valueToGoStringThetest(this.Field1, "int64")+",\n") + } + if this.EnumField != nil { + s = append(s, "EnumField: "+valueToGoStringThetest(this.EnumField, "test.NestedDefinition_NestedEnum")+",\n") + } + if this.NNM != nil { + s = append(s, "NNM: "+fmt.Sprintf("%#v", this.NNM)+",\n") + } + if this.NM != nil { + s = append(s, "NM: "+fmt.Sprintf("%#v", this.NM)+",\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 *NestedDefinition_NestedMessage) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 6) + s = append(s, "&test.NestedDefinition_NestedMessage{") + if this.NestedField1 != nil { + s = append(s, "NestedField1: "+valueToGoStringThetest(this.NestedField1, "uint64")+",\n") + } + if this.NNM != nil { + s = append(s, "NNM: "+fmt.Sprintf("%#v", this.NNM)+",\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 *NestedDefinition_NestedMessage_NestedNestedMsg) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&test.NestedDefinition_NestedMessage_NestedNestedMsg{") + if this.NestedNestedField1 != nil { + s = append(s, "NestedNestedField1: "+valueToGoStringThetest(this.NestedNestedField1, "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 *NestedScope) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 7) + s = append(s, "&test.NestedScope{") + if this.A != nil { + s = append(s, "A: "+fmt.Sprintf("%#v", this.A)+",\n") + } + if this.B != nil { + s = append(s, "B: "+valueToGoStringThetest(this.B, "test.NestedDefinition_NestedEnum")+",\n") + } + if this.C != nil { + s = append(s, "C: "+fmt.Sprintf("%#v", this.C)+",\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 *NinOptNativeDefault) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 19) + s = append(s, "&test.NinOptNativeDefault{") + if this.Field1 != nil { + s = append(s, "Field1: "+valueToGoStringThetest(this.Field1, "float64")+",\n") + } + if this.Field2 != nil { + s = append(s, "Field2: "+valueToGoStringThetest(this.Field2, "float32")+",\n") + } + if this.Field3 != nil { + s = append(s, "Field3: "+valueToGoStringThetest(this.Field3, "int32")+",\n") + } + if this.Field4 != nil { + s = append(s, "Field4: "+valueToGoStringThetest(this.Field4, "int64")+",\n") + } + if this.Field5 != nil { + s = append(s, "Field5: "+valueToGoStringThetest(this.Field5, "uint32")+",\n") + } + if this.Field6 != nil { + s = append(s, "Field6: "+valueToGoStringThetest(this.Field6, "uint64")+",\n") + } + if this.Field7 != nil { + s = append(s, "Field7: "+valueToGoStringThetest(this.Field7, "int32")+",\n") + } + if this.Field8 != nil { + s = append(s, "Field8: "+valueToGoStringThetest(this.Field8, "int64")+",\n") + } + if this.Field9 != nil { + s = append(s, "Field9: "+valueToGoStringThetest(this.Field9, "uint32")+",\n") + } + if this.Field10 != nil { + s = append(s, "Field10: "+valueToGoStringThetest(this.Field10, "int32")+",\n") + } + if this.Field11 != nil { + s = append(s, "Field11: "+valueToGoStringThetest(this.Field11, "uint64")+",\n") + } + if this.Field12 != nil { + s = append(s, "Field12: "+valueToGoStringThetest(this.Field12, "int64")+",\n") + } + if this.Field13 != nil { + s = append(s, "Field13: "+valueToGoStringThetest(this.Field13, "bool")+",\n") + } + if this.Field14 != nil { + s = append(s, "Field14: "+valueToGoStringThetest(this.Field14, "string")+",\n") + } + if this.Field15 != nil { + s = append(s, "Field15: "+valueToGoStringThetest(this.Field15, "byte")+",\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 *CustomContainer) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&test.CustomContainer{") + s = append(s, "CustomStruct: "+strings.Replace(this.CustomStruct.GoString(), `&`, ``, 1)+",\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 *CustomNameNidOptNative) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 19) + s = append(s, "&test.CustomNameNidOptNative{") + s = append(s, "FieldA: "+fmt.Sprintf("%#v", this.FieldA)+",\n") + s = append(s, "FieldB: "+fmt.Sprintf("%#v", this.FieldB)+",\n") + s = append(s, "FieldC: "+fmt.Sprintf("%#v", this.FieldC)+",\n") + s = append(s, "FieldD: "+fmt.Sprintf("%#v", this.FieldD)+",\n") + s = append(s, "FieldE: "+fmt.Sprintf("%#v", this.FieldE)+",\n") + s = append(s, "FieldF: "+fmt.Sprintf("%#v", this.FieldF)+",\n") + s = append(s, "FieldG: "+fmt.Sprintf("%#v", this.FieldG)+",\n") + s = append(s, "FieldH: "+fmt.Sprintf("%#v", this.FieldH)+",\n") + s = append(s, "FieldI: "+fmt.Sprintf("%#v", this.FieldI)+",\n") + s = append(s, "FieldJ: "+fmt.Sprintf("%#v", this.FieldJ)+",\n") + s = append(s, "FieldK: "+fmt.Sprintf("%#v", this.FieldK)+",\n") + s = append(s, "FieldL: "+fmt.Sprintf("%#v", this.FieldL)+",\n") + s = append(s, "FieldM: "+fmt.Sprintf("%#v", this.FieldM)+",\n") + s = append(s, "FieldN: "+fmt.Sprintf("%#v", this.FieldN)+",\n") + s = append(s, "FieldO: "+fmt.Sprintf("%#v", this.FieldO)+",\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 *CustomNameNinOptNative) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 19) + s = append(s, "&test.CustomNameNinOptNative{") + if this.FieldA != nil { + s = append(s, "FieldA: "+valueToGoStringThetest(this.FieldA, "float64")+",\n") + } + if this.FieldB != nil { + s = append(s, "FieldB: "+valueToGoStringThetest(this.FieldB, "float32")+",\n") + } + if this.FieldC != nil { + s = append(s, "FieldC: "+valueToGoStringThetest(this.FieldC, "int32")+",\n") + } + if this.FieldD != nil { + s = append(s, "FieldD: "+valueToGoStringThetest(this.FieldD, "int64")+",\n") + } + if this.FieldE != nil { + s = append(s, "FieldE: "+valueToGoStringThetest(this.FieldE, "uint32")+",\n") + } + if this.FieldF != nil { + s = append(s, "FieldF: "+valueToGoStringThetest(this.FieldF, "uint64")+",\n") + } + if this.FieldG != nil { + s = append(s, "FieldG: "+valueToGoStringThetest(this.FieldG, "int32")+",\n") + } + if this.FieldH != nil { + s = append(s, "FieldH: "+valueToGoStringThetest(this.FieldH, "int64")+",\n") + } + if this.FieldI != nil { + s = append(s, "FieldI: "+valueToGoStringThetest(this.FieldI, "uint32")+",\n") + } + if this.FieldJ != nil { + s = append(s, "FieldJ: "+valueToGoStringThetest(this.FieldJ, "int32")+",\n") + } + if this.FieldK != nil { + s = append(s, "FieldK: "+valueToGoStringThetest(this.FieldK, "uint64")+",\n") + } + if this.FielL != nil { + s = append(s, "FielL: "+valueToGoStringThetest(this.FielL, "int64")+",\n") + } + if this.FieldM != nil { + s = append(s, "FieldM: "+valueToGoStringThetest(this.FieldM, "bool")+",\n") + } + if this.FieldN != nil { + s = append(s, "FieldN: "+valueToGoStringThetest(this.FieldN, "string")+",\n") + } + if this.FieldO != nil { + s = append(s, "FieldO: "+valueToGoStringThetest(this.FieldO, "byte")+",\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 *CustomNameNinRepNative) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 19) + s = append(s, "&test.CustomNameNinRepNative{") + if this.FieldA != nil { + s = append(s, "FieldA: "+fmt.Sprintf("%#v", this.FieldA)+",\n") + } + if this.FieldB != nil { + s = append(s, "FieldB: "+fmt.Sprintf("%#v", this.FieldB)+",\n") + } + if this.FieldC != nil { + s = append(s, "FieldC: "+fmt.Sprintf("%#v", this.FieldC)+",\n") + } + if this.FieldD != nil { + s = append(s, "FieldD: "+fmt.Sprintf("%#v", this.FieldD)+",\n") + } + if this.FieldE != nil { + s = append(s, "FieldE: "+fmt.Sprintf("%#v", this.FieldE)+",\n") + } + if this.FieldF != nil { + s = append(s, "FieldF: "+fmt.Sprintf("%#v", this.FieldF)+",\n") + } + if this.FieldG != nil { + s = append(s, "FieldG: "+fmt.Sprintf("%#v", this.FieldG)+",\n") + } + if this.FieldH != nil { + s = append(s, "FieldH: "+fmt.Sprintf("%#v", this.FieldH)+",\n") + } + if this.FieldI != nil { + s = append(s, "FieldI: "+fmt.Sprintf("%#v", this.FieldI)+",\n") + } + if this.FieldJ != nil { + s = append(s, "FieldJ: "+fmt.Sprintf("%#v", this.FieldJ)+",\n") + } + if this.FieldK != nil { + s = append(s, "FieldK: "+fmt.Sprintf("%#v", this.FieldK)+",\n") + } + if this.FieldL != nil { + s = append(s, "FieldL: "+fmt.Sprintf("%#v", this.FieldL)+",\n") + } + if this.FieldM != nil { + s = append(s, "FieldM: "+fmt.Sprintf("%#v", this.FieldM)+",\n") + } + if this.FieldN != nil { + s = append(s, "FieldN: "+fmt.Sprintf("%#v", this.FieldN)+",\n") + } + if this.FieldO != nil { + s = append(s, "FieldO: "+fmt.Sprintf("%#v", this.FieldO)+",\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 *CustomNameNinStruct) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 14) + s = append(s, "&test.CustomNameNinStruct{") + if this.FieldA != nil { + s = append(s, "FieldA: "+valueToGoStringThetest(this.FieldA, "float64")+",\n") + } + if this.FieldB != nil { + s = append(s, "FieldB: "+valueToGoStringThetest(this.FieldB, "float32")+",\n") + } + if this.FieldC != nil { + s = append(s, "FieldC: "+fmt.Sprintf("%#v", this.FieldC)+",\n") + } + if this.FieldD != nil { + s = append(s, "FieldD: "+fmt.Sprintf("%#v", this.FieldD)+",\n") + } + if this.FieldE != nil { + s = append(s, "FieldE: "+valueToGoStringThetest(this.FieldE, "uint64")+",\n") + } + if this.FieldF != nil { + s = append(s, "FieldF: "+valueToGoStringThetest(this.FieldF, "int32")+",\n") + } + if this.FieldG != nil { + s = append(s, "FieldG: "+fmt.Sprintf("%#v", this.FieldG)+",\n") + } + if this.FieldH != nil { + s = append(s, "FieldH: "+valueToGoStringThetest(this.FieldH, "bool")+",\n") + } + if this.FieldI != nil { + s = append(s, "FieldI: "+valueToGoStringThetest(this.FieldI, "string")+",\n") + } + if this.FieldJ != nil { + s = append(s, "FieldJ: "+valueToGoStringThetest(this.FieldJ, "byte")+",\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 *CustomNameCustomType) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 8) + s = append(s, "&test.CustomNameCustomType{") + if this.FieldA != nil { + s = append(s, "FieldA: "+valueToGoStringThetest(this.FieldA, "Uuid")+",\n") + } + if this.FieldB != nil { + s = append(s, "FieldB: "+valueToGoStringThetest(this.FieldB, "github_com_gogo_protobuf_test_custom.Uint128")+",\n") + } + if this.FieldC != nil { + s = append(s, "FieldC: "+fmt.Sprintf("%#v", this.FieldC)+",\n") + } + if this.FieldD != nil { + s = append(s, "FieldD: "+fmt.Sprintf("%#v", this.FieldD)+",\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 *CustomNameNinEmbeddedStructUnion) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 7) + s = append(s, "&test.CustomNameNinEmbeddedStructUnion{") + if this.NidOptNative != nil { + s = append(s, "NidOptNative: "+fmt.Sprintf("%#v", this.NidOptNative)+",\n") + } + if this.FieldA != nil { + s = append(s, "FieldA: "+fmt.Sprintf("%#v", this.FieldA)+",\n") + } + if this.FieldB != nil { + s = append(s, "FieldB: "+valueToGoStringThetest(this.FieldB, "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 *CustomNameEnum) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 6) + s = append(s, "&test.CustomNameEnum{") + if this.FieldA != nil { + s = append(s, "FieldA: "+valueToGoStringThetest(this.FieldA, "test.TheTestEnum")+",\n") + } + if this.FieldB != nil { + s = append(s, "FieldB: "+fmt.Sprintf("%#v", this.FieldB)+",\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 *NoExtensionsMap) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&test.NoExtensionsMap{") + if this.Field1 != nil { + s = append(s, "Field1: "+valueToGoStringThetest(this.Field1, "int64")+",\n") + } + if this.XXX_extensions != nil { + s = append(s, "XXX_extensions: "+fmt.Sprintf("%#v", this.XXX_extensions)+",\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 *Unrecognized) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&test.Unrecognized{") + if this.Field1 != nil { + s = append(s, "Field1: "+valueToGoStringThetest(this.Field1, "string")+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *UnrecognizedWithInner) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 6) + s = append(s, "&test.UnrecognizedWithInner{") + if this.Embedded != nil { + s = append(s, "Embedded: "+fmt.Sprintf("%#v", this.Embedded)+",\n") + } + if this.Field2 != nil { + s = append(s, "Field2: "+valueToGoStringThetest(this.Field2, "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 *UnrecognizedWithInner_Inner) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&test.UnrecognizedWithInner_Inner{") + if this.Field1 != nil { + s = append(s, "Field1: "+valueToGoStringThetest(this.Field1, "uint32")+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *UnrecognizedWithEmbed) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 6) + s = append(s, "&test.UnrecognizedWithEmbed{") + s = append(s, "UnrecognizedWithEmbed_Embedded: "+strings.Replace(this.UnrecognizedWithEmbed_Embedded.GoString(), `&`, ``, 1)+",\n") + if this.Field2 != nil { + s = append(s, "Field2: "+valueToGoStringThetest(this.Field2, "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 *UnrecognizedWithEmbed_Embedded) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&test.UnrecognizedWithEmbed_Embedded{") + if this.Field1 != nil { + s = append(s, "Field1: "+valueToGoStringThetest(this.Field1, "uint32")+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *Node) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 6) + s = append(s, "&test.Node{") + if this.Label != nil { + s = append(s, "Label: "+valueToGoStringThetest(this.Label, "string")+",\n") + } + if this.Children != nil { + s = append(s, "Children: "+fmt.Sprintf("%#v", this.Children)+",\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 valueToGoStringThetest(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 extensionToGoStringThetest(e map[int32]github_com_gogo_protobuf_proto.Extension) string { + if e == nil { + return "nil" + } + s := "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 +} +func NewPopulatedNidOptNative(r randyThetest, easy bool) *NidOptNative { + this := &NidOptNative{} + this.Field1 = float64(r.Float64()) + if r.Intn(2) == 0 { + this.Field1 *= -1 + } + this.Field2 = float32(r.Float32()) + if r.Intn(2) == 0 { + this.Field2 *= -1 + } + this.Field3 = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Field3 *= -1 + } + this.Field4 = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Field4 *= -1 + } + this.Field5 = uint32(r.Uint32()) + this.Field6 = uint64(uint64(r.Uint32())) + this.Field7 = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Field7 *= -1 + } + this.Field8 = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Field8 *= -1 + } + this.Field9 = uint32(r.Uint32()) + this.Field10 = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Field10 *= -1 + } + this.Field11 = uint64(uint64(r.Uint32())) + this.Field12 = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Field12 *= -1 + } + this.Field13 = bool(bool(r.Intn(2) == 0)) + this.Field14 = randStringThetest(r) + v1 := r.Intn(100) + this.Field15 = make([]byte, v1) + for i := 0; i < v1; i++ { + this.Field15[i] = byte(r.Intn(256)) + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 16) + } + return this +} + +func NewPopulatedNinOptNative(r randyThetest, easy bool) *NinOptNative { + this := &NinOptNative{} + if r.Intn(10) != 0 { + v2 := float64(r.Float64()) + if r.Intn(2) == 0 { + v2 *= -1 + } + this.Field1 = &v2 + } + if r.Intn(10) != 0 { + v3 := float32(r.Float32()) + if r.Intn(2) == 0 { + v3 *= -1 + } + this.Field2 = &v3 + } + if r.Intn(10) != 0 { + v4 := int32(r.Int31()) + if r.Intn(2) == 0 { + v4 *= -1 + } + this.Field3 = &v4 + } + if r.Intn(10) != 0 { + v5 := int64(r.Int63()) + if r.Intn(2) == 0 { + v5 *= -1 + } + this.Field4 = &v5 + } + if r.Intn(10) != 0 { + v6 := uint32(r.Uint32()) + this.Field5 = &v6 + } + if r.Intn(10) != 0 { + v7 := uint64(uint64(r.Uint32())) + this.Field6 = &v7 + } + if r.Intn(10) != 0 { + v8 := int32(r.Int31()) + if r.Intn(2) == 0 { + v8 *= -1 + } + this.Field7 = &v8 + } + if r.Intn(10) != 0 { + v9 := int64(r.Int63()) + if r.Intn(2) == 0 { + v9 *= -1 + } + this.Field8 = &v9 + } + if r.Intn(10) != 0 { + v10 := uint32(r.Uint32()) + this.Field9 = &v10 + } + if r.Intn(10) != 0 { + v11 := int32(r.Int31()) + if r.Intn(2) == 0 { + v11 *= -1 + } + this.Field10 = &v11 + } + if r.Intn(10) != 0 { + v12 := uint64(uint64(r.Uint32())) + this.Field11 = &v12 + } + if r.Intn(10) != 0 { + v13 := int64(r.Int63()) + if r.Intn(2) == 0 { + v13 *= -1 + } + this.Field12 = &v13 + } + if r.Intn(10) != 0 { + v14 := bool(bool(r.Intn(2) == 0)) + this.Field13 = &v14 + } + if r.Intn(10) != 0 { + v15 := randStringThetest(r) + this.Field14 = &v15 + } + if r.Intn(10) != 0 { + v16 := r.Intn(100) + this.Field15 = make([]byte, v16) + for i := 0; i < v16; i++ { + this.Field15[i] = byte(r.Intn(256)) + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 16) + } + return this +} + +func NewPopulatedNidRepNative(r randyThetest, easy bool) *NidRepNative { + this := &NidRepNative{} + if r.Intn(10) != 0 { + v17 := r.Intn(10) + this.Field1 = make([]float64, v17) + for i := 0; i < v17; i++ { + this.Field1[i] = float64(r.Float64()) + if r.Intn(2) == 0 { + this.Field1[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v18 := r.Intn(10) + this.Field2 = make([]float32, v18) + for i := 0; i < v18; i++ { + this.Field2[i] = float32(r.Float32()) + if r.Intn(2) == 0 { + this.Field2[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v19 := r.Intn(10) + this.Field3 = make([]int32, v19) + for i := 0; i < v19; i++ { + this.Field3[i] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Field3[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v20 := r.Intn(10) + this.Field4 = make([]int64, v20) + for i := 0; i < v20; i++ { + this.Field4[i] = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Field4[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v21 := r.Intn(10) + this.Field5 = make([]uint32, v21) + for i := 0; i < v21; i++ { + this.Field5[i] = uint32(r.Uint32()) + } + } + if r.Intn(10) != 0 { + v22 := r.Intn(10) + this.Field6 = make([]uint64, v22) + for i := 0; i < v22; i++ { + this.Field6[i] = uint64(uint64(r.Uint32())) + } + } + if r.Intn(10) != 0 { + v23 := r.Intn(10) + this.Field7 = make([]int32, v23) + for i := 0; i < v23; i++ { + this.Field7[i] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Field7[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v24 := r.Intn(10) + this.Field8 = make([]int64, v24) + for i := 0; i < v24; i++ { + this.Field8[i] = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Field8[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v25 := r.Intn(10) + this.Field9 = make([]uint32, v25) + for i := 0; i < v25; i++ { + this.Field9[i] = uint32(r.Uint32()) + } + } + if r.Intn(10) != 0 { + v26 := r.Intn(10) + this.Field10 = make([]int32, v26) + for i := 0; i < v26; i++ { + this.Field10[i] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Field10[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v27 := r.Intn(10) + this.Field11 = make([]uint64, v27) + for i := 0; i < v27; i++ { + this.Field11[i] = uint64(uint64(r.Uint32())) + } + } + if r.Intn(10) != 0 { + v28 := r.Intn(10) + this.Field12 = make([]int64, v28) + for i := 0; i < v28; i++ { + this.Field12[i] = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Field12[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v29 := r.Intn(10) + this.Field13 = make([]bool, v29) + for i := 0; i < v29; i++ { + this.Field13[i] = bool(bool(r.Intn(2) == 0)) + } + } + if r.Intn(10) != 0 { + v30 := r.Intn(10) + this.Field14 = make([]string, v30) + for i := 0; i < v30; i++ { + this.Field14[i] = randStringThetest(r) + } + } + if r.Intn(10) != 0 { + v31 := r.Intn(10) + this.Field15 = make([][]byte, v31) + for i := 0; i < v31; i++ { + v32 := r.Intn(100) + this.Field15[i] = make([]byte, v32) + for j := 0; j < v32; j++ { + this.Field15[i][j] = byte(r.Intn(256)) + } + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 16) + } + return this +} + +func NewPopulatedNinRepNative(r randyThetest, easy bool) *NinRepNative { + this := &NinRepNative{} + if r.Intn(10) != 0 { + v33 := r.Intn(10) + this.Field1 = make([]float64, v33) + for i := 0; i < v33; i++ { + this.Field1[i] = float64(r.Float64()) + if r.Intn(2) == 0 { + this.Field1[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v34 := r.Intn(10) + this.Field2 = make([]float32, v34) + for i := 0; i < v34; i++ { + this.Field2[i] = float32(r.Float32()) + if r.Intn(2) == 0 { + this.Field2[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v35 := r.Intn(10) + this.Field3 = make([]int32, v35) + for i := 0; i < v35; i++ { + this.Field3[i] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Field3[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v36 := r.Intn(10) + this.Field4 = make([]int64, v36) + for i := 0; i < v36; i++ { + this.Field4[i] = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Field4[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v37 := r.Intn(10) + this.Field5 = make([]uint32, v37) + for i := 0; i < v37; i++ { + this.Field5[i] = uint32(r.Uint32()) + } + } + if r.Intn(10) != 0 { + v38 := r.Intn(10) + this.Field6 = make([]uint64, v38) + for i := 0; i < v38; i++ { + this.Field6[i] = uint64(uint64(r.Uint32())) + } + } + if r.Intn(10) != 0 { + v39 := r.Intn(10) + this.Field7 = make([]int32, v39) + for i := 0; i < v39; i++ { + this.Field7[i] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Field7[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v40 := r.Intn(10) + this.Field8 = make([]int64, v40) + for i := 0; i < v40; i++ { + this.Field8[i] = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Field8[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v41 := r.Intn(10) + this.Field9 = make([]uint32, v41) + for i := 0; i < v41; i++ { + this.Field9[i] = uint32(r.Uint32()) + } + } + if r.Intn(10) != 0 { + v42 := r.Intn(10) + this.Field10 = make([]int32, v42) + for i := 0; i < v42; i++ { + this.Field10[i] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Field10[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v43 := r.Intn(10) + this.Field11 = make([]uint64, v43) + for i := 0; i < v43; i++ { + this.Field11[i] = uint64(uint64(r.Uint32())) + } + } + if r.Intn(10) != 0 { + v44 := r.Intn(10) + this.Field12 = make([]int64, v44) + for i := 0; i < v44; i++ { + this.Field12[i] = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Field12[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v45 := r.Intn(10) + this.Field13 = make([]bool, v45) + for i := 0; i < v45; i++ { + this.Field13[i] = bool(bool(r.Intn(2) == 0)) + } + } + if r.Intn(10) != 0 { + v46 := r.Intn(10) + this.Field14 = make([]string, v46) + for i := 0; i < v46; i++ { + this.Field14[i] = randStringThetest(r) + } + } + if r.Intn(10) != 0 { + v47 := r.Intn(10) + this.Field15 = make([][]byte, v47) + for i := 0; i < v47; i++ { + v48 := r.Intn(100) + this.Field15[i] = make([]byte, v48) + for j := 0; j < v48; j++ { + this.Field15[i][j] = byte(r.Intn(256)) + } + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 16) + } + return this +} + +func NewPopulatedNidRepPackedNative(r randyThetest, easy bool) *NidRepPackedNative { + this := &NidRepPackedNative{} + if r.Intn(10) != 0 { + v49 := r.Intn(10) + this.Field1 = make([]float64, v49) + for i := 0; i < v49; i++ { + this.Field1[i] = float64(r.Float64()) + if r.Intn(2) == 0 { + this.Field1[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v50 := r.Intn(10) + this.Field2 = make([]float32, v50) + for i := 0; i < v50; i++ { + this.Field2[i] = float32(r.Float32()) + if r.Intn(2) == 0 { + this.Field2[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v51 := r.Intn(10) + this.Field3 = make([]int32, v51) + for i := 0; i < v51; i++ { + this.Field3[i] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Field3[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v52 := r.Intn(10) + this.Field4 = make([]int64, v52) + for i := 0; i < v52; i++ { + this.Field4[i] = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Field4[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v53 := r.Intn(10) + this.Field5 = make([]uint32, v53) + for i := 0; i < v53; i++ { + this.Field5[i] = uint32(r.Uint32()) + } + } + if r.Intn(10) != 0 { + v54 := r.Intn(10) + this.Field6 = make([]uint64, v54) + for i := 0; i < v54; i++ { + this.Field6[i] = uint64(uint64(r.Uint32())) + } + } + if r.Intn(10) != 0 { + v55 := r.Intn(10) + this.Field7 = make([]int32, v55) + for i := 0; i < v55; i++ { + this.Field7[i] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Field7[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v56 := r.Intn(10) + this.Field8 = make([]int64, v56) + for i := 0; i < v56; i++ { + this.Field8[i] = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Field8[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v57 := r.Intn(10) + this.Field9 = make([]uint32, v57) + for i := 0; i < v57; i++ { + this.Field9[i] = uint32(r.Uint32()) + } + } + if r.Intn(10) != 0 { + v58 := r.Intn(10) + this.Field10 = make([]int32, v58) + for i := 0; i < v58; i++ { + this.Field10[i] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Field10[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v59 := r.Intn(10) + this.Field11 = make([]uint64, v59) + for i := 0; i < v59; i++ { + this.Field11[i] = uint64(uint64(r.Uint32())) + } + } + if r.Intn(10) != 0 { + v60 := r.Intn(10) + this.Field12 = make([]int64, v60) + for i := 0; i < v60; i++ { + this.Field12[i] = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Field12[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v61 := r.Intn(10) + this.Field13 = make([]bool, v61) + for i := 0; i < v61; i++ { + this.Field13[i] = bool(bool(r.Intn(2) == 0)) + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 14) + } + return this +} + +func NewPopulatedNinRepPackedNative(r randyThetest, easy bool) *NinRepPackedNative { + this := &NinRepPackedNative{} + if r.Intn(10) != 0 { + v62 := r.Intn(10) + this.Field1 = make([]float64, v62) + for i := 0; i < v62; i++ { + this.Field1[i] = float64(r.Float64()) + if r.Intn(2) == 0 { + this.Field1[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v63 := r.Intn(10) + this.Field2 = make([]float32, v63) + for i := 0; i < v63; i++ { + this.Field2[i] = float32(r.Float32()) + if r.Intn(2) == 0 { + this.Field2[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v64 := r.Intn(10) + this.Field3 = make([]int32, v64) + for i := 0; i < v64; i++ { + this.Field3[i] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Field3[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v65 := r.Intn(10) + this.Field4 = make([]int64, v65) + for i := 0; i < v65; i++ { + this.Field4[i] = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Field4[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v66 := r.Intn(10) + this.Field5 = make([]uint32, v66) + for i := 0; i < v66; i++ { + this.Field5[i] = uint32(r.Uint32()) + } + } + if r.Intn(10) != 0 { + v67 := r.Intn(10) + this.Field6 = make([]uint64, v67) + for i := 0; i < v67; i++ { + this.Field6[i] = uint64(uint64(r.Uint32())) + } + } + if r.Intn(10) != 0 { + v68 := r.Intn(10) + this.Field7 = make([]int32, v68) + for i := 0; i < v68; i++ { + this.Field7[i] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Field7[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v69 := r.Intn(10) + this.Field8 = make([]int64, v69) + for i := 0; i < v69; i++ { + this.Field8[i] = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Field8[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v70 := r.Intn(10) + this.Field9 = make([]uint32, v70) + for i := 0; i < v70; i++ { + this.Field9[i] = uint32(r.Uint32()) + } + } + if r.Intn(10) != 0 { + v71 := r.Intn(10) + this.Field10 = make([]int32, v71) + for i := 0; i < v71; i++ { + this.Field10[i] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Field10[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v72 := r.Intn(10) + this.Field11 = make([]uint64, v72) + for i := 0; i < v72; i++ { + this.Field11[i] = uint64(uint64(r.Uint32())) + } + } + if r.Intn(10) != 0 { + v73 := r.Intn(10) + this.Field12 = make([]int64, v73) + for i := 0; i < v73; i++ { + this.Field12[i] = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Field12[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v74 := r.Intn(10) + this.Field13 = make([]bool, v74) + for i := 0; i < v74; i++ { + this.Field13[i] = bool(bool(r.Intn(2) == 0)) + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 14) + } + return this +} + +func NewPopulatedNidOptStruct(r randyThetest, easy bool) *NidOptStruct { + this := &NidOptStruct{} + this.Field1 = float64(r.Float64()) + if r.Intn(2) == 0 { + this.Field1 *= -1 + } + this.Field2 = float32(r.Float32()) + if r.Intn(2) == 0 { + this.Field2 *= -1 + } + v75 := NewPopulatedNidOptNative(r, easy) + this.Field3 = *v75 + v76 := NewPopulatedNinOptNative(r, easy) + this.Field4 = *v76 + this.Field6 = uint64(uint64(r.Uint32())) + this.Field7 = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Field7 *= -1 + } + v77 := NewPopulatedNidOptNative(r, easy) + this.Field8 = *v77 + this.Field13 = bool(bool(r.Intn(2) == 0)) + this.Field14 = randStringThetest(r) + v78 := r.Intn(100) + this.Field15 = make([]byte, v78) + for i := 0; i < v78; i++ { + this.Field15[i] = byte(r.Intn(256)) + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 16) + } + return this +} + +func NewPopulatedNinOptStruct(r randyThetest, easy bool) *NinOptStruct { + this := &NinOptStruct{} + if r.Intn(10) != 0 { + v79 := float64(r.Float64()) + if r.Intn(2) == 0 { + v79 *= -1 + } + this.Field1 = &v79 + } + if r.Intn(10) != 0 { + v80 := float32(r.Float32()) + if r.Intn(2) == 0 { + v80 *= -1 + } + this.Field2 = &v80 + } + if r.Intn(10) != 0 { + this.Field3 = NewPopulatedNidOptNative(r, easy) + } + if r.Intn(10) != 0 { + this.Field4 = NewPopulatedNinOptNative(r, easy) + } + if r.Intn(10) != 0 { + v81 := uint64(uint64(r.Uint32())) + this.Field6 = &v81 + } + if r.Intn(10) != 0 { + v82 := int32(r.Int31()) + if r.Intn(2) == 0 { + v82 *= -1 + } + this.Field7 = &v82 + } + if r.Intn(10) != 0 { + this.Field8 = NewPopulatedNidOptNative(r, easy) + } + if r.Intn(10) != 0 { + v83 := bool(bool(r.Intn(2) == 0)) + this.Field13 = &v83 + } + if r.Intn(10) != 0 { + v84 := randStringThetest(r) + this.Field14 = &v84 + } + if r.Intn(10) != 0 { + v85 := r.Intn(100) + this.Field15 = make([]byte, v85) + for i := 0; i < v85; i++ { + this.Field15[i] = byte(r.Intn(256)) + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 16) + } + return this +} + +func NewPopulatedNidRepStruct(r randyThetest, easy bool) *NidRepStruct { + this := &NidRepStruct{} + if r.Intn(10) != 0 { + v86 := r.Intn(10) + this.Field1 = make([]float64, v86) + for i := 0; i < v86; i++ { + this.Field1[i] = float64(r.Float64()) + if r.Intn(2) == 0 { + this.Field1[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v87 := r.Intn(10) + this.Field2 = make([]float32, v87) + for i := 0; i < v87; i++ { + this.Field2[i] = float32(r.Float32()) + if r.Intn(2) == 0 { + this.Field2[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v88 := r.Intn(5) + this.Field3 = make([]NidOptNative, v88) + for i := 0; i < v88; i++ { + v89 := NewPopulatedNidOptNative(r, easy) + this.Field3[i] = *v89 + } + } + if r.Intn(10) != 0 { + v90 := r.Intn(5) + this.Field4 = make([]NinOptNative, v90) + for i := 0; i < v90; i++ { + v91 := NewPopulatedNinOptNative(r, easy) + this.Field4[i] = *v91 + } + } + if r.Intn(10) != 0 { + v92 := r.Intn(10) + this.Field6 = make([]uint64, v92) + for i := 0; i < v92; i++ { + this.Field6[i] = uint64(uint64(r.Uint32())) + } + } + if r.Intn(10) != 0 { + v93 := r.Intn(10) + this.Field7 = make([]int32, v93) + for i := 0; i < v93; i++ { + this.Field7[i] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Field7[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v94 := r.Intn(5) + this.Field8 = make([]NidOptNative, v94) + for i := 0; i < v94; i++ { + v95 := NewPopulatedNidOptNative(r, easy) + this.Field8[i] = *v95 + } + } + if r.Intn(10) != 0 { + v96 := r.Intn(10) + this.Field13 = make([]bool, v96) + for i := 0; i < v96; i++ { + this.Field13[i] = bool(bool(r.Intn(2) == 0)) + } + } + if r.Intn(10) != 0 { + v97 := r.Intn(10) + this.Field14 = make([]string, v97) + for i := 0; i < v97; i++ { + this.Field14[i] = randStringThetest(r) + } + } + if r.Intn(10) != 0 { + v98 := r.Intn(10) + this.Field15 = make([][]byte, v98) + for i := 0; i < v98; i++ { + v99 := r.Intn(100) + this.Field15[i] = make([]byte, v99) + for j := 0; j < v99; j++ { + this.Field15[i][j] = byte(r.Intn(256)) + } + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 16) + } + return this +} + +func NewPopulatedNinRepStruct(r randyThetest, easy bool) *NinRepStruct { + this := &NinRepStruct{} + if r.Intn(10) != 0 { + v100 := r.Intn(10) + this.Field1 = make([]float64, v100) + for i := 0; i < v100; i++ { + this.Field1[i] = float64(r.Float64()) + if r.Intn(2) == 0 { + this.Field1[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v101 := r.Intn(10) + this.Field2 = make([]float32, v101) + for i := 0; i < v101; i++ { + this.Field2[i] = float32(r.Float32()) + if r.Intn(2) == 0 { + this.Field2[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v102 := r.Intn(5) + this.Field3 = make([]*NidOptNative, v102) + for i := 0; i < v102; i++ { + this.Field3[i] = NewPopulatedNidOptNative(r, easy) + } + } + if r.Intn(10) != 0 { + v103 := r.Intn(5) + this.Field4 = make([]*NinOptNative, v103) + for i := 0; i < v103; i++ { + this.Field4[i] = NewPopulatedNinOptNative(r, easy) + } + } + if r.Intn(10) != 0 { + v104 := r.Intn(10) + this.Field6 = make([]uint64, v104) + for i := 0; i < v104; i++ { + this.Field6[i] = uint64(uint64(r.Uint32())) + } + } + if r.Intn(10) != 0 { + v105 := r.Intn(10) + this.Field7 = make([]int32, v105) + for i := 0; i < v105; i++ { + this.Field7[i] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Field7[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v106 := r.Intn(5) + this.Field8 = make([]*NidOptNative, v106) + for i := 0; i < v106; i++ { + this.Field8[i] = NewPopulatedNidOptNative(r, easy) + } + } + if r.Intn(10) != 0 { + v107 := r.Intn(10) + this.Field13 = make([]bool, v107) + for i := 0; i < v107; i++ { + this.Field13[i] = bool(bool(r.Intn(2) == 0)) + } + } + if r.Intn(10) != 0 { + v108 := r.Intn(10) + this.Field14 = make([]string, v108) + for i := 0; i < v108; i++ { + this.Field14[i] = randStringThetest(r) + } + } + if r.Intn(10) != 0 { + v109 := r.Intn(10) + this.Field15 = make([][]byte, v109) + for i := 0; i < v109; i++ { + v110 := r.Intn(100) + this.Field15[i] = make([]byte, v110) + for j := 0; j < v110; j++ { + this.Field15[i][j] = byte(r.Intn(256)) + } + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 16) + } + return this +} + +func NewPopulatedNidEmbeddedStruct(r randyThetest, easy bool) *NidEmbeddedStruct { + this := &NidEmbeddedStruct{} + if r.Intn(10) != 0 { + this.NidOptNative = NewPopulatedNidOptNative(r, easy) + } + v111 := NewPopulatedNidOptNative(r, easy) + this.Field200 = *v111 + this.Field210 = bool(bool(r.Intn(2) == 0)) + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 211) + } + return this +} + +func NewPopulatedNinEmbeddedStruct(r randyThetest, easy bool) *NinEmbeddedStruct { + this := &NinEmbeddedStruct{} + if r.Intn(10) != 0 { + this.NidOptNative = NewPopulatedNidOptNative(r, easy) + } + if r.Intn(10) != 0 { + this.Field200 = NewPopulatedNidOptNative(r, easy) + } + if r.Intn(10) != 0 { + v112 := bool(bool(r.Intn(2) == 0)) + this.Field210 = &v112 + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 211) + } + return this +} + +func NewPopulatedNidNestedStruct(r randyThetest, easy bool) *NidNestedStruct { + this := &NidNestedStruct{} + v113 := NewPopulatedNidOptStruct(r, easy) + this.Field1 = *v113 + if r.Intn(10) != 0 { + v114 := r.Intn(5) + this.Field2 = make([]NidRepStruct, v114) + for i := 0; i < v114; i++ { + v115 := NewPopulatedNidRepStruct(r, easy) + this.Field2[i] = *v115 + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 3) + } + return this +} + +func NewPopulatedNinNestedStruct(r randyThetest, easy bool) *NinNestedStruct { + this := &NinNestedStruct{} + if r.Intn(10) != 0 { + this.Field1 = NewPopulatedNinOptStruct(r, easy) + } + if r.Intn(10) != 0 { + v116 := r.Intn(5) + this.Field2 = make([]*NinRepStruct, v116) + for i := 0; i < v116; i++ { + this.Field2[i] = NewPopulatedNinRepStruct(r, easy) + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 3) + } + return this +} + +func NewPopulatedNidOptCustom(r randyThetest, easy bool) *NidOptCustom { + this := &NidOptCustom{} + v117 := NewPopulatedUuid(r) + this.Id = *v117 + v118 := github_com_gogo_protobuf_test_custom.NewPopulatedUint128(r) + this.Value = *v118 + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 3) + } + return this +} + +func NewPopulatedCustomDash(r randyThetest, easy bool) *CustomDash { + this := &CustomDash{} + if r.Intn(10) != 0 { + this.Value = github_com_gogo_protobuf_test_custom_dash_type.NewPopulatedBytes(r) + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 2) + } + return this +} + +func NewPopulatedNinOptCustom(r randyThetest, easy bool) *NinOptCustom { + this := &NinOptCustom{} + if r.Intn(10) != 0 { + this.Id = NewPopulatedUuid(r) + } + if r.Intn(10) != 0 { + this.Value = github_com_gogo_protobuf_test_custom.NewPopulatedUint128(r) + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 3) + } + return this +} + +func NewPopulatedNidRepCustom(r randyThetest, easy bool) *NidRepCustom { + this := &NidRepCustom{} + if r.Intn(10) != 0 { + v119 := r.Intn(10) + this.Id = make([]Uuid, v119) + for i := 0; i < v119; i++ { + v120 := NewPopulatedUuid(r) + this.Id[i] = *v120 + } + } + if r.Intn(10) != 0 { + v121 := r.Intn(10) + this.Value = make([]github_com_gogo_protobuf_test_custom.Uint128, v121) + for i := 0; i < v121; i++ { + v122 := github_com_gogo_protobuf_test_custom.NewPopulatedUint128(r) + this.Value[i] = *v122 + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 3) + } + return this +} + +func NewPopulatedNinRepCustom(r randyThetest, easy bool) *NinRepCustom { + this := &NinRepCustom{} + if r.Intn(10) != 0 { + v123 := r.Intn(10) + this.Id = make([]Uuid, v123) + for i := 0; i < v123; i++ { + v124 := NewPopulatedUuid(r) + this.Id[i] = *v124 + } + } + if r.Intn(10) != 0 { + v125 := r.Intn(10) + this.Value = make([]github_com_gogo_protobuf_test_custom.Uint128, v125) + for i := 0; i < v125; i++ { + v126 := github_com_gogo_protobuf_test_custom.NewPopulatedUint128(r) + this.Value[i] = *v126 + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 3) + } + return this +} + +func NewPopulatedNinOptNativeUnion(r randyThetest, easy bool) *NinOptNativeUnion { + this := &NinOptNativeUnion{} + fieldNum := r.Intn(9) + switch fieldNum { + case 0: + v127 := float64(r.Float64()) + if r.Intn(2) == 0 { + v127 *= -1 + } + this.Field1 = &v127 + case 1: + v128 := float32(r.Float32()) + if r.Intn(2) == 0 { + v128 *= -1 + } + this.Field2 = &v128 + case 2: + v129 := int32(r.Int31()) + if r.Intn(2) == 0 { + v129 *= -1 + } + this.Field3 = &v129 + case 3: + v130 := int64(r.Int63()) + if r.Intn(2) == 0 { + v130 *= -1 + } + this.Field4 = &v130 + case 4: + v131 := uint32(r.Uint32()) + this.Field5 = &v131 + case 5: + v132 := uint64(uint64(r.Uint32())) + this.Field6 = &v132 + case 6: + v133 := bool(bool(r.Intn(2) == 0)) + this.Field13 = &v133 + case 7: + v134 := randStringThetest(r) + this.Field14 = &v134 + case 8: + v135 := r.Intn(100) + this.Field15 = make([]byte, v135) + for i := 0; i < v135; i++ { + this.Field15[i] = byte(r.Intn(256)) + } + } + return this +} + +func NewPopulatedNinOptStructUnion(r randyThetest, easy bool) *NinOptStructUnion { + this := &NinOptStructUnion{} + fieldNum := r.Intn(9) + switch fieldNum { + case 0: + v136 := float64(r.Float64()) + if r.Intn(2) == 0 { + v136 *= -1 + } + this.Field1 = &v136 + case 1: + v137 := float32(r.Float32()) + if r.Intn(2) == 0 { + v137 *= -1 + } + this.Field2 = &v137 + case 2: + this.Field3 = NewPopulatedNidOptNative(r, easy) + case 3: + this.Field4 = NewPopulatedNinOptNative(r, easy) + case 4: + v138 := uint64(uint64(r.Uint32())) + this.Field6 = &v138 + case 5: + v139 := int32(r.Int31()) + if r.Intn(2) == 0 { + v139 *= -1 + } + this.Field7 = &v139 + case 6: + v140 := bool(bool(r.Intn(2) == 0)) + this.Field13 = &v140 + case 7: + v141 := randStringThetest(r) + this.Field14 = &v141 + case 8: + v142 := r.Intn(100) + this.Field15 = make([]byte, v142) + for i := 0; i < v142; i++ { + this.Field15[i] = byte(r.Intn(256)) + } + } + return this +} + +func NewPopulatedNinEmbeddedStructUnion(r randyThetest, easy bool) *NinEmbeddedStructUnion { + this := &NinEmbeddedStructUnion{} + fieldNum := r.Intn(3) + switch fieldNum { + case 0: + this.NidOptNative = NewPopulatedNidOptNative(r, easy) + case 1: + this.Field200 = NewPopulatedNinOptNative(r, easy) + case 2: + v143 := bool(bool(r.Intn(2) == 0)) + this.Field210 = &v143 + } + return this +} + +func NewPopulatedNinNestedStructUnion(r randyThetest, easy bool) *NinNestedStructUnion { + this := &NinNestedStructUnion{} + fieldNum := r.Intn(3) + switch fieldNum { + case 0: + this.Field1 = NewPopulatedNinOptNativeUnion(r, easy) + case 1: + this.Field2 = NewPopulatedNinOptStructUnion(r, easy) + case 2: + this.Field3 = NewPopulatedNinEmbeddedStructUnion(r, easy) + } + return this +} + +func NewPopulatedTree(r randyThetest, easy bool) *Tree { + this := &Tree{} + fieldNum := r.Intn(102) + switch fieldNum { + case 0: + this.Or = NewPopulatedOrBranch(r, easy) + case 1: + this.And = NewPopulatedAndBranch(r, easy) + case 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101: + this.Leaf = NewPopulatedLeaf(r, easy) + } + return this +} + +func NewPopulatedOrBranch(r randyThetest, easy bool) *OrBranch { + this := &OrBranch{} + v144 := NewPopulatedTree(r, easy) + this.Left = *v144 + v145 := NewPopulatedTree(r, easy) + this.Right = *v145 + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 3) + } + return this +} + +func NewPopulatedAndBranch(r randyThetest, easy bool) *AndBranch { + this := &AndBranch{} + v146 := NewPopulatedTree(r, easy) + this.Left = *v146 + v147 := NewPopulatedTree(r, easy) + this.Right = *v147 + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 3) + } + return this +} + +func NewPopulatedLeaf(r randyThetest, easy bool) *Leaf { + this := &Leaf{} + this.Value = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Value *= -1 + } + this.StrValue = randStringThetest(r) + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 3) + } + return this +} + +func NewPopulatedDeepTree(r randyThetest, easy bool) *DeepTree { + this := &DeepTree{} + fieldNum := r.Intn(102) + switch fieldNum { + case 0: + this.Down = NewPopulatedADeepBranch(r, easy) + case 1: + this.And = NewPopulatedAndDeepBranch(r, easy) + case 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101: + this.Leaf = NewPopulatedDeepLeaf(r, easy) + } + return this +} + +func NewPopulatedADeepBranch(r randyThetest, easy bool) *ADeepBranch { + this := &ADeepBranch{} + v148 := NewPopulatedDeepTree(r, easy) + this.Down = *v148 + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 3) + } + return this +} + +func NewPopulatedAndDeepBranch(r randyThetest, easy bool) *AndDeepBranch { + this := &AndDeepBranch{} + v149 := NewPopulatedDeepTree(r, easy) + this.Left = *v149 + v150 := NewPopulatedDeepTree(r, easy) + this.Right = *v150 + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 3) + } + return this +} + +func NewPopulatedDeepLeaf(r randyThetest, easy bool) *DeepLeaf { + this := &DeepLeaf{} + v151 := NewPopulatedTree(r, easy) + this.Tree = *v151 + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 2) + } + return this +} + +func NewPopulatedNil(r randyThetest, easy bool) *Nil { + this := &Nil{} + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 1) + } + return this +} + +func NewPopulatedNidOptEnum(r randyThetest, easy bool) *NidOptEnum { + this := &NidOptEnum{} + this.Field1 = TheTestEnum([]int32{0, 1, 2}[r.Intn(3)]) + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 2) + } + return this +} + +func NewPopulatedNinOptEnum(r randyThetest, easy bool) *NinOptEnum { + this := &NinOptEnum{} + if r.Intn(10) != 0 { + v152 := TheTestEnum([]int32{0, 1, 2}[r.Intn(3)]) + this.Field1 = &v152 + } + if r.Intn(10) != 0 { + v153 := YetAnotherTestEnum([]int32{0, 1}[r.Intn(2)]) + this.Field2 = &v153 + } + if r.Intn(10) != 0 { + v154 := YetYetAnotherTestEnum([]int32{0, 1}[r.Intn(2)]) + this.Field3 = &v154 + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 4) + } + return this +} + +func NewPopulatedNidRepEnum(r randyThetest, easy bool) *NidRepEnum { + this := &NidRepEnum{} + if r.Intn(10) != 0 { + v155 := r.Intn(10) + this.Field1 = make([]TheTestEnum, v155) + for i := 0; i < v155; i++ { + this.Field1[i] = TheTestEnum([]int32{0, 1, 2}[r.Intn(3)]) + } + } + if r.Intn(10) != 0 { + v156 := r.Intn(10) + this.Field2 = make([]YetAnotherTestEnum, v156) + for i := 0; i < v156; i++ { + this.Field2[i] = YetAnotherTestEnum([]int32{0, 1}[r.Intn(2)]) + } + } + if r.Intn(10) != 0 { + v157 := r.Intn(10) + this.Field3 = make([]YetYetAnotherTestEnum, v157) + for i := 0; i < v157; i++ { + this.Field3[i] = YetYetAnotherTestEnum([]int32{0, 1}[r.Intn(2)]) + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 4) + } + return this +} + +func NewPopulatedNinRepEnum(r randyThetest, easy bool) *NinRepEnum { + this := &NinRepEnum{} + if r.Intn(10) != 0 { + v158 := r.Intn(10) + this.Field1 = make([]TheTestEnum, v158) + for i := 0; i < v158; i++ { + this.Field1[i] = TheTestEnum([]int32{0, 1, 2}[r.Intn(3)]) + } + } + if r.Intn(10) != 0 { + v159 := r.Intn(10) + this.Field2 = make([]YetAnotherTestEnum, v159) + for i := 0; i < v159; i++ { + this.Field2[i] = YetAnotherTestEnum([]int32{0, 1}[r.Intn(2)]) + } + } + if r.Intn(10) != 0 { + v160 := r.Intn(10) + this.Field3 = make([]YetYetAnotherTestEnum, v160) + for i := 0; i < v160; i++ { + this.Field3[i] = YetYetAnotherTestEnum([]int32{0, 1}[r.Intn(2)]) + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 4) + } + return this +} + +func NewPopulatedNinOptEnumDefault(r randyThetest, easy bool) *NinOptEnumDefault { + this := &NinOptEnumDefault{} + if r.Intn(10) != 0 { + v161 := TheTestEnum([]int32{0, 1, 2}[r.Intn(3)]) + this.Field1 = &v161 + } + if r.Intn(10) != 0 { + v162 := YetAnotherTestEnum([]int32{0, 1}[r.Intn(2)]) + this.Field2 = &v162 + } + if r.Intn(10) != 0 { + v163 := YetYetAnotherTestEnum([]int32{0, 1}[r.Intn(2)]) + this.Field3 = &v163 + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 4) + } + return this +} + +func NewPopulatedAnotherNinOptEnum(r randyThetest, easy bool) *AnotherNinOptEnum { + this := &AnotherNinOptEnum{} + if r.Intn(10) != 0 { + v164 := AnotherTestEnum([]int32{10, 11}[r.Intn(2)]) + this.Field1 = &v164 + } + if r.Intn(10) != 0 { + v165 := YetAnotherTestEnum([]int32{0, 1}[r.Intn(2)]) + this.Field2 = &v165 + } + if r.Intn(10) != 0 { + v166 := YetYetAnotherTestEnum([]int32{0, 1}[r.Intn(2)]) + this.Field3 = &v166 + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 4) + } + return this +} + +func NewPopulatedAnotherNinOptEnumDefault(r randyThetest, easy bool) *AnotherNinOptEnumDefault { + this := &AnotherNinOptEnumDefault{} + if r.Intn(10) != 0 { + v167 := AnotherTestEnum([]int32{10, 11}[r.Intn(2)]) + this.Field1 = &v167 + } + if r.Intn(10) != 0 { + v168 := YetAnotherTestEnum([]int32{0, 1}[r.Intn(2)]) + this.Field2 = &v168 + } + if r.Intn(10) != 0 { + v169 := YetYetAnotherTestEnum([]int32{0, 1}[r.Intn(2)]) + this.Field3 = &v169 + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 4) + } + return this +} + +func NewPopulatedTimer(r randyThetest, easy bool) *Timer { + this := &Timer{} + this.Time1 = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Time1 *= -1 + } + this.Time2 = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Time2 *= -1 + } + v170 := r.Intn(100) + this.Data = make([]byte, v170) + for i := 0; i < v170; i++ { + this.Data[i] = byte(r.Intn(256)) + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 4) + } + return this +} + +func NewPopulatedMyExtendable(r randyThetest, easy bool) *MyExtendable { + this := &MyExtendable{} + if r.Intn(10) != 0 { + v171 := int64(r.Int63()) + if r.Intn(2) == 0 { + v171 *= -1 + } + this.Field1 = &v171 + } + if !easy && r.Intn(10) != 0 { + l := r.Intn(5) + for i := 0; i < l; i++ { + fieldNumber := r.Intn(100) + 100 + wire := r.Intn(4) + if wire == 3 { + wire = 5 + } + data := randFieldThetest(nil, r, fieldNumber, wire) + github_com_gogo_protobuf_proto.SetRawExtension(this, int32(fieldNumber), data) + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 201) + } + return this +} + +func NewPopulatedOtherExtenable(r randyThetest, easy bool) *OtherExtenable { + this := &OtherExtenable{} + if r.Intn(10) != 0 { + v172 := int64(r.Int63()) + if r.Intn(2) == 0 { + v172 *= -1 + } + this.Field2 = &v172 + } + if r.Intn(10) != 0 { + v173 := int64(r.Int63()) + if r.Intn(2) == 0 { + v173 *= -1 + } + this.Field13 = &v173 + } + if r.Intn(10) != 0 { + this.M = NewPopulatedMyExtendable(r, easy) + } + if !easy && r.Intn(10) != 0 { + l := r.Intn(5) + for i := 0; i < l; i++ { + eIndex := r.Intn(2) + fieldNumber := 0 + switch eIndex { + case 0: + fieldNumber = r.Intn(3) + 14 + case 1: + fieldNumber = r.Intn(3) + 10 + } + wire := r.Intn(4) + if wire == 3 { + wire = 5 + } + data := randFieldThetest(nil, r, fieldNumber, wire) + github_com_gogo_protobuf_proto.SetRawExtension(this, int32(fieldNumber), data) + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 18) + } + return this +} + +func NewPopulatedNestedDefinition(r randyThetest, easy bool) *NestedDefinition { + this := &NestedDefinition{} + if r.Intn(10) != 0 { + v174 := int64(r.Int63()) + if r.Intn(2) == 0 { + v174 *= -1 + } + this.Field1 = &v174 + } + if r.Intn(10) != 0 { + v175 := NestedDefinition_NestedEnum([]int32{1}[r.Intn(1)]) + this.EnumField = &v175 + } + if r.Intn(10) != 0 { + this.NNM = NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(r, easy) + } + if r.Intn(10) != 0 { + this.NM = NewPopulatedNestedDefinition_NestedMessage(r, easy) + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 5) + } + return this +} + +func NewPopulatedNestedDefinition_NestedMessage(r randyThetest, easy bool) *NestedDefinition_NestedMessage { + this := &NestedDefinition_NestedMessage{} + if r.Intn(10) != 0 { + v176 := uint64(uint64(r.Uint32())) + this.NestedField1 = &v176 + } + if r.Intn(10) != 0 { + this.NNM = NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(r, easy) + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 3) + } + return this +} + +func NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(r randyThetest, easy bool) *NestedDefinition_NestedMessage_NestedNestedMsg { + this := &NestedDefinition_NestedMessage_NestedNestedMsg{} + if r.Intn(10) != 0 { + v177 := randStringThetest(r) + this.NestedNestedField1 = &v177 + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 11) + } + return this +} + +func NewPopulatedNestedScope(r randyThetest, easy bool) *NestedScope { + this := &NestedScope{} + if r.Intn(10) != 0 { + this.A = NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(r, easy) + } + if r.Intn(10) != 0 { + v178 := NestedDefinition_NestedEnum([]int32{1}[r.Intn(1)]) + this.B = &v178 + } + if r.Intn(10) != 0 { + this.C = NewPopulatedNestedDefinition_NestedMessage(r, easy) + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 4) + } + return this +} + +func NewPopulatedNinOptNativeDefault(r randyThetest, easy bool) *NinOptNativeDefault { + this := &NinOptNativeDefault{} + if r.Intn(10) != 0 { + v179 := float64(r.Float64()) + if r.Intn(2) == 0 { + v179 *= -1 + } + this.Field1 = &v179 + } + if r.Intn(10) != 0 { + v180 := float32(r.Float32()) + if r.Intn(2) == 0 { + v180 *= -1 + } + this.Field2 = &v180 + } + if r.Intn(10) != 0 { + v181 := int32(r.Int31()) + if r.Intn(2) == 0 { + v181 *= -1 + } + this.Field3 = &v181 + } + if r.Intn(10) != 0 { + v182 := int64(r.Int63()) + if r.Intn(2) == 0 { + v182 *= -1 + } + this.Field4 = &v182 + } + if r.Intn(10) != 0 { + v183 := uint32(r.Uint32()) + this.Field5 = &v183 + } + if r.Intn(10) != 0 { + v184 := uint64(uint64(r.Uint32())) + this.Field6 = &v184 + } + if r.Intn(10) != 0 { + v185 := int32(r.Int31()) + if r.Intn(2) == 0 { + v185 *= -1 + } + this.Field7 = &v185 + } + if r.Intn(10) != 0 { + v186 := int64(r.Int63()) + if r.Intn(2) == 0 { + v186 *= -1 + } + this.Field8 = &v186 + } + if r.Intn(10) != 0 { + v187 := uint32(r.Uint32()) + this.Field9 = &v187 + } + if r.Intn(10) != 0 { + v188 := int32(r.Int31()) + if r.Intn(2) == 0 { + v188 *= -1 + } + this.Field10 = &v188 + } + if r.Intn(10) != 0 { + v189 := uint64(uint64(r.Uint32())) + this.Field11 = &v189 + } + if r.Intn(10) != 0 { + v190 := int64(r.Int63()) + if r.Intn(2) == 0 { + v190 *= -1 + } + this.Field12 = &v190 + } + if r.Intn(10) != 0 { + v191 := bool(bool(r.Intn(2) == 0)) + this.Field13 = &v191 + } + if r.Intn(10) != 0 { + v192 := randStringThetest(r) + this.Field14 = &v192 + } + if r.Intn(10) != 0 { + v193 := r.Intn(100) + this.Field15 = make([]byte, v193) + for i := 0; i < v193; i++ { + this.Field15[i] = byte(r.Intn(256)) + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 16) + } + return this +} + +func NewPopulatedCustomContainer(r randyThetest, easy bool) *CustomContainer { + this := &CustomContainer{} + v194 := NewPopulatedNidOptCustom(r, easy) + this.CustomStruct = *v194 + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 2) + } + return this +} + +func NewPopulatedCustomNameNidOptNative(r randyThetest, easy bool) *CustomNameNidOptNative { + this := &CustomNameNidOptNative{} + this.FieldA = float64(r.Float64()) + if r.Intn(2) == 0 { + this.FieldA *= -1 + } + this.FieldB = float32(r.Float32()) + if r.Intn(2) == 0 { + this.FieldB *= -1 + } + this.FieldC = int32(r.Int31()) + if r.Intn(2) == 0 { + this.FieldC *= -1 + } + this.FieldD = int64(r.Int63()) + if r.Intn(2) == 0 { + this.FieldD *= -1 + } + this.FieldE = uint32(r.Uint32()) + this.FieldF = uint64(uint64(r.Uint32())) + this.FieldG = int32(r.Int31()) + if r.Intn(2) == 0 { + this.FieldG *= -1 + } + this.FieldH = int64(r.Int63()) + if r.Intn(2) == 0 { + this.FieldH *= -1 + } + this.FieldI = uint32(r.Uint32()) + this.FieldJ = int32(r.Int31()) + if r.Intn(2) == 0 { + this.FieldJ *= -1 + } + this.FieldK = uint64(uint64(r.Uint32())) + this.FieldL = int64(r.Int63()) + if r.Intn(2) == 0 { + this.FieldL *= -1 + } + this.FieldM = bool(bool(r.Intn(2) == 0)) + this.FieldN = randStringThetest(r) + v195 := r.Intn(100) + this.FieldO = make([]byte, v195) + for i := 0; i < v195; i++ { + this.FieldO[i] = byte(r.Intn(256)) + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 16) + } + return this +} + +func NewPopulatedCustomNameNinOptNative(r randyThetest, easy bool) *CustomNameNinOptNative { + this := &CustomNameNinOptNative{} + if r.Intn(10) != 0 { + v196 := float64(r.Float64()) + if r.Intn(2) == 0 { + v196 *= -1 + } + this.FieldA = &v196 + } + if r.Intn(10) != 0 { + v197 := float32(r.Float32()) + if r.Intn(2) == 0 { + v197 *= -1 + } + this.FieldB = &v197 + } + if r.Intn(10) != 0 { + v198 := int32(r.Int31()) + if r.Intn(2) == 0 { + v198 *= -1 + } + this.FieldC = &v198 + } + if r.Intn(10) != 0 { + v199 := int64(r.Int63()) + if r.Intn(2) == 0 { + v199 *= -1 + } + this.FieldD = &v199 + } + if r.Intn(10) != 0 { + v200 := uint32(r.Uint32()) + this.FieldE = &v200 + } + if r.Intn(10) != 0 { + v201 := uint64(uint64(r.Uint32())) + this.FieldF = &v201 + } + if r.Intn(10) != 0 { + v202 := int32(r.Int31()) + if r.Intn(2) == 0 { + v202 *= -1 + } + this.FieldG = &v202 + } + if r.Intn(10) != 0 { + v203 := int64(r.Int63()) + if r.Intn(2) == 0 { + v203 *= -1 + } + this.FieldH = &v203 + } + if r.Intn(10) != 0 { + v204 := uint32(r.Uint32()) + this.FieldI = &v204 + } + if r.Intn(10) != 0 { + v205 := int32(r.Int31()) + if r.Intn(2) == 0 { + v205 *= -1 + } + this.FieldJ = &v205 + } + if r.Intn(10) != 0 { + v206 := uint64(uint64(r.Uint32())) + this.FieldK = &v206 + } + if r.Intn(10) != 0 { + v207 := int64(r.Int63()) + if r.Intn(2) == 0 { + v207 *= -1 + } + this.FielL = &v207 + } + if r.Intn(10) != 0 { + v208 := bool(bool(r.Intn(2) == 0)) + this.FieldM = &v208 + } + if r.Intn(10) != 0 { + v209 := randStringThetest(r) + this.FieldN = &v209 + } + if r.Intn(10) != 0 { + v210 := r.Intn(100) + this.FieldO = make([]byte, v210) + for i := 0; i < v210; i++ { + this.FieldO[i] = byte(r.Intn(256)) + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 16) + } + return this +} + +func NewPopulatedCustomNameNinRepNative(r randyThetest, easy bool) *CustomNameNinRepNative { + this := &CustomNameNinRepNative{} + if r.Intn(10) != 0 { + v211 := r.Intn(10) + this.FieldA = make([]float64, v211) + for i := 0; i < v211; i++ { + this.FieldA[i] = float64(r.Float64()) + if r.Intn(2) == 0 { + this.FieldA[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v212 := r.Intn(10) + this.FieldB = make([]float32, v212) + for i := 0; i < v212; i++ { + this.FieldB[i] = float32(r.Float32()) + if r.Intn(2) == 0 { + this.FieldB[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v213 := r.Intn(10) + this.FieldC = make([]int32, v213) + for i := 0; i < v213; i++ { + this.FieldC[i] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.FieldC[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v214 := r.Intn(10) + this.FieldD = make([]int64, v214) + for i := 0; i < v214; i++ { + this.FieldD[i] = int64(r.Int63()) + if r.Intn(2) == 0 { + this.FieldD[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v215 := r.Intn(10) + this.FieldE = make([]uint32, v215) + for i := 0; i < v215; i++ { + this.FieldE[i] = uint32(r.Uint32()) + } + } + if r.Intn(10) != 0 { + v216 := r.Intn(10) + this.FieldF = make([]uint64, v216) + for i := 0; i < v216; i++ { + this.FieldF[i] = uint64(uint64(r.Uint32())) + } + } + if r.Intn(10) != 0 { + v217 := r.Intn(10) + this.FieldG = make([]int32, v217) + for i := 0; i < v217; i++ { + this.FieldG[i] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.FieldG[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v218 := r.Intn(10) + this.FieldH = make([]int64, v218) + for i := 0; i < v218; i++ { + this.FieldH[i] = int64(r.Int63()) + if r.Intn(2) == 0 { + this.FieldH[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v219 := r.Intn(10) + this.FieldI = make([]uint32, v219) + for i := 0; i < v219; i++ { + this.FieldI[i] = uint32(r.Uint32()) + } + } + if r.Intn(10) != 0 { + v220 := r.Intn(10) + this.FieldJ = make([]int32, v220) + for i := 0; i < v220; i++ { + this.FieldJ[i] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.FieldJ[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v221 := r.Intn(10) + this.FieldK = make([]uint64, v221) + for i := 0; i < v221; i++ { + this.FieldK[i] = uint64(uint64(r.Uint32())) + } + } + if r.Intn(10) != 0 { + v222 := r.Intn(10) + this.FieldL = make([]int64, v222) + for i := 0; i < v222; i++ { + this.FieldL[i] = int64(r.Int63()) + if r.Intn(2) == 0 { + this.FieldL[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v223 := r.Intn(10) + this.FieldM = make([]bool, v223) + for i := 0; i < v223; i++ { + this.FieldM[i] = bool(bool(r.Intn(2) == 0)) + } + } + if r.Intn(10) != 0 { + v224 := r.Intn(10) + this.FieldN = make([]string, v224) + for i := 0; i < v224; i++ { + this.FieldN[i] = randStringThetest(r) + } + } + if r.Intn(10) != 0 { + v225 := r.Intn(10) + this.FieldO = make([][]byte, v225) + for i := 0; i < v225; i++ { + v226 := r.Intn(100) + this.FieldO[i] = make([]byte, v226) + for j := 0; j < v226; j++ { + this.FieldO[i][j] = byte(r.Intn(256)) + } + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 16) + } + return this +} + +func NewPopulatedCustomNameNinStruct(r randyThetest, easy bool) *CustomNameNinStruct { + this := &CustomNameNinStruct{} + if r.Intn(10) != 0 { + v227 := float64(r.Float64()) + if r.Intn(2) == 0 { + v227 *= -1 + } + this.FieldA = &v227 + } + if r.Intn(10) != 0 { + v228 := float32(r.Float32()) + if r.Intn(2) == 0 { + v228 *= -1 + } + this.FieldB = &v228 + } + if r.Intn(10) != 0 { + this.FieldC = NewPopulatedNidOptNative(r, easy) + } + if r.Intn(10) != 0 { + v229 := r.Intn(5) + this.FieldD = make([]*NinOptNative, v229) + for i := 0; i < v229; i++ { + this.FieldD[i] = NewPopulatedNinOptNative(r, easy) + } + } + if r.Intn(10) != 0 { + v230 := uint64(uint64(r.Uint32())) + this.FieldE = &v230 + } + if r.Intn(10) != 0 { + v231 := int32(r.Int31()) + if r.Intn(2) == 0 { + v231 *= -1 + } + this.FieldF = &v231 + } + if r.Intn(10) != 0 { + this.FieldG = NewPopulatedNidOptNative(r, easy) + } + if r.Intn(10) != 0 { + v232 := bool(bool(r.Intn(2) == 0)) + this.FieldH = &v232 + } + if r.Intn(10) != 0 { + v233 := randStringThetest(r) + this.FieldI = &v233 + } + if r.Intn(10) != 0 { + v234 := r.Intn(100) + this.FieldJ = make([]byte, v234) + for i := 0; i < v234; i++ { + this.FieldJ[i] = byte(r.Intn(256)) + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 16) + } + return this +} + +func NewPopulatedCustomNameCustomType(r randyThetest, easy bool) *CustomNameCustomType { + this := &CustomNameCustomType{} + if r.Intn(10) != 0 { + this.FieldA = NewPopulatedUuid(r) + } + if r.Intn(10) != 0 { + this.FieldB = github_com_gogo_protobuf_test_custom.NewPopulatedUint128(r) + } + if r.Intn(10) != 0 { + v235 := r.Intn(10) + this.FieldC = make([]Uuid, v235) + for i := 0; i < v235; i++ { + v236 := NewPopulatedUuid(r) + this.FieldC[i] = *v236 + } + } + if r.Intn(10) != 0 { + v237 := r.Intn(10) + this.FieldD = make([]github_com_gogo_protobuf_test_custom.Uint128, v237) + for i := 0; i < v237; i++ { + v238 := github_com_gogo_protobuf_test_custom.NewPopulatedUint128(r) + this.FieldD[i] = *v238 + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 5) + } + return this +} + +func NewPopulatedCustomNameNinEmbeddedStructUnion(r randyThetest, easy bool) *CustomNameNinEmbeddedStructUnion { + this := &CustomNameNinEmbeddedStructUnion{} + fieldNum := r.Intn(3) + switch fieldNum { + case 0: + this.NidOptNative = NewPopulatedNidOptNative(r, easy) + case 1: + this.FieldA = NewPopulatedNinOptNative(r, easy) + case 2: + v239 := bool(bool(r.Intn(2) == 0)) + this.FieldB = &v239 + } + return this +} + +func NewPopulatedCustomNameEnum(r randyThetest, easy bool) *CustomNameEnum { + this := &CustomNameEnum{} + if r.Intn(10) != 0 { + v240 := TheTestEnum([]int32{0, 1, 2}[r.Intn(3)]) + this.FieldA = &v240 + } + if r.Intn(10) != 0 { + v241 := r.Intn(10) + this.FieldB = make([]TheTestEnum, v241) + for i := 0; i < v241; i++ { + this.FieldB[i] = TheTestEnum([]int32{0, 1, 2}[r.Intn(3)]) + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 3) + } + return this +} + +func NewPopulatedNoExtensionsMap(r randyThetest, easy bool) *NoExtensionsMap { + this := &NoExtensionsMap{} + if r.Intn(10) != 0 { + v242 := int64(r.Int63()) + if r.Intn(2) == 0 { + v242 *= -1 + } + this.Field1 = &v242 + } + if !easy && r.Intn(10) != 0 { + l := r.Intn(5) + for i := 0; i < l; i++ { + fieldNumber := r.Intn(100) + 100 + wire := r.Intn(4) + if wire == 3 { + wire = 5 + } + data := randFieldThetest(nil, r, fieldNumber, wire) + github_com_gogo_protobuf_proto.SetRawExtension(this, int32(fieldNumber), data) + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 201) + } + return this +} + +func NewPopulatedUnrecognized(r randyThetest, easy bool) *Unrecognized { + this := &Unrecognized{} + if r.Intn(10) != 0 { + v243 := randStringThetest(r) + this.Field1 = &v243 + } + if !easy && r.Intn(10) != 0 { + } + return this +} + +func NewPopulatedUnrecognizedWithInner(r randyThetest, easy bool) *UnrecognizedWithInner { + this := &UnrecognizedWithInner{} + if r.Intn(10) != 0 { + v244 := r.Intn(5) + this.Embedded = make([]*UnrecognizedWithInner_Inner, v244) + for i := 0; i < v244; i++ { + this.Embedded[i] = NewPopulatedUnrecognizedWithInner_Inner(r, easy) + } + } + if r.Intn(10) != 0 { + v245 := randStringThetest(r) + this.Field2 = &v245 + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 3) + } + return this +} + +func NewPopulatedUnrecognizedWithInner_Inner(r randyThetest, easy bool) *UnrecognizedWithInner_Inner { + this := &UnrecognizedWithInner_Inner{} + if r.Intn(10) != 0 { + v246 := uint32(r.Uint32()) + this.Field1 = &v246 + } + if !easy && r.Intn(10) != 0 { + } + return this +} + +func NewPopulatedUnrecognizedWithEmbed(r randyThetest, easy bool) *UnrecognizedWithEmbed { + this := &UnrecognizedWithEmbed{} + v247 := NewPopulatedUnrecognizedWithEmbed_Embedded(r, easy) + this.UnrecognizedWithEmbed_Embedded = *v247 + if r.Intn(10) != 0 { + v248 := randStringThetest(r) + this.Field2 = &v248 + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 3) + } + return this +} + +func NewPopulatedUnrecognizedWithEmbed_Embedded(r randyThetest, easy bool) *UnrecognizedWithEmbed_Embedded { + this := &UnrecognizedWithEmbed_Embedded{} + if r.Intn(10) != 0 { + v249 := uint32(r.Uint32()) + this.Field1 = &v249 + } + if !easy && r.Intn(10) != 0 { + } + return this +} + +func NewPopulatedNode(r randyThetest, easy bool) *Node { + this := &Node{} + if r.Intn(10) != 0 { + v250 := randStringThetest(r) + this.Label = &v250 + } + if r.Intn(10) == 0 { + v251 := r.Intn(5) + this.Children = make([]*Node, v251) + for i := 0; i < v251; i++ { + this.Children[i] = NewPopulatedNode(r, easy) + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 3) + } + return this +} + +type randyThetest interface { + Float32() float32 + Float64() float64 + Int63() int64 + Int31() int32 + Uint32() uint32 + Intn(n int) int +} + +func randUTF8RuneThetest(r randyThetest) 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 randStringThetest(r randyThetest) string { + v252 := r.Intn(100) + tmps := make([]rune, v252) + for i := 0; i < v252; i++ { + tmps[i] = randUTF8RuneThetest(r) + } + return string(tmps) +} +func randUnrecognizedThetest(r randyThetest, 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 = randFieldThetest(data, r, fieldNumber, wire) + } + return data +} +func randFieldThetest(data []byte, r randyThetest, fieldNumber int, wire int) []byte { + key := uint32(fieldNumber)<<3 | uint32(wire) + switch wire { + case 0: + data = encodeVarintPopulateThetest(data, uint64(key)) + v253 := r.Int63() + if r.Intn(2) == 0 { + v253 *= -1 + } + data = encodeVarintPopulateThetest(data, uint64(v253)) + case 1: + data = encodeVarintPopulateThetest(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 = encodeVarintPopulateThetest(data, uint64(key)) + ll := r.Intn(100) + data = encodeVarintPopulateThetest(data, uint64(ll)) + for j := 0; j < ll; j++ { + data = append(data, byte(r.Intn(256))) + } + default: + data = encodeVarintPopulateThetest(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 encodeVarintPopulateThetest(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 *NidOptNative) Size() (n int) { + var l int + _ = l + n += 9 + n += 5 + n += 1 + sovThetest(uint64(m.Field3)) + n += 1 + sovThetest(uint64(m.Field4)) + n += 1 + sovThetest(uint64(m.Field5)) + n += 1 + sovThetest(uint64(m.Field6)) + n += 1 + sozThetest(uint64(m.Field7)) + n += 1 + sozThetest(uint64(m.Field8)) + n += 5 + n += 5 + n += 9 + n += 9 + n += 2 + l = len(m.Field14) + n += 1 + l + sovThetest(uint64(l)) + if m.Field15 != nil { + l = len(m.Field15) + n += 1 + l + sovThetest(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NinOptNative) Size() (n int) { + var l int + _ = l + if m.Field1 != nil { + n += 9 + } + if m.Field2 != nil { + n += 5 + } + if m.Field3 != nil { + n += 1 + sovThetest(uint64(*m.Field3)) + } + if m.Field4 != nil { + n += 1 + sovThetest(uint64(*m.Field4)) + } + if m.Field5 != nil { + n += 1 + sovThetest(uint64(*m.Field5)) + } + if m.Field6 != nil { + n += 1 + sovThetest(uint64(*m.Field6)) + } + if m.Field7 != nil { + n += 1 + sozThetest(uint64(*m.Field7)) + } + if m.Field8 != nil { + n += 1 + sozThetest(uint64(*m.Field8)) + } + if m.Field9 != nil { + n += 5 + } + if m.Field10 != nil { + n += 5 + } + if m.Field11 != nil { + n += 9 + } + if m.Field12 != nil { + n += 9 + } + if m.Field13 != nil { + n += 2 + } + if m.Field14 != nil { + l = len(*m.Field14) + n += 1 + l + sovThetest(uint64(l)) + } + if m.Field15 != nil { + l = len(m.Field15) + n += 1 + l + sovThetest(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NidRepNative) Size() (n int) { + var l int + _ = l + if len(m.Field1) > 0 { + n += 9 * len(m.Field1) + } + if len(m.Field2) > 0 { + n += 5 * len(m.Field2) + } + if len(m.Field3) > 0 { + for _, e := range m.Field3 { + n += 1 + sovThetest(uint64(e)) + } + } + if len(m.Field4) > 0 { + for _, e := range m.Field4 { + n += 1 + sovThetest(uint64(e)) + } + } + if len(m.Field5) > 0 { + for _, e := range m.Field5 { + n += 1 + sovThetest(uint64(e)) + } + } + if len(m.Field6) > 0 { + for _, e := range m.Field6 { + n += 1 + sovThetest(uint64(e)) + } + } + if len(m.Field7) > 0 { + for _, e := range m.Field7 { + n += 1 + sozThetest(uint64(e)) + } + } + if len(m.Field8) > 0 { + for _, e := range m.Field8 { + n += 1 + sozThetest(uint64(e)) + } + } + if len(m.Field9) > 0 { + n += 5 * len(m.Field9) + } + if len(m.Field10) > 0 { + n += 5 * len(m.Field10) + } + if len(m.Field11) > 0 { + n += 9 * len(m.Field11) + } + if len(m.Field12) > 0 { + n += 9 * len(m.Field12) + } + if len(m.Field13) > 0 { + n += 2 * len(m.Field13) + } + if len(m.Field14) > 0 { + for _, s := range m.Field14 { + l = len(s) + n += 1 + l + sovThetest(uint64(l)) + } + } + if len(m.Field15) > 0 { + for _, b := range m.Field15 { + l = len(b) + n += 1 + l + sovThetest(uint64(l)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NinRepNative) Size() (n int) { + var l int + _ = l + if len(m.Field1) > 0 { + n += 9 * len(m.Field1) + } + if len(m.Field2) > 0 { + n += 5 * len(m.Field2) + } + if len(m.Field3) > 0 { + for _, e := range m.Field3 { + n += 1 + sovThetest(uint64(e)) + } + } + if len(m.Field4) > 0 { + for _, e := range m.Field4 { + n += 1 + sovThetest(uint64(e)) + } + } + if len(m.Field5) > 0 { + for _, e := range m.Field5 { + n += 1 + sovThetest(uint64(e)) + } + } + if len(m.Field6) > 0 { + for _, e := range m.Field6 { + n += 1 + sovThetest(uint64(e)) + } + } + if len(m.Field7) > 0 { + for _, e := range m.Field7 { + n += 1 + sozThetest(uint64(e)) + } + } + if len(m.Field8) > 0 { + for _, e := range m.Field8 { + n += 1 + sozThetest(uint64(e)) + } + } + if len(m.Field9) > 0 { + n += 5 * len(m.Field9) + } + if len(m.Field10) > 0 { + n += 5 * len(m.Field10) + } + if len(m.Field11) > 0 { + n += 9 * len(m.Field11) + } + if len(m.Field12) > 0 { + n += 9 * len(m.Field12) + } + if len(m.Field13) > 0 { + n += 2 * len(m.Field13) + } + if len(m.Field14) > 0 { + for _, s := range m.Field14 { + l = len(s) + n += 1 + l + sovThetest(uint64(l)) + } + } + if len(m.Field15) > 0 { + for _, b := range m.Field15 { + l = len(b) + n += 1 + l + sovThetest(uint64(l)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NidRepPackedNative) Size() (n int) { + var l int + _ = l + if len(m.Field1) > 0 { + n += 1 + sovThetest(uint64(len(m.Field1)*8)) + len(m.Field1)*8 + } + if len(m.Field2) > 0 { + n += 1 + sovThetest(uint64(len(m.Field2)*4)) + len(m.Field2)*4 + } + if len(m.Field3) > 0 { + l = 0 + for _, e := range m.Field3 { + l += sovThetest(uint64(e)) + } + n += 1 + sovThetest(uint64(l)) + l + } + if len(m.Field4) > 0 { + l = 0 + for _, e := range m.Field4 { + l += sovThetest(uint64(e)) + } + n += 1 + sovThetest(uint64(l)) + l + } + if len(m.Field5) > 0 { + l = 0 + for _, e := range m.Field5 { + l += sovThetest(uint64(e)) + } + n += 1 + sovThetest(uint64(l)) + l + } + if len(m.Field6) > 0 { + l = 0 + for _, e := range m.Field6 { + l += sovThetest(uint64(e)) + } + n += 1 + sovThetest(uint64(l)) + l + } + if len(m.Field7) > 0 { + l = 0 + for _, e := range m.Field7 { + l += sozThetest(uint64(e)) + } + n += 1 + sovThetest(uint64(l)) + l + } + if len(m.Field8) > 0 { + l = 0 + for _, e := range m.Field8 { + l += sozThetest(uint64(e)) + } + n += 1 + sovThetest(uint64(l)) + l + } + if len(m.Field9) > 0 { + n += 1 + sovThetest(uint64(len(m.Field9)*4)) + len(m.Field9)*4 + } + if len(m.Field10) > 0 { + n += 1 + sovThetest(uint64(len(m.Field10)*4)) + len(m.Field10)*4 + } + if len(m.Field11) > 0 { + n += 1 + sovThetest(uint64(len(m.Field11)*8)) + len(m.Field11)*8 + } + if len(m.Field12) > 0 { + n += 1 + sovThetest(uint64(len(m.Field12)*8)) + len(m.Field12)*8 + } + if len(m.Field13) > 0 { + n += 1 + sovThetest(uint64(len(m.Field13))) + len(m.Field13)*1 + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NinRepPackedNative) Size() (n int) { + var l int + _ = l + if len(m.Field1) > 0 { + n += 1 + sovThetest(uint64(len(m.Field1)*8)) + len(m.Field1)*8 + } + if len(m.Field2) > 0 { + n += 1 + sovThetest(uint64(len(m.Field2)*4)) + len(m.Field2)*4 + } + if len(m.Field3) > 0 { + l = 0 + for _, e := range m.Field3 { + l += sovThetest(uint64(e)) + } + n += 1 + sovThetest(uint64(l)) + l + } + if len(m.Field4) > 0 { + l = 0 + for _, e := range m.Field4 { + l += sovThetest(uint64(e)) + } + n += 1 + sovThetest(uint64(l)) + l + } + if len(m.Field5) > 0 { + l = 0 + for _, e := range m.Field5 { + l += sovThetest(uint64(e)) + } + n += 1 + sovThetest(uint64(l)) + l + } + if len(m.Field6) > 0 { + l = 0 + for _, e := range m.Field6 { + l += sovThetest(uint64(e)) + } + n += 1 + sovThetest(uint64(l)) + l + } + if len(m.Field7) > 0 { + l = 0 + for _, e := range m.Field7 { + l += sozThetest(uint64(e)) + } + n += 1 + sovThetest(uint64(l)) + l + } + if len(m.Field8) > 0 { + l = 0 + for _, e := range m.Field8 { + l += sozThetest(uint64(e)) + } + n += 1 + sovThetest(uint64(l)) + l + } + if len(m.Field9) > 0 { + n += 1 + sovThetest(uint64(len(m.Field9)*4)) + len(m.Field9)*4 + } + if len(m.Field10) > 0 { + n += 1 + sovThetest(uint64(len(m.Field10)*4)) + len(m.Field10)*4 + } + if len(m.Field11) > 0 { + n += 1 + sovThetest(uint64(len(m.Field11)*8)) + len(m.Field11)*8 + } + if len(m.Field12) > 0 { + n += 1 + sovThetest(uint64(len(m.Field12)*8)) + len(m.Field12)*8 + } + if len(m.Field13) > 0 { + n += 1 + sovThetest(uint64(len(m.Field13))) + len(m.Field13)*1 + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NidOptStruct) Size() (n int) { + var l int + _ = l + n += 9 + n += 5 + l = m.Field3.Size() + n += 1 + l + sovThetest(uint64(l)) + l = m.Field4.Size() + n += 1 + l + sovThetest(uint64(l)) + n += 1 + sovThetest(uint64(m.Field6)) + n += 1 + sozThetest(uint64(m.Field7)) + l = m.Field8.Size() + n += 1 + l + sovThetest(uint64(l)) + n += 2 + l = len(m.Field14) + n += 1 + l + sovThetest(uint64(l)) + if m.Field15 != nil { + l = len(m.Field15) + n += 1 + l + sovThetest(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NinOptStruct) Size() (n int) { + var l int + _ = l + if m.Field1 != nil { + n += 9 + } + if m.Field2 != nil { + n += 5 + } + if m.Field3 != nil { + l = m.Field3.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if m.Field4 != nil { + l = m.Field4.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if m.Field6 != nil { + n += 1 + sovThetest(uint64(*m.Field6)) + } + if m.Field7 != nil { + n += 1 + sozThetest(uint64(*m.Field7)) + } + if m.Field8 != nil { + l = m.Field8.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if m.Field13 != nil { + n += 2 + } + if m.Field14 != nil { + l = len(*m.Field14) + n += 1 + l + sovThetest(uint64(l)) + } + if m.Field15 != nil { + l = len(m.Field15) + n += 1 + l + sovThetest(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NidRepStruct) Size() (n int) { + var l int + _ = l + if len(m.Field1) > 0 { + n += 9 * len(m.Field1) + } + if len(m.Field2) > 0 { + n += 5 * len(m.Field2) + } + if len(m.Field3) > 0 { + for _, e := range m.Field3 { + l = e.Size() + n += 1 + l + sovThetest(uint64(l)) + } + } + if len(m.Field4) > 0 { + for _, e := range m.Field4 { + l = e.Size() + n += 1 + l + sovThetest(uint64(l)) + } + } + if len(m.Field6) > 0 { + for _, e := range m.Field6 { + n += 1 + sovThetest(uint64(e)) + } + } + if len(m.Field7) > 0 { + for _, e := range m.Field7 { + n += 1 + sozThetest(uint64(e)) + } + } + if len(m.Field8) > 0 { + for _, e := range m.Field8 { + l = e.Size() + n += 1 + l + sovThetest(uint64(l)) + } + } + if len(m.Field13) > 0 { + n += 2 * len(m.Field13) + } + if len(m.Field14) > 0 { + for _, s := range m.Field14 { + l = len(s) + n += 1 + l + sovThetest(uint64(l)) + } + } + if len(m.Field15) > 0 { + for _, b := range m.Field15 { + l = len(b) + n += 1 + l + sovThetest(uint64(l)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NinRepStruct) Size() (n int) { + var l int + _ = l + if len(m.Field1) > 0 { + n += 9 * len(m.Field1) + } + if len(m.Field2) > 0 { + n += 5 * len(m.Field2) + } + if len(m.Field3) > 0 { + for _, e := range m.Field3 { + l = e.Size() + n += 1 + l + sovThetest(uint64(l)) + } + } + if len(m.Field4) > 0 { + for _, e := range m.Field4 { + l = e.Size() + n += 1 + l + sovThetest(uint64(l)) + } + } + if len(m.Field6) > 0 { + for _, e := range m.Field6 { + n += 1 + sovThetest(uint64(e)) + } + } + if len(m.Field7) > 0 { + for _, e := range m.Field7 { + n += 1 + sozThetest(uint64(e)) + } + } + if len(m.Field8) > 0 { + for _, e := range m.Field8 { + l = e.Size() + n += 1 + l + sovThetest(uint64(l)) + } + } + if len(m.Field13) > 0 { + n += 2 * len(m.Field13) + } + if len(m.Field14) > 0 { + for _, s := range m.Field14 { + l = len(s) + n += 1 + l + sovThetest(uint64(l)) + } + } + if len(m.Field15) > 0 { + for _, b := range m.Field15 { + l = len(b) + n += 1 + l + sovThetest(uint64(l)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NidEmbeddedStruct) Size() (n int) { + var l int + _ = l + if m.NidOptNative != nil { + l = m.NidOptNative.Size() + n += 1 + l + sovThetest(uint64(l)) + } + l = m.Field200.Size() + n += 2 + l + sovThetest(uint64(l)) + n += 3 + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NinEmbeddedStruct) Size() (n int) { + var l int + _ = l + if m.NidOptNative != nil { + l = m.NidOptNative.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if m.Field200 != nil { + l = m.Field200.Size() + n += 2 + l + sovThetest(uint64(l)) + } + if m.Field210 != nil { + n += 3 + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NidNestedStruct) Size() (n int) { + var l int + _ = l + l = m.Field1.Size() + n += 1 + l + sovThetest(uint64(l)) + if len(m.Field2) > 0 { + for _, e := range m.Field2 { + l = e.Size() + n += 1 + l + sovThetest(uint64(l)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NinNestedStruct) Size() (n int) { + var l int + _ = l + if m.Field1 != nil { + l = m.Field1.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if len(m.Field2) > 0 { + for _, e := range m.Field2 { + l = e.Size() + n += 1 + l + sovThetest(uint64(l)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NidOptCustom) Size() (n int) { + var l int + _ = l + l = m.Id.Size() + n += 1 + l + sovThetest(uint64(l)) + l = m.Value.Size() + n += 1 + l + sovThetest(uint64(l)) + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *CustomDash) Size() (n int) { + var l int + _ = l + if m.Value != nil { + l = m.Value.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NinOptCustom) Size() (n int) { + var l int + _ = l + if m.Id != nil { + l = m.Id.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if m.Value != nil { + l = m.Value.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NidRepCustom) Size() (n int) { + var l int + _ = l + if len(m.Id) > 0 { + for _, e := range m.Id { + l = e.Size() + n += 1 + l + sovThetest(uint64(l)) + } + } + if len(m.Value) > 0 { + for _, e := range m.Value { + l = e.Size() + n += 1 + l + sovThetest(uint64(l)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NinRepCustom) Size() (n int) { + var l int + _ = l + if len(m.Id) > 0 { + for _, e := range m.Id { + l = e.Size() + n += 1 + l + sovThetest(uint64(l)) + } + } + if len(m.Value) > 0 { + for _, e := range m.Value { + l = e.Size() + n += 1 + l + sovThetest(uint64(l)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NinOptNativeUnion) Size() (n int) { + var l int + _ = l + if m.Field1 != nil { + n += 9 + } + if m.Field2 != nil { + n += 5 + } + if m.Field3 != nil { + n += 1 + sovThetest(uint64(*m.Field3)) + } + if m.Field4 != nil { + n += 1 + sovThetest(uint64(*m.Field4)) + } + if m.Field5 != nil { + n += 1 + sovThetest(uint64(*m.Field5)) + } + if m.Field6 != nil { + n += 1 + sovThetest(uint64(*m.Field6)) + } + if m.Field13 != nil { + n += 2 + } + if m.Field14 != nil { + l = len(*m.Field14) + n += 1 + l + sovThetest(uint64(l)) + } + if m.Field15 != nil { + l = len(m.Field15) + n += 1 + l + sovThetest(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NinOptStructUnion) Size() (n int) { + var l int + _ = l + if m.Field1 != nil { + n += 9 + } + if m.Field2 != nil { + n += 5 + } + if m.Field3 != nil { + l = m.Field3.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if m.Field4 != nil { + l = m.Field4.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if m.Field6 != nil { + n += 1 + sovThetest(uint64(*m.Field6)) + } + if m.Field7 != nil { + n += 1 + sozThetest(uint64(*m.Field7)) + } + if m.Field13 != nil { + n += 2 + } + if m.Field14 != nil { + l = len(*m.Field14) + n += 1 + l + sovThetest(uint64(l)) + } + if m.Field15 != nil { + l = len(m.Field15) + n += 1 + l + sovThetest(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NinEmbeddedStructUnion) Size() (n int) { + var l int + _ = l + if m.NidOptNative != nil { + l = m.NidOptNative.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if m.Field200 != nil { + l = m.Field200.Size() + n += 2 + l + sovThetest(uint64(l)) + } + if m.Field210 != nil { + n += 3 + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NinNestedStructUnion) Size() (n int) { + var l int + _ = l + if m.Field1 != nil { + l = m.Field1.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if m.Field2 != nil { + l = m.Field2.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if m.Field3 != nil { + l = m.Field3.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *Tree) Size() (n int) { + var l int + _ = l + if m.Or != nil { + l = m.Or.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if m.And != nil { + l = m.And.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if m.Leaf != nil { + l = m.Leaf.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *OrBranch) Size() (n int) { + var l int + _ = l + l = m.Left.Size() + n += 1 + l + sovThetest(uint64(l)) + l = m.Right.Size() + n += 1 + l + sovThetest(uint64(l)) + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *AndBranch) Size() (n int) { + var l int + _ = l + l = m.Left.Size() + n += 1 + l + sovThetest(uint64(l)) + l = m.Right.Size() + n += 1 + l + sovThetest(uint64(l)) + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *Leaf) Size() (n int) { + var l int + _ = l + n += 1 + sovThetest(uint64(m.Value)) + l = len(m.StrValue) + n += 1 + l + sovThetest(uint64(l)) + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *DeepTree) Size() (n int) { + var l int + _ = l + if m.Down != nil { + l = m.Down.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if m.And != nil { + l = m.And.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if m.Leaf != nil { + l = m.Leaf.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *ADeepBranch) Size() (n int) { + var l int + _ = l + l = m.Down.Size() + n += 1 + l + sovThetest(uint64(l)) + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *AndDeepBranch) Size() (n int) { + var l int + _ = l + l = m.Left.Size() + n += 1 + l + sovThetest(uint64(l)) + l = m.Right.Size() + n += 1 + l + sovThetest(uint64(l)) + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *DeepLeaf) Size() (n int) { + var l int + _ = l + l = m.Tree.Size() + n += 1 + l + sovThetest(uint64(l)) + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *Nil) Size() (n int) { + var l int + _ = l + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NidOptEnum) Size() (n int) { + var l int + _ = l + n += 1 + sovThetest(uint64(m.Field1)) + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NinOptEnum) Size() (n int) { + var l int + _ = l + if m.Field1 != nil { + n += 1 + sovThetest(uint64(*m.Field1)) + } + if m.Field2 != nil { + n += 1 + sovThetest(uint64(*m.Field2)) + } + if m.Field3 != nil { + n += 1 + sovThetest(uint64(*m.Field3)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NidRepEnum) Size() (n int) { + var l int + _ = l + if len(m.Field1) > 0 { + for _, e := range m.Field1 { + n += 1 + sovThetest(uint64(e)) + } + } + if len(m.Field2) > 0 { + for _, e := range m.Field2 { + n += 1 + sovThetest(uint64(e)) + } + } + if len(m.Field3) > 0 { + for _, e := range m.Field3 { + n += 1 + sovThetest(uint64(e)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NinRepEnum) Size() (n int) { + var l int + _ = l + if len(m.Field1) > 0 { + for _, e := range m.Field1 { + n += 1 + sovThetest(uint64(e)) + } + } + if len(m.Field2) > 0 { + for _, e := range m.Field2 { + n += 1 + sovThetest(uint64(e)) + } + } + if len(m.Field3) > 0 { + for _, e := range m.Field3 { + n += 1 + sovThetest(uint64(e)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NinOptEnumDefault) Size() (n int) { + var l int + _ = l + if m.Field1 != nil { + n += 1 + sovThetest(uint64(*m.Field1)) + } + if m.Field2 != nil { + n += 1 + sovThetest(uint64(*m.Field2)) + } + if m.Field3 != nil { + n += 1 + sovThetest(uint64(*m.Field3)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *AnotherNinOptEnum) Size() (n int) { + var l int + _ = l + if m.Field1 != nil { + n += 1 + sovThetest(uint64(*m.Field1)) + } + if m.Field2 != nil { + n += 1 + sovThetest(uint64(*m.Field2)) + } + if m.Field3 != nil { + n += 1 + sovThetest(uint64(*m.Field3)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *AnotherNinOptEnumDefault) Size() (n int) { + var l int + _ = l + if m.Field1 != nil { + n += 1 + sovThetest(uint64(*m.Field1)) + } + if m.Field2 != nil { + n += 1 + sovThetest(uint64(*m.Field2)) + } + if m.Field3 != nil { + n += 1 + sovThetest(uint64(*m.Field3)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *Timer) Size() (n int) { + var l int + _ = l + n += 9 + n += 9 + if m.Data != nil { + l = len(m.Data) + n += 1 + l + sovThetest(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *MyExtendable) Size() (n int) { + var l int + _ = l + if m.Field1 != nil { + n += 1 + sovThetest(uint64(*m.Field1)) + } + if m.XXX_extensions != nil { + n += github_com_gogo_protobuf_proto.SizeOfExtensionMap(m.XXX_extensions) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *OtherExtenable) Size() (n int) { + var l int + _ = l + if m.Field2 != nil { + n += 1 + sovThetest(uint64(*m.Field2)) + } + if m.Field13 != nil { + n += 1 + sovThetest(uint64(*m.Field13)) + } + if m.M != nil { + l = m.M.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if m.XXX_extensions != nil { + n += github_com_gogo_protobuf_proto.SizeOfExtensionMap(m.XXX_extensions) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NestedDefinition) Size() (n int) { + var l int + _ = l + if m.Field1 != nil { + n += 1 + sovThetest(uint64(*m.Field1)) + } + if m.EnumField != nil { + n += 1 + sovThetest(uint64(*m.EnumField)) + } + if m.NNM != nil { + l = m.NNM.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if m.NM != nil { + l = m.NM.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NestedDefinition_NestedMessage) Size() (n int) { + var l int + _ = l + if m.NestedField1 != nil { + n += 9 + } + if m.NNM != nil { + l = m.NNM.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NestedDefinition_NestedMessage_NestedNestedMsg) Size() (n int) { + var l int + _ = l + if m.NestedNestedField1 != nil { + l = len(*m.NestedNestedField1) + n += 1 + l + sovThetest(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NestedScope) Size() (n int) { + var l int + _ = l + if m.A != nil { + l = m.A.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if m.B != nil { + n += 1 + sovThetest(uint64(*m.B)) + } + if m.C != nil { + l = m.C.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NinOptNativeDefault) Size() (n int) { + var l int + _ = l + if m.Field1 != nil { + n += 9 + } + if m.Field2 != nil { + n += 5 + } + if m.Field3 != nil { + n += 1 + sovThetest(uint64(*m.Field3)) + } + if m.Field4 != nil { + n += 1 + sovThetest(uint64(*m.Field4)) + } + if m.Field5 != nil { + n += 1 + sovThetest(uint64(*m.Field5)) + } + if m.Field6 != nil { + n += 1 + sovThetest(uint64(*m.Field6)) + } + if m.Field7 != nil { + n += 1 + sozThetest(uint64(*m.Field7)) + } + if m.Field8 != nil { + n += 1 + sozThetest(uint64(*m.Field8)) + } + if m.Field9 != nil { + n += 5 + } + if m.Field10 != nil { + n += 5 + } + if m.Field11 != nil { + n += 9 + } + if m.Field12 != nil { + n += 9 + } + if m.Field13 != nil { + n += 2 + } + if m.Field14 != nil { + l = len(*m.Field14) + n += 1 + l + sovThetest(uint64(l)) + } + if m.Field15 != nil { + l = len(m.Field15) + n += 1 + l + sovThetest(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *CustomContainer) Size() (n int) { + var l int + _ = l + l = m.CustomStruct.Size() + n += 1 + l + sovThetest(uint64(l)) + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *CustomNameNidOptNative) Size() (n int) { + var l int + _ = l + n += 9 + n += 5 + n += 1 + sovThetest(uint64(m.FieldC)) + n += 1 + sovThetest(uint64(m.FieldD)) + n += 1 + sovThetest(uint64(m.FieldE)) + n += 1 + sovThetest(uint64(m.FieldF)) + n += 1 + sozThetest(uint64(m.FieldG)) + n += 1 + sozThetest(uint64(m.FieldH)) + n += 5 + n += 5 + n += 9 + n += 9 + n += 2 + l = len(m.FieldN) + n += 1 + l + sovThetest(uint64(l)) + if m.FieldO != nil { + l = len(m.FieldO) + n += 1 + l + sovThetest(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *CustomNameNinOptNative) Size() (n int) { + var l int + _ = l + if m.FieldA != nil { + n += 9 + } + if m.FieldB != nil { + n += 5 + } + if m.FieldC != nil { + n += 1 + sovThetest(uint64(*m.FieldC)) + } + if m.FieldD != nil { + n += 1 + sovThetest(uint64(*m.FieldD)) + } + if m.FieldE != nil { + n += 1 + sovThetest(uint64(*m.FieldE)) + } + if m.FieldF != nil { + n += 1 + sovThetest(uint64(*m.FieldF)) + } + if m.FieldG != nil { + n += 1 + sozThetest(uint64(*m.FieldG)) + } + if m.FieldH != nil { + n += 1 + sozThetest(uint64(*m.FieldH)) + } + if m.FieldI != nil { + n += 5 + } + if m.FieldJ != nil { + n += 5 + } + if m.FieldK != nil { + n += 9 + } + if m.FielL != nil { + n += 9 + } + if m.FieldM != nil { + n += 2 + } + if m.FieldN != nil { + l = len(*m.FieldN) + n += 1 + l + sovThetest(uint64(l)) + } + if m.FieldO != nil { + l = len(m.FieldO) + n += 1 + l + sovThetest(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *CustomNameNinRepNative) Size() (n int) { + var l int + _ = l + if len(m.FieldA) > 0 { + n += 9 * len(m.FieldA) + } + if len(m.FieldB) > 0 { + n += 5 * len(m.FieldB) + } + if len(m.FieldC) > 0 { + for _, e := range m.FieldC { + n += 1 + sovThetest(uint64(e)) + } + } + if len(m.FieldD) > 0 { + for _, e := range m.FieldD { + n += 1 + sovThetest(uint64(e)) + } + } + if len(m.FieldE) > 0 { + for _, e := range m.FieldE { + n += 1 + sovThetest(uint64(e)) + } + } + if len(m.FieldF) > 0 { + for _, e := range m.FieldF { + n += 1 + sovThetest(uint64(e)) + } + } + if len(m.FieldG) > 0 { + for _, e := range m.FieldG { + n += 1 + sozThetest(uint64(e)) + } + } + if len(m.FieldH) > 0 { + for _, e := range m.FieldH { + n += 1 + sozThetest(uint64(e)) + } + } + if len(m.FieldI) > 0 { + n += 5 * len(m.FieldI) + } + if len(m.FieldJ) > 0 { + n += 5 * len(m.FieldJ) + } + if len(m.FieldK) > 0 { + n += 9 * len(m.FieldK) + } + if len(m.FieldL) > 0 { + n += 9 * len(m.FieldL) + } + if len(m.FieldM) > 0 { + n += 2 * len(m.FieldM) + } + if len(m.FieldN) > 0 { + for _, s := range m.FieldN { + l = len(s) + n += 1 + l + sovThetest(uint64(l)) + } + } + if len(m.FieldO) > 0 { + for _, b := range m.FieldO { + l = len(b) + n += 1 + l + sovThetest(uint64(l)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *CustomNameNinStruct) Size() (n int) { + var l int + _ = l + if m.FieldA != nil { + n += 9 + } + if m.FieldB != nil { + n += 5 + } + if m.FieldC != nil { + l = m.FieldC.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if len(m.FieldD) > 0 { + for _, e := range m.FieldD { + l = e.Size() + n += 1 + l + sovThetest(uint64(l)) + } + } + if m.FieldE != nil { + n += 1 + sovThetest(uint64(*m.FieldE)) + } + if m.FieldF != nil { + n += 1 + sozThetest(uint64(*m.FieldF)) + } + if m.FieldG != nil { + l = m.FieldG.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if m.FieldH != nil { + n += 2 + } + if m.FieldI != nil { + l = len(*m.FieldI) + n += 1 + l + sovThetest(uint64(l)) + } + if m.FieldJ != nil { + l = len(m.FieldJ) + n += 1 + l + sovThetest(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *CustomNameCustomType) Size() (n int) { + var l int + _ = l + if m.FieldA != nil { + l = m.FieldA.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if m.FieldB != nil { + l = m.FieldB.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if len(m.FieldC) > 0 { + for _, e := range m.FieldC { + l = e.Size() + n += 1 + l + sovThetest(uint64(l)) + } + } + if len(m.FieldD) > 0 { + for _, e := range m.FieldD { + l = e.Size() + n += 1 + l + sovThetest(uint64(l)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *CustomNameNinEmbeddedStructUnion) Size() (n int) { + var l int + _ = l + if m.NidOptNative != nil { + l = m.NidOptNative.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if m.FieldA != nil { + l = m.FieldA.Size() + n += 2 + l + sovThetest(uint64(l)) + } + if m.FieldB != nil { + n += 3 + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *CustomNameEnum) Size() (n int) { + var l int + _ = l + if m.FieldA != nil { + n += 1 + sovThetest(uint64(*m.FieldA)) + } + if len(m.FieldB) > 0 { + for _, e := range m.FieldB { + n += 1 + sovThetest(uint64(e)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NoExtensionsMap) Size() (n int) { + var l int + _ = l + if m.Field1 != nil { + n += 1 + sovThetest(uint64(*m.Field1)) + } + if m.XXX_extensions != nil { + n += len(m.XXX_extensions) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *Unrecognized) Size() (n int) { + var l int + _ = l + if m.Field1 != nil { + l = len(*m.Field1) + n += 1 + l + sovThetest(uint64(l)) + } + return n +} + +func (m *UnrecognizedWithInner) Size() (n int) { + var l int + _ = l + if len(m.Embedded) > 0 { + for _, e := range m.Embedded { + l = e.Size() + n += 1 + l + sovThetest(uint64(l)) + } + } + if m.Field2 != nil { + l = len(*m.Field2) + n += 1 + l + sovThetest(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *UnrecognizedWithInner_Inner) Size() (n int) { + var l int + _ = l + if m.Field1 != nil { + n += 1 + sovThetest(uint64(*m.Field1)) + } + return n +} + +func (m *UnrecognizedWithEmbed) Size() (n int) { + var l int + _ = l + l = m.UnrecognizedWithEmbed_Embedded.Size() + n += 1 + l + sovThetest(uint64(l)) + if m.Field2 != nil { + l = len(*m.Field2) + n += 1 + l + sovThetest(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *UnrecognizedWithEmbed_Embedded) Size() (n int) { + var l int + _ = l + if m.Field1 != nil { + n += 1 + sovThetest(uint64(*m.Field1)) + } + return n +} + +func (m *Node) Size() (n int) { + var l int + _ = l + if m.Label != nil { + l = len(*m.Label) + n += 1 + l + sovThetest(uint64(l)) + } + if len(m.Children) > 0 { + for _, e := range m.Children { + l = e.Size() + n += 1 + l + sovThetest(uint64(l)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func sovThetest(x uint64) (n int) { + for { + n++ + x >>= 7 + if x == 0 { + break + } + } + return n +} +func sozThetest(x uint64) (n int) { + return sovThetest(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (this *NidOptNative) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NidOptNative{`, + `Field1:` + fmt.Sprintf("%v", this.Field1) + `,`, + `Field2:` + fmt.Sprintf("%v", this.Field2) + `,`, + `Field3:` + fmt.Sprintf("%v", this.Field3) + `,`, + `Field4:` + fmt.Sprintf("%v", this.Field4) + `,`, + `Field5:` + fmt.Sprintf("%v", this.Field5) + `,`, + `Field6:` + fmt.Sprintf("%v", this.Field6) + `,`, + `Field7:` + fmt.Sprintf("%v", this.Field7) + `,`, + `Field8:` + fmt.Sprintf("%v", this.Field8) + `,`, + `Field9:` + fmt.Sprintf("%v", this.Field9) + `,`, + `Field10:` + fmt.Sprintf("%v", this.Field10) + `,`, + `Field11:` + fmt.Sprintf("%v", this.Field11) + `,`, + `Field12:` + fmt.Sprintf("%v", this.Field12) + `,`, + `Field13:` + fmt.Sprintf("%v", this.Field13) + `,`, + `Field14:` + fmt.Sprintf("%v", this.Field14) + `,`, + `Field15:` + fmt.Sprintf("%v", this.Field15) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NinOptNative) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NinOptNative{`, + `Field1:` + valueToStringThetest(this.Field1) + `,`, + `Field2:` + valueToStringThetest(this.Field2) + `,`, + `Field3:` + valueToStringThetest(this.Field3) + `,`, + `Field4:` + valueToStringThetest(this.Field4) + `,`, + `Field5:` + valueToStringThetest(this.Field5) + `,`, + `Field6:` + valueToStringThetest(this.Field6) + `,`, + `Field7:` + valueToStringThetest(this.Field7) + `,`, + `Field8:` + valueToStringThetest(this.Field8) + `,`, + `Field9:` + valueToStringThetest(this.Field9) + `,`, + `Field10:` + valueToStringThetest(this.Field10) + `,`, + `Field11:` + valueToStringThetest(this.Field11) + `,`, + `Field12:` + valueToStringThetest(this.Field12) + `,`, + `Field13:` + valueToStringThetest(this.Field13) + `,`, + `Field14:` + valueToStringThetest(this.Field14) + `,`, + `Field15:` + valueToStringThetest(this.Field15) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NidRepNative) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NidRepNative{`, + `Field1:` + fmt.Sprintf("%v", this.Field1) + `,`, + `Field2:` + fmt.Sprintf("%v", this.Field2) + `,`, + `Field3:` + fmt.Sprintf("%v", this.Field3) + `,`, + `Field4:` + fmt.Sprintf("%v", this.Field4) + `,`, + `Field5:` + fmt.Sprintf("%v", this.Field5) + `,`, + `Field6:` + fmt.Sprintf("%v", this.Field6) + `,`, + `Field7:` + fmt.Sprintf("%v", this.Field7) + `,`, + `Field8:` + fmt.Sprintf("%v", this.Field8) + `,`, + `Field9:` + fmt.Sprintf("%v", this.Field9) + `,`, + `Field10:` + fmt.Sprintf("%v", this.Field10) + `,`, + `Field11:` + fmt.Sprintf("%v", this.Field11) + `,`, + `Field12:` + fmt.Sprintf("%v", this.Field12) + `,`, + `Field13:` + fmt.Sprintf("%v", this.Field13) + `,`, + `Field14:` + fmt.Sprintf("%v", this.Field14) + `,`, + `Field15:` + fmt.Sprintf("%v", this.Field15) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NinRepNative) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NinRepNative{`, + `Field1:` + fmt.Sprintf("%v", this.Field1) + `,`, + `Field2:` + fmt.Sprintf("%v", this.Field2) + `,`, + `Field3:` + fmt.Sprintf("%v", this.Field3) + `,`, + `Field4:` + fmt.Sprintf("%v", this.Field4) + `,`, + `Field5:` + fmt.Sprintf("%v", this.Field5) + `,`, + `Field6:` + fmt.Sprintf("%v", this.Field6) + `,`, + `Field7:` + fmt.Sprintf("%v", this.Field7) + `,`, + `Field8:` + fmt.Sprintf("%v", this.Field8) + `,`, + `Field9:` + fmt.Sprintf("%v", this.Field9) + `,`, + `Field10:` + fmt.Sprintf("%v", this.Field10) + `,`, + `Field11:` + fmt.Sprintf("%v", this.Field11) + `,`, + `Field12:` + fmt.Sprintf("%v", this.Field12) + `,`, + `Field13:` + fmt.Sprintf("%v", this.Field13) + `,`, + `Field14:` + fmt.Sprintf("%v", this.Field14) + `,`, + `Field15:` + fmt.Sprintf("%v", this.Field15) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NidRepPackedNative) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NidRepPackedNative{`, + `Field1:` + fmt.Sprintf("%v", this.Field1) + `,`, + `Field2:` + fmt.Sprintf("%v", this.Field2) + `,`, + `Field3:` + fmt.Sprintf("%v", this.Field3) + `,`, + `Field4:` + fmt.Sprintf("%v", this.Field4) + `,`, + `Field5:` + fmt.Sprintf("%v", this.Field5) + `,`, + `Field6:` + fmt.Sprintf("%v", this.Field6) + `,`, + `Field7:` + fmt.Sprintf("%v", this.Field7) + `,`, + `Field8:` + fmt.Sprintf("%v", this.Field8) + `,`, + `Field9:` + fmt.Sprintf("%v", this.Field9) + `,`, + `Field10:` + fmt.Sprintf("%v", this.Field10) + `,`, + `Field11:` + fmt.Sprintf("%v", this.Field11) + `,`, + `Field12:` + fmt.Sprintf("%v", this.Field12) + `,`, + `Field13:` + fmt.Sprintf("%v", this.Field13) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NinRepPackedNative) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NinRepPackedNative{`, + `Field1:` + fmt.Sprintf("%v", this.Field1) + `,`, + `Field2:` + fmt.Sprintf("%v", this.Field2) + `,`, + `Field3:` + fmt.Sprintf("%v", this.Field3) + `,`, + `Field4:` + fmt.Sprintf("%v", this.Field4) + `,`, + `Field5:` + fmt.Sprintf("%v", this.Field5) + `,`, + `Field6:` + fmt.Sprintf("%v", this.Field6) + `,`, + `Field7:` + fmt.Sprintf("%v", this.Field7) + `,`, + `Field8:` + fmt.Sprintf("%v", this.Field8) + `,`, + `Field9:` + fmt.Sprintf("%v", this.Field9) + `,`, + `Field10:` + fmt.Sprintf("%v", this.Field10) + `,`, + `Field11:` + fmt.Sprintf("%v", this.Field11) + `,`, + `Field12:` + fmt.Sprintf("%v", this.Field12) + `,`, + `Field13:` + fmt.Sprintf("%v", this.Field13) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NidOptStruct) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NidOptStruct{`, + `Field1:` + fmt.Sprintf("%v", this.Field1) + `,`, + `Field2:` + fmt.Sprintf("%v", this.Field2) + `,`, + `Field3:` + strings.Replace(strings.Replace(this.Field3.String(), "NidOptNative", "NidOptNative", 1), `&`, ``, 1) + `,`, + `Field4:` + strings.Replace(strings.Replace(this.Field4.String(), "NinOptNative", "NinOptNative", 1), `&`, ``, 1) + `,`, + `Field6:` + fmt.Sprintf("%v", this.Field6) + `,`, + `Field7:` + fmt.Sprintf("%v", this.Field7) + `,`, + `Field8:` + strings.Replace(strings.Replace(this.Field8.String(), "NidOptNative", "NidOptNative", 1), `&`, ``, 1) + `,`, + `Field13:` + fmt.Sprintf("%v", this.Field13) + `,`, + `Field14:` + fmt.Sprintf("%v", this.Field14) + `,`, + `Field15:` + fmt.Sprintf("%v", this.Field15) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NinOptStruct) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NinOptStruct{`, + `Field1:` + valueToStringThetest(this.Field1) + `,`, + `Field2:` + valueToStringThetest(this.Field2) + `,`, + `Field3:` + strings.Replace(fmt.Sprintf("%v", this.Field3), "NidOptNative", "NidOptNative", 1) + `,`, + `Field4:` + strings.Replace(fmt.Sprintf("%v", this.Field4), "NinOptNative", "NinOptNative", 1) + `,`, + `Field6:` + valueToStringThetest(this.Field6) + `,`, + `Field7:` + valueToStringThetest(this.Field7) + `,`, + `Field8:` + strings.Replace(fmt.Sprintf("%v", this.Field8), "NidOptNative", "NidOptNative", 1) + `,`, + `Field13:` + valueToStringThetest(this.Field13) + `,`, + `Field14:` + valueToStringThetest(this.Field14) + `,`, + `Field15:` + valueToStringThetest(this.Field15) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NidRepStruct) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NidRepStruct{`, + `Field1:` + fmt.Sprintf("%v", this.Field1) + `,`, + `Field2:` + fmt.Sprintf("%v", this.Field2) + `,`, + `Field3:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Field3), "NidOptNative", "NidOptNative", 1), `&`, ``, 1) + `,`, + `Field4:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Field4), "NinOptNative", "NinOptNative", 1), `&`, ``, 1) + `,`, + `Field6:` + fmt.Sprintf("%v", this.Field6) + `,`, + `Field7:` + fmt.Sprintf("%v", this.Field7) + `,`, + `Field8:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Field8), "NidOptNative", "NidOptNative", 1), `&`, ``, 1) + `,`, + `Field13:` + fmt.Sprintf("%v", this.Field13) + `,`, + `Field14:` + fmt.Sprintf("%v", this.Field14) + `,`, + `Field15:` + fmt.Sprintf("%v", this.Field15) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NinRepStruct) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NinRepStruct{`, + `Field1:` + fmt.Sprintf("%v", this.Field1) + `,`, + `Field2:` + fmt.Sprintf("%v", this.Field2) + `,`, + `Field3:` + strings.Replace(fmt.Sprintf("%v", this.Field3), "NidOptNative", "NidOptNative", 1) + `,`, + `Field4:` + strings.Replace(fmt.Sprintf("%v", this.Field4), "NinOptNative", "NinOptNative", 1) + `,`, + `Field6:` + fmt.Sprintf("%v", this.Field6) + `,`, + `Field7:` + fmt.Sprintf("%v", this.Field7) + `,`, + `Field8:` + strings.Replace(fmt.Sprintf("%v", this.Field8), "NidOptNative", "NidOptNative", 1) + `,`, + `Field13:` + fmt.Sprintf("%v", this.Field13) + `,`, + `Field14:` + fmt.Sprintf("%v", this.Field14) + `,`, + `Field15:` + fmt.Sprintf("%v", this.Field15) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NidEmbeddedStruct) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NidEmbeddedStruct{`, + `NidOptNative:` + strings.Replace(fmt.Sprintf("%v", this.NidOptNative), "NidOptNative", "NidOptNative", 1) + `,`, + `Field200:` + strings.Replace(strings.Replace(this.Field200.String(), "NidOptNative", "NidOptNative", 1), `&`, ``, 1) + `,`, + `Field210:` + fmt.Sprintf("%v", this.Field210) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NinEmbeddedStruct) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NinEmbeddedStruct{`, + `NidOptNative:` + strings.Replace(fmt.Sprintf("%v", this.NidOptNative), "NidOptNative", "NidOptNative", 1) + `,`, + `Field200:` + strings.Replace(fmt.Sprintf("%v", this.Field200), "NidOptNative", "NidOptNative", 1) + `,`, + `Field210:` + valueToStringThetest(this.Field210) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NidNestedStruct) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NidNestedStruct{`, + `Field1:` + strings.Replace(strings.Replace(this.Field1.String(), "NidOptStruct", "NidOptStruct", 1), `&`, ``, 1) + `,`, + `Field2:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Field2), "NidRepStruct", "NidRepStruct", 1), `&`, ``, 1) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NinNestedStruct) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NinNestedStruct{`, + `Field1:` + strings.Replace(fmt.Sprintf("%v", this.Field1), "NinOptStruct", "NinOptStruct", 1) + `,`, + `Field2:` + strings.Replace(fmt.Sprintf("%v", this.Field2), "NinRepStruct", "NinRepStruct", 1) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NidOptCustom) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NidOptCustom{`, + `Id:` + fmt.Sprintf("%v", this.Id) + `,`, + `Value:` + fmt.Sprintf("%v", this.Value) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *CustomDash) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&CustomDash{`, + `Value:` + valueToStringThetest(this.Value) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NinOptCustom) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NinOptCustom{`, + `Id:` + valueToStringThetest(this.Id) + `,`, + `Value:` + valueToStringThetest(this.Value) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NidRepCustom) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NidRepCustom{`, + `Id:` + fmt.Sprintf("%v", this.Id) + `,`, + `Value:` + fmt.Sprintf("%v", this.Value) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NinRepCustom) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NinRepCustom{`, + `Id:` + fmt.Sprintf("%v", this.Id) + `,`, + `Value:` + fmt.Sprintf("%v", this.Value) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NinOptNativeUnion) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NinOptNativeUnion{`, + `Field1:` + valueToStringThetest(this.Field1) + `,`, + `Field2:` + valueToStringThetest(this.Field2) + `,`, + `Field3:` + valueToStringThetest(this.Field3) + `,`, + `Field4:` + valueToStringThetest(this.Field4) + `,`, + `Field5:` + valueToStringThetest(this.Field5) + `,`, + `Field6:` + valueToStringThetest(this.Field6) + `,`, + `Field13:` + valueToStringThetest(this.Field13) + `,`, + `Field14:` + valueToStringThetest(this.Field14) + `,`, + `Field15:` + valueToStringThetest(this.Field15) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NinOptStructUnion) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NinOptStructUnion{`, + `Field1:` + valueToStringThetest(this.Field1) + `,`, + `Field2:` + valueToStringThetest(this.Field2) + `,`, + `Field3:` + strings.Replace(fmt.Sprintf("%v", this.Field3), "NidOptNative", "NidOptNative", 1) + `,`, + `Field4:` + strings.Replace(fmt.Sprintf("%v", this.Field4), "NinOptNative", "NinOptNative", 1) + `,`, + `Field6:` + valueToStringThetest(this.Field6) + `,`, + `Field7:` + valueToStringThetest(this.Field7) + `,`, + `Field13:` + valueToStringThetest(this.Field13) + `,`, + `Field14:` + valueToStringThetest(this.Field14) + `,`, + `Field15:` + valueToStringThetest(this.Field15) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NinEmbeddedStructUnion) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NinEmbeddedStructUnion{`, + `NidOptNative:` + strings.Replace(fmt.Sprintf("%v", this.NidOptNative), "NidOptNative", "NidOptNative", 1) + `,`, + `Field200:` + strings.Replace(fmt.Sprintf("%v", this.Field200), "NinOptNative", "NinOptNative", 1) + `,`, + `Field210:` + valueToStringThetest(this.Field210) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NinNestedStructUnion) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NinNestedStructUnion{`, + `Field1:` + strings.Replace(fmt.Sprintf("%v", this.Field1), "NinOptNativeUnion", "NinOptNativeUnion", 1) + `,`, + `Field2:` + strings.Replace(fmt.Sprintf("%v", this.Field2), "NinOptStructUnion", "NinOptStructUnion", 1) + `,`, + `Field3:` + strings.Replace(fmt.Sprintf("%v", this.Field3), "NinEmbeddedStructUnion", "NinEmbeddedStructUnion", 1) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *Tree) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&Tree{`, + `Or:` + strings.Replace(fmt.Sprintf("%v", this.Or), "OrBranch", "OrBranch", 1) + `,`, + `And:` + strings.Replace(fmt.Sprintf("%v", this.And), "AndBranch", "AndBranch", 1) + `,`, + `Leaf:` + strings.Replace(fmt.Sprintf("%v", this.Leaf), "Leaf", "Leaf", 1) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *OrBranch) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&OrBranch{`, + `Left:` + strings.Replace(strings.Replace(this.Left.String(), "Tree", "Tree", 1), `&`, ``, 1) + `,`, + `Right:` + strings.Replace(strings.Replace(this.Right.String(), "Tree", "Tree", 1), `&`, ``, 1) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *AndBranch) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&AndBranch{`, + `Left:` + strings.Replace(strings.Replace(this.Left.String(), "Tree", "Tree", 1), `&`, ``, 1) + `,`, + `Right:` + strings.Replace(strings.Replace(this.Right.String(), "Tree", "Tree", 1), `&`, ``, 1) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *Leaf) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&Leaf{`, + `Value:` + fmt.Sprintf("%v", this.Value) + `,`, + `StrValue:` + fmt.Sprintf("%v", this.StrValue) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *DeepTree) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&DeepTree{`, + `Down:` + strings.Replace(fmt.Sprintf("%v", this.Down), "ADeepBranch", "ADeepBranch", 1) + `,`, + `And:` + strings.Replace(fmt.Sprintf("%v", this.And), "AndDeepBranch", "AndDeepBranch", 1) + `,`, + `Leaf:` + strings.Replace(fmt.Sprintf("%v", this.Leaf), "DeepLeaf", "DeepLeaf", 1) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *ADeepBranch) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&ADeepBranch{`, + `Down:` + strings.Replace(strings.Replace(this.Down.String(), "DeepTree", "DeepTree", 1), `&`, ``, 1) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *AndDeepBranch) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&AndDeepBranch{`, + `Left:` + strings.Replace(strings.Replace(this.Left.String(), "DeepTree", "DeepTree", 1), `&`, ``, 1) + `,`, + `Right:` + strings.Replace(strings.Replace(this.Right.String(), "DeepTree", "DeepTree", 1), `&`, ``, 1) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *DeepLeaf) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&DeepLeaf{`, + `Tree:` + strings.Replace(strings.Replace(this.Tree.String(), "Tree", "Tree", 1), `&`, ``, 1) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *Nil) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&Nil{`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NidOptEnum) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NidOptEnum{`, + `Field1:` + fmt.Sprintf("%v", this.Field1) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NinOptEnum) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NinOptEnum{`, + `Field1:` + valueToStringThetest(this.Field1) + `,`, + `Field2:` + valueToStringThetest(this.Field2) + `,`, + `Field3:` + valueToStringThetest(this.Field3) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NidRepEnum) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NidRepEnum{`, + `Field1:` + fmt.Sprintf("%v", this.Field1) + `,`, + `Field2:` + fmt.Sprintf("%v", this.Field2) + `,`, + `Field3:` + fmt.Sprintf("%v", this.Field3) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NinRepEnum) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NinRepEnum{`, + `Field1:` + fmt.Sprintf("%v", this.Field1) + `,`, + `Field2:` + fmt.Sprintf("%v", this.Field2) + `,`, + `Field3:` + fmt.Sprintf("%v", this.Field3) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NinOptEnumDefault) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NinOptEnumDefault{`, + `Field1:` + valueToStringThetest(this.Field1) + `,`, + `Field2:` + valueToStringThetest(this.Field2) + `,`, + `Field3:` + valueToStringThetest(this.Field3) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *AnotherNinOptEnum) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&AnotherNinOptEnum{`, + `Field1:` + valueToStringThetest(this.Field1) + `,`, + `Field2:` + valueToStringThetest(this.Field2) + `,`, + `Field3:` + valueToStringThetest(this.Field3) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *AnotherNinOptEnumDefault) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&AnotherNinOptEnumDefault{`, + `Field1:` + valueToStringThetest(this.Field1) + `,`, + `Field2:` + valueToStringThetest(this.Field2) + `,`, + `Field3:` + valueToStringThetest(this.Field3) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *Timer) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&Timer{`, + `Time1:` + fmt.Sprintf("%v", this.Time1) + `,`, + `Time2:` + fmt.Sprintf("%v", this.Time2) + `,`, + `Data:` + fmt.Sprintf("%v", this.Data) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *MyExtendable) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&MyExtendable{`, + `Field1:` + valueToStringThetest(this.Field1) + `,`, + `XXX_extensions:` + proto.StringFromExtensionsMap(this.XXX_extensions) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *OtherExtenable) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&OtherExtenable{`, + `Field2:` + valueToStringThetest(this.Field2) + `,`, + `Field13:` + valueToStringThetest(this.Field13) + `,`, + `M:` + strings.Replace(fmt.Sprintf("%v", this.M), "MyExtendable", "MyExtendable", 1) + `,`, + `XXX_extensions:` + proto.StringFromExtensionsMap(this.XXX_extensions) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NestedDefinition) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NestedDefinition{`, + `Field1:` + valueToStringThetest(this.Field1) + `,`, + `EnumField:` + valueToStringThetest(this.EnumField) + `,`, + `NNM:` + strings.Replace(fmt.Sprintf("%v", this.NNM), "NestedDefinition_NestedMessage_NestedNestedMsg", "NestedDefinition_NestedMessage_NestedNestedMsg", 1) + `,`, + `NM:` + strings.Replace(fmt.Sprintf("%v", this.NM), "NestedDefinition_NestedMessage", "NestedDefinition_NestedMessage", 1) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NestedDefinition_NestedMessage) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NestedDefinition_NestedMessage{`, + `NestedField1:` + valueToStringThetest(this.NestedField1) + `,`, + `NNM:` + strings.Replace(fmt.Sprintf("%v", this.NNM), "NestedDefinition_NestedMessage_NestedNestedMsg", "NestedDefinition_NestedMessage_NestedNestedMsg", 1) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NestedDefinition_NestedMessage_NestedNestedMsg) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NestedDefinition_NestedMessage_NestedNestedMsg{`, + `NestedNestedField1:` + valueToStringThetest(this.NestedNestedField1) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NestedScope) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NestedScope{`, + `A:` + strings.Replace(fmt.Sprintf("%v", this.A), "NestedDefinition_NestedMessage_NestedNestedMsg", "NestedDefinition_NestedMessage_NestedNestedMsg", 1) + `,`, + `B:` + valueToStringThetest(this.B) + `,`, + `C:` + strings.Replace(fmt.Sprintf("%v", this.C), "NestedDefinition_NestedMessage", "NestedDefinition_NestedMessage", 1) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NinOptNativeDefault) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NinOptNativeDefault{`, + `Field1:` + valueToStringThetest(this.Field1) + `,`, + `Field2:` + valueToStringThetest(this.Field2) + `,`, + `Field3:` + valueToStringThetest(this.Field3) + `,`, + `Field4:` + valueToStringThetest(this.Field4) + `,`, + `Field5:` + valueToStringThetest(this.Field5) + `,`, + `Field6:` + valueToStringThetest(this.Field6) + `,`, + `Field7:` + valueToStringThetest(this.Field7) + `,`, + `Field8:` + valueToStringThetest(this.Field8) + `,`, + `Field9:` + valueToStringThetest(this.Field9) + `,`, + `Field10:` + valueToStringThetest(this.Field10) + `,`, + `Field11:` + valueToStringThetest(this.Field11) + `,`, + `Field12:` + valueToStringThetest(this.Field12) + `,`, + `Field13:` + valueToStringThetest(this.Field13) + `,`, + `Field14:` + valueToStringThetest(this.Field14) + `,`, + `Field15:` + valueToStringThetest(this.Field15) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *CustomContainer) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&CustomContainer{`, + `CustomStruct:` + strings.Replace(strings.Replace(this.CustomStruct.String(), "NidOptCustom", "NidOptCustom", 1), `&`, ``, 1) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *CustomNameNidOptNative) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&CustomNameNidOptNative{`, + `FieldA:` + fmt.Sprintf("%v", this.FieldA) + `,`, + `FieldB:` + fmt.Sprintf("%v", this.FieldB) + `,`, + `FieldC:` + fmt.Sprintf("%v", this.FieldC) + `,`, + `FieldD:` + fmt.Sprintf("%v", this.FieldD) + `,`, + `FieldE:` + fmt.Sprintf("%v", this.FieldE) + `,`, + `FieldF:` + fmt.Sprintf("%v", this.FieldF) + `,`, + `FieldG:` + fmt.Sprintf("%v", this.FieldG) + `,`, + `FieldH:` + fmt.Sprintf("%v", this.FieldH) + `,`, + `FieldI:` + fmt.Sprintf("%v", this.FieldI) + `,`, + `FieldJ:` + fmt.Sprintf("%v", this.FieldJ) + `,`, + `FieldK:` + fmt.Sprintf("%v", this.FieldK) + `,`, + `FieldL:` + fmt.Sprintf("%v", this.FieldL) + `,`, + `FieldM:` + fmt.Sprintf("%v", this.FieldM) + `,`, + `FieldN:` + fmt.Sprintf("%v", this.FieldN) + `,`, + `FieldO:` + fmt.Sprintf("%v", this.FieldO) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *CustomNameNinOptNative) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&CustomNameNinOptNative{`, + `FieldA:` + valueToStringThetest(this.FieldA) + `,`, + `FieldB:` + valueToStringThetest(this.FieldB) + `,`, + `FieldC:` + valueToStringThetest(this.FieldC) + `,`, + `FieldD:` + valueToStringThetest(this.FieldD) + `,`, + `FieldE:` + valueToStringThetest(this.FieldE) + `,`, + `FieldF:` + valueToStringThetest(this.FieldF) + `,`, + `FieldG:` + valueToStringThetest(this.FieldG) + `,`, + `FieldH:` + valueToStringThetest(this.FieldH) + `,`, + `FieldI:` + valueToStringThetest(this.FieldI) + `,`, + `FieldJ:` + valueToStringThetest(this.FieldJ) + `,`, + `FieldK:` + valueToStringThetest(this.FieldK) + `,`, + `FielL:` + valueToStringThetest(this.FielL) + `,`, + `FieldM:` + valueToStringThetest(this.FieldM) + `,`, + `FieldN:` + valueToStringThetest(this.FieldN) + `,`, + `FieldO:` + valueToStringThetest(this.FieldO) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *CustomNameNinRepNative) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&CustomNameNinRepNative{`, + `FieldA:` + fmt.Sprintf("%v", this.FieldA) + `,`, + `FieldB:` + fmt.Sprintf("%v", this.FieldB) + `,`, + `FieldC:` + fmt.Sprintf("%v", this.FieldC) + `,`, + `FieldD:` + fmt.Sprintf("%v", this.FieldD) + `,`, + `FieldE:` + fmt.Sprintf("%v", this.FieldE) + `,`, + `FieldF:` + fmt.Sprintf("%v", this.FieldF) + `,`, + `FieldG:` + fmt.Sprintf("%v", this.FieldG) + `,`, + `FieldH:` + fmt.Sprintf("%v", this.FieldH) + `,`, + `FieldI:` + fmt.Sprintf("%v", this.FieldI) + `,`, + `FieldJ:` + fmt.Sprintf("%v", this.FieldJ) + `,`, + `FieldK:` + fmt.Sprintf("%v", this.FieldK) + `,`, + `FieldL:` + fmt.Sprintf("%v", this.FieldL) + `,`, + `FieldM:` + fmt.Sprintf("%v", this.FieldM) + `,`, + `FieldN:` + fmt.Sprintf("%v", this.FieldN) + `,`, + `FieldO:` + fmt.Sprintf("%v", this.FieldO) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *CustomNameNinStruct) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&CustomNameNinStruct{`, + `FieldA:` + valueToStringThetest(this.FieldA) + `,`, + `FieldB:` + valueToStringThetest(this.FieldB) + `,`, + `FieldC:` + strings.Replace(fmt.Sprintf("%v", this.FieldC), "NidOptNative", "NidOptNative", 1) + `,`, + `FieldD:` + strings.Replace(fmt.Sprintf("%v", this.FieldD), "NinOptNative", "NinOptNative", 1) + `,`, + `FieldE:` + valueToStringThetest(this.FieldE) + `,`, + `FieldF:` + valueToStringThetest(this.FieldF) + `,`, + `FieldG:` + strings.Replace(fmt.Sprintf("%v", this.FieldG), "NidOptNative", "NidOptNative", 1) + `,`, + `FieldH:` + valueToStringThetest(this.FieldH) + `,`, + `FieldI:` + valueToStringThetest(this.FieldI) + `,`, + `FieldJ:` + valueToStringThetest(this.FieldJ) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *CustomNameCustomType) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&CustomNameCustomType{`, + `FieldA:` + valueToStringThetest(this.FieldA) + `,`, + `FieldB:` + valueToStringThetest(this.FieldB) + `,`, + `FieldC:` + fmt.Sprintf("%v", this.FieldC) + `,`, + `FieldD:` + fmt.Sprintf("%v", this.FieldD) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *CustomNameNinEmbeddedStructUnion) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&CustomNameNinEmbeddedStructUnion{`, + `NidOptNative:` + strings.Replace(fmt.Sprintf("%v", this.NidOptNative), "NidOptNative", "NidOptNative", 1) + `,`, + `FieldA:` + strings.Replace(fmt.Sprintf("%v", this.FieldA), "NinOptNative", "NinOptNative", 1) + `,`, + `FieldB:` + valueToStringThetest(this.FieldB) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *CustomNameEnum) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&CustomNameEnum{`, + `FieldA:` + valueToStringThetest(this.FieldA) + `,`, + `FieldB:` + fmt.Sprintf("%v", this.FieldB) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NoExtensionsMap) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NoExtensionsMap{`, + `Field1:` + valueToStringThetest(this.Field1) + `,`, + `XXX_extensions:` + proto.StringFromExtensionsBytes(this.XXX_extensions) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *Unrecognized) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&Unrecognized{`, + `Field1:` + valueToStringThetest(this.Field1) + `,`, + `}`, + }, "") + return s +} +func (this *UnrecognizedWithInner) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&UnrecognizedWithInner{`, + `Embedded:` + strings.Replace(fmt.Sprintf("%v", this.Embedded), "UnrecognizedWithInner_Inner", "UnrecognizedWithInner_Inner", 1) + `,`, + `Field2:` + valueToStringThetest(this.Field2) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *UnrecognizedWithInner_Inner) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&UnrecognizedWithInner_Inner{`, + `Field1:` + valueToStringThetest(this.Field1) + `,`, + `}`, + }, "") + return s +} +func (this *UnrecognizedWithEmbed) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&UnrecognizedWithEmbed{`, + `UnrecognizedWithEmbed_Embedded:` + strings.Replace(strings.Replace(this.UnrecognizedWithEmbed_Embedded.String(), "UnrecognizedWithEmbed_Embedded", "UnrecognizedWithEmbed_Embedded", 1), `&`, ``, 1) + `,`, + `Field2:` + valueToStringThetest(this.Field2) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *UnrecognizedWithEmbed_Embedded) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&UnrecognizedWithEmbed_Embedded{`, + `Field1:` + valueToStringThetest(this.Field1) + `,`, + `}`, + }, "") + return s +} +func (this *Node) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&Node{`, + `Label:` + valueToStringThetest(this.Label) + `,`, + `Children:` + strings.Replace(fmt.Sprintf("%v", this.Children), "Node", "Node", 1) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func valueToStringThetest(v interface{}) string { + rv := reflect.ValueOf(v) + if rv.IsNil() { + return "nil" + } + pv := reflect.Indirect(rv).Interface() + return fmt.Sprintf("*%v", pv) +} +func (this *NinOptNativeUnion) GetValue() interface{} { + if this.Field1 != nil { + return this.Field1 + } + if this.Field2 != nil { + return this.Field2 + } + if this.Field3 != nil { + return this.Field3 + } + if this.Field4 != nil { + return this.Field4 + } + if this.Field5 != nil { + return this.Field5 + } + if this.Field6 != nil { + return this.Field6 + } + if this.Field13 != nil { + return this.Field13 + } + if this.Field14 != nil { + return this.Field14 + } + if this.Field15 != nil { + return this.Field15 + } + return nil +} + +func (this *NinOptNativeUnion) SetValue(value interface{}) bool { + switch vt := value.(type) { + case *float64: + this.Field1 = vt + case *float32: + this.Field2 = vt + case *int32: + this.Field3 = vt + case *int64: + this.Field4 = vt + case *uint32: + this.Field5 = vt + case *uint64: + this.Field6 = vt + case *bool: + this.Field13 = vt + case *string: + this.Field14 = vt + case []byte: + this.Field15 = vt + default: + return false + } + return true +} +func (this *NinOptStructUnion) GetValue() interface{} { + if this.Field1 != nil { + return this.Field1 + } + if this.Field2 != nil { + return this.Field2 + } + if this.Field3 != nil { + return this.Field3 + } + if this.Field4 != nil { + return this.Field4 + } + if this.Field6 != nil { + return this.Field6 + } + if this.Field7 != nil { + return this.Field7 + } + if this.Field13 != nil { + return this.Field13 + } + if this.Field14 != nil { + return this.Field14 + } + if this.Field15 != nil { + return this.Field15 + } + return nil +} + +func (this *NinOptStructUnion) SetValue(value interface{}) bool { + switch vt := value.(type) { + case *float64: + this.Field1 = vt + case *float32: + this.Field2 = vt + case *NidOptNative: + this.Field3 = vt + case *NinOptNative: + this.Field4 = vt + case *uint64: + this.Field6 = vt + case *int32: + this.Field7 = vt + case *bool: + this.Field13 = vt + case *string: + this.Field14 = vt + case []byte: + this.Field15 = vt + default: + return false + } + return true +} +func (this *NinEmbeddedStructUnion) GetValue() interface{} { + if this.NidOptNative != nil { + return this.NidOptNative + } + if this.Field200 != nil { + return this.Field200 + } + if this.Field210 != nil { + return this.Field210 + } + return nil +} + +func (this *NinEmbeddedStructUnion) SetValue(value interface{}) bool { + switch vt := value.(type) { + case *NidOptNative: + this.NidOptNative = vt + case *NinOptNative: + this.Field200 = vt + case *bool: + this.Field210 = vt + default: + return false + } + return true +} +func (this *NinNestedStructUnion) GetValue() interface{} { + if this.Field1 != nil { + return this.Field1 + } + if this.Field2 != nil { + return this.Field2 + } + if this.Field3 != nil { + return this.Field3 + } + return nil +} + +func (this *NinNestedStructUnion) SetValue(value interface{}) bool { + switch vt := value.(type) { + case *NinOptNativeUnion: + this.Field1 = vt + case *NinOptStructUnion: + this.Field2 = vt + case *NinEmbeddedStructUnion: + this.Field3 = vt + default: + this.Field1 = new(NinOptNativeUnion) + if set := this.Field1.SetValue(value); set { + return true + } + this.Field1 = nil + this.Field2 = new(NinOptStructUnion) + if set := this.Field2.SetValue(value); set { + return true + } + this.Field2 = nil + this.Field3 = new(NinEmbeddedStructUnion) + if set := this.Field3.SetValue(value); set { + return true + } + this.Field3 = nil + return false + } + return true +} +func (this *Tree) GetValue() interface{} { + if this.Or != nil { + return this.Or + } + if this.And != nil { + return this.And + } + if this.Leaf != nil { + return this.Leaf + } + return nil +} + +func (this *Tree) SetValue(value interface{}) bool { + switch vt := value.(type) { + case *OrBranch: + this.Or = vt + case *AndBranch: + this.And = vt + case *Leaf: + this.Leaf = vt + default: + return false + } + return true +} +func (this *DeepTree) GetValue() interface{} { + if this.Down != nil { + return this.Down + } + if this.And != nil { + return this.And + } + if this.Leaf != nil { + return this.Leaf + } + return nil +} + +func (this *DeepTree) SetValue(value interface{}) bool { + switch vt := value.(type) { + case *ADeepBranch: + this.Down = vt + case *AndDeepBranch: + this.And = vt + case *DeepLeaf: + this.Leaf = vt + default: + return false + } + return true +} +func (this *CustomNameNinEmbeddedStructUnion) GetValue() interface{} { + if this.NidOptNative != nil { + return this.NidOptNative + } + if this.FieldA != nil { + return this.FieldA + } + if this.FieldB != nil { + return this.FieldB + } + return nil +} + +func (this *CustomNameNinEmbeddedStructUnion) SetValue(value interface{}) bool { + switch vt := value.(type) { + case *NidOptNative: + this.NidOptNative = vt + case *NinOptNative: + this.FieldA = vt + case *bool: + this.FieldB = vt + default: + return false + } + return true +} +func (m *NidOptNative) 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 ErrIntOverflowThetestUnsafe + } + 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: NidOptNative: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: NidOptNative: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) + } + if iNdEx+8 > l { + return io.ErrUnexpectedEOF + } + m.Field1 = *(*float64)(unsafe.Pointer(&data[iNdEx])) + iNdEx += 8 + case 2: + if wireType != 5 { + return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType) + } + if iNdEx+4 > l { + return io.ErrUnexpectedEOF + } + m.Field2 = *(*float32)(unsafe.Pointer(&data[iNdEx])) + iNdEx += 4 + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field3", wireType) + } + m.Field3 = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + m.Field3 |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field4", wireType) + } + m.Field4 = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + m.Field4 |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + case 5: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field5", wireType) + } + m.Field5 = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + m.Field5 |= (uint32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + case 6: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field6", wireType) + } + m.Field6 = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + m.Field6 |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + case 7: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field7", wireType) + } + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + v = int32((uint32(v) >> 1) ^ uint32(((v&1)<<31)>>31)) + m.Field7 = v + case 8: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field8", wireType) + } + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + v = (v >> 1) ^ uint64((int64(v&1)<<63)>>63) + m.Field8 = int64(v) + case 9: + if wireType != 5 { + return fmt.Errorf("proto: wrong wireType = %d for field Field9", wireType) + } + if iNdEx+4 > l { + return io.ErrUnexpectedEOF + } + m.Field9 = *(*uint32)(unsafe.Pointer(&data[iNdEx])) + iNdEx += 4 + case 10: + if wireType != 5 { + return fmt.Errorf("proto: wrong wireType = %d for field Field10", wireType) + } + if iNdEx+4 > l { + return io.ErrUnexpectedEOF + } + m.Field10 = *(*int32)(unsafe.Pointer(&data[iNdEx])) + iNdEx += 4 + case 11: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field Field11", wireType) + } + if iNdEx+8 > l { + return io.ErrUnexpectedEOF + } + m.Field11 = *(*uint64)(unsafe.Pointer(&data[iNdEx])) + iNdEx += 8 + case 12: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field Field12", wireType) + } + if iNdEx+8 > l { + return io.ErrUnexpectedEOF + } + m.Field12 = *(*int64)(unsafe.Pointer(&data[iNdEx])) + iNdEx += 8 + case 13: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field13", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field13 = bool(v != 0) + case 14: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field14", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + 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 ErrInvalidLengthThetestUnsafe + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Field14 = string(data[iNdEx:postIndex]) + iNdEx = postIndex + case 15: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field15", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthThetestUnsafe + } + postIndex := iNdEx + byteLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Field15 = append(m.Field15[:0], data[iNdEx:postIndex]...) + if m.Field15 == nil { + m.Field15 = []byte{} + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipThetestUnsafe(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetestUnsafe + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *NinOptNative) 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 ErrIntOverflowThetestUnsafe + } + 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: NinOptNative: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: NinOptNative: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) + } + var v float64 + if iNdEx+8 > l { + return io.ErrUnexpectedEOF + } + v = *(*float64)(unsafe.Pointer(&data[iNdEx])) + iNdEx += 8 + m.Field1 = &v + case 2: + if wireType != 5 { + return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType) + } + var v float32 + if iNdEx+4 > l { + return io.ErrUnexpectedEOF + } + v = *(*float32)(unsafe.Pointer(&data[iNdEx])) + iNdEx += 4 + m.Field2 = &v + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field3", wireType) + } + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field3 = &v + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field4", wireType) + } + var v int64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field4 = &v + case 5: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field5", wireType) + } + var v uint32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (uint32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field5 = &v + case 6: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field6", wireType) + } + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field6 = &v + case 7: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field7", wireType) + } + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + v = int32((uint32(v) >> 1) ^ uint32(((v&1)<<31)>>31)) + m.Field7 = &v + case 8: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field8", wireType) + } + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + v = (v >> 1) ^ uint64((int64(v&1)<<63)>>63) + v2 := int64(v) + m.Field8 = &v2 + case 9: + if wireType != 5 { + return fmt.Errorf("proto: wrong wireType = %d for field Field9", wireType) + } + var v uint32 + if iNdEx+4 > l { + return io.ErrUnexpectedEOF + } + v = *(*uint32)(unsafe.Pointer(&data[iNdEx])) + iNdEx += 4 + m.Field9 = &v + case 10: + if wireType != 5 { + return fmt.Errorf("proto: wrong wireType = %d for field Field10", wireType) + } + var v int32 + if iNdEx+4 > l { + return io.ErrUnexpectedEOF + } + v = *(*int32)(unsafe.Pointer(&data[iNdEx])) + iNdEx += 4 + m.Field10 = &v + case 11: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field Field11", wireType) + } + var v uint64 + if iNdEx+8 > l { + return io.ErrUnexpectedEOF + } + v = *(*uint64)(unsafe.Pointer(&data[iNdEx])) + iNdEx += 8 + m.Field11 = &v + case 12: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field Field12", wireType) + } + var v int64 + if iNdEx+8 > l { + return io.ErrUnexpectedEOF + } + v = *(*int64)(unsafe.Pointer(&data[iNdEx])) + iNdEx += 8 + m.Field12 = &v + case 13: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field13", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + b := bool(v != 0) + m.Field13 = &b + case 14: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field14", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + 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 ErrInvalidLengthThetestUnsafe + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + s := string(data[iNdEx:postIndex]) + m.Field14 = &s + iNdEx = postIndex + case 15: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field15", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthThetestUnsafe + } + postIndex := iNdEx + byteLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Field15 = append(m.Field15[:0], data[iNdEx:postIndex]...) + if m.Field15 == nil { + m.Field15 = []byte{} + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipThetestUnsafe(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetestUnsafe + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *NidRepNative) 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 ErrIntOverflowThetestUnsafe + } + 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: NidRepNative: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: NidRepNative: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) + } + var v float64 + if iNdEx+8 > l { + return io.ErrUnexpectedEOF + } + v = *(*float64)(unsafe.Pointer(&data[iNdEx])) + iNdEx += 8 + m.Field1 = append(m.Field1, v) + case 2: + if wireType != 5 { + return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType) + } + var v float32 + if iNdEx+4 > l { + return io.ErrUnexpectedEOF + } + v = *(*float32)(unsafe.Pointer(&data[iNdEx])) + iNdEx += 4 + m.Field2 = append(m.Field2, v) + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field3", wireType) + } + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field3 = append(m.Field3, v) + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field4", wireType) + } + var v int64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field4 = append(m.Field4, v) + case 5: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field5", wireType) + } + var v uint32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (uint32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field5 = append(m.Field5, v) + case 6: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field6", wireType) + } + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field6 = append(m.Field6, v) + case 7: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field7", wireType) + } + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + v = int32((uint32(v) >> 1) ^ uint32(((v&1)<<31)>>31)) + m.Field7 = append(m.Field7, v) + case 8: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field8", wireType) + } + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + v = (v >> 1) ^ uint64((int64(v&1)<<63)>>63) + m.Field8 = append(m.Field8, int64(v)) + case 9: + if wireType != 5 { + return fmt.Errorf("proto: wrong wireType = %d for field Field9", wireType) + } + var v uint32 + if iNdEx+4 > l { + return io.ErrUnexpectedEOF + } + v = *(*uint32)(unsafe.Pointer(&data[iNdEx])) + iNdEx += 4 + m.Field9 = append(m.Field9, v) + case 10: + if wireType != 5 { + return fmt.Errorf("proto: wrong wireType = %d for field Field10", wireType) + } + var v int32 + if iNdEx+4 > l { + return io.ErrUnexpectedEOF + } + v = *(*int32)(unsafe.Pointer(&data[iNdEx])) + iNdEx += 4 + m.Field10 = append(m.Field10, v) + case 11: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field Field11", wireType) + } + var v uint64 + if iNdEx+8 > l { + return io.ErrUnexpectedEOF + } + v = *(*uint64)(unsafe.Pointer(&data[iNdEx])) + iNdEx += 8 + m.Field11 = append(m.Field11, v) + case 12: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field Field12", wireType) + } + var v int64 + if iNdEx+8 > l { + return io.ErrUnexpectedEOF + } + v = *(*int64)(unsafe.Pointer(&data[iNdEx])) + iNdEx += 8 + m.Field12 = append(m.Field12, v) + case 13: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field13", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field13 = append(m.Field13, bool(v != 0)) + case 14: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field14", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + 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 ErrInvalidLengthThetestUnsafe + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Field14 = append(m.Field14, string(data[iNdEx:postIndex])) + iNdEx = postIndex + case 15: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field15", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthThetestUnsafe + } + postIndex := iNdEx + byteLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Field15 = append(m.Field15, make([]byte, postIndex-iNdEx)) + copy(m.Field15[len(m.Field15)-1], data[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipThetestUnsafe(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetestUnsafe + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *NinRepNative) 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 ErrIntOverflowThetestUnsafe + } + 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: NinRepNative: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: NinRepNative: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) + } + var v float64 + if iNdEx+8 > l { + return io.ErrUnexpectedEOF + } + v = *(*float64)(unsafe.Pointer(&data[iNdEx])) + iNdEx += 8 + m.Field1 = append(m.Field1, v) + case 2: + if wireType != 5 { + return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType) + } + var v float32 + if iNdEx+4 > l { + return io.ErrUnexpectedEOF + } + v = *(*float32)(unsafe.Pointer(&data[iNdEx])) + iNdEx += 4 + m.Field2 = append(m.Field2, v) + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field3", wireType) + } + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field3 = append(m.Field3, v) + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field4", wireType) + } + var v int64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field4 = append(m.Field4, v) + case 5: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field5", wireType) + } + var v uint32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (uint32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field5 = append(m.Field5, v) + case 6: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field6", wireType) + } + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field6 = append(m.Field6, v) + case 7: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field7", wireType) + } + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + v = int32((uint32(v) >> 1) ^ uint32(((v&1)<<31)>>31)) + m.Field7 = append(m.Field7, v) + case 8: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field8", wireType) + } + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + v = (v >> 1) ^ uint64((int64(v&1)<<63)>>63) + m.Field8 = append(m.Field8, int64(v)) + case 9: + if wireType != 5 { + return fmt.Errorf("proto: wrong wireType = %d for field Field9", wireType) + } + var v uint32 + if iNdEx+4 > l { + return io.ErrUnexpectedEOF + } + v = *(*uint32)(unsafe.Pointer(&data[iNdEx])) + iNdEx += 4 + m.Field9 = append(m.Field9, v) + case 10: + if wireType != 5 { + return fmt.Errorf("proto: wrong wireType = %d for field Field10", wireType) + } + var v int32 + if iNdEx+4 > l { + return io.ErrUnexpectedEOF + } + v = *(*int32)(unsafe.Pointer(&data[iNdEx])) + iNdEx += 4 + m.Field10 = append(m.Field10, v) + case 11: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field Field11", wireType) + } + var v uint64 + if iNdEx+8 > l { + return io.ErrUnexpectedEOF + } + v = *(*uint64)(unsafe.Pointer(&data[iNdEx])) + iNdEx += 8 + m.Field11 = append(m.Field11, v) + case 12: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field Field12", wireType) + } + var v int64 + if iNdEx+8 > l { + return io.ErrUnexpectedEOF + } + v = *(*int64)(unsafe.Pointer(&data[iNdEx])) + iNdEx += 8 + m.Field12 = append(m.Field12, v) + case 13: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field13", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field13 = append(m.Field13, bool(v != 0)) + case 14: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field14", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + 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 ErrInvalidLengthThetestUnsafe + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Field14 = append(m.Field14, string(data[iNdEx:postIndex])) + iNdEx = postIndex + case 15: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field15", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthThetestUnsafe + } + postIndex := iNdEx + byteLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Field15 = append(m.Field15, make([]byte, postIndex-iNdEx)) + copy(m.Field15[len(m.Field15)-1], data[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipThetestUnsafe(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetestUnsafe + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *NidRepPackedNative) 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 ErrIntOverflowThetestUnsafe + } + 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: NidRepPackedNative: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: NidRepPackedNative: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthThetestUnsafe + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + for iNdEx < postIndex { + var v float64 + if iNdEx+8 > l { + return io.ErrUnexpectedEOF + } + v = *(*float64)(unsafe.Pointer(&data[iNdEx])) + iNdEx += 8 + m.Field1 = append(m.Field1, v) + } + } else if wireType == 1 { + var v float64 + if iNdEx+8 > l { + return io.ErrUnexpectedEOF + } + v = *(*float64)(unsafe.Pointer(&data[iNdEx])) + iNdEx += 8 + m.Field1 = append(m.Field1, v) + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) + } + case 2: + if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthThetestUnsafe + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + for iNdEx < postIndex { + var v float32 + if iNdEx+4 > l { + return io.ErrUnexpectedEOF + } + v = *(*float32)(unsafe.Pointer(&data[iNdEx])) + iNdEx += 4 + m.Field2 = append(m.Field2, v) + } + } else if wireType == 5 { + var v float32 + if iNdEx+4 > l { + return io.ErrUnexpectedEOF + } + v = *(*float32)(unsafe.Pointer(&data[iNdEx])) + iNdEx += 4 + m.Field2 = append(m.Field2, v) + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType) + } + case 3: + if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthThetestUnsafe + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + for iNdEx < postIndex { + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field3 = append(m.Field3, v) + } + } else if wireType == 0 { + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field3 = append(m.Field3, v) + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field3", wireType) + } + case 4: + if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthThetestUnsafe + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + for iNdEx < postIndex { + var v int64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field4 = append(m.Field4, v) + } + } else if wireType == 0 { + var v int64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field4 = append(m.Field4, v) + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field4", wireType) + } + case 5: + if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthThetestUnsafe + } + 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 ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (uint32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field5 = append(m.Field5, v) + } + } else if wireType == 0 { + var v uint32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (uint32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field5 = append(m.Field5, v) + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field5", wireType) + } + case 6: + if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthThetestUnsafe + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + for iNdEx < postIndex { + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field6 = append(m.Field6, v) + } + } else if wireType == 0 { + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field6 = append(m.Field6, v) + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field6", wireType) + } + case 7: + if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthThetestUnsafe + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + for iNdEx < postIndex { + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + v = int32((uint32(v) >> 1) ^ uint32(((v&1)<<31)>>31)) + m.Field7 = append(m.Field7, v) + } + } else if wireType == 0 { + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + v = int32((uint32(v) >> 1) ^ uint32(((v&1)<<31)>>31)) + m.Field7 = append(m.Field7, v) + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field7", wireType) + } + case 8: + if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthThetestUnsafe + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + for iNdEx < postIndex { + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + v = (v >> 1) ^ uint64((int64(v&1)<<63)>>63) + m.Field8 = append(m.Field8, int64(v)) + } + } else if wireType == 0 { + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + v = (v >> 1) ^ uint64((int64(v&1)<<63)>>63) + m.Field8 = append(m.Field8, int64(v)) + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field8", wireType) + } + case 9: + if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthThetestUnsafe + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + for iNdEx < postIndex { + var v uint32 + if iNdEx+4 > l { + return io.ErrUnexpectedEOF + } + v = *(*uint32)(unsafe.Pointer(&data[iNdEx])) + iNdEx += 4 + m.Field9 = append(m.Field9, v) + } + } else if wireType == 5 { + var v uint32 + if iNdEx+4 > l { + return io.ErrUnexpectedEOF + } + v = *(*uint32)(unsafe.Pointer(&data[iNdEx])) + iNdEx += 4 + m.Field9 = append(m.Field9, v) + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field9", wireType) + } + case 10: + if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthThetestUnsafe + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + for iNdEx < postIndex { + var v int32 + if iNdEx+4 > l { + return io.ErrUnexpectedEOF + } + v = *(*int32)(unsafe.Pointer(&data[iNdEx])) + iNdEx += 4 + m.Field10 = append(m.Field10, v) + } + } else if wireType == 5 { + var v int32 + if iNdEx+4 > l { + return io.ErrUnexpectedEOF + } + v = *(*int32)(unsafe.Pointer(&data[iNdEx])) + iNdEx += 4 + m.Field10 = append(m.Field10, v) + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field10", wireType) + } + case 11: + if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthThetestUnsafe + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + for iNdEx < postIndex { + var v uint64 + if iNdEx+8 > l { + return io.ErrUnexpectedEOF + } + v = *(*uint64)(unsafe.Pointer(&data[iNdEx])) + iNdEx += 8 + m.Field11 = append(m.Field11, v) + } + } else if wireType == 1 { + var v uint64 + if iNdEx+8 > l { + return io.ErrUnexpectedEOF + } + v = *(*uint64)(unsafe.Pointer(&data[iNdEx])) + iNdEx += 8 + m.Field11 = append(m.Field11, v) + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field11", wireType) + } + case 12: + if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthThetestUnsafe + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + for iNdEx < postIndex { + var v int64 + if iNdEx+8 > l { + return io.ErrUnexpectedEOF + } + v = *(*int64)(unsafe.Pointer(&data[iNdEx])) + iNdEx += 8 + m.Field12 = append(m.Field12, v) + } + } else if wireType == 1 { + var v int64 + if iNdEx+8 > l { + return io.ErrUnexpectedEOF + } + v = *(*int64)(unsafe.Pointer(&data[iNdEx])) + iNdEx += 8 + m.Field12 = append(m.Field12, v) + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field12", wireType) + } + case 13: + if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthThetestUnsafe + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + for iNdEx < postIndex { + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field13 = append(m.Field13, bool(v != 0)) + } + } else if wireType == 0 { + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field13 = append(m.Field13, bool(v != 0)) + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field13", wireType) + } + default: + iNdEx = preIndex + skippy, err := skipThetestUnsafe(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetestUnsafe + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *NinRepPackedNative) 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 ErrIntOverflowThetestUnsafe + } + 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: NinRepPackedNative: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: NinRepPackedNative: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthThetestUnsafe + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + for iNdEx < postIndex { + var v float64 + if iNdEx+8 > l { + return io.ErrUnexpectedEOF + } + v = *(*float64)(unsafe.Pointer(&data[iNdEx])) + iNdEx += 8 + m.Field1 = append(m.Field1, v) + } + } else if wireType == 1 { + var v float64 + if iNdEx+8 > l { + return io.ErrUnexpectedEOF + } + v = *(*float64)(unsafe.Pointer(&data[iNdEx])) + iNdEx += 8 + m.Field1 = append(m.Field1, v) + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) + } + case 2: + if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthThetestUnsafe + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + for iNdEx < postIndex { + var v float32 + if iNdEx+4 > l { + return io.ErrUnexpectedEOF + } + v = *(*float32)(unsafe.Pointer(&data[iNdEx])) + iNdEx += 4 + m.Field2 = append(m.Field2, v) + } + } else if wireType == 5 { + var v float32 + if iNdEx+4 > l { + return io.ErrUnexpectedEOF + } + v = *(*float32)(unsafe.Pointer(&data[iNdEx])) + iNdEx += 4 + m.Field2 = append(m.Field2, v) + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType) + } + case 3: + if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthThetestUnsafe + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + for iNdEx < postIndex { + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field3 = append(m.Field3, v) + } + } else if wireType == 0 { + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field3 = append(m.Field3, v) + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field3", wireType) + } + case 4: + if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthThetestUnsafe + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + for iNdEx < postIndex { + var v int64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field4 = append(m.Field4, v) + } + } else if wireType == 0 { + var v int64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field4 = append(m.Field4, v) + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field4", wireType) + } + case 5: + if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthThetestUnsafe + } + 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 ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (uint32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field5 = append(m.Field5, v) + } + } else if wireType == 0 { + var v uint32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (uint32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field5 = append(m.Field5, v) + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field5", wireType) + } + case 6: + if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthThetestUnsafe + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + for iNdEx < postIndex { + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field6 = append(m.Field6, v) + } + } else if wireType == 0 { + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field6 = append(m.Field6, v) + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field6", wireType) + } + case 7: + if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthThetestUnsafe + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + for iNdEx < postIndex { + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + v = int32((uint32(v) >> 1) ^ uint32(((v&1)<<31)>>31)) + m.Field7 = append(m.Field7, v) + } + } else if wireType == 0 { + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + v = int32((uint32(v) >> 1) ^ uint32(((v&1)<<31)>>31)) + m.Field7 = append(m.Field7, v) + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field7", wireType) + } + case 8: + if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthThetestUnsafe + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + for iNdEx < postIndex { + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + v = (v >> 1) ^ uint64((int64(v&1)<<63)>>63) + m.Field8 = append(m.Field8, int64(v)) + } + } else if wireType == 0 { + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + v = (v >> 1) ^ uint64((int64(v&1)<<63)>>63) + m.Field8 = append(m.Field8, int64(v)) + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field8", wireType) + } + case 9: + if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthThetestUnsafe + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + for iNdEx < postIndex { + var v uint32 + if iNdEx+4 > l { + return io.ErrUnexpectedEOF + } + v = *(*uint32)(unsafe.Pointer(&data[iNdEx])) + iNdEx += 4 + m.Field9 = append(m.Field9, v) + } + } else if wireType == 5 { + var v uint32 + if iNdEx+4 > l { + return io.ErrUnexpectedEOF + } + v = *(*uint32)(unsafe.Pointer(&data[iNdEx])) + iNdEx += 4 + m.Field9 = append(m.Field9, v) + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field9", wireType) + } + case 10: + if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthThetestUnsafe + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + for iNdEx < postIndex { + var v int32 + if iNdEx+4 > l { + return io.ErrUnexpectedEOF + } + v = *(*int32)(unsafe.Pointer(&data[iNdEx])) + iNdEx += 4 + m.Field10 = append(m.Field10, v) + } + } else if wireType == 5 { + var v int32 + if iNdEx+4 > l { + return io.ErrUnexpectedEOF + } + v = *(*int32)(unsafe.Pointer(&data[iNdEx])) + iNdEx += 4 + m.Field10 = append(m.Field10, v) + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field10", wireType) + } + case 11: + if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthThetestUnsafe + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + for iNdEx < postIndex { + var v uint64 + if iNdEx+8 > l { + return io.ErrUnexpectedEOF + } + v = *(*uint64)(unsafe.Pointer(&data[iNdEx])) + iNdEx += 8 + m.Field11 = append(m.Field11, v) + } + } else if wireType == 1 { + var v uint64 + if iNdEx+8 > l { + return io.ErrUnexpectedEOF + } + v = *(*uint64)(unsafe.Pointer(&data[iNdEx])) + iNdEx += 8 + m.Field11 = append(m.Field11, v) + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field11", wireType) + } + case 12: + if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthThetestUnsafe + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + for iNdEx < postIndex { + var v int64 + if iNdEx+8 > l { + return io.ErrUnexpectedEOF + } + v = *(*int64)(unsafe.Pointer(&data[iNdEx])) + iNdEx += 8 + m.Field12 = append(m.Field12, v) + } + } else if wireType == 1 { + var v int64 + if iNdEx+8 > l { + return io.ErrUnexpectedEOF + } + v = *(*int64)(unsafe.Pointer(&data[iNdEx])) + iNdEx += 8 + m.Field12 = append(m.Field12, v) + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field12", wireType) + } + case 13: + if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthThetestUnsafe + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + for iNdEx < postIndex { + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field13 = append(m.Field13, bool(v != 0)) + } + } else if wireType == 0 { + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field13 = append(m.Field13, bool(v != 0)) + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field13", wireType) + } + default: + iNdEx = preIndex + skippy, err := skipThetestUnsafe(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetestUnsafe + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *NidOptStruct) 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 ErrIntOverflowThetestUnsafe + } + 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: NidOptStruct: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: NidOptStruct: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) + } + if iNdEx+8 > l { + return io.ErrUnexpectedEOF + } + m.Field1 = *(*float64)(unsafe.Pointer(&data[iNdEx])) + iNdEx += 8 + case 2: + if wireType != 5 { + return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType) + } + if iNdEx+4 > l { + return io.ErrUnexpectedEOF + } + m.Field2 = *(*float32)(unsafe.Pointer(&data[iNdEx])) + iNdEx += 4 + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field3", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetestUnsafe + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Field3.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field4", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetestUnsafe + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Field4.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 6: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field6", wireType) + } + m.Field6 = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + m.Field6 |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + case 7: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field7", wireType) + } + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + v = int32((uint32(v) >> 1) ^ uint32(((v&1)<<31)>>31)) + m.Field7 = v + case 8: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field8", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetestUnsafe + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Field8.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 13: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field13", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field13 = bool(v != 0) + case 14: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field14", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + 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 ErrInvalidLengthThetestUnsafe + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Field14 = string(data[iNdEx:postIndex]) + iNdEx = postIndex + case 15: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field15", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthThetestUnsafe + } + postIndex := iNdEx + byteLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Field15 = append(m.Field15[:0], data[iNdEx:postIndex]...) + if m.Field15 == nil { + m.Field15 = []byte{} + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipThetestUnsafe(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetestUnsafe + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *NinOptStruct) 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 ErrIntOverflowThetestUnsafe + } + 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: NinOptStruct: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: NinOptStruct: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) + } + var v float64 + if iNdEx+8 > l { + return io.ErrUnexpectedEOF + } + v = *(*float64)(unsafe.Pointer(&data[iNdEx])) + iNdEx += 8 + m.Field1 = &v + case 2: + if wireType != 5 { + return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType) + } + var v float32 + if iNdEx+4 > l { + return io.ErrUnexpectedEOF + } + v = *(*float32)(unsafe.Pointer(&data[iNdEx])) + iNdEx += 4 + m.Field2 = &v + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field3", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetestUnsafe + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Field3 == nil { + m.Field3 = &NidOptNative{} + } + if err := m.Field3.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field4", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetestUnsafe + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Field4 == nil { + m.Field4 = &NinOptNative{} + } + if err := m.Field4.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 6: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field6", wireType) + } + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field6 = &v + case 7: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field7", wireType) + } + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + v = int32((uint32(v) >> 1) ^ uint32(((v&1)<<31)>>31)) + m.Field7 = &v + case 8: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field8", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetestUnsafe + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Field8 == nil { + m.Field8 = &NidOptNative{} + } + if err := m.Field8.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 13: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field13", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + b := bool(v != 0) + m.Field13 = &b + case 14: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field14", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + 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 ErrInvalidLengthThetestUnsafe + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + s := string(data[iNdEx:postIndex]) + m.Field14 = &s + iNdEx = postIndex + case 15: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field15", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthThetestUnsafe + } + postIndex := iNdEx + byteLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Field15 = append(m.Field15[:0], data[iNdEx:postIndex]...) + if m.Field15 == nil { + m.Field15 = []byte{} + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipThetestUnsafe(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetestUnsafe + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *NidRepStruct) 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 ErrIntOverflowThetestUnsafe + } + 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: NidRepStruct: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: NidRepStruct: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) + } + var v float64 + if iNdEx+8 > l { + return io.ErrUnexpectedEOF + } + v = *(*float64)(unsafe.Pointer(&data[iNdEx])) + iNdEx += 8 + m.Field1 = append(m.Field1, v) + case 2: + if wireType != 5 { + return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType) + } + var v float32 + if iNdEx+4 > l { + return io.ErrUnexpectedEOF + } + v = *(*float32)(unsafe.Pointer(&data[iNdEx])) + iNdEx += 4 + m.Field2 = append(m.Field2, v) + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field3", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetestUnsafe + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Field3 = append(m.Field3, NidOptNative{}) + if err := m.Field3[len(m.Field3)-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 Field4", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetestUnsafe + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Field4 = append(m.Field4, NinOptNative{}) + if err := m.Field4[len(m.Field4)-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 Field6", wireType) + } + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field6 = append(m.Field6, v) + case 7: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field7", wireType) + } + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + v = int32((uint32(v) >> 1) ^ uint32(((v&1)<<31)>>31)) + m.Field7 = append(m.Field7, v) + case 8: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field8", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetestUnsafe + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Field8 = append(m.Field8, NidOptNative{}) + if err := m.Field8[len(m.Field8)-1].Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 13: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field13", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field13 = append(m.Field13, bool(v != 0)) + case 14: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field14", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + 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 ErrInvalidLengthThetestUnsafe + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Field14 = append(m.Field14, string(data[iNdEx:postIndex])) + iNdEx = postIndex + case 15: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field15", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthThetestUnsafe + } + postIndex := iNdEx + byteLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Field15 = append(m.Field15, make([]byte, postIndex-iNdEx)) + copy(m.Field15[len(m.Field15)-1], data[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipThetestUnsafe(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetestUnsafe + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *NinRepStruct) 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 ErrIntOverflowThetestUnsafe + } + 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: NinRepStruct: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: NinRepStruct: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) + } + var v float64 + if iNdEx+8 > l { + return io.ErrUnexpectedEOF + } + v = *(*float64)(unsafe.Pointer(&data[iNdEx])) + iNdEx += 8 + m.Field1 = append(m.Field1, v) + case 2: + if wireType != 5 { + return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType) + } + var v float32 + if iNdEx+4 > l { + return io.ErrUnexpectedEOF + } + v = *(*float32)(unsafe.Pointer(&data[iNdEx])) + iNdEx += 4 + m.Field2 = append(m.Field2, v) + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field3", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetestUnsafe + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Field3 = append(m.Field3, &NidOptNative{}) + if err := m.Field3[len(m.Field3)-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 Field4", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetestUnsafe + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Field4 = append(m.Field4, &NinOptNative{}) + if err := m.Field4[len(m.Field4)-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 Field6", wireType) + } + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field6 = append(m.Field6, v) + case 7: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field7", wireType) + } + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + v = int32((uint32(v) >> 1) ^ uint32(((v&1)<<31)>>31)) + m.Field7 = append(m.Field7, v) + case 8: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field8", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetestUnsafe + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Field8 = append(m.Field8, &NidOptNative{}) + if err := m.Field8[len(m.Field8)-1].Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 13: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field13", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field13 = append(m.Field13, bool(v != 0)) + case 14: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field14", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + 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 ErrInvalidLengthThetestUnsafe + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Field14 = append(m.Field14, string(data[iNdEx:postIndex])) + iNdEx = postIndex + case 15: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field15", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthThetestUnsafe + } + postIndex := iNdEx + byteLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Field15 = append(m.Field15, make([]byte, postIndex-iNdEx)) + copy(m.Field15[len(m.Field15)-1], data[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipThetestUnsafe(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetestUnsafe + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *NidEmbeddedStruct) 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 ErrIntOverflowThetestUnsafe + } + 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: NidEmbeddedStruct: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: NidEmbeddedStruct: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NidOptNative", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetestUnsafe + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.NidOptNative == nil { + m.NidOptNative = &NidOptNative{} + } + if err := m.NidOptNative.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 200: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field200", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetestUnsafe + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Field200.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 210: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field210", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field210 = bool(v != 0) + default: + iNdEx = preIndex + skippy, err := skipThetestUnsafe(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetestUnsafe + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *NinEmbeddedStruct) 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 ErrIntOverflowThetestUnsafe + } + 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: NinEmbeddedStruct: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: NinEmbeddedStruct: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NidOptNative", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetestUnsafe + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.NidOptNative == nil { + m.NidOptNative = &NidOptNative{} + } + if err := m.NidOptNative.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 200: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field200", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetestUnsafe + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Field200 == nil { + m.Field200 = &NidOptNative{} + } + if err := m.Field200.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 210: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field210", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + b := bool(v != 0) + m.Field210 = &b + default: + iNdEx = preIndex + skippy, err := skipThetestUnsafe(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetestUnsafe + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *NidNestedStruct) 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 ErrIntOverflowThetestUnsafe + } + 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: NidNestedStruct: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: NidNestedStruct: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetestUnsafe + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Field1.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetestUnsafe + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Field2 = append(m.Field2, NidRepStruct{}) + if err := m.Field2[len(m.Field2)-1].Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipThetestUnsafe(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetestUnsafe + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *NinNestedStruct) 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 ErrIntOverflowThetestUnsafe + } + 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: NinNestedStruct: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: NinNestedStruct: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetestUnsafe + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Field1 == nil { + m.Field1 = &NinOptStruct{} + } + if err := m.Field1.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetestUnsafe + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Field2 = append(m.Field2, &NinRepStruct{}) + if err := m.Field2[len(m.Field2)-1].Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipThetestUnsafe(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetestUnsafe + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *NidOptCustom) 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 ErrIntOverflowThetestUnsafe + } + 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: NidOptCustom: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: NidOptCustom: 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 byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthThetestUnsafe + } + postIndex := iNdEx + byteLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + 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 Value", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthThetestUnsafe + } + postIndex := iNdEx + byteLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Value.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipThetestUnsafe(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetestUnsafe + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *CustomDash) 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 ErrIntOverflowThetestUnsafe + } + 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: CustomDash: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: CustomDash: 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 ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthThetestUnsafe + } + postIndex := iNdEx + byteLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var v github_com_gogo_protobuf_test_custom_dash_type.Bytes + m.Value = &v + if err := m.Value.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipThetestUnsafe(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetestUnsafe + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *NinOptCustom) 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 ErrIntOverflowThetestUnsafe + } + 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: NinOptCustom: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: NinOptCustom: 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 byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthThetestUnsafe + } + postIndex := iNdEx + byteLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var v Uuid + m.Id = &v + 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 Value", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthThetestUnsafe + } + postIndex := iNdEx + byteLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var v github_com_gogo_protobuf_test_custom.Uint128 + m.Value = &v + if err := m.Value.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipThetestUnsafe(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetestUnsafe + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *NidRepCustom) 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 ErrIntOverflowThetestUnsafe + } + 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: NidRepCustom: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: NidRepCustom: 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 byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthThetestUnsafe + } + postIndex := iNdEx + byteLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var v Uuid + m.Id = append(m.Id, v) + if err := m.Id[len(m.Id)-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 Value", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthThetestUnsafe + } + postIndex := iNdEx + byteLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var v github_com_gogo_protobuf_test_custom.Uint128 + m.Value = append(m.Value, v) + if err := m.Value[len(m.Value)-1].Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipThetestUnsafe(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetestUnsafe + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *NinRepCustom) 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 ErrIntOverflowThetestUnsafe + } + 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: NinRepCustom: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: NinRepCustom: 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 byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthThetestUnsafe + } + postIndex := iNdEx + byteLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var v Uuid + m.Id = append(m.Id, v) + if err := m.Id[len(m.Id)-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 Value", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthThetestUnsafe + } + postIndex := iNdEx + byteLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var v github_com_gogo_protobuf_test_custom.Uint128 + m.Value = append(m.Value, v) + if err := m.Value[len(m.Value)-1].Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipThetestUnsafe(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetestUnsafe + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *NinOptNativeUnion) 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 ErrIntOverflowThetestUnsafe + } + 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: NinOptNativeUnion: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: NinOptNativeUnion: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) + } + var v float64 + if iNdEx+8 > l { + return io.ErrUnexpectedEOF + } + v = *(*float64)(unsafe.Pointer(&data[iNdEx])) + iNdEx += 8 + m.Field1 = &v + case 2: + if wireType != 5 { + return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType) + } + var v float32 + if iNdEx+4 > l { + return io.ErrUnexpectedEOF + } + v = *(*float32)(unsafe.Pointer(&data[iNdEx])) + iNdEx += 4 + m.Field2 = &v + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field3", wireType) + } + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field3 = &v + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field4", wireType) + } + var v int64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field4 = &v + case 5: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field5", wireType) + } + var v uint32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (uint32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field5 = &v + case 6: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field6", wireType) + } + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field6 = &v + case 13: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field13", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + b := bool(v != 0) + m.Field13 = &b + case 14: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field14", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + 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 ErrInvalidLengthThetestUnsafe + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + s := string(data[iNdEx:postIndex]) + m.Field14 = &s + iNdEx = postIndex + case 15: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field15", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthThetestUnsafe + } + postIndex := iNdEx + byteLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Field15 = append(m.Field15[:0], data[iNdEx:postIndex]...) + if m.Field15 == nil { + m.Field15 = []byte{} + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipThetestUnsafe(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetestUnsafe + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *NinOptStructUnion) 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 ErrIntOverflowThetestUnsafe + } + 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: NinOptStructUnion: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: NinOptStructUnion: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) + } + var v float64 + if iNdEx+8 > l { + return io.ErrUnexpectedEOF + } + v = *(*float64)(unsafe.Pointer(&data[iNdEx])) + iNdEx += 8 + m.Field1 = &v + case 2: + if wireType != 5 { + return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType) + } + var v float32 + if iNdEx+4 > l { + return io.ErrUnexpectedEOF + } + v = *(*float32)(unsafe.Pointer(&data[iNdEx])) + iNdEx += 4 + m.Field2 = &v + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field3", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetestUnsafe + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Field3 == nil { + m.Field3 = &NidOptNative{} + } + if err := m.Field3.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field4", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetestUnsafe + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Field4 == nil { + m.Field4 = &NinOptNative{} + } + if err := m.Field4.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 6: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field6", wireType) + } + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field6 = &v + case 7: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field7", wireType) + } + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + v = int32((uint32(v) >> 1) ^ uint32(((v&1)<<31)>>31)) + m.Field7 = &v + case 13: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field13", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + b := bool(v != 0) + m.Field13 = &b + case 14: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field14", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + 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 ErrInvalidLengthThetestUnsafe + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + s := string(data[iNdEx:postIndex]) + m.Field14 = &s + iNdEx = postIndex + case 15: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field15", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthThetestUnsafe + } + postIndex := iNdEx + byteLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Field15 = append(m.Field15[:0], data[iNdEx:postIndex]...) + if m.Field15 == nil { + m.Field15 = []byte{} + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipThetestUnsafe(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetestUnsafe + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *NinEmbeddedStructUnion) 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 ErrIntOverflowThetestUnsafe + } + 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: NinEmbeddedStructUnion: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: NinEmbeddedStructUnion: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NidOptNative", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetestUnsafe + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.NidOptNative == nil { + m.NidOptNative = &NidOptNative{} + } + if err := m.NidOptNative.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 200: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field200", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetestUnsafe + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Field200 == nil { + m.Field200 = &NinOptNative{} + } + if err := m.Field200.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 210: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field210", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + b := bool(v != 0) + m.Field210 = &b + default: + iNdEx = preIndex + skippy, err := skipThetestUnsafe(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetestUnsafe + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *NinNestedStructUnion) 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 ErrIntOverflowThetestUnsafe + } + 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: NinNestedStructUnion: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: NinNestedStructUnion: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetestUnsafe + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Field1 == nil { + m.Field1 = &NinOptNativeUnion{} + } + if err := m.Field1.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetestUnsafe + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Field2 == nil { + m.Field2 = &NinOptStructUnion{} + } + if err := m.Field2.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field3", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetestUnsafe + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Field3 == nil { + m.Field3 = &NinEmbeddedStructUnion{} + } + if err := m.Field3.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipThetestUnsafe(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetestUnsafe + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Tree) 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 ErrIntOverflowThetestUnsafe + } + 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: Tree: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Tree: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Or", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetestUnsafe + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Or == nil { + m.Or = &OrBranch{} + } + if err := m.Or.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field And", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetestUnsafe + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.And == nil { + m.And = &AndBranch{} + } + if err := m.And.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Leaf", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetestUnsafe + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Leaf == nil { + m.Leaf = &Leaf{} + } + if err := m.Leaf.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipThetestUnsafe(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetestUnsafe + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *OrBranch) 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 ErrIntOverflowThetestUnsafe + } + 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: OrBranch: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: OrBranch: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Left", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetestUnsafe + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Left.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Right", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetestUnsafe + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Right.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipThetestUnsafe(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetestUnsafe + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *AndBranch) 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 ErrIntOverflowThetestUnsafe + } + 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: AndBranch: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: AndBranch: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Left", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetestUnsafe + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Left.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Right", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetestUnsafe + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Right.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipThetestUnsafe(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetestUnsafe + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Leaf) 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 ErrIntOverflowThetestUnsafe + } + 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: Leaf: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Leaf: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType) + } + m.Value = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + m.Value |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field StrValue", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + 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 ErrInvalidLengthThetestUnsafe + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.StrValue = string(data[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipThetestUnsafe(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetestUnsafe + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *DeepTree) 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 ErrIntOverflowThetestUnsafe + } + 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: DeepTree: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: DeepTree: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Down", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetestUnsafe + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Down == nil { + m.Down = &ADeepBranch{} + } + if err := m.Down.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field And", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetestUnsafe + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.And == nil { + m.And = &AndDeepBranch{} + } + if err := m.And.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Leaf", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetestUnsafe + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Leaf == nil { + m.Leaf = &DeepLeaf{} + } + if err := m.Leaf.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipThetestUnsafe(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetestUnsafe + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ADeepBranch) 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 ErrIntOverflowThetestUnsafe + } + 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: ADeepBranch: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ADeepBranch: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Down", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetestUnsafe + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Down.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipThetestUnsafe(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetestUnsafe + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *AndDeepBranch) 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 ErrIntOverflowThetestUnsafe + } + 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: AndDeepBranch: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: AndDeepBranch: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Left", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetestUnsafe + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Left.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Right", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetestUnsafe + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Right.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipThetestUnsafe(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetestUnsafe + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *DeepLeaf) 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 ErrIntOverflowThetestUnsafe + } + 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: DeepLeaf: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: DeepLeaf: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Tree", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetestUnsafe + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Tree.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipThetestUnsafe(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetestUnsafe + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Nil) 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 ErrIntOverflowThetestUnsafe + } + 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: Nil: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Nil: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipThetestUnsafe(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetestUnsafe + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *NidOptEnum) 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 ErrIntOverflowThetestUnsafe + } + 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: NidOptEnum: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: NidOptEnum: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) + } + m.Field1 = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + m.Field1 |= (TheTestEnum(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipThetestUnsafe(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetestUnsafe + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *NinOptEnum) 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 ErrIntOverflowThetestUnsafe + } + 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: NinOptEnum: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: NinOptEnum: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) + } + var v TheTestEnum + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (TheTestEnum(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field1 = &v + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType) + } + var v YetAnotherTestEnum + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (YetAnotherTestEnum(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field2 = &v + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field3", wireType) + } + var v YetYetAnotherTestEnum + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (YetYetAnotherTestEnum(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field3 = &v + default: + iNdEx = preIndex + skippy, err := skipThetestUnsafe(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetestUnsafe + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *NidRepEnum) 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 ErrIntOverflowThetestUnsafe + } + 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: NidRepEnum: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: NidRepEnum: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) + } + var v TheTestEnum + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (TheTestEnum(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field1 = append(m.Field1, v) + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType) + } + var v YetAnotherTestEnum + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (YetAnotherTestEnum(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field2 = append(m.Field2, v) + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field3", wireType) + } + var v YetYetAnotherTestEnum + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (YetYetAnotherTestEnum(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field3 = append(m.Field3, v) + default: + iNdEx = preIndex + skippy, err := skipThetestUnsafe(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetestUnsafe + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *NinRepEnum) 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 ErrIntOverflowThetestUnsafe + } + 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: NinRepEnum: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: NinRepEnum: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) + } + var v TheTestEnum + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (TheTestEnum(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field1 = append(m.Field1, v) + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType) + } + var v YetAnotherTestEnum + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (YetAnotherTestEnum(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field2 = append(m.Field2, v) + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field3", wireType) + } + var v YetYetAnotherTestEnum + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (YetYetAnotherTestEnum(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field3 = append(m.Field3, v) + default: + iNdEx = preIndex + skippy, err := skipThetestUnsafe(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetestUnsafe + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *NinOptEnumDefault) 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 ErrIntOverflowThetestUnsafe + } + 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: NinOptEnumDefault: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: NinOptEnumDefault: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) + } + var v TheTestEnum + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (TheTestEnum(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field1 = &v + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType) + } + var v YetAnotherTestEnum + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (YetAnotherTestEnum(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field2 = &v + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field3", wireType) + } + var v YetYetAnotherTestEnum + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (YetYetAnotherTestEnum(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field3 = &v + default: + iNdEx = preIndex + skippy, err := skipThetestUnsafe(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetestUnsafe + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *AnotherNinOptEnum) 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 ErrIntOverflowThetestUnsafe + } + 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: AnotherNinOptEnum: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: AnotherNinOptEnum: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) + } + var v AnotherTestEnum + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (AnotherTestEnum(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field1 = &v + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType) + } + var v YetAnotherTestEnum + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (YetAnotherTestEnum(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field2 = &v + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field3", wireType) + } + var v YetYetAnotherTestEnum + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (YetYetAnotherTestEnum(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field3 = &v + default: + iNdEx = preIndex + skippy, err := skipThetestUnsafe(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetestUnsafe + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *AnotherNinOptEnumDefault) 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 ErrIntOverflowThetestUnsafe + } + 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: AnotherNinOptEnumDefault: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: AnotherNinOptEnumDefault: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) + } + var v AnotherTestEnum + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (AnotherTestEnum(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field1 = &v + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType) + } + var v YetAnotherTestEnum + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (YetAnotherTestEnum(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field2 = &v + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field3", wireType) + } + var v YetYetAnotherTestEnum + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (YetYetAnotherTestEnum(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field3 = &v + default: + iNdEx = preIndex + skippy, err := skipThetestUnsafe(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetestUnsafe + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Timer) 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 ErrIntOverflowThetestUnsafe + } + 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: Timer: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Timer: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field Time1", wireType) + } + if iNdEx+8 > l { + return io.ErrUnexpectedEOF + } + m.Time1 = *(*int64)(unsafe.Pointer(&data[iNdEx])) + iNdEx += 8 + case 2: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field Time2", wireType) + } + if iNdEx+8 > l { + return io.ErrUnexpectedEOF + } + m.Time2 = *(*int64)(unsafe.Pointer(&data[iNdEx])) + iNdEx += 8 + 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 ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthThetestUnsafe + } + 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 := skipThetestUnsafe(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetestUnsafe + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MyExtendable) 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 ErrIntOverflowThetestUnsafe + } + 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: MyExtendable: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MyExtendable: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) + } + var v int64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field1 = &v + default: + if (fieldNum >= 100) && (fieldNum < 200) { + var sizeOfWire int + for { + sizeOfWire++ + wire >>= 7 + if wire == 0 { + break + } + } + iNdEx -= sizeOfWire + skippy, err := skipThetestUnsafe(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetestUnsafe + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + github_com_gogo_protobuf_proto.AppendExtension(m, int32(fieldNum), data[iNdEx:iNdEx+skippy]) + iNdEx += skippy + } else { + iNdEx = preIndex + skippy, err := skipThetestUnsafe(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetestUnsafe + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *OtherExtenable) 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 ErrIntOverflowThetestUnsafe + } + 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: OtherExtenable: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: OtherExtenable: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType) + } + var v int64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field2 = &v + case 13: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field13", wireType) + } + var v int64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field13 = &v + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field M", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetestUnsafe + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.M == nil { + m.M = &MyExtendable{} + } + if err := m.M.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + if ((fieldNum >= 14) && (fieldNum < 17)) || ((fieldNum >= 10) && (fieldNum < 13)) { + var sizeOfWire int + for { + sizeOfWire++ + wire >>= 7 + if wire == 0 { + break + } + } + iNdEx -= sizeOfWire + skippy, err := skipThetestUnsafe(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetestUnsafe + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + github_com_gogo_protobuf_proto.AppendExtension(m, int32(fieldNum), data[iNdEx:iNdEx+skippy]) + iNdEx += skippy + } else { + iNdEx = preIndex + skippy, err := skipThetestUnsafe(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetestUnsafe + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *NestedDefinition) 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 ErrIntOverflowThetestUnsafe + } + 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: NestedDefinition: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: NestedDefinition: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) + } + var v int64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field1 = &v + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field EnumField", wireType) + } + var v NestedDefinition_NestedEnum + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (NestedDefinition_NestedEnum(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.EnumField = &v + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NNM", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetestUnsafe + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.NNM == nil { + m.NNM = &NestedDefinition_NestedMessage_NestedNestedMsg{} + } + if err := m.NNM.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NM", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetestUnsafe + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.NM == nil { + m.NM = &NestedDefinition_NestedMessage{} + } + if err := m.NM.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipThetestUnsafe(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetestUnsafe + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *NestedDefinition_NestedMessage) 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 ErrIntOverflowThetestUnsafe + } + 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: NestedMessage: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: NestedMessage: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field NestedField1", wireType) + } + var v uint64 + if iNdEx+8 > l { + return io.ErrUnexpectedEOF + } + v = *(*uint64)(unsafe.Pointer(&data[iNdEx])) + iNdEx += 8 + m.NestedField1 = &v + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NNM", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetestUnsafe + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.NNM == nil { + m.NNM = &NestedDefinition_NestedMessage_NestedNestedMsg{} + } + if err := m.NNM.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipThetestUnsafe(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetestUnsafe + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *NestedDefinition_NestedMessage_NestedNestedMsg) 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 ErrIntOverflowThetestUnsafe + } + 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: NestedNestedMsg: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: NestedNestedMsg: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 10: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NestedNestedField1", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + 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 ErrInvalidLengthThetestUnsafe + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + s := string(data[iNdEx:postIndex]) + m.NestedNestedField1 = &s + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipThetestUnsafe(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetestUnsafe + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *NestedScope) 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 ErrIntOverflowThetestUnsafe + } + 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: NestedScope: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: NestedScope: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field A", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetestUnsafe + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.A == nil { + m.A = &NestedDefinition_NestedMessage_NestedNestedMsg{} + } + if err := m.A.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field B", wireType) + } + var v NestedDefinition_NestedEnum + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (NestedDefinition_NestedEnum(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.B = &v + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field C", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetestUnsafe + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.C == nil { + m.C = &NestedDefinition_NestedMessage{} + } + if err := m.C.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipThetestUnsafe(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetestUnsafe + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *NinOptNativeDefault) 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 ErrIntOverflowThetestUnsafe + } + 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: NinOptNativeDefault: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: NinOptNativeDefault: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) + } + var v float64 + if iNdEx+8 > l { + return io.ErrUnexpectedEOF + } + v = *(*float64)(unsafe.Pointer(&data[iNdEx])) + iNdEx += 8 + m.Field1 = &v + case 2: + if wireType != 5 { + return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType) + } + var v float32 + if iNdEx+4 > l { + return io.ErrUnexpectedEOF + } + v = *(*float32)(unsafe.Pointer(&data[iNdEx])) + iNdEx += 4 + m.Field2 = &v + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field3", wireType) + } + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field3 = &v + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field4", wireType) + } + var v int64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field4 = &v + case 5: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field5", wireType) + } + var v uint32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (uint32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field5 = &v + case 6: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field6", wireType) + } + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field6 = &v + case 7: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field7", wireType) + } + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + v = int32((uint32(v) >> 1) ^ uint32(((v&1)<<31)>>31)) + m.Field7 = &v + case 8: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field8", wireType) + } + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + v = (v >> 1) ^ uint64((int64(v&1)<<63)>>63) + v2 := int64(v) + m.Field8 = &v2 + case 9: + if wireType != 5 { + return fmt.Errorf("proto: wrong wireType = %d for field Field9", wireType) + } + var v uint32 + if iNdEx+4 > l { + return io.ErrUnexpectedEOF + } + v = *(*uint32)(unsafe.Pointer(&data[iNdEx])) + iNdEx += 4 + m.Field9 = &v + case 10: + if wireType != 5 { + return fmt.Errorf("proto: wrong wireType = %d for field Field10", wireType) + } + var v int32 + if iNdEx+4 > l { + return io.ErrUnexpectedEOF + } + v = *(*int32)(unsafe.Pointer(&data[iNdEx])) + iNdEx += 4 + m.Field10 = &v + case 11: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field Field11", wireType) + } + var v uint64 + if iNdEx+8 > l { + return io.ErrUnexpectedEOF + } + v = *(*uint64)(unsafe.Pointer(&data[iNdEx])) + iNdEx += 8 + m.Field11 = &v + case 12: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field Field12", wireType) + } + var v int64 + if iNdEx+8 > l { + return io.ErrUnexpectedEOF + } + v = *(*int64)(unsafe.Pointer(&data[iNdEx])) + iNdEx += 8 + m.Field12 = &v + case 13: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field13", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + b := bool(v != 0) + m.Field13 = &b + case 14: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field14", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + 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 ErrInvalidLengthThetestUnsafe + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + s := string(data[iNdEx:postIndex]) + m.Field14 = &s + iNdEx = postIndex + case 15: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field15", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthThetestUnsafe + } + postIndex := iNdEx + byteLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Field15 = append(m.Field15[:0], data[iNdEx:postIndex]...) + if m.Field15 == nil { + m.Field15 = []byte{} + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipThetestUnsafe(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetestUnsafe + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *CustomContainer) 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 ErrIntOverflowThetestUnsafe + } + 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: CustomContainer: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: CustomContainer: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field CustomStruct", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetestUnsafe + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.CustomStruct.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipThetestUnsafe(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetestUnsafe + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *CustomNameNidOptNative) 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 ErrIntOverflowThetestUnsafe + } + 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: CustomNameNidOptNative: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: CustomNameNidOptNative: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field FieldA", wireType) + } + if iNdEx+8 > l { + return io.ErrUnexpectedEOF + } + m.FieldA = *(*float64)(unsafe.Pointer(&data[iNdEx])) + iNdEx += 8 + case 2: + if wireType != 5 { + return fmt.Errorf("proto: wrong wireType = %d for field FieldB", wireType) + } + if iNdEx+4 > l { + return io.ErrUnexpectedEOF + } + m.FieldB = *(*float32)(unsafe.Pointer(&data[iNdEx])) + iNdEx += 4 + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field FieldC", wireType) + } + m.FieldC = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + m.FieldC |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field FieldD", wireType) + } + m.FieldD = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + m.FieldD |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + case 5: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field FieldE", wireType) + } + m.FieldE = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + m.FieldE |= (uint32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + case 6: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field FieldF", wireType) + } + m.FieldF = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + m.FieldF |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + case 7: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field FieldG", wireType) + } + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + v = int32((uint32(v) >> 1) ^ uint32(((v&1)<<31)>>31)) + m.FieldG = v + case 8: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field FieldH", wireType) + } + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + v = (v >> 1) ^ uint64((int64(v&1)<<63)>>63) + m.FieldH = int64(v) + case 9: + if wireType != 5 { + return fmt.Errorf("proto: wrong wireType = %d for field FieldI", wireType) + } + if iNdEx+4 > l { + return io.ErrUnexpectedEOF + } + m.FieldI = *(*uint32)(unsafe.Pointer(&data[iNdEx])) + iNdEx += 4 + case 10: + if wireType != 5 { + return fmt.Errorf("proto: wrong wireType = %d for field FieldJ", wireType) + } + if iNdEx+4 > l { + return io.ErrUnexpectedEOF + } + m.FieldJ = *(*int32)(unsafe.Pointer(&data[iNdEx])) + iNdEx += 4 + case 11: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field FieldK", wireType) + } + if iNdEx+8 > l { + return io.ErrUnexpectedEOF + } + m.FieldK = *(*uint64)(unsafe.Pointer(&data[iNdEx])) + iNdEx += 8 + case 12: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field FieldL", wireType) + } + if iNdEx+8 > l { + return io.ErrUnexpectedEOF + } + m.FieldL = *(*int64)(unsafe.Pointer(&data[iNdEx])) + iNdEx += 8 + case 13: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field FieldM", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.FieldM = bool(v != 0) + case 14: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field FieldN", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + 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 ErrInvalidLengthThetestUnsafe + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.FieldN = string(data[iNdEx:postIndex]) + iNdEx = postIndex + case 15: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field FieldO", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthThetestUnsafe + } + postIndex := iNdEx + byteLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.FieldO = append(m.FieldO[:0], data[iNdEx:postIndex]...) + if m.FieldO == nil { + m.FieldO = []byte{} + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipThetestUnsafe(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetestUnsafe + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *CustomNameNinOptNative) 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 ErrIntOverflowThetestUnsafe + } + 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: CustomNameNinOptNative: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: CustomNameNinOptNative: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field FieldA", wireType) + } + var v float64 + if iNdEx+8 > l { + return io.ErrUnexpectedEOF + } + v = *(*float64)(unsafe.Pointer(&data[iNdEx])) + iNdEx += 8 + m.FieldA = &v + case 2: + if wireType != 5 { + return fmt.Errorf("proto: wrong wireType = %d for field FieldB", wireType) + } + var v float32 + if iNdEx+4 > l { + return io.ErrUnexpectedEOF + } + v = *(*float32)(unsafe.Pointer(&data[iNdEx])) + iNdEx += 4 + m.FieldB = &v + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field FieldC", wireType) + } + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.FieldC = &v + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field FieldD", wireType) + } + var v int64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.FieldD = &v + case 5: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field FieldE", wireType) + } + var v uint32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (uint32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.FieldE = &v + case 6: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field FieldF", wireType) + } + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.FieldF = &v + case 7: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field FieldG", wireType) + } + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + v = int32((uint32(v) >> 1) ^ uint32(((v&1)<<31)>>31)) + m.FieldG = &v + case 8: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field FieldH", wireType) + } + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + v = (v >> 1) ^ uint64((int64(v&1)<<63)>>63) + v2 := int64(v) + m.FieldH = &v2 + case 9: + if wireType != 5 { + return fmt.Errorf("proto: wrong wireType = %d for field FieldI", wireType) + } + var v uint32 + if iNdEx+4 > l { + return io.ErrUnexpectedEOF + } + v = *(*uint32)(unsafe.Pointer(&data[iNdEx])) + iNdEx += 4 + m.FieldI = &v + case 10: + if wireType != 5 { + return fmt.Errorf("proto: wrong wireType = %d for field FieldJ", wireType) + } + var v int32 + if iNdEx+4 > l { + return io.ErrUnexpectedEOF + } + v = *(*int32)(unsafe.Pointer(&data[iNdEx])) + iNdEx += 4 + m.FieldJ = &v + case 11: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field FieldK", wireType) + } + var v uint64 + if iNdEx+8 > l { + return io.ErrUnexpectedEOF + } + v = *(*uint64)(unsafe.Pointer(&data[iNdEx])) + iNdEx += 8 + m.FieldK = &v + case 12: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field FielL", wireType) + } + var v int64 + if iNdEx+8 > l { + return io.ErrUnexpectedEOF + } + v = *(*int64)(unsafe.Pointer(&data[iNdEx])) + iNdEx += 8 + m.FielL = &v + case 13: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field FieldM", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + b := bool(v != 0) + m.FieldM = &b + case 14: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field FieldN", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + 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 ErrInvalidLengthThetestUnsafe + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + s := string(data[iNdEx:postIndex]) + m.FieldN = &s + iNdEx = postIndex + case 15: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field FieldO", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthThetestUnsafe + } + postIndex := iNdEx + byteLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.FieldO = append(m.FieldO[:0], data[iNdEx:postIndex]...) + if m.FieldO == nil { + m.FieldO = []byte{} + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipThetestUnsafe(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetestUnsafe + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *CustomNameNinRepNative) 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 ErrIntOverflowThetestUnsafe + } + 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: CustomNameNinRepNative: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: CustomNameNinRepNative: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field FieldA", wireType) + } + var v float64 + if iNdEx+8 > l { + return io.ErrUnexpectedEOF + } + v = *(*float64)(unsafe.Pointer(&data[iNdEx])) + iNdEx += 8 + m.FieldA = append(m.FieldA, v) + case 2: + if wireType != 5 { + return fmt.Errorf("proto: wrong wireType = %d for field FieldB", wireType) + } + var v float32 + if iNdEx+4 > l { + return io.ErrUnexpectedEOF + } + v = *(*float32)(unsafe.Pointer(&data[iNdEx])) + iNdEx += 4 + m.FieldB = append(m.FieldB, v) + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field FieldC", wireType) + } + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.FieldC = append(m.FieldC, v) + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field FieldD", wireType) + } + var v int64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.FieldD = append(m.FieldD, v) + case 5: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field FieldE", wireType) + } + var v uint32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (uint32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.FieldE = append(m.FieldE, v) + case 6: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field FieldF", wireType) + } + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.FieldF = append(m.FieldF, v) + case 7: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field FieldG", wireType) + } + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + v = int32((uint32(v) >> 1) ^ uint32(((v&1)<<31)>>31)) + m.FieldG = append(m.FieldG, v) + case 8: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field FieldH", wireType) + } + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + v = (v >> 1) ^ uint64((int64(v&1)<<63)>>63) + m.FieldH = append(m.FieldH, int64(v)) + case 9: + if wireType != 5 { + return fmt.Errorf("proto: wrong wireType = %d for field FieldI", wireType) + } + var v uint32 + if iNdEx+4 > l { + return io.ErrUnexpectedEOF + } + v = *(*uint32)(unsafe.Pointer(&data[iNdEx])) + iNdEx += 4 + m.FieldI = append(m.FieldI, v) + case 10: + if wireType != 5 { + return fmt.Errorf("proto: wrong wireType = %d for field FieldJ", wireType) + } + var v int32 + if iNdEx+4 > l { + return io.ErrUnexpectedEOF + } + v = *(*int32)(unsafe.Pointer(&data[iNdEx])) + iNdEx += 4 + m.FieldJ = append(m.FieldJ, v) + case 11: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field FieldK", wireType) + } + var v uint64 + if iNdEx+8 > l { + return io.ErrUnexpectedEOF + } + v = *(*uint64)(unsafe.Pointer(&data[iNdEx])) + iNdEx += 8 + m.FieldK = append(m.FieldK, v) + case 12: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field FieldL", wireType) + } + var v int64 + if iNdEx+8 > l { + return io.ErrUnexpectedEOF + } + v = *(*int64)(unsafe.Pointer(&data[iNdEx])) + iNdEx += 8 + m.FieldL = append(m.FieldL, v) + case 13: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field FieldM", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.FieldM = append(m.FieldM, bool(v != 0)) + case 14: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field FieldN", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + 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 ErrInvalidLengthThetestUnsafe + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.FieldN = append(m.FieldN, string(data[iNdEx:postIndex])) + iNdEx = postIndex + case 15: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field FieldO", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthThetestUnsafe + } + postIndex := iNdEx + byteLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.FieldO = append(m.FieldO, make([]byte, postIndex-iNdEx)) + copy(m.FieldO[len(m.FieldO)-1], data[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipThetestUnsafe(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetestUnsafe + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *CustomNameNinStruct) 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 ErrIntOverflowThetestUnsafe + } + 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: CustomNameNinStruct: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: CustomNameNinStruct: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field FieldA", wireType) + } + var v float64 + if iNdEx+8 > l { + return io.ErrUnexpectedEOF + } + v = *(*float64)(unsafe.Pointer(&data[iNdEx])) + iNdEx += 8 + m.FieldA = &v + case 2: + if wireType != 5 { + return fmt.Errorf("proto: wrong wireType = %d for field FieldB", wireType) + } + var v float32 + if iNdEx+4 > l { + return io.ErrUnexpectedEOF + } + v = *(*float32)(unsafe.Pointer(&data[iNdEx])) + iNdEx += 4 + m.FieldB = &v + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field FieldC", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetestUnsafe + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.FieldC == nil { + m.FieldC = &NidOptNative{} + } + if err := m.FieldC.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field FieldD", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetestUnsafe + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.FieldD = append(m.FieldD, &NinOptNative{}) + if err := m.FieldD[len(m.FieldD)-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 FieldE", wireType) + } + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.FieldE = &v + case 7: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field FieldF", wireType) + } + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + v = int32((uint32(v) >> 1) ^ uint32(((v&1)<<31)>>31)) + m.FieldF = &v + case 8: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field FieldG", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetestUnsafe + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.FieldG == nil { + m.FieldG = &NidOptNative{} + } + if err := m.FieldG.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 13: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field FieldH", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + b := bool(v != 0) + m.FieldH = &b + case 14: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field FieldI", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + 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 ErrInvalidLengthThetestUnsafe + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + s := string(data[iNdEx:postIndex]) + m.FieldI = &s + iNdEx = postIndex + case 15: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field FieldJ", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthThetestUnsafe + } + postIndex := iNdEx + byteLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.FieldJ = append(m.FieldJ[:0], data[iNdEx:postIndex]...) + if m.FieldJ == nil { + m.FieldJ = []byte{} + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipThetestUnsafe(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetestUnsafe + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *CustomNameCustomType) 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 ErrIntOverflowThetestUnsafe + } + 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: CustomNameCustomType: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: CustomNameCustomType: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field FieldA", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthThetestUnsafe + } + postIndex := iNdEx + byteLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var v Uuid + m.FieldA = &v + if err := m.FieldA.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field FieldB", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthThetestUnsafe + } + postIndex := iNdEx + byteLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var v github_com_gogo_protobuf_test_custom.Uint128 + m.FieldB = &v + if err := m.FieldB.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field FieldC", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthThetestUnsafe + } + postIndex := iNdEx + byteLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var v Uuid + m.FieldC = append(m.FieldC, v) + if err := m.FieldC[len(m.FieldC)-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 FieldD", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthThetestUnsafe + } + postIndex := iNdEx + byteLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var v github_com_gogo_protobuf_test_custom.Uint128 + m.FieldD = append(m.FieldD, v) + if err := m.FieldD[len(m.FieldD)-1].Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipThetestUnsafe(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetestUnsafe + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *CustomNameNinEmbeddedStructUnion) 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 ErrIntOverflowThetestUnsafe + } + 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: CustomNameNinEmbeddedStructUnion: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: CustomNameNinEmbeddedStructUnion: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NidOptNative", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetestUnsafe + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.NidOptNative == nil { + m.NidOptNative = &NidOptNative{} + } + if err := m.NidOptNative.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 200: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field FieldA", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetestUnsafe + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.FieldA == nil { + m.FieldA = &NinOptNative{} + } + if err := m.FieldA.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 210: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field FieldB", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + b := bool(v != 0) + m.FieldB = &b + default: + iNdEx = preIndex + skippy, err := skipThetestUnsafe(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetestUnsafe + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *CustomNameEnum) 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 ErrIntOverflowThetestUnsafe + } + 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: CustomNameEnum: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: CustomNameEnum: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field FieldA", wireType) + } + var v TheTestEnum + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (TheTestEnum(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.FieldA = &v + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field FieldB", wireType) + } + var v TheTestEnum + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (TheTestEnum(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.FieldB = append(m.FieldB, v) + default: + iNdEx = preIndex + skippy, err := skipThetestUnsafe(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetestUnsafe + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *NoExtensionsMap) 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 ErrIntOverflowThetestUnsafe + } + 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: NoExtensionsMap: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: NoExtensionsMap: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) + } + var v int64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field1 = &v + default: + if (fieldNum >= 100) && (fieldNum < 200) { + var sizeOfWire int + for { + sizeOfWire++ + wire >>= 7 + if wire == 0 { + break + } + } + iNdEx -= sizeOfWire + skippy, err := skipThetestUnsafe(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetestUnsafe + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + github_com_gogo_protobuf_proto.AppendExtension(m, int32(fieldNum), data[iNdEx:iNdEx+skippy]) + iNdEx += skippy + } else { + iNdEx = preIndex + skippy, err := skipThetestUnsafe(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetestUnsafe + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Unrecognized) 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 ErrIntOverflowThetestUnsafe + } + 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: Unrecognized: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Unrecognized: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + 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 ErrInvalidLengthThetestUnsafe + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + s := string(data[iNdEx:postIndex]) + m.Field1 = &s + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipThetestUnsafe(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetestUnsafe + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *UnrecognizedWithInner) 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 ErrIntOverflowThetestUnsafe + } + 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: UnrecognizedWithInner: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: UnrecognizedWithInner: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Embedded", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetestUnsafe + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Embedded = append(m.Embedded, &UnrecognizedWithInner_Inner{}) + if err := m.Embedded[len(m.Embedded)-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 Field2", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + 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 ErrInvalidLengthThetestUnsafe + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + s := string(data[iNdEx:postIndex]) + m.Field2 = &s + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipThetestUnsafe(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetestUnsafe + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *UnrecognizedWithInner_Inner) 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 ErrIntOverflowThetestUnsafe + } + 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: Inner: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Inner: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) + } + var v uint32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (uint32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field1 = &v + default: + iNdEx = preIndex + skippy, err := skipThetestUnsafe(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetestUnsafe + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *UnrecognizedWithEmbed) 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 ErrIntOverflowThetestUnsafe + } + 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: UnrecognizedWithEmbed: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: UnrecognizedWithEmbed: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field UnrecognizedWithEmbed_Embedded", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetestUnsafe + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.UnrecognizedWithEmbed_Embedded.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + 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 ErrInvalidLengthThetestUnsafe + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + s := string(data[iNdEx:postIndex]) + m.Field2 = &s + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipThetestUnsafe(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetestUnsafe + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *UnrecognizedWithEmbed_Embedded) 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 ErrIntOverflowThetestUnsafe + } + 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: Embedded: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Embedded: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) + } + var v uint32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (uint32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field1 = &v + default: + iNdEx = preIndex + skippy, err := skipThetestUnsafe(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetestUnsafe + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Node) 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 ErrIntOverflowThetestUnsafe + } + 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: Node: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Node: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Label", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + 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 ErrInvalidLengthThetestUnsafe + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + s := string(data[iNdEx:postIndex]) + m.Label = &s + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Children", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetestUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetestUnsafe + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Children = append(m.Children, &Node{}) + if err := m.Children[len(m.Children)-1].Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipThetestUnsafe(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetestUnsafe + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipThetestUnsafe(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, ErrIntOverflowThetestUnsafe + } + 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, ErrIntOverflowThetestUnsafe + } + 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, ErrIntOverflowThetestUnsafe + } + 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, ErrInvalidLengthThetestUnsafe + } + return iNdEx, nil + case 3: + for { + var innerWire uint64 + var start int = iNdEx + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowThetestUnsafe + } + 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 := skipThetestUnsafe(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 ( + ErrInvalidLengthThetestUnsafe = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowThetestUnsafe = fmt.Errorf("proto: integer overflow") +) + +var fileDescriptorThetest = []byte{ + // 3017 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xcc, 0x5a, 0x4f, 0x6c, 0x1b, 0xc7, + 0xf5, 0xd6, 0xee, 0x90, 0x32, 0x35, 0xa2, 0x24, 0x7a, 0x13, 0x33, 0x0b, 0x46, 0x3f, 0x49, 0xde, + 0x9f, 0xa2, 0x2a, 0x84, 0x2d, 0x91, 0x14, 0x25, 0xcb, 0x4c, 0x93, 0x42, 0xfc, 0xe3, 0xda, 0xae, + 0x45, 0x19, 0x8c, 0xdc, 0xd6, 0x40, 0x81, 0x82, 0x12, 0x57, 0x12, 0x51, 0x69, 0x29, 0x90, 0x4b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xb8, 0xb4, 0xa8, 0x02, 0x2d, 0x2e, + 0x21, 0xaa, 0x40, 0x88, 0x4b, 0x85, 0x2a, 0x50, 0xe1, 0x92, 0x80, 0x6b, 0xac, 0xa1, 0x1f, 0xfb, + 0xd4, 0x18, 0x18, 0x58, 0x63, 0x60, 0x60, 0x8d, 0x81, 0x81, 0x35, 0x06, 0x06, 0xd6, 0x18, 0x18, + 0x58, 0x63, 0x60, 0x60, 0x8d, 0x81, 0x81, 0x35, 0x06, 0x06, 0xd6, 0x18, 0x18, 0x5c, 0x63, 0x20, + 0xa4, 0xc6, 0x40, 0x48, 0x8d, 0x81, 0x90, 0x1a, 0x03, 0x21, 0x35, 0x06, 0x42, 0x6a, 0x0c, 0x04, + 0xd6, 0x98, 0x4b, 0x6f, 0x9a, 0xa7, 0xd7, 0xb7, 0xc6, 0x40, 0x40, 0x8d, 0x81, 0x80, 0x1a, 0x03, + 0x01, 0x35, 0x06, 0x02, 0x6a, 0x0c, 0x04, 0xd4, 0x18, 0x08, 0xa8, 0x31, 0x10, 0x50, 0x63, 0x20, + 0xa8, 0xc6, 0x40, 0x60, 0x8d, 0x81, 0xc0, 0x1a, 0x03, 0x81, 0x35, 0x06, 0x02, 0x6b, 0x0c, 0x04, + 0xd6, 0x18, 0x60, 0x6b, 0xec, 0x4f, 0x00, 0x2a, 0x4e, 0x8d, 0xdd, 0x6e, 0xee, 0xfe, 0x40, 0x6f, + 0x61, 0x2a, 0x66, 0x84, 0x4a, 0x1b, 0xb5, 0xa8, 0x4b, 0xb9, 0x94, 0xcc, 0x08, 0xb5, 0xc6, 0xe3, + 0x05, 0x8a, 0x93, 0x6a, 0xe3, 0xf1, 0x15, 0x8a, 0x93, 0x7a, 0xe3, 0xf1, 0x22, 0xc5, 0x49, 0xc5, + 0xf1, 0xf8, 0x2a, 0xc5, 0x49, 0xcd, 0xf1, 0xf8, 0x1a, 0xc5, 0x49, 0xd5, 0xf1, 0xf8, 0x15, 0x8a, + 0x93, 0xba, 0xe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f, 0xe4, 0x34, 0x41, 0x72, 0xd0, 0x47, 0x6e, 0x9a, + 0x20, 0x37, 0xe8, 0x23, 0x35, 0x4d, 0x90, 0x1a, 0xf4, 0x91, 0x99, 0x26, 0xc8, 0x0c, 0xfa, 0x48, + 0x4c, 0x13, 0x24, 0x06, 0x7d, 0xe4, 0xa5, 0x09, 0xf2, 0x82, 0x3e, 0xd2, 0x9a, 0x17, 0xa5, 0x05, + 0xfd, 0x64, 0x35, 0x2f, 0xca, 0x0a, 0xfa, 0x49, 0xea, 0xff, 0x45, 0x49, 0x8d, 0x21, 0xab, 0xb8, + 0x75, 0x88, 0x51, 0xd3, 0xbc, 0xa8, 0x26, 0xe8, 0xa7, 0xa4, 0x79, 0x51, 0x49, 0xd0, 0x4f, 0x45, + 0xf3, 0xa2, 0x8a, 0xa0, 0x9f, 0x82, 0x9e, 0x88, 0x0a, 0x72, 0xb7, 0xf8, 0x68, 0xc2, 0x8a, 0x62, + 0x98, 0x82, 0x40, 0x04, 0x05, 0x81, 0x08, 0x0a, 0x02, 0x11, 0x14, 0x04, 0x22, 0x28, 0x08, 0x44, + 0x50, 0x10, 0x88, 0xa0, 0x20, 0x10, 0x41, 0x41, 0x20, 0x8a, 0x82, 0x40, 0x24, 0x05, 0x81, 0x20, + 0x05, 0xcd, 0x8b, 0x1b, 0x1e, 0xa0, 0xdf, 0x84, 0x34, 0x2f, 0xae, 0x7c, 0x86, 0x4b, 0x08, 0x44, + 0x92, 0x10, 0x08, 0x92, 0xd0, 0x47, 0xa8, 0x91, 0xe2, 0x24, 0x84, 0x97, 0x87, 0xce, 0x6a, 0x06, + 0x5a, 0x8b, 0xb0, 0xbf, 0xc2, 0x4f, 0x53, 0x6b, 0x11, 0xd6, 0xa8, 0x07, 0xe9, 0xcc, 0x3b, 0x0b, + 0xd5, 0x22, 0xcc, 0x42, 0xd7, 0xa8, 0x86, 0xd6, 0x22, 0xec, 0xbb, 0xf0, 0x6a, 0x6f, 0x7d, 0xd0, + 0x24,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+ 0x73, 0x64, 0x8f, 0x3e, 0x1f, 0xa3, 0xdf, 0x9f, 0xa1, 0xef, 0xcf, 0xd1, 0xf7, 0x17, 0xe8, 0xfb, + 0xbd, 0x4f, 0x67, 0xa4, 0x47, 0x9f, 0xce, 0x8c, 0x3c, 0x46, 0xdf, 0xff, 0x09, 0x00, 0x00, 0xff, + 0xff, 0x44, 0x24, 0xbf, 0xc5, 0xb5, 0x34, 0x00, 0x00, +} diff --git a/vendor/github.com/gogo/protobuf/test/combos/unsafeunmarshaler/thetest.proto b/vendor/github.com/gogo/protobuf/test/combos/unsafeunmarshaler/thetest.proto new file mode 100644 index 000000000..8216baec4 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/combos/unsafeunmarshaler/thetest.proto @@ -0,0 +1,624 @@ +// Copyright (c) 2013, Vastech SA (PTY) LTD. All rights reserved. +// http://github.com/gogo/protobuf/gogoproto +// +// 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 test; + +import "github.com/gogo/protobuf/gogoproto/gogo.proto"; + +option (gogoproto.goproto_stringer_all) = false; +option (gogoproto.goproto_enum_prefix_all) = false; +option (gogoproto.goproto_getters_all) = false; + +option (gogoproto.equal_all) = true; +option (gogoproto.verbose_equal_all) = true; +option (gogoproto.stringer_all) = true; +option (gogoproto.gostring_all) = true; +option (gogoproto.face_all) = true; +option (gogoproto.description_all) = true; + +option (gogoproto.testgen_all) = true; +option (gogoproto.populate_all) = true; +option (gogoproto.benchgen_all) = true; +option (gogoproto.unmarshaler_all) = false; +option (gogoproto.marshaler_all) = false; +option (gogoproto.sizer_all) = true; +option (gogoproto.protosizer_all) = false; + +option (gogoproto.goproto_enum_stringer_all) = false; +option (gogoproto.enum_stringer_all) = true; + +option (gogoproto.unsafe_marshaler_all) = false; +option (gogoproto.unsafe_unmarshaler_all) = true; + +option (gogoproto.compare_all) = true; + +message NidOptNative { + optional double Field1 = 1 [(gogoproto.nullable) = false]; + optional float Field2 = 2 [(gogoproto.nullable) = false]; + optional int32 Field3 = 3 [(gogoproto.nullable) = false]; + optional int64 Field4 = 4 [(gogoproto.nullable) = false]; + optional uint32 Field5 = 5 [(gogoproto.nullable) = false]; + optional uint64 Field6 = 6 [(gogoproto.nullable) = false]; + optional sint32 Field7 = 7 [(gogoproto.nullable) = false]; + optional sint64 Field8 = 8 [(gogoproto.nullable) = false]; + optional fixed32 Field9 = 9 [(gogoproto.nullable) = false]; + optional sfixed32 Field10 = 10 [(gogoproto.nullable) = false]; + optional fixed64 Field11 = 11 [(gogoproto.nullable) = false]; + optional sfixed64 Field12 = 12 [(gogoproto.nullable) = false]; + optional bool Field13 = 13 [(gogoproto.nullable) = false]; + optional string Field14 = 14 [(gogoproto.nullable) = false]; + optional bytes Field15 = 15 [(gogoproto.nullable) = false]; +} + +message NinOptNative { + optional double Field1 = 1; + optional float Field2 = 2; + optional int32 Field3 = 3; + optional int64 Field4 = 4; + optional uint32 Field5 = 5; + optional uint64 Field6 = 6; + optional sint32 Field7 = 7; + optional sint64 Field8 = 8; + optional fixed32 Field9 = 9; + optional sfixed32 Field10 = 10; + optional fixed64 Field11 = 11; + optional sfixed64 Field12 = 12; + optional bool Field13 = 13; + optional string Field14 = 14; + optional bytes Field15 = 15; +} + +message NidRepNative { + repeated double Field1 = 1 [(gogoproto.nullable) = false]; + repeated float Field2 = 2 [(gogoproto.nullable) = false]; + repeated int32 Field3 = 3 [(gogoproto.nullable) = false]; + repeated int64 Field4 = 4 [(gogoproto.nullable) = false]; + repeated uint32 Field5 = 5 [(gogoproto.nullable) = false]; + repeated uint64 Field6 = 6 [(gogoproto.nullable) = false]; + repeated sint32 Field7 = 7 [(gogoproto.nullable) = false]; + repeated sint64 Field8 = 8 [(gogoproto.nullable) = false]; + repeated fixed32 Field9 = 9 [(gogoproto.nullable) = false]; + repeated sfixed32 Field10 = 10 [(gogoproto.nullable) = false]; + repeated fixed64 Field11 = 11 [(gogoproto.nullable) = false]; + repeated sfixed64 Field12 = 12 [(gogoproto.nullable) = false]; + repeated bool Field13 = 13 [(gogoproto.nullable) = false]; + repeated string Field14 = 14 [(gogoproto.nullable) = false]; + repeated bytes Field15 = 15 [(gogoproto.nullable) = false]; +} + +message NinRepNative { + repeated double Field1 = 1; + repeated float Field2 = 2; + repeated int32 Field3 = 3; + repeated int64 Field4 = 4; + repeated uint32 Field5 = 5; + repeated uint64 Field6 = 6; + repeated sint32 Field7 = 7; + repeated sint64 Field8 = 8; + repeated fixed32 Field9 = 9; + repeated sfixed32 Field10 = 10; + repeated fixed64 Field11 = 11; + repeated sfixed64 Field12 = 12; + repeated bool Field13 = 13; + repeated string Field14 = 14; + repeated bytes Field15 = 15; +} + +message NidRepPackedNative { + repeated double Field1 = 1 [(gogoproto.nullable) = false, packed = true]; + repeated float Field2 = 2 [(gogoproto.nullable) = false, packed = true]; + repeated int32 Field3 = 3 [(gogoproto.nullable) = false, packed = true]; + repeated int64 Field4 = 4 [(gogoproto.nullable) = false, packed = true]; + repeated uint32 Field5 = 5 [(gogoproto.nullable) = false, packed = true]; + repeated uint64 Field6 = 6 [(gogoproto.nullable) = false, packed = true]; + repeated sint32 Field7 = 7 [(gogoproto.nullable) = false, packed = true]; + repeated sint64 Field8 = 8 [(gogoproto.nullable) = false, packed = true]; + repeated fixed32 Field9 = 9 [(gogoproto.nullable) = false, packed = true]; + repeated sfixed32 Field10 = 10 [(gogoproto.nullable) = false, packed = true]; + repeated fixed64 Field11 = 11 [(gogoproto.nullable) = false, packed = true]; + repeated sfixed64 Field12 = 12 [(gogoproto.nullable) = false, packed = true]; + repeated bool Field13 = 13 [(gogoproto.nullable) = false, packed = true]; +} + +message NinRepPackedNative { + repeated double Field1 = 1 [packed = true]; + repeated float Field2 = 2 [packed = true]; + repeated int32 Field3 = 3 [packed = true]; + repeated int64 Field4 = 4 [packed = true]; + repeated uint32 Field5 = 5 [packed = true]; + repeated uint64 Field6 = 6 [packed = true]; + repeated sint32 Field7 = 7 [packed = true]; + repeated sint64 Field8 = 8 [packed = true]; + repeated fixed32 Field9 = 9 [packed = true]; + repeated sfixed32 Field10 = 10 [packed = true]; + repeated fixed64 Field11 = 11 [packed = true]; + repeated sfixed64 Field12 = 12 [packed = true]; + repeated bool Field13 = 13 [packed = true]; +} + +message NidOptStruct { + optional double Field1 = 1 [(gogoproto.nullable) = false]; + optional float Field2 = 2 [(gogoproto.nullable) = false]; + optional NidOptNative Field3 = 3 [(gogoproto.nullable) = false]; + optional NinOptNative Field4 = 4 [(gogoproto.nullable) = false]; + optional uint64 Field6 = 6 [(gogoproto.nullable) = false]; + optional sint32 Field7 = 7 [(gogoproto.nullable) = false]; + optional NidOptNative Field8 = 8 [(gogoproto.nullable) = false]; + optional bool Field13 = 13 [(gogoproto.nullable) = false]; + optional string Field14 = 14 [(gogoproto.nullable) = false]; + optional bytes Field15 = 15 [(gogoproto.nullable) = false]; +} + +message NinOptStruct { + optional double Field1 = 1; + optional float Field2 = 2; + optional NidOptNative Field3 = 3; + optional NinOptNative Field4 = 4; + optional uint64 Field6 = 6; + optional sint32 Field7 = 7; + optional NidOptNative Field8 = 8; + optional bool Field13 = 13; + optional string Field14 = 14; + optional bytes Field15 = 15; +} + +message NidRepStruct { + repeated double Field1 = 1 [(gogoproto.nullable) = false]; + repeated float Field2 = 2 [(gogoproto.nullable) = false]; + repeated NidOptNative Field3 = 3 [(gogoproto.nullable) = false]; + repeated NinOptNative Field4 = 4 [(gogoproto.nullable) = false]; + repeated uint64 Field6 = 6 [(gogoproto.nullable) = false]; + repeated sint32 Field7 = 7 [(gogoproto.nullable) = false]; + repeated NidOptNative Field8 = 8 [(gogoproto.nullable) = false]; + repeated bool Field13 = 13 [(gogoproto.nullable) = false]; + repeated string Field14 = 14 [(gogoproto.nullable) = false]; + repeated bytes Field15 = 15 [(gogoproto.nullable) = false]; +} + +message NinRepStruct { + repeated double Field1 = 1; + repeated float Field2 = 2; + repeated NidOptNative Field3 = 3; + repeated NinOptNative Field4 = 4; + repeated uint64 Field6 = 6; + repeated sint32 Field7 = 7; + repeated NidOptNative Field8 = 8; + repeated bool Field13 = 13; + repeated string Field14 = 14; + repeated bytes Field15 = 15; +} + +message NidEmbeddedStruct { + optional NidOptNative Field1 = 1 [(gogoproto.embed) = true]; + optional NidOptNative Field200 = 200 [(gogoproto.nullable) = false]; + optional bool Field210 = 210 [(gogoproto.nullable) = false]; +} + +message NinEmbeddedStruct { + optional NidOptNative Field1 = 1 [(gogoproto.embed) = true]; + optional NidOptNative Field200 = 200; + optional bool Field210 = 210; +} + +message NidNestedStruct { + optional NidOptStruct Field1 = 1 [(gogoproto.nullable) = false]; + repeated NidRepStruct Field2 = 2 [(gogoproto.nullable) = false]; +} + +message NinNestedStruct { + optional NinOptStruct Field1 = 1; + repeated NinRepStruct Field2 = 2; +} + +message NidOptCustom { + optional bytes Id = 1 [(gogoproto.customtype) = "Uuid", (gogoproto.nullable) = false]; + optional bytes Value = 2 [(gogoproto.customtype) = "github.com/gogo/protobuf/test/custom.Uint128", (gogoproto.nullable) = false]; +} + +message CustomDash { + optional bytes Value = 1 [(gogoproto.customtype) = "github.com/gogo/protobuf/test/custom-dash-type.Bytes"]; +} + +message NinOptCustom { + optional bytes Id = 1 [(gogoproto.customtype) = "Uuid"]; + optional bytes Value = 2 [(gogoproto.customtype) = "github.com/gogo/protobuf/test/custom.Uint128"]; +} + +message NidRepCustom { + repeated bytes Id = 1 [(gogoproto.customtype) = "Uuid", (gogoproto.nullable) = false]; + repeated bytes Value = 2 [(gogoproto.customtype) = "github.com/gogo/protobuf/test/custom.Uint128", (gogoproto.nullable) = false]; +} + +message NinRepCustom { + repeated bytes Id = 1 [(gogoproto.customtype) = "Uuid"]; + repeated bytes Value = 2 [(gogoproto.customtype) = "github.com/gogo/protobuf/test/custom.Uint128"]; +} + +message NinOptNativeUnion { + option (gogoproto.onlyone) = true; + optional double Field1 = 1; + optional float Field2 = 2; + optional int32 Field3 = 3; + optional int64 Field4 = 4; + optional uint32 Field5 = 5; + optional uint64 Field6 = 6; + optional bool Field13 = 13; + optional string Field14 = 14; + optional bytes Field15 = 15; +} + +message NinOptStructUnion { + option (gogoproto.onlyone) = true; + optional double Field1 = 1; + optional float Field2 = 2; + optional NidOptNative Field3 = 3; + optional NinOptNative Field4 = 4; + optional uint64 Field6 = 6; + optional sint32 Field7 = 7; + optional bool Field13 = 13; + optional string Field14 = 14; + optional bytes Field15 = 15; +} + +message NinEmbeddedStructUnion { + option (gogoproto.onlyone) = true; + optional NidOptNative Field1 = 1 [(gogoproto.embed) = true]; + optional NinOptNative Field200 = 200; + optional bool Field210 = 210; +} + +message NinNestedStructUnion { + option (gogoproto.onlyone) = true; + optional NinOptNativeUnion Field1 = 1; + optional NinOptStructUnion Field2 = 2; + optional NinEmbeddedStructUnion Field3 = 3; +} + +message Tree { + option (gogoproto.onlyone) = true; + optional OrBranch Or = 1; + optional AndBranch And = 2; + optional Leaf Leaf = 3; +} + +message OrBranch { + optional Tree Left = 1 [(gogoproto.nullable) = false]; + optional Tree Right = 2 [(gogoproto.nullable) = false]; +} + +message AndBranch { + optional Tree Left = 1 [(gogoproto.nullable) = false]; + optional Tree Right = 2 [(gogoproto.nullable) = false]; +} + +message Leaf { + optional int64 Value = 1 [(gogoproto.nullable) = false]; + optional string StrValue = 2 [(gogoproto.nullable) = false]; +} + +message DeepTree { + option (gogoproto.onlyone) = true; + optional ADeepBranch Down = 1; + optional AndDeepBranch And = 2; + optional DeepLeaf Leaf = 3; +} + +message ADeepBranch { + optional DeepTree Down = 2 [(gogoproto.nullable) = false]; +} + +message AndDeepBranch { + optional DeepTree Left = 1 [(gogoproto.nullable) = false]; + optional DeepTree Right = 2 [(gogoproto.nullable) = false]; +} + +message DeepLeaf { + optional Tree Tree = 1 [(gogoproto.nullable) = false]; +} + +message Nil { + +} + +enum TheTestEnum { + A = 0; + B = 1; + C = 2; +} + +enum AnotherTestEnum { + option (gogoproto.goproto_enum_prefix) = false; + D = 10; + E = 11; +} + +// YetAnotherTestEnum is used to test cross-package import of custom name +// fields and default resolution. +enum YetAnotherTestEnum { + option (gogoproto.goproto_enum_prefix) = false; + AA = 0; + BB = 1 [(gogoproto.enumvalue_customname) = "BetterYetBB"]; +} + +// YetAnotherTestEnum is used to test cross-package import of custom name +// fields and default resolution. +enum YetYetAnotherTestEnum { + option (gogoproto.goproto_enum_prefix) = true; + CC = 0; + DD = 1 [(gogoproto.enumvalue_customname) = "BetterYetDD"]; +} + +message NidOptEnum { + optional TheTestEnum Field1 = 1 [(gogoproto.nullable) = false]; +} + +message NinOptEnum { + optional TheTestEnum Field1 = 1; + optional YetAnotherTestEnum Field2 = 2; + optional YetYetAnotherTestEnum Field3 = 3; +} + +message NidRepEnum { + repeated TheTestEnum Field1 = 1 [(gogoproto.nullable) = false]; + repeated YetAnotherTestEnum Field2 = 2 [(gogoproto.nullable) = false]; + repeated YetYetAnotherTestEnum Field3 = 3 [(gogoproto.nullable) = false]; +} + +message NinRepEnum { + repeated TheTestEnum Field1 = 1; + repeated YetAnotherTestEnum Field2 = 2; + repeated YetYetAnotherTestEnum Field3 = 3; +} + +message NinOptEnumDefault { + option (gogoproto.goproto_getters) = true; + option (gogoproto.face) = false; + optional TheTestEnum Field1 = 1 [default=C]; + optional YetAnotherTestEnum Field2 = 2 [default=BB]; + optional YetYetAnotherTestEnum Field3 = 3 [default=CC]; +} + +message AnotherNinOptEnum { + optional AnotherTestEnum Field1 = 1; + optional YetAnotherTestEnum Field2 = 2; + optional YetYetAnotherTestEnum Field3 = 3; +} + +message AnotherNinOptEnumDefault { + option (gogoproto.goproto_getters) = true; + option (gogoproto.face) = false; + optional AnotherTestEnum Field1 = 1 [default=E]; + optional YetAnotherTestEnum Field2 = 2 [default=BB]; + optional YetYetAnotherTestEnum Field3 = 3 [default=CC]; +} + + +message Timer { + optional sfixed64 Time1 = 1 [(gogoproto.nullable) = false]; + optional sfixed64 Time2 = 2 [(gogoproto.nullable) = false]; + optional bytes Data = 3 [(gogoproto.nullable) = false]; +} + +message MyExtendable { + option (gogoproto.face) = false; + optional int64 Field1 = 1; + extensions 100 to 199; +} + +extend MyExtendable { + optional double FieldA = 100; + optional NinOptNative FieldB = 101; + optional NinEmbeddedStruct FieldC = 102; + repeated int64 FieldD = 104; + repeated NinOptNative FieldE = 105; +} + +message OtherExtenable { + option (gogoproto.face) = false; + optional int64 Field2 = 2; + extensions 14 to 16; + optional int64 Field13 = 13; + extensions 10 to 12; + optional MyExtendable M = 1; +} + +message NestedDefinition { + optional int64 Field1 = 1; + message NestedMessage { + optional fixed64 NestedField1 = 1; + optional NestedNestedMsg NNM = 2; + message NestedNestedMsg { + optional string NestedNestedField1 = 10; + } + } + enum NestedEnum { + TYPE_NESTED = 1; + } + optional NestedEnum EnumField = 2; + optional NestedMessage.NestedNestedMsg NNM = 3; + optional NestedMessage NM = 4; +} + +message NestedScope { + optional NestedDefinition.NestedMessage.NestedNestedMsg A = 1; + optional NestedDefinition.NestedEnum B = 2; + optional NestedDefinition.NestedMessage C = 3; +} + +message NinOptNativeDefault { + option (gogoproto.goproto_getters) = true; + option (gogoproto.face) = false; + optional double Field1 = 1 [default = 1234.1234]; + optional float Field2 = 2 [default = 1234.1234]; + optional int32 Field3 = 3 [default = 1234]; + optional int64 Field4 = 4 [default = 1234]; + optional uint32 Field5 = 5 [default = 1234]; + optional uint64 Field6 = 6 [default = 1234]; + optional sint32 Field7 = 7 [default = 1234]; + optional sint64 Field8 = 8 [default = 1234]; + optional fixed32 Field9 = 9 [default = 1234]; + optional sfixed32 Field10 = 10 [default = 1234]; + optional fixed64 Field11 = 11 [default = 1234]; + optional sfixed64 Field12 = 12 [default = 1234]; + optional bool Field13 = 13 [default = true]; + optional string Field14 = 14 [default = "1234"]; + optional bytes Field15 = 15; +} + +message CustomContainer { + optional NidOptCustom CustomStruct = 1 [(gogoproto.nullable) = false]; +} + +message CustomNameNidOptNative { + optional double Field1 = 1 [(gogoproto.nullable) = false, (gogoproto.customname) = "FieldA"]; + optional float Field2 = 2 [(gogoproto.nullable) = false, (gogoproto.customname) = "FieldB"]; + optional int32 Field3 = 3 [(gogoproto.nullable) = false, (gogoproto.customname) = "FieldC"]; + optional int64 Field4 = 4 [(gogoproto.nullable) = false, (gogoproto.customname) = "FieldD"]; + optional uint32 Field5 = 5 [(gogoproto.nullable) = false, (gogoproto.customname) = "FieldE"]; + optional uint64 Field6 = 6 [(gogoproto.nullable) = false, (gogoproto.customname) = "FieldF"]; + optional sint32 Field7 = 7 [(gogoproto.nullable) = false, (gogoproto.customname) = "FieldG"]; + optional sint64 Field8 = 8 [(gogoproto.nullable) = false, (gogoproto.customname) = "FieldH"]; + optional fixed32 Field9 = 9 [(gogoproto.nullable) = false, (gogoproto.customname) = "FieldI"]; + optional sfixed32 Field10 = 10 [(gogoproto.nullable) = false, (gogoproto.customname) = "FieldJ"]; + optional fixed64 Field11 = 11 [(gogoproto.nullable) = false, (gogoproto.customname) = "FieldK"]; + optional sfixed64 Field12 = 12 [(gogoproto.nullable) = false, (gogoproto.customname) = "FieldL"]; + optional bool Field13 = 13 [(gogoproto.nullable) = false, (gogoproto.customname) = "FieldM"]; + optional string Field14 = 14 [(gogoproto.nullable) = false, (gogoproto.customname) = "FieldN"]; + optional bytes Field15 = 15 [(gogoproto.nullable) = false, (gogoproto.customname) = "FieldO"]; +} + +message CustomNameNinOptNative { + optional double Field1 = 1 [(gogoproto.customname) = "FieldA"]; + optional float Field2 = 2 [(gogoproto.customname) = "FieldB"]; + optional int32 Field3 = 3 [(gogoproto.customname) = "FieldC"]; + optional int64 Field4 = 4 [(gogoproto.customname) = "FieldD"]; + optional uint32 Field5 = 5 [(gogoproto.customname) = "FieldE"]; + optional uint64 Field6 = 6 [(gogoproto.customname) = "FieldF"]; + optional sint32 Field7 = 7 [(gogoproto.customname) = "FieldG"]; + optional sint64 Field8 = 8 [(gogoproto.customname) = "FieldH"]; + optional fixed32 Field9 = 9 [(gogoproto.customname) = "FieldI"]; + optional sfixed32 Field10 = 10 [(gogoproto.customname) = "FieldJ"]; + optional fixed64 Field11 = 11 [(gogoproto.customname) = "FieldK"]; + optional sfixed64 Field12 = 12 [(gogoproto.customname) = "FielL"]; + optional bool Field13 = 13 [(gogoproto.customname) = "FieldM"]; + optional string Field14 = 14 [(gogoproto.customname) = "FieldN"]; + optional bytes Field15 = 15 [(gogoproto.customname) = "FieldO"]; +} + +message CustomNameNinRepNative { + repeated double Field1 = 1 [(gogoproto.customname) = "FieldA"]; + repeated float Field2 = 2 [(gogoproto.customname) = "FieldB"]; + repeated int32 Field3 = 3 [(gogoproto.customname) = "FieldC"]; + repeated int64 Field4 = 4 [(gogoproto.customname) = "FieldD"]; + repeated uint32 Field5 = 5 [(gogoproto.customname) = "FieldE"]; + repeated uint64 Field6 = 6 [(gogoproto.customname) = "FieldF"]; + repeated sint32 Field7 = 7 [(gogoproto.customname) = "FieldG"]; + repeated sint64 Field8 = 8 [(gogoproto.customname) = "FieldH"]; + repeated fixed32 Field9 = 9 [(gogoproto.customname) = "FieldI"]; + repeated sfixed32 Field10 = 10 [(gogoproto.customname) = "FieldJ"]; + repeated fixed64 Field11 = 11 [(gogoproto.customname) = "FieldK"]; + repeated sfixed64 Field12 = 12 [(gogoproto.customname) = "FieldL"]; + repeated bool Field13 = 13 [(gogoproto.customname) = "FieldM"]; + repeated string Field14 = 14 [(gogoproto.customname) = "FieldN"]; + repeated bytes Field15 = 15 [(gogoproto.customname) = "FieldO"]; +} + +message CustomNameNinStruct { + optional double Field1 = 1 [(gogoproto.customname) = "FieldA"]; + optional float Field2 = 2 [(gogoproto.customname) = "FieldB"]; + optional NidOptNative Field3 = 3 [(gogoproto.customname) = "FieldC"]; + repeated NinOptNative Field4 = 4 [(gogoproto.customname) = "FieldD"]; + optional uint64 Field6 = 6 [(gogoproto.customname) = "FieldE"]; + optional sint32 Field7 = 7 [(gogoproto.customname) = "FieldF"]; + optional NidOptNative Field8 = 8 [(gogoproto.customname) = "FieldG"]; + optional bool Field13 = 13 [(gogoproto.customname) = "FieldH"]; + optional string Field14 = 14 [(gogoproto.customname) = "FieldI"]; + optional bytes Field15 = 15 [(gogoproto.customname) = "FieldJ"]; +} + +message CustomNameCustomType { + optional bytes Id = 1 [(gogoproto.customname) = "FieldA", (gogoproto.customtype) = "Uuid"]; + optional bytes Value = 2 [(gogoproto.customname) = "FieldB", (gogoproto.customtype) = "github.com/gogo/protobuf/test/custom.Uint128"]; + repeated bytes Ids = 3 [(gogoproto.customname) = "FieldC", (gogoproto.customtype) = "Uuid"]; + repeated bytes Values = 4 [(gogoproto.customname) = "FieldD", (gogoproto.customtype) = "github.com/gogo/protobuf/test/custom.Uint128"]; +} + +message CustomNameNinEmbeddedStructUnion { + option (gogoproto.onlyone) = true; + optional NidOptNative Field1 = 1 [(gogoproto.embed) = true]; + optional NinOptNative Field200 = 200 [(gogoproto.customname) = "FieldA"]; + optional bool Field210 = 210 [(gogoproto.customname) = "FieldB"]; +} + +message CustomNameEnum { + optional TheTestEnum Field1 = 1 [(gogoproto.customname) = "FieldA"]; + repeated TheTestEnum Field2 = 2 [(gogoproto.customname) = "FieldB"]; +} + +message NoExtensionsMap { + option (gogoproto.face) = false; + option (gogoproto.goproto_extensions_map) = false; + optional int64 Field1 = 1; + extensions 100 to 199; +} + +extend NoExtensionsMap { + optional double FieldA1 = 100; + optional NinOptNative FieldB1 = 101; + optional NinEmbeddedStruct FieldC1 = 102; +} + +message Unrecognized { + option (gogoproto.goproto_unrecognized) = false; + optional string Field1 = 1; +} + +message UnrecognizedWithInner { + message Inner { + option (gogoproto.goproto_unrecognized) = false; + optional uint32 Field1 = 1; + } + + repeated Inner embedded = 1; + optional string Field2 = 2; +} + +message UnrecognizedWithEmbed { + message Embedded { + option (gogoproto.goproto_unrecognized) = false; + optional uint32 Field1 = 1; + } + + optional Embedded embedded = 1 [(gogoproto.embed) = true, (gogoproto.nullable) = false]; + optional string Field2 = 2; +} + +message Node { + optional string Label = 1; + repeated Node Children = 2; +} + diff --git a/vendor/github.com/gogo/protobuf/test/combos/unsafeunmarshaler/thetestpb_test.go b/vendor/github.com/gogo/protobuf/test/combos/unsafeunmarshaler/thetestpb_test.go new file mode 100644 index 000000000..fe1f52406 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/combos/unsafeunmarshaler/thetestpb_test.go @@ -0,0 +1,14637 @@ +// Code generated by protoc-gen-gogo. +// source: combos/unsafeunmarshaler/thetest.proto +// DO NOT EDIT! + +/* +Package test is a generated protocol buffer package. + +It is generated from these files: + combos/unsafeunmarshaler/thetest.proto + +It has these top-level messages: + NidOptNative + NinOptNative + NidRepNative + NinRepNative + NidRepPackedNative + NinRepPackedNative + NidOptStruct + NinOptStruct + NidRepStruct + NinRepStruct + NidEmbeddedStruct + NinEmbeddedStruct + NidNestedStruct + NinNestedStruct + NidOptCustom + CustomDash + NinOptCustom + NidRepCustom + NinRepCustom + NinOptNativeUnion + NinOptStructUnion + NinEmbeddedStructUnion + NinNestedStructUnion + Tree + OrBranch + AndBranch + Leaf + DeepTree + ADeepBranch + AndDeepBranch + DeepLeaf + Nil + NidOptEnum + NinOptEnum + NidRepEnum + NinRepEnum + NinOptEnumDefault + AnotherNinOptEnum + AnotherNinOptEnumDefault + Timer + MyExtendable + OtherExtenable + NestedDefinition + NestedScope + NinOptNativeDefault + CustomContainer + CustomNameNidOptNative + CustomNameNinOptNative + CustomNameNinRepNative + CustomNameNinStruct + CustomNameCustomType + CustomNameNinEmbeddedStructUnion + CustomNameEnum + NoExtensionsMap + Unrecognized + UnrecognizedWithInner + UnrecognizedWithEmbed + Node +*/ +package test + +import testing "testing" +import math_rand "math/rand" +import time "time" +import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" +import github_com_gogo_protobuf_jsonpb "github.com/gogo/protobuf/jsonpb" +import fmt "fmt" +import go_parser "go/parser" +import proto "github.com/gogo/protobuf/proto" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +func TestNidOptNativeProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidOptNative(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidOptNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkNidOptNativeProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NidOptNative, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNidOptNative(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNidOptNativeProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNidOptNative(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &NidOptNative{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinOptNativeProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptNative(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinOptNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkNinOptNativeProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinOptNative, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNinOptNative(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNinOptNativeProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinOptNative(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &NinOptNative{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNidRepNativeProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepNative(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidRepNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkNidRepNativeProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NidRepNative, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNidRepNative(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNidRepNativeProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNidRepNative(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &NidRepNative{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinRepNativeProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepNative(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinRepNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkNinRepNativeProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinRepNative, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNinRepNative(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNinRepNativeProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinRepNative(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &NinRepNative{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNidRepPackedNativeProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepPackedNative(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidRepPackedNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkNidRepPackedNativeProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NidRepPackedNative, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNidRepPackedNative(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNidRepPackedNativeProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNidRepPackedNative(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &NidRepPackedNative{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinRepPackedNativeProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepPackedNative(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinRepPackedNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkNinRepPackedNativeProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinRepPackedNative, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNinRepPackedNative(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNinRepPackedNativeProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinRepPackedNative(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &NinRepPackedNative{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNidOptStructProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidOptStruct(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidOptStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkNidOptStructProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NidOptStruct, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNidOptStruct(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNidOptStructProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNidOptStruct(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &NidOptStruct{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinOptStructProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptStruct(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinOptStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkNinOptStructProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinOptStruct, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNinOptStruct(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNinOptStructProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinOptStruct(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &NinOptStruct{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNidRepStructProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepStruct(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidRepStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkNidRepStructProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NidRepStruct, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNidRepStruct(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNidRepStructProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNidRepStruct(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &NidRepStruct{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinRepStructProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepStruct(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinRepStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkNinRepStructProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinRepStruct, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNinRepStruct(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNinRepStructProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinRepStruct(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &NinRepStruct{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNidEmbeddedStructProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidEmbeddedStruct(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidEmbeddedStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkNidEmbeddedStructProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NidEmbeddedStruct, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNidEmbeddedStruct(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNidEmbeddedStructProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNidEmbeddedStruct(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &NidEmbeddedStruct{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinEmbeddedStructProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinEmbeddedStruct(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinEmbeddedStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkNinEmbeddedStructProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinEmbeddedStruct, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNinEmbeddedStruct(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNinEmbeddedStructProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinEmbeddedStruct(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &NinEmbeddedStruct{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNidNestedStructProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidNestedStruct(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidNestedStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkNidNestedStructProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NidNestedStruct, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNidNestedStruct(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNidNestedStructProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNidNestedStruct(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &NidNestedStruct{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinNestedStructProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinNestedStruct(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinNestedStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkNinNestedStructProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinNestedStruct, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNinNestedStruct(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNinNestedStructProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinNestedStruct(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &NinNestedStruct{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNidOptCustomProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidOptCustom(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidOptCustom{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkNidOptCustomProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NidOptCustom, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNidOptCustom(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNidOptCustomProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNidOptCustom(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &NidOptCustom{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestCustomDashProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomDash(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &CustomDash{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkCustomDashProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*CustomDash, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedCustomDash(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkCustomDashProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedCustomDash(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &CustomDash{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinOptCustomProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptCustom(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinOptCustom{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkNinOptCustomProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinOptCustom, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNinOptCustom(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNinOptCustomProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinOptCustom(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &NinOptCustom{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNidRepCustomProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepCustom(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidRepCustom{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkNidRepCustomProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NidRepCustom, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNidRepCustom(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNidRepCustomProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNidRepCustom(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &NidRepCustom{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinRepCustomProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepCustom(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinRepCustom{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkNinRepCustomProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinRepCustom, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNinRepCustom(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNinRepCustomProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinRepCustom(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &NinRepCustom{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinOptNativeUnionProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptNativeUnion(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinOptNativeUnion{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkNinOptNativeUnionProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinOptNativeUnion, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNinOptNativeUnion(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNinOptNativeUnionProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinOptNativeUnion(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &NinOptNativeUnion{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinOptStructUnionProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptStructUnion(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinOptStructUnion{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkNinOptStructUnionProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinOptStructUnion, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNinOptStructUnion(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNinOptStructUnionProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinOptStructUnion(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &NinOptStructUnion{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinEmbeddedStructUnionProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinEmbeddedStructUnion(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinEmbeddedStructUnion{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkNinEmbeddedStructUnionProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinEmbeddedStructUnion, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNinEmbeddedStructUnion(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNinEmbeddedStructUnionProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinEmbeddedStructUnion(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &NinEmbeddedStructUnion{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinNestedStructUnionProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinNestedStructUnion(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinNestedStructUnion{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkNinNestedStructUnionProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinNestedStructUnion, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNinNestedStructUnion(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNinNestedStructUnionProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinNestedStructUnion(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &NinNestedStructUnion{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestTreeProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedTree(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Tree{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkTreeProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Tree, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedTree(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkTreeProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedTree(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &Tree{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestOrBranchProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedOrBranch(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &OrBranch{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkOrBranchProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*OrBranch, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedOrBranch(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkOrBranchProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedOrBranch(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &OrBranch{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestAndBranchProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAndBranch(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &AndBranch{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkAndBranchProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*AndBranch, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedAndBranch(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkAndBranchProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedAndBranch(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &AndBranch{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestLeafProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedLeaf(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Leaf{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkLeafProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Leaf, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedLeaf(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkLeafProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedLeaf(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &Leaf{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestDeepTreeProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedDeepTree(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &DeepTree{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkDeepTreeProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*DeepTree, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedDeepTree(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkDeepTreeProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedDeepTree(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &DeepTree{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestADeepBranchProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedADeepBranch(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &ADeepBranch{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkADeepBranchProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*ADeepBranch, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedADeepBranch(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkADeepBranchProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedADeepBranch(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &ADeepBranch{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestAndDeepBranchProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAndDeepBranch(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &AndDeepBranch{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkAndDeepBranchProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*AndDeepBranch, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedAndDeepBranch(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkAndDeepBranchProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedAndDeepBranch(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &AndDeepBranch{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestDeepLeafProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedDeepLeaf(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &DeepLeaf{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkDeepLeafProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*DeepLeaf, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedDeepLeaf(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkDeepLeafProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedDeepLeaf(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &DeepLeaf{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNilProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNil(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Nil{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkNilProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Nil, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNil(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNilProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNil(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &Nil{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNidOptEnumProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidOptEnum(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidOptEnum{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkNidOptEnumProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NidOptEnum, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNidOptEnum(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNidOptEnumProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNidOptEnum(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &NidOptEnum{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinOptEnumProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptEnum(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinOptEnum{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkNinOptEnumProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinOptEnum, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNinOptEnum(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNinOptEnumProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinOptEnum(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &NinOptEnum{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNidRepEnumProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepEnum(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidRepEnum{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkNidRepEnumProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NidRepEnum, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNidRepEnum(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNidRepEnumProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNidRepEnum(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &NidRepEnum{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinRepEnumProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepEnum(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinRepEnum{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkNinRepEnumProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinRepEnum, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNinRepEnum(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNinRepEnumProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinRepEnum(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &NinRepEnum{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinOptEnumDefaultProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptEnumDefault(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinOptEnumDefault{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkNinOptEnumDefaultProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinOptEnumDefault, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNinOptEnumDefault(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNinOptEnumDefaultProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinOptEnumDefault(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &NinOptEnumDefault{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestAnotherNinOptEnumProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAnotherNinOptEnum(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &AnotherNinOptEnum{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkAnotherNinOptEnumProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*AnotherNinOptEnum, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedAnotherNinOptEnum(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkAnotherNinOptEnumProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedAnotherNinOptEnum(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &AnotherNinOptEnum{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestAnotherNinOptEnumDefaultProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAnotherNinOptEnumDefault(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &AnotherNinOptEnumDefault{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkAnotherNinOptEnumDefaultProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*AnotherNinOptEnumDefault, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedAnotherNinOptEnumDefault(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkAnotherNinOptEnumDefaultProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedAnotherNinOptEnumDefault(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &AnotherNinOptEnumDefault{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestTimerProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedTimer(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Timer{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkTimerProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Timer, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedTimer(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkTimerProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedTimer(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &Timer{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestMyExtendableProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMyExtendable(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &MyExtendable{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkMyExtendableProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*MyExtendable, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedMyExtendable(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkMyExtendableProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedMyExtendable(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &MyExtendable{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestOtherExtenableProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedOtherExtenable(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &OtherExtenable{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkOtherExtenableProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*OtherExtenable, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedOtherExtenable(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkOtherExtenableProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedOtherExtenable(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &OtherExtenable{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNestedDefinitionProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNestedDefinition(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NestedDefinition{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkNestedDefinitionProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NestedDefinition, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNestedDefinition(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNestedDefinitionProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNestedDefinition(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &NestedDefinition{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNestedDefinition_NestedMessageProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNestedDefinition_NestedMessage(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NestedDefinition_NestedMessage{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkNestedDefinition_NestedMessageProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NestedDefinition_NestedMessage, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNestedDefinition_NestedMessage(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNestedDefinition_NestedMessageProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNestedDefinition_NestedMessage(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &NestedDefinition_NestedMessage{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNestedDefinition_NestedMessage_NestedNestedMsgProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NestedDefinition_NestedMessage_NestedNestedMsg{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkNestedDefinition_NestedMessage_NestedNestedMsgProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NestedDefinition_NestedMessage_NestedNestedMsg, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNestedDefinition_NestedMessage_NestedNestedMsgProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &NestedDefinition_NestedMessage_NestedNestedMsg{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNestedScopeProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNestedScope(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NestedScope{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkNestedScopeProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NestedScope, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNestedScope(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNestedScopeProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNestedScope(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &NestedScope{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinOptNativeDefaultProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptNativeDefault(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinOptNativeDefault{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkNinOptNativeDefaultProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinOptNativeDefault, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNinOptNativeDefault(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNinOptNativeDefaultProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinOptNativeDefault(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &NinOptNativeDefault{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestCustomContainerProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomContainer(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &CustomContainer{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkCustomContainerProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*CustomContainer, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedCustomContainer(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkCustomContainerProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedCustomContainer(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &CustomContainer{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestCustomNameNidOptNativeProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameNidOptNative(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &CustomNameNidOptNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkCustomNameNidOptNativeProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*CustomNameNidOptNative, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedCustomNameNidOptNative(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkCustomNameNidOptNativeProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedCustomNameNidOptNative(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &CustomNameNidOptNative{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestCustomNameNinOptNativeProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameNinOptNative(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &CustomNameNinOptNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkCustomNameNinOptNativeProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*CustomNameNinOptNative, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedCustomNameNinOptNative(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkCustomNameNinOptNativeProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedCustomNameNinOptNative(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &CustomNameNinOptNative{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestCustomNameNinRepNativeProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameNinRepNative(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &CustomNameNinRepNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkCustomNameNinRepNativeProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*CustomNameNinRepNative, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedCustomNameNinRepNative(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkCustomNameNinRepNativeProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedCustomNameNinRepNative(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &CustomNameNinRepNative{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestCustomNameNinStructProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameNinStruct(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &CustomNameNinStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkCustomNameNinStructProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*CustomNameNinStruct, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedCustomNameNinStruct(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkCustomNameNinStructProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedCustomNameNinStruct(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &CustomNameNinStruct{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestCustomNameCustomTypeProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameCustomType(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &CustomNameCustomType{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkCustomNameCustomTypeProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*CustomNameCustomType, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedCustomNameCustomType(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkCustomNameCustomTypeProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedCustomNameCustomType(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &CustomNameCustomType{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestCustomNameNinEmbeddedStructUnionProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameNinEmbeddedStructUnion(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &CustomNameNinEmbeddedStructUnion{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkCustomNameNinEmbeddedStructUnionProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*CustomNameNinEmbeddedStructUnion, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedCustomNameNinEmbeddedStructUnion(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkCustomNameNinEmbeddedStructUnionProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedCustomNameNinEmbeddedStructUnion(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &CustomNameNinEmbeddedStructUnion{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestCustomNameEnumProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameEnum(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &CustomNameEnum{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkCustomNameEnumProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*CustomNameEnum, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedCustomNameEnum(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkCustomNameEnumProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedCustomNameEnum(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &CustomNameEnum{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNoExtensionsMapProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNoExtensionsMap(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NoExtensionsMap{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkNoExtensionsMapProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NoExtensionsMap, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNoExtensionsMap(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNoExtensionsMapProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNoExtensionsMap(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &NoExtensionsMap{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestUnrecognizedProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUnrecognized(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Unrecognized{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkUnrecognizedProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Unrecognized, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedUnrecognized(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkUnrecognizedProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedUnrecognized(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &Unrecognized{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestUnrecognizedWithInnerProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUnrecognizedWithInner(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &UnrecognizedWithInner{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkUnrecognizedWithInnerProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*UnrecognizedWithInner, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedUnrecognizedWithInner(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkUnrecognizedWithInnerProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedUnrecognizedWithInner(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &UnrecognizedWithInner{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestUnrecognizedWithInner_InnerProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUnrecognizedWithInner_Inner(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &UnrecognizedWithInner_Inner{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkUnrecognizedWithInner_InnerProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*UnrecognizedWithInner_Inner, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedUnrecognizedWithInner_Inner(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkUnrecognizedWithInner_InnerProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedUnrecognizedWithInner_Inner(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &UnrecognizedWithInner_Inner{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestUnrecognizedWithEmbedProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUnrecognizedWithEmbed(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &UnrecognizedWithEmbed{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkUnrecognizedWithEmbedProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*UnrecognizedWithEmbed, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedUnrecognizedWithEmbed(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkUnrecognizedWithEmbedProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedUnrecognizedWithEmbed(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &UnrecognizedWithEmbed{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestUnrecognizedWithEmbed_EmbeddedProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUnrecognizedWithEmbed_Embedded(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &UnrecognizedWithEmbed_Embedded{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkUnrecognizedWithEmbed_EmbeddedProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*UnrecognizedWithEmbed_Embedded, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedUnrecognizedWithEmbed_Embedded(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkUnrecognizedWithEmbed_EmbeddedProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedUnrecognizedWithEmbed_Embedded(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &UnrecognizedWithEmbed_Embedded{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNodeProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNode(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Node{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkNodeProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Node, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNode(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNodeProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNode(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &Node{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNidOptNativeJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidOptNative(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidOptNative{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNinOptNativeJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptNative(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinOptNative{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNidRepNativeJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepNative(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidRepNative{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNinRepNativeJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepNative(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinRepNative{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNidRepPackedNativeJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepPackedNative(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidRepPackedNative{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNinRepPackedNativeJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepPackedNative(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinRepPackedNative{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNidOptStructJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidOptStruct(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidOptStruct{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNinOptStructJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptStruct(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinOptStruct{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNidRepStructJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepStruct(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidRepStruct{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNinRepStructJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepStruct(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinRepStruct{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNidEmbeddedStructJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidEmbeddedStruct(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidEmbeddedStruct{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNinEmbeddedStructJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinEmbeddedStruct(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinEmbeddedStruct{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNidNestedStructJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidNestedStruct(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidNestedStruct{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNinNestedStructJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinNestedStruct(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinNestedStruct{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNidOptCustomJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidOptCustom(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidOptCustom{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestCustomDashJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomDash(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &CustomDash{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNinOptCustomJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptCustom(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinOptCustom{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNidRepCustomJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepCustom(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidRepCustom{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNinRepCustomJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepCustom(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinRepCustom{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNinOptNativeUnionJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptNativeUnion(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinOptNativeUnion{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNinOptStructUnionJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptStructUnion(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinOptStructUnion{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNinEmbeddedStructUnionJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinEmbeddedStructUnion(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinEmbeddedStructUnion{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNinNestedStructUnionJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinNestedStructUnion(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinNestedStructUnion{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestTreeJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedTree(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Tree{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestOrBranchJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedOrBranch(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &OrBranch{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestAndBranchJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAndBranch(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &AndBranch{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestLeafJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedLeaf(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Leaf{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestDeepTreeJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedDeepTree(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &DeepTree{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestADeepBranchJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedADeepBranch(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &ADeepBranch{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestAndDeepBranchJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAndDeepBranch(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &AndDeepBranch{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestDeepLeafJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedDeepLeaf(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &DeepLeaf{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNilJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNil(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Nil{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNidOptEnumJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidOptEnum(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidOptEnum{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNinOptEnumJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptEnum(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinOptEnum{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNidRepEnumJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepEnum(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidRepEnum{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNinRepEnumJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepEnum(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinRepEnum{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNinOptEnumDefaultJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptEnumDefault(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinOptEnumDefault{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestAnotherNinOptEnumJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAnotherNinOptEnum(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &AnotherNinOptEnum{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestAnotherNinOptEnumDefaultJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAnotherNinOptEnumDefault(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &AnotherNinOptEnumDefault{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestTimerJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedTimer(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Timer{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestMyExtendableJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMyExtendable(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &MyExtendable{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestOtherExtenableJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedOtherExtenable(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &OtherExtenable{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNestedDefinitionJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNestedDefinition(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NestedDefinition{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNestedDefinition_NestedMessageJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNestedDefinition_NestedMessage(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NestedDefinition_NestedMessage{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNestedDefinition_NestedMessage_NestedNestedMsgJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NestedDefinition_NestedMessage_NestedNestedMsg{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNestedScopeJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNestedScope(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NestedScope{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNinOptNativeDefaultJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptNativeDefault(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinOptNativeDefault{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestCustomContainerJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomContainer(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &CustomContainer{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestCustomNameNidOptNativeJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameNidOptNative(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &CustomNameNidOptNative{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestCustomNameNinOptNativeJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameNinOptNative(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &CustomNameNinOptNative{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestCustomNameNinRepNativeJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameNinRepNative(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &CustomNameNinRepNative{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestCustomNameNinStructJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameNinStruct(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &CustomNameNinStruct{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestCustomNameCustomTypeJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameCustomType(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &CustomNameCustomType{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestCustomNameNinEmbeddedStructUnionJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameNinEmbeddedStructUnion(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &CustomNameNinEmbeddedStructUnion{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestCustomNameEnumJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameEnum(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &CustomNameEnum{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNoExtensionsMapJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNoExtensionsMap(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NoExtensionsMap{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestUnrecognizedJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUnrecognized(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Unrecognized{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestUnrecognizedWithInnerJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUnrecognizedWithInner(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &UnrecognizedWithInner{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestUnrecognizedWithInner_InnerJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUnrecognizedWithInner_Inner(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &UnrecognizedWithInner_Inner{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestUnrecognizedWithEmbedJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUnrecognizedWithEmbed(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &UnrecognizedWithEmbed{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestUnrecognizedWithEmbed_EmbeddedJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUnrecognizedWithEmbed_Embedded(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &UnrecognizedWithEmbed_Embedded{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNodeJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNode(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Node{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNidOptNativeProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidOptNative(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NidOptNative{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNidOptNativeProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidOptNative(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NidOptNative{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinOptNativeProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptNative(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NinOptNative{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinOptNativeProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptNative(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NinOptNative{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNidRepNativeProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepNative(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NidRepNative{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNidRepNativeProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepNative(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NidRepNative{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinRepNativeProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepNative(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NinRepNative{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinRepNativeProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepNative(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NinRepNative{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNidRepPackedNativeProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepPackedNative(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NidRepPackedNative{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNidRepPackedNativeProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepPackedNative(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NidRepPackedNative{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinRepPackedNativeProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepPackedNative(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NinRepPackedNative{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinRepPackedNativeProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepPackedNative(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NinRepPackedNative{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNidOptStructProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidOptStruct(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NidOptStruct{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNidOptStructProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidOptStruct(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NidOptStruct{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinOptStructProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptStruct(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NinOptStruct{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinOptStructProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptStruct(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NinOptStruct{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNidRepStructProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepStruct(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NidRepStruct{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNidRepStructProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepStruct(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NidRepStruct{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinRepStructProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepStruct(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NinRepStruct{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinRepStructProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepStruct(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NinRepStruct{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNidEmbeddedStructProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidEmbeddedStruct(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NidEmbeddedStruct{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNidEmbeddedStructProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidEmbeddedStruct(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NidEmbeddedStruct{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinEmbeddedStructProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinEmbeddedStruct(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NinEmbeddedStruct{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinEmbeddedStructProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinEmbeddedStruct(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NinEmbeddedStruct{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNidNestedStructProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidNestedStruct(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NidNestedStruct{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNidNestedStructProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidNestedStruct(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NidNestedStruct{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinNestedStructProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinNestedStruct(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NinNestedStruct{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinNestedStructProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinNestedStruct(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NinNestedStruct{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNidOptCustomProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidOptCustom(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NidOptCustom{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNidOptCustomProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidOptCustom(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NidOptCustom{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestCustomDashProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomDash(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &CustomDash{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestCustomDashProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomDash(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &CustomDash{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinOptCustomProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptCustom(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NinOptCustom{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinOptCustomProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptCustom(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NinOptCustom{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNidRepCustomProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepCustom(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NidRepCustom{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNidRepCustomProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepCustom(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NidRepCustom{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinRepCustomProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepCustom(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NinRepCustom{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinRepCustomProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepCustom(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NinRepCustom{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinOptNativeUnionProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptNativeUnion(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NinOptNativeUnion{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinOptNativeUnionProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptNativeUnion(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NinOptNativeUnion{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinOptStructUnionProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptStructUnion(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NinOptStructUnion{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinOptStructUnionProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptStructUnion(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NinOptStructUnion{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinEmbeddedStructUnionProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinEmbeddedStructUnion(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NinEmbeddedStructUnion{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinEmbeddedStructUnionProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinEmbeddedStructUnion(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NinEmbeddedStructUnion{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinNestedStructUnionProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinNestedStructUnion(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NinNestedStructUnion{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinNestedStructUnionProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinNestedStructUnion(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NinNestedStructUnion{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestTreeProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedTree(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &Tree{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestTreeProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedTree(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &Tree{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestOrBranchProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedOrBranch(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &OrBranch{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestOrBranchProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedOrBranch(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &OrBranch{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestAndBranchProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAndBranch(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &AndBranch{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestAndBranchProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAndBranch(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &AndBranch{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestLeafProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedLeaf(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &Leaf{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestLeafProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedLeaf(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &Leaf{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestDeepTreeProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedDeepTree(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &DeepTree{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestDeepTreeProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedDeepTree(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &DeepTree{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestADeepBranchProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedADeepBranch(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &ADeepBranch{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestADeepBranchProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedADeepBranch(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &ADeepBranch{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestAndDeepBranchProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAndDeepBranch(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &AndDeepBranch{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestAndDeepBranchProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAndDeepBranch(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &AndDeepBranch{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestDeepLeafProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedDeepLeaf(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &DeepLeaf{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestDeepLeafProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedDeepLeaf(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &DeepLeaf{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNilProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNil(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &Nil{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNilProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNil(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &Nil{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNidOptEnumProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidOptEnum(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NidOptEnum{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNidOptEnumProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidOptEnum(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NidOptEnum{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinOptEnumProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptEnum(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NinOptEnum{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinOptEnumProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptEnum(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NinOptEnum{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNidRepEnumProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepEnum(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NidRepEnum{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNidRepEnumProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepEnum(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NidRepEnum{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinRepEnumProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepEnum(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NinRepEnum{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinRepEnumProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepEnum(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NinRepEnum{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinOptEnumDefaultProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptEnumDefault(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NinOptEnumDefault{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinOptEnumDefaultProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptEnumDefault(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NinOptEnumDefault{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestAnotherNinOptEnumProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAnotherNinOptEnum(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &AnotherNinOptEnum{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestAnotherNinOptEnumProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAnotherNinOptEnum(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &AnotherNinOptEnum{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestAnotherNinOptEnumDefaultProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAnotherNinOptEnumDefault(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &AnotherNinOptEnumDefault{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestAnotherNinOptEnumDefaultProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAnotherNinOptEnumDefault(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &AnotherNinOptEnumDefault{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestTimerProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedTimer(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &Timer{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestTimerProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedTimer(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &Timer{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestMyExtendableProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMyExtendable(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &MyExtendable{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestMyExtendableProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMyExtendable(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &MyExtendable{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestOtherExtenableProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedOtherExtenable(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &OtherExtenable{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestOtherExtenableProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedOtherExtenable(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &OtherExtenable{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNestedDefinitionProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNestedDefinition(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NestedDefinition{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNestedDefinitionProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNestedDefinition(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NestedDefinition{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNestedDefinition_NestedMessageProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNestedDefinition_NestedMessage(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NestedDefinition_NestedMessage{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNestedDefinition_NestedMessageProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNestedDefinition_NestedMessage(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NestedDefinition_NestedMessage{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNestedDefinition_NestedMessage_NestedNestedMsgProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NestedDefinition_NestedMessage_NestedNestedMsg{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNestedDefinition_NestedMessage_NestedNestedMsgProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NestedDefinition_NestedMessage_NestedNestedMsg{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNestedScopeProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNestedScope(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NestedScope{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNestedScopeProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNestedScope(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NestedScope{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinOptNativeDefaultProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptNativeDefault(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NinOptNativeDefault{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinOptNativeDefaultProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptNativeDefault(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NinOptNativeDefault{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestCustomContainerProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomContainer(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &CustomContainer{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestCustomContainerProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomContainer(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &CustomContainer{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestCustomNameNidOptNativeProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameNidOptNative(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &CustomNameNidOptNative{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestCustomNameNidOptNativeProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameNidOptNative(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &CustomNameNidOptNative{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestCustomNameNinOptNativeProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameNinOptNative(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &CustomNameNinOptNative{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestCustomNameNinOptNativeProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameNinOptNative(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &CustomNameNinOptNative{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestCustomNameNinRepNativeProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameNinRepNative(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &CustomNameNinRepNative{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestCustomNameNinRepNativeProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameNinRepNative(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &CustomNameNinRepNative{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestCustomNameNinStructProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameNinStruct(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &CustomNameNinStruct{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestCustomNameNinStructProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameNinStruct(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &CustomNameNinStruct{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestCustomNameCustomTypeProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameCustomType(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &CustomNameCustomType{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestCustomNameCustomTypeProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameCustomType(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &CustomNameCustomType{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestCustomNameNinEmbeddedStructUnionProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameNinEmbeddedStructUnion(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &CustomNameNinEmbeddedStructUnion{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestCustomNameNinEmbeddedStructUnionProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameNinEmbeddedStructUnion(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &CustomNameNinEmbeddedStructUnion{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestCustomNameEnumProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameEnum(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &CustomNameEnum{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestCustomNameEnumProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameEnum(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &CustomNameEnum{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNoExtensionsMapProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNoExtensionsMap(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NoExtensionsMap{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNoExtensionsMapProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNoExtensionsMap(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NoExtensionsMap{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestUnrecognizedProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUnrecognized(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &Unrecognized{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestUnrecognizedProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUnrecognized(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &Unrecognized{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestUnrecognizedWithInnerProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUnrecognizedWithInner(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &UnrecognizedWithInner{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestUnrecognizedWithInnerProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUnrecognizedWithInner(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &UnrecognizedWithInner{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestUnrecognizedWithInner_InnerProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUnrecognizedWithInner_Inner(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &UnrecognizedWithInner_Inner{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestUnrecognizedWithInner_InnerProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUnrecognizedWithInner_Inner(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &UnrecognizedWithInner_Inner{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestUnrecognizedWithEmbedProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUnrecognizedWithEmbed(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &UnrecognizedWithEmbed{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestUnrecognizedWithEmbedProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUnrecognizedWithEmbed(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &UnrecognizedWithEmbed{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestUnrecognizedWithEmbed_EmbeddedProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUnrecognizedWithEmbed_Embedded(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &UnrecognizedWithEmbed_Embedded{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestUnrecognizedWithEmbed_EmbeddedProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUnrecognizedWithEmbed_Embedded(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &UnrecognizedWithEmbed_Embedded{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNodeProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNode(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &Node{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNodeProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNode(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &Node{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNidOptNativeCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidOptNative(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NidOptNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNidOptNative(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNinOptNativeCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptNative(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinOptNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNinOptNative(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNidRepNativeCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidRepNative(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NidRepNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNidRepNative(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNinRepNativeCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinRepNative(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinRepNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNinRepNative(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNidRepPackedNativeCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidRepPackedNative(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NidRepPackedNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNidRepPackedNative(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNinRepPackedNativeCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinRepPackedNative(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinRepPackedNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNinRepPackedNative(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNidOptStructCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidOptStruct(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NidOptStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNidOptStruct(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNinOptStructCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptStruct(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinOptStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNinOptStruct(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNidRepStructCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidRepStruct(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NidRepStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNidRepStruct(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNinRepStructCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinRepStruct(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinRepStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNinRepStruct(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNidEmbeddedStructCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidEmbeddedStruct(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NidEmbeddedStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNidEmbeddedStruct(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNinEmbeddedStructCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinEmbeddedStruct(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinEmbeddedStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNinEmbeddedStruct(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNidNestedStructCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidNestedStruct(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NidNestedStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNidNestedStruct(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNinNestedStructCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinNestedStruct(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinNestedStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNinNestedStruct(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNidOptCustomCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidOptCustom(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NidOptCustom{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNidOptCustom(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestCustomDashCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomDash(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &CustomDash{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedCustomDash(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNinOptCustomCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptCustom(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinOptCustom{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNinOptCustom(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNidRepCustomCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidRepCustom(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NidRepCustom{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNidRepCustom(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNinRepCustomCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinRepCustom(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinRepCustom{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNinRepCustom(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNinOptNativeUnionCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptNativeUnion(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinOptNativeUnion{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNinOptNativeUnion(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNinOptStructUnionCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptStructUnion(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinOptStructUnion{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNinOptStructUnion(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNinEmbeddedStructUnionCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinEmbeddedStructUnion(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinEmbeddedStructUnion{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNinEmbeddedStructUnion(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNinNestedStructUnionCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinNestedStructUnion(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinNestedStructUnion{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNinNestedStructUnion(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestTreeCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedTree(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &Tree{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedTree(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestOrBranchCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedOrBranch(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &OrBranch{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedOrBranch(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestAndBranchCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAndBranch(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &AndBranch{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedAndBranch(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestLeafCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedLeaf(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &Leaf{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedLeaf(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestDeepTreeCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedDeepTree(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &DeepTree{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedDeepTree(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestADeepBranchCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedADeepBranch(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &ADeepBranch{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedADeepBranch(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestAndDeepBranchCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAndDeepBranch(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &AndDeepBranch{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedAndDeepBranch(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestDeepLeafCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedDeepLeaf(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &DeepLeaf{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedDeepLeaf(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNilCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNil(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &Nil{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNil(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNidOptEnumCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidOptEnum(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NidOptEnum{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNidOptEnum(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNinOptEnumCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptEnum(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinOptEnum{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNinOptEnum(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNidRepEnumCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidRepEnum(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NidRepEnum{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNidRepEnum(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNinRepEnumCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinRepEnum(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinRepEnum{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNinRepEnum(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNinOptEnumDefaultCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptEnumDefault(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinOptEnumDefault{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNinOptEnumDefault(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestAnotherNinOptEnumCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAnotherNinOptEnum(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &AnotherNinOptEnum{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedAnotherNinOptEnum(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestAnotherNinOptEnumDefaultCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAnotherNinOptEnumDefault(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &AnotherNinOptEnumDefault{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedAnotherNinOptEnumDefault(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestTimerCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedTimer(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &Timer{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedTimer(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestMyExtendableCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedMyExtendable(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &MyExtendable{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedMyExtendable(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestOtherExtenableCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedOtherExtenable(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &OtherExtenable{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedOtherExtenable(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNestedDefinitionCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNestedDefinition(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NestedDefinition{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNestedDefinition(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNestedDefinition_NestedMessageCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNestedDefinition_NestedMessage(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NestedDefinition_NestedMessage{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNestedDefinition_NestedMessage(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNestedDefinition_NestedMessage_NestedNestedMsgCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NestedDefinition_NestedMessage_NestedNestedMsg{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNestedScopeCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNestedScope(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NestedScope{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNestedScope(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNinOptNativeDefaultCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptNativeDefault(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinOptNativeDefault{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNinOptNativeDefault(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestCustomContainerCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomContainer(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &CustomContainer{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedCustomContainer(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestCustomNameNidOptNativeCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameNidOptNative(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &CustomNameNidOptNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedCustomNameNidOptNative(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestCustomNameNinOptNativeCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameNinOptNative(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &CustomNameNinOptNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedCustomNameNinOptNative(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestCustomNameNinRepNativeCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameNinRepNative(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &CustomNameNinRepNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedCustomNameNinRepNative(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestCustomNameNinStructCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameNinStruct(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &CustomNameNinStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedCustomNameNinStruct(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestCustomNameCustomTypeCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameCustomType(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &CustomNameCustomType{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedCustomNameCustomType(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestCustomNameNinEmbeddedStructUnionCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameNinEmbeddedStructUnion(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &CustomNameNinEmbeddedStructUnion{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedCustomNameNinEmbeddedStructUnion(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestCustomNameEnumCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameEnum(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &CustomNameEnum{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedCustomNameEnum(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNoExtensionsMapCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNoExtensionsMap(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NoExtensionsMap{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNoExtensionsMap(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestUnrecognizedCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedUnrecognized(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &Unrecognized{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedUnrecognized(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestUnrecognizedWithInnerCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedUnrecognizedWithInner(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &UnrecognizedWithInner{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedUnrecognizedWithInner(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestUnrecognizedWithInner_InnerCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedUnrecognizedWithInner_Inner(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &UnrecognizedWithInner_Inner{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedUnrecognizedWithInner_Inner(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestUnrecognizedWithEmbedCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedUnrecognizedWithEmbed(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &UnrecognizedWithEmbed{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedUnrecognizedWithEmbed(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestUnrecognizedWithEmbed_EmbeddedCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedUnrecognizedWithEmbed_Embedded(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &UnrecognizedWithEmbed_Embedded{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedUnrecognizedWithEmbed_Embedded(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNodeCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNode(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &Node{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNode(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestThetestDescription(t *testing.T) { + ThetestDescription() +} +func TestNidOptNativeVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidOptNative(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NidOptNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNinOptNativeVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptNative(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinOptNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNidRepNativeVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidRepNative(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NidRepNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNinRepNativeVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinRepNative(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinRepNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNidRepPackedNativeVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidRepPackedNative(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NidRepPackedNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNinRepPackedNativeVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinRepPackedNative(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinRepPackedNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNidOptStructVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidOptStruct(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NidOptStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNinOptStructVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptStruct(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinOptStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNidRepStructVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidRepStruct(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NidRepStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNinRepStructVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinRepStruct(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinRepStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNidEmbeddedStructVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidEmbeddedStruct(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NidEmbeddedStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNinEmbeddedStructVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinEmbeddedStruct(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinEmbeddedStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNidNestedStructVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidNestedStruct(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NidNestedStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNinNestedStructVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinNestedStruct(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinNestedStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNidOptCustomVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidOptCustom(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NidOptCustom{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestCustomDashVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomDash(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &CustomDash{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNinOptCustomVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptCustom(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinOptCustom{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNidRepCustomVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidRepCustom(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NidRepCustom{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNinRepCustomVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinRepCustom(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinRepCustom{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNinOptNativeUnionVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptNativeUnion(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinOptNativeUnion{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNinOptStructUnionVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptStructUnion(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinOptStructUnion{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNinEmbeddedStructUnionVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinEmbeddedStructUnion(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinEmbeddedStructUnion{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNinNestedStructUnionVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinNestedStructUnion(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinNestedStructUnion{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestTreeVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedTree(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &Tree{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestOrBranchVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedOrBranch(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &OrBranch{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestAndBranchVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAndBranch(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &AndBranch{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestLeafVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedLeaf(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &Leaf{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestDeepTreeVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedDeepTree(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &DeepTree{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestADeepBranchVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedADeepBranch(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &ADeepBranch{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestAndDeepBranchVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAndDeepBranch(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &AndDeepBranch{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestDeepLeafVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedDeepLeaf(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &DeepLeaf{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNilVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNil(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &Nil{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNidOptEnumVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidOptEnum(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NidOptEnum{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNinOptEnumVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptEnum(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinOptEnum{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNidRepEnumVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidRepEnum(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NidRepEnum{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNinRepEnumVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinRepEnum(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinRepEnum{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNinOptEnumDefaultVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptEnumDefault(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinOptEnumDefault{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestAnotherNinOptEnumVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAnotherNinOptEnum(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &AnotherNinOptEnum{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestAnotherNinOptEnumDefaultVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAnotherNinOptEnumDefault(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &AnotherNinOptEnumDefault{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestTimerVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedTimer(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &Timer{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestMyExtendableVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedMyExtendable(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &MyExtendable{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestOtherExtenableVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedOtherExtenable(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &OtherExtenable{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNestedDefinitionVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNestedDefinition(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NestedDefinition{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNestedDefinition_NestedMessageVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNestedDefinition_NestedMessage(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NestedDefinition_NestedMessage{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNestedDefinition_NestedMessage_NestedNestedMsgVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NestedDefinition_NestedMessage_NestedNestedMsg{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNestedScopeVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNestedScope(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NestedScope{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNinOptNativeDefaultVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptNativeDefault(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinOptNativeDefault{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestCustomContainerVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomContainer(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &CustomContainer{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestCustomNameNidOptNativeVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameNidOptNative(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &CustomNameNidOptNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestCustomNameNinOptNativeVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameNinOptNative(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &CustomNameNinOptNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestCustomNameNinRepNativeVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameNinRepNative(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &CustomNameNinRepNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestCustomNameNinStructVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameNinStruct(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &CustomNameNinStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestCustomNameCustomTypeVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameCustomType(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &CustomNameCustomType{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestCustomNameNinEmbeddedStructUnionVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameNinEmbeddedStructUnion(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &CustomNameNinEmbeddedStructUnion{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestCustomNameEnumVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameEnum(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &CustomNameEnum{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNoExtensionsMapVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNoExtensionsMap(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NoExtensionsMap{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestUnrecognizedVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedUnrecognized(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &Unrecognized{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestUnrecognizedWithInnerVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedUnrecognizedWithInner(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &UnrecognizedWithInner{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestUnrecognizedWithInner_InnerVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedUnrecognizedWithInner_Inner(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &UnrecognizedWithInner_Inner{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestUnrecognizedWithEmbedVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedUnrecognizedWithEmbed(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &UnrecognizedWithEmbed{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestUnrecognizedWithEmbed_EmbeddedVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedUnrecognizedWithEmbed_Embedded(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &UnrecognizedWithEmbed_Embedded{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNodeVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNode(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &Node{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNidOptNativeFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidOptNative(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNinOptNativeFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptNative(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNidRepNativeFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidRepNative(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNinRepNativeFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinRepNative(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNidRepPackedNativeFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidRepPackedNative(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNinRepPackedNativeFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinRepPackedNative(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNidOptStructFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidOptStruct(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNinOptStructFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptStruct(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNidRepStructFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidRepStruct(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNinRepStructFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinRepStruct(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNidEmbeddedStructFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidEmbeddedStruct(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNinEmbeddedStructFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinEmbeddedStruct(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNidNestedStructFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidNestedStruct(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNinNestedStructFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinNestedStruct(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNidOptCustomFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidOptCustom(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestCustomDashFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomDash(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNinOptCustomFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptCustom(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNidRepCustomFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidRepCustom(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNinRepCustomFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinRepCustom(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNinOptNativeUnionFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptNativeUnion(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNinOptStructUnionFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptStructUnion(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNinEmbeddedStructUnionFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinEmbeddedStructUnion(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNinNestedStructUnionFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinNestedStructUnion(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestTreeFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedTree(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestOrBranchFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedOrBranch(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestAndBranchFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAndBranch(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestLeafFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedLeaf(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestDeepTreeFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedDeepTree(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestADeepBranchFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedADeepBranch(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestAndDeepBranchFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAndDeepBranch(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestDeepLeafFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedDeepLeaf(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNilFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNil(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNidOptEnumFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidOptEnum(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNinOptEnumFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptEnum(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNidRepEnumFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidRepEnum(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNinRepEnumFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinRepEnum(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestAnotherNinOptEnumFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAnotherNinOptEnum(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestTimerFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedTimer(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNestedDefinitionFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNestedDefinition(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNestedDefinition_NestedMessageFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNestedDefinition_NestedMessage(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNestedDefinition_NestedMessage_NestedNestedMsgFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNestedScopeFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNestedScope(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestCustomContainerFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomContainer(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestCustomNameNidOptNativeFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameNidOptNative(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestCustomNameNinOptNativeFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameNinOptNative(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestCustomNameNinRepNativeFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameNinRepNative(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestCustomNameNinStructFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameNinStruct(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestCustomNameCustomTypeFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameCustomType(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestCustomNameNinEmbeddedStructUnionFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameNinEmbeddedStructUnion(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestCustomNameEnumFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameEnum(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestUnrecognizedFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedUnrecognized(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestUnrecognizedWithInnerFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedUnrecognizedWithInner(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestUnrecognizedWithInner_InnerFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedUnrecognizedWithInner_Inner(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestUnrecognizedWithEmbedFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedUnrecognizedWithEmbed(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestUnrecognizedWithEmbed_EmbeddedFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedUnrecognizedWithEmbed_Embedded(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNodeFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNode(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNidOptNativeGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidOptNative(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestNinOptNativeGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptNative(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestNidRepNativeGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidRepNative(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestNinRepNativeGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinRepNative(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestNidRepPackedNativeGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidRepPackedNative(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestNinRepPackedNativeGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinRepPackedNative(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestNidOptStructGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidOptStruct(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestNinOptStructGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptStruct(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestNidRepStructGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidRepStruct(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestNinRepStructGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinRepStruct(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestNidEmbeddedStructGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidEmbeddedStruct(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestNinEmbeddedStructGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinEmbeddedStruct(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestNidNestedStructGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidNestedStruct(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestNinNestedStructGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinNestedStruct(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestNidOptCustomGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidOptCustom(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestCustomDashGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomDash(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestNinOptCustomGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptCustom(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestNidRepCustomGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidRepCustom(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestNinRepCustomGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinRepCustom(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestNinOptNativeUnionGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptNativeUnion(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestNinOptStructUnionGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptStructUnion(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestNinEmbeddedStructUnionGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinEmbeddedStructUnion(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestNinNestedStructUnionGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinNestedStructUnion(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestTreeGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedTree(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestOrBranchGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedOrBranch(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestAndBranchGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAndBranch(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestLeafGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedLeaf(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestDeepTreeGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedDeepTree(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestADeepBranchGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedADeepBranch(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestAndDeepBranchGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAndDeepBranch(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestDeepLeafGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedDeepLeaf(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestNilGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNil(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestNidOptEnumGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidOptEnum(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestNinOptEnumGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptEnum(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestNidRepEnumGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidRepEnum(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestNinRepEnumGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinRepEnum(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestNinOptEnumDefaultGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptEnumDefault(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestAnotherNinOptEnumGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAnotherNinOptEnum(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestAnotherNinOptEnumDefaultGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAnotherNinOptEnumDefault(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestTimerGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedTimer(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestMyExtendableGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedMyExtendable(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestOtherExtenableGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedOtherExtenable(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestNestedDefinitionGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNestedDefinition(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestNestedDefinition_NestedMessageGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNestedDefinition_NestedMessage(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestNestedDefinition_NestedMessage_NestedNestedMsgGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestNestedScopeGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNestedScope(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestNinOptNativeDefaultGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptNativeDefault(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestCustomContainerGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomContainer(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestCustomNameNidOptNativeGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameNidOptNative(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestCustomNameNinOptNativeGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameNinOptNative(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestCustomNameNinRepNativeGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameNinRepNative(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestCustomNameNinStructGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameNinStruct(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestCustomNameCustomTypeGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameCustomType(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestCustomNameNinEmbeddedStructUnionGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameNinEmbeddedStructUnion(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestCustomNameEnumGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameEnum(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestNoExtensionsMapGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNoExtensionsMap(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestUnrecognizedGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedUnrecognized(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestUnrecognizedWithInnerGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedUnrecognizedWithInner(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestUnrecognizedWithInner_InnerGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedUnrecognizedWithInner_Inner(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestUnrecognizedWithEmbedGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedUnrecognizedWithEmbed(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestUnrecognizedWithEmbed_EmbeddedGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedUnrecognizedWithEmbed_Embedded(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestNodeGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNode(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestNidOptNativeSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidOptNative(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNidOptNativeSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NidOptNative, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNidOptNative(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinOptNativeSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptNative(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNinOptNativeSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinOptNative, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNinOptNative(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNidRepNativeSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepNative(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNidRepNativeSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NidRepNative, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNidRepNative(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinRepNativeSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepNative(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNinRepNativeSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinRepNative, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNinRepNative(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNidRepPackedNativeSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepPackedNative(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNidRepPackedNativeSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NidRepPackedNative, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNidRepPackedNative(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinRepPackedNativeSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepPackedNative(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNinRepPackedNativeSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinRepPackedNative, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNinRepPackedNative(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNidOptStructSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidOptStruct(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNidOptStructSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NidOptStruct, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNidOptStruct(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinOptStructSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptStruct(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNinOptStructSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinOptStruct, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNinOptStruct(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNidRepStructSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepStruct(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNidRepStructSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NidRepStruct, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNidRepStruct(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinRepStructSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepStruct(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNinRepStructSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinRepStruct, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNinRepStruct(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNidEmbeddedStructSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidEmbeddedStruct(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNidEmbeddedStructSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NidEmbeddedStruct, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNidEmbeddedStruct(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinEmbeddedStructSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinEmbeddedStruct(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNinEmbeddedStructSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinEmbeddedStruct, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNinEmbeddedStruct(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNidNestedStructSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidNestedStruct(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNidNestedStructSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NidNestedStruct, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNidNestedStruct(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinNestedStructSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinNestedStruct(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNinNestedStructSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinNestedStruct, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNinNestedStruct(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNidOptCustomSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidOptCustom(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNidOptCustomSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NidOptCustom, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNidOptCustom(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestCustomDashSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomDash(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkCustomDashSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*CustomDash, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedCustomDash(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinOptCustomSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptCustom(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNinOptCustomSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinOptCustom, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNinOptCustom(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNidRepCustomSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepCustom(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNidRepCustomSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NidRepCustom, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNidRepCustom(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinRepCustomSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepCustom(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNinRepCustomSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinRepCustom, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNinRepCustom(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinOptNativeUnionSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptNativeUnion(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNinOptNativeUnionSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinOptNativeUnion, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNinOptNativeUnion(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinOptStructUnionSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptStructUnion(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNinOptStructUnionSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinOptStructUnion, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNinOptStructUnion(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinEmbeddedStructUnionSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinEmbeddedStructUnion(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNinEmbeddedStructUnionSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinEmbeddedStructUnion, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNinEmbeddedStructUnion(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinNestedStructUnionSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinNestedStructUnion(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNinNestedStructUnionSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinNestedStructUnion, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNinNestedStructUnion(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestTreeSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedTree(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkTreeSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Tree, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedTree(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestOrBranchSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedOrBranch(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkOrBranchSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*OrBranch, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedOrBranch(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestAndBranchSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAndBranch(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkAndBranchSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*AndBranch, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedAndBranch(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestLeafSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedLeaf(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkLeafSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Leaf, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedLeaf(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestDeepTreeSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedDeepTree(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkDeepTreeSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*DeepTree, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedDeepTree(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestADeepBranchSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedADeepBranch(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkADeepBranchSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*ADeepBranch, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedADeepBranch(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestAndDeepBranchSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAndDeepBranch(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkAndDeepBranchSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*AndDeepBranch, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedAndDeepBranch(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestDeepLeafSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedDeepLeaf(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkDeepLeafSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*DeepLeaf, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedDeepLeaf(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNilSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNil(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNilSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Nil, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNil(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNidOptEnumSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidOptEnum(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNidOptEnumSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NidOptEnum, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNidOptEnum(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinOptEnumSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptEnum(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNinOptEnumSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinOptEnum, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNinOptEnum(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNidRepEnumSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepEnum(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNidRepEnumSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NidRepEnum, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNidRepEnum(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinRepEnumSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepEnum(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNinRepEnumSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinRepEnum, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNinRepEnum(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinOptEnumDefaultSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptEnumDefault(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNinOptEnumDefaultSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinOptEnumDefault, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNinOptEnumDefault(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestAnotherNinOptEnumSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAnotherNinOptEnum(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkAnotherNinOptEnumSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*AnotherNinOptEnum, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedAnotherNinOptEnum(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestAnotherNinOptEnumDefaultSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAnotherNinOptEnumDefault(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkAnotherNinOptEnumDefaultSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*AnotherNinOptEnumDefault, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedAnotherNinOptEnumDefault(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestTimerSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedTimer(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkTimerSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Timer, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedTimer(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestMyExtendableSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMyExtendable(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkMyExtendableSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*MyExtendable, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedMyExtendable(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestOtherExtenableSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedOtherExtenable(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkOtherExtenableSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*OtherExtenable, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedOtherExtenable(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNestedDefinitionSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNestedDefinition(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNestedDefinitionSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NestedDefinition, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNestedDefinition(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNestedDefinition_NestedMessageSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNestedDefinition_NestedMessage(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNestedDefinition_NestedMessageSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NestedDefinition_NestedMessage, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNestedDefinition_NestedMessage(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNestedDefinition_NestedMessage_NestedNestedMsgSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNestedDefinition_NestedMessage_NestedNestedMsgSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NestedDefinition_NestedMessage_NestedNestedMsg, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNestedScopeSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNestedScope(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNestedScopeSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NestedScope, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNestedScope(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinOptNativeDefaultSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptNativeDefault(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNinOptNativeDefaultSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinOptNativeDefault, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNinOptNativeDefault(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestCustomContainerSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomContainer(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkCustomContainerSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*CustomContainer, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedCustomContainer(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestCustomNameNidOptNativeSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameNidOptNative(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkCustomNameNidOptNativeSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*CustomNameNidOptNative, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedCustomNameNidOptNative(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestCustomNameNinOptNativeSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameNinOptNative(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkCustomNameNinOptNativeSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*CustomNameNinOptNative, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedCustomNameNinOptNative(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestCustomNameNinRepNativeSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameNinRepNative(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkCustomNameNinRepNativeSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*CustomNameNinRepNative, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedCustomNameNinRepNative(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestCustomNameNinStructSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameNinStruct(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkCustomNameNinStructSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*CustomNameNinStruct, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedCustomNameNinStruct(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestCustomNameCustomTypeSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameCustomType(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkCustomNameCustomTypeSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*CustomNameCustomType, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedCustomNameCustomType(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestCustomNameNinEmbeddedStructUnionSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameNinEmbeddedStructUnion(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkCustomNameNinEmbeddedStructUnionSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*CustomNameNinEmbeddedStructUnion, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedCustomNameNinEmbeddedStructUnion(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestCustomNameEnumSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameEnum(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkCustomNameEnumSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*CustomNameEnum, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedCustomNameEnum(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNoExtensionsMapSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNoExtensionsMap(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNoExtensionsMapSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NoExtensionsMap, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNoExtensionsMap(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestUnrecognizedSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUnrecognized(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkUnrecognizedSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Unrecognized, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedUnrecognized(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestUnrecognizedWithInnerSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUnrecognizedWithInner(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkUnrecognizedWithInnerSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*UnrecognizedWithInner, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedUnrecognizedWithInner(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestUnrecognizedWithInner_InnerSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUnrecognizedWithInner_Inner(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkUnrecognizedWithInner_InnerSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*UnrecognizedWithInner_Inner, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedUnrecognizedWithInner_Inner(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestUnrecognizedWithEmbedSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUnrecognizedWithEmbed(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkUnrecognizedWithEmbedSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*UnrecognizedWithEmbed, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedUnrecognizedWithEmbed(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestUnrecognizedWithEmbed_EmbeddedSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUnrecognizedWithEmbed_Embedded(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkUnrecognizedWithEmbed_EmbeddedSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*UnrecognizedWithEmbed_Embedded, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedUnrecognizedWithEmbed_Embedded(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNodeSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNode(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNodeSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Node, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNode(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNidOptNativeStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidOptNative(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNinOptNativeStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptNative(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNidRepNativeStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidRepNative(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNinRepNativeStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinRepNative(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNidRepPackedNativeStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidRepPackedNative(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNinRepPackedNativeStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinRepPackedNative(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNidOptStructStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidOptStruct(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNinOptStructStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptStruct(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNidRepStructStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidRepStruct(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNinRepStructStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinRepStruct(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNidEmbeddedStructStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidEmbeddedStruct(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNinEmbeddedStructStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinEmbeddedStruct(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNidNestedStructStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidNestedStruct(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNinNestedStructStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinNestedStruct(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNidOptCustomStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidOptCustom(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestCustomDashStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomDash(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNinOptCustomStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptCustom(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNidRepCustomStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidRepCustom(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNinRepCustomStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinRepCustom(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNinOptNativeUnionStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptNativeUnion(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNinOptStructUnionStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptStructUnion(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNinEmbeddedStructUnionStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinEmbeddedStructUnion(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNinNestedStructUnionStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinNestedStructUnion(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestTreeStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedTree(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestOrBranchStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedOrBranch(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestAndBranchStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAndBranch(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestLeafStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedLeaf(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestDeepTreeStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedDeepTree(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestADeepBranchStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedADeepBranch(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestAndDeepBranchStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAndDeepBranch(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestDeepLeafStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedDeepLeaf(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNilStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNil(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNidOptEnumStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidOptEnum(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNinOptEnumStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptEnum(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNidRepEnumStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidRepEnum(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNinRepEnumStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinRepEnum(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNinOptEnumDefaultStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptEnumDefault(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestAnotherNinOptEnumStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAnotherNinOptEnum(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestAnotherNinOptEnumDefaultStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAnotherNinOptEnumDefault(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestTimerStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedTimer(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestMyExtendableStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedMyExtendable(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestOtherExtenableStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedOtherExtenable(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNestedDefinitionStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNestedDefinition(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNestedDefinition_NestedMessageStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNestedDefinition_NestedMessage(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNestedDefinition_NestedMessage_NestedNestedMsgStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNestedScopeStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNestedScope(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNinOptNativeDefaultStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptNativeDefault(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestCustomContainerStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomContainer(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestCustomNameNidOptNativeStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameNidOptNative(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestCustomNameNinOptNativeStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameNinOptNative(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestCustomNameNinRepNativeStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameNinRepNative(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestCustomNameNinStructStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameNinStruct(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestCustomNameCustomTypeStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameCustomType(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestCustomNameNinEmbeddedStructUnionStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameNinEmbeddedStructUnion(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestCustomNameEnumStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameEnum(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNoExtensionsMapStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNoExtensionsMap(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestUnrecognizedStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedUnrecognized(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestUnrecognizedWithInnerStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedUnrecognizedWithInner(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestUnrecognizedWithInner_InnerStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedUnrecognizedWithInner_Inner(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestUnrecognizedWithEmbedStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedUnrecognizedWithEmbed(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestUnrecognizedWithEmbed_EmbeddedStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedUnrecognizedWithEmbed_Embedded(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNodeStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNode(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNinOptNativeUnionOnlyOne(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptNativeUnion(popr, true) + v := p.GetValue() + msg := &NinOptNativeUnion{} + if !msg.SetValue(v) { + t.Fatalf("OnlyOne: Could not set Value") + } + if !p.Equal(msg) { + t.Fatalf("%#v !OnlyOne Equal %#v", msg, p) + } +} +func TestNinOptStructUnionOnlyOne(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptStructUnion(popr, true) + v := p.GetValue() + msg := &NinOptStructUnion{} + if !msg.SetValue(v) { + t.Fatalf("OnlyOne: Could not set Value") + } + if !p.Equal(msg) { + t.Fatalf("%#v !OnlyOne Equal %#v", msg, p) + } +} +func TestNinEmbeddedStructUnionOnlyOne(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinEmbeddedStructUnion(popr, true) + v := p.GetValue() + msg := &NinEmbeddedStructUnion{} + if !msg.SetValue(v) { + t.Fatalf("OnlyOne: Could not set Value") + } + if !p.Equal(msg) { + t.Fatalf("%#v !OnlyOne Equal %#v", msg, p) + } +} +func TestNinNestedStructUnionOnlyOne(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinNestedStructUnion(popr, true) + v := p.GetValue() + msg := &NinNestedStructUnion{} + if !msg.SetValue(v) { + t.Fatalf("OnlyOne: Could not set Value") + } + if !p.Equal(msg) { + t.Fatalf("%#v !OnlyOne Equal %#v", msg, p) + } +} +func TestTreeOnlyOne(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedTree(popr, true) + v := p.GetValue() + msg := &Tree{} + if !msg.SetValue(v) { + t.Fatalf("OnlyOne: Could not set Value") + } + if !p.Equal(msg) { + t.Fatalf("%#v !OnlyOne Equal %#v", msg, p) + } +} +func TestDeepTreeOnlyOne(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedDeepTree(popr, true) + v := p.GetValue() + msg := &DeepTree{} + if !msg.SetValue(v) { + t.Fatalf("OnlyOne: Could not set Value") + } + if !p.Equal(msg) { + t.Fatalf("%#v !OnlyOne Equal %#v", msg, p) + } +} +func TestCustomNameNinEmbeddedStructUnionOnlyOne(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameNinEmbeddedStructUnion(popr, true) + v := p.GetValue() + msg := &CustomNameNinEmbeddedStructUnion{} + if !msg.SetValue(v) { + t.Fatalf("OnlyOne: Could not set Value") + } + if !p.Equal(msg) { + t.Fatalf("%#v !OnlyOne Equal %#v", msg, p) + } +} + +//These tests are generated by github.com/gogo/protobuf/plugin/testgen diff --git a/vendor/github.com/gogo/protobuf/test/combos/unsafeunmarshaler/uuid.go b/vendor/github.com/gogo/protobuf/test/combos/unsafeunmarshaler/uuid.go new file mode 100644 index 000000000..760111191 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/combos/unsafeunmarshaler/uuid.go @@ -0,0 +1,126 @@ +// Extensions for Protocol Buffers to create more go like structures. +// +// Copyright (c) 2013, Vastech SA (PTY) LTD. All rights reserved. +// http://github.com/gogo/protobuf/gogoproto +// +// 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 test + +import ( + "bytes" + "encoding/json" +) + +func PutLittleEndianUint64(b []byte, offset int, v uint64) { + b[offset] = byte(v) + b[offset+1] = byte(v >> 8) + b[offset+2] = byte(v >> 16) + b[offset+3] = byte(v >> 24) + b[offset+4] = byte(v >> 32) + b[offset+5] = byte(v >> 40) + b[offset+6] = byte(v >> 48) + b[offset+7] = byte(v >> 56) +} + +type Uuid []byte + +func (uuid Uuid) Marshal() ([]byte, error) { + if len(uuid) == 0 { + return nil, nil + } + return []byte(uuid), nil +} + +func (uuid Uuid) MarshalTo(data []byte) (n int, err error) { + if len(uuid) == 0 { + return 0, nil + } + copy(data, uuid) + return 16, nil +} + +func (uuid *Uuid) Unmarshal(data []byte) error { + if len(data) == 0 { + uuid = nil + return nil + } + id := Uuid(make([]byte, 16)) + copy(id, data) + *uuid = id + return nil +} + +func (uuid *Uuid) Size() int { + if uuid == nil { + return 0 + } + if len(*uuid) == 0 { + return 0 + } + return 16 +} + +func (uuid Uuid) MarshalJSON() ([]byte, error) { + return json.Marshal([]byte(uuid)) +} + +func (uuid *Uuid) UnmarshalJSON(data []byte) error { + v := new([]byte) + err := json.Unmarshal(data, v) + if err != nil { + return err + } + return uuid.Unmarshal(*v) +} + +func (uuid Uuid) Equal(other Uuid) bool { + return bytes.Equal(uuid[0:], other[0:]) +} + +func (uuid Uuid) Compare(other Uuid) int { + return bytes.Compare(uuid[0:], other[0:]) +} + +type int63 interface { + Int63() int64 +} + +func NewPopulatedUuid(r int63) *Uuid { + u := RandV4(r) + return &u +} + +func RandV4(r int63) Uuid { + uuid := make(Uuid, 16) + uuid.RandV4(r) + return uuid +} + +func (uuid Uuid) RandV4(r int63) { + PutLittleEndianUint64(uuid, 0, uint64(r.Int63())) + PutLittleEndianUint64(uuid, 8, uint64(r.Int63())) + uuid[6] = (uuid[6] & 0xf) | 0x40 + uuid[8] = (uuid[8] & 0x3f) | 0x80 +} diff --git a/vendor/github.com/gogo/protobuf/test/custom-dash-type/customdash.go b/vendor/github.com/gogo/protobuf/test/custom-dash-type/customdash.go new file mode 100644 index 000000000..7e61c8f38 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/custom-dash-type/customdash.go @@ -0,0 +1,102 @@ +// Copyright (c) 2013, Vastech SA (PTY) LTD. 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 custom contains custom types for test and example purposes. + These types are used by the test structures generated by gogoprotobuf. +*/ +package custom + +import ( + "bytes" + "encoding/json" +) + +type Bytes []byte + +func (b Bytes) Marshal() ([]byte, error) { + buffer := make([]byte, len(b)) + _, err := b.MarshalTo(buffer) + return buffer, err +} + +func (b Bytes) MarshalTo(data []byte) (n int, err error) { + copy(data, b) + return len(b), nil +} + +func (b *Bytes) Unmarshal(data []byte) error { + if data == nil { + b = nil + return nil + } + pb := make([]byte, len(data)) + copy(pb, data) + *b = pb + return nil +} + +func (b Bytes) MarshalJSON() ([]byte, error) { + data, err := b.Marshal() + if err != nil { + return nil, err + } + return json.Marshal(data) +} + +func (b *Bytes) Size() int { + return len(*b) +} + +func (b *Bytes) UnmarshalJSON(data []byte) error { + v := new([]byte) + err := json.Unmarshal(data, v) + if err != nil { + return err + } + return b.Unmarshal(*v) +} + +func (this Bytes) Equal(that Bytes) bool { + return bytes.Equal(this, that) +} + +func (this Bytes) Compare(that Bytes) int { + return bytes.Compare(this, that) +} + +type randy interface { + Intn(n int) int +} + +func NewPopulatedBytes(r randy) *Bytes { + l := r.Intn(100) + data := Bytes(make([]byte, l)) + for i := 0; i < l; i++ { + data[i] = byte(r.Intn(255)) + } + return &data +} diff --git a/vendor/github.com/gogo/protobuf/test/custom/custom.go b/vendor/github.com/gogo/protobuf/test/custom/custom.go new file mode 100644 index 000000000..c7d00a30d --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/custom/custom.go @@ -0,0 +1,145 @@ +// Copyright (c) 2013, Vastech SA (PTY) LTD. 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 custom contains custom types for test and example purposes. + These types are used by the test structures generated by gogoprotobuf. +*/ +package custom + +import ( + "bytes" + "encoding/json" + "errors" + "unsafe" +) + +type Uint128 [2]uint64 + +func (u Uint128) Marshal() ([]byte, error) { + buffer := make([]byte, 16) + _, err := u.MarshalTo(buffer) + return buffer, err +} + +func (u Uint128) MarshalTo(data []byte) (n int, err error) { + PutLittleEndianUint128(data, 0, u) + return 16, nil +} + +func GetLittleEndianUint64(b []byte, offset int) uint64 { + return *(*uint64)(unsafe.Pointer(&b[offset])) +} + +func PutLittleEndianUint64(b []byte, offset int, v uint64) { + b[offset] = byte(v) + b[offset+1] = byte(v >> 8) + b[offset+2] = byte(v >> 16) + b[offset+3] = byte(v >> 24) + b[offset+4] = byte(v >> 32) + b[offset+5] = byte(v >> 40) + b[offset+6] = byte(v >> 48) + b[offset+7] = byte(v >> 56) +} + +func PutLittleEndianUint128(buffer []byte, offset int, v [2]uint64) { + PutLittleEndianUint64(buffer, offset, v[0]) + PutLittleEndianUint64(buffer, offset+8, v[1]) +} + +func GetLittleEndianUint128(buffer []byte, offset int) (value [2]uint64) { + value[0] = GetLittleEndianUint64(buffer, offset) + value[1] = GetLittleEndianUint64(buffer, offset+8) + return +} + +func (u *Uint128) Unmarshal(data []byte) error { + if data == nil { + u = nil + return nil + } + if len(data) == 0 { + pu := Uint128{} + *u = pu + return nil + } + if len(data) != 16 { + return errors.New("Uint128: invalid length") + } + pu := Uint128(GetLittleEndianUint128(data, 0)) + *u = pu + return nil +} + +func (u Uint128) MarshalJSON() ([]byte, error) { + data, err := u.Marshal() + if err != nil { + return nil, err + } + return json.Marshal(data) +} + +func (u Uint128) Size() int { + return 16 +} + +func (u *Uint128) UnmarshalJSON(data []byte) error { + v := new([]byte) + err := json.Unmarshal(data, v) + if err != nil { + return err + } + return u.Unmarshal(*v) +} + +func (this Uint128) Equal(that Uint128) bool { + return this == that +} + +func (this Uint128) Compare(that Uint128) int { + thisdata, err := this.Marshal() + if err != nil { + panic(err) + } + thatdata, err := that.Marshal() + if err != nil { + panic(err) + } + return bytes.Compare(thisdata, thatdata) +} + +type randy interface { + Intn(n int) int +} + +func NewPopulatedUint128(r randy) *Uint128 { + data := make([]byte, 16) + for i := 0; i < 16; i++ { + data[i] = byte(r.Intn(255)) + } + u := Uint128(GetLittleEndianUint128(data, 0)) + return &u +} diff --git a/vendor/github.com/gogo/protobuf/test/custom/custom_test.go b/vendor/github.com/gogo/protobuf/test/custom/custom_test.go new file mode 100644 index 000000000..d1e4fcc29 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/custom/custom_test.go @@ -0,0 +1,41 @@ +// Copyright (c) 2013, Vastech SA (PTY) LTD. 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 custom + +import ( + "testing" +) + +func TestUint128(t *testing.T) { + var uint128a = Uint128{0, 1} + buf := make([]byte, 16) + PutLittleEndianUint128(buf, 0, uint128a) + uint128b := GetLittleEndianUint128(buf, 0) + if !uint128a.Equal(uint128b) { + t.Fatalf("%v != %v", uint128a, uint128b) + } +} diff --git a/vendor/github.com/gogo/protobuf/test/custombytesnonstruct/Makefile b/vendor/github.com/gogo/protobuf/test/custombytesnonstruct/Makefile new file mode 100644 index 000000000..e6a2cc3c9 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/custombytesnonstruct/Makefile @@ -0,0 +1,30 @@ +# Extensions for Protocol Buffers to create more go like structures. +# +# Copyright (c) 2013, Vastech SA (PTY) LTD. 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: + (protoc --proto_path=../../../../../:../../protobuf/:. --gogo_out=. proto.proto) diff --git a/vendor/github.com/gogo/protobuf/test/custombytesnonstruct/custombytesnonstruct_test.go b/vendor/github.com/gogo/protobuf/test/custombytesnonstruct/custombytesnonstruct_test.go new file mode 100644 index 000000000..680529cfd --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/custombytesnonstruct/custombytesnonstruct_test.go @@ -0,0 +1,6 @@ +package custombytesnonstruct + +import testing "testing" + +func TestCustomBytesNonStruct(t *testing.T) { +} diff --git a/vendor/github.com/gogo/protobuf/test/custombytesnonstruct/customtype.go b/vendor/github.com/gogo/protobuf/test/custombytesnonstruct/customtype.go new file mode 100644 index 000000000..8f0ed3aee --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/custombytesnonstruct/customtype.go @@ -0,0 +1,8 @@ +package custombytesnonstruct + +type CustomType int + +func (c *CustomType) Unmarshal(data []byte) error { + data[0] = 42 + return nil +} diff --git a/vendor/github.com/gogo/protobuf/test/custombytesnonstruct/proto.pb.go b/vendor/github.com/gogo/protobuf/test/custombytesnonstruct/proto.pb.go new file mode 100644 index 000000000..7923edc21 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/custombytesnonstruct/proto.pb.go @@ -0,0 +1,278 @@ +// Code generated by protoc-gen-gogo. +// source: proto.proto +// DO NOT EDIT! + +/* + Package custombytesnonstruct is a generated protocol buffer package. + + It is generated from these files: + proto.proto + + It has these top-level messages: + Object +*/ +package custombytesnonstruct + +import proto "github.com/gogo/protobuf/proto" +import fmt "fmt" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" + +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. +const _ = proto.GoGoProtoPackageIsVersion1 + +type Object struct { + CustomField1 *CustomType `protobuf:"bytes,1,opt,name=CustomField1,json=customField1,customtype=CustomType" json:"CustomField1,omitempty"` + CustomField2 []CustomType `protobuf:"bytes,2,rep,name=CustomField2,json=customField2,customtype=CustomType" json:"CustomField2,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *Object) Reset() { *m = Object{} } +func (m *Object) String() string { return proto.CompactTextString(m) } +func (*Object) ProtoMessage() {} +func (*Object) Descriptor() ([]byte, []int) { return fileDescriptorProto, []int{0} } + +func init() { + proto.RegisterType((*Object)(nil), "custombytesnonstruct.Object") +} +func (m *Object) 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 ErrIntOverflowProto + } + 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: Object: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Object: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field CustomField1", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProto + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthProto + } + postIndex := iNdEx + byteLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var v CustomType + m.CustomField1 = &v + if err := m.CustomField1.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field CustomField2", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProto + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthProto + } + postIndex := iNdEx + byteLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var v CustomType + m.CustomField2 = append(m.CustomField2, v) + if err := m.CustomField2[len(m.CustomField2)-1].Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipProto(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthProto + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipProto(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, ErrIntOverflowProto + } + 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, ErrIntOverflowProto + } + 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, ErrIntOverflowProto + } + 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, ErrInvalidLengthProto + } + return iNdEx, nil + case 3: + for { + var innerWire uint64 + var start int = iNdEx + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowProto + } + 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 := skipProto(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 ( + ErrInvalidLengthProto = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowProto = fmt.Errorf("proto: integer overflow") +) + +var fileDescriptorProto = []byte{ + // 149 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xe2, 0xe2, 0x2e, 0x28, 0xca, 0x2f, + 0xc9, 0xd7, 0x03, 0x93, 0x42, 0x22, 0xc9, 0xa5, 0xc5, 0x25, 0xf9, 0xb9, 0x49, 0x95, 0x25, 0xa9, + 0xc5, 0x79, 0xf9, 0x79, 0xc5, 0x25, 0x45, 0xa5, 0xc9, 0x25, 0x52, 0xba, 0xe9, 0x99, 0x25, 0x19, + 0xa5, 0x49, 0x7a, 0xc9, 0xf9, 0xb9, 0xfa, 0xe9, 0xf9, 0xe9, 0xf9, 0xfa, 0x60, 0xc5, 0x49, 0xa5, + 0x69, 0x60, 0x1e, 0x98, 0x03, 0x66, 0x41, 0x0c, 0x51, 0x2a, 0xe0, 0x62, 0xf3, 0x4f, 0xca, 0x4a, + 0x4d, 0x2e, 0x11, 0x32, 0xe2, 0xe2, 0x71, 0x06, 0x1b, 0xe8, 0x96, 0x99, 0x9a, 0x93, 0x62, 0x28, + 0xc1, 0xa8, 0xc0, 0xa8, 0xc1, 0xe3, 0xc4, 0x77, 0xeb, 0x9e, 0x3c, 0x17, 0x44, 0x3c, 0xa4, 0xb2, + 0x20, 0x35, 0x88, 0x27, 0x19, 0x49, 0x0d, 0x9a, 0x1e, 0x23, 0x09, 0x26, 0x05, 0x66, 0x02, 0x7a, + 0x8c, 0x9c, 0x58, 0x2e, 0x3c, 0x92, 0x63, 0x04, 0x04, 0x00, 0x00, 0xff, 0xff, 0x42, 0x52, 0xad, + 0x49, 0xca, 0x00, 0x00, 0x00, +} diff --git a/vendor/github.com/gogo/protobuf/test/custombytesnonstruct/proto.proto b/vendor/github.com/gogo/protobuf/test/custombytesnonstruct/proto.proto new file mode 100644 index 000000000..a0f0016da --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/custombytesnonstruct/proto.proto @@ -0,0 +1,11 @@ +syntax = "proto2"; +package custombytesnonstruct; + +import "github.com/gogo/protobuf/gogoproto/gogo.proto"; + +option (gogoproto.unmarshaler_all) = true; + +message Object { + optional bytes CustomField1 = 1 [(gogoproto.customtype) = "CustomType"]; + repeated bytes CustomField2 = 2 [(gogoproto.customtype) = "CustomType"]; +} diff --git a/vendor/github.com/gogo/protobuf/test/dashfilename/dash-filename.proto b/vendor/github.com/gogo/protobuf/test/dashfilename/dash-filename.proto new file mode 100644 index 000000000..1ae5aa6f3 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/dashfilename/dash-filename.proto @@ -0,0 +1,10 @@ +syntax = "proto2"; +package dashfilename; + +import "github.com/gogo/protobuf/gogoproto/gogo.proto"; + +option (gogoproto.marshaler_all) = true; + +message test { + +} diff --git a/vendor/github.com/gogo/protobuf/test/dashfilename/df_test.go b/vendor/github.com/gogo/protobuf/test/dashfilename/df_test.go new file mode 100644 index 000000000..2f54a98fd --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/dashfilename/df_test.go @@ -0,0 +1,20 @@ +package dashfilename + +import ( + "os" + "os/exec" + "testing" +) + +//Issue 16 : https://github.com/gogo/protobuf/issues/detail?id=16 +func TestDashFilename(t *testing.T) { + name := "dash-filename" + cmd := exec.Command("protoc", "--gogo_out=.", "-I=../../../../../:../../protobuf/:.", name+".proto") + data, err := cmd.CombinedOutput() + if err != nil { + t.Fatalf("err = %v: %s", err, string(data)) + } + if err := os.Remove(name + ".pb.go"); err != nil { + panic(err) + } +} diff --git a/vendor/github.com/gogo/protobuf/test/dashfilename/doc.go b/vendor/github.com/gogo/protobuf/test/dashfilename/doc.go new file mode 100644 index 000000000..b288f33e7 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/dashfilename/doc.go @@ -0,0 +1 @@ +package dashfilename diff --git a/vendor/github.com/gogo/protobuf/test/defaultconflict/df.proto b/vendor/github.com/gogo/protobuf/test/defaultconflict/df.proto new file mode 100644 index 000000000..359458e91 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/defaultconflict/df.proto @@ -0,0 +1,38 @@ +// Copyright (c) 2013, Vastech SA (PTY) LTD. All rights reserved. +// http://github.com/gogo/protobuf/gogoproto +// +// 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 defaultcheck; + +import "github.com/gogo/protobuf/gogoproto/gogo.proto"; + +option (gogoproto.face_all) = true; +option (gogoproto.goproto_getters_all) = false; + +message A { + optional int64 Field1 = 1 [default=1234]; +} + diff --git a/vendor/github.com/gogo/protobuf/test/defaultconflict/dg.proto b/vendor/github.com/gogo/protobuf/test/defaultconflict/dg.proto new file mode 100644 index 000000000..80e7cac84 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/defaultconflict/dg.proto @@ -0,0 +1,37 @@ +// Copyright (c) 2013, Vastech SA (PTY) LTD. All rights reserved. +// http://github.com/gogo/protobuf/gogoproto +// +// 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 defaultcheck; + +import "github.com/gogo/protobuf/gogoproto/gogo.proto"; + +option (gogoproto.goproto_getters_all) = false; + +message A { + optional int64 Field1 = 1 [default=1234]; +} + diff --git a/vendor/github.com/gogo/protobuf/test/defaultconflict/doc.go b/vendor/github.com/gogo/protobuf/test/defaultconflict/doc.go new file mode 100644 index 000000000..9762d2038 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/defaultconflict/doc.go @@ -0,0 +1 @@ +package defaultcheck diff --git a/vendor/github.com/gogo/protobuf/test/defaultconflict/nc.proto b/vendor/github.com/gogo/protobuf/test/defaultconflict/nc.proto new file mode 100644 index 000000000..a7c7bfec8 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/defaultconflict/nc.proto @@ -0,0 +1,35 @@ +// Copyright (c) 2013, Vastech SA (PTY) LTD. All rights reserved. +// http://github.com/gogo/protobuf/gogoproto +// +// 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 defaultcheck; + +import "github.com/gogo/protobuf/gogoproto/gogo.proto"; + +message A { + optional int64 Field1 = 1 [default = 1234, (gogoproto.nullable) = false];; +} + diff --git a/vendor/github.com/gogo/protobuf/test/defaultconflict/nc_test.go b/vendor/github.com/gogo/protobuf/test/defaultconflict/nc_test.go new file mode 100644 index 000000000..86166e993 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/defaultconflict/nc_test.go @@ -0,0 +1,66 @@ +// Copyright (c) 2013, Vastech SA (PTY) LTD. All rights reserved. +// http://github.com/gogo/protobuf/gogoproto +// +// 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 defaultcheck + +import ( + "os" + "os/exec" + "strings" + "testing" +) + +func testDefaultConflict(t *testing.T, name string) { + cmd := exec.Command("protoc", "--gogo_out=.", "-I=../../../../../:../../protobuf/:.", name+".proto") + data, err := cmd.CombinedOutput() + if err == nil && !strings.Contains(string(data), "Plugin failed with status code 1") { + t.Errorf("Expected error, got: %s", data) + if err = os.Remove(name + ".pb.go"); err != nil { + t.Error(err) + } + } + t.Logf("received expected error = %v and output = %v", err, string(data)) +} + +func TestNullableDefault(t *testing.T) { + testDefaultConflict(t, "nc") +} + +func TestNullableExtension(t *testing.T) { + testDefaultConflict(t, "nx") +} + +func TestNullableEnum(t *testing.T) { + testDefaultConflict(t, "ne") +} + +func TestFaceDefault(t *testing.T) { + testDefaultConflict(t, "df") +} + +func TestNoGettersDefault(t *testing.T) { + testDefaultConflict(t, "dg") +} diff --git a/vendor/github.com/gogo/protobuf/test/defaultconflict/ne.proto b/vendor/github.com/gogo/protobuf/test/defaultconflict/ne.proto new file mode 100644 index 000000000..9266fed07 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/defaultconflict/ne.proto @@ -0,0 +1,40 @@ +// Copyright (c) 2013, Vastech SA (PTY) LTD. All rights reserved. +// http://github.com/gogo/protobuf/gogoproto +// +// 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 defaultcheck; + +import "github.com/gogo/protobuf/gogoproto/gogo.proto"; + +enum E { + P = 10; + Q = 11; +} + +message A { + optional E Field1 = 1 [(gogoproto.nullable) = false]; +} + diff --git a/vendor/github.com/gogo/protobuf/test/defaultconflict/nx.proto b/vendor/github.com/gogo/protobuf/test/defaultconflict/nx.proto new file mode 100644 index 000000000..20b3d95a8 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/defaultconflict/nx.proto @@ -0,0 +1,39 @@ +// Copyright (c) 2013, Vastech SA (PTY) LTD. All rights reserved. +// http://github.com/gogo/protobuf/gogoproto +// +// 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 defaultcheck; + +import "github.com/gogo/protobuf/gogoproto/gogo.proto"; + +message A { + extensions 1 to max; +} + +extend A { + optional int64 Field1 = 1 [(gogoproto.nullable) = false]; +} + diff --git a/vendor/github.com/gogo/protobuf/test/embedconflict/.gitignore b/vendor/github.com/gogo/protobuf/test/embedconflict/.gitignore new file mode 100644 index 000000000..c61a5e8b0 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/embedconflict/.gitignore @@ -0,0 +1 @@ +*.pb.go diff --git a/vendor/github.com/gogo/protobuf/test/embedconflict/doc.go b/vendor/github.com/gogo/protobuf/test/embedconflict/doc.go new file mode 100644 index 000000000..484e94831 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/embedconflict/doc.go @@ -0,0 +1 @@ +package embedconflict diff --git a/vendor/github.com/gogo/protobuf/test/embedconflict/eb.proto b/vendor/github.com/gogo/protobuf/test/embedconflict/eb.proto new file mode 100644 index 000000000..73bbe2616 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/embedconflict/eb.proto @@ -0,0 +1,36 @@ +// Copyright (c) 2013, Vastech SA (PTY) LTD. All rights reserved. +// http://github.com/gogo/protobuf/gogoproto +// +// 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 embedconflict; + +import "github.com/gogo/protobuf/gogoproto/gogo.proto"; + +message TakesLongTooDebug { + optional bytes Field1 = 1; + optional bytes Field2 = 2 [(gogoproto.nullable)=false, (gogoproto.embed)=true]; +} diff --git a/vendor/github.com/gogo/protobuf/test/embedconflict/ec.proto b/vendor/github.com/gogo/protobuf/test/embedconflict/ec.proto new file mode 100644 index 000000000..b20929039 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/embedconflict/ec.proto @@ -0,0 +1,38 @@ +// Copyright (c) 2013, Vastech SA (PTY) LTD. All rights reserved. +// http://github.com/gogo/protobuf/gogoproto +// +// 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 embedconflict; + +import "github.com/gogo/protobuf/gogoproto/gogo.proto"; + +message A { + optional int64 Field1 = 1; + optional B B = 2 [(gogoproto.embed) = true]; +} + +message B { + optional double Field1 = 1; +} diff --git a/vendor/github.com/gogo/protobuf/test/embedconflict/ec_test.go b/vendor/github.com/gogo/protobuf/test/embedconflict/ec_test.go new file mode 100644 index 000000000..ddaecdfe2 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/embedconflict/ec_test.go @@ -0,0 +1,117 @@ +// Copyright (c) 2013, Vastech SA (PTY) LTD. All rights reserved. +// http://github.com/gogo/protobuf/gogoproto +// +// 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 embedconflict + +import ( + "os" + "os/exec" + "strings" + "testing" +) + +func TestEmbedConflict(t *testing.T) { + cmd := exec.Command("protoc", "--gogo_out=.", "-I=../../../../../:../../protobuf/:.", "ec.proto") + data, err := cmd.CombinedOutput() + if err == nil && !strings.Contains(string(data), "Plugin failed with status code 1") { + t.Errorf("Expected error, got: %s", data) + if err = os.Remove("ec.pb.go"); err != nil { + t.Error(err) + } + } + t.Logf("received expected error = %v and output = %v", err, string(data)) +} + +func TestEmbedMarshaler(t *testing.T) { + cmd := exec.Command("protoc", "--gogo_out=.", "-I=../../../../../:../../protobuf/:.", "em.proto") + data, err := cmd.CombinedOutput() + dataStr := string(data) + t.Logf("received error = %v and output = %v", err, dataStr) + if !strings.Contains(dataStr, "WARNING: found non-") || !strings.Contains(dataStr, "unsafe_marshaler") { + t.Errorf("Expected WARNING: found non-[marshaler unsafe_marshaler] C with embedded marshaler D") + } + if err = os.Remove("em.pb.go"); err != nil { + t.Error(err) + } +} + +func TestEmbedExtend(t *testing.T) { + cmd := exec.Command("protoc", "--gogo_out=.", "-I=../../../../../:../../protobuf/:.", "ee.proto") + data, err := cmd.CombinedOutput() + if err == nil && !strings.Contains(string(data), "Plugin failed with status code 1") { + t.Errorf("Expected error, got: %s", data) + if err = os.Remove("ee.pb.go"); err != nil { + t.Error(err) + } + } + t.Logf("received expected error = %v and output = %v", err, string(data)) +} + +func TestCustomName(t *testing.T) { + cmd := exec.Command("protoc", "--gogo_out=.", "-I=../../../../../:../../protobuf/:.", "en.proto") + data, err := cmd.CombinedOutput() + if err == nil && !strings.Contains(string(data), "Plugin failed with status code 1") { + t.Errorf("Expected error, got: %s", data) + if err = os.Remove("en.pb.go"); err != nil { + t.Error(err) + } + } + t.Logf("received expected error = %v and output = %v", err, string(data)) +} + +func TestRepeatedEmbed(t *testing.T) { + cmd := exec.Command("protoc", "--gogo_out=.", "-I=../../../../../:../../protobuf/:.", "er.proto") + data, err := cmd.CombinedOutput() + if err == nil && !strings.Contains(string(data), "Plugin failed with status code 1") { + t.Errorf("Expected error, got: %s", data) + if err = os.Remove("er.pb.go"); err != nil { + t.Error(err) + } + } + dataStr := string(data) + t.Logf("received error = %v and output = %v", err, dataStr) + warning := "ERROR: found repeated embedded field B in message A" + if !strings.Contains(dataStr, warning) { + t.Errorf("Expected " + warning) + } +} + +func TestTakesTooLongToDebug(t *testing.T) { + cmd := exec.Command("protoc", "--gogo_out=.", "-I=../../../../../:../../protobuf/:.", "eb.proto") + data, err := cmd.CombinedOutput() + if err == nil && !strings.Contains(string(data), "Plugin failed with status code 1") { + t.Errorf("Expected error, got: %s", data) + if err = os.Remove("eb.pb.go"); err != nil { + t.Error(err) + } + } + dataStr := string(data) + t.Logf("received error = %v and output = %v", err, dataStr) + warning := "ERROR: found embedded bytes field" + if !strings.Contains(dataStr, warning) { + t.Errorf("Expected " + warning) + } +} diff --git a/vendor/github.com/gogo/protobuf/test/embedconflict/ee.proto b/vendor/github.com/gogo/protobuf/test/embedconflict/ee.proto new file mode 100644 index 000000000..0bc805fd3 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/embedconflict/ee.proto @@ -0,0 +1,39 @@ +// Copyright (c) 2013, Vastech SA (PTY) LTD. All rights reserved. +// http://github.com/gogo/protobuf/gogoproto +// +// 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 embedconflict; + +import "github.com/gogo/protobuf/gogoproto/gogo.proto"; + +message E { + optional int64 Field1 = 1; + extensions 100 to 199; +} + +extend E { + optional int64 Field1 = 100 [(gogoproto.embed) = true]; +} diff --git a/vendor/github.com/gogo/protobuf/test/embedconflict/em.proto b/vendor/github.com/gogo/protobuf/test/embedconflict/em.proto new file mode 100644 index 000000000..990ec7678 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/embedconflict/em.proto @@ -0,0 +1,40 @@ +// Copyright (c) 2013, Vastech SA (PTY) LTD. All rights reserved. +// http://github.com/gogo/protobuf/gogoproto +// +// 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 embedconflict; + +import "github.com/gogo/protobuf/gogoproto/gogo.proto"; + +message C { + optional int64 Field1 = 1; + optional D D = 2 [(gogoproto.embed) = true]; +} + +message D { + option (gogoproto.marshaler) = true; + optional double Field2 = 2; +} diff --git a/vendor/github.com/gogo/protobuf/test/embedconflict/en.proto b/vendor/github.com/gogo/protobuf/test/embedconflict/en.proto new file mode 100644 index 000000000..18b65c494 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/embedconflict/en.proto @@ -0,0 +1,38 @@ +// Copyright (c) 2013, Vastech SA (PTY) LTD. All rights reserved. +// http://github.com/gogo/protobuf/gogoproto +// +// 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 embedconflict; + +import "github.com/gogo/protobuf/gogoproto/gogo.proto"; + +message F { + optional G G = 2 [(gogoproto.embed) = true, (gogoproto.customname) = "G"]; +} + +message G { + optional int64 Field1 = 1; +} diff --git a/vendor/github.com/gogo/protobuf/test/embedconflict/er.proto b/vendor/github.com/gogo/protobuf/test/embedconflict/er.proto new file mode 100644 index 000000000..2c647d8f1 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/embedconflict/er.proto @@ -0,0 +1,39 @@ +// Copyright (c) 2013, Vastech SA (PTY) LTD. All rights reserved. +// http://github.com/gogo/protobuf/gogoproto +// +// 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 embedconflict; + +import "github.com/gogo/protobuf/gogoproto/gogo.proto"; + +message A { + optional int64 Field1 = 1; + repeated B B = 2 [(gogoproto.embed) = true]; +} + +message B { + optional double Field2 = 2; +} diff --git a/vendor/github.com/gogo/protobuf/test/empty-issue70/Makefile b/vendor/github.com/gogo/protobuf/test/empty-issue70/Makefile new file mode 100644 index 000000000..43928f03b --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/empty-issue70/Makefile @@ -0,0 +1,30 @@ +# Extensions for Protocol Buffers to create more go like structures. +# +# Copyright (c) 2013, Vastech SA (PTY) LTD. 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: + (protoc --proto_path=../../../../../:../../protobuf/:. --gogo_out=. empty.proto) diff --git a/vendor/github.com/gogo/protobuf/test/empty-issue70/empty.pb.go b/vendor/github.com/gogo/protobuf/test/empty-issue70/empty.pb.go new file mode 100644 index 000000000..b23653fe4 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/empty-issue70/empty.pb.go @@ -0,0 +1,208 @@ +// Code generated by protoc-gen-gogo. +// source: empty.proto +// DO NOT EDIT! + +/* +Package empty is a generated protocol buffer package. + +It is generated from these files: + empty.proto + +It has these top-level messages: + TestRequest +*/ +package empty + +import proto "github.com/gogo/protobuf/proto" +import fmt "fmt" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" + +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. +const _ = proto.GoGoProtoPackageIsVersion1 + +type TestRequest struct { + XXX_unrecognized []byte `json:"-"` +} + +func (m *TestRequest) Reset() { *m = TestRequest{} } +func (m *TestRequest) String() string { return proto.CompactTextString(m) } +func (*TestRequest) ProtoMessage() {} +func (*TestRequest) Descriptor() ([]byte, []int) { return fileDescriptorEmpty, []int{0} } + +func init() { + proto.RegisterType((*TestRequest)(nil), "empty.TestRequest") +} +func (m *TestRequest) 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 ErrIntOverflowEmpty + } + 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: TestRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: TestRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipEmpty(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthEmpty + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipEmpty(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, ErrIntOverflowEmpty + } + 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, ErrIntOverflowEmpty + } + 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, ErrIntOverflowEmpty + } + 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, ErrInvalidLengthEmpty + } + return iNdEx, nil + case 3: + for { + var innerWire uint64 + var start int = iNdEx + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowEmpty + } + 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 := skipEmpty(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 ( + ErrInvalidLengthEmpty = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowEmpty = fmt.Errorf("proto: integer overflow") +) + +var fileDescriptorEmpty = []byte{ + // 91 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xe2, 0xe2, 0x4e, 0xcd, 0x2d, 0x28, + 0xa9, 0xd4, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x62, 0x05, 0x73, 0xa4, 0x74, 0xd3, 0x33, 0x4b, + 0x32, 0x4a, 0x93, 0xf4, 0x92, 0xf3, 0x73, 0xf5, 0xd3, 0xf3, 0xd3, 0xf3, 0xf5, 0xc1, 0xb2, 0x49, + 0xa5, 0x69, 0x60, 0x1e, 0x98, 0x03, 0x66, 0x41, 0x74, 0x29, 0xf1, 0x72, 0x71, 0x87, 0xa4, 0x16, + 0x97, 0x04, 0xa5, 0x16, 0x96, 0x02, 0x29, 0x27, 0x96, 0x0b, 0x8f, 0xe4, 0x18, 0x01, 0x01, 0x00, + 0x00, 0xff, 0xff, 0x0e, 0xe3, 0x23, 0x3d, 0x58, 0x00, 0x00, 0x00, +} diff --git a/vendor/github.com/gogo/protobuf/test/empty-issue70/empty.proto b/vendor/github.com/gogo/protobuf/test/empty-issue70/empty.proto new file mode 100644 index 000000000..eeda2d1be --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/empty-issue70/empty.proto @@ -0,0 +1,11 @@ +syntax="proto2"; + +package empty; + +import "github.com/gogo/protobuf/gogoproto/gogo.proto"; + +option (gogoproto.unmarshaler_all) = true; + +message TestRequest { + +} \ No newline at end of file diff --git a/vendor/github.com/gogo/protobuf/test/empty-issue70/empty_test.go b/vendor/github.com/gogo/protobuf/test/empty-issue70/empty_test.go new file mode 100644 index 000000000..fa821d932 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/empty-issue70/empty_test.go @@ -0,0 +1,9 @@ +package empty + +import ( + "testing" +) + +func TestEmpty(t *testing.T) { + +} diff --git a/vendor/github.com/gogo/protobuf/test/enumcustomname/Makefile b/vendor/github.com/gogo/protobuf/test/enumcustomname/Makefile new file mode 100644 index 000000000..f705adc0f --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/enumcustomname/Makefile @@ -0,0 +1,30 @@ +# Extensions for Protocol Buffers to create more go like structures. +# +# Copyright (c) 2013, Vastech SA (PTY) LTD. 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: + (protoc --proto_path=../../../../../:../../protobuf/:. --gogo_out=. enumcustomname.proto) diff --git a/vendor/github.com/gogo/protobuf/test/enumcustomname/enumcustomname.pb.go b/vendor/github.com/gogo/protobuf/test/enumcustomname/enumcustomname.pb.go new file mode 100644 index 000000000..8349c643e --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/enumcustomname/enumcustomname.pb.go @@ -0,0 +1,309 @@ +// Code generated by protoc-gen-gogo. +// source: enumcustomname.proto +// DO NOT EDIT! + +/* + Package enumcustomname is a generated protocol buffer package. + + Package enumcustomname tests the behavior of enum_customname and + enumvalue_customname extensions. + + It is generated from these files: + enumcustomname.proto + + It has these top-level messages: + OnlyEnums +*/ +package enumcustomname + +import proto "github.com/gogo/protobuf/proto" +import fmt "fmt" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" +import test "github.com/gogo/protobuf/test" + +import strconv "strconv" + +// 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. +const _ = proto.GoGoProtoPackageIsVersion1 + +type MyCustomEnum int32 + +const ( + // The following field will take on the custom name and the prefix, joined + // by an underscore. + MyCustomEnum_MyBetterNameA MyCustomEnum = 0 + MyCustomEnum_B MyCustomEnum = 1 +) + +var MyCustomEnum_name = map[int32]string{ + 0: "A", + 1: "B", +} +var MyCustomEnum_value = map[string]int32{ + "A": 0, + "B": 1, +} + +func (x MyCustomEnum) Enum() *MyCustomEnum { + p := new(MyCustomEnum) + *p = x + return p +} +func (x MyCustomEnum) String() string { + return proto.EnumName(MyCustomEnum_name, int32(x)) +} +func (x *MyCustomEnum) UnmarshalJSON(data []byte) error { + value, err := proto.UnmarshalJSONEnum(MyCustomEnum_value, data, "MyCustomEnum") + if err != nil { + return err + } + *x = MyCustomEnum(value) + return nil +} +func (MyCustomEnum) EnumDescriptor() ([]byte, []int) { return fileDescriptorEnumcustomname, []int{0} } + +type MyCustomUnprefixedEnum int32 + +const ( + MyBetterNameUnprefixedA MyCustomUnprefixedEnum = 0 + UNPREFIXED_B MyCustomUnprefixedEnum = 1 +) + +var MyCustomUnprefixedEnum_name = map[int32]string{ + 0: "UNPREFIXED_A", + 1: "UNPREFIXED_B", +} +var MyCustomUnprefixedEnum_value = map[string]int32{ + "UNPREFIXED_A": 0, + "UNPREFIXED_B": 1, +} + +func (x MyCustomUnprefixedEnum) Enum() *MyCustomUnprefixedEnum { + p := new(MyCustomUnprefixedEnum) + *p = x + return p +} +func (x MyCustomUnprefixedEnum) MarshalJSON() ([]byte, error) { + return proto.MarshalJSONEnum(MyCustomUnprefixedEnum_name, int32(x)) +} +func (x *MyCustomUnprefixedEnum) UnmarshalJSON(data []byte) error { + value, err := proto.UnmarshalJSONEnum(MyCustomUnprefixedEnum_value, data, "MyCustomUnprefixedEnum") + if err != nil { + return err + } + *x = MyCustomUnprefixedEnum(value) + return nil +} +func (MyCustomUnprefixedEnum) EnumDescriptor() ([]byte, []int) { + return fileDescriptorEnumcustomname, []int{1} +} + +type MyEnumWithEnumStringer int32 + +const ( + MyEnumWithEnumStringer_EnumValueStringerA MyEnumWithEnumStringer = 0 + MyEnumWithEnumStringer_STRINGER_B MyEnumWithEnumStringer = 1 +) + +var MyEnumWithEnumStringer_name = map[int32]string{ + 0: "STRINGER_A", + 1: "STRINGER_B", +} +var MyEnumWithEnumStringer_value = map[string]int32{ + "STRINGER_A": 0, + "STRINGER_B": 1, +} + +func (x MyEnumWithEnumStringer) Enum() *MyEnumWithEnumStringer { + p := new(MyEnumWithEnumStringer) + *p = x + return p +} +func (x MyEnumWithEnumStringer) MarshalJSON() ([]byte, error) { + return proto.MarshalJSONEnum(MyEnumWithEnumStringer_name, int32(x)) +} +func (x *MyEnumWithEnumStringer) UnmarshalJSON(data []byte) error { + value, err := proto.UnmarshalJSONEnum(MyEnumWithEnumStringer_value, data, "MyEnumWithEnumStringer") + if err != nil { + return err + } + *x = MyEnumWithEnumStringer(value) + return nil +} +func (MyEnumWithEnumStringer) EnumDescriptor() ([]byte, []int) { + return fileDescriptorEnumcustomname, []int{2} +} + +type OnlyEnums struct { + MyEnum *MyCustomEnum `protobuf:"varint,1,opt,name=my_enum,json=myEnum,enum=enumcustomname.MyCustomEnum" json:"my_enum,omitempty"` + MyEnumDefaultA *MyCustomEnum `protobuf:"varint,2,opt,name=my_enum_default_a,json=myEnumDefaultA,enum=enumcustomname.MyCustomEnum,def=0" json:"my_enum_default_a,omitempty"` + MyEnumDefaultB *MyCustomEnum `protobuf:"varint,3,opt,name=my_enum_default_b,json=myEnumDefaultB,enum=enumcustomname.MyCustomEnum,def=1" json:"my_enum_default_b,omitempty"` + MyUnprefixedEnum *MyCustomUnprefixedEnum `protobuf:"varint,4,opt,name=my_unprefixed_enum,json=myUnprefixedEnum,enum=enumcustomname.MyCustomUnprefixedEnum" json:"my_unprefixed_enum,omitempty"` + MyUnprefixedEnumDefaultA *MyCustomUnprefixedEnum `protobuf:"varint,5,opt,name=my_unprefixed_enum_default_a,json=myUnprefixedEnumDefaultA,enum=enumcustomname.MyCustomUnprefixedEnum,def=0" json:"my_unprefixed_enum_default_a,omitempty"` + MyUnprefixedEnumDefaultB *MyCustomUnprefixedEnum `protobuf:"varint,6,opt,name=my_unprefixed_enum_default_b,json=myUnprefixedEnumDefaultB,enum=enumcustomname.MyCustomUnprefixedEnum,def=1" json:"my_unprefixed_enum_default_b,omitempty"` + YetAnotherTestEnum *test.YetAnotherTestEnum `protobuf:"varint,7,opt,name=yet_another_test_enum,json=yetAnotherTestEnum,enum=test.YetAnotherTestEnum" json:"yet_another_test_enum,omitempty"` + YetAnotherTestEnumDefaultAa *test.YetAnotherTestEnum `protobuf:"varint,8,opt,name=yet_another_test_enum_default_aa,json=yetAnotherTestEnumDefaultAa,enum=test.YetAnotherTestEnum,def=0" json:"yet_another_test_enum_default_aa,omitempty"` + YetAnotherTestEnumDefaultBb *test.YetAnotherTestEnum `protobuf:"varint,9,opt,name=yet_another_test_enum_default_bb,json=yetAnotherTestEnumDefaultBb,enum=test.YetAnotherTestEnum,def=1" json:"yet_another_test_enum_default_bb,omitempty"` + YetYetAnotherTestEnum *test.YetYetAnotherTestEnum `protobuf:"varint,10,opt,name=yet_yet_another_test_enum,json=yetYetAnotherTestEnum,enum=test.YetYetAnotherTestEnum" json:"yet_yet_another_test_enum,omitempty"` + YetYetAnotherTestEnumDefaultCc *test.YetYetAnotherTestEnum `protobuf:"varint,11,opt,name=yet_yet_another_test_enum_default_cc,json=yetYetAnotherTestEnumDefaultCc,enum=test.YetYetAnotherTestEnum,def=0" json:"yet_yet_another_test_enum_default_cc,omitempty"` + YetYetAnotherTestEnumDefaultDd *test.YetYetAnotherTestEnum `protobuf:"varint,12,opt,name=yet_yet_another_test_enum_default_dd,json=yetYetAnotherTestEnumDefaultDd,enum=test.YetYetAnotherTestEnum,def=1" json:"yet_yet_another_test_enum_default_dd,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *OnlyEnums) Reset() { *m = OnlyEnums{} } +func (m *OnlyEnums) String() string { return proto.CompactTextString(m) } +func (*OnlyEnums) ProtoMessage() {} +func (*OnlyEnums) Descriptor() ([]byte, []int) { return fileDescriptorEnumcustomname, []int{0} } + +const Default_OnlyEnums_MyEnumDefaultA MyCustomEnum = MyCustomEnum_MyBetterNameA +const Default_OnlyEnums_MyEnumDefaultB MyCustomEnum = MyCustomEnum_B +const Default_OnlyEnums_MyUnprefixedEnumDefaultA MyCustomUnprefixedEnum = MyBetterNameUnprefixedA +const Default_OnlyEnums_MyUnprefixedEnumDefaultB MyCustomUnprefixedEnum = UNPREFIXED_B +const Default_OnlyEnums_YetAnotherTestEnumDefaultAa test.YetAnotherTestEnum = test.AA +const Default_OnlyEnums_YetAnotherTestEnumDefaultBb test.YetAnotherTestEnum = test.BetterYetBB +const Default_OnlyEnums_YetYetAnotherTestEnumDefaultCc test.YetYetAnotherTestEnum = test.YetYetAnotherTestEnum_CC +const Default_OnlyEnums_YetYetAnotherTestEnumDefaultDd test.YetYetAnotherTestEnum = test.YetYetAnotherTestEnum_BetterYetDD + +func (m *OnlyEnums) GetMyEnum() MyCustomEnum { + if m != nil && m.MyEnum != nil { + return *m.MyEnum + } + return MyCustomEnum_MyBetterNameA +} + +func (m *OnlyEnums) GetMyEnumDefaultA() MyCustomEnum { + if m != nil && m.MyEnumDefaultA != nil { + return *m.MyEnumDefaultA + } + return Default_OnlyEnums_MyEnumDefaultA +} + +func (m *OnlyEnums) GetMyEnumDefaultB() MyCustomEnum { + if m != nil && m.MyEnumDefaultB != nil { + return *m.MyEnumDefaultB + } + return Default_OnlyEnums_MyEnumDefaultB +} + +func (m *OnlyEnums) GetMyUnprefixedEnum() MyCustomUnprefixedEnum { + if m != nil && m.MyUnprefixedEnum != nil { + return *m.MyUnprefixedEnum + } + return MyBetterNameUnprefixedA +} + +func (m *OnlyEnums) GetMyUnprefixedEnumDefaultA() MyCustomUnprefixedEnum { + if m != nil && m.MyUnprefixedEnumDefaultA != nil { + return *m.MyUnprefixedEnumDefaultA + } + return Default_OnlyEnums_MyUnprefixedEnumDefaultA +} + +func (m *OnlyEnums) GetMyUnprefixedEnumDefaultB() MyCustomUnprefixedEnum { + if m != nil && m.MyUnprefixedEnumDefaultB != nil { + return *m.MyUnprefixedEnumDefaultB + } + return Default_OnlyEnums_MyUnprefixedEnumDefaultB +} + +func (m *OnlyEnums) GetYetAnotherTestEnum() test.YetAnotherTestEnum { + if m != nil && m.YetAnotherTestEnum != nil { + return *m.YetAnotherTestEnum + } + return test.AA +} + +func (m *OnlyEnums) GetYetAnotherTestEnumDefaultAa() test.YetAnotherTestEnum { + if m != nil && m.YetAnotherTestEnumDefaultAa != nil { + return *m.YetAnotherTestEnumDefaultAa + } + return Default_OnlyEnums_YetAnotherTestEnumDefaultAa +} + +func (m *OnlyEnums) GetYetAnotherTestEnumDefaultBb() test.YetAnotherTestEnum { + if m != nil && m.YetAnotherTestEnumDefaultBb != nil { + return *m.YetAnotherTestEnumDefaultBb + } + return Default_OnlyEnums_YetAnotherTestEnumDefaultBb +} + +func (m *OnlyEnums) GetYetYetAnotherTestEnum() test.YetYetAnotherTestEnum { + if m != nil && m.YetYetAnotherTestEnum != nil { + return *m.YetYetAnotherTestEnum + } + return test.YetYetAnotherTestEnum_CC +} + +func (m *OnlyEnums) GetYetYetAnotherTestEnumDefaultCc() test.YetYetAnotherTestEnum { + if m != nil && m.YetYetAnotherTestEnumDefaultCc != nil { + return *m.YetYetAnotherTestEnumDefaultCc + } + return Default_OnlyEnums_YetYetAnotherTestEnumDefaultCc +} + +func (m *OnlyEnums) GetYetYetAnotherTestEnumDefaultDd() test.YetYetAnotherTestEnum { + if m != nil && m.YetYetAnotherTestEnumDefaultDd != nil { + return *m.YetYetAnotherTestEnumDefaultDd + } + return Default_OnlyEnums_YetYetAnotherTestEnumDefaultDd +} + +func init() { + proto.RegisterType((*OnlyEnums)(nil), "enumcustomname.OnlyEnums") + proto.RegisterEnum("enumcustomname.MyCustomEnum", MyCustomEnum_name, MyCustomEnum_value) + proto.RegisterEnum("enumcustomname.MyCustomUnprefixedEnum", MyCustomUnprefixedEnum_name, MyCustomUnprefixedEnum_value) + proto.RegisterEnum("enumcustomname.MyEnumWithEnumStringer", MyEnumWithEnumStringer_name, MyEnumWithEnumStringer_value) +} +func (x MyEnumWithEnumStringer) String() string { + s, ok := MyEnumWithEnumStringer_name[int32(x)] + if ok { + return s + } + return strconv.Itoa(int(x)) +} + +var fileDescriptorEnumcustomname = []byte{ + // 546 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0x9c, 0x94, 0x4d, 0x8f, 0xd2, 0x40, + 0x18, 0xc7, 0x29, 0xba, 0x2c, 0x3b, 0x22, 0xe9, 0x4e, 0x14, 0x47, 0x30, 0x0d, 0xd9, 0x18, 0x63, + 0x30, 0x0b, 0x89, 0x47, 0x3c, 0x4d, 0x29, 0x9a, 0x8d, 0x01, 0x4d, 0x77, 0xf1, 0xed, 0xd2, 0xf4, + 0x65, 0x60, 0x49, 0x68, 0xbb, 0x29, 0xd3, 0x68, 0xbf, 0x81, 0xf1, 0x3b, 0x78, 0x92, 0x83, 0x47, + 0xcf, 0x9e, 0xfd, 0x60, 0xce, 0x4c, 0x17, 0x16, 0xda, 0x52, 0xc8, 0x9e, 0x86, 0x99, 0xfc, 0x9f, + 0xdf, 0x6f, 0xe6, 0xc9, 0x53, 0xc0, 0x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, 0x2c, 0x54, + 0xba, 0x85, 0x4f, 0xdd, 0xea, 0x53, 0xe1, 0x5b, 0xf0, 0x30, 0x22, 0xec, 0x21, 0x9e, 0xcf, 0x46, + 0x22, 0x30, 0xf8, 0x50, 0xc4, 0x2d, 0x3b, 0x14, 0x22, 0xd4, 0x16, 0x63, 0xf2, 0x99, 0x50, 0x1c, + 0x27, 0x2e, 0xd8, 0x56, 0xb4, 0x0a, 0x46, 0xa9, 0x33, 0x68, 0x83, 0x66, 0x26, 0xec, 0xa6, 0x5f, + 0x26, 0x2a, 0xe7, 0x73, 0xbb, 0x45, 0x8c, 0xf5, 0x46, 0x9a, 0xbd, 0x6c, 0x90, 0xb9, 0x5b, 0x62, + 0x59, 0xe8, 0x68, 0x97, 0x44, 0x55, 0x73, 0x24, 0xaa, 0x05, 0x47, 0xe0, 0x31, 0x97, 0x64, 0xb7, + 0x06, 0x08, 0x7a, 0x63, 0x45, 0xcf, 0xe8, 0x0e, 0x6f, 0x6a, 0xfa, 0x18, 0xba, 0xe0, 0xe9, 0x56, + 0xec, 0xea, 0xfe, 0xb6, 0x8d, 0xee, 0xed, 0x34, 0x74, 0x8b, 0xbd, 0x9e, 0xae, 0x64, 0x5a, 0xae, + 0x5f, 0xd1, 0xb3, 0xf7, 0xd3, 0x39, 0x0e, 0xaa, 0xec, 0xa1, 0xd3, 0xb4, 0x7c, 0x9d, 0xe6, 0xb4, + 0x5e, 0x81, 0x52, 0xfc, 0x61, 0x42, 0x04, 0x24, 0x2c, 0x17, 0xea, 0xc7, 0x3f, 0x7e, 0x36, 0xef, + 0x0f, 0x22, 0x95, 0x50, 0x4a, 0x82, 0x21, 0x9b, 0x53, 0x0c, 0x0f, 0x80, 0xa4, 0xca, 0x52, 0x5d, + 0xfe, 0xbb, 0x50, 0x2a, 0x83, 0xa8, 0x27, 0x26, 0x98, 0x97, 0xb4, 0xbe, 0x02, 0x39, 0x39, 0xc4, + 0xf0, 0x14, 0x6c, 0x7c, 0x36, 0x8c, 0xd8, 0x60, 0xc4, 0x47, 0xeb, 0xc4, 0x9b, 0x0a, 0x0c, 0xe5, + 0x8d, 0x38, 0xd7, 0x9c, 0x7c, 0xff, 0xa5, 0x14, 0x7e, 0x2f, 0x94, 0x02, 0xd3, 0xd5, 0x96, 0xba, + 0x4d, 0x49, 0xeb, 0x0b, 0xa8, 0xc5, 0xb7, 0xfe, 0xc8, 0xfe, 0x31, 0xf9, 0x7a, 0x4e, 0x83, 0xa9, + 0x37, 0x21, 0x01, 0x7c, 0x06, 0xc0, 0xf9, 0x85, 0x7e, 0x36, 0x7c, 0xd3, 0xd7, 0x85, 0xbc, 0xc6, + 0xe4, 0x90, 0x27, 0x3e, 0x98, 0xb3, 0x90, 0x2c, 0x63, 0x18, 0x56, 0xd7, 0x72, 0xdc, 0x5a, 0xe6, + 0xc6, 0x3f, 0x0b, 0x45, 0xfa, 0x1f, 0x00, 0x00, 0xff, 0xff, 0xbe, 0x65, 0x55, 0xe7, 0xdb, 0x05, + 0x00, 0x00, +} diff --git a/vendor/github.com/gogo/protobuf/test/enumcustomname/enumcustomname.proto b/vendor/github.com/gogo/protobuf/test/enumcustomname/enumcustomname.proto new file mode 100644 index 000000000..a8e28d5bb --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/enumcustomname/enumcustomname.proto @@ -0,0 +1,47 @@ +syntax = "proto2"; + +// Package enumcustomname tests the behavior of enum_customname and +// enumvalue_customname extensions. +package enumcustomname; + +import "github.com/gogo/protobuf/gogoproto/gogo.proto"; +import "github.com/gogo/protobuf/test/thetest.proto"; + +enum MyEnum { + option (gogoproto.enum_customname) = "MyCustomEnum"; + + // The following field will take on the custom name and the prefix, joined + // by an underscore. + A = 0 [(gogoproto.enumvalue_customname) = "MyBetterNameA"]; + B = 1; // Should be MyCustomEnum_B +} + +enum MyUnprefixedEnum { + option (gogoproto.goproto_enum_prefix) = false; + option (gogoproto.goproto_enum_stringer) = false; // ensure it behaves correctly without stringer. + option (gogoproto.enum_customname) = "MyCustomUnprefixedEnum"; // no prefix added but type gets name + UNPREFIXED_A = 0 [(gogoproto.enumvalue_customname) = "MyBetterNameUnprefixedA"]; + UNPREFIXED_B = 1 ; // Should not pick up prefix above +} + +enum MyEnumWithEnumStringer { + option (gogoproto.goproto_enum_stringer) = false; // ensure it behaves correctly without stringer. + option (gogoproto.enum_stringer) = true; // ensure it behaves correctly without stringer. + STRINGER_A = 0 [(gogoproto.enumvalue_customname) = "EnumValueStringerA"]; + STRINGER_B = 1; +} + +message OnlyEnums { + optional MyEnum my_enum = 1; + optional MyEnum my_enum_default_a = 2 [default=A]; + optional MyEnum my_enum_default_b = 3 [default=B]; + optional MyUnprefixedEnum my_unprefixed_enum = 4; + optional MyUnprefixedEnum my_unprefixed_enum_default_a = 5 [default=UNPREFIXED_A]; + optional MyUnprefixedEnum my_unprefixed_enum_default_b = 6 [default=UNPREFIXED_B]; + optional test.YetAnotherTestEnum yet_another_test_enum = 7; + optional test.YetAnotherTestEnum yet_another_test_enum_default_aa = 8 [default=AA]; + optional test.YetAnotherTestEnum yet_another_test_enum_default_bb = 9 [default=BB]; + optional test.YetYetAnotherTestEnum yet_yet_another_test_enum = 10; + optional test.YetYetAnotherTestEnum yet_yet_another_test_enum_default_cc = 11 [default=CC]; + optional test.YetYetAnotherTestEnum yet_yet_another_test_enum_default_dd = 12 [default=DD]; +} diff --git a/vendor/github.com/gogo/protobuf/test/enumprefix/Makefile b/vendor/github.com/gogo/protobuf/test/enumprefix/Makefile new file mode 100644 index 000000000..d5fc83d83 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/enumprefix/Makefile @@ -0,0 +1,30 @@ +# Extensions for Protocol Buffers to create more go like structures. +# +# Copyright (c) 2013, Vastech SA (PTY) LTD. 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: + (protoc --proto_path=../../../../../:../../protobuf/:. --gogo_out=. enumprefix.proto) diff --git a/vendor/github.com/gogo/protobuf/test/enumprefix/enumprefix.pb.go b/vendor/github.com/gogo/protobuf/test/enumprefix/enumprefix.pb.go new file mode 100644 index 000000000..c421221fd --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/enumprefix/enumprefix.pb.go @@ -0,0 +1,64 @@ +// Code generated by protoc-gen-gogo. +// source: enumprefix.proto +// DO NOT EDIT! + +/* + Package enumprefix is a generated protocol buffer package. + + It is generated from these files: + enumprefix.proto + + It has these top-level messages: + MyMessage +*/ +package enumprefix + +import proto "github.com/gogo/protobuf/proto" +import fmt "fmt" +import math "math" +import test "github.com/gogo/protobuf/test" +import _ "github.com/gogo/protobuf/gogoproto" + +// 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. +const _ = proto.GoGoProtoPackageIsVersion1 + +type MyMessage struct { + TheField test.TheTestEnum `protobuf:"varint,1,opt,name=TheField,json=theField,enum=test.TheTestEnum" json:"TheField"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *MyMessage) Reset() { *m = MyMessage{} } +func (m *MyMessage) String() string { return proto.CompactTextString(m) } +func (*MyMessage) ProtoMessage() {} +func (*MyMessage) Descriptor() ([]byte, []int) { return fileDescriptorEnumprefix, []int{0} } + +func (m *MyMessage) GetTheField() test.TheTestEnum { + if m != nil { + return m.TheField + } + return test.A +} + +func init() { + proto.RegisterType((*MyMessage)(nil), "enumprefix.MyMessage") +} + +var fileDescriptorEnumprefix = []byte{ + // 148 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xe2, 0x12, 0x48, 0xcd, 0x2b, 0xcd, + 0x2d, 0x28, 0x4a, 0x4d, 0xcb, 0xac, 0xd0, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0xe2, 0x42, 0x88, + 0x48, 0x69, 0xa7, 0x67, 0x96, 0x64, 0x94, 0x26, 0xe9, 0x25, 0xe7, 0xe7, 0xea, 0xa7, 0xe7, 0xa7, + 0xe7, 0xeb, 0x83, 0x95, 0x24, 0x95, 0xa6, 0xe9, 0x97, 0xa4, 0x16, 0x97, 0xe8, 0x97, 0x64, 0xa4, + 0x82, 0x68, 0x88, 0x46, 0x29, 0x5d, 0x9c, 0x8a, 0x41, 0x3c, 0x30, 0x07, 0xcc, 0x82, 0x28, 0x57, + 0x72, 0xe0, 0xe2, 0xf4, 0xad, 0xf4, 0x4d, 0x2d, 0x2e, 0x4e, 0x4c, 0x4f, 0x15, 0x32, 0xe6, 0xe2, + 0x08, 0xc9, 0x48, 0x75, 0xcb, 0x4c, 0xcd, 0x49, 0x91, 0x60, 0x54, 0x60, 0xd4, 0xe0, 0x33, 0x12, + 0xd4, 0x03, 0x1b, 0x0d, 0x14, 0x0d, 0x01, 0xd2, 0xae, 0x40, 0x37, 0x39, 0xb1, 0x9c, 0xb8, 0x27, + 0xcf, 0x10, 0xc4, 0x51, 0x02, 0x55, 0x08, 0x08, 0x00, 0x00, 0xff, 0xff, 0x8c, 0xb3, 0x4a, 0xfa, + 0xbc, 0x00, 0x00, 0x00, +} diff --git a/vendor/github.com/gogo/protobuf/test/enumprefix/enumprefix.proto b/vendor/github.com/gogo/protobuf/test/enumprefix/enumprefix.proto new file mode 100644 index 000000000..121001d52 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/enumprefix/enumprefix.proto @@ -0,0 +1,35 @@ +// Copyright (c) 2013, Vastech SA (PTY) LTD. All rights reserved. +// http://github.com/gogo/protobuf/gogoproto +// +// 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 enumprefix; + +import "github.com/gogo/protobuf/test/thetest.proto"; +import "github.com/gogo/protobuf/gogoproto/gogo.proto"; + +message MyMessage { + optional test.TheTestEnum TheField = 1 [(gogoproto.nullable) = false]; +} diff --git a/vendor/github.com/gogo/protobuf/test/enumstringer/Makefile b/vendor/github.com/gogo/protobuf/test/enumstringer/Makefile new file mode 100644 index 000000000..4327b48e7 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/enumstringer/Makefile @@ -0,0 +1,30 @@ +# Extensions for Protocol Buffers to create more go like structures. +# +# Copyright (c) 2013, Vastech SA (PTY) LTD. 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: + (protoc --proto_path=../../../../../:../../protobuf/:. --gogo_out=. enumstringer.proto) diff --git a/vendor/github.com/gogo/protobuf/test/enumstringer/enumstringer.pb.go b/vendor/github.com/gogo/protobuf/test/enumstringer/enumstringer.pb.go new file mode 100644 index 000000000..20b0cb370 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/enumstringer/enumstringer.pb.go @@ -0,0 +1,582 @@ +// Code generated by protoc-gen-gogo. +// source: enumstringer.proto +// DO NOT EDIT! + +/* +Package enumstringer is a generated protocol buffer package. + +It is generated from these files: + enumstringer.proto + +It has these top-level messages: + NidOptEnum + NinOptEnum + NidRepEnum + NinRepEnum +*/ +package enumstringer + +import proto "github.com/gogo/protobuf/proto" +import fmt "fmt" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" + +import bytes "bytes" + +// 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. +const _ = proto.GoGoProtoPackageIsVersion1 + +type TheTestEnum int32 + +const ( + TheTestEnum_A TheTestEnum = 0 + TheTestEnum_B TheTestEnum = 1 + TheTestEnum_C TheTestEnum = 2 +) + +var TheTestEnum_name = map[int32]string{ + 0: "A", + 1: "B", + 2: "C", +} +var TheTestEnum_value = map[string]int32{ + "A": 0, + "B": 1, + "C": 2, +} + +func (x TheTestEnum) Enum() *TheTestEnum { + p := new(TheTestEnum) + *p = x + return p +} +func (x TheTestEnum) MarshalJSON() ([]byte, error) { + return proto.MarshalJSONEnum(TheTestEnum_name, int32(x)) +} +func (x *TheTestEnum) UnmarshalJSON(data []byte) error { + value, err := proto.UnmarshalJSONEnum(TheTestEnum_value, data, "TheTestEnum") + if err != nil { + return err + } + *x = TheTestEnum(value) + return nil +} +func (TheTestEnum) EnumDescriptor() ([]byte, []int) { return fileDescriptorEnumstringer, []int{0} } + +type NidOptEnum struct { + Field1 TheTestEnum `protobuf:"varint,1,opt,name=Field1,json=field1,enum=enumstringer.TheTestEnum" json:"Field1"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *NidOptEnum) Reset() { *m = NidOptEnum{} } +func (m *NidOptEnum) String() string { return proto.CompactTextString(m) } +func (*NidOptEnum) ProtoMessage() {} +func (*NidOptEnum) Descriptor() ([]byte, []int) { return fileDescriptorEnumstringer, []int{0} } + +func (m *NidOptEnum) GetField1() TheTestEnum { + if m != nil { + return m.Field1 + } + return TheTestEnum_A +} + +type NinOptEnum struct { + Field1 *TheTestEnum `protobuf:"varint,1,opt,name=Field1,json=field1,enum=enumstringer.TheTestEnum" json:"Field1,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *NinOptEnum) Reset() { *m = NinOptEnum{} } +func (m *NinOptEnum) String() string { return proto.CompactTextString(m) } +func (*NinOptEnum) ProtoMessage() {} +func (*NinOptEnum) Descriptor() ([]byte, []int) { return fileDescriptorEnumstringer, []int{1} } + +func (m *NinOptEnum) GetField1() TheTestEnum { + if m != nil && m.Field1 != nil { + return *m.Field1 + } + return TheTestEnum_A +} + +type NidRepEnum struct { + Field1 []TheTestEnum `protobuf:"varint,1,rep,name=Field1,json=field1,enum=enumstringer.TheTestEnum" json:"Field1,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *NidRepEnum) Reset() { *m = NidRepEnum{} } +func (m *NidRepEnum) String() string { return proto.CompactTextString(m) } +func (*NidRepEnum) ProtoMessage() {} +func (*NidRepEnum) Descriptor() ([]byte, []int) { return fileDescriptorEnumstringer, []int{2} } + +func (m *NidRepEnum) GetField1() []TheTestEnum { + if m != nil { + return m.Field1 + } + return nil +} + +type NinRepEnum struct { + Field1 []TheTestEnum `protobuf:"varint,1,rep,name=Field1,json=field1,enum=enumstringer.TheTestEnum" json:"Field1,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *NinRepEnum) Reset() { *m = NinRepEnum{} } +func (m *NinRepEnum) String() string { return proto.CompactTextString(m) } +func (*NinRepEnum) ProtoMessage() {} +func (*NinRepEnum) Descriptor() ([]byte, []int) { return fileDescriptorEnumstringer, []int{3} } + +func (m *NinRepEnum) GetField1() []TheTestEnum { + if m != nil { + return m.Field1 + } + return nil +} + +func init() { + proto.RegisterType((*NidOptEnum)(nil), "enumstringer.NidOptEnum") + proto.RegisterType((*NinOptEnum)(nil), "enumstringer.NinOptEnum") + proto.RegisterType((*NidRepEnum)(nil), "enumstringer.NidRepEnum") + proto.RegisterType((*NinRepEnum)(nil), "enumstringer.NinRepEnum") + proto.RegisterEnum("enumstringer.TheTestEnum", TheTestEnum_name, TheTestEnum_value) +} +func (this *NidOptEnum) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NidOptEnum) + if !ok { + that2, ok := that.(NidOptEnum) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NidOptEnum") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NidOptEnum but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NidOptEnum but is not nil && this == nil") + } + if this.Field1 != that1.Field1 { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NidOptEnum) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*NidOptEnum) + if !ok { + that2, ok := that.(NidOptEnum) + 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.Field1 != that1.Field1 { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NinOptEnum) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NinOptEnum) + if !ok { + that2, ok := that.(NinOptEnum) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NinOptEnum") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NinOptEnum but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NinOptEnum but is not nil && this == nil") + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) + } + } else if this.Field1 != nil { + return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") + } else if that1.Field1 != nil { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NinOptEnum) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*NinOptEnum) + if !ok { + that2, ok := that.(NinOptEnum) + 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.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return false + } + } else if this.Field1 != nil { + return false + } else if that1.Field1 != nil { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NidRepEnum) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NidRepEnum) + if !ok { + that2, ok := that.(NidRepEnum) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NidRepEnum") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NidRepEnum but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NidRepEnum but is not nil && this == nil") + } + if len(this.Field1) != len(that1.Field1) { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", len(this.Field1), len(that1.Field1)) + } + for i := range this.Field1 { + if this.Field1[i] != that1.Field1[i] { + return fmt.Errorf("Field1 this[%v](%v) Not Equal that[%v](%v)", i, this.Field1[i], i, that1.Field1[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NidRepEnum) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*NidRepEnum) + if !ok { + that2, ok := that.(NidRepEnum) + 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.Field1) != len(that1.Field1) { + return false + } + for i := range this.Field1 { + if this.Field1[i] != that1.Field1[i] { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NinRepEnum) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NinRepEnum) + if !ok { + that2, ok := that.(NinRepEnum) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NinRepEnum") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NinRepEnum but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NinRepEnum but is not nil && this == nil") + } + if len(this.Field1) != len(that1.Field1) { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", len(this.Field1), len(that1.Field1)) + } + for i := range this.Field1 { + if this.Field1[i] != that1.Field1[i] { + return fmt.Errorf("Field1 this[%v](%v) Not Equal that[%v](%v)", i, this.Field1[i], i, that1.Field1[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NinRepEnum) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*NinRepEnum) + if !ok { + that2, ok := that.(NinRepEnum) + 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.Field1) != len(that1.Field1) { + return false + } + for i := range this.Field1 { + if this.Field1[i] != that1.Field1[i] { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func NewPopulatedNidOptEnum(r randyEnumstringer, easy bool) *NidOptEnum { + this := &NidOptEnum{} + this.Field1 = TheTestEnum([]int32{0, 1, 2}[r.Intn(3)]) + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedEnumstringer(r, 2) + } + return this +} + +func NewPopulatedNinOptEnum(r randyEnumstringer, easy bool) *NinOptEnum { + this := &NinOptEnum{} + if r.Intn(10) != 0 { + v1 := TheTestEnum([]int32{0, 1, 2}[r.Intn(3)]) + this.Field1 = &v1 + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedEnumstringer(r, 2) + } + return this +} + +func NewPopulatedNidRepEnum(r randyEnumstringer, easy bool) *NidRepEnum { + this := &NidRepEnum{} + if r.Intn(10) != 0 { + v2 := r.Intn(10) + this.Field1 = make([]TheTestEnum, v2) + for i := 0; i < v2; i++ { + this.Field1[i] = TheTestEnum([]int32{0, 1, 2}[r.Intn(3)]) + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedEnumstringer(r, 2) + } + return this +} + +func NewPopulatedNinRepEnum(r randyEnumstringer, easy bool) *NinRepEnum { + this := &NinRepEnum{} + if r.Intn(10) != 0 { + v3 := r.Intn(10) + this.Field1 = make([]TheTestEnum, v3) + for i := 0; i < v3; i++ { + this.Field1[i] = TheTestEnum([]int32{0, 1, 2}[r.Intn(3)]) + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedEnumstringer(r, 2) + } + return this +} + +type randyEnumstringer interface { + Float32() float32 + Float64() float64 + Int63() int64 + Int31() int32 + Uint32() uint32 + Intn(n int) int +} + +func randUTF8RuneEnumstringer(r randyEnumstringer) 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 randStringEnumstringer(r randyEnumstringer) string { + v4 := r.Intn(100) + tmps := make([]rune, v4) + for i := 0; i < v4; i++ { + tmps[i] = randUTF8RuneEnumstringer(r) + } + return string(tmps) +} +func randUnrecognizedEnumstringer(r randyEnumstringer, 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 = randFieldEnumstringer(data, r, fieldNumber, wire) + } + return data +} +func randFieldEnumstringer(data []byte, r randyEnumstringer, fieldNumber int, wire int) []byte { + key := uint32(fieldNumber)<<3 | uint32(wire) + switch wire { + case 0: + data = encodeVarintPopulateEnumstringer(data, uint64(key)) + v5 := r.Int63() + if r.Intn(2) == 0 { + v5 *= -1 + } + data = encodeVarintPopulateEnumstringer(data, uint64(v5)) + case 1: + data = encodeVarintPopulateEnumstringer(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 = encodeVarintPopulateEnumstringer(data, uint64(key)) + ll := r.Intn(100) + data = encodeVarintPopulateEnumstringer(data, uint64(ll)) + for j := 0; j < ll; j++ { + data = append(data, byte(r.Intn(256))) + } + default: + data = encodeVarintPopulateEnumstringer(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 encodeVarintPopulateEnumstringer(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 +} + +var fileDescriptorEnumstringer = []byte{ + // 206 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xe2, 0x12, 0x4a, 0xcd, 0x2b, 0xcd, + 0x2d, 0x2e, 0x29, 0xca, 0xcc, 0x4b, 0x4f, 0x2d, 0xd2, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0xe2, + 0x41, 0x16, 0x93, 0xd2, 0x4d, 0xcf, 0x2c, 0xc9, 0x28, 0x4d, 0xd2, 0x4b, 0xce, 0xcf, 0xd5, 0x4f, + 0xcf, 0x4f, 0xcf, 0xd7, 0x07, 0x2b, 0x4a, 0x2a, 0x4d, 0x03, 0xf3, 0xc0, 0x1c, 0x30, 0x0b, 0xa2, + 0x59, 0xc9, 0x95, 0x8b, 0xcb, 0x2f, 0x33, 0xc5, 0xbf, 0xa0, 0xc4, 0x15, 0x68, 0x88, 0x90, 0x39, + 0x17, 0x9b, 0x5b, 0x66, 0x6a, 0x4e, 0x8a, 0xa1, 0x04, 0xa3, 0x02, 0xa3, 0x06, 0x9f, 0x91, 0xa4, + 0x1e, 0x8a, 0x7d, 0x21, 0x19, 0xa9, 0x21, 0xa9, 0xc5, 0x60, 0xa5, 0x4e, 0x2c, 0x27, 0xee, 0xc9, + 0x33, 0x04, 0xb1, 0xa5, 0x81, 0x95, 0x2b, 0xd9, 0x83, 0x8c, 0xc9, 0x83, 0x19, 0x63, 0x48, 0xb4, + 0x31, 0x70, 0x03, 0x20, 0xee, 0x08, 0x4a, 0x2d, 0xc0, 0x70, 0x07, 0x33, 0xe9, 0xee, 0x80, 0x19, + 0x63, 0x48, 0xb4, 0x31, 0x30, 0x03, 0xb4, 0x94, 0xb8, 0xb8, 0x91, 0x84, 0x85, 0x58, 0xb9, 0x18, + 0x1d, 0x05, 0x18, 0x40, 0x94, 0x93, 0x00, 0x23, 0x88, 0x72, 0x16, 0x60, 0x72, 0x12, 0x79, 0xf0, + 0x50, 0x8e, 0xf1, 0x07, 0x10, 0xaf, 0x78, 0x24, 0xc7, 0xb8, 0x03, 0x88, 0x5f, 0x3c, 0x92, 0x63, + 0x00, 0x04, 0x00, 0x00, 0xff, 0xff, 0x1d, 0xb1, 0xac, 0x38, 0x9b, 0x01, 0x00, 0x00, +} diff --git a/vendor/github.com/gogo/protobuf/test/enumstringer/enumstringer.proto b/vendor/github.com/gogo/protobuf/test/enumstringer/enumstringer.proto new file mode 100644 index 000000000..f44f02fbb --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/enumstringer/enumstringer.proto @@ -0,0 +1,60 @@ +// Copyright (c) 2013, Vastech SA (PTY) LTD. All rights reserved. +// http://github.com/gogo/protobuf/gogoproto +// +// 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 enumstringer; + +import "github.com/gogo/protobuf/gogoproto/gogo.proto"; + +option (gogoproto.goproto_enum_stringer_all) = false; + +option (gogoproto.equal_all) = true; +option (gogoproto.verbose_equal_all) = true; + +option (gogoproto.testgen_all) = true; +option (gogoproto.populate_all) = true; + +enum TheTestEnum { + A = 0; + B = 1; + C = 2; +} + +message NidOptEnum { + optional TheTestEnum Field1 = 1 [(gogoproto.nullable) = false]; +} + +message NinOptEnum { + optional TheTestEnum Field1 = 1; +} + +message NidRepEnum { + repeated TheTestEnum Field1 = 1 [(gogoproto.nullable) = false]; +} + +message NinRepEnum { + repeated TheTestEnum Field1 = 1; +} diff --git a/vendor/github.com/gogo/protobuf/test/enumstringer/enumstringerpb_test.go b/vendor/github.com/gogo/protobuf/test/enumstringer/enumstringerpb_test.go new file mode 100644 index 000000000..aea552af8 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/enumstringer/enumstringerpb_test.go @@ -0,0 +1,451 @@ +// Code generated by protoc-gen-gogo. +// source: enumstringer.proto +// DO NOT EDIT! + +/* +Package enumstringer is a generated protocol buffer package. + +It is generated from these files: + enumstringer.proto + +It has these top-level messages: + NidOptEnum + NinOptEnum + NidRepEnum + NinRepEnum +*/ +package enumstringer + +import testing "testing" +import math_rand "math/rand" +import time "time" +import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" +import github_com_gogo_protobuf_jsonpb "github.com/gogo/protobuf/jsonpb" +import proto "github.com/gogo/protobuf/proto" +import fmt "fmt" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +func TestNidOptEnumProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidOptEnum(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidOptEnum{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestNinOptEnumProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptEnum(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinOptEnum{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestNidRepEnumProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepEnum(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidRepEnum{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestNinRepEnumProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepEnum(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinRepEnum{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestNidOptEnumJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidOptEnum(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidOptEnum{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNinOptEnumJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptEnum(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinOptEnum{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNidRepEnumJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepEnum(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidRepEnum{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNinRepEnumJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepEnum(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinRepEnum{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNidOptEnumProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidOptEnum(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NidOptEnum{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNidOptEnumProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidOptEnum(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NidOptEnum{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinOptEnumProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptEnum(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NinOptEnum{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinOptEnumProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptEnum(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NinOptEnum{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNidRepEnumProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepEnum(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NidRepEnum{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNidRepEnumProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepEnum(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NidRepEnum{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinRepEnumProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepEnum(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NinRepEnum{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinRepEnumProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepEnum(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NinRepEnum{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNidOptEnumVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidOptEnum(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NidOptEnum{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNinOptEnumVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptEnum(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinOptEnum{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNidRepEnumVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidRepEnum(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NidRepEnum{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNinRepEnumVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinRepEnum(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinRepEnum{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} + +//These tests are generated by github.com/gogo/protobuf/plugin/testgen diff --git a/vendor/github.com/gogo/protobuf/test/enumstringer/string.go b/vendor/github.com/gogo/protobuf/test/enumstringer/string.go new file mode 100644 index 000000000..c9ebfa45e --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/enumstringer/string.go @@ -0,0 +1,39 @@ +// Copyright (c) 2013, Vastech SA (PTY) LTD. All rights reserved. +// http://github.com/gogo/protobuf/gogoproto +// +// 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 enumstringer + +func (this TheTestEnum) String() string { + switch this { + case 0: + return "a" + case 1: + return "blabla" + case 2: + return "z" + } + return "3" +} diff --git a/vendor/github.com/gogo/protobuf/test/example/Makefile b/vendor/github.com/gogo/protobuf/test/example/Makefile new file mode 100644 index 000000000..c323d9ee7 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/example/Makefile @@ -0,0 +1,30 @@ +# Extensions for Protocol Buffers to create more go like structures. +# +# Copyright (c) 2013, Vastech SA (PTY) LTD. 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: + (protoc --proto_path=../../../../../:../../protobuf/:. --gogo_out=. example.proto) diff --git a/vendor/github.com/gogo/protobuf/test/example/example.pb.go b/vendor/github.com/gogo/protobuf/test/example/example.pb.go new file mode 100644 index 000000000..68f22723d --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/example/example.pb.go @@ -0,0 +1,2526 @@ +// Code generated by protoc-gen-gogo. +// source: example.proto +// DO NOT EDIT! + +/* + Package test is a generated protocol buffer package. + + It is generated from these files: + example.proto + + It has these top-level messages: + A + B + C + U + E + R + CastType +*/ +package test + +import proto "github.com/gogo/protobuf/proto" +import fmt "fmt" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" + +import github_com_gogo_protobuf_test "github.com/gogo/protobuf/test" +import github_com_gogo_protobuf_test_custom "github.com/gogo/protobuf/test/custom" + +import github_com_gogo_protobuf_protoc_gen_gogo_descriptor "github.com/gogo/protobuf/protoc-gen-gogo/descriptor" +import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" +import compress_gzip "compress/gzip" +import bytes "bytes" +import io_ioutil "io/ioutil" + +import strings "strings" +import sort "sort" +import strconv "strconv" +import reflect "reflect" + +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. +const _ = proto.GoGoProtoPackageIsVersion1 + +type A struct { + Description string `protobuf:"bytes,1,opt,name=Description,json=description" json:"Description"` + Number int64 `protobuf:"varint,2,opt,name=Number,json=number" json:"Number"` + Id github_com_gogo_protobuf_test.Uuid `protobuf:"bytes,3,opt,name=Id,json=id,customtype=github.com/gogo/protobuf/test.Uuid" json:"Id"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *A) Reset() { *m = A{} } +func (*A) ProtoMessage() {} +func (*A) Descriptor() ([]byte, []int) { return fileDescriptorExample, []int{0} } + +type B struct { + A `protobuf:"bytes,1,opt,name=A,json=a,embedded=A" json:"A"` + G []github_com_gogo_protobuf_test_custom.Uint128 `protobuf:"bytes,2,rep,name=G,json=g,customtype=github.com/gogo/protobuf/test/custom.Uint128" json:"G"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *B) Reset() { *m = B{} } +func (*B) ProtoMessage() {} +func (*B) Descriptor() ([]byte, []int) { return fileDescriptorExample, []int{1} } + +type C struct { + MySize *int64 `protobuf:"varint,1,opt,name=size" json:"size,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *C) Reset() { *m = C{} } +func (*C) ProtoMessage() {} +func (*C) Descriptor() ([]byte, []int) { return fileDescriptorExample, []int{2} } + +func (m *C) GetMySize() int64 { + if m != nil && m.MySize != nil { + return *m.MySize + } + return 0 +} + +type U struct { + A *A `protobuf:"bytes,1,opt,name=A,json=a" json:"A,omitempty"` + B *B `protobuf:"bytes,2,opt,name=B,json=b" json:"B,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *U) Reset() { *m = U{} } +func (*U) ProtoMessage() {} +func (*U) Descriptor() ([]byte, []int) { return fileDescriptorExample, []int{3} } + +func (m *U) GetA() *A { + if m != nil { + return m.A + } + return nil +} + +func (m *U) GetB() *B { + if m != nil { + return m.B + } + return nil +} + +type E struct { + XXX_extensions []byte `protobuf:"bytes,0,opt" json:"-"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *E) Reset() { *m = E{} } +func (*E) ProtoMessage() {} +func (*E) Descriptor() ([]byte, []int) { return fileDescriptorExample, []int{4} } + +var extRange_E = []proto.ExtensionRange{ + {1, 536870911}, +} + +func (*E) ExtensionRangeArray() []proto.ExtensionRange { + return extRange_E +} +func (m *E) GetExtensions() *[]byte { + if m.XXX_extensions == nil { + m.XXX_extensions = make([]byte, 0) + } + return &m.XXX_extensions +} + +type R struct { + Recognized *uint32 `protobuf:"varint,1,opt,name=recognized" json:"recognized,omitempty"` +} + +func (m *R) Reset() { *m = R{} } +func (*R) ProtoMessage() {} +func (*R) Descriptor() ([]byte, []int) { return fileDescriptorExample, []int{5} } + +func (m *R) GetRecognized() uint32 { + if m != nil && m.Recognized != nil { + return *m.Recognized + } + return 0 +} + +type CastType struct { + Int32 *int32 `protobuf:"varint,1,opt,name=Int32,json=int32,casttype=int32" json:"Int32,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *CastType) Reset() { *m = CastType{} } +func (*CastType) ProtoMessage() {} +func (*CastType) Descriptor() ([]byte, []int) { return fileDescriptorExample, []int{6} } + +func (m *CastType) GetInt32() int32 { + if m != nil && m.Int32 != nil { + return *m.Int32 + } + return 0 +} + +func init() { + proto.RegisterType((*A)(nil), "test.A") + proto.RegisterType((*B)(nil), "test.B") + proto.RegisterType((*C)(nil), "test.C") + proto.RegisterType((*U)(nil), "test.U") + proto.RegisterType((*E)(nil), "test.E") + proto.RegisterType((*R)(nil), "test.R") + proto.RegisterType((*CastType)(nil), "test.CastType") +} +func (this *B) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ExampleDescription() +} +func ExampleDescription() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + d := &github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet{} + var gzipped = []byte{ + // 3537 bytes of a gzipped FileDescriptorSet + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xcc, 0x5a, 0x69, 0x6c, 0x1b, 0xd7, + 0xb5, 0xf6, 0x88, 0xa4, 0x44, 0x1e, 0x52, 0x14, 0x35, 0x92, 0x6d, 0x5a, 0x71, 0xac, 0x98, 0xce, + 0xe2, 0x38, 0x89, 0x9c, 0x38, 0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81, 0x4a, 0xc3, 0x0a, 0x68, 0x16, 0x4a, 0x09, + 0xe1, 0x12, 0xca, 0xa6, 0x4e, 0x41, 0x3a, 0xe8, 0x1e, 0x79, 0x12, 0x62, 0x8e, 0xab, 0xb5, 0x5c, + 0x1a, 0x85, 0x31, 0x85, 0x3d, 0xc8, 0x19, 0x88, 0x60, 0x92, 0xa1, 0x59, 0x2e, 0xa6, 0x90, 0xaf, + 0x53, 0x27, 0x61, 0x34, 0xf0, 0xfa, 0x41, 0x81, 0xb9, 0x27, 0x86, 0x61, 0xb2, 0x5f, 0xcc, 0xf5, + 0x0d, 0x7f, 0xdc, 0x3e, 0x18, 0x01, 0xeb, 0x7a, 0x0b, 0xe3, 0x8e, 0x30, 0xf0, 0x27, 0x8c, 0xa8, + 0x98, 0xa9, 0xad, 0xeb, 0x26, 0x46, 0x93, 0x74, 0x34, 0x7d, 0xe2, 0x86, 0x81, 0xa2, 0x7a, 0x66, + 0x81, 0x40, 0x14, 0x86, 0x94, 0xef, 0x86, 0x28, 0x4f, 0x71, 0x84, 0xe1, 0xd8, 0x60, 0x0c, 0x24, + 0x16, 0x15, 0x8a, 0x93, 0xaf, 0x80, 0x04, 0xf9, 0x9f, 0xf9, 0x76, 0x98, 0xda, 0x1c, 0x27, 0x02, + 0xe2, 0x57, 0x79, 0x0a, 0xe2, 0x34, 0xcc, 0x6a, 0xba, 0x28, 0x0d, 0xde, 0x33, 0x59, 0x98, 0x9a, + 0xbe, 0xa1, 0xb5, 0x4d, 0x57, 0xbd, 0xa0, 0x99, 0x6d, 0x9d, 0x06, 0x0c, 0x2e, 0x0c, 0x17, 0xde, + 0x47, 0x64, 0xf2, 0x34, 0x24, 0x59, 0x54, 0x1a, 0x88, 0xb9, 0x48, 0xb3, 0x4f, 0x4c, 0x61, 0x81, + 0x5a, 0x26, 0x12, 0xf2, 0xfa, 0x73, 0x0e, 0xee, 0x05, 0xbe, 0xb4, 0xf4, 0x15, 0x44, 0x40, 0x5f, + 0x7f, 0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0xe2, 0xe7, 0x91, + 0x77, 0x0e, 0x49, 0x2f, 0xe3, 0xe7, 0xfb, 0xf8, 0x79, 0x0d, 0x3f, 0x6f, 0xe0, 0xe7, 0x4d, 0xfc, + 0xbc, 0x85, 0x9f, 0xbf, 0x07, 0x00, 0x00, 0xff, 0xff, 0x03, 0xe3, 0x26, 0x61, 0xac, 0x2c, 0x00, + 0x00, + } + r := bytes.NewReader(gzipped) + gzipr, err := compress_gzip.NewReader(r) + if err != nil { + panic(err) + } + ungzipped, err := io_ioutil.ReadAll(gzipr) + if err != nil { + panic(err) + } + if err := github_com_gogo_protobuf_proto.Unmarshal(ungzipped, d); err != nil { + panic(err) + } + return d +} +func (this *A) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*A) + if !ok { + that2, ok := that.(A) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *A") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *A but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *A but is not nil && this == nil") + } + if this.Description != that1.Description { + return fmt.Errorf("Description this(%v) Not Equal that(%v)", this.Description, that1.Description) + } + if this.Number != that1.Number { + return fmt.Errorf("Number this(%v) Not Equal that(%v)", this.Number, that1.Number) + } + if !this.Id.Equal(that1.Id) { + return fmt.Errorf("Id this(%v) Not Equal that(%v)", this.Id, that1.Id) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *A) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*A) + if !ok { + that2, ok := that.(A) + 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.Description != that1.Description { + return false + } + if this.Number != that1.Number { + return false + } + if !this.Id.Equal(that1.Id) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *B) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*B) + if !ok { + that2, ok := that.(B) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *B") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *B but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *B but is not nil && this == nil") + } + if !this.A.Equal(&that1.A) { + return fmt.Errorf("A this(%v) Not Equal that(%v)", this.A, that1.A) + } + if len(this.G) != len(that1.G) { + return fmt.Errorf("G this(%v) Not Equal that(%v)", len(this.G), len(that1.G)) + } + for i := range this.G { + if !this.G[i].Equal(that1.G[i]) { + return fmt.Errorf("G this[%v](%v) Not Equal that[%v](%v)", i, this.G[i], i, that1.G[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *B) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*B) + if !ok { + that2, ok := that.(B) + 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.A.Equal(&that1.A) { + return false + } + if len(this.G) != len(that1.G) { + return false + } + for i := range this.G { + if !this.G[i].Equal(that1.G[i]) { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *C) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*C) + if !ok { + that2, ok := that.(C) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *C") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *C but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *C but is not nil && this == nil") + } + if this.MySize != nil && that1.MySize != nil { + if *this.MySize != *that1.MySize { + return fmt.Errorf("MySize this(%v) Not Equal that(%v)", *this.MySize, *that1.MySize) + } + } else if this.MySize != nil { + return fmt.Errorf("this.MySize == nil && that.MySize != nil") + } else if that1.MySize != nil { + return fmt.Errorf("MySize this(%v) Not Equal that(%v)", this.MySize, that1.MySize) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *C) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*C) + if !ok { + that2, ok := that.(C) + 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.MySize != nil && that1.MySize != nil { + if *this.MySize != *that1.MySize { + return false + } + } else if this.MySize != nil { + return false + } else if that1.MySize != nil { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *U) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*U) + if !ok { + that2, ok := that.(U) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *U") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *U but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *U but is not nil && this == nil") + } + if !this.A.Equal(that1.A) { + return fmt.Errorf("A this(%v) Not Equal that(%v)", this.A, that1.A) + } + if !this.B.Equal(that1.B) { + return fmt.Errorf("B this(%v) Not Equal that(%v)", this.B, that1.B) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *U) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*U) + if !ok { + that2, ok := that.(U) + 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.A.Equal(that1.A) { + return false + } + if !this.B.Equal(that1.B) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *E) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*E) + if !ok { + that2, ok := that.(E) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *E") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *E but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *E but is not nil && this == nil") + } + if !bytes.Equal(this.XXX_extensions, that1.XXX_extensions) { + return fmt.Errorf("XXX_extensions this(%v) Not Equal that(%v)", this.XXX_extensions, that1.XXX_extensions) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *E) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*E) + if !ok { + that2, ok := that.(E) + 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.XXX_extensions, that1.XXX_extensions) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *R) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*R) + if !ok { + that2, ok := that.(R) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *R") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *R but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *R but is not nil && this == nil") + } + if this.Recognized != nil && that1.Recognized != nil { + if *this.Recognized != *that1.Recognized { + return fmt.Errorf("Recognized this(%v) Not Equal that(%v)", *this.Recognized, *that1.Recognized) + } + } else if this.Recognized != nil { + return fmt.Errorf("this.Recognized == nil && that.Recognized != nil") + } else if that1.Recognized != nil { + return fmt.Errorf("Recognized this(%v) Not Equal that(%v)", this.Recognized, that1.Recognized) + } + return nil +} +func (this *R) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*R) + if !ok { + that2, ok := that.(R) + 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.Recognized != nil && that1.Recognized != nil { + if *this.Recognized != *that1.Recognized { + return false + } + } else if this.Recognized != nil { + return false + } else if that1.Recognized != nil { + return false + } + return true +} +func (this *CastType) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*CastType) + if !ok { + that2, ok := that.(CastType) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *CastType") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *CastType but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *CastType but is not nil && this == nil") + } + if this.Int32 != nil && that1.Int32 != nil { + if *this.Int32 != *that1.Int32 { + return fmt.Errorf("Int32 this(%v) Not Equal that(%v)", *this.Int32, *that1.Int32) + } + } else if this.Int32 != nil { + return fmt.Errorf("this.Int32 == nil && that.Int32 != nil") + } else if that1.Int32 != nil { + return fmt.Errorf("Int32 this(%v) Not Equal that(%v)", this.Int32, that1.Int32) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *CastType) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*CastType) + if !ok { + that2, ok := that.(CastType) + 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.Int32 != nil && that1.Int32 != nil { + if *this.Int32 != *that1.Int32 { + return false + } + } else if this.Int32 != nil { + return false + } else if that1.Int32 != nil { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} + +type AFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetDescription() string + GetNumber() int64 + GetId() github_com_gogo_protobuf_test.Uuid +} + +func (this *A) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *A) TestProto() github_com_gogo_protobuf_proto.Message { + return NewAFromFace(this) +} + +func (this *A) GetDescription() string { + return this.Description +} + +func (this *A) GetNumber() int64 { + return this.Number +} + +func (this *A) GetId() github_com_gogo_protobuf_test.Uuid { + return this.Id +} + +func NewAFromFace(that AFace) *A { + this := &A{} + this.Description = that.GetDescription() + this.Number = that.GetNumber() + this.Id = that.GetId() + return this +} + +func (this *A) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 7) + s = append(s, "&test.A{") + s = append(s, "Description: "+fmt.Sprintf("%#v", this.Description)+",\n") + s = append(s, "Number: "+fmt.Sprintf("%#v", this.Number)+",\n") + s = append(s, "Id: "+fmt.Sprintf("%#v", this.Id)+",\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 *B) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 6) + s = append(s, "&test.B{") + s = append(s, "A: "+strings.Replace(this.A.GoString(), `&`, ``, 1)+",\n") + if this.G != nil { + s = append(s, "G: "+fmt.Sprintf("%#v", this.G)+",\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 *C) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&test.C{") + if this.MySize != nil { + s = append(s, "MySize: "+valueToGoStringExample(this.MySize, "int64")+",\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 *U) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 6) + s = append(s, "&test.U{") + if this.A != nil { + s = append(s, "A: "+fmt.Sprintf("%#v", this.A)+",\n") + } + if this.B != nil { + s = append(s, "B: "+fmt.Sprintf("%#v", this.B)+",\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 *E) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 4) + s = append(s, "&test.E{") + if this.XXX_extensions != nil { + s = append(s, "XXX_extensions: "+fmt.Sprintf("%#v", this.XXX_extensions)+",\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 *R) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&test.R{") + if this.Recognized != nil { + s = append(s, "Recognized: "+valueToGoStringExample(this.Recognized, "uint32")+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *CastType) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&test.CastType{") + if this.Int32 != nil { + s = append(s, "Int32: "+valueToGoStringExample(this.Int32, "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 valueToGoStringExample(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 extensionToGoStringExample(e map[int32]github_com_gogo_protobuf_proto.Extension) string { + if e == nil { + return "nil" + } + s := "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 +} +func (m *A) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *A) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + data[i] = 0xa + i++ + i = encodeVarintExample(data, i, uint64(len(m.Description))) + i += copy(data[i:], m.Description) + data[i] = 0x10 + i++ + i = encodeVarintExample(data, i, uint64(m.Number)) + data[i] = 0x1a + i++ + i = encodeVarintExample(data, i, uint64(m.Id.Size())) + n1, err := m.Id.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n1 + if m.XXX_unrecognized != nil { + i += copy(data[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *B) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *B) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + data[i] = 0xa + i++ + i = encodeVarintExample(data, i, uint64(m.A.Size())) + n2, err := m.A.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n2 + if len(m.G) > 0 { + for _, msg := range m.G { + data[i] = 0x12 + i++ + i = encodeVarintExample(data, i, uint64(msg.Size())) + n, err := msg.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n + } + } + if m.XXX_unrecognized != nil { + i += copy(data[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *C) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *C) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.MySize != nil { + data[i] = 0x8 + i++ + i = encodeVarintExample(data, i, uint64(*m.MySize)) + } + if m.XXX_unrecognized != nil { + i += copy(data[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *U) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *U) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.A != nil { + data[i] = 0xa + i++ + i = encodeVarintExample(data, i, uint64(m.A.Size())) + n3, err := m.A.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n3 + } + if m.B != nil { + data[i] = 0x12 + i++ + i = encodeVarintExample(data, i, uint64(m.B.Size())) + n4, err := m.B.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n4 + } + if m.XXX_unrecognized != nil { + i += copy(data[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *E) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *E) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.XXX_extensions != nil { + i += copy(data[i:], m.XXX_extensions) + } + if m.XXX_unrecognized != nil { + i += copy(data[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *R) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *R) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Recognized != nil { + data[i] = 0x8 + i++ + i = encodeVarintExample(data, i, uint64(*m.Recognized)) + } + return i, nil +} + +func (m *CastType) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *CastType) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Int32 != nil { + data[i] = 0x8 + i++ + i = encodeVarintExample(data, i, uint64(*m.Int32)) + } + if m.XXX_unrecognized != nil { + i += copy(data[i:], m.XXX_unrecognized) + } + return i, nil +} + +func encodeFixed64Example(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 encodeFixed32Example(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 encodeVarintExample(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 NewPopulatedA(r randyExample, easy bool) *A { + this := &A{} + this.Description = randStringExample(r) + this.Number = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Number *= -1 + } + v1 := github_com_gogo_protobuf_test.NewPopulatedUuid(r) + this.Id = *v1 + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedExample(r, 4) + } + return this +} + +func NewPopulatedB(r randyExample, easy bool) *B { + this := &B{} + v2 := NewPopulatedA(r, easy) + this.A = *v2 + if r.Intn(10) != 0 { + v3 := r.Intn(10) + this.G = make([]github_com_gogo_protobuf_test_custom.Uint128, v3) + for i := 0; i < v3; i++ { + v4 := github_com_gogo_protobuf_test_custom.NewPopulatedUint128(r) + this.G[i] = *v4 + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedExample(r, 3) + } + return this +} + +func NewPopulatedC(r randyExample, easy bool) *C { + this := &C{} + if r.Intn(10) != 0 { + v5 := int64(r.Int63()) + if r.Intn(2) == 0 { + v5 *= -1 + } + this.MySize = &v5 + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedExample(r, 2) + } + return this +} + +func NewPopulatedU(r randyExample, easy bool) *U { + this := &U{} + fieldNum := r.Intn(2) + switch fieldNum { + case 0: + this.A = NewPopulatedA(r, easy) + case 1: + this.B = NewPopulatedB(r, easy) + } + return this +} + +func NewPopulatedE(r randyExample, easy bool) *E { + this := &E{} + if !easy && r.Intn(10) != 0 { + l := r.Intn(5) + for i := 0; i < l; i++ { + fieldNumber := r.Intn(536870911) + 1 + wire := r.Intn(4) + if wire == 3 { + wire = 5 + } + data := randFieldExample(nil, r, fieldNumber, wire) + github_com_gogo_protobuf_proto.SetRawExtension(this, int32(fieldNumber), data) + } + } + return this +} + +func NewPopulatedR(r randyExample, easy bool) *R { + this := &R{} + if r.Intn(10) != 0 { + v6 := uint32(r.Uint32()) + this.Recognized = &v6 + } + if !easy && r.Intn(10) != 0 { + } + return this +} + +func NewPopulatedCastType(r randyExample, easy bool) *CastType { + this := &CastType{} + if r.Intn(10) != 0 { + v7 := int32(r.Int63()) + if r.Intn(2) == 0 { + v7 *= -1 + } + this.Int32 = &v7 + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedExample(r, 2) + } + return this +} + +type randyExample interface { + Float32() float32 + Float64() float64 + Int63() int64 + Int31() int32 + Uint32() uint32 + Intn(n int) int +} + +func randUTF8RuneExample(r randyExample) 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 randStringExample(r randyExample) string { + v8 := r.Intn(100) + tmps := make([]rune, v8) + for i := 0; i < v8; i++ { + tmps[i] = randUTF8RuneExample(r) + } + return string(tmps) +} +func randUnrecognizedExample(r randyExample, 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 = randFieldExample(data, r, fieldNumber, wire) + } + return data +} +func randFieldExample(data []byte, r randyExample, fieldNumber int, wire int) []byte { + key := uint32(fieldNumber)<<3 | uint32(wire) + switch wire { + case 0: + data = encodeVarintPopulateExample(data, uint64(key)) + v9 := r.Int63() + if r.Intn(2) == 0 { + v9 *= -1 + } + data = encodeVarintPopulateExample(data, uint64(v9)) + case 1: + data = encodeVarintPopulateExample(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 = encodeVarintPopulateExample(data, uint64(key)) + ll := r.Intn(100) + data = encodeVarintPopulateExample(data, uint64(ll)) + for j := 0; j < ll; j++ { + data = append(data, byte(r.Intn(256))) + } + default: + data = encodeVarintPopulateExample(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 encodeVarintPopulateExample(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 *A) Size() (n int) { + var l int + _ = l + l = len(m.Description) + n += 1 + l + sovExample(uint64(l)) + n += 1 + sovExample(uint64(m.Number)) + l = m.Id.Size() + n += 1 + l + sovExample(uint64(l)) + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *B) Size() (n int) { + var l int + _ = l + l = m.A.Size() + n += 1 + l + sovExample(uint64(l)) + if len(m.G) > 0 { + for _, e := range m.G { + l = e.Size() + n += 1 + l + sovExample(uint64(l)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *C) Size() (n int) { + var l int + _ = l + if m.MySize != nil { + n += 1 + sovExample(uint64(*m.MySize)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *U) Size() (n int) { + var l int + _ = l + if m.A != nil { + l = m.A.Size() + n += 1 + l + sovExample(uint64(l)) + } + if m.B != nil { + l = m.B.Size() + n += 1 + l + sovExample(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *E) Size() (n int) { + var l int + _ = l + if m.XXX_extensions != nil { + n += len(m.XXX_extensions) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *R) Size() (n int) { + var l int + _ = l + if m.Recognized != nil { + n += 1 + sovExample(uint64(*m.Recognized)) + } + return n +} + +func (m *CastType) Size() (n int) { + var l int + _ = l + if m.Int32 != nil { + n += 1 + sovExample(uint64(*m.Int32)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func sovExample(x uint64) (n int) { + for { + n++ + x >>= 7 + if x == 0 { + break + } + } + return n +} +func sozExample(x uint64) (n int) { + return sovExample(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (this *A) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&A{`, + `Description:` + fmt.Sprintf("%v", this.Description) + `,`, + `Number:` + fmt.Sprintf("%v", this.Number) + `,`, + `Id:` + fmt.Sprintf("%v", this.Id) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *B) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&B{`, + `A:` + strings.Replace(strings.Replace(this.A.String(), "A", "A", 1), `&`, ``, 1) + `,`, + `G:` + fmt.Sprintf("%v", this.G) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *C) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&C{`, + `MySize:` + valueToStringExample(this.MySize) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *U) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&U{`, + `A:` + strings.Replace(fmt.Sprintf("%v", this.A), "A", "A", 1) + `,`, + `B:` + strings.Replace(fmt.Sprintf("%v", this.B), "B", "B", 1) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *E) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&E{`, + `XXX_extensions:` + proto.StringFromExtensionsBytes(this.XXX_extensions) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *R) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&R{`, + `Recognized:` + valueToStringExample(this.Recognized) + `,`, + `}`, + }, "") + return s +} +func (this *CastType) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&CastType{`, + `Int32:` + valueToStringExample(this.Int32) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func valueToStringExample(v interface{}) string { + rv := reflect.ValueOf(v) + if rv.IsNil() { + return "nil" + } + pv := reflect.Indirect(rv).Interface() + return fmt.Sprintf("*%v", pv) +} +func (this *U) GetValue() interface{} { + if this.A != nil { + return this.A + } + if this.B != nil { + return this.B + } + return nil +} + +func (this *U) SetValue(value interface{}) bool { + switch vt := value.(type) { + case *A: + this.A = vt + case *B: + this.B = vt + default: + return false + } + return true +} +func (m *A) 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 ErrIntOverflowExample + } + 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: A: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: A: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Description", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowExample + } + 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 ErrInvalidLengthExample + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Description = string(data[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + 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 ErrIntOverflowExample + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + m.Number |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowExample + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthExample + } + postIndex := iNdEx + byteLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Id.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipExample(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthExample + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *B) 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 ErrIntOverflowExample + } + 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: B: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: B: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field A", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowExample + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthExample + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.A.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field G", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowExample + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthExample + } + postIndex := iNdEx + byteLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var v github_com_gogo_protobuf_test_custom.Uint128 + m.G = append(m.G, v) + if err := m.G[len(m.G)-1].Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipExample(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthExample + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *C) 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 ErrIntOverflowExample + } + 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: C: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: C: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field MySize", wireType) + } + var v int64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowExample + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.MySize = &v + default: + iNdEx = preIndex + skippy, err := skipExample(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthExample + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *U) 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 ErrIntOverflowExample + } + 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: U: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: U: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field A", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowExample + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthExample + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.A == nil { + m.A = &A{} + } + if err := m.A.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field B", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowExample + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthExample + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.B == nil { + m.B = &B{} + } + if err := m.B.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipExample(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthExample + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *E) 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 ErrIntOverflowExample + } + 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: E: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: E: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + if (fieldNum >= 1) && (fieldNum < 536870912) { + var sizeOfWire int + for { + sizeOfWire++ + wire >>= 7 + if wire == 0 { + break + } + } + iNdEx -= sizeOfWire + skippy, err := skipExample(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthExample + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + github_com_gogo_protobuf_proto.AppendExtension(m, int32(fieldNum), data[iNdEx:iNdEx+skippy]) + iNdEx += skippy + } else { + iNdEx = preIndex + skippy, err := skipExample(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthExample + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *R) 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 ErrIntOverflowExample + } + 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: R: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: R: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Recognized", wireType) + } + var v uint32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowExample + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (uint32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Recognized = &v + default: + iNdEx = preIndex + skippy, err := skipExample(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthExample + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *CastType) 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 ErrIntOverflowExample + } + 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: CastType: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: CastType: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Int32", wireType) + } + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowExample + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Int32 = &v + default: + iNdEx = preIndex + skippy, err := skipExample(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthExample + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipExample(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, ErrIntOverflowExample + } + 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, ErrIntOverflowExample + } + 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, ErrIntOverflowExample + } + 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, ErrInvalidLengthExample + } + return iNdEx, nil + case 3: + for { + var innerWire uint64 + var start int = iNdEx + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowExample + } + 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 := skipExample(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 ( + ErrInvalidLengthExample = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowExample = fmt.Errorf("proto: integer overflow") +) + +var fileDescriptorExample = []byte{ + // 415 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0x7c, 0x90, 0x41, 0x6b, 0xd4, 0x40, + 0x18, 0x86, 0xf7, 0xdb, 0x4d, 0xd7, 0x74, 0xd6, 0x82, 0x8c, 0x08, 0x8b, 0x48, 0x46, 0x22, 0x88, + 0xd6, 0x9a, 0xc5, 0x55, 0x50, 0x72, 0xeb, 0x54, 0x91, 0x1e, 0xf4, 0x30, 0xba, 0x3f, 0x60, 0x93, + 0x8c, 0x71, 0xc0, 0x64, 0x42, 0x32, 0x01, 0xeb, 0xa9, 0x47, 0x6f, 0xfe, 0x85, 0x7a, 0xeb, 0x4f, + 0xf0, 0xe8, 0x71, 0x8f, 0x7b, 0x14, 0x0f, 0xa1, 0xed, 0x2f, 0xe8, 0x51, 0x3c, 0xf9, 0xcd, 0xec, + 0xa2, 0x82, 0xd8, 0xc0, 0x4b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0xf6, 0xdd, 0x22, 0xb0, 0x47, 0x03, 0xe2, + 0x35, 0xea, 0x83, 0x74, 0x95, 0x03, 0x4e, 0xce, 0x3a, 0x36, 0x7c, 0x71, 0xf0, 0x0a, 0x1d, 0xe1, + 0xfc, 0xf0, 0x31, 0x81, 0x19, 0xbd, 0xf6, 0x2f, 0x94, 0x45, 0x41, 0x9b, 0xbb, 0xfb, 0xf8, 0x6d, + 0x73, 0x01, 0x49, 0xec, 0x2d, 0x6c, 0xfa, 0x55, 0x02, 0xcf, 0xb6, 0x7d, 0x1f, 0xae, 0x1c, 0xe2, + 0xd3, 0x47, 0xf3, 0x33, 0xeb, 0x85, 0x77, 0x09, 0x08, 0xac, 0x24, 0xb5, 0x4c, 0x75, 0x5e, 0x62, + 0x7e, 0xe6, 0x62, 0xb7, 0xc4, 0x5f, 0x4e, 0xec, 0x2d, 0xed, 0xea, 0x3d, 0xe2, 0xef, 0xcd, 0x1b, + 0xf3, 0xfa, 0xa0, 0x92, 0x78, 0x29, 0x1b, 0xfb, 0xa5, 0x79, 0x38, 0x5d, 0x53, 0x6e, 0xfe, 0xec, + 0xd8, 0x86, 0xb2, 0x86, 0x58, 0xbd, 0xf8, 0xce, 0xb7, 0xd3, 0xa0, 0x77, 0x72, 0x1a, 0xc0, 0x39, + 0xea, 0x07, 0xea, 0xf0, 0x2c, 0x80, 0x63, 0xd4, 0x17, 0xd4, 0x57, 0xd4, 0x02, 0xb5, 0x44, 0x9d, + 0xa0, 0x7e, 0x05, 0x00, 0x00, 0xff, 0xff, 0x6b, 0x54, 0x6c, 0x61, 0x3f, 0x02, 0x00, 0x00, +} diff --git a/vendor/github.com/gogo/protobuf/test/example/example.proto b/vendor/github.com/gogo/protobuf/test/example/example.proto new file mode 100644 index 000000000..b69ea876e --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/example/example.proto @@ -0,0 +1,81 @@ +// Copyright (c) 2013, Vastech SA (PTY) LTD. 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 test; + +import "github.com/gogo/protobuf/gogoproto/gogo.proto"; + +option (gogoproto.gostring_all) = true; +option (gogoproto.equal_all) = true; +option (gogoproto.verbose_equal_all) = true; +option (gogoproto.goproto_stringer_all) = false; +option (gogoproto.stringer_all) = true; +option (gogoproto.populate_all) = true; +option (gogoproto.testgen_all) = true; +option (gogoproto.benchgen_all) = true; +option (gogoproto.marshaler_all) = true; +option (gogoproto.sizer_all) = true; +option (gogoproto.unmarshaler_all) = true; + +message A { + option (gogoproto.face) = true; + option (gogoproto.goproto_getters) = false; + 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.Uuid", (gogoproto.nullable) = false]; +} + +message B { + option (gogoproto.description) = true; + 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]; +} + +message C { + optional int64 size = 1 [(gogoproto.customname) = "MySize"]; +} + +message U { + option (gogoproto.onlyone) = true; + optional A A = 1; + optional B B = 2; +} + +message E { + option (gogoproto.goproto_extensions_map) = false; + extensions 1 to max; +} + +message R { + option (gogoproto.goproto_unrecognized) = false; + optional uint32 recognized = 1; +} + +message CastType { + optional int64 Int32 = 1 [(gogoproto.casttype)="int32"]; +} diff --git a/vendor/github.com/gogo/protobuf/test/example/example_test.go b/vendor/github.com/gogo/protobuf/test/example/example_test.go new file mode 100644 index 000000000..79ef9476b --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/example/example_test.go @@ -0,0 +1,35 @@ +// Extensions for Protocol Buffers to create more go like structures. +// +// Copyright (c) 2013, Vastech SA (PTY) LTD. All rights reserved. +// http://github.com/gogo/protobuf/gogoproto +// +// 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 test + +import "testing" + +func TestGetterExists(t *testing.T) { + _ = (&CastType{}).GetInt32() +} diff --git a/vendor/github.com/gogo/protobuf/test/example/examplepb_test.go b/vendor/github.com/gogo/protobuf/test/example/examplepb_test.go new file mode 100644 index 000000000..32d07332a --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/example/examplepb_test.go @@ -0,0 +1,1672 @@ +// Code generated by protoc-gen-gogo. +// source: example.proto +// DO NOT EDIT! + +/* +Package test is a generated protocol buffer package. + +It is generated from these files: + example.proto + +It has these top-level messages: + A + B + C + U + E + R + CastType +*/ +package test + +import testing "testing" +import math_rand "math/rand" +import time "time" +import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" +import github_com_gogo_protobuf_jsonpb "github.com/gogo/protobuf/jsonpb" +import fmt "fmt" +import go_parser "go/parser" +import proto "github.com/gogo/protobuf/proto" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +func TestAProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedA(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &A{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestAMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedA(popr, false) + size := p.Size() + data := make([]byte, size) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(data) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &A{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkAProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*A, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedA(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkAProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedA(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &A{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestBProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedB(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &B{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestBMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedB(popr, false) + size := p.Size() + data := make([]byte, size) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(data) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &B{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkBProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*B, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedB(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkBProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedB(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &B{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestCProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedC(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &C{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestCMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedC(popr, false) + size := p.Size() + data := make([]byte, size) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(data) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &C{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkCProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*C, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedC(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkCProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedC(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &C{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestUProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedU(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &U{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestUMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedU(popr, false) + size := p.Size() + data := make([]byte, size) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(data) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &U{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkUProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*U, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedU(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkUProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedU(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &U{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestEProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedE(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &E{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestEMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedE(popr, false) + size := p.Size() + data := make([]byte, size) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(data) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &E{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkEProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*E, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedE(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkEProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedE(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &E{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestRProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedR(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &R{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestRMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedR(popr, false) + size := p.Size() + data := make([]byte, size) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(data) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &R{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkRProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*R, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedR(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkRProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedR(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &R{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestCastTypeProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCastType(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &CastType{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestCastTypeMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCastType(popr, false) + size := p.Size() + data := make([]byte, size) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(data) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &CastType{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkCastTypeProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*CastType, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedCastType(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkCastTypeProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedCastType(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &CastType{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestAJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedA(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &A{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestBJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedB(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &B{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestCJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedC(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &C{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestUJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedU(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &U{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestEJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedE(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &E{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestRJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedR(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &R{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestCastTypeJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCastType(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &CastType{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestAProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedA(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &A{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestAProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedA(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &A{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestBProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedB(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &B{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestBProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedB(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &B{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestCProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedC(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &C{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestCProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedC(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &C{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestUProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedU(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &U{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestUProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedU(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &U{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestEProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedE(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &E{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestEProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedE(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &E{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestRProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedR(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &R{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestRProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedR(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &R{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestCastTypeProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCastType(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &CastType{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestCastTypeProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCastType(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &CastType{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestExampleDescription(t *testing.T) { + ExampleDescription() +} +func TestAVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedA(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &A{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestBVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedB(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &B{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestCVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedC(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &C{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestUVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedU(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &U{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestEVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedE(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &E{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestRVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedR(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &R{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestCastTypeVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCastType(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &CastType{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestAFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedA(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestAGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedA(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestBGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedB(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestCGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedC(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestUGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedU(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestEGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedE(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestRGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedR(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestCastTypeGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCastType(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestASize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedA(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkASize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*A, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedA(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestBSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedB(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkBSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*B, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedB(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestCSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedC(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkCSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*C, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedC(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestUSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedU(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkUSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*U, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedU(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestESize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedE(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkESize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*E, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedE(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestRSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedR(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkRSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*R, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedR(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestCastTypeSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCastType(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkCastTypeSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*CastType, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedCastType(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestAStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedA(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestBStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedB(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestCStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedC(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestUStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedU(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestEStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedE(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestRStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedR(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestCastTypeStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCastType(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestUOnlyOne(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedU(popr, true) + v := p.GetValue() + msg := &U{} + if !msg.SetValue(v) { + t.Fatalf("OnlyOne: Could not set Value") + } + if !p.Equal(msg) { + t.Fatalf("%#v !OnlyOne Equal %#v", msg, p) + } +} + +//These tests are generated by github.com/gogo/protobuf/plugin/testgen diff --git a/vendor/github.com/gogo/protobuf/test/extension_test.go b/vendor/github.com/gogo/protobuf/test/extension_test.go new file mode 100644 index 000000000..141bd0bbf --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/extension_test.go @@ -0,0 +1,162 @@ +// Copyright (c) 2013, Vastech SA (PTY) LTD. All rights reserved. +// http://github.com/gogo/protobuf/gogoproto +// +// 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 test + +import ( + "github.com/gogo/protobuf/proto" + "math" + math_rand "math/rand" + "testing" + "time" +) + +//func SetRawExtension(base extendableProto, id int32, b []byte) { +//func HasExtension(pb extendableProto, extension *ExtensionDesc) bool { +//func ClearExtension(pb extendableProto, extension *ExtensionDesc) { +//func GetExtension(pb extendableProto, extension *ExtensionDesc) (interface{}, error) { +//func GetExtensions(pb Message, es []*ExtensionDesc) (extensions []interface{}, err error) { +//func SetExtension(pb extendableProto, extension *ExtensionDesc, value interface{}) error { + +type extendable interface { + proto.Message + ExtensionRangeArray() []proto.ExtensionRange +} + +func check(t *testing.T, m extendable, fieldA float64, ext *proto.ExtensionDesc) { + if !proto.HasExtension(m, ext) { + t.Fatalf("expected extension to be set") + } + fieldA2Interface, err := proto.GetExtension(m, ext) + if err != nil { + panic(err) + } + fieldA2 := fieldA2Interface.(*float64) + if fieldA != *fieldA2 { + t.Fatalf("Expected %f got %f", fieldA, *fieldA2) + } + fieldA3Interface, err := proto.GetUnsafeExtension(m, ext.Field) + if err != nil { + panic(err) + } + fieldA3 := fieldA3Interface.(*float64) + if fieldA != *fieldA3 { + t.Fatalf("Expected %f got %f", fieldA, *fieldA3) + } + proto.ClearExtension(m, ext) + if proto.HasExtension(m, ext) { + t.Fatalf("expected extension to be cleared") + } +} + +var fieldA float64 +var fieldABytes []byte +var extr = math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + +func init() { + fieldA = float64(1.1) + fieldABits := math.Float64bits(fieldA) + x := uint64(uint32(100)<<3 | uint32(proto.WireFixed64)) + fieldABytes = encodeVarintPopulateThetest(nil, x) + fieldABytes = append(fieldABytes, uint8(fieldABits)) + fieldABytes = append(fieldABytes, uint8(fieldABits>>8)) + fieldABytes = append(fieldABytes, uint8(fieldABits>>16)) + fieldABytes = append(fieldABytes, uint8(fieldABits>>24)) + fieldABytes = append(fieldABytes, uint8(fieldABits>>32)) + fieldABytes = append(fieldABytes, uint8(fieldABits>>40)) + fieldABytes = append(fieldABytes, uint8(fieldABits>>48)) + fieldABytes = append(fieldABytes, uint8(fieldABits>>56)) +} + +func TestExtensionsMyExtendable(t *testing.T) { + m := NewPopulatedMyExtendable(extr, false) + err := proto.SetExtension(m, E_FieldA, &fieldA) + if err != nil { + panic(err) + } + check(t, m, fieldA, E_FieldA) + proto.SetRawExtension(m, 100, fieldABytes) + check(t, m, fieldA, E_FieldA) +} + +func TestExtensionsNoExtensionsMapSetExtension(t *testing.T) { + m := NewPopulatedNoExtensionsMap(extr, false) + err := proto.SetExtension(m, E_FieldA1, &fieldA) + if err != nil { + panic(err) + } + check(t, m, fieldA, E_FieldA1) +} + +func TestExtensionsNoExtensionsMapSetRawExtension(t *testing.T) { + m := NewPopulatedNoExtensionsMap(extr, false) + proto.SetRawExtension(m, 100, fieldABytes) + check(t, m, fieldA, E_FieldA1) +} + +func TestUnsafeExtension(t *testing.T) { + m := NewPopulatedMyExtendable(extr, false) + err := proto.SetUnsafeExtension(m, E_FieldA.Field, &fieldA) + if err != nil { + panic(err) + } + check(t, m, fieldA, E_FieldA) +} + +//See another version of this test in proto/extensions_test.go +func TestGetExtensionStability(t *testing.T) { + check := func(m *NoExtensionsMap) bool { + ext1, err := proto.GetExtension(m, E_FieldB1) + if err != nil { + t.Fatalf("GetExtension() failed: %s", err) + } + ext2, err := proto.GetExtension(m, E_FieldB1) + if err != nil { + t.Fatalf("GetExtension() failed: %s", err) + } + return ext1.(*NinOptNative).Equal(ext2) + } + msg := &NoExtensionsMap{Field1: proto.Int64(2)} + ext0 := &NinOptNative{Field1: proto.Float64(1)} + if err := proto.SetExtension(msg, E_FieldB1, ext0); err != nil { + t.Fatalf("Could not set ext1: %s", ext0) + } + if !check(msg) { + t.Errorf("GetExtension() not stable before marshaling") + } + bb, err := proto.Marshal(msg) + if err != nil { + t.Fatalf("Marshal() failed: %s", err) + } + msg1 := &NoExtensionsMap{} + err = proto.Unmarshal(bb, msg1) + if err != nil { + t.Fatalf("Unmarshal() failed: %s", err) + } + if !check(msg1) { + t.Errorf("GetExtension() not stable after unmarshaling") + } +} diff --git a/vendor/github.com/gogo/protobuf/test/filedotname/Makefile b/vendor/github.com/gogo/protobuf/test/filedotname/Makefile new file mode 100644 index 000000000..eadad758e --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/filedotname/Makefile @@ -0,0 +1,31 @@ +# Extensions for Protocol Buffers to create more go like structures. +# +# Copyright (c) 2016, Vastech SA (PTY) LTD. All rights reserved. +# http://github.com/gogo/protobuf/gogoproto +# +# 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=. --proto_path=../../../../../:../../protobuf/:. file.dot.proto diff --git a/vendor/github.com/gogo/protobuf/test/filedotname/file.dot.pb.go b/vendor/github.com/gogo/protobuf/test/filedotname/file.dot.pb.go new file mode 100644 index 000000000..ad3c25306 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/filedotname/file.dot.pb.go @@ -0,0 +1,568 @@ +// Code generated by protoc-gen-gogo. +// source: file.dot.proto +// DO NOT EDIT! + +/* +Package filedotname is a generated protocol buffer package. + +It is generated from these files: + file.dot.proto + +It has these top-level messages: + M +*/ +package filedotname + +import proto "github.com/gogo/protobuf/proto" +import fmt "fmt" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" + +import github_com_gogo_protobuf_protoc_gen_gogo_descriptor "github.com/gogo/protobuf/protoc-gen-gogo/descriptor" +import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" +import compress_gzip "compress/gzip" +import bytes "bytes" +import io_ioutil "io/ioutil" + +import strings "strings" +import sort "sort" +import strconv "strconv" +import reflect "reflect" + +// 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. +const _ = proto.GoGoProtoPackageIsVersion1 + +type M struct { + A *string `protobuf:"bytes,1,opt,name=a" json:"a,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *M) Reset() { *m = M{} } +func (*M) ProtoMessage() {} +func (*M) Descriptor() ([]byte, []int) { return fileDescriptorFileDot, []int{0} } + +func init() { + proto.RegisterType((*M)(nil), "filedotname.M") +} +func (this *M) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return FileDotDescription() +} +func FileDotDescription() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + d := &github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet{} + var gzipped = []byte{ + // 3329 bytes of a gzipped FileDescriptorSet + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xcc, 0x5a, 0x5d, 0x6c, 0x23, 0xd5, + 0x15, 0xc6, 0xb1, 0x9d, 0xd8, 0xc7, 0x8e, 0xe3, 0x4c, 0xc2, 0xae, 0x37, 0xc0, 0x2e, 0x1b, 0xfe, + 0x96, 0xa5, 0x64, 0xe9, 0xb6, 0xc0, 0x62, 0x5a, 0x50, 0x7e, 0xbc, 0xc1, 0xab, 0x24, 0x76, 0xc7, + 0x31, 0x2c, 0xf4, 0x61, 0x34, 0x19, 0xdf, 0x38, 0xde, 0x1d, 0xcf, 0xb8, 0x9e, 0xf1, 0xb2, 0xe1, + 0x89, 0x8a, 0xfe, 0x08, 0x55, 0xfd, 0xaf, 0x54, 0xfe, 0x5b, 0x90, 0x5a, 0x28, 0x2d, 0x2d, 0xf4, + 0x4f, 0x55, 0x9f, 0x90, 0x2a, 0x5a, 0x9e, 0xaa, 0xb6, 0x4f, 0x7d, 0xe8, 0x03, 0x50, 0xa4, 0xd2, + 0x96, 0xb6, 0x54, 0x5a, 0xa9, 0x48, 0xfb, 0xd2, 0x73, 0xff, 0xc6, 0x33, 0xb6, 0x93, 0x71, 0x90, + 0x28, 0x5d, 0x69, 0x14, 0xdf, 0x73, 0xcf, 0xf7, 0xcd, 0xbd, 0xe7, 0x9e, 0x7b, 0xce, 0xb9, 0x77, + 0x16, 0x7e, 0xf5, 0x61, 0xb8, 0xb2, 0x6e, 0xdb, 0x75, 0x93, 0x1c, 0x6b, 0xb5, 0x6d, 0xd7, 0xde, + 0xe8, 0x6c, 0x1e, 0xab, 0x11, 0xc7, 0x68, 0x37, 0x5a, 0xae, 0xdd, 0x9e, 0x63, 0x32, 0x65, 0x82, + 0x6b, 0xcc, 0x49, 0x8d, 0xd9, 0x55, 0x98, 0x3c, 0xd9, 0x30, 0xc9, 0x92, 0xa7, 0x58, 0x21, 0xae, + 0x72, 0x02, 0x62, 0x9b, 0x28, 0xcc, 0x45, 0xae, 0x8c, 0x1e, 0x49, 0x1d, 0xbf, 0x7a, 0xae, 0x07, + 0x34, 0x17, 0x44, 0x94, 0xa9, 0x58, 0x65, 0x88, 0xd9, 0x37, 0x63, 0x30, 0x35, 0xa0, 0x57, 0x51, + 0x20, 0x66, 0xe9, 0x4d, 0xca, 0x18, 0x39, 0x92, 0x54, 0xd9, 0x6f, 0x25, 0x07, 0x63, 0x2d, 0xdd, + 0x38, 0xab, 0xd7, 0x49, 0x6e, 0x84, 0x89, 0x65, 0x53, 0x39, 0x08, 0x50, 0x23, 0x2d, 0x62, 0xd5, + 0x88, 0x65, 0x6c, 0xe7, 0xa2, 0x38, 0x8a, 0xa4, 0xea, 0x93, 0x28, 0x37, 0xc0, 0x64, 0xab, 0xb3, + 0x61, 0x36, 0x0c, 0xcd, 0xa7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 0x9b, 0x10, 0x40, 0x76, 0x0a, 0xa6, 0x5c, 0xb7, 0x41, 0x62, 0x13, 0x0f, 0x40, 0x43, + 0x50, 0x3c, 0x29, 0x28, 0xc6, 0xa8, 0x3e, 0x85, 0xce, 0x43, 0xba, 0x6e, 0x8b, 0x30, 0x1c, 0x0e, + 0x7f, 0x4a, 0xc0, 0x53, 0x12, 0x23, 0x28, 0x5a, 0x76, 0xab, 0x63, 0xd2, 0x18, 0x1d, 0x4e, 0xf1, + 0x2d, 0x49, 0x21, 0x31, 0x82, 0x62, 0x0f, 0x66, 0xfd, 0xb6, 0xa4, 0x70, 0x7c, 0xf6, 0xbc, 0x93, + 0xde, 0xf5, 0x9a, 0xdb, 0xb6, 0x35, 0xcc, 0x20, 0x9e, 0x16, 0x0c, 0x20, 0x20, 0x94, 0xe0, 0x76, + 0x48, 0x0e, 0xbb, 0x10, 0xdf, 0x11, 0xf0, 0x04, 0x91, 0x2b, 0x80, 0xfb, 0x4c, 0x06, 0x19, 0xfa, + 0x6d, 0x25, 0x9c, 0xe2, 0xbb, 0x82, 0x22, 0xe3, 0x83, 0x89, 0x69, 0xb8, 0xc4, 0x71, 0xf1, 0xa8, + 0x3e, 0x04, 0xc9, 0xb3, 0x72, 0x1a, 0x02, 0x22, 0x4c, 0xb9, 0x41, 0x2c, 0x63, 0x6b, 0x38, 0x86, + 0xe7, 0xa4, 0x29, 0x25, 0x86, 0x52, 0x60, 0xe4, 0x69, 0xea, 0x6d, 0x3c, 0x5c, 0x9b, 0x43, 0x2d, + 0xc7, 0xf7, 0x04, 0x47, 0xda, 0x03, 0x09, 0x8b, 0x74, 0xac, 0xbd, 0xd0, 0x3c, 0x2f, 0x2d, 0xe2, + 0x83, 0x89, 0xad, 0x87, 0x27, 0x53, 0x5a, 0x49, 0xec, 0x85, 0xed, 0xfb, 0x72, 0xeb, 0x71, 0xec, + 0xaa, 0x9f, 0x11, 0x57, 0xda, 0xc1, 0x23, 0xf8, 0x30, 0x34, 0x3f,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xbf, 0xcf, + 0x92, 0xed, 0x30, 0xec, 0x3b, 0x72, 0xd0, 0x42, 0x1f, 0x03, 0x60, 0x92, 0xfe, 0xe4, 0xff, 0xf5, + 0x20, 0x04, 0xfc, 0x6f, 0x01, 0xee, 0x22, 0x16, 0x0e, 0x0f, 0xbe, 0xda, 0x81, 0x65, 0x7b, 0xd9, + 0xe6, 0x97, 0x3a, 0xf0, 0x42, 0x04, 0x32, 0xf4, 0x4b, 0xef, 0x5c, 0xcd, 0x76, 0xc5, 0x25, 0x4c, + 0x8a, 0xb6, 0xb1, 0x49, 0x2d, 0x3e, 0xb3, 0xb7, 0x0b, 0x9c, 0xd9, 0x49, 0x88, 0xac, 0x2a, 0x69, + 0x88, 0xe8, 0xe2, 0xa3, 0x74, 0x44, 0x5f, 0x58, 0x79, 0xf5, 0xf5, 0x83, 0x97, 0xfc, 0x0e, 0x9f, + 0x3f, 0xe2, 0xf3, 0xda, 0xeb, 0x07, 0x23, 0x6f, 0xe1, 0xf3, 0x0e, 0x3e, 0xef, 0xe2, 0xf3, 0xe0, + 0x1b, 0x07, 0x23, 0xcf, 0xe1, 0xf3, 0x22, 0x3e, 0xbf, 0xc0, 0xe7, 0x65, 0x7c, 0x5e, 0x7d, 0x03, + 0xf5, 0xf1, 0x79, 0x0d, 0x7f, 0xbf, 0x85, 0x7f, 0xdf, 0xc1, 0xbf, 0xef, 0xe2, 0xdf, 0x07, 0xff, + 0x7c, 0xf0, 0x92, 0xff, 0x06, 0x00, 0x00, 0xff, 0xff, 0xe7, 0x43, 0x74, 0x16, 0x1a, 0x2b, 0x00, + 0x00, + } + r := bytes.NewReader(gzipped) + gzipr, err := compress_gzip.NewReader(r) + if err != nil { + panic(err) + } + ungzipped, err := io_ioutil.ReadAll(gzipr) + if err != nil { + panic(err) + } + if err := github_com_gogo_protobuf_proto.Unmarshal(ungzipped, d); err != nil { + panic(err) + } + return d +} +func (this *M) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*M) + if !ok { + that2, ok := that.(M) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *M") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *M but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *M but is not nil && this == nil") + } + if this.A != nil && that1.A != nil { + if *this.A != *that1.A { + return fmt.Errorf("A this(%v) Not Equal that(%v)", *this.A, *that1.A) + } + } else if this.A != nil { + return fmt.Errorf("this.A == nil && that.A != nil") + } else if that1.A != nil { + return fmt.Errorf("A this(%v) Not Equal that(%v)", this.A, that1.A) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *M) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*M) + if !ok { + that2, ok := that.(M) + 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.A != nil && that1.A != nil { + if *this.A != *that1.A { + return false + } + } else if this.A != nil { + return false + } else if that1.A != nil { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} + +type MFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetA() *string +} + +func (this *M) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *M) TestProto() github_com_gogo_protobuf_proto.Message { + return NewMFromFace(this) +} + +func (this *M) GetA() *string { + return this.A +} + +func NewMFromFace(that MFace) *M { + this := &M{} + this.A = that.GetA() + return this +} + +func (this *M) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&filedotname.M{") + if this.A != nil { + s = append(s, "A: "+valueToGoStringFileDot(this.A, "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 valueToGoStringFileDot(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 extensionToGoStringFileDot(e map[int32]github_com_gogo_protobuf_proto.Extension) string { + if e == nil { + return "nil" + } + s := "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 +} +func NewPopulatedM(r randyFileDot, easy bool) *M { + this := &M{} + if r.Intn(10) != 0 { + v1 := randStringFileDot(r) + this.A = &v1 + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedFileDot(r, 2) + } + return this +} + +type randyFileDot interface { + Float32() float32 + Float64() float64 + Int63() int64 + Int31() int32 + Uint32() uint32 + Intn(n int) int +} + +func randUTF8RuneFileDot(r randyFileDot) 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 randStringFileDot(r randyFileDot) string { + v2 := r.Intn(100) + tmps := make([]rune, v2) + for i := 0; i < v2; i++ { + tmps[i] = randUTF8RuneFileDot(r) + } + return string(tmps) +} +func randUnrecognizedFileDot(r randyFileDot, 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 = randFieldFileDot(data, r, fieldNumber, wire) + } + return data +} +func randFieldFileDot(data []byte, r randyFileDot, fieldNumber int, wire int) []byte { + key := uint32(fieldNumber)<<3 | uint32(wire) + switch wire { + case 0: + data = encodeVarintPopulateFileDot(data, uint64(key)) + v3 := r.Int63() + if r.Intn(2) == 0 { + v3 *= -1 + } + data = encodeVarintPopulateFileDot(data, uint64(v3)) + case 1: + data = encodeVarintPopulateFileDot(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 = encodeVarintPopulateFileDot(data, uint64(key)) + ll := r.Intn(100) + data = encodeVarintPopulateFileDot(data, uint64(ll)) + for j := 0; j < ll; j++ { + data = append(data, byte(r.Intn(256))) + } + default: + data = encodeVarintPopulateFileDot(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 encodeVarintPopulateFileDot(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 *M) Size() (n int) { + var l int + _ = l + if m.A != nil { + l = len(*m.A) + n += 1 + l + sovFileDot(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func sovFileDot(x uint64) (n int) { + for { + n++ + x >>= 7 + if x == 0 { + break + } + } + return n +} +func sozFileDot(x uint64) (n int) { + return sovFileDot(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (this *M) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&M{`, + `A:` + valueToStringFileDot(this.A) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func valueToStringFileDot(v interface{}) string { + rv := reflect.ValueOf(v) + if rv.IsNil() { + return "nil" + } + pv := reflect.Indirect(rv).Interface() + return fmt.Sprintf("*%v", pv) +} + +var fileDescriptorFileDot = []byte{ + // 158 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xe2, 0xe2, 0x4b, 0xcb, 0xcc, 0x49, + 0xd5, 0x4b, 0xc9, 0x2f, 0xd1, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0xe2, 0x06, 0xf1, 0x81, 0xdc, + 0xbc, 0xc4, 0xdc, 0x54, 0x29, 0xdd, 0xf4, 0xcc, 0x92, 0x8c, 0xd2, 0x24, 0xbd, 0xe4, 0xfc, 0x5c, + 0xfd, 0xf4, 0xfc, 0xf4, 0x7c, 0x7d, 0xb0, 0x9a, 0xa4, 0xd2, 0x34, 0x30, 0x0f, 0xcc, 0x01, 0xb3, + 0x20, 0x7a, 0x95, 0x04, 0xb9, 0x18, 0x7d, 0x85, 0x78, 0xb8, 0x18, 0x13, 0x25, 0x18, 0x15, 0x18, + 0x35, 0x38, 0x83, 0x18, 0x13, 0x9d, 0x7c, 0x4e, 0x3c, 0x94, 0x63, 0xb8, 0x00, 0xc4, 0x37, 0x80, + 0xf8, 0xc1, 0x43, 0x39, 0xc6, 0x17, 0x40, 0xfc, 0x01, 0x88, 0x7f, 0x00, 0x71, 0xc3, 0x23, 0x39, + 0xc6, 0x15, 0x40, 0xbc, 0x01, 0x88, 0x77, 0x00, 0xf1, 0x01, 0x20, 0x3e, 0xf1, 0x08, 0xa8, 0x1e, + 0x88, 0x1f, 0x00, 0xd9, 0x2f, 0x80, 0xf4, 0x07, 0x20, 0xfd, 0x03, 0x48, 0x37, 0x3c, 0x96, 0x63, + 0x00, 0x04, 0x00, 0x00, 0xff, 0xff, 0x3f, 0x59, 0x32, 0x8a, 0xad, 0x00, 0x00, 0x00, +} diff --git a/vendor/github.com/gogo/protobuf/test/filedotname/file.dot.proto b/vendor/github.com/gogo/protobuf/test/filedotname/file.dot.proto new file mode 100644 index 000000000..d2dc79289 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/filedotname/file.dot.proto @@ -0,0 +1,60 @@ +// Copyright (c) 2016, Vastech SA (PTY) LTD. All rights reserved. +// http://github.com/gogo/protobuf/gogoproto +// +// 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 filedotname; + +import "github.com/gogo/protobuf/gogoproto/gogo.proto"; + +option (gogoproto.goproto_stringer_all) = false; +option (gogoproto.goproto_enum_prefix_all) = false; +option (gogoproto.goproto_getters_all) = false; + +option (gogoproto.equal_all) = true; +option (gogoproto.verbose_equal_all) = true; +option (gogoproto.stringer_all) = true; +option (gogoproto.gostring_all) = true; +option (gogoproto.face_all) = true; +option (gogoproto.description_all) = true; + +option (gogoproto.testgen_all) = true; +option (gogoproto.populate_all) = true; +option (gogoproto.benchgen_all) = true; +option (gogoproto.unmarshaler_all) = false; +option (gogoproto.marshaler_all) = false; +option (gogoproto.sizer_all) = true; + +option (gogoproto.goproto_enum_stringer_all) = false; +option (gogoproto.enum_stringer_all) = true; + +option (gogoproto.unsafe_marshaler_all) = false; +option (gogoproto.unsafe_unmarshaler_all) = false; + +message M { + optional string a = 1; +} + diff --git a/vendor/github.com/gogo/protobuf/test/filedotname/file.dotpb_test.go b/vendor/github.com/gogo/protobuf/test/filedotname/file.dotpb_test.go new file mode 100644 index 000000000..5668122f3 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/filedotname/file.dotpb_test.go @@ -0,0 +1,246 @@ +// Code generated by protoc-gen-gogo. +// source: file.dot.proto +// DO NOT EDIT! + +/* +Package filedotname is a generated protocol buffer package. + +It is generated from these files: + file.dot.proto + +It has these top-level messages: + M +*/ +package filedotname + +import testing "testing" +import math_rand "math/rand" +import time "time" +import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" +import github_com_gogo_protobuf_jsonpb "github.com/gogo/protobuf/jsonpb" +import fmt "fmt" +import go_parser "go/parser" +import proto "github.com/gogo/protobuf/proto" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +func TestMProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedM(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &M{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkMProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*M, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedM(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkMProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedM(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &M{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestMJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedM(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &M{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestMProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedM(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &M{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestMProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedM(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &M{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestFileDotDescription(t *testing.T) { + FileDotDescription() +} +func TestMVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedM(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &M{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestMFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedM(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestMGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedM(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestMSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedM(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkMSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*M, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedM(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestMStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedM(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} + +//These tests are generated by github.com/gogo/protobuf/plugin/testgen diff --git a/vendor/github.com/gogo/protobuf/test/fuzztests/Makefile b/vendor/github.com/gogo/protobuf/test/fuzztests/Makefile new file mode 100644 index 000000000..2299ee10d --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/fuzztests/Makefile @@ -0,0 +1,31 @@ +# Extensions for Protocol Buffers to create more go like structures. +# +# Copyright (c) 2015, Vastech SA (PTY) LTD. All rights reserved. +# http://github.com/gogo/protobuf/gogoproto +# +# 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-gogofast + protoc --proto_path=../../../../../:../../protobuf/:. --gogofast_out=. fuzz.proto \ No newline at end of file diff --git a/vendor/github.com/gogo/protobuf/test/fuzztests/fuzz.pb.go b/vendor/github.com/gogo/protobuf/test/fuzztests/fuzz.pb.go new file mode 100644 index 000000000..0f3b1e01c --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/fuzztests/fuzz.pb.go @@ -0,0 +1,2932 @@ +// Code generated by protoc-gen-gogo. +// source: fuzz.proto +// DO NOT EDIT! + +/* + Package fuzztests is a generated protocol buffer package. + + It is generated from these files: + fuzz.proto + + It has these top-level messages: + Nil + NinRepPackedNative + NinOptNative + NinOptStruct +*/ +package fuzztests + +import proto "github.com/gogo/protobuf/proto" +import fmt "fmt" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" + +import strings "strings" +import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" +import sort "sort" +import strconv "strconv" +import reflect "reflect" + +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. +const _ = proto.GoGoProtoPackageIsVersion1 + +type Nil struct { + XXX_unrecognized []byte `json:"-"` +} + +func (m *Nil) Reset() { *m = Nil{} } +func (m *Nil) String() string { return proto.CompactTextString(m) } +func (*Nil) ProtoMessage() {} +func (*Nil) Descriptor() ([]byte, []int) { return fileDescriptorFuzz, []int{0} } + +type NinRepPackedNative struct { + Field1 []float64 `protobuf:"fixed64,1,rep,packed,name=Field1,json=field1" json:"Field1,omitempty"` + Field2 []float32 `protobuf:"fixed32,2,rep,packed,name=Field2,json=field2" json:"Field2,omitempty"` + Field3 []int32 `protobuf:"varint,3,rep,packed,name=Field3,json=field3" json:"Field3,omitempty"` + Field4 []int64 `protobuf:"varint,4,rep,packed,name=Field4,json=field4" json:"Field4,omitempty"` + Field5 []uint32 `protobuf:"varint,5,rep,packed,name=Field5,json=field5" json:"Field5,omitempty"` + Field6 []uint64 `protobuf:"varint,6,rep,packed,name=Field6,json=field6" json:"Field6,omitempty"` + Field7 []int32 `protobuf:"zigzag32,7,rep,packed,name=Field7,json=field7" json:"Field7,omitempty"` + Field8 []int64 `protobuf:"zigzag64,8,rep,packed,name=Field8,json=field8" json:"Field8,omitempty"` + Field9 []uint32 `protobuf:"fixed32,9,rep,packed,name=Field9,json=field9" json:"Field9,omitempty"` + Field10 []int32 `protobuf:"fixed32,10,rep,packed,name=Field10,json=field10" json:"Field10,omitempty"` + Field11 []uint64 `protobuf:"fixed64,11,rep,packed,name=Field11,json=field11" json:"Field11,omitempty"` + Field12 []int64 `protobuf:"fixed64,12,rep,packed,name=Field12,json=field12" json:"Field12,omitempty"` + Field13 []bool `protobuf:"varint,13,rep,packed,name=Field13,json=field13" json:"Field13,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *NinRepPackedNative) Reset() { *m = NinRepPackedNative{} } +func (m *NinRepPackedNative) String() string { return proto.CompactTextString(m) } +func (*NinRepPackedNative) ProtoMessage() {} +func (*NinRepPackedNative) Descriptor() ([]byte, []int) { return fileDescriptorFuzz, []int{1} } + +func (m *NinRepPackedNative) GetField1() []float64 { + if m != nil { + return m.Field1 + } + return nil +} + +func (m *NinRepPackedNative) GetField2() []float32 { + if m != nil { + return m.Field2 + } + return nil +} + +func (m *NinRepPackedNative) GetField3() []int32 { + if m != nil { + return m.Field3 + } + return nil +} + +func (m *NinRepPackedNative) GetField4() []int64 { + if m != nil { + return m.Field4 + } + return nil +} + +func (m *NinRepPackedNative) GetField5() []uint32 { + if m != nil { + return m.Field5 + } + return nil +} + +func (m *NinRepPackedNative) GetField6() []uint64 { + if m != nil { + return m.Field6 + } + return nil +} + +func (m *NinRepPackedNative) GetField7() []int32 { + if m != nil { + return m.Field7 + } + return nil +} + +func (m *NinRepPackedNative) GetField8() []int64 { + if m != nil { + return m.Field8 + } + return nil +} + +func (m *NinRepPackedNative) GetField9() []uint32 { + if m != nil { + return m.Field9 + } + return nil +} + +func (m *NinRepPackedNative) GetField10() []int32 { + if m != nil { + return m.Field10 + } + return nil +} + +func (m *NinRepPackedNative) GetField11() []uint64 { + if m != nil { + return m.Field11 + } + return nil +} + +func (m *NinRepPackedNative) GetField12() []int64 { + if m != nil { + return m.Field12 + } + return nil +} + +func (m *NinRepPackedNative) GetField13() []bool { + if m != nil { + return m.Field13 + } + return nil +} + +type NinOptNative struct { + Field1 *float64 `protobuf:"fixed64,1,opt,name=Field1,json=field1" json:"Field1,omitempty"` + Field2 *float32 `protobuf:"fixed32,2,opt,name=Field2,json=field2" json:"Field2,omitempty"` + Field3 *int32 `protobuf:"varint,3,opt,name=Field3,json=field3" json:"Field3,omitempty"` + Field4 *int64 `protobuf:"varint,4,opt,name=Field4,json=field4" json:"Field4,omitempty"` + Field5 *uint32 `protobuf:"varint,5,opt,name=Field5,json=field5" json:"Field5,omitempty"` + Field6 *uint64 `protobuf:"varint,6,opt,name=Field6,json=field6" json:"Field6,omitempty"` + Field7 *int32 `protobuf:"zigzag32,7,opt,name=Field7,json=field7" json:"Field7,omitempty"` + Field8 *int64 `protobuf:"zigzag64,8,opt,name=Field8,json=field8" json:"Field8,omitempty"` + Field9 *uint32 `protobuf:"fixed32,9,opt,name=Field9,json=field9" json:"Field9,omitempty"` + Field10 *int32 `protobuf:"fixed32,10,opt,name=Field10,json=field10" json:"Field10,omitempty"` + Field11 *uint64 `protobuf:"fixed64,11,opt,name=Field11,json=field11" json:"Field11,omitempty"` + Field12 *int64 `protobuf:"fixed64,12,opt,name=Field12,json=field12" json:"Field12,omitempty"` + Field13 *bool `protobuf:"varint,13,opt,name=Field13,json=field13" json:"Field13,omitempty"` + Field14 *string `protobuf:"bytes,14,opt,name=Field14,json=field14" json:"Field14,omitempty"` + Field15 []byte `protobuf:"bytes,15,opt,name=Field15,json=field15" json:"Field15,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *NinOptNative) Reset() { *m = NinOptNative{} } +func (m *NinOptNative) String() string { return proto.CompactTextString(m) } +func (*NinOptNative) ProtoMessage() {} +func (*NinOptNative) Descriptor() ([]byte, []int) { return fileDescriptorFuzz, []int{2} } + +func (m *NinOptNative) GetField1() float64 { + if m != nil && m.Field1 != nil { + return *m.Field1 + } + return 0 +} + +func (m *NinOptNative) GetField2() float32 { + if m != nil && m.Field2 != nil { + return *m.Field2 + } + return 0 +} + +func (m *NinOptNative) GetField3() int32 { + if m != nil && m.Field3 != nil { + return *m.Field3 + } + return 0 +} + +func (m *NinOptNative) GetField4() int64 { + if m != nil && m.Field4 != nil { + return *m.Field4 + } + return 0 +} + +func (m *NinOptNative) GetField5() uint32 { + if m != nil && m.Field5 != nil { + return *m.Field5 + } + return 0 +} + +func (m *NinOptNative) GetField6() uint64 { + if m != nil && m.Field6 != nil { + return *m.Field6 + } + return 0 +} + +func (m *NinOptNative) GetField7() int32 { + if m != nil && m.Field7 != nil { + return *m.Field7 + } + return 0 +} + +func (m *NinOptNative) GetField8() int64 { + if m != nil && m.Field8 != nil { + return *m.Field8 + } + return 0 +} + +func (m *NinOptNative) GetField9() uint32 { + if m != nil && m.Field9 != nil { + return *m.Field9 + } + return 0 +} + +func (m *NinOptNative) GetField10() int32 { + if m != nil && m.Field10 != nil { + return *m.Field10 + } + return 0 +} + +func (m *NinOptNative) GetField11() uint64 { + if m != nil && m.Field11 != nil { + return *m.Field11 + } + return 0 +} + +func (m *NinOptNative) GetField12() int64 { + if m != nil && m.Field12 != nil { + return *m.Field12 + } + return 0 +} + +func (m *NinOptNative) GetField13() bool { + if m != nil && m.Field13 != nil { + return *m.Field13 + } + return false +} + +func (m *NinOptNative) GetField14() string { + if m != nil && m.Field14 != nil { + return *m.Field14 + } + return "" +} + +func (m *NinOptNative) GetField15() []byte { + if m != nil { + return m.Field15 + } + return nil +} + +type NinOptStruct struct { + Field1 *float64 `protobuf:"fixed64,1,opt,name=Field1,json=field1" json:"Field1,omitempty"` + Field2 *float32 `protobuf:"fixed32,2,opt,name=Field2,json=field2" json:"Field2,omitempty"` + Field3 *NinOptNative `protobuf:"bytes,3,opt,name=Field3,json=field3" json:"Field3,omitempty"` + Field4 *NinOptNative `protobuf:"bytes,4,opt,name=Field4,json=field4" json:"Field4,omitempty"` + Field6 *uint64 `protobuf:"varint,6,opt,name=Field6,json=field6" json:"Field6,omitempty"` + Field7 *int32 `protobuf:"zigzag32,7,opt,name=Field7,json=field7" json:"Field7,omitempty"` + Field8 *NinOptNative `protobuf:"bytes,8,opt,name=Field8,json=field8" json:"Field8,omitempty"` + Field13 *bool `protobuf:"varint,13,opt,name=Field13,json=field13" json:"Field13,omitempty"` + Field14 *string `protobuf:"bytes,14,opt,name=Field14,json=field14" json:"Field14,omitempty"` + Field15 []byte `protobuf:"bytes,15,opt,name=Field15,json=field15" json:"Field15,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *NinOptStruct) Reset() { *m = NinOptStruct{} } +func (m *NinOptStruct) String() string { return proto.CompactTextString(m) } +func (*NinOptStruct) ProtoMessage() {} +func (*NinOptStruct) Descriptor() ([]byte, []int) { return fileDescriptorFuzz, []int{3} } + +func (m *NinOptStruct) GetField1() float64 { + if m != nil && m.Field1 != nil { + return *m.Field1 + } + return 0 +} + +func (m *NinOptStruct) GetField2() float32 { + if m != nil && m.Field2 != nil { + return *m.Field2 + } + return 0 +} + +func (m *NinOptStruct) GetField3() *NinOptNative { + if m != nil { + return m.Field3 + } + return nil +} + +func (m *NinOptStruct) GetField4() *NinOptNative { + if m != nil { + return m.Field4 + } + return nil +} + +func (m *NinOptStruct) GetField6() uint64 { + if m != nil && m.Field6 != nil { + return *m.Field6 + } + return 0 +} + +func (m *NinOptStruct) GetField7() int32 { + if m != nil && m.Field7 != nil { + return *m.Field7 + } + return 0 +} + +func (m *NinOptStruct) GetField8() *NinOptNative { + if m != nil { + return m.Field8 + } + return nil +} + +func (m *NinOptStruct) GetField13() bool { + if m != nil && m.Field13 != nil { + return *m.Field13 + } + return false +} + +func (m *NinOptStruct) GetField14() string { + if m != nil && m.Field14 != nil { + return *m.Field14 + } + return "" +} + +func (m *NinOptStruct) GetField15() []byte { + if m != nil { + return m.Field15 + } + return nil +} + +func init() { + proto.RegisterType((*Nil)(nil), "fuzztests.Nil") + proto.RegisterType((*NinRepPackedNative)(nil), "fuzztests.NinRepPackedNative") + proto.RegisterType((*NinOptNative)(nil), "fuzztests.NinOptNative") + proto.RegisterType((*NinOptStruct)(nil), "fuzztests.NinOptStruct") +} +func (this *Nil) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 4) + s = append(s, "&fuzztests.Nil{") + 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 *NinRepPackedNative) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 17) + s = append(s, "&fuzztests.NinRepPackedNative{") + if this.Field1 != nil { + s = append(s, "Field1: "+fmt.Sprintf("%#v", this.Field1)+",\n") + } + if this.Field2 != nil { + s = append(s, "Field2: "+fmt.Sprintf("%#v", this.Field2)+",\n") + } + if this.Field3 != nil { + s = append(s, "Field3: "+fmt.Sprintf("%#v", this.Field3)+",\n") + } + if this.Field4 != nil { + s = append(s, "Field4: "+fmt.Sprintf("%#v", this.Field4)+",\n") + } + if this.Field5 != nil { + s = append(s, "Field5: "+fmt.Sprintf("%#v", this.Field5)+",\n") + } + if this.Field6 != nil { + s = append(s, "Field6: "+fmt.Sprintf("%#v", this.Field6)+",\n") + } + if this.Field7 != nil { + s = append(s, "Field7: "+fmt.Sprintf("%#v", this.Field7)+",\n") + } + if this.Field8 != nil { + s = append(s, "Field8: "+fmt.Sprintf("%#v", this.Field8)+",\n") + } + if this.Field9 != nil { + s = append(s, "Field9: "+fmt.Sprintf("%#v", this.Field9)+",\n") + } + if this.Field10 != nil { + s = append(s, "Field10: "+fmt.Sprintf("%#v", this.Field10)+",\n") + } + if this.Field11 != nil { + s = append(s, "Field11: "+fmt.Sprintf("%#v", this.Field11)+",\n") + } + if this.Field12 != nil { + s = append(s, "Field12: "+fmt.Sprintf("%#v", this.Field12)+",\n") + } + if this.Field13 != nil { + s = append(s, "Field13: "+fmt.Sprintf("%#v", this.Field13)+",\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 *NinOptNative) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 19) + s = append(s, "&fuzztests.NinOptNative{") + if this.Field1 != nil { + s = append(s, "Field1: "+valueToGoStringFuzz(this.Field1, "float64")+",\n") + } + if this.Field2 != nil { + s = append(s, "Field2: "+valueToGoStringFuzz(this.Field2, "float32")+",\n") + } + if this.Field3 != nil { + s = append(s, "Field3: "+valueToGoStringFuzz(this.Field3, "int32")+",\n") + } + if this.Field4 != nil { + s = append(s, "Field4: "+valueToGoStringFuzz(this.Field4, "int64")+",\n") + } + if this.Field5 != nil { + s = append(s, "Field5: "+valueToGoStringFuzz(this.Field5, "uint32")+",\n") + } + if this.Field6 != nil { + s = append(s, "Field6: "+valueToGoStringFuzz(this.Field6, "uint64")+",\n") + } + if this.Field7 != nil { + s = append(s, "Field7: "+valueToGoStringFuzz(this.Field7, "int32")+",\n") + } + if this.Field8 != nil { + s = append(s, "Field8: "+valueToGoStringFuzz(this.Field8, "int64")+",\n") + } + if this.Field9 != nil { + s = append(s, "Field9: "+valueToGoStringFuzz(this.Field9, "uint32")+",\n") + } + if this.Field10 != nil { + s = append(s, "Field10: "+valueToGoStringFuzz(this.Field10, "int32")+",\n") + } + if this.Field11 != nil { + s = append(s, "Field11: "+valueToGoStringFuzz(this.Field11, "uint64")+",\n") + } + if this.Field12 != nil { + s = append(s, "Field12: "+valueToGoStringFuzz(this.Field12, "int64")+",\n") + } + if this.Field13 != nil { + s = append(s, "Field13: "+valueToGoStringFuzz(this.Field13, "bool")+",\n") + } + if this.Field14 != nil { + s = append(s, "Field14: "+valueToGoStringFuzz(this.Field14, "string")+",\n") + } + if this.Field15 != nil { + s = append(s, "Field15: "+valueToGoStringFuzz(this.Field15, "byte")+",\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 *NinOptStruct) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 14) + s = append(s, "&fuzztests.NinOptStruct{") + if this.Field1 != nil { + s = append(s, "Field1: "+valueToGoStringFuzz(this.Field1, "float64")+",\n") + } + if this.Field2 != nil { + s = append(s, "Field2: "+valueToGoStringFuzz(this.Field2, "float32")+",\n") + } + if this.Field3 != nil { + s = append(s, "Field3: "+fmt.Sprintf("%#v", this.Field3)+",\n") + } + if this.Field4 != nil { + s = append(s, "Field4: "+fmt.Sprintf("%#v", this.Field4)+",\n") + } + if this.Field6 != nil { + s = append(s, "Field6: "+valueToGoStringFuzz(this.Field6, "uint64")+",\n") + } + if this.Field7 != nil { + s = append(s, "Field7: "+valueToGoStringFuzz(this.Field7, "int32")+",\n") + } + if this.Field8 != nil { + s = append(s, "Field8: "+fmt.Sprintf("%#v", this.Field8)+",\n") + } + if this.Field13 != nil { + s = append(s, "Field13: "+valueToGoStringFuzz(this.Field13, "bool")+",\n") + } + if this.Field14 != nil { + s = append(s, "Field14: "+valueToGoStringFuzz(this.Field14, "string")+",\n") + } + if this.Field15 != nil { + s = append(s, "Field15: "+valueToGoStringFuzz(this.Field15, "byte")+",\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 valueToGoStringFuzz(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 extensionToGoStringFuzz(e map[int32]github_com_gogo_protobuf_proto.Extension) string { + if e == nil { + return "nil" + } + s := "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 +} +func (m *Nil) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *Nil) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.XXX_unrecognized != nil { + i += copy(data[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *NinRepPackedNative) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *NinRepPackedNative) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Field1) > 0 { + data[i] = 0xa + i++ + i = encodeVarintFuzz(data, i, uint64(len(m.Field1)*8)) + for _, num := range m.Field1 { + f1 := math.Float64bits(float64(num)) + data[i] = uint8(f1) + i++ + data[i] = uint8(f1 >> 8) + i++ + data[i] = uint8(f1 >> 16) + i++ + data[i] = uint8(f1 >> 24) + i++ + data[i] = uint8(f1 >> 32) + i++ + data[i] = uint8(f1 >> 40) + i++ + data[i] = uint8(f1 >> 48) + i++ + data[i] = uint8(f1 >> 56) + i++ + } + } + if len(m.Field2) > 0 { + data[i] = 0x12 + i++ + i = encodeVarintFuzz(data, i, uint64(len(m.Field2)*4)) + for _, num := range m.Field2 { + f2 := math.Float32bits(float32(num)) + data[i] = uint8(f2) + i++ + data[i] = uint8(f2 >> 8) + i++ + data[i] = uint8(f2 >> 16) + i++ + data[i] = uint8(f2 >> 24) + i++ + } + } + if len(m.Field3) > 0 { + data4 := make([]byte, len(m.Field3)*10) + var j3 int + for _, num1 := range m.Field3 { + num := uint64(num1) + for num >= 1<<7 { + data4[j3] = uint8(uint64(num)&0x7f | 0x80) + num >>= 7 + j3++ + } + data4[j3] = uint8(num) + j3++ + } + data[i] = 0x1a + i++ + i = encodeVarintFuzz(data, i, uint64(j3)) + i += copy(data[i:], data4[:j3]) + } + if len(m.Field4) > 0 { + data6 := make([]byte, len(m.Field4)*10) + var j5 int + for _, num1 := range m.Field4 { + num := uint64(num1) + for num >= 1<<7 { + data6[j5] = uint8(uint64(num)&0x7f | 0x80) + num >>= 7 + j5++ + } + data6[j5] = uint8(num) + j5++ + } + data[i] = 0x22 + i++ + i = encodeVarintFuzz(data, i, uint64(j5)) + i += copy(data[i:], data6[:j5]) + } + if len(m.Field5) > 0 { + data8 := make([]byte, len(m.Field5)*10) + var j7 int + for _, num := range m.Field5 { + for num >= 1<<7 { + data8[j7] = uint8(uint64(num)&0x7f | 0x80) + num >>= 7 + j7++ + } + data8[j7] = uint8(num) + j7++ + } + data[i] = 0x2a + i++ + i = encodeVarintFuzz(data, i, uint64(j7)) + i += copy(data[i:], data8[:j7]) + } + if len(m.Field6) > 0 { + data10 := make([]byte, len(m.Field6)*10) + var j9 int + for _, num := range m.Field6 { + for num >= 1<<7 { + data10[j9] = uint8(uint64(num)&0x7f | 0x80) + num >>= 7 + j9++ + } + data10[j9] = uint8(num) + j9++ + } + data[i] = 0x32 + i++ + i = encodeVarintFuzz(data, i, uint64(j9)) + i += copy(data[i:], data10[:j9]) + } + if len(m.Field7) > 0 { + data11 := make([]byte, len(m.Field7)*5) + var j12 int + for _, num := range m.Field7 { + x13 := (uint32(num) << 1) ^ uint32((num >> 31)) + for x13 >= 1<<7 { + data11[j12] = uint8(uint64(x13)&0x7f | 0x80) + j12++ + x13 >>= 7 + } + data11[j12] = uint8(x13) + j12++ + } + data[i] = 0x3a + i++ + i = encodeVarintFuzz(data, i, uint64(j12)) + i += copy(data[i:], data11[:j12]) + } + if len(m.Field8) > 0 { + var j14 int + data16 := make([]byte, len(m.Field8)*10) + for _, num := range m.Field8 { + x15 := (uint64(num) << 1) ^ uint64((num >> 63)) + for x15 >= 1<<7 { + data16[j14] = uint8(uint64(x15)&0x7f | 0x80) + j14++ + x15 >>= 7 + } + data16[j14] = uint8(x15) + j14++ + } + data[i] = 0x42 + i++ + i = encodeVarintFuzz(data, i, uint64(j14)) + i += copy(data[i:], data16[:j14]) + } + if len(m.Field9) > 0 { + data[i] = 0x4a + i++ + i = encodeVarintFuzz(data, i, uint64(len(m.Field9)*4)) + for _, num := range m.Field9 { + data[i] = uint8(num) + i++ + data[i] = uint8(num >> 8) + i++ + data[i] = uint8(num >> 16) + i++ + data[i] = uint8(num >> 24) + i++ + } + } + if len(m.Field10) > 0 { + data[i] = 0x52 + i++ + i = encodeVarintFuzz(data, i, uint64(len(m.Field10)*4)) + for _, num := range m.Field10 { + data[i] = uint8(num) + i++ + data[i] = uint8(num >> 8) + i++ + data[i] = uint8(num >> 16) + i++ + data[i] = uint8(num >> 24) + i++ + } + } + if len(m.Field11) > 0 { + data[i] = 0x5a + i++ + i = encodeVarintFuzz(data, i, uint64(len(m.Field11)*8)) + for _, num := range m.Field11 { + data[i] = uint8(num) + i++ + data[i] = uint8(num >> 8) + i++ + data[i] = uint8(num >> 16) + i++ + data[i] = uint8(num >> 24) + i++ + data[i] = uint8(num >> 32) + i++ + data[i] = uint8(num >> 40) + i++ + data[i] = uint8(num >> 48) + i++ + data[i] = uint8(num >> 56) + i++ + } + } + if len(m.Field12) > 0 { + data[i] = 0x62 + i++ + i = encodeVarintFuzz(data, i, uint64(len(m.Field12)*8)) + for _, num := range m.Field12 { + data[i] = uint8(num) + i++ + data[i] = uint8(num >> 8) + i++ + data[i] = uint8(num >> 16) + i++ + data[i] = uint8(num >> 24) + i++ + data[i] = uint8(num >> 32) + i++ + data[i] = uint8(num >> 40) + i++ + data[i] = uint8(num >> 48) + i++ + data[i] = uint8(num >> 56) + i++ + } + } + if len(m.Field13) > 0 { + data[i] = 0x6a + i++ + i = encodeVarintFuzz(data, i, uint64(len(m.Field13))) + for _, b := range m.Field13 { + if b { + data[i] = 1 + } else { + data[i] = 0 + } + i++ + } + } + if m.XXX_unrecognized != nil { + i += copy(data[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *NinOptNative) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *NinOptNative) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Field1 != nil { + data[i] = 0x9 + i++ + i = encodeFixed64Fuzz(data, i, uint64(math.Float64bits(float64(*m.Field1)))) + } + if m.Field2 != nil { + data[i] = 0x15 + i++ + i = encodeFixed32Fuzz(data, i, uint32(math.Float32bits(float32(*m.Field2)))) + } + if m.Field3 != nil { + data[i] = 0x18 + i++ + i = encodeVarintFuzz(data, i, uint64(*m.Field3)) + } + if m.Field4 != nil { + data[i] = 0x20 + i++ + i = encodeVarintFuzz(data, i, uint64(*m.Field4)) + } + if m.Field5 != nil { + data[i] = 0x28 + i++ + i = encodeVarintFuzz(data, i, uint64(*m.Field5)) + } + if m.Field6 != nil { + data[i] = 0x30 + i++ + i = encodeVarintFuzz(data, i, uint64(*m.Field6)) + } + if m.Field7 != nil { + data[i] = 0x38 + i++ + i = encodeVarintFuzz(data, i, uint64((uint32(*m.Field7)<<1)^uint32((*m.Field7>>31)))) + } + if m.Field8 != nil { + data[i] = 0x40 + i++ + i = encodeVarintFuzz(data, i, uint64((uint64(*m.Field8)<<1)^uint64((*m.Field8>>63)))) + } + if m.Field9 != nil { + data[i] = 0x4d + i++ + i = encodeFixed32Fuzz(data, i, uint32(*m.Field9)) + } + if m.Field10 != nil { + data[i] = 0x55 + i++ + i = encodeFixed32Fuzz(data, i, uint32(*m.Field10)) + } + if m.Field11 != nil { + data[i] = 0x59 + i++ + i = encodeFixed64Fuzz(data, i, uint64(*m.Field11)) + } + if m.Field12 != nil { + data[i] = 0x61 + i++ + i = encodeFixed64Fuzz(data, i, uint64(*m.Field12)) + } + if m.Field13 != nil { + data[i] = 0x68 + i++ + if *m.Field13 { + data[i] = 1 + } else { + data[i] = 0 + } + i++ + } + if m.Field14 != nil { + data[i] = 0x72 + i++ + i = encodeVarintFuzz(data, i, uint64(len(*m.Field14))) + i += copy(data[i:], *m.Field14) + } + if m.Field15 != nil { + data[i] = 0x7a + i++ + i = encodeVarintFuzz(data, i, uint64(len(m.Field15))) + i += copy(data[i:], m.Field15) + } + if m.XXX_unrecognized != nil { + i += copy(data[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *NinOptStruct) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *NinOptStruct) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Field1 != nil { + data[i] = 0x9 + i++ + i = encodeFixed64Fuzz(data, i, uint64(math.Float64bits(float64(*m.Field1)))) + } + if m.Field2 != nil { + data[i] = 0x15 + i++ + i = encodeFixed32Fuzz(data, i, uint32(math.Float32bits(float32(*m.Field2)))) + } + if m.Field3 != nil { + data[i] = 0x1a + i++ + i = encodeVarintFuzz(data, i, uint64(m.Field3.Size())) + n17, err := m.Field3.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n17 + } + if m.Field4 != nil { + data[i] = 0x22 + i++ + i = encodeVarintFuzz(data, i, uint64(m.Field4.Size())) + n18, err := m.Field4.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n18 + } + if m.Field6 != nil { + data[i] = 0x30 + i++ + i = encodeVarintFuzz(data, i, uint64(*m.Field6)) + } + if m.Field7 != nil { + data[i] = 0x38 + i++ + i = encodeVarintFuzz(data, i, uint64((uint32(*m.Field7)<<1)^uint32((*m.Field7>>31)))) + } + if m.Field8 != nil { + data[i] = 0x42 + i++ + i = encodeVarintFuzz(data, i, uint64(m.Field8.Size())) + n19, err := m.Field8.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n19 + } + if m.Field13 != nil { + data[i] = 0x68 + i++ + if *m.Field13 { + data[i] = 1 + } else { + data[i] = 0 + } + i++ + } + if m.Field14 != nil { + data[i] = 0x72 + i++ + i = encodeVarintFuzz(data, i, uint64(len(*m.Field14))) + i += copy(data[i:], *m.Field14) + } + if m.Field15 != nil { + data[i] = 0x7a + i++ + i = encodeVarintFuzz(data, i, uint64(len(m.Field15))) + i += copy(data[i:], m.Field15) + } + if m.XXX_unrecognized != nil { + i += copy(data[i:], m.XXX_unrecognized) + } + return i, nil +} + +func encodeFixed64Fuzz(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 encodeFixed32Fuzz(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 encodeVarintFuzz(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 (m *Nil) Size() (n int) { + var l int + _ = l + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NinRepPackedNative) Size() (n int) { + var l int + _ = l + if len(m.Field1) > 0 { + n += 1 + sovFuzz(uint64(len(m.Field1)*8)) + len(m.Field1)*8 + } + if len(m.Field2) > 0 { + n += 1 + sovFuzz(uint64(len(m.Field2)*4)) + len(m.Field2)*4 + } + if len(m.Field3) > 0 { + l = 0 + for _, e := range m.Field3 { + l += sovFuzz(uint64(e)) + } + n += 1 + sovFuzz(uint64(l)) + l + } + if len(m.Field4) > 0 { + l = 0 + for _, e := range m.Field4 { + l += sovFuzz(uint64(e)) + } + n += 1 + sovFuzz(uint64(l)) + l + } + if len(m.Field5) > 0 { + l = 0 + for _, e := range m.Field5 { + l += sovFuzz(uint64(e)) + } + n += 1 + sovFuzz(uint64(l)) + l + } + if len(m.Field6) > 0 { + l = 0 + for _, e := range m.Field6 { + l += sovFuzz(uint64(e)) + } + n += 1 + sovFuzz(uint64(l)) + l + } + if len(m.Field7) > 0 { + l = 0 + for _, e := range m.Field7 { + l += sozFuzz(uint64(e)) + } + n += 1 + sovFuzz(uint64(l)) + l + } + if len(m.Field8) > 0 { + l = 0 + for _, e := range m.Field8 { + l += sozFuzz(uint64(e)) + } + n += 1 + sovFuzz(uint64(l)) + l + } + if len(m.Field9) > 0 { + n += 1 + sovFuzz(uint64(len(m.Field9)*4)) + len(m.Field9)*4 + } + if len(m.Field10) > 0 { + n += 1 + sovFuzz(uint64(len(m.Field10)*4)) + len(m.Field10)*4 + } + if len(m.Field11) > 0 { + n += 1 + sovFuzz(uint64(len(m.Field11)*8)) + len(m.Field11)*8 + } + if len(m.Field12) > 0 { + n += 1 + sovFuzz(uint64(len(m.Field12)*8)) + len(m.Field12)*8 + } + if len(m.Field13) > 0 { + n += 1 + sovFuzz(uint64(len(m.Field13))) + len(m.Field13)*1 + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NinOptNative) Size() (n int) { + var l int + _ = l + if m.Field1 != nil { + n += 9 + } + if m.Field2 != nil { + n += 5 + } + if m.Field3 != nil { + n += 1 + sovFuzz(uint64(*m.Field3)) + } + if m.Field4 != nil { + n += 1 + sovFuzz(uint64(*m.Field4)) + } + if m.Field5 != nil { + n += 1 + sovFuzz(uint64(*m.Field5)) + } + if m.Field6 != nil { + n += 1 + sovFuzz(uint64(*m.Field6)) + } + if m.Field7 != nil { + n += 1 + sozFuzz(uint64(*m.Field7)) + } + if m.Field8 != nil { + n += 1 + sozFuzz(uint64(*m.Field8)) + } + if m.Field9 != nil { + n += 5 + } + if m.Field10 != nil { + n += 5 + } + if m.Field11 != nil { + n += 9 + } + if m.Field12 != nil { + n += 9 + } + if m.Field13 != nil { + n += 2 + } + if m.Field14 != nil { + l = len(*m.Field14) + n += 1 + l + sovFuzz(uint64(l)) + } + if m.Field15 != nil { + l = len(m.Field15) + n += 1 + l + sovFuzz(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NinOptStruct) Size() (n int) { + var l int + _ = l + if m.Field1 != nil { + n += 9 + } + if m.Field2 != nil { + n += 5 + } + if m.Field3 != nil { + l = m.Field3.Size() + n += 1 + l + sovFuzz(uint64(l)) + } + if m.Field4 != nil { + l = m.Field4.Size() + n += 1 + l + sovFuzz(uint64(l)) + } + if m.Field6 != nil { + n += 1 + sovFuzz(uint64(*m.Field6)) + } + if m.Field7 != nil { + n += 1 + sozFuzz(uint64(*m.Field7)) + } + if m.Field8 != nil { + l = m.Field8.Size() + n += 1 + l + sovFuzz(uint64(l)) + } + if m.Field13 != nil { + n += 2 + } + if m.Field14 != nil { + l = len(*m.Field14) + n += 1 + l + sovFuzz(uint64(l)) + } + if m.Field15 != nil { + l = len(m.Field15) + n += 1 + l + sovFuzz(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func sovFuzz(x uint64) (n int) { + for { + n++ + x >>= 7 + if x == 0 { + break + } + } + return n +} +func sozFuzz(x uint64) (n int) { + return sovFuzz(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *Nil) 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 ErrIntOverflowFuzz + } + 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: Nil: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Nil: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipFuzz(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthFuzz + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *NinRepPackedNative) 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 ErrIntOverflowFuzz + } + 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: NinRepPackedNative: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: NinRepPackedNative: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowFuzz + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthFuzz + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + for iNdEx < postIndex { + 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.Field1 = append(m.Field1, v2) + } + } else if wireType == 1 { + 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.Field1 = append(m.Field1, v2) + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) + } + case 2: + if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowFuzz + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthFuzz + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + for iNdEx < postIndex { + var v uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + iNdEx += 4 + v = uint32(data[iNdEx-4]) + v |= uint32(data[iNdEx-3]) << 8 + v |= uint32(data[iNdEx-2]) << 16 + v |= uint32(data[iNdEx-1]) << 24 + v2 := float32(math.Float32frombits(v)) + m.Field2 = append(m.Field2, v2) + } + } else if wireType == 5 { + var v uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + iNdEx += 4 + v = uint32(data[iNdEx-4]) + v |= uint32(data[iNdEx-3]) << 8 + v |= uint32(data[iNdEx-2]) << 16 + v |= uint32(data[iNdEx-1]) << 24 + v2 := float32(math.Float32frombits(v)) + m.Field2 = append(m.Field2, v2) + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType) + } + case 3: + if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowFuzz + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthFuzz + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + for iNdEx < postIndex { + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowFuzz + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field3 = append(m.Field3, v) + } + } else if wireType == 0 { + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowFuzz + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field3 = append(m.Field3, v) + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field3", wireType) + } + case 4: + if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowFuzz + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthFuzz + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + for iNdEx < postIndex { + var v int64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowFuzz + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field4 = append(m.Field4, v) + } + } else if wireType == 0 { + var v int64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowFuzz + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field4 = append(m.Field4, v) + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field4", wireType) + } + case 5: + if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowFuzz + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthFuzz + } + 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 ErrIntOverflowFuzz + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (uint32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field5 = append(m.Field5, v) + } + } else if wireType == 0 { + var v uint32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowFuzz + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (uint32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field5 = append(m.Field5, v) + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field5", wireType) + } + case 6: + if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowFuzz + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthFuzz + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + for iNdEx < postIndex { + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowFuzz + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field6 = append(m.Field6, v) + } + } else if wireType == 0 { + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowFuzz + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field6 = append(m.Field6, v) + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field6", wireType) + } + case 7: + if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowFuzz + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthFuzz + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + for iNdEx < postIndex { + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowFuzz + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + v = int32((uint32(v) >> 1) ^ uint32(((v&1)<<31)>>31)) + m.Field7 = append(m.Field7, v) + } + } else if wireType == 0 { + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowFuzz + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + v = int32((uint32(v) >> 1) ^ uint32(((v&1)<<31)>>31)) + m.Field7 = append(m.Field7, v) + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field7", wireType) + } + case 8: + if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowFuzz + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthFuzz + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + for iNdEx < postIndex { + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowFuzz + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + v = (v >> 1) ^ uint64((int64(v&1)<<63)>>63) + m.Field8 = append(m.Field8, int64(v)) + } + } else if wireType == 0 { + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowFuzz + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + v = (v >> 1) ^ uint64((int64(v&1)<<63)>>63) + m.Field8 = append(m.Field8, int64(v)) + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field8", wireType) + } + case 9: + if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowFuzz + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthFuzz + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + for iNdEx < postIndex { + var v uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + iNdEx += 4 + v = uint32(data[iNdEx-4]) + v |= uint32(data[iNdEx-3]) << 8 + v |= uint32(data[iNdEx-2]) << 16 + v |= uint32(data[iNdEx-1]) << 24 + m.Field9 = append(m.Field9, v) + } + } else if wireType == 5 { + var v uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + iNdEx += 4 + v = uint32(data[iNdEx-4]) + v |= uint32(data[iNdEx-3]) << 8 + v |= uint32(data[iNdEx-2]) << 16 + v |= uint32(data[iNdEx-1]) << 24 + m.Field9 = append(m.Field9, v) + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field9", wireType) + } + case 10: + if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowFuzz + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthFuzz + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + for iNdEx < postIndex { + var v int32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + iNdEx += 4 + v = int32(data[iNdEx-4]) + v |= int32(data[iNdEx-3]) << 8 + v |= int32(data[iNdEx-2]) << 16 + v |= int32(data[iNdEx-1]) << 24 + m.Field10 = append(m.Field10, v) + } + } else if wireType == 5 { + var v int32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + iNdEx += 4 + v = int32(data[iNdEx-4]) + v |= int32(data[iNdEx-3]) << 8 + v |= int32(data[iNdEx-2]) << 16 + v |= int32(data[iNdEx-1]) << 24 + m.Field10 = append(m.Field10, v) + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field10", wireType) + } + case 11: + if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowFuzz + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthFuzz + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + for iNdEx < postIndex { + 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.Field11 = append(m.Field11, v) + } + } else if wireType == 1 { + 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.Field11 = append(m.Field11, v) + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field11", wireType) + } + case 12: + if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowFuzz + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthFuzz + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + for iNdEx < postIndex { + var v int64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + iNdEx += 8 + v = int64(data[iNdEx-8]) + v |= int64(data[iNdEx-7]) << 8 + v |= int64(data[iNdEx-6]) << 16 + v |= int64(data[iNdEx-5]) << 24 + v |= int64(data[iNdEx-4]) << 32 + v |= int64(data[iNdEx-3]) << 40 + v |= int64(data[iNdEx-2]) << 48 + v |= int64(data[iNdEx-1]) << 56 + m.Field12 = append(m.Field12, v) + } + } else if wireType == 1 { + var v int64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + iNdEx += 8 + v = int64(data[iNdEx-8]) + v |= int64(data[iNdEx-7]) << 8 + v |= int64(data[iNdEx-6]) << 16 + v |= int64(data[iNdEx-5]) << 24 + v |= int64(data[iNdEx-4]) << 32 + v |= int64(data[iNdEx-3]) << 40 + v |= int64(data[iNdEx-2]) << 48 + v |= int64(data[iNdEx-1]) << 56 + m.Field12 = append(m.Field12, v) + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field12", wireType) + } + case 13: + if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowFuzz + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthFuzz + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + for iNdEx < postIndex { + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowFuzz + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field13 = append(m.Field13, bool(v != 0)) + } + } else if wireType == 0 { + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowFuzz + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field13 = append(m.Field13, bool(v != 0)) + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field13", wireType) + } + default: + iNdEx = preIndex + skippy, err := skipFuzz(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthFuzz + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *NinOptNative) 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 ErrIntOverflowFuzz + } + 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: NinOptNative: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: NinOptNative: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field Field1", 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.Field1 = &v2 + case 2: + if wireType != 5 { + return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType) + } + var v uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + iNdEx += 4 + v = uint32(data[iNdEx-4]) + v |= uint32(data[iNdEx-3]) << 8 + v |= uint32(data[iNdEx-2]) << 16 + v |= uint32(data[iNdEx-1]) << 24 + v2 := float32(math.Float32frombits(v)) + m.Field2 = &v2 + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field3", wireType) + } + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowFuzz + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field3 = &v + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field4", wireType) + } + var v int64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowFuzz + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field4 = &v + case 5: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field5", wireType) + } + var v uint32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowFuzz + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (uint32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field5 = &v + case 6: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field6", wireType) + } + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowFuzz + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field6 = &v + case 7: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field7", wireType) + } + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowFuzz + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + v = int32((uint32(v) >> 1) ^ uint32(((v&1)<<31)>>31)) + m.Field7 = &v + case 8: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field8", wireType) + } + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowFuzz + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + v = (v >> 1) ^ uint64((int64(v&1)<<63)>>63) + v2 := int64(v) + m.Field8 = &v2 + case 9: + if wireType != 5 { + return fmt.Errorf("proto: wrong wireType = %d for field Field9", wireType) + } + var v uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + iNdEx += 4 + v = uint32(data[iNdEx-4]) + v |= uint32(data[iNdEx-3]) << 8 + v |= uint32(data[iNdEx-2]) << 16 + v |= uint32(data[iNdEx-1]) << 24 + m.Field9 = &v + case 10: + if wireType != 5 { + return fmt.Errorf("proto: wrong wireType = %d for field Field10", wireType) + } + var v int32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + iNdEx += 4 + v = int32(data[iNdEx-4]) + v |= int32(data[iNdEx-3]) << 8 + v |= int32(data[iNdEx-2]) << 16 + v |= int32(data[iNdEx-1]) << 24 + m.Field10 = &v + case 11: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field Field11", 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.Field11 = &v + case 12: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field Field12", wireType) + } + var v int64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + iNdEx += 8 + v = int64(data[iNdEx-8]) + v |= int64(data[iNdEx-7]) << 8 + v |= int64(data[iNdEx-6]) << 16 + v |= int64(data[iNdEx-5]) << 24 + v |= int64(data[iNdEx-4]) << 32 + v |= int64(data[iNdEx-3]) << 40 + v |= int64(data[iNdEx-2]) << 48 + v |= int64(data[iNdEx-1]) << 56 + m.Field12 = &v + case 13: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field13", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowFuzz + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + b := bool(v != 0) + m.Field13 = &b + case 14: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field14", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowFuzz + } + 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 ErrInvalidLengthFuzz + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + s := string(data[iNdEx:postIndex]) + m.Field14 = &s + iNdEx = postIndex + case 15: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field15", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowFuzz + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthFuzz + } + postIndex := iNdEx + byteLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Field15 = append(m.Field15[:0], data[iNdEx:postIndex]...) + if m.Field15 == nil { + m.Field15 = []byte{} + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipFuzz(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthFuzz + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *NinOptStruct) 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 ErrIntOverflowFuzz + } + 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: NinOptStruct: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: NinOptStruct: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field Field1", 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.Field1 = &v2 + case 2: + if wireType != 5 { + return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType) + } + var v uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + iNdEx += 4 + v = uint32(data[iNdEx-4]) + v |= uint32(data[iNdEx-3]) << 8 + v |= uint32(data[iNdEx-2]) << 16 + v |= uint32(data[iNdEx-1]) << 24 + v2 := float32(math.Float32frombits(v)) + m.Field2 = &v2 + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field3", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowFuzz + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthFuzz + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Field3 == nil { + m.Field3 = &NinOptNative{} + } + if err := m.Field3.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field4", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowFuzz + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthFuzz + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Field4 == nil { + m.Field4 = &NinOptNative{} + } + if err := m.Field4.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 6: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field6", wireType) + } + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowFuzz + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field6 = &v + case 7: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field7", wireType) + } + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowFuzz + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + v = int32((uint32(v) >> 1) ^ uint32(((v&1)<<31)>>31)) + m.Field7 = &v + case 8: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field8", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowFuzz + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthFuzz + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Field8 == nil { + m.Field8 = &NinOptNative{} + } + if err := m.Field8.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 13: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field13", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowFuzz + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + b := bool(v != 0) + m.Field13 = &b + case 14: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field14", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowFuzz + } + 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 ErrInvalidLengthFuzz + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + s := string(data[iNdEx:postIndex]) + m.Field14 = &s + iNdEx = postIndex + case 15: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field15", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowFuzz + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthFuzz + } + postIndex := iNdEx + byteLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Field15 = append(m.Field15[:0], data[iNdEx:postIndex]...) + if m.Field15 == nil { + m.Field15 = []byte{} + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipFuzz(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthFuzz + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipFuzz(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, ErrIntOverflowFuzz + } + 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, ErrIntOverflowFuzz + } + 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, ErrIntOverflowFuzz + } + 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, ErrInvalidLengthFuzz + } + return iNdEx, nil + case 3: + for { + var innerWire uint64 + var start int = iNdEx + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowFuzz + } + 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 := skipFuzz(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 ( + ErrInvalidLengthFuzz = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowFuzz = fmt.Errorf("proto: integer overflow") +) + +var fileDescriptorFuzz = []byte{ + // 439 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xac, 0xd3, 0xbf, 0x6e, 0xd3, 0x50, + 0x14, 0xc7, 0x71, 0x1d, 0x3b, 0xb1, 0x93, 0xdb, 0x84, 0xa4, 0x1e, 0x2e, 0x47, 0x15, 0xaa, 0x50, + 0xa6, 0xbb, 0x60, 0x37, 0xfe, 0xd3, 0xa6, 0x6b, 0x07, 0xc6, 0x80, 0xca, 0x13, 0xb4, 0xa9, 0x13, + 0x2c, 0x0a, 0x8e, 0xda, 0x6b, 0x86, 0x8e, 0x4c, 0x3c, 0x1a, 0x1b, 0x3c, 0x02, 0xf0, 0x04, 0x3c, + 0x02, 0x07, 0x87, 0x9c, 0x7b, 0x32, 0x55, 0x91, 0x3a, 0x58, 0xb2, 0xf3, 0x89, 0x15, 0xdd, 0xef, + 0x4f, 0x51, 0x6a, 0xd9, 0x3c, 0x3c, 0xc4, 0xeb, 0xbb, 0xda, 0xd6, 0x51, 0xff, 0xdf, 0xbd, 0x2d, + 0xef, 0xed, 0xfd, 0xd1, 0xab, 0x55, 0x65, 0xdf, 0x37, 0xd7, 0xf1, 0xa2, 0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98, 0x2e, 0x87, 0xd7, 0x22, 0x3c, 0x18, 0x9f, 0xa3, 0x6b, 0x11, 0x1d, 0xcc, 0x90, + 0x83, 0x6b, 0x11, 0x1c, 0x4c, 0x87, 0x63, 0x6b, 0x11, 0x1b, 0xcc, 0x21, 0x87, 0xd6, 0x22, 0x34, + 0x98, 0x88, 0x23, 0x6b, 0x11, 0x19, 0x4c, 0xc8, 0x81, 0x51, 0x06, 0x06, 0x33, 0x72, 0x71, 0x51, + 0xc6, 0x05, 0x13, 0xb8, 0xb0, 0x28, 0xc3, 0x82, 0x19, 0xbb, 0xa8, 0x28, 0xa3, 0x82, 0xe9, 0x71, + 0x50, 0x27, 0x39, 0x3e, 0x23, 0xe9, 0x6f, 0x25, 0x77, 0x52, 0xe0, 0x88, 0x64, 0xb0, 0x95, 0x62, + 0xf2, 0xdd, 0xdb, 0x8e, 0xf0, 0xce, 0xde, 0x35, 0x0b, 0xbb, 0xf7, 0x08, 0xc9, 0xce, 0x08, 0x07, + 0xe9, 0xf3, 0x98, 0xff, 0xa2, 0xb1, 0x5c, 0x97, 0xd7, 0x49, 0x76, 0xd6, 0x79, 0xf4, 0x85, 0x7c, + 0xef, 0x79, 0x92, 0x9d, 0x79, 0x1e, 0xfd, 0x81, 0xd9, 0xd3, 0x16, 0xbd, 0x18, 0xff, 0xf9, 0x75, + 0x0c, 0xdf, 0x7e, 0x1f, 0xc3, 0x0f, 0xba, 0x7e, 0xd2, 0xf5, 0x37, 0x00, 0x00, 0xff, 0xff, 0xce, + 0xa6, 0x95, 0x94, 0xc1, 0x04, 0x00, 0x00, +} diff --git a/vendor/github.com/gogo/protobuf/test/fuzztests/fuzz.proto b/vendor/github.com/gogo/protobuf/test/fuzztests/fuzz.proto new file mode 100644 index 000000000..9002ab712 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/fuzztests/fuzz.proto @@ -0,0 +1,84 @@ +// Copyright (c) 2015, Vastech SA (PTY) LTD. All rights reserved. +// http://github.com/gogo/protobuf/gogoproto +// +// 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 fuzztests; + +import "github.com/gogo/protobuf/gogoproto/gogo.proto"; + +option (gogoproto.gostring_all) = true; + +message Nil { + +} + +message NinRepPackedNative { + repeated double Field1 = 1 [packed = true]; + repeated float Field2 = 2 [packed = true]; + repeated int32 Field3 = 3 [packed = true]; + repeated int64 Field4 = 4 [packed = true]; + repeated uint32 Field5 = 5 [packed = true]; + repeated uint64 Field6 = 6 [packed = true]; + repeated sint32 Field7 = 7 [packed = true]; + repeated sint64 Field8 = 8 [packed = true]; + repeated fixed32 Field9 = 9 [packed = true]; + repeated sfixed32 Field10 = 10 [packed = true]; + repeated fixed64 Field11 = 11 [packed = true]; + repeated sfixed64 Field12 = 12 [packed = true]; + repeated bool Field13 = 13 [packed = true]; +} + +message NinOptNative { + optional double Field1 = 1; + optional float Field2 = 2; + optional int32 Field3 = 3; + optional int64 Field4 = 4; + optional uint32 Field5 = 5; + optional uint64 Field6 = 6; + optional sint32 Field7 = 7; + optional sint64 Field8 = 8; + optional fixed32 Field9 = 9; + optional sfixed32 Field10 = 10; + optional fixed64 Field11 = 11; + optional sfixed64 Field12 = 12; + optional bool Field13 = 13; + optional string Field14 = 14; + optional bytes Field15 = 15; +} + +message NinOptStruct { + optional double Field1 = 1; + optional float Field2 = 2; + optional NinOptNative Field3 = 3; + optional NinOptNative Field4 = 4; + optional uint64 Field6 = 6; + optional sint32 Field7 = 7; + optional NinOptNative Field8 = 8; + optional bool Field13 = 13; + optional string Field14 = 14; + optional bytes Field15 = 15; +} diff --git a/vendor/github.com/gogo/protobuf/test/fuzztests/fuzz_test.go b/vendor/github.com/gogo/protobuf/test/fuzztests/fuzz_test.go new file mode 100644 index 000000000..5308e7f62 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/fuzztests/fuzz_test.go @@ -0,0 +1,134 @@ +// Copyright (c) 2015, Vastech SA (PTY) LTD. All rights reserved. +// http://github.com/gogo/protobuf/gogoproto +// +// 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 fuzztests + +import ( + "github.com/gogo/protobuf/proto" + "testing" +) + +func TestFuzzUnrecognized(t *testing.T) { + msg := &Nil{} + input := []byte{0x8, 0xaf, 0x81, 0xc9, 0xb3, 0x97, 0xd1, 0xb5, 0xc2, 0x4f, 0x1a, 0x4a, 0x52, 0x48, 0x4e, 0x44, 0x65, 0x51, 0x4b, 0x46, 0x44, 0x33, 0x5a, 0x44, 0x72, 0x38, 0x58, 0x4c, 0x58, 0x70, 0x59, 0x45, 0x71, 0x45, 0x4f, 0x6d, 0x45, 0x4d, 0x54, 0x59, 0x4c, 0x6b, 0x55, 0x7a, 0x6f, 0x6b, 0x5a, 0x69, 0x56, 0x64, 0x46, 0x45, 0x56, 0x4d, 0x70, 0x6a, 0x39, 0x7a, 0x4b, 0x43, 0x4d, 0x6d, 0x76, 0x63, 0x46, 0x4f, 0x31, 0x4a, 0x5a, 0x6b, 0x66, 0x4a, 0x75, 0x51, 0x38, 0x54, 0x54, 0x30, 0x53, 0x61, 0x36, 0x6e, 0x4f, 0x6b, 0x35, 0x54, 0x95, 0x0, 0x0, 0x0, 0x0, 0x12, 0x38, 0x52, 0x36, 0x66, 0x76, 0x41, 0x74, 0x73, 0x7a, 0x39, 0x43, 0x6a, 0x4f, 0x64, 0x59, 0x77, 0x33, 0x30, 0x36, 0x58, 0x75, 0x65, 0x46, 0x4b, 0x46, 0x55, 0x56, 0x71, 0x6d, 0x49, 0x73, 0x4a, 0x4b, 0x78, 0x76, 0x41, 0x65, 0x42, 0x61, 0x5a, 0x30, 0x41, 0x37, 0x45, 0x76, 0x72, 0x31, 0x30, 0x4e, 0x78, 0x6d, 0x33, 0x63, 0x65, 0x66, 0x6b, 0x30} + if err := proto.Unmarshal(input, msg); err == nil { + t.Fatal("expected error") + } +} + +func DisabledTestFuzzPackedIsNotIdempotent(t *testing.T) { + msg := &NinRepPackedNative{} + //original := []byte{0x9, 0xa3, 0xae, 0xab, 0xd2, 0xbe, 0x1c, 0xed, 0xbf, 0x15, 0x22, 0x1, 0x6e, 0x3f, 0x22, 0x81, 0x1, 0x9, 0x21, 0x84, 0x36, 0x21, 0x6a, 0xff, 0xd3, 0x3f, 0x15, 0x15, 0x71, 0x4b, 0xbd, 0x52, 0x70, 0x49, 0x6e, 0x48, 0x54, 0x6a, 0x61, 0x37, 0x63, 0x78, 0x47, 0x58, 0x31, 0x7a, 0x43, 0x4d, 0x7a, 0x48, 0x58, 0x56, 0xcb, 0x9c, 0x34, 0xdf, 0xc6, 0x3c, 0xa4, 0x33, 0xac, 0xba, 0xa7, 0xeb, 0x4, 0xa8, 0x8a, 0x48, 0x75, 0x67, 0x71, 0x31, 0x4a, 0x5b, 0xe1, 0xcf, 0x21, 0x88, 0xd3, 0xec, 0xac, 0x13, 0x28, 0xec, 0xa9, 0x51, 0xc8, 0xe9, 0x5e, 0xca, 0xbe, 0xea, 0x9c, 0x0, 0x6b, 0x44, 0x63, 0xc4, 0x32, 0xaa, 0x36, 0x4e, 0xfc, 0xbd, 0x7, 0xef, 0x5e, 0x47, 0x2, 0xfc, 0xd8, 0x83, 0x85, 0x9c, 0xca, 0x7c, 0xd2, 0xdb, 0xf5, 0x5d, 0xcc, 0x5a, 0x72, 0x1f, 0x66, 0x55, 0x74, 0x46, 0x47, 0x73, 0x75, 0x54, 0x30, 0x39, 0x53, 0x34, 0x4c, 0x61, 0x78, 0x59, 0x31, 0x51, 0x44, 0x30, 0x53, 0x51, 0x71, 0x44, 0x65, 0x6f, 0x53, 0x30, 0x44, 0x6a, 0x58, 0x7a, 0x1b, 0x65, 0x62, 0x9c, 0x95, 0xc5, 0x41, 0xcb, 0x48, 0xa, 0x47, 0xf6, 0xd8, 0xd2, 0xd5, 0x8d, 0x6, 0x69, 0x8f, 0xbe, 0x7c, 0xf3, 0xe9, 0x79, 0x3c, 0xca, 0x6, 0x5b} + input := []byte{0x9, 0xa3, 0xae, 0xab, 0xd2, 0xbe, 0x1c, 0xed, 0xbf, 0x15, 0x22, 0x1, 0x6e, 0x3f, 0x22, 0x81, 0x1, 0x9, 0x21, 0x84, 0x36, 0x21, 0x6a, 0xff, 0xd3, 0x3f, 0x15, 0x15, 0x71, 0x4b, 0xbd, 0x52, 0x70, 0x49, 0x6e, 0x48, 0x54, 0x6a, 0x61, 0x37, 0x63, 0x78, 0x47, 0x58, 0x31, 0x7a, 0x43, 0x4d, 0x7a, 0x48, 0x58, 0x56, 0xcb, 0x9c, 0x34, 0xdf, 0xc6, 0x3c, 0xa4, 0x33, 0xac, 0xba, 0xa7, 0xeb, 0x4, 0xa8, 0x8a, 0x48, 0x75, 0x67, 0x71, 0x31, 0x4a, 0x5b, 0xe1, 0xcf, 0x21, 0x88, 0xd3, 0xec, 0xac, 0x13, 0x28, 0xec, 0xa9, 0x51, 0xc8, 0xe9, 0x5e, 0xca, 0xbe, 0xea, 0x9c, 0x0, 0x6b, 0x44, 0x63, 0xc4, 0x32, 0xaa, 0x36, 0x4e, 0xfc, 0xbd, 0x7, 0xef, 0x5e, 0x47, 0x2, 0xfc, 0xd8, 0x83, 0x85, 0x9c, 0xca, 0x7c, 0xd2, 0xdb, 0xf5, 0x5d, 0xcc, 0x5a, 0x72, 0x1f, 0x66, 0x55, 0x74, 0x46, 0x47, 0x73, 0x75, 0x54, 0x30, 0x39, 0x53, 0x34, 0x4c, 0x61, 0x78, 0x59, 0x31, 0x51, 0x44, 0x30, 0x53, 0x51} + if err := proto.Unmarshal(input, msg); err == nil { + t.Fatal("expected error") + } +} + +func DisabledTestFuzzFieldOrder(t *testing.T) { + msg := &NinOptStruct{} + input := []byte{0x52, 0x57, 0x52, 0x6a, 0x33, 0x56, 0x43, 0x76, 0x32, 0x54, 0x49, 0x4a, 0x55, 0x66, 0x39, 0x52, 0x32, 0x32, 0x73, 0x69, 0x4f, 0x67, 0x66, 0x79, 0x4b, 0x79, 0x5a, 0x55, 0x42, 0x53, 0x38, 0x68, 0x6c, 0x46, 0x79, 0x6b, 0x54, 0x43, 0x63, 0x66, 0x30, 0x6a, 0x33, 0x35, 0x33, 0x7a, 0x41, 0x66, 0x68, 0x57, 0x61, 0x78, 0x51, 0x37, 0x76, 0x52, 0x78, 0x34, 0x56, 0x43, 0x54, 0x31, 0x73, 0x6a, 0x77, 0x63, 0x45, 0x62, 0x62, 0x67, 0x34, 0x6f, 0x64, 0x35, 0x6c, 0x41, 0x45, 0x50, 0x64, 0x6f, 0x46, 0x38, 0x41, 0x4b, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30} + if err := proto.Unmarshal(input, msg); err != nil { + t.Fatal(err) + } +} + +func TestFuzzSint64Overflow(t *testing.T) { + msg := &NinOptNative{} + //original := []byte{0x9, 0x65, 0xb4, 0xfd, 0xbc, 0x5, 0xc7, 0xee, 0x3f, 0x15, 0x48, 0xec, 0x67, 0x3f, 0x18, 0xca, 0xa4, 0xe0, 0xa9, 0x5, 0x20, 0x8e, 0xb7, 0x9f, 0xf5, 0xcf, 0xe9, 0xea, 0xad, 0xfd, 0x1, 0x28, 0xc9, 0xf1, 0xbc, 0x88, 0xc, 0x30, 0xeb, 0x99, 0xbd, 0xa8, 0xe, 0x38, 0xc0, 0xd4, 0xb7, 0xba, 0x7, 0x40, 0xc8, 0xe4, 0xf6, 0xe2, 0xb8, 0xdd, 0xa7, 0xf2, 0x82, 0xba, 0x16, 0x9d, 0x59, 0xf9, 0x31, 0xe0, 0x99, 0x0, 0x0, 0x0, 0x0, 0x61, 0x59, 0x5b, 0xb5, 0x57, 0x56, 0x93, 0x70, 0xde, 0x68, 0x0, 0x72, 0x40, 0x64, 0x5a, 0x5a, 0x61, 0x57, 0x78, 0x68, 0x53, 0x65, 0x66, 0x67, 0x38, 0x38, 0x61, 0x48, 0x44, 0x32, 0x6c, 0x36, 0x50, 0x31, 0x4d, 0x43, 0x39, 0x31, 0x6d, 0x37, 0x34, 0x32, 0x48, 0x6b, 0x4d, 0x70, 0x31, 0x45, 0x73, 0x48, 0x71, 0x4a, 0x69, 0x37, 0x56, 0x53, 0x44, 0x6b, 0x48, 0x45, 0x50, 0x4b, 0x7a, 0x52, 0x49, 0x4c, 0x50, 0x69, 0x44, 0x72, 0x42, 0x56, 0x50, 0x78, 0x62, 0x56, 0x55, 0x7a, 0x5b, 0xb3, 0x6c, 0x59, 0x4c, 0xf1, 0x31, 0xeb, 0xb6, 0x25, 0x1a, 0x26, 0x67, 0x66, 0x97, 0x79, 0xb8, 0x37, 0x8, 0xe1, 0x32, 0x45, 0x6e, 0x6, 0x90, 0x4f, 0xde, 0x26, 0x7a, 0xc6, 0x29, 0x65, 0x4a, 0x69, 0xa7, 0x21, 0xfb, 0x42, 0xda, 0x43, 0x89, 0x27, 0x70, 0x71, 0xde, 0x66, 0xa4, 0x75, 0x2b, 0x5c, 0x96, 0x9f, 0x25, 0x3b, 0xc1, 0x64, 0x14, 0x4, 0x60, 0x8c, 0x58, 0x7e, 0xa1, 0x59, 0x7b, 0x47, 0x18, 0xc, 0x5b, 0x18, 0x63, 0x9, 0xb4, 0xc9, 0x7, 0xf9, 0xae, 0x33, 0xae, 0x2, 0x4a, 0x8b, 0x34, 0x92, 0x40, 0xb, 0xd7, 0x80, 0x60, 0xdb, 0x44, 0x5} + input := []byte{0x40, 0xc8, 0xe4, 0xf6, 0xe2, 0xb8, 0xdd, 0xa7, 0xf2, 0x82, 0xba, 0x16} + if err := proto.Unmarshal(input, msg); err != nil { + return + } +} + +func DisabledTestFuzzOverrideField(t *testing.T) { + msg := &NinOptNative{} + //original := []byte{0x9, 0x73, 0x78, 0x5a, 0xf2, 0xb4, 0x66, 0xe8, 0x3f, 0x15, 0x71, 0xdc, 0x4, 0x3f, 0x18, 0xe5, 0x8e, 0xab, 0xdb, 0x3, 0x20, 0xbe, 0xed, 0xe6, 0xc0, 0xb9, 0xb8, 0xa7, 0xb5, 0x12, 0x28, 0xcb, 0x8c, 0x91, 0xef, 0xc, 0x30, 0x9a, 0xc1, 0xc3, 0xc0, 0xf, 0x38, 0xe8, 0x9b, 0xf0, 0xca, 0x5, 0x40, 0xd2, 0xd7, 0xdd, 0xa3, 0xea, 0xab, 0xec, 0xc2, 0xaa, 0x1, 0x4d, 0xc9, 0x15, 0x0, 0xea, 0x55, 0x72, 0x3e, 0x92, 0xa8, 0x59, 0x3e, 0x87, 0x7d, 0xf5, 0x0, 0x0, 0x0, 0x0, 0x61, 0xca, 0xe7, 0xdb, 0x57, 0xa1, 0xb6, 0x41, 0xf4, 0x72, 0x3e, 0x63, 0x36, 0x43, 0x73, 0x32, 0x68, 0x64, 0x75, 0x75, 0x70, 0x4f, 0x39, 0x67, 0x77, 0x42, 0x6a, 0x78, 0x63, 0x57, 0x64, 0x77, 0x6b, 0x74, 0x44, 0x4d, 0x79, 0x36, 0x30, 0x68, 0x38, 0x53, 0x31, 0x79, 0x33, 0x38, 0x4b, 0x7a, 0x76, 0x36, 0x48, 0x4a, 0x35, 0x37, 0x59, 0x48, 0x6c, 0x74, 0x72, 0x61, 0x33, 0x4c, 0x74, 0x45, 0x4a, 0x51, 0x68, 0x71, 0x31, 0x70, 0x50, 0x70, 0x6a, 0x4d, 0x15, 0x51, 0xce, 0xea, 0x82, 0x1, 0x23, 0xed, 0x7a, 0x3, 0x78, 0xee, 0x56, 0x46, 0xd0, 0xe1, 0x17, 0x18, 0x30, 0x9d, 0x2f, 0xac, 0x1c, 0xa, 0x30, 0xa9, 0x8d, 0x10, 0xed, 0xb5, 0x44, 0x36, 0x5e, 0x84, 0x73, 0x5d, 0x38, 0x51, 0x2b, 0x6e, 0xc6, 0xb5} + input := []byte{0x4d, 0xc9, 0x15, 0x0, 0xea, 0x72, 0x3e, 0x63, 0x36, 0x43, 0x73, 0x32, 0x68, 0x64, 0x75, 0x75, 0x70, 0x4f, 0x39, 0x67, 0x77, 0x42, 0x6a, 0x78, 0x63, 0x57, 0x64, 0x77, 0x6b, 0x74, 0x44, 0x4d, 0x79, 0x36, 0x30, 0x68, 0x38, 0x53, 0x31, 0x79, 0x33, 0x38, 0x4b, 0x7a, 0x76, 0x36, 0x48, 0x4a, 0x35, 0x37, 0x59, 0x48, 0x6c, 0x74, 0x72, 0x61, 0x33, 0x4c, 0x74, 0x45, 0x4a, 0x51, 0x68, 0x71, 0x31, 0x70, 0x50, 0x70, 0x6a, 0x4d, 0x15, 0x51, 0xce, 0xea} + if err := proto.Unmarshal(input, msg); err != nil { + panic(err) + } + output, err := proto.Marshal(msg) + if err != nil { + t.Fatal(err) + } + if len(input) != len(output) { + t.Logf("%#v", msg) + msg2 := &NinOptNative{} + if err := proto.Unmarshal(output, msg2); err == nil { + t.Logf("%#v", msg2) + } + t.Errorf("expected %#v got %#v", input, output) + } +} + +//Generated code is correct, non generated returns an incorrect error +func DisabledTestFuzzBadWireType(t *testing.T) { + msg := &NinRepPackedNative{} + //input := []byte("j\x160\xfc0000\xf6\xfa000\xc1\xaf\xf5000\xcf" + "00\xb90z\r0\x850\xd30000'0000") + input := []byte{0x6a, 0x16, 0x30, 0xfc, 0x30, 0x30, 0x30, 0x30, 0xf6, 0xfa, 0x30, 0x30, 0x30, 0xc1, 0xaf, 0xf5, 0x30, 0x30, 0x30, 0xcf, 0x30, 0x30, 0xb9, 0x30, 0x7a, 0xd, 0x30, 0x85, 0x30, 0xd3, 0x30, 0x30, 0x30, 0x30, 0x27, 0x30, 0x30, 0x30, 0x30} + if err := proto.Unmarshal(input, msg); err == nil { + t.Fatalf("expected bad wiretype for Field4 error got %#v", msg) + } else { + t.Log(err) + } +} + +func TestFuzzIntegerOverflow(t *testing.T) { + msg := &Nil{} + //input := []byte("\x1500000\x8b\x9b\xa3\xa8\xb6\xe1\xe1\xfe\u061c0") + input := []byte{0x15, 0x30, 0x30, 0x30, 0x30, 0x30, 0x8b, 0x9b, 0xa3, 0xa8, 0xb6, 0xe1, 0xe1, 0xfe, 0xd8, 0x9c, 0x30} + if err := proto.Unmarshal(input, msg); err == nil { + t.Fatalf("expected integer overflow error %#v", msg) + } else { + t.Log(err) + } +} + +//Generated code is correct, non generated returns an incorrect error +func DisabledTestFuzzUnexpectedEOF(t *testing.T) { + msg := &NinRepPackedNative{} + //input := []byte("j\x16000000000000000000" + "00\xb90") + input := []byte{0x6a, 0x16, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0xb9, 0x30} + if err := proto.Unmarshal(input, msg); err == nil { + t.Fatalf("expected unexpected eof error got %#v", msg) + } else { + t.Log(err) + } +} + +//Generated code is correct, non generated returns an incorrect error +func DisabledTestFuzzCantSkipWireType(t *testing.T) { + msg := &NinRepPackedNative{} + //input := []byte("j\x160\xfc0000\xf6\xfa000\xc1\xaf\xf5000\xcf" + "00\xb90z\r0\x850\xd3000\xa80\xa7000") + input := []byte{0x6a, 0x16, 0x30, 0xfc, 0x30, 0x30, 0x30, 0x30, 0xf6, 0xfa, 0x30, 0x30, 0x30, 0xc1, 0xaf, 0xf5, 0x30, 0x30, 0x30, 0xcf, 0x30, 0x30, 0xb9, 0x30, 0x7a, 0xd, 0x30, 0x85, 0x30, 0xd3, 0x30, 0x30, 0x30, 0xa8, 0x30, 0xa7, 0x30, 0x30, 0x30} + if err := proto.Unmarshal(input, msg); err == nil { + t.Fatalf("expected cant skip wiretype error got %#v", msg) + } else { + t.Log(err) + } +} diff --git a/vendor/github.com/gogo/protobuf/test/group/Makefile b/vendor/github.com/gogo/protobuf/test/group/Makefile new file mode 100644 index 000000000..f2cc2bdfc --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/group/Makefile @@ -0,0 +1,30 @@ +# Extensions for Protocol Buffers to create more go like structures. +# +# Copyright (c) 2013, Vastech SA (PTY) LTD. 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: + (protoc --proto_path=../../../../../:../../protobuf/:. --gogo_out=. group.proto) diff --git a/vendor/github.com/gogo/protobuf/test/group/group.pb.go b/vendor/github.com/gogo/protobuf/test/group/group.pb.go new file mode 100644 index 000000000..70f12b23b --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/group/group.pb.go @@ -0,0 +1,964 @@ +// Code generated by protoc-gen-gogo. +// source: group.proto +// DO NOT EDIT! + +/* +Package group is a generated protocol buffer package. + +It is generated from these files: + group.proto + +It has these top-level messages: + Groups1 + Groups2 +*/ +package group + +import proto "github.com/gogo/protobuf/proto" +import fmt "fmt" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" + +import github_com_gogo_protobuf_protoc_gen_gogo_descriptor "github.com/gogo/protobuf/protoc-gen-gogo/descriptor" +import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" +import compress_gzip "compress/gzip" +import bytes "bytes" +import io_ioutil "io/ioutil" + +import strings "strings" +import sort "sort" +import strconv "strconv" +import reflect "reflect" + +// 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. +const _ = proto.GoGoProtoPackageIsVersion1 + +type Groups1 struct { + G []*Groups1_G `protobuf:"group,1,rep,name=G,json=g" json:"g,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *Groups1) Reset() { *m = Groups1{} } +func (*Groups1) ProtoMessage() {} +func (*Groups1) Descriptor() ([]byte, []int) { return fileDescriptorGroup, []int{0} } + +type Groups1_G struct { + Field1 *int64 `protobuf:"varint,1,opt,name=Field1,json=field1" json:"Field1,omitempty"` + Field2 *float64 `protobuf:"fixed64,2,opt,name=Field2,json=field2" json:"Field2,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *Groups1_G) Reset() { *m = Groups1_G{} } +func (*Groups1_G) ProtoMessage() {} + +type Groups2 struct { + G *Groups2_G `protobuf:"group,1,opt,name=G,json=g" json:"g,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *Groups2) Reset() { *m = Groups2{} } +func (*Groups2) ProtoMessage() {} +func (*Groups2) Descriptor() ([]byte, []int) { return fileDescriptorGroup, []int{1} } + +type Groups2_G struct { + Field1 *int64 `protobuf:"varint,1,opt,name=Field1,json=field1" json:"Field1,omitempty"` + Field2 []float64 `protobuf:"fixed64,2,rep,name=Field2,json=field2" json:"Field2,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *Groups2_G) Reset() { *m = Groups2_G{} } +func (*Groups2_G) ProtoMessage() {} + +func init() { + proto.RegisterType((*Groups1)(nil), "group.Groups1") + proto.RegisterType((*Groups1_G)(nil), "group.Groups1.G") + proto.RegisterType((*Groups2)(nil), "group.Groups2") + proto.RegisterType((*Groups2_G)(nil), "group.Groups2.G") +} +func (this *Groups1) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return GroupDescription() +} +func (this *Groups1_G) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return GroupDescription() +} +func (this *Groups2) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return GroupDescription() +} +func (this *Groups2_G) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return GroupDescription() +} +func GroupDescription() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + d := &github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet{} + var gzipped = []byte{ + // 3364 bytes of a gzipped FileDescriptorSet + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xcc, 0x5a, 0x69, 0x8c, 0x23, 0xd5, + 0xb5, 0xc6, 0x6d, 0xbb, 0xdb, 0x3e, 0xee, 0x76, 0x57, 0x57, 0x37, 0x33, 0x9e, 0x06, 0x66, 0x98, + 0x66, 0x1b, 0x86, 0x47, 0x0f, 0xd3, 0x6c, 0x83, 0x79, 0x0f, 0xd4, 0x8b, 0xc7, 0xf4, 0xa8, 0x17, + 0xbf, 0x72, 0x1b, 0x06, 0x9e, 0xf4, 0x4a, 0xd5, 0xe5, 0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d8, 0x55, 0x62, 0x9b, 0x3b, 0xb9, 0x38, 0x5a, 0x91, 0xd6, 0x02, 0x12, 0xf5, 0x26, 0x98, 0x68, + 0xb6, 0x37, 0xad, 0xba, 0xa9, 0x07, 0xd4, 0x00, 0xd5, 0x92, 0x9a, 0xc2, 0x07, 0x96, 0x3a, 0xca, + 0x37, 0xc0, 0xf8, 0xc3, 0xc4, 0x38, 0x1f, 0x54, 0xcd, 0x30, 0xd5, 0x2c, 0x15, 0x07, 0x14, 0x17, + 0x61, 0xb4, 0x41, 0x5c, 0x17, 0x0d, 0xd0, 0xbd, 0x9d, 0x26, 0xc9, 0x25, 0xd8, 0xec, 0xaf, 0xee, + 0x99, 0x7d, 0xf7, 0xcc, 0x33, 0x02, 0xb5, 0x81, 0x20, 0x75, 0x1e, 0xd2, 0xc4, 0x6e, 0x37, 0x38, + 0x43, 0x72, 0x17, 0xff, 0x15, 0x50, 0xa3, 0x9b, 0x25, 0x45, 0x61, 0x82, 0x62, 0xc4, 0x25, 0xad, + 0x0b, 0x75, 0x93, 0xe4, 0x86, 0x19, 0xc1, 0x0d, 0x3d, 0x04, 0x65, 0x3e, 0xde, 0xcd, 0x21, 0x71, + 0x38, 0x95, 0x34, 0xb9, 0xe8, 0x11, 0xdb, 0xad, 0x3b, 0x76, 0x6e, 0x84, 0x91, 0x5c, 0xd7, 0x67, + 0x15, 0x89, 0x55, 0xed, 0xa6, 0xe8, 0xe0, 0xd4, 0x3b, 0x60, 0xc4, 0x69, 0x7a, 0xf8, 0xcd, 0xcd, + 0xa5, 0x70, 0x7d, 0x32, 0x73, 0x57, 0xf6, 0x0d, 0x84, 0x75, 0xae, 0xa3, 0x49, 0x65, 0x75, 0x19, + 0x14, 0xd7, 0x69, 0xb7, 0x4c, 0xa2, 0x9b, 0x4e, 0x95, 0xe8, 0x75, 0x7b, 0xcb, 0xc9, 0xa5, 0x19, + 0xc1, 0x91, 0xde, 0x89, 0x30, 0xc5, 0x45, 0xd4, 0x5b, 0x46,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89, 0xad, 0x87, 0x27, 0x53, 0xda, 0x49, 0xec, 0x87, 0xed, 0xeb, 0x72, 0xeb, 0x71, + 0xec, 0x6a, 0x90, 0x11, 0x57, 0xda, 0xc5, 0x23, 0xf8, 0x20, 0x34, 0xdf, 0x90, 0x2b, 0xcd, 0x00, + 0x14, 0xfc, 0x20, 0x1c, 0xea, 0x9b, 0xea, 0x07, 0x20, 0xfb, 0xa6, 0x20, 0x3b, 0xd0, 0x27, 0xdd, + 0x8b, 0x94, 0xb0, 0x5f, 0xca, 0x6f, 0xc9, 0x94, 0x40, 0xba, 0xb8, 0x4a, 0xb4, 0x8d, 0x75, 0x8d, + 0xad, 0xfd, 0x79, 0xed, 0xdb, 0xd2, 0x6b, 0x1c, 0x1b, 0xf2, 0xda, 0x06, 0x1c, 0x10, 0x8c, 0xfb, + 0x5b, 0xd7, 0x57, 0x64, 0x62, 0xe5, 0xe8, 0x4a, 0x78, 0x75, 0xff, 0x07, 0xa6, 0x7d, 0x77, 0xca, + 0x0e, 0xcc, 0xd5, 0xe9, 0xc5, 0x40, 0x34, 0xf3, 0xab, 0x82, 0x59, 0x66, 0x7c, 0xbf, 0x85, 0x73, + 0x57, 0x8d, 0x26, 0x25, 0x3f, 0x0b, 0x39, 0x49, 0xde, 0xb6, 0xb1, 0xc1, 0x77, 0x6a, 0x36, 0x2e, + 0x63, 0x75, 0x00, 0xea, 0xef, 0x74, 0x2d, 0x55, 0x25, 0x00, 0xa7, 0xcc, 0xcb, 0xa0, 0xf8, 0xfd, + 0x86, 0x5e, 0x6f, 0x34, 0x1d, 0x6c, 0x2d, 0xf7, 0x66, 0xfc, 0xae, 0x5c, 0x29, 0x1f, 0xb7, 0xcc, + 0x60, 0xf9, 0x02, 0x64, 0xd9, 0xe3, 0xa0, 0x21, 0xf9, 0x3d, 0x41, 0x34, 0xd6, 0x41, 0x89, 0xc4, + 0x81, 0x9d, 0x12, 0xf6, 0xbc, 0x83, 0xe4, 0xbf, 0xef, 0xcb, 0xc4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87, 0xf8, 0x79, 0xfd, 0x2d, + 0xd4, 0xc3, 0xcf, 0x1b, 0xf8, 0xf9, 0x67, 0x00, 0x00, 0x00, 0xff, 0xff, 0x9b, 0xe7, 0x78, 0x9f, + 0xa6, 0x2b, 0x00, 0x00, + } + r := bytes.NewReader(gzipped) + gzipr, err := compress_gzip.NewReader(r) + if err != nil { + panic(err) + } + ungzipped, err := io_ioutil.ReadAll(gzipr) + if err != nil { + panic(err) + } + if err := github_com_gogo_protobuf_proto.Unmarshal(ungzipped, d); err != nil { + panic(err) + } + return d +} +func (this *Groups1) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*Groups1) + if !ok { + that2, ok := that.(Groups1) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *Groups1") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *Groups1 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *Groups1 but is not nil && this == nil") + } + if len(this.G) != len(that1.G) { + return fmt.Errorf("G this(%v) Not Equal that(%v)", len(this.G), len(that1.G)) + } + for i := range this.G { + if !this.G[i].Equal(that1.G[i]) { + return fmt.Errorf("G this[%v](%v) Not Equal that[%v](%v)", i, this.G[i], i, that1.G[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *Groups1) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*Groups1) + if !ok { + that2, ok := that.(Groups1) + 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.G) != len(that1.G) { + return false + } + for i := range this.G { + if !this.G[i].Equal(that1.G[i]) { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *Groups1_G) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*Groups1_G) + if !ok { + that2, ok := that.(Groups1_G) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *Groups1_G") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *Groups1_G but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *Groups1_G but is not nil && this == nil") + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) + } + } else if this.Field1 != nil { + return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") + } else if that1.Field1 != nil { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", *this.Field2, *that1.Field2) + } + } else if this.Field2 != nil { + return fmt.Errorf("this.Field2 == nil && that.Field2 != nil") + } else if that1.Field2 != nil { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *Groups1_G) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*Groups1_G) + if !ok { + that2, ok := that.(Groups1_G) + 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.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return false + } + } else if this.Field1 != nil { + return false + } else if that1.Field1 != nil { + return false + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + return false + } + } else if this.Field2 != nil { + return false + } else if that1.Field2 != nil { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *Groups2) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*Groups2) + if !ok { + that2, ok := that.(Groups2) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *Groups2") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *Groups2 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *Groups2 but is not nil && this == nil") + } + if !this.G.Equal(that1.G) { + return fmt.Errorf("G this(%v) Not Equal that(%v)", this.G, that1.G) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *Groups2) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*Groups2) + if !ok { + that2, ok := that.(Groups2) + 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.G.Equal(that1.G) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *Groups2_G) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*Groups2_G) + if !ok { + that2, ok := that.(Groups2_G) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *Groups2_G") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *Groups2_G but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *Groups2_G but is not nil && this == nil") + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) + } + } else if this.Field1 != nil { + return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") + } else if that1.Field1 != nil { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) + } + if len(this.Field2) != len(that1.Field2) { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", len(this.Field2), len(that1.Field2)) + } + for i := range this.Field2 { + if this.Field2[i] != that1.Field2[i] { + return fmt.Errorf("Field2 this[%v](%v) Not Equal that[%v](%v)", i, this.Field2[i], i, that1.Field2[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *Groups2_G) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*Groups2_G) + if !ok { + that2, ok := that.(Groups2_G) + 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.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return false + } + } else if this.Field1 != nil { + return false + } else if that1.Field1 != nil { + return false + } + if len(this.Field2) != len(that1.Field2) { + return false + } + for i := range this.Field2 { + if this.Field2[i] != that1.Field2[i] { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *Groups1) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&group.Groups1{") + if this.G != nil { + s = append(s, "G: "+fmt.Sprintf("%#v", this.G)+",\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 *Groups1_G) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 6) + s = append(s, "&group.Groups1_G{") + if this.Field1 != nil { + s = append(s, "Field1: "+valueToGoStringGroup(this.Field1, "int64")+",\n") + } + if this.Field2 != nil { + s = append(s, "Field2: "+valueToGoStringGroup(this.Field2, "float64")+",\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 *Groups2) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&group.Groups2{") + if this.G != nil { + s = append(s, "G: "+fmt.Sprintf("%#v", this.G)+",\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 *Groups2_G) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 6) + s = append(s, "&group.Groups2_G{") + if this.Field1 != nil { + s = append(s, "Field1: "+valueToGoStringGroup(this.Field1, "int64")+",\n") + } + if this.Field2 != nil { + s = append(s, "Field2: "+fmt.Sprintf("%#v", this.Field2)+",\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 valueToGoStringGroup(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 extensionToGoStringGroup(e map[int32]github_com_gogo_protobuf_proto.Extension) string { + if e == nil { + return "nil" + } + s := "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 +} +func NewPopulatedGroups1(r randyGroup, easy bool) *Groups1 { + this := &Groups1{} + if r.Intn(10) != 0 { + v1 := r.Intn(5) + this.G = make([]*Groups1_G, v1) + for i := 0; i < v1; i++ { + this.G[i] = NewPopulatedGroups1_G(r, easy) + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedGroup(r, 2) + } + return this +} + +func NewPopulatedGroups1_G(r randyGroup, easy bool) *Groups1_G { + this := &Groups1_G{} + if r.Intn(10) != 0 { + v2 := int64(r.Int63()) + if r.Intn(2) == 0 { + v2 *= -1 + } + this.Field1 = &v2 + } + if r.Intn(10) != 0 { + v3 := float64(r.Float64()) + if r.Intn(2) == 0 { + v3 *= -1 + } + this.Field2 = &v3 + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedGroup(r, 3) + } + return this +} + +func NewPopulatedGroups2(r randyGroup, easy bool) *Groups2 { + this := &Groups2{} + if r.Intn(10) != 0 { + this.G = NewPopulatedGroups2_G(r, easy) + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedGroup(r, 2) + } + return this +} + +func NewPopulatedGroups2_G(r randyGroup, easy bool) *Groups2_G { + this := &Groups2_G{} + if r.Intn(10) != 0 { + v4 := int64(r.Int63()) + if r.Intn(2) == 0 { + v4 *= -1 + } + this.Field1 = &v4 + } + if r.Intn(10) != 0 { + v5 := r.Intn(10) + this.Field2 = make([]float64, v5) + for i := 0; i < v5; i++ { + this.Field2[i] = float64(r.Float64()) + if r.Intn(2) == 0 { + this.Field2[i] *= -1 + } + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedGroup(r, 3) + } + return this +} + +type randyGroup interface { + Float32() float32 + Float64() float64 + Int63() int64 + Int31() int32 + Uint32() uint32 + Intn(n int) int +} + +func randUTF8RuneGroup(r randyGroup) 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 randStringGroup(r randyGroup) string { + v6 := r.Intn(100) + tmps := make([]rune, v6) + for i := 0; i < v6; i++ { + tmps[i] = randUTF8RuneGroup(r) + } + return string(tmps) +} +func randUnrecognizedGroup(r randyGroup, 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 = randFieldGroup(data, r, fieldNumber, wire) + } + return data +} +func randFieldGroup(data []byte, r randyGroup, fieldNumber int, wire int) []byte { + key := uint32(fieldNumber)<<3 | uint32(wire) + switch wire { + case 0: + data = encodeVarintPopulateGroup(data, uint64(key)) + v7 := r.Int63() + if r.Intn(2) == 0 { + v7 *= -1 + } + data = encodeVarintPopulateGroup(data, uint64(v7)) + case 1: + data = encodeVarintPopulateGroup(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 = encodeVarintPopulateGroup(data, uint64(key)) + ll := r.Intn(100) + data = encodeVarintPopulateGroup(data, uint64(ll)) + for j := 0; j < ll; j++ { + data = append(data, byte(r.Intn(256))) + } + default: + data = encodeVarintPopulateGroup(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 encodeVarintPopulateGroup(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 (this *Groups1) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&Groups1{`, + `G:` + strings.Replace(fmt.Sprintf("%v", this.G), "Groups1_G", "Groups1_G", 1) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *Groups1_G) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&Groups1_G{`, + `Field1:` + valueToStringGroup(this.Field1) + `,`, + `Field2:` + valueToStringGroup(this.Field2) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *Groups2) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&Groups2{`, + `G:` + strings.Replace(fmt.Sprintf("%v", this.G), "Groups2_G", "Groups2_G", 1) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *Groups2_G) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&Groups2_G{`, + `Field1:` + valueToStringGroup(this.Field1) + `,`, + `Field2:` + fmt.Sprintf("%v", this.Field2) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func valueToStringGroup(v interface{}) string { + rv := reflect.ValueOf(v) + if rv.IsNil() { + return "nil" + } + pv := reflect.Indirect(rv).Interface() + return fmt.Sprintf("*%v", pv) +} + +var fileDescriptorGroup = []byte{ + // 195 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xe2, 0xe2, 0x4e, 0x2f, 0xca, 0x2f, + 0x2d, 0xd0, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x62, 0x05, 0x73, 0xa4, 0x74, 0xd3, 0x33, 0x4b, + 0x32, 0x4a, 0x93, 0xf4, 0x92, 0xf3, 0x73, 0xf5, 0xd3, 0xf3, 0xd3, 0xf3, 0xf5, 0xc1, 0xb2, 0x49, + 0xa5, 0x69, 0x60, 0x1e, 0x98, 0x03, 0x66, 0x41, 0x74, 0x29, 0xc5, 0x71, 0xb1, 0xbb, 0x83, 0xf4, + 0x15, 0x1b, 0x0a, 0xc9, 0x71, 0x31, 0xa6, 0x4b, 0x30, 0x2a, 0x30, 0x6b, 0x70, 0x19, 0x09, 0xe8, + 0x41, 0x4c, 0x86, 0x4a, 0xe9, 0xb9, 0x07, 0x31, 0xa6, 0x4b, 0x19, 0x73, 0x31, 0xba, 0x0b, 0x89, + 0x71, 0xb1, 0xb9, 0x65, 0xa6, 0xe6, 0xa4, 0x18, 0x02, 0x55, 0x32, 0x6a, 0x30, 0x07, 0xb1, 0xa5, + 0x81, 0x79, 0x70, 0x71, 0x23, 0x09, 0x26, 0xa0, 0x38, 0x23, 0x54, 0xdc, 0x08, 0x61, 0xbe, 0x11, + 0xcc, 0x7c, 0x46, 0x0c, 0xf3, 0x8d, 0x48, 0x34, 0x9f, 0x19, 0x61, 0xbe, 0x93, 0xc9, 0x89, 0x87, + 0x72, 0x0c, 0x17, 0x80, 0xf8, 0x06, 0x10, 0x3f, 0x78, 0x28, 0xc7, 0xf8, 0x01, 0x88, 0x7f, 0x00, + 0x71, 0xc3, 0x23, 0x39, 0xc6, 0x15, 0x40, 0xbc, 0x01, 0x88, 0x77, 0x00, 0xf1, 0x89, 0x47, 0x40, + 0x75, 0x40, 0xfc, 0x00, 0x88, 0x01, 0x01, 0x00, 0x00, 0xff, 0xff, 0xd2, 0xbc, 0xd6, 0x4b, 0x39, + 0x01, 0x00, 0x00, +} diff --git a/vendor/github.com/gogo/protobuf/test/group/group.proto b/vendor/github.com/gogo/protobuf/test/group/group.proto new file mode 100644 index 000000000..c97e2611d --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/group/group.proto @@ -0,0 +1,63 @@ +// Copyright (c) 2013, Vastech SA (PTY) LTD. All rights reserved. +// http://github.com/gogo/protobuf/gogoproto +// +// 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 group; + +import "github.com/gogo/protobuf/gogoproto/gogo.proto"; + +option (gogoproto.goproto_stringer_all) = false; +option (gogoproto.goproto_enum_prefix_all) = false; +option (gogoproto.goproto_getters_all) = false; + +option (gogoproto.equal_all) = true; +option (gogoproto.verbose_equal_all) = true; +option (gogoproto.stringer_all) = true; +option (gogoproto.gostring_all) = true; +option (gogoproto.description_all) = true; + +option (gogoproto.testgen_all) = true; +option (gogoproto.populate_all) = true; + +option (gogoproto.unmarshaler_all) = false; +option (gogoproto.marshaler_all) = false; +option (gogoproto.sizer_all) = false; + +message Groups1 { + repeated group G = 1 { + optional int64 Field1 = 1; + optional double Field2 = 2; + } +} + +message Groups2 { + optional group G = 1 { + optional int64 Field1 = 1; + repeated double Field2 = 2; + } +} + diff --git a/vendor/github.com/gogo/protobuf/test/group/grouppb_test.go b/vendor/github.com/gogo/protobuf/test/group/grouppb_test.go new file mode 100644 index 000000000..1f9d30c52 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/group/grouppb_test.go @@ -0,0 +1,541 @@ +// Code generated by protoc-gen-gogo. +// source: group.proto +// DO NOT EDIT! + +/* +Package group is a generated protocol buffer package. + +It is generated from these files: + group.proto + +It has these top-level messages: + Groups1 + Groups2 +*/ +package group + +import testing "testing" +import math_rand "math/rand" +import time "time" +import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" +import github_com_gogo_protobuf_jsonpb "github.com/gogo/protobuf/jsonpb" +import fmt "fmt" +import go_parser "go/parser" +import proto "github.com/gogo/protobuf/proto" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +func TestGroups1Proto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedGroups1(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Groups1{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestGroups1_GProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedGroups1_G(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Groups1_G{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestGroups2Proto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedGroups2(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Groups2{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestGroups2_GProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedGroups2_G(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Groups2_G{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestGroups1JSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedGroups1(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Groups1{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestGroups1_GJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedGroups1_G(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Groups1_G{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestGroups2JSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedGroups2(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Groups2{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestGroups2_GJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedGroups2_G(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Groups2_G{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestGroups1ProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedGroups1(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &Groups1{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestGroups1ProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedGroups1(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &Groups1{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestGroups1_GProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedGroups1_G(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &Groups1_G{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestGroups1_GProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedGroups1_G(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &Groups1_G{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestGroups2ProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedGroups2(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &Groups2{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestGroups2ProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedGroups2(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &Groups2{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestGroups2_GProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedGroups2_G(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &Groups2_G{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestGroups2_GProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedGroups2_G(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &Groups2_G{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestGroupDescription(t *testing.T) { + GroupDescription() +} +func TestGroups1VerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedGroups1(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &Groups1{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestGroups1_GVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedGroups1_G(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &Groups1_G{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestGroups2VerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedGroups2(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &Groups2{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestGroups2_GVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedGroups2_G(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &Groups2_G{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestGroups1GoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedGroups1(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestGroups1_GGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedGroups1_G(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestGroups2GoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedGroups2(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestGroups2_GGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedGroups2_G(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestGroups1Stringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedGroups1(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestGroups1_GStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedGroups1_G(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestGroups2Stringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedGroups2(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestGroups2_GStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedGroups2_G(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} + +//These tests are generated by github.com/gogo/protobuf/plugin/testgen diff --git a/vendor/github.com/gogo/protobuf/test/importdedup/Makefile b/vendor/github.com/gogo/protobuf/test/importdedup/Makefile new file mode 100644 index 000000000..cf46ccc1d --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/importdedup/Makefile @@ -0,0 +1,31 @@ +# Extensions for Protocol Buffers to create more go like structures. +# +# Copyright (c) 2013, Vastech SA (PTY) LTD. 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: + (protoc --proto_path=../../../../../:../../protobuf/:. --gogo_out=. proto.proto) + (protoc --proto_path=../../../../../:../../protobuf/:. --gogo_out=. subpkg/subproto.proto) diff --git a/vendor/github.com/gogo/protobuf/test/importdedup/importdedup_test.go b/vendor/github.com/gogo/protobuf/test/importdedup/importdedup_test.go new file mode 100644 index 000000000..9c5e67fdd --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/importdedup/importdedup_test.go @@ -0,0 +1,32 @@ +// Copyright (c) 2015, Vastech SA (PTY) LTD. All rights reserved. +// http://github.com/gogo/protobuf/gogoproto +// +// 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 importdedup + +import testing "testing" + +func TestImportDedup(t *testing.T) { +} diff --git a/vendor/github.com/gogo/protobuf/test/importdedup/proto.pb.go b/vendor/github.com/gogo/protobuf/test/importdedup/proto.pb.go new file mode 100644 index 000000000..28543fdb9 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/importdedup/proto.pb.go @@ -0,0 +1,69 @@ +// Code generated by protoc-gen-gogo. +// source: proto.proto +// DO NOT EDIT! + +/* +Package importdedup is a generated protocol buffer package. + +It is generated from these files: + proto.proto + +It has these top-level messages: + Object +*/ +package importdedup + +import proto "github.com/gogo/protobuf/proto" +import fmt "fmt" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" +import subpkg "github.com/gogo/protobuf/test/importdedup/subpkg" + +import github_com_gogo_protobuf_test_importdedup_subpkg "github.com/gogo/protobuf/test/importdedup/subpkg" + +// 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. +const _ = proto.GoGoProtoPackageIsVersion1 + +type Object struct { + CustomField *github_com_gogo_protobuf_test_importdedup_subpkg.CustomType `protobuf:"bytes,1,opt,name=CustomField,json=customField,customtype=github.com/gogo/protobuf/test/importdedup/subpkg.CustomType" json:"CustomField,omitempty"` + SubObject *subpkg.SubObject `protobuf:"bytes,2,opt,name=SubObject,json=subObject" json:"SubObject,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *Object) Reset() { *m = Object{} } +func (m *Object) String() string { return proto.CompactTextString(m) } +func (*Object) ProtoMessage() {} +func (*Object) Descriptor() ([]byte, []int) { return fileDescriptorProto, []int{0} } + +func (m *Object) GetSubObject() *subpkg.SubObject { + if m != nil { + return m.SubObject + } + return nil +} + +func init() { + proto.RegisterType((*Object)(nil), "importdedup.Object") +} + +var fileDescriptorProto = []byte{ + // 178 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xe2, 0xe2, 0x2e, 0x28, 0xca, 0x2f, + 0xc9, 0xd7, 0x03, 0x93, 0x42, 0xdc, 0x99, 0xb9, 0x05, 0xf9, 0x45, 0x25, 0x29, 0xa9, 0x29, 0xa5, + 0x05, 0x52, 0xba, 0xe9, 0x99, 0x25, 0x19, 0xa5, 0x49, 0x7a, 0xc9, 0xf9, 0xb9, 0xfa, 0xe9, 0xf9, + 0xe9, 0xf9, 0xfa, 0x60, 0x35, 0x49, 0xa5, 0x69, 0x60, 0x1e, 0x98, 0x03, 0x66, 0x41, 0xf4, 0x4a, + 0xd9, 0xe3, 0x54, 0x5e, 0x92, 0x5a, 0x5c, 0xa2, 0x8f, 0x64, 0xb2, 0x7e, 0x71, 0x69, 0x52, 0x41, + 0x76, 0x3a, 0x98, 0x42, 0x58, 0xae, 0x34, 0x87, 0x91, 0x8b, 0xcd, 0x3f, 0x29, 0x2b, 0x35, 0xb9, + 0x44, 0x28, 0x91, 0x8b, 0xdb, 0xb9, 0xb4, 0xb8, 0x24, 0x3f, 0xd7, 0x2d, 0x33, 0x35, 0x27, 0x45, + 0x82, 0x51, 0x81, 0x51, 0x83, 0xc7, 0xc9, 0xfe, 0xd6, 0x3d, 0x79, 0x6b, 0x52, 0x2d, 0xd1, 0x83, + 0x98, 0x13, 0x52, 0x59, 0x90, 0x1a, 0xc4, 0x9d, 0x8c, 0x30, 0x53, 0x48, 0x9f, 0x8b, 0x33, 0xb8, + 0x34, 0x09, 0x62, 0x9f, 0x04, 0x13, 0xd0, 0x02, 0x6e, 0x23, 0x41, 0x3d, 0xa8, 0x1e, 0xb8, 0x44, + 0x10, 0x67, 0x31, 0x8c, 0x09, 0x08, 0x00, 0x00, 0xff, 0xff, 0xf4, 0x33, 0xcb, 0x76, 0x29, 0x01, + 0x00, 0x00, +} diff --git a/vendor/github.com/gogo/protobuf/test/importdedup/proto.proto b/vendor/github.com/gogo/protobuf/test/importdedup/proto.proto new file mode 100644 index 000000000..494accb88 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/importdedup/proto.proto @@ -0,0 +1,38 @@ +// Copyright (c) 2015, Vastech SA (PTY) LTD. All rights reserved. +// http://github.com/gogo/protobuf/gogoproto +// +// 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 importdedup; + +import "github.com/gogo/protobuf/gogoproto/gogo.proto"; + +import "github.com/gogo/protobuf/test/importdedup/subpkg/subproto.proto"; + +message Object { + optional bytes CustomField = 1 [(gogoproto.customtype) = "github.com/gogo/protobuf/test/importdedup/subpkg.CustomType"]; + optional subpkg.SubObject SubObject = 2; +} diff --git a/vendor/github.com/gogo/protobuf/test/importdedup/subpkg/customtype.go b/vendor/github.com/gogo/protobuf/test/importdedup/subpkg/customtype.go new file mode 100644 index 000000000..9a7965769 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/importdedup/subpkg/customtype.go @@ -0,0 +1,29 @@ +// Copyright (c) 2015, Vastech SA (PTY) LTD. All rights reserved. +// http://github.com/gogo/protobuf/gogoproto +// +// 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 subpkg + +type CustomType struct{} diff --git a/vendor/github.com/gogo/protobuf/test/importdedup/subpkg/subproto.pb.go b/vendor/github.com/gogo/protobuf/test/importdedup/subpkg/subproto.pb.go new file mode 100644 index 000000000..d84ec9aed --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/importdedup/subpkg/subproto.pb.go @@ -0,0 +1,51 @@ +// Code generated by protoc-gen-gogo. +// source: subpkg/subproto.proto +// DO NOT EDIT! + +/* +Package subpkg is a generated protocol buffer package. + +It is generated from these files: + subpkg/subproto.proto + +It has these top-level messages: + SubObject +*/ +package subpkg + +import proto "github.com/gogo/protobuf/proto" +import fmt "fmt" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" + +// 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. +const _ = proto.GoGoProtoPackageIsVersion1 + +type SubObject struct { + XXX_unrecognized []byte `json:"-"` +} + +func (m *SubObject) Reset() { *m = SubObject{} } +func (m *SubObject) String() string { return proto.CompactTextString(m) } +func (*SubObject) ProtoMessage() {} +func (*SubObject) Descriptor() ([]byte, []int) { return fileDescriptorSubproto, []int{0} } + +func init() { + proto.RegisterType((*SubObject)(nil), "subpkg.SubObject") +} + +var fileDescriptorSubproto = []byte{ + // 88 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xe2, 0x12, 0x2d, 0x2e, 0x4d, 0x2a, + 0xc8, 0x4e, 0xd7, 0x07, 0x51, 0x45, 0xf9, 0x25, 0xf9, 0x7a, 0x60, 0x52, 0x88, 0x0d, 0x22, 0x2c, + 0xa5, 0x9b, 0x9e, 0x59, 0x92, 0x51, 0x9a, 0xa4, 0x97, 0x9c, 0x9f, 0xab, 0x9f, 0x9e, 0x9f, 0x9e, + 0xaf, 0x0f, 0x96, 0x4e, 0x2a, 0x4d, 0x03, 0xf3, 0xc0, 0x1c, 0x30, 0x0b, 0xa2, 0x4d, 0x89, 0x9b, + 0x8b, 0x33, 0xb8, 0x34, 0xc9, 0x3f, 0x29, 0x2b, 0x35, 0xb9, 0x04, 0x10, 0x00, 0x00, 0xff, 0xff, + 0x4e, 0x38, 0xf3, 0x28, 0x5b, 0x00, 0x00, 0x00, +} diff --git a/vendor/github.com/gogo/protobuf/test/importdedup/subpkg/subproto.proto b/vendor/github.com/gogo/protobuf/test/importdedup/subpkg/subproto.proto new file mode 100644 index 000000000..6ff53e9eb --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/importdedup/subpkg/subproto.proto @@ -0,0 +1,34 @@ +// Copyright (c) 2015, Vastech SA (PTY) LTD. All rights reserved. +// http://github.com/gogo/protobuf/gogoproto +// +// 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 subpkg; + +import "github.com/gogo/protobuf/gogoproto/gogo.proto"; + +message SubObject { + +} diff --git a/vendor/github.com/gogo/protobuf/test/indeximport-issue72/Makefile b/vendor/github.com/gogo/protobuf/test/indeximport-issue72/Makefile new file mode 100644 index 000000000..e83a2f214 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/indeximport-issue72/Makefile @@ -0,0 +1,31 @@ +# Extensions for Protocol Buffers to create more go like structures. +# +# Copyright (c) 2013, Vastech SA (PTY) LTD. 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: + (cd index && protoc --proto_path=../../../../../../:../../../protobuf/:. --gogo_out=. index.proto) + (protoc --proto_path=../../../../../:../../protobuf/:. --gogo_out=. indeximport.proto) diff --git a/vendor/github.com/gogo/protobuf/test/indeximport-issue72/index/index.pb.go b/vendor/github.com/gogo/protobuf/test/indeximport-issue72/index/index.pb.go new file mode 100644 index 000000000..e6c90cd7f --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/indeximport-issue72/index/index.pb.go @@ -0,0 +1,515 @@ +// Code generated by protoc-gen-gogo. +// source: index.proto +// DO NOT EDIT! + +/* + Package index is a generated protocol buffer package. + + It is generated from these files: + index.proto + + It has these top-level messages: + IndexQuery +*/ +package index + +import proto "github.com/gogo/protobuf/proto" +import fmt "fmt" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" + +import bytes "bytes" + +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. +const _ = proto.GoGoProtoPackageIsVersion1 + +type IndexQuery struct { + Key *string `protobuf:"bytes,1,opt,name=Key,json=key" json:"Key,omitempty"` + Value *string `protobuf:"bytes,2,opt,name=Value,json=value" json:"Value,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *IndexQuery) Reset() { *m = IndexQuery{} } +func (m *IndexQuery) String() string { return proto.CompactTextString(m) } +func (*IndexQuery) ProtoMessage() {} +func (*IndexQuery) Descriptor() ([]byte, []int) { return fileDescriptorIndex, []int{0} } + +func (m *IndexQuery) GetKey() string { + if m != nil && m.Key != nil { + return *m.Key + } + return "" +} + +func (m *IndexQuery) GetValue() string { + if m != nil && m.Value != nil { + return *m.Value + } + return "" +} + +func init() { + proto.RegisterType((*IndexQuery)(nil), "index.IndexQuery") +} +func (this *IndexQuery) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*IndexQuery) + if !ok { + that2, ok := that.(IndexQuery) + 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 != 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 + } + 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 !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (m *IndexQuery) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *IndexQuery) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Key != nil { + data[i] = 0xa + i++ + i = encodeVarintIndex(data, i, uint64(len(*m.Key))) + i += copy(data[i:], *m.Key) + } + if m.Value != nil { + data[i] = 0x12 + i++ + i = encodeVarintIndex(data, i, uint64(len(*m.Value))) + i += copy(data[i:], *m.Value) + } + if m.XXX_unrecognized != nil { + i += copy(data[i:], m.XXX_unrecognized) + } + return i, nil +} + +func encodeFixed64Index(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 encodeFixed32Index(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 encodeVarintIndex(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 NewPopulatedIndexQuery(r randyIndex, easy bool) *IndexQuery { + this := &IndexQuery{} + if r.Intn(10) != 0 { + v1 := randStringIndex(r) + this.Key = &v1 + } + if r.Intn(10) != 0 { + v2 := randStringIndex(r) + this.Value = &v2 + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedIndex(r, 3) + } + return this +} + +type randyIndex interface { + Float32() float32 + Float64() float64 + Int63() int64 + Int31() int32 + Uint32() uint32 + Intn(n int) int +} + +func randUTF8RuneIndex(r randyIndex) 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 randStringIndex(r randyIndex) string { + v3 := r.Intn(100) + tmps := make([]rune, v3) + for i := 0; i < v3; i++ { + tmps[i] = randUTF8RuneIndex(r) + } + return string(tmps) +} +func randUnrecognizedIndex(r randyIndex, 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 = randFieldIndex(data, r, fieldNumber, wire) + } + return data +} +func randFieldIndex(data []byte, r randyIndex, fieldNumber int, wire int) []byte { + key := uint32(fieldNumber)<<3 | uint32(wire) + switch wire { + case 0: + data = encodeVarintPopulateIndex(data, uint64(key)) + v4 := r.Int63() + if r.Intn(2) == 0 { + v4 *= -1 + } + data = encodeVarintPopulateIndex(data, uint64(v4)) + case 1: + data = encodeVarintPopulateIndex(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 = encodeVarintPopulateIndex(data, uint64(key)) + ll := r.Intn(100) + data = encodeVarintPopulateIndex(data, uint64(ll)) + for j := 0; j < ll; j++ { + data = append(data, byte(r.Intn(256))) + } + default: + data = encodeVarintPopulateIndex(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 encodeVarintPopulateIndex(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 *IndexQuery) Size() (n int) { + var l int + _ = l + if m.Key != nil { + l = len(*m.Key) + n += 1 + l + sovIndex(uint64(l)) + } + if m.Value != nil { + l = len(*m.Value) + n += 1 + l + sovIndex(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func sovIndex(x uint64) (n int) { + for { + n++ + x >>= 7 + if x == 0 { + break + } + } + return n +} +func sozIndex(x uint64) (n int) { + return sovIndex(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *IndexQuery) 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 ErrIntOverflowIndex + } + 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: IndexQuery: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: IndexQuery: 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 ErrIntOverflowIndex + } + 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 ErrInvalidLengthIndex + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + s := string(data[iNdEx:postIndex]) + m.Key = &s + iNdEx = postIndex + 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 ErrIntOverflowIndex + } + 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 ErrInvalidLengthIndex + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + s := string(data[iNdEx:postIndex]) + m.Value = &s + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipIndex(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthIndex + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipIndex(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, ErrIntOverflowIndex + } + 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, ErrIntOverflowIndex + } + 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, ErrIntOverflowIndex + } + 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, ErrInvalidLengthIndex + } + return iNdEx, nil + case 3: + for { + var innerWire uint64 + var start int = iNdEx + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowIndex + } + 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 := skipIndex(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 ( + ErrInvalidLengthIndex = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowIndex = fmt.Errorf("proto: integer overflow") +) + +var fileDescriptorIndex = []byte{ + // 139 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xe2, 0xe2, 0xce, 0xcc, 0x4b, 0x49, + 0xad, 0xd0, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x62, 0x05, 0x73, 0xa4, 0x74, 0xd3, 0x33, 0x4b, + 0x32, 0x4a, 0x93, 0xf4, 0x92, 0xf3, 0x73, 0xf5, 0xd3, 0xf3, 0xd3, 0xf3, 0xf5, 0xc1, 0xb2, 0x49, + 0xa5, 0x69, 0x60, 0x1e, 0x98, 0x03, 0x66, 0x41, 0x74, 0x29, 0x99, 0x70, 0x71, 0x79, 0x82, 0xf4, + 0x05, 0x96, 0xa6, 0x16, 0x55, 0x0a, 0x09, 0x70, 0x31, 0x7b, 0xa7, 0x56, 0x4a, 0x30, 0x2a, 0x30, + 0x6a, 0x70, 0x06, 0x31, 0x67, 0xa7, 0x56, 0x0a, 0x89, 0x70, 0xb1, 0x86, 0x25, 0xe6, 0x94, 0xa6, + 0x4a, 0x30, 0x81, 0xc5, 0x58, 0xcb, 0x40, 0x1c, 0x27, 0x89, 0x1f, 0x0f, 0xe5, 0x18, 0x57, 0x3c, + 0x92, 0x63, 0xdc, 0x01, 0xc4, 0x27, 0x80, 0xf8, 0x02, 0x10, 0x3f, 0x00, 0x62, 0x40, 0x00, 0x00, + 0x00, 0xff, 0xff, 0xed, 0x22, 0xeb, 0x68, 0x93, 0x00, 0x00, 0x00, +} diff --git a/vendor/github.com/gogo/protobuf/test/indeximport-issue72/index/index.proto b/vendor/github.com/gogo/protobuf/test/indeximport-issue72/index/index.proto new file mode 100644 index 000000000..4d8811bc4 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/indeximport-issue72/index/index.proto @@ -0,0 +1,43 @@ +// Copyright (c) 2015, Vastech SA (PTY) LTD. All rights reserved. +// http://github.com/gogo/protobuf/gogoproto +// +// 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 index; + +import "github.com/gogo/protobuf/gogoproto/gogo.proto"; + +option (gogoproto.marshaler_all) = true; +option (gogoproto.sizer_all) = true; +option (gogoproto.unmarshaler_all) = true; +option (gogoproto.populate_all) = true; +option (gogoproto.equal_all) = true; +option (gogoproto.testgen_all) = true; + +message IndexQuery { + optional string Key = 1; + optional string Value = 2; +} diff --git a/vendor/github.com/gogo/protobuf/test/indeximport-issue72/index/indexpb_test.go b/vendor/github.com/gogo/protobuf/test/indeximport-issue72/index/indexpb_test.go new file mode 100644 index 000000000..7e915f6b8 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/indeximport-issue72/index/indexpb_test.go @@ -0,0 +1,155 @@ +// Code generated by protoc-gen-gogo. +// source: index.proto +// DO NOT EDIT! + +/* +Package index is a generated protocol buffer package. + +It is generated from these files: + index.proto + +It has these top-level messages: + IndexQuery +*/ +package index + +import testing "testing" +import math_rand "math/rand" +import time "time" +import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" +import github_com_gogo_protobuf_jsonpb "github.com/gogo/protobuf/jsonpb" +import proto "github.com/gogo/protobuf/proto" +import fmt "fmt" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +func TestIndexQueryProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedIndexQuery(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &IndexQuery{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestIndexQueryMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedIndexQuery(popr, false) + size := p.Size() + data := make([]byte, size) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(data) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &IndexQuery{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestIndexQueryJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedIndexQuery(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &IndexQuery{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestIndexQueryProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedIndexQuery(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &IndexQuery{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestIndexQueryProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedIndexQuery(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &IndexQuery{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestIndexQuerySize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedIndexQuery(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +//These tests are generated by github.com/gogo/protobuf/plugin/testgen diff --git a/vendor/github.com/gogo/protobuf/test/indeximport-issue72/indeximport.pb.go b/vendor/github.com/gogo/protobuf/test/indeximport-issue72/indeximport.pb.go new file mode 100644 index 000000000..9a2b5db7a --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/indeximport-issue72/indeximport.pb.go @@ -0,0 +1,468 @@ +// Code generated by protoc-gen-gogo. +// source: indeximport.proto +// DO NOT EDIT! + +/* + Package indeximport is a generated protocol buffer package. + + It is generated from these files: + indeximport.proto + + It has these top-level messages: + IndexQueries +*/ +package indeximport + +import proto "github.com/gogo/protobuf/proto" +import fmt "fmt" +import math "math" +import index "github.com/gogo/protobuf/test/indeximport-issue72/index" +import _ "github.com/gogo/protobuf/gogoproto" + +import bytes "bytes" + +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. +const _ = proto.GoGoProtoPackageIsVersion1 + +type IndexQueries struct { + Queries []*index.IndexQuery `protobuf:"bytes,1,rep,name=Queries,json=queries" json:"Queries,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *IndexQueries) Reset() { *m = IndexQueries{} } +func (m *IndexQueries) String() string { return proto.CompactTextString(m) } +func (*IndexQueries) ProtoMessage() {} +func (*IndexQueries) Descriptor() ([]byte, []int) { return fileDescriptorIndeximport, []int{0} } + +func (m *IndexQueries) GetQueries() []*index.IndexQuery { + if m != nil { + return m.Queries + } + return nil +} + +func init() { + proto.RegisterType((*IndexQueries)(nil), "indeximport.IndexQueries") +} +func (this *IndexQueries) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*IndexQueries) + if !ok { + that2, ok := that.(IndexQueries) + 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.Queries) != len(that1.Queries) { + return false + } + for i := range this.Queries { + if !this.Queries[i].Equal(that1.Queries[i]) { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (m *IndexQueries) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *IndexQueries) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Queries) > 0 { + for _, msg := range m.Queries { + data[i] = 0xa + i++ + i = encodeVarintIndeximport(data, i, uint64(msg.Size())) + n, err := msg.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n + } + } + if m.XXX_unrecognized != nil { + i += copy(data[i:], m.XXX_unrecognized) + } + return i, nil +} + +func encodeFixed64Indeximport(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 encodeFixed32Indeximport(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 encodeVarintIndeximport(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 NewPopulatedIndexQueries(r randyIndeximport, easy bool) *IndexQueries { + this := &IndexQueries{} + if r.Intn(10) != 0 { + v1 := r.Intn(5) + this.Queries = make([]*index.IndexQuery, v1) + for i := 0; i < v1; i++ { + this.Queries[i] = index.NewPopulatedIndexQuery(r, easy) + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedIndeximport(r, 2) + } + return this +} + +type randyIndeximport interface { + Float32() float32 + Float64() float64 + Int63() int64 + Int31() int32 + Uint32() uint32 + Intn(n int) int +} + +func randUTF8RuneIndeximport(r randyIndeximport) 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 randStringIndeximport(r randyIndeximport) string { + v2 := r.Intn(100) + tmps := make([]rune, v2) + for i := 0; i < v2; i++ { + tmps[i] = randUTF8RuneIndeximport(r) + } + return string(tmps) +} +func randUnrecognizedIndeximport(r randyIndeximport, 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 = randFieldIndeximport(data, r, fieldNumber, wire) + } + return data +} +func randFieldIndeximport(data []byte, r randyIndeximport, fieldNumber int, wire int) []byte { + key := uint32(fieldNumber)<<3 | uint32(wire) + switch wire { + case 0: + data = encodeVarintPopulateIndeximport(data, uint64(key)) + v3 := r.Int63() + if r.Intn(2) == 0 { + v3 *= -1 + } + data = encodeVarintPopulateIndeximport(data, uint64(v3)) + case 1: + data = encodeVarintPopulateIndeximport(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 = encodeVarintPopulateIndeximport(data, uint64(key)) + ll := r.Intn(100) + data = encodeVarintPopulateIndeximport(data, uint64(ll)) + for j := 0; j < ll; j++ { + data = append(data, byte(r.Intn(256))) + } + default: + data = encodeVarintPopulateIndeximport(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 encodeVarintPopulateIndeximport(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 *IndexQueries) Size() (n int) { + var l int + _ = l + if len(m.Queries) > 0 { + for _, e := range m.Queries { + l = e.Size() + n += 1 + l + sovIndeximport(uint64(l)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func sovIndeximport(x uint64) (n int) { + for { + n++ + x >>= 7 + if x == 0 { + break + } + } + return n +} +func sozIndeximport(x uint64) (n int) { + return sovIndeximport(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *IndexQueries) 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 ErrIntOverflowIndeximport + } + 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: IndexQueries: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: IndexQueries: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Queries", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowIndeximport + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthIndeximport + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Queries = append(m.Queries, &index.IndexQuery{}) + if err := m.Queries[len(m.Queries)-1].Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipIndeximport(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthIndeximport + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipIndeximport(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, ErrIntOverflowIndeximport + } + 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, ErrIntOverflowIndeximport + } + 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, ErrIntOverflowIndeximport + } + 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, ErrInvalidLengthIndeximport + } + return iNdEx, nil + case 3: + for { + var innerWire uint64 + var start int = iNdEx + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowIndeximport + } + 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 := skipIndeximport(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 ( + ErrInvalidLengthIndeximport = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowIndeximport = fmt.Errorf("proto: integer overflow") +) + +var fileDescriptorIndeximport = []byte{ + // 163 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xe2, 0x12, 0xcc, 0xcc, 0x4b, 0x49, + 0xad, 0xc8, 0xcc, 0x2d, 0xc8, 0x2f, 0x2a, 0xd1, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0xe2, 0x46, + 0x12, 0x92, 0x72, 0x4e, 0xcf, 0x2c, 0xc9, 0x28, 0x4d, 0xd2, 0x4b, 0xce, 0xcf, 0xd5, 0x4f, 0xcf, + 0x4f, 0xcf, 0xd7, 0x07, 0xab, 0x49, 0x2a, 0x4d, 0xd3, 0x2f, 0x49, 0x2d, 0x2e, 0xd1, 0x47, 0x52, + 0xaa, 0x9b, 0x59, 0x5c, 0x5c, 0x9a, 0x6a, 0x6e, 0x04, 0x11, 0x83, 0x90, 0x10, 0x13, 0xa5, 0x74, + 0x71, 0x1a, 0x02, 0xe2, 0x81, 0x39, 0x60, 0x16, 0x44, 0xb9, 0x92, 0x35, 0x17, 0x8f, 0x27, 0x48, + 0x77, 0x60, 0x69, 0x6a, 0x51, 0x66, 0x6a, 0xb1, 0x90, 0x36, 0x17, 0x3b, 0x94, 0x29, 0xc1, 0xa8, + 0xc0, 0xac, 0xc1, 0x6d, 0x24, 0xa8, 0x07, 0x31, 0x1d, 0xae, 0xaa, 0x32, 0x88, 0xbd, 0x10, 0xa2, + 0xc2, 0x49, 0xe2, 0xc7, 0x43, 0x39, 0xc6, 0x15, 0x8f, 0xe4, 0x18, 0x77, 0x00, 0xf1, 0x09, 0x20, + 0xbe, 0x00, 0xc4, 0x0f, 0x80, 0x18, 0x10, 0x00, 0x00, 0xff, 0xff, 0xf1, 0x51, 0xf2, 0x07, 0xeb, + 0x00, 0x00, 0x00, +} diff --git a/vendor/github.com/gogo/protobuf/test/indeximport-issue72/indeximport.proto b/vendor/github.com/gogo/protobuf/test/indeximport-issue72/indeximport.proto new file mode 100644 index 000000000..1b789cb8b --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/indeximport-issue72/indeximport.proto @@ -0,0 +1,44 @@ +// Copyright (c) 2015, Vastech SA (PTY) LTD. All rights reserved. +// http://github.com/gogo/protobuf/gogoproto +// +// 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 indeximport; + +import "github.com/gogo/protobuf/test/indeximport-issue72/index/index.proto"; +import "github.com/gogo/protobuf/gogoproto/gogo.proto"; + +option (gogoproto.marshaler_all) = true; +option (gogoproto.sizer_all) = true; +option (gogoproto.unmarshaler_all) = true; +option (gogoproto.populate_all) = true; +option (gogoproto.equal_all) = true; +option (gogoproto.testgen_all) = true; + +message IndexQueries { + repeated index.IndexQuery Queries = 1; +} + diff --git a/vendor/github.com/gogo/protobuf/test/indeximport-issue72/indeximportpb_test.go b/vendor/github.com/gogo/protobuf/test/indeximport-issue72/indeximportpb_test.go new file mode 100644 index 000000000..99d0592bb --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/indeximport-issue72/indeximportpb_test.go @@ -0,0 +1,156 @@ +// Code generated by protoc-gen-gogo. +// source: indeximport.proto +// DO NOT EDIT! + +/* +Package indeximport is a generated protocol buffer package. + +It is generated from these files: + indeximport.proto + +It has these top-level messages: + IndexQueries +*/ +package indeximport + +import testing "testing" +import math_rand "math/rand" +import time "time" +import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" +import github_com_gogo_protobuf_jsonpb "github.com/gogo/protobuf/jsonpb" +import proto "github.com/gogo/protobuf/proto" +import fmt "fmt" +import math "math" +import _ "github.com/gogo/protobuf/test/indeximport-issue72/index" +import _ "github.com/gogo/protobuf/gogoproto" + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +func TestIndexQueriesProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedIndexQueries(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &IndexQueries{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestIndexQueriesMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedIndexQueries(popr, false) + size := p.Size() + data := make([]byte, size) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(data) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &IndexQueries{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestIndexQueriesJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedIndexQueries(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &IndexQueries{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestIndexQueriesProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedIndexQueries(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &IndexQueries{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestIndexQueriesProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedIndexQueries(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &IndexQueries{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestIndexQueriesSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedIndexQueries(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +//These tests are generated by github.com/gogo/protobuf/plugin/testgen diff --git a/vendor/github.com/gogo/protobuf/test/issue34/Makefile b/vendor/github.com/gogo/protobuf/test/issue34/Makefile new file mode 100644 index 000000000..e6a2cc3c9 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/issue34/Makefile @@ -0,0 +1,30 @@ +# Extensions for Protocol Buffers to create more go like structures. +# +# Copyright (c) 2013, Vastech SA (PTY) LTD. 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: + (protoc --proto_path=../../../../../:../../protobuf/:. --gogo_out=. proto.proto) diff --git a/vendor/github.com/gogo/protobuf/test/issue34/issue34_test.go b/vendor/github.com/gogo/protobuf/test/issue34/issue34_test.go new file mode 100644 index 000000000..c246136ef --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/issue34/issue34_test.go @@ -0,0 +1,80 @@ +// Copyright (c) 2015, Vastech SA (PTY) LTD. All rights reserved. +// http://github.com/gogo/protobuf/gogoproto +// +// 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 issue34 + +import ( + "bytes" + "github.com/gogo/protobuf/proto" + "testing" +) + +func TestZeroLengthOptionalBytes(t *testing.T) { + roundtrip := func(f *Foo) *Foo { + data, err := proto.Marshal(f) + if err != nil { + panic(err) + } + newF := &Foo{} + err = proto.Unmarshal(data, newF) + if err != nil { + panic(err) + } + return newF + } + + f := &Foo{} + roundtrippedF := roundtrip(f) + if roundtrippedF.Bar != nil { + t.Fatalf("should be nil") + } + + f.Bar = []byte{} + roundtrippedF = roundtrip(f) + if roundtrippedF.Bar == nil { + t.Fatalf("should not be nil") + } + if len(roundtrippedF.Bar) != 0 { + t.Fatalf("should be empty") + } +} + +func TestRepeatedOptional(t *testing.T) { + repeated := &FooWithRepeated{Bar: [][]byte{[]byte("a"), []byte("b")}} + data, err := proto.Marshal(repeated) + if err != nil { + panic(err) + } + optional := &Foo{} + err = proto.Unmarshal(data, optional) + if err != nil { + panic(err) + } + + if !bytes.Equal(optional.Bar, []byte("b")) { + t.Fatalf("should return the last entry") + } +} diff --git a/vendor/github.com/gogo/protobuf/test/issue34/proto.pb.go b/vendor/github.com/gogo/protobuf/test/issue34/proto.pb.go new file mode 100644 index 000000000..be2a3d76e --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/issue34/proto.pb.go @@ -0,0 +1,348 @@ +// Code generated by protoc-gen-gogo. +// source: proto.proto +// DO NOT EDIT! + +/* +Package issue34 is a generated protocol buffer package. + +It is generated from these files: + proto.proto + +It has these top-level messages: + Foo + FooWithRepeated +*/ +package issue34 + +import proto "github.com/gogo/protobuf/proto" +import fmt "fmt" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" + +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. +const _ = proto.GoGoProtoPackageIsVersion1 + +type Foo struct { + Bar []byte `protobuf:"bytes,1,opt,name=bar" json:"bar,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *Foo) Reset() { *m = Foo{} } +func (m *Foo) String() string { return proto.CompactTextString(m) } +func (*Foo) ProtoMessage() {} +func (*Foo) Descriptor() ([]byte, []int) { return fileDescriptorProto, []int{0} } + +func (m *Foo) GetBar() []byte { + if m != nil { + return m.Bar + } + return nil +} + +type FooWithRepeated struct { + Bar [][]byte `protobuf:"bytes,1,rep,name=bar" json:"bar,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *FooWithRepeated) Reset() { *m = FooWithRepeated{} } +func (m *FooWithRepeated) String() string { return proto.CompactTextString(m) } +func (*FooWithRepeated) ProtoMessage() {} +func (*FooWithRepeated) Descriptor() ([]byte, []int) { return fileDescriptorProto, []int{1} } + +func (m *FooWithRepeated) GetBar() [][]byte { + if m != nil { + return m.Bar + } + return nil +} + +func init() { + proto.RegisterType((*Foo)(nil), "issue34.Foo") + proto.RegisterType((*FooWithRepeated)(nil), "issue34.FooWithRepeated") +} +func (m *Foo) 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 ErrIntOverflowProto + } + 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: Foo: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Foo: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Bar", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProto + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthProto + } + postIndex := iNdEx + byteLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Bar = append(m.Bar[:0], data[iNdEx:postIndex]...) + if m.Bar == nil { + m.Bar = []byte{} + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipProto(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthProto + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *FooWithRepeated) 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 ErrIntOverflowProto + } + 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: FooWithRepeated: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: FooWithRepeated: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Bar", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProto + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthProto + } + postIndex := iNdEx + byteLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Bar = append(m.Bar, make([]byte, postIndex-iNdEx)) + copy(m.Bar[len(m.Bar)-1], data[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipProto(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthProto + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipProto(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, ErrIntOverflowProto + } + 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, ErrIntOverflowProto + } + 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, ErrIntOverflowProto + } + 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, ErrInvalidLengthProto + } + return iNdEx, nil + case 3: + for { + var innerWire uint64 + var start int = iNdEx + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowProto + } + 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 := skipProto(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 ( + ErrInvalidLengthProto = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowProto = fmt.Errorf("proto: integer overflow") +) + +var fileDescriptorProto = []byte{ + // 124 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xe2, 0xe2, 0x2e, 0x28, 0xca, 0x2f, + 0xc9, 0xd7, 0x03, 0x93, 0x42, 0xec, 0x99, 0xc5, 0xc5, 0xa5, 0xa9, 0xc6, 0x26, 0x52, 0xba, 0xe9, + 0x99, 0x25, 0x19, 0xa5, 0x49, 0x7a, 0xc9, 0xf9, 0xb9, 0xfa, 0xe9, 0xf9, 0xe9, 0xf9, 0xfa, 0x60, + 0xf9, 0xa4, 0xd2, 0x34, 0x30, 0x0f, 0xcc, 0x01, 0xb3, 0x20, 0xfa, 0x94, 0xc4, 0xb9, 0x98, 0xdd, + 0xf2, 0xf3, 0x85, 0x04, 0xb8, 0x98, 0x93, 0x12, 0x8b, 0x24, 0x18, 0x15, 0x18, 0x35, 0x78, 0x82, + 0x40, 0x4c, 0x25, 0x65, 0x2e, 0x7e, 0xa0, 0x44, 0x38, 0xd0, 0xb0, 0xa0, 0xd4, 0x82, 0xd4, 0xc4, + 0x92, 0xd4, 0x14, 0x84, 0x22, 0x66, 0xa8, 0x22, 0x27, 0x96, 0x0b, 0x8f, 0xe4, 0x18, 0x01, 0x01, + 0x00, 0x00, 0xff, 0xff, 0x00, 0xb2, 0x1b, 0xef, 0x89, 0x00, 0x00, 0x00, +} diff --git a/vendor/github.com/gogo/protobuf/test/issue34/proto.proto b/vendor/github.com/gogo/protobuf/test/issue34/proto.proto new file mode 100644 index 000000000..2a2d0b133 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/issue34/proto.proto @@ -0,0 +1,15 @@ +syntax = "proto2"; + +package issue34; + +import "github.com/gogo/protobuf/gogoproto/gogo.proto"; + +option (gogoproto.unmarshaler_all) = true; + +message Foo { + optional bytes bar = 1; +} + +message FooWithRepeated { + repeated bytes bar = 1; +} diff --git a/vendor/github.com/gogo/protobuf/test/issue42order/Makefile b/vendor/github.com/gogo/protobuf/test/issue42order/Makefile new file mode 100644 index 000000000..0f09007f7 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/issue42order/Makefile @@ -0,0 +1,30 @@ +# Extensions for Protocol Buffers to create more go like structures. +# +# Copyright (c) 2013, Vastech SA (PTY) LTD. 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: + (protoc --proto_path=../../../../../:../../protobuf/:. --gogo_out=. issue42.proto) diff --git a/vendor/github.com/gogo/protobuf/test/issue42order/issue42.pb.go b/vendor/github.com/gogo/protobuf/test/issue42order/issue42.pb.go new file mode 100644 index 000000000..d66f23a2d --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/issue42order/issue42.pb.go @@ -0,0 +1,623 @@ +// Code generated by protoc-gen-gogo. +// source: issue42.proto +// DO NOT EDIT! + +/* + Package issue42 is a generated protocol buffer package. + + It is generated from these files: + issue42.proto + + It has these top-level messages: + UnorderedFields + OrderedFields +*/ +package issue42 + +import proto "github.com/gogo/protobuf/proto" +import fmt "fmt" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" + +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. +const _ = proto.GoGoProtoPackageIsVersion1 + +type UnorderedFields struct { + A *int64 `protobuf:"varint,10,opt,name=A,json=a" json:"A,omitempty"` + B *uint64 `protobuf:"fixed64,1,opt,name=B,json=b" json:"B,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *UnorderedFields) Reset() { *m = UnorderedFields{} } +func (m *UnorderedFields) String() string { return proto.CompactTextString(m) } +func (*UnorderedFields) ProtoMessage() {} +func (*UnorderedFields) Descriptor() ([]byte, []int) { return fileDescriptorIssue42, []int{0} } + +func (m *UnorderedFields) GetA() int64 { + if m != nil && m.A != nil { + return *m.A + } + return 0 +} + +func (m *UnorderedFields) GetB() uint64 { + if m != nil && m.B != nil { + return *m.B + } + return 0 +} + +type OrderedFields struct { + B *uint64 `protobuf:"fixed64,1,opt,name=B,json=b" json:"B,omitempty"` + A *int64 `protobuf:"varint,10,opt,name=A,json=a" json:"A,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *OrderedFields) Reset() { *m = OrderedFields{} } +func (m *OrderedFields) String() string { return proto.CompactTextString(m) } +func (*OrderedFields) ProtoMessage() {} +func (*OrderedFields) Descriptor() ([]byte, []int) { return fileDescriptorIssue42, []int{1} } + +func (m *OrderedFields) GetB() uint64 { + if m != nil && m.B != nil { + return *m.B + } + return 0 +} + +func (m *OrderedFields) GetA() int64 { + if m != nil && m.A != nil { + return *m.A + } + return 0 +} + +func init() { + proto.RegisterType((*UnorderedFields)(nil), "issue42.UnorderedFields") + proto.RegisterType((*OrderedFields)(nil), "issue42.OrderedFields") +} +func (m *UnorderedFields) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *UnorderedFields) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.B != nil { + data[i] = 0x9 + i++ + i = encodeFixed64Issue42(data, i, uint64(*m.B)) + } + if m.A != nil { + data[i] = 0x50 + i++ + i = encodeVarintIssue42(data, i, uint64(*m.A)) + } + if m.XXX_unrecognized != nil { + i += copy(data[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *OrderedFields) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *OrderedFields) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.B != nil { + data[i] = 0x9 + i++ + i = encodeFixed64Issue42(data, i, uint64(*m.B)) + } + if m.A != nil { + data[i] = 0x50 + i++ + i = encodeVarintIssue42(data, i, uint64(*m.A)) + } + if m.XXX_unrecognized != nil { + i += copy(data[i:], m.XXX_unrecognized) + } + return i, nil +} + +func encodeFixed64Issue42(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 encodeFixed32Issue42(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 encodeVarintIssue42(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 NewPopulatedUnorderedFields(r randyIssue42, easy bool) *UnorderedFields { + this := &UnorderedFields{} + if r.Intn(10) != 0 { + v1 := uint64(uint64(r.Uint32())) + this.B = &v1 + } + if r.Intn(10) != 0 { + v2 := int64(r.Int63()) + if r.Intn(2) == 0 { + v2 *= -1 + } + this.A = &v2 + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedIssue42(r, 11) + } + return this +} + +func NewPopulatedOrderedFields(r randyIssue42, easy bool) *OrderedFields { + this := &OrderedFields{} + if r.Intn(10) != 0 { + v3 := uint64(uint64(r.Uint32())) + this.B = &v3 + } + if r.Intn(10) != 0 { + v4 := int64(r.Int63()) + if r.Intn(2) == 0 { + v4 *= -1 + } + this.A = &v4 + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedIssue42(r, 11) + } + return this +} + +type randyIssue42 interface { + Float32() float32 + Float64() float64 + Int63() int64 + Int31() int32 + Uint32() uint32 + Intn(n int) int +} + +func randUTF8RuneIssue42(r randyIssue42) 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 randStringIssue42(r randyIssue42) string { + v5 := r.Intn(100) + tmps := make([]rune, v5) + for i := 0; i < v5; i++ { + tmps[i] = randUTF8RuneIssue42(r) + } + return string(tmps) +} +func randUnrecognizedIssue42(r randyIssue42, 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 = randFieldIssue42(data, r, fieldNumber, wire) + } + return data +} +func randFieldIssue42(data []byte, r randyIssue42, fieldNumber int, wire int) []byte { + key := uint32(fieldNumber)<<3 | uint32(wire) + switch wire { + case 0: + data = encodeVarintPopulateIssue42(data, uint64(key)) + v6 := r.Int63() + if r.Intn(2) == 0 { + v6 *= -1 + } + data = encodeVarintPopulateIssue42(data, uint64(v6)) + case 1: + data = encodeVarintPopulateIssue42(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 = encodeVarintPopulateIssue42(data, uint64(key)) + ll := r.Intn(100) + data = encodeVarintPopulateIssue42(data, uint64(ll)) + for j := 0; j < ll; j++ { + data = append(data, byte(r.Intn(256))) + } + default: + data = encodeVarintPopulateIssue42(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 encodeVarintPopulateIssue42(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 *UnorderedFields) Size() (n int) { + var l int + _ = l + if m.B != nil { + n += 9 + } + if m.A != nil { + n += 1 + sovIssue42(uint64(*m.A)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *OrderedFields) Size() (n int) { + var l int + _ = l + if m.B != nil { + n += 9 + } + if m.A != nil { + n += 1 + sovIssue42(uint64(*m.A)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func sovIssue42(x uint64) (n int) { + for { + n++ + x >>= 7 + if x == 0 { + break + } + } + return n +} +func sozIssue42(x uint64) (n int) { + return sovIssue42(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *UnorderedFields) 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 ErrIntOverflowIssue42 + } + 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: UnorderedFields: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: UnorderedFields: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field B", 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.B = &v + case 10: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field A", wireType) + } + var v int64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowIssue42 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.A = &v + default: + iNdEx = preIndex + skippy, err := skipIssue42(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthIssue42 + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *OrderedFields) 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 ErrIntOverflowIssue42 + } + 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: OrderedFields: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: OrderedFields: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field B", 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.B = &v + case 10: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field A", wireType) + } + var v int64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowIssue42 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.A = &v + default: + iNdEx = preIndex + skippy, err := skipIssue42(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthIssue42 + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipIssue42(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, ErrIntOverflowIssue42 + } + 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, ErrIntOverflowIssue42 + } + 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, ErrIntOverflowIssue42 + } + 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, ErrInvalidLengthIssue42 + } + return iNdEx, nil + case 3: + for { + var innerWire uint64 + var start int = iNdEx + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowIssue42 + } + 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 := skipIssue42(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 ( + ErrInvalidLengthIssue42 = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowIssue42 = fmt.Errorf("proto: integer overflow") +) + +var fileDescriptorIssue42 = []byte{ + // 140 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xe2, 0xe2, 0xcd, 0x2c, 0x2e, 0x2e, + 0x4d, 0x35, 0x31, 0xd2, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x62, 0x87, 0x72, 0xa5, 0x74, 0xd3, + 0x33, 0x4b, 0x32, 0x4a, 0x93, 0xf4, 0x92, 0xf3, 0x73, 0xf5, 0xd3, 0xf3, 0xd3, 0xf3, 0xf5, 0xc1, + 0xf2, 0x49, 0xa5, 0x69, 0x60, 0x1e, 0x98, 0x03, 0x66, 0x41, 0xf4, 0x29, 0xe9, 0x72, 0xf1, 0x87, + 0xe6, 0xe5, 0x17, 0xa5, 0xa4, 0x16, 0xa5, 0xa6, 0xb8, 0x65, 0xa6, 0xe6, 0xa4, 0x14, 0x0b, 0xf1, + 0x70, 0x31, 0x3a, 0x49, 0x30, 0x2a, 0x30, 0x6a, 0xb0, 0x05, 0x31, 0x26, 0x81, 0x78, 0x8e, 0x12, + 0x5c, 0x40, 0x1e, 0x73, 0x10, 0x63, 0xa2, 0x92, 0x36, 0x17, 0xaf, 0x3f, 0xb1, 0x8a, 0x9d, 0x04, + 0x7e, 0x3c, 0x94, 0x63, 0x3c, 0xf1, 0x48, 0x8e, 0xf1, 0x02, 0x10, 0x3f, 0x00, 0x62, 0x40, 0x00, + 0x00, 0x00, 0xff, 0xff, 0xad, 0x9a, 0xd1, 0x5b, 0xb5, 0x00, 0x00, 0x00, +} diff --git a/vendor/github.com/gogo/protobuf/test/issue42order/issue42.proto b/vendor/github.com/gogo/protobuf/test/issue42order/issue42.proto new file mode 100644 index 000000000..abaf4a63a --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/issue42order/issue42.proto @@ -0,0 +1,46 @@ +// Copyright (c) 2015, Vastech SA (PTY) LTD. 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 issue42; + +import "github.com/gogo/protobuf/gogoproto/gogo.proto"; + +option (gogoproto.sizer_all) = true; +option (gogoproto.marshaler_all) = true; +option (gogoproto.unmarshaler_all) = true; +option (gogoproto.populate_all) = true; + +message UnorderedFields { + optional int64 A = 10; + optional fixed64 B = 1; +} + +message OrderedFields { + optional fixed64 B = 1; + optional int64 A = 10; +} diff --git a/vendor/github.com/gogo/protobuf/test/issue42order/order_test.go b/vendor/github.com/gogo/protobuf/test/issue42order/order_test.go new file mode 100644 index 000000000..2d8069a95 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/issue42order/order_test.go @@ -0,0 +1,54 @@ +// Copyright (c) 2015, Vastech SA (PTY) LTD. All rights reserved. +// http://github.com/gogo/protobuf/gogoproto +// +// 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 issue42 + +import ( + "bytes" + "github.com/gogo/protobuf/proto" + math_rand "math/rand" + "testing" + time "time" +) + +func TestIssue42Order(t *testing.T) { + unordered := NewPopulatedUnorderedFields(math_rand.New(math_rand.NewSource(time.Now().UnixNano())), false) + udata, err := proto.Marshal(unordered) + if err != nil { + t.Fatal(err) + } + ordered := &OrderedFields{} + if err = proto.Unmarshal(udata, ordered); err != nil { + t.Fatal(err) + } + data, err := proto.Marshal(ordered) + if err != nil { + t.Fatal(err) + } + if !bytes.Equal(udata, data) { + t.Fatalf("expected data to be marshaled in the same order, please sort fields before marshaling") + } +} diff --git a/vendor/github.com/gogo/protobuf/test/issue8/Makefile b/vendor/github.com/gogo/protobuf/test/issue8/Makefile new file mode 100644 index 000000000..e6a2cc3c9 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/issue8/Makefile @@ -0,0 +1,30 @@ +# Extensions for Protocol Buffers to create more go like structures. +# +# Copyright (c) 2013, Vastech SA (PTY) LTD. 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: + (protoc --proto_path=../../../../../:../../protobuf/:. --gogo_out=. proto.proto) diff --git a/vendor/github.com/gogo/protobuf/test/issue8/proto.pb.go b/vendor/github.com/gogo/protobuf/test/issue8/proto.pb.go new file mode 100644 index 000000000..757163818 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/issue8/proto.pb.go @@ -0,0 +1,366 @@ +// Code generated by protoc-gen-gogo. +// source: proto.proto +// DO NOT EDIT! + +/* +Package proto is a generated protocol buffer package. + +It is generated from these files: + proto.proto + +It has these top-level messages: + Foo +*/ +package proto + +import proto1 "github.com/gogo/protobuf/proto" +import fmt "fmt" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" + +import bytes "bytes" + +import io "io" +import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto1.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. +const _ = proto1.GoGoProtoPackageIsVersion1 + +type Foo struct { + Bar *uint64 `protobuf:"varint,1,req,name=bar" json:"bar,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *Foo) Reset() { *m = Foo{} } +func (m *Foo) String() string { return proto1.CompactTextString(m) } +func (*Foo) ProtoMessage() {} +func (*Foo) Descriptor() ([]byte, []int) { return fileDescriptorProto, []int{0} } + +func (m *Foo) GetBar() uint64 { + if m != nil && m.Bar != nil { + return *m.Bar + } + return 0 +} + +func init() { + proto1.RegisterType((*Foo)(nil), "proto.Foo") +} +func (this *Foo) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*Foo) + if !ok { + that2, ok := that.(Foo) + 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.Bar != nil && that1.Bar != nil { + if *this.Bar != *that1.Bar { + return false + } + } else if this.Bar != nil { + return false + } else if that1.Bar != nil { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func NewPopulatedFoo(r randyProto, easy bool) *Foo { + this := &Foo{} + v1 := uint64(uint64(r.Uint32())) + this.Bar = &v1 + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedProto(r, 2) + } + return this +} + +type randyProto interface { + Float32() float32 + Float64() float64 + Int63() int64 + Int31() int32 + Uint32() uint32 + Intn(n int) int +} + +func randUTF8RuneProto(r randyProto) 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 randStringProto(r randyProto) string { + v2 := r.Intn(100) + tmps := make([]rune, v2) + for i := 0; i < v2; i++ { + tmps[i] = randUTF8RuneProto(r) + } + return string(tmps) +} +func randUnrecognizedProto(r randyProto, 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 = randFieldProto(data, r, fieldNumber, wire) + } + return data +} +func randFieldProto(data []byte, r randyProto, fieldNumber int, wire int) []byte { + key := uint32(fieldNumber)<<3 | uint32(wire) + switch wire { + case 0: + data = encodeVarintPopulateProto(data, uint64(key)) + v3 := r.Int63() + if r.Intn(2) == 0 { + v3 *= -1 + } + data = encodeVarintPopulateProto(data, uint64(v3)) + case 1: + data = encodeVarintPopulateProto(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 = encodeVarintPopulateProto(data, uint64(key)) + ll := r.Intn(100) + data = encodeVarintPopulateProto(data, uint64(ll)) + for j := 0; j < ll; j++ { + data = append(data, byte(r.Intn(256))) + } + default: + data = encodeVarintPopulateProto(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 encodeVarintPopulateProto(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 *Foo) 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 ErrIntOverflowProto + } + 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: Foo: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Foo: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Bar", wireType) + } + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProto + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Bar = &v + hasFields[0] |= uint64(0x00000001) + default: + iNdEx = preIndex + skippy, err := skipProto(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthProto + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + if hasFields[0]&uint64(0x00000001) == 0 { + return github_com_gogo_protobuf_proto.NewRequiredNotSetError("bar") + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipProto(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, ErrIntOverflowProto + } + 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, ErrIntOverflowProto + } + 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, ErrIntOverflowProto + } + 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, ErrInvalidLengthProto + } + return iNdEx, nil + case 3: + for { + var innerWire uint64 + var start int = iNdEx + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowProto + } + 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 := skipProto(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 ( + ErrInvalidLengthProto = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowProto = fmt.Errorf("proto: integer overflow") +) + +var fileDescriptorProto = []byte{ + // 106 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xe2, 0xe2, 0x2e, 0x28, 0xca, 0x2f, + 0xc9, 0xd7, 0x03, 0x93, 0x42, 0xac, 0x60, 0x4a, 0x4a, 0x37, 0x3d, 0xb3, 0x24, 0xa3, 0x34, 0x49, + 0x2f, 0x39, 0x3f, 0x57, 0x3f, 0x3d, 0x3f, 0x3d, 0x5f, 0x1f, 0x2c, 0x9c, 0x54, 0x9a, 0x06, 0xe6, + 0x81, 0x39, 0x60, 0x16, 0x44, 0x97, 0x92, 0x38, 0x17, 0xb3, 0x5b, 0x7e, 0xbe, 0x90, 0x00, 0x17, + 0x73, 0x52, 0x62, 0x91, 0x04, 0xa3, 0x02, 0x93, 0x06, 0x4b, 0x10, 0x88, 0xe9, 0x24, 0xf0, 0xe3, + 0xa1, 0x1c, 0xe3, 0x8a, 0x47, 0x72, 0x8c, 0x3b, 0x80, 0xf8, 0x02, 0x10, 0x03, 0x02, 0x00, 0x00, + 0xff, 0xff, 0x54, 0x06, 0x1b, 0x76, 0x6e, 0x00, 0x00, 0x00, +} diff --git a/vendor/github.com/gogo/protobuf/test/issue8/proto.proto b/vendor/github.com/gogo/protobuf/test/issue8/proto.proto new file mode 100644 index 000000000..61d23946b --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/issue8/proto.proto @@ -0,0 +1,14 @@ +syntax = "proto2"; + +package proto; + +import "github.com/gogo/protobuf/gogoproto/gogo.proto"; + +option (gogoproto.unmarshaler_all) = true; +option (gogoproto.testgen_all) = true; +option (gogoproto.populate_all) = true; +option (gogoproto.equal_all) = true; + +message Foo { + required uint64 bar = 1; +} diff --git a/vendor/github.com/gogo/protobuf/test/issue8/protopb_test.go b/vendor/github.com/gogo/protobuf/test/issue8/protopb_test.go new file mode 100644 index 000000000..fd9207b39 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/issue8/protopb_test.go @@ -0,0 +1,108 @@ +// Code generated by protoc-gen-gogo. +// source: proto.proto +// DO NOT EDIT! + +/* +Package proto is a generated protocol buffer package. + +It is generated from these files: + proto.proto + +It has these top-level messages: + Foo +*/ +package proto + +import testing "testing" +import math_rand "math/rand" +import time "time" +import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" +import github_com_gogo_protobuf_jsonpb "github.com/gogo/protobuf/jsonpb" +import proto1 "github.com/gogo/protobuf/proto" +import fmt "fmt" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto1.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +func TestFooProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedFoo(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Foo{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestFooJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedFoo(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Foo{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestFooProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedFoo(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &Foo{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestFooProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedFoo(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &Foo{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +//These tests are generated by github.com/gogo/protobuf/plugin/testgen diff --git a/vendor/github.com/gogo/protobuf/test/mapsproto2/Makefile b/vendor/github.com/gogo/protobuf/test/mapsproto2/Makefile new file mode 100644 index 000000000..96f71ef18 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/mapsproto2/Makefile @@ -0,0 +1,33 @@ +# Extensions for Protocol Buffers to create more go like structures. +# +# Copyright (c) 2013, Vastech SA (PTY) LTD. All rights reserved. +# http://github.com/gogo/protobuf/gogoproto +# +# 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: + cp header.proto mapsproto2.proto + cat ../theproto3/maps.proto >> mapsproto2.proto + go install github.com/gogo/protobuf/protoc-gen-combo + protoc-gen-combo --version="3.0.0" --proto_path=../../../../../:../../protobuf/:. mapsproto2.proto \ No newline at end of file diff --git a/vendor/github.com/gogo/protobuf/test/mapsproto2/combos/both/mapsproto2.pb.go b/vendor/github.com/gogo/protobuf/test/mapsproto2/combos/both/mapsproto2.pb.go new file mode 100644 index 000000000..7e1f07763 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/mapsproto2/combos/both/mapsproto2.pb.go @@ -0,0 +1,7436 @@ +// Code generated by protoc-gen-gogo. +// source: combos/both/mapsproto2.proto +// DO NOT EDIT! + +/* + Package proto2_maps is a generated protocol buffer package. + + It is generated from these files: + combos/both/mapsproto2.proto + + It has these top-level messages: + FloatingPoint + AllMaps + AllMapsOrdered +*/ +package proto2_maps + +import proto "github.com/gogo/protobuf/proto" +import fmt "fmt" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" + +import github_com_gogo_protobuf_protoc_gen_gogo_descriptor "github.com/gogo/protobuf/protoc-gen-gogo/descriptor" +import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" +import compress_gzip "compress/gzip" +import bytes "bytes" +import io_ioutil "io/ioutil" + +import strconv "strconv" + +import strings "strings" +import sort "sort" +import reflect "reflect" +import github_com_gogo_protobuf_sortkeys "github.com/gogo/protobuf/sortkeys" + +import errors "errors" + +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. +const _ = proto.GoGoProtoPackageIsVersion1 + +type MapEnum int32 + +const ( + MA MapEnum = 0 + MB MapEnum = 1 + MC MapEnum = 2 +) + +var MapEnum_name = map[int32]string{ + 0: "MA", + 1: "MB", + 2: "MC", +} +var MapEnum_value = map[string]int32{ + "MA": 0, + "MB": 1, + "MC": 2, +} + +func (x MapEnum) Enum() *MapEnum { + p := new(MapEnum) + *p = x + return p +} +func (x MapEnum) MarshalJSON() ([]byte, error) { + return proto.MarshalJSONEnum(MapEnum_name, int32(x)) +} +func (x *MapEnum) UnmarshalJSON(data []byte) error { + value, err := proto.UnmarshalJSONEnum(MapEnum_value, data, "MapEnum") + if err != nil { + return err + } + *x = MapEnum(value) + return nil +} +func (MapEnum) EnumDescriptor() ([]byte, []int) { return fileDescriptorMapsproto2, []int{0} } + +type FloatingPoint struct { + F *float64 `protobuf:"fixed64,1,opt,name=f" json:"f,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *FloatingPoint) Reset() { *m = FloatingPoint{} } +func (*FloatingPoint) ProtoMessage() {} +func (*FloatingPoint) Descriptor() ([]byte, []int) { return fileDescriptorMapsproto2, []int{0} } + +type AllMaps struct { + StringToDoubleMap map[string]float64 `protobuf:"bytes,1,rep,name=StringToDoubleMap,json=stringToDoubleMap" json:"StringToDoubleMap,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"fixed64,2,opt,name=value"` + StringToFloatMap map[string]float32 `protobuf:"bytes,2,rep,name=StringToFloatMap,json=stringToFloatMap" json:"StringToFloatMap,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"fixed32,2,opt,name=value"` + Int32Map map[int32]int32 `protobuf:"bytes,3,rep,name=Int32Map,json=int32Map" json:"Int32Map,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"varint,2,opt,name=value"` + Int64Map map[int64]int64 `protobuf:"bytes,4,rep,name=Int64Map,json=int64Map" json:"Int64Map,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"varint,2,opt,name=value"` + Uint32Map map[uint32]uint32 `protobuf:"bytes,5,rep,name=Uint32Map,json=uint32Map" json:"Uint32Map,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"varint,2,opt,name=value"` + Uint64Map map[uint64]uint64 `protobuf:"bytes,6,rep,name=Uint64Map,json=uint64Map" json:"Uint64Map,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"varint,2,opt,name=value"` + Sint32Map map[int32]int32 `protobuf:"bytes,7,rep,name=Sint32Map,json=sint32Map" json:"Sint32Map,omitempty" protobuf_key:"zigzag32,1,opt,name=key" protobuf_val:"zigzag32,2,opt,name=value"` + Sint64Map map[int64]int64 `protobuf:"bytes,8,rep,name=Sint64Map,json=sint64Map" json:"Sint64Map,omitempty" protobuf_key:"zigzag64,1,opt,name=key" protobuf_val:"zigzag64,2,opt,name=value"` + Fixed32Map map[uint32]uint32 `protobuf:"bytes,9,rep,name=Fixed32Map,json=fixed32Map" json:"Fixed32Map,omitempty" protobuf_key:"fixed32,1,opt,name=key" protobuf_val:"fixed32,2,opt,name=value"` + Sfixed32Map map[int32]int32 `protobuf:"bytes,10,rep,name=Sfixed32Map,json=sfixed32Map" json:"Sfixed32Map,omitempty" protobuf_key:"fixed32,1,opt,name=key" protobuf_val:"fixed32,2,opt,name=value"` + Fixed64Map map[uint64]uint64 `protobuf:"bytes,11,rep,name=Fixed64Map,json=fixed64Map" json:"Fixed64Map,omitempty" protobuf_key:"fixed64,1,opt,name=key" protobuf_val:"fixed64,2,opt,name=value"` + Sfixed64Map map[int64]int64 `protobuf:"bytes,12,rep,name=Sfixed64Map,json=sfixed64Map" json:"Sfixed64Map,omitempty" protobuf_key:"fixed64,1,opt,name=key" protobuf_val:"fixed64,2,opt,name=value"` + BoolMap map[bool]bool `protobuf:"bytes,13,rep,name=BoolMap,json=boolMap" json:"BoolMap,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"varint,2,opt,name=value"` + StringMap map[string]string `protobuf:"bytes,14,rep,name=StringMap,json=stringMap" json:"StringMap,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + StringToBytesMap map[string][]byte `protobuf:"bytes,15,rep,name=StringToBytesMap,json=stringToBytesMap" json:"StringToBytesMap,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + StringToEnumMap map[string]MapEnum `protobuf:"bytes,16,rep,name=StringToEnumMap,json=stringToEnumMap" json:"StringToEnumMap,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"varint,2,opt,name=value,enum=proto2.maps.MapEnum"` + StringToMsgMap map[string]*FloatingPoint `protobuf:"bytes,17,rep,name=StringToMsgMap,json=stringToMsgMap" json:"StringToMsgMap,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *AllMaps) Reset() { *m = AllMaps{} } +func (*AllMaps) ProtoMessage() {} +func (*AllMaps) Descriptor() ([]byte, []int) { return fileDescriptorMapsproto2, []int{1} } + +type AllMapsOrdered struct { + StringToDoubleMap map[string]float64 `protobuf:"bytes,1,rep,name=StringToDoubleMap,json=stringToDoubleMap" json:"StringToDoubleMap,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"fixed64,2,opt,name=value"` + StringToFloatMap map[string]float32 `protobuf:"bytes,2,rep,name=StringToFloatMap,json=stringToFloatMap" json:"StringToFloatMap,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"fixed32,2,opt,name=value"` + Int32Map map[int32]int32 `protobuf:"bytes,3,rep,name=Int32Map,json=int32Map" json:"Int32Map,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"varint,2,opt,name=value"` + Int64Map map[int64]int64 `protobuf:"bytes,4,rep,name=Int64Map,json=int64Map" json:"Int64Map,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"varint,2,opt,name=value"` + Uint32Map map[uint32]uint32 `protobuf:"bytes,5,rep,name=Uint32Map,json=uint32Map" json:"Uint32Map,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"varint,2,opt,name=value"` + Uint64Map map[uint64]uint64 `protobuf:"bytes,6,rep,name=Uint64Map,json=uint64Map" json:"Uint64Map,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"varint,2,opt,name=value"` + Sint32Map map[int32]int32 `protobuf:"bytes,7,rep,name=Sint32Map,json=sint32Map" json:"Sint32Map,omitempty" protobuf_key:"zigzag32,1,opt,name=key" protobuf_val:"zigzag32,2,opt,name=value"` + Sint64Map map[int64]int64 `protobuf:"bytes,8,rep,name=Sint64Map,json=sint64Map" json:"Sint64Map,omitempty" protobuf_key:"zigzag64,1,opt,name=key" protobuf_val:"zigzag64,2,opt,name=value"` + Fixed32Map map[uint32]uint32 `protobuf:"bytes,9,rep,name=Fixed32Map,json=fixed32Map" json:"Fixed32Map,omitempty" protobuf_key:"fixed32,1,opt,name=key" protobuf_val:"fixed32,2,opt,name=value"` + Sfixed32Map map[int32]int32 `protobuf:"bytes,10,rep,name=Sfixed32Map,json=sfixed32Map" json:"Sfixed32Map,omitempty" protobuf_key:"fixed32,1,opt,name=key" protobuf_val:"fixed32,2,opt,name=value"` + Fixed64Map map[uint64]uint64 `protobuf:"bytes,11,rep,name=Fixed64Map,json=fixed64Map" json:"Fixed64Map,omitempty" protobuf_key:"fixed64,1,opt,name=key" protobuf_val:"fixed64,2,opt,name=value"` + Sfixed64Map map[int64]int64 `protobuf:"bytes,12,rep,name=Sfixed64Map,json=sfixed64Map" json:"Sfixed64Map,omitempty" protobuf_key:"fixed64,1,opt,name=key" protobuf_val:"fixed64,2,opt,name=value"` + BoolMap map[bool]bool `protobuf:"bytes,13,rep,name=BoolMap,json=boolMap" json:"BoolMap,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"varint,2,opt,name=value"` + StringMap map[string]string `protobuf:"bytes,14,rep,name=StringMap,json=stringMap" json:"StringMap,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + StringToBytesMap map[string][]byte `protobuf:"bytes,15,rep,name=StringToBytesMap,json=stringToBytesMap" json:"StringToBytesMap,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + StringToEnumMap map[string]MapEnum `protobuf:"bytes,16,rep,name=StringToEnumMap,json=stringToEnumMap" json:"StringToEnumMap,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"varint,2,opt,name=value,enum=proto2.maps.MapEnum"` + StringToMsgMap map[string]*FloatingPoint `protobuf:"bytes,17,rep,name=StringToMsgMap,json=stringToMsgMap" json:"StringToMsgMap,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *AllMapsOrdered) Reset() { *m = AllMapsOrdered{} } +func (*AllMapsOrdered) ProtoMessage() {} +func (*AllMapsOrdered) Descriptor() ([]byte, []int) { return fileDescriptorMapsproto2, []int{2} } + +func init() { + proto.RegisterType((*FloatingPoint)(nil), "proto2.maps.FloatingPoint") + proto.RegisterType((*AllMaps)(nil), "proto2.maps.AllMaps") + proto.RegisterType((*AllMapsOrdered)(nil), "proto2.maps.AllMapsOrdered") + proto.RegisterEnum("proto2.maps.MapEnum", MapEnum_name, MapEnum_value) +} +func (this *FloatingPoint) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return Mapsproto2Description() +} +func (this *AllMaps) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return Mapsproto2Description() +} +func (this *AllMapsOrdered) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return Mapsproto2Description() +} +func Mapsproto2Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + d := &github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet{} + var gzipped = []byte{ + // 4105 bytes of a gzipped FileDescriptorSet + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xec, 0x5a, 0x5b, 0x6c, 0x23, 0xe7, + 0x75, 0x5e, 0xde, 0xc9, 0x43, 0x8a, 0x1c, 0x8d, 0xe4, 0x35, 0xad, 0xd8, 0xbb, 0x5e, 0xda, 0x8e, + 0xd7, 0x72, 0x22, 0x39, 0x4a, 0x6c, 0xaf, 0xe9, 0xc4, 0x81, 0x2e, 0x5c, 0xad, 0x1c, 0x5d, 0xd8, + 0xa1, 0x64, 0xaf, 0x5d, 0x18, 0xec, 0x88, 0x1c, 0x52, 0xb4, 0xc9, 0x19, 0x96, 0x33, 0x5c, 0xaf, + 0xf2, 0xe4, 0xc2, 0xbd, 0x20, 0x28, 0x7a, 0x2f, 0x50, 0xc7, 0x71, 0xd2, 0x3a, 0x68, 0xeb, 0x34, + 0xbd, 0x25, 0xbd, 0xa1, 0xe8, 0x53, 0x80, 0x22, 0x6d, 0x9e, 0x8a, 0xb4, 0x4f, 0x79, 0xc8, 0x43, + 0x92, 0x1a, 0xa8, 0xdb, 0xa6, 0xad, 0x0b, 0x2c,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x3e, 0xcf, 0x29, 0x52, + 0x44, 0x9f, 0x40, 0xd7, 0x21, 0xd7, 0xb6, 0x78, 0x1a, 0x0e, 0x87, 0x7f, 0x81, 0xc3, 0xb3, 0x02, + 0xc3, 0x29, 0xfa, 0x56, 0x7f, 0xd8, 0x25, 0x39, 0x3a, 0x9c, 0xe2, 0x77, 0x05, 0x85, 0xc0, 0x70, + 0x8a, 0x33, 0xb8, 0xf5, 0xf7, 0x04, 0x85, 0x2d, 0xf9, 0xf3, 0x93, 0xe4, 0xac, 0xb7, 0x7b, 0x6a, + 0x99, 0xb3, 0x18, 0xf1, 0x26, 0x67, 0x00, 0x0e, 0x21, 0x04, 0x4f, 0x42, 0x66, 0xd6, 0x89, 0xf8, + 0x03, 0x0e, 0x4f, 0x1b, 0x62, 0x06, 0x70, 0x9d, 0x89, 0x24, 0x43, 0x7e, 0x5b, 0x09, 0xa7, 0xf8, + 0x43, 0x4e, 0x91, 0x97, 0x60, 0xfc, 0x31, 0x1c, 0xc3, 0x76, 0x70, 0xab, 0x3e, 0x03, 0xc9, 0x5b, + 0xe2, 0x31, 0x38, 0x84, 0xbb, 0xf2, 0xd8, 0x30, 0x1b, 0x27, 0xb3, 0x31, 0x7c, 0x49, 0xb8, 0x52, + 0x60, 0x08, 0x05, 0x66, 0x9e, 0x9e, 0x3e, 0xc0, 0xcd, 0x75, 0x77, 0xa6, 0xe9, 0xf8, 0x23, 0xce, + 0x91, 0x73, 0x41, 0xdc, 0x23, 0x43, 0xf3, 0x2c, 0x34, 0x5f, 0x16, 0x1e, 0x91, 0x60, 0x7c, 0xe9, + 0xe1, 0xce, 0x94, 0x74, 0x12, 0x67, 0x61, 0xfb, 0x63, 0xb1, 0xf4, 0x18, 0x76, 0x4f, 0x66, 0xc4, + 0x99, 0xb6, 0x71, 0x0b, 0x3e, 0x0b, 0xcd, 0x9f, 0x88, 0x99, 0xa6, 0x00, 0x02, 0x7e, 0x0e, 0xee, + 0x0a, 0x4c, 0xf5, 0x33, 0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x78, 0x24, 0xc8, + 0xf8, 0x2b, 0x80, 0xf7, 0x05, 0x12, 0xb8, 0x5a, 0x8c, 0x21, 0x33, 0x74, 0x4d, 0xe0, 0x14, 0xcc, + 0x86, 0x64, 0x08, 0x85, 0x64, 0x04, 0xa5, 0x70, 0xad, 0xa8, 0xb9, 0x56, 0xa4, 0xa6, 0x50, 0xd4, + 0x7c, 0x56, 0xd8, 0xb2, 0x15, 0x35, 0xd7, 0x8a, 0x74, 0x08, 0x85, 0x6c, 0x85, 0xed, 0x5a, 0xb1, + 0x05, 0x70, 0xb5, 0x73, 0xd3, 0x68, 0x32, 0x33, 0x32, 0xfc, 0x94, 0x3f, 0x88, 0x63, 0xa4, 0xc6, + 0x48, 0xa0, 0xe5, 0x0a, 0xd4, 0x6d, 0xc8, 0xd6, 0x46, 0x97, 0xf4, 0x35, 0x41, 0xf2, 0x06, 0x64, + 0xa0, 0x29, 0x2d, 0x1f, 0x4f, 0xd6, 0x96, 0x88, 0x84, 0x39, 0xec, 0x91, 0xb2, 0x61, 0xe6, 0x48, + 0xcf, 0xc4, 0xcc, 0x61, 0x0f, 0xe5, 0x9a, 0xc3, 0x68, 0x72, 0xa1, 0xe6, 0x48, 0x3c, 0xdc, 0x1c, + 0x46, 0x84, 0x95, 0x66, 0xc3, 0xb2, 0x88, 0x66, 0x71, 0x8e, 0x92, 0x5c, 0x0a, 0x24, 0xe1, 0x3a, + 0x8c, 0x20, 0x75, 0xcc, 0xae, 0xe8, 0xec, 0xd0, 0xd0, 0x27, 0xf0, 0xfc, 0xb4, 0xd9, 0x11, 0x5a, + 0x62, 0x76, 0xc4, 0xb5, 0xbc, 0x02, 0x37, 0x4e, 0xb1, 0xb9, 0x23, 0x4c, 0x85, 0x19, 0x56, 0xa0, + 0x50, 0xf6, 0xad, 0x40, 0x21, 0x56, 0x6b, 0x50, 0x10, 0xaa, 0x64, 0x1b, 0x4e, 0x68, 0x15, 0xfe, + 0x5e, 0xd7, 0x34, 0x5a, 0xae, 0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0xed, 0xf2, 0x34, 0xae, 0xe0, 0xe6, 0xed, 0xda, 0x78, 0xf3, 0xb6, 0x1c, 0xbe, + 0x16, 0x83, 0x7a, 0xb8, 0x17, 0x26, 0xf6, 0x70, 0x33, 0x2d, 0xee, 0xb0, 0x56, 0xee, 0xf9, 0x49, + 0xad, 0xdc, 0x23, 0xb3, 0xb0, 0x4f, 0xef, 0xe8, 0x9e, 0x9d, 0xd0, 0xd1, 0xad, 0xce, 0x42, 0x7d, + 0xbb, 0xb1, 0xbb, 0xdd, 0xd8, 0xdd, 0x6e, 0xec, 0x6e, 0x37, 0x76, 0xef, 0x8f, 0xc6, 0xae, 0x1c, + 0x7f, 0xed, 0xcd, 0x8b, 0x91, 0xe5, 0x4b, 0x90, 0xe2, 0xb7, 0x56, 0x93, 0x10, 0xdd, 0x5b, 0x57, + 0xce, 0xd1, 0xff, 0x1b, 0x4a, 0x84, 0xfe, 0xdf, 0x54, 0xa2, 0x1b, 0xbb, 0xdf, 0xf8, 0xee, 0x85, + 0x73, 0xdf, 0xc4, 0xcf, 0xb7, 0xf0, 0xf3, 0x9d, 0xef, 0x5e, 0x88, 0xbc, 0x83, 0x9f, 0x77, 0xf1, + 0xf3, 0x03, 0xfc, 0xbc, 0xf2, 0xbd, 0x0b, 0x91, 0x2f, 0xe1, 0xe7, 0x2b, 0xf8, 0xf9, 0x5b, 0xfc, + 0x7c, 0x0d, 0x3f, 0xdf, 0xc0, 0xcf, 0x37, 0xf1, 0xf3, 0x1d, 0xfc, 0xbc, 0xf3, 0xbd, 0x0b, 0xe7, + 0xde, 0xc5, 0xff, 0x3f, 0xc0, 0xff, 0xaf, 0xfc, 0xeb, 0x85, 0x73, 0xff, 0x1f, 0x00, 0x00, 0xff, + 0xff, 0x58, 0x4b, 0xd1, 0xa0, 0x91, 0x3e, 0x00, 0x00, + } + r := bytes.NewReader(gzipped) + gzipr, err := compress_gzip.NewReader(r) + if err != nil { + panic(err) + } + ungzipped, err := io_ioutil.ReadAll(gzipr) + if err != nil { + panic(err) + } + if err := github_com_gogo_protobuf_proto.Unmarshal(ungzipped, d); err != nil { + panic(err) + } + return d +} +func (x MapEnum) String() string { + s, ok := MapEnum_name[int32(x)] + if ok { + return s + } + return strconv.Itoa(int(x)) +} +func (this *FloatingPoint) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*FloatingPoint) + if !ok { + that2, ok := that.(FloatingPoint) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *FloatingPoint") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *FloatingPoint but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *FloatingPoint but is not nil && this == nil") + } + if this.F != nil && that1.F != nil { + if *this.F != *that1.F { + return fmt.Errorf("F this(%v) Not Equal that(%v)", *this.F, *that1.F) + } + } else if this.F != nil { + return fmt.Errorf("this.F == nil && that.F != nil") + } else if that1.F != nil { + return fmt.Errorf("F this(%v) Not Equal that(%v)", this.F, that1.F) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *FloatingPoint) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*FloatingPoint) + if !ok { + that2, ok := that.(FloatingPoint) + 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.F != nil && that1.F != nil { + if *this.F != *that1.F { + return false + } + } else if this.F != nil { + return false + } else if that1.F != nil { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *AllMaps) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*AllMaps) + if !ok { + that2, ok := that.(AllMaps) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *AllMaps") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *AllMaps but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *AllMaps but is not nil && this == nil") + } + if len(this.StringToDoubleMap) != len(that1.StringToDoubleMap) { + return fmt.Errorf("StringToDoubleMap this(%v) Not Equal that(%v)", len(this.StringToDoubleMap), len(that1.StringToDoubleMap)) + } + for i := range this.StringToDoubleMap { + if this.StringToDoubleMap[i] != that1.StringToDoubleMap[i] { + return fmt.Errorf("StringToDoubleMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringToDoubleMap[i], i, that1.StringToDoubleMap[i]) + } + } + if len(this.StringToFloatMap) != len(that1.StringToFloatMap) { + return fmt.Errorf("StringToFloatMap this(%v) Not Equal that(%v)", len(this.StringToFloatMap), len(that1.StringToFloatMap)) + } + for i := range this.StringToFloatMap { + if this.StringToFloatMap[i] != that1.StringToFloatMap[i] { + return fmt.Errorf("StringToFloatMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringToFloatMap[i], i, that1.StringToFloatMap[i]) + } + } + if len(this.Int32Map) != len(that1.Int32Map) { + return fmt.Errorf("Int32Map this(%v) Not Equal that(%v)", len(this.Int32Map), len(that1.Int32Map)) + } + for i := range this.Int32Map { + if this.Int32Map[i] != that1.Int32Map[i] { + return fmt.Errorf("Int32Map this[%v](%v) Not Equal that[%v](%v)", i, this.Int32Map[i], i, that1.Int32Map[i]) + } + } + if len(this.Int64Map) != len(that1.Int64Map) { + return fmt.Errorf("Int64Map this(%v) Not Equal that(%v)", len(this.Int64Map), len(that1.Int64Map)) + } + for i := range this.Int64Map { + if this.Int64Map[i] != that1.Int64Map[i] { + return fmt.Errorf("Int64Map this[%v](%v) Not Equal that[%v](%v)", i, this.Int64Map[i], i, that1.Int64Map[i]) + } + } + if len(this.Uint32Map) != len(that1.Uint32Map) { + return fmt.Errorf("Uint32Map this(%v) Not Equal that(%v)", len(this.Uint32Map), len(that1.Uint32Map)) + } + for i := range this.Uint32Map { + if this.Uint32Map[i] != that1.Uint32Map[i] { + return fmt.Errorf("Uint32Map this[%v](%v) Not Equal that[%v](%v)", i, this.Uint32Map[i], i, that1.Uint32Map[i]) + } + } + if len(this.Uint64Map) != len(that1.Uint64Map) { + return fmt.Errorf("Uint64Map this(%v) Not Equal that(%v)", len(this.Uint64Map), len(that1.Uint64Map)) + } + for i := range this.Uint64Map { + if this.Uint64Map[i] != that1.Uint64Map[i] { + return fmt.Errorf("Uint64Map this[%v](%v) Not Equal that[%v](%v)", i, this.Uint64Map[i], i, that1.Uint64Map[i]) + } + } + if len(this.Sint32Map) != len(that1.Sint32Map) { + return fmt.Errorf("Sint32Map this(%v) Not Equal that(%v)", len(this.Sint32Map), len(that1.Sint32Map)) + } + for i := range this.Sint32Map { + if this.Sint32Map[i] != that1.Sint32Map[i] { + return fmt.Errorf("Sint32Map this[%v](%v) Not Equal that[%v](%v)", i, this.Sint32Map[i], i, that1.Sint32Map[i]) + } + } + if len(this.Sint64Map) != len(that1.Sint64Map) { + return fmt.Errorf("Sint64Map this(%v) Not Equal that(%v)", len(this.Sint64Map), len(that1.Sint64Map)) + } + for i := range this.Sint64Map { + if this.Sint64Map[i] != that1.Sint64Map[i] { + return fmt.Errorf("Sint64Map this[%v](%v) Not Equal that[%v](%v)", i, this.Sint64Map[i], i, that1.Sint64Map[i]) + } + } + if len(this.Fixed32Map) != len(that1.Fixed32Map) { + return fmt.Errorf("Fixed32Map this(%v) Not Equal that(%v)", len(this.Fixed32Map), len(that1.Fixed32Map)) + } + for i := range this.Fixed32Map { + if this.Fixed32Map[i] != that1.Fixed32Map[i] { + return fmt.Errorf("Fixed32Map this[%v](%v) Not Equal that[%v](%v)", i, this.Fixed32Map[i], i, that1.Fixed32Map[i]) + } + } + if len(this.Sfixed32Map) != len(that1.Sfixed32Map) { + return fmt.Errorf("Sfixed32Map this(%v) Not Equal that(%v)", len(this.Sfixed32Map), len(that1.Sfixed32Map)) + } + for i := range this.Sfixed32Map { + if this.Sfixed32Map[i] != that1.Sfixed32Map[i] { + return fmt.Errorf("Sfixed32Map this[%v](%v) Not Equal that[%v](%v)", i, this.Sfixed32Map[i], i, that1.Sfixed32Map[i]) + } + } + if len(this.Fixed64Map) != len(that1.Fixed64Map) { + return fmt.Errorf("Fixed64Map this(%v) Not Equal that(%v)", len(this.Fixed64Map), len(that1.Fixed64Map)) + } + for i := range this.Fixed64Map { + if this.Fixed64Map[i] != that1.Fixed64Map[i] { + return fmt.Errorf("Fixed64Map this[%v](%v) Not Equal that[%v](%v)", i, this.Fixed64Map[i], i, that1.Fixed64Map[i]) + } + } + if len(this.Sfixed64Map) != len(that1.Sfixed64Map) { + return fmt.Errorf("Sfixed64Map this(%v) Not Equal that(%v)", len(this.Sfixed64Map), len(that1.Sfixed64Map)) + } + for i := range this.Sfixed64Map { + if this.Sfixed64Map[i] != that1.Sfixed64Map[i] { + return fmt.Errorf("Sfixed64Map this[%v](%v) Not Equal that[%v](%v)", i, this.Sfixed64Map[i], i, that1.Sfixed64Map[i]) + } + } + if len(this.BoolMap) != len(that1.BoolMap) { + return fmt.Errorf("BoolMap this(%v) Not Equal that(%v)", len(this.BoolMap), len(that1.BoolMap)) + } + for i := range this.BoolMap { + if this.BoolMap[i] != that1.BoolMap[i] { + return fmt.Errorf("BoolMap this[%v](%v) Not Equal that[%v](%v)", i, this.BoolMap[i], i, that1.BoolMap[i]) + } + } + if len(this.StringMap) != len(that1.StringMap) { + return fmt.Errorf("StringMap this(%v) Not Equal that(%v)", len(this.StringMap), len(that1.StringMap)) + } + for i := range this.StringMap { + if this.StringMap[i] != that1.StringMap[i] { + return fmt.Errorf("StringMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringMap[i], i, that1.StringMap[i]) + } + } + if len(this.StringToBytesMap) != len(that1.StringToBytesMap) { + return fmt.Errorf("StringToBytesMap this(%v) Not Equal that(%v)", len(this.StringToBytesMap), len(that1.StringToBytesMap)) + } + for i := range this.StringToBytesMap { + if !bytes.Equal(this.StringToBytesMap[i], that1.StringToBytesMap[i]) { + return fmt.Errorf("StringToBytesMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringToBytesMap[i], i, that1.StringToBytesMap[i]) + } + } + if len(this.StringToEnumMap) != len(that1.StringToEnumMap) { + return fmt.Errorf("StringToEnumMap this(%v) Not Equal that(%v)", len(this.StringToEnumMap), len(that1.StringToEnumMap)) + } + for i := range this.StringToEnumMap { + if this.StringToEnumMap[i] != that1.StringToEnumMap[i] { + return fmt.Errorf("StringToEnumMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringToEnumMap[i], i, that1.StringToEnumMap[i]) + } + } + if len(this.StringToMsgMap) != len(that1.StringToMsgMap) { + return fmt.Errorf("StringToMsgMap this(%v) Not Equal that(%v)", len(this.StringToMsgMap), len(that1.StringToMsgMap)) + } + for i := range this.StringToMsgMap { + if !this.StringToMsgMap[i].Equal(that1.StringToMsgMap[i]) { + return fmt.Errorf("StringToMsgMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringToMsgMap[i], i, that1.StringToMsgMap[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *AllMaps) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*AllMaps) + if !ok { + that2, ok := that.(AllMaps) + 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.StringToDoubleMap) != len(that1.StringToDoubleMap) { + return false + } + for i := range this.StringToDoubleMap { + if this.StringToDoubleMap[i] != that1.StringToDoubleMap[i] { + return false + } + } + if len(this.StringToFloatMap) != len(that1.StringToFloatMap) { + return false + } + for i := range this.StringToFloatMap { + if this.StringToFloatMap[i] != that1.StringToFloatMap[i] { + return false + } + } + if len(this.Int32Map) != len(that1.Int32Map) { + return false + } + for i := range this.Int32Map { + if this.Int32Map[i] != that1.Int32Map[i] { + return false + } + } + if len(this.Int64Map) != len(that1.Int64Map) { + return false + } + for i := range this.Int64Map { + if this.Int64Map[i] != that1.Int64Map[i] { + return false + } + } + if len(this.Uint32Map) != len(that1.Uint32Map) { + return false + } + for i := range this.Uint32Map { + if this.Uint32Map[i] != that1.Uint32Map[i] { + return false + } + } + if len(this.Uint64Map) != len(that1.Uint64Map) { + return false + } + for i := range this.Uint64Map { + if this.Uint64Map[i] != that1.Uint64Map[i] { + return false + } + } + if len(this.Sint32Map) != len(that1.Sint32Map) { + return false + } + for i := range this.Sint32Map { + if this.Sint32Map[i] != that1.Sint32Map[i] { + return false + } + } + if len(this.Sint64Map) != len(that1.Sint64Map) { + return false + } + for i := range this.Sint64Map { + if this.Sint64Map[i] != that1.Sint64Map[i] { + return false + } + } + if len(this.Fixed32Map) != len(that1.Fixed32Map) { + return false + } + for i := range this.Fixed32Map { + if this.Fixed32Map[i] != that1.Fixed32Map[i] { + return false + } + } + if len(this.Sfixed32Map) != len(that1.Sfixed32Map) { + return false + } + for i := range this.Sfixed32Map { + if this.Sfixed32Map[i] != that1.Sfixed32Map[i] { + return false + } + } + if len(this.Fixed64Map) != len(that1.Fixed64Map) { + return false + } + for i := range this.Fixed64Map { + if this.Fixed64Map[i] != that1.Fixed64Map[i] { + return false + } + } + if len(this.Sfixed64Map) != len(that1.Sfixed64Map) { + return false + } + for i := range this.Sfixed64Map { + if this.Sfixed64Map[i] != that1.Sfixed64Map[i] { + return false + } + } + if len(this.BoolMap) != len(that1.BoolMap) { + return false + } + for i := range this.BoolMap { + if this.BoolMap[i] != that1.BoolMap[i] { + return false + } + } + if len(this.StringMap) != len(that1.StringMap) { + return false + } + for i := range this.StringMap { + if this.StringMap[i] != that1.StringMap[i] { + return false + } + } + if len(this.StringToBytesMap) != len(that1.StringToBytesMap) { + return false + } + for i := range this.StringToBytesMap { + if !bytes.Equal(this.StringToBytesMap[i], that1.StringToBytesMap[i]) { + return false + } + } + if len(this.StringToEnumMap) != len(that1.StringToEnumMap) { + return false + } + for i := range this.StringToEnumMap { + if this.StringToEnumMap[i] != that1.StringToEnumMap[i] { + return false + } + } + if len(this.StringToMsgMap) != len(that1.StringToMsgMap) { + return false + } + for i := range this.StringToMsgMap { + if !this.StringToMsgMap[i].Equal(that1.StringToMsgMap[i]) { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *AllMapsOrdered) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*AllMapsOrdered) + if !ok { + that2, ok := that.(AllMapsOrdered) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *AllMapsOrdered") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *AllMapsOrdered but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *AllMapsOrdered but is not nil && this == nil") + } + if len(this.StringToDoubleMap) != len(that1.StringToDoubleMap) { + return fmt.Errorf("StringToDoubleMap this(%v) Not Equal that(%v)", len(this.StringToDoubleMap), len(that1.StringToDoubleMap)) + } + for i := range this.StringToDoubleMap { + if this.StringToDoubleMap[i] != that1.StringToDoubleMap[i] { + return fmt.Errorf("StringToDoubleMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringToDoubleMap[i], i, that1.StringToDoubleMap[i]) + } + } + if len(this.StringToFloatMap) != len(that1.StringToFloatMap) { + return fmt.Errorf("StringToFloatMap this(%v) Not Equal that(%v)", len(this.StringToFloatMap), len(that1.StringToFloatMap)) + } + for i := range this.StringToFloatMap { + if this.StringToFloatMap[i] != that1.StringToFloatMap[i] { + return fmt.Errorf("StringToFloatMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringToFloatMap[i], i, that1.StringToFloatMap[i]) + } + } + if len(this.Int32Map) != len(that1.Int32Map) { + return fmt.Errorf("Int32Map this(%v) Not Equal that(%v)", len(this.Int32Map), len(that1.Int32Map)) + } + for i := range this.Int32Map { + if this.Int32Map[i] != that1.Int32Map[i] { + return fmt.Errorf("Int32Map this[%v](%v) Not Equal that[%v](%v)", i, this.Int32Map[i], i, that1.Int32Map[i]) + } + } + if len(this.Int64Map) != len(that1.Int64Map) { + return fmt.Errorf("Int64Map this(%v) Not Equal that(%v)", len(this.Int64Map), len(that1.Int64Map)) + } + for i := range this.Int64Map { + if this.Int64Map[i] != that1.Int64Map[i] { + return fmt.Errorf("Int64Map this[%v](%v) Not Equal that[%v](%v)", i, this.Int64Map[i], i, that1.Int64Map[i]) + } + } + if len(this.Uint32Map) != len(that1.Uint32Map) { + return fmt.Errorf("Uint32Map this(%v) Not Equal that(%v)", len(this.Uint32Map), len(that1.Uint32Map)) + } + for i := range this.Uint32Map { + if this.Uint32Map[i] != that1.Uint32Map[i] { + return fmt.Errorf("Uint32Map this[%v](%v) Not Equal that[%v](%v)", i, this.Uint32Map[i], i, that1.Uint32Map[i]) + } + } + if len(this.Uint64Map) != len(that1.Uint64Map) { + return fmt.Errorf("Uint64Map this(%v) Not Equal that(%v)", len(this.Uint64Map), len(that1.Uint64Map)) + } + for i := range this.Uint64Map { + if this.Uint64Map[i] != that1.Uint64Map[i] { + return fmt.Errorf("Uint64Map this[%v](%v) Not Equal that[%v](%v)", i, this.Uint64Map[i], i, that1.Uint64Map[i]) + } + } + if len(this.Sint32Map) != len(that1.Sint32Map) { + return fmt.Errorf("Sint32Map this(%v) Not Equal that(%v)", len(this.Sint32Map), len(that1.Sint32Map)) + } + for i := range this.Sint32Map { + if this.Sint32Map[i] != that1.Sint32Map[i] { + return fmt.Errorf("Sint32Map this[%v](%v) Not Equal that[%v](%v)", i, this.Sint32Map[i], i, that1.Sint32Map[i]) + } + } + if len(this.Sint64Map) != len(that1.Sint64Map) { + return fmt.Errorf("Sint64Map this(%v) Not Equal that(%v)", len(this.Sint64Map), len(that1.Sint64Map)) + } + for i := range this.Sint64Map { + if this.Sint64Map[i] != that1.Sint64Map[i] { + return fmt.Errorf("Sint64Map this[%v](%v) Not Equal that[%v](%v)", i, this.Sint64Map[i], i, that1.Sint64Map[i]) + } + } + if len(this.Fixed32Map) != len(that1.Fixed32Map) { + return fmt.Errorf("Fixed32Map this(%v) Not Equal that(%v)", len(this.Fixed32Map), len(that1.Fixed32Map)) + } + for i := range this.Fixed32Map { + if this.Fixed32Map[i] != that1.Fixed32Map[i] { + return fmt.Errorf("Fixed32Map this[%v](%v) Not Equal that[%v](%v)", i, this.Fixed32Map[i], i, that1.Fixed32Map[i]) + } + } + if len(this.Sfixed32Map) != len(that1.Sfixed32Map) { + return fmt.Errorf("Sfixed32Map this(%v) Not Equal that(%v)", len(this.Sfixed32Map), len(that1.Sfixed32Map)) + } + for i := range this.Sfixed32Map { + if this.Sfixed32Map[i] != that1.Sfixed32Map[i] { + return fmt.Errorf("Sfixed32Map this[%v](%v) Not Equal that[%v](%v)", i, this.Sfixed32Map[i], i, that1.Sfixed32Map[i]) + } + } + if len(this.Fixed64Map) != len(that1.Fixed64Map) { + return fmt.Errorf("Fixed64Map this(%v) Not Equal that(%v)", len(this.Fixed64Map), len(that1.Fixed64Map)) + } + for i := range this.Fixed64Map { + if this.Fixed64Map[i] != that1.Fixed64Map[i] { + return fmt.Errorf("Fixed64Map this[%v](%v) Not Equal that[%v](%v)", i, this.Fixed64Map[i], i, that1.Fixed64Map[i]) + } + } + if len(this.Sfixed64Map) != len(that1.Sfixed64Map) { + return fmt.Errorf("Sfixed64Map this(%v) Not Equal that(%v)", len(this.Sfixed64Map), len(that1.Sfixed64Map)) + } + for i := range this.Sfixed64Map { + if this.Sfixed64Map[i] != that1.Sfixed64Map[i] { + return fmt.Errorf("Sfixed64Map this[%v](%v) Not Equal that[%v](%v)", i, this.Sfixed64Map[i], i, that1.Sfixed64Map[i]) + } + } + if len(this.BoolMap) != len(that1.BoolMap) { + return fmt.Errorf("BoolMap this(%v) Not Equal that(%v)", len(this.BoolMap), len(that1.BoolMap)) + } + for i := range this.BoolMap { + if this.BoolMap[i] != that1.BoolMap[i] { + return fmt.Errorf("BoolMap this[%v](%v) Not Equal that[%v](%v)", i, this.BoolMap[i], i, that1.BoolMap[i]) + } + } + if len(this.StringMap) != len(that1.StringMap) { + return fmt.Errorf("StringMap this(%v) Not Equal that(%v)", len(this.StringMap), len(that1.StringMap)) + } + for i := range this.StringMap { + if this.StringMap[i] != that1.StringMap[i] { + return fmt.Errorf("StringMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringMap[i], i, that1.StringMap[i]) + } + } + if len(this.StringToBytesMap) != len(that1.StringToBytesMap) { + return fmt.Errorf("StringToBytesMap this(%v) Not Equal that(%v)", len(this.StringToBytesMap), len(that1.StringToBytesMap)) + } + for i := range this.StringToBytesMap { + if !bytes.Equal(this.StringToBytesMap[i], that1.StringToBytesMap[i]) { + return fmt.Errorf("StringToBytesMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringToBytesMap[i], i, that1.StringToBytesMap[i]) + } + } + if len(this.StringToEnumMap) != len(that1.StringToEnumMap) { + return fmt.Errorf("StringToEnumMap this(%v) Not Equal that(%v)", len(this.StringToEnumMap), len(that1.StringToEnumMap)) + } + for i := range this.StringToEnumMap { + if this.StringToEnumMap[i] != that1.StringToEnumMap[i] { + return fmt.Errorf("StringToEnumMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringToEnumMap[i], i, that1.StringToEnumMap[i]) + } + } + if len(this.StringToMsgMap) != len(that1.StringToMsgMap) { + return fmt.Errorf("StringToMsgMap this(%v) Not Equal that(%v)", len(this.StringToMsgMap), len(that1.StringToMsgMap)) + } + for i := range this.StringToMsgMap { + if !this.StringToMsgMap[i].Equal(that1.StringToMsgMap[i]) { + return fmt.Errorf("StringToMsgMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringToMsgMap[i], i, that1.StringToMsgMap[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *AllMapsOrdered) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*AllMapsOrdered) + if !ok { + that2, ok := that.(AllMapsOrdered) + 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.StringToDoubleMap) != len(that1.StringToDoubleMap) { + return false + } + for i := range this.StringToDoubleMap { + if this.StringToDoubleMap[i] != that1.StringToDoubleMap[i] { + return false + } + } + if len(this.StringToFloatMap) != len(that1.StringToFloatMap) { + return false + } + for i := range this.StringToFloatMap { + if this.StringToFloatMap[i] != that1.StringToFloatMap[i] { + return false + } + } + if len(this.Int32Map) != len(that1.Int32Map) { + return false + } + for i := range this.Int32Map { + if this.Int32Map[i] != that1.Int32Map[i] { + return false + } + } + if len(this.Int64Map) != len(that1.Int64Map) { + return false + } + for i := range this.Int64Map { + if this.Int64Map[i] != that1.Int64Map[i] { + return false + } + } + if len(this.Uint32Map) != len(that1.Uint32Map) { + return false + } + for i := range this.Uint32Map { + if this.Uint32Map[i] != that1.Uint32Map[i] { + return false + } + } + if len(this.Uint64Map) != len(that1.Uint64Map) { + return false + } + for i := range this.Uint64Map { + if this.Uint64Map[i] != that1.Uint64Map[i] { + return false + } + } + if len(this.Sint32Map) != len(that1.Sint32Map) { + return false + } + for i := range this.Sint32Map { + if this.Sint32Map[i] != that1.Sint32Map[i] { + return false + } + } + if len(this.Sint64Map) != len(that1.Sint64Map) { + return false + } + for i := range this.Sint64Map { + if this.Sint64Map[i] != that1.Sint64Map[i] { + return false + } + } + if len(this.Fixed32Map) != len(that1.Fixed32Map) { + return false + } + for i := range this.Fixed32Map { + if this.Fixed32Map[i] != that1.Fixed32Map[i] { + return false + } + } + if len(this.Sfixed32Map) != len(that1.Sfixed32Map) { + return false + } + for i := range this.Sfixed32Map { + if this.Sfixed32Map[i] != that1.Sfixed32Map[i] { + return false + } + } + if len(this.Fixed64Map) != len(that1.Fixed64Map) { + return false + } + for i := range this.Fixed64Map { + if this.Fixed64Map[i] != that1.Fixed64Map[i] { + return false + } + } + if len(this.Sfixed64Map) != len(that1.Sfixed64Map) { + return false + } + for i := range this.Sfixed64Map { + if this.Sfixed64Map[i] != that1.Sfixed64Map[i] { + return false + } + } + if len(this.BoolMap) != len(that1.BoolMap) { + return false + } + for i := range this.BoolMap { + if this.BoolMap[i] != that1.BoolMap[i] { + return false + } + } + if len(this.StringMap) != len(that1.StringMap) { + return false + } + for i := range this.StringMap { + if this.StringMap[i] != that1.StringMap[i] { + return false + } + } + if len(this.StringToBytesMap) != len(that1.StringToBytesMap) { + return false + } + for i := range this.StringToBytesMap { + if !bytes.Equal(this.StringToBytesMap[i], that1.StringToBytesMap[i]) { + return false + } + } + if len(this.StringToEnumMap) != len(that1.StringToEnumMap) { + return false + } + for i := range this.StringToEnumMap { + if this.StringToEnumMap[i] != that1.StringToEnumMap[i] { + return false + } + } + if len(this.StringToMsgMap) != len(that1.StringToMsgMap) { + return false + } + for i := range this.StringToMsgMap { + if !this.StringToMsgMap[i].Equal(that1.StringToMsgMap[i]) { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} + +type FloatingPointFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetF() *float64 +} + +func (this *FloatingPoint) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *FloatingPoint) TestProto() github_com_gogo_protobuf_proto.Message { + return NewFloatingPointFromFace(this) +} + +func (this *FloatingPoint) GetF() *float64 { + return this.F +} + +func NewFloatingPointFromFace(that FloatingPointFace) *FloatingPoint { + this := &FloatingPoint{} + this.F = that.GetF() + return this +} + +type AllMapsFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetStringToDoubleMap() map[string]float64 + GetStringToFloatMap() map[string]float32 + GetInt32Map() map[int32]int32 + GetInt64Map() map[int64]int64 + GetUint32Map() map[uint32]uint32 + GetUint64Map() map[uint64]uint64 + GetSint32Map() map[int32]int32 + GetSint64Map() map[int64]int64 + GetFixed32Map() map[uint32]uint32 + GetSfixed32Map() map[int32]int32 + GetFixed64Map() map[uint64]uint64 + GetSfixed64Map() map[int64]int64 + GetBoolMap() map[bool]bool + GetStringMap() map[string]string + GetStringToBytesMap() map[string][]byte + GetStringToEnumMap() map[string]MapEnum + GetStringToMsgMap() map[string]*FloatingPoint +} + +func (this *AllMaps) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *AllMaps) TestProto() github_com_gogo_protobuf_proto.Message { + return NewAllMapsFromFace(this) +} + +func (this *AllMaps) GetStringToDoubleMap() map[string]float64 { + return this.StringToDoubleMap +} + +func (this *AllMaps) GetStringToFloatMap() map[string]float32 { + return this.StringToFloatMap +} + +func (this *AllMaps) GetInt32Map() map[int32]int32 { + return this.Int32Map +} + +func (this *AllMaps) GetInt64Map() map[int64]int64 { + return this.Int64Map +} + +func (this *AllMaps) GetUint32Map() map[uint32]uint32 { + return this.Uint32Map +} + +func (this *AllMaps) GetUint64Map() map[uint64]uint64 { + return this.Uint64Map +} + +func (this *AllMaps) GetSint32Map() map[int32]int32 { + return this.Sint32Map +} + +func (this *AllMaps) GetSint64Map() map[int64]int64 { + return this.Sint64Map +} + +func (this *AllMaps) GetFixed32Map() map[uint32]uint32 { + return this.Fixed32Map +} + +func (this *AllMaps) GetSfixed32Map() map[int32]int32 { + return this.Sfixed32Map +} + +func (this *AllMaps) GetFixed64Map() map[uint64]uint64 { + return this.Fixed64Map +} + +func (this *AllMaps) GetSfixed64Map() map[int64]int64 { + return this.Sfixed64Map +} + +func (this *AllMaps) GetBoolMap() map[bool]bool { + return this.BoolMap +} + +func (this *AllMaps) GetStringMap() map[string]string { + return this.StringMap +} + +func (this *AllMaps) GetStringToBytesMap() map[string][]byte { + return this.StringToBytesMap +} + +func (this *AllMaps) GetStringToEnumMap() map[string]MapEnum { + return this.StringToEnumMap +} + +func (this *AllMaps) GetStringToMsgMap() map[string]*FloatingPoint { + return this.StringToMsgMap +} + +func NewAllMapsFromFace(that AllMapsFace) *AllMaps { + this := &AllMaps{} + this.StringToDoubleMap = that.GetStringToDoubleMap() + this.StringToFloatMap = that.GetStringToFloatMap() + this.Int32Map = that.GetInt32Map() + this.Int64Map = that.GetInt64Map() + this.Uint32Map = that.GetUint32Map() + this.Uint64Map = that.GetUint64Map() + this.Sint32Map = that.GetSint32Map() + this.Sint64Map = that.GetSint64Map() + this.Fixed32Map = that.GetFixed32Map() + this.Sfixed32Map = that.GetSfixed32Map() + this.Fixed64Map = that.GetFixed64Map() + this.Sfixed64Map = that.GetSfixed64Map() + this.BoolMap = that.GetBoolMap() + this.StringMap = that.GetStringMap() + this.StringToBytesMap = that.GetStringToBytesMap() + this.StringToEnumMap = that.GetStringToEnumMap() + this.StringToMsgMap = that.GetStringToMsgMap() + return this +} + +type AllMapsOrderedFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetStringToDoubleMap() map[string]float64 + GetStringToFloatMap() map[string]float32 + GetInt32Map() map[int32]int32 + GetInt64Map() map[int64]int64 + GetUint32Map() map[uint32]uint32 + GetUint64Map() map[uint64]uint64 + GetSint32Map() map[int32]int32 + GetSint64Map() map[int64]int64 + GetFixed32Map() map[uint32]uint32 + GetSfixed32Map() map[int32]int32 + GetFixed64Map() map[uint64]uint64 + GetSfixed64Map() map[int64]int64 + GetBoolMap() map[bool]bool + GetStringMap() map[string]string + GetStringToBytesMap() map[string][]byte + GetStringToEnumMap() map[string]MapEnum + GetStringToMsgMap() map[string]*FloatingPoint +} + +func (this *AllMapsOrdered) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *AllMapsOrdered) TestProto() github_com_gogo_protobuf_proto.Message { + return NewAllMapsOrderedFromFace(this) +} + +func (this *AllMapsOrdered) GetStringToDoubleMap() map[string]float64 { + return this.StringToDoubleMap +} + +func (this *AllMapsOrdered) GetStringToFloatMap() map[string]float32 { + return this.StringToFloatMap +} + +func (this *AllMapsOrdered) GetInt32Map() map[int32]int32 { + return this.Int32Map +} + +func (this *AllMapsOrdered) GetInt64Map() map[int64]int64 { + return this.Int64Map +} + +func (this *AllMapsOrdered) GetUint32Map() map[uint32]uint32 { + return this.Uint32Map +} + +func (this *AllMapsOrdered) GetUint64Map() map[uint64]uint64 { + return this.Uint64Map +} + +func (this *AllMapsOrdered) GetSint32Map() map[int32]int32 { + return this.Sint32Map +} + +func (this *AllMapsOrdered) GetSint64Map() map[int64]int64 { + return this.Sint64Map +} + +func (this *AllMapsOrdered) GetFixed32Map() map[uint32]uint32 { + return this.Fixed32Map +} + +func (this *AllMapsOrdered) GetSfixed32Map() map[int32]int32 { + return this.Sfixed32Map +} + +func (this *AllMapsOrdered) GetFixed64Map() map[uint64]uint64 { + return this.Fixed64Map +} + +func (this *AllMapsOrdered) GetSfixed64Map() map[int64]int64 { + return this.Sfixed64Map +} + +func (this *AllMapsOrdered) GetBoolMap() map[bool]bool { + return this.BoolMap +} + +func (this *AllMapsOrdered) GetStringMap() map[string]string { + return this.StringMap +} + +func (this *AllMapsOrdered) GetStringToBytesMap() map[string][]byte { + return this.StringToBytesMap +} + +func (this *AllMapsOrdered) GetStringToEnumMap() map[string]MapEnum { + return this.StringToEnumMap +} + +func (this *AllMapsOrdered) GetStringToMsgMap() map[string]*FloatingPoint { + return this.StringToMsgMap +} + +func NewAllMapsOrderedFromFace(that AllMapsOrderedFace) *AllMapsOrdered { + this := &AllMapsOrdered{} + this.StringToDoubleMap = that.GetStringToDoubleMap() + this.StringToFloatMap = that.GetStringToFloatMap() + this.Int32Map = that.GetInt32Map() + this.Int64Map = that.GetInt64Map() + this.Uint32Map = that.GetUint32Map() + this.Uint64Map = that.GetUint64Map() + this.Sint32Map = that.GetSint32Map() + this.Sint64Map = that.GetSint64Map() + this.Fixed32Map = that.GetFixed32Map() + this.Sfixed32Map = that.GetSfixed32Map() + this.Fixed64Map = that.GetFixed64Map() + this.Sfixed64Map = that.GetSfixed64Map() + this.BoolMap = that.GetBoolMap() + this.StringMap = that.GetStringMap() + this.StringToBytesMap = that.GetStringToBytesMap() + this.StringToEnumMap = that.GetStringToEnumMap() + this.StringToMsgMap = that.GetStringToMsgMap() + return this +} + +func (this *FloatingPoint) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&proto2_maps.FloatingPoint{") + if this.F != nil { + s = append(s, "F: "+valueToGoStringMapsproto2(this.F, "float64")+",\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 *AllMaps) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 21) + s = append(s, "&proto2_maps.AllMaps{") + keysForStringToDoubleMap := make([]string, 0, len(this.StringToDoubleMap)) + for k := range this.StringToDoubleMap { + keysForStringToDoubleMap = append(keysForStringToDoubleMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToDoubleMap) + mapStringForStringToDoubleMap := "map[string]float64{" + for _, k := range keysForStringToDoubleMap { + mapStringForStringToDoubleMap += fmt.Sprintf("%#v: %#v,", k, this.StringToDoubleMap[k]) + } + mapStringForStringToDoubleMap += "}" + if this.StringToDoubleMap != nil { + s = append(s, "StringToDoubleMap: "+mapStringForStringToDoubleMap+",\n") + } + keysForStringToFloatMap := make([]string, 0, len(this.StringToFloatMap)) + for k := range this.StringToFloatMap { + keysForStringToFloatMap = append(keysForStringToFloatMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToFloatMap) + mapStringForStringToFloatMap := "map[string]float32{" + for _, k := range keysForStringToFloatMap { + mapStringForStringToFloatMap += fmt.Sprintf("%#v: %#v,", k, this.StringToFloatMap[k]) + } + mapStringForStringToFloatMap += "}" + if this.StringToFloatMap != nil { + s = append(s, "StringToFloatMap: "+mapStringForStringToFloatMap+",\n") + } + keysForInt32Map := make([]int32, 0, len(this.Int32Map)) + for k := range this.Int32Map { + keysForInt32Map = append(keysForInt32Map, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForInt32Map) + mapStringForInt32Map := "map[int32]int32{" + for _, k := range keysForInt32Map { + mapStringForInt32Map += fmt.Sprintf("%#v: %#v,", k, this.Int32Map[k]) + } + mapStringForInt32Map += "}" + if this.Int32Map != nil { + s = append(s, "Int32Map: "+mapStringForInt32Map+",\n") + } + keysForInt64Map := make([]int64, 0, len(this.Int64Map)) + for k := range this.Int64Map { + keysForInt64Map = append(keysForInt64Map, k) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForInt64Map) + mapStringForInt64Map := "map[int64]int64{" + for _, k := range keysForInt64Map { + mapStringForInt64Map += fmt.Sprintf("%#v: %#v,", k, this.Int64Map[k]) + } + mapStringForInt64Map += "}" + if this.Int64Map != nil { + s = append(s, "Int64Map: "+mapStringForInt64Map+",\n") + } + keysForUint32Map := make([]uint32, 0, len(this.Uint32Map)) + for k := range this.Uint32Map { + keysForUint32Map = append(keysForUint32Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint32s(keysForUint32Map) + mapStringForUint32Map := "map[uint32]uint32{" + for _, k := range keysForUint32Map { + mapStringForUint32Map += fmt.Sprintf("%#v: %#v,", k, this.Uint32Map[k]) + } + mapStringForUint32Map += "}" + if this.Uint32Map != nil { + s = append(s, "Uint32Map: "+mapStringForUint32Map+",\n") + } + keysForUint64Map := make([]uint64, 0, len(this.Uint64Map)) + for k := range this.Uint64Map { + keysForUint64Map = append(keysForUint64Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint64s(keysForUint64Map) + mapStringForUint64Map := "map[uint64]uint64{" + for _, k := range keysForUint64Map { + mapStringForUint64Map += fmt.Sprintf("%#v: %#v,", k, this.Uint64Map[k]) + } + mapStringForUint64Map += "}" + if this.Uint64Map != nil { + s = append(s, "Uint64Map: "+mapStringForUint64Map+",\n") + } + keysForSint32Map := make([]int32, 0, len(this.Sint32Map)) + for k := range this.Sint32Map { + keysForSint32Map = append(keysForSint32Map, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForSint32Map) + mapStringForSint32Map := "map[int32]int32{" + for _, k := range keysForSint32Map { + mapStringForSint32Map += fmt.Sprintf("%#v: %#v,", k, this.Sint32Map[k]) + } + mapStringForSint32Map += "}" + if this.Sint32Map != nil { + s = append(s, "Sint32Map: "+mapStringForSint32Map+",\n") + } + keysForSint64Map := make([]int64, 0, len(this.Sint64Map)) + for k := range this.Sint64Map { + keysForSint64Map = append(keysForSint64Map, k) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForSint64Map) + mapStringForSint64Map := "map[int64]int64{" + for _, k := range keysForSint64Map { + mapStringForSint64Map += fmt.Sprintf("%#v: %#v,", k, this.Sint64Map[k]) + } + mapStringForSint64Map += "}" + if this.Sint64Map != nil { + s = append(s, "Sint64Map: "+mapStringForSint64Map+",\n") + } + keysForFixed32Map := make([]uint32, 0, len(this.Fixed32Map)) + for k := range this.Fixed32Map { + keysForFixed32Map = append(keysForFixed32Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint32s(keysForFixed32Map) + mapStringForFixed32Map := "map[uint32]uint32{" + for _, k := range keysForFixed32Map { + mapStringForFixed32Map += fmt.Sprintf("%#v: %#v,", k, this.Fixed32Map[k]) + } + mapStringForFixed32Map += "}" + if this.Fixed32Map != nil { + s = append(s, "Fixed32Map: "+mapStringForFixed32Map+",\n") + } + keysForSfixed32Map := make([]int32, 0, len(this.Sfixed32Map)) + for k := range this.Sfixed32Map { + keysForSfixed32Map = append(keysForSfixed32Map, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForSfixed32Map) + mapStringForSfixed32Map := "map[int32]int32{" + for _, k := range keysForSfixed32Map { + mapStringForSfixed32Map += fmt.Sprintf("%#v: %#v,", k, this.Sfixed32Map[k]) + } + mapStringForSfixed32Map += "}" + if this.Sfixed32Map != nil { + s = append(s, "Sfixed32Map: "+mapStringForSfixed32Map+",\n") + } + keysForFixed64Map := make([]uint64, 0, len(this.Fixed64Map)) + for k := range this.Fixed64Map { + keysForFixed64Map = append(keysForFixed64Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint64s(keysForFixed64Map) + mapStringForFixed64Map := "map[uint64]uint64{" + for _, k := range keysForFixed64Map { + mapStringForFixed64Map += fmt.Sprintf("%#v: %#v,", k, this.Fixed64Map[k]) + } + mapStringForFixed64Map += "}" + if this.Fixed64Map != nil { + s = append(s, "Fixed64Map: "+mapStringForFixed64Map+",\n") + } + keysForSfixed64Map := make([]int64, 0, len(this.Sfixed64Map)) + for k := range this.Sfixed64Map { + keysForSfixed64Map = append(keysForSfixed64Map, k) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForSfixed64Map) + mapStringForSfixed64Map := "map[int64]int64{" + for _, k := range keysForSfixed64Map { + mapStringForSfixed64Map += fmt.Sprintf("%#v: %#v,", k, this.Sfixed64Map[k]) + } + mapStringForSfixed64Map += "}" + if this.Sfixed64Map != nil { + s = append(s, "Sfixed64Map: "+mapStringForSfixed64Map+",\n") + } + keysForBoolMap := make([]bool, 0, len(this.BoolMap)) + for k := range this.BoolMap { + keysForBoolMap = append(keysForBoolMap, k) + } + github_com_gogo_protobuf_sortkeys.Bools(keysForBoolMap) + mapStringForBoolMap := "map[bool]bool{" + for _, k := range keysForBoolMap { + mapStringForBoolMap += fmt.Sprintf("%#v: %#v,", k, this.BoolMap[k]) + } + mapStringForBoolMap += "}" + if this.BoolMap != nil { + s = append(s, "BoolMap: "+mapStringForBoolMap+",\n") + } + keysForStringMap := make([]string, 0, len(this.StringMap)) + for k := range this.StringMap { + keysForStringMap = append(keysForStringMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringMap) + mapStringForStringMap := "map[string]string{" + for _, k := range keysForStringMap { + mapStringForStringMap += fmt.Sprintf("%#v: %#v,", k, this.StringMap[k]) + } + mapStringForStringMap += "}" + if this.StringMap != nil { + s = append(s, "StringMap: "+mapStringForStringMap+",\n") + } + keysForStringToBytesMap := make([]string, 0, len(this.StringToBytesMap)) + for k := range this.StringToBytesMap { + keysForStringToBytesMap = append(keysForStringToBytesMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToBytesMap) + mapStringForStringToBytesMap := "map[string][]byte{" + for _, k := range keysForStringToBytesMap { + mapStringForStringToBytesMap += fmt.Sprintf("%#v: %#v,", k, this.StringToBytesMap[k]) + } + mapStringForStringToBytesMap += "}" + if this.StringToBytesMap != nil { + s = append(s, "StringToBytesMap: "+mapStringForStringToBytesMap+",\n") + } + keysForStringToEnumMap := make([]string, 0, len(this.StringToEnumMap)) + for k := range this.StringToEnumMap { + keysForStringToEnumMap = append(keysForStringToEnumMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToEnumMap) + mapStringForStringToEnumMap := "map[string]MapEnum{" + for _, k := range keysForStringToEnumMap { + mapStringForStringToEnumMap += fmt.Sprintf("%#v: %#v,", k, this.StringToEnumMap[k]) + } + mapStringForStringToEnumMap += "}" + if this.StringToEnumMap != nil { + s = append(s, "StringToEnumMap: "+mapStringForStringToEnumMap+",\n") + } + keysForStringToMsgMap := make([]string, 0, len(this.StringToMsgMap)) + for k := range this.StringToMsgMap { + keysForStringToMsgMap = append(keysForStringToMsgMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToMsgMap) + mapStringForStringToMsgMap := "map[string]*FloatingPoint{" + for _, k := range keysForStringToMsgMap { + mapStringForStringToMsgMap += fmt.Sprintf("%#v: %#v,", k, this.StringToMsgMap[k]) + } + mapStringForStringToMsgMap += "}" + if this.StringToMsgMap != nil { + s = append(s, "StringToMsgMap: "+mapStringForStringToMsgMap+",\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 *AllMapsOrdered) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 21) + s = append(s, "&proto2_maps.AllMapsOrdered{") + keysForStringToDoubleMap := make([]string, 0, len(this.StringToDoubleMap)) + for k := range this.StringToDoubleMap { + keysForStringToDoubleMap = append(keysForStringToDoubleMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToDoubleMap) + mapStringForStringToDoubleMap := "map[string]float64{" + for _, k := range keysForStringToDoubleMap { + mapStringForStringToDoubleMap += fmt.Sprintf("%#v: %#v,", k, this.StringToDoubleMap[k]) + } + mapStringForStringToDoubleMap += "}" + if this.StringToDoubleMap != nil { + s = append(s, "StringToDoubleMap: "+mapStringForStringToDoubleMap+",\n") + } + keysForStringToFloatMap := make([]string, 0, len(this.StringToFloatMap)) + for k := range this.StringToFloatMap { + keysForStringToFloatMap = append(keysForStringToFloatMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToFloatMap) + mapStringForStringToFloatMap := "map[string]float32{" + for _, k := range keysForStringToFloatMap { + mapStringForStringToFloatMap += fmt.Sprintf("%#v: %#v,", k, this.StringToFloatMap[k]) + } + mapStringForStringToFloatMap += "}" + if this.StringToFloatMap != nil { + s = append(s, "StringToFloatMap: "+mapStringForStringToFloatMap+",\n") + } + keysForInt32Map := make([]int32, 0, len(this.Int32Map)) + for k := range this.Int32Map { + keysForInt32Map = append(keysForInt32Map, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForInt32Map) + mapStringForInt32Map := "map[int32]int32{" + for _, k := range keysForInt32Map { + mapStringForInt32Map += fmt.Sprintf("%#v: %#v,", k, this.Int32Map[k]) + } + mapStringForInt32Map += "}" + if this.Int32Map != nil { + s = append(s, "Int32Map: "+mapStringForInt32Map+",\n") + } + keysForInt64Map := make([]int64, 0, len(this.Int64Map)) + for k := range this.Int64Map { + keysForInt64Map = append(keysForInt64Map, k) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForInt64Map) + mapStringForInt64Map := "map[int64]int64{" + for _, k := range keysForInt64Map { + mapStringForInt64Map += fmt.Sprintf("%#v: %#v,", k, this.Int64Map[k]) + } + mapStringForInt64Map += "}" + if this.Int64Map != nil { + s = append(s, "Int64Map: "+mapStringForInt64Map+",\n") + } + keysForUint32Map := make([]uint32, 0, len(this.Uint32Map)) + for k := range this.Uint32Map { + keysForUint32Map = append(keysForUint32Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint32s(keysForUint32Map) + mapStringForUint32Map := "map[uint32]uint32{" + for _, k := range keysForUint32Map { + mapStringForUint32Map += fmt.Sprintf("%#v: %#v,", k, this.Uint32Map[k]) + } + mapStringForUint32Map += "}" + if this.Uint32Map != nil { + s = append(s, "Uint32Map: "+mapStringForUint32Map+",\n") + } + keysForUint64Map := make([]uint64, 0, len(this.Uint64Map)) + for k := range this.Uint64Map { + keysForUint64Map = append(keysForUint64Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint64s(keysForUint64Map) + mapStringForUint64Map := "map[uint64]uint64{" + for _, k := range keysForUint64Map { + mapStringForUint64Map += fmt.Sprintf("%#v: %#v,", k, this.Uint64Map[k]) + } + mapStringForUint64Map += "}" + if this.Uint64Map != nil { + s = append(s, "Uint64Map: "+mapStringForUint64Map+",\n") + } + keysForSint32Map := make([]int32, 0, len(this.Sint32Map)) + for k := range this.Sint32Map { + keysForSint32Map = append(keysForSint32Map, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForSint32Map) + mapStringForSint32Map := "map[int32]int32{" + for _, k := range keysForSint32Map { + mapStringForSint32Map += fmt.Sprintf("%#v: %#v,", k, this.Sint32Map[k]) + } + mapStringForSint32Map += "}" + if this.Sint32Map != nil { + s = append(s, "Sint32Map: "+mapStringForSint32Map+",\n") + } + keysForSint64Map := make([]int64, 0, len(this.Sint64Map)) + for k := range this.Sint64Map { + keysForSint64Map = append(keysForSint64Map, k) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForSint64Map) + mapStringForSint64Map := "map[int64]int64{" + for _, k := range keysForSint64Map { + mapStringForSint64Map += fmt.Sprintf("%#v: %#v,", k, this.Sint64Map[k]) + } + mapStringForSint64Map += "}" + if this.Sint64Map != nil { + s = append(s, "Sint64Map: "+mapStringForSint64Map+",\n") + } + keysForFixed32Map := make([]uint32, 0, len(this.Fixed32Map)) + for k := range this.Fixed32Map { + keysForFixed32Map = append(keysForFixed32Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint32s(keysForFixed32Map) + mapStringForFixed32Map := "map[uint32]uint32{" + for _, k := range keysForFixed32Map { + mapStringForFixed32Map += fmt.Sprintf("%#v: %#v,", k, this.Fixed32Map[k]) + } + mapStringForFixed32Map += "}" + if this.Fixed32Map != nil { + s = append(s, "Fixed32Map: "+mapStringForFixed32Map+",\n") + } + keysForSfixed32Map := make([]int32, 0, len(this.Sfixed32Map)) + for k := range this.Sfixed32Map { + keysForSfixed32Map = append(keysForSfixed32Map, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForSfixed32Map) + mapStringForSfixed32Map := "map[int32]int32{" + for _, k := range keysForSfixed32Map { + mapStringForSfixed32Map += fmt.Sprintf("%#v: %#v,", k, this.Sfixed32Map[k]) + } + mapStringForSfixed32Map += "}" + if this.Sfixed32Map != nil { + s = append(s, "Sfixed32Map: "+mapStringForSfixed32Map+",\n") + } + keysForFixed64Map := make([]uint64, 0, len(this.Fixed64Map)) + for k := range this.Fixed64Map { + keysForFixed64Map = append(keysForFixed64Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint64s(keysForFixed64Map) + mapStringForFixed64Map := "map[uint64]uint64{" + for _, k := range keysForFixed64Map { + mapStringForFixed64Map += fmt.Sprintf("%#v: %#v,", k, this.Fixed64Map[k]) + } + mapStringForFixed64Map += "}" + if this.Fixed64Map != nil { + s = append(s, "Fixed64Map: "+mapStringForFixed64Map+",\n") + } + keysForSfixed64Map := make([]int64, 0, len(this.Sfixed64Map)) + for k := range this.Sfixed64Map { + keysForSfixed64Map = append(keysForSfixed64Map, k) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForSfixed64Map) + mapStringForSfixed64Map := "map[int64]int64{" + for _, k := range keysForSfixed64Map { + mapStringForSfixed64Map += fmt.Sprintf("%#v: %#v,", k, this.Sfixed64Map[k]) + } + mapStringForSfixed64Map += "}" + if this.Sfixed64Map != nil { + s = append(s, "Sfixed64Map: "+mapStringForSfixed64Map+",\n") + } + keysForBoolMap := make([]bool, 0, len(this.BoolMap)) + for k := range this.BoolMap { + keysForBoolMap = append(keysForBoolMap, k) + } + github_com_gogo_protobuf_sortkeys.Bools(keysForBoolMap) + mapStringForBoolMap := "map[bool]bool{" + for _, k := range keysForBoolMap { + mapStringForBoolMap += fmt.Sprintf("%#v: %#v,", k, this.BoolMap[k]) + } + mapStringForBoolMap += "}" + if this.BoolMap != nil { + s = append(s, "BoolMap: "+mapStringForBoolMap+",\n") + } + keysForStringMap := make([]string, 0, len(this.StringMap)) + for k := range this.StringMap { + keysForStringMap = append(keysForStringMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringMap) + mapStringForStringMap := "map[string]string{" + for _, k := range keysForStringMap { + mapStringForStringMap += fmt.Sprintf("%#v: %#v,", k, this.StringMap[k]) + } + mapStringForStringMap += "}" + if this.StringMap != nil { + s = append(s, "StringMap: "+mapStringForStringMap+",\n") + } + keysForStringToBytesMap := make([]string, 0, len(this.StringToBytesMap)) + for k := range this.StringToBytesMap { + keysForStringToBytesMap = append(keysForStringToBytesMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToBytesMap) + mapStringForStringToBytesMap := "map[string][]byte{" + for _, k := range keysForStringToBytesMap { + mapStringForStringToBytesMap += fmt.Sprintf("%#v: %#v,", k, this.StringToBytesMap[k]) + } + mapStringForStringToBytesMap += "}" + if this.StringToBytesMap != nil { + s = append(s, "StringToBytesMap: "+mapStringForStringToBytesMap+",\n") + } + keysForStringToEnumMap := make([]string, 0, len(this.StringToEnumMap)) + for k := range this.StringToEnumMap { + keysForStringToEnumMap = append(keysForStringToEnumMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToEnumMap) + mapStringForStringToEnumMap := "map[string]MapEnum{" + for _, k := range keysForStringToEnumMap { + mapStringForStringToEnumMap += fmt.Sprintf("%#v: %#v,", k, this.StringToEnumMap[k]) + } + mapStringForStringToEnumMap += "}" + if this.StringToEnumMap != nil { + s = append(s, "StringToEnumMap: "+mapStringForStringToEnumMap+",\n") + } + keysForStringToMsgMap := make([]string, 0, len(this.StringToMsgMap)) + for k := range this.StringToMsgMap { + keysForStringToMsgMap = append(keysForStringToMsgMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToMsgMap) + mapStringForStringToMsgMap := "map[string]*FloatingPoint{" + for _, k := range keysForStringToMsgMap { + mapStringForStringToMsgMap += fmt.Sprintf("%#v: %#v,", k, this.StringToMsgMap[k]) + } + mapStringForStringToMsgMap += "}" + if this.StringToMsgMap != nil { + s = append(s, "StringToMsgMap: "+mapStringForStringToMsgMap+",\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 valueToGoStringMapsproto2(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 extensionToGoStringMapsproto2(e map[int32]github_com_gogo_protobuf_proto.Extension) string { + if e == nil { + return "nil" + } + s := "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 +} +func (m *FloatingPoint) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *FloatingPoint) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.F != nil { + data[i] = 0x9 + i++ + i = encodeFixed64Mapsproto2(data, i, uint64(math.Float64bits(float64(*m.F)))) + } + if m.XXX_unrecognized != nil { + i += copy(data[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *AllMaps) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *AllMaps) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.StringToDoubleMap) > 0 { + for k := range m.StringToDoubleMap { + data[i] = 0xa + i++ + v := m.StringToDoubleMap[k] + mapSize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + 1 + 8 + i = encodeVarintMapsproto2(data, i, uint64(mapSize)) + data[i] = 0xa + i++ + i = encodeVarintMapsproto2(data, i, uint64(len(k))) + i += copy(data[i:], k) + data[i] = 0x11 + i++ + i = encodeFixed64Mapsproto2(data, i, uint64(math.Float64bits(float64(v)))) + } + } + if len(m.StringToFloatMap) > 0 { + for k := range m.StringToFloatMap { + data[i] = 0x12 + i++ + v := m.StringToFloatMap[k] + mapSize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + 1 + 4 + i = encodeVarintMapsproto2(data, i, uint64(mapSize)) + data[i] = 0xa + i++ + i = encodeVarintMapsproto2(data, i, uint64(len(k))) + i += copy(data[i:], k) + data[i] = 0x15 + i++ + i = encodeFixed32Mapsproto2(data, i, uint32(math.Float32bits(float32(v)))) + } + } + if len(m.Int32Map) > 0 { + for k := range m.Int32Map { + data[i] = 0x1a + i++ + v := m.Int32Map[k] + mapSize := 1 + sovMapsproto2(uint64(k)) + 1 + sovMapsproto2(uint64(v)) + i = encodeVarintMapsproto2(data, i, uint64(mapSize)) + data[i] = 0x8 + i++ + i = encodeVarintMapsproto2(data, i, uint64(k)) + data[i] = 0x10 + i++ + i = encodeVarintMapsproto2(data, i, uint64(v)) + } + } + if len(m.Int64Map) > 0 { + for k := range m.Int64Map { + data[i] = 0x22 + i++ + v := m.Int64Map[k] + mapSize := 1 + sovMapsproto2(uint64(k)) + 1 + sovMapsproto2(uint64(v)) + i = encodeVarintMapsproto2(data, i, uint64(mapSize)) + data[i] = 0x8 + i++ + i = encodeVarintMapsproto2(data, i, uint64(k)) + data[i] = 0x10 + i++ + i = encodeVarintMapsproto2(data, i, uint64(v)) + } + } + if len(m.Uint32Map) > 0 { + for k := range m.Uint32Map { + data[i] = 0x2a + i++ + v := m.Uint32Map[k] + mapSize := 1 + sovMapsproto2(uint64(k)) + 1 + sovMapsproto2(uint64(v)) + i = encodeVarintMapsproto2(data, i, uint64(mapSize)) + data[i] = 0x8 + i++ + i = encodeVarintMapsproto2(data, i, uint64(k)) + data[i] = 0x10 + i++ + i = encodeVarintMapsproto2(data, i, uint64(v)) + } + } + if len(m.Uint64Map) > 0 { + for k := range m.Uint64Map { + data[i] = 0x32 + i++ + v := m.Uint64Map[k] + mapSize := 1 + sovMapsproto2(uint64(k)) + 1 + sovMapsproto2(uint64(v)) + i = encodeVarintMapsproto2(data, i, uint64(mapSize)) + data[i] = 0x8 + i++ + i = encodeVarintMapsproto2(data, i, uint64(k)) + data[i] = 0x10 + i++ + i = encodeVarintMapsproto2(data, i, uint64(v)) + } + } + if len(m.Sint32Map) > 0 { + for k := range m.Sint32Map { + data[i] = 0x3a + i++ + v := m.Sint32Map[k] + mapSize := 1 + sozMapsproto2(uint64(k)) + 1 + sozMapsproto2(uint64(v)) + i = encodeVarintMapsproto2(data, i, uint64(mapSize)) + data[i] = 0x8 + i++ + i = encodeVarintMapsproto2(data, i, uint64((uint32(k)<<1)^uint32((k>>31)))) + data[i] = 0x10 + i++ + i = encodeVarintMapsproto2(data, i, uint64((uint32(v)<<1)^uint32((v>>31)))) + } + } + if len(m.Sint64Map) > 0 { + for k := range m.Sint64Map { + data[i] = 0x42 + i++ + v := m.Sint64Map[k] + mapSize := 1 + sozMapsproto2(uint64(k)) + 1 + sozMapsproto2(uint64(v)) + i = encodeVarintMapsproto2(data, i, uint64(mapSize)) + data[i] = 0x8 + i++ + i = encodeVarintMapsproto2(data, i, uint64((uint64(k)<<1)^uint64((k>>63)))) + data[i] = 0x10 + i++ + i = encodeVarintMapsproto2(data, i, uint64((uint64(v)<<1)^uint64((v>>63)))) + } + } + if len(m.Fixed32Map) > 0 { + for k := range m.Fixed32Map { + data[i] = 0x4a + i++ + v := m.Fixed32Map[k] + mapSize := 1 + 4 + 1 + 4 + i = encodeVarintMapsproto2(data, i, uint64(mapSize)) + data[i] = 0xd + i++ + i = encodeFixed32Mapsproto2(data, i, uint32(k)) + data[i] = 0x15 + i++ + i = encodeFixed32Mapsproto2(data, i, uint32(v)) + } + } + if len(m.Sfixed32Map) > 0 { + for k := range m.Sfixed32Map { + data[i] = 0x52 + i++ + v := m.Sfixed32Map[k] + mapSize := 1 + 4 + 1 + 4 + i = encodeVarintMapsproto2(data, i, uint64(mapSize)) + data[i] = 0xd + i++ + i = encodeFixed32Mapsproto2(data, i, uint32(k)) + data[i] = 0x15 + i++ + i = encodeFixed32Mapsproto2(data, i, uint32(v)) + } + } + if len(m.Fixed64Map) > 0 { + for k := range m.Fixed64Map { + data[i] = 0x5a + i++ + v := m.Fixed64Map[k] + mapSize := 1 + 8 + 1 + 8 + i = encodeVarintMapsproto2(data, i, uint64(mapSize)) + data[i] = 0x9 + i++ + i = encodeFixed64Mapsproto2(data, i, uint64(k)) + data[i] = 0x11 + i++ + i = encodeFixed64Mapsproto2(data, i, uint64(v)) + } + } + if len(m.Sfixed64Map) > 0 { + for k := range m.Sfixed64Map { + data[i] = 0x62 + i++ + v := m.Sfixed64Map[k] + mapSize := 1 + 8 + 1 + 8 + i = encodeVarintMapsproto2(data, i, uint64(mapSize)) + data[i] = 0x9 + i++ + i = encodeFixed64Mapsproto2(data, i, uint64(k)) + data[i] = 0x11 + i++ + i = encodeFixed64Mapsproto2(data, i, uint64(v)) + } + } + if len(m.BoolMap) > 0 { + for k := range m.BoolMap { + data[i] = 0x6a + i++ + v := m.BoolMap[k] + mapSize := 1 + 1 + 1 + 1 + i = encodeVarintMapsproto2(data, i, uint64(mapSize)) + data[i] = 0x8 + i++ + if k { + data[i] = 1 + } else { + data[i] = 0 + } + i++ + data[i] = 0x10 + i++ + if v { + data[i] = 1 + } else { + data[i] = 0 + } + i++ + } + } + if len(m.StringMap) > 0 { + for k := range m.StringMap { + data[i] = 0x72 + i++ + v := m.StringMap[k] + mapSize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + 1 + len(v) + sovMapsproto2(uint64(len(v))) + i = encodeVarintMapsproto2(data, i, uint64(mapSize)) + data[i] = 0xa + i++ + i = encodeVarintMapsproto2(data, i, uint64(len(k))) + i += copy(data[i:], k) + data[i] = 0x12 + i++ + i = encodeVarintMapsproto2(data, i, uint64(len(v))) + i += copy(data[i:], v) + } + } + if len(m.StringToBytesMap) > 0 { + for k := range m.StringToBytesMap { + data[i] = 0x7a + i++ + v := m.StringToBytesMap[k] + mapSize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + 1 + len(v) + sovMapsproto2(uint64(len(v))) + i = encodeVarintMapsproto2(data, i, uint64(mapSize)) + data[i] = 0xa + i++ + i = encodeVarintMapsproto2(data, i, uint64(len(k))) + i += copy(data[i:], k) + data[i] = 0x12 + i++ + i = encodeVarintMapsproto2(data, i, uint64(len(v))) + i += copy(data[i:], v) + } + } + if len(m.StringToEnumMap) > 0 { + for k := range m.StringToEnumMap { + data[i] = 0x82 + i++ + data[i] = 0x1 + i++ + v := m.StringToEnumMap[k] + mapSize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + 1 + sovMapsproto2(uint64(v)) + i = encodeVarintMapsproto2(data, i, uint64(mapSize)) + data[i] = 0xa + i++ + i = encodeVarintMapsproto2(data, i, uint64(len(k))) + i += copy(data[i:], k) + data[i] = 0x10 + i++ + i = encodeVarintMapsproto2(data, i, uint64(v)) + } + } + if len(m.StringToMsgMap) > 0 { + for k := range m.StringToMsgMap { + data[i] = 0x8a + i++ + data[i] = 0x1 + i++ + v := m.StringToMsgMap[k] + if v == nil { + return 0, errors.New("proto: map has nil element") + } + msgSize := v.Size() + mapSize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + 1 + msgSize + sovMapsproto2(uint64(msgSize)) + i = encodeVarintMapsproto2(data, i, uint64(mapSize)) + data[i] = 0xa + i++ + i = encodeVarintMapsproto2(data, i, uint64(len(k))) + i += copy(data[i:], k) + data[i] = 0x12 + i++ + i = encodeVarintMapsproto2(data, i, uint64(v.Size())) + n1, err := v.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n1 + } + } + if m.XXX_unrecognized != nil { + i += copy(data[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *AllMapsOrdered) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *AllMapsOrdered) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.StringToDoubleMap) > 0 { + keysForStringToDoubleMap := make([]string, 0, len(m.StringToDoubleMap)) + for k := range m.StringToDoubleMap { + keysForStringToDoubleMap = append(keysForStringToDoubleMap, string(k)) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToDoubleMap) + for _, k := range keysForStringToDoubleMap { + data[i] = 0xa + i++ + v := m.StringToDoubleMap[string(k)] + mapSize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + 1 + 8 + i = encodeVarintMapsproto2(data, i, uint64(mapSize)) + data[i] = 0xa + i++ + i = encodeVarintMapsproto2(data, i, uint64(len(k))) + i += copy(data[i:], k) + data[i] = 0x11 + i++ + i = encodeFixed64Mapsproto2(data, i, uint64(math.Float64bits(float64(v)))) + } + } + if len(m.StringToFloatMap) > 0 { + keysForStringToFloatMap := make([]string, 0, len(m.StringToFloatMap)) + for k := range m.StringToFloatMap { + keysForStringToFloatMap = append(keysForStringToFloatMap, string(k)) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToFloatMap) + for _, k := range keysForStringToFloatMap { + data[i] = 0x12 + i++ + v := m.StringToFloatMap[string(k)] + mapSize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + 1 + 4 + i = encodeVarintMapsproto2(data, i, uint64(mapSize)) + data[i] = 0xa + i++ + i = encodeVarintMapsproto2(data, i, uint64(len(k))) + i += copy(data[i:], k) + data[i] = 0x15 + i++ + i = encodeFixed32Mapsproto2(data, i, uint32(math.Float32bits(float32(v)))) + } + } + if len(m.Int32Map) > 0 { + keysForInt32Map := make([]int32, 0, len(m.Int32Map)) + for k := range m.Int32Map { + keysForInt32Map = append(keysForInt32Map, int32(k)) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForInt32Map) + for _, k := range keysForInt32Map { + data[i] = 0x1a + i++ + v := m.Int32Map[int32(k)] + mapSize := 1 + sovMapsproto2(uint64(k)) + 1 + sovMapsproto2(uint64(v)) + i = encodeVarintMapsproto2(data, i, uint64(mapSize)) + data[i] = 0x8 + i++ + i = encodeVarintMapsproto2(data, i, uint64(k)) + data[i] = 0x10 + i++ + i = encodeVarintMapsproto2(data, i, uint64(v)) + } + } + if len(m.Int64Map) > 0 { + keysForInt64Map := make([]int64, 0, len(m.Int64Map)) + for k := range m.Int64Map { + keysForInt64Map = append(keysForInt64Map, int64(k)) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForInt64Map) + for _, k := range keysForInt64Map { + data[i] = 0x22 + i++ + v := m.Int64Map[int64(k)] + mapSize := 1 + sovMapsproto2(uint64(k)) + 1 + sovMapsproto2(uint64(v)) + i = encodeVarintMapsproto2(data, i, uint64(mapSize)) + data[i] = 0x8 + i++ + i = encodeVarintMapsproto2(data, i, uint64(k)) + data[i] = 0x10 + i++ + i = encodeVarintMapsproto2(data, i, uint64(v)) + } + } + if len(m.Uint32Map) > 0 { + keysForUint32Map := make([]uint32, 0, len(m.Uint32Map)) + for k := range m.Uint32Map { + keysForUint32Map = append(keysForUint32Map, uint32(k)) + } + github_com_gogo_protobuf_sortkeys.Uint32s(keysForUint32Map) + for _, k := range keysForUint32Map { + data[i] = 0x2a + i++ + v := m.Uint32Map[uint32(k)] + mapSize := 1 + sovMapsproto2(uint64(k)) + 1 + sovMapsproto2(uint64(v)) + i = encodeVarintMapsproto2(data, i, uint64(mapSize)) + data[i] = 0x8 + i++ + i = encodeVarintMapsproto2(data, i, uint64(k)) + data[i] = 0x10 + i++ + i = encodeVarintMapsproto2(data, i, uint64(v)) + } + } + if len(m.Uint64Map) > 0 { + keysForUint64Map := make([]uint64, 0, len(m.Uint64Map)) + for k := range m.Uint64Map { + keysForUint64Map = append(keysForUint64Map, uint64(k)) + } + github_com_gogo_protobuf_sortkeys.Uint64s(keysForUint64Map) + for _, k := range keysForUint64Map { + data[i] = 0x32 + i++ + v := m.Uint64Map[uint64(k)] + mapSize := 1 + sovMapsproto2(uint64(k)) + 1 + sovMapsproto2(uint64(v)) + i = encodeVarintMapsproto2(data, i, uint64(mapSize)) + data[i] = 0x8 + i++ + i = encodeVarintMapsproto2(data, i, uint64(k)) + data[i] = 0x10 + i++ + i = encodeVarintMapsproto2(data, i, uint64(v)) + } + } + if len(m.Sint32Map) > 0 { + keysForSint32Map := make([]int32, 0, len(m.Sint32Map)) + for k := range m.Sint32Map { + keysForSint32Map = append(keysForSint32Map, int32(k)) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForSint32Map) + for _, k := range keysForSint32Map { + data[i] = 0x3a + i++ + v := m.Sint32Map[int32(k)] + mapSize := 1 + sozMapsproto2(uint64(k)) + 1 + sozMapsproto2(uint64(v)) + i = encodeVarintMapsproto2(data, i, uint64(mapSize)) + data[i] = 0x8 + i++ + i = encodeVarintMapsproto2(data, i, uint64((uint32(k)<<1)^uint32((k>>31)))) + data[i] = 0x10 + i++ + i = encodeVarintMapsproto2(data, i, uint64((uint32(v)<<1)^uint32((v>>31)))) + } + } + if len(m.Sint64Map) > 0 { + keysForSint64Map := make([]int64, 0, len(m.Sint64Map)) + for k := range m.Sint64Map { + keysForSint64Map = append(keysForSint64Map, int64(k)) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForSint64Map) + for _, k := range keysForSint64Map { + data[i] = 0x42 + i++ + v := m.Sint64Map[int64(k)] + mapSize := 1 + sozMapsproto2(uint64(k)) + 1 + sozMapsproto2(uint64(v)) + i = encodeVarintMapsproto2(data, i, uint64(mapSize)) + data[i] = 0x8 + i++ + i = encodeVarintMapsproto2(data, i, uint64((uint64(k)<<1)^uint64((k>>63)))) + data[i] = 0x10 + i++ + i = encodeVarintMapsproto2(data, i, uint64((uint64(v)<<1)^uint64((v>>63)))) + } + } + if len(m.Fixed32Map) > 0 { + keysForFixed32Map := make([]uint32, 0, len(m.Fixed32Map)) + for k := range m.Fixed32Map { + keysForFixed32Map = append(keysForFixed32Map, uint32(k)) + } + github_com_gogo_protobuf_sortkeys.Uint32s(keysForFixed32Map) + for _, k := range keysForFixed32Map { + data[i] = 0x4a + i++ + v := m.Fixed32Map[uint32(k)] + mapSize := 1 + 4 + 1 + 4 + i = encodeVarintMapsproto2(data, i, uint64(mapSize)) + data[i] = 0xd + i++ + i = encodeFixed32Mapsproto2(data, i, uint32(k)) + data[i] = 0x15 + i++ + i = encodeFixed32Mapsproto2(data, i, uint32(v)) + } + } + if len(m.Sfixed32Map) > 0 { + keysForSfixed32Map := make([]int32, 0, len(m.Sfixed32Map)) + for k := range m.Sfixed32Map { + keysForSfixed32Map = append(keysForSfixed32Map, int32(k)) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForSfixed32Map) + for _, k := range keysForSfixed32Map { + data[i] = 0x52 + i++ + v := m.Sfixed32Map[int32(k)] + mapSize := 1 + 4 + 1 + 4 + i = encodeVarintMapsproto2(data, i, uint64(mapSize)) + data[i] = 0xd + i++ + i = encodeFixed32Mapsproto2(data, i, uint32(k)) + data[i] = 0x15 + i++ + i = encodeFixed32Mapsproto2(data, i, uint32(v)) + } + } + if len(m.Fixed64Map) > 0 { + keysForFixed64Map := make([]uint64, 0, len(m.Fixed64Map)) + for k := range m.Fixed64Map { + keysForFixed64Map = append(keysForFixed64Map, uint64(k)) + } + github_com_gogo_protobuf_sortkeys.Uint64s(keysForFixed64Map) + for _, k := range keysForFixed64Map { + data[i] = 0x5a + i++ + v := m.Fixed64Map[uint64(k)] + mapSize := 1 + 8 + 1 + 8 + i = encodeVarintMapsproto2(data, i, uint64(mapSize)) + data[i] = 0x9 + i++ + i = encodeFixed64Mapsproto2(data, i, uint64(k)) + data[i] = 0x11 + i++ + i = encodeFixed64Mapsproto2(data, i, uint64(v)) + } + } + if len(m.Sfixed64Map) > 0 { + keysForSfixed64Map := make([]int64, 0, len(m.Sfixed64Map)) + for k := range m.Sfixed64Map { + keysForSfixed64Map = append(keysForSfixed64Map, int64(k)) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForSfixed64Map) + for _, k := range keysForSfixed64Map { + data[i] = 0x62 + i++ + v := m.Sfixed64Map[int64(k)] + mapSize := 1 + 8 + 1 + 8 + i = encodeVarintMapsproto2(data, i, uint64(mapSize)) + data[i] = 0x9 + i++ + i = encodeFixed64Mapsproto2(data, i, uint64(k)) + data[i] = 0x11 + i++ + i = encodeFixed64Mapsproto2(data, i, uint64(v)) + } + } + if len(m.BoolMap) > 0 { + keysForBoolMap := make([]bool, 0, len(m.BoolMap)) + for k := range m.BoolMap { + keysForBoolMap = append(keysForBoolMap, bool(k)) + } + github_com_gogo_protobuf_sortkeys.Bools(keysForBoolMap) + for _, k := range keysForBoolMap { + data[i] = 0x6a + i++ + v := m.BoolMap[bool(k)] + mapSize := 1 + 1 + 1 + 1 + i = encodeVarintMapsproto2(data, i, uint64(mapSize)) + data[i] = 0x8 + i++ + if k { + data[i] = 1 + } else { + data[i] = 0 + } + i++ + data[i] = 0x10 + i++ + if v { + data[i] = 1 + } else { + data[i] = 0 + } + i++ + } + } + if len(m.StringMap) > 0 { + keysForStringMap := make([]string, 0, len(m.StringMap)) + for k := range m.StringMap { + keysForStringMap = append(keysForStringMap, string(k)) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringMap) + for _, k := range keysForStringMap { + data[i] = 0x72 + i++ + v := m.StringMap[string(k)] + mapSize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + 1 + len(v) + sovMapsproto2(uint64(len(v))) + i = encodeVarintMapsproto2(data, i, uint64(mapSize)) + data[i] = 0xa + i++ + i = encodeVarintMapsproto2(data, i, uint64(len(k))) + i += copy(data[i:], k) + data[i] = 0x12 + i++ + i = encodeVarintMapsproto2(data, i, uint64(len(v))) + i += copy(data[i:], v) + } + } + if len(m.StringToBytesMap) > 0 { + keysForStringToBytesMap := make([]string, 0, len(m.StringToBytesMap)) + for k := range m.StringToBytesMap { + keysForStringToBytesMap = append(keysForStringToBytesMap, string(k)) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToBytesMap) + for _, k := range keysForStringToBytesMap { + data[i] = 0x7a + i++ + v := m.StringToBytesMap[string(k)] + mapSize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + 1 + len(v) + sovMapsproto2(uint64(len(v))) + i = encodeVarintMapsproto2(data, i, uint64(mapSize)) + data[i] = 0xa + i++ + i = encodeVarintMapsproto2(data, i, uint64(len(k))) + i += copy(data[i:], k) + data[i] = 0x12 + i++ + i = encodeVarintMapsproto2(data, i, uint64(len(v))) + i += copy(data[i:], v) + } + } + if len(m.StringToEnumMap) > 0 { + keysForStringToEnumMap := make([]string, 0, len(m.StringToEnumMap)) + for k := range m.StringToEnumMap { + keysForStringToEnumMap = append(keysForStringToEnumMap, string(k)) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToEnumMap) + for _, k := range keysForStringToEnumMap { + data[i] = 0x82 + i++ + data[i] = 0x1 + i++ + v := m.StringToEnumMap[string(k)] + mapSize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + 1 + sovMapsproto2(uint64(v)) + i = encodeVarintMapsproto2(data, i, uint64(mapSize)) + data[i] = 0xa + i++ + i = encodeVarintMapsproto2(data, i, uint64(len(k))) + i += copy(data[i:], k) + data[i] = 0x10 + i++ + i = encodeVarintMapsproto2(data, i, uint64(v)) + } + } + if len(m.StringToMsgMap) > 0 { + keysForStringToMsgMap := make([]string, 0, len(m.StringToMsgMap)) + for k := range m.StringToMsgMap { + keysForStringToMsgMap = append(keysForStringToMsgMap, string(k)) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToMsgMap) + for _, k := range keysForStringToMsgMap { + data[i] = 0x8a + i++ + data[i] = 0x1 + i++ + v := m.StringToMsgMap[string(k)] + if v == nil { + return 0, errors.New("proto: map has nil element") + } + msgSize := v.Size() + mapSize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + 1 + msgSize + sovMapsproto2(uint64(msgSize)) + i = encodeVarintMapsproto2(data, i, uint64(mapSize)) + data[i] = 0xa + i++ + i = encodeVarintMapsproto2(data, i, uint64(len(k))) + i += copy(data[i:], k) + data[i] = 0x12 + i++ + i = encodeVarintMapsproto2(data, i, uint64(v.Size())) + n2, err := v.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n2 + } + } + if m.XXX_unrecognized != nil { + i += copy(data[i:], m.XXX_unrecognized) + } + return i, nil +} + +func encodeFixed64Mapsproto2(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 encodeFixed32Mapsproto2(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 encodeVarintMapsproto2(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 NewPopulatedFloatingPoint(r randyMapsproto2, easy bool) *FloatingPoint { + this := &FloatingPoint{} + if r.Intn(10) != 0 { + v1 := float64(r.Float64()) + if r.Intn(2) == 0 { + v1 *= -1 + } + this.F = &v1 + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedMapsproto2(r, 2) + } + return this +} + +func NewPopulatedAllMaps(r randyMapsproto2, easy bool) *AllMaps { + this := &AllMaps{} + if r.Intn(10) != 0 { + v2 := r.Intn(10) + this.StringToDoubleMap = make(map[string]float64) + for i := 0; i < v2; i++ { + v3 := randStringMapsproto2(r) + this.StringToDoubleMap[v3] = float64(r.Float64()) + if r.Intn(2) == 0 { + this.StringToDoubleMap[v3] *= -1 + } + } + } + if r.Intn(10) != 0 { + v4 := r.Intn(10) + this.StringToFloatMap = make(map[string]float32) + for i := 0; i < v4; i++ { + v5 := randStringMapsproto2(r) + this.StringToFloatMap[v5] = float32(r.Float32()) + if r.Intn(2) == 0 { + this.StringToFloatMap[v5] *= -1 + } + } + } + if r.Intn(10) != 0 { + v6 := r.Intn(10) + this.Int32Map = make(map[int32]int32) + for i := 0; i < v6; i++ { + v7 := int32(r.Int31()) + this.Int32Map[v7] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Int32Map[v7] *= -1 + } + } + } + if r.Intn(10) != 0 { + v8 := r.Intn(10) + this.Int64Map = make(map[int64]int64) + for i := 0; i < v8; i++ { + v9 := int64(r.Int63()) + this.Int64Map[v9] = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Int64Map[v9] *= -1 + } + } + } + if r.Intn(10) != 0 { + v10 := r.Intn(10) + this.Uint32Map = make(map[uint32]uint32) + for i := 0; i < v10; i++ { + v11 := uint32(r.Uint32()) + this.Uint32Map[v11] = uint32(r.Uint32()) + } + } + if r.Intn(10) != 0 { + v12 := r.Intn(10) + this.Uint64Map = make(map[uint64]uint64) + for i := 0; i < v12; i++ { + v13 := uint64(uint64(r.Uint32())) + this.Uint64Map[v13] = uint64(uint64(r.Uint32())) + } + } + if r.Intn(10) != 0 { + v14 := r.Intn(10) + this.Sint32Map = make(map[int32]int32) + for i := 0; i < v14; i++ { + v15 := int32(r.Int31()) + this.Sint32Map[v15] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Sint32Map[v15] *= -1 + } + } + } + if r.Intn(10) != 0 { + v16 := r.Intn(10) + this.Sint64Map = make(map[int64]int64) + for i := 0; i < v16; i++ { + v17 := int64(r.Int63()) + this.Sint64Map[v17] = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Sint64Map[v17] *= -1 + } + } + } + if r.Intn(10) != 0 { + v18 := r.Intn(10) + this.Fixed32Map = make(map[uint32]uint32) + for i := 0; i < v18; i++ { + v19 := uint32(r.Uint32()) + this.Fixed32Map[v19] = uint32(r.Uint32()) + } + } + if r.Intn(10) != 0 { + v20 := r.Intn(10) + this.Sfixed32Map = make(map[int32]int32) + for i := 0; i < v20; i++ { + v21 := int32(r.Int31()) + this.Sfixed32Map[v21] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Sfixed32Map[v21] *= -1 + } + } + } + if r.Intn(10) != 0 { + v22 := r.Intn(10) + this.Fixed64Map = make(map[uint64]uint64) + for i := 0; i < v22; i++ { + v23 := uint64(uint64(r.Uint32())) + this.Fixed64Map[v23] = uint64(uint64(r.Uint32())) + } + } + if r.Intn(10) != 0 { + v24 := r.Intn(10) + this.Sfixed64Map = make(map[int64]int64) + for i := 0; i < v24; i++ { + v25 := int64(r.Int63()) + this.Sfixed64Map[v25] = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Sfixed64Map[v25] *= -1 + } + } + } + if r.Intn(10) != 0 { + v26 := r.Intn(10) + this.BoolMap = make(map[bool]bool) + for i := 0; i < v26; i++ { + v27 := bool(bool(r.Intn(2) == 0)) + this.BoolMap[v27] = bool(bool(r.Intn(2) == 0)) + } + } + if r.Intn(10) != 0 { + v28 := r.Intn(10) + this.StringMap = make(map[string]string) + for i := 0; i < v28; i++ { + this.StringMap[randStringMapsproto2(r)] = randStringMapsproto2(r) + } + } + if r.Intn(10) != 0 { + v29 := r.Intn(10) + this.StringToBytesMap = make(map[string][]byte) + for i := 0; i < v29; i++ { + v30 := r.Intn(100) + v31 := randStringMapsproto2(r) + this.StringToBytesMap[v31] = make([]byte, v30) + for i := 0; i < v30; i++ { + this.StringToBytesMap[v31][i] = byte(r.Intn(256)) + } + } + } + if r.Intn(10) != 0 { + v32 := r.Intn(10) + this.StringToEnumMap = make(map[string]MapEnum) + for i := 0; i < v32; i++ { + this.StringToEnumMap[randStringMapsproto2(r)] = MapEnum([]int32{0, 1, 2}[r.Intn(3)]) + } + } + if r.Intn(10) != 0 { + v33 := r.Intn(10) + this.StringToMsgMap = make(map[string]*FloatingPoint) + for i := 0; i < v33; i++ { + this.StringToMsgMap[randStringMapsproto2(r)] = NewPopulatedFloatingPoint(r, easy) + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedMapsproto2(r, 18) + } + return this +} + +func NewPopulatedAllMapsOrdered(r randyMapsproto2, easy bool) *AllMapsOrdered { + this := &AllMapsOrdered{} + if r.Intn(10) != 0 { + v34 := r.Intn(10) + this.StringToDoubleMap = make(map[string]float64) + for i := 0; i < v34; i++ { + v35 := randStringMapsproto2(r) + this.StringToDoubleMap[v35] = float64(r.Float64()) + if r.Intn(2) == 0 { + this.StringToDoubleMap[v35] *= -1 + } + } + } + if r.Intn(10) != 0 { + v36 := r.Intn(10) + this.StringToFloatMap = make(map[string]float32) + for i := 0; i < v36; i++ { + v37 := randStringMapsproto2(r) + this.StringToFloatMap[v37] = float32(r.Float32()) + if r.Intn(2) == 0 { + this.StringToFloatMap[v37] *= -1 + } + } + } + if r.Intn(10) != 0 { + v38 := r.Intn(10) + this.Int32Map = make(map[int32]int32) + for i := 0; i < v38; i++ { + v39 := int32(r.Int31()) + this.Int32Map[v39] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Int32Map[v39] *= -1 + } + } + } + if r.Intn(10) != 0 { + v40 := r.Intn(10) + this.Int64Map = make(map[int64]int64) + for i := 0; i < v40; i++ { + v41 := int64(r.Int63()) + this.Int64Map[v41] = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Int64Map[v41] *= -1 + } + } + } + if r.Intn(10) != 0 { + v42 := r.Intn(10) + this.Uint32Map = make(map[uint32]uint32) + for i := 0; i < v42; i++ { + v43 := uint32(r.Uint32()) + this.Uint32Map[v43] = uint32(r.Uint32()) + } + } + if r.Intn(10) != 0 { + v44 := r.Intn(10) + this.Uint64Map = make(map[uint64]uint64) + for i := 0; i < v44; i++ { + v45 := uint64(uint64(r.Uint32())) + this.Uint64Map[v45] = uint64(uint64(r.Uint32())) + } + } + if r.Intn(10) != 0 { + v46 := r.Intn(10) + this.Sint32Map = make(map[int32]int32) + for i := 0; i < v46; i++ { + v47 := int32(r.Int31()) + this.Sint32Map[v47] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Sint32Map[v47] *= -1 + } + } + } + if r.Intn(10) != 0 { + v48 := r.Intn(10) + this.Sint64Map = make(map[int64]int64) + for i := 0; i < v48; i++ { + v49 := int64(r.Int63()) + this.Sint64Map[v49] = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Sint64Map[v49] *= -1 + } + } + } + if r.Intn(10) != 0 { + v50 := r.Intn(10) + this.Fixed32Map = make(map[uint32]uint32) + for i := 0; i < v50; i++ { + v51 := uint32(r.Uint32()) + this.Fixed32Map[v51] = uint32(r.Uint32()) + } + } + if r.Intn(10) != 0 { + v52 := r.Intn(10) + this.Sfixed32Map = make(map[int32]int32) + for i := 0; i < v52; i++ { + v53 := int32(r.Int31()) + this.Sfixed32Map[v53] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Sfixed32Map[v53] *= -1 + } + } + } + if r.Intn(10) != 0 { + v54 := r.Intn(10) + this.Fixed64Map = make(map[uint64]uint64) + for i := 0; i < v54; i++ { + v55 := uint64(uint64(r.Uint32())) + this.Fixed64Map[v55] = uint64(uint64(r.Uint32())) + } + } + if r.Intn(10) != 0 { + v56 := r.Intn(10) + this.Sfixed64Map = make(map[int64]int64) + for i := 0; i < v56; i++ { + v57 := int64(r.Int63()) + this.Sfixed64Map[v57] = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Sfixed64Map[v57] *= -1 + } + } + } + if r.Intn(10) != 0 { + v58 := r.Intn(10) + this.BoolMap = make(map[bool]bool) + for i := 0; i < v58; i++ { + v59 := bool(bool(r.Intn(2) == 0)) + this.BoolMap[v59] = bool(bool(r.Intn(2) == 0)) + } + } + if r.Intn(10) != 0 { + v60 := r.Intn(10) + this.StringMap = make(map[string]string) + for i := 0; i < v60; i++ { + this.StringMap[randStringMapsproto2(r)] = randStringMapsproto2(r) + } + } + if r.Intn(10) != 0 { + v61 := r.Intn(10) + this.StringToBytesMap = make(map[string][]byte) + for i := 0; i < v61; i++ { + v62 := r.Intn(100) + v63 := randStringMapsproto2(r) + this.StringToBytesMap[v63] = make([]byte, v62) + for i := 0; i < v62; i++ { + this.StringToBytesMap[v63][i] = byte(r.Intn(256)) + } + } + } + if r.Intn(10) != 0 { + v64 := r.Intn(10) + this.StringToEnumMap = make(map[string]MapEnum) + for i := 0; i < v64; i++ { + this.StringToEnumMap[randStringMapsproto2(r)] = MapEnum([]int32{0, 1, 2}[r.Intn(3)]) + } + } + if r.Intn(10) != 0 { + v65 := r.Intn(10) + this.StringToMsgMap = make(map[string]*FloatingPoint) + for i := 0; i < v65; i++ { + this.StringToMsgMap[randStringMapsproto2(r)] = NewPopulatedFloatingPoint(r, easy) + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedMapsproto2(r, 18) + } + return this +} + +type randyMapsproto2 interface { + Float32() float32 + Float64() float64 + Int63() int64 + Int31() int32 + Uint32() uint32 + Intn(n int) int +} + +func randUTF8RuneMapsproto2(r randyMapsproto2) 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 randStringMapsproto2(r randyMapsproto2) string { + v66 := r.Intn(100) + tmps := make([]rune, v66) + for i := 0; i < v66; i++ { + tmps[i] = randUTF8RuneMapsproto2(r) + } + return string(tmps) +} +func randUnrecognizedMapsproto2(r randyMapsproto2, 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 = randFieldMapsproto2(data, r, fieldNumber, wire) + } + return data +} +func randFieldMapsproto2(data []byte, r randyMapsproto2, fieldNumber int, wire int) []byte { + key := uint32(fieldNumber)<<3 | uint32(wire) + switch wire { + case 0: + data = encodeVarintPopulateMapsproto2(data, uint64(key)) + v67 := r.Int63() + if r.Intn(2) == 0 { + v67 *= -1 + } + data = encodeVarintPopulateMapsproto2(data, uint64(v67)) + case 1: + data = encodeVarintPopulateMapsproto2(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 = encodeVarintPopulateMapsproto2(data, uint64(key)) + ll := r.Intn(100) + data = encodeVarintPopulateMapsproto2(data, uint64(ll)) + for j := 0; j < ll; j++ { + data = append(data, byte(r.Intn(256))) + } + default: + data = encodeVarintPopulateMapsproto2(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 encodeVarintPopulateMapsproto2(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 *FloatingPoint) Size() (n int) { + var l int + _ = l + if m.F != nil { + n += 9 + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *AllMaps) Size() (n int) { + var l int + _ = l + if len(m.StringToDoubleMap) > 0 { + for k, v := range m.StringToDoubleMap { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + 1 + 8 + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.StringToFloatMap) > 0 { + for k, v := range m.StringToFloatMap { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + 1 + 4 + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.Int32Map) > 0 { + for k, v := range m.Int32Map { + _ = k + _ = v + mapEntrySize := 1 + sovMapsproto2(uint64(k)) + 1 + sovMapsproto2(uint64(v)) + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.Int64Map) > 0 { + for k, v := range m.Int64Map { + _ = k + _ = v + mapEntrySize := 1 + sovMapsproto2(uint64(k)) + 1 + sovMapsproto2(uint64(v)) + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.Uint32Map) > 0 { + for k, v := range m.Uint32Map { + _ = k + _ = v + mapEntrySize := 1 + sovMapsproto2(uint64(k)) + 1 + sovMapsproto2(uint64(v)) + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.Uint64Map) > 0 { + for k, v := range m.Uint64Map { + _ = k + _ = v + mapEntrySize := 1 + sovMapsproto2(uint64(k)) + 1 + sovMapsproto2(uint64(v)) + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.Sint32Map) > 0 { + for k, v := range m.Sint32Map { + _ = k + _ = v + mapEntrySize := 1 + sozMapsproto2(uint64(k)) + 1 + sozMapsproto2(uint64(v)) + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.Sint64Map) > 0 { + for k, v := range m.Sint64Map { + _ = k + _ = v + mapEntrySize := 1 + sozMapsproto2(uint64(k)) + 1 + sozMapsproto2(uint64(v)) + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.Fixed32Map) > 0 { + for k, v := range m.Fixed32Map { + _ = k + _ = v + mapEntrySize := 1 + 4 + 1 + 4 + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.Sfixed32Map) > 0 { + for k, v := range m.Sfixed32Map { + _ = k + _ = v + mapEntrySize := 1 + 4 + 1 + 4 + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.Fixed64Map) > 0 { + for k, v := range m.Fixed64Map { + _ = k + _ = v + mapEntrySize := 1 + 8 + 1 + 8 + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.Sfixed64Map) > 0 { + for k, v := range m.Sfixed64Map { + _ = k + _ = v + mapEntrySize := 1 + 8 + 1 + 8 + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.BoolMap) > 0 { + for k, v := range m.BoolMap { + _ = k + _ = v + mapEntrySize := 1 + 1 + 1 + 1 + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.StringMap) > 0 { + for k, v := range m.StringMap { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + 1 + len(v) + sovMapsproto2(uint64(len(v))) + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.StringToBytesMap) > 0 { + for k, v := range m.StringToBytesMap { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + 1 + len(v) + sovMapsproto2(uint64(len(v))) + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.StringToEnumMap) > 0 { + for k, v := range m.StringToEnumMap { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + 1 + sovMapsproto2(uint64(v)) + n += mapEntrySize + 2 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.StringToMsgMap) > 0 { + for k, v := range m.StringToMsgMap { + _ = k + _ = v + l = 0 + if v != nil { + l = v.Size() + } + mapEntrySize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + 1 + l + sovMapsproto2(uint64(l)) + n += mapEntrySize + 2 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *AllMapsOrdered) Size() (n int) { + var l int + _ = l + if len(m.StringToDoubleMap) > 0 { + for k, v := range m.StringToDoubleMap { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + 1 + 8 + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.StringToFloatMap) > 0 { + for k, v := range m.StringToFloatMap { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + 1 + 4 + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.Int32Map) > 0 { + for k, v := range m.Int32Map { + _ = k + _ = v + mapEntrySize := 1 + sovMapsproto2(uint64(k)) + 1 + sovMapsproto2(uint64(v)) + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.Int64Map) > 0 { + for k, v := range m.Int64Map { + _ = k + _ = v + mapEntrySize := 1 + sovMapsproto2(uint64(k)) + 1 + sovMapsproto2(uint64(v)) + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.Uint32Map) > 0 { + for k, v := range m.Uint32Map { + _ = k + _ = v + mapEntrySize := 1 + sovMapsproto2(uint64(k)) + 1 + sovMapsproto2(uint64(v)) + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.Uint64Map) > 0 { + for k, v := range m.Uint64Map { + _ = k + _ = v + mapEntrySize := 1 + sovMapsproto2(uint64(k)) + 1 + sovMapsproto2(uint64(v)) + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.Sint32Map) > 0 { + for k, v := range m.Sint32Map { + _ = k + _ = v + mapEntrySize := 1 + sozMapsproto2(uint64(k)) + 1 + sozMapsproto2(uint64(v)) + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.Sint64Map) > 0 { + for k, v := range m.Sint64Map { + _ = k + _ = v + mapEntrySize := 1 + sozMapsproto2(uint64(k)) + 1 + sozMapsproto2(uint64(v)) + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.Fixed32Map) > 0 { + for k, v := range m.Fixed32Map { + _ = k + _ = v + mapEntrySize := 1 + 4 + 1 + 4 + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.Sfixed32Map) > 0 { + for k, v := range m.Sfixed32Map { + _ = k + _ = v + mapEntrySize := 1 + 4 + 1 + 4 + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.Fixed64Map) > 0 { + for k, v := range m.Fixed64Map { + _ = k + _ = v + mapEntrySize := 1 + 8 + 1 + 8 + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.Sfixed64Map) > 0 { + for k, v := range m.Sfixed64Map { + _ = k + _ = v + mapEntrySize := 1 + 8 + 1 + 8 + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.BoolMap) > 0 { + for k, v := range m.BoolMap { + _ = k + _ = v + mapEntrySize := 1 + 1 + 1 + 1 + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.StringMap) > 0 { + for k, v := range m.StringMap { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + 1 + len(v) + sovMapsproto2(uint64(len(v))) + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.StringToBytesMap) > 0 { + for k, v := range m.StringToBytesMap { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + 1 + len(v) + sovMapsproto2(uint64(len(v))) + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.StringToEnumMap) > 0 { + for k, v := range m.StringToEnumMap { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + 1 + sovMapsproto2(uint64(v)) + n += mapEntrySize + 2 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.StringToMsgMap) > 0 { + for k, v := range m.StringToMsgMap { + _ = k + _ = v + l = 0 + if v != nil { + l = v.Size() + } + mapEntrySize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + 1 + l + sovMapsproto2(uint64(l)) + n += mapEntrySize + 2 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func sovMapsproto2(x uint64) (n int) { + for { + n++ + x >>= 7 + if x == 0 { + break + } + } + return n +} +func sozMapsproto2(x uint64) (n int) { + return sovMapsproto2(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (this *FloatingPoint) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&FloatingPoint{`, + `F:` + valueToStringMapsproto2(this.F) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *AllMaps) String() string { + if this == nil { + return "nil" + } + keysForStringToDoubleMap := make([]string, 0, len(this.StringToDoubleMap)) + for k := range this.StringToDoubleMap { + keysForStringToDoubleMap = append(keysForStringToDoubleMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToDoubleMap) + mapStringForStringToDoubleMap := "map[string]float64{" + for _, k := range keysForStringToDoubleMap { + mapStringForStringToDoubleMap += fmt.Sprintf("%v: %v,", k, this.StringToDoubleMap[k]) + } + mapStringForStringToDoubleMap += "}" + keysForStringToFloatMap := make([]string, 0, len(this.StringToFloatMap)) + for k := range this.StringToFloatMap { + keysForStringToFloatMap = append(keysForStringToFloatMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToFloatMap) + mapStringForStringToFloatMap := "map[string]float32{" + for _, k := range keysForStringToFloatMap { + mapStringForStringToFloatMap += fmt.Sprintf("%v: %v,", k, this.StringToFloatMap[k]) + } + mapStringForStringToFloatMap += "}" + keysForInt32Map := make([]int32, 0, len(this.Int32Map)) + for k := range this.Int32Map { + keysForInt32Map = append(keysForInt32Map, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForInt32Map) + mapStringForInt32Map := "map[int32]int32{" + for _, k := range keysForInt32Map { + mapStringForInt32Map += fmt.Sprintf("%v: %v,", k, this.Int32Map[k]) + } + mapStringForInt32Map += "}" + keysForInt64Map := make([]int64, 0, len(this.Int64Map)) + for k := range this.Int64Map { + keysForInt64Map = append(keysForInt64Map, k) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForInt64Map) + mapStringForInt64Map := "map[int64]int64{" + for _, k := range keysForInt64Map { + mapStringForInt64Map += fmt.Sprintf("%v: %v,", k, this.Int64Map[k]) + } + mapStringForInt64Map += "}" + keysForUint32Map := make([]uint32, 0, len(this.Uint32Map)) + for k := range this.Uint32Map { + keysForUint32Map = append(keysForUint32Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint32s(keysForUint32Map) + mapStringForUint32Map := "map[uint32]uint32{" + for _, k := range keysForUint32Map { + mapStringForUint32Map += fmt.Sprintf("%v: %v,", k, this.Uint32Map[k]) + } + mapStringForUint32Map += "}" + keysForUint64Map := make([]uint64, 0, len(this.Uint64Map)) + for k := range this.Uint64Map { + keysForUint64Map = append(keysForUint64Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint64s(keysForUint64Map) + mapStringForUint64Map := "map[uint64]uint64{" + for _, k := range keysForUint64Map { + mapStringForUint64Map += fmt.Sprintf("%v: %v,", k, this.Uint64Map[k]) + } + mapStringForUint64Map += "}" + keysForSint32Map := make([]int32, 0, len(this.Sint32Map)) + for k := range this.Sint32Map { + keysForSint32Map = append(keysForSint32Map, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForSint32Map) + mapStringForSint32Map := "map[int32]int32{" + for _, k := range keysForSint32Map { + mapStringForSint32Map += fmt.Sprintf("%v: %v,", k, this.Sint32Map[k]) + } + mapStringForSint32Map += "}" + keysForSint64Map := make([]int64, 0, len(this.Sint64Map)) + for k := range this.Sint64Map { + keysForSint64Map = append(keysForSint64Map, k) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForSint64Map) + mapStringForSint64Map := "map[int64]int64{" + for _, k := range keysForSint64Map { + mapStringForSint64Map += fmt.Sprintf("%v: %v,", k, this.Sint64Map[k]) + } + mapStringForSint64Map += "}" + keysForFixed32Map := make([]uint32, 0, len(this.Fixed32Map)) + for k := range this.Fixed32Map { + keysForFixed32Map = append(keysForFixed32Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint32s(keysForFixed32Map) + mapStringForFixed32Map := "map[uint32]uint32{" + for _, k := range keysForFixed32Map { + mapStringForFixed32Map += fmt.Sprintf("%v: %v,", k, this.Fixed32Map[k]) + } + mapStringForFixed32Map += "}" + keysForSfixed32Map := make([]int32, 0, len(this.Sfixed32Map)) + for k := range this.Sfixed32Map { + keysForSfixed32Map = append(keysForSfixed32Map, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForSfixed32Map) + mapStringForSfixed32Map := "map[int32]int32{" + for _, k := range keysForSfixed32Map { + mapStringForSfixed32Map += fmt.Sprintf("%v: %v,", k, this.Sfixed32Map[k]) + } + mapStringForSfixed32Map += "}" + keysForFixed64Map := make([]uint64, 0, len(this.Fixed64Map)) + for k := range this.Fixed64Map { + keysForFixed64Map = append(keysForFixed64Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint64s(keysForFixed64Map) + mapStringForFixed64Map := "map[uint64]uint64{" + for _, k := range keysForFixed64Map { + mapStringForFixed64Map += fmt.Sprintf("%v: %v,", k, this.Fixed64Map[k]) + } + mapStringForFixed64Map += "}" + keysForSfixed64Map := make([]int64, 0, len(this.Sfixed64Map)) + for k := range this.Sfixed64Map { + keysForSfixed64Map = append(keysForSfixed64Map, k) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForSfixed64Map) + mapStringForSfixed64Map := "map[int64]int64{" + for _, k := range keysForSfixed64Map { + mapStringForSfixed64Map += fmt.Sprintf("%v: %v,", k, this.Sfixed64Map[k]) + } + mapStringForSfixed64Map += "}" + keysForBoolMap := make([]bool, 0, len(this.BoolMap)) + for k := range this.BoolMap { + keysForBoolMap = append(keysForBoolMap, k) + } + github_com_gogo_protobuf_sortkeys.Bools(keysForBoolMap) + mapStringForBoolMap := "map[bool]bool{" + for _, k := range keysForBoolMap { + mapStringForBoolMap += fmt.Sprintf("%v: %v,", k, this.BoolMap[k]) + } + mapStringForBoolMap += "}" + keysForStringMap := make([]string, 0, len(this.StringMap)) + for k := range this.StringMap { + keysForStringMap = append(keysForStringMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringMap) + mapStringForStringMap := "map[string]string{" + for _, k := range keysForStringMap { + mapStringForStringMap += fmt.Sprintf("%v: %v,", k, this.StringMap[k]) + } + mapStringForStringMap += "}" + keysForStringToBytesMap := make([]string, 0, len(this.StringToBytesMap)) + for k := range this.StringToBytesMap { + keysForStringToBytesMap = append(keysForStringToBytesMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToBytesMap) + mapStringForStringToBytesMap := "map[string][]byte{" + for _, k := range keysForStringToBytesMap { + mapStringForStringToBytesMap += fmt.Sprintf("%v: %v,", k, this.StringToBytesMap[k]) + } + mapStringForStringToBytesMap += "}" + keysForStringToEnumMap := make([]string, 0, len(this.StringToEnumMap)) + for k := range this.StringToEnumMap { + keysForStringToEnumMap = append(keysForStringToEnumMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToEnumMap) + mapStringForStringToEnumMap := "map[string]MapEnum{" + for _, k := range keysForStringToEnumMap { + mapStringForStringToEnumMap += fmt.Sprintf("%v: %v,", k, this.StringToEnumMap[k]) + } + mapStringForStringToEnumMap += "}" + keysForStringToMsgMap := make([]string, 0, len(this.StringToMsgMap)) + for k := range this.StringToMsgMap { + keysForStringToMsgMap = append(keysForStringToMsgMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToMsgMap) + mapStringForStringToMsgMap := "map[string]*FloatingPoint{" + for _, k := range keysForStringToMsgMap { + mapStringForStringToMsgMap += fmt.Sprintf("%v: %v,", k, this.StringToMsgMap[k]) + } + mapStringForStringToMsgMap += "}" + s := strings.Join([]string{`&AllMaps{`, + `StringToDoubleMap:` + mapStringForStringToDoubleMap + `,`, + `StringToFloatMap:` + mapStringForStringToFloatMap + `,`, + `Int32Map:` + mapStringForInt32Map + `,`, + `Int64Map:` + mapStringForInt64Map + `,`, + `Uint32Map:` + mapStringForUint32Map + `,`, + `Uint64Map:` + mapStringForUint64Map + `,`, + `Sint32Map:` + mapStringForSint32Map + `,`, + `Sint64Map:` + mapStringForSint64Map + `,`, + `Fixed32Map:` + mapStringForFixed32Map + `,`, + `Sfixed32Map:` + mapStringForSfixed32Map + `,`, + `Fixed64Map:` + mapStringForFixed64Map + `,`, + `Sfixed64Map:` + mapStringForSfixed64Map + `,`, + `BoolMap:` + mapStringForBoolMap + `,`, + `StringMap:` + mapStringForStringMap + `,`, + `StringToBytesMap:` + mapStringForStringToBytesMap + `,`, + `StringToEnumMap:` + mapStringForStringToEnumMap + `,`, + `StringToMsgMap:` + mapStringForStringToMsgMap + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *AllMapsOrdered) String() string { + if this == nil { + return "nil" + } + keysForStringToDoubleMap := make([]string, 0, len(this.StringToDoubleMap)) + for k := range this.StringToDoubleMap { + keysForStringToDoubleMap = append(keysForStringToDoubleMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToDoubleMap) + mapStringForStringToDoubleMap := "map[string]float64{" + for _, k := range keysForStringToDoubleMap { + mapStringForStringToDoubleMap += fmt.Sprintf("%v: %v,", k, this.StringToDoubleMap[k]) + } + mapStringForStringToDoubleMap += "}" + keysForStringToFloatMap := make([]string, 0, len(this.StringToFloatMap)) + for k := range this.StringToFloatMap { + keysForStringToFloatMap = append(keysForStringToFloatMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToFloatMap) + mapStringForStringToFloatMap := "map[string]float32{" + for _, k := range keysForStringToFloatMap { + mapStringForStringToFloatMap += fmt.Sprintf("%v: %v,", k, this.StringToFloatMap[k]) + } + mapStringForStringToFloatMap += "}" + keysForInt32Map := make([]int32, 0, len(this.Int32Map)) + for k := range this.Int32Map { + keysForInt32Map = append(keysForInt32Map, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForInt32Map) + mapStringForInt32Map := "map[int32]int32{" + for _, k := range keysForInt32Map { + mapStringForInt32Map += fmt.Sprintf("%v: %v,", k, this.Int32Map[k]) + } + mapStringForInt32Map += "}" + keysForInt64Map := make([]int64, 0, len(this.Int64Map)) + for k := range this.Int64Map { + keysForInt64Map = append(keysForInt64Map, k) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForInt64Map) + mapStringForInt64Map := "map[int64]int64{" + for _, k := range keysForInt64Map { + mapStringForInt64Map += fmt.Sprintf("%v: %v,", k, this.Int64Map[k]) + } + mapStringForInt64Map += "}" + keysForUint32Map := make([]uint32, 0, len(this.Uint32Map)) + for k := range this.Uint32Map { + keysForUint32Map = append(keysForUint32Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint32s(keysForUint32Map) + mapStringForUint32Map := "map[uint32]uint32{" + for _, k := range keysForUint32Map { + mapStringForUint32Map += fmt.Sprintf("%v: %v,", k, this.Uint32Map[k]) + } + mapStringForUint32Map += "}" + keysForUint64Map := make([]uint64, 0, len(this.Uint64Map)) + for k := range this.Uint64Map { + keysForUint64Map = append(keysForUint64Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint64s(keysForUint64Map) + mapStringForUint64Map := "map[uint64]uint64{" + for _, k := range keysForUint64Map { + mapStringForUint64Map += fmt.Sprintf("%v: %v,", k, this.Uint64Map[k]) + } + mapStringForUint64Map += "}" + keysForSint32Map := make([]int32, 0, len(this.Sint32Map)) + for k := range this.Sint32Map { + keysForSint32Map = append(keysForSint32Map, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForSint32Map) + mapStringForSint32Map := "map[int32]int32{" + for _, k := range keysForSint32Map { + mapStringForSint32Map += fmt.Sprintf("%v: %v,", k, this.Sint32Map[k]) + } + mapStringForSint32Map += "}" + keysForSint64Map := make([]int64, 0, len(this.Sint64Map)) + for k := range this.Sint64Map { + keysForSint64Map = append(keysForSint64Map, k) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForSint64Map) + mapStringForSint64Map := "map[int64]int64{" + for _, k := range keysForSint64Map { + mapStringForSint64Map += fmt.Sprintf("%v: %v,", k, this.Sint64Map[k]) + } + mapStringForSint64Map += "}" + keysForFixed32Map := make([]uint32, 0, len(this.Fixed32Map)) + for k := range this.Fixed32Map { + keysForFixed32Map = append(keysForFixed32Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint32s(keysForFixed32Map) + mapStringForFixed32Map := "map[uint32]uint32{" + for _, k := range keysForFixed32Map { + mapStringForFixed32Map += fmt.Sprintf("%v: %v,", k, this.Fixed32Map[k]) + } + mapStringForFixed32Map += "}" + keysForSfixed32Map := make([]int32, 0, len(this.Sfixed32Map)) + for k := range this.Sfixed32Map { + keysForSfixed32Map = append(keysForSfixed32Map, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForSfixed32Map) + mapStringForSfixed32Map := "map[int32]int32{" + for _, k := range keysForSfixed32Map { + mapStringForSfixed32Map += fmt.Sprintf("%v: %v,", k, this.Sfixed32Map[k]) + } + mapStringForSfixed32Map += "}" + keysForFixed64Map := make([]uint64, 0, len(this.Fixed64Map)) + for k := range this.Fixed64Map { + keysForFixed64Map = append(keysForFixed64Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint64s(keysForFixed64Map) + mapStringForFixed64Map := "map[uint64]uint64{" + for _, k := range keysForFixed64Map { + mapStringForFixed64Map += fmt.Sprintf("%v: %v,", k, this.Fixed64Map[k]) + } + mapStringForFixed64Map += "}" + keysForSfixed64Map := make([]int64, 0, len(this.Sfixed64Map)) + for k := range this.Sfixed64Map { + keysForSfixed64Map = append(keysForSfixed64Map, k) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForSfixed64Map) + mapStringForSfixed64Map := "map[int64]int64{" + for _, k := range keysForSfixed64Map { + mapStringForSfixed64Map += fmt.Sprintf("%v: %v,", k, this.Sfixed64Map[k]) + } + mapStringForSfixed64Map += "}" + keysForBoolMap := make([]bool, 0, len(this.BoolMap)) + for k := range this.BoolMap { + keysForBoolMap = append(keysForBoolMap, k) + } + github_com_gogo_protobuf_sortkeys.Bools(keysForBoolMap) + mapStringForBoolMap := "map[bool]bool{" + for _, k := range keysForBoolMap { + mapStringForBoolMap += fmt.Sprintf("%v: %v,", k, this.BoolMap[k]) + } + mapStringForBoolMap += "}" + keysForStringMap := make([]string, 0, len(this.StringMap)) + for k := range this.StringMap { + keysForStringMap = append(keysForStringMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringMap) + mapStringForStringMap := "map[string]string{" + for _, k := range keysForStringMap { + mapStringForStringMap += fmt.Sprintf("%v: %v,", k, this.StringMap[k]) + } + mapStringForStringMap += "}" + keysForStringToBytesMap := make([]string, 0, len(this.StringToBytesMap)) + for k := range this.StringToBytesMap { + keysForStringToBytesMap = append(keysForStringToBytesMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToBytesMap) + mapStringForStringToBytesMap := "map[string][]byte{" + for _, k := range keysForStringToBytesMap { + mapStringForStringToBytesMap += fmt.Sprintf("%v: %v,", k, this.StringToBytesMap[k]) + } + mapStringForStringToBytesMap += "}" + keysForStringToEnumMap := make([]string, 0, len(this.StringToEnumMap)) + for k := range this.StringToEnumMap { + keysForStringToEnumMap = append(keysForStringToEnumMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToEnumMap) + mapStringForStringToEnumMap := "map[string]MapEnum{" + for _, k := range keysForStringToEnumMap { + mapStringForStringToEnumMap += fmt.Sprintf("%v: %v,", k, this.StringToEnumMap[k]) + } + mapStringForStringToEnumMap += "}" + keysForStringToMsgMap := make([]string, 0, len(this.StringToMsgMap)) + for k := range this.StringToMsgMap { + keysForStringToMsgMap = append(keysForStringToMsgMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToMsgMap) + mapStringForStringToMsgMap := "map[string]*FloatingPoint{" + for _, k := range keysForStringToMsgMap { + mapStringForStringToMsgMap += fmt.Sprintf("%v: %v,", k, this.StringToMsgMap[k]) + } + mapStringForStringToMsgMap += "}" + s := strings.Join([]string{`&AllMapsOrdered{`, + `StringToDoubleMap:` + mapStringForStringToDoubleMap + `,`, + `StringToFloatMap:` + mapStringForStringToFloatMap + `,`, + `Int32Map:` + mapStringForInt32Map + `,`, + `Int64Map:` + mapStringForInt64Map + `,`, + `Uint32Map:` + mapStringForUint32Map + `,`, + `Uint64Map:` + mapStringForUint64Map + `,`, + `Sint32Map:` + mapStringForSint32Map + `,`, + `Sint64Map:` + mapStringForSint64Map + `,`, + `Fixed32Map:` + mapStringForFixed32Map + `,`, + `Sfixed32Map:` + mapStringForSfixed32Map + `,`, + `Fixed64Map:` + mapStringForFixed64Map + `,`, + `Sfixed64Map:` + mapStringForSfixed64Map + `,`, + `BoolMap:` + mapStringForBoolMap + `,`, + `StringMap:` + mapStringForStringMap + `,`, + `StringToBytesMap:` + mapStringForStringToBytesMap + `,`, + `StringToEnumMap:` + mapStringForStringToEnumMap + `,`, + `StringToMsgMap:` + mapStringForStringToMsgMap + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func valueToStringMapsproto2(v interface{}) string { + rv := reflect.ValueOf(v) + if rv.IsNil() { + return "nil" + } + pv := reflect.Indirect(rv).Interface() + return fmt.Sprintf("*%v", pv) +} +func (m *FloatingPoint) 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 ErrIntOverflowMapsproto2 + } + 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: FloatingPoint: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: FloatingPoint: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field F", 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.F = &v2 + default: + iNdEx = preIndex + skippy, err := skipMapsproto2(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMapsproto2 + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *AllMaps) 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 ErrIntOverflowMapsproto2 + } + 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: AllMaps: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: AllMaps: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field StringToDoubleMap", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMapsproto2 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var keykey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + keykey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var stringLenmapkey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLenmapkey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapkey := int(stringLenmapkey) + if intStringLenmapkey < 0 { + return ErrInvalidLengthMapsproto2 + } + postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey > l { + return io.ErrUnexpectedEOF + } + mapkey := string(data[iNdEx:postStringIndexmapkey]) + iNdEx = postStringIndexmapkey + var valuekey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + valuekey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapvaluetemp uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + iNdEx += 8 + mapvaluetemp = uint64(data[iNdEx-8]) + mapvaluetemp |= uint64(data[iNdEx-7]) << 8 + mapvaluetemp |= uint64(data[iNdEx-6]) << 16 + mapvaluetemp |= uint64(data[iNdEx-5]) << 24 + mapvaluetemp |= uint64(data[iNdEx-4]) << 32 + mapvaluetemp |= uint64(data[iNdEx-3]) << 40 + mapvaluetemp |= uint64(data[iNdEx-2]) << 48 + mapvaluetemp |= uint64(data[iNdEx-1]) << 56 + mapvalue := math.Float64frombits(mapvaluetemp) + if m.StringToDoubleMap == nil { + m.StringToDoubleMap = make(map[string]float64) + } + m.StringToDoubleMap[mapkey] = mapvalue + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field StringToFloatMap", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMapsproto2 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var keykey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + keykey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var stringLenmapkey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLenmapkey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapkey := int(stringLenmapkey) + if intStringLenmapkey < 0 { + return ErrInvalidLengthMapsproto2 + } + postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey > l { + return io.ErrUnexpectedEOF + } + mapkey := string(data[iNdEx:postStringIndexmapkey]) + iNdEx = postStringIndexmapkey + var valuekey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + valuekey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapvaluetemp uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + iNdEx += 4 + mapvaluetemp = uint32(data[iNdEx-4]) + mapvaluetemp |= uint32(data[iNdEx-3]) << 8 + mapvaluetemp |= uint32(data[iNdEx-2]) << 16 + mapvaluetemp |= uint32(data[iNdEx-1]) << 24 + mapvalue := math.Float32frombits(mapvaluetemp) + if m.StringToFloatMap == nil { + m.StringToFloatMap = make(map[string]float32) + } + m.StringToFloatMap[mapkey] = mapvalue + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Int32Map", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMapsproto2 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var keykey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + keykey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapkey int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + mapkey |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var valuekey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + valuekey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapvalue int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + mapvalue |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if m.Int32Map == nil { + m.Int32Map = make(map[int32]int32) + } + m.Int32Map[mapkey] = mapvalue + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Int64Map", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMapsproto2 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var keykey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + keykey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapkey int64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + mapkey |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var valuekey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + valuekey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapvalue int64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + mapvalue |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if m.Int64Map == nil { + m.Int64Map = make(map[int64]int64) + } + m.Int64Map[mapkey] = mapvalue + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Uint32Map", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMapsproto2 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var keykey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + keykey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapkey uint32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + mapkey |= (uint32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var valuekey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + valuekey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapvalue uint32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + mapvalue |= (uint32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if m.Uint32Map == nil { + m.Uint32Map = make(map[uint32]uint32) + } + m.Uint32Map[mapkey] = mapvalue + iNdEx = postIndex + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Uint64Map", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMapsproto2 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var keykey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + keykey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapkey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + mapkey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var valuekey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + valuekey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapvalue uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + mapvalue |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if m.Uint64Map == nil { + m.Uint64Map = make(map[uint64]uint64) + } + m.Uint64Map[mapkey] = mapvalue + iNdEx = postIndex + case 7: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Sint32Map", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMapsproto2 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var keykey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + keykey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapkeytemp int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + mapkeytemp |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + mapkeytemp = int32((uint32(mapkeytemp) >> 1) ^ uint32(((mapkeytemp&1)<<31)>>31)) + mapkey := int32(mapkeytemp) + var valuekey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + valuekey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapvaluetemp int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + mapvaluetemp |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + mapvaluetemp = int32((uint32(mapvaluetemp) >> 1) ^ uint32(((mapvaluetemp&1)<<31)>>31)) + mapvalue := int32(mapvaluetemp) + if m.Sint32Map == nil { + m.Sint32Map = make(map[int32]int32) + } + m.Sint32Map[mapkey] = mapvalue + iNdEx = postIndex + case 8: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Sint64Map", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMapsproto2 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var keykey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + keykey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapkeytemp uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + mapkeytemp |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + mapkeytemp = (mapkeytemp >> 1) ^ uint64((int64(mapkeytemp&1)<<63)>>63) + mapkey := int64(mapkeytemp) + var valuekey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + valuekey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapvaluetemp uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + mapvaluetemp |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + mapvaluetemp = (mapvaluetemp >> 1) ^ uint64((int64(mapvaluetemp&1)<<63)>>63) + mapvalue := int64(mapvaluetemp) + if m.Sint64Map == nil { + m.Sint64Map = make(map[int64]int64) + } + m.Sint64Map[mapkey] = mapvalue + iNdEx = postIndex + case 9: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Fixed32Map", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMapsproto2 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var keykey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + keykey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapkey uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + iNdEx += 4 + mapkey = uint32(data[iNdEx-4]) + mapkey |= uint32(data[iNdEx-3]) << 8 + mapkey |= uint32(data[iNdEx-2]) << 16 + mapkey |= uint32(data[iNdEx-1]) << 24 + var valuekey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + valuekey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapvalue uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + iNdEx += 4 + mapvalue = uint32(data[iNdEx-4]) + mapvalue |= uint32(data[iNdEx-3]) << 8 + mapvalue |= uint32(data[iNdEx-2]) << 16 + mapvalue |= uint32(data[iNdEx-1]) << 24 + if m.Fixed32Map == nil { + m.Fixed32Map = make(map[uint32]uint32) + } + m.Fixed32Map[mapkey] = mapvalue + iNdEx = postIndex + case 10: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Sfixed32Map", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMapsproto2 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var keykey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + keykey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapkey int32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + iNdEx += 4 + mapkey = int32(data[iNdEx-4]) + mapkey |= int32(data[iNdEx-3]) << 8 + mapkey |= int32(data[iNdEx-2]) << 16 + mapkey |= int32(data[iNdEx-1]) << 24 + var valuekey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + valuekey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapvalue int32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + iNdEx += 4 + mapvalue = int32(data[iNdEx-4]) + mapvalue |= int32(data[iNdEx-3]) << 8 + mapvalue |= int32(data[iNdEx-2]) << 16 + mapvalue |= int32(data[iNdEx-1]) << 24 + if m.Sfixed32Map == nil { + m.Sfixed32Map = make(map[int32]int32) + } + m.Sfixed32Map[mapkey] = mapvalue + iNdEx = postIndex + case 11: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Fixed64Map", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMapsproto2 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var keykey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + keykey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapkey uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + iNdEx += 8 + mapkey = uint64(data[iNdEx-8]) + mapkey |= uint64(data[iNdEx-7]) << 8 + mapkey |= uint64(data[iNdEx-6]) << 16 + mapkey |= uint64(data[iNdEx-5]) << 24 + mapkey |= uint64(data[iNdEx-4]) << 32 + mapkey |= uint64(data[iNdEx-3]) << 40 + mapkey |= uint64(data[iNdEx-2]) << 48 + mapkey |= uint64(data[iNdEx-1]) << 56 + var valuekey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + valuekey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapvalue uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + iNdEx += 8 + mapvalue = uint64(data[iNdEx-8]) + mapvalue |= uint64(data[iNdEx-7]) << 8 + mapvalue |= uint64(data[iNdEx-6]) << 16 + mapvalue |= uint64(data[iNdEx-5]) << 24 + mapvalue |= uint64(data[iNdEx-4]) << 32 + mapvalue |= uint64(data[iNdEx-3]) << 40 + mapvalue |= uint64(data[iNdEx-2]) << 48 + mapvalue |= uint64(data[iNdEx-1]) << 56 + if m.Fixed64Map == nil { + m.Fixed64Map = make(map[uint64]uint64) + } + m.Fixed64Map[mapkey] = mapvalue + iNdEx = postIndex + case 12: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Sfixed64Map", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMapsproto2 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var keykey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + keykey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapkey int64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + iNdEx += 8 + mapkey = int64(data[iNdEx-8]) + mapkey |= int64(data[iNdEx-7]) << 8 + mapkey |= int64(data[iNdEx-6]) << 16 + mapkey |= int64(data[iNdEx-5]) << 24 + mapkey |= int64(data[iNdEx-4]) << 32 + mapkey |= int64(data[iNdEx-3]) << 40 + mapkey |= int64(data[iNdEx-2]) << 48 + mapkey |= int64(data[iNdEx-1]) << 56 + var valuekey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + valuekey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapvalue int64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + iNdEx += 8 + mapvalue = int64(data[iNdEx-8]) + mapvalue |= int64(data[iNdEx-7]) << 8 + mapvalue |= int64(data[iNdEx-6]) << 16 + mapvalue |= int64(data[iNdEx-5]) << 24 + mapvalue |= int64(data[iNdEx-4]) << 32 + mapvalue |= int64(data[iNdEx-3]) << 40 + mapvalue |= int64(data[iNdEx-2]) << 48 + mapvalue |= int64(data[iNdEx-1]) << 56 + if m.Sfixed64Map == nil { + m.Sfixed64Map = make(map[int64]int64) + } + m.Sfixed64Map[mapkey] = mapvalue + iNdEx = postIndex + case 13: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field BoolMap", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMapsproto2 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var keykey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + keykey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapkeytemp int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + mapkeytemp |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + mapkey := bool(mapkeytemp != 0) + var valuekey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + valuekey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapvaluetemp int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + mapvaluetemp |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + mapvalue := bool(mapvaluetemp != 0) + if m.BoolMap == nil { + m.BoolMap = make(map[bool]bool) + } + m.BoolMap[mapkey] = mapvalue + iNdEx = postIndex + case 14: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field StringMap", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMapsproto2 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var keykey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + keykey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var stringLenmapkey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLenmapkey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapkey := int(stringLenmapkey) + if intStringLenmapkey < 0 { + return ErrInvalidLengthMapsproto2 + } + postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey > l { + return io.ErrUnexpectedEOF + } + mapkey := string(data[iNdEx:postStringIndexmapkey]) + iNdEx = postStringIndexmapkey + var valuekey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + valuekey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var stringLenmapvalue uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLenmapvalue |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapvalue := int(stringLenmapvalue) + if intStringLenmapvalue < 0 { + return ErrInvalidLengthMapsproto2 + } + postStringIndexmapvalue := iNdEx + intStringLenmapvalue + if postStringIndexmapvalue > l { + return io.ErrUnexpectedEOF + } + mapvalue := string(data[iNdEx:postStringIndexmapvalue]) + iNdEx = postStringIndexmapvalue + if m.StringMap == nil { + m.StringMap = make(map[string]string) + } + m.StringMap[mapkey] = mapvalue + iNdEx = postIndex + case 15: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field StringToBytesMap", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMapsproto2 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var keykey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + keykey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var stringLenmapkey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLenmapkey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapkey := int(stringLenmapkey) + if intStringLenmapkey < 0 { + return ErrInvalidLengthMapsproto2 + } + postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey > l { + return io.ErrUnexpectedEOF + } + mapkey := string(data[iNdEx:postStringIndexmapkey]) + iNdEx = postStringIndexmapkey + var valuekey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + valuekey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapbyteLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + mapbyteLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intMapbyteLen := int(mapbyteLen) + if intMapbyteLen < 0 { + return ErrInvalidLengthMapsproto2 + } + postbytesIndex := iNdEx + intMapbyteLen + if postbytesIndex > l { + return io.ErrUnexpectedEOF + } + mapvalue := make([]byte, mapbyteLen) + copy(mapvalue, data[iNdEx:postbytesIndex]) + iNdEx = postbytesIndex + if m.StringToBytesMap == nil { + m.StringToBytesMap = make(map[string][]byte) + } + m.StringToBytesMap[mapkey] = mapvalue + iNdEx = postIndex + case 16: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field StringToEnumMap", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMapsproto2 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var keykey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + keykey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var stringLenmapkey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLenmapkey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapkey := int(stringLenmapkey) + if intStringLenmapkey < 0 { + return ErrInvalidLengthMapsproto2 + } + postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey > l { + return io.ErrUnexpectedEOF + } + mapkey := string(data[iNdEx:postStringIndexmapkey]) + iNdEx = postStringIndexmapkey + var valuekey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + valuekey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapvalue MapEnum + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + mapvalue |= (MapEnum(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if m.StringToEnumMap == nil { + m.StringToEnumMap = make(map[string]MapEnum) + } + m.StringToEnumMap[mapkey] = mapvalue + iNdEx = postIndex + case 17: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field StringToMsgMap", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMapsproto2 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var keykey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + keykey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var stringLenmapkey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLenmapkey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapkey := int(stringLenmapkey) + if intStringLenmapkey < 0 { + return ErrInvalidLengthMapsproto2 + } + postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey > l { + return io.ErrUnexpectedEOF + } + mapkey := string(data[iNdEx:postStringIndexmapkey]) + iNdEx = postStringIndexmapkey + var valuekey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + valuekey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapmsglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + mapmsglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if mapmsglen < 0 { + return ErrInvalidLengthMapsproto2 + } + postmsgIndex := iNdEx + mapmsglen + if mapmsglen < 0 { + return ErrInvalidLengthMapsproto2 + } + if postmsgIndex > l { + return io.ErrUnexpectedEOF + } + mapvalue := &FloatingPoint{} + if err := mapvalue.Unmarshal(data[iNdEx:postmsgIndex]); err != nil { + return err + } + iNdEx = postmsgIndex + if m.StringToMsgMap == nil { + m.StringToMsgMap = make(map[string]*FloatingPoint) + } + m.StringToMsgMap[mapkey] = mapvalue + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipMapsproto2(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMapsproto2 + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *AllMapsOrdered) 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 ErrIntOverflowMapsproto2 + } + 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: AllMapsOrdered: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: AllMapsOrdered: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field StringToDoubleMap", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMapsproto2 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var keykey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + keykey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var stringLenmapkey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLenmapkey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapkey := int(stringLenmapkey) + if intStringLenmapkey < 0 { + return ErrInvalidLengthMapsproto2 + } + postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey > l { + return io.ErrUnexpectedEOF + } + mapkey := string(data[iNdEx:postStringIndexmapkey]) + iNdEx = postStringIndexmapkey + var valuekey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + valuekey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapvaluetemp uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + iNdEx += 8 + mapvaluetemp = uint64(data[iNdEx-8]) + mapvaluetemp |= uint64(data[iNdEx-7]) << 8 + mapvaluetemp |= uint64(data[iNdEx-6]) << 16 + mapvaluetemp |= uint64(data[iNdEx-5]) << 24 + mapvaluetemp |= uint64(data[iNdEx-4]) << 32 + mapvaluetemp |= uint64(data[iNdEx-3]) << 40 + mapvaluetemp |= uint64(data[iNdEx-2]) << 48 + mapvaluetemp |= uint64(data[iNdEx-1]) << 56 + mapvalue := math.Float64frombits(mapvaluetemp) + if m.StringToDoubleMap == nil { + m.StringToDoubleMap = make(map[string]float64) + } + m.StringToDoubleMap[mapkey] = mapvalue + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field StringToFloatMap", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMapsproto2 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var keykey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + keykey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var stringLenmapkey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLenmapkey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapkey := int(stringLenmapkey) + if intStringLenmapkey < 0 { + return ErrInvalidLengthMapsproto2 + } + postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey > l { + return io.ErrUnexpectedEOF + } + mapkey := string(data[iNdEx:postStringIndexmapkey]) + iNdEx = postStringIndexmapkey + var valuekey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + valuekey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapvaluetemp uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + iNdEx += 4 + mapvaluetemp = uint32(data[iNdEx-4]) + mapvaluetemp |= uint32(data[iNdEx-3]) << 8 + mapvaluetemp |= uint32(data[iNdEx-2]) << 16 + mapvaluetemp |= uint32(data[iNdEx-1]) << 24 + mapvalue := math.Float32frombits(mapvaluetemp) + if m.StringToFloatMap == nil { + m.StringToFloatMap = make(map[string]float32) + } + m.StringToFloatMap[mapkey] = mapvalue + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Int32Map", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMapsproto2 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var keykey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + keykey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapkey int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + mapkey |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var valuekey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + valuekey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapvalue int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + mapvalue |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if m.Int32Map == nil { + m.Int32Map = make(map[int32]int32) + } + m.Int32Map[mapkey] = mapvalue + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Int64Map", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMapsproto2 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var keykey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + keykey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapkey int64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + mapkey |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var valuekey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + valuekey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapvalue int64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + mapvalue |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if m.Int64Map == nil { + m.Int64Map = make(map[int64]int64) + } + m.Int64Map[mapkey] = mapvalue + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Uint32Map", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMapsproto2 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var keykey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + keykey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapkey uint32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + mapkey |= (uint32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var valuekey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + valuekey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapvalue uint32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + mapvalue |= (uint32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if m.Uint32Map == nil { + m.Uint32Map = make(map[uint32]uint32) + } + m.Uint32Map[mapkey] = mapvalue + iNdEx = postIndex + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Uint64Map", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMapsproto2 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var keykey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + keykey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapkey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + mapkey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var valuekey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + valuekey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapvalue uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + mapvalue |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if m.Uint64Map == nil { + m.Uint64Map = make(map[uint64]uint64) + } + m.Uint64Map[mapkey] = mapvalue + iNdEx = postIndex + case 7: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Sint32Map", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMapsproto2 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var keykey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + keykey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapkeytemp int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + mapkeytemp |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + mapkeytemp = int32((uint32(mapkeytemp) >> 1) ^ uint32(((mapkeytemp&1)<<31)>>31)) + mapkey := int32(mapkeytemp) + var valuekey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + valuekey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapvaluetemp int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + mapvaluetemp |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + mapvaluetemp = int32((uint32(mapvaluetemp) >> 1) ^ uint32(((mapvaluetemp&1)<<31)>>31)) + mapvalue := int32(mapvaluetemp) + if m.Sint32Map == nil { + m.Sint32Map = make(map[int32]int32) + } + m.Sint32Map[mapkey] = mapvalue + iNdEx = postIndex + case 8: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Sint64Map", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMapsproto2 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var keykey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + keykey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapkeytemp uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + mapkeytemp |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + mapkeytemp = (mapkeytemp >> 1) ^ uint64((int64(mapkeytemp&1)<<63)>>63) + mapkey := int64(mapkeytemp) + var valuekey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + valuekey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapvaluetemp uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + mapvaluetemp |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + mapvaluetemp = (mapvaluetemp >> 1) ^ uint64((int64(mapvaluetemp&1)<<63)>>63) + mapvalue := int64(mapvaluetemp) + if m.Sint64Map == nil { + m.Sint64Map = make(map[int64]int64) + } + m.Sint64Map[mapkey] = mapvalue + iNdEx = postIndex + case 9: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Fixed32Map", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMapsproto2 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var keykey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + keykey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapkey uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + iNdEx += 4 + mapkey = uint32(data[iNdEx-4]) + mapkey |= uint32(data[iNdEx-3]) << 8 + mapkey |= uint32(data[iNdEx-2]) << 16 + mapkey |= uint32(data[iNdEx-1]) << 24 + var valuekey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + valuekey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapvalue uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + iNdEx += 4 + mapvalue = uint32(data[iNdEx-4]) + mapvalue |= uint32(data[iNdEx-3]) << 8 + mapvalue |= uint32(data[iNdEx-2]) << 16 + mapvalue |= uint32(data[iNdEx-1]) << 24 + if m.Fixed32Map == nil { + m.Fixed32Map = make(map[uint32]uint32) + } + m.Fixed32Map[mapkey] = mapvalue + iNdEx = postIndex + case 10: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Sfixed32Map", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMapsproto2 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var keykey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + keykey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapkey int32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + iNdEx += 4 + mapkey = int32(data[iNdEx-4]) + mapkey |= int32(data[iNdEx-3]) << 8 + mapkey |= int32(data[iNdEx-2]) << 16 + mapkey |= int32(data[iNdEx-1]) << 24 + var valuekey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + valuekey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapvalue int32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + iNdEx += 4 + mapvalue = int32(data[iNdEx-4]) + mapvalue |= int32(data[iNdEx-3]) << 8 + mapvalue |= int32(data[iNdEx-2]) << 16 + mapvalue |= int32(data[iNdEx-1]) << 24 + if m.Sfixed32Map == nil { + m.Sfixed32Map = make(map[int32]int32) + } + m.Sfixed32Map[mapkey] = mapvalue + iNdEx = postIndex + case 11: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Fixed64Map", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMapsproto2 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var keykey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + keykey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapkey uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + iNdEx += 8 + mapkey = uint64(data[iNdEx-8]) + mapkey |= uint64(data[iNdEx-7]) << 8 + mapkey |= uint64(data[iNdEx-6]) << 16 + mapkey |= uint64(data[iNdEx-5]) << 24 + mapkey |= uint64(data[iNdEx-4]) << 32 + mapkey |= uint64(data[iNdEx-3]) << 40 + mapkey |= uint64(data[iNdEx-2]) << 48 + mapkey |= uint64(data[iNdEx-1]) << 56 + var valuekey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + valuekey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapvalue uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + iNdEx += 8 + mapvalue = uint64(data[iNdEx-8]) + mapvalue |= uint64(data[iNdEx-7]) << 8 + mapvalue |= uint64(data[iNdEx-6]) << 16 + mapvalue |= uint64(data[iNdEx-5]) << 24 + mapvalue |= uint64(data[iNdEx-4]) << 32 + mapvalue |= uint64(data[iNdEx-3]) << 40 + mapvalue |= uint64(data[iNdEx-2]) << 48 + mapvalue |= uint64(data[iNdEx-1]) << 56 + if m.Fixed64Map == nil { + m.Fixed64Map = make(map[uint64]uint64) + } + m.Fixed64Map[mapkey] = mapvalue + iNdEx = postIndex + case 12: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Sfixed64Map", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMapsproto2 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var keykey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + keykey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapkey int64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + iNdEx += 8 + mapkey = int64(data[iNdEx-8]) + mapkey |= int64(data[iNdEx-7]) << 8 + mapkey |= int64(data[iNdEx-6]) << 16 + mapkey |= int64(data[iNdEx-5]) << 24 + mapkey |= int64(data[iNdEx-4]) << 32 + mapkey |= int64(data[iNdEx-3]) << 40 + mapkey |= int64(data[iNdEx-2]) << 48 + mapkey |= int64(data[iNdEx-1]) << 56 + var valuekey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + valuekey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapvalue int64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + iNdEx += 8 + mapvalue = int64(data[iNdEx-8]) + mapvalue |= int64(data[iNdEx-7]) << 8 + mapvalue |= int64(data[iNdEx-6]) << 16 + mapvalue |= int64(data[iNdEx-5]) << 24 + mapvalue |= int64(data[iNdEx-4]) << 32 + mapvalue |= int64(data[iNdEx-3]) << 40 + mapvalue |= int64(data[iNdEx-2]) << 48 + mapvalue |= int64(data[iNdEx-1]) << 56 + if m.Sfixed64Map == nil { + m.Sfixed64Map = make(map[int64]int64) + } + m.Sfixed64Map[mapkey] = mapvalue + iNdEx = postIndex + case 13: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field BoolMap", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMapsproto2 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var keykey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + keykey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapkeytemp int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + mapkeytemp |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + mapkey := bool(mapkeytemp != 0) + var valuekey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + valuekey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapvaluetemp int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + mapvaluetemp |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + mapvalue := bool(mapvaluetemp != 0) + if m.BoolMap == nil { + m.BoolMap = make(map[bool]bool) + } + m.BoolMap[mapkey] = mapvalue + iNdEx = postIndex + case 14: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field StringMap", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMapsproto2 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var keykey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + keykey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var stringLenmapkey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLenmapkey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapkey := int(stringLenmapkey) + if intStringLenmapkey < 0 { + return ErrInvalidLengthMapsproto2 + } + postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey > l { + return io.ErrUnexpectedEOF + } + mapkey := string(data[iNdEx:postStringIndexmapkey]) + iNdEx = postStringIndexmapkey + var valuekey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + valuekey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var stringLenmapvalue uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLenmapvalue |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapvalue := int(stringLenmapvalue) + if intStringLenmapvalue < 0 { + return ErrInvalidLengthMapsproto2 + } + postStringIndexmapvalue := iNdEx + intStringLenmapvalue + if postStringIndexmapvalue > l { + return io.ErrUnexpectedEOF + } + mapvalue := string(data[iNdEx:postStringIndexmapvalue]) + iNdEx = postStringIndexmapvalue + if m.StringMap == nil { + m.StringMap = make(map[string]string) + } + m.StringMap[mapkey] = mapvalue + iNdEx = postIndex + case 15: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field StringToBytesMap", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMapsproto2 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var keykey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + keykey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var stringLenmapkey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLenmapkey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapkey := int(stringLenmapkey) + if intStringLenmapkey < 0 { + return ErrInvalidLengthMapsproto2 + } + postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey > l { + return io.ErrUnexpectedEOF + } + mapkey := string(data[iNdEx:postStringIndexmapkey]) + iNdEx = postStringIndexmapkey + var valuekey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + valuekey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapbyteLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + mapbyteLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intMapbyteLen := int(mapbyteLen) + if intMapbyteLen < 0 { + return ErrInvalidLengthMapsproto2 + } + postbytesIndex := iNdEx + intMapbyteLen + if postbytesIndex > l { + return io.ErrUnexpectedEOF + } + mapvalue := make([]byte, mapbyteLen) + copy(mapvalue, data[iNdEx:postbytesIndex]) + iNdEx = postbytesIndex + if m.StringToBytesMap == nil { + m.StringToBytesMap = make(map[string][]byte) + } + m.StringToBytesMap[mapkey] = mapvalue + iNdEx = postIndex + case 16: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field StringToEnumMap", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMapsproto2 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var keykey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + keykey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var stringLenmapkey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLenmapkey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapkey := int(stringLenmapkey) + if intStringLenmapkey < 0 { + return ErrInvalidLengthMapsproto2 + } + postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey > l { + return io.ErrUnexpectedEOF + } + mapkey := string(data[iNdEx:postStringIndexmapkey]) + iNdEx = postStringIndexmapkey + var valuekey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + valuekey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapvalue MapEnum + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + mapvalue |= (MapEnum(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if m.StringToEnumMap == nil { + m.StringToEnumMap = make(map[string]MapEnum) + } + m.StringToEnumMap[mapkey] = mapvalue + iNdEx = postIndex + case 17: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field StringToMsgMap", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMapsproto2 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var keykey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + keykey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var stringLenmapkey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLenmapkey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapkey := int(stringLenmapkey) + if intStringLenmapkey < 0 { + return ErrInvalidLengthMapsproto2 + } + postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey > l { + return io.ErrUnexpectedEOF + } + mapkey := string(data[iNdEx:postStringIndexmapkey]) + iNdEx = postStringIndexmapkey + var valuekey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + valuekey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapmsglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + mapmsglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if mapmsglen < 0 { + return ErrInvalidLengthMapsproto2 + } + postmsgIndex := iNdEx + mapmsglen + if mapmsglen < 0 { + return ErrInvalidLengthMapsproto2 + } + if postmsgIndex > l { + return io.ErrUnexpectedEOF + } + mapvalue := &FloatingPoint{} + if err := mapvalue.Unmarshal(data[iNdEx:postmsgIndex]); err != nil { + return err + } + iNdEx = postmsgIndex + if m.StringToMsgMap == nil { + m.StringToMsgMap = make(map[string]*FloatingPoint) + } + m.StringToMsgMap[mapkey] = mapvalue + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipMapsproto2(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMapsproto2 + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipMapsproto2(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, ErrIntOverflowMapsproto2 + } + 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, ErrIntOverflowMapsproto2 + } + 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, ErrIntOverflowMapsproto2 + } + 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, ErrInvalidLengthMapsproto2 + } + return iNdEx, nil + case 3: + for { + var innerWire uint64 + var start int = iNdEx + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowMapsproto2 + } + 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 := skipMapsproto2(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 ( + ErrInvalidLengthMapsproto2 = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowMapsproto2 = fmt.Errorf("proto: integer overflow") +) + +var fileDescriptorMapsproto2 = []byte{ + // 968 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xec, 0x96, 0xcd, 0x4f, 0x1b, 0x47, + 0x18, 0xc6, 0xbd, 0xfe, 0xf6, 0xf8, 0x6b, 0x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0x61, 0x2f, 0x65, 0xd8, 0x61, 0x98, 0x84, 0xa7, 0x1d, 0x8e, 0xa3, 0xd9, + 0x61, 0xa0, 0x55, 0x14, 0xa9, 0x49, 0x92, 0xda, 0x99, 0x4d, 0x52, 0xc8, 0x02, 0x08, 0xd1, 0x7a, + 0x18, 0x20, 0xd2, 0x62, 0x2b, 0xfa, 0xed, 0xd0, 0x9f, 0xbe, 0x2a, 0x4f, 0xb9, 0x7d, 0x3b, 0x7a, + 0x97, 0xfe, 0xed, 0xe8, 0x6b, 0xfe, 0x06, 0xd6, 0x4e, 0x95, 0xb6, 0xac, 0x92, 0xd2, 0x53, 0xdc, + 0x40, 0xbd, 0xd9, 0x72, 0x03, 0xf5, 0x6d, 0xdc, 0x44, 0x69, 0xbd, 0xb5, 0x3e, 0x1c, 0x0f, 0x54, + 0xac, 0x48, 0xb1, 0x8b, 0xae, 0x58, 0xad, 0x97, 0x51, 0xd3, 0xb2, 0x79, 0x17, 0xef, 0xa1, 0x94, + 0xde, 0xb8, 0x23, 0xd3, 0x97, 0xce, 0x50, 0x66, 0xd1, 0x95, 0xc9, 0x5a, 0x19, 0x32, 0x25, 0x9b, + 0x36, 0x73, 0x9b, 0xe8, 0x73, 0x78, 0x5a, 0x61, 0x11, 0x05, 0x9e, 0xb6, 0x4f, 0xe9, 0x44, 0x8c, + 0xed, 0xab, 0x7f, 0xe2, 0x79, 0x14, 0x7a, 0x76, 0xd8, 0x1f, 0xb7, 0xc9, 0x84, 0x52, 0xa7, 0x24, + 0x5b, 0xac, 0xf8, 0x7f, 0x15, 0x72, 0x1b, 0xe8, 0x33, 0x70, 0x32, 0x79, 0x41, 0xfc, 0x3c, 0x64, + 0x15, 0x25, 0x4d, 0xe3, 0x88, 0x17, 0x87, 0x00, 0x71, 0xc8, 0x2e, 0x9e, 0xfc, 0xc8, 0x78, 0x71, + 0x00, 0x10, 0x07, 0x78, 0xf1, 0x6f, 0x28, 0x65, 0x9e, 0x43, 0xbc, 0x3a, 0x09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, 0x41, 0xea, 0x8a, 0xd4, 0xed, 0x4d, + 0xde, 0x77, 0x47, 0x9e, 0xf7, 0xe4, 0x79, 0xf6, 0x3e, 0xef, 0xfb, 0x10, 0x00, 0x00, 0xff, 0xff, + 0xbb, 0xd1, 0xdf, 0x2d, 0x24, 0x14, 0x00, 0x00, +} diff --git a/vendor/github.com/gogo/protobuf/test/mapsproto2/combos/both/mapsproto2.proto b/vendor/github.com/gogo/protobuf/test/mapsproto2/combos/both/mapsproto2.proto new file mode 100644 index 000000000..1d9c9aeb5 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/mapsproto2/combos/both/mapsproto2.proto @@ -0,0 +1,115 @@ +// Copyright (c) 2013, Vastech SA (PTY) LTD. All rights reserved. +// http://github.com/gogo/protobuf/gogoproto +// +// Go support for Protocol Buffers - Google's data interchange format +// +// Copyright 2014 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. + +syntax = "proto2"; + +package proto2.maps; + +import "github.com/gogo/protobuf/gogoproto/gogo.proto"; + +option (gogoproto.goproto_stringer_all) = false; +option (gogoproto.goproto_enum_prefix_all) = false; +option (gogoproto.goproto_getters_all) = false; + +option (gogoproto.equal_all) = true; +option (gogoproto.verbose_equal_all) = true; +option (gogoproto.stringer_all) = true; +option (gogoproto.gostring_all) = true; +option (gogoproto.face_all) = true; +option (gogoproto.description_all) = true; + +option (gogoproto.testgen_all) = true; +option (gogoproto.populate_all) = true; +option (gogoproto.benchgen_all) = true; +option (gogoproto.unmarshaler_all) = true; +option (gogoproto.marshaler_all) = true; +option (gogoproto.sizer_all) = true; + +option (gogoproto.goproto_enum_stringer_all) = false; +option (gogoproto.enum_stringer_all) = true; + +option (gogoproto.unsafe_marshaler_all) = false; +option (gogoproto.unsafe_unmarshaler_all) = false; + +message FloatingPoint { + optional double f = 1; +} + +enum MapEnum { + MA = 0; + MB = 1; + MC = 2; +} + +message AllMaps { + map StringToDoubleMap = 1; + map StringToFloatMap = 2; + map Int32Map = 3; + map Int64Map = 4; + map Uint32Map = 5; + map Uint64Map = 6; + map Sint32Map = 7; + map Sint64Map = 8; + map Fixed32Map = 9; + map Sfixed32Map = 10; + map Fixed64Map = 11; + map Sfixed64Map = 12; + map BoolMap = 13; + map StringMap = 14; + map StringToBytesMap = 15; + map StringToEnumMap = 16; + map StringToMsgMap = 17; +} + +message AllMapsOrdered { + option (gogoproto.stable_marshaler) = true; + + map StringToDoubleMap = 1; + map StringToFloatMap = 2; + map Int32Map = 3; + map Int64Map = 4; + map Uint32Map = 5; + map Uint64Map = 6; + map Sint32Map = 7; + map Sint64Map = 8; + map Fixed32Map = 9; + map Sfixed32Map = 10; + map Fixed64Map = 11; + map Sfixed64Map = 12; + map BoolMap = 13; + map StringMap = 14; + map StringToBytesMap = 15; + map StringToEnumMap = 16; + map StringToMsgMap = 17; +} diff --git a/vendor/github.com/gogo/protobuf/test/mapsproto2/combos/both/mapsproto2pb_test.go b/vendor/github.com/gogo/protobuf/test/mapsproto2/combos/both/mapsproto2pb_test.go new file mode 100644 index 000000000..b28199bce --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/mapsproto2/combos/both/mapsproto2pb_test.go @@ -0,0 +1,752 @@ +// Code generated by protoc-gen-gogo. +// source: combos/both/mapsproto2.proto +// DO NOT EDIT! + +/* +Package proto2_maps is a generated protocol buffer package. + +It is generated from these files: + combos/both/mapsproto2.proto + +It has these top-level messages: + FloatingPoint + AllMaps + AllMapsOrdered +*/ +package proto2_maps + +import testing "testing" +import math_rand "math/rand" +import time "time" +import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" +import github_com_gogo_protobuf_jsonpb "github.com/gogo/protobuf/jsonpb" +import fmt "fmt" +import go_parser "go/parser" +import proto "github.com/gogo/protobuf/proto" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +func TestFloatingPointProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedFloatingPoint(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &FloatingPoint{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestFloatingPointMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedFloatingPoint(popr, false) + size := p.Size() + data := make([]byte, size) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(data) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &FloatingPoint{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkFloatingPointProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*FloatingPoint, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedFloatingPoint(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkFloatingPointProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedFloatingPoint(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &FloatingPoint{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestAllMapsProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAllMaps(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &AllMaps{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestAllMapsMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAllMaps(popr, false) + size := p.Size() + data := make([]byte, size) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(data) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &AllMaps{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkAllMapsProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*AllMaps, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedAllMaps(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkAllMapsProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedAllMaps(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &AllMaps{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestAllMapsOrderedProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAllMapsOrdered(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &AllMapsOrdered{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestAllMapsOrderedMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAllMapsOrdered(popr, false) + size := p.Size() + data := make([]byte, size) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(data) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &AllMapsOrdered{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkAllMapsOrderedProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*AllMapsOrdered, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedAllMapsOrdered(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkAllMapsOrderedProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedAllMapsOrdered(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &AllMapsOrdered{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestFloatingPointJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedFloatingPoint(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &FloatingPoint{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestAllMapsJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAllMaps(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &AllMaps{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestAllMapsOrderedJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAllMapsOrdered(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &AllMapsOrdered{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestFloatingPointProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedFloatingPoint(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &FloatingPoint{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestFloatingPointProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedFloatingPoint(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &FloatingPoint{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestAllMapsProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAllMaps(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &AllMaps{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestAllMapsProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAllMaps(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &AllMaps{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestAllMapsOrderedProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAllMapsOrdered(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &AllMapsOrdered{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestAllMapsOrderedProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAllMapsOrdered(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &AllMapsOrdered{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestMapsproto2Description(t *testing.T) { + Mapsproto2Description() +} +func TestFloatingPointVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedFloatingPoint(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &FloatingPoint{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestAllMapsVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAllMaps(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &AllMaps{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestAllMapsOrderedVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAllMapsOrdered(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &AllMapsOrdered{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestFloatingPointFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedFloatingPoint(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestAllMapsFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAllMaps(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestAllMapsOrderedFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAllMapsOrdered(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestFloatingPointGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedFloatingPoint(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestAllMapsGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAllMaps(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestAllMapsOrderedGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAllMapsOrdered(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestFloatingPointSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedFloatingPoint(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkFloatingPointSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*FloatingPoint, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedFloatingPoint(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestAllMapsSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAllMaps(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkAllMapsSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*AllMaps, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedAllMaps(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestAllMapsOrderedSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAllMapsOrdered(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkAllMapsOrderedSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*AllMapsOrdered, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedAllMapsOrdered(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestFloatingPointStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedFloatingPoint(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestAllMapsStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAllMaps(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestAllMapsOrderedStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAllMapsOrdered(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} + +//These tests are generated by github.com/gogo/protobuf/plugin/testgen diff --git a/vendor/github.com/gogo/protobuf/test/mapsproto2/combos/marshaler/mapsproto2.pb.go b/vendor/github.com/gogo/protobuf/test/mapsproto2/combos/marshaler/mapsproto2.pb.go new file mode 100644 index 000000000..d0e6d6fff --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/mapsproto2/combos/marshaler/mapsproto2.pb.go @@ -0,0 +1,3928 @@ +// Code generated by protoc-gen-gogo. +// source: combos/marshaler/mapsproto2.proto +// DO NOT EDIT! + +/* +Package proto2_maps is a generated protocol buffer package. + +It is generated from these files: + combos/marshaler/mapsproto2.proto + +It has these top-level messages: + FloatingPoint + AllMaps + AllMapsOrdered +*/ +package proto2_maps + +import proto "github.com/gogo/protobuf/proto" +import fmt "fmt" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" + +import github_com_gogo_protobuf_protoc_gen_gogo_descriptor "github.com/gogo/protobuf/protoc-gen-gogo/descriptor" +import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" +import compress_gzip "compress/gzip" +import bytes "bytes" +import io_ioutil "io/ioutil" + +import strconv "strconv" + +import strings "strings" +import sort "sort" +import reflect "reflect" +import github_com_gogo_protobuf_sortkeys "github.com/gogo/protobuf/sortkeys" + +import errors "errors" + +// 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. +const _ = proto.GoGoProtoPackageIsVersion1 + +type MapEnum int32 + +const ( + MA MapEnum = 0 + MB MapEnum = 1 + MC MapEnum = 2 +) + +var MapEnum_name = map[int32]string{ + 0: "MA", + 1: "MB", + 2: "MC", +} +var MapEnum_value = map[string]int32{ + "MA": 0, + "MB": 1, + "MC": 2, +} + +func (x MapEnum) Enum() *MapEnum { + p := new(MapEnum) + *p = x + return p +} +func (x MapEnum) MarshalJSON() ([]byte, error) { + return proto.MarshalJSONEnum(MapEnum_name, int32(x)) +} +func (x *MapEnum) UnmarshalJSON(data []byte) error { + value, err := proto.UnmarshalJSONEnum(MapEnum_value, data, "MapEnum") + if err != nil { + return err + } + *x = MapEnum(value) + return nil +} +func (MapEnum) EnumDescriptor() ([]byte, []int) { return fileDescriptorMapsproto2, []int{0} } + +type FloatingPoint struct { + F *float64 `protobuf:"fixed64,1,opt,name=f" json:"f,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *FloatingPoint) Reset() { *m = FloatingPoint{} } +func (*FloatingPoint) ProtoMessage() {} +func (*FloatingPoint) Descriptor() ([]byte, []int) { return fileDescriptorMapsproto2, []int{0} } + +type AllMaps struct { + StringToDoubleMap map[string]float64 `protobuf:"bytes,1,rep,name=StringToDoubleMap,json=stringToDoubleMap" json:"StringToDoubleMap,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"fixed64,2,opt,name=value"` + StringToFloatMap map[string]float32 `protobuf:"bytes,2,rep,name=StringToFloatMap,json=stringToFloatMap" json:"StringToFloatMap,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"fixed32,2,opt,name=value"` + Int32Map map[int32]int32 `protobuf:"bytes,3,rep,name=Int32Map,json=int32Map" json:"Int32Map,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"varint,2,opt,name=value"` + Int64Map map[int64]int64 `protobuf:"bytes,4,rep,name=Int64Map,json=int64Map" json:"Int64Map,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"varint,2,opt,name=value"` + Uint32Map map[uint32]uint32 `protobuf:"bytes,5,rep,name=Uint32Map,json=uint32Map" json:"Uint32Map,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"varint,2,opt,name=value"` + Uint64Map map[uint64]uint64 `protobuf:"bytes,6,rep,name=Uint64Map,json=uint64Map" json:"Uint64Map,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"varint,2,opt,name=value"` + Sint32Map map[int32]int32 `protobuf:"bytes,7,rep,name=Sint32Map,json=sint32Map" json:"Sint32Map,omitempty" protobuf_key:"zigzag32,1,opt,name=key" protobuf_val:"zigzag32,2,opt,name=value"` + Sint64Map map[int64]int64 `protobuf:"bytes,8,rep,name=Sint64Map,json=sint64Map" json:"Sint64Map,omitempty" protobuf_key:"zigzag64,1,opt,name=key" protobuf_val:"zigzag64,2,opt,name=value"` + Fixed32Map map[uint32]uint32 `protobuf:"bytes,9,rep,name=Fixed32Map,json=fixed32Map" json:"Fixed32Map,omitempty" protobuf_key:"fixed32,1,opt,name=key" protobuf_val:"fixed32,2,opt,name=value"` + Sfixed32Map map[int32]int32 `protobuf:"bytes,10,rep,name=Sfixed32Map,json=sfixed32Map" json:"Sfixed32Map,omitempty" protobuf_key:"fixed32,1,opt,name=key" protobuf_val:"fixed32,2,opt,name=value"` + Fixed64Map map[uint64]uint64 `protobuf:"bytes,11,rep,name=Fixed64Map,json=fixed64Map" json:"Fixed64Map,omitempty" protobuf_key:"fixed64,1,opt,name=key" protobuf_val:"fixed64,2,opt,name=value"` + Sfixed64Map map[int64]int64 `protobuf:"bytes,12,rep,name=Sfixed64Map,json=sfixed64Map" json:"Sfixed64Map,omitempty" protobuf_key:"fixed64,1,opt,name=key" protobuf_val:"fixed64,2,opt,name=value"` + BoolMap map[bool]bool `protobuf:"bytes,13,rep,name=BoolMap,json=boolMap" json:"BoolMap,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"varint,2,opt,name=value"` + StringMap map[string]string `protobuf:"bytes,14,rep,name=StringMap,json=stringMap" json:"StringMap,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + StringToBytesMap map[string][]byte `protobuf:"bytes,15,rep,name=StringToBytesMap,json=stringToBytesMap" json:"StringToBytesMap,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + StringToEnumMap map[string]MapEnum `protobuf:"bytes,16,rep,name=StringToEnumMap,json=stringToEnumMap" json:"StringToEnumMap,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"varint,2,opt,name=value,enum=proto2.maps.MapEnum"` + StringToMsgMap map[string]*FloatingPoint `protobuf:"bytes,17,rep,name=StringToMsgMap,json=stringToMsgMap" json:"StringToMsgMap,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *AllMaps) Reset() { *m = AllMaps{} } +func (*AllMaps) ProtoMessage() {} +func (*AllMaps) Descriptor() ([]byte, []int) { return fileDescriptorMapsproto2, []int{1} } + +type AllMapsOrdered struct { + StringToDoubleMap map[string]float64 `protobuf:"bytes,1,rep,name=StringToDoubleMap,json=stringToDoubleMap" json:"StringToDoubleMap,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"fixed64,2,opt,name=value"` + StringToFloatMap map[string]float32 `protobuf:"bytes,2,rep,name=StringToFloatMap,json=stringToFloatMap" json:"StringToFloatMap,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"fixed32,2,opt,name=value"` + Int32Map map[int32]int32 `protobuf:"bytes,3,rep,name=Int32Map,json=int32Map" json:"Int32Map,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"varint,2,opt,name=value"` + Int64Map map[int64]int64 `protobuf:"bytes,4,rep,name=Int64Map,json=int64Map" json:"Int64Map,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"varint,2,opt,name=value"` + Uint32Map map[uint32]uint32 `protobuf:"bytes,5,rep,name=Uint32Map,json=uint32Map" json:"Uint32Map,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"varint,2,opt,name=value"` + Uint64Map map[uint64]uint64 `protobuf:"bytes,6,rep,name=Uint64Map,json=uint64Map" json:"Uint64Map,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"varint,2,opt,name=value"` + Sint32Map map[int32]int32 `protobuf:"bytes,7,rep,name=Sint32Map,json=sint32Map" json:"Sint32Map,omitempty" protobuf_key:"zigzag32,1,opt,name=key" protobuf_val:"zigzag32,2,opt,name=value"` + Sint64Map map[int64]int64 `protobuf:"bytes,8,rep,name=Sint64Map,json=sint64Map" json:"Sint64Map,omitempty" protobuf_key:"zigzag64,1,opt,name=key" protobuf_val:"zigzag64,2,opt,name=value"` + Fixed32Map map[uint32]uint32 `protobuf:"bytes,9,rep,name=Fixed32Map,json=fixed32Map" json:"Fixed32Map,omitempty" protobuf_key:"fixed32,1,opt,name=key" protobuf_val:"fixed32,2,opt,name=value"` + Sfixed32Map map[int32]int32 `protobuf:"bytes,10,rep,name=Sfixed32Map,json=sfixed32Map" json:"Sfixed32Map,omitempty" protobuf_key:"fixed32,1,opt,name=key" protobuf_val:"fixed32,2,opt,name=value"` + Fixed64Map map[uint64]uint64 `protobuf:"bytes,11,rep,name=Fixed64Map,json=fixed64Map" json:"Fixed64Map,omitempty" protobuf_key:"fixed64,1,opt,name=key" protobuf_val:"fixed64,2,opt,name=value"` + Sfixed64Map map[int64]int64 `protobuf:"bytes,12,rep,name=Sfixed64Map,json=sfixed64Map" json:"Sfixed64Map,omitempty" protobuf_key:"fixed64,1,opt,name=key" protobuf_val:"fixed64,2,opt,name=value"` + BoolMap map[bool]bool `protobuf:"bytes,13,rep,name=BoolMap,json=boolMap" json:"BoolMap,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"varint,2,opt,name=value"` + StringMap map[string]string `protobuf:"bytes,14,rep,name=StringMap,json=stringMap" json:"StringMap,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + StringToBytesMap map[string][]byte `protobuf:"bytes,15,rep,name=StringToBytesMap,json=stringToBytesMap" json:"StringToBytesMap,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + StringToEnumMap map[string]MapEnum `protobuf:"bytes,16,rep,name=StringToEnumMap,json=stringToEnumMap" json:"StringToEnumMap,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"varint,2,opt,name=value,enum=proto2.maps.MapEnum"` + StringToMsgMap map[string]*FloatingPoint `protobuf:"bytes,17,rep,name=StringToMsgMap,json=stringToMsgMap" json:"StringToMsgMap,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *AllMapsOrdered) Reset() { *m = AllMapsOrdered{} } +func (*AllMapsOrdered) ProtoMessage() {} +func (*AllMapsOrdered) Descriptor() ([]byte, []int) { return fileDescriptorMapsproto2, []int{2} } + +func init() { + proto.RegisterType((*FloatingPoint)(nil), "proto2.maps.FloatingPoint") + proto.RegisterType((*AllMaps)(nil), "proto2.maps.AllMaps") + proto.RegisterType((*AllMapsOrdered)(nil), "proto2.maps.AllMapsOrdered") + proto.RegisterEnum("proto2.maps.MapEnum", MapEnum_name, MapEnum_value) +} +func (this *FloatingPoint) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return Mapsproto2Description() +} +func (this *AllMaps) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return Mapsproto2Description() +} +func (this *AllMapsOrdered) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return Mapsproto2Description() +} +func Mapsproto2Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + d := &github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet{} + var gzipped = []byte{ + // 4101 bytes of a gzipped FileDescriptorSet + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xec, 0x5a, 0x5b, 0x6c, 0x23, 0xe7, + 0x75, 0x36, 0xc5, 0xfb, 0x21, 0x45, 0x8e, 0x46, 0xf2, 0x9a, 0x56, 0xec, 0x5d, 0x2f, 0x6d, 0xc7, + 0x6b, 0x39, 0xd1, 0x3a, 0x4a, 0x6c, 0xaf, 0xe9, 0xc4, 0x81, 0x2e, 0x5c, 0xad, 0x1c, 0xdd, 0x3a, + 0x94, 0xec, 0xb5, 0x0b, 0x83, 0x1d, 0x91, 0x43, 0x2e, 0x6d, 0x72, 0x86, 0xe5, 0x0c, 0xed, 0x55, + 0x9e, 0x5c, 0xb8, 0x17, 0x04, 0x45, 0xef, 0x05, 0xea, 0x38, 0x4e, 0x5a, 0x07, 0x68, 0x9d, 0xa4, + 0xb7, 0xa4, 0x37,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 0x68, 0x9a, 0x8f, 0xd1, 0x2c, + 0x70, 0xef, 0xd4, 0x7e, 0x6f, 0x75, 0x93, 0xe4, 0xff, 0x4a, 0x8a, 0xf5, 0x55, 0x06, 0x43, 0x92, + 0xda, 0x4b, 0x62, 0xcd, 0x62, 0xdd, 0x7a, 0xc6, 0xe0, 0x57, 0x98, 0xec, 0x52, 0x2f, 0xb8, 0x94, + 0x3b, 0x45, 0xb9, 0xef, 0x9b, 0xce, 0xfd, 0x54, 0x8d, 0x92, 0x67, 0x9f, 0xaa, 0xd5, 0xf7, 0x0f, + 0x8c, 0xbd, 0xf5, 0x5d, 0x83, 0xc3, 0xf5, 0x3b, 0x21, 0xd1, 0x35, 0x3f, 0x7d, 0x1a, 0xac, 0x14, + 0x54, 0x34, 0xab, 0xe3, 0x91, 0x81, 0x1c, 0x79, 0x04, 0xf3, 0x33, 0x15, 0xfd, 0x08, 0x43, 0xff, + 0x32, 0x24, 0xa9, 0xbf, 0x74, 0x00, 0xee, 0x31, 0xed, 0x36, 0x3d, 0x03, 0x89, 0xcd, 0x03, 0x83, + 0x84, 0x3f, 0xc6, 0x3b, 0x93, 0xd6, 0x0f, 0x77, 0xaa, 0x9b, 0xb8, 0x02, 0xca, 0x8f, 0x40, 0x8a, + 0x39, 0x81, 0x2c, 0x0d, 0xdf, 0x0d, 0x08, 0x62, 0x97, 0x9c, 0x23, 0x26, 0x46, 0x8f, 0xf7, 0x36, + 0xaa, 0x86, 0x36, 0x27, 0x4f, 0xef, 0xdf, 0xc4, 0x20, 0x27, 0x35, 0x54, 0xa4, 0x94, 0x9b, 0xdd, + 0xae, 0xf3, 0x72, 0xdd, 0xec, 0x76, 0x30, 0x43, 0xb1, 0xf9, 0x01, 0x2a, 0x5a, 0x27, 0x92, 0x59, + 0xfd, 0xf7, 0xff, 0x12, 0x9b, 0x5f, 0x88, 0x81, 0x16, 0x6e, 0xc6, 0x42, 0x06, 0xc6, 0x7e, 0xac, + 0x06, 0xbe, 0x11, 0x83,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x43, 0xb1, 0xf4, 0x18, 0x76, + 0x4f, 0x66, 0xc4, 0x99, 0x76, 0x71, 0x0b, 0x3e, 0x0b, 0xcd, 0x1f, 0x89, 0x99, 0xa6, 0x00, 0x02, + 0x7e, 0x16, 0xee, 0x54, 0xa6, 0xfa, 0x19, 0xc8, 0xfe, 0x98, 0x93, 0x9d, 0x53, 0xa4, 0x7b, 0x9e, + 0x12, 0xce, 0x4a, 0xf9, 0x27, 0x22, 0x25, 0x58, 0x21, 0xae, 0x43, 0xd2, 0xc6, 0xba, 0x66, 0xeb, + 0x6c, 0x5e, 0xfb, 0x53, 0xe1, 0x35, 0x86, 0x0d, 0x78, 0xed, 0x08, 0xce, 0x71, 0xc6, 0xb3, 0xcd, + 0xeb, 0x57, 0x45, 0x62, 0x65, 0xe8, 0xe3, 0xe0, 0xec, 0xfe, 0x34, 0x2c, 0xfb, 0xee, 0x14, 0x1d, + 0x98, 0x5b, 0x27, 0x07, 0x03, 0xd1, 0xcc, 0x5f, 0xe3, 0xcc, 0x22, 0xe3, 0xfb, 0x2d, 0x9c, 0xbb, + 0x67, 0xf6, 0x09, 0xf9, 0x75, 0x28, 0x09, 0xf2, 0xa1, 0x8d, 0x0d, 0xbe, 0xd3, 0xb6, 0x71, 0x1a, + 0x9b, 0x33, 0x50, 0xff, 0x59, 0x68, 0xaa, 0x8e, 0x25, 0x38, 0x61, 0xde, 0x01, 0xcd, 0xef, 0x37, + 0xea, 0x9d, 0x5e, 0xdf, 0xc1, 0xd6, 0x72, 0x3a, 0xe3, 0x9f, 0x8b, 0x99, 0xf2, 0x71, 0x3b, 0x14, + 0x56, 0xa9, 0x42, 0x81, 0x5e, 0xce, 0x1a, 0x92, 0x7f, 0xc1, 0x89, 0xe6, 0x47, 0x28, 0x9e, 0x38, + 0xb0, 0x53, 0xc2, 0x9e, 0x77, 0x96, 0xfc, 0xf7, 0x97, 0x22, 0x71, 0x70, 0x08, 0x8b, 0xbe, 0x62, + 0xa8, 0x12, 0xeb, 0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, + 0xd5, 0x96, 0x3e, 0x00, 0x00, + } + r := bytes.NewReader(gzipped) + gzipr, err := compress_gzip.NewReader(r) + if err != nil { + panic(err) + } + ungzipped, err := io_ioutil.ReadAll(gzipr) + if err != nil { + panic(err) + } + if err := github_com_gogo_protobuf_proto.Unmarshal(ungzipped, d); err != nil { + panic(err) + } + return d +} +func (x MapEnum) String() string { + s, ok := MapEnum_name[int32(x)] + if ok { + return s + } + return strconv.Itoa(int(x)) +} +func (this *FloatingPoint) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*FloatingPoint) + if !ok { + that2, ok := that.(FloatingPoint) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *FloatingPoint") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *FloatingPoint but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *FloatingPoint but is not nil && this == nil") + } + if this.F != nil && that1.F != nil { + if *this.F != *that1.F { + return fmt.Errorf("F this(%v) Not Equal that(%v)", *this.F, *that1.F) + } + } else if this.F != nil { + return fmt.Errorf("this.F == nil && that.F != nil") + } else if that1.F != nil { + return fmt.Errorf("F this(%v) Not Equal that(%v)", this.F, that1.F) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *FloatingPoint) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*FloatingPoint) + if !ok { + that2, ok := that.(FloatingPoint) + 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.F != nil && that1.F != nil { + if *this.F != *that1.F { + return false + } + } else if this.F != nil { + return false + } else if that1.F != nil { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *AllMaps) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*AllMaps) + if !ok { + that2, ok := that.(AllMaps) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *AllMaps") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *AllMaps but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *AllMaps but is not nil && this == nil") + } + if len(this.StringToDoubleMap) != len(that1.StringToDoubleMap) { + return fmt.Errorf("StringToDoubleMap this(%v) Not Equal that(%v)", len(this.StringToDoubleMap), len(that1.StringToDoubleMap)) + } + for i := range this.StringToDoubleMap { + if this.StringToDoubleMap[i] != that1.StringToDoubleMap[i] { + return fmt.Errorf("StringToDoubleMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringToDoubleMap[i], i, that1.StringToDoubleMap[i]) + } + } + if len(this.StringToFloatMap) != len(that1.StringToFloatMap) { + return fmt.Errorf("StringToFloatMap this(%v) Not Equal that(%v)", len(this.StringToFloatMap), len(that1.StringToFloatMap)) + } + for i := range this.StringToFloatMap { + if this.StringToFloatMap[i] != that1.StringToFloatMap[i] { + return fmt.Errorf("StringToFloatMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringToFloatMap[i], i, that1.StringToFloatMap[i]) + } + } + if len(this.Int32Map) != len(that1.Int32Map) { + return fmt.Errorf("Int32Map this(%v) Not Equal that(%v)", len(this.Int32Map), len(that1.Int32Map)) + } + for i := range this.Int32Map { + if this.Int32Map[i] != that1.Int32Map[i] { + return fmt.Errorf("Int32Map this[%v](%v) Not Equal that[%v](%v)", i, this.Int32Map[i], i, that1.Int32Map[i]) + } + } + if len(this.Int64Map) != len(that1.Int64Map) { + return fmt.Errorf("Int64Map this(%v) Not Equal that(%v)", len(this.Int64Map), len(that1.Int64Map)) + } + for i := range this.Int64Map { + if this.Int64Map[i] != that1.Int64Map[i] { + return fmt.Errorf("Int64Map this[%v](%v) Not Equal that[%v](%v)", i, this.Int64Map[i], i, that1.Int64Map[i]) + } + } + if len(this.Uint32Map) != len(that1.Uint32Map) { + return fmt.Errorf("Uint32Map this(%v) Not Equal that(%v)", len(this.Uint32Map), len(that1.Uint32Map)) + } + for i := range this.Uint32Map { + if this.Uint32Map[i] != that1.Uint32Map[i] { + return fmt.Errorf("Uint32Map this[%v](%v) Not Equal that[%v](%v)", i, this.Uint32Map[i], i, that1.Uint32Map[i]) + } + } + if len(this.Uint64Map) != len(that1.Uint64Map) { + return fmt.Errorf("Uint64Map this(%v) Not Equal that(%v)", len(this.Uint64Map), len(that1.Uint64Map)) + } + for i := range this.Uint64Map { + if this.Uint64Map[i] != that1.Uint64Map[i] { + return fmt.Errorf("Uint64Map this[%v](%v) Not Equal that[%v](%v)", i, this.Uint64Map[i], i, that1.Uint64Map[i]) + } + } + if len(this.Sint32Map) != len(that1.Sint32Map) { + return fmt.Errorf("Sint32Map this(%v) Not Equal that(%v)", len(this.Sint32Map), len(that1.Sint32Map)) + } + for i := range this.Sint32Map { + if this.Sint32Map[i] != that1.Sint32Map[i] { + return fmt.Errorf("Sint32Map this[%v](%v) Not Equal that[%v](%v)", i, this.Sint32Map[i], i, that1.Sint32Map[i]) + } + } + if len(this.Sint64Map) != len(that1.Sint64Map) { + return fmt.Errorf("Sint64Map this(%v) Not Equal that(%v)", len(this.Sint64Map), len(that1.Sint64Map)) + } + for i := range this.Sint64Map { + if this.Sint64Map[i] != that1.Sint64Map[i] { + return fmt.Errorf("Sint64Map this[%v](%v) Not Equal that[%v](%v)", i, this.Sint64Map[i], i, that1.Sint64Map[i]) + } + } + if len(this.Fixed32Map) != len(that1.Fixed32Map) { + return fmt.Errorf("Fixed32Map this(%v) Not Equal that(%v)", len(this.Fixed32Map), len(that1.Fixed32Map)) + } + for i := range this.Fixed32Map { + if this.Fixed32Map[i] != that1.Fixed32Map[i] { + return fmt.Errorf("Fixed32Map this[%v](%v) Not Equal that[%v](%v)", i, this.Fixed32Map[i], i, that1.Fixed32Map[i]) + } + } + if len(this.Sfixed32Map) != len(that1.Sfixed32Map) { + return fmt.Errorf("Sfixed32Map this(%v) Not Equal that(%v)", len(this.Sfixed32Map), len(that1.Sfixed32Map)) + } + for i := range this.Sfixed32Map { + if this.Sfixed32Map[i] != that1.Sfixed32Map[i] { + return fmt.Errorf("Sfixed32Map this[%v](%v) Not Equal that[%v](%v)", i, this.Sfixed32Map[i], i, that1.Sfixed32Map[i]) + } + } + if len(this.Fixed64Map) != len(that1.Fixed64Map) { + return fmt.Errorf("Fixed64Map this(%v) Not Equal that(%v)", len(this.Fixed64Map), len(that1.Fixed64Map)) + } + for i := range this.Fixed64Map { + if this.Fixed64Map[i] != that1.Fixed64Map[i] { + return fmt.Errorf("Fixed64Map this[%v](%v) Not Equal that[%v](%v)", i, this.Fixed64Map[i], i, that1.Fixed64Map[i]) + } + } + if len(this.Sfixed64Map) != len(that1.Sfixed64Map) { + return fmt.Errorf("Sfixed64Map this(%v) Not Equal that(%v)", len(this.Sfixed64Map), len(that1.Sfixed64Map)) + } + for i := range this.Sfixed64Map { + if this.Sfixed64Map[i] != that1.Sfixed64Map[i] { + return fmt.Errorf("Sfixed64Map this[%v](%v) Not Equal that[%v](%v)", i, this.Sfixed64Map[i], i, that1.Sfixed64Map[i]) + } + } + if len(this.BoolMap) != len(that1.BoolMap) { + return fmt.Errorf("BoolMap this(%v) Not Equal that(%v)", len(this.BoolMap), len(that1.BoolMap)) + } + for i := range this.BoolMap { + if this.BoolMap[i] != that1.BoolMap[i] { + return fmt.Errorf("BoolMap this[%v](%v) Not Equal that[%v](%v)", i, this.BoolMap[i], i, that1.BoolMap[i]) + } + } + if len(this.StringMap) != len(that1.StringMap) { + return fmt.Errorf("StringMap this(%v) Not Equal that(%v)", len(this.StringMap), len(that1.StringMap)) + } + for i := range this.StringMap { + if this.StringMap[i] != that1.StringMap[i] { + return fmt.Errorf("StringMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringMap[i], i, that1.StringMap[i]) + } + } + if len(this.StringToBytesMap) != len(that1.StringToBytesMap) { + return fmt.Errorf("StringToBytesMap this(%v) Not Equal that(%v)", len(this.StringToBytesMap), len(that1.StringToBytesMap)) + } + for i := range this.StringToBytesMap { + if !bytes.Equal(this.StringToBytesMap[i], that1.StringToBytesMap[i]) { + return fmt.Errorf("StringToBytesMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringToBytesMap[i], i, that1.StringToBytesMap[i]) + } + } + if len(this.StringToEnumMap) != len(that1.StringToEnumMap) { + return fmt.Errorf("StringToEnumMap this(%v) Not Equal that(%v)", len(this.StringToEnumMap), len(that1.StringToEnumMap)) + } + for i := range this.StringToEnumMap { + if this.StringToEnumMap[i] != that1.StringToEnumMap[i] { + return fmt.Errorf("StringToEnumMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringToEnumMap[i], i, that1.StringToEnumMap[i]) + } + } + if len(this.StringToMsgMap) != len(that1.StringToMsgMap) { + return fmt.Errorf("StringToMsgMap this(%v) Not Equal that(%v)", len(this.StringToMsgMap), len(that1.StringToMsgMap)) + } + for i := range this.StringToMsgMap { + if !this.StringToMsgMap[i].Equal(that1.StringToMsgMap[i]) { + return fmt.Errorf("StringToMsgMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringToMsgMap[i], i, that1.StringToMsgMap[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *AllMaps) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*AllMaps) + if !ok { + that2, ok := that.(AllMaps) + 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.StringToDoubleMap) != len(that1.StringToDoubleMap) { + return false + } + for i := range this.StringToDoubleMap { + if this.StringToDoubleMap[i] != that1.StringToDoubleMap[i] { + return false + } + } + if len(this.StringToFloatMap) != len(that1.StringToFloatMap) { + return false + } + for i := range this.StringToFloatMap { + if this.StringToFloatMap[i] != that1.StringToFloatMap[i] { + return false + } + } + if len(this.Int32Map) != len(that1.Int32Map) { + return false + } + for i := range this.Int32Map { + if this.Int32Map[i] != that1.Int32Map[i] { + return false + } + } + if len(this.Int64Map) != len(that1.Int64Map) { + return false + } + for i := range this.Int64Map { + if this.Int64Map[i] != that1.Int64Map[i] { + return false + } + } + if len(this.Uint32Map) != len(that1.Uint32Map) { + return false + } + for i := range this.Uint32Map { + if this.Uint32Map[i] != that1.Uint32Map[i] { + return false + } + } + if len(this.Uint64Map) != len(that1.Uint64Map) { + return false + } + for i := range this.Uint64Map { + if this.Uint64Map[i] != that1.Uint64Map[i] { + return false + } + } + if len(this.Sint32Map) != len(that1.Sint32Map) { + return false + } + for i := range this.Sint32Map { + if this.Sint32Map[i] != that1.Sint32Map[i] { + return false + } + } + if len(this.Sint64Map) != len(that1.Sint64Map) { + return false + } + for i := range this.Sint64Map { + if this.Sint64Map[i] != that1.Sint64Map[i] { + return false + } + } + if len(this.Fixed32Map) != len(that1.Fixed32Map) { + return false + } + for i := range this.Fixed32Map { + if this.Fixed32Map[i] != that1.Fixed32Map[i] { + return false + } + } + if len(this.Sfixed32Map) != len(that1.Sfixed32Map) { + return false + } + for i := range this.Sfixed32Map { + if this.Sfixed32Map[i] != that1.Sfixed32Map[i] { + return false + } + } + if len(this.Fixed64Map) != len(that1.Fixed64Map) { + return false + } + for i := range this.Fixed64Map { + if this.Fixed64Map[i] != that1.Fixed64Map[i] { + return false + } + } + if len(this.Sfixed64Map) != len(that1.Sfixed64Map) { + return false + } + for i := range this.Sfixed64Map { + if this.Sfixed64Map[i] != that1.Sfixed64Map[i] { + return false + } + } + if len(this.BoolMap) != len(that1.BoolMap) { + return false + } + for i := range this.BoolMap { + if this.BoolMap[i] != that1.BoolMap[i] { + return false + } + } + if len(this.StringMap) != len(that1.StringMap) { + return false + } + for i := range this.StringMap { + if this.StringMap[i] != that1.StringMap[i] { + return false + } + } + if len(this.StringToBytesMap) != len(that1.StringToBytesMap) { + return false + } + for i := range this.StringToBytesMap { + if !bytes.Equal(this.StringToBytesMap[i], that1.StringToBytesMap[i]) { + return false + } + } + if len(this.StringToEnumMap) != len(that1.StringToEnumMap) { + return false + } + for i := range this.StringToEnumMap { + if this.StringToEnumMap[i] != that1.StringToEnumMap[i] { + return false + } + } + if len(this.StringToMsgMap) != len(that1.StringToMsgMap) { + return false + } + for i := range this.StringToMsgMap { + if !this.StringToMsgMap[i].Equal(that1.StringToMsgMap[i]) { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *AllMapsOrdered) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*AllMapsOrdered) + if !ok { + that2, ok := that.(AllMapsOrdered) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *AllMapsOrdered") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *AllMapsOrdered but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *AllMapsOrdered but is not nil && this == nil") + } + if len(this.StringToDoubleMap) != len(that1.StringToDoubleMap) { + return fmt.Errorf("StringToDoubleMap this(%v) Not Equal that(%v)", len(this.StringToDoubleMap), len(that1.StringToDoubleMap)) + } + for i := range this.StringToDoubleMap { + if this.StringToDoubleMap[i] != that1.StringToDoubleMap[i] { + return fmt.Errorf("StringToDoubleMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringToDoubleMap[i], i, that1.StringToDoubleMap[i]) + } + } + if len(this.StringToFloatMap) != len(that1.StringToFloatMap) { + return fmt.Errorf("StringToFloatMap this(%v) Not Equal that(%v)", len(this.StringToFloatMap), len(that1.StringToFloatMap)) + } + for i := range this.StringToFloatMap { + if this.StringToFloatMap[i] != that1.StringToFloatMap[i] { + return fmt.Errorf("StringToFloatMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringToFloatMap[i], i, that1.StringToFloatMap[i]) + } + } + if len(this.Int32Map) != len(that1.Int32Map) { + return fmt.Errorf("Int32Map this(%v) Not Equal that(%v)", len(this.Int32Map), len(that1.Int32Map)) + } + for i := range this.Int32Map { + if this.Int32Map[i] != that1.Int32Map[i] { + return fmt.Errorf("Int32Map this[%v](%v) Not Equal that[%v](%v)", i, this.Int32Map[i], i, that1.Int32Map[i]) + } + } + if len(this.Int64Map) != len(that1.Int64Map) { + return fmt.Errorf("Int64Map this(%v) Not Equal that(%v)", len(this.Int64Map), len(that1.Int64Map)) + } + for i := range this.Int64Map { + if this.Int64Map[i] != that1.Int64Map[i] { + return fmt.Errorf("Int64Map this[%v](%v) Not Equal that[%v](%v)", i, this.Int64Map[i], i, that1.Int64Map[i]) + } + } + if len(this.Uint32Map) != len(that1.Uint32Map) { + return fmt.Errorf("Uint32Map this(%v) Not Equal that(%v)", len(this.Uint32Map), len(that1.Uint32Map)) + } + for i := range this.Uint32Map { + if this.Uint32Map[i] != that1.Uint32Map[i] { + return fmt.Errorf("Uint32Map this[%v](%v) Not Equal that[%v](%v)", i, this.Uint32Map[i], i, that1.Uint32Map[i]) + } + } + if len(this.Uint64Map) != len(that1.Uint64Map) { + return fmt.Errorf("Uint64Map this(%v) Not Equal that(%v)", len(this.Uint64Map), len(that1.Uint64Map)) + } + for i := range this.Uint64Map { + if this.Uint64Map[i] != that1.Uint64Map[i] { + return fmt.Errorf("Uint64Map this[%v](%v) Not Equal that[%v](%v)", i, this.Uint64Map[i], i, that1.Uint64Map[i]) + } + } + if len(this.Sint32Map) != len(that1.Sint32Map) { + return fmt.Errorf("Sint32Map this(%v) Not Equal that(%v)", len(this.Sint32Map), len(that1.Sint32Map)) + } + for i := range this.Sint32Map { + if this.Sint32Map[i] != that1.Sint32Map[i] { + return fmt.Errorf("Sint32Map this[%v](%v) Not Equal that[%v](%v)", i, this.Sint32Map[i], i, that1.Sint32Map[i]) + } + } + if len(this.Sint64Map) != len(that1.Sint64Map) { + return fmt.Errorf("Sint64Map this(%v) Not Equal that(%v)", len(this.Sint64Map), len(that1.Sint64Map)) + } + for i := range this.Sint64Map { + if this.Sint64Map[i] != that1.Sint64Map[i] { + return fmt.Errorf("Sint64Map this[%v](%v) Not Equal that[%v](%v)", i, this.Sint64Map[i], i, that1.Sint64Map[i]) + } + } + if len(this.Fixed32Map) != len(that1.Fixed32Map) { + return fmt.Errorf("Fixed32Map this(%v) Not Equal that(%v)", len(this.Fixed32Map), len(that1.Fixed32Map)) + } + for i := range this.Fixed32Map { + if this.Fixed32Map[i] != that1.Fixed32Map[i] { + return fmt.Errorf("Fixed32Map this[%v](%v) Not Equal that[%v](%v)", i, this.Fixed32Map[i], i, that1.Fixed32Map[i]) + } + } + if len(this.Sfixed32Map) != len(that1.Sfixed32Map) { + return fmt.Errorf("Sfixed32Map this(%v) Not Equal that(%v)", len(this.Sfixed32Map), len(that1.Sfixed32Map)) + } + for i := range this.Sfixed32Map { + if this.Sfixed32Map[i] != that1.Sfixed32Map[i] { + return fmt.Errorf("Sfixed32Map this[%v](%v) Not Equal that[%v](%v)", i, this.Sfixed32Map[i], i, that1.Sfixed32Map[i]) + } + } + if len(this.Fixed64Map) != len(that1.Fixed64Map) { + return fmt.Errorf("Fixed64Map this(%v) Not Equal that(%v)", len(this.Fixed64Map), len(that1.Fixed64Map)) + } + for i := range this.Fixed64Map { + if this.Fixed64Map[i] != that1.Fixed64Map[i] { + return fmt.Errorf("Fixed64Map this[%v](%v) Not Equal that[%v](%v)", i, this.Fixed64Map[i], i, that1.Fixed64Map[i]) + } + } + if len(this.Sfixed64Map) != len(that1.Sfixed64Map) { + return fmt.Errorf("Sfixed64Map this(%v) Not Equal that(%v)", len(this.Sfixed64Map), len(that1.Sfixed64Map)) + } + for i := range this.Sfixed64Map { + if this.Sfixed64Map[i] != that1.Sfixed64Map[i] { + return fmt.Errorf("Sfixed64Map this[%v](%v) Not Equal that[%v](%v)", i, this.Sfixed64Map[i], i, that1.Sfixed64Map[i]) + } + } + if len(this.BoolMap) != len(that1.BoolMap) { + return fmt.Errorf("BoolMap this(%v) Not Equal that(%v)", len(this.BoolMap), len(that1.BoolMap)) + } + for i := range this.BoolMap { + if this.BoolMap[i] != that1.BoolMap[i] { + return fmt.Errorf("BoolMap this[%v](%v) Not Equal that[%v](%v)", i, this.BoolMap[i], i, that1.BoolMap[i]) + } + } + if len(this.StringMap) != len(that1.StringMap) { + return fmt.Errorf("StringMap this(%v) Not Equal that(%v)", len(this.StringMap), len(that1.StringMap)) + } + for i := range this.StringMap { + if this.StringMap[i] != that1.StringMap[i] { + return fmt.Errorf("StringMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringMap[i], i, that1.StringMap[i]) + } + } + if len(this.StringToBytesMap) != len(that1.StringToBytesMap) { + return fmt.Errorf("StringToBytesMap this(%v) Not Equal that(%v)", len(this.StringToBytesMap), len(that1.StringToBytesMap)) + } + for i := range this.StringToBytesMap { + if !bytes.Equal(this.StringToBytesMap[i], that1.StringToBytesMap[i]) { + return fmt.Errorf("StringToBytesMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringToBytesMap[i], i, that1.StringToBytesMap[i]) + } + } + if len(this.StringToEnumMap) != len(that1.StringToEnumMap) { + return fmt.Errorf("StringToEnumMap this(%v) Not Equal that(%v)", len(this.StringToEnumMap), len(that1.StringToEnumMap)) + } + for i := range this.StringToEnumMap { + if this.StringToEnumMap[i] != that1.StringToEnumMap[i] { + return fmt.Errorf("StringToEnumMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringToEnumMap[i], i, that1.StringToEnumMap[i]) + } + } + if len(this.StringToMsgMap) != len(that1.StringToMsgMap) { + return fmt.Errorf("StringToMsgMap this(%v) Not Equal that(%v)", len(this.StringToMsgMap), len(that1.StringToMsgMap)) + } + for i := range this.StringToMsgMap { + if !this.StringToMsgMap[i].Equal(that1.StringToMsgMap[i]) { + return fmt.Errorf("StringToMsgMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringToMsgMap[i], i, that1.StringToMsgMap[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *AllMapsOrdered) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*AllMapsOrdered) + if !ok { + that2, ok := that.(AllMapsOrdered) + 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.StringToDoubleMap) != len(that1.StringToDoubleMap) { + return false + } + for i := range this.StringToDoubleMap { + if this.StringToDoubleMap[i] != that1.StringToDoubleMap[i] { + return false + } + } + if len(this.StringToFloatMap) != len(that1.StringToFloatMap) { + return false + } + for i := range this.StringToFloatMap { + if this.StringToFloatMap[i] != that1.StringToFloatMap[i] { + return false + } + } + if len(this.Int32Map) != len(that1.Int32Map) { + return false + } + for i := range this.Int32Map { + if this.Int32Map[i] != that1.Int32Map[i] { + return false + } + } + if len(this.Int64Map) != len(that1.Int64Map) { + return false + } + for i := range this.Int64Map { + if this.Int64Map[i] != that1.Int64Map[i] { + return false + } + } + if len(this.Uint32Map) != len(that1.Uint32Map) { + return false + } + for i := range this.Uint32Map { + if this.Uint32Map[i] != that1.Uint32Map[i] { + return false + } + } + if len(this.Uint64Map) != len(that1.Uint64Map) { + return false + } + for i := range this.Uint64Map { + if this.Uint64Map[i] != that1.Uint64Map[i] { + return false + } + } + if len(this.Sint32Map) != len(that1.Sint32Map) { + return false + } + for i := range this.Sint32Map { + if this.Sint32Map[i] != that1.Sint32Map[i] { + return false + } + } + if len(this.Sint64Map) != len(that1.Sint64Map) { + return false + } + for i := range this.Sint64Map { + if this.Sint64Map[i] != that1.Sint64Map[i] { + return false + } + } + if len(this.Fixed32Map) != len(that1.Fixed32Map) { + return false + } + for i := range this.Fixed32Map { + if this.Fixed32Map[i] != that1.Fixed32Map[i] { + return false + } + } + if len(this.Sfixed32Map) != len(that1.Sfixed32Map) { + return false + } + for i := range this.Sfixed32Map { + if this.Sfixed32Map[i] != that1.Sfixed32Map[i] { + return false + } + } + if len(this.Fixed64Map) != len(that1.Fixed64Map) { + return false + } + for i := range this.Fixed64Map { + if this.Fixed64Map[i] != that1.Fixed64Map[i] { + return false + } + } + if len(this.Sfixed64Map) != len(that1.Sfixed64Map) { + return false + } + for i := range this.Sfixed64Map { + if this.Sfixed64Map[i] != that1.Sfixed64Map[i] { + return false + } + } + if len(this.BoolMap) != len(that1.BoolMap) { + return false + } + for i := range this.BoolMap { + if this.BoolMap[i] != that1.BoolMap[i] { + return false + } + } + if len(this.StringMap) != len(that1.StringMap) { + return false + } + for i := range this.StringMap { + if this.StringMap[i] != that1.StringMap[i] { + return false + } + } + if len(this.StringToBytesMap) != len(that1.StringToBytesMap) { + return false + } + for i := range this.StringToBytesMap { + if !bytes.Equal(this.StringToBytesMap[i], that1.StringToBytesMap[i]) { + return false + } + } + if len(this.StringToEnumMap) != len(that1.StringToEnumMap) { + return false + } + for i := range this.StringToEnumMap { + if this.StringToEnumMap[i] != that1.StringToEnumMap[i] { + return false + } + } + if len(this.StringToMsgMap) != len(that1.StringToMsgMap) { + return false + } + for i := range this.StringToMsgMap { + if !this.StringToMsgMap[i].Equal(that1.StringToMsgMap[i]) { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} + +type FloatingPointFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetF() *float64 +} + +func (this *FloatingPoint) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *FloatingPoint) TestProto() github_com_gogo_protobuf_proto.Message { + return NewFloatingPointFromFace(this) +} + +func (this *FloatingPoint) GetF() *float64 { + return this.F +} + +func NewFloatingPointFromFace(that FloatingPointFace) *FloatingPoint { + this := &FloatingPoint{} + this.F = that.GetF() + return this +} + +type AllMapsFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetStringToDoubleMap() map[string]float64 + GetStringToFloatMap() map[string]float32 + GetInt32Map() map[int32]int32 + GetInt64Map() map[int64]int64 + GetUint32Map() map[uint32]uint32 + GetUint64Map() map[uint64]uint64 + GetSint32Map() map[int32]int32 + GetSint64Map() map[int64]int64 + GetFixed32Map() map[uint32]uint32 + GetSfixed32Map() map[int32]int32 + GetFixed64Map() map[uint64]uint64 + GetSfixed64Map() map[int64]int64 + GetBoolMap() map[bool]bool + GetStringMap() map[string]string + GetStringToBytesMap() map[string][]byte + GetStringToEnumMap() map[string]MapEnum + GetStringToMsgMap() map[string]*FloatingPoint +} + +func (this *AllMaps) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *AllMaps) TestProto() github_com_gogo_protobuf_proto.Message { + return NewAllMapsFromFace(this) +} + +func (this *AllMaps) GetStringToDoubleMap() map[string]float64 { + return this.StringToDoubleMap +} + +func (this *AllMaps) GetStringToFloatMap() map[string]float32 { + return this.StringToFloatMap +} + +func (this *AllMaps) GetInt32Map() map[int32]int32 { + return this.Int32Map +} + +func (this *AllMaps) GetInt64Map() map[int64]int64 { + return this.Int64Map +} + +func (this *AllMaps) GetUint32Map() map[uint32]uint32 { + return this.Uint32Map +} + +func (this *AllMaps) GetUint64Map() map[uint64]uint64 { + return this.Uint64Map +} + +func (this *AllMaps) GetSint32Map() map[int32]int32 { + return this.Sint32Map +} + +func (this *AllMaps) GetSint64Map() map[int64]int64 { + return this.Sint64Map +} + +func (this *AllMaps) GetFixed32Map() map[uint32]uint32 { + return this.Fixed32Map +} + +func (this *AllMaps) GetSfixed32Map() map[int32]int32 { + return this.Sfixed32Map +} + +func (this *AllMaps) GetFixed64Map() map[uint64]uint64 { + return this.Fixed64Map +} + +func (this *AllMaps) GetSfixed64Map() map[int64]int64 { + return this.Sfixed64Map +} + +func (this *AllMaps) GetBoolMap() map[bool]bool { + return this.BoolMap +} + +func (this *AllMaps) GetStringMap() map[string]string { + return this.StringMap +} + +func (this *AllMaps) GetStringToBytesMap() map[string][]byte { + return this.StringToBytesMap +} + +func (this *AllMaps) GetStringToEnumMap() map[string]MapEnum { + return this.StringToEnumMap +} + +func (this *AllMaps) GetStringToMsgMap() map[string]*FloatingPoint { + return this.StringToMsgMap +} + +func NewAllMapsFromFace(that AllMapsFace) *AllMaps { + this := &AllMaps{} + this.StringToDoubleMap = that.GetStringToDoubleMap() + this.StringToFloatMap = that.GetStringToFloatMap() + this.Int32Map = that.GetInt32Map() + this.Int64Map = that.GetInt64Map() + this.Uint32Map = that.GetUint32Map() + this.Uint64Map = that.GetUint64Map() + this.Sint32Map = that.GetSint32Map() + this.Sint64Map = that.GetSint64Map() + this.Fixed32Map = that.GetFixed32Map() + this.Sfixed32Map = that.GetSfixed32Map() + this.Fixed64Map = that.GetFixed64Map() + this.Sfixed64Map = that.GetSfixed64Map() + this.BoolMap = that.GetBoolMap() + this.StringMap = that.GetStringMap() + this.StringToBytesMap = that.GetStringToBytesMap() + this.StringToEnumMap = that.GetStringToEnumMap() + this.StringToMsgMap = that.GetStringToMsgMap() + return this +} + +type AllMapsOrderedFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetStringToDoubleMap() map[string]float64 + GetStringToFloatMap() map[string]float32 + GetInt32Map() map[int32]int32 + GetInt64Map() map[int64]int64 + GetUint32Map() map[uint32]uint32 + GetUint64Map() map[uint64]uint64 + GetSint32Map() map[int32]int32 + GetSint64Map() map[int64]int64 + GetFixed32Map() map[uint32]uint32 + GetSfixed32Map() map[int32]int32 + GetFixed64Map() map[uint64]uint64 + GetSfixed64Map() map[int64]int64 + GetBoolMap() map[bool]bool + GetStringMap() map[string]string + GetStringToBytesMap() map[string][]byte + GetStringToEnumMap() map[string]MapEnum + GetStringToMsgMap() map[string]*FloatingPoint +} + +func (this *AllMapsOrdered) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *AllMapsOrdered) TestProto() github_com_gogo_protobuf_proto.Message { + return NewAllMapsOrderedFromFace(this) +} + +func (this *AllMapsOrdered) GetStringToDoubleMap() map[string]float64 { + return this.StringToDoubleMap +} + +func (this *AllMapsOrdered) GetStringToFloatMap() map[string]float32 { + return this.StringToFloatMap +} + +func (this *AllMapsOrdered) GetInt32Map() map[int32]int32 { + return this.Int32Map +} + +func (this *AllMapsOrdered) GetInt64Map() map[int64]int64 { + return this.Int64Map +} + +func (this *AllMapsOrdered) GetUint32Map() map[uint32]uint32 { + return this.Uint32Map +} + +func (this *AllMapsOrdered) GetUint64Map() map[uint64]uint64 { + return this.Uint64Map +} + +func (this *AllMapsOrdered) GetSint32Map() map[int32]int32 { + return this.Sint32Map +} + +func (this *AllMapsOrdered) GetSint64Map() map[int64]int64 { + return this.Sint64Map +} + +func (this *AllMapsOrdered) GetFixed32Map() map[uint32]uint32 { + return this.Fixed32Map +} + +func (this *AllMapsOrdered) GetSfixed32Map() map[int32]int32 { + return this.Sfixed32Map +} + +func (this *AllMapsOrdered) GetFixed64Map() map[uint64]uint64 { + return this.Fixed64Map +} + +func (this *AllMapsOrdered) GetSfixed64Map() map[int64]int64 { + return this.Sfixed64Map +} + +func (this *AllMapsOrdered) GetBoolMap() map[bool]bool { + return this.BoolMap +} + +func (this *AllMapsOrdered) GetStringMap() map[string]string { + return this.StringMap +} + +func (this *AllMapsOrdered) GetStringToBytesMap() map[string][]byte { + return this.StringToBytesMap +} + +func (this *AllMapsOrdered) GetStringToEnumMap() map[string]MapEnum { + return this.StringToEnumMap +} + +func (this *AllMapsOrdered) GetStringToMsgMap() map[string]*FloatingPoint { + return this.StringToMsgMap +} + +func NewAllMapsOrderedFromFace(that AllMapsOrderedFace) *AllMapsOrdered { + this := &AllMapsOrdered{} + this.StringToDoubleMap = that.GetStringToDoubleMap() + this.StringToFloatMap = that.GetStringToFloatMap() + this.Int32Map = that.GetInt32Map() + this.Int64Map = that.GetInt64Map() + this.Uint32Map = that.GetUint32Map() + this.Uint64Map = that.GetUint64Map() + this.Sint32Map = that.GetSint32Map() + this.Sint64Map = that.GetSint64Map() + this.Fixed32Map = that.GetFixed32Map() + this.Sfixed32Map = that.GetSfixed32Map() + this.Fixed64Map = that.GetFixed64Map() + this.Sfixed64Map = that.GetSfixed64Map() + this.BoolMap = that.GetBoolMap() + this.StringMap = that.GetStringMap() + this.StringToBytesMap = that.GetStringToBytesMap() + this.StringToEnumMap = that.GetStringToEnumMap() + this.StringToMsgMap = that.GetStringToMsgMap() + return this +} + +func (this *FloatingPoint) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&proto2_maps.FloatingPoint{") + if this.F != nil { + s = append(s, "F: "+valueToGoStringMapsproto2(this.F, "float64")+",\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 *AllMaps) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 21) + s = append(s, "&proto2_maps.AllMaps{") + keysForStringToDoubleMap := make([]string, 0, len(this.StringToDoubleMap)) + for k := range this.StringToDoubleMap { + keysForStringToDoubleMap = append(keysForStringToDoubleMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToDoubleMap) + mapStringForStringToDoubleMap := "map[string]float64{" + for _, k := range keysForStringToDoubleMap { + mapStringForStringToDoubleMap += fmt.Sprintf("%#v: %#v,", k, this.StringToDoubleMap[k]) + } + mapStringForStringToDoubleMap += "}" + if this.StringToDoubleMap != nil { + s = append(s, "StringToDoubleMap: "+mapStringForStringToDoubleMap+",\n") + } + keysForStringToFloatMap := make([]string, 0, len(this.StringToFloatMap)) + for k := range this.StringToFloatMap { + keysForStringToFloatMap = append(keysForStringToFloatMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToFloatMap) + mapStringForStringToFloatMap := "map[string]float32{" + for _, k := range keysForStringToFloatMap { + mapStringForStringToFloatMap += fmt.Sprintf("%#v: %#v,", k, this.StringToFloatMap[k]) + } + mapStringForStringToFloatMap += "}" + if this.StringToFloatMap != nil { + s = append(s, "StringToFloatMap: "+mapStringForStringToFloatMap+",\n") + } + keysForInt32Map := make([]int32, 0, len(this.Int32Map)) + for k := range this.Int32Map { + keysForInt32Map = append(keysForInt32Map, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForInt32Map) + mapStringForInt32Map := "map[int32]int32{" + for _, k := range keysForInt32Map { + mapStringForInt32Map += fmt.Sprintf("%#v: %#v,", k, this.Int32Map[k]) + } + mapStringForInt32Map += "}" + if this.Int32Map != nil { + s = append(s, "Int32Map: "+mapStringForInt32Map+",\n") + } + keysForInt64Map := make([]int64, 0, len(this.Int64Map)) + for k := range this.Int64Map { + keysForInt64Map = append(keysForInt64Map, k) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForInt64Map) + mapStringForInt64Map := "map[int64]int64{" + for _, k := range keysForInt64Map { + mapStringForInt64Map += fmt.Sprintf("%#v: %#v,", k, this.Int64Map[k]) + } + mapStringForInt64Map += "}" + if this.Int64Map != nil { + s = append(s, "Int64Map: "+mapStringForInt64Map+",\n") + } + keysForUint32Map := make([]uint32, 0, len(this.Uint32Map)) + for k := range this.Uint32Map { + keysForUint32Map = append(keysForUint32Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint32s(keysForUint32Map) + mapStringForUint32Map := "map[uint32]uint32{" + for _, k := range keysForUint32Map { + mapStringForUint32Map += fmt.Sprintf("%#v: %#v,", k, this.Uint32Map[k]) + } + mapStringForUint32Map += "}" + if this.Uint32Map != nil { + s = append(s, "Uint32Map: "+mapStringForUint32Map+",\n") + } + keysForUint64Map := make([]uint64, 0, len(this.Uint64Map)) + for k := range this.Uint64Map { + keysForUint64Map = append(keysForUint64Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint64s(keysForUint64Map) + mapStringForUint64Map := "map[uint64]uint64{" + for _, k := range keysForUint64Map { + mapStringForUint64Map += fmt.Sprintf("%#v: %#v,", k, this.Uint64Map[k]) + } + mapStringForUint64Map += "}" + if this.Uint64Map != nil { + s = append(s, "Uint64Map: "+mapStringForUint64Map+",\n") + } + keysForSint32Map := make([]int32, 0, len(this.Sint32Map)) + for k := range this.Sint32Map { + keysForSint32Map = append(keysForSint32Map, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForSint32Map) + mapStringForSint32Map := "map[int32]int32{" + for _, k := range keysForSint32Map { + mapStringForSint32Map += fmt.Sprintf("%#v: %#v,", k, this.Sint32Map[k]) + } + mapStringForSint32Map += "}" + if this.Sint32Map != nil { + s = append(s, "Sint32Map: "+mapStringForSint32Map+",\n") + } + keysForSint64Map := make([]int64, 0, len(this.Sint64Map)) + for k := range this.Sint64Map { + keysForSint64Map = append(keysForSint64Map, k) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForSint64Map) + mapStringForSint64Map := "map[int64]int64{" + for _, k := range keysForSint64Map { + mapStringForSint64Map += fmt.Sprintf("%#v: %#v,", k, this.Sint64Map[k]) + } + mapStringForSint64Map += "}" + if this.Sint64Map != nil { + s = append(s, "Sint64Map: "+mapStringForSint64Map+",\n") + } + keysForFixed32Map := make([]uint32, 0, len(this.Fixed32Map)) + for k := range this.Fixed32Map { + keysForFixed32Map = append(keysForFixed32Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint32s(keysForFixed32Map) + mapStringForFixed32Map := "map[uint32]uint32{" + for _, k := range keysForFixed32Map { + mapStringForFixed32Map += fmt.Sprintf("%#v: %#v,", k, this.Fixed32Map[k]) + } + mapStringForFixed32Map += "}" + if this.Fixed32Map != nil { + s = append(s, "Fixed32Map: "+mapStringForFixed32Map+",\n") + } + keysForSfixed32Map := make([]int32, 0, len(this.Sfixed32Map)) + for k := range this.Sfixed32Map { + keysForSfixed32Map = append(keysForSfixed32Map, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForSfixed32Map) + mapStringForSfixed32Map := "map[int32]int32{" + for _, k := range keysForSfixed32Map { + mapStringForSfixed32Map += fmt.Sprintf("%#v: %#v,", k, this.Sfixed32Map[k]) + } + mapStringForSfixed32Map += "}" + if this.Sfixed32Map != nil { + s = append(s, "Sfixed32Map: "+mapStringForSfixed32Map+",\n") + } + keysForFixed64Map := make([]uint64, 0, len(this.Fixed64Map)) + for k := range this.Fixed64Map { + keysForFixed64Map = append(keysForFixed64Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint64s(keysForFixed64Map) + mapStringForFixed64Map := "map[uint64]uint64{" + for _, k := range keysForFixed64Map { + mapStringForFixed64Map += fmt.Sprintf("%#v: %#v,", k, this.Fixed64Map[k]) + } + mapStringForFixed64Map += "}" + if this.Fixed64Map != nil { + s = append(s, "Fixed64Map: "+mapStringForFixed64Map+",\n") + } + keysForSfixed64Map := make([]int64, 0, len(this.Sfixed64Map)) + for k := range this.Sfixed64Map { + keysForSfixed64Map = append(keysForSfixed64Map, k) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForSfixed64Map) + mapStringForSfixed64Map := "map[int64]int64{" + for _, k := range keysForSfixed64Map { + mapStringForSfixed64Map += fmt.Sprintf("%#v: %#v,", k, this.Sfixed64Map[k]) + } + mapStringForSfixed64Map += "}" + if this.Sfixed64Map != nil { + s = append(s, "Sfixed64Map: "+mapStringForSfixed64Map+",\n") + } + keysForBoolMap := make([]bool, 0, len(this.BoolMap)) + for k := range this.BoolMap { + keysForBoolMap = append(keysForBoolMap, k) + } + github_com_gogo_protobuf_sortkeys.Bools(keysForBoolMap) + mapStringForBoolMap := "map[bool]bool{" + for _, k := range keysForBoolMap { + mapStringForBoolMap += fmt.Sprintf("%#v: %#v,", k, this.BoolMap[k]) + } + mapStringForBoolMap += "}" + if this.BoolMap != nil { + s = append(s, "BoolMap: "+mapStringForBoolMap+",\n") + } + keysForStringMap := make([]string, 0, len(this.StringMap)) + for k := range this.StringMap { + keysForStringMap = append(keysForStringMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringMap) + mapStringForStringMap := "map[string]string{" + for _, k := range keysForStringMap { + mapStringForStringMap += fmt.Sprintf("%#v: %#v,", k, this.StringMap[k]) + } + mapStringForStringMap += "}" + if this.StringMap != nil { + s = append(s, "StringMap: "+mapStringForStringMap+",\n") + } + keysForStringToBytesMap := make([]string, 0, len(this.StringToBytesMap)) + for k := range this.StringToBytesMap { + keysForStringToBytesMap = append(keysForStringToBytesMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToBytesMap) + mapStringForStringToBytesMap := "map[string][]byte{" + for _, k := range keysForStringToBytesMap { + mapStringForStringToBytesMap += fmt.Sprintf("%#v: %#v,", k, this.StringToBytesMap[k]) + } + mapStringForStringToBytesMap += "}" + if this.StringToBytesMap != nil { + s = append(s, "StringToBytesMap: "+mapStringForStringToBytesMap+",\n") + } + keysForStringToEnumMap := make([]string, 0, len(this.StringToEnumMap)) + for k := range this.StringToEnumMap { + keysForStringToEnumMap = append(keysForStringToEnumMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToEnumMap) + mapStringForStringToEnumMap := "map[string]MapEnum{" + for _, k := range keysForStringToEnumMap { + mapStringForStringToEnumMap += fmt.Sprintf("%#v: %#v,", k, this.StringToEnumMap[k]) + } + mapStringForStringToEnumMap += "}" + if this.StringToEnumMap != nil { + s = append(s, "StringToEnumMap: "+mapStringForStringToEnumMap+",\n") + } + keysForStringToMsgMap := make([]string, 0, len(this.StringToMsgMap)) + for k := range this.StringToMsgMap { + keysForStringToMsgMap = append(keysForStringToMsgMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToMsgMap) + mapStringForStringToMsgMap := "map[string]*FloatingPoint{" + for _, k := range keysForStringToMsgMap { + mapStringForStringToMsgMap += fmt.Sprintf("%#v: %#v,", k, this.StringToMsgMap[k]) + } + mapStringForStringToMsgMap += "}" + if this.StringToMsgMap != nil { + s = append(s, "StringToMsgMap: "+mapStringForStringToMsgMap+",\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 *AllMapsOrdered) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 21) + s = append(s, "&proto2_maps.AllMapsOrdered{") + keysForStringToDoubleMap := make([]string, 0, len(this.StringToDoubleMap)) + for k := range this.StringToDoubleMap { + keysForStringToDoubleMap = append(keysForStringToDoubleMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToDoubleMap) + mapStringForStringToDoubleMap := "map[string]float64{" + for _, k := range keysForStringToDoubleMap { + mapStringForStringToDoubleMap += fmt.Sprintf("%#v: %#v,", k, this.StringToDoubleMap[k]) + } + mapStringForStringToDoubleMap += "}" + if this.StringToDoubleMap != nil { + s = append(s, "StringToDoubleMap: "+mapStringForStringToDoubleMap+",\n") + } + keysForStringToFloatMap := make([]string, 0, len(this.StringToFloatMap)) + for k := range this.StringToFloatMap { + keysForStringToFloatMap = append(keysForStringToFloatMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToFloatMap) + mapStringForStringToFloatMap := "map[string]float32{" + for _, k := range keysForStringToFloatMap { + mapStringForStringToFloatMap += fmt.Sprintf("%#v: %#v,", k, this.StringToFloatMap[k]) + } + mapStringForStringToFloatMap += "}" + if this.StringToFloatMap != nil { + s = append(s, "StringToFloatMap: "+mapStringForStringToFloatMap+",\n") + } + keysForInt32Map := make([]int32, 0, len(this.Int32Map)) + for k := range this.Int32Map { + keysForInt32Map = append(keysForInt32Map, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForInt32Map) + mapStringForInt32Map := "map[int32]int32{" + for _, k := range keysForInt32Map { + mapStringForInt32Map += fmt.Sprintf("%#v: %#v,", k, this.Int32Map[k]) + } + mapStringForInt32Map += "}" + if this.Int32Map != nil { + s = append(s, "Int32Map: "+mapStringForInt32Map+",\n") + } + keysForInt64Map := make([]int64, 0, len(this.Int64Map)) + for k := range this.Int64Map { + keysForInt64Map = append(keysForInt64Map, k) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForInt64Map) + mapStringForInt64Map := "map[int64]int64{" + for _, k := range keysForInt64Map { + mapStringForInt64Map += fmt.Sprintf("%#v: %#v,", k, this.Int64Map[k]) + } + mapStringForInt64Map += "}" + if this.Int64Map != nil { + s = append(s, "Int64Map: "+mapStringForInt64Map+",\n") + } + keysForUint32Map := make([]uint32, 0, len(this.Uint32Map)) + for k := range this.Uint32Map { + keysForUint32Map = append(keysForUint32Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint32s(keysForUint32Map) + mapStringForUint32Map := "map[uint32]uint32{" + for _, k := range keysForUint32Map { + mapStringForUint32Map += fmt.Sprintf("%#v: %#v,", k, this.Uint32Map[k]) + } + mapStringForUint32Map += "}" + if this.Uint32Map != nil { + s = append(s, "Uint32Map: "+mapStringForUint32Map+",\n") + } + keysForUint64Map := make([]uint64, 0, len(this.Uint64Map)) + for k := range this.Uint64Map { + keysForUint64Map = append(keysForUint64Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint64s(keysForUint64Map) + mapStringForUint64Map := "map[uint64]uint64{" + for _, k := range keysForUint64Map { + mapStringForUint64Map += fmt.Sprintf("%#v: %#v,", k, this.Uint64Map[k]) + } + mapStringForUint64Map += "}" + if this.Uint64Map != nil { + s = append(s, "Uint64Map: "+mapStringForUint64Map+",\n") + } + keysForSint32Map := make([]int32, 0, len(this.Sint32Map)) + for k := range this.Sint32Map { + keysForSint32Map = append(keysForSint32Map, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForSint32Map) + mapStringForSint32Map := "map[int32]int32{" + for _, k := range keysForSint32Map { + mapStringForSint32Map += fmt.Sprintf("%#v: %#v,", k, this.Sint32Map[k]) + } + mapStringForSint32Map += "}" + if this.Sint32Map != nil { + s = append(s, "Sint32Map: "+mapStringForSint32Map+",\n") + } + keysForSint64Map := make([]int64, 0, len(this.Sint64Map)) + for k := range this.Sint64Map { + keysForSint64Map = append(keysForSint64Map, k) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForSint64Map) + mapStringForSint64Map := "map[int64]int64{" + for _, k := range keysForSint64Map { + mapStringForSint64Map += fmt.Sprintf("%#v: %#v,", k, this.Sint64Map[k]) + } + mapStringForSint64Map += "}" + if this.Sint64Map != nil { + s = append(s, "Sint64Map: "+mapStringForSint64Map+",\n") + } + keysForFixed32Map := make([]uint32, 0, len(this.Fixed32Map)) + for k := range this.Fixed32Map { + keysForFixed32Map = append(keysForFixed32Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint32s(keysForFixed32Map) + mapStringForFixed32Map := "map[uint32]uint32{" + for _, k := range keysForFixed32Map { + mapStringForFixed32Map += fmt.Sprintf("%#v: %#v,", k, this.Fixed32Map[k]) + } + mapStringForFixed32Map += "}" + if this.Fixed32Map != nil { + s = append(s, "Fixed32Map: "+mapStringForFixed32Map+",\n") + } + keysForSfixed32Map := make([]int32, 0, len(this.Sfixed32Map)) + for k := range this.Sfixed32Map { + keysForSfixed32Map = append(keysForSfixed32Map, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForSfixed32Map) + mapStringForSfixed32Map := "map[int32]int32{" + for _, k := range keysForSfixed32Map { + mapStringForSfixed32Map += fmt.Sprintf("%#v: %#v,", k, this.Sfixed32Map[k]) + } + mapStringForSfixed32Map += "}" + if this.Sfixed32Map != nil { + s = append(s, "Sfixed32Map: "+mapStringForSfixed32Map+",\n") + } + keysForFixed64Map := make([]uint64, 0, len(this.Fixed64Map)) + for k := range this.Fixed64Map { + keysForFixed64Map = append(keysForFixed64Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint64s(keysForFixed64Map) + mapStringForFixed64Map := "map[uint64]uint64{" + for _, k := range keysForFixed64Map { + mapStringForFixed64Map += fmt.Sprintf("%#v: %#v,", k, this.Fixed64Map[k]) + } + mapStringForFixed64Map += "}" + if this.Fixed64Map != nil { + s = append(s, "Fixed64Map: "+mapStringForFixed64Map+",\n") + } + keysForSfixed64Map := make([]int64, 0, len(this.Sfixed64Map)) + for k := range this.Sfixed64Map { + keysForSfixed64Map = append(keysForSfixed64Map, k) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForSfixed64Map) + mapStringForSfixed64Map := "map[int64]int64{" + for _, k := range keysForSfixed64Map { + mapStringForSfixed64Map += fmt.Sprintf("%#v: %#v,", k, this.Sfixed64Map[k]) + } + mapStringForSfixed64Map += "}" + if this.Sfixed64Map != nil { + s = append(s, "Sfixed64Map: "+mapStringForSfixed64Map+",\n") + } + keysForBoolMap := make([]bool, 0, len(this.BoolMap)) + for k := range this.BoolMap { + keysForBoolMap = append(keysForBoolMap, k) + } + github_com_gogo_protobuf_sortkeys.Bools(keysForBoolMap) + mapStringForBoolMap := "map[bool]bool{" + for _, k := range keysForBoolMap { + mapStringForBoolMap += fmt.Sprintf("%#v: %#v,", k, this.BoolMap[k]) + } + mapStringForBoolMap += "}" + if this.BoolMap != nil { + s = append(s, "BoolMap: "+mapStringForBoolMap+",\n") + } + keysForStringMap := make([]string, 0, len(this.StringMap)) + for k := range this.StringMap { + keysForStringMap = append(keysForStringMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringMap) + mapStringForStringMap := "map[string]string{" + for _, k := range keysForStringMap { + mapStringForStringMap += fmt.Sprintf("%#v: %#v,", k, this.StringMap[k]) + } + mapStringForStringMap += "}" + if this.StringMap != nil { + s = append(s, "StringMap: "+mapStringForStringMap+",\n") + } + keysForStringToBytesMap := make([]string, 0, len(this.StringToBytesMap)) + for k := range this.StringToBytesMap { + keysForStringToBytesMap = append(keysForStringToBytesMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToBytesMap) + mapStringForStringToBytesMap := "map[string][]byte{" + for _, k := range keysForStringToBytesMap { + mapStringForStringToBytesMap += fmt.Sprintf("%#v: %#v,", k, this.StringToBytesMap[k]) + } + mapStringForStringToBytesMap += "}" + if this.StringToBytesMap != nil { + s = append(s, "StringToBytesMap: "+mapStringForStringToBytesMap+",\n") + } + keysForStringToEnumMap := make([]string, 0, len(this.StringToEnumMap)) + for k := range this.StringToEnumMap { + keysForStringToEnumMap = append(keysForStringToEnumMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToEnumMap) + mapStringForStringToEnumMap := "map[string]MapEnum{" + for _, k := range keysForStringToEnumMap { + mapStringForStringToEnumMap += fmt.Sprintf("%#v: %#v,", k, this.StringToEnumMap[k]) + } + mapStringForStringToEnumMap += "}" + if this.StringToEnumMap != nil { + s = append(s, "StringToEnumMap: "+mapStringForStringToEnumMap+",\n") + } + keysForStringToMsgMap := make([]string, 0, len(this.StringToMsgMap)) + for k := range this.StringToMsgMap { + keysForStringToMsgMap = append(keysForStringToMsgMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToMsgMap) + mapStringForStringToMsgMap := "map[string]*FloatingPoint{" + for _, k := range keysForStringToMsgMap { + mapStringForStringToMsgMap += fmt.Sprintf("%#v: %#v,", k, this.StringToMsgMap[k]) + } + mapStringForStringToMsgMap += "}" + if this.StringToMsgMap != nil { + s = append(s, "StringToMsgMap: "+mapStringForStringToMsgMap+",\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 valueToGoStringMapsproto2(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 extensionToGoStringMapsproto2(e map[int32]github_com_gogo_protobuf_proto.Extension) string { + if e == nil { + return "nil" + } + s := "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 +} +func (m *FloatingPoint) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *FloatingPoint) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.F != nil { + data[i] = 0x9 + i++ + i = encodeFixed64Mapsproto2(data, i, uint64(math.Float64bits(float64(*m.F)))) + } + if m.XXX_unrecognized != nil { + i += copy(data[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *AllMaps) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *AllMaps) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.StringToDoubleMap) > 0 { + for k := range m.StringToDoubleMap { + data[i] = 0xa + i++ + v := m.StringToDoubleMap[k] + mapSize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + 1 + 8 + i = encodeVarintMapsproto2(data, i, uint64(mapSize)) + data[i] = 0xa + i++ + i = encodeVarintMapsproto2(data, i, uint64(len(k))) + i += copy(data[i:], k) + data[i] = 0x11 + i++ + i = encodeFixed64Mapsproto2(data, i, uint64(math.Float64bits(float64(v)))) + } + } + if len(m.StringToFloatMap) > 0 { + for k := range m.StringToFloatMap { + data[i] = 0x12 + i++ + v := m.StringToFloatMap[k] + mapSize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + 1 + 4 + i = encodeVarintMapsproto2(data, i, uint64(mapSize)) + data[i] = 0xa + i++ + i = encodeVarintMapsproto2(data, i, uint64(len(k))) + i += copy(data[i:], k) + data[i] = 0x15 + i++ + i = encodeFixed32Mapsproto2(data, i, uint32(math.Float32bits(float32(v)))) + } + } + if len(m.Int32Map) > 0 { + for k := range m.Int32Map { + data[i] = 0x1a + i++ + v := m.Int32Map[k] + mapSize := 1 + sovMapsproto2(uint64(k)) + 1 + sovMapsproto2(uint64(v)) + i = encodeVarintMapsproto2(data, i, uint64(mapSize)) + data[i] = 0x8 + i++ + i = encodeVarintMapsproto2(data, i, uint64(k)) + data[i] = 0x10 + i++ + i = encodeVarintMapsproto2(data, i, uint64(v)) + } + } + if len(m.Int64Map) > 0 { + for k := range m.Int64Map { + data[i] = 0x22 + i++ + v := m.Int64Map[k] + mapSize := 1 + sovMapsproto2(uint64(k)) + 1 + sovMapsproto2(uint64(v)) + i = encodeVarintMapsproto2(data, i, uint64(mapSize)) + data[i] = 0x8 + i++ + i = encodeVarintMapsproto2(data, i, uint64(k)) + data[i] = 0x10 + i++ + i = encodeVarintMapsproto2(data, i, uint64(v)) + } + } + if len(m.Uint32Map) > 0 { + for k := range m.Uint32Map { + data[i] = 0x2a + i++ + v := m.Uint32Map[k] + mapSize := 1 + sovMapsproto2(uint64(k)) + 1 + sovMapsproto2(uint64(v)) + i = encodeVarintMapsproto2(data, i, uint64(mapSize)) + data[i] = 0x8 + i++ + i = encodeVarintMapsproto2(data, i, uint64(k)) + data[i] = 0x10 + i++ + i = encodeVarintMapsproto2(data, i, uint64(v)) + } + } + if len(m.Uint64Map) > 0 { + for k := range m.Uint64Map { + data[i] = 0x32 + i++ + v := m.Uint64Map[k] + mapSize := 1 + sovMapsproto2(uint64(k)) + 1 + sovMapsproto2(uint64(v)) + i = encodeVarintMapsproto2(data, i, uint64(mapSize)) + data[i] = 0x8 + i++ + i = encodeVarintMapsproto2(data, i, uint64(k)) + data[i] = 0x10 + i++ + i = encodeVarintMapsproto2(data, i, uint64(v)) + } + } + if len(m.Sint32Map) > 0 { + for k := range m.Sint32Map { + data[i] = 0x3a + i++ + v := m.Sint32Map[k] + mapSize := 1 + sozMapsproto2(uint64(k)) + 1 + sozMapsproto2(uint64(v)) + i = encodeVarintMapsproto2(data, i, uint64(mapSize)) + data[i] = 0x8 + i++ + i = encodeVarintMapsproto2(data, i, uint64((uint32(k)<<1)^uint32((k>>31)))) + data[i] = 0x10 + i++ + i = encodeVarintMapsproto2(data, i, uint64((uint32(v)<<1)^uint32((v>>31)))) + } + } + if len(m.Sint64Map) > 0 { + for k := range m.Sint64Map { + data[i] = 0x42 + i++ + v := m.Sint64Map[k] + mapSize := 1 + sozMapsproto2(uint64(k)) + 1 + sozMapsproto2(uint64(v)) + i = encodeVarintMapsproto2(data, i, uint64(mapSize)) + data[i] = 0x8 + i++ + i = encodeVarintMapsproto2(data, i, uint64((uint64(k)<<1)^uint64((k>>63)))) + data[i] = 0x10 + i++ + i = encodeVarintMapsproto2(data, i, uint64((uint64(v)<<1)^uint64((v>>63)))) + } + } + if len(m.Fixed32Map) > 0 { + for k := range m.Fixed32Map { + data[i] = 0x4a + i++ + v := m.Fixed32Map[k] + mapSize := 1 + 4 + 1 + 4 + i = encodeVarintMapsproto2(data, i, uint64(mapSize)) + data[i] = 0xd + i++ + i = encodeFixed32Mapsproto2(data, i, uint32(k)) + data[i] = 0x15 + i++ + i = encodeFixed32Mapsproto2(data, i, uint32(v)) + } + } + if len(m.Sfixed32Map) > 0 { + for k := range m.Sfixed32Map { + data[i] = 0x52 + i++ + v := m.Sfixed32Map[k] + mapSize := 1 + 4 + 1 + 4 + i = encodeVarintMapsproto2(data, i, uint64(mapSize)) + data[i] = 0xd + i++ + i = encodeFixed32Mapsproto2(data, i, uint32(k)) + data[i] = 0x15 + i++ + i = encodeFixed32Mapsproto2(data, i, uint32(v)) + } + } + if len(m.Fixed64Map) > 0 { + for k := range m.Fixed64Map { + data[i] = 0x5a + i++ + v := m.Fixed64Map[k] + mapSize := 1 + 8 + 1 + 8 + i = encodeVarintMapsproto2(data, i, uint64(mapSize)) + data[i] = 0x9 + i++ + i = encodeFixed64Mapsproto2(data, i, uint64(k)) + data[i] = 0x11 + i++ + i = encodeFixed64Mapsproto2(data, i, uint64(v)) + } + } + if len(m.Sfixed64Map) > 0 { + for k := range m.Sfixed64Map { + data[i] = 0x62 + i++ + v := m.Sfixed64Map[k] + mapSize := 1 + 8 + 1 + 8 + i = encodeVarintMapsproto2(data, i, uint64(mapSize)) + data[i] = 0x9 + i++ + i = encodeFixed64Mapsproto2(data, i, uint64(k)) + data[i] = 0x11 + i++ + i = encodeFixed64Mapsproto2(data, i, uint64(v)) + } + } + if len(m.BoolMap) > 0 { + for k := range m.BoolMap { + data[i] = 0x6a + i++ + v := m.BoolMap[k] + mapSize := 1 + 1 + 1 + 1 + i = encodeVarintMapsproto2(data, i, uint64(mapSize)) + data[i] = 0x8 + i++ + if k { + data[i] = 1 + } else { + data[i] = 0 + } + i++ + data[i] = 0x10 + i++ + if v { + data[i] = 1 + } else { + data[i] = 0 + } + i++ + } + } + if len(m.StringMap) > 0 { + for k := range m.StringMap { + data[i] = 0x72 + i++ + v := m.StringMap[k] + mapSize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + 1 + len(v) + sovMapsproto2(uint64(len(v))) + i = encodeVarintMapsproto2(data, i, uint64(mapSize)) + data[i] = 0xa + i++ + i = encodeVarintMapsproto2(data, i, uint64(len(k))) + i += copy(data[i:], k) + data[i] = 0x12 + i++ + i = encodeVarintMapsproto2(data, i, uint64(len(v))) + i += copy(data[i:], v) + } + } + if len(m.StringToBytesMap) > 0 { + for k := range m.StringToBytesMap { + data[i] = 0x7a + i++ + v := m.StringToBytesMap[k] + mapSize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + 1 + len(v) + sovMapsproto2(uint64(len(v))) + i = encodeVarintMapsproto2(data, i, uint64(mapSize)) + data[i] = 0xa + i++ + i = encodeVarintMapsproto2(data, i, uint64(len(k))) + i += copy(data[i:], k) + data[i] = 0x12 + i++ + i = encodeVarintMapsproto2(data, i, uint64(len(v))) + i += copy(data[i:], v) + } + } + if len(m.StringToEnumMap) > 0 { + for k := range m.StringToEnumMap { + data[i] = 0x82 + i++ + data[i] = 0x1 + i++ + v := m.StringToEnumMap[k] + mapSize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + 1 + sovMapsproto2(uint64(v)) + i = encodeVarintMapsproto2(data, i, uint64(mapSize)) + data[i] = 0xa + i++ + i = encodeVarintMapsproto2(data, i, uint64(len(k))) + i += copy(data[i:], k) + data[i] = 0x10 + i++ + i = encodeVarintMapsproto2(data, i, uint64(v)) + } + } + if len(m.StringToMsgMap) > 0 { + for k := range m.StringToMsgMap { + data[i] = 0x8a + i++ + data[i] = 0x1 + i++ + v := m.StringToMsgMap[k] + if v == nil { + return 0, errors.New("proto: map has nil element") + } + msgSize := v.Size() + mapSize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + 1 + msgSize + sovMapsproto2(uint64(msgSize)) + i = encodeVarintMapsproto2(data, i, uint64(mapSize)) + data[i] = 0xa + i++ + i = encodeVarintMapsproto2(data, i, uint64(len(k))) + i += copy(data[i:], k) + data[i] = 0x12 + i++ + i = encodeVarintMapsproto2(data, i, uint64(v.Size())) + n1, err := v.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n1 + } + } + if m.XXX_unrecognized != nil { + i += copy(data[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *AllMapsOrdered) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *AllMapsOrdered) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.StringToDoubleMap) > 0 { + keysForStringToDoubleMap := make([]string, 0, len(m.StringToDoubleMap)) + for k := range m.StringToDoubleMap { + keysForStringToDoubleMap = append(keysForStringToDoubleMap, string(k)) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToDoubleMap) + for _, k := range keysForStringToDoubleMap { + data[i] = 0xa + i++ + v := m.StringToDoubleMap[string(k)] + mapSize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + 1 + 8 + i = encodeVarintMapsproto2(data, i, uint64(mapSize)) + data[i] = 0xa + i++ + i = encodeVarintMapsproto2(data, i, uint64(len(k))) + i += copy(data[i:], k) + data[i] = 0x11 + i++ + i = encodeFixed64Mapsproto2(data, i, uint64(math.Float64bits(float64(v)))) + } + } + if len(m.StringToFloatMap) > 0 { + keysForStringToFloatMap := make([]string, 0, len(m.StringToFloatMap)) + for k := range m.StringToFloatMap { + keysForStringToFloatMap = append(keysForStringToFloatMap, string(k)) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToFloatMap) + for _, k := range keysForStringToFloatMap { + data[i] = 0x12 + i++ + v := m.StringToFloatMap[string(k)] + mapSize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + 1 + 4 + i = encodeVarintMapsproto2(data, i, uint64(mapSize)) + data[i] = 0xa + i++ + i = encodeVarintMapsproto2(data, i, uint64(len(k))) + i += copy(data[i:], k) + data[i] = 0x15 + i++ + i = encodeFixed32Mapsproto2(data, i, uint32(math.Float32bits(float32(v)))) + } + } + if len(m.Int32Map) > 0 { + keysForInt32Map := make([]int32, 0, len(m.Int32Map)) + for k := range m.Int32Map { + keysForInt32Map = append(keysForInt32Map, int32(k)) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForInt32Map) + for _, k := range keysForInt32Map { + data[i] = 0x1a + i++ + v := m.Int32Map[int32(k)] + mapSize := 1 + sovMapsproto2(uint64(k)) + 1 + sovMapsproto2(uint64(v)) + i = encodeVarintMapsproto2(data, i, uint64(mapSize)) + data[i] = 0x8 + i++ + i = encodeVarintMapsproto2(data, i, uint64(k)) + data[i] = 0x10 + i++ + i = encodeVarintMapsproto2(data, i, uint64(v)) + } + } + if len(m.Int64Map) > 0 { + keysForInt64Map := make([]int64, 0, len(m.Int64Map)) + for k := range m.Int64Map { + keysForInt64Map = append(keysForInt64Map, int64(k)) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForInt64Map) + for _, k := range keysForInt64Map { + data[i] = 0x22 + i++ + v := m.Int64Map[int64(k)] + mapSize := 1 + sovMapsproto2(uint64(k)) + 1 + sovMapsproto2(uint64(v)) + i = encodeVarintMapsproto2(data, i, uint64(mapSize)) + data[i] = 0x8 + i++ + i = encodeVarintMapsproto2(data, i, uint64(k)) + data[i] = 0x10 + i++ + i = encodeVarintMapsproto2(data, i, uint64(v)) + } + } + if len(m.Uint32Map) > 0 { + keysForUint32Map := make([]uint32, 0, len(m.Uint32Map)) + for k := range m.Uint32Map { + keysForUint32Map = append(keysForUint32Map, uint32(k)) + } + github_com_gogo_protobuf_sortkeys.Uint32s(keysForUint32Map) + for _, k := range keysForUint32Map { + data[i] = 0x2a + i++ + v := m.Uint32Map[uint32(k)] + mapSize := 1 + sovMapsproto2(uint64(k)) + 1 + sovMapsproto2(uint64(v)) + i = encodeVarintMapsproto2(data, i, uint64(mapSize)) + data[i] = 0x8 + i++ + i = encodeVarintMapsproto2(data, i, uint64(k)) + data[i] = 0x10 + i++ + i = encodeVarintMapsproto2(data, i, uint64(v)) + } + } + if len(m.Uint64Map) > 0 { + keysForUint64Map := make([]uint64, 0, len(m.Uint64Map)) + for k := range m.Uint64Map { + keysForUint64Map = append(keysForUint64Map, uint64(k)) + } + github_com_gogo_protobuf_sortkeys.Uint64s(keysForUint64Map) + for _, k := range keysForUint64Map { + data[i] = 0x32 + i++ + v := m.Uint64Map[uint64(k)] + mapSize := 1 + sovMapsproto2(uint64(k)) + 1 + sovMapsproto2(uint64(v)) + i = encodeVarintMapsproto2(data, i, uint64(mapSize)) + data[i] = 0x8 + i++ + i = encodeVarintMapsproto2(data, i, uint64(k)) + data[i] = 0x10 + i++ + i = encodeVarintMapsproto2(data, i, uint64(v)) + } + } + if len(m.Sint32Map) > 0 { + keysForSint32Map := make([]int32, 0, len(m.Sint32Map)) + for k := range m.Sint32Map { + keysForSint32Map = append(keysForSint32Map, int32(k)) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForSint32Map) + for _, k := range keysForSint32Map { + data[i] = 0x3a + i++ + v := m.Sint32Map[int32(k)] + mapSize := 1 + sozMapsproto2(uint64(k)) + 1 + sozMapsproto2(uint64(v)) + i = encodeVarintMapsproto2(data, i, uint64(mapSize)) + data[i] = 0x8 + i++ + i = encodeVarintMapsproto2(data, i, uint64((uint32(k)<<1)^uint32((k>>31)))) + data[i] = 0x10 + i++ + i = encodeVarintMapsproto2(data, i, uint64((uint32(v)<<1)^uint32((v>>31)))) + } + } + if len(m.Sint64Map) > 0 { + keysForSint64Map := make([]int64, 0, len(m.Sint64Map)) + for k := range m.Sint64Map { + keysForSint64Map = append(keysForSint64Map, int64(k)) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForSint64Map) + for _, k := range keysForSint64Map { + data[i] = 0x42 + i++ + v := m.Sint64Map[int64(k)] + mapSize := 1 + sozMapsproto2(uint64(k)) + 1 + sozMapsproto2(uint64(v)) + i = encodeVarintMapsproto2(data, i, uint64(mapSize)) + data[i] = 0x8 + i++ + i = encodeVarintMapsproto2(data, i, uint64((uint64(k)<<1)^uint64((k>>63)))) + data[i] = 0x10 + i++ + i = encodeVarintMapsproto2(data, i, uint64((uint64(v)<<1)^uint64((v>>63)))) + } + } + if len(m.Fixed32Map) > 0 { + keysForFixed32Map := make([]uint32, 0, len(m.Fixed32Map)) + for k := range m.Fixed32Map { + keysForFixed32Map = append(keysForFixed32Map, uint32(k)) + } + github_com_gogo_protobuf_sortkeys.Uint32s(keysForFixed32Map) + for _, k := range keysForFixed32Map { + data[i] = 0x4a + i++ + v := m.Fixed32Map[uint32(k)] + mapSize := 1 + 4 + 1 + 4 + i = encodeVarintMapsproto2(data, i, uint64(mapSize)) + data[i] = 0xd + i++ + i = encodeFixed32Mapsproto2(data, i, uint32(k)) + data[i] = 0x15 + i++ + i = encodeFixed32Mapsproto2(data, i, uint32(v)) + } + } + if len(m.Sfixed32Map) > 0 { + keysForSfixed32Map := make([]int32, 0, len(m.Sfixed32Map)) + for k := range m.Sfixed32Map { + keysForSfixed32Map = append(keysForSfixed32Map, int32(k)) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForSfixed32Map) + for _, k := range keysForSfixed32Map { + data[i] = 0x52 + i++ + v := m.Sfixed32Map[int32(k)] + mapSize := 1 + 4 + 1 + 4 + i = encodeVarintMapsproto2(data, i, uint64(mapSize)) + data[i] = 0xd + i++ + i = encodeFixed32Mapsproto2(data, i, uint32(k)) + data[i] = 0x15 + i++ + i = encodeFixed32Mapsproto2(data, i, uint32(v)) + } + } + if len(m.Fixed64Map) > 0 { + keysForFixed64Map := make([]uint64, 0, len(m.Fixed64Map)) + for k := range m.Fixed64Map { + keysForFixed64Map = append(keysForFixed64Map, uint64(k)) + } + github_com_gogo_protobuf_sortkeys.Uint64s(keysForFixed64Map) + for _, k := range keysForFixed64Map { + data[i] = 0x5a + i++ + v := m.Fixed64Map[uint64(k)] + mapSize := 1 + 8 + 1 + 8 + i = encodeVarintMapsproto2(data, i, uint64(mapSize)) + data[i] = 0x9 + i++ + i = encodeFixed64Mapsproto2(data, i, uint64(k)) + data[i] = 0x11 + i++ + i = encodeFixed64Mapsproto2(data, i, uint64(v)) + } + } + if len(m.Sfixed64Map) > 0 { + keysForSfixed64Map := make([]int64, 0, len(m.Sfixed64Map)) + for k := range m.Sfixed64Map { + keysForSfixed64Map = append(keysForSfixed64Map, int64(k)) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForSfixed64Map) + for _, k := range keysForSfixed64Map { + data[i] = 0x62 + i++ + v := m.Sfixed64Map[int64(k)] + mapSize := 1 + 8 + 1 + 8 + i = encodeVarintMapsproto2(data, i, uint64(mapSize)) + data[i] = 0x9 + i++ + i = encodeFixed64Mapsproto2(data, i, uint64(k)) + data[i] = 0x11 + i++ + i = encodeFixed64Mapsproto2(data, i, uint64(v)) + } + } + if len(m.BoolMap) > 0 { + keysForBoolMap := make([]bool, 0, len(m.BoolMap)) + for k := range m.BoolMap { + keysForBoolMap = append(keysForBoolMap, bool(k)) + } + github_com_gogo_protobuf_sortkeys.Bools(keysForBoolMap) + for _, k := range keysForBoolMap { + data[i] = 0x6a + i++ + v := m.BoolMap[bool(k)] + mapSize := 1 + 1 + 1 + 1 + i = encodeVarintMapsproto2(data, i, uint64(mapSize)) + data[i] = 0x8 + i++ + if k { + data[i] = 1 + } else { + data[i] = 0 + } + i++ + data[i] = 0x10 + i++ + if v { + data[i] = 1 + } else { + data[i] = 0 + } + i++ + } + } + if len(m.StringMap) > 0 { + keysForStringMap := make([]string, 0, len(m.StringMap)) + for k := range m.StringMap { + keysForStringMap = append(keysForStringMap, string(k)) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringMap) + for _, k := range keysForStringMap { + data[i] = 0x72 + i++ + v := m.StringMap[string(k)] + mapSize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + 1 + len(v) + sovMapsproto2(uint64(len(v))) + i = encodeVarintMapsproto2(data, i, uint64(mapSize)) + data[i] = 0xa + i++ + i = encodeVarintMapsproto2(data, i, uint64(len(k))) + i += copy(data[i:], k) + data[i] = 0x12 + i++ + i = encodeVarintMapsproto2(data, i, uint64(len(v))) + i += copy(data[i:], v) + } + } + if len(m.StringToBytesMap) > 0 { + keysForStringToBytesMap := make([]string, 0, len(m.StringToBytesMap)) + for k := range m.StringToBytesMap { + keysForStringToBytesMap = append(keysForStringToBytesMap, string(k)) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToBytesMap) + for _, k := range keysForStringToBytesMap { + data[i] = 0x7a + i++ + v := m.StringToBytesMap[string(k)] + mapSize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + 1 + len(v) + sovMapsproto2(uint64(len(v))) + i = encodeVarintMapsproto2(data, i, uint64(mapSize)) + data[i] = 0xa + i++ + i = encodeVarintMapsproto2(data, i, uint64(len(k))) + i += copy(data[i:], k) + data[i] = 0x12 + i++ + i = encodeVarintMapsproto2(data, i, uint64(len(v))) + i += copy(data[i:], v) + } + } + if len(m.StringToEnumMap) > 0 { + keysForStringToEnumMap := make([]string, 0, len(m.StringToEnumMap)) + for k := range m.StringToEnumMap { + keysForStringToEnumMap = append(keysForStringToEnumMap, string(k)) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToEnumMap) + for _, k := range keysForStringToEnumMap { + data[i] = 0x82 + i++ + data[i] = 0x1 + i++ + v := m.StringToEnumMap[string(k)] + mapSize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + 1 + sovMapsproto2(uint64(v)) + i = encodeVarintMapsproto2(data, i, uint64(mapSize)) + data[i] = 0xa + i++ + i = encodeVarintMapsproto2(data, i, uint64(len(k))) + i += copy(data[i:], k) + data[i] = 0x10 + i++ + i = encodeVarintMapsproto2(data, i, uint64(v)) + } + } + if len(m.StringToMsgMap) > 0 { + keysForStringToMsgMap := make([]string, 0, len(m.StringToMsgMap)) + for k := range m.StringToMsgMap { + keysForStringToMsgMap = append(keysForStringToMsgMap, string(k)) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToMsgMap) + for _, k := range keysForStringToMsgMap { + data[i] = 0x8a + i++ + data[i] = 0x1 + i++ + v := m.StringToMsgMap[string(k)] + if v == nil { + return 0, errors.New("proto: map has nil element") + } + msgSize := v.Size() + mapSize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + 1 + msgSize + sovMapsproto2(uint64(msgSize)) + i = encodeVarintMapsproto2(data, i, uint64(mapSize)) + data[i] = 0xa + i++ + i = encodeVarintMapsproto2(data, i, uint64(len(k))) + i += copy(data[i:], k) + data[i] = 0x12 + i++ + i = encodeVarintMapsproto2(data, i, uint64(v.Size())) + n2, err := v.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n2 + } + } + if m.XXX_unrecognized != nil { + i += copy(data[i:], m.XXX_unrecognized) + } + return i, nil +} + +func encodeFixed64Mapsproto2(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 encodeFixed32Mapsproto2(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 encodeVarintMapsproto2(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 NewPopulatedFloatingPoint(r randyMapsproto2, easy bool) *FloatingPoint { + this := &FloatingPoint{} + if r.Intn(10) != 0 { + v1 := float64(r.Float64()) + if r.Intn(2) == 0 { + v1 *= -1 + } + this.F = &v1 + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedMapsproto2(r, 2) + } + return this +} + +func NewPopulatedAllMaps(r randyMapsproto2, easy bool) *AllMaps { + this := &AllMaps{} + if r.Intn(10) != 0 { + v2 := r.Intn(10) + this.StringToDoubleMap = make(map[string]float64) + for i := 0; i < v2; i++ { + v3 := randStringMapsproto2(r) + this.StringToDoubleMap[v3] = float64(r.Float64()) + if r.Intn(2) == 0 { + this.StringToDoubleMap[v3] *= -1 + } + } + } + if r.Intn(10) != 0 { + v4 := r.Intn(10) + this.StringToFloatMap = make(map[string]float32) + for i := 0; i < v4; i++ { + v5 := randStringMapsproto2(r) + this.StringToFloatMap[v5] = float32(r.Float32()) + if r.Intn(2) == 0 { + this.StringToFloatMap[v5] *= -1 + } + } + } + if r.Intn(10) != 0 { + v6 := r.Intn(10) + this.Int32Map = make(map[int32]int32) + for i := 0; i < v6; i++ { + v7 := int32(r.Int31()) + this.Int32Map[v7] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Int32Map[v7] *= -1 + } + } + } + if r.Intn(10) != 0 { + v8 := r.Intn(10) + this.Int64Map = make(map[int64]int64) + for i := 0; i < v8; i++ { + v9 := int64(r.Int63()) + this.Int64Map[v9] = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Int64Map[v9] *= -1 + } + } + } + if r.Intn(10) != 0 { + v10 := r.Intn(10) + this.Uint32Map = make(map[uint32]uint32) + for i := 0; i < v10; i++ { + v11 := uint32(r.Uint32()) + this.Uint32Map[v11] = uint32(r.Uint32()) + } + } + if r.Intn(10) != 0 { + v12 := r.Intn(10) + this.Uint64Map = make(map[uint64]uint64) + for i := 0; i < v12; i++ { + v13 := uint64(uint64(r.Uint32())) + this.Uint64Map[v13] = uint64(uint64(r.Uint32())) + } + } + if r.Intn(10) != 0 { + v14 := r.Intn(10) + this.Sint32Map = make(map[int32]int32) + for i := 0; i < v14; i++ { + v15 := int32(r.Int31()) + this.Sint32Map[v15] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Sint32Map[v15] *= -1 + } + } + } + if r.Intn(10) != 0 { + v16 := r.Intn(10) + this.Sint64Map = make(map[int64]int64) + for i := 0; i < v16; i++ { + v17 := int64(r.Int63()) + this.Sint64Map[v17] = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Sint64Map[v17] *= -1 + } + } + } + if r.Intn(10) != 0 { + v18 := r.Intn(10) + this.Fixed32Map = make(map[uint32]uint32) + for i := 0; i < v18; i++ { + v19 := uint32(r.Uint32()) + this.Fixed32Map[v19] = uint32(r.Uint32()) + } + } + if r.Intn(10) != 0 { + v20 := r.Intn(10) + this.Sfixed32Map = make(map[int32]int32) + for i := 0; i < v20; i++ { + v21 := int32(r.Int31()) + this.Sfixed32Map[v21] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Sfixed32Map[v21] *= -1 + } + } + } + if r.Intn(10) != 0 { + v22 := r.Intn(10) + this.Fixed64Map = make(map[uint64]uint64) + for i := 0; i < v22; i++ { + v23 := uint64(uint64(r.Uint32())) + this.Fixed64Map[v23] = uint64(uint64(r.Uint32())) + } + } + if r.Intn(10) != 0 { + v24 := r.Intn(10) + this.Sfixed64Map = make(map[int64]int64) + for i := 0; i < v24; i++ { + v25 := int64(r.Int63()) + this.Sfixed64Map[v25] = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Sfixed64Map[v25] *= -1 + } + } + } + if r.Intn(10) != 0 { + v26 := r.Intn(10) + this.BoolMap = make(map[bool]bool) + for i := 0; i < v26; i++ { + v27 := bool(bool(r.Intn(2) == 0)) + this.BoolMap[v27] = bool(bool(r.Intn(2) == 0)) + } + } + if r.Intn(10) != 0 { + v28 := r.Intn(10) + this.StringMap = make(map[string]string) + for i := 0; i < v28; i++ { + this.StringMap[randStringMapsproto2(r)] = randStringMapsproto2(r) + } + } + if r.Intn(10) != 0 { + v29 := r.Intn(10) + this.StringToBytesMap = make(map[string][]byte) + for i := 0; i < v29; i++ { + v30 := r.Intn(100) + v31 := randStringMapsproto2(r) + this.StringToBytesMap[v31] = make([]byte, v30) + for i := 0; i < v30; i++ { + this.StringToBytesMap[v31][i] = byte(r.Intn(256)) + } + } + } + if r.Intn(10) != 0 { + v32 := r.Intn(10) + this.StringToEnumMap = make(map[string]MapEnum) + for i := 0; i < v32; i++ { + this.StringToEnumMap[randStringMapsproto2(r)] = MapEnum([]int32{0, 1, 2}[r.Intn(3)]) + } + } + if r.Intn(10) != 0 { + v33 := r.Intn(10) + this.StringToMsgMap = make(map[string]*FloatingPoint) + for i := 0; i < v33; i++ { + this.StringToMsgMap[randStringMapsproto2(r)] = NewPopulatedFloatingPoint(r, easy) + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedMapsproto2(r, 18) + } + return this +} + +func NewPopulatedAllMapsOrdered(r randyMapsproto2, easy bool) *AllMapsOrdered { + this := &AllMapsOrdered{} + if r.Intn(10) != 0 { + v34 := r.Intn(10) + this.StringToDoubleMap = make(map[string]float64) + for i := 0; i < v34; i++ { + v35 := randStringMapsproto2(r) + this.StringToDoubleMap[v35] = float64(r.Float64()) + if r.Intn(2) == 0 { + this.StringToDoubleMap[v35] *= -1 + } + } + } + if r.Intn(10) != 0 { + v36 := r.Intn(10) + this.StringToFloatMap = make(map[string]float32) + for i := 0; i < v36; i++ { + v37 := randStringMapsproto2(r) + this.StringToFloatMap[v37] = float32(r.Float32()) + if r.Intn(2) == 0 { + this.StringToFloatMap[v37] *= -1 + } + } + } + if r.Intn(10) != 0 { + v38 := r.Intn(10) + this.Int32Map = make(map[int32]int32) + for i := 0; i < v38; i++ { + v39 := int32(r.Int31()) + this.Int32Map[v39] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Int32Map[v39] *= -1 + } + } + } + if r.Intn(10) != 0 { + v40 := r.Intn(10) + this.Int64Map = make(map[int64]int64) + for i := 0; i < v40; i++ { + v41 := int64(r.Int63()) + this.Int64Map[v41] = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Int64Map[v41] *= -1 + } + } + } + if r.Intn(10) != 0 { + v42 := r.Intn(10) + this.Uint32Map = make(map[uint32]uint32) + for i := 0; i < v42; i++ { + v43 := uint32(r.Uint32()) + this.Uint32Map[v43] = uint32(r.Uint32()) + } + } + if r.Intn(10) != 0 { + v44 := r.Intn(10) + this.Uint64Map = make(map[uint64]uint64) + for i := 0; i < v44; i++ { + v45 := uint64(uint64(r.Uint32())) + this.Uint64Map[v45] = uint64(uint64(r.Uint32())) + } + } + if r.Intn(10) != 0 { + v46 := r.Intn(10) + this.Sint32Map = make(map[int32]int32) + for i := 0; i < v46; i++ { + v47 := int32(r.Int31()) + this.Sint32Map[v47] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Sint32Map[v47] *= -1 + } + } + } + if r.Intn(10) != 0 { + v48 := r.Intn(10) + this.Sint64Map = make(map[int64]int64) + for i := 0; i < v48; i++ { + v49 := int64(r.Int63()) + this.Sint64Map[v49] = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Sint64Map[v49] *= -1 + } + } + } + if r.Intn(10) != 0 { + v50 := r.Intn(10) + this.Fixed32Map = make(map[uint32]uint32) + for i := 0; i < v50; i++ { + v51 := uint32(r.Uint32()) + this.Fixed32Map[v51] = uint32(r.Uint32()) + } + } + if r.Intn(10) != 0 { + v52 := r.Intn(10) + this.Sfixed32Map = make(map[int32]int32) + for i := 0; i < v52; i++ { + v53 := int32(r.Int31()) + this.Sfixed32Map[v53] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Sfixed32Map[v53] *= -1 + } + } + } + if r.Intn(10) != 0 { + v54 := r.Intn(10) + this.Fixed64Map = make(map[uint64]uint64) + for i := 0; i < v54; i++ { + v55 := uint64(uint64(r.Uint32())) + this.Fixed64Map[v55] = uint64(uint64(r.Uint32())) + } + } + if r.Intn(10) != 0 { + v56 := r.Intn(10) + this.Sfixed64Map = make(map[int64]int64) + for i := 0; i < v56; i++ { + v57 := int64(r.Int63()) + this.Sfixed64Map[v57] = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Sfixed64Map[v57] *= -1 + } + } + } + if r.Intn(10) != 0 { + v58 := r.Intn(10) + this.BoolMap = make(map[bool]bool) + for i := 0; i < v58; i++ { + v59 := bool(bool(r.Intn(2) == 0)) + this.BoolMap[v59] = bool(bool(r.Intn(2) == 0)) + } + } + if r.Intn(10) != 0 { + v60 := r.Intn(10) + this.StringMap = make(map[string]string) + for i := 0; i < v60; i++ { + this.StringMap[randStringMapsproto2(r)] = randStringMapsproto2(r) + } + } + if r.Intn(10) != 0 { + v61 := r.Intn(10) + this.StringToBytesMap = make(map[string][]byte) + for i := 0; i < v61; i++ { + v62 := r.Intn(100) + v63 := randStringMapsproto2(r) + this.StringToBytesMap[v63] = make([]byte, v62) + for i := 0; i < v62; i++ { + this.StringToBytesMap[v63][i] = byte(r.Intn(256)) + } + } + } + if r.Intn(10) != 0 { + v64 := r.Intn(10) + this.StringToEnumMap = make(map[string]MapEnum) + for i := 0; i < v64; i++ { + this.StringToEnumMap[randStringMapsproto2(r)] = MapEnum([]int32{0, 1, 2}[r.Intn(3)]) + } + } + if r.Intn(10) != 0 { + v65 := r.Intn(10) + this.StringToMsgMap = make(map[string]*FloatingPoint) + for i := 0; i < v65; i++ { + this.StringToMsgMap[randStringMapsproto2(r)] = NewPopulatedFloatingPoint(r, easy) + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedMapsproto2(r, 18) + } + return this +} + +type randyMapsproto2 interface { + Float32() float32 + Float64() float64 + Int63() int64 + Int31() int32 + Uint32() uint32 + Intn(n int) int +} + +func randUTF8RuneMapsproto2(r randyMapsproto2) 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 randStringMapsproto2(r randyMapsproto2) string { + v66 := r.Intn(100) + tmps := make([]rune, v66) + for i := 0; i < v66; i++ { + tmps[i] = randUTF8RuneMapsproto2(r) + } + return string(tmps) +} +func randUnrecognizedMapsproto2(r randyMapsproto2, 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 = randFieldMapsproto2(data, r, fieldNumber, wire) + } + return data +} +func randFieldMapsproto2(data []byte, r randyMapsproto2, fieldNumber int, wire int) []byte { + key := uint32(fieldNumber)<<3 | uint32(wire) + switch wire { + case 0: + data = encodeVarintPopulateMapsproto2(data, uint64(key)) + v67 := r.Int63() + if r.Intn(2) == 0 { + v67 *= -1 + } + data = encodeVarintPopulateMapsproto2(data, uint64(v67)) + case 1: + data = encodeVarintPopulateMapsproto2(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 = encodeVarintPopulateMapsproto2(data, uint64(key)) + ll := r.Intn(100) + data = encodeVarintPopulateMapsproto2(data, uint64(ll)) + for j := 0; j < ll; j++ { + data = append(data, byte(r.Intn(256))) + } + default: + data = encodeVarintPopulateMapsproto2(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 encodeVarintPopulateMapsproto2(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 *FloatingPoint) Size() (n int) { + var l int + _ = l + if m.F != nil { + n += 9 + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *AllMaps) Size() (n int) { + var l int + _ = l + if len(m.StringToDoubleMap) > 0 { + for k, v := range m.StringToDoubleMap { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + 1 + 8 + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.StringToFloatMap) > 0 { + for k, v := range m.StringToFloatMap { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + 1 + 4 + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.Int32Map) > 0 { + for k, v := range m.Int32Map { + _ = k + _ = v + mapEntrySize := 1 + sovMapsproto2(uint64(k)) + 1 + sovMapsproto2(uint64(v)) + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.Int64Map) > 0 { + for k, v := range m.Int64Map { + _ = k + _ = v + mapEntrySize := 1 + sovMapsproto2(uint64(k)) + 1 + sovMapsproto2(uint64(v)) + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.Uint32Map) > 0 { + for k, v := range m.Uint32Map { + _ = k + _ = v + mapEntrySize := 1 + sovMapsproto2(uint64(k)) + 1 + sovMapsproto2(uint64(v)) + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.Uint64Map) > 0 { + for k, v := range m.Uint64Map { + _ = k + _ = v + mapEntrySize := 1 + sovMapsproto2(uint64(k)) + 1 + sovMapsproto2(uint64(v)) + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.Sint32Map) > 0 { + for k, v := range m.Sint32Map { + _ = k + _ = v + mapEntrySize := 1 + sozMapsproto2(uint64(k)) + 1 + sozMapsproto2(uint64(v)) + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.Sint64Map) > 0 { + for k, v := range m.Sint64Map { + _ = k + _ = v + mapEntrySize := 1 + sozMapsproto2(uint64(k)) + 1 + sozMapsproto2(uint64(v)) + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.Fixed32Map) > 0 { + for k, v := range m.Fixed32Map { + _ = k + _ = v + mapEntrySize := 1 + 4 + 1 + 4 + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.Sfixed32Map) > 0 { + for k, v := range m.Sfixed32Map { + _ = k + _ = v + mapEntrySize := 1 + 4 + 1 + 4 + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.Fixed64Map) > 0 { + for k, v := range m.Fixed64Map { + _ = k + _ = v + mapEntrySize := 1 + 8 + 1 + 8 + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.Sfixed64Map) > 0 { + for k, v := range m.Sfixed64Map { + _ = k + _ = v + mapEntrySize := 1 + 8 + 1 + 8 + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.BoolMap) > 0 { + for k, v := range m.BoolMap { + _ = k + _ = v + mapEntrySize := 1 + 1 + 1 + 1 + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.StringMap) > 0 { + for k, v := range m.StringMap { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + 1 + len(v) + sovMapsproto2(uint64(len(v))) + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.StringToBytesMap) > 0 { + for k, v := range m.StringToBytesMap { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + 1 + len(v) + sovMapsproto2(uint64(len(v))) + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.StringToEnumMap) > 0 { + for k, v := range m.StringToEnumMap { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + 1 + sovMapsproto2(uint64(v)) + n += mapEntrySize + 2 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.StringToMsgMap) > 0 { + for k, v := range m.StringToMsgMap { + _ = k + _ = v + l = 0 + if v != nil { + l = v.Size() + } + mapEntrySize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + 1 + l + sovMapsproto2(uint64(l)) + n += mapEntrySize + 2 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *AllMapsOrdered) Size() (n int) { + var l int + _ = l + if len(m.StringToDoubleMap) > 0 { + for k, v := range m.StringToDoubleMap { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + 1 + 8 + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.StringToFloatMap) > 0 { + for k, v := range m.StringToFloatMap { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + 1 + 4 + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.Int32Map) > 0 { + for k, v := range m.Int32Map { + _ = k + _ = v + mapEntrySize := 1 + sovMapsproto2(uint64(k)) + 1 + sovMapsproto2(uint64(v)) + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.Int64Map) > 0 { + for k, v := range m.Int64Map { + _ = k + _ = v + mapEntrySize := 1 + sovMapsproto2(uint64(k)) + 1 + sovMapsproto2(uint64(v)) + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.Uint32Map) > 0 { + for k, v := range m.Uint32Map { + _ = k + _ = v + mapEntrySize := 1 + sovMapsproto2(uint64(k)) + 1 + sovMapsproto2(uint64(v)) + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.Uint64Map) > 0 { + for k, v := range m.Uint64Map { + _ = k + _ = v + mapEntrySize := 1 + sovMapsproto2(uint64(k)) + 1 + sovMapsproto2(uint64(v)) + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.Sint32Map) > 0 { + for k, v := range m.Sint32Map { + _ = k + _ = v + mapEntrySize := 1 + sozMapsproto2(uint64(k)) + 1 + sozMapsproto2(uint64(v)) + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.Sint64Map) > 0 { + for k, v := range m.Sint64Map { + _ = k + _ = v + mapEntrySize := 1 + sozMapsproto2(uint64(k)) + 1 + sozMapsproto2(uint64(v)) + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.Fixed32Map) > 0 { + for k, v := range m.Fixed32Map { + _ = k + _ = v + mapEntrySize := 1 + 4 + 1 + 4 + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.Sfixed32Map) > 0 { + for k, v := range m.Sfixed32Map { + _ = k + _ = v + mapEntrySize := 1 + 4 + 1 + 4 + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.Fixed64Map) > 0 { + for k, v := range m.Fixed64Map { + _ = k + _ = v + mapEntrySize := 1 + 8 + 1 + 8 + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.Sfixed64Map) > 0 { + for k, v := range m.Sfixed64Map { + _ = k + _ = v + mapEntrySize := 1 + 8 + 1 + 8 + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.BoolMap) > 0 { + for k, v := range m.BoolMap { + _ = k + _ = v + mapEntrySize := 1 + 1 + 1 + 1 + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.StringMap) > 0 { + for k, v := range m.StringMap { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + 1 + len(v) + sovMapsproto2(uint64(len(v))) + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.StringToBytesMap) > 0 { + for k, v := range m.StringToBytesMap { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + 1 + len(v) + sovMapsproto2(uint64(len(v))) + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.StringToEnumMap) > 0 { + for k, v := range m.StringToEnumMap { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + 1 + sovMapsproto2(uint64(v)) + n += mapEntrySize + 2 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.StringToMsgMap) > 0 { + for k, v := range m.StringToMsgMap { + _ = k + _ = v + l = 0 + if v != nil { + l = v.Size() + } + mapEntrySize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + 1 + l + sovMapsproto2(uint64(l)) + n += mapEntrySize + 2 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func sovMapsproto2(x uint64) (n int) { + for { + n++ + x >>= 7 + if x == 0 { + break + } + } + return n +} +func sozMapsproto2(x uint64) (n int) { + return sovMapsproto2(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (this *FloatingPoint) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&FloatingPoint{`, + `F:` + valueToStringMapsproto2(this.F) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *AllMaps) String() string { + if this == nil { + return "nil" + } + keysForStringToDoubleMap := make([]string, 0, len(this.StringToDoubleMap)) + for k := range this.StringToDoubleMap { + keysForStringToDoubleMap = append(keysForStringToDoubleMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToDoubleMap) + mapStringForStringToDoubleMap := "map[string]float64{" + for _, k := range keysForStringToDoubleMap { + mapStringForStringToDoubleMap += fmt.Sprintf("%v: %v,", k, this.StringToDoubleMap[k]) + } + mapStringForStringToDoubleMap += "}" + keysForStringToFloatMap := make([]string, 0, len(this.StringToFloatMap)) + for k := range this.StringToFloatMap { + keysForStringToFloatMap = append(keysForStringToFloatMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToFloatMap) + mapStringForStringToFloatMap := "map[string]float32{" + for _, k := range keysForStringToFloatMap { + mapStringForStringToFloatMap += fmt.Sprintf("%v: %v,", k, this.StringToFloatMap[k]) + } + mapStringForStringToFloatMap += "}" + keysForInt32Map := make([]int32, 0, len(this.Int32Map)) + for k := range this.Int32Map { + keysForInt32Map = append(keysForInt32Map, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForInt32Map) + mapStringForInt32Map := "map[int32]int32{" + for _, k := range keysForInt32Map { + mapStringForInt32Map += fmt.Sprintf("%v: %v,", k, this.Int32Map[k]) + } + mapStringForInt32Map += "}" + keysForInt64Map := make([]int64, 0, len(this.Int64Map)) + for k := range this.Int64Map { + keysForInt64Map = append(keysForInt64Map, k) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForInt64Map) + mapStringForInt64Map := "map[int64]int64{" + for _, k := range keysForInt64Map { + mapStringForInt64Map += fmt.Sprintf("%v: %v,", k, this.Int64Map[k]) + } + mapStringForInt64Map += "}" + keysForUint32Map := make([]uint32, 0, len(this.Uint32Map)) + for k := range this.Uint32Map { + keysForUint32Map = append(keysForUint32Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint32s(keysForUint32Map) + mapStringForUint32Map := "map[uint32]uint32{" + for _, k := range keysForUint32Map { + mapStringForUint32Map += fmt.Sprintf("%v: %v,", k, this.Uint32Map[k]) + } + mapStringForUint32Map += "}" + keysForUint64Map := make([]uint64, 0, len(this.Uint64Map)) + for k := range this.Uint64Map { + keysForUint64Map = append(keysForUint64Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint64s(keysForUint64Map) + mapStringForUint64Map := "map[uint64]uint64{" + for _, k := range keysForUint64Map { + mapStringForUint64Map += fmt.Sprintf("%v: %v,", k, this.Uint64Map[k]) + } + mapStringForUint64Map += "}" + keysForSint32Map := make([]int32, 0, len(this.Sint32Map)) + for k := range this.Sint32Map { + keysForSint32Map = append(keysForSint32Map, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForSint32Map) + mapStringForSint32Map := "map[int32]int32{" + for _, k := range keysForSint32Map { + mapStringForSint32Map += fmt.Sprintf("%v: %v,", k, this.Sint32Map[k]) + } + mapStringForSint32Map += "}" + keysForSint64Map := make([]int64, 0, len(this.Sint64Map)) + for k := range this.Sint64Map { + keysForSint64Map = append(keysForSint64Map, k) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForSint64Map) + mapStringForSint64Map := "map[int64]int64{" + for _, k := range keysForSint64Map { + mapStringForSint64Map += fmt.Sprintf("%v: %v,", k, this.Sint64Map[k]) + } + mapStringForSint64Map += "}" + keysForFixed32Map := make([]uint32, 0, len(this.Fixed32Map)) + for k := range this.Fixed32Map { + keysForFixed32Map = append(keysForFixed32Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint32s(keysForFixed32Map) + mapStringForFixed32Map := "map[uint32]uint32{" + for _, k := range keysForFixed32Map { + mapStringForFixed32Map += fmt.Sprintf("%v: %v,", k, this.Fixed32Map[k]) + } + mapStringForFixed32Map += "}" + keysForSfixed32Map := make([]int32, 0, len(this.Sfixed32Map)) + for k := range this.Sfixed32Map { + keysForSfixed32Map = append(keysForSfixed32Map, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForSfixed32Map) + mapStringForSfixed32Map := "map[int32]int32{" + for _, k := range keysForSfixed32Map { + mapStringForSfixed32Map += fmt.Sprintf("%v: %v,", k, this.Sfixed32Map[k]) + } + mapStringForSfixed32Map += "}" + keysForFixed64Map := make([]uint64, 0, len(this.Fixed64Map)) + for k := range this.Fixed64Map { + keysForFixed64Map = append(keysForFixed64Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint64s(keysForFixed64Map) + mapStringForFixed64Map := "map[uint64]uint64{" + for _, k := range keysForFixed64Map { + mapStringForFixed64Map += fmt.Sprintf("%v: %v,", k, this.Fixed64Map[k]) + } + mapStringForFixed64Map += "}" + keysForSfixed64Map := make([]int64, 0, len(this.Sfixed64Map)) + for k := range this.Sfixed64Map { + keysForSfixed64Map = append(keysForSfixed64Map, k) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForSfixed64Map) + mapStringForSfixed64Map := "map[int64]int64{" + for _, k := range keysForSfixed64Map { + mapStringForSfixed64Map += fmt.Sprintf("%v: %v,", k, this.Sfixed64Map[k]) + } + mapStringForSfixed64Map += "}" + keysForBoolMap := make([]bool, 0, len(this.BoolMap)) + for k := range this.BoolMap { + keysForBoolMap = append(keysForBoolMap, k) + } + github_com_gogo_protobuf_sortkeys.Bools(keysForBoolMap) + mapStringForBoolMap := "map[bool]bool{" + for _, k := range keysForBoolMap { + mapStringForBoolMap += fmt.Sprintf("%v: %v,", k, this.BoolMap[k]) + } + mapStringForBoolMap += "}" + keysForStringMap := make([]string, 0, len(this.StringMap)) + for k := range this.StringMap { + keysForStringMap = append(keysForStringMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringMap) + mapStringForStringMap := "map[string]string{" + for _, k := range keysForStringMap { + mapStringForStringMap += fmt.Sprintf("%v: %v,", k, this.StringMap[k]) + } + mapStringForStringMap += "}" + keysForStringToBytesMap := make([]string, 0, len(this.StringToBytesMap)) + for k := range this.StringToBytesMap { + keysForStringToBytesMap = append(keysForStringToBytesMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToBytesMap) + mapStringForStringToBytesMap := "map[string][]byte{" + for _, k := range keysForStringToBytesMap { + mapStringForStringToBytesMap += fmt.Sprintf("%v: %v,", k, this.StringToBytesMap[k]) + } + mapStringForStringToBytesMap += "}" + keysForStringToEnumMap := make([]string, 0, len(this.StringToEnumMap)) + for k := range this.StringToEnumMap { + keysForStringToEnumMap = append(keysForStringToEnumMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToEnumMap) + mapStringForStringToEnumMap := "map[string]MapEnum{" + for _, k := range keysForStringToEnumMap { + mapStringForStringToEnumMap += fmt.Sprintf("%v: %v,", k, this.StringToEnumMap[k]) + } + mapStringForStringToEnumMap += "}" + keysForStringToMsgMap := make([]string, 0, len(this.StringToMsgMap)) + for k := range this.StringToMsgMap { + keysForStringToMsgMap = append(keysForStringToMsgMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToMsgMap) + mapStringForStringToMsgMap := "map[string]*FloatingPoint{" + for _, k := range keysForStringToMsgMap { + mapStringForStringToMsgMap += fmt.Sprintf("%v: %v,", k, this.StringToMsgMap[k]) + } + mapStringForStringToMsgMap += "}" + s := strings.Join([]string{`&AllMaps{`, + `StringToDoubleMap:` + mapStringForStringToDoubleMap + `,`, + `StringToFloatMap:` + mapStringForStringToFloatMap + `,`, + `Int32Map:` + mapStringForInt32Map + `,`, + `Int64Map:` + mapStringForInt64Map + `,`, + `Uint32Map:` + mapStringForUint32Map + `,`, + `Uint64Map:` + mapStringForUint64Map + `,`, + `Sint32Map:` + mapStringForSint32Map + `,`, + `Sint64Map:` + mapStringForSint64Map + `,`, + `Fixed32Map:` + mapStringForFixed32Map + `,`, + `Sfixed32Map:` + mapStringForSfixed32Map + `,`, + `Fixed64Map:` + mapStringForFixed64Map + `,`, + `Sfixed64Map:` + mapStringForSfixed64Map + `,`, + `BoolMap:` + mapStringForBoolMap + `,`, + `StringMap:` + mapStringForStringMap + `,`, + `StringToBytesMap:` + mapStringForStringToBytesMap + `,`, + `StringToEnumMap:` + mapStringForStringToEnumMap + `,`, + `StringToMsgMap:` + mapStringForStringToMsgMap + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *AllMapsOrdered) String() string { + if this == nil { + return "nil" + } + keysForStringToDoubleMap := make([]string, 0, len(this.StringToDoubleMap)) + for k := range this.StringToDoubleMap { + keysForStringToDoubleMap = append(keysForStringToDoubleMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToDoubleMap) + mapStringForStringToDoubleMap := "map[string]float64{" + for _, k := range keysForStringToDoubleMap { + mapStringForStringToDoubleMap += fmt.Sprintf("%v: %v,", k, this.StringToDoubleMap[k]) + } + mapStringForStringToDoubleMap += "}" + keysForStringToFloatMap := make([]string, 0, len(this.StringToFloatMap)) + for k := range this.StringToFloatMap { + keysForStringToFloatMap = append(keysForStringToFloatMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToFloatMap) + mapStringForStringToFloatMap := "map[string]float32{" + for _, k := range keysForStringToFloatMap { + mapStringForStringToFloatMap += fmt.Sprintf("%v: %v,", k, this.StringToFloatMap[k]) + } + mapStringForStringToFloatMap += "}" + keysForInt32Map := make([]int32, 0, len(this.Int32Map)) + for k := range this.Int32Map { + keysForInt32Map = append(keysForInt32Map, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForInt32Map) + mapStringForInt32Map := "map[int32]int32{" + for _, k := range keysForInt32Map { + mapStringForInt32Map += fmt.Sprintf("%v: %v,", k, this.Int32Map[k]) + } + mapStringForInt32Map += "}" + keysForInt64Map := make([]int64, 0, len(this.Int64Map)) + for k := range this.Int64Map { + keysForInt64Map = append(keysForInt64Map, k) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForInt64Map) + mapStringForInt64Map := "map[int64]int64{" + for _, k := range keysForInt64Map { + mapStringForInt64Map += fmt.Sprintf("%v: %v,", k, this.Int64Map[k]) + } + mapStringForInt64Map += "}" + keysForUint32Map := make([]uint32, 0, len(this.Uint32Map)) + for k := range this.Uint32Map { + keysForUint32Map = append(keysForUint32Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint32s(keysForUint32Map) + mapStringForUint32Map := "map[uint32]uint32{" + for _, k := range keysForUint32Map { + mapStringForUint32Map += fmt.Sprintf("%v: %v,", k, this.Uint32Map[k]) + } + mapStringForUint32Map += "}" + keysForUint64Map := make([]uint64, 0, len(this.Uint64Map)) + for k := range this.Uint64Map { + keysForUint64Map = append(keysForUint64Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint64s(keysForUint64Map) + mapStringForUint64Map := "map[uint64]uint64{" + for _, k := range keysForUint64Map { + mapStringForUint64Map += fmt.Sprintf("%v: %v,", k, this.Uint64Map[k]) + } + mapStringForUint64Map += "}" + keysForSint32Map := make([]int32, 0, len(this.Sint32Map)) + for k := range this.Sint32Map { + keysForSint32Map = append(keysForSint32Map, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForSint32Map) + mapStringForSint32Map := "map[int32]int32{" + for _, k := range keysForSint32Map { + mapStringForSint32Map += fmt.Sprintf("%v: %v,", k, this.Sint32Map[k]) + } + mapStringForSint32Map += "}" + keysForSint64Map := make([]int64, 0, len(this.Sint64Map)) + for k := range this.Sint64Map { + keysForSint64Map = append(keysForSint64Map, k) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForSint64Map) + mapStringForSint64Map := "map[int64]int64{" + for _, k := range keysForSint64Map { + mapStringForSint64Map += fmt.Sprintf("%v: %v,", k, this.Sint64Map[k]) + } + mapStringForSint64Map += "}" + keysForFixed32Map := make([]uint32, 0, len(this.Fixed32Map)) + for k := range this.Fixed32Map { + keysForFixed32Map = append(keysForFixed32Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint32s(keysForFixed32Map) + mapStringForFixed32Map := "map[uint32]uint32{" + for _, k := range keysForFixed32Map { + mapStringForFixed32Map += fmt.Sprintf("%v: %v,", k, this.Fixed32Map[k]) + } + mapStringForFixed32Map += "}" + keysForSfixed32Map := make([]int32, 0, len(this.Sfixed32Map)) + for k := range this.Sfixed32Map { + keysForSfixed32Map = append(keysForSfixed32Map, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForSfixed32Map) + mapStringForSfixed32Map := "map[int32]int32{" + for _, k := range keysForSfixed32Map { + mapStringForSfixed32Map += fmt.Sprintf("%v: %v,", k, this.Sfixed32Map[k]) + } + mapStringForSfixed32Map += "}" + keysForFixed64Map := make([]uint64, 0, len(this.Fixed64Map)) + for k := range this.Fixed64Map { + keysForFixed64Map = append(keysForFixed64Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint64s(keysForFixed64Map) + mapStringForFixed64Map := "map[uint64]uint64{" + for _, k := range keysForFixed64Map { + mapStringForFixed64Map += fmt.Sprintf("%v: %v,", k, this.Fixed64Map[k]) + } + mapStringForFixed64Map += "}" + keysForSfixed64Map := make([]int64, 0, len(this.Sfixed64Map)) + for k := range this.Sfixed64Map { + keysForSfixed64Map = append(keysForSfixed64Map, k) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForSfixed64Map) + mapStringForSfixed64Map := "map[int64]int64{" + for _, k := range keysForSfixed64Map { + mapStringForSfixed64Map += fmt.Sprintf("%v: %v,", k, this.Sfixed64Map[k]) + } + mapStringForSfixed64Map += "}" + keysForBoolMap := make([]bool, 0, len(this.BoolMap)) + for k := range this.BoolMap { + keysForBoolMap = append(keysForBoolMap, k) + } + github_com_gogo_protobuf_sortkeys.Bools(keysForBoolMap) + mapStringForBoolMap := "map[bool]bool{" + for _, k := range keysForBoolMap { + mapStringForBoolMap += fmt.Sprintf("%v: %v,", k, this.BoolMap[k]) + } + mapStringForBoolMap += "}" + keysForStringMap := make([]string, 0, len(this.StringMap)) + for k := range this.StringMap { + keysForStringMap = append(keysForStringMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringMap) + mapStringForStringMap := "map[string]string{" + for _, k := range keysForStringMap { + mapStringForStringMap += fmt.Sprintf("%v: %v,", k, this.StringMap[k]) + } + mapStringForStringMap += "}" + keysForStringToBytesMap := make([]string, 0, len(this.StringToBytesMap)) + for k := range this.StringToBytesMap { + keysForStringToBytesMap = append(keysForStringToBytesMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToBytesMap) + mapStringForStringToBytesMap := "map[string][]byte{" + for _, k := range keysForStringToBytesMap { + mapStringForStringToBytesMap += fmt.Sprintf("%v: %v,", k, this.StringToBytesMap[k]) + } + mapStringForStringToBytesMap += "}" + keysForStringToEnumMap := make([]string, 0, len(this.StringToEnumMap)) + for k := range this.StringToEnumMap { + keysForStringToEnumMap = append(keysForStringToEnumMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToEnumMap) + mapStringForStringToEnumMap := "map[string]MapEnum{" + for _, k := range keysForStringToEnumMap { + mapStringForStringToEnumMap += fmt.Sprintf("%v: %v,", k, this.StringToEnumMap[k]) + } + mapStringForStringToEnumMap += "}" + keysForStringToMsgMap := make([]string, 0, len(this.StringToMsgMap)) + for k := range this.StringToMsgMap { + keysForStringToMsgMap = append(keysForStringToMsgMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToMsgMap) + mapStringForStringToMsgMap := "map[string]*FloatingPoint{" + for _, k := range keysForStringToMsgMap { + mapStringForStringToMsgMap += fmt.Sprintf("%v: %v,", k, this.StringToMsgMap[k]) + } + mapStringForStringToMsgMap += "}" + s := strings.Join([]string{`&AllMapsOrdered{`, + `StringToDoubleMap:` + mapStringForStringToDoubleMap + `,`, + `StringToFloatMap:` + mapStringForStringToFloatMap + `,`, + `Int32Map:` + mapStringForInt32Map + `,`, + `Int64Map:` + mapStringForInt64Map + `,`, + `Uint32Map:` + mapStringForUint32Map + `,`, + `Uint64Map:` + mapStringForUint64Map + `,`, + `Sint32Map:` + mapStringForSint32Map + `,`, + `Sint64Map:` + mapStringForSint64Map + `,`, + `Fixed32Map:` + mapStringForFixed32Map + `,`, + `Sfixed32Map:` + mapStringForSfixed32Map + `,`, + `Fixed64Map:` + mapStringForFixed64Map + `,`, + `Sfixed64Map:` + mapStringForSfixed64Map + `,`, + `BoolMap:` + mapStringForBoolMap + `,`, + `StringMap:` + mapStringForStringMap + `,`, + `StringToBytesMap:` + mapStringForStringToBytesMap + `,`, + `StringToEnumMap:` + mapStringForStringToEnumMap + `,`, + `StringToMsgMap:` + mapStringForStringToMsgMap + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func valueToStringMapsproto2(v interface{}) string { + rv := reflect.ValueOf(v) + if rv.IsNil() { + return "nil" + } + pv := reflect.Indirect(rv).Interface() + return fmt.Sprintf("*%v", pv) +} + +var fileDescriptorMapsproto2 = []byte{ + // 969 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xec, 0x96, 0xcd, 0x4f, 0xe3, 0x46, + 0x18, 0xc6, 0x71, 0xbe, 0x33, 0xf9, 0x72, 0x06, 0x5a, 0x45, 0x91, 0x9a, 0x96, 0xb4, 0x95, 0x42, + 0x68, 0x13, 0x9a, 0x56, 0x55, 0x05, 0x2d, 0x12, 0x81, 0xd0, 0x54, 0x14, 0x8a, 0x48, 0xbf, 0x25, + 0xa4, 0x26, 0xc5, 0x09, 0xd1, 0x26, 0x31, 0x8a, 0x9d, 0xd5, 0x72, 0xe3, 0xcf, 0xd8, 0xeb, 0xde, + 0xf6, 0xb8, 0xc7, 0x3d, 0xee, 0x91, 0x23, 0x47, 0x0e, 0x7b, 0x58, 0xd8, 0x0b, 0x47, 0x8e, 0x1c, + 0x77, 0x3c, 0x63, 0x3b, 0x63, 0xfb, 0xb5, 0x9d, 0xbd, 0xed, 0x21, 0x87, 0xd1, 0x64, 0x86, 0xf7, + 0xf9, 0xcd, 0x63, 0xec, 0x79, 0xf5, 0xa0, 0xe5, 0xff, 0xe5, 0x61, 0x47, 0x56, 0xaa, 0xc3, 0xf6, + 0x58, 0x39, 0x6d, 0x0f, 0xa4, 0x31, 0xf9, 0x75, 0xa6, 0x9c, 0x8d, 0x65, 0x55, 0xae, 0x55, 0xe8, + 0x84, 0x13, 0xfa, 0x4a, 0xfb, 0x43, 0xfe, 0xeb, 0x5e, 0x5f, 0x3d, 0x9d, 0x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1e, 0x88, 0x96, 0xcd, 0x85, 0xc2, 0xbb, 0x68, 0x99, 0x2e, 0x62, 0x3e, 0x08, + 0xde, 0x85, 0x62, 0xba, 0xd8, 0x41, 0x68, 0xb7, 0xff, 0x44, 0x3a, 0x61, 0x36, 0xe2, 0x94, 0xf1, + 0x05, 0xc8, 0x98, 0x96, 0x31, 0x08, 0xea, 0x9a, 0x1b, 0xf8, 0x67, 0x94, 0x68, 0x4d, 0x97, 0x39, + 0x44, 0x31, 0x5f, 0xc2, 0x56, 0xba, 0x36, 0x4e, 0x42, 0xe1, 0x40, 0x86, 0x1d, 0xf6, 0x48, 0x09, + 0x3f, 0x3b, 0xdc, 0x33, 0x31, 0x3b, 0xec, 0xa1, 0x4c, 0x3b, 0x0c, 0x93, 0xf4, 0xb5, 0xc3, 0x71, + 0x74, 0x3b, 0x0c, 0xb4, 0x81, 0xa2, 0x75, 0x59, 0xd6, 0x2a, 0x73, 0x29, 0x0a, 0x59, 0x06, 0x21, + 0x7a, 0x0d, 0x03, 0x44, 0x3b, 0x6c, 0x45, 0xdf, 0x0e, 0xfd, 0xf4, 0x35, 0x79, 0xda, 0xeb, 0xed, + 0x18, 0x55, 0xc6, 0xdb, 0x31, 0xd6, 0xfc, 0x0d, 0xac, 0x9f, 0xab, 0x92, 0xa2, 0x91, 0x32, 0x33, + 0xdc, 0x40, 0xa3, 0xd8, 0x76, 0x03, 0x8d, 0x6d, 0xdc, 0x42, 0x19, 0xa3, 0xb4, 0x31, 0x9a, 0x0c, + 0x35, 0xac, 0x48, 0xb1, 0x2b, 0x9e, 0x58, 0xbd, 0x96, 0x51, 0x33, 0x8a, 0x75, 0x17, 0x1f, 0xa2, + 0xb4, 0x51, 0xb8, 0xaf, 0xd0, 0x87, 0xce, 0x52, 0x66, 0xc9, 0x93, 0xc9, 0x4a, 0x19, 0x32, 0xad, + 0x58, 0x36, 0xf3, 0x3b, 0xe8, 0x63, 0xb8, 0x5b, 0x61, 0x11, 0x05, 0x1f, 0x49,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04, 0xbb, 0xf5, 0xd0, 0xd3, + 0x67, 0x9f, 0x0a, 0xe5, 0x65, 0x14, 0xd5, 0x8f, 0xc6, 0x11, 0x14, 0xd8, 0xdf, 0x12, 0x17, 0xe8, + 0x5c, 0x17, 0x05, 0x3a, 0x6f, 0x8b, 0x81, 0xfa, 0xaf, 0x97, 0x37, 0x85, 0x85, 0x2b, 0x32, 0xae, + 0xc9, 0x78, 0x73, 0x53, 0x10, 0xee, 0xc8, 0xb8, 0x27, 0xe3, 0x81, 0x8c, 0x8b, 0xdb, 0x82, 0xf0, + 0x9c, 0x8c, 0x17, 0x64, 0xbc, 0x24, 0xe3, 0x15, 0x19, 0x97, 0x64, 0x5c, 0xdd, 0x92, 0x5a, 0x32, + 0xdf, 0x91, 0xf9, 0x9e, 0xcc, 0x0f, 0x64, 0xbe, 0x78, 0x5b, 0x58, 0x78, 0x17, 0x00, 0x00, 0xff, + 0xff, 0x0d, 0x6b, 0x00, 0x44, 0x29, 0x14, 0x00, 0x00, +} diff --git a/vendor/github.com/gogo/protobuf/test/mapsproto2/combos/marshaler/mapsproto2.proto b/vendor/github.com/gogo/protobuf/test/mapsproto2/combos/marshaler/mapsproto2.proto new file mode 100644 index 000000000..d277f3a67 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/mapsproto2/combos/marshaler/mapsproto2.proto @@ -0,0 +1,115 @@ +// Copyright (c) 2013, Vastech SA (PTY) LTD. All rights reserved. +// http://github.com/gogo/protobuf/gogoproto +// +// Go support for Protocol Buffers - Google's data interchange format +// +// Copyright 2014 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. + +syntax = "proto2"; + +package proto2.maps; + +import "github.com/gogo/protobuf/gogoproto/gogo.proto"; + +option (gogoproto.goproto_stringer_all) = false; +option (gogoproto.goproto_enum_prefix_all) = false; +option (gogoproto.goproto_getters_all) = false; + +option (gogoproto.equal_all) = true; +option (gogoproto.verbose_equal_all) = true; +option (gogoproto.stringer_all) = true; +option (gogoproto.gostring_all) = true; +option (gogoproto.face_all) = true; +option (gogoproto.description_all) = true; + +option (gogoproto.testgen_all) = true; +option (gogoproto.populate_all) = true; +option (gogoproto.benchgen_all) = true; +option (gogoproto.unmarshaler_all) = false; +option (gogoproto.marshaler_all) = true; +option (gogoproto.sizer_all) = true; + +option (gogoproto.goproto_enum_stringer_all) = false; +option (gogoproto.enum_stringer_all) = true; + +option (gogoproto.unsafe_marshaler_all) = false; +option (gogoproto.unsafe_unmarshaler_all) = false; + +message FloatingPoint { + optional double f = 1; +} + +enum MapEnum { + MA = 0; + MB = 1; + MC = 2; +} + +message AllMaps { + map StringToDoubleMap = 1; + map StringToFloatMap = 2; + map Int32Map = 3; + map Int64Map = 4; + map Uint32Map = 5; + map Uint64Map = 6; + map Sint32Map = 7; + map Sint64Map = 8; + map Fixed32Map = 9; + map Sfixed32Map = 10; + map Fixed64Map = 11; + map Sfixed64Map = 12; + map BoolMap = 13; + map StringMap = 14; + map StringToBytesMap = 15; + map StringToEnumMap = 16; + map StringToMsgMap = 17; +} + +message AllMapsOrdered { + option (gogoproto.stable_marshaler) = true; + + map StringToDoubleMap = 1; + map StringToFloatMap = 2; + map Int32Map = 3; + map Int64Map = 4; + map Uint32Map = 5; + map Uint64Map = 6; + map Sint32Map = 7; + map Sint64Map = 8; + map Fixed32Map = 9; + map Sfixed32Map = 10; + map Fixed64Map = 11; + map Sfixed64Map = 12; + map BoolMap = 13; + map StringMap = 14; + map StringToBytesMap = 15; + map StringToEnumMap = 16; + map StringToMsgMap = 17; +} diff --git a/vendor/github.com/gogo/protobuf/test/mapsproto2/combos/marshaler/mapsproto2pb_test.go b/vendor/github.com/gogo/protobuf/test/mapsproto2/combos/marshaler/mapsproto2pb_test.go new file mode 100644 index 000000000..5836eb156 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/mapsproto2/combos/marshaler/mapsproto2pb_test.go @@ -0,0 +1,752 @@ +// Code generated by protoc-gen-gogo. +// source: combos/marshaler/mapsproto2.proto +// DO NOT EDIT! + +/* +Package proto2_maps is a generated protocol buffer package. + +It is generated from these files: + combos/marshaler/mapsproto2.proto + +It has these top-level messages: + FloatingPoint + AllMaps + AllMapsOrdered +*/ +package proto2_maps + +import testing "testing" +import math_rand "math/rand" +import time "time" +import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" +import github_com_gogo_protobuf_jsonpb "github.com/gogo/protobuf/jsonpb" +import fmt "fmt" +import go_parser "go/parser" +import proto "github.com/gogo/protobuf/proto" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +func TestFloatingPointProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedFloatingPoint(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &FloatingPoint{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestFloatingPointMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedFloatingPoint(popr, false) + size := p.Size() + data := make([]byte, size) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(data) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &FloatingPoint{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkFloatingPointProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*FloatingPoint, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedFloatingPoint(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkFloatingPointProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedFloatingPoint(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &FloatingPoint{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestAllMapsProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAllMaps(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &AllMaps{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestAllMapsMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAllMaps(popr, false) + size := p.Size() + data := make([]byte, size) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(data) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &AllMaps{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkAllMapsProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*AllMaps, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedAllMaps(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkAllMapsProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedAllMaps(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &AllMaps{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestAllMapsOrderedProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAllMapsOrdered(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &AllMapsOrdered{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestAllMapsOrderedMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAllMapsOrdered(popr, false) + size := p.Size() + data := make([]byte, size) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(data) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &AllMapsOrdered{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkAllMapsOrderedProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*AllMapsOrdered, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedAllMapsOrdered(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkAllMapsOrderedProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedAllMapsOrdered(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &AllMapsOrdered{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestFloatingPointJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedFloatingPoint(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &FloatingPoint{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestAllMapsJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAllMaps(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &AllMaps{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestAllMapsOrderedJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAllMapsOrdered(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &AllMapsOrdered{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestFloatingPointProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedFloatingPoint(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &FloatingPoint{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestFloatingPointProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedFloatingPoint(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &FloatingPoint{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestAllMapsProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAllMaps(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &AllMaps{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestAllMapsProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAllMaps(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &AllMaps{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestAllMapsOrderedProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAllMapsOrdered(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &AllMapsOrdered{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestAllMapsOrderedProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAllMapsOrdered(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &AllMapsOrdered{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestMapsproto2Description(t *testing.T) { + Mapsproto2Description() +} +func TestFloatingPointVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedFloatingPoint(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &FloatingPoint{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestAllMapsVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAllMaps(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &AllMaps{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestAllMapsOrderedVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAllMapsOrdered(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &AllMapsOrdered{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestFloatingPointFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedFloatingPoint(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestAllMapsFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAllMaps(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestAllMapsOrderedFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAllMapsOrdered(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestFloatingPointGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedFloatingPoint(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestAllMapsGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAllMaps(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestAllMapsOrderedGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAllMapsOrdered(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestFloatingPointSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedFloatingPoint(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkFloatingPointSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*FloatingPoint, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedFloatingPoint(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestAllMapsSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAllMaps(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkAllMapsSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*AllMaps, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedAllMaps(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestAllMapsOrderedSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAllMapsOrdered(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkAllMapsOrderedSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*AllMapsOrdered, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedAllMapsOrdered(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestFloatingPointStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedFloatingPoint(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestAllMapsStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAllMaps(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestAllMapsOrderedStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAllMapsOrdered(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} + +//These tests are generated by github.com/gogo/protobuf/plugin/testgen diff --git a/vendor/github.com/gogo/protobuf/test/mapsproto2/combos/neither/mapsproto2.pb.go b/vendor/github.com/gogo/protobuf/test/mapsproto2/combos/neither/mapsproto2.pb.go new file mode 100644 index 000000000..0238d16e8 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/mapsproto2/combos/neither/mapsproto2.pb.go @@ -0,0 +1,3174 @@ +// Code generated by protoc-gen-gogo. +// source: combos/neither/mapsproto2.proto +// DO NOT EDIT! + +/* +Package proto2_maps is a generated protocol buffer package. + +It is generated from these files: + combos/neither/mapsproto2.proto + +It has these top-level messages: + FloatingPoint + AllMaps + AllMapsOrdered +*/ +package proto2_maps + +import proto "github.com/gogo/protobuf/proto" +import fmt "fmt" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" + +import github_com_gogo_protobuf_protoc_gen_gogo_descriptor "github.com/gogo/protobuf/protoc-gen-gogo/descriptor" +import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" +import compress_gzip "compress/gzip" +import bytes "bytes" +import io_ioutil "io/ioutil" + +import strconv "strconv" + +import strings "strings" +import sort "sort" +import reflect "reflect" +import github_com_gogo_protobuf_sortkeys "github.com/gogo/protobuf/sortkeys" + +// 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. +const _ = proto.GoGoProtoPackageIsVersion1 + +type MapEnum int32 + +const ( + MA MapEnum = 0 + MB MapEnum = 1 + MC MapEnum = 2 +) + +var MapEnum_name = map[int32]string{ + 0: "MA", + 1: "MB", + 2: "MC", +} +var MapEnum_value = map[string]int32{ + "MA": 0, + "MB": 1, + "MC": 2, +} + +func (x MapEnum) Enum() *MapEnum { + p := new(MapEnum) + *p = x + return p +} +func (x MapEnum) MarshalJSON() ([]byte, error) { + return proto.MarshalJSONEnum(MapEnum_name, int32(x)) +} +func (x *MapEnum) UnmarshalJSON(data []byte) error { + value, err := proto.UnmarshalJSONEnum(MapEnum_value, data, "MapEnum") + if err != nil { + return err + } + *x = MapEnum(value) + return nil +} +func (MapEnum) EnumDescriptor() ([]byte, []int) { return fileDescriptorMapsproto2, []int{0} } + +type FloatingPoint struct { + F *float64 `protobuf:"fixed64,1,opt,name=f" json:"f,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *FloatingPoint) Reset() { *m = FloatingPoint{} } +func (*FloatingPoint) ProtoMessage() {} +func (*FloatingPoint) Descriptor() ([]byte, []int) { return fileDescriptorMapsproto2, []int{0} } + +type AllMaps struct { + StringToDoubleMap map[string]float64 `protobuf:"bytes,1,rep,name=StringToDoubleMap,json=stringToDoubleMap" json:"StringToDoubleMap,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"fixed64,2,opt,name=value"` + StringToFloatMap map[string]float32 `protobuf:"bytes,2,rep,name=StringToFloatMap,json=stringToFloatMap" json:"StringToFloatMap,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"fixed32,2,opt,name=value"` + Int32Map map[int32]int32 `protobuf:"bytes,3,rep,name=Int32Map,json=int32Map" json:"Int32Map,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"varint,2,opt,name=value"` + Int64Map map[int64]int64 `protobuf:"bytes,4,rep,name=Int64Map,json=int64Map" json:"Int64Map,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"varint,2,opt,name=value"` + Uint32Map map[uint32]uint32 `protobuf:"bytes,5,rep,name=Uint32Map,json=uint32Map" json:"Uint32Map,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"varint,2,opt,name=value"` + Uint64Map map[uint64]uint64 `protobuf:"bytes,6,rep,name=Uint64Map,json=uint64Map" json:"Uint64Map,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"varint,2,opt,name=value"` + Sint32Map map[int32]int32 `protobuf:"bytes,7,rep,name=Sint32Map,json=sint32Map" json:"Sint32Map,omitempty" protobuf_key:"zigzag32,1,opt,name=key" protobuf_val:"zigzag32,2,opt,name=value"` + Sint64Map map[int64]int64 `protobuf:"bytes,8,rep,name=Sint64Map,json=sint64Map" json:"Sint64Map,omitempty" protobuf_key:"zigzag64,1,opt,name=key" protobuf_val:"zigzag64,2,opt,name=value"` + Fixed32Map map[uint32]uint32 `protobuf:"bytes,9,rep,name=Fixed32Map,json=fixed32Map" json:"Fixed32Map,omitempty" protobuf_key:"fixed32,1,opt,name=key" protobuf_val:"fixed32,2,opt,name=value"` + Sfixed32Map map[int32]int32 `protobuf:"bytes,10,rep,name=Sfixed32Map,json=sfixed32Map" json:"Sfixed32Map,omitempty" protobuf_key:"fixed32,1,opt,name=key" protobuf_val:"fixed32,2,opt,name=value"` + Fixed64Map map[uint64]uint64 `protobuf:"bytes,11,rep,name=Fixed64Map,json=fixed64Map" json:"Fixed64Map,omitempty" protobuf_key:"fixed64,1,opt,name=key" protobuf_val:"fixed64,2,opt,name=value"` + Sfixed64Map map[int64]int64 `protobuf:"bytes,12,rep,name=Sfixed64Map,json=sfixed64Map" json:"Sfixed64Map,omitempty" protobuf_key:"fixed64,1,opt,name=key" protobuf_val:"fixed64,2,opt,name=value"` + BoolMap map[bool]bool `protobuf:"bytes,13,rep,name=BoolMap,json=boolMap" json:"BoolMap,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"varint,2,opt,name=value"` + StringMap map[string]string `protobuf:"bytes,14,rep,name=StringMap,json=stringMap" json:"StringMap,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + StringToBytesMap map[string][]byte `protobuf:"bytes,15,rep,name=StringToBytesMap,json=stringToBytesMap" json:"StringToBytesMap,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + StringToEnumMap map[string]MapEnum `protobuf:"bytes,16,rep,name=StringToEnumMap,json=stringToEnumMap" json:"StringToEnumMap,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"varint,2,opt,name=value,enum=proto2.maps.MapEnum"` + StringToMsgMap map[string]*FloatingPoint `protobuf:"bytes,17,rep,name=StringToMsgMap,json=stringToMsgMap" json:"StringToMsgMap,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *AllMaps) Reset() { *m = AllMaps{} } +func (*AllMaps) ProtoMessage() {} +func (*AllMaps) Descriptor() ([]byte, []int) { return fileDescriptorMapsproto2, []int{1} } + +type AllMapsOrdered struct { + StringToDoubleMap map[string]float64 `protobuf:"bytes,1,rep,name=StringToDoubleMap,json=stringToDoubleMap" json:"StringToDoubleMap,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"fixed64,2,opt,name=value"` + StringToFloatMap map[string]float32 `protobuf:"bytes,2,rep,name=StringToFloatMap,json=stringToFloatMap" json:"StringToFloatMap,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"fixed32,2,opt,name=value"` + Int32Map map[int32]int32 `protobuf:"bytes,3,rep,name=Int32Map,json=int32Map" json:"Int32Map,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"varint,2,opt,name=value"` + Int64Map map[int64]int64 `protobuf:"bytes,4,rep,name=Int64Map,json=int64Map" json:"Int64Map,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"varint,2,opt,name=value"` + Uint32Map map[uint32]uint32 `protobuf:"bytes,5,rep,name=Uint32Map,json=uint32Map" json:"Uint32Map,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"varint,2,opt,name=value"` + Uint64Map map[uint64]uint64 `protobuf:"bytes,6,rep,name=Uint64Map,json=uint64Map" json:"Uint64Map,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"varint,2,opt,name=value"` + Sint32Map map[int32]int32 `protobuf:"bytes,7,rep,name=Sint32Map,json=sint32Map" json:"Sint32Map,omitempty" protobuf_key:"zigzag32,1,opt,name=key" protobuf_val:"zigzag32,2,opt,name=value"` + Sint64Map map[int64]int64 `protobuf:"bytes,8,rep,name=Sint64Map,json=sint64Map" json:"Sint64Map,omitempty" protobuf_key:"zigzag64,1,opt,name=key" protobuf_val:"zigzag64,2,opt,name=value"` + Fixed32Map map[uint32]uint32 `protobuf:"bytes,9,rep,name=Fixed32Map,json=fixed32Map" json:"Fixed32Map,omitempty" protobuf_key:"fixed32,1,opt,name=key" protobuf_val:"fixed32,2,opt,name=value"` + Sfixed32Map map[int32]int32 `protobuf:"bytes,10,rep,name=Sfixed32Map,json=sfixed32Map" json:"Sfixed32Map,omitempty" protobuf_key:"fixed32,1,opt,name=key" protobuf_val:"fixed32,2,opt,name=value"` + Fixed64Map map[uint64]uint64 `protobuf:"bytes,11,rep,name=Fixed64Map,json=fixed64Map" json:"Fixed64Map,omitempty" protobuf_key:"fixed64,1,opt,name=key" protobuf_val:"fixed64,2,opt,name=value"` + Sfixed64Map map[int64]int64 `protobuf:"bytes,12,rep,name=Sfixed64Map,json=sfixed64Map" json:"Sfixed64Map,omitempty" protobuf_key:"fixed64,1,opt,name=key" protobuf_val:"fixed64,2,opt,name=value"` + BoolMap map[bool]bool `protobuf:"bytes,13,rep,name=BoolMap,json=boolMap" json:"BoolMap,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"varint,2,opt,name=value"` + StringMap map[string]string `protobuf:"bytes,14,rep,name=StringMap,json=stringMap" json:"StringMap,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + StringToBytesMap map[string][]byte `protobuf:"bytes,15,rep,name=StringToBytesMap,json=stringToBytesMap" json:"StringToBytesMap,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + StringToEnumMap map[string]MapEnum `protobuf:"bytes,16,rep,name=StringToEnumMap,json=stringToEnumMap" json:"StringToEnumMap,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"varint,2,opt,name=value,enum=proto2.maps.MapEnum"` + StringToMsgMap map[string]*FloatingPoint `protobuf:"bytes,17,rep,name=StringToMsgMap,json=stringToMsgMap" json:"StringToMsgMap,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *AllMapsOrdered) Reset() { *m = AllMapsOrdered{} } +func (*AllMapsOrdered) ProtoMessage() {} +func (*AllMapsOrdered) Descriptor() ([]byte, []int) { return fileDescriptorMapsproto2, []int{2} } + +func init() { + proto.RegisterType((*FloatingPoint)(nil), "proto2.maps.FloatingPoint") + proto.RegisterType((*AllMaps)(nil), "proto2.maps.AllMaps") + proto.RegisterType((*AllMapsOrdered)(nil), "proto2.maps.AllMapsOrdered") + proto.RegisterEnum("proto2.maps.MapEnum", MapEnum_name, MapEnum_value) +} +func (this *FloatingPoint) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return Mapsproto2Description() +} +func (this *AllMaps) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return Mapsproto2Description() +} +func (this *AllMapsOrdered) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return Mapsproto2Description() +} +func Mapsproto2Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + d := &github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet{} + var gzipped = []byte{ + // 4105 bytes of a gzipped FileDescriptorSet + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xec, 0x5a, 0x5b, 0x6c, 0x23, 0xe7, + 0x75, 0x36, 0xef, 0xe4, 0x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d, 0x22, 0x2a, 0x6f, 0x27, + 0x61, 0x21, 0x64, 0x54, 0x55, 0x21, 0x69, 0xe9, 0x3d, 0xc2, 0x18, 0xbb, 0x92, 0xd3, 0xe8, 0x77, + 0xb5, 0x0c, 0x99, 0xbe, 0xde, 0x7c, 0x51, 0xef, 0x18, 0xe5, 0x38, 0x15, 0x8b, 0x4b, 0xf5, 0x22, + 0x40, 0xcb, 0xe8, 0x1b, 0x56, 0xcb, 0xb0, 0x9a, 0x67, 0xe5, 0x04, 0x5a, 0x91, 0xd3, 0x24, 0x89, + 0xfa, 0x10, 0xcc, 0xf7, 0x87, 0x27, 0x66, 0xb7, 0xd9, 0x90, 0xd4, 0x00, 0xd5, 0x52, 0x9a, 0xc2, + 0x06, 0xb6, 0x46, 0xca, 0x0f, 0x40, 0xe9, 0x65, 0x43, 0x7f, 0x51, 0x56, 0xcd, 0x53, 0xd5, 0x22, + 0x11, 0x4b, 0x8a, 0x9b, 0x50, 0xe8, 0x19, 0x8e, 0x83, 0x06, 0x34, 0xdc, 0xb3, 0xbe, 0x51, 0x4e, + 0xd2, 0xa7, 0xbf, 0x67, 0xec, 0xe9, 0x83, 0x4f, 0x9e, 0xe7, 0xa8, 0x23, 0x04, 0xa9, 0xeb, 0x90, + 0x33, 0xac, 0x61, 0x8f, 0x31, 0xa4, 0x26, 0xf8, 0xaf, 0x86, 0x1a, 0x41, 0x96, 0x2c, 0x81, 0x71, + 0x8a, 0x8c, 0x63, 0x0c, 0x5e, 0xea, 0x36, 0x8d, 0x72, 0x9a, 0x12, 0x3c, 0x30, 0x46, 0x50, 0x67, + 0xe3, 0x41, 0x0e, 0x81, 0xc3, 0x47, 0xc9, 0x19, 0x37, 0x5d, 0xc3, 0x72, 0xba, 0xb6, 0x55, 0xce, + 0x50, 0x92, 0xfb, 0x43, 0x66, 0xd1, 0x30, 0x5b, 0x41, 0x8a, 0x11, 0x4e, 0x7d, 0x14, 0x32, 0x76, + 0xdf, 0xc5, 0x6f, 0x4e, 0x39, 0x8b, 0xf3, 0x93, 0x5f, 0xbb, 0x2b, 0x34, 0x10, 0x0e, 0x98, 0x8e, + 0x26, 0x94, 0xd5, 0x1d, 0x50, 0x1c, 0x7b, 0x38, 0x68, 0x1a, 0x8d, 0xa6, 0xdd, 0x32, 0x1a, 0x5d, + 0xab, 0x6d, 0x97, 0x73, 0x94, 0xe0, 0xd2, 0xf8, 0x83, 0x50, 0xc5, 0x4d, 0xd4, 0xdb, 0x41, 0x35, + 0xad, 0xe8, 0xf8, 0xae, 0xd5, 0x0b, 0x90, 0x76, 0xce, 0x2c, 0x57, 0xbf, 0x59, 0x2e, 0xd0, 0x08, + 0xe1, 0x57, 0x95, 0xff, 0x4b, 0x41, 0x69, 0x96, 0x10, 0x7b, 0x02, 0x52, 0x6d, 0xf2, 0x94, 0x18, + 0x60, 0xe7, 0xf0, 0x01, 0xc3, 0xf8, 0x9d, 0x98, 0xfe, 0x01, 0x9d, 0xb8, 0x0e, 0x79, 0xcb, 0x70, + 0x5c, 0xa3, 0xc5, 0x22, 0x22, 0x31, 0x63, 0x4c, 0x01, 0x03, 0x8d, 0x87, 0x54, 0xf2, 0x07, 0x0a, + 0xa9, 0x1b, 0x50, 0xf2, 0x4c, 0x6a, 0x0c, 0x74, 0xab, 0x23, 0x62, 0x73, 0x35, 0xca, 0x92, 0x95, + 0x9a, 0xc0, 0x69, 0x04, 0xa6, 0x15, 0x0d, 0xdf, 0xb5, 0xba, 0x05, 0x60, 0x5b, 0x86, 0xdd, 0xc6, + 0xe5, 0xd5, 0x34, 0x31, 0x4e, 0xc2, 0xbd, 0x74, 0x40, 0x54, 0xc6, 0xbc, 0x64, 0x33, 0x69, 0xd3, + 0x54, 0x1f, 0x1f, 0x85, 0x5a, 0x66, 0x42, 0xa4, 0xec, 0xb1, 0x45, 0x36, 0x16, 0x6d, 0xc7, 0x50, + 0x1c, 0x18, 0x24, 0xee, 0xd1, 0xc5, 0xec, 0xc9, 0x72, 0xd4, 0x88, 0x95, 0xc8, 0x27, 0xd3, 0x38, + 0x8c, 0x3d, 0xd8, 0xdc, 0x40, 0xbe, 0x54, 0xef, 0x05, 0x4f, 0xd0, 0xa0, 0x61, 0x05, 0x34, 0x0b, + 0x15, 0x84, 0x70, 0x1f, 0x65, 0x4b, 0x57, 0xa1, 0xe8, 0x77, 0x8f, 0xba, 0x08, 0x29, 0xc7, 0xd5, + 0x07, 0x2e, 0x8d, 0xc2, 0x94, 0xc6, 0x2e, 0x54, 0x05, 0x12, 0x98, 0x64, 0x68, 0x96, 0x4b, 0x69, + 0xe4, 0xeb, 0xd2, 0x63, 0x30, 0xe7, 0xbb, 0xfd, 0xac, 0xc0, 0xca, 0x6b, 0x69, 0x58, 0x0c, 0x8b, + 0xb9, 0xd0, 0xf0, 0xc7, 0xe5, 0x83, 0x11, 0x70, 0x62, 0x0c, 0x30, 0xee, 0x08, 0x03, 0xbf, 0xc2, + 0x88, 0x4a, 0x99, 0xfa, 0x89, 0x61, 0x62, 0x34, 0xc5, 0xae, 0x14, 0xd7, 0x1e, 0x9a, 0x29, 0xaa, + 0x57, 0x76, 0x09, 0x44, 0x63, 0x48, 0xf5, 0x49, 0x48, 0xf2, 0x14, 0x47, 0x18, 0x96, 0x67, 0x63, + 0x20, 0xb1, 0xa8, 0x51, 0x9c, 0xfa, 0x01, 0xc8, 0x91, 0xff, 0xcc, 0xb7, 0x69, 0x6a, 0x73, 0x96, + 0x08, 0x88, 0x5f, 0xd5, 0x25, 0xc8, 0xd2, 0x30, 0x6b, 0x19, 0xa2, 0x34, 0x78, 0xd7, 0x64, 0x62, + 0x5a, 0x46, 0x5b, 0x1f, 0x9a, 0x6e, 0xe3, 0x25, 0xdd, 0x1c, 0x1a, 0x34, 0x60, 0x70, 0x62, 0xb8, + 0xf0, 0x69, 0x22, 0x53, 0x2f, 0x41, 0x9e, 0x45, 0x65, 0x17, 0x31, 0x37, 0x69, 0xf6, 0x49, 0x69, + 0x2c, 0x50, 0x77, 0x88, 0x84, 0xdc, 0xf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0x3c, 0xda, + 0x39, 0xd8, 0x5f, 0xdf, 0x45, 0xdf, 0x79, 0x32, 0xad, 0xf6, 0x53, 0xc7, 0x3b, 0x5a, 0x6d, 0x0b, + 0xfd, 0x27, 0xc9, 0x0e, 0x6b, 0xeb, 0x47, 0x28, 0x4b, 0x54, 0x96, 0x61, 0x31, 0x2c, 0xcf, 0x84, + 0xad, 0x8c, 0xca, 0x17, 0x63, 0xb0, 0x10, 0x92, 0x32, 0x43, 0x57, 0xd1, 0x27, 0x21, 0xc5, 0x22, + 0x8d, 0x15, 0x91, 0x07, 0x43, 0x73, 0x2f, 0x8d, 0xbb, 0xb1, 0x42, 0x42, 0x71, 0x72, 0x21, 0x4d, + 0x4c, 0x28, 0xa4, 0x84, 0x62, 0x2c, 0x9c, 0x5e, 0x8d, 0x41, 0x79, 0x12, 0x77, 0xc4, 0x7a, 0x8f, + 0xfb, 0xd6, 0xfb, 0x13, 0x41, 0x03, 0x2e, 0x4f, 0x7e, 0x86, 0x31, 0x2b, 0xde, 0x8a, 0xc1, 0x85, + 0xf0, 0x7e, 0x23, 0xd4, 0x86, 0x27, 0x21, 0xdd, 0x33, 0xdc, 0x53, 0x5b, 0xd4, 0xdc, 0x0f, 0x86, + 0x64, 0x72, 0x32, 0x1c, 0xf4, 0x15, 0x47, 0xc9, 0xa5, 0x20, 0x31, 0xa9, 0x69, 0x60, 0xd6, 0x8c, + 0x59, 0xfa, 0x99, 0x38, 0xdc, 0x1e, 0x4a, 0x1e, 0x6a, 0xe8, 0xdd, 0x00, 0x5d, 0xab, 0x3f, 0x74, + 0x59, 0x5d, 0x65, 0x69, 0x26, 0x47, 0x25, 0x74, 0x09, 0x93, 0x14, 0x32, 0x74, 0xbd, 0xf1, 0x04, + 0x1d, 0x07, 0x26, 0xa2, 0x0a, 0x57, 0x47, 0x86, 0x26, 0xa9, 0xa1, 0x17, 0x27, 0x3c, 0xe9, 0x58, + 0xc9, 0x7a, 0x18, 0x94, 0xa6, 0xd9, 0x35, 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 0xf0, 0xf3, 0x4d, 0xfc, 0x7c, 0xfb, 0x3b, 0x17, 0x63, 0xef, 0xe0, 0xe7, 0x5d, + 0xfc, 0x7c, 0x1f, 0x3f, 0xaf, 0x7c, 0xf7, 0x62, 0xec, 0x4b, 0xf8, 0xf9, 0x0a, 0x7e, 0xfe, 0x06, + 0x3f, 0x5f, 0xc3, 0xcf, 0x37, 0xbe, 0x8b, 0xfa, 0xf8, 0xf9, 0x36, 0x7e, 0x7f, 0x07, 0xff, 0xbf, + 0x8b, 0xff, 0xbf, 0x8f, 0xff, 0x5f, 0xf9, 0xd7, 0x8b, 0xb7, 0xfd, 0x7f, 0x00, 0x00, 0x00, 0xff, + 0xff, 0x88, 0xd1, 0x85, 0x15, 0x94, 0x3e, 0x00, 0x00, + } + r := bytes.NewReader(gzipped) + gzipr, err := compress_gzip.NewReader(r) + if err != nil { + panic(err) + } + ungzipped, err := io_ioutil.ReadAll(gzipr) + if err != nil { + panic(err) + } + if err := github_com_gogo_protobuf_proto.Unmarshal(ungzipped, d); err != nil { + panic(err) + } + return d +} +func (x MapEnum) String() string { + s, ok := MapEnum_name[int32(x)] + if ok { + return s + } + return strconv.Itoa(int(x)) +} +func (this *FloatingPoint) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*FloatingPoint) + if !ok { + that2, ok := that.(FloatingPoint) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *FloatingPoint") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *FloatingPoint but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *FloatingPoint but is not nil && this == nil") + } + if this.F != nil && that1.F != nil { + if *this.F != *that1.F { + return fmt.Errorf("F this(%v) Not Equal that(%v)", *this.F, *that1.F) + } + } else if this.F != nil { + return fmt.Errorf("this.F == nil && that.F != nil") + } else if that1.F != nil { + return fmt.Errorf("F this(%v) Not Equal that(%v)", this.F, that1.F) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *FloatingPoint) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*FloatingPoint) + if !ok { + that2, ok := that.(FloatingPoint) + 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.F != nil && that1.F != nil { + if *this.F != *that1.F { + return false + } + } else if this.F != nil { + return false + } else if that1.F != nil { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *AllMaps) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*AllMaps) + if !ok { + that2, ok := that.(AllMaps) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *AllMaps") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *AllMaps but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *AllMaps but is not nil && this == nil") + } + if len(this.StringToDoubleMap) != len(that1.StringToDoubleMap) { + return fmt.Errorf("StringToDoubleMap this(%v) Not Equal that(%v)", len(this.StringToDoubleMap), len(that1.StringToDoubleMap)) + } + for i := range this.StringToDoubleMap { + if this.StringToDoubleMap[i] != that1.StringToDoubleMap[i] { + return fmt.Errorf("StringToDoubleMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringToDoubleMap[i], i, that1.StringToDoubleMap[i]) + } + } + if len(this.StringToFloatMap) != len(that1.StringToFloatMap) { + return fmt.Errorf("StringToFloatMap this(%v) Not Equal that(%v)", len(this.StringToFloatMap), len(that1.StringToFloatMap)) + } + for i := range this.StringToFloatMap { + if this.StringToFloatMap[i] != that1.StringToFloatMap[i] { + return fmt.Errorf("StringToFloatMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringToFloatMap[i], i, that1.StringToFloatMap[i]) + } + } + if len(this.Int32Map) != len(that1.Int32Map) { + return fmt.Errorf("Int32Map this(%v) Not Equal that(%v)", len(this.Int32Map), len(that1.Int32Map)) + } + for i := range this.Int32Map { + if this.Int32Map[i] != that1.Int32Map[i] { + return fmt.Errorf("Int32Map this[%v](%v) Not Equal that[%v](%v)", i, this.Int32Map[i], i, that1.Int32Map[i]) + } + } + if len(this.Int64Map) != len(that1.Int64Map) { + return fmt.Errorf("Int64Map this(%v) Not Equal that(%v)", len(this.Int64Map), len(that1.Int64Map)) + } + for i := range this.Int64Map { + if this.Int64Map[i] != that1.Int64Map[i] { + return fmt.Errorf("Int64Map this[%v](%v) Not Equal that[%v](%v)", i, this.Int64Map[i], i, that1.Int64Map[i]) + } + } + if len(this.Uint32Map) != len(that1.Uint32Map) { + return fmt.Errorf("Uint32Map this(%v) Not Equal that(%v)", len(this.Uint32Map), len(that1.Uint32Map)) + } + for i := range this.Uint32Map { + if this.Uint32Map[i] != that1.Uint32Map[i] { + return fmt.Errorf("Uint32Map this[%v](%v) Not Equal that[%v](%v)", i, this.Uint32Map[i], i, that1.Uint32Map[i]) + } + } + if len(this.Uint64Map) != len(that1.Uint64Map) { + return fmt.Errorf("Uint64Map this(%v) Not Equal that(%v)", len(this.Uint64Map), len(that1.Uint64Map)) + } + for i := range this.Uint64Map { + if this.Uint64Map[i] != that1.Uint64Map[i] { + return fmt.Errorf("Uint64Map this[%v](%v) Not Equal that[%v](%v)", i, this.Uint64Map[i], i, that1.Uint64Map[i]) + } + } + if len(this.Sint32Map) != len(that1.Sint32Map) { + return fmt.Errorf("Sint32Map this(%v) Not Equal that(%v)", len(this.Sint32Map), len(that1.Sint32Map)) + } + for i := range this.Sint32Map { + if this.Sint32Map[i] != that1.Sint32Map[i] { + return fmt.Errorf("Sint32Map this[%v](%v) Not Equal that[%v](%v)", i, this.Sint32Map[i], i, that1.Sint32Map[i]) + } + } + if len(this.Sint64Map) != len(that1.Sint64Map) { + return fmt.Errorf("Sint64Map this(%v) Not Equal that(%v)", len(this.Sint64Map), len(that1.Sint64Map)) + } + for i := range this.Sint64Map { + if this.Sint64Map[i] != that1.Sint64Map[i] { + return fmt.Errorf("Sint64Map this[%v](%v) Not Equal that[%v](%v)", i, this.Sint64Map[i], i, that1.Sint64Map[i]) + } + } + if len(this.Fixed32Map) != len(that1.Fixed32Map) { + return fmt.Errorf("Fixed32Map this(%v) Not Equal that(%v)", len(this.Fixed32Map), len(that1.Fixed32Map)) + } + for i := range this.Fixed32Map { + if this.Fixed32Map[i] != that1.Fixed32Map[i] { + return fmt.Errorf("Fixed32Map this[%v](%v) Not Equal that[%v](%v)", i, this.Fixed32Map[i], i, that1.Fixed32Map[i]) + } + } + if len(this.Sfixed32Map) != len(that1.Sfixed32Map) { + return fmt.Errorf("Sfixed32Map this(%v) Not Equal that(%v)", len(this.Sfixed32Map), len(that1.Sfixed32Map)) + } + for i := range this.Sfixed32Map { + if this.Sfixed32Map[i] != that1.Sfixed32Map[i] { + return fmt.Errorf("Sfixed32Map this[%v](%v) Not Equal that[%v](%v)", i, this.Sfixed32Map[i], i, that1.Sfixed32Map[i]) + } + } + if len(this.Fixed64Map) != len(that1.Fixed64Map) { + return fmt.Errorf("Fixed64Map this(%v) Not Equal that(%v)", len(this.Fixed64Map), len(that1.Fixed64Map)) + } + for i := range this.Fixed64Map { + if this.Fixed64Map[i] != that1.Fixed64Map[i] { + return fmt.Errorf("Fixed64Map this[%v](%v) Not Equal that[%v](%v)", i, this.Fixed64Map[i], i, that1.Fixed64Map[i]) + } + } + if len(this.Sfixed64Map) != len(that1.Sfixed64Map) { + return fmt.Errorf("Sfixed64Map this(%v) Not Equal that(%v)", len(this.Sfixed64Map), len(that1.Sfixed64Map)) + } + for i := range this.Sfixed64Map { + if this.Sfixed64Map[i] != that1.Sfixed64Map[i] { + return fmt.Errorf("Sfixed64Map this[%v](%v) Not Equal that[%v](%v)", i, this.Sfixed64Map[i], i, that1.Sfixed64Map[i]) + } + } + if len(this.BoolMap) != len(that1.BoolMap) { + return fmt.Errorf("BoolMap this(%v) Not Equal that(%v)", len(this.BoolMap), len(that1.BoolMap)) + } + for i := range this.BoolMap { + if this.BoolMap[i] != that1.BoolMap[i] { + return fmt.Errorf("BoolMap this[%v](%v) Not Equal that[%v](%v)", i, this.BoolMap[i], i, that1.BoolMap[i]) + } + } + if len(this.StringMap) != len(that1.StringMap) { + return fmt.Errorf("StringMap this(%v) Not Equal that(%v)", len(this.StringMap), len(that1.StringMap)) + } + for i := range this.StringMap { + if this.StringMap[i] != that1.StringMap[i] { + return fmt.Errorf("StringMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringMap[i], i, that1.StringMap[i]) + } + } + if len(this.StringToBytesMap) != len(that1.StringToBytesMap) { + return fmt.Errorf("StringToBytesMap this(%v) Not Equal that(%v)", len(this.StringToBytesMap), len(that1.StringToBytesMap)) + } + for i := range this.StringToBytesMap { + if !bytes.Equal(this.StringToBytesMap[i], that1.StringToBytesMap[i]) { + return fmt.Errorf("StringToBytesMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringToBytesMap[i], i, that1.StringToBytesMap[i]) + } + } + if len(this.StringToEnumMap) != len(that1.StringToEnumMap) { + return fmt.Errorf("StringToEnumMap this(%v) Not Equal that(%v)", len(this.StringToEnumMap), len(that1.StringToEnumMap)) + } + for i := range this.StringToEnumMap { + if this.StringToEnumMap[i] != that1.StringToEnumMap[i] { + return fmt.Errorf("StringToEnumMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringToEnumMap[i], i, that1.StringToEnumMap[i]) + } + } + if len(this.StringToMsgMap) != len(that1.StringToMsgMap) { + return fmt.Errorf("StringToMsgMap this(%v) Not Equal that(%v)", len(this.StringToMsgMap), len(that1.StringToMsgMap)) + } + for i := range this.StringToMsgMap { + if !this.StringToMsgMap[i].Equal(that1.StringToMsgMap[i]) { + return fmt.Errorf("StringToMsgMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringToMsgMap[i], i, that1.StringToMsgMap[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *AllMaps) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*AllMaps) + if !ok { + that2, ok := that.(AllMaps) + 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.StringToDoubleMap) != len(that1.StringToDoubleMap) { + return false + } + for i := range this.StringToDoubleMap { + if this.StringToDoubleMap[i] != that1.StringToDoubleMap[i] { + return false + } + } + if len(this.StringToFloatMap) != len(that1.StringToFloatMap) { + return false + } + for i := range this.StringToFloatMap { + if this.StringToFloatMap[i] != that1.StringToFloatMap[i] { + return false + } + } + if len(this.Int32Map) != len(that1.Int32Map) { + return false + } + for i := range this.Int32Map { + if this.Int32Map[i] != that1.Int32Map[i] { + return false + } + } + if len(this.Int64Map) != len(that1.Int64Map) { + return false + } + for i := range this.Int64Map { + if this.Int64Map[i] != that1.Int64Map[i] { + return false + } + } + if len(this.Uint32Map) != len(that1.Uint32Map) { + return false + } + for i := range this.Uint32Map { + if this.Uint32Map[i] != that1.Uint32Map[i] { + return false + } + } + if len(this.Uint64Map) != len(that1.Uint64Map) { + return false + } + for i := range this.Uint64Map { + if this.Uint64Map[i] != that1.Uint64Map[i] { + return false + } + } + if len(this.Sint32Map) != len(that1.Sint32Map) { + return false + } + for i := range this.Sint32Map { + if this.Sint32Map[i] != that1.Sint32Map[i] { + return false + } + } + if len(this.Sint64Map) != len(that1.Sint64Map) { + return false + } + for i := range this.Sint64Map { + if this.Sint64Map[i] != that1.Sint64Map[i] { + return false + } + } + if len(this.Fixed32Map) != len(that1.Fixed32Map) { + return false + } + for i := range this.Fixed32Map { + if this.Fixed32Map[i] != that1.Fixed32Map[i] { + return false + } + } + if len(this.Sfixed32Map) != len(that1.Sfixed32Map) { + return false + } + for i := range this.Sfixed32Map { + if this.Sfixed32Map[i] != that1.Sfixed32Map[i] { + return false + } + } + if len(this.Fixed64Map) != len(that1.Fixed64Map) { + return false + } + for i := range this.Fixed64Map { + if this.Fixed64Map[i] != that1.Fixed64Map[i] { + return false + } + } + if len(this.Sfixed64Map) != len(that1.Sfixed64Map) { + return false + } + for i := range this.Sfixed64Map { + if this.Sfixed64Map[i] != that1.Sfixed64Map[i] { + return false + } + } + if len(this.BoolMap) != len(that1.BoolMap) { + return false + } + for i := range this.BoolMap { + if this.BoolMap[i] != that1.BoolMap[i] { + return false + } + } + if len(this.StringMap) != len(that1.StringMap) { + return false + } + for i := range this.StringMap { + if this.StringMap[i] != that1.StringMap[i] { + return false + } + } + if len(this.StringToBytesMap) != len(that1.StringToBytesMap) { + return false + } + for i := range this.StringToBytesMap { + if !bytes.Equal(this.StringToBytesMap[i], that1.StringToBytesMap[i]) { + return false + } + } + if len(this.StringToEnumMap) != len(that1.StringToEnumMap) { + return false + } + for i := range this.StringToEnumMap { + if this.StringToEnumMap[i] != that1.StringToEnumMap[i] { + return false + } + } + if len(this.StringToMsgMap) != len(that1.StringToMsgMap) { + return false + } + for i := range this.StringToMsgMap { + if !this.StringToMsgMap[i].Equal(that1.StringToMsgMap[i]) { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *AllMapsOrdered) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*AllMapsOrdered) + if !ok { + that2, ok := that.(AllMapsOrdered) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *AllMapsOrdered") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *AllMapsOrdered but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *AllMapsOrdered but is not nil && this == nil") + } + if len(this.StringToDoubleMap) != len(that1.StringToDoubleMap) { + return fmt.Errorf("StringToDoubleMap this(%v) Not Equal that(%v)", len(this.StringToDoubleMap), len(that1.StringToDoubleMap)) + } + for i := range this.StringToDoubleMap { + if this.StringToDoubleMap[i] != that1.StringToDoubleMap[i] { + return fmt.Errorf("StringToDoubleMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringToDoubleMap[i], i, that1.StringToDoubleMap[i]) + } + } + if len(this.StringToFloatMap) != len(that1.StringToFloatMap) { + return fmt.Errorf("StringToFloatMap this(%v) Not Equal that(%v)", len(this.StringToFloatMap), len(that1.StringToFloatMap)) + } + for i := range this.StringToFloatMap { + if this.StringToFloatMap[i] != that1.StringToFloatMap[i] { + return fmt.Errorf("StringToFloatMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringToFloatMap[i], i, that1.StringToFloatMap[i]) + } + } + if len(this.Int32Map) != len(that1.Int32Map) { + return fmt.Errorf("Int32Map this(%v) Not Equal that(%v)", len(this.Int32Map), len(that1.Int32Map)) + } + for i := range this.Int32Map { + if this.Int32Map[i] != that1.Int32Map[i] { + return fmt.Errorf("Int32Map this[%v](%v) Not Equal that[%v](%v)", i, this.Int32Map[i], i, that1.Int32Map[i]) + } + } + if len(this.Int64Map) != len(that1.Int64Map) { + return fmt.Errorf("Int64Map this(%v) Not Equal that(%v)", len(this.Int64Map), len(that1.Int64Map)) + } + for i := range this.Int64Map { + if this.Int64Map[i] != that1.Int64Map[i] { + return fmt.Errorf("Int64Map this[%v](%v) Not Equal that[%v](%v)", i, this.Int64Map[i], i, that1.Int64Map[i]) + } + } + if len(this.Uint32Map) != len(that1.Uint32Map) { + return fmt.Errorf("Uint32Map this(%v) Not Equal that(%v)", len(this.Uint32Map), len(that1.Uint32Map)) + } + for i := range this.Uint32Map { + if this.Uint32Map[i] != that1.Uint32Map[i] { + return fmt.Errorf("Uint32Map this[%v](%v) Not Equal that[%v](%v)", i, this.Uint32Map[i], i, that1.Uint32Map[i]) + } + } + if len(this.Uint64Map) != len(that1.Uint64Map) { + return fmt.Errorf("Uint64Map this(%v) Not Equal that(%v)", len(this.Uint64Map), len(that1.Uint64Map)) + } + for i := range this.Uint64Map { + if this.Uint64Map[i] != that1.Uint64Map[i] { + return fmt.Errorf("Uint64Map this[%v](%v) Not Equal that[%v](%v)", i, this.Uint64Map[i], i, that1.Uint64Map[i]) + } + } + if len(this.Sint32Map) != len(that1.Sint32Map) { + return fmt.Errorf("Sint32Map this(%v) Not Equal that(%v)", len(this.Sint32Map), len(that1.Sint32Map)) + } + for i := range this.Sint32Map { + if this.Sint32Map[i] != that1.Sint32Map[i] { + return fmt.Errorf("Sint32Map this[%v](%v) Not Equal that[%v](%v)", i, this.Sint32Map[i], i, that1.Sint32Map[i]) + } + } + if len(this.Sint64Map) != len(that1.Sint64Map) { + return fmt.Errorf("Sint64Map this(%v) Not Equal that(%v)", len(this.Sint64Map), len(that1.Sint64Map)) + } + for i := range this.Sint64Map { + if this.Sint64Map[i] != that1.Sint64Map[i] { + return fmt.Errorf("Sint64Map this[%v](%v) Not Equal that[%v](%v)", i, this.Sint64Map[i], i, that1.Sint64Map[i]) + } + } + if len(this.Fixed32Map) != len(that1.Fixed32Map) { + return fmt.Errorf("Fixed32Map this(%v) Not Equal that(%v)", len(this.Fixed32Map), len(that1.Fixed32Map)) + } + for i := range this.Fixed32Map { + if this.Fixed32Map[i] != that1.Fixed32Map[i] { + return fmt.Errorf("Fixed32Map this[%v](%v) Not Equal that[%v](%v)", i, this.Fixed32Map[i], i, that1.Fixed32Map[i]) + } + } + if len(this.Sfixed32Map) != len(that1.Sfixed32Map) { + return fmt.Errorf("Sfixed32Map this(%v) Not Equal that(%v)", len(this.Sfixed32Map), len(that1.Sfixed32Map)) + } + for i := range this.Sfixed32Map { + if this.Sfixed32Map[i] != that1.Sfixed32Map[i] { + return fmt.Errorf("Sfixed32Map this[%v](%v) Not Equal that[%v](%v)", i, this.Sfixed32Map[i], i, that1.Sfixed32Map[i]) + } + } + if len(this.Fixed64Map) != len(that1.Fixed64Map) { + return fmt.Errorf("Fixed64Map this(%v) Not Equal that(%v)", len(this.Fixed64Map), len(that1.Fixed64Map)) + } + for i := range this.Fixed64Map { + if this.Fixed64Map[i] != that1.Fixed64Map[i] { + return fmt.Errorf("Fixed64Map this[%v](%v) Not Equal that[%v](%v)", i, this.Fixed64Map[i], i, that1.Fixed64Map[i]) + } + } + if len(this.Sfixed64Map) != len(that1.Sfixed64Map) { + return fmt.Errorf("Sfixed64Map this(%v) Not Equal that(%v)", len(this.Sfixed64Map), len(that1.Sfixed64Map)) + } + for i := range this.Sfixed64Map { + if this.Sfixed64Map[i] != that1.Sfixed64Map[i] { + return fmt.Errorf("Sfixed64Map this[%v](%v) Not Equal that[%v](%v)", i, this.Sfixed64Map[i], i, that1.Sfixed64Map[i]) + } + } + if len(this.BoolMap) != len(that1.BoolMap) { + return fmt.Errorf("BoolMap this(%v) Not Equal that(%v)", len(this.BoolMap), len(that1.BoolMap)) + } + for i := range this.BoolMap { + if this.BoolMap[i] != that1.BoolMap[i] { + return fmt.Errorf("BoolMap this[%v](%v) Not Equal that[%v](%v)", i, this.BoolMap[i], i, that1.BoolMap[i]) + } + } + if len(this.StringMap) != len(that1.StringMap) { + return fmt.Errorf("StringMap this(%v) Not Equal that(%v)", len(this.StringMap), len(that1.StringMap)) + } + for i := range this.StringMap { + if this.StringMap[i] != that1.StringMap[i] { + return fmt.Errorf("StringMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringMap[i], i, that1.StringMap[i]) + } + } + if len(this.StringToBytesMap) != len(that1.StringToBytesMap) { + return fmt.Errorf("StringToBytesMap this(%v) Not Equal that(%v)", len(this.StringToBytesMap), len(that1.StringToBytesMap)) + } + for i := range this.StringToBytesMap { + if !bytes.Equal(this.StringToBytesMap[i], that1.StringToBytesMap[i]) { + return fmt.Errorf("StringToBytesMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringToBytesMap[i], i, that1.StringToBytesMap[i]) + } + } + if len(this.StringToEnumMap) != len(that1.StringToEnumMap) { + return fmt.Errorf("StringToEnumMap this(%v) Not Equal that(%v)", len(this.StringToEnumMap), len(that1.StringToEnumMap)) + } + for i := range this.StringToEnumMap { + if this.StringToEnumMap[i] != that1.StringToEnumMap[i] { + return fmt.Errorf("StringToEnumMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringToEnumMap[i], i, that1.StringToEnumMap[i]) + } + } + if len(this.StringToMsgMap) != len(that1.StringToMsgMap) { + return fmt.Errorf("StringToMsgMap this(%v) Not Equal that(%v)", len(this.StringToMsgMap), len(that1.StringToMsgMap)) + } + for i := range this.StringToMsgMap { + if !this.StringToMsgMap[i].Equal(that1.StringToMsgMap[i]) { + return fmt.Errorf("StringToMsgMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringToMsgMap[i], i, that1.StringToMsgMap[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *AllMapsOrdered) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*AllMapsOrdered) + if !ok { + that2, ok := that.(AllMapsOrdered) + 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.StringToDoubleMap) != len(that1.StringToDoubleMap) { + return false + } + for i := range this.StringToDoubleMap { + if this.StringToDoubleMap[i] != that1.StringToDoubleMap[i] { + return false + } + } + if len(this.StringToFloatMap) != len(that1.StringToFloatMap) { + return false + } + for i := range this.StringToFloatMap { + if this.StringToFloatMap[i] != that1.StringToFloatMap[i] { + return false + } + } + if len(this.Int32Map) != len(that1.Int32Map) { + return false + } + for i := range this.Int32Map { + if this.Int32Map[i] != that1.Int32Map[i] { + return false + } + } + if len(this.Int64Map) != len(that1.Int64Map) { + return false + } + for i := range this.Int64Map { + if this.Int64Map[i] != that1.Int64Map[i] { + return false + } + } + if len(this.Uint32Map) != len(that1.Uint32Map) { + return false + } + for i := range this.Uint32Map { + if this.Uint32Map[i] != that1.Uint32Map[i] { + return false + } + } + if len(this.Uint64Map) != len(that1.Uint64Map) { + return false + } + for i := range this.Uint64Map { + if this.Uint64Map[i] != that1.Uint64Map[i] { + return false + } + } + if len(this.Sint32Map) != len(that1.Sint32Map) { + return false + } + for i := range this.Sint32Map { + if this.Sint32Map[i] != that1.Sint32Map[i] { + return false + } + } + if len(this.Sint64Map) != len(that1.Sint64Map) { + return false + } + for i := range this.Sint64Map { + if this.Sint64Map[i] != that1.Sint64Map[i] { + return false + } + } + if len(this.Fixed32Map) != len(that1.Fixed32Map) { + return false + } + for i := range this.Fixed32Map { + if this.Fixed32Map[i] != that1.Fixed32Map[i] { + return false + } + } + if len(this.Sfixed32Map) != len(that1.Sfixed32Map) { + return false + } + for i := range this.Sfixed32Map { + if this.Sfixed32Map[i] != that1.Sfixed32Map[i] { + return false + } + } + if len(this.Fixed64Map) != len(that1.Fixed64Map) { + return false + } + for i := range this.Fixed64Map { + if this.Fixed64Map[i] != that1.Fixed64Map[i] { + return false + } + } + if len(this.Sfixed64Map) != len(that1.Sfixed64Map) { + return false + } + for i := range this.Sfixed64Map { + if this.Sfixed64Map[i] != that1.Sfixed64Map[i] { + return false + } + } + if len(this.BoolMap) != len(that1.BoolMap) { + return false + } + for i := range this.BoolMap { + if this.BoolMap[i] != that1.BoolMap[i] { + return false + } + } + if len(this.StringMap) != len(that1.StringMap) { + return false + } + for i := range this.StringMap { + if this.StringMap[i] != that1.StringMap[i] { + return false + } + } + if len(this.StringToBytesMap) != len(that1.StringToBytesMap) { + return false + } + for i := range this.StringToBytesMap { + if !bytes.Equal(this.StringToBytesMap[i], that1.StringToBytesMap[i]) { + return false + } + } + if len(this.StringToEnumMap) != len(that1.StringToEnumMap) { + return false + } + for i := range this.StringToEnumMap { + if this.StringToEnumMap[i] != that1.StringToEnumMap[i] { + return false + } + } + if len(this.StringToMsgMap) != len(that1.StringToMsgMap) { + return false + } + for i := range this.StringToMsgMap { + if !this.StringToMsgMap[i].Equal(that1.StringToMsgMap[i]) { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} + +type FloatingPointFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetF() *float64 +} + +func (this *FloatingPoint) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *FloatingPoint) TestProto() github_com_gogo_protobuf_proto.Message { + return NewFloatingPointFromFace(this) +} + +func (this *FloatingPoint) GetF() *float64 { + return this.F +} + +func NewFloatingPointFromFace(that FloatingPointFace) *FloatingPoint { + this := &FloatingPoint{} + this.F = that.GetF() + return this +} + +type AllMapsFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetStringToDoubleMap() map[string]float64 + GetStringToFloatMap() map[string]float32 + GetInt32Map() map[int32]int32 + GetInt64Map() map[int64]int64 + GetUint32Map() map[uint32]uint32 + GetUint64Map() map[uint64]uint64 + GetSint32Map() map[int32]int32 + GetSint64Map() map[int64]int64 + GetFixed32Map() map[uint32]uint32 + GetSfixed32Map() map[int32]int32 + GetFixed64Map() map[uint64]uint64 + GetSfixed64Map() map[int64]int64 + GetBoolMap() map[bool]bool + GetStringMap() map[string]string + GetStringToBytesMap() map[string][]byte + GetStringToEnumMap() map[string]MapEnum + GetStringToMsgMap() map[string]*FloatingPoint +} + +func (this *AllMaps) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *AllMaps) TestProto() github_com_gogo_protobuf_proto.Message { + return NewAllMapsFromFace(this) +} + +func (this *AllMaps) GetStringToDoubleMap() map[string]float64 { + return this.StringToDoubleMap +} + +func (this *AllMaps) GetStringToFloatMap() map[string]float32 { + return this.StringToFloatMap +} + +func (this *AllMaps) GetInt32Map() map[int32]int32 { + return this.Int32Map +} + +func (this *AllMaps) GetInt64Map() map[int64]int64 { + return this.Int64Map +} + +func (this *AllMaps) GetUint32Map() map[uint32]uint32 { + return this.Uint32Map +} + +func (this *AllMaps) GetUint64Map() map[uint64]uint64 { + return this.Uint64Map +} + +func (this *AllMaps) GetSint32Map() map[int32]int32 { + return this.Sint32Map +} + +func (this *AllMaps) GetSint64Map() map[int64]int64 { + return this.Sint64Map +} + +func (this *AllMaps) GetFixed32Map() map[uint32]uint32 { + return this.Fixed32Map +} + +func (this *AllMaps) GetSfixed32Map() map[int32]int32 { + return this.Sfixed32Map +} + +func (this *AllMaps) GetFixed64Map() map[uint64]uint64 { + return this.Fixed64Map +} + +func (this *AllMaps) GetSfixed64Map() map[int64]int64 { + return this.Sfixed64Map +} + +func (this *AllMaps) GetBoolMap() map[bool]bool { + return this.BoolMap +} + +func (this *AllMaps) GetStringMap() map[string]string { + return this.StringMap +} + +func (this *AllMaps) GetStringToBytesMap() map[string][]byte { + return this.StringToBytesMap +} + +func (this *AllMaps) GetStringToEnumMap() map[string]MapEnum { + return this.StringToEnumMap +} + +func (this *AllMaps) GetStringToMsgMap() map[string]*FloatingPoint { + return this.StringToMsgMap +} + +func NewAllMapsFromFace(that AllMapsFace) *AllMaps { + this := &AllMaps{} + this.StringToDoubleMap = that.GetStringToDoubleMap() + this.StringToFloatMap = that.GetStringToFloatMap() + this.Int32Map = that.GetInt32Map() + this.Int64Map = that.GetInt64Map() + this.Uint32Map = that.GetUint32Map() + this.Uint64Map = that.GetUint64Map() + this.Sint32Map = that.GetSint32Map() + this.Sint64Map = that.GetSint64Map() + this.Fixed32Map = that.GetFixed32Map() + this.Sfixed32Map = that.GetSfixed32Map() + this.Fixed64Map = that.GetFixed64Map() + this.Sfixed64Map = that.GetSfixed64Map() + this.BoolMap = that.GetBoolMap() + this.StringMap = that.GetStringMap() + this.StringToBytesMap = that.GetStringToBytesMap() + this.StringToEnumMap = that.GetStringToEnumMap() + this.StringToMsgMap = that.GetStringToMsgMap() + return this +} + +type AllMapsOrderedFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetStringToDoubleMap() map[string]float64 + GetStringToFloatMap() map[string]float32 + GetInt32Map() map[int32]int32 + GetInt64Map() map[int64]int64 + GetUint32Map() map[uint32]uint32 + GetUint64Map() map[uint64]uint64 + GetSint32Map() map[int32]int32 + GetSint64Map() map[int64]int64 + GetFixed32Map() map[uint32]uint32 + GetSfixed32Map() map[int32]int32 + GetFixed64Map() map[uint64]uint64 + GetSfixed64Map() map[int64]int64 + GetBoolMap() map[bool]bool + GetStringMap() map[string]string + GetStringToBytesMap() map[string][]byte + GetStringToEnumMap() map[string]MapEnum + GetStringToMsgMap() map[string]*FloatingPoint +} + +func (this *AllMapsOrdered) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *AllMapsOrdered) TestProto() github_com_gogo_protobuf_proto.Message { + return NewAllMapsOrderedFromFace(this) +} + +func (this *AllMapsOrdered) GetStringToDoubleMap() map[string]float64 { + return this.StringToDoubleMap +} + +func (this *AllMapsOrdered) GetStringToFloatMap() map[string]float32 { + return this.StringToFloatMap +} + +func (this *AllMapsOrdered) GetInt32Map() map[int32]int32 { + return this.Int32Map +} + +func (this *AllMapsOrdered) GetInt64Map() map[int64]int64 { + return this.Int64Map +} + +func (this *AllMapsOrdered) GetUint32Map() map[uint32]uint32 { + return this.Uint32Map +} + +func (this *AllMapsOrdered) GetUint64Map() map[uint64]uint64 { + return this.Uint64Map +} + +func (this *AllMapsOrdered) GetSint32Map() map[int32]int32 { + return this.Sint32Map +} + +func (this *AllMapsOrdered) GetSint64Map() map[int64]int64 { + return this.Sint64Map +} + +func (this *AllMapsOrdered) GetFixed32Map() map[uint32]uint32 { + return this.Fixed32Map +} + +func (this *AllMapsOrdered) GetSfixed32Map() map[int32]int32 { + return this.Sfixed32Map +} + +func (this *AllMapsOrdered) GetFixed64Map() map[uint64]uint64 { + return this.Fixed64Map +} + +func (this *AllMapsOrdered) GetSfixed64Map() map[int64]int64 { + return this.Sfixed64Map +} + +func (this *AllMapsOrdered) GetBoolMap() map[bool]bool { + return this.BoolMap +} + +func (this *AllMapsOrdered) GetStringMap() map[string]string { + return this.StringMap +} + +func (this *AllMapsOrdered) GetStringToBytesMap() map[string][]byte { + return this.StringToBytesMap +} + +func (this *AllMapsOrdered) GetStringToEnumMap() map[string]MapEnum { + return this.StringToEnumMap +} + +func (this *AllMapsOrdered) GetStringToMsgMap() map[string]*FloatingPoint { + return this.StringToMsgMap +} + +func NewAllMapsOrderedFromFace(that AllMapsOrderedFace) *AllMapsOrdered { + this := &AllMapsOrdered{} + this.StringToDoubleMap = that.GetStringToDoubleMap() + this.StringToFloatMap = that.GetStringToFloatMap() + this.Int32Map = that.GetInt32Map() + this.Int64Map = that.GetInt64Map() + this.Uint32Map = that.GetUint32Map() + this.Uint64Map = that.GetUint64Map() + this.Sint32Map = that.GetSint32Map() + this.Sint64Map = that.GetSint64Map() + this.Fixed32Map = that.GetFixed32Map() + this.Sfixed32Map = that.GetSfixed32Map() + this.Fixed64Map = that.GetFixed64Map() + this.Sfixed64Map = that.GetSfixed64Map() + this.BoolMap = that.GetBoolMap() + this.StringMap = that.GetStringMap() + this.StringToBytesMap = that.GetStringToBytesMap() + this.StringToEnumMap = that.GetStringToEnumMap() + this.StringToMsgMap = that.GetStringToMsgMap() + return this +} + +func (this *FloatingPoint) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&proto2_maps.FloatingPoint{") + if this.F != nil { + s = append(s, "F: "+valueToGoStringMapsproto2(this.F, "float64")+",\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 *AllMaps) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 21) + s = append(s, "&proto2_maps.AllMaps{") + keysForStringToDoubleMap := make([]string, 0, len(this.StringToDoubleMap)) + for k := range this.StringToDoubleMap { + keysForStringToDoubleMap = append(keysForStringToDoubleMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToDoubleMap) + mapStringForStringToDoubleMap := "map[string]float64{" + for _, k := range keysForStringToDoubleMap { + mapStringForStringToDoubleMap += fmt.Sprintf("%#v: %#v,", k, this.StringToDoubleMap[k]) + } + mapStringForStringToDoubleMap += "}" + if this.StringToDoubleMap != nil { + s = append(s, "StringToDoubleMap: "+mapStringForStringToDoubleMap+",\n") + } + keysForStringToFloatMap := make([]string, 0, len(this.StringToFloatMap)) + for k := range this.StringToFloatMap { + keysForStringToFloatMap = append(keysForStringToFloatMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToFloatMap) + mapStringForStringToFloatMap := "map[string]float32{" + for _, k := range keysForStringToFloatMap { + mapStringForStringToFloatMap += fmt.Sprintf("%#v: %#v,", k, this.StringToFloatMap[k]) + } + mapStringForStringToFloatMap += "}" + if this.StringToFloatMap != nil { + s = append(s, "StringToFloatMap: "+mapStringForStringToFloatMap+",\n") + } + keysForInt32Map := make([]int32, 0, len(this.Int32Map)) + for k := range this.Int32Map { + keysForInt32Map = append(keysForInt32Map, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForInt32Map) + mapStringForInt32Map := "map[int32]int32{" + for _, k := range keysForInt32Map { + mapStringForInt32Map += fmt.Sprintf("%#v: %#v,", k, this.Int32Map[k]) + } + mapStringForInt32Map += "}" + if this.Int32Map != nil { + s = append(s, "Int32Map: "+mapStringForInt32Map+",\n") + } + keysForInt64Map := make([]int64, 0, len(this.Int64Map)) + for k := range this.Int64Map { + keysForInt64Map = append(keysForInt64Map, k) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForInt64Map) + mapStringForInt64Map := "map[int64]int64{" + for _, k := range keysForInt64Map { + mapStringForInt64Map += fmt.Sprintf("%#v: %#v,", k, this.Int64Map[k]) + } + mapStringForInt64Map += "}" + if this.Int64Map != nil { + s = append(s, "Int64Map: "+mapStringForInt64Map+",\n") + } + keysForUint32Map := make([]uint32, 0, len(this.Uint32Map)) + for k := range this.Uint32Map { + keysForUint32Map = append(keysForUint32Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint32s(keysForUint32Map) + mapStringForUint32Map := "map[uint32]uint32{" + for _, k := range keysForUint32Map { + mapStringForUint32Map += fmt.Sprintf("%#v: %#v,", k, this.Uint32Map[k]) + } + mapStringForUint32Map += "}" + if this.Uint32Map != nil { + s = append(s, "Uint32Map: "+mapStringForUint32Map+",\n") + } + keysForUint64Map := make([]uint64, 0, len(this.Uint64Map)) + for k := range this.Uint64Map { + keysForUint64Map = append(keysForUint64Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint64s(keysForUint64Map) + mapStringForUint64Map := "map[uint64]uint64{" + for _, k := range keysForUint64Map { + mapStringForUint64Map += fmt.Sprintf("%#v: %#v,", k, this.Uint64Map[k]) + } + mapStringForUint64Map += "}" + if this.Uint64Map != nil { + s = append(s, "Uint64Map: "+mapStringForUint64Map+",\n") + } + keysForSint32Map := make([]int32, 0, len(this.Sint32Map)) + for k := range this.Sint32Map { + keysForSint32Map = append(keysForSint32Map, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForSint32Map) + mapStringForSint32Map := "map[int32]int32{" + for _, k := range keysForSint32Map { + mapStringForSint32Map += fmt.Sprintf("%#v: %#v,", k, this.Sint32Map[k]) + } + mapStringForSint32Map += "}" + if this.Sint32Map != nil { + s = append(s, "Sint32Map: "+mapStringForSint32Map+",\n") + } + keysForSint64Map := make([]int64, 0, len(this.Sint64Map)) + for k := range this.Sint64Map { + keysForSint64Map = append(keysForSint64Map, k) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForSint64Map) + mapStringForSint64Map := "map[int64]int64{" + for _, k := range keysForSint64Map { + mapStringForSint64Map += fmt.Sprintf("%#v: %#v,", k, this.Sint64Map[k]) + } + mapStringForSint64Map += "}" + if this.Sint64Map != nil { + s = append(s, "Sint64Map: "+mapStringForSint64Map+",\n") + } + keysForFixed32Map := make([]uint32, 0, len(this.Fixed32Map)) + for k := range this.Fixed32Map { + keysForFixed32Map = append(keysForFixed32Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint32s(keysForFixed32Map) + mapStringForFixed32Map := "map[uint32]uint32{" + for _, k := range keysForFixed32Map { + mapStringForFixed32Map += fmt.Sprintf("%#v: %#v,", k, this.Fixed32Map[k]) + } + mapStringForFixed32Map += "}" + if this.Fixed32Map != nil { + s = append(s, "Fixed32Map: "+mapStringForFixed32Map+",\n") + } + keysForSfixed32Map := make([]int32, 0, len(this.Sfixed32Map)) + for k := range this.Sfixed32Map { + keysForSfixed32Map = append(keysForSfixed32Map, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForSfixed32Map) + mapStringForSfixed32Map := "map[int32]int32{" + for _, k := range keysForSfixed32Map { + mapStringForSfixed32Map += fmt.Sprintf("%#v: %#v,", k, this.Sfixed32Map[k]) + } + mapStringForSfixed32Map += "}" + if this.Sfixed32Map != nil { + s = append(s, "Sfixed32Map: "+mapStringForSfixed32Map+",\n") + } + keysForFixed64Map := make([]uint64, 0, len(this.Fixed64Map)) + for k := range this.Fixed64Map { + keysForFixed64Map = append(keysForFixed64Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint64s(keysForFixed64Map) + mapStringForFixed64Map := "map[uint64]uint64{" + for _, k := range keysForFixed64Map { + mapStringForFixed64Map += fmt.Sprintf("%#v: %#v,", k, this.Fixed64Map[k]) + } + mapStringForFixed64Map += "}" + if this.Fixed64Map != nil { + s = append(s, "Fixed64Map: "+mapStringForFixed64Map+",\n") + } + keysForSfixed64Map := make([]int64, 0, len(this.Sfixed64Map)) + for k := range this.Sfixed64Map { + keysForSfixed64Map = append(keysForSfixed64Map, k) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForSfixed64Map) + mapStringForSfixed64Map := "map[int64]int64{" + for _, k := range keysForSfixed64Map { + mapStringForSfixed64Map += fmt.Sprintf("%#v: %#v,", k, this.Sfixed64Map[k]) + } + mapStringForSfixed64Map += "}" + if this.Sfixed64Map != nil { + s = append(s, "Sfixed64Map: "+mapStringForSfixed64Map+",\n") + } + keysForBoolMap := make([]bool, 0, len(this.BoolMap)) + for k := range this.BoolMap { + keysForBoolMap = append(keysForBoolMap, k) + } + github_com_gogo_protobuf_sortkeys.Bools(keysForBoolMap) + mapStringForBoolMap := "map[bool]bool{" + for _, k := range keysForBoolMap { + mapStringForBoolMap += fmt.Sprintf("%#v: %#v,", k, this.BoolMap[k]) + } + mapStringForBoolMap += "}" + if this.BoolMap != nil { + s = append(s, "BoolMap: "+mapStringForBoolMap+",\n") + } + keysForStringMap := make([]string, 0, len(this.StringMap)) + for k := range this.StringMap { + keysForStringMap = append(keysForStringMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringMap) + mapStringForStringMap := "map[string]string{" + for _, k := range keysForStringMap { + mapStringForStringMap += fmt.Sprintf("%#v: %#v,", k, this.StringMap[k]) + } + mapStringForStringMap += "}" + if this.StringMap != nil { + s = append(s, "StringMap: "+mapStringForStringMap+",\n") + } + keysForStringToBytesMap := make([]string, 0, len(this.StringToBytesMap)) + for k := range this.StringToBytesMap { + keysForStringToBytesMap = append(keysForStringToBytesMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToBytesMap) + mapStringForStringToBytesMap := "map[string][]byte{" + for _, k := range keysForStringToBytesMap { + mapStringForStringToBytesMap += fmt.Sprintf("%#v: %#v,", k, this.StringToBytesMap[k]) + } + mapStringForStringToBytesMap += "}" + if this.StringToBytesMap != nil { + s = append(s, "StringToBytesMap: "+mapStringForStringToBytesMap+",\n") + } + keysForStringToEnumMap := make([]string, 0, len(this.StringToEnumMap)) + for k := range this.StringToEnumMap { + keysForStringToEnumMap = append(keysForStringToEnumMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToEnumMap) + mapStringForStringToEnumMap := "map[string]MapEnum{" + for _, k := range keysForStringToEnumMap { + mapStringForStringToEnumMap += fmt.Sprintf("%#v: %#v,", k, this.StringToEnumMap[k]) + } + mapStringForStringToEnumMap += "}" + if this.StringToEnumMap != nil { + s = append(s, "StringToEnumMap: "+mapStringForStringToEnumMap+",\n") + } + keysForStringToMsgMap := make([]string, 0, len(this.StringToMsgMap)) + for k := range this.StringToMsgMap { + keysForStringToMsgMap = append(keysForStringToMsgMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToMsgMap) + mapStringForStringToMsgMap := "map[string]*FloatingPoint{" + for _, k := range keysForStringToMsgMap { + mapStringForStringToMsgMap += fmt.Sprintf("%#v: %#v,", k, this.StringToMsgMap[k]) + } + mapStringForStringToMsgMap += "}" + if this.StringToMsgMap != nil { + s = append(s, "StringToMsgMap: "+mapStringForStringToMsgMap+",\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 *AllMapsOrdered) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 21) + s = append(s, "&proto2_maps.AllMapsOrdered{") + keysForStringToDoubleMap := make([]string, 0, len(this.StringToDoubleMap)) + for k := range this.StringToDoubleMap { + keysForStringToDoubleMap = append(keysForStringToDoubleMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToDoubleMap) + mapStringForStringToDoubleMap := "map[string]float64{" + for _, k := range keysForStringToDoubleMap { + mapStringForStringToDoubleMap += fmt.Sprintf("%#v: %#v,", k, this.StringToDoubleMap[k]) + } + mapStringForStringToDoubleMap += "}" + if this.StringToDoubleMap != nil { + s = append(s, "StringToDoubleMap: "+mapStringForStringToDoubleMap+",\n") + } + keysForStringToFloatMap := make([]string, 0, len(this.StringToFloatMap)) + for k := range this.StringToFloatMap { + keysForStringToFloatMap = append(keysForStringToFloatMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToFloatMap) + mapStringForStringToFloatMap := "map[string]float32{" + for _, k := range keysForStringToFloatMap { + mapStringForStringToFloatMap += fmt.Sprintf("%#v: %#v,", k, this.StringToFloatMap[k]) + } + mapStringForStringToFloatMap += "}" + if this.StringToFloatMap != nil { + s = append(s, "StringToFloatMap: "+mapStringForStringToFloatMap+",\n") + } + keysForInt32Map := make([]int32, 0, len(this.Int32Map)) + for k := range this.Int32Map { + keysForInt32Map = append(keysForInt32Map, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForInt32Map) + mapStringForInt32Map := "map[int32]int32{" + for _, k := range keysForInt32Map { + mapStringForInt32Map += fmt.Sprintf("%#v: %#v,", k, this.Int32Map[k]) + } + mapStringForInt32Map += "}" + if this.Int32Map != nil { + s = append(s, "Int32Map: "+mapStringForInt32Map+",\n") + } + keysForInt64Map := make([]int64, 0, len(this.Int64Map)) + for k := range this.Int64Map { + keysForInt64Map = append(keysForInt64Map, k) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForInt64Map) + mapStringForInt64Map := "map[int64]int64{" + for _, k := range keysForInt64Map { + mapStringForInt64Map += fmt.Sprintf("%#v: %#v,", k, this.Int64Map[k]) + } + mapStringForInt64Map += "}" + if this.Int64Map != nil { + s = append(s, "Int64Map: "+mapStringForInt64Map+",\n") + } + keysForUint32Map := make([]uint32, 0, len(this.Uint32Map)) + for k := range this.Uint32Map { + keysForUint32Map = append(keysForUint32Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint32s(keysForUint32Map) + mapStringForUint32Map := "map[uint32]uint32{" + for _, k := range keysForUint32Map { + mapStringForUint32Map += fmt.Sprintf("%#v: %#v,", k, this.Uint32Map[k]) + } + mapStringForUint32Map += "}" + if this.Uint32Map != nil { + s = append(s, "Uint32Map: "+mapStringForUint32Map+",\n") + } + keysForUint64Map := make([]uint64, 0, len(this.Uint64Map)) + for k := range this.Uint64Map { + keysForUint64Map = append(keysForUint64Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint64s(keysForUint64Map) + mapStringForUint64Map := "map[uint64]uint64{" + for _, k := range keysForUint64Map { + mapStringForUint64Map += fmt.Sprintf("%#v: %#v,", k, this.Uint64Map[k]) + } + mapStringForUint64Map += "}" + if this.Uint64Map != nil { + s = append(s, "Uint64Map: "+mapStringForUint64Map+",\n") + } + keysForSint32Map := make([]int32, 0, len(this.Sint32Map)) + for k := range this.Sint32Map { + keysForSint32Map = append(keysForSint32Map, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForSint32Map) + mapStringForSint32Map := "map[int32]int32{" + for _, k := range keysForSint32Map { + mapStringForSint32Map += fmt.Sprintf("%#v: %#v,", k, this.Sint32Map[k]) + } + mapStringForSint32Map += "}" + if this.Sint32Map != nil { + s = append(s, "Sint32Map: "+mapStringForSint32Map+",\n") + } + keysForSint64Map := make([]int64, 0, len(this.Sint64Map)) + for k := range this.Sint64Map { + keysForSint64Map = append(keysForSint64Map, k) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForSint64Map) + mapStringForSint64Map := "map[int64]int64{" + for _, k := range keysForSint64Map { + mapStringForSint64Map += fmt.Sprintf("%#v: %#v,", k, this.Sint64Map[k]) + } + mapStringForSint64Map += "}" + if this.Sint64Map != nil { + s = append(s, "Sint64Map: "+mapStringForSint64Map+",\n") + } + keysForFixed32Map := make([]uint32, 0, len(this.Fixed32Map)) + for k := range this.Fixed32Map { + keysForFixed32Map = append(keysForFixed32Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint32s(keysForFixed32Map) + mapStringForFixed32Map := "map[uint32]uint32{" + for _, k := range keysForFixed32Map { + mapStringForFixed32Map += fmt.Sprintf("%#v: %#v,", k, this.Fixed32Map[k]) + } + mapStringForFixed32Map += "}" + if this.Fixed32Map != nil { + s = append(s, "Fixed32Map: "+mapStringForFixed32Map+",\n") + } + keysForSfixed32Map := make([]int32, 0, len(this.Sfixed32Map)) + for k := range this.Sfixed32Map { + keysForSfixed32Map = append(keysForSfixed32Map, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForSfixed32Map) + mapStringForSfixed32Map := "map[int32]int32{" + for _, k := range keysForSfixed32Map { + mapStringForSfixed32Map += fmt.Sprintf("%#v: %#v,", k, this.Sfixed32Map[k]) + } + mapStringForSfixed32Map += "}" + if this.Sfixed32Map != nil { + s = append(s, "Sfixed32Map: "+mapStringForSfixed32Map+",\n") + } + keysForFixed64Map := make([]uint64, 0, len(this.Fixed64Map)) + for k := range this.Fixed64Map { + keysForFixed64Map = append(keysForFixed64Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint64s(keysForFixed64Map) + mapStringForFixed64Map := "map[uint64]uint64{" + for _, k := range keysForFixed64Map { + mapStringForFixed64Map += fmt.Sprintf("%#v: %#v,", k, this.Fixed64Map[k]) + } + mapStringForFixed64Map += "}" + if this.Fixed64Map != nil { + s = append(s, "Fixed64Map: "+mapStringForFixed64Map+",\n") + } + keysForSfixed64Map := make([]int64, 0, len(this.Sfixed64Map)) + for k := range this.Sfixed64Map { + keysForSfixed64Map = append(keysForSfixed64Map, k) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForSfixed64Map) + mapStringForSfixed64Map := "map[int64]int64{" + for _, k := range keysForSfixed64Map { + mapStringForSfixed64Map += fmt.Sprintf("%#v: %#v,", k, this.Sfixed64Map[k]) + } + mapStringForSfixed64Map += "}" + if this.Sfixed64Map != nil { + s = append(s, "Sfixed64Map: "+mapStringForSfixed64Map+",\n") + } + keysForBoolMap := make([]bool, 0, len(this.BoolMap)) + for k := range this.BoolMap { + keysForBoolMap = append(keysForBoolMap, k) + } + github_com_gogo_protobuf_sortkeys.Bools(keysForBoolMap) + mapStringForBoolMap := "map[bool]bool{" + for _, k := range keysForBoolMap { + mapStringForBoolMap += fmt.Sprintf("%#v: %#v,", k, this.BoolMap[k]) + } + mapStringForBoolMap += "}" + if this.BoolMap != nil { + s = append(s, "BoolMap: "+mapStringForBoolMap+",\n") + } + keysForStringMap := make([]string, 0, len(this.StringMap)) + for k := range this.StringMap { + keysForStringMap = append(keysForStringMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringMap) + mapStringForStringMap := "map[string]string{" + for _, k := range keysForStringMap { + mapStringForStringMap += fmt.Sprintf("%#v: %#v,", k, this.StringMap[k]) + } + mapStringForStringMap += "}" + if this.StringMap != nil { + s = append(s, "StringMap: "+mapStringForStringMap+",\n") + } + keysForStringToBytesMap := make([]string, 0, len(this.StringToBytesMap)) + for k := range this.StringToBytesMap { + keysForStringToBytesMap = append(keysForStringToBytesMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToBytesMap) + mapStringForStringToBytesMap := "map[string][]byte{" + for _, k := range keysForStringToBytesMap { + mapStringForStringToBytesMap += fmt.Sprintf("%#v: %#v,", k, this.StringToBytesMap[k]) + } + mapStringForStringToBytesMap += "}" + if this.StringToBytesMap != nil { + s = append(s, "StringToBytesMap: "+mapStringForStringToBytesMap+",\n") + } + keysForStringToEnumMap := make([]string, 0, len(this.StringToEnumMap)) + for k := range this.StringToEnumMap { + keysForStringToEnumMap = append(keysForStringToEnumMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToEnumMap) + mapStringForStringToEnumMap := "map[string]MapEnum{" + for _, k := range keysForStringToEnumMap { + mapStringForStringToEnumMap += fmt.Sprintf("%#v: %#v,", k, this.StringToEnumMap[k]) + } + mapStringForStringToEnumMap += "}" + if this.StringToEnumMap != nil { + s = append(s, "StringToEnumMap: "+mapStringForStringToEnumMap+",\n") + } + keysForStringToMsgMap := make([]string, 0, len(this.StringToMsgMap)) + for k := range this.StringToMsgMap { + keysForStringToMsgMap = append(keysForStringToMsgMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToMsgMap) + mapStringForStringToMsgMap := "map[string]*FloatingPoint{" + for _, k := range keysForStringToMsgMap { + mapStringForStringToMsgMap += fmt.Sprintf("%#v: %#v,", k, this.StringToMsgMap[k]) + } + mapStringForStringToMsgMap += "}" + if this.StringToMsgMap != nil { + s = append(s, "StringToMsgMap: "+mapStringForStringToMsgMap+",\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 valueToGoStringMapsproto2(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 extensionToGoStringMapsproto2(e map[int32]github_com_gogo_protobuf_proto.Extension) string { + if e == nil { + return "nil" + } + s := "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 +} +func NewPopulatedFloatingPoint(r randyMapsproto2, easy bool) *FloatingPoint { + this := &FloatingPoint{} + if r.Intn(10) != 0 { + v1 := float64(r.Float64()) + if r.Intn(2) == 0 { + v1 *= -1 + } + this.F = &v1 + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedMapsproto2(r, 2) + } + return this +} + +func NewPopulatedAllMaps(r randyMapsproto2, easy bool) *AllMaps { + this := &AllMaps{} + if r.Intn(10) != 0 { + v2 := r.Intn(10) + this.StringToDoubleMap = make(map[string]float64) + for i := 0; i < v2; i++ { + v3 := randStringMapsproto2(r) + this.StringToDoubleMap[v3] = float64(r.Float64()) + if r.Intn(2) == 0 { + this.StringToDoubleMap[v3] *= -1 + } + } + } + if r.Intn(10) != 0 { + v4 := r.Intn(10) + this.StringToFloatMap = make(map[string]float32) + for i := 0; i < v4; i++ { + v5 := randStringMapsproto2(r) + this.StringToFloatMap[v5] = float32(r.Float32()) + if r.Intn(2) == 0 { + this.StringToFloatMap[v5] *= -1 + } + } + } + if r.Intn(10) != 0 { + v6 := r.Intn(10) + this.Int32Map = make(map[int32]int32) + for i := 0; i < v6; i++ { + v7 := int32(r.Int31()) + this.Int32Map[v7] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Int32Map[v7] *= -1 + } + } + } + if r.Intn(10) != 0 { + v8 := r.Intn(10) + this.Int64Map = make(map[int64]int64) + for i := 0; i < v8; i++ { + v9 := int64(r.Int63()) + this.Int64Map[v9] = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Int64Map[v9] *= -1 + } + } + } + if r.Intn(10) != 0 { + v10 := r.Intn(10) + this.Uint32Map = make(map[uint32]uint32) + for i := 0; i < v10; i++ { + v11 := uint32(r.Uint32()) + this.Uint32Map[v11] = uint32(r.Uint32()) + } + } + if r.Intn(10) != 0 { + v12 := r.Intn(10) + this.Uint64Map = make(map[uint64]uint64) + for i := 0; i < v12; i++ { + v13 := uint64(uint64(r.Uint32())) + this.Uint64Map[v13] = uint64(uint64(r.Uint32())) + } + } + if r.Intn(10) != 0 { + v14 := r.Intn(10) + this.Sint32Map = make(map[int32]int32) + for i := 0; i < v14; i++ { + v15 := int32(r.Int31()) + this.Sint32Map[v15] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Sint32Map[v15] *= -1 + } + } + } + if r.Intn(10) != 0 { + v16 := r.Intn(10) + this.Sint64Map = make(map[int64]int64) + for i := 0; i < v16; i++ { + v17 := int64(r.Int63()) + this.Sint64Map[v17] = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Sint64Map[v17] *= -1 + } + } + } + if r.Intn(10) != 0 { + v18 := r.Intn(10) + this.Fixed32Map = make(map[uint32]uint32) + for i := 0; i < v18; i++ { + v19 := uint32(r.Uint32()) + this.Fixed32Map[v19] = uint32(r.Uint32()) + } + } + if r.Intn(10) != 0 { + v20 := r.Intn(10) + this.Sfixed32Map = make(map[int32]int32) + for i := 0; i < v20; i++ { + v21 := int32(r.Int31()) + this.Sfixed32Map[v21] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Sfixed32Map[v21] *= -1 + } + } + } + if r.Intn(10) != 0 { + v22 := r.Intn(10) + this.Fixed64Map = make(map[uint64]uint64) + for i := 0; i < v22; i++ { + v23 := uint64(uint64(r.Uint32())) + this.Fixed64Map[v23] = uint64(uint64(r.Uint32())) + } + } + if r.Intn(10) != 0 { + v24 := r.Intn(10) + this.Sfixed64Map = make(map[int64]int64) + for i := 0; i < v24; i++ { + v25 := int64(r.Int63()) + this.Sfixed64Map[v25] = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Sfixed64Map[v25] *= -1 + } + } + } + if r.Intn(10) != 0 { + v26 := r.Intn(10) + this.BoolMap = make(map[bool]bool) + for i := 0; i < v26; i++ { + v27 := bool(bool(r.Intn(2) == 0)) + this.BoolMap[v27] = bool(bool(r.Intn(2) == 0)) + } + } + if r.Intn(10) != 0 { + v28 := r.Intn(10) + this.StringMap = make(map[string]string) + for i := 0; i < v28; i++ { + this.StringMap[randStringMapsproto2(r)] = randStringMapsproto2(r) + } + } + if r.Intn(10) != 0 { + v29 := r.Intn(10) + this.StringToBytesMap = make(map[string][]byte) + for i := 0; i < v29; i++ { + v30 := r.Intn(100) + v31 := randStringMapsproto2(r) + this.StringToBytesMap[v31] = make([]byte, v30) + for i := 0; i < v30; i++ { + this.StringToBytesMap[v31][i] = byte(r.Intn(256)) + } + } + } + if r.Intn(10) != 0 { + v32 := r.Intn(10) + this.StringToEnumMap = make(map[string]MapEnum) + for i := 0; i < v32; i++ { + this.StringToEnumMap[randStringMapsproto2(r)] = MapEnum([]int32{0, 1, 2}[r.Intn(3)]) + } + } + if r.Intn(10) != 0 { + v33 := r.Intn(10) + this.StringToMsgMap = make(map[string]*FloatingPoint) + for i := 0; i < v33; i++ { + this.StringToMsgMap[randStringMapsproto2(r)] = NewPopulatedFloatingPoint(r, easy) + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedMapsproto2(r, 18) + } + return this +} + +func NewPopulatedAllMapsOrdered(r randyMapsproto2, easy bool) *AllMapsOrdered { + this := &AllMapsOrdered{} + if r.Intn(10) != 0 { + v34 := r.Intn(10) + this.StringToDoubleMap = make(map[string]float64) + for i := 0; i < v34; i++ { + v35 := randStringMapsproto2(r) + this.StringToDoubleMap[v35] = float64(r.Float64()) + if r.Intn(2) == 0 { + this.StringToDoubleMap[v35] *= -1 + } + } + } + if r.Intn(10) != 0 { + v36 := r.Intn(10) + this.StringToFloatMap = make(map[string]float32) + for i := 0; i < v36; i++ { + v37 := randStringMapsproto2(r) + this.StringToFloatMap[v37] = float32(r.Float32()) + if r.Intn(2) == 0 { + this.StringToFloatMap[v37] *= -1 + } + } + } + if r.Intn(10) != 0 { + v38 := r.Intn(10) + this.Int32Map = make(map[int32]int32) + for i := 0; i < v38; i++ { + v39 := int32(r.Int31()) + this.Int32Map[v39] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Int32Map[v39] *= -1 + } + } + } + if r.Intn(10) != 0 { + v40 := r.Intn(10) + this.Int64Map = make(map[int64]int64) + for i := 0; i < v40; i++ { + v41 := int64(r.Int63()) + this.Int64Map[v41] = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Int64Map[v41] *= -1 + } + } + } + if r.Intn(10) != 0 { + v42 := r.Intn(10) + this.Uint32Map = make(map[uint32]uint32) + for i := 0; i < v42; i++ { + v43 := uint32(r.Uint32()) + this.Uint32Map[v43] = uint32(r.Uint32()) + } + } + if r.Intn(10) != 0 { + v44 := r.Intn(10) + this.Uint64Map = make(map[uint64]uint64) + for i := 0; i < v44; i++ { + v45 := uint64(uint64(r.Uint32())) + this.Uint64Map[v45] = uint64(uint64(r.Uint32())) + } + } + if r.Intn(10) != 0 { + v46 := r.Intn(10) + this.Sint32Map = make(map[int32]int32) + for i := 0; i < v46; i++ { + v47 := int32(r.Int31()) + this.Sint32Map[v47] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Sint32Map[v47] *= -1 + } + } + } + if r.Intn(10) != 0 { + v48 := r.Intn(10) + this.Sint64Map = make(map[int64]int64) + for i := 0; i < v48; i++ { + v49 := int64(r.Int63()) + this.Sint64Map[v49] = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Sint64Map[v49] *= -1 + } + } + } + if r.Intn(10) != 0 { + v50 := r.Intn(10) + this.Fixed32Map = make(map[uint32]uint32) + for i := 0; i < v50; i++ { + v51 := uint32(r.Uint32()) + this.Fixed32Map[v51] = uint32(r.Uint32()) + } + } + if r.Intn(10) != 0 { + v52 := r.Intn(10) + this.Sfixed32Map = make(map[int32]int32) + for i := 0; i < v52; i++ { + v53 := int32(r.Int31()) + this.Sfixed32Map[v53] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Sfixed32Map[v53] *= -1 + } + } + } + if r.Intn(10) != 0 { + v54 := r.Intn(10) + this.Fixed64Map = make(map[uint64]uint64) + for i := 0; i < v54; i++ { + v55 := uint64(uint64(r.Uint32())) + this.Fixed64Map[v55] = uint64(uint64(r.Uint32())) + } + } + if r.Intn(10) != 0 { + v56 := r.Intn(10) + this.Sfixed64Map = make(map[int64]int64) + for i := 0; i < v56; i++ { + v57 := int64(r.Int63()) + this.Sfixed64Map[v57] = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Sfixed64Map[v57] *= -1 + } + } + } + if r.Intn(10) != 0 { + v58 := r.Intn(10) + this.BoolMap = make(map[bool]bool) + for i := 0; i < v58; i++ { + v59 := bool(bool(r.Intn(2) == 0)) + this.BoolMap[v59] = bool(bool(r.Intn(2) == 0)) + } + } + if r.Intn(10) != 0 { + v60 := r.Intn(10) + this.StringMap = make(map[string]string) + for i := 0; i < v60; i++ { + this.StringMap[randStringMapsproto2(r)] = randStringMapsproto2(r) + } + } + if r.Intn(10) != 0 { + v61 := r.Intn(10) + this.StringToBytesMap = make(map[string][]byte) + for i := 0; i < v61; i++ { + v62 := r.Intn(100) + v63 := randStringMapsproto2(r) + this.StringToBytesMap[v63] = make([]byte, v62) + for i := 0; i < v62; i++ { + this.StringToBytesMap[v63][i] = byte(r.Intn(256)) + } + } + } + if r.Intn(10) != 0 { + v64 := r.Intn(10) + this.StringToEnumMap = make(map[string]MapEnum) + for i := 0; i < v64; i++ { + this.StringToEnumMap[randStringMapsproto2(r)] = MapEnum([]int32{0, 1, 2}[r.Intn(3)]) + } + } + if r.Intn(10) != 0 { + v65 := r.Intn(10) + this.StringToMsgMap = make(map[string]*FloatingPoint) + for i := 0; i < v65; i++ { + this.StringToMsgMap[randStringMapsproto2(r)] = NewPopulatedFloatingPoint(r, easy) + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedMapsproto2(r, 18) + } + return this +} + +type randyMapsproto2 interface { + Float32() float32 + Float64() float64 + Int63() int64 + Int31() int32 + Uint32() uint32 + Intn(n int) int +} + +func randUTF8RuneMapsproto2(r randyMapsproto2) 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 randStringMapsproto2(r randyMapsproto2) string { + v66 := r.Intn(100) + tmps := make([]rune, v66) + for i := 0; i < v66; i++ { + tmps[i] = randUTF8RuneMapsproto2(r) + } + return string(tmps) +} +func randUnrecognizedMapsproto2(r randyMapsproto2, 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 = randFieldMapsproto2(data, r, fieldNumber, wire) + } + return data +} +func randFieldMapsproto2(data []byte, r randyMapsproto2, fieldNumber int, wire int) []byte { + key := uint32(fieldNumber)<<3 | uint32(wire) + switch wire { + case 0: + data = encodeVarintPopulateMapsproto2(data, uint64(key)) + v67 := r.Int63() + if r.Intn(2) == 0 { + v67 *= -1 + } + data = encodeVarintPopulateMapsproto2(data, uint64(v67)) + case 1: + data = encodeVarintPopulateMapsproto2(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 = encodeVarintPopulateMapsproto2(data, uint64(key)) + ll := r.Intn(100) + data = encodeVarintPopulateMapsproto2(data, uint64(ll)) + for j := 0; j < ll; j++ { + data = append(data, byte(r.Intn(256))) + } + default: + data = encodeVarintPopulateMapsproto2(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 encodeVarintPopulateMapsproto2(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 *FloatingPoint) Size() (n int) { + var l int + _ = l + if m.F != nil { + n += 9 + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *AllMaps) Size() (n int) { + var l int + _ = l + if len(m.StringToDoubleMap) > 0 { + for k, v := range m.StringToDoubleMap { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + 1 + 8 + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.StringToFloatMap) > 0 { + for k, v := range m.StringToFloatMap { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + 1 + 4 + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.Int32Map) > 0 { + for k, v := range m.Int32Map { + _ = k + _ = v + mapEntrySize := 1 + sovMapsproto2(uint64(k)) + 1 + sovMapsproto2(uint64(v)) + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.Int64Map) > 0 { + for k, v := range m.Int64Map { + _ = k + _ = v + mapEntrySize := 1 + sovMapsproto2(uint64(k)) + 1 + sovMapsproto2(uint64(v)) + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.Uint32Map) > 0 { + for k, v := range m.Uint32Map { + _ = k + _ = v + mapEntrySize := 1 + sovMapsproto2(uint64(k)) + 1 + sovMapsproto2(uint64(v)) + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.Uint64Map) > 0 { + for k, v := range m.Uint64Map { + _ = k + _ = v + mapEntrySize := 1 + sovMapsproto2(uint64(k)) + 1 + sovMapsproto2(uint64(v)) + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.Sint32Map) > 0 { + for k, v := range m.Sint32Map { + _ = k + _ = v + mapEntrySize := 1 + sozMapsproto2(uint64(k)) + 1 + sozMapsproto2(uint64(v)) + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.Sint64Map) > 0 { + for k, v := range m.Sint64Map { + _ = k + _ = v + mapEntrySize := 1 + sozMapsproto2(uint64(k)) + 1 + sozMapsproto2(uint64(v)) + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.Fixed32Map) > 0 { + for k, v := range m.Fixed32Map { + _ = k + _ = v + mapEntrySize := 1 + 4 + 1 + 4 + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.Sfixed32Map) > 0 { + for k, v := range m.Sfixed32Map { + _ = k + _ = v + mapEntrySize := 1 + 4 + 1 + 4 + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.Fixed64Map) > 0 { + for k, v := range m.Fixed64Map { + _ = k + _ = v + mapEntrySize := 1 + 8 + 1 + 8 + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.Sfixed64Map) > 0 { + for k, v := range m.Sfixed64Map { + _ = k + _ = v + mapEntrySize := 1 + 8 + 1 + 8 + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.BoolMap) > 0 { + for k, v := range m.BoolMap { + _ = k + _ = v + mapEntrySize := 1 + 1 + 1 + 1 + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.StringMap) > 0 { + for k, v := range m.StringMap { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + 1 + len(v) + sovMapsproto2(uint64(len(v))) + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.StringToBytesMap) > 0 { + for k, v := range m.StringToBytesMap { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + 1 + len(v) + sovMapsproto2(uint64(len(v))) + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.StringToEnumMap) > 0 { + for k, v := range m.StringToEnumMap { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + 1 + sovMapsproto2(uint64(v)) + n += mapEntrySize + 2 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.StringToMsgMap) > 0 { + for k, v := range m.StringToMsgMap { + _ = k + _ = v + l = 0 + if v != nil { + l = v.Size() + } + mapEntrySize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + 1 + l + sovMapsproto2(uint64(l)) + n += mapEntrySize + 2 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *AllMapsOrdered) Size() (n int) { + var l int + _ = l + if len(m.StringToDoubleMap) > 0 { + for k, v := range m.StringToDoubleMap { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + 1 + 8 + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.StringToFloatMap) > 0 { + for k, v := range m.StringToFloatMap { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + 1 + 4 + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.Int32Map) > 0 { + for k, v := range m.Int32Map { + _ = k + _ = v + mapEntrySize := 1 + sovMapsproto2(uint64(k)) + 1 + sovMapsproto2(uint64(v)) + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.Int64Map) > 0 { + for k, v := range m.Int64Map { + _ = k + _ = v + mapEntrySize := 1 + sovMapsproto2(uint64(k)) + 1 + sovMapsproto2(uint64(v)) + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.Uint32Map) > 0 { + for k, v := range m.Uint32Map { + _ = k + _ = v + mapEntrySize := 1 + sovMapsproto2(uint64(k)) + 1 + sovMapsproto2(uint64(v)) + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.Uint64Map) > 0 { + for k, v := range m.Uint64Map { + _ = k + _ = v + mapEntrySize := 1 + sovMapsproto2(uint64(k)) + 1 + sovMapsproto2(uint64(v)) + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.Sint32Map) > 0 { + for k, v := range m.Sint32Map { + _ = k + _ = v + mapEntrySize := 1 + sozMapsproto2(uint64(k)) + 1 + sozMapsproto2(uint64(v)) + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.Sint64Map) > 0 { + for k, v := range m.Sint64Map { + _ = k + _ = v + mapEntrySize := 1 + sozMapsproto2(uint64(k)) + 1 + sozMapsproto2(uint64(v)) + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.Fixed32Map) > 0 { + for k, v := range m.Fixed32Map { + _ = k + _ = v + mapEntrySize := 1 + 4 + 1 + 4 + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.Sfixed32Map) > 0 { + for k, v := range m.Sfixed32Map { + _ = k + _ = v + mapEntrySize := 1 + 4 + 1 + 4 + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.Fixed64Map) > 0 { + for k, v := range m.Fixed64Map { + _ = k + _ = v + mapEntrySize := 1 + 8 + 1 + 8 + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.Sfixed64Map) > 0 { + for k, v := range m.Sfixed64Map { + _ = k + _ = v + mapEntrySize := 1 + 8 + 1 + 8 + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.BoolMap) > 0 { + for k, v := range m.BoolMap { + _ = k + _ = v + mapEntrySize := 1 + 1 + 1 + 1 + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.StringMap) > 0 { + for k, v := range m.StringMap { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + 1 + len(v) + sovMapsproto2(uint64(len(v))) + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.StringToBytesMap) > 0 { + for k, v := range m.StringToBytesMap { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + 1 + len(v) + sovMapsproto2(uint64(len(v))) + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.StringToEnumMap) > 0 { + for k, v := range m.StringToEnumMap { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + 1 + sovMapsproto2(uint64(v)) + n += mapEntrySize + 2 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.StringToMsgMap) > 0 { + for k, v := range m.StringToMsgMap { + _ = k + _ = v + l = 0 + if v != nil { + l = v.Size() + } + mapEntrySize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + 1 + l + sovMapsproto2(uint64(l)) + n += mapEntrySize + 2 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func sovMapsproto2(x uint64) (n int) { + for { + n++ + x >>= 7 + if x == 0 { + break + } + } + return n +} +func sozMapsproto2(x uint64) (n int) { + return sovMapsproto2(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (this *FloatingPoint) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&FloatingPoint{`, + `F:` + valueToStringMapsproto2(this.F) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *AllMaps) String() string { + if this == nil { + return "nil" + } + keysForStringToDoubleMap := make([]string, 0, len(this.StringToDoubleMap)) + for k := range this.StringToDoubleMap { + keysForStringToDoubleMap = append(keysForStringToDoubleMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToDoubleMap) + mapStringForStringToDoubleMap := "map[string]float64{" + for _, k := range keysForStringToDoubleMap { + mapStringForStringToDoubleMap += fmt.Sprintf("%v: %v,", k, this.StringToDoubleMap[k]) + } + mapStringForStringToDoubleMap += "}" + keysForStringToFloatMap := make([]string, 0, len(this.StringToFloatMap)) + for k := range this.StringToFloatMap { + keysForStringToFloatMap = append(keysForStringToFloatMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToFloatMap) + mapStringForStringToFloatMap := "map[string]float32{" + for _, k := range keysForStringToFloatMap { + mapStringForStringToFloatMap += fmt.Sprintf("%v: %v,", k, this.StringToFloatMap[k]) + } + mapStringForStringToFloatMap += "}" + keysForInt32Map := make([]int32, 0, len(this.Int32Map)) + for k := range this.Int32Map { + keysForInt32Map = append(keysForInt32Map, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForInt32Map) + mapStringForInt32Map := "map[int32]int32{" + for _, k := range keysForInt32Map { + mapStringForInt32Map += fmt.Sprintf("%v: %v,", k, this.Int32Map[k]) + } + mapStringForInt32Map += "}" + keysForInt64Map := make([]int64, 0, len(this.Int64Map)) + for k := range this.Int64Map { + keysForInt64Map = append(keysForInt64Map, k) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForInt64Map) + mapStringForInt64Map := "map[int64]int64{" + for _, k := range keysForInt64Map { + mapStringForInt64Map += fmt.Sprintf("%v: %v,", k, this.Int64Map[k]) + } + mapStringForInt64Map += "}" + keysForUint32Map := make([]uint32, 0, len(this.Uint32Map)) + for k := range this.Uint32Map { + keysForUint32Map = append(keysForUint32Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint32s(keysForUint32Map) + mapStringForUint32Map := "map[uint32]uint32{" + for _, k := range keysForUint32Map { + mapStringForUint32Map += fmt.Sprintf("%v: %v,", k, this.Uint32Map[k]) + } + mapStringForUint32Map += "}" + keysForUint64Map := make([]uint64, 0, len(this.Uint64Map)) + for k := range this.Uint64Map { + keysForUint64Map = append(keysForUint64Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint64s(keysForUint64Map) + mapStringForUint64Map := "map[uint64]uint64{" + for _, k := range keysForUint64Map { + mapStringForUint64Map += fmt.Sprintf("%v: %v,", k, this.Uint64Map[k]) + } + mapStringForUint64Map += "}" + keysForSint32Map := make([]int32, 0, len(this.Sint32Map)) + for k := range this.Sint32Map { + keysForSint32Map = append(keysForSint32Map, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForSint32Map) + mapStringForSint32Map := "map[int32]int32{" + for _, k := range keysForSint32Map { + mapStringForSint32Map += fmt.Sprintf("%v: %v,", k, this.Sint32Map[k]) + } + mapStringForSint32Map += "}" + keysForSint64Map := make([]int64, 0, len(this.Sint64Map)) + for k := range this.Sint64Map { + keysForSint64Map = append(keysForSint64Map, k) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForSint64Map) + mapStringForSint64Map := "map[int64]int64{" + for _, k := range keysForSint64Map { + mapStringForSint64Map += fmt.Sprintf("%v: %v,", k, this.Sint64Map[k]) + } + mapStringForSint64Map += "}" + keysForFixed32Map := make([]uint32, 0, len(this.Fixed32Map)) + for k := range this.Fixed32Map { + keysForFixed32Map = append(keysForFixed32Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint32s(keysForFixed32Map) + mapStringForFixed32Map := "map[uint32]uint32{" + for _, k := range keysForFixed32Map { + mapStringForFixed32Map += fmt.Sprintf("%v: %v,", k, this.Fixed32Map[k]) + } + mapStringForFixed32Map += "}" + keysForSfixed32Map := make([]int32, 0, len(this.Sfixed32Map)) + for k := range this.Sfixed32Map { + keysForSfixed32Map = append(keysForSfixed32Map, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForSfixed32Map) + mapStringForSfixed32Map := "map[int32]int32{" + for _, k := range keysForSfixed32Map { + mapStringForSfixed32Map += fmt.Sprintf("%v: %v,", k, this.Sfixed32Map[k]) + } + mapStringForSfixed32Map += "}" + keysForFixed64Map := make([]uint64, 0, len(this.Fixed64Map)) + for k := range this.Fixed64Map { + keysForFixed64Map = append(keysForFixed64Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint64s(keysForFixed64Map) + mapStringForFixed64Map := "map[uint64]uint64{" + for _, k := range keysForFixed64Map { + mapStringForFixed64Map += fmt.Sprintf("%v: %v,", k, this.Fixed64Map[k]) + } + mapStringForFixed64Map += "}" + keysForSfixed64Map := make([]int64, 0, len(this.Sfixed64Map)) + for k := range this.Sfixed64Map { + keysForSfixed64Map = append(keysForSfixed64Map, k) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForSfixed64Map) + mapStringForSfixed64Map := "map[int64]int64{" + for _, k := range keysForSfixed64Map { + mapStringForSfixed64Map += fmt.Sprintf("%v: %v,", k, this.Sfixed64Map[k]) + } + mapStringForSfixed64Map += "}" + keysForBoolMap := make([]bool, 0, len(this.BoolMap)) + for k := range this.BoolMap { + keysForBoolMap = append(keysForBoolMap, k) + } + github_com_gogo_protobuf_sortkeys.Bools(keysForBoolMap) + mapStringForBoolMap := "map[bool]bool{" + for _, k := range keysForBoolMap { + mapStringForBoolMap += fmt.Sprintf("%v: %v,", k, this.BoolMap[k]) + } + mapStringForBoolMap += "}" + keysForStringMap := make([]string, 0, len(this.StringMap)) + for k := range this.StringMap { + keysForStringMap = append(keysForStringMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringMap) + mapStringForStringMap := "map[string]string{" + for _, k := range keysForStringMap { + mapStringForStringMap += fmt.Sprintf("%v: %v,", k, this.StringMap[k]) + } + mapStringForStringMap += "}" + keysForStringToBytesMap := make([]string, 0, len(this.StringToBytesMap)) + for k := range this.StringToBytesMap { + keysForStringToBytesMap = append(keysForStringToBytesMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToBytesMap) + mapStringForStringToBytesMap := "map[string][]byte{" + for _, k := range keysForStringToBytesMap { + mapStringForStringToBytesMap += fmt.Sprintf("%v: %v,", k, this.StringToBytesMap[k]) + } + mapStringForStringToBytesMap += "}" + keysForStringToEnumMap := make([]string, 0, len(this.StringToEnumMap)) + for k := range this.StringToEnumMap { + keysForStringToEnumMap = append(keysForStringToEnumMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToEnumMap) + mapStringForStringToEnumMap := "map[string]MapEnum{" + for _, k := range keysForStringToEnumMap { + mapStringForStringToEnumMap += fmt.Sprintf("%v: %v,", k, this.StringToEnumMap[k]) + } + mapStringForStringToEnumMap += "}" + keysForStringToMsgMap := make([]string, 0, len(this.StringToMsgMap)) + for k := range this.StringToMsgMap { + keysForStringToMsgMap = append(keysForStringToMsgMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToMsgMap) + mapStringForStringToMsgMap := "map[string]*FloatingPoint{" + for _, k := range keysForStringToMsgMap { + mapStringForStringToMsgMap += fmt.Sprintf("%v: %v,", k, this.StringToMsgMap[k]) + } + mapStringForStringToMsgMap += "}" + s := strings.Join([]string{`&AllMaps{`, + `StringToDoubleMap:` + mapStringForStringToDoubleMap + `,`, + `StringToFloatMap:` + mapStringForStringToFloatMap + `,`, + `Int32Map:` + mapStringForInt32Map + `,`, + `Int64Map:` + mapStringForInt64Map + `,`, + `Uint32Map:` + mapStringForUint32Map + `,`, + `Uint64Map:` + mapStringForUint64Map + `,`, + `Sint32Map:` + mapStringForSint32Map + `,`, + `Sint64Map:` + mapStringForSint64Map + `,`, + `Fixed32Map:` + mapStringForFixed32Map + `,`, + `Sfixed32Map:` + mapStringForSfixed32Map + `,`, + `Fixed64Map:` + mapStringForFixed64Map + `,`, + `Sfixed64Map:` + mapStringForSfixed64Map + `,`, + `BoolMap:` + mapStringForBoolMap + `,`, + `StringMap:` + mapStringForStringMap + `,`, + `StringToBytesMap:` + mapStringForStringToBytesMap + `,`, + `StringToEnumMap:` + mapStringForStringToEnumMap + `,`, + `StringToMsgMap:` + mapStringForStringToMsgMap + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *AllMapsOrdered) String() string { + if this == nil { + return "nil" + } + keysForStringToDoubleMap := make([]string, 0, len(this.StringToDoubleMap)) + for k := range this.StringToDoubleMap { + keysForStringToDoubleMap = append(keysForStringToDoubleMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToDoubleMap) + mapStringForStringToDoubleMap := "map[string]float64{" + for _, k := range keysForStringToDoubleMap { + mapStringForStringToDoubleMap += fmt.Sprintf("%v: %v,", k, this.StringToDoubleMap[k]) + } + mapStringForStringToDoubleMap += "}" + keysForStringToFloatMap := make([]string, 0, len(this.StringToFloatMap)) + for k := range this.StringToFloatMap { + keysForStringToFloatMap = append(keysForStringToFloatMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToFloatMap) + mapStringForStringToFloatMap := "map[string]float32{" + for _, k := range keysForStringToFloatMap { + mapStringForStringToFloatMap += fmt.Sprintf("%v: %v,", k, this.StringToFloatMap[k]) + } + mapStringForStringToFloatMap += "}" + keysForInt32Map := make([]int32, 0, len(this.Int32Map)) + for k := range this.Int32Map { + keysForInt32Map = append(keysForInt32Map, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForInt32Map) + mapStringForInt32Map := "map[int32]int32{" + for _, k := range keysForInt32Map { + mapStringForInt32Map += fmt.Sprintf("%v: %v,", k, this.Int32Map[k]) + } + mapStringForInt32Map += "}" + keysForInt64Map := make([]int64, 0, len(this.Int64Map)) + for k := range this.Int64Map { + keysForInt64Map = append(keysForInt64Map, k) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForInt64Map) + mapStringForInt64Map := "map[int64]int64{" + for _, k := range keysForInt64Map { + mapStringForInt64Map += fmt.Sprintf("%v: %v,", k, this.Int64Map[k]) + } + mapStringForInt64Map += "}" + keysForUint32Map := make([]uint32, 0, len(this.Uint32Map)) + for k := range this.Uint32Map { + keysForUint32Map = append(keysForUint32Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint32s(keysForUint32Map) + mapStringForUint32Map := "map[uint32]uint32{" + for _, k := range keysForUint32Map { + mapStringForUint32Map += fmt.Sprintf("%v: %v,", k, this.Uint32Map[k]) + } + mapStringForUint32Map += "}" + keysForUint64Map := make([]uint64, 0, len(this.Uint64Map)) + for k := range this.Uint64Map { + keysForUint64Map = append(keysForUint64Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint64s(keysForUint64Map) + mapStringForUint64Map := "map[uint64]uint64{" + for _, k := range keysForUint64Map { + mapStringForUint64Map += fmt.Sprintf("%v: %v,", k, this.Uint64Map[k]) + } + mapStringForUint64Map += "}" + keysForSint32Map := make([]int32, 0, len(this.Sint32Map)) + for k := range this.Sint32Map { + keysForSint32Map = append(keysForSint32Map, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForSint32Map) + mapStringForSint32Map := "map[int32]int32{" + for _, k := range keysForSint32Map { + mapStringForSint32Map += fmt.Sprintf("%v: %v,", k, this.Sint32Map[k]) + } + mapStringForSint32Map += "}" + keysForSint64Map := make([]int64, 0, len(this.Sint64Map)) + for k := range this.Sint64Map { + keysForSint64Map = append(keysForSint64Map, k) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForSint64Map) + mapStringForSint64Map := "map[int64]int64{" + for _, k := range keysForSint64Map { + mapStringForSint64Map += fmt.Sprintf("%v: %v,", k, this.Sint64Map[k]) + } + mapStringForSint64Map += "}" + keysForFixed32Map := make([]uint32, 0, len(this.Fixed32Map)) + for k := range this.Fixed32Map { + keysForFixed32Map = append(keysForFixed32Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint32s(keysForFixed32Map) + mapStringForFixed32Map := "map[uint32]uint32{" + for _, k := range keysForFixed32Map { + mapStringForFixed32Map += fmt.Sprintf("%v: %v,", k, this.Fixed32Map[k]) + } + mapStringForFixed32Map += "}" + keysForSfixed32Map := make([]int32, 0, len(this.Sfixed32Map)) + for k := range this.Sfixed32Map { + keysForSfixed32Map = append(keysForSfixed32Map, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForSfixed32Map) + mapStringForSfixed32Map := "map[int32]int32{" + for _, k := range keysForSfixed32Map { + mapStringForSfixed32Map += fmt.Sprintf("%v: %v,", k, this.Sfixed32Map[k]) + } + mapStringForSfixed32Map += "}" + keysForFixed64Map := make([]uint64, 0, len(this.Fixed64Map)) + for k := range this.Fixed64Map { + keysForFixed64Map = append(keysForFixed64Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint64s(keysForFixed64Map) + mapStringForFixed64Map := "map[uint64]uint64{" + for _, k := range keysForFixed64Map { + mapStringForFixed64Map += fmt.Sprintf("%v: %v,", k, this.Fixed64Map[k]) + } + mapStringForFixed64Map += "}" + keysForSfixed64Map := make([]int64, 0, len(this.Sfixed64Map)) + for k := range this.Sfixed64Map { + keysForSfixed64Map = append(keysForSfixed64Map, k) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForSfixed64Map) + mapStringForSfixed64Map := "map[int64]int64{" + for _, k := range keysForSfixed64Map { + mapStringForSfixed64Map += fmt.Sprintf("%v: %v,", k, this.Sfixed64Map[k]) + } + mapStringForSfixed64Map += "}" + keysForBoolMap := make([]bool, 0, len(this.BoolMap)) + for k := range this.BoolMap { + keysForBoolMap = append(keysForBoolMap, k) + } + github_com_gogo_protobuf_sortkeys.Bools(keysForBoolMap) + mapStringForBoolMap := "map[bool]bool{" + for _, k := range keysForBoolMap { + mapStringForBoolMap += fmt.Sprintf("%v: %v,", k, this.BoolMap[k]) + } + mapStringForBoolMap += "}" + keysForStringMap := make([]string, 0, len(this.StringMap)) + for k := range this.StringMap { + keysForStringMap = append(keysForStringMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringMap) + mapStringForStringMap := "map[string]string{" + for _, k := range keysForStringMap { + mapStringForStringMap += fmt.Sprintf("%v: %v,", k, this.StringMap[k]) + } + mapStringForStringMap += "}" + keysForStringToBytesMap := make([]string, 0, len(this.StringToBytesMap)) + for k := range this.StringToBytesMap { + keysForStringToBytesMap = append(keysForStringToBytesMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToBytesMap) + mapStringForStringToBytesMap := "map[string][]byte{" + for _, k := range keysForStringToBytesMap { + mapStringForStringToBytesMap += fmt.Sprintf("%v: %v,", k, this.StringToBytesMap[k]) + } + mapStringForStringToBytesMap += "}" + keysForStringToEnumMap := make([]string, 0, len(this.StringToEnumMap)) + for k := range this.StringToEnumMap { + keysForStringToEnumMap = append(keysForStringToEnumMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToEnumMap) + mapStringForStringToEnumMap := "map[string]MapEnum{" + for _, k := range keysForStringToEnumMap { + mapStringForStringToEnumMap += fmt.Sprintf("%v: %v,", k, this.StringToEnumMap[k]) + } + mapStringForStringToEnumMap += "}" + keysForStringToMsgMap := make([]string, 0, len(this.StringToMsgMap)) + for k := range this.StringToMsgMap { + keysForStringToMsgMap = append(keysForStringToMsgMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToMsgMap) + mapStringForStringToMsgMap := "map[string]*FloatingPoint{" + for _, k := range keysForStringToMsgMap { + mapStringForStringToMsgMap += fmt.Sprintf("%v: %v,", k, this.StringToMsgMap[k]) + } + mapStringForStringToMsgMap += "}" + s := strings.Join([]string{`&AllMapsOrdered{`, + `StringToDoubleMap:` + mapStringForStringToDoubleMap + `,`, + `StringToFloatMap:` + mapStringForStringToFloatMap + `,`, + `Int32Map:` + mapStringForInt32Map + `,`, + `Int64Map:` + mapStringForInt64Map + `,`, + `Uint32Map:` + mapStringForUint32Map + `,`, + `Uint64Map:` + mapStringForUint64Map + `,`, + `Sint32Map:` + mapStringForSint32Map + `,`, + `Sint64Map:` + mapStringForSint64Map + `,`, + `Fixed32Map:` + mapStringForFixed32Map + `,`, + `Sfixed32Map:` + mapStringForSfixed32Map + `,`, + `Fixed64Map:` + mapStringForFixed64Map + `,`, + `Sfixed64Map:` + mapStringForSfixed64Map + `,`, + `BoolMap:` + mapStringForBoolMap + `,`, + `StringMap:` + mapStringForStringMap + `,`, + `StringToBytesMap:` + mapStringForStringToBytesMap + `,`, + `StringToEnumMap:` + mapStringForStringToEnumMap + `,`, + `StringToMsgMap:` + mapStringForStringToMsgMap + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func valueToStringMapsproto2(v interface{}) string { + rv := reflect.ValueOf(v) + if rv.IsNil() { + return "nil" + } + pv := reflect.Indirect(rv).Interface() + return fmt.Sprintf("*%v", pv) +} + +var fileDescriptorMapsproto2 = []byte{ + // 968 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xec, 0x96, 0xbd, 0x6f, 0xdb, 0x46, + 0x18, 0xc6, 0x4d, 0x7d, 0xeb, 0xf4, 0x45, 0x9d, 0xdd, 0x42, 0x10, 0x50, 0xb9, 0x56, 0x5b, 0x40, + 0x96, 0x5b, 0xc9, 0x55, 0x8b, 0xa2, 0xb0, 0x5b, 0x03, 0x96, 0x2d, 0x57, 0x85, 0x6b, 0xd7, 0xb0, + 0xfa, 0x19, 0xc0, 0x40, 0xac, 0x98, 0x52, 0x84, 0x48, 0xa2, 0x21, 0x52, 0x41, 0xbc, 0xf9, 0xcf, + 0xc8, 0x9a, 0x2d, 0x63, 0xc6, 0x8c, 0x19, 0x3d, 0x66, 0xf4, 0x90, 0xc1, 0x76, 0x16, 0x8f, 0x1e, + 0x3d, 0xe6, 0x78, 0x47, 0x52, 0x47, 0xf2, 0x25, 0xa9, 0x6c, 0x19, 0x34, 0x1c, 0x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, 0x79, 0xb1, 0xe0, 0xf0, 0xd6, 0x74, 0x86, 0xb7, 0xb2, + 0xff, 0x5d, 0x84, 0x32, 0xdc, 0x91, 0x6b, 0x86, 0x9b, 0xea, 0x72, 0xfb, 0x45, 0xb9, 0x07, 0x6e, + 0x51, 0x6e, 0x75, 0x1a, 0xba, 0x77, 0xa2, 0xfb, 0xd7, 0x25, 0xd1, 0x55, 0xa7, 0x41, 0xcf, 0x82, + 0xdd, 0x2c, 0xd8, 0xcd, 0x82, 0xdd, 0x2c, 0xd8, 0x7d, 0x1a, 0xc1, 0x6e, 0x2d, 0xf4, 0xfc, 0xc5, + 0xa2, 0x50, 0x5e, 0x42, 0x51, 0xfd, 0x68, 0x1c, 0x41, 0x81, 0xbd, 0x4d, 0x71, 0x8e, 0xce, 0x75, + 0x51, 0xa0, 0xf3, 0x96, 0x18, 0xa8, 0xff, 0x71, 0x71, 0x5d, 0x98, 0x7b, 0x4b, 0xc6, 0x25, 0x19, + 0x57, 0xd7, 0x05, 0xe1, 0x96, 0x8c, 0x3b, 0x32, 0xee, 0xc9, 0x38, 0xbf, 0x29, 0x08, 0x2f, 0xc9, + 0x78, 0x45, 0xc6, 0x6b, 0x32, 0xde, 0x90, 0x71, 0x71, 0x43, 0xea, 0xc9, 0xb8, 0x22, 0xbf, 0x6f, + 0xc9, 0x7c, 0x47, 0xe6, 0x7b, 0x32, 0x9f, 0xbf, 0x2f, 0xcc, 0x7d, 0x08, 0x00, 0x00, 0xff, 0xff, + 0x87, 0xb4, 0x7a, 0x0b, 0x27, 0x14, 0x00, 0x00, +} diff --git a/vendor/github.com/gogo/protobuf/test/mapsproto2/combos/neither/mapsproto2.proto b/vendor/github.com/gogo/protobuf/test/mapsproto2/combos/neither/mapsproto2.proto new file mode 100644 index 000000000..4f940946a --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/mapsproto2/combos/neither/mapsproto2.proto @@ -0,0 +1,115 @@ +// Copyright (c) 2013, Vastech SA (PTY) LTD. All rights reserved. +// http://github.com/gogo/protobuf/gogoproto +// +// Go support for Protocol Buffers - Google's data interchange format +// +// Copyright 2014 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. + +syntax = "proto2"; + +package proto2.maps; + +import "github.com/gogo/protobuf/gogoproto/gogo.proto"; + +option (gogoproto.goproto_stringer_all) = false; +option (gogoproto.goproto_enum_prefix_all) = false; +option (gogoproto.goproto_getters_all) = false; + +option (gogoproto.equal_all) = true; +option (gogoproto.verbose_equal_all) = true; +option (gogoproto.stringer_all) = true; +option (gogoproto.gostring_all) = true; +option (gogoproto.face_all) = true; +option (gogoproto.description_all) = true; + +option (gogoproto.testgen_all) = true; +option (gogoproto.populate_all) = true; +option (gogoproto.benchgen_all) = true; +option (gogoproto.unmarshaler_all) = false; +option (gogoproto.marshaler_all) = false; +option (gogoproto.sizer_all) = true; + +option (gogoproto.goproto_enum_stringer_all) = false; +option (gogoproto.enum_stringer_all) = true; + +option (gogoproto.unsafe_marshaler_all) = false; +option (gogoproto.unsafe_unmarshaler_all) = false; + +message FloatingPoint { + optional double f = 1; +} + +enum MapEnum { + MA = 0; + MB = 1; + MC = 2; +} + +message AllMaps { + map StringToDoubleMap = 1; + map StringToFloatMap = 2; + map Int32Map = 3; + map Int64Map = 4; + map Uint32Map = 5; + map Uint64Map = 6; + map Sint32Map = 7; + map Sint64Map = 8; + map Fixed32Map = 9; + map Sfixed32Map = 10; + map Fixed64Map = 11; + map Sfixed64Map = 12; + map BoolMap = 13; + map StringMap = 14; + map StringToBytesMap = 15; + map StringToEnumMap = 16; + map StringToMsgMap = 17; +} + +message AllMapsOrdered { + option (gogoproto.stable_marshaler) = true; + + map StringToDoubleMap = 1; + map StringToFloatMap = 2; + map Int32Map = 3; + map Int64Map = 4; + map Uint32Map = 5; + map Uint64Map = 6; + map Sint32Map = 7; + map Sint64Map = 8; + map Fixed32Map = 9; + map Sfixed32Map = 10; + map Fixed64Map = 11; + map Sfixed64Map = 12; + map BoolMap = 13; + map StringMap = 14; + map StringToBytesMap = 15; + map StringToEnumMap = 16; + map StringToMsgMap = 17; +} diff --git a/vendor/github.com/gogo/protobuf/test/mapsproto2/combos/neither/mapsproto2pb_test.go b/vendor/github.com/gogo/protobuf/test/mapsproto2/combos/neither/mapsproto2pb_test.go new file mode 100644 index 000000000..36fdec4fb --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/mapsproto2/combos/neither/mapsproto2pb_test.go @@ -0,0 +1,668 @@ +// Code generated by protoc-gen-gogo. +// source: combos/neither/mapsproto2.proto +// DO NOT EDIT! + +/* +Package proto2_maps is a generated protocol buffer package. + +It is generated from these files: + combos/neither/mapsproto2.proto + +It has these top-level messages: + FloatingPoint + AllMaps + AllMapsOrdered +*/ +package proto2_maps + +import testing "testing" +import math_rand "math/rand" +import time "time" +import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" +import github_com_gogo_protobuf_jsonpb "github.com/gogo/protobuf/jsonpb" +import fmt "fmt" +import go_parser "go/parser" +import proto "github.com/gogo/protobuf/proto" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +func TestFloatingPointProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedFloatingPoint(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &FloatingPoint{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkFloatingPointProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*FloatingPoint, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedFloatingPoint(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkFloatingPointProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedFloatingPoint(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &FloatingPoint{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestAllMapsProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAllMaps(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &AllMaps{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkAllMapsProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*AllMaps, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedAllMaps(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkAllMapsProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedAllMaps(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &AllMaps{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestAllMapsOrderedProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAllMapsOrdered(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &AllMapsOrdered{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkAllMapsOrderedProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*AllMapsOrdered, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedAllMapsOrdered(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkAllMapsOrderedProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedAllMapsOrdered(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &AllMapsOrdered{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestFloatingPointJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedFloatingPoint(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &FloatingPoint{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestAllMapsJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAllMaps(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &AllMaps{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestAllMapsOrderedJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAllMapsOrdered(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &AllMapsOrdered{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestFloatingPointProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedFloatingPoint(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &FloatingPoint{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestFloatingPointProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedFloatingPoint(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &FloatingPoint{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestAllMapsProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAllMaps(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &AllMaps{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestAllMapsProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAllMaps(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &AllMaps{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestAllMapsOrderedProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAllMapsOrdered(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &AllMapsOrdered{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestAllMapsOrderedProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAllMapsOrdered(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &AllMapsOrdered{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestMapsproto2Description(t *testing.T) { + Mapsproto2Description() +} +func TestFloatingPointVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedFloatingPoint(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &FloatingPoint{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestAllMapsVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAllMaps(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &AllMaps{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestAllMapsOrderedVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAllMapsOrdered(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &AllMapsOrdered{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestFloatingPointFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedFloatingPoint(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestAllMapsFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAllMaps(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestAllMapsOrderedFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAllMapsOrdered(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestFloatingPointGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedFloatingPoint(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestAllMapsGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAllMaps(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestAllMapsOrderedGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAllMapsOrdered(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestFloatingPointSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedFloatingPoint(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkFloatingPointSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*FloatingPoint, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedFloatingPoint(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestAllMapsSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAllMaps(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkAllMapsSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*AllMaps, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedAllMaps(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestAllMapsOrderedSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAllMapsOrdered(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkAllMapsOrderedSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*AllMapsOrdered, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedAllMapsOrdered(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestFloatingPointStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedFloatingPoint(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestAllMapsStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAllMaps(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestAllMapsOrderedStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAllMapsOrdered(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} + +//These tests are generated by github.com/gogo/protobuf/plugin/testgen diff --git a/vendor/github.com/gogo/protobuf/test/mapsproto2/combos/unmarshaler/mapsproto2.pb.go b/vendor/github.com/gogo/protobuf/test/mapsproto2/combos/unmarshaler/mapsproto2.pb.go new file mode 100644 index 000000000..78a829d6b --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/mapsproto2/combos/unmarshaler/mapsproto2.pb.go @@ -0,0 +1,6682 @@ +// Code generated by protoc-gen-gogo. +// source: combos/unmarshaler/mapsproto2.proto +// DO NOT EDIT! + +/* + Package proto2_maps is a generated protocol buffer package. + + It is generated from these files: + combos/unmarshaler/mapsproto2.proto + + It has these top-level messages: + FloatingPoint + AllMaps + AllMapsOrdered +*/ +package proto2_maps + +import proto "github.com/gogo/protobuf/proto" +import fmt "fmt" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" + +import github_com_gogo_protobuf_protoc_gen_gogo_descriptor "github.com/gogo/protobuf/protoc-gen-gogo/descriptor" +import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" +import compress_gzip "compress/gzip" +import bytes "bytes" +import io_ioutil "io/ioutil" + +import strconv "strconv" + +import strings "strings" +import sort "sort" +import reflect "reflect" +import github_com_gogo_protobuf_sortkeys "github.com/gogo/protobuf/sortkeys" + +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. +const _ = proto.GoGoProtoPackageIsVersion1 + +type MapEnum int32 + +const ( + MA MapEnum = 0 + MB MapEnum = 1 + MC MapEnum = 2 +) + +var MapEnum_name = map[int32]string{ + 0: "MA", + 1: "MB", + 2: "MC", +} +var MapEnum_value = map[string]int32{ + "MA": 0, + "MB": 1, + "MC": 2, +} + +func (x MapEnum) Enum() *MapEnum { + p := new(MapEnum) + *p = x + return p +} +func (x MapEnum) MarshalJSON() ([]byte, error) { + return proto.MarshalJSONEnum(MapEnum_name, int32(x)) +} +func (x *MapEnum) UnmarshalJSON(data []byte) error { + value, err := proto.UnmarshalJSONEnum(MapEnum_value, data, "MapEnum") + if err != nil { + return err + } + *x = MapEnum(value) + return nil +} +func (MapEnum) EnumDescriptor() ([]byte, []int) { return fileDescriptorMapsproto2, []int{0} } + +type FloatingPoint struct { + F *float64 `protobuf:"fixed64,1,opt,name=f" json:"f,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *FloatingPoint) Reset() { *m = FloatingPoint{} } +func (*FloatingPoint) ProtoMessage() {} +func (*FloatingPoint) Descriptor() ([]byte, []int) { return fileDescriptorMapsproto2, []int{0} } + +type AllMaps struct { + StringToDoubleMap map[string]float64 `protobuf:"bytes,1,rep,name=StringToDoubleMap,json=stringToDoubleMap" json:"StringToDoubleMap,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"fixed64,2,opt,name=value"` + StringToFloatMap map[string]float32 `protobuf:"bytes,2,rep,name=StringToFloatMap,json=stringToFloatMap" json:"StringToFloatMap,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"fixed32,2,opt,name=value"` + Int32Map map[int32]int32 `protobuf:"bytes,3,rep,name=Int32Map,json=int32Map" json:"Int32Map,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"varint,2,opt,name=value"` + Int64Map map[int64]int64 `protobuf:"bytes,4,rep,name=Int64Map,json=int64Map" json:"Int64Map,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"varint,2,opt,name=value"` + Uint32Map map[uint32]uint32 `protobuf:"bytes,5,rep,name=Uint32Map,json=uint32Map" json:"Uint32Map,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"varint,2,opt,name=value"` + Uint64Map map[uint64]uint64 `protobuf:"bytes,6,rep,name=Uint64Map,json=uint64Map" json:"Uint64Map,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"varint,2,opt,name=value"` + Sint32Map map[int32]int32 `protobuf:"bytes,7,rep,name=Sint32Map,json=sint32Map" json:"Sint32Map,omitempty" protobuf_key:"zigzag32,1,opt,name=key" protobuf_val:"zigzag32,2,opt,name=value"` + Sint64Map map[int64]int64 `protobuf:"bytes,8,rep,name=Sint64Map,json=sint64Map" json:"Sint64Map,omitempty" protobuf_key:"zigzag64,1,opt,name=key" protobuf_val:"zigzag64,2,opt,name=value"` + Fixed32Map map[uint32]uint32 `protobuf:"bytes,9,rep,name=Fixed32Map,json=fixed32Map" json:"Fixed32Map,omitempty" protobuf_key:"fixed32,1,opt,name=key" protobuf_val:"fixed32,2,opt,name=value"` + Sfixed32Map map[int32]int32 `protobuf:"bytes,10,rep,name=Sfixed32Map,json=sfixed32Map" json:"Sfixed32Map,omitempty" protobuf_key:"fixed32,1,opt,name=key" protobuf_val:"fixed32,2,opt,name=value"` + Fixed64Map map[uint64]uint64 `protobuf:"bytes,11,rep,name=Fixed64Map,json=fixed64Map" json:"Fixed64Map,omitempty" protobuf_key:"fixed64,1,opt,name=key" protobuf_val:"fixed64,2,opt,name=value"` + Sfixed64Map map[int64]int64 `protobuf:"bytes,12,rep,name=Sfixed64Map,json=sfixed64Map" json:"Sfixed64Map,omitempty" protobuf_key:"fixed64,1,opt,name=key" protobuf_val:"fixed64,2,opt,name=value"` + BoolMap map[bool]bool `protobuf:"bytes,13,rep,name=BoolMap,json=boolMap" json:"BoolMap,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"varint,2,opt,name=value"` + StringMap map[string]string `protobuf:"bytes,14,rep,name=StringMap,json=stringMap" json:"StringMap,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + StringToBytesMap map[string][]byte `protobuf:"bytes,15,rep,name=StringToBytesMap,json=stringToBytesMap" json:"StringToBytesMap,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + StringToEnumMap map[string]MapEnum `protobuf:"bytes,16,rep,name=StringToEnumMap,json=stringToEnumMap" json:"StringToEnumMap,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"varint,2,opt,name=value,enum=proto2.maps.MapEnum"` + StringToMsgMap map[string]*FloatingPoint `protobuf:"bytes,17,rep,name=StringToMsgMap,json=stringToMsgMap" json:"StringToMsgMap,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *AllMaps) Reset() { *m = AllMaps{} } +func (*AllMaps) ProtoMessage() {} +func (*AllMaps) Descriptor() ([]byte, []int) { return fileDescriptorMapsproto2, []int{1} } + +type AllMapsOrdered struct { + StringToDoubleMap map[string]float64 `protobuf:"bytes,1,rep,name=StringToDoubleMap,json=stringToDoubleMap" json:"StringToDoubleMap,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"fixed64,2,opt,name=value"` + StringToFloatMap map[string]float32 `protobuf:"bytes,2,rep,name=StringToFloatMap,json=stringToFloatMap" json:"StringToFloatMap,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"fixed32,2,opt,name=value"` + Int32Map map[int32]int32 `protobuf:"bytes,3,rep,name=Int32Map,json=int32Map" json:"Int32Map,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"varint,2,opt,name=value"` + Int64Map map[int64]int64 `protobuf:"bytes,4,rep,name=Int64Map,json=int64Map" json:"Int64Map,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"varint,2,opt,name=value"` + Uint32Map map[uint32]uint32 `protobuf:"bytes,5,rep,name=Uint32Map,json=uint32Map" json:"Uint32Map,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"varint,2,opt,name=value"` + Uint64Map map[uint64]uint64 `protobuf:"bytes,6,rep,name=Uint64Map,json=uint64Map" json:"Uint64Map,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"varint,2,opt,name=value"` + Sint32Map map[int32]int32 `protobuf:"bytes,7,rep,name=Sint32Map,json=sint32Map" json:"Sint32Map,omitempty" protobuf_key:"zigzag32,1,opt,name=key" protobuf_val:"zigzag32,2,opt,name=value"` + Sint64Map map[int64]int64 `protobuf:"bytes,8,rep,name=Sint64Map,json=sint64Map" json:"Sint64Map,omitempty" protobuf_key:"zigzag64,1,opt,name=key" protobuf_val:"zigzag64,2,opt,name=value"` + Fixed32Map map[uint32]uint32 `protobuf:"bytes,9,rep,name=Fixed32Map,json=fixed32Map" json:"Fixed32Map,omitempty" protobuf_key:"fixed32,1,opt,name=key" protobuf_val:"fixed32,2,opt,name=value"` + Sfixed32Map map[int32]int32 `protobuf:"bytes,10,rep,name=Sfixed32Map,json=sfixed32Map" json:"Sfixed32Map,omitempty" protobuf_key:"fixed32,1,opt,name=key" protobuf_val:"fixed32,2,opt,name=value"` + Fixed64Map map[uint64]uint64 `protobuf:"bytes,11,rep,name=Fixed64Map,json=fixed64Map" json:"Fixed64Map,omitempty" protobuf_key:"fixed64,1,opt,name=key" protobuf_val:"fixed64,2,opt,name=value"` + Sfixed64Map map[int64]int64 `protobuf:"bytes,12,rep,name=Sfixed64Map,json=sfixed64Map" json:"Sfixed64Map,omitempty" protobuf_key:"fixed64,1,opt,name=key" protobuf_val:"fixed64,2,opt,name=value"` + BoolMap map[bool]bool `protobuf:"bytes,13,rep,name=BoolMap,json=boolMap" json:"BoolMap,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"varint,2,opt,name=value"` + StringMap map[string]string `protobuf:"bytes,14,rep,name=StringMap,json=stringMap" json:"StringMap,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + StringToBytesMap map[string][]byte `protobuf:"bytes,15,rep,name=StringToBytesMap,json=stringToBytesMap" json:"StringToBytesMap,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + StringToEnumMap map[string]MapEnum `protobuf:"bytes,16,rep,name=StringToEnumMap,json=stringToEnumMap" json:"StringToEnumMap,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"varint,2,opt,name=value,enum=proto2.maps.MapEnum"` + StringToMsgMap map[string]*FloatingPoint `protobuf:"bytes,17,rep,name=StringToMsgMap,json=stringToMsgMap" json:"StringToMsgMap,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *AllMapsOrdered) Reset() { *m = AllMapsOrdered{} } +func (*AllMapsOrdered) ProtoMessage() {} +func (*AllMapsOrdered) Descriptor() ([]byte, []int) { return fileDescriptorMapsproto2, []int{2} } + +func init() { + proto.RegisterType((*FloatingPoint)(nil), "proto2.maps.FloatingPoint") + proto.RegisterType((*AllMaps)(nil), "proto2.maps.AllMaps") + proto.RegisterType((*AllMapsOrdered)(nil), "proto2.maps.AllMapsOrdered") + proto.RegisterEnum("proto2.maps.MapEnum", MapEnum_name, MapEnum_value) +} +func (this *FloatingPoint) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return Mapsproto2Description() +} +func (this *AllMaps) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return Mapsproto2Description() +} +func (this *AllMapsOrdered) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return Mapsproto2Description() +} +func Mapsproto2Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + d := &github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet{} + var gzipped = []byte{ + // 4102 bytes of a gzipped FileDescriptorSet + 0x1f, 0x8b, 0x08,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0x55, 0x46, 0x86, 0x30, 0x96, 0x79, 0x9f, 0x00, 0x35, 0xd4, 0xca, + 0x26, 0xa4, 0x68, 0x74, 0x61, 0x14, 0x17, 0x77, 0xd7, 0x37, 0x6a, 0xbb, 0x8d, 0x83, 0xc3, 0xa3, + 0x9d, 0x83, 0xfd, 0xf5, 0x5d, 0xf4, 0x9d, 0x27, 0xd3, 0x6a, 0x3f, 0x75, 0xbc, 0xa3, 0xd5, 0xb6, + 0xd0, 0x7f, 0x92, 0xec, 0xb0, 0xb6, 0x7e, 0x84, 0xb2, 0x44, 0x65, 0x19, 0x16, 0xc3, 0xf2, 0x4c, + 0xd8, 0xca, 0xa8, 0x7c, 0x31, 0x06, 0x0b, 0x21, 0x29, 0x33, 0x74, 0x15, 0x7d, 0x12, 0x52, 0x2c, + 0xd2, 0x58, 0x11, 0x79, 0x20, 0x34, 0xf7, 0xd2, 0xb8, 0x1b, 0x2b, 0x24, 0x14, 0x27, 0x17, 0xd2, + 0xc4, 0x84, 0x42, 0x4a, 0x28, 0xc6, 0xc2, 0xe9, 0x95, 0x18, 0x94, 0x27, 0x71, 0x47, 0xac, 0xf7, + 0xb8, 0x6f, 0xbd, 0x3f, 0x1e, 0x34, 0xe0, 0xf2, 0xe4, 0x67, 0x18, 0xb3, 0xe2, 0xcd, 0x18, 0x5c, + 0x08, 0xef, 0x37, 0x42, 0x6d, 0x78, 0x02, 0xd2, 0x3d, 0xc3, 0x3d, 0xb5, 0x45, 0xcd, 0xfd, 0x60, + 0x48, 0x26, 0x27, 0xc3, 0x41, 0x5f, 0x71, 0x94, 0x5c, 0x0a, 0x12, 0x93, 0x9a, 0x06, 0x66, 0xcd, + 0x98, 0xa5, 0x9f, 0x89, 0xc3, 0xed, 0xa1, 0xe4, 0xa1, 0x86, 0xde, 0x0d, 0xd0, 0xb5, 0xfa, 0x43, + 0x97, 0xd5, 0x55, 0x96, 0x66, 0x72, 0x54, 0x42, 0x97, 0x30, 0x49, 0x21, 0x43, 0xd7, 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, 0x6f, 0x95, 0xef, 0xa5, 0x6e, + 0x2a, 0x91, 0x01, 0x1a, 0x5a, 0x87, 0x54, 0xac, 0x3e, 0x80, 0xe4, 0xce, 0xa9, 0x3e, 0xe8, 0xd3, + 0x22, 0xed, 0xa0, 0x53, 0x8d, 0xf2, 0x7d, 0x4c, 0x95, 0xc9, 0xf7, 0x85, 0x58, 0xad, 0xc1, 0x25, + 0xf2, 0xf0, 0x96, 0x6e, 0xd9, 0x8d, 0xa1, 0x63, 0x34, 0x46, 0x26, 0x7a, 0x73, 0xf1, 0x41, 0x62, + 0x96, 0x76, 0x97, 0x50, 0x3b, 0x76, 0x30, 0x99, 0x09, 0x25, 0x31, 0x3d, 0x37, 0x61, 0x71, 0x68, + 0x75, 0x2d, 0x0c, 0x71, 0x1c, 0x21, 0x60, 0xb6, 0x60, 0xcb, 0xff, 0x9a, 0x99, 0xd0, 0x74, 0x1f, + 0xcb, 0xda, 0x2c, 0x48, 0xb4, 0x85, 0xe1, 0xb8, 0xb0, 0x52, 0x85, 0x82, 0x1c, 0x3b, 0x6a, 0x0e, + 0x58, 0xf4, 0x60, 0x75, 0xc3, 0x8a, 0xba, 0x79, 0xb0, 0x45, 0x6a, 0xe1, 0xb3, 0x35, 0x2c, 0x6c, + 0x58, 0x93, 0x77, 0x77, 0x8e, 0x6a, 0x0d, 0xed, 0x78, 0xff, 0x68, 0x67, 0xaf, 0xa6, 0x24, 0x96, + 0x73, 0xd9, 0xb7, 0x33, 0xca, 0xcb, 0xf8, 0x17, 0xaf, 0x7c, 0x23, 0x0e, 0x45, 0x7f, 0x1f, 0xac, + 0x7e, 0x1c, 0xee, 0x10, 0x9b, 0x56, 0xc7, 0x70, 0x1b, 0x2f, 0x75, 0x07, 0x34, 0x9c, 0x7b, 0x3a, + 0xeb, 0x24, 0xbd, 0x99, 0x58, 0xe4, 0x5a, 0xb8, 0xbd, 0x7f, 0x1a, 0x75, 0xae, 0x53, 0x15, 0x75, + 0x17, 0x2e, 0xa1, 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 0xb0, 0x77, 0xc1, 0xb5, 0xea, 0xa8, + 0xcf, 0xc0, 0x3c, 0xeb, 0x18, 0x8e, 0xec, 0x2d, 0x7a, 0xca, 0x88, 0x52, 0x7e, 0x58, 0xf7, 0xe0, + 0x8a, 0x64, 0xc2, 0x0a, 0x07, 0xac, 0x8c, 0x69, 0xd3, 0x9f, 0x9e, 0xb4, 0x79, 0x27, 0x28, 0x57, + 0x9f, 0x02, 0x45, 0x28, 0x53, 0x6b, 0x08, 0x33, 0x3b, 0xa2, 0x5d, 0x9e, 0xca, 0x2c, 0x94, 0x19, + 0xb1, 0xe2, 0x04, 0xc4, 0xea, 0x13, 0x90, 0xdd, 0xb1, 0xdc, 0x8f, 0xae, 0x11, 0x3e, 0xf6, 0x4a, + 0x60, 0x25, 0x94, 0x4f, 0x28, 0x31, 0x9e, 0x6c, 0x97, 0x5f, 0x72, 0xfc, 0x23, 0x1f, 0x23, 0xf8, + 0xe4, 0x74, 0x3c, 0x55, 0x1a, 0xe1, 0xe9, 0x25, 0x79, 0xa5, 0xf0, 0x58, 0x90, 0xf1, 0x37, 0x01, + 0xaf, 0x84, 0x12, 0x78, 0x5a, 0x8c, 0x21, 0x37, 0xf4, 0x4c, 0xe0, 0x14, 0xcc, 0x86, 0x74, 0x04, + 0x85, 0x64, 0x04, 0xa5, 0xf0, 0xac, 0xa8, 0x7b, 0x56, 0x64, 0xa6, 0x50, 0xd4, 0x03, 0x56, 0x38, + 0xb2, 0x15, 0x75, 0xcf, 0x8a, 0x6c, 0x04, 0x85, 0x6c, 0x85, 0xe3, 0x59, 0xb1, 0x05, 0x70, 0xbd, + 0x7b, 0xcb, 0x68, 0x31, 0x33, 0x72, 0xfc, 0xb0, 0x3f, 0x8c, 0x63, 0xa4, 0xc6, 0x48, 0xa0, 0xed, + 0x09, 0xd4, 0x6d, 0xc8, 0xd7, 0x47, 0x97, 0xf4, 0x6d, 0x41, 0xf2, 0x22, 0x64, 0xa8, 0x29, 0xed, + 0x00, 0x4f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0x32, 0xf8, 0xe3, 0x50, 0xf4, 0xe7, 0x21, + 0x19, 0x3d, 0x17, 0x82, 0x9e, 0x0b, 0x41, 0x87, 0xdf, 0x3b, 0x19, 0x82, 0x4e, 0x06, 0xd0, 0xf5, + 0x89, 0xf7, 0x9e, 0x0f, 0x41, 0xcf, 0x87, 0xa0, 0xc3, 0xef, 0xad, 0x86, 0xa0, 0x55, 0x19, 0xfd, + 0x09, 0x28, 0x05, 0x52, 0x8e, 0x0c, 0xcf, 0x84, 0xc0, 0x33, 0x32, 0xfc, 0x09, 0x5c, 0x3a, 0xed, + 0xc9, 0xf8, 0x52, 0x08, 0xbe, 0x14, 0x76, 0xfb, 0x70, 0xeb, 0xd3, 0x21, 0xf0, 0x74, 0xe8, 0xed, + 0xc3, 0xf1, 0x4a, 0x08, 0x5e, 0x91, 0xf1, 0x55, 0x28, 0xc8, 0x59, 0x45, 0xc6, 0x66, 0x43, 0xb0, + 0xd9, 0xa0, 0xdf, 0x7d, 0x29, 0x25, 0x2a, 0xd2, 0x73, 0x13, 0x96, 0x8b, 0x2f, 0x8d, 0x44, 0x91, + 0x14, 0x64, 0x92, 0x9b, 0xb0, 0x18, 0x96, 0x34, 0x42, 0x38, 0x96, 0x65, 0x8e, 0xe2, 0xda, 0xa2, + 0x2f, 0x59, 0x50, 0xdc, 0xb0, 0x27, 0x33, 0x3f, 0x07, 0x0b, 0x21, 0xa9, 0x23, 0x84, 0xf8, 0x21, + 0x99, 0x38, 0xbf, 0xb6, 0xe4, 0x23, 0xf6, 0x75, 0x57, 0x12, 0x7d, 0xe5, 0xdb, 0x0b, 0x50, 0xe4, + 0x29, 0xea, 0x60, 0xd0, 0x32, 0x06, 0xd8, 0xf2, 0xff, 0xcc, 0xe4, 0x0e, 0x6b, 0x2d, 0x2c, 0xb5, + 0x71, 0xdc, 0x39, 0x1a, 0xad, 0xe7, 0x26, 0x36, 0x5a, 0x1f, 0x99, 0xe5, 0x06, 0x51, 0xfd, 0x56, + 0x6d, 0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 0xf1, 0x8d, 0xdd, 0x6f, 0x7e, 0xf7, 0xe2, 0x6d, 0xff, + 0x88, 0x9f, 0x6f, 0xe1, 0xe7, 0x3b, 0xdf, 0xbd, 0x18, 0x7b, 0x1b, 0x3f, 0xef, 0xe0, 0xe7, 0x07, + 0xf8, 0x79, 0xf9, 0x7b, 0x17, 0x63, 0x5f, 0xc2, 0xcf, 0x57, 0xf1, 0xf3, 0xd7, 0xf8, 0xf9, 0x3a, + 0x7e, 0xbe, 0xf9, 0x3d, 0xd4, 0xc7, 0xff, 0xdf, 0xc1, 0xcf, 0xdb, 0xf8, 0xfd, 0x1d, 0xfc, 0xff, + 0x03, 0xfc, 0xff, 0xf2, 0xbf, 0x5c, 0xbc, 0xed, 0xff, 0x02, 0x00, 0x00, 0xff, 0xff, 0x22, 0x46, + 0x25, 0x7d, 0x98, 0x3e, 0x00, 0x00, + } + r := bytes.NewReader(gzipped) + gzipr, err := compress_gzip.NewReader(r) + if err != nil { + panic(err) + } + ungzipped, err := io_ioutil.ReadAll(gzipr) + if err != nil { + panic(err) + } + if err := github_com_gogo_protobuf_proto.Unmarshal(ungzipped, d); err != nil { + panic(err) + } + return d +} +func (x MapEnum) String() string { + s, ok := MapEnum_name[int32(x)] + if ok { + return s + } + return strconv.Itoa(int(x)) +} +func (this *FloatingPoint) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*FloatingPoint) + if !ok { + that2, ok := that.(FloatingPoint) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *FloatingPoint") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *FloatingPoint but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *FloatingPoint but is not nil && this == nil") + } + if this.F != nil && that1.F != nil { + if *this.F != *that1.F { + return fmt.Errorf("F this(%v) Not Equal that(%v)", *this.F, *that1.F) + } + } else if this.F != nil { + return fmt.Errorf("this.F == nil && that.F != nil") + } else if that1.F != nil { + return fmt.Errorf("F this(%v) Not Equal that(%v)", this.F, that1.F) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *FloatingPoint) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*FloatingPoint) + if !ok { + that2, ok := that.(FloatingPoint) + 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.F != nil && that1.F != nil { + if *this.F != *that1.F { + return false + } + } else if this.F != nil { + return false + } else if that1.F != nil { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *AllMaps) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*AllMaps) + if !ok { + that2, ok := that.(AllMaps) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *AllMaps") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *AllMaps but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *AllMaps but is not nil && this == nil") + } + if len(this.StringToDoubleMap) != len(that1.StringToDoubleMap) { + return fmt.Errorf("StringToDoubleMap this(%v) Not Equal that(%v)", len(this.StringToDoubleMap), len(that1.StringToDoubleMap)) + } + for i := range this.StringToDoubleMap { + if this.StringToDoubleMap[i] != that1.StringToDoubleMap[i] { + return fmt.Errorf("StringToDoubleMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringToDoubleMap[i], i, that1.StringToDoubleMap[i]) + } + } + if len(this.StringToFloatMap) != len(that1.StringToFloatMap) { + return fmt.Errorf("StringToFloatMap this(%v) Not Equal that(%v)", len(this.StringToFloatMap), len(that1.StringToFloatMap)) + } + for i := range this.StringToFloatMap { + if this.StringToFloatMap[i] != that1.StringToFloatMap[i] { + return fmt.Errorf("StringToFloatMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringToFloatMap[i], i, that1.StringToFloatMap[i]) + } + } + if len(this.Int32Map) != len(that1.Int32Map) { + return fmt.Errorf("Int32Map this(%v) Not Equal that(%v)", len(this.Int32Map), len(that1.Int32Map)) + } + for i := range this.Int32Map { + if this.Int32Map[i] != that1.Int32Map[i] { + return fmt.Errorf("Int32Map this[%v](%v) Not Equal that[%v](%v)", i, this.Int32Map[i], i, that1.Int32Map[i]) + } + } + if len(this.Int64Map) != len(that1.Int64Map) { + return fmt.Errorf("Int64Map this(%v) Not Equal that(%v)", len(this.Int64Map), len(that1.Int64Map)) + } + for i := range this.Int64Map { + if this.Int64Map[i] != that1.Int64Map[i] { + return fmt.Errorf("Int64Map this[%v](%v) Not Equal that[%v](%v)", i, this.Int64Map[i], i, that1.Int64Map[i]) + } + } + if len(this.Uint32Map) != len(that1.Uint32Map) { + return fmt.Errorf("Uint32Map this(%v) Not Equal that(%v)", len(this.Uint32Map), len(that1.Uint32Map)) + } + for i := range this.Uint32Map { + if this.Uint32Map[i] != that1.Uint32Map[i] { + return fmt.Errorf("Uint32Map this[%v](%v) Not Equal that[%v](%v)", i, this.Uint32Map[i], i, that1.Uint32Map[i]) + } + } + if len(this.Uint64Map) != len(that1.Uint64Map) { + return fmt.Errorf("Uint64Map this(%v) Not Equal that(%v)", len(this.Uint64Map), len(that1.Uint64Map)) + } + for i := range this.Uint64Map { + if this.Uint64Map[i] != that1.Uint64Map[i] { + return fmt.Errorf("Uint64Map this[%v](%v) Not Equal that[%v](%v)", i, this.Uint64Map[i], i, that1.Uint64Map[i]) + } + } + if len(this.Sint32Map) != len(that1.Sint32Map) { + return fmt.Errorf("Sint32Map this(%v) Not Equal that(%v)", len(this.Sint32Map), len(that1.Sint32Map)) + } + for i := range this.Sint32Map { + if this.Sint32Map[i] != that1.Sint32Map[i] { + return fmt.Errorf("Sint32Map this[%v](%v) Not Equal that[%v](%v)", i, this.Sint32Map[i], i, that1.Sint32Map[i]) + } + } + if len(this.Sint64Map) != len(that1.Sint64Map) { + return fmt.Errorf("Sint64Map this(%v) Not Equal that(%v)", len(this.Sint64Map), len(that1.Sint64Map)) + } + for i := range this.Sint64Map { + if this.Sint64Map[i] != that1.Sint64Map[i] { + return fmt.Errorf("Sint64Map this[%v](%v) Not Equal that[%v](%v)", i, this.Sint64Map[i], i, that1.Sint64Map[i]) + } + } + if len(this.Fixed32Map) != len(that1.Fixed32Map) { + return fmt.Errorf("Fixed32Map this(%v) Not Equal that(%v)", len(this.Fixed32Map), len(that1.Fixed32Map)) + } + for i := range this.Fixed32Map { + if this.Fixed32Map[i] != that1.Fixed32Map[i] { + return fmt.Errorf("Fixed32Map this[%v](%v) Not Equal that[%v](%v)", i, this.Fixed32Map[i], i, that1.Fixed32Map[i]) + } + } + if len(this.Sfixed32Map) != len(that1.Sfixed32Map) { + return fmt.Errorf("Sfixed32Map this(%v) Not Equal that(%v)", len(this.Sfixed32Map), len(that1.Sfixed32Map)) + } + for i := range this.Sfixed32Map { + if this.Sfixed32Map[i] != that1.Sfixed32Map[i] { + return fmt.Errorf("Sfixed32Map this[%v](%v) Not Equal that[%v](%v)", i, this.Sfixed32Map[i], i, that1.Sfixed32Map[i]) + } + } + if len(this.Fixed64Map) != len(that1.Fixed64Map) { + return fmt.Errorf("Fixed64Map this(%v) Not Equal that(%v)", len(this.Fixed64Map), len(that1.Fixed64Map)) + } + for i := range this.Fixed64Map { + if this.Fixed64Map[i] != that1.Fixed64Map[i] { + return fmt.Errorf("Fixed64Map this[%v](%v) Not Equal that[%v](%v)", i, this.Fixed64Map[i], i, that1.Fixed64Map[i]) + } + } + if len(this.Sfixed64Map) != len(that1.Sfixed64Map) { + return fmt.Errorf("Sfixed64Map this(%v) Not Equal that(%v)", len(this.Sfixed64Map), len(that1.Sfixed64Map)) + } + for i := range this.Sfixed64Map { + if this.Sfixed64Map[i] != that1.Sfixed64Map[i] { + return fmt.Errorf("Sfixed64Map this[%v](%v) Not Equal that[%v](%v)", i, this.Sfixed64Map[i], i, that1.Sfixed64Map[i]) + } + } + if len(this.BoolMap) != len(that1.BoolMap) { + return fmt.Errorf("BoolMap this(%v) Not Equal that(%v)", len(this.BoolMap), len(that1.BoolMap)) + } + for i := range this.BoolMap { + if this.BoolMap[i] != that1.BoolMap[i] { + return fmt.Errorf("BoolMap this[%v](%v) Not Equal that[%v](%v)", i, this.BoolMap[i], i, that1.BoolMap[i]) + } + } + if len(this.StringMap) != len(that1.StringMap) { + return fmt.Errorf("StringMap this(%v) Not Equal that(%v)", len(this.StringMap), len(that1.StringMap)) + } + for i := range this.StringMap { + if this.StringMap[i] != that1.StringMap[i] { + return fmt.Errorf("StringMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringMap[i], i, that1.StringMap[i]) + } + } + if len(this.StringToBytesMap) != len(that1.StringToBytesMap) { + return fmt.Errorf("StringToBytesMap this(%v) Not Equal that(%v)", len(this.StringToBytesMap), len(that1.StringToBytesMap)) + } + for i := range this.StringToBytesMap { + if !bytes.Equal(this.StringToBytesMap[i], that1.StringToBytesMap[i]) { + return fmt.Errorf("StringToBytesMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringToBytesMap[i], i, that1.StringToBytesMap[i]) + } + } + if len(this.StringToEnumMap) != len(that1.StringToEnumMap) { + return fmt.Errorf("StringToEnumMap this(%v) Not Equal that(%v)", len(this.StringToEnumMap), len(that1.StringToEnumMap)) + } + for i := range this.StringToEnumMap { + if this.StringToEnumMap[i] != that1.StringToEnumMap[i] { + return fmt.Errorf("StringToEnumMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringToEnumMap[i], i, that1.StringToEnumMap[i]) + } + } + if len(this.StringToMsgMap) != len(that1.StringToMsgMap) { + return fmt.Errorf("StringToMsgMap this(%v) Not Equal that(%v)", len(this.StringToMsgMap), len(that1.StringToMsgMap)) + } + for i := range this.StringToMsgMap { + if !this.StringToMsgMap[i].Equal(that1.StringToMsgMap[i]) { + return fmt.Errorf("StringToMsgMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringToMsgMap[i], i, that1.StringToMsgMap[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *AllMaps) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*AllMaps) + if !ok { + that2, ok := that.(AllMaps) + 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.StringToDoubleMap) != len(that1.StringToDoubleMap) { + return false + } + for i := range this.StringToDoubleMap { + if this.StringToDoubleMap[i] != that1.StringToDoubleMap[i] { + return false + } + } + if len(this.StringToFloatMap) != len(that1.StringToFloatMap) { + return false + } + for i := range this.StringToFloatMap { + if this.StringToFloatMap[i] != that1.StringToFloatMap[i] { + return false + } + } + if len(this.Int32Map) != len(that1.Int32Map) { + return false + } + for i := range this.Int32Map { + if this.Int32Map[i] != that1.Int32Map[i] { + return false + } + } + if len(this.Int64Map) != len(that1.Int64Map) { + return false + } + for i := range this.Int64Map { + if this.Int64Map[i] != that1.Int64Map[i] { + return false + } + } + if len(this.Uint32Map) != len(that1.Uint32Map) { + return false + } + for i := range this.Uint32Map { + if this.Uint32Map[i] != that1.Uint32Map[i] { + return false + } + } + if len(this.Uint64Map) != len(that1.Uint64Map) { + return false + } + for i := range this.Uint64Map { + if this.Uint64Map[i] != that1.Uint64Map[i] { + return false + } + } + if len(this.Sint32Map) != len(that1.Sint32Map) { + return false + } + for i := range this.Sint32Map { + if this.Sint32Map[i] != that1.Sint32Map[i] { + return false + } + } + if len(this.Sint64Map) != len(that1.Sint64Map) { + return false + } + for i := range this.Sint64Map { + if this.Sint64Map[i] != that1.Sint64Map[i] { + return false + } + } + if len(this.Fixed32Map) != len(that1.Fixed32Map) { + return false + } + for i := range this.Fixed32Map { + if this.Fixed32Map[i] != that1.Fixed32Map[i] { + return false + } + } + if len(this.Sfixed32Map) != len(that1.Sfixed32Map) { + return false + } + for i := range this.Sfixed32Map { + if this.Sfixed32Map[i] != that1.Sfixed32Map[i] { + return false + } + } + if len(this.Fixed64Map) != len(that1.Fixed64Map) { + return false + } + for i := range this.Fixed64Map { + if this.Fixed64Map[i] != that1.Fixed64Map[i] { + return false + } + } + if len(this.Sfixed64Map) != len(that1.Sfixed64Map) { + return false + } + for i := range this.Sfixed64Map { + if this.Sfixed64Map[i] != that1.Sfixed64Map[i] { + return false + } + } + if len(this.BoolMap) != len(that1.BoolMap) { + return false + } + for i := range this.BoolMap { + if this.BoolMap[i] != that1.BoolMap[i] { + return false + } + } + if len(this.StringMap) != len(that1.StringMap) { + return false + } + for i := range this.StringMap { + if this.StringMap[i] != that1.StringMap[i] { + return false + } + } + if len(this.StringToBytesMap) != len(that1.StringToBytesMap) { + return false + } + for i := range this.StringToBytesMap { + if !bytes.Equal(this.StringToBytesMap[i], that1.StringToBytesMap[i]) { + return false + } + } + if len(this.StringToEnumMap) != len(that1.StringToEnumMap) { + return false + } + for i := range this.StringToEnumMap { + if this.StringToEnumMap[i] != that1.StringToEnumMap[i] { + return false + } + } + if len(this.StringToMsgMap) != len(that1.StringToMsgMap) { + return false + } + for i := range this.StringToMsgMap { + if !this.StringToMsgMap[i].Equal(that1.StringToMsgMap[i]) { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *AllMapsOrdered) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*AllMapsOrdered) + if !ok { + that2, ok := that.(AllMapsOrdered) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *AllMapsOrdered") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *AllMapsOrdered but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *AllMapsOrdered but is not nil && this == nil") + } + if len(this.StringToDoubleMap) != len(that1.StringToDoubleMap) { + return fmt.Errorf("StringToDoubleMap this(%v) Not Equal that(%v)", len(this.StringToDoubleMap), len(that1.StringToDoubleMap)) + } + for i := range this.StringToDoubleMap { + if this.StringToDoubleMap[i] != that1.StringToDoubleMap[i] { + return fmt.Errorf("StringToDoubleMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringToDoubleMap[i], i, that1.StringToDoubleMap[i]) + } + } + if len(this.StringToFloatMap) != len(that1.StringToFloatMap) { + return fmt.Errorf("StringToFloatMap this(%v) Not Equal that(%v)", len(this.StringToFloatMap), len(that1.StringToFloatMap)) + } + for i := range this.StringToFloatMap { + if this.StringToFloatMap[i] != that1.StringToFloatMap[i] { + return fmt.Errorf("StringToFloatMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringToFloatMap[i], i, that1.StringToFloatMap[i]) + } + } + if len(this.Int32Map) != len(that1.Int32Map) { + return fmt.Errorf("Int32Map this(%v) Not Equal that(%v)", len(this.Int32Map), len(that1.Int32Map)) + } + for i := range this.Int32Map { + if this.Int32Map[i] != that1.Int32Map[i] { + return fmt.Errorf("Int32Map this[%v](%v) Not Equal that[%v](%v)", i, this.Int32Map[i], i, that1.Int32Map[i]) + } + } + if len(this.Int64Map) != len(that1.Int64Map) { + return fmt.Errorf("Int64Map this(%v) Not Equal that(%v)", len(this.Int64Map), len(that1.Int64Map)) + } + for i := range this.Int64Map { + if this.Int64Map[i] != that1.Int64Map[i] { + return fmt.Errorf("Int64Map this[%v](%v) Not Equal that[%v](%v)", i, this.Int64Map[i], i, that1.Int64Map[i]) + } + } + if len(this.Uint32Map) != len(that1.Uint32Map) { + return fmt.Errorf("Uint32Map this(%v) Not Equal that(%v)", len(this.Uint32Map), len(that1.Uint32Map)) + } + for i := range this.Uint32Map { + if this.Uint32Map[i] != that1.Uint32Map[i] { + return fmt.Errorf("Uint32Map this[%v](%v) Not Equal that[%v](%v)", i, this.Uint32Map[i], i, that1.Uint32Map[i]) + } + } + if len(this.Uint64Map) != len(that1.Uint64Map) { + return fmt.Errorf("Uint64Map this(%v) Not Equal that(%v)", len(this.Uint64Map), len(that1.Uint64Map)) + } + for i := range this.Uint64Map { + if this.Uint64Map[i] != that1.Uint64Map[i] { + return fmt.Errorf("Uint64Map this[%v](%v) Not Equal that[%v](%v)", i, this.Uint64Map[i], i, that1.Uint64Map[i]) + } + } + if len(this.Sint32Map) != len(that1.Sint32Map) { + return fmt.Errorf("Sint32Map this(%v) Not Equal that(%v)", len(this.Sint32Map), len(that1.Sint32Map)) + } + for i := range this.Sint32Map { + if this.Sint32Map[i] != that1.Sint32Map[i] { + return fmt.Errorf("Sint32Map this[%v](%v) Not Equal that[%v](%v)", i, this.Sint32Map[i], i, that1.Sint32Map[i]) + } + } + if len(this.Sint64Map) != len(that1.Sint64Map) { + return fmt.Errorf("Sint64Map this(%v) Not Equal that(%v)", len(this.Sint64Map), len(that1.Sint64Map)) + } + for i := range this.Sint64Map { + if this.Sint64Map[i] != that1.Sint64Map[i] { + return fmt.Errorf("Sint64Map this[%v](%v) Not Equal that[%v](%v)", i, this.Sint64Map[i], i, that1.Sint64Map[i]) + } + } + if len(this.Fixed32Map) != len(that1.Fixed32Map) { + return fmt.Errorf("Fixed32Map this(%v) Not Equal that(%v)", len(this.Fixed32Map), len(that1.Fixed32Map)) + } + for i := range this.Fixed32Map { + if this.Fixed32Map[i] != that1.Fixed32Map[i] { + return fmt.Errorf("Fixed32Map this[%v](%v) Not Equal that[%v](%v)", i, this.Fixed32Map[i], i, that1.Fixed32Map[i]) + } + } + if len(this.Sfixed32Map) != len(that1.Sfixed32Map) { + return fmt.Errorf("Sfixed32Map this(%v) Not Equal that(%v)", len(this.Sfixed32Map), len(that1.Sfixed32Map)) + } + for i := range this.Sfixed32Map { + if this.Sfixed32Map[i] != that1.Sfixed32Map[i] { + return fmt.Errorf("Sfixed32Map this[%v](%v) Not Equal that[%v](%v)", i, this.Sfixed32Map[i], i, that1.Sfixed32Map[i]) + } + } + if len(this.Fixed64Map) != len(that1.Fixed64Map) { + return fmt.Errorf("Fixed64Map this(%v) Not Equal that(%v)", len(this.Fixed64Map), len(that1.Fixed64Map)) + } + for i := range this.Fixed64Map { + if this.Fixed64Map[i] != that1.Fixed64Map[i] { + return fmt.Errorf("Fixed64Map this[%v](%v) Not Equal that[%v](%v)", i, this.Fixed64Map[i], i, that1.Fixed64Map[i]) + } + } + if len(this.Sfixed64Map) != len(that1.Sfixed64Map) { + return fmt.Errorf("Sfixed64Map this(%v) Not Equal that(%v)", len(this.Sfixed64Map), len(that1.Sfixed64Map)) + } + for i := range this.Sfixed64Map { + if this.Sfixed64Map[i] != that1.Sfixed64Map[i] { + return fmt.Errorf("Sfixed64Map this[%v](%v) Not Equal that[%v](%v)", i, this.Sfixed64Map[i], i, that1.Sfixed64Map[i]) + } + } + if len(this.BoolMap) != len(that1.BoolMap) { + return fmt.Errorf("BoolMap this(%v) Not Equal that(%v)", len(this.BoolMap), len(that1.BoolMap)) + } + for i := range this.BoolMap { + if this.BoolMap[i] != that1.BoolMap[i] { + return fmt.Errorf("BoolMap this[%v](%v) Not Equal that[%v](%v)", i, this.BoolMap[i], i, that1.BoolMap[i]) + } + } + if len(this.StringMap) != len(that1.StringMap) { + return fmt.Errorf("StringMap this(%v) Not Equal that(%v)", len(this.StringMap), len(that1.StringMap)) + } + for i := range this.StringMap { + if this.StringMap[i] != that1.StringMap[i] { + return fmt.Errorf("StringMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringMap[i], i, that1.StringMap[i]) + } + } + if len(this.StringToBytesMap) != len(that1.StringToBytesMap) { + return fmt.Errorf("StringToBytesMap this(%v) Not Equal that(%v)", len(this.StringToBytesMap), len(that1.StringToBytesMap)) + } + for i := range this.StringToBytesMap { + if !bytes.Equal(this.StringToBytesMap[i], that1.StringToBytesMap[i]) { + return fmt.Errorf("StringToBytesMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringToBytesMap[i], i, that1.StringToBytesMap[i]) + } + } + if len(this.StringToEnumMap) != len(that1.StringToEnumMap) { + return fmt.Errorf("StringToEnumMap this(%v) Not Equal that(%v)", len(this.StringToEnumMap), len(that1.StringToEnumMap)) + } + for i := range this.StringToEnumMap { + if this.StringToEnumMap[i] != that1.StringToEnumMap[i] { + return fmt.Errorf("StringToEnumMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringToEnumMap[i], i, that1.StringToEnumMap[i]) + } + } + if len(this.StringToMsgMap) != len(that1.StringToMsgMap) { + return fmt.Errorf("StringToMsgMap this(%v) Not Equal that(%v)", len(this.StringToMsgMap), len(that1.StringToMsgMap)) + } + for i := range this.StringToMsgMap { + if !this.StringToMsgMap[i].Equal(that1.StringToMsgMap[i]) { + return fmt.Errorf("StringToMsgMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringToMsgMap[i], i, that1.StringToMsgMap[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *AllMapsOrdered) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*AllMapsOrdered) + if !ok { + that2, ok := that.(AllMapsOrdered) + 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.StringToDoubleMap) != len(that1.StringToDoubleMap) { + return false + } + for i := range this.StringToDoubleMap { + if this.StringToDoubleMap[i] != that1.StringToDoubleMap[i] { + return false + } + } + if len(this.StringToFloatMap) != len(that1.StringToFloatMap) { + return false + } + for i := range this.StringToFloatMap { + if this.StringToFloatMap[i] != that1.StringToFloatMap[i] { + return false + } + } + if len(this.Int32Map) != len(that1.Int32Map) { + return false + } + for i := range this.Int32Map { + if this.Int32Map[i] != that1.Int32Map[i] { + return false + } + } + if len(this.Int64Map) != len(that1.Int64Map) { + return false + } + for i := range this.Int64Map { + if this.Int64Map[i] != that1.Int64Map[i] { + return false + } + } + if len(this.Uint32Map) != len(that1.Uint32Map) { + return false + } + for i := range this.Uint32Map { + if this.Uint32Map[i] != that1.Uint32Map[i] { + return false + } + } + if len(this.Uint64Map) != len(that1.Uint64Map) { + return false + } + for i := range this.Uint64Map { + if this.Uint64Map[i] != that1.Uint64Map[i] { + return false + } + } + if len(this.Sint32Map) != len(that1.Sint32Map) { + return false + } + for i := range this.Sint32Map { + if this.Sint32Map[i] != that1.Sint32Map[i] { + return false + } + } + if len(this.Sint64Map) != len(that1.Sint64Map) { + return false + } + for i := range this.Sint64Map { + if this.Sint64Map[i] != that1.Sint64Map[i] { + return false + } + } + if len(this.Fixed32Map) != len(that1.Fixed32Map) { + return false + } + for i := range this.Fixed32Map { + if this.Fixed32Map[i] != that1.Fixed32Map[i] { + return false + } + } + if len(this.Sfixed32Map) != len(that1.Sfixed32Map) { + return false + } + for i := range this.Sfixed32Map { + if this.Sfixed32Map[i] != that1.Sfixed32Map[i] { + return false + } + } + if len(this.Fixed64Map) != len(that1.Fixed64Map) { + return false + } + for i := range this.Fixed64Map { + if this.Fixed64Map[i] != that1.Fixed64Map[i] { + return false + } + } + if len(this.Sfixed64Map) != len(that1.Sfixed64Map) { + return false + } + for i := range this.Sfixed64Map { + if this.Sfixed64Map[i] != that1.Sfixed64Map[i] { + return false + } + } + if len(this.BoolMap) != len(that1.BoolMap) { + return false + } + for i := range this.BoolMap { + if this.BoolMap[i] != that1.BoolMap[i] { + return false + } + } + if len(this.StringMap) != len(that1.StringMap) { + return false + } + for i := range this.StringMap { + if this.StringMap[i] != that1.StringMap[i] { + return false + } + } + if len(this.StringToBytesMap) != len(that1.StringToBytesMap) { + return false + } + for i := range this.StringToBytesMap { + if !bytes.Equal(this.StringToBytesMap[i], that1.StringToBytesMap[i]) { + return false + } + } + if len(this.StringToEnumMap) != len(that1.StringToEnumMap) { + return false + } + for i := range this.StringToEnumMap { + if this.StringToEnumMap[i] != that1.StringToEnumMap[i] { + return false + } + } + if len(this.StringToMsgMap) != len(that1.StringToMsgMap) { + return false + } + for i := range this.StringToMsgMap { + if !this.StringToMsgMap[i].Equal(that1.StringToMsgMap[i]) { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} + +type FloatingPointFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetF() *float64 +} + +func (this *FloatingPoint) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *FloatingPoint) TestProto() github_com_gogo_protobuf_proto.Message { + return NewFloatingPointFromFace(this) +} + +func (this *FloatingPoint) GetF() *float64 { + return this.F +} + +func NewFloatingPointFromFace(that FloatingPointFace) *FloatingPoint { + this := &FloatingPoint{} + this.F = that.GetF() + return this +} + +type AllMapsFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetStringToDoubleMap() map[string]float64 + GetStringToFloatMap() map[string]float32 + GetInt32Map() map[int32]int32 + GetInt64Map() map[int64]int64 + GetUint32Map() map[uint32]uint32 + GetUint64Map() map[uint64]uint64 + GetSint32Map() map[int32]int32 + GetSint64Map() map[int64]int64 + GetFixed32Map() map[uint32]uint32 + GetSfixed32Map() map[int32]int32 + GetFixed64Map() map[uint64]uint64 + GetSfixed64Map() map[int64]int64 + GetBoolMap() map[bool]bool + GetStringMap() map[string]string + GetStringToBytesMap() map[string][]byte + GetStringToEnumMap() map[string]MapEnum + GetStringToMsgMap() map[string]*FloatingPoint +} + +func (this *AllMaps) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *AllMaps) TestProto() github_com_gogo_protobuf_proto.Message { + return NewAllMapsFromFace(this) +} + +func (this *AllMaps) GetStringToDoubleMap() map[string]float64 { + return this.StringToDoubleMap +} + +func (this *AllMaps) GetStringToFloatMap() map[string]float32 { + return this.StringToFloatMap +} + +func (this *AllMaps) GetInt32Map() map[int32]int32 { + return this.Int32Map +} + +func (this *AllMaps) GetInt64Map() map[int64]int64 { + return this.Int64Map +} + +func (this *AllMaps) GetUint32Map() map[uint32]uint32 { + return this.Uint32Map +} + +func (this *AllMaps) GetUint64Map() map[uint64]uint64 { + return this.Uint64Map +} + +func (this *AllMaps) GetSint32Map() map[int32]int32 { + return this.Sint32Map +} + +func (this *AllMaps) GetSint64Map() map[int64]int64 { + return this.Sint64Map +} + +func (this *AllMaps) GetFixed32Map() map[uint32]uint32 { + return this.Fixed32Map +} + +func (this *AllMaps) GetSfixed32Map() map[int32]int32 { + return this.Sfixed32Map +} + +func (this *AllMaps) GetFixed64Map() map[uint64]uint64 { + return this.Fixed64Map +} + +func (this *AllMaps) GetSfixed64Map() map[int64]int64 { + return this.Sfixed64Map +} + +func (this *AllMaps) GetBoolMap() map[bool]bool { + return this.BoolMap +} + +func (this *AllMaps) GetStringMap() map[string]string { + return this.StringMap +} + +func (this *AllMaps) GetStringToBytesMap() map[string][]byte { + return this.StringToBytesMap +} + +func (this *AllMaps) GetStringToEnumMap() map[string]MapEnum { + return this.StringToEnumMap +} + +func (this *AllMaps) GetStringToMsgMap() map[string]*FloatingPoint { + return this.StringToMsgMap +} + +func NewAllMapsFromFace(that AllMapsFace) *AllMaps { + this := &AllMaps{} + this.StringToDoubleMap = that.GetStringToDoubleMap() + this.StringToFloatMap = that.GetStringToFloatMap() + this.Int32Map = that.GetInt32Map() + this.Int64Map = that.GetInt64Map() + this.Uint32Map = that.GetUint32Map() + this.Uint64Map = that.GetUint64Map() + this.Sint32Map = that.GetSint32Map() + this.Sint64Map = that.GetSint64Map() + this.Fixed32Map = that.GetFixed32Map() + this.Sfixed32Map = that.GetSfixed32Map() + this.Fixed64Map = that.GetFixed64Map() + this.Sfixed64Map = that.GetSfixed64Map() + this.BoolMap = that.GetBoolMap() + this.StringMap = that.GetStringMap() + this.StringToBytesMap = that.GetStringToBytesMap() + this.StringToEnumMap = that.GetStringToEnumMap() + this.StringToMsgMap = that.GetStringToMsgMap() + return this +} + +type AllMapsOrderedFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetStringToDoubleMap() map[string]float64 + GetStringToFloatMap() map[string]float32 + GetInt32Map() map[int32]int32 + GetInt64Map() map[int64]int64 + GetUint32Map() map[uint32]uint32 + GetUint64Map() map[uint64]uint64 + GetSint32Map() map[int32]int32 + GetSint64Map() map[int64]int64 + GetFixed32Map() map[uint32]uint32 + GetSfixed32Map() map[int32]int32 + GetFixed64Map() map[uint64]uint64 + GetSfixed64Map() map[int64]int64 + GetBoolMap() map[bool]bool + GetStringMap() map[string]string + GetStringToBytesMap() map[string][]byte + GetStringToEnumMap() map[string]MapEnum + GetStringToMsgMap() map[string]*FloatingPoint +} + +func (this *AllMapsOrdered) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *AllMapsOrdered) TestProto() github_com_gogo_protobuf_proto.Message { + return NewAllMapsOrderedFromFace(this) +} + +func (this *AllMapsOrdered) GetStringToDoubleMap() map[string]float64 { + return this.StringToDoubleMap +} + +func (this *AllMapsOrdered) GetStringToFloatMap() map[string]float32 { + return this.StringToFloatMap +} + +func (this *AllMapsOrdered) GetInt32Map() map[int32]int32 { + return this.Int32Map +} + +func (this *AllMapsOrdered) GetInt64Map() map[int64]int64 { + return this.Int64Map +} + +func (this *AllMapsOrdered) GetUint32Map() map[uint32]uint32 { + return this.Uint32Map +} + +func (this *AllMapsOrdered) GetUint64Map() map[uint64]uint64 { + return this.Uint64Map +} + +func (this *AllMapsOrdered) GetSint32Map() map[int32]int32 { + return this.Sint32Map +} + +func (this *AllMapsOrdered) GetSint64Map() map[int64]int64 { + return this.Sint64Map +} + +func (this *AllMapsOrdered) GetFixed32Map() map[uint32]uint32 { + return this.Fixed32Map +} + +func (this *AllMapsOrdered) GetSfixed32Map() map[int32]int32 { + return this.Sfixed32Map +} + +func (this *AllMapsOrdered) GetFixed64Map() map[uint64]uint64 { + return this.Fixed64Map +} + +func (this *AllMapsOrdered) GetSfixed64Map() map[int64]int64 { + return this.Sfixed64Map +} + +func (this *AllMapsOrdered) GetBoolMap() map[bool]bool { + return this.BoolMap +} + +func (this *AllMapsOrdered) GetStringMap() map[string]string { + return this.StringMap +} + +func (this *AllMapsOrdered) GetStringToBytesMap() map[string][]byte { + return this.StringToBytesMap +} + +func (this *AllMapsOrdered) GetStringToEnumMap() map[string]MapEnum { + return this.StringToEnumMap +} + +func (this *AllMapsOrdered) GetStringToMsgMap() map[string]*FloatingPoint { + return this.StringToMsgMap +} + +func NewAllMapsOrderedFromFace(that AllMapsOrderedFace) *AllMapsOrdered { + this := &AllMapsOrdered{} + this.StringToDoubleMap = that.GetStringToDoubleMap() + this.StringToFloatMap = that.GetStringToFloatMap() + this.Int32Map = that.GetInt32Map() + this.Int64Map = that.GetInt64Map() + this.Uint32Map = that.GetUint32Map() + this.Uint64Map = that.GetUint64Map() + this.Sint32Map = that.GetSint32Map() + this.Sint64Map = that.GetSint64Map() + this.Fixed32Map = that.GetFixed32Map() + this.Sfixed32Map = that.GetSfixed32Map() + this.Fixed64Map = that.GetFixed64Map() + this.Sfixed64Map = that.GetSfixed64Map() + this.BoolMap = that.GetBoolMap() + this.StringMap = that.GetStringMap() + this.StringToBytesMap = that.GetStringToBytesMap() + this.StringToEnumMap = that.GetStringToEnumMap() + this.StringToMsgMap = that.GetStringToMsgMap() + return this +} + +func (this *FloatingPoint) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&proto2_maps.FloatingPoint{") + if this.F != nil { + s = append(s, "F: "+valueToGoStringMapsproto2(this.F, "float64")+",\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 *AllMaps) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 21) + s = append(s, "&proto2_maps.AllMaps{") + keysForStringToDoubleMap := make([]string, 0, len(this.StringToDoubleMap)) + for k := range this.StringToDoubleMap { + keysForStringToDoubleMap = append(keysForStringToDoubleMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToDoubleMap) + mapStringForStringToDoubleMap := "map[string]float64{" + for _, k := range keysForStringToDoubleMap { + mapStringForStringToDoubleMap += fmt.Sprintf("%#v: %#v,", k, this.StringToDoubleMap[k]) + } + mapStringForStringToDoubleMap += "}" + if this.StringToDoubleMap != nil { + s = append(s, "StringToDoubleMap: "+mapStringForStringToDoubleMap+",\n") + } + keysForStringToFloatMap := make([]string, 0, len(this.StringToFloatMap)) + for k := range this.StringToFloatMap { + keysForStringToFloatMap = append(keysForStringToFloatMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToFloatMap) + mapStringForStringToFloatMap := "map[string]float32{" + for _, k := range keysForStringToFloatMap { + mapStringForStringToFloatMap += fmt.Sprintf("%#v: %#v,", k, this.StringToFloatMap[k]) + } + mapStringForStringToFloatMap += "}" + if this.StringToFloatMap != nil { + s = append(s, "StringToFloatMap: "+mapStringForStringToFloatMap+",\n") + } + keysForInt32Map := make([]int32, 0, len(this.Int32Map)) + for k := range this.Int32Map { + keysForInt32Map = append(keysForInt32Map, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForInt32Map) + mapStringForInt32Map := "map[int32]int32{" + for _, k := range keysForInt32Map { + mapStringForInt32Map += fmt.Sprintf("%#v: %#v,", k, this.Int32Map[k]) + } + mapStringForInt32Map += "}" + if this.Int32Map != nil { + s = append(s, "Int32Map: "+mapStringForInt32Map+",\n") + } + keysForInt64Map := make([]int64, 0, len(this.Int64Map)) + for k := range this.Int64Map { + keysForInt64Map = append(keysForInt64Map, k) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForInt64Map) + mapStringForInt64Map := "map[int64]int64{" + for _, k := range keysForInt64Map { + mapStringForInt64Map += fmt.Sprintf("%#v: %#v,", k, this.Int64Map[k]) + } + mapStringForInt64Map += "}" + if this.Int64Map != nil { + s = append(s, "Int64Map: "+mapStringForInt64Map+",\n") + } + keysForUint32Map := make([]uint32, 0, len(this.Uint32Map)) + for k := range this.Uint32Map { + keysForUint32Map = append(keysForUint32Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint32s(keysForUint32Map) + mapStringForUint32Map := "map[uint32]uint32{" + for _, k := range keysForUint32Map { + mapStringForUint32Map += fmt.Sprintf("%#v: %#v,", k, this.Uint32Map[k]) + } + mapStringForUint32Map += "}" + if this.Uint32Map != nil { + s = append(s, "Uint32Map: "+mapStringForUint32Map+",\n") + } + keysForUint64Map := make([]uint64, 0, len(this.Uint64Map)) + for k := range this.Uint64Map { + keysForUint64Map = append(keysForUint64Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint64s(keysForUint64Map) + mapStringForUint64Map := "map[uint64]uint64{" + for _, k := range keysForUint64Map { + mapStringForUint64Map += fmt.Sprintf("%#v: %#v,", k, this.Uint64Map[k]) + } + mapStringForUint64Map += "}" + if this.Uint64Map != nil { + s = append(s, "Uint64Map: "+mapStringForUint64Map+",\n") + } + keysForSint32Map := make([]int32, 0, len(this.Sint32Map)) + for k := range this.Sint32Map { + keysForSint32Map = append(keysForSint32Map, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForSint32Map) + mapStringForSint32Map := "map[int32]int32{" + for _, k := range keysForSint32Map { + mapStringForSint32Map += fmt.Sprintf("%#v: %#v,", k, this.Sint32Map[k]) + } + mapStringForSint32Map += "}" + if this.Sint32Map != nil { + s = append(s, "Sint32Map: "+mapStringForSint32Map+",\n") + } + keysForSint64Map := make([]int64, 0, len(this.Sint64Map)) + for k := range this.Sint64Map { + keysForSint64Map = append(keysForSint64Map, k) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForSint64Map) + mapStringForSint64Map := "map[int64]int64{" + for _, k := range keysForSint64Map { + mapStringForSint64Map += fmt.Sprintf("%#v: %#v,", k, this.Sint64Map[k]) + } + mapStringForSint64Map += "}" + if this.Sint64Map != nil { + s = append(s, "Sint64Map: "+mapStringForSint64Map+",\n") + } + keysForFixed32Map := make([]uint32, 0, len(this.Fixed32Map)) + for k := range this.Fixed32Map { + keysForFixed32Map = append(keysForFixed32Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint32s(keysForFixed32Map) + mapStringForFixed32Map := "map[uint32]uint32{" + for _, k := range keysForFixed32Map { + mapStringForFixed32Map += fmt.Sprintf("%#v: %#v,", k, this.Fixed32Map[k]) + } + mapStringForFixed32Map += "}" + if this.Fixed32Map != nil { + s = append(s, "Fixed32Map: "+mapStringForFixed32Map+",\n") + } + keysForSfixed32Map := make([]int32, 0, len(this.Sfixed32Map)) + for k := range this.Sfixed32Map { + keysForSfixed32Map = append(keysForSfixed32Map, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForSfixed32Map) + mapStringForSfixed32Map := "map[int32]int32{" + for _, k := range keysForSfixed32Map { + mapStringForSfixed32Map += fmt.Sprintf("%#v: %#v,", k, this.Sfixed32Map[k]) + } + mapStringForSfixed32Map += "}" + if this.Sfixed32Map != nil { + s = append(s, "Sfixed32Map: "+mapStringForSfixed32Map+",\n") + } + keysForFixed64Map := make([]uint64, 0, len(this.Fixed64Map)) + for k := range this.Fixed64Map { + keysForFixed64Map = append(keysForFixed64Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint64s(keysForFixed64Map) + mapStringForFixed64Map := "map[uint64]uint64{" + for _, k := range keysForFixed64Map { + mapStringForFixed64Map += fmt.Sprintf("%#v: %#v,", k, this.Fixed64Map[k]) + } + mapStringForFixed64Map += "}" + if this.Fixed64Map != nil { + s = append(s, "Fixed64Map: "+mapStringForFixed64Map+",\n") + } + keysForSfixed64Map := make([]int64, 0, len(this.Sfixed64Map)) + for k := range this.Sfixed64Map { + keysForSfixed64Map = append(keysForSfixed64Map, k) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForSfixed64Map) + mapStringForSfixed64Map := "map[int64]int64{" + for _, k := range keysForSfixed64Map { + mapStringForSfixed64Map += fmt.Sprintf("%#v: %#v,", k, this.Sfixed64Map[k]) + } + mapStringForSfixed64Map += "}" + if this.Sfixed64Map != nil { + s = append(s, "Sfixed64Map: "+mapStringForSfixed64Map+",\n") + } + keysForBoolMap := make([]bool, 0, len(this.BoolMap)) + for k := range this.BoolMap { + keysForBoolMap = append(keysForBoolMap, k) + } + github_com_gogo_protobuf_sortkeys.Bools(keysForBoolMap) + mapStringForBoolMap := "map[bool]bool{" + for _, k := range keysForBoolMap { + mapStringForBoolMap += fmt.Sprintf("%#v: %#v,", k, this.BoolMap[k]) + } + mapStringForBoolMap += "}" + if this.BoolMap != nil { + s = append(s, "BoolMap: "+mapStringForBoolMap+",\n") + } + keysForStringMap := make([]string, 0, len(this.StringMap)) + for k := range this.StringMap { + keysForStringMap = append(keysForStringMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringMap) + mapStringForStringMap := "map[string]string{" + for _, k := range keysForStringMap { + mapStringForStringMap += fmt.Sprintf("%#v: %#v,", k, this.StringMap[k]) + } + mapStringForStringMap += "}" + if this.StringMap != nil { + s = append(s, "StringMap: "+mapStringForStringMap+",\n") + } + keysForStringToBytesMap := make([]string, 0, len(this.StringToBytesMap)) + for k := range this.StringToBytesMap { + keysForStringToBytesMap = append(keysForStringToBytesMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToBytesMap) + mapStringForStringToBytesMap := "map[string][]byte{" + for _, k := range keysForStringToBytesMap { + mapStringForStringToBytesMap += fmt.Sprintf("%#v: %#v,", k, this.StringToBytesMap[k]) + } + mapStringForStringToBytesMap += "}" + if this.StringToBytesMap != nil { + s = append(s, "StringToBytesMap: "+mapStringForStringToBytesMap+",\n") + } + keysForStringToEnumMap := make([]string, 0, len(this.StringToEnumMap)) + for k := range this.StringToEnumMap { + keysForStringToEnumMap = append(keysForStringToEnumMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToEnumMap) + mapStringForStringToEnumMap := "map[string]MapEnum{" + for _, k := range keysForStringToEnumMap { + mapStringForStringToEnumMap += fmt.Sprintf("%#v: %#v,", k, this.StringToEnumMap[k]) + } + mapStringForStringToEnumMap += "}" + if this.StringToEnumMap != nil { + s = append(s, "StringToEnumMap: "+mapStringForStringToEnumMap+",\n") + } + keysForStringToMsgMap := make([]string, 0, len(this.StringToMsgMap)) + for k := range this.StringToMsgMap { + keysForStringToMsgMap = append(keysForStringToMsgMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToMsgMap) + mapStringForStringToMsgMap := "map[string]*FloatingPoint{" + for _, k := range keysForStringToMsgMap { + mapStringForStringToMsgMap += fmt.Sprintf("%#v: %#v,", k, this.StringToMsgMap[k]) + } + mapStringForStringToMsgMap += "}" + if this.StringToMsgMap != nil { + s = append(s, "StringToMsgMap: "+mapStringForStringToMsgMap+",\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 *AllMapsOrdered) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 21) + s = append(s, "&proto2_maps.AllMapsOrdered{") + keysForStringToDoubleMap := make([]string, 0, len(this.StringToDoubleMap)) + for k := range this.StringToDoubleMap { + keysForStringToDoubleMap = append(keysForStringToDoubleMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToDoubleMap) + mapStringForStringToDoubleMap := "map[string]float64{" + for _, k := range keysForStringToDoubleMap { + mapStringForStringToDoubleMap += fmt.Sprintf("%#v: %#v,", k, this.StringToDoubleMap[k]) + } + mapStringForStringToDoubleMap += "}" + if this.StringToDoubleMap != nil { + s = append(s, "StringToDoubleMap: "+mapStringForStringToDoubleMap+",\n") + } + keysForStringToFloatMap := make([]string, 0, len(this.StringToFloatMap)) + for k := range this.StringToFloatMap { + keysForStringToFloatMap = append(keysForStringToFloatMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToFloatMap) + mapStringForStringToFloatMap := "map[string]float32{" + for _, k := range keysForStringToFloatMap { + mapStringForStringToFloatMap += fmt.Sprintf("%#v: %#v,", k, this.StringToFloatMap[k]) + } + mapStringForStringToFloatMap += "}" + if this.StringToFloatMap != nil { + s = append(s, "StringToFloatMap: "+mapStringForStringToFloatMap+",\n") + } + keysForInt32Map := make([]int32, 0, len(this.Int32Map)) + for k := range this.Int32Map { + keysForInt32Map = append(keysForInt32Map, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForInt32Map) + mapStringForInt32Map := "map[int32]int32{" + for _, k := range keysForInt32Map { + mapStringForInt32Map += fmt.Sprintf("%#v: %#v,", k, this.Int32Map[k]) + } + mapStringForInt32Map += "}" + if this.Int32Map != nil { + s = append(s, "Int32Map: "+mapStringForInt32Map+",\n") + } + keysForInt64Map := make([]int64, 0, len(this.Int64Map)) + for k := range this.Int64Map { + keysForInt64Map = append(keysForInt64Map, k) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForInt64Map) + mapStringForInt64Map := "map[int64]int64{" + for _, k := range keysForInt64Map { + mapStringForInt64Map += fmt.Sprintf("%#v: %#v,", k, this.Int64Map[k]) + } + mapStringForInt64Map += "}" + if this.Int64Map != nil { + s = append(s, "Int64Map: "+mapStringForInt64Map+",\n") + } + keysForUint32Map := make([]uint32, 0, len(this.Uint32Map)) + for k := range this.Uint32Map { + keysForUint32Map = append(keysForUint32Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint32s(keysForUint32Map) + mapStringForUint32Map := "map[uint32]uint32{" + for _, k := range keysForUint32Map { + mapStringForUint32Map += fmt.Sprintf("%#v: %#v,", k, this.Uint32Map[k]) + } + mapStringForUint32Map += "}" + if this.Uint32Map != nil { + s = append(s, "Uint32Map: "+mapStringForUint32Map+",\n") + } + keysForUint64Map := make([]uint64, 0, len(this.Uint64Map)) + for k := range this.Uint64Map { + keysForUint64Map = append(keysForUint64Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint64s(keysForUint64Map) + mapStringForUint64Map := "map[uint64]uint64{" + for _, k := range keysForUint64Map { + mapStringForUint64Map += fmt.Sprintf("%#v: %#v,", k, this.Uint64Map[k]) + } + mapStringForUint64Map += "}" + if this.Uint64Map != nil { + s = append(s, "Uint64Map: "+mapStringForUint64Map+",\n") + } + keysForSint32Map := make([]int32, 0, len(this.Sint32Map)) + for k := range this.Sint32Map { + keysForSint32Map = append(keysForSint32Map, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForSint32Map) + mapStringForSint32Map := "map[int32]int32{" + for _, k := range keysForSint32Map { + mapStringForSint32Map += fmt.Sprintf("%#v: %#v,", k, this.Sint32Map[k]) + } + mapStringForSint32Map += "}" + if this.Sint32Map != nil { + s = append(s, "Sint32Map: "+mapStringForSint32Map+",\n") + } + keysForSint64Map := make([]int64, 0, len(this.Sint64Map)) + for k := range this.Sint64Map { + keysForSint64Map = append(keysForSint64Map, k) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForSint64Map) + mapStringForSint64Map := "map[int64]int64{" + for _, k := range keysForSint64Map { + mapStringForSint64Map += fmt.Sprintf("%#v: %#v,", k, this.Sint64Map[k]) + } + mapStringForSint64Map += "}" + if this.Sint64Map != nil { + s = append(s, "Sint64Map: "+mapStringForSint64Map+",\n") + } + keysForFixed32Map := make([]uint32, 0, len(this.Fixed32Map)) + for k := range this.Fixed32Map { + keysForFixed32Map = append(keysForFixed32Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint32s(keysForFixed32Map) + mapStringForFixed32Map := "map[uint32]uint32{" + for _, k := range keysForFixed32Map { + mapStringForFixed32Map += fmt.Sprintf("%#v: %#v,", k, this.Fixed32Map[k]) + } + mapStringForFixed32Map += "}" + if this.Fixed32Map != nil { + s = append(s, "Fixed32Map: "+mapStringForFixed32Map+",\n") + } + keysForSfixed32Map := make([]int32, 0, len(this.Sfixed32Map)) + for k := range this.Sfixed32Map { + keysForSfixed32Map = append(keysForSfixed32Map, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForSfixed32Map) + mapStringForSfixed32Map := "map[int32]int32{" + for _, k := range keysForSfixed32Map { + mapStringForSfixed32Map += fmt.Sprintf("%#v: %#v,", k, this.Sfixed32Map[k]) + } + mapStringForSfixed32Map += "}" + if this.Sfixed32Map != nil { + s = append(s, "Sfixed32Map: "+mapStringForSfixed32Map+",\n") + } + keysForFixed64Map := make([]uint64, 0, len(this.Fixed64Map)) + for k := range this.Fixed64Map { + keysForFixed64Map = append(keysForFixed64Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint64s(keysForFixed64Map) + mapStringForFixed64Map := "map[uint64]uint64{" + for _, k := range keysForFixed64Map { + mapStringForFixed64Map += fmt.Sprintf("%#v: %#v,", k, this.Fixed64Map[k]) + } + mapStringForFixed64Map += "}" + if this.Fixed64Map != nil { + s = append(s, "Fixed64Map: "+mapStringForFixed64Map+",\n") + } + keysForSfixed64Map := make([]int64, 0, len(this.Sfixed64Map)) + for k := range this.Sfixed64Map { + keysForSfixed64Map = append(keysForSfixed64Map, k) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForSfixed64Map) + mapStringForSfixed64Map := "map[int64]int64{" + for _, k := range keysForSfixed64Map { + mapStringForSfixed64Map += fmt.Sprintf("%#v: %#v,", k, this.Sfixed64Map[k]) + } + mapStringForSfixed64Map += "}" + if this.Sfixed64Map != nil { + s = append(s, "Sfixed64Map: "+mapStringForSfixed64Map+",\n") + } + keysForBoolMap := make([]bool, 0, len(this.BoolMap)) + for k := range this.BoolMap { + keysForBoolMap = append(keysForBoolMap, k) + } + github_com_gogo_protobuf_sortkeys.Bools(keysForBoolMap) + mapStringForBoolMap := "map[bool]bool{" + for _, k := range keysForBoolMap { + mapStringForBoolMap += fmt.Sprintf("%#v: %#v,", k, this.BoolMap[k]) + } + mapStringForBoolMap += "}" + if this.BoolMap != nil { + s = append(s, "BoolMap: "+mapStringForBoolMap+",\n") + } + keysForStringMap := make([]string, 0, len(this.StringMap)) + for k := range this.StringMap { + keysForStringMap = append(keysForStringMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringMap) + mapStringForStringMap := "map[string]string{" + for _, k := range keysForStringMap { + mapStringForStringMap += fmt.Sprintf("%#v: %#v,", k, this.StringMap[k]) + } + mapStringForStringMap += "}" + if this.StringMap != nil { + s = append(s, "StringMap: "+mapStringForStringMap+",\n") + } + keysForStringToBytesMap := make([]string, 0, len(this.StringToBytesMap)) + for k := range this.StringToBytesMap { + keysForStringToBytesMap = append(keysForStringToBytesMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToBytesMap) + mapStringForStringToBytesMap := "map[string][]byte{" + for _, k := range keysForStringToBytesMap { + mapStringForStringToBytesMap += fmt.Sprintf("%#v: %#v,", k, this.StringToBytesMap[k]) + } + mapStringForStringToBytesMap += "}" + if this.StringToBytesMap != nil { + s = append(s, "StringToBytesMap: "+mapStringForStringToBytesMap+",\n") + } + keysForStringToEnumMap := make([]string, 0, len(this.StringToEnumMap)) + for k := range this.StringToEnumMap { + keysForStringToEnumMap = append(keysForStringToEnumMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToEnumMap) + mapStringForStringToEnumMap := "map[string]MapEnum{" + for _, k := range keysForStringToEnumMap { + mapStringForStringToEnumMap += fmt.Sprintf("%#v: %#v,", k, this.StringToEnumMap[k]) + } + mapStringForStringToEnumMap += "}" + if this.StringToEnumMap != nil { + s = append(s, "StringToEnumMap: "+mapStringForStringToEnumMap+",\n") + } + keysForStringToMsgMap := make([]string, 0, len(this.StringToMsgMap)) + for k := range this.StringToMsgMap { + keysForStringToMsgMap = append(keysForStringToMsgMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToMsgMap) + mapStringForStringToMsgMap := "map[string]*FloatingPoint{" + for _, k := range keysForStringToMsgMap { + mapStringForStringToMsgMap += fmt.Sprintf("%#v: %#v,", k, this.StringToMsgMap[k]) + } + mapStringForStringToMsgMap += "}" + if this.StringToMsgMap != nil { + s = append(s, "StringToMsgMap: "+mapStringForStringToMsgMap+",\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 valueToGoStringMapsproto2(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 extensionToGoStringMapsproto2(e map[int32]github_com_gogo_protobuf_proto.Extension) string { + if e == nil { + return "nil" + } + s := "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 +} +func NewPopulatedFloatingPoint(r randyMapsproto2, easy bool) *FloatingPoint { + this := &FloatingPoint{} + if r.Intn(10) != 0 { + v1 := float64(r.Float64()) + if r.Intn(2) == 0 { + v1 *= -1 + } + this.F = &v1 + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedMapsproto2(r, 2) + } + return this +} + +func NewPopulatedAllMaps(r randyMapsproto2, easy bool) *AllMaps { + this := &AllMaps{} + if r.Intn(10) != 0 { + v2 := r.Intn(10) + this.StringToDoubleMap = make(map[string]float64) + for i := 0; i < v2; i++ { + v3 := randStringMapsproto2(r) + this.StringToDoubleMap[v3] = float64(r.Float64()) + if r.Intn(2) == 0 { + this.StringToDoubleMap[v3] *= -1 + } + } + } + if r.Intn(10) != 0 { + v4 := r.Intn(10) + this.StringToFloatMap = make(map[string]float32) + for i := 0; i < v4; i++ { + v5 := randStringMapsproto2(r) + this.StringToFloatMap[v5] = float32(r.Float32()) + if r.Intn(2) == 0 { + this.StringToFloatMap[v5] *= -1 + } + } + } + if r.Intn(10) != 0 { + v6 := r.Intn(10) + this.Int32Map = make(map[int32]int32) + for i := 0; i < v6; i++ { + v7 := int32(r.Int31()) + this.Int32Map[v7] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Int32Map[v7] *= -1 + } + } + } + if r.Intn(10) != 0 { + v8 := r.Intn(10) + this.Int64Map = make(map[int64]int64) + for i := 0; i < v8; i++ { + v9 := int64(r.Int63()) + this.Int64Map[v9] = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Int64Map[v9] *= -1 + } + } + } + if r.Intn(10) != 0 { + v10 := r.Intn(10) + this.Uint32Map = make(map[uint32]uint32) + for i := 0; i < v10; i++ { + v11 := uint32(r.Uint32()) + this.Uint32Map[v11] = uint32(r.Uint32()) + } + } + if r.Intn(10) != 0 { + v12 := r.Intn(10) + this.Uint64Map = make(map[uint64]uint64) + for i := 0; i < v12; i++ { + v13 := uint64(uint64(r.Uint32())) + this.Uint64Map[v13] = uint64(uint64(r.Uint32())) + } + } + if r.Intn(10) != 0 { + v14 := r.Intn(10) + this.Sint32Map = make(map[int32]int32) + for i := 0; i < v14; i++ { + v15 := int32(r.Int31()) + this.Sint32Map[v15] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Sint32Map[v15] *= -1 + } + } + } + if r.Intn(10) != 0 { + v16 := r.Intn(10) + this.Sint64Map = make(map[int64]int64) + for i := 0; i < v16; i++ { + v17 := int64(r.Int63()) + this.Sint64Map[v17] = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Sint64Map[v17] *= -1 + } + } + } + if r.Intn(10) != 0 { + v18 := r.Intn(10) + this.Fixed32Map = make(map[uint32]uint32) + for i := 0; i < v18; i++ { + v19 := uint32(r.Uint32()) + this.Fixed32Map[v19] = uint32(r.Uint32()) + } + } + if r.Intn(10) != 0 { + v20 := r.Intn(10) + this.Sfixed32Map = make(map[int32]int32) + for i := 0; i < v20; i++ { + v21 := int32(r.Int31()) + this.Sfixed32Map[v21] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Sfixed32Map[v21] *= -1 + } + } + } + if r.Intn(10) != 0 { + v22 := r.Intn(10) + this.Fixed64Map = make(map[uint64]uint64) + for i := 0; i < v22; i++ { + v23 := uint64(uint64(r.Uint32())) + this.Fixed64Map[v23] = uint64(uint64(r.Uint32())) + } + } + if r.Intn(10) != 0 { + v24 := r.Intn(10) + this.Sfixed64Map = make(map[int64]int64) + for i := 0; i < v24; i++ { + v25 := int64(r.Int63()) + this.Sfixed64Map[v25] = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Sfixed64Map[v25] *= -1 + } + } + } + if r.Intn(10) != 0 { + v26 := r.Intn(10) + this.BoolMap = make(map[bool]bool) + for i := 0; i < v26; i++ { + v27 := bool(bool(r.Intn(2) == 0)) + this.BoolMap[v27] = bool(bool(r.Intn(2) == 0)) + } + } + if r.Intn(10) != 0 { + v28 := r.Intn(10) + this.StringMap = make(map[string]string) + for i := 0; i < v28; i++ { + this.StringMap[randStringMapsproto2(r)] = randStringMapsproto2(r) + } + } + if r.Intn(10) != 0 { + v29 := r.Intn(10) + this.StringToBytesMap = make(map[string][]byte) + for i := 0; i < v29; i++ { + v30 := r.Intn(100) + v31 := randStringMapsproto2(r) + this.StringToBytesMap[v31] = make([]byte, v30) + for i := 0; i < v30; i++ { + this.StringToBytesMap[v31][i] = byte(r.Intn(256)) + } + } + } + if r.Intn(10) != 0 { + v32 := r.Intn(10) + this.StringToEnumMap = make(map[string]MapEnum) + for i := 0; i < v32; i++ { + this.StringToEnumMap[randStringMapsproto2(r)] = MapEnum([]int32{0, 1, 2}[r.Intn(3)]) + } + } + if r.Intn(10) != 0 { + v33 := r.Intn(10) + this.StringToMsgMap = make(map[string]*FloatingPoint) + for i := 0; i < v33; i++ { + this.StringToMsgMap[randStringMapsproto2(r)] = NewPopulatedFloatingPoint(r, easy) + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedMapsproto2(r, 18) + } + return this +} + +func NewPopulatedAllMapsOrdered(r randyMapsproto2, easy bool) *AllMapsOrdered { + this := &AllMapsOrdered{} + if r.Intn(10) != 0 { + v34 := r.Intn(10) + this.StringToDoubleMap = make(map[string]float64) + for i := 0; i < v34; i++ { + v35 := randStringMapsproto2(r) + this.StringToDoubleMap[v35] = float64(r.Float64()) + if r.Intn(2) == 0 { + this.StringToDoubleMap[v35] *= -1 + } + } + } + if r.Intn(10) != 0 { + v36 := r.Intn(10) + this.StringToFloatMap = make(map[string]float32) + for i := 0; i < v36; i++ { + v37 := randStringMapsproto2(r) + this.StringToFloatMap[v37] = float32(r.Float32()) + if r.Intn(2) == 0 { + this.StringToFloatMap[v37] *= -1 + } + } + } + if r.Intn(10) != 0 { + v38 := r.Intn(10) + this.Int32Map = make(map[int32]int32) + for i := 0; i < v38; i++ { + v39 := int32(r.Int31()) + this.Int32Map[v39] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Int32Map[v39] *= -1 + } + } + } + if r.Intn(10) != 0 { + v40 := r.Intn(10) + this.Int64Map = make(map[int64]int64) + for i := 0; i < v40; i++ { + v41 := int64(r.Int63()) + this.Int64Map[v41] = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Int64Map[v41] *= -1 + } + } + } + if r.Intn(10) != 0 { + v42 := r.Intn(10) + this.Uint32Map = make(map[uint32]uint32) + for i := 0; i < v42; i++ { + v43 := uint32(r.Uint32()) + this.Uint32Map[v43] = uint32(r.Uint32()) + } + } + if r.Intn(10) != 0 { + v44 := r.Intn(10) + this.Uint64Map = make(map[uint64]uint64) + for i := 0; i < v44; i++ { + v45 := uint64(uint64(r.Uint32())) + this.Uint64Map[v45] = uint64(uint64(r.Uint32())) + } + } + if r.Intn(10) != 0 { + v46 := r.Intn(10) + this.Sint32Map = make(map[int32]int32) + for i := 0; i < v46; i++ { + v47 := int32(r.Int31()) + this.Sint32Map[v47] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Sint32Map[v47] *= -1 + } + } + } + if r.Intn(10) != 0 { + v48 := r.Intn(10) + this.Sint64Map = make(map[int64]int64) + for i := 0; i < v48; i++ { + v49 := int64(r.Int63()) + this.Sint64Map[v49] = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Sint64Map[v49] *= -1 + } + } + } + if r.Intn(10) != 0 { + v50 := r.Intn(10) + this.Fixed32Map = make(map[uint32]uint32) + for i := 0; i < v50; i++ { + v51 := uint32(r.Uint32()) + this.Fixed32Map[v51] = uint32(r.Uint32()) + } + } + if r.Intn(10) != 0 { + v52 := r.Intn(10) + this.Sfixed32Map = make(map[int32]int32) + for i := 0; i < v52; i++ { + v53 := int32(r.Int31()) + this.Sfixed32Map[v53] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Sfixed32Map[v53] *= -1 + } + } + } + if r.Intn(10) != 0 { + v54 := r.Intn(10) + this.Fixed64Map = make(map[uint64]uint64) + for i := 0; i < v54; i++ { + v55 := uint64(uint64(r.Uint32())) + this.Fixed64Map[v55] = uint64(uint64(r.Uint32())) + } + } + if r.Intn(10) != 0 { + v56 := r.Intn(10) + this.Sfixed64Map = make(map[int64]int64) + for i := 0; i < v56; i++ { + v57 := int64(r.Int63()) + this.Sfixed64Map[v57] = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Sfixed64Map[v57] *= -1 + } + } + } + if r.Intn(10) != 0 { + v58 := r.Intn(10) + this.BoolMap = make(map[bool]bool) + for i := 0; i < v58; i++ { + v59 := bool(bool(r.Intn(2) == 0)) + this.BoolMap[v59] = bool(bool(r.Intn(2) == 0)) + } + } + if r.Intn(10) != 0 { + v60 := r.Intn(10) + this.StringMap = make(map[string]string) + for i := 0; i < v60; i++ { + this.StringMap[randStringMapsproto2(r)] = randStringMapsproto2(r) + } + } + if r.Intn(10) != 0 { + v61 := r.Intn(10) + this.StringToBytesMap = make(map[string][]byte) + for i := 0; i < v61; i++ { + v62 := r.Intn(100) + v63 := randStringMapsproto2(r) + this.StringToBytesMap[v63] = make([]byte, v62) + for i := 0; i < v62; i++ { + this.StringToBytesMap[v63][i] = byte(r.Intn(256)) + } + } + } + if r.Intn(10) != 0 { + v64 := r.Intn(10) + this.StringToEnumMap = make(map[string]MapEnum) + for i := 0; i < v64; i++ { + this.StringToEnumMap[randStringMapsproto2(r)] = MapEnum([]int32{0, 1, 2}[r.Intn(3)]) + } + } + if r.Intn(10) != 0 { + v65 := r.Intn(10) + this.StringToMsgMap = make(map[string]*FloatingPoint) + for i := 0; i < v65; i++ { + this.StringToMsgMap[randStringMapsproto2(r)] = NewPopulatedFloatingPoint(r, easy) + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedMapsproto2(r, 18) + } + return this +} + +type randyMapsproto2 interface { + Float32() float32 + Float64() float64 + Int63() int64 + Int31() int32 + Uint32() uint32 + Intn(n int) int +} + +func randUTF8RuneMapsproto2(r randyMapsproto2) 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 randStringMapsproto2(r randyMapsproto2) string { + v66 := r.Intn(100) + tmps := make([]rune, v66) + for i := 0; i < v66; i++ { + tmps[i] = randUTF8RuneMapsproto2(r) + } + return string(tmps) +} +func randUnrecognizedMapsproto2(r randyMapsproto2, 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 = randFieldMapsproto2(data, r, fieldNumber, wire) + } + return data +} +func randFieldMapsproto2(data []byte, r randyMapsproto2, fieldNumber int, wire int) []byte { + key := uint32(fieldNumber)<<3 | uint32(wire) + switch wire { + case 0: + data = encodeVarintPopulateMapsproto2(data, uint64(key)) + v67 := r.Int63() + if r.Intn(2) == 0 { + v67 *= -1 + } + data = encodeVarintPopulateMapsproto2(data, uint64(v67)) + case 1: + data = encodeVarintPopulateMapsproto2(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 = encodeVarintPopulateMapsproto2(data, uint64(key)) + ll := r.Intn(100) + data = encodeVarintPopulateMapsproto2(data, uint64(ll)) + for j := 0; j < ll; j++ { + data = append(data, byte(r.Intn(256))) + } + default: + data = encodeVarintPopulateMapsproto2(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 encodeVarintPopulateMapsproto2(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 *FloatingPoint) Size() (n int) { + var l int + _ = l + if m.F != nil { + n += 9 + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *AllMaps) Size() (n int) { + var l int + _ = l + if len(m.StringToDoubleMap) > 0 { + for k, v := range m.StringToDoubleMap { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + 1 + 8 + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.StringToFloatMap) > 0 { + for k, v := range m.StringToFloatMap { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + 1 + 4 + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.Int32Map) > 0 { + for k, v := range m.Int32Map { + _ = k + _ = v + mapEntrySize := 1 + sovMapsproto2(uint64(k)) + 1 + sovMapsproto2(uint64(v)) + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.Int64Map) > 0 { + for k, v := range m.Int64Map { + _ = k + _ = v + mapEntrySize := 1 + sovMapsproto2(uint64(k)) + 1 + sovMapsproto2(uint64(v)) + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.Uint32Map) > 0 { + for k, v := range m.Uint32Map { + _ = k + _ = v + mapEntrySize := 1 + sovMapsproto2(uint64(k)) + 1 + sovMapsproto2(uint64(v)) + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.Uint64Map) > 0 { + for k, v := range m.Uint64Map { + _ = k + _ = v + mapEntrySize := 1 + sovMapsproto2(uint64(k)) + 1 + sovMapsproto2(uint64(v)) + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.Sint32Map) > 0 { + for k, v := range m.Sint32Map { + _ = k + _ = v + mapEntrySize := 1 + sozMapsproto2(uint64(k)) + 1 + sozMapsproto2(uint64(v)) + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.Sint64Map) > 0 { + for k, v := range m.Sint64Map { + _ = k + _ = v + mapEntrySize := 1 + sozMapsproto2(uint64(k)) + 1 + sozMapsproto2(uint64(v)) + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.Fixed32Map) > 0 { + for k, v := range m.Fixed32Map { + _ = k + _ = v + mapEntrySize := 1 + 4 + 1 + 4 + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.Sfixed32Map) > 0 { + for k, v := range m.Sfixed32Map { + _ = k + _ = v + mapEntrySize := 1 + 4 + 1 + 4 + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.Fixed64Map) > 0 { + for k, v := range m.Fixed64Map { + _ = k + _ = v + mapEntrySize := 1 + 8 + 1 + 8 + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.Sfixed64Map) > 0 { + for k, v := range m.Sfixed64Map { + _ = k + _ = v + mapEntrySize := 1 + 8 + 1 + 8 + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.BoolMap) > 0 { + for k, v := range m.BoolMap { + _ = k + _ = v + mapEntrySize := 1 + 1 + 1 + 1 + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.StringMap) > 0 { + for k, v := range m.StringMap { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + 1 + len(v) + sovMapsproto2(uint64(len(v))) + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.StringToBytesMap) > 0 { + for k, v := range m.StringToBytesMap { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + 1 + len(v) + sovMapsproto2(uint64(len(v))) + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.StringToEnumMap) > 0 { + for k, v := range m.StringToEnumMap { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + 1 + sovMapsproto2(uint64(v)) + n += mapEntrySize + 2 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.StringToMsgMap) > 0 { + for k, v := range m.StringToMsgMap { + _ = k + _ = v + l = 0 + if v != nil { + l = v.Size() + } + mapEntrySize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + 1 + l + sovMapsproto2(uint64(l)) + n += mapEntrySize + 2 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *AllMapsOrdered) Size() (n int) { + var l int + _ = l + if len(m.StringToDoubleMap) > 0 { + for k, v := range m.StringToDoubleMap { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + 1 + 8 + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.StringToFloatMap) > 0 { + for k, v := range m.StringToFloatMap { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + 1 + 4 + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.Int32Map) > 0 { + for k, v := range m.Int32Map { + _ = k + _ = v + mapEntrySize := 1 + sovMapsproto2(uint64(k)) + 1 + sovMapsproto2(uint64(v)) + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.Int64Map) > 0 { + for k, v := range m.Int64Map { + _ = k + _ = v + mapEntrySize := 1 + sovMapsproto2(uint64(k)) + 1 + sovMapsproto2(uint64(v)) + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.Uint32Map) > 0 { + for k, v := range m.Uint32Map { + _ = k + _ = v + mapEntrySize := 1 + sovMapsproto2(uint64(k)) + 1 + sovMapsproto2(uint64(v)) + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.Uint64Map) > 0 { + for k, v := range m.Uint64Map { + _ = k + _ = v + mapEntrySize := 1 + sovMapsproto2(uint64(k)) + 1 + sovMapsproto2(uint64(v)) + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.Sint32Map) > 0 { + for k, v := range m.Sint32Map { + _ = k + _ = v + mapEntrySize := 1 + sozMapsproto2(uint64(k)) + 1 + sozMapsproto2(uint64(v)) + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.Sint64Map) > 0 { + for k, v := range m.Sint64Map { + _ = k + _ = v + mapEntrySize := 1 + sozMapsproto2(uint64(k)) + 1 + sozMapsproto2(uint64(v)) + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.Fixed32Map) > 0 { + for k, v := range m.Fixed32Map { + _ = k + _ = v + mapEntrySize := 1 + 4 + 1 + 4 + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.Sfixed32Map) > 0 { + for k, v := range m.Sfixed32Map { + _ = k + _ = v + mapEntrySize := 1 + 4 + 1 + 4 + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.Fixed64Map) > 0 { + for k, v := range m.Fixed64Map { + _ = k + _ = v + mapEntrySize := 1 + 8 + 1 + 8 + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.Sfixed64Map) > 0 { + for k, v := range m.Sfixed64Map { + _ = k + _ = v + mapEntrySize := 1 + 8 + 1 + 8 + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.BoolMap) > 0 { + for k, v := range m.BoolMap { + _ = k + _ = v + mapEntrySize := 1 + 1 + 1 + 1 + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.StringMap) > 0 { + for k, v := range m.StringMap { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + 1 + len(v) + sovMapsproto2(uint64(len(v))) + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.StringToBytesMap) > 0 { + for k, v := range m.StringToBytesMap { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + 1 + len(v) + sovMapsproto2(uint64(len(v))) + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.StringToEnumMap) > 0 { + for k, v := range m.StringToEnumMap { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + 1 + sovMapsproto2(uint64(v)) + n += mapEntrySize + 2 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.StringToMsgMap) > 0 { + for k, v := range m.StringToMsgMap { + _ = k + _ = v + l = 0 + if v != nil { + l = v.Size() + } + mapEntrySize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + 1 + l + sovMapsproto2(uint64(l)) + n += mapEntrySize + 2 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func sovMapsproto2(x uint64) (n int) { + for { + n++ + x >>= 7 + if x == 0 { + break + } + } + return n +} +func sozMapsproto2(x uint64) (n int) { + return sovMapsproto2(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (this *FloatingPoint) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&FloatingPoint{`, + `F:` + valueToStringMapsproto2(this.F) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *AllMaps) String() string { + if this == nil { + return "nil" + } + keysForStringToDoubleMap := make([]string, 0, len(this.StringToDoubleMap)) + for k := range this.StringToDoubleMap { + keysForStringToDoubleMap = append(keysForStringToDoubleMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToDoubleMap) + mapStringForStringToDoubleMap := "map[string]float64{" + for _, k := range keysForStringToDoubleMap { + mapStringForStringToDoubleMap += fmt.Sprintf("%v: %v,", k, this.StringToDoubleMap[k]) + } + mapStringForStringToDoubleMap += "}" + keysForStringToFloatMap := make([]string, 0, len(this.StringToFloatMap)) + for k := range this.StringToFloatMap { + keysForStringToFloatMap = append(keysForStringToFloatMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToFloatMap) + mapStringForStringToFloatMap := "map[string]float32{" + for _, k := range keysForStringToFloatMap { + mapStringForStringToFloatMap += fmt.Sprintf("%v: %v,", k, this.StringToFloatMap[k]) + } + mapStringForStringToFloatMap += "}" + keysForInt32Map := make([]int32, 0, len(this.Int32Map)) + for k := range this.Int32Map { + keysForInt32Map = append(keysForInt32Map, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForInt32Map) + mapStringForInt32Map := "map[int32]int32{" + for _, k := range keysForInt32Map { + mapStringForInt32Map += fmt.Sprintf("%v: %v,", k, this.Int32Map[k]) + } + mapStringForInt32Map += "}" + keysForInt64Map := make([]int64, 0, len(this.Int64Map)) + for k := range this.Int64Map { + keysForInt64Map = append(keysForInt64Map, k) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForInt64Map) + mapStringForInt64Map := "map[int64]int64{" + for _, k := range keysForInt64Map { + mapStringForInt64Map += fmt.Sprintf("%v: %v,", k, this.Int64Map[k]) + } + mapStringForInt64Map += "}" + keysForUint32Map := make([]uint32, 0, len(this.Uint32Map)) + for k := range this.Uint32Map { + keysForUint32Map = append(keysForUint32Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint32s(keysForUint32Map) + mapStringForUint32Map := "map[uint32]uint32{" + for _, k := range keysForUint32Map { + mapStringForUint32Map += fmt.Sprintf("%v: %v,", k, this.Uint32Map[k]) + } + mapStringForUint32Map += "}" + keysForUint64Map := make([]uint64, 0, len(this.Uint64Map)) + for k := range this.Uint64Map { + keysForUint64Map = append(keysForUint64Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint64s(keysForUint64Map) + mapStringForUint64Map := "map[uint64]uint64{" + for _, k := range keysForUint64Map { + mapStringForUint64Map += fmt.Sprintf("%v: %v,", k, this.Uint64Map[k]) + } + mapStringForUint64Map += "}" + keysForSint32Map := make([]int32, 0, len(this.Sint32Map)) + for k := range this.Sint32Map { + keysForSint32Map = append(keysForSint32Map, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForSint32Map) + mapStringForSint32Map := "map[int32]int32{" + for _, k := range keysForSint32Map { + mapStringForSint32Map += fmt.Sprintf("%v: %v,", k, this.Sint32Map[k]) + } + mapStringForSint32Map += "}" + keysForSint64Map := make([]int64, 0, len(this.Sint64Map)) + for k := range this.Sint64Map { + keysForSint64Map = append(keysForSint64Map, k) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForSint64Map) + mapStringForSint64Map := "map[int64]int64{" + for _, k := range keysForSint64Map { + mapStringForSint64Map += fmt.Sprintf("%v: %v,", k, this.Sint64Map[k]) + } + mapStringForSint64Map += "}" + keysForFixed32Map := make([]uint32, 0, len(this.Fixed32Map)) + for k := range this.Fixed32Map { + keysForFixed32Map = append(keysForFixed32Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint32s(keysForFixed32Map) + mapStringForFixed32Map := "map[uint32]uint32{" + for _, k := range keysForFixed32Map { + mapStringForFixed32Map += fmt.Sprintf("%v: %v,", k, this.Fixed32Map[k]) + } + mapStringForFixed32Map += "}" + keysForSfixed32Map := make([]int32, 0, len(this.Sfixed32Map)) + for k := range this.Sfixed32Map { + keysForSfixed32Map = append(keysForSfixed32Map, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForSfixed32Map) + mapStringForSfixed32Map := "map[int32]int32{" + for _, k := range keysForSfixed32Map { + mapStringForSfixed32Map += fmt.Sprintf("%v: %v,", k, this.Sfixed32Map[k]) + } + mapStringForSfixed32Map += "}" + keysForFixed64Map := make([]uint64, 0, len(this.Fixed64Map)) + for k := range this.Fixed64Map { + keysForFixed64Map = append(keysForFixed64Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint64s(keysForFixed64Map) + mapStringForFixed64Map := "map[uint64]uint64{" + for _, k := range keysForFixed64Map { + mapStringForFixed64Map += fmt.Sprintf("%v: %v,", k, this.Fixed64Map[k]) + } + mapStringForFixed64Map += "}" + keysForSfixed64Map := make([]int64, 0, len(this.Sfixed64Map)) + for k := range this.Sfixed64Map { + keysForSfixed64Map = append(keysForSfixed64Map, k) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForSfixed64Map) + mapStringForSfixed64Map := "map[int64]int64{" + for _, k := range keysForSfixed64Map { + mapStringForSfixed64Map += fmt.Sprintf("%v: %v,", k, this.Sfixed64Map[k]) + } + mapStringForSfixed64Map += "}" + keysForBoolMap := make([]bool, 0, len(this.BoolMap)) + for k := range this.BoolMap { + keysForBoolMap = append(keysForBoolMap, k) + } + github_com_gogo_protobuf_sortkeys.Bools(keysForBoolMap) + mapStringForBoolMap := "map[bool]bool{" + for _, k := range keysForBoolMap { + mapStringForBoolMap += fmt.Sprintf("%v: %v,", k, this.BoolMap[k]) + } + mapStringForBoolMap += "}" + keysForStringMap := make([]string, 0, len(this.StringMap)) + for k := range this.StringMap { + keysForStringMap = append(keysForStringMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringMap) + mapStringForStringMap := "map[string]string{" + for _, k := range keysForStringMap { + mapStringForStringMap += fmt.Sprintf("%v: %v,", k, this.StringMap[k]) + } + mapStringForStringMap += "}" + keysForStringToBytesMap := make([]string, 0, len(this.StringToBytesMap)) + for k := range this.StringToBytesMap { + keysForStringToBytesMap = append(keysForStringToBytesMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToBytesMap) + mapStringForStringToBytesMap := "map[string][]byte{" + for _, k := range keysForStringToBytesMap { + mapStringForStringToBytesMap += fmt.Sprintf("%v: %v,", k, this.StringToBytesMap[k]) + } + mapStringForStringToBytesMap += "}" + keysForStringToEnumMap := make([]string, 0, len(this.StringToEnumMap)) + for k := range this.StringToEnumMap { + keysForStringToEnumMap = append(keysForStringToEnumMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToEnumMap) + mapStringForStringToEnumMap := "map[string]MapEnum{" + for _, k := range keysForStringToEnumMap { + mapStringForStringToEnumMap += fmt.Sprintf("%v: %v,", k, this.StringToEnumMap[k]) + } + mapStringForStringToEnumMap += "}" + keysForStringToMsgMap := make([]string, 0, len(this.StringToMsgMap)) + for k := range this.StringToMsgMap { + keysForStringToMsgMap = append(keysForStringToMsgMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToMsgMap) + mapStringForStringToMsgMap := "map[string]*FloatingPoint{" + for _, k := range keysForStringToMsgMap { + mapStringForStringToMsgMap += fmt.Sprintf("%v: %v,", k, this.StringToMsgMap[k]) + } + mapStringForStringToMsgMap += "}" + s := strings.Join([]string{`&AllMaps{`, + `StringToDoubleMap:` + mapStringForStringToDoubleMap + `,`, + `StringToFloatMap:` + mapStringForStringToFloatMap + `,`, + `Int32Map:` + mapStringForInt32Map + `,`, + `Int64Map:` + mapStringForInt64Map + `,`, + `Uint32Map:` + mapStringForUint32Map + `,`, + `Uint64Map:` + mapStringForUint64Map + `,`, + `Sint32Map:` + mapStringForSint32Map + `,`, + `Sint64Map:` + mapStringForSint64Map + `,`, + `Fixed32Map:` + mapStringForFixed32Map + `,`, + `Sfixed32Map:` + mapStringForSfixed32Map + `,`, + `Fixed64Map:` + mapStringForFixed64Map + `,`, + `Sfixed64Map:` + mapStringForSfixed64Map + `,`, + `BoolMap:` + mapStringForBoolMap + `,`, + `StringMap:` + mapStringForStringMap + `,`, + `StringToBytesMap:` + mapStringForStringToBytesMap + `,`, + `StringToEnumMap:` + mapStringForStringToEnumMap + `,`, + `StringToMsgMap:` + mapStringForStringToMsgMap + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *AllMapsOrdered) String() string { + if this == nil { + return "nil" + } + keysForStringToDoubleMap := make([]string, 0, len(this.StringToDoubleMap)) + for k := range this.StringToDoubleMap { + keysForStringToDoubleMap = append(keysForStringToDoubleMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToDoubleMap) + mapStringForStringToDoubleMap := "map[string]float64{" + for _, k := range keysForStringToDoubleMap { + mapStringForStringToDoubleMap += fmt.Sprintf("%v: %v,", k, this.StringToDoubleMap[k]) + } + mapStringForStringToDoubleMap += "}" + keysForStringToFloatMap := make([]string, 0, len(this.StringToFloatMap)) + for k := range this.StringToFloatMap { + keysForStringToFloatMap = append(keysForStringToFloatMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToFloatMap) + mapStringForStringToFloatMap := "map[string]float32{" + for _, k := range keysForStringToFloatMap { + mapStringForStringToFloatMap += fmt.Sprintf("%v: %v,", k, this.StringToFloatMap[k]) + } + mapStringForStringToFloatMap += "}" + keysForInt32Map := make([]int32, 0, len(this.Int32Map)) + for k := range this.Int32Map { + keysForInt32Map = append(keysForInt32Map, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForInt32Map) + mapStringForInt32Map := "map[int32]int32{" + for _, k := range keysForInt32Map { + mapStringForInt32Map += fmt.Sprintf("%v: %v,", k, this.Int32Map[k]) + } + mapStringForInt32Map += "}" + keysForInt64Map := make([]int64, 0, len(this.Int64Map)) + for k := range this.Int64Map { + keysForInt64Map = append(keysForInt64Map, k) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForInt64Map) + mapStringForInt64Map := "map[int64]int64{" + for _, k := range keysForInt64Map { + mapStringForInt64Map += fmt.Sprintf("%v: %v,", k, this.Int64Map[k]) + } + mapStringForInt64Map += "}" + keysForUint32Map := make([]uint32, 0, len(this.Uint32Map)) + for k := range this.Uint32Map { + keysForUint32Map = append(keysForUint32Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint32s(keysForUint32Map) + mapStringForUint32Map := "map[uint32]uint32{" + for _, k := range keysForUint32Map { + mapStringForUint32Map += fmt.Sprintf("%v: %v,", k, this.Uint32Map[k]) + } + mapStringForUint32Map += "}" + keysForUint64Map := make([]uint64, 0, len(this.Uint64Map)) + for k := range this.Uint64Map { + keysForUint64Map = append(keysForUint64Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint64s(keysForUint64Map) + mapStringForUint64Map := "map[uint64]uint64{" + for _, k := range keysForUint64Map { + mapStringForUint64Map += fmt.Sprintf("%v: %v,", k, this.Uint64Map[k]) + } + mapStringForUint64Map += "}" + keysForSint32Map := make([]int32, 0, len(this.Sint32Map)) + for k := range this.Sint32Map { + keysForSint32Map = append(keysForSint32Map, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForSint32Map) + mapStringForSint32Map := "map[int32]int32{" + for _, k := range keysForSint32Map { + mapStringForSint32Map += fmt.Sprintf("%v: %v,", k, this.Sint32Map[k]) + } + mapStringForSint32Map += "}" + keysForSint64Map := make([]int64, 0, len(this.Sint64Map)) + for k := range this.Sint64Map { + keysForSint64Map = append(keysForSint64Map, k) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForSint64Map) + mapStringForSint64Map := "map[int64]int64{" + for _, k := range keysForSint64Map { + mapStringForSint64Map += fmt.Sprintf("%v: %v,", k, this.Sint64Map[k]) + } + mapStringForSint64Map += "}" + keysForFixed32Map := make([]uint32, 0, len(this.Fixed32Map)) + for k := range this.Fixed32Map { + keysForFixed32Map = append(keysForFixed32Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint32s(keysForFixed32Map) + mapStringForFixed32Map := "map[uint32]uint32{" + for _, k := range keysForFixed32Map { + mapStringForFixed32Map += fmt.Sprintf("%v: %v,", k, this.Fixed32Map[k]) + } + mapStringForFixed32Map += "}" + keysForSfixed32Map := make([]int32, 0, len(this.Sfixed32Map)) + for k := range this.Sfixed32Map { + keysForSfixed32Map = append(keysForSfixed32Map, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForSfixed32Map) + mapStringForSfixed32Map := "map[int32]int32{" + for _, k := range keysForSfixed32Map { + mapStringForSfixed32Map += fmt.Sprintf("%v: %v,", k, this.Sfixed32Map[k]) + } + mapStringForSfixed32Map += "}" + keysForFixed64Map := make([]uint64, 0, len(this.Fixed64Map)) + for k := range this.Fixed64Map { + keysForFixed64Map = append(keysForFixed64Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint64s(keysForFixed64Map) + mapStringForFixed64Map := "map[uint64]uint64{" + for _, k := range keysForFixed64Map { + mapStringForFixed64Map += fmt.Sprintf("%v: %v,", k, this.Fixed64Map[k]) + } + mapStringForFixed64Map += "}" + keysForSfixed64Map := make([]int64, 0, len(this.Sfixed64Map)) + for k := range this.Sfixed64Map { + keysForSfixed64Map = append(keysForSfixed64Map, k) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForSfixed64Map) + mapStringForSfixed64Map := "map[int64]int64{" + for _, k := range keysForSfixed64Map { + mapStringForSfixed64Map += fmt.Sprintf("%v: %v,", k, this.Sfixed64Map[k]) + } + mapStringForSfixed64Map += "}" + keysForBoolMap := make([]bool, 0, len(this.BoolMap)) + for k := range this.BoolMap { + keysForBoolMap = append(keysForBoolMap, k) + } + github_com_gogo_protobuf_sortkeys.Bools(keysForBoolMap) + mapStringForBoolMap := "map[bool]bool{" + for _, k := range keysForBoolMap { + mapStringForBoolMap += fmt.Sprintf("%v: %v,", k, this.BoolMap[k]) + } + mapStringForBoolMap += "}" + keysForStringMap := make([]string, 0, len(this.StringMap)) + for k := range this.StringMap { + keysForStringMap = append(keysForStringMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringMap) + mapStringForStringMap := "map[string]string{" + for _, k := range keysForStringMap { + mapStringForStringMap += fmt.Sprintf("%v: %v,", k, this.StringMap[k]) + } + mapStringForStringMap += "}" + keysForStringToBytesMap := make([]string, 0, len(this.StringToBytesMap)) + for k := range this.StringToBytesMap { + keysForStringToBytesMap = append(keysForStringToBytesMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToBytesMap) + mapStringForStringToBytesMap := "map[string][]byte{" + for _, k := range keysForStringToBytesMap { + mapStringForStringToBytesMap += fmt.Sprintf("%v: %v,", k, this.StringToBytesMap[k]) + } + mapStringForStringToBytesMap += "}" + keysForStringToEnumMap := make([]string, 0, len(this.StringToEnumMap)) + for k := range this.StringToEnumMap { + keysForStringToEnumMap = append(keysForStringToEnumMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToEnumMap) + mapStringForStringToEnumMap := "map[string]MapEnum{" + for _, k := range keysForStringToEnumMap { + mapStringForStringToEnumMap += fmt.Sprintf("%v: %v,", k, this.StringToEnumMap[k]) + } + mapStringForStringToEnumMap += "}" + keysForStringToMsgMap := make([]string, 0, len(this.StringToMsgMap)) + for k := range this.StringToMsgMap { + keysForStringToMsgMap = append(keysForStringToMsgMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToMsgMap) + mapStringForStringToMsgMap := "map[string]*FloatingPoint{" + for _, k := range keysForStringToMsgMap { + mapStringForStringToMsgMap += fmt.Sprintf("%v: %v,", k, this.StringToMsgMap[k]) + } + mapStringForStringToMsgMap += "}" + s := strings.Join([]string{`&AllMapsOrdered{`, + `StringToDoubleMap:` + mapStringForStringToDoubleMap + `,`, + `StringToFloatMap:` + mapStringForStringToFloatMap + `,`, + `Int32Map:` + mapStringForInt32Map + `,`, + `Int64Map:` + mapStringForInt64Map + `,`, + `Uint32Map:` + mapStringForUint32Map + `,`, + `Uint64Map:` + mapStringForUint64Map + `,`, + `Sint32Map:` + mapStringForSint32Map + `,`, + `Sint64Map:` + mapStringForSint64Map + `,`, + `Fixed32Map:` + mapStringForFixed32Map + `,`, + `Sfixed32Map:` + mapStringForSfixed32Map + `,`, + `Fixed64Map:` + mapStringForFixed64Map + `,`, + `Sfixed64Map:` + mapStringForSfixed64Map + `,`, + `BoolMap:` + mapStringForBoolMap + `,`, + `StringMap:` + mapStringForStringMap + `,`, + `StringToBytesMap:` + mapStringForStringToBytesMap + `,`, + `StringToEnumMap:` + mapStringForStringToEnumMap + `,`, + `StringToMsgMap:` + mapStringForStringToMsgMap + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func valueToStringMapsproto2(v interface{}) string { + rv := reflect.ValueOf(v) + if rv.IsNil() { + return "nil" + } + pv := reflect.Indirect(rv).Interface() + return fmt.Sprintf("*%v", pv) +} +func (m *FloatingPoint) 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 ErrIntOverflowMapsproto2 + } + 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: FloatingPoint: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: FloatingPoint: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field F", 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.F = &v2 + default: + iNdEx = preIndex + skippy, err := skipMapsproto2(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMapsproto2 + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *AllMaps) 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 ErrIntOverflowMapsproto2 + } + 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: AllMaps: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: AllMaps: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field StringToDoubleMap", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMapsproto2 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var keykey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + keykey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var stringLenmapkey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLenmapkey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapkey := int(stringLenmapkey) + if intStringLenmapkey < 0 { + return ErrInvalidLengthMapsproto2 + } + postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey > l { + return io.ErrUnexpectedEOF + } + mapkey := string(data[iNdEx:postStringIndexmapkey]) + iNdEx = postStringIndexmapkey + var valuekey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + valuekey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapvaluetemp uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + iNdEx += 8 + mapvaluetemp = uint64(data[iNdEx-8]) + mapvaluetemp |= uint64(data[iNdEx-7]) << 8 + mapvaluetemp |= uint64(data[iNdEx-6]) << 16 + mapvaluetemp |= uint64(data[iNdEx-5]) << 24 + mapvaluetemp |= uint64(data[iNdEx-4]) << 32 + mapvaluetemp |= uint64(data[iNdEx-3]) << 40 + mapvaluetemp |= uint64(data[iNdEx-2]) << 48 + mapvaluetemp |= uint64(data[iNdEx-1]) << 56 + mapvalue := math.Float64frombits(mapvaluetemp) + if m.StringToDoubleMap == nil { + m.StringToDoubleMap = make(map[string]float64) + } + m.StringToDoubleMap[mapkey] = mapvalue + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field StringToFloatMap", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMapsproto2 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var keykey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + keykey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var stringLenmapkey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLenmapkey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapkey := int(stringLenmapkey) + if intStringLenmapkey < 0 { + return ErrInvalidLengthMapsproto2 + } + postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey > l { + return io.ErrUnexpectedEOF + } + mapkey := string(data[iNdEx:postStringIndexmapkey]) + iNdEx = postStringIndexmapkey + var valuekey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + valuekey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapvaluetemp uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + iNdEx += 4 + mapvaluetemp = uint32(data[iNdEx-4]) + mapvaluetemp |= uint32(data[iNdEx-3]) << 8 + mapvaluetemp |= uint32(data[iNdEx-2]) << 16 + mapvaluetemp |= uint32(data[iNdEx-1]) << 24 + mapvalue := math.Float32frombits(mapvaluetemp) + if m.StringToFloatMap == nil { + m.StringToFloatMap = make(map[string]float32) + } + m.StringToFloatMap[mapkey] = mapvalue + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Int32Map", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMapsproto2 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var keykey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + keykey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapkey int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + mapkey |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var valuekey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + valuekey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapvalue int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + mapvalue |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if m.Int32Map == nil { + m.Int32Map = make(map[int32]int32) + } + m.Int32Map[mapkey] = mapvalue + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Int64Map", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMapsproto2 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var keykey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + keykey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapkey int64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + mapkey |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var valuekey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + valuekey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapvalue int64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + mapvalue |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if m.Int64Map == nil { + m.Int64Map = make(map[int64]int64) + } + m.Int64Map[mapkey] = mapvalue + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Uint32Map", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMapsproto2 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var keykey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + keykey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapkey uint32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + mapkey |= (uint32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var valuekey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + valuekey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapvalue uint32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + mapvalue |= (uint32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if m.Uint32Map == nil { + m.Uint32Map = make(map[uint32]uint32) + } + m.Uint32Map[mapkey] = mapvalue + iNdEx = postIndex + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Uint64Map", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMapsproto2 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var keykey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + keykey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapkey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + mapkey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var valuekey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + valuekey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapvalue uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + mapvalue |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if m.Uint64Map == nil { + m.Uint64Map = make(map[uint64]uint64) + } + m.Uint64Map[mapkey] = mapvalue + iNdEx = postIndex + case 7: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Sint32Map", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMapsproto2 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var keykey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + keykey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapkeytemp int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + mapkeytemp |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + mapkeytemp = int32((uint32(mapkeytemp) >> 1) ^ uint32(((mapkeytemp&1)<<31)>>31)) + mapkey := int32(mapkeytemp) + var valuekey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + valuekey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapvaluetemp int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + mapvaluetemp |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + mapvaluetemp = int32((uint32(mapvaluetemp) >> 1) ^ uint32(((mapvaluetemp&1)<<31)>>31)) + mapvalue := int32(mapvaluetemp) + if m.Sint32Map == nil { + m.Sint32Map = make(map[int32]int32) + } + m.Sint32Map[mapkey] = mapvalue + iNdEx = postIndex + case 8: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Sint64Map", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMapsproto2 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var keykey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + keykey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapkeytemp uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + mapkeytemp |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + mapkeytemp = (mapkeytemp >> 1) ^ uint64((int64(mapkeytemp&1)<<63)>>63) + mapkey := int64(mapkeytemp) + var valuekey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + valuekey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapvaluetemp uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + mapvaluetemp |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + mapvaluetemp = (mapvaluetemp >> 1) ^ uint64((int64(mapvaluetemp&1)<<63)>>63) + mapvalue := int64(mapvaluetemp) + if m.Sint64Map == nil { + m.Sint64Map = make(map[int64]int64) + } + m.Sint64Map[mapkey] = mapvalue + iNdEx = postIndex + case 9: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Fixed32Map", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMapsproto2 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var keykey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + keykey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapkey uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + iNdEx += 4 + mapkey = uint32(data[iNdEx-4]) + mapkey |= uint32(data[iNdEx-3]) << 8 + mapkey |= uint32(data[iNdEx-2]) << 16 + mapkey |= uint32(data[iNdEx-1]) << 24 + var valuekey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + valuekey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapvalue uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + iNdEx += 4 + mapvalue = uint32(data[iNdEx-4]) + mapvalue |= uint32(data[iNdEx-3]) << 8 + mapvalue |= uint32(data[iNdEx-2]) << 16 + mapvalue |= uint32(data[iNdEx-1]) << 24 + if m.Fixed32Map == nil { + m.Fixed32Map = make(map[uint32]uint32) + } + m.Fixed32Map[mapkey] = mapvalue + iNdEx = postIndex + case 10: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Sfixed32Map", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMapsproto2 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var keykey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + keykey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapkey int32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + iNdEx += 4 + mapkey = int32(data[iNdEx-4]) + mapkey |= int32(data[iNdEx-3]) << 8 + mapkey |= int32(data[iNdEx-2]) << 16 + mapkey |= int32(data[iNdEx-1]) << 24 + var valuekey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + valuekey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapvalue int32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + iNdEx += 4 + mapvalue = int32(data[iNdEx-4]) + mapvalue |= int32(data[iNdEx-3]) << 8 + mapvalue |= int32(data[iNdEx-2]) << 16 + mapvalue |= int32(data[iNdEx-1]) << 24 + if m.Sfixed32Map == nil { + m.Sfixed32Map = make(map[int32]int32) + } + m.Sfixed32Map[mapkey] = mapvalue + iNdEx = postIndex + case 11: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Fixed64Map", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMapsproto2 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var keykey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + keykey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapkey uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + iNdEx += 8 + mapkey = uint64(data[iNdEx-8]) + mapkey |= uint64(data[iNdEx-7]) << 8 + mapkey |= uint64(data[iNdEx-6]) << 16 + mapkey |= uint64(data[iNdEx-5]) << 24 + mapkey |= uint64(data[iNdEx-4]) << 32 + mapkey |= uint64(data[iNdEx-3]) << 40 + mapkey |= uint64(data[iNdEx-2]) << 48 + mapkey |= uint64(data[iNdEx-1]) << 56 + var valuekey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + valuekey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapvalue uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + iNdEx += 8 + mapvalue = uint64(data[iNdEx-8]) + mapvalue |= uint64(data[iNdEx-7]) << 8 + mapvalue |= uint64(data[iNdEx-6]) << 16 + mapvalue |= uint64(data[iNdEx-5]) << 24 + mapvalue |= uint64(data[iNdEx-4]) << 32 + mapvalue |= uint64(data[iNdEx-3]) << 40 + mapvalue |= uint64(data[iNdEx-2]) << 48 + mapvalue |= uint64(data[iNdEx-1]) << 56 + if m.Fixed64Map == nil { + m.Fixed64Map = make(map[uint64]uint64) + } + m.Fixed64Map[mapkey] = mapvalue + iNdEx = postIndex + case 12: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Sfixed64Map", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMapsproto2 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var keykey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + keykey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapkey int64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + iNdEx += 8 + mapkey = int64(data[iNdEx-8]) + mapkey |= int64(data[iNdEx-7]) << 8 + mapkey |= int64(data[iNdEx-6]) << 16 + mapkey |= int64(data[iNdEx-5]) << 24 + mapkey |= int64(data[iNdEx-4]) << 32 + mapkey |= int64(data[iNdEx-3]) << 40 + mapkey |= int64(data[iNdEx-2]) << 48 + mapkey |= int64(data[iNdEx-1]) << 56 + var valuekey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + valuekey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapvalue int64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + iNdEx += 8 + mapvalue = int64(data[iNdEx-8]) + mapvalue |= int64(data[iNdEx-7]) << 8 + mapvalue |= int64(data[iNdEx-6]) << 16 + mapvalue |= int64(data[iNdEx-5]) << 24 + mapvalue |= int64(data[iNdEx-4]) << 32 + mapvalue |= int64(data[iNdEx-3]) << 40 + mapvalue |= int64(data[iNdEx-2]) << 48 + mapvalue |= int64(data[iNdEx-1]) << 56 + if m.Sfixed64Map == nil { + m.Sfixed64Map = make(map[int64]int64) + } + m.Sfixed64Map[mapkey] = mapvalue + iNdEx = postIndex + case 13: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field BoolMap", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMapsproto2 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var keykey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + keykey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapkeytemp int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + mapkeytemp |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + mapkey := bool(mapkeytemp != 0) + var valuekey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + valuekey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapvaluetemp int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + mapvaluetemp |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + mapvalue := bool(mapvaluetemp != 0) + if m.BoolMap == nil { + m.BoolMap = make(map[bool]bool) + } + m.BoolMap[mapkey] = mapvalue + iNdEx = postIndex + case 14: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field StringMap", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMapsproto2 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var keykey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + keykey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var stringLenmapkey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLenmapkey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapkey := int(stringLenmapkey) + if intStringLenmapkey < 0 { + return ErrInvalidLengthMapsproto2 + } + postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey > l { + return io.ErrUnexpectedEOF + } + mapkey := string(data[iNdEx:postStringIndexmapkey]) + iNdEx = postStringIndexmapkey + var valuekey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + valuekey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var stringLenmapvalue uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLenmapvalue |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapvalue := int(stringLenmapvalue) + if intStringLenmapvalue < 0 { + return ErrInvalidLengthMapsproto2 + } + postStringIndexmapvalue := iNdEx + intStringLenmapvalue + if postStringIndexmapvalue > l { + return io.ErrUnexpectedEOF + } + mapvalue := string(data[iNdEx:postStringIndexmapvalue]) + iNdEx = postStringIndexmapvalue + if m.StringMap == nil { + m.StringMap = make(map[string]string) + } + m.StringMap[mapkey] = mapvalue + iNdEx = postIndex + case 15: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field StringToBytesMap", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMapsproto2 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var keykey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + keykey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var stringLenmapkey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLenmapkey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapkey := int(stringLenmapkey) + if intStringLenmapkey < 0 { + return ErrInvalidLengthMapsproto2 + } + postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey > l { + return io.ErrUnexpectedEOF + } + mapkey := string(data[iNdEx:postStringIndexmapkey]) + iNdEx = postStringIndexmapkey + var valuekey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + valuekey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapbyteLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + mapbyteLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intMapbyteLen := int(mapbyteLen) + if intMapbyteLen < 0 { + return ErrInvalidLengthMapsproto2 + } + postbytesIndex := iNdEx + intMapbyteLen + if postbytesIndex > l { + return io.ErrUnexpectedEOF + } + mapvalue := make([]byte, mapbyteLen) + copy(mapvalue, data[iNdEx:postbytesIndex]) + iNdEx = postbytesIndex + if m.StringToBytesMap == nil { + m.StringToBytesMap = make(map[string][]byte) + } + m.StringToBytesMap[mapkey] = mapvalue + iNdEx = postIndex + case 16: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field StringToEnumMap", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMapsproto2 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var keykey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + keykey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var stringLenmapkey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLenmapkey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapkey := int(stringLenmapkey) + if intStringLenmapkey < 0 { + return ErrInvalidLengthMapsproto2 + } + postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey > l { + return io.ErrUnexpectedEOF + } + mapkey := string(data[iNdEx:postStringIndexmapkey]) + iNdEx = postStringIndexmapkey + var valuekey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + valuekey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapvalue MapEnum + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + mapvalue |= (MapEnum(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if m.StringToEnumMap == nil { + m.StringToEnumMap = make(map[string]MapEnum) + } + m.StringToEnumMap[mapkey] = mapvalue + iNdEx = postIndex + case 17: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field StringToMsgMap", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMapsproto2 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var keykey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + keykey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var stringLenmapkey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLenmapkey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapkey := int(stringLenmapkey) + if intStringLenmapkey < 0 { + return ErrInvalidLengthMapsproto2 + } + postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey > l { + return io.ErrUnexpectedEOF + } + mapkey := string(data[iNdEx:postStringIndexmapkey]) + iNdEx = postStringIndexmapkey + var valuekey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + valuekey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapmsglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + mapmsglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if mapmsglen < 0 { + return ErrInvalidLengthMapsproto2 + } + postmsgIndex := iNdEx + mapmsglen + if mapmsglen < 0 { + return ErrInvalidLengthMapsproto2 + } + if postmsgIndex > l { + return io.ErrUnexpectedEOF + } + mapvalue := &FloatingPoint{} + if err := mapvalue.Unmarshal(data[iNdEx:postmsgIndex]); err != nil { + return err + } + iNdEx = postmsgIndex + if m.StringToMsgMap == nil { + m.StringToMsgMap = make(map[string]*FloatingPoint) + } + m.StringToMsgMap[mapkey] = mapvalue + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipMapsproto2(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMapsproto2 + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *AllMapsOrdered) 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 ErrIntOverflowMapsproto2 + } + 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: AllMapsOrdered: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: AllMapsOrdered: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field StringToDoubleMap", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMapsproto2 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var keykey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + keykey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var stringLenmapkey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLenmapkey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapkey := int(stringLenmapkey) + if intStringLenmapkey < 0 { + return ErrInvalidLengthMapsproto2 + } + postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey > l { + return io.ErrUnexpectedEOF + } + mapkey := string(data[iNdEx:postStringIndexmapkey]) + iNdEx = postStringIndexmapkey + var valuekey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + valuekey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapvaluetemp uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + iNdEx += 8 + mapvaluetemp = uint64(data[iNdEx-8]) + mapvaluetemp |= uint64(data[iNdEx-7]) << 8 + mapvaluetemp |= uint64(data[iNdEx-6]) << 16 + mapvaluetemp |= uint64(data[iNdEx-5]) << 24 + mapvaluetemp |= uint64(data[iNdEx-4]) << 32 + mapvaluetemp |= uint64(data[iNdEx-3]) << 40 + mapvaluetemp |= uint64(data[iNdEx-2]) << 48 + mapvaluetemp |= uint64(data[iNdEx-1]) << 56 + mapvalue := math.Float64frombits(mapvaluetemp) + if m.StringToDoubleMap == nil { + m.StringToDoubleMap = make(map[string]float64) + } + m.StringToDoubleMap[mapkey] = mapvalue + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field StringToFloatMap", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMapsproto2 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var keykey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + keykey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var stringLenmapkey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLenmapkey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapkey := int(stringLenmapkey) + if intStringLenmapkey < 0 { + return ErrInvalidLengthMapsproto2 + } + postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey > l { + return io.ErrUnexpectedEOF + } + mapkey := string(data[iNdEx:postStringIndexmapkey]) + iNdEx = postStringIndexmapkey + var valuekey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + valuekey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapvaluetemp uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + iNdEx += 4 + mapvaluetemp = uint32(data[iNdEx-4]) + mapvaluetemp |= uint32(data[iNdEx-3]) << 8 + mapvaluetemp |= uint32(data[iNdEx-2]) << 16 + mapvaluetemp |= uint32(data[iNdEx-1]) << 24 + mapvalue := math.Float32frombits(mapvaluetemp) + if m.StringToFloatMap == nil { + m.StringToFloatMap = make(map[string]float32) + } + m.StringToFloatMap[mapkey] = mapvalue + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Int32Map", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMapsproto2 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var keykey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + keykey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapkey int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + mapkey |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var valuekey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + valuekey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapvalue int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + mapvalue |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if m.Int32Map == nil { + m.Int32Map = make(map[int32]int32) + } + m.Int32Map[mapkey] = mapvalue + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Int64Map", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMapsproto2 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var keykey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + keykey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapkey int64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + mapkey |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var valuekey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + valuekey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapvalue int64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + mapvalue |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if m.Int64Map == nil { + m.Int64Map = make(map[int64]int64) + } + m.Int64Map[mapkey] = mapvalue + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Uint32Map", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMapsproto2 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var keykey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + keykey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapkey uint32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + mapkey |= (uint32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var valuekey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + valuekey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapvalue uint32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + mapvalue |= (uint32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if m.Uint32Map == nil { + m.Uint32Map = make(map[uint32]uint32) + } + m.Uint32Map[mapkey] = mapvalue + iNdEx = postIndex + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Uint64Map", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMapsproto2 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var keykey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + keykey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapkey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + mapkey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var valuekey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + valuekey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapvalue uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + mapvalue |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if m.Uint64Map == nil { + m.Uint64Map = make(map[uint64]uint64) + } + m.Uint64Map[mapkey] = mapvalue + iNdEx = postIndex + case 7: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Sint32Map", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMapsproto2 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var keykey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + keykey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapkeytemp int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + mapkeytemp |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + mapkeytemp = int32((uint32(mapkeytemp) >> 1) ^ uint32(((mapkeytemp&1)<<31)>>31)) + mapkey := int32(mapkeytemp) + var valuekey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + valuekey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapvaluetemp int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + mapvaluetemp |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + mapvaluetemp = int32((uint32(mapvaluetemp) >> 1) ^ uint32(((mapvaluetemp&1)<<31)>>31)) + mapvalue := int32(mapvaluetemp) + if m.Sint32Map == nil { + m.Sint32Map = make(map[int32]int32) + } + m.Sint32Map[mapkey] = mapvalue + iNdEx = postIndex + case 8: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Sint64Map", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMapsproto2 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var keykey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + keykey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapkeytemp uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + mapkeytemp |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + mapkeytemp = (mapkeytemp >> 1) ^ uint64((int64(mapkeytemp&1)<<63)>>63) + mapkey := int64(mapkeytemp) + var valuekey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + valuekey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapvaluetemp uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + mapvaluetemp |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + mapvaluetemp = (mapvaluetemp >> 1) ^ uint64((int64(mapvaluetemp&1)<<63)>>63) + mapvalue := int64(mapvaluetemp) + if m.Sint64Map == nil { + m.Sint64Map = make(map[int64]int64) + } + m.Sint64Map[mapkey] = mapvalue + iNdEx = postIndex + case 9: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Fixed32Map", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMapsproto2 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var keykey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + keykey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapkey uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + iNdEx += 4 + mapkey = uint32(data[iNdEx-4]) + mapkey |= uint32(data[iNdEx-3]) << 8 + mapkey |= uint32(data[iNdEx-2]) << 16 + mapkey |= uint32(data[iNdEx-1]) << 24 + var valuekey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + valuekey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapvalue uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + iNdEx += 4 + mapvalue = uint32(data[iNdEx-4]) + mapvalue |= uint32(data[iNdEx-3]) << 8 + mapvalue |= uint32(data[iNdEx-2]) << 16 + mapvalue |= uint32(data[iNdEx-1]) << 24 + if m.Fixed32Map == nil { + m.Fixed32Map = make(map[uint32]uint32) + } + m.Fixed32Map[mapkey] = mapvalue + iNdEx = postIndex + case 10: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Sfixed32Map", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMapsproto2 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var keykey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + keykey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapkey int32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + iNdEx += 4 + mapkey = int32(data[iNdEx-4]) + mapkey |= int32(data[iNdEx-3]) << 8 + mapkey |= int32(data[iNdEx-2]) << 16 + mapkey |= int32(data[iNdEx-1]) << 24 + var valuekey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + valuekey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapvalue int32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + iNdEx += 4 + mapvalue = int32(data[iNdEx-4]) + mapvalue |= int32(data[iNdEx-3]) << 8 + mapvalue |= int32(data[iNdEx-2]) << 16 + mapvalue |= int32(data[iNdEx-1]) << 24 + if m.Sfixed32Map == nil { + m.Sfixed32Map = make(map[int32]int32) + } + m.Sfixed32Map[mapkey] = mapvalue + iNdEx = postIndex + case 11: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Fixed64Map", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMapsproto2 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var keykey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + keykey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapkey uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + iNdEx += 8 + mapkey = uint64(data[iNdEx-8]) + mapkey |= uint64(data[iNdEx-7]) << 8 + mapkey |= uint64(data[iNdEx-6]) << 16 + mapkey |= uint64(data[iNdEx-5]) << 24 + mapkey |= uint64(data[iNdEx-4]) << 32 + mapkey |= uint64(data[iNdEx-3]) << 40 + mapkey |= uint64(data[iNdEx-2]) << 48 + mapkey |= uint64(data[iNdEx-1]) << 56 + var valuekey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + valuekey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapvalue uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + iNdEx += 8 + mapvalue = uint64(data[iNdEx-8]) + mapvalue |= uint64(data[iNdEx-7]) << 8 + mapvalue |= uint64(data[iNdEx-6]) << 16 + mapvalue |= uint64(data[iNdEx-5]) << 24 + mapvalue |= uint64(data[iNdEx-4]) << 32 + mapvalue |= uint64(data[iNdEx-3]) << 40 + mapvalue |= uint64(data[iNdEx-2]) << 48 + mapvalue |= uint64(data[iNdEx-1]) << 56 + if m.Fixed64Map == nil { + m.Fixed64Map = make(map[uint64]uint64) + } + m.Fixed64Map[mapkey] = mapvalue + iNdEx = postIndex + case 12: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Sfixed64Map", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMapsproto2 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var keykey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + keykey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapkey int64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + iNdEx += 8 + mapkey = int64(data[iNdEx-8]) + mapkey |= int64(data[iNdEx-7]) << 8 + mapkey |= int64(data[iNdEx-6]) << 16 + mapkey |= int64(data[iNdEx-5]) << 24 + mapkey |= int64(data[iNdEx-4]) << 32 + mapkey |= int64(data[iNdEx-3]) << 40 + mapkey |= int64(data[iNdEx-2]) << 48 + mapkey |= int64(data[iNdEx-1]) << 56 + var valuekey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + valuekey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapvalue int64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + iNdEx += 8 + mapvalue = int64(data[iNdEx-8]) + mapvalue |= int64(data[iNdEx-7]) << 8 + mapvalue |= int64(data[iNdEx-6]) << 16 + mapvalue |= int64(data[iNdEx-5]) << 24 + mapvalue |= int64(data[iNdEx-4]) << 32 + mapvalue |= int64(data[iNdEx-3]) << 40 + mapvalue |= int64(data[iNdEx-2]) << 48 + mapvalue |= int64(data[iNdEx-1]) << 56 + if m.Sfixed64Map == nil { + m.Sfixed64Map = make(map[int64]int64) + } + m.Sfixed64Map[mapkey] = mapvalue + iNdEx = postIndex + case 13: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field BoolMap", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMapsproto2 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var keykey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + keykey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapkeytemp int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + mapkeytemp |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + mapkey := bool(mapkeytemp != 0) + var valuekey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + valuekey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapvaluetemp int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + mapvaluetemp |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + mapvalue := bool(mapvaluetemp != 0) + if m.BoolMap == nil { + m.BoolMap = make(map[bool]bool) + } + m.BoolMap[mapkey] = mapvalue + iNdEx = postIndex + case 14: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field StringMap", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMapsproto2 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var keykey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + keykey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var stringLenmapkey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLenmapkey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapkey := int(stringLenmapkey) + if intStringLenmapkey < 0 { + return ErrInvalidLengthMapsproto2 + } + postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey > l { + return io.ErrUnexpectedEOF + } + mapkey := string(data[iNdEx:postStringIndexmapkey]) + iNdEx = postStringIndexmapkey + var valuekey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + valuekey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var stringLenmapvalue uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLenmapvalue |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapvalue := int(stringLenmapvalue) + if intStringLenmapvalue < 0 { + return ErrInvalidLengthMapsproto2 + } + postStringIndexmapvalue := iNdEx + intStringLenmapvalue + if postStringIndexmapvalue > l { + return io.ErrUnexpectedEOF + } + mapvalue := string(data[iNdEx:postStringIndexmapvalue]) + iNdEx = postStringIndexmapvalue + if m.StringMap == nil { + m.StringMap = make(map[string]string) + } + m.StringMap[mapkey] = mapvalue + iNdEx = postIndex + case 15: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field StringToBytesMap", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMapsproto2 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var keykey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + keykey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var stringLenmapkey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLenmapkey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapkey := int(stringLenmapkey) + if intStringLenmapkey < 0 { + return ErrInvalidLengthMapsproto2 + } + postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey > l { + return io.ErrUnexpectedEOF + } + mapkey := string(data[iNdEx:postStringIndexmapkey]) + iNdEx = postStringIndexmapkey + var valuekey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + valuekey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapbyteLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + mapbyteLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intMapbyteLen := int(mapbyteLen) + if intMapbyteLen < 0 { + return ErrInvalidLengthMapsproto2 + } + postbytesIndex := iNdEx + intMapbyteLen + if postbytesIndex > l { + return io.ErrUnexpectedEOF + } + mapvalue := make([]byte, mapbyteLen) + copy(mapvalue, data[iNdEx:postbytesIndex]) + iNdEx = postbytesIndex + if m.StringToBytesMap == nil { + m.StringToBytesMap = make(map[string][]byte) + } + m.StringToBytesMap[mapkey] = mapvalue + iNdEx = postIndex + case 16: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field StringToEnumMap", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMapsproto2 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var keykey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + keykey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var stringLenmapkey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLenmapkey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapkey := int(stringLenmapkey) + if intStringLenmapkey < 0 { + return ErrInvalidLengthMapsproto2 + } + postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey > l { + return io.ErrUnexpectedEOF + } + mapkey := string(data[iNdEx:postStringIndexmapkey]) + iNdEx = postStringIndexmapkey + var valuekey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + valuekey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapvalue MapEnum + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + mapvalue |= (MapEnum(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if m.StringToEnumMap == nil { + m.StringToEnumMap = make(map[string]MapEnum) + } + m.StringToEnumMap[mapkey] = mapvalue + iNdEx = postIndex + case 17: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field StringToMsgMap", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMapsproto2 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var keykey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + keykey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var stringLenmapkey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLenmapkey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapkey := int(stringLenmapkey) + if intStringLenmapkey < 0 { + return ErrInvalidLengthMapsproto2 + } + postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey > l { + return io.ErrUnexpectedEOF + } + mapkey := string(data[iNdEx:postStringIndexmapkey]) + iNdEx = postStringIndexmapkey + var valuekey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + valuekey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapmsglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + mapmsglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if mapmsglen < 0 { + return ErrInvalidLengthMapsproto2 + } + postmsgIndex := iNdEx + mapmsglen + if mapmsglen < 0 { + return ErrInvalidLengthMapsproto2 + } + if postmsgIndex > l { + return io.ErrUnexpectedEOF + } + mapvalue := &FloatingPoint{} + if err := mapvalue.Unmarshal(data[iNdEx:postmsgIndex]); err != nil { + return err + } + iNdEx = postmsgIndex + if m.StringToMsgMap == nil { + m.StringToMsgMap = make(map[string]*FloatingPoint) + } + m.StringToMsgMap[mapkey] = mapvalue + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipMapsproto2(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMapsproto2 + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipMapsproto2(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, ErrIntOverflowMapsproto2 + } + 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, ErrIntOverflowMapsproto2 + } + 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, ErrIntOverflowMapsproto2 + } + 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, ErrInvalidLengthMapsproto2 + } + return iNdEx, nil + case 3: + for { + var innerWire uint64 + var start int = iNdEx + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowMapsproto2 + } + 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 := skipMapsproto2(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 ( + ErrInvalidLengthMapsproto2 = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowMapsproto2 = fmt.Errorf("proto: integer overflow") +) + +var fileDescriptorMapsproto2 = []byte{ + // 970 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xec, 0x96, 0xbd, 0x4f, 0xf3, 0x46, + 0x1c, 0xc7, 0x71, 0xde, 0x73, 0x79, 0x73, 0x0e, 0x5a, 0x45, 0x91, 0x9a, 0x96, 0xd0, 0x4a, 0x21, + 0xb4, 0x09, 0x4d, 0xab, 0xaa, 0x82, 0x16, 0x89, 0x40, 0x68, 0x2a, 0x0a, 0x45, 0xa4, 0xef, 0x12, + 0x52, 0x93, 0xe2, 0x84, 0xa8, 0x49, 0x8c, 0x62, 0xbb, 0x2a, 0x1b, 0x7f, 0x46, 0xd7, 0x6e, 0x1d, + 0x3b, 0x76, 0xec, 0xc8, 0xd8, 0x91, 0xa1, 0x03, 0xf0, 0x2c, 0x8c, 0x8c, 0x8c, 0xcf, 0xf9, 0xce, + 0x76, 0xce, 0xf6, 0xcf, 0x76, 0x9e, 0xed, 0x19, 0x32, 0x9c, 0x2e, 0x77, 0xfc, 0xbe, 0x9f, 0xfb, + 0x1a, 0xfb, 0x7e, 0xfa, 0xa2, 0xb5, 0x5f, 0xe4, 0x71, 0x4f, 0x56, 0xea, 0xda, 0x64, 0xdc, 0x9d, + 0x2a, 0x17, 0xdd, 0x91, 0x34, 0xad, 0x8f, 0xbb, 0x97, 0xca, 0xe5, 0x54, 0x56, 0xe5, 0x46, 0x8d, + 0x4e, 0x38, 0x65,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0x62, 0x01, 0x08, 0xce, 0x04, 0x45, 0x58, 0x2e, 0x3a, + 0x96, 0x8b, 0xb8, 0x0f, 0xa2, 0xe3, 0x70, 0xa1, 0xf0, 0x2e, 0x3a, 0x96, 0x8b, 0x44, 0x00, 0x82, + 0x77, 0xa1, 0x58, 0x2e, 0xf6, 0x11, 0x3a, 0x18, 0xfe, 0x2e, 0x9d, 0x33, 0x1b, 0x49, 0xca, 0x78, + 0x17, 0x64, 0xcc, 0xca, 0x18, 0x04, 0xf5, 0xad, 0x0d, 0xfc, 0x05, 0x4a, 0x75, 0x66, 0xcb, 0x02, + 0xa2, 0x98, 0xf7, 0x60, 0x2b, 0x7d, 0x07, 0x27, 0xa5, 0x70, 0x20, 0xd3, 0x0e, 0x7b, 0xa4, 0x54, + 0x90, 0x1d, 0xee, 0x99, 0x98, 0x1d, 0xf6, 0x50, 0x96, 0x1d, 0x86, 0x49, 0x07, 0xda, 0xe1, 0x38, + 0x86, 0x1d, 0x06, 0xda, 0x46, 0xf1, 0xa6, 0x2c, 0xeb, 0x95, 0x85, 0x0c, 0x85, 0xac, 0x82, 0x10, + 0xa3, 0x86, 0x01, 0xe2, 0x3d, 0xb6, 0xa2, 0x6f, 0x87, 0x7e, 0xfa, 0xba, 0x3c, 0xeb, 0xf7, 0x76, + 0xcc, 0x2a, 0xf3, 0xed, 0x98, 0x6b, 0xfe, 0x06, 0x36, 0xaf, 0x54, 0x49, 0xd1, 0x49, 0xb9, 0x39, + 0x6e, 0xa0, 0x59, 0xec, 0xb8, 0x81, 0xe6, 0x36, 0xee, 0xa0, 0x9c, 0x59, 0xda, 0x9a, 0x68, 0x63, + 0x1d, 0x2b, 0x52, 0xec, 0xba, 0x2f, 0xd6, 0xa8, 0x65, 0xd4, 0x9c, 0x62, 0xdf, 0xc5, 0x27, 0x28, + 0x6b, 0x16, 0x1e, 0x29, 0xf4, 0xa1, 0xf3, 0x94, 0x59, 0xf1, 0x65, 0xb2, 0x52, 0x86, 0xcc, 0x2a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d, 0x47, 0xa2, 0xab, 0xcf, 0x83, 0x5e, + 0x04, 0xbb, 0x45, 0xb0, 0x5b, 0x04, 0xbb, 0x45, 0xb0, 0x7b, 0x3d, 0x82, 0xdd, 0x56, 0xe4, 0x8f, + 0x3f, 0xdf, 0x16, 0xaa, 0xab, 0x28, 0x6e, 0x1c, 0x8d, 0x63, 0x28, 0x74, 0xb4, 0x2b, 0x2e, 0xd1, + 0xb9, 0x29, 0x0a, 0x74, 0xde, 0x13, 0x43, 0xcd, 0xaf, 0x6e, 0xee, 0x4b, 0x4b, 0xff, 0x91, 0x71, + 0x4b, 0xc6, 0xdd, 0x7d, 0x49, 0x78, 0x24, 0xe3, 0x89, 0x8c, 0x67, 0x32, 0xae, 0x1f, 0x4a, 0xc2, + 0x5f, 0x64, 0xfc, 0x4d, 0xc6, 0x3f, 0x64, 0xfc, 0x4b, 0xc6, 0xcd, 0x03, 0xa9, 0x27, 0xf3, 0x1d, + 0x19, 0x8f, 0xe4, 0xf7, 0x13, 0x99, 0x9f, 0xc9, 0x7c, 0xfd, 0xa2, 0xb4, 0xf4, 0x32, 0x00, 0x00, + 0xff, 0xff, 0x7f, 0x9b, 0x8a, 0x9e, 0x2b, 0x14, 0x00, 0x00, +} diff --git a/vendor/github.com/gogo/protobuf/test/mapsproto2/combos/unmarshaler/mapsproto2.proto b/vendor/github.com/gogo/protobuf/test/mapsproto2/combos/unmarshaler/mapsproto2.proto new file mode 100644 index 000000000..7d2eb480d --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/mapsproto2/combos/unmarshaler/mapsproto2.proto @@ -0,0 +1,115 @@ +// Copyright (c) 2013, Vastech SA (PTY) LTD. All rights reserved. +// http://github.com/gogo/protobuf/gogoproto +// +// Go support for Protocol Buffers - Google's data interchange format +// +// Copyright 2014 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. + +syntax = "proto2"; + +package proto2.maps; + +import "github.com/gogo/protobuf/gogoproto/gogo.proto"; + +option (gogoproto.goproto_stringer_all) = false; +option (gogoproto.goproto_enum_prefix_all) = false; +option (gogoproto.goproto_getters_all) = false; + +option (gogoproto.equal_all) = true; +option (gogoproto.verbose_equal_all) = true; +option (gogoproto.stringer_all) = true; +option (gogoproto.gostring_all) = true; +option (gogoproto.face_all) = true; +option (gogoproto.description_all) = true; + +option (gogoproto.testgen_all) = true; +option (gogoproto.populate_all) = true; +option (gogoproto.benchgen_all) = true; +option (gogoproto.unmarshaler_all) = true; +option (gogoproto.marshaler_all) = false; +option (gogoproto.sizer_all) = true; + +option (gogoproto.goproto_enum_stringer_all) = false; +option (gogoproto.enum_stringer_all) = true; + +option (gogoproto.unsafe_marshaler_all) = false; +option (gogoproto.unsafe_unmarshaler_all) = false; + +message FloatingPoint { + optional double f = 1; +} + +enum MapEnum { + MA = 0; + MB = 1; + MC = 2; +} + +message AllMaps { + map StringToDoubleMap = 1; + map StringToFloatMap = 2; + map Int32Map = 3; + map Int64Map = 4; + map Uint32Map = 5; + map Uint64Map = 6; + map Sint32Map = 7; + map Sint64Map = 8; + map Fixed32Map = 9; + map Sfixed32Map = 10; + map Fixed64Map = 11; + map Sfixed64Map = 12; + map BoolMap = 13; + map StringMap = 14; + map StringToBytesMap = 15; + map StringToEnumMap = 16; + map StringToMsgMap = 17; +} + +message AllMapsOrdered { + option (gogoproto.stable_marshaler) = true; + + map StringToDoubleMap = 1; + map StringToFloatMap = 2; + map Int32Map = 3; + map Int64Map = 4; + map Uint32Map = 5; + map Uint64Map = 6; + map Sint32Map = 7; + map Sint64Map = 8; + map Fixed32Map = 9; + map Sfixed32Map = 10; + map Fixed64Map = 11; + map Sfixed64Map = 12; + map BoolMap = 13; + map StringMap = 14; + map StringToBytesMap = 15; + map StringToEnumMap = 16; + map StringToMsgMap = 17; +} diff --git a/vendor/github.com/gogo/protobuf/test/mapsproto2/combos/unmarshaler/mapsproto2pb_test.go b/vendor/github.com/gogo/protobuf/test/mapsproto2/combos/unmarshaler/mapsproto2pb_test.go new file mode 100644 index 000000000..a6dfcca1f --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/mapsproto2/combos/unmarshaler/mapsproto2pb_test.go @@ -0,0 +1,668 @@ +// Code generated by protoc-gen-gogo. +// source: combos/unmarshaler/mapsproto2.proto +// DO NOT EDIT! + +/* +Package proto2_maps is a generated protocol buffer package. + +It is generated from these files: + combos/unmarshaler/mapsproto2.proto + +It has these top-level messages: + FloatingPoint + AllMaps + AllMapsOrdered +*/ +package proto2_maps + +import testing "testing" +import math_rand "math/rand" +import time "time" +import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" +import github_com_gogo_protobuf_jsonpb "github.com/gogo/protobuf/jsonpb" +import fmt "fmt" +import go_parser "go/parser" +import proto "github.com/gogo/protobuf/proto" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +func TestFloatingPointProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedFloatingPoint(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &FloatingPoint{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkFloatingPointProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*FloatingPoint, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedFloatingPoint(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkFloatingPointProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedFloatingPoint(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &FloatingPoint{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestAllMapsProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAllMaps(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &AllMaps{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkAllMapsProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*AllMaps, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedAllMaps(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkAllMapsProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedAllMaps(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &AllMaps{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestAllMapsOrderedProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAllMapsOrdered(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &AllMapsOrdered{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkAllMapsOrderedProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*AllMapsOrdered, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedAllMapsOrdered(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkAllMapsOrderedProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedAllMapsOrdered(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &AllMapsOrdered{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestFloatingPointJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedFloatingPoint(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &FloatingPoint{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestAllMapsJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAllMaps(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &AllMaps{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestAllMapsOrderedJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAllMapsOrdered(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &AllMapsOrdered{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestFloatingPointProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedFloatingPoint(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &FloatingPoint{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestFloatingPointProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedFloatingPoint(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &FloatingPoint{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestAllMapsProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAllMaps(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &AllMaps{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestAllMapsProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAllMaps(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &AllMaps{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestAllMapsOrderedProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAllMapsOrdered(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &AllMapsOrdered{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestAllMapsOrderedProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAllMapsOrdered(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &AllMapsOrdered{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestMapsproto2Description(t *testing.T) { + Mapsproto2Description() +} +func TestFloatingPointVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedFloatingPoint(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &FloatingPoint{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestAllMapsVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAllMaps(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &AllMaps{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestAllMapsOrderedVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAllMapsOrdered(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &AllMapsOrdered{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestFloatingPointFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedFloatingPoint(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestAllMapsFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAllMaps(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestAllMapsOrderedFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAllMapsOrdered(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestFloatingPointGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedFloatingPoint(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestAllMapsGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAllMaps(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestAllMapsOrderedGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAllMapsOrdered(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestFloatingPointSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedFloatingPoint(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkFloatingPointSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*FloatingPoint, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedFloatingPoint(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestAllMapsSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAllMaps(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkAllMapsSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*AllMaps, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedAllMaps(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestAllMapsOrderedSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAllMapsOrdered(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkAllMapsOrderedSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*AllMapsOrdered, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedAllMapsOrdered(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestFloatingPointStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedFloatingPoint(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestAllMapsStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAllMaps(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestAllMapsOrderedStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAllMapsOrdered(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} + +//These tests are generated by github.com/gogo/protobuf/plugin/testgen diff --git a/vendor/github.com/gogo/protobuf/test/mapsproto2/combos/unsafeboth/mapsproto2.pb.go b/vendor/github.com/gogo/protobuf/test/mapsproto2/combos/unsafeboth/mapsproto2.pb.go new file mode 100644 index 000000000..2a33ce547 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/mapsproto2/combos/unsafeboth/mapsproto2.pb.go @@ -0,0 +1,7430 @@ +// Code generated by protoc-gen-gogo. +// source: combos/unsafeboth/mapsproto2.proto +// DO NOT EDIT! + +/* + Package proto2_maps is a generated protocol buffer package. + + It is generated from these files: + combos/unsafeboth/mapsproto2.proto + + It has these top-level messages: + FloatingPoint + AllMaps + AllMapsOrdered +*/ +package proto2_maps + +import proto "github.com/gogo/protobuf/proto" +import fmt "fmt" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" + +import github_com_gogo_protobuf_protoc_gen_gogo_descriptor "github.com/gogo/protobuf/protoc-gen-gogo/descriptor" +import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" +import compress_gzip "compress/gzip" +import bytes "bytes" +import io_ioutil "io/ioutil" + +import strconv "strconv" + +import strings "strings" +import sort "sort" +import reflect "reflect" +import github_com_gogo_protobuf_sortkeys "github.com/gogo/protobuf/sortkeys" + +import unsafe "unsafe" +import errors "errors" + +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. +const _ = proto.GoGoProtoPackageIsVersion1 + +type MapEnum int32 + +const ( + MA MapEnum = 0 + MB MapEnum = 1 + MC MapEnum = 2 +) + +var MapEnum_name = map[int32]string{ + 0: "MA", + 1: "MB", + 2: "MC", +} +var MapEnum_value = map[string]int32{ + "MA": 0, + "MB": 1, + "MC": 2, +} + +func (x MapEnum) Enum() *MapEnum { + p := new(MapEnum) + *p = x + return p +} +func (x MapEnum) MarshalJSON() ([]byte, error) { + return proto.MarshalJSONEnum(MapEnum_name, int32(x)) +} +func (x *MapEnum) UnmarshalJSON(data []byte) error { + value, err := proto.UnmarshalJSONEnum(MapEnum_value, data, "MapEnum") + if err != nil { + return err + } + *x = MapEnum(value) + return nil +} +func (MapEnum) EnumDescriptor() ([]byte, []int) { return fileDescriptorMapsproto2, []int{0} } + +type FloatingPoint struct { + F *float64 `protobuf:"fixed64,1,opt,name=f" json:"f,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *FloatingPoint) Reset() { *m = FloatingPoint{} } +func (*FloatingPoint) ProtoMessage() {} +func (*FloatingPoint) Descriptor() ([]byte, []int) { return fileDescriptorMapsproto2, []int{0} } + +type AllMaps struct { + StringToDoubleMap map[string]float64 `protobuf:"bytes,1,rep,name=StringToDoubleMap,json=stringToDoubleMap" json:"StringToDoubleMap,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"fixed64,2,opt,name=value"` + StringToFloatMap map[string]float32 `protobuf:"bytes,2,rep,name=StringToFloatMap,json=stringToFloatMap" json:"StringToFloatMap,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"fixed32,2,opt,name=value"` + Int32Map map[int32]int32 `protobuf:"bytes,3,rep,name=Int32Map,json=int32Map" json:"Int32Map,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"varint,2,opt,name=value"` + Int64Map map[int64]int64 `protobuf:"bytes,4,rep,name=Int64Map,json=int64Map" json:"Int64Map,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"varint,2,opt,name=value"` + Uint32Map map[uint32]uint32 `protobuf:"bytes,5,rep,name=Uint32Map,json=uint32Map" json:"Uint32Map,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"varint,2,opt,name=value"` + Uint64Map map[uint64]uint64 `protobuf:"bytes,6,rep,name=Uint64Map,json=uint64Map" json:"Uint64Map,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"varint,2,opt,name=value"` + Sint32Map map[int32]int32 `protobuf:"bytes,7,rep,name=Sint32Map,json=sint32Map" json:"Sint32Map,omitempty" protobuf_key:"zigzag32,1,opt,name=key" protobuf_val:"zigzag32,2,opt,name=value"` + Sint64Map map[int64]int64 `protobuf:"bytes,8,rep,name=Sint64Map,json=sint64Map" json:"Sint64Map,omitempty" protobuf_key:"zigzag64,1,opt,name=key" protobuf_val:"zigzag64,2,opt,name=value"` + Fixed32Map map[uint32]uint32 `protobuf:"bytes,9,rep,name=Fixed32Map,json=fixed32Map" json:"Fixed32Map,omitempty" protobuf_key:"fixed32,1,opt,name=key" protobuf_val:"fixed32,2,opt,name=value"` + Sfixed32Map map[int32]int32 `protobuf:"bytes,10,rep,name=Sfixed32Map,json=sfixed32Map" json:"Sfixed32Map,omitempty" protobuf_key:"fixed32,1,opt,name=key" protobuf_val:"fixed32,2,opt,name=value"` + Fixed64Map map[uint64]uint64 `protobuf:"bytes,11,rep,name=Fixed64Map,json=fixed64Map" json:"Fixed64Map,omitempty" protobuf_key:"fixed64,1,opt,name=key" protobuf_val:"fixed64,2,opt,name=value"` + Sfixed64Map map[int64]int64 `protobuf:"bytes,12,rep,name=Sfixed64Map,json=sfixed64Map" json:"Sfixed64Map,omitempty" protobuf_key:"fixed64,1,opt,name=key" protobuf_val:"fixed64,2,opt,name=value"` + BoolMap map[bool]bool `protobuf:"bytes,13,rep,name=BoolMap,json=boolMap" json:"BoolMap,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"varint,2,opt,name=value"` + StringMap map[string]string `protobuf:"bytes,14,rep,name=StringMap,json=stringMap" json:"StringMap,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + StringToBytesMap map[string][]byte `protobuf:"bytes,15,rep,name=StringToBytesMap,json=stringToBytesMap" json:"StringToBytesMap,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + StringToEnumMap map[string]MapEnum `protobuf:"bytes,16,rep,name=StringToEnumMap,json=stringToEnumMap" json:"StringToEnumMap,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"varint,2,opt,name=value,enum=proto2.maps.MapEnum"` + StringToMsgMap map[string]*FloatingPoint `protobuf:"bytes,17,rep,name=StringToMsgMap,json=stringToMsgMap" json:"StringToMsgMap,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *AllMaps) Reset() { *m = AllMaps{} } +func (*AllMaps) ProtoMessage() {} +func (*AllMaps) Descriptor() ([]byte, []int) { return fileDescriptorMapsproto2, []int{1} } + +type AllMapsOrdered struct { + StringToDoubleMap map[string]float64 `protobuf:"bytes,1,rep,name=StringToDoubleMap,json=stringToDoubleMap" json:"StringToDoubleMap,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"fixed64,2,opt,name=value"` + StringToFloatMap map[string]float32 `protobuf:"bytes,2,rep,name=StringToFloatMap,json=stringToFloatMap" json:"StringToFloatMap,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"fixed32,2,opt,name=value"` + Int32Map map[int32]int32 `protobuf:"bytes,3,rep,name=Int32Map,json=int32Map" json:"Int32Map,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"varint,2,opt,name=value"` + Int64Map map[int64]int64 `protobuf:"bytes,4,rep,name=Int64Map,json=int64Map" json:"Int64Map,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"varint,2,opt,name=value"` + Uint32Map map[uint32]uint32 `protobuf:"bytes,5,rep,name=Uint32Map,json=uint32Map" json:"Uint32Map,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"varint,2,opt,name=value"` + Uint64Map map[uint64]uint64 `protobuf:"bytes,6,rep,name=Uint64Map,json=uint64Map" json:"Uint64Map,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"varint,2,opt,name=value"` + Sint32Map map[int32]int32 `protobuf:"bytes,7,rep,name=Sint32Map,json=sint32Map" json:"Sint32Map,omitempty" protobuf_key:"zigzag32,1,opt,name=key" protobuf_val:"zigzag32,2,opt,name=value"` + Sint64Map map[int64]int64 `protobuf:"bytes,8,rep,name=Sint64Map,json=sint64Map" json:"Sint64Map,omitempty" protobuf_key:"zigzag64,1,opt,name=key" protobuf_val:"zigzag64,2,opt,name=value"` + Fixed32Map map[uint32]uint32 `protobuf:"bytes,9,rep,name=Fixed32Map,json=fixed32Map" json:"Fixed32Map,omitempty" protobuf_key:"fixed32,1,opt,name=key" protobuf_val:"fixed32,2,opt,name=value"` + Sfixed32Map map[int32]int32 `protobuf:"bytes,10,rep,name=Sfixed32Map,json=sfixed32Map" json:"Sfixed32Map,omitempty" protobuf_key:"fixed32,1,opt,name=key" protobuf_val:"fixed32,2,opt,name=value"` + Fixed64Map map[uint64]uint64 `protobuf:"bytes,11,rep,name=Fixed64Map,json=fixed64Map" json:"Fixed64Map,omitempty" protobuf_key:"fixed64,1,opt,name=key" protobuf_val:"fixed64,2,opt,name=value"` + Sfixed64Map map[int64]int64 `protobuf:"bytes,12,rep,name=Sfixed64Map,json=sfixed64Map" json:"Sfixed64Map,omitempty" protobuf_key:"fixed64,1,opt,name=key" protobuf_val:"fixed64,2,opt,name=value"` + BoolMap map[bool]bool `protobuf:"bytes,13,rep,name=BoolMap,json=boolMap" json:"BoolMap,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"varint,2,opt,name=value"` + StringMap map[string]string `protobuf:"bytes,14,rep,name=StringMap,json=stringMap" json:"StringMap,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + StringToBytesMap map[string][]byte `protobuf:"bytes,15,rep,name=StringToBytesMap,json=stringToBytesMap" json:"StringToBytesMap,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + StringToEnumMap map[string]MapEnum `protobuf:"bytes,16,rep,name=StringToEnumMap,json=stringToEnumMap" json:"StringToEnumMap,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"varint,2,opt,name=value,enum=proto2.maps.MapEnum"` + StringToMsgMap map[string]*FloatingPoint `protobuf:"bytes,17,rep,name=StringToMsgMap,json=stringToMsgMap" json:"StringToMsgMap,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *AllMapsOrdered) Reset() { *m = AllMapsOrdered{} } +func (*AllMapsOrdered) ProtoMessage() {} +func (*AllMapsOrdered) Descriptor() ([]byte, []int) { return fileDescriptorMapsproto2, []int{2} } + +func init() { + proto.RegisterType((*FloatingPoint)(nil), "proto2.maps.FloatingPoint") + proto.RegisterType((*AllMaps)(nil), "proto2.maps.AllMaps") + proto.RegisterType((*AllMapsOrdered)(nil), "proto2.maps.AllMapsOrdered") + proto.RegisterEnum("proto2.maps.MapEnum", MapEnum_name, MapEnum_value) +} +func (this *FloatingPoint) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return Mapsproto2Description() +} +func (this *AllMaps) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return Mapsproto2Description() +} +func (this *AllMapsOrdered) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return Mapsproto2Description() +} +func Mapsproto2Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + d := &github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet{} + var gzipped = []byte{ + // 4104 bytes of a gzipped FileDescriptorSet + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xec, 0x5a, 0x5b, 0x6c, 0x23, 0xe7, + 0x75, 0x36, 0xef, 0xe4, 0x21, 0x45, 0x8e, 0x46, 0xf2,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x4f, 0xa6, 0x71, + 0x18, 0x7b, 0xb0, 0xb9, 0x81, 0x7c, 0xa9, 0xde, 0x0d, 0x9e, 0xa0, 0x41, 0xc3, 0x0a, 0x68, 0x16, + 0x2a, 0x08, 0xe1, 0x3e, 0xca, 0x96, 0xae, 0x42, 0xd1, 0xef, 0x1e, 0x75, 0x11, 0x52, 0x8e, 0xab, + 0x0f, 0x5c, 0x1a, 0x85, 0x29, 0x8d, 0x5d, 0xa8, 0x0a, 0x24, 0x30, 0xc9, 0xd0, 0x2c, 0x97, 0xd2, + 0xc8, 0xd7, 0xa5, 0x47, 0x60, 0xce, 0x77, 0xfb, 0x59, 0x81, 0x95, 0x57, 0xd2, 0xb0, 0x18, 0x16, + 0x73, 0xa1, 0xe1, 0x8f, 0xcb, 0x07, 0x23, 0xe0, 0xc4, 0x18, 0x60, 0xdc, 0x11, 0x06, 0x7e, 0x85, + 0x11, 0x95, 0x32, 0xf5, 0x13, 0xc3, 0xc4, 0x68, 0x8a, 0x5d, 0x29, 0xae, 0x3d, 0x30, 0x53, 0x54, + 0xaf, 0xec, 0x12, 0x88, 0xc6, 0x90, 0xea, 0xe3, 0x90, 0xe4, 0x29, 0x8e, 0x30, 0x2c, 0xcf, 0xc6, + 0x40, 0x62, 0x51, 0xa3, 0x38, 0xf5, 0x43, 0x90, 0x23, 0xff, 0x99, 0x6f, 0xd3, 0xd4, 0xe6, 0x2c, + 0x11, 0x10, 0xbf, 0xaa, 0x4b, 0x90, 0xa5, 0x61, 0xd6, 0x32, 0x44, 0x69, 0xf0, 0xae, 0xc9, 0xc4, + 0xb4, 0x8c, 0xb6, 0x3e, 0x34, 0xdd, 0xc6, 0x0b, 0xba, 0x39, 0x34, 0x68, 0xc0, 0xe0, 0xc4, 0x70, + 0xe1, 0x93, 0x44, 0xa6, 0x5e, 0x82, 0x3c, 0x8b, 0xca, 0x2e, 0x62, 0x6e, 0xd2, 0xec, 0x93, 0xd2, + 0x58, 0xa0, 0xee, 0x10, 0x09, 0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0xfe, 0xc6, + 0x50, 0xfe, 0xfc, 0xf7, 0xfd, 0x33, 0xb1, 0xcd, 0x90, 0xeb, 0xa6, 0x59, 0x3d, 0x86, 0xdb, 0x42, + 0x66, 0x76, 0x06, 0xce, 0x57, 0x39, 0xe7, 0xe2, 0xd8, 0xec, 0x12, 0xda, 0x43, 0x10, 0x72, 0x6f, + 0x3e, 0x66, 0xe0, 0xfc, 0x02, 0xe7, 0x54, 0x39, 0x56, 0x4c, 0x0b, 0x61, 0x7c, 0x02, 0xe6, 0x71, + 0xa7, 0x7e, 0x62, 0x3b, 0x7c, 0xdf, 0x3b, 0x03, 0xdd, 0x6b, 0x9c, 0xae, 0xc4, 0x81, 0x74, 0x17, + 0x4c, 0xb8, 0x1e, 0x85, 0x6c, 0x1b, 0x37, 0x40, 0x33, 0x50, 0x7c, 0x91, 0x53, 0x64, 0x88, 0x3e, + 0x81, 0xae, 0x43, 0xa1, 0x63, 0xf3, 0x34, 0x1c, 0x0d, 0xff, 0x12, 0x87, 0xe7, 0x05, 0x86, 0x53, + 0xf4, 0xed, 0xfe, 0xd0, 0x24, 0x39, 0x3a, 0x9a, 0xe2, 0x77, 0x05, 0x85, 0xc0, 0x70, 0x8a, 0x73, + 0xb8, 0xf5, 0xf7, 0x04, 0x85, 0x23, 0xf9, 0xf3, 0xd3, 0xe4, 0xac, 0xd7, 0x3c, 0xb3, 0xad, 0x59, + 0x8c, 0x78, 0x9d, 0x33, 0x00, 0x87, 0x10, 0x82, 0xc7, 0x20, 0x37, 0xeb, 0x44, 0xfc, 0x3e, 0x87, + 0x67, 0x0d, 0x31, 0x03, 0xb8, 0xce, 0x44, 0x92, 0x21, 0xbf, 0xad, 0x44, 0x53, 0xfc, 0x01, 0xa7, + 0x28, 0x4a, 0x30, 0xfe, 0x18, 0xae, 0xe1, 0xb8, 0xb8, 0x55, 0x9f, 0x81, 0xe4, 0x0d, 0xf1, 0x18, + 0x1c, 0xc2, 0x5d, 0x79, 0x62, 0x58, 0xcd,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 0xf9, 0x16, 0x7e, 0xbe, 0xf3, 0xdd, 0x8b, 0xb1, 0xb7, 0xf1, 0xf3, 0x0e, + 0x7e, 0x7e, 0x80, 0x9f, 0x97, 0xbe, 0x77, 0x31, 0xf6, 0x15, 0xfc, 0x7c, 0x15, 0x3f, 0x7f, 0x83, + 0x9f, 0xaf, 0xe3, 0xe7, 0x9b, 0xdf, 0x43, 0x7d, 0xfc, 0x7c, 0x07, 0xbf, 0xbf, 0x8d, 0xff, 0xdf, + 0xc1, 0xff, 0x3f, 0xc0, 0xcf, 0x4b, 0xff, 0x7a, 0x31, 0xf6, 0xff, 0x01, 0x00, 0x00, 0xff, 0xff, + 0x19, 0x7f, 0xee, 0x57, 0x97, 0x3e, 0x00, 0x00, + } + r := bytes.NewReader(gzipped) + gzipr, err := compress_gzip.NewReader(r) + if err != nil { + panic(err) + } + ungzipped, err := io_ioutil.ReadAll(gzipr) + if err != nil { + panic(err) + } + if err := github_com_gogo_protobuf_proto.Unmarshal(ungzipped, d); err != nil { + panic(err) + } + return d +} +func (x MapEnum) String() string { + s, ok := MapEnum_name[int32(x)] + if ok { + return s + } + return strconv.Itoa(int(x)) +} +func (this *FloatingPoint) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*FloatingPoint) + if !ok { + that2, ok := that.(FloatingPoint) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *FloatingPoint") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *FloatingPoint but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *FloatingPoint but is not nil && this == nil") + } + if this.F != nil && that1.F != nil { + if *this.F != *that1.F { + return fmt.Errorf("F this(%v) Not Equal that(%v)", *this.F, *that1.F) + } + } else if this.F != nil { + return fmt.Errorf("this.F == nil && that.F != nil") + } else if that1.F != nil { + return fmt.Errorf("F this(%v) Not Equal that(%v)", this.F, that1.F) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *FloatingPoint) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*FloatingPoint) + if !ok { + that2, ok := that.(FloatingPoint) + 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.F != nil && that1.F != nil { + if *this.F != *that1.F { + return false + } + } else if this.F != nil { + return false + } else if that1.F != nil { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *AllMaps) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*AllMaps) + if !ok { + that2, ok := that.(AllMaps) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *AllMaps") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *AllMaps but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *AllMaps but is not nil && this == nil") + } + if len(this.StringToDoubleMap) != len(that1.StringToDoubleMap) { + return fmt.Errorf("StringToDoubleMap this(%v) Not Equal that(%v)", len(this.StringToDoubleMap), len(that1.StringToDoubleMap)) + } + for i := range this.StringToDoubleMap { + if this.StringToDoubleMap[i] != that1.StringToDoubleMap[i] { + return fmt.Errorf("StringToDoubleMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringToDoubleMap[i], i, that1.StringToDoubleMap[i]) + } + } + if len(this.StringToFloatMap) != len(that1.StringToFloatMap) { + return fmt.Errorf("StringToFloatMap this(%v) Not Equal that(%v)", len(this.StringToFloatMap), len(that1.StringToFloatMap)) + } + for i := range this.StringToFloatMap { + if this.StringToFloatMap[i] != that1.StringToFloatMap[i] { + return fmt.Errorf("StringToFloatMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringToFloatMap[i], i, that1.StringToFloatMap[i]) + } + } + if len(this.Int32Map) != len(that1.Int32Map) { + return fmt.Errorf("Int32Map this(%v) Not Equal that(%v)", len(this.Int32Map), len(that1.Int32Map)) + } + for i := range this.Int32Map { + if this.Int32Map[i] != that1.Int32Map[i] { + return fmt.Errorf("Int32Map this[%v](%v) Not Equal that[%v](%v)", i, this.Int32Map[i], i, that1.Int32Map[i]) + } + } + if len(this.Int64Map) != len(that1.Int64Map) { + return fmt.Errorf("Int64Map this(%v) Not Equal that(%v)", len(this.Int64Map), len(that1.Int64Map)) + } + for i := range this.Int64Map { + if this.Int64Map[i] != that1.Int64Map[i] { + return fmt.Errorf("Int64Map this[%v](%v) Not Equal that[%v](%v)", i, this.Int64Map[i], i, that1.Int64Map[i]) + } + } + if len(this.Uint32Map) != len(that1.Uint32Map) { + return fmt.Errorf("Uint32Map this(%v) Not Equal that(%v)", len(this.Uint32Map), len(that1.Uint32Map)) + } + for i := range this.Uint32Map { + if this.Uint32Map[i] != that1.Uint32Map[i] { + return fmt.Errorf("Uint32Map this[%v](%v) Not Equal that[%v](%v)", i, this.Uint32Map[i], i, that1.Uint32Map[i]) + } + } + if len(this.Uint64Map) != len(that1.Uint64Map) { + return fmt.Errorf("Uint64Map this(%v) Not Equal that(%v)", len(this.Uint64Map), len(that1.Uint64Map)) + } + for i := range this.Uint64Map { + if this.Uint64Map[i] != that1.Uint64Map[i] { + return fmt.Errorf("Uint64Map this[%v](%v) Not Equal that[%v](%v)", i, this.Uint64Map[i], i, that1.Uint64Map[i]) + } + } + if len(this.Sint32Map) != len(that1.Sint32Map) { + return fmt.Errorf("Sint32Map this(%v) Not Equal that(%v)", len(this.Sint32Map), len(that1.Sint32Map)) + } + for i := range this.Sint32Map { + if this.Sint32Map[i] != that1.Sint32Map[i] { + return fmt.Errorf("Sint32Map this[%v](%v) Not Equal that[%v](%v)", i, this.Sint32Map[i], i, that1.Sint32Map[i]) + } + } + if len(this.Sint64Map) != len(that1.Sint64Map) { + return fmt.Errorf("Sint64Map this(%v) Not Equal that(%v)", len(this.Sint64Map), len(that1.Sint64Map)) + } + for i := range this.Sint64Map { + if this.Sint64Map[i] != that1.Sint64Map[i] { + return fmt.Errorf("Sint64Map this[%v](%v) Not Equal that[%v](%v)", i, this.Sint64Map[i], i, that1.Sint64Map[i]) + } + } + if len(this.Fixed32Map) != len(that1.Fixed32Map) { + return fmt.Errorf("Fixed32Map this(%v) Not Equal that(%v)", len(this.Fixed32Map), len(that1.Fixed32Map)) + } + for i := range this.Fixed32Map { + if this.Fixed32Map[i] != that1.Fixed32Map[i] { + return fmt.Errorf("Fixed32Map this[%v](%v) Not Equal that[%v](%v)", i, this.Fixed32Map[i], i, that1.Fixed32Map[i]) + } + } + if len(this.Sfixed32Map) != len(that1.Sfixed32Map) { + return fmt.Errorf("Sfixed32Map this(%v) Not Equal that(%v)", len(this.Sfixed32Map), len(that1.Sfixed32Map)) + } + for i := range this.Sfixed32Map { + if this.Sfixed32Map[i] != that1.Sfixed32Map[i] { + return fmt.Errorf("Sfixed32Map this[%v](%v) Not Equal that[%v](%v)", i, this.Sfixed32Map[i], i, that1.Sfixed32Map[i]) + } + } + if len(this.Fixed64Map) != len(that1.Fixed64Map) { + return fmt.Errorf("Fixed64Map this(%v) Not Equal that(%v)", len(this.Fixed64Map), len(that1.Fixed64Map)) + } + for i := range this.Fixed64Map { + if this.Fixed64Map[i] != that1.Fixed64Map[i] { + return fmt.Errorf("Fixed64Map this[%v](%v) Not Equal that[%v](%v)", i, this.Fixed64Map[i], i, that1.Fixed64Map[i]) + } + } + if len(this.Sfixed64Map) != len(that1.Sfixed64Map) { + return fmt.Errorf("Sfixed64Map this(%v) Not Equal that(%v)", len(this.Sfixed64Map), len(that1.Sfixed64Map)) + } + for i := range this.Sfixed64Map { + if this.Sfixed64Map[i] != that1.Sfixed64Map[i] { + return fmt.Errorf("Sfixed64Map this[%v](%v) Not Equal that[%v](%v)", i, this.Sfixed64Map[i], i, that1.Sfixed64Map[i]) + } + } + if len(this.BoolMap) != len(that1.BoolMap) { + return fmt.Errorf("BoolMap this(%v) Not Equal that(%v)", len(this.BoolMap), len(that1.BoolMap)) + } + for i := range this.BoolMap { + if this.BoolMap[i] != that1.BoolMap[i] { + return fmt.Errorf("BoolMap this[%v](%v) Not Equal that[%v](%v)", i, this.BoolMap[i], i, that1.BoolMap[i]) + } + } + if len(this.StringMap) != len(that1.StringMap) { + return fmt.Errorf("StringMap this(%v) Not Equal that(%v)", len(this.StringMap), len(that1.StringMap)) + } + for i := range this.StringMap { + if this.StringMap[i] != that1.StringMap[i] { + return fmt.Errorf("StringMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringMap[i], i, that1.StringMap[i]) + } + } + if len(this.StringToBytesMap) != len(that1.StringToBytesMap) { + return fmt.Errorf("StringToBytesMap this(%v) Not Equal that(%v)", len(this.StringToBytesMap), len(that1.StringToBytesMap)) + } + for i := range this.StringToBytesMap { + if !bytes.Equal(this.StringToBytesMap[i], that1.StringToBytesMap[i]) { + return fmt.Errorf("StringToBytesMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringToBytesMap[i], i, that1.StringToBytesMap[i]) + } + } + if len(this.StringToEnumMap) != len(that1.StringToEnumMap) { + return fmt.Errorf("StringToEnumMap this(%v) Not Equal that(%v)", len(this.StringToEnumMap), len(that1.StringToEnumMap)) + } + for i := range this.StringToEnumMap { + if this.StringToEnumMap[i] != that1.StringToEnumMap[i] { + return fmt.Errorf("StringToEnumMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringToEnumMap[i], i, that1.StringToEnumMap[i]) + } + } + if len(this.StringToMsgMap) != len(that1.StringToMsgMap) { + return fmt.Errorf("StringToMsgMap this(%v) Not Equal that(%v)", len(this.StringToMsgMap), len(that1.StringToMsgMap)) + } + for i := range this.StringToMsgMap { + if !this.StringToMsgMap[i].Equal(that1.StringToMsgMap[i]) { + return fmt.Errorf("StringToMsgMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringToMsgMap[i], i, that1.StringToMsgMap[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *AllMaps) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*AllMaps) + if !ok { + that2, ok := that.(AllMaps) + 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.StringToDoubleMap) != len(that1.StringToDoubleMap) { + return false + } + for i := range this.StringToDoubleMap { + if this.StringToDoubleMap[i] != that1.StringToDoubleMap[i] { + return false + } + } + if len(this.StringToFloatMap) != len(that1.StringToFloatMap) { + return false + } + for i := range this.StringToFloatMap { + if this.StringToFloatMap[i] != that1.StringToFloatMap[i] { + return false + } + } + if len(this.Int32Map) != len(that1.Int32Map) { + return false + } + for i := range this.Int32Map { + if this.Int32Map[i] != that1.Int32Map[i] { + return false + } + } + if len(this.Int64Map) != len(that1.Int64Map) { + return false + } + for i := range this.Int64Map { + if this.Int64Map[i] != that1.Int64Map[i] { + return false + } + } + if len(this.Uint32Map) != len(that1.Uint32Map) { + return false + } + for i := range this.Uint32Map { + if this.Uint32Map[i] != that1.Uint32Map[i] { + return false + } + } + if len(this.Uint64Map) != len(that1.Uint64Map) { + return false + } + for i := range this.Uint64Map { + if this.Uint64Map[i] != that1.Uint64Map[i] { + return false + } + } + if len(this.Sint32Map) != len(that1.Sint32Map) { + return false + } + for i := range this.Sint32Map { + if this.Sint32Map[i] != that1.Sint32Map[i] { + return false + } + } + if len(this.Sint64Map) != len(that1.Sint64Map) { + return false + } + for i := range this.Sint64Map { + if this.Sint64Map[i] != that1.Sint64Map[i] { + return false + } + } + if len(this.Fixed32Map) != len(that1.Fixed32Map) { + return false + } + for i := range this.Fixed32Map { + if this.Fixed32Map[i] != that1.Fixed32Map[i] { + return false + } + } + if len(this.Sfixed32Map) != len(that1.Sfixed32Map) { + return false + } + for i := range this.Sfixed32Map { + if this.Sfixed32Map[i] != that1.Sfixed32Map[i] { + return false + } + } + if len(this.Fixed64Map) != len(that1.Fixed64Map) { + return false + } + for i := range this.Fixed64Map { + if this.Fixed64Map[i] != that1.Fixed64Map[i] { + return false + } + } + if len(this.Sfixed64Map) != len(that1.Sfixed64Map) { + return false + } + for i := range this.Sfixed64Map { + if this.Sfixed64Map[i] != that1.Sfixed64Map[i] { + return false + } + } + if len(this.BoolMap) != len(that1.BoolMap) { + return false + } + for i := range this.BoolMap { + if this.BoolMap[i] != that1.BoolMap[i] { + return false + } + } + if len(this.StringMap) != len(that1.StringMap) { + return false + } + for i := range this.StringMap { + if this.StringMap[i] != that1.StringMap[i] { + return false + } + } + if len(this.StringToBytesMap) != len(that1.StringToBytesMap) { + return false + } + for i := range this.StringToBytesMap { + if !bytes.Equal(this.StringToBytesMap[i], that1.StringToBytesMap[i]) { + return false + } + } + if len(this.StringToEnumMap) != len(that1.StringToEnumMap) { + return false + } + for i := range this.StringToEnumMap { + if this.StringToEnumMap[i] != that1.StringToEnumMap[i] { + return false + } + } + if len(this.StringToMsgMap) != len(that1.StringToMsgMap) { + return false + } + for i := range this.StringToMsgMap { + if !this.StringToMsgMap[i].Equal(that1.StringToMsgMap[i]) { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *AllMapsOrdered) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*AllMapsOrdered) + if !ok { + that2, ok := that.(AllMapsOrdered) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *AllMapsOrdered") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *AllMapsOrdered but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *AllMapsOrdered but is not nil && this == nil") + } + if len(this.StringToDoubleMap) != len(that1.StringToDoubleMap) { + return fmt.Errorf("StringToDoubleMap this(%v) Not Equal that(%v)", len(this.StringToDoubleMap), len(that1.StringToDoubleMap)) + } + for i := range this.StringToDoubleMap { + if this.StringToDoubleMap[i] != that1.StringToDoubleMap[i] { + return fmt.Errorf("StringToDoubleMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringToDoubleMap[i], i, that1.StringToDoubleMap[i]) + } + } + if len(this.StringToFloatMap) != len(that1.StringToFloatMap) { + return fmt.Errorf("StringToFloatMap this(%v) Not Equal that(%v)", len(this.StringToFloatMap), len(that1.StringToFloatMap)) + } + for i := range this.StringToFloatMap { + if this.StringToFloatMap[i] != that1.StringToFloatMap[i] { + return fmt.Errorf("StringToFloatMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringToFloatMap[i], i, that1.StringToFloatMap[i]) + } + } + if len(this.Int32Map) != len(that1.Int32Map) { + return fmt.Errorf("Int32Map this(%v) Not Equal that(%v)", len(this.Int32Map), len(that1.Int32Map)) + } + for i := range this.Int32Map { + if this.Int32Map[i] != that1.Int32Map[i] { + return fmt.Errorf("Int32Map this[%v](%v) Not Equal that[%v](%v)", i, this.Int32Map[i], i, that1.Int32Map[i]) + } + } + if len(this.Int64Map) != len(that1.Int64Map) { + return fmt.Errorf("Int64Map this(%v) Not Equal that(%v)", len(this.Int64Map), len(that1.Int64Map)) + } + for i := range this.Int64Map { + if this.Int64Map[i] != that1.Int64Map[i] { + return fmt.Errorf("Int64Map this[%v](%v) Not Equal that[%v](%v)", i, this.Int64Map[i], i, that1.Int64Map[i]) + } + } + if len(this.Uint32Map) != len(that1.Uint32Map) { + return fmt.Errorf("Uint32Map this(%v) Not Equal that(%v)", len(this.Uint32Map), len(that1.Uint32Map)) + } + for i := range this.Uint32Map { + if this.Uint32Map[i] != that1.Uint32Map[i] { + return fmt.Errorf("Uint32Map this[%v](%v) Not Equal that[%v](%v)", i, this.Uint32Map[i], i, that1.Uint32Map[i]) + } + } + if len(this.Uint64Map) != len(that1.Uint64Map) { + return fmt.Errorf("Uint64Map this(%v) Not Equal that(%v)", len(this.Uint64Map), len(that1.Uint64Map)) + } + for i := range this.Uint64Map { + if this.Uint64Map[i] != that1.Uint64Map[i] { + return fmt.Errorf("Uint64Map this[%v](%v) Not Equal that[%v](%v)", i, this.Uint64Map[i], i, that1.Uint64Map[i]) + } + } + if len(this.Sint32Map) != len(that1.Sint32Map) { + return fmt.Errorf("Sint32Map this(%v) Not Equal that(%v)", len(this.Sint32Map), len(that1.Sint32Map)) + } + for i := range this.Sint32Map { + if this.Sint32Map[i] != that1.Sint32Map[i] { + return fmt.Errorf("Sint32Map this[%v](%v) Not Equal that[%v](%v)", i, this.Sint32Map[i], i, that1.Sint32Map[i]) + } + } + if len(this.Sint64Map) != len(that1.Sint64Map) { + return fmt.Errorf("Sint64Map this(%v) Not Equal that(%v)", len(this.Sint64Map), len(that1.Sint64Map)) + } + for i := range this.Sint64Map { + if this.Sint64Map[i] != that1.Sint64Map[i] { + return fmt.Errorf("Sint64Map this[%v](%v) Not Equal that[%v](%v)", i, this.Sint64Map[i], i, that1.Sint64Map[i]) + } + } + if len(this.Fixed32Map) != len(that1.Fixed32Map) { + return fmt.Errorf("Fixed32Map this(%v) Not Equal that(%v)", len(this.Fixed32Map), len(that1.Fixed32Map)) + } + for i := range this.Fixed32Map { + if this.Fixed32Map[i] != that1.Fixed32Map[i] { + return fmt.Errorf("Fixed32Map this[%v](%v) Not Equal that[%v](%v)", i, this.Fixed32Map[i], i, that1.Fixed32Map[i]) + } + } + if len(this.Sfixed32Map) != len(that1.Sfixed32Map) { + return fmt.Errorf("Sfixed32Map this(%v) Not Equal that(%v)", len(this.Sfixed32Map), len(that1.Sfixed32Map)) + } + for i := range this.Sfixed32Map { + if this.Sfixed32Map[i] != that1.Sfixed32Map[i] { + return fmt.Errorf("Sfixed32Map this[%v](%v) Not Equal that[%v](%v)", i, this.Sfixed32Map[i], i, that1.Sfixed32Map[i]) + } + } + if len(this.Fixed64Map) != len(that1.Fixed64Map) { + return fmt.Errorf("Fixed64Map this(%v) Not Equal that(%v)", len(this.Fixed64Map), len(that1.Fixed64Map)) + } + for i := range this.Fixed64Map { + if this.Fixed64Map[i] != that1.Fixed64Map[i] { + return fmt.Errorf("Fixed64Map this[%v](%v) Not Equal that[%v](%v)", i, this.Fixed64Map[i], i, that1.Fixed64Map[i]) + } + } + if len(this.Sfixed64Map) != len(that1.Sfixed64Map) { + return fmt.Errorf("Sfixed64Map this(%v) Not Equal that(%v)", len(this.Sfixed64Map), len(that1.Sfixed64Map)) + } + for i := range this.Sfixed64Map { + if this.Sfixed64Map[i] != that1.Sfixed64Map[i] { + return fmt.Errorf("Sfixed64Map this[%v](%v) Not Equal that[%v](%v)", i, this.Sfixed64Map[i], i, that1.Sfixed64Map[i]) + } + } + if len(this.BoolMap) != len(that1.BoolMap) { + return fmt.Errorf("BoolMap this(%v) Not Equal that(%v)", len(this.BoolMap), len(that1.BoolMap)) + } + for i := range this.BoolMap { + if this.BoolMap[i] != that1.BoolMap[i] { + return fmt.Errorf("BoolMap this[%v](%v) Not Equal that[%v](%v)", i, this.BoolMap[i], i, that1.BoolMap[i]) + } + } + if len(this.StringMap) != len(that1.StringMap) { + return fmt.Errorf("StringMap this(%v) Not Equal that(%v)", len(this.StringMap), len(that1.StringMap)) + } + for i := range this.StringMap { + if this.StringMap[i] != that1.StringMap[i] { + return fmt.Errorf("StringMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringMap[i], i, that1.StringMap[i]) + } + } + if len(this.StringToBytesMap) != len(that1.StringToBytesMap) { + return fmt.Errorf("StringToBytesMap this(%v) Not Equal that(%v)", len(this.StringToBytesMap), len(that1.StringToBytesMap)) + } + for i := range this.StringToBytesMap { + if !bytes.Equal(this.StringToBytesMap[i], that1.StringToBytesMap[i]) { + return fmt.Errorf("StringToBytesMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringToBytesMap[i], i, that1.StringToBytesMap[i]) + } + } + if len(this.StringToEnumMap) != len(that1.StringToEnumMap) { + return fmt.Errorf("StringToEnumMap this(%v) Not Equal that(%v)", len(this.StringToEnumMap), len(that1.StringToEnumMap)) + } + for i := range this.StringToEnumMap { + if this.StringToEnumMap[i] != that1.StringToEnumMap[i] { + return fmt.Errorf("StringToEnumMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringToEnumMap[i], i, that1.StringToEnumMap[i]) + } + } + if len(this.StringToMsgMap) != len(that1.StringToMsgMap) { + return fmt.Errorf("StringToMsgMap this(%v) Not Equal that(%v)", len(this.StringToMsgMap), len(that1.StringToMsgMap)) + } + for i := range this.StringToMsgMap { + if !this.StringToMsgMap[i].Equal(that1.StringToMsgMap[i]) { + return fmt.Errorf("StringToMsgMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringToMsgMap[i], i, that1.StringToMsgMap[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *AllMapsOrdered) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*AllMapsOrdered) + if !ok { + that2, ok := that.(AllMapsOrdered) + 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.StringToDoubleMap) != len(that1.StringToDoubleMap) { + return false + } + for i := range this.StringToDoubleMap { + if this.StringToDoubleMap[i] != that1.StringToDoubleMap[i] { + return false + } + } + if len(this.StringToFloatMap) != len(that1.StringToFloatMap) { + return false + } + for i := range this.StringToFloatMap { + if this.StringToFloatMap[i] != that1.StringToFloatMap[i] { + return false + } + } + if len(this.Int32Map) != len(that1.Int32Map) { + return false + } + for i := range this.Int32Map { + if this.Int32Map[i] != that1.Int32Map[i] { + return false + } + } + if len(this.Int64Map) != len(that1.Int64Map) { + return false + } + for i := range this.Int64Map { + if this.Int64Map[i] != that1.Int64Map[i] { + return false + } + } + if len(this.Uint32Map) != len(that1.Uint32Map) { + return false + } + for i := range this.Uint32Map { + if this.Uint32Map[i] != that1.Uint32Map[i] { + return false + } + } + if len(this.Uint64Map) != len(that1.Uint64Map) { + return false + } + for i := range this.Uint64Map { + if this.Uint64Map[i] != that1.Uint64Map[i] { + return false + } + } + if len(this.Sint32Map) != len(that1.Sint32Map) { + return false + } + for i := range this.Sint32Map { + if this.Sint32Map[i] != that1.Sint32Map[i] { + return false + } + } + if len(this.Sint64Map) != len(that1.Sint64Map) { + return false + } + for i := range this.Sint64Map { + if this.Sint64Map[i] != that1.Sint64Map[i] { + return false + } + } + if len(this.Fixed32Map) != len(that1.Fixed32Map) { + return false + } + for i := range this.Fixed32Map { + if this.Fixed32Map[i] != that1.Fixed32Map[i] { + return false + } + } + if len(this.Sfixed32Map) != len(that1.Sfixed32Map) { + return false + } + for i := range this.Sfixed32Map { + if this.Sfixed32Map[i] != that1.Sfixed32Map[i] { + return false + } + } + if len(this.Fixed64Map) != len(that1.Fixed64Map) { + return false + } + for i := range this.Fixed64Map { + if this.Fixed64Map[i] != that1.Fixed64Map[i] { + return false + } + } + if len(this.Sfixed64Map) != len(that1.Sfixed64Map) { + return false + } + for i := range this.Sfixed64Map { + if this.Sfixed64Map[i] != that1.Sfixed64Map[i] { + return false + } + } + if len(this.BoolMap) != len(that1.BoolMap) { + return false + } + for i := range this.BoolMap { + if this.BoolMap[i] != that1.BoolMap[i] { + return false + } + } + if len(this.StringMap) != len(that1.StringMap) { + return false + } + for i := range this.StringMap { + if this.StringMap[i] != that1.StringMap[i] { + return false + } + } + if len(this.StringToBytesMap) != len(that1.StringToBytesMap) { + return false + } + for i := range this.StringToBytesMap { + if !bytes.Equal(this.StringToBytesMap[i], that1.StringToBytesMap[i]) { + return false + } + } + if len(this.StringToEnumMap) != len(that1.StringToEnumMap) { + return false + } + for i := range this.StringToEnumMap { + if this.StringToEnumMap[i] != that1.StringToEnumMap[i] { + return false + } + } + if len(this.StringToMsgMap) != len(that1.StringToMsgMap) { + return false + } + for i := range this.StringToMsgMap { + if !this.StringToMsgMap[i].Equal(that1.StringToMsgMap[i]) { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} + +type FloatingPointFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetF() *float64 +} + +func (this *FloatingPoint) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *FloatingPoint) TestProto() github_com_gogo_protobuf_proto.Message { + return NewFloatingPointFromFace(this) +} + +func (this *FloatingPoint) GetF() *float64 { + return this.F +} + +func NewFloatingPointFromFace(that FloatingPointFace) *FloatingPoint { + this := &FloatingPoint{} + this.F = that.GetF() + return this +} + +type AllMapsFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetStringToDoubleMap() map[string]float64 + GetStringToFloatMap() map[string]float32 + GetInt32Map() map[int32]int32 + GetInt64Map() map[int64]int64 + GetUint32Map() map[uint32]uint32 + GetUint64Map() map[uint64]uint64 + GetSint32Map() map[int32]int32 + GetSint64Map() map[int64]int64 + GetFixed32Map() map[uint32]uint32 + GetSfixed32Map() map[int32]int32 + GetFixed64Map() map[uint64]uint64 + GetSfixed64Map() map[int64]int64 + GetBoolMap() map[bool]bool + GetStringMap() map[string]string + GetStringToBytesMap() map[string][]byte + GetStringToEnumMap() map[string]MapEnum + GetStringToMsgMap() map[string]*FloatingPoint +} + +func (this *AllMaps) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *AllMaps) TestProto() github_com_gogo_protobuf_proto.Message { + return NewAllMapsFromFace(this) +} + +func (this *AllMaps) GetStringToDoubleMap() map[string]float64 { + return this.StringToDoubleMap +} + +func (this *AllMaps) GetStringToFloatMap() map[string]float32 { + return this.StringToFloatMap +} + +func (this *AllMaps) GetInt32Map() map[int32]int32 { + return this.Int32Map +} + +func (this *AllMaps) GetInt64Map() map[int64]int64 { + return this.Int64Map +} + +func (this *AllMaps) GetUint32Map() map[uint32]uint32 { + return this.Uint32Map +} + +func (this *AllMaps) GetUint64Map() map[uint64]uint64 { + return this.Uint64Map +} + +func (this *AllMaps) GetSint32Map() map[int32]int32 { + return this.Sint32Map +} + +func (this *AllMaps) GetSint64Map() map[int64]int64 { + return this.Sint64Map +} + +func (this *AllMaps) GetFixed32Map() map[uint32]uint32 { + return this.Fixed32Map +} + +func (this *AllMaps) GetSfixed32Map() map[int32]int32 { + return this.Sfixed32Map +} + +func (this *AllMaps) GetFixed64Map() map[uint64]uint64 { + return this.Fixed64Map +} + +func (this *AllMaps) GetSfixed64Map() map[int64]int64 { + return this.Sfixed64Map +} + +func (this *AllMaps) GetBoolMap() map[bool]bool { + return this.BoolMap +} + +func (this *AllMaps) GetStringMap() map[string]string { + return this.StringMap +} + +func (this *AllMaps) GetStringToBytesMap() map[string][]byte { + return this.StringToBytesMap +} + +func (this *AllMaps) GetStringToEnumMap() map[string]MapEnum { + return this.StringToEnumMap +} + +func (this *AllMaps) GetStringToMsgMap() map[string]*FloatingPoint { + return this.StringToMsgMap +} + +func NewAllMapsFromFace(that AllMapsFace) *AllMaps { + this := &AllMaps{} + this.StringToDoubleMap = that.GetStringToDoubleMap() + this.StringToFloatMap = that.GetStringToFloatMap() + this.Int32Map = that.GetInt32Map() + this.Int64Map = that.GetInt64Map() + this.Uint32Map = that.GetUint32Map() + this.Uint64Map = that.GetUint64Map() + this.Sint32Map = that.GetSint32Map() + this.Sint64Map = that.GetSint64Map() + this.Fixed32Map = that.GetFixed32Map() + this.Sfixed32Map = that.GetSfixed32Map() + this.Fixed64Map = that.GetFixed64Map() + this.Sfixed64Map = that.GetSfixed64Map() + this.BoolMap = that.GetBoolMap() + this.StringMap = that.GetStringMap() + this.StringToBytesMap = that.GetStringToBytesMap() + this.StringToEnumMap = that.GetStringToEnumMap() + this.StringToMsgMap = that.GetStringToMsgMap() + return this +} + +type AllMapsOrderedFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetStringToDoubleMap() map[string]float64 + GetStringToFloatMap() map[string]float32 + GetInt32Map() map[int32]int32 + GetInt64Map() map[int64]int64 + GetUint32Map() map[uint32]uint32 + GetUint64Map() map[uint64]uint64 + GetSint32Map() map[int32]int32 + GetSint64Map() map[int64]int64 + GetFixed32Map() map[uint32]uint32 + GetSfixed32Map() map[int32]int32 + GetFixed64Map() map[uint64]uint64 + GetSfixed64Map() map[int64]int64 + GetBoolMap() map[bool]bool + GetStringMap() map[string]string + GetStringToBytesMap() map[string][]byte + GetStringToEnumMap() map[string]MapEnum + GetStringToMsgMap() map[string]*FloatingPoint +} + +func (this *AllMapsOrdered) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *AllMapsOrdered) TestProto() github_com_gogo_protobuf_proto.Message { + return NewAllMapsOrderedFromFace(this) +} + +func (this *AllMapsOrdered) GetStringToDoubleMap() map[string]float64 { + return this.StringToDoubleMap +} + +func (this *AllMapsOrdered) GetStringToFloatMap() map[string]float32 { + return this.StringToFloatMap +} + +func (this *AllMapsOrdered) GetInt32Map() map[int32]int32 { + return this.Int32Map +} + +func (this *AllMapsOrdered) GetInt64Map() map[int64]int64 { + return this.Int64Map +} + +func (this *AllMapsOrdered) GetUint32Map() map[uint32]uint32 { + return this.Uint32Map +} + +func (this *AllMapsOrdered) GetUint64Map() map[uint64]uint64 { + return this.Uint64Map +} + +func (this *AllMapsOrdered) GetSint32Map() map[int32]int32 { + return this.Sint32Map +} + +func (this *AllMapsOrdered) GetSint64Map() map[int64]int64 { + return this.Sint64Map +} + +func (this *AllMapsOrdered) GetFixed32Map() map[uint32]uint32 { + return this.Fixed32Map +} + +func (this *AllMapsOrdered) GetSfixed32Map() map[int32]int32 { + return this.Sfixed32Map +} + +func (this *AllMapsOrdered) GetFixed64Map() map[uint64]uint64 { + return this.Fixed64Map +} + +func (this *AllMapsOrdered) GetSfixed64Map() map[int64]int64 { + return this.Sfixed64Map +} + +func (this *AllMapsOrdered) GetBoolMap() map[bool]bool { + return this.BoolMap +} + +func (this *AllMapsOrdered) GetStringMap() map[string]string { + return this.StringMap +} + +func (this *AllMapsOrdered) GetStringToBytesMap() map[string][]byte { + return this.StringToBytesMap +} + +func (this *AllMapsOrdered) GetStringToEnumMap() map[string]MapEnum { + return this.StringToEnumMap +} + +func (this *AllMapsOrdered) GetStringToMsgMap() map[string]*FloatingPoint { + return this.StringToMsgMap +} + +func NewAllMapsOrderedFromFace(that AllMapsOrderedFace) *AllMapsOrdered { + this := &AllMapsOrdered{} + this.StringToDoubleMap = that.GetStringToDoubleMap() + this.StringToFloatMap = that.GetStringToFloatMap() + this.Int32Map = that.GetInt32Map() + this.Int64Map = that.GetInt64Map() + this.Uint32Map = that.GetUint32Map() + this.Uint64Map = that.GetUint64Map() + this.Sint32Map = that.GetSint32Map() + this.Sint64Map = that.GetSint64Map() + this.Fixed32Map = that.GetFixed32Map() + this.Sfixed32Map = that.GetSfixed32Map() + this.Fixed64Map = that.GetFixed64Map() + this.Sfixed64Map = that.GetSfixed64Map() + this.BoolMap = that.GetBoolMap() + this.StringMap = that.GetStringMap() + this.StringToBytesMap = that.GetStringToBytesMap() + this.StringToEnumMap = that.GetStringToEnumMap() + this.StringToMsgMap = that.GetStringToMsgMap() + return this +} + +func (this *FloatingPoint) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&proto2_maps.FloatingPoint{") + if this.F != nil { + s = append(s, "F: "+valueToGoStringMapsproto2(this.F, "float64")+",\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 *AllMaps) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 21) + s = append(s, "&proto2_maps.AllMaps{") + keysForStringToDoubleMap := make([]string, 0, len(this.StringToDoubleMap)) + for k := range this.StringToDoubleMap { + keysForStringToDoubleMap = append(keysForStringToDoubleMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToDoubleMap) + mapStringForStringToDoubleMap := "map[string]float64{" + for _, k := range keysForStringToDoubleMap { + mapStringForStringToDoubleMap += fmt.Sprintf("%#v: %#v,", k, this.StringToDoubleMap[k]) + } + mapStringForStringToDoubleMap += "}" + if this.StringToDoubleMap != nil { + s = append(s, "StringToDoubleMap: "+mapStringForStringToDoubleMap+",\n") + } + keysForStringToFloatMap := make([]string, 0, len(this.StringToFloatMap)) + for k := range this.StringToFloatMap { + keysForStringToFloatMap = append(keysForStringToFloatMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToFloatMap) + mapStringForStringToFloatMap := "map[string]float32{" + for _, k := range keysForStringToFloatMap { + mapStringForStringToFloatMap += fmt.Sprintf("%#v: %#v,", k, this.StringToFloatMap[k]) + } + mapStringForStringToFloatMap += "}" + if this.StringToFloatMap != nil { + s = append(s, "StringToFloatMap: "+mapStringForStringToFloatMap+",\n") + } + keysForInt32Map := make([]int32, 0, len(this.Int32Map)) + for k := range this.Int32Map { + keysForInt32Map = append(keysForInt32Map, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForInt32Map) + mapStringForInt32Map := "map[int32]int32{" + for _, k := range keysForInt32Map { + mapStringForInt32Map += fmt.Sprintf("%#v: %#v,", k, this.Int32Map[k]) + } + mapStringForInt32Map += "}" + if this.Int32Map != nil { + s = append(s, "Int32Map: "+mapStringForInt32Map+",\n") + } + keysForInt64Map := make([]int64, 0, len(this.Int64Map)) + for k := range this.Int64Map { + keysForInt64Map = append(keysForInt64Map, k) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForInt64Map) + mapStringForInt64Map := "map[int64]int64{" + for _, k := range keysForInt64Map { + mapStringForInt64Map += fmt.Sprintf("%#v: %#v,", k, this.Int64Map[k]) + } + mapStringForInt64Map += "}" + if this.Int64Map != nil { + s = append(s, "Int64Map: "+mapStringForInt64Map+",\n") + } + keysForUint32Map := make([]uint32, 0, len(this.Uint32Map)) + for k := range this.Uint32Map { + keysForUint32Map = append(keysForUint32Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint32s(keysForUint32Map) + mapStringForUint32Map := "map[uint32]uint32{" + for _, k := range keysForUint32Map { + mapStringForUint32Map += fmt.Sprintf("%#v: %#v,", k, this.Uint32Map[k]) + } + mapStringForUint32Map += "}" + if this.Uint32Map != nil { + s = append(s, "Uint32Map: "+mapStringForUint32Map+",\n") + } + keysForUint64Map := make([]uint64, 0, len(this.Uint64Map)) + for k := range this.Uint64Map { + keysForUint64Map = append(keysForUint64Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint64s(keysForUint64Map) + mapStringForUint64Map := "map[uint64]uint64{" + for _, k := range keysForUint64Map { + mapStringForUint64Map += fmt.Sprintf("%#v: %#v,", k, this.Uint64Map[k]) + } + mapStringForUint64Map += "}" + if this.Uint64Map != nil { + s = append(s, "Uint64Map: "+mapStringForUint64Map+",\n") + } + keysForSint32Map := make([]int32, 0, len(this.Sint32Map)) + for k := range this.Sint32Map { + keysForSint32Map = append(keysForSint32Map, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForSint32Map) + mapStringForSint32Map := "map[int32]int32{" + for _, k := range keysForSint32Map { + mapStringForSint32Map += fmt.Sprintf("%#v: %#v,", k, this.Sint32Map[k]) + } + mapStringForSint32Map += "}" + if this.Sint32Map != nil { + s = append(s, "Sint32Map: "+mapStringForSint32Map+",\n") + } + keysForSint64Map := make([]int64, 0, len(this.Sint64Map)) + for k := range this.Sint64Map { + keysForSint64Map = append(keysForSint64Map, k) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForSint64Map) + mapStringForSint64Map := "map[int64]int64{" + for _, k := range keysForSint64Map { + mapStringForSint64Map += fmt.Sprintf("%#v: %#v,", k, this.Sint64Map[k]) + } + mapStringForSint64Map += "}" + if this.Sint64Map != nil { + s = append(s, "Sint64Map: "+mapStringForSint64Map+",\n") + } + keysForFixed32Map := make([]uint32, 0, len(this.Fixed32Map)) + for k := range this.Fixed32Map { + keysForFixed32Map = append(keysForFixed32Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint32s(keysForFixed32Map) + mapStringForFixed32Map := "map[uint32]uint32{" + for _, k := range keysForFixed32Map { + mapStringForFixed32Map += fmt.Sprintf("%#v: %#v,", k, this.Fixed32Map[k]) + } + mapStringForFixed32Map += "}" + if this.Fixed32Map != nil { + s = append(s, "Fixed32Map: "+mapStringForFixed32Map+",\n") + } + keysForSfixed32Map := make([]int32, 0, len(this.Sfixed32Map)) + for k := range this.Sfixed32Map { + keysForSfixed32Map = append(keysForSfixed32Map, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForSfixed32Map) + mapStringForSfixed32Map := "map[int32]int32{" + for _, k := range keysForSfixed32Map { + mapStringForSfixed32Map += fmt.Sprintf("%#v: %#v,", k, this.Sfixed32Map[k]) + } + mapStringForSfixed32Map += "}" + if this.Sfixed32Map != nil { + s = append(s, "Sfixed32Map: "+mapStringForSfixed32Map+",\n") + } + keysForFixed64Map := make([]uint64, 0, len(this.Fixed64Map)) + for k := range this.Fixed64Map { + keysForFixed64Map = append(keysForFixed64Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint64s(keysForFixed64Map) + mapStringForFixed64Map := "map[uint64]uint64{" + for _, k := range keysForFixed64Map { + mapStringForFixed64Map += fmt.Sprintf("%#v: %#v,", k, this.Fixed64Map[k]) + } + mapStringForFixed64Map += "}" + if this.Fixed64Map != nil { + s = append(s, "Fixed64Map: "+mapStringForFixed64Map+",\n") + } + keysForSfixed64Map := make([]int64, 0, len(this.Sfixed64Map)) + for k := range this.Sfixed64Map { + keysForSfixed64Map = append(keysForSfixed64Map, k) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForSfixed64Map) + mapStringForSfixed64Map := "map[int64]int64{" + for _, k := range keysForSfixed64Map { + mapStringForSfixed64Map += fmt.Sprintf("%#v: %#v,", k, this.Sfixed64Map[k]) + } + mapStringForSfixed64Map += "}" + if this.Sfixed64Map != nil { + s = append(s, "Sfixed64Map: "+mapStringForSfixed64Map+",\n") + } + keysForBoolMap := make([]bool, 0, len(this.BoolMap)) + for k := range this.BoolMap { + keysForBoolMap = append(keysForBoolMap, k) + } + github_com_gogo_protobuf_sortkeys.Bools(keysForBoolMap) + mapStringForBoolMap := "map[bool]bool{" + for _, k := range keysForBoolMap { + mapStringForBoolMap += fmt.Sprintf("%#v: %#v,", k, this.BoolMap[k]) + } + mapStringForBoolMap += "}" + if this.BoolMap != nil { + s = append(s, "BoolMap: "+mapStringForBoolMap+",\n") + } + keysForStringMap := make([]string, 0, len(this.StringMap)) + for k := range this.StringMap { + keysForStringMap = append(keysForStringMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringMap) + mapStringForStringMap := "map[string]string{" + for _, k := range keysForStringMap { + mapStringForStringMap += fmt.Sprintf("%#v: %#v,", k, this.StringMap[k]) + } + mapStringForStringMap += "}" + if this.StringMap != nil { + s = append(s, "StringMap: "+mapStringForStringMap+",\n") + } + keysForStringToBytesMap := make([]string, 0, len(this.StringToBytesMap)) + for k := range this.StringToBytesMap { + keysForStringToBytesMap = append(keysForStringToBytesMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToBytesMap) + mapStringForStringToBytesMap := "map[string][]byte{" + for _, k := range keysForStringToBytesMap { + mapStringForStringToBytesMap += fmt.Sprintf("%#v: %#v,", k, this.StringToBytesMap[k]) + } + mapStringForStringToBytesMap += "}" + if this.StringToBytesMap != nil { + s = append(s, "StringToBytesMap: "+mapStringForStringToBytesMap+",\n") + } + keysForStringToEnumMap := make([]string, 0, len(this.StringToEnumMap)) + for k := range this.StringToEnumMap { + keysForStringToEnumMap = append(keysForStringToEnumMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToEnumMap) + mapStringForStringToEnumMap := "map[string]MapEnum{" + for _, k := range keysForStringToEnumMap { + mapStringForStringToEnumMap += fmt.Sprintf("%#v: %#v,", k, this.StringToEnumMap[k]) + } + mapStringForStringToEnumMap += "}" + if this.StringToEnumMap != nil { + s = append(s, "StringToEnumMap: "+mapStringForStringToEnumMap+",\n") + } + keysForStringToMsgMap := make([]string, 0, len(this.StringToMsgMap)) + for k := range this.StringToMsgMap { + keysForStringToMsgMap = append(keysForStringToMsgMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToMsgMap) + mapStringForStringToMsgMap := "map[string]*FloatingPoint{" + for _, k := range keysForStringToMsgMap { + mapStringForStringToMsgMap += fmt.Sprintf("%#v: %#v,", k, this.StringToMsgMap[k]) + } + mapStringForStringToMsgMap += "}" + if this.StringToMsgMap != nil { + s = append(s, "StringToMsgMap: "+mapStringForStringToMsgMap+",\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 *AllMapsOrdered) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 21) + s = append(s, "&proto2_maps.AllMapsOrdered{") + keysForStringToDoubleMap := make([]string, 0, len(this.StringToDoubleMap)) + for k := range this.StringToDoubleMap { + keysForStringToDoubleMap = append(keysForStringToDoubleMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToDoubleMap) + mapStringForStringToDoubleMap := "map[string]float64{" + for _, k := range keysForStringToDoubleMap { + mapStringForStringToDoubleMap += fmt.Sprintf("%#v: %#v,", k, this.StringToDoubleMap[k]) + } + mapStringForStringToDoubleMap += "}" + if this.StringToDoubleMap != nil { + s = append(s, "StringToDoubleMap: "+mapStringForStringToDoubleMap+",\n") + } + keysForStringToFloatMap := make([]string, 0, len(this.StringToFloatMap)) + for k := range this.StringToFloatMap { + keysForStringToFloatMap = append(keysForStringToFloatMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToFloatMap) + mapStringForStringToFloatMap := "map[string]float32{" + for _, k := range keysForStringToFloatMap { + mapStringForStringToFloatMap += fmt.Sprintf("%#v: %#v,", k, this.StringToFloatMap[k]) + } + mapStringForStringToFloatMap += "}" + if this.StringToFloatMap != nil { + s = append(s, "StringToFloatMap: "+mapStringForStringToFloatMap+",\n") + } + keysForInt32Map := make([]int32, 0, len(this.Int32Map)) + for k := range this.Int32Map { + keysForInt32Map = append(keysForInt32Map, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForInt32Map) + mapStringForInt32Map := "map[int32]int32{" + for _, k := range keysForInt32Map { + mapStringForInt32Map += fmt.Sprintf("%#v: %#v,", k, this.Int32Map[k]) + } + mapStringForInt32Map += "}" + if this.Int32Map != nil { + s = append(s, "Int32Map: "+mapStringForInt32Map+",\n") + } + keysForInt64Map := make([]int64, 0, len(this.Int64Map)) + for k := range this.Int64Map { + keysForInt64Map = append(keysForInt64Map, k) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForInt64Map) + mapStringForInt64Map := "map[int64]int64{" + for _, k := range keysForInt64Map { + mapStringForInt64Map += fmt.Sprintf("%#v: %#v,", k, this.Int64Map[k]) + } + mapStringForInt64Map += "}" + if this.Int64Map != nil { + s = append(s, "Int64Map: "+mapStringForInt64Map+",\n") + } + keysForUint32Map := make([]uint32, 0, len(this.Uint32Map)) + for k := range this.Uint32Map { + keysForUint32Map = append(keysForUint32Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint32s(keysForUint32Map) + mapStringForUint32Map := "map[uint32]uint32{" + for _, k := range keysForUint32Map { + mapStringForUint32Map += fmt.Sprintf("%#v: %#v,", k, this.Uint32Map[k]) + } + mapStringForUint32Map += "}" + if this.Uint32Map != nil { + s = append(s, "Uint32Map: "+mapStringForUint32Map+",\n") + } + keysForUint64Map := make([]uint64, 0, len(this.Uint64Map)) + for k := range this.Uint64Map { + keysForUint64Map = append(keysForUint64Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint64s(keysForUint64Map) + mapStringForUint64Map := "map[uint64]uint64{" + for _, k := range keysForUint64Map { + mapStringForUint64Map += fmt.Sprintf("%#v: %#v,", k, this.Uint64Map[k]) + } + mapStringForUint64Map += "}" + if this.Uint64Map != nil { + s = append(s, "Uint64Map: "+mapStringForUint64Map+",\n") + } + keysForSint32Map := make([]int32, 0, len(this.Sint32Map)) + for k := range this.Sint32Map { + keysForSint32Map = append(keysForSint32Map, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForSint32Map) + mapStringForSint32Map := "map[int32]int32{" + for _, k := range keysForSint32Map { + mapStringForSint32Map += fmt.Sprintf("%#v: %#v,", k, this.Sint32Map[k]) + } + mapStringForSint32Map += "}" + if this.Sint32Map != nil { + s = append(s, "Sint32Map: "+mapStringForSint32Map+",\n") + } + keysForSint64Map := make([]int64, 0, len(this.Sint64Map)) + for k := range this.Sint64Map { + keysForSint64Map = append(keysForSint64Map, k) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForSint64Map) + mapStringForSint64Map := "map[int64]int64{" + for _, k := range keysForSint64Map { + mapStringForSint64Map += fmt.Sprintf("%#v: %#v,", k, this.Sint64Map[k]) + } + mapStringForSint64Map += "}" + if this.Sint64Map != nil { + s = append(s, "Sint64Map: "+mapStringForSint64Map+",\n") + } + keysForFixed32Map := make([]uint32, 0, len(this.Fixed32Map)) + for k := range this.Fixed32Map { + keysForFixed32Map = append(keysForFixed32Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint32s(keysForFixed32Map) + mapStringForFixed32Map := "map[uint32]uint32{" + for _, k := range keysForFixed32Map { + mapStringForFixed32Map += fmt.Sprintf("%#v: %#v,", k, this.Fixed32Map[k]) + } + mapStringForFixed32Map += "}" + if this.Fixed32Map != nil { + s = append(s, "Fixed32Map: "+mapStringForFixed32Map+",\n") + } + keysForSfixed32Map := make([]int32, 0, len(this.Sfixed32Map)) + for k := range this.Sfixed32Map { + keysForSfixed32Map = append(keysForSfixed32Map, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForSfixed32Map) + mapStringForSfixed32Map := "map[int32]int32{" + for _, k := range keysForSfixed32Map { + mapStringForSfixed32Map += fmt.Sprintf("%#v: %#v,", k, this.Sfixed32Map[k]) + } + mapStringForSfixed32Map += "}" + if this.Sfixed32Map != nil { + s = append(s, "Sfixed32Map: "+mapStringForSfixed32Map+",\n") + } + keysForFixed64Map := make([]uint64, 0, len(this.Fixed64Map)) + for k := range this.Fixed64Map { + keysForFixed64Map = append(keysForFixed64Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint64s(keysForFixed64Map) + mapStringForFixed64Map := "map[uint64]uint64{" + for _, k := range keysForFixed64Map { + mapStringForFixed64Map += fmt.Sprintf("%#v: %#v,", k, this.Fixed64Map[k]) + } + mapStringForFixed64Map += "}" + if this.Fixed64Map != nil { + s = append(s, "Fixed64Map: "+mapStringForFixed64Map+",\n") + } + keysForSfixed64Map := make([]int64, 0, len(this.Sfixed64Map)) + for k := range this.Sfixed64Map { + keysForSfixed64Map = append(keysForSfixed64Map, k) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForSfixed64Map) + mapStringForSfixed64Map := "map[int64]int64{" + for _, k := range keysForSfixed64Map { + mapStringForSfixed64Map += fmt.Sprintf("%#v: %#v,", k, this.Sfixed64Map[k]) + } + mapStringForSfixed64Map += "}" + if this.Sfixed64Map != nil { + s = append(s, "Sfixed64Map: "+mapStringForSfixed64Map+",\n") + } + keysForBoolMap := make([]bool, 0, len(this.BoolMap)) + for k := range this.BoolMap { + keysForBoolMap = append(keysForBoolMap, k) + } + github_com_gogo_protobuf_sortkeys.Bools(keysForBoolMap) + mapStringForBoolMap := "map[bool]bool{" + for _, k := range keysForBoolMap { + mapStringForBoolMap += fmt.Sprintf("%#v: %#v,", k, this.BoolMap[k]) + } + mapStringForBoolMap += "}" + if this.BoolMap != nil { + s = append(s, "BoolMap: "+mapStringForBoolMap+",\n") + } + keysForStringMap := make([]string, 0, len(this.StringMap)) + for k := range this.StringMap { + keysForStringMap = append(keysForStringMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringMap) + mapStringForStringMap := "map[string]string{" + for _, k := range keysForStringMap { + mapStringForStringMap += fmt.Sprintf("%#v: %#v,", k, this.StringMap[k]) + } + mapStringForStringMap += "}" + if this.StringMap != nil { + s = append(s, "StringMap: "+mapStringForStringMap+",\n") + } + keysForStringToBytesMap := make([]string, 0, len(this.StringToBytesMap)) + for k := range this.StringToBytesMap { + keysForStringToBytesMap = append(keysForStringToBytesMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToBytesMap) + mapStringForStringToBytesMap := "map[string][]byte{" + for _, k := range keysForStringToBytesMap { + mapStringForStringToBytesMap += fmt.Sprintf("%#v: %#v,", k, this.StringToBytesMap[k]) + } + mapStringForStringToBytesMap += "}" + if this.StringToBytesMap != nil { + s = append(s, "StringToBytesMap: "+mapStringForStringToBytesMap+",\n") + } + keysForStringToEnumMap := make([]string, 0, len(this.StringToEnumMap)) + for k := range this.StringToEnumMap { + keysForStringToEnumMap = append(keysForStringToEnumMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToEnumMap) + mapStringForStringToEnumMap := "map[string]MapEnum{" + for _, k := range keysForStringToEnumMap { + mapStringForStringToEnumMap += fmt.Sprintf("%#v: %#v,", k, this.StringToEnumMap[k]) + } + mapStringForStringToEnumMap += "}" + if this.StringToEnumMap != nil { + s = append(s, "StringToEnumMap: "+mapStringForStringToEnumMap+",\n") + } + keysForStringToMsgMap := make([]string, 0, len(this.StringToMsgMap)) + for k := range this.StringToMsgMap { + keysForStringToMsgMap = append(keysForStringToMsgMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToMsgMap) + mapStringForStringToMsgMap := "map[string]*FloatingPoint{" + for _, k := range keysForStringToMsgMap { + mapStringForStringToMsgMap += fmt.Sprintf("%#v: %#v,", k, this.StringToMsgMap[k]) + } + mapStringForStringToMsgMap += "}" + if this.StringToMsgMap != nil { + s = append(s, "StringToMsgMap: "+mapStringForStringToMsgMap+",\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 valueToGoStringMapsproto2(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 extensionToGoStringMapsproto2(e map[int32]github_com_gogo_protobuf_proto.Extension) string { + if e == nil { + return "nil" + } + s := "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 +} +func NewPopulatedFloatingPoint(r randyMapsproto2, easy bool) *FloatingPoint { + this := &FloatingPoint{} + if r.Intn(10) != 0 { + v1 := float64(r.Float64()) + if r.Intn(2) == 0 { + v1 *= -1 + } + this.F = &v1 + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedMapsproto2(r, 2) + } + return this +} + +func NewPopulatedAllMaps(r randyMapsproto2, easy bool) *AllMaps { + this := &AllMaps{} + if r.Intn(10) != 0 { + v2 := r.Intn(10) + this.StringToDoubleMap = make(map[string]float64) + for i := 0; i < v2; i++ { + v3 := randStringMapsproto2(r) + this.StringToDoubleMap[v3] = float64(r.Float64()) + if r.Intn(2) == 0 { + this.StringToDoubleMap[v3] *= -1 + } + } + } + if r.Intn(10) != 0 { + v4 := r.Intn(10) + this.StringToFloatMap = make(map[string]float32) + for i := 0; i < v4; i++ { + v5 := randStringMapsproto2(r) + this.StringToFloatMap[v5] = float32(r.Float32()) + if r.Intn(2) == 0 { + this.StringToFloatMap[v5] *= -1 + } + } + } + if r.Intn(10) != 0 { + v6 := r.Intn(10) + this.Int32Map = make(map[int32]int32) + for i := 0; i < v6; i++ { + v7 := int32(r.Int31()) + this.Int32Map[v7] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Int32Map[v7] *= -1 + } + } + } + if r.Intn(10) != 0 { + v8 := r.Intn(10) + this.Int64Map = make(map[int64]int64) + for i := 0; i < v8; i++ { + v9 := int64(r.Int63()) + this.Int64Map[v9] = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Int64Map[v9] *= -1 + } + } + } + if r.Intn(10) != 0 { + v10 := r.Intn(10) + this.Uint32Map = make(map[uint32]uint32) + for i := 0; i < v10; i++ { + v11 := uint32(r.Uint32()) + this.Uint32Map[v11] = uint32(r.Uint32()) + } + } + if r.Intn(10) != 0 { + v12 := r.Intn(10) + this.Uint64Map = make(map[uint64]uint64) + for i := 0; i < v12; i++ { + v13 := uint64(uint64(r.Uint32())) + this.Uint64Map[v13] = uint64(uint64(r.Uint32())) + } + } + if r.Intn(10) != 0 { + v14 := r.Intn(10) + this.Sint32Map = make(map[int32]int32) + for i := 0; i < v14; i++ { + v15 := int32(r.Int31()) + this.Sint32Map[v15] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Sint32Map[v15] *= -1 + } + } + } + if r.Intn(10) != 0 { + v16 := r.Intn(10) + this.Sint64Map = make(map[int64]int64) + for i := 0; i < v16; i++ { + v17 := int64(r.Int63()) + this.Sint64Map[v17] = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Sint64Map[v17] *= -1 + } + } + } + if r.Intn(10) != 0 { + v18 := r.Intn(10) + this.Fixed32Map = make(map[uint32]uint32) + for i := 0; i < v18; i++ { + v19 := uint32(r.Uint32()) + this.Fixed32Map[v19] = uint32(r.Uint32()) + } + } + if r.Intn(10) != 0 { + v20 := r.Intn(10) + this.Sfixed32Map = make(map[int32]int32) + for i := 0; i < v20; i++ { + v21 := int32(r.Int31()) + this.Sfixed32Map[v21] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Sfixed32Map[v21] *= -1 + } + } + } + if r.Intn(10) != 0 { + v22 := r.Intn(10) + this.Fixed64Map = make(map[uint64]uint64) + for i := 0; i < v22; i++ { + v23 := uint64(uint64(r.Uint32())) + this.Fixed64Map[v23] = uint64(uint64(r.Uint32())) + } + } + if r.Intn(10) != 0 { + v24 := r.Intn(10) + this.Sfixed64Map = make(map[int64]int64) + for i := 0; i < v24; i++ { + v25 := int64(r.Int63()) + this.Sfixed64Map[v25] = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Sfixed64Map[v25] *= -1 + } + } + } + if r.Intn(10) != 0 { + v26 := r.Intn(10) + this.BoolMap = make(map[bool]bool) + for i := 0; i < v26; i++ { + v27 := bool(bool(r.Intn(2) == 0)) + this.BoolMap[v27] = bool(bool(r.Intn(2) == 0)) + } + } + if r.Intn(10) != 0 { + v28 := r.Intn(10) + this.StringMap = make(map[string]string) + for i := 0; i < v28; i++ { + this.StringMap[randStringMapsproto2(r)] = randStringMapsproto2(r) + } + } + if r.Intn(10) != 0 { + v29 := r.Intn(10) + this.StringToBytesMap = make(map[string][]byte) + for i := 0; i < v29; i++ { + v30 := r.Intn(100) + v31 := randStringMapsproto2(r) + this.StringToBytesMap[v31] = make([]byte, v30) + for i := 0; i < v30; i++ { + this.StringToBytesMap[v31][i] = byte(r.Intn(256)) + } + } + } + if r.Intn(10) != 0 { + v32 := r.Intn(10) + this.StringToEnumMap = make(map[string]MapEnum) + for i := 0; i < v32; i++ { + this.StringToEnumMap[randStringMapsproto2(r)] = MapEnum([]int32{0, 1, 2}[r.Intn(3)]) + } + } + if r.Intn(10) != 0 { + v33 := r.Intn(10) + this.StringToMsgMap = make(map[string]*FloatingPoint) + for i := 0; i < v33; i++ { + this.StringToMsgMap[randStringMapsproto2(r)] = NewPopulatedFloatingPoint(r, easy) + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedMapsproto2(r, 18) + } + return this +} + +func NewPopulatedAllMapsOrdered(r randyMapsproto2, easy bool) *AllMapsOrdered { + this := &AllMapsOrdered{} + if r.Intn(10) != 0 { + v34 := r.Intn(10) + this.StringToDoubleMap = make(map[string]float64) + for i := 0; i < v34; i++ { + v35 := randStringMapsproto2(r) + this.StringToDoubleMap[v35] = float64(r.Float64()) + if r.Intn(2) == 0 { + this.StringToDoubleMap[v35] *= -1 + } + } + } + if r.Intn(10) != 0 { + v36 := r.Intn(10) + this.StringToFloatMap = make(map[string]float32) + for i := 0; i < v36; i++ { + v37 := randStringMapsproto2(r) + this.StringToFloatMap[v37] = float32(r.Float32()) + if r.Intn(2) == 0 { + this.StringToFloatMap[v37] *= -1 + } + } + } + if r.Intn(10) != 0 { + v38 := r.Intn(10) + this.Int32Map = make(map[int32]int32) + for i := 0; i < v38; i++ { + v39 := int32(r.Int31()) + this.Int32Map[v39] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Int32Map[v39] *= -1 + } + } + } + if r.Intn(10) != 0 { + v40 := r.Intn(10) + this.Int64Map = make(map[int64]int64) + for i := 0; i < v40; i++ { + v41 := int64(r.Int63()) + this.Int64Map[v41] = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Int64Map[v41] *= -1 + } + } + } + if r.Intn(10) != 0 { + v42 := r.Intn(10) + this.Uint32Map = make(map[uint32]uint32) + for i := 0; i < v42; i++ { + v43 := uint32(r.Uint32()) + this.Uint32Map[v43] = uint32(r.Uint32()) + } + } + if r.Intn(10) != 0 { + v44 := r.Intn(10) + this.Uint64Map = make(map[uint64]uint64) + for i := 0; i < v44; i++ { + v45 := uint64(uint64(r.Uint32())) + this.Uint64Map[v45] = uint64(uint64(r.Uint32())) + } + } + if r.Intn(10) != 0 { + v46 := r.Intn(10) + this.Sint32Map = make(map[int32]int32) + for i := 0; i < v46; i++ { + v47 := int32(r.Int31()) + this.Sint32Map[v47] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Sint32Map[v47] *= -1 + } + } + } + if r.Intn(10) != 0 { + v48 := r.Intn(10) + this.Sint64Map = make(map[int64]int64) + for i := 0; i < v48; i++ { + v49 := int64(r.Int63()) + this.Sint64Map[v49] = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Sint64Map[v49] *= -1 + } + } + } + if r.Intn(10) != 0 { + v50 := r.Intn(10) + this.Fixed32Map = make(map[uint32]uint32) + for i := 0; i < v50; i++ { + v51 := uint32(r.Uint32()) + this.Fixed32Map[v51] = uint32(r.Uint32()) + } + } + if r.Intn(10) != 0 { + v52 := r.Intn(10) + this.Sfixed32Map = make(map[int32]int32) + for i := 0; i < v52; i++ { + v53 := int32(r.Int31()) + this.Sfixed32Map[v53] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Sfixed32Map[v53] *= -1 + } + } + } + if r.Intn(10) != 0 { + v54 := r.Intn(10) + this.Fixed64Map = make(map[uint64]uint64) + for i := 0; i < v54; i++ { + v55 := uint64(uint64(r.Uint32())) + this.Fixed64Map[v55] = uint64(uint64(r.Uint32())) + } + } + if r.Intn(10) != 0 { + v56 := r.Intn(10) + this.Sfixed64Map = make(map[int64]int64) + for i := 0; i < v56; i++ { + v57 := int64(r.Int63()) + this.Sfixed64Map[v57] = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Sfixed64Map[v57] *= -1 + } + } + } + if r.Intn(10) != 0 { + v58 := r.Intn(10) + this.BoolMap = make(map[bool]bool) + for i := 0; i < v58; i++ { + v59 := bool(bool(r.Intn(2) == 0)) + this.BoolMap[v59] = bool(bool(r.Intn(2) == 0)) + } + } + if r.Intn(10) != 0 { + v60 := r.Intn(10) + this.StringMap = make(map[string]string) + for i := 0; i < v60; i++ { + this.StringMap[randStringMapsproto2(r)] = randStringMapsproto2(r) + } + } + if r.Intn(10) != 0 { + v61 := r.Intn(10) + this.StringToBytesMap = make(map[string][]byte) + for i := 0; i < v61; i++ { + v62 := r.Intn(100) + v63 := randStringMapsproto2(r) + this.StringToBytesMap[v63] = make([]byte, v62) + for i := 0; i < v62; i++ { + this.StringToBytesMap[v63][i] = byte(r.Intn(256)) + } + } + } + if r.Intn(10) != 0 { + v64 := r.Intn(10) + this.StringToEnumMap = make(map[string]MapEnum) + for i := 0; i < v64; i++ { + this.StringToEnumMap[randStringMapsproto2(r)] = MapEnum([]int32{0, 1, 2}[r.Intn(3)]) + } + } + if r.Intn(10) != 0 { + v65 := r.Intn(10) + this.StringToMsgMap = make(map[string]*FloatingPoint) + for i := 0; i < v65; i++ { + this.StringToMsgMap[randStringMapsproto2(r)] = NewPopulatedFloatingPoint(r, easy) + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedMapsproto2(r, 18) + } + return this +} + +type randyMapsproto2 interface { + Float32() float32 + Float64() float64 + Int63() int64 + Int31() int32 + Uint32() uint32 + Intn(n int) int +} + +func randUTF8RuneMapsproto2(r randyMapsproto2) 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 randStringMapsproto2(r randyMapsproto2) string { + v66 := r.Intn(100) + tmps := make([]rune, v66) + for i := 0; i < v66; i++ { + tmps[i] = randUTF8RuneMapsproto2(r) + } + return string(tmps) +} +func randUnrecognizedMapsproto2(r randyMapsproto2, 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 = randFieldMapsproto2(data, r, fieldNumber, wire) + } + return data +} +func randFieldMapsproto2(data []byte, r randyMapsproto2, fieldNumber int, wire int) []byte { + key := uint32(fieldNumber)<<3 | uint32(wire) + switch wire { + case 0: + data = encodeVarintPopulateMapsproto2(data, uint64(key)) + v67 := r.Int63() + if r.Intn(2) == 0 { + v67 *= -1 + } + data = encodeVarintPopulateMapsproto2(data, uint64(v67)) + case 1: + data = encodeVarintPopulateMapsproto2(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 = encodeVarintPopulateMapsproto2(data, uint64(key)) + ll := r.Intn(100) + data = encodeVarintPopulateMapsproto2(data, uint64(ll)) + for j := 0; j < ll; j++ { + data = append(data, byte(r.Intn(256))) + } + default: + data = encodeVarintPopulateMapsproto2(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 encodeVarintPopulateMapsproto2(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 *FloatingPoint) Size() (n int) { + var l int + _ = l + if m.F != nil { + n += 9 + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *AllMaps) Size() (n int) { + var l int + _ = l + if len(m.StringToDoubleMap) > 0 { + for k, v := range m.StringToDoubleMap { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + 1 + 8 + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.StringToFloatMap) > 0 { + for k, v := range m.StringToFloatMap { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + 1 + 4 + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.Int32Map) > 0 { + for k, v := range m.Int32Map { + _ = k + _ = v + mapEntrySize := 1 + sovMapsproto2(uint64(k)) + 1 + sovMapsproto2(uint64(v)) + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.Int64Map) > 0 { + for k, v := range m.Int64Map { + _ = k + _ = v + mapEntrySize := 1 + sovMapsproto2(uint64(k)) + 1 + sovMapsproto2(uint64(v)) + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.Uint32Map) > 0 { + for k, v := range m.Uint32Map { + _ = k + _ = v + mapEntrySize := 1 + sovMapsproto2(uint64(k)) + 1 + sovMapsproto2(uint64(v)) + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.Uint64Map) > 0 { + for k, v := range m.Uint64Map { + _ = k + _ = v + mapEntrySize := 1 + sovMapsproto2(uint64(k)) + 1 + sovMapsproto2(uint64(v)) + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.Sint32Map) > 0 { + for k, v := range m.Sint32Map { + _ = k + _ = v + mapEntrySize := 1 + sozMapsproto2(uint64(k)) + 1 + sozMapsproto2(uint64(v)) + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.Sint64Map) > 0 { + for k, v := range m.Sint64Map { + _ = k + _ = v + mapEntrySize := 1 + sozMapsproto2(uint64(k)) + 1 + sozMapsproto2(uint64(v)) + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.Fixed32Map) > 0 { + for k, v := range m.Fixed32Map { + _ = k + _ = v + mapEntrySize := 1 + 4 + 1 + 4 + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.Sfixed32Map) > 0 { + for k, v := range m.Sfixed32Map { + _ = k + _ = v + mapEntrySize := 1 + 4 + 1 + 4 + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.Fixed64Map) > 0 { + for k, v := range m.Fixed64Map { + _ = k + _ = v + mapEntrySize := 1 + 8 + 1 + 8 + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.Sfixed64Map) > 0 { + for k, v := range m.Sfixed64Map { + _ = k + _ = v + mapEntrySize := 1 + 8 + 1 + 8 + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.BoolMap) > 0 { + for k, v := range m.BoolMap { + _ = k + _ = v + mapEntrySize := 1 + 1 + 1 + 1 + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.StringMap) > 0 { + for k, v := range m.StringMap { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + 1 + len(v) + sovMapsproto2(uint64(len(v))) + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.StringToBytesMap) > 0 { + for k, v := range m.StringToBytesMap { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + 1 + len(v) + sovMapsproto2(uint64(len(v))) + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.StringToEnumMap) > 0 { + for k, v := range m.StringToEnumMap { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + 1 + sovMapsproto2(uint64(v)) + n += mapEntrySize + 2 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.StringToMsgMap) > 0 { + for k, v := range m.StringToMsgMap { + _ = k + _ = v + l = 0 + if v != nil { + l = v.Size() + } + mapEntrySize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + 1 + l + sovMapsproto2(uint64(l)) + n += mapEntrySize + 2 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *AllMapsOrdered) Size() (n int) { + var l int + _ = l + if len(m.StringToDoubleMap) > 0 { + for k, v := range m.StringToDoubleMap { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + 1 + 8 + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.StringToFloatMap) > 0 { + for k, v := range m.StringToFloatMap { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + 1 + 4 + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.Int32Map) > 0 { + for k, v := range m.Int32Map { + _ = k + _ = v + mapEntrySize := 1 + sovMapsproto2(uint64(k)) + 1 + sovMapsproto2(uint64(v)) + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.Int64Map) > 0 { + for k, v := range m.Int64Map { + _ = k + _ = v + mapEntrySize := 1 + sovMapsproto2(uint64(k)) + 1 + sovMapsproto2(uint64(v)) + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.Uint32Map) > 0 { + for k, v := range m.Uint32Map { + _ = k + _ = v + mapEntrySize := 1 + sovMapsproto2(uint64(k)) + 1 + sovMapsproto2(uint64(v)) + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.Uint64Map) > 0 { + for k, v := range m.Uint64Map { + _ = k + _ = v + mapEntrySize := 1 + sovMapsproto2(uint64(k)) + 1 + sovMapsproto2(uint64(v)) + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.Sint32Map) > 0 { + for k, v := range m.Sint32Map { + _ = k + _ = v + mapEntrySize := 1 + sozMapsproto2(uint64(k)) + 1 + sozMapsproto2(uint64(v)) + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.Sint64Map) > 0 { + for k, v := range m.Sint64Map { + _ = k + _ = v + mapEntrySize := 1 + sozMapsproto2(uint64(k)) + 1 + sozMapsproto2(uint64(v)) + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.Fixed32Map) > 0 { + for k, v := range m.Fixed32Map { + _ = k + _ = v + mapEntrySize := 1 + 4 + 1 + 4 + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.Sfixed32Map) > 0 { + for k, v := range m.Sfixed32Map { + _ = k + _ = v + mapEntrySize := 1 + 4 + 1 + 4 + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.Fixed64Map) > 0 { + for k, v := range m.Fixed64Map { + _ = k + _ = v + mapEntrySize := 1 + 8 + 1 + 8 + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.Sfixed64Map) > 0 { + for k, v := range m.Sfixed64Map { + _ = k + _ = v + mapEntrySize := 1 + 8 + 1 + 8 + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.BoolMap) > 0 { + for k, v := range m.BoolMap { + _ = k + _ = v + mapEntrySize := 1 + 1 + 1 + 1 + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.StringMap) > 0 { + for k, v := range m.StringMap { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + 1 + len(v) + sovMapsproto2(uint64(len(v))) + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.StringToBytesMap) > 0 { + for k, v := range m.StringToBytesMap { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + 1 + len(v) + sovMapsproto2(uint64(len(v))) + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.StringToEnumMap) > 0 { + for k, v := range m.StringToEnumMap { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + 1 + sovMapsproto2(uint64(v)) + n += mapEntrySize + 2 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.StringToMsgMap) > 0 { + for k, v := range m.StringToMsgMap { + _ = k + _ = v + l = 0 + if v != nil { + l = v.Size() + } + mapEntrySize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + 1 + l + sovMapsproto2(uint64(l)) + n += mapEntrySize + 2 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func sovMapsproto2(x uint64) (n int) { + for { + n++ + x >>= 7 + if x == 0 { + break + } + } + return n +} +func sozMapsproto2(x uint64) (n int) { + return sovMapsproto2(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (this *FloatingPoint) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&FloatingPoint{`, + `F:` + valueToStringMapsproto2(this.F) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *AllMaps) String() string { + if this == nil { + return "nil" + } + keysForStringToDoubleMap := make([]string, 0, len(this.StringToDoubleMap)) + for k := range this.StringToDoubleMap { + keysForStringToDoubleMap = append(keysForStringToDoubleMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToDoubleMap) + mapStringForStringToDoubleMap := "map[string]float64{" + for _, k := range keysForStringToDoubleMap { + mapStringForStringToDoubleMap += fmt.Sprintf("%v: %v,", k, this.StringToDoubleMap[k]) + } + mapStringForStringToDoubleMap += "}" + keysForStringToFloatMap := make([]string, 0, len(this.StringToFloatMap)) + for k := range this.StringToFloatMap { + keysForStringToFloatMap = append(keysForStringToFloatMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToFloatMap) + mapStringForStringToFloatMap := "map[string]float32{" + for _, k := range keysForStringToFloatMap { + mapStringForStringToFloatMap += fmt.Sprintf("%v: %v,", k, this.StringToFloatMap[k]) + } + mapStringForStringToFloatMap += "}" + keysForInt32Map := make([]int32, 0, len(this.Int32Map)) + for k := range this.Int32Map { + keysForInt32Map = append(keysForInt32Map, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForInt32Map) + mapStringForInt32Map := "map[int32]int32{" + for _, k := range keysForInt32Map { + mapStringForInt32Map += fmt.Sprintf("%v: %v,", k, this.Int32Map[k]) + } + mapStringForInt32Map += "}" + keysForInt64Map := make([]int64, 0, len(this.Int64Map)) + for k := range this.Int64Map { + keysForInt64Map = append(keysForInt64Map, k) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForInt64Map) + mapStringForInt64Map := "map[int64]int64{" + for _, k := range keysForInt64Map { + mapStringForInt64Map += fmt.Sprintf("%v: %v,", k, this.Int64Map[k]) + } + mapStringForInt64Map += "}" + keysForUint32Map := make([]uint32, 0, len(this.Uint32Map)) + for k := range this.Uint32Map { + keysForUint32Map = append(keysForUint32Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint32s(keysForUint32Map) + mapStringForUint32Map := "map[uint32]uint32{" + for _, k := range keysForUint32Map { + mapStringForUint32Map += fmt.Sprintf("%v: %v,", k, this.Uint32Map[k]) + } + mapStringForUint32Map += "}" + keysForUint64Map := make([]uint64, 0, len(this.Uint64Map)) + for k := range this.Uint64Map { + keysForUint64Map = append(keysForUint64Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint64s(keysForUint64Map) + mapStringForUint64Map := "map[uint64]uint64{" + for _, k := range keysForUint64Map { + mapStringForUint64Map += fmt.Sprintf("%v: %v,", k, this.Uint64Map[k]) + } + mapStringForUint64Map += "}" + keysForSint32Map := make([]int32, 0, len(this.Sint32Map)) + for k := range this.Sint32Map { + keysForSint32Map = append(keysForSint32Map, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForSint32Map) + mapStringForSint32Map := "map[int32]int32{" + for _, k := range keysForSint32Map { + mapStringForSint32Map += fmt.Sprintf("%v: %v,", k, this.Sint32Map[k]) + } + mapStringForSint32Map += "}" + keysForSint64Map := make([]int64, 0, len(this.Sint64Map)) + for k := range this.Sint64Map { + keysForSint64Map = append(keysForSint64Map, k) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForSint64Map) + mapStringForSint64Map := "map[int64]int64{" + for _, k := range keysForSint64Map { + mapStringForSint64Map += fmt.Sprintf("%v: %v,", k, this.Sint64Map[k]) + } + mapStringForSint64Map += "}" + keysForFixed32Map := make([]uint32, 0, len(this.Fixed32Map)) + for k := range this.Fixed32Map { + keysForFixed32Map = append(keysForFixed32Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint32s(keysForFixed32Map) + mapStringForFixed32Map := "map[uint32]uint32{" + for _, k := range keysForFixed32Map { + mapStringForFixed32Map += fmt.Sprintf("%v: %v,", k, this.Fixed32Map[k]) + } + mapStringForFixed32Map += "}" + keysForSfixed32Map := make([]int32, 0, len(this.Sfixed32Map)) + for k := range this.Sfixed32Map { + keysForSfixed32Map = append(keysForSfixed32Map, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForSfixed32Map) + mapStringForSfixed32Map := "map[int32]int32{" + for _, k := range keysForSfixed32Map { + mapStringForSfixed32Map += fmt.Sprintf("%v: %v,", k, this.Sfixed32Map[k]) + } + mapStringForSfixed32Map += "}" + keysForFixed64Map := make([]uint64, 0, len(this.Fixed64Map)) + for k := range this.Fixed64Map { + keysForFixed64Map = append(keysForFixed64Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint64s(keysForFixed64Map) + mapStringForFixed64Map := "map[uint64]uint64{" + for _, k := range keysForFixed64Map { + mapStringForFixed64Map += fmt.Sprintf("%v: %v,", k, this.Fixed64Map[k]) + } + mapStringForFixed64Map += "}" + keysForSfixed64Map := make([]int64, 0, len(this.Sfixed64Map)) + for k := range this.Sfixed64Map { + keysForSfixed64Map = append(keysForSfixed64Map, k) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForSfixed64Map) + mapStringForSfixed64Map := "map[int64]int64{" + for _, k := range keysForSfixed64Map { + mapStringForSfixed64Map += fmt.Sprintf("%v: %v,", k, this.Sfixed64Map[k]) + } + mapStringForSfixed64Map += "}" + keysForBoolMap := make([]bool, 0, len(this.BoolMap)) + for k := range this.BoolMap { + keysForBoolMap = append(keysForBoolMap, k) + } + github_com_gogo_protobuf_sortkeys.Bools(keysForBoolMap) + mapStringForBoolMap := "map[bool]bool{" + for _, k := range keysForBoolMap { + mapStringForBoolMap += fmt.Sprintf("%v: %v,", k, this.BoolMap[k]) + } + mapStringForBoolMap += "}" + keysForStringMap := make([]string, 0, len(this.StringMap)) + for k := range this.StringMap { + keysForStringMap = append(keysForStringMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringMap) + mapStringForStringMap := "map[string]string{" + for _, k := range keysForStringMap { + mapStringForStringMap += fmt.Sprintf("%v: %v,", k, this.StringMap[k]) + } + mapStringForStringMap += "}" + keysForStringToBytesMap := make([]string, 0, len(this.StringToBytesMap)) + for k := range this.StringToBytesMap { + keysForStringToBytesMap = append(keysForStringToBytesMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToBytesMap) + mapStringForStringToBytesMap := "map[string][]byte{" + for _, k := range keysForStringToBytesMap { + mapStringForStringToBytesMap += fmt.Sprintf("%v: %v,", k, this.StringToBytesMap[k]) + } + mapStringForStringToBytesMap += "}" + keysForStringToEnumMap := make([]string, 0, len(this.StringToEnumMap)) + for k := range this.StringToEnumMap { + keysForStringToEnumMap = append(keysForStringToEnumMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToEnumMap) + mapStringForStringToEnumMap := "map[string]MapEnum{" + for _, k := range keysForStringToEnumMap { + mapStringForStringToEnumMap += fmt.Sprintf("%v: %v,", k, this.StringToEnumMap[k]) + } + mapStringForStringToEnumMap += "}" + keysForStringToMsgMap := make([]string, 0, len(this.StringToMsgMap)) + for k := range this.StringToMsgMap { + keysForStringToMsgMap = append(keysForStringToMsgMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToMsgMap) + mapStringForStringToMsgMap := "map[string]*FloatingPoint{" + for _, k := range keysForStringToMsgMap { + mapStringForStringToMsgMap += fmt.Sprintf("%v: %v,", k, this.StringToMsgMap[k]) + } + mapStringForStringToMsgMap += "}" + s := strings.Join([]string{`&AllMaps{`, + `StringToDoubleMap:` + mapStringForStringToDoubleMap + `,`, + `StringToFloatMap:` + mapStringForStringToFloatMap + `,`, + `Int32Map:` + mapStringForInt32Map + `,`, + `Int64Map:` + mapStringForInt64Map + `,`, + `Uint32Map:` + mapStringForUint32Map + `,`, + `Uint64Map:` + mapStringForUint64Map + `,`, + `Sint32Map:` + mapStringForSint32Map + `,`, + `Sint64Map:` + mapStringForSint64Map + `,`, + `Fixed32Map:` + mapStringForFixed32Map + `,`, + `Sfixed32Map:` + mapStringForSfixed32Map + `,`, + `Fixed64Map:` + mapStringForFixed64Map + `,`, + `Sfixed64Map:` + mapStringForSfixed64Map + `,`, + `BoolMap:` + mapStringForBoolMap + `,`, + `StringMap:` + mapStringForStringMap + `,`, + `StringToBytesMap:` + mapStringForStringToBytesMap + `,`, + `StringToEnumMap:` + mapStringForStringToEnumMap + `,`, + `StringToMsgMap:` + mapStringForStringToMsgMap + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *AllMapsOrdered) String() string { + if this == nil { + return "nil" + } + keysForStringToDoubleMap := make([]string, 0, len(this.StringToDoubleMap)) + for k := range this.StringToDoubleMap { + keysForStringToDoubleMap = append(keysForStringToDoubleMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToDoubleMap) + mapStringForStringToDoubleMap := "map[string]float64{" + for _, k := range keysForStringToDoubleMap { + mapStringForStringToDoubleMap += fmt.Sprintf("%v: %v,", k, this.StringToDoubleMap[k]) + } + mapStringForStringToDoubleMap += "}" + keysForStringToFloatMap := make([]string, 0, len(this.StringToFloatMap)) + for k := range this.StringToFloatMap { + keysForStringToFloatMap = append(keysForStringToFloatMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToFloatMap) + mapStringForStringToFloatMap := "map[string]float32{" + for _, k := range keysForStringToFloatMap { + mapStringForStringToFloatMap += fmt.Sprintf("%v: %v,", k, this.StringToFloatMap[k]) + } + mapStringForStringToFloatMap += "}" + keysForInt32Map := make([]int32, 0, len(this.Int32Map)) + for k := range this.Int32Map { + keysForInt32Map = append(keysForInt32Map, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForInt32Map) + mapStringForInt32Map := "map[int32]int32{" + for _, k := range keysForInt32Map { + mapStringForInt32Map += fmt.Sprintf("%v: %v,", k, this.Int32Map[k]) + } + mapStringForInt32Map += "}" + keysForInt64Map := make([]int64, 0, len(this.Int64Map)) + for k := range this.Int64Map { + keysForInt64Map = append(keysForInt64Map, k) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForInt64Map) + mapStringForInt64Map := "map[int64]int64{" + for _, k := range keysForInt64Map { + mapStringForInt64Map += fmt.Sprintf("%v: %v,", k, this.Int64Map[k]) + } + mapStringForInt64Map += "}" + keysForUint32Map := make([]uint32, 0, len(this.Uint32Map)) + for k := range this.Uint32Map { + keysForUint32Map = append(keysForUint32Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint32s(keysForUint32Map) + mapStringForUint32Map := "map[uint32]uint32{" + for _, k := range keysForUint32Map { + mapStringForUint32Map += fmt.Sprintf("%v: %v,", k, this.Uint32Map[k]) + } + mapStringForUint32Map += "}" + keysForUint64Map := make([]uint64, 0, len(this.Uint64Map)) + for k := range this.Uint64Map { + keysForUint64Map = append(keysForUint64Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint64s(keysForUint64Map) + mapStringForUint64Map := "map[uint64]uint64{" + for _, k := range keysForUint64Map { + mapStringForUint64Map += fmt.Sprintf("%v: %v,", k, this.Uint64Map[k]) + } + mapStringForUint64Map += "}" + keysForSint32Map := make([]int32, 0, len(this.Sint32Map)) + for k := range this.Sint32Map { + keysForSint32Map = append(keysForSint32Map, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForSint32Map) + mapStringForSint32Map := "map[int32]int32{" + for _, k := range keysForSint32Map { + mapStringForSint32Map += fmt.Sprintf("%v: %v,", k, this.Sint32Map[k]) + } + mapStringForSint32Map += "}" + keysForSint64Map := make([]int64, 0, len(this.Sint64Map)) + for k := range this.Sint64Map { + keysForSint64Map = append(keysForSint64Map, k) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForSint64Map) + mapStringForSint64Map := "map[int64]int64{" + for _, k := range keysForSint64Map { + mapStringForSint64Map += fmt.Sprintf("%v: %v,", k, this.Sint64Map[k]) + } + mapStringForSint64Map += "}" + keysForFixed32Map := make([]uint32, 0, len(this.Fixed32Map)) + for k := range this.Fixed32Map { + keysForFixed32Map = append(keysForFixed32Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint32s(keysForFixed32Map) + mapStringForFixed32Map := "map[uint32]uint32{" + for _, k := range keysForFixed32Map { + mapStringForFixed32Map += fmt.Sprintf("%v: %v,", k, this.Fixed32Map[k]) + } + mapStringForFixed32Map += "}" + keysForSfixed32Map := make([]int32, 0, len(this.Sfixed32Map)) + for k := range this.Sfixed32Map { + keysForSfixed32Map = append(keysForSfixed32Map, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForSfixed32Map) + mapStringForSfixed32Map := "map[int32]int32{" + for _, k := range keysForSfixed32Map { + mapStringForSfixed32Map += fmt.Sprintf("%v: %v,", k, this.Sfixed32Map[k]) + } + mapStringForSfixed32Map += "}" + keysForFixed64Map := make([]uint64, 0, len(this.Fixed64Map)) + for k := range this.Fixed64Map { + keysForFixed64Map = append(keysForFixed64Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint64s(keysForFixed64Map) + mapStringForFixed64Map := "map[uint64]uint64{" + for _, k := range keysForFixed64Map { + mapStringForFixed64Map += fmt.Sprintf("%v: %v,", k, this.Fixed64Map[k]) + } + mapStringForFixed64Map += "}" + keysForSfixed64Map := make([]int64, 0, len(this.Sfixed64Map)) + for k := range this.Sfixed64Map { + keysForSfixed64Map = append(keysForSfixed64Map, k) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForSfixed64Map) + mapStringForSfixed64Map := "map[int64]int64{" + for _, k := range keysForSfixed64Map { + mapStringForSfixed64Map += fmt.Sprintf("%v: %v,", k, this.Sfixed64Map[k]) + } + mapStringForSfixed64Map += "}" + keysForBoolMap := make([]bool, 0, len(this.BoolMap)) + for k := range this.BoolMap { + keysForBoolMap = append(keysForBoolMap, k) + } + github_com_gogo_protobuf_sortkeys.Bools(keysForBoolMap) + mapStringForBoolMap := "map[bool]bool{" + for _, k := range keysForBoolMap { + mapStringForBoolMap += fmt.Sprintf("%v: %v,", k, this.BoolMap[k]) + } + mapStringForBoolMap += "}" + keysForStringMap := make([]string, 0, len(this.StringMap)) + for k := range this.StringMap { + keysForStringMap = append(keysForStringMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringMap) + mapStringForStringMap := "map[string]string{" + for _, k := range keysForStringMap { + mapStringForStringMap += fmt.Sprintf("%v: %v,", k, this.StringMap[k]) + } + mapStringForStringMap += "}" + keysForStringToBytesMap := make([]string, 0, len(this.StringToBytesMap)) + for k := range this.StringToBytesMap { + keysForStringToBytesMap = append(keysForStringToBytesMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToBytesMap) + mapStringForStringToBytesMap := "map[string][]byte{" + for _, k := range keysForStringToBytesMap { + mapStringForStringToBytesMap += fmt.Sprintf("%v: %v,", k, this.StringToBytesMap[k]) + } + mapStringForStringToBytesMap += "}" + keysForStringToEnumMap := make([]string, 0, len(this.StringToEnumMap)) + for k := range this.StringToEnumMap { + keysForStringToEnumMap = append(keysForStringToEnumMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToEnumMap) + mapStringForStringToEnumMap := "map[string]MapEnum{" + for _, k := range keysForStringToEnumMap { + mapStringForStringToEnumMap += fmt.Sprintf("%v: %v,", k, this.StringToEnumMap[k]) + } + mapStringForStringToEnumMap += "}" + keysForStringToMsgMap := make([]string, 0, len(this.StringToMsgMap)) + for k := range this.StringToMsgMap { + keysForStringToMsgMap = append(keysForStringToMsgMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToMsgMap) + mapStringForStringToMsgMap := "map[string]*FloatingPoint{" + for _, k := range keysForStringToMsgMap { + mapStringForStringToMsgMap += fmt.Sprintf("%v: %v,", k, this.StringToMsgMap[k]) + } + mapStringForStringToMsgMap += "}" + s := strings.Join([]string{`&AllMapsOrdered{`, + `StringToDoubleMap:` + mapStringForStringToDoubleMap + `,`, + `StringToFloatMap:` + mapStringForStringToFloatMap + `,`, + `Int32Map:` + mapStringForInt32Map + `,`, + `Int64Map:` + mapStringForInt64Map + `,`, + `Uint32Map:` + mapStringForUint32Map + `,`, + `Uint64Map:` + mapStringForUint64Map + `,`, + `Sint32Map:` + mapStringForSint32Map + `,`, + `Sint64Map:` + mapStringForSint64Map + `,`, + `Fixed32Map:` + mapStringForFixed32Map + `,`, + `Sfixed32Map:` + mapStringForSfixed32Map + `,`, + `Fixed64Map:` + mapStringForFixed64Map + `,`, + `Sfixed64Map:` + mapStringForSfixed64Map + `,`, + `BoolMap:` + mapStringForBoolMap + `,`, + `StringMap:` + mapStringForStringMap + `,`, + `StringToBytesMap:` + mapStringForStringToBytesMap + `,`, + `StringToEnumMap:` + mapStringForStringToEnumMap + `,`, + `StringToMsgMap:` + mapStringForStringToMsgMap + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func valueToStringMapsproto2(v interface{}) string { + rv := reflect.ValueOf(v) + if rv.IsNil() { + return "nil" + } + pv := reflect.Indirect(rv).Interface() + return fmt.Sprintf("*%v", pv) +} +func (m *FloatingPoint) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *FloatingPoint) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.F != nil { + data[i] = 0x9 + i++ + *(*float64)(unsafe.Pointer(&data[i])) = *m.F + i += 8 + } + if m.XXX_unrecognized != nil { + i += copy(data[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *AllMaps) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *AllMaps) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.StringToDoubleMap) > 0 { + for k := range m.StringToDoubleMap { + data[i] = 0xa + i++ + v := m.StringToDoubleMap[k] + mapSize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + 1 + 8 + i = encodeVarintMapsproto2(data, i, uint64(mapSize)) + data[i] = 0xa + i++ + i = encodeVarintMapsproto2(data, i, uint64(len(k))) + i += copy(data[i:], k) + data[i] = 0x11 + i++ + i = encodeFixed64Mapsproto2(data, i, uint64(math.Float64bits(float64(v)))) + } + } + if len(m.StringToFloatMap) > 0 { + for k := range m.StringToFloatMap { + data[i] = 0x12 + i++ + v := m.StringToFloatMap[k] + mapSize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + 1 + 4 + i = encodeVarintMapsproto2(data, i, uint64(mapSize)) + data[i] = 0xa + i++ + i = encodeVarintMapsproto2(data, i, uint64(len(k))) + i += copy(data[i:], k) + data[i] = 0x15 + i++ + i = encodeFixed32Mapsproto2(data, i, uint32(math.Float32bits(float32(v)))) + } + } + if len(m.Int32Map) > 0 { + for k := range m.Int32Map { + data[i] = 0x1a + i++ + v := m.Int32Map[k] + mapSize := 1 + sovMapsproto2(uint64(k)) + 1 + sovMapsproto2(uint64(v)) + i = encodeVarintMapsproto2(data, i, uint64(mapSize)) + data[i] = 0x8 + i++ + i = encodeVarintMapsproto2(data, i, uint64(k)) + data[i] = 0x10 + i++ + i = encodeVarintMapsproto2(data, i, uint64(v)) + } + } + if len(m.Int64Map) > 0 { + for k := range m.Int64Map { + data[i] = 0x22 + i++ + v := m.Int64Map[k] + mapSize := 1 + sovMapsproto2(uint64(k)) + 1 + sovMapsproto2(uint64(v)) + i = encodeVarintMapsproto2(data, i, uint64(mapSize)) + data[i] = 0x8 + i++ + i = encodeVarintMapsproto2(data, i, uint64(k)) + data[i] = 0x10 + i++ + i = encodeVarintMapsproto2(data, i, uint64(v)) + } + } + if len(m.Uint32Map) > 0 { + for k := range m.Uint32Map { + data[i] = 0x2a + i++ + v := m.Uint32Map[k] + mapSize := 1 + sovMapsproto2(uint64(k)) + 1 + sovMapsproto2(uint64(v)) + i = encodeVarintMapsproto2(data, i, uint64(mapSize)) + data[i] = 0x8 + i++ + i = encodeVarintMapsproto2(data, i, uint64(k)) + data[i] = 0x10 + i++ + i = encodeVarintMapsproto2(data, i, uint64(v)) + } + } + if len(m.Uint64Map) > 0 { + for k := range m.Uint64Map { + data[i] = 0x32 + i++ + v := m.Uint64Map[k] + mapSize := 1 + sovMapsproto2(uint64(k)) + 1 + sovMapsproto2(uint64(v)) + i = encodeVarintMapsproto2(data, i, uint64(mapSize)) + data[i] = 0x8 + i++ + i = encodeVarintMapsproto2(data, i, uint64(k)) + data[i] = 0x10 + i++ + i = encodeVarintMapsproto2(data, i, uint64(v)) + } + } + if len(m.Sint32Map) > 0 { + for k := range m.Sint32Map { + data[i] = 0x3a + i++ + v := m.Sint32Map[k] + mapSize := 1 + sozMapsproto2(uint64(k)) + 1 + sozMapsproto2(uint64(v)) + i = encodeVarintMapsproto2(data, i, uint64(mapSize)) + data[i] = 0x8 + i++ + i = encodeVarintMapsproto2(data, i, uint64((uint32(k)<<1)^uint32((k>>31)))) + data[i] = 0x10 + i++ + i = encodeVarintMapsproto2(data, i, uint64((uint32(v)<<1)^uint32((v>>31)))) + } + } + if len(m.Sint64Map) > 0 { + for k := range m.Sint64Map { + data[i] = 0x42 + i++ + v := m.Sint64Map[k] + mapSize := 1 + sozMapsproto2(uint64(k)) + 1 + sozMapsproto2(uint64(v)) + i = encodeVarintMapsproto2(data, i, uint64(mapSize)) + data[i] = 0x8 + i++ + i = encodeVarintMapsproto2(data, i, uint64((uint64(k)<<1)^uint64((k>>63)))) + data[i] = 0x10 + i++ + i = encodeVarintMapsproto2(data, i, uint64((uint64(v)<<1)^uint64((v>>63)))) + } + } + if len(m.Fixed32Map) > 0 { + for k := range m.Fixed32Map { + data[i] = 0x4a + i++ + v := m.Fixed32Map[k] + mapSize := 1 + 4 + 1 + 4 + i = encodeVarintMapsproto2(data, i, uint64(mapSize)) + data[i] = 0xd + i++ + i = encodeFixed32Mapsproto2(data, i, uint32(k)) + data[i] = 0x15 + i++ + i = encodeFixed32Mapsproto2(data, i, uint32(v)) + } + } + if len(m.Sfixed32Map) > 0 { + for k := range m.Sfixed32Map { + data[i] = 0x52 + i++ + v := m.Sfixed32Map[k] + mapSize := 1 + 4 + 1 + 4 + i = encodeVarintMapsproto2(data, i, uint64(mapSize)) + data[i] = 0xd + i++ + i = encodeFixed32Mapsproto2(data, i, uint32(k)) + data[i] = 0x15 + i++ + i = encodeFixed32Mapsproto2(data, i, uint32(v)) + } + } + if len(m.Fixed64Map) > 0 { + for k := range m.Fixed64Map { + data[i] = 0x5a + i++ + v := m.Fixed64Map[k] + mapSize := 1 + 8 + 1 + 8 + i = encodeVarintMapsproto2(data, i, uint64(mapSize)) + data[i] = 0x9 + i++ + i = encodeFixed64Mapsproto2(data, i, uint64(k)) + data[i] = 0x11 + i++ + i = encodeFixed64Mapsproto2(data, i, uint64(v)) + } + } + if len(m.Sfixed64Map) > 0 { + for k := range m.Sfixed64Map { + data[i] = 0x62 + i++ + v := m.Sfixed64Map[k] + mapSize := 1 + 8 + 1 + 8 + i = encodeVarintMapsproto2(data, i, uint64(mapSize)) + data[i] = 0x9 + i++ + i = encodeFixed64Mapsproto2(data, i, uint64(k)) + data[i] = 0x11 + i++ + i = encodeFixed64Mapsproto2(data, i, uint64(v)) + } + } + if len(m.BoolMap) > 0 { + for k := range m.BoolMap { + data[i] = 0x6a + i++ + v := m.BoolMap[k] + mapSize := 1 + 1 + 1 + 1 + i = encodeVarintMapsproto2(data, i, uint64(mapSize)) + data[i] = 0x8 + i++ + if k { + data[i] = 1 + } else { + data[i] = 0 + } + i++ + data[i] = 0x10 + i++ + if v { + data[i] = 1 + } else { + data[i] = 0 + } + i++ + } + } + if len(m.StringMap) > 0 { + for k := range m.StringMap { + data[i] = 0x72 + i++ + v := m.StringMap[k] + mapSize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + 1 + len(v) + sovMapsproto2(uint64(len(v))) + i = encodeVarintMapsproto2(data, i, uint64(mapSize)) + data[i] = 0xa + i++ + i = encodeVarintMapsproto2(data, i, uint64(len(k))) + i += copy(data[i:], k) + data[i] = 0x12 + i++ + i = encodeVarintMapsproto2(data, i, uint64(len(v))) + i += copy(data[i:], v) + } + } + if len(m.StringToBytesMap) > 0 { + for k := range m.StringToBytesMap { + data[i] = 0x7a + i++ + v := m.StringToBytesMap[k] + mapSize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + 1 + len(v) + sovMapsproto2(uint64(len(v))) + i = encodeVarintMapsproto2(data, i, uint64(mapSize)) + data[i] = 0xa + i++ + i = encodeVarintMapsproto2(data, i, uint64(len(k))) + i += copy(data[i:], k) + data[i] = 0x12 + i++ + i = encodeVarintMapsproto2(data, i, uint64(len(v))) + i += copy(data[i:], v) + } + } + if len(m.StringToEnumMap) > 0 { + for k := range m.StringToEnumMap { + data[i] = 0x82 + i++ + data[i] = 0x1 + i++ + v := m.StringToEnumMap[k] + mapSize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + 1 + sovMapsproto2(uint64(v)) + i = encodeVarintMapsproto2(data, i, uint64(mapSize)) + data[i] = 0xa + i++ + i = encodeVarintMapsproto2(data, i, uint64(len(k))) + i += copy(data[i:], k) + data[i] = 0x10 + i++ + i = encodeVarintMapsproto2(data, i, uint64(v)) + } + } + if len(m.StringToMsgMap) > 0 { + for k := range m.StringToMsgMap { + data[i] = 0x8a + i++ + data[i] = 0x1 + i++ + v := m.StringToMsgMap[k] + if v == nil { + return 0, errors.New("proto: map has nil element") + } + msgSize := v.Size() + mapSize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + 1 + msgSize + sovMapsproto2(uint64(msgSize)) + i = encodeVarintMapsproto2(data, i, uint64(mapSize)) + data[i] = 0xa + i++ + i = encodeVarintMapsproto2(data, i, uint64(len(k))) + i += copy(data[i:], k) + data[i] = 0x12 + i++ + i = encodeVarintMapsproto2(data, i, uint64(v.Size())) + n1, err := v.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n1 + } + } + if m.XXX_unrecognized != nil { + i += copy(data[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *AllMapsOrdered) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *AllMapsOrdered) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.StringToDoubleMap) > 0 { + keysForStringToDoubleMap := make([]string, 0, len(m.StringToDoubleMap)) + for k := range m.StringToDoubleMap { + keysForStringToDoubleMap = append(keysForStringToDoubleMap, string(k)) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToDoubleMap) + for _, k := range keysForStringToDoubleMap { + data[i] = 0xa + i++ + v := m.StringToDoubleMap[string(k)] + mapSize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + 1 + 8 + i = encodeVarintMapsproto2(data, i, uint64(mapSize)) + data[i] = 0xa + i++ + i = encodeVarintMapsproto2(data, i, uint64(len(k))) + i += copy(data[i:], k) + data[i] = 0x11 + i++ + i = encodeFixed64Mapsproto2(data, i, uint64(math.Float64bits(float64(v)))) + } + } + if len(m.StringToFloatMap) > 0 { + keysForStringToFloatMap := make([]string, 0, len(m.StringToFloatMap)) + for k := range m.StringToFloatMap { + keysForStringToFloatMap = append(keysForStringToFloatMap, string(k)) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToFloatMap) + for _, k := range keysForStringToFloatMap { + data[i] = 0x12 + i++ + v := m.StringToFloatMap[string(k)] + mapSize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + 1 + 4 + i = encodeVarintMapsproto2(data, i, uint64(mapSize)) + data[i] = 0xa + i++ + i = encodeVarintMapsproto2(data, i, uint64(len(k))) + i += copy(data[i:], k) + data[i] = 0x15 + i++ + i = encodeFixed32Mapsproto2(data, i, uint32(math.Float32bits(float32(v)))) + } + } + if len(m.Int32Map) > 0 { + keysForInt32Map := make([]int32, 0, len(m.Int32Map)) + for k := range m.Int32Map { + keysForInt32Map = append(keysForInt32Map, int32(k)) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForInt32Map) + for _, k := range keysForInt32Map { + data[i] = 0x1a + i++ + v := m.Int32Map[int32(k)] + mapSize := 1 + sovMapsproto2(uint64(k)) + 1 + sovMapsproto2(uint64(v)) + i = encodeVarintMapsproto2(data, i, uint64(mapSize)) + data[i] = 0x8 + i++ + i = encodeVarintMapsproto2(data, i, uint64(k)) + data[i] = 0x10 + i++ + i = encodeVarintMapsproto2(data, i, uint64(v)) + } + } + if len(m.Int64Map) > 0 { + keysForInt64Map := make([]int64, 0, len(m.Int64Map)) + for k := range m.Int64Map { + keysForInt64Map = append(keysForInt64Map, int64(k)) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForInt64Map) + for _, k := range keysForInt64Map { + data[i] = 0x22 + i++ + v := m.Int64Map[int64(k)] + mapSize := 1 + sovMapsproto2(uint64(k)) + 1 + sovMapsproto2(uint64(v)) + i = encodeVarintMapsproto2(data, i, uint64(mapSize)) + data[i] = 0x8 + i++ + i = encodeVarintMapsproto2(data, i, uint64(k)) + data[i] = 0x10 + i++ + i = encodeVarintMapsproto2(data, i, uint64(v)) + } + } + if len(m.Uint32Map) > 0 { + keysForUint32Map := make([]uint32, 0, len(m.Uint32Map)) + for k := range m.Uint32Map { + keysForUint32Map = append(keysForUint32Map, uint32(k)) + } + github_com_gogo_protobuf_sortkeys.Uint32s(keysForUint32Map) + for _, k := range keysForUint32Map { + data[i] = 0x2a + i++ + v := m.Uint32Map[uint32(k)] + mapSize := 1 + sovMapsproto2(uint64(k)) + 1 + sovMapsproto2(uint64(v)) + i = encodeVarintMapsproto2(data, i, uint64(mapSize)) + data[i] = 0x8 + i++ + i = encodeVarintMapsproto2(data, i, uint64(k)) + data[i] = 0x10 + i++ + i = encodeVarintMapsproto2(data, i, uint64(v)) + } + } + if len(m.Uint64Map) > 0 { + keysForUint64Map := make([]uint64, 0, len(m.Uint64Map)) + for k := range m.Uint64Map { + keysForUint64Map = append(keysForUint64Map, uint64(k)) + } + github_com_gogo_protobuf_sortkeys.Uint64s(keysForUint64Map) + for _, k := range keysForUint64Map { + data[i] = 0x32 + i++ + v := m.Uint64Map[uint64(k)] + mapSize := 1 + sovMapsproto2(uint64(k)) + 1 + sovMapsproto2(uint64(v)) + i = encodeVarintMapsproto2(data, i, uint64(mapSize)) + data[i] = 0x8 + i++ + i = encodeVarintMapsproto2(data, i, uint64(k)) + data[i] = 0x10 + i++ + i = encodeVarintMapsproto2(data, i, uint64(v)) + } + } + if len(m.Sint32Map) > 0 { + keysForSint32Map := make([]int32, 0, len(m.Sint32Map)) + for k := range m.Sint32Map { + keysForSint32Map = append(keysForSint32Map, int32(k)) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForSint32Map) + for _, k := range keysForSint32Map { + data[i] = 0x3a + i++ + v := m.Sint32Map[int32(k)] + mapSize := 1 + sozMapsproto2(uint64(k)) + 1 + sozMapsproto2(uint64(v)) + i = encodeVarintMapsproto2(data, i, uint64(mapSize)) + data[i] = 0x8 + i++ + i = encodeVarintMapsproto2(data, i, uint64((uint32(k)<<1)^uint32((k>>31)))) + data[i] = 0x10 + i++ + i = encodeVarintMapsproto2(data, i, uint64((uint32(v)<<1)^uint32((v>>31)))) + } + } + if len(m.Sint64Map) > 0 { + keysForSint64Map := make([]int64, 0, len(m.Sint64Map)) + for k := range m.Sint64Map { + keysForSint64Map = append(keysForSint64Map, int64(k)) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForSint64Map) + for _, k := range keysForSint64Map { + data[i] = 0x42 + i++ + v := m.Sint64Map[int64(k)] + mapSize := 1 + sozMapsproto2(uint64(k)) + 1 + sozMapsproto2(uint64(v)) + i = encodeVarintMapsproto2(data, i, uint64(mapSize)) + data[i] = 0x8 + i++ + i = encodeVarintMapsproto2(data, i, uint64((uint64(k)<<1)^uint64((k>>63)))) + data[i] = 0x10 + i++ + i = encodeVarintMapsproto2(data, i, uint64((uint64(v)<<1)^uint64((v>>63)))) + } + } + if len(m.Fixed32Map) > 0 { + keysForFixed32Map := make([]uint32, 0, len(m.Fixed32Map)) + for k := range m.Fixed32Map { + keysForFixed32Map = append(keysForFixed32Map, uint32(k)) + } + github_com_gogo_protobuf_sortkeys.Uint32s(keysForFixed32Map) + for _, k := range keysForFixed32Map { + data[i] = 0x4a + i++ + v := m.Fixed32Map[uint32(k)] + mapSize := 1 + 4 + 1 + 4 + i = encodeVarintMapsproto2(data, i, uint64(mapSize)) + data[i] = 0xd + i++ + i = encodeFixed32Mapsproto2(data, i, uint32(k)) + data[i] = 0x15 + i++ + i = encodeFixed32Mapsproto2(data, i, uint32(v)) + } + } + if len(m.Sfixed32Map) > 0 { + keysForSfixed32Map := make([]int32, 0, len(m.Sfixed32Map)) + for k := range m.Sfixed32Map { + keysForSfixed32Map = append(keysForSfixed32Map, int32(k)) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForSfixed32Map) + for _, k := range keysForSfixed32Map { + data[i] = 0x52 + i++ + v := m.Sfixed32Map[int32(k)] + mapSize := 1 + 4 + 1 + 4 + i = encodeVarintMapsproto2(data, i, uint64(mapSize)) + data[i] = 0xd + i++ + i = encodeFixed32Mapsproto2(data, i, uint32(k)) + data[i] = 0x15 + i++ + i = encodeFixed32Mapsproto2(data, i, uint32(v)) + } + } + if len(m.Fixed64Map) > 0 { + keysForFixed64Map := make([]uint64, 0, len(m.Fixed64Map)) + for k := range m.Fixed64Map { + keysForFixed64Map = append(keysForFixed64Map, uint64(k)) + } + github_com_gogo_protobuf_sortkeys.Uint64s(keysForFixed64Map) + for _, k := range keysForFixed64Map { + data[i] = 0x5a + i++ + v := m.Fixed64Map[uint64(k)] + mapSize := 1 + 8 + 1 + 8 + i = encodeVarintMapsproto2(data, i, uint64(mapSize)) + data[i] = 0x9 + i++ + i = encodeFixed64Mapsproto2(data, i, uint64(k)) + data[i] = 0x11 + i++ + i = encodeFixed64Mapsproto2(data, i, uint64(v)) + } + } + if len(m.Sfixed64Map) > 0 { + keysForSfixed64Map := make([]int64, 0, len(m.Sfixed64Map)) + for k := range m.Sfixed64Map { + keysForSfixed64Map = append(keysForSfixed64Map, int64(k)) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForSfixed64Map) + for _, k := range keysForSfixed64Map { + data[i] = 0x62 + i++ + v := m.Sfixed64Map[int64(k)] + mapSize := 1 + 8 + 1 + 8 + i = encodeVarintMapsproto2(data, i, uint64(mapSize)) + data[i] = 0x9 + i++ + i = encodeFixed64Mapsproto2(data, i, uint64(k)) + data[i] = 0x11 + i++ + i = encodeFixed64Mapsproto2(data, i, uint64(v)) + } + } + if len(m.BoolMap) > 0 { + keysForBoolMap := make([]bool, 0, len(m.BoolMap)) + for k := range m.BoolMap { + keysForBoolMap = append(keysForBoolMap, bool(k)) + } + github_com_gogo_protobuf_sortkeys.Bools(keysForBoolMap) + for _, k := range keysForBoolMap { + data[i] = 0x6a + i++ + v := m.BoolMap[bool(k)] + mapSize := 1 + 1 + 1 + 1 + i = encodeVarintMapsproto2(data, i, uint64(mapSize)) + data[i] = 0x8 + i++ + if k { + data[i] = 1 + } else { + data[i] = 0 + } + i++ + data[i] = 0x10 + i++ + if v { + data[i] = 1 + } else { + data[i] = 0 + } + i++ + } + } + if len(m.StringMap) > 0 { + keysForStringMap := make([]string, 0, len(m.StringMap)) + for k := range m.StringMap { + keysForStringMap = append(keysForStringMap, string(k)) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringMap) + for _, k := range keysForStringMap { + data[i] = 0x72 + i++ + v := m.StringMap[string(k)] + mapSize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + 1 + len(v) + sovMapsproto2(uint64(len(v))) + i = encodeVarintMapsproto2(data, i, uint64(mapSize)) + data[i] = 0xa + i++ + i = encodeVarintMapsproto2(data, i, uint64(len(k))) + i += copy(data[i:], k) + data[i] = 0x12 + i++ + i = encodeVarintMapsproto2(data, i, uint64(len(v))) + i += copy(data[i:], v) + } + } + if len(m.StringToBytesMap) > 0 { + keysForStringToBytesMap := make([]string, 0, len(m.StringToBytesMap)) + for k := range m.StringToBytesMap { + keysForStringToBytesMap = append(keysForStringToBytesMap, string(k)) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToBytesMap) + for _, k := range keysForStringToBytesMap { + data[i] = 0x7a + i++ + v := m.StringToBytesMap[string(k)] + mapSize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + 1 + len(v) + sovMapsproto2(uint64(len(v))) + i = encodeVarintMapsproto2(data, i, uint64(mapSize)) + data[i] = 0xa + i++ + i = encodeVarintMapsproto2(data, i, uint64(len(k))) + i += copy(data[i:], k) + data[i] = 0x12 + i++ + i = encodeVarintMapsproto2(data, i, uint64(len(v))) + i += copy(data[i:], v) + } + } + if len(m.StringToEnumMap) > 0 { + keysForStringToEnumMap := make([]string, 0, len(m.StringToEnumMap)) + for k := range m.StringToEnumMap { + keysForStringToEnumMap = append(keysForStringToEnumMap, string(k)) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToEnumMap) + for _, k := range keysForStringToEnumMap { + data[i] = 0x82 + i++ + data[i] = 0x1 + i++ + v := m.StringToEnumMap[string(k)] + mapSize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + 1 + sovMapsproto2(uint64(v)) + i = encodeVarintMapsproto2(data, i, uint64(mapSize)) + data[i] = 0xa + i++ + i = encodeVarintMapsproto2(data, i, uint64(len(k))) + i += copy(data[i:], k) + data[i] = 0x10 + i++ + i = encodeVarintMapsproto2(data, i, uint64(v)) + } + } + if len(m.StringToMsgMap) > 0 { + keysForStringToMsgMap := make([]string, 0, len(m.StringToMsgMap)) + for k := range m.StringToMsgMap { + keysForStringToMsgMap = append(keysForStringToMsgMap, string(k)) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToMsgMap) + for _, k := range keysForStringToMsgMap { + data[i] = 0x8a + i++ + data[i] = 0x1 + i++ + v := m.StringToMsgMap[string(k)] + if v == nil { + return 0, errors.New("proto: map has nil element") + } + msgSize := v.Size() + mapSize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + 1 + msgSize + sovMapsproto2(uint64(msgSize)) + i = encodeVarintMapsproto2(data, i, uint64(mapSize)) + data[i] = 0xa + i++ + i = encodeVarintMapsproto2(data, i, uint64(len(k))) + i += copy(data[i:], k) + data[i] = 0x12 + i++ + i = encodeVarintMapsproto2(data, i, uint64(v.Size())) + n2, err := v.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n2 + } + } + if m.XXX_unrecognized != nil { + i += copy(data[i:], m.XXX_unrecognized) + } + return i, nil +} + +func encodeFixed64Mapsproto2(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 encodeFixed32Mapsproto2(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 encodeVarintMapsproto2(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 (m *FloatingPoint) 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 ErrIntOverflowMapsproto2Unsafe + } + 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: FloatingPoint: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: FloatingPoint: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field F", wireType) + } + var v float64 + if iNdEx+8 > l { + return io.ErrUnexpectedEOF + } + v = *(*float64)(unsafe.Pointer(&data[iNdEx])) + iNdEx += 8 + m.F = &v + default: + iNdEx = preIndex + skippy, err := skipMapsproto2Unsafe(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMapsproto2Unsafe + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *AllMaps) 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 ErrIntOverflowMapsproto2Unsafe + } + 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: AllMaps: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: AllMaps: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field StringToDoubleMap", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMapsproto2Unsafe + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var keykey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + keykey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var stringLenmapkey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLenmapkey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapkey := int(stringLenmapkey) + if intStringLenmapkey < 0 { + return ErrInvalidLengthMapsproto2Unsafe + } + postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey > l { + return io.ErrUnexpectedEOF + } + mapkey := string(data[iNdEx:postStringIndexmapkey]) + iNdEx = postStringIndexmapkey + var valuekey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + valuekey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapvaluetemp uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + iNdEx += 8 + mapvaluetemp = uint64(data[iNdEx-8]) + mapvaluetemp |= uint64(data[iNdEx-7]) << 8 + mapvaluetemp |= uint64(data[iNdEx-6]) << 16 + mapvaluetemp |= uint64(data[iNdEx-5]) << 24 + mapvaluetemp |= uint64(data[iNdEx-4]) << 32 + mapvaluetemp |= uint64(data[iNdEx-3]) << 40 + mapvaluetemp |= uint64(data[iNdEx-2]) << 48 + mapvaluetemp |= uint64(data[iNdEx-1]) << 56 + mapvalue := math.Float64frombits(mapvaluetemp) + if m.StringToDoubleMap == nil { + m.StringToDoubleMap = make(map[string]float64) + } + m.StringToDoubleMap[mapkey] = mapvalue + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field StringToFloatMap", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMapsproto2Unsafe + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var keykey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + keykey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var stringLenmapkey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLenmapkey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapkey := int(stringLenmapkey) + if intStringLenmapkey < 0 { + return ErrInvalidLengthMapsproto2Unsafe + } + postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey > l { + return io.ErrUnexpectedEOF + } + mapkey := string(data[iNdEx:postStringIndexmapkey]) + iNdEx = postStringIndexmapkey + var valuekey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + valuekey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapvaluetemp uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + iNdEx += 4 + mapvaluetemp = uint32(data[iNdEx-4]) + mapvaluetemp |= uint32(data[iNdEx-3]) << 8 + mapvaluetemp |= uint32(data[iNdEx-2]) << 16 + mapvaluetemp |= uint32(data[iNdEx-1]) << 24 + mapvalue := math.Float32frombits(mapvaluetemp) + if m.StringToFloatMap == nil { + m.StringToFloatMap = make(map[string]float32) + } + m.StringToFloatMap[mapkey] = mapvalue + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Int32Map", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMapsproto2Unsafe + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var keykey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + keykey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapkey int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + mapkey |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var valuekey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + valuekey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapvalue int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + mapvalue |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if m.Int32Map == nil { + m.Int32Map = make(map[int32]int32) + } + m.Int32Map[mapkey] = mapvalue + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Int64Map", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMapsproto2Unsafe + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var keykey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + keykey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapkey int64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + mapkey |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var valuekey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + valuekey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapvalue int64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + mapvalue |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if m.Int64Map == nil { + m.Int64Map = make(map[int64]int64) + } + m.Int64Map[mapkey] = mapvalue + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Uint32Map", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMapsproto2Unsafe + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var keykey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + keykey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapkey uint32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + mapkey |= (uint32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var valuekey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + valuekey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapvalue uint32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + mapvalue |= (uint32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if m.Uint32Map == nil { + m.Uint32Map = make(map[uint32]uint32) + } + m.Uint32Map[mapkey] = mapvalue + iNdEx = postIndex + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Uint64Map", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMapsproto2Unsafe + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var keykey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + keykey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapkey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + mapkey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var valuekey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + valuekey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapvalue uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + mapvalue |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if m.Uint64Map == nil { + m.Uint64Map = make(map[uint64]uint64) + } + m.Uint64Map[mapkey] = mapvalue + iNdEx = postIndex + case 7: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Sint32Map", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMapsproto2Unsafe + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var keykey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + keykey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapkeytemp int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + mapkeytemp |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + mapkeytemp = int32((uint32(mapkeytemp) >> 1) ^ uint32(((mapkeytemp&1)<<31)>>31)) + mapkey := int32(mapkeytemp) + var valuekey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + valuekey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapvaluetemp int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + mapvaluetemp |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + mapvaluetemp = int32((uint32(mapvaluetemp) >> 1) ^ uint32(((mapvaluetemp&1)<<31)>>31)) + mapvalue := int32(mapvaluetemp) + if m.Sint32Map == nil { + m.Sint32Map = make(map[int32]int32) + } + m.Sint32Map[mapkey] = mapvalue + iNdEx = postIndex + case 8: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Sint64Map", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMapsproto2Unsafe + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var keykey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + keykey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapkeytemp uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + mapkeytemp |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + mapkeytemp = (mapkeytemp >> 1) ^ uint64((int64(mapkeytemp&1)<<63)>>63) + mapkey := int64(mapkeytemp) + var valuekey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + valuekey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapvaluetemp uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + mapvaluetemp |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + mapvaluetemp = (mapvaluetemp >> 1) ^ uint64((int64(mapvaluetemp&1)<<63)>>63) + mapvalue := int64(mapvaluetemp) + if m.Sint64Map == nil { + m.Sint64Map = make(map[int64]int64) + } + m.Sint64Map[mapkey] = mapvalue + iNdEx = postIndex + case 9: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Fixed32Map", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMapsproto2Unsafe + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var keykey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + keykey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapkey uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + iNdEx += 4 + mapkey = uint32(data[iNdEx-4]) + mapkey |= uint32(data[iNdEx-3]) << 8 + mapkey |= uint32(data[iNdEx-2]) << 16 + mapkey |= uint32(data[iNdEx-1]) << 24 + var valuekey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + valuekey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapvalue uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + iNdEx += 4 + mapvalue = uint32(data[iNdEx-4]) + mapvalue |= uint32(data[iNdEx-3]) << 8 + mapvalue |= uint32(data[iNdEx-2]) << 16 + mapvalue |= uint32(data[iNdEx-1]) << 24 + if m.Fixed32Map == nil { + m.Fixed32Map = make(map[uint32]uint32) + } + m.Fixed32Map[mapkey] = mapvalue + iNdEx = postIndex + case 10: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Sfixed32Map", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMapsproto2Unsafe + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var keykey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + keykey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapkey int32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + iNdEx += 4 + mapkey = int32(data[iNdEx-4]) + mapkey |= int32(data[iNdEx-3]) << 8 + mapkey |= int32(data[iNdEx-2]) << 16 + mapkey |= int32(data[iNdEx-1]) << 24 + var valuekey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + valuekey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapvalue int32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + iNdEx += 4 + mapvalue = int32(data[iNdEx-4]) + mapvalue |= int32(data[iNdEx-3]) << 8 + mapvalue |= int32(data[iNdEx-2]) << 16 + mapvalue |= int32(data[iNdEx-1]) << 24 + if m.Sfixed32Map == nil { + m.Sfixed32Map = make(map[int32]int32) + } + m.Sfixed32Map[mapkey] = mapvalue + iNdEx = postIndex + case 11: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Fixed64Map", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMapsproto2Unsafe + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var keykey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + keykey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapkey uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + iNdEx += 8 + mapkey = uint64(data[iNdEx-8]) + mapkey |= uint64(data[iNdEx-7]) << 8 + mapkey |= uint64(data[iNdEx-6]) << 16 + mapkey |= uint64(data[iNdEx-5]) << 24 + mapkey |= uint64(data[iNdEx-4]) << 32 + mapkey |= uint64(data[iNdEx-3]) << 40 + mapkey |= uint64(data[iNdEx-2]) << 48 + mapkey |= uint64(data[iNdEx-1]) << 56 + var valuekey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + valuekey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapvalue uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + iNdEx += 8 + mapvalue = uint64(data[iNdEx-8]) + mapvalue |= uint64(data[iNdEx-7]) << 8 + mapvalue |= uint64(data[iNdEx-6]) << 16 + mapvalue |= uint64(data[iNdEx-5]) << 24 + mapvalue |= uint64(data[iNdEx-4]) << 32 + mapvalue |= uint64(data[iNdEx-3]) << 40 + mapvalue |= uint64(data[iNdEx-2]) << 48 + mapvalue |= uint64(data[iNdEx-1]) << 56 + if m.Fixed64Map == nil { + m.Fixed64Map = make(map[uint64]uint64) + } + m.Fixed64Map[mapkey] = mapvalue + iNdEx = postIndex + case 12: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Sfixed64Map", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMapsproto2Unsafe + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var keykey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + keykey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapkey int64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + iNdEx += 8 + mapkey = int64(data[iNdEx-8]) + mapkey |= int64(data[iNdEx-7]) << 8 + mapkey |= int64(data[iNdEx-6]) << 16 + mapkey |= int64(data[iNdEx-5]) << 24 + mapkey |= int64(data[iNdEx-4]) << 32 + mapkey |= int64(data[iNdEx-3]) << 40 + mapkey |= int64(data[iNdEx-2]) << 48 + mapkey |= int64(data[iNdEx-1]) << 56 + var valuekey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + valuekey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapvalue int64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + iNdEx += 8 + mapvalue = int64(data[iNdEx-8]) + mapvalue |= int64(data[iNdEx-7]) << 8 + mapvalue |= int64(data[iNdEx-6]) << 16 + mapvalue |= int64(data[iNdEx-5]) << 24 + mapvalue |= int64(data[iNdEx-4]) << 32 + mapvalue |= int64(data[iNdEx-3]) << 40 + mapvalue |= int64(data[iNdEx-2]) << 48 + mapvalue |= int64(data[iNdEx-1]) << 56 + if m.Sfixed64Map == nil { + m.Sfixed64Map = make(map[int64]int64) + } + m.Sfixed64Map[mapkey] = mapvalue + iNdEx = postIndex + case 13: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field BoolMap", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMapsproto2Unsafe + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var keykey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + keykey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapkeytemp int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + mapkeytemp |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + mapkey := bool(mapkeytemp != 0) + var valuekey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + valuekey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapvaluetemp int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + mapvaluetemp |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + mapvalue := bool(mapvaluetemp != 0) + if m.BoolMap == nil { + m.BoolMap = make(map[bool]bool) + } + m.BoolMap[mapkey] = mapvalue + iNdEx = postIndex + case 14: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field StringMap", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMapsproto2Unsafe + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var keykey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + keykey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var stringLenmapkey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLenmapkey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapkey := int(stringLenmapkey) + if intStringLenmapkey < 0 { + return ErrInvalidLengthMapsproto2Unsafe + } + postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey > l { + return io.ErrUnexpectedEOF + } + mapkey := string(data[iNdEx:postStringIndexmapkey]) + iNdEx = postStringIndexmapkey + var valuekey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + valuekey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var stringLenmapvalue uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLenmapvalue |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapvalue := int(stringLenmapvalue) + if intStringLenmapvalue < 0 { + return ErrInvalidLengthMapsproto2Unsafe + } + postStringIndexmapvalue := iNdEx + intStringLenmapvalue + if postStringIndexmapvalue > l { + return io.ErrUnexpectedEOF + } + mapvalue := string(data[iNdEx:postStringIndexmapvalue]) + iNdEx = postStringIndexmapvalue + if m.StringMap == nil { + m.StringMap = make(map[string]string) + } + m.StringMap[mapkey] = mapvalue + iNdEx = postIndex + case 15: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field StringToBytesMap", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMapsproto2Unsafe + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var keykey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + keykey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var stringLenmapkey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLenmapkey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapkey := int(stringLenmapkey) + if intStringLenmapkey < 0 { + return ErrInvalidLengthMapsproto2Unsafe + } + postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey > l { + return io.ErrUnexpectedEOF + } + mapkey := string(data[iNdEx:postStringIndexmapkey]) + iNdEx = postStringIndexmapkey + var valuekey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + valuekey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapbyteLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + mapbyteLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intMapbyteLen := int(mapbyteLen) + if intMapbyteLen < 0 { + return ErrInvalidLengthMapsproto2Unsafe + } + postbytesIndex := iNdEx + intMapbyteLen + if postbytesIndex > l { + return io.ErrUnexpectedEOF + } + mapvalue := make([]byte, mapbyteLen) + copy(mapvalue, data[iNdEx:postbytesIndex]) + iNdEx = postbytesIndex + if m.StringToBytesMap == nil { + m.StringToBytesMap = make(map[string][]byte) + } + m.StringToBytesMap[mapkey] = mapvalue + iNdEx = postIndex + case 16: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field StringToEnumMap", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMapsproto2Unsafe + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var keykey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + keykey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var stringLenmapkey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLenmapkey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapkey := int(stringLenmapkey) + if intStringLenmapkey < 0 { + return ErrInvalidLengthMapsproto2Unsafe + } + postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey > l { + return io.ErrUnexpectedEOF + } + mapkey := string(data[iNdEx:postStringIndexmapkey]) + iNdEx = postStringIndexmapkey + var valuekey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + valuekey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapvalue MapEnum + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + mapvalue |= (MapEnum(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if m.StringToEnumMap == nil { + m.StringToEnumMap = make(map[string]MapEnum) + } + m.StringToEnumMap[mapkey] = mapvalue + iNdEx = postIndex + case 17: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field StringToMsgMap", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMapsproto2Unsafe + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var keykey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + keykey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var stringLenmapkey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLenmapkey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapkey := int(stringLenmapkey) + if intStringLenmapkey < 0 { + return ErrInvalidLengthMapsproto2Unsafe + } + postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey > l { + return io.ErrUnexpectedEOF + } + mapkey := string(data[iNdEx:postStringIndexmapkey]) + iNdEx = postStringIndexmapkey + var valuekey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + valuekey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapmsglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + mapmsglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if mapmsglen < 0 { + return ErrInvalidLengthMapsproto2Unsafe + } + postmsgIndex := iNdEx + mapmsglen + if mapmsglen < 0 { + return ErrInvalidLengthMapsproto2Unsafe + } + if postmsgIndex > l { + return io.ErrUnexpectedEOF + } + mapvalue := &FloatingPoint{} + if err := mapvalue.Unmarshal(data[iNdEx:postmsgIndex]); err != nil { + return err + } + iNdEx = postmsgIndex + if m.StringToMsgMap == nil { + m.StringToMsgMap = make(map[string]*FloatingPoint) + } + m.StringToMsgMap[mapkey] = mapvalue + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipMapsproto2Unsafe(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMapsproto2Unsafe + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *AllMapsOrdered) 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 ErrIntOverflowMapsproto2Unsafe + } + 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: AllMapsOrdered: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: AllMapsOrdered: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field StringToDoubleMap", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMapsproto2Unsafe + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var keykey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + keykey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var stringLenmapkey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLenmapkey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapkey := int(stringLenmapkey) + if intStringLenmapkey < 0 { + return ErrInvalidLengthMapsproto2Unsafe + } + postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey > l { + return io.ErrUnexpectedEOF + } + mapkey := string(data[iNdEx:postStringIndexmapkey]) + iNdEx = postStringIndexmapkey + var valuekey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + valuekey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapvaluetemp uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + iNdEx += 8 + mapvaluetemp = uint64(data[iNdEx-8]) + mapvaluetemp |= uint64(data[iNdEx-7]) << 8 + mapvaluetemp |= uint64(data[iNdEx-6]) << 16 + mapvaluetemp |= uint64(data[iNdEx-5]) << 24 + mapvaluetemp |= uint64(data[iNdEx-4]) << 32 + mapvaluetemp |= uint64(data[iNdEx-3]) << 40 + mapvaluetemp |= uint64(data[iNdEx-2]) << 48 + mapvaluetemp |= uint64(data[iNdEx-1]) << 56 + mapvalue := math.Float64frombits(mapvaluetemp) + if m.StringToDoubleMap == nil { + m.StringToDoubleMap = make(map[string]float64) + } + m.StringToDoubleMap[mapkey] = mapvalue + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field StringToFloatMap", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMapsproto2Unsafe + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var keykey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + keykey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var stringLenmapkey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLenmapkey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapkey := int(stringLenmapkey) + if intStringLenmapkey < 0 { + return ErrInvalidLengthMapsproto2Unsafe + } + postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey > l { + return io.ErrUnexpectedEOF + } + mapkey := string(data[iNdEx:postStringIndexmapkey]) + iNdEx = postStringIndexmapkey + var valuekey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + valuekey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapvaluetemp uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + iNdEx += 4 + mapvaluetemp = uint32(data[iNdEx-4]) + mapvaluetemp |= uint32(data[iNdEx-3]) << 8 + mapvaluetemp |= uint32(data[iNdEx-2]) << 16 + mapvaluetemp |= uint32(data[iNdEx-1]) << 24 + mapvalue := math.Float32frombits(mapvaluetemp) + if m.StringToFloatMap == nil { + m.StringToFloatMap = make(map[string]float32) + } + m.StringToFloatMap[mapkey] = mapvalue + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Int32Map", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMapsproto2Unsafe + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var keykey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + keykey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapkey int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + mapkey |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var valuekey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + valuekey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapvalue int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + mapvalue |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if m.Int32Map == nil { + m.Int32Map = make(map[int32]int32) + } + m.Int32Map[mapkey] = mapvalue + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Int64Map", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMapsproto2Unsafe + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var keykey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + keykey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapkey int64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + mapkey |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var valuekey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + valuekey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapvalue int64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + mapvalue |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if m.Int64Map == nil { + m.Int64Map = make(map[int64]int64) + } + m.Int64Map[mapkey] = mapvalue + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Uint32Map", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMapsproto2Unsafe + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var keykey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + keykey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapkey uint32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + mapkey |= (uint32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var valuekey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + valuekey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapvalue uint32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + mapvalue |= (uint32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if m.Uint32Map == nil { + m.Uint32Map = make(map[uint32]uint32) + } + m.Uint32Map[mapkey] = mapvalue + iNdEx = postIndex + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Uint64Map", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMapsproto2Unsafe + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var keykey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + keykey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapkey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + mapkey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var valuekey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + valuekey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapvalue uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + mapvalue |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if m.Uint64Map == nil { + m.Uint64Map = make(map[uint64]uint64) + } + m.Uint64Map[mapkey] = mapvalue + iNdEx = postIndex + case 7: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Sint32Map", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMapsproto2Unsafe + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var keykey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + keykey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapkeytemp int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + mapkeytemp |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + mapkeytemp = int32((uint32(mapkeytemp) >> 1) ^ uint32(((mapkeytemp&1)<<31)>>31)) + mapkey := int32(mapkeytemp) + var valuekey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + valuekey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapvaluetemp int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + mapvaluetemp |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + mapvaluetemp = int32((uint32(mapvaluetemp) >> 1) ^ uint32(((mapvaluetemp&1)<<31)>>31)) + mapvalue := int32(mapvaluetemp) + if m.Sint32Map == nil { + m.Sint32Map = make(map[int32]int32) + } + m.Sint32Map[mapkey] = mapvalue + iNdEx = postIndex + case 8: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Sint64Map", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMapsproto2Unsafe + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var keykey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + keykey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapkeytemp uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + mapkeytemp |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + mapkeytemp = (mapkeytemp >> 1) ^ uint64((int64(mapkeytemp&1)<<63)>>63) + mapkey := int64(mapkeytemp) + var valuekey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + valuekey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapvaluetemp uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + mapvaluetemp |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + mapvaluetemp = (mapvaluetemp >> 1) ^ uint64((int64(mapvaluetemp&1)<<63)>>63) + mapvalue := int64(mapvaluetemp) + if m.Sint64Map == nil { + m.Sint64Map = make(map[int64]int64) + } + m.Sint64Map[mapkey] = mapvalue + iNdEx = postIndex + case 9: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Fixed32Map", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMapsproto2Unsafe + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var keykey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + keykey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapkey uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + iNdEx += 4 + mapkey = uint32(data[iNdEx-4]) + mapkey |= uint32(data[iNdEx-3]) << 8 + mapkey |= uint32(data[iNdEx-2]) << 16 + mapkey |= uint32(data[iNdEx-1]) << 24 + var valuekey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + valuekey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapvalue uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + iNdEx += 4 + mapvalue = uint32(data[iNdEx-4]) + mapvalue |= uint32(data[iNdEx-3]) << 8 + mapvalue |= uint32(data[iNdEx-2]) << 16 + mapvalue |= uint32(data[iNdEx-1]) << 24 + if m.Fixed32Map == nil { + m.Fixed32Map = make(map[uint32]uint32) + } + m.Fixed32Map[mapkey] = mapvalue + iNdEx = postIndex + case 10: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Sfixed32Map", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMapsproto2Unsafe + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var keykey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + keykey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapkey int32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + iNdEx += 4 + mapkey = int32(data[iNdEx-4]) + mapkey |= int32(data[iNdEx-3]) << 8 + mapkey |= int32(data[iNdEx-2]) << 16 + mapkey |= int32(data[iNdEx-1]) << 24 + var valuekey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + valuekey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapvalue int32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + iNdEx += 4 + mapvalue = int32(data[iNdEx-4]) + mapvalue |= int32(data[iNdEx-3]) << 8 + mapvalue |= int32(data[iNdEx-2]) << 16 + mapvalue |= int32(data[iNdEx-1]) << 24 + if m.Sfixed32Map == nil { + m.Sfixed32Map = make(map[int32]int32) + } + m.Sfixed32Map[mapkey] = mapvalue + iNdEx = postIndex + case 11: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Fixed64Map", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMapsproto2Unsafe + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var keykey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + keykey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapkey uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + iNdEx += 8 + mapkey = uint64(data[iNdEx-8]) + mapkey |= uint64(data[iNdEx-7]) << 8 + mapkey |= uint64(data[iNdEx-6]) << 16 + mapkey |= uint64(data[iNdEx-5]) << 24 + mapkey |= uint64(data[iNdEx-4]) << 32 + mapkey |= uint64(data[iNdEx-3]) << 40 + mapkey |= uint64(data[iNdEx-2]) << 48 + mapkey |= uint64(data[iNdEx-1]) << 56 + var valuekey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + valuekey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapvalue uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + iNdEx += 8 + mapvalue = uint64(data[iNdEx-8]) + mapvalue |= uint64(data[iNdEx-7]) << 8 + mapvalue |= uint64(data[iNdEx-6]) << 16 + mapvalue |= uint64(data[iNdEx-5]) << 24 + mapvalue |= uint64(data[iNdEx-4]) << 32 + mapvalue |= uint64(data[iNdEx-3]) << 40 + mapvalue |= uint64(data[iNdEx-2]) << 48 + mapvalue |= uint64(data[iNdEx-1]) << 56 + if m.Fixed64Map == nil { + m.Fixed64Map = make(map[uint64]uint64) + } + m.Fixed64Map[mapkey] = mapvalue + iNdEx = postIndex + case 12: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Sfixed64Map", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMapsproto2Unsafe + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var keykey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + keykey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapkey int64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + iNdEx += 8 + mapkey = int64(data[iNdEx-8]) + mapkey |= int64(data[iNdEx-7]) << 8 + mapkey |= int64(data[iNdEx-6]) << 16 + mapkey |= int64(data[iNdEx-5]) << 24 + mapkey |= int64(data[iNdEx-4]) << 32 + mapkey |= int64(data[iNdEx-3]) << 40 + mapkey |= int64(data[iNdEx-2]) << 48 + mapkey |= int64(data[iNdEx-1]) << 56 + var valuekey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + valuekey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapvalue int64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + iNdEx += 8 + mapvalue = int64(data[iNdEx-8]) + mapvalue |= int64(data[iNdEx-7]) << 8 + mapvalue |= int64(data[iNdEx-6]) << 16 + mapvalue |= int64(data[iNdEx-5]) << 24 + mapvalue |= int64(data[iNdEx-4]) << 32 + mapvalue |= int64(data[iNdEx-3]) << 40 + mapvalue |= int64(data[iNdEx-2]) << 48 + mapvalue |= int64(data[iNdEx-1]) << 56 + if m.Sfixed64Map == nil { + m.Sfixed64Map = make(map[int64]int64) + } + m.Sfixed64Map[mapkey] = mapvalue + iNdEx = postIndex + case 13: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field BoolMap", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMapsproto2Unsafe + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var keykey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + keykey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapkeytemp int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + mapkeytemp |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + mapkey := bool(mapkeytemp != 0) + var valuekey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + valuekey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapvaluetemp int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + mapvaluetemp |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + mapvalue := bool(mapvaluetemp != 0) + if m.BoolMap == nil { + m.BoolMap = make(map[bool]bool) + } + m.BoolMap[mapkey] = mapvalue + iNdEx = postIndex + case 14: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field StringMap", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMapsproto2Unsafe + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var keykey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + keykey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var stringLenmapkey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLenmapkey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapkey := int(stringLenmapkey) + if intStringLenmapkey < 0 { + return ErrInvalidLengthMapsproto2Unsafe + } + postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey > l { + return io.ErrUnexpectedEOF + } + mapkey := string(data[iNdEx:postStringIndexmapkey]) + iNdEx = postStringIndexmapkey + var valuekey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + valuekey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var stringLenmapvalue uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLenmapvalue |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapvalue := int(stringLenmapvalue) + if intStringLenmapvalue < 0 { + return ErrInvalidLengthMapsproto2Unsafe + } + postStringIndexmapvalue := iNdEx + intStringLenmapvalue + if postStringIndexmapvalue > l { + return io.ErrUnexpectedEOF + } + mapvalue := string(data[iNdEx:postStringIndexmapvalue]) + iNdEx = postStringIndexmapvalue + if m.StringMap == nil { + m.StringMap = make(map[string]string) + } + m.StringMap[mapkey] = mapvalue + iNdEx = postIndex + case 15: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field StringToBytesMap", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMapsproto2Unsafe + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var keykey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + keykey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var stringLenmapkey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLenmapkey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapkey := int(stringLenmapkey) + if intStringLenmapkey < 0 { + return ErrInvalidLengthMapsproto2Unsafe + } + postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey > l { + return io.ErrUnexpectedEOF + } + mapkey := string(data[iNdEx:postStringIndexmapkey]) + iNdEx = postStringIndexmapkey + var valuekey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + valuekey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapbyteLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + mapbyteLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intMapbyteLen := int(mapbyteLen) + if intMapbyteLen < 0 { + return ErrInvalidLengthMapsproto2Unsafe + } + postbytesIndex := iNdEx + intMapbyteLen + if postbytesIndex > l { + return io.ErrUnexpectedEOF + } + mapvalue := make([]byte, mapbyteLen) + copy(mapvalue, data[iNdEx:postbytesIndex]) + iNdEx = postbytesIndex + if m.StringToBytesMap == nil { + m.StringToBytesMap = make(map[string][]byte) + } + m.StringToBytesMap[mapkey] = mapvalue + iNdEx = postIndex + case 16: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field StringToEnumMap", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMapsproto2Unsafe + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var keykey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + keykey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var stringLenmapkey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLenmapkey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapkey := int(stringLenmapkey) + if intStringLenmapkey < 0 { + return ErrInvalidLengthMapsproto2Unsafe + } + postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey > l { + return io.ErrUnexpectedEOF + } + mapkey := string(data[iNdEx:postStringIndexmapkey]) + iNdEx = postStringIndexmapkey + var valuekey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + valuekey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapvalue MapEnum + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + mapvalue |= (MapEnum(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if m.StringToEnumMap == nil { + m.StringToEnumMap = make(map[string]MapEnum) + } + m.StringToEnumMap[mapkey] = mapvalue + iNdEx = postIndex + case 17: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field StringToMsgMap", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMapsproto2Unsafe + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var keykey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + keykey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var stringLenmapkey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLenmapkey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapkey := int(stringLenmapkey) + if intStringLenmapkey < 0 { + return ErrInvalidLengthMapsproto2Unsafe + } + postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey > l { + return io.ErrUnexpectedEOF + } + mapkey := string(data[iNdEx:postStringIndexmapkey]) + iNdEx = postStringIndexmapkey + var valuekey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + valuekey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapmsglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + mapmsglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if mapmsglen < 0 { + return ErrInvalidLengthMapsproto2Unsafe + } + postmsgIndex := iNdEx + mapmsglen + if mapmsglen < 0 { + return ErrInvalidLengthMapsproto2Unsafe + } + if postmsgIndex > l { + return io.ErrUnexpectedEOF + } + mapvalue := &FloatingPoint{} + if err := mapvalue.Unmarshal(data[iNdEx:postmsgIndex]); err != nil { + return err + } + iNdEx = postmsgIndex + if m.StringToMsgMap == nil { + m.StringToMsgMap = make(map[string]*FloatingPoint) + } + m.StringToMsgMap[mapkey] = mapvalue + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipMapsproto2Unsafe(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMapsproto2Unsafe + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipMapsproto2Unsafe(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, ErrIntOverflowMapsproto2Unsafe + } + 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, ErrIntOverflowMapsproto2Unsafe + } + 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, ErrIntOverflowMapsproto2Unsafe + } + 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, ErrInvalidLengthMapsproto2Unsafe + } + return iNdEx, nil + case 3: + for { + var innerWire uint64 + var start int = iNdEx + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowMapsproto2Unsafe + } + 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 := skipMapsproto2Unsafe(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 ( + ErrInvalidLengthMapsproto2Unsafe = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowMapsproto2Unsafe = fmt.Errorf("proto: integer overflow") +) + +var fileDescriptorMapsproto2 = []byte{ + // 970 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xec, 0x96, 0xbd, 0x4f, 0xeb, 0x56, + 0x18, 0xc6, 0x71, 0xbe, 0x73, 0xf2, 0xe5, 0x1c, 0x68, 0x15, 0x45, 0x6a, 0x5a, 0xd2, 0x56, 0x0a, + 0xa1, 0x4d, 0x68, 0x5a, 0x55, 0x15, 0xb4, 0x48, 0x04, 0x42, 0x53, 0x51, 0x28, 0x22, 0xfd, 0x96, + 0x90, 0x9a, 0x14, 0x27, 0x44, 0x4d, 0x62, 0x14, 0xdb, 0x55, 0xd9, 0xf8, 0x33, 0xba, 0x76, 0xeb, + 0xd8, 0xb1, 0xe3, 0x1d, 0x19, 0xef, 0xc8, 0x70, 0x07, 0xe0, 0x2e, 0x8c, 0x8c, 0x8c, 0xf7, 0xf8, + 0x1c, 0xdb, 0x39, 0xb6, 0x5f, 0xdb, 0xb9, 0xdb, 0x1d, 0x32, 0x1c, 0xd9, 0xe7, 0xe4, 0x7d, 0x7e, + 0xe7, 0x71, 0xec, 0xf3, 0xea, 0x41, 0xe5, 0xdf, 0xe5, 0x71, 0x4f, 0x56, 0xea, 0xda, 0x44, 0xe9, + 0xf6, 0xa5, 0x9e, 0xac, 0x9e, 0xd7, 0xc7, 0xdd, 0x0b, 0xe5, 0x62, 0x2a, 0xab, 0x72, 0xa3, 0x46, + 0x2f, 0x38, 0x65, 0xcc, 0xf4, 0x1f, 0x8a, 0x1f, 0x0f, 0x86, 0xea, 0xb9, 0xd6, 0xab, 0x11, 0x5d, + 0x7d, 0x20, 0x0f, 0xe4, 0x3a, 0xfd, 0xb1, 0xa7, 0xf5, 0xe9, 0x8c, 0x4e, 0xe8, 0x1d, 0xd3, 0x96, + 0xdf, 0x41, 0x99, 0xfd, 0x91, 0xdc, 0x55, 0x87, 0x93, 0xc1, 0xb1, 0x3c, 0x9c, 0xa8, 0x38, 0x8d, + 0x84, 0x7e, 0x41, 0x78, 0x4f, 0xa8, 0x08, 0x27, 0x42, 0xbf, 0x7c, 0x83, 0x51, 0x7c, 0x67, 0x34, + 0x3a, 0x24, 0x64, 0xfc, 0x0b, 0xca, 0x77, 0xd4, 0x29, 0x29, 0xfc, 0x5e, 0xde, 0x93, 0xb5, 0xde, + 0x48, 0x22, 0xab, 0xa4, 0x32, 0x5c, 0x49, 0x35, 0xd6, 0x6b, 0x9c, 0x85, 0x9a, 0x21, 0xa8, 0xb9, + 0xaa, 0x5b, 0x13, 0x75, 0x7a, 0x79, 0x92, 0x57, 0x9c, 0xeb, 0xf8, 0x47, 0x24, 0x9a, 0xc5, 0xd4, + 0x8d, 0x4e, 0x0e, 0x51, 0x72, 0xd5, 0x97, 0x6c, 0x16, 0x33, 0xb0, 0xa8, 0x38, 0x96, 0xf1, 0x36, + 0x4a, 0x7c, 0x33, 0x51, 0x3f, 0x6d, 0xe8, 0xbc, 0x30, 0xe5, 0x95, 0x41, 0x9e, 0x59, 0xc4, 0x38, + 0x89, 0xa1, 0x31, 0x35, 0xf4, 0x9f, 0x7f, 0xa6, 0xeb, 0x23, 0xfe, 0x7a, 0x5a, 0x34, 0xd3, 0xd3, + 0x29, 0xde, 0x41, 0xc9, 0x1f, 0x4c, 0x58, 0x21, 0x4a, 0x01, 0xef, 0x83, 0x00, 0xab, 0x8a, 0x11, + 0x92, 0x9a, 0x65, 0xc1, 0x40, 0x30, 0x0f, 0xb1, 0x00, 0x04, 0x67, 0x82, 0x22, 0x2c, 0x17, 0x1d, + 0xcb, 0x45, 0xdc, 0x07, 0xd1, 0x71, 0xb8, 0x50, 0x78, 0x17, 0x1d, 0xcb, 0x45, 0x22, 0x00, 0xc1, + 0xbb, 0x50, 0x2c, 0x17, 0x7b, 0x08, 0xed, 0x0f, 0xff, 0x92, 0xce, 0x98, 0x8d, 0x24, 0x65, 0x7c, + 0x00, 0x32, 0x66, 0x65, 0x0c, 0x82, 0xfa, 0xd6, 0x02, 0xfe, 0x1a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, 0x32, 0x6e, + 0xc8, 0xb8, 0xbd, 0x2b, 0x09, 0x0f, 0x64, 0x3c, 0x92, 0xf1, 0x44, 0xc6, 0xd5, 0x7d, 0x49, 0xf8, + 0x97, 0x8c, 0xff, 0xc8, 0xf8, 0x9f, 0x8c, 0x67, 0x64, 0x5c, 0xdf, 0x93, 0x7a, 0x32, 0x6e, 0xc9, + 0xfd, 0x03, 0xb9, 0x3e, 0x92, 0xeb, 0x13, 0x19, 0x57, 0x2f, 0x4b, 0xc2, 0xab, 0x00, 0x00, 0x00, + 0xff, 0xff, 0x41, 0x47, 0x97, 0x39, 0x2a, 0x14, 0x00, 0x00, +} diff --git a/vendor/github.com/gogo/protobuf/test/mapsproto2/combos/unsafeboth/mapsproto2.proto b/vendor/github.com/gogo/protobuf/test/mapsproto2/combos/unsafeboth/mapsproto2.proto new file mode 100644 index 000000000..6bcbeaba3 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/mapsproto2/combos/unsafeboth/mapsproto2.proto @@ -0,0 +1,115 @@ +// Copyright (c) 2013, Vastech SA (PTY) LTD. All rights reserved. +// http://github.com/gogo/protobuf/gogoproto +// +// Go support for Protocol Buffers - Google's data interchange format +// +// Copyright 2014 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. + +syntax = "proto2"; + +package proto2.maps; + +import "github.com/gogo/protobuf/gogoproto/gogo.proto"; + +option (gogoproto.goproto_stringer_all) = false; +option (gogoproto.goproto_enum_prefix_all) = false; +option (gogoproto.goproto_getters_all) = false; + +option (gogoproto.equal_all) = true; +option (gogoproto.verbose_equal_all) = true; +option (gogoproto.stringer_all) = true; +option (gogoproto.gostring_all) = true; +option (gogoproto.face_all) = true; +option (gogoproto.description_all) = true; + +option (gogoproto.testgen_all) = true; +option (gogoproto.populate_all) = true; +option (gogoproto.benchgen_all) = true; +option (gogoproto.unmarshaler_all) = false; +option (gogoproto.marshaler_all) = false; +option (gogoproto.sizer_all) = true; + +option (gogoproto.goproto_enum_stringer_all) = false; +option (gogoproto.enum_stringer_all) = true; + +option (gogoproto.unsafe_marshaler_all) = true; +option (gogoproto.unsafe_unmarshaler_all) = true; + +message FloatingPoint { + optional double f = 1; +} + +enum MapEnum { + MA = 0; + MB = 1; + MC = 2; +} + +message AllMaps { + map StringToDoubleMap = 1; + map StringToFloatMap = 2; + map Int32Map = 3; + map Int64Map = 4; + map Uint32Map = 5; + map Uint64Map = 6; + map Sint32Map = 7; + map Sint64Map = 8; + map Fixed32Map = 9; + map Sfixed32Map = 10; + map Fixed64Map = 11; + map Sfixed64Map = 12; + map BoolMap = 13; + map StringMap = 14; + map StringToBytesMap = 15; + map StringToEnumMap = 16; + map StringToMsgMap = 17; +} + +message AllMapsOrdered { + option (gogoproto.stable_marshaler) = true; + + map StringToDoubleMap = 1; + map StringToFloatMap = 2; + map Int32Map = 3; + map Int64Map = 4; + map Uint32Map = 5; + map Uint64Map = 6; + map Sint32Map = 7; + map Sint64Map = 8; + map Fixed32Map = 9; + map Sfixed32Map = 10; + map Fixed64Map = 11; + map Sfixed64Map = 12; + map BoolMap = 13; + map StringMap = 14; + map StringToBytesMap = 15; + map StringToEnumMap = 16; + map StringToMsgMap = 17; +} diff --git a/vendor/github.com/gogo/protobuf/test/mapsproto2/combos/unsafeboth/mapsproto2pb_test.go b/vendor/github.com/gogo/protobuf/test/mapsproto2/combos/unsafeboth/mapsproto2pb_test.go new file mode 100644 index 000000000..a9b09af78 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/mapsproto2/combos/unsafeboth/mapsproto2pb_test.go @@ -0,0 +1,752 @@ +// Code generated by protoc-gen-gogo. +// source: combos/unsafeboth/mapsproto2.proto +// DO NOT EDIT! + +/* +Package proto2_maps is a generated protocol buffer package. + +It is generated from these files: + combos/unsafeboth/mapsproto2.proto + +It has these top-level messages: + FloatingPoint + AllMaps + AllMapsOrdered +*/ +package proto2_maps + +import testing "testing" +import math_rand "math/rand" +import time "time" +import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" +import github_com_gogo_protobuf_jsonpb "github.com/gogo/protobuf/jsonpb" +import fmt "fmt" +import go_parser "go/parser" +import proto "github.com/gogo/protobuf/proto" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +func TestFloatingPointProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedFloatingPoint(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &FloatingPoint{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestFloatingPointMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedFloatingPoint(popr, false) + size := p.Size() + data := make([]byte, size) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(data) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &FloatingPoint{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkFloatingPointProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*FloatingPoint, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedFloatingPoint(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkFloatingPointProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedFloatingPoint(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &FloatingPoint{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestAllMapsProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAllMaps(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &AllMaps{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestAllMapsMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAllMaps(popr, false) + size := p.Size() + data := make([]byte, size) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(data) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &AllMaps{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkAllMapsProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*AllMaps, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedAllMaps(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkAllMapsProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedAllMaps(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &AllMaps{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestAllMapsOrderedProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAllMapsOrdered(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &AllMapsOrdered{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestAllMapsOrderedMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAllMapsOrdered(popr, false) + size := p.Size() + data := make([]byte, size) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(data) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &AllMapsOrdered{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkAllMapsOrderedProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*AllMapsOrdered, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedAllMapsOrdered(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkAllMapsOrderedProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedAllMapsOrdered(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &AllMapsOrdered{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestFloatingPointJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedFloatingPoint(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &FloatingPoint{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestAllMapsJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAllMaps(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &AllMaps{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestAllMapsOrderedJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAllMapsOrdered(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &AllMapsOrdered{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestFloatingPointProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedFloatingPoint(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &FloatingPoint{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestFloatingPointProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedFloatingPoint(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &FloatingPoint{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestAllMapsProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAllMaps(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &AllMaps{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestAllMapsProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAllMaps(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &AllMaps{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestAllMapsOrderedProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAllMapsOrdered(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &AllMapsOrdered{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestAllMapsOrderedProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAllMapsOrdered(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &AllMapsOrdered{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestMapsproto2Description(t *testing.T) { + Mapsproto2Description() +} +func TestFloatingPointVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedFloatingPoint(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &FloatingPoint{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestAllMapsVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAllMaps(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &AllMaps{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestAllMapsOrderedVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAllMapsOrdered(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &AllMapsOrdered{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestFloatingPointFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedFloatingPoint(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestAllMapsFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAllMaps(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestAllMapsOrderedFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAllMapsOrdered(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestFloatingPointGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedFloatingPoint(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestAllMapsGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAllMaps(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestAllMapsOrderedGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAllMapsOrdered(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestFloatingPointSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedFloatingPoint(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkFloatingPointSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*FloatingPoint, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedFloatingPoint(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestAllMapsSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAllMaps(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkAllMapsSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*AllMaps, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedAllMaps(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestAllMapsOrderedSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAllMapsOrdered(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkAllMapsOrderedSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*AllMapsOrdered, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedAllMapsOrdered(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestFloatingPointStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedFloatingPoint(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestAllMapsStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAllMaps(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestAllMapsOrderedStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAllMapsOrdered(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} + +//These tests are generated by github.com/gogo/protobuf/plugin/testgen diff --git a/vendor/github.com/gogo/protobuf/test/mapsproto2/combos/unsafemarshaler/mapsproto2.pb.go b/vendor/github.com/gogo/protobuf/test/mapsproto2/combos/unsafemarshaler/mapsproto2.pb.go new file mode 100644 index 000000000..27b44ea45 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/mapsproto2/combos/unsafemarshaler/mapsproto2.pb.go @@ -0,0 +1,3930 @@ +// Code generated by protoc-gen-gogo. +// source: combos/unsafemarshaler/mapsproto2.proto +// DO NOT EDIT! + +/* +Package proto2_maps is a generated protocol buffer package. + +It is generated from these files: + combos/unsafemarshaler/mapsproto2.proto + +It has these top-level messages: + FloatingPoint + AllMaps + AllMapsOrdered +*/ +package proto2_maps + +import proto "github.com/gogo/protobuf/proto" +import fmt "fmt" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" + +import github_com_gogo_protobuf_protoc_gen_gogo_descriptor "github.com/gogo/protobuf/protoc-gen-gogo/descriptor" +import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" +import compress_gzip "compress/gzip" +import bytes "bytes" +import io_ioutil "io/ioutil" + +import strconv "strconv" + +import strings "strings" +import sort "sort" +import reflect "reflect" +import github_com_gogo_protobuf_sortkeys "github.com/gogo/protobuf/sortkeys" + +import unsafe "unsafe" +import errors "errors" + +// 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. +const _ = proto.GoGoProtoPackageIsVersion1 + +type MapEnum int32 + +const ( + MA MapEnum = 0 + MB MapEnum = 1 + MC MapEnum = 2 +) + +var MapEnum_name = map[int32]string{ + 0: "MA", + 1: "MB", + 2: "MC", +} +var MapEnum_value = map[string]int32{ + "MA": 0, + "MB": 1, + "MC": 2, +} + +func (x MapEnum) Enum() *MapEnum { + p := new(MapEnum) + *p = x + return p +} +func (x MapEnum) MarshalJSON() ([]byte, error) { + return proto.MarshalJSONEnum(MapEnum_name, int32(x)) +} +func (x *MapEnum) UnmarshalJSON(data []byte) error { + value, err := proto.UnmarshalJSONEnum(MapEnum_value, data, "MapEnum") + if err != nil { + return err + } + *x = MapEnum(value) + return nil +} +func (MapEnum) EnumDescriptor() ([]byte, []int) { return fileDescriptorMapsproto2, []int{0} } + +type FloatingPoint struct { + F *float64 `protobuf:"fixed64,1,opt,name=f" json:"f,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *FloatingPoint) Reset() { *m = FloatingPoint{} } +func (*FloatingPoint) ProtoMessage() {} +func (*FloatingPoint) Descriptor() ([]byte, []int) { return fileDescriptorMapsproto2, []int{0} } + +type AllMaps struct { + StringToDoubleMap map[string]float64 `protobuf:"bytes,1,rep,name=StringToDoubleMap,json=stringToDoubleMap" json:"StringToDoubleMap,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"fixed64,2,opt,name=value"` + StringToFloatMap map[string]float32 `protobuf:"bytes,2,rep,name=StringToFloatMap,json=stringToFloatMap" json:"StringToFloatMap,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"fixed32,2,opt,name=value"` + Int32Map map[int32]int32 `protobuf:"bytes,3,rep,name=Int32Map,json=int32Map" json:"Int32Map,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"varint,2,opt,name=value"` + Int64Map map[int64]int64 `protobuf:"bytes,4,rep,name=Int64Map,json=int64Map" json:"Int64Map,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"varint,2,opt,name=value"` + Uint32Map map[uint32]uint32 `protobuf:"bytes,5,rep,name=Uint32Map,json=uint32Map" json:"Uint32Map,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"varint,2,opt,name=value"` + Uint64Map map[uint64]uint64 `protobuf:"bytes,6,rep,name=Uint64Map,json=uint64Map" json:"Uint64Map,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"varint,2,opt,name=value"` + Sint32Map map[int32]int32 `protobuf:"bytes,7,rep,name=Sint32Map,json=sint32Map" json:"Sint32Map,omitempty" protobuf_key:"zigzag32,1,opt,name=key" protobuf_val:"zigzag32,2,opt,name=value"` + Sint64Map map[int64]int64 `protobuf:"bytes,8,rep,name=Sint64Map,json=sint64Map" json:"Sint64Map,omitempty" protobuf_key:"zigzag64,1,opt,name=key" protobuf_val:"zigzag64,2,opt,name=value"` + Fixed32Map map[uint32]uint32 `protobuf:"bytes,9,rep,name=Fixed32Map,json=fixed32Map" json:"Fixed32Map,omitempty" protobuf_key:"fixed32,1,opt,name=key" protobuf_val:"fixed32,2,opt,name=value"` + Sfixed32Map map[int32]int32 `protobuf:"bytes,10,rep,name=Sfixed32Map,json=sfixed32Map" json:"Sfixed32Map,omitempty" protobuf_key:"fixed32,1,opt,name=key" protobuf_val:"fixed32,2,opt,name=value"` + Fixed64Map map[uint64]uint64 `protobuf:"bytes,11,rep,name=Fixed64Map,json=fixed64Map" json:"Fixed64Map,omitempty" protobuf_key:"fixed64,1,opt,name=key" protobuf_val:"fixed64,2,opt,name=value"` + Sfixed64Map map[int64]int64 `protobuf:"bytes,12,rep,name=Sfixed64Map,json=sfixed64Map" json:"Sfixed64Map,omitempty" protobuf_key:"fixed64,1,opt,name=key" protobuf_val:"fixed64,2,opt,name=value"` + BoolMap map[bool]bool `protobuf:"bytes,13,rep,name=BoolMap,json=boolMap" json:"BoolMap,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"varint,2,opt,name=value"` + StringMap map[string]string `protobuf:"bytes,14,rep,name=StringMap,json=stringMap" json:"StringMap,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + StringToBytesMap map[string][]byte `protobuf:"bytes,15,rep,name=StringToBytesMap,json=stringToBytesMap" json:"StringToBytesMap,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + StringToEnumMap map[string]MapEnum `protobuf:"bytes,16,rep,name=StringToEnumMap,json=stringToEnumMap" json:"StringToEnumMap,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"varint,2,opt,name=value,enum=proto2.maps.MapEnum"` + StringToMsgMap map[string]*FloatingPoint `protobuf:"bytes,17,rep,name=StringToMsgMap,json=stringToMsgMap" json:"StringToMsgMap,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *AllMaps) Reset() { *m = AllMaps{} } +func (*AllMaps) ProtoMessage() {} +func (*AllMaps) Descriptor() ([]byte, []int) { return fileDescriptorMapsproto2, []int{1} } + +type AllMapsOrdered struct { + StringToDoubleMap map[string]float64 `protobuf:"bytes,1,rep,name=StringToDoubleMap,json=stringToDoubleMap" json:"StringToDoubleMap,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"fixed64,2,opt,name=value"` + StringToFloatMap map[string]float32 `protobuf:"bytes,2,rep,name=StringToFloatMap,json=stringToFloatMap" json:"StringToFloatMap,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"fixed32,2,opt,name=value"` + Int32Map map[int32]int32 `protobuf:"bytes,3,rep,name=Int32Map,json=int32Map" json:"Int32Map,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"varint,2,opt,name=value"` + Int64Map map[int64]int64 `protobuf:"bytes,4,rep,name=Int64Map,json=int64Map" json:"Int64Map,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"varint,2,opt,name=value"` + Uint32Map map[uint32]uint32 `protobuf:"bytes,5,rep,name=Uint32Map,json=uint32Map" json:"Uint32Map,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"varint,2,opt,name=value"` + Uint64Map map[uint64]uint64 `protobuf:"bytes,6,rep,name=Uint64Map,json=uint64Map" json:"Uint64Map,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"varint,2,opt,name=value"` + Sint32Map map[int32]int32 `protobuf:"bytes,7,rep,name=Sint32Map,json=sint32Map" json:"Sint32Map,omitempty" protobuf_key:"zigzag32,1,opt,name=key" protobuf_val:"zigzag32,2,opt,name=value"` + Sint64Map map[int64]int64 `protobuf:"bytes,8,rep,name=Sint64Map,json=sint64Map" json:"Sint64Map,omitempty" protobuf_key:"zigzag64,1,opt,name=key" protobuf_val:"zigzag64,2,opt,name=value"` + Fixed32Map map[uint32]uint32 `protobuf:"bytes,9,rep,name=Fixed32Map,json=fixed32Map" json:"Fixed32Map,omitempty" protobuf_key:"fixed32,1,opt,name=key" protobuf_val:"fixed32,2,opt,name=value"` + Sfixed32Map map[int32]int32 `protobuf:"bytes,10,rep,name=Sfixed32Map,json=sfixed32Map" json:"Sfixed32Map,omitempty" protobuf_key:"fixed32,1,opt,name=key" protobuf_val:"fixed32,2,opt,name=value"` + Fixed64Map map[uint64]uint64 `protobuf:"bytes,11,rep,name=Fixed64Map,json=fixed64Map" json:"Fixed64Map,omitempty" protobuf_key:"fixed64,1,opt,name=key" protobuf_val:"fixed64,2,opt,name=value"` + Sfixed64Map map[int64]int64 `protobuf:"bytes,12,rep,name=Sfixed64Map,json=sfixed64Map" json:"Sfixed64Map,omitempty" protobuf_key:"fixed64,1,opt,name=key" protobuf_val:"fixed64,2,opt,name=value"` + BoolMap map[bool]bool `protobuf:"bytes,13,rep,name=BoolMap,json=boolMap" json:"BoolMap,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"varint,2,opt,name=value"` + StringMap map[string]string `protobuf:"bytes,14,rep,name=StringMap,json=stringMap" json:"StringMap,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + StringToBytesMap map[string][]byte `protobuf:"bytes,15,rep,name=StringToBytesMap,json=stringToBytesMap" json:"StringToBytesMap,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + StringToEnumMap map[string]MapEnum `protobuf:"bytes,16,rep,name=StringToEnumMap,json=stringToEnumMap" json:"StringToEnumMap,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"varint,2,opt,name=value,enum=proto2.maps.MapEnum"` + StringToMsgMap map[string]*FloatingPoint `protobuf:"bytes,17,rep,name=StringToMsgMap,json=stringToMsgMap" json:"StringToMsgMap,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *AllMapsOrdered) Reset() { *m = AllMapsOrdered{} } +func (*AllMapsOrdered) ProtoMessage() {} +func (*AllMapsOrdered) Descriptor() ([]byte, []int) { return fileDescriptorMapsproto2, []int{2} } + +func init() { + proto.RegisterType((*FloatingPoint)(nil), "proto2.maps.FloatingPoint") + proto.RegisterType((*AllMaps)(nil), "proto2.maps.AllMaps") + proto.RegisterType((*AllMapsOrdered)(nil), "proto2.maps.AllMapsOrdered") + proto.RegisterEnum("proto2.maps.MapEnum", MapEnum_name, MapEnum_value) +} +func (this *FloatingPoint) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return Mapsproto2Description() +} +func (this *AllMaps) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return Mapsproto2Description() +} +func (this *AllMapsOrdered) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return Mapsproto2Description() +} +func Mapsproto2Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + d := &github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet{} + var gzipped = []byte{ + // 4104 bytes of a gzipped FileDescriptorSet + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xec, 0x5a, 0x5b, 0x6c, 0x23, 0xe7, + 0x75, 0x36, 0xef, 0xe4, 0x21, 0x45, 0x8e, 0x46, 0xf2, 0x9a, 0x56, 0xec, 0x5d, 0x2f, 0x6d, 0xc7, + 0x6b, 0x39, 0x91, 0x1c, 0x25, 0xb6, 0xd7, 0x74, 0x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, 0xa6, 0xd5, 0x7e, 0xea, 0x78, 0x47, 0xab, 0x6d, + 0xa1, 0xff, 0x24, 0xd9, 0x61, 0x6d, 0xfd, 0x08, 0x65, 0x89, 0xca, 0x32, 0x2c, 0x86, 0xe5, 0x99, + 0xb0, 0x95, 0x51, 0xf9, 0x62, 0x0c, 0x16, 0x42, 0x52, 0x66, 0xe8, 0x2a, 0xfa, 0x24, 0xa4, 0x58, + 0xa4, 0xb1, 0x22, 0xf2, 0x60, 0x68, 0xee, 0xa5, 0x71, 0x37, 0x56, 0x48, 0x28, 0x4e, 0x2e, 0xa4, + 0x89, 0x09, 0x85, 0x94, 0x50, 0x8c, 0x85, 0xd3, 0xab, 0x31, 0x28, 0x4f, 0xe2, 0x8e, 0x58, 0xef, + 0x71, 0xdf, 0x7a, 0x7f, 0x22, 0x68, 0xc0, 0xe5, 0xc9, 0xcf, 0x30, 0x66, 0xc5, 0x5b, 0x31, 0xb8, + 0x10, 0xde, 0x6f, 0x84, 0xda, 0xf0, 0x24, 0xa4, 0x7b, 0x86, 0x7b, 0x6a, 0x8b, 0x9a, 0xfb, 0xc1, + 0x90, 0x4c, 0x4e, 0x86, 0x83, 0xbe, 0xe2, 0x28, 0xb9, 0x14, 0x24, 0x26, 0x35, 0x0d, 0xcc, 0x9a, + 0x31, 0x4b, 0x3f, 0x13, 0x87, 0xdb, 0x43, 0xc9, 0x43, 0x0d, 0xbd, 0x1b, 0xa0, 0x6b, 0xf5, 0x87, + 0x2e, 0xab, 0xab, 0x2c, 0xcd, 0xe4, 0xa8, 0x84, 0x2e, 0x61, 0x92, 0x42, 0x86, 0xae, 0x37, 0x9e, + 0xa0, 0xe3, 0xc0, 0x44, 0x54, 0xe1, 0xea, 0xc8, 0xd0, 0x24, 0x35, 0xf4, 0xe2, 0x84, 0x27, 0x1d, + 0x2b, 0x59, 0x0f, 0x83, 0xd2, 0x34, 0xbb, 0x86, 0xe5, 0x36, 0x1c, 0x77, 0x60, 0xe8, 0xbd, 0xae, + 0xd5, 0xa1, 0x79, 0x34, 0x5b, 0x4d, 0xb5, 0x75, 0xd3, 0x31, 0xb4, 0x12, 0x1b, 0xae, 0x8b, 0x51, + 0x82, 0xa0, 0xc5, 0x62, 0x20, 0x21, 0xd2, 0x3e, 0x04, 0x1b, 0xf6, 0x10, 0x95, 0x7f, 0xce, 0x40, + 0x5e, 0xea, 0xce, 0xd4, 0xcb, 0x50, 0x78, 0x41, 0x7f, 0x49, 0x6f, 0x88, 0x8e, 0x9b, 0x79, 0x22, + 0x4f, 0x64, 0x87, 0xbc, 0xeb, 0x7e, 0x18, 0x16, 0xa9, 0x0a, 0x3e, 0x23, 0xde, 0xa8, 0x69, 0xea, + 0x8e, 0x43, 0x9d, 0x96, 0xa5, 0xaa, 0x2a, 0x19, 0x3b, 0x20, 0x43, 0x9b, 0x62, 0x44, 0x7d, 0x04, + 0x16, 0x28, 0xa2, 0x87, 0x89, 0xb7, 0xdb, 0x37, 0x8d, 0x06, 0xd9, 0x03, 0x38, 0x34, 0x9f, 0x7a, + 0x96, 0xcd, 0x13, 0x8d, 0x3d, 0xae, 0x40, 0x2c, 0x72, 0xd4, 0x6d, 0xb8, 0x9b, 0xc2, 0x3a, 0x86, + 0x65, 0x0c, 0x74, 0xd7, 0x68, 0x18, 0x3f, 0x3b, 0x44, 0xdd, 0x86, 0x6e, 0xb5, 0x1a, 0xa7, 0xba, + 0x73, 0x5a, 0x5e, 0x94, 0x09, 0xee, 0x24, 0xba, 0xdb, 0x5c, 0xb5, 0x46, 0x35, 0xd7, 0xad, 0xd6, + 0x75, 0xd4, 0x53, 0xab, 0x70, 0x81, 0x12, 0xa1, 0x53, 0xf0, 0x99, 0x1b, 0xcd, 0x53, 0xa3, 0xf9, + 0x62, 0x63, 0xe8, 0xb6, 0xaf, 0x96, 0x3f, 0x20, 0x33, 0x50, 0x23, 0xeb, 0x54, 0x67, 0x93, 0xa8, + 0x1c, 0xa3, 0x86, 0x5a, 0x87, 0x02, 0x99, 0x8f, 0x5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x0f, 0x37, 0x87, + 0x11, 0x61, 0xd1, 0xd9, 0xb0, 0x6d, 0xa2, 0x59, 0x9e, 0xa3, 0x24, 0x97, 0x43, 0x49, 0xb8, 0x0e, + 0x23, 0xc8, 0x9c, 0xb0, 0x2b, 0x3a, 0x3b, 0x34, 0xf4, 0x09, 0xbc, 0x38, 0x6d, 0x76, 0x84, 0x96, + 0x98, 0x1d, 0x71, 0x2d, 0xaf, 0xc0, 0x8d, 0x33, 0xec, 0xf3, 0x08, 0x53, 0x69, 0x86, 0x15, 0x28, + 0x94, 0x03, 0x2b, 0x50, 0x88, 0xd5, 0x3a, 0x94, 0x84, 0x2a, 0xd9, 0x91, 0x13, 0x5a, 0x85, 0xbf, + 0xe2, 0x35, 0x8d, 0x96, 0xeb, 0x32, 0xd6, 0x92, 0xe3, 0x97, 0xaa, 0x87, 0x50, 0x14, 0x8a, 0x7b, + 0x0e, 0x7d, 0xe8, 0x79, 0xfe, 0xbb, 0xc1, 0x34, 0x4e, 0xa6, 0xca, 0x28, 0x8b, 0x8e, 0x4f, 0xb8, + 0xb4, 0x05, 0x17, 0xc2, 0xb3, 0x15, 0x79, 0x3d, 0x14, 0x33, 0x3e, 0x7f, 0x97, 0x87, 0x7c, 0x25, + 0xaf, 0x91, 0x8a, 0x77, 0xd5, 0x48, 0x96, 0x64, 0x17, 0xd5, 0xf8, 0xd5, 0xd8, 0xd2, 0x26, 0xdc, + 0x1e, 0x9a, 0x99, 0xa2, 0x48, 0xe2, 0x32, 0xc9, 0x13, 0x30, 0xe7, 0x4b, 0x47, 0x32, 0x38, 0x15, + 0x02, 0x4e, 0x8d, 0x83, 0x47, 0x41, 0x26, 0x83, 0x13, 0x21, 0xe0, 0x84, 0x0c, 0xfe, 0x38, 0x14, + 0xfd, 0x79, 0x48, 0x46, 0xcf, 0x85, 0xa0, 0xe7, 0x42, 0xd0, 0xe1, 0xf7, 0x4e, 0x86, 0xa0, 0x93, + 0x01, 0x74, 0x7d, 0xe2, 0xbd, 0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b, + 0x9f, 0x1f, 0xe0, 0xe7, 0x95, 0xef, 0x5d, 0x8c, 0x7d, 0x09, 0x3f, 0x5f, 0xc5, 0xcf, 0x5f, 0xe3, + 0xe7, 0xeb, 0xf8, 0xf9, 0xe6, 0xf7, 0x50, 0x1f, 0x3f, 0xdf, 0xc1, 0xef, 0xef, 0xe0, 0xff, 0x77, + 0xf1, 0xff, 0x0f, 0xf0, 0xf3, 0xca, 0xbf, 0x5c, 0xbc, 0xed, 0xff, 0x02, 0x00, 0x00, 0xff, 0xff, + 0x40, 0xb7, 0xf5, 0x58, 0x9c, 0x3e, 0x00, 0x00, + } + r := bytes.NewReader(gzipped) + gzipr, err := compress_gzip.NewReader(r) + if err != nil { + panic(err) + } + ungzipped, err := io_ioutil.ReadAll(gzipr) + if err != nil { + panic(err) + } + if err := github_com_gogo_protobuf_proto.Unmarshal(ungzipped, d); err != nil { + panic(err) + } + return d +} +func (x MapEnum) String() string { + s, ok := MapEnum_name[int32(x)] + if ok { + return s + } + return strconv.Itoa(int(x)) +} +func (this *FloatingPoint) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*FloatingPoint) + if !ok { + that2, ok := that.(FloatingPoint) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *FloatingPoint") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *FloatingPoint but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *FloatingPoint but is not nil && this == nil") + } + if this.F != nil && that1.F != nil { + if *this.F != *that1.F { + return fmt.Errorf("F this(%v) Not Equal that(%v)", *this.F, *that1.F) + } + } else if this.F != nil { + return fmt.Errorf("this.F == nil && that.F != nil") + } else if that1.F != nil { + return fmt.Errorf("F this(%v) Not Equal that(%v)", this.F, that1.F) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *FloatingPoint) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*FloatingPoint) + if !ok { + that2, ok := that.(FloatingPoint) + 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.F != nil && that1.F != nil { + if *this.F != *that1.F { + return false + } + } else if this.F != nil { + return false + } else if that1.F != nil { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *AllMaps) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*AllMaps) + if !ok { + that2, ok := that.(AllMaps) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *AllMaps") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *AllMaps but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *AllMaps but is not nil && this == nil") + } + if len(this.StringToDoubleMap) != len(that1.StringToDoubleMap) { + return fmt.Errorf("StringToDoubleMap this(%v) Not Equal that(%v)", len(this.StringToDoubleMap), len(that1.StringToDoubleMap)) + } + for i := range this.StringToDoubleMap { + if this.StringToDoubleMap[i] != that1.StringToDoubleMap[i] { + return fmt.Errorf("StringToDoubleMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringToDoubleMap[i], i, that1.StringToDoubleMap[i]) + } + } + if len(this.StringToFloatMap) != len(that1.StringToFloatMap) { + return fmt.Errorf("StringToFloatMap this(%v) Not Equal that(%v)", len(this.StringToFloatMap), len(that1.StringToFloatMap)) + } + for i := range this.StringToFloatMap { + if this.StringToFloatMap[i] != that1.StringToFloatMap[i] { + return fmt.Errorf("StringToFloatMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringToFloatMap[i], i, that1.StringToFloatMap[i]) + } + } + if len(this.Int32Map) != len(that1.Int32Map) { + return fmt.Errorf("Int32Map this(%v) Not Equal that(%v)", len(this.Int32Map), len(that1.Int32Map)) + } + for i := range this.Int32Map { + if this.Int32Map[i] != that1.Int32Map[i] { + return fmt.Errorf("Int32Map this[%v](%v) Not Equal that[%v](%v)", i, this.Int32Map[i], i, that1.Int32Map[i]) + } + } + if len(this.Int64Map) != len(that1.Int64Map) { + return fmt.Errorf("Int64Map this(%v) Not Equal that(%v)", len(this.Int64Map), len(that1.Int64Map)) + } + for i := range this.Int64Map { + if this.Int64Map[i] != that1.Int64Map[i] { + return fmt.Errorf("Int64Map this[%v](%v) Not Equal that[%v](%v)", i, this.Int64Map[i], i, that1.Int64Map[i]) + } + } + if len(this.Uint32Map) != len(that1.Uint32Map) { + return fmt.Errorf("Uint32Map this(%v) Not Equal that(%v)", len(this.Uint32Map), len(that1.Uint32Map)) + } + for i := range this.Uint32Map { + if this.Uint32Map[i] != that1.Uint32Map[i] { + return fmt.Errorf("Uint32Map this[%v](%v) Not Equal that[%v](%v)", i, this.Uint32Map[i], i, that1.Uint32Map[i]) + } + } + if len(this.Uint64Map) != len(that1.Uint64Map) { + return fmt.Errorf("Uint64Map this(%v) Not Equal that(%v)", len(this.Uint64Map), len(that1.Uint64Map)) + } + for i := range this.Uint64Map { + if this.Uint64Map[i] != that1.Uint64Map[i] { + return fmt.Errorf("Uint64Map this[%v](%v) Not Equal that[%v](%v)", i, this.Uint64Map[i], i, that1.Uint64Map[i]) + } + } + if len(this.Sint32Map) != len(that1.Sint32Map) { + return fmt.Errorf("Sint32Map this(%v) Not Equal that(%v)", len(this.Sint32Map), len(that1.Sint32Map)) + } + for i := range this.Sint32Map { + if this.Sint32Map[i] != that1.Sint32Map[i] { + return fmt.Errorf("Sint32Map this[%v](%v) Not Equal that[%v](%v)", i, this.Sint32Map[i], i, that1.Sint32Map[i]) + } + } + if len(this.Sint64Map) != len(that1.Sint64Map) { + return fmt.Errorf("Sint64Map this(%v) Not Equal that(%v)", len(this.Sint64Map), len(that1.Sint64Map)) + } + for i := range this.Sint64Map { + if this.Sint64Map[i] != that1.Sint64Map[i] { + return fmt.Errorf("Sint64Map this[%v](%v) Not Equal that[%v](%v)", i, this.Sint64Map[i], i, that1.Sint64Map[i]) + } + } + if len(this.Fixed32Map) != len(that1.Fixed32Map) { + return fmt.Errorf("Fixed32Map this(%v) Not Equal that(%v)", len(this.Fixed32Map), len(that1.Fixed32Map)) + } + for i := range this.Fixed32Map { + if this.Fixed32Map[i] != that1.Fixed32Map[i] { + return fmt.Errorf("Fixed32Map this[%v](%v) Not Equal that[%v](%v)", i, this.Fixed32Map[i], i, that1.Fixed32Map[i]) + } + } + if len(this.Sfixed32Map) != len(that1.Sfixed32Map) { + return fmt.Errorf("Sfixed32Map this(%v) Not Equal that(%v)", len(this.Sfixed32Map), len(that1.Sfixed32Map)) + } + for i := range this.Sfixed32Map { + if this.Sfixed32Map[i] != that1.Sfixed32Map[i] { + return fmt.Errorf("Sfixed32Map this[%v](%v) Not Equal that[%v](%v)", i, this.Sfixed32Map[i], i, that1.Sfixed32Map[i]) + } + } + if len(this.Fixed64Map) != len(that1.Fixed64Map) { + return fmt.Errorf("Fixed64Map this(%v) Not Equal that(%v)", len(this.Fixed64Map), len(that1.Fixed64Map)) + } + for i := range this.Fixed64Map { + if this.Fixed64Map[i] != that1.Fixed64Map[i] { + return fmt.Errorf("Fixed64Map this[%v](%v) Not Equal that[%v](%v)", i, this.Fixed64Map[i], i, that1.Fixed64Map[i]) + } + } + if len(this.Sfixed64Map) != len(that1.Sfixed64Map) { + return fmt.Errorf("Sfixed64Map this(%v) Not Equal that(%v)", len(this.Sfixed64Map), len(that1.Sfixed64Map)) + } + for i := range this.Sfixed64Map { + if this.Sfixed64Map[i] != that1.Sfixed64Map[i] { + return fmt.Errorf("Sfixed64Map this[%v](%v) Not Equal that[%v](%v)", i, this.Sfixed64Map[i], i, that1.Sfixed64Map[i]) + } + } + if len(this.BoolMap) != len(that1.BoolMap) { + return fmt.Errorf("BoolMap this(%v) Not Equal that(%v)", len(this.BoolMap), len(that1.BoolMap)) + } + for i := range this.BoolMap { + if this.BoolMap[i] != that1.BoolMap[i] { + return fmt.Errorf("BoolMap this[%v](%v) Not Equal that[%v](%v)", i, this.BoolMap[i], i, that1.BoolMap[i]) + } + } + if len(this.StringMap) != len(that1.StringMap) { + return fmt.Errorf("StringMap this(%v) Not Equal that(%v)", len(this.StringMap), len(that1.StringMap)) + } + for i := range this.StringMap { + if this.StringMap[i] != that1.StringMap[i] { + return fmt.Errorf("StringMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringMap[i], i, that1.StringMap[i]) + } + } + if len(this.StringToBytesMap) != len(that1.StringToBytesMap) { + return fmt.Errorf("StringToBytesMap this(%v) Not Equal that(%v)", len(this.StringToBytesMap), len(that1.StringToBytesMap)) + } + for i := range this.StringToBytesMap { + if !bytes.Equal(this.StringToBytesMap[i], that1.StringToBytesMap[i]) { + return fmt.Errorf("StringToBytesMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringToBytesMap[i], i, that1.StringToBytesMap[i]) + } + } + if len(this.StringToEnumMap) != len(that1.StringToEnumMap) { + return fmt.Errorf("StringToEnumMap this(%v) Not Equal that(%v)", len(this.StringToEnumMap), len(that1.StringToEnumMap)) + } + for i := range this.StringToEnumMap { + if this.StringToEnumMap[i] != that1.StringToEnumMap[i] { + return fmt.Errorf("StringToEnumMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringToEnumMap[i], i, that1.StringToEnumMap[i]) + } + } + if len(this.StringToMsgMap) != len(that1.StringToMsgMap) { + return fmt.Errorf("StringToMsgMap this(%v) Not Equal that(%v)", len(this.StringToMsgMap), len(that1.StringToMsgMap)) + } + for i := range this.StringToMsgMap { + if !this.StringToMsgMap[i].Equal(that1.StringToMsgMap[i]) { + return fmt.Errorf("StringToMsgMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringToMsgMap[i], i, that1.StringToMsgMap[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *AllMaps) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*AllMaps) + if !ok { + that2, ok := that.(AllMaps) + 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.StringToDoubleMap) != len(that1.StringToDoubleMap) { + return false + } + for i := range this.StringToDoubleMap { + if this.StringToDoubleMap[i] != that1.StringToDoubleMap[i] { + return false + } + } + if len(this.StringToFloatMap) != len(that1.StringToFloatMap) { + return false + } + for i := range this.StringToFloatMap { + if this.StringToFloatMap[i] != that1.StringToFloatMap[i] { + return false + } + } + if len(this.Int32Map) != len(that1.Int32Map) { + return false + } + for i := range this.Int32Map { + if this.Int32Map[i] != that1.Int32Map[i] { + return false + } + } + if len(this.Int64Map) != len(that1.Int64Map) { + return false + } + for i := range this.Int64Map { + if this.Int64Map[i] != that1.Int64Map[i] { + return false + } + } + if len(this.Uint32Map) != len(that1.Uint32Map) { + return false + } + for i := range this.Uint32Map { + if this.Uint32Map[i] != that1.Uint32Map[i] { + return false + } + } + if len(this.Uint64Map) != len(that1.Uint64Map) { + return false + } + for i := range this.Uint64Map { + if this.Uint64Map[i] != that1.Uint64Map[i] { + return false + } + } + if len(this.Sint32Map) != len(that1.Sint32Map) { + return false + } + for i := range this.Sint32Map { + if this.Sint32Map[i] != that1.Sint32Map[i] { + return false + } + } + if len(this.Sint64Map) != len(that1.Sint64Map) { + return false + } + for i := range this.Sint64Map { + if this.Sint64Map[i] != that1.Sint64Map[i] { + return false + } + } + if len(this.Fixed32Map) != len(that1.Fixed32Map) { + return false + } + for i := range this.Fixed32Map { + if this.Fixed32Map[i] != that1.Fixed32Map[i] { + return false + } + } + if len(this.Sfixed32Map) != len(that1.Sfixed32Map) { + return false + } + for i := range this.Sfixed32Map { + if this.Sfixed32Map[i] != that1.Sfixed32Map[i] { + return false + } + } + if len(this.Fixed64Map) != len(that1.Fixed64Map) { + return false + } + for i := range this.Fixed64Map { + if this.Fixed64Map[i] != that1.Fixed64Map[i] { + return false + } + } + if len(this.Sfixed64Map) != len(that1.Sfixed64Map) { + return false + } + for i := range this.Sfixed64Map { + if this.Sfixed64Map[i] != that1.Sfixed64Map[i] { + return false + } + } + if len(this.BoolMap) != len(that1.BoolMap) { + return false + } + for i := range this.BoolMap { + if this.BoolMap[i] != that1.BoolMap[i] { + return false + } + } + if len(this.StringMap) != len(that1.StringMap) { + return false + } + for i := range this.StringMap { + if this.StringMap[i] != that1.StringMap[i] { + return false + } + } + if len(this.StringToBytesMap) != len(that1.StringToBytesMap) { + return false + } + for i := range this.StringToBytesMap { + if !bytes.Equal(this.StringToBytesMap[i], that1.StringToBytesMap[i]) { + return false + } + } + if len(this.StringToEnumMap) != len(that1.StringToEnumMap) { + return false + } + for i := range this.StringToEnumMap { + if this.StringToEnumMap[i] != that1.StringToEnumMap[i] { + return false + } + } + if len(this.StringToMsgMap) != len(that1.StringToMsgMap) { + return false + } + for i := range this.StringToMsgMap { + if !this.StringToMsgMap[i].Equal(that1.StringToMsgMap[i]) { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *AllMapsOrdered) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*AllMapsOrdered) + if !ok { + that2, ok := that.(AllMapsOrdered) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *AllMapsOrdered") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *AllMapsOrdered but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *AllMapsOrdered but is not nil && this == nil") + } + if len(this.StringToDoubleMap) != len(that1.StringToDoubleMap) { + return fmt.Errorf("StringToDoubleMap this(%v) Not Equal that(%v)", len(this.StringToDoubleMap), len(that1.StringToDoubleMap)) + } + for i := range this.StringToDoubleMap { + if this.StringToDoubleMap[i] != that1.StringToDoubleMap[i] { + return fmt.Errorf("StringToDoubleMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringToDoubleMap[i], i, that1.StringToDoubleMap[i]) + } + } + if len(this.StringToFloatMap) != len(that1.StringToFloatMap) { + return fmt.Errorf("StringToFloatMap this(%v) Not Equal that(%v)", len(this.StringToFloatMap), len(that1.StringToFloatMap)) + } + for i := range this.StringToFloatMap { + if this.StringToFloatMap[i] != that1.StringToFloatMap[i] { + return fmt.Errorf("StringToFloatMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringToFloatMap[i], i, that1.StringToFloatMap[i]) + } + } + if len(this.Int32Map) != len(that1.Int32Map) { + return fmt.Errorf("Int32Map this(%v) Not Equal that(%v)", len(this.Int32Map), len(that1.Int32Map)) + } + for i := range this.Int32Map { + if this.Int32Map[i] != that1.Int32Map[i] { + return fmt.Errorf("Int32Map this[%v](%v) Not Equal that[%v](%v)", i, this.Int32Map[i], i, that1.Int32Map[i]) + } + } + if len(this.Int64Map) != len(that1.Int64Map) { + return fmt.Errorf("Int64Map this(%v) Not Equal that(%v)", len(this.Int64Map), len(that1.Int64Map)) + } + for i := range this.Int64Map { + if this.Int64Map[i] != that1.Int64Map[i] { + return fmt.Errorf("Int64Map this[%v](%v) Not Equal that[%v](%v)", i, this.Int64Map[i], i, that1.Int64Map[i]) + } + } + if len(this.Uint32Map) != len(that1.Uint32Map) { + return fmt.Errorf("Uint32Map this(%v) Not Equal that(%v)", len(this.Uint32Map), len(that1.Uint32Map)) + } + for i := range this.Uint32Map { + if this.Uint32Map[i] != that1.Uint32Map[i] { + return fmt.Errorf("Uint32Map this[%v](%v) Not Equal that[%v](%v)", i, this.Uint32Map[i], i, that1.Uint32Map[i]) + } + } + if len(this.Uint64Map) != len(that1.Uint64Map) { + return fmt.Errorf("Uint64Map this(%v) Not Equal that(%v)", len(this.Uint64Map), len(that1.Uint64Map)) + } + for i := range this.Uint64Map { + if this.Uint64Map[i] != that1.Uint64Map[i] { + return fmt.Errorf("Uint64Map this[%v](%v) Not Equal that[%v](%v)", i, this.Uint64Map[i], i, that1.Uint64Map[i]) + } + } + if len(this.Sint32Map) != len(that1.Sint32Map) { + return fmt.Errorf("Sint32Map this(%v) Not Equal that(%v)", len(this.Sint32Map), len(that1.Sint32Map)) + } + for i := range this.Sint32Map { + if this.Sint32Map[i] != that1.Sint32Map[i] { + return fmt.Errorf("Sint32Map this[%v](%v) Not Equal that[%v](%v)", i, this.Sint32Map[i], i, that1.Sint32Map[i]) + } + } + if len(this.Sint64Map) != len(that1.Sint64Map) { + return fmt.Errorf("Sint64Map this(%v) Not Equal that(%v)", len(this.Sint64Map), len(that1.Sint64Map)) + } + for i := range this.Sint64Map { + if this.Sint64Map[i] != that1.Sint64Map[i] { + return fmt.Errorf("Sint64Map this[%v](%v) Not Equal that[%v](%v)", i, this.Sint64Map[i], i, that1.Sint64Map[i]) + } + } + if len(this.Fixed32Map) != len(that1.Fixed32Map) { + return fmt.Errorf("Fixed32Map this(%v) Not Equal that(%v)", len(this.Fixed32Map), len(that1.Fixed32Map)) + } + for i := range this.Fixed32Map { + if this.Fixed32Map[i] != that1.Fixed32Map[i] { + return fmt.Errorf("Fixed32Map this[%v](%v) Not Equal that[%v](%v)", i, this.Fixed32Map[i], i, that1.Fixed32Map[i]) + } + } + if len(this.Sfixed32Map) != len(that1.Sfixed32Map) { + return fmt.Errorf("Sfixed32Map this(%v) Not Equal that(%v)", len(this.Sfixed32Map), len(that1.Sfixed32Map)) + } + for i := range this.Sfixed32Map { + if this.Sfixed32Map[i] != that1.Sfixed32Map[i] { + return fmt.Errorf("Sfixed32Map this[%v](%v) Not Equal that[%v](%v)", i, this.Sfixed32Map[i], i, that1.Sfixed32Map[i]) + } + } + if len(this.Fixed64Map) != len(that1.Fixed64Map) { + return fmt.Errorf("Fixed64Map this(%v) Not Equal that(%v)", len(this.Fixed64Map), len(that1.Fixed64Map)) + } + for i := range this.Fixed64Map { + if this.Fixed64Map[i] != that1.Fixed64Map[i] { + return fmt.Errorf("Fixed64Map this[%v](%v) Not Equal that[%v](%v)", i, this.Fixed64Map[i], i, that1.Fixed64Map[i]) + } + } + if len(this.Sfixed64Map) != len(that1.Sfixed64Map) { + return fmt.Errorf("Sfixed64Map this(%v) Not Equal that(%v)", len(this.Sfixed64Map), len(that1.Sfixed64Map)) + } + for i := range this.Sfixed64Map { + if this.Sfixed64Map[i] != that1.Sfixed64Map[i] { + return fmt.Errorf("Sfixed64Map this[%v](%v) Not Equal that[%v](%v)", i, this.Sfixed64Map[i], i, that1.Sfixed64Map[i]) + } + } + if len(this.BoolMap) != len(that1.BoolMap) { + return fmt.Errorf("BoolMap this(%v) Not Equal that(%v)", len(this.BoolMap), len(that1.BoolMap)) + } + for i := range this.BoolMap { + if this.BoolMap[i] != that1.BoolMap[i] { + return fmt.Errorf("BoolMap this[%v](%v) Not Equal that[%v](%v)", i, this.BoolMap[i], i, that1.BoolMap[i]) + } + } + if len(this.StringMap) != len(that1.StringMap) { + return fmt.Errorf("StringMap this(%v) Not Equal that(%v)", len(this.StringMap), len(that1.StringMap)) + } + for i := range this.StringMap { + if this.StringMap[i] != that1.StringMap[i] { + return fmt.Errorf("StringMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringMap[i], i, that1.StringMap[i]) + } + } + if len(this.StringToBytesMap) != len(that1.StringToBytesMap) { + return fmt.Errorf("StringToBytesMap this(%v) Not Equal that(%v)", len(this.StringToBytesMap), len(that1.StringToBytesMap)) + } + for i := range this.StringToBytesMap { + if !bytes.Equal(this.StringToBytesMap[i], that1.StringToBytesMap[i]) { + return fmt.Errorf("StringToBytesMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringToBytesMap[i], i, that1.StringToBytesMap[i]) + } + } + if len(this.StringToEnumMap) != len(that1.StringToEnumMap) { + return fmt.Errorf("StringToEnumMap this(%v) Not Equal that(%v)", len(this.StringToEnumMap), len(that1.StringToEnumMap)) + } + for i := range this.StringToEnumMap { + if this.StringToEnumMap[i] != that1.StringToEnumMap[i] { + return fmt.Errorf("StringToEnumMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringToEnumMap[i], i, that1.StringToEnumMap[i]) + } + } + if len(this.StringToMsgMap) != len(that1.StringToMsgMap) { + return fmt.Errorf("StringToMsgMap this(%v) Not Equal that(%v)", len(this.StringToMsgMap), len(that1.StringToMsgMap)) + } + for i := range this.StringToMsgMap { + if !this.StringToMsgMap[i].Equal(that1.StringToMsgMap[i]) { + return fmt.Errorf("StringToMsgMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringToMsgMap[i], i, that1.StringToMsgMap[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *AllMapsOrdered) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*AllMapsOrdered) + if !ok { + that2, ok := that.(AllMapsOrdered) + 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.StringToDoubleMap) != len(that1.StringToDoubleMap) { + return false + } + for i := range this.StringToDoubleMap { + if this.StringToDoubleMap[i] != that1.StringToDoubleMap[i] { + return false + } + } + if len(this.StringToFloatMap) != len(that1.StringToFloatMap) { + return false + } + for i := range this.StringToFloatMap { + if this.StringToFloatMap[i] != that1.StringToFloatMap[i] { + return false + } + } + if len(this.Int32Map) != len(that1.Int32Map) { + return false + } + for i := range this.Int32Map { + if this.Int32Map[i] != that1.Int32Map[i] { + return false + } + } + if len(this.Int64Map) != len(that1.Int64Map) { + return false + } + for i := range this.Int64Map { + if this.Int64Map[i] != that1.Int64Map[i] { + return false + } + } + if len(this.Uint32Map) != len(that1.Uint32Map) { + return false + } + for i := range this.Uint32Map { + if this.Uint32Map[i] != that1.Uint32Map[i] { + return false + } + } + if len(this.Uint64Map) != len(that1.Uint64Map) { + return false + } + for i := range this.Uint64Map { + if this.Uint64Map[i] != that1.Uint64Map[i] { + return false + } + } + if len(this.Sint32Map) != len(that1.Sint32Map) { + return false + } + for i := range this.Sint32Map { + if this.Sint32Map[i] != that1.Sint32Map[i] { + return false + } + } + if len(this.Sint64Map) != len(that1.Sint64Map) { + return false + } + for i := range this.Sint64Map { + if this.Sint64Map[i] != that1.Sint64Map[i] { + return false + } + } + if len(this.Fixed32Map) != len(that1.Fixed32Map) { + return false + } + for i := range this.Fixed32Map { + if this.Fixed32Map[i] != that1.Fixed32Map[i] { + return false + } + } + if len(this.Sfixed32Map) != len(that1.Sfixed32Map) { + return false + } + for i := range this.Sfixed32Map { + if this.Sfixed32Map[i] != that1.Sfixed32Map[i] { + return false + } + } + if len(this.Fixed64Map) != len(that1.Fixed64Map) { + return false + } + for i := range this.Fixed64Map { + if this.Fixed64Map[i] != that1.Fixed64Map[i] { + return false + } + } + if len(this.Sfixed64Map) != len(that1.Sfixed64Map) { + return false + } + for i := range this.Sfixed64Map { + if this.Sfixed64Map[i] != that1.Sfixed64Map[i] { + return false + } + } + if len(this.BoolMap) != len(that1.BoolMap) { + return false + } + for i := range this.BoolMap { + if this.BoolMap[i] != that1.BoolMap[i] { + return false + } + } + if len(this.StringMap) != len(that1.StringMap) { + return false + } + for i := range this.StringMap { + if this.StringMap[i] != that1.StringMap[i] { + return false + } + } + if len(this.StringToBytesMap) != len(that1.StringToBytesMap) { + return false + } + for i := range this.StringToBytesMap { + if !bytes.Equal(this.StringToBytesMap[i], that1.StringToBytesMap[i]) { + return false + } + } + if len(this.StringToEnumMap) != len(that1.StringToEnumMap) { + return false + } + for i := range this.StringToEnumMap { + if this.StringToEnumMap[i] != that1.StringToEnumMap[i] { + return false + } + } + if len(this.StringToMsgMap) != len(that1.StringToMsgMap) { + return false + } + for i := range this.StringToMsgMap { + if !this.StringToMsgMap[i].Equal(that1.StringToMsgMap[i]) { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} + +type FloatingPointFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetF() *float64 +} + +func (this *FloatingPoint) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *FloatingPoint) TestProto() github_com_gogo_protobuf_proto.Message { + return NewFloatingPointFromFace(this) +} + +func (this *FloatingPoint) GetF() *float64 { + return this.F +} + +func NewFloatingPointFromFace(that FloatingPointFace) *FloatingPoint { + this := &FloatingPoint{} + this.F = that.GetF() + return this +} + +type AllMapsFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetStringToDoubleMap() map[string]float64 + GetStringToFloatMap() map[string]float32 + GetInt32Map() map[int32]int32 + GetInt64Map() map[int64]int64 + GetUint32Map() map[uint32]uint32 + GetUint64Map() map[uint64]uint64 + GetSint32Map() map[int32]int32 + GetSint64Map() map[int64]int64 + GetFixed32Map() map[uint32]uint32 + GetSfixed32Map() map[int32]int32 + GetFixed64Map() map[uint64]uint64 + GetSfixed64Map() map[int64]int64 + GetBoolMap() map[bool]bool + GetStringMap() map[string]string + GetStringToBytesMap() map[string][]byte + GetStringToEnumMap() map[string]MapEnum + GetStringToMsgMap() map[string]*FloatingPoint +} + +func (this *AllMaps) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *AllMaps) TestProto() github_com_gogo_protobuf_proto.Message { + return NewAllMapsFromFace(this) +} + +func (this *AllMaps) GetStringToDoubleMap() map[string]float64 { + return this.StringToDoubleMap +} + +func (this *AllMaps) GetStringToFloatMap() map[string]float32 { + return this.StringToFloatMap +} + +func (this *AllMaps) GetInt32Map() map[int32]int32 { + return this.Int32Map +} + +func (this *AllMaps) GetInt64Map() map[int64]int64 { + return this.Int64Map +} + +func (this *AllMaps) GetUint32Map() map[uint32]uint32 { + return this.Uint32Map +} + +func (this *AllMaps) GetUint64Map() map[uint64]uint64 { + return this.Uint64Map +} + +func (this *AllMaps) GetSint32Map() map[int32]int32 { + return this.Sint32Map +} + +func (this *AllMaps) GetSint64Map() map[int64]int64 { + return this.Sint64Map +} + +func (this *AllMaps) GetFixed32Map() map[uint32]uint32 { + return this.Fixed32Map +} + +func (this *AllMaps) GetSfixed32Map() map[int32]int32 { + return this.Sfixed32Map +} + +func (this *AllMaps) GetFixed64Map() map[uint64]uint64 { + return this.Fixed64Map +} + +func (this *AllMaps) GetSfixed64Map() map[int64]int64 { + return this.Sfixed64Map +} + +func (this *AllMaps) GetBoolMap() map[bool]bool { + return this.BoolMap +} + +func (this *AllMaps) GetStringMap() map[string]string { + return this.StringMap +} + +func (this *AllMaps) GetStringToBytesMap() map[string][]byte { + return this.StringToBytesMap +} + +func (this *AllMaps) GetStringToEnumMap() map[string]MapEnum { + return this.StringToEnumMap +} + +func (this *AllMaps) GetStringToMsgMap() map[string]*FloatingPoint { + return this.StringToMsgMap +} + +func NewAllMapsFromFace(that AllMapsFace) *AllMaps { + this := &AllMaps{} + this.StringToDoubleMap = that.GetStringToDoubleMap() + this.StringToFloatMap = that.GetStringToFloatMap() + this.Int32Map = that.GetInt32Map() + this.Int64Map = that.GetInt64Map() + this.Uint32Map = that.GetUint32Map() + this.Uint64Map = that.GetUint64Map() + this.Sint32Map = that.GetSint32Map() + this.Sint64Map = that.GetSint64Map() + this.Fixed32Map = that.GetFixed32Map() + this.Sfixed32Map = that.GetSfixed32Map() + this.Fixed64Map = that.GetFixed64Map() + this.Sfixed64Map = that.GetSfixed64Map() + this.BoolMap = that.GetBoolMap() + this.StringMap = that.GetStringMap() + this.StringToBytesMap = that.GetStringToBytesMap() + this.StringToEnumMap = that.GetStringToEnumMap() + this.StringToMsgMap = that.GetStringToMsgMap() + return this +} + +type AllMapsOrderedFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetStringToDoubleMap() map[string]float64 + GetStringToFloatMap() map[string]float32 + GetInt32Map() map[int32]int32 + GetInt64Map() map[int64]int64 + GetUint32Map() map[uint32]uint32 + GetUint64Map() map[uint64]uint64 + GetSint32Map() map[int32]int32 + GetSint64Map() map[int64]int64 + GetFixed32Map() map[uint32]uint32 + GetSfixed32Map() map[int32]int32 + GetFixed64Map() map[uint64]uint64 + GetSfixed64Map() map[int64]int64 + GetBoolMap() map[bool]bool + GetStringMap() map[string]string + GetStringToBytesMap() map[string][]byte + GetStringToEnumMap() map[string]MapEnum + GetStringToMsgMap() map[string]*FloatingPoint +} + +func (this *AllMapsOrdered) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *AllMapsOrdered) TestProto() github_com_gogo_protobuf_proto.Message { + return NewAllMapsOrderedFromFace(this) +} + +func (this *AllMapsOrdered) GetStringToDoubleMap() map[string]float64 { + return this.StringToDoubleMap +} + +func (this *AllMapsOrdered) GetStringToFloatMap() map[string]float32 { + return this.StringToFloatMap +} + +func (this *AllMapsOrdered) GetInt32Map() map[int32]int32 { + return this.Int32Map +} + +func (this *AllMapsOrdered) GetInt64Map() map[int64]int64 { + return this.Int64Map +} + +func (this *AllMapsOrdered) GetUint32Map() map[uint32]uint32 { + return this.Uint32Map +} + +func (this *AllMapsOrdered) GetUint64Map() map[uint64]uint64 { + return this.Uint64Map +} + +func (this *AllMapsOrdered) GetSint32Map() map[int32]int32 { + return this.Sint32Map +} + +func (this *AllMapsOrdered) GetSint64Map() map[int64]int64 { + return this.Sint64Map +} + +func (this *AllMapsOrdered) GetFixed32Map() map[uint32]uint32 { + return this.Fixed32Map +} + +func (this *AllMapsOrdered) GetSfixed32Map() map[int32]int32 { + return this.Sfixed32Map +} + +func (this *AllMapsOrdered) GetFixed64Map() map[uint64]uint64 { + return this.Fixed64Map +} + +func (this *AllMapsOrdered) GetSfixed64Map() map[int64]int64 { + return this.Sfixed64Map +} + +func (this *AllMapsOrdered) GetBoolMap() map[bool]bool { + return this.BoolMap +} + +func (this *AllMapsOrdered) GetStringMap() map[string]string { + return this.StringMap +} + +func (this *AllMapsOrdered) GetStringToBytesMap() map[string][]byte { + return this.StringToBytesMap +} + +func (this *AllMapsOrdered) GetStringToEnumMap() map[string]MapEnum { + return this.StringToEnumMap +} + +func (this *AllMapsOrdered) GetStringToMsgMap() map[string]*FloatingPoint { + return this.StringToMsgMap +} + +func NewAllMapsOrderedFromFace(that AllMapsOrderedFace) *AllMapsOrdered { + this := &AllMapsOrdered{} + this.StringToDoubleMap = that.GetStringToDoubleMap() + this.StringToFloatMap = that.GetStringToFloatMap() + this.Int32Map = that.GetInt32Map() + this.Int64Map = that.GetInt64Map() + this.Uint32Map = that.GetUint32Map() + this.Uint64Map = that.GetUint64Map() + this.Sint32Map = that.GetSint32Map() + this.Sint64Map = that.GetSint64Map() + this.Fixed32Map = that.GetFixed32Map() + this.Sfixed32Map = that.GetSfixed32Map() + this.Fixed64Map = that.GetFixed64Map() + this.Sfixed64Map = that.GetSfixed64Map() + this.BoolMap = that.GetBoolMap() + this.StringMap = that.GetStringMap() + this.StringToBytesMap = that.GetStringToBytesMap() + this.StringToEnumMap = that.GetStringToEnumMap() + this.StringToMsgMap = that.GetStringToMsgMap() + return this +} + +func (this *FloatingPoint) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&proto2_maps.FloatingPoint{") + if this.F != nil { + s = append(s, "F: "+valueToGoStringMapsproto2(this.F, "float64")+",\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 *AllMaps) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 21) + s = append(s, "&proto2_maps.AllMaps{") + keysForStringToDoubleMap := make([]string, 0, len(this.StringToDoubleMap)) + for k := range this.StringToDoubleMap { + keysForStringToDoubleMap = append(keysForStringToDoubleMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToDoubleMap) + mapStringForStringToDoubleMap := "map[string]float64{" + for _, k := range keysForStringToDoubleMap { + mapStringForStringToDoubleMap += fmt.Sprintf("%#v: %#v,", k, this.StringToDoubleMap[k]) + } + mapStringForStringToDoubleMap += "}" + if this.StringToDoubleMap != nil { + s = append(s, "StringToDoubleMap: "+mapStringForStringToDoubleMap+",\n") + } + keysForStringToFloatMap := make([]string, 0, len(this.StringToFloatMap)) + for k := range this.StringToFloatMap { + keysForStringToFloatMap = append(keysForStringToFloatMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToFloatMap) + mapStringForStringToFloatMap := "map[string]float32{" + for _, k := range keysForStringToFloatMap { + mapStringForStringToFloatMap += fmt.Sprintf("%#v: %#v,", k, this.StringToFloatMap[k]) + } + mapStringForStringToFloatMap += "}" + if this.StringToFloatMap != nil { + s = append(s, "StringToFloatMap: "+mapStringForStringToFloatMap+",\n") + } + keysForInt32Map := make([]int32, 0, len(this.Int32Map)) + for k := range this.Int32Map { + keysForInt32Map = append(keysForInt32Map, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForInt32Map) + mapStringForInt32Map := "map[int32]int32{" + for _, k := range keysForInt32Map { + mapStringForInt32Map += fmt.Sprintf("%#v: %#v,", k, this.Int32Map[k]) + } + mapStringForInt32Map += "}" + if this.Int32Map != nil { + s = append(s, "Int32Map: "+mapStringForInt32Map+",\n") + } + keysForInt64Map := make([]int64, 0, len(this.Int64Map)) + for k := range this.Int64Map { + keysForInt64Map = append(keysForInt64Map, k) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForInt64Map) + mapStringForInt64Map := "map[int64]int64{" + for _, k := range keysForInt64Map { + mapStringForInt64Map += fmt.Sprintf("%#v: %#v,", k, this.Int64Map[k]) + } + mapStringForInt64Map += "}" + if this.Int64Map != nil { + s = append(s, "Int64Map: "+mapStringForInt64Map+",\n") + } + keysForUint32Map := make([]uint32, 0, len(this.Uint32Map)) + for k := range this.Uint32Map { + keysForUint32Map = append(keysForUint32Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint32s(keysForUint32Map) + mapStringForUint32Map := "map[uint32]uint32{" + for _, k := range keysForUint32Map { + mapStringForUint32Map += fmt.Sprintf("%#v: %#v,", k, this.Uint32Map[k]) + } + mapStringForUint32Map += "}" + if this.Uint32Map != nil { + s = append(s, "Uint32Map: "+mapStringForUint32Map+",\n") + } + keysForUint64Map := make([]uint64, 0, len(this.Uint64Map)) + for k := range this.Uint64Map { + keysForUint64Map = append(keysForUint64Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint64s(keysForUint64Map) + mapStringForUint64Map := "map[uint64]uint64{" + for _, k := range keysForUint64Map { + mapStringForUint64Map += fmt.Sprintf("%#v: %#v,", k, this.Uint64Map[k]) + } + mapStringForUint64Map += "}" + if this.Uint64Map != nil { + s = append(s, "Uint64Map: "+mapStringForUint64Map+",\n") + } + keysForSint32Map := make([]int32, 0, len(this.Sint32Map)) + for k := range this.Sint32Map { + keysForSint32Map = append(keysForSint32Map, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForSint32Map) + mapStringForSint32Map := "map[int32]int32{" + for _, k := range keysForSint32Map { + mapStringForSint32Map += fmt.Sprintf("%#v: %#v,", k, this.Sint32Map[k]) + } + mapStringForSint32Map += "}" + if this.Sint32Map != nil { + s = append(s, "Sint32Map: "+mapStringForSint32Map+",\n") + } + keysForSint64Map := make([]int64, 0, len(this.Sint64Map)) + for k := range this.Sint64Map { + keysForSint64Map = append(keysForSint64Map, k) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForSint64Map) + mapStringForSint64Map := "map[int64]int64{" + for _, k := range keysForSint64Map { + mapStringForSint64Map += fmt.Sprintf("%#v: %#v,", k, this.Sint64Map[k]) + } + mapStringForSint64Map += "}" + if this.Sint64Map != nil { + s = append(s, "Sint64Map: "+mapStringForSint64Map+",\n") + } + keysForFixed32Map := make([]uint32, 0, len(this.Fixed32Map)) + for k := range this.Fixed32Map { + keysForFixed32Map = append(keysForFixed32Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint32s(keysForFixed32Map) + mapStringForFixed32Map := "map[uint32]uint32{" + for _, k := range keysForFixed32Map { + mapStringForFixed32Map += fmt.Sprintf("%#v: %#v,", k, this.Fixed32Map[k]) + } + mapStringForFixed32Map += "}" + if this.Fixed32Map != nil { + s = append(s, "Fixed32Map: "+mapStringForFixed32Map+",\n") + } + keysForSfixed32Map := make([]int32, 0, len(this.Sfixed32Map)) + for k := range this.Sfixed32Map { + keysForSfixed32Map = append(keysForSfixed32Map, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForSfixed32Map) + mapStringForSfixed32Map := "map[int32]int32{" + for _, k := range keysForSfixed32Map { + mapStringForSfixed32Map += fmt.Sprintf("%#v: %#v,", k, this.Sfixed32Map[k]) + } + mapStringForSfixed32Map += "}" + if this.Sfixed32Map != nil { + s = append(s, "Sfixed32Map: "+mapStringForSfixed32Map+",\n") + } + keysForFixed64Map := make([]uint64, 0, len(this.Fixed64Map)) + for k := range this.Fixed64Map { + keysForFixed64Map = append(keysForFixed64Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint64s(keysForFixed64Map) + mapStringForFixed64Map := "map[uint64]uint64{" + for _, k := range keysForFixed64Map { + mapStringForFixed64Map += fmt.Sprintf("%#v: %#v,", k, this.Fixed64Map[k]) + } + mapStringForFixed64Map += "}" + if this.Fixed64Map != nil { + s = append(s, "Fixed64Map: "+mapStringForFixed64Map+",\n") + } + keysForSfixed64Map := make([]int64, 0, len(this.Sfixed64Map)) + for k := range this.Sfixed64Map { + keysForSfixed64Map = append(keysForSfixed64Map, k) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForSfixed64Map) + mapStringForSfixed64Map := "map[int64]int64{" + for _, k := range keysForSfixed64Map { + mapStringForSfixed64Map += fmt.Sprintf("%#v: %#v,", k, this.Sfixed64Map[k]) + } + mapStringForSfixed64Map += "}" + if this.Sfixed64Map != nil { + s = append(s, "Sfixed64Map: "+mapStringForSfixed64Map+",\n") + } + keysForBoolMap := make([]bool, 0, len(this.BoolMap)) + for k := range this.BoolMap { + keysForBoolMap = append(keysForBoolMap, k) + } + github_com_gogo_protobuf_sortkeys.Bools(keysForBoolMap) + mapStringForBoolMap := "map[bool]bool{" + for _, k := range keysForBoolMap { + mapStringForBoolMap += fmt.Sprintf("%#v: %#v,", k, this.BoolMap[k]) + } + mapStringForBoolMap += "}" + if this.BoolMap != nil { + s = append(s, "BoolMap: "+mapStringForBoolMap+",\n") + } + keysForStringMap := make([]string, 0, len(this.StringMap)) + for k := range this.StringMap { + keysForStringMap = append(keysForStringMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringMap) + mapStringForStringMap := "map[string]string{" + for _, k := range keysForStringMap { + mapStringForStringMap += fmt.Sprintf("%#v: %#v,", k, this.StringMap[k]) + } + mapStringForStringMap += "}" + if this.StringMap != nil { + s = append(s, "StringMap: "+mapStringForStringMap+",\n") + } + keysForStringToBytesMap := make([]string, 0, len(this.StringToBytesMap)) + for k := range this.StringToBytesMap { + keysForStringToBytesMap = append(keysForStringToBytesMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToBytesMap) + mapStringForStringToBytesMap := "map[string][]byte{" + for _, k := range keysForStringToBytesMap { + mapStringForStringToBytesMap += fmt.Sprintf("%#v: %#v,", k, this.StringToBytesMap[k]) + } + mapStringForStringToBytesMap += "}" + if this.StringToBytesMap != nil { + s = append(s, "StringToBytesMap: "+mapStringForStringToBytesMap+",\n") + } + keysForStringToEnumMap := make([]string, 0, len(this.StringToEnumMap)) + for k := range this.StringToEnumMap { + keysForStringToEnumMap = append(keysForStringToEnumMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToEnumMap) + mapStringForStringToEnumMap := "map[string]MapEnum{" + for _, k := range keysForStringToEnumMap { + mapStringForStringToEnumMap += fmt.Sprintf("%#v: %#v,", k, this.StringToEnumMap[k]) + } + mapStringForStringToEnumMap += "}" + if this.StringToEnumMap != nil { + s = append(s, "StringToEnumMap: "+mapStringForStringToEnumMap+",\n") + } + keysForStringToMsgMap := make([]string, 0, len(this.StringToMsgMap)) + for k := range this.StringToMsgMap { + keysForStringToMsgMap = append(keysForStringToMsgMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToMsgMap) + mapStringForStringToMsgMap := "map[string]*FloatingPoint{" + for _, k := range keysForStringToMsgMap { + mapStringForStringToMsgMap += fmt.Sprintf("%#v: %#v,", k, this.StringToMsgMap[k]) + } + mapStringForStringToMsgMap += "}" + if this.StringToMsgMap != nil { + s = append(s, "StringToMsgMap: "+mapStringForStringToMsgMap+",\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 *AllMapsOrdered) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 21) + s = append(s, "&proto2_maps.AllMapsOrdered{") + keysForStringToDoubleMap := make([]string, 0, len(this.StringToDoubleMap)) + for k := range this.StringToDoubleMap { + keysForStringToDoubleMap = append(keysForStringToDoubleMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToDoubleMap) + mapStringForStringToDoubleMap := "map[string]float64{" + for _, k := range keysForStringToDoubleMap { + mapStringForStringToDoubleMap += fmt.Sprintf("%#v: %#v,", k, this.StringToDoubleMap[k]) + } + mapStringForStringToDoubleMap += "}" + if this.StringToDoubleMap != nil { + s = append(s, "StringToDoubleMap: "+mapStringForStringToDoubleMap+",\n") + } + keysForStringToFloatMap := make([]string, 0, len(this.StringToFloatMap)) + for k := range this.StringToFloatMap { + keysForStringToFloatMap = append(keysForStringToFloatMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToFloatMap) + mapStringForStringToFloatMap := "map[string]float32{" + for _, k := range keysForStringToFloatMap { + mapStringForStringToFloatMap += fmt.Sprintf("%#v: %#v,", k, this.StringToFloatMap[k]) + } + mapStringForStringToFloatMap += "}" + if this.StringToFloatMap != nil { + s = append(s, "StringToFloatMap: "+mapStringForStringToFloatMap+",\n") + } + keysForInt32Map := make([]int32, 0, len(this.Int32Map)) + for k := range this.Int32Map { + keysForInt32Map = append(keysForInt32Map, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForInt32Map) + mapStringForInt32Map := "map[int32]int32{" + for _, k := range keysForInt32Map { + mapStringForInt32Map += fmt.Sprintf("%#v: %#v,", k, this.Int32Map[k]) + } + mapStringForInt32Map += "}" + if this.Int32Map != nil { + s = append(s, "Int32Map: "+mapStringForInt32Map+",\n") + } + keysForInt64Map := make([]int64, 0, len(this.Int64Map)) + for k := range this.Int64Map { + keysForInt64Map = append(keysForInt64Map, k) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForInt64Map) + mapStringForInt64Map := "map[int64]int64{" + for _, k := range keysForInt64Map { + mapStringForInt64Map += fmt.Sprintf("%#v: %#v,", k, this.Int64Map[k]) + } + mapStringForInt64Map += "}" + if this.Int64Map != nil { + s = append(s, "Int64Map: "+mapStringForInt64Map+",\n") + } + keysForUint32Map := make([]uint32, 0, len(this.Uint32Map)) + for k := range this.Uint32Map { + keysForUint32Map = append(keysForUint32Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint32s(keysForUint32Map) + mapStringForUint32Map := "map[uint32]uint32{" + for _, k := range keysForUint32Map { + mapStringForUint32Map += fmt.Sprintf("%#v: %#v,", k, this.Uint32Map[k]) + } + mapStringForUint32Map += "}" + if this.Uint32Map != nil { + s = append(s, "Uint32Map: "+mapStringForUint32Map+",\n") + } + keysForUint64Map := make([]uint64, 0, len(this.Uint64Map)) + for k := range this.Uint64Map { + keysForUint64Map = append(keysForUint64Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint64s(keysForUint64Map) + mapStringForUint64Map := "map[uint64]uint64{" + for _, k := range keysForUint64Map { + mapStringForUint64Map += fmt.Sprintf("%#v: %#v,", k, this.Uint64Map[k]) + } + mapStringForUint64Map += "}" + if this.Uint64Map != nil { + s = append(s, "Uint64Map: "+mapStringForUint64Map+",\n") + } + keysForSint32Map := make([]int32, 0, len(this.Sint32Map)) + for k := range this.Sint32Map { + keysForSint32Map = append(keysForSint32Map, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForSint32Map) + mapStringForSint32Map := "map[int32]int32{" + for _, k := range keysForSint32Map { + mapStringForSint32Map += fmt.Sprintf("%#v: %#v,", k, this.Sint32Map[k]) + } + mapStringForSint32Map += "}" + if this.Sint32Map != nil { + s = append(s, "Sint32Map: "+mapStringForSint32Map+",\n") + } + keysForSint64Map := make([]int64, 0, len(this.Sint64Map)) + for k := range this.Sint64Map { + keysForSint64Map = append(keysForSint64Map, k) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForSint64Map) + mapStringForSint64Map := "map[int64]int64{" + for _, k := range keysForSint64Map { + mapStringForSint64Map += fmt.Sprintf("%#v: %#v,", k, this.Sint64Map[k]) + } + mapStringForSint64Map += "}" + if this.Sint64Map != nil { + s = append(s, "Sint64Map: "+mapStringForSint64Map+",\n") + } + keysForFixed32Map := make([]uint32, 0, len(this.Fixed32Map)) + for k := range this.Fixed32Map { + keysForFixed32Map = append(keysForFixed32Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint32s(keysForFixed32Map) + mapStringForFixed32Map := "map[uint32]uint32{" + for _, k := range keysForFixed32Map { + mapStringForFixed32Map += fmt.Sprintf("%#v: %#v,", k, this.Fixed32Map[k]) + } + mapStringForFixed32Map += "}" + if this.Fixed32Map != nil { + s = append(s, "Fixed32Map: "+mapStringForFixed32Map+",\n") + } + keysForSfixed32Map := make([]int32, 0, len(this.Sfixed32Map)) + for k := range this.Sfixed32Map { + keysForSfixed32Map = append(keysForSfixed32Map, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForSfixed32Map) + mapStringForSfixed32Map := "map[int32]int32{" + for _, k := range keysForSfixed32Map { + mapStringForSfixed32Map += fmt.Sprintf("%#v: %#v,", k, this.Sfixed32Map[k]) + } + mapStringForSfixed32Map += "}" + if this.Sfixed32Map != nil { + s = append(s, "Sfixed32Map: "+mapStringForSfixed32Map+",\n") + } + keysForFixed64Map := make([]uint64, 0, len(this.Fixed64Map)) + for k := range this.Fixed64Map { + keysForFixed64Map = append(keysForFixed64Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint64s(keysForFixed64Map) + mapStringForFixed64Map := "map[uint64]uint64{" + for _, k := range keysForFixed64Map { + mapStringForFixed64Map += fmt.Sprintf("%#v: %#v,", k, this.Fixed64Map[k]) + } + mapStringForFixed64Map += "}" + if this.Fixed64Map != nil { + s = append(s, "Fixed64Map: "+mapStringForFixed64Map+",\n") + } + keysForSfixed64Map := make([]int64, 0, len(this.Sfixed64Map)) + for k := range this.Sfixed64Map { + keysForSfixed64Map = append(keysForSfixed64Map, k) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForSfixed64Map) + mapStringForSfixed64Map := "map[int64]int64{" + for _, k := range keysForSfixed64Map { + mapStringForSfixed64Map += fmt.Sprintf("%#v: %#v,", k, this.Sfixed64Map[k]) + } + mapStringForSfixed64Map += "}" + if this.Sfixed64Map != nil { + s = append(s, "Sfixed64Map: "+mapStringForSfixed64Map+",\n") + } + keysForBoolMap := make([]bool, 0, len(this.BoolMap)) + for k := range this.BoolMap { + keysForBoolMap = append(keysForBoolMap, k) + } + github_com_gogo_protobuf_sortkeys.Bools(keysForBoolMap) + mapStringForBoolMap := "map[bool]bool{" + for _, k := range keysForBoolMap { + mapStringForBoolMap += fmt.Sprintf("%#v: %#v,", k, this.BoolMap[k]) + } + mapStringForBoolMap += "}" + if this.BoolMap != nil { + s = append(s, "BoolMap: "+mapStringForBoolMap+",\n") + } + keysForStringMap := make([]string, 0, len(this.StringMap)) + for k := range this.StringMap { + keysForStringMap = append(keysForStringMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringMap) + mapStringForStringMap := "map[string]string{" + for _, k := range keysForStringMap { + mapStringForStringMap += fmt.Sprintf("%#v: %#v,", k, this.StringMap[k]) + } + mapStringForStringMap += "}" + if this.StringMap != nil { + s = append(s, "StringMap: "+mapStringForStringMap+",\n") + } + keysForStringToBytesMap := make([]string, 0, len(this.StringToBytesMap)) + for k := range this.StringToBytesMap { + keysForStringToBytesMap = append(keysForStringToBytesMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToBytesMap) + mapStringForStringToBytesMap := "map[string][]byte{" + for _, k := range keysForStringToBytesMap { + mapStringForStringToBytesMap += fmt.Sprintf("%#v: %#v,", k, this.StringToBytesMap[k]) + } + mapStringForStringToBytesMap += "}" + if this.StringToBytesMap != nil { + s = append(s, "StringToBytesMap: "+mapStringForStringToBytesMap+",\n") + } + keysForStringToEnumMap := make([]string, 0, len(this.StringToEnumMap)) + for k := range this.StringToEnumMap { + keysForStringToEnumMap = append(keysForStringToEnumMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToEnumMap) + mapStringForStringToEnumMap := "map[string]MapEnum{" + for _, k := range keysForStringToEnumMap { + mapStringForStringToEnumMap += fmt.Sprintf("%#v: %#v,", k, this.StringToEnumMap[k]) + } + mapStringForStringToEnumMap += "}" + if this.StringToEnumMap != nil { + s = append(s, "StringToEnumMap: "+mapStringForStringToEnumMap+",\n") + } + keysForStringToMsgMap := make([]string, 0, len(this.StringToMsgMap)) + for k := range this.StringToMsgMap { + keysForStringToMsgMap = append(keysForStringToMsgMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToMsgMap) + mapStringForStringToMsgMap := "map[string]*FloatingPoint{" + for _, k := range keysForStringToMsgMap { + mapStringForStringToMsgMap += fmt.Sprintf("%#v: %#v,", k, this.StringToMsgMap[k]) + } + mapStringForStringToMsgMap += "}" + if this.StringToMsgMap != nil { + s = append(s, "StringToMsgMap: "+mapStringForStringToMsgMap+",\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 valueToGoStringMapsproto2(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 extensionToGoStringMapsproto2(e map[int32]github_com_gogo_protobuf_proto.Extension) string { + if e == nil { + return "nil" + } + s := "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 +} +func NewPopulatedFloatingPoint(r randyMapsproto2, easy bool) *FloatingPoint { + this := &FloatingPoint{} + if r.Intn(10) != 0 { + v1 := float64(r.Float64()) + if r.Intn(2) == 0 { + v1 *= -1 + } + this.F = &v1 + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedMapsproto2(r, 2) + } + return this +} + +func NewPopulatedAllMaps(r randyMapsproto2, easy bool) *AllMaps { + this := &AllMaps{} + if r.Intn(10) != 0 { + v2 := r.Intn(10) + this.StringToDoubleMap = make(map[string]float64) + for i := 0; i < v2; i++ { + v3 := randStringMapsproto2(r) + this.StringToDoubleMap[v3] = float64(r.Float64()) + if r.Intn(2) == 0 { + this.StringToDoubleMap[v3] *= -1 + } + } + } + if r.Intn(10) != 0 { + v4 := r.Intn(10) + this.StringToFloatMap = make(map[string]float32) + for i := 0; i < v4; i++ { + v5 := randStringMapsproto2(r) + this.StringToFloatMap[v5] = float32(r.Float32()) + if r.Intn(2) == 0 { + this.StringToFloatMap[v5] *= -1 + } + } + } + if r.Intn(10) != 0 { + v6 := r.Intn(10) + this.Int32Map = make(map[int32]int32) + for i := 0; i < v6; i++ { + v7 := int32(r.Int31()) + this.Int32Map[v7] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Int32Map[v7] *= -1 + } + } + } + if r.Intn(10) != 0 { + v8 := r.Intn(10) + this.Int64Map = make(map[int64]int64) + for i := 0; i < v8; i++ { + v9 := int64(r.Int63()) + this.Int64Map[v9] = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Int64Map[v9] *= -1 + } + } + } + if r.Intn(10) != 0 { + v10 := r.Intn(10) + this.Uint32Map = make(map[uint32]uint32) + for i := 0; i < v10; i++ { + v11 := uint32(r.Uint32()) + this.Uint32Map[v11] = uint32(r.Uint32()) + } + } + if r.Intn(10) != 0 { + v12 := r.Intn(10) + this.Uint64Map = make(map[uint64]uint64) + for i := 0; i < v12; i++ { + v13 := uint64(uint64(r.Uint32())) + this.Uint64Map[v13] = uint64(uint64(r.Uint32())) + } + } + if r.Intn(10) != 0 { + v14 := r.Intn(10) + this.Sint32Map = make(map[int32]int32) + for i := 0; i < v14; i++ { + v15 := int32(r.Int31()) + this.Sint32Map[v15] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Sint32Map[v15] *= -1 + } + } + } + if r.Intn(10) != 0 { + v16 := r.Intn(10) + this.Sint64Map = make(map[int64]int64) + for i := 0; i < v16; i++ { + v17 := int64(r.Int63()) + this.Sint64Map[v17] = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Sint64Map[v17] *= -1 + } + } + } + if r.Intn(10) != 0 { + v18 := r.Intn(10) + this.Fixed32Map = make(map[uint32]uint32) + for i := 0; i < v18; i++ { + v19 := uint32(r.Uint32()) + this.Fixed32Map[v19] = uint32(r.Uint32()) + } + } + if r.Intn(10) != 0 { + v20 := r.Intn(10) + this.Sfixed32Map = make(map[int32]int32) + for i := 0; i < v20; i++ { + v21 := int32(r.Int31()) + this.Sfixed32Map[v21] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Sfixed32Map[v21] *= -1 + } + } + } + if r.Intn(10) != 0 { + v22 := r.Intn(10) + this.Fixed64Map = make(map[uint64]uint64) + for i := 0; i < v22; i++ { + v23 := uint64(uint64(r.Uint32())) + this.Fixed64Map[v23] = uint64(uint64(r.Uint32())) + } + } + if r.Intn(10) != 0 { + v24 := r.Intn(10) + this.Sfixed64Map = make(map[int64]int64) + for i := 0; i < v24; i++ { + v25 := int64(r.Int63()) + this.Sfixed64Map[v25] = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Sfixed64Map[v25] *= -1 + } + } + } + if r.Intn(10) != 0 { + v26 := r.Intn(10) + this.BoolMap = make(map[bool]bool) + for i := 0; i < v26; i++ { + v27 := bool(bool(r.Intn(2) == 0)) + this.BoolMap[v27] = bool(bool(r.Intn(2) == 0)) + } + } + if r.Intn(10) != 0 { + v28 := r.Intn(10) + this.StringMap = make(map[string]string) + for i := 0; i < v28; i++ { + this.StringMap[randStringMapsproto2(r)] = randStringMapsproto2(r) + } + } + if r.Intn(10) != 0 { + v29 := r.Intn(10) + this.StringToBytesMap = make(map[string][]byte) + for i := 0; i < v29; i++ { + v30 := r.Intn(100) + v31 := randStringMapsproto2(r) + this.StringToBytesMap[v31] = make([]byte, v30) + for i := 0; i < v30; i++ { + this.StringToBytesMap[v31][i] = byte(r.Intn(256)) + } + } + } + if r.Intn(10) != 0 { + v32 := r.Intn(10) + this.StringToEnumMap = make(map[string]MapEnum) + for i := 0; i < v32; i++ { + this.StringToEnumMap[randStringMapsproto2(r)] = MapEnum([]int32{0, 1, 2}[r.Intn(3)]) + } + } + if r.Intn(10) != 0 { + v33 := r.Intn(10) + this.StringToMsgMap = make(map[string]*FloatingPoint) + for i := 0; i < v33; i++ { + this.StringToMsgMap[randStringMapsproto2(r)] = NewPopulatedFloatingPoint(r, easy) + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedMapsproto2(r, 18) + } + return this +} + +func NewPopulatedAllMapsOrdered(r randyMapsproto2, easy bool) *AllMapsOrdered { + this := &AllMapsOrdered{} + if r.Intn(10) != 0 { + v34 := r.Intn(10) + this.StringToDoubleMap = make(map[string]float64) + for i := 0; i < v34; i++ { + v35 := randStringMapsproto2(r) + this.StringToDoubleMap[v35] = float64(r.Float64()) + if r.Intn(2) == 0 { + this.StringToDoubleMap[v35] *= -1 + } + } + } + if r.Intn(10) != 0 { + v36 := r.Intn(10) + this.StringToFloatMap = make(map[string]float32) + for i := 0; i < v36; i++ { + v37 := randStringMapsproto2(r) + this.StringToFloatMap[v37] = float32(r.Float32()) + if r.Intn(2) == 0 { + this.StringToFloatMap[v37] *= -1 + } + } + } + if r.Intn(10) != 0 { + v38 := r.Intn(10) + this.Int32Map = make(map[int32]int32) + for i := 0; i < v38; i++ { + v39 := int32(r.Int31()) + this.Int32Map[v39] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Int32Map[v39] *= -1 + } + } + } + if r.Intn(10) != 0 { + v40 := r.Intn(10) + this.Int64Map = make(map[int64]int64) + for i := 0; i < v40; i++ { + v41 := int64(r.Int63()) + this.Int64Map[v41] = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Int64Map[v41] *= -1 + } + } + } + if r.Intn(10) != 0 { + v42 := r.Intn(10) + this.Uint32Map = make(map[uint32]uint32) + for i := 0; i < v42; i++ { + v43 := uint32(r.Uint32()) + this.Uint32Map[v43] = uint32(r.Uint32()) + } + } + if r.Intn(10) != 0 { + v44 := r.Intn(10) + this.Uint64Map = make(map[uint64]uint64) + for i := 0; i < v44; i++ { + v45 := uint64(uint64(r.Uint32())) + this.Uint64Map[v45] = uint64(uint64(r.Uint32())) + } + } + if r.Intn(10) != 0 { + v46 := r.Intn(10) + this.Sint32Map = make(map[int32]int32) + for i := 0; i < v46; i++ { + v47 := int32(r.Int31()) + this.Sint32Map[v47] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Sint32Map[v47] *= -1 + } + } + } + if r.Intn(10) != 0 { + v48 := r.Intn(10) + this.Sint64Map = make(map[int64]int64) + for i := 0; i < v48; i++ { + v49 := int64(r.Int63()) + this.Sint64Map[v49] = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Sint64Map[v49] *= -1 + } + } + } + if r.Intn(10) != 0 { + v50 := r.Intn(10) + this.Fixed32Map = make(map[uint32]uint32) + for i := 0; i < v50; i++ { + v51 := uint32(r.Uint32()) + this.Fixed32Map[v51] = uint32(r.Uint32()) + } + } + if r.Intn(10) != 0 { + v52 := r.Intn(10) + this.Sfixed32Map = make(map[int32]int32) + for i := 0; i < v52; i++ { + v53 := int32(r.Int31()) + this.Sfixed32Map[v53] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Sfixed32Map[v53] *= -1 + } + } + } + if r.Intn(10) != 0 { + v54 := r.Intn(10) + this.Fixed64Map = make(map[uint64]uint64) + for i := 0; i < v54; i++ { + v55 := uint64(uint64(r.Uint32())) + this.Fixed64Map[v55] = uint64(uint64(r.Uint32())) + } + } + if r.Intn(10) != 0 { + v56 := r.Intn(10) + this.Sfixed64Map = make(map[int64]int64) + for i := 0; i < v56; i++ { + v57 := int64(r.Int63()) + this.Sfixed64Map[v57] = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Sfixed64Map[v57] *= -1 + } + } + } + if r.Intn(10) != 0 { + v58 := r.Intn(10) + this.BoolMap = make(map[bool]bool) + for i := 0; i < v58; i++ { + v59 := bool(bool(r.Intn(2) == 0)) + this.BoolMap[v59] = bool(bool(r.Intn(2) == 0)) + } + } + if r.Intn(10) != 0 { + v60 := r.Intn(10) + this.StringMap = make(map[string]string) + for i := 0; i < v60; i++ { + this.StringMap[randStringMapsproto2(r)] = randStringMapsproto2(r) + } + } + if r.Intn(10) != 0 { + v61 := r.Intn(10) + this.StringToBytesMap = make(map[string][]byte) + for i := 0; i < v61; i++ { + v62 := r.Intn(100) + v63 := randStringMapsproto2(r) + this.StringToBytesMap[v63] = make([]byte, v62) + for i := 0; i < v62; i++ { + this.StringToBytesMap[v63][i] = byte(r.Intn(256)) + } + } + } + if r.Intn(10) != 0 { + v64 := r.Intn(10) + this.StringToEnumMap = make(map[string]MapEnum) + for i := 0; i < v64; i++ { + this.StringToEnumMap[randStringMapsproto2(r)] = MapEnum([]int32{0, 1, 2}[r.Intn(3)]) + } + } + if r.Intn(10) != 0 { + v65 := r.Intn(10) + this.StringToMsgMap = make(map[string]*FloatingPoint) + for i := 0; i < v65; i++ { + this.StringToMsgMap[randStringMapsproto2(r)] = NewPopulatedFloatingPoint(r, easy) + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedMapsproto2(r, 18) + } + return this +} + +type randyMapsproto2 interface { + Float32() float32 + Float64() float64 + Int63() int64 + Int31() int32 + Uint32() uint32 + Intn(n int) int +} + +func randUTF8RuneMapsproto2(r randyMapsproto2) 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 randStringMapsproto2(r randyMapsproto2) string { + v66 := r.Intn(100) + tmps := make([]rune, v66) + for i := 0; i < v66; i++ { + tmps[i] = randUTF8RuneMapsproto2(r) + } + return string(tmps) +} +func randUnrecognizedMapsproto2(r randyMapsproto2, 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 = randFieldMapsproto2(data, r, fieldNumber, wire) + } + return data +} +func randFieldMapsproto2(data []byte, r randyMapsproto2, fieldNumber int, wire int) []byte { + key := uint32(fieldNumber)<<3 | uint32(wire) + switch wire { + case 0: + data = encodeVarintPopulateMapsproto2(data, uint64(key)) + v67 := r.Int63() + if r.Intn(2) == 0 { + v67 *= -1 + } + data = encodeVarintPopulateMapsproto2(data, uint64(v67)) + case 1: + data = encodeVarintPopulateMapsproto2(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 = encodeVarintPopulateMapsproto2(data, uint64(key)) + ll := r.Intn(100) + data = encodeVarintPopulateMapsproto2(data, uint64(ll)) + for j := 0; j < ll; j++ { + data = append(data, byte(r.Intn(256))) + } + default: + data = encodeVarintPopulateMapsproto2(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 encodeVarintPopulateMapsproto2(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 *FloatingPoint) Size() (n int) { + var l int + _ = l + if m.F != nil { + n += 9 + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *AllMaps) Size() (n int) { + var l int + _ = l + if len(m.StringToDoubleMap) > 0 { + for k, v := range m.StringToDoubleMap { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + 1 + 8 + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.StringToFloatMap) > 0 { + for k, v := range m.StringToFloatMap { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + 1 + 4 + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.Int32Map) > 0 { + for k, v := range m.Int32Map { + _ = k + _ = v + mapEntrySize := 1 + sovMapsproto2(uint64(k)) + 1 + sovMapsproto2(uint64(v)) + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.Int64Map) > 0 { + for k, v := range m.Int64Map { + _ = k + _ = v + mapEntrySize := 1 + sovMapsproto2(uint64(k)) + 1 + sovMapsproto2(uint64(v)) + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.Uint32Map) > 0 { + for k, v := range m.Uint32Map { + _ = k + _ = v + mapEntrySize := 1 + sovMapsproto2(uint64(k)) + 1 + sovMapsproto2(uint64(v)) + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.Uint64Map) > 0 { + for k, v := range m.Uint64Map { + _ = k + _ = v + mapEntrySize := 1 + sovMapsproto2(uint64(k)) + 1 + sovMapsproto2(uint64(v)) + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.Sint32Map) > 0 { + for k, v := range m.Sint32Map { + _ = k + _ = v + mapEntrySize := 1 + sozMapsproto2(uint64(k)) + 1 + sozMapsproto2(uint64(v)) + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.Sint64Map) > 0 { + for k, v := range m.Sint64Map { + _ = k + _ = v + mapEntrySize := 1 + sozMapsproto2(uint64(k)) + 1 + sozMapsproto2(uint64(v)) + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.Fixed32Map) > 0 { + for k, v := range m.Fixed32Map { + _ = k + _ = v + mapEntrySize := 1 + 4 + 1 + 4 + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.Sfixed32Map) > 0 { + for k, v := range m.Sfixed32Map { + _ = k + _ = v + mapEntrySize := 1 + 4 + 1 + 4 + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.Fixed64Map) > 0 { + for k, v := range m.Fixed64Map { + _ = k + _ = v + mapEntrySize := 1 + 8 + 1 + 8 + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.Sfixed64Map) > 0 { + for k, v := range m.Sfixed64Map { + _ = k + _ = v + mapEntrySize := 1 + 8 + 1 + 8 + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.BoolMap) > 0 { + for k, v := range m.BoolMap { + _ = k + _ = v + mapEntrySize := 1 + 1 + 1 + 1 + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.StringMap) > 0 { + for k, v := range m.StringMap { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + 1 + len(v) + sovMapsproto2(uint64(len(v))) + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.StringToBytesMap) > 0 { + for k, v := range m.StringToBytesMap { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + 1 + len(v) + sovMapsproto2(uint64(len(v))) + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.StringToEnumMap) > 0 { + for k, v := range m.StringToEnumMap { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + 1 + sovMapsproto2(uint64(v)) + n += mapEntrySize + 2 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.StringToMsgMap) > 0 { + for k, v := range m.StringToMsgMap { + _ = k + _ = v + l = 0 + if v != nil { + l = v.Size() + } + mapEntrySize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + 1 + l + sovMapsproto2(uint64(l)) + n += mapEntrySize + 2 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *AllMapsOrdered) Size() (n int) { + var l int + _ = l + if len(m.StringToDoubleMap) > 0 { + for k, v := range m.StringToDoubleMap { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + 1 + 8 + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.StringToFloatMap) > 0 { + for k, v := range m.StringToFloatMap { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + 1 + 4 + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.Int32Map) > 0 { + for k, v := range m.Int32Map { + _ = k + _ = v + mapEntrySize := 1 + sovMapsproto2(uint64(k)) + 1 + sovMapsproto2(uint64(v)) + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.Int64Map) > 0 { + for k, v := range m.Int64Map { + _ = k + _ = v + mapEntrySize := 1 + sovMapsproto2(uint64(k)) + 1 + sovMapsproto2(uint64(v)) + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.Uint32Map) > 0 { + for k, v := range m.Uint32Map { + _ = k + _ = v + mapEntrySize := 1 + sovMapsproto2(uint64(k)) + 1 + sovMapsproto2(uint64(v)) + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.Uint64Map) > 0 { + for k, v := range m.Uint64Map { + _ = k + _ = v + mapEntrySize := 1 + sovMapsproto2(uint64(k)) + 1 + sovMapsproto2(uint64(v)) + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.Sint32Map) > 0 { + for k, v := range m.Sint32Map { + _ = k + _ = v + mapEntrySize := 1 + sozMapsproto2(uint64(k)) + 1 + sozMapsproto2(uint64(v)) + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.Sint64Map) > 0 { + for k, v := range m.Sint64Map { + _ = k + _ = v + mapEntrySize := 1 + sozMapsproto2(uint64(k)) + 1 + sozMapsproto2(uint64(v)) + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.Fixed32Map) > 0 { + for k, v := range m.Fixed32Map { + _ = k + _ = v + mapEntrySize := 1 + 4 + 1 + 4 + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.Sfixed32Map) > 0 { + for k, v := range m.Sfixed32Map { + _ = k + _ = v + mapEntrySize := 1 + 4 + 1 + 4 + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.Fixed64Map) > 0 { + for k, v := range m.Fixed64Map { + _ = k + _ = v + mapEntrySize := 1 + 8 + 1 + 8 + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.Sfixed64Map) > 0 { + for k, v := range m.Sfixed64Map { + _ = k + _ = v + mapEntrySize := 1 + 8 + 1 + 8 + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.BoolMap) > 0 { + for k, v := range m.BoolMap { + _ = k + _ = v + mapEntrySize := 1 + 1 + 1 + 1 + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.StringMap) > 0 { + for k, v := range m.StringMap { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + 1 + len(v) + sovMapsproto2(uint64(len(v))) + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.StringToBytesMap) > 0 { + for k, v := range m.StringToBytesMap { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + 1 + len(v) + sovMapsproto2(uint64(len(v))) + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.StringToEnumMap) > 0 { + for k, v := range m.StringToEnumMap { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + 1 + sovMapsproto2(uint64(v)) + n += mapEntrySize + 2 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.StringToMsgMap) > 0 { + for k, v := range m.StringToMsgMap { + _ = k + _ = v + l = 0 + if v != nil { + l = v.Size() + } + mapEntrySize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + 1 + l + sovMapsproto2(uint64(l)) + n += mapEntrySize + 2 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func sovMapsproto2(x uint64) (n int) { + for { + n++ + x >>= 7 + if x == 0 { + break + } + } + return n +} +func sozMapsproto2(x uint64) (n int) { + return sovMapsproto2(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (this *FloatingPoint) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&FloatingPoint{`, + `F:` + valueToStringMapsproto2(this.F) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *AllMaps) String() string { + if this == nil { + return "nil" + } + keysForStringToDoubleMap := make([]string, 0, len(this.StringToDoubleMap)) + for k := range this.StringToDoubleMap { + keysForStringToDoubleMap = append(keysForStringToDoubleMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToDoubleMap) + mapStringForStringToDoubleMap := "map[string]float64{" + for _, k := range keysForStringToDoubleMap { + mapStringForStringToDoubleMap += fmt.Sprintf("%v: %v,", k, this.StringToDoubleMap[k]) + } + mapStringForStringToDoubleMap += "}" + keysForStringToFloatMap := make([]string, 0, len(this.StringToFloatMap)) + for k := range this.StringToFloatMap { + keysForStringToFloatMap = append(keysForStringToFloatMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToFloatMap) + mapStringForStringToFloatMap := "map[string]float32{" + for _, k := range keysForStringToFloatMap { + mapStringForStringToFloatMap += fmt.Sprintf("%v: %v,", k, this.StringToFloatMap[k]) + } + mapStringForStringToFloatMap += "}" + keysForInt32Map := make([]int32, 0, len(this.Int32Map)) + for k := range this.Int32Map { + keysForInt32Map = append(keysForInt32Map, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForInt32Map) + mapStringForInt32Map := "map[int32]int32{" + for _, k := range keysForInt32Map { + mapStringForInt32Map += fmt.Sprintf("%v: %v,", k, this.Int32Map[k]) + } + mapStringForInt32Map += "}" + keysForInt64Map := make([]int64, 0, len(this.Int64Map)) + for k := range this.Int64Map { + keysForInt64Map = append(keysForInt64Map, k) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForInt64Map) + mapStringForInt64Map := "map[int64]int64{" + for _, k := range keysForInt64Map { + mapStringForInt64Map += fmt.Sprintf("%v: %v,", k, this.Int64Map[k]) + } + mapStringForInt64Map += "}" + keysForUint32Map := make([]uint32, 0, len(this.Uint32Map)) + for k := range this.Uint32Map { + keysForUint32Map = append(keysForUint32Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint32s(keysForUint32Map) + mapStringForUint32Map := "map[uint32]uint32{" + for _, k := range keysForUint32Map { + mapStringForUint32Map += fmt.Sprintf("%v: %v,", k, this.Uint32Map[k]) + } + mapStringForUint32Map += "}" + keysForUint64Map := make([]uint64, 0, len(this.Uint64Map)) + for k := range this.Uint64Map { + keysForUint64Map = append(keysForUint64Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint64s(keysForUint64Map) + mapStringForUint64Map := "map[uint64]uint64{" + for _, k := range keysForUint64Map { + mapStringForUint64Map += fmt.Sprintf("%v: %v,", k, this.Uint64Map[k]) + } + mapStringForUint64Map += "}" + keysForSint32Map := make([]int32, 0, len(this.Sint32Map)) + for k := range this.Sint32Map { + keysForSint32Map = append(keysForSint32Map, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForSint32Map) + mapStringForSint32Map := "map[int32]int32{" + for _, k := range keysForSint32Map { + mapStringForSint32Map += fmt.Sprintf("%v: %v,", k, this.Sint32Map[k]) + } + mapStringForSint32Map += "}" + keysForSint64Map := make([]int64, 0, len(this.Sint64Map)) + for k := range this.Sint64Map { + keysForSint64Map = append(keysForSint64Map, k) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForSint64Map) + mapStringForSint64Map := "map[int64]int64{" + for _, k := range keysForSint64Map { + mapStringForSint64Map += fmt.Sprintf("%v: %v,", k, this.Sint64Map[k]) + } + mapStringForSint64Map += "}" + keysForFixed32Map := make([]uint32, 0, len(this.Fixed32Map)) + for k := range this.Fixed32Map { + keysForFixed32Map = append(keysForFixed32Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint32s(keysForFixed32Map) + mapStringForFixed32Map := "map[uint32]uint32{" + for _, k := range keysForFixed32Map { + mapStringForFixed32Map += fmt.Sprintf("%v: %v,", k, this.Fixed32Map[k]) + } + mapStringForFixed32Map += "}" + keysForSfixed32Map := make([]int32, 0, len(this.Sfixed32Map)) + for k := range this.Sfixed32Map { + keysForSfixed32Map = append(keysForSfixed32Map, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForSfixed32Map) + mapStringForSfixed32Map := "map[int32]int32{" + for _, k := range keysForSfixed32Map { + mapStringForSfixed32Map += fmt.Sprintf("%v: %v,", k, this.Sfixed32Map[k]) + } + mapStringForSfixed32Map += "}" + keysForFixed64Map := make([]uint64, 0, len(this.Fixed64Map)) + for k := range this.Fixed64Map { + keysForFixed64Map = append(keysForFixed64Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint64s(keysForFixed64Map) + mapStringForFixed64Map := "map[uint64]uint64{" + for _, k := range keysForFixed64Map { + mapStringForFixed64Map += fmt.Sprintf("%v: %v,", k, this.Fixed64Map[k]) + } + mapStringForFixed64Map += "}" + keysForSfixed64Map := make([]int64, 0, len(this.Sfixed64Map)) + for k := range this.Sfixed64Map { + keysForSfixed64Map = append(keysForSfixed64Map, k) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForSfixed64Map) + mapStringForSfixed64Map := "map[int64]int64{" + for _, k := range keysForSfixed64Map { + mapStringForSfixed64Map += fmt.Sprintf("%v: %v,", k, this.Sfixed64Map[k]) + } + mapStringForSfixed64Map += "}" + keysForBoolMap := make([]bool, 0, len(this.BoolMap)) + for k := range this.BoolMap { + keysForBoolMap = append(keysForBoolMap, k) + } + github_com_gogo_protobuf_sortkeys.Bools(keysForBoolMap) + mapStringForBoolMap := "map[bool]bool{" + for _, k := range keysForBoolMap { + mapStringForBoolMap += fmt.Sprintf("%v: %v,", k, this.BoolMap[k]) + } + mapStringForBoolMap += "}" + keysForStringMap := make([]string, 0, len(this.StringMap)) + for k := range this.StringMap { + keysForStringMap = append(keysForStringMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringMap) + mapStringForStringMap := "map[string]string{" + for _, k := range keysForStringMap { + mapStringForStringMap += fmt.Sprintf("%v: %v,", k, this.StringMap[k]) + } + mapStringForStringMap += "}" + keysForStringToBytesMap := make([]string, 0, len(this.StringToBytesMap)) + for k := range this.StringToBytesMap { + keysForStringToBytesMap = append(keysForStringToBytesMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToBytesMap) + mapStringForStringToBytesMap := "map[string][]byte{" + for _, k := range keysForStringToBytesMap { + mapStringForStringToBytesMap += fmt.Sprintf("%v: %v,", k, this.StringToBytesMap[k]) + } + mapStringForStringToBytesMap += "}" + keysForStringToEnumMap := make([]string, 0, len(this.StringToEnumMap)) + for k := range this.StringToEnumMap { + keysForStringToEnumMap = append(keysForStringToEnumMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToEnumMap) + mapStringForStringToEnumMap := "map[string]MapEnum{" + for _, k := range keysForStringToEnumMap { + mapStringForStringToEnumMap += fmt.Sprintf("%v: %v,", k, this.StringToEnumMap[k]) + } + mapStringForStringToEnumMap += "}" + keysForStringToMsgMap := make([]string, 0, len(this.StringToMsgMap)) + for k := range this.StringToMsgMap { + keysForStringToMsgMap = append(keysForStringToMsgMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToMsgMap) + mapStringForStringToMsgMap := "map[string]*FloatingPoint{" + for _, k := range keysForStringToMsgMap { + mapStringForStringToMsgMap += fmt.Sprintf("%v: %v,", k, this.StringToMsgMap[k]) + } + mapStringForStringToMsgMap += "}" + s := strings.Join([]string{`&AllMaps{`, + `StringToDoubleMap:` + mapStringForStringToDoubleMap + `,`, + `StringToFloatMap:` + mapStringForStringToFloatMap + `,`, + `Int32Map:` + mapStringForInt32Map + `,`, + `Int64Map:` + mapStringForInt64Map + `,`, + `Uint32Map:` + mapStringForUint32Map + `,`, + `Uint64Map:` + mapStringForUint64Map + `,`, + `Sint32Map:` + mapStringForSint32Map + `,`, + `Sint64Map:` + mapStringForSint64Map + `,`, + `Fixed32Map:` + mapStringForFixed32Map + `,`, + `Sfixed32Map:` + mapStringForSfixed32Map + `,`, + `Fixed64Map:` + mapStringForFixed64Map + `,`, + `Sfixed64Map:` + mapStringForSfixed64Map + `,`, + `BoolMap:` + mapStringForBoolMap + `,`, + `StringMap:` + mapStringForStringMap + `,`, + `StringToBytesMap:` + mapStringForStringToBytesMap + `,`, + `StringToEnumMap:` + mapStringForStringToEnumMap + `,`, + `StringToMsgMap:` + mapStringForStringToMsgMap + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *AllMapsOrdered) String() string { + if this == nil { + return "nil" + } + keysForStringToDoubleMap := make([]string, 0, len(this.StringToDoubleMap)) + for k := range this.StringToDoubleMap { + keysForStringToDoubleMap = append(keysForStringToDoubleMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToDoubleMap) + mapStringForStringToDoubleMap := "map[string]float64{" + for _, k := range keysForStringToDoubleMap { + mapStringForStringToDoubleMap += fmt.Sprintf("%v: %v,", k, this.StringToDoubleMap[k]) + } + mapStringForStringToDoubleMap += "}" + keysForStringToFloatMap := make([]string, 0, len(this.StringToFloatMap)) + for k := range this.StringToFloatMap { + keysForStringToFloatMap = append(keysForStringToFloatMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToFloatMap) + mapStringForStringToFloatMap := "map[string]float32{" + for _, k := range keysForStringToFloatMap { + mapStringForStringToFloatMap += fmt.Sprintf("%v: %v,", k, this.StringToFloatMap[k]) + } + mapStringForStringToFloatMap += "}" + keysForInt32Map := make([]int32, 0, len(this.Int32Map)) + for k := range this.Int32Map { + keysForInt32Map = append(keysForInt32Map, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForInt32Map) + mapStringForInt32Map := "map[int32]int32{" + for _, k := range keysForInt32Map { + mapStringForInt32Map += fmt.Sprintf("%v: %v,", k, this.Int32Map[k]) + } + mapStringForInt32Map += "}" + keysForInt64Map := make([]int64, 0, len(this.Int64Map)) + for k := range this.Int64Map { + keysForInt64Map = append(keysForInt64Map, k) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForInt64Map) + mapStringForInt64Map := "map[int64]int64{" + for _, k := range keysForInt64Map { + mapStringForInt64Map += fmt.Sprintf("%v: %v,", k, this.Int64Map[k]) + } + mapStringForInt64Map += "}" + keysForUint32Map := make([]uint32, 0, len(this.Uint32Map)) + for k := range this.Uint32Map { + keysForUint32Map = append(keysForUint32Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint32s(keysForUint32Map) + mapStringForUint32Map := "map[uint32]uint32{" + for _, k := range keysForUint32Map { + mapStringForUint32Map += fmt.Sprintf("%v: %v,", k, this.Uint32Map[k]) + } + mapStringForUint32Map += "}" + keysForUint64Map := make([]uint64, 0, len(this.Uint64Map)) + for k := range this.Uint64Map { + keysForUint64Map = append(keysForUint64Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint64s(keysForUint64Map) + mapStringForUint64Map := "map[uint64]uint64{" + for _, k := range keysForUint64Map { + mapStringForUint64Map += fmt.Sprintf("%v: %v,", k, this.Uint64Map[k]) + } + mapStringForUint64Map += "}" + keysForSint32Map := make([]int32, 0, len(this.Sint32Map)) + for k := range this.Sint32Map { + keysForSint32Map = append(keysForSint32Map, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForSint32Map) + mapStringForSint32Map := "map[int32]int32{" + for _, k := range keysForSint32Map { + mapStringForSint32Map += fmt.Sprintf("%v: %v,", k, this.Sint32Map[k]) + } + mapStringForSint32Map += "}" + keysForSint64Map := make([]int64, 0, len(this.Sint64Map)) + for k := range this.Sint64Map { + keysForSint64Map = append(keysForSint64Map, k) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForSint64Map) + mapStringForSint64Map := "map[int64]int64{" + for _, k := range keysForSint64Map { + mapStringForSint64Map += fmt.Sprintf("%v: %v,", k, this.Sint64Map[k]) + } + mapStringForSint64Map += "}" + keysForFixed32Map := make([]uint32, 0, len(this.Fixed32Map)) + for k := range this.Fixed32Map { + keysForFixed32Map = append(keysForFixed32Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint32s(keysForFixed32Map) + mapStringForFixed32Map := "map[uint32]uint32{" + for _, k := range keysForFixed32Map { + mapStringForFixed32Map += fmt.Sprintf("%v: %v,", k, this.Fixed32Map[k]) + } + mapStringForFixed32Map += "}" + keysForSfixed32Map := make([]int32, 0, len(this.Sfixed32Map)) + for k := range this.Sfixed32Map { + keysForSfixed32Map = append(keysForSfixed32Map, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForSfixed32Map) + mapStringForSfixed32Map := "map[int32]int32{" + for _, k := range keysForSfixed32Map { + mapStringForSfixed32Map += fmt.Sprintf("%v: %v,", k, this.Sfixed32Map[k]) + } + mapStringForSfixed32Map += "}" + keysForFixed64Map := make([]uint64, 0, len(this.Fixed64Map)) + for k := range this.Fixed64Map { + keysForFixed64Map = append(keysForFixed64Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint64s(keysForFixed64Map) + mapStringForFixed64Map := "map[uint64]uint64{" + for _, k := range keysForFixed64Map { + mapStringForFixed64Map += fmt.Sprintf("%v: %v,", k, this.Fixed64Map[k]) + } + mapStringForFixed64Map += "}" + keysForSfixed64Map := make([]int64, 0, len(this.Sfixed64Map)) + for k := range this.Sfixed64Map { + keysForSfixed64Map = append(keysForSfixed64Map, k) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForSfixed64Map) + mapStringForSfixed64Map := "map[int64]int64{" + for _, k := range keysForSfixed64Map { + mapStringForSfixed64Map += fmt.Sprintf("%v: %v,", k, this.Sfixed64Map[k]) + } + mapStringForSfixed64Map += "}" + keysForBoolMap := make([]bool, 0, len(this.BoolMap)) + for k := range this.BoolMap { + keysForBoolMap = append(keysForBoolMap, k) + } + github_com_gogo_protobuf_sortkeys.Bools(keysForBoolMap) + mapStringForBoolMap := "map[bool]bool{" + for _, k := range keysForBoolMap { + mapStringForBoolMap += fmt.Sprintf("%v: %v,", k, this.BoolMap[k]) + } + mapStringForBoolMap += "}" + keysForStringMap := make([]string, 0, len(this.StringMap)) + for k := range this.StringMap { + keysForStringMap = append(keysForStringMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringMap) + mapStringForStringMap := "map[string]string{" + for _, k := range keysForStringMap { + mapStringForStringMap += fmt.Sprintf("%v: %v,", k, this.StringMap[k]) + } + mapStringForStringMap += "}" + keysForStringToBytesMap := make([]string, 0, len(this.StringToBytesMap)) + for k := range this.StringToBytesMap { + keysForStringToBytesMap = append(keysForStringToBytesMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToBytesMap) + mapStringForStringToBytesMap := "map[string][]byte{" + for _, k := range keysForStringToBytesMap { + mapStringForStringToBytesMap += fmt.Sprintf("%v: %v,", k, this.StringToBytesMap[k]) + } + mapStringForStringToBytesMap += "}" + keysForStringToEnumMap := make([]string, 0, len(this.StringToEnumMap)) + for k := range this.StringToEnumMap { + keysForStringToEnumMap = append(keysForStringToEnumMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToEnumMap) + mapStringForStringToEnumMap := "map[string]MapEnum{" + for _, k := range keysForStringToEnumMap { + mapStringForStringToEnumMap += fmt.Sprintf("%v: %v,", k, this.StringToEnumMap[k]) + } + mapStringForStringToEnumMap += "}" + keysForStringToMsgMap := make([]string, 0, len(this.StringToMsgMap)) + for k := range this.StringToMsgMap { + keysForStringToMsgMap = append(keysForStringToMsgMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToMsgMap) + mapStringForStringToMsgMap := "map[string]*FloatingPoint{" + for _, k := range keysForStringToMsgMap { + mapStringForStringToMsgMap += fmt.Sprintf("%v: %v,", k, this.StringToMsgMap[k]) + } + mapStringForStringToMsgMap += "}" + s := strings.Join([]string{`&AllMapsOrdered{`, + `StringToDoubleMap:` + mapStringForStringToDoubleMap + `,`, + `StringToFloatMap:` + mapStringForStringToFloatMap + `,`, + `Int32Map:` + mapStringForInt32Map + `,`, + `Int64Map:` + mapStringForInt64Map + `,`, + `Uint32Map:` + mapStringForUint32Map + `,`, + `Uint64Map:` + mapStringForUint64Map + `,`, + `Sint32Map:` + mapStringForSint32Map + `,`, + `Sint64Map:` + mapStringForSint64Map + `,`, + `Fixed32Map:` + mapStringForFixed32Map + `,`, + `Sfixed32Map:` + mapStringForSfixed32Map + `,`, + `Fixed64Map:` + mapStringForFixed64Map + `,`, + `Sfixed64Map:` + mapStringForSfixed64Map + `,`, + `BoolMap:` + mapStringForBoolMap + `,`, + `StringMap:` + mapStringForStringMap + `,`, + `StringToBytesMap:` + mapStringForStringToBytesMap + `,`, + `StringToEnumMap:` + mapStringForStringToEnumMap + `,`, + `StringToMsgMap:` + mapStringForStringToMsgMap + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func valueToStringMapsproto2(v interface{}) string { + rv := reflect.ValueOf(v) + if rv.IsNil() { + return "nil" + } + pv := reflect.Indirect(rv).Interface() + return fmt.Sprintf("*%v", pv) +} +func (m *FloatingPoint) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *FloatingPoint) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.F != nil { + data[i] = 0x9 + i++ + *(*float64)(unsafe.Pointer(&data[i])) = *m.F + i += 8 + } + if m.XXX_unrecognized != nil { + i += copy(data[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *AllMaps) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *AllMaps) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.StringToDoubleMap) > 0 { + for k := range m.StringToDoubleMap { + data[i] = 0xa + i++ + v := m.StringToDoubleMap[k] + mapSize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + 1 + 8 + i = encodeVarintMapsproto2(data, i, uint64(mapSize)) + data[i] = 0xa + i++ + i = encodeVarintMapsproto2(data, i, uint64(len(k))) + i += copy(data[i:], k) + data[i] = 0x11 + i++ + i = encodeFixed64Mapsproto2(data, i, uint64(math.Float64bits(float64(v)))) + } + } + if len(m.StringToFloatMap) > 0 { + for k := range m.StringToFloatMap { + data[i] = 0x12 + i++ + v := m.StringToFloatMap[k] + mapSize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + 1 + 4 + i = encodeVarintMapsproto2(data, i, uint64(mapSize)) + data[i] = 0xa + i++ + i = encodeVarintMapsproto2(data, i, uint64(len(k))) + i += copy(data[i:], k) + data[i] = 0x15 + i++ + i = encodeFixed32Mapsproto2(data, i, uint32(math.Float32bits(float32(v)))) + } + } + if len(m.Int32Map) > 0 { + for k := range m.Int32Map { + data[i] = 0x1a + i++ + v := m.Int32Map[k] + mapSize := 1 + sovMapsproto2(uint64(k)) + 1 + sovMapsproto2(uint64(v)) + i = encodeVarintMapsproto2(data, i, uint64(mapSize)) + data[i] = 0x8 + i++ + i = encodeVarintMapsproto2(data, i, uint64(k)) + data[i] = 0x10 + i++ + i = encodeVarintMapsproto2(data, i, uint64(v)) + } + } + if len(m.Int64Map) > 0 { + for k := range m.Int64Map { + data[i] = 0x22 + i++ + v := m.Int64Map[k] + mapSize := 1 + sovMapsproto2(uint64(k)) + 1 + sovMapsproto2(uint64(v)) + i = encodeVarintMapsproto2(data, i, uint64(mapSize)) + data[i] = 0x8 + i++ + i = encodeVarintMapsproto2(data, i, uint64(k)) + data[i] = 0x10 + i++ + i = encodeVarintMapsproto2(data, i, uint64(v)) + } + } + if len(m.Uint32Map) > 0 { + for k := range m.Uint32Map { + data[i] = 0x2a + i++ + v := m.Uint32Map[k] + mapSize := 1 + sovMapsproto2(uint64(k)) + 1 + sovMapsproto2(uint64(v)) + i = encodeVarintMapsproto2(data, i, uint64(mapSize)) + data[i] = 0x8 + i++ + i = encodeVarintMapsproto2(data, i, uint64(k)) + data[i] = 0x10 + i++ + i = encodeVarintMapsproto2(data, i, uint64(v)) + } + } + if len(m.Uint64Map) > 0 { + for k := range m.Uint64Map { + data[i] = 0x32 + i++ + v := m.Uint64Map[k] + mapSize := 1 + sovMapsproto2(uint64(k)) + 1 + sovMapsproto2(uint64(v)) + i = encodeVarintMapsproto2(data, i, uint64(mapSize)) + data[i] = 0x8 + i++ + i = encodeVarintMapsproto2(data, i, uint64(k)) + data[i] = 0x10 + i++ + i = encodeVarintMapsproto2(data, i, uint64(v)) + } + } + if len(m.Sint32Map) > 0 { + for k := range m.Sint32Map { + data[i] = 0x3a + i++ + v := m.Sint32Map[k] + mapSize := 1 + sozMapsproto2(uint64(k)) + 1 + sozMapsproto2(uint64(v)) + i = encodeVarintMapsproto2(data, i, uint64(mapSize)) + data[i] = 0x8 + i++ + i = encodeVarintMapsproto2(data, i, uint64((uint32(k)<<1)^uint32((k>>31)))) + data[i] = 0x10 + i++ + i = encodeVarintMapsproto2(data, i, uint64((uint32(v)<<1)^uint32((v>>31)))) + } + } + if len(m.Sint64Map) > 0 { + for k := range m.Sint64Map { + data[i] = 0x42 + i++ + v := m.Sint64Map[k] + mapSize := 1 + sozMapsproto2(uint64(k)) + 1 + sozMapsproto2(uint64(v)) + i = encodeVarintMapsproto2(data, i, uint64(mapSize)) + data[i] = 0x8 + i++ + i = encodeVarintMapsproto2(data, i, uint64((uint64(k)<<1)^uint64((k>>63)))) + data[i] = 0x10 + i++ + i = encodeVarintMapsproto2(data, i, uint64((uint64(v)<<1)^uint64((v>>63)))) + } + } + if len(m.Fixed32Map) > 0 { + for k := range m.Fixed32Map { + data[i] = 0x4a + i++ + v := m.Fixed32Map[k] + mapSize := 1 + 4 + 1 + 4 + i = encodeVarintMapsproto2(data, i, uint64(mapSize)) + data[i] = 0xd + i++ + i = encodeFixed32Mapsproto2(data, i, uint32(k)) + data[i] = 0x15 + i++ + i = encodeFixed32Mapsproto2(data, i, uint32(v)) + } + } + if len(m.Sfixed32Map) > 0 { + for k := range m.Sfixed32Map { + data[i] = 0x52 + i++ + v := m.Sfixed32Map[k] + mapSize := 1 + 4 + 1 + 4 + i = encodeVarintMapsproto2(data, i, uint64(mapSize)) + data[i] = 0xd + i++ + i = encodeFixed32Mapsproto2(data, i, uint32(k)) + data[i] = 0x15 + i++ + i = encodeFixed32Mapsproto2(data, i, uint32(v)) + } + } + if len(m.Fixed64Map) > 0 { + for k := range m.Fixed64Map { + data[i] = 0x5a + i++ + v := m.Fixed64Map[k] + mapSize := 1 + 8 + 1 + 8 + i = encodeVarintMapsproto2(data, i, uint64(mapSize)) + data[i] = 0x9 + i++ + i = encodeFixed64Mapsproto2(data, i, uint64(k)) + data[i] = 0x11 + i++ + i = encodeFixed64Mapsproto2(data, i, uint64(v)) + } + } + if len(m.Sfixed64Map) > 0 { + for k := range m.Sfixed64Map { + data[i] = 0x62 + i++ + v := m.Sfixed64Map[k] + mapSize := 1 + 8 + 1 + 8 + i = encodeVarintMapsproto2(data, i, uint64(mapSize)) + data[i] = 0x9 + i++ + i = encodeFixed64Mapsproto2(data, i, uint64(k)) + data[i] = 0x11 + i++ + i = encodeFixed64Mapsproto2(data, i, uint64(v)) + } + } + if len(m.BoolMap) > 0 { + for k := range m.BoolMap { + data[i] = 0x6a + i++ + v := m.BoolMap[k] + mapSize := 1 + 1 + 1 + 1 + i = encodeVarintMapsproto2(data, i, uint64(mapSize)) + data[i] = 0x8 + i++ + if k { + data[i] = 1 + } else { + data[i] = 0 + } + i++ + data[i] = 0x10 + i++ + if v { + data[i] = 1 + } else { + data[i] = 0 + } + i++ + } + } + if len(m.StringMap) > 0 { + for k := range m.StringMap { + data[i] = 0x72 + i++ + v := m.StringMap[k] + mapSize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + 1 + len(v) + sovMapsproto2(uint64(len(v))) + i = encodeVarintMapsproto2(data, i, uint64(mapSize)) + data[i] = 0xa + i++ + i = encodeVarintMapsproto2(data, i, uint64(len(k))) + i += copy(data[i:], k) + data[i] = 0x12 + i++ + i = encodeVarintMapsproto2(data, i, uint64(len(v))) + i += copy(data[i:], v) + } + } + if len(m.StringToBytesMap) > 0 { + for k := range m.StringToBytesMap { + data[i] = 0x7a + i++ + v := m.StringToBytesMap[k] + mapSize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + 1 + len(v) + sovMapsproto2(uint64(len(v))) + i = encodeVarintMapsproto2(data, i, uint64(mapSize)) + data[i] = 0xa + i++ + i = encodeVarintMapsproto2(data, i, uint64(len(k))) + i += copy(data[i:], k) + data[i] = 0x12 + i++ + i = encodeVarintMapsproto2(data, i, uint64(len(v))) + i += copy(data[i:], v) + } + } + if len(m.StringToEnumMap) > 0 { + for k := range m.StringToEnumMap { + data[i] = 0x82 + i++ + data[i] = 0x1 + i++ + v := m.StringToEnumMap[k] + mapSize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + 1 + sovMapsproto2(uint64(v)) + i = encodeVarintMapsproto2(data, i, uint64(mapSize)) + data[i] = 0xa + i++ + i = encodeVarintMapsproto2(data, i, uint64(len(k))) + i += copy(data[i:], k) + data[i] = 0x10 + i++ + i = encodeVarintMapsproto2(data, i, uint64(v)) + } + } + if len(m.StringToMsgMap) > 0 { + for k := range m.StringToMsgMap { + data[i] = 0x8a + i++ + data[i] = 0x1 + i++ + v := m.StringToMsgMap[k] + if v == nil { + return 0, errors.New("proto: map has nil element") + } + msgSize := v.Size() + mapSize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + 1 + msgSize + sovMapsproto2(uint64(msgSize)) + i = encodeVarintMapsproto2(data, i, uint64(mapSize)) + data[i] = 0xa + i++ + i = encodeVarintMapsproto2(data, i, uint64(len(k))) + i += copy(data[i:], k) + data[i] = 0x12 + i++ + i = encodeVarintMapsproto2(data, i, uint64(v.Size())) + n1, err := v.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n1 + } + } + if m.XXX_unrecognized != nil { + i += copy(data[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *AllMapsOrdered) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *AllMapsOrdered) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.StringToDoubleMap) > 0 { + keysForStringToDoubleMap := make([]string, 0, len(m.StringToDoubleMap)) + for k := range m.StringToDoubleMap { + keysForStringToDoubleMap = append(keysForStringToDoubleMap, string(k)) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToDoubleMap) + for _, k := range keysForStringToDoubleMap { + data[i] = 0xa + i++ + v := m.StringToDoubleMap[string(k)] + mapSize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + 1 + 8 + i = encodeVarintMapsproto2(data, i, uint64(mapSize)) + data[i] = 0xa + i++ + i = encodeVarintMapsproto2(data, i, uint64(len(k))) + i += copy(data[i:], k) + data[i] = 0x11 + i++ + i = encodeFixed64Mapsproto2(data, i, uint64(math.Float64bits(float64(v)))) + } + } + if len(m.StringToFloatMap) > 0 { + keysForStringToFloatMap := make([]string, 0, len(m.StringToFloatMap)) + for k := range m.StringToFloatMap { + keysForStringToFloatMap = append(keysForStringToFloatMap, string(k)) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToFloatMap) + for _, k := range keysForStringToFloatMap { + data[i] = 0x12 + i++ + v := m.StringToFloatMap[string(k)] + mapSize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + 1 + 4 + i = encodeVarintMapsproto2(data, i, uint64(mapSize)) + data[i] = 0xa + i++ + i = encodeVarintMapsproto2(data, i, uint64(len(k))) + i += copy(data[i:], k) + data[i] = 0x15 + i++ + i = encodeFixed32Mapsproto2(data, i, uint32(math.Float32bits(float32(v)))) + } + } + if len(m.Int32Map) > 0 { + keysForInt32Map := make([]int32, 0, len(m.Int32Map)) + for k := range m.Int32Map { + keysForInt32Map = append(keysForInt32Map, int32(k)) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForInt32Map) + for _, k := range keysForInt32Map { + data[i] = 0x1a + i++ + v := m.Int32Map[int32(k)] + mapSize := 1 + sovMapsproto2(uint64(k)) + 1 + sovMapsproto2(uint64(v)) + i = encodeVarintMapsproto2(data, i, uint64(mapSize)) + data[i] = 0x8 + i++ + i = encodeVarintMapsproto2(data, i, uint64(k)) + data[i] = 0x10 + i++ + i = encodeVarintMapsproto2(data, i, uint64(v)) + } + } + if len(m.Int64Map) > 0 { + keysForInt64Map := make([]int64, 0, len(m.Int64Map)) + for k := range m.Int64Map { + keysForInt64Map = append(keysForInt64Map, int64(k)) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForInt64Map) + for _, k := range keysForInt64Map { + data[i] = 0x22 + i++ + v := m.Int64Map[int64(k)] + mapSize := 1 + sovMapsproto2(uint64(k)) + 1 + sovMapsproto2(uint64(v)) + i = encodeVarintMapsproto2(data, i, uint64(mapSize)) + data[i] = 0x8 + i++ + i = encodeVarintMapsproto2(data, i, uint64(k)) + data[i] = 0x10 + i++ + i = encodeVarintMapsproto2(data, i, uint64(v)) + } + } + if len(m.Uint32Map) > 0 { + keysForUint32Map := make([]uint32, 0, len(m.Uint32Map)) + for k := range m.Uint32Map { + keysForUint32Map = append(keysForUint32Map, uint32(k)) + } + github_com_gogo_protobuf_sortkeys.Uint32s(keysForUint32Map) + for _, k := range keysForUint32Map { + data[i] = 0x2a + i++ + v := m.Uint32Map[uint32(k)] + mapSize := 1 + sovMapsproto2(uint64(k)) + 1 + sovMapsproto2(uint64(v)) + i = encodeVarintMapsproto2(data, i, uint64(mapSize)) + data[i] = 0x8 + i++ + i = encodeVarintMapsproto2(data, i, uint64(k)) + data[i] = 0x10 + i++ + i = encodeVarintMapsproto2(data, i, uint64(v)) + } + } + if len(m.Uint64Map) > 0 { + keysForUint64Map := make([]uint64, 0, len(m.Uint64Map)) + for k := range m.Uint64Map { + keysForUint64Map = append(keysForUint64Map, uint64(k)) + } + github_com_gogo_protobuf_sortkeys.Uint64s(keysForUint64Map) + for _, k := range keysForUint64Map { + data[i] = 0x32 + i++ + v := m.Uint64Map[uint64(k)] + mapSize := 1 + sovMapsproto2(uint64(k)) + 1 + sovMapsproto2(uint64(v)) + i = encodeVarintMapsproto2(data, i, uint64(mapSize)) + data[i] = 0x8 + i++ + i = encodeVarintMapsproto2(data, i, uint64(k)) + data[i] = 0x10 + i++ + i = encodeVarintMapsproto2(data, i, uint64(v)) + } + } + if len(m.Sint32Map) > 0 { + keysForSint32Map := make([]int32, 0, len(m.Sint32Map)) + for k := range m.Sint32Map { + keysForSint32Map = append(keysForSint32Map, int32(k)) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForSint32Map) + for _, k := range keysForSint32Map { + data[i] = 0x3a + i++ + v := m.Sint32Map[int32(k)] + mapSize := 1 + sozMapsproto2(uint64(k)) + 1 + sozMapsproto2(uint64(v)) + i = encodeVarintMapsproto2(data, i, uint64(mapSize)) + data[i] = 0x8 + i++ + i = encodeVarintMapsproto2(data, i, uint64((uint32(k)<<1)^uint32((k>>31)))) + data[i] = 0x10 + i++ + i = encodeVarintMapsproto2(data, i, uint64((uint32(v)<<1)^uint32((v>>31)))) + } + } + if len(m.Sint64Map) > 0 { + keysForSint64Map := make([]int64, 0, len(m.Sint64Map)) + for k := range m.Sint64Map { + keysForSint64Map = append(keysForSint64Map, int64(k)) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForSint64Map) + for _, k := range keysForSint64Map { + data[i] = 0x42 + i++ + v := m.Sint64Map[int64(k)] + mapSize := 1 + sozMapsproto2(uint64(k)) + 1 + sozMapsproto2(uint64(v)) + i = encodeVarintMapsproto2(data, i, uint64(mapSize)) + data[i] = 0x8 + i++ + i = encodeVarintMapsproto2(data, i, uint64((uint64(k)<<1)^uint64((k>>63)))) + data[i] = 0x10 + i++ + i = encodeVarintMapsproto2(data, i, uint64((uint64(v)<<1)^uint64((v>>63)))) + } + } + if len(m.Fixed32Map) > 0 { + keysForFixed32Map := make([]uint32, 0, len(m.Fixed32Map)) + for k := range m.Fixed32Map { + keysForFixed32Map = append(keysForFixed32Map, uint32(k)) + } + github_com_gogo_protobuf_sortkeys.Uint32s(keysForFixed32Map) + for _, k := range keysForFixed32Map { + data[i] = 0x4a + i++ + v := m.Fixed32Map[uint32(k)] + mapSize := 1 + 4 + 1 + 4 + i = encodeVarintMapsproto2(data, i, uint64(mapSize)) + data[i] = 0xd + i++ + i = encodeFixed32Mapsproto2(data, i, uint32(k)) + data[i] = 0x15 + i++ + i = encodeFixed32Mapsproto2(data, i, uint32(v)) + } + } + if len(m.Sfixed32Map) > 0 { + keysForSfixed32Map := make([]int32, 0, len(m.Sfixed32Map)) + for k := range m.Sfixed32Map { + keysForSfixed32Map = append(keysForSfixed32Map, int32(k)) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForSfixed32Map) + for _, k := range keysForSfixed32Map { + data[i] = 0x52 + i++ + v := m.Sfixed32Map[int32(k)] + mapSize := 1 + 4 + 1 + 4 + i = encodeVarintMapsproto2(data, i, uint64(mapSize)) + data[i] = 0xd + i++ + i = encodeFixed32Mapsproto2(data, i, uint32(k)) + data[i] = 0x15 + i++ + i = encodeFixed32Mapsproto2(data, i, uint32(v)) + } + } + if len(m.Fixed64Map) > 0 { + keysForFixed64Map := make([]uint64, 0, len(m.Fixed64Map)) + for k := range m.Fixed64Map { + keysForFixed64Map = append(keysForFixed64Map, uint64(k)) + } + github_com_gogo_protobuf_sortkeys.Uint64s(keysForFixed64Map) + for _, k := range keysForFixed64Map { + data[i] = 0x5a + i++ + v := m.Fixed64Map[uint64(k)] + mapSize := 1 + 8 + 1 + 8 + i = encodeVarintMapsproto2(data, i, uint64(mapSize)) + data[i] = 0x9 + i++ + i = encodeFixed64Mapsproto2(data, i, uint64(k)) + data[i] = 0x11 + i++ + i = encodeFixed64Mapsproto2(data, i, uint64(v)) + } + } + if len(m.Sfixed64Map) > 0 { + keysForSfixed64Map := make([]int64, 0, len(m.Sfixed64Map)) + for k := range m.Sfixed64Map { + keysForSfixed64Map = append(keysForSfixed64Map, int64(k)) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForSfixed64Map) + for _, k := range keysForSfixed64Map { + data[i] = 0x62 + i++ + v := m.Sfixed64Map[int64(k)] + mapSize := 1 + 8 + 1 + 8 + i = encodeVarintMapsproto2(data, i, uint64(mapSize)) + data[i] = 0x9 + i++ + i = encodeFixed64Mapsproto2(data, i, uint64(k)) + data[i] = 0x11 + i++ + i = encodeFixed64Mapsproto2(data, i, uint64(v)) + } + } + if len(m.BoolMap) > 0 { + keysForBoolMap := make([]bool, 0, len(m.BoolMap)) + for k := range m.BoolMap { + keysForBoolMap = append(keysForBoolMap, bool(k)) + } + github_com_gogo_protobuf_sortkeys.Bools(keysForBoolMap) + for _, k := range keysForBoolMap { + data[i] = 0x6a + i++ + v := m.BoolMap[bool(k)] + mapSize := 1 + 1 + 1 + 1 + i = encodeVarintMapsproto2(data, i, uint64(mapSize)) + data[i] = 0x8 + i++ + if k { + data[i] = 1 + } else { + data[i] = 0 + } + i++ + data[i] = 0x10 + i++ + if v { + data[i] = 1 + } else { + data[i] = 0 + } + i++ + } + } + if len(m.StringMap) > 0 { + keysForStringMap := make([]string, 0, len(m.StringMap)) + for k := range m.StringMap { + keysForStringMap = append(keysForStringMap, string(k)) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringMap) + for _, k := range keysForStringMap { + data[i] = 0x72 + i++ + v := m.StringMap[string(k)] + mapSize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + 1 + len(v) + sovMapsproto2(uint64(len(v))) + i = encodeVarintMapsproto2(data, i, uint64(mapSize)) + data[i] = 0xa + i++ + i = encodeVarintMapsproto2(data, i, uint64(len(k))) + i += copy(data[i:], k) + data[i] = 0x12 + i++ + i = encodeVarintMapsproto2(data, i, uint64(len(v))) + i += copy(data[i:], v) + } + } + if len(m.StringToBytesMap) > 0 { + keysForStringToBytesMap := make([]string, 0, len(m.StringToBytesMap)) + for k := range m.StringToBytesMap { + keysForStringToBytesMap = append(keysForStringToBytesMap, string(k)) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToBytesMap) + for _, k := range keysForStringToBytesMap { + data[i] = 0x7a + i++ + v := m.StringToBytesMap[string(k)] + mapSize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + 1 + len(v) + sovMapsproto2(uint64(len(v))) + i = encodeVarintMapsproto2(data, i, uint64(mapSize)) + data[i] = 0xa + i++ + i = encodeVarintMapsproto2(data, i, uint64(len(k))) + i += copy(data[i:], k) + data[i] = 0x12 + i++ + i = encodeVarintMapsproto2(data, i, uint64(len(v))) + i += copy(data[i:], v) + } + } + if len(m.StringToEnumMap) > 0 { + keysForStringToEnumMap := make([]string, 0, len(m.StringToEnumMap)) + for k := range m.StringToEnumMap { + keysForStringToEnumMap = append(keysForStringToEnumMap, string(k)) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToEnumMap) + for _, k := range keysForStringToEnumMap { + data[i] = 0x82 + i++ + data[i] = 0x1 + i++ + v := m.StringToEnumMap[string(k)] + mapSize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + 1 + sovMapsproto2(uint64(v)) + i = encodeVarintMapsproto2(data, i, uint64(mapSize)) + data[i] = 0xa + i++ + i = encodeVarintMapsproto2(data, i, uint64(len(k))) + i += copy(data[i:], k) + data[i] = 0x10 + i++ + i = encodeVarintMapsproto2(data, i, uint64(v)) + } + } + if len(m.StringToMsgMap) > 0 { + keysForStringToMsgMap := make([]string, 0, len(m.StringToMsgMap)) + for k := range m.StringToMsgMap { + keysForStringToMsgMap = append(keysForStringToMsgMap, string(k)) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToMsgMap) + for _, k := range keysForStringToMsgMap { + data[i] = 0x8a + i++ + data[i] = 0x1 + i++ + v := m.StringToMsgMap[string(k)] + if v == nil { + return 0, errors.New("proto: map has nil element") + } + msgSize := v.Size() + mapSize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + 1 + msgSize + sovMapsproto2(uint64(msgSize)) + i = encodeVarintMapsproto2(data, i, uint64(mapSize)) + data[i] = 0xa + i++ + i = encodeVarintMapsproto2(data, i, uint64(len(k))) + i += copy(data[i:], k) + data[i] = 0x12 + i++ + i = encodeVarintMapsproto2(data, i, uint64(v.Size())) + n2, err := v.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n2 + } + } + if m.XXX_unrecognized != nil { + i += copy(data[i:], m.XXX_unrecognized) + } + return i, nil +} + +func encodeFixed64Mapsproto2(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 encodeFixed32Mapsproto2(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 encodeVarintMapsproto2(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 +} + +var fileDescriptorMapsproto2 = []byte{ + // 974 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xec, 0x96, 0xbd, 0x6f, 0xeb, 0x54, + 0x18, 0xc6, 0xeb, 0x7c, 0xe7, 0xe4, 0xcb, 0x39, 0x2d, 0x28, 0x8a, 0x44, 0xa0, 0x01, 0x44, 0x9a, + 0x42, 0x52, 0x02, 0x42, 0xa8, 0x85, 0x4a, 0x4d, 0x9b, 0x12, 0x54, 0x5a, 0xaa, 0x86, 0x6f, 0xa9, + 0x12, 0x09, 0x75, 0xd2, 0x88, 0x24, 0xae, 0x62, 0x1b, 0xd1, 0xad, 0x7f, 0x06, 0x2b, 0x1b, 0x23, + 0x23, 0x23, 0x63, 0xc7, 0x3b, 0x76, 0xb8, 0x43, 0xdb, 0xbb, 0x74, 0xec, 0xd8, 0xf1, 0x1e, 0x9f, + 0x63, 0x3b, 0xc7, 0xf6, 0x6b, 0x3b, 0x77, 0xbb, 0x43, 0x86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0c, + 0xf2, 0xcc, 0x22, 0xc6, 0x49, 0x0c, 0x8d, 0xa9, 0xa1, 0xff, 0xec, 0x53, 0x5d, 0x1f, 0xf1, 0xd7, + 0xd3, 0xa2, 0x99, 0x9e, 0x4e, 0xf1, 0x0e, 0x4a, 0x7e, 0x6f, 0xc2, 0x0a, 0x51, 0x0a, 0x78, 0x17, + 0x04, 0x58, 0x55, 0x8c, 0x90, 0xd4, 0x2c, 0x0b, 0x06, 0x82, 0x79, 0x88, 0x05, 0x20, 0x38, 0x13, + 0x14, 0x61, 0xb9, 0xe8, 0x58, 0x2e, 0xe2, 0x3e, 0x88, 0x8e, 0xc3, 0x85, 0xc2, 0xbb, 0xe8, 0x58, + 0x2e, 0x12, 0x01, 0x08, 0xde, 0x85, 0x62, 0xb9, 0xd8, 0x43, 0x68, 0x7f, 0xf8, 0xa7, 0x74, 0xc6, + 0x6c, 0x24, 0x29, 0xe3, 0x3d, 0x90, 0x31, 0x2b, 0x63, 0x10, 0xd4, 0xb7, 0x16, 0xf0, 0x57, 0x28, + 0xd5, 0x99, 0x4d, 0x0b, 0x88, 0x62, 0xde, 0x87, 0xad, 0xf4, 0x1d, 0x9c, 0x94, 0xc2, 0x81, 0x4c, + 0x3b, 0xec, 0x91, 0x52, 0x41, 0x76, 0xb8, 0x67, 0x62, 0x76, 0xd8, 0x43, 0x59, 0x76, 0x18, 0x26, + 0x1d, 0x68, 0x87, 0xe3, 0x18, 0x76, 0x18, 0x68, 0x0b, 0xc5, 0x9b, 0xb2, 0xac, 0x57, 0x16, 0x32, + 0x14, 0xb2, 0x0a, 0x42, 0x8c, 0x1a, 0x06, 0x88, 0xf7, 0xd8, 0x8c, 0xbe, 0x1d, 0xfa, 0xe9, 0xeb, + 0xf2, 0xac, 0xdf, 0xdb, 0x31, 0xab, 0xcc, 0xb7, 0x63, 0xce, 0xf9, 0x13, 0xd8, 0xbc, 0x54, 0x25, + 0x45, 0x27, 0xe5, 0xe6, 0x38, 0x81, 0x66, 0xb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x39, 0xcc, 0x79, 0xa5, 0xb6, 0xa6, 0x33, 0xb5, 0x55, 0xfc, 0x58, 0x70, 0x78, + 0x6b, 0xbb, 0xc3, 0x5b, 0x35, 0xf8, 0x2c, 0x42, 0x19, 0xee, 0xd4, 0x33, 0xc3, 0xcd, 0x75, 0xb8, + 0x83, 0xa2, 0xdc, 0x2f, 0x5e, 0x51, 0x6e, 0x63, 0x1e, 0xba, 0x7f, 0xa2, 0xfb, 0xd1, 0x23, 0xd1, + 0xd5, 0xe7, 0x41, 0x2f, 0x82, 0xdd, 0x22, 0xd8, 0x2d, 0x82, 0xdd, 0x22, 0xd8, 0xbd, 0x1e, 0xc1, + 0x6e, 0x33, 0xf2, 0xd7, 0xdf, 0x6f, 0x0b, 0xd5, 0x55, 0x14, 0x37, 0xb6, 0xc6, 0x31, 0x14, 0x3a, + 0xdc, 0x11, 0x97, 0xe8, 0xb5, 0x29, 0x0a, 0xf4, 0xba, 0x2b, 0x86, 0x9a, 0xdf, 0x5c, 0xdf, 0x95, + 0x96, 0x9e, 0x91, 0x71, 0x43, 0xc6, 0xed, 0x5d, 0x49, 0x78, 0x20, 0xe3, 0x91, 0x8c, 0x27, 0x32, + 0xae, 0xee, 0x4b, 0xc2, 0x3f, 0x64, 0xfc, 0x4b, 0xc6, 0x7f, 0x64, 0xfc, 0x4f, 0xc6, 0xf5, 0x3d, + 0xa9, 0x27, 0xe3, 0x96, 0xdc, 0x3f, 0x90, 0xeb, 0x23, 0xb9, 0x3e, 0x91, 0x71, 0xf5, 0xa2, 0xb4, + 0xf4, 0x32, 0x00, 0x00, 0xff, 0xff, 0x90, 0x58, 0x7f, 0x30, 0x2f, 0x14, 0x00, 0x00, +} diff --git a/vendor/github.com/gogo/protobuf/test/mapsproto2/combos/unsafemarshaler/mapsproto2.proto b/vendor/github.com/gogo/protobuf/test/mapsproto2/combos/unsafemarshaler/mapsproto2.proto new file mode 100644 index 000000000..d86af368f --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/mapsproto2/combos/unsafemarshaler/mapsproto2.proto @@ -0,0 +1,115 @@ +// Copyright (c) 2013, Vastech SA (PTY) LTD. All rights reserved. +// http://github.com/gogo/protobuf/gogoproto +// +// Go support for Protocol Buffers - Google's data interchange format +// +// Copyright 2014 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. + +syntax = "proto2"; + +package proto2.maps; + +import "github.com/gogo/protobuf/gogoproto/gogo.proto"; + +option (gogoproto.goproto_stringer_all) = false; +option (gogoproto.goproto_enum_prefix_all) = false; +option (gogoproto.goproto_getters_all) = false; + +option (gogoproto.equal_all) = true; +option (gogoproto.verbose_equal_all) = true; +option (gogoproto.stringer_all) = true; +option (gogoproto.gostring_all) = true; +option (gogoproto.face_all) = true; +option (gogoproto.description_all) = true; + +option (gogoproto.testgen_all) = true; +option (gogoproto.populate_all) = true; +option (gogoproto.benchgen_all) = true; +option (gogoproto.unmarshaler_all) = false; +option (gogoproto.marshaler_all) = false; +option (gogoproto.sizer_all) = true; + +option (gogoproto.goproto_enum_stringer_all) = false; +option (gogoproto.enum_stringer_all) = true; + +option (gogoproto.unsafe_marshaler_all) = true; +option (gogoproto.unsafe_unmarshaler_all) = false; + +message FloatingPoint { + optional double f = 1; +} + +enum MapEnum { + MA = 0; + MB = 1; + MC = 2; +} + +message AllMaps { + map StringToDoubleMap = 1; + map StringToFloatMap = 2; + map Int32Map = 3; + map Int64Map = 4; + map Uint32Map = 5; + map Uint64Map = 6; + map Sint32Map = 7; + map Sint64Map = 8; + map Fixed32Map = 9; + map Sfixed32Map = 10; + map Fixed64Map = 11; + map Sfixed64Map = 12; + map BoolMap = 13; + map StringMap = 14; + map StringToBytesMap = 15; + map StringToEnumMap = 16; + map StringToMsgMap = 17; +} + +message AllMapsOrdered { + option (gogoproto.stable_marshaler) = true; + + map StringToDoubleMap = 1; + map StringToFloatMap = 2; + map Int32Map = 3; + map Int64Map = 4; + map Uint32Map = 5; + map Uint64Map = 6; + map Sint32Map = 7; + map Sint64Map = 8; + map Fixed32Map = 9; + map Sfixed32Map = 10; + map Fixed64Map = 11; + map Sfixed64Map = 12; + map BoolMap = 13; + map StringMap = 14; + map StringToBytesMap = 15; + map StringToEnumMap = 16; + map StringToMsgMap = 17; +} diff --git a/vendor/github.com/gogo/protobuf/test/mapsproto2/combos/unsafemarshaler/mapsproto2pb_test.go b/vendor/github.com/gogo/protobuf/test/mapsproto2/combos/unsafemarshaler/mapsproto2pb_test.go new file mode 100644 index 000000000..0d1e7df3d --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/mapsproto2/combos/unsafemarshaler/mapsproto2pb_test.go @@ -0,0 +1,752 @@ +// Code generated by protoc-gen-gogo. +// source: combos/unsafemarshaler/mapsproto2.proto +// DO NOT EDIT! + +/* +Package proto2_maps is a generated protocol buffer package. + +It is generated from these files: + combos/unsafemarshaler/mapsproto2.proto + +It has these top-level messages: + FloatingPoint + AllMaps + AllMapsOrdered +*/ +package proto2_maps + +import testing "testing" +import math_rand "math/rand" +import time "time" +import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" +import github_com_gogo_protobuf_jsonpb "github.com/gogo/protobuf/jsonpb" +import fmt "fmt" +import go_parser "go/parser" +import proto "github.com/gogo/protobuf/proto" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +func TestFloatingPointProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedFloatingPoint(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &FloatingPoint{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestFloatingPointMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedFloatingPoint(popr, false) + size := p.Size() + data := make([]byte, size) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(data) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &FloatingPoint{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkFloatingPointProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*FloatingPoint, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedFloatingPoint(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkFloatingPointProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedFloatingPoint(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &FloatingPoint{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestAllMapsProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAllMaps(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &AllMaps{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestAllMapsMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAllMaps(popr, false) + size := p.Size() + data := make([]byte, size) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(data) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &AllMaps{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkAllMapsProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*AllMaps, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedAllMaps(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkAllMapsProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedAllMaps(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &AllMaps{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestAllMapsOrderedProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAllMapsOrdered(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &AllMapsOrdered{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestAllMapsOrderedMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAllMapsOrdered(popr, false) + size := p.Size() + data := make([]byte, size) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(data) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &AllMapsOrdered{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkAllMapsOrderedProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*AllMapsOrdered, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedAllMapsOrdered(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkAllMapsOrderedProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedAllMapsOrdered(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &AllMapsOrdered{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestFloatingPointJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedFloatingPoint(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &FloatingPoint{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestAllMapsJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAllMaps(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &AllMaps{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestAllMapsOrderedJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAllMapsOrdered(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &AllMapsOrdered{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestFloatingPointProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedFloatingPoint(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &FloatingPoint{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestFloatingPointProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedFloatingPoint(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &FloatingPoint{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestAllMapsProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAllMaps(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &AllMaps{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestAllMapsProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAllMaps(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &AllMaps{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestAllMapsOrderedProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAllMapsOrdered(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &AllMapsOrdered{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestAllMapsOrderedProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAllMapsOrdered(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &AllMapsOrdered{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestMapsproto2Description(t *testing.T) { + Mapsproto2Description() +} +func TestFloatingPointVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedFloatingPoint(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &FloatingPoint{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestAllMapsVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAllMaps(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &AllMaps{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestAllMapsOrderedVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAllMapsOrdered(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &AllMapsOrdered{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestFloatingPointFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedFloatingPoint(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestAllMapsFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAllMaps(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestAllMapsOrderedFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAllMapsOrdered(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestFloatingPointGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedFloatingPoint(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestAllMapsGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAllMaps(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestAllMapsOrderedGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAllMapsOrdered(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestFloatingPointSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedFloatingPoint(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkFloatingPointSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*FloatingPoint, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedFloatingPoint(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestAllMapsSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAllMaps(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkAllMapsSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*AllMaps, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedAllMaps(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestAllMapsOrderedSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAllMapsOrdered(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkAllMapsOrderedSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*AllMapsOrdered, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedAllMapsOrdered(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestFloatingPointStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedFloatingPoint(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestAllMapsStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAllMaps(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestAllMapsOrderedStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAllMapsOrdered(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} + +//These tests are generated by github.com/gogo/protobuf/plugin/testgen diff --git a/vendor/github.com/gogo/protobuf/test/mapsproto2/combos/unsafeunmarshaler/mapsproto2.pb.go b/vendor/github.com/gogo/protobuf/test/mapsproto2/combos/unsafeunmarshaler/mapsproto2.pb.go new file mode 100644 index 000000000..fa73b124b --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/mapsproto2/combos/unsafeunmarshaler/mapsproto2.pb.go @@ -0,0 +1,6675 @@ +// Code generated by protoc-gen-gogo. +// source: combos/unsafeunmarshaler/mapsproto2.proto +// DO NOT EDIT! + +/* + Package proto2_maps is a generated protocol buffer package. + + It is generated from these files: + combos/unsafeunmarshaler/mapsproto2.proto + + It has these top-level messages: + FloatingPoint + AllMaps + AllMapsOrdered +*/ +package proto2_maps + +import proto "github.com/gogo/protobuf/proto" +import fmt "fmt" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" + +import github_com_gogo_protobuf_protoc_gen_gogo_descriptor "github.com/gogo/protobuf/protoc-gen-gogo/descriptor" +import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" +import compress_gzip "compress/gzip" +import bytes "bytes" +import io_ioutil "io/ioutil" + +import strconv "strconv" + +import strings "strings" +import sort "sort" +import reflect "reflect" +import github_com_gogo_protobuf_sortkeys "github.com/gogo/protobuf/sortkeys" + +import io "io" +import unsafe "unsafe" + +// 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. +const _ = proto.GoGoProtoPackageIsVersion1 + +type MapEnum int32 + +const ( + MA MapEnum = 0 + MB MapEnum = 1 + MC MapEnum = 2 +) + +var MapEnum_name = map[int32]string{ + 0: "MA", + 1: "MB", + 2: "MC", +} +var MapEnum_value = map[string]int32{ + "MA": 0, + "MB": 1, + "MC": 2, +} + +func (x MapEnum) Enum() *MapEnum { + p := new(MapEnum) + *p = x + return p +} +func (x MapEnum) MarshalJSON() ([]byte, error) { + return proto.MarshalJSONEnum(MapEnum_name, int32(x)) +} +func (x *MapEnum) UnmarshalJSON(data []byte) error { + value, err := proto.UnmarshalJSONEnum(MapEnum_value, data, "MapEnum") + if err != nil { + return err + } + *x = MapEnum(value) + return nil +} +func (MapEnum) EnumDescriptor() ([]byte, []int) { return fileDescriptorMapsproto2, []int{0} } + +type FloatingPoint struct { + F *float64 `protobuf:"fixed64,1,opt,name=f" json:"f,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *FloatingPoint) Reset() { *m = FloatingPoint{} } +func (*FloatingPoint) ProtoMessage() {} +func (*FloatingPoint) Descriptor() ([]byte, []int) { return fileDescriptorMapsproto2, []int{0} } + +type AllMaps struct { + StringToDoubleMap map[string]float64 `protobuf:"bytes,1,rep,name=StringToDoubleMap,json=stringToDoubleMap" json:"StringToDoubleMap,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"fixed64,2,opt,name=value"` + StringToFloatMap map[string]float32 `protobuf:"bytes,2,rep,name=StringToFloatMap,json=stringToFloatMap" json:"StringToFloatMap,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"fixed32,2,opt,name=value"` + Int32Map map[int32]int32 `protobuf:"bytes,3,rep,name=Int32Map,json=int32Map" json:"Int32Map,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"varint,2,opt,name=value"` + Int64Map map[int64]int64 `protobuf:"bytes,4,rep,name=Int64Map,json=int64Map" json:"Int64Map,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"varint,2,opt,name=value"` + Uint32Map map[uint32]uint32 `protobuf:"bytes,5,rep,name=Uint32Map,json=uint32Map" json:"Uint32Map,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"varint,2,opt,name=value"` + Uint64Map map[uint64]uint64 `protobuf:"bytes,6,rep,name=Uint64Map,json=uint64Map" json:"Uint64Map,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"varint,2,opt,name=value"` + Sint32Map map[int32]int32 `protobuf:"bytes,7,rep,name=Sint32Map,json=sint32Map" json:"Sint32Map,omitempty" protobuf_key:"zigzag32,1,opt,name=key" protobuf_val:"zigzag32,2,opt,name=value"` + Sint64Map map[int64]int64 `protobuf:"bytes,8,rep,name=Sint64Map,json=sint64Map" json:"Sint64Map,omitempty" protobuf_key:"zigzag64,1,opt,name=key" protobuf_val:"zigzag64,2,opt,name=value"` + Fixed32Map map[uint32]uint32 `protobuf:"bytes,9,rep,name=Fixed32Map,json=fixed32Map" json:"Fixed32Map,omitempty" protobuf_key:"fixed32,1,opt,name=key" protobuf_val:"fixed32,2,opt,name=value"` + Sfixed32Map map[int32]int32 `protobuf:"bytes,10,rep,name=Sfixed32Map,json=sfixed32Map" json:"Sfixed32Map,omitempty" protobuf_key:"fixed32,1,opt,name=key" protobuf_val:"fixed32,2,opt,name=value"` + Fixed64Map map[uint64]uint64 `protobuf:"bytes,11,rep,name=Fixed64Map,json=fixed64Map" json:"Fixed64Map,omitempty" protobuf_key:"fixed64,1,opt,name=key" protobuf_val:"fixed64,2,opt,name=value"` + Sfixed64Map map[int64]int64 `protobuf:"bytes,12,rep,name=Sfixed64Map,json=sfixed64Map" json:"Sfixed64Map,omitempty" protobuf_key:"fixed64,1,opt,name=key" protobuf_val:"fixed64,2,opt,name=value"` + BoolMap map[bool]bool `protobuf:"bytes,13,rep,name=BoolMap,json=boolMap" json:"BoolMap,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"varint,2,opt,name=value"` + StringMap map[string]string `protobuf:"bytes,14,rep,name=StringMap,json=stringMap" json:"StringMap,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + StringToBytesMap map[string][]byte `protobuf:"bytes,15,rep,name=StringToBytesMap,json=stringToBytesMap" json:"StringToBytesMap,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + StringToEnumMap map[string]MapEnum `protobuf:"bytes,16,rep,name=StringToEnumMap,json=stringToEnumMap" json:"StringToEnumMap,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"varint,2,opt,name=value,enum=proto2.maps.MapEnum"` + StringToMsgMap map[string]*FloatingPoint `protobuf:"bytes,17,rep,name=StringToMsgMap,json=stringToMsgMap" json:"StringToMsgMap,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *AllMaps) Reset() { *m = AllMaps{} } +func (*AllMaps) ProtoMessage() {} +func (*AllMaps) Descriptor() ([]byte, []int) { return fileDescriptorMapsproto2, []int{1} } + +type AllMapsOrdered struct { + StringToDoubleMap map[string]float64 `protobuf:"bytes,1,rep,name=StringToDoubleMap,json=stringToDoubleMap" json:"StringToDoubleMap,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"fixed64,2,opt,name=value"` + StringToFloatMap map[string]float32 `protobuf:"bytes,2,rep,name=StringToFloatMap,json=stringToFloatMap" json:"StringToFloatMap,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"fixed32,2,opt,name=value"` + Int32Map map[int32]int32 `protobuf:"bytes,3,rep,name=Int32Map,json=int32Map" json:"Int32Map,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"varint,2,opt,name=value"` + Int64Map map[int64]int64 `protobuf:"bytes,4,rep,name=Int64Map,json=int64Map" json:"Int64Map,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"varint,2,opt,name=value"` + Uint32Map map[uint32]uint32 `protobuf:"bytes,5,rep,name=Uint32Map,json=uint32Map" json:"Uint32Map,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"varint,2,opt,name=value"` + Uint64Map map[uint64]uint64 `protobuf:"bytes,6,rep,name=Uint64Map,json=uint64Map" json:"Uint64Map,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"varint,2,opt,name=value"` + Sint32Map map[int32]int32 `protobuf:"bytes,7,rep,name=Sint32Map,json=sint32Map" json:"Sint32Map,omitempty" protobuf_key:"zigzag32,1,opt,name=key" protobuf_val:"zigzag32,2,opt,name=value"` + Sint64Map map[int64]int64 `protobuf:"bytes,8,rep,name=Sint64Map,json=sint64Map" json:"Sint64Map,omitempty" protobuf_key:"zigzag64,1,opt,name=key" protobuf_val:"zigzag64,2,opt,name=value"` + Fixed32Map map[uint32]uint32 `protobuf:"bytes,9,rep,name=Fixed32Map,json=fixed32Map" json:"Fixed32Map,omitempty" protobuf_key:"fixed32,1,opt,name=key" protobuf_val:"fixed32,2,opt,name=value"` + Sfixed32Map map[int32]int32 `protobuf:"bytes,10,rep,name=Sfixed32Map,json=sfixed32Map" json:"Sfixed32Map,omitempty" protobuf_key:"fixed32,1,opt,name=key" protobuf_val:"fixed32,2,opt,name=value"` + Fixed64Map map[uint64]uint64 `protobuf:"bytes,11,rep,name=Fixed64Map,json=fixed64Map" json:"Fixed64Map,omitempty" protobuf_key:"fixed64,1,opt,name=key" protobuf_val:"fixed64,2,opt,name=value"` + Sfixed64Map map[int64]int64 `protobuf:"bytes,12,rep,name=Sfixed64Map,json=sfixed64Map" json:"Sfixed64Map,omitempty" protobuf_key:"fixed64,1,opt,name=key" protobuf_val:"fixed64,2,opt,name=value"` + BoolMap map[bool]bool `protobuf:"bytes,13,rep,name=BoolMap,json=boolMap" json:"BoolMap,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"varint,2,opt,name=value"` + StringMap map[string]string `protobuf:"bytes,14,rep,name=StringMap,json=stringMap" json:"StringMap,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + StringToBytesMap map[string][]byte `protobuf:"bytes,15,rep,name=StringToBytesMap,json=stringToBytesMap" json:"StringToBytesMap,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + StringToEnumMap map[string]MapEnum `protobuf:"bytes,16,rep,name=StringToEnumMap,json=stringToEnumMap" json:"StringToEnumMap,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"varint,2,opt,name=value,enum=proto2.maps.MapEnum"` + StringToMsgMap map[string]*FloatingPoint `protobuf:"bytes,17,rep,name=StringToMsgMap,json=stringToMsgMap" json:"StringToMsgMap,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *AllMapsOrdered) Reset() { *m = AllMapsOrdered{} } +func (*AllMapsOrdered) ProtoMessage() {} +func (*AllMapsOrdered) Descriptor() ([]byte, []int) { return fileDescriptorMapsproto2, []int{2} } + +func init() { + proto.RegisterType((*FloatingPoint)(nil), "proto2.maps.FloatingPoint") + proto.RegisterType((*AllMaps)(nil), "proto2.maps.AllMaps") + proto.RegisterType((*AllMapsOrdered)(nil), "proto2.maps.AllMapsOrdered") + proto.RegisterEnum("proto2.maps.MapEnum", MapEnum_name, MapEnum_value) +} +func (this *FloatingPoint) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return Mapsproto2Description() +} +func (this *AllMaps) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return Mapsproto2Description() +} +func (this *AllMapsOrdered) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return Mapsproto2Description() +} +func Mapsproto2Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + d := &github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet{} + var gzipped = []byte{ + // 4103 bytes of a gzipped FileDescriptorSet + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xec, 0x5a, 0x5b, 0x6c, 0x23, 0xe7, + 0x75, 0x36, 0xef, 0xe4, 0x21, 0x45, 0x8e, 0x46, 0xf2, 0x9a, 0x56, 0xec, 0x5d, 0x2f, 0x6d, 0xc7, + 0x6b, 0x39, 0x91, 0x1c, 0x25, 0xb6, 0xd7, 0x74, 0xe2, 0x40, 0x17, 0xae, 0x56, 0x8e, 0x6e, 0x1d, + 0x4a, 0xf6, 0xda, 0x85, 0xc1, 0x8e, 0xc8, 0x21, 0x45, 0x7b, 0x38, 0xc3, 0x72, 0x86, 0xf6, 0x2a, + 0x4f, 0x2e, 0xdc, 0x0b, 0x82, 0xa2, 0xf7, 0x02, 0x75, 0x1c, 0x27, 0xad, 0x03, 0xb4, 0x4e, 0xd3, + 0x5b, 0xdc, 0x1b, 0x8a, 0x3e, 0x05, 0x28, 0xd2, 0xe6, 0xa9, 0x68, 0xfb, 0x94, 0x87, 0x3c, 0x24, + 0xa9, 0x81, 0xba, 0x6d, 0xda, 0xba, 0x80, 0x81, 0x06, 0xf0, 0x4b, 0xcf, 0x7f, 0x1b, 0xfe, 0x33, + 0x1c, 0x72, 0xa8, 0x00, 0x49, 0xfc, 0x60, 0x01, 0x84, 0x38, 0xe7, 0x3f, 0xdf, 0x37, 0x67, 0xce, + 0x7f, 0xfe, 0x73, 0xce, 0xff, 0x73, 0xe0, 0xef, 0x3e, 0x06, 0x77, 0x75, 0x6c, 0xbb, 0x63, 0x1a, + 0xab, 0xfd, 0x81, 0xed, 0xda, 0x27, 0xc3, 0xf6, 0x6a, 0xcb, 0x70, 0x9a, 0x83, 0x6e, 0xdf, 0xb5, + 0x07, 0x2b, 0x54, 0xa6, 0x96, 0x98, 0xc6, 0x8a, 0xd0, 0xa8, 0xec, 0xc1, 0xfc, 0xb5, 0xae, 0x69, + 0x6c, 0x79, 0x8a, 0x75, 0xc3, 0x55, 0xaf, 0x42, 0xb2, 0x8d, 0xc2, 0x72, 0xec, 0xae, 0xc4, 0x95, + 0xfc, 0xda, 0x3d, 0x2b, 0x01, 0xd0, 0x8a, 0x1f, 0x71, 0x48, 0xc4, 0x1a, 0x45, 0x54, 0xde, 0x4a, + 0xc2, 0x42, 0xc8, 0xa8, 0xaa, 0x42, 0xd2, 0xd2, 0x7b, 0x84, 0x31, 0x76, 0x25, 0xa7, 0xd1, 0xef, + 0x6a, 0x19, 0x32, 0x7d, 0xbd, 0xf9, 0xbc, 0xde, 0x31, 0xca, 0x71, 0x2a, 0x16, 0x97, 0xea, 0x45, + 0x80, 0x96, 0xd1, 0x37, 0xac, 0x96, 0x61, 0x35, 0xcf, 0xca, 0x09, 0xb4, 0x22, 0xa7, 0x49, 0x12, + 0xf5, 0x01, 0x98, 0xef, 0x0f, 0x4f, 0xcc, 0x6e, 0xb3, 0x21, 0xa9, 0x01, 0xaa, 0xa5, 0x34, 0x85, + 0x0d, 0x6c, 0x8d, 0x94, 0xef, 0x83, 0xd2, 0x8b, 0x86, 0xfe, 0xbc, 0xac, 0x9a, 0xa7, 0xaa, 0x45, + 0x22, 0x96, 0x14, 0x37, 0xa1, 0xd0, 0x33, 0x1c, 0x07, 0x0d, 0x68, 0xb8, 0x67, 0x7d, 0xa3, 0x9c, + 0xa4, 0x4f, 0x7f, 0xd7,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xec, 0x12, 0x88, 0xc6, 0x90, 0xea, 0xe3, 0x90, 0xe4, 0x29, 0x8e, 0x30, 0x2c, 0xcf, 0xc6, + 0x40, 0x62, 0x51, 0xa3, 0x38, 0xf5, 0x43, 0x90, 0x23, 0xff, 0x99, 0x6f, 0xd3, 0xd4, 0xe6, 0x2c, + 0x11, 0x10, 0xbf, 0xaa, 0x4b, 0x90, 0xa5, 0x61, 0xd6, 0x32, 0x44, 0x69, 0xf0, 0xae, 0xc9, 0xc4, + 0xb4, 0x8c, 0xb6, 0x3e, 0x34, 0xdd, 0xc6, 0x0b, 0xba, 0x39, 0x34, 0x68, 0xc0, 0xe0, 0xc4, 0x70, + 0xe1, 0x93, 0x44, 0xa6, 0x5e, 0x82, 0x3c, 0x8b, 0xca, 0x2e, 0x62, 0x6e, 0xd2, 0xec, 0x93, 0xd2, + 0x58, 0xa0, 0xee, 0x10, 0x09, 0xb9, 0xfd, 0x73, 0x0e, 0xae, 0x05, 0x3e, 0xb5, 0xf4, 0x16, 0x44, + 0x40, 0x6f, 0xff, 0x48, 0x30, 0xf1, 0xdd, 0x19, 0xfe, 0x78, 0xc1, 0x58, 0xac, 0xfc, 0x75, 0x1c, + 0x92, 0x74, 0xbd, 0x95, 0x20, 0x7f, 0xf4, 0xf4, 0x61, 0xad, 0xb1, 0x75, 0x70, 0xbc, 0xb1, 0x5b, + 0x53, 0x62, 0x6a, 0x11, 0x80, 0x0a, 0xae, 0xed, 0x1e, 0xac, 0x1f, 0x29, 0x71, 0xef, 0x7a, 0x67, + 0xff, 0xe8, 0xe1, 0x4f, 0x28, 0x09, 0x0f, 0x70, 0xcc, 0x04, 0x49, 0x59, 0xe1, 0xe3, 0x6b, 0x4a, + 0x0a, 0x23, 0xa1, 0xc0, 0x08, 0x76, 0x6e, 0xd4, 0xb6, 0x50, 0x23, 0xed, 0x97, 0xa0, 0x4e, 0x46, + 0x9d, 0x83, 0x1c, 0x95, 0x6c, 0x1c, 0x1c, 0xec, 0x2a, 0x59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0e, 0x75, + 0xe0, 0xcd, 0x2b, 0x70, 0x3f, 0xea, 0x60, 0x7d, 0x5d, 0x65, 0x6b, 0x52, 0x5a, 0xcf, 0xab, 0xb8, + 0xfa, 0x1c, 0x8a, 0x5a, 0xe3, 0xe7, 0x33, 0x79, 0x7e, 0x45, 0x06, 0x96, 0xce, 0x77, 0xb6, 0x53, + 0xb9, 0x13, 0xe6, 0xae, 0x99, 0xb6, 0xee, 0x62, 0x49, 0x3b, 0xb4, 0xbb, 0x96, 0xab, 0x16, 0x20, + 0xd6, 0xa6, 0xe7, 0xdf, 0x31, 0x2d, 0xd6, 0xae, 0x7c, 0x4b, 0x85, 0x0c, 0x76, 0x30, 0xb8, 0x62, + 0x1d, 0xf5, 0x69, 0x98, 0x67, 0x7d, 0xc3, 0x91, 0xbd, 0x45, 0xcf, 0x1a, 0x51, 0xca, 0x8f, 0xec, + 0x1e, 0x58, 0x91, 0x4c, 0x58, 0xe1, 0x80, 0x95, 0x31, 0x6d, 0xfa, 0x03, 0x94, 0x36, 0xef, 0x04, + 0xe5, 0xea, 0x93, 0xa0, 0x08, 0x65, 0x6a, 0x0d, 0x61, 0x66, 0x07, 0xb5, 0xcb, 0x53, 0x99, 0x85, + 0x32, 0x23, 0x56, 0x9c, 0x80, 0x58, 0x7d, 0x1c, 0xb2, 0x3b, 0x96, 0xfb, 0xf1, 0x35, 0xc2, 0xc7, + 0x5e, 0x0c, 0xac, 0x84, 0xf2, 0x09, 0x25, 0xc6, 0x93, 0xed, 0xf2, 0x4b, 0x8e, 0x7f, 0xf8, 0x13, + 0x04, 0x9f, 0x9c, 0x8e, 0xa7, 0x4a, 0x23, 0x3c, 0xbd, 0x24, 0x2f, 0x16, 0x1e, 0x0b, 0x32, 0xfe, + 0x3e, 0xe0, 0xdd, 0xa1, 0x04, 0x9e, 0x16, 0x63, 0xc8, 0x0d, 0x3d, 0x13, 0x38, 0x05, 0xb3, 0x21, + 0x1d, 0x41, 0x21, 0x19, 0x41, 0x29, 0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 0xb8, 0xb4, + 0x05, 0x17, 0xc2, 0xb3, 0x15, 0x79, 0x41, 0x14, 0x73, 0x3e, 0x7f, 0x9b, 0x87, 0x7c, 0x25, 0x2f, + 0x92, 0x8a, 0xb7, 0xd5, 0x48, 0x96, 0x64, 0x17, 0xd5, 0xf8, 0xd5, 0xd8, 0xd2, 0x26, 0xdc, 0x1a, + 0x9a, 0x99, 0xa2, 0x48, 0xe2, 0x32, 0xc9, 0x63, 0x30, 0xe7, 0x4b, 0x47, 0x32, 0x38, 0x15, 0x02, + 0x4e, 0x8d, 0x83, 0x47, 0x41, 0x26, 0x83, 0x13, 0x21, 0xe0, 0x84, 0x0c, 0xfe, 0x24, 0x14, 0xfd, + 0x79, 0x48, 0x46, 0xcf, 0x85, 0xa0, 0xe7, 0x42, 0xd0, 0xe1, 0xf7, 0x4e, 0x86, 0xa0, 0x93, 0x01, + 0x74, 0x7d, 0xe2, 0xbd, 0xe7, 0x43, 0xd0, 0xf3, 0x21, 0xe8, 0xf0, 0x7b, 0xab, 0x21, 0x68, 0x55, + 0x46, 0x7f, 0x0a, 0x4a, 0x81, 0x94, 0x23, 0xc3, 0x33, 0x21, 0xf0, 0x8c, 0x0c, 0x7f, 0x1c, 0x97, + 0x4e, 0x7b, 0x32, 0xbe, 0x14, 0x82, 0x2f, 0x85, 0xdd, 0x3e, 0xdc, 0xfa, 0x74, 0x08, 0x3c, 0x1d, + 0x7a, 0xfb, 0x70, 0xbc, 0x12, 0x82, 0x57, 0x64, 0x7c, 0x15, 0x0a, 0x72, 0x56, 0x91, 0xb1, 0xd9, + 0x10, 0x6c, 0x36, 0xe8, 0x77, 0x5f, 0x4a, 0x89, 0x8a, 0xf4, 0xdc, 0x84, 0xe5, 0xe2, 0x4b, 0x23, + 0x51, 0x24, 0x05, 0x99, 0xe4, 0x06, 0x2c, 0x86, 0x25, 0x8d, 0x10, 0x8e, 0x65, 0x99, 0xa3, 0xb8, + 0xb6, 0xe8, 0x4b, 0x16, 0x14, 0x37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0x2b, 0xf7, 0xcc, 0xa4, 0x56, + 0xee, 0xc1, 0x59, 0xd8, 0xa7, 0x77, 0x74, 0x4f, 0x4d, 0xe8, 0xe8, 0x56, 0x67, 0xa1, 0xfe, 0xa0, + 0xb1, 0xfb, 0xa0, 0xb1, 0xfb, 0xa0, 0xb1, 0xfb, 0xa0, 0xb1, 0x7b, 0x7f, 0x34, 0x76, 0xd5, 0xe4, + 0x2b, 0xaf, 0x5f, 0x8a, 0x2d, 0x5f, 0x86, 0x0c, 0xbf, 0xb5, 0x9a, 0x86, 0xf8, 0xde, 0xba, 0x72, + 0x0b, 0xfd, 0xbf, 0xa1, 0xc4, 0xe8, 0xff, 0x4d, 0x25, 0xbe, 0xb1, 0xfb, 0xcd, 0xef, 0x5e, 0xbc, + 0xe5, 0x9f, 0xf0, 0xf3, 0x2d, 0xfc, 0x7c, 0xe7, 0xbb, 0x17, 0x63, 0x6f, 0xe3, 0xe7, 0x1d, 0xfc, + 0xfc, 0x00, 0x3f, 0x2f, 0x7d, 0xef, 0x62, 0xec, 0x2b, 0xf8, 0xf9, 0x1a, 0x7e, 0xfe, 0x06, 0x3f, + 0x5f, 0xc7, 0xcf, 0x37, 0xbf, 0x87, 0xfa, 0xf8, 0xf9, 0x0e, 0x7e, 0x7f, 0x1b, 0xff, 0xbf, 0x83, + 0xff, 0x7f, 0x80, 0xff, 0x5f, 0xfa, 0xd7, 0x8b, 0xb1, 0xff, 0x0f, 0x00, 0x00, 0xff, 0xff, 0xbf, + 0x19, 0x35, 0x8f, 0x9e, 0x3e, 0x00, 0x00, + } + r := bytes.NewReader(gzipped) + gzipr, err := compress_gzip.NewReader(r) + if err != nil { + panic(err) + } + ungzipped, err := io_ioutil.ReadAll(gzipr) + if err != nil { + panic(err) + } + if err := github_com_gogo_protobuf_proto.Unmarshal(ungzipped, d); err != nil { + panic(err) + } + return d +} +func (x MapEnum) String() string { + s, ok := MapEnum_name[int32(x)] + if ok { + return s + } + return strconv.Itoa(int(x)) +} +func (this *FloatingPoint) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*FloatingPoint) + if !ok { + that2, ok := that.(FloatingPoint) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *FloatingPoint") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *FloatingPoint but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *FloatingPoint but is not nil && this == nil") + } + if this.F != nil && that1.F != nil { + if *this.F != *that1.F { + return fmt.Errorf("F this(%v) Not Equal that(%v)", *this.F, *that1.F) + } + } else if this.F != nil { + return fmt.Errorf("this.F == nil && that.F != nil") + } else if that1.F != nil { + return fmt.Errorf("F this(%v) Not Equal that(%v)", this.F, that1.F) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *FloatingPoint) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*FloatingPoint) + if !ok { + that2, ok := that.(FloatingPoint) + 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.F != nil && that1.F != nil { + if *this.F != *that1.F { + return false + } + } else if this.F != nil { + return false + } else if that1.F != nil { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *AllMaps) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*AllMaps) + if !ok { + that2, ok := that.(AllMaps) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *AllMaps") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *AllMaps but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *AllMaps but is not nil && this == nil") + } + if len(this.StringToDoubleMap) != len(that1.StringToDoubleMap) { + return fmt.Errorf("StringToDoubleMap this(%v) Not Equal that(%v)", len(this.StringToDoubleMap), len(that1.StringToDoubleMap)) + } + for i := range this.StringToDoubleMap { + if this.StringToDoubleMap[i] != that1.StringToDoubleMap[i] { + return fmt.Errorf("StringToDoubleMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringToDoubleMap[i], i, that1.StringToDoubleMap[i]) + } + } + if len(this.StringToFloatMap) != len(that1.StringToFloatMap) { + return fmt.Errorf("StringToFloatMap this(%v) Not Equal that(%v)", len(this.StringToFloatMap), len(that1.StringToFloatMap)) + } + for i := range this.StringToFloatMap { + if this.StringToFloatMap[i] != that1.StringToFloatMap[i] { + return fmt.Errorf("StringToFloatMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringToFloatMap[i], i, that1.StringToFloatMap[i]) + } + } + if len(this.Int32Map) != len(that1.Int32Map) { + return fmt.Errorf("Int32Map this(%v) Not Equal that(%v)", len(this.Int32Map), len(that1.Int32Map)) + } + for i := range this.Int32Map { + if this.Int32Map[i] != that1.Int32Map[i] { + return fmt.Errorf("Int32Map this[%v](%v) Not Equal that[%v](%v)", i, this.Int32Map[i], i, that1.Int32Map[i]) + } + } + if len(this.Int64Map) != len(that1.Int64Map) { + return fmt.Errorf("Int64Map this(%v) Not Equal that(%v)", len(this.Int64Map), len(that1.Int64Map)) + } + for i := range this.Int64Map { + if this.Int64Map[i] != that1.Int64Map[i] { + return fmt.Errorf("Int64Map this[%v](%v) Not Equal that[%v](%v)", i, this.Int64Map[i], i, that1.Int64Map[i]) + } + } + if len(this.Uint32Map) != len(that1.Uint32Map) { + return fmt.Errorf("Uint32Map this(%v) Not Equal that(%v)", len(this.Uint32Map), len(that1.Uint32Map)) + } + for i := range this.Uint32Map { + if this.Uint32Map[i] != that1.Uint32Map[i] { + return fmt.Errorf("Uint32Map this[%v](%v) Not Equal that[%v](%v)", i, this.Uint32Map[i], i, that1.Uint32Map[i]) + } + } + if len(this.Uint64Map) != len(that1.Uint64Map) { + return fmt.Errorf("Uint64Map this(%v) Not Equal that(%v)", len(this.Uint64Map), len(that1.Uint64Map)) + } + for i := range this.Uint64Map { + if this.Uint64Map[i] != that1.Uint64Map[i] { + return fmt.Errorf("Uint64Map this[%v](%v) Not Equal that[%v](%v)", i, this.Uint64Map[i], i, that1.Uint64Map[i]) + } + } + if len(this.Sint32Map) != len(that1.Sint32Map) { + return fmt.Errorf("Sint32Map this(%v) Not Equal that(%v)", len(this.Sint32Map), len(that1.Sint32Map)) + } + for i := range this.Sint32Map { + if this.Sint32Map[i] != that1.Sint32Map[i] { + return fmt.Errorf("Sint32Map this[%v](%v) Not Equal that[%v](%v)", i, this.Sint32Map[i], i, that1.Sint32Map[i]) + } + } + if len(this.Sint64Map) != len(that1.Sint64Map) { + return fmt.Errorf("Sint64Map this(%v) Not Equal that(%v)", len(this.Sint64Map), len(that1.Sint64Map)) + } + for i := range this.Sint64Map { + if this.Sint64Map[i] != that1.Sint64Map[i] { + return fmt.Errorf("Sint64Map this[%v](%v) Not Equal that[%v](%v)", i, this.Sint64Map[i], i, that1.Sint64Map[i]) + } + } + if len(this.Fixed32Map) != len(that1.Fixed32Map) { + return fmt.Errorf("Fixed32Map this(%v) Not Equal that(%v)", len(this.Fixed32Map), len(that1.Fixed32Map)) + } + for i := range this.Fixed32Map { + if this.Fixed32Map[i] != that1.Fixed32Map[i] { + return fmt.Errorf("Fixed32Map this[%v](%v) Not Equal that[%v](%v)", i, this.Fixed32Map[i], i, that1.Fixed32Map[i]) + } + } + if len(this.Sfixed32Map) != len(that1.Sfixed32Map) { + return fmt.Errorf("Sfixed32Map this(%v) Not Equal that(%v)", len(this.Sfixed32Map), len(that1.Sfixed32Map)) + } + for i := range this.Sfixed32Map { + if this.Sfixed32Map[i] != that1.Sfixed32Map[i] { + return fmt.Errorf("Sfixed32Map this[%v](%v) Not Equal that[%v](%v)", i, this.Sfixed32Map[i], i, that1.Sfixed32Map[i]) + } + } + if len(this.Fixed64Map) != len(that1.Fixed64Map) { + return fmt.Errorf("Fixed64Map this(%v) Not Equal that(%v)", len(this.Fixed64Map), len(that1.Fixed64Map)) + } + for i := range this.Fixed64Map { + if this.Fixed64Map[i] != that1.Fixed64Map[i] { + return fmt.Errorf("Fixed64Map this[%v](%v) Not Equal that[%v](%v)", i, this.Fixed64Map[i], i, that1.Fixed64Map[i]) + } + } + if len(this.Sfixed64Map) != len(that1.Sfixed64Map) { + return fmt.Errorf("Sfixed64Map this(%v) Not Equal that(%v)", len(this.Sfixed64Map), len(that1.Sfixed64Map)) + } + for i := range this.Sfixed64Map { + if this.Sfixed64Map[i] != that1.Sfixed64Map[i] { + return fmt.Errorf("Sfixed64Map this[%v](%v) Not Equal that[%v](%v)", i, this.Sfixed64Map[i], i, that1.Sfixed64Map[i]) + } + } + if len(this.BoolMap) != len(that1.BoolMap) { + return fmt.Errorf("BoolMap this(%v) Not Equal that(%v)", len(this.BoolMap), len(that1.BoolMap)) + } + for i := range this.BoolMap { + if this.BoolMap[i] != that1.BoolMap[i] { + return fmt.Errorf("BoolMap this[%v](%v) Not Equal that[%v](%v)", i, this.BoolMap[i], i, that1.BoolMap[i]) + } + } + if len(this.StringMap) != len(that1.StringMap) { + return fmt.Errorf("StringMap this(%v) Not Equal that(%v)", len(this.StringMap), len(that1.StringMap)) + } + for i := range this.StringMap { + if this.StringMap[i] != that1.StringMap[i] { + return fmt.Errorf("StringMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringMap[i], i, that1.StringMap[i]) + } + } + if len(this.StringToBytesMap) != len(that1.StringToBytesMap) { + return fmt.Errorf("StringToBytesMap this(%v) Not Equal that(%v)", len(this.StringToBytesMap), len(that1.StringToBytesMap)) + } + for i := range this.StringToBytesMap { + if !bytes.Equal(this.StringToBytesMap[i], that1.StringToBytesMap[i]) { + return fmt.Errorf("StringToBytesMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringToBytesMap[i], i, that1.StringToBytesMap[i]) + } + } + if len(this.StringToEnumMap) != len(that1.StringToEnumMap) { + return fmt.Errorf("StringToEnumMap this(%v) Not Equal that(%v)", len(this.StringToEnumMap), len(that1.StringToEnumMap)) + } + for i := range this.StringToEnumMap { + if this.StringToEnumMap[i] != that1.StringToEnumMap[i] { + return fmt.Errorf("StringToEnumMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringToEnumMap[i], i, that1.StringToEnumMap[i]) + } + } + if len(this.StringToMsgMap) != len(that1.StringToMsgMap) { + return fmt.Errorf("StringToMsgMap this(%v) Not Equal that(%v)", len(this.StringToMsgMap), len(that1.StringToMsgMap)) + } + for i := range this.StringToMsgMap { + if !this.StringToMsgMap[i].Equal(that1.StringToMsgMap[i]) { + return fmt.Errorf("StringToMsgMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringToMsgMap[i], i, that1.StringToMsgMap[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *AllMaps) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*AllMaps) + if !ok { + that2, ok := that.(AllMaps) + 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.StringToDoubleMap) != len(that1.StringToDoubleMap) { + return false + } + for i := range this.StringToDoubleMap { + if this.StringToDoubleMap[i] != that1.StringToDoubleMap[i] { + return false + } + } + if len(this.StringToFloatMap) != len(that1.StringToFloatMap) { + return false + } + for i := range this.StringToFloatMap { + if this.StringToFloatMap[i] != that1.StringToFloatMap[i] { + return false + } + } + if len(this.Int32Map) != len(that1.Int32Map) { + return false + } + for i := range this.Int32Map { + if this.Int32Map[i] != that1.Int32Map[i] { + return false + } + } + if len(this.Int64Map) != len(that1.Int64Map) { + return false + } + for i := range this.Int64Map { + if this.Int64Map[i] != that1.Int64Map[i] { + return false + } + } + if len(this.Uint32Map) != len(that1.Uint32Map) { + return false + } + for i := range this.Uint32Map { + if this.Uint32Map[i] != that1.Uint32Map[i] { + return false + } + } + if len(this.Uint64Map) != len(that1.Uint64Map) { + return false + } + for i := range this.Uint64Map { + if this.Uint64Map[i] != that1.Uint64Map[i] { + return false + } + } + if len(this.Sint32Map) != len(that1.Sint32Map) { + return false + } + for i := range this.Sint32Map { + if this.Sint32Map[i] != that1.Sint32Map[i] { + return false + } + } + if len(this.Sint64Map) != len(that1.Sint64Map) { + return false + } + for i := range this.Sint64Map { + if this.Sint64Map[i] != that1.Sint64Map[i] { + return false + } + } + if len(this.Fixed32Map) != len(that1.Fixed32Map) { + return false + } + for i := range this.Fixed32Map { + if this.Fixed32Map[i] != that1.Fixed32Map[i] { + return false + } + } + if len(this.Sfixed32Map) != len(that1.Sfixed32Map) { + return false + } + for i := range this.Sfixed32Map { + if this.Sfixed32Map[i] != that1.Sfixed32Map[i] { + return false + } + } + if len(this.Fixed64Map) != len(that1.Fixed64Map) { + return false + } + for i := range this.Fixed64Map { + if this.Fixed64Map[i] != that1.Fixed64Map[i] { + return false + } + } + if len(this.Sfixed64Map) != len(that1.Sfixed64Map) { + return false + } + for i := range this.Sfixed64Map { + if this.Sfixed64Map[i] != that1.Sfixed64Map[i] { + return false + } + } + if len(this.BoolMap) != len(that1.BoolMap) { + return false + } + for i := range this.BoolMap { + if this.BoolMap[i] != that1.BoolMap[i] { + return false + } + } + if len(this.StringMap) != len(that1.StringMap) { + return false + } + for i := range this.StringMap { + if this.StringMap[i] != that1.StringMap[i] { + return false + } + } + if len(this.StringToBytesMap) != len(that1.StringToBytesMap) { + return false + } + for i := range this.StringToBytesMap { + if !bytes.Equal(this.StringToBytesMap[i], that1.StringToBytesMap[i]) { + return false + } + } + if len(this.StringToEnumMap) != len(that1.StringToEnumMap) { + return false + } + for i := range this.StringToEnumMap { + if this.StringToEnumMap[i] != that1.StringToEnumMap[i] { + return false + } + } + if len(this.StringToMsgMap) != len(that1.StringToMsgMap) { + return false + } + for i := range this.StringToMsgMap { + if !this.StringToMsgMap[i].Equal(that1.StringToMsgMap[i]) { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *AllMapsOrdered) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*AllMapsOrdered) + if !ok { + that2, ok := that.(AllMapsOrdered) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *AllMapsOrdered") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *AllMapsOrdered but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *AllMapsOrdered but is not nil && this == nil") + } + if len(this.StringToDoubleMap) != len(that1.StringToDoubleMap) { + return fmt.Errorf("StringToDoubleMap this(%v) Not Equal that(%v)", len(this.StringToDoubleMap), len(that1.StringToDoubleMap)) + } + for i := range this.StringToDoubleMap { + if this.StringToDoubleMap[i] != that1.StringToDoubleMap[i] { + return fmt.Errorf("StringToDoubleMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringToDoubleMap[i], i, that1.StringToDoubleMap[i]) + } + } + if len(this.StringToFloatMap) != len(that1.StringToFloatMap) { + return fmt.Errorf("StringToFloatMap this(%v) Not Equal that(%v)", len(this.StringToFloatMap), len(that1.StringToFloatMap)) + } + for i := range this.StringToFloatMap { + if this.StringToFloatMap[i] != that1.StringToFloatMap[i] { + return fmt.Errorf("StringToFloatMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringToFloatMap[i], i, that1.StringToFloatMap[i]) + } + } + if len(this.Int32Map) != len(that1.Int32Map) { + return fmt.Errorf("Int32Map this(%v) Not Equal that(%v)", len(this.Int32Map), len(that1.Int32Map)) + } + for i := range this.Int32Map { + if this.Int32Map[i] != that1.Int32Map[i] { + return fmt.Errorf("Int32Map this[%v](%v) Not Equal that[%v](%v)", i, this.Int32Map[i], i, that1.Int32Map[i]) + } + } + if len(this.Int64Map) != len(that1.Int64Map) { + return fmt.Errorf("Int64Map this(%v) Not Equal that(%v)", len(this.Int64Map), len(that1.Int64Map)) + } + for i := range this.Int64Map { + if this.Int64Map[i] != that1.Int64Map[i] { + return fmt.Errorf("Int64Map this[%v](%v) Not Equal that[%v](%v)", i, this.Int64Map[i], i, that1.Int64Map[i]) + } + } + if len(this.Uint32Map) != len(that1.Uint32Map) { + return fmt.Errorf("Uint32Map this(%v) Not Equal that(%v)", len(this.Uint32Map), len(that1.Uint32Map)) + } + for i := range this.Uint32Map { + if this.Uint32Map[i] != that1.Uint32Map[i] { + return fmt.Errorf("Uint32Map this[%v](%v) Not Equal that[%v](%v)", i, this.Uint32Map[i], i, that1.Uint32Map[i]) + } + } + if len(this.Uint64Map) != len(that1.Uint64Map) { + return fmt.Errorf("Uint64Map this(%v) Not Equal that(%v)", len(this.Uint64Map), len(that1.Uint64Map)) + } + for i := range this.Uint64Map { + if this.Uint64Map[i] != that1.Uint64Map[i] { + return fmt.Errorf("Uint64Map this[%v](%v) Not Equal that[%v](%v)", i, this.Uint64Map[i], i, that1.Uint64Map[i]) + } + } + if len(this.Sint32Map) != len(that1.Sint32Map) { + return fmt.Errorf("Sint32Map this(%v) Not Equal that(%v)", len(this.Sint32Map), len(that1.Sint32Map)) + } + for i := range this.Sint32Map { + if this.Sint32Map[i] != that1.Sint32Map[i] { + return fmt.Errorf("Sint32Map this[%v](%v) Not Equal that[%v](%v)", i, this.Sint32Map[i], i, that1.Sint32Map[i]) + } + } + if len(this.Sint64Map) != len(that1.Sint64Map) { + return fmt.Errorf("Sint64Map this(%v) Not Equal that(%v)", len(this.Sint64Map), len(that1.Sint64Map)) + } + for i := range this.Sint64Map { + if this.Sint64Map[i] != that1.Sint64Map[i] { + return fmt.Errorf("Sint64Map this[%v](%v) Not Equal that[%v](%v)", i, this.Sint64Map[i], i, that1.Sint64Map[i]) + } + } + if len(this.Fixed32Map) != len(that1.Fixed32Map) { + return fmt.Errorf("Fixed32Map this(%v) Not Equal that(%v)", len(this.Fixed32Map), len(that1.Fixed32Map)) + } + for i := range this.Fixed32Map { + if this.Fixed32Map[i] != that1.Fixed32Map[i] { + return fmt.Errorf("Fixed32Map this[%v](%v) Not Equal that[%v](%v)", i, this.Fixed32Map[i], i, that1.Fixed32Map[i]) + } + } + if len(this.Sfixed32Map) != len(that1.Sfixed32Map) { + return fmt.Errorf("Sfixed32Map this(%v) Not Equal that(%v)", len(this.Sfixed32Map), len(that1.Sfixed32Map)) + } + for i := range this.Sfixed32Map { + if this.Sfixed32Map[i] != that1.Sfixed32Map[i] { + return fmt.Errorf("Sfixed32Map this[%v](%v) Not Equal that[%v](%v)", i, this.Sfixed32Map[i], i, that1.Sfixed32Map[i]) + } + } + if len(this.Fixed64Map) != len(that1.Fixed64Map) { + return fmt.Errorf("Fixed64Map this(%v) Not Equal that(%v)", len(this.Fixed64Map), len(that1.Fixed64Map)) + } + for i := range this.Fixed64Map { + if this.Fixed64Map[i] != that1.Fixed64Map[i] { + return fmt.Errorf("Fixed64Map this[%v](%v) Not Equal that[%v](%v)", i, this.Fixed64Map[i], i, that1.Fixed64Map[i]) + } + } + if len(this.Sfixed64Map) != len(that1.Sfixed64Map) { + return fmt.Errorf("Sfixed64Map this(%v) Not Equal that(%v)", len(this.Sfixed64Map), len(that1.Sfixed64Map)) + } + for i := range this.Sfixed64Map { + if this.Sfixed64Map[i] != that1.Sfixed64Map[i] { + return fmt.Errorf("Sfixed64Map this[%v](%v) Not Equal that[%v](%v)", i, this.Sfixed64Map[i], i, that1.Sfixed64Map[i]) + } + } + if len(this.BoolMap) != len(that1.BoolMap) { + return fmt.Errorf("BoolMap this(%v) Not Equal that(%v)", len(this.BoolMap), len(that1.BoolMap)) + } + for i := range this.BoolMap { + if this.BoolMap[i] != that1.BoolMap[i] { + return fmt.Errorf("BoolMap this[%v](%v) Not Equal that[%v](%v)", i, this.BoolMap[i], i, that1.BoolMap[i]) + } + } + if len(this.StringMap) != len(that1.StringMap) { + return fmt.Errorf("StringMap this(%v) Not Equal that(%v)", len(this.StringMap), len(that1.StringMap)) + } + for i := range this.StringMap { + if this.StringMap[i] != that1.StringMap[i] { + return fmt.Errorf("StringMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringMap[i], i, that1.StringMap[i]) + } + } + if len(this.StringToBytesMap) != len(that1.StringToBytesMap) { + return fmt.Errorf("StringToBytesMap this(%v) Not Equal that(%v)", len(this.StringToBytesMap), len(that1.StringToBytesMap)) + } + for i := range this.StringToBytesMap { + if !bytes.Equal(this.StringToBytesMap[i], that1.StringToBytesMap[i]) { + return fmt.Errorf("StringToBytesMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringToBytesMap[i], i, that1.StringToBytesMap[i]) + } + } + if len(this.StringToEnumMap) != len(that1.StringToEnumMap) { + return fmt.Errorf("StringToEnumMap this(%v) Not Equal that(%v)", len(this.StringToEnumMap), len(that1.StringToEnumMap)) + } + for i := range this.StringToEnumMap { + if this.StringToEnumMap[i] != that1.StringToEnumMap[i] { + return fmt.Errorf("StringToEnumMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringToEnumMap[i], i, that1.StringToEnumMap[i]) + } + } + if len(this.StringToMsgMap) != len(that1.StringToMsgMap) { + return fmt.Errorf("StringToMsgMap this(%v) Not Equal that(%v)", len(this.StringToMsgMap), len(that1.StringToMsgMap)) + } + for i := range this.StringToMsgMap { + if !this.StringToMsgMap[i].Equal(that1.StringToMsgMap[i]) { + return fmt.Errorf("StringToMsgMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringToMsgMap[i], i, that1.StringToMsgMap[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *AllMapsOrdered) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*AllMapsOrdered) + if !ok { + that2, ok := that.(AllMapsOrdered) + 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.StringToDoubleMap) != len(that1.StringToDoubleMap) { + return false + } + for i := range this.StringToDoubleMap { + if this.StringToDoubleMap[i] != that1.StringToDoubleMap[i] { + return false + } + } + if len(this.StringToFloatMap) != len(that1.StringToFloatMap) { + return false + } + for i := range this.StringToFloatMap { + if this.StringToFloatMap[i] != that1.StringToFloatMap[i] { + return false + } + } + if len(this.Int32Map) != len(that1.Int32Map) { + return false + } + for i := range this.Int32Map { + if this.Int32Map[i] != that1.Int32Map[i] { + return false + } + } + if len(this.Int64Map) != len(that1.Int64Map) { + return false + } + for i := range this.Int64Map { + if this.Int64Map[i] != that1.Int64Map[i] { + return false + } + } + if len(this.Uint32Map) != len(that1.Uint32Map) { + return false + } + for i := range this.Uint32Map { + if this.Uint32Map[i] != that1.Uint32Map[i] { + return false + } + } + if len(this.Uint64Map) != len(that1.Uint64Map) { + return false + } + for i := range this.Uint64Map { + if this.Uint64Map[i] != that1.Uint64Map[i] { + return false + } + } + if len(this.Sint32Map) != len(that1.Sint32Map) { + return false + } + for i := range this.Sint32Map { + if this.Sint32Map[i] != that1.Sint32Map[i] { + return false + } + } + if len(this.Sint64Map) != len(that1.Sint64Map) { + return false + } + for i := range this.Sint64Map { + if this.Sint64Map[i] != that1.Sint64Map[i] { + return false + } + } + if len(this.Fixed32Map) != len(that1.Fixed32Map) { + return false + } + for i := range this.Fixed32Map { + if this.Fixed32Map[i] != that1.Fixed32Map[i] { + return false + } + } + if len(this.Sfixed32Map) != len(that1.Sfixed32Map) { + return false + } + for i := range this.Sfixed32Map { + if this.Sfixed32Map[i] != that1.Sfixed32Map[i] { + return false + } + } + if len(this.Fixed64Map) != len(that1.Fixed64Map) { + return false + } + for i := range this.Fixed64Map { + if this.Fixed64Map[i] != that1.Fixed64Map[i] { + return false + } + } + if len(this.Sfixed64Map) != len(that1.Sfixed64Map) { + return false + } + for i := range this.Sfixed64Map { + if this.Sfixed64Map[i] != that1.Sfixed64Map[i] { + return false + } + } + if len(this.BoolMap) != len(that1.BoolMap) { + return false + } + for i := range this.BoolMap { + if this.BoolMap[i] != that1.BoolMap[i] { + return false + } + } + if len(this.StringMap) != len(that1.StringMap) { + return false + } + for i := range this.StringMap { + if this.StringMap[i] != that1.StringMap[i] { + return false + } + } + if len(this.StringToBytesMap) != len(that1.StringToBytesMap) { + return false + } + for i := range this.StringToBytesMap { + if !bytes.Equal(this.StringToBytesMap[i], that1.StringToBytesMap[i]) { + return false + } + } + if len(this.StringToEnumMap) != len(that1.StringToEnumMap) { + return false + } + for i := range this.StringToEnumMap { + if this.StringToEnumMap[i] != that1.StringToEnumMap[i] { + return false + } + } + if len(this.StringToMsgMap) != len(that1.StringToMsgMap) { + return false + } + for i := range this.StringToMsgMap { + if !this.StringToMsgMap[i].Equal(that1.StringToMsgMap[i]) { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} + +type FloatingPointFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetF() *float64 +} + +func (this *FloatingPoint) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *FloatingPoint) TestProto() github_com_gogo_protobuf_proto.Message { + return NewFloatingPointFromFace(this) +} + +func (this *FloatingPoint) GetF() *float64 { + return this.F +} + +func NewFloatingPointFromFace(that FloatingPointFace) *FloatingPoint { + this := &FloatingPoint{} + this.F = that.GetF() + return this +} + +type AllMapsFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetStringToDoubleMap() map[string]float64 + GetStringToFloatMap() map[string]float32 + GetInt32Map() map[int32]int32 + GetInt64Map() map[int64]int64 + GetUint32Map() map[uint32]uint32 + GetUint64Map() map[uint64]uint64 + GetSint32Map() map[int32]int32 + GetSint64Map() map[int64]int64 + GetFixed32Map() map[uint32]uint32 + GetSfixed32Map() map[int32]int32 + GetFixed64Map() map[uint64]uint64 + GetSfixed64Map() map[int64]int64 + GetBoolMap() map[bool]bool + GetStringMap() map[string]string + GetStringToBytesMap() map[string][]byte + GetStringToEnumMap() map[string]MapEnum + GetStringToMsgMap() map[string]*FloatingPoint +} + +func (this *AllMaps) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *AllMaps) TestProto() github_com_gogo_protobuf_proto.Message { + return NewAllMapsFromFace(this) +} + +func (this *AllMaps) GetStringToDoubleMap() map[string]float64 { + return this.StringToDoubleMap +} + +func (this *AllMaps) GetStringToFloatMap() map[string]float32 { + return this.StringToFloatMap +} + +func (this *AllMaps) GetInt32Map() map[int32]int32 { + return this.Int32Map +} + +func (this *AllMaps) GetInt64Map() map[int64]int64 { + return this.Int64Map +} + +func (this *AllMaps) GetUint32Map() map[uint32]uint32 { + return this.Uint32Map +} + +func (this *AllMaps) GetUint64Map() map[uint64]uint64 { + return this.Uint64Map +} + +func (this *AllMaps) GetSint32Map() map[int32]int32 { + return this.Sint32Map +} + +func (this *AllMaps) GetSint64Map() map[int64]int64 { + return this.Sint64Map +} + +func (this *AllMaps) GetFixed32Map() map[uint32]uint32 { + return this.Fixed32Map +} + +func (this *AllMaps) GetSfixed32Map() map[int32]int32 { + return this.Sfixed32Map +} + +func (this *AllMaps) GetFixed64Map() map[uint64]uint64 { + return this.Fixed64Map +} + +func (this *AllMaps) GetSfixed64Map() map[int64]int64 { + return this.Sfixed64Map +} + +func (this *AllMaps) GetBoolMap() map[bool]bool { + return this.BoolMap +} + +func (this *AllMaps) GetStringMap() map[string]string { + return this.StringMap +} + +func (this *AllMaps) GetStringToBytesMap() map[string][]byte { + return this.StringToBytesMap +} + +func (this *AllMaps) GetStringToEnumMap() map[string]MapEnum { + return this.StringToEnumMap +} + +func (this *AllMaps) GetStringToMsgMap() map[string]*FloatingPoint { + return this.StringToMsgMap +} + +func NewAllMapsFromFace(that AllMapsFace) *AllMaps { + this := &AllMaps{} + this.StringToDoubleMap = that.GetStringToDoubleMap() + this.StringToFloatMap = that.GetStringToFloatMap() + this.Int32Map = that.GetInt32Map() + this.Int64Map = that.GetInt64Map() + this.Uint32Map = that.GetUint32Map() + this.Uint64Map = that.GetUint64Map() + this.Sint32Map = that.GetSint32Map() + this.Sint64Map = that.GetSint64Map() + this.Fixed32Map = that.GetFixed32Map() + this.Sfixed32Map = that.GetSfixed32Map() + this.Fixed64Map = that.GetFixed64Map() + this.Sfixed64Map = that.GetSfixed64Map() + this.BoolMap = that.GetBoolMap() + this.StringMap = that.GetStringMap() + this.StringToBytesMap = that.GetStringToBytesMap() + this.StringToEnumMap = that.GetStringToEnumMap() + this.StringToMsgMap = that.GetStringToMsgMap() + return this +} + +type AllMapsOrderedFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetStringToDoubleMap() map[string]float64 + GetStringToFloatMap() map[string]float32 + GetInt32Map() map[int32]int32 + GetInt64Map() map[int64]int64 + GetUint32Map() map[uint32]uint32 + GetUint64Map() map[uint64]uint64 + GetSint32Map() map[int32]int32 + GetSint64Map() map[int64]int64 + GetFixed32Map() map[uint32]uint32 + GetSfixed32Map() map[int32]int32 + GetFixed64Map() map[uint64]uint64 + GetSfixed64Map() map[int64]int64 + GetBoolMap() map[bool]bool + GetStringMap() map[string]string + GetStringToBytesMap() map[string][]byte + GetStringToEnumMap() map[string]MapEnum + GetStringToMsgMap() map[string]*FloatingPoint +} + +func (this *AllMapsOrdered) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *AllMapsOrdered) TestProto() github_com_gogo_protobuf_proto.Message { + return NewAllMapsOrderedFromFace(this) +} + +func (this *AllMapsOrdered) GetStringToDoubleMap() map[string]float64 { + return this.StringToDoubleMap +} + +func (this *AllMapsOrdered) GetStringToFloatMap() map[string]float32 { + return this.StringToFloatMap +} + +func (this *AllMapsOrdered) GetInt32Map() map[int32]int32 { + return this.Int32Map +} + +func (this *AllMapsOrdered) GetInt64Map() map[int64]int64 { + return this.Int64Map +} + +func (this *AllMapsOrdered) GetUint32Map() map[uint32]uint32 { + return this.Uint32Map +} + +func (this *AllMapsOrdered) GetUint64Map() map[uint64]uint64 { + return this.Uint64Map +} + +func (this *AllMapsOrdered) GetSint32Map() map[int32]int32 { + return this.Sint32Map +} + +func (this *AllMapsOrdered) GetSint64Map() map[int64]int64 { + return this.Sint64Map +} + +func (this *AllMapsOrdered) GetFixed32Map() map[uint32]uint32 { + return this.Fixed32Map +} + +func (this *AllMapsOrdered) GetSfixed32Map() map[int32]int32 { + return this.Sfixed32Map +} + +func (this *AllMapsOrdered) GetFixed64Map() map[uint64]uint64 { + return this.Fixed64Map +} + +func (this *AllMapsOrdered) GetSfixed64Map() map[int64]int64 { + return this.Sfixed64Map +} + +func (this *AllMapsOrdered) GetBoolMap() map[bool]bool { + return this.BoolMap +} + +func (this *AllMapsOrdered) GetStringMap() map[string]string { + return this.StringMap +} + +func (this *AllMapsOrdered) GetStringToBytesMap() map[string][]byte { + return this.StringToBytesMap +} + +func (this *AllMapsOrdered) GetStringToEnumMap() map[string]MapEnum { + return this.StringToEnumMap +} + +func (this *AllMapsOrdered) GetStringToMsgMap() map[string]*FloatingPoint { + return this.StringToMsgMap +} + +func NewAllMapsOrderedFromFace(that AllMapsOrderedFace) *AllMapsOrdered { + this := &AllMapsOrdered{} + this.StringToDoubleMap = that.GetStringToDoubleMap() + this.StringToFloatMap = that.GetStringToFloatMap() + this.Int32Map = that.GetInt32Map() + this.Int64Map = that.GetInt64Map() + this.Uint32Map = that.GetUint32Map() + this.Uint64Map = that.GetUint64Map() + this.Sint32Map = that.GetSint32Map() + this.Sint64Map = that.GetSint64Map() + this.Fixed32Map = that.GetFixed32Map() + this.Sfixed32Map = that.GetSfixed32Map() + this.Fixed64Map = that.GetFixed64Map() + this.Sfixed64Map = that.GetSfixed64Map() + this.BoolMap = that.GetBoolMap() + this.StringMap = that.GetStringMap() + this.StringToBytesMap = that.GetStringToBytesMap() + this.StringToEnumMap = that.GetStringToEnumMap() + this.StringToMsgMap = that.GetStringToMsgMap() + return this +} + +func (this *FloatingPoint) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&proto2_maps.FloatingPoint{") + if this.F != nil { + s = append(s, "F: "+valueToGoStringMapsproto2(this.F, "float64")+",\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 *AllMaps) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 21) + s = append(s, "&proto2_maps.AllMaps{") + keysForStringToDoubleMap := make([]string, 0, len(this.StringToDoubleMap)) + for k := range this.StringToDoubleMap { + keysForStringToDoubleMap = append(keysForStringToDoubleMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToDoubleMap) + mapStringForStringToDoubleMap := "map[string]float64{" + for _, k := range keysForStringToDoubleMap { + mapStringForStringToDoubleMap += fmt.Sprintf("%#v: %#v,", k, this.StringToDoubleMap[k]) + } + mapStringForStringToDoubleMap += "}" + if this.StringToDoubleMap != nil { + s = append(s, "StringToDoubleMap: "+mapStringForStringToDoubleMap+",\n") + } + keysForStringToFloatMap := make([]string, 0, len(this.StringToFloatMap)) + for k := range this.StringToFloatMap { + keysForStringToFloatMap = append(keysForStringToFloatMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToFloatMap) + mapStringForStringToFloatMap := "map[string]float32{" + for _, k := range keysForStringToFloatMap { + mapStringForStringToFloatMap += fmt.Sprintf("%#v: %#v,", k, this.StringToFloatMap[k]) + } + mapStringForStringToFloatMap += "}" + if this.StringToFloatMap != nil { + s = append(s, "StringToFloatMap: "+mapStringForStringToFloatMap+",\n") + } + keysForInt32Map := make([]int32, 0, len(this.Int32Map)) + for k := range this.Int32Map { + keysForInt32Map = append(keysForInt32Map, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForInt32Map) + mapStringForInt32Map := "map[int32]int32{" + for _, k := range keysForInt32Map { + mapStringForInt32Map += fmt.Sprintf("%#v: %#v,", k, this.Int32Map[k]) + } + mapStringForInt32Map += "}" + if this.Int32Map != nil { + s = append(s, "Int32Map: "+mapStringForInt32Map+",\n") + } + keysForInt64Map := make([]int64, 0, len(this.Int64Map)) + for k := range this.Int64Map { + keysForInt64Map = append(keysForInt64Map, k) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForInt64Map) + mapStringForInt64Map := "map[int64]int64{" + for _, k := range keysForInt64Map { + mapStringForInt64Map += fmt.Sprintf("%#v: %#v,", k, this.Int64Map[k]) + } + mapStringForInt64Map += "}" + if this.Int64Map != nil { + s = append(s, "Int64Map: "+mapStringForInt64Map+",\n") + } + keysForUint32Map := make([]uint32, 0, len(this.Uint32Map)) + for k := range this.Uint32Map { + keysForUint32Map = append(keysForUint32Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint32s(keysForUint32Map) + mapStringForUint32Map := "map[uint32]uint32{" + for _, k := range keysForUint32Map { + mapStringForUint32Map += fmt.Sprintf("%#v: %#v,", k, this.Uint32Map[k]) + } + mapStringForUint32Map += "}" + if this.Uint32Map != nil { + s = append(s, "Uint32Map: "+mapStringForUint32Map+",\n") + } + keysForUint64Map := make([]uint64, 0, len(this.Uint64Map)) + for k := range this.Uint64Map { + keysForUint64Map = append(keysForUint64Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint64s(keysForUint64Map) + mapStringForUint64Map := "map[uint64]uint64{" + for _, k := range keysForUint64Map { + mapStringForUint64Map += fmt.Sprintf("%#v: %#v,", k, this.Uint64Map[k]) + } + mapStringForUint64Map += "}" + if this.Uint64Map != nil { + s = append(s, "Uint64Map: "+mapStringForUint64Map+",\n") + } + keysForSint32Map := make([]int32, 0, len(this.Sint32Map)) + for k := range this.Sint32Map { + keysForSint32Map = append(keysForSint32Map, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForSint32Map) + mapStringForSint32Map := "map[int32]int32{" + for _, k := range keysForSint32Map { + mapStringForSint32Map += fmt.Sprintf("%#v: %#v,", k, this.Sint32Map[k]) + } + mapStringForSint32Map += "}" + if this.Sint32Map != nil { + s = append(s, "Sint32Map: "+mapStringForSint32Map+",\n") + } + keysForSint64Map := make([]int64, 0, len(this.Sint64Map)) + for k := range this.Sint64Map { + keysForSint64Map = append(keysForSint64Map, k) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForSint64Map) + mapStringForSint64Map := "map[int64]int64{" + for _, k := range keysForSint64Map { + mapStringForSint64Map += fmt.Sprintf("%#v: %#v,", k, this.Sint64Map[k]) + } + mapStringForSint64Map += "}" + if this.Sint64Map != nil { + s = append(s, "Sint64Map: "+mapStringForSint64Map+",\n") + } + keysForFixed32Map := make([]uint32, 0, len(this.Fixed32Map)) + for k := range this.Fixed32Map { + keysForFixed32Map = append(keysForFixed32Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint32s(keysForFixed32Map) + mapStringForFixed32Map := "map[uint32]uint32{" + for _, k := range keysForFixed32Map { + mapStringForFixed32Map += fmt.Sprintf("%#v: %#v,", k, this.Fixed32Map[k]) + } + mapStringForFixed32Map += "}" + if this.Fixed32Map != nil { + s = append(s, "Fixed32Map: "+mapStringForFixed32Map+",\n") + } + keysForSfixed32Map := make([]int32, 0, len(this.Sfixed32Map)) + for k := range this.Sfixed32Map { + keysForSfixed32Map = append(keysForSfixed32Map, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForSfixed32Map) + mapStringForSfixed32Map := "map[int32]int32{" + for _, k := range keysForSfixed32Map { + mapStringForSfixed32Map += fmt.Sprintf("%#v: %#v,", k, this.Sfixed32Map[k]) + } + mapStringForSfixed32Map += "}" + if this.Sfixed32Map != nil { + s = append(s, "Sfixed32Map: "+mapStringForSfixed32Map+",\n") + } + keysForFixed64Map := make([]uint64, 0, len(this.Fixed64Map)) + for k := range this.Fixed64Map { + keysForFixed64Map = append(keysForFixed64Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint64s(keysForFixed64Map) + mapStringForFixed64Map := "map[uint64]uint64{" + for _, k := range keysForFixed64Map { + mapStringForFixed64Map += fmt.Sprintf("%#v: %#v,", k, this.Fixed64Map[k]) + } + mapStringForFixed64Map += "}" + if this.Fixed64Map != nil { + s = append(s, "Fixed64Map: "+mapStringForFixed64Map+",\n") + } + keysForSfixed64Map := make([]int64, 0, len(this.Sfixed64Map)) + for k := range this.Sfixed64Map { + keysForSfixed64Map = append(keysForSfixed64Map, k) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForSfixed64Map) + mapStringForSfixed64Map := "map[int64]int64{" + for _, k := range keysForSfixed64Map { + mapStringForSfixed64Map += fmt.Sprintf("%#v: %#v,", k, this.Sfixed64Map[k]) + } + mapStringForSfixed64Map += "}" + if this.Sfixed64Map != nil { + s = append(s, "Sfixed64Map: "+mapStringForSfixed64Map+",\n") + } + keysForBoolMap := make([]bool, 0, len(this.BoolMap)) + for k := range this.BoolMap { + keysForBoolMap = append(keysForBoolMap, k) + } + github_com_gogo_protobuf_sortkeys.Bools(keysForBoolMap) + mapStringForBoolMap := "map[bool]bool{" + for _, k := range keysForBoolMap { + mapStringForBoolMap += fmt.Sprintf("%#v: %#v,", k, this.BoolMap[k]) + } + mapStringForBoolMap += "}" + if this.BoolMap != nil { + s = append(s, "BoolMap: "+mapStringForBoolMap+",\n") + } + keysForStringMap := make([]string, 0, len(this.StringMap)) + for k := range this.StringMap { + keysForStringMap = append(keysForStringMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringMap) + mapStringForStringMap := "map[string]string{" + for _, k := range keysForStringMap { + mapStringForStringMap += fmt.Sprintf("%#v: %#v,", k, this.StringMap[k]) + } + mapStringForStringMap += "}" + if this.StringMap != nil { + s = append(s, "StringMap: "+mapStringForStringMap+",\n") + } + keysForStringToBytesMap := make([]string, 0, len(this.StringToBytesMap)) + for k := range this.StringToBytesMap { + keysForStringToBytesMap = append(keysForStringToBytesMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToBytesMap) + mapStringForStringToBytesMap := "map[string][]byte{" + for _, k := range keysForStringToBytesMap { + mapStringForStringToBytesMap += fmt.Sprintf("%#v: %#v,", k, this.StringToBytesMap[k]) + } + mapStringForStringToBytesMap += "}" + if this.StringToBytesMap != nil { + s = append(s, "StringToBytesMap: "+mapStringForStringToBytesMap+",\n") + } + keysForStringToEnumMap := make([]string, 0, len(this.StringToEnumMap)) + for k := range this.StringToEnumMap { + keysForStringToEnumMap = append(keysForStringToEnumMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToEnumMap) + mapStringForStringToEnumMap := "map[string]MapEnum{" + for _, k := range keysForStringToEnumMap { + mapStringForStringToEnumMap += fmt.Sprintf("%#v: %#v,", k, this.StringToEnumMap[k]) + } + mapStringForStringToEnumMap += "}" + if this.StringToEnumMap != nil { + s = append(s, "StringToEnumMap: "+mapStringForStringToEnumMap+",\n") + } + keysForStringToMsgMap := make([]string, 0, len(this.StringToMsgMap)) + for k := range this.StringToMsgMap { + keysForStringToMsgMap = append(keysForStringToMsgMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToMsgMap) + mapStringForStringToMsgMap := "map[string]*FloatingPoint{" + for _, k := range keysForStringToMsgMap { + mapStringForStringToMsgMap += fmt.Sprintf("%#v: %#v,", k, this.StringToMsgMap[k]) + } + mapStringForStringToMsgMap += "}" + if this.StringToMsgMap != nil { + s = append(s, "StringToMsgMap: "+mapStringForStringToMsgMap+",\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 *AllMapsOrdered) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 21) + s = append(s, "&proto2_maps.AllMapsOrdered{") + keysForStringToDoubleMap := make([]string, 0, len(this.StringToDoubleMap)) + for k := range this.StringToDoubleMap { + keysForStringToDoubleMap = append(keysForStringToDoubleMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToDoubleMap) + mapStringForStringToDoubleMap := "map[string]float64{" + for _, k := range keysForStringToDoubleMap { + mapStringForStringToDoubleMap += fmt.Sprintf("%#v: %#v,", k, this.StringToDoubleMap[k]) + } + mapStringForStringToDoubleMap += "}" + if this.StringToDoubleMap != nil { + s = append(s, "StringToDoubleMap: "+mapStringForStringToDoubleMap+",\n") + } + keysForStringToFloatMap := make([]string, 0, len(this.StringToFloatMap)) + for k := range this.StringToFloatMap { + keysForStringToFloatMap = append(keysForStringToFloatMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToFloatMap) + mapStringForStringToFloatMap := "map[string]float32{" + for _, k := range keysForStringToFloatMap { + mapStringForStringToFloatMap += fmt.Sprintf("%#v: %#v,", k, this.StringToFloatMap[k]) + } + mapStringForStringToFloatMap += "}" + if this.StringToFloatMap != nil { + s = append(s, "StringToFloatMap: "+mapStringForStringToFloatMap+",\n") + } + keysForInt32Map := make([]int32, 0, len(this.Int32Map)) + for k := range this.Int32Map { + keysForInt32Map = append(keysForInt32Map, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForInt32Map) + mapStringForInt32Map := "map[int32]int32{" + for _, k := range keysForInt32Map { + mapStringForInt32Map += fmt.Sprintf("%#v: %#v,", k, this.Int32Map[k]) + } + mapStringForInt32Map += "}" + if this.Int32Map != nil { + s = append(s, "Int32Map: "+mapStringForInt32Map+",\n") + } + keysForInt64Map := make([]int64, 0, len(this.Int64Map)) + for k := range this.Int64Map { + keysForInt64Map = append(keysForInt64Map, k) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForInt64Map) + mapStringForInt64Map := "map[int64]int64{" + for _, k := range keysForInt64Map { + mapStringForInt64Map += fmt.Sprintf("%#v: %#v,", k, this.Int64Map[k]) + } + mapStringForInt64Map += "}" + if this.Int64Map != nil { + s = append(s, "Int64Map: "+mapStringForInt64Map+",\n") + } + keysForUint32Map := make([]uint32, 0, len(this.Uint32Map)) + for k := range this.Uint32Map { + keysForUint32Map = append(keysForUint32Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint32s(keysForUint32Map) + mapStringForUint32Map := "map[uint32]uint32{" + for _, k := range keysForUint32Map { + mapStringForUint32Map += fmt.Sprintf("%#v: %#v,", k, this.Uint32Map[k]) + } + mapStringForUint32Map += "}" + if this.Uint32Map != nil { + s = append(s, "Uint32Map: "+mapStringForUint32Map+",\n") + } + keysForUint64Map := make([]uint64, 0, len(this.Uint64Map)) + for k := range this.Uint64Map { + keysForUint64Map = append(keysForUint64Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint64s(keysForUint64Map) + mapStringForUint64Map := "map[uint64]uint64{" + for _, k := range keysForUint64Map { + mapStringForUint64Map += fmt.Sprintf("%#v: %#v,", k, this.Uint64Map[k]) + } + mapStringForUint64Map += "}" + if this.Uint64Map != nil { + s = append(s, "Uint64Map: "+mapStringForUint64Map+",\n") + } + keysForSint32Map := make([]int32, 0, len(this.Sint32Map)) + for k := range this.Sint32Map { + keysForSint32Map = append(keysForSint32Map, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForSint32Map) + mapStringForSint32Map := "map[int32]int32{" + for _, k := range keysForSint32Map { + mapStringForSint32Map += fmt.Sprintf("%#v: %#v,", k, this.Sint32Map[k]) + } + mapStringForSint32Map += "}" + if this.Sint32Map != nil { + s = append(s, "Sint32Map: "+mapStringForSint32Map+",\n") + } + keysForSint64Map := make([]int64, 0, len(this.Sint64Map)) + for k := range this.Sint64Map { + keysForSint64Map = append(keysForSint64Map, k) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForSint64Map) + mapStringForSint64Map := "map[int64]int64{" + for _, k := range keysForSint64Map { + mapStringForSint64Map += fmt.Sprintf("%#v: %#v,", k, this.Sint64Map[k]) + } + mapStringForSint64Map += "}" + if this.Sint64Map != nil { + s = append(s, "Sint64Map: "+mapStringForSint64Map+",\n") + } + keysForFixed32Map := make([]uint32, 0, len(this.Fixed32Map)) + for k := range this.Fixed32Map { + keysForFixed32Map = append(keysForFixed32Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint32s(keysForFixed32Map) + mapStringForFixed32Map := "map[uint32]uint32{" + for _, k := range keysForFixed32Map { + mapStringForFixed32Map += fmt.Sprintf("%#v: %#v,", k, this.Fixed32Map[k]) + } + mapStringForFixed32Map += "}" + if this.Fixed32Map != nil { + s = append(s, "Fixed32Map: "+mapStringForFixed32Map+",\n") + } + keysForSfixed32Map := make([]int32, 0, len(this.Sfixed32Map)) + for k := range this.Sfixed32Map { + keysForSfixed32Map = append(keysForSfixed32Map, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForSfixed32Map) + mapStringForSfixed32Map := "map[int32]int32{" + for _, k := range keysForSfixed32Map { + mapStringForSfixed32Map += fmt.Sprintf("%#v: %#v,", k, this.Sfixed32Map[k]) + } + mapStringForSfixed32Map += "}" + if this.Sfixed32Map != nil { + s = append(s, "Sfixed32Map: "+mapStringForSfixed32Map+",\n") + } + keysForFixed64Map := make([]uint64, 0, len(this.Fixed64Map)) + for k := range this.Fixed64Map { + keysForFixed64Map = append(keysForFixed64Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint64s(keysForFixed64Map) + mapStringForFixed64Map := "map[uint64]uint64{" + for _, k := range keysForFixed64Map { + mapStringForFixed64Map += fmt.Sprintf("%#v: %#v,", k, this.Fixed64Map[k]) + } + mapStringForFixed64Map += "}" + if this.Fixed64Map != nil { + s = append(s, "Fixed64Map: "+mapStringForFixed64Map+",\n") + } + keysForSfixed64Map := make([]int64, 0, len(this.Sfixed64Map)) + for k := range this.Sfixed64Map { + keysForSfixed64Map = append(keysForSfixed64Map, k) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForSfixed64Map) + mapStringForSfixed64Map := "map[int64]int64{" + for _, k := range keysForSfixed64Map { + mapStringForSfixed64Map += fmt.Sprintf("%#v: %#v,", k, this.Sfixed64Map[k]) + } + mapStringForSfixed64Map += "}" + if this.Sfixed64Map != nil { + s = append(s, "Sfixed64Map: "+mapStringForSfixed64Map+",\n") + } + keysForBoolMap := make([]bool, 0, len(this.BoolMap)) + for k := range this.BoolMap { + keysForBoolMap = append(keysForBoolMap, k) + } + github_com_gogo_protobuf_sortkeys.Bools(keysForBoolMap) + mapStringForBoolMap := "map[bool]bool{" + for _, k := range keysForBoolMap { + mapStringForBoolMap += fmt.Sprintf("%#v: %#v,", k, this.BoolMap[k]) + } + mapStringForBoolMap += "}" + if this.BoolMap != nil { + s = append(s, "BoolMap: "+mapStringForBoolMap+",\n") + } + keysForStringMap := make([]string, 0, len(this.StringMap)) + for k := range this.StringMap { + keysForStringMap = append(keysForStringMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringMap) + mapStringForStringMap := "map[string]string{" + for _, k := range keysForStringMap { + mapStringForStringMap += fmt.Sprintf("%#v: %#v,", k, this.StringMap[k]) + } + mapStringForStringMap += "}" + if this.StringMap != nil { + s = append(s, "StringMap: "+mapStringForStringMap+",\n") + } + keysForStringToBytesMap := make([]string, 0, len(this.StringToBytesMap)) + for k := range this.StringToBytesMap { + keysForStringToBytesMap = append(keysForStringToBytesMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToBytesMap) + mapStringForStringToBytesMap := "map[string][]byte{" + for _, k := range keysForStringToBytesMap { + mapStringForStringToBytesMap += fmt.Sprintf("%#v: %#v,", k, this.StringToBytesMap[k]) + } + mapStringForStringToBytesMap += "}" + if this.StringToBytesMap != nil { + s = append(s, "StringToBytesMap: "+mapStringForStringToBytesMap+",\n") + } + keysForStringToEnumMap := make([]string, 0, len(this.StringToEnumMap)) + for k := range this.StringToEnumMap { + keysForStringToEnumMap = append(keysForStringToEnumMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToEnumMap) + mapStringForStringToEnumMap := "map[string]MapEnum{" + for _, k := range keysForStringToEnumMap { + mapStringForStringToEnumMap += fmt.Sprintf("%#v: %#v,", k, this.StringToEnumMap[k]) + } + mapStringForStringToEnumMap += "}" + if this.StringToEnumMap != nil { + s = append(s, "StringToEnumMap: "+mapStringForStringToEnumMap+",\n") + } + keysForStringToMsgMap := make([]string, 0, len(this.StringToMsgMap)) + for k := range this.StringToMsgMap { + keysForStringToMsgMap = append(keysForStringToMsgMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToMsgMap) + mapStringForStringToMsgMap := "map[string]*FloatingPoint{" + for _, k := range keysForStringToMsgMap { + mapStringForStringToMsgMap += fmt.Sprintf("%#v: %#v,", k, this.StringToMsgMap[k]) + } + mapStringForStringToMsgMap += "}" + if this.StringToMsgMap != nil { + s = append(s, "StringToMsgMap: "+mapStringForStringToMsgMap+",\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 valueToGoStringMapsproto2(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 extensionToGoStringMapsproto2(e map[int32]github_com_gogo_protobuf_proto.Extension) string { + if e == nil { + return "nil" + } + s := "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 +} +func NewPopulatedFloatingPoint(r randyMapsproto2, easy bool) *FloatingPoint { + this := &FloatingPoint{} + if r.Intn(10) != 0 { + v1 := float64(r.Float64()) + if r.Intn(2) == 0 { + v1 *= -1 + } + this.F = &v1 + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedMapsproto2(r, 2) + } + return this +} + +func NewPopulatedAllMaps(r randyMapsproto2, easy bool) *AllMaps { + this := &AllMaps{} + if r.Intn(10) != 0 { + v2 := r.Intn(10) + this.StringToDoubleMap = make(map[string]float64) + for i := 0; i < v2; i++ { + v3 := randStringMapsproto2(r) + this.StringToDoubleMap[v3] = float64(r.Float64()) + if r.Intn(2) == 0 { + this.StringToDoubleMap[v3] *= -1 + } + } + } + if r.Intn(10) != 0 { + v4 := r.Intn(10) + this.StringToFloatMap = make(map[string]float32) + for i := 0; i < v4; i++ { + v5 := randStringMapsproto2(r) + this.StringToFloatMap[v5] = float32(r.Float32()) + if r.Intn(2) == 0 { + this.StringToFloatMap[v5] *= -1 + } + } + } + if r.Intn(10) != 0 { + v6 := r.Intn(10) + this.Int32Map = make(map[int32]int32) + for i := 0; i < v6; i++ { + v7 := int32(r.Int31()) + this.Int32Map[v7] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Int32Map[v7] *= -1 + } + } + } + if r.Intn(10) != 0 { + v8 := r.Intn(10) + this.Int64Map = make(map[int64]int64) + for i := 0; i < v8; i++ { + v9 := int64(r.Int63()) + this.Int64Map[v9] = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Int64Map[v9] *= -1 + } + } + } + if r.Intn(10) != 0 { + v10 := r.Intn(10) + this.Uint32Map = make(map[uint32]uint32) + for i := 0; i < v10; i++ { + v11 := uint32(r.Uint32()) + this.Uint32Map[v11] = uint32(r.Uint32()) + } + } + if r.Intn(10) != 0 { + v12 := r.Intn(10) + this.Uint64Map = make(map[uint64]uint64) + for i := 0; i < v12; i++ { + v13 := uint64(uint64(r.Uint32())) + this.Uint64Map[v13] = uint64(uint64(r.Uint32())) + } + } + if r.Intn(10) != 0 { + v14 := r.Intn(10) + this.Sint32Map = make(map[int32]int32) + for i := 0; i < v14; i++ { + v15 := int32(r.Int31()) + this.Sint32Map[v15] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Sint32Map[v15] *= -1 + } + } + } + if r.Intn(10) != 0 { + v16 := r.Intn(10) + this.Sint64Map = make(map[int64]int64) + for i := 0; i < v16; i++ { + v17 := int64(r.Int63()) + this.Sint64Map[v17] = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Sint64Map[v17] *= -1 + } + } + } + if r.Intn(10) != 0 { + v18 := r.Intn(10) + this.Fixed32Map = make(map[uint32]uint32) + for i := 0; i < v18; i++ { + v19 := uint32(r.Uint32()) + this.Fixed32Map[v19] = uint32(r.Uint32()) + } + } + if r.Intn(10) != 0 { + v20 := r.Intn(10) + this.Sfixed32Map = make(map[int32]int32) + for i := 0; i < v20; i++ { + v21 := int32(r.Int31()) + this.Sfixed32Map[v21] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Sfixed32Map[v21] *= -1 + } + } + } + if r.Intn(10) != 0 { + v22 := r.Intn(10) + this.Fixed64Map = make(map[uint64]uint64) + for i := 0; i < v22; i++ { + v23 := uint64(uint64(r.Uint32())) + this.Fixed64Map[v23] = uint64(uint64(r.Uint32())) + } + } + if r.Intn(10) != 0 { + v24 := r.Intn(10) + this.Sfixed64Map = make(map[int64]int64) + for i := 0; i < v24; i++ { + v25 := int64(r.Int63()) + this.Sfixed64Map[v25] = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Sfixed64Map[v25] *= -1 + } + } + } + if r.Intn(10) != 0 { + v26 := r.Intn(10) + this.BoolMap = make(map[bool]bool) + for i := 0; i < v26; i++ { + v27 := bool(bool(r.Intn(2) == 0)) + this.BoolMap[v27] = bool(bool(r.Intn(2) == 0)) + } + } + if r.Intn(10) != 0 { + v28 := r.Intn(10) + this.StringMap = make(map[string]string) + for i := 0; i < v28; i++ { + this.StringMap[randStringMapsproto2(r)] = randStringMapsproto2(r) + } + } + if r.Intn(10) != 0 { + v29 := r.Intn(10) + this.StringToBytesMap = make(map[string][]byte) + for i := 0; i < v29; i++ { + v30 := r.Intn(100) + v31 := randStringMapsproto2(r) + this.StringToBytesMap[v31] = make([]byte, v30) + for i := 0; i < v30; i++ { + this.StringToBytesMap[v31][i] = byte(r.Intn(256)) + } + } + } + if r.Intn(10) != 0 { + v32 := r.Intn(10) + this.StringToEnumMap = make(map[string]MapEnum) + for i := 0; i < v32; i++ { + this.StringToEnumMap[randStringMapsproto2(r)] = MapEnum([]int32{0, 1, 2}[r.Intn(3)]) + } + } + if r.Intn(10) != 0 { + v33 := r.Intn(10) + this.StringToMsgMap = make(map[string]*FloatingPoint) + for i := 0; i < v33; i++ { + this.StringToMsgMap[randStringMapsproto2(r)] = NewPopulatedFloatingPoint(r, easy) + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedMapsproto2(r, 18) + } + return this +} + +func NewPopulatedAllMapsOrdered(r randyMapsproto2, easy bool) *AllMapsOrdered { + this := &AllMapsOrdered{} + if r.Intn(10) != 0 { + v34 := r.Intn(10) + this.StringToDoubleMap = make(map[string]float64) + for i := 0; i < v34; i++ { + v35 := randStringMapsproto2(r) + this.StringToDoubleMap[v35] = float64(r.Float64()) + if r.Intn(2) == 0 { + this.StringToDoubleMap[v35] *= -1 + } + } + } + if r.Intn(10) != 0 { + v36 := r.Intn(10) + this.StringToFloatMap = make(map[string]float32) + for i := 0; i < v36; i++ { + v37 := randStringMapsproto2(r) + this.StringToFloatMap[v37] = float32(r.Float32()) + if r.Intn(2) == 0 { + this.StringToFloatMap[v37] *= -1 + } + } + } + if r.Intn(10) != 0 { + v38 := r.Intn(10) + this.Int32Map = make(map[int32]int32) + for i := 0; i < v38; i++ { + v39 := int32(r.Int31()) + this.Int32Map[v39] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Int32Map[v39] *= -1 + } + } + } + if r.Intn(10) != 0 { + v40 := r.Intn(10) + this.Int64Map = make(map[int64]int64) + for i := 0; i < v40; i++ { + v41 := int64(r.Int63()) + this.Int64Map[v41] = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Int64Map[v41] *= -1 + } + } + } + if r.Intn(10) != 0 { + v42 := r.Intn(10) + this.Uint32Map = make(map[uint32]uint32) + for i := 0; i < v42; i++ { + v43 := uint32(r.Uint32()) + this.Uint32Map[v43] = uint32(r.Uint32()) + } + } + if r.Intn(10) != 0 { + v44 := r.Intn(10) + this.Uint64Map = make(map[uint64]uint64) + for i := 0; i < v44; i++ { + v45 := uint64(uint64(r.Uint32())) + this.Uint64Map[v45] = uint64(uint64(r.Uint32())) + } + } + if r.Intn(10) != 0 { + v46 := r.Intn(10) + this.Sint32Map = make(map[int32]int32) + for i := 0; i < v46; i++ { + v47 := int32(r.Int31()) + this.Sint32Map[v47] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Sint32Map[v47] *= -1 + } + } + } + if r.Intn(10) != 0 { + v48 := r.Intn(10) + this.Sint64Map = make(map[int64]int64) + for i := 0; i < v48; i++ { + v49 := int64(r.Int63()) + this.Sint64Map[v49] = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Sint64Map[v49] *= -1 + } + } + } + if r.Intn(10) != 0 { + v50 := r.Intn(10) + this.Fixed32Map = make(map[uint32]uint32) + for i := 0; i < v50; i++ { + v51 := uint32(r.Uint32()) + this.Fixed32Map[v51] = uint32(r.Uint32()) + } + } + if r.Intn(10) != 0 { + v52 := r.Intn(10) + this.Sfixed32Map = make(map[int32]int32) + for i := 0; i < v52; i++ { + v53 := int32(r.Int31()) + this.Sfixed32Map[v53] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Sfixed32Map[v53] *= -1 + } + } + } + if r.Intn(10) != 0 { + v54 := r.Intn(10) + this.Fixed64Map = make(map[uint64]uint64) + for i := 0; i < v54; i++ { + v55 := uint64(uint64(r.Uint32())) + this.Fixed64Map[v55] = uint64(uint64(r.Uint32())) + } + } + if r.Intn(10) != 0 { + v56 := r.Intn(10) + this.Sfixed64Map = make(map[int64]int64) + for i := 0; i < v56; i++ { + v57 := int64(r.Int63()) + this.Sfixed64Map[v57] = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Sfixed64Map[v57] *= -1 + } + } + } + if r.Intn(10) != 0 { + v58 := r.Intn(10) + this.BoolMap = make(map[bool]bool) + for i := 0; i < v58; i++ { + v59 := bool(bool(r.Intn(2) == 0)) + this.BoolMap[v59] = bool(bool(r.Intn(2) == 0)) + } + } + if r.Intn(10) != 0 { + v60 := r.Intn(10) + this.StringMap = make(map[string]string) + for i := 0; i < v60; i++ { + this.StringMap[randStringMapsproto2(r)] = randStringMapsproto2(r) + } + } + if r.Intn(10) != 0 { + v61 := r.Intn(10) + this.StringToBytesMap = make(map[string][]byte) + for i := 0; i < v61; i++ { + v62 := r.Intn(100) + v63 := randStringMapsproto2(r) + this.StringToBytesMap[v63] = make([]byte, v62) + for i := 0; i < v62; i++ { + this.StringToBytesMap[v63][i] = byte(r.Intn(256)) + } + } + } + if r.Intn(10) != 0 { + v64 := r.Intn(10) + this.StringToEnumMap = make(map[string]MapEnum) + for i := 0; i < v64; i++ { + this.StringToEnumMap[randStringMapsproto2(r)] = MapEnum([]int32{0, 1, 2}[r.Intn(3)]) + } + } + if r.Intn(10) != 0 { + v65 := r.Intn(10) + this.StringToMsgMap = make(map[string]*FloatingPoint) + for i := 0; i < v65; i++ { + this.StringToMsgMap[randStringMapsproto2(r)] = NewPopulatedFloatingPoint(r, easy) + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedMapsproto2(r, 18) + } + return this +} + +type randyMapsproto2 interface { + Float32() float32 + Float64() float64 + Int63() int64 + Int31() int32 + Uint32() uint32 + Intn(n int) int +} + +func randUTF8RuneMapsproto2(r randyMapsproto2) 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 randStringMapsproto2(r randyMapsproto2) string { + v66 := r.Intn(100) + tmps := make([]rune, v66) + for i := 0; i < v66; i++ { + tmps[i] = randUTF8RuneMapsproto2(r) + } + return string(tmps) +} +func randUnrecognizedMapsproto2(r randyMapsproto2, 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 = randFieldMapsproto2(data, r, fieldNumber, wire) + } + return data +} +func randFieldMapsproto2(data []byte, r randyMapsproto2, fieldNumber int, wire int) []byte { + key := uint32(fieldNumber)<<3 | uint32(wire) + switch wire { + case 0: + data = encodeVarintPopulateMapsproto2(data, uint64(key)) + v67 := r.Int63() + if r.Intn(2) == 0 { + v67 *= -1 + } + data = encodeVarintPopulateMapsproto2(data, uint64(v67)) + case 1: + data = encodeVarintPopulateMapsproto2(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 = encodeVarintPopulateMapsproto2(data, uint64(key)) + ll := r.Intn(100) + data = encodeVarintPopulateMapsproto2(data, uint64(ll)) + for j := 0; j < ll; j++ { + data = append(data, byte(r.Intn(256))) + } + default: + data = encodeVarintPopulateMapsproto2(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 encodeVarintPopulateMapsproto2(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 *FloatingPoint) Size() (n int) { + var l int + _ = l + if m.F != nil { + n += 9 + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *AllMaps) Size() (n int) { + var l int + _ = l + if len(m.StringToDoubleMap) > 0 { + for k, v := range m.StringToDoubleMap { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + 1 + 8 + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.StringToFloatMap) > 0 { + for k, v := range m.StringToFloatMap { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + 1 + 4 + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.Int32Map) > 0 { + for k, v := range m.Int32Map { + _ = k + _ = v + mapEntrySize := 1 + sovMapsproto2(uint64(k)) + 1 + sovMapsproto2(uint64(v)) + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.Int64Map) > 0 { + for k, v := range m.Int64Map { + _ = k + _ = v + mapEntrySize := 1 + sovMapsproto2(uint64(k)) + 1 + sovMapsproto2(uint64(v)) + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.Uint32Map) > 0 { + for k, v := range m.Uint32Map { + _ = k + _ = v + mapEntrySize := 1 + sovMapsproto2(uint64(k)) + 1 + sovMapsproto2(uint64(v)) + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.Uint64Map) > 0 { + for k, v := range m.Uint64Map { + _ = k + _ = v + mapEntrySize := 1 + sovMapsproto2(uint64(k)) + 1 + sovMapsproto2(uint64(v)) + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.Sint32Map) > 0 { + for k, v := range m.Sint32Map { + _ = k + _ = v + mapEntrySize := 1 + sozMapsproto2(uint64(k)) + 1 + sozMapsproto2(uint64(v)) + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.Sint64Map) > 0 { + for k, v := range m.Sint64Map { + _ = k + _ = v + mapEntrySize := 1 + sozMapsproto2(uint64(k)) + 1 + sozMapsproto2(uint64(v)) + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.Fixed32Map) > 0 { + for k, v := range m.Fixed32Map { + _ = k + _ = v + mapEntrySize := 1 + 4 + 1 + 4 + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.Sfixed32Map) > 0 { + for k, v := range m.Sfixed32Map { + _ = k + _ = v + mapEntrySize := 1 + 4 + 1 + 4 + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.Fixed64Map) > 0 { + for k, v := range m.Fixed64Map { + _ = k + _ = v + mapEntrySize := 1 + 8 + 1 + 8 + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.Sfixed64Map) > 0 { + for k, v := range m.Sfixed64Map { + _ = k + _ = v + mapEntrySize := 1 + 8 + 1 + 8 + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.BoolMap) > 0 { + for k, v := range m.BoolMap { + _ = k + _ = v + mapEntrySize := 1 + 1 + 1 + 1 + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.StringMap) > 0 { + for k, v := range m.StringMap { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + 1 + len(v) + sovMapsproto2(uint64(len(v))) + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.StringToBytesMap) > 0 { + for k, v := range m.StringToBytesMap { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + 1 + len(v) + sovMapsproto2(uint64(len(v))) + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.StringToEnumMap) > 0 { + for k, v := range m.StringToEnumMap { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + 1 + sovMapsproto2(uint64(v)) + n += mapEntrySize + 2 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.StringToMsgMap) > 0 { + for k, v := range m.StringToMsgMap { + _ = k + _ = v + l = 0 + if v != nil { + l = v.Size() + } + mapEntrySize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + 1 + l + sovMapsproto2(uint64(l)) + n += mapEntrySize + 2 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *AllMapsOrdered) Size() (n int) { + var l int + _ = l + if len(m.StringToDoubleMap) > 0 { + for k, v := range m.StringToDoubleMap { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + 1 + 8 + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.StringToFloatMap) > 0 { + for k, v := range m.StringToFloatMap { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + 1 + 4 + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.Int32Map) > 0 { + for k, v := range m.Int32Map { + _ = k + _ = v + mapEntrySize := 1 + sovMapsproto2(uint64(k)) + 1 + sovMapsproto2(uint64(v)) + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.Int64Map) > 0 { + for k, v := range m.Int64Map { + _ = k + _ = v + mapEntrySize := 1 + sovMapsproto2(uint64(k)) + 1 + sovMapsproto2(uint64(v)) + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.Uint32Map) > 0 { + for k, v := range m.Uint32Map { + _ = k + _ = v + mapEntrySize := 1 + sovMapsproto2(uint64(k)) + 1 + sovMapsproto2(uint64(v)) + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.Uint64Map) > 0 { + for k, v := range m.Uint64Map { + _ = k + _ = v + mapEntrySize := 1 + sovMapsproto2(uint64(k)) + 1 + sovMapsproto2(uint64(v)) + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.Sint32Map) > 0 { + for k, v := range m.Sint32Map { + _ = k + _ = v + mapEntrySize := 1 + sozMapsproto2(uint64(k)) + 1 + sozMapsproto2(uint64(v)) + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.Sint64Map) > 0 { + for k, v := range m.Sint64Map { + _ = k + _ = v + mapEntrySize := 1 + sozMapsproto2(uint64(k)) + 1 + sozMapsproto2(uint64(v)) + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.Fixed32Map) > 0 { + for k, v := range m.Fixed32Map { + _ = k + _ = v + mapEntrySize := 1 + 4 + 1 + 4 + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.Sfixed32Map) > 0 { + for k, v := range m.Sfixed32Map { + _ = k + _ = v + mapEntrySize := 1 + 4 + 1 + 4 + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.Fixed64Map) > 0 { + for k, v := range m.Fixed64Map { + _ = k + _ = v + mapEntrySize := 1 + 8 + 1 + 8 + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.Sfixed64Map) > 0 { + for k, v := range m.Sfixed64Map { + _ = k + _ = v + mapEntrySize := 1 + 8 + 1 + 8 + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.BoolMap) > 0 { + for k, v := range m.BoolMap { + _ = k + _ = v + mapEntrySize := 1 + 1 + 1 + 1 + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.StringMap) > 0 { + for k, v := range m.StringMap { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + 1 + len(v) + sovMapsproto2(uint64(len(v))) + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.StringToBytesMap) > 0 { + for k, v := range m.StringToBytesMap { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + 1 + len(v) + sovMapsproto2(uint64(len(v))) + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.StringToEnumMap) > 0 { + for k, v := range m.StringToEnumMap { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + 1 + sovMapsproto2(uint64(v)) + n += mapEntrySize + 2 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.StringToMsgMap) > 0 { + for k, v := range m.StringToMsgMap { + _ = k + _ = v + l = 0 + if v != nil { + l = v.Size() + } + mapEntrySize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + 1 + l + sovMapsproto2(uint64(l)) + n += mapEntrySize + 2 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func sovMapsproto2(x uint64) (n int) { + for { + n++ + x >>= 7 + if x == 0 { + break + } + } + return n +} +func sozMapsproto2(x uint64) (n int) { + return sovMapsproto2(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (this *FloatingPoint) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&FloatingPoint{`, + `F:` + valueToStringMapsproto2(this.F) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *AllMaps) String() string { + if this == nil { + return "nil" + } + keysForStringToDoubleMap := make([]string, 0, len(this.StringToDoubleMap)) + for k := range this.StringToDoubleMap { + keysForStringToDoubleMap = append(keysForStringToDoubleMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToDoubleMap) + mapStringForStringToDoubleMap := "map[string]float64{" + for _, k := range keysForStringToDoubleMap { + mapStringForStringToDoubleMap += fmt.Sprintf("%v: %v,", k, this.StringToDoubleMap[k]) + } + mapStringForStringToDoubleMap += "}" + keysForStringToFloatMap := make([]string, 0, len(this.StringToFloatMap)) + for k := range this.StringToFloatMap { + keysForStringToFloatMap = append(keysForStringToFloatMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToFloatMap) + mapStringForStringToFloatMap := "map[string]float32{" + for _, k := range keysForStringToFloatMap { + mapStringForStringToFloatMap += fmt.Sprintf("%v: %v,", k, this.StringToFloatMap[k]) + } + mapStringForStringToFloatMap += "}" + keysForInt32Map := make([]int32, 0, len(this.Int32Map)) + for k := range this.Int32Map { + keysForInt32Map = append(keysForInt32Map, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForInt32Map) + mapStringForInt32Map := "map[int32]int32{" + for _, k := range keysForInt32Map { + mapStringForInt32Map += fmt.Sprintf("%v: %v,", k, this.Int32Map[k]) + } + mapStringForInt32Map += "}" + keysForInt64Map := make([]int64, 0, len(this.Int64Map)) + for k := range this.Int64Map { + keysForInt64Map = append(keysForInt64Map, k) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForInt64Map) + mapStringForInt64Map := "map[int64]int64{" + for _, k := range keysForInt64Map { + mapStringForInt64Map += fmt.Sprintf("%v: %v,", k, this.Int64Map[k]) + } + mapStringForInt64Map += "}" + keysForUint32Map := make([]uint32, 0, len(this.Uint32Map)) + for k := range this.Uint32Map { + keysForUint32Map = append(keysForUint32Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint32s(keysForUint32Map) + mapStringForUint32Map := "map[uint32]uint32{" + for _, k := range keysForUint32Map { + mapStringForUint32Map += fmt.Sprintf("%v: %v,", k, this.Uint32Map[k]) + } + mapStringForUint32Map += "}" + keysForUint64Map := make([]uint64, 0, len(this.Uint64Map)) + for k := range this.Uint64Map { + keysForUint64Map = append(keysForUint64Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint64s(keysForUint64Map) + mapStringForUint64Map := "map[uint64]uint64{" + for _, k := range keysForUint64Map { + mapStringForUint64Map += fmt.Sprintf("%v: %v,", k, this.Uint64Map[k]) + } + mapStringForUint64Map += "}" + keysForSint32Map := make([]int32, 0, len(this.Sint32Map)) + for k := range this.Sint32Map { + keysForSint32Map = append(keysForSint32Map, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForSint32Map) + mapStringForSint32Map := "map[int32]int32{" + for _, k := range keysForSint32Map { + mapStringForSint32Map += fmt.Sprintf("%v: %v,", k, this.Sint32Map[k]) + } + mapStringForSint32Map += "}" + keysForSint64Map := make([]int64, 0, len(this.Sint64Map)) + for k := range this.Sint64Map { + keysForSint64Map = append(keysForSint64Map, k) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForSint64Map) + mapStringForSint64Map := "map[int64]int64{" + for _, k := range keysForSint64Map { + mapStringForSint64Map += fmt.Sprintf("%v: %v,", k, this.Sint64Map[k]) + } + mapStringForSint64Map += "}" + keysForFixed32Map := make([]uint32, 0, len(this.Fixed32Map)) + for k := range this.Fixed32Map { + keysForFixed32Map = append(keysForFixed32Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint32s(keysForFixed32Map) + mapStringForFixed32Map := "map[uint32]uint32{" + for _, k := range keysForFixed32Map { + mapStringForFixed32Map += fmt.Sprintf("%v: %v,", k, this.Fixed32Map[k]) + } + mapStringForFixed32Map += "}" + keysForSfixed32Map := make([]int32, 0, len(this.Sfixed32Map)) + for k := range this.Sfixed32Map { + keysForSfixed32Map = append(keysForSfixed32Map, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForSfixed32Map) + mapStringForSfixed32Map := "map[int32]int32{" + for _, k := range keysForSfixed32Map { + mapStringForSfixed32Map += fmt.Sprintf("%v: %v,", k, this.Sfixed32Map[k]) + } + mapStringForSfixed32Map += "}" + keysForFixed64Map := make([]uint64, 0, len(this.Fixed64Map)) + for k := range this.Fixed64Map { + keysForFixed64Map = append(keysForFixed64Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint64s(keysForFixed64Map) + mapStringForFixed64Map := "map[uint64]uint64{" + for _, k := range keysForFixed64Map { + mapStringForFixed64Map += fmt.Sprintf("%v: %v,", k, this.Fixed64Map[k]) + } + mapStringForFixed64Map += "}" + keysForSfixed64Map := make([]int64, 0, len(this.Sfixed64Map)) + for k := range this.Sfixed64Map { + keysForSfixed64Map = append(keysForSfixed64Map, k) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForSfixed64Map) + mapStringForSfixed64Map := "map[int64]int64{" + for _, k := range keysForSfixed64Map { + mapStringForSfixed64Map += fmt.Sprintf("%v: %v,", k, this.Sfixed64Map[k]) + } + mapStringForSfixed64Map += "}" + keysForBoolMap := make([]bool, 0, len(this.BoolMap)) + for k := range this.BoolMap { + keysForBoolMap = append(keysForBoolMap, k) + } + github_com_gogo_protobuf_sortkeys.Bools(keysForBoolMap) + mapStringForBoolMap := "map[bool]bool{" + for _, k := range keysForBoolMap { + mapStringForBoolMap += fmt.Sprintf("%v: %v,", k, this.BoolMap[k]) + } + mapStringForBoolMap += "}" + keysForStringMap := make([]string, 0, len(this.StringMap)) + for k := range this.StringMap { + keysForStringMap = append(keysForStringMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringMap) + mapStringForStringMap := "map[string]string{" + for _, k := range keysForStringMap { + mapStringForStringMap += fmt.Sprintf("%v: %v,", k, this.StringMap[k]) + } + mapStringForStringMap += "}" + keysForStringToBytesMap := make([]string, 0, len(this.StringToBytesMap)) + for k := range this.StringToBytesMap { + keysForStringToBytesMap = append(keysForStringToBytesMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToBytesMap) + mapStringForStringToBytesMap := "map[string][]byte{" + for _, k := range keysForStringToBytesMap { + mapStringForStringToBytesMap += fmt.Sprintf("%v: %v,", k, this.StringToBytesMap[k]) + } + mapStringForStringToBytesMap += "}" + keysForStringToEnumMap := make([]string, 0, len(this.StringToEnumMap)) + for k := range this.StringToEnumMap { + keysForStringToEnumMap = append(keysForStringToEnumMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToEnumMap) + mapStringForStringToEnumMap := "map[string]MapEnum{" + for _, k := range keysForStringToEnumMap { + mapStringForStringToEnumMap += fmt.Sprintf("%v: %v,", k, this.StringToEnumMap[k]) + } + mapStringForStringToEnumMap += "}" + keysForStringToMsgMap := make([]string, 0, len(this.StringToMsgMap)) + for k := range this.StringToMsgMap { + keysForStringToMsgMap = append(keysForStringToMsgMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToMsgMap) + mapStringForStringToMsgMap := "map[string]*FloatingPoint{" + for _, k := range keysForStringToMsgMap { + mapStringForStringToMsgMap += fmt.Sprintf("%v: %v,", k, this.StringToMsgMap[k]) + } + mapStringForStringToMsgMap += "}" + s := strings.Join([]string{`&AllMaps{`, + `StringToDoubleMap:` + mapStringForStringToDoubleMap + `,`, + `StringToFloatMap:` + mapStringForStringToFloatMap + `,`, + `Int32Map:` + mapStringForInt32Map + `,`, + `Int64Map:` + mapStringForInt64Map + `,`, + `Uint32Map:` + mapStringForUint32Map + `,`, + `Uint64Map:` + mapStringForUint64Map + `,`, + `Sint32Map:` + mapStringForSint32Map + `,`, + `Sint64Map:` + mapStringForSint64Map + `,`, + `Fixed32Map:` + mapStringForFixed32Map + `,`, + `Sfixed32Map:` + mapStringForSfixed32Map + `,`, + `Fixed64Map:` + mapStringForFixed64Map + `,`, + `Sfixed64Map:` + mapStringForSfixed64Map + `,`, + `BoolMap:` + mapStringForBoolMap + `,`, + `StringMap:` + mapStringForStringMap + `,`, + `StringToBytesMap:` + mapStringForStringToBytesMap + `,`, + `StringToEnumMap:` + mapStringForStringToEnumMap + `,`, + `StringToMsgMap:` + mapStringForStringToMsgMap + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *AllMapsOrdered) String() string { + if this == nil { + return "nil" + } + keysForStringToDoubleMap := make([]string, 0, len(this.StringToDoubleMap)) + for k := range this.StringToDoubleMap { + keysForStringToDoubleMap = append(keysForStringToDoubleMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToDoubleMap) + mapStringForStringToDoubleMap := "map[string]float64{" + for _, k := range keysForStringToDoubleMap { + mapStringForStringToDoubleMap += fmt.Sprintf("%v: %v,", k, this.StringToDoubleMap[k]) + } + mapStringForStringToDoubleMap += "}" + keysForStringToFloatMap := make([]string, 0, len(this.StringToFloatMap)) + for k := range this.StringToFloatMap { + keysForStringToFloatMap = append(keysForStringToFloatMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToFloatMap) + mapStringForStringToFloatMap := "map[string]float32{" + for _, k := range keysForStringToFloatMap { + mapStringForStringToFloatMap += fmt.Sprintf("%v: %v,", k, this.StringToFloatMap[k]) + } + mapStringForStringToFloatMap += "}" + keysForInt32Map := make([]int32, 0, len(this.Int32Map)) + for k := range this.Int32Map { + keysForInt32Map = append(keysForInt32Map, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForInt32Map) + mapStringForInt32Map := "map[int32]int32{" + for _, k := range keysForInt32Map { + mapStringForInt32Map += fmt.Sprintf("%v: %v,", k, this.Int32Map[k]) + } + mapStringForInt32Map += "}" + keysForInt64Map := make([]int64, 0, len(this.Int64Map)) + for k := range this.Int64Map { + keysForInt64Map = append(keysForInt64Map, k) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForInt64Map) + mapStringForInt64Map := "map[int64]int64{" + for _, k := range keysForInt64Map { + mapStringForInt64Map += fmt.Sprintf("%v: %v,", k, this.Int64Map[k]) + } + mapStringForInt64Map += "}" + keysForUint32Map := make([]uint32, 0, len(this.Uint32Map)) + for k := range this.Uint32Map { + keysForUint32Map = append(keysForUint32Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint32s(keysForUint32Map) + mapStringForUint32Map := "map[uint32]uint32{" + for _, k := range keysForUint32Map { + mapStringForUint32Map += fmt.Sprintf("%v: %v,", k, this.Uint32Map[k]) + } + mapStringForUint32Map += "}" + keysForUint64Map := make([]uint64, 0, len(this.Uint64Map)) + for k := range this.Uint64Map { + keysForUint64Map = append(keysForUint64Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint64s(keysForUint64Map) + mapStringForUint64Map := "map[uint64]uint64{" + for _, k := range keysForUint64Map { + mapStringForUint64Map += fmt.Sprintf("%v: %v,", k, this.Uint64Map[k]) + } + mapStringForUint64Map += "}" + keysForSint32Map := make([]int32, 0, len(this.Sint32Map)) + for k := range this.Sint32Map { + keysForSint32Map = append(keysForSint32Map, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForSint32Map) + mapStringForSint32Map := "map[int32]int32{" + for _, k := range keysForSint32Map { + mapStringForSint32Map += fmt.Sprintf("%v: %v,", k, this.Sint32Map[k]) + } + mapStringForSint32Map += "}" + keysForSint64Map := make([]int64, 0, len(this.Sint64Map)) + for k := range this.Sint64Map { + keysForSint64Map = append(keysForSint64Map, k) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForSint64Map) + mapStringForSint64Map := "map[int64]int64{" + for _, k := range keysForSint64Map { + mapStringForSint64Map += fmt.Sprintf("%v: %v,", k, this.Sint64Map[k]) + } + mapStringForSint64Map += "}" + keysForFixed32Map := make([]uint32, 0, len(this.Fixed32Map)) + for k := range this.Fixed32Map { + keysForFixed32Map = append(keysForFixed32Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint32s(keysForFixed32Map) + mapStringForFixed32Map := "map[uint32]uint32{" + for _, k := range keysForFixed32Map { + mapStringForFixed32Map += fmt.Sprintf("%v: %v,", k, this.Fixed32Map[k]) + } + mapStringForFixed32Map += "}" + keysForSfixed32Map := make([]int32, 0, len(this.Sfixed32Map)) + for k := range this.Sfixed32Map { + keysForSfixed32Map = append(keysForSfixed32Map, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForSfixed32Map) + mapStringForSfixed32Map := "map[int32]int32{" + for _, k := range keysForSfixed32Map { + mapStringForSfixed32Map += fmt.Sprintf("%v: %v,", k, this.Sfixed32Map[k]) + } + mapStringForSfixed32Map += "}" + keysForFixed64Map := make([]uint64, 0, len(this.Fixed64Map)) + for k := range this.Fixed64Map { + keysForFixed64Map = append(keysForFixed64Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint64s(keysForFixed64Map) + mapStringForFixed64Map := "map[uint64]uint64{" + for _, k := range keysForFixed64Map { + mapStringForFixed64Map += fmt.Sprintf("%v: %v,", k, this.Fixed64Map[k]) + } + mapStringForFixed64Map += "}" + keysForSfixed64Map := make([]int64, 0, len(this.Sfixed64Map)) + for k := range this.Sfixed64Map { + keysForSfixed64Map = append(keysForSfixed64Map, k) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForSfixed64Map) + mapStringForSfixed64Map := "map[int64]int64{" + for _, k := range keysForSfixed64Map { + mapStringForSfixed64Map += fmt.Sprintf("%v: %v,", k, this.Sfixed64Map[k]) + } + mapStringForSfixed64Map += "}" + keysForBoolMap := make([]bool, 0, len(this.BoolMap)) + for k := range this.BoolMap { + keysForBoolMap = append(keysForBoolMap, k) + } + github_com_gogo_protobuf_sortkeys.Bools(keysForBoolMap) + mapStringForBoolMap := "map[bool]bool{" + for _, k := range keysForBoolMap { + mapStringForBoolMap += fmt.Sprintf("%v: %v,", k, this.BoolMap[k]) + } + mapStringForBoolMap += "}" + keysForStringMap := make([]string, 0, len(this.StringMap)) + for k := range this.StringMap { + keysForStringMap = append(keysForStringMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringMap) + mapStringForStringMap := "map[string]string{" + for _, k := range keysForStringMap { + mapStringForStringMap += fmt.Sprintf("%v: %v,", k, this.StringMap[k]) + } + mapStringForStringMap += "}" + keysForStringToBytesMap := make([]string, 0, len(this.StringToBytesMap)) + for k := range this.StringToBytesMap { + keysForStringToBytesMap = append(keysForStringToBytesMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToBytesMap) + mapStringForStringToBytesMap := "map[string][]byte{" + for _, k := range keysForStringToBytesMap { + mapStringForStringToBytesMap += fmt.Sprintf("%v: %v,", k, this.StringToBytesMap[k]) + } + mapStringForStringToBytesMap += "}" + keysForStringToEnumMap := make([]string, 0, len(this.StringToEnumMap)) + for k := range this.StringToEnumMap { + keysForStringToEnumMap = append(keysForStringToEnumMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToEnumMap) + mapStringForStringToEnumMap := "map[string]MapEnum{" + for _, k := range keysForStringToEnumMap { + mapStringForStringToEnumMap += fmt.Sprintf("%v: %v,", k, this.StringToEnumMap[k]) + } + mapStringForStringToEnumMap += "}" + keysForStringToMsgMap := make([]string, 0, len(this.StringToMsgMap)) + for k := range this.StringToMsgMap { + keysForStringToMsgMap = append(keysForStringToMsgMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToMsgMap) + mapStringForStringToMsgMap := "map[string]*FloatingPoint{" + for _, k := range keysForStringToMsgMap { + mapStringForStringToMsgMap += fmt.Sprintf("%v: %v,", k, this.StringToMsgMap[k]) + } + mapStringForStringToMsgMap += "}" + s := strings.Join([]string{`&AllMapsOrdered{`, + `StringToDoubleMap:` + mapStringForStringToDoubleMap + `,`, + `StringToFloatMap:` + mapStringForStringToFloatMap + `,`, + `Int32Map:` + mapStringForInt32Map + `,`, + `Int64Map:` + mapStringForInt64Map + `,`, + `Uint32Map:` + mapStringForUint32Map + `,`, + `Uint64Map:` + mapStringForUint64Map + `,`, + `Sint32Map:` + mapStringForSint32Map + `,`, + `Sint64Map:` + mapStringForSint64Map + `,`, + `Fixed32Map:` + mapStringForFixed32Map + `,`, + `Sfixed32Map:` + mapStringForSfixed32Map + `,`, + `Fixed64Map:` + mapStringForFixed64Map + `,`, + `Sfixed64Map:` + mapStringForSfixed64Map + `,`, + `BoolMap:` + mapStringForBoolMap + `,`, + `StringMap:` + mapStringForStringMap + `,`, + `StringToBytesMap:` + mapStringForStringToBytesMap + `,`, + `StringToEnumMap:` + mapStringForStringToEnumMap + `,`, + `StringToMsgMap:` + mapStringForStringToMsgMap + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func valueToStringMapsproto2(v interface{}) string { + rv := reflect.ValueOf(v) + if rv.IsNil() { + return "nil" + } + pv := reflect.Indirect(rv).Interface() + return fmt.Sprintf("*%v", pv) +} +func (m *FloatingPoint) 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 ErrIntOverflowMapsproto2Unsafe + } + 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: FloatingPoint: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: FloatingPoint: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field F", wireType) + } + var v float64 + if iNdEx+8 > l { + return io.ErrUnexpectedEOF + } + v = *(*float64)(unsafe.Pointer(&data[iNdEx])) + iNdEx += 8 + m.F = &v + default: + iNdEx = preIndex + skippy, err := skipMapsproto2Unsafe(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMapsproto2Unsafe + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *AllMaps) 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 ErrIntOverflowMapsproto2Unsafe + } + 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: AllMaps: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: AllMaps: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field StringToDoubleMap", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMapsproto2Unsafe + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var keykey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + keykey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var stringLenmapkey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLenmapkey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapkey := int(stringLenmapkey) + if intStringLenmapkey < 0 { + return ErrInvalidLengthMapsproto2Unsafe + } + postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey > l { + return io.ErrUnexpectedEOF + } + mapkey := string(data[iNdEx:postStringIndexmapkey]) + iNdEx = postStringIndexmapkey + var valuekey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + valuekey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapvaluetemp uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + iNdEx += 8 + mapvaluetemp = uint64(data[iNdEx-8]) + mapvaluetemp |= uint64(data[iNdEx-7]) << 8 + mapvaluetemp |= uint64(data[iNdEx-6]) << 16 + mapvaluetemp |= uint64(data[iNdEx-5]) << 24 + mapvaluetemp |= uint64(data[iNdEx-4]) << 32 + mapvaluetemp |= uint64(data[iNdEx-3]) << 40 + mapvaluetemp |= uint64(data[iNdEx-2]) << 48 + mapvaluetemp |= uint64(data[iNdEx-1]) << 56 + mapvalue := math.Float64frombits(mapvaluetemp) + if m.StringToDoubleMap == nil { + m.StringToDoubleMap = make(map[string]float64) + } + m.StringToDoubleMap[mapkey] = mapvalue + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field StringToFloatMap", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMapsproto2Unsafe + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var keykey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + keykey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var stringLenmapkey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLenmapkey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapkey := int(stringLenmapkey) + if intStringLenmapkey < 0 { + return ErrInvalidLengthMapsproto2Unsafe + } + postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey > l { + return io.ErrUnexpectedEOF + } + mapkey := string(data[iNdEx:postStringIndexmapkey]) + iNdEx = postStringIndexmapkey + var valuekey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + valuekey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapvaluetemp uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + iNdEx += 4 + mapvaluetemp = uint32(data[iNdEx-4]) + mapvaluetemp |= uint32(data[iNdEx-3]) << 8 + mapvaluetemp |= uint32(data[iNdEx-2]) << 16 + mapvaluetemp |= uint32(data[iNdEx-1]) << 24 + mapvalue := math.Float32frombits(mapvaluetemp) + if m.StringToFloatMap == nil { + m.StringToFloatMap = make(map[string]float32) + } + m.StringToFloatMap[mapkey] = mapvalue + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Int32Map", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMapsproto2Unsafe + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var keykey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + keykey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapkey int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + mapkey |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var valuekey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + valuekey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapvalue int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + mapvalue |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if m.Int32Map == nil { + m.Int32Map = make(map[int32]int32) + } + m.Int32Map[mapkey] = mapvalue + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Int64Map", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMapsproto2Unsafe + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var keykey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + keykey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapkey int64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + mapkey |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var valuekey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + valuekey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapvalue int64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + mapvalue |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if m.Int64Map == nil { + m.Int64Map = make(map[int64]int64) + } + m.Int64Map[mapkey] = mapvalue + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Uint32Map", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMapsproto2Unsafe + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var keykey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + keykey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapkey uint32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + mapkey |= (uint32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var valuekey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + valuekey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapvalue uint32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + mapvalue |= (uint32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if m.Uint32Map == nil { + m.Uint32Map = make(map[uint32]uint32) + } + m.Uint32Map[mapkey] = mapvalue + iNdEx = postIndex + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Uint64Map", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMapsproto2Unsafe + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var keykey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + keykey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapkey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + mapkey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var valuekey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + valuekey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapvalue uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + mapvalue |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if m.Uint64Map == nil { + m.Uint64Map = make(map[uint64]uint64) + } + m.Uint64Map[mapkey] = mapvalue + iNdEx = postIndex + case 7: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Sint32Map", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMapsproto2Unsafe + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var keykey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + keykey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapkeytemp int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + mapkeytemp |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + mapkeytemp = int32((uint32(mapkeytemp) >> 1) ^ uint32(((mapkeytemp&1)<<31)>>31)) + mapkey := int32(mapkeytemp) + var valuekey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + valuekey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapvaluetemp int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + mapvaluetemp |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + mapvaluetemp = int32((uint32(mapvaluetemp) >> 1) ^ uint32(((mapvaluetemp&1)<<31)>>31)) + mapvalue := int32(mapvaluetemp) + if m.Sint32Map == nil { + m.Sint32Map = make(map[int32]int32) + } + m.Sint32Map[mapkey] = mapvalue + iNdEx = postIndex + case 8: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Sint64Map", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMapsproto2Unsafe + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var keykey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + keykey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapkeytemp uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + mapkeytemp |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + mapkeytemp = (mapkeytemp >> 1) ^ uint64((int64(mapkeytemp&1)<<63)>>63) + mapkey := int64(mapkeytemp) + var valuekey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + valuekey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapvaluetemp uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + mapvaluetemp |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + mapvaluetemp = (mapvaluetemp >> 1) ^ uint64((int64(mapvaluetemp&1)<<63)>>63) + mapvalue := int64(mapvaluetemp) + if m.Sint64Map == nil { + m.Sint64Map = make(map[int64]int64) + } + m.Sint64Map[mapkey] = mapvalue + iNdEx = postIndex + case 9: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Fixed32Map", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMapsproto2Unsafe + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var keykey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + keykey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapkey uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + iNdEx += 4 + mapkey = uint32(data[iNdEx-4]) + mapkey |= uint32(data[iNdEx-3]) << 8 + mapkey |= uint32(data[iNdEx-2]) << 16 + mapkey |= uint32(data[iNdEx-1]) << 24 + var valuekey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + valuekey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapvalue uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + iNdEx += 4 + mapvalue = uint32(data[iNdEx-4]) + mapvalue |= uint32(data[iNdEx-3]) << 8 + mapvalue |= uint32(data[iNdEx-2]) << 16 + mapvalue |= uint32(data[iNdEx-1]) << 24 + if m.Fixed32Map == nil { + m.Fixed32Map = make(map[uint32]uint32) + } + m.Fixed32Map[mapkey] = mapvalue + iNdEx = postIndex + case 10: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Sfixed32Map", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMapsproto2Unsafe + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var keykey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + keykey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapkey int32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + iNdEx += 4 + mapkey = int32(data[iNdEx-4]) + mapkey |= int32(data[iNdEx-3]) << 8 + mapkey |= int32(data[iNdEx-2]) << 16 + mapkey |= int32(data[iNdEx-1]) << 24 + var valuekey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + valuekey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapvalue int32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + iNdEx += 4 + mapvalue = int32(data[iNdEx-4]) + mapvalue |= int32(data[iNdEx-3]) << 8 + mapvalue |= int32(data[iNdEx-2]) << 16 + mapvalue |= int32(data[iNdEx-1]) << 24 + if m.Sfixed32Map == nil { + m.Sfixed32Map = make(map[int32]int32) + } + m.Sfixed32Map[mapkey] = mapvalue + iNdEx = postIndex + case 11: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Fixed64Map", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMapsproto2Unsafe + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var keykey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + keykey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapkey uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + iNdEx += 8 + mapkey = uint64(data[iNdEx-8]) + mapkey |= uint64(data[iNdEx-7]) << 8 + mapkey |= uint64(data[iNdEx-6]) << 16 + mapkey |= uint64(data[iNdEx-5]) << 24 + mapkey |= uint64(data[iNdEx-4]) << 32 + mapkey |= uint64(data[iNdEx-3]) << 40 + mapkey |= uint64(data[iNdEx-2]) << 48 + mapkey |= uint64(data[iNdEx-1]) << 56 + var valuekey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + valuekey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapvalue uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + iNdEx += 8 + mapvalue = uint64(data[iNdEx-8]) + mapvalue |= uint64(data[iNdEx-7]) << 8 + mapvalue |= uint64(data[iNdEx-6]) << 16 + mapvalue |= uint64(data[iNdEx-5]) << 24 + mapvalue |= uint64(data[iNdEx-4]) << 32 + mapvalue |= uint64(data[iNdEx-3]) << 40 + mapvalue |= uint64(data[iNdEx-2]) << 48 + mapvalue |= uint64(data[iNdEx-1]) << 56 + if m.Fixed64Map == nil { + m.Fixed64Map = make(map[uint64]uint64) + } + m.Fixed64Map[mapkey] = mapvalue + iNdEx = postIndex + case 12: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Sfixed64Map", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMapsproto2Unsafe + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var keykey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + keykey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapkey int64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + iNdEx += 8 + mapkey = int64(data[iNdEx-8]) + mapkey |= int64(data[iNdEx-7]) << 8 + mapkey |= int64(data[iNdEx-6]) << 16 + mapkey |= int64(data[iNdEx-5]) << 24 + mapkey |= int64(data[iNdEx-4]) << 32 + mapkey |= int64(data[iNdEx-3]) << 40 + mapkey |= int64(data[iNdEx-2]) << 48 + mapkey |= int64(data[iNdEx-1]) << 56 + var valuekey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + valuekey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapvalue int64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + iNdEx += 8 + mapvalue = int64(data[iNdEx-8]) + mapvalue |= int64(data[iNdEx-7]) << 8 + mapvalue |= int64(data[iNdEx-6]) << 16 + mapvalue |= int64(data[iNdEx-5]) << 24 + mapvalue |= int64(data[iNdEx-4]) << 32 + mapvalue |= int64(data[iNdEx-3]) << 40 + mapvalue |= int64(data[iNdEx-2]) << 48 + mapvalue |= int64(data[iNdEx-1]) << 56 + if m.Sfixed64Map == nil { + m.Sfixed64Map = make(map[int64]int64) + } + m.Sfixed64Map[mapkey] = mapvalue + iNdEx = postIndex + case 13: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field BoolMap", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMapsproto2Unsafe + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var keykey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + keykey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapkeytemp int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + mapkeytemp |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + mapkey := bool(mapkeytemp != 0) + var valuekey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + valuekey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapvaluetemp int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + mapvaluetemp |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + mapvalue := bool(mapvaluetemp != 0) + if m.BoolMap == nil { + m.BoolMap = make(map[bool]bool) + } + m.BoolMap[mapkey] = mapvalue + iNdEx = postIndex + case 14: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field StringMap", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMapsproto2Unsafe + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var keykey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + keykey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var stringLenmapkey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLenmapkey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapkey := int(stringLenmapkey) + if intStringLenmapkey < 0 { + return ErrInvalidLengthMapsproto2Unsafe + } + postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey > l { + return io.ErrUnexpectedEOF + } + mapkey := string(data[iNdEx:postStringIndexmapkey]) + iNdEx = postStringIndexmapkey + var valuekey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + valuekey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var stringLenmapvalue uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLenmapvalue |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapvalue := int(stringLenmapvalue) + if intStringLenmapvalue < 0 { + return ErrInvalidLengthMapsproto2Unsafe + } + postStringIndexmapvalue := iNdEx + intStringLenmapvalue + if postStringIndexmapvalue > l { + return io.ErrUnexpectedEOF + } + mapvalue := string(data[iNdEx:postStringIndexmapvalue]) + iNdEx = postStringIndexmapvalue + if m.StringMap == nil { + m.StringMap = make(map[string]string) + } + m.StringMap[mapkey] = mapvalue + iNdEx = postIndex + case 15: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field StringToBytesMap", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMapsproto2Unsafe + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var keykey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + keykey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var stringLenmapkey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLenmapkey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapkey := int(stringLenmapkey) + if intStringLenmapkey < 0 { + return ErrInvalidLengthMapsproto2Unsafe + } + postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey > l { + return io.ErrUnexpectedEOF + } + mapkey := string(data[iNdEx:postStringIndexmapkey]) + iNdEx = postStringIndexmapkey + var valuekey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + valuekey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapbyteLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + mapbyteLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intMapbyteLen := int(mapbyteLen) + if intMapbyteLen < 0 { + return ErrInvalidLengthMapsproto2Unsafe + } + postbytesIndex := iNdEx + intMapbyteLen + if postbytesIndex > l { + return io.ErrUnexpectedEOF + } + mapvalue := make([]byte, mapbyteLen) + copy(mapvalue, data[iNdEx:postbytesIndex]) + iNdEx = postbytesIndex + if m.StringToBytesMap == nil { + m.StringToBytesMap = make(map[string][]byte) + } + m.StringToBytesMap[mapkey] = mapvalue + iNdEx = postIndex + case 16: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field StringToEnumMap", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMapsproto2Unsafe + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var keykey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + keykey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var stringLenmapkey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLenmapkey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapkey := int(stringLenmapkey) + if intStringLenmapkey < 0 { + return ErrInvalidLengthMapsproto2Unsafe + } + postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey > l { + return io.ErrUnexpectedEOF + } + mapkey := string(data[iNdEx:postStringIndexmapkey]) + iNdEx = postStringIndexmapkey + var valuekey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + valuekey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapvalue MapEnum + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + mapvalue |= (MapEnum(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if m.StringToEnumMap == nil { + m.StringToEnumMap = make(map[string]MapEnum) + } + m.StringToEnumMap[mapkey] = mapvalue + iNdEx = postIndex + case 17: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field StringToMsgMap", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMapsproto2Unsafe + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var keykey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + keykey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var stringLenmapkey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLenmapkey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapkey := int(stringLenmapkey) + if intStringLenmapkey < 0 { + return ErrInvalidLengthMapsproto2Unsafe + } + postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey > l { + return io.ErrUnexpectedEOF + } + mapkey := string(data[iNdEx:postStringIndexmapkey]) + iNdEx = postStringIndexmapkey + var valuekey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + valuekey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapmsglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + mapmsglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if mapmsglen < 0 { + return ErrInvalidLengthMapsproto2Unsafe + } + postmsgIndex := iNdEx + mapmsglen + if mapmsglen < 0 { + return ErrInvalidLengthMapsproto2Unsafe + } + if postmsgIndex > l { + return io.ErrUnexpectedEOF + } + mapvalue := &FloatingPoint{} + if err := mapvalue.Unmarshal(data[iNdEx:postmsgIndex]); err != nil { + return err + } + iNdEx = postmsgIndex + if m.StringToMsgMap == nil { + m.StringToMsgMap = make(map[string]*FloatingPoint) + } + m.StringToMsgMap[mapkey] = mapvalue + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipMapsproto2Unsafe(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMapsproto2Unsafe + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *AllMapsOrdered) 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 ErrIntOverflowMapsproto2Unsafe + } + 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: AllMapsOrdered: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: AllMapsOrdered: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field StringToDoubleMap", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMapsproto2Unsafe + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var keykey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + keykey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var stringLenmapkey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLenmapkey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapkey := int(stringLenmapkey) + if intStringLenmapkey < 0 { + return ErrInvalidLengthMapsproto2Unsafe + } + postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey > l { + return io.ErrUnexpectedEOF + } + mapkey := string(data[iNdEx:postStringIndexmapkey]) + iNdEx = postStringIndexmapkey + var valuekey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + valuekey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapvaluetemp uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + iNdEx += 8 + mapvaluetemp = uint64(data[iNdEx-8]) + mapvaluetemp |= uint64(data[iNdEx-7]) << 8 + mapvaluetemp |= uint64(data[iNdEx-6]) << 16 + mapvaluetemp |= uint64(data[iNdEx-5]) << 24 + mapvaluetemp |= uint64(data[iNdEx-4]) << 32 + mapvaluetemp |= uint64(data[iNdEx-3]) << 40 + mapvaluetemp |= uint64(data[iNdEx-2]) << 48 + mapvaluetemp |= uint64(data[iNdEx-1]) << 56 + mapvalue := math.Float64frombits(mapvaluetemp) + if m.StringToDoubleMap == nil { + m.StringToDoubleMap = make(map[string]float64) + } + m.StringToDoubleMap[mapkey] = mapvalue + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field StringToFloatMap", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMapsproto2Unsafe + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var keykey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + keykey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var stringLenmapkey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLenmapkey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapkey := int(stringLenmapkey) + if intStringLenmapkey < 0 { + return ErrInvalidLengthMapsproto2Unsafe + } + postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey > l { + return io.ErrUnexpectedEOF + } + mapkey := string(data[iNdEx:postStringIndexmapkey]) + iNdEx = postStringIndexmapkey + var valuekey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + valuekey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapvaluetemp uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + iNdEx += 4 + mapvaluetemp = uint32(data[iNdEx-4]) + mapvaluetemp |= uint32(data[iNdEx-3]) << 8 + mapvaluetemp |= uint32(data[iNdEx-2]) << 16 + mapvaluetemp |= uint32(data[iNdEx-1]) << 24 + mapvalue := math.Float32frombits(mapvaluetemp) + if m.StringToFloatMap == nil { + m.StringToFloatMap = make(map[string]float32) + } + m.StringToFloatMap[mapkey] = mapvalue + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Int32Map", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMapsproto2Unsafe + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var keykey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + keykey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapkey int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + mapkey |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var valuekey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + valuekey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapvalue int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + mapvalue |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if m.Int32Map == nil { + m.Int32Map = make(map[int32]int32) + } + m.Int32Map[mapkey] = mapvalue + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Int64Map", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMapsproto2Unsafe + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var keykey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + keykey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapkey int64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + mapkey |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var valuekey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + valuekey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapvalue int64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + mapvalue |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if m.Int64Map == nil { + m.Int64Map = make(map[int64]int64) + } + m.Int64Map[mapkey] = mapvalue + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Uint32Map", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMapsproto2Unsafe + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var keykey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + keykey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapkey uint32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + mapkey |= (uint32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var valuekey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + valuekey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapvalue uint32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + mapvalue |= (uint32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if m.Uint32Map == nil { + m.Uint32Map = make(map[uint32]uint32) + } + m.Uint32Map[mapkey] = mapvalue + iNdEx = postIndex + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Uint64Map", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMapsproto2Unsafe + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var keykey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + keykey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapkey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + mapkey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var valuekey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + valuekey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapvalue uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + mapvalue |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if m.Uint64Map == nil { + m.Uint64Map = make(map[uint64]uint64) + } + m.Uint64Map[mapkey] = mapvalue + iNdEx = postIndex + case 7: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Sint32Map", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMapsproto2Unsafe + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var keykey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + keykey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapkeytemp int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + mapkeytemp |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + mapkeytemp = int32((uint32(mapkeytemp) >> 1) ^ uint32(((mapkeytemp&1)<<31)>>31)) + mapkey := int32(mapkeytemp) + var valuekey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + valuekey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapvaluetemp int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + mapvaluetemp |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + mapvaluetemp = int32((uint32(mapvaluetemp) >> 1) ^ uint32(((mapvaluetemp&1)<<31)>>31)) + mapvalue := int32(mapvaluetemp) + if m.Sint32Map == nil { + m.Sint32Map = make(map[int32]int32) + } + m.Sint32Map[mapkey] = mapvalue + iNdEx = postIndex + case 8: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Sint64Map", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMapsproto2Unsafe + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var keykey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + keykey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapkeytemp uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + mapkeytemp |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + mapkeytemp = (mapkeytemp >> 1) ^ uint64((int64(mapkeytemp&1)<<63)>>63) + mapkey := int64(mapkeytemp) + var valuekey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + valuekey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapvaluetemp uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + mapvaluetemp |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + mapvaluetemp = (mapvaluetemp >> 1) ^ uint64((int64(mapvaluetemp&1)<<63)>>63) + mapvalue := int64(mapvaluetemp) + if m.Sint64Map == nil { + m.Sint64Map = make(map[int64]int64) + } + m.Sint64Map[mapkey] = mapvalue + iNdEx = postIndex + case 9: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Fixed32Map", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMapsproto2Unsafe + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var keykey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + keykey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapkey uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + iNdEx += 4 + mapkey = uint32(data[iNdEx-4]) + mapkey |= uint32(data[iNdEx-3]) << 8 + mapkey |= uint32(data[iNdEx-2]) << 16 + mapkey |= uint32(data[iNdEx-1]) << 24 + var valuekey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + valuekey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapvalue uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + iNdEx += 4 + mapvalue = uint32(data[iNdEx-4]) + mapvalue |= uint32(data[iNdEx-3]) << 8 + mapvalue |= uint32(data[iNdEx-2]) << 16 + mapvalue |= uint32(data[iNdEx-1]) << 24 + if m.Fixed32Map == nil { + m.Fixed32Map = make(map[uint32]uint32) + } + m.Fixed32Map[mapkey] = mapvalue + iNdEx = postIndex + case 10: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Sfixed32Map", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMapsproto2Unsafe + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var keykey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + keykey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapkey int32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + iNdEx += 4 + mapkey = int32(data[iNdEx-4]) + mapkey |= int32(data[iNdEx-3]) << 8 + mapkey |= int32(data[iNdEx-2]) << 16 + mapkey |= int32(data[iNdEx-1]) << 24 + var valuekey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + valuekey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapvalue int32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + iNdEx += 4 + mapvalue = int32(data[iNdEx-4]) + mapvalue |= int32(data[iNdEx-3]) << 8 + mapvalue |= int32(data[iNdEx-2]) << 16 + mapvalue |= int32(data[iNdEx-1]) << 24 + if m.Sfixed32Map == nil { + m.Sfixed32Map = make(map[int32]int32) + } + m.Sfixed32Map[mapkey] = mapvalue + iNdEx = postIndex + case 11: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Fixed64Map", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMapsproto2Unsafe + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var keykey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + keykey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapkey uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + iNdEx += 8 + mapkey = uint64(data[iNdEx-8]) + mapkey |= uint64(data[iNdEx-7]) << 8 + mapkey |= uint64(data[iNdEx-6]) << 16 + mapkey |= uint64(data[iNdEx-5]) << 24 + mapkey |= uint64(data[iNdEx-4]) << 32 + mapkey |= uint64(data[iNdEx-3]) << 40 + mapkey |= uint64(data[iNdEx-2]) << 48 + mapkey |= uint64(data[iNdEx-1]) << 56 + var valuekey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + valuekey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapvalue uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + iNdEx += 8 + mapvalue = uint64(data[iNdEx-8]) + mapvalue |= uint64(data[iNdEx-7]) << 8 + mapvalue |= uint64(data[iNdEx-6]) << 16 + mapvalue |= uint64(data[iNdEx-5]) << 24 + mapvalue |= uint64(data[iNdEx-4]) << 32 + mapvalue |= uint64(data[iNdEx-3]) << 40 + mapvalue |= uint64(data[iNdEx-2]) << 48 + mapvalue |= uint64(data[iNdEx-1]) << 56 + if m.Fixed64Map == nil { + m.Fixed64Map = make(map[uint64]uint64) + } + m.Fixed64Map[mapkey] = mapvalue + iNdEx = postIndex + case 12: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Sfixed64Map", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMapsproto2Unsafe + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var keykey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + keykey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapkey int64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + iNdEx += 8 + mapkey = int64(data[iNdEx-8]) + mapkey |= int64(data[iNdEx-7]) << 8 + mapkey |= int64(data[iNdEx-6]) << 16 + mapkey |= int64(data[iNdEx-5]) << 24 + mapkey |= int64(data[iNdEx-4]) << 32 + mapkey |= int64(data[iNdEx-3]) << 40 + mapkey |= int64(data[iNdEx-2]) << 48 + mapkey |= int64(data[iNdEx-1]) << 56 + var valuekey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + valuekey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapvalue int64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + iNdEx += 8 + mapvalue = int64(data[iNdEx-8]) + mapvalue |= int64(data[iNdEx-7]) << 8 + mapvalue |= int64(data[iNdEx-6]) << 16 + mapvalue |= int64(data[iNdEx-5]) << 24 + mapvalue |= int64(data[iNdEx-4]) << 32 + mapvalue |= int64(data[iNdEx-3]) << 40 + mapvalue |= int64(data[iNdEx-2]) << 48 + mapvalue |= int64(data[iNdEx-1]) << 56 + if m.Sfixed64Map == nil { + m.Sfixed64Map = make(map[int64]int64) + } + m.Sfixed64Map[mapkey] = mapvalue + iNdEx = postIndex + case 13: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field BoolMap", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMapsproto2Unsafe + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var keykey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + keykey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapkeytemp int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + mapkeytemp |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + mapkey := bool(mapkeytemp != 0) + var valuekey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + valuekey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapvaluetemp int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + mapvaluetemp |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + mapvalue := bool(mapvaluetemp != 0) + if m.BoolMap == nil { + m.BoolMap = make(map[bool]bool) + } + m.BoolMap[mapkey] = mapvalue + iNdEx = postIndex + case 14: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field StringMap", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMapsproto2Unsafe + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var keykey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + keykey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var stringLenmapkey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLenmapkey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapkey := int(stringLenmapkey) + if intStringLenmapkey < 0 { + return ErrInvalidLengthMapsproto2Unsafe + } + postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey > l { + return io.ErrUnexpectedEOF + } + mapkey := string(data[iNdEx:postStringIndexmapkey]) + iNdEx = postStringIndexmapkey + var valuekey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + valuekey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var stringLenmapvalue uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLenmapvalue |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapvalue := int(stringLenmapvalue) + if intStringLenmapvalue < 0 { + return ErrInvalidLengthMapsproto2Unsafe + } + postStringIndexmapvalue := iNdEx + intStringLenmapvalue + if postStringIndexmapvalue > l { + return io.ErrUnexpectedEOF + } + mapvalue := string(data[iNdEx:postStringIndexmapvalue]) + iNdEx = postStringIndexmapvalue + if m.StringMap == nil { + m.StringMap = make(map[string]string) + } + m.StringMap[mapkey] = mapvalue + iNdEx = postIndex + case 15: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field StringToBytesMap", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMapsproto2Unsafe + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var keykey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + keykey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var stringLenmapkey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLenmapkey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapkey := int(stringLenmapkey) + if intStringLenmapkey < 0 { + return ErrInvalidLengthMapsproto2Unsafe + } + postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey > l { + return io.ErrUnexpectedEOF + } + mapkey := string(data[iNdEx:postStringIndexmapkey]) + iNdEx = postStringIndexmapkey + var valuekey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + valuekey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapbyteLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + mapbyteLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intMapbyteLen := int(mapbyteLen) + if intMapbyteLen < 0 { + return ErrInvalidLengthMapsproto2Unsafe + } + postbytesIndex := iNdEx + intMapbyteLen + if postbytesIndex > l { + return io.ErrUnexpectedEOF + } + mapvalue := make([]byte, mapbyteLen) + copy(mapvalue, data[iNdEx:postbytesIndex]) + iNdEx = postbytesIndex + if m.StringToBytesMap == nil { + m.StringToBytesMap = make(map[string][]byte) + } + m.StringToBytesMap[mapkey] = mapvalue + iNdEx = postIndex + case 16: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field StringToEnumMap", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMapsproto2Unsafe + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var keykey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + keykey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var stringLenmapkey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLenmapkey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapkey := int(stringLenmapkey) + if intStringLenmapkey < 0 { + return ErrInvalidLengthMapsproto2Unsafe + } + postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey > l { + return io.ErrUnexpectedEOF + } + mapkey := string(data[iNdEx:postStringIndexmapkey]) + iNdEx = postStringIndexmapkey + var valuekey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + valuekey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapvalue MapEnum + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + mapvalue |= (MapEnum(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if m.StringToEnumMap == nil { + m.StringToEnumMap = make(map[string]MapEnum) + } + m.StringToEnumMap[mapkey] = mapvalue + iNdEx = postIndex + case 17: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field StringToMsgMap", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMapsproto2Unsafe + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var keykey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + keykey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var stringLenmapkey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLenmapkey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapkey := int(stringLenmapkey) + if intStringLenmapkey < 0 { + return ErrInvalidLengthMapsproto2Unsafe + } + postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey > l { + return io.ErrUnexpectedEOF + } + mapkey := string(data[iNdEx:postStringIndexmapkey]) + iNdEx = postStringIndexmapkey + var valuekey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + valuekey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapmsglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + mapmsglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if mapmsglen < 0 { + return ErrInvalidLengthMapsproto2Unsafe + } + postmsgIndex := iNdEx + mapmsglen + if mapmsglen < 0 { + return ErrInvalidLengthMapsproto2Unsafe + } + if postmsgIndex > l { + return io.ErrUnexpectedEOF + } + mapvalue := &FloatingPoint{} + if err := mapvalue.Unmarshal(data[iNdEx:postmsgIndex]); err != nil { + return err + } + iNdEx = postmsgIndex + if m.StringToMsgMap == nil { + m.StringToMsgMap = make(map[string]*FloatingPoint) + } + m.StringToMsgMap[mapkey] = mapvalue + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipMapsproto2Unsafe(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMapsproto2Unsafe + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipMapsproto2Unsafe(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, ErrIntOverflowMapsproto2Unsafe + } + 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, ErrIntOverflowMapsproto2Unsafe + } + 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, ErrIntOverflowMapsproto2Unsafe + } + 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, ErrInvalidLengthMapsproto2Unsafe + } + return iNdEx, nil + case 3: + for { + var innerWire uint64 + var start int = iNdEx + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowMapsproto2Unsafe + } + 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 := skipMapsproto2Unsafe(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 ( + ErrInvalidLengthMapsproto2Unsafe = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowMapsproto2Unsafe = fmt.Errorf("proto: integer overflow") +) + +var fileDescriptorMapsproto2 = []byte{ + // 976 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xec, 0x96, 0xcd, 0x4f, 0xe3, 0x46, + 0x18, 0xc6, 0x71, 0xbe, 0x33, 0xf9, 0x72, 0x06, 0x5a, 0x45, 0x91, 0x9a, 0x96, 0xb4, 0x95, 0x42, + 0x68, 0x13, 0x9a, 0x56, 0x55, 0x05, 0x2d, 0x12, 0x81, 0xd0, 0x54, 0x14, 0x8a, 0x48, 0xbf, 0x25, + 0xa4, 0x26, 0xc5, 0x09, 0x51, 0x93, 0x18, 0xc5, 0x76, 0x55, 0x6e, 0xfc, 0x19, 0xbd, 0xf6, 0xd6, + 0x63, 0x8f, 0x3d, 0xee, 0x91, 0xe3, 0x1e, 0x39, 0xec, 0x01, 0xd8, 0x0b, 0x47, 0x8e, 0x1c, 0x77, + 0x3c, 0x63, 0x3b, 0x63, 0xfb, 0xb5, 0x9d, 0xbd, 0xed, 0x21, 0x87, 0xd1, 0x64, 0x86, 0xf7, 0xf9, + 0xcd, 0x63, 0xec, 0x79, 0xf5, 0xa0, 0xb5, 0xdf, 0xe5, 0x71, 0x4f, 0x56, 0xea, 0xda, 0x44, 0xe9, + 0xf6, 0x25, 0x6d, 0x32, 0xee, 0x4e, 0x95, 0xf3, 0xee, 0x48, 0x9a, 0xd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 0xb9, 0x5f, 0xbd, 0xa2, 0xdc, 0xc6, 0x3c, 0x74, 0xff, 0x44, 0xf7, 0x93, + 0x47, 0xa2, 0xab, 0xcf, 0x83, 0x5e, 0x04, 0xbb, 0x45, 0xb0, 0x5b, 0x04, 0xbb, 0x45, 0xb0, 0x7b, + 0x33, 0x82, 0xdd, 0x66, 0xe4, 0xef, 0x7f, 0xde, 0x15, 0xaa, 0xab, 0x28, 0x6e, 0x1c, 0x8d, 0x63, + 0x28, 0x74, 0xb8, 0x23, 0x2e, 0xd1, 0xb9, 0x29, 0x0a, 0x74, 0xde, 0x15, 0x43, 0xcd, 0x6f, 0xaf, + 0xef, 0x4a, 0x4b, 0xcf, 0xc9, 0xb8, 0x21, 0xe3, 0xf6, 0xae, 0x24, 0x3c, 0x90, 0xf1, 0x48, 0xc6, + 0x13, 0x19, 0x57, 0xf7, 0x25, 0xe1, 0x5f, 0x32, 0xfe, 0x23, 0xe3, 0x7f, 0x32, 0x9e, 0x91, 0x71, + 0x7d, 0x4f, 0xea, 0xc9, 0xb8, 0x25, 0xbf, 0x1f, 0xc8, 0xfc, 0x48, 0xe6, 0x27, 0x32, 0x5f, 0xbd, + 0x2c, 0x09, 0xaf, 0x02, 0x00, 0x00, 0xff, 0xff, 0xce, 0x63, 0x16, 0xb2, 0x31, 0x14, 0x00, 0x00, +} diff --git a/vendor/github.com/gogo/protobuf/test/mapsproto2/combos/unsafeunmarshaler/mapsproto2.proto b/vendor/github.com/gogo/protobuf/test/mapsproto2/combos/unsafeunmarshaler/mapsproto2.proto new file mode 100644 index 000000000..193c24f66 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/mapsproto2/combos/unsafeunmarshaler/mapsproto2.proto @@ -0,0 +1,115 @@ +// Copyright (c) 2013, Vastech SA (PTY) LTD. All rights reserved. +// http://github.com/gogo/protobuf/gogoproto +// +// Go support for Protocol Buffers - Google's data interchange format +// +// Copyright 2014 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. + +syntax = "proto2"; + +package proto2.maps; + +import "github.com/gogo/protobuf/gogoproto/gogo.proto"; + +option (gogoproto.goproto_stringer_all) = false; +option (gogoproto.goproto_enum_prefix_all) = false; +option (gogoproto.goproto_getters_all) = false; + +option (gogoproto.equal_all) = true; +option (gogoproto.verbose_equal_all) = true; +option (gogoproto.stringer_all) = true; +option (gogoproto.gostring_all) = true; +option (gogoproto.face_all) = true; +option (gogoproto.description_all) = true; + +option (gogoproto.testgen_all) = true; +option (gogoproto.populate_all) = true; +option (gogoproto.benchgen_all) = true; +option (gogoproto.unmarshaler_all) = false; +option (gogoproto.marshaler_all) = false; +option (gogoproto.sizer_all) = true; + +option (gogoproto.goproto_enum_stringer_all) = false; +option (gogoproto.enum_stringer_all) = true; + +option (gogoproto.unsafe_marshaler_all) = false; +option (gogoproto.unsafe_unmarshaler_all) = true; + +message FloatingPoint { + optional double f = 1; +} + +enum MapEnum { + MA = 0; + MB = 1; + MC = 2; +} + +message AllMaps { + map StringToDoubleMap = 1; + map StringToFloatMap = 2; + map Int32Map = 3; + map Int64Map = 4; + map Uint32Map = 5; + map Uint64Map = 6; + map Sint32Map = 7; + map Sint64Map = 8; + map Fixed32Map = 9; + map Sfixed32Map = 10; + map Fixed64Map = 11; + map Sfixed64Map = 12; + map BoolMap = 13; + map StringMap = 14; + map StringToBytesMap = 15; + map StringToEnumMap = 16; + map StringToMsgMap = 17; +} + +message AllMapsOrdered { + option (gogoproto.stable_marshaler) = true; + + map StringToDoubleMap = 1; + map StringToFloatMap = 2; + map Int32Map = 3; + map Int64Map = 4; + map Uint32Map = 5; + map Uint64Map = 6; + map Sint32Map = 7; + map Sint64Map = 8; + map Fixed32Map = 9; + map Sfixed32Map = 10; + map Fixed64Map = 11; + map Sfixed64Map = 12; + map BoolMap = 13; + map StringMap = 14; + map StringToBytesMap = 15; + map StringToEnumMap = 16; + map StringToMsgMap = 17; +} diff --git a/vendor/github.com/gogo/protobuf/test/mapsproto2/combos/unsafeunmarshaler/mapsproto2pb_test.go b/vendor/github.com/gogo/protobuf/test/mapsproto2/combos/unsafeunmarshaler/mapsproto2pb_test.go new file mode 100644 index 000000000..6d8570df0 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/mapsproto2/combos/unsafeunmarshaler/mapsproto2pb_test.go @@ -0,0 +1,668 @@ +// Code generated by protoc-gen-gogo. +// source: combos/unsafeunmarshaler/mapsproto2.proto +// DO NOT EDIT! + +/* +Package proto2_maps is a generated protocol buffer package. + +It is generated from these files: + combos/unsafeunmarshaler/mapsproto2.proto + +It has these top-level messages: + FloatingPoint + AllMaps + AllMapsOrdered +*/ +package proto2_maps + +import testing "testing" +import math_rand "math/rand" +import time "time" +import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" +import github_com_gogo_protobuf_jsonpb "github.com/gogo/protobuf/jsonpb" +import fmt "fmt" +import go_parser "go/parser" +import proto "github.com/gogo/protobuf/proto" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +func TestFloatingPointProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedFloatingPoint(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &FloatingPoint{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkFloatingPointProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*FloatingPoint, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedFloatingPoint(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkFloatingPointProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedFloatingPoint(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &FloatingPoint{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestAllMapsProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAllMaps(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &AllMaps{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkAllMapsProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*AllMaps, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedAllMaps(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkAllMapsProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedAllMaps(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &AllMaps{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestAllMapsOrderedProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAllMapsOrdered(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &AllMapsOrdered{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkAllMapsOrderedProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*AllMapsOrdered, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedAllMapsOrdered(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkAllMapsOrderedProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedAllMapsOrdered(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &AllMapsOrdered{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestFloatingPointJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedFloatingPoint(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &FloatingPoint{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestAllMapsJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAllMaps(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &AllMaps{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestAllMapsOrderedJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAllMapsOrdered(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &AllMapsOrdered{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestFloatingPointProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedFloatingPoint(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &FloatingPoint{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestFloatingPointProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedFloatingPoint(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &FloatingPoint{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestAllMapsProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAllMaps(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &AllMaps{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestAllMapsProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAllMaps(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &AllMaps{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestAllMapsOrderedProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAllMapsOrdered(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &AllMapsOrdered{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestAllMapsOrderedProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAllMapsOrdered(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &AllMapsOrdered{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestMapsproto2Description(t *testing.T) { + Mapsproto2Description() +} +func TestFloatingPointVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedFloatingPoint(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &FloatingPoint{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestAllMapsVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAllMaps(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &AllMaps{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestAllMapsOrderedVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAllMapsOrdered(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &AllMapsOrdered{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestFloatingPointFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedFloatingPoint(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestAllMapsFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAllMaps(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestAllMapsOrderedFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAllMapsOrdered(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestFloatingPointGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedFloatingPoint(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestAllMapsGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAllMaps(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestAllMapsOrderedGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAllMapsOrdered(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestFloatingPointSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedFloatingPoint(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkFloatingPointSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*FloatingPoint, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedFloatingPoint(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestAllMapsSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAllMaps(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkAllMapsSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*AllMaps, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedAllMaps(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestAllMapsOrderedSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAllMapsOrdered(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkAllMapsOrderedSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*AllMapsOrdered, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedAllMapsOrdered(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestFloatingPointStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedFloatingPoint(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestAllMapsStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAllMaps(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestAllMapsOrderedStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAllMapsOrdered(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} + +//These tests are generated by github.com/gogo/protobuf/plugin/testgen diff --git a/vendor/github.com/gogo/protobuf/test/mapsproto2/doc.go b/vendor/github.com/gogo/protobuf/test/mapsproto2/doc.go new file mode 100644 index 000000000..4276bac39 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/mapsproto2/doc.go @@ -0,0 +1 @@ +package mapsproto2 diff --git a/vendor/github.com/gogo/protobuf/test/mapsproto2/header.proto b/vendor/github.com/gogo/protobuf/test/mapsproto2/header.proto new file mode 100644 index 000000000..dbdc990e0 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/mapsproto2/header.proto @@ -0,0 +1,67 @@ +// Copyright (c) 2013, Vastech SA (PTY) LTD. All rights reserved. +// http://github.com/gogo/protobuf/gogoproto +// +// Go support for Protocol Buffers - Google's data interchange format +// +// Copyright 2014 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. + +syntax = "proto2"; + +package proto2.maps; + +import "github.com/gogo/protobuf/gogoproto/gogo.proto"; + +option (gogoproto.goproto_stringer_all) = false; +option (gogoproto.goproto_enum_prefix_all) = false; +option (gogoproto.goproto_getters_all) = false; + +option (gogoproto.equal_all) = true; +option (gogoproto.verbose_equal_all) = true; +option (gogoproto.stringer_all) = true; +option (gogoproto.gostring_all) = true; +option (gogoproto.face_all) = true; +option (gogoproto.description_all) = true; + +option (gogoproto.testgen_all) = true; +option (gogoproto.populate_all) = true; +option (gogoproto.benchgen_all) = true; +option (gogoproto.unmarshaler_all) = false; +option (gogoproto.marshaler_all) = false; +option (gogoproto.sizer_all) = true; + +option (gogoproto.goproto_enum_stringer_all) = false; +option (gogoproto.enum_stringer_all) = true; + +option (gogoproto.unsafe_marshaler_all) = false; +option (gogoproto.unsafe_unmarshaler_all) = false; + +message FloatingPoint { + optional double f = 1; +} diff --git a/vendor/github.com/gogo/protobuf/test/mapsproto2/mapsproto2.proto b/vendor/github.com/gogo/protobuf/test/mapsproto2/mapsproto2.proto new file mode 100644 index 000000000..4f940946a --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/mapsproto2/mapsproto2.proto @@ -0,0 +1,115 @@ +// Copyright (c) 2013, Vastech SA (PTY) LTD. All rights reserved. +// http://github.com/gogo/protobuf/gogoproto +// +// Go support for Protocol Buffers - Google's data interchange format +// +// Copyright 2014 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. + +syntax = "proto2"; + +package proto2.maps; + +import "github.com/gogo/protobuf/gogoproto/gogo.proto"; + +option (gogoproto.goproto_stringer_all) = false; +option (gogoproto.goproto_enum_prefix_all) = false; +option (gogoproto.goproto_getters_all) = false; + +option (gogoproto.equal_all) = true; +option (gogoproto.verbose_equal_all) = true; +option (gogoproto.stringer_all) = true; +option (gogoproto.gostring_all) = true; +option (gogoproto.face_all) = true; +option (gogoproto.description_all) = true; + +option (gogoproto.testgen_all) = true; +option (gogoproto.populate_all) = true; +option (gogoproto.benchgen_all) = true; +option (gogoproto.unmarshaler_all) = false; +option (gogoproto.marshaler_all) = false; +option (gogoproto.sizer_all) = true; + +option (gogoproto.goproto_enum_stringer_all) = false; +option (gogoproto.enum_stringer_all) = true; + +option (gogoproto.unsafe_marshaler_all) = false; +option (gogoproto.unsafe_unmarshaler_all) = false; + +message FloatingPoint { + optional double f = 1; +} + +enum MapEnum { + MA = 0; + MB = 1; + MC = 2; +} + +message AllMaps { + map StringToDoubleMap = 1; + map StringToFloatMap = 2; + map Int32Map = 3; + map Int64Map = 4; + map Uint32Map = 5; + map Uint64Map = 6; + map Sint32Map = 7; + map Sint64Map = 8; + map Fixed32Map = 9; + map Sfixed32Map = 10; + map Fixed64Map = 11; + map Sfixed64Map = 12; + map BoolMap = 13; + map StringMap = 14; + map StringToBytesMap = 15; + map StringToEnumMap = 16; + map StringToMsgMap = 17; +} + +message AllMapsOrdered { + option (gogoproto.stable_marshaler) = true; + + map StringToDoubleMap = 1; + map StringToFloatMap = 2; + map Int32Map = 3; + map Int64Map = 4; + map Uint32Map = 5; + map Uint64Map = 6; + map Sint32Map = 7; + map Sint64Map = 8; + map Fixed32Map = 9; + map Sfixed32Map = 10; + map Fixed64Map = 11; + map Sfixed64Map = 12; + map BoolMap = 13; + map StringMap = 14; + map StringToBytesMap = 15; + map StringToEnumMap = 16; + map StringToMsgMap = 17; +} diff --git a/vendor/github.com/gogo/protobuf/test/mixbench/marshal.txt b/vendor/github.com/gogo/protobuf/test/mixbench/marshal.txt new file mode 100644 index 000000000..b35291ce9 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/mixbench/marshal.txt @@ -0,0 +1,49 @@ +PASS +BenchmarkNidOptNativeProtoMarshal-4 1000000 1912 ns/op 194.48 MB/s +BenchmarkNinOptNativeProtoMarshal-4 1000000 2207 ns/op 154.04 MB/s +BenchmarkNidRepNativeProtoMarshal-4 50000 36321 ns/op 195.12 MB/s +BenchmarkNinRepNativeProtoMarshal-4 50000 36979 ns/op 191.65 MB/s +BenchmarkNidRepPackedNativeProtoMarshal-4 50000 29607 ns/op 115.41 MB/s +BenchmarkNinRepPackedNativeProtoMarshal-4 50000 29781 ns/op 114.73 MB/s +BenchmarkNidOptStructProtoMarshal-4 500000 6986 ns/op 201.40 MB/s +BenchmarkNinOptStructProtoMarshal-4 500000 7044 ns/op 180.14 MB/s +BenchmarkNidRepStructProtoMarshal-4 50000 40141 ns/op 219.87 MB/s +BenchmarkNinRepStructProtoMarshal-4 50000 40930 ns/op 215.63 MB/s +BenchmarkNidEmbeddedStructProtoMarshal-4 500000 4595 ns/op 163.62 MB/s +BenchmarkNinEmbeddedStructProtoMarshal-4 500000 4502 ns/op 158.37 MB/s +BenchmarkNidNestedStructProtoMarshal-4 10000 171850 ns/op 215.28 MB/s +BenchmarkNinNestedStructProtoMarshal-4 10000 150174 ns/op 246.19 MB/s +BenchmarkNidOptCustomProtoMarshal-4 1000000 1867 ns/op 38.02 MB/s +BenchmarkNinOptCustomProtoMarshal-4 1000000 1799 ns/op 37.24 MB/s +BenchmarkNidRepCustomProtoMarshal-4 500000 4120 ns/op 43.93 MB/s +BenchmarkNinRepCustomProtoMarshal-4 500000 4059 ns/op 44.58 MB/s +BenchmarkNinOptNativeUnionProtoMarshal-4 1000000 1316 ns/op 23.54 MB/s +BenchmarkNinOptStructUnionProtoMarshal-4 1000000 1945 ns/op 57.06 MB/s +BenchmarkNinEmbeddedStructUnionProtoMarshal-4 1000000 2861 ns/op 84.22 MB/s +BenchmarkNinNestedStructUnionProtoMarshal-4 1000000 2490 ns/op 52.60 MB/s +BenchmarkTreeProtoMarshal-4 1000000 2293 ns/op 109.89 MB/s +BenchmarkOrBranchProtoMarshal-4 500000 4401 ns/op 124.74 MB/s +BenchmarkAndBranchProtoMarshal-4 500000 4394 ns/op 124.93 MB/s +BenchmarkLeafProtoMarshal-4 1000000 1696 ns/op 142.68 MB/s +BenchmarkDeepTreeProtoMarshal-4 500000 3740 ns/op 79.40 MB/s +BenchmarkADeepBranchProtoMarshal-4 500000 4677 ns/op 71.41 MB/s +BenchmarkAndDeepBranchProtoMarshal-4 500000 6597 ns/op 96.25 MB/s +BenchmarkDeepLeafProtoMarshal-4 500000 3179 ns/op 91.21 MB/s +BenchmarkNilProtoMarshal-4 1000000 1326 ns/op 26.39 MB/s +BenchmarkNidOptEnumProtoMarshal-4 1000000 1360 ns/op 27.20 MB/s +BenchmarkNinOptEnumProtoMarshal-4 1000000 1360 ns/op 26.46 MB/s +BenchmarkNidRepEnumProtoMarshal-4 1000000 1314 ns/op 32.72 MB/s +BenchmarkNinRepEnumProtoMarshal-4 1000000 1311 ns/op 32.78 MB/s +BenchmarkNinOptEnumDefaultProtoMarshal-4 1000000 1349 ns/op 26.67 MB/s +BenchmarkAnotherNinOptEnumProtoMarshal-4 1000000 1369 ns/op 26.29 MB/s +BenchmarkAnotherNinOptEnumDefaultProtoMarshal-4 1000000 1341 ns/op 26.84 MB/s +BenchmarkTimerProtoMarshal-4 1000000 1604 ns/op 65.45 MB/s +BenchmarkMyExtendableProtoMarshal-4 1000000 1545 ns/op 51.75 MB/s +BenchmarkOtherExtenableProtoMarshal-4 1000000 2704 ns/op 58.04 MB/s +BenchmarkNestedDefinitionProtoMarshal-4 500000 4177 ns/op 108.92 MB/s +BenchmarkNestedDefinition_NestedMessageProtoMarshal-4 1000000 2473 ns/op 95.43 MB/s +BenchmarkNestedDefinition_NestedMessage_NestedNestedMsgProtoMarshal-4 1000000 1616 ns/op 131.14 MB/s +BenchmarkNestedScopeProtoMarshal-4 500000 4058 ns/op 110.14 MB/s +BenchmarkNinOptNativeDefaultProtoMarshal-4 500000 2863 ns/op 118.72 MB/s +BenchmarkCustomContainerProtoMarshal-4 1000000 2289 ns/op 47.17 MB/s +ok github.com/gogo/protobuf/test/mixbench/testdata 152.674s diff --git a/vendor/github.com/gogo/protobuf/test/mixbench/marshaler.txt b/vendor/github.com/gogo/protobuf/test/mixbench/marshaler.txt new file mode 100644 index 000000000..08a35975d --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/mixbench/marshaler.txt @@ -0,0 +1,49 @@ +PASS +BenchmarkNidOptNativeProtoMarshal-4 5000000 558 ns/op 665.90 MB/s +BenchmarkNinOptNativeProtoMarshal-4 5000000 632 ns/op 537.89 MB/s +BenchmarkNidRepNativeProtoMarshal-4 200000 9070 ns/op 781.29 MB/s +BenchmarkNinRepNativeProtoMarshal-4 200000 8943 ns/op 792.42 MB/s +BenchmarkNidRepPackedNativeProtoMarshal-4 200000 8142 ns/op 419.65 MB/s +BenchmarkNinRepPackedNativeProtoMarshal-4 200000 8114 ns/op 421.11 MB/s +BenchmarkNidOptStructProtoMarshal-4 1000000 2018 ns/op 697.03 MB/s +BenchmarkNinOptStructProtoMarshal-4 1000000 1919 ns/op 661.19 MB/s +BenchmarkNidRepStructProtoMarshal-4 100000 11442 ns/op 771.31 MB/s +BenchmarkNinRepStructProtoMarshal-4 200000 10742 ns/op 821.60 MB/s +BenchmarkNidEmbeddedStructProtoMarshal-4 1000000 1203 ns/op 624.73 MB/s +BenchmarkNinEmbeddedStructProtoMarshal-4 1000000 1135 ns/op 627.68 MB/s +BenchmarkNidNestedStructProtoMarshal-4 50000 56182 ns/op 658.50 MB/s +BenchmarkNinNestedStructProtoMarshal-4 50000 49802 ns/op 742.37 MB/s +BenchmarkNidOptCustomProtoMarshal-4 5000000 303 ns/op 233.89 MB/s +BenchmarkNinOptCustomProtoMarshal-4 10000000 280 ns/op 238.94 MB/s +BenchmarkNidRepCustomProtoMarshal-4 5000000 604 ns/op 299.21 MB/s +BenchmarkNinRepCustomProtoMarshal-4 5000000 599 ns/op 301.77 MB/s +BenchmarkNinOptNativeUnionProtoMarshal-4 10000000 196 ns/op 158.04 MB/s +BenchmarkNinOptStructUnionProtoMarshal-4 5000000 384 ns/op 288.81 MB/s +BenchmarkNinEmbeddedStructUnionProtoMarshal-4 5000000 662 ns/op 363.93 MB/s +BenchmarkNinNestedStructUnionProtoMarshal-4 5000000 502 ns/op 260.48 MB/s +BenchmarkTreeProtoMarshal-4 5000000 558 ns/op 451.53 MB/s +BenchmarkOrBranchProtoMarshal-4 2000000 992 ns/op 553.08 MB/s +BenchmarkAndBranchProtoMarshal-4 2000000 998 ns/op 550.04 MB/s +BenchmarkLeafProtoMarshal-4 5000000 523 ns/op 462.20 MB/s +BenchmarkDeepTreeProtoMarshal-4 5000000 691 ns/op 429.41 MB/s +BenchmarkADeepBranchProtoMarshal-4 2000000 787 ns/op 424.31 MB/s +BenchmarkAndDeepBranchProtoMarshal-4 1000000 1329 ns/op 477.67 MB/s +BenchmarkDeepLeafProtoMarshal-4 5000000 639 ns/op 453.35 MB/s +BenchmarkNilProtoMarshal-4 10000000 189 ns/op 184.92 MB/s +BenchmarkNidOptEnumProtoMarshal-4 10000000 216 ns/op 170.86 MB/s +BenchmarkNinOptEnumProtoMarshal-4 10000000 209 ns/op 171.60 MB/s +BenchmarkNidRepEnumProtoMarshal-4 10000000 237 ns/op 180.80 MB/s +BenchmarkNinRepEnumProtoMarshal-4 10000000 235 ns/op 182.93 MB/s +BenchmarkNinOptEnumDefaultProtoMarshal-4 10000000 209 ns/op 171.51 MB/s +BenchmarkAnotherNinOptEnumProtoMarshal-4 10000000 211 ns/op 170.44 MB/s +BenchmarkAnotherNinOptEnumDefaultProtoMarshal-4 10000000 214 ns/op 167.95 MB/s +BenchmarkTimerProtoMarshal-4 5000000 344 ns/op 305.21 MB/s +BenchmarkMyExtendableProtoMarshal-4 5000000 695 ns/op 115.09 MB/s +BenchmarkOtherExtenableProtoMarshal-4 1000000 1295 ns/op 121.15 MB/s +BenchmarkNestedDefinitionProtoMarshal-4 2000000 906 ns/op 501.69 MB/s +BenchmarkNestedDefinition_NestedMessageProtoMarshal-4 5000000 537 ns/op 438.85 MB/s +BenchmarkNestedDefinition_NestedMessage_NestedNestedMsgProtoMarshal-4 5000000 479 ns/op 442.52 MB/s +BenchmarkNestedScopeProtoMarshal-4 2000000 862 ns/op 518.19 MB/s +BenchmarkNinOptNativeDefaultProtoMarshal-4 2000000 758 ns/op 448.10 MB/s +BenchmarkCustomContainerProtoMarshal-4 5000000 390 ns/op 276.58 MB/s +ok github.com/gogo/protobuf/test/mixbench/testdata 190.796s diff --git a/vendor/github.com/gogo/protobuf/test/mixbench/mixbench.go b/vendor/github.com/gogo/protobuf/test/mixbench/mixbench.go new file mode 100644 index 000000000..b00c76b7d --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/mixbench/mixbench.go @@ -0,0 +1,136 @@ +// Copyright (c) 2013, Vastech SA (PTY) LTD. All rights reserved. +// http://github.com/gogo/protobuf/gogoproto +// +// 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 main + +import ( + "fmt" + "io/ioutil" + "os" + "os/exec" + "strings" +) + +type MixMatch struct { + Old []string + New []string +} + +func (this *MixMatch) Regenerate() { + fmt.Printf("mixbench\n") + uuidData, err := ioutil.ReadFile("../uuid.go") + if err != nil { + panic(err) + } + if err = ioutil.WriteFile("./testdata/uuid.go", uuidData, 0666); err != nil { + panic(err) + } + data, err := ioutil.ReadFile("../thetest.proto") + if err != nil { + panic(err) + } + content := string(data) + for i, old := range this.Old { + content = strings.Replace(content, old, this.New[i], -1) + } + if err = ioutil.WriteFile("./testdata/thetest.proto", []byte(content), 0666); err != nil { + panic(err) + } + var regenerate = exec.Command("protoc", "--gogo_out=.", "-I=../../:../../protobuf/:../../../../../:.", "./testdata/thetest.proto") + fmt.Printf("regenerating\n") + out, err := regenerate.CombinedOutput() + fmt.Printf("regenerate output: %v\n", string(out)) + if err != nil { + panic(err) + } +} + +func (this *MixMatch) Bench(rgx string, outFileName string) { + if err := os.MkdirAll("./testdata", 0777); err != nil { + panic(err) + } + this.Regenerate() + var test = exec.Command("go", "test", "-test.timeout=20m", "-test.v", "-test.run=XXX", "-test.bench="+rgx, "./testdata/") + fmt.Printf("benching\n") + out, err := test.CombinedOutput() + fmt.Printf("bench output: %v\n", string(out)) + if err != nil { + panic(err) + } + if err := ioutil.WriteFile(outFileName, out, 0666); err != nil { + panic(err) + } + if err := os.RemoveAll("./testdata"); err != nil { + panic(err) + } +} + +func NewMixMatch(marshaler, unmarshaler, unsafe_marshaler, unsafe_unmarshaler bool) *MixMatch { + mm := &MixMatch{} + if marshaler { + mm.Old = append(mm.Old, "option (gogoproto.marshaler_all) = false;") + mm.New = append(mm.New, "option (gogoproto.marshaler_all) = true;") + } else { + mm.Old = append(mm.Old, "option (gogoproto.marshaler_all) = true;") + mm.New = append(mm.New, "option (gogoproto.marshaler_all) = false;") + } + if unmarshaler { + mm.Old = append(mm.Old, "option (gogoproto.unmarshaler_all) = false;") + mm.New = append(mm.New, "option (gogoproto.unmarshaler_all) = true;") + } else { + mm.Old = append(mm.Old, "option (gogoproto.unmarshaler_all) = true;") + mm.New = append(mm.New, "option (gogoproto.unmarshaler_all) = false;") + } + if unsafe_marshaler { + mm.Old = append(mm.Old, "option (gogoproto.unsafe_marshaler_all) = false;") + mm.New = append(mm.New, "option (gogoproto.unsafe_marshaler_all) = true;") + } else { + mm.Old = append(mm.Old, "option (gogoproto.unsafe_marshaler_all) = true;") + mm.New = append(mm.New, "option (gogoproto.unsafe_marshaler_all) = false;") + } + if unsafe_unmarshaler { + mm.Old = append(mm.Old, "option (gogoproto.unsafe_unmarshaler_all) = false;") + mm.New = append(mm.New, "option (gogoproto.unsafe_unmarshaler_all) = true;") + } else { + mm.Old = append(mm.Old, "option (gogoproto.unsafe_unmarshaler_all) = true;") + mm.New = append(mm.New, "option (gogoproto.unsafe_unmarshaler_all) = false;") + } + return mm +} + +func main() { + NewMixMatch(true, true, false, false).Bench("ProtoMarshal", "marshaler.txt") + NewMixMatch(false, false, false, false).Bench("ProtoMarshal", "marshal.txt") + NewMixMatch(false, false, true, true).Bench("ProtoMarshal", "unsafe_marshaler.txt") + NewMixMatch(true, true, false, false).Bench("ProtoUnmarshal", "unmarshaler.txt") + NewMixMatch(false, false, false, false).Bench("ProtoUnmarshal", "unmarshal.txt") + NewMixMatch(false, false, true, true).Bench("ProtoUnmarshal", "unsafe_unmarshaler.txt") + fmt.Println("Running benchcmp will show the performance difference between using reflect and generated code for marshalling and unmarshalling of protocol buffers") + fmt.Println("$GOROOT/misc/benchcmp marshal.txt marshaler.txt") + fmt.Println("$GOROOT/misc/benchcmp unmarshal.txt unmarshaler.txt") + fmt.Println("$GOROOT/misc/benchcmp marshal.txt unsafe_marshaler.txt") + fmt.Println("$GOROOT/misc/benchcmp unmarshal.txt unsafe_unmarshaler.txt") +} diff --git a/vendor/github.com/gogo/protobuf/test/mixbench/unmarshal.txt b/vendor/github.com/gogo/protobuf/test/mixbench/unmarshal.txt new file mode 100644 index 000000000..2b958fd93 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/mixbench/unmarshal.txt @@ -0,0 +1,49 @@ +PASS +BenchmarkNidOptNativeProtoUnmarshal-4 1000000 2006 ns/op 185.44 MB/s +BenchmarkNinOptNativeProtoUnmarshal-4 1000000 1960 ns/op 173.41 MB/s +BenchmarkNidRepNativeProtoUnmarshal-4 50000 36241 ns/op 195.55 MB/s +BenchmarkNinRepNativeProtoUnmarshal-4 50000 35648 ns/op 198.80 MB/s +BenchmarkNidRepPackedNativeProtoUnmarshal-4 100000 18641 ns/op 183.30 MB/s +BenchmarkNinRepPackedNativeProtoUnmarshal-4 100000 18398 ns/op 185.72 MB/s +BenchmarkNidOptStructProtoUnmarshal-4 500000 5938 ns/op 236.92 MB/s +BenchmarkNinOptStructProtoUnmarshal-4 500000 5871 ns/op 216.14 MB/s +BenchmarkNidRepStructProtoUnmarshal-4 50000 46237 ns/op 190.88 MB/s +BenchmarkNinRepStructProtoUnmarshal-4 50000 39915 ns/op 221.12 MB/s +BenchmarkNidEmbeddedStructProtoUnmarshal-4 500000 3946 ns/op 190.56 MB/s +BenchmarkNinEmbeddedStructProtoUnmarshal-4 500000 3997 ns/op 178.35 MB/s +BenchmarkNidNestedStructProtoUnmarshal-4 10000 207132 ns/op 178.61 MB/s +BenchmarkNinNestedStructProtoUnmarshal-4 10000 170116 ns/op 217.33 MB/s +BenchmarkNidOptCustomProtoUnmarshal-4 1000000 2321 ns/op 30.58 MB/s +BenchmarkNinOptCustomProtoUnmarshal-4 1000000 1947 ns/op 34.40 MB/s +BenchmarkNidRepCustomProtoUnmarshal-4 200000 7884 ns/op 22.96 MB/s +BenchmarkNinRepCustomProtoUnmarshal-4 200000 7926 ns/op 22.83 MB/s +BenchmarkNinOptNativeUnionProtoUnmarshal-4 1000000 1242 ns/op 24.94 MB/s +BenchmarkNinOptStructUnionProtoUnmarshal-4 1000000 1550 ns/op 71.58 MB/s +BenchmarkNinEmbeddedStructUnionProtoUnmarshal-4 1000000 2209 ns/op 109.07 MB/s +BenchmarkNinNestedStructUnionProtoUnmarshal-4 1000000 1954 ns/op 67.02 MB/s +BenchmarkTreeProtoUnmarshal-4 1000000 1785 ns/op 141.12 MB/s +BenchmarkOrBranchProtoUnmarshal-4 1000000 2769 ns/op 198.23 MB/s +BenchmarkAndBranchProtoUnmarshal-4 500000 2680 ns/op 204.84 MB/s +BenchmarkLeafProtoUnmarshal-4 1000000 1407 ns/op 171.92 MB/s +BenchmarkDeepTreeProtoUnmarshal-4 1000000 2387 ns/op 124.40 MB/s +BenchmarkADeepBranchProtoUnmarshal-4 1000000 2621 ns/op 127.39 MB/s +BenchmarkAndDeepBranchProtoUnmarshal-4 500000 3853 ns/op 164.79 MB/s +BenchmarkDeepLeafProtoUnmarshal-4 1000000 2027 ns/op 143.02 MB/s +BenchmarkNilProtoUnmarshal-4 1000000 1472 ns/op 23.78 MB/s +BenchmarkNidOptEnumProtoUnmarshal-4 1000000 1597 ns/op 23.16 MB/s +BenchmarkNinOptEnumProtoUnmarshal-4 1000000 1557 ns/op 23.12 MB/s +BenchmarkNidRepEnumProtoUnmarshal-4 1000000 1746 ns/op 24.62 MB/s +BenchmarkNinRepEnumProtoUnmarshal-4 1000000 1779 ns/op 24.16 MB/s +BenchmarkNinOptEnumDefaultProtoUnmarshal-4 1000000 1607 ns/op 22.39 MB/s +BenchmarkAnotherNinOptEnumProtoUnmarshal-4 1000000 1545 ns/op 23.29 MB/s +BenchmarkAnotherNinOptEnumDefaultProtoUnmarshal-4 1000000 1578 ns/op 22.81 MB/s +BenchmarkTimerProtoUnmarshal-4 1000000 1572 ns/op 66.79 MB/s +BenchmarkMyExtendableProtoUnmarshal-4 1000000 2610 ns/op 30.64 MB/s +BenchmarkOtherExtenableProtoUnmarshal-4 500000 3792 ns/op 41.40 MB/s +BenchmarkNestedDefinitionProtoUnmarshal-4 500000 2987 ns/op 152.29 MB/s +BenchmarkNestedDefinition_NestedMessageProtoUnmarshal-4 1000000 1898 ns/op 124.30 MB/s +BenchmarkNestedDefinition_NestedMessage_NestedNestedMsgProtoUnmarshal-4 1000000 1326 ns/op 159.87 MB/s +BenchmarkNestedScopeProtoUnmarshal-4 1000000 2956 ns/op 151.20 MB/s +BenchmarkNinOptNativeDefaultProtoUnmarshal-4 1000000 2244 ns/op 151.45 MB/s +BenchmarkCustomContainerProtoUnmarshal-4 1000000 2652 ns/op 40.71 MB/s +ok github.com/gogo/protobuf/test/mixbench/testdata 167.715s diff --git a/vendor/github.com/gogo/protobuf/test/mixbench/unmarshaler.txt b/vendor/github.com/gogo/protobuf/test/mixbench/unmarshaler.txt new file mode 100644 index 000000000..9c78ef06a --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/mixbench/unmarshaler.txt @@ -0,0 +1,49 @@ +PASS +BenchmarkNidOptNativeProtoUnmarshal-4 2000000 792 ns/op 469.35 MB/s +BenchmarkNinOptNativeProtoUnmarshal-4 1000000 1167 ns/op 291.16 MB/s +BenchmarkNidRepNativeProtoUnmarshal-4 100000 25302 ns/op 280.09 MB/s +BenchmarkNinRepNativeProtoUnmarshal-4 100000 25069 ns/op 282.70 MB/s +BenchmarkNidRepPackedNativeProtoUnmarshal-4 100000 16569 ns/op 206.22 MB/s +BenchmarkNinRepPackedNativeProtoUnmarshal-4 100000 16323 ns/op 209.33 MB/s +BenchmarkNidOptStructProtoUnmarshal-4 1000000 3107 ns/op 452.75 MB/s +BenchmarkNinOptStructProtoUnmarshal-4 500000 3262 ns/op 388.98 MB/s +BenchmarkNidRepStructProtoUnmarshal-4 100000 26090 ns/op 338.28 MB/s +BenchmarkNinRepStructProtoUnmarshal-4 100000 26086 ns/op 338.34 MB/s +BenchmarkNidEmbeddedStructProtoUnmarshal-4 1000000 1785 ns/op 421.14 MB/s +BenchmarkNinEmbeddedStructProtoUnmarshal-4 1000000 1838 ns/op 387.83 MB/s +BenchmarkNidNestedStructProtoUnmarshal-4 10000 119933 ns/op 308.47 MB/s +BenchmarkNinNestedStructProtoUnmarshal-4 10000 106914 ns/op 345.81 MB/s +BenchmarkNidOptCustomProtoUnmarshal-4 5000000 485 ns/op 146.36 MB/s +BenchmarkNinOptCustomProtoUnmarshal-4 5000000 648 ns/op 103.26 MB/s +BenchmarkNidRepCustomProtoUnmarshal-4 1000000 1743 ns/op 103.83 MB/s +BenchmarkNinRepCustomProtoUnmarshal-4 1000000 1766 ns/op 102.44 MB/s +BenchmarkNinOptNativeUnionProtoUnmarshal-4 10000000 187 ns/op 165.31 MB/s +BenchmarkNinOptStructUnionProtoUnmarshal-4 5000000 519 ns/op 213.49 MB/s +BenchmarkNinEmbeddedStructUnionProtoUnmarshal-4 2000000 971 ns/op 247.99 MB/s +BenchmarkNinNestedStructUnionProtoUnmarshal-4 2000000 801 ns/op 163.54 MB/s +BenchmarkTreeProtoUnmarshal-4 2000000 789 ns/op 319.14 MB/s +BenchmarkOrBranchProtoUnmarshal-4 1000000 1553 ns/op 353.47 MB/s +BenchmarkAndBranchProtoUnmarshal-4 1000000 1552 ns/op 353.60 MB/s +BenchmarkLeafProtoUnmarshal-4 5000000 654 ns/op 369.63 MB/s +BenchmarkDeepTreeProtoUnmarshal-4 1000000 1219 ns/op 243.63 MB/s +BenchmarkADeepBranchProtoUnmarshal-4 1000000 1504 ns/op 222.02 MB/s +BenchmarkAndDeepBranchProtoUnmarshal-4 1000000 2327 ns/op 272.88 MB/s +BenchmarkDeepLeafProtoUnmarshal-4 1000000 1083 ns/op 267.74 MB/s +BenchmarkNilProtoUnmarshal-4 5000000 401 ns/op 87.26 MB/s +BenchmarkNidOptEnumProtoUnmarshal-4 5000000 412 ns/op 89.66 MB/s +BenchmarkNinOptEnumProtoUnmarshal-4 5000000 451 ns/op 79.80 MB/s +BenchmarkNidRepEnumProtoUnmarshal-4 5000000 670 ns/op 64.12 MB/s +BenchmarkNinRepEnumProtoUnmarshal-4 5000000 667 ns/op 64.40 MB/s +BenchmarkNinOptEnumDefaultProtoUnmarshal-4 5000000 450 ns/op 79.88 MB/s +BenchmarkAnotherNinOptEnumProtoUnmarshal-4 5000000 449 ns/op 80.15 MB/s +BenchmarkAnotherNinOptEnumDefaultProtoUnmarshal-4 5000000 448 ns/op 80.24 MB/s +BenchmarkTimerProtoUnmarshal-4 5000000 575 ns/op 182.50 MB/s +BenchmarkMyExtendableProtoUnmarshal-4 1000000 1450 ns/op 55.14 MB/s +BenchmarkOtherExtenableProtoUnmarshal-4 1000000 2567 ns/op 61.15 MB/s +BenchmarkNestedDefinitionProtoUnmarshal-4 1000000 1889 ns/op 240.85 MB/s +BenchmarkNestedDefinition_NestedMessageProtoUnmarshal-4 1000000 1080 ns/op 218.42 MB/s +BenchmarkNestedDefinition_NestedMessage_NestedNestedMsgProtoUnmarshal-4 5000000 693 ns/op 305.86 MB/s +BenchmarkNestedScopeProtoUnmarshal-4 1000000 1843 ns/op 242.49 MB/s +BenchmarkNinOptNativeDefaultProtoUnmarshal-4 1000000 1342 ns/op 253.25 MB/s +BenchmarkCustomContainerProtoUnmarshal-4 2000000 831 ns/op 129.82 MB/s +ok github.com/gogo/protobuf/test/mixbench/testdata 170.829s diff --git a/vendor/github.com/gogo/protobuf/test/mixbench/unsafe_marshaler.txt b/vendor/github.com/gogo/protobuf/test/mixbench/unsafe_marshaler.txt new file mode 100644 index 000000000..8cbf22f4f --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/mixbench/unsafe_marshaler.txt @@ -0,0 +1,49 @@ +PASS +BenchmarkNidOptNativeProtoMarshal-4 5000000 531 ns/op 700.19 MB/s +BenchmarkNinOptNativeProtoMarshal-4 5000000 594 ns/op 572.27 MB/s +BenchmarkNidRepNativeProtoMarshal-4 200000 8087 ns/op 876.29 MB/s +BenchmarkNinRepNativeProtoMarshal-4 500000 8344 ns/op 849.34 MB/s +BenchmarkNidRepPackedNativeProtoMarshal-4 200000 7595 ns/op 449.89 MB/s +BenchmarkNinRepPackedNativeProtoMarshal-4 500000 7342 ns/op 465.38 MB/s +BenchmarkNidOptStructProtoMarshal-4 1000000 1928 ns/op 729.46 MB/s +BenchmarkNinOptStructProtoMarshal-4 1000000 1859 ns/op 682.32 MB/s +BenchmarkNidRepStructProtoMarshal-4 100000 10993 ns/op 802.82 MB/s +BenchmarkNinRepStructProtoMarshal-4 200000 10088 ns/op 874.84 MB/s +BenchmarkNidEmbeddedStructProtoMarshal-4 1000000 1179 ns/op 637.53 MB/s +BenchmarkNinEmbeddedStructProtoMarshal-4 1000000 1077 ns/op 661.58 MB/s +BenchmarkNidNestedStructProtoMarshal-4 50000 53464 ns/op 691.97 MB/s +BenchmarkNinNestedStructProtoMarshal-4 50000 47677 ns/op 775.46 MB/s +BenchmarkNidOptCustomProtoMarshal-4 5000000 303 ns/op 234.13 MB/s +BenchmarkNinOptCustomProtoMarshal-4 10000000 284 ns/op 235.56 MB/s +BenchmarkNidRepCustomProtoMarshal-4 5000000 598 ns/op 302.19 MB/s +BenchmarkNinRepCustomProtoMarshal-4 5000000 593 ns/op 304.87 MB/s +BenchmarkNinOptNativeUnionProtoMarshal-4 10000000 190 ns/op 162.47 MB/s +BenchmarkNinOptStructUnionProtoMarshal-4 5000000 374 ns/op 296.15 MB/s +BenchmarkNinEmbeddedStructUnionProtoMarshal-4 5000000 652 ns/op 369.55 MB/s +BenchmarkNinNestedStructUnionProtoMarshal-4 5000000 474 ns/op 275.97 MB/s +BenchmarkTreeProtoMarshal-4 5000000 567 ns/op 444.16 MB/s +BenchmarkOrBranchProtoMarshal-4 1000000 1007 ns/op 544.72 MB/s +BenchmarkAndBranchProtoMarshal-4 1000000 1061 ns/op 517.27 MB/s +BenchmarkLeafProtoMarshal-4 5000000 511 ns/op 473.41 MB/s +BenchmarkDeepTreeProtoMarshal-4 5000000 716 ns/op 414.59 MB/s +BenchmarkADeepBranchProtoMarshal-4 2000000 811 ns/op 411.60 MB/s +BenchmarkAndDeepBranchProtoMarshal-4 1000000 1324 ns/op 479.34 MB/s +BenchmarkDeepLeafProtoMarshal-4 5000000 636 ns/op 455.66 MB/s +BenchmarkNilProtoMarshal-4 10000000 189 ns/op 184.91 MB/s +BenchmarkNidOptEnumProtoMarshal-4 10000000 211 ns/op 174.55 MB/s +BenchmarkNinOptEnumProtoMarshal-4 10000000 207 ns/op 173.24 MB/s +BenchmarkNidRepEnumProtoMarshal-4 10000000 231 ns/op 185.80 MB/s +BenchmarkNinRepEnumProtoMarshal-4 10000000 230 ns/op 186.79 MB/s +BenchmarkNinOptEnumDefaultProtoMarshal-4 10000000 208 ns/op 172.65 MB/s +BenchmarkAnotherNinOptEnumProtoMarshal-4 10000000 207 ns/op 173.15 MB/s +BenchmarkAnotherNinOptEnumDefaultProtoMarshal-4 10000000 209 ns/op 171.99 MB/s +BenchmarkTimerProtoMarshal-4 5000000 320 ns/op 327.65 MB/s +BenchmarkMyExtendableProtoMarshal-4 5000000 702 ns/op 113.85 MB/s +BenchmarkOtherExtenableProtoMarshal-4 1000000 1329 ns/op 118.07 MB/s +BenchmarkNestedDefinitionProtoMarshal-4 2000000 904 ns/op 502.96 MB/s +BenchmarkNestedDefinition_NestedMessageProtoMarshal-4 5000000 542 ns/op 434.70 MB/s +BenchmarkNestedDefinition_NestedMessage_NestedNestedMsgProtoMarshal-4 5000000 465 ns/op 455.00 MB/s +BenchmarkNestedScopeProtoMarshal-4 2000000 857 ns/op 521.49 MB/s +BenchmarkNinOptNativeDefaultProtoMarshal-4 5000000 734 ns/op 462.95 MB/s +BenchmarkCustomContainerProtoMarshal-4 5000000 378 ns/op 285.67 MB/s +ok github.com/gogo/protobuf/test/mixbench/testdata 192.235s diff --git a/vendor/github.com/gogo/protobuf/test/mixbench/unsafe_unmarshaler.txt b/vendor/github.com/gogo/protobuf/test/mixbench/unsafe_unmarshaler.txt new file mode 100644 index 000000000..9a85e9361 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/mixbench/unsafe_unmarshaler.txt @@ -0,0 +1,49 @@ +PASS +BenchmarkNidOptNativeProtoUnmarshal-4 2000000 760 ns/op 488.86 MB/s +BenchmarkNinOptNativeProtoUnmarshal-4 1000000 1130 ns/op 300.67 MB/s +BenchmarkNidRepNativeProtoUnmarshal-4 100000 23698 ns/op 299.05 MB/s +BenchmarkNinRepNativeProtoUnmarshal-4 100000 23400 ns/op 302.86 MB/s +BenchmarkNidRepPackedNativeProtoUnmarshal-4 100000 15286 ns/op 223.53 MB/s +BenchmarkNinRepPackedNativeProtoUnmarshal-4 100000 15375 ns/op 222.23 MB/s +BenchmarkNidOptStructProtoUnmarshal-4 1000000 3019 ns/op 466.02 MB/s +BenchmarkNinOptStructProtoUnmarshal-4 500000 3169 ns/op 400.35 MB/s +BenchmarkNidRepStructProtoUnmarshal-4 100000 25167 ns/op 350.69 MB/s +BenchmarkNinRepStructProtoUnmarshal-4 100000 25199 ns/op 350.25 MB/s +BenchmarkNidEmbeddedStructProtoUnmarshal-4 1000000 1714 ns/op 438.65 MB/s +BenchmarkNinEmbeddedStructProtoUnmarshal-4 1000000 1793 ns/op 397.49 MB/s +BenchmarkNidNestedStructProtoUnmarshal-4 10000 115531 ns/op 320.22 MB/s +BenchmarkNinNestedStructProtoUnmarshal-4 10000 109260 ns/op 338.39 MB/s +BenchmarkNidOptCustomProtoUnmarshal-4 5000000 487 ns/op 145.63 MB/s +BenchmarkNinOptCustomProtoUnmarshal-4 5000000 644 ns/op 103.94 MB/s +BenchmarkNidRepCustomProtoUnmarshal-4 1000000 1733 ns/op 104.42 MB/s +BenchmarkNinRepCustomProtoUnmarshal-4 1000000 1734 ns/op 104.34 MB/s +BenchmarkNinOptNativeUnionProtoUnmarshal-4 10000000 186 ns/op 166.02 MB/s +BenchmarkNinOptStructUnionProtoUnmarshal-4 5000000 512 ns/op 216.66 MB/s +BenchmarkNinEmbeddedStructUnionProtoUnmarshal-4 2000000 954 ns/op 252.56 MB/s +BenchmarkNinNestedStructUnionProtoUnmarshal-4 2000000 788 ns/op 166.15 MB/s +BenchmarkTreeProtoUnmarshal-4 2000000 790 ns/op 318.98 MB/s +BenchmarkOrBranchProtoUnmarshal-4 1000000 1553 ns/op 353.43 MB/s +BenchmarkAndBranchProtoUnmarshal-4 1000000 1554 ns/op 353.09 MB/s +BenchmarkLeafProtoUnmarshal-4 5000000 642 ns/op 376.78 MB/s +BenchmarkDeepTreeProtoUnmarshal-4 1000000 1236 ns/op 240.13 MB/s +BenchmarkADeepBranchProtoUnmarshal-4 1000000 1493 ns/op 223.62 MB/s +BenchmarkAndDeepBranchProtoUnmarshal-4 1000000 2327 ns/op 272.81 MB/s +BenchmarkDeepLeafProtoUnmarshal-4 1000000 1068 ns/op 271.46 MB/s +BenchmarkNilProtoUnmarshal-4 5000000 396 ns/op 88.30 MB/s +BenchmarkNidOptEnumProtoUnmarshal-4 5000000 410 ns/op 90.10 MB/s +BenchmarkNinOptEnumProtoUnmarshal-4 5000000 448 ns/op 80.25 MB/s +BenchmarkNidRepEnumProtoUnmarshal-4 5000000 672 ns/op 63.91 MB/s +BenchmarkNinRepEnumProtoUnmarshal-4 5000000 667 ns/op 64.38 MB/s +BenchmarkNinOptEnumDefaultProtoUnmarshal-4 5000000 446 ns/op 80.63 MB/s +BenchmarkAnotherNinOptEnumProtoUnmarshal-4 5000000 449 ns/op 80.09 MB/s +BenchmarkAnotherNinOptEnumDefaultProtoUnmarshal-4 5000000 449 ns/op 80.08 MB/s +BenchmarkTimerProtoUnmarshal-4 5000000 554 ns/op 189.24 MB/s +BenchmarkMyExtendableProtoUnmarshal-4 1000000 1445 ns/op 55.36 MB/s +BenchmarkOtherExtenableProtoUnmarshal-4 1000000 2544 ns/op 61.70 MB/s +BenchmarkNestedDefinitionProtoUnmarshal-4 1000000 1847 ns/op 246.34 MB/s +BenchmarkNestedDefinition_NestedMessageProtoUnmarshal-4 1000000 1071 ns/op 220.23 MB/s +BenchmarkNestedDefinition_NestedMessage_NestedNestedMsgProtoUnmarshal-4 5000000 688 ns/op 308.09 MB/s +BenchmarkNestedScopeProtoUnmarshal-4 1000000 1803 ns/op 247.86 MB/s +BenchmarkNinOptNativeDefaultProtoUnmarshal-4 1000000 1330 ns/op 255.61 MB/s +BenchmarkCustomContainerProtoUnmarshal-4 2000000 803 ns/op 134.48 MB/s +ok github.com/gogo/protobuf/test/mixbench/testdata 168.327s diff --git a/vendor/github.com/gogo/protobuf/test/moredefaults/Makefile b/vendor/github.com/gogo/protobuf/test/moredefaults/Makefile new file mode 100644 index 000000000..c7bd30323 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/moredefaults/Makefile @@ -0,0 +1,30 @@ +# Extensions for Protocol Buffers to create more go like structures. +# +# Copyright (c) 2013, Vastech SA (PTY) LTD. 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: + (protoc --proto_path=../../../../../:../../protobuf/:. --gogo_out=. md.proto) diff --git a/vendor/github.com/gogo/protobuf/test/moredefaults/md.pb.go b/vendor/github.com/gogo/protobuf/test/moredefaults/md.pb.go new file mode 100644 index 000000000..1af8180e7 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/moredefaults/md.pb.go @@ -0,0 +1,339 @@ +// Code generated by protoc-gen-gogo. +// source: md.proto +// DO NOT EDIT! + +/* + Package moredefaults is a generated protocol buffer package. + + It is generated from these files: + md.proto + + It has these top-level messages: + MoreDefaultsB + MoreDefaultsA +*/ +package moredefaults + +import proto "github.com/gogo/protobuf/proto" +import fmt "fmt" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" +import test "github.com/gogo/protobuf/test/example" + +import bytes "bytes" + +// 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. +const _ = proto.GoGoProtoPackageIsVersion1 + +type MoreDefaultsB struct { + Field1 *string `protobuf:"bytes,1,opt,name=Field1,json=field1" json:"Field1,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *MoreDefaultsB) Reset() { *m = MoreDefaultsB{} } +func (m *MoreDefaultsB) String() string { return proto.CompactTextString(m) } +func (*MoreDefaultsB) ProtoMessage() {} +func (*MoreDefaultsB) Descriptor() ([]byte, []int) { return fileDescriptorMd, []int{0} } + +func (m *MoreDefaultsB) GetField1() string { + if m != nil && m.Field1 != nil { + return *m.Field1 + } + return "" +} + +type MoreDefaultsA struct { + Field1 *int64 `protobuf:"varint,1,opt,name=Field1,json=field1,def=1234" json:"Field1,omitempty"` + Field2 int64 `protobuf:"varint,2,opt,name=Field2,json=field2" json:"Field2"` + B1 *MoreDefaultsB `protobuf:"bytes,3,opt,name=B1,json=b1" json:"B1,omitempty"` + B2 MoreDefaultsB `protobuf:"bytes,4,opt,name=B2,json=b2" json:"B2"` + A1 *test.A `protobuf:"bytes,5,opt,name=A1,json=a1" json:"A1,omitempty"` + A2 test.A `protobuf:"bytes,6,opt,name=A2,json=a2" json:"A2"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *MoreDefaultsA) Reset() { *m = MoreDefaultsA{} } +func (m *MoreDefaultsA) String() string { return proto.CompactTextString(m) } +func (*MoreDefaultsA) ProtoMessage() {} +func (*MoreDefaultsA) Descriptor() ([]byte, []int) { return fileDescriptorMd, []int{1} } + +const Default_MoreDefaultsA_Field1 int64 = 1234 + +func (m *MoreDefaultsA) GetField1() int64 { + if m != nil && m.Field1 != nil { + return *m.Field1 + } + return Default_MoreDefaultsA_Field1 +} + +func (m *MoreDefaultsA) GetField2() int64 { + if m != nil { + return m.Field2 + } + return 0 +} + +func (m *MoreDefaultsA) GetB1() *MoreDefaultsB { + if m != nil { + return m.B1 + } + return nil +} + +func (m *MoreDefaultsA) GetB2() MoreDefaultsB { + if m != nil { + return m.B2 + } + return MoreDefaultsB{} +} + +func (m *MoreDefaultsA) GetA1() *test.A { + if m != nil { + return m.A1 + } + return nil +} + +func (m *MoreDefaultsA) GetA2() test.A { + if m != nil { + return m.A2 + } + return test.A{} +} + +func init() { + proto.RegisterType((*MoreDefaultsB)(nil), "moredefaults.MoreDefaultsB") + proto.RegisterType((*MoreDefaultsA)(nil), "moredefaults.MoreDefaultsA") +} +func (this *MoreDefaultsB) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*MoreDefaultsB) + if !ok { + that2, ok := that.(MoreDefaultsB) + 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.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return false + } + } else if this.Field1 != nil { + return false + } else if that1.Field1 != nil { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *MoreDefaultsA) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*MoreDefaultsA) + if !ok { + that2, ok := that.(MoreDefaultsA) + 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.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return false + } + } else if this.Field1 != nil { + return false + } else if that1.Field1 != nil { + return false + } + if this.Field2 != that1.Field2 { + return false + } + if !this.B1.Equal(that1.B1) { + return false + } + if !this.B2.Equal(&that1.B2) { + return false + } + if !this.A1.Equal(that1.A1) { + return false + } + if !this.A2.Equal(&that1.A2) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func NewPopulatedMoreDefaultsB(r randyMd, easy bool) *MoreDefaultsB { + this := &MoreDefaultsB{} + if r.Intn(10) != 0 { + v1 := randStringMd(r) + this.Field1 = &v1 + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedMd(r, 2) + } + return this +} + +func NewPopulatedMoreDefaultsA(r randyMd, easy bool) *MoreDefaultsA { + this := &MoreDefaultsA{} + if r.Intn(10) != 0 { + v2 := int64(r.Int63()) + if r.Intn(2) == 0 { + v2 *= -1 + } + this.Field1 = &v2 + } + this.Field2 = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Field2 *= -1 + } + if r.Intn(10) != 0 { + this.B1 = NewPopulatedMoreDefaultsB(r, easy) + } + v3 := NewPopulatedMoreDefaultsB(r, easy) + this.B2 = *v3 + if r.Intn(10) != 0 { + this.A1 = test.NewPopulatedA(r, easy) + } + v4 := test.NewPopulatedA(r, easy) + this.A2 = *v4 + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedMd(r, 7) + } + return this +} + +type randyMd interface { + Float32() float32 + Float64() float64 + Int63() int64 + Int31() int32 + Uint32() uint32 + Intn(n int) int +} + +func randUTF8RuneMd(r randyMd) 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 randStringMd(r randyMd) string { + v5 := r.Intn(100) + tmps := make([]rune, v5) + for i := 0; i < v5; i++ { + tmps[i] = randUTF8RuneMd(r) + } + return string(tmps) +} +func randUnrecognizedMd(r randyMd, 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 = randFieldMd(data, r, fieldNumber, wire) + } + return data +} +func randFieldMd(data []byte, r randyMd, fieldNumber int, wire int) []byte { + key := uint32(fieldNumber)<<3 | uint32(wire) + switch wire { + case 0: + data = encodeVarintPopulateMd(data, uint64(key)) + v6 := r.Int63() + if r.Intn(2) == 0 { + v6 *= -1 + } + data = encodeVarintPopulateMd(data, uint64(v6)) + case 1: + data = encodeVarintPopulateMd(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 = encodeVarintPopulateMd(data, uint64(key)) + ll := r.Intn(100) + data = encodeVarintPopulateMd(data, uint64(ll)) + for j := 0; j < ll; j++ { + data = append(data, byte(r.Intn(256))) + } + default: + data = encodeVarintPopulateMd(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 encodeVarintPopulateMd(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 +} + +var fileDescriptorMd = []byte{ + // 252 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xe2, 0xe2, 0xc8, 0x4d, 0xd1, 0x2b, + 0x28, 0xca, 0x2f, 0xc9, 0x17, 0xe2,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 0x8e, 0x41, 0x4c, + 0x89, 0x86, 0x42, 0xb2, 0x40, 0x09, 0x23, 0x09, 0x36, 0x14, 0x09, 0x98, 0xbe, 0x44, 0x23, 0x27, + 0x81, 0x13, 0x0f, 0xe5, 0x18, 0x7f, 0x00, 0xf1, 0x8a, 0x47, 0x72, 0x8c, 0x3b, 0x80, 0x18, 0x10, + 0x00, 0x00, 0xff, 0xff, 0x0f, 0x4e, 0xe8, 0x88, 0x9d, 0x01, 0x00, 0x00, +} diff --git a/vendor/github.com/gogo/protobuf/test/moredefaults/md.proto b/vendor/github.com/gogo/protobuf/test/moredefaults/md.proto new file mode 100644 index 000000000..55a0d1880 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/moredefaults/md.proto @@ -0,0 +1,51 @@ +// Copyright (c) 2013, Vastech SA (PTY) LTD. All rights reserved. +// http://github.com/gogo/protobuf/gogoproto +// +// 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 moredefaults; + +import "github.com/gogo/protobuf/gogoproto/gogo.proto"; +import "github.com/gogo/protobuf/test/example/example.proto"; + +option (gogoproto.goproto_getters_all) = true; +option (gogoproto.testgen_all) = true; +option (gogoproto.populate_all) = true; +option (gogoproto.equal_all) = true; + +message MoreDefaultsB { + optional string Field1 = 1; +} + +message MoreDefaultsA { + optional int64 Field1 = 1 [default=1234]; + optional int64 Field2 = 2 [(gogoproto.nullable) = false]; + optional MoreDefaultsB B1 = 3; + optional MoreDefaultsB B2 = 4 [(gogoproto.nullable) = false]; + optional test.A A1 = 5; + optional test.A A2 = 6 [(gogoproto.nullable) = false]; +} + diff --git a/vendor/github.com/gogo/protobuf/test/moredefaults/md_test.go b/vendor/github.com/gogo/protobuf/test/moredefaults/md_test.go new file mode 100644 index 000000000..7b7a08ed3 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/moredefaults/md_test.go @@ -0,0 +1,59 @@ +// Copyright (c) 2013, Vastech SA (PTY) LTD. All rights reserved. +// http://github.com/gogo/protobuf/gogoproto +// +// 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 moredefaults + +import ( + "testing" + + test "github.com/gogo/protobuf/test/example" +) + +func TestDefaults(t *testing.T) { + b := MoreDefaultsB{} + aa := test.A{} + a := &MoreDefaultsA{} + b2 := a.GetB2() + a2 := a.GetA2() + if a.GetField1() != 1234 { + t.Fatalf("Field1 wrong") + } + if a.GetField2() != 0 { + t.Fatalf("Field2 wrong") + } + if a.GetB1() != nil { + t.Fatalf("B1 wrong") + } + if b2.GetField1() != b.GetField1() { + t.Fatalf("B2 wrong") + } + if a.GetA1() != nil { + t.Fatalf("A1 wrong") + } + if a2.GetNumber() != aa.GetNumber() { + t.Fatalf("A2 wrong") + } +} diff --git a/vendor/github.com/gogo/protobuf/test/moredefaults/mdpb_test.go b/vendor/github.com/gogo/protobuf/test/moredefaults/mdpb_test.go new file mode 100644 index 000000000..85fe26405 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/moredefaults/mdpb_test.go @@ -0,0 +1,187 @@ +// Code generated by protoc-gen-gogo. +// source: md.proto +// DO NOT EDIT! + +/* +Package moredefaults is a generated protocol buffer package. + +It is generated from these files: + md.proto + +It has these top-level messages: + MoreDefaultsB + MoreDefaultsA +*/ +package moredefaults + +import testing "testing" +import math_rand "math/rand" +import time "time" +import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" +import github_com_gogo_protobuf_jsonpb "github.com/gogo/protobuf/jsonpb" +import proto "github.com/gogo/protobuf/proto" +import fmt "fmt" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" +import _ "github.com/gogo/protobuf/test/example" + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +func TestMoreDefaultsBProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMoreDefaultsB(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &MoreDefaultsB{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestMoreDefaultsAProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMoreDefaultsA(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &MoreDefaultsA{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestMoreDefaultsBJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMoreDefaultsB(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &MoreDefaultsB{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestMoreDefaultsAJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMoreDefaultsA(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &MoreDefaultsA{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestMoreDefaultsBProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMoreDefaultsB(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &MoreDefaultsB{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestMoreDefaultsBProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMoreDefaultsB(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &MoreDefaultsB{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestMoreDefaultsAProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMoreDefaultsA(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &MoreDefaultsA{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestMoreDefaultsAProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMoreDefaultsA(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &MoreDefaultsA{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +//These tests are generated by github.com/gogo/protobuf/plugin/testgen diff --git a/vendor/github.com/gogo/protobuf/test/nopackage/Makefile b/vendor/github.com/gogo/protobuf/test/nopackage/Makefile new file mode 100644 index 000000000..093ec0f16 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/nopackage/Makefile @@ -0,0 +1,30 @@ +# Extensions for Protocol Buffers to create more go like structures. +# +# Copyright (c) 2013, Vastech SA (PTY) LTD. 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: + (protoc-min-version --version="3.0.0" --proto_path=../../../../../:../../protobuf/:. --gogofast_out=. nopackage.proto) diff --git a/vendor/github.com/gogo/protobuf/test/nopackage/nopackage.pb.go b/vendor/github.com/gogo/protobuf/test/nopackage/nopackage.pb.go new file mode 100644 index 000000000..cb24a3f6b --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/nopackage/nopackage.pb.go @@ -0,0 +1,404 @@ +// Code generated by protoc-gen-gogo. +// source: nopackage.proto +// DO NOT EDIT! + +/* +Package nopackage is a generated protocol buffer package. + +It is generated from these files: + nopackage.proto + +It has these top-level messages: + M +*/ +package nopackage + +import proto "github.com/gogo/protobuf/proto" +import fmt "fmt" +import math "math" + +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. +const _ = proto.GoGoProtoPackageIsVersion1 + +type M struct { + F map[string]float64 `protobuf:"bytes,1,rep,name=f" json:"f,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"fixed64,2,opt,name=value,proto3"` +} + +func (m *M) Reset() { *m = M{} } +func (m *M) String() string { return proto.CompactTextString(m) } +func (*M) ProtoMessage() {} +func (*M) Descriptor() ([]byte, []int) { return fileDescriptorNopackage, []int{0} } + +func (m *M) GetF() map[string]float64 { + if m != nil { + return m.F + } + return nil +} + +func init() { + proto.RegisterType((*M)(nil), "M") +} +func (m *M) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *M) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.F) > 0 { + for k := range m.F { + data[i] = 0xa + i++ + v := m.F[k] + mapSize := 1 + len(k) + sovNopackage(uint64(len(k))) + 1 + 8 + i = encodeVarintNopackage(data, i, uint64(mapSize)) + data[i] = 0xa + i++ + i = encodeVarintNopackage(data, i, uint64(len(k))) + i += copy(data[i:], k) + data[i] = 0x11 + i++ + i = encodeFixed64Nopackage(data, i, uint64(math.Float64bits(float64(v)))) + } + } + return i, nil +} + +func encodeFixed64Nopackage(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 encodeFixed32Nopackage(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 encodeVarintNopackage(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 (m *M) Size() (n int) { + var l int + _ = l + if len(m.F) > 0 { + for k, v := range m.F { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovNopackage(uint64(len(k))) + 1 + 8 + n += mapEntrySize + 1 + sovNopackage(uint64(mapEntrySize)) + } + } + return n +} + +func sovNopackage(x uint64) (n int) { + for { + n++ + x >>= 7 + if x == 0 { + break + } + } + return n +} +func sozNopackage(x uint64) (n int) { + return sovNopackage(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *M) 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 ErrIntOverflowNopackage + } + 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: M: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: M: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field F", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowNopackage + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthNopackage + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var keykey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowNopackage + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + keykey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var stringLenmapkey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowNopackage + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLenmapkey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapkey := int(stringLenmapkey) + if intStringLenmapkey < 0 { + return ErrInvalidLengthNopackage + } + postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey > l { + return io.ErrUnexpectedEOF + } + mapkey := string(data[iNdEx:postStringIndexmapkey]) + iNdEx = postStringIndexmapkey + var valuekey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowNopackage + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + valuekey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapvaluetemp uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + iNdEx += 8 + mapvaluetemp = uint64(data[iNdEx-8]) + mapvaluetemp |= uint64(data[iNdEx-7]) << 8 + mapvaluetemp |= uint64(data[iNdEx-6]) << 16 + mapvaluetemp |= uint64(data[iNdEx-5]) << 24 + mapvaluetemp |= uint64(data[iNdEx-4]) << 32 + mapvaluetemp |= uint64(data[iNdEx-3]) << 40 + mapvaluetemp |= uint64(data[iNdEx-2]) << 48 + mapvaluetemp |= uint64(data[iNdEx-1]) << 56 + mapvalue := math.Float64frombits(mapvaluetemp) + if m.F == nil { + m.F = make(map[string]float64) + } + m.F[mapkey] = mapvalue + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipNopackage(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthNopackage + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipNopackage(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, ErrIntOverflowNopackage + } + 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, ErrIntOverflowNopackage + } + 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, ErrIntOverflowNopackage + } + 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, ErrInvalidLengthNopackage + } + return iNdEx, nil + case 3: + for { + var innerWire uint64 + var start int = iNdEx + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowNopackage + } + 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 := skipNopackage(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 ( + ErrInvalidLengthNopackage = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowNopackage = fmt.Errorf("proto: integer overflow") +) + +var fileDescriptorNopackage = []byte{ + // 129 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xe2, 0xe2, 0xcf, 0xcb, 0x2f, 0x48, + 0x4c, 0xce, 0x4e, 0x4c, 0x4f, 0xd5, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x57, 0x0a, 0xe2, 0x62, 0xf4, + 0x15, 0x12, 0xe7, 0x62, 0x4c, 0x93, 0x60, 0x54, 0x60, 0xd6, 0xe0, 0x36, 0xe2, 0xd4, 0xf3, 0xd5, + 0x73, 0x73, 0xcd, 0x2b, 0x29, 0xaa, 0x0c, 0x62, 0x4c, 0x93, 0x32, 0xe1, 0x62, 0x83, 0x70, 0x84, + 0x04, 0xb8, 0x98, 0xb3, 0x53, 0x2b, 0x81, 0x8a, 0x18, 0x35, 0x38, 0x83, 0x40, 0x4c, 0x21, 0x11, + 0x2e, 0xd6, 0xb2, 0xc4, 0x9c, 0xd2, 0x54, 0x09, 0x26, 0xa0, 0x18, 0x63, 0x10, 0x84, 0x63, 0xc5, + 0x64, 0xc1, 0xe8, 0xc4, 0x73, 0xe2, 0x91, 0x1c, 0xe3, 0x05, 0x20, 0x7e, 0x00, 0xc4, 0x49, 0x6c, + 0x60, 0x8b, 0x8c, 0x01, 0x01, 0x00, 0x00, 0xff, 0xff, 0x62, 0x62, 0xb2, 0xed, 0x7b, 0x00, 0x00, + 0x00, +} diff --git a/vendor/github.com/gogo/protobuf/test/nopackage/nopackage.proto b/vendor/github.com/gogo/protobuf/test/nopackage/nopackage.proto new file mode 100644 index 000000000..9a1309aa1 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/nopackage/nopackage.proto @@ -0,0 +1,5 @@ +syntax = "proto3"; + +message M { + map f = 1; +} diff --git a/vendor/github.com/gogo/protobuf/test/nopackage/nopackage_test.go b/vendor/github.com/gogo/protobuf/test/nopackage/nopackage_test.go new file mode 100644 index 000000000..58c98cc67 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/nopackage/nopackage_test.go @@ -0,0 +1,10 @@ +package nopackage + +import ( + "testing" +) + +func TestNoPackage(t *testing.T) { + //should compile + _ = (&M{}).Marshal +} diff --git a/vendor/github.com/gogo/protobuf/test/oneof/Makefile b/vendor/github.com/gogo/protobuf/test/oneof/Makefile new file mode 100644 index 000000000..b73c7581b --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/oneof/Makefile @@ -0,0 +1,31 @@ +# Extensions for Protocol Buffers to create more go like structures. +# +# Copyright (c) 2013, Vastech SA (PTY) LTD. All rights reserved. +# http://github.com/gogo/protobuf/gogoproto +# +# 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-combo + protoc-gen-combo --version="2.6.0" --proto_path=../../../../../:../../protobuf/:. one.proto \ No newline at end of file diff --git a/vendor/github.com/gogo/protobuf/test/oneof/combos/both/one.pb.go b/vendor/github.com/gogo/protobuf/test/oneof/combos/both/one.pb.go new file mode 100644 index 000000000..4ca241bbc --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/oneof/combos/both/one.pb.go @@ -0,0 +1,5657 @@ +// Code generated by protoc-gen-gogo. +// source: combos/both/one.proto +// DO NOT EDIT! + +/* + Package one is a generated protocol buffer package. + + It is generated from these files: + combos/both/one.proto + + It has these top-level messages: + Subby + AllTypesOneOf + TwoOneofs + CustomOneof +*/ +package one + +import proto "github.com/gogo/protobuf/proto" +import fmt "fmt" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" + +import github_com_gogo_protobuf_test_custom "github.com/gogo/protobuf/test/custom" +import github_com_gogo_protobuf_test_casttype "github.com/gogo/protobuf/test/casttype" + +import github_com_gogo_protobuf_protoc_gen_gogo_descriptor "github.com/gogo/protobuf/protoc-gen-gogo/descriptor" +import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" +import compress_gzip "compress/gzip" +import bytes "bytes" +import io_ioutil "io/ioutil" + +import strings "strings" +import sort "sort" +import strconv "strconv" +import reflect "reflect" + +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. +const _ = proto.GoGoProtoPackageIsVersion1 + +type Subby struct { + Sub *string `protobuf:"bytes,1,opt,name=sub" json:"sub,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *Subby) Reset() { *m = Subby{} } +func (*Subby) ProtoMessage() {} +func (*Subby) Descriptor() ([]byte, []int) { return fileDescriptorOne, []int{0} } + +type AllTypesOneOf struct { + // Types that are valid to be assigned to TestOneof: + // *AllTypesOneOf_Field1 + // *AllTypesOneOf_Field2 + // *AllTypesOneOf_Field3 + // *AllTypesOneOf_Field4 + // *AllTypesOneOf_Field5 + // *AllTypesOneOf_Field6 + // *AllTypesOneOf_Field7 + // *AllTypesOneOf_Field8 + // *AllTypesOneOf_Field9 + // *AllTypesOneOf_Field10 + // *AllTypesOneOf_Field11 + // *AllTypesOneOf_Field12 + // *AllTypesOneOf_Field13 + // *AllTypesOneOf_Field14 + // *AllTypesOneOf_Field15 + // *AllTypesOneOf_SubMessage + TestOneof isAllTypesOneOf_TestOneof `protobuf_oneof:"test_oneof"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *AllTypesOneOf) Reset() { *m = AllTypesOneOf{} } +func (*AllTypesOneOf) ProtoMessage() {} +func (*AllTypesOneOf) Descriptor() ([]byte, []int) { return fileDescriptorOne, []int{1} } + +type isAllTypesOneOf_TestOneof interface { + isAllTypesOneOf_TestOneof() + Equal(interface{}) bool + VerboseEqual(interface{}) error + MarshalTo([]byte) (int, error) + Size() int +} + +type AllTypesOneOf_Field1 struct { + Field1 float64 `protobuf:"fixed64,1,opt,name=Field1,json=field1,oneof"` +} +type AllTypesOneOf_Field2 struct { + Field2 float32 `protobuf:"fixed32,2,opt,name=Field2,json=field2,oneof"` +} +type AllTypesOneOf_Field3 struct { + Field3 int32 `protobuf:"varint,3,opt,name=Field3,json=field3,oneof"` +} +type AllTypesOneOf_Field4 struct { + Field4 int64 `protobuf:"varint,4,opt,name=Field4,json=field4,oneof"` +} +type AllTypesOneOf_Field5 struct { + Field5 uint32 `protobuf:"varint,5,opt,name=Field5,json=field5,oneof"` +} +type AllTypesOneOf_Field6 struct { + Field6 uint64 `protobuf:"varint,6,opt,name=Field6,json=field6,oneof"` +} +type AllTypesOneOf_Field7 struct { + Field7 int32 `protobuf:"zigzag32,7,opt,name=Field7,json=field7,oneof"` +} +type AllTypesOneOf_Field8 struct { + Field8 int64 `protobuf:"zigzag64,8,opt,name=Field8,json=field8,oneof"` +} +type AllTypesOneOf_Field9 struct { + Field9 uint32 `protobuf:"fixed32,9,opt,name=Field9,json=field9,oneof"` +} +type AllTypesOneOf_Field10 struct { + Field10 int32 `protobuf:"fixed32,10,opt,name=Field10,json=field10,oneof"` +} +type AllTypesOneOf_Field11 struct { + Field11 uint64 `protobuf:"fixed64,11,opt,name=Field11,json=field11,oneof"` +} +type AllTypesOneOf_Field12 struct { + Field12 int64 `protobuf:"fixed64,12,opt,name=Field12,json=field12,oneof"` +} +type AllTypesOneOf_Field13 struct { + Field13 bool `protobuf:"varint,13,opt,name=Field13,json=field13,oneof"` +} +type AllTypesOneOf_Field14 struct { + Field14 string `protobuf:"bytes,14,opt,name=Field14,json=field14,oneof"` +} +type AllTypesOneOf_Field15 struct { + Field15 []byte `protobuf:"bytes,15,opt,name=Field15,json=field15,oneof"` +} +type AllTypesOneOf_SubMessage struct { + SubMessage *Subby `protobuf:"bytes,16,opt,name=sub_message,json=subMessage,oneof"` +} + +func (*AllTypesOneOf_Field1) isAllTypesOneOf_TestOneof() {} +func (*AllTypesOneOf_Field2) isAllTypesOneOf_TestOneof() {} +func (*AllTypesOneOf_Field3) isAllTypesOneOf_TestOneof() {} +func (*AllTypesOneOf_Field4) isAllTypesOneOf_TestOneof() {} +func (*AllTypesOneOf_Field5) isAllTypesOneOf_TestOneof() {} +func (*AllTypesOneOf_Field6) isAllTypesOneOf_TestOneof() {} +func (*AllTypesOneOf_Field7) isAllTypesOneOf_TestOneof() {} +func (*AllTypesOneOf_Field8) isAllTypesOneOf_TestOneof() {} +func (*AllTypesOneOf_Field9) isAllTypesOneOf_TestOneof() {} +func (*AllTypesOneOf_Field10) isAllTypesOneOf_TestOneof() {} +func (*AllTypesOneOf_Field11) isAllTypesOneOf_TestOneof() {} +func (*AllTypesOneOf_Field12) isAllTypesOneOf_TestOneof() {} +func (*AllTypesOneOf_Field13) isAllTypesOneOf_TestOneof() {} +func (*AllTypesOneOf_Field14) isAllTypesOneOf_TestOneof() {} +func (*AllTypesOneOf_Field15) isAllTypesOneOf_TestOneof() {} +func (*AllTypesOneOf_SubMessage) isAllTypesOneOf_TestOneof() {} + +func (m *AllTypesOneOf) GetTestOneof() isAllTypesOneOf_TestOneof { + if m != nil { + return m.TestOneof + } + return nil +} + +func (m *AllTypesOneOf) GetField1() float64 { + if x, ok := m.GetTestOneof().(*AllTypesOneOf_Field1); ok { + return x.Field1 + } + return 0 +} + +func (m *AllTypesOneOf) GetField2() float32 { + if x, ok := m.GetTestOneof().(*AllTypesOneOf_Field2); ok { + return x.Field2 + } + return 0 +} + +func (m *AllTypesOneOf) GetField3() int32 { + if x, ok := m.GetTestOneof().(*AllTypesOneOf_Field3); ok { + return x.Field3 + } + return 0 +} + +func (m *AllTypesOneOf) GetField4() int64 { + if x, ok := m.GetTestOneof().(*AllTypesOneOf_Field4); ok { + return x.Field4 + } + return 0 +} + +func (m *AllTypesOneOf) GetField5() uint32 { + if x, ok := m.GetTestOneof().(*AllTypesOneOf_Field5); ok { + return x.Field5 + } + return 0 +} + +func (m *AllTypesOneOf) GetField6() uint64 { + if x, ok := m.GetTestOneof().(*AllTypesOneOf_Field6); ok { + return x.Field6 + } + return 0 +} + +func (m *AllTypesOneOf) GetField7() int32 { + if x, ok := m.GetTestOneof().(*AllTypesOneOf_Field7); ok { + return x.Field7 + } + return 0 +} + +func (m *AllTypesOneOf) GetField8() int64 { + if x, ok := m.GetTestOneof().(*AllTypesOneOf_Field8); ok { + return x.Field8 + } + return 0 +} + +func (m *AllTypesOneOf) GetField9() uint32 { + if x, ok := m.GetTestOneof().(*AllTypesOneOf_Field9); ok { + return x.Field9 + } + return 0 +} + +func (m *AllTypesOneOf) GetField10() int32 { + if x, ok := m.GetTestOneof().(*AllTypesOneOf_Field10); ok { + return x.Field10 + } + return 0 +} + +func (m *AllTypesOneOf) GetField11() uint64 { + if x, ok := m.GetTestOneof().(*AllTypesOneOf_Field11); ok { + return x.Field11 + } + return 0 +} + +func (m *AllTypesOneOf) GetField12() int64 { + if x, ok := m.GetTestOneof().(*AllTypesOneOf_Field12); ok { + return x.Field12 + } + return 0 +} + +func (m *AllTypesOneOf) GetField13() bool { + if x, ok := m.GetTestOneof().(*AllTypesOneOf_Field13); ok { + return x.Field13 + } + return false +} + +func (m *AllTypesOneOf) GetField14() string { + if x, ok := m.GetTestOneof().(*AllTypesOneOf_Field14); ok { + return x.Field14 + } + return "" +} + +func (m *AllTypesOneOf) GetField15() []byte { + if x, ok := m.GetTestOneof().(*AllTypesOneOf_Field15); ok { + return x.Field15 + } + return nil +} + +func (m *AllTypesOneOf) GetSubMessage() *Subby { + if x, ok := m.GetTestOneof().(*AllTypesOneOf_SubMessage); ok { + return x.SubMessage + } + return nil +} + +// XXX_OneofFuncs is for the internal use of the proto package. +func (*AllTypesOneOf) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{}) { + return _AllTypesOneOf_OneofMarshaler, _AllTypesOneOf_OneofUnmarshaler, _AllTypesOneOf_OneofSizer, []interface{}{ + (*AllTypesOneOf_Field1)(nil), + (*AllTypesOneOf_Field2)(nil), + (*AllTypesOneOf_Field3)(nil), + (*AllTypesOneOf_Field4)(nil), + (*AllTypesOneOf_Field5)(nil), + (*AllTypesOneOf_Field6)(nil), + (*AllTypesOneOf_Field7)(nil), + (*AllTypesOneOf_Field8)(nil), + (*AllTypesOneOf_Field9)(nil), + (*AllTypesOneOf_Field10)(nil), + (*AllTypesOneOf_Field11)(nil), + (*AllTypesOneOf_Field12)(nil), + (*AllTypesOneOf_Field13)(nil), + (*AllTypesOneOf_Field14)(nil), + (*AllTypesOneOf_Field15)(nil), + (*AllTypesOneOf_SubMessage)(nil), + } +} + +func _AllTypesOneOf_OneofMarshaler(msg proto.Message, b *proto.Buffer) error { + m := msg.(*AllTypesOneOf) + // test_oneof + switch x := m.TestOneof.(type) { + case *AllTypesOneOf_Field1: + _ = b.EncodeVarint(1<<3 | proto.WireFixed64) + _ = b.EncodeFixed64(math.Float64bits(x.Field1)) + case *AllTypesOneOf_Field2: + _ = b.EncodeVarint(2<<3 | proto.WireFixed32) + _ = b.EncodeFixed32(uint64(math.Float32bits(x.Field2))) + case *AllTypesOneOf_Field3: + _ = b.EncodeVarint(3<<3 | proto.WireVarint) + _ = b.EncodeVarint(uint64(x.Field3)) + case *AllTypesOneOf_Field4: + _ = b.EncodeVarint(4<<3 | proto.WireVarint) + _ = b.EncodeVarint(uint64(x.Field4)) + case *AllTypesOneOf_Field5: + _ = b.EncodeVarint(5<<3 | proto.WireVarint) + _ = b.EncodeVarint(uint64(x.Field5)) + case *AllTypesOneOf_Field6: + _ = b.EncodeVarint(6<<3 | proto.WireVarint) + _ = b.EncodeVarint(uint64(x.Field6)) + case *AllTypesOneOf_Field7: + _ = b.EncodeVarint(7<<3 | proto.WireVarint) + _ = b.EncodeZigzag32(uint64(x.Field7)) + case *AllTypesOneOf_Field8: + _ = b.EncodeVarint(8<<3 | proto.WireVarint) + _ = b.EncodeZigzag64(uint64(x.Field8)) + case *AllTypesOneOf_Field9: + _ = b.EncodeVarint(9<<3 | proto.WireFixed32) + _ = b.EncodeFixed32(uint64(x.Field9)) + case *AllTypesOneOf_Field10: + _ = b.EncodeVarint(10<<3 | proto.WireFixed32) + _ = b.EncodeFixed32(uint64(x.Field10)) + case *AllTypesOneOf_Field11: + _ = b.EncodeVarint(11<<3 | proto.WireFixed64) + _ = b.EncodeFixed64(uint64(x.Field11)) + case *AllTypesOneOf_Field12: + _ = b.EncodeVarint(12<<3 | proto.WireFixed64) + _ = b.EncodeFixed64(uint64(x.Field12)) + case *AllTypesOneOf_Field13: + t := uint64(0) + if x.Field13 { + t = 1 + } + _ = b.EncodeVarint(13<<3 | proto.WireVarint) + _ = b.EncodeVarint(t) + case *AllTypesOneOf_Field14: + _ = b.EncodeVarint(14<<3 | proto.WireBytes) + _ = b.EncodeStringBytes(x.Field14) + case *AllTypesOneOf_Field15: + _ = b.EncodeVarint(15<<3 | proto.WireBytes) + _ = b.EncodeRawBytes(x.Field15) + case *AllTypesOneOf_SubMessage: + _ = b.EncodeVarint(16<<3 | proto.WireBytes) + if err := b.EncodeMessage(x.SubMessage); err != nil { + return err + } + case nil: + default: + return fmt.Errorf("AllTypesOneOf.TestOneof has unexpected type %T", x) + } + return nil +} + +func _AllTypesOneOf_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) { + m := msg.(*AllTypesOneOf) + switch tag { + case 1: // test_oneof.Field1 + if wire != proto.WireFixed64 { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeFixed64() + m.TestOneof = &AllTypesOneOf_Field1{math.Float64frombits(x)} + return true, err + case 2: // test_oneof.Field2 + if wire != proto.WireFixed32 { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeFixed32() + m.TestOneof = &AllTypesOneOf_Field2{math.Float32frombits(uint32(x))} + return true, err + case 3: // test_oneof.Field3 + if wire != proto.WireVarint { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeVarint() + m.TestOneof = &AllTypesOneOf_Field3{int32(x)} + return true, err + case 4: // test_oneof.Field4 + if wire != proto.WireVarint { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeVarint() + m.TestOneof = &AllTypesOneOf_Field4{int64(x)} + return true, err + case 5: // test_oneof.Field5 + if wire != proto.WireVarint { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeVarint() + m.TestOneof = &AllTypesOneOf_Field5{uint32(x)} + return true, err + case 6: // test_oneof.Field6 + if wire != proto.WireVarint { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeVarint() + m.TestOneof = &AllTypesOneOf_Field6{x} + return true, err + case 7: // test_oneof.Field7 + if wire != proto.WireVarint { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeZigzag32() + m.TestOneof = &AllTypesOneOf_Field7{int32(x)} + return true, err + case 8: // test_oneof.Field8 + if wire != proto.WireVarint { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeZigzag64() + m.TestOneof = &AllTypesOneOf_Field8{int64(x)} + return true, err + case 9: // test_oneof.Field9 + if wire != proto.WireFixed32 { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeFixed32() + m.TestOneof = &AllTypesOneOf_Field9{uint32(x)} + return true, err + case 10: // test_oneof.Field10 + if wire != proto.WireFixed32 { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeFixed32() + m.TestOneof = &AllTypesOneOf_Field10{int32(x)} + return true, err + case 11: // test_oneof.Field11 + if wire != proto.WireFixed64 { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeFixed64() + m.TestOneof = &AllTypesOneOf_Field11{x} + return true, err + case 12: // test_oneof.Field12 + if wire != proto.WireFixed64 { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeFixed64() + m.TestOneof = &AllTypesOneOf_Field12{int64(x)} + return true, err + case 13: // test_oneof.Field13 + if wire != proto.WireVarint { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeVarint() + m.TestOneof = &AllTypesOneOf_Field13{x != 0} + return true, err + case 14: // test_oneof.Field14 + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeStringBytes() + m.TestOneof = &AllTypesOneOf_Field14{x} + return true, err + case 15: // test_oneof.Field15 + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeRawBytes(true) + m.TestOneof = &AllTypesOneOf_Field15{x} + return true, err + case 16: // test_oneof.sub_message + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + msg := new(Subby) + err := b.DecodeMessage(msg) + m.TestOneof = &AllTypesOneOf_SubMessage{msg} + return true, err + default: + return false, nil + } +} + +func _AllTypesOneOf_OneofSizer(msg proto.Message) (n int) { + m := msg.(*AllTypesOneOf) + // test_oneof + switch x := m.TestOneof.(type) { + case *AllTypesOneOf_Field1: + n += proto.SizeVarint(1<<3 | proto.WireFixed64) + n += 8 + case *AllTypesOneOf_Field2: + n += proto.SizeVarint(2<<3 | proto.WireFixed32) + n += 4 + case *AllTypesOneOf_Field3: + n += proto.SizeVarint(3<<3 | proto.WireVarint) + n += proto.SizeVarint(uint64(x.Field3)) + case *AllTypesOneOf_Field4: + n += proto.SizeVarint(4<<3 | proto.WireVarint) + n += proto.SizeVarint(uint64(x.Field4)) + case *AllTypesOneOf_Field5: + n += proto.SizeVarint(5<<3 | proto.WireVarint) + n += proto.SizeVarint(uint64(x.Field5)) + case *AllTypesOneOf_Field6: + n += proto.SizeVarint(6<<3 | proto.WireVarint) + n += proto.SizeVarint(uint64(x.Field6)) + case *AllTypesOneOf_Field7: + n += proto.SizeVarint(7<<3 | proto.WireVarint) + n += proto.SizeVarint(uint64((uint32(x.Field7) << 1) ^ uint32((int32(x.Field7) >> 31)))) + case *AllTypesOneOf_Field8: + n += proto.SizeVarint(8<<3 | proto.WireVarint) + n += proto.SizeVarint(uint64(uint64(x.Field8<<1) ^ uint64((int64(x.Field8) >> 63)))) + case *AllTypesOneOf_Field9: + n += proto.SizeVarint(9<<3 | proto.WireFixed32) + n += 4 + case *AllTypesOneOf_Field10: + n += proto.SizeVarint(10<<3 | proto.WireFixed32) + n += 4 + case *AllTypesOneOf_Field11: + n += proto.SizeVarint(11<<3 | proto.WireFixed64) + n += 8 + case *AllTypesOneOf_Field12: + n += proto.SizeVarint(12<<3 | proto.WireFixed64) + n += 8 + case *AllTypesOneOf_Field13: + n += proto.SizeVarint(13<<3 | proto.WireVarint) + n += 1 + case *AllTypesOneOf_Field14: + n += proto.SizeVarint(14<<3 | proto.WireBytes) + n += proto.SizeVarint(uint64(len(x.Field14))) + n += len(x.Field14) + case *AllTypesOneOf_Field15: + n += proto.SizeVarint(15<<3 | proto.WireBytes) + n += proto.SizeVarint(uint64(len(x.Field15))) + n += len(x.Field15) + case *AllTypesOneOf_SubMessage: + s := proto.Size(x.SubMessage) + n += proto.SizeVarint(16<<3 | proto.WireBytes) + n += proto.SizeVarint(uint64(s)) + n += s + case nil: + default: + panic(fmt.Sprintf("proto: unexpected type %T in oneof", x)) + } + return n +} + +type TwoOneofs struct { + // Types that are valid to be assigned to One: + // *TwoOneofs_Field1 + // *TwoOneofs_Field2 + // *TwoOneofs_Field3 + One isTwoOneofs_One `protobuf_oneof:"one"` + // Types that are valid to be assigned to Two: + // *TwoOneofs_Field34 + // *TwoOneofs_Field35 + // *TwoOneofs_SubMessage2 + Two isTwoOneofs_Two `protobuf_oneof:"two"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *TwoOneofs) Reset() { *m = TwoOneofs{} } +func (*TwoOneofs) ProtoMessage() {} +func (*TwoOneofs) Descriptor() ([]byte, []int) { return fileDescriptorOne, []int{2} } + +type isTwoOneofs_One interface { + isTwoOneofs_One() + Equal(interface{}) bool + VerboseEqual(interface{}) error + MarshalTo([]byte) (int, error) + Size() int +} +type isTwoOneofs_Two interface { + isTwoOneofs_Two() + Equal(interface{}) bool + VerboseEqual(interface{}) error + MarshalTo([]byte) (int, error) + Size() int +} + +type TwoOneofs_Field1 struct { + Field1 float64 `protobuf:"fixed64,1,opt,name=Field1,json=field1,oneof"` +} +type TwoOneofs_Field2 struct { + Field2 float32 `protobuf:"fixed32,2,opt,name=Field2,json=field2,oneof"` +} +type TwoOneofs_Field3 struct { + Field3 int32 `protobuf:"varint,3,opt,name=Field3,json=field3,oneof"` +} +type TwoOneofs_Field34 struct { + Field34 string `protobuf:"bytes,34,opt,name=Field34,json=field34,oneof"` +} +type TwoOneofs_Field35 struct { + Field35 []byte `protobuf:"bytes,35,opt,name=Field35,json=field35,oneof"` +} +type TwoOneofs_SubMessage2 struct { + SubMessage2 *Subby `protobuf:"bytes,36,opt,name=sub_message2,json=subMessage2,oneof"` +} + +func (*TwoOneofs_Field1) isTwoOneofs_One() {} +func (*TwoOneofs_Field2) isTwoOneofs_One() {} +func (*TwoOneofs_Field3) isTwoOneofs_One() {} +func (*TwoOneofs_Field34) isTwoOneofs_Two() {} +func (*TwoOneofs_Field35) isTwoOneofs_Two() {} +func (*TwoOneofs_SubMessage2) isTwoOneofs_Two() {} + +func (m *TwoOneofs) GetOne() isTwoOneofs_One { + if m != nil { + return m.One + } + return nil +} +func (m *TwoOneofs) GetTwo() isTwoOneofs_Two { + if m != nil { + return m.Two + } + return nil +} + +func (m *TwoOneofs) GetField1() float64 { + if x, ok := m.GetOne().(*TwoOneofs_Field1); ok { + return x.Field1 + } + return 0 +} + +func (m *TwoOneofs) GetField2() float32 { + if x, ok := m.GetOne().(*TwoOneofs_Field2); ok { + return x.Field2 + } + return 0 +} + +func (m *TwoOneofs) GetField3() int32 { + if x, ok := m.GetOne().(*TwoOneofs_Field3); ok { + return x.Field3 + } + return 0 +} + +func (m *TwoOneofs) GetField34() string { + if x, ok := m.GetTwo().(*TwoOneofs_Field34); ok { + return x.Field34 + } + return "" +} + +func (m *TwoOneofs) GetField35() []byte { + if x, ok := m.GetTwo().(*TwoOneofs_Field35); ok { + return x.Field35 + } + return nil +} + +func (m *TwoOneofs) GetSubMessage2() *Subby { + if x, ok := m.GetTwo().(*TwoOneofs_SubMessage2); ok { + return x.SubMessage2 + } + return nil +} + +// XXX_OneofFuncs is for the internal use of the proto package. +func (*TwoOneofs) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{}) { + return _TwoOneofs_OneofMarshaler, _TwoOneofs_OneofUnmarshaler, _TwoOneofs_OneofSizer, []interface{}{ + (*TwoOneofs_Field1)(nil), + (*TwoOneofs_Field2)(nil), + (*TwoOneofs_Field3)(nil), + (*TwoOneofs_Field34)(nil), + (*TwoOneofs_Field35)(nil), + (*TwoOneofs_SubMessage2)(nil), + } +} + +func _TwoOneofs_OneofMarshaler(msg proto.Message, b *proto.Buffer) error { + m := msg.(*TwoOneofs) + // one + switch x := m.One.(type) { + case *TwoOneofs_Field1: + _ = b.EncodeVarint(1<<3 | proto.WireFixed64) + _ = b.EncodeFixed64(math.Float64bits(x.Field1)) + case *TwoOneofs_Field2: + _ = b.EncodeVarint(2<<3 | proto.WireFixed32) + _ = b.EncodeFixed32(uint64(math.Float32bits(x.Field2))) + case *TwoOneofs_Field3: + _ = b.EncodeVarint(3<<3 | proto.WireVarint) + _ = b.EncodeVarint(uint64(x.Field3)) + case nil: + default: + return fmt.Errorf("TwoOneofs.One has unexpected type %T", x) + } + // two + switch x := m.Two.(type) { + case *TwoOneofs_Field34: + _ = b.EncodeVarint(34<<3 | proto.WireBytes) + _ = b.EncodeStringBytes(x.Field34) + case *TwoOneofs_Field35: + _ = b.EncodeVarint(35<<3 | proto.WireBytes) + _ = b.EncodeRawBytes(x.Field35) + case *TwoOneofs_SubMessage2: + _ = b.EncodeVarint(36<<3 | proto.WireBytes) + if err := b.EncodeMessage(x.SubMessage2); err != nil { + return err + } + case nil: + default: + return fmt.Errorf("TwoOneofs.Two has unexpected type %T", x) + } + return nil +} + +func _TwoOneofs_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) { + m := msg.(*TwoOneofs) + switch tag { + case 1: // one.Field1 + if wire != proto.WireFixed64 { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeFixed64() + m.One = &TwoOneofs_Field1{math.Float64frombits(x)} + return true, err + case 2: // one.Field2 + if wire != proto.WireFixed32 { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeFixed32() + m.One = &TwoOneofs_Field2{math.Float32frombits(uint32(x))} + return true, err + case 3: // one.Field3 + if wire != proto.WireVarint { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeVarint() + m.One = &TwoOneofs_Field3{int32(x)} + return true, err + case 34: // two.Field34 + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeStringBytes() + m.Two = &TwoOneofs_Field34{x} + return true, err + case 35: // two.Field35 + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeRawBytes(true) + m.Two = &TwoOneofs_Field35{x} + return true, err + case 36: // two.sub_message2 + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + msg := new(Subby) + err := b.DecodeMessage(msg) + m.Two = &TwoOneofs_SubMessage2{msg} + return true, err + default: + return false, nil + } +} + +func _TwoOneofs_OneofSizer(msg proto.Message) (n int) { + m := msg.(*TwoOneofs) + // one + switch x := m.One.(type) { + case *TwoOneofs_Field1: + n += proto.SizeVarint(1<<3 | proto.WireFixed64) + n += 8 + case *TwoOneofs_Field2: + n += proto.SizeVarint(2<<3 | proto.WireFixed32) + n += 4 + case *TwoOneofs_Field3: + n += proto.SizeVarint(3<<3 | proto.WireVarint) + n += proto.SizeVarint(uint64(x.Field3)) + case nil: + default: + panic(fmt.Sprintf("proto: unexpected type %T in oneof", x)) + } + // two + switch x := m.Two.(type) { + case *TwoOneofs_Field34: + n += proto.SizeVarint(34<<3 | proto.WireBytes) + n += proto.SizeVarint(uint64(len(x.Field34))) + n += len(x.Field34) + case *TwoOneofs_Field35: + n += proto.SizeVarint(35<<3 | proto.WireBytes) + n += proto.SizeVarint(uint64(len(x.Field35))) + n += len(x.Field35) + case *TwoOneofs_SubMessage2: + s := proto.Size(x.SubMessage2) + n += proto.SizeVarint(36<<3 | proto.WireBytes) + n += proto.SizeVarint(uint64(s)) + n += s + case nil: + default: + panic(fmt.Sprintf("proto: unexpected type %T in oneof", x)) + } + return n +} + +type CustomOneof struct { + // Types that are valid to be assigned to Custom: + // *CustomOneof_Stringy + // *CustomOneof_CustomType + // *CustomOneof_CastType + // *CustomOneof_MyCustomName + Custom isCustomOneof_Custom `protobuf_oneof:"custom"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *CustomOneof) Reset() { *m = CustomOneof{} } +func (*CustomOneof) ProtoMessage() {} +func (*CustomOneof) Descriptor() ([]byte, []int) { return fileDescriptorOne, []int{3} } + +type isCustomOneof_Custom interface { + isCustomOneof_Custom() + Equal(interface{}) bool + VerboseEqual(interface{}) error + MarshalTo([]byte) (int, error) + Size() int +} + +type CustomOneof_Stringy struct { + Stringy string `protobuf:"bytes,34,opt,name=Stringy,json=stringy,oneof"` +} +type CustomOneof_CustomType struct { + CustomType github_com_gogo_protobuf_test_custom.Uint128 `protobuf:"bytes,35,opt,name=CustomType,json=customType,oneof,customtype=github.com/gogo/protobuf/test/custom.Uint128"` +} +type CustomOneof_CastType struct { + CastType github_com_gogo_protobuf_test_casttype.MyUint64Type `protobuf:"varint,36,opt,name=CastType,json=castType,oneof,casttype=github.com/gogo/protobuf/test/casttype.MyUint64Type"` +} +type CustomOneof_MyCustomName struct { + MyCustomName int64 `protobuf:"varint,37,opt,name=CustomName,json=customName,oneof"` +} + +func (*CustomOneof_Stringy) isCustomOneof_Custom() {} +func (*CustomOneof_CustomType) isCustomOneof_Custom() {} +func (*CustomOneof_CastType) isCustomOneof_Custom() {} +func (*CustomOneof_MyCustomName) isCustomOneof_Custom() {} + +func (m *CustomOneof) GetCustom() isCustomOneof_Custom { + if m != nil { + return m.Custom + } + return nil +} + +func (m *CustomOneof) GetStringy() string { + if x, ok := m.GetCustom().(*CustomOneof_Stringy); ok { + return x.Stringy + } + return "" +} + +func (m *CustomOneof) GetCastType() github_com_gogo_protobuf_test_casttype.MyUint64Type { + if x, ok := m.GetCustom().(*CustomOneof_CastType); ok { + return x.CastType + } + return 0 +} + +func (m *CustomOneof) GetMyCustomName() int64 { + if x, ok := m.GetCustom().(*CustomOneof_MyCustomName); ok { + return x.MyCustomName + } + return 0 +} + +// XXX_OneofFuncs is for the internal use of the proto package. +func (*CustomOneof) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{}) { + return _CustomOneof_OneofMarshaler, _CustomOneof_OneofUnmarshaler, _CustomOneof_OneofSizer, []interface{}{ + (*CustomOneof_Stringy)(nil), + (*CustomOneof_CustomType)(nil), + (*CustomOneof_CastType)(nil), + (*CustomOneof_MyCustomName)(nil), + } +} + +func _CustomOneof_OneofMarshaler(msg proto.Message, b *proto.Buffer) error { + m := msg.(*CustomOneof) + // custom + switch x := m.Custom.(type) { + case *CustomOneof_Stringy: + _ = b.EncodeVarint(34<<3 | proto.WireBytes) + _ = b.EncodeStringBytes(x.Stringy) + case *CustomOneof_CustomType: + _ = b.EncodeVarint(35<<3 | proto.WireBytes) + data, err := x.CustomType.Marshal() + if err != nil { + return err + } + _ = b.EncodeRawBytes(data) + case *CustomOneof_CastType: + _ = b.EncodeVarint(36<<3 | proto.WireVarint) + _ = b.EncodeVarint(uint64(x.CastType)) + case *CustomOneof_MyCustomName: + _ = b.EncodeVarint(37<<3 | proto.WireVarint) + _ = b.EncodeVarint(uint64(x.MyCustomName)) + case nil: + default: + return fmt.Errorf("CustomOneof.Custom has unexpected type %T", x) + } + return nil +} + +func _CustomOneof_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) { + m := msg.(*CustomOneof) + switch tag { + case 34: // custom.Stringy + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeStringBytes() + m.Custom = &CustomOneof_Stringy{x} + return true, err + case 35: // custom.CustomType + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeRawBytes(true) + if err != nil { + return true, err + } + var cc github_com_gogo_protobuf_test_custom.Uint128 + c := &cc + err = c.Unmarshal(x) + m.Custom = &CustomOneof_CustomType{*c} + return true, err + case 36: // custom.CastType + if wire != proto.WireVarint { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeVarint() + m.Custom = &CustomOneof_CastType{github_com_gogo_protobuf_test_casttype.MyUint64Type(x)} + return true, err + case 37: // custom.CustomName + if wire != proto.WireVarint { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeVarint() + m.Custom = &CustomOneof_MyCustomName{int64(x)} + return true, err + default: + return false, nil + } +} + +func _CustomOneof_OneofSizer(msg proto.Message) (n int) { + m := msg.(*CustomOneof) + // custom + switch x := m.Custom.(type) { + case *CustomOneof_Stringy: + n += proto.SizeVarint(34<<3 | proto.WireBytes) + n += proto.SizeVarint(uint64(len(x.Stringy))) + n += len(x.Stringy) + case *CustomOneof_CustomType: + n += proto.SizeVarint(35<<3 | proto.WireBytes) + n += proto.SizeVarint(uint64(x.CustomType.Size())) + n += x.CustomType.Size() + case *CustomOneof_CastType: + n += proto.SizeVarint(36<<3 | proto.WireVarint) + n += proto.SizeVarint(uint64(x.CastType)) + case *CustomOneof_MyCustomName: + n += proto.SizeVarint(37<<3 | proto.WireVarint) + n += proto.SizeVarint(uint64(x.MyCustomName)) + case nil: + default: + panic(fmt.Sprintf("proto: unexpected type %T in oneof", x)) + } + return n +} + +func init() { + proto.RegisterType((*Subby)(nil), "one.Subby") + proto.RegisterType((*AllTypesOneOf)(nil), "one.AllTypesOneOf") + proto.RegisterType((*TwoOneofs)(nil), "one.TwoOneofs") + proto.RegisterType((*CustomOneof)(nil), "one.CustomOneof") +} +func (this *Subby) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return OneDescription() +} +func (this *AllTypesOneOf) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return OneDescription() +} +func (this *TwoOneofs) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return OneDescription() +} +func (this *CustomOneof) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return OneDescription() +} +func OneDescription() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + d := &github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet{} + var gzipped = []byte{ + // 3729 bytes of a gzipped FileDescriptorSet + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 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0x21, + 0xd9, 0xd4, 0x48, 0xdc, 0xa3, 0x8b, 0xd9, 0xcc, 0x62, 0x74, 0x10, 0xe3, 0xbe, 0x33, 0x93, 0x39, + 0x8c, 0x4d, 0x6c, 0xa0, 0xe9, 0xbe, 0x94, 0x0e, 0x83, 0x2d, 0x50, 0x68, 0x58, 0x01, 0xcd, 0x42, + 0x09, 0x21, 0x5c, 0x46, 0xd9, 0xe8, 0x69, 0x48, 0x7a, 0xdd, 0x23, 0x8d, 0x40, 0xd8, 0xb4, 0xd4, + 0xa6, 0x45, 0xa3, 0x30, 0x2c, 0xb3, 0x0b, 0x29, 0x05, 0x41, 0x4c, 0x32, 0x34, 0xcb, 0x85, 0x65, + 0xf2, 0x75, 0xf4, 0x14, 0x0c, 0x78, 0x6e, 0xdf, 0x2b, 0x30, 0xf3, 0x78, 0x04, 0x46, 0xba, 0xc5, + 0x5c, 0xd7, 0xf0, 0xc7, 0xed, 0x83, 0x11, 0xb0, 0xae, 0x35, 0x31, 0xee, 0x08, 0x03, 0xbf, 0xc2, + 0x88, 0x0a, 0xd7, 0xd4, 0x75, 0xad, 0x86, 0xd1, 0x14, 0x38, 0x92, 0x9c, 0xbc, 0xbd, 0xa7, 0xa8, + 0x1e, 0x5f, 0x24, 0x10, 0x99, 0x21, 0xa5, 0xbb, 0x21, 0xc4, 0x53, 0x1c, 0x61, 0x38, 0xda, 0x1b, + 0x03, 0x89, 0x45, 0x99, 0xe2, 0xa4, 0xeb, 0x20, 0x46, 0xfe, 0x33, 0xdf, 0x46, 0xe8, 0x98, 0xa3, + 0x44, 0x40, 0xfc, 0x2a, 0x8d, 0x42, 0x94, 0x86, 0x59, 0x59, 0x13, 0xa5, 0xc1, 0xbe, 0x26, 0x0b, + 0x53, 0xd6, 0x36, 0xd4, 0x56, 0xcd, 0x52, 0x2e, 0xa9, 0xb5, 0x96, 0x46, 0x03, 0x06, 0x17, 0x86, + 0x0b, 0xef, 0x23, 0x32, 0x69, 0x0c, 0xe2, 0x2c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0xca, + 0xcc, 0x42, 0x98, 0x46, 0x17, 0x46, 0x71, 0x72, 0x71, 0x26, 0x97, 0x5f, 0x54, 0x0a, 0x2b, 0x6b, + 0x0b, 0x85, 0xe5, 0x99, 0x45, 0xf4, 0x9d, 0x2d, 0x93, 0xf3, 0xff, 0x56, 0x5c, 0x90, 0xf3, 0x73, + 0xe8, 0x3f, 0x97, 0x6c, 0x25, 0x3f, 0xb3, 0x86, 0xb2, 0x60, 0xe6, 0x28, 0x8c, 0x74, 0xcb, 0x33, + 0xdd, 0x76, 0x46, 0xe6, 0xf9, 0x00, 0x0c, 0x77, 0x49, 0x99, 0x5d, 0x77, 0xd1, 0x3d, 0x10, 0x66, + 0x91, 0xc6, 0x8a, 0xc8, 0x6d, 0x5d, 0x73, 0x2f, 0x8d, 0xbb, 0x8e, 0x42, 0x42, 0x71, 0xee, 0x42, + 0x1a, 0xdc, 0xa6, 0x90, 0x12, 0x8a, 0x8e, 0x70, 0x7a, 0x24, 0x00, 0xe9, 0xed, 0xb8, 0x7d, 0xf6, + 0x7b, 0x9f, 0x67, 0xbf, 0xdf, 0xd5, 0x3e, 0x80, 0x43, 0xdb, 0xcf, 0xa1, 0x63, 0x14, 0x2f, 0x04, + 0x60, 0x5f, 0xf7, 0x7e, 0xa3, 0xeb, 0x18, 0xee, 0x86, 0x48, 0x5d, 0xb3, 0x36, 0x0d, 0x51, 0x73, + 0x6f, 0xe9, 0x92, 0xc9, 0x89, 0xba, 0xdd, 0x57, 0x1c, 0xe5, 0x2e, 0x05, 0xc1, 0xed, 0x9a, 0x06, + 0x36, 0x9a, 0x8e, 0x91, 0x3e, 0xda, 0x07, 0x7b, 0xbb, 0x92, 0x77, 0x1d, 0xe8, 0x0d, 0x00, 0x55, + 0xbd, 0xd1, 0xb2, 0x58, 0x5d, 0x65, 0x69, 0x26, 0x46, 0x25, 0x74, 0x0b, 0x93, 0x14, 0xd2, 0xb2, + 0x6c, 0x7d, 0x90, 0xea, 0x81, 0x89, 0xa8,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 0x70, 0xcf, + 0xeb, 0xf8, 0xf9, 0x39, 0x7e, 0xde, 0x78, 0xf3, 0x60, 0xe0, 0x3d, 0xfc, 0xbc, 0x8f, 0x9f, 0x87, + 0xdf, 0x3a, 0x18, 0x78, 0x11, 0x3f, 0x2f, 0xe3, 0xe7, 0x7b, 0xf8, 0x79, 0x0d, 0x3f, 0xaf, 0xe3, + 0xe7, 0x0d, 0xfc, 0xbc, 0xf3, 0xd6, 0xc1, 0x3d, 0xef, 0xe1, 0xff, 0xf7, 0xf1, 0xff, 0xc3, 0xbf, + 0x3a, 0xb8, 0xe7, 0x6f, 0x01, 0x00, 0x00, 0xff, 0xff, 0xc7, 0x4b, 0x4e, 0x2e, 0xe2, 0x2e, 0x00, + 0x00, + } + r := bytes.NewReader(gzipped) + gzipr, err := compress_gzip.NewReader(r) + if err != nil { + panic(err) + } + ungzipped, err := io_ioutil.ReadAll(gzipr) + if err != nil { + panic(err) + } + if err := github_com_gogo_protobuf_proto.Unmarshal(ungzipped, d); err != nil { + panic(err) + } + return d +} +func (this *Subby) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*Subby) + if !ok { + that2, ok := that.(Subby) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *Subby") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *Subby but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *Subby but is not nil && this == nil") + } + if this.Sub != nil && that1.Sub != nil { + if *this.Sub != *that1.Sub { + return fmt.Errorf("Sub this(%v) Not Equal that(%v)", *this.Sub, *that1.Sub) + } + } else if this.Sub != nil { + return fmt.Errorf("this.Sub == nil && that.Sub != nil") + } else if that1.Sub != nil { + return fmt.Errorf("Sub this(%v) Not Equal that(%v)", this.Sub, that1.Sub) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *Subby) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*Subby) + if !ok { + that2, ok := that.(Subby) + 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.Sub != nil && that1.Sub != nil { + if *this.Sub != *that1.Sub { + return false + } + } else if this.Sub != nil { + return false + } else if that1.Sub != nil { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *AllTypesOneOf) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*AllTypesOneOf) + if !ok { + that2, ok := that.(AllTypesOneOf) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *AllTypesOneOf") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *AllTypesOneOf but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *AllTypesOneOf but is not nil && this == nil") + } + if that1.TestOneof == nil { + if this.TestOneof != nil { + return fmt.Errorf("this.TestOneof != nil && that1.TestOneof == nil") + } + } else if this.TestOneof == nil { + return fmt.Errorf("this.TestOneof == nil && that1.TestOneof != nil") + } else if err := this.TestOneof.VerboseEqual(that1.TestOneof); err != nil { + return err + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *AllTypesOneOf_Field1) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*AllTypesOneOf_Field1) + if !ok { + that2, ok := that.(AllTypesOneOf_Field1) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *AllTypesOneOf_Field1") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *AllTypesOneOf_Field1 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *AllTypesOneOf_Field1 but is not nil && this == nil") + } + if this.Field1 != that1.Field1 { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) + } + return nil +} +func (this *AllTypesOneOf_Field2) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*AllTypesOneOf_Field2) + if !ok { + that2, ok := that.(AllTypesOneOf_Field2) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *AllTypesOneOf_Field2") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *AllTypesOneOf_Field2 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *AllTypesOneOf_Field2 but is not nil && this == nil") + } + if this.Field2 != that1.Field2 { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) + } + return nil +} +func (this *AllTypesOneOf_Field3) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*AllTypesOneOf_Field3) + if !ok { + that2, ok := that.(AllTypesOneOf_Field3) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *AllTypesOneOf_Field3") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *AllTypesOneOf_Field3 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *AllTypesOneOf_Field3 but is not nil && this == nil") + } + if this.Field3 != that1.Field3 { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", this.Field3, that1.Field3) + } + return nil +} +func (this *AllTypesOneOf_Field4) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*AllTypesOneOf_Field4) + if !ok { + that2, ok := that.(AllTypesOneOf_Field4) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *AllTypesOneOf_Field4") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *AllTypesOneOf_Field4 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *AllTypesOneOf_Field4 but is not nil && this == nil") + } + if this.Field4 != that1.Field4 { + return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", this.Field4, that1.Field4) + } + return nil +} +func (this *AllTypesOneOf_Field5) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*AllTypesOneOf_Field5) + if !ok { + that2, ok := that.(AllTypesOneOf_Field5) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *AllTypesOneOf_Field5") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *AllTypesOneOf_Field5 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *AllTypesOneOf_Field5 but is not nil && this == nil") + } + if this.Field5 != that1.Field5 { + return fmt.Errorf("Field5 this(%v) Not Equal that(%v)", this.Field5, that1.Field5) + } + return nil +} +func (this *AllTypesOneOf_Field6) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*AllTypesOneOf_Field6) + if !ok { + that2, ok := that.(AllTypesOneOf_Field6) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *AllTypesOneOf_Field6") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *AllTypesOneOf_Field6 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *AllTypesOneOf_Field6 but is not nil && this == nil") + } + if this.Field6 != that1.Field6 { + return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", this.Field6, that1.Field6) + } + return nil +} +func (this *AllTypesOneOf_Field7) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*AllTypesOneOf_Field7) + if !ok { + that2, ok := that.(AllTypesOneOf_Field7) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *AllTypesOneOf_Field7") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *AllTypesOneOf_Field7 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *AllTypesOneOf_Field7 but is not nil && this == nil") + } + if this.Field7 != that1.Field7 { + return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", this.Field7, that1.Field7) + } + return nil +} +func (this *AllTypesOneOf_Field8) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*AllTypesOneOf_Field8) + if !ok { + that2, ok := that.(AllTypesOneOf_Field8) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *AllTypesOneOf_Field8") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *AllTypesOneOf_Field8 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *AllTypesOneOf_Field8 but is not nil && this == nil") + } + if this.Field8 != that1.Field8 { + return fmt.Errorf("Field8 this(%v) Not Equal that(%v)", this.Field8, that1.Field8) + } + return nil +} +func (this *AllTypesOneOf_Field9) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*AllTypesOneOf_Field9) + if !ok { + that2, ok := that.(AllTypesOneOf_Field9) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *AllTypesOneOf_Field9") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *AllTypesOneOf_Field9 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *AllTypesOneOf_Field9 but is not nil && this == nil") + } + if this.Field9 != that1.Field9 { + return fmt.Errorf("Field9 this(%v) Not Equal that(%v)", this.Field9, that1.Field9) + } + return nil +} +func (this *AllTypesOneOf_Field10) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*AllTypesOneOf_Field10) + if !ok { + that2, ok := that.(AllTypesOneOf_Field10) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *AllTypesOneOf_Field10") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *AllTypesOneOf_Field10 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *AllTypesOneOf_Field10 but is not nil && this == nil") + } + if this.Field10 != that1.Field10 { + return fmt.Errorf("Field10 this(%v) Not Equal that(%v)", this.Field10, that1.Field10) + } + return nil +} +func (this *AllTypesOneOf_Field11) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*AllTypesOneOf_Field11) + if !ok { + that2, ok := that.(AllTypesOneOf_Field11) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *AllTypesOneOf_Field11") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *AllTypesOneOf_Field11 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *AllTypesOneOf_Field11 but is not nil && this == nil") + } + if this.Field11 != that1.Field11 { + return fmt.Errorf("Field11 this(%v) Not Equal that(%v)", this.Field11, that1.Field11) + } + return nil +} +func (this *AllTypesOneOf_Field12) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*AllTypesOneOf_Field12) + if !ok { + that2, ok := that.(AllTypesOneOf_Field12) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *AllTypesOneOf_Field12") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *AllTypesOneOf_Field12 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *AllTypesOneOf_Field12 but is not nil && this == nil") + } + if this.Field12 != that1.Field12 { + return fmt.Errorf("Field12 this(%v) Not Equal that(%v)", this.Field12, that1.Field12) + } + return nil +} +func (this *AllTypesOneOf_Field13) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*AllTypesOneOf_Field13) + if !ok { + that2, ok := that.(AllTypesOneOf_Field13) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *AllTypesOneOf_Field13") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *AllTypesOneOf_Field13 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *AllTypesOneOf_Field13 but is not nil && this == nil") + } + if this.Field13 != that1.Field13 { + return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", this.Field13, that1.Field13) + } + return nil +} +func (this *AllTypesOneOf_Field14) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*AllTypesOneOf_Field14) + if !ok { + that2, ok := that.(AllTypesOneOf_Field14) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *AllTypesOneOf_Field14") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *AllTypesOneOf_Field14 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *AllTypesOneOf_Field14 but is not nil && this == nil") + } + if this.Field14 != that1.Field14 { + return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", this.Field14, that1.Field14) + } + return nil +} +func (this *AllTypesOneOf_Field15) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*AllTypesOneOf_Field15) + if !ok { + that2, ok := that.(AllTypesOneOf_Field15) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *AllTypesOneOf_Field15") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *AllTypesOneOf_Field15 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *AllTypesOneOf_Field15 but is not nil && this == nil") + } + if !bytes.Equal(this.Field15, that1.Field15) { + return fmt.Errorf("Field15 this(%v) Not Equal that(%v)", this.Field15, that1.Field15) + } + return nil +} +func (this *AllTypesOneOf_SubMessage) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*AllTypesOneOf_SubMessage) + if !ok { + that2, ok := that.(AllTypesOneOf_SubMessage) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *AllTypesOneOf_SubMessage") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *AllTypesOneOf_SubMessage but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *AllTypesOneOf_SubMessage but is not nil && this == nil") + } + if !this.SubMessage.Equal(that1.SubMessage) { + return fmt.Errorf("SubMessage this(%v) Not Equal that(%v)", this.SubMessage, that1.SubMessage) + } + return nil +} +func (this *AllTypesOneOf) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*AllTypesOneOf) + if !ok { + that2, ok := that.(AllTypesOneOf) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + if this == nil { + return true + } + return false + } else if this == nil { + return false + } + if that1.TestOneof == nil { + if this.TestOneof != nil { + return false + } + } else if this.TestOneof == nil { + return false + } else if !this.TestOneof.Equal(that1.TestOneof) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *AllTypesOneOf_Field1) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*AllTypesOneOf_Field1) + if !ok { + that2, ok := that.(AllTypesOneOf_Field1) + 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.Field1 != that1.Field1 { + return false + } + return true +} +func (this *AllTypesOneOf_Field2) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*AllTypesOneOf_Field2) + if !ok { + that2, ok := that.(AllTypesOneOf_Field2) + 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.Field2 != that1.Field2 { + return false + } + return true +} +func (this *AllTypesOneOf_Field3) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*AllTypesOneOf_Field3) + if !ok { + that2, ok := that.(AllTypesOneOf_Field3) + 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.Field3 != that1.Field3 { + return false + } + return true +} +func (this *AllTypesOneOf_Field4) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*AllTypesOneOf_Field4) + if !ok { + that2, ok := that.(AllTypesOneOf_Field4) + 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.Field4 != that1.Field4 { + return false + } + return true +} +func (this *AllTypesOneOf_Field5) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*AllTypesOneOf_Field5) + if !ok { + that2, ok := that.(AllTypesOneOf_Field5) + 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.Field5 != that1.Field5 { + return false + } + return true +} +func (this *AllTypesOneOf_Field6) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*AllTypesOneOf_Field6) + if !ok { + that2, ok := that.(AllTypesOneOf_Field6) + 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.Field6 != that1.Field6 { + return false + } + return true +} +func (this *AllTypesOneOf_Field7) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*AllTypesOneOf_Field7) + if !ok { + that2, ok := that.(AllTypesOneOf_Field7) + 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.Field7 != that1.Field7 { + return false + } + return true +} +func (this *AllTypesOneOf_Field8) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*AllTypesOneOf_Field8) + if !ok { + that2, ok := that.(AllTypesOneOf_Field8) + 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.Field8 != that1.Field8 { + return false + } + return true +} +func (this *AllTypesOneOf_Field9) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*AllTypesOneOf_Field9) + if !ok { + that2, ok := that.(AllTypesOneOf_Field9) + 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.Field9 != that1.Field9 { + return false + } + return true +} +func (this *AllTypesOneOf_Field10) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*AllTypesOneOf_Field10) + if !ok { + that2, ok := that.(AllTypesOneOf_Field10) + 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.Field10 != that1.Field10 { + return false + } + return true +} +func (this *AllTypesOneOf_Field11) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*AllTypesOneOf_Field11) + if !ok { + that2, ok := that.(AllTypesOneOf_Field11) + 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.Field11 != that1.Field11 { + return false + } + return true +} +func (this *AllTypesOneOf_Field12) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*AllTypesOneOf_Field12) + if !ok { + that2, ok := that.(AllTypesOneOf_Field12) + 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.Field12 != that1.Field12 { + return false + } + return true +} +func (this *AllTypesOneOf_Field13) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*AllTypesOneOf_Field13) + if !ok { + that2, ok := that.(AllTypesOneOf_Field13) + 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.Field13 != that1.Field13 { + return false + } + return true +} +func (this *AllTypesOneOf_Field14) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*AllTypesOneOf_Field14) + if !ok { + that2, ok := that.(AllTypesOneOf_Field14) + 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.Field14 != that1.Field14 { + return false + } + return true +} +func (this *AllTypesOneOf_Field15) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*AllTypesOneOf_Field15) + if !ok { + that2, ok := that.(AllTypesOneOf_Field15) + 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.Field15, that1.Field15) { + return false + } + return true +} +func (this *AllTypesOneOf_SubMessage) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*AllTypesOneOf_SubMessage) + if !ok { + that2, ok := that.(AllTypesOneOf_SubMessage) + 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.SubMessage.Equal(that1.SubMessage) { + return false + } + return true +} +func (this *TwoOneofs) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*TwoOneofs) + if !ok { + that2, ok := that.(TwoOneofs) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *TwoOneofs") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *TwoOneofs but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *TwoOneofs but is not nil && this == nil") + } + if that1.One == nil { + if this.One != nil { + return fmt.Errorf("this.One != nil && that1.One == nil") + } + } else if this.One == nil { + return fmt.Errorf("this.One == nil && that1.One != nil") + } else if err := this.One.VerboseEqual(that1.One); err != nil { + return err + } + if that1.Two == nil { + if this.Two != nil { + return fmt.Errorf("this.Two != nil && that1.Two == nil") + } + } else if this.Two == nil { + return fmt.Errorf("this.Two == nil && that1.Two != nil") + } else if err := this.Two.VerboseEqual(that1.Two); err != nil { + return err + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *TwoOneofs_Field1) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*TwoOneofs_Field1) + if !ok { + that2, ok := that.(TwoOneofs_Field1) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *TwoOneofs_Field1") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *TwoOneofs_Field1 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *TwoOneofs_Field1 but is not nil && this == nil") + } + if this.Field1 != that1.Field1 { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) + } + return nil +} +func (this *TwoOneofs_Field2) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*TwoOneofs_Field2) + if !ok { + that2, ok := that.(TwoOneofs_Field2) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *TwoOneofs_Field2") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *TwoOneofs_Field2 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *TwoOneofs_Field2 but is not nil && this == nil") + } + if this.Field2 != that1.Field2 { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) + } + return nil +} +func (this *TwoOneofs_Field3) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*TwoOneofs_Field3) + if !ok { + that2, ok := that.(TwoOneofs_Field3) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *TwoOneofs_Field3") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *TwoOneofs_Field3 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *TwoOneofs_Field3 but is not nil && this == nil") + } + if this.Field3 != that1.Field3 { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", this.Field3, that1.Field3) + } + return nil +} +func (this *TwoOneofs_Field34) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*TwoOneofs_Field34) + if !ok { + that2, ok := that.(TwoOneofs_Field34) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *TwoOneofs_Field34") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *TwoOneofs_Field34 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *TwoOneofs_Field34 but is not nil && this == nil") + } + if this.Field34 != that1.Field34 { + return fmt.Errorf("Field34 this(%v) Not Equal that(%v)", this.Field34, that1.Field34) + } + return nil +} +func (this *TwoOneofs_Field35) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*TwoOneofs_Field35) + if !ok { + that2, ok := that.(TwoOneofs_Field35) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *TwoOneofs_Field35") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *TwoOneofs_Field35 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *TwoOneofs_Field35 but is not nil && this == nil") + } + if !bytes.Equal(this.Field35, that1.Field35) { + return fmt.Errorf("Field35 this(%v) Not Equal that(%v)", this.Field35, that1.Field35) + } + return nil +} +func (this *TwoOneofs_SubMessage2) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*TwoOneofs_SubMessage2) + if !ok { + that2, ok := that.(TwoOneofs_SubMessage2) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *TwoOneofs_SubMessage2") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *TwoOneofs_SubMessage2 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *TwoOneofs_SubMessage2 but is not nil && this == nil") + } + if !this.SubMessage2.Equal(that1.SubMessage2) { + return fmt.Errorf("SubMessage2 this(%v) Not Equal that(%v)", this.SubMessage2, that1.SubMessage2) + } + return nil +} +func (this *TwoOneofs) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*TwoOneofs) + if !ok { + that2, ok := that.(TwoOneofs) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + if this == nil { + return true + } + return false + } else if this == nil { + return false + } + if that1.One == nil { + if this.One != nil { + return false + } + } else if this.One == nil { + return false + } else if !this.One.Equal(that1.One) { + return false + } + if that1.Two == nil { + if this.Two != nil { + return false + } + } else if this.Two == nil { + return false + } else if !this.Two.Equal(that1.Two) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *TwoOneofs_Field1) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*TwoOneofs_Field1) + if !ok { + that2, ok := that.(TwoOneofs_Field1) + 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.Field1 != that1.Field1 { + return false + } + return true +} +func (this *TwoOneofs_Field2) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*TwoOneofs_Field2) + if !ok { + that2, ok := that.(TwoOneofs_Field2) + 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.Field2 != that1.Field2 { + return false + } + return true +} +func (this *TwoOneofs_Field3) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*TwoOneofs_Field3) + if !ok { + that2, ok := that.(TwoOneofs_Field3) + 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.Field3 != that1.Field3 { + return false + } + return true +} +func (this *TwoOneofs_Field34) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*TwoOneofs_Field34) + if !ok { + that2, ok := that.(TwoOneofs_Field34) + 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.Field34 != that1.Field34 { + return false + } + return true +} +func (this *TwoOneofs_Field35) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*TwoOneofs_Field35) + if !ok { + that2, ok := that.(TwoOneofs_Field35) + 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.Field35, that1.Field35) { + return false + } + return true +} +func (this *TwoOneofs_SubMessage2) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*TwoOneofs_SubMessage2) + if !ok { + that2, ok := that.(TwoOneofs_SubMessage2) + 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.SubMessage2.Equal(that1.SubMessage2) { + return false + } + return true +} +func (this *CustomOneof) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*CustomOneof) + if !ok { + that2, ok := that.(CustomOneof) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *CustomOneof") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *CustomOneof but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *CustomOneof but is not nil && this == nil") + } + if that1.Custom == nil { + if this.Custom != nil { + return fmt.Errorf("this.Custom != nil && that1.Custom == nil") + } + } else if this.Custom == nil { + return fmt.Errorf("this.Custom == nil && that1.Custom != nil") + } else if err := this.Custom.VerboseEqual(that1.Custom); err != nil { + return err + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *CustomOneof_Stringy) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*CustomOneof_Stringy) + if !ok { + that2, ok := that.(CustomOneof_Stringy) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *CustomOneof_Stringy") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *CustomOneof_Stringy but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *CustomOneof_Stringy but is not nil && this == nil") + } + if this.Stringy != that1.Stringy { + return fmt.Errorf("Stringy this(%v) Not Equal that(%v)", this.Stringy, that1.Stringy) + } + return nil +} +func (this *CustomOneof_CustomType) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*CustomOneof_CustomType) + if !ok { + that2, ok := that.(CustomOneof_CustomType) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *CustomOneof_CustomType") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *CustomOneof_CustomType but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *CustomOneof_CustomType but is not nil && this == nil") + } + if !this.CustomType.Equal(that1.CustomType) { + return fmt.Errorf("CustomType this(%v) Not Equal that(%v)", this.CustomType, that1.CustomType) + } + return nil +} +func (this *CustomOneof_CastType) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*CustomOneof_CastType) + if !ok { + that2, ok := that.(CustomOneof_CastType) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *CustomOneof_CastType") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *CustomOneof_CastType but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *CustomOneof_CastType but is not nil && this == nil") + } + if this.CastType != that1.CastType { + return fmt.Errorf("CastType this(%v) Not Equal that(%v)", this.CastType, that1.CastType) + } + return nil +} +func (this *CustomOneof_MyCustomName) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*CustomOneof_MyCustomName) + if !ok { + that2, ok := that.(CustomOneof_MyCustomName) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *CustomOneof_MyCustomName") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *CustomOneof_MyCustomName but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *CustomOneof_MyCustomName but is not nil && this == nil") + } + if this.MyCustomName != that1.MyCustomName { + return fmt.Errorf("MyCustomName this(%v) Not Equal that(%v)", this.MyCustomName, that1.MyCustomName) + } + return nil +} +func (this *CustomOneof) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*CustomOneof) + if !ok { + that2, ok := that.(CustomOneof) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + if this == nil { + return true + } + return false + } else if this == nil { + return false + } + if that1.Custom == nil { + if this.Custom != nil { + return false + } + } else if this.Custom == nil { + return false + } else if !this.Custom.Equal(that1.Custom) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *CustomOneof_Stringy) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*CustomOneof_Stringy) + if !ok { + that2, ok := that.(CustomOneof_Stringy) + 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.Stringy != that1.Stringy { + return false + } + return true +} +func (this *CustomOneof_CustomType) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*CustomOneof_CustomType) + if !ok { + that2, ok := that.(CustomOneof_CustomType) + 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.CustomType.Equal(that1.CustomType) { + return false + } + return true +} +func (this *CustomOneof_CastType) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*CustomOneof_CastType) + if !ok { + that2, ok := that.(CustomOneof_CastType) + 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.CastType != that1.CastType { + return false + } + return true +} +func (this *CustomOneof_MyCustomName) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*CustomOneof_MyCustomName) + if !ok { + that2, ok := that.(CustomOneof_MyCustomName) + 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.MyCustomName != that1.MyCustomName { + return false + } + return true +} +func (this *Subby) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&one.Subby{") + if this.Sub != nil { + s = append(s, "Sub: "+valueToGoStringOne(this.Sub, "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 *AllTypesOneOf) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 20) + s = append(s, "&one.AllTypesOneOf{") + if this.TestOneof != nil { + s = append(s, "TestOneof: "+fmt.Sprintf("%#v", this.TestOneof)+",\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 *AllTypesOneOf_Field1) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.AllTypesOneOf_Field1{` + + `Field1:` + fmt.Sprintf("%#v", this.Field1) + `}`}, ", ") + return s +} +func (this *AllTypesOneOf_Field2) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.AllTypesOneOf_Field2{` + + `Field2:` + fmt.Sprintf("%#v", this.Field2) + `}`}, ", ") + return s +} +func (this *AllTypesOneOf_Field3) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.AllTypesOneOf_Field3{` + + `Field3:` + fmt.Sprintf("%#v", this.Field3) + `}`}, ", ") + return s +} +func (this *AllTypesOneOf_Field4) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.AllTypesOneOf_Field4{` + + `Field4:` + fmt.Sprintf("%#v", this.Field4) + `}`}, ", ") + return s +} +func (this *AllTypesOneOf_Field5) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.AllTypesOneOf_Field5{` + + `Field5:` + fmt.Sprintf("%#v", this.Field5) + `}`}, ", ") + return s +} +func (this *AllTypesOneOf_Field6) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.AllTypesOneOf_Field6{` + + `Field6:` + fmt.Sprintf("%#v", this.Field6) + `}`}, ", ") + return s +} +func (this *AllTypesOneOf_Field7) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.AllTypesOneOf_Field7{` + + `Field7:` + fmt.Sprintf("%#v", this.Field7) + `}`}, ", ") + return s +} +func (this *AllTypesOneOf_Field8) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.AllTypesOneOf_Field8{` + + `Field8:` + fmt.Sprintf("%#v", this.Field8) + `}`}, ", ") + return s +} +func (this *AllTypesOneOf_Field9) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.AllTypesOneOf_Field9{` + + `Field9:` + fmt.Sprintf("%#v", this.Field9) + `}`}, ", ") + return s +} +func (this *AllTypesOneOf_Field10) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.AllTypesOneOf_Field10{` + + `Field10:` + fmt.Sprintf("%#v", this.Field10) + `}`}, ", ") + return s +} +func (this *AllTypesOneOf_Field11) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.AllTypesOneOf_Field11{` + + `Field11:` + fmt.Sprintf("%#v", this.Field11) + `}`}, ", ") + return s +} +func (this *AllTypesOneOf_Field12) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.AllTypesOneOf_Field12{` + + `Field12:` + fmt.Sprintf("%#v", this.Field12) + `}`}, ", ") + return s +} +func (this *AllTypesOneOf_Field13) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.AllTypesOneOf_Field13{` + + `Field13:` + fmt.Sprintf("%#v", this.Field13) + `}`}, ", ") + return s +} +func (this *AllTypesOneOf_Field14) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.AllTypesOneOf_Field14{` + + `Field14:` + fmt.Sprintf("%#v", this.Field14) + `}`}, ", ") + return s +} +func (this *AllTypesOneOf_Field15) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.AllTypesOneOf_Field15{` + + `Field15:` + fmt.Sprintf("%#v", this.Field15) + `}`}, ", ") + return s +} +func (this *AllTypesOneOf_SubMessage) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.AllTypesOneOf_SubMessage{` + + `SubMessage:` + fmt.Sprintf("%#v", this.SubMessage) + `}`}, ", ") + return s +} +func (this *TwoOneofs) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 10) + s = append(s, "&one.TwoOneofs{") + if this.One != nil { + s = append(s, "One: "+fmt.Sprintf("%#v", this.One)+",\n") + } + if this.Two != nil { + s = append(s, "Two: "+fmt.Sprintf("%#v", this.Two)+",\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 *TwoOneofs_Field1) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.TwoOneofs_Field1{` + + `Field1:` + fmt.Sprintf("%#v", this.Field1) + `}`}, ", ") + return s +} +func (this *TwoOneofs_Field2) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.TwoOneofs_Field2{` + + `Field2:` + fmt.Sprintf("%#v", this.Field2) + `}`}, ", ") + return s +} +func (this *TwoOneofs_Field3) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.TwoOneofs_Field3{` + + `Field3:` + fmt.Sprintf("%#v", this.Field3) + `}`}, ", ") + return s +} +func (this *TwoOneofs_Field34) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.TwoOneofs_Field34{` + + `Field34:` + fmt.Sprintf("%#v", this.Field34) + `}`}, ", ") + return s +} +func (this *TwoOneofs_Field35) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.TwoOneofs_Field35{` + + `Field35:` + fmt.Sprintf("%#v", this.Field35) + `}`}, ", ") + return s +} +func (this *TwoOneofs_SubMessage2) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.TwoOneofs_SubMessage2{` + + `SubMessage2:` + fmt.Sprintf("%#v", this.SubMessage2) + `}`}, ", ") + return s +} +func (this *CustomOneof) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 8) + s = append(s, "&one.CustomOneof{") + if this.Custom != nil { + s = append(s, "Custom: "+fmt.Sprintf("%#v", this.Custom)+",\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 *CustomOneof_Stringy) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.CustomOneof_Stringy{` + + `Stringy:` + fmt.Sprintf("%#v", this.Stringy) + `}`}, ", ") + return s +} +func (this *CustomOneof_CustomType) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.CustomOneof_CustomType{` + + `CustomType:` + fmt.Sprintf("%#v", this.CustomType) + `}`}, ", ") + return s +} +func (this *CustomOneof_CastType) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.CustomOneof_CastType{` + + `CastType:` + fmt.Sprintf("%#v", this.CastType) + `}`}, ", ") + return s +} +func (this *CustomOneof_MyCustomName) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.CustomOneof_MyCustomName{` + + `MyCustomName:` + fmt.Sprintf("%#v", this.MyCustomName) + `}`}, ", ") + return s +} +func valueToGoStringOne(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 extensionToGoStringOne(e map[int32]github_com_gogo_protobuf_proto.Extension) string { + if e == nil { + return "nil" + } + s := "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 +} +func (m *Subby) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *Subby) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Sub != nil { + data[i] = 0xa + i++ + i = encodeVarintOne(data, i, uint64(len(*m.Sub))) + i += copy(data[i:], *m.Sub) + } + if m.XXX_unrecognized != nil { + i += copy(data[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *AllTypesOneOf) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *AllTypesOneOf) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.TestOneof != nil { + nn1, err := m.TestOneof.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += nn1 + } + if m.XXX_unrecognized != nil { + i += copy(data[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *AllTypesOneOf_Field1) MarshalTo(data []byte) (int, error) { + i := 0 + data[i] = 0x9 + i++ + i = encodeFixed64One(data, i, uint64(math.Float64bits(float64(m.Field1)))) + return i, nil +} +func (m *AllTypesOneOf_Field2) MarshalTo(data []byte) (int, error) { + i := 0 + data[i] = 0x15 + i++ + i = encodeFixed32One(data, i, uint32(math.Float32bits(float32(m.Field2)))) + return i, nil +} +func (m *AllTypesOneOf_Field3) MarshalTo(data []byte) (int, error) { + i := 0 + data[i] = 0x18 + i++ + i = encodeVarintOne(data, i, uint64(m.Field3)) + return i, nil +} +func (m *AllTypesOneOf_Field4) MarshalTo(data []byte) (int, error) { + i := 0 + data[i] = 0x20 + i++ + i = encodeVarintOne(data, i, uint64(m.Field4)) + return i, nil +} +func (m *AllTypesOneOf_Field5) MarshalTo(data []byte) (int, error) { + i := 0 + data[i] = 0x28 + i++ + i = encodeVarintOne(data, i, uint64(m.Field5)) + return i, nil +} +func (m *AllTypesOneOf_Field6) MarshalTo(data []byte) (int, error) { + i := 0 + data[i] = 0x30 + i++ + i = encodeVarintOne(data, i, uint64(m.Field6)) + return i, nil +} +func (m *AllTypesOneOf_Field7) MarshalTo(data []byte) (int, error) { + i := 0 + data[i] = 0x38 + i++ + i = encodeVarintOne(data, i, uint64((uint32(m.Field7)<<1)^uint32((m.Field7>>31)))) + return i, nil +} +func (m *AllTypesOneOf_Field8) MarshalTo(data []byte) (int, error) { + i := 0 + data[i] = 0x40 + i++ + i = encodeVarintOne(data, i, uint64((uint64(m.Field8)<<1)^uint64((m.Field8>>63)))) + return i, nil +} +func (m *AllTypesOneOf_Field9) MarshalTo(data []byte) (int, error) { + i := 0 + data[i] = 0x4d + i++ + i = encodeFixed32One(data, i, uint32(m.Field9)) + return i, nil +} +func (m *AllTypesOneOf_Field10) MarshalTo(data []byte) (int, error) { + i := 0 + data[i] = 0x55 + i++ + i = encodeFixed32One(data, i, uint32(m.Field10)) + return i, nil +} +func (m *AllTypesOneOf_Field11) MarshalTo(data []byte) (int, error) { + i := 0 + data[i] = 0x59 + i++ + i = encodeFixed64One(data, i, uint64(m.Field11)) + return i, nil +} +func (m *AllTypesOneOf_Field12) MarshalTo(data []byte) (int, error) { + i := 0 + data[i] = 0x61 + i++ + i = encodeFixed64One(data, i, uint64(m.Field12)) + return i, nil +} +func (m *AllTypesOneOf_Field13) MarshalTo(data []byte) (int, error) { + i := 0 + data[i] = 0x68 + i++ + if m.Field13 { + data[i] = 1 + } else { + data[i] = 0 + } + i++ + return i, nil +} +func (m *AllTypesOneOf_Field14) MarshalTo(data []byte) (int, error) { + i := 0 + data[i] = 0x72 + i++ + i = encodeVarintOne(data, i, uint64(len(m.Field14))) + i += copy(data[i:], m.Field14) + return i, nil +} +func (m *AllTypesOneOf_Field15) MarshalTo(data []byte) (int, error) { + i := 0 + if m.Field15 != nil { + data[i] = 0x7a + i++ + i = encodeVarintOne(data, i, uint64(len(m.Field15))) + i += copy(data[i:], m.Field15) + } + return i, nil +} +func (m *AllTypesOneOf_SubMessage) MarshalTo(data []byte) (int, error) { + i := 0 + if m.SubMessage != nil { + data[i] = 0x82 + i++ + data[i] = 0x1 + i++ + i = encodeVarintOne(data, i, uint64(m.SubMessage.Size())) + n2, err := m.SubMessage.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n2 + } + return i, nil +} +func (m *TwoOneofs) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *TwoOneofs) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.One != nil { + nn3, err := m.One.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += nn3 + } + if m.Two != nil { + nn4, err := m.Two.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += nn4 + } + if m.XXX_unrecognized != nil { + i += copy(data[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *TwoOneofs_Field1) MarshalTo(data []byte) (int, error) { + i := 0 + data[i] = 0x9 + i++ + i = encodeFixed64One(data, i, uint64(math.Float64bits(float64(m.Field1)))) + return i, nil +} +func (m *TwoOneofs_Field2) MarshalTo(data []byte) (int, error) { + i := 0 + data[i] = 0x15 + i++ + i = encodeFixed32One(data, i, uint32(math.Float32bits(float32(m.Field2)))) + return i, nil +} +func (m *TwoOneofs_Field3) MarshalTo(data []byte) (int, error) { + i := 0 + data[i] = 0x18 + i++ + i = encodeVarintOne(data, i, uint64(m.Field3)) + return i, nil +} +func (m *TwoOneofs_Field34) MarshalTo(data []byte) (int, error) { + i := 0 + data[i] = 0x92 + i++ + data[i] = 0x2 + i++ + i = encodeVarintOne(data, i, uint64(len(m.Field34))) + i += copy(data[i:], m.Field34) + return i, nil +} +func (m *TwoOneofs_Field35) MarshalTo(data []byte) (int, error) { + i := 0 + if m.Field35 != nil { + data[i] = 0x9a + i++ + data[i] = 0x2 + i++ + i = encodeVarintOne(data, i, uint64(len(m.Field35))) + i += copy(data[i:], m.Field35) + } + return i, nil +} +func (m *TwoOneofs_SubMessage2) MarshalTo(data []byte) (int, error) { + i := 0 + if m.SubMessage2 != nil { + data[i] = 0xa2 + i++ + data[i] = 0x2 + i++ + i = encodeVarintOne(data, i, uint64(m.SubMessage2.Size())) + n5, err := m.SubMessage2.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n5 + } + return i, nil +} +func (m *CustomOneof) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *CustomOneof) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Custom != nil { + nn6, err := m.Custom.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += nn6 + } + if m.XXX_unrecognized != nil { + i += copy(data[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *CustomOneof_Stringy) MarshalTo(data []byte) (int, error) { + i := 0 + data[i] = 0x92 + i++ + data[i] = 0x2 + i++ + i = encodeVarintOne(data, i, uint64(len(m.Stringy))) + i += copy(data[i:], m.Stringy) + return i, nil +} +func (m *CustomOneof_CustomType) MarshalTo(data []byte) (int, error) { + i := 0 + data[i] = 0x9a + i++ + data[i] = 0x2 + i++ + i = encodeVarintOne(data, i, uint64(m.CustomType.Size())) + n7, err := m.CustomType.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n7 + return i, nil +} +func (m *CustomOneof_CastType) MarshalTo(data []byte) (int, error) { + i := 0 + data[i] = 0xa0 + i++ + data[i] = 0x2 + i++ + i = encodeVarintOne(data, i, uint64(m.CastType)) + return i, nil +} +func (m *CustomOneof_MyCustomName) MarshalTo(data []byte) (int, error) { + i := 0 + data[i] = 0xa8 + i++ + data[i] = 0x2 + i++ + i = encodeVarintOne(data, i, uint64(m.MyCustomName)) + return i, nil +} +func encodeFixed64One(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 encodeFixed32One(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 encodeVarintOne(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 NewPopulatedSubby(r randyOne, easy bool) *Subby { + this := &Subby{} + if r.Intn(10) != 0 { + v1 := randStringOne(r) + this.Sub = &v1 + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedOne(r, 2) + } + return this +} + +func NewPopulatedAllTypesOneOf(r randyOne, easy bool) *AllTypesOneOf { + this := &AllTypesOneOf{} + oneofNumber_TestOneof := []int32{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}[r.Intn(16)] + switch oneofNumber_TestOneof { + case 1: + this.TestOneof = NewPopulatedAllTypesOneOf_Field1(r, easy) + case 2: + this.TestOneof = NewPopulatedAllTypesOneOf_Field2(r, easy) + case 3: + this.TestOneof = NewPopulatedAllTypesOneOf_Field3(r, easy) + case 4: + this.TestOneof = NewPopulatedAllTypesOneOf_Field4(r, easy) + case 5: + this.TestOneof = NewPopulatedAllTypesOneOf_Field5(r, easy) + case 6: + this.TestOneof = NewPopulatedAllTypesOneOf_Field6(r, easy) + case 7: + this.TestOneof = NewPopulatedAllTypesOneOf_Field7(r, easy) + case 8: + this.TestOneof = NewPopulatedAllTypesOneOf_Field8(r, easy) + case 9: + this.TestOneof = NewPopulatedAllTypesOneOf_Field9(r, easy) + case 10: + this.TestOneof = NewPopulatedAllTypesOneOf_Field10(r, easy) + case 11: + this.TestOneof = NewPopulatedAllTypesOneOf_Field11(r, easy) + case 12: + this.TestOneof = NewPopulatedAllTypesOneOf_Field12(r, easy) + case 13: + this.TestOneof = NewPopulatedAllTypesOneOf_Field13(r, easy) + case 14: + this.TestOneof = NewPopulatedAllTypesOneOf_Field14(r, easy) + case 15: + this.TestOneof = NewPopulatedAllTypesOneOf_Field15(r, easy) + case 16: + this.TestOneof = NewPopulatedAllTypesOneOf_SubMessage(r, easy) + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedOne(r, 17) + } + return this +} + +func NewPopulatedAllTypesOneOf_Field1(r randyOne, easy bool) *AllTypesOneOf_Field1 { + this := &AllTypesOneOf_Field1{} + this.Field1 = float64(r.Float64()) + if r.Intn(2) == 0 { + this.Field1 *= -1 + } + return this +} +func NewPopulatedAllTypesOneOf_Field2(r randyOne, easy bool) *AllTypesOneOf_Field2 { + this := &AllTypesOneOf_Field2{} + this.Field2 = float32(r.Float32()) + if r.Intn(2) == 0 { + this.Field2 *= -1 + } + return this +} +func NewPopulatedAllTypesOneOf_Field3(r randyOne, easy bool) *AllTypesOneOf_Field3 { + this := &AllTypesOneOf_Field3{} + this.Field3 = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Field3 *= -1 + } + return this +} +func NewPopulatedAllTypesOneOf_Field4(r randyOne, easy bool) *AllTypesOneOf_Field4 { + this := &AllTypesOneOf_Field4{} + this.Field4 = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Field4 *= -1 + } + return this +} +func NewPopulatedAllTypesOneOf_Field5(r randyOne, easy bool) *AllTypesOneOf_Field5 { + this := &AllTypesOneOf_Field5{} + this.Field5 = uint32(r.Uint32()) + return this +} +func NewPopulatedAllTypesOneOf_Field6(r randyOne, easy bool) *AllTypesOneOf_Field6 { + this := &AllTypesOneOf_Field6{} + this.Field6 = uint64(uint64(r.Uint32())) + return this +} +func NewPopulatedAllTypesOneOf_Field7(r randyOne, easy bool) *AllTypesOneOf_Field7 { + this := &AllTypesOneOf_Field7{} + this.Field7 = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Field7 *= -1 + } + return this +} +func NewPopulatedAllTypesOneOf_Field8(r randyOne, easy bool) *AllTypesOneOf_Field8 { + this := &AllTypesOneOf_Field8{} + this.Field8 = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Field8 *= -1 + } + return this +} +func NewPopulatedAllTypesOneOf_Field9(r randyOne, easy bool) *AllTypesOneOf_Field9 { + this := &AllTypesOneOf_Field9{} + this.Field9 = uint32(r.Uint32()) + return this +} +func NewPopulatedAllTypesOneOf_Field10(r randyOne, easy bool) *AllTypesOneOf_Field10 { + this := &AllTypesOneOf_Field10{} + this.Field10 = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Field10 *= -1 + } + return this +} +func NewPopulatedAllTypesOneOf_Field11(r randyOne, easy bool) *AllTypesOneOf_Field11 { + this := &AllTypesOneOf_Field11{} + this.Field11 = uint64(uint64(r.Uint32())) + return this +} +func NewPopulatedAllTypesOneOf_Field12(r randyOne, easy bool) *AllTypesOneOf_Field12 { + this := &AllTypesOneOf_Field12{} + this.Field12 = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Field12 *= -1 + } + return this +} +func NewPopulatedAllTypesOneOf_Field13(r randyOne, easy bool) *AllTypesOneOf_Field13 { + this := &AllTypesOneOf_Field13{} + this.Field13 = bool(bool(r.Intn(2) == 0)) + return this +} +func NewPopulatedAllTypesOneOf_Field14(r randyOne, easy bool) *AllTypesOneOf_Field14 { + this := &AllTypesOneOf_Field14{} + this.Field14 = randStringOne(r) + return this +} +func NewPopulatedAllTypesOneOf_Field15(r randyOne, easy bool) *AllTypesOneOf_Field15 { + this := &AllTypesOneOf_Field15{} + v2 := r.Intn(100) + this.Field15 = make([]byte, v2) + for i := 0; i < v2; i++ { + this.Field15[i] = byte(r.Intn(256)) + } + return this +} +func NewPopulatedAllTypesOneOf_SubMessage(r randyOne, easy bool) *AllTypesOneOf_SubMessage { + this := &AllTypesOneOf_SubMessage{} + this.SubMessage = NewPopulatedSubby(r, easy) + return this +} +func NewPopulatedTwoOneofs(r randyOne, easy bool) *TwoOneofs { + this := &TwoOneofs{} + oneofNumber_One := []int32{1, 2, 3}[r.Intn(3)] + switch oneofNumber_One { + case 1: + this.One = NewPopulatedTwoOneofs_Field1(r, easy) + case 2: + this.One = NewPopulatedTwoOneofs_Field2(r, easy) + case 3: + this.One = NewPopulatedTwoOneofs_Field3(r, easy) + } + oneofNumber_Two := []int32{34, 35, 36}[r.Intn(3)] + switch oneofNumber_Two { + case 34: + this.Two = NewPopulatedTwoOneofs_Field34(r, easy) + case 35: + this.Two = NewPopulatedTwoOneofs_Field35(r, easy) + case 36: + this.Two = NewPopulatedTwoOneofs_SubMessage2(r, easy) + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedOne(r, 37) + } + return this +} + +func NewPopulatedTwoOneofs_Field1(r randyOne, easy bool) *TwoOneofs_Field1 { + this := &TwoOneofs_Field1{} + this.Field1 = float64(r.Float64()) + if r.Intn(2) == 0 { + this.Field1 *= -1 + } + return this +} +func NewPopulatedTwoOneofs_Field2(r randyOne, easy bool) *TwoOneofs_Field2 { + this := &TwoOneofs_Field2{} + this.Field2 = float32(r.Float32()) + if r.Intn(2) == 0 { + this.Field2 *= -1 + } + return this +} +func NewPopulatedTwoOneofs_Field3(r randyOne, easy bool) *TwoOneofs_Field3 { + this := &TwoOneofs_Field3{} + this.Field3 = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Field3 *= -1 + } + return this +} +func NewPopulatedTwoOneofs_Field34(r randyOne, easy bool) *TwoOneofs_Field34 { + this := &TwoOneofs_Field34{} + this.Field34 = randStringOne(r) + return this +} +func NewPopulatedTwoOneofs_Field35(r randyOne, easy bool) *TwoOneofs_Field35 { + this := &TwoOneofs_Field35{} + v3 := r.Intn(100) + this.Field35 = make([]byte, v3) + for i := 0; i < v3; i++ { + this.Field35[i] = byte(r.Intn(256)) + } + return this +} +func NewPopulatedTwoOneofs_SubMessage2(r randyOne, easy bool) *TwoOneofs_SubMessage2 { + this := &TwoOneofs_SubMessage2{} + this.SubMessage2 = NewPopulatedSubby(r, easy) + return this +} +func NewPopulatedCustomOneof(r randyOne, easy bool) *CustomOneof { + this := &CustomOneof{} + oneofNumber_Custom := []int32{34, 35, 36, 37}[r.Intn(4)] + switch oneofNumber_Custom { + case 34: + this.Custom = NewPopulatedCustomOneof_Stringy(r, easy) + case 35: + this.Custom = NewPopulatedCustomOneof_CustomType(r, easy) + case 36: + this.Custom = NewPopulatedCustomOneof_CastType(r, easy) + case 37: + this.Custom = NewPopulatedCustomOneof_MyCustomName(r, easy) + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedOne(r, 38) + } + return this +} + +func NewPopulatedCustomOneof_Stringy(r randyOne, easy bool) *CustomOneof_Stringy { + this := &CustomOneof_Stringy{} + this.Stringy = randStringOne(r) + return this +} +func NewPopulatedCustomOneof_CustomType(r randyOne, easy bool) *CustomOneof_CustomType { + this := &CustomOneof_CustomType{} + v4 := github_com_gogo_protobuf_test_custom.NewPopulatedUint128(r) + this.CustomType = *v4 + return this +} +func NewPopulatedCustomOneof_CastType(r randyOne, easy bool) *CustomOneof_CastType { + this := &CustomOneof_CastType{} + this.CastType = github_com_gogo_protobuf_test_casttype.MyUint64Type(uint64(r.Uint32())) + return this +} +func NewPopulatedCustomOneof_MyCustomName(r randyOne, easy bool) *CustomOneof_MyCustomName { + this := &CustomOneof_MyCustomName{} + this.MyCustomName = int64(r.Int63()) + if r.Intn(2) == 0 { + this.MyCustomName *= -1 + } + return this +} + +type randyOne interface { + Float32() float32 + Float64() float64 + Int63() int64 + Int31() int32 + Uint32() uint32 + Intn(n int) int +} + +func randUTF8RuneOne(r randyOne) 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 randStringOne(r randyOne) string { + v5 := r.Intn(100) + tmps := make([]rune, v5) + for i := 0; i < v5; i++ { + tmps[i] = randUTF8RuneOne(r) + } + return string(tmps) +} +func randUnrecognizedOne(r randyOne, 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 = randFieldOne(data, r, fieldNumber, wire) + } + return data +} +func randFieldOne(data []byte, r randyOne, fieldNumber int, wire int) []byte { + key := uint32(fieldNumber)<<3 | uint32(wire) + switch wire { + case 0: + data = encodeVarintPopulateOne(data, uint64(key)) + v6 := r.Int63() + if r.Intn(2) == 0 { + v6 *= -1 + } + data = encodeVarintPopulateOne(data, uint64(v6)) + case 1: + data = encodeVarintPopulateOne(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 = encodeVarintPopulateOne(data, uint64(key)) + ll := r.Intn(100) + data = encodeVarintPopulateOne(data, uint64(ll)) + for j := 0; j < ll; j++ { + data = append(data, byte(r.Intn(256))) + } + default: + data = encodeVarintPopulateOne(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 encodeVarintPopulateOne(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 *Subby) Size() (n int) { + var l int + _ = l + if m.Sub != nil { + l = len(*m.Sub) + n += 1 + l + sovOne(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *AllTypesOneOf) Size() (n int) { + var l int + _ = l + if m.TestOneof != nil { + n += m.TestOneof.Size() + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *AllTypesOneOf_Field1) Size() (n int) { + var l int + _ = l + n += 9 + return n +} +func (m *AllTypesOneOf_Field2) Size() (n int) { + var l int + _ = l + n += 5 + return n +} +func (m *AllTypesOneOf_Field3) Size() (n int) { + var l int + _ = l + n += 1 + sovOne(uint64(m.Field3)) + return n +} +func (m *AllTypesOneOf_Field4) Size() (n int) { + var l int + _ = l + n += 1 + sovOne(uint64(m.Field4)) + return n +} +func (m *AllTypesOneOf_Field5) Size() (n int) { + var l int + _ = l + n += 1 + sovOne(uint64(m.Field5)) + return n +} +func (m *AllTypesOneOf_Field6) Size() (n int) { + var l int + _ = l + n += 1 + sovOne(uint64(m.Field6)) + return n +} +func (m *AllTypesOneOf_Field7) Size() (n int) { + var l int + _ = l + n += 1 + sozOne(uint64(m.Field7)) + return n +} +func (m *AllTypesOneOf_Field8) Size() (n int) { + var l int + _ = l + n += 1 + sozOne(uint64(m.Field8)) + return n +} +func (m *AllTypesOneOf_Field9) Size() (n int) { + var l int + _ = l + n += 5 + return n +} +func (m *AllTypesOneOf_Field10) Size() (n int) { + var l int + _ = l + n += 5 + return n +} +func (m *AllTypesOneOf_Field11) Size() (n int) { + var l int + _ = l + n += 9 + return n +} +func (m *AllTypesOneOf_Field12) Size() (n int) { + var l int + _ = l + n += 9 + return n +} +func (m *AllTypesOneOf_Field13) Size() (n int) { + var l int + _ = l + n += 2 + return n +} +func (m *AllTypesOneOf_Field14) Size() (n int) { + var l int + _ = l + l = len(m.Field14) + n += 1 + l + sovOne(uint64(l)) + return n +} +func (m *AllTypesOneOf_Field15) Size() (n int) { + var l int + _ = l + if m.Field15 != nil { + l = len(m.Field15) + n += 1 + l + sovOne(uint64(l)) + } + return n +} +func (m *AllTypesOneOf_SubMessage) Size() (n int) { + var l int + _ = l + if m.SubMessage != nil { + l = m.SubMessage.Size() + n += 2 + l + sovOne(uint64(l)) + } + return n +} +func (m *TwoOneofs) Size() (n int) { + var l int + _ = l + if m.One != nil { + n += m.One.Size() + } + if m.Two != nil { + n += m.Two.Size() + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *TwoOneofs_Field1) Size() (n int) { + var l int + _ = l + n += 9 + return n +} +func (m *TwoOneofs_Field2) Size() (n int) { + var l int + _ = l + n += 5 + return n +} +func (m *TwoOneofs_Field3) Size() (n int) { + var l int + _ = l + n += 1 + sovOne(uint64(m.Field3)) + return n +} +func (m *TwoOneofs_Field34) Size() (n int) { + var l int + _ = l + l = len(m.Field34) + n += 2 + l + sovOne(uint64(l)) + return n +} +func (m *TwoOneofs_Field35) Size() (n int) { + var l int + _ = l + if m.Field35 != nil { + l = len(m.Field35) + n += 2 + l + sovOne(uint64(l)) + } + return n +} +func (m *TwoOneofs_SubMessage2) Size() (n int) { + var l int + _ = l + if m.SubMessage2 != nil { + l = m.SubMessage2.Size() + n += 2 + l + sovOne(uint64(l)) + } + return n +} +func (m *CustomOneof) Size() (n int) { + var l int + _ = l + if m.Custom != nil { + n += m.Custom.Size() + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *CustomOneof_Stringy) Size() (n int) { + var l int + _ = l + l = len(m.Stringy) + n += 2 + l + sovOne(uint64(l)) + return n +} +func (m *CustomOneof_CustomType) Size() (n int) { + var l int + _ = l + l = m.CustomType.Size() + n += 2 + l + sovOne(uint64(l)) + return n +} +func (m *CustomOneof_CastType) Size() (n int) { + var l int + _ = l + n += 2 + sovOne(uint64(m.CastType)) + return n +} +func (m *CustomOneof_MyCustomName) Size() (n int) { + var l int + _ = l + n += 2 + sovOne(uint64(m.MyCustomName)) + return n +} + +func sovOne(x uint64) (n int) { + for { + n++ + x >>= 7 + if x == 0 { + break + } + } + return n +} +func sozOne(x uint64) (n int) { + return sovOne(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (this *Subby) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&Subby{`, + `Sub:` + valueToStringOne(this.Sub) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *AllTypesOneOf) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&AllTypesOneOf{`, + `TestOneof:` + fmt.Sprintf("%v", this.TestOneof) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *AllTypesOneOf_Field1) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&AllTypesOneOf_Field1{`, + `Field1:` + fmt.Sprintf("%v", this.Field1) + `,`, + `}`, + }, "") + return s +} +func (this *AllTypesOneOf_Field2) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&AllTypesOneOf_Field2{`, + `Field2:` + fmt.Sprintf("%v", this.Field2) + `,`, + `}`, + }, "") + return s +} +func (this *AllTypesOneOf_Field3) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&AllTypesOneOf_Field3{`, + `Field3:` + fmt.Sprintf("%v", this.Field3) + `,`, + `}`, + }, "") + return s +} +func (this *AllTypesOneOf_Field4) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&AllTypesOneOf_Field4{`, + `Field4:` + fmt.Sprintf("%v", this.Field4) + `,`, + `}`, + }, "") + return s +} +func (this *AllTypesOneOf_Field5) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&AllTypesOneOf_Field5{`, + `Field5:` + fmt.Sprintf("%v", this.Field5) + `,`, + `}`, + }, "") + return s +} +func (this *AllTypesOneOf_Field6) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&AllTypesOneOf_Field6{`, + `Field6:` + fmt.Sprintf("%v", this.Field6) + `,`, + `}`, + }, "") + return s +} +func (this *AllTypesOneOf_Field7) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&AllTypesOneOf_Field7{`, + `Field7:` + fmt.Sprintf("%v", this.Field7) + `,`, + `}`, + }, "") + return s +} +func (this *AllTypesOneOf_Field8) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&AllTypesOneOf_Field8{`, + `Field8:` + fmt.Sprintf("%v", this.Field8) + `,`, + `}`, + }, "") + return s +} +func (this *AllTypesOneOf_Field9) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&AllTypesOneOf_Field9{`, + `Field9:` + fmt.Sprintf("%v", this.Field9) + `,`, + `}`, + }, "") + return s +} +func (this *AllTypesOneOf_Field10) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&AllTypesOneOf_Field10{`, + `Field10:` + fmt.Sprintf("%v", this.Field10) + `,`, + `}`, + }, "") + return s +} +func (this *AllTypesOneOf_Field11) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&AllTypesOneOf_Field11{`, + `Field11:` + fmt.Sprintf("%v", this.Field11) + `,`, + `}`, + }, "") + return s +} +func (this *AllTypesOneOf_Field12) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&AllTypesOneOf_Field12{`, + `Field12:` + fmt.Sprintf("%v", this.Field12) + `,`, + `}`, + }, "") + return s +} +func (this *AllTypesOneOf_Field13) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&AllTypesOneOf_Field13{`, + `Field13:` + fmt.Sprintf("%v", this.Field13) + `,`, + `}`, + }, "") + return s +} +func (this *AllTypesOneOf_Field14) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&AllTypesOneOf_Field14{`, + `Field14:` + fmt.Sprintf("%v", this.Field14) + `,`, + `}`, + }, "") + return s +} +func (this *AllTypesOneOf_Field15) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&AllTypesOneOf_Field15{`, + `Field15:` + fmt.Sprintf("%v", this.Field15) + `,`, + `}`, + }, "") + return s +} +func (this *AllTypesOneOf_SubMessage) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&AllTypesOneOf_SubMessage{`, + `SubMessage:` + strings.Replace(fmt.Sprintf("%v", this.SubMessage), "Subby", "Subby", 1) + `,`, + `}`, + }, "") + return s +} +func (this *TwoOneofs) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&TwoOneofs{`, + `One:` + fmt.Sprintf("%v", this.One) + `,`, + `Two:` + fmt.Sprintf("%v", this.Two) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *TwoOneofs_Field1) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&TwoOneofs_Field1{`, + `Field1:` + fmt.Sprintf("%v", this.Field1) + `,`, + `}`, + }, "") + return s +} +func (this *TwoOneofs_Field2) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&TwoOneofs_Field2{`, + `Field2:` + fmt.Sprintf("%v", this.Field2) + `,`, + `}`, + }, "") + return s +} +func (this *TwoOneofs_Field3) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&TwoOneofs_Field3{`, + `Field3:` + fmt.Sprintf("%v", this.Field3) + `,`, + `}`, + }, "") + return s +} +func (this *TwoOneofs_Field34) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&TwoOneofs_Field34{`, + `Field34:` + fmt.Sprintf("%v", this.Field34) + `,`, + `}`, + }, "") + return s +} +func (this *TwoOneofs_Field35) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&TwoOneofs_Field35{`, + `Field35:` + fmt.Sprintf("%v", this.Field35) + `,`, + `}`, + }, "") + return s +} +func (this *TwoOneofs_SubMessage2) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&TwoOneofs_SubMessage2{`, + `SubMessage2:` + strings.Replace(fmt.Sprintf("%v", this.SubMessage2), "Subby", "Subby", 1) + `,`, + `}`, + }, "") + return s +} +func (this *CustomOneof) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&CustomOneof{`, + `Custom:` + fmt.Sprintf("%v", this.Custom) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *CustomOneof_Stringy) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&CustomOneof_Stringy{`, + `Stringy:` + fmt.Sprintf("%v", this.Stringy) + `,`, + `}`, + }, "") + return s +} +func (this *CustomOneof_CustomType) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&CustomOneof_CustomType{`, + `CustomType:` + fmt.Sprintf("%v", this.CustomType) + `,`, + `}`, + }, "") + return s +} +func (this *CustomOneof_CastType) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&CustomOneof_CastType{`, + `CastType:` + fmt.Sprintf("%v", this.CastType) + `,`, + `}`, + }, "") + return s +} +func (this *CustomOneof_MyCustomName) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&CustomOneof_MyCustomName{`, + `MyCustomName:` + fmt.Sprintf("%v", this.MyCustomName) + `,`, + `}`, + }, "") + return s +} +func valueToStringOne(v interface{}) string { + rv := reflect.ValueOf(v) + if rv.IsNil() { + return "nil" + } + pv := reflect.Indirect(rv).Interface() + return fmt.Sprintf("*%v", pv) +} +func (m *Subby) 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 ErrIntOverflowOne + } + 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: Subby: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Subby: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Sub", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOne + } + 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 ErrInvalidLengthOne + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + s := string(data[iNdEx:postIndex]) + m.Sub = &s + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipOne(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthOne + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *AllTypesOneOf) 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 ErrIntOverflowOne + } + 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: AllTypesOneOf: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: AllTypesOneOf: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field Field1", 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.TestOneof = &AllTypesOneOf_Field1{float64(math.Float64frombits(v))} + case 2: + if wireType != 5 { + return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType) + } + var v uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + iNdEx += 4 + v = uint32(data[iNdEx-4]) + v |= uint32(data[iNdEx-3]) << 8 + v |= uint32(data[iNdEx-2]) << 16 + v |= uint32(data[iNdEx-1]) << 24 + m.TestOneof = &AllTypesOneOf_Field2{float32(math.Float32frombits(v))} + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field3", wireType) + } + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOne + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.TestOneof = &AllTypesOneOf_Field3{v} + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field4", wireType) + } + var v int64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOne + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.TestOneof = &AllTypesOneOf_Field4{v} + case 5: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field5", wireType) + } + var v uint32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOne + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (uint32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.TestOneof = &AllTypesOneOf_Field5{v} + case 6: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field6", wireType) + } + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOne + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.TestOneof = &AllTypesOneOf_Field6{v} + case 7: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field7", wireType) + } + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOne + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + v = int32((uint32(v) >> 1) ^ uint32(((v&1)<<31)>>31)) + m.TestOneof = &AllTypesOneOf_Field7{v} + case 8: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field8", wireType) + } + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOne + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + v = (v >> 1) ^ uint64((int64(v&1)<<63)>>63) + m.TestOneof = &AllTypesOneOf_Field8{int64(v)} + case 9: + if wireType != 5 { + return fmt.Errorf("proto: wrong wireType = %d for field Field9", wireType) + } + var v uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + iNdEx += 4 + v = uint32(data[iNdEx-4]) + v |= uint32(data[iNdEx-3]) << 8 + v |= uint32(data[iNdEx-2]) << 16 + v |= uint32(data[iNdEx-1]) << 24 + m.TestOneof = &AllTypesOneOf_Field9{v} + case 10: + if wireType != 5 { + return fmt.Errorf("proto: wrong wireType = %d for field Field10", wireType) + } + var v int32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + iNdEx += 4 + v = int32(data[iNdEx-4]) + v |= int32(data[iNdEx-3]) << 8 + v |= int32(data[iNdEx-2]) << 16 + v |= int32(data[iNdEx-1]) << 24 + m.TestOneof = &AllTypesOneOf_Field10{v} + case 11: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field Field11", 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.TestOneof = &AllTypesOneOf_Field11{v} + case 12: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field Field12", wireType) + } + var v int64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + iNdEx += 8 + v = int64(data[iNdEx-8]) + v |= int64(data[iNdEx-7]) << 8 + v |= int64(data[iNdEx-6]) << 16 + v |= int64(data[iNdEx-5]) << 24 + v |= int64(data[iNdEx-4]) << 32 + v |= int64(data[iNdEx-3]) << 40 + v |= int64(data[iNdEx-2]) << 48 + v |= int64(data[iNdEx-1]) << 56 + m.TestOneof = &AllTypesOneOf_Field12{v} + case 13: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field13", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOne + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + b := bool(v != 0) + m.TestOneof = &AllTypesOneOf_Field13{b} + case 14: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field14", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOne + } + 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 ErrInvalidLengthOne + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.TestOneof = &AllTypesOneOf_Field14{string(data[iNdEx:postIndex])} + iNdEx = postIndex + case 15: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field15", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOne + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthOne + } + postIndex := iNdEx + byteLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + v := make([]byte, postIndex-iNdEx) + copy(v, data[iNdEx:postIndex]) + m.TestOneof = &AllTypesOneOf_Field15{v} + iNdEx = postIndex + case 16: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SubMessage", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOne + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthOne + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + v := &Subby{} + if err := v.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + m.TestOneof = &AllTypesOneOf_SubMessage{v} + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipOne(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthOne + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *TwoOneofs) 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 ErrIntOverflowOne + } + 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: TwoOneofs: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: TwoOneofs: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field Field1", 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.One = &TwoOneofs_Field1{float64(math.Float64frombits(v))} + case 2: + if wireType != 5 { + return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType) + } + var v uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + iNdEx += 4 + v = uint32(data[iNdEx-4]) + v |= uint32(data[iNdEx-3]) << 8 + v |= uint32(data[iNdEx-2]) << 16 + v |= uint32(data[iNdEx-1]) << 24 + m.One = &TwoOneofs_Field2{float32(math.Float32frombits(v))} + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field3", wireType) + } + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOne + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.One = &TwoOneofs_Field3{v} + case 34: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field34", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOne + } + 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 ErrInvalidLengthOne + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Two = &TwoOneofs_Field34{string(data[iNdEx:postIndex])} + iNdEx = postIndex + case 35: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field35", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOne + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthOne + } + postIndex := iNdEx + byteLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + v := make([]byte, postIndex-iNdEx) + copy(v, data[iNdEx:postIndex]) + m.Two = &TwoOneofs_Field35{v} + iNdEx = postIndex + case 36: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SubMessage2", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOne + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthOne + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + v := &Subby{} + if err := v.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + m.Two = &TwoOneofs_SubMessage2{v} + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipOne(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthOne + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *CustomOneof) 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 ErrIntOverflowOne + } + 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: CustomOneof: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: CustomOneof: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 34: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Stringy", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOne + } + 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 ErrInvalidLengthOne + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Custom = &CustomOneof_Stringy{string(data[iNdEx:postIndex])} + iNdEx = postIndex + case 35: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field CustomType", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOne + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthOne + } + postIndex := iNdEx + byteLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var vv github_com_gogo_protobuf_test_custom.Uint128 + v := &vv + if err := v.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + m.Custom = &CustomOneof_CustomType{*v} + iNdEx = postIndex + case 36: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field CastType", wireType) + } + var v github_com_gogo_protobuf_test_casttype.MyUint64Type + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOne + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (github_com_gogo_protobuf_test_casttype.MyUint64Type(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Custom = &CustomOneof_CastType{v} + case 37: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field MyCustomName", wireType) + } + var v int64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOne + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Custom = &CustomOneof_MyCustomName{v} + default: + iNdEx = preIndex + skippy, err := skipOne(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthOne + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipOne(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, ErrIntOverflowOne + } + 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, ErrIntOverflowOne + } + 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, ErrIntOverflowOne + } + 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, ErrInvalidLengthOne + } + return iNdEx, nil + case 3: + for { + var innerWire uint64 + var start int = iNdEx + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowOne + } + 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 := skipOne(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 ( + ErrInvalidLengthOne = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowOne = fmt.Errorf("proto: integer overflow") +) + +var fileDescriptorOne = []byte{ + // 573 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xac, 0xd3, 0x3f, 0x6f, 0xda, 0x40, + 0x14, 0x00, 0x70, 0xcc, 0x7f, 0x0e, 0x68, 0xa8, 0xa5, 0x4a, 0xaf, 0x19, 0xa0, 0xa2, 0xad, 0xd4, + 0xa1, 0xc1, 0xe0, 0x3f, 0x40, 0xc6, 0x3a, 0x55, 0xd5, 0x85, 0x22, 0x91, 0x64, 0x8e, 0x30, 0x35, + 0x04, 0x09, 0xb8, 0x28, 0x77, 0x28, 0xf2, 0x96, 0xcf, 0xd0, 0x4f, 0xd1, 0xb1, 0x63, 0x3f, 0x42, + 0x46, 0xc6, 0xaa, 0x03, 0x4a, 0xe8, 0xd2, 0x31, 0x63, 0xd4, 0xa9, 0xef, 0xce, 0xe4, 0xae, 0x52, + 0x55, 0x75, 0xc9, 0xf0, 0x64, 0x3f, 0x7e, 0x77, 0x8f, 0xf7, 0x7c, 0x36, 0x79, 0x32, 0xa2, 0xf3, + 0x80, 0x32, 0x2b, 0xa0, 0xfc, 0xd4, 0xa2, 0x8b, 0xb0, 0x71, 0x76, 0x4e, 0x39, 0x35, 0x53, 0x78, + 0xbb, 0xbb, 0x37, 0x99, 0xf2, 0xd3, 0x65, 0xd0, 0xc0, 0x25, 0xd6, 0x84, 0x4e, 0xa8, 0x25, 0x2d, + 0x58, 0x8e, 0x65, 0x26, 0x13, 0x79, 0x17, 0xef, 0xa9, 0x3f, 0x25, 0x99, 0xc3, 0x65, 0x10, 0x44, + 0x66, 0x85, 0xa4, 0xd8, 0x32, 0x00, 0xe3, 0x99, 0xf1, 0xaa, 0x30, 0x10, 0xb7, 0xf5, 0x75,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 0x9b, 0xaa, 0x71, 0x8b, + 0x71, 0x87, 0x71, 0xb9, 0xa9, 0x1a, 0x9f, 0x31, 0xbe, 0x60, 0x7c, 0xc5, 0xb8, 0xc2, 0x58, 0x61, + 0x5c, 0x63, 0xfc, 0xdc, 0x54, 0x13, 0xb7, 0x78, 0xbd, 0xc3, 0xeb, 0xe5, 0x8f, 0x6a, 0xe2, 0x77, + 0x00, 0x00, 0x00, 0xff, 0xff, 0x75, 0xe8, 0x19, 0x58, 0x75, 0x04, 0x00, 0x00, +} diff --git a/vendor/github.com/gogo/protobuf/test/oneof/combos/both/one.proto b/vendor/github.com/gogo/protobuf/test/oneof/combos/both/one.proto new file mode 100644 index 000000000..9f36cf722 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/oneof/combos/both/one.proto @@ -0,0 +1,101 @@ +// Copyright (c) 2013, Vastech SA (PTY) LTD. All rights reserved. +// http://github.com/gogo/protobuf/gogoproto +// +// 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 one; + +import "github.com/gogo/protobuf/gogoproto/gogo.proto"; + +option (gogoproto.goproto_stringer_all) = false; +option (gogoproto.goproto_enum_prefix_all) = false; +option (gogoproto.goproto_getters_all) = false; + +option (gogoproto.equal_all) = true; +option (gogoproto.verbose_equal_all) = true; +option (gogoproto.stringer_all) = true; +option (gogoproto.gostring_all) = true; +option (gogoproto.description_all) = true; + +option (gogoproto.testgen_all) = true; +option (gogoproto.populate_all) = true; +option (gogoproto.unmarshaler_all) = true; +option (gogoproto.marshaler_all) = true; +option (gogoproto.sizer_all) = true; + +option (gogoproto.goproto_enum_stringer_all) = false; +option (gogoproto.enum_stringer_all) = true; + +option (gogoproto.unsafe_marshaler_all) = false; +option (gogoproto.unsafe_unmarshaler_all) = false; + +message Subby { + optional string sub = 1; +} + +message AllTypesOneOf { + oneof test_oneof { + double Field1 = 1; + float Field2 = 2; + int32 Field3 = 3; + int64 Field4 = 4; + uint32 Field5 = 5; + uint64 Field6 = 6; + sint32 Field7 = 7; + sint64 Field8 = 8; + fixed32 Field9 = 9; + sfixed32 Field10 = 10; + fixed64 Field11 = 11; + sfixed64 Field12 = 12; + bool Field13 = 13; + string Field14 = 14; + bytes Field15 = 15; + Subby sub_message = 16; + } +} + +message TwoOneofs { + oneof one { + double Field1 = 1; + float Field2 = 2; + int32 Field3 = 3; + } + + oneof two { + string Field34 = 34; + bytes Field35 = 35; + Subby sub_message2 = 36; + } +} + +message CustomOneof { + oneof custom { + string Stringy = 34; + bytes CustomType = 35 [(gogoproto.customtype) = "github.com/gogo/protobuf/test/custom.Uint128"]; + uint64 CastType = 36 [(gogoproto.casttype) = "github.com/gogo/protobuf/test/casttype.MyUint64Type"]; + int64 CustomName = 37 [(gogoproto.customname) = "MyCustomName"]; + } +} diff --git a/vendor/github.com/gogo/protobuf/test/oneof/combos/both/onepb_test.go b/vendor/github.com/gogo/protobuf/test/oneof/combos/both/onepb_test.go new file mode 100644 index 000000000..562e89e48 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/oneof/combos/both/onepb_test.go @@ -0,0 +1,743 @@ +// Code generated by protoc-gen-gogo. +// source: combos/both/one.proto +// DO NOT EDIT! + +/* +Package one is a generated protocol buffer package. + +It is generated from these files: + combos/both/one.proto + +It has these top-level messages: + Subby + AllTypesOneOf + TwoOneofs + CustomOneof +*/ +package one + +import testing "testing" +import math_rand "math/rand" +import time "time" +import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" +import github_com_gogo_protobuf_jsonpb "github.com/gogo/protobuf/jsonpb" +import fmt "fmt" +import go_parser "go/parser" +import proto "github.com/gogo/protobuf/proto" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +func TestSubbyProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedSubby(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Subby{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestSubbyMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedSubby(popr, false) + size := p.Size() + data := make([]byte, size) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(data) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Subby{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestAllTypesOneOfProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAllTypesOneOf(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &AllTypesOneOf{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestAllTypesOneOfMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAllTypesOneOf(popr, false) + size := p.Size() + data := make([]byte, size) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(data) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &AllTypesOneOf{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestTwoOneofsProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedTwoOneofs(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &TwoOneofs{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestTwoOneofsMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedTwoOneofs(popr, false) + size := p.Size() + data := make([]byte, size) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(data) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &TwoOneofs{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestCustomOneofProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomOneof(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &CustomOneof{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestCustomOneofMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomOneof(popr, false) + size := p.Size() + data := make([]byte, size) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(data) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &CustomOneof{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestSubbyJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedSubby(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Subby{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestAllTypesOneOfJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAllTypesOneOf(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &AllTypesOneOf{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestTwoOneofsJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedTwoOneofs(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &TwoOneofs{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestCustomOneofJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomOneof(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &CustomOneof{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestSubbyProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedSubby(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &Subby{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestSubbyProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedSubby(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &Subby{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestAllTypesOneOfProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAllTypesOneOf(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &AllTypesOneOf{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestAllTypesOneOfProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAllTypesOneOf(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &AllTypesOneOf{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestTwoOneofsProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedTwoOneofs(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &TwoOneofs{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestTwoOneofsProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedTwoOneofs(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &TwoOneofs{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestCustomOneofProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomOneof(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &CustomOneof{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestCustomOneofProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomOneof(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &CustomOneof{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestOneDescription(t *testing.T) { + OneDescription() +} +func TestSubbyVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedSubby(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &Subby{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestAllTypesOneOfVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAllTypesOneOf(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &AllTypesOneOf{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestTwoOneofsVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedTwoOneofs(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &TwoOneofs{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestCustomOneofVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomOneof(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &CustomOneof{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestSubbyGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedSubby(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestAllTypesOneOfGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAllTypesOneOf(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestTwoOneofsGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedTwoOneofs(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestCustomOneofGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomOneof(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestSubbySize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedSubby(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func TestAllTypesOneOfSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAllTypesOneOf(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func TestTwoOneofsSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedTwoOneofs(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func TestCustomOneofSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomOneof(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func TestSubbyStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedSubby(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestAllTypesOneOfStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAllTypesOneOf(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestTwoOneofsStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedTwoOneofs(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestCustomOneofStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomOneof(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} + +//These tests are generated by github.com/gogo/protobuf/plugin/testgen diff --git a/vendor/github.com/gogo/protobuf/test/oneof/combos/marshaler/one.pb.go b/vendor/github.com/gogo/protobuf/test/oneof/combos/marshaler/one.pb.go new file mode 100644 index 000000000..ff1575464 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/oneof/combos/marshaler/one.pb.go @@ -0,0 +1,4741 @@ +// Code generated by protoc-gen-gogo. +// source: combos/marshaler/one.proto +// DO NOT EDIT! + +/* +Package one is a generated protocol buffer package. + +It is generated from these files: + combos/marshaler/one.proto + +It has these top-level messages: + Subby + AllTypesOneOf + TwoOneofs + CustomOneof +*/ +package one + +import proto "github.com/gogo/protobuf/proto" +import fmt "fmt" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" + +import github_com_gogo_protobuf_test_custom "github.com/gogo/protobuf/test/custom" +import github_com_gogo_protobuf_test_casttype "github.com/gogo/protobuf/test/casttype" + +import github_com_gogo_protobuf_protoc_gen_gogo_descriptor "github.com/gogo/protobuf/protoc-gen-gogo/descriptor" +import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" +import compress_gzip "compress/gzip" +import bytes "bytes" +import io_ioutil "io/ioutil" + +import strings "strings" +import sort "sort" +import strconv "strconv" +import reflect "reflect" + +// 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. +const _ = proto.GoGoProtoPackageIsVersion1 + +type Subby struct { + Sub *string `protobuf:"bytes,1,opt,name=sub" json:"sub,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *Subby) Reset() { *m = Subby{} } +func (*Subby) ProtoMessage() {} +func (*Subby) Descriptor() ([]byte, []int) { return fileDescriptorOne, []int{0} } + +type AllTypesOneOf struct { + // Types that are valid to be assigned to TestOneof: + // *AllTypesOneOf_Field1 + // *AllTypesOneOf_Field2 + // *AllTypesOneOf_Field3 + // *AllTypesOneOf_Field4 + // *AllTypesOneOf_Field5 + // *AllTypesOneOf_Field6 + // *AllTypesOneOf_Field7 + // *AllTypesOneOf_Field8 + // *AllTypesOneOf_Field9 + // *AllTypesOneOf_Field10 + // *AllTypesOneOf_Field11 + // *AllTypesOneOf_Field12 + // *AllTypesOneOf_Field13 + // *AllTypesOneOf_Field14 + // *AllTypesOneOf_Field15 + // *AllTypesOneOf_SubMessage + TestOneof isAllTypesOneOf_TestOneof `protobuf_oneof:"test_oneof"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *AllTypesOneOf) Reset() { *m = AllTypesOneOf{} } +func (*AllTypesOneOf) ProtoMessage() {} +func (*AllTypesOneOf) Descriptor() ([]byte, []int) { return fileDescriptorOne, []int{1} } + +type isAllTypesOneOf_TestOneof interface { + isAllTypesOneOf_TestOneof() + Equal(interface{}) bool + VerboseEqual(interface{}) error + MarshalTo([]byte) (int, error) + Size() int +} + +type AllTypesOneOf_Field1 struct { + Field1 float64 `protobuf:"fixed64,1,opt,name=Field1,json=field1,oneof"` +} +type AllTypesOneOf_Field2 struct { + Field2 float32 `protobuf:"fixed32,2,opt,name=Field2,json=field2,oneof"` +} +type AllTypesOneOf_Field3 struct { + Field3 int32 `protobuf:"varint,3,opt,name=Field3,json=field3,oneof"` +} +type AllTypesOneOf_Field4 struct { + Field4 int64 `protobuf:"varint,4,opt,name=Field4,json=field4,oneof"` +} +type AllTypesOneOf_Field5 struct { + Field5 uint32 `protobuf:"varint,5,opt,name=Field5,json=field5,oneof"` +} +type AllTypesOneOf_Field6 struct { + Field6 uint64 `protobuf:"varint,6,opt,name=Field6,json=field6,oneof"` +} +type AllTypesOneOf_Field7 struct { + Field7 int32 `protobuf:"zigzag32,7,opt,name=Field7,json=field7,oneof"` +} +type AllTypesOneOf_Field8 struct { + Field8 int64 `protobuf:"zigzag64,8,opt,name=Field8,json=field8,oneof"` +} +type AllTypesOneOf_Field9 struct { + Field9 uint32 `protobuf:"fixed32,9,opt,name=Field9,json=field9,oneof"` +} +type AllTypesOneOf_Field10 struct { + Field10 int32 `protobuf:"fixed32,10,opt,name=Field10,json=field10,oneof"` +} +type AllTypesOneOf_Field11 struct { + Field11 uint64 `protobuf:"fixed64,11,opt,name=Field11,json=field11,oneof"` +} +type AllTypesOneOf_Field12 struct { + Field12 int64 `protobuf:"fixed64,12,opt,name=Field12,json=field12,oneof"` +} +type AllTypesOneOf_Field13 struct { + Field13 bool `protobuf:"varint,13,opt,name=Field13,json=field13,oneof"` +} +type AllTypesOneOf_Field14 struct { + Field14 string `protobuf:"bytes,14,opt,name=Field14,json=field14,oneof"` +} +type AllTypesOneOf_Field15 struct { + Field15 []byte `protobuf:"bytes,15,opt,name=Field15,json=field15,oneof"` +} +type AllTypesOneOf_SubMessage struct { + SubMessage *Subby `protobuf:"bytes,16,opt,name=sub_message,json=subMessage,oneof"` +} + +func (*AllTypesOneOf_Field1) isAllTypesOneOf_TestOneof() {} +func (*AllTypesOneOf_Field2) isAllTypesOneOf_TestOneof() {} +func (*AllTypesOneOf_Field3) isAllTypesOneOf_TestOneof() {} +func (*AllTypesOneOf_Field4) isAllTypesOneOf_TestOneof() {} +func (*AllTypesOneOf_Field5) isAllTypesOneOf_TestOneof() {} +func (*AllTypesOneOf_Field6) isAllTypesOneOf_TestOneof() {} +func (*AllTypesOneOf_Field7) isAllTypesOneOf_TestOneof() {} +func (*AllTypesOneOf_Field8) isAllTypesOneOf_TestOneof() {} +func (*AllTypesOneOf_Field9) isAllTypesOneOf_TestOneof() {} +func (*AllTypesOneOf_Field10) isAllTypesOneOf_TestOneof() {} +func (*AllTypesOneOf_Field11) isAllTypesOneOf_TestOneof() {} +func (*AllTypesOneOf_Field12) isAllTypesOneOf_TestOneof() {} +func (*AllTypesOneOf_Field13) isAllTypesOneOf_TestOneof() {} +func (*AllTypesOneOf_Field14) isAllTypesOneOf_TestOneof() {} +func (*AllTypesOneOf_Field15) isAllTypesOneOf_TestOneof() {} +func (*AllTypesOneOf_SubMessage) isAllTypesOneOf_TestOneof() {} + +func (m *AllTypesOneOf) GetTestOneof() isAllTypesOneOf_TestOneof { + if m != nil { + return m.TestOneof + } + return nil +} + +func (m *AllTypesOneOf) GetField1() float64 { + if x, ok := m.GetTestOneof().(*AllTypesOneOf_Field1); ok { + return x.Field1 + } + return 0 +} + +func (m *AllTypesOneOf) GetField2() float32 { + if x, ok := m.GetTestOneof().(*AllTypesOneOf_Field2); ok { + return x.Field2 + } + return 0 +} + +func (m *AllTypesOneOf) GetField3() int32 { + if x, ok := m.GetTestOneof().(*AllTypesOneOf_Field3); ok { + return x.Field3 + } + return 0 +} + +func (m *AllTypesOneOf) GetField4() int64 { + if x, ok := m.GetTestOneof().(*AllTypesOneOf_Field4); ok { + return x.Field4 + } + return 0 +} + +func (m *AllTypesOneOf) GetField5() uint32 { + if x, ok := m.GetTestOneof().(*AllTypesOneOf_Field5); ok { + return x.Field5 + } + return 0 +} + +func (m *AllTypesOneOf) GetField6() uint64 { + if x, ok := m.GetTestOneof().(*AllTypesOneOf_Field6); ok { + return x.Field6 + } + return 0 +} + +func (m *AllTypesOneOf) GetField7() int32 { + if x, ok := m.GetTestOneof().(*AllTypesOneOf_Field7); ok { + return x.Field7 + } + return 0 +} + +func (m *AllTypesOneOf) GetField8() int64 { + if x, ok := m.GetTestOneof().(*AllTypesOneOf_Field8); ok { + return x.Field8 + } + return 0 +} + +func (m *AllTypesOneOf) GetField9() uint32 { + if x, ok := m.GetTestOneof().(*AllTypesOneOf_Field9); ok { + return x.Field9 + } + return 0 +} + +func (m *AllTypesOneOf) GetField10() int32 { + if x, ok := m.GetTestOneof().(*AllTypesOneOf_Field10); ok { + return x.Field10 + } + return 0 +} + +func (m *AllTypesOneOf) GetField11() uint64 { + if x, ok := m.GetTestOneof().(*AllTypesOneOf_Field11); ok { + return x.Field11 + } + return 0 +} + +func (m *AllTypesOneOf) GetField12() int64 { + if x, ok := m.GetTestOneof().(*AllTypesOneOf_Field12); ok { + return x.Field12 + } + return 0 +} + +func (m *AllTypesOneOf) GetField13() bool { + if x, ok := m.GetTestOneof().(*AllTypesOneOf_Field13); ok { + return x.Field13 + } + return false +} + +func (m *AllTypesOneOf) GetField14() string { + if x, ok := m.GetTestOneof().(*AllTypesOneOf_Field14); ok { + return x.Field14 + } + return "" +} + +func (m *AllTypesOneOf) GetField15() []byte { + if x, ok := m.GetTestOneof().(*AllTypesOneOf_Field15); ok { + return x.Field15 + } + return nil +} + +func (m *AllTypesOneOf) GetSubMessage() *Subby { + if x, ok := m.GetTestOneof().(*AllTypesOneOf_SubMessage); ok { + return x.SubMessage + } + return nil +} + +// XXX_OneofFuncs is for the internal use of the proto package. +func (*AllTypesOneOf) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{}) { + return _AllTypesOneOf_OneofMarshaler, _AllTypesOneOf_OneofUnmarshaler, _AllTypesOneOf_OneofSizer, []interface{}{ + (*AllTypesOneOf_Field1)(nil), + (*AllTypesOneOf_Field2)(nil), + (*AllTypesOneOf_Field3)(nil), + (*AllTypesOneOf_Field4)(nil), + (*AllTypesOneOf_Field5)(nil), + (*AllTypesOneOf_Field6)(nil), + (*AllTypesOneOf_Field7)(nil), + (*AllTypesOneOf_Field8)(nil), + (*AllTypesOneOf_Field9)(nil), + (*AllTypesOneOf_Field10)(nil), + (*AllTypesOneOf_Field11)(nil), + (*AllTypesOneOf_Field12)(nil), + (*AllTypesOneOf_Field13)(nil), + (*AllTypesOneOf_Field14)(nil), + (*AllTypesOneOf_Field15)(nil), + (*AllTypesOneOf_SubMessage)(nil), + } +} + +func _AllTypesOneOf_OneofMarshaler(msg proto.Message, b *proto.Buffer) error { + m := msg.(*AllTypesOneOf) + // test_oneof + switch x := m.TestOneof.(type) { + case *AllTypesOneOf_Field1: + _ = b.EncodeVarint(1<<3 | proto.WireFixed64) + _ = b.EncodeFixed64(math.Float64bits(x.Field1)) + case *AllTypesOneOf_Field2: + _ = b.EncodeVarint(2<<3 | proto.WireFixed32) + _ = b.EncodeFixed32(uint64(math.Float32bits(x.Field2))) + case *AllTypesOneOf_Field3: + _ = b.EncodeVarint(3<<3 | proto.WireVarint) + _ = b.EncodeVarint(uint64(x.Field3)) + case *AllTypesOneOf_Field4: + _ = b.EncodeVarint(4<<3 | proto.WireVarint) + _ = b.EncodeVarint(uint64(x.Field4)) + case *AllTypesOneOf_Field5: + _ = b.EncodeVarint(5<<3 | proto.WireVarint) + _ = b.EncodeVarint(uint64(x.Field5)) + case *AllTypesOneOf_Field6: + _ = b.EncodeVarint(6<<3 | proto.WireVarint) + _ = b.EncodeVarint(uint64(x.Field6)) + case *AllTypesOneOf_Field7: + _ = b.EncodeVarint(7<<3 | proto.WireVarint) + _ = b.EncodeZigzag32(uint64(x.Field7)) + case *AllTypesOneOf_Field8: + _ = b.EncodeVarint(8<<3 | proto.WireVarint) + _ = b.EncodeZigzag64(uint64(x.Field8)) + case *AllTypesOneOf_Field9: + _ = b.EncodeVarint(9<<3 | proto.WireFixed32) + _ = b.EncodeFixed32(uint64(x.Field9)) + case *AllTypesOneOf_Field10: + _ = b.EncodeVarint(10<<3 | proto.WireFixed32) + _ = b.EncodeFixed32(uint64(x.Field10)) + case *AllTypesOneOf_Field11: + _ = b.EncodeVarint(11<<3 | proto.WireFixed64) + _ = b.EncodeFixed64(uint64(x.Field11)) + case *AllTypesOneOf_Field12: + _ = b.EncodeVarint(12<<3 | proto.WireFixed64) + _ = b.EncodeFixed64(uint64(x.Field12)) + case *AllTypesOneOf_Field13: + t := uint64(0) + if x.Field13 { + t = 1 + } + _ = b.EncodeVarint(13<<3 | proto.WireVarint) + _ = b.EncodeVarint(t) + case *AllTypesOneOf_Field14: + _ = b.EncodeVarint(14<<3 | proto.WireBytes) + _ = b.EncodeStringBytes(x.Field14) + case *AllTypesOneOf_Field15: + _ = b.EncodeVarint(15<<3 | proto.WireBytes) + _ = b.EncodeRawBytes(x.Field15) + case *AllTypesOneOf_SubMessage: + _ = b.EncodeVarint(16<<3 | proto.WireBytes) + if err := b.EncodeMessage(x.SubMessage); err != nil { + return err + } + case nil: + default: + return fmt.Errorf("AllTypesOneOf.TestOneof has unexpected type %T", x) + } + return nil +} + +func _AllTypesOneOf_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) { + m := msg.(*AllTypesOneOf) + switch tag { + case 1: // test_oneof.Field1 + if wire != proto.WireFixed64 { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeFixed64() + m.TestOneof = &AllTypesOneOf_Field1{math.Float64frombits(x)} + return true, err + case 2: // test_oneof.Field2 + if wire != proto.WireFixed32 { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeFixed32() + m.TestOneof = &AllTypesOneOf_Field2{math.Float32frombits(uint32(x))} + return true, err + case 3: // test_oneof.Field3 + if wire != proto.WireVarint { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeVarint() + m.TestOneof = &AllTypesOneOf_Field3{int32(x)} + return true, err + case 4: // test_oneof.Field4 + if wire != proto.WireVarint { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeVarint() + m.TestOneof = &AllTypesOneOf_Field4{int64(x)} + return true, err + case 5: // test_oneof.Field5 + if wire != proto.WireVarint { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeVarint() + m.TestOneof = &AllTypesOneOf_Field5{uint32(x)} + return true, err + case 6: // test_oneof.Field6 + if wire != proto.WireVarint { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeVarint() + m.TestOneof = &AllTypesOneOf_Field6{x} + return true, err + case 7: // test_oneof.Field7 + if wire != proto.WireVarint { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeZigzag32() + m.TestOneof = &AllTypesOneOf_Field7{int32(x)} + return true, err + case 8: // test_oneof.Field8 + if wire != proto.WireVarint { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeZigzag64() + m.TestOneof = &AllTypesOneOf_Field8{int64(x)} + return true, err + case 9: // test_oneof.Field9 + if wire != proto.WireFixed32 { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeFixed32() + m.TestOneof = &AllTypesOneOf_Field9{uint32(x)} + return true, err + case 10: // test_oneof.Field10 + if wire != proto.WireFixed32 { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeFixed32() + m.TestOneof = &AllTypesOneOf_Field10{int32(x)} + return true, err + case 11: // test_oneof.Field11 + if wire != proto.WireFixed64 { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeFixed64() + m.TestOneof = &AllTypesOneOf_Field11{x} + return true, err + case 12: // test_oneof.Field12 + if wire != proto.WireFixed64 { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeFixed64() + m.TestOneof = &AllTypesOneOf_Field12{int64(x)} + return true, err + case 13: // test_oneof.Field13 + if wire != proto.WireVarint { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeVarint() + m.TestOneof = &AllTypesOneOf_Field13{x != 0} + return true, err + case 14: // test_oneof.Field14 + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeStringBytes() + m.TestOneof = &AllTypesOneOf_Field14{x} + return true, err + case 15: // test_oneof.Field15 + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeRawBytes(true) + m.TestOneof = &AllTypesOneOf_Field15{x} + return true, err + case 16: // test_oneof.sub_message + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + msg := new(Subby) + err := b.DecodeMessage(msg) + m.TestOneof = &AllTypesOneOf_SubMessage{msg} + return true, err + default: + return false, nil + } +} + +func _AllTypesOneOf_OneofSizer(msg proto.Message) (n int) { + m := msg.(*AllTypesOneOf) + // test_oneof + switch x := m.TestOneof.(type) { + case *AllTypesOneOf_Field1: + n += proto.SizeVarint(1<<3 | proto.WireFixed64) + n += 8 + case *AllTypesOneOf_Field2: + n += proto.SizeVarint(2<<3 | proto.WireFixed32) + n += 4 + case *AllTypesOneOf_Field3: + n += proto.SizeVarint(3<<3 | proto.WireVarint) + n += proto.SizeVarint(uint64(x.Field3)) + case *AllTypesOneOf_Field4: + n += proto.SizeVarint(4<<3 | proto.WireVarint) + n += proto.SizeVarint(uint64(x.Field4)) + case *AllTypesOneOf_Field5: + n += proto.SizeVarint(5<<3 | proto.WireVarint) + n += proto.SizeVarint(uint64(x.Field5)) + case *AllTypesOneOf_Field6: + n += proto.SizeVarint(6<<3 | proto.WireVarint) + n += proto.SizeVarint(uint64(x.Field6)) + case *AllTypesOneOf_Field7: + n += proto.SizeVarint(7<<3 | proto.WireVarint) + n += proto.SizeVarint(uint64((uint32(x.Field7) << 1) ^ uint32((int32(x.Field7) >> 31)))) + case *AllTypesOneOf_Field8: + n += proto.SizeVarint(8<<3 | proto.WireVarint) + n += proto.SizeVarint(uint64(uint64(x.Field8<<1) ^ uint64((int64(x.Field8) >> 63)))) + case *AllTypesOneOf_Field9: + n += proto.SizeVarint(9<<3 | proto.WireFixed32) + n += 4 + case *AllTypesOneOf_Field10: + n += proto.SizeVarint(10<<3 | proto.WireFixed32) + n += 4 + case *AllTypesOneOf_Field11: + n += proto.SizeVarint(11<<3 | proto.WireFixed64) + n += 8 + case *AllTypesOneOf_Field12: + n += proto.SizeVarint(12<<3 | proto.WireFixed64) + n += 8 + case *AllTypesOneOf_Field13: + n += proto.SizeVarint(13<<3 | proto.WireVarint) + n += 1 + case *AllTypesOneOf_Field14: + n += proto.SizeVarint(14<<3 | proto.WireBytes) + n += proto.SizeVarint(uint64(len(x.Field14))) + n += len(x.Field14) + case *AllTypesOneOf_Field15: + n += proto.SizeVarint(15<<3 | proto.WireBytes) + n += proto.SizeVarint(uint64(len(x.Field15))) + n += len(x.Field15) + case *AllTypesOneOf_SubMessage: + s := proto.Size(x.SubMessage) + n += proto.SizeVarint(16<<3 | proto.WireBytes) + n += proto.SizeVarint(uint64(s)) + n += s + case nil: + default: + panic(fmt.Sprintf("proto: unexpected type %T in oneof", x)) + } + return n +} + +type TwoOneofs struct { + // Types that are valid to be assigned to One: + // *TwoOneofs_Field1 + // *TwoOneofs_Field2 + // *TwoOneofs_Field3 + One isTwoOneofs_One `protobuf_oneof:"one"` + // Types that are valid to be assigned to Two: + // *TwoOneofs_Field34 + // *TwoOneofs_Field35 + // *TwoOneofs_SubMessage2 + Two isTwoOneofs_Two `protobuf_oneof:"two"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *TwoOneofs) Reset() { *m = TwoOneofs{} } +func (*TwoOneofs) ProtoMessage() {} +func (*TwoOneofs) Descriptor() ([]byte, []int) { return fileDescriptorOne, []int{2} } + +type isTwoOneofs_One interface { + isTwoOneofs_One() + Equal(interface{}) bool + VerboseEqual(interface{}) error + MarshalTo([]byte) (int, error) + Size() int +} +type isTwoOneofs_Two interface { + isTwoOneofs_Two() + Equal(interface{}) bool + VerboseEqual(interface{}) error + MarshalTo([]byte) (int, error) + Size() int +} + +type TwoOneofs_Field1 struct { + Field1 float64 `protobuf:"fixed64,1,opt,name=Field1,json=field1,oneof"` +} +type TwoOneofs_Field2 struct { + Field2 float32 `protobuf:"fixed32,2,opt,name=Field2,json=field2,oneof"` +} +type TwoOneofs_Field3 struct { + Field3 int32 `protobuf:"varint,3,opt,name=Field3,json=field3,oneof"` +} +type TwoOneofs_Field34 struct { + Field34 string `protobuf:"bytes,34,opt,name=Field34,json=field34,oneof"` +} +type TwoOneofs_Field35 struct { + Field35 []byte `protobuf:"bytes,35,opt,name=Field35,json=field35,oneof"` +} +type TwoOneofs_SubMessage2 struct { + SubMessage2 *Subby `protobuf:"bytes,36,opt,name=sub_message2,json=subMessage2,oneof"` +} + +func (*TwoOneofs_Field1) isTwoOneofs_One() {} +func (*TwoOneofs_Field2) isTwoOneofs_One() {} +func (*TwoOneofs_Field3) isTwoOneofs_One() {} +func (*TwoOneofs_Field34) isTwoOneofs_Two() {} +func (*TwoOneofs_Field35) isTwoOneofs_Two() {} +func (*TwoOneofs_SubMessage2) isTwoOneofs_Two() {} + +func (m *TwoOneofs) GetOne() isTwoOneofs_One { + if m != nil { + return m.One + } + return nil +} +func (m *TwoOneofs) GetTwo() isTwoOneofs_Two { + if m != nil { + return m.Two + } + return nil +} + +func (m *TwoOneofs) GetField1() float64 { + if x, ok := m.GetOne().(*TwoOneofs_Field1); ok { + return x.Field1 + } + return 0 +} + +func (m *TwoOneofs) GetField2() float32 { + if x, ok := m.GetOne().(*TwoOneofs_Field2); ok { + return x.Field2 + } + return 0 +} + +func (m *TwoOneofs) GetField3() int32 { + if x, ok := m.GetOne().(*TwoOneofs_Field3); ok { + return x.Field3 + } + return 0 +} + +func (m *TwoOneofs) GetField34() string { + if x, ok := m.GetTwo().(*TwoOneofs_Field34); ok { + return x.Field34 + } + return "" +} + +func (m *TwoOneofs) GetField35() []byte { + if x, ok := m.GetTwo().(*TwoOneofs_Field35); ok { + return x.Field35 + } + return nil +} + +func (m *TwoOneofs) GetSubMessage2() *Subby { + if x, ok := m.GetTwo().(*TwoOneofs_SubMessage2); ok { + return x.SubMessage2 + } + return nil +} + +// XXX_OneofFuncs is for the internal use of the proto package. +func (*TwoOneofs) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{}) { + return _TwoOneofs_OneofMarshaler, _TwoOneofs_OneofUnmarshaler, _TwoOneofs_OneofSizer, []interface{}{ + (*TwoOneofs_Field1)(nil), + (*TwoOneofs_Field2)(nil), + (*TwoOneofs_Field3)(nil), + (*TwoOneofs_Field34)(nil), + (*TwoOneofs_Field35)(nil), + (*TwoOneofs_SubMessage2)(nil), + } +} + +func _TwoOneofs_OneofMarshaler(msg proto.Message, b *proto.Buffer) error { + m := msg.(*TwoOneofs) + // one + switch x := m.One.(type) { + case *TwoOneofs_Field1: + _ = b.EncodeVarint(1<<3 | proto.WireFixed64) + _ = b.EncodeFixed64(math.Float64bits(x.Field1)) + case *TwoOneofs_Field2: + _ = b.EncodeVarint(2<<3 | proto.WireFixed32) + _ = b.EncodeFixed32(uint64(math.Float32bits(x.Field2))) + case *TwoOneofs_Field3: + _ = b.EncodeVarint(3<<3 | proto.WireVarint) + _ = b.EncodeVarint(uint64(x.Field3)) + case nil: + default: + return fmt.Errorf("TwoOneofs.One has unexpected type %T", x) + } + // two + switch x := m.Two.(type) { + case *TwoOneofs_Field34: + _ = b.EncodeVarint(34<<3 | proto.WireBytes) + _ = b.EncodeStringBytes(x.Field34) + case *TwoOneofs_Field35: + _ = b.EncodeVarint(35<<3 | proto.WireBytes) + _ = b.EncodeRawBytes(x.Field35) + case *TwoOneofs_SubMessage2: + _ = b.EncodeVarint(36<<3 | proto.WireBytes) + if err := b.EncodeMessage(x.SubMessage2); err != nil { + return err + } + case nil: + default: + return fmt.Errorf("TwoOneofs.Two has unexpected type %T", x) + } + return nil +} + +func _TwoOneofs_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) { + m := msg.(*TwoOneofs) + switch tag { + case 1: // one.Field1 + if wire != proto.WireFixed64 { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeFixed64() + m.One = &TwoOneofs_Field1{math.Float64frombits(x)} + return true, err + case 2: // one.Field2 + if wire != proto.WireFixed32 { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeFixed32() + m.One = &TwoOneofs_Field2{math.Float32frombits(uint32(x))} + return true, err + case 3: // one.Field3 + if wire != proto.WireVarint { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeVarint() + m.One = &TwoOneofs_Field3{int32(x)} + return true, err + case 34: // two.Field34 + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeStringBytes() + m.Two = &TwoOneofs_Field34{x} + return true, err + case 35: // two.Field35 + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeRawBytes(true) + m.Two = &TwoOneofs_Field35{x} + return true, err + case 36: // two.sub_message2 + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + msg := new(Subby) + err := b.DecodeMessage(msg) + m.Two = &TwoOneofs_SubMessage2{msg} + return true, err + default: + return false, nil + } +} + +func _TwoOneofs_OneofSizer(msg proto.Message) (n int) { + m := msg.(*TwoOneofs) + // one + switch x := m.One.(type) { + case *TwoOneofs_Field1: + n += proto.SizeVarint(1<<3 | proto.WireFixed64) + n += 8 + case *TwoOneofs_Field2: + n += proto.SizeVarint(2<<3 | proto.WireFixed32) + n += 4 + case *TwoOneofs_Field3: + n += proto.SizeVarint(3<<3 | proto.WireVarint) + n += proto.SizeVarint(uint64(x.Field3)) + case nil: + default: + panic(fmt.Sprintf("proto: unexpected type %T in oneof", x)) + } + // two + switch x := m.Two.(type) { + case *TwoOneofs_Field34: + n += proto.SizeVarint(34<<3 | proto.WireBytes) + n += proto.SizeVarint(uint64(len(x.Field34))) + n += len(x.Field34) + case *TwoOneofs_Field35: + n += proto.SizeVarint(35<<3 | proto.WireBytes) + n += proto.SizeVarint(uint64(len(x.Field35))) + n += len(x.Field35) + case *TwoOneofs_SubMessage2: + s := proto.Size(x.SubMessage2) + n += proto.SizeVarint(36<<3 | proto.WireBytes) + n += proto.SizeVarint(uint64(s)) + n += s + case nil: + default: + panic(fmt.Sprintf("proto: unexpected type %T in oneof", x)) + } + return n +} + +type CustomOneof struct { + // Types that are valid to be assigned to Custom: + // *CustomOneof_Stringy + // *CustomOneof_CustomType + // *CustomOneof_CastType + // *CustomOneof_MyCustomName + Custom isCustomOneof_Custom `protobuf_oneof:"custom"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *CustomOneof) Reset() { *m = CustomOneof{} } +func (*CustomOneof) ProtoMessage() {} +func (*CustomOneof) Descriptor() ([]byte, []int) { return fileDescriptorOne, []int{3} } + +type isCustomOneof_Custom interface { + isCustomOneof_Custom() + Equal(interface{}) bool + VerboseEqual(interface{}) error + MarshalTo([]byte) (int, error) + Size() int +} + +type CustomOneof_Stringy struct { + Stringy string `protobuf:"bytes,34,opt,name=Stringy,json=stringy,oneof"` +} +type CustomOneof_CustomType struct { + CustomType github_com_gogo_protobuf_test_custom.Uint128 `protobuf:"bytes,35,opt,name=CustomType,json=customType,oneof,customtype=github.com/gogo/protobuf/test/custom.Uint128"` +} +type CustomOneof_CastType struct { + CastType github_com_gogo_protobuf_test_casttype.MyUint64Type `protobuf:"varint,36,opt,name=CastType,json=castType,oneof,casttype=github.com/gogo/protobuf/test/casttype.MyUint64Type"` +} +type CustomOneof_MyCustomName struct { + MyCustomName int64 `protobuf:"varint,37,opt,name=CustomName,json=customName,oneof"` +} + +func (*CustomOneof_Stringy) isCustomOneof_Custom() {} +func (*CustomOneof_CustomType) isCustomOneof_Custom() {} +func (*CustomOneof_CastType) isCustomOneof_Custom() {} +func (*CustomOneof_MyCustomName) isCustomOneof_Custom() {} + +func (m *CustomOneof) GetCustom() isCustomOneof_Custom { + if m != nil { + return m.Custom + } + return nil +} + +func (m *CustomOneof) GetStringy() string { + if x, ok := m.GetCustom().(*CustomOneof_Stringy); ok { + return x.Stringy + } + return "" +} + +func (m *CustomOneof) GetCastType() github_com_gogo_protobuf_test_casttype.MyUint64Type { + if x, ok := m.GetCustom().(*CustomOneof_CastType); ok { + return x.CastType + } + return 0 +} + +func (m *CustomOneof) GetMyCustomName() int64 { + if x, ok := m.GetCustom().(*CustomOneof_MyCustomName); ok { + return x.MyCustomName + } + return 0 +} + +// XXX_OneofFuncs is for the internal use of the proto package. +func (*CustomOneof) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{}) { + return _CustomOneof_OneofMarshaler, _CustomOneof_OneofUnmarshaler, _CustomOneof_OneofSizer, []interface{}{ + (*CustomOneof_Stringy)(nil), + (*CustomOneof_CustomType)(nil), + (*CustomOneof_CastType)(nil), + (*CustomOneof_MyCustomName)(nil), + } +} + +func _CustomOneof_OneofMarshaler(msg proto.Message, b *proto.Buffer) error { + m := msg.(*CustomOneof) + // custom + switch x := m.Custom.(type) { + case *CustomOneof_Stringy: + _ = b.EncodeVarint(34<<3 | proto.WireBytes) + _ = b.EncodeStringBytes(x.Stringy) + case *CustomOneof_CustomType: + _ = b.EncodeVarint(35<<3 | proto.WireBytes) + data, err := x.CustomType.Marshal() + if err != nil { + return err + } + _ = b.EncodeRawBytes(data) + case *CustomOneof_CastType: + _ = b.EncodeVarint(36<<3 | proto.WireVarint) + _ = b.EncodeVarint(uint64(x.CastType)) + case *CustomOneof_MyCustomName: + _ = b.EncodeVarint(37<<3 | proto.WireVarint) + _ = b.EncodeVarint(uint64(x.MyCustomName)) + case nil: + default: + return fmt.Errorf("CustomOneof.Custom has unexpected type %T", x) + } + return nil +} + +func _CustomOneof_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) { + m := msg.(*CustomOneof) + switch tag { + case 34: // custom.Stringy + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeStringBytes() + m.Custom = &CustomOneof_Stringy{x} + return true, err + case 35: // custom.CustomType + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeRawBytes(true) + if err != nil { + return true, err + } + var cc github_com_gogo_protobuf_test_custom.Uint128 + c := &cc + err = c.Unmarshal(x) + m.Custom = &CustomOneof_CustomType{*c} + return true, err + case 36: // custom.CastType + if wire != proto.WireVarint { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeVarint() + m.Custom = &CustomOneof_CastType{github_com_gogo_protobuf_test_casttype.MyUint64Type(x)} + return true, err + case 37: // custom.CustomName + if wire != proto.WireVarint { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeVarint() + m.Custom = &CustomOneof_MyCustomName{int64(x)} + return true, err + default: + return false, nil + } +} + +func _CustomOneof_OneofSizer(msg proto.Message) (n int) { + m := msg.(*CustomOneof) + // custom + switch x := m.Custom.(type) { + case *CustomOneof_Stringy: + n += proto.SizeVarint(34<<3 | proto.WireBytes) + n += proto.SizeVarint(uint64(len(x.Stringy))) + n += len(x.Stringy) + case *CustomOneof_CustomType: + n += proto.SizeVarint(35<<3 | proto.WireBytes) + n += proto.SizeVarint(uint64(x.CustomType.Size())) + n += x.CustomType.Size() + case *CustomOneof_CastType: + n += proto.SizeVarint(36<<3 | proto.WireVarint) + n += proto.SizeVarint(uint64(x.CastType)) + case *CustomOneof_MyCustomName: + n += proto.SizeVarint(37<<3 | proto.WireVarint) + n += proto.SizeVarint(uint64(x.MyCustomName)) + case nil: + default: + panic(fmt.Sprintf("proto: unexpected type %T in oneof", x)) + } + return n +} + +func init() { + proto.RegisterType((*Subby)(nil), "one.Subby") + proto.RegisterType((*AllTypesOneOf)(nil), "one.AllTypesOneOf") + proto.RegisterType((*TwoOneofs)(nil), "one.TwoOneofs") + proto.RegisterType((*CustomOneof)(nil), "one.CustomOneof") +} +func (this *Subby) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return OneDescription() +} +func (this *AllTypesOneOf) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return OneDescription() +} +func (this *TwoOneofs) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return OneDescription() +} +func (this *CustomOneof) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return OneDescription() +} +func OneDescription() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + d := &github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet{} + var gzipped = []byte{ + // 3724 bytes of a gzipped FileDescriptorSet + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xcc, 0x5a, 0x6b, 0x6c, 0x23, 0xe5, + 0xd5, 0x5e, 0xc7, 0x97, 0xd8, 0xc7, 0x8e, 0xe3, 0x4c, 0xc2, 0xae, 0x37, 0xc0, 0x86, 0xf5, 0x72, + 0x59, 0x16, 0x48, 0x76, 0x93, 0xcd, 0x5e, 0xcc, 0xf7, 0x81, 0xe2, 0xc4, 0x1b, 0xb2, 0x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x28, 0x6b, 0x4a, 0x55, 0xdf, + 0x30, 0xd2, 0x31, 0x4a, 0x30, 0xd6, 0x39, 0x11, 0x6a, 0x38, 0x8b, 0x76, 0x0b, 0x68, 0x26, 0x27, + 0x4d, 0xcf, 0xb5, 0xb4, 0x17, 0x22, 0xe6, 0x96, 0x6e, 0xa9, 0x97, 0xd3, 0x09, 0x1a, 0x21, 0xfc, + 0x2a, 0xf3, 0x8f, 0x30, 0x0c, 0xf6, 0x12, 0x62, 0x77, 0x42, 0x78, 0x83, 0xcc, 0x12, 0x03, 0x6c, + 0x17, 0x3e, 0x60, 0x18, 0xaf, 0x13, 0x23, 0x1f, 0xd0, 0x89, 0x33, 0x10, 0xd7, 0x35, 0xd3, 0xd2, + 0xca, 0x2c, 0x22, 0x82, 0x3d, 0xc6, 0x14, 0x30, 0x50, 0x67, 0x48, 0x85, 0x3e, 0x50, 0x48, 0x9d, + 0x83, 0x41, 0x7b, 0x48, 0x4a, 0x53, 0xd5, 0x2b, 0x22, 0x36, 0x27, 0xfc, 0x46, 0x32, 0x9e, 0x17, + 0x38, 0x99, 0xc0, 0xe4, 0xa4, 0xe6, 0xb9, 0x96, 0xe6, 0x00, 0x0c, 0x5d, 0x33, 0x36, 0x70, 0x7b, + 0x95, 0x6a, 0x18, 0x27, 0xdd, 0xbd, 0x54, 0x20, 0x26, 0x1d, 0x5e, 0x32, 0x98, 0xb4, 0x54, 0x93, + 0x4e, 0x3b, 0xa1, 0xd6, 0xbf, 0x4d, 0xa4, 0x2c, 0xb1, 0x4d, 0xd6, 0x11, 0x6d, 0x45, 0x48, 0x36, + 0x35, 0x12, 0xf7, 0xe8, 0x62, 0x36, 0xb3, 0x18, 0x1d, 0xc4, 0xb8, 0xef, 0xcc, 0x64, 0x0e, 0x63, + 0x13, 0x1b, 0x68, 0xba, 0x2f, 0xa5, 0x43, 0x60, 0x0b, 0x14, 0x1a, 0x56, 0x40, 0xb3, 0x50, 0x42, + 0x08, 0x97, 0x51, 0x36, 0x7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c, 0xfc, 0xb0, 0x0f, 0x42, + 0x74, 0xbf, 0x0d, 0x42, 0x7c, 0xed, 0xfe, 0x95, 0xbc, 0x32, 0x57, 0x28, 0xe6, 0x16, 0xf3, 0xa9, + 0x80, 0x94, 0x04, 0xa0, 0x82, 0x33, 0x8b, 0x85, 0x99, 0xb5, 0x54, 0x9f, 0x7d, 0xbd, 0xb0, 0xbc, + 0x76, 0xe2, 0x78, 0x2a, 0x68, 0x03, 0x8a, 0x4c, 0x10, 0x72, 0x1b, 0x4c, 0x4d, 0xa6, 0xc2, 0x18, + 0x09, 0x09, 0x46, 0xb0, 0x70, 0x2e, 0x3f, 0x87, 0x16, 0x11, 0xaf, 0x04, 0x6d, 0xfa, 0xa5, 0x01, + 0x88, 0x51, 0x49, 0xae, 0x50, 0x58, 0x4c, 0x45, 0x6d, 0xce, 0xd5, 0x35, 0x79, 0x61, 0x79, 0x3e, + 0x15, 0xb3, 0x39, 0xe7, 0xe5, 0x42, 0x71, 0x25, 0x05, 0x36, 0xc3, 0x52, 0x7e, 0x75, 0x75, 0x66, + 0x3e, 0x9f, 0x8a, 0xdb, 0x16, 0xb9, 0xfb, 0xd7, 0xf2, 0xab, 0xa9, 0x84, 0x67, 0x58, 0x78, 0x8b, + 0x01, 0xfb, 0x16, 0xf9, 0xe5, 0xe2, 0x52, 0x2a, 0x29, 0x0d, 0xc1, 0x00, 0xbb, 0x85, 0x18, 0xc4, + 0x60, 0x9b, 0x08, 0x47, 0x9a, 0x72, 0x06, 0xc2, 0x58, 0x86, 0x3c, 0x02, 0xb4, 0x90, 0x32, 0xb3, + 0x10, 0xa6, 0xd1, 0x85, 0x51, 0x9c, 0x5c, 0x9c, 0xc9, 0xe5, 0x17, 0x95, 0xc2, 0xca, 0xda, 0x42, + 0x61, 0x79, 0x66, 0x11, 0x7d, 0x67, 0xcb, 0xe4, 0xfc, 0xff, 0x14, 0x17, 0xe4, 0xfc, 0x1c, 0xfa, + 0xcf, 0x25, 0x5b, 0xc9, 0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xf5, 0x01, 0x2a, 0x9a, 0x21, 0x92, 0x5e, 0xfd, 0xf7, 0x6f, + 0x89, 0xcd, 0x67, 0x02, 0x90, 0x6a, 0x6f, 0xc6, 0xda, 0x06, 0x18, 0xf8, 0x48, 0x07, 0xf8, 0x54, + 0x00, 0x92, 0xde, 0x0e, 0xac, 0x6d, 0x78, 0x07, 0x3f, 0xd2, 0xe1, 0x3d, 0x19, 0x80, 0x01, 0x4f, + 0xdf, 0xf5, 0x1f, 0x35, 0xba, 0x27, 0x82, 0x30, 0xdc, 0x05, 0x87, 0x09, 0x88, 0x35, 0xa8, 0xac, + 0x67, 0xbe, 0xa3, 0x97, 0x7b, 0x8d, 0x93, 0xfa, 0xb7, 0xa2, 0x36, 0x2d, 0xde, 0xcf, 0x62, 0xbd, + 0xac, 0x96, 0x31, 0xa9, 0x56, 0x37, 0xaa, 0xd8, 0xbe, 0xb1, 0x27, 0x16, 0xd6, 0xb5, 0x0e, 0x3a, + 0x72, 0xf6, 0x78, 0x7c, 0x3b, 0x48, 0x0d, 0xc3, 0xac, 0x5a, 0xd5, 0x8b, 0xe4, 0x78, 0x4e, 0x3c, + 0x48, 0x93, 0x2e, 0x36, 0x24, 0xa7, 0x84, 0x66, 0x41, 0xb7, 0x6c, 0x6b, 0x5d, 0xab, 0xa8, 0x6d, + 0xd6, 0x24, 0x0d, 0x05, 0xe5, 0x94, 0xd0, 0xd8, 0xd6, 0xd8, 0x68, 0x96, 0x8d, 0x16, 0x69, 0x08, + 0x98, 0x1d, 0xc9, 0x7a, 0x01, 0x39, 0xce, 0x64, 0xb6, 0x09, 0xef, 0xd8, 0x9c, 0x27, 0xf8, 0x84, + 0x1c, 0x67, 0x32, 0x66, 0x72, 0x0b, 0x0c, 0xaa, 0x95, 0x4a, 0x93, 0x90, 0x0b, 0x22, 0xd6, 0x86, + 0x26, 0x6d, 0x31, 0x35, 0x1c, 0x3d, 0x0b, 0x51, 0xe1, 0x07, 0x52, 0x58, 0x88, 0x27, 0xb0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d, 0xab, 0x4b, 0x68, 0x57, 0x40, 0xc8, + 0xed, 0xf5, 0xe8, 0x81, 0xf3, 0x49, 0xce, 0x29, 0x71, 0xac, 0x58, 0x16, 0xc2, 0x78, 0x16, 0x86, + 0xf0, 0x49, 0x7d, 0xdd, 0x30, 0xf9, 0x73, 0x6f, 0x0f, 0x74, 0x4f, 0x71, 0xba, 0x41, 0x0e, 0xa4, + 0x4f, 0xc1, 0x84, 0xeb, 0x34, 0x44, 0x37, 0xf0, 0x01, 0xa8, 0x07, 0x8a, 0xa7, 0x39, 0x45, 0x3f, + 0xb1, 0x27, 0xd0, 0x19, 0x48, 0x54, 0x0c, 0x9e, 0x86, 0xfd, 0xe1, 0xcf, 0x70, 0x78, 0x5c, 0x60, + 0x38, 0x45, 0xc3, 0x68, 0xb4, 0x6a, 0x24, 0x47, 0xfb, 0x53, 0x7c, 0x59, 0x50, 0x08, 0x0c, 0xa7, + 0xd8, 0x85, 0x5b, 0xbf, 0x22, 0x28, 0x4c, 0x97, 0x3f, 0xef, 0x26, 0x67, 0xbd, 0xb5, 0x2d, 0x43, + 0xef, 0x65, 0x10, 0xcf, 0x72, 0x06, 0xe0, 0x10, 0x42, 0x70, 0x27, 0xc4, 0x7a, 0x5d, 0x88, 0xaf, + 0x72, 0x78, 0x54, 0x13, 0x2b, 0x80, 0xfb, 0x4c, 0x24, 0x19, 0xf2, 0x6e, 0xc5, 0x9f, 0xe2, 0x6b, + 0x9c, 0x22, 0xe9, 0x82, 0xf1, 0x69, 0x58, 0x9a, 0x69, 0xe1, 0xa3, 0x7a, 0x0f, 0x24, 0xcf, 0x8b, + 0x69, 0x70, 0x08, 0x77, 0xe5, 0xba, 0xa6, 0x97, 0x36, 0x7b, 0x63, 0x78, 0x41, 0xb8, 0x52, 0x60, + 0x08, 0x05, 0x66, 0x9e, 0xba, 0xda, 0xc4, 0x87, 0xeb, 0x5a, 0x4f, 0xcb, 0xf1, 0x75, 0xce, 0x91, + 0xb0, 0x41, 0xdc, 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xad, 0x39, 0x41, 0x8f, + 0x37, 0x43, 0xb6, 0xe6, 0x84, 0xad, 0x39, 0x49, 0x4f, 0x35, 0x87, 0x6c, 0xcd, 0x49, 0x5b, 0x73, + 0x8a, 0x9e, 0x64, 0x4a, 0xb6, 0xe6, 0x94, 0xad, 0x39, 0x4d, 0x5f, 0x42, 0xf7, 0xdb, 0x9a, 0xd3, + 0xd2, 0x28, 0xf4, 0xb3, 0x99, 0x1e, 0xa5, 0x2f, 0x6d, 0x06, 0x51, 0xd5, 0xcf, 0xa6, 0x7a, 0xd4, + 0xd1, 0x1d, 0xa3, 0x2f, 0x9a, 0x23, 0x8e, 0xee, 0x98, 0xa3, 0x9b, 0xa4, 0x3f, 0x9c, 0x4c, 0x39, + 0xba, 0x49, 0x47, 0x37, 0x95, 0x1e, 0x20, 0x3b, 0xd5, 0xd1, 0x4d, 0x39, 0xba, 0xe3, 0xe9, 0x24, + 0x59, 0x01, 0x47, 0x77, 0xdc, 0xd1, 0x4d, 0xa7, 0x07, 0xc9, 0x81, 0xad, 0xa3, 0x9b, 0x96, 0xee, + 0x80, 0x38, 0x2e, 0x95, 0xc2, 0xdf, 0x31, 0xd2, 0x17, 0xda, 0xf1, 0x49, 0x18, 0x27, 0x31, 0x41, + 0x97, 0x15, 0x6d, 0x01, 0x0d, 0x78, 0x82, 0xca, 0x25, 0x80, 0x3e, 0xb8, 0x2a, 0xf4, 0x07, 0x59, + 0x99, 0xd7, 0x02, 0x10, 0x5b, 0xbb, 0x64, 0xd0, 0xdf, 0xee, 0x98, 0xff, 0xe2, 0xc5, 0x15, 0x83, + 0x9e, 0x3a, 0x9e, 0xce, 0xd0, 0x09, 0x05, 0xf8, 0xa0, 0xa7, 0x9c, 0x09, 0x4d, 0x4d, 0xa7, 0x0f, + 0xd1, 0x09, 0xd9, 0xba, 0x69, 0x69, 0x02, 0x12, 0xae, 0x09, 0x4d, 0xd2, 0x77, 0xd4, 0xde, 0x19, + 0x05, 0xe4, 0xb8, 0x33, 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4, 0xfb, 0x03, 0x7b, 0xfe, 0x19, + 0x00, 0x00, 0xff, 0xff, 0xc2, 0x89, 0xd3, 0xd0, 0xe7, 0x2e, 0x00, 0x00, + } + r := bytes.NewReader(gzipped) + gzipr, err := compress_gzip.NewReader(r) + if err != nil { + panic(err) + } + ungzipped, err := io_ioutil.ReadAll(gzipr) + if err != nil { + panic(err) + } + if err := github_com_gogo_protobuf_proto.Unmarshal(ungzipped, d); err != nil { + panic(err) + } + return d +} +func (this *Subby) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*Subby) + if !ok { + that2, ok := that.(Subby) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *Subby") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *Subby but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *Subby but is not nil && this == nil") + } + if this.Sub != nil && that1.Sub != nil { + if *this.Sub != *that1.Sub { + return fmt.Errorf("Sub this(%v) Not Equal that(%v)", *this.Sub, *that1.Sub) + } + } else if this.Sub != nil { + return fmt.Errorf("this.Sub == nil && that.Sub != nil") + } else if that1.Sub != nil { + return fmt.Errorf("Sub this(%v) Not Equal that(%v)", this.Sub, that1.Sub) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *Subby) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*Subby) + if !ok { + that2, ok := that.(Subby) + 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.Sub != nil && that1.Sub != nil { + if *this.Sub != *that1.Sub { + return false + } + } else if this.Sub != nil { + return false + } else if that1.Sub != nil { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *AllTypesOneOf) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*AllTypesOneOf) + if !ok { + that2, ok := that.(AllTypesOneOf) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *AllTypesOneOf") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *AllTypesOneOf but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *AllTypesOneOf but is not nil && this == nil") + } + if that1.TestOneof == nil { + if this.TestOneof != nil { + return fmt.Errorf("this.TestOneof != nil && that1.TestOneof == nil") + } + } else if this.TestOneof == nil { + return fmt.Errorf("this.TestOneof == nil && that1.TestOneof != nil") + } else if err := this.TestOneof.VerboseEqual(that1.TestOneof); err != nil { + return err + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *AllTypesOneOf_Field1) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*AllTypesOneOf_Field1) + if !ok { + that2, ok := that.(AllTypesOneOf_Field1) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *AllTypesOneOf_Field1") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *AllTypesOneOf_Field1 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *AllTypesOneOf_Field1 but is not nil && this == nil") + } + if this.Field1 != that1.Field1 { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) + } + return nil +} +func (this *AllTypesOneOf_Field2) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*AllTypesOneOf_Field2) + if !ok { + that2, ok := that.(AllTypesOneOf_Field2) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *AllTypesOneOf_Field2") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *AllTypesOneOf_Field2 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *AllTypesOneOf_Field2 but is not nil && this == nil") + } + if this.Field2 != that1.Field2 { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) + } + return nil +} +func (this *AllTypesOneOf_Field3) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*AllTypesOneOf_Field3) + if !ok { + that2, ok := that.(AllTypesOneOf_Field3) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *AllTypesOneOf_Field3") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *AllTypesOneOf_Field3 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *AllTypesOneOf_Field3 but is not nil && this == nil") + } + if this.Field3 != that1.Field3 { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", this.Field3, that1.Field3) + } + return nil +} +func (this *AllTypesOneOf_Field4) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*AllTypesOneOf_Field4) + if !ok { + that2, ok := that.(AllTypesOneOf_Field4) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *AllTypesOneOf_Field4") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *AllTypesOneOf_Field4 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *AllTypesOneOf_Field4 but is not nil && this == nil") + } + if this.Field4 != that1.Field4 { + return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", this.Field4, that1.Field4) + } + return nil +} +func (this *AllTypesOneOf_Field5) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*AllTypesOneOf_Field5) + if !ok { + that2, ok := that.(AllTypesOneOf_Field5) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *AllTypesOneOf_Field5") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *AllTypesOneOf_Field5 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *AllTypesOneOf_Field5 but is not nil && this == nil") + } + if this.Field5 != that1.Field5 { + return fmt.Errorf("Field5 this(%v) Not Equal that(%v)", this.Field5, that1.Field5) + } + return nil +} +func (this *AllTypesOneOf_Field6) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*AllTypesOneOf_Field6) + if !ok { + that2, ok := that.(AllTypesOneOf_Field6) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *AllTypesOneOf_Field6") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *AllTypesOneOf_Field6 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *AllTypesOneOf_Field6 but is not nil && this == nil") + } + if this.Field6 != that1.Field6 { + return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", this.Field6, that1.Field6) + } + return nil +} +func (this *AllTypesOneOf_Field7) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*AllTypesOneOf_Field7) + if !ok { + that2, ok := that.(AllTypesOneOf_Field7) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *AllTypesOneOf_Field7") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *AllTypesOneOf_Field7 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *AllTypesOneOf_Field7 but is not nil && this == nil") + } + if this.Field7 != that1.Field7 { + return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", this.Field7, that1.Field7) + } + return nil +} +func (this *AllTypesOneOf_Field8) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*AllTypesOneOf_Field8) + if !ok { + that2, ok := that.(AllTypesOneOf_Field8) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *AllTypesOneOf_Field8") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *AllTypesOneOf_Field8 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *AllTypesOneOf_Field8 but is not nil && this == nil") + } + if this.Field8 != that1.Field8 { + return fmt.Errorf("Field8 this(%v) Not Equal that(%v)", this.Field8, that1.Field8) + } + return nil +} +func (this *AllTypesOneOf_Field9) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*AllTypesOneOf_Field9) + if !ok { + that2, ok := that.(AllTypesOneOf_Field9) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *AllTypesOneOf_Field9") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *AllTypesOneOf_Field9 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *AllTypesOneOf_Field9 but is not nil && this == nil") + } + if this.Field9 != that1.Field9 { + return fmt.Errorf("Field9 this(%v) Not Equal that(%v)", this.Field9, that1.Field9) + } + return nil +} +func (this *AllTypesOneOf_Field10) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*AllTypesOneOf_Field10) + if !ok { + that2, ok := that.(AllTypesOneOf_Field10) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *AllTypesOneOf_Field10") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *AllTypesOneOf_Field10 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *AllTypesOneOf_Field10 but is not nil && this == nil") + } + if this.Field10 != that1.Field10 { + return fmt.Errorf("Field10 this(%v) Not Equal that(%v)", this.Field10, that1.Field10) + } + return nil +} +func (this *AllTypesOneOf_Field11) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*AllTypesOneOf_Field11) + if !ok { + that2, ok := that.(AllTypesOneOf_Field11) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *AllTypesOneOf_Field11") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *AllTypesOneOf_Field11 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *AllTypesOneOf_Field11 but is not nil && this == nil") + } + if this.Field11 != that1.Field11 { + return fmt.Errorf("Field11 this(%v) Not Equal that(%v)", this.Field11, that1.Field11) + } + return nil +} +func (this *AllTypesOneOf_Field12) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*AllTypesOneOf_Field12) + if !ok { + that2, ok := that.(AllTypesOneOf_Field12) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *AllTypesOneOf_Field12") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *AllTypesOneOf_Field12 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *AllTypesOneOf_Field12 but is not nil && this == nil") + } + if this.Field12 != that1.Field12 { + return fmt.Errorf("Field12 this(%v) Not Equal that(%v)", this.Field12, that1.Field12) + } + return nil +} +func (this *AllTypesOneOf_Field13) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*AllTypesOneOf_Field13) + if !ok { + that2, ok := that.(AllTypesOneOf_Field13) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *AllTypesOneOf_Field13") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *AllTypesOneOf_Field13 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *AllTypesOneOf_Field13 but is not nil && this == nil") + } + if this.Field13 != that1.Field13 { + return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", this.Field13, that1.Field13) + } + return nil +} +func (this *AllTypesOneOf_Field14) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*AllTypesOneOf_Field14) + if !ok { + that2, ok := that.(AllTypesOneOf_Field14) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *AllTypesOneOf_Field14") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *AllTypesOneOf_Field14 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *AllTypesOneOf_Field14 but is not nil && this == nil") + } + if this.Field14 != that1.Field14 { + return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", this.Field14, that1.Field14) + } + return nil +} +func (this *AllTypesOneOf_Field15) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*AllTypesOneOf_Field15) + if !ok { + that2, ok := that.(AllTypesOneOf_Field15) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *AllTypesOneOf_Field15") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *AllTypesOneOf_Field15 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *AllTypesOneOf_Field15 but is not nil && this == nil") + } + if !bytes.Equal(this.Field15, that1.Field15) { + return fmt.Errorf("Field15 this(%v) Not Equal that(%v)", this.Field15, that1.Field15) + } + return nil +} +func (this *AllTypesOneOf_SubMessage) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*AllTypesOneOf_SubMessage) + if !ok { + that2, ok := that.(AllTypesOneOf_SubMessage) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *AllTypesOneOf_SubMessage") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *AllTypesOneOf_SubMessage but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *AllTypesOneOf_SubMessage but is not nil && this == nil") + } + if !this.SubMessage.Equal(that1.SubMessage) { + return fmt.Errorf("SubMessage this(%v) Not Equal that(%v)", this.SubMessage, that1.SubMessage) + } + return nil +} +func (this *AllTypesOneOf) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*AllTypesOneOf) + if !ok { + that2, ok := that.(AllTypesOneOf) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + if this == nil { + return true + } + return false + } else if this == nil { + return false + } + if that1.TestOneof == nil { + if this.TestOneof != nil { + return false + } + } else if this.TestOneof == nil { + return false + } else if !this.TestOneof.Equal(that1.TestOneof) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *AllTypesOneOf_Field1) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*AllTypesOneOf_Field1) + if !ok { + that2, ok := that.(AllTypesOneOf_Field1) + 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.Field1 != that1.Field1 { + return false + } + return true +} +func (this *AllTypesOneOf_Field2) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*AllTypesOneOf_Field2) + if !ok { + that2, ok := that.(AllTypesOneOf_Field2) + 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.Field2 != that1.Field2 { + return false + } + return true +} +func (this *AllTypesOneOf_Field3) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*AllTypesOneOf_Field3) + if !ok { + that2, ok := that.(AllTypesOneOf_Field3) + 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.Field3 != that1.Field3 { + return false + } + return true +} +func (this *AllTypesOneOf_Field4) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*AllTypesOneOf_Field4) + if !ok { + that2, ok := that.(AllTypesOneOf_Field4) + 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.Field4 != that1.Field4 { + return false + } + return true +} +func (this *AllTypesOneOf_Field5) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*AllTypesOneOf_Field5) + if !ok { + that2, ok := that.(AllTypesOneOf_Field5) + 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.Field5 != that1.Field5 { + return false + } + return true +} +func (this *AllTypesOneOf_Field6) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*AllTypesOneOf_Field6) + if !ok { + that2, ok := that.(AllTypesOneOf_Field6) + 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.Field6 != that1.Field6 { + return false + } + return true +} +func (this *AllTypesOneOf_Field7) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*AllTypesOneOf_Field7) + if !ok { + that2, ok := that.(AllTypesOneOf_Field7) + 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.Field7 != that1.Field7 { + return false + } + return true +} +func (this *AllTypesOneOf_Field8) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*AllTypesOneOf_Field8) + if !ok { + that2, ok := that.(AllTypesOneOf_Field8) + 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.Field8 != that1.Field8 { + return false + } + return true +} +func (this *AllTypesOneOf_Field9) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*AllTypesOneOf_Field9) + if !ok { + that2, ok := that.(AllTypesOneOf_Field9) + 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.Field9 != that1.Field9 { + return false + } + return true +} +func (this *AllTypesOneOf_Field10) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*AllTypesOneOf_Field10) + if !ok { + that2, ok := that.(AllTypesOneOf_Field10) + 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.Field10 != that1.Field10 { + return false + } + return true +} +func (this *AllTypesOneOf_Field11) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*AllTypesOneOf_Field11) + if !ok { + that2, ok := that.(AllTypesOneOf_Field11) + 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.Field11 != that1.Field11 { + return false + } + return true +} +func (this *AllTypesOneOf_Field12) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*AllTypesOneOf_Field12) + if !ok { + that2, ok := that.(AllTypesOneOf_Field12) + 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.Field12 != that1.Field12 { + return false + } + return true +} +func (this *AllTypesOneOf_Field13) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*AllTypesOneOf_Field13) + if !ok { + that2, ok := that.(AllTypesOneOf_Field13) + 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.Field13 != that1.Field13 { + return false + } + return true +} +func (this *AllTypesOneOf_Field14) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*AllTypesOneOf_Field14) + if !ok { + that2, ok := that.(AllTypesOneOf_Field14) + 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.Field14 != that1.Field14 { + return false + } + return true +} +func (this *AllTypesOneOf_Field15) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*AllTypesOneOf_Field15) + if !ok { + that2, ok := that.(AllTypesOneOf_Field15) + 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.Field15, that1.Field15) { + return false + } + return true +} +func (this *AllTypesOneOf_SubMessage) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*AllTypesOneOf_SubMessage) + if !ok { + that2, ok := that.(AllTypesOneOf_SubMessage) + 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.SubMessage.Equal(that1.SubMessage) { + return false + } + return true +} +func (this *TwoOneofs) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*TwoOneofs) + if !ok { + that2, ok := that.(TwoOneofs) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *TwoOneofs") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *TwoOneofs but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *TwoOneofs but is not nil && this == nil") + } + if that1.One == nil { + if this.One != nil { + return fmt.Errorf("this.One != nil && that1.One == nil") + } + } else if this.One == nil { + return fmt.Errorf("this.One == nil && that1.One != nil") + } else if err := this.One.VerboseEqual(that1.One); err != nil { + return err + } + if that1.Two == nil { + if this.Two != nil { + return fmt.Errorf("this.Two != nil && that1.Two == nil") + } + } else if this.Two == nil { + return fmt.Errorf("this.Two == nil && that1.Two != nil") + } else if err := this.Two.VerboseEqual(that1.Two); err != nil { + return err + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *TwoOneofs_Field1) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*TwoOneofs_Field1) + if !ok { + that2, ok := that.(TwoOneofs_Field1) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *TwoOneofs_Field1") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *TwoOneofs_Field1 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *TwoOneofs_Field1 but is not nil && this == nil") + } + if this.Field1 != that1.Field1 { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) + } + return nil +} +func (this *TwoOneofs_Field2) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*TwoOneofs_Field2) + if !ok { + that2, ok := that.(TwoOneofs_Field2) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *TwoOneofs_Field2") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *TwoOneofs_Field2 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *TwoOneofs_Field2 but is not nil && this == nil") + } + if this.Field2 != that1.Field2 { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) + } + return nil +} +func (this *TwoOneofs_Field3) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*TwoOneofs_Field3) + if !ok { + that2, ok := that.(TwoOneofs_Field3) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *TwoOneofs_Field3") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *TwoOneofs_Field3 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *TwoOneofs_Field3 but is not nil && this == nil") + } + if this.Field3 != that1.Field3 { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", this.Field3, that1.Field3) + } + return nil +} +func (this *TwoOneofs_Field34) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*TwoOneofs_Field34) + if !ok { + that2, ok := that.(TwoOneofs_Field34) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *TwoOneofs_Field34") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *TwoOneofs_Field34 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *TwoOneofs_Field34 but is not nil && this == nil") + } + if this.Field34 != that1.Field34 { + return fmt.Errorf("Field34 this(%v) Not Equal that(%v)", this.Field34, that1.Field34) + } + return nil +} +func (this *TwoOneofs_Field35) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*TwoOneofs_Field35) + if !ok { + that2, ok := that.(TwoOneofs_Field35) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *TwoOneofs_Field35") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *TwoOneofs_Field35 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *TwoOneofs_Field35 but is not nil && this == nil") + } + if !bytes.Equal(this.Field35, that1.Field35) { + return fmt.Errorf("Field35 this(%v) Not Equal that(%v)", this.Field35, that1.Field35) + } + return nil +} +func (this *TwoOneofs_SubMessage2) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*TwoOneofs_SubMessage2) + if !ok { + that2, ok := that.(TwoOneofs_SubMessage2) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *TwoOneofs_SubMessage2") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *TwoOneofs_SubMessage2 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *TwoOneofs_SubMessage2 but is not nil && this == nil") + } + if !this.SubMessage2.Equal(that1.SubMessage2) { + return fmt.Errorf("SubMessage2 this(%v) Not Equal that(%v)", this.SubMessage2, that1.SubMessage2) + } + return nil +} +func (this *TwoOneofs) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*TwoOneofs) + if !ok { + that2, ok := that.(TwoOneofs) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + if this == nil { + return true + } + return false + } else if this == nil { + return false + } + if that1.One == nil { + if this.One != nil { + return false + } + } else if this.One == nil { + return false + } else if !this.One.Equal(that1.One) { + return false + } + if that1.Two == nil { + if this.Two != nil { + return false + } + } else if this.Two == nil { + return false + } else if !this.Two.Equal(that1.Two) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *TwoOneofs_Field1) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*TwoOneofs_Field1) + if !ok { + that2, ok := that.(TwoOneofs_Field1) + 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.Field1 != that1.Field1 { + return false + } + return true +} +func (this *TwoOneofs_Field2) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*TwoOneofs_Field2) + if !ok { + that2, ok := that.(TwoOneofs_Field2) + 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.Field2 != that1.Field2 { + return false + } + return true +} +func (this *TwoOneofs_Field3) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*TwoOneofs_Field3) + if !ok { + that2, ok := that.(TwoOneofs_Field3) + 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.Field3 != that1.Field3 { + return false + } + return true +} +func (this *TwoOneofs_Field34) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*TwoOneofs_Field34) + if !ok { + that2, ok := that.(TwoOneofs_Field34) + 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.Field34 != that1.Field34 { + return false + } + return true +} +func (this *TwoOneofs_Field35) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*TwoOneofs_Field35) + if !ok { + that2, ok := that.(TwoOneofs_Field35) + 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.Field35, that1.Field35) { + return false + } + return true +} +func (this *TwoOneofs_SubMessage2) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*TwoOneofs_SubMessage2) + if !ok { + that2, ok := that.(TwoOneofs_SubMessage2) + 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.SubMessage2.Equal(that1.SubMessage2) { + return false + } + return true +} +func (this *CustomOneof) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*CustomOneof) + if !ok { + that2, ok := that.(CustomOneof) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *CustomOneof") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *CustomOneof but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *CustomOneof but is not nil && this == nil") + } + if that1.Custom == nil { + if this.Custom != nil { + return fmt.Errorf("this.Custom != nil && that1.Custom == nil") + } + } else if this.Custom == nil { + return fmt.Errorf("this.Custom == nil && that1.Custom != nil") + } else if err := this.Custom.VerboseEqual(that1.Custom); err != nil { + return err + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *CustomOneof_Stringy) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*CustomOneof_Stringy) + if !ok { + that2, ok := that.(CustomOneof_Stringy) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *CustomOneof_Stringy") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *CustomOneof_Stringy but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *CustomOneof_Stringy but is not nil && this == nil") + } + if this.Stringy != that1.Stringy { + return fmt.Errorf("Stringy this(%v) Not Equal that(%v)", this.Stringy, that1.Stringy) + } + return nil +} +func (this *CustomOneof_CustomType) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*CustomOneof_CustomType) + if !ok { + that2, ok := that.(CustomOneof_CustomType) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *CustomOneof_CustomType") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *CustomOneof_CustomType but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *CustomOneof_CustomType but is not nil && this == nil") + } + if !this.CustomType.Equal(that1.CustomType) { + return fmt.Errorf("CustomType this(%v) Not Equal that(%v)", this.CustomType, that1.CustomType) + } + return nil +} +func (this *CustomOneof_CastType) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*CustomOneof_CastType) + if !ok { + that2, ok := that.(CustomOneof_CastType) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *CustomOneof_CastType") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *CustomOneof_CastType but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *CustomOneof_CastType but is not nil && this == nil") + } + if this.CastType != that1.CastType { + return fmt.Errorf("CastType this(%v) Not Equal that(%v)", this.CastType, that1.CastType) + } + return nil +} +func (this *CustomOneof_MyCustomName) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*CustomOneof_MyCustomName) + if !ok { + that2, ok := that.(CustomOneof_MyCustomName) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *CustomOneof_MyCustomName") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *CustomOneof_MyCustomName but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *CustomOneof_MyCustomName but is not nil && this == nil") + } + if this.MyCustomName != that1.MyCustomName { + return fmt.Errorf("MyCustomName this(%v) Not Equal that(%v)", this.MyCustomName, that1.MyCustomName) + } + return nil +} +func (this *CustomOneof) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*CustomOneof) + if !ok { + that2, ok := that.(CustomOneof) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + if this == nil { + return true + } + return false + } else if this == nil { + return false + } + if that1.Custom == nil { + if this.Custom != nil { + return false + } + } else if this.Custom == nil { + return false + } else if !this.Custom.Equal(that1.Custom) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *CustomOneof_Stringy) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*CustomOneof_Stringy) + if !ok { + that2, ok := that.(CustomOneof_Stringy) + 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.Stringy != that1.Stringy { + return false + } + return true +} +func (this *CustomOneof_CustomType) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*CustomOneof_CustomType) + if !ok { + that2, ok := that.(CustomOneof_CustomType) + 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.CustomType.Equal(that1.CustomType) { + return false + } + return true +} +func (this *CustomOneof_CastType) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*CustomOneof_CastType) + if !ok { + that2, ok := that.(CustomOneof_CastType) + 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.CastType != that1.CastType { + return false + } + return true +} +func (this *CustomOneof_MyCustomName) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*CustomOneof_MyCustomName) + if !ok { + that2, ok := that.(CustomOneof_MyCustomName) + 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.MyCustomName != that1.MyCustomName { + return false + } + return true +} +func (this *Subby) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&one.Subby{") + if this.Sub != nil { + s = append(s, "Sub: "+valueToGoStringOne(this.Sub, "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 *AllTypesOneOf) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 20) + s = append(s, "&one.AllTypesOneOf{") + if this.TestOneof != nil { + s = append(s, "TestOneof: "+fmt.Sprintf("%#v", this.TestOneof)+",\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 *AllTypesOneOf_Field1) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.AllTypesOneOf_Field1{` + + `Field1:` + fmt.Sprintf("%#v", this.Field1) + `}`}, ", ") + return s +} +func (this *AllTypesOneOf_Field2) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.AllTypesOneOf_Field2{` + + `Field2:` + fmt.Sprintf("%#v", this.Field2) + `}`}, ", ") + return s +} +func (this *AllTypesOneOf_Field3) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.AllTypesOneOf_Field3{` + + `Field3:` + fmt.Sprintf("%#v", this.Field3) + `}`}, ", ") + return s +} +func (this *AllTypesOneOf_Field4) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.AllTypesOneOf_Field4{` + + `Field4:` + fmt.Sprintf("%#v", this.Field4) + `}`}, ", ") + return s +} +func (this *AllTypesOneOf_Field5) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.AllTypesOneOf_Field5{` + + `Field5:` + fmt.Sprintf("%#v", this.Field5) + `}`}, ", ") + return s +} +func (this *AllTypesOneOf_Field6) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.AllTypesOneOf_Field6{` + + `Field6:` + fmt.Sprintf("%#v", this.Field6) + `}`}, ", ") + return s +} +func (this *AllTypesOneOf_Field7) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.AllTypesOneOf_Field7{` + + `Field7:` + fmt.Sprintf("%#v", this.Field7) + `}`}, ", ") + return s +} +func (this *AllTypesOneOf_Field8) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.AllTypesOneOf_Field8{` + + `Field8:` + fmt.Sprintf("%#v", this.Field8) + `}`}, ", ") + return s +} +func (this *AllTypesOneOf_Field9) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.AllTypesOneOf_Field9{` + + `Field9:` + fmt.Sprintf("%#v", this.Field9) + `}`}, ", ") + return s +} +func (this *AllTypesOneOf_Field10) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.AllTypesOneOf_Field10{` + + `Field10:` + fmt.Sprintf("%#v", this.Field10) + `}`}, ", ") + return s +} +func (this *AllTypesOneOf_Field11) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.AllTypesOneOf_Field11{` + + `Field11:` + fmt.Sprintf("%#v", this.Field11) + `}`}, ", ") + return s +} +func (this *AllTypesOneOf_Field12) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.AllTypesOneOf_Field12{` + + `Field12:` + fmt.Sprintf("%#v", this.Field12) + `}`}, ", ") + return s +} +func (this *AllTypesOneOf_Field13) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.AllTypesOneOf_Field13{` + + `Field13:` + fmt.Sprintf("%#v", this.Field13) + `}`}, ", ") + return s +} +func (this *AllTypesOneOf_Field14) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.AllTypesOneOf_Field14{` + + `Field14:` + fmt.Sprintf("%#v", this.Field14) + `}`}, ", ") + return s +} +func (this *AllTypesOneOf_Field15) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.AllTypesOneOf_Field15{` + + `Field15:` + fmt.Sprintf("%#v", this.Field15) + `}`}, ", ") + return s +} +func (this *AllTypesOneOf_SubMessage) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.AllTypesOneOf_SubMessage{` + + `SubMessage:` + fmt.Sprintf("%#v", this.SubMessage) + `}`}, ", ") + return s +} +func (this *TwoOneofs) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 10) + s = append(s, "&one.TwoOneofs{") + if this.One != nil { + s = append(s, "One: "+fmt.Sprintf("%#v", this.One)+",\n") + } + if this.Two != nil { + s = append(s, "Two: "+fmt.Sprintf("%#v", this.Two)+",\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 *TwoOneofs_Field1) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.TwoOneofs_Field1{` + + `Field1:` + fmt.Sprintf("%#v", this.Field1) + `}`}, ", ") + return s +} +func (this *TwoOneofs_Field2) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.TwoOneofs_Field2{` + + `Field2:` + fmt.Sprintf("%#v", this.Field2) + `}`}, ", ") + return s +} +func (this *TwoOneofs_Field3) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.TwoOneofs_Field3{` + + `Field3:` + fmt.Sprintf("%#v", this.Field3) + `}`}, ", ") + return s +} +func (this *TwoOneofs_Field34) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.TwoOneofs_Field34{` + + `Field34:` + fmt.Sprintf("%#v", this.Field34) + `}`}, ", ") + return s +} +func (this *TwoOneofs_Field35) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.TwoOneofs_Field35{` + + `Field35:` + fmt.Sprintf("%#v", this.Field35) + `}`}, ", ") + return s +} +func (this *TwoOneofs_SubMessage2) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.TwoOneofs_SubMessage2{` + + `SubMessage2:` + fmt.Sprintf("%#v", this.SubMessage2) + `}`}, ", ") + return s +} +func (this *CustomOneof) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 8) + s = append(s, "&one.CustomOneof{") + if this.Custom != nil { + s = append(s, "Custom: "+fmt.Sprintf("%#v", this.Custom)+",\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 *CustomOneof_Stringy) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.CustomOneof_Stringy{` + + `Stringy:` + fmt.Sprintf("%#v", this.Stringy) + `}`}, ", ") + return s +} +func (this *CustomOneof_CustomType) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.CustomOneof_CustomType{` + + `CustomType:` + fmt.Sprintf("%#v", this.CustomType) + `}`}, ", ") + return s +} +func (this *CustomOneof_CastType) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.CustomOneof_CastType{` + + `CastType:` + fmt.Sprintf("%#v", this.CastType) + `}`}, ", ") + return s +} +func (this *CustomOneof_MyCustomName) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.CustomOneof_MyCustomName{` + + `MyCustomName:` + fmt.Sprintf("%#v", this.MyCustomName) + `}`}, ", ") + return s +} +func valueToGoStringOne(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 extensionToGoStringOne(e map[int32]github_com_gogo_protobuf_proto.Extension) string { + if e == nil { + return "nil" + } + s := "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 +} +func (m *Subby) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *Subby) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Sub != nil { + data[i] = 0xa + i++ + i = encodeVarintOne(data, i, uint64(len(*m.Sub))) + i += copy(data[i:], *m.Sub) + } + if m.XXX_unrecognized != nil { + i += copy(data[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *AllTypesOneOf) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *AllTypesOneOf) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.TestOneof != nil { + nn1, err := m.TestOneof.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += nn1 + } + if m.XXX_unrecognized != nil { + i += copy(data[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *AllTypesOneOf_Field1) MarshalTo(data []byte) (int, error) { + i := 0 + data[i] = 0x9 + i++ + i = encodeFixed64One(data, i, uint64(math.Float64bits(float64(m.Field1)))) + return i, nil +} +func (m *AllTypesOneOf_Field2) MarshalTo(data []byte) (int, error) { + i := 0 + data[i] = 0x15 + i++ + i = encodeFixed32One(data, i, uint32(math.Float32bits(float32(m.Field2)))) + return i, nil +} +func (m *AllTypesOneOf_Field3) MarshalTo(data []byte) (int, error) { + i := 0 + data[i] = 0x18 + i++ + i = encodeVarintOne(data, i, uint64(m.Field3)) + return i, nil +} +func (m *AllTypesOneOf_Field4) MarshalTo(data []byte) (int, error) { + i := 0 + data[i] = 0x20 + i++ + i = encodeVarintOne(data, i, uint64(m.Field4)) + return i, nil +} +func (m *AllTypesOneOf_Field5) MarshalTo(data []byte) (int, error) { + i := 0 + data[i] = 0x28 + i++ + i = encodeVarintOne(data, i, uint64(m.Field5)) + return i, nil +} +func (m *AllTypesOneOf_Field6) MarshalTo(data []byte) (int, error) { + i := 0 + data[i] = 0x30 + i++ + i = encodeVarintOne(data, i, uint64(m.Field6)) + return i, nil +} +func (m *AllTypesOneOf_Field7) MarshalTo(data []byte) (int, error) { + i := 0 + data[i] = 0x38 + i++ + i = encodeVarintOne(data, i, uint64((uint32(m.Field7)<<1)^uint32((m.Field7>>31)))) + return i, nil +} +func (m *AllTypesOneOf_Field8) MarshalTo(data []byte) (int, error) { + i := 0 + data[i] = 0x40 + i++ + i = encodeVarintOne(data, i, uint64((uint64(m.Field8)<<1)^uint64((m.Field8>>63)))) + return i, nil +} +func (m *AllTypesOneOf_Field9) MarshalTo(data []byte) (int, error) { + i := 0 + data[i] = 0x4d + i++ + i = encodeFixed32One(data, i, uint32(m.Field9)) + return i, nil +} +func (m *AllTypesOneOf_Field10) MarshalTo(data []byte) (int, error) { + i := 0 + data[i] = 0x55 + i++ + i = encodeFixed32One(data, i, uint32(m.Field10)) + return i, nil +} +func (m *AllTypesOneOf_Field11) MarshalTo(data []byte) (int, error) { + i := 0 + data[i] = 0x59 + i++ + i = encodeFixed64One(data, i, uint64(m.Field11)) + return i, nil +} +func (m *AllTypesOneOf_Field12) MarshalTo(data []byte) (int, error) { + i := 0 + data[i] = 0x61 + i++ + i = encodeFixed64One(data, i, uint64(m.Field12)) + return i, nil +} +func (m *AllTypesOneOf_Field13) MarshalTo(data []byte) (int, error) { + i := 0 + data[i] = 0x68 + i++ + if m.Field13 { + data[i] = 1 + } else { + data[i] = 0 + } + i++ + return i, nil +} +func (m *AllTypesOneOf_Field14) MarshalTo(data []byte) (int, error) { + i := 0 + data[i] = 0x72 + i++ + i = encodeVarintOne(data, i, uint64(len(m.Field14))) + i += copy(data[i:], m.Field14) + return i, nil +} +func (m *AllTypesOneOf_Field15) MarshalTo(data []byte) (int, error) { + i := 0 + if m.Field15 != nil { + data[i] = 0x7a + i++ + i = encodeVarintOne(data, i, uint64(len(m.Field15))) + i += copy(data[i:], m.Field15) + } + return i, nil +} +func (m *AllTypesOneOf_SubMessage) MarshalTo(data []byte) (int, error) { + i := 0 + if m.SubMessage != nil { + data[i] = 0x82 + i++ + data[i] = 0x1 + i++ + i = encodeVarintOne(data, i, uint64(m.SubMessage.Size())) + n2, err := m.SubMessage.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n2 + } + return i, nil +} +func (m *TwoOneofs) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *TwoOneofs) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.One != nil { + nn3, err := m.One.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += nn3 + } + if m.Two != nil { + nn4, err := m.Two.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += nn4 + } + if m.XXX_unrecognized != nil { + i += copy(data[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *TwoOneofs_Field1) MarshalTo(data []byte) (int, error) { + i := 0 + data[i] = 0x9 + i++ + i = encodeFixed64One(data, i, uint64(math.Float64bits(float64(m.Field1)))) + return i, nil +} +func (m *TwoOneofs_Field2) MarshalTo(data []byte) (int, error) { + i := 0 + data[i] = 0x15 + i++ + i = encodeFixed32One(data, i, uint32(math.Float32bits(float32(m.Field2)))) + return i, nil +} +func (m *TwoOneofs_Field3) MarshalTo(data []byte) (int, error) { + i := 0 + data[i] = 0x18 + i++ + i = encodeVarintOne(data, i, uint64(m.Field3)) + return i, nil +} +func (m *TwoOneofs_Field34) MarshalTo(data []byte) (int, error) { + i := 0 + data[i] = 0x92 + i++ + data[i] = 0x2 + i++ + i = encodeVarintOne(data, i, uint64(len(m.Field34))) + i += copy(data[i:], m.Field34) + return i, nil +} +func (m *TwoOneofs_Field35) MarshalTo(data []byte) (int, error) { + i := 0 + if m.Field35 != nil { + data[i] = 0x9a + i++ + data[i] = 0x2 + i++ + i = encodeVarintOne(data, i, uint64(len(m.Field35))) + i += copy(data[i:], m.Field35) + } + return i, nil +} +func (m *TwoOneofs_SubMessage2) MarshalTo(data []byte) (int, error) { + i := 0 + if m.SubMessage2 != nil { + data[i] = 0xa2 + i++ + data[i] = 0x2 + i++ + i = encodeVarintOne(data, i, uint64(m.SubMessage2.Size())) + n5, err := m.SubMessage2.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n5 + } + return i, nil +} +func (m *CustomOneof) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *CustomOneof) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Custom != nil { + nn6, err := m.Custom.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += nn6 + } + if m.XXX_unrecognized != nil { + i += copy(data[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *CustomOneof_Stringy) MarshalTo(data []byte) (int, error) { + i := 0 + data[i] = 0x92 + i++ + data[i] = 0x2 + i++ + i = encodeVarintOne(data, i, uint64(len(m.Stringy))) + i += copy(data[i:], m.Stringy) + return i, nil +} +func (m *CustomOneof_CustomType) MarshalTo(data []byte) (int, error) { + i := 0 + data[i] = 0x9a + i++ + data[i] = 0x2 + i++ + i = encodeVarintOne(data, i, uint64(m.CustomType.Size())) + n7, err := m.CustomType.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n7 + return i, nil +} +func (m *CustomOneof_CastType) MarshalTo(data []byte) (int, error) { + i := 0 + data[i] = 0xa0 + i++ + data[i] = 0x2 + i++ + i = encodeVarintOne(data, i, uint64(m.CastType)) + return i, nil +} +func (m *CustomOneof_MyCustomName) MarshalTo(data []byte) (int, error) { + i := 0 + data[i] = 0xa8 + i++ + data[i] = 0x2 + i++ + i = encodeVarintOne(data, i, uint64(m.MyCustomName)) + return i, nil +} +func encodeFixed64One(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 encodeFixed32One(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 encodeVarintOne(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 NewPopulatedSubby(r randyOne, easy bool) *Subby { + this := &Subby{} + if r.Intn(10) != 0 { + v1 := randStringOne(r) + this.Sub = &v1 + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedOne(r, 2) + } + return this +} + +func NewPopulatedAllTypesOneOf(r randyOne, easy bool) *AllTypesOneOf { + this := &AllTypesOneOf{} + oneofNumber_TestOneof := []int32{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}[r.Intn(16)] + switch oneofNumber_TestOneof { + case 1: + this.TestOneof = NewPopulatedAllTypesOneOf_Field1(r, easy) + case 2: + this.TestOneof = NewPopulatedAllTypesOneOf_Field2(r, easy) + case 3: + this.TestOneof = NewPopulatedAllTypesOneOf_Field3(r, easy) + case 4: + this.TestOneof = NewPopulatedAllTypesOneOf_Field4(r, easy) + case 5: + this.TestOneof = NewPopulatedAllTypesOneOf_Field5(r, easy) + case 6: + this.TestOneof = NewPopulatedAllTypesOneOf_Field6(r, easy) + case 7: + this.TestOneof = NewPopulatedAllTypesOneOf_Field7(r, easy) + case 8: + this.TestOneof = NewPopulatedAllTypesOneOf_Field8(r, easy) + case 9: + this.TestOneof = NewPopulatedAllTypesOneOf_Field9(r, easy) + case 10: + this.TestOneof = NewPopulatedAllTypesOneOf_Field10(r, easy) + case 11: + this.TestOneof = NewPopulatedAllTypesOneOf_Field11(r, easy) + case 12: + this.TestOneof = NewPopulatedAllTypesOneOf_Field12(r, easy) + case 13: + this.TestOneof = NewPopulatedAllTypesOneOf_Field13(r, easy) + case 14: + this.TestOneof = NewPopulatedAllTypesOneOf_Field14(r, easy) + case 15: + this.TestOneof = NewPopulatedAllTypesOneOf_Field15(r, easy) + case 16: + this.TestOneof = NewPopulatedAllTypesOneOf_SubMessage(r, easy) + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedOne(r, 17) + } + return this +} + +func NewPopulatedAllTypesOneOf_Field1(r randyOne, easy bool) *AllTypesOneOf_Field1 { + this := &AllTypesOneOf_Field1{} + this.Field1 = float64(r.Float64()) + if r.Intn(2) == 0 { + this.Field1 *= -1 + } + return this +} +func NewPopulatedAllTypesOneOf_Field2(r randyOne, easy bool) *AllTypesOneOf_Field2 { + this := &AllTypesOneOf_Field2{} + this.Field2 = float32(r.Float32()) + if r.Intn(2) == 0 { + this.Field2 *= -1 + } + return this +} +func NewPopulatedAllTypesOneOf_Field3(r randyOne, easy bool) *AllTypesOneOf_Field3 { + this := &AllTypesOneOf_Field3{} + this.Field3 = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Field3 *= -1 + } + return this +} +func NewPopulatedAllTypesOneOf_Field4(r randyOne, easy bool) *AllTypesOneOf_Field4 { + this := &AllTypesOneOf_Field4{} + this.Field4 = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Field4 *= -1 + } + return this +} +func NewPopulatedAllTypesOneOf_Field5(r randyOne, easy bool) *AllTypesOneOf_Field5 { + this := &AllTypesOneOf_Field5{} + this.Field5 = uint32(r.Uint32()) + return this +} +func NewPopulatedAllTypesOneOf_Field6(r randyOne, easy bool) *AllTypesOneOf_Field6 { + this := &AllTypesOneOf_Field6{} + this.Field6 = uint64(uint64(r.Uint32())) + return this +} +func NewPopulatedAllTypesOneOf_Field7(r randyOne, easy bool) *AllTypesOneOf_Field7 { + this := &AllTypesOneOf_Field7{} + this.Field7 = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Field7 *= -1 + } + return this +} +func NewPopulatedAllTypesOneOf_Field8(r randyOne, easy bool) *AllTypesOneOf_Field8 { + this := &AllTypesOneOf_Field8{} + this.Field8 = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Field8 *= -1 + } + return this +} +func NewPopulatedAllTypesOneOf_Field9(r randyOne, easy bool) *AllTypesOneOf_Field9 { + this := &AllTypesOneOf_Field9{} + this.Field9 = uint32(r.Uint32()) + return this +} +func NewPopulatedAllTypesOneOf_Field10(r randyOne, easy bool) *AllTypesOneOf_Field10 { + this := &AllTypesOneOf_Field10{} + this.Field10 = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Field10 *= -1 + } + return this +} +func NewPopulatedAllTypesOneOf_Field11(r randyOne, easy bool) *AllTypesOneOf_Field11 { + this := &AllTypesOneOf_Field11{} + this.Field11 = uint64(uint64(r.Uint32())) + return this +} +func NewPopulatedAllTypesOneOf_Field12(r randyOne, easy bool) *AllTypesOneOf_Field12 { + this := &AllTypesOneOf_Field12{} + this.Field12 = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Field12 *= -1 + } + return this +} +func NewPopulatedAllTypesOneOf_Field13(r randyOne, easy bool) *AllTypesOneOf_Field13 { + this := &AllTypesOneOf_Field13{} + this.Field13 = bool(bool(r.Intn(2) == 0)) + return this +} +func NewPopulatedAllTypesOneOf_Field14(r randyOne, easy bool) *AllTypesOneOf_Field14 { + this := &AllTypesOneOf_Field14{} + this.Field14 = randStringOne(r) + return this +} +func NewPopulatedAllTypesOneOf_Field15(r randyOne, easy bool) *AllTypesOneOf_Field15 { + this := &AllTypesOneOf_Field15{} + v2 := r.Intn(100) + this.Field15 = make([]byte, v2) + for i := 0; i < v2; i++ { + this.Field15[i] = byte(r.Intn(256)) + } + return this +} +func NewPopulatedAllTypesOneOf_SubMessage(r randyOne, easy bool) *AllTypesOneOf_SubMessage { + this := &AllTypesOneOf_SubMessage{} + this.SubMessage = NewPopulatedSubby(r, easy) + return this +} +func NewPopulatedTwoOneofs(r randyOne, easy bool) *TwoOneofs { + this := &TwoOneofs{} + oneofNumber_One := []int32{1, 2, 3}[r.Intn(3)] + switch oneofNumber_One { + case 1: + this.One = NewPopulatedTwoOneofs_Field1(r, easy) + case 2: + this.One = NewPopulatedTwoOneofs_Field2(r, easy) + case 3: + this.One = NewPopulatedTwoOneofs_Field3(r, easy) + } + oneofNumber_Two := []int32{34, 35, 36}[r.Intn(3)] + switch oneofNumber_Two { + case 34: + this.Two = NewPopulatedTwoOneofs_Field34(r, easy) + case 35: + this.Two = NewPopulatedTwoOneofs_Field35(r, easy) + case 36: + this.Two = NewPopulatedTwoOneofs_SubMessage2(r, easy) + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedOne(r, 37) + } + return this +} + +func NewPopulatedTwoOneofs_Field1(r randyOne, easy bool) *TwoOneofs_Field1 { + this := &TwoOneofs_Field1{} + this.Field1 = float64(r.Float64()) + if r.Intn(2) == 0 { + this.Field1 *= -1 + } + return this +} +func NewPopulatedTwoOneofs_Field2(r randyOne, easy bool) *TwoOneofs_Field2 { + this := &TwoOneofs_Field2{} + this.Field2 = float32(r.Float32()) + if r.Intn(2) == 0 { + this.Field2 *= -1 + } + return this +} +func NewPopulatedTwoOneofs_Field3(r randyOne, easy bool) *TwoOneofs_Field3 { + this := &TwoOneofs_Field3{} + this.Field3 = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Field3 *= -1 + } + return this +} +func NewPopulatedTwoOneofs_Field34(r randyOne, easy bool) *TwoOneofs_Field34 { + this := &TwoOneofs_Field34{} + this.Field34 = randStringOne(r) + return this +} +func NewPopulatedTwoOneofs_Field35(r randyOne, easy bool) *TwoOneofs_Field35 { + this := &TwoOneofs_Field35{} + v3 := r.Intn(100) + this.Field35 = make([]byte, v3) + for i := 0; i < v3; i++ { + this.Field35[i] = byte(r.Intn(256)) + } + return this +} +func NewPopulatedTwoOneofs_SubMessage2(r randyOne, easy bool) *TwoOneofs_SubMessage2 { + this := &TwoOneofs_SubMessage2{} + this.SubMessage2 = NewPopulatedSubby(r, easy) + return this +} +func NewPopulatedCustomOneof(r randyOne, easy bool) *CustomOneof { + this := &CustomOneof{} + oneofNumber_Custom := []int32{34, 35, 36, 37}[r.Intn(4)] + switch oneofNumber_Custom { + case 34: + this.Custom = NewPopulatedCustomOneof_Stringy(r, easy) + case 35: + this.Custom = NewPopulatedCustomOneof_CustomType(r, easy) + case 36: + this.Custom = NewPopulatedCustomOneof_CastType(r, easy) + case 37: + this.Custom = NewPopulatedCustomOneof_MyCustomName(r, easy) + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedOne(r, 38) + } + return this +} + +func NewPopulatedCustomOneof_Stringy(r randyOne, easy bool) *CustomOneof_Stringy { + this := &CustomOneof_Stringy{} + this.Stringy = randStringOne(r) + return this +} +func NewPopulatedCustomOneof_CustomType(r randyOne, easy bool) *CustomOneof_CustomType { + this := &CustomOneof_CustomType{} + v4 := github_com_gogo_protobuf_test_custom.NewPopulatedUint128(r) + this.CustomType = *v4 + return this +} +func NewPopulatedCustomOneof_CastType(r randyOne, easy bool) *CustomOneof_CastType { + this := &CustomOneof_CastType{} + this.CastType = github_com_gogo_protobuf_test_casttype.MyUint64Type(uint64(r.Uint32())) + return this +} +func NewPopulatedCustomOneof_MyCustomName(r randyOne, easy bool) *CustomOneof_MyCustomName { + this := &CustomOneof_MyCustomName{} + this.MyCustomName = int64(r.Int63()) + if r.Intn(2) == 0 { + this.MyCustomName *= -1 + } + return this +} + +type randyOne interface { + Float32() float32 + Float64() float64 + Int63() int64 + Int31() int32 + Uint32() uint32 + Intn(n int) int +} + +func randUTF8RuneOne(r randyOne) 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 randStringOne(r randyOne) string { + v5 := r.Intn(100) + tmps := make([]rune, v5) + for i := 0; i < v5; i++ { + tmps[i] = randUTF8RuneOne(r) + } + return string(tmps) +} +func randUnrecognizedOne(r randyOne, 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 = randFieldOne(data, r, fieldNumber, wire) + } + return data +} +func randFieldOne(data []byte, r randyOne, fieldNumber int, wire int) []byte { + key := uint32(fieldNumber)<<3 | uint32(wire) + switch wire { + case 0: + data = encodeVarintPopulateOne(data, uint64(key)) + v6 := r.Int63() + if r.Intn(2) == 0 { + v6 *= -1 + } + data = encodeVarintPopulateOne(data, uint64(v6)) + case 1: + data = encodeVarintPopulateOne(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 = encodeVarintPopulateOne(data, uint64(key)) + ll := r.Intn(100) + data = encodeVarintPopulateOne(data, uint64(ll)) + for j := 0; j < ll; j++ { + data = append(data, byte(r.Intn(256))) + } + default: + data = encodeVarintPopulateOne(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 encodeVarintPopulateOne(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 *Subby) Size() (n int) { + var l int + _ = l + if m.Sub != nil { + l = len(*m.Sub) + n += 1 + l + sovOne(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *AllTypesOneOf) Size() (n int) { + var l int + _ = l + if m.TestOneof != nil { + n += m.TestOneof.Size() + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *AllTypesOneOf_Field1) Size() (n int) { + var l int + _ = l + n += 9 + return n +} +func (m *AllTypesOneOf_Field2) Size() (n int) { + var l int + _ = l + n += 5 + return n +} +func (m *AllTypesOneOf_Field3) Size() (n int) { + var l int + _ = l + n += 1 + sovOne(uint64(m.Field3)) + return n +} +func (m *AllTypesOneOf_Field4) Size() (n int) { + var l int + _ = l + n += 1 + sovOne(uint64(m.Field4)) + return n +} +func (m *AllTypesOneOf_Field5) Size() (n int) { + var l int + _ = l + n += 1 + sovOne(uint64(m.Field5)) + return n +} +func (m *AllTypesOneOf_Field6) Size() (n int) { + var l int + _ = l + n += 1 + sovOne(uint64(m.Field6)) + return n +} +func (m *AllTypesOneOf_Field7) Size() (n int) { + var l int + _ = l + n += 1 + sozOne(uint64(m.Field7)) + return n +} +func (m *AllTypesOneOf_Field8) Size() (n int) { + var l int + _ = l + n += 1 + sozOne(uint64(m.Field8)) + return n +} +func (m *AllTypesOneOf_Field9) Size() (n int) { + var l int + _ = l + n += 5 + return n +} +func (m *AllTypesOneOf_Field10) Size() (n int) { + var l int + _ = l + n += 5 + return n +} +func (m *AllTypesOneOf_Field11) Size() (n int) { + var l int + _ = l + n += 9 + return n +} +func (m *AllTypesOneOf_Field12) Size() (n int) { + var l int + _ = l + n += 9 + return n +} +func (m *AllTypesOneOf_Field13) Size() (n int) { + var l int + _ = l + n += 2 + return n +} +func (m *AllTypesOneOf_Field14) Size() (n int) { + var l int + _ = l + l = len(m.Field14) + n += 1 + l + sovOne(uint64(l)) + return n +} +func (m *AllTypesOneOf_Field15) Size() (n int) { + var l int + _ = l + if m.Field15 != nil { + l = len(m.Field15) + n += 1 + l + sovOne(uint64(l)) + } + return n +} +func (m *AllTypesOneOf_SubMessage) Size() (n int) { + var l int + _ = l + if m.SubMessage != nil { + l = m.SubMessage.Size() + n += 2 + l + sovOne(uint64(l)) + } + return n +} +func (m *TwoOneofs) Size() (n int) { + var l int + _ = l + if m.One != nil { + n += m.One.Size() + } + if m.Two != nil { + n += m.Two.Size() + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *TwoOneofs_Field1) Size() (n int) { + var l int + _ = l + n += 9 + return n +} +func (m *TwoOneofs_Field2) Size() (n int) { + var l int + _ = l + n += 5 + return n +} +func (m *TwoOneofs_Field3) Size() (n int) { + var l int + _ = l + n += 1 + sovOne(uint64(m.Field3)) + return n +} +func (m *TwoOneofs_Field34) Size() (n int) { + var l int + _ = l + l = len(m.Field34) + n += 2 + l + sovOne(uint64(l)) + return n +} +func (m *TwoOneofs_Field35) Size() (n int) { + var l int + _ = l + if m.Field35 != nil { + l = len(m.Field35) + n += 2 + l + sovOne(uint64(l)) + } + return n +} +func (m *TwoOneofs_SubMessage2) Size() (n int) { + var l int + _ = l + if m.SubMessage2 != nil { + l = m.SubMessage2.Size() + n += 2 + l + sovOne(uint64(l)) + } + return n +} +func (m *CustomOneof) Size() (n int) { + var l int + _ = l + if m.Custom != nil { + n += m.Custom.Size() + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *CustomOneof_Stringy) Size() (n int) { + var l int + _ = l + l = len(m.Stringy) + n += 2 + l + sovOne(uint64(l)) + return n +} +func (m *CustomOneof_CustomType) Size() (n int) { + var l int + _ = l + l = m.CustomType.Size() + n += 2 + l + sovOne(uint64(l)) + return n +} +func (m *CustomOneof_CastType) Size() (n int) { + var l int + _ = l + n += 2 + sovOne(uint64(m.CastType)) + return n +} +func (m *CustomOneof_MyCustomName) Size() (n int) { + var l int + _ = l + n += 2 + sovOne(uint64(m.MyCustomName)) + return n +} + +func sovOne(x uint64) (n int) { + for { + n++ + x >>= 7 + if x == 0 { + break + } + } + return n +} +func sozOne(x uint64) (n int) { + return sovOne(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (this *Subby) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&Subby{`, + `Sub:` + valueToStringOne(this.Sub) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *AllTypesOneOf) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&AllTypesOneOf{`, + `TestOneof:` + fmt.Sprintf("%v", this.TestOneof) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *AllTypesOneOf_Field1) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&AllTypesOneOf_Field1{`, + `Field1:` + fmt.Sprintf("%v", this.Field1) + `,`, + `}`, + }, "") + return s +} +func (this *AllTypesOneOf_Field2) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&AllTypesOneOf_Field2{`, + `Field2:` + fmt.Sprintf("%v", this.Field2) + `,`, + `}`, + }, "") + return s +} +func (this *AllTypesOneOf_Field3) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&AllTypesOneOf_Field3{`, + `Field3:` + fmt.Sprintf("%v", this.Field3) + `,`, + `}`, + }, "") + return s +} +func (this *AllTypesOneOf_Field4) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&AllTypesOneOf_Field4{`, + `Field4:` + fmt.Sprintf("%v", this.Field4) + `,`, + `}`, + }, "") + return s +} +func (this *AllTypesOneOf_Field5) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&AllTypesOneOf_Field5{`, + `Field5:` + fmt.Sprintf("%v", this.Field5) + `,`, + `}`, + }, "") + return s +} +func (this *AllTypesOneOf_Field6) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&AllTypesOneOf_Field6{`, + `Field6:` + fmt.Sprintf("%v", this.Field6) + `,`, + `}`, + }, "") + return s +} +func (this *AllTypesOneOf_Field7) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&AllTypesOneOf_Field7{`, + `Field7:` + fmt.Sprintf("%v", this.Field7) + `,`, + `}`, + }, "") + return s +} +func (this *AllTypesOneOf_Field8) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&AllTypesOneOf_Field8{`, + `Field8:` + fmt.Sprintf("%v", this.Field8) + `,`, + `}`, + }, "") + return s +} +func (this *AllTypesOneOf_Field9) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&AllTypesOneOf_Field9{`, + `Field9:` + fmt.Sprintf("%v", this.Field9) + `,`, + `}`, + }, "") + return s +} +func (this *AllTypesOneOf_Field10) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&AllTypesOneOf_Field10{`, + `Field10:` + fmt.Sprintf("%v", this.Field10) + `,`, + `}`, + }, "") + return s +} +func (this *AllTypesOneOf_Field11) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&AllTypesOneOf_Field11{`, + `Field11:` + fmt.Sprintf("%v", this.Field11) + `,`, + `}`, + }, "") + return s +} +func (this *AllTypesOneOf_Field12) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&AllTypesOneOf_Field12{`, + `Field12:` + fmt.Sprintf("%v", this.Field12) + `,`, + `}`, + }, "") + return s +} +func (this *AllTypesOneOf_Field13) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&AllTypesOneOf_Field13{`, + `Field13:` + fmt.Sprintf("%v", this.Field13) + `,`, + `}`, + }, "") + return s +} +func (this *AllTypesOneOf_Field14) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&AllTypesOneOf_Field14{`, + `Field14:` + fmt.Sprintf("%v", this.Field14) + `,`, + `}`, + }, "") + return s +} +func (this *AllTypesOneOf_Field15) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&AllTypesOneOf_Field15{`, + `Field15:` + fmt.Sprintf("%v", this.Field15) + `,`, + `}`, + }, "") + return s +} +func (this *AllTypesOneOf_SubMessage) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&AllTypesOneOf_SubMessage{`, + `SubMessage:` + strings.Replace(fmt.Sprintf("%v", this.SubMessage), "Subby", "Subby", 1) + `,`, + `}`, + }, "") + return s +} +func (this *TwoOneofs) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&TwoOneofs{`, + `One:` + fmt.Sprintf("%v", this.One) + `,`, + `Two:` + fmt.Sprintf("%v", this.Two) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *TwoOneofs_Field1) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&TwoOneofs_Field1{`, + `Field1:` + fmt.Sprintf("%v", this.Field1) + `,`, + `}`, + }, "") + return s +} +func (this *TwoOneofs_Field2) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&TwoOneofs_Field2{`, + `Field2:` + fmt.Sprintf("%v", this.Field2) + `,`, + `}`, + }, "") + return s +} +func (this *TwoOneofs_Field3) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&TwoOneofs_Field3{`, + `Field3:` + fmt.Sprintf("%v", this.Field3) + `,`, + `}`, + }, "") + return s +} +func (this *TwoOneofs_Field34) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&TwoOneofs_Field34{`, + `Field34:` + fmt.Sprintf("%v", this.Field34) + `,`, + `}`, + }, "") + return s +} +func (this *TwoOneofs_Field35) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&TwoOneofs_Field35{`, + `Field35:` + fmt.Sprintf("%v", this.Field35) + `,`, + `}`, + }, "") + return s +} +func (this *TwoOneofs_SubMessage2) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&TwoOneofs_SubMessage2{`, + `SubMessage2:` + strings.Replace(fmt.Sprintf("%v", this.SubMessage2), "Subby", "Subby", 1) + `,`, + `}`, + }, "") + return s +} +func (this *CustomOneof) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&CustomOneof{`, + `Custom:` + fmt.Sprintf("%v", this.Custom) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *CustomOneof_Stringy) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&CustomOneof_Stringy{`, + `Stringy:` + fmt.Sprintf("%v", this.Stringy) + `,`, + `}`, + }, "") + return s +} +func (this *CustomOneof_CustomType) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&CustomOneof_CustomType{`, + `CustomType:` + fmt.Sprintf("%v", this.CustomType) + `,`, + `}`, + }, "") + return s +} +func (this *CustomOneof_CastType) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&CustomOneof_CastType{`, + `CastType:` + fmt.Sprintf("%v", this.CastType) + `,`, + `}`, + }, "") + return s +} +func (this *CustomOneof_MyCustomName) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&CustomOneof_MyCustomName{`, + `MyCustomName:` + fmt.Sprintf("%v", this.MyCustomName) + `,`, + `}`, + }, "") + return s +} +func valueToStringOne(v interface{}) string { + rv := reflect.ValueOf(v) + if rv.IsNil() { + return "nil" + } + pv := reflect.Indirect(rv).Interface() + return fmt.Sprintf("*%v", pv) +} + +var fileDescriptorOne = []byte{ + // 576 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xac, 0xd3, 0xbf, 0x6f, 0x1a, 0x3f, + 0x14, 0x00, 0x70, 0x8e, 0xdf, 0x18, 0xf8, 0x86, 0xef, 0x4d, 0xaf, 0x0c, 0x50, 0xd1, 0x56, 0xea, + 0xd0, 0x70, 0x70, 0x3f, 0x80, 0x8c, 0xbd, 0x54, 0x55, 0x17, 0x8a, 0x44, 0x92, 0x39, 0xe2, 0xe8, + 0x41, 0x90, 0x00, 0x47, 0xd8, 0x28, 0xba, 0x2d, 0x7f, 0x43, 0xff, 0x8a, 0x8e, 0x1d, 0xfb, 0x27, + 0x64, 0x64, 0xac, 0x3a, 0xa0, 0x86, 0x2e, 0x1d, 0x33, 0x46,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0x78, 0x77, 0xd6, 0x58, 0xee, 0x69, 0x9e, 0xcd, 0x96, 0xbc, 0x6d, + 0xf7, 0xc4, 0x0b, 0x1e, 0xab, 0x2c, 0xe6, 0x19, 0xc9, 0x1f, 0x8f, 0x18, 0x97, 0x19, 0x45, 0xe9, + 0x69, 0xbf, 0xfb, 0x63, 0x5b, 0x77, 0xfe, 0x92, 0x11, 0x77, 0x70, 0xdc, 0xd1, 0xec, 0x47, 0x22, + 0x6b, 0xc7, 0x15, 0xdb, 0x31, 0x71, 0x7e, 0xbc, 0x4f, 0x65, 0xda, 0x0f, 0xa5, 0xbe, 0x1d, 0x2d, + 0x42, 0x78, 0x26, 0x3e, 0x17, 0xbf, 0xb2, 0xdb, 0xd6, 0x4b, 0xfd, 0x48, 0xff, 0xae, 0x4b, 0x11, + 0x33, 0x3f, 0x4f, 0xb2, 0xf1, 0xcc, 0x7f, 0x75, 0x73, 0x5b, 0x4b, 0x6c, 0x30, 0x3e, 0x63, 0x7c, + 0xbd, 0xad, 0x19, 0x77, 0x18, 0xf7, 0x18, 0xd7, 0xbb, 0x9a, 0xf1, 0x01, 0xe3, 0x23, 0xc6, 0x27, + 0x8c, 0x1b, 0x8c, 0xcd, 0x0e, 0xd7, 0xe0, 0xf8, 0x1d, 0xc7, 0x3b, 0x1c, 0xef, 0x71, 0xbc, 0xfe, + 0x56, 0x4b, 0xfc, 0x0c, 0x00, 0x00, 0xff, 0xff, 0x02, 0x28, 0x50, 0xa1, 0x7a, 0x04, 0x00, 0x00, +} diff --git a/vendor/github.com/gogo/protobuf/test/oneof/combos/marshaler/one.proto b/vendor/github.com/gogo/protobuf/test/oneof/combos/marshaler/one.proto new file mode 100644 index 000000000..30e171ade --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/oneof/combos/marshaler/one.proto @@ -0,0 +1,101 @@ +// Copyright (c) 2013, Vastech SA (PTY) LTD. All rights reserved. +// http://github.com/gogo/protobuf/gogoproto +// +// 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 one; + +import "github.com/gogo/protobuf/gogoproto/gogo.proto"; + +option (gogoproto.goproto_stringer_all) = false; +option (gogoproto.goproto_enum_prefix_all) = false; +option (gogoproto.goproto_getters_all) = false; + +option (gogoproto.equal_all) = true; +option (gogoproto.verbose_equal_all) = true; +option (gogoproto.stringer_all) = true; +option (gogoproto.gostring_all) = true; +option (gogoproto.description_all) = true; + +option (gogoproto.testgen_all) = true; +option (gogoproto.populate_all) = true; +option (gogoproto.unmarshaler_all) = false; +option (gogoproto.marshaler_all) = true; +option (gogoproto.sizer_all) = true; + +option (gogoproto.goproto_enum_stringer_all) = false; +option (gogoproto.enum_stringer_all) = true; + +option (gogoproto.unsafe_marshaler_all) = false; +option (gogoproto.unsafe_unmarshaler_all) = false; + +message Subby { + optional string sub = 1; +} + +message AllTypesOneOf { + oneof test_oneof { + double Field1 = 1; + float Field2 = 2; + int32 Field3 = 3; + int64 Field4 = 4; + uint32 Field5 = 5; + uint64 Field6 = 6; + sint32 Field7 = 7; + sint64 Field8 = 8; + fixed32 Field9 = 9; + sfixed32 Field10 = 10; + fixed64 Field11 = 11; + sfixed64 Field12 = 12; + bool Field13 = 13; + string Field14 = 14; + bytes Field15 = 15; + Subby sub_message = 16; + } +} + +message TwoOneofs { + oneof one { + double Field1 = 1; + float Field2 = 2; + int32 Field3 = 3; + } + + oneof two { + string Field34 = 34; + bytes Field35 = 35; + Subby sub_message2 = 36; + } +} + +message CustomOneof { + oneof custom { + string Stringy = 34; + bytes CustomType = 35 [(gogoproto.customtype) = "github.com/gogo/protobuf/test/custom.Uint128"]; + uint64 CastType = 36 [(gogoproto.casttype) = "github.com/gogo/protobuf/test/casttype.MyUint64Type"]; + int64 CustomName = 37 [(gogoproto.customname) = "MyCustomName"]; + } +} diff --git a/vendor/github.com/gogo/protobuf/test/oneof/combos/marshaler/onepb_test.go b/vendor/github.com/gogo/protobuf/test/oneof/combos/marshaler/onepb_test.go new file mode 100644 index 000000000..eac19ae2a --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/oneof/combos/marshaler/onepb_test.go @@ -0,0 +1,743 @@ +// Code generated by protoc-gen-gogo. +// source: combos/marshaler/one.proto +// DO NOT EDIT! + +/* +Package one is a generated protocol buffer package. + +It is generated from these files: + combos/marshaler/one.proto + +It has these top-level messages: + Subby + AllTypesOneOf + TwoOneofs + CustomOneof +*/ +package one + +import testing "testing" +import math_rand "math/rand" +import time "time" +import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" +import github_com_gogo_protobuf_jsonpb "github.com/gogo/protobuf/jsonpb" +import fmt "fmt" +import go_parser "go/parser" +import proto "github.com/gogo/protobuf/proto" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +func TestSubbyProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedSubby(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Subby{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestSubbyMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedSubby(popr, false) + size := p.Size() + data := make([]byte, size) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(data) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Subby{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestAllTypesOneOfProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAllTypesOneOf(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &AllTypesOneOf{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestAllTypesOneOfMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAllTypesOneOf(popr, false) + size := p.Size() + data := make([]byte, size) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(data) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &AllTypesOneOf{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestTwoOneofsProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedTwoOneofs(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &TwoOneofs{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestTwoOneofsMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedTwoOneofs(popr, false) + size := p.Size() + data := make([]byte, size) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(data) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &TwoOneofs{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestCustomOneofProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomOneof(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &CustomOneof{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestCustomOneofMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomOneof(popr, false) + size := p.Size() + data := make([]byte, size) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(data) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &CustomOneof{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestSubbyJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedSubby(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Subby{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestAllTypesOneOfJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAllTypesOneOf(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &AllTypesOneOf{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestTwoOneofsJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedTwoOneofs(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &TwoOneofs{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestCustomOneofJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomOneof(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &CustomOneof{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestSubbyProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedSubby(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &Subby{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestSubbyProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedSubby(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &Subby{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestAllTypesOneOfProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAllTypesOneOf(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &AllTypesOneOf{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestAllTypesOneOfProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAllTypesOneOf(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &AllTypesOneOf{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestTwoOneofsProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedTwoOneofs(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &TwoOneofs{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestTwoOneofsProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedTwoOneofs(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &TwoOneofs{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestCustomOneofProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomOneof(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &CustomOneof{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestCustomOneofProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomOneof(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &CustomOneof{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestOneDescription(t *testing.T) { + OneDescription() +} +func TestSubbyVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedSubby(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &Subby{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestAllTypesOneOfVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAllTypesOneOf(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &AllTypesOneOf{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestTwoOneofsVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedTwoOneofs(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &TwoOneofs{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestCustomOneofVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomOneof(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &CustomOneof{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestSubbyGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedSubby(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestAllTypesOneOfGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAllTypesOneOf(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestTwoOneofsGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedTwoOneofs(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestCustomOneofGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomOneof(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestSubbySize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedSubby(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func TestAllTypesOneOfSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAllTypesOneOf(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func TestTwoOneofsSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedTwoOneofs(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func TestCustomOneofSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomOneof(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func TestSubbyStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedSubby(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestAllTypesOneOfStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAllTypesOneOf(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestTwoOneofsStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedTwoOneofs(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestCustomOneofStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomOneof(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} + +//These tests are generated by github.com/gogo/protobuf/plugin/testgen diff --git a/vendor/github.com/gogo/protobuf/test/oneof/combos/neither/one.pb.go b/vendor/github.com/gogo/protobuf/test/oneof/combos/neither/one.pb.go new file mode 100644 index 000000000..9762497ee --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/oneof/combos/neither/one.pb.go @@ -0,0 +1,4361 @@ +// Code generated by protoc-gen-gogo. +// source: combos/neither/one.proto +// DO NOT EDIT! + +/* +Package one is a generated protocol buffer package. + +It is generated from these files: + combos/neither/one.proto + +It has these top-level messages: + Subby + AllTypesOneOf + TwoOneofs + CustomOneof +*/ +package one + +import proto "github.com/gogo/protobuf/proto" +import fmt "fmt" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" + +import github_com_gogo_protobuf_test_custom "github.com/gogo/protobuf/test/custom" +import github_com_gogo_protobuf_test_casttype "github.com/gogo/protobuf/test/casttype" + +import github_com_gogo_protobuf_protoc_gen_gogo_descriptor "github.com/gogo/protobuf/protoc-gen-gogo/descriptor" +import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" +import compress_gzip "compress/gzip" +import bytes "bytes" +import io_ioutil "io/ioutil" + +import strings "strings" +import sort "sort" +import strconv "strconv" +import reflect "reflect" + +// 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. +const _ = proto.GoGoProtoPackageIsVersion1 + +type Subby struct { + Sub *string `protobuf:"bytes,1,opt,name=sub" json:"sub,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *Subby) Reset() { *m = Subby{} } +func (*Subby) ProtoMessage() {} +func (*Subby) Descriptor() ([]byte, []int) { return fileDescriptorOne, []int{0} } + +type AllTypesOneOf struct { + // Types that are valid to be assigned to TestOneof: + // *AllTypesOneOf_Field1 + // *AllTypesOneOf_Field2 + // *AllTypesOneOf_Field3 + // *AllTypesOneOf_Field4 + // *AllTypesOneOf_Field5 + // *AllTypesOneOf_Field6 + // *AllTypesOneOf_Field7 + // *AllTypesOneOf_Field8 + // *AllTypesOneOf_Field9 + // *AllTypesOneOf_Field10 + // *AllTypesOneOf_Field11 + // *AllTypesOneOf_Field12 + // *AllTypesOneOf_Field13 + // *AllTypesOneOf_Field14 + // *AllTypesOneOf_Field15 + // *AllTypesOneOf_SubMessage + TestOneof isAllTypesOneOf_TestOneof `protobuf_oneof:"test_oneof"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *AllTypesOneOf) Reset() { *m = AllTypesOneOf{} } +func (*AllTypesOneOf) ProtoMessage() {} +func (*AllTypesOneOf) Descriptor() ([]byte, []int) { return fileDescriptorOne, []int{1} } + +type isAllTypesOneOf_TestOneof interface { + isAllTypesOneOf_TestOneof() + Equal(interface{}) bool + VerboseEqual(interface{}) error + Size() int +} + +type AllTypesOneOf_Field1 struct { + Field1 float64 `protobuf:"fixed64,1,opt,name=Field1,json=field1,oneof"` +} +type AllTypesOneOf_Field2 struct { + Field2 float32 `protobuf:"fixed32,2,opt,name=Field2,json=field2,oneof"` +} +type AllTypesOneOf_Field3 struct { + Field3 int32 `protobuf:"varint,3,opt,name=Field3,json=field3,oneof"` +} +type AllTypesOneOf_Field4 struct { + Field4 int64 `protobuf:"varint,4,opt,name=Field4,json=field4,oneof"` +} +type AllTypesOneOf_Field5 struct { + Field5 uint32 `protobuf:"varint,5,opt,name=Field5,json=field5,oneof"` +} +type AllTypesOneOf_Field6 struct { + Field6 uint64 `protobuf:"varint,6,opt,name=Field6,json=field6,oneof"` +} +type AllTypesOneOf_Field7 struct { + Field7 int32 `protobuf:"zigzag32,7,opt,name=Field7,json=field7,oneof"` +} +type AllTypesOneOf_Field8 struct { + Field8 int64 `protobuf:"zigzag64,8,opt,name=Field8,json=field8,oneof"` +} +type AllTypesOneOf_Field9 struct { + Field9 uint32 `protobuf:"fixed32,9,opt,name=Field9,json=field9,oneof"` +} +type AllTypesOneOf_Field10 struct { + Field10 int32 `protobuf:"fixed32,10,opt,name=Field10,json=field10,oneof"` +} +type AllTypesOneOf_Field11 struct { + Field11 uint64 `protobuf:"fixed64,11,opt,name=Field11,json=field11,oneof"` +} +type AllTypesOneOf_Field12 struct { + Field12 int64 `protobuf:"fixed64,12,opt,name=Field12,json=field12,oneof"` +} +type AllTypesOneOf_Field13 struct { + Field13 bool `protobuf:"varint,13,opt,name=Field13,json=field13,oneof"` +} +type AllTypesOneOf_Field14 struct { + Field14 string `protobuf:"bytes,14,opt,name=Field14,json=field14,oneof"` +} +type AllTypesOneOf_Field15 struct { + Field15 []byte `protobuf:"bytes,15,opt,name=Field15,json=field15,oneof"` +} +type AllTypesOneOf_SubMessage struct { + SubMessage *Subby `protobuf:"bytes,16,opt,name=sub_message,json=subMessage,oneof"` +} + +func (*AllTypesOneOf_Field1) isAllTypesOneOf_TestOneof() {} +func (*AllTypesOneOf_Field2) isAllTypesOneOf_TestOneof() {} +func (*AllTypesOneOf_Field3) isAllTypesOneOf_TestOneof() {} +func (*AllTypesOneOf_Field4) isAllTypesOneOf_TestOneof() {} +func (*AllTypesOneOf_Field5) isAllTypesOneOf_TestOneof() {} +func (*AllTypesOneOf_Field6) isAllTypesOneOf_TestOneof() {} +func (*AllTypesOneOf_Field7) isAllTypesOneOf_TestOneof() {} +func (*AllTypesOneOf_Field8) isAllTypesOneOf_TestOneof() {} +func (*AllTypesOneOf_Field9) isAllTypesOneOf_TestOneof() {} +func (*AllTypesOneOf_Field10) isAllTypesOneOf_TestOneof() {} +func (*AllTypesOneOf_Field11) isAllTypesOneOf_TestOneof() {} +func (*AllTypesOneOf_Field12) isAllTypesOneOf_TestOneof() {} +func (*AllTypesOneOf_Field13) isAllTypesOneOf_TestOneof() {} +func (*AllTypesOneOf_Field14) isAllTypesOneOf_TestOneof() {} +func (*AllTypesOneOf_Field15) isAllTypesOneOf_TestOneof() {} +func (*AllTypesOneOf_SubMessage) isAllTypesOneOf_TestOneof() {} + +func (m *AllTypesOneOf) GetTestOneof() isAllTypesOneOf_TestOneof { + if m != nil { + return m.TestOneof + } + return nil +} + +func (m *AllTypesOneOf) GetField1() float64 { + if x, ok := m.GetTestOneof().(*AllTypesOneOf_Field1); ok { + return x.Field1 + } + return 0 +} + +func (m *AllTypesOneOf) GetField2() float32 { + if x, ok := m.GetTestOneof().(*AllTypesOneOf_Field2); ok { + return x.Field2 + } + return 0 +} + +func (m *AllTypesOneOf) GetField3() int32 { + if x, ok := m.GetTestOneof().(*AllTypesOneOf_Field3); ok { + return x.Field3 + } + return 0 +} + +func (m *AllTypesOneOf) GetField4() int64 { + if x, ok := m.GetTestOneof().(*AllTypesOneOf_Field4); ok { + return x.Field4 + } + return 0 +} + +func (m *AllTypesOneOf) GetField5() uint32 { + if x, ok := m.GetTestOneof().(*AllTypesOneOf_Field5); ok { + return x.Field5 + } + return 0 +} + +func (m *AllTypesOneOf) GetField6() uint64 { + if x, ok := m.GetTestOneof().(*AllTypesOneOf_Field6); ok { + return x.Field6 + } + return 0 +} + +func (m *AllTypesOneOf) GetField7() int32 { + if x, ok := m.GetTestOneof().(*AllTypesOneOf_Field7); ok { + return x.Field7 + } + return 0 +} + +func (m *AllTypesOneOf) GetField8() int64 { + if x, ok := m.GetTestOneof().(*AllTypesOneOf_Field8); ok { + return x.Field8 + } + return 0 +} + +func (m *AllTypesOneOf) GetField9() uint32 { + if x, ok := m.GetTestOneof().(*AllTypesOneOf_Field9); ok { + return x.Field9 + } + return 0 +} + +func (m *AllTypesOneOf) GetField10() int32 { + if x, ok := m.GetTestOneof().(*AllTypesOneOf_Field10); ok { + return x.Field10 + } + return 0 +} + +func (m *AllTypesOneOf) GetField11() uint64 { + if x, ok := m.GetTestOneof().(*AllTypesOneOf_Field11); ok { + return x.Field11 + } + return 0 +} + +func (m *AllTypesOneOf) GetField12() int64 { + if x, ok := m.GetTestOneof().(*AllTypesOneOf_Field12); ok { + return x.Field12 + } + return 0 +} + +func (m *AllTypesOneOf) GetField13() bool { + if x, ok := m.GetTestOneof().(*AllTypesOneOf_Field13); ok { + return x.Field13 + } + return false +} + +func (m *AllTypesOneOf) GetField14() string { + if x, ok := m.GetTestOneof().(*AllTypesOneOf_Field14); ok { + return x.Field14 + } + return "" +} + +func (m *AllTypesOneOf) GetField15() []byte { + if x, ok := m.GetTestOneof().(*AllTypesOneOf_Field15); ok { + return x.Field15 + } + return nil +} + +func (m *AllTypesOneOf) GetSubMessage() *Subby { + if x, ok := m.GetTestOneof().(*AllTypesOneOf_SubMessage); ok { + return x.SubMessage + } + return nil +} + +// XXX_OneofFuncs is for the internal use of the proto package. +func (*AllTypesOneOf) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{}) { + return _AllTypesOneOf_OneofMarshaler, _AllTypesOneOf_OneofUnmarshaler, _AllTypesOneOf_OneofSizer, []interface{}{ + (*AllTypesOneOf_Field1)(nil), + (*AllTypesOneOf_Field2)(nil), + (*AllTypesOneOf_Field3)(nil), + (*AllTypesOneOf_Field4)(nil), + (*AllTypesOneOf_Field5)(nil), + (*AllTypesOneOf_Field6)(nil), + (*AllTypesOneOf_Field7)(nil), + (*AllTypesOneOf_Field8)(nil), + (*AllTypesOneOf_Field9)(nil), + (*AllTypesOneOf_Field10)(nil), + (*AllTypesOneOf_Field11)(nil), + (*AllTypesOneOf_Field12)(nil), + (*AllTypesOneOf_Field13)(nil), + (*AllTypesOneOf_Field14)(nil), + (*AllTypesOneOf_Field15)(nil), + (*AllTypesOneOf_SubMessage)(nil), + } +} + +func _AllTypesOneOf_OneofMarshaler(msg proto.Message, b *proto.Buffer) error { + m := msg.(*AllTypesOneOf) + // test_oneof + switch x := m.TestOneof.(type) { + case *AllTypesOneOf_Field1: + _ = b.EncodeVarint(1<<3 | proto.WireFixed64) + _ = b.EncodeFixed64(math.Float64bits(x.Field1)) + case *AllTypesOneOf_Field2: + _ = b.EncodeVarint(2<<3 | proto.WireFixed32) + _ = b.EncodeFixed32(uint64(math.Float32bits(x.Field2))) + case *AllTypesOneOf_Field3: + _ = b.EncodeVarint(3<<3 | proto.WireVarint) + _ = b.EncodeVarint(uint64(x.Field3)) + case *AllTypesOneOf_Field4: + _ = b.EncodeVarint(4<<3 | proto.WireVarint) + _ = b.EncodeVarint(uint64(x.Field4)) + case *AllTypesOneOf_Field5: + _ = b.EncodeVarint(5<<3 | proto.WireVarint) + _ = b.EncodeVarint(uint64(x.Field5)) + case *AllTypesOneOf_Field6: + _ = b.EncodeVarint(6<<3 | proto.WireVarint) + _ = b.EncodeVarint(uint64(x.Field6)) + case *AllTypesOneOf_Field7: + _ = b.EncodeVarint(7<<3 | proto.WireVarint) + _ = b.EncodeZigzag32(uint64(x.Field7)) + case *AllTypesOneOf_Field8: + _ = b.EncodeVarint(8<<3 | proto.WireVarint) + _ = b.EncodeZigzag64(uint64(x.Field8)) + case *AllTypesOneOf_Field9: + _ = b.EncodeVarint(9<<3 | proto.WireFixed32) + _ = b.EncodeFixed32(uint64(x.Field9)) + case *AllTypesOneOf_Field10: + _ = b.EncodeVarint(10<<3 | proto.WireFixed32) + _ = b.EncodeFixed32(uint64(x.Field10)) + case *AllTypesOneOf_Field11: + _ = b.EncodeVarint(11<<3 | proto.WireFixed64) + _ = b.EncodeFixed64(uint64(x.Field11)) + case *AllTypesOneOf_Field12: + _ = b.EncodeVarint(12<<3 | proto.WireFixed64) + _ = b.EncodeFixed64(uint64(x.Field12)) + case *AllTypesOneOf_Field13: + t := uint64(0) + if x.Field13 { + t = 1 + } + _ = b.EncodeVarint(13<<3 | proto.WireVarint) + _ = b.EncodeVarint(t) + case *AllTypesOneOf_Field14: + _ = b.EncodeVarint(14<<3 | proto.WireBytes) + _ = b.EncodeStringBytes(x.Field14) + case *AllTypesOneOf_Field15: + _ = b.EncodeVarint(15<<3 | proto.WireBytes) + _ = b.EncodeRawBytes(x.Field15) + case *AllTypesOneOf_SubMessage: + _ = b.EncodeVarint(16<<3 | proto.WireBytes) + if err := b.EncodeMessage(x.SubMessage); err != nil { + return err + } + case nil: + default: + return fmt.Errorf("AllTypesOneOf.TestOneof has unexpected type %T", x) + } + return nil +} + +func _AllTypesOneOf_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) { + m := msg.(*AllTypesOneOf) + switch tag { + case 1: // test_oneof.Field1 + if wire != proto.WireFixed64 { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeFixed64() + m.TestOneof = &AllTypesOneOf_Field1{math.Float64frombits(x)} + return true, err + case 2: // test_oneof.Field2 + if wire != proto.WireFixed32 { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeFixed32() + m.TestOneof = &AllTypesOneOf_Field2{math.Float32frombits(uint32(x))} + return true, err + case 3: // test_oneof.Field3 + if wire != proto.WireVarint { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeVarint() + m.TestOneof = &AllTypesOneOf_Field3{int32(x)} + return true, err + case 4: // test_oneof.Field4 + if wire != proto.WireVarint { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeVarint() + m.TestOneof = &AllTypesOneOf_Field4{int64(x)} + return true, err + case 5: // test_oneof.Field5 + if wire != proto.WireVarint { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeVarint() + m.TestOneof = &AllTypesOneOf_Field5{uint32(x)} + return true, err + case 6: // test_oneof.Field6 + if wire != proto.WireVarint { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeVarint() + m.TestOneof = &AllTypesOneOf_Field6{x} + return true, err + case 7: // test_oneof.Field7 + if wire != proto.WireVarint { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeZigzag32() + m.TestOneof = &AllTypesOneOf_Field7{int32(x)} + return true, err + case 8: // test_oneof.Field8 + if wire != proto.WireVarint { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeZigzag64() + m.TestOneof = &AllTypesOneOf_Field8{int64(x)} + return true, err + case 9: // test_oneof.Field9 + if wire != proto.WireFixed32 { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeFixed32() + m.TestOneof = &AllTypesOneOf_Field9{uint32(x)} + return true, err + case 10: // test_oneof.Field10 + if wire != proto.WireFixed32 { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeFixed32() + m.TestOneof = &AllTypesOneOf_Field10{int32(x)} + return true, err + case 11: // test_oneof.Field11 + if wire != proto.WireFixed64 { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeFixed64() + m.TestOneof = &AllTypesOneOf_Field11{x} + return true, err + case 12: // test_oneof.Field12 + if wire != proto.WireFixed64 { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeFixed64() + m.TestOneof = &AllTypesOneOf_Field12{int64(x)} + return true, err + case 13: // test_oneof.Field13 + if wire != proto.WireVarint { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeVarint() + m.TestOneof = &AllTypesOneOf_Field13{x != 0} + return true, err + case 14: // test_oneof.Field14 + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeStringBytes() + m.TestOneof = &AllTypesOneOf_Field14{x} + return true, err + case 15: // test_oneof.Field15 + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeRawBytes(true) + m.TestOneof = &AllTypesOneOf_Field15{x} + return true, err + case 16: // test_oneof.sub_message + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + msg := new(Subby) + err := b.DecodeMessage(msg) + m.TestOneof = &AllTypesOneOf_SubMessage{msg} + return true, err + default: + return false, nil + } +} + +func _AllTypesOneOf_OneofSizer(msg proto.Message) (n int) { + m := msg.(*AllTypesOneOf) + // test_oneof + switch x := m.TestOneof.(type) { + case *AllTypesOneOf_Field1: + n += proto.SizeVarint(1<<3 | proto.WireFixed64) + n += 8 + case *AllTypesOneOf_Field2: + n += proto.SizeVarint(2<<3 | proto.WireFixed32) + n += 4 + case *AllTypesOneOf_Field3: + n += proto.SizeVarint(3<<3 | proto.WireVarint) + n += proto.SizeVarint(uint64(x.Field3)) + case *AllTypesOneOf_Field4: + n += proto.SizeVarint(4<<3 | proto.WireVarint) + n += proto.SizeVarint(uint64(x.Field4)) + case *AllTypesOneOf_Field5: + n += proto.SizeVarint(5<<3 | proto.WireVarint) + n += proto.SizeVarint(uint64(x.Field5)) + case *AllTypesOneOf_Field6: + n += proto.SizeVarint(6<<3 | proto.WireVarint) + n += proto.SizeVarint(uint64(x.Field6)) + case *AllTypesOneOf_Field7: + n += proto.SizeVarint(7<<3 | proto.WireVarint) + n += proto.SizeVarint(uint64((uint32(x.Field7) << 1) ^ uint32((int32(x.Field7) >> 31)))) + case *AllTypesOneOf_Field8: + n += proto.SizeVarint(8<<3 | proto.WireVarint) + n += proto.SizeVarint(uint64(uint64(x.Field8<<1) ^ uint64((int64(x.Field8) >> 63)))) + case *AllTypesOneOf_Field9: + n += proto.SizeVarint(9<<3 | proto.WireFixed32) + n += 4 + case *AllTypesOneOf_Field10: + n += proto.SizeVarint(10<<3 | proto.WireFixed32) + n += 4 + case *AllTypesOneOf_Field11: + n += proto.SizeVarint(11<<3 | proto.WireFixed64) + n += 8 + case *AllTypesOneOf_Field12: + n += proto.SizeVarint(12<<3 | proto.WireFixed64) + n += 8 + case *AllTypesOneOf_Field13: + n += proto.SizeVarint(13<<3 | proto.WireVarint) + n += 1 + case *AllTypesOneOf_Field14: + n += proto.SizeVarint(14<<3 | proto.WireBytes) + n += proto.SizeVarint(uint64(len(x.Field14))) + n += len(x.Field14) + case *AllTypesOneOf_Field15: + n += proto.SizeVarint(15<<3 | proto.WireBytes) + n += proto.SizeVarint(uint64(len(x.Field15))) + n += len(x.Field15) + case *AllTypesOneOf_SubMessage: + s := proto.Size(x.SubMessage) + n += proto.SizeVarint(16<<3 | proto.WireBytes) + n += proto.SizeVarint(uint64(s)) + n += s + case nil: + default: + panic(fmt.Sprintf("proto: unexpected type %T in oneof", x)) + } + return n +} + +type TwoOneofs struct { + // Types that are valid to be assigned to One: + // *TwoOneofs_Field1 + // *TwoOneofs_Field2 + // *TwoOneofs_Field3 + One isTwoOneofs_One `protobuf_oneof:"one"` + // Types that are valid to be assigned to Two: + // *TwoOneofs_Field34 + // *TwoOneofs_Field35 + // *TwoOneofs_SubMessage2 + Two isTwoOneofs_Two `protobuf_oneof:"two"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *TwoOneofs) Reset() { *m = TwoOneofs{} } +func (*TwoOneofs) ProtoMessage() {} +func (*TwoOneofs) Descriptor() ([]byte, []int) { return fileDescriptorOne, []int{2} } + +type isTwoOneofs_One interface { + isTwoOneofs_One() + Equal(interface{}) bool + VerboseEqual(interface{}) error + Size() int +} +type isTwoOneofs_Two interface { + isTwoOneofs_Two() + Equal(interface{}) bool + VerboseEqual(interface{}) error + Size() int +} + +type TwoOneofs_Field1 struct { + Field1 float64 `protobuf:"fixed64,1,opt,name=Field1,json=field1,oneof"` +} +type TwoOneofs_Field2 struct { + Field2 float32 `protobuf:"fixed32,2,opt,name=Field2,json=field2,oneof"` +} +type TwoOneofs_Field3 struct { + Field3 int32 `protobuf:"varint,3,opt,name=Field3,json=field3,oneof"` +} +type TwoOneofs_Field34 struct { + Field34 string `protobuf:"bytes,34,opt,name=Field34,json=field34,oneof"` +} +type TwoOneofs_Field35 struct { + Field35 []byte `protobuf:"bytes,35,opt,name=Field35,json=field35,oneof"` +} +type TwoOneofs_SubMessage2 struct { + SubMessage2 *Subby `protobuf:"bytes,36,opt,name=sub_message2,json=subMessage2,oneof"` +} + +func (*TwoOneofs_Field1) isTwoOneofs_One() {} +func (*TwoOneofs_Field2) isTwoOneofs_One() {} +func (*TwoOneofs_Field3) isTwoOneofs_One() {} +func (*TwoOneofs_Field34) isTwoOneofs_Two() {} +func (*TwoOneofs_Field35) isTwoOneofs_Two() {} +func (*TwoOneofs_SubMessage2) isTwoOneofs_Two() {} + +func (m *TwoOneofs) GetOne() isTwoOneofs_One { + if m != nil { + return m.One + } + return nil +} +func (m *TwoOneofs) GetTwo() isTwoOneofs_Two { + if m != nil { + return m.Two + } + return nil +} + +func (m *TwoOneofs) GetField1() float64 { + if x, ok := m.GetOne().(*TwoOneofs_Field1); ok { + return x.Field1 + } + return 0 +} + +func (m *TwoOneofs) GetField2() float32 { + if x, ok := m.GetOne().(*TwoOneofs_Field2); ok { + return x.Field2 + } + return 0 +} + +func (m *TwoOneofs) GetField3() int32 { + if x, ok := m.GetOne().(*TwoOneofs_Field3); ok { + return x.Field3 + } + return 0 +} + +func (m *TwoOneofs) GetField34() string { + if x, ok := m.GetTwo().(*TwoOneofs_Field34); ok { + return x.Field34 + } + return "" +} + +func (m *TwoOneofs) GetField35() []byte { + if x, ok := m.GetTwo().(*TwoOneofs_Field35); ok { + return x.Field35 + } + return nil +} + +func (m *TwoOneofs) GetSubMessage2() *Subby { + if x, ok := m.GetTwo().(*TwoOneofs_SubMessage2); ok { + return x.SubMessage2 + } + return nil +} + +// XXX_OneofFuncs is for the internal use of the proto package. +func (*TwoOneofs) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{}) { + return _TwoOneofs_OneofMarshaler, _TwoOneofs_OneofUnmarshaler, _TwoOneofs_OneofSizer, []interface{}{ + (*TwoOneofs_Field1)(nil), + (*TwoOneofs_Field2)(nil), + (*TwoOneofs_Field3)(nil), + (*TwoOneofs_Field34)(nil), + (*TwoOneofs_Field35)(nil), + (*TwoOneofs_SubMessage2)(nil), + } +} + +func _TwoOneofs_OneofMarshaler(msg proto.Message, b *proto.Buffer) error { + m := msg.(*TwoOneofs) + // one + switch x := m.One.(type) { + case *TwoOneofs_Field1: + _ = b.EncodeVarint(1<<3 | proto.WireFixed64) + _ = b.EncodeFixed64(math.Float64bits(x.Field1)) + case *TwoOneofs_Field2: + _ = b.EncodeVarint(2<<3 | proto.WireFixed32) + _ = b.EncodeFixed32(uint64(math.Float32bits(x.Field2))) + case *TwoOneofs_Field3: + _ = b.EncodeVarint(3<<3 | proto.WireVarint) + _ = b.EncodeVarint(uint64(x.Field3)) + case nil: + default: + return fmt.Errorf("TwoOneofs.One has unexpected type %T", x) + } + // two + switch x := m.Two.(type) { + case *TwoOneofs_Field34: + _ = b.EncodeVarint(34<<3 | proto.WireBytes) + _ = b.EncodeStringBytes(x.Field34) + case *TwoOneofs_Field35: + _ = b.EncodeVarint(35<<3 | proto.WireBytes) + _ = b.EncodeRawBytes(x.Field35) + case *TwoOneofs_SubMessage2: + _ = b.EncodeVarint(36<<3 | proto.WireBytes) + if err := b.EncodeMessage(x.SubMessage2); err != nil { + return err + } + case nil: + default: + return fmt.Errorf("TwoOneofs.Two has unexpected type %T", x) + } + return nil +} + +func _TwoOneofs_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) { + m := msg.(*TwoOneofs) + switch tag { + case 1: // one.Field1 + if wire != proto.WireFixed64 { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeFixed64() + m.One = &TwoOneofs_Field1{math.Float64frombits(x)} + return true, err + case 2: // one.Field2 + if wire != proto.WireFixed32 { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeFixed32() + m.One = &TwoOneofs_Field2{math.Float32frombits(uint32(x))} + return true, err + case 3: // one.Field3 + if wire != proto.WireVarint { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeVarint() + m.One = &TwoOneofs_Field3{int32(x)} + return true, err + case 34: // two.Field34 + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeStringBytes() + m.Two = &TwoOneofs_Field34{x} + return true, err + case 35: // two.Field35 + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeRawBytes(true) + m.Two = &TwoOneofs_Field35{x} + return true, err + case 36: // two.sub_message2 + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + msg := new(Subby) + err := b.DecodeMessage(msg) + m.Two = &TwoOneofs_SubMessage2{msg} + return true, err + default: + return false, nil + } +} + +func _TwoOneofs_OneofSizer(msg proto.Message) (n int) { + m := msg.(*TwoOneofs) + // one + switch x := m.One.(type) { + case *TwoOneofs_Field1: + n += proto.SizeVarint(1<<3 | proto.WireFixed64) + n += 8 + case *TwoOneofs_Field2: + n += proto.SizeVarint(2<<3 | proto.WireFixed32) + n += 4 + case *TwoOneofs_Field3: + n += proto.SizeVarint(3<<3 | proto.WireVarint) + n += proto.SizeVarint(uint64(x.Field3)) + case nil: + default: + panic(fmt.Sprintf("proto: unexpected type %T in oneof", x)) + } + // two + switch x := m.Two.(type) { + case *TwoOneofs_Field34: + n += proto.SizeVarint(34<<3 | proto.WireBytes) + n += proto.SizeVarint(uint64(len(x.Field34))) + n += len(x.Field34) + case *TwoOneofs_Field35: + n += proto.SizeVarint(35<<3 | proto.WireBytes) + n += proto.SizeVarint(uint64(len(x.Field35))) + n += len(x.Field35) + case *TwoOneofs_SubMessage2: + s := proto.Size(x.SubMessage2) + n += proto.SizeVarint(36<<3 | proto.WireBytes) + n += proto.SizeVarint(uint64(s)) + n += s + case nil: + default: + panic(fmt.Sprintf("proto: unexpected type %T in oneof", x)) + } + return n +} + +type CustomOneof struct { + // Types that are valid to be assigned to Custom: + // *CustomOneof_Stringy + // *CustomOneof_CustomType + // *CustomOneof_CastType + // *CustomOneof_MyCustomName + Custom isCustomOneof_Custom `protobuf_oneof:"custom"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *CustomOneof) Reset() { *m = CustomOneof{} } +func (*CustomOneof) ProtoMessage() {} +func (*CustomOneof) Descriptor() ([]byte, []int) { return fileDescriptorOne, []int{3} } + +type isCustomOneof_Custom interface { + isCustomOneof_Custom() + Equal(interface{}) bool + VerboseEqual(interface{}) error + Size() int +} + +type CustomOneof_Stringy struct { + Stringy string `protobuf:"bytes,34,opt,name=Stringy,json=stringy,oneof"` +} +type CustomOneof_CustomType struct { + CustomType github_com_gogo_protobuf_test_custom.Uint128 `protobuf:"bytes,35,opt,name=CustomType,json=customType,oneof,customtype=github.com/gogo/protobuf/test/custom.Uint128"` +} +type CustomOneof_CastType struct { + CastType github_com_gogo_protobuf_test_casttype.MyUint64Type `protobuf:"varint,36,opt,name=CastType,json=castType,oneof,casttype=github.com/gogo/protobuf/test/casttype.MyUint64Type"` +} +type CustomOneof_MyCustomName struct { + MyCustomName int64 `protobuf:"varint,37,opt,name=CustomName,json=customName,oneof"` +} + +func (*CustomOneof_Stringy) isCustomOneof_Custom() {} +func (*CustomOneof_CustomType) isCustomOneof_Custom() {} +func (*CustomOneof_CastType) isCustomOneof_Custom() {} +func (*CustomOneof_MyCustomName) isCustomOneof_Custom() {} + +func (m *CustomOneof) GetCustom() isCustomOneof_Custom { + if m != nil { + return m.Custom + } + return nil +} + +func (m *CustomOneof) GetStringy() string { + if x, ok := m.GetCustom().(*CustomOneof_Stringy); ok { + return x.Stringy + } + return "" +} + +func (m *CustomOneof) GetCastType() github_com_gogo_protobuf_test_casttype.MyUint64Type { + if x, ok := m.GetCustom().(*CustomOneof_CastType); ok { + return x.CastType + } + return 0 +} + +func (m *CustomOneof) GetMyCustomName() int64 { + if x, ok := m.GetCustom().(*CustomOneof_MyCustomName); ok { + return x.MyCustomName + } + return 0 +} + +// XXX_OneofFuncs is for the internal use of the proto package. +func (*CustomOneof) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{}) { + return _CustomOneof_OneofMarshaler, _CustomOneof_OneofUnmarshaler, _CustomOneof_OneofSizer, []interface{}{ + (*CustomOneof_Stringy)(nil), + (*CustomOneof_CustomType)(nil), + (*CustomOneof_CastType)(nil), + (*CustomOneof_MyCustomName)(nil), + } +} + +func _CustomOneof_OneofMarshaler(msg proto.Message, b *proto.Buffer) error { + m := msg.(*CustomOneof) + // custom + switch x := m.Custom.(type) { + case *CustomOneof_Stringy: + _ = b.EncodeVarint(34<<3 | proto.WireBytes) + _ = b.EncodeStringBytes(x.Stringy) + case *CustomOneof_CustomType: + _ = b.EncodeVarint(35<<3 | proto.WireBytes) + data, err := x.CustomType.Marshal() + if err != nil { + return err + } + _ = b.EncodeRawBytes(data) + case *CustomOneof_CastType: + _ = b.EncodeVarint(36<<3 | proto.WireVarint) + _ = b.EncodeVarint(uint64(x.CastType)) + case *CustomOneof_MyCustomName: + _ = b.EncodeVarint(37<<3 | proto.WireVarint) + _ = b.EncodeVarint(uint64(x.MyCustomName)) + case nil: + default: + return fmt.Errorf("CustomOneof.Custom has unexpected type %T", x) + } + return nil +} + +func _CustomOneof_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) { + m := msg.(*CustomOneof) + switch tag { + case 34: // custom.Stringy + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeStringBytes() + m.Custom = &CustomOneof_Stringy{x} + return true, err + case 35: // custom.CustomType + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeRawBytes(true) + if err != nil { + return true, err + } + var cc github_com_gogo_protobuf_test_custom.Uint128 + c := &cc + err = c.Unmarshal(x) + m.Custom = &CustomOneof_CustomType{*c} + return true, err + case 36: // custom.CastType + if wire != proto.WireVarint { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeVarint() + m.Custom = &CustomOneof_CastType{github_com_gogo_protobuf_test_casttype.MyUint64Type(x)} + return true, err + case 37: // custom.CustomName + if wire != proto.WireVarint { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeVarint() + m.Custom = &CustomOneof_MyCustomName{int64(x)} + return true, err + default: + return false, nil + } +} + +func _CustomOneof_OneofSizer(msg proto.Message) (n int) { + m := msg.(*CustomOneof) + // custom + switch x := m.Custom.(type) { + case *CustomOneof_Stringy: + n += proto.SizeVarint(34<<3 | proto.WireBytes) + n += proto.SizeVarint(uint64(len(x.Stringy))) + n += len(x.Stringy) + case *CustomOneof_CustomType: + n += proto.SizeVarint(35<<3 | proto.WireBytes) + n += proto.SizeVarint(uint64(x.CustomType.Size())) + n += x.CustomType.Size() + case *CustomOneof_CastType: + n += proto.SizeVarint(36<<3 | proto.WireVarint) + n += proto.SizeVarint(uint64(x.CastType)) + case *CustomOneof_MyCustomName: + n += proto.SizeVarint(37<<3 | proto.WireVarint) + n += proto.SizeVarint(uint64(x.MyCustomName)) + case nil: + default: + panic(fmt.Sprintf("proto: unexpected type %T in oneof", x)) + } + return n +} + +func init() { + proto.RegisterType((*Subby)(nil), "one.Subby") + proto.RegisterType((*AllTypesOneOf)(nil), "one.AllTypesOneOf") + proto.RegisterType((*TwoOneofs)(nil), "one.TwoOneofs") + proto.RegisterType((*CustomOneof)(nil), "one.CustomOneof") +} +func (this *Subby) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return OneDescription() +} +func (this *AllTypesOneOf) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return OneDescription() +} +func (this *TwoOneofs) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return OneDescription() +} +func (this *CustomOneof) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return OneDescription() +} +func OneDescription() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + d := &github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet{} + var gzipped = []byte{ + // 3728 bytes of a gzipped FileDescriptorSet + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xcc, 0x5a, 0x6b, 0x6c, 0x23, 0xe5, + 0xd5, 0x5e, 0xc7, 0x97, 0xd8, 0xc7, 0x8e, 0xe3, 0x4c, 0xc2, 0xee, 0x6c, 0x80, 0x0d, 0xeb, 0xe5, + 0xb2, 0x2c, 0x90, 0xec, 0x26, 0x9b, 0xbd, 0x98, 0xef, 0x03, 0xc5, 0x89, 0x37, 0x64, 0x95, 0xc4, + 0xf9, 0x26, 0x31, 0x2c, 0x7c, 0x3f, 0x46, 0x13, 0x7b, 0xe2, 0x78, 0xd7, 0x9e, 0xf1, 0xe7, 0x19, + 0xef, 0x6e, 0xf8, 0xc5, 0x27, 0x7a, 0x11, 0xaa, 0x7a, 0xa3, 0x95, 0xca, 0xbd, 0x05, 0xa9, 0x85, + 0xd2, 0x1b, 0xf4, 0xa6, 0xaa, 0xbf, 0x2a, 0x55, 0xb4, 0xfc, 0xaa, 0x68, 0x7f, 0x55, 0x55, 0xb5, + 0x02, 0x8a, 0x54, 0xda, 0xd2, 0x96, 0x4a, 0x2b, 0x15, 0x95, 0x3f, 0x3d, 0xef, 0x6d, 0x66, 0x7c, + 0x49, 0xc6, 0x41, 0xa5, 0x34, 0x92, 0x15, 0xcf, 0x39, 0xe7, 0x79, 0xe6, 0x7d, 0xcf, 0x7b, 0xde, + 0x73, 0xce, 0xbc, 0x63, 0xf8, 0xe9, 0x31, 0xb8, 0xa1, 0x6c, 0x9a, 0xe5, 0xaa, 0x3e, 0x51, 0x6f, + 0x98, 0xb6, 0xb9, 0x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 0x7f, 0xe6, 0xdb, 0x08, 0x1d, 0x73, 0x94, 0x08, + 0x88, 0x5f, 0xa5, 0x51, 0x88, 0xd2, 0x30, 0x2b, 0xe9, 0xa2, 0x34, 0x38, 0xd7, 0x64, 0x61, 0x4a, + 0xfa, 0x86, 0xd6, 0xac, 0xda, 0xea, 0x45, 0xad, 0xda, 0xd4, 0x69, 0xc0, 0xe0, 0xc2, 0x70, 0xe1, + 0xbd, 0x44, 0x26, 0x8d, 0x41, 0x9c, 0x45, 0x65, 0x05, 0x31, 0x97, 0x69, 0xf6, 0x09, 0x2b, 0x2c, + 0x50, 0x17, 0x88, 0x84, 0xdc, 0xfe, 0xbc, 0x85, 0x7b, 0x81, 0x2f, 0x2d, 0xbd, 0x05, 0x11, 0xd0, + 0xdb, 0x9f, 0x6c, 0x4f, 0x7c, 0xd7, 0x77, 0x9f, 0x5e, 0x7b, 0x2c, 0xa6, 0x7f, 0xd8, 0x07, 0x21, + 0xba, 0xdf, 0x06, 0x21, 0xbe, 0x76, 0xff, 0x4a, 0x4e, 0x9d, 0xcb, 0x17, 0xb2, 0x8b, 0xb9, 0x54, + 0x40, 0x4a, 0x02, 0x50, 0xc1, 0x99, 0xc5, 0xfc, 0xcc, 0x5a, 0xaa, 0xcf, 0xb9, 0x5e, 0x58, 0x5e, + 0x3b, 0x71, 0x3c, 0x15, 0x74, 0x00, 0x05, 0x26, 0x08, 0x79, 0x0d, 0xa6, 0x26, 0x53, 0x61, 0x8c, + 0x84, 0x04, 0x23, 0x58, 0x38, 0x97, 0x9b, 0x43, 0x8b, 0x48, 0xab, 0x04, 0x6d, 0xfa, 0xa5, 0x01, + 0x88, 0x51, 0x49, 0x36, 0x9f, 0x5f, 0x4c, 0x45, 0x1d, 0xce, 0xd5, 0x35, 0x65, 0x61, 0x79, 0x3e, + 0x15, 0x73, 0x38, 0xe7, 0x95, 0x7c, 0x61, 0x25, 0x05, 0x0e, 0xc3, 0x52, 0x6e, 0x75, 0x75, 0x66, + 0x3e, 0x97, 0x8a, 0x3b, 0x16, 0xd9, 0xfb, 0xd7, 0x72, 0xab, 0xa9, 0x44, 0xcb, 0xb0, 0xf0, 0x16, + 0x03, 0xce, 0x2d, 0x72, 0xcb, 0x85, 0xa5, 0x54, 0x52, 0x1a, 0x82, 0x01, 0x76, 0x0b, 0x31, 0x88, + 0xc1, 0x36, 0x11, 0x8e, 0x34, 0xe5, 0x0e, 0x84, 0xb1, 0x0c, 0xb5, 0x08, 0xd0, 0x42, 0x4a, 0xcf, + 0x42, 0x98, 0x46, 0x17, 0x46, 0x71, 0x72, 0x71, 0x26, 0x9b, 0x5b, 0x54, 0xf3, 0x2b, 0x6b, 0x0b, + 0xf9, 0xe5, 0x99, 0x45, 0xf4, 0x9d, 0x23, 0x53, 0x72, 0xff, 0x53, 0x58, 0x50, 0x72, 0x73, 0xe8, + 0x3f, 0x8f, 0x6c, 0x25, 0x37, 0xb3, 0x86, 0xb2, 0x60, 0xfa, 0x08, 0x8c, 0x74, 0xcb, 0x33, 0xdd, + 0x76, 0x46, 0xfa, 0xb9, 0x00, 0x0c, 0x77, 0x49, 0x99, 0x5d, 0x77, 0xd1, 0xdd, 0x10, 0x66, 0x91, + 0xc6, 0x8a, 0xc8, 0xad, 0x5d, 0x73, 0x2f, 0x8d, 0xbb, 0x8e, 0x42, 0x42, 0x71, 0xde, 0x42, 0x1a, + 0xdc, 0xa6, 0x90, 0x12, 0x8a, 0x8e, 0x70, 0x7a, 0x38, 0x00, 0xf2, 0x76, 0xdc, 0x3e, 0xfb, 0xbd, + 0xaf, 0x65, 0xbf, 0xdf, 0xd9, 0x3e, 0x80, 0x83, 0xdb, 0xcf, 0xa1, 0x63, 0x14, 0xcf, 0x07, 0x60, + 0x6f, 0xf7, 0x7e, 0xa3, 0xeb, 0x18, 0xee, 0x82, 0x48, 0x4d, 0xb7, 0x37, 0x4d, 0x51, 0x73, 0x6f, + 0xee, 0x92, 0xc9, 0x89, 0xba, 0xdd, 0x57, 0x1c, 0xe5, 0x2d, 0x05, 0xc1, 0xed, 0x9a, 0x06, 0x36, + 0x9a, 0x8e, 0x91, 0x3e, 0xd2, 0x07, 0xd7, 0x74, 0x25, 0xef, 0x3a, 0xd0, 0xeb, 0x01, 0x2a, 0x46, + 0xbd, 0x69, 0xb3, 0xba, 0xca, 0xd2, 0x4c, 0x8c, 0x4a, 0xe8, 0x16, 0x26, 0x29, 0xa4, 0x69, 0x3b, + 0xfa, 0x20, 0xd5, 0x03, 0x13, 0x51, 0x83, 0x53, 0xee, 0x40, 0x43, 0x74, 0xa0, 0x07, 0xb6, 0x99, + 0x69, 0x47, 0xc9, 0x3a, 0x0a, 0xa9, 0x62, 0xb5, 0xa2, 0x1b, 0xb6, 0x6a, 0xd9, 0x0d, 0x5d, 0xab, + 0x55, 0x8c, 0x32, 0xcd, 0xa3, 0xd1, 0x4c, 0x78, 0x43, 0xab, 0x5a, 0xba, 0x32, 0xc8, 0xd4, 0xab, + 0x42, 0x4b, 0x10, 0xb4, 0x58, 0x34, 0x3c, 0x88, 0x48, 0x0b, 0x82, 0xa9, 0x1d, 0x44, 0xfa, 0x57, + 0xfd, 0x10, 0xf7, 0x74, 0x67, 0xd2, 0x41, 0x48, 0x9c, 0xd7, 0x2e, 0x6a, 0xaa, 0xe8, 0xb8, 0x99, + 0x27, 0xe2, 0x44, 0xb6, 0xc2, 0xbb, 0xee, 0xa3, 0x30, 0x42, 0x4d, 0x70, 0x8e, 0x78, 0xa3, 0x62, + 0x55, 0xb3, 0x2c, 0xea, 0xb4, 0x28, 0x35, 0x95, 0x88, 0x2e, 0x4f, 0x54, 0xb3, 0x42, 0x23, 0x4d, + 0xc3, 0x30, 0x45, 0xd4, 0x30, 0xf1, 0x56, 0xea, 0x55, 0x5d, 0x25, 0xcf, 0x00, 0x16, 0xcd, 0xa7, + 0xce, 0xc8, 0x86, 0x88, 0xc5, 0x12, 0x37, 0x20, 0x23, 0xb2, 0xa4, 0x79, 0xb8, 0x9e, 0xc2, 0xca, + 0xba, 0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x4d, 0xab, 0x62, 0x57, 0x2e, 0x92, 0xe3, 0x39, 0xf1, + 0x20, 0x4d, 0xba, 0xd8, 0x90, 0x92, 0x12, 0x9a, 0x05, 0xc3, 0x76, 0xac, 0x0d, 0xbd, 0xac, 0xb5, + 0x59, 0x93, 0x34, 0x14, 0x54, 0x52, 0x42, 0xe3, 0x58, 0x63, 0xa3, 0x59, 0x32, 0x9b, 0xa4, 0x21, + 0x60, 0x76, 0x24, 0xeb, 0x05, 0x94, 0x38, 0x93, 0x39, 0x26, 0xbc, 0x63, 0x73, 0x9f, 0xe0, 0x13, + 0x4a, 0x9c, 0xc9, 0x98, 0xc9, 0x2d, 0x30, 0xa8, 0x95, 0xcb, 0x0d, 0x42, 0x2e, 0x88, 0x58, 0x1b, + 0x9a, 0x74, 0xc4, 0xd4, 0x70, 0xf4, 0x2c, 0x44, 0x85, 0x1f, 0x48, 0x61, 0x21, 0x9e, 0xc0, 0x9a, + 0x4f, 0xcf, 0x51, 0xfa, 0xc8, 0x43, 0xbd, 0x21, 0x94, 0x78, 0xd3, 0x8a, 0xa5, 0xba, 0x07, 0x7a, + 0x7d, 0xa8, 0x8f, 0x2a, 0xf1, 0x8a, 0xe5, 0x9c, 0xe0, 0xa4, 0x9f, 0xc7, 0xf2, 0xda, 0x7a, 0x20, + 0x29, 0xcd, 0x41, 0xb4, 0x6a, 0x62, 0x7c, 0x10, 0x04, 0x3b, 0x0d, 0x3f, 0xec, 0x73, 0x86, 0x39, + 0xbe, 0xc8, 0xed, 0x15, 0x07, 0x39, 0xfa, 0x8b, 0x00, 0x44, 0x85, 0x18, 0x0b, 0x45, 0xa8, 0xae, + 0xd9, 0x9b, 0x94, 0x2e, 0x9c, 0xed, 0x4b, 0x05, 0x14, 0x7a, 0x4d, 0xe4, 0xd8, 0xcd, 0x18, 0x34, + 0x04, 0xb8, 0x9c, 0x5c, 0x93, 0x75, 0xad, 0xea, 0x5a, 0x89, 0x36, 0xb8, 0x66, 0xad, 0x86, 0x2b,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xf2, 0xd4, + 0x33, 0xbe, 0xb4, 0x45, 0x58, 0x4f, 0x1c, 0x27, 0x70, 0x24, 0xa6, 0x39, 0x89, 0xd2, 0x4e, 0x8a, + 0xa1, 0x92, 0x03, 0x77, 0xfa, 0x2a, 0x3e, 0x98, 0x4d, 0xbd, 0x79, 0x65, 0x2c, 0xb1, 0xb4, 0xe5, + 0xca, 0xdd, 0xa1, 0x90, 0xab, 0x6c, 0x14, 0x22, 0xec, 0x2a, 0x3b, 0xf7, 0xea, 0x1b, 0x07, 0xf6, + 0xbc, 0x86, 0x9f, 0x5f, 0xe3, 0xe7, 0xf5, 0x37, 0x0e, 0x04, 0xde, 0xc5, 0xcf, 0x7b, 0xf8, 0x79, + 0xe8, 0xcd, 0x03, 0x81, 0x17, 0xf0, 0xf3, 0x12, 0x7e, 0x7e, 0x84, 0x9f, 0x57, 0xdf, 0x44, 0x3b, + 0xfc, 0xbc, 0x8e, 0xdf, 0xdf, 0xc6, 0xff, 0xef, 0xe2, 0xff, 0xf7, 0xf0, 0xff, 0x43, 0xbf, 0x3b, + 0xb0, 0xe7, 0x9f, 0x01, 0x00, 0x00, 0xff, 0xff, 0x73, 0xcf, 0xed, 0x16, 0xe5, 0x2e, 0x00, 0x00, + } + r := bytes.NewReader(gzipped) + gzipr, err := compress_gzip.NewReader(r) + if err != nil { + panic(err) + } + ungzipped, err := io_ioutil.ReadAll(gzipr) + if err != nil { + panic(err) + } + if err := github_com_gogo_protobuf_proto.Unmarshal(ungzipped, d); err != nil { + panic(err) + } + return d +} +func (this *Subby) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*Subby) + if !ok { + that2, ok := that.(Subby) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *Subby") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *Subby but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *Subby but is not nil && this == nil") + } + if this.Sub != nil && that1.Sub != nil { + if *this.Sub != *that1.Sub { + return fmt.Errorf("Sub this(%v) Not Equal that(%v)", *this.Sub, *that1.Sub) + } + } else if this.Sub != nil { + return fmt.Errorf("this.Sub == nil && that.Sub != nil") + } else if that1.Sub != nil { + return fmt.Errorf("Sub this(%v) Not Equal that(%v)", this.Sub, that1.Sub) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *Subby) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*Subby) + if !ok { + that2, ok := that.(Subby) + 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.Sub != nil && that1.Sub != nil { + if *this.Sub != *that1.Sub { + return false + } + } else if this.Sub != nil { + return false + } else if that1.Sub != nil { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *AllTypesOneOf) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*AllTypesOneOf) + if !ok { + that2, ok := that.(AllTypesOneOf) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *AllTypesOneOf") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *AllTypesOneOf but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *AllTypesOneOf but is not nil && this == nil") + } + if that1.TestOneof == nil { + if this.TestOneof != nil { + return fmt.Errorf("this.TestOneof != nil && that1.TestOneof == nil") + } + } else if this.TestOneof == nil { + return fmt.Errorf("this.TestOneof == nil && that1.TestOneof != nil") + } else if err := this.TestOneof.VerboseEqual(that1.TestOneof); err != nil { + return err + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *AllTypesOneOf_Field1) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*AllTypesOneOf_Field1) + if !ok { + that2, ok := that.(AllTypesOneOf_Field1) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *AllTypesOneOf_Field1") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *AllTypesOneOf_Field1 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *AllTypesOneOf_Field1 but is not nil && this == nil") + } + if this.Field1 != that1.Field1 { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) + } + return nil +} +func (this *AllTypesOneOf_Field2) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*AllTypesOneOf_Field2) + if !ok { + that2, ok := that.(AllTypesOneOf_Field2) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *AllTypesOneOf_Field2") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *AllTypesOneOf_Field2 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *AllTypesOneOf_Field2 but is not nil && this == nil") + } + if this.Field2 != that1.Field2 { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) + } + return nil +} +func (this *AllTypesOneOf_Field3) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*AllTypesOneOf_Field3) + if !ok { + that2, ok := that.(AllTypesOneOf_Field3) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *AllTypesOneOf_Field3") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *AllTypesOneOf_Field3 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *AllTypesOneOf_Field3 but is not nil && this == nil") + } + if this.Field3 != that1.Field3 { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", this.Field3, that1.Field3) + } + return nil +} +func (this *AllTypesOneOf_Field4) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*AllTypesOneOf_Field4) + if !ok { + that2, ok := that.(AllTypesOneOf_Field4) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *AllTypesOneOf_Field4") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *AllTypesOneOf_Field4 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *AllTypesOneOf_Field4 but is not nil && this == nil") + } + if this.Field4 != that1.Field4 { + return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", this.Field4, that1.Field4) + } + return nil +} +func (this *AllTypesOneOf_Field5) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*AllTypesOneOf_Field5) + if !ok { + that2, ok := that.(AllTypesOneOf_Field5) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *AllTypesOneOf_Field5") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *AllTypesOneOf_Field5 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *AllTypesOneOf_Field5 but is not nil && this == nil") + } + if this.Field5 != that1.Field5 { + return fmt.Errorf("Field5 this(%v) Not Equal that(%v)", this.Field5, that1.Field5) + } + return nil +} +func (this *AllTypesOneOf_Field6) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*AllTypesOneOf_Field6) + if !ok { + that2, ok := that.(AllTypesOneOf_Field6) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *AllTypesOneOf_Field6") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *AllTypesOneOf_Field6 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *AllTypesOneOf_Field6 but is not nil && this == nil") + } + if this.Field6 != that1.Field6 { + return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", this.Field6, that1.Field6) + } + return nil +} +func (this *AllTypesOneOf_Field7) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*AllTypesOneOf_Field7) + if !ok { + that2, ok := that.(AllTypesOneOf_Field7) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *AllTypesOneOf_Field7") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *AllTypesOneOf_Field7 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *AllTypesOneOf_Field7 but is not nil && this == nil") + } + if this.Field7 != that1.Field7 { + return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", this.Field7, that1.Field7) + } + return nil +} +func (this *AllTypesOneOf_Field8) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*AllTypesOneOf_Field8) + if !ok { + that2, ok := that.(AllTypesOneOf_Field8) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *AllTypesOneOf_Field8") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *AllTypesOneOf_Field8 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *AllTypesOneOf_Field8 but is not nil && this == nil") + } + if this.Field8 != that1.Field8 { + return fmt.Errorf("Field8 this(%v) Not Equal that(%v)", this.Field8, that1.Field8) + } + return nil +} +func (this *AllTypesOneOf_Field9) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*AllTypesOneOf_Field9) + if !ok { + that2, ok := that.(AllTypesOneOf_Field9) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *AllTypesOneOf_Field9") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *AllTypesOneOf_Field9 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *AllTypesOneOf_Field9 but is not nil && this == nil") + } + if this.Field9 != that1.Field9 { + return fmt.Errorf("Field9 this(%v) Not Equal that(%v)", this.Field9, that1.Field9) + } + return nil +} +func (this *AllTypesOneOf_Field10) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*AllTypesOneOf_Field10) + if !ok { + that2, ok := that.(AllTypesOneOf_Field10) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *AllTypesOneOf_Field10") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *AllTypesOneOf_Field10 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *AllTypesOneOf_Field10 but is not nil && this == nil") + } + if this.Field10 != that1.Field10 { + return fmt.Errorf("Field10 this(%v) Not Equal that(%v)", this.Field10, that1.Field10) + } + return nil +} +func (this *AllTypesOneOf_Field11) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*AllTypesOneOf_Field11) + if !ok { + that2, ok := that.(AllTypesOneOf_Field11) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *AllTypesOneOf_Field11") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *AllTypesOneOf_Field11 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *AllTypesOneOf_Field11 but is not nil && this == nil") + } + if this.Field11 != that1.Field11 { + return fmt.Errorf("Field11 this(%v) Not Equal that(%v)", this.Field11, that1.Field11) + } + return nil +} +func (this *AllTypesOneOf_Field12) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*AllTypesOneOf_Field12) + if !ok { + that2, ok := that.(AllTypesOneOf_Field12) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *AllTypesOneOf_Field12") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *AllTypesOneOf_Field12 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *AllTypesOneOf_Field12 but is not nil && this == nil") + } + if this.Field12 != that1.Field12 { + return fmt.Errorf("Field12 this(%v) Not Equal that(%v)", this.Field12, that1.Field12) + } + return nil +} +func (this *AllTypesOneOf_Field13) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*AllTypesOneOf_Field13) + if !ok { + that2, ok := that.(AllTypesOneOf_Field13) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *AllTypesOneOf_Field13") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *AllTypesOneOf_Field13 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *AllTypesOneOf_Field13 but is not nil && this == nil") + } + if this.Field13 != that1.Field13 { + return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", this.Field13, that1.Field13) + } + return nil +} +func (this *AllTypesOneOf_Field14) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*AllTypesOneOf_Field14) + if !ok { + that2, ok := that.(AllTypesOneOf_Field14) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *AllTypesOneOf_Field14") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *AllTypesOneOf_Field14 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *AllTypesOneOf_Field14 but is not nil && this == nil") + } + if this.Field14 != that1.Field14 { + return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", this.Field14, that1.Field14) + } + return nil +} +func (this *AllTypesOneOf_Field15) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*AllTypesOneOf_Field15) + if !ok { + that2, ok := that.(AllTypesOneOf_Field15) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *AllTypesOneOf_Field15") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *AllTypesOneOf_Field15 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *AllTypesOneOf_Field15 but is not nil && this == nil") + } + if !bytes.Equal(this.Field15, that1.Field15) { + return fmt.Errorf("Field15 this(%v) Not Equal that(%v)", this.Field15, that1.Field15) + } + return nil +} +func (this *AllTypesOneOf_SubMessage) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*AllTypesOneOf_SubMessage) + if !ok { + that2, ok := that.(AllTypesOneOf_SubMessage) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *AllTypesOneOf_SubMessage") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *AllTypesOneOf_SubMessage but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *AllTypesOneOf_SubMessage but is not nil && this == nil") + } + if !this.SubMessage.Equal(that1.SubMessage) { + return fmt.Errorf("SubMessage this(%v) Not Equal that(%v)", this.SubMessage, that1.SubMessage) + } + return nil +} +func (this *AllTypesOneOf) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*AllTypesOneOf) + if !ok { + that2, ok := that.(AllTypesOneOf) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + if this == nil { + return true + } + return false + } else if this == nil { + return false + } + if that1.TestOneof == nil { + if this.TestOneof != nil { + return false + } + } else if this.TestOneof == nil { + return false + } else if !this.TestOneof.Equal(that1.TestOneof) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *AllTypesOneOf_Field1) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*AllTypesOneOf_Field1) + if !ok { + that2, ok := that.(AllTypesOneOf_Field1) + 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.Field1 != that1.Field1 { + return false + } + return true +} +func (this *AllTypesOneOf_Field2) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*AllTypesOneOf_Field2) + if !ok { + that2, ok := that.(AllTypesOneOf_Field2) + 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.Field2 != that1.Field2 { + return false + } + return true +} +func (this *AllTypesOneOf_Field3) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*AllTypesOneOf_Field3) + if !ok { + that2, ok := that.(AllTypesOneOf_Field3) + 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.Field3 != that1.Field3 { + return false + } + return true +} +func (this *AllTypesOneOf_Field4) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*AllTypesOneOf_Field4) + if !ok { + that2, ok := that.(AllTypesOneOf_Field4) + 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.Field4 != that1.Field4 { + return false + } + return true +} +func (this *AllTypesOneOf_Field5) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*AllTypesOneOf_Field5) + if !ok { + that2, ok := that.(AllTypesOneOf_Field5) + 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.Field5 != that1.Field5 { + return false + } + return true +} +func (this *AllTypesOneOf_Field6) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*AllTypesOneOf_Field6) + if !ok { + that2, ok := that.(AllTypesOneOf_Field6) + 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.Field6 != that1.Field6 { + return false + } + return true +} +func (this *AllTypesOneOf_Field7) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*AllTypesOneOf_Field7) + if !ok { + that2, ok := that.(AllTypesOneOf_Field7) + 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.Field7 != that1.Field7 { + return false + } + return true +} +func (this *AllTypesOneOf_Field8) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*AllTypesOneOf_Field8) + if !ok { + that2, ok := that.(AllTypesOneOf_Field8) + 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.Field8 != that1.Field8 { + return false + } + return true +} +func (this *AllTypesOneOf_Field9) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*AllTypesOneOf_Field9) + if !ok { + that2, ok := that.(AllTypesOneOf_Field9) + 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.Field9 != that1.Field9 { + return false + } + return true +} +func (this *AllTypesOneOf_Field10) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*AllTypesOneOf_Field10) + if !ok { + that2, ok := that.(AllTypesOneOf_Field10) + 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.Field10 != that1.Field10 { + return false + } + return true +} +func (this *AllTypesOneOf_Field11) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*AllTypesOneOf_Field11) + if !ok { + that2, ok := that.(AllTypesOneOf_Field11) + 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.Field11 != that1.Field11 { + return false + } + return true +} +func (this *AllTypesOneOf_Field12) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*AllTypesOneOf_Field12) + if !ok { + that2, ok := that.(AllTypesOneOf_Field12) + 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.Field12 != that1.Field12 { + return false + } + return true +} +func (this *AllTypesOneOf_Field13) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*AllTypesOneOf_Field13) + if !ok { + that2, ok := that.(AllTypesOneOf_Field13) + 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.Field13 != that1.Field13 { + return false + } + return true +} +func (this *AllTypesOneOf_Field14) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*AllTypesOneOf_Field14) + if !ok { + that2, ok := that.(AllTypesOneOf_Field14) + 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.Field14 != that1.Field14 { + return false + } + return true +} +func (this *AllTypesOneOf_Field15) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*AllTypesOneOf_Field15) + if !ok { + that2, ok := that.(AllTypesOneOf_Field15) + 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.Field15, that1.Field15) { + return false + } + return true +} +func (this *AllTypesOneOf_SubMessage) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*AllTypesOneOf_SubMessage) + if !ok { + that2, ok := that.(AllTypesOneOf_SubMessage) + 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.SubMessage.Equal(that1.SubMessage) { + return false + } + return true +} +func (this *TwoOneofs) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*TwoOneofs) + if !ok { + that2, ok := that.(TwoOneofs) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *TwoOneofs") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *TwoOneofs but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *TwoOneofs but is not nil && this == nil") + } + if that1.One == nil { + if this.One != nil { + return fmt.Errorf("this.One != nil && that1.One == nil") + } + } else if this.One == nil { + return fmt.Errorf("this.One == nil && that1.One != nil") + } else if err := this.One.VerboseEqual(that1.One); err != nil { + return err + } + if that1.Two == nil { + if this.Two != nil { + return fmt.Errorf("this.Two != nil && that1.Two == nil") + } + } else if this.Two == nil { + return fmt.Errorf("this.Two == nil && that1.Two != nil") + } else if err := this.Two.VerboseEqual(that1.Two); err != nil { + return err + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *TwoOneofs_Field1) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*TwoOneofs_Field1) + if !ok { + that2, ok := that.(TwoOneofs_Field1) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *TwoOneofs_Field1") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *TwoOneofs_Field1 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *TwoOneofs_Field1 but is not nil && this == nil") + } + if this.Field1 != that1.Field1 { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) + } + return nil +} +func (this *TwoOneofs_Field2) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*TwoOneofs_Field2) + if !ok { + that2, ok := that.(TwoOneofs_Field2) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *TwoOneofs_Field2") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *TwoOneofs_Field2 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *TwoOneofs_Field2 but is not nil && this == nil") + } + if this.Field2 != that1.Field2 { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) + } + return nil +} +func (this *TwoOneofs_Field3) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*TwoOneofs_Field3) + if !ok { + that2, ok := that.(TwoOneofs_Field3) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *TwoOneofs_Field3") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *TwoOneofs_Field3 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *TwoOneofs_Field3 but is not nil && this == nil") + } + if this.Field3 != that1.Field3 { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", this.Field3, that1.Field3) + } + return nil +} +func (this *TwoOneofs_Field34) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*TwoOneofs_Field34) + if !ok { + that2, ok := that.(TwoOneofs_Field34) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *TwoOneofs_Field34") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *TwoOneofs_Field34 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *TwoOneofs_Field34 but is not nil && this == nil") + } + if this.Field34 != that1.Field34 { + return fmt.Errorf("Field34 this(%v) Not Equal that(%v)", this.Field34, that1.Field34) + } + return nil +} +func (this *TwoOneofs_Field35) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*TwoOneofs_Field35) + if !ok { + that2, ok := that.(TwoOneofs_Field35) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *TwoOneofs_Field35") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *TwoOneofs_Field35 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *TwoOneofs_Field35 but is not nil && this == nil") + } + if !bytes.Equal(this.Field35, that1.Field35) { + return fmt.Errorf("Field35 this(%v) Not Equal that(%v)", this.Field35, that1.Field35) + } + return nil +} +func (this *TwoOneofs_SubMessage2) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*TwoOneofs_SubMessage2) + if !ok { + that2, ok := that.(TwoOneofs_SubMessage2) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *TwoOneofs_SubMessage2") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *TwoOneofs_SubMessage2 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *TwoOneofs_SubMessage2 but is not nil && this == nil") + } + if !this.SubMessage2.Equal(that1.SubMessage2) { + return fmt.Errorf("SubMessage2 this(%v) Not Equal that(%v)", this.SubMessage2, that1.SubMessage2) + } + return nil +} +func (this *TwoOneofs) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*TwoOneofs) + if !ok { + that2, ok := that.(TwoOneofs) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + if this == nil { + return true + } + return false + } else if this == nil { + return false + } + if that1.One == nil { + if this.One != nil { + return false + } + } else if this.One == nil { + return false + } else if !this.One.Equal(that1.One) { + return false + } + if that1.Two == nil { + if this.Two != nil { + return false + } + } else if this.Two == nil { + return false + } else if !this.Two.Equal(that1.Two) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *TwoOneofs_Field1) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*TwoOneofs_Field1) + if !ok { + that2, ok := that.(TwoOneofs_Field1) + 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.Field1 != that1.Field1 { + return false + } + return true +} +func (this *TwoOneofs_Field2) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*TwoOneofs_Field2) + if !ok { + that2, ok := that.(TwoOneofs_Field2) + 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.Field2 != that1.Field2 { + return false + } + return true +} +func (this *TwoOneofs_Field3) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*TwoOneofs_Field3) + if !ok { + that2, ok := that.(TwoOneofs_Field3) + 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.Field3 != that1.Field3 { + return false + } + return true +} +func (this *TwoOneofs_Field34) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*TwoOneofs_Field34) + if !ok { + that2, ok := that.(TwoOneofs_Field34) + 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.Field34 != that1.Field34 { + return false + } + return true +} +func (this *TwoOneofs_Field35) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*TwoOneofs_Field35) + if !ok { + that2, ok := that.(TwoOneofs_Field35) + 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.Field35, that1.Field35) { + return false + } + return true +} +func (this *TwoOneofs_SubMessage2) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*TwoOneofs_SubMessage2) + if !ok { + that2, ok := that.(TwoOneofs_SubMessage2) + 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.SubMessage2.Equal(that1.SubMessage2) { + return false + } + return true +} +func (this *CustomOneof) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*CustomOneof) + if !ok { + that2, ok := that.(CustomOneof) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *CustomOneof") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *CustomOneof but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *CustomOneof but is not nil && this == nil") + } + if that1.Custom == nil { + if this.Custom != nil { + return fmt.Errorf("this.Custom != nil && that1.Custom == nil") + } + } else if this.Custom == nil { + return fmt.Errorf("this.Custom == nil && that1.Custom != nil") + } else if err := this.Custom.VerboseEqual(that1.Custom); err != nil { + return err + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *CustomOneof_Stringy) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*CustomOneof_Stringy) + if !ok { + that2, ok := that.(CustomOneof_Stringy) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *CustomOneof_Stringy") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *CustomOneof_Stringy but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *CustomOneof_Stringy but is not nil && this == nil") + } + if this.Stringy != that1.Stringy { + return fmt.Errorf("Stringy this(%v) Not Equal that(%v)", this.Stringy, that1.Stringy) + } + return nil +} +func (this *CustomOneof_CustomType) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*CustomOneof_CustomType) + if !ok { + that2, ok := that.(CustomOneof_CustomType) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *CustomOneof_CustomType") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *CustomOneof_CustomType but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *CustomOneof_CustomType but is not nil && this == nil") + } + if !this.CustomType.Equal(that1.CustomType) { + return fmt.Errorf("CustomType this(%v) Not Equal that(%v)", this.CustomType, that1.CustomType) + } + return nil +} +func (this *CustomOneof_CastType) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*CustomOneof_CastType) + if !ok { + that2, ok := that.(CustomOneof_CastType) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *CustomOneof_CastType") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *CustomOneof_CastType but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *CustomOneof_CastType but is not nil && this == nil") + } + if this.CastType != that1.CastType { + return fmt.Errorf("CastType this(%v) Not Equal that(%v)", this.CastType, that1.CastType) + } + return nil +} +func (this *CustomOneof_MyCustomName) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*CustomOneof_MyCustomName) + if !ok { + that2, ok := that.(CustomOneof_MyCustomName) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *CustomOneof_MyCustomName") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *CustomOneof_MyCustomName but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *CustomOneof_MyCustomName but is not nil && this == nil") + } + if this.MyCustomName != that1.MyCustomName { + return fmt.Errorf("MyCustomName this(%v) Not Equal that(%v)", this.MyCustomName, that1.MyCustomName) + } + return nil +} +func (this *CustomOneof) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*CustomOneof) + if !ok { + that2, ok := that.(CustomOneof) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + if this == nil { + return true + } + return false + } else if this == nil { + return false + } + if that1.Custom == nil { + if this.Custom != nil { + return false + } + } else if this.Custom == nil { + return false + } else if !this.Custom.Equal(that1.Custom) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *CustomOneof_Stringy) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*CustomOneof_Stringy) + if !ok { + that2, ok := that.(CustomOneof_Stringy) + 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.Stringy != that1.Stringy { + return false + } + return true +} +func (this *CustomOneof_CustomType) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*CustomOneof_CustomType) + if !ok { + that2, ok := that.(CustomOneof_CustomType) + 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.CustomType.Equal(that1.CustomType) { + return false + } + return true +} +func (this *CustomOneof_CastType) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*CustomOneof_CastType) + if !ok { + that2, ok := that.(CustomOneof_CastType) + 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.CastType != that1.CastType { + return false + } + return true +} +func (this *CustomOneof_MyCustomName) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*CustomOneof_MyCustomName) + if !ok { + that2, ok := that.(CustomOneof_MyCustomName) + 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.MyCustomName != that1.MyCustomName { + return false + } + return true +} +func (this *Subby) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&one.Subby{") + if this.Sub != nil { + s = append(s, "Sub: "+valueToGoStringOne(this.Sub, "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 *AllTypesOneOf) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 20) + s = append(s, "&one.AllTypesOneOf{") + if this.TestOneof != nil { + s = append(s, "TestOneof: "+fmt.Sprintf("%#v", this.TestOneof)+",\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 *AllTypesOneOf_Field1) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.AllTypesOneOf_Field1{` + + `Field1:` + fmt.Sprintf("%#v", this.Field1) + `}`}, ", ") + return s +} +func (this *AllTypesOneOf_Field2) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.AllTypesOneOf_Field2{` + + `Field2:` + fmt.Sprintf("%#v", this.Field2) + `}`}, ", ") + return s +} +func (this *AllTypesOneOf_Field3) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.AllTypesOneOf_Field3{` + + `Field3:` + fmt.Sprintf("%#v", this.Field3) + `}`}, ", ") + return s +} +func (this *AllTypesOneOf_Field4) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.AllTypesOneOf_Field4{` + + `Field4:` + fmt.Sprintf("%#v", this.Field4) + `}`}, ", ") + return s +} +func (this *AllTypesOneOf_Field5) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.AllTypesOneOf_Field5{` + + `Field5:` + fmt.Sprintf("%#v", this.Field5) + `}`}, ", ") + return s +} +func (this *AllTypesOneOf_Field6) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.AllTypesOneOf_Field6{` + + `Field6:` + fmt.Sprintf("%#v", this.Field6) + `}`}, ", ") + return s +} +func (this *AllTypesOneOf_Field7) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.AllTypesOneOf_Field7{` + + `Field7:` + fmt.Sprintf("%#v", this.Field7) + `}`}, ", ") + return s +} +func (this *AllTypesOneOf_Field8) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.AllTypesOneOf_Field8{` + + `Field8:` + fmt.Sprintf("%#v", this.Field8) + `}`}, ", ") + return s +} +func (this *AllTypesOneOf_Field9) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.AllTypesOneOf_Field9{` + + `Field9:` + fmt.Sprintf("%#v", this.Field9) + `}`}, ", ") + return s +} +func (this *AllTypesOneOf_Field10) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.AllTypesOneOf_Field10{` + + `Field10:` + fmt.Sprintf("%#v", this.Field10) + `}`}, ", ") + return s +} +func (this *AllTypesOneOf_Field11) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.AllTypesOneOf_Field11{` + + `Field11:` + fmt.Sprintf("%#v", this.Field11) + `}`}, ", ") + return s +} +func (this *AllTypesOneOf_Field12) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.AllTypesOneOf_Field12{` + + `Field12:` + fmt.Sprintf("%#v", this.Field12) + `}`}, ", ") + return s +} +func (this *AllTypesOneOf_Field13) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.AllTypesOneOf_Field13{` + + `Field13:` + fmt.Sprintf("%#v", this.Field13) + `}`}, ", ") + return s +} +func (this *AllTypesOneOf_Field14) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.AllTypesOneOf_Field14{` + + `Field14:` + fmt.Sprintf("%#v", this.Field14) + `}`}, ", ") + return s +} +func (this *AllTypesOneOf_Field15) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.AllTypesOneOf_Field15{` + + `Field15:` + fmt.Sprintf("%#v", this.Field15) + `}`}, ", ") + return s +} +func (this *AllTypesOneOf_SubMessage) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.AllTypesOneOf_SubMessage{` + + `SubMessage:` + fmt.Sprintf("%#v", this.SubMessage) + `}`}, ", ") + return s +} +func (this *TwoOneofs) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 10) + s = append(s, "&one.TwoOneofs{") + if this.One != nil { + s = append(s, "One: "+fmt.Sprintf("%#v", this.One)+",\n") + } + if this.Two != nil { + s = append(s, "Two: "+fmt.Sprintf("%#v", this.Two)+",\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 *TwoOneofs_Field1) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.TwoOneofs_Field1{` + + `Field1:` + fmt.Sprintf("%#v", this.Field1) + `}`}, ", ") + return s +} +func (this *TwoOneofs_Field2) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.TwoOneofs_Field2{` + + `Field2:` + fmt.Sprintf("%#v", this.Field2) + `}`}, ", ") + return s +} +func (this *TwoOneofs_Field3) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.TwoOneofs_Field3{` + + `Field3:` + fmt.Sprintf("%#v", this.Field3) + `}`}, ", ") + return s +} +func (this *TwoOneofs_Field34) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.TwoOneofs_Field34{` + + `Field34:` + fmt.Sprintf("%#v", this.Field34) + `}`}, ", ") + return s +} +func (this *TwoOneofs_Field35) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.TwoOneofs_Field35{` + + `Field35:` + fmt.Sprintf("%#v", this.Field35) + `}`}, ", ") + return s +} +func (this *TwoOneofs_SubMessage2) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.TwoOneofs_SubMessage2{` + + `SubMessage2:` + fmt.Sprintf("%#v", this.SubMessage2) + `}`}, ", ") + return s +} +func (this *CustomOneof) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 8) + s = append(s, "&one.CustomOneof{") + if this.Custom != nil { + s = append(s, "Custom: "+fmt.Sprintf("%#v", this.Custom)+",\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 *CustomOneof_Stringy) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.CustomOneof_Stringy{` + + `Stringy:` + fmt.Sprintf("%#v", this.Stringy) + `}`}, ", ") + return s +} +func (this *CustomOneof_CustomType) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.CustomOneof_CustomType{` + + `CustomType:` + fmt.Sprintf("%#v", this.CustomType) + `}`}, ", ") + return s +} +func (this *CustomOneof_CastType) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.CustomOneof_CastType{` + + `CastType:` + fmt.Sprintf("%#v", this.CastType) + `}`}, ", ") + return s +} +func (this *CustomOneof_MyCustomName) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.CustomOneof_MyCustomName{` + + `MyCustomName:` + fmt.Sprintf("%#v", this.MyCustomName) + `}`}, ", ") + return s +} +func valueToGoStringOne(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 extensionToGoStringOne(e map[int32]github_com_gogo_protobuf_proto.Extension) string { + if e == nil { + return "nil" + } + s := "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 +} +func NewPopulatedSubby(r randyOne, easy bool) *Subby { + this := &Subby{} + if r.Intn(10) != 0 { + v1 := randStringOne(r) + this.Sub = &v1 + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedOne(r, 2) + } + return this +} + +func NewPopulatedAllTypesOneOf(r randyOne, easy bool) *AllTypesOneOf { + this := &AllTypesOneOf{} + oneofNumber_TestOneof := []int32{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}[r.Intn(16)] + switch oneofNumber_TestOneof { + case 1: + this.TestOneof = NewPopulatedAllTypesOneOf_Field1(r, easy) + case 2: + this.TestOneof = NewPopulatedAllTypesOneOf_Field2(r, easy) + case 3: + this.TestOneof = NewPopulatedAllTypesOneOf_Field3(r, easy) + case 4: + this.TestOneof = NewPopulatedAllTypesOneOf_Field4(r, easy) + case 5: + this.TestOneof = NewPopulatedAllTypesOneOf_Field5(r, easy) + case 6: + this.TestOneof = NewPopulatedAllTypesOneOf_Field6(r, easy) + case 7: + this.TestOneof = NewPopulatedAllTypesOneOf_Field7(r, easy) + case 8: + this.TestOneof = NewPopulatedAllTypesOneOf_Field8(r, easy) + case 9: + this.TestOneof = NewPopulatedAllTypesOneOf_Field9(r, easy) + case 10: + this.TestOneof = NewPopulatedAllTypesOneOf_Field10(r, easy) + case 11: + this.TestOneof = NewPopulatedAllTypesOneOf_Field11(r, easy) + case 12: + this.TestOneof = NewPopulatedAllTypesOneOf_Field12(r, easy) + case 13: + this.TestOneof = NewPopulatedAllTypesOneOf_Field13(r, easy) + case 14: + this.TestOneof = NewPopulatedAllTypesOneOf_Field14(r, easy) + case 15: + this.TestOneof = NewPopulatedAllTypesOneOf_Field15(r, easy) + case 16: + this.TestOneof = NewPopulatedAllTypesOneOf_SubMessage(r, easy) + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedOne(r, 17) + } + return this +} + +func NewPopulatedAllTypesOneOf_Field1(r randyOne, easy bool) *AllTypesOneOf_Field1 { + this := &AllTypesOneOf_Field1{} + this.Field1 = float64(r.Float64()) + if r.Intn(2) == 0 { + this.Field1 *= -1 + } + return this +} +func NewPopulatedAllTypesOneOf_Field2(r randyOne, easy bool) *AllTypesOneOf_Field2 { + this := &AllTypesOneOf_Field2{} + this.Field2 = float32(r.Float32()) + if r.Intn(2) == 0 { + this.Field2 *= -1 + } + return this +} +func NewPopulatedAllTypesOneOf_Field3(r randyOne, easy bool) *AllTypesOneOf_Field3 { + this := &AllTypesOneOf_Field3{} + this.Field3 = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Field3 *= -1 + } + return this +} +func NewPopulatedAllTypesOneOf_Field4(r randyOne, easy bool) *AllTypesOneOf_Field4 { + this := &AllTypesOneOf_Field4{} + this.Field4 = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Field4 *= -1 + } + return this +} +func NewPopulatedAllTypesOneOf_Field5(r randyOne, easy bool) *AllTypesOneOf_Field5 { + this := &AllTypesOneOf_Field5{} + this.Field5 = uint32(r.Uint32()) + return this +} +func NewPopulatedAllTypesOneOf_Field6(r randyOne, easy bool) *AllTypesOneOf_Field6 { + this := &AllTypesOneOf_Field6{} + this.Field6 = uint64(uint64(r.Uint32())) + return this +} +func NewPopulatedAllTypesOneOf_Field7(r randyOne, easy bool) *AllTypesOneOf_Field7 { + this := &AllTypesOneOf_Field7{} + this.Field7 = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Field7 *= -1 + } + return this +} +func NewPopulatedAllTypesOneOf_Field8(r randyOne, easy bool) *AllTypesOneOf_Field8 { + this := &AllTypesOneOf_Field8{} + this.Field8 = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Field8 *= -1 + } + return this +} +func NewPopulatedAllTypesOneOf_Field9(r randyOne, easy bool) *AllTypesOneOf_Field9 { + this := &AllTypesOneOf_Field9{} + this.Field9 = uint32(r.Uint32()) + return this +} +func NewPopulatedAllTypesOneOf_Field10(r randyOne, easy bool) *AllTypesOneOf_Field10 { + this := &AllTypesOneOf_Field10{} + this.Field10 = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Field10 *= -1 + } + return this +} +func NewPopulatedAllTypesOneOf_Field11(r randyOne, easy bool) *AllTypesOneOf_Field11 { + this := &AllTypesOneOf_Field11{} + this.Field11 = uint64(uint64(r.Uint32())) + return this +} +func NewPopulatedAllTypesOneOf_Field12(r randyOne, easy bool) *AllTypesOneOf_Field12 { + this := &AllTypesOneOf_Field12{} + this.Field12 = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Field12 *= -1 + } + return this +} +func NewPopulatedAllTypesOneOf_Field13(r randyOne, easy bool) *AllTypesOneOf_Field13 { + this := &AllTypesOneOf_Field13{} + this.Field13 = bool(bool(r.Intn(2) == 0)) + return this +} +func NewPopulatedAllTypesOneOf_Field14(r randyOne, easy bool) *AllTypesOneOf_Field14 { + this := &AllTypesOneOf_Field14{} + this.Field14 = randStringOne(r) + return this +} +func NewPopulatedAllTypesOneOf_Field15(r randyOne, easy bool) *AllTypesOneOf_Field15 { + this := &AllTypesOneOf_Field15{} + v2 := r.Intn(100) + this.Field15 = make([]byte, v2) + for i := 0; i < v2; i++ { + this.Field15[i] = byte(r.Intn(256)) + } + return this +} +func NewPopulatedAllTypesOneOf_SubMessage(r randyOne, easy bool) *AllTypesOneOf_SubMessage { + this := &AllTypesOneOf_SubMessage{} + this.SubMessage = NewPopulatedSubby(r, easy) + return this +} +func NewPopulatedTwoOneofs(r randyOne, easy bool) *TwoOneofs { + this := &TwoOneofs{} + oneofNumber_One := []int32{1, 2, 3}[r.Intn(3)] + switch oneofNumber_One { + case 1: + this.One = NewPopulatedTwoOneofs_Field1(r, easy) + case 2: + this.One = NewPopulatedTwoOneofs_Field2(r, easy) + case 3: + this.One = NewPopulatedTwoOneofs_Field3(r, easy) + } + oneofNumber_Two := []int32{34, 35, 36}[r.Intn(3)] + switch oneofNumber_Two { + case 34: + this.Two = NewPopulatedTwoOneofs_Field34(r, easy) + case 35: + this.Two = NewPopulatedTwoOneofs_Field35(r, easy) + case 36: + this.Two = NewPopulatedTwoOneofs_SubMessage2(r, easy) + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedOne(r, 37) + } + return this +} + +func NewPopulatedTwoOneofs_Field1(r randyOne, easy bool) *TwoOneofs_Field1 { + this := &TwoOneofs_Field1{} + this.Field1 = float64(r.Float64()) + if r.Intn(2) == 0 { + this.Field1 *= -1 + } + return this +} +func NewPopulatedTwoOneofs_Field2(r randyOne, easy bool) *TwoOneofs_Field2 { + this := &TwoOneofs_Field2{} + this.Field2 = float32(r.Float32()) + if r.Intn(2) == 0 { + this.Field2 *= -1 + } + return this +} +func NewPopulatedTwoOneofs_Field3(r randyOne, easy bool) *TwoOneofs_Field3 { + this := &TwoOneofs_Field3{} + this.Field3 = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Field3 *= -1 + } + return this +} +func NewPopulatedTwoOneofs_Field34(r randyOne, easy bool) *TwoOneofs_Field34 { + this := &TwoOneofs_Field34{} + this.Field34 = randStringOne(r) + return this +} +func NewPopulatedTwoOneofs_Field35(r randyOne, easy bool) *TwoOneofs_Field35 { + this := &TwoOneofs_Field35{} + v3 := r.Intn(100) + this.Field35 = make([]byte, v3) + for i := 0; i < v3; i++ { + this.Field35[i] = byte(r.Intn(256)) + } + return this +} +func NewPopulatedTwoOneofs_SubMessage2(r randyOne, easy bool) *TwoOneofs_SubMessage2 { + this := &TwoOneofs_SubMessage2{} + this.SubMessage2 = NewPopulatedSubby(r, easy) + return this +} +func NewPopulatedCustomOneof(r randyOne, easy bool) *CustomOneof { + this := &CustomOneof{} + oneofNumber_Custom := []int32{34, 35, 36, 37}[r.Intn(4)] + switch oneofNumber_Custom { + case 34: + this.Custom = NewPopulatedCustomOneof_Stringy(r, easy) + case 35: + this.Custom = NewPopulatedCustomOneof_CustomType(r, easy) + case 36: + this.Custom = NewPopulatedCustomOneof_CastType(r, easy) + case 37: + this.Custom = NewPopulatedCustomOneof_MyCustomName(r, easy) + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedOne(r, 38) + } + return this +} + +func NewPopulatedCustomOneof_Stringy(r randyOne, easy bool) *CustomOneof_Stringy { + this := &CustomOneof_Stringy{} + this.Stringy = randStringOne(r) + return this +} +func NewPopulatedCustomOneof_CustomType(r randyOne, easy bool) *CustomOneof_CustomType { + this := &CustomOneof_CustomType{} + v4 := github_com_gogo_protobuf_test_custom.NewPopulatedUint128(r) + this.CustomType = *v4 + return this +} +func NewPopulatedCustomOneof_CastType(r randyOne, easy bool) *CustomOneof_CastType { + this := &CustomOneof_CastType{} + this.CastType = github_com_gogo_protobuf_test_casttype.MyUint64Type(uint64(r.Uint32())) + return this +} +func NewPopulatedCustomOneof_MyCustomName(r randyOne, easy bool) *CustomOneof_MyCustomName { + this := &CustomOneof_MyCustomName{} + this.MyCustomName = int64(r.Int63()) + if r.Intn(2) == 0 { + this.MyCustomName *= -1 + } + return this +} + +type randyOne interface { + Float32() float32 + Float64() float64 + Int63() int64 + Int31() int32 + Uint32() uint32 + Intn(n int) int +} + +func randUTF8RuneOne(r randyOne) 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 randStringOne(r randyOne) string { + v5 := r.Intn(100) + tmps := make([]rune, v5) + for i := 0; i < v5; i++ { + tmps[i] = randUTF8RuneOne(r) + } + return string(tmps) +} +func randUnrecognizedOne(r randyOne, 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 = randFieldOne(data, r, fieldNumber, wire) + } + return data +} +func randFieldOne(data []byte, r randyOne, fieldNumber int, wire int) []byte { + key := uint32(fieldNumber)<<3 | uint32(wire) + switch wire { + case 0: + data = encodeVarintPopulateOne(data, uint64(key)) + v6 := r.Int63() + if r.Intn(2) == 0 { + v6 *= -1 + } + data = encodeVarintPopulateOne(data, uint64(v6)) + case 1: + data = encodeVarintPopulateOne(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 = encodeVarintPopulateOne(data, uint64(key)) + ll := r.Intn(100) + data = encodeVarintPopulateOne(data, uint64(ll)) + for j := 0; j < ll; j++ { + data = append(data, byte(r.Intn(256))) + } + default: + data = encodeVarintPopulateOne(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 encodeVarintPopulateOne(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 *Subby) Size() (n int) { + var l int + _ = l + if m.Sub != nil { + l = len(*m.Sub) + n += 1 + l + sovOne(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *AllTypesOneOf) Size() (n int) { + var l int + _ = l + if m.TestOneof != nil { + n += m.TestOneof.Size() + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *AllTypesOneOf_Field1) Size() (n int) { + var l int + _ = l + n += 9 + return n +} +func (m *AllTypesOneOf_Field2) Size() (n int) { + var l int + _ = l + n += 5 + return n +} +func (m *AllTypesOneOf_Field3) Size() (n int) { + var l int + _ = l + n += 1 + sovOne(uint64(m.Field3)) + return n +} +func (m *AllTypesOneOf_Field4) Size() (n int) { + var l int + _ = l + n += 1 + sovOne(uint64(m.Field4)) + return n +} +func (m *AllTypesOneOf_Field5) Size() (n int) { + var l int + _ = l + n += 1 + sovOne(uint64(m.Field5)) + return n +} +func (m *AllTypesOneOf_Field6) Size() (n int) { + var l int + _ = l + n += 1 + sovOne(uint64(m.Field6)) + return n +} +func (m *AllTypesOneOf_Field7) Size() (n int) { + var l int + _ = l + n += 1 + sozOne(uint64(m.Field7)) + return n +} +func (m *AllTypesOneOf_Field8) Size() (n int) { + var l int + _ = l + n += 1 + sozOne(uint64(m.Field8)) + return n +} +func (m *AllTypesOneOf_Field9) Size() (n int) { + var l int + _ = l + n += 5 + return n +} +func (m *AllTypesOneOf_Field10) Size() (n int) { + var l int + _ = l + n += 5 + return n +} +func (m *AllTypesOneOf_Field11) Size() (n int) { + var l int + _ = l + n += 9 + return n +} +func (m *AllTypesOneOf_Field12) Size() (n int) { + var l int + _ = l + n += 9 + return n +} +func (m *AllTypesOneOf_Field13) Size() (n int) { + var l int + _ = l + n += 2 + return n +} +func (m *AllTypesOneOf_Field14) Size() (n int) { + var l int + _ = l + l = len(m.Field14) + n += 1 + l + sovOne(uint64(l)) + return n +} +func (m *AllTypesOneOf_Field15) Size() (n int) { + var l int + _ = l + if m.Field15 != nil { + l = len(m.Field15) + n += 1 + l + sovOne(uint64(l)) + } + return n +} +func (m *AllTypesOneOf_SubMessage) Size() (n int) { + var l int + _ = l + if m.SubMessage != nil { + l = m.SubMessage.Size() + n += 2 + l + sovOne(uint64(l)) + } + return n +} +func (m *TwoOneofs) Size() (n int) { + var l int + _ = l + if m.One != nil { + n += m.One.Size() + } + if m.Two != nil { + n += m.Two.Size() + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *TwoOneofs_Field1) Size() (n int) { + var l int + _ = l + n += 9 + return n +} +func (m *TwoOneofs_Field2) Size() (n int) { + var l int + _ = l + n += 5 + return n +} +func (m *TwoOneofs_Field3) Size() (n int) { + var l int + _ = l + n += 1 + sovOne(uint64(m.Field3)) + return n +} +func (m *TwoOneofs_Field34) Size() (n int) { + var l int + _ = l + l = len(m.Field34) + n += 2 + l + sovOne(uint64(l)) + return n +} +func (m *TwoOneofs_Field35) Size() (n int) { + var l int + _ = l + if m.Field35 != nil { + l = len(m.Field35) + n += 2 + l + sovOne(uint64(l)) + } + return n +} +func (m *TwoOneofs_SubMessage2) Size() (n int) { + var l int + _ = l + if m.SubMessage2 != nil { + l = m.SubMessage2.Size() + n += 2 + l + sovOne(uint64(l)) + } + return n +} +func (m *CustomOneof) Size() (n int) { + var l int + _ = l + if m.Custom != nil { + n += m.Custom.Size() + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *CustomOneof_Stringy) Size() (n int) { + var l int + _ = l + l = len(m.Stringy) + n += 2 + l + sovOne(uint64(l)) + return n +} +func (m *CustomOneof_CustomType) Size() (n int) { + var l int + _ = l + l = m.CustomType.Size() + n += 2 + l + sovOne(uint64(l)) + return n +} +func (m *CustomOneof_CastType) Size() (n int) { + var l int + _ = l + n += 2 + sovOne(uint64(m.CastType)) + return n +} +func (m *CustomOneof_MyCustomName) Size() (n int) { + var l int + _ = l + n += 2 + sovOne(uint64(m.MyCustomName)) + return n +} + +func sovOne(x uint64) (n int) { + for { + n++ + x >>= 7 + if x == 0 { + break + } + } + return n +} +func sozOne(x uint64) (n int) { + return sovOne(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (this *Subby) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&Subby{`, + `Sub:` + valueToStringOne(this.Sub) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *AllTypesOneOf) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&AllTypesOneOf{`, + `TestOneof:` + fmt.Sprintf("%v", this.TestOneof) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *AllTypesOneOf_Field1) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&AllTypesOneOf_Field1{`, + `Field1:` + fmt.Sprintf("%v", this.Field1) + `,`, + `}`, + }, "") + return s +} +func (this *AllTypesOneOf_Field2) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&AllTypesOneOf_Field2{`, + `Field2:` + fmt.Sprintf("%v", this.Field2) + `,`, + `}`, + }, "") + return s +} +func (this *AllTypesOneOf_Field3) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&AllTypesOneOf_Field3{`, + `Field3:` + fmt.Sprintf("%v", this.Field3) + `,`, + `}`, + }, "") + return s +} +func (this *AllTypesOneOf_Field4) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&AllTypesOneOf_Field4{`, + `Field4:` + fmt.Sprintf("%v", this.Field4) + `,`, + `}`, + }, "") + return s +} +func (this *AllTypesOneOf_Field5) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&AllTypesOneOf_Field5{`, + `Field5:` + fmt.Sprintf("%v", this.Field5) + `,`, + `}`, + }, "") + return s +} +func (this *AllTypesOneOf_Field6) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&AllTypesOneOf_Field6{`, + `Field6:` + fmt.Sprintf("%v", this.Field6) + `,`, + `}`, + }, "") + return s +} +func (this *AllTypesOneOf_Field7) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&AllTypesOneOf_Field7{`, + `Field7:` + fmt.Sprintf("%v", this.Field7) + `,`, + `}`, + }, "") + return s +} +func (this *AllTypesOneOf_Field8) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&AllTypesOneOf_Field8{`, + `Field8:` + fmt.Sprintf("%v", this.Field8) + `,`, + `}`, + }, "") + return s +} +func (this *AllTypesOneOf_Field9) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&AllTypesOneOf_Field9{`, + `Field9:` + fmt.Sprintf("%v", this.Field9) + `,`, + `}`, + }, "") + return s +} +func (this *AllTypesOneOf_Field10) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&AllTypesOneOf_Field10{`, + `Field10:` + fmt.Sprintf("%v", this.Field10) + `,`, + `}`, + }, "") + return s +} +func (this *AllTypesOneOf_Field11) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&AllTypesOneOf_Field11{`, + `Field11:` + fmt.Sprintf("%v", this.Field11) + `,`, + `}`, + }, "") + return s +} +func (this *AllTypesOneOf_Field12) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&AllTypesOneOf_Field12{`, + `Field12:` + fmt.Sprintf("%v", this.Field12) + `,`, + `}`, + }, "") + return s +} +func (this *AllTypesOneOf_Field13) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&AllTypesOneOf_Field13{`, + `Field13:` + fmt.Sprintf("%v", this.Field13) + `,`, + `}`, + }, "") + return s +} +func (this *AllTypesOneOf_Field14) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&AllTypesOneOf_Field14{`, + `Field14:` + fmt.Sprintf("%v", this.Field14) + `,`, + `}`, + }, "") + return s +} +func (this *AllTypesOneOf_Field15) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&AllTypesOneOf_Field15{`, + `Field15:` + fmt.Sprintf("%v", this.Field15) + `,`, + `}`, + }, "") + return s +} +func (this *AllTypesOneOf_SubMessage) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&AllTypesOneOf_SubMessage{`, + `SubMessage:` + strings.Replace(fmt.Sprintf("%v", this.SubMessage), "Subby", "Subby", 1) + `,`, + `}`, + }, "") + return s +} +func (this *TwoOneofs) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&TwoOneofs{`, + `One:` + fmt.Sprintf("%v", this.One) + `,`, + `Two:` + fmt.Sprintf("%v", this.Two) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *TwoOneofs_Field1) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&TwoOneofs_Field1{`, + `Field1:` + fmt.Sprintf("%v", this.Field1) + `,`, + `}`, + }, "") + return s +} +func (this *TwoOneofs_Field2) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&TwoOneofs_Field2{`, + `Field2:` + fmt.Sprintf("%v", this.Field2) + `,`, + `}`, + }, "") + return s +} +func (this *TwoOneofs_Field3) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&TwoOneofs_Field3{`, + `Field3:` + fmt.Sprintf("%v", this.Field3) + `,`, + `}`, + }, "") + return s +} +func (this *TwoOneofs_Field34) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&TwoOneofs_Field34{`, + `Field34:` + fmt.Sprintf("%v", this.Field34) + `,`, + `}`, + }, "") + return s +} +func (this *TwoOneofs_Field35) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&TwoOneofs_Field35{`, + `Field35:` + fmt.Sprintf("%v", this.Field35) + `,`, + `}`, + }, "") + return s +} +func (this *TwoOneofs_SubMessage2) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&TwoOneofs_SubMessage2{`, + `SubMessage2:` + strings.Replace(fmt.Sprintf("%v", this.SubMessage2), "Subby", "Subby", 1) + `,`, + `}`, + }, "") + return s +} +func (this *CustomOneof) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&CustomOneof{`, + `Custom:` + fmt.Sprintf("%v", this.Custom) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *CustomOneof_Stringy) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&CustomOneof_Stringy{`, + `Stringy:` + fmt.Sprintf("%v", this.Stringy) + `,`, + `}`, + }, "") + return s +} +func (this *CustomOneof_CustomType) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&CustomOneof_CustomType{`, + `CustomType:` + fmt.Sprintf("%v", this.CustomType) + `,`, + `}`, + }, "") + return s +} +func (this *CustomOneof_CastType) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&CustomOneof_CastType{`, + `CastType:` + fmt.Sprintf("%v", this.CastType) + `,`, + `}`, + }, "") + return s +} +func (this *CustomOneof_MyCustomName) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&CustomOneof_MyCustomName{`, + `MyCustomName:` + fmt.Sprintf("%v", this.MyCustomName) + `,`, + `}`, + }, "") + return s +} +func valueToStringOne(v interface{}) string { + rv := reflect.ValueOf(v) + if rv.IsNil() { + return "nil" + } + pv := reflect.Indirect(rv).Interface() + return fmt.Sprintf("*%v", pv) +} + +var fileDescriptorOne = []byte{ + // 573 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xac, 0xd3, 0xbd, 0x6e, 0x1a, 0x4f, + 0x10, 0x00, 0x70, 0x8e, 0x6f, 0x06, 0xf8, 0x9b, 0xff, 0x55, 0x13, 0x17, 0x10, 0x91, 0x44, 0x4a, + 0x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/test/oneof/combos/neither/one.proto b/vendor/github.com/gogo/protobuf/test/oneof/combos/neither/one.proto new file mode 100644 index 000000000..0c88ac86a --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/oneof/combos/neither/one.proto @@ -0,0 +1,101 @@ +// Copyright (c) 2013, Vastech SA (PTY) LTD. All rights reserved. +// http://github.com/gogo/protobuf/gogoproto +// +// 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 one; + +import "github.com/gogo/protobuf/gogoproto/gogo.proto"; + +option (gogoproto.goproto_stringer_all) = false; +option (gogoproto.goproto_enum_prefix_all) = false; +option (gogoproto.goproto_getters_all) = false; + +option (gogoproto.equal_all) = true; +option (gogoproto.verbose_equal_all) = true; +option (gogoproto.stringer_all) = true; +option (gogoproto.gostring_all) = true; +option (gogoproto.description_all) = true; + +option (gogoproto.testgen_all) = true; +option (gogoproto.populate_all) = true; +option (gogoproto.unmarshaler_all) = false; +option (gogoproto.marshaler_all) = false; +option (gogoproto.sizer_all) = true; + +option (gogoproto.goproto_enum_stringer_all) = false; +option (gogoproto.enum_stringer_all) = true; + +option (gogoproto.unsafe_marshaler_all) = false; +option (gogoproto.unsafe_unmarshaler_all) = false; + +message Subby { + optional string sub = 1; +} + +message AllTypesOneOf { + oneof test_oneof { + double Field1 = 1; + float Field2 = 2; + int32 Field3 = 3; + int64 Field4 = 4; + uint32 Field5 = 5; + uint64 Field6 = 6; + sint32 Field7 = 7; + sint64 Field8 = 8; + fixed32 Field9 = 9; + sfixed32 Field10 = 10; + fixed64 Field11 = 11; + sfixed64 Field12 = 12; + bool Field13 = 13; + string Field14 = 14; + bytes Field15 = 15; + Subby sub_message = 16; + } +} + +message TwoOneofs { + oneof one { + double Field1 = 1; + float Field2 = 2; + int32 Field3 = 3; + } + + oneof two { + string Field34 = 34; + bytes Field35 = 35; + Subby sub_message2 = 36; + } +} + +message CustomOneof { + oneof custom { + string Stringy = 34; + bytes CustomType = 35 [(gogoproto.customtype) = "github.com/gogo/protobuf/test/custom.Uint128"]; + uint64 CastType = 36 [(gogoproto.casttype) = "github.com/gogo/protobuf/test/casttype.MyUint64Type"]; + int64 CustomName = 37 [(gogoproto.customname) = "MyCustomName"]; + } +} diff --git a/vendor/github.com/gogo/protobuf/test/oneof/combos/neither/onepb_test.go b/vendor/github.com/gogo/protobuf/test/oneof/combos/neither/onepb_test.go new file mode 100644 index 000000000..fdbacc076 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/oneof/combos/neither/onepb_test.go @@ -0,0 +1,631 @@ +// Code generated by protoc-gen-gogo. +// source: combos/neither/one.proto +// DO NOT EDIT! + +/* +Package one is a generated protocol buffer package. + +It is generated from these files: + combos/neither/one.proto + +It has these top-level messages: + Subby + AllTypesOneOf + TwoOneofs + CustomOneof +*/ +package one + +import testing "testing" +import math_rand "math/rand" +import time "time" +import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" +import github_com_gogo_protobuf_jsonpb "github.com/gogo/protobuf/jsonpb" +import fmt "fmt" +import go_parser "go/parser" +import proto "github.com/gogo/protobuf/proto" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +func TestSubbyProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedSubby(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Subby{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestAllTypesOneOfProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAllTypesOneOf(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &AllTypesOneOf{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestTwoOneofsProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedTwoOneofs(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &TwoOneofs{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestCustomOneofProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomOneof(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &CustomOneof{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestSubbyJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedSubby(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Subby{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestAllTypesOneOfJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAllTypesOneOf(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &AllTypesOneOf{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestTwoOneofsJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedTwoOneofs(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &TwoOneofs{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestCustomOneofJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomOneof(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &CustomOneof{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestSubbyProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedSubby(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &Subby{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestSubbyProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedSubby(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &Subby{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestAllTypesOneOfProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAllTypesOneOf(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &AllTypesOneOf{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestAllTypesOneOfProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAllTypesOneOf(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &AllTypesOneOf{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestTwoOneofsProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedTwoOneofs(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &TwoOneofs{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestTwoOneofsProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedTwoOneofs(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &TwoOneofs{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestCustomOneofProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomOneof(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &CustomOneof{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestCustomOneofProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomOneof(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &CustomOneof{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestOneDescription(t *testing.T) { + OneDescription() +} +func TestSubbyVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedSubby(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &Subby{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestAllTypesOneOfVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAllTypesOneOf(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &AllTypesOneOf{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestTwoOneofsVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedTwoOneofs(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &TwoOneofs{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestCustomOneofVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomOneof(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &CustomOneof{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestSubbyGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedSubby(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestAllTypesOneOfGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAllTypesOneOf(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestTwoOneofsGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedTwoOneofs(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestCustomOneofGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomOneof(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestSubbySize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedSubby(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func TestAllTypesOneOfSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAllTypesOneOf(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func TestTwoOneofsSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedTwoOneofs(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func TestCustomOneofSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomOneof(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func TestSubbyStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedSubby(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestAllTypesOneOfStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAllTypesOneOf(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestTwoOneofsStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedTwoOneofs(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestCustomOneofStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomOneof(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} + +//These tests are generated by github.com/gogo/protobuf/plugin/testgen diff --git a/vendor/github.com/gogo/protobuf/test/oneof/combos/unmarshaler/one.pb.go b/vendor/github.com/gogo/protobuf/test/oneof/combos/unmarshaler/one.pb.go new file mode 100644 index 000000000..0a632930c --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/oneof/combos/unmarshaler/one.pb.go @@ -0,0 +1,5277 @@ +// Code generated by protoc-gen-gogo. +// source: combos/unmarshaler/one.proto +// DO NOT EDIT! + +/* + Package one is a generated protocol buffer package. + + It is generated from these files: + combos/unmarshaler/one.proto + + It has these top-level messages: + Subby + AllTypesOneOf + TwoOneofs + CustomOneof +*/ +package one + +import proto "github.com/gogo/protobuf/proto" +import fmt "fmt" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" + +import github_com_gogo_protobuf_test_custom "github.com/gogo/protobuf/test/custom" +import github_com_gogo_protobuf_test_casttype "github.com/gogo/protobuf/test/casttype" + +import github_com_gogo_protobuf_protoc_gen_gogo_descriptor "github.com/gogo/protobuf/protoc-gen-gogo/descriptor" +import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" +import compress_gzip "compress/gzip" +import bytes "bytes" +import io_ioutil "io/ioutil" + +import strings "strings" +import sort "sort" +import strconv "strconv" +import reflect "reflect" + +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. +const _ = proto.GoGoProtoPackageIsVersion1 + +type Subby struct { + Sub *string `protobuf:"bytes,1,opt,name=sub" json:"sub,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *Subby) Reset() { *m = Subby{} } +func (*Subby) ProtoMessage() {} +func (*Subby) Descriptor() ([]byte, []int) { return fileDescriptorOne, []int{0} } + +type AllTypesOneOf struct { + // Types that are valid to be assigned to TestOneof: + // *AllTypesOneOf_Field1 + // *AllTypesOneOf_Field2 + // *AllTypesOneOf_Field3 + // *AllTypesOneOf_Field4 + // *AllTypesOneOf_Field5 + // *AllTypesOneOf_Field6 + // *AllTypesOneOf_Field7 + // *AllTypesOneOf_Field8 + // *AllTypesOneOf_Field9 + // *AllTypesOneOf_Field10 + // *AllTypesOneOf_Field11 + // *AllTypesOneOf_Field12 + // *AllTypesOneOf_Field13 + // *AllTypesOneOf_Field14 + // *AllTypesOneOf_Field15 + // *AllTypesOneOf_SubMessage + TestOneof isAllTypesOneOf_TestOneof `protobuf_oneof:"test_oneof"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *AllTypesOneOf) Reset() { *m = AllTypesOneOf{} } +func (*AllTypesOneOf) ProtoMessage() {} +func (*AllTypesOneOf) Descriptor() ([]byte, []int) { return fileDescriptorOne, []int{1} } + +type isAllTypesOneOf_TestOneof interface { + isAllTypesOneOf_TestOneof() + Equal(interface{}) bool + VerboseEqual(interface{}) error + Size() int +} + +type AllTypesOneOf_Field1 struct { + Field1 float64 `protobuf:"fixed64,1,opt,name=Field1,json=field1,oneof"` +} +type AllTypesOneOf_Field2 struct { + Field2 float32 `protobuf:"fixed32,2,opt,name=Field2,json=field2,oneof"` +} +type AllTypesOneOf_Field3 struct { + Field3 int32 `protobuf:"varint,3,opt,name=Field3,json=field3,oneof"` +} +type AllTypesOneOf_Field4 struct { + Field4 int64 `protobuf:"varint,4,opt,name=Field4,json=field4,oneof"` +} +type AllTypesOneOf_Field5 struct { + Field5 uint32 `protobuf:"varint,5,opt,name=Field5,json=field5,oneof"` +} +type AllTypesOneOf_Field6 struct { + Field6 uint64 `protobuf:"varint,6,opt,name=Field6,json=field6,oneof"` +} +type AllTypesOneOf_Field7 struct { + Field7 int32 `protobuf:"zigzag32,7,opt,name=Field7,json=field7,oneof"` +} +type AllTypesOneOf_Field8 struct { + Field8 int64 `protobuf:"zigzag64,8,opt,name=Field8,json=field8,oneof"` +} +type AllTypesOneOf_Field9 struct { + Field9 uint32 `protobuf:"fixed32,9,opt,name=Field9,json=field9,oneof"` +} +type AllTypesOneOf_Field10 struct { + Field10 int32 `protobuf:"fixed32,10,opt,name=Field10,json=field10,oneof"` +} +type AllTypesOneOf_Field11 struct { + Field11 uint64 `protobuf:"fixed64,11,opt,name=Field11,json=field11,oneof"` +} +type AllTypesOneOf_Field12 struct { + Field12 int64 `protobuf:"fixed64,12,opt,name=Field12,json=field12,oneof"` +} +type AllTypesOneOf_Field13 struct { + Field13 bool `protobuf:"varint,13,opt,name=Field13,json=field13,oneof"` +} +type AllTypesOneOf_Field14 struct { + Field14 string `protobuf:"bytes,14,opt,name=Field14,json=field14,oneof"` +} +type AllTypesOneOf_Field15 struct { + Field15 []byte `protobuf:"bytes,15,opt,name=Field15,json=field15,oneof"` +} +type AllTypesOneOf_SubMessage struct { + SubMessage *Subby `protobuf:"bytes,16,opt,name=sub_message,json=subMessage,oneof"` +} + +func (*AllTypesOneOf_Field1) isAllTypesOneOf_TestOneof() {} +func (*AllTypesOneOf_Field2) isAllTypesOneOf_TestOneof() {} +func (*AllTypesOneOf_Field3) isAllTypesOneOf_TestOneof() {} +func (*AllTypesOneOf_Field4) isAllTypesOneOf_TestOneof() {} +func (*AllTypesOneOf_Field5) isAllTypesOneOf_TestOneof() {} +func (*AllTypesOneOf_Field6) isAllTypesOneOf_TestOneof() {} +func (*AllTypesOneOf_Field7) isAllTypesOneOf_TestOneof() {} +func (*AllTypesOneOf_Field8) isAllTypesOneOf_TestOneof() {} +func (*AllTypesOneOf_Field9) isAllTypesOneOf_TestOneof() {} +func (*AllTypesOneOf_Field10) isAllTypesOneOf_TestOneof() {} +func (*AllTypesOneOf_Field11) isAllTypesOneOf_TestOneof() {} +func (*AllTypesOneOf_Field12) isAllTypesOneOf_TestOneof() {} +func (*AllTypesOneOf_Field13) isAllTypesOneOf_TestOneof() {} +func (*AllTypesOneOf_Field14) isAllTypesOneOf_TestOneof() {} +func (*AllTypesOneOf_Field15) isAllTypesOneOf_TestOneof() {} +func (*AllTypesOneOf_SubMessage) isAllTypesOneOf_TestOneof() {} + +func (m *AllTypesOneOf) GetTestOneof() isAllTypesOneOf_TestOneof { + if m != nil { + return m.TestOneof + } + return nil +} + +func (m *AllTypesOneOf) GetField1() float64 { + if x, ok := m.GetTestOneof().(*AllTypesOneOf_Field1); ok { + return x.Field1 + } + return 0 +} + +func (m *AllTypesOneOf) GetField2() float32 { + if x, ok := m.GetTestOneof().(*AllTypesOneOf_Field2); ok { + return x.Field2 + } + return 0 +} + +func (m *AllTypesOneOf) GetField3() int32 { + if x, ok := m.GetTestOneof().(*AllTypesOneOf_Field3); ok { + return x.Field3 + } + return 0 +} + +func (m *AllTypesOneOf) GetField4() int64 { + if x, ok := m.GetTestOneof().(*AllTypesOneOf_Field4); ok { + return x.Field4 + } + return 0 +} + +func (m *AllTypesOneOf) GetField5() uint32 { + if x, ok := m.GetTestOneof().(*AllTypesOneOf_Field5); ok { + return x.Field5 + } + return 0 +} + +func (m *AllTypesOneOf) GetField6() uint64 { + if x, ok := m.GetTestOneof().(*AllTypesOneOf_Field6); ok { + return x.Field6 + } + return 0 +} + +func (m *AllTypesOneOf) GetField7() int32 { + if x, ok := m.GetTestOneof().(*AllTypesOneOf_Field7); ok { + return x.Field7 + } + return 0 +} + +func (m *AllTypesOneOf) GetField8() int64 { + if x, ok := m.GetTestOneof().(*AllTypesOneOf_Field8); ok { + return x.Field8 + } + return 0 +} + +func (m *AllTypesOneOf) GetField9() uint32 { + if x, ok := m.GetTestOneof().(*AllTypesOneOf_Field9); ok { + return x.Field9 + } + return 0 +} + +func (m *AllTypesOneOf) GetField10() int32 { + if x, ok := m.GetTestOneof().(*AllTypesOneOf_Field10); ok { + return x.Field10 + } + return 0 +} + +func (m *AllTypesOneOf) GetField11() uint64 { + if x, ok := m.GetTestOneof().(*AllTypesOneOf_Field11); ok { + return x.Field11 + } + return 0 +} + +func (m *AllTypesOneOf) GetField12() int64 { + if x, ok := m.GetTestOneof().(*AllTypesOneOf_Field12); ok { + return x.Field12 + } + return 0 +} + +func (m *AllTypesOneOf) GetField13() bool { + if x, ok := m.GetTestOneof().(*AllTypesOneOf_Field13); ok { + return x.Field13 + } + return false +} + +func (m *AllTypesOneOf) GetField14() string { + if x, ok := m.GetTestOneof().(*AllTypesOneOf_Field14); ok { + return x.Field14 + } + return "" +} + +func (m *AllTypesOneOf) GetField15() []byte { + if x, ok := m.GetTestOneof().(*AllTypesOneOf_Field15); ok { + return x.Field15 + } + return nil +} + +func (m *AllTypesOneOf) GetSubMessage() *Subby { + if x, ok := m.GetTestOneof().(*AllTypesOneOf_SubMessage); ok { + return x.SubMessage + } + return nil +} + +// XXX_OneofFuncs is for the internal use of the proto package. +func (*AllTypesOneOf) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{}) { + return _AllTypesOneOf_OneofMarshaler, _AllTypesOneOf_OneofUnmarshaler, _AllTypesOneOf_OneofSizer, []interface{}{ + (*AllTypesOneOf_Field1)(nil), + (*AllTypesOneOf_Field2)(nil), + (*AllTypesOneOf_Field3)(nil), + (*AllTypesOneOf_Field4)(nil), + (*AllTypesOneOf_Field5)(nil), + (*AllTypesOneOf_Field6)(nil), + (*AllTypesOneOf_Field7)(nil), + (*AllTypesOneOf_Field8)(nil), + (*AllTypesOneOf_Field9)(nil), + (*AllTypesOneOf_Field10)(nil), + (*AllTypesOneOf_Field11)(nil), + (*AllTypesOneOf_Field12)(nil), + (*AllTypesOneOf_Field13)(nil), + (*AllTypesOneOf_Field14)(nil), + (*AllTypesOneOf_Field15)(nil), + (*AllTypesOneOf_SubMessage)(nil), + } +} + +func _AllTypesOneOf_OneofMarshaler(msg proto.Message, b *proto.Buffer) error { + m := msg.(*AllTypesOneOf) + // test_oneof + switch x := m.TestOneof.(type) { + case *AllTypesOneOf_Field1: + _ = b.EncodeVarint(1<<3 | proto.WireFixed64) + _ = b.EncodeFixed64(math.Float64bits(x.Field1)) + case *AllTypesOneOf_Field2: + _ = b.EncodeVarint(2<<3 | proto.WireFixed32) + _ = b.EncodeFixed32(uint64(math.Float32bits(x.Field2))) + case *AllTypesOneOf_Field3: + _ = b.EncodeVarint(3<<3 | proto.WireVarint) + _ = b.EncodeVarint(uint64(x.Field3)) + case *AllTypesOneOf_Field4: + _ = b.EncodeVarint(4<<3 | proto.WireVarint) + _ = b.EncodeVarint(uint64(x.Field4)) + case *AllTypesOneOf_Field5: + _ = b.EncodeVarint(5<<3 | proto.WireVarint) + _ = b.EncodeVarint(uint64(x.Field5)) + case *AllTypesOneOf_Field6: + _ = b.EncodeVarint(6<<3 | proto.WireVarint) + _ = b.EncodeVarint(uint64(x.Field6)) + case *AllTypesOneOf_Field7: + _ = b.EncodeVarint(7<<3 | proto.WireVarint) + _ = b.EncodeZigzag32(uint64(x.Field7)) + case *AllTypesOneOf_Field8: + _ = b.EncodeVarint(8<<3 | proto.WireVarint) + _ = b.EncodeZigzag64(uint64(x.Field8)) + case *AllTypesOneOf_Field9: + _ = b.EncodeVarint(9<<3 | proto.WireFixed32) + _ = b.EncodeFixed32(uint64(x.Field9)) + case *AllTypesOneOf_Field10: + _ = b.EncodeVarint(10<<3 | proto.WireFixed32) + _ = b.EncodeFixed32(uint64(x.Field10)) + case *AllTypesOneOf_Field11: + _ = b.EncodeVarint(11<<3 | proto.WireFixed64) + _ = b.EncodeFixed64(uint64(x.Field11)) + case *AllTypesOneOf_Field12: + _ = b.EncodeVarint(12<<3 | proto.WireFixed64) + _ = b.EncodeFixed64(uint64(x.Field12)) + case *AllTypesOneOf_Field13: + t := uint64(0) + if x.Field13 { + t = 1 + } + _ = b.EncodeVarint(13<<3 | proto.WireVarint) + _ = b.EncodeVarint(t) + case *AllTypesOneOf_Field14: + _ = b.EncodeVarint(14<<3 | proto.WireBytes) + _ = b.EncodeStringBytes(x.Field14) + case *AllTypesOneOf_Field15: + _ = b.EncodeVarint(15<<3 | proto.WireBytes) + _ = b.EncodeRawBytes(x.Field15) + case *AllTypesOneOf_SubMessage: + _ = b.EncodeVarint(16<<3 | proto.WireBytes) + if err := b.EncodeMessage(x.SubMessage); err != nil { + return err + } + case nil: + default: + return fmt.Errorf("AllTypesOneOf.TestOneof has unexpected type %T", x) + } + return nil +} + +func _AllTypesOneOf_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) { + m := msg.(*AllTypesOneOf) + switch tag { + case 1: // test_oneof.Field1 + if wire != proto.WireFixed64 { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeFixed64() + m.TestOneof = &AllTypesOneOf_Field1{math.Float64frombits(x)} + return true, err + case 2: // test_oneof.Field2 + if wire != proto.WireFixed32 { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeFixed32() + m.TestOneof = &AllTypesOneOf_Field2{math.Float32frombits(uint32(x))} + return true, err + case 3: // test_oneof.Field3 + if wire != proto.WireVarint { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeVarint() + m.TestOneof = &AllTypesOneOf_Field3{int32(x)} + return true, err + case 4: // test_oneof.Field4 + if wire != proto.WireVarint { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeVarint() + m.TestOneof = &AllTypesOneOf_Field4{int64(x)} + return true, err + case 5: // test_oneof.Field5 + if wire != proto.WireVarint { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeVarint() + m.TestOneof = &AllTypesOneOf_Field5{uint32(x)} + return true, err + case 6: // test_oneof.Field6 + if wire != proto.WireVarint { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeVarint() + m.TestOneof = &AllTypesOneOf_Field6{x} + return true, err + case 7: // test_oneof.Field7 + if wire != proto.WireVarint { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeZigzag32() + m.TestOneof = &AllTypesOneOf_Field7{int32(x)} + return true, err + case 8: // test_oneof.Field8 + if wire != proto.WireVarint { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeZigzag64() + m.TestOneof = &AllTypesOneOf_Field8{int64(x)} + return true, err + case 9: // test_oneof.Field9 + if wire != proto.WireFixed32 { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeFixed32() + m.TestOneof = &AllTypesOneOf_Field9{uint32(x)} + return true, err + case 10: // test_oneof.Field10 + if wire != proto.WireFixed32 { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeFixed32() + m.TestOneof = &AllTypesOneOf_Field10{int32(x)} + return true, err + case 11: // test_oneof.Field11 + if wire != proto.WireFixed64 { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeFixed64() + m.TestOneof = &AllTypesOneOf_Field11{x} + return true, err + case 12: // test_oneof.Field12 + if wire != proto.WireFixed64 { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeFixed64() + m.TestOneof = &AllTypesOneOf_Field12{int64(x)} + return true, err + case 13: // test_oneof.Field13 + if wire != proto.WireVarint { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeVarint() + m.TestOneof = &AllTypesOneOf_Field13{x != 0} + return true, err + case 14: // test_oneof.Field14 + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeStringBytes() + m.TestOneof = &AllTypesOneOf_Field14{x} + return true, err + case 15: // test_oneof.Field15 + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeRawBytes(true) + m.TestOneof = &AllTypesOneOf_Field15{x} + return true, err + case 16: // test_oneof.sub_message + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + msg := new(Subby) + err := b.DecodeMessage(msg) + m.TestOneof = &AllTypesOneOf_SubMessage{msg} + return true, err + default: + return false, nil + } +} + +func _AllTypesOneOf_OneofSizer(msg proto.Message) (n int) { + m := msg.(*AllTypesOneOf) + // test_oneof + switch x := m.TestOneof.(type) { + case *AllTypesOneOf_Field1: + n += proto.SizeVarint(1<<3 | proto.WireFixed64) + n += 8 + case *AllTypesOneOf_Field2: + n += proto.SizeVarint(2<<3 | proto.WireFixed32) + n += 4 + case *AllTypesOneOf_Field3: + n += proto.SizeVarint(3<<3 | proto.WireVarint) + n += proto.SizeVarint(uint64(x.Field3)) + case *AllTypesOneOf_Field4: + n += proto.SizeVarint(4<<3 | proto.WireVarint) + n += proto.SizeVarint(uint64(x.Field4)) + case *AllTypesOneOf_Field5: + n += proto.SizeVarint(5<<3 | proto.WireVarint) + n += proto.SizeVarint(uint64(x.Field5)) + case *AllTypesOneOf_Field6: + n += proto.SizeVarint(6<<3 | proto.WireVarint) + n += proto.SizeVarint(uint64(x.Field6)) + case *AllTypesOneOf_Field7: + n += proto.SizeVarint(7<<3 | proto.WireVarint) + n += proto.SizeVarint(uint64((uint32(x.Field7) << 1) ^ uint32((int32(x.Field7) >> 31)))) + case *AllTypesOneOf_Field8: + n += proto.SizeVarint(8<<3 | proto.WireVarint) + n += proto.SizeVarint(uint64(uint64(x.Field8<<1) ^ uint64((int64(x.Field8) >> 63)))) + case *AllTypesOneOf_Field9: + n += proto.SizeVarint(9<<3 | proto.WireFixed32) + n += 4 + case *AllTypesOneOf_Field10: + n += proto.SizeVarint(10<<3 | proto.WireFixed32) + n += 4 + case *AllTypesOneOf_Field11: + n += proto.SizeVarint(11<<3 | proto.WireFixed64) + n += 8 + case *AllTypesOneOf_Field12: + n += proto.SizeVarint(12<<3 | proto.WireFixed64) + n += 8 + case *AllTypesOneOf_Field13: + n += proto.SizeVarint(13<<3 | proto.WireVarint) + n += 1 + case *AllTypesOneOf_Field14: + n += proto.SizeVarint(14<<3 | proto.WireBytes) + n += proto.SizeVarint(uint64(len(x.Field14))) + n += len(x.Field14) + case *AllTypesOneOf_Field15: + n += proto.SizeVarint(15<<3 | proto.WireBytes) + n += proto.SizeVarint(uint64(len(x.Field15))) + n += len(x.Field15) + case *AllTypesOneOf_SubMessage: + s := proto.Size(x.SubMessage) + n += proto.SizeVarint(16<<3 | proto.WireBytes) + n += proto.SizeVarint(uint64(s)) + n += s + case nil: + default: + panic(fmt.Sprintf("proto: unexpected type %T in oneof", x)) + } + return n +} + +type TwoOneofs struct { + // Types that are valid to be assigned to One: + // *TwoOneofs_Field1 + // *TwoOneofs_Field2 + // *TwoOneofs_Field3 + One isTwoOneofs_One `protobuf_oneof:"one"` + // Types that are valid to be assigned to Two: + // *TwoOneofs_Field34 + // *TwoOneofs_Field35 + // *TwoOneofs_SubMessage2 + Two isTwoOneofs_Two `protobuf_oneof:"two"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *TwoOneofs) Reset() { *m = TwoOneofs{} } +func (*TwoOneofs) ProtoMessage() {} +func (*TwoOneofs) Descriptor() ([]byte, []int) { return fileDescriptorOne, []int{2} } + +type isTwoOneofs_One interface { + isTwoOneofs_One() + Equal(interface{}) bool + VerboseEqual(interface{}) error + Size() int +} +type isTwoOneofs_Two interface { + isTwoOneofs_Two() + Equal(interface{}) bool + VerboseEqual(interface{}) error + Size() int +} + +type TwoOneofs_Field1 struct { + Field1 float64 `protobuf:"fixed64,1,opt,name=Field1,json=field1,oneof"` +} +type TwoOneofs_Field2 struct { + Field2 float32 `protobuf:"fixed32,2,opt,name=Field2,json=field2,oneof"` +} +type TwoOneofs_Field3 struct { + Field3 int32 `protobuf:"varint,3,opt,name=Field3,json=field3,oneof"` +} +type TwoOneofs_Field34 struct { + Field34 string `protobuf:"bytes,34,opt,name=Field34,json=field34,oneof"` +} +type TwoOneofs_Field35 struct { + Field35 []byte `protobuf:"bytes,35,opt,name=Field35,json=field35,oneof"` +} +type TwoOneofs_SubMessage2 struct { + SubMessage2 *Subby `protobuf:"bytes,36,opt,name=sub_message2,json=subMessage2,oneof"` +} + +func (*TwoOneofs_Field1) isTwoOneofs_One() {} +func (*TwoOneofs_Field2) isTwoOneofs_One() {} +func (*TwoOneofs_Field3) isTwoOneofs_One() {} +func (*TwoOneofs_Field34) isTwoOneofs_Two() {} +func (*TwoOneofs_Field35) isTwoOneofs_Two() {} +func (*TwoOneofs_SubMessage2) isTwoOneofs_Two() {} + +func (m *TwoOneofs) GetOne() isTwoOneofs_One { + if m != nil { + return m.One + } + return nil +} +func (m *TwoOneofs) GetTwo() isTwoOneofs_Two { + if m != nil { + return m.Two + } + return nil +} + +func (m *TwoOneofs) GetField1() float64 { + if x, ok := m.GetOne().(*TwoOneofs_Field1); ok { + return x.Field1 + } + return 0 +} + +func (m *TwoOneofs) GetField2() float32 { + if x, ok := m.GetOne().(*TwoOneofs_Field2); ok { + return x.Field2 + } + return 0 +} + +func (m *TwoOneofs) GetField3() int32 { + if x, ok := m.GetOne().(*TwoOneofs_Field3); ok { + return x.Field3 + } + return 0 +} + +func (m *TwoOneofs) GetField34() string { + if x, ok := m.GetTwo().(*TwoOneofs_Field34); ok { + return x.Field34 + } + return "" +} + +func (m *TwoOneofs) GetField35() []byte { + if x, ok := m.GetTwo().(*TwoOneofs_Field35); ok { + return x.Field35 + } + return nil +} + +func (m *TwoOneofs) GetSubMessage2() *Subby { + if x, ok := m.GetTwo().(*TwoOneofs_SubMessage2); ok { + return x.SubMessage2 + } + return nil +} + +// XXX_OneofFuncs is for the internal use of the proto package. +func (*TwoOneofs) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{}) { + return _TwoOneofs_OneofMarshaler, _TwoOneofs_OneofUnmarshaler, _TwoOneofs_OneofSizer, []interface{}{ + (*TwoOneofs_Field1)(nil), + (*TwoOneofs_Field2)(nil), + (*TwoOneofs_Field3)(nil), + (*TwoOneofs_Field34)(nil), + (*TwoOneofs_Field35)(nil), + (*TwoOneofs_SubMessage2)(nil), + } +} + +func _TwoOneofs_OneofMarshaler(msg proto.Message, b *proto.Buffer) error { + m := msg.(*TwoOneofs) + // one + switch x := m.One.(type) { + case *TwoOneofs_Field1: + _ = b.EncodeVarint(1<<3 | proto.WireFixed64) + _ = b.EncodeFixed64(math.Float64bits(x.Field1)) + case *TwoOneofs_Field2: + _ = b.EncodeVarint(2<<3 | proto.WireFixed32) + _ = b.EncodeFixed32(uint64(math.Float32bits(x.Field2))) + case *TwoOneofs_Field3: + _ = b.EncodeVarint(3<<3 | proto.WireVarint) + _ = b.EncodeVarint(uint64(x.Field3)) + case nil: + default: + return fmt.Errorf("TwoOneofs.One has unexpected type %T", x) + } + // two + switch x := m.Two.(type) { + case *TwoOneofs_Field34: + _ = b.EncodeVarint(34<<3 | proto.WireBytes) + _ = b.EncodeStringBytes(x.Field34) + case *TwoOneofs_Field35: + _ = b.EncodeVarint(35<<3 | proto.WireBytes) + _ = b.EncodeRawBytes(x.Field35) + case *TwoOneofs_SubMessage2: + _ = b.EncodeVarint(36<<3 | proto.WireBytes) + if err := b.EncodeMessage(x.SubMessage2); err != nil { + return err + } + case nil: + default: + return fmt.Errorf("TwoOneofs.Two has unexpected type %T", x) + } + return nil +} + +func _TwoOneofs_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) { + m := msg.(*TwoOneofs) + switch tag { + case 1: // one.Field1 + if wire != proto.WireFixed64 { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeFixed64() + m.One = &TwoOneofs_Field1{math.Float64frombits(x)} + return true, err + case 2: // one.Field2 + if wire != proto.WireFixed32 { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeFixed32() + m.One = &TwoOneofs_Field2{math.Float32frombits(uint32(x))} + return true, err + case 3: // one.Field3 + if wire != proto.WireVarint { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeVarint() + m.One = &TwoOneofs_Field3{int32(x)} + return true, err + case 34: // two.Field34 + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeStringBytes() + m.Two = &TwoOneofs_Field34{x} + return true, err + case 35: // two.Field35 + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeRawBytes(true) + m.Two = &TwoOneofs_Field35{x} + return true, err + case 36: // two.sub_message2 + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + msg := new(Subby) + err := b.DecodeMessage(msg) + m.Two = &TwoOneofs_SubMessage2{msg} + return true, err + default: + return false, nil + } +} + +func _TwoOneofs_OneofSizer(msg proto.Message) (n int) { + m := msg.(*TwoOneofs) + // one + switch x := m.One.(type) { + case *TwoOneofs_Field1: + n += proto.SizeVarint(1<<3 | proto.WireFixed64) + n += 8 + case *TwoOneofs_Field2: + n += proto.SizeVarint(2<<3 | proto.WireFixed32) + n += 4 + case *TwoOneofs_Field3: + n += proto.SizeVarint(3<<3 | proto.WireVarint) + n += proto.SizeVarint(uint64(x.Field3)) + case nil: + default: + panic(fmt.Sprintf("proto: unexpected type %T in oneof", x)) + } + // two + switch x := m.Two.(type) { + case *TwoOneofs_Field34: + n += proto.SizeVarint(34<<3 | proto.WireBytes) + n += proto.SizeVarint(uint64(len(x.Field34))) + n += len(x.Field34) + case *TwoOneofs_Field35: + n += proto.SizeVarint(35<<3 | proto.WireBytes) + n += proto.SizeVarint(uint64(len(x.Field35))) + n += len(x.Field35) + case *TwoOneofs_SubMessage2: + s := proto.Size(x.SubMessage2) + n += proto.SizeVarint(36<<3 | proto.WireBytes) + n += proto.SizeVarint(uint64(s)) + n += s + case nil: + default: + panic(fmt.Sprintf("proto: unexpected type %T in oneof", x)) + } + return n +} + +type CustomOneof struct { + // Types that are valid to be assigned to Custom: + // *CustomOneof_Stringy + // *CustomOneof_CustomType + // *CustomOneof_CastType + // *CustomOneof_MyCustomName + Custom isCustomOneof_Custom `protobuf_oneof:"custom"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *CustomOneof) Reset() { *m = CustomOneof{} } +func (*CustomOneof) ProtoMessage() {} +func (*CustomOneof) Descriptor() ([]byte, []int) { return fileDescriptorOne, []int{3} } + +type isCustomOneof_Custom interface { + isCustomOneof_Custom() + Equal(interface{}) bool + VerboseEqual(interface{}) error + Size() int +} + +type CustomOneof_Stringy struct { + Stringy string `protobuf:"bytes,34,opt,name=Stringy,json=stringy,oneof"` +} +type CustomOneof_CustomType struct { + CustomType github_com_gogo_protobuf_test_custom.Uint128 `protobuf:"bytes,35,opt,name=CustomType,json=customType,oneof,customtype=github.com/gogo/protobuf/test/custom.Uint128"` +} +type CustomOneof_CastType struct { + CastType github_com_gogo_protobuf_test_casttype.MyUint64Type `protobuf:"varint,36,opt,name=CastType,json=castType,oneof,casttype=github.com/gogo/protobuf/test/casttype.MyUint64Type"` +} +type CustomOneof_MyCustomName struct { + MyCustomName int64 `protobuf:"varint,37,opt,name=CustomName,json=customName,oneof"` +} + +func (*CustomOneof_Stringy) isCustomOneof_Custom() {} +func (*CustomOneof_CustomType) isCustomOneof_Custom() {} +func (*CustomOneof_CastType) isCustomOneof_Custom() {} +func (*CustomOneof_MyCustomName) isCustomOneof_Custom() {} + +func (m *CustomOneof) GetCustom() isCustomOneof_Custom { + if m != nil { + return m.Custom + } + return nil +} + +func (m *CustomOneof) GetStringy() string { + if x, ok := m.GetCustom().(*CustomOneof_Stringy); ok { + return x.Stringy + } + return "" +} + +func (m *CustomOneof) GetCastType() github_com_gogo_protobuf_test_casttype.MyUint64Type { + if x, ok := m.GetCustom().(*CustomOneof_CastType); ok { + return x.CastType + } + return 0 +} + +func (m *CustomOneof) GetMyCustomName() int64 { + if x, ok := m.GetCustom().(*CustomOneof_MyCustomName); ok { + return x.MyCustomName + } + return 0 +} + +// XXX_OneofFuncs is for the internal use of the proto package. +func (*CustomOneof) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{}) { + return _CustomOneof_OneofMarshaler, _CustomOneof_OneofUnmarshaler, _CustomOneof_OneofSizer, []interface{}{ + (*CustomOneof_Stringy)(nil), + (*CustomOneof_CustomType)(nil), + (*CustomOneof_CastType)(nil), + (*CustomOneof_MyCustomName)(nil), + } +} + +func _CustomOneof_OneofMarshaler(msg proto.Message, b *proto.Buffer) error { + m := msg.(*CustomOneof) + // custom + switch x := m.Custom.(type) { + case *CustomOneof_Stringy: + _ = b.EncodeVarint(34<<3 | proto.WireBytes) + _ = b.EncodeStringBytes(x.Stringy) + case *CustomOneof_CustomType: + _ = b.EncodeVarint(35<<3 | proto.WireBytes) + data, err := x.CustomType.Marshal() + if err != nil { + return err + } + _ = b.EncodeRawBytes(data) + case *CustomOneof_CastType: + _ = b.EncodeVarint(36<<3 | proto.WireVarint) + _ = b.EncodeVarint(uint64(x.CastType)) + case *CustomOneof_MyCustomName: + _ = b.EncodeVarint(37<<3 | proto.WireVarint) + _ = b.EncodeVarint(uint64(x.MyCustomName)) + case nil: + default: + return fmt.Errorf("CustomOneof.Custom has unexpected type %T", x) + } + return nil +} + +func _CustomOneof_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) { + m := msg.(*CustomOneof) + switch tag { + case 34: // custom.Stringy + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeStringBytes() + m.Custom = &CustomOneof_Stringy{x} + return true, err + case 35: // custom.CustomType + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeRawBytes(true) + if err != nil { + return true, err + } + var cc github_com_gogo_protobuf_test_custom.Uint128 + c := &cc + err = c.Unmarshal(x) + m.Custom = &CustomOneof_CustomType{*c} + return true, err + case 36: // custom.CastType + if wire != proto.WireVarint { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeVarint() + m.Custom = &CustomOneof_CastType{github_com_gogo_protobuf_test_casttype.MyUint64Type(x)} + return true, err + case 37: // custom.CustomName + if wire != proto.WireVarint { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeVarint() + m.Custom = &CustomOneof_MyCustomName{int64(x)} + return true, err + default: + return false, nil + } +} + +func _CustomOneof_OneofSizer(msg proto.Message) (n int) { + m := msg.(*CustomOneof) + // custom + switch x := m.Custom.(type) { + case *CustomOneof_Stringy: + n += proto.SizeVarint(34<<3 | proto.WireBytes) + n += proto.SizeVarint(uint64(len(x.Stringy))) + n += len(x.Stringy) + case *CustomOneof_CustomType: + n += proto.SizeVarint(35<<3 | proto.WireBytes) + n += proto.SizeVarint(uint64(x.CustomType.Size())) + n += x.CustomType.Size() + case *CustomOneof_CastType: + n += proto.SizeVarint(36<<3 | proto.WireVarint) + n += proto.SizeVarint(uint64(x.CastType)) + case *CustomOneof_MyCustomName: + n += proto.SizeVarint(37<<3 | proto.WireVarint) + n += proto.SizeVarint(uint64(x.MyCustomName)) + case nil: + default: + panic(fmt.Sprintf("proto: unexpected type %T in oneof", x)) + } + return n +} + +func init() { + proto.RegisterType((*Subby)(nil), "one.Subby") + proto.RegisterType((*AllTypesOneOf)(nil), "one.AllTypesOneOf") + proto.RegisterType((*TwoOneofs)(nil), "one.TwoOneofs") + proto.RegisterType((*CustomOneof)(nil), "one.CustomOneof") +} +func (this *Subby) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return OneDescription() +} +func (this *AllTypesOneOf) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return OneDescription() +} +func (this *TwoOneofs) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return OneDescription() +} +func (this *CustomOneof) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return OneDescription() +} +func OneDescription() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + d := &github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet{} + var gzipped = []byte{ + // 3727 bytes of a gzipped FileDescriptorSet + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xcc, 0x5a, 0x59, 0x6c, 0x1b, 0xe7, + 0xb5, 0x36, 0xc5, 0x45, 0xe4, 0x21, 0x45, 0x51, 0x23, 0xc5, 0xa6, 0x15, 0xc7, 0x8a, 0xe9, 0x2c, + 0x8e, 0x93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xa1, 0xc0, 0x6c, + 0x64, 0x61, 0x2c, 0x2d, 0x40, 0xca, 0x34, 0x5a, 0xcd, 0x92, 0xa6, 0x94, 0x8c, 0xb2, 0xa6, 0x54, + 0xf5, 0x0d, 0x23, 0x1d, 0xa3, 0x04, 0x63, 0x9d, 0x13, 0xa1, 0x86, 0xb3, 0x68, 0xb7, 0x80, 0x66, + 0x72, 0xd2, 0xf4, 0x5c, 0x4b, 0x7b, 0x21, 0x62, 0x6e, 0xe9, 0x96, 0x7a, 0x25, 0x9d, 0xa0, 0x11, + 0xc2, 0xaf, 0x32, 0x7f, 0x0e, 0xc3, 0x60, 0x2f, 0x21, 0x76, 0x17, 0x84, 0x37, 0xc8, 0x2c, 0x31, + 0xc0, 0x76, 0xe1, 0x03, 0x86, 0xf1, 0x3a, 0x31, 0xf2, 0x21, 0x9d, 0x38, 0x03, 0x71, 0x5d, 0x33, + 0x2d, 0xad, 0xcc, 0x22, 0x22, 0xd8, 0x63, 0x4c, 0x01, 0x03, 0x75, 0x86, 0x54, 0xe8, 0x43, 0x85, + 0xd4, 0x79, 0x18, 0xb4, 0x87, 0xa4, 0x34, 0x55, 0xbd, 0x22, 0x62, 0x73, 0xc2, 0x6f, 0x24, 0xe3, + 0x79, 0x81, 0x93, 0x09, 0x4c, 0x4e, 0x6a, 0x9e, 0x6b, 0x69, 0x0e, 0xc0, 0xd0, 0x35, 0x63, 0x03, + 0xb7, 0x57, 0xa9, 0x86, 0x71, 0xd2, 0xdd, 0x4b, 0x05, 0x62, 0xd2, 0xe1, 0x25, 0x83, 0x49, 0x4b, + 0x35, 0xe9, 0x8c, 0x13, 0x6a, 0xfd, 0xdb, 0x44, 0xca, 0x12, 0xdb, 0x64, 0x1d, 0xd1, 0x56, 0x84, + 0x64, 0x53, 0x23, 0x71, 0x8f, 0x2e, 0x66, 0x33, 0x8b, 0xd1, 0x41, 0x8c, 0xfb, 0xce, 0x4c, 0xe6, + 0x30, 0x36, 0xb1, 0x81, 0xa6, 0xf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xfc, + 0xd6, 0xc1, 0xc0, 0x8b, 0xf8, 0x79, 0x19, 0x3f, 0xdf, 0xc3, 0xcf, 0x6b, 0x6f, 0xa1, 0x1d, 0xfe, + 0x7f, 0x03, 0x3f, 0xef, 0xe0, 0xf7, 0xf7, 0xf0, 0xff, 0xfb, 0xf8, 0xff, 0xe1, 0x5f, 0x1d, 0xdc, + 0xf3, 0xb7, 0x00, 0x00, 0x00, 0xff, 0xff, 0xe3, 0x30, 0x06, 0x19, 0xe9, 0x2e, 0x00, 0x00, + } + r := bytes.NewReader(gzipped) + gzipr, err := compress_gzip.NewReader(r) + if err != nil { + panic(err) + } + ungzipped, err := io_ioutil.ReadAll(gzipr) + if err != nil { + panic(err) + } + if err := github_com_gogo_protobuf_proto.Unmarshal(ungzipped, d); err != nil { + panic(err) + } + return d +} +func (this *Subby) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*Subby) + if !ok { + that2, ok := that.(Subby) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *Subby") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *Subby but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *Subby but is not nil && this == nil") + } + if this.Sub != nil && that1.Sub != nil { + if *this.Sub != *that1.Sub { + return fmt.Errorf("Sub this(%v) Not Equal that(%v)", *this.Sub, *that1.Sub) + } + } else if this.Sub != nil { + return fmt.Errorf("this.Sub == nil && that.Sub != nil") + } else if that1.Sub != nil { + return fmt.Errorf("Sub this(%v) Not Equal that(%v)", this.Sub, that1.Sub) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *Subby) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*Subby) + if !ok { + that2, ok := that.(Subby) + 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.Sub != nil && that1.Sub != nil { + if *this.Sub != *that1.Sub { + return false + } + } else if this.Sub != nil { + return false + } else if that1.Sub != nil { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *AllTypesOneOf) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*AllTypesOneOf) + if !ok { + that2, ok := that.(AllTypesOneOf) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *AllTypesOneOf") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *AllTypesOneOf but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *AllTypesOneOf but is not nil && this == nil") + } + if that1.TestOneof == nil { + if this.TestOneof != nil { + return fmt.Errorf("this.TestOneof != nil && that1.TestOneof == nil") + } + } else if this.TestOneof == nil { + return fmt.Errorf("this.TestOneof == nil && that1.TestOneof != nil") + } else if err := this.TestOneof.VerboseEqual(that1.TestOneof); err != nil { + return err + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *AllTypesOneOf_Field1) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*AllTypesOneOf_Field1) + if !ok { + that2, ok := that.(AllTypesOneOf_Field1) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *AllTypesOneOf_Field1") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *AllTypesOneOf_Field1 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *AllTypesOneOf_Field1 but is not nil && this == nil") + } + if this.Field1 != that1.Field1 { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) + } + return nil +} +func (this *AllTypesOneOf_Field2) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*AllTypesOneOf_Field2) + if !ok { + that2, ok := that.(AllTypesOneOf_Field2) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *AllTypesOneOf_Field2") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *AllTypesOneOf_Field2 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *AllTypesOneOf_Field2 but is not nil && this == nil") + } + if this.Field2 != that1.Field2 { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) + } + return nil +} +func (this *AllTypesOneOf_Field3) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*AllTypesOneOf_Field3) + if !ok { + that2, ok := that.(AllTypesOneOf_Field3) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *AllTypesOneOf_Field3") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *AllTypesOneOf_Field3 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *AllTypesOneOf_Field3 but is not nil && this == nil") + } + if this.Field3 != that1.Field3 { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", this.Field3, that1.Field3) + } + return nil +} +func (this *AllTypesOneOf_Field4) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*AllTypesOneOf_Field4) + if !ok { + that2, ok := that.(AllTypesOneOf_Field4) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *AllTypesOneOf_Field4") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *AllTypesOneOf_Field4 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *AllTypesOneOf_Field4 but is not nil && this == nil") + } + if this.Field4 != that1.Field4 { + return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", this.Field4, that1.Field4) + } + return nil +} +func (this *AllTypesOneOf_Field5) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*AllTypesOneOf_Field5) + if !ok { + that2, ok := that.(AllTypesOneOf_Field5) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *AllTypesOneOf_Field5") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *AllTypesOneOf_Field5 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *AllTypesOneOf_Field5 but is not nil && this == nil") + } + if this.Field5 != that1.Field5 { + return fmt.Errorf("Field5 this(%v) Not Equal that(%v)", this.Field5, that1.Field5) + } + return nil +} +func (this *AllTypesOneOf_Field6) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*AllTypesOneOf_Field6) + if !ok { + that2, ok := that.(AllTypesOneOf_Field6) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *AllTypesOneOf_Field6") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *AllTypesOneOf_Field6 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *AllTypesOneOf_Field6 but is not nil && this == nil") + } + if this.Field6 != that1.Field6 { + return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", this.Field6, that1.Field6) + } + return nil +} +func (this *AllTypesOneOf_Field7) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*AllTypesOneOf_Field7) + if !ok { + that2, ok := that.(AllTypesOneOf_Field7) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *AllTypesOneOf_Field7") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *AllTypesOneOf_Field7 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *AllTypesOneOf_Field7 but is not nil && this == nil") + } + if this.Field7 != that1.Field7 { + return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", this.Field7, that1.Field7) + } + return nil +} +func (this *AllTypesOneOf_Field8) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*AllTypesOneOf_Field8) + if !ok { + that2, ok := that.(AllTypesOneOf_Field8) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *AllTypesOneOf_Field8") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *AllTypesOneOf_Field8 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *AllTypesOneOf_Field8 but is not nil && this == nil") + } + if this.Field8 != that1.Field8 { + return fmt.Errorf("Field8 this(%v) Not Equal that(%v)", this.Field8, that1.Field8) + } + return nil +} +func (this *AllTypesOneOf_Field9) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*AllTypesOneOf_Field9) + if !ok { + that2, ok := that.(AllTypesOneOf_Field9) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *AllTypesOneOf_Field9") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *AllTypesOneOf_Field9 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *AllTypesOneOf_Field9 but is not nil && this == nil") + } + if this.Field9 != that1.Field9 { + return fmt.Errorf("Field9 this(%v) Not Equal that(%v)", this.Field9, that1.Field9) + } + return nil +} +func (this *AllTypesOneOf_Field10) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*AllTypesOneOf_Field10) + if !ok { + that2, ok := that.(AllTypesOneOf_Field10) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *AllTypesOneOf_Field10") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *AllTypesOneOf_Field10 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *AllTypesOneOf_Field10 but is not nil && this == nil") + } + if this.Field10 != that1.Field10 { + return fmt.Errorf("Field10 this(%v) Not Equal that(%v)", this.Field10, that1.Field10) + } + return nil +} +func (this *AllTypesOneOf_Field11) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*AllTypesOneOf_Field11) + if !ok { + that2, ok := that.(AllTypesOneOf_Field11) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *AllTypesOneOf_Field11") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *AllTypesOneOf_Field11 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *AllTypesOneOf_Field11 but is not nil && this == nil") + } + if this.Field11 != that1.Field11 { + return fmt.Errorf("Field11 this(%v) Not Equal that(%v)", this.Field11, that1.Field11) + } + return nil +} +func (this *AllTypesOneOf_Field12) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*AllTypesOneOf_Field12) + if !ok { + that2, ok := that.(AllTypesOneOf_Field12) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *AllTypesOneOf_Field12") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *AllTypesOneOf_Field12 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *AllTypesOneOf_Field12 but is not nil && this == nil") + } + if this.Field12 != that1.Field12 { + return fmt.Errorf("Field12 this(%v) Not Equal that(%v)", this.Field12, that1.Field12) + } + return nil +} +func (this *AllTypesOneOf_Field13) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*AllTypesOneOf_Field13) + if !ok { + that2, ok := that.(AllTypesOneOf_Field13) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *AllTypesOneOf_Field13") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *AllTypesOneOf_Field13 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *AllTypesOneOf_Field13 but is not nil && this == nil") + } + if this.Field13 != that1.Field13 { + return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", this.Field13, that1.Field13) + } + return nil +} +func (this *AllTypesOneOf_Field14) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*AllTypesOneOf_Field14) + if !ok { + that2, ok := that.(AllTypesOneOf_Field14) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *AllTypesOneOf_Field14") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *AllTypesOneOf_Field14 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *AllTypesOneOf_Field14 but is not nil && this == nil") + } + if this.Field14 != that1.Field14 { + return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", this.Field14, that1.Field14) + } + return nil +} +func (this *AllTypesOneOf_Field15) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*AllTypesOneOf_Field15) + if !ok { + that2, ok := that.(AllTypesOneOf_Field15) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *AllTypesOneOf_Field15") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *AllTypesOneOf_Field15 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *AllTypesOneOf_Field15 but is not nil && this == nil") + } + if !bytes.Equal(this.Field15, that1.Field15) { + return fmt.Errorf("Field15 this(%v) Not Equal that(%v)", this.Field15, that1.Field15) + } + return nil +} +func (this *AllTypesOneOf_SubMessage) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*AllTypesOneOf_SubMessage) + if !ok { + that2, ok := that.(AllTypesOneOf_SubMessage) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *AllTypesOneOf_SubMessage") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *AllTypesOneOf_SubMessage but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *AllTypesOneOf_SubMessage but is not nil && this == nil") + } + if !this.SubMessage.Equal(that1.SubMessage) { + return fmt.Errorf("SubMessage this(%v) Not Equal that(%v)", this.SubMessage, that1.SubMessage) + } + return nil +} +func (this *AllTypesOneOf) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*AllTypesOneOf) + if !ok { + that2, ok := that.(AllTypesOneOf) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + if this == nil { + return true + } + return false + } else if this == nil { + return false + } + if that1.TestOneof == nil { + if this.TestOneof != nil { + return false + } + } else if this.TestOneof == nil { + return false + } else if !this.TestOneof.Equal(that1.TestOneof) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *AllTypesOneOf_Field1) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*AllTypesOneOf_Field1) + if !ok { + that2, ok := that.(AllTypesOneOf_Field1) + 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.Field1 != that1.Field1 { + return false + } + return true +} +func (this *AllTypesOneOf_Field2) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*AllTypesOneOf_Field2) + if !ok { + that2, ok := that.(AllTypesOneOf_Field2) + 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.Field2 != that1.Field2 { + return false + } + return true +} +func (this *AllTypesOneOf_Field3) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*AllTypesOneOf_Field3) + if !ok { + that2, ok := that.(AllTypesOneOf_Field3) + 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.Field3 != that1.Field3 { + return false + } + return true +} +func (this *AllTypesOneOf_Field4) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*AllTypesOneOf_Field4) + if !ok { + that2, ok := that.(AllTypesOneOf_Field4) + 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.Field4 != that1.Field4 { + return false + } + return true +} +func (this *AllTypesOneOf_Field5) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*AllTypesOneOf_Field5) + if !ok { + that2, ok := that.(AllTypesOneOf_Field5) + 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.Field5 != that1.Field5 { + return false + } + return true +} +func (this *AllTypesOneOf_Field6) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*AllTypesOneOf_Field6) + if !ok { + that2, ok := that.(AllTypesOneOf_Field6) + 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.Field6 != that1.Field6 { + return false + } + return true +} +func (this *AllTypesOneOf_Field7) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*AllTypesOneOf_Field7) + if !ok { + that2, ok := that.(AllTypesOneOf_Field7) + 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.Field7 != that1.Field7 { + return false + } + return true +} +func (this *AllTypesOneOf_Field8) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*AllTypesOneOf_Field8) + if !ok { + that2, ok := that.(AllTypesOneOf_Field8) + 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.Field8 != that1.Field8 { + return false + } + return true +} +func (this *AllTypesOneOf_Field9) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*AllTypesOneOf_Field9) + if !ok { + that2, ok := that.(AllTypesOneOf_Field9) + 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.Field9 != that1.Field9 { + return false + } + return true +} +func (this *AllTypesOneOf_Field10) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*AllTypesOneOf_Field10) + if !ok { + that2, ok := that.(AllTypesOneOf_Field10) + 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.Field10 != that1.Field10 { + return false + } + return true +} +func (this *AllTypesOneOf_Field11) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*AllTypesOneOf_Field11) + if !ok { + that2, ok := that.(AllTypesOneOf_Field11) + 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.Field11 != that1.Field11 { + return false + } + return true +} +func (this *AllTypesOneOf_Field12) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*AllTypesOneOf_Field12) + if !ok { + that2, ok := that.(AllTypesOneOf_Field12) + 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.Field12 != that1.Field12 { + return false + } + return true +} +func (this *AllTypesOneOf_Field13) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*AllTypesOneOf_Field13) + if !ok { + that2, ok := that.(AllTypesOneOf_Field13) + 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.Field13 != that1.Field13 { + return false + } + return true +} +func (this *AllTypesOneOf_Field14) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*AllTypesOneOf_Field14) + if !ok { + that2, ok := that.(AllTypesOneOf_Field14) + 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.Field14 != that1.Field14 { + return false + } + return true +} +func (this *AllTypesOneOf_Field15) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*AllTypesOneOf_Field15) + if !ok { + that2, ok := that.(AllTypesOneOf_Field15) + 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.Field15, that1.Field15) { + return false + } + return true +} +func (this *AllTypesOneOf_SubMessage) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*AllTypesOneOf_SubMessage) + if !ok { + that2, ok := that.(AllTypesOneOf_SubMessage) + 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.SubMessage.Equal(that1.SubMessage) { + return false + } + return true +} +func (this *TwoOneofs) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*TwoOneofs) + if !ok { + that2, ok := that.(TwoOneofs) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *TwoOneofs") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *TwoOneofs but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *TwoOneofs but is not nil && this == nil") + } + if that1.One == nil { + if this.One != nil { + return fmt.Errorf("this.One != nil && that1.One == nil") + } + } else if this.One == nil { + return fmt.Errorf("this.One == nil && that1.One != nil") + } else if err := this.One.VerboseEqual(that1.One); err != nil { + return err + } + if that1.Two == nil { + if this.Two != nil { + return fmt.Errorf("this.Two != nil && that1.Two == nil") + } + } else if this.Two == nil { + return fmt.Errorf("this.Two == nil && that1.Two != nil") + } else if err := this.Two.VerboseEqual(that1.Two); err != nil { + return err + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *TwoOneofs_Field1) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*TwoOneofs_Field1) + if !ok { + that2, ok := that.(TwoOneofs_Field1) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *TwoOneofs_Field1") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *TwoOneofs_Field1 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *TwoOneofs_Field1 but is not nil && this == nil") + } + if this.Field1 != that1.Field1 { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) + } + return nil +} +func (this *TwoOneofs_Field2) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*TwoOneofs_Field2) + if !ok { + that2, ok := that.(TwoOneofs_Field2) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *TwoOneofs_Field2") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *TwoOneofs_Field2 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *TwoOneofs_Field2 but is not nil && this == nil") + } + if this.Field2 != that1.Field2 { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) + } + return nil +} +func (this *TwoOneofs_Field3) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*TwoOneofs_Field3) + if !ok { + that2, ok := that.(TwoOneofs_Field3) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *TwoOneofs_Field3") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *TwoOneofs_Field3 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *TwoOneofs_Field3 but is not nil && this == nil") + } + if this.Field3 != that1.Field3 { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", this.Field3, that1.Field3) + } + return nil +} +func (this *TwoOneofs_Field34) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*TwoOneofs_Field34) + if !ok { + that2, ok := that.(TwoOneofs_Field34) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *TwoOneofs_Field34") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *TwoOneofs_Field34 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *TwoOneofs_Field34 but is not nil && this == nil") + } + if this.Field34 != that1.Field34 { + return fmt.Errorf("Field34 this(%v) Not Equal that(%v)", this.Field34, that1.Field34) + } + return nil +} +func (this *TwoOneofs_Field35) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*TwoOneofs_Field35) + if !ok { + that2, ok := that.(TwoOneofs_Field35) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *TwoOneofs_Field35") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *TwoOneofs_Field35 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *TwoOneofs_Field35 but is not nil && this == nil") + } + if !bytes.Equal(this.Field35, that1.Field35) { + return fmt.Errorf("Field35 this(%v) Not Equal that(%v)", this.Field35, that1.Field35) + } + return nil +} +func (this *TwoOneofs_SubMessage2) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*TwoOneofs_SubMessage2) + if !ok { + that2, ok := that.(TwoOneofs_SubMessage2) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *TwoOneofs_SubMessage2") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *TwoOneofs_SubMessage2 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *TwoOneofs_SubMessage2 but is not nil && this == nil") + } + if !this.SubMessage2.Equal(that1.SubMessage2) { + return fmt.Errorf("SubMessage2 this(%v) Not Equal that(%v)", this.SubMessage2, that1.SubMessage2) + } + return nil +} +func (this *TwoOneofs) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*TwoOneofs) + if !ok { + that2, ok := that.(TwoOneofs) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + if this == nil { + return true + } + return false + } else if this == nil { + return false + } + if that1.One == nil { + if this.One != nil { + return false + } + } else if this.One == nil { + return false + } else if !this.One.Equal(that1.One) { + return false + } + if that1.Two == nil { + if this.Two != nil { + return false + } + } else if this.Two == nil { + return false + } else if !this.Two.Equal(that1.Two) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *TwoOneofs_Field1) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*TwoOneofs_Field1) + if !ok { + that2, ok := that.(TwoOneofs_Field1) + 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.Field1 != that1.Field1 { + return false + } + return true +} +func (this *TwoOneofs_Field2) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*TwoOneofs_Field2) + if !ok { + that2, ok := that.(TwoOneofs_Field2) + 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.Field2 != that1.Field2 { + return false + } + return true +} +func (this *TwoOneofs_Field3) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*TwoOneofs_Field3) + if !ok { + that2, ok := that.(TwoOneofs_Field3) + 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.Field3 != that1.Field3 { + return false + } + return true +} +func (this *TwoOneofs_Field34) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*TwoOneofs_Field34) + if !ok { + that2, ok := that.(TwoOneofs_Field34) + 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.Field34 != that1.Field34 { + return false + } + return true +} +func (this *TwoOneofs_Field35) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*TwoOneofs_Field35) + if !ok { + that2, ok := that.(TwoOneofs_Field35) + 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.Field35, that1.Field35) { + return false + } + return true +} +func (this *TwoOneofs_SubMessage2) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*TwoOneofs_SubMessage2) + if !ok { + that2, ok := that.(TwoOneofs_SubMessage2) + 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.SubMessage2.Equal(that1.SubMessage2) { + return false + } + return true +} +func (this *CustomOneof) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*CustomOneof) + if !ok { + that2, ok := that.(CustomOneof) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *CustomOneof") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *CustomOneof but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *CustomOneof but is not nil && this == nil") + } + if that1.Custom == nil { + if this.Custom != nil { + return fmt.Errorf("this.Custom != nil && that1.Custom == nil") + } + } else if this.Custom == nil { + return fmt.Errorf("this.Custom == nil && that1.Custom != nil") + } else if err := this.Custom.VerboseEqual(that1.Custom); err != nil { + return err + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *CustomOneof_Stringy) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*CustomOneof_Stringy) + if !ok { + that2, ok := that.(CustomOneof_Stringy) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *CustomOneof_Stringy") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *CustomOneof_Stringy but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *CustomOneof_Stringy but is not nil && this == nil") + } + if this.Stringy != that1.Stringy { + return fmt.Errorf("Stringy this(%v) Not Equal that(%v)", this.Stringy, that1.Stringy) + } + return nil +} +func (this *CustomOneof_CustomType) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*CustomOneof_CustomType) + if !ok { + that2, ok := that.(CustomOneof_CustomType) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *CustomOneof_CustomType") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *CustomOneof_CustomType but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *CustomOneof_CustomType but is not nil && this == nil") + } + if !this.CustomType.Equal(that1.CustomType) { + return fmt.Errorf("CustomType this(%v) Not Equal that(%v)", this.CustomType, that1.CustomType) + } + return nil +} +func (this *CustomOneof_CastType) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*CustomOneof_CastType) + if !ok { + that2, ok := that.(CustomOneof_CastType) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *CustomOneof_CastType") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *CustomOneof_CastType but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *CustomOneof_CastType but is not nil && this == nil") + } + if this.CastType != that1.CastType { + return fmt.Errorf("CastType this(%v) Not Equal that(%v)", this.CastType, that1.CastType) + } + return nil +} +func (this *CustomOneof_MyCustomName) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*CustomOneof_MyCustomName) + if !ok { + that2, ok := that.(CustomOneof_MyCustomName) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *CustomOneof_MyCustomName") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *CustomOneof_MyCustomName but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *CustomOneof_MyCustomName but is not nil && this == nil") + } + if this.MyCustomName != that1.MyCustomName { + return fmt.Errorf("MyCustomName this(%v) Not Equal that(%v)", this.MyCustomName, that1.MyCustomName) + } + return nil +} +func (this *CustomOneof) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*CustomOneof) + if !ok { + that2, ok := that.(CustomOneof) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + if this == nil { + return true + } + return false + } else if this == nil { + return false + } + if that1.Custom == nil { + if this.Custom != nil { + return false + } + } else if this.Custom == nil { + return false + } else if !this.Custom.Equal(that1.Custom) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *CustomOneof_Stringy) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*CustomOneof_Stringy) + if !ok { + that2, ok := that.(CustomOneof_Stringy) + 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.Stringy != that1.Stringy { + return false + } + return true +} +func (this *CustomOneof_CustomType) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*CustomOneof_CustomType) + if !ok { + that2, ok := that.(CustomOneof_CustomType) + 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.CustomType.Equal(that1.CustomType) { + return false + } + return true +} +func (this *CustomOneof_CastType) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*CustomOneof_CastType) + if !ok { + that2, ok := that.(CustomOneof_CastType) + 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.CastType != that1.CastType { + return false + } + return true +} +func (this *CustomOneof_MyCustomName) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*CustomOneof_MyCustomName) + if !ok { + that2, ok := that.(CustomOneof_MyCustomName) + 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.MyCustomName != that1.MyCustomName { + return false + } + return true +} +func (this *Subby) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&one.Subby{") + if this.Sub != nil { + s = append(s, "Sub: "+valueToGoStringOne(this.Sub, "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 *AllTypesOneOf) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 20) + s = append(s, "&one.AllTypesOneOf{") + if this.TestOneof != nil { + s = append(s, "TestOneof: "+fmt.Sprintf("%#v", this.TestOneof)+",\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 *AllTypesOneOf_Field1) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.AllTypesOneOf_Field1{` + + `Field1:` + fmt.Sprintf("%#v", this.Field1) + `}`}, ", ") + return s +} +func (this *AllTypesOneOf_Field2) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.AllTypesOneOf_Field2{` + + `Field2:` + fmt.Sprintf("%#v", this.Field2) + `}`}, ", ") + return s +} +func (this *AllTypesOneOf_Field3) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.AllTypesOneOf_Field3{` + + `Field3:` + fmt.Sprintf("%#v", this.Field3) + `}`}, ", ") + return s +} +func (this *AllTypesOneOf_Field4) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.AllTypesOneOf_Field4{` + + `Field4:` + fmt.Sprintf("%#v", this.Field4) + `}`}, ", ") + return s +} +func (this *AllTypesOneOf_Field5) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.AllTypesOneOf_Field5{` + + `Field5:` + fmt.Sprintf("%#v", this.Field5) + `}`}, ", ") + return s +} +func (this *AllTypesOneOf_Field6) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.AllTypesOneOf_Field6{` + + `Field6:` + fmt.Sprintf("%#v", this.Field6) + `}`}, ", ") + return s +} +func (this *AllTypesOneOf_Field7) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.AllTypesOneOf_Field7{` + + `Field7:` + fmt.Sprintf("%#v", this.Field7) + `}`}, ", ") + return s +} +func (this *AllTypesOneOf_Field8) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.AllTypesOneOf_Field8{` + + `Field8:` + fmt.Sprintf("%#v", this.Field8) + `}`}, ", ") + return s +} +func (this *AllTypesOneOf_Field9) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.AllTypesOneOf_Field9{` + + `Field9:` + fmt.Sprintf("%#v", this.Field9) + `}`}, ", ") + return s +} +func (this *AllTypesOneOf_Field10) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.AllTypesOneOf_Field10{` + + `Field10:` + fmt.Sprintf("%#v", this.Field10) + `}`}, ", ") + return s +} +func (this *AllTypesOneOf_Field11) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.AllTypesOneOf_Field11{` + + `Field11:` + fmt.Sprintf("%#v", this.Field11) + `}`}, ", ") + return s +} +func (this *AllTypesOneOf_Field12) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.AllTypesOneOf_Field12{` + + `Field12:` + fmt.Sprintf("%#v", this.Field12) + `}`}, ", ") + return s +} +func (this *AllTypesOneOf_Field13) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.AllTypesOneOf_Field13{` + + `Field13:` + fmt.Sprintf("%#v", this.Field13) + `}`}, ", ") + return s +} +func (this *AllTypesOneOf_Field14) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.AllTypesOneOf_Field14{` + + `Field14:` + fmt.Sprintf("%#v", this.Field14) + `}`}, ", ") + return s +} +func (this *AllTypesOneOf_Field15) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.AllTypesOneOf_Field15{` + + `Field15:` + fmt.Sprintf("%#v", this.Field15) + `}`}, ", ") + return s +} +func (this *AllTypesOneOf_SubMessage) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.AllTypesOneOf_SubMessage{` + + `SubMessage:` + fmt.Sprintf("%#v", this.SubMessage) + `}`}, ", ") + return s +} +func (this *TwoOneofs) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 10) + s = append(s, "&one.TwoOneofs{") + if this.One != nil { + s = append(s, "One: "+fmt.Sprintf("%#v", this.One)+",\n") + } + if this.Two != nil { + s = append(s, "Two: "+fmt.Sprintf("%#v", this.Two)+",\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 *TwoOneofs_Field1) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.TwoOneofs_Field1{` + + `Field1:` + fmt.Sprintf("%#v", this.Field1) + `}`}, ", ") + return s +} +func (this *TwoOneofs_Field2) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.TwoOneofs_Field2{` + + `Field2:` + fmt.Sprintf("%#v", this.Field2) + `}`}, ", ") + return s +} +func (this *TwoOneofs_Field3) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.TwoOneofs_Field3{` + + `Field3:` + fmt.Sprintf("%#v", this.Field3) + `}`}, ", ") + return s +} +func (this *TwoOneofs_Field34) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.TwoOneofs_Field34{` + + `Field34:` + fmt.Sprintf("%#v", this.Field34) + `}`}, ", ") + return s +} +func (this *TwoOneofs_Field35) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.TwoOneofs_Field35{` + + `Field35:` + fmt.Sprintf("%#v", this.Field35) + `}`}, ", ") + return s +} +func (this *TwoOneofs_SubMessage2) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.TwoOneofs_SubMessage2{` + + `SubMessage2:` + fmt.Sprintf("%#v", this.SubMessage2) + `}`}, ", ") + return s +} +func (this *CustomOneof) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 8) + s = append(s, "&one.CustomOneof{") + if this.Custom != nil { + s = append(s, "Custom: "+fmt.Sprintf("%#v", this.Custom)+",\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 *CustomOneof_Stringy) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.CustomOneof_Stringy{` + + `Stringy:` + fmt.Sprintf("%#v", this.Stringy) + `}`}, ", ") + return s +} +func (this *CustomOneof_CustomType) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.CustomOneof_CustomType{` + + `CustomType:` + fmt.Sprintf("%#v", this.CustomType) + `}`}, ", ") + return s +} +func (this *CustomOneof_CastType) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.CustomOneof_CastType{` + + `CastType:` + fmt.Sprintf("%#v", this.CastType) + `}`}, ", ") + return s +} +func (this *CustomOneof_MyCustomName) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.CustomOneof_MyCustomName{` + + `MyCustomName:` + fmt.Sprintf("%#v", this.MyCustomName) + `}`}, ", ") + return s +} +func valueToGoStringOne(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 extensionToGoStringOne(e map[int32]github_com_gogo_protobuf_proto.Extension) string { + if e == nil { + return "nil" + } + s := "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 +} +func NewPopulatedSubby(r randyOne, easy bool) *Subby { + this := &Subby{} + if r.Intn(10) != 0 { + v1 := randStringOne(r) + this.Sub = &v1 + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedOne(r, 2) + } + return this +} + +func NewPopulatedAllTypesOneOf(r randyOne, easy bool) *AllTypesOneOf { + this := &AllTypesOneOf{} + oneofNumber_TestOneof := []int32{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}[r.Intn(16)] + switch oneofNumber_TestOneof { + case 1: + this.TestOneof = NewPopulatedAllTypesOneOf_Field1(r, easy) + case 2: + this.TestOneof = NewPopulatedAllTypesOneOf_Field2(r, easy) + case 3: + this.TestOneof = NewPopulatedAllTypesOneOf_Field3(r, easy) + case 4: + this.TestOneof = NewPopulatedAllTypesOneOf_Field4(r, easy) + case 5: + this.TestOneof = NewPopulatedAllTypesOneOf_Field5(r, easy) + case 6: + this.TestOneof = NewPopulatedAllTypesOneOf_Field6(r, easy) + case 7: + this.TestOneof = NewPopulatedAllTypesOneOf_Field7(r, easy) + case 8: + this.TestOneof = NewPopulatedAllTypesOneOf_Field8(r, easy) + case 9: + this.TestOneof = NewPopulatedAllTypesOneOf_Field9(r, easy) + case 10: + this.TestOneof = NewPopulatedAllTypesOneOf_Field10(r, easy) + case 11: + this.TestOneof = NewPopulatedAllTypesOneOf_Field11(r, easy) + case 12: + this.TestOneof = NewPopulatedAllTypesOneOf_Field12(r, easy) + case 13: + this.TestOneof = NewPopulatedAllTypesOneOf_Field13(r, easy) + case 14: + this.TestOneof = NewPopulatedAllTypesOneOf_Field14(r, easy) + case 15: + this.TestOneof = NewPopulatedAllTypesOneOf_Field15(r, easy) + case 16: + this.TestOneof = NewPopulatedAllTypesOneOf_SubMessage(r, easy) + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedOne(r, 17) + } + return this +} + +func NewPopulatedAllTypesOneOf_Field1(r randyOne, easy bool) *AllTypesOneOf_Field1 { + this := &AllTypesOneOf_Field1{} + this.Field1 = float64(r.Float64()) + if r.Intn(2) == 0 { + this.Field1 *= -1 + } + return this +} +func NewPopulatedAllTypesOneOf_Field2(r randyOne, easy bool) *AllTypesOneOf_Field2 { + this := &AllTypesOneOf_Field2{} + this.Field2 = float32(r.Float32()) + if r.Intn(2) == 0 { + this.Field2 *= -1 + } + return this +} +func NewPopulatedAllTypesOneOf_Field3(r randyOne, easy bool) *AllTypesOneOf_Field3 { + this := &AllTypesOneOf_Field3{} + this.Field3 = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Field3 *= -1 + } + return this +} +func NewPopulatedAllTypesOneOf_Field4(r randyOne, easy bool) *AllTypesOneOf_Field4 { + this := &AllTypesOneOf_Field4{} + this.Field4 = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Field4 *= -1 + } + return this +} +func NewPopulatedAllTypesOneOf_Field5(r randyOne, easy bool) *AllTypesOneOf_Field5 { + this := &AllTypesOneOf_Field5{} + this.Field5 = uint32(r.Uint32()) + return this +} +func NewPopulatedAllTypesOneOf_Field6(r randyOne, easy bool) *AllTypesOneOf_Field6 { + this := &AllTypesOneOf_Field6{} + this.Field6 = uint64(uint64(r.Uint32())) + return this +} +func NewPopulatedAllTypesOneOf_Field7(r randyOne, easy bool) *AllTypesOneOf_Field7 { + this := &AllTypesOneOf_Field7{} + this.Field7 = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Field7 *= -1 + } + return this +} +func NewPopulatedAllTypesOneOf_Field8(r randyOne, easy bool) *AllTypesOneOf_Field8 { + this := &AllTypesOneOf_Field8{} + this.Field8 = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Field8 *= -1 + } + return this +} +func NewPopulatedAllTypesOneOf_Field9(r randyOne, easy bool) *AllTypesOneOf_Field9 { + this := &AllTypesOneOf_Field9{} + this.Field9 = uint32(r.Uint32()) + return this +} +func NewPopulatedAllTypesOneOf_Field10(r randyOne, easy bool) *AllTypesOneOf_Field10 { + this := &AllTypesOneOf_Field10{} + this.Field10 = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Field10 *= -1 + } + return this +} +func NewPopulatedAllTypesOneOf_Field11(r randyOne, easy bool) *AllTypesOneOf_Field11 { + this := &AllTypesOneOf_Field11{} + this.Field11 = uint64(uint64(r.Uint32())) + return this +} +func NewPopulatedAllTypesOneOf_Field12(r randyOne, easy bool) *AllTypesOneOf_Field12 { + this := &AllTypesOneOf_Field12{} + this.Field12 = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Field12 *= -1 + } + return this +} +func NewPopulatedAllTypesOneOf_Field13(r randyOne, easy bool) *AllTypesOneOf_Field13 { + this := &AllTypesOneOf_Field13{} + this.Field13 = bool(bool(r.Intn(2) == 0)) + return this +} +func NewPopulatedAllTypesOneOf_Field14(r randyOne, easy bool) *AllTypesOneOf_Field14 { + this := &AllTypesOneOf_Field14{} + this.Field14 = randStringOne(r) + return this +} +func NewPopulatedAllTypesOneOf_Field15(r randyOne, easy bool) *AllTypesOneOf_Field15 { + this := &AllTypesOneOf_Field15{} + v2 := r.Intn(100) + this.Field15 = make([]byte, v2) + for i := 0; i < v2; i++ { + this.Field15[i] = byte(r.Intn(256)) + } + return this +} +func NewPopulatedAllTypesOneOf_SubMessage(r randyOne, easy bool) *AllTypesOneOf_SubMessage { + this := &AllTypesOneOf_SubMessage{} + this.SubMessage = NewPopulatedSubby(r, easy) + return this +} +func NewPopulatedTwoOneofs(r randyOne, easy bool) *TwoOneofs { + this := &TwoOneofs{} + oneofNumber_One := []int32{1, 2, 3}[r.Intn(3)] + switch oneofNumber_One { + case 1: + this.One = NewPopulatedTwoOneofs_Field1(r, easy) + case 2: + this.One = NewPopulatedTwoOneofs_Field2(r, easy) + case 3: + this.One = NewPopulatedTwoOneofs_Field3(r, easy) + } + oneofNumber_Two := []int32{34, 35, 36}[r.Intn(3)] + switch oneofNumber_Two { + case 34: + this.Two = NewPopulatedTwoOneofs_Field34(r, easy) + case 35: + this.Two = NewPopulatedTwoOneofs_Field35(r, easy) + case 36: + this.Two = NewPopulatedTwoOneofs_SubMessage2(r, easy) + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedOne(r, 37) + } + return this +} + +func NewPopulatedTwoOneofs_Field1(r randyOne, easy bool) *TwoOneofs_Field1 { + this := &TwoOneofs_Field1{} + this.Field1 = float64(r.Float64()) + if r.Intn(2) == 0 { + this.Field1 *= -1 + } + return this +} +func NewPopulatedTwoOneofs_Field2(r randyOne, easy bool) *TwoOneofs_Field2 { + this := &TwoOneofs_Field2{} + this.Field2 = float32(r.Float32()) + if r.Intn(2) == 0 { + this.Field2 *= -1 + } + return this +} +func NewPopulatedTwoOneofs_Field3(r randyOne, easy bool) *TwoOneofs_Field3 { + this := &TwoOneofs_Field3{} + this.Field3 = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Field3 *= -1 + } + return this +} +func NewPopulatedTwoOneofs_Field34(r randyOne, easy bool) *TwoOneofs_Field34 { + this := &TwoOneofs_Field34{} + this.Field34 = randStringOne(r) + return this +} +func NewPopulatedTwoOneofs_Field35(r randyOne, easy bool) *TwoOneofs_Field35 { + this := &TwoOneofs_Field35{} + v3 := r.Intn(100) + this.Field35 = make([]byte, v3) + for i := 0; i < v3; i++ { + this.Field35[i] = byte(r.Intn(256)) + } + return this +} +func NewPopulatedTwoOneofs_SubMessage2(r randyOne, easy bool) *TwoOneofs_SubMessage2 { + this := &TwoOneofs_SubMessage2{} + this.SubMessage2 = NewPopulatedSubby(r, easy) + return this +} +func NewPopulatedCustomOneof(r randyOne, easy bool) *CustomOneof { + this := &CustomOneof{} + oneofNumber_Custom := []int32{34, 35, 36, 37}[r.Intn(4)] + switch oneofNumber_Custom { + case 34: + this.Custom = NewPopulatedCustomOneof_Stringy(r, easy) + case 35: + this.Custom = NewPopulatedCustomOneof_CustomType(r, easy) + case 36: + this.Custom = NewPopulatedCustomOneof_CastType(r, easy) + case 37: + this.Custom = NewPopulatedCustomOneof_MyCustomName(r, easy) + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedOne(r, 38) + } + return this +} + +func NewPopulatedCustomOneof_Stringy(r randyOne, easy bool) *CustomOneof_Stringy { + this := &CustomOneof_Stringy{} + this.Stringy = randStringOne(r) + return this +} +func NewPopulatedCustomOneof_CustomType(r randyOne, easy bool) *CustomOneof_CustomType { + this := &CustomOneof_CustomType{} + v4 := github_com_gogo_protobuf_test_custom.NewPopulatedUint128(r) + this.CustomType = *v4 + return this +} +func NewPopulatedCustomOneof_CastType(r randyOne, easy bool) *CustomOneof_CastType { + this := &CustomOneof_CastType{} + this.CastType = github_com_gogo_protobuf_test_casttype.MyUint64Type(uint64(r.Uint32())) + return this +} +func NewPopulatedCustomOneof_MyCustomName(r randyOne, easy bool) *CustomOneof_MyCustomName { + this := &CustomOneof_MyCustomName{} + this.MyCustomName = int64(r.Int63()) + if r.Intn(2) == 0 { + this.MyCustomName *= -1 + } + return this +} + +type randyOne interface { + Float32() float32 + Float64() float64 + Int63() int64 + Int31() int32 + Uint32() uint32 + Intn(n int) int +} + +func randUTF8RuneOne(r randyOne) 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 randStringOne(r randyOne) string { + v5 := r.Intn(100) + tmps := make([]rune, v5) + for i := 0; i < v5; i++ { + tmps[i] = randUTF8RuneOne(r) + } + return string(tmps) +} +func randUnrecognizedOne(r randyOne, 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 = randFieldOne(data, r, fieldNumber, wire) + } + return data +} +func randFieldOne(data []byte, r randyOne, fieldNumber int, wire int) []byte { + key := uint32(fieldNumber)<<3 | uint32(wire) + switch wire { + case 0: + data = encodeVarintPopulateOne(data, uint64(key)) + v6 := r.Int63() + if r.Intn(2) == 0 { + v6 *= -1 + } + data = encodeVarintPopulateOne(data, uint64(v6)) + case 1: + data = encodeVarintPopulateOne(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 = encodeVarintPopulateOne(data, uint64(key)) + ll := r.Intn(100) + data = encodeVarintPopulateOne(data, uint64(ll)) + for j := 0; j < ll; j++ { + data = append(data, byte(r.Intn(256))) + } + default: + data = encodeVarintPopulateOne(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 encodeVarintPopulateOne(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 *Subby) Size() (n int) { + var l int + _ = l + if m.Sub != nil { + l = len(*m.Sub) + n += 1 + l + sovOne(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *AllTypesOneOf) Size() (n int) { + var l int + _ = l + if m.TestOneof != nil { + n += m.TestOneof.Size() + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *AllTypesOneOf_Field1) Size() (n int) { + var l int + _ = l + n += 9 + return n +} +func (m *AllTypesOneOf_Field2) Size() (n int) { + var l int + _ = l + n += 5 + return n +} +func (m *AllTypesOneOf_Field3) Size() (n int) { + var l int + _ = l + n += 1 + sovOne(uint64(m.Field3)) + return n +} +func (m *AllTypesOneOf_Field4) Size() (n int) { + var l int + _ = l + n += 1 + sovOne(uint64(m.Field4)) + return n +} +func (m *AllTypesOneOf_Field5) Size() (n int) { + var l int + _ = l + n += 1 + sovOne(uint64(m.Field5)) + return n +} +func (m *AllTypesOneOf_Field6) Size() (n int) { + var l int + _ = l + n += 1 + sovOne(uint64(m.Field6)) + return n +} +func (m *AllTypesOneOf_Field7) Size() (n int) { + var l int + _ = l + n += 1 + sozOne(uint64(m.Field7)) + return n +} +func (m *AllTypesOneOf_Field8) Size() (n int) { + var l int + _ = l + n += 1 + sozOne(uint64(m.Field8)) + return n +} +func (m *AllTypesOneOf_Field9) Size() (n int) { + var l int + _ = l + n += 5 + return n +} +func (m *AllTypesOneOf_Field10) Size() (n int) { + var l int + _ = l + n += 5 + return n +} +func (m *AllTypesOneOf_Field11) Size() (n int) { + var l int + _ = l + n += 9 + return n +} +func (m *AllTypesOneOf_Field12) Size() (n int) { + var l int + _ = l + n += 9 + return n +} +func (m *AllTypesOneOf_Field13) Size() (n int) { + var l int + _ = l + n += 2 + return n +} +func (m *AllTypesOneOf_Field14) Size() (n int) { + var l int + _ = l + l = len(m.Field14) + n += 1 + l + sovOne(uint64(l)) + return n +} +func (m *AllTypesOneOf_Field15) Size() (n int) { + var l int + _ = l + if m.Field15 != nil { + l = len(m.Field15) + n += 1 + l + sovOne(uint64(l)) + } + return n +} +func (m *AllTypesOneOf_SubMessage) Size() (n int) { + var l int + _ = l + if m.SubMessage != nil { + l = m.SubMessage.Size() + n += 2 + l + sovOne(uint64(l)) + } + return n +} +func (m *TwoOneofs) Size() (n int) { + var l int + _ = l + if m.One != nil { + n += m.One.Size() + } + if m.Two != nil { + n += m.Two.Size() + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *TwoOneofs_Field1) Size() (n int) { + var l int + _ = l + n += 9 + return n +} +func (m *TwoOneofs_Field2) Size() (n int) { + var l int + _ = l + n += 5 + return n +} +func (m *TwoOneofs_Field3) Size() (n int) { + var l int + _ = l + n += 1 + sovOne(uint64(m.Field3)) + return n +} +func (m *TwoOneofs_Field34) Size() (n int) { + var l int + _ = l + l = len(m.Field34) + n += 2 + l + sovOne(uint64(l)) + return n +} +func (m *TwoOneofs_Field35) Size() (n int) { + var l int + _ = l + if m.Field35 != nil { + l = len(m.Field35) + n += 2 + l + sovOne(uint64(l)) + } + return n +} +func (m *TwoOneofs_SubMessage2) Size() (n int) { + var l int + _ = l + if m.SubMessage2 != nil { + l = m.SubMessage2.Size() + n += 2 + l + sovOne(uint64(l)) + } + return n +} +func (m *CustomOneof) Size() (n int) { + var l int + _ = l + if m.Custom != nil { + n += m.Custom.Size() + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *CustomOneof_Stringy) Size() (n int) { + var l int + _ = l + l = len(m.Stringy) + n += 2 + l + sovOne(uint64(l)) + return n +} +func (m *CustomOneof_CustomType) Size() (n int) { + var l int + _ = l + l = m.CustomType.Size() + n += 2 + l + sovOne(uint64(l)) + return n +} +func (m *CustomOneof_CastType) Size() (n int) { + var l int + _ = l + n += 2 + sovOne(uint64(m.CastType)) + return n +} +func (m *CustomOneof_MyCustomName) Size() (n int) { + var l int + _ = l + n += 2 + sovOne(uint64(m.MyCustomName)) + return n +} + +func sovOne(x uint64) (n int) { + for { + n++ + x >>= 7 + if x == 0 { + break + } + } + return n +} +func sozOne(x uint64) (n int) { + return sovOne(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (this *Subby) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&Subby{`, + `Sub:` + valueToStringOne(this.Sub) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *AllTypesOneOf) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&AllTypesOneOf{`, + `TestOneof:` + fmt.Sprintf("%v", this.TestOneof) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *AllTypesOneOf_Field1) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&AllTypesOneOf_Field1{`, + `Field1:` + fmt.Sprintf("%v", this.Field1) + `,`, + `}`, + }, "") + return s +} +func (this *AllTypesOneOf_Field2) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&AllTypesOneOf_Field2{`, + `Field2:` + fmt.Sprintf("%v", this.Field2) + `,`, + `}`, + }, "") + return s +} +func (this *AllTypesOneOf_Field3) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&AllTypesOneOf_Field3{`, + `Field3:` + fmt.Sprintf("%v", this.Field3) + `,`, + `}`, + }, "") + return s +} +func (this *AllTypesOneOf_Field4) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&AllTypesOneOf_Field4{`, + `Field4:` + fmt.Sprintf("%v", this.Field4) + `,`, + `}`, + }, "") + return s +} +func (this *AllTypesOneOf_Field5) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&AllTypesOneOf_Field5{`, + `Field5:` + fmt.Sprintf("%v", this.Field5) + `,`, + `}`, + }, "") + return s +} +func (this *AllTypesOneOf_Field6) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&AllTypesOneOf_Field6{`, + `Field6:` + fmt.Sprintf("%v", this.Field6) + `,`, + `}`, + }, "") + return s +} +func (this *AllTypesOneOf_Field7) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&AllTypesOneOf_Field7{`, + `Field7:` + fmt.Sprintf("%v", this.Field7) + `,`, + `}`, + }, "") + return s +} +func (this *AllTypesOneOf_Field8) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&AllTypesOneOf_Field8{`, + `Field8:` + fmt.Sprintf("%v", this.Field8) + `,`, + `}`, + }, "") + return s +} +func (this *AllTypesOneOf_Field9) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&AllTypesOneOf_Field9{`, + `Field9:` + fmt.Sprintf("%v", this.Field9) + `,`, + `}`, + }, "") + return s +} +func (this *AllTypesOneOf_Field10) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&AllTypesOneOf_Field10{`, + `Field10:` + fmt.Sprintf("%v", this.Field10) + `,`, + `}`, + }, "") + return s +} +func (this *AllTypesOneOf_Field11) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&AllTypesOneOf_Field11{`, + `Field11:` + fmt.Sprintf("%v", this.Field11) + `,`, + `}`, + }, "") + return s +} +func (this *AllTypesOneOf_Field12) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&AllTypesOneOf_Field12{`, + `Field12:` + fmt.Sprintf("%v", this.Field12) + `,`, + `}`, + }, "") + return s +} +func (this *AllTypesOneOf_Field13) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&AllTypesOneOf_Field13{`, + `Field13:` + fmt.Sprintf("%v", this.Field13) + `,`, + `}`, + }, "") + return s +} +func (this *AllTypesOneOf_Field14) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&AllTypesOneOf_Field14{`, + `Field14:` + fmt.Sprintf("%v", this.Field14) + `,`, + `}`, + }, "") + return s +} +func (this *AllTypesOneOf_Field15) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&AllTypesOneOf_Field15{`, + `Field15:` + fmt.Sprintf("%v", this.Field15) + `,`, + `}`, + }, "") + return s +} +func (this *AllTypesOneOf_SubMessage) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&AllTypesOneOf_SubMessage{`, + `SubMessage:` + strings.Replace(fmt.Sprintf("%v", this.SubMessage), "Subby", "Subby", 1) + `,`, + `}`, + }, "") + return s +} +func (this *TwoOneofs) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&TwoOneofs{`, + `One:` + fmt.Sprintf("%v", this.One) + `,`, + `Two:` + fmt.Sprintf("%v", this.Two) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *TwoOneofs_Field1) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&TwoOneofs_Field1{`, + `Field1:` + fmt.Sprintf("%v", this.Field1) + `,`, + `}`, + }, "") + return s +} +func (this *TwoOneofs_Field2) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&TwoOneofs_Field2{`, + `Field2:` + fmt.Sprintf("%v", this.Field2) + `,`, + `}`, + }, "") + return s +} +func (this *TwoOneofs_Field3) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&TwoOneofs_Field3{`, + `Field3:` + fmt.Sprintf("%v", this.Field3) + `,`, + `}`, + }, "") + return s +} +func (this *TwoOneofs_Field34) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&TwoOneofs_Field34{`, + `Field34:` + fmt.Sprintf("%v", this.Field34) + `,`, + `}`, + }, "") + return s +} +func (this *TwoOneofs_Field35) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&TwoOneofs_Field35{`, + `Field35:` + fmt.Sprintf("%v", this.Field35) + `,`, + `}`, + }, "") + return s +} +func (this *TwoOneofs_SubMessage2) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&TwoOneofs_SubMessage2{`, + `SubMessage2:` + strings.Replace(fmt.Sprintf("%v", this.SubMessage2), "Subby", "Subby", 1) + `,`, + `}`, + }, "") + return s +} +func (this *CustomOneof) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&CustomOneof{`, + `Custom:` + fmt.Sprintf("%v", this.Custom) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *CustomOneof_Stringy) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&CustomOneof_Stringy{`, + `Stringy:` + fmt.Sprintf("%v", this.Stringy) + `,`, + `}`, + }, "") + return s +} +func (this *CustomOneof_CustomType) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&CustomOneof_CustomType{`, + `CustomType:` + fmt.Sprintf("%v", this.CustomType) + `,`, + `}`, + }, "") + return s +} +func (this *CustomOneof_CastType) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&CustomOneof_CastType{`, + `CastType:` + fmt.Sprintf("%v", this.CastType) + `,`, + `}`, + }, "") + return s +} +func (this *CustomOneof_MyCustomName) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&CustomOneof_MyCustomName{`, + `MyCustomName:` + fmt.Sprintf("%v", this.MyCustomName) + `,`, + `}`, + }, "") + return s +} +func valueToStringOne(v interface{}) string { + rv := reflect.ValueOf(v) + if rv.IsNil() { + return "nil" + } + pv := reflect.Indirect(rv).Interface() + return fmt.Sprintf("*%v", pv) +} +func (m *Subby) 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 ErrIntOverflowOne + } + 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: Subby: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Subby: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Sub", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOne + } + 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 ErrInvalidLengthOne + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + s := string(data[iNdEx:postIndex]) + m.Sub = &s + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipOne(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthOne + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *AllTypesOneOf) 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 ErrIntOverflowOne + } + 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: AllTypesOneOf: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: AllTypesOneOf: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field Field1", 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.TestOneof = &AllTypesOneOf_Field1{float64(math.Float64frombits(v))} + case 2: + if wireType != 5 { + return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType) + } + var v uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + iNdEx += 4 + v = uint32(data[iNdEx-4]) + v |= uint32(data[iNdEx-3]) << 8 + v |= uint32(data[iNdEx-2]) << 16 + v |= uint32(data[iNdEx-1]) << 24 + m.TestOneof = &AllTypesOneOf_Field2{float32(math.Float32frombits(v))} + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field3", wireType) + } + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOne + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.TestOneof = &AllTypesOneOf_Field3{v} + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field4", wireType) + } + var v int64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOne + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.TestOneof = &AllTypesOneOf_Field4{v} + case 5: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field5", wireType) + } + var v uint32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOne + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (uint32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.TestOneof = &AllTypesOneOf_Field5{v} + case 6: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field6", wireType) + } + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOne + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.TestOneof = &AllTypesOneOf_Field6{v} + case 7: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field7", wireType) + } + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOne + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + v = int32((uint32(v) >> 1) ^ uint32(((v&1)<<31)>>31)) + m.TestOneof = &AllTypesOneOf_Field7{v} + case 8: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field8", wireType) + } + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOne + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + v = (v >> 1) ^ uint64((int64(v&1)<<63)>>63) + m.TestOneof = &AllTypesOneOf_Field8{int64(v)} + case 9: + if wireType != 5 { + return fmt.Errorf("proto: wrong wireType = %d for field Field9", wireType) + } + var v uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + iNdEx += 4 + v = uint32(data[iNdEx-4]) + v |= uint32(data[iNdEx-3]) << 8 + v |= uint32(data[iNdEx-2]) << 16 + v |= uint32(data[iNdEx-1]) << 24 + m.TestOneof = &AllTypesOneOf_Field9{v} + case 10: + if wireType != 5 { + return fmt.Errorf("proto: wrong wireType = %d for field Field10", wireType) + } + var v int32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + iNdEx += 4 + v = int32(data[iNdEx-4]) + v |= int32(data[iNdEx-3]) << 8 + v |= int32(data[iNdEx-2]) << 16 + v |= int32(data[iNdEx-1]) << 24 + m.TestOneof = &AllTypesOneOf_Field10{v} + case 11: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field Field11", 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.TestOneof = &AllTypesOneOf_Field11{v} + case 12: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field Field12", wireType) + } + var v int64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + iNdEx += 8 + v = int64(data[iNdEx-8]) + v |= int64(data[iNdEx-7]) << 8 + v |= int64(data[iNdEx-6]) << 16 + v |= int64(data[iNdEx-5]) << 24 + v |= int64(data[iNdEx-4]) << 32 + v |= int64(data[iNdEx-3]) << 40 + v |= int64(data[iNdEx-2]) << 48 + v |= int64(data[iNdEx-1]) << 56 + m.TestOneof = &AllTypesOneOf_Field12{v} + case 13: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field13", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOne + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + b := bool(v != 0) + m.TestOneof = &AllTypesOneOf_Field13{b} + case 14: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field14", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOne + } + 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 ErrInvalidLengthOne + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.TestOneof = &AllTypesOneOf_Field14{string(data[iNdEx:postIndex])} + iNdEx = postIndex + case 15: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field15", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOne + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthOne + } + postIndex := iNdEx + byteLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + v := make([]byte, postIndex-iNdEx) + copy(v, data[iNdEx:postIndex]) + m.TestOneof = &AllTypesOneOf_Field15{v} + iNdEx = postIndex + case 16: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SubMessage", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOne + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthOne + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + v := &Subby{} + if err := v.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + m.TestOneof = &AllTypesOneOf_SubMessage{v} + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipOne(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthOne + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *TwoOneofs) 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 ErrIntOverflowOne + } + 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: TwoOneofs: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: TwoOneofs: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field Field1", 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.One = &TwoOneofs_Field1{float64(math.Float64frombits(v))} + case 2: + if wireType != 5 { + return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType) + } + var v uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + iNdEx += 4 + v = uint32(data[iNdEx-4]) + v |= uint32(data[iNdEx-3]) << 8 + v |= uint32(data[iNdEx-2]) << 16 + v |= uint32(data[iNdEx-1]) << 24 + m.One = &TwoOneofs_Field2{float32(math.Float32frombits(v))} + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field3", wireType) + } + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOne + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.One = &TwoOneofs_Field3{v} + case 34: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field34", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOne + } + 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 ErrInvalidLengthOne + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Two = &TwoOneofs_Field34{string(data[iNdEx:postIndex])} + iNdEx = postIndex + case 35: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field35", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOne + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthOne + } + postIndex := iNdEx + byteLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + v := make([]byte, postIndex-iNdEx) + copy(v, data[iNdEx:postIndex]) + m.Two = &TwoOneofs_Field35{v} + iNdEx = postIndex + case 36: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SubMessage2", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOne + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthOne + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + v := &Subby{} + if err := v.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + m.Two = &TwoOneofs_SubMessage2{v} + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipOne(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthOne + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *CustomOneof) 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 ErrIntOverflowOne + } + 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: CustomOneof: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: CustomOneof: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 34: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Stringy", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOne + } + 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 ErrInvalidLengthOne + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Custom = &CustomOneof_Stringy{string(data[iNdEx:postIndex])} + iNdEx = postIndex + case 35: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field CustomType", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOne + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthOne + } + postIndex := iNdEx + byteLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var vv github_com_gogo_protobuf_test_custom.Uint128 + v := &vv + if err := v.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + m.Custom = &CustomOneof_CustomType{*v} + iNdEx = postIndex + case 36: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field CastType", wireType) + } + var v github_com_gogo_protobuf_test_casttype.MyUint64Type + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOne + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (github_com_gogo_protobuf_test_casttype.MyUint64Type(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Custom = &CustomOneof_CastType{v} + case 37: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field MyCustomName", wireType) + } + var v int64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOne + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Custom = &CustomOneof_MyCustomName{v} + default: + iNdEx = preIndex + skippy, err := skipOne(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthOne + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipOne(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, ErrIntOverflowOne + } + 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, ErrIntOverflowOne + } + 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, ErrIntOverflowOne + } + 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, ErrInvalidLengthOne + } + return iNdEx, nil + case 3: + for { + var innerWire uint64 + var start int = iNdEx + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowOne + } + 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 := skipOne(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 ( + ErrInvalidLengthOne = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowOne = fmt.Errorf("proto: integer overflow") +) + +var fileDescriptorOne = []byte{ + // 578 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xac, 0xd3, 0x3f, 0x6f, 0x1a, 0x31, + 0x14, 0x00, 0x70, 0x8e, 0xff, 0x18, 0x68, 0xe8, 0x4d, 0xaf, 0x51, 0x05, 0x15, 0x6d, 0xa5, 0x0e, + 0x0d, 0x07, 0xf7, 0x07, 0xc8, 0xd8, 0x4b, 0x55, 0x75, 0xa1, 0x48, 0x24, 0x99, 0x23, 0x8e, 0x1e, + 0x04, 0x09, 0x70, 0x84, 0x7d, 0x8a, 0xd8, 0xf2, 0x19, 0xfa, 0x29, 0x3a, 0x76, 0xec, 0x47, 0xc8, + 0x98, 0xb1, 0xea, 0x80, 0x12, 0xba, 0x74, 0xcc, 0x18, 0x75, 0xea, 0xb3, 0x8f, 0xd8, 0x95, 0xaa, + 0xaa, 0x4b, 0x86, 0x27, 0xdb, 0xfc, 0xec, 0xc7, 0x7b, 0xe7, 0x3b, 0xf2, 0x74, 0x44, 0xe7, 0x01, + 0x65, 0x56, 0xb4, 0x98, 0x0f, 0x97, 0xec, 0x74, 0x38, 0x0b, 0x97, 0x16, 0x5d, 0x84, 0x8d, 0xb3, + 0x25, 0xe5, 0xd4, 0x4c, 0xe1, 0x74, 0x77, 0x6f, 0x32, 0xe5, 0xa7, 0x51, 0xd0, 0xc0, 0x9d, 0xd6, + 0x84, 0x4e, 0xa8, 0x25, 0x2d, 0x88, 0xc6, 0x72, 0x25, 0x17, 0x72, 0x16, 0x9f, 0xa9, 0x3f, 0x21, + 0x99, 0xc3, 0x28, 0x08, 0x56, 0x66, 0x85, 0xa4, 0x58, 0x14, 0x80, 0xf1, 0xcc, 0x78, 0x55, 0x18, + 0x88, 0x69, 0x7d, 0x9d, 0x22, 0xe5, 0x37, 0xb3, 0xd9, 0xd1, 0xea, 0x2c, 0x64, 0xfd, 0x45, 0xd8, + 0x1f, 0x9b, 0x40, 0xb2, 0xef, 0xa6, 0xe1, 0xec, 0x63, 0x4b, 0x6e, 0x33, 0xde, 0x27, 0x06, 0xd9, + 0xb1, 0x5c, 0x2b, 0xb1, 0x21, 0x89, 0x92, 0x54, 0x62, 0x2b, 0x71, 0x20, 0x85, 0x92, 0x51, 0xe2, + 0x28, 0x71, 0x21, 0x8d, 0x92, 0x52, 0xe2, 0x2a, 0xf1, 0x20, 0x83, 0x52, 0x56, 0xe2, 0x29, 0x69, + 0x43, 0x16, 0x25, 0xad, 0xa4, 0xad, 0xa4, 0x03, 0x39, 0x94, 0xc7, 0x4a, 0x3a, 0x4a,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 0x39, 0x20, 0x24, 0xde, 0x2a, 0xde, 0xf0, 0xb8, 0x12, 0xbf, 0xf9, 0x7d, + 0x5d, 0x7b, 0xfd, 0xcf, 0x2f, 0x48, 0x3c, 0x3b, 0x6b, 0x24, 0xcf, 0x34, 0x8e, 0xa7, 0x0b, 0xde, + 0xb2, 0xbb, 0xe2, 0x01, 0x8f, 0x54, 0x16, 0xf3, 0x98, 0xe4, 0x0f, 0x86, 0x8c, 0xcb, 0x8c, 0xa2, + 0xf4, 0xb4, 0xdf, 0xf9, 0xb5, 0xae, 0x39, 0xff, 0xc9, 0x88, 0x27, 0x38, 0x9e, 0x68, 0xf4, 0x56, + 0x22, 0x6b, 0xdb, 0x15, 0xc7, 0x31, 0x71, 0x7e, 0xb4, 0x4d, 0x65, 0xda, 0xf7, 0xa5, 0x7e, 0x18, + 0xce, 0x43, 0x78, 0x29, 0x3e, 0x17, 0xbf, 0xb2, 0x59, 0xd7, 0x4a, 0xbd, 0x95, 0xfe, 0x5d, 0x97, + 0x22, 0x56, 0x7e, 0x9e, 0x64, 0xe3, 0x95, 0xff, 0xf6, 0xf2, 0xa6, 0x9a, 0xb8, 0xc2, 0xf8, 0x86, + 0x71, 0x7d, 0x53, 0x35, 0x6e, 0x31, 0xee, 0x30, 0x2e, 0x36, 0x55, 0xe3, 0x33, 0xc6, 0x17, 0x8c, + 0xaf, 0x18, 0x97, 0x1b, 0xdc, 0x87, 0xe3, 0x35, 0xc6, 0x4f, 0x9c, 0xdf, 0xe2, 0x78, 0x87, 0xe3, + 0xc5, 0x8f, 0x6a, 0xe2, 0x77, 0x00, 0x00, 0x00, 0xff, 0xff, 0x10, 0x91, 0xf4, 0xfe, 0x7c, 0x04, + 0x00, 0x00, +} diff --git a/vendor/github.com/gogo/protobuf/test/oneof/combos/unmarshaler/one.proto b/vendor/github.com/gogo/protobuf/test/oneof/combos/unmarshaler/one.proto new file mode 100644 index 000000000..aa2637f50 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/oneof/combos/unmarshaler/one.proto @@ -0,0 +1,101 @@ +// Copyright (c) 2013, Vastech SA (PTY) LTD. All rights reserved. +// http://github.com/gogo/protobuf/gogoproto +// +// 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 one; + +import "github.com/gogo/protobuf/gogoproto/gogo.proto"; + +option (gogoproto.goproto_stringer_all) = false; +option (gogoproto.goproto_enum_prefix_all) = false; +option (gogoproto.goproto_getters_all) = false; + +option (gogoproto.equal_all) = true; +option (gogoproto.verbose_equal_all) = true; +option (gogoproto.stringer_all) = true; +option (gogoproto.gostring_all) = true; +option (gogoproto.description_all) = true; + +option (gogoproto.testgen_all) = true; +option (gogoproto.populate_all) = true; +option (gogoproto.unmarshaler_all) = true; +option (gogoproto.marshaler_all) = false; +option (gogoproto.sizer_all) = true; + +option (gogoproto.goproto_enum_stringer_all) = false; +option (gogoproto.enum_stringer_all) = true; + +option (gogoproto.unsafe_marshaler_all) = false; +option (gogoproto.unsafe_unmarshaler_all) = false; + +message Subby { + optional string sub = 1; +} + +message AllTypesOneOf { + oneof test_oneof { + double Field1 = 1; + float Field2 = 2; + int32 Field3 = 3; + int64 Field4 = 4; + uint32 Field5 = 5; + uint64 Field6 = 6; + sint32 Field7 = 7; + sint64 Field8 = 8; + fixed32 Field9 = 9; + sfixed32 Field10 = 10; + fixed64 Field11 = 11; + sfixed64 Field12 = 12; + bool Field13 = 13; + string Field14 = 14; + bytes Field15 = 15; + Subby sub_message = 16; + } +} + +message TwoOneofs { + oneof one { + double Field1 = 1; + float Field2 = 2; + int32 Field3 = 3; + } + + oneof two { + string Field34 = 34; + bytes Field35 = 35; + Subby sub_message2 = 36; + } +} + +message CustomOneof { + oneof custom { + string Stringy = 34; + bytes CustomType = 35 [(gogoproto.customtype) = "github.com/gogo/protobuf/test/custom.Uint128"]; + uint64 CastType = 36 [(gogoproto.casttype) = "github.com/gogo/protobuf/test/casttype.MyUint64Type"]; + int64 CustomName = 37 [(gogoproto.customname) = "MyCustomName"]; + } +} diff --git a/vendor/github.com/gogo/protobuf/test/oneof/combos/unmarshaler/onepb_test.go b/vendor/github.com/gogo/protobuf/test/oneof/combos/unmarshaler/onepb_test.go new file mode 100644 index 000000000..fd53b248e --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/oneof/combos/unmarshaler/onepb_test.go @@ -0,0 +1,631 @@ +// Code generated by protoc-gen-gogo. +// source: combos/unmarshaler/one.proto +// DO NOT EDIT! + +/* +Package one is a generated protocol buffer package. + +It is generated from these files: + combos/unmarshaler/one.proto + +It has these top-level messages: + Subby + AllTypesOneOf + TwoOneofs + CustomOneof +*/ +package one + +import testing "testing" +import math_rand "math/rand" +import time "time" +import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" +import github_com_gogo_protobuf_jsonpb "github.com/gogo/protobuf/jsonpb" +import fmt "fmt" +import go_parser "go/parser" +import proto "github.com/gogo/protobuf/proto" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +func TestSubbyProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedSubby(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Subby{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestAllTypesOneOfProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAllTypesOneOf(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &AllTypesOneOf{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestTwoOneofsProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedTwoOneofs(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &TwoOneofs{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestCustomOneofProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomOneof(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &CustomOneof{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestSubbyJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedSubby(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Subby{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestAllTypesOneOfJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAllTypesOneOf(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &AllTypesOneOf{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestTwoOneofsJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedTwoOneofs(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &TwoOneofs{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestCustomOneofJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomOneof(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &CustomOneof{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestSubbyProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedSubby(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &Subby{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestSubbyProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedSubby(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &Subby{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestAllTypesOneOfProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAllTypesOneOf(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &AllTypesOneOf{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestAllTypesOneOfProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAllTypesOneOf(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &AllTypesOneOf{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestTwoOneofsProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedTwoOneofs(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &TwoOneofs{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestTwoOneofsProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedTwoOneofs(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &TwoOneofs{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestCustomOneofProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomOneof(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &CustomOneof{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestCustomOneofProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomOneof(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &CustomOneof{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestOneDescription(t *testing.T) { + OneDescription() +} +func TestSubbyVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedSubby(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &Subby{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestAllTypesOneOfVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAllTypesOneOf(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &AllTypesOneOf{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestTwoOneofsVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedTwoOneofs(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &TwoOneofs{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestCustomOneofVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomOneof(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &CustomOneof{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestSubbyGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedSubby(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestAllTypesOneOfGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAllTypesOneOf(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestTwoOneofsGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedTwoOneofs(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestCustomOneofGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomOneof(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestSubbySize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedSubby(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func TestAllTypesOneOfSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAllTypesOneOf(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func TestTwoOneofsSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedTwoOneofs(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func TestCustomOneofSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomOneof(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func TestSubbyStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedSubby(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestAllTypesOneOfStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAllTypesOneOf(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestTwoOneofsStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedTwoOneofs(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestCustomOneofStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomOneof(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} + +//These tests are generated by github.com/gogo/protobuf/plugin/testgen diff --git a/vendor/github.com/gogo/protobuf/test/oneof/combos/unsafeboth/one.pb.go b/vendor/github.com/gogo/protobuf/test/oneof/combos/unsafeboth/one.pb.go new file mode 100644 index 000000000..f9612a0c4 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/oneof/combos/unsafeboth/one.pb.go @@ -0,0 +1,5626 @@ +// Code generated by protoc-gen-gogo. +// source: combos/unsafeboth/one.proto +// DO NOT EDIT! + +/* + Package one is a generated protocol buffer package. + + It is generated from these files: + combos/unsafeboth/one.proto + + It has these top-level messages: + Subby + AllTypesOneOf + TwoOneofs + CustomOneof +*/ +package one + +import proto "github.com/gogo/protobuf/proto" +import fmt "fmt" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" + +import github_com_gogo_protobuf_test_custom "github.com/gogo/protobuf/test/custom" +import github_com_gogo_protobuf_test_casttype "github.com/gogo/protobuf/test/casttype" + +import github_com_gogo_protobuf_protoc_gen_gogo_descriptor "github.com/gogo/protobuf/protoc-gen-gogo/descriptor" +import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" +import compress_gzip "compress/gzip" +import bytes "bytes" +import io_ioutil "io/ioutil" + +import strings "strings" +import sort "sort" +import strconv "strconv" +import reflect "reflect" + +import unsafe "unsafe" + +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. +const _ = proto.GoGoProtoPackageIsVersion1 + +type Subby struct { + Sub *string `protobuf:"bytes,1,opt,name=sub" json:"sub,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *Subby) Reset() { *m = Subby{} } +func (*Subby) ProtoMessage() {} +func (*Subby) Descriptor() ([]byte, []int) { return fileDescriptorOne, []int{0} } + +type AllTypesOneOf struct { + // Types that are valid to be assigned to TestOneof: + // *AllTypesOneOf_Field1 + // *AllTypesOneOf_Field2 + // *AllTypesOneOf_Field3 + // *AllTypesOneOf_Field4 + // *AllTypesOneOf_Field5 + // *AllTypesOneOf_Field6 + // *AllTypesOneOf_Field7 + // *AllTypesOneOf_Field8 + // *AllTypesOneOf_Field9 + // *AllTypesOneOf_Field10 + // *AllTypesOneOf_Field11 + // *AllTypesOneOf_Field12 + // *AllTypesOneOf_Field13 + // *AllTypesOneOf_Field14 + // *AllTypesOneOf_Field15 + // *AllTypesOneOf_SubMessage + TestOneof isAllTypesOneOf_TestOneof `protobuf_oneof:"test_oneof"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *AllTypesOneOf) Reset() { *m = AllTypesOneOf{} } +func (*AllTypesOneOf) ProtoMessage() {} +func (*AllTypesOneOf) Descriptor() ([]byte, []int) { return fileDescriptorOne, []int{1} } + +type isAllTypesOneOf_TestOneof interface { + isAllTypesOneOf_TestOneof() + Equal(interface{}) bool + VerboseEqual(interface{}) error + MarshalTo([]byte) (int, error) + Size() int +} + +type AllTypesOneOf_Field1 struct { + Field1 float64 `protobuf:"fixed64,1,opt,name=Field1,json=field1,oneof"` +} +type AllTypesOneOf_Field2 struct { + Field2 float32 `protobuf:"fixed32,2,opt,name=Field2,json=field2,oneof"` +} +type AllTypesOneOf_Field3 struct { + Field3 int32 `protobuf:"varint,3,opt,name=Field3,json=field3,oneof"` +} +type AllTypesOneOf_Field4 struct { + Field4 int64 `protobuf:"varint,4,opt,name=Field4,json=field4,oneof"` +} +type AllTypesOneOf_Field5 struct { + Field5 uint32 `protobuf:"varint,5,opt,name=Field5,json=field5,oneof"` +} +type AllTypesOneOf_Field6 struct { + Field6 uint64 `protobuf:"varint,6,opt,name=Field6,json=field6,oneof"` +} +type AllTypesOneOf_Field7 struct { + Field7 int32 `protobuf:"zigzag32,7,opt,name=Field7,json=field7,oneof"` +} +type AllTypesOneOf_Field8 struct { + Field8 int64 `protobuf:"zigzag64,8,opt,name=Field8,json=field8,oneof"` +} +type AllTypesOneOf_Field9 struct { + Field9 uint32 `protobuf:"fixed32,9,opt,name=Field9,json=field9,oneof"` +} +type AllTypesOneOf_Field10 struct { + Field10 int32 `protobuf:"fixed32,10,opt,name=Field10,json=field10,oneof"` +} +type AllTypesOneOf_Field11 struct { + Field11 uint64 `protobuf:"fixed64,11,opt,name=Field11,json=field11,oneof"` +} +type AllTypesOneOf_Field12 struct { + Field12 int64 `protobuf:"fixed64,12,opt,name=Field12,json=field12,oneof"` +} +type AllTypesOneOf_Field13 struct { + Field13 bool `protobuf:"varint,13,opt,name=Field13,json=field13,oneof"` +} +type AllTypesOneOf_Field14 struct { + Field14 string `protobuf:"bytes,14,opt,name=Field14,json=field14,oneof"` +} +type AllTypesOneOf_Field15 struct { + Field15 []byte `protobuf:"bytes,15,opt,name=Field15,json=field15,oneof"` +} +type AllTypesOneOf_SubMessage struct { + SubMessage *Subby `protobuf:"bytes,16,opt,name=sub_message,json=subMessage,oneof"` +} + +func (*AllTypesOneOf_Field1) isAllTypesOneOf_TestOneof() {} +func (*AllTypesOneOf_Field2) isAllTypesOneOf_TestOneof() {} +func (*AllTypesOneOf_Field3) isAllTypesOneOf_TestOneof() {} +func (*AllTypesOneOf_Field4) isAllTypesOneOf_TestOneof() {} +func (*AllTypesOneOf_Field5) isAllTypesOneOf_TestOneof() {} +func (*AllTypesOneOf_Field6) isAllTypesOneOf_TestOneof() {} +func (*AllTypesOneOf_Field7) isAllTypesOneOf_TestOneof() {} +func (*AllTypesOneOf_Field8) isAllTypesOneOf_TestOneof() {} +func (*AllTypesOneOf_Field9) isAllTypesOneOf_TestOneof() {} +func (*AllTypesOneOf_Field10) isAllTypesOneOf_TestOneof() {} +func (*AllTypesOneOf_Field11) isAllTypesOneOf_TestOneof() {} +func (*AllTypesOneOf_Field12) isAllTypesOneOf_TestOneof() {} +func (*AllTypesOneOf_Field13) isAllTypesOneOf_TestOneof() {} +func (*AllTypesOneOf_Field14) isAllTypesOneOf_TestOneof() {} +func (*AllTypesOneOf_Field15) isAllTypesOneOf_TestOneof() {} +func (*AllTypesOneOf_SubMessage) isAllTypesOneOf_TestOneof() {} + +func (m *AllTypesOneOf) GetTestOneof() isAllTypesOneOf_TestOneof { + if m != nil { + return m.TestOneof + } + return nil +} + +func (m *AllTypesOneOf) GetField1() float64 { + if x, ok := m.GetTestOneof().(*AllTypesOneOf_Field1); ok { + return x.Field1 + } + return 0 +} + +func (m *AllTypesOneOf) GetField2() float32 { + if x, ok := m.GetTestOneof().(*AllTypesOneOf_Field2); ok { + return x.Field2 + } + return 0 +} + +func (m *AllTypesOneOf) GetField3() int32 { + if x, ok := m.GetTestOneof().(*AllTypesOneOf_Field3); ok { + return x.Field3 + } + return 0 +} + +func (m *AllTypesOneOf) GetField4() int64 { + if x, ok := m.GetTestOneof().(*AllTypesOneOf_Field4); ok { + return x.Field4 + } + return 0 +} + +func (m *AllTypesOneOf) GetField5() uint32 { + if x, ok := m.GetTestOneof().(*AllTypesOneOf_Field5); ok { + return x.Field5 + } + return 0 +} + +func (m *AllTypesOneOf) GetField6() uint64 { + if x, ok := m.GetTestOneof().(*AllTypesOneOf_Field6); ok { + return x.Field6 + } + return 0 +} + +func (m *AllTypesOneOf) GetField7() int32 { + if x, ok := m.GetTestOneof().(*AllTypesOneOf_Field7); ok { + return x.Field7 + } + return 0 +} + +func (m *AllTypesOneOf) GetField8() int64 { + if x, ok := m.GetTestOneof().(*AllTypesOneOf_Field8); ok { + return x.Field8 + } + return 0 +} + +func (m *AllTypesOneOf) GetField9() uint32 { + if x, ok := m.GetTestOneof().(*AllTypesOneOf_Field9); ok { + return x.Field9 + } + return 0 +} + +func (m *AllTypesOneOf) GetField10() int32 { + if x, ok := m.GetTestOneof().(*AllTypesOneOf_Field10); ok { + return x.Field10 + } + return 0 +} + +func (m *AllTypesOneOf) GetField11() uint64 { + if x, ok := m.GetTestOneof().(*AllTypesOneOf_Field11); ok { + return x.Field11 + } + return 0 +} + +func (m *AllTypesOneOf) GetField12() int64 { + if x, ok := m.GetTestOneof().(*AllTypesOneOf_Field12); ok { + return x.Field12 + } + return 0 +} + +func (m *AllTypesOneOf) GetField13() bool { + if x, ok := m.GetTestOneof().(*AllTypesOneOf_Field13); ok { + return x.Field13 + } + return false +} + +func (m *AllTypesOneOf) GetField14() string { + if x, ok := m.GetTestOneof().(*AllTypesOneOf_Field14); ok { + return x.Field14 + } + return "" +} + +func (m *AllTypesOneOf) GetField15() []byte { + if x, ok := m.GetTestOneof().(*AllTypesOneOf_Field15); ok { + return x.Field15 + } + return nil +} + +func (m *AllTypesOneOf) GetSubMessage() *Subby { + if x, ok := m.GetTestOneof().(*AllTypesOneOf_SubMessage); ok { + return x.SubMessage + } + return nil +} + +// XXX_OneofFuncs is for the internal use of the proto package. +func (*AllTypesOneOf) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{}) { + return _AllTypesOneOf_OneofMarshaler, _AllTypesOneOf_OneofUnmarshaler, _AllTypesOneOf_OneofSizer, []interface{}{ + (*AllTypesOneOf_Field1)(nil), + (*AllTypesOneOf_Field2)(nil), + (*AllTypesOneOf_Field3)(nil), + (*AllTypesOneOf_Field4)(nil), + (*AllTypesOneOf_Field5)(nil), + (*AllTypesOneOf_Field6)(nil), + (*AllTypesOneOf_Field7)(nil), + (*AllTypesOneOf_Field8)(nil), + (*AllTypesOneOf_Field9)(nil), + (*AllTypesOneOf_Field10)(nil), + (*AllTypesOneOf_Field11)(nil), + (*AllTypesOneOf_Field12)(nil), + (*AllTypesOneOf_Field13)(nil), + (*AllTypesOneOf_Field14)(nil), + (*AllTypesOneOf_Field15)(nil), + (*AllTypesOneOf_SubMessage)(nil), + } +} + +func _AllTypesOneOf_OneofMarshaler(msg proto.Message, b *proto.Buffer) error { + m := msg.(*AllTypesOneOf) + // test_oneof + switch x := m.TestOneof.(type) { + case *AllTypesOneOf_Field1: + _ = b.EncodeVarint(1<<3 | proto.WireFixed64) + _ = b.EncodeFixed64(math.Float64bits(x.Field1)) + case *AllTypesOneOf_Field2: + _ = b.EncodeVarint(2<<3 | proto.WireFixed32) + _ = b.EncodeFixed32(uint64(math.Float32bits(x.Field2))) + case *AllTypesOneOf_Field3: + _ = b.EncodeVarint(3<<3 | proto.WireVarint) + _ = b.EncodeVarint(uint64(x.Field3)) + case *AllTypesOneOf_Field4: + _ = b.EncodeVarint(4<<3 | proto.WireVarint) + _ = b.EncodeVarint(uint64(x.Field4)) + case *AllTypesOneOf_Field5: + _ = b.EncodeVarint(5<<3 | proto.WireVarint) + _ = b.EncodeVarint(uint64(x.Field5)) + case *AllTypesOneOf_Field6: + _ = b.EncodeVarint(6<<3 | proto.WireVarint) + _ = b.EncodeVarint(uint64(x.Field6)) + case *AllTypesOneOf_Field7: + _ = b.EncodeVarint(7<<3 | proto.WireVarint) + _ = b.EncodeZigzag32(uint64(x.Field7)) + case *AllTypesOneOf_Field8: + _ = b.EncodeVarint(8<<3 | proto.WireVarint) + _ = b.EncodeZigzag64(uint64(x.Field8)) + case *AllTypesOneOf_Field9: + _ = b.EncodeVarint(9<<3 | proto.WireFixed32) + _ = b.EncodeFixed32(uint64(x.Field9)) + case *AllTypesOneOf_Field10: + _ = b.EncodeVarint(10<<3 | proto.WireFixed32) + _ = b.EncodeFixed32(uint64(x.Field10)) + case *AllTypesOneOf_Field11: + _ = b.EncodeVarint(11<<3 | proto.WireFixed64) + _ = b.EncodeFixed64(uint64(x.Field11)) + case *AllTypesOneOf_Field12: + _ = b.EncodeVarint(12<<3 | proto.WireFixed64) + _ = b.EncodeFixed64(uint64(x.Field12)) + case *AllTypesOneOf_Field13: + t := uint64(0) + if x.Field13 { + t = 1 + } + _ = b.EncodeVarint(13<<3 | proto.WireVarint) + _ = b.EncodeVarint(t) + case *AllTypesOneOf_Field14: + _ = b.EncodeVarint(14<<3 | proto.WireBytes) + _ = b.EncodeStringBytes(x.Field14) + case *AllTypesOneOf_Field15: + _ = b.EncodeVarint(15<<3 | proto.WireBytes) + _ = b.EncodeRawBytes(x.Field15) + case *AllTypesOneOf_SubMessage: + _ = b.EncodeVarint(16<<3 | proto.WireBytes) + if err := b.EncodeMessage(x.SubMessage); err != nil { + return err + } + case nil: + default: + return fmt.Errorf("AllTypesOneOf.TestOneof has unexpected type %T", x) + } + return nil +} + +func _AllTypesOneOf_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) { + m := msg.(*AllTypesOneOf) + switch tag { + case 1: // test_oneof.Field1 + if wire != proto.WireFixed64 { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeFixed64() + m.TestOneof = &AllTypesOneOf_Field1{math.Float64frombits(x)} + return true, err + case 2: // test_oneof.Field2 + if wire != proto.WireFixed32 { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeFixed32() + m.TestOneof = &AllTypesOneOf_Field2{math.Float32frombits(uint32(x))} + return true, err + case 3: // test_oneof.Field3 + if wire != proto.WireVarint { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeVarint() + m.TestOneof = &AllTypesOneOf_Field3{int32(x)} + return true, err + case 4: // test_oneof.Field4 + if wire != proto.WireVarint { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeVarint() + m.TestOneof = &AllTypesOneOf_Field4{int64(x)} + return true, err + case 5: // test_oneof.Field5 + if wire != proto.WireVarint { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeVarint() + m.TestOneof = &AllTypesOneOf_Field5{uint32(x)} + return true, err + case 6: // test_oneof.Field6 + if wire != proto.WireVarint { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeVarint() + m.TestOneof = &AllTypesOneOf_Field6{x} + return true, err + case 7: // test_oneof.Field7 + if wire != proto.WireVarint { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeZigzag32() + m.TestOneof = &AllTypesOneOf_Field7{int32(x)} + return true, err + case 8: // test_oneof.Field8 + if wire != proto.WireVarint { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeZigzag64() + m.TestOneof = &AllTypesOneOf_Field8{int64(x)} + return true, err + case 9: // test_oneof.Field9 + if wire != proto.WireFixed32 { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeFixed32() + m.TestOneof = &AllTypesOneOf_Field9{uint32(x)} + return true, err + case 10: // test_oneof.Field10 + if wire != proto.WireFixed32 { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeFixed32() + m.TestOneof = &AllTypesOneOf_Field10{int32(x)} + return true, err + case 11: // test_oneof.Field11 + if wire != proto.WireFixed64 { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeFixed64() + m.TestOneof = &AllTypesOneOf_Field11{x} + return true, err + case 12: // test_oneof.Field12 + if wire != proto.WireFixed64 { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeFixed64() + m.TestOneof = &AllTypesOneOf_Field12{int64(x)} + return true, err + case 13: // test_oneof.Field13 + if wire != proto.WireVarint { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeVarint() + m.TestOneof = &AllTypesOneOf_Field13{x != 0} + return true, err + case 14: // test_oneof.Field14 + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeStringBytes() + m.TestOneof = &AllTypesOneOf_Field14{x} + return true, err + case 15: // test_oneof.Field15 + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeRawBytes(true) + m.TestOneof = &AllTypesOneOf_Field15{x} + return true, err + case 16: // test_oneof.sub_message + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + msg := new(Subby) + err := b.DecodeMessage(msg) + m.TestOneof = &AllTypesOneOf_SubMessage{msg} + return true, err + default: + return false, nil + } +} + +func _AllTypesOneOf_OneofSizer(msg proto.Message) (n int) { + m := msg.(*AllTypesOneOf) + // test_oneof + switch x := m.TestOneof.(type) { + case *AllTypesOneOf_Field1: + n += proto.SizeVarint(1<<3 | proto.WireFixed64) + n += 8 + case *AllTypesOneOf_Field2: + n += proto.SizeVarint(2<<3 | proto.WireFixed32) + n += 4 + case *AllTypesOneOf_Field3: + n += proto.SizeVarint(3<<3 | proto.WireVarint) + n += proto.SizeVarint(uint64(x.Field3)) + case *AllTypesOneOf_Field4: + n += proto.SizeVarint(4<<3 | proto.WireVarint) + n += proto.SizeVarint(uint64(x.Field4)) + case *AllTypesOneOf_Field5: + n += proto.SizeVarint(5<<3 | proto.WireVarint) + n += proto.SizeVarint(uint64(x.Field5)) + case *AllTypesOneOf_Field6: + n += proto.SizeVarint(6<<3 | proto.WireVarint) + n += proto.SizeVarint(uint64(x.Field6)) + case *AllTypesOneOf_Field7: + n += proto.SizeVarint(7<<3 | proto.WireVarint) + n += proto.SizeVarint(uint64((uint32(x.Field7) << 1) ^ uint32((int32(x.Field7) >> 31)))) + case *AllTypesOneOf_Field8: + n += proto.SizeVarint(8<<3 | proto.WireVarint) + n += proto.SizeVarint(uint64(uint64(x.Field8<<1) ^ uint64((int64(x.Field8) >> 63)))) + case *AllTypesOneOf_Field9: + n += proto.SizeVarint(9<<3 | proto.WireFixed32) + n += 4 + case *AllTypesOneOf_Field10: + n += proto.SizeVarint(10<<3 | proto.WireFixed32) + n += 4 + case *AllTypesOneOf_Field11: + n += proto.SizeVarint(11<<3 | proto.WireFixed64) + n += 8 + case *AllTypesOneOf_Field12: + n += proto.SizeVarint(12<<3 | proto.WireFixed64) + n += 8 + case *AllTypesOneOf_Field13: + n += proto.SizeVarint(13<<3 | proto.WireVarint) + n += 1 + case *AllTypesOneOf_Field14: + n += proto.SizeVarint(14<<3 | proto.WireBytes) + n += proto.SizeVarint(uint64(len(x.Field14))) + n += len(x.Field14) + case *AllTypesOneOf_Field15: + n += proto.SizeVarint(15<<3 | proto.WireBytes) + n += proto.SizeVarint(uint64(len(x.Field15))) + n += len(x.Field15) + case *AllTypesOneOf_SubMessage: + s := proto.Size(x.SubMessage) + n += proto.SizeVarint(16<<3 | proto.WireBytes) + n += proto.SizeVarint(uint64(s)) + n += s + case nil: + default: + panic(fmt.Sprintf("proto: unexpected type %T in oneof", x)) + } + return n +} + +type TwoOneofs struct { + // Types that are valid to be assigned to One: + // *TwoOneofs_Field1 + // *TwoOneofs_Field2 + // *TwoOneofs_Field3 + One isTwoOneofs_One `protobuf_oneof:"one"` + // Types that are valid to be assigned to Two: + // *TwoOneofs_Field34 + // *TwoOneofs_Field35 + // *TwoOneofs_SubMessage2 + Two isTwoOneofs_Two `protobuf_oneof:"two"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *TwoOneofs) Reset() { *m = TwoOneofs{} } +func (*TwoOneofs) ProtoMessage() {} +func (*TwoOneofs) Descriptor() ([]byte, []int) { return fileDescriptorOne, []int{2} } + +type isTwoOneofs_One interface { + isTwoOneofs_One() + Equal(interface{}) bool + VerboseEqual(interface{}) error + MarshalTo([]byte) (int, error) + Size() int +} +type isTwoOneofs_Two interface { + isTwoOneofs_Two() + Equal(interface{}) bool + VerboseEqual(interface{}) error + MarshalTo([]byte) (int, error) + Size() int +} + +type TwoOneofs_Field1 struct { + Field1 float64 `protobuf:"fixed64,1,opt,name=Field1,json=field1,oneof"` +} +type TwoOneofs_Field2 struct { + Field2 float32 `protobuf:"fixed32,2,opt,name=Field2,json=field2,oneof"` +} +type TwoOneofs_Field3 struct { + Field3 int32 `protobuf:"varint,3,opt,name=Field3,json=field3,oneof"` +} +type TwoOneofs_Field34 struct { + Field34 string `protobuf:"bytes,34,opt,name=Field34,json=field34,oneof"` +} +type TwoOneofs_Field35 struct { + Field35 []byte `protobuf:"bytes,35,opt,name=Field35,json=field35,oneof"` +} +type TwoOneofs_SubMessage2 struct { + SubMessage2 *Subby `protobuf:"bytes,36,opt,name=sub_message2,json=subMessage2,oneof"` +} + +func (*TwoOneofs_Field1) isTwoOneofs_One() {} +func (*TwoOneofs_Field2) isTwoOneofs_One() {} +func (*TwoOneofs_Field3) isTwoOneofs_One() {} +func (*TwoOneofs_Field34) isTwoOneofs_Two() {} +func (*TwoOneofs_Field35) isTwoOneofs_Two() {} +func (*TwoOneofs_SubMessage2) isTwoOneofs_Two() {} + +func (m *TwoOneofs) GetOne() isTwoOneofs_One { + if m != nil { + return m.One + } + return nil +} +func (m *TwoOneofs) GetTwo() isTwoOneofs_Two { + if m != nil { + return m.Two + } + return nil +} + +func (m *TwoOneofs) GetField1() float64 { + if x, ok := m.GetOne().(*TwoOneofs_Field1); ok { + return x.Field1 + } + return 0 +} + +func (m *TwoOneofs) GetField2() float32 { + if x, ok := m.GetOne().(*TwoOneofs_Field2); ok { + return x.Field2 + } + return 0 +} + +func (m *TwoOneofs) GetField3() int32 { + if x, ok := m.GetOne().(*TwoOneofs_Field3); ok { + return x.Field3 + } + return 0 +} + +func (m *TwoOneofs) GetField34() string { + if x, ok := m.GetTwo().(*TwoOneofs_Field34); ok { + return x.Field34 + } + return "" +} + +func (m *TwoOneofs) GetField35() []byte { + if x, ok := m.GetTwo().(*TwoOneofs_Field35); ok { + return x.Field35 + } + return nil +} + +func (m *TwoOneofs) GetSubMessage2() *Subby { + if x, ok := m.GetTwo().(*TwoOneofs_SubMessage2); ok { + return x.SubMessage2 + } + return nil +} + +// XXX_OneofFuncs is for the internal use of the proto package. +func (*TwoOneofs) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{}) { + return _TwoOneofs_OneofMarshaler, _TwoOneofs_OneofUnmarshaler, _TwoOneofs_OneofSizer, []interface{}{ + (*TwoOneofs_Field1)(nil), + (*TwoOneofs_Field2)(nil), + (*TwoOneofs_Field3)(nil), + (*TwoOneofs_Field34)(nil), + (*TwoOneofs_Field35)(nil), + (*TwoOneofs_SubMessage2)(nil), + } +} + +func _TwoOneofs_OneofMarshaler(msg proto.Message, b *proto.Buffer) error { + m := msg.(*TwoOneofs) + // one + switch x := m.One.(type) { + case *TwoOneofs_Field1: + _ = b.EncodeVarint(1<<3 | proto.WireFixed64) + _ = b.EncodeFixed64(math.Float64bits(x.Field1)) + case *TwoOneofs_Field2: + _ = b.EncodeVarint(2<<3 | proto.WireFixed32) + _ = b.EncodeFixed32(uint64(math.Float32bits(x.Field2))) + case *TwoOneofs_Field3: + _ = b.EncodeVarint(3<<3 | proto.WireVarint) + _ = b.EncodeVarint(uint64(x.Field3)) + case nil: + default: + return fmt.Errorf("TwoOneofs.One has unexpected type %T", x) + } + // two + switch x := m.Two.(type) { + case *TwoOneofs_Field34: + _ = b.EncodeVarint(34<<3 | proto.WireBytes) + _ = b.EncodeStringBytes(x.Field34) + case *TwoOneofs_Field35: + _ = b.EncodeVarint(35<<3 | proto.WireBytes) + _ = b.EncodeRawBytes(x.Field35) + case *TwoOneofs_SubMessage2: + _ = b.EncodeVarint(36<<3 | proto.WireBytes) + if err := b.EncodeMessage(x.SubMessage2); err != nil { + return err + } + case nil: + default: + return fmt.Errorf("TwoOneofs.Two has unexpected type %T", x) + } + return nil +} + +func _TwoOneofs_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) { + m := msg.(*TwoOneofs) + switch tag { + case 1: // one.Field1 + if wire != proto.WireFixed64 { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeFixed64() + m.One = &TwoOneofs_Field1{math.Float64frombits(x)} + return true, err + case 2: // one.Field2 + if wire != proto.WireFixed32 { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeFixed32() + m.One = &TwoOneofs_Field2{math.Float32frombits(uint32(x))} + return true, err + case 3: // one.Field3 + if wire != proto.WireVarint { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeVarint() + m.One = &TwoOneofs_Field3{int32(x)} + return true, err + case 34: // two.Field34 + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeStringBytes() + m.Two = &TwoOneofs_Field34{x} + return true, err + case 35: // two.Field35 + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeRawBytes(true) + m.Two = &TwoOneofs_Field35{x} + return true, err + case 36: // two.sub_message2 + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + msg := new(Subby) + err := b.DecodeMessage(msg) + m.Two = &TwoOneofs_SubMessage2{msg} + return true, err + default: + return false, nil + } +} + +func _TwoOneofs_OneofSizer(msg proto.Message) (n int) { + m := msg.(*TwoOneofs) + // one + switch x := m.One.(type) { + case *TwoOneofs_Field1: + n += proto.SizeVarint(1<<3 | proto.WireFixed64) + n += 8 + case *TwoOneofs_Field2: + n += proto.SizeVarint(2<<3 | proto.WireFixed32) + n += 4 + case *TwoOneofs_Field3: + n += proto.SizeVarint(3<<3 | proto.WireVarint) + n += proto.SizeVarint(uint64(x.Field3)) + case nil: + default: + panic(fmt.Sprintf("proto: unexpected type %T in oneof", x)) + } + // two + switch x := m.Two.(type) { + case *TwoOneofs_Field34: + n += proto.SizeVarint(34<<3 | proto.WireBytes) + n += proto.SizeVarint(uint64(len(x.Field34))) + n += len(x.Field34) + case *TwoOneofs_Field35: + n += proto.SizeVarint(35<<3 | proto.WireBytes) + n += proto.SizeVarint(uint64(len(x.Field35))) + n += len(x.Field35) + case *TwoOneofs_SubMessage2: + s := proto.Size(x.SubMessage2) + n += proto.SizeVarint(36<<3 | proto.WireBytes) + n += proto.SizeVarint(uint64(s)) + n += s + case nil: + default: + panic(fmt.Sprintf("proto: unexpected type %T in oneof", x)) + } + return n +} + +type CustomOneof struct { + // Types that are valid to be assigned to Custom: + // *CustomOneof_Stringy + // *CustomOneof_CustomType + // *CustomOneof_CastType + // *CustomOneof_MyCustomName + Custom isCustomOneof_Custom `protobuf_oneof:"custom"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *CustomOneof) Reset() { *m = CustomOneof{} } +func (*CustomOneof) ProtoMessage() {} +func (*CustomOneof) Descriptor() ([]byte, []int) { return fileDescriptorOne, []int{3} } + +type isCustomOneof_Custom interface { + isCustomOneof_Custom() + Equal(interface{}) bool + VerboseEqual(interface{}) error + MarshalTo([]byte) (int, error) + Size() int +} + +type CustomOneof_Stringy struct { + Stringy string `protobuf:"bytes,34,opt,name=Stringy,json=stringy,oneof"` +} +type CustomOneof_CustomType struct { + CustomType github_com_gogo_protobuf_test_custom.Uint128 `protobuf:"bytes,35,opt,name=CustomType,json=customType,oneof,customtype=github.com/gogo/protobuf/test/custom.Uint128"` +} +type CustomOneof_CastType struct { + CastType github_com_gogo_protobuf_test_casttype.MyUint64Type `protobuf:"varint,36,opt,name=CastType,json=castType,oneof,casttype=github.com/gogo/protobuf/test/casttype.MyUint64Type"` +} +type CustomOneof_MyCustomName struct { + MyCustomName int64 `protobuf:"varint,37,opt,name=CustomName,json=customName,oneof"` +} + +func (*CustomOneof_Stringy) isCustomOneof_Custom() {} +func (*CustomOneof_CustomType) isCustomOneof_Custom() {} +func (*CustomOneof_CastType) isCustomOneof_Custom() {} +func (*CustomOneof_MyCustomName) isCustomOneof_Custom() {} + +func (m *CustomOneof) GetCustom() isCustomOneof_Custom { + if m != nil { + return m.Custom + } + return nil +} + +func (m *CustomOneof) GetStringy() string { + if x, ok := m.GetCustom().(*CustomOneof_Stringy); ok { + return x.Stringy + } + return "" +} + +func (m *CustomOneof) GetCastType() github_com_gogo_protobuf_test_casttype.MyUint64Type { + if x, ok := m.GetCustom().(*CustomOneof_CastType); ok { + return x.CastType + } + return 0 +} + +func (m *CustomOneof) GetMyCustomName() int64 { + if x, ok := m.GetCustom().(*CustomOneof_MyCustomName); ok { + return x.MyCustomName + } + return 0 +} + +// XXX_OneofFuncs is for the internal use of the proto package. +func (*CustomOneof) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{}) { + return _CustomOneof_OneofMarshaler, _CustomOneof_OneofUnmarshaler, _CustomOneof_OneofSizer, []interface{}{ + (*CustomOneof_Stringy)(nil), + (*CustomOneof_CustomType)(nil), + (*CustomOneof_CastType)(nil), + (*CustomOneof_MyCustomName)(nil), + } +} + +func _CustomOneof_OneofMarshaler(msg proto.Message, b *proto.Buffer) error { + m := msg.(*CustomOneof) + // custom + switch x := m.Custom.(type) { + case *CustomOneof_Stringy: + _ = b.EncodeVarint(34<<3 | proto.WireBytes) + _ = b.EncodeStringBytes(x.Stringy) + case *CustomOneof_CustomType: + _ = b.EncodeVarint(35<<3 | proto.WireBytes) + data, err := x.CustomType.Marshal() + if err != nil { + return err + } + _ = b.EncodeRawBytes(data) + case *CustomOneof_CastType: + _ = b.EncodeVarint(36<<3 | proto.WireVarint) + _ = b.EncodeVarint(uint64(x.CastType)) + case *CustomOneof_MyCustomName: + _ = b.EncodeVarint(37<<3 | proto.WireVarint) + _ = b.EncodeVarint(uint64(x.MyCustomName)) + case nil: + default: + return fmt.Errorf("CustomOneof.Custom has unexpected type %T", x) + } + return nil +} + +func _CustomOneof_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) { + m := msg.(*CustomOneof) + switch tag { + case 34: // custom.Stringy + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeStringBytes() + m.Custom = &CustomOneof_Stringy{x} + return true, err + case 35: // custom.CustomType + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeRawBytes(true) + if err != nil { + return true, err + } + var cc github_com_gogo_protobuf_test_custom.Uint128 + c := &cc + err = c.Unmarshal(x) + m.Custom = &CustomOneof_CustomType{*c} + return true, err + case 36: // custom.CastType + if wire != proto.WireVarint { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeVarint() + m.Custom = &CustomOneof_CastType{github_com_gogo_protobuf_test_casttype.MyUint64Type(x)} + return true, err + case 37: // custom.CustomName + if wire != proto.WireVarint { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeVarint() + m.Custom = &CustomOneof_MyCustomName{int64(x)} + return true, err + default: + return false, nil + } +} + +func _CustomOneof_OneofSizer(msg proto.Message) (n int) { + m := msg.(*CustomOneof) + // custom + switch x := m.Custom.(type) { + case *CustomOneof_Stringy: + n += proto.SizeVarint(34<<3 | proto.WireBytes) + n += proto.SizeVarint(uint64(len(x.Stringy))) + n += len(x.Stringy) + case *CustomOneof_CustomType: + n += proto.SizeVarint(35<<3 | proto.WireBytes) + n += proto.SizeVarint(uint64(x.CustomType.Size())) + n += x.CustomType.Size() + case *CustomOneof_CastType: + n += proto.SizeVarint(36<<3 | proto.WireVarint) + n += proto.SizeVarint(uint64(x.CastType)) + case *CustomOneof_MyCustomName: + n += proto.SizeVarint(37<<3 | proto.WireVarint) + n += proto.SizeVarint(uint64(x.MyCustomName)) + case nil: + default: + panic(fmt.Sprintf("proto: unexpected type %T in oneof", x)) + } + return n +} + +func init() { + proto.RegisterType((*Subby)(nil), "one.Subby") + proto.RegisterType((*AllTypesOneOf)(nil), "one.AllTypesOneOf") + proto.RegisterType((*TwoOneofs)(nil), "one.TwoOneofs") + proto.RegisterType((*CustomOneof)(nil), "one.CustomOneof") +} +func (this *Subby) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return OneDescription() +} +func (this *AllTypesOneOf) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return OneDescription() +} +func (this *TwoOneofs) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return OneDescription() +} +func (this *CustomOneof) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return OneDescription() +} +func OneDescription() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + d := &github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet{} + var gzipped = []byte{ + // 3727 bytes of a gzipped FileDescriptorSet + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xcc, 0x5a, 0x6b, 0x6c, 0x23, 0xe5, + 0xd5, 0xc6, 0xf1, 0x25, 0xf6, 0xb1, 0xe3, 0x38, 0x93, 0xb0, 0xeb, 0x0d, 0xb0, 0x61, 0xbd, 0x5c, + 0x96, 0x05, 0x92, 0xdd, 0x64, 0xb3, 0x17, 0xf3, 0x7d, 0xa0, 0x38, 0xf1, 0x86, 0xac, 0x92, 0x38, + 0xdf, 0x24, 0x86, 0x85, 0xef, 0xc7, 0x68, 0x62, 0x4f, 0x1c, 0xef, 0xda, 0x33, 0xfe, 0x3c, 0xe3, + 0xdd, 0x0d, 0xbf, 0xf8, 0x44, 0x2f, 0x42, 0x55, 0x6f, 0xb4, 0x52, 0xb9, 0xb7, 0x20, 0xb5, 0x50, + 0x7a, 0x83, 0xde, 0x54, 0xf5, 0x57, 0xa5, 0x8a, 0x96, 0x5f, 0x15, 0xed, 0xaf, 0xaa, 0xaa, 0x56, + 0x40, 0x91, 0x4a, 0x5b, 0xda, 0x52, 0x69, 0xa5, 0xa2, 0xee, 0x9f, 0x9e, 0xf7, 0x36, 0x17, 0xdb, + 0xc9, 0x38, 0xa8, 0x94, 0x46, 0xb2, 0xe2, 0x39, 0xe7, 0x3c, 0xcf, 0xbc, 0xef, 0x79, 0xcf, 0x7b, + 0xce, 0x99, 0x77, 0x0c, 0x3f, 0x3d, 0x0a, 0x37, 0x56, 0x0c, 0xa3, 0x52, 0xd3, 0x26, 0x1a, 0x4d, + 0xc3, 0x32, 0xd6, 0x5b, 0x1b, 0x13, 0x65, 0xcd, 0x2c, 0x35, 0xab, 0x0d, 0xcb, 0x68, 0x8e, 0x53, + 0x99, 0x34, 0xc8, 0x2c, 0xc6, 0x85, 0x45, 0x66, 0x09, 0x86, 0x4e, 0x57, 0x6b, 0xda, 0x9c, 0x6d, + 0xb8, 0xaa, 0x59, 0xd2, 0x49, 0x08, 0x6d, 0xa0, 0x30, 0x1d, 0xb8, 0x31, 0x78, 0x28, 0x3e, 0x79, + 0xd3, 0x78, 0x1b, 0x68, 0xdc, 0x8b, 0x58, 0x21, 0x62, 0x99, 0x22, 0x32, 0x6f, 0x87, 0x60, 0xb8, + 0x8b, 0x56, 0x92, 0x20, 0xa4, 0xab, 0x75, 0xc2, 0x18, 0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 0xc6, 0xd2, 0x02, 0xa4, 0x4c, 0xa3, 0xd5, 0x2c, 0x69, 0x4a, 0xc9, 0x28, 0x6b, 0x4a, 0x55, 0xdf, + 0x30, 0xd2, 0x31, 0x4a, 0x30, 0xd6, 0x39, 0x11, 0x6a, 0x38, 0x8b, 0x76, 0x0b, 0x68, 0x26, 0x27, + 0x4d, 0xcf, 0xb5, 0xb4, 0x07, 0x22, 0xe6, 0x96, 0x6e, 0xa9, 0x97, 0xd2, 0x09, 0x1a, 0x21, 0xfc, + 0x2a, 0xf3, 0xf7, 0x30, 0x0c, 0xf6, 0x12, 0x62, 0x77, 0x41, 0x78, 0x83, 0xcc, 0x12, 0x03, 0x6c, + 0x17, 0x3e, 0x60, 0x18, 0xaf, 0x13, 0x23, 0x1f, 0xd0, 0x89, 0x33, 0x10, 0xd7, 0x35, 0xd3, 0xd2, + 0xca, 0x2c, 0x22, 0x82, 0x3d, 0xc6, 0x14, 0x30, 0x50, 0x67, 0x48, 0x85, 0x3e, 0x50, 0x48, 0x9d, + 0x85, 0x41, 0x7b, 0x48, 0x4a, 0x53, 0xd5, 0x2b, 0x22, 0x36, 0x27, 0xfc, 0x46, 0x32, 0x9e, 0x17, + 0x38, 0x99, 0xc0, 0xe4, 0xa4, 0xe6, 0xb9, 0x96, 0xe6, 0x00, 0x0c, 0x5d, 0x33, 0x36, 0x70, 0x7b, + 0x95, 0x6a, 0x18, 0x27, 0xdd, 0xbd, 0x54, 0x20, 0x26, 0x1d, 0x5e, 0x32, 0x98, 0xb4, 0x54, 0x93, + 0x4e, 0x39, 0xa1, 0xd6, 0xbf, 0x4d, 0xa4, 0x2c, 0xb1, 0x4d, 0xd6, 0x11, 0x6d, 0x45, 0x48, 0x36, + 0x35, 0x12, 0xf7, 0xe8, 0x62, 0x36, 0xb3, 0x18, 0x1d, 0xc4, 0xb8, 0xef, 0xcc, 0x64, 0x0e, 0x63, + 0x13, 0x1b, 0x68, 0xba, 0x2f, 0xa5, 0x83, 0x60, 0x0b, 0x14, 0x1a, 0x56, 0x40, 0xb3, 0x50, 0x42, + 0x08, 0x97, 0x51, 0x36, 0x7a, 0x12, 0x92, 0x5e, 0xf7, 0x48, 0x23, 0x10, 0x36, 0x2d, 0xb5, 0x69, + 0xd1, 0x28, 0x0c, 0xcb, 0xec, 0x42, 0x4a, 0x41, 0x10, 0x93, 0x0c, 0xcd, 0x72, 0x61, 0x99, 0x7c, + 0x1d, 0x3d, 0x01, 0x03, 0x9e, 0xdb, 0xf7, 0x0a, 0xcc, 0x3c, 0x1e, 0x81, 0x91, 0x6e, 0x31, 0xd7, + 0x35, 0xfc, 0x71, 0xfb, 0x60, 0x04, 0xac, 0x6b, 0x4d, 0x8c, 0x3b, 0xc2, 0xc0, 0xaf, 0x30, 0xa2, + 0xc2, 0x35, 0x75, 0x5d, 0xab, 0x61, 0x34, 0x05, 0x0e, 0x25, 0x27, 0x6f, 0xef, 0x29, 0xaa, 0xc7, + 0x17, 0x09, 0x44, 0x66, 0x48, 0xe9, 0x6e, 0x08, 0xf1, 0x14, 0x47, 0x18, 0x0e, 0xf7, 0xc6, 0x40, + 0x62, 0x51, 0xa6, 0x38, 0xe9, 0x3a, 0x88, 0x91, 0xff, 0xcc, 0xb7, 0x11, 0x3a, 0xe6, 0x28, 0x11, + 0x10, 0xbf, 0x4a, 0xa3, 0x10, 0xa5, 0x61, 0x56, 0xd6, 0x44, 0x69, 0xb0, 0xaf, 0xc9, 0xc2, 0x94, + 0xb5, 0x0d, 0xb5, 0x55, 0xb3, 0x94, 0x0b, 0x6a, 0xad, 0xa5, 0xd1, 0x80, 0xc1, 0x85, 0xe1, 0xc2, + 0xfb, 0x88, 0x4c, 0x1a, 0x83, 0x38, 0x8b, 0xca, 0x2a, 0x62, 0x2e, 0xd1, 0xec, 0x13, 0x96, 0x59, + 0xa0, 0x2e, 0x10, 0x09, 0xb9, 0xfd, 0x39, 0x13, 0xf7, 0x02, 0x5f, 0x5a, 0x7a, 0x0b, 0x22, 0xa0, + 0xb7, 0x3f, 0xd1, 0x9e, 0xf8, 0x6e, 0xe8, 0x3e, 0xbd, 0xf6, 0x58, 0xcc, 0xfc, 0xb0, 0x0f, 0x42, + 0x74, 0xbf, 0x0d, 0x42, 0x7c, 0xed, 0x81, 0x95, 0xbc, 0x32, 0x57, 0x28, 0xe6, 0x16, 0xf3, 0xa9, + 0x80, 0x94, 0x04, 0xa0, 0x82, 0xd3, 0x8b, 0x85, 0x99, 0xb5, 0x54, 0x9f, 0x7d, 0xbd, 0xb0, 0xbc, + 0x76, 0xfc, 0x58, 0x2a, 0x68, 0x03, 0x8a, 0x4c, 0x10, 0x72, 0x1b, 0x4c, 0x4d, 0xa6, 0xc2, 0x18, + 0x09, 0x09, 0x46, 0xb0, 0x70, 0x36, 0x3f, 0x87, 0x16, 0x11, 0xaf, 0x04, 0x6d, 0xfa, 0xa5, 0x01, + 0x88, 0x51, 0x49, 0xae, 0x50, 0x58, 0x4c, 0x45, 0x6d, 0xce, 0xd5, 0x35, 0x79, 0x61, 0x79, 0x3e, + 0x15, 0xb3, 0x39, 0xe7, 0xe5, 0x42, 0x71, 0x25, 0x05, 0x36, 0xc3, 0x52, 0x7e, 0x75, 0x75, 0x66, + 0x3e, 0x9f, 0x8a, 0xdb, 0x16, 0xb9, 0x07, 0xd6, 0xf2, 0xab, 0xa9, 0x84, 0x67, 0x58, 0x78, 0x8b, + 0x01, 0xfb, 0x16, 0xf9, 0xe5, 0xe2, 0x52, 0x2a, 0x29, 0x0d, 0xc1, 0x00, 0xbb, 0x85, 0x18, 0xc4, + 0x60, 0x9b, 0x08, 0x47, 0x9a, 0x72, 0x06, 0xc2, 0x58, 0x86, 0x3c, 0x02, 0xb4, 0x90, 0x32, 0xb3, + 0x10, 0xa6, 0xd1, 0x85, 0x51, 0x9c, 0x5c, 0x9c, 0xc9, 0xe5, 0x17, 0x95, 0xc2, 0xca, 0xda, 0x42, + 0x61, 0x79, 0x66, 0x11, 0x7d, 0x67, 0xcb, 0xe4, 0xfc, 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x81, 0x17, 0xf1, 0xf3, 0x32, 0x7e, 0x7e, 0x84, 0x9f, 0xd7, 0xde, 0x42, 0x3b, + 0xfc, 0xbc, 0x81, 0xdf, 0xdf, 0xc1, 0xff, 0xef, 0xe1, 0xff, 0xf7, 0xf1, 0xf3, 0xf0, 0xef, 0xf6, + 0x07, 0xfe, 0x19, 0x00, 0x00, 0xff, 0xff, 0x23, 0x0a, 0x13, 0xbd, 0xe8, 0x2e, 0x00, 0x00, + } + r := bytes.NewReader(gzipped) + gzipr, err := compress_gzip.NewReader(r) + if err != nil { + panic(err) + } + ungzipped, err := io_ioutil.ReadAll(gzipr) + if err != nil { + panic(err) + } + if err := github_com_gogo_protobuf_proto.Unmarshal(ungzipped, d); err != nil { + panic(err) + } + return d +} +func (this *Subby) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*Subby) + if !ok { + that2, ok := that.(Subby) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *Subby") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *Subby but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *Subby but is not nil && this == nil") + } + if this.Sub != nil && that1.Sub != nil { + if *this.Sub != *that1.Sub { + return fmt.Errorf("Sub this(%v) Not Equal that(%v)", *this.Sub, *that1.Sub) + } + } else if this.Sub != nil { + return fmt.Errorf("this.Sub == nil && that.Sub != nil") + } else if that1.Sub != nil { + return fmt.Errorf("Sub this(%v) Not Equal that(%v)", this.Sub, that1.Sub) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *Subby) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*Subby) + if !ok { + that2, ok := that.(Subby) + 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.Sub != nil && that1.Sub != nil { + if *this.Sub != *that1.Sub { + return false + } + } else if this.Sub != nil { + return false + } else if that1.Sub != nil { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *AllTypesOneOf) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*AllTypesOneOf) + if !ok { + that2, ok := that.(AllTypesOneOf) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *AllTypesOneOf") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *AllTypesOneOf but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *AllTypesOneOf but is not nil && this == nil") + } + if that1.TestOneof == nil { + if this.TestOneof != nil { + return fmt.Errorf("this.TestOneof != nil && that1.TestOneof == nil") + } + } else if this.TestOneof == nil { + return fmt.Errorf("this.TestOneof == nil && that1.TestOneof != nil") + } else if err := this.TestOneof.VerboseEqual(that1.TestOneof); err != nil { + return err + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *AllTypesOneOf_Field1) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*AllTypesOneOf_Field1) + if !ok { + that2, ok := that.(AllTypesOneOf_Field1) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *AllTypesOneOf_Field1") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *AllTypesOneOf_Field1 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *AllTypesOneOf_Field1 but is not nil && this == nil") + } + if this.Field1 != that1.Field1 { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) + } + return nil +} +func (this *AllTypesOneOf_Field2) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*AllTypesOneOf_Field2) + if !ok { + that2, ok := that.(AllTypesOneOf_Field2) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *AllTypesOneOf_Field2") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *AllTypesOneOf_Field2 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *AllTypesOneOf_Field2 but is not nil && this == nil") + } + if this.Field2 != that1.Field2 { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) + } + return nil +} +func (this *AllTypesOneOf_Field3) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*AllTypesOneOf_Field3) + if !ok { + that2, ok := that.(AllTypesOneOf_Field3) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *AllTypesOneOf_Field3") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *AllTypesOneOf_Field3 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *AllTypesOneOf_Field3 but is not nil && this == nil") + } + if this.Field3 != that1.Field3 { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", this.Field3, that1.Field3) + } + return nil +} +func (this *AllTypesOneOf_Field4) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*AllTypesOneOf_Field4) + if !ok { + that2, ok := that.(AllTypesOneOf_Field4) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *AllTypesOneOf_Field4") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *AllTypesOneOf_Field4 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *AllTypesOneOf_Field4 but is not nil && this == nil") + } + if this.Field4 != that1.Field4 { + return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", this.Field4, that1.Field4) + } + return nil +} +func (this *AllTypesOneOf_Field5) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*AllTypesOneOf_Field5) + if !ok { + that2, ok := that.(AllTypesOneOf_Field5) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *AllTypesOneOf_Field5") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *AllTypesOneOf_Field5 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *AllTypesOneOf_Field5 but is not nil && this == nil") + } + if this.Field5 != that1.Field5 { + return fmt.Errorf("Field5 this(%v) Not Equal that(%v)", this.Field5, that1.Field5) + } + return nil +} +func (this *AllTypesOneOf_Field6) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*AllTypesOneOf_Field6) + if !ok { + that2, ok := that.(AllTypesOneOf_Field6) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *AllTypesOneOf_Field6") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *AllTypesOneOf_Field6 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *AllTypesOneOf_Field6 but is not nil && this == nil") + } + if this.Field6 != that1.Field6 { + return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", this.Field6, that1.Field6) + } + return nil +} +func (this *AllTypesOneOf_Field7) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*AllTypesOneOf_Field7) + if !ok { + that2, ok := that.(AllTypesOneOf_Field7) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *AllTypesOneOf_Field7") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *AllTypesOneOf_Field7 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *AllTypesOneOf_Field7 but is not nil && this == nil") + } + if this.Field7 != that1.Field7 { + return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", this.Field7, that1.Field7) + } + return nil +} +func (this *AllTypesOneOf_Field8) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*AllTypesOneOf_Field8) + if !ok { + that2, ok := that.(AllTypesOneOf_Field8) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *AllTypesOneOf_Field8") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *AllTypesOneOf_Field8 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *AllTypesOneOf_Field8 but is not nil && this == nil") + } + if this.Field8 != that1.Field8 { + return fmt.Errorf("Field8 this(%v) Not Equal that(%v)", this.Field8, that1.Field8) + } + return nil +} +func (this *AllTypesOneOf_Field9) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*AllTypesOneOf_Field9) + if !ok { + that2, ok := that.(AllTypesOneOf_Field9) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *AllTypesOneOf_Field9") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *AllTypesOneOf_Field9 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *AllTypesOneOf_Field9 but is not nil && this == nil") + } + if this.Field9 != that1.Field9 { + return fmt.Errorf("Field9 this(%v) Not Equal that(%v)", this.Field9, that1.Field9) + } + return nil +} +func (this *AllTypesOneOf_Field10) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*AllTypesOneOf_Field10) + if !ok { + that2, ok := that.(AllTypesOneOf_Field10) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *AllTypesOneOf_Field10") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *AllTypesOneOf_Field10 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *AllTypesOneOf_Field10 but is not nil && this == nil") + } + if this.Field10 != that1.Field10 { + return fmt.Errorf("Field10 this(%v) Not Equal that(%v)", this.Field10, that1.Field10) + } + return nil +} +func (this *AllTypesOneOf_Field11) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*AllTypesOneOf_Field11) + if !ok { + that2, ok := that.(AllTypesOneOf_Field11) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *AllTypesOneOf_Field11") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *AllTypesOneOf_Field11 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *AllTypesOneOf_Field11 but is not nil && this == nil") + } + if this.Field11 != that1.Field11 { + return fmt.Errorf("Field11 this(%v) Not Equal that(%v)", this.Field11, that1.Field11) + } + return nil +} +func (this *AllTypesOneOf_Field12) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*AllTypesOneOf_Field12) + if !ok { + that2, ok := that.(AllTypesOneOf_Field12) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *AllTypesOneOf_Field12") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *AllTypesOneOf_Field12 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *AllTypesOneOf_Field12 but is not nil && this == nil") + } + if this.Field12 != that1.Field12 { + return fmt.Errorf("Field12 this(%v) Not Equal that(%v)", this.Field12, that1.Field12) + } + return nil +} +func (this *AllTypesOneOf_Field13) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*AllTypesOneOf_Field13) + if !ok { + that2, ok := that.(AllTypesOneOf_Field13) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *AllTypesOneOf_Field13") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *AllTypesOneOf_Field13 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *AllTypesOneOf_Field13 but is not nil && this == nil") + } + if this.Field13 != that1.Field13 { + return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", this.Field13, that1.Field13) + } + return nil +} +func (this *AllTypesOneOf_Field14) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*AllTypesOneOf_Field14) + if !ok { + that2, ok := that.(AllTypesOneOf_Field14) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *AllTypesOneOf_Field14") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *AllTypesOneOf_Field14 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *AllTypesOneOf_Field14 but is not nil && this == nil") + } + if this.Field14 != that1.Field14 { + return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", this.Field14, that1.Field14) + } + return nil +} +func (this *AllTypesOneOf_Field15) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*AllTypesOneOf_Field15) + if !ok { + that2, ok := that.(AllTypesOneOf_Field15) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *AllTypesOneOf_Field15") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *AllTypesOneOf_Field15 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *AllTypesOneOf_Field15 but is not nil && this == nil") + } + if !bytes.Equal(this.Field15, that1.Field15) { + return fmt.Errorf("Field15 this(%v) Not Equal that(%v)", this.Field15, that1.Field15) + } + return nil +} +func (this *AllTypesOneOf_SubMessage) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*AllTypesOneOf_SubMessage) + if !ok { + that2, ok := that.(AllTypesOneOf_SubMessage) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *AllTypesOneOf_SubMessage") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *AllTypesOneOf_SubMessage but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *AllTypesOneOf_SubMessage but is not nil && this == nil") + } + if !this.SubMessage.Equal(that1.SubMessage) { + return fmt.Errorf("SubMessage this(%v) Not Equal that(%v)", this.SubMessage, that1.SubMessage) + } + return nil +} +func (this *AllTypesOneOf) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*AllTypesOneOf) + if !ok { + that2, ok := that.(AllTypesOneOf) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + if this == nil { + return true + } + return false + } else if this == nil { + return false + } + if that1.TestOneof == nil { + if this.TestOneof != nil { + return false + } + } else if this.TestOneof == nil { + return false + } else if !this.TestOneof.Equal(that1.TestOneof) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *AllTypesOneOf_Field1) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*AllTypesOneOf_Field1) + if !ok { + that2, ok := that.(AllTypesOneOf_Field1) + 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.Field1 != that1.Field1 { + return false + } + return true +} +func (this *AllTypesOneOf_Field2) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*AllTypesOneOf_Field2) + if !ok { + that2, ok := that.(AllTypesOneOf_Field2) + 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.Field2 != that1.Field2 { + return false + } + return true +} +func (this *AllTypesOneOf_Field3) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*AllTypesOneOf_Field3) + if !ok { + that2, ok := that.(AllTypesOneOf_Field3) + 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.Field3 != that1.Field3 { + return false + } + return true +} +func (this *AllTypesOneOf_Field4) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*AllTypesOneOf_Field4) + if !ok { + that2, ok := that.(AllTypesOneOf_Field4) + 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.Field4 != that1.Field4 { + return false + } + return true +} +func (this *AllTypesOneOf_Field5) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*AllTypesOneOf_Field5) + if !ok { + that2, ok := that.(AllTypesOneOf_Field5) + 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.Field5 != that1.Field5 { + return false + } + return true +} +func (this *AllTypesOneOf_Field6) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*AllTypesOneOf_Field6) + if !ok { + that2, ok := that.(AllTypesOneOf_Field6) + 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.Field6 != that1.Field6 { + return false + } + return true +} +func (this *AllTypesOneOf_Field7) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*AllTypesOneOf_Field7) + if !ok { + that2, ok := that.(AllTypesOneOf_Field7) + 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.Field7 != that1.Field7 { + return false + } + return true +} +func (this *AllTypesOneOf_Field8) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*AllTypesOneOf_Field8) + if !ok { + that2, ok := that.(AllTypesOneOf_Field8) + 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.Field8 != that1.Field8 { + return false + } + return true +} +func (this *AllTypesOneOf_Field9) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*AllTypesOneOf_Field9) + if !ok { + that2, ok := that.(AllTypesOneOf_Field9) + 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.Field9 != that1.Field9 { + return false + } + return true +} +func (this *AllTypesOneOf_Field10) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*AllTypesOneOf_Field10) + if !ok { + that2, ok := that.(AllTypesOneOf_Field10) + 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.Field10 != that1.Field10 { + return false + } + return true +} +func (this *AllTypesOneOf_Field11) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*AllTypesOneOf_Field11) + if !ok { + that2, ok := that.(AllTypesOneOf_Field11) + 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.Field11 != that1.Field11 { + return false + } + return true +} +func (this *AllTypesOneOf_Field12) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*AllTypesOneOf_Field12) + if !ok { + that2, ok := that.(AllTypesOneOf_Field12) + 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.Field12 != that1.Field12 { + return false + } + return true +} +func (this *AllTypesOneOf_Field13) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*AllTypesOneOf_Field13) + if !ok { + that2, ok := that.(AllTypesOneOf_Field13) + 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.Field13 != that1.Field13 { + return false + } + return true +} +func (this *AllTypesOneOf_Field14) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*AllTypesOneOf_Field14) + if !ok { + that2, ok := that.(AllTypesOneOf_Field14) + 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.Field14 != that1.Field14 { + return false + } + return true +} +func (this *AllTypesOneOf_Field15) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*AllTypesOneOf_Field15) + if !ok { + that2, ok := that.(AllTypesOneOf_Field15) + 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.Field15, that1.Field15) { + return false + } + return true +} +func (this *AllTypesOneOf_SubMessage) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*AllTypesOneOf_SubMessage) + if !ok { + that2, ok := that.(AllTypesOneOf_SubMessage) + 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.SubMessage.Equal(that1.SubMessage) { + return false + } + return true +} +func (this *TwoOneofs) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*TwoOneofs) + if !ok { + that2, ok := that.(TwoOneofs) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *TwoOneofs") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *TwoOneofs but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *TwoOneofs but is not nil && this == nil") + } + if that1.One == nil { + if this.One != nil { + return fmt.Errorf("this.One != nil && that1.One == nil") + } + } else if this.One == nil { + return fmt.Errorf("this.One == nil && that1.One != nil") + } else if err := this.One.VerboseEqual(that1.One); err != nil { + return err + } + if that1.Two == nil { + if this.Two != nil { + return fmt.Errorf("this.Two != nil && that1.Two == nil") + } + } else if this.Two == nil { + return fmt.Errorf("this.Two == nil && that1.Two != nil") + } else if err := this.Two.VerboseEqual(that1.Two); err != nil { + return err + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *TwoOneofs_Field1) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*TwoOneofs_Field1) + if !ok { + that2, ok := that.(TwoOneofs_Field1) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *TwoOneofs_Field1") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *TwoOneofs_Field1 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *TwoOneofs_Field1 but is not nil && this == nil") + } + if this.Field1 != that1.Field1 { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) + } + return nil +} +func (this *TwoOneofs_Field2) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*TwoOneofs_Field2) + if !ok { + that2, ok := that.(TwoOneofs_Field2) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *TwoOneofs_Field2") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *TwoOneofs_Field2 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *TwoOneofs_Field2 but is not nil && this == nil") + } + if this.Field2 != that1.Field2 { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) + } + return nil +} +func (this *TwoOneofs_Field3) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*TwoOneofs_Field3) + if !ok { + that2, ok := that.(TwoOneofs_Field3) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *TwoOneofs_Field3") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *TwoOneofs_Field3 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *TwoOneofs_Field3 but is not nil && this == nil") + } + if this.Field3 != that1.Field3 { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", this.Field3, that1.Field3) + } + return nil +} +func (this *TwoOneofs_Field34) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*TwoOneofs_Field34) + if !ok { + that2, ok := that.(TwoOneofs_Field34) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *TwoOneofs_Field34") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *TwoOneofs_Field34 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *TwoOneofs_Field34 but is not nil && this == nil") + } + if this.Field34 != that1.Field34 { + return fmt.Errorf("Field34 this(%v) Not Equal that(%v)", this.Field34, that1.Field34) + } + return nil +} +func (this *TwoOneofs_Field35) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*TwoOneofs_Field35) + if !ok { + that2, ok := that.(TwoOneofs_Field35) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *TwoOneofs_Field35") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *TwoOneofs_Field35 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *TwoOneofs_Field35 but is not nil && this == nil") + } + if !bytes.Equal(this.Field35, that1.Field35) { + return fmt.Errorf("Field35 this(%v) Not Equal that(%v)", this.Field35, that1.Field35) + } + return nil +} +func (this *TwoOneofs_SubMessage2) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*TwoOneofs_SubMessage2) + if !ok { + that2, ok := that.(TwoOneofs_SubMessage2) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *TwoOneofs_SubMessage2") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *TwoOneofs_SubMessage2 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *TwoOneofs_SubMessage2 but is not nil && this == nil") + } + if !this.SubMessage2.Equal(that1.SubMessage2) { + return fmt.Errorf("SubMessage2 this(%v) Not Equal that(%v)", this.SubMessage2, that1.SubMessage2) + } + return nil +} +func (this *TwoOneofs) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*TwoOneofs) + if !ok { + that2, ok := that.(TwoOneofs) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + if this == nil { + return true + } + return false + } else if this == nil { + return false + } + if that1.One == nil { + if this.One != nil { + return false + } + } else if this.One == nil { + return false + } else if !this.One.Equal(that1.One) { + return false + } + if that1.Two == nil { + if this.Two != nil { + return false + } + } else if this.Two == nil { + return false + } else if !this.Two.Equal(that1.Two) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *TwoOneofs_Field1) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*TwoOneofs_Field1) + if !ok { + that2, ok := that.(TwoOneofs_Field1) + 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.Field1 != that1.Field1 { + return false + } + return true +} +func (this *TwoOneofs_Field2) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*TwoOneofs_Field2) + if !ok { + that2, ok := that.(TwoOneofs_Field2) + 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.Field2 != that1.Field2 { + return false + } + return true +} +func (this *TwoOneofs_Field3) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*TwoOneofs_Field3) + if !ok { + that2, ok := that.(TwoOneofs_Field3) + 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.Field3 != that1.Field3 { + return false + } + return true +} +func (this *TwoOneofs_Field34) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*TwoOneofs_Field34) + if !ok { + that2, ok := that.(TwoOneofs_Field34) + 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.Field34 != that1.Field34 { + return false + } + return true +} +func (this *TwoOneofs_Field35) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*TwoOneofs_Field35) + if !ok { + that2, ok := that.(TwoOneofs_Field35) + 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.Field35, that1.Field35) { + return false + } + return true +} +func (this *TwoOneofs_SubMessage2) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*TwoOneofs_SubMessage2) + if !ok { + that2, ok := that.(TwoOneofs_SubMessage2) + 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.SubMessage2.Equal(that1.SubMessage2) { + return false + } + return true +} +func (this *CustomOneof) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*CustomOneof) + if !ok { + that2, ok := that.(CustomOneof) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *CustomOneof") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *CustomOneof but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *CustomOneof but is not nil && this == nil") + } + if that1.Custom == nil { + if this.Custom != nil { + return fmt.Errorf("this.Custom != nil && that1.Custom == nil") + } + } else if this.Custom == nil { + return fmt.Errorf("this.Custom == nil && that1.Custom != nil") + } else if err := this.Custom.VerboseEqual(that1.Custom); err != nil { + return err + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *CustomOneof_Stringy) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*CustomOneof_Stringy) + if !ok { + that2, ok := that.(CustomOneof_Stringy) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *CustomOneof_Stringy") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *CustomOneof_Stringy but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *CustomOneof_Stringy but is not nil && this == nil") + } + if this.Stringy != that1.Stringy { + return fmt.Errorf("Stringy this(%v) Not Equal that(%v)", this.Stringy, that1.Stringy) + } + return nil +} +func (this *CustomOneof_CustomType) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*CustomOneof_CustomType) + if !ok { + that2, ok := that.(CustomOneof_CustomType) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *CustomOneof_CustomType") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *CustomOneof_CustomType but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *CustomOneof_CustomType but is not nil && this == nil") + } + if !this.CustomType.Equal(that1.CustomType) { + return fmt.Errorf("CustomType this(%v) Not Equal that(%v)", this.CustomType, that1.CustomType) + } + return nil +} +func (this *CustomOneof_CastType) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*CustomOneof_CastType) + if !ok { + that2, ok := that.(CustomOneof_CastType) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *CustomOneof_CastType") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *CustomOneof_CastType but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *CustomOneof_CastType but is not nil && this == nil") + } + if this.CastType != that1.CastType { + return fmt.Errorf("CastType this(%v) Not Equal that(%v)", this.CastType, that1.CastType) + } + return nil +} +func (this *CustomOneof_MyCustomName) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*CustomOneof_MyCustomName) + if !ok { + that2, ok := that.(CustomOneof_MyCustomName) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *CustomOneof_MyCustomName") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *CustomOneof_MyCustomName but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *CustomOneof_MyCustomName but is not nil && this == nil") + } + if this.MyCustomName != that1.MyCustomName { + return fmt.Errorf("MyCustomName this(%v) Not Equal that(%v)", this.MyCustomName, that1.MyCustomName) + } + return nil +} +func (this *CustomOneof) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*CustomOneof) + if !ok { + that2, ok := that.(CustomOneof) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + if this == nil { + return true + } + return false + } else if this == nil { + return false + } + if that1.Custom == nil { + if this.Custom != nil { + return false + } + } else if this.Custom == nil { + return false + } else if !this.Custom.Equal(that1.Custom) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *CustomOneof_Stringy) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*CustomOneof_Stringy) + if !ok { + that2, ok := that.(CustomOneof_Stringy) + 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.Stringy != that1.Stringy { + return false + } + return true +} +func (this *CustomOneof_CustomType) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*CustomOneof_CustomType) + if !ok { + that2, ok := that.(CustomOneof_CustomType) + 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.CustomType.Equal(that1.CustomType) { + return false + } + return true +} +func (this *CustomOneof_CastType) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*CustomOneof_CastType) + if !ok { + that2, ok := that.(CustomOneof_CastType) + 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.CastType != that1.CastType { + return false + } + return true +} +func (this *CustomOneof_MyCustomName) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*CustomOneof_MyCustomName) + if !ok { + that2, ok := that.(CustomOneof_MyCustomName) + 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.MyCustomName != that1.MyCustomName { + return false + } + return true +} +func (this *Subby) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&one.Subby{") + if this.Sub != nil { + s = append(s, "Sub: "+valueToGoStringOne(this.Sub, "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 *AllTypesOneOf) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 20) + s = append(s, "&one.AllTypesOneOf{") + if this.TestOneof != nil { + s = append(s, "TestOneof: "+fmt.Sprintf("%#v", this.TestOneof)+",\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 *AllTypesOneOf_Field1) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.AllTypesOneOf_Field1{` + + `Field1:` + fmt.Sprintf("%#v", this.Field1) + `}`}, ", ") + return s +} +func (this *AllTypesOneOf_Field2) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.AllTypesOneOf_Field2{` + + `Field2:` + fmt.Sprintf("%#v", this.Field2) + `}`}, ", ") + return s +} +func (this *AllTypesOneOf_Field3) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.AllTypesOneOf_Field3{` + + `Field3:` + fmt.Sprintf("%#v", this.Field3) + `}`}, ", ") + return s +} +func (this *AllTypesOneOf_Field4) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.AllTypesOneOf_Field4{` + + `Field4:` + fmt.Sprintf("%#v", this.Field4) + `}`}, ", ") + return s +} +func (this *AllTypesOneOf_Field5) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.AllTypesOneOf_Field5{` + + `Field5:` + fmt.Sprintf("%#v", this.Field5) + `}`}, ", ") + return s +} +func (this *AllTypesOneOf_Field6) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.AllTypesOneOf_Field6{` + + `Field6:` + fmt.Sprintf("%#v", this.Field6) + `}`}, ", ") + return s +} +func (this *AllTypesOneOf_Field7) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.AllTypesOneOf_Field7{` + + `Field7:` + fmt.Sprintf("%#v", this.Field7) + `}`}, ", ") + return s +} +func (this *AllTypesOneOf_Field8) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.AllTypesOneOf_Field8{` + + `Field8:` + fmt.Sprintf("%#v", this.Field8) + `}`}, ", ") + return s +} +func (this *AllTypesOneOf_Field9) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.AllTypesOneOf_Field9{` + + `Field9:` + fmt.Sprintf("%#v", this.Field9) + `}`}, ", ") + return s +} +func (this *AllTypesOneOf_Field10) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.AllTypesOneOf_Field10{` + + `Field10:` + fmt.Sprintf("%#v", this.Field10) + `}`}, ", ") + return s +} +func (this *AllTypesOneOf_Field11) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.AllTypesOneOf_Field11{` + + `Field11:` + fmt.Sprintf("%#v", this.Field11) + `}`}, ", ") + return s +} +func (this *AllTypesOneOf_Field12) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.AllTypesOneOf_Field12{` + + `Field12:` + fmt.Sprintf("%#v", this.Field12) + `}`}, ", ") + return s +} +func (this *AllTypesOneOf_Field13) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.AllTypesOneOf_Field13{` + + `Field13:` + fmt.Sprintf("%#v", this.Field13) + `}`}, ", ") + return s +} +func (this *AllTypesOneOf_Field14) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.AllTypesOneOf_Field14{` + + `Field14:` + fmt.Sprintf("%#v", this.Field14) + `}`}, ", ") + return s +} +func (this *AllTypesOneOf_Field15) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.AllTypesOneOf_Field15{` + + `Field15:` + fmt.Sprintf("%#v", this.Field15) + `}`}, ", ") + return s +} +func (this *AllTypesOneOf_SubMessage) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.AllTypesOneOf_SubMessage{` + + `SubMessage:` + fmt.Sprintf("%#v", this.SubMessage) + `}`}, ", ") + return s +} +func (this *TwoOneofs) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 10) + s = append(s, "&one.TwoOneofs{") + if this.One != nil { + s = append(s, "One: "+fmt.Sprintf("%#v", this.One)+",\n") + } + if this.Two != nil { + s = append(s, "Two: "+fmt.Sprintf("%#v", this.Two)+",\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 *TwoOneofs_Field1) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.TwoOneofs_Field1{` + + `Field1:` + fmt.Sprintf("%#v", this.Field1) + `}`}, ", ") + return s +} +func (this *TwoOneofs_Field2) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.TwoOneofs_Field2{` + + `Field2:` + fmt.Sprintf("%#v", this.Field2) + `}`}, ", ") + return s +} +func (this *TwoOneofs_Field3) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.TwoOneofs_Field3{` + + `Field3:` + fmt.Sprintf("%#v", this.Field3) + `}`}, ", ") + return s +} +func (this *TwoOneofs_Field34) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.TwoOneofs_Field34{` + + `Field34:` + fmt.Sprintf("%#v", this.Field34) + `}`}, ", ") + return s +} +func (this *TwoOneofs_Field35) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.TwoOneofs_Field35{` + + `Field35:` + fmt.Sprintf("%#v", this.Field35) + `}`}, ", ") + return s +} +func (this *TwoOneofs_SubMessage2) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.TwoOneofs_SubMessage2{` + + `SubMessage2:` + fmt.Sprintf("%#v", this.SubMessage2) + `}`}, ", ") + return s +} +func (this *CustomOneof) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 8) + s = append(s, "&one.CustomOneof{") + if this.Custom != nil { + s = append(s, "Custom: "+fmt.Sprintf("%#v", this.Custom)+",\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 *CustomOneof_Stringy) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.CustomOneof_Stringy{` + + `Stringy:` + fmt.Sprintf("%#v", this.Stringy) + `}`}, ", ") + return s +} +func (this *CustomOneof_CustomType) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.CustomOneof_CustomType{` + + `CustomType:` + fmt.Sprintf("%#v", this.CustomType) + `}`}, ", ") + return s +} +func (this *CustomOneof_CastType) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.CustomOneof_CastType{` + + `CastType:` + fmt.Sprintf("%#v", this.CastType) + `}`}, ", ") + return s +} +func (this *CustomOneof_MyCustomName) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.CustomOneof_MyCustomName{` + + `MyCustomName:` + fmt.Sprintf("%#v", this.MyCustomName) + `}`}, ", ") + return s +} +func valueToGoStringOne(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 extensionToGoStringOne(e map[int32]github_com_gogo_protobuf_proto.Extension) string { + if e == nil { + return "nil" + } + s := "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 +} +func NewPopulatedSubby(r randyOne, easy bool) *Subby { + this := &Subby{} + if r.Intn(10) != 0 { + v1 := randStringOne(r) + this.Sub = &v1 + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedOne(r, 2) + } + return this +} + +func NewPopulatedAllTypesOneOf(r randyOne, easy bool) *AllTypesOneOf { + this := &AllTypesOneOf{} + oneofNumber_TestOneof := []int32{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}[r.Intn(16)] + switch oneofNumber_TestOneof { + case 1: + this.TestOneof = NewPopulatedAllTypesOneOf_Field1(r, easy) + case 2: + this.TestOneof = NewPopulatedAllTypesOneOf_Field2(r, easy) + case 3: + this.TestOneof = NewPopulatedAllTypesOneOf_Field3(r, easy) + case 4: + this.TestOneof = NewPopulatedAllTypesOneOf_Field4(r, easy) + case 5: + this.TestOneof = NewPopulatedAllTypesOneOf_Field5(r, easy) + case 6: + this.TestOneof = NewPopulatedAllTypesOneOf_Field6(r, easy) + case 7: + this.TestOneof = NewPopulatedAllTypesOneOf_Field7(r, easy) + case 8: + this.TestOneof = NewPopulatedAllTypesOneOf_Field8(r, easy) + case 9: + this.TestOneof = NewPopulatedAllTypesOneOf_Field9(r, easy) + case 10: + this.TestOneof = NewPopulatedAllTypesOneOf_Field10(r, easy) + case 11: + this.TestOneof = NewPopulatedAllTypesOneOf_Field11(r, easy) + case 12: + this.TestOneof = NewPopulatedAllTypesOneOf_Field12(r, easy) + case 13: + this.TestOneof = NewPopulatedAllTypesOneOf_Field13(r, easy) + case 14: + this.TestOneof = NewPopulatedAllTypesOneOf_Field14(r, easy) + case 15: + this.TestOneof = NewPopulatedAllTypesOneOf_Field15(r, easy) + case 16: + this.TestOneof = NewPopulatedAllTypesOneOf_SubMessage(r, easy) + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedOne(r, 17) + } + return this +} + +func NewPopulatedAllTypesOneOf_Field1(r randyOne, easy bool) *AllTypesOneOf_Field1 { + this := &AllTypesOneOf_Field1{} + this.Field1 = float64(r.Float64()) + if r.Intn(2) == 0 { + this.Field1 *= -1 + } + return this +} +func NewPopulatedAllTypesOneOf_Field2(r randyOne, easy bool) *AllTypesOneOf_Field2 { + this := &AllTypesOneOf_Field2{} + this.Field2 = float32(r.Float32()) + if r.Intn(2) == 0 { + this.Field2 *= -1 + } + return this +} +func NewPopulatedAllTypesOneOf_Field3(r randyOne, easy bool) *AllTypesOneOf_Field3 { + this := &AllTypesOneOf_Field3{} + this.Field3 = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Field3 *= -1 + } + return this +} +func NewPopulatedAllTypesOneOf_Field4(r randyOne, easy bool) *AllTypesOneOf_Field4 { + this := &AllTypesOneOf_Field4{} + this.Field4 = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Field4 *= -1 + } + return this +} +func NewPopulatedAllTypesOneOf_Field5(r randyOne, easy bool) *AllTypesOneOf_Field5 { + this := &AllTypesOneOf_Field5{} + this.Field5 = uint32(r.Uint32()) + return this +} +func NewPopulatedAllTypesOneOf_Field6(r randyOne, easy bool) *AllTypesOneOf_Field6 { + this := &AllTypesOneOf_Field6{} + this.Field6 = uint64(uint64(r.Uint32())) + return this +} +func NewPopulatedAllTypesOneOf_Field7(r randyOne, easy bool) *AllTypesOneOf_Field7 { + this := &AllTypesOneOf_Field7{} + this.Field7 = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Field7 *= -1 + } + return this +} +func NewPopulatedAllTypesOneOf_Field8(r randyOne, easy bool) *AllTypesOneOf_Field8 { + this := &AllTypesOneOf_Field8{} + this.Field8 = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Field8 *= -1 + } + return this +} +func NewPopulatedAllTypesOneOf_Field9(r randyOne, easy bool) *AllTypesOneOf_Field9 { + this := &AllTypesOneOf_Field9{} + this.Field9 = uint32(r.Uint32()) + return this +} +func NewPopulatedAllTypesOneOf_Field10(r randyOne, easy bool) *AllTypesOneOf_Field10 { + this := &AllTypesOneOf_Field10{} + this.Field10 = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Field10 *= -1 + } + return this +} +func NewPopulatedAllTypesOneOf_Field11(r randyOne, easy bool) *AllTypesOneOf_Field11 { + this := &AllTypesOneOf_Field11{} + this.Field11 = uint64(uint64(r.Uint32())) + return this +} +func NewPopulatedAllTypesOneOf_Field12(r randyOne, easy bool) *AllTypesOneOf_Field12 { + this := &AllTypesOneOf_Field12{} + this.Field12 = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Field12 *= -1 + } + return this +} +func NewPopulatedAllTypesOneOf_Field13(r randyOne, easy bool) *AllTypesOneOf_Field13 { + this := &AllTypesOneOf_Field13{} + this.Field13 = bool(bool(r.Intn(2) == 0)) + return this +} +func NewPopulatedAllTypesOneOf_Field14(r randyOne, easy bool) *AllTypesOneOf_Field14 { + this := &AllTypesOneOf_Field14{} + this.Field14 = randStringOne(r) + return this +} +func NewPopulatedAllTypesOneOf_Field15(r randyOne, easy bool) *AllTypesOneOf_Field15 { + this := &AllTypesOneOf_Field15{} + v2 := r.Intn(100) + this.Field15 = make([]byte, v2) + for i := 0; i < v2; i++ { + this.Field15[i] = byte(r.Intn(256)) + } + return this +} +func NewPopulatedAllTypesOneOf_SubMessage(r randyOne, easy bool) *AllTypesOneOf_SubMessage { + this := &AllTypesOneOf_SubMessage{} + this.SubMessage = NewPopulatedSubby(r, easy) + return this +} +func NewPopulatedTwoOneofs(r randyOne, easy bool) *TwoOneofs { + this := &TwoOneofs{} + oneofNumber_One := []int32{1, 2, 3}[r.Intn(3)] + switch oneofNumber_One { + case 1: + this.One = NewPopulatedTwoOneofs_Field1(r, easy) + case 2: + this.One = NewPopulatedTwoOneofs_Field2(r, easy) + case 3: + this.One = NewPopulatedTwoOneofs_Field3(r, easy) + } + oneofNumber_Two := []int32{34, 35, 36}[r.Intn(3)] + switch oneofNumber_Two { + case 34: + this.Two = NewPopulatedTwoOneofs_Field34(r, easy) + case 35: + this.Two = NewPopulatedTwoOneofs_Field35(r, easy) + case 36: + this.Two = NewPopulatedTwoOneofs_SubMessage2(r, easy) + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedOne(r, 37) + } + return this +} + +func NewPopulatedTwoOneofs_Field1(r randyOne, easy bool) *TwoOneofs_Field1 { + this := &TwoOneofs_Field1{} + this.Field1 = float64(r.Float64()) + if r.Intn(2) == 0 { + this.Field1 *= -1 + } + return this +} +func NewPopulatedTwoOneofs_Field2(r randyOne, easy bool) *TwoOneofs_Field2 { + this := &TwoOneofs_Field2{} + this.Field2 = float32(r.Float32()) + if r.Intn(2) == 0 { + this.Field2 *= -1 + } + return this +} +func NewPopulatedTwoOneofs_Field3(r randyOne, easy bool) *TwoOneofs_Field3 { + this := &TwoOneofs_Field3{} + this.Field3 = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Field3 *= -1 + } + return this +} +func NewPopulatedTwoOneofs_Field34(r randyOne, easy bool) *TwoOneofs_Field34 { + this := &TwoOneofs_Field34{} + this.Field34 = randStringOne(r) + return this +} +func NewPopulatedTwoOneofs_Field35(r randyOne, easy bool) *TwoOneofs_Field35 { + this := &TwoOneofs_Field35{} + v3 := r.Intn(100) + this.Field35 = make([]byte, v3) + for i := 0; i < v3; i++ { + this.Field35[i] = byte(r.Intn(256)) + } + return this +} +func NewPopulatedTwoOneofs_SubMessage2(r randyOne, easy bool) *TwoOneofs_SubMessage2 { + this := &TwoOneofs_SubMessage2{} + this.SubMessage2 = NewPopulatedSubby(r, easy) + return this +} +func NewPopulatedCustomOneof(r randyOne, easy bool) *CustomOneof { + this := &CustomOneof{} + oneofNumber_Custom := []int32{34, 35, 36, 37}[r.Intn(4)] + switch oneofNumber_Custom { + case 34: + this.Custom = NewPopulatedCustomOneof_Stringy(r, easy) + case 35: + this.Custom = NewPopulatedCustomOneof_CustomType(r, easy) + case 36: + this.Custom = NewPopulatedCustomOneof_CastType(r, easy) + case 37: + this.Custom = NewPopulatedCustomOneof_MyCustomName(r, easy) + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedOne(r, 38) + } + return this +} + +func NewPopulatedCustomOneof_Stringy(r randyOne, easy bool) *CustomOneof_Stringy { + this := &CustomOneof_Stringy{} + this.Stringy = randStringOne(r) + return this +} +func NewPopulatedCustomOneof_CustomType(r randyOne, easy bool) *CustomOneof_CustomType { + this := &CustomOneof_CustomType{} + v4 := github_com_gogo_protobuf_test_custom.NewPopulatedUint128(r) + this.CustomType = *v4 + return this +} +func NewPopulatedCustomOneof_CastType(r randyOne, easy bool) *CustomOneof_CastType { + this := &CustomOneof_CastType{} + this.CastType = github_com_gogo_protobuf_test_casttype.MyUint64Type(uint64(r.Uint32())) + return this +} +func NewPopulatedCustomOneof_MyCustomName(r randyOne, easy bool) *CustomOneof_MyCustomName { + this := &CustomOneof_MyCustomName{} + this.MyCustomName = int64(r.Int63()) + if r.Intn(2) == 0 { + this.MyCustomName *= -1 + } + return this +} + +type randyOne interface { + Float32() float32 + Float64() float64 + Int63() int64 + Int31() int32 + Uint32() uint32 + Intn(n int) int +} + +func randUTF8RuneOne(r randyOne) 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 randStringOne(r randyOne) string { + v5 := r.Intn(100) + tmps := make([]rune, v5) + for i := 0; i < v5; i++ { + tmps[i] = randUTF8RuneOne(r) + } + return string(tmps) +} +func randUnrecognizedOne(r randyOne, 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 = randFieldOne(data, r, fieldNumber, wire) + } + return data +} +func randFieldOne(data []byte, r randyOne, fieldNumber int, wire int) []byte { + key := uint32(fieldNumber)<<3 | uint32(wire) + switch wire { + case 0: + data = encodeVarintPopulateOne(data, uint64(key)) + v6 := r.Int63() + if r.Intn(2) == 0 { + v6 *= -1 + } + data = encodeVarintPopulateOne(data, uint64(v6)) + case 1: + data = encodeVarintPopulateOne(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 = encodeVarintPopulateOne(data, uint64(key)) + ll := r.Intn(100) + data = encodeVarintPopulateOne(data, uint64(ll)) + for j := 0; j < ll; j++ { + data = append(data, byte(r.Intn(256))) + } + default: + data = encodeVarintPopulateOne(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 encodeVarintPopulateOne(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 *Subby) Size() (n int) { + var l int + _ = l + if m.Sub != nil { + l = len(*m.Sub) + n += 1 + l + sovOne(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *AllTypesOneOf) Size() (n int) { + var l int + _ = l + if m.TestOneof != nil { + n += m.TestOneof.Size() + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *AllTypesOneOf_Field1) Size() (n int) { + var l int + _ = l + n += 9 + return n +} +func (m *AllTypesOneOf_Field2) Size() (n int) { + var l int + _ = l + n += 5 + return n +} +func (m *AllTypesOneOf_Field3) Size() (n int) { + var l int + _ = l + n += 1 + sovOne(uint64(m.Field3)) + return n +} +func (m *AllTypesOneOf_Field4) Size() (n int) { + var l int + _ = l + n += 1 + sovOne(uint64(m.Field4)) + return n +} +func (m *AllTypesOneOf_Field5) Size() (n int) { + var l int + _ = l + n += 1 + sovOne(uint64(m.Field5)) + return n +} +func (m *AllTypesOneOf_Field6) Size() (n int) { + var l int + _ = l + n += 1 + sovOne(uint64(m.Field6)) + return n +} +func (m *AllTypesOneOf_Field7) Size() (n int) { + var l int + _ = l + n += 1 + sozOne(uint64(m.Field7)) + return n +} +func (m *AllTypesOneOf_Field8) Size() (n int) { + var l int + _ = l + n += 1 + sozOne(uint64(m.Field8)) + return n +} +func (m *AllTypesOneOf_Field9) Size() (n int) { + var l int + _ = l + n += 5 + return n +} +func (m *AllTypesOneOf_Field10) Size() (n int) { + var l int + _ = l + n += 5 + return n +} +func (m *AllTypesOneOf_Field11) Size() (n int) { + var l int + _ = l + n += 9 + return n +} +func (m *AllTypesOneOf_Field12) Size() (n int) { + var l int + _ = l + n += 9 + return n +} +func (m *AllTypesOneOf_Field13) Size() (n int) { + var l int + _ = l + n += 2 + return n +} +func (m *AllTypesOneOf_Field14) Size() (n int) { + var l int + _ = l + l = len(m.Field14) + n += 1 + l + sovOne(uint64(l)) + return n +} +func (m *AllTypesOneOf_Field15) Size() (n int) { + var l int + _ = l + if m.Field15 != nil { + l = len(m.Field15) + n += 1 + l + sovOne(uint64(l)) + } + return n +} +func (m *AllTypesOneOf_SubMessage) Size() (n int) { + var l int + _ = l + if m.SubMessage != nil { + l = m.SubMessage.Size() + n += 2 + l + sovOne(uint64(l)) + } + return n +} +func (m *TwoOneofs) Size() (n int) { + var l int + _ = l + if m.One != nil { + n += m.One.Size() + } + if m.Two != nil { + n += m.Two.Size() + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *TwoOneofs_Field1) Size() (n int) { + var l int + _ = l + n += 9 + return n +} +func (m *TwoOneofs_Field2) Size() (n int) { + var l int + _ = l + n += 5 + return n +} +func (m *TwoOneofs_Field3) Size() (n int) { + var l int + _ = l + n += 1 + sovOne(uint64(m.Field3)) + return n +} +func (m *TwoOneofs_Field34) Size() (n int) { + var l int + _ = l + l = len(m.Field34) + n += 2 + l + sovOne(uint64(l)) + return n +} +func (m *TwoOneofs_Field35) Size() (n int) { + var l int + _ = l + if m.Field35 != nil { + l = len(m.Field35) + n += 2 + l + sovOne(uint64(l)) + } + return n +} +func (m *TwoOneofs_SubMessage2) Size() (n int) { + var l int + _ = l + if m.SubMessage2 != nil { + l = m.SubMessage2.Size() + n += 2 + l + sovOne(uint64(l)) + } + return n +} +func (m *CustomOneof) Size() (n int) { + var l int + _ = l + if m.Custom != nil { + n += m.Custom.Size() + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *CustomOneof_Stringy) Size() (n int) { + var l int + _ = l + l = len(m.Stringy) + n += 2 + l + sovOne(uint64(l)) + return n +} +func (m *CustomOneof_CustomType) Size() (n int) { + var l int + _ = l + l = m.CustomType.Size() + n += 2 + l + sovOne(uint64(l)) + return n +} +func (m *CustomOneof_CastType) Size() (n int) { + var l int + _ = l + n += 2 + sovOne(uint64(m.CastType)) + return n +} +func (m *CustomOneof_MyCustomName) Size() (n int) { + var l int + _ = l + n += 2 + sovOne(uint64(m.MyCustomName)) + return n +} + +func sovOne(x uint64) (n int) { + for { + n++ + x >>= 7 + if x == 0 { + break + } + } + return n +} +func sozOne(x uint64) (n int) { + return sovOne(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (this *Subby) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&Subby{`, + `Sub:` + valueToStringOne(this.Sub) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *AllTypesOneOf) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&AllTypesOneOf{`, + `TestOneof:` + fmt.Sprintf("%v", this.TestOneof) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *AllTypesOneOf_Field1) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&AllTypesOneOf_Field1{`, + `Field1:` + fmt.Sprintf("%v", this.Field1) + `,`, + `}`, + }, "") + return s +} +func (this *AllTypesOneOf_Field2) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&AllTypesOneOf_Field2{`, + `Field2:` + fmt.Sprintf("%v", this.Field2) + `,`, + `}`, + }, "") + return s +} +func (this *AllTypesOneOf_Field3) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&AllTypesOneOf_Field3{`, + `Field3:` + fmt.Sprintf("%v", this.Field3) + `,`, + `}`, + }, "") + return s +} +func (this *AllTypesOneOf_Field4) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&AllTypesOneOf_Field4{`, + `Field4:` + fmt.Sprintf("%v", this.Field4) + `,`, + `}`, + }, "") + return s +} +func (this *AllTypesOneOf_Field5) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&AllTypesOneOf_Field5{`, + `Field5:` + fmt.Sprintf("%v", this.Field5) + `,`, + `}`, + }, "") + return s +} +func (this *AllTypesOneOf_Field6) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&AllTypesOneOf_Field6{`, + `Field6:` + fmt.Sprintf("%v", this.Field6) + `,`, + `}`, + }, "") + return s +} +func (this *AllTypesOneOf_Field7) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&AllTypesOneOf_Field7{`, + `Field7:` + fmt.Sprintf("%v", this.Field7) + `,`, + `}`, + }, "") + return s +} +func (this *AllTypesOneOf_Field8) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&AllTypesOneOf_Field8{`, + `Field8:` + fmt.Sprintf("%v", this.Field8) + `,`, + `}`, + }, "") + return s +} +func (this *AllTypesOneOf_Field9) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&AllTypesOneOf_Field9{`, + `Field9:` + fmt.Sprintf("%v", this.Field9) + `,`, + `}`, + }, "") + return s +} +func (this *AllTypesOneOf_Field10) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&AllTypesOneOf_Field10{`, + `Field10:` + fmt.Sprintf("%v", this.Field10) + `,`, + `}`, + }, "") + return s +} +func (this *AllTypesOneOf_Field11) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&AllTypesOneOf_Field11{`, + `Field11:` + fmt.Sprintf("%v", this.Field11) + `,`, + `}`, + }, "") + return s +} +func (this *AllTypesOneOf_Field12) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&AllTypesOneOf_Field12{`, + `Field12:` + fmt.Sprintf("%v", this.Field12) + `,`, + `}`, + }, "") + return s +} +func (this *AllTypesOneOf_Field13) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&AllTypesOneOf_Field13{`, + `Field13:` + fmt.Sprintf("%v", this.Field13) + `,`, + `}`, + }, "") + return s +} +func (this *AllTypesOneOf_Field14) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&AllTypesOneOf_Field14{`, + `Field14:` + fmt.Sprintf("%v", this.Field14) + `,`, + `}`, + }, "") + return s +} +func (this *AllTypesOneOf_Field15) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&AllTypesOneOf_Field15{`, + `Field15:` + fmt.Sprintf("%v", this.Field15) + `,`, + `}`, + }, "") + return s +} +func (this *AllTypesOneOf_SubMessage) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&AllTypesOneOf_SubMessage{`, + `SubMessage:` + strings.Replace(fmt.Sprintf("%v", this.SubMessage), "Subby", "Subby", 1) + `,`, + `}`, + }, "") + return s +} +func (this *TwoOneofs) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&TwoOneofs{`, + `One:` + fmt.Sprintf("%v", this.One) + `,`, + `Two:` + fmt.Sprintf("%v", this.Two) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *TwoOneofs_Field1) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&TwoOneofs_Field1{`, + `Field1:` + fmt.Sprintf("%v", this.Field1) + `,`, + `}`, + }, "") + return s +} +func (this *TwoOneofs_Field2) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&TwoOneofs_Field2{`, + `Field2:` + fmt.Sprintf("%v", this.Field2) + `,`, + `}`, + }, "") + return s +} +func (this *TwoOneofs_Field3) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&TwoOneofs_Field3{`, + `Field3:` + fmt.Sprintf("%v", this.Field3) + `,`, + `}`, + }, "") + return s +} +func (this *TwoOneofs_Field34) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&TwoOneofs_Field34{`, + `Field34:` + fmt.Sprintf("%v", this.Field34) + `,`, + `}`, + }, "") + return s +} +func (this *TwoOneofs_Field35) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&TwoOneofs_Field35{`, + `Field35:` + fmt.Sprintf("%v", this.Field35) + `,`, + `}`, + }, "") + return s +} +func (this *TwoOneofs_SubMessage2) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&TwoOneofs_SubMessage2{`, + `SubMessage2:` + strings.Replace(fmt.Sprintf("%v", this.SubMessage2), "Subby", "Subby", 1) + `,`, + `}`, + }, "") + return s +} +func (this *CustomOneof) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&CustomOneof{`, + `Custom:` + fmt.Sprintf("%v", this.Custom) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *CustomOneof_Stringy) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&CustomOneof_Stringy{`, + `Stringy:` + fmt.Sprintf("%v", this.Stringy) + `,`, + `}`, + }, "") + return s +} +func (this *CustomOneof_CustomType) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&CustomOneof_CustomType{`, + `CustomType:` + fmt.Sprintf("%v", this.CustomType) + `,`, + `}`, + }, "") + return s +} +func (this *CustomOneof_CastType) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&CustomOneof_CastType{`, + `CastType:` + fmt.Sprintf("%v", this.CastType) + `,`, + `}`, + }, "") + return s +} +func (this *CustomOneof_MyCustomName) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&CustomOneof_MyCustomName{`, + `MyCustomName:` + fmt.Sprintf("%v", this.MyCustomName) + `,`, + `}`, + }, "") + return s +} +func valueToStringOne(v interface{}) string { + rv := reflect.ValueOf(v) + if rv.IsNil() { + return "nil" + } + pv := reflect.Indirect(rv).Interface() + return fmt.Sprintf("*%v", pv) +} +func (m *Subby) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *Subby) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Sub != nil { + data[i] = 0xa + i++ + i = encodeVarintOne(data, i, uint64(len(*m.Sub))) + i += copy(data[i:], *m.Sub) + } + if m.XXX_unrecognized != nil { + i += copy(data[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *AllTypesOneOf) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *AllTypesOneOf) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.TestOneof != nil { + nn1, err := m.TestOneof.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += nn1 + } + if m.XXX_unrecognized != nil { + i += copy(data[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *AllTypesOneOf_Field1) MarshalTo(data []byte) (int, error) { + i := 0 + data[i] = 0x9 + i++ + *(*float64)(unsafe.Pointer(&data[i])) = m.Field1 + i += 8 + return i, nil +} +func (m *AllTypesOneOf_Field2) MarshalTo(data []byte) (int, error) { + i := 0 + data[i] = 0x15 + i++ + *(*float32)(unsafe.Pointer(&data[i])) = m.Field2 + i += 4 + return i, nil +} +func (m *AllTypesOneOf_Field3) MarshalTo(data []byte) (int, error) { + i := 0 + data[i] = 0x18 + i++ + i = encodeVarintOne(data, i, uint64(m.Field3)) + return i, nil +} +func (m *AllTypesOneOf_Field4) MarshalTo(data []byte) (int, error) { + i := 0 + data[i] = 0x20 + i++ + i = encodeVarintOne(data, i, uint64(m.Field4)) + return i, nil +} +func (m *AllTypesOneOf_Field5) MarshalTo(data []byte) (int, error) { + i := 0 + data[i] = 0x28 + i++ + i = encodeVarintOne(data, i, uint64(m.Field5)) + return i, nil +} +func (m *AllTypesOneOf_Field6) MarshalTo(data []byte) (int, error) { + i := 0 + data[i] = 0x30 + i++ + i = encodeVarintOne(data, i, uint64(m.Field6)) + return i, nil +} +func (m *AllTypesOneOf_Field7) MarshalTo(data []byte) (int, error) { + i := 0 + data[i] = 0x38 + i++ + i = encodeVarintOne(data, i, uint64((uint32(m.Field7)<<1)^uint32((m.Field7>>31)))) + return i, nil +} +func (m *AllTypesOneOf_Field8) MarshalTo(data []byte) (int, error) { + i := 0 + data[i] = 0x40 + i++ + i = encodeVarintOne(data, i, uint64((uint64(m.Field8)<<1)^uint64((m.Field8>>63)))) + return i, nil +} +func (m *AllTypesOneOf_Field9) MarshalTo(data []byte) (int, error) { + i := 0 + data[i] = 0x4d + i++ + *(*uint32)(unsafe.Pointer(&data[i])) = m.Field9 + i += 4 + return i, nil +} +func (m *AllTypesOneOf_Field10) MarshalTo(data []byte) (int, error) { + i := 0 + data[i] = 0x55 + i++ + *(*int32)(unsafe.Pointer(&data[i])) = m.Field10 + i += 4 + return i, nil +} +func (m *AllTypesOneOf_Field11) MarshalTo(data []byte) (int, error) { + i := 0 + data[i] = 0x59 + i++ + *(*uint64)(unsafe.Pointer(&data[i])) = m.Field11 + i += 8 + return i, nil +} +func (m *AllTypesOneOf_Field12) MarshalTo(data []byte) (int, error) { + i := 0 + data[i] = 0x61 + i++ + *(*int64)(unsafe.Pointer(&data[i])) = m.Field12 + i += 8 + return i, nil +} +func (m *AllTypesOneOf_Field13) MarshalTo(data []byte) (int, error) { + i := 0 + data[i] = 0x68 + i++ + if m.Field13 { + data[i] = 1 + } else { + data[i] = 0 + } + i++ + return i, nil +} +func (m *AllTypesOneOf_Field14) MarshalTo(data []byte) (int, error) { + i := 0 + data[i] = 0x72 + i++ + i = encodeVarintOne(data, i, uint64(len(m.Field14))) + i += copy(data[i:], m.Field14) + return i, nil +} +func (m *AllTypesOneOf_Field15) MarshalTo(data []byte) (int, error) { + i := 0 + if m.Field15 != nil { + data[i] = 0x7a + i++ + i = encodeVarintOne(data, i, uint64(len(m.Field15))) + i += copy(data[i:], m.Field15) + } + return i, nil +} +func (m *AllTypesOneOf_SubMessage) MarshalTo(data []byte) (int, error) { + i := 0 + if m.SubMessage != nil { + data[i] = 0x82 + i++ + data[i] = 0x1 + i++ + i = encodeVarintOne(data, i, uint64(m.SubMessage.Size())) + n2, err := m.SubMessage.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n2 + } + return i, nil +} +func (m *TwoOneofs) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *TwoOneofs) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.One != nil { + nn3, err := m.One.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += nn3 + } + if m.Two != nil { + nn4, err := m.Two.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += nn4 + } + if m.XXX_unrecognized != nil { + i += copy(data[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *TwoOneofs_Field1) MarshalTo(data []byte) (int, error) { + i := 0 + data[i] = 0x9 + i++ + *(*float64)(unsafe.Pointer(&data[i])) = m.Field1 + i += 8 + return i, nil +} +func (m *TwoOneofs_Field2) MarshalTo(data []byte) (int, error) { + i := 0 + data[i] = 0x15 + i++ + *(*float32)(unsafe.Pointer(&data[i])) = m.Field2 + i += 4 + return i, nil +} +func (m *TwoOneofs_Field3) MarshalTo(data []byte) (int, error) { + i := 0 + data[i] = 0x18 + i++ + i = encodeVarintOne(data, i, uint64(m.Field3)) + return i, nil +} +func (m *TwoOneofs_Field34) MarshalTo(data []byte) (int, error) { + i := 0 + data[i] = 0x92 + i++ + data[i] = 0x2 + i++ + i = encodeVarintOne(data, i, uint64(len(m.Field34))) + i += copy(data[i:], m.Field34) + return i, nil +} +func (m *TwoOneofs_Field35) MarshalTo(data []byte) (int, error) { + i := 0 + if m.Field35 != nil { + data[i] = 0x9a + i++ + data[i] = 0x2 + i++ + i = encodeVarintOne(data, i, uint64(len(m.Field35))) + i += copy(data[i:], m.Field35) + } + return i, nil +} +func (m *TwoOneofs_SubMessage2) MarshalTo(data []byte) (int, error) { + i := 0 + if m.SubMessage2 != nil { + data[i] = 0xa2 + i++ + data[i] = 0x2 + i++ + i = encodeVarintOne(data, i, uint64(m.SubMessage2.Size())) + n5, err := m.SubMessage2.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n5 + } + return i, nil +} +func (m *CustomOneof) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *CustomOneof) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Custom != nil { + nn6, err := m.Custom.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += nn6 + } + if m.XXX_unrecognized != nil { + i += copy(data[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *CustomOneof_Stringy) MarshalTo(data []byte) (int, error) { + i := 0 + data[i] = 0x92 + i++ + data[i] = 0x2 + i++ + i = encodeVarintOne(data, i, uint64(len(m.Stringy))) + i += copy(data[i:], m.Stringy) + return i, nil +} +func (m *CustomOneof_CustomType) MarshalTo(data []byte) (int, error) { + i := 0 + data[i] = 0x9a + i++ + data[i] = 0x2 + i++ + i = encodeVarintOne(data, i, uint64(m.CustomType.Size())) + n7, err := m.CustomType.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n7 + return i, nil +} +func (m *CustomOneof_CastType) MarshalTo(data []byte) (int, error) { + i := 0 + data[i] = 0xa0 + i++ + data[i] = 0x2 + i++ + i = encodeVarintOne(data, i, uint64(m.CastType)) + return i, nil +} +func (m *CustomOneof_MyCustomName) MarshalTo(data []byte) (int, error) { + i := 0 + data[i] = 0xa8 + i++ + data[i] = 0x2 + i++ + i = encodeVarintOne(data, i, uint64(m.MyCustomName)) + return i, nil +} +func encodeFixed64One(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 encodeFixed32One(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 encodeVarintOne(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 (m *Subby) 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 ErrIntOverflowOneUnsafe + } + 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: Subby: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Subby: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Sub", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOneUnsafe + } + 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 ErrInvalidLengthOneUnsafe + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + s := string(data[iNdEx:postIndex]) + m.Sub = &s + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipOneUnsafe(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthOneUnsafe + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *AllTypesOneOf) 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 ErrIntOverflowOneUnsafe + } + 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: AllTypesOneOf: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: AllTypesOneOf: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) + } + var v float64 + if iNdEx+8 > l { + return io.ErrUnexpectedEOF + } + v = *(*float64)(unsafe.Pointer(&data[iNdEx])) + iNdEx += 8 + m.TestOneof = &AllTypesOneOf_Field1{v} + case 2: + if wireType != 5 { + return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType) + } + var v float32 + if iNdEx+4 > l { + return io.ErrUnexpectedEOF + } + v = *(*float32)(unsafe.Pointer(&data[iNdEx])) + iNdEx += 4 + m.TestOneof = &AllTypesOneOf_Field2{v} + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field3", wireType) + } + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOneUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.TestOneof = &AllTypesOneOf_Field3{v} + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field4", wireType) + } + var v int64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOneUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.TestOneof = &AllTypesOneOf_Field4{v} + case 5: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field5", wireType) + } + var v uint32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOneUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (uint32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.TestOneof = &AllTypesOneOf_Field5{v} + case 6: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field6", wireType) + } + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOneUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.TestOneof = &AllTypesOneOf_Field6{v} + case 7: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field7", wireType) + } + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOneUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + v = int32((uint32(v) >> 1) ^ uint32(((v&1)<<31)>>31)) + m.TestOneof = &AllTypesOneOf_Field7{v} + case 8: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field8", wireType) + } + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOneUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + v = (v >> 1) ^ uint64((int64(v&1)<<63)>>63) + m.TestOneof = &AllTypesOneOf_Field8{int64(v)} + case 9: + if wireType != 5 { + return fmt.Errorf("proto: wrong wireType = %d for field Field9", wireType) + } + var v uint32 + if iNdEx+4 > l { + return io.ErrUnexpectedEOF + } + v = *(*uint32)(unsafe.Pointer(&data[iNdEx])) + iNdEx += 4 + m.TestOneof = &AllTypesOneOf_Field9{v} + case 10: + if wireType != 5 { + return fmt.Errorf("proto: wrong wireType = %d for field Field10", wireType) + } + var v int32 + if iNdEx+4 > l { + return io.ErrUnexpectedEOF + } + v = *(*int32)(unsafe.Pointer(&data[iNdEx])) + iNdEx += 4 + m.TestOneof = &AllTypesOneOf_Field10{v} + case 11: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field Field11", wireType) + } + var v uint64 + if iNdEx+8 > l { + return io.ErrUnexpectedEOF + } + v = *(*uint64)(unsafe.Pointer(&data[iNdEx])) + iNdEx += 8 + m.TestOneof = &AllTypesOneOf_Field11{v} + case 12: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field Field12", wireType) + } + var v int64 + if iNdEx+8 > l { + return io.ErrUnexpectedEOF + } + v = *(*int64)(unsafe.Pointer(&data[iNdEx])) + iNdEx += 8 + m.TestOneof = &AllTypesOneOf_Field12{v} + case 13: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field13", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOneUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + b := bool(v != 0) + m.TestOneof = &AllTypesOneOf_Field13{b} + case 14: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field14", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOneUnsafe + } + 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 ErrInvalidLengthOneUnsafe + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.TestOneof = &AllTypesOneOf_Field14{string(data[iNdEx:postIndex])} + iNdEx = postIndex + case 15: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field15", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOneUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthOneUnsafe + } + postIndex := iNdEx + byteLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + v := make([]byte, postIndex-iNdEx) + copy(v, data[iNdEx:postIndex]) + m.TestOneof = &AllTypesOneOf_Field15{v} + iNdEx = postIndex + case 16: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SubMessage", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOneUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthOneUnsafe + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + v := &Subby{} + if err := v.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + m.TestOneof = &AllTypesOneOf_SubMessage{v} + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipOneUnsafe(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthOneUnsafe + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *TwoOneofs) 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 ErrIntOverflowOneUnsafe + } + 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: TwoOneofs: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: TwoOneofs: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) + } + var v float64 + if iNdEx+8 > l { + return io.ErrUnexpectedEOF + } + v = *(*float64)(unsafe.Pointer(&data[iNdEx])) + iNdEx += 8 + m.One = &TwoOneofs_Field1{v} + case 2: + if wireType != 5 { + return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType) + } + var v float32 + if iNdEx+4 > l { + return io.ErrUnexpectedEOF + } + v = *(*float32)(unsafe.Pointer(&data[iNdEx])) + iNdEx += 4 + m.One = &TwoOneofs_Field2{v} + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field3", wireType) + } + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOneUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.One = &TwoOneofs_Field3{v} + case 34: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field34", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOneUnsafe + } + 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 ErrInvalidLengthOneUnsafe + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Two = &TwoOneofs_Field34{string(data[iNdEx:postIndex])} + iNdEx = postIndex + case 35: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field35", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOneUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthOneUnsafe + } + postIndex := iNdEx + byteLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + v := make([]byte, postIndex-iNdEx) + copy(v, data[iNdEx:postIndex]) + m.Two = &TwoOneofs_Field35{v} + iNdEx = postIndex + case 36: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SubMessage2", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOneUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthOneUnsafe + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + v := &Subby{} + if err := v.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + m.Two = &TwoOneofs_SubMessage2{v} + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipOneUnsafe(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthOneUnsafe + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *CustomOneof) 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 ErrIntOverflowOneUnsafe + } + 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: CustomOneof: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: CustomOneof: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 34: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Stringy", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOneUnsafe + } + 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 ErrInvalidLengthOneUnsafe + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Custom = &CustomOneof_Stringy{string(data[iNdEx:postIndex])} + iNdEx = postIndex + case 35: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field CustomType", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOneUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthOneUnsafe + } + postIndex := iNdEx + byteLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var vv github_com_gogo_protobuf_test_custom.Uint128 + v := &vv + if err := v.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + m.Custom = &CustomOneof_CustomType{*v} + iNdEx = postIndex + case 36: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field CastType", wireType) + } + var v github_com_gogo_protobuf_test_casttype.MyUint64Type + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOneUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (github_com_gogo_protobuf_test_casttype.MyUint64Type(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Custom = &CustomOneof_CastType{v} + case 37: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field MyCustomName", wireType) + } + var v int64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOneUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Custom = &CustomOneof_MyCustomName{v} + default: + iNdEx = preIndex + skippy, err := skipOneUnsafe(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthOneUnsafe + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipOneUnsafe(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, ErrIntOverflowOneUnsafe + } + 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, ErrIntOverflowOneUnsafe + } + 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, ErrIntOverflowOneUnsafe + } + 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, ErrInvalidLengthOneUnsafe + } + return iNdEx, nil + case 3: + for { + var innerWire uint64 + var start int = iNdEx + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowOneUnsafe + } + 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 := skipOneUnsafe(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 ( + ErrInvalidLengthOneUnsafe = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowOneUnsafe = fmt.Errorf("proto: integer overflow") +) + +var fileDescriptorOne = []byte{ + // 576 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xac, 0xd3, 0x3f, 0x6f, 0x1a, 0x31, + 0x14, 0x00, 0xf0, 0x1c, 0xff, 0x31, 0xd0, 0xd0, 0x9b, 0x5e, 0x53, 0x09, 0x2a, 0xda, 0x4a, 0x1d, + 0x1a, 0x0e, 0xee, 0x0f, 0x90, 0xb1, 0x97, 0xaa, 0xea, 0x42, 0x91, 0x48, 0x32, 0x47, 0x1c, 0x3d, + 0x08, 0x12, 0xe0, 0x28, 0xf6, 0x29, 0xba, 0x2d, 0x9f, 0xa1, 0x9f, 0xa2, 0x63, 0xc7, 0x7e, 0x84, + 0x8c, 0x19, 0xab, 0x0e, 0x28, 0xa1, 0x4b, 0xc7, 0x8c, 0x51, 0xa7, 0x3e, 0xfb, 0x88, 0x5d, 0xa9, + 0xaa, 0xba, 0x64, 0x78, 0x3a, 0x9b, 0x9f, 0xfd, 0x78, 0xef, 0xec, 0x23, 0x4f, 0xc7, 0x74, 0x11, + 0x50, 0x66, 0x45, 0x4b, 0x36, 0x9a, 0x84, 0x01, 0xe5, 0x27, 0x16, 0x5d, 0x86,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x0e, 0x8e, 0x3b, 0x9a, 0xfd, 0x58, 0x64, + 0xed, 0xb8, 0x62, 0x3b, 0x26, 0x2e, 0x8c, 0x37, 0xa9, 0x4c, 0xfb, 0xbe, 0xd4, 0x0f, 0xa3, 0x45, + 0x08, 0x2f, 0xc5, 0xe7, 0xe2, 0x57, 0xd7, 0xab, 0x7a, 0xb9, 0x1f, 0xeb, 0xdf, 0x75, 0x29, 0x62, + 0xe6, 0x17, 0x48, 0x2e, 0x99, 0xf9, 0x6f, 0x2f, 0x6f, 0x6a, 0x5b, 0x57, 0x18, 0xdf, 0x30, 0xae, + 0x6f, 0x6a, 0xc6, 0x2d, 0xc6, 0x1d, 0xc6, 0xc5, 0xba, 0x66, 0x7c, 0xc6, 0xf8, 0x82, 0xf1, 0x15, + 0xe3, 0x72, 0x8d, 0xeb, 0x30, 0xae, 0x71, 0xfc, 0x13, 0x9f, 0xb7, 0xf8, 0xbc, 0xc3, 0xb8, 0xf8, + 0x51, 0x33, 0x7e, 0x07, 0x00, 0x00, 0xff, 0xff, 0x68, 0x7e, 0x05, 0xec, 0x7b, 0x04, 0x00, 0x00, +} diff --git a/vendor/github.com/gogo/protobuf/test/oneof/combos/unsafeboth/one.proto b/vendor/github.com/gogo/protobuf/test/oneof/combos/unsafeboth/one.proto new file mode 100644 index 000000000..9d6230ad6 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/oneof/combos/unsafeboth/one.proto @@ -0,0 +1,101 @@ +// Copyright (c) 2013, Vastech SA (PTY) LTD. All rights reserved. +// http://github.com/gogo/protobuf/gogoproto +// +// 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 one; + +import "github.com/gogo/protobuf/gogoproto/gogo.proto"; + +option (gogoproto.goproto_stringer_all) = false; +option (gogoproto.goproto_enum_prefix_all) = false; +option (gogoproto.goproto_getters_all) = false; + +option (gogoproto.equal_all) = true; +option (gogoproto.verbose_equal_all) = true; +option (gogoproto.stringer_all) = true; +option (gogoproto.gostring_all) = true; +option (gogoproto.description_all) = true; + +option (gogoproto.testgen_all) = true; +option (gogoproto.populate_all) = true; +option (gogoproto.unmarshaler_all) = false; +option (gogoproto.marshaler_all) = false; +option (gogoproto.sizer_all) = true; + +option (gogoproto.goproto_enum_stringer_all) = false; +option (gogoproto.enum_stringer_all) = true; + +option (gogoproto.unsafe_marshaler_all) = true; +option (gogoproto.unsafe_unmarshaler_all) = true; + +message Subby { + optional string sub = 1; +} + +message AllTypesOneOf { + oneof test_oneof { + double Field1 = 1; + float Field2 = 2; + int32 Field3 = 3; + int64 Field4 = 4; + uint32 Field5 = 5; + uint64 Field6 = 6; + sint32 Field7 = 7; + sint64 Field8 = 8; + fixed32 Field9 = 9; + sfixed32 Field10 = 10; + fixed64 Field11 = 11; + sfixed64 Field12 = 12; + bool Field13 = 13; + string Field14 = 14; + bytes Field15 = 15; + Subby sub_message = 16; + } +} + +message TwoOneofs { + oneof one { + double Field1 = 1; + float Field2 = 2; + int32 Field3 = 3; + } + + oneof two { + string Field34 = 34; + bytes Field35 = 35; + Subby sub_message2 = 36; + } +} + +message CustomOneof { + oneof custom { + string Stringy = 34; + bytes CustomType = 35 [(gogoproto.customtype) = "github.com/gogo/protobuf/test/custom.Uint128"]; + uint64 CastType = 36 [(gogoproto.casttype) = "github.com/gogo/protobuf/test/casttype.MyUint64Type"]; + int64 CustomName = 37 [(gogoproto.customname) = "MyCustomName"]; + } +} diff --git a/vendor/github.com/gogo/protobuf/test/oneof/combos/unsafeboth/onepb_test.go b/vendor/github.com/gogo/protobuf/test/oneof/combos/unsafeboth/onepb_test.go new file mode 100644 index 000000000..469b47d65 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/oneof/combos/unsafeboth/onepb_test.go @@ -0,0 +1,743 @@ +// Code generated by protoc-gen-gogo. +// source: combos/unsafeboth/one.proto +// DO NOT EDIT! + +/* +Package one is a generated protocol buffer package. + +It is generated from these files: + combos/unsafeboth/one.proto + +It has these top-level messages: + Subby + AllTypesOneOf + TwoOneofs + CustomOneof +*/ +package one + +import testing "testing" +import math_rand "math/rand" +import time "time" +import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" +import github_com_gogo_protobuf_jsonpb "github.com/gogo/protobuf/jsonpb" +import fmt "fmt" +import go_parser "go/parser" +import proto "github.com/gogo/protobuf/proto" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +func TestSubbyProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedSubby(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Subby{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestSubbyMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedSubby(popr, false) + size := p.Size() + data := make([]byte, size) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(data) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Subby{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestAllTypesOneOfProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAllTypesOneOf(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &AllTypesOneOf{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestAllTypesOneOfMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAllTypesOneOf(popr, false) + size := p.Size() + data := make([]byte, size) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(data) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &AllTypesOneOf{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestTwoOneofsProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedTwoOneofs(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &TwoOneofs{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestTwoOneofsMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedTwoOneofs(popr, false) + size := p.Size() + data := make([]byte, size) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(data) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &TwoOneofs{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestCustomOneofProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomOneof(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &CustomOneof{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestCustomOneofMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomOneof(popr, false) + size := p.Size() + data := make([]byte, size) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(data) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &CustomOneof{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestSubbyJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedSubby(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Subby{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestAllTypesOneOfJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAllTypesOneOf(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &AllTypesOneOf{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestTwoOneofsJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedTwoOneofs(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &TwoOneofs{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestCustomOneofJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomOneof(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &CustomOneof{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestSubbyProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedSubby(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &Subby{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestSubbyProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedSubby(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &Subby{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestAllTypesOneOfProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAllTypesOneOf(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &AllTypesOneOf{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestAllTypesOneOfProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAllTypesOneOf(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &AllTypesOneOf{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestTwoOneofsProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedTwoOneofs(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &TwoOneofs{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestTwoOneofsProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedTwoOneofs(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &TwoOneofs{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestCustomOneofProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomOneof(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &CustomOneof{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestCustomOneofProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomOneof(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &CustomOneof{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestOneDescription(t *testing.T) { + OneDescription() +} +func TestSubbyVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedSubby(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &Subby{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestAllTypesOneOfVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAllTypesOneOf(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &AllTypesOneOf{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestTwoOneofsVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedTwoOneofs(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &TwoOneofs{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestCustomOneofVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomOneof(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &CustomOneof{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestSubbyGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedSubby(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestAllTypesOneOfGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAllTypesOneOf(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestTwoOneofsGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedTwoOneofs(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestCustomOneofGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomOneof(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestSubbySize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedSubby(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func TestAllTypesOneOfSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAllTypesOneOf(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func TestTwoOneofsSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedTwoOneofs(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func TestCustomOneofSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomOneof(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func TestSubbyStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedSubby(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestAllTypesOneOfStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAllTypesOneOf(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestTwoOneofsStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedTwoOneofs(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestCustomOneofStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomOneof(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} + +//These tests are generated by github.com/gogo/protobuf/plugin/testgen diff --git a/vendor/github.com/gogo/protobuf/test/oneof/combos/unsafemarshaler/one.pb.go b/vendor/github.com/gogo/protobuf/test/oneof/combos/unsafemarshaler/one.pb.go new file mode 100644 index 000000000..db3543db4 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/oneof/combos/unsafemarshaler/one.pb.go @@ -0,0 +1,4752 @@ +// Code generated by protoc-gen-gogo. +// source: combos/unsafemarshaler/one.proto +// DO NOT EDIT! + +/* +Package one is a generated protocol buffer package. + +It is generated from these files: + combos/unsafemarshaler/one.proto + +It has these top-level messages: + Subby + AllTypesOneOf + TwoOneofs + CustomOneof +*/ +package one + +import proto "github.com/gogo/protobuf/proto" +import fmt "fmt" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" + +import github_com_gogo_protobuf_test_custom "github.com/gogo/protobuf/test/custom" +import github_com_gogo_protobuf_test_casttype "github.com/gogo/protobuf/test/casttype" + +import github_com_gogo_protobuf_protoc_gen_gogo_descriptor "github.com/gogo/protobuf/protoc-gen-gogo/descriptor" +import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" +import compress_gzip "compress/gzip" +import bytes "bytes" +import io_ioutil "io/ioutil" + +import strings "strings" +import sort "sort" +import strconv "strconv" +import reflect "reflect" + +import unsafe "unsafe" + +// 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. +const _ = proto.GoGoProtoPackageIsVersion1 + +type Subby struct { + Sub *string `protobuf:"bytes,1,opt,name=sub" json:"sub,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *Subby) Reset() { *m = Subby{} } +func (*Subby) ProtoMessage() {} +func (*Subby) Descriptor() ([]byte, []int) { return fileDescriptorOne, []int{0} } + +type AllTypesOneOf struct { + // Types that are valid to be assigned to TestOneof: + // *AllTypesOneOf_Field1 + // *AllTypesOneOf_Field2 + // *AllTypesOneOf_Field3 + // *AllTypesOneOf_Field4 + // *AllTypesOneOf_Field5 + // *AllTypesOneOf_Field6 + // *AllTypesOneOf_Field7 + // *AllTypesOneOf_Field8 + // *AllTypesOneOf_Field9 + // *AllTypesOneOf_Field10 + // *AllTypesOneOf_Field11 + // *AllTypesOneOf_Field12 + // *AllTypesOneOf_Field13 + // *AllTypesOneOf_Field14 + // *AllTypesOneOf_Field15 + // *AllTypesOneOf_SubMessage + TestOneof isAllTypesOneOf_TestOneof `protobuf_oneof:"test_oneof"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *AllTypesOneOf) Reset() { *m = AllTypesOneOf{} } +func (*AllTypesOneOf) ProtoMessage() {} +func (*AllTypesOneOf) Descriptor() ([]byte, []int) { return fileDescriptorOne, []int{1} } + +type isAllTypesOneOf_TestOneof interface { + isAllTypesOneOf_TestOneof() + Equal(interface{}) bool + VerboseEqual(interface{}) error + MarshalTo([]byte) (int, error) + Size() int +} + +type AllTypesOneOf_Field1 struct { + Field1 float64 `protobuf:"fixed64,1,opt,name=Field1,json=field1,oneof"` +} +type AllTypesOneOf_Field2 struct { + Field2 float32 `protobuf:"fixed32,2,opt,name=Field2,json=field2,oneof"` +} +type AllTypesOneOf_Field3 struct { + Field3 int32 `protobuf:"varint,3,opt,name=Field3,json=field3,oneof"` +} +type AllTypesOneOf_Field4 struct { + Field4 int64 `protobuf:"varint,4,opt,name=Field4,json=field4,oneof"` +} +type AllTypesOneOf_Field5 struct { + Field5 uint32 `protobuf:"varint,5,opt,name=Field5,json=field5,oneof"` +} +type AllTypesOneOf_Field6 struct { + Field6 uint64 `protobuf:"varint,6,opt,name=Field6,json=field6,oneof"` +} +type AllTypesOneOf_Field7 struct { + Field7 int32 `protobuf:"zigzag32,7,opt,name=Field7,json=field7,oneof"` +} +type AllTypesOneOf_Field8 struct { + Field8 int64 `protobuf:"zigzag64,8,opt,name=Field8,json=field8,oneof"` +} +type AllTypesOneOf_Field9 struct { + Field9 uint32 `protobuf:"fixed32,9,opt,name=Field9,json=field9,oneof"` +} +type AllTypesOneOf_Field10 struct { + Field10 int32 `protobuf:"fixed32,10,opt,name=Field10,json=field10,oneof"` +} +type AllTypesOneOf_Field11 struct { + Field11 uint64 `protobuf:"fixed64,11,opt,name=Field11,json=field11,oneof"` +} +type AllTypesOneOf_Field12 struct { + Field12 int64 `protobuf:"fixed64,12,opt,name=Field12,json=field12,oneof"` +} +type AllTypesOneOf_Field13 struct { + Field13 bool `protobuf:"varint,13,opt,name=Field13,json=field13,oneof"` +} +type AllTypesOneOf_Field14 struct { + Field14 string `protobuf:"bytes,14,opt,name=Field14,json=field14,oneof"` +} +type AllTypesOneOf_Field15 struct { + Field15 []byte `protobuf:"bytes,15,opt,name=Field15,json=field15,oneof"` +} +type AllTypesOneOf_SubMessage struct { + SubMessage *Subby `protobuf:"bytes,16,opt,name=sub_message,json=subMessage,oneof"` +} + +func (*AllTypesOneOf_Field1) isAllTypesOneOf_TestOneof() {} +func (*AllTypesOneOf_Field2) isAllTypesOneOf_TestOneof() {} +func (*AllTypesOneOf_Field3) isAllTypesOneOf_TestOneof() {} +func (*AllTypesOneOf_Field4) isAllTypesOneOf_TestOneof() {} +func (*AllTypesOneOf_Field5) isAllTypesOneOf_TestOneof() {} +func (*AllTypesOneOf_Field6) isAllTypesOneOf_TestOneof() {} +func (*AllTypesOneOf_Field7) isAllTypesOneOf_TestOneof() {} +func (*AllTypesOneOf_Field8) isAllTypesOneOf_TestOneof() {} +func (*AllTypesOneOf_Field9) isAllTypesOneOf_TestOneof() {} +func (*AllTypesOneOf_Field10) isAllTypesOneOf_TestOneof() {} +func (*AllTypesOneOf_Field11) isAllTypesOneOf_TestOneof() {} +func (*AllTypesOneOf_Field12) isAllTypesOneOf_TestOneof() {} +func (*AllTypesOneOf_Field13) isAllTypesOneOf_TestOneof() {} +func (*AllTypesOneOf_Field14) isAllTypesOneOf_TestOneof() {} +func (*AllTypesOneOf_Field15) isAllTypesOneOf_TestOneof() {} +func (*AllTypesOneOf_SubMessage) isAllTypesOneOf_TestOneof() {} + +func (m *AllTypesOneOf) GetTestOneof() isAllTypesOneOf_TestOneof { + if m != nil { + return m.TestOneof + } + return nil +} + +func (m *AllTypesOneOf) GetField1() float64 { + if x, ok := m.GetTestOneof().(*AllTypesOneOf_Field1); ok { + return x.Field1 + } + return 0 +} + +func (m *AllTypesOneOf) GetField2() float32 { + if x, ok := m.GetTestOneof().(*AllTypesOneOf_Field2); ok { + return x.Field2 + } + return 0 +} + +func (m *AllTypesOneOf) GetField3() int32 { + if x, ok := m.GetTestOneof().(*AllTypesOneOf_Field3); ok { + return x.Field3 + } + return 0 +} + +func (m *AllTypesOneOf) GetField4() int64 { + if x, ok := m.GetTestOneof().(*AllTypesOneOf_Field4); ok { + return x.Field4 + } + return 0 +} + +func (m *AllTypesOneOf) GetField5() uint32 { + if x, ok := m.GetTestOneof().(*AllTypesOneOf_Field5); ok { + return x.Field5 + } + return 0 +} + +func (m *AllTypesOneOf) GetField6() uint64 { + if x, ok := m.GetTestOneof().(*AllTypesOneOf_Field6); ok { + return x.Field6 + } + return 0 +} + +func (m *AllTypesOneOf) GetField7() int32 { + if x, ok := m.GetTestOneof().(*AllTypesOneOf_Field7); ok { + return x.Field7 + } + return 0 +} + +func (m *AllTypesOneOf) GetField8() int64 { + if x, ok := m.GetTestOneof().(*AllTypesOneOf_Field8); ok { + return x.Field8 + } + return 0 +} + +func (m *AllTypesOneOf) GetField9() uint32 { + if x, ok := m.GetTestOneof().(*AllTypesOneOf_Field9); ok { + return x.Field9 + } + return 0 +} + +func (m *AllTypesOneOf) GetField10() int32 { + if x, ok := m.GetTestOneof().(*AllTypesOneOf_Field10); ok { + return x.Field10 + } + return 0 +} + +func (m *AllTypesOneOf) GetField11() uint64 { + if x, ok := m.GetTestOneof().(*AllTypesOneOf_Field11); ok { + return x.Field11 + } + return 0 +} + +func (m *AllTypesOneOf) GetField12() int64 { + if x, ok := m.GetTestOneof().(*AllTypesOneOf_Field12); ok { + return x.Field12 + } + return 0 +} + +func (m *AllTypesOneOf) GetField13() bool { + if x, ok := m.GetTestOneof().(*AllTypesOneOf_Field13); ok { + return x.Field13 + } + return false +} + +func (m *AllTypesOneOf) GetField14() string { + if x, ok := m.GetTestOneof().(*AllTypesOneOf_Field14); ok { + return x.Field14 + } + return "" +} + +func (m *AllTypesOneOf) GetField15() []byte { + if x, ok := m.GetTestOneof().(*AllTypesOneOf_Field15); ok { + return x.Field15 + } + return nil +} + +func (m *AllTypesOneOf) GetSubMessage() *Subby { + if x, ok := m.GetTestOneof().(*AllTypesOneOf_SubMessage); ok { + return x.SubMessage + } + return nil +} + +// XXX_OneofFuncs is for the internal use of the proto package. +func (*AllTypesOneOf) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{}) { + return _AllTypesOneOf_OneofMarshaler, _AllTypesOneOf_OneofUnmarshaler, _AllTypesOneOf_OneofSizer, []interface{}{ + (*AllTypesOneOf_Field1)(nil), + (*AllTypesOneOf_Field2)(nil), + (*AllTypesOneOf_Field3)(nil), + (*AllTypesOneOf_Field4)(nil), + (*AllTypesOneOf_Field5)(nil), + (*AllTypesOneOf_Field6)(nil), + (*AllTypesOneOf_Field7)(nil), + (*AllTypesOneOf_Field8)(nil), + (*AllTypesOneOf_Field9)(nil), + (*AllTypesOneOf_Field10)(nil), + (*AllTypesOneOf_Field11)(nil), + (*AllTypesOneOf_Field12)(nil), + (*AllTypesOneOf_Field13)(nil), + (*AllTypesOneOf_Field14)(nil), + (*AllTypesOneOf_Field15)(nil), + (*AllTypesOneOf_SubMessage)(nil), + } +} + +func _AllTypesOneOf_OneofMarshaler(msg proto.Message, b *proto.Buffer) error { + m := msg.(*AllTypesOneOf) + // test_oneof + switch x := m.TestOneof.(type) { + case *AllTypesOneOf_Field1: + _ = b.EncodeVarint(1<<3 | proto.WireFixed64) + _ = b.EncodeFixed64(math.Float64bits(x.Field1)) + case *AllTypesOneOf_Field2: + _ = b.EncodeVarint(2<<3 | proto.WireFixed32) + _ = b.EncodeFixed32(uint64(math.Float32bits(x.Field2))) + case *AllTypesOneOf_Field3: + _ = b.EncodeVarint(3<<3 | proto.WireVarint) + _ = b.EncodeVarint(uint64(x.Field3)) + case *AllTypesOneOf_Field4: + _ = b.EncodeVarint(4<<3 | proto.WireVarint) + _ = b.EncodeVarint(uint64(x.Field4)) + case *AllTypesOneOf_Field5: + _ = b.EncodeVarint(5<<3 | proto.WireVarint) + _ = b.EncodeVarint(uint64(x.Field5)) + case *AllTypesOneOf_Field6: + _ = b.EncodeVarint(6<<3 | proto.WireVarint) + _ = b.EncodeVarint(uint64(x.Field6)) + case *AllTypesOneOf_Field7: + _ = b.EncodeVarint(7<<3 | proto.WireVarint) + _ = b.EncodeZigzag32(uint64(x.Field7)) + case *AllTypesOneOf_Field8: + _ = b.EncodeVarint(8<<3 | proto.WireVarint) + _ = b.EncodeZigzag64(uint64(x.Field8)) + case *AllTypesOneOf_Field9: + _ = b.EncodeVarint(9<<3 | proto.WireFixed32) + _ = b.EncodeFixed32(uint64(x.Field9)) + case *AllTypesOneOf_Field10: + _ = b.EncodeVarint(10<<3 | proto.WireFixed32) + _ = b.EncodeFixed32(uint64(x.Field10)) + case *AllTypesOneOf_Field11: + _ = b.EncodeVarint(11<<3 | proto.WireFixed64) + _ = b.EncodeFixed64(uint64(x.Field11)) + case *AllTypesOneOf_Field12: + _ = b.EncodeVarint(12<<3 | proto.WireFixed64) + _ = b.EncodeFixed64(uint64(x.Field12)) + case *AllTypesOneOf_Field13: + t := uint64(0) + if x.Field13 { + t = 1 + } + _ = b.EncodeVarint(13<<3 | proto.WireVarint) + _ = b.EncodeVarint(t) + case *AllTypesOneOf_Field14: + _ = b.EncodeVarint(14<<3 | proto.WireBytes) + _ = b.EncodeStringBytes(x.Field14) + case *AllTypesOneOf_Field15: + _ = b.EncodeVarint(15<<3 | proto.WireBytes) + _ = b.EncodeRawBytes(x.Field15) + case *AllTypesOneOf_SubMessage: + _ = b.EncodeVarint(16<<3 | proto.WireBytes) + if err := b.EncodeMessage(x.SubMessage); err != nil { + return err + } + case nil: + default: + return fmt.Errorf("AllTypesOneOf.TestOneof has unexpected type %T", x) + } + return nil +} + +func _AllTypesOneOf_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) { + m := msg.(*AllTypesOneOf) + switch tag { + case 1: // test_oneof.Field1 + if wire != proto.WireFixed64 { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeFixed64() + m.TestOneof = &AllTypesOneOf_Field1{math.Float64frombits(x)} + return true, err + case 2: // test_oneof.Field2 + if wire != proto.WireFixed32 { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeFixed32() + m.TestOneof = &AllTypesOneOf_Field2{math.Float32frombits(uint32(x))} + return true, err + case 3: // test_oneof.Field3 + if wire != proto.WireVarint { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeVarint() + m.TestOneof = &AllTypesOneOf_Field3{int32(x)} + return true, err + case 4: // test_oneof.Field4 + if wire != proto.WireVarint { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeVarint() + m.TestOneof = &AllTypesOneOf_Field4{int64(x)} + return true, err + case 5: // test_oneof.Field5 + if wire != proto.WireVarint { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeVarint() + m.TestOneof = &AllTypesOneOf_Field5{uint32(x)} + return true, err + case 6: // test_oneof.Field6 + if wire != proto.WireVarint { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeVarint() + m.TestOneof = &AllTypesOneOf_Field6{x} + return true, err + case 7: // test_oneof.Field7 + if wire != proto.WireVarint { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeZigzag32() + m.TestOneof = &AllTypesOneOf_Field7{int32(x)} + return true, err + case 8: // test_oneof.Field8 + if wire != proto.WireVarint { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeZigzag64() + m.TestOneof = &AllTypesOneOf_Field8{int64(x)} + return true, err + case 9: // test_oneof.Field9 + if wire != proto.WireFixed32 { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeFixed32() + m.TestOneof = &AllTypesOneOf_Field9{uint32(x)} + return true, err + case 10: // test_oneof.Field10 + if wire != proto.WireFixed32 { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeFixed32() + m.TestOneof = &AllTypesOneOf_Field10{int32(x)} + return true, err + case 11: // test_oneof.Field11 + if wire != proto.WireFixed64 { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeFixed64() + m.TestOneof = &AllTypesOneOf_Field11{x} + return true, err + case 12: // test_oneof.Field12 + if wire != proto.WireFixed64 { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeFixed64() + m.TestOneof = &AllTypesOneOf_Field12{int64(x)} + return true, err + case 13: // test_oneof.Field13 + if wire != proto.WireVarint { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeVarint() + m.TestOneof = &AllTypesOneOf_Field13{x != 0} + return true, err + case 14: // test_oneof.Field14 + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeStringBytes() + m.TestOneof = &AllTypesOneOf_Field14{x} + return true, err + case 15: // test_oneof.Field15 + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeRawBytes(true) + m.TestOneof = &AllTypesOneOf_Field15{x} + return true, err + case 16: // test_oneof.sub_message + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + msg := new(Subby) + err := b.DecodeMessage(msg) + m.TestOneof = &AllTypesOneOf_SubMessage{msg} + return true, err + default: + return false, nil + } +} + +func _AllTypesOneOf_OneofSizer(msg proto.Message) (n int) { + m := msg.(*AllTypesOneOf) + // test_oneof + switch x := m.TestOneof.(type) { + case *AllTypesOneOf_Field1: + n += proto.SizeVarint(1<<3 | proto.WireFixed64) + n += 8 + case *AllTypesOneOf_Field2: + n += proto.SizeVarint(2<<3 | proto.WireFixed32) + n += 4 + case *AllTypesOneOf_Field3: + n += proto.SizeVarint(3<<3 | proto.WireVarint) + n += proto.SizeVarint(uint64(x.Field3)) + case *AllTypesOneOf_Field4: + n += proto.SizeVarint(4<<3 | proto.WireVarint) + n += proto.SizeVarint(uint64(x.Field4)) + case *AllTypesOneOf_Field5: + n += proto.SizeVarint(5<<3 | proto.WireVarint) + n += proto.SizeVarint(uint64(x.Field5)) + case *AllTypesOneOf_Field6: + n += proto.SizeVarint(6<<3 | proto.WireVarint) + n += proto.SizeVarint(uint64(x.Field6)) + case *AllTypesOneOf_Field7: + n += proto.SizeVarint(7<<3 | proto.WireVarint) + n += proto.SizeVarint(uint64((uint32(x.Field7) << 1) ^ uint32((int32(x.Field7) >> 31)))) + case *AllTypesOneOf_Field8: + n += proto.SizeVarint(8<<3 | proto.WireVarint) + n += proto.SizeVarint(uint64(uint64(x.Field8<<1) ^ uint64((int64(x.Field8) >> 63)))) + case *AllTypesOneOf_Field9: + n += proto.SizeVarint(9<<3 | proto.WireFixed32) + n += 4 + case *AllTypesOneOf_Field10: + n += proto.SizeVarint(10<<3 | proto.WireFixed32) + n += 4 + case *AllTypesOneOf_Field11: + n += proto.SizeVarint(11<<3 | proto.WireFixed64) + n += 8 + case *AllTypesOneOf_Field12: + n += proto.SizeVarint(12<<3 | proto.WireFixed64) + n += 8 + case *AllTypesOneOf_Field13: + n += proto.SizeVarint(13<<3 | proto.WireVarint) + n += 1 + case *AllTypesOneOf_Field14: + n += proto.SizeVarint(14<<3 | proto.WireBytes) + n += proto.SizeVarint(uint64(len(x.Field14))) + n += len(x.Field14) + case *AllTypesOneOf_Field15: + n += proto.SizeVarint(15<<3 | proto.WireBytes) + n += proto.SizeVarint(uint64(len(x.Field15))) + n += len(x.Field15) + case *AllTypesOneOf_SubMessage: + s := proto.Size(x.SubMessage) + n += proto.SizeVarint(16<<3 | proto.WireBytes) + n += proto.SizeVarint(uint64(s)) + n += s + case nil: + default: + panic(fmt.Sprintf("proto: unexpected type %T in oneof", x)) + } + return n +} + +type TwoOneofs struct { + // Types that are valid to be assigned to One: + // *TwoOneofs_Field1 + // *TwoOneofs_Field2 + // *TwoOneofs_Field3 + One isTwoOneofs_One `protobuf_oneof:"one"` + // Types that are valid to be assigned to Two: + // *TwoOneofs_Field34 + // *TwoOneofs_Field35 + // *TwoOneofs_SubMessage2 + Two isTwoOneofs_Two `protobuf_oneof:"two"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *TwoOneofs) Reset() { *m = TwoOneofs{} } +func (*TwoOneofs) ProtoMessage() {} +func (*TwoOneofs) Descriptor() ([]byte, []int) { return fileDescriptorOne, []int{2} } + +type isTwoOneofs_One interface { + isTwoOneofs_One() + Equal(interface{}) bool + VerboseEqual(interface{}) error + MarshalTo([]byte) (int, error) + Size() int +} +type isTwoOneofs_Two interface { + isTwoOneofs_Two() + Equal(interface{}) bool + VerboseEqual(interface{}) error + MarshalTo([]byte) (int, error) + Size() int +} + +type TwoOneofs_Field1 struct { + Field1 float64 `protobuf:"fixed64,1,opt,name=Field1,json=field1,oneof"` +} +type TwoOneofs_Field2 struct { + Field2 float32 `protobuf:"fixed32,2,opt,name=Field2,json=field2,oneof"` +} +type TwoOneofs_Field3 struct { + Field3 int32 `protobuf:"varint,3,opt,name=Field3,json=field3,oneof"` +} +type TwoOneofs_Field34 struct { + Field34 string `protobuf:"bytes,34,opt,name=Field34,json=field34,oneof"` +} +type TwoOneofs_Field35 struct { + Field35 []byte `protobuf:"bytes,35,opt,name=Field35,json=field35,oneof"` +} +type TwoOneofs_SubMessage2 struct { + SubMessage2 *Subby `protobuf:"bytes,36,opt,name=sub_message2,json=subMessage2,oneof"` +} + +func (*TwoOneofs_Field1) isTwoOneofs_One() {} +func (*TwoOneofs_Field2) isTwoOneofs_One() {} +func (*TwoOneofs_Field3) isTwoOneofs_One() {} +func (*TwoOneofs_Field34) isTwoOneofs_Two() {} +func (*TwoOneofs_Field35) isTwoOneofs_Two() {} +func (*TwoOneofs_SubMessage2) isTwoOneofs_Two() {} + +func (m *TwoOneofs) GetOne() isTwoOneofs_One { + if m != nil { + return m.One + } + return nil +} +func (m *TwoOneofs) GetTwo() isTwoOneofs_Two { + if m != nil { + return m.Two + } + return nil +} + +func (m *TwoOneofs) GetField1() float64 { + if x, ok := m.GetOne().(*TwoOneofs_Field1); ok { + return x.Field1 + } + return 0 +} + +func (m *TwoOneofs) GetField2() float32 { + if x, ok := m.GetOne().(*TwoOneofs_Field2); ok { + return x.Field2 + } + return 0 +} + +func (m *TwoOneofs) GetField3() int32 { + if x, ok := m.GetOne().(*TwoOneofs_Field3); ok { + return x.Field3 + } + return 0 +} + +func (m *TwoOneofs) GetField34() string { + if x, ok := m.GetTwo().(*TwoOneofs_Field34); ok { + return x.Field34 + } + return "" +} + +func (m *TwoOneofs) GetField35() []byte { + if x, ok := m.GetTwo().(*TwoOneofs_Field35); ok { + return x.Field35 + } + return nil +} + +func (m *TwoOneofs) GetSubMessage2() *Subby { + if x, ok := m.GetTwo().(*TwoOneofs_SubMessage2); ok { + return x.SubMessage2 + } + return nil +} + +// XXX_OneofFuncs is for the internal use of the proto package. +func (*TwoOneofs) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{}) { + return _TwoOneofs_OneofMarshaler, _TwoOneofs_OneofUnmarshaler, _TwoOneofs_OneofSizer, []interface{}{ + (*TwoOneofs_Field1)(nil), + (*TwoOneofs_Field2)(nil), + (*TwoOneofs_Field3)(nil), + (*TwoOneofs_Field34)(nil), + (*TwoOneofs_Field35)(nil), + (*TwoOneofs_SubMessage2)(nil), + } +} + +func _TwoOneofs_OneofMarshaler(msg proto.Message, b *proto.Buffer) error { + m := msg.(*TwoOneofs) + // one + switch x := m.One.(type) { + case *TwoOneofs_Field1: + _ = b.EncodeVarint(1<<3 | proto.WireFixed64) + _ = b.EncodeFixed64(math.Float64bits(x.Field1)) + case *TwoOneofs_Field2: + _ = b.EncodeVarint(2<<3 | proto.WireFixed32) + _ = b.EncodeFixed32(uint64(math.Float32bits(x.Field2))) + case *TwoOneofs_Field3: + _ = b.EncodeVarint(3<<3 | proto.WireVarint) + _ = b.EncodeVarint(uint64(x.Field3)) + case nil: + default: + return fmt.Errorf("TwoOneofs.One has unexpected type %T", x) + } + // two + switch x := m.Two.(type) { + case *TwoOneofs_Field34: + _ = b.EncodeVarint(34<<3 | proto.WireBytes) + _ = b.EncodeStringBytes(x.Field34) + case *TwoOneofs_Field35: + _ = b.EncodeVarint(35<<3 | proto.WireBytes) + _ = b.EncodeRawBytes(x.Field35) + case *TwoOneofs_SubMessage2: + _ = b.EncodeVarint(36<<3 | proto.WireBytes) + if err := b.EncodeMessage(x.SubMessage2); err != nil { + return err + } + case nil: + default: + return fmt.Errorf("TwoOneofs.Two has unexpected type %T", x) + } + return nil +} + +func _TwoOneofs_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) { + m := msg.(*TwoOneofs) + switch tag { + case 1: // one.Field1 + if wire != proto.WireFixed64 { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeFixed64() + m.One = &TwoOneofs_Field1{math.Float64frombits(x)} + return true, err + case 2: // one.Field2 + if wire != proto.WireFixed32 { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeFixed32() + m.One = &TwoOneofs_Field2{math.Float32frombits(uint32(x))} + return true, err + case 3: // one.Field3 + if wire != proto.WireVarint { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeVarint() + m.One = &TwoOneofs_Field3{int32(x)} + return true, err + case 34: // two.Field34 + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeStringBytes() + m.Two = &TwoOneofs_Field34{x} + return true, err + case 35: // two.Field35 + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeRawBytes(true) + m.Two = &TwoOneofs_Field35{x} + return true, err + case 36: // two.sub_message2 + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + msg := new(Subby) + err := b.DecodeMessage(msg) + m.Two = &TwoOneofs_SubMessage2{msg} + return true, err + default: + return false, nil + } +} + +func _TwoOneofs_OneofSizer(msg proto.Message) (n int) { + m := msg.(*TwoOneofs) + // one + switch x := m.One.(type) { + case *TwoOneofs_Field1: + n += proto.SizeVarint(1<<3 | proto.WireFixed64) + n += 8 + case *TwoOneofs_Field2: + n += proto.SizeVarint(2<<3 | proto.WireFixed32) + n += 4 + case *TwoOneofs_Field3: + n += proto.SizeVarint(3<<3 | proto.WireVarint) + n += proto.SizeVarint(uint64(x.Field3)) + case nil: + default: + panic(fmt.Sprintf("proto: unexpected type %T in oneof", x)) + } + // two + switch x := m.Two.(type) { + case *TwoOneofs_Field34: + n += proto.SizeVarint(34<<3 | proto.WireBytes) + n += proto.SizeVarint(uint64(len(x.Field34))) + n += len(x.Field34) + case *TwoOneofs_Field35: + n += proto.SizeVarint(35<<3 | proto.WireBytes) + n += proto.SizeVarint(uint64(len(x.Field35))) + n += len(x.Field35) + case *TwoOneofs_SubMessage2: + s := proto.Size(x.SubMessage2) + n += proto.SizeVarint(36<<3 | proto.WireBytes) + n += proto.SizeVarint(uint64(s)) + n += s + case nil: + default: + panic(fmt.Sprintf("proto: unexpected type %T in oneof", x)) + } + return n +} + +type CustomOneof struct { + // Types that are valid to be assigned to Custom: + // *CustomOneof_Stringy + // *CustomOneof_CustomType + // *CustomOneof_CastType + // *CustomOneof_MyCustomName + Custom isCustomOneof_Custom `protobuf_oneof:"custom"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *CustomOneof) Reset() { *m = CustomOneof{} } +func (*CustomOneof) ProtoMessage() {} +func (*CustomOneof) Descriptor() ([]byte, []int) { return fileDescriptorOne, []int{3} } + +type isCustomOneof_Custom interface { + isCustomOneof_Custom() + Equal(interface{}) bool + VerboseEqual(interface{}) error + MarshalTo([]byte) (int, error) + Size() int +} + +type CustomOneof_Stringy struct { + Stringy string `protobuf:"bytes,34,opt,name=Stringy,json=stringy,oneof"` +} +type CustomOneof_CustomType struct { + CustomType github_com_gogo_protobuf_test_custom.Uint128 `protobuf:"bytes,35,opt,name=CustomType,json=customType,oneof,customtype=github.com/gogo/protobuf/test/custom.Uint128"` +} +type CustomOneof_CastType struct { + CastType github_com_gogo_protobuf_test_casttype.MyUint64Type `protobuf:"varint,36,opt,name=CastType,json=castType,oneof,casttype=github.com/gogo/protobuf/test/casttype.MyUint64Type"` +} +type CustomOneof_MyCustomName struct { + MyCustomName int64 `protobuf:"varint,37,opt,name=CustomName,json=customName,oneof"` +} + +func (*CustomOneof_Stringy) isCustomOneof_Custom() {} +func (*CustomOneof_CustomType) isCustomOneof_Custom() {} +func (*CustomOneof_CastType) isCustomOneof_Custom() {} +func (*CustomOneof_MyCustomName) isCustomOneof_Custom() {} + +func (m *CustomOneof) GetCustom() isCustomOneof_Custom { + if m != nil { + return m.Custom + } + return nil +} + +func (m *CustomOneof) GetStringy() string { + if x, ok := m.GetCustom().(*CustomOneof_Stringy); ok { + return x.Stringy + } + return "" +} + +func (m *CustomOneof) GetCastType() github_com_gogo_protobuf_test_casttype.MyUint64Type { + if x, ok := m.GetCustom().(*CustomOneof_CastType); ok { + return x.CastType + } + return 0 +} + +func (m *CustomOneof) GetMyCustomName() int64 { + if x, ok := m.GetCustom().(*CustomOneof_MyCustomName); ok { + return x.MyCustomName + } + return 0 +} + +// XXX_OneofFuncs is for the internal use of the proto package. +func (*CustomOneof) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{}) { + return _CustomOneof_OneofMarshaler, _CustomOneof_OneofUnmarshaler, _CustomOneof_OneofSizer, []interface{}{ + (*CustomOneof_Stringy)(nil), + (*CustomOneof_CustomType)(nil), + (*CustomOneof_CastType)(nil), + (*CustomOneof_MyCustomName)(nil), + } +} + +func _CustomOneof_OneofMarshaler(msg proto.Message, b *proto.Buffer) error { + m := msg.(*CustomOneof) + // custom + switch x := m.Custom.(type) { + case *CustomOneof_Stringy: + _ = b.EncodeVarint(34<<3 | proto.WireBytes) + _ = b.EncodeStringBytes(x.Stringy) + case *CustomOneof_CustomType: + _ = b.EncodeVarint(35<<3 | proto.WireBytes) + data, err := x.CustomType.Marshal() + if err != nil { + return err + } + _ = b.EncodeRawBytes(data) + case *CustomOneof_CastType: + _ = b.EncodeVarint(36<<3 | proto.WireVarint) + _ = b.EncodeVarint(uint64(x.CastType)) + case *CustomOneof_MyCustomName: + _ = b.EncodeVarint(37<<3 | proto.WireVarint) + _ = b.EncodeVarint(uint64(x.MyCustomName)) + case nil: + default: + return fmt.Errorf("CustomOneof.Custom has unexpected type %T", x) + } + return nil +} + +func _CustomOneof_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) { + m := msg.(*CustomOneof) + switch tag { + case 34: // custom.Stringy + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeStringBytes() + m.Custom = &CustomOneof_Stringy{x} + return true, err + case 35: // custom.CustomType + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeRawBytes(true) + if err != nil { + return true, err + } + var cc github_com_gogo_protobuf_test_custom.Uint128 + c := &cc + err = c.Unmarshal(x) + m.Custom = &CustomOneof_CustomType{*c} + return true, err + case 36: // custom.CastType + if wire != proto.WireVarint { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeVarint() + m.Custom = &CustomOneof_CastType{github_com_gogo_protobuf_test_casttype.MyUint64Type(x)} + return true, err + case 37: // custom.CustomName + if wire != proto.WireVarint { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeVarint() + m.Custom = &CustomOneof_MyCustomName{int64(x)} + return true, err + default: + return false, nil + } +} + +func _CustomOneof_OneofSizer(msg proto.Message) (n int) { + m := msg.(*CustomOneof) + // custom + switch x := m.Custom.(type) { + case *CustomOneof_Stringy: + n += proto.SizeVarint(34<<3 | proto.WireBytes) + n += proto.SizeVarint(uint64(len(x.Stringy))) + n += len(x.Stringy) + case *CustomOneof_CustomType: + n += proto.SizeVarint(35<<3 | proto.WireBytes) + n += proto.SizeVarint(uint64(x.CustomType.Size())) + n += x.CustomType.Size() + case *CustomOneof_CastType: + n += proto.SizeVarint(36<<3 | proto.WireVarint) + n += proto.SizeVarint(uint64(x.CastType)) + case *CustomOneof_MyCustomName: + n += proto.SizeVarint(37<<3 | proto.WireVarint) + n += proto.SizeVarint(uint64(x.MyCustomName)) + case nil: + default: + panic(fmt.Sprintf("proto: unexpected type %T in oneof", x)) + } + return n +} + +func init() { + proto.RegisterType((*Subby)(nil), "one.Subby") + proto.RegisterType((*AllTypesOneOf)(nil), "one.AllTypesOneOf") + proto.RegisterType((*TwoOneofs)(nil), "one.TwoOneofs") + proto.RegisterType((*CustomOneof)(nil), "one.CustomOneof") +} +func (this *Subby) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return OneDescription() +} +func (this *AllTypesOneOf) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return OneDescription() +} +func (this *TwoOneofs) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return OneDescription() +} +func (this *CustomOneof) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return OneDescription() +} +func OneDescription() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + d := &github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet{} + var gzipped = []byte{ + // 3728 bytes of a gzipped FileDescriptorSet + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xcc, 0x5a, 0x5b, 0x6c, 0x1b, 0xe7, + 0x95, 0x36, 0xc5, 0x8b, 0xc8, 0x43, 0x8a, 0xa2, 0x46, 0x8a, 0x4d, 0x2b, 0x89, 0x65, 0xd3, 0xb9, + 0x38, 0x4e, 0x22, 0xd9, 0x92, 0xe5, 0x0b, 0xb3, 0x9b, 0x40, 0x94, 0x68, 0x45, 0x86, 0x24, 0x6a, + 0x47, 0x62, 0xe2, 0x64, 0x1f, 0x06, 0x23, 0x72, 0x44, 0xd1, 0x26, 0x67, 0xb8, 0x9c, 0xa1, 0x6d, + 0xe5, 0xc9, 0x8b, 0xec, 0x05, 0xc1, 0x62, 0x77, 0xdb, 0xb4, 0x40, 0x73, 0x6f, 0x13, 0xa0, 0x4d, + 0x9a, 0xde, 0x92, 0xde, 0x50, 0xf4, 0xa9, 0x40, 0x91, 0x36, 0x4f, 0x45, 0xda, 0xa7, 0xa2, 0x28, + 0x8c, 0x24, 0x0d, 0xd0, 0xb4, 0x4d, 0xdb, 0x14, 0x30, 0xd0, 0xa0, 0x79, 0xe9, 0xf9, 0x6f, 0x73, + 0x21, 0x29, 0x0d, 0x15, 0x34, 0x4d, 0x05, 0x10, 0xe2, 0x9c, 0x73, 0xbe, 0x6f, 0xfe, 0xff, 0xfc, + 0xe7, 0x3f, 0xe7, 0xcc, 0x3f, 0x84, 0x1f, 0x1e, 0x87, 0x83, 0x15, 0xc3, 0xa8, 0xd4, 0xb4, 0x89, + 0x46, 0xd3, 0xb0, 0x8c, 0xf5, 0xd6, 0xc6, 0x44, 0x59, 0x33, 0x4b, 0xcd, 0x6a, 0xc3, 0x32, 0x9a, + 0xe3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xb4, 0x74, 0x84, 0x12, 0xdc, 0xde, 0x41, 0xb0, 0xca, + 0xf4, 0xed, 0x1c, 0x02, 0x87, 0x53, 0x89, 0x69, 0x57, 0x2c, 0x4d, 0x37, 0xab, 0x86, 0x9e, 0xee, + 0xa7, 0x24, 0xb7, 0x76, 0x59, 0x45, 0xad, 0x56, 0x6e, 0xa7, 0x70, 0x70, 0xd2, 0x49, 0xe8, 0x37, + 0x1a, 0x16, 0x7e, 0x33, 0xd3, 0x51, 0x5c, 0x9f, 0xf8, 0xe4, 0x4d, 0x5d, 0x03, 0xa1, 0xc0, 0x6c, + 0x64, 0x61, 0x2c, 0x2d, 0x40, 0xca, 0x34, 0x5a, 0xcd, 0x92, 0xa6, 0x94, 0x8c, 0xb2, 0xa6, 0x54, + 0xf5, 0x0d, 0x23, 0x1d, 0xa3, 0x04, 0x63, 0x9d, 0x13, 0xa1, 0x86, 0xb3, 0x68, 0xb7, 0x80, 0x66, + 0x72, 0xd2, 0xf4, 0x5c, 0x4b, 0x7b, 0x21, 0x62, 0x6e, 0xe9, 0x96, 0x7a, 0x25, 0x9d, 0xa0, 0x11, + 0xc2, 0xaf, 0x32, 0x7f, 0x0e, 0xc3, 0x60, 0x2f, 0x21, 0x76, 0x0f, 0x84, 0x37, 0xc8, 0x2c, 0x31, + 0xc0, 0x76, 0xe1, 0x03, 0x86, 0xf1, 0x3a, 0x31, 0xf2, 0x11, 0x9d, 0x38, 0x03, 0x71, 0x5d, 0x33, + 0x2d, 0xad, 0xcc, 0x22, 0x22, 0xd8, 0x63, 0x4c, 0x01, 0x03, 0x75, 0x86, 0x54, 0xe8, 0x23, 0x85, + 0xd4, 0x79, 0x18, 0xb4, 0x87, 0xa4, 0x34, 0x55, 0xbd, 0x22, 0x62, 0x73, 0xc2, 0x6f, 0x24, 0xe3, + 0x79, 0x81, 0x93, 0x09, 0x4c, 0x4e, 0x6a, 0x9e, 0x6b, 0x69, 0x0e, 0xc0, 0xd0, 0x35, 0x63, 0x03, + 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 0x86, 0x85, + 0xb7, 0x18, 0xb0, 0x6f, 0x91, 0x5f, 0x2e, 0x2e, 0xa5, 0x92, 0xd2, 0x10, 0x0c, 0xb0, 0x5b, 0x88, + 0x41, 0x0c, 0xb6, 0x89, 0x70, 0xa4, 0x29, 0x67, 0x20, 0x8c, 0x65, 0xc8, 0x23, 0x40, 0x0b, 0x29, + 0x33, 0x0b, 0x61, 0x1a, 0x5d, 0x18, 0xc5, 0xc9, 0xc5, 0x99, 0x5c, 0x7e, 0x51, 0x29, 0xac, 0xac, + 0x2d, 0x14, 0x96, 0x67, 0x16, 0xd1, 0x77, 0xb6, 0x4c, 0xce, 0xff, 0x4b, 0x71, 0x41, 0xce, 0xcf, + 0xa1, 0xff, 0x5c, 0xb2, 0x95, 0xfc, 0xcc, 0x1a, 0xca, 0x82, 0x99, 0xa3, 0x30, 0xd2, 0x2d, 0xcf, + 0x74, 0xdb, 0x19, 0x99, 0x17, 0x02, 0x30, 0xdc, 0x25, 0x65, 0x76, 0xdd, 0x45, 0xf7, 0x41, 0x98, + 0x45, 0x1a, 0x2b, 0x22, 0x77, 0x74, 0xcd, 0xbd, 0x34, 0xee, 0x3a, 0x0a, 0x09, 0xc5, 0xb9, 0x0b, + 0x69, 0x70, 0x9b, 0x42, 0x4a, 0x28, 0x3a, 0xc2, 0xe9, 0xd1, 0x00, 0xa4, 0xb7, 0xe3, 0xf6, 0xd9, + 0xef, 0x7d, 0x9e, 0xfd, 0x7e, 0x4f, 0xfb, 0x00, 0x0e, 0x6d, 0x3f, 0x87, 0x8e, 0x51, 0xbc, 0x18, + 0x80, 0xbd, 0xdd, 0xfb, 0x8d, 0xae, 0x63, 0xb8, 0x17, 0x22, 0x75, 0xcd, 0xda, 0x34, 0x44, 0xcd, + 0xbd, 0xad, 0x4b, 0x26, 0x27, 0xea, 0x76, 0x5f, 0x71, 0x94, 0xbb, 0x14, 0x04, 0xb7, 0x6b, 0x1a, + 0xd8, 0x68, 0x3a, 0x46, 0xfa, 0x58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, 0xe5, 0x6a, 0x93, 0x86, 0x73, + 0x5d, 0x65, 0x9d, 0xa4, 0xbd, 0x12, 0x23, 0xdc, 0x0a, 0x1f, 0xef, 0x1f, 0x44, 0x9b, 0xb3, 0xd4, + 0x44, 0x5a, 0x84, 0x31, 0x74, 0x19, 0xf6, 0x9a, 0x7a, 0x59, 0x6d, 0x96, 0x15, 0xe7, 0xb8, 0x40, + 0x51, 0x4b, 0x18, 0x07, 0xa6, 0xc1, 0x2a, 0x89, 0xcd, 0x72, 0x93, 0x6e, 0xac, 0x72, 0x63, 0x27, + 0xc5, 0xce, 0x70, 0xd3, 0xb6, 0xa8, 0x09, 0x6e, 0x17, 0x35, 0xd8, 0x7b, 0xd5, 0xd5, 0x06, 0x86, + 0x8d, 0xd5, 0xdc, 0xa2, 0xdd, 0x5b, 0x54, 0x8e, 0xa2, 0x20, 0x4f, 0xae, 0x3f, 0xbe, 0x35, 0x70, + 0xfb, 0xf1, 0x97, 0x41, 0x48, 0xb8, 0x3b, 0x38, 0xd2, 0x10, 0x97, 0x68, 0x9a, 0x0f, 0xd0, 0x2c, + 0x70, 0x78, 0xc7, 0x7e, 0x6f, 0x7c, 0x96, 0xe4, 0xff, 0x6c, 0x84, 0xf5, 0x55, 0x32, 0x43, 0x92, + 0xda, 0x4b, 0x62, 0x4d, 0x63, 0xdd, 0x7a, 0x54, 0xe6, 0x57, 0x98, 0xec, 0x22, 0x17, 0x4c, 0xca, + 0x1d, 0xa1, 0xdc, 0xb7, 0xec, 0xcc, 0x7d, 0x6e, 0x95, 0x92, 0xc7, 0xce, 0xad, 0x2a, 0xcb, 0x05, + 0x79, 0x69, 0x66, 0x51, 0xe6, 0x70, 0x69, 0x3f, 0x84, 0x6a, 0xea, 0x23, 0x5b, 0xde, 0x4a, 0x41, + 0x45, 0xbd, 0x3a, 0x1e, 0x19, 0xc8, 0x91, 0x87, 0x37, 0x3f, 0x53, 0xd1, 0xc7, 0x18, 0xfa, 0x13, + 0x10, 0xa6, 0xf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c, 0x73, 0x13, 0xa5, 0x9d, + 0x14, 0x43, 0x25, 0x07, 0xef, 0xf4, 0x95, 0x7c, 0x30, 0x97, 0x7a, 0xfb, 0xda, 0x58, 0x62, 0x69, + 0xcb, 0x91, 0x3b, 0x43, 0x21, 0x57, 0xb9, 0x28, 0x44, 0xd8, 0x55, 0x6e, 0xee, 0xf5, 0xb7, 0x0e, + 0xec, 0x79, 0x03, 0x3f, 0x3f, 0xc7, 0xcf, 0x9b, 0x6f, 0x1d, 0x08, 0xbc, 0x8f, 0x9f, 0x0f, 0xf0, + 0x73, 0xf5, 0xed, 0x03, 0x81, 0x97, 0xf0, 0xf3, 0x0a, 0x7e, 0xbe, 0x87, 0x9f, 0xd7, 0xdf, 0x46, + 0x3b, 0xfc, 0xbc, 0x89, 0xdf, 0xdf, 0xc5, 0xff, 0xef, 0xe3, 0xff, 0x0f, 0xf0, 0x73, 0xf5, 0x57, + 0x07, 0xf6, 0xfc, 0x35, 0x00, 0x00, 0xff, 0xff, 0x93, 0x59, 0x7f, 0xe0, 0xed, 0x2e, 0x00, 0x00, + } + r := bytes.NewReader(gzipped) + gzipr, err := compress_gzip.NewReader(r) + if err != nil { + panic(err) + } + ungzipped, err := io_ioutil.ReadAll(gzipr) + if err != nil { + panic(err) + } + if err := github_com_gogo_protobuf_proto.Unmarshal(ungzipped, d); err != nil { + panic(err) + } + return d +} +func (this *Subby) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*Subby) + if !ok { + that2, ok := that.(Subby) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *Subby") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *Subby but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *Subby but is not nil && this == nil") + } + if this.Sub != nil && that1.Sub != nil { + if *this.Sub != *that1.Sub { + return fmt.Errorf("Sub this(%v) Not Equal that(%v)", *this.Sub, *that1.Sub) + } + } else if this.Sub != nil { + return fmt.Errorf("this.Sub == nil && that.Sub != nil") + } else if that1.Sub != nil { + return fmt.Errorf("Sub this(%v) Not Equal that(%v)", this.Sub, that1.Sub) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *Subby) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*Subby) + if !ok { + that2, ok := that.(Subby) + 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.Sub != nil && that1.Sub != nil { + if *this.Sub != *that1.Sub { + return false + } + } else if this.Sub != nil { + return false + } else if that1.Sub != nil { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *AllTypesOneOf) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*AllTypesOneOf) + if !ok { + that2, ok := that.(AllTypesOneOf) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *AllTypesOneOf") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *AllTypesOneOf but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *AllTypesOneOf but is not nil && this == nil") + } + if that1.TestOneof == nil { + if this.TestOneof != nil { + return fmt.Errorf("this.TestOneof != nil && that1.TestOneof == nil") + } + } else if this.TestOneof == nil { + return fmt.Errorf("this.TestOneof == nil && that1.TestOneof != nil") + } else if err := this.TestOneof.VerboseEqual(that1.TestOneof); err != nil { + return err + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *AllTypesOneOf_Field1) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*AllTypesOneOf_Field1) + if !ok { + that2, ok := that.(AllTypesOneOf_Field1) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *AllTypesOneOf_Field1") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *AllTypesOneOf_Field1 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *AllTypesOneOf_Field1 but is not nil && this == nil") + } + if this.Field1 != that1.Field1 { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) + } + return nil +} +func (this *AllTypesOneOf_Field2) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*AllTypesOneOf_Field2) + if !ok { + that2, ok := that.(AllTypesOneOf_Field2) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *AllTypesOneOf_Field2") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *AllTypesOneOf_Field2 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *AllTypesOneOf_Field2 but is not nil && this == nil") + } + if this.Field2 != that1.Field2 { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) + } + return nil +} +func (this *AllTypesOneOf_Field3) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*AllTypesOneOf_Field3) + if !ok { + that2, ok := that.(AllTypesOneOf_Field3) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *AllTypesOneOf_Field3") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *AllTypesOneOf_Field3 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *AllTypesOneOf_Field3 but is not nil && this == nil") + } + if this.Field3 != that1.Field3 { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", this.Field3, that1.Field3) + } + return nil +} +func (this *AllTypesOneOf_Field4) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*AllTypesOneOf_Field4) + if !ok { + that2, ok := that.(AllTypesOneOf_Field4) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *AllTypesOneOf_Field4") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *AllTypesOneOf_Field4 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *AllTypesOneOf_Field4 but is not nil && this == nil") + } + if this.Field4 != that1.Field4 { + return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", this.Field4, that1.Field4) + } + return nil +} +func (this *AllTypesOneOf_Field5) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*AllTypesOneOf_Field5) + if !ok { + that2, ok := that.(AllTypesOneOf_Field5) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *AllTypesOneOf_Field5") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *AllTypesOneOf_Field5 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *AllTypesOneOf_Field5 but is not nil && this == nil") + } + if this.Field5 != that1.Field5 { + return fmt.Errorf("Field5 this(%v) Not Equal that(%v)", this.Field5, that1.Field5) + } + return nil +} +func (this *AllTypesOneOf_Field6) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*AllTypesOneOf_Field6) + if !ok { + that2, ok := that.(AllTypesOneOf_Field6) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *AllTypesOneOf_Field6") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *AllTypesOneOf_Field6 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *AllTypesOneOf_Field6 but is not nil && this == nil") + } + if this.Field6 != that1.Field6 { + return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", this.Field6, that1.Field6) + } + return nil +} +func (this *AllTypesOneOf_Field7) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*AllTypesOneOf_Field7) + if !ok { + that2, ok := that.(AllTypesOneOf_Field7) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *AllTypesOneOf_Field7") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *AllTypesOneOf_Field7 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *AllTypesOneOf_Field7 but is not nil && this == nil") + } + if this.Field7 != that1.Field7 { + return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", this.Field7, that1.Field7) + } + return nil +} +func (this *AllTypesOneOf_Field8) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*AllTypesOneOf_Field8) + if !ok { + that2, ok := that.(AllTypesOneOf_Field8) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *AllTypesOneOf_Field8") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *AllTypesOneOf_Field8 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *AllTypesOneOf_Field8 but is not nil && this == nil") + } + if this.Field8 != that1.Field8 { + return fmt.Errorf("Field8 this(%v) Not Equal that(%v)", this.Field8, that1.Field8) + } + return nil +} +func (this *AllTypesOneOf_Field9) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*AllTypesOneOf_Field9) + if !ok { + that2, ok := that.(AllTypesOneOf_Field9) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *AllTypesOneOf_Field9") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *AllTypesOneOf_Field9 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *AllTypesOneOf_Field9 but is not nil && this == nil") + } + if this.Field9 != that1.Field9 { + return fmt.Errorf("Field9 this(%v) Not Equal that(%v)", this.Field9, that1.Field9) + } + return nil +} +func (this *AllTypesOneOf_Field10) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*AllTypesOneOf_Field10) + if !ok { + that2, ok := that.(AllTypesOneOf_Field10) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *AllTypesOneOf_Field10") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *AllTypesOneOf_Field10 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *AllTypesOneOf_Field10 but is not nil && this == nil") + } + if this.Field10 != that1.Field10 { + return fmt.Errorf("Field10 this(%v) Not Equal that(%v)", this.Field10, that1.Field10) + } + return nil +} +func (this *AllTypesOneOf_Field11) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*AllTypesOneOf_Field11) + if !ok { + that2, ok := that.(AllTypesOneOf_Field11) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *AllTypesOneOf_Field11") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *AllTypesOneOf_Field11 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *AllTypesOneOf_Field11 but is not nil && this == nil") + } + if this.Field11 != that1.Field11 { + return fmt.Errorf("Field11 this(%v) Not Equal that(%v)", this.Field11, that1.Field11) + } + return nil +} +func (this *AllTypesOneOf_Field12) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*AllTypesOneOf_Field12) + if !ok { + that2, ok := that.(AllTypesOneOf_Field12) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *AllTypesOneOf_Field12") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *AllTypesOneOf_Field12 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *AllTypesOneOf_Field12 but is not nil && this == nil") + } + if this.Field12 != that1.Field12 { + return fmt.Errorf("Field12 this(%v) Not Equal that(%v)", this.Field12, that1.Field12) + } + return nil +} +func (this *AllTypesOneOf_Field13) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*AllTypesOneOf_Field13) + if !ok { + that2, ok := that.(AllTypesOneOf_Field13) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *AllTypesOneOf_Field13") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *AllTypesOneOf_Field13 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *AllTypesOneOf_Field13 but is not nil && this == nil") + } + if this.Field13 != that1.Field13 { + return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", this.Field13, that1.Field13) + } + return nil +} +func (this *AllTypesOneOf_Field14) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*AllTypesOneOf_Field14) + if !ok { + that2, ok := that.(AllTypesOneOf_Field14) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *AllTypesOneOf_Field14") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *AllTypesOneOf_Field14 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *AllTypesOneOf_Field14 but is not nil && this == nil") + } + if this.Field14 != that1.Field14 { + return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", this.Field14, that1.Field14) + } + return nil +} +func (this *AllTypesOneOf_Field15) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*AllTypesOneOf_Field15) + if !ok { + that2, ok := that.(AllTypesOneOf_Field15) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *AllTypesOneOf_Field15") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *AllTypesOneOf_Field15 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *AllTypesOneOf_Field15 but is not nil && this == nil") + } + if !bytes.Equal(this.Field15, that1.Field15) { + return fmt.Errorf("Field15 this(%v) Not Equal that(%v)", this.Field15, that1.Field15) + } + return nil +} +func (this *AllTypesOneOf_SubMessage) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*AllTypesOneOf_SubMessage) + if !ok { + that2, ok := that.(AllTypesOneOf_SubMessage) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *AllTypesOneOf_SubMessage") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *AllTypesOneOf_SubMessage but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *AllTypesOneOf_SubMessage but is not nil && this == nil") + } + if !this.SubMessage.Equal(that1.SubMessage) { + return fmt.Errorf("SubMessage this(%v) Not Equal that(%v)", this.SubMessage, that1.SubMessage) + } + return nil +} +func (this *AllTypesOneOf) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*AllTypesOneOf) + if !ok { + that2, ok := that.(AllTypesOneOf) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + if this == nil { + return true + } + return false + } else if this == nil { + return false + } + if that1.TestOneof == nil { + if this.TestOneof != nil { + return false + } + } else if this.TestOneof == nil { + return false + } else if !this.TestOneof.Equal(that1.TestOneof) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *AllTypesOneOf_Field1) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*AllTypesOneOf_Field1) + if !ok { + that2, ok := that.(AllTypesOneOf_Field1) + 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.Field1 != that1.Field1 { + return false + } + return true +} +func (this *AllTypesOneOf_Field2) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*AllTypesOneOf_Field2) + if !ok { + that2, ok := that.(AllTypesOneOf_Field2) + 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.Field2 != that1.Field2 { + return false + } + return true +} +func (this *AllTypesOneOf_Field3) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*AllTypesOneOf_Field3) + if !ok { + that2, ok := that.(AllTypesOneOf_Field3) + 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.Field3 != that1.Field3 { + return false + } + return true +} +func (this *AllTypesOneOf_Field4) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*AllTypesOneOf_Field4) + if !ok { + that2, ok := that.(AllTypesOneOf_Field4) + 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.Field4 != that1.Field4 { + return false + } + return true +} +func (this *AllTypesOneOf_Field5) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*AllTypesOneOf_Field5) + if !ok { + that2, ok := that.(AllTypesOneOf_Field5) + 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.Field5 != that1.Field5 { + return false + } + return true +} +func (this *AllTypesOneOf_Field6) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*AllTypesOneOf_Field6) + if !ok { + that2, ok := that.(AllTypesOneOf_Field6) + 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.Field6 != that1.Field6 { + return false + } + return true +} +func (this *AllTypesOneOf_Field7) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*AllTypesOneOf_Field7) + if !ok { + that2, ok := that.(AllTypesOneOf_Field7) + 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.Field7 != that1.Field7 { + return false + } + return true +} +func (this *AllTypesOneOf_Field8) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*AllTypesOneOf_Field8) + if !ok { + that2, ok := that.(AllTypesOneOf_Field8) + 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.Field8 != that1.Field8 { + return false + } + return true +} +func (this *AllTypesOneOf_Field9) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*AllTypesOneOf_Field9) + if !ok { + that2, ok := that.(AllTypesOneOf_Field9) + 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.Field9 != that1.Field9 { + return false + } + return true +} +func (this *AllTypesOneOf_Field10) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*AllTypesOneOf_Field10) + if !ok { + that2, ok := that.(AllTypesOneOf_Field10) + 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.Field10 != that1.Field10 { + return false + } + return true +} +func (this *AllTypesOneOf_Field11) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*AllTypesOneOf_Field11) + if !ok { + that2, ok := that.(AllTypesOneOf_Field11) + 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.Field11 != that1.Field11 { + return false + } + return true +} +func (this *AllTypesOneOf_Field12) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*AllTypesOneOf_Field12) + if !ok { + that2, ok := that.(AllTypesOneOf_Field12) + 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.Field12 != that1.Field12 { + return false + } + return true +} +func (this *AllTypesOneOf_Field13) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*AllTypesOneOf_Field13) + if !ok { + that2, ok := that.(AllTypesOneOf_Field13) + 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.Field13 != that1.Field13 { + return false + } + return true +} +func (this *AllTypesOneOf_Field14) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*AllTypesOneOf_Field14) + if !ok { + that2, ok := that.(AllTypesOneOf_Field14) + 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.Field14 != that1.Field14 { + return false + } + return true +} +func (this *AllTypesOneOf_Field15) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*AllTypesOneOf_Field15) + if !ok { + that2, ok := that.(AllTypesOneOf_Field15) + 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.Field15, that1.Field15) { + return false + } + return true +} +func (this *AllTypesOneOf_SubMessage) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*AllTypesOneOf_SubMessage) + if !ok { + that2, ok := that.(AllTypesOneOf_SubMessage) + 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.SubMessage.Equal(that1.SubMessage) { + return false + } + return true +} +func (this *TwoOneofs) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*TwoOneofs) + if !ok { + that2, ok := that.(TwoOneofs) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *TwoOneofs") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *TwoOneofs but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *TwoOneofs but is not nil && this == nil") + } + if that1.One == nil { + if this.One != nil { + return fmt.Errorf("this.One != nil && that1.One == nil") + } + } else if this.One == nil { + return fmt.Errorf("this.One == nil && that1.One != nil") + } else if err := this.One.VerboseEqual(that1.One); err != nil { + return err + } + if that1.Two == nil { + if this.Two != nil { + return fmt.Errorf("this.Two != nil && that1.Two == nil") + } + } else if this.Two == nil { + return fmt.Errorf("this.Two == nil && that1.Two != nil") + } else if err := this.Two.VerboseEqual(that1.Two); err != nil { + return err + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *TwoOneofs_Field1) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*TwoOneofs_Field1) + if !ok { + that2, ok := that.(TwoOneofs_Field1) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *TwoOneofs_Field1") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *TwoOneofs_Field1 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *TwoOneofs_Field1 but is not nil && this == nil") + } + if this.Field1 != that1.Field1 { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) + } + return nil +} +func (this *TwoOneofs_Field2) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*TwoOneofs_Field2) + if !ok { + that2, ok := that.(TwoOneofs_Field2) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *TwoOneofs_Field2") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *TwoOneofs_Field2 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *TwoOneofs_Field2 but is not nil && this == nil") + } + if this.Field2 != that1.Field2 { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) + } + return nil +} +func (this *TwoOneofs_Field3) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*TwoOneofs_Field3) + if !ok { + that2, ok := that.(TwoOneofs_Field3) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *TwoOneofs_Field3") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *TwoOneofs_Field3 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *TwoOneofs_Field3 but is not nil && this == nil") + } + if this.Field3 != that1.Field3 { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", this.Field3, that1.Field3) + } + return nil +} +func (this *TwoOneofs_Field34) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*TwoOneofs_Field34) + if !ok { + that2, ok := that.(TwoOneofs_Field34) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *TwoOneofs_Field34") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *TwoOneofs_Field34 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *TwoOneofs_Field34 but is not nil && this == nil") + } + if this.Field34 != that1.Field34 { + return fmt.Errorf("Field34 this(%v) Not Equal that(%v)", this.Field34, that1.Field34) + } + return nil +} +func (this *TwoOneofs_Field35) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*TwoOneofs_Field35) + if !ok { + that2, ok := that.(TwoOneofs_Field35) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *TwoOneofs_Field35") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *TwoOneofs_Field35 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *TwoOneofs_Field35 but is not nil && this == nil") + } + if !bytes.Equal(this.Field35, that1.Field35) { + return fmt.Errorf("Field35 this(%v) Not Equal that(%v)", this.Field35, that1.Field35) + } + return nil +} +func (this *TwoOneofs_SubMessage2) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*TwoOneofs_SubMessage2) + if !ok { + that2, ok := that.(TwoOneofs_SubMessage2) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *TwoOneofs_SubMessage2") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *TwoOneofs_SubMessage2 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *TwoOneofs_SubMessage2 but is not nil && this == nil") + } + if !this.SubMessage2.Equal(that1.SubMessage2) { + return fmt.Errorf("SubMessage2 this(%v) Not Equal that(%v)", this.SubMessage2, that1.SubMessage2) + } + return nil +} +func (this *TwoOneofs) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*TwoOneofs) + if !ok { + that2, ok := that.(TwoOneofs) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + if this == nil { + return true + } + return false + } else if this == nil { + return false + } + if that1.One == nil { + if this.One != nil { + return false + } + } else if this.One == nil { + return false + } else if !this.One.Equal(that1.One) { + return false + } + if that1.Two == nil { + if this.Two != nil { + return false + } + } else if this.Two == nil { + return false + } else if !this.Two.Equal(that1.Two) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *TwoOneofs_Field1) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*TwoOneofs_Field1) + if !ok { + that2, ok := that.(TwoOneofs_Field1) + 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.Field1 != that1.Field1 { + return false + } + return true +} +func (this *TwoOneofs_Field2) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*TwoOneofs_Field2) + if !ok { + that2, ok := that.(TwoOneofs_Field2) + 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.Field2 != that1.Field2 { + return false + } + return true +} +func (this *TwoOneofs_Field3) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*TwoOneofs_Field3) + if !ok { + that2, ok := that.(TwoOneofs_Field3) + 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.Field3 != that1.Field3 { + return false + } + return true +} +func (this *TwoOneofs_Field34) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*TwoOneofs_Field34) + if !ok { + that2, ok := that.(TwoOneofs_Field34) + 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.Field34 != that1.Field34 { + return false + } + return true +} +func (this *TwoOneofs_Field35) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*TwoOneofs_Field35) + if !ok { + that2, ok := that.(TwoOneofs_Field35) + 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.Field35, that1.Field35) { + return false + } + return true +} +func (this *TwoOneofs_SubMessage2) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*TwoOneofs_SubMessage2) + if !ok { + that2, ok := that.(TwoOneofs_SubMessage2) + 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.SubMessage2.Equal(that1.SubMessage2) { + return false + } + return true +} +func (this *CustomOneof) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*CustomOneof) + if !ok { + that2, ok := that.(CustomOneof) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *CustomOneof") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *CustomOneof but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *CustomOneof but is not nil && this == nil") + } + if that1.Custom == nil { + if this.Custom != nil { + return fmt.Errorf("this.Custom != nil && that1.Custom == nil") + } + } else if this.Custom == nil { + return fmt.Errorf("this.Custom == nil && that1.Custom != nil") + } else if err := this.Custom.VerboseEqual(that1.Custom); err != nil { + return err + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *CustomOneof_Stringy) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*CustomOneof_Stringy) + if !ok { + that2, ok := that.(CustomOneof_Stringy) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *CustomOneof_Stringy") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *CustomOneof_Stringy but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *CustomOneof_Stringy but is not nil && this == nil") + } + if this.Stringy != that1.Stringy { + return fmt.Errorf("Stringy this(%v) Not Equal that(%v)", this.Stringy, that1.Stringy) + } + return nil +} +func (this *CustomOneof_CustomType) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*CustomOneof_CustomType) + if !ok { + that2, ok := that.(CustomOneof_CustomType) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *CustomOneof_CustomType") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *CustomOneof_CustomType but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *CustomOneof_CustomType but is not nil && this == nil") + } + if !this.CustomType.Equal(that1.CustomType) { + return fmt.Errorf("CustomType this(%v) Not Equal that(%v)", this.CustomType, that1.CustomType) + } + return nil +} +func (this *CustomOneof_CastType) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*CustomOneof_CastType) + if !ok { + that2, ok := that.(CustomOneof_CastType) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *CustomOneof_CastType") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *CustomOneof_CastType but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *CustomOneof_CastType but is not nil && this == nil") + } + if this.CastType != that1.CastType { + return fmt.Errorf("CastType this(%v) Not Equal that(%v)", this.CastType, that1.CastType) + } + return nil +} +func (this *CustomOneof_MyCustomName) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*CustomOneof_MyCustomName) + if !ok { + that2, ok := that.(CustomOneof_MyCustomName) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *CustomOneof_MyCustomName") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *CustomOneof_MyCustomName but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *CustomOneof_MyCustomName but is not nil && this == nil") + } + if this.MyCustomName != that1.MyCustomName { + return fmt.Errorf("MyCustomName this(%v) Not Equal that(%v)", this.MyCustomName, that1.MyCustomName) + } + return nil +} +func (this *CustomOneof) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*CustomOneof) + if !ok { + that2, ok := that.(CustomOneof) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + if this == nil { + return true + } + return false + } else if this == nil { + return false + } + if that1.Custom == nil { + if this.Custom != nil { + return false + } + } else if this.Custom == nil { + return false + } else if !this.Custom.Equal(that1.Custom) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *CustomOneof_Stringy) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*CustomOneof_Stringy) + if !ok { + that2, ok := that.(CustomOneof_Stringy) + 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.Stringy != that1.Stringy { + return false + } + return true +} +func (this *CustomOneof_CustomType) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*CustomOneof_CustomType) + if !ok { + that2, ok := that.(CustomOneof_CustomType) + 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.CustomType.Equal(that1.CustomType) { + return false + } + return true +} +func (this *CustomOneof_CastType) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*CustomOneof_CastType) + if !ok { + that2, ok := that.(CustomOneof_CastType) + 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.CastType != that1.CastType { + return false + } + return true +} +func (this *CustomOneof_MyCustomName) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*CustomOneof_MyCustomName) + if !ok { + that2, ok := that.(CustomOneof_MyCustomName) + 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.MyCustomName != that1.MyCustomName { + return false + } + return true +} +func (this *Subby) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&one.Subby{") + if this.Sub != nil { + s = append(s, "Sub: "+valueToGoStringOne(this.Sub, "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 *AllTypesOneOf) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 20) + s = append(s, "&one.AllTypesOneOf{") + if this.TestOneof != nil { + s = append(s, "TestOneof: "+fmt.Sprintf("%#v", this.TestOneof)+",\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 *AllTypesOneOf_Field1) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.AllTypesOneOf_Field1{` + + `Field1:` + fmt.Sprintf("%#v", this.Field1) + `}`}, ", ") + return s +} +func (this *AllTypesOneOf_Field2) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.AllTypesOneOf_Field2{` + + `Field2:` + fmt.Sprintf("%#v", this.Field2) + `}`}, ", ") + return s +} +func (this *AllTypesOneOf_Field3) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.AllTypesOneOf_Field3{` + + `Field3:` + fmt.Sprintf("%#v", this.Field3) + `}`}, ", ") + return s +} +func (this *AllTypesOneOf_Field4) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.AllTypesOneOf_Field4{` + + `Field4:` + fmt.Sprintf("%#v", this.Field4) + `}`}, ", ") + return s +} +func (this *AllTypesOneOf_Field5) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.AllTypesOneOf_Field5{` + + `Field5:` + fmt.Sprintf("%#v", this.Field5) + `}`}, ", ") + return s +} +func (this *AllTypesOneOf_Field6) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.AllTypesOneOf_Field6{` + + `Field6:` + fmt.Sprintf("%#v", this.Field6) + `}`}, ", ") + return s +} +func (this *AllTypesOneOf_Field7) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.AllTypesOneOf_Field7{` + + `Field7:` + fmt.Sprintf("%#v", this.Field7) + `}`}, ", ") + return s +} +func (this *AllTypesOneOf_Field8) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.AllTypesOneOf_Field8{` + + `Field8:` + fmt.Sprintf("%#v", this.Field8) + `}`}, ", ") + return s +} +func (this *AllTypesOneOf_Field9) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.AllTypesOneOf_Field9{` + + `Field9:` + fmt.Sprintf("%#v", this.Field9) + `}`}, ", ") + return s +} +func (this *AllTypesOneOf_Field10) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.AllTypesOneOf_Field10{` + + `Field10:` + fmt.Sprintf("%#v", this.Field10) + `}`}, ", ") + return s +} +func (this *AllTypesOneOf_Field11) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.AllTypesOneOf_Field11{` + + `Field11:` + fmt.Sprintf("%#v", this.Field11) + `}`}, ", ") + return s +} +func (this *AllTypesOneOf_Field12) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.AllTypesOneOf_Field12{` + + `Field12:` + fmt.Sprintf("%#v", this.Field12) + `}`}, ", ") + return s +} +func (this *AllTypesOneOf_Field13) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.AllTypesOneOf_Field13{` + + `Field13:` + fmt.Sprintf("%#v", this.Field13) + `}`}, ", ") + return s +} +func (this *AllTypesOneOf_Field14) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.AllTypesOneOf_Field14{` + + `Field14:` + fmt.Sprintf("%#v", this.Field14) + `}`}, ", ") + return s +} +func (this *AllTypesOneOf_Field15) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.AllTypesOneOf_Field15{` + + `Field15:` + fmt.Sprintf("%#v", this.Field15) + `}`}, ", ") + return s +} +func (this *AllTypesOneOf_SubMessage) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.AllTypesOneOf_SubMessage{` + + `SubMessage:` + fmt.Sprintf("%#v", this.SubMessage) + `}`}, ", ") + return s +} +func (this *TwoOneofs) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 10) + s = append(s, "&one.TwoOneofs{") + if this.One != nil { + s = append(s, "One: "+fmt.Sprintf("%#v", this.One)+",\n") + } + if this.Two != nil { + s = append(s, "Two: "+fmt.Sprintf("%#v", this.Two)+",\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 *TwoOneofs_Field1) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.TwoOneofs_Field1{` + + `Field1:` + fmt.Sprintf("%#v", this.Field1) + `}`}, ", ") + return s +} +func (this *TwoOneofs_Field2) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.TwoOneofs_Field2{` + + `Field2:` + fmt.Sprintf("%#v", this.Field2) + `}`}, ", ") + return s +} +func (this *TwoOneofs_Field3) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.TwoOneofs_Field3{` + + `Field3:` + fmt.Sprintf("%#v", this.Field3) + `}`}, ", ") + return s +} +func (this *TwoOneofs_Field34) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.TwoOneofs_Field34{` + + `Field34:` + fmt.Sprintf("%#v", this.Field34) + `}`}, ", ") + return s +} +func (this *TwoOneofs_Field35) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.TwoOneofs_Field35{` + + `Field35:` + fmt.Sprintf("%#v", this.Field35) + `}`}, ", ") + return s +} +func (this *TwoOneofs_SubMessage2) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.TwoOneofs_SubMessage2{` + + `SubMessage2:` + fmt.Sprintf("%#v", this.SubMessage2) + `}`}, ", ") + return s +} +func (this *CustomOneof) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 8) + s = append(s, "&one.CustomOneof{") + if this.Custom != nil { + s = append(s, "Custom: "+fmt.Sprintf("%#v", this.Custom)+",\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 *CustomOneof_Stringy) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.CustomOneof_Stringy{` + + `Stringy:` + fmt.Sprintf("%#v", this.Stringy) + `}`}, ", ") + return s +} +func (this *CustomOneof_CustomType) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.CustomOneof_CustomType{` + + `CustomType:` + fmt.Sprintf("%#v", this.CustomType) + `}`}, ", ") + return s +} +func (this *CustomOneof_CastType) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.CustomOneof_CastType{` + + `CastType:` + fmt.Sprintf("%#v", this.CastType) + `}`}, ", ") + return s +} +func (this *CustomOneof_MyCustomName) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.CustomOneof_MyCustomName{` + + `MyCustomName:` + fmt.Sprintf("%#v", this.MyCustomName) + `}`}, ", ") + return s +} +func valueToGoStringOne(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 extensionToGoStringOne(e map[int32]github_com_gogo_protobuf_proto.Extension) string { + if e == nil { + return "nil" + } + s := "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 +} +func NewPopulatedSubby(r randyOne, easy bool) *Subby { + this := &Subby{} + if r.Intn(10) != 0 { + v1 := randStringOne(r) + this.Sub = &v1 + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedOne(r, 2) + } + return this +} + +func NewPopulatedAllTypesOneOf(r randyOne, easy bool) *AllTypesOneOf { + this := &AllTypesOneOf{} + oneofNumber_TestOneof := []int32{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}[r.Intn(16)] + switch oneofNumber_TestOneof { + case 1: + this.TestOneof = NewPopulatedAllTypesOneOf_Field1(r, easy) + case 2: + this.TestOneof = NewPopulatedAllTypesOneOf_Field2(r, easy) + case 3: + this.TestOneof = NewPopulatedAllTypesOneOf_Field3(r, easy) + case 4: + this.TestOneof = NewPopulatedAllTypesOneOf_Field4(r, easy) + case 5: + this.TestOneof = NewPopulatedAllTypesOneOf_Field5(r, easy) + case 6: + this.TestOneof = NewPopulatedAllTypesOneOf_Field6(r, easy) + case 7: + this.TestOneof = NewPopulatedAllTypesOneOf_Field7(r, easy) + case 8: + this.TestOneof = NewPopulatedAllTypesOneOf_Field8(r, easy) + case 9: + this.TestOneof = NewPopulatedAllTypesOneOf_Field9(r, easy) + case 10: + this.TestOneof = NewPopulatedAllTypesOneOf_Field10(r, easy) + case 11: + this.TestOneof = NewPopulatedAllTypesOneOf_Field11(r, easy) + case 12: + this.TestOneof = NewPopulatedAllTypesOneOf_Field12(r, easy) + case 13: + this.TestOneof = NewPopulatedAllTypesOneOf_Field13(r, easy) + case 14: + this.TestOneof = NewPopulatedAllTypesOneOf_Field14(r, easy) + case 15: + this.TestOneof = NewPopulatedAllTypesOneOf_Field15(r, easy) + case 16: + this.TestOneof = NewPopulatedAllTypesOneOf_SubMessage(r, easy) + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedOne(r, 17) + } + return this +} + +func NewPopulatedAllTypesOneOf_Field1(r randyOne, easy bool) *AllTypesOneOf_Field1 { + this := &AllTypesOneOf_Field1{} + this.Field1 = float64(r.Float64()) + if r.Intn(2) == 0 { + this.Field1 *= -1 + } + return this +} +func NewPopulatedAllTypesOneOf_Field2(r randyOne, easy bool) *AllTypesOneOf_Field2 { + this := &AllTypesOneOf_Field2{} + this.Field2 = float32(r.Float32()) + if r.Intn(2) == 0 { + this.Field2 *= -1 + } + return this +} +func NewPopulatedAllTypesOneOf_Field3(r randyOne, easy bool) *AllTypesOneOf_Field3 { + this := &AllTypesOneOf_Field3{} + this.Field3 = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Field3 *= -1 + } + return this +} +func NewPopulatedAllTypesOneOf_Field4(r randyOne, easy bool) *AllTypesOneOf_Field4 { + this := &AllTypesOneOf_Field4{} + this.Field4 = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Field4 *= -1 + } + return this +} +func NewPopulatedAllTypesOneOf_Field5(r randyOne, easy bool) *AllTypesOneOf_Field5 { + this := &AllTypesOneOf_Field5{} + this.Field5 = uint32(r.Uint32()) + return this +} +func NewPopulatedAllTypesOneOf_Field6(r randyOne, easy bool) *AllTypesOneOf_Field6 { + this := &AllTypesOneOf_Field6{} + this.Field6 = uint64(uint64(r.Uint32())) + return this +} +func NewPopulatedAllTypesOneOf_Field7(r randyOne, easy bool) *AllTypesOneOf_Field7 { + this := &AllTypesOneOf_Field7{} + this.Field7 = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Field7 *= -1 + } + return this +} +func NewPopulatedAllTypesOneOf_Field8(r randyOne, easy bool) *AllTypesOneOf_Field8 { + this := &AllTypesOneOf_Field8{} + this.Field8 = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Field8 *= -1 + } + return this +} +func NewPopulatedAllTypesOneOf_Field9(r randyOne, easy bool) *AllTypesOneOf_Field9 { + this := &AllTypesOneOf_Field9{} + this.Field9 = uint32(r.Uint32()) + return this +} +func NewPopulatedAllTypesOneOf_Field10(r randyOne, easy bool) *AllTypesOneOf_Field10 { + this := &AllTypesOneOf_Field10{} + this.Field10 = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Field10 *= -1 + } + return this +} +func NewPopulatedAllTypesOneOf_Field11(r randyOne, easy bool) *AllTypesOneOf_Field11 { + this := &AllTypesOneOf_Field11{} + this.Field11 = uint64(uint64(r.Uint32())) + return this +} +func NewPopulatedAllTypesOneOf_Field12(r randyOne, easy bool) *AllTypesOneOf_Field12 { + this := &AllTypesOneOf_Field12{} + this.Field12 = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Field12 *= -1 + } + return this +} +func NewPopulatedAllTypesOneOf_Field13(r randyOne, easy bool) *AllTypesOneOf_Field13 { + this := &AllTypesOneOf_Field13{} + this.Field13 = bool(bool(r.Intn(2) == 0)) + return this +} +func NewPopulatedAllTypesOneOf_Field14(r randyOne, easy bool) *AllTypesOneOf_Field14 { + this := &AllTypesOneOf_Field14{} + this.Field14 = randStringOne(r) + return this +} +func NewPopulatedAllTypesOneOf_Field15(r randyOne, easy bool) *AllTypesOneOf_Field15 { + this := &AllTypesOneOf_Field15{} + v2 := r.Intn(100) + this.Field15 = make([]byte, v2) + for i := 0; i < v2; i++ { + this.Field15[i] = byte(r.Intn(256)) + } + return this +} +func NewPopulatedAllTypesOneOf_SubMessage(r randyOne, easy bool) *AllTypesOneOf_SubMessage { + this := &AllTypesOneOf_SubMessage{} + this.SubMessage = NewPopulatedSubby(r, easy) + return this +} +func NewPopulatedTwoOneofs(r randyOne, easy bool) *TwoOneofs { + this := &TwoOneofs{} + oneofNumber_One := []int32{1, 2, 3}[r.Intn(3)] + switch oneofNumber_One { + case 1: + this.One = NewPopulatedTwoOneofs_Field1(r, easy) + case 2: + this.One = NewPopulatedTwoOneofs_Field2(r, easy) + case 3: + this.One = NewPopulatedTwoOneofs_Field3(r, easy) + } + oneofNumber_Two := []int32{34, 35, 36}[r.Intn(3)] + switch oneofNumber_Two { + case 34: + this.Two = NewPopulatedTwoOneofs_Field34(r, easy) + case 35: + this.Two = NewPopulatedTwoOneofs_Field35(r, easy) + case 36: + this.Two = NewPopulatedTwoOneofs_SubMessage2(r, easy) + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedOne(r, 37) + } + return this +} + +func NewPopulatedTwoOneofs_Field1(r randyOne, easy bool) *TwoOneofs_Field1 { + this := &TwoOneofs_Field1{} + this.Field1 = float64(r.Float64()) + if r.Intn(2) == 0 { + this.Field1 *= -1 + } + return this +} +func NewPopulatedTwoOneofs_Field2(r randyOne, easy bool) *TwoOneofs_Field2 { + this := &TwoOneofs_Field2{} + this.Field2 = float32(r.Float32()) + if r.Intn(2) == 0 { + this.Field2 *= -1 + } + return this +} +func NewPopulatedTwoOneofs_Field3(r randyOne, easy bool) *TwoOneofs_Field3 { + this := &TwoOneofs_Field3{} + this.Field3 = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Field3 *= -1 + } + return this +} +func NewPopulatedTwoOneofs_Field34(r randyOne, easy bool) *TwoOneofs_Field34 { + this := &TwoOneofs_Field34{} + this.Field34 = randStringOne(r) + return this +} +func NewPopulatedTwoOneofs_Field35(r randyOne, easy bool) *TwoOneofs_Field35 { + this := &TwoOneofs_Field35{} + v3 := r.Intn(100) + this.Field35 = make([]byte, v3) + for i := 0; i < v3; i++ { + this.Field35[i] = byte(r.Intn(256)) + } + return this +} +func NewPopulatedTwoOneofs_SubMessage2(r randyOne, easy bool) *TwoOneofs_SubMessage2 { + this := &TwoOneofs_SubMessage2{} + this.SubMessage2 = NewPopulatedSubby(r, easy) + return this +} +func NewPopulatedCustomOneof(r randyOne, easy bool) *CustomOneof { + this := &CustomOneof{} + oneofNumber_Custom := []int32{34, 35, 36, 37}[r.Intn(4)] + switch oneofNumber_Custom { + case 34: + this.Custom = NewPopulatedCustomOneof_Stringy(r, easy) + case 35: + this.Custom = NewPopulatedCustomOneof_CustomType(r, easy) + case 36: + this.Custom = NewPopulatedCustomOneof_CastType(r, easy) + case 37: + this.Custom = NewPopulatedCustomOneof_MyCustomName(r, easy) + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedOne(r, 38) + } + return this +} + +func NewPopulatedCustomOneof_Stringy(r randyOne, easy bool) *CustomOneof_Stringy { + this := &CustomOneof_Stringy{} + this.Stringy = randStringOne(r) + return this +} +func NewPopulatedCustomOneof_CustomType(r randyOne, easy bool) *CustomOneof_CustomType { + this := &CustomOneof_CustomType{} + v4 := github_com_gogo_protobuf_test_custom.NewPopulatedUint128(r) + this.CustomType = *v4 + return this +} +func NewPopulatedCustomOneof_CastType(r randyOne, easy bool) *CustomOneof_CastType { + this := &CustomOneof_CastType{} + this.CastType = github_com_gogo_protobuf_test_casttype.MyUint64Type(uint64(r.Uint32())) + return this +} +func NewPopulatedCustomOneof_MyCustomName(r randyOne, easy bool) *CustomOneof_MyCustomName { + this := &CustomOneof_MyCustomName{} + this.MyCustomName = int64(r.Int63()) + if r.Intn(2) == 0 { + this.MyCustomName *= -1 + } + return this +} + +type randyOne interface { + Float32() float32 + Float64() float64 + Int63() int64 + Int31() int32 + Uint32() uint32 + Intn(n int) int +} + +func randUTF8RuneOne(r randyOne) 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 randStringOne(r randyOne) string { + v5 := r.Intn(100) + tmps := make([]rune, v5) + for i := 0; i < v5; i++ { + tmps[i] = randUTF8RuneOne(r) + } + return string(tmps) +} +func randUnrecognizedOne(r randyOne, 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 = randFieldOne(data, r, fieldNumber, wire) + } + return data +} +func randFieldOne(data []byte, r randyOne, fieldNumber int, wire int) []byte { + key := uint32(fieldNumber)<<3 | uint32(wire) + switch wire { + case 0: + data = encodeVarintPopulateOne(data, uint64(key)) + v6 := r.Int63() + if r.Intn(2) == 0 { + v6 *= -1 + } + data = encodeVarintPopulateOne(data, uint64(v6)) + case 1: + data = encodeVarintPopulateOne(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 = encodeVarintPopulateOne(data, uint64(key)) + ll := r.Intn(100) + data = encodeVarintPopulateOne(data, uint64(ll)) + for j := 0; j < ll; j++ { + data = append(data, byte(r.Intn(256))) + } + default: + data = encodeVarintPopulateOne(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 encodeVarintPopulateOne(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 *Subby) Size() (n int) { + var l int + _ = l + if m.Sub != nil { + l = len(*m.Sub) + n += 1 + l + sovOne(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *AllTypesOneOf) Size() (n int) { + var l int + _ = l + if m.TestOneof != nil { + n += m.TestOneof.Size() + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *AllTypesOneOf_Field1) Size() (n int) { + var l int + _ = l + n += 9 + return n +} +func (m *AllTypesOneOf_Field2) Size() (n int) { + var l int + _ = l + n += 5 + return n +} +func (m *AllTypesOneOf_Field3) Size() (n int) { + var l int + _ = l + n += 1 + sovOne(uint64(m.Field3)) + return n +} +func (m *AllTypesOneOf_Field4) Size() (n int) { + var l int + _ = l + n += 1 + sovOne(uint64(m.Field4)) + return n +} +func (m *AllTypesOneOf_Field5) Size() (n int) { + var l int + _ = l + n += 1 + sovOne(uint64(m.Field5)) + return n +} +func (m *AllTypesOneOf_Field6) Size() (n int) { + var l int + _ = l + n += 1 + sovOne(uint64(m.Field6)) + return n +} +func (m *AllTypesOneOf_Field7) Size() (n int) { + var l int + _ = l + n += 1 + sozOne(uint64(m.Field7)) + return n +} +func (m *AllTypesOneOf_Field8) Size() (n int) { + var l int + _ = l + n += 1 + sozOne(uint64(m.Field8)) + return n +} +func (m *AllTypesOneOf_Field9) Size() (n int) { + var l int + _ = l + n += 5 + return n +} +func (m *AllTypesOneOf_Field10) Size() (n int) { + var l int + _ = l + n += 5 + return n +} +func (m *AllTypesOneOf_Field11) Size() (n int) { + var l int + _ = l + n += 9 + return n +} +func (m *AllTypesOneOf_Field12) Size() (n int) { + var l int + _ = l + n += 9 + return n +} +func (m *AllTypesOneOf_Field13) Size() (n int) { + var l int + _ = l + n += 2 + return n +} +func (m *AllTypesOneOf_Field14) Size() (n int) { + var l int + _ = l + l = len(m.Field14) + n += 1 + l + sovOne(uint64(l)) + return n +} +func (m *AllTypesOneOf_Field15) Size() (n int) { + var l int + _ = l + if m.Field15 != nil { + l = len(m.Field15) + n += 1 + l + sovOne(uint64(l)) + } + return n +} +func (m *AllTypesOneOf_SubMessage) Size() (n int) { + var l int + _ = l + if m.SubMessage != nil { + l = m.SubMessage.Size() + n += 2 + l + sovOne(uint64(l)) + } + return n +} +func (m *TwoOneofs) Size() (n int) { + var l int + _ = l + if m.One != nil { + n += m.One.Size() + } + if m.Two != nil { + n += m.Two.Size() + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *TwoOneofs_Field1) Size() (n int) { + var l int + _ = l + n += 9 + return n +} +func (m *TwoOneofs_Field2) Size() (n int) { + var l int + _ = l + n += 5 + return n +} +func (m *TwoOneofs_Field3) Size() (n int) { + var l int + _ = l + n += 1 + sovOne(uint64(m.Field3)) + return n +} +func (m *TwoOneofs_Field34) Size() (n int) { + var l int + _ = l + l = len(m.Field34) + n += 2 + l + sovOne(uint64(l)) + return n +} +func (m *TwoOneofs_Field35) Size() (n int) { + var l int + _ = l + if m.Field35 != nil { + l = len(m.Field35) + n += 2 + l + sovOne(uint64(l)) + } + return n +} +func (m *TwoOneofs_SubMessage2) Size() (n int) { + var l int + _ = l + if m.SubMessage2 != nil { + l = m.SubMessage2.Size() + n += 2 + l + sovOne(uint64(l)) + } + return n +} +func (m *CustomOneof) Size() (n int) { + var l int + _ = l + if m.Custom != nil { + n += m.Custom.Size() + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *CustomOneof_Stringy) Size() (n int) { + var l int + _ = l + l = len(m.Stringy) + n += 2 + l + sovOne(uint64(l)) + return n +} +func (m *CustomOneof_CustomType) Size() (n int) { + var l int + _ = l + l = m.CustomType.Size() + n += 2 + l + sovOne(uint64(l)) + return n +} +func (m *CustomOneof_CastType) Size() (n int) { + var l int + _ = l + n += 2 + sovOne(uint64(m.CastType)) + return n +} +func (m *CustomOneof_MyCustomName) Size() (n int) { + var l int + _ = l + n += 2 + sovOne(uint64(m.MyCustomName)) + return n +} + +func sovOne(x uint64) (n int) { + for { + n++ + x >>= 7 + if x == 0 { + break + } + } + return n +} +func sozOne(x uint64) (n int) { + return sovOne(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (this *Subby) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&Subby{`, + `Sub:` + valueToStringOne(this.Sub) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *AllTypesOneOf) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&AllTypesOneOf{`, + `TestOneof:` + fmt.Sprintf("%v", this.TestOneof) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *AllTypesOneOf_Field1) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&AllTypesOneOf_Field1{`, + `Field1:` + fmt.Sprintf("%v", this.Field1) + `,`, + `}`, + }, "") + return s +} +func (this *AllTypesOneOf_Field2) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&AllTypesOneOf_Field2{`, + `Field2:` + fmt.Sprintf("%v", this.Field2) + `,`, + `}`, + }, "") + return s +} +func (this *AllTypesOneOf_Field3) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&AllTypesOneOf_Field3{`, + `Field3:` + fmt.Sprintf("%v", this.Field3) + `,`, + `}`, + }, "") + return s +} +func (this *AllTypesOneOf_Field4) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&AllTypesOneOf_Field4{`, + `Field4:` + fmt.Sprintf("%v", this.Field4) + `,`, + `}`, + }, "") + return s +} +func (this *AllTypesOneOf_Field5) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&AllTypesOneOf_Field5{`, + `Field5:` + fmt.Sprintf("%v", this.Field5) + `,`, + `}`, + }, "") + return s +} +func (this *AllTypesOneOf_Field6) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&AllTypesOneOf_Field6{`, + `Field6:` + fmt.Sprintf("%v", this.Field6) + `,`, + `}`, + }, "") + return s +} +func (this *AllTypesOneOf_Field7) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&AllTypesOneOf_Field7{`, + `Field7:` + fmt.Sprintf("%v", this.Field7) + `,`, + `}`, + }, "") + return s +} +func (this *AllTypesOneOf_Field8) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&AllTypesOneOf_Field8{`, + `Field8:` + fmt.Sprintf("%v", this.Field8) + `,`, + `}`, + }, "") + return s +} +func (this *AllTypesOneOf_Field9) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&AllTypesOneOf_Field9{`, + `Field9:` + fmt.Sprintf("%v", this.Field9) + `,`, + `}`, + }, "") + return s +} +func (this *AllTypesOneOf_Field10) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&AllTypesOneOf_Field10{`, + `Field10:` + fmt.Sprintf("%v", this.Field10) + `,`, + `}`, + }, "") + return s +} +func (this *AllTypesOneOf_Field11) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&AllTypesOneOf_Field11{`, + `Field11:` + fmt.Sprintf("%v", this.Field11) + `,`, + `}`, + }, "") + return s +} +func (this *AllTypesOneOf_Field12) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&AllTypesOneOf_Field12{`, + `Field12:` + fmt.Sprintf("%v", this.Field12) + `,`, + `}`, + }, "") + return s +} +func (this *AllTypesOneOf_Field13) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&AllTypesOneOf_Field13{`, + `Field13:` + fmt.Sprintf("%v", this.Field13) + `,`, + `}`, + }, "") + return s +} +func (this *AllTypesOneOf_Field14) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&AllTypesOneOf_Field14{`, + `Field14:` + fmt.Sprintf("%v", this.Field14) + `,`, + `}`, + }, "") + return s +} +func (this *AllTypesOneOf_Field15) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&AllTypesOneOf_Field15{`, + `Field15:` + fmt.Sprintf("%v", this.Field15) + `,`, + `}`, + }, "") + return s +} +func (this *AllTypesOneOf_SubMessage) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&AllTypesOneOf_SubMessage{`, + `SubMessage:` + strings.Replace(fmt.Sprintf("%v", this.SubMessage), "Subby", "Subby", 1) + `,`, + `}`, + }, "") + return s +} +func (this *TwoOneofs) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&TwoOneofs{`, + `One:` + fmt.Sprintf("%v", this.One) + `,`, + `Two:` + fmt.Sprintf("%v", this.Two) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *TwoOneofs_Field1) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&TwoOneofs_Field1{`, + `Field1:` + fmt.Sprintf("%v", this.Field1) + `,`, + `}`, + }, "") + return s +} +func (this *TwoOneofs_Field2) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&TwoOneofs_Field2{`, + `Field2:` + fmt.Sprintf("%v", this.Field2) + `,`, + `}`, + }, "") + return s +} +func (this *TwoOneofs_Field3) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&TwoOneofs_Field3{`, + `Field3:` + fmt.Sprintf("%v", this.Field3) + `,`, + `}`, + }, "") + return s +} +func (this *TwoOneofs_Field34) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&TwoOneofs_Field34{`, + `Field34:` + fmt.Sprintf("%v", this.Field34) + `,`, + `}`, + }, "") + return s +} +func (this *TwoOneofs_Field35) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&TwoOneofs_Field35{`, + `Field35:` + fmt.Sprintf("%v", this.Field35) + `,`, + `}`, + }, "") + return s +} +func (this *TwoOneofs_SubMessage2) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&TwoOneofs_SubMessage2{`, + `SubMessage2:` + strings.Replace(fmt.Sprintf("%v", this.SubMessage2), "Subby", "Subby", 1) + `,`, + `}`, + }, "") + return s +} +func (this *CustomOneof) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&CustomOneof{`, + `Custom:` + fmt.Sprintf("%v", this.Custom) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *CustomOneof_Stringy) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&CustomOneof_Stringy{`, + `Stringy:` + fmt.Sprintf("%v", this.Stringy) + `,`, + `}`, + }, "") + return s +} +func (this *CustomOneof_CustomType) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&CustomOneof_CustomType{`, + `CustomType:` + fmt.Sprintf("%v", this.CustomType) + `,`, + `}`, + }, "") + return s +} +func (this *CustomOneof_CastType) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&CustomOneof_CastType{`, + `CastType:` + fmt.Sprintf("%v", this.CastType) + `,`, + `}`, + }, "") + return s +} +func (this *CustomOneof_MyCustomName) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&CustomOneof_MyCustomName{`, + `MyCustomName:` + fmt.Sprintf("%v", this.MyCustomName) + `,`, + `}`, + }, "") + return s +} +func valueToStringOne(v interface{}) string { + rv := reflect.ValueOf(v) + if rv.IsNil() { + return "nil" + } + pv := reflect.Indirect(rv).Interface() + return fmt.Sprintf("*%v", pv) +} +func (m *Subby) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *Subby) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Sub != nil { + data[i] = 0xa + i++ + i = encodeVarintOne(data, i, uint64(len(*m.Sub))) + i += copy(data[i:], *m.Sub) + } + if m.XXX_unrecognized != nil { + i += copy(data[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *AllTypesOneOf) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *AllTypesOneOf) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.TestOneof != nil { + nn1, err := m.TestOneof.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += nn1 + } + if m.XXX_unrecognized != nil { + i += copy(data[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *AllTypesOneOf_Field1) MarshalTo(data []byte) (int, error) { + i := 0 + data[i] = 0x9 + i++ + *(*float64)(unsafe.Pointer(&data[i])) = m.Field1 + i += 8 + return i, nil +} +func (m *AllTypesOneOf_Field2) MarshalTo(data []byte) (int, error) { + i := 0 + data[i] = 0x15 + i++ + *(*float32)(unsafe.Pointer(&data[i])) = m.Field2 + i += 4 + return i, nil +} +func (m *AllTypesOneOf_Field3) MarshalTo(data []byte) (int, error) { + i := 0 + data[i] = 0x18 + i++ + i = encodeVarintOne(data, i, uint64(m.Field3)) + return i, nil +} +func (m *AllTypesOneOf_Field4) MarshalTo(data []byte) (int, error) { + i := 0 + data[i] = 0x20 + i++ + i = encodeVarintOne(data, i, uint64(m.Field4)) + return i, nil +} +func (m *AllTypesOneOf_Field5) MarshalTo(data []byte) (int, error) { + i := 0 + data[i] = 0x28 + i++ + i = encodeVarintOne(data, i, uint64(m.Field5)) + return i, nil +} +func (m *AllTypesOneOf_Field6) MarshalTo(data []byte) (int, error) { + i := 0 + data[i] = 0x30 + i++ + i = encodeVarintOne(data, i, uint64(m.Field6)) + return i, nil +} +func (m *AllTypesOneOf_Field7) MarshalTo(data []byte) (int, error) { + i := 0 + data[i] = 0x38 + i++ + i = encodeVarintOne(data, i, uint64((uint32(m.Field7)<<1)^uint32((m.Field7>>31)))) + return i, nil +} +func (m *AllTypesOneOf_Field8) MarshalTo(data []byte) (int, error) { + i := 0 + data[i] = 0x40 + i++ + i = encodeVarintOne(data, i, uint64((uint64(m.Field8)<<1)^uint64((m.Field8>>63)))) + return i, nil +} +func (m *AllTypesOneOf_Field9) MarshalTo(data []byte) (int, error) { + i := 0 + data[i] = 0x4d + i++ + *(*uint32)(unsafe.Pointer(&data[i])) = m.Field9 + i += 4 + return i, nil +} +func (m *AllTypesOneOf_Field10) MarshalTo(data []byte) (int, error) { + i := 0 + data[i] = 0x55 + i++ + *(*int32)(unsafe.Pointer(&data[i])) = m.Field10 + i += 4 + return i, nil +} +func (m *AllTypesOneOf_Field11) MarshalTo(data []byte) (int, error) { + i := 0 + data[i] = 0x59 + i++ + *(*uint64)(unsafe.Pointer(&data[i])) = m.Field11 + i += 8 + return i, nil +} +func (m *AllTypesOneOf_Field12) MarshalTo(data []byte) (int, error) { + i := 0 + data[i] = 0x61 + i++ + *(*int64)(unsafe.Pointer(&data[i])) = m.Field12 + i += 8 + return i, nil +} +func (m *AllTypesOneOf_Field13) MarshalTo(data []byte) (int, error) { + i := 0 + data[i] = 0x68 + i++ + if m.Field13 { + data[i] = 1 + } else { + data[i] = 0 + } + i++ + return i, nil +} +func (m *AllTypesOneOf_Field14) MarshalTo(data []byte) (int, error) { + i := 0 + data[i] = 0x72 + i++ + i = encodeVarintOne(data, i, uint64(len(m.Field14))) + i += copy(data[i:], m.Field14) + return i, nil +} +func (m *AllTypesOneOf_Field15) MarshalTo(data []byte) (int, error) { + i := 0 + if m.Field15 != nil { + data[i] = 0x7a + i++ + i = encodeVarintOne(data, i, uint64(len(m.Field15))) + i += copy(data[i:], m.Field15) + } + return i, nil +} +func (m *AllTypesOneOf_SubMessage) MarshalTo(data []byte) (int, error) { + i := 0 + if m.SubMessage != nil { + data[i] = 0x82 + i++ + data[i] = 0x1 + i++ + i = encodeVarintOne(data, i, uint64(m.SubMessage.Size())) + n2, err := m.SubMessage.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n2 + } + return i, nil +} +func (m *TwoOneofs) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *TwoOneofs) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.One != nil { + nn3, err := m.One.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += nn3 + } + if m.Two != nil { + nn4, err := m.Two.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += nn4 + } + if m.XXX_unrecognized != nil { + i += copy(data[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *TwoOneofs_Field1) MarshalTo(data []byte) (int, error) { + i := 0 + data[i] = 0x9 + i++ + *(*float64)(unsafe.Pointer(&data[i])) = m.Field1 + i += 8 + return i, nil +} +func (m *TwoOneofs_Field2) MarshalTo(data []byte) (int, error) { + i := 0 + data[i] = 0x15 + i++ + *(*float32)(unsafe.Pointer(&data[i])) = m.Field2 + i += 4 + return i, nil +} +func (m *TwoOneofs_Field3) MarshalTo(data []byte) (int, error) { + i := 0 + data[i] = 0x18 + i++ + i = encodeVarintOne(data, i, uint64(m.Field3)) + return i, nil +} +func (m *TwoOneofs_Field34) MarshalTo(data []byte) (int, error) { + i := 0 + data[i] = 0x92 + i++ + data[i] = 0x2 + i++ + i = encodeVarintOne(data, i, uint64(len(m.Field34))) + i += copy(data[i:], m.Field34) + return i, nil +} +func (m *TwoOneofs_Field35) MarshalTo(data []byte) (int, error) { + i := 0 + if m.Field35 != nil { + data[i] = 0x9a + i++ + data[i] = 0x2 + i++ + i = encodeVarintOne(data, i, uint64(len(m.Field35))) + i += copy(data[i:], m.Field35) + } + return i, nil +} +func (m *TwoOneofs_SubMessage2) MarshalTo(data []byte) (int, error) { + i := 0 + if m.SubMessage2 != nil { + data[i] = 0xa2 + i++ + data[i] = 0x2 + i++ + i = encodeVarintOne(data, i, uint64(m.SubMessage2.Size())) + n5, err := m.SubMessage2.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n5 + } + return i, nil +} +func (m *CustomOneof) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *CustomOneof) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Custom != nil { + nn6, err := m.Custom.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += nn6 + } + if m.XXX_unrecognized != nil { + i += copy(data[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *CustomOneof_Stringy) MarshalTo(data []byte) (int, error) { + i := 0 + data[i] = 0x92 + i++ + data[i] = 0x2 + i++ + i = encodeVarintOne(data, i, uint64(len(m.Stringy))) + i += copy(data[i:], m.Stringy) + return i, nil +} +func (m *CustomOneof_CustomType) MarshalTo(data []byte) (int, error) { + i := 0 + data[i] = 0x9a + i++ + data[i] = 0x2 + i++ + i = encodeVarintOne(data, i, uint64(m.CustomType.Size())) + n7, err := m.CustomType.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n7 + return i, nil +} +func (m *CustomOneof_CastType) MarshalTo(data []byte) (int, error) { + i := 0 + data[i] = 0xa0 + i++ + data[i] = 0x2 + i++ + i = encodeVarintOne(data, i, uint64(m.CastType)) + return i, nil +} +func (m *CustomOneof_MyCustomName) MarshalTo(data []byte) (int, error) { + i := 0 + data[i] = 0xa8 + i++ + data[i] = 0x2 + i++ + i = encodeVarintOne(data, i, uint64(m.MyCustomName)) + return i, nil +} +func encodeFixed64One(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 encodeFixed32One(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 encodeVarintOne(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 +} + +var fileDescriptorOne = []byte{ + // 580 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xac, 0xd3, 0x3f, 0x6f, 0xda, 0x40, + 0x14, 0x00, 0x70, 0xcc, 0x7f, 0x0e, 0x68, 0xa8, 0xa7, 0xd7, 0x0c, 0x10, 0xd1, 0x56, 0xea, 0xd0, + 0x60, 0xf0, 0x1f, 0x20, 0x63, 0x9d, 0xaa, 0xea, 0x42, 0x91, 0x48, 0x32, 0x47, 0x36, 0x35, 0x04, + 0x09, 0xb8, 0x88, 0xb3, 0x15, 0x79, 0xcb, 0x67, 0xe8, 0xa7, 0xe8, 0xd8, 0xb1, 0x1f, 0x21, 0x63, + 0xc6, 0xaa, 0x03, 0x4a, 0xe8, 0xd2, 0x31, 0x63, 0xd4, 0xa9, 0xef, 0xce, 0xe4, 0xae, 0x52, 0x55, + 0x75, 0xc9, 0xf0, 0xe4, 0x3b, 0x7e, 0x77, 0x8f, 0xf7, 0x7c, 0x67, 0xb2, 0x37, 0xa6, 0x0b, 0x9f, + 0x32, 0x23, 0x5a, 0x32, 0x6f, 0x12, 0x2c, 0xbc, 0x15, 0x3b, 0xf3, 0xe6, 0xc1, 0xca, 0xa0, 0xcb, + 0xa0, 0x75, 0xbe, 0xa2, 0x21, 0xd5, 0x33, 0x38, 0xdc, 0xdd, 0x9f, 0xce, 0xc2, 0xb3, 0xc8, 0x6f, + 0xe1, 0x6a, 0x63, 0x4a, 0xa7, 0xd4, 0x10, 0xe6, 0x47, 0x13, 0x31, 0x13, 0x13, 0x31, 0x4a, 0xf6, + 0x34, 0x9f, 0x91, 0xdc, 0x51, 0xe4, 0xfb, 0xb1, 0x5e, 0x23, 0x19, 0x16, 0xf9, 0xa0, 0xed, 0x69, + 0xaf, 0x4a, 0x23, 0x3e, 0x6c, 0xae, 0x33, 0xa4, 0xfa, 0x66, 0x3e, 0x3f, 0x8e, 0xcf, 0x03, 0x36, + 0x5c, 0x06, 0xc3, 0x89, 0x0e, 0x24, 0xff, 0x6e, 0x16, 0xcc, 0x3f, 0x76, 0xc4, 0x32, 0xed, 0x7d, + 0x6a, 0x94, 0x9f, 0x88, 0xb9, 0x14, 0x13, 0xd2, 0x28, 0x69, 0x29, 0xa6, 0x14, 0x0b, 0x32, 0x28, + 0x39, 0x29, 0x96, 0x14, 0x1b, 0xb2, 0x28, 0x19, 0x29, 0xb6, 0x14, 0x07, 0x72, 0x28, 0x55, 0x29, + 0x8e, 0x94, 0x2e, 0xe4, 0x51, 0xb2, 0x52, 0xba, 0x52, 0x7a, 0x50, 0x40, 0x79, 0x2a, 0xa5, 0x27, + 0xa5, 0x0f, 0x45, 0x14, 0x5d, 0x4a, 0x5f, 0xca, 0x01, 0x94, 0x50, 0x0a, 0x52, 0x0e, 0xf4, 0x5d, + 0x52, 0x48, 0x3a, 0x6d, 0x03, 0x41, 0xda, 0x41, 0x2a, 0x24, 0xad, 0xb6, 0x95, 0x75, 0xa0, 0x8c, + 0x96, 0x57, 0xd6, 0x51, 0x66, 0x42, 0x05, 0xad, 0xa6, 0xcc, 0x54, 0x66, 0x41, 0x15, 0xad, 0xa8, + 0xcc, 0x52, 0x66, 0xc3, 0x13, 0x7e, 0x02, 0xca, 0x6c, 0x65, 0x0e, 0xec, 0xa0, 0x55, 0x94, 0x39, + 0xfa, 0x3e, 0x29, 0xe3, 0x51, 0x9d, 0x2e, 0x02, 0xc6, 0xbc, 0x69, 0x00, 0x35, 0xf4, 0xb2, 0x49, + 0x5a, 0xfc, 0x4e, 0x88, 0x63, 0xc5, 0xb5, 0x04, 0x17, 0x0c, 0x12, 0x77, 0x2b, 0x84, 0x84, 0x01, + 0x0b, 0x4f, 0xd1, 0xe9, 0xa4, 0x79, 0xad, 0x91, 0xd2, 0xf1, 0x05, 0x1d, 0xf2, 0x09, 0x7b, 0xe4, + 0xc3,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xed, 0x0e, 0xe3, 0x1e, 0xe3, 0x72, 0x53, 0xd7, 0x3e, 0x63, + 0x7c, 0xc1, 0xf8, 0x8a, 0x71, 0xb5, 0xc1, 0x75, 0x18, 0x37, 0x38, 0xfe, 0x89, 0xcf, 0x3b, 0x7c, + 0xde, 0x63, 0x5c, 0xfe, 0xa8, 0xa7, 0x7e, 0x07, 0x00, 0x00, 0xff, 0xff, 0x6f, 0x77, 0xee, 0xde, + 0x80, 0x04, 0x00, 0x00, +} diff --git a/vendor/github.com/gogo/protobuf/test/oneof/combos/unsafemarshaler/one.proto b/vendor/github.com/gogo/protobuf/test/oneof/combos/unsafemarshaler/one.proto new file mode 100644 index 000000000..66b1233b1 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/oneof/combos/unsafemarshaler/one.proto @@ -0,0 +1,101 @@ +// Copyright (c) 2013, Vastech SA (PTY) LTD. All rights reserved. +// http://github.com/gogo/protobuf/gogoproto +// +// 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 one; + +import "github.com/gogo/protobuf/gogoproto/gogo.proto"; + +option (gogoproto.goproto_stringer_all) = false; +option (gogoproto.goproto_enum_prefix_all) = false; +option (gogoproto.goproto_getters_all) = false; + +option (gogoproto.equal_all) = true; +option (gogoproto.verbose_equal_all) = true; +option (gogoproto.stringer_all) = true; +option (gogoproto.gostring_all) = true; +option (gogoproto.description_all) = true; + +option (gogoproto.testgen_all) = true; +option (gogoproto.populate_all) = true; +option (gogoproto.unmarshaler_all) = false; +option (gogoproto.marshaler_all) = false; +option (gogoproto.sizer_all) = true; + +option (gogoproto.goproto_enum_stringer_all) = false; +option (gogoproto.enum_stringer_all) = true; + +option (gogoproto.unsafe_marshaler_all) = true; +option (gogoproto.unsafe_unmarshaler_all) = false; + +message Subby { + optional string sub = 1; +} + +message AllTypesOneOf { + oneof test_oneof { + double Field1 = 1; + float Field2 = 2; + int32 Field3 = 3; + int64 Field4 = 4; + uint32 Field5 = 5; + uint64 Field6 = 6; + sint32 Field7 = 7; + sint64 Field8 = 8; + fixed32 Field9 = 9; + sfixed32 Field10 = 10; + fixed64 Field11 = 11; + sfixed64 Field12 = 12; + bool Field13 = 13; + string Field14 = 14; + bytes Field15 = 15; + Subby sub_message = 16; + } +} + +message TwoOneofs { + oneof one { + double Field1 = 1; + float Field2 = 2; + int32 Field3 = 3; + } + + oneof two { + string Field34 = 34; + bytes Field35 = 35; + Subby sub_message2 = 36; + } +} + +message CustomOneof { + oneof custom { + string Stringy = 34; + bytes CustomType = 35 [(gogoproto.customtype) = "github.com/gogo/protobuf/test/custom.Uint128"]; + uint64 CastType = 36 [(gogoproto.casttype) = "github.com/gogo/protobuf/test/casttype.MyUint64Type"]; + int64 CustomName = 37 [(gogoproto.customname) = "MyCustomName"]; + } +} diff --git a/vendor/github.com/gogo/protobuf/test/oneof/combos/unsafemarshaler/onepb_test.go b/vendor/github.com/gogo/protobuf/test/oneof/combos/unsafemarshaler/onepb_test.go new file mode 100644 index 000000000..ca2ff2874 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/oneof/combos/unsafemarshaler/onepb_test.go @@ -0,0 +1,743 @@ +// Code generated by protoc-gen-gogo. +// source: combos/unsafemarshaler/one.proto +// DO NOT EDIT! + +/* +Package one is a generated protocol buffer package. + +It is generated from these files: + combos/unsafemarshaler/one.proto + +It has these top-level messages: + Subby + AllTypesOneOf + TwoOneofs + CustomOneof +*/ +package one + +import testing "testing" +import math_rand "math/rand" +import time "time" +import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" +import github_com_gogo_protobuf_jsonpb "github.com/gogo/protobuf/jsonpb" +import fmt "fmt" +import go_parser "go/parser" +import proto "github.com/gogo/protobuf/proto" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +func TestSubbyProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedSubby(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Subby{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestSubbyMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedSubby(popr, false) + size := p.Size() + data := make([]byte, size) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(data) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Subby{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestAllTypesOneOfProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAllTypesOneOf(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &AllTypesOneOf{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestAllTypesOneOfMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAllTypesOneOf(popr, false) + size := p.Size() + data := make([]byte, size) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(data) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &AllTypesOneOf{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestTwoOneofsProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedTwoOneofs(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &TwoOneofs{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestTwoOneofsMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedTwoOneofs(popr, false) + size := p.Size() + data := make([]byte, size) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(data) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &TwoOneofs{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestCustomOneofProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomOneof(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &CustomOneof{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestCustomOneofMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomOneof(popr, false) + size := p.Size() + data := make([]byte, size) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(data) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &CustomOneof{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestSubbyJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedSubby(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Subby{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestAllTypesOneOfJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAllTypesOneOf(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &AllTypesOneOf{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestTwoOneofsJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedTwoOneofs(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &TwoOneofs{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestCustomOneofJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomOneof(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &CustomOneof{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestSubbyProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedSubby(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &Subby{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestSubbyProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedSubby(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &Subby{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestAllTypesOneOfProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAllTypesOneOf(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &AllTypesOneOf{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestAllTypesOneOfProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAllTypesOneOf(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &AllTypesOneOf{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestTwoOneofsProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedTwoOneofs(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &TwoOneofs{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestTwoOneofsProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedTwoOneofs(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &TwoOneofs{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestCustomOneofProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomOneof(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &CustomOneof{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestCustomOneofProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomOneof(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &CustomOneof{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestOneDescription(t *testing.T) { + OneDescription() +} +func TestSubbyVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedSubby(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &Subby{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestAllTypesOneOfVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAllTypesOneOf(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &AllTypesOneOf{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestTwoOneofsVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedTwoOneofs(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &TwoOneofs{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestCustomOneofVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomOneof(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &CustomOneof{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestSubbyGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedSubby(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestAllTypesOneOfGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAllTypesOneOf(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestTwoOneofsGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedTwoOneofs(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestCustomOneofGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomOneof(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestSubbySize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedSubby(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func TestAllTypesOneOfSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAllTypesOneOf(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func TestTwoOneofsSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedTwoOneofs(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func TestCustomOneofSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomOneof(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func TestSubbyStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedSubby(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestAllTypesOneOfStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAllTypesOneOf(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestTwoOneofsStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedTwoOneofs(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestCustomOneofStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomOneof(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} + +//These tests are generated by github.com/gogo/protobuf/plugin/testgen diff --git a/vendor/github.com/gogo/protobuf/test/oneof/combos/unsafeunmarshaler/one.pb.go b/vendor/github.com/gogo/protobuf/test/oneof/combos/unsafeunmarshaler/one.pb.go new file mode 100644 index 000000000..e60bf69b0 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/oneof/combos/unsafeunmarshaler/one.pb.go @@ -0,0 +1,5238 @@ +// Code generated by protoc-gen-gogo. +// source: combos/unsafeunmarshaler/one.proto +// DO NOT EDIT! + +/* + Package one is a generated protocol buffer package. + + It is generated from these files: + combos/unsafeunmarshaler/one.proto + + It has these top-level messages: + Subby + AllTypesOneOf + TwoOneofs + CustomOneof +*/ +package one + +import proto "github.com/gogo/protobuf/proto" +import fmt "fmt" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" + +import github_com_gogo_protobuf_test_custom "github.com/gogo/protobuf/test/custom" +import github_com_gogo_protobuf_test_casttype "github.com/gogo/protobuf/test/casttype" + +import github_com_gogo_protobuf_protoc_gen_gogo_descriptor "github.com/gogo/protobuf/protoc-gen-gogo/descriptor" +import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" +import compress_gzip "compress/gzip" +import bytes "bytes" +import io_ioutil "io/ioutil" + +import strings "strings" +import sort "sort" +import strconv "strconv" +import reflect "reflect" + +import io "io" +import unsafe "unsafe" + +// 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. +const _ = proto.GoGoProtoPackageIsVersion1 + +type Subby struct { + Sub *string `protobuf:"bytes,1,opt,name=sub" json:"sub,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *Subby) Reset() { *m = Subby{} } +func (*Subby) ProtoMessage() {} +func (*Subby) Descriptor() ([]byte, []int) { return fileDescriptorOne, []int{0} } + +type AllTypesOneOf struct { + // Types that are valid to be assigned to TestOneof: + // *AllTypesOneOf_Field1 + // *AllTypesOneOf_Field2 + // *AllTypesOneOf_Field3 + // *AllTypesOneOf_Field4 + // *AllTypesOneOf_Field5 + // *AllTypesOneOf_Field6 + // *AllTypesOneOf_Field7 + // *AllTypesOneOf_Field8 + // *AllTypesOneOf_Field9 + // *AllTypesOneOf_Field10 + // *AllTypesOneOf_Field11 + // *AllTypesOneOf_Field12 + // *AllTypesOneOf_Field13 + // *AllTypesOneOf_Field14 + // *AllTypesOneOf_Field15 + // *AllTypesOneOf_SubMessage + TestOneof isAllTypesOneOf_TestOneof `protobuf_oneof:"test_oneof"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *AllTypesOneOf) Reset() { *m = AllTypesOneOf{} } +func (*AllTypesOneOf) ProtoMessage() {} +func (*AllTypesOneOf) Descriptor() ([]byte, []int) { return fileDescriptorOne, []int{1} } + +type isAllTypesOneOf_TestOneof interface { + isAllTypesOneOf_TestOneof() + Equal(interface{}) bool + VerboseEqual(interface{}) error + Size() int +} + +type AllTypesOneOf_Field1 struct { + Field1 float64 `protobuf:"fixed64,1,opt,name=Field1,json=field1,oneof"` +} +type AllTypesOneOf_Field2 struct { + Field2 float32 `protobuf:"fixed32,2,opt,name=Field2,json=field2,oneof"` +} +type AllTypesOneOf_Field3 struct { + Field3 int32 `protobuf:"varint,3,opt,name=Field3,json=field3,oneof"` +} +type AllTypesOneOf_Field4 struct { + Field4 int64 `protobuf:"varint,4,opt,name=Field4,json=field4,oneof"` +} +type AllTypesOneOf_Field5 struct { + Field5 uint32 `protobuf:"varint,5,opt,name=Field5,json=field5,oneof"` +} +type AllTypesOneOf_Field6 struct { + Field6 uint64 `protobuf:"varint,6,opt,name=Field6,json=field6,oneof"` +} +type AllTypesOneOf_Field7 struct { + Field7 int32 `protobuf:"zigzag32,7,opt,name=Field7,json=field7,oneof"` +} +type AllTypesOneOf_Field8 struct { + Field8 int64 `protobuf:"zigzag64,8,opt,name=Field8,json=field8,oneof"` +} +type AllTypesOneOf_Field9 struct { + Field9 uint32 `protobuf:"fixed32,9,opt,name=Field9,json=field9,oneof"` +} +type AllTypesOneOf_Field10 struct { + Field10 int32 `protobuf:"fixed32,10,opt,name=Field10,json=field10,oneof"` +} +type AllTypesOneOf_Field11 struct { + Field11 uint64 `protobuf:"fixed64,11,opt,name=Field11,json=field11,oneof"` +} +type AllTypesOneOf_Field12 struct { + Field12 int64 `protobuf:"fixed64,12,opt,name=Field12,json=field12,oneof"` +} +type AllTypesOneOf_Field13 struct { + Field13 bool `protobuf:"varint,13,opt,name=Field13,json=field13,oneof"` +} +type AllTypesOneOf_Field14 struct { + Field14 string `protobuf:"bytes,14,opt,name=Field14,json=field14,oneof"` +} +type AllTypesOneOf_Field15 struct { + Field15 []byte `protobuf:"bytes,15,opt,name=Field15,json=field15,oneof"` +} +type AllTypesOneOf_SubMessage struct { + SubMessage *Subby `protobuf:"bytes,16,opt,name=sub_message,json=subMessage,oneof"` +} + +func (*AllTypesOneOf_Field1) isAllTypesOneOf_TestOneof() {} +func (*AllTypesOneOf_Field2) isAllTypesOneOf_TestOneof() {} +func (*AllTypesOneOf_Field3) isAllTypesOneOf_TestOneof() {} +func (*AllTypesOneOf_Field4) isAllTypesOneOf_TestOneof() {} +func (*AllTypesOneOf_Field5) isAllTypesOneOf_TestOneof() {} +func (*AllTypesOneOf_Field6) isAllTypesOneOf_TestOneof() {} +func (*AllTypesOneOf_Field7) isAllTypesOneOf_TestOneof() {} +func (*AllTypesOneOf_Field8) isAllTypesOneOf_TestOneof() {} +func (*AllTypesOneOf_Field9) isAllTypesOneOf_TestOneof() {} +func (*AllTypesOneOf_Field10) isAllTypesOneOf_TestOneof() {} +func (*AllTypesOneOf_Field11) isAllTypesOneOf_TestOneof() {} +func (*AllTypesOneOf_Field12) isAllTypesOneOf_TestOneof() {} +func (*AllTypesOneOf_Field13) isAllTypesOneOf_TestOneof() {} +func (*AllTypesOneOf_Field14) isAllTypesOneOf_TestOneof() {} +func (*AllTypesOneOf_Field15) isAllTypesOneOf_TestOneof() {} +func (*AllTypesOneOf_SubMessage) isAllTypesOneOf_TestOneof() {} + +func (m *AllTypesOneOf) GetTestOneof() isAllTypesOneOf_TestOneof { + if m != nil { + return m.TestOneof + } + return nil +} + +func (m *AllTypesOneOf) GetField1() float64 { + if x, ok := m.GetTestOneof().(*AllTypesOneOf_Field1); ok { + return x.Field1 + } + return 0 +} + +func (m *AllTypesOneOf) GetField2() float32 { + if x, ok := m.GetTestOneof().(*AllTypesOneOf_Field2); ok { + return x.Field2 + } + return 0 +} + +func (m *AllTypesOneOf) GetField3() int32 { + if x, ok := m.GetTestOneof().(*AllTypesOneOf_Field3); ok { + return x.Field3 + } + return 0 +} + +func (m *AllTypesOneOf) GetField4() int64 { + if x, ok := m.GetTestOneof().(*AllTypesOneOf_Field4); ok { + return x.Field4 + } + return 0 +} + +func (m *AllTypesOneOf) GetField5() uint32 { + if x, ok := m.GetTestOneof().(*AllTypesOneOf_Field5); ok { + return x.Field5 + } + return 0 +} + +func (m *AllTypesOneOf) GetField6() uint64 { + if x, ok := m.GetTestOneof().(*AllTypesOneOf_Field6); ok { + return x.Field6 + } + return 0 +} + +func (m *AllTypesOneOf) GetField7() int32 { + if x, ok := m.GetTestOneof().(*AllTypesOneOf_Field7); ok { + return x.Field7 + } + return 0 +} + +func (m *AllTypesOneOf) GetField8() int64 { + if x, ok := m.GetTestOneof().(*AllTypesOneOf_Field8); ok { + return x.Field8 + } + return 0 +} + +func (m *AllTypesOneOf) GetField9() uint32 { + if x, ok := m.GetTestOneof().(*AllTypesOneOf_Field9); ok { + return x.Field9 + } + return 0 +} + +func (m *AllTypesOneOf) GetField10() int32 { + if x, ok := m.GetTestOneof().(*AllTypesOneOf_Field10); ok { + return x.Field10 + } + return 0 +} + +func (m *AllTypesOneOf) GetField11() uint64 { + if x, ok := m.GetTestOneof().(*AllTypesOneOf_Field11); ok { + return x.Field11 + } + return 0 +} + +func (m *AllTypesOneOf) GetField12() int64 { + if x, ok := m.GetTestOneof().(*AllTypesOneOf_Field12); ok { + return x.Field12 + } + return 0 +} + +func (m *AllTypesOneOf) GetField13() bool { + if x, ok := m.GetTestOneof().(*AllTypesOneOf_Field13); ok { + return x.Field13 + } + return false +} + +func (m *AllTypesOneOf) GetField14() string { + if x, ok := m.GetTestOneof().(*AllTypesOneOf_Field14); ok { + return x.Field14 + } + return "" +} + +func (m *AllTypesOneOf) GetField15() []byte { + if x, ok := m.GetTestOneof().(*AllTypesOneOf_Field15); ok { + return x.Field15 + } + return nil +} + +func (m *AllTypesOneOf) GetSubMessage() *Subby { + if x, ok := m.GetTestOneof().(*AllTypesOneOf_SubMessage); ok { + return x.SubMessage + } + return nil +} + +// XXX_OneofFuncs is for the internal use of the proto package. +func (*AllTypesOneOf) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{}) { + return _AllTypesOneOf_OneofMarshaler, _AllTypesOneOf_OneofUnmarshaler, _AllTypesOneOf_OneofSizer, []interface{}{ + (*AllTypesOneOf_Field1)(nil), + (*AllTypesOneOf_Field2)(nil), + (*AllTypesOneOf_Field3)(nil), + (*AllTypesOneOf_Field4)(nil), + (*AllTypesOneOf_Field5)(nil), + (*AllTypesOneOf_Field6)(nil), + (*AllTypesOneOf_Field7)(nil), + (*AllTypesOneOf_Field8)(nil), + (*AllTypesOneOf_Field9)(nil), + (*AllTypesOneOf_Field10)(nil), + (*AllTypesOneOf_Field11)(nil), + (*AllTypesOneOf_Field12)(nil), + (*AllTypesOneOf_Field13)(nil), + (*AllTypesOneOf_Field14)(nil), + (*AllTypesOneOf_Field15)(nil), + (*AllTypesOneOf_SubMessage)(nil), + } +} + +func _AllTypesOneOf_OneofMarshaler(msg proto.Message, b *proto.Buffer) error { + m := msg.(*AllTypesOneOf) + // test_oneof + switch x := m.TestOneof.(type) { + case *AllTypesOneOf_Field1: + _ = b.EncodeVarint(1<<3 | proto.WireFixed64) + _ = b.EncodeFixed64(math.Float64bits(x.Field1)) + case *AllTypesOneOf_Field2: + _ = b.EncodeVarint(2<<3 | proto.WireFixed32) + _ = b.EncodeFixed32(uint64(math.Float32bits(x.Field2))) + case *AllTypesOneOf_Field3: + _ = b.EncodeVarint(3<<3 | proto.WireVarint) + _ = b.EncodeVarint(uint64(x.Field3)) + case *AllTypesOneOf_Field4: + _ = b.EncodeVarint(4<<3 | proto.WireVarint) + _ = b.EncodeVarint(uint64(x.Field4)) + case *AllTypesOneOf_Field5: + _ = b.EncodeVarint(5<<3 | proto.WireVarint) + _ = b.EncodeVarint(uint64(x.Field5)) + case *AllTypesOneOf_Field6: + _ = b.EncodeVarint(6<<3 | proto.WireVarint) + _ = b.EncodeVarint(uint64(x.Field6)) + case *AllTypesOneOf_Field7: + _ = b.EncodeVarint(7<<3 | proto.WireVarint) + _ = b.EncodeZigzag32(uint64(x.Field7)) + case *AllTypesOneOf_Field8: + _ = b.EncodeVarint(8<<3 | proto.WireVarint) + _ = b.EncodeZigzag64(uint64(x.Field8)) + case *AllTypesOneOf_Field9: + _ = b.EncodeVarint(9<<3 | proto.WireFixed32) + _ = b.EncodeFixed32(uint64(x.Field9)) + case *AllTypesOneOf_Field10: + _ = b.EncodeVarint(10<<3 | proto.WireFixed32) + _ = b.EncodeFixed32(uint64(x.Field10)) + case *AllTypesOneOf_Field11: + _ = b.EncodeVarint(11<<3 | proto.WireFixed64) + _ = b.EncodeFixed64(uint64(x.Field11)) + case *AllTypesOneOf_Field12: + _ = b.EncodeVarint(12<<3 | proto.WireFixed64) + _ = b.EncodeFixed64(uint64(x.Field12)) + case *AllTypesOneOf_Field13: + t := uint64(0) + if x.Field13 { + t = 1 + } + _ = b.EncodeVarint(13<<3 | proto.WireVarint) + _ = b.EncodeVarint(t) + case *AllTypesOneOf_Field14: + _ = b.EncodeVarint(14<<3 | proto.WireBytes) + _ = b.EncodeStringBytes(x.Field14) + case *AllTypesOneOf_Field15: + _ = b.EncodeVarint(15<<3 | proto.WireBytes) + _ = b.EncodeRawBytes(x.Field15) + case *AllTypesOneOf_SubMessage: + _ = b.EncodeVarint(16<<3 | proto.WireBytes) + if err := b.EncodeMessage(x.SubMessage); err != nil { + return err + } + case nil: + default: + return fmt.Errorf("AllTypesOneOf.TestOneof has unexpected type %T", x) + } + return nil +} + +func _AllTypesOneOf_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) { + m := msg.(*AllTypesOneOf) + switch tag { + case 1: // test_oneof.Field1 + if wire != proto.WireFixed64 { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeFixed64() + m.TestOneof = &AllTypesOneOf_Field1{math.Float64frombits(x)} + return true, err + case 2: // test_oneof.Field2 + if wire != proto.WireFixed32 { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeFixed32() + m.TestOneof = &AllTypesOneOf_Field2{math.Float32frombits(uint32(x))} + return true, err + case 3: // test_oneof.Field3 + if wire != proto.WireVarint { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeVarint() + m.TestOneof = &AllTypesOneOf_Field3{int32(x)} + return true, err + case 4: // test_oneof.Field4 + if wire != proto.WireVarint { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeVarint() + m.TestOneof = &AllTypesOneOf_Field4{int64(x)} + return true, err + case 5: // test_oneof.Field5 + if wire != proto.WireVarint { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeVarint() + m.TestOneof = &AllTypesOneOf_Field5{uint32(x)} + return true, err + case 6: // test_oneof.Field6 + if wire != proto.WireVarint { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeVarint() + m.TestOneof = &AllTypesOneOf_Field6{x} + return true, err + case 7: // test_oneof.Field7 + if wire != proto.WireVarint { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeZigzag32() + m.TestOneof = &AllTypesOneOf_Field7{int32(x)} + return true, err + case 8: // test_oneof.Field8 + if wire != proto.WireVarint { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeZigzag64() + m.TestOneof = &AllTypesOneOf_Field8{int64(x)} + return true, err + case 9: // test_oneof.Field9 + if wire != proto.WireFixed32 { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeFixed32() + m.TestOneof = &AllTypesOneOf_Field9{uint32(x)} + return true, err + case 10: // test_oneof.Field10 + if wire != proto.WireFixed32 { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeFixed32() + m.TestOneof = &AllTypesOneOf_Field10{int32(x)} + return true, err + case 11: // test_oneof.Field11 + if wire != proto.WireFixed64 { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeFixed64() + m.TestOneof = &AllTypesOneOf_Field11{x} + return true, err + case 12: // test_oneof.Field12 + if wire != proto.WireFixed64 { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeFixed64() + m.TestOneof = &AllTypesOneOf_Field12{int64(x)} + return true, err + case 13: // test_oneof.Field13 + if wire != proto.WireVarint { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeVarint() + m.TestOneof = &AllTypesOneOf_Field13{x != 0} + return true, err + case 14: // test_oneof.Field14 + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeStringBytes() + m.TestOneof = &AllTypesOneOf_Field14{x} + return true, err + case 15: // test_oneof.Field15 + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeRawBytes(true) + m.TestOneof = &AllTypesOneOf_Field15{x} + return true, err + case 16: // test_oneof.sub_message + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + msg := new(Subby) + err := b.DecodeMessage(msg) + m.TestOneof = &AllTypesOneOf_SubMessage{msg} + return true, err + default: + return false, nil + } +} + +func _AllTypesOneOf_OneofSizer(msg proto.Message) (n int) { + m := msg.(*AllTypesOneOf) + // test_oneof + switch x := m.TestOneof.(type) { + case *AllTypesOneOf_Field1: + n += proto.SizeVarint(1<<3 | proto.WireFixed64) + n += 8 + case *AllTypesOneOf_Field2: + n += proto.SizeVarint(2<<3 | proto.WireFixed32) + n += 4 + case *AllTypesOneOf_Field3: + n += proto.SizeVarint(3<<3 | proto.WireVarint) + n += proto.SizeVarint(uint64(x.Field3)) + case *AllTypesOneOf_Field4: + n += proto.SizeVarint(4<<3 | proto.WireVarint) + n += proto.SizeVarint(uint64(x.Field4)) + case *AllTypesOneOf_Field5: + n += proto.SizeVarint(5<<3 | proto.WireVarint) + n += proto.SizeVarint(uint64(x.Field5)) + case *AllTypesOneOf_Field6: + n += proto.SizeVarint(6<<3 | proto.WireVarint) + n += proto.SizeVarint(uint64(x.Field6)) + case *AllTypesOneOf_Field7: + n += proto.SizeVarint(7<<3 | proto.WireVarint) + n += proto.SizeVarint(uint64((uint32(x.Field7) << 1) ^ uint32((int32(x.Field7) >> 31)))) + case *AllTypesOneOf_Field8: + n += proto.SizeVarint(8<<3 | proto.WireVarint) + n += proto.SizeVarint(uint64(uint64(x.Field8<<1) ^ uint64((int64(x.Field8) >> 63)))) + case *AllTypesOneOf_Field9: + n += proto.SizeVarint(9<<3 | proto.WireFixed32) + n += 4 + case *AllTypesOneOf_Field10: + n += proto.SizeVarint(10<<3 | proto.WireFixed32) + n += 4 + case *AllTypesOneOf_Field11: + n += proto.SizeVarint(11<<3 | proto.WireFixed64) + n += 8 + case *AllTypesOneOf_Field12: + n += proto.SizeVarint(12<<3 | proto.WireFixed64) + n += 8 + case *AllTypesOneOf_Field13: + n += proto.SizeVarint(13<<3 | proto.WireVarint) + n += 1 + case *AllTypesOneOf_Field14: + n += proto.SizeVarint(14<<3 | proto.WireBytes) + n += proto.SizeVarint(uint64(len(x.Field14))) + n += len(x.Field14) + case *AllTypesOneOf_Field15: + n += proto.SizeVarint(15<<3 | proto.WireBytes) + n += proto.SizeVarint(uint64(len(x.Field15))) + n += len(x.Field15) + case *AllTypesOneOf_SubMessage: + s := proto.Size(x.SubMessage) + n += proto.SizeVarint(16<<3 | proto.WireBytes) + n += proto.SizeVarint(uint64(s)) + n += s + case nil: + default: + panic(fmt.Sprintf("proto: unexpected type %T in oneof", x)) + } + return n +} + +type TwoOneofs struct { + // Types that are valid to be assigned to One: + // *TwoOneofs_Field1 + // *TwoOneofs_Field2 + // *TwoOneofs_Field3 + One isTwoOneofs_One `protobuf_oneof:"one"` + // Types that are valid to be assigned to Two: + // *TwoOneofs_Field34 + // *TwoOneofs_Field35 + // *TwoOneofs_SubMessage2 + Two isTwoOneofs_Two `protobuf_oneof:"two"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *TwoOneofs) Reset() { *m = TwoOneofs{} } +func (*TwoOneofs) ProtoMessage() {} +func (*TwoOneofs) Descriptor() ([]byte, []int) { return fileDescriptorOne, []int{2} } + +type isTwoOneofs_One interface { + isTwoOneofs_One() + Equal(interface{}) bool + VerboseEqual(interface{}) error + Size() int +} +type isTwoOneofs_Two interface { + isTwoOneofs_Two() + Equal(interface{}) bool + VerboseEqual(interface{}) error + Size() int +} + +type TwoOneofs_Field1 struct { + Field1 float64 `protobuf:"fixed64,1,opt,name=Field1,json=field1,oneof"` +} +type TwoOneofs_Field2 struct { + Field2 float32 `protobuf:"fixed32,2,opt,name=Field2,json=field2,oneof"` +} +type TwoOneofs_Field3 struct { + Field3 int32 `protobuf:"varint,3,opt,name=Field3,json=field3,oneof"` +} +type TwoOneofs_Field34 struct { + Field34 string `protobuf:"bytes,34,opt,name=Field34,json=field34,oneof"` +} +type TwoOneofs_Field35 struct { + Field35 []byte `protobuf:"bytes,35,opt,name=Field35,json=field35,oneof"` +} +type TwoOneofs_SubMessage2 struct { + SubMessage2 *Subby `protobuf:"bytes,36,opt,name=sub_message2,json=subMessage2,oneof"` +} + +func (*TwoOneofs_Field1) isTwoOneofs_One() {} +func (*TwoOneofs_Field2) isTwoOneofs_One() {} +func (*TwoOneofs_Field3) isTwoOneofs_One() {} +func (*TwoOneofs_Field34) isTwoOneofs_Two() {} +func (*TwoOneofs_Field35) isTwoOneofs_Two() {} +func (*TwoOneofs_SubMessage2) isTwoOneofs_Two() {} + +func (m *TwoOneofs) GetOne() isTwoOneofs_One { + if m != nil { + return m.One + } + return nil +} +func (m *TwoOneofs) GetTwo() isTwoOneofs_Two { + if m != nil { + return m.Two + } + return nil +} + +func (m *TwoOneofs) GetField1() float64 { + if x, ok := m.GetOne().(*TwoOneofs_Field1); ok { + return x.Field1 + } + return 0 +} + +func (m *TwoOneofs) GetField2() float32 { + if x, ok := m.GetOne().(*TwoOneofs_Field2); ok { + return x.Field2 + } + return 0 +} + +func (m *TwoOneofs) GetField3() int32 { + if x, ok := m.GetOne().(*TwoOneofs_Field3); ok { + return x.Field3 + } + return 0 +} + +func (m *TwoOneofs) GetField34() string { + if x, ok := m.GetTwo().(*TwoOneofs_Field34); ok { + return x.Field34 + } + return "" +} + +func (m *TwoOneofs) GetField35() []byte { + if x, ok := m.GetTwo().(*TwoOneofs_Field35); ok { + return x.Field35 + } + return nil +} + +func (m *TwoOneofs) GetSubMessage2() *Subby { + if x, ok := m.GetTwo().(*TwoOneofs_SubMessage2); ok { + return x.SubMessage2 + } + return nil +} + +// XXX_OneofFuncs is for the internal use of the proto package. +func (*TwoOneofs) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{}) { + return _TwoOneofs_OneofMarshaler, _TwoOneofs_OneofUnmarshaler, _TwoOneofs_OneofSizer, []interface{}{ + (*TwoOneofs_Field1)(nil), + (*TwoOneofs_Field2)(nil), + (*TwoOneofs_Field3)(nil), + (*TwoOneofs_Field34)(nil), + (*TwoOneofs_Field35)(nil), + (*TwoOneofs_SubMessage2)(nil), + } +} + +func _TwoOneofs_OneofMarshaler(msg proto.Message, b *proto.Buffer) error { + m := msg.(*TwoOneofs) + // one + switch x := m.One.(type) { + case *TwoOneofs_Field1: + _ = b.EncodeVarint(1<<3 | proto.WireFixed64) + _ = b.EncodeFixed64(math.Float64bits(x.Field1)) + case *TwoOneofs_Field2: + _ = b.EncodeVarint(2<<3 | proto.WireFixed32) + _ = b.EncodeFixed32(uint64(math.Float32bits(x.Field2))) + case *TwoOneofs_Field3: + _ = b.EncodeVarint(3<<3 | proto.WireVarint) + _ = b.EncodeVarint(uint64(x.Field3)) + case nil: + default: + return fmt.Errorf("TwoOneofs.One has unexpected type %T", x) + } + // two + switch x := m.Two.(type) { + case *TwoOneofs_Field34: + _ = b.EncodeVarint(34<<3 | proto.WireBytes) + _ = b.EncodeStringBytes(x.Field34) + case *TwoOneofs_Field35: + _ = b.EncodeVarint(35<<3 | proto.WireBytes) + _ = b.EncodeRawBytes(x.Field35) + case *TwoOneofs_SubMessage2: + _ = b.EncodeVarint(36<<3 | proto.WireBytes) + if err := b.EncodeMessage(x.SubMessage2); err != nil { + return err + } + case nil: + default: + return fmt.Errorf("TwoOneofs.Two has unexpected type %T", x) + } + return nil +} + +func _TwoOneofs_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) { + m := msg.(*TwoOneofs) + switch tag { + case 1: // one.Field1 + if wire != proto.WireFixed64 { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeFixed64() + m.One = &TwoOneofs_Field1{math.Float64frombits(x)} + return true, err + case 2: // one.Field2 + if wire != proto.WireFixed32 { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeFixed32() + m.One = &TwoOneofs_Field2{math.Float32frombits(uint32(x))} + return true, err + case 3: // one.Field3 + if wire != proto.WireVarint { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeVarint() + m.One = &TwoOneofs_Field3{int32(x)} + return true, err + case 34: // two.Field34 + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeStringBytes() + m.Two = &TwoOneofs_Field34{x} + return true, err + case 35: // two.Field35 + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeRawBytes(true) + m.Two = &TwoOneofs_Field35{x} + return true, err + case 36: // two.sub_message2 + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + msg := new(Subby) + err := b.DecodeMessage(msg) + m.Two = &TwoOneofs_SubMessage2{msg} + return true, err + default: + return false, nil + } +} + +func _TwoOneofs_OneofSizer(msg proto.Message) (n int) { + m := msg.(*TwoOneofs) + // one + switch x := m.One.(type) { + case *TwoOneofs_Field1: + n += proto.SizeVarint(1<<3 | proto.WireFixed64) + n += 8 + case *TwoOneofs_Field2: + n += proto.SizeVarint(2<<3 | proto.WireFixed32) + n += 4 + case *TwoOneofs_Field3: + n += proto.SizeVarint(3<<3 | proto.WireVarint) + n += proto.SizeVarint(uint64(x.Field3)) + case nil: + default: + panic(fmt.Sprintf("proto: unexpected type %T in oneof", x)) + } + // two + switch x := m.Two.(type) { + case *TwoOneofs_Field34: + n += proto.SizeVarint(34<<3 | proto.WireBytes) + n += proto.SizeVarint(uint64(len(x.Field34))) + n += len(x.Field34) + case *TwoOneofs_Field35: + n += proto.SizeVarint(35<<3 | proto.WireBytes) + n += proto.SizeVarint(uint64(len(x.Field35))) + n += len(x.Field35) + case *TwoOneofs_SubMessage2: + s := proto.Size(x.SubMessage2) + n += proto.SizeVarint(36<<3 | proto.WireBytes) + n += proto.SizeVarint(uint64(s)) + n += s + case nil: + default: + panic(fmt.Sprintf("proto: unexpected type %T in oneof", x)) + } + return n +} + +type CustomOneof struct { + // Types that are valid to be assigned to Custom: + // *CustomOneof_Stringy + // *CustomOneof_CustomType + // *CustomOneof_CastType + // *CustomOneof_MyCustomName + Custom isCustomOneof_Custom `protobuf_oneof:"custom"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *CustomOneof) Reset() { *m = CustomOneof{} } +func (*CustomOneof) ProtoMessage() {} +func (*CustomOneof) Descriptor() ([]byte, []int) { return fileDescriptorOne, []int{3} } + +type isCustomOneof_Custom interface { + isCustomOneof_Custom() + Equal(interface{}) bool + VerboseEqual(interface{}) error + Size() int +} + +type CustomOneof_Stringy struct { + Stringy string `protobuf:"bytes,34,opt,name=Stringy,json=stringy,oneof"` +} +type CustomOneof_CustomType struct { + CustomType github_com_gogo_protobuf_test_custom.Uint128 `protobuf:"bytes,35,opt,name=CustomType,json=customType,oneof,customtype=github.com/gogo/protobuf/test/custom.Uint128"` +} +type CustomOneof_CastType struct { + CastType github_com_gogo_protobuf_test_casttype.MyUint64Type `protobuf:"varint,36,opt,name=CastType,json=castType,oneof,casttype=github.com/gogo/protobuf/test/casttype.MyUint64Type"` +} +type CustomOneof_MyCustomName struct { + MyCustomName int64 `protobuf:"varint,37,opt,name=CustomName,json=customName,oneof"` +} + +func (*CustomOneof_Stringy) isCustomOneof_Custom() {} +func (*CustomOneof_CustomType) isCustomOneof_Custom() {} +func (*CustomOneof_CastType) isCustomOneof_Custom() {} +func (*CustomOneof_MyCustomName) isCustomOneof_Custom() {} + +func (m *CustomOneof) GetCustom() isCustomOneof_Custom { + if m != nil { + return m.Custom + } + return nil +} + +func (m *CustomOneof) GetStringy() string { + if x, ok := m.GetCustom().(*CustomOneof_Stringy); ok { + return x.Stringy + } + return "" +} + +func (m *CustomOneof) GetCastType() github_com_gogo_protobuf_test_casttype.MyUint64Type { + if x, ok := m.GetCustom().(*CustomOneof_CastType); ok { + return x.CastType + } + return 0 +} + +func (m *CustomOneof) GetMyCustomName() int64 { + if x, ok := m.GetCustom().(*CustomOneof_MyCustomName); ok { + return x.MyCustomName + } + return 0 +} + +// XXX_OneofFuncs is for the internal use of the proto package. +func (*CustomOneof) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{}) { + return _CustomOneof_OneofMarshaler, _CustomOneof_OneofUnmarshaler, _CustomOneof_OneofSizer, []interface{}{ + (*CustomOneof_Stringy)(nil), + (*CustomOneof_CustomType)(nil), + (*CustomOneof_CastType)(nil), + (*CustomOneof_MyCustomName)(nil), + } +} + +func _CustomOneof_OneofMarshaler(msg proto.Message, b *proto.Buffer) error { + m := msg.(*CustomOneof) + // custom + switch x := m.Custom.(type) { + case *CustomOneof_Stringy: + _ = b.EncodeVarint(34<<3 | proto.WireBytes) + _ = b.EncodeStringBytes(x.Stringy) + case *CustomOneof_CustomType: + _ = b.EncodeVarint(35<<3 | proto.WireBytes) + data, err := x.CustomType.Marshal() + if err != nil { + return err + } + _ = b.EncodeRawBytes(data) + case *CustomOneof_CastType: + _ = b.EncodeVarint(36<<3 | proto.WireVarint) + _ = b.EncodeVarint(uint64(x.CastType)) + case *CustomOneof_MyCustomName: + _ = b.EncodeVarint(37<<3 | proto.WireVarint) + _ = b.EncodeVarint(uint64(x.MyCustomName)) + case nil: + default: + return fmt.Errorf("CustomOneof.Custom has unexpected type %T", x) + } + return nil +} + +func _CustomOneof_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) { + m := msg.(*CustomOneof) + switch tag { + case 34: // custom.Stringy + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeStringBytes() + m.Custom = &CustomOneof_Stringy{x} + return true, err + case 35: // custom.CustomType + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeRawBytes(true) + if err != nil { + return true, err + } + var cc github_com_gogo_protobuf_test_custom.Uint128 + c := &cc + err = c.Unmarshal(x) + m.Custom = &CustomOneof_CustomType{*c} + return true, err + case 36: // custom.CastType + if wire != proto.WireVarint { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeVarint() + m.Custom = &CustomOneof_CastType{github_com_gogo_protobuf_test_casttype.MyUint64Type(x)} + return true, err + case 37: // custom.CustomName + if wire != proto.WireVarint { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeVarint() + m.Custom = &CustomOneof_MyCustomName{int64(x)} + return true, err + default: + return false, nil + } +} + +func _CustomOneof_OneofSizer(msg proto.Message) (n int) { + m := msg.(*CustomOneof) + // custom + switch x := m.Custom.(type) { + case *CustomOneof_Stringy: + n += proto.SizeVarint(34<<3 | proto.WireBytes) + n += proto.SizeVarint(uint64(len(x.Stringy))) + n += len(x.Stringy) + case *CustomOneof_CustomType: + n += proto.SizeVarint(35<<3 | proto.WireBytes) + n += proto.SizeVarint(uint64(x.CustomType.Size())) + n += x.CustomType.Size() + case *CustomOneof_CastType: + n += proto.SizeVarint(36<<3 | proto.WireVarint) + n += proto.SizeVarint(uint64(x.CastType)) + case *CustomOneof_MyCustomName: + n += proto.SizeVarint(37<<3 | proto.WireVarint) + n += proto.SizeVarint(uint64(x.MyCustomName)) + case nil: + default: + panic(fmt.Sprintf("proto: unexpected type %T in oneof", x)) + } + return n +} + +func init() { + proto.RegisterType((*Subby)(nil), "one.Subby") + proto.RegisterType((*AllTypesOneOf)(nil), "one.AllTypesOneOf") + proto.RegisterType((*TwoOneofs)(nil), "one.TwoOneofs") + proto.RegisterType((*CustomOneof)(nil), "one.CustomOneof") +} +func (this *Subby) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return OneDescription() +} +func (this *AllTypesOneOf) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return OneDescription() +} +func (this *TwoOneofs) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return OneDescription() +} +func (this *CustomOneof) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return OneDescription() +} +func OneDescription() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + d := &github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet{} + var gzipped = []byte{ + // 3726 bytes of a gzipped FileDescriptorSet + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xcc, 0x5a, 0x5b, 0x6c, 0x23, 0xe5, + 0xf5, 0xc7, 0xf1, 0x25, 0xf6, 0xb1, 0xe3, 0x38, 0x93, 0xb0, 0xeb, 0x0d, 0xb0, 0x61, 0xbd, 0x5c, + 0x96, 0x05, 0x92, 0xdd, 0x64, 0xb3, 0x17, 0xf3, 0xff, 0x83, 0xe2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, 0x69, 0x4a, 0xc9, 0x28, 0x6b, 0x4a, 0x55, 0xdf, 0x30, + 0xd2, 0x31, 0x4a, 0x30, 0xd6, 0x39, 0x11, 0x6a, 0x38, 0x8b, 0x76, 0x0b, 0x68, 0x26, 0x27, 0x4d, + 0xcf, 0xb5, 0xb4, 0x07, 0x22, 0xe6, 0x96, 0x6e, 0xa9, 0x97, 0xd2, 0x09, 0x1a, 0x21, 0xfc, 0x2a, + 0xf3, 0x8f, 0x30, 0x0c, 0xf6, 0x12, 0x62, 0x77, 0x40, 0x78, 0x83, 0xcc, 0x12, 0x03, 0x6c, 0x17, + 0x3e, 0x60, 0x18, 0xaf, 0x13, 0x23, 0xef, 0xd3, 0x89, 0x33, 0x10, 0xd7, 0x35, 0xd3, 0xd2, 0xca, + 0x2c, 0x22, 0x82, 0x3d, 0xc6, 0x14, 0x30, 0x50, 0x67, 0x48, 0x85, 0xde, 0x57, 0x48, 0x9d, 0x85, + 0x41, 0x7b, 0x48, 0x4a, 0x53, 0xd5, 0x2b, 0x22, 0x36, 0x27, 0xfc, 0x46, 0x32, 0x9e, 0x17, 0x38, + 0x99, 0xc0, 0xe4, 0xa4, 0xe6, 0xb9, 0x96, 0xe6, 0x00, 0x0c, 0x5d, 0x33, 0x36, 0x70, 0x7b, 0x95, + 0x6a, 0x18, 0x27, 0xdd, 0xbd, 0x54, 0x20, 0x26, 0x1d, 0x5e, 0x32, 0x98, 0xb4, 0x54, 0x93, 0x4e, + 0x39, 0xa1, 0xd6, 0xbf, 0x4d, 0xa4, 0x2c, 0xb1, 0x4d, 0xd6, 0x11, 0x6d, 0x45, 0x48, 0x36, 0x35, + 0x12, 0xf7, 0xe8, 0x62, 0x36, 0xb3, 0x18, 0x1d, 0xc4, 0xb8, 0xef, 0xcc, 0x64, 0x0e, 0x63, 0x13, + 0x1b, 0x68, 0xba, 0x2f, 0xa5, 0x83, 0x60, 0x0b, 0x14, 0x1a, 0x56, 0x40, 0xb3, 0x50, 0x42, 0x08, + 0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d, 0xf6, 0x58, 0xcc, 0xfc, 0xa8, 0x0f, 0x42, 0x74, + 0xbf, 0x0d, 0x42, 0x7c, 0xed, 0xbe, 0x95, 0xbc, 0x32, 0x57, 0x28, 0xe6, 0x16, 0xf3, 0xa9, 0x80, + 0x94, 0x04, 0xa0, 0x82, 0xd3, 0x8b, 0x85, 0x99, 0xb5, 0x54, 0x9f, 0x7d, 0xbd, 0xb0, 0xbc, 0x76, + 0xfc, 0x58, 0x2a, 0x68, 0x03, 0x8a, 0x4c, 0x10, 0x72, 0x1b, 0x4c, 0x4d, 0xa6, 0xc2, 0x18, 0x09, + 0x09, 0x46, 0xb0, 0x70, 0x36, 0x3f, 0x87, 0x16, 0x11, 0xaf, 0x04, 0x6d, 0xfa, 0xa5, 0x01, 0x88, + 0x51, 0x49, 0xae, 0x50, 0x58, 0x4c, 0x45, 0x6d, 0xce, 0xd5, 0x35, 0x79, 0x61, 0x79, 0x3e, 0x15, + 0xb3, 0x39, 0xe7, 0xe5, 0x42, 0x71, 0x25, 0x05, 0x36, 0xc3, 0x52, 0x7e, 0x75, 0x75, 0x66, 0x3e, + 0x9f, 0x8a, 0xdb, 0x16, 0xb9, 0xfb, 0xd6, 0xf2, 0xab, 0xa9, 0x84, 0x67, 0x58, 0x78, 0x8b, 0x01, + 0xfb, 0x16, 0xf9, 0xe5, 0xe2, 0x52, 0x2a, 0x29, 0x0d, 0xc1, 0x00, 0xbb, 0x85, 0x18, 0xc4, 0x60, + 0x9b, 0x08, 0x47, 0x9a, 0x72, 0x06, 0xc2, 0x58, 0x86, 0x3c, 0x02, 0xb4, 0x90, 0x32, 0xb3, 0x10, + 0xa6, 0xd1, 0x85, 0x51, 0x9c, 0x5c, 0x9c, 0xc9, 0xe5, 0x17, 0x95, 0xc2, 0xca, 0xda, 0x42, 0x61, + 0x79, 0x66, 0x11, 0x7d, 0x67, 0xcb, 0xe4, 0xfc, 0xff, 0x15, 0x17, 0xe4, 0xfc, 0x1c, 0xfa, 0xcf, + 0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d, 0x57, 0x5d, 0x6d, 0x60, 0xd8, 0x58, 0xcd, + 0x2d, 0xda, 0xbd, 0x45, 0xe5, 0x28, 0x0a, 0xf2, 0xe4, 0xfa, 0x83, 0x5b, 0x03, 0xb7, 0x1f, 0x7f, + 0x17, 0x84, 0x84, 0xbb, 0x83, 0x23, 0x0d, 0x71, 0x89, 0xa6, 0xf9, 0x00, 0xcd, 0x02, 0x07, 0x77, + 0xec, 0xf7, 0xc6, 0x67, 0x49, 0xfe, 0xcf, 0x46, 0x58, 0x5f, 0x25, 0x33, 0x24, 0xa9, 0xbd, 0x24, + 0xd6, 0x34, 0xd6, 0xad, 0x47, 0x65, 0x7e, 0x85, 0xc9, 0x2e, 0x72, 0xce, 0xa4, 0xdc, 0x11, 0xca, + 0x7d, 0xc3, 0xce, 0xdc, 0x67, 0x56, 0x29, 0x79, 0xec, 0xcc, 0xaa, 0xb2, 0x5c, 0x90, 0x97, 0x66, + 0x16, 0x65, 0x0e, 0x97, 0xf6, 0x41, 0xa8, 0xa6, 0x3e, 0xb0, 0xe5, 0xad, 0x14, 0x54, 0xd4, 0xab, + 0xe3, 0x91, 0x81, 0x1c, 0x79, 0x78, 0xf3, 0x33, 0x15, 0x7d, 0x80, 0xa1, 0x3f, 0x01, 0x61, 0xea, + 0x2f, 0x09, 0x80, 0x7b, 0x2c, 0x75, 0x95, 0x14, 0x85, 0xd0, 0x6c, 0x41, 0x26, 0xe1, 0x8f, 0xf1, + 0xce, 0xa4, 0xca, 0xca, 0x42, 0x7e, 0x16, 0x77, 0x40, 0x66, 0x1a, 0x22, 0xcc, 0x09, 0x64, 0x6b, + 0xd8, 0x6e, 0x40, 0x10, 0xbb, 0xe4, 0x1c, 0x01, 0xa1, 0x2d, 0x2e, 0xe5, 0xf2, 0x72, 0xaa, 0xcf, + 0xbd, 0xbc, 0x3f, 0x09, 0x40, 0xdc, 0xd5, 0x50, 0x91, 0x52, 0xae, 0xd6, 0x6a, 0xc6, 0x45, 0x45, + 0xad, 0x55, 0x31, 0x43, 0xb1, 0xf5, 0x01, 0x2a, 0x9a, 0x21, 0x92, 0x5e, 0xfd, 0xf7, 0x1f, 0x89, + 0xcd, 0xa7, 0x03, 0x90, 0x6a, 0x6f, 0xc6, 0xda, 0x06, 0x18, 0xf8, 0x50, 0x07, 0xf8, 0x64, 0x00, + 0x92, 0xde, 0x0e, 0xac, 0x6d, 0x78, 0x07, 0x3e, 0xd4, 0xe1, 0x3d, 0x11, 0x80, 0x01, 0x4f, 0xdf, + 0xf5, 0x5f, 0x35, 0xba, 0xc7, 0x83, 0x30, 0xdc, 0x05, 0x87, 0x09, 0x88, 0x35, 0xa8, 0xac, 0x67, + 0xbe, 0xbd, 0x97, 0x7b, 0x8d, 0x93, 0xfa, 0xb7, 0xa2, 0x36, 0x2d, 0xde, 0xcf, 0x62, 0xbd, 0xac, + 0x96, 0x31, 0xa9, 0x56, 0x37, 0xaa, 0xd8, 0xbe, 0xb1, 0x27, 0x16, 0xd6, 0xb5, 0x0e, 0x3a, 0x72, + 0xf6, 0x78, 0x7c, 0x1b, 0x48, 0x0d, 0xc3, 0xac, 0x5a, 0xd5, 0x0b, 0xe4, 0x78, 0x4e, 0x3c, 0x48, + 0x93, 0x2e, 0x36, 0x24, 0xa7, 0x84, 0x66, 0x41, 0xb7, 0x6c, 0x6b, 0x5d, 0xab, 0xa8, 0x6d, 0xd6, + 0x24, 0x0d, 0x05, 0xe5, 0x94, 0xd0, 0xd8, 0xd6, 0xd8, 0x68, 0x96, 0x8d, 0x16, 0x69, 0x08, 0x98, + 0x1d, 0xc9, 0x7a, 0x01, 0x39, 0xce, 0x64, 0xb6, 0x09, 0xef, 0xd8, 0x9c, 0x27, 0xf8, 0x84, 0x1c, + 0x67, 0x32, 0x66, 0x72, 0x33, 0x0c, 0xaa, 0x95, 0x4a, 0x93, 0x90, 0x0b, 0x22, 0xd6, 0x86, 0x26, + 0x6d, 0x31, 0x35, 0x1c, 0x3d, 0x03, 0x51, 0xe1, 0x07, 0x52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0xe7, 0x9c, 0x23, 0x1d, 0xab, 0x4b, 0x68, 0x57, 0x40, 0xc8, 0xed, + 0xf5, 0xe8, 0x81, 0xf3, 0x09, 0xce, 0x29, 0x71, 0xac, 0x58, 0x16, 0xc2, 0x78, 0x06, 0x86, 0xf0, + 0x49, 0x7d, 0xdd, 0x30, 0xf9, 0x73, 0x6f, 0x0f, 0x74, 0x4f, 0x72, 0xba, 0x41, 0x0e, 0xa4, 0x4f, + 0xc1, 0x84, 0xeb, 0x14, 0x44, 0x37, 0xf0, 0x01, 0xa8, 0x07, 0x8a, 0xa7, 0x38, 0x45, 0x3f, 0xb1, + 0x27, 0xd0, 0x19, 0x48, 0x54, 0x0c, 0x9e, 0x86, 0xfd, 0xe1, 0x4f, 0x73, 0x78, 0x5c, 0x60, 0x38, + 0x45, 0xc3, 0x68, 0xb4, 0x6a, 0x24, 0x47, 0xfb, 0x53, 0x7c, 0x45, 0x50, 0x08, 0x0c, 0xa7, 0xd8, + 0x85, 0x5b, 0xbf, 0x2a, 0x28, 0x4c, 0x97, 0x3f, 0xef, 0x22, 0x67, 0xbd, 0xb5, 0x2d, 0x43, 0xef, + 0x65, 0x10, 0xcf, 0x70, 0x06, 0xe0, 0x10, 0x42, 0x70, 0x07, 0xc4, 0x7a, 0x5d, 0x88, 0xaf, 0x71, + 0x78, 0x54, 0x13, 0x2b, 0x80, 0xfb, 0x4c, 0x24, 0x19, 0xf2, 0x6e, 0xc5, 0x9f, 0xe2, 0xeb, 0x9c, + 0x22, 0xe9, 0x82, 0xf1, 0x69, 0x58, 0x9a, 0x69, 0xe1, 0xa3, 0x7a, 0x0f, 0x24, 0xcf, 0x89, 0x69, + 0x70, 0x08, 0x77, 0xe5, 0xba, 0xa6, 0x97, 0x36, 0x7b, 0x63, 0x78, 0x5e, 0xb8, 0x52, 0x60, 0x08, + 0x05, 0x66, 0x9e, 0xba, 0xda, 0xc4, 0x87, 0xeb, 0x5a, 0x4f, 0xcb, 0xf1, 0x0d, 0xce, 0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0x86, 0xdf, 0xdf, 0xc2, 0xff, 0xef, 0xe0, 0xff, 0x77, 0xf1, 0xff, 0x83, 0xbf, 0xdf, 0x1f, 0xf8, + 0x57, 0x00, 0x00, 0x00, 0xff, 0xff, 0x8f, 0x5d, 0xef, 0xf6, 0xef, 0x2e, 0x00, 0x00, + } + r := bytes.NewReader(gzipped) + gzipr, err := compress_gzip.NewReader(r) + if err != nil { + panic(err) + } + ungzipped, err := io_ioutil.ReadAll(gzipr) + if err != nil { + panic(err) + } + if err := github_com_gogo_protobuf_proto.Unmarshal(ungzipped, d); err != nil { + panic(err) + } + return d +} +func (this *Subby) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*Subby) + if !ok { + that2, ok := that.(Subby) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *Subby") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *Subby but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *Subby but is not nil && this == nil") + } + if this.Sub != nil && that1.Sub != nil { + if *this.Sub != *that1.Sub { + return fmt.Errorf("Sub this(%v) Not Equal that(%v)", *this.Sub, *that1.Sub) + } + } else if this.Sub != nil { + return fmt.Errorf("this.Sub == nil && that.Sub != nil") + } else if that1.Sub != nil { + return fmt.Errorf("Sub this(%v) Not Equal that(%v)", this.Sub, that1.Sub) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *Subby) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*Subby) + if !ok { + that2, ok := that.(Subby) + 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.Sub != nil && that1.Sub != nil { + if *this.Sub != *that1.Sub { + return false + } + } else if this.Sub != nil { + return false + } else if that1.Sub != nil { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *AllTypesOneOf) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*AllTypesOneOf) + if !ok { + that2, ok := that.(AllTypesOneOf) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *AllTypesOneOf") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *AllTypesOneOf but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *AllTypesOneOf but is not nil && this == nil") + } + if that1.TestOneof == nil { + if this.TestOneof != nil { + return fmt.Errorf("this.TestOneof != nil && that1.TestOneof == nil") + } + } else if this.TestOneof == nil { + return fmt.Errorf("this.TestOneof == nil && that1.TestOneof != nil") + } else if err := this.TestOneof.VerboseEqual(that1.TestOneof); err != nil { + return err + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *AllTypesOneOf_Field1) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*AllTypesOneOf_Field1) + if !ok { + that2, ok := that.(AllTypesOneOf_Field1) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *AllTypesOneOf_Field1") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *AllTypesOneOf_Field1 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *AllTypesOneOf_Field1 but is not nil && this == nil") + } + if this.Field1 != that1.Field1 { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) + } + return nil +} +func (this *AllTypesOneOf_Field2) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*AllTypesOneOf_Field2) + if !ok { + that2, ok := that.(AllTypesOneOf_Field2) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *AllTypesOneOf_Field2") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *AllTypesOneOf_Field2 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *AllTypesOneOf_Field2 but is not nil && this == nil") + } + if this.Field2 != that1.Field2 { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) + } + return nil +} +func (this *AllTypesOneOf_Field3) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*AllTypesOneOf_Field3) + if !ok { + that2, ok := that.(AllTypesOneOf_Field3) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *AllTypesOneOf_Field3") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *AllTypesOneOf_Field3 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *AllTypesOneOf_Field3 but is not nil && this == nil") + } + if this.Field3 != that1.Field3 { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", this.Field3, that1.Field3) + } + return nil +} +func (this *AllTypesOneOf_Field4) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*AllTypesOneOf_Field4) + if !ok { + that2, ok := that.(AllTypesOneOf_Field4) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *AllTypesOneOf_Field4") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *AllTypesOneOf_Field4 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *AllTypesOneOf_Field4 but is not nil && this == nil") + } + if this.Field4 != that1.Field4 { + return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", this.Field4, that1.Field4) + } + return nil +} +func (this *AllTypesOneOf_Field5) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*AllTypesOneOf_Field5) + if !ok { + that2, ok := that.(AllTypesOneOf_Field5) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *AllTypesOneOf_Field5") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *AllTypesOneOf_Field5 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *AllTypesOneOf_Field5 but is not nil && this == nil") + } + if this.Field5 != that1.Field5 { + return fmt.Errorf("Field5 this(%v) Not Equal that(%v)", this.Field5, that1.Field5) + } + return nil +} +func (this *AllTypesOneOf_Field6) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*AllTypesOneOf_Field6) + if !ok { + that2, ok := that.(AllTypesOneOf_Field6) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *AllTypesOneOf_Field6") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *AllTypesOneOf_Field6 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *AllTypesOneOf_Field6 but is not nil && this == nil") + } + if this.Field6 != that1.Field6 { + return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", this.Field6, that1.Field6) + } + return nil +} +func (this *AllTypesOneOf_Field7) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*AllTypesOneOf_Field7) + if !ok { + that2, ok := that.(AllTypesOneOf_Field7) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *AllTypesOneOf_Field7") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *AllTypesOneOf_Field7 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *AllTypesOneOf_Field7 but is not nil && this == nil") + } + if this.Field7 != that1.Field7 { + return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", this.Field7, that1.Field7) + } + return nil +} +func (this *AllTypesOneOf_Field8) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*AllTypesOneOf_Field8) + if !ok { + that2, ok := that.(AllTypesOneOf_Field8) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *AllTypesOneOf_Field8") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *AllTypesOneOf_Field8 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *AllTypesOneOf_Field8 but is not nil && this == nil") + } + if this.Field8 != that1.Field8 { + return fmt.Errorf("Field8 this(%v) Not Equal that(%v)", this.Field8, that1.Field8) + } + return nil +} +func (this *AllTypesOneOf_Field9) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*AllTypesOneOf_Field9) + if !ok { + that2, ok := that.(AllTypesOneOf_Field9) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *AllTypesOneOf_Field9") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *AllTypesOneOf_Field9 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *AllTypesOneOf_Field9 but is not nil && this == nil") + } + if this.Field9 != that1.Field9 { + return fmt.Errorf("Field9 this(%v) Not Equal that(%v)", this.Field9, that1.Field9) + } + return nil +} +func (this *AllTypesOneOf_Field10) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*AllTypesOneOf_Field10) + if !ok { + that2, ok := that.(AllTypesOneOf_Field10) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *AllTypesOneOf_Field10") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *AllTypesOneOf_Field10 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *AllTypesOneOf_Field10 but is not nil && this == nil") + } + if this.Field10 != that1.Field10 { + return fmt.Errorf("Field10 this(%v) Not Equal that(%v)", this.Field10, that1.Field10) + } + return nil +} +func (this *AllTypesOneOf_Field11) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*AllTypesOneOf_Field11) + if !ok { + that2, ok := that.(AllTypesOneOf_Field11) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *AllTypesOneOf_Field11") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *AllTypesOneOf_Field11 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *AllTypesOneOf_Field11 but is not nil && this == nil") + } + if this.Field11 != that1.Field11 { + return fmt.Errorf("Field11 this(%v) Not Equal that(%v)", this.Field11, that1.Field11) + } + return nil +} +func (this *AllTypesOneOf_Field12) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*AllTypesOneOf_Field12) + if !ok { + that2, ok := that.(AllTypesOneOf_Field12) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *AllTypesOneOf_Field12") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *AllTypesOneOf_Field12 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *AllTypesOneOf_Field12 but is not nil && this == nil") + } + if this.Field12 != that1.Field12 { + return fmt.Errorf("Field12 this(%v) Not Equal that(%v)", this.Field12, that1.Field12) + } + return nil +} +func (this *AllTypesOneOf_Field13) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*AllTypesOneOf_Field13) + if !ok { + that2, ok := that.(AllTypesOneOf_Field13) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *AllTypesOneOf_Field13") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *AllTypesOneOf_Field13 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *AllTypesOneOf_Field13 but is not nil && this == nil") + } + if this.Field13 != that1.Field13 { + return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", this.Field13, that1.Field13) + } + return nil +} +func (this *AllTypesOneOf_Field14) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*AllTypesOneOf_Field14) + if !ok { + that2, ok := that.(AllTypesOneOf_Field14) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *AllTypesOneOf_Field14") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *AllTypesOneOf_Field14 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *AllTypesOneOf_Field14 but is not nil && this == nil") + } + if this.Field14 != that1.Field14 { + return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", this.Field14, that1.Field14) + } + return nil +} +func (this *AllTypesOneOf_Field15) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*AllTypesOneOf_Field15) + if !ok { + that2, ok := that.(AllTypesOneOf_Field15) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *AllTypesOneOf_Field15") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *AllTypesOneOf_Field15 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *AllTypesOneOf_Field15 but is not nil && this == nil") + } + if !bytes.Equal(this.Field15, that1.Field15) { + return fmt.Errorf("Field15 this(%v) Not Equal that(%v)", this.Field15, that1.Field15) + } + return nil +} +func (this *AllTypesOneOf_SubMessage) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*AllTypesOneOf_SubMessage) + if !ok { + that2, ok := that.(AllTypesOneOf_SubMessage) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *AllTypesOneOf_SubMessage") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *AllTypesOneOf_SubMessage but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *AllTypesOneOf_SubMessage but is not nil && this == nil") + } + if !this.SubMessage.Equal(that1.SubMessage) { + return fmt.Errorf("SubMessage this(%v) Not Equal that(%v)", this.SubMessage, that1.SubMessage) + } + return nil +} +func (this *AllTypesOneOf) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*AllTypesOneOf) + if !ok { + that2, ok := that.(AllTypesOneOf) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + if this == nil { + return true + } + return false + } else if this == nil { + return false + } + if that1.TestOneof == nil { + if this.TestOneof != nil { + return false + } + } else if this.TestOneof == nil { + return false + } else if !this.TestOneof.Equal(that1.TestOneof) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *AllTypesOneOf_Field1) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*AllTypesOneOf_Field1) + if !ok { + that2, ok := that.(AllTypesOneOf_Field1) + 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.Field1 != that1.Field1 { + return false + } + return true +} +func (this *AllTypesOneOf_Field2) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*AllTypesOneOf_Field2) + if !ok { + that2, ok := that.(AllTypesOneOf_Field2) + 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.Field2 != that1.Field2 { + return false + } + return true +} +func (this *AllTypesOneOf_Field3) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*AllTypesOneOf_Field3) + if !ok { + that2, ok := that.(AllTypesOneOf_Field3) + 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.Field3 != that1.Field3 { + return false + } + return true +} +func (this *AllTypesOneOf_Field4) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*AllTypesOneOf_Field4) + if !ok { + that2, ok := that.(AllTypesOneOf_Field4) + 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.Field4 != that1.Field4 { + return false + } + return true +} +func (this *AllTypesOneOf_Field5) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*AllTypesOneOf_Field5) + if !ok { + that2, ok := that.(AllTypesOneOf_Field5) + 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.Field5 != that1.Field5 { + return false + } + return true +} +func (this *AllTypesOneOf_Field6) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*AllTypesOneOf_Field6) + if !ok { + that2, ok := that.(AllTypesOneOf_Field6) + 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.Field6 != that1.Field6 { + return false + } + return true +} +func (this *AllTypesOneOf_Field7) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*AllTypesOneOf_Field7) + if !ok { + that2, ok := that.(AllTypesOneOf_Field7) + 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.Field7 != that1.Field7 { + return false + } + return true +} +func (this *AllTypesOneOf_Field8) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*AllTypesOneOf_Field8) + if !ok { + that2, ok := that.(AllTypesOneOf_Field8) + 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.Field8 != that1.Field8 { + return false + } + return true +} +func (this *AllTypesOneOf_Field9) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*AllTypesOneOf_Field9) + if !ok { + that2, ok := that.(AllTypesOneOf_Field9) + 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.Field9 != that1.Field9 { + return false + } + return true +} +func (this *AllTypesOneOf_Field10) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*AllTypesOneOf_Field10) + if !ok { + that2, ok := that.(AllTypesOneOf_Field10) + 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.Field10 != that1.Field10 { + return false + } + return true +} +func (this *AllTypesOneOf_Field11) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*AllTypesOneOf_Field11) + if !ok { + that2, ok := that.(AllTypesOneOf_Field11) + 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.Field11 != that1.Field11 { + return false + } + return true +} +func (this *AllTypesOneOf_Field12) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*AllTypesOneOf_Field12) + if !ok { + that2, ok := that.(AllTypesOneOf_Field12) + 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.Field12 != that1.Field12 { + return false + } + return true +} +func (this *AllTypesOneOf_Field13) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*AllTypesOneOf_Field13) + if !ok { + that2, ok := that.(AllTypesOneOf_Field13) + 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.Field13 != that1.Field13 { + return false + } + return true +} +func (this *AllTypesOneOf_Field14) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*AllTypesOneOf_Field14) + if !ok { + that2, ok := that.(AllTypesOneOf_Field14) + 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.Field14 != that1.Field14 { + return false + } + return true +} +func (this *AllTypesOneOf_Field15) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*AllTypesOneOf_Field15) + if !ok { + that2, ok := that.(AllTypesOneOf_Field15) + 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.Field15, that1.Field15) { + return false + } + return true +} +func (this *AllTypesOneOf_SubMessage) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*AllTypesOneOf_SubMessage) + if !ok { + that2, ok := that.(AllTypesOneOf_SubMessage) + 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.SubMessage.Equal(that1.SubMessage) { + return false + } + return true +} +func (this *TwoOneofs) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*TwoOneofs) + if !ok { + that2, ok := that.(TwoOneofs) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *TwoOneofs") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *TwoOneofs but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *TwoOneofs but is not nil && this == nil") + } + if that1.One == nil { + if this.One != nil { + return fmt.Errorf("this.One != nil && that1.One == nil") + } + } else if this.One == nil { + return fmt.Errorf("this.One == nil && that1.One != nil") + } else if err := this.One.VerboseEqual(that1.One); err != nil { + return err + } + if that1.Two == nil { + if this.Two != nil { + return fmt.Errorf("this.Two != nil && that1.Two == nil") + } + } else if this.Two == nil { + return fmt.Errorf("this.Two == nil && that1.Two != nil") + } else if err := this.Two.VerboseEqual(that1.Two); err != nil { + return err + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *TwoOneofs_Field1) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*TwoOneofs_Field1) + if !ok { + that2, ok := that.(TwoOneofs_Field1) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *TwoOneofs_Field1") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *TwoOneofs_Field1 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *TwoOneofs_Field1 but is not nil && this == nil") + } + if this.Field1 != that1.Field1 { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) + } + return nil +} +func (this *TwoOneofs_Field2) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*TwoOneofs_Field2) + if !ok { + that2, ok := that.(TwoOneofs_Field2) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *TwoOneofs_Field2") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *TwoOneofs_Field2 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *TwoOneofs_Field2 but is not nil && this == nil") + } + if this.Field2 != that1.Field2 { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) + } + return nil +} +func (this *TwoOneofs_Field3) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*TwoOneofs_Field3) + if !ok { + that2, ok := that.(TwoOneofs_Field3) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *TwoOneofs_Field3") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *TwoOneofs_Field3 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *TwoOneofs_Field3 but is not nil && this == nil") + } + if this.Field3 != that1.Field3 { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", this.Field3, that1.Field3) + } + return nil +} +func (this *TwoOneofs_Field34) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*TwoOneofs_Field34) + if !ok { + that2, ok := that.(TwoOneofs_Field34) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *TwoOneofs_Field34") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *TwoOneofs_Field34 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *TwoOneofs_Field34 but is not nil && this == nil") + } + if this.Field34 != that1.Field34 { + return fmt.Errorf("Field34 this(%v) Not Equal that(%v)", this.Field34, that1.Field34) + } + return nil +} +func (this *TwoOneofs_Field35) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*TwoOneofs_Field35) + if !ok { + that2, ok := that.(TwoOneofs_Field35) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *TwoOneofs_Field35") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *TwoOneofs_Field35 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *TwoOneofs_Field35 but is not nil && this == nil") + } + if !bytes.Equal(this.Field35, that1.Field35) { + return fmt.Errorf("Field35 this(%v) Not Equal that(%v)", this.Field35, that1.Field35) + } + return nil +} +func (this *TwoOneofs_SubMessage2) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*TwoOneofs_SubMessage2) + if !ok { + that2, ok := that.(TwoOneofs_SubMessage2) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *TwoOneofs_SubMessage2") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *TwoOneofs_SubMessage2 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *TwoOneofs_SubMessage2 but is not nil && this == nil") + } + if !this.SubMessage2.Equal(that1.SubMessage2) { + return fmt.Errorf("SubMessage2 this(%v) Not Equal that(%v)", this.SubMessage2, that1.SubMessage2) + } + return nil +} +func (this *TwoOneofs) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*TwoOneofs) + if !ok { + that2, ok := that.(TwoOneofs) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + if this == nil { + return true + } + return false + } else if this == nil { + return false + } + if that1.One == nil { + if this.One != nil { + return false + } + } else if this.One == nil { + return false + } else if !this.One.Equal(that1.One) { + return false + } + if that1.Two == nil { + if this.Two != nil { + return false + } + } else if this.Two == nil { + return false + } else if !this.Two.Equal(that1.Two) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *TwoOneofs_Field1) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*TwoOneofs_Field1) + if !ok { + that2, ok := that.(TwoOneofs_Field1) + 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.Field1 != that1.Field1 { + return false + } + return true +} +func (this *TwoOneofs_Field2) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*TwoOneofs_Field2) + if !ok { + that2, ok := that.(TwoOneofs_Field2) + 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.Field2 != that1.Field2 { + return false + } + return true +} +func (this *TwoOneofs_Field3) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*TwoOneofs_Field3) + if !ok { + that2, ok := that.(TwoOneofs_Field3) + 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.Field3 != that1.Field3 { + return false + } + return true +} +func (this *TwoOneofs_Field34) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*TwoOneofs_Field34) + if !ok { + that2, ok := that.(TwoOneofs_Field34) + 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.Field34 != that1.Field34 { + return false + } + return true +} +func (this *TwoOneofs_Field35) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*TwoOneofs_Field35) + if !ok { + that2, ok := that.(TwoOneofs_Field35) + 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.Field35, that1.Field35) { + return false + } + return true +} +func (this *TwoOneofs_SubMessage2) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*TwoOneofs_SubMessage2) + if !ok { + that2, ok := that.(TwoOneofs_SubMessage2) + 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.SubMessage2.Equal(that1.SubMessage2) { + return false + } + return true +} +func (this *CustomOneof) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*CustomOneof) + if !ok { + that2, ok := that.(CustomOneof) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *CustomOneof") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *CustomOneof but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *CustomOneof but is not nil && this == nil") + } + if that1.Custom == nil { + if this.Custom != nil { + return fmt.Errorf("this.Custom != nil && that1.Custom == nil") + } + } else if this.Custom == nil { + return fmt.Errorf("this.Custom == nil && that1.Custom != nil") + } else if err := this.Custom.VerboseEqual(that1.Custom); err != nil { + return err + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *CustomOneof_Stringy) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*CustomOneof_Stringy) + if !ok { + that2, ok := that.(CustomOneof_Stringy) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *CustomOneof_Stringy") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *CustomOneof_Stringy but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *CustomOneof_Stringy but is not nil && this == nil") + } + if this.Stringy != that1.Stringy { + return fmt.Errorf("Stringy this(%v) Not Equal that(%v)", this.Stringy, that1.Stringy) + } + return nil +} +func (this *CustomOneof_CustomType) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*CustomOneof_CustomType) + if !ok { + that2, ok := that.(CustomOneof_CustomType) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *CustomOneof_CustomType") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *CustomOneof_CustomType but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *CustomOneof_CustomType but is not nil && this == nil") + } + if !this.CustomType.Equal(that1.CustomType) { + return fmt.Errorf("CustomType this(%v) Not Equal that(%v)", this.CustomType, that1.CustomType) + } + return nil +} +func (this *CustomOneof_CastType) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*CustomOneof_CastType) + if !ok { + that2, ok := that.(CustomOneof_CastType) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *CustomOneof_CastType") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *CustomOneof_CastType but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *CustomOneof_CastType but is not nil && this == nil") + } + if this.CastType != that1.CastType { + return fmt.Errorf("CastType this(%v) Not Equal that(%v)", this.CastType, that1.CastType) + } + return nil +} +func (this *CustomOneof_MyCustomName) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*CustomOneof_MyCustomName) + if !ok { + that2, ok := that.(CustomOneof_MyCustomName) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *CustomOneof_MyCustomName") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *CustomOneof_MyCustomName but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *CustomOneof_MyCustomName but is not nil && this == nil") + } + if this.MyCustomName != that1.MyCustomName { + return fmt.Errorf("MyCustomName this(%v) Not Equal that(%v)", this.MyCustomName, that1.MyCustomName) + } + return nil +} +func (this *CustomOneof) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*CustomOneof) + if !ok { + that2, ok := that.(CustomOneof) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + if this == nil { + return true + } + return false + } else if this == nil { + return false + } + if that1.Custom == nil { + if this.Custom != nil { + return false + } + } else if this.Custom == nil { + return false + } else if !this.Custom.Equal(that1.Custom) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *CustomOneof_Stringy) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*CustomOneof_Stringy) + if !ok { + that2, ok := that.(CustomOneof_Stringy) + 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.Stringy != that1.Stringy { + return false + } + return true +} +func (this *CustomOneof_CustomType) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*CustomOneof_CustomType) + if !ok { + that2, ok := that.(CustomOneof_CustomType) + 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.CustomType.Equal(that1.CustomType) { + return false + } + return true +} +func (this *CustomOneof_CastType) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*CustomOneof_CastType) + if !ok { + that2, ok := that.(CustomOneof_CastType) + 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.CastType != that1.CastType { + return false + } + return true +} +func (this *CustomOneof_MyCustomName) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*CustomOneof_MyCustomName) + if !ok { + that2, ok := that.(CustomOneof_MyCustomName) + 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.MyCustomName != that1.MyCustomName { + return false + } + return true +} +func (this *Subby) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&one.Subby{") + if this.Sub != nil { + s = append(s, "Sub: "+valueToGoStringOne(this.Sub, "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 *AllTypesOneOf) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 20) + s = append(s, "&one.AllTypesOneOf{") + if this.TestOneof != nil { + s = append(s, "TestOneof: "+fmt.Sprintf("%#v", this.TestOneof)+",\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 *AllTypesOneOf_Field1) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.AllTypesOneOf_Field1{` + + `Field1:` + fmt.Sprintf("%#v", this.Field1) + `}`}, ", ") + return s +} +func (this *AllTypesOneOf_Field2) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.AllTypesOneOf_Field2{` + + `Field2:` + fmt.Sprintf("%#v", this.Field2) + `}`}, ", ") + return s +} +func (this *AllTypesOneOf_Field3) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.AllTypesOneOf_Field3{` + + `Field3:` + fmt.Sprintf("%#v", this.Field3) + `}`}, ", ") + return s +} +func (this *AllTypesOneOf_Field4) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.AllTypesOneOf_Field4{` + + `Field4:` + fmt.Sprintf("%#v", this.Field4) + `}`}, ", ") + return s +} +func (this *AllTypesOneOf_Field5) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.AllTypesOneOf_Field5{` + + `Field5:` + fmt.Sprintf("%#v", this.Field5) + `}`}, ", ") + return s +} +func (this *AllTypesOneOf_Field6) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.AllTypesOneOf_Field6{` + + `Field6:` + fmt.Sprintf("%#v", this.Field6) + `}`}, ", ") + return s +} +func (this *AllTypesOneOf_Field7) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.AllTypesOneOf_Field7{` + + `Field7:` + fmt.Sprintf("%#v", this.Field7) + `}`}, ", ") + return s +} +func (this *AllTypesOneOf_Field8) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.AllTypesOneOf_Field8{` + + `Field8:` + fmt.Sprintf("%#v", this.Field8) + `}`}, ", ") + return s +} +func (this *AllTypesOneOf_Field9) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.AllTypesOneOf_Field9{` + + `Field9:` + fmt.Sprintf("%#v", this.Field9) + `}`}, ", ") + return s +} +func (this *AllTypesOneOf_Field10) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.AllTypesOneOf_Field10{` + + `Field10:` + fmt.Sprintf("%#v", this.Field10) + `}`}, ", ") + return s +} +func (this *AllTypesOneOf_Field11) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.AllTypesOneOf_Field11{` + + `Field11:` + fmt.Sprintf("%#v", this.Field11) + `}`}, ", ") + return s +} +func (this *AllTypesOneOf_Field12) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.AllTypesOneOf_Field12{` + + `Field12:` + fmt.Sprintf("%#v", this.Field12) + `}`}, ", ") + return s +} +func (this *AllTypesOneOf_Field13) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.AllTypesOneOf_Field13{` + + `Field13:` + fmt.Sprintf("%#v", this.Field13) + `}`}, ", ") + return s +} +func (this *AllTypesOneOf_Field14) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.AllTypesOneOf_Field14{` + + `Field14:` + fmt.Sprintf("%#v", this.Field14) + `}`}, ", ") + return s +} +func (this *AllTypesOneOf_Field15) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.AllTypesOneOf_Field15{` + + `Field15:` + fmt.Sprintf("%#v", this.Field15) + `}`}, ", ") + return s +} +func (this *AllTypesOneOf_SubMessage) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.AllTypesOneOf_SubMessage{` + + `SubMessage:` + fmt.Sprintf("%#v", this.SubMessage) + `}`}, ", ") + return s +} +func (this *TwoOneofs) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 10) + s = append(s, "&one.TwoOneofs{") + if this.One != nil { + s = append(s, "One: "+fmt.Sprintf("%#v", this.One)+",\n") + } + if this.Two != nil { + s = append(s, "Two: "+fmt.Sprintf("%#v", this.Two)+",\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 *TwoOneofs_Field1) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.TwoOneofs_Field1{` + + `Field1:` + fmt.Sprintf("%#v", this.Field1) + `}`}, ", ") + return s +} +func (this *TwoOneofs_Field2) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.TwoOneofs_Field2{` + + `Field2:` + fmt.Sprintf("%#v", this.Field2) + `}`}, ", ") + return s +} +func (this *TwoOneofs_Field3) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.TwoOneofs_Field3{` + + `Field3:` + fmt.Sprintf("%#v", this.Field3) + `}`}, ", ") + return s +} +func (this *TwoOneofs_Field34) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.TwoOneofs_Field34{` + + `Field34:` + fmt.Sprintf("%#v", this.Field34) + `}`}, ", ") + return s +} +func (this *TwoOneofs_Field35) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.TwoOneofs_Field35{` + + `Field35:` + fmt.Sprintf("%#v", this.Field35) + `}`}, ", ") + return s +} +func (this *TwoOneofs_SubMessage2) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.TwoOneofs_SubMessage2{` + + `SubMessage2:` + fmt.Sprintf("%#v", this.SubMessage2) + `}`}, ", ") + return s +} +func (this *CustomOneof) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 8) + s = append(s, "&one.CustomOneof{") + if this.Custom != nil { + s = append(s, "Custom: "+fmt.Sprintf("%#v", this.Custom)+",\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 *CustomOneof_Stringy) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.CustomOneof_Stringy{` + + `Stringy:` + fmt.Sprintf("%#v", this.Stringy) + `}`}, ", ") + return s +} +func (this *CustomOneof_CustomType) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.CustomOneof_CustomType{` + + `CustomType:` + fmt.Sprintf("%#v", this.CustomType) + `}`}, ", ") + return s +} +func (this *CustomOneof_CastType) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.CustomOneof_CastType{` + + `CastType:` + fmt.Sprintf("%#v", this.CastType) + `}`}, ", ") + return s +} +func (this *CustomOneof_MyCustomName) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.CustomOneof_MyCustomName{` + + `MyCustomName:` + fmt.Sprintf("%#v", this.MyCustomName) + `}`}, ", ") + return s +} +func valueToGoStringOne(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 extensionToGoStringOne(e map[int32]github_com_gogo_protobuf_proto.Extension) string { + if e == nil { + return "nil" + } + s := "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 +} +func NewPopulatedSubby(r randyOne, easy bool) *Subby { + this := &Subby{} + if r.Intn(10) != 0 { + v1 := randStringOne(r) + this.Sub = &v1 + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedOne(r, 2) + } + return this +} + +func NewPopulatedAllTypesOneOf(r randyOne, easy bool) *AllTypesOneOf { + this := &AllTypesOneOf{} + oneofNumber_TestOneof := []int32{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}[r.Intn(16)] + switch oneofNumber_TestOneof { + case 1: + this.TestOneof = NewPopulatedAllTypesOneOf_Field1(r, easy) + case 2: + this.TestOneof = NewPopulatedAllTypesOneOf_Field2(r, easy) + case 3: + this.TestOneof = NewPopulatedAllTypesOneOf_Field3(r, easy) + case 4: + this.TestOneof = NewPopulatedAllTypesOneOf_Field4(r, easy) + case 5: + this.TestOneof = NewPopulatedAllTypesOneOf_Field5(r, easy) + case 6: + this.TestOneof = NewPopulatedAllTypesOneOf_Field6(r, easy) + case 7: + this.TestOneof = NewPopulatedAllTypesOneOf_Field7(r, easy) + case 8: + this.TestOneof = NewPopulatedAllTypesOneOf_Field8(r, easy) + case 9: + this.TestOneof = NewPopulatedAllTypesOneOf_Field9(r, easy) + case 10: + this.TestOneof = NewPopulatedAllTypesOneOf_Field10(r, easy) + case 11: + this.TestOneof = NewPopulatedAllTypesOneOf_Field11(r, easy) + case 12: + this.TestOneof = NewPopulatedAllTypesOneOf_Field12(r, easy) + case 13: + this.TestOneof = NewPopulatedAllTypesOneOf_Field13(r, easy) + case 14: + this.TestOneof = NewPopulatedAllTypesOneOf_Field14(r, easy) + case 15: + this.TestOneof = NewPopulatedAllTypesOneOf_Field15(r, easy) + case 16: + this.TestOneof = NewPopulatedAllTypesOneOf_SubMessage(r, easy) + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedOne(r, 17) + } + return this +} + +func NewPopulatedAllTypesOneOf_Field1(r randyOne, easy bool) *AllTypesOneOf_Field1 { + this := &AllTypesOneOf_Field1{} + this.Field1 = float64(r.Float64()) + if r.Intn(2) == 0 { + this.Field1 *= -1 + } + return this +} +func NewPopulatedAllTypesOneOf_Field2(r randyOne, easy bool) *AllTypesOneOf_Field2 { + this := &AllTypesOneOf_Field2{} + this.Field2 = float32(r.Float32()) + if r.Intn(2) == 0 { + this.Field2 *= -1 + } + return this +} +func NewPopulatedAllTypesOneOf_Field3(r randyOne, easy bool) *AllTypesOneOf_Field3 { + this := &AllTypesOneOf_Field3{} + this.Field3 = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Field3 *= -1 + } + return this +} +func NewPopulatedAllTypesOneOf_Field4(r randyOne, easy bool) *AllTypesOneOf_Field4 { + this := &AllTypesOneOf_Field4{} + this.Field4 = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Field4 *= -1 + } + return this +} +func NewPopulatedAllTypesOneOf_Field5(r randyOne, easy bool) *AllTypesOneOf_Field5 { + this := &AllTypesOneOf_Field5{} + this.Field5 = uint32(r.Uint32()) + return this +} +func NewPopulatedAllTypesOneOf_Field6(r randyOne, easy bool) *AllTypesOneOf_Field6 { + this := &AllTypesOneOf_Field6{} + this.Field6 = uint64(uint64(r.Uint32())) + return this +} +func NewPopulatedAllTypesOneOf_Field7(r randyOne, easy bool) *AllTypesOneOf_Field7 { + this := &AllTypesOneOf_Field7{} + this.Field7 = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Field7 *= -1 + } + return this +} +func NewPopulatedAllTypesOneOf_Field8(r randyOne, easy bool) *AllTypesOneOf_Field8 { + this := &AllTypesOneOf_Field8{} + this.Field8 = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Field8 *= -1 + } + return this +} +func NewPopulatedAllTypesOneOf_Field9(r randyOne, easy bool) *AllTypesOneOf_Field9 { + this := &AllTypesOneOf_Field9{} + this.Field9 = uint32(r.Uint32()) + return this +} +func NewPopulatedAllTypesOneOf_Field10(r randyOne, easy bool) *AllTypesOneOf_Field10 { + this := &AllTypesOneOf_Field10{} + this.Field10 = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Field10 *= -1 + } + return this +} +func NewPopulatedAllTypesOneOf_Field11(r randyOne, easy bool) *AllTypesOneOf_Field11 { + this := &AllTypesOneOf_Field11{} + this.Field11 = uint64(uint64(r.Uint32())) + return this +} +func NewPopulatedAllTypesOneOf_Field12(r randyOne, easy bool) *AllTypesOneOf_Field12 { + this := &AllTypesOneOf_Field12{} + this.Field12 = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Field12 *= -1 + } + return this +} +func NewPopulatedAllTypesOneOf_Field13(r randyOne, easy bool) *AllTypesOneOf_Field13 { + this := &AllTypesOneOf_Field13{} + this.Field13 = bool(bool(r.Intn(2) == 0)) + return this +} +func NewPopulatedAllTypesOneOf_Field14(r randyOne, easy bool) *AllTypesOneOf_Field14 { + this := &AllTypesOneOf_Field14{} + this.Field14 = randStringOne(r) + return this +} +func NewPopulatedAllTypesOneOf_Field15(r randyOne, easy bool) *AllTypesOneOf_Field15 { + this := &AllTypesOneOf_Field15{} + v2 := r.Intn(100) + this.Field15 = make([]byte, v2) + for i := 0; i < v2; i++ { + this.Field15[i] = byte(r.Intn(256)) + } + return this +} +func NewPopulatedAllTypesOneOf_SubMessage(r randyOne, easy bool) *AllTypesOneOf_SubMessage { + this := &AllTypesOneOf_SubMessage{} + this.SubMessage = NewPopulatedSubby(r, easy) + return this +} +func NewPopulatedTwoOneofs(r randyOne, easy bool) *TwoOneofs { + this := &TwoOneofs{} + oneofNumber_One := []int32{1, 2, 3}[r.Intn(3)] + switch oneofNumber_One { + case 1: + this.One = NewPopulatedTwoOneofs_Field1(r, easy) + case 2: + this.One = NewPopulatedTwoOneofs_Field2(r, easy) + case 3: + this.One = NewPopulatedTwoOneofs_Field3(r, easy) + } + oneofNumber_Two := []int32{34, 35, 36}[r.Intn(3)] + switch oneofNumber_Two { + case 34: + this.Two = NewPopulatedTwoOneofs_Field34(r, easy) + case 35: + this.Two = NewPopulatedTwoOneofs_Field35(r, easy) + case 36: + this.Two = NewPopulatedTwoOneofs_SubMessage2(r, easy) + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedOne(r, 37) + } + return this +} + +func NewPopulatedTwoOneofs_Field1(r randyOne, easy bool) *TwoOneofs_Field1 { + this := &TwoOneofs_Field1{} + this.Field1 = float64(r.Float64()) + if r.Intn(2) == 0 { + this.Field1 *= -1 + } + return this +} +func NewPopulatedTwoOneofs_Field2(r randyOne, easy bool) *TwoOneofs_Field2 { + this := &TwoOneofs_Field2{} + this.Field2 = float32(r.Float32()) + if r.Intn(2) == 0 { + this.Field2 *= -1 + } + return this +} +func NewPopulatedTwoOneofs_Field3(r randyOne, easy bool) *TwoOneofs_Field3 { + this := &TwoOneofs_Field3{} + this.Field3 = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Field3 *= -1 + } + return this +} +func NewPopulatedTwoOneofs_Field34(r randyOne, easy bool) *TwoOneofs_Field34 { + this := &TwoOneofs_Field34{} + this.Field34 = randStringOne(r) + return this +} +func NewPopulatedTwoOneofs_Field35(r randyOne, easy bool) *TwoOneofs_Field35 { + this := &TwoOneofs_Field35{} + v3 := r.Intn(100) + this.Field35 = make([]byte, v3) + for i := 0; i < v3; i++ { + this.Field35[i] = byte(r.Intn(256)) + } + return this +} +func NewPopulatedTwoOneofs_SubMessage2(r randyOne, easy bool) *TwoOneofs_SubMessage2 { + this := &TwoOneofs_SubMessage2{} + this.SubMessage2 = NewPopulatedSubby(r, easy) + return this +} +func NewPopulatedCustomOneof(r randyOne, easy bool) *CustomOneof { + this := &CustomOneof{} + oneofNumber_Custom := []int32{34, 35, 36, 37}[r.Intn(4)] + switch oneofNumber_Custom { + case 34: + this.Custom = NewPopulatedCustomOneof_Stringy(r, easy) + case 35: + this.Custom = NewPopulatedCustomOneof_CustomType(r, easy) + case 36: + this.Custom = NewPopulatedCustomOneof_CastType(r, easy) + case 37: + this.Custom = NewPopulatedCustomOneof_MyCustomName(r, easy) + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedOne(r, 38) + } + return this +} + +func NewPopulatedCustomOneof_Stringy(r randyOne, easy bool) *CustomOneof_Stringy { + this := &CustomOneof_Stringy{} + this.Stringy = randStringOne(r) + return this +} +func NewPopulatedCustomOneof_CustomType(r randyOne, easy bool) *CustomOneof_CustomType { + this := &CustomOneof_CustomType{} + v4 := github_com_gogo_protobuf_test_custom.NewPopulatedUint128(r) + this.CustomType = *v4 + return this +} +func NewPopulatedCustomOneof_CastType(r randyOne, easy bool) *CustomOneof_CastType { + this := &CustomOneof_CastType{} + this.CastType = github_com_gogo_protobuf_test_casttype.MyUint64Type(uint64(r.Uint32())) + return this +} +func NewPopulatedCustomOneof_MyCustomName(r randyOne, easy bool) *CustomOneof_MyCustomName { + this := &CustomOneof_MyCustomName{} + this.MyCustomName = int64(r.Int63()) + if r.Intn(2) == 0 { + this.MyCustomName *= -1 + } + return this +} + +type randyOne interface { + Float32() float32 + Float64() float64 + Int63() int64 + Int31() int32 + Uint32() uint32 + Intn(n int) int +} + +func randUTF8RuneOne(r randyOne) 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 randStringOne(r randyOne) string { + v5 := r.Intn(100) + tmps := make([]rune, v5) + for i := 0; i < v5; i++ { + tmps[i] = randUTF8RuneOne(r) + } + return string(tmps) +} +func randUnrecognizedOne(r randyOne, 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 = randFieldOne(data, r, fieldNumber, wire) + } + return data +} +func randFieldOne(data []byte, r randyOne, fieldNumber int, wire int) []byte { + key := uint32(fieldNumber)<<3 | uint32(wire) + switch wire { + case 0: + data = encodeVarintPopulateOne(data, uint64(key)) + v6 := r.Int63() + if r.Intn(2) == 0 { + v6 *= -1 + } + data = encodeVarintPopulateOne(data, uint64(v6)) + case 1: + data = encodeVarintPopulateOne(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 = encodeVarintPopulateOne(data, uint64(key)) + ll := r.Intn(100) + data = encodeVarintPopulateOne(data, uint64(ll)) + for j := 0; j < ll; j++ { + data = append(data, byte(r.Intn(256))) + } + default: + data = encodeVarintPopulateOne(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 encodeVarintPopulateOne(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 *Subby) Size() (n int) { + var l int + _ = l + if m.Sub != nil { + l = len(*m.Sub) + n += 1 + l + sovOne(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *AllTypesOneOf) Size() (n int) { + var l int + _ = l + if m.TestOneof != nil { + n += m.TestOneof.Size() + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *AllTypesOneOf_Field1) Size() (n int) { + var l int + _ = l + n += 9 + return n +} +func (m *AllTypesOneOf_Field2) Size() (n int) { + var l int + _ = l + n += 5 + return n +} +func (m *AllTypesOneOf_Field3) Size() (n int) { + var l int + _ = l + n += 1 + sovOne(uint64(m.Field3)) + return n +} +func (m *AllTypesOneOf_Field4) Size() (n int) { + var l int + _ = l + n += 1 + sovOne(uint64(m.Field4)) + return n +} +func (m *AllTypesOneOf_Field5) Size() (n int) { + var l int + _ = l + n += 1 + sovOne(uint64(m.Field5)) + return n +} +func (m *AllTypesOneOf_Field6) Size() (n int) { + var l int + _ = l + n += 1 + sovOne(uint64(m.Field6)) + return n +} +func (m *AllTypesOneOf_Field7) Size() (n int) { + var l int + _ = l + n += 1 + sozOne(uint64(m.Field7)) + return n +} +func (m *AllTypesOneOf_Field8) Size() (n int) { + var l int + _ = l + n += 1 + sozOne(uint64(m.Field8)) + return n +} +func (m *AllTypesOneOf_Field9) Size() (n int) { + var l int + _ = l + n += 5 + return n +} +func (m *AllTypesOneOf_Field10) Size() (n int) { + var l int + _ = l + n += 5 + return n +} +func (m *AllTypesOneOf_Field11) Size() (n int) { + var l int + _ = l + n += 9 + return n +} +func (m *AllTypesOneOf_Field12) Size() (n int) { + var l int + _ = l + n += 9 + return n +} +func (m *AllTypesOneOf_Field13) Size() (n int) { + var l int + _ = l + n += 2 + return n +} +func (m *AllTypesOneOf_Field14) Size() (n int) { + var l int + _ = l + l = len(m.Field14) + n += 1 + l + sovOne(uint64(l)) + return n +} +func (m *AllTypesOneOf_Field15) Size() (n int) { + var l int + _ = l + if m.Field15 != nil { + l = len(m.Field15) + n += 1 + l + sovOne(uint64(l)) + } + return n +} +func (m *AllTypesOneOf_SubMessage) Size() (n int) { + var l int + _ = l + if m.SubMessage != nil { + l = m.SubMessage.Size() + n += 2 + l + sovOne(uint64(l)) + } + return n +} +func (m *TwoOneofs) Size() (n int) { + var l int + _ = l + if m.One != nil { + n += m.One.Size() + } + if m.Two != nil { + n += m.Two.Size() + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *TwoOneofs_Field1) Size() (n int) { + var l int + _ = l + n += 9 + return n +} +func (m *TwoOneofs_Field2) Size() (n int) { + var l int + _ = l + n += 5 + return n +} +func (m *TwoOneofs_Field3) Size() (n int) { + var l int + _ = l + n += 1 + sovOne(uint64(m.Field3)) + return n +} +func (m *TwoOneofs_Field34) Size() (n int) { + var l int + _ = l + l = len(m.Field34) + n += 2 + l + sovOne(uint64(l)) + return n +} +func (m *TwoOneofs_Field35) Size() (n int) { + var l int + _ = l + if m.Field35 != nil { + l = len(m.Field35) + n += 2 + l + sovOne(uint64(l)) + } + return n +} +func (m *TwoOneofs_SubMessage2) Size() (n int) { + var l int + _ = l + if m.SubMessage2 != nil { + l = m.SubMessage2.Size() + n += 2 + l + sovOne(uint64(l)) + } + return n +} +func (m *CustomOneof) Size() (n int) { + var l int + _ = l + if m.Custom != nil { + n += m.Custom.Size() + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *CustomOneof_Stringy) Size() (n int) { + var l int + _ = l + l = len(m.Stringy) + n += 2 + l + sovOne(uint64(l)) + return n +} +func (m *CustomOneof_CustomType) Size() (n int) { + var l int + _ = l + l = m.CustomType.Size() + n += 2 + l + sovOne(uint64(l)) + return n +} +func (m *CustomOneof_CastType) Size() (n int) { + var l int + _ = l + n += 2 + sovOne(uint64(m.CastType)) + return n +} +func (m *CustomOneof_MyCustomName) Size() (n int) { + var l int + _ = l + n += 2 + sovOne(uint64(m.MyCustomName)) + return n +} + +func sovOne(x uint64) (n int) { + for { + n++ + x >>= 7 + if x == 0 { + break + } + } + return n +} +func sozOne(x uint64) (n int) { + return sovOne(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (this *Subby) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&Subby{`, + `Sub:` + valueToStringOne(this.Sub) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *AllTypesOneOf) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&AllTypesOneOf{`, + `TestOneof:` + fmt.Sprintf("%v", this.TestOneof) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *AllTypesOneOf_Field1) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&AllTypesOneOf_Field1{`, + `Field1:` + fmt.Sprintf("%v", this.Field1) + `,`, + `}`, + }, "") + return s +} +func (this *AllTypesOneOf_Field2) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&AllTypesOneOf_Field2{`, + `Field2:` + fmt.Sprintf("%v", this.Field2) + `,`, + `}`, + }, "") + return s +} +func (this *AllTypesOneOf_Field3) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&AllTypesOneOf_Field3{`, + `Field3:` + fmt.Sprintf("%v", this.Field3) + `,`, + `}`, + }, "") + return s +} +func (this *AllTypesOneOf_Field4) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&AllTypesOneOf_Field4{`, + `Field4:` + fmt.Sprintf("%v", this.Field4) + `,`, + `}`, + }, "") + return s +} +func (this *AllTypesOneOf_Field5) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&AllTypesOneOf_Field5{`, + `Field5:` + fmt.Sprintf("%v", this.Field5) + `,`, + `}`, + }, "") + return s +} +func (this *AllTypesOneOf_Field6) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&AllTypesOneOf_Field6{`, + `Field6:` + fmt.Sprintf("%v", this.Field6) + `,`, + `}`, + }, "") + return s +} +func (this *AllTypesOneOf_Field7) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&AllTypesOneOf_Field7{`, + `Field7:` + fmt.Sprintf("%v", this.Field7) + `,`, + `}`, + }, "") + return s +} +func (this *AllTypesOneOf_Field8) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&AllTypesOneOf_Field8{`, + `Field8:` + fmt.Sprintf("%v", this.Field8) + `,`, + `}`, + }, "") + return s +} +func (this *AllTypesOneOf_Field9) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&AllTypesOneOf_Field9{`, + `Field9:` + fmt.Sprintf("%v", this.Field9) + `,`, + `}`, + }, "") + return s +} +func (this *AllTypesOneOf_Field10) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&AllTypesOneOf_Field10{`, + `Field10:` + fmt.Sprintf("%v", this.Field10) + `,`, + `}`, + }, "") + return s +} +func (this *AllTypesOneOf_Field11) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&AllTypesOneOf_Field11{`, + `Field11:` + fmt.Sprintf("%v", this.Field11) + `,`, + `}`, + }, "") + return s +} +func (this *AllTypesOneOf_Field12) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&AllTypesOneOf_Field12{`, + `Field12:` + fmt.Sprintf("%v", this.Field12) + `,`, + `}`, + }, "") + return s +} +func (this *AllTypesOneOf_Field13) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&AllTypesOneOf_Field13{`, + `Field13:` + fmt.Sprintf("%v", this.Field13) + `,`, + `}`, + }, "") + return s +} +func (this *AllTypesOneOf_Field14) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&AllTypesOneOf_Field14{`, + `Field14:` + fmt.Sprintf("%v", this.Field14) + `,`, + `}`, + }, "") + return s +} +func (this *AllTypesOneOf_Field15) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&AllTypesOneOf_Field15{`, + `Field15:` + fmt.Sprintf("%v", this.Field15) + `,`, + `}`, + }, "") + return s +} +func (this *AllTypesOneOf_SubMessage) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&AllTypesOneOf_SubMessage{`, + `SubMessage:` + strings.Replace(fmt.Sprintf("%v", this.SubMessage), "Subby", "Subby", 1) + `,`, + `}`, + }, "") + return s +} +func (this *TwoOneofs) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&TwoOneofs{`, + `One:` + fmt.Sprintf("%v", this.One) + `,`, + `Two:` + fmt.Sprintf("%v", this.Two) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *TwoOneofs_Field1) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&TwoOneofs_Field1{`, + `Field1:` + fmt.Sprintf("%v", this.Field1) + `,`, + `}`, + }, "") + return s +} +func (this *TwoOneofs_Field2) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&TwoOneofs_Field2{`, + `Field2:` + fmt.Sprintf("%v", this.Field2) + `,`, + `}`, + }, "") + return s +} +func (this *TwoOneofs_Field3) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&TwoOneofs_Field3{`, + `Field3:` + fmt.Sprintf("%v", this.Field3) + `,`, + `}`, + }, "") + return s +} +func (this *TwoOneofs_Field34) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&TwoOneofs_Field34{`, + `Field34:` + fmt.Sprintf("%v", this.Field34) + `,`, + `}`, + }, "") + return s +} +func (this *TwoOneofs_Field35) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&TwoOneofs_Field35{`, + `Field35:` + fmt.Sprintf("%v", this.Field35) + `,`, + `}`, + }, "") + return s +} +func (this *TwoOneofs_SubMessage2) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&TwoOneofs_SubMessage2{`, + `SubMessage2:` + strings.Replace(fmt.Sprintf("%v", this.SubMessage2), "Subby", "Subby", 1) + `,`, + `}`, + }, "") + return s +} +func (this *CustomOneof) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&CustomOneof{`, + `Custom:` + fmt.Sprintf("%v", this.Custom) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *CustomOneof_Stringy) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&CustomOneof_Stringy{`, + `Stringy:` + fmt.Sprintf("%v", this.Stringy) + `,`, + `}`, + }, "") + return s +} +func (this *CustomOneof_CustomType) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&CustomOneof_CustomType{`, + `CustomType:` + fmt.Sprintf("%v", this.CustomType) + `,`, + `}`, + }, "") + return s +} +func (this *CustomOneof_CastType) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&CustomOneof_CastType{`, + `CastType:` + fmt.Sprintf("%v", this.CastType) + `,`, + `}`, + }, "") + return s +} +func (this *CustomOneof_MyCustomName) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&CustomOneof_MyCustomName{`, + `MyCustomName:` + fmt.Sprintf("%v", this.MyCustomName) + `,`, + `}`, + }, "") + return s +} +func valueToStringOne(v interface{}) string { + rv := reflect.ValueOf(v) + if rv.IsNil() { + return "nil" + } + pv := reflect.Indirect(rv).Interface() + return fmt.Sprintf("*%v", pv) +} +func (m *Subby) 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 ErrIntOverflowOneUnsafe + } + 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: Subby: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Subby: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Sub", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOneUnsafe + } + 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 ErrInvalidLengthOneUnsafe + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + s := string(data[iNdEx:postIndex]) + m.Sub = &s + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipOneUnsafe(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthOneUnsafe + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *AllTypesOneOf) 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 ErrIntOverflowOneUnsafe + } + 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: AllTypesOneOf: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: AllTypesOneOf: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) + } + var v float64 + if iNdEx+8 > l { + return io.ErrUnexpectedEOF + } + v = *(*float64)(unsafe.Pointer(&data[iNdEx])) + iNdEx += 8 + m.TestOneof = &AllTypesOneOf_Field1{v} + case 2: + if wireType != 5 { + return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType) + } + var v float32 + if iNdEx+4 > l { + return io.ErrUnexpectedEOF + } + v = *(*float32)(unsafe.Pointer(&data[iNdEx])) + iNdEx += 4 + m.TestOneof = &AllTypesOneOf_Field2{v} + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field3", wireType) + } + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOneUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.TestOneof = &AllTypesOneOf_Field3{v} + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field4", wireType) + } + var v int64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOneUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.TestOneof = &AllTypesOneOf_Field4{v} + case 5: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field5", wireType) + } + var v uint32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOneUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (uint32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.TestOneof = &AllTypesOneOf_Field5{v} + case 6: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field6", wireType) + } + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOneUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.TestOneof = &AllTypesOneOf_Field6{v} + case 7: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field7", wireType) + } + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOneUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + v = int32((uint32(v) >> 1) ^ uint32(((v&1)<<31)>>31)) + m.TestOneof = &AllTypesOneOf_Field7{v} + case 8: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field8", wireType) + } + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOneUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + v = (v >> 1) ^ uint64((int64(v&1)<<63)>>63) + m.TestOneof = &AllTypesOneOf_Field8{int64(v)} + case 9: + if wireType != 5 { + return fmt.Errorf("proto: wrong wireType = %d for field Field9", wireType) + } + var v uint32 + if iNdEx+4 > l { + return io.ErrUnexpectedEOF + } + v = *(*uint32)(unsafe.Pointer(&data[iNdEx])) + iNdEx += 4 + m.TestOneof = &AllTypesOneOf_Field9{v} + case 10: + if wireType != 5 { + return fmt.Errorf("proto: wrong wireType = %d for field Field10", wireType) + } + var v int32 + if iNdEx+4 > l { + return io.ErrUnexpectedEOF + } + v = *(*int32)(unsafe.Pointer(&data[iNdEx])) + iNdEx += 4 + m.TestOneof = &AllTypesOneOf_Field10{v} + case 11: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field Field11", wireType) + } + var v uint64 + if iNdEx+8 > l { + return io.ErrUnexpectedEOF + } + v = *(*uint64)(unsafe.Pointer(&data[iNdEx])) + iNdEx += 8 + m.TestOneof = &AllTypesOneOf_Field11{v} + case 12: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field Field12", wireType) + } + var v int64 + if iNdEx+8 > l { + return io.ErrUnexpectedEOF + } + v = *(*int64)(unsafe.Pointer(&data[iNdEx])) + iNdEx += 8 + m.TestOneof = &AllTypesOneOf_Field12{v} + case 13: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field13", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOneUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + b := bool(v != 0) + m.TestOneof = &AllTypesOneOf_Field13{b} + case 14: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field14", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOneUnsafe + } + 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 ErrInvalidLengthOneUnsafe + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.TestOneof = &AllTypesOneOf_Field14{string(data[iNdEx:postIndex])} + iNdEx = postIndex + case 15: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field15", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOneUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthOneUnsafe + } + postIndex := iNdEx + byteLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + v := make([]byte, postIndex-iNdEx) + copy(v, data[iNdEx:postIndex]) + m.TestOneof = &AllTypesOneOf_Field15{v} + iNdEx = postIndex + case 16: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SubMessage", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOneUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthOneUnsafe + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + v := &Subby{} + if err := v.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + m.TestOneof = &AllTypesOneOf_SubMessage{v} + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipOneUnsafe(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthOneUnsafe + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *TwoOneofs) 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 ErrIntOverflowOneUnsafe + } + 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: TwoOneofs: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: TwoOneofs: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) + } + var v float64 + if iNdEx+8 > l { + return io.ErrUnexpectedEOF + } + v = *(*float64)(unsafe.Pointer(&data[iNdEx])) + iNdEx += 8 + m.One = &TwoOneofs_Field1{v} + case 2: + if wireType != 5 { + return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType) + } + var v float32 + if iNdEx+4 > l { + return io.ErrUnexpectedEOF + } + v = *(*float32)(unsafe.Pointer(&data[iNdEx])) + iNdEx += 4 + m.One = &TwoOneofs_Field2{v} + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field3", wireType) + } + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOneUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.One = &TwoOneofs_Field3{v} + case 34: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field34", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOneUnsafe + } + 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 ErrInvalidLengthOneUnsafe + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Two = &TwoOneofs_Field34{string(data[iNdEx:postIndex])} + iNdEx = postIndex + case 35: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field35", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOneUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthOneUnsafe + } + postIndex := iNdEx + byteLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + v := make([]byte, postIndex-iNdEx) + copy(v, data[iNdEx:postIndex]) + m.Two = &TwoOneofs_Field35{v} + iNdEx = postIndex + case 36: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SubMessage2", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOneUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthOneUnsafe + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + v := &Subby{} + if err := v.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + m.Two = &TwoOneofs_SubMessage2{v} + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipOneUnsafe(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthOneUnsafe + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *CustomOneof) 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 ErrIntOverflowOneUnsafe + } + 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: CustomOneof: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: CustomOneof: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 34: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Stringy", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOneUnsafe + } + 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 ErrInvalidLengthOneUnsafe + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Custom = &CustomOneof_Stringy{string(data[iNdEx:postIndex])} + iNdEx = postIndex + case 35: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field CustomType", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOneUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthOneUnsafe + } + postIndex := iNdEx + byteLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var vv github_com_gogo_protobuf_test_custom.Uint128 + v := &vv + if err := v.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + m.Custom = &CustomOneof_CustomType{*v} + iNdEx = postIndex + case 36: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field CastType", wireType) + } + var v github_com_gogo_protobuf_test_casttype.MyUint64Type + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOneUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (github_com_gogo_protobuf_test_casttype.MyUint64Type(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Custom = &CustomOneof_CastType{v} + case 37: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field MyCustomName", wireType) + } + var v int64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOneUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Custom = &CustomOneof_MyCustomName{v} + default: + iNdEx = preIndex + skippy, err := skipOneUnsafe(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthOneUnsafe + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipOneUnsafe(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, ErrIntOverflowOneUnsafe + } + 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, ErrIntOverflowOneUnsafe + } + 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, ErrIntOverflowOneUnsafe + } + 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, ErrInvalidLengthOneUnsafe + } + return iNdEx, nil + case 3: + for { + var innerWire uint64 + var start int = iNdEx + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowOneUnsafe + } + 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 := skipOneUnsafe(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 ( + ErrInvalidLengthOneUnsafe = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowOneUnsafe = fmt.Errorf("proto: integer overflow") +) + +var fileDescriptorOne = []byte{ + // 582 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xac, 0xd3, 0x3f, 0x6f, 0xd3, 0x40, + 0x14, 0x00, 0xf0, 0x3a, 0xff, 0x73, 0x49, 0x68, 0xf0, 0xf4, 0xe8, 0x90, 0x20, 0x03, 0x12, 0x03, + 0x8d, 0x13, 0xff, 0x49, 0xd2, 0x11, 0x17, 0x21, 0x96, 0x10, 0x29, 0x6d, 0xe7, 0xca, 0x0e, 0x4e, + 0x1a, 0x29, 0xf1, 0x55, 0x39, 0x5b, 0x55, 0xb6, 0x7e, 0x06, 0x3e, 0x05, 0x23, 0x23, 0x1f, 0xa1, + 0x63, 0x47, 0xc4, 0x10, 0xb5, 0x61, 0x61, 0xec, 0x58, 0x31, 0xf1, 0xee, 0x9c, 0xde, 0x21, 0x21, + 0xc4, 0xc2, 0xf0, 0x74, 0x77, 0xf9, 0xdd, 0xbd, 0xbc, 0xe7, 0xb3, 0x89, 0x31, 0xa6, 0x8b, 0x80, + 0x32, 0x33, 0x89, 0x98, 0x3f, 0x09, 0x93, 0x68, 0xe1, 0x2f, 0xd9, 0x99, 0x3f, 0x0f, 0x97, 0x26, + 0x8d, 0xc2, 0xd6, 0xf9, 0x92, 0xc6, 0x54, 0xcf, 0xe2, 0x74, 0x6f, 0x7f, 0x3a, 0x8b, 0xcf, 0x92, + 0xa0, 0x85, 0xfb, 0xcd, 0x29, 0x9d, 0x52, 0x53, 0x58, 0x90, 0x4c, 0xc4, 0x4a, 0x2c, 0xc4, 0x2c, + 0x3d, 0x63, 0x3c, 0x21, 0xf9, 0xa3, 0x24, 0x08, 0x56, 0x7a, 0x9d, 0x64, 0x59, 0x12, 0x80, 0xf6, + 0x54, 0x7b, 0x59, 0x1e, 0xf1, 0xa9, 0xb1, 0xce, 0x92, 0xda, 0xeb, 0xf9, 0xfc, 0x78, 0x75, 0x1e, + 0xb2, 0x61, 0x14, 0x0e, 0x27, 0x3a, 0x90, 0xc2, 0xdb, 0x59, 0x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 0x36, 0xb8, 0x0f, 0xe3, 0x06, 0xe7, 0x3f, 0x70, 0xbc, + 0xc3, 0xf1, 0x1e, 0xc7, 0xcb, 0xef, 0x0d, 0xed, 0x57, 0x00, 0x00, 0x00, 0xff, 0xff, 0x8b, 0x6e, + 0xc5, 0x53, 0x82, 0x04, 0x00, 0x00, +} diff --git a/vendor/github.com/gogo/protobuf/test/oneof/combos/unsafeunmarshaler/one.proto b/vendor/github.com/gogo/protobuf/test/oneof/combos/unsafeunmarshaler/one.proto new file mode 100644 index 000000000..cef2b7f2d --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/oneof/combos/unsafeunmarshaler/one.proto @@ -0,0 +1,101 @@ +// Copyright (c) 2013, Vastech SA (PTY) LTD. All rights reserved. +// http://github.com/gogo/protobuf/gogoproto +// +// 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 one; + +import "github.com/gogo/protobuf/gogoproto/gogo.proto"; + +option (gogoproto.goproto_stringer_all) = false; +option (gogoproto.goproto_enum_prefix_all) = false; +option (gogoproto.goproto_getters_all) = false; + +option (gogoproto.equal_all) = true; +option (gogoproto.verbose_equal_all) = true; +option (gogoproto.stringer_all) = true; +option (gogoproto.gostring_all) = true; +option (gogoproto.description_all) = true; + +option (gogoproto.testgen_all) = true; +option (gogoproto.populate_all) = true; +option (gogoproto.unmarshaler_all) = false; +option (gogoproto.marshaler_all) = false; +option (gogoproto.sizer_all) = true; + +option (gogoproto.goproto_enum_stringer_all) = false; +option (gogoproto.enum_stringer_all) = true; + +option (gogoproto.unsafe_marshaler_all) = false; +option (gogoproto.unsafe_unmarshaler_all) = true; + +message Subby { + optional string sub = 1; +} + +message AllTypesOneOf { + oneof test_oneof { + double Field1 = 1; + float Field2 = 2; + int32 Field3 = 3; + int64 Field4 = 4; + uint32 Field5 = 5; + uint64 Field6 = 6; + sint32 Field7 = 7; + sint64 Field8 = 8; + fixed32 Field9 = 9; + sfixed32 Field10 = 10; + fixed64 Field11 = 11; + sfixed64 Field12 = 12; + bool Field13 = 13; + string Field14 = 14; + bytes Field15 = 15; + Subby sub_message = 16; + } +} + +message TwoOneofs { + oneof one { + double Field1 = 1; + float Field2 = 2; + int32 Field3 = 3; + } + + oneof two { + string Field34 = 34; + bytes Field35 = 35; + Subby sub_message2 = 36; + } +} + +message CustomOneof { + oneof custom { + string Stringy = 34; + bytes CustomType = 35 [(gogoproto.customtype) = "github.com/gogo/protobuf/test/custom.Uint128"]; + uint64 CastType = 36 [(gogoproto.casttype) = "github.com/gogo/protobuf/test/casttype.MyUint64Type"]; + int64 CustomName = 37 [(gogoproto.customname) = "MyCustomName"]; + } +} diff --git a/vendor/github.com/gogo/protobuf/test/oneof/combos/unsafeunmarshaler/onepb_test.go b/vendor/github.com/gogo/protobuf/test/oneof/combos/unsafeunmarshaler/onepb_test.go new file mode 100644 index 000000000..9ea42ecfb --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/oneof/combos/unsafeunmarshaler/onepb_test.go @@ -0,0 +1,631 @@ +// Code generated by protoc-gen-gogo. +// source: combos/unsafeunmarshaler/one.proto +// DO NOT EDIT! + +/* +Package one is a generated protocol buffer package. + +It is generated from these files: + combos/unsafeunmarshaler/one.proto + +It has these top-level messages: + Subby + AllTypesOneOf + TwoOneofs + CustomOneof +*/ +package one + +import testing "testing" +import math_rand "math/rand" +import time "time" +import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" +import github_com_gogo_protobuf_jsonpb "github.com/gogo/protobuf/jsonpb" +import fmt "fmt" +import go_parser "go/parser" +import proto "github.com/gogo/protobuf/proto" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +func TestSubbyProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedSubby(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Subby{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestAllTypesOneOfProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAllTypesOneOf(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &AllTypesOneOf{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestTwoOneofsProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedTwoOneofs(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &TwoOneofs{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestCustomOneofProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomOneof(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &CustomOneof{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestSubbyJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedSubby(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Subby{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestAllTypesOneOfJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAllTypesOneOf(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &AllTypesOneOf{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestTwoOneofsJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedTwoOneofs(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &TwoOneofs{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestCustomOneofJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomOneof(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &CustomOneof{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestSubbyProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedSubby(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &Subby{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestSubbyProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedSubby(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &Subby{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestAllTypesOneOfProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAllTypesOneOf(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &AllTypesOneOf{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestAllTypesOneOfProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAllTypesOneOf(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &AllTypesOneOf{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestTwoOneofsProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedTwoOneofs(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &TwoOneofs{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestTwoOneofsProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedTwoOneofs(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &TwoOneofs{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestCustomOneofProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomOneof(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &CustomOneof{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestCustomOneofProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomOneof(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &CustomOneof{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestOneDescription(t *testing.T) { + OneDescription() +} +func TestSubbyVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedSubby(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &Subby{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestAllTypesOneOfVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAllTypesOneOf(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &AllTypesOneOf{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestTwoOneofsVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedTwoOneofs(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &TwoOneofs{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestCustomOneofVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomOneof(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &CustomOneof{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestSubbyGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedSubby(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestAllTypesOneOfGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAllTypesOneOf(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestTwoOneofsGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedTwoOneofs(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestCustomOneofGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomOneof(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestSubbySize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedSubby(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func TestAllTypesOneOfSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAllTypesOneOf(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func TestTwoOneofsSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedTwoOneofs(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func TestCustomOneofSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomOneof(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func TestSubbyStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedSubby(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestAllTypesOneOfStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAllTypesOneOf(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestTwoOneofsStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedTwoOneofs(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestCustomOneofStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomOneof(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} + +//These tests are generated by github.com/gogo/protobuf/plugin/testgen diff --git a/vendor/github.com/gogo/protobuf/test/oneof/doc.go b/vendor/github.com/gogo/protobuf/test/oneof/doc.go new file mode 100644 index 000000000..b9f2ff176 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/oneof/doc.go @@ -0,0 +1 @@ +package one diff --git a/vendor/github.com/gogo/protobuf/test/oneof/one.proto b/vendor/github.com/gogo/protobuf/test/oneof/one.proto new file mode 100644 index 000000000..0c88ac86a --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/oneof/one.proto @@ -0,0 +1,101 @@ +// Copyright (c) 2013, Vastech SA (PTY) LTD. All rights reserved. +// http://github.com/gogo/protobuf/gogoproto +// +// 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 one; + +import "github.com/gogo/protobuf/gogoproto/gogo.proto"; + +option (gogoproto.goproto_stringer_all) = false; +option (gogoproto.goproto_enum_prefix_all) = false; +option (gogoproto.goproto_getters_all) = false; + +option (gogoproto.equal_all) = true; +option (gogoproto.verbose_equal_all) = true; +option (gogoproto.stringer_all) = true; +option (gogoproto.gostring_all) = true; +option (gogoproto.description_all) = true; + +option (gogoproto.testgen_all) = true; +option (gogoproto.populate_all) = true; +option (gogoproto.unmarshaler_all) = false; +option (gogoproto.marshaler_all) = false; +option (gogoproto.sizer_all) = true; + +option (gogoproto.goproto_enum_stringer_all) = false; +option (gogoproto.enum_stringer_all) = true; + +option (gogoproto.unsafe_marshaler_all) = false; +option (gogoproto.unsafe_unmarshaler_all) = false; + +message Subby { + optional string sub = 1; +} + +message AllTypesOneOf { + oneof test_oneof { + double Field1 = 1; + float Field2 = 2; + int32 Field3 = 3; + int64 Field4 = 4; + uint32 Field5 = 5; + uint64 Field6 = 6; + sint32 Field7 = 7; + sint64 Field8 = 8; + fixed32 Field9 = 9; + sfixed32 Field10 = 10; + fixed64 Field11 = 11; + sfixed64 Field12 = 12; + bool Field13 = 13; + string Field14 = 14; + bytes Field15 = 15; + Subby sub_message = 16; + } +} + +message TwoOneofs { + oneof one { + double Field1 = 1; + float Field2 = 2; + int32 Field3 = 3; + } + + oneof two { + string Field34 = 34; + bytes Field35 = 35; + Subby sub_message2 = 36; + } +} + +message CustomOneof { + oneof custom { + string Stringy = 34; + bytes CustomType = 35 [(gogoproto.customtype) = "github.com/gogo/protobuf/test/custom.Uint128"]; + uint64 CastType = 36 [(gogoproto.casttype) = "github.com/gogo/protobuf/test/casttype.MyUint64Type"]; + int64 CustomName = 37 [(gogoproto.customname) = "MyCustomName"]; + } +} diff --git a/vendor/github.com/gogo/protobuf/test/oneof3/Makefile b/vendor/github.com/gogo/protobuf/test/oneof3/Makefile new file mode 100644 index 000000000..70da5300e --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/oneof3/Makefile @@ -0,0 +1,31 @@ +# Extensions for Protocol Buffers to create more go like structures. +# +# Copyright (c) 2013, Vastech SA (PTY) LTD. All rights reserved. +# http://github.com/gogo/protobuf/gogoproto +# +# 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-combo + protoc-gen-combo --version="3.0.0" --proto_path=../../../../../:../../protobuf/:. one.proto \ No newline at end of file diff --git a/vendor/github.com/gogo/protobuf/test/oneof3/combos/both/one.pb.go b/vendor/github.com/gogo/protobuf/test/oneof3/combos/both/one.pb.go new file mode 100644 index 000000000..c9f2d417a --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/oneof3/combos/both/one.pb.go @@ -0,0 +1,3410 @@ +// Code generated by protoc-gen-gogo. +// source: combos/both/one.proto +// DO NOT EDIT! + +/* + Package one is a generated protocol buffer package. + + It is generated from these files: + combos/both/one.proto + + It has these top-level messages: + Subby + SampleOneOf +*/ +package one + +import proto "github.com/gogo/protobuf/proto" +import fmt "fmt" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" + +import github_com_gogo_protobuf_protoc_gen_gogo_descriptor "github.com/gogo/protobuf/protoc-gen-gogo/descriptor" +import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" +import compress_gzip "compress/gzip" +import bytes "bytes" +import io_ioutil "io/ioutil" + +import strings "strings" +import sort "sort" +import strconv "strconv" +import reflect "reflect" + +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. +const _ = proto.GoGoProtoPackageIsVersion1 + +type Subby struct { + Sub string `protobuf:"bytes,1,opt,name=sub,proto3" json:"sub,omitempty"` +} + +func (m *Subby) Reset() { *m = Subby{} } +func (*Subby) ProtoMessage() {} +func (*Subby) Descriptor() ([]byte, []int) { return fileDescriptorOne, []int{0} } + +type SampleOneOf struct { + // Types that are valid to be assigned to TestOneof: + // *SampleOneOf_Field1 + // *SampleOneOf_Field2 + // *SampleOneOf_Field3 + // *SampleOneOf_Field4 + // *SampleOneOf_Field5 + // *SampleOneOf_Field6 + // *SampleOneOf_Field7 + // *SampleOneOf_Field8 + // *SampleOneOf_Field9 + // *SampleOneOf_Field10 + // *SampleOneOf_Field11 + // *SampleOneOf_Field12 + // *SampleOneOf_Field13 + // *SampleOneOf_Field14 + // *SampleOneOf_Field15 + // *SampleOneOf_SubMessage + TestOneof isSampleOneOf_TestOneof `protobuf_oneof:"test_oneof"` +} + +func (m *SampleOneOf) Reset() { *m = SampleOneOf{} } +func (*SampleOneOf) ProtoMessage() {} +func (*SampleOneOf) Descriptor() ([]byte, []int) { return fileDescriptorOne, []int{1} } + +type isSampleOneOf_TestOneof interface { + isSampleOneOf_TestOneof() + Equal(interface{}) bool + VerboseEqual(interface{}) error + MarshalTo([]byte) (int, error) + Size() int +} + +type SampleOneOf_Field1 struct { + Field1 float64 `protobuf:"fixed64,1,opt,name=Field1,json=field1,proto3,oneof"` +} +type SampleOneOf_Field2 struct { + Field2 float32 `protobuf:"fixed32,2,opt,name=Field2,json=field2,proto3,oneof"` +} +type SampleOneOf_Field3 struct { + Field3 int32 `protobuf:"varint,3,opt,name=Field3,json=field3,proto3,oneof"` +} +type SampleOneOf_Field4 struct { + Field4 int64 `protobuf:"varint,4,opt,name=Field4,json=field4,proto3,oneof"` +} +type SampleOneOf_Field5 struct { + Field5 uint32 `protobuf:"varint,5,opt,name=Field5,json=field5,proto3,oneof"` +} +type SampleOneOf_Field6 struct { + Field6 uint64 `protobuf:"varint,6,opt,name=Field6,json=field6,proto3,oneof"` +} +type SampleOneOf_Field7 struct { + Field7 int32 `protobuf:"zigzag32,7,opt,name=Field7,json=field7,proto3,oneof"` +} +type SampleOneOf_Field8 struct { + Field8 int64 `protobuf:"zigzag64,8,opt,name=Field8,json=field8,proto3,oneof"` +} +type SampleOneOf_Field9 struct { + Field9 uint32 `protobuf:"fixed32,9,opt,name=Field9,json=field9,proto3,oneof"` +} +type SampleOneOf_Field10 struct { + Field10 int32 `protobuf:"fixed32,10,opt,name=Field10,json=field10,proto3,oneof"` +} +type SampleOneOf_Field11 struct { + Field11 uint64 `protobuf:"fixed64,11,opt,name=Field11,json=field11,proto3,oneof"` +} +type SampleOneOf_Field12 struct { + Field12 int64 `protobuf:"fixed64,12,opt,name=Field12,json=field12,proto3,oneof"` +} +type SampleOneOf_Field13 struct { + Field13 bool `protobuf:"varint,13,opt,name=Field13,json=field13,proto3,oneof"` +} +type SampleOneOf_Field14 struct { + Field14 string `protobuf:"bytes,14,opt,name=Field14,json=field14,proto3,oneof"` +} +type SampleOneOf_Field15 struct { + Field15 []byte `protobuf:"bytes,15,opt,name=Field15,json=field15,proto3,oneof"` +} +type SampleOneOf_SubMessage struct { + SubMessage *Subby `protobuf:"bytes,16,opt,name=sub_message,json=subMessage,oneof"` +} + +func (*SampleOneOf_Field1) isSampleOneOf_TestOneof() {} +func (*SampleOneOf_Field2) isSampleOneOf_TestOneof() {} +func (*SampleOneOf_Field3) isSampleOneOf_TestOneof() {} +func (*SampleOneOf_Field4) isSampleOneOf_TestOneof() {} +func (*SampleOneOf_Field5) isSampleOneOf_TestOneof() {} +func (*SampleOneOf_Field6) isSampleOneOf_TestOneof() {} +func (*SampleOneOf_Field7) isSampleOneOf_TestOneof() {} +func (*SampleOneOf_Field8) isSampleOneOf_TestOneof() {} +func (*SampleOneOf_Field9) isSampleOneOf_TestOneof() {} +func (*SampleOneOf_Field10) isSampleOneOf_TestOneof() {} +func (*SampleOneOf_Field11) isSampleOneOf_TestOneof() {} +func (*SampleOneOf_Field12) isSampleOneOf_TestOneof() {} +func (*SampleOneOf_Field13) isSampleOneOf_TestOneof() {} +func (*SampleOneOf_Field14) isSampleOneOf_TestOneof() {} +func (*SampleOneOf_Field15) isSampleOneOf_TestOneof() {} +func (*SampleOneOf_SubMessage) isSampleOneOf_TestOneof() {} + +func (m *SampleOneOf) GetTestOneof() isSampleOneOf_TestOneof { + if m != nil { + return m.TestOneof + } + return nil +} + +func (m *SampleOneOf) GetField1() float64 { + if x, ok := m.GetTestOneof().(*SampleOneOf_Field1); ok { + return x.Field1 + } + return 0 +} + +func (m *SampleOneOf) GetField2() float32 { + if x, ok := m.GetTestOneof().(*SampleOneOf_Field2); ok { + return x.Field2 + } + return 0 +} + +func (m *SampleOneOf) GetField3() int32 { + if x, ok := m.GetTestOneof().(*SampleOneOf_Field3); ok { + return x.Field3 + } + return 0 +} + +func (m *SampleOneOf) GetField4() int64 { + if x, ok := m.GetTestOneof().(*SampleOneOf_Field4); ok { + return x.Field4 + } + return 0 +} + +func (m *SampleOneOf) GetField5() uint32 { + if x, ok := m.GetTestOneof().(*SampleOneOf_Field5); ok { + return x.Field5 + } + return 0 +} + +func (m *SampleOneOf) GetField6() uint64 { + if x, ok := m.GetTestOneof().(*SampleOneOf_Field6); ok { + return x.Field6 + } + return 0 +} + +func (m *SampleOneOf) GetField7() int32 { + if x, ok := m.GetTestOneof().(*SampleOneOf_Field7); ok { + return x.Field7 + } + return 0 +} + +func (m *SampleOneOf) GetField8() int64 { + if x, ok := m.GetTestOneof().(*SampleOneOf_Field8); ok { + return x.Field8 + } + return 0 +} + +func (m *SampleOneOf) GetField9() uint32 { + if x, ok := m.GetTestOneof().(*SampleOneOf_Field9); ok { + return x.Field9 + } + return 0 +} + +func (m *SampleOneOf) GetField10() int32 { + if x, ok := m.GetTestOneof().(*SampleOneOf_Field10); ok { + return x.Field10 + } + return 0 +} + +func (m *SampleOneOf) GetField11() uint64 { + if x, ok := m.GetTestOneof().(*SampleOneOf_Field11); ok { + return x.Field11 + } + return 0 +} + +func (m *SampleOneOf) GetField12() int64 { + if x, ok := m.GetTestOneof().(*SampleOneOf_Field12); ok { + return x.Field12 + } + return 0 +} + +func (m *SampleOneOf) GetField13() bool { + if x, ok := m.GetTestOneof().(*SampleOneOf_Field13); ok { + return x.Field13 + } + return false +} + +func (m *SampleOneOf) GetField14() string { + if x, ok := m.GetTestOneof().(*SampleOneOf_Field14); ok { + return x.Field14 + } + return "" +} + +func (m *SampleOneOf) GetField15() []byte { + if x, ok := m.GetTestOneof().(*SampleOneOf_Field15); ok { + return x.Field15 + } + return nil +} + +func (m *SampleOneOf) GetSubMessage() *Subby { + if x, ok := m.GetTestOneof().(*SampleOneOf_SubMessage); ok { + return x.SubMessage + } + return nil +} + +// XXX_OneofFuncs is for the internal use of the proto package. +func (*SampleOneOf) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{}) { + return _SampleOneOf_OneofMarshaler, _SampleOneOf_OneofUnmarshaler, _SampleOneOf_OneofSizer, []interface{}{ + (*SampleOneOf_Field1)(nil), + (*SampleOneOf_Field2)(nil), + (*SampleOneOf_Field3)(nil), + (*SampleOneOf_Field4)(nil), + (*SampleOneOf_Field5)(nil), + (*SampleOneOf_Field6)(nil), + (*SampleOneOf_Field7)(nil), + (*SampleOneOf_Field8)(nil), + (*SampleOneOf_Field9)(nil), + (*SampleOneOf_Field10)(nil), + (*SampleOneOf_Field11)(nil), + (*SampleOneOf_Field12)(nil), + (*SampleOneOf_Field13)(nil), + (*SampleOneOf_Field14)(nil), + (*SampleOneOf_Field15)(nil), + (*SampleOneOf_SubMessage)(nil), + } +} + +func _SampleOneOf_OneofMarshaler(msg proto.Message, b *proto.Buffer) error { + m := msg.(*SampleOneOf) + // test_oneof + switch x := m.TestOneof.(type) { + case *SampleOneOf_Field1: + _ = b.EncodeVarint(1<<3 | proto.WireFixed64) + _ = b.EncodeFixed64(math.Float64bits(x.Field1)) + case *SampleOneOf_Field2: + _ = b.EncodeVarint(2<<3 | proto.WireFixed32) + _ = b.EncodeFixed32(uint64(math.Float32bits(x.Field2))) + case *SampleOneOf_Field3: + _ = b.EncodeVarint(3<<3 | proto.WireVarint) + _ = b.EncodeVarint(uint64(x.Field3)) + case *SampleOneOf_Field4: + _ = b.EncodeVarint(4<<3 | proto.WireVarint) + _ = b.EncodeVarint(uint64(x.Field4)) + case *SampleOneOf_Field5: + _ = b.EncodeVarint(5<<3 | proto.WireVarint) + _ = b.EncodeVarint(uint64(x.Field5)) + case *SampleOneOf_Field6: + _ = b.EncodeVarint(6<<3 | proto.WireVarint) + _ = b.EncodeVarint(uint64(x.Field6)) + case *SampleOneOf_Field7: + _ = b.EncodeVarint(7<<3 | proto.WireVarint) + _ = b.EncodeZigzag32(uint64(x.Field7)) + case *SampleOneOf_Field8: + _ = b.EncodeVarint(8<<3 | proto.WireVarint) + _ = b.EncodeZigzag64(uint64(x.Field8)) + case *SampleOneOf_Field9: + _ = b.EncodeVarint(9<<3 | proto.WireFixed32) + _ = b.EncodeFixed32(uint64(x.Field9)) + case *SampleOneOf_Field10: + _ = b.EncodeVarint(10<<3 | proto.WireFixed32) + _ = b.EncodeFixed32(uint64(x.Field10)) + case *SampleOneOf_Field11: + _ = b.EncodeVarint(11<<3 | proto.WireFixed64) + _ = b.EncodeFixed64(uint64(x.Field11)) + case *SampleOneOf_Field12: + _ = b.EncodeVarint(12<<3 | proto.WireFixed64) + _ = b.EncodeFixed64(uint64(x.Field12)) + case *SampleOneOf_Field13: + t := uint64(0) + if x.Field13 { + t = 1 + } + _ = b.EncodeVarint(13<<3 | proto.WireVarint) + _ = b.EncodeVarint(t) + case *SampleOneOf_Field14: + _ = b.EncodeVarint(14<<3 | proto.WireBytes) + _ = b.EncodeStringBytes(x.Field14) + case *SampleOneOf_Field15: + _ = b.EncodeVarint(15<<3 | proto.WireBytes) + _ = b.EncodeRawBytes(x.Field15) + case *SampleOneOf_SubMessage: + _ = b.EncodeVarint(16<<3 | proto.WireBytes) + if err := b.EncodeMessage(x.SubMessage); err != nil { + return err + } + case nil: + default: + return fmt.Errorf("SampleOneOf.TestOneof has unexpected type %T", x) + } + return nil +} + +func _SampleOneOf_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) { + m := msg.(*SampleOneOf) + switch tag { + case 1: // test_oneof.Field1 + if wire != proto.WireFixed64 { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeFixed64() + m.TestOneof = &SampleOneOf_Field1{math.Float64frombits(x)} + return true, err + case 2: // test_oneof.Field2 + if wire != proto.WireFixed32 { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeFixed32() + m.TestOneof = &SampleOneOf_Field2{math.Float32frombits(uint32(x))} + return true, err + case 3: // test_oneof.Field3 + if wire != proto.WireVarint { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeVarint() + m.TestOneof = &SampleOneOf_Field3{int32(x)} + return true, err + case 4: // test_oneof.Field4 + if wire != proto.WireVarint { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeVarint() + m.TestOneof = &SampleOneOf_Field4{int64(x)} + return true, err + case 5: // test_oneof.Field5 + if wire != proto.WireVarint { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeVarint() + m.TestOneof = &SampleOneOf_Field5{uint32(x)} + return true, err + case 6: // test_oneof.Field6 + if wire != proto.WireVarint { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeVarint() + m.TestOneof = &SampleOneOf_Field6{x} + return true, err + case 7: // test_oneof.Field7 + if wire != proto.WireVarint { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeZigzag32() + m.TestOneof = &SampleOneOf_Field7{int32(x)} + return true, err + case 8: // test_oneof.Field8 + if wire != proto.WireVarint { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeZigzag64() + m.TestOneof = &SampleOneOf_Field8{int64(x)} + return true, err + case 9: // test_oneof.Field9 + if wire != proto.WireFixed32 { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeFixed32() + m.TestOneof = &SampleOneOf_Field9{uint32(x)} + return true, err + case 10: // test_oneof.Field10 + if wire != proto.WireFixed32 { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeFixed32() + m.TestOneof = &SampleOneOf_Field10{int32(x)} + return true, err + case 11: // test_oneof.Field11 + if wire != proto.WireFixed64 { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeFixed64() + m.TestOneof = &SampleOneOf_Field11{x} + return true, err + case 12: // test_oneof.Field12 + if wire != proto.WireFixed64 { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeFixed64() + m.TestOneof = &SampleOneOf_Field12{int64(x)} + return true, err + case 13: // test_oneof.Field13 + if wire != proto.WireVarint { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeVarint() + m.TestOneof = &SampleOneOf_Field13{x != 0} + return true, err + case 14: // test_oneof.Field14 + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeStringBytes() + m.TestOneof = &SampleOneOf_Field14{x} + return true, err + case 15: // test_oneof.Field15 + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeRawBytes(true) + m.TestOneof = &SampleOneOf_Field15{x} + return true, err + case 16: // test_oneof.sub_message + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + msg := new(Subby) + err := b.DecodeMessage(msg) + m.TestOneof = &SampleOneOf_SubMessage{msg} + return true, err + default: + return false, nil + } +} + +func _SampleOneOf_OneofSizer(msg proto.Message) (n int) { + m := msg.(*SampleOneOf) + // test_oneof + switch x := m.TestOneof.(type) { + case *SampleOneOf_Field1: + n += proto.SizeVarint(1<<3 | proto.WireFixed64) + n += 8 + case *SampleOneOf_Field2: + n += proto.SizeVarint(2<<3 | proto.WireFixed32) + n += 4 + case *SampleOneOf_Field3: + n += proto.SizeVarint(3<<3 | proto.WireVarint) + n += proto.SizeVarint(uint64(x.Field3)) + case *SampleOneOf_Field4: + n += proto.SizeVarint(4<<3 | proto.WireVarint) + n += proto.SizeVarint(uint64(x.Field4)) + case *SampleOneOf_Field5: + n += proto.SizeVarint(5<<3 | proto.WireVarint) + n += proto.SizeVarint(uint64(x.Field5)) + case *SampleOneOf_Field6: + n += proto.SizeVarint(6<<3 | proto.WireVarint) + n += proto.SizeVarint(uint64(x.Field6)) + case *SampleOneOf_Field7: + n += proto.SizeVarint(7<<3 | proto.WireVarint) + n += proto.SizeVarint(uint64((uint32(x.Field7) << 1) ^ uint32((int32(x.Field7) >> 31)))) + case *SampleOneOf_Field8: + n += proto.SizeVarint(8<<3 | proto.WireVarint) + n += proto.SizeVarint(uint64(uint64(x.Field8<<1) ^ uint64((int64(x.Field8) >> 63)))) + case *SampleOneOf_Field9: + n += proto.SizeVarint(9<<3 | proto.WireFixed32) + n += 4 + case *SampleOneOf_Field10: + n += proto.SizeVarint(10<<3 | proto.WireFixed32) + n += 4 + case *SampleOneOf_Field11: + n += proto.SizeVarint(11<<3 | proto.WireFixed64) + n += 8 + case *SampleOneOf_Field12: + n += proto.SizeVarint(12<<3 | proto.WireFixed64) + n += 8 + case *SampleOneOf_Field13: + n += proto.SizeVarint(13<<3 | proto.WireVarint) + n += 1 + case *SampleOneOf_Field14: + n += proto.SizeVarint(14<<3 | proto.WireBytes) + n += proto.SizeVarint(uint64(len(x.Field14))) + n += len(x.Field14) + case *SampleOneOf_Field15: + n += proto.SizeVarint(15<<3 | proto.WireBytes) + n += proto.SizeVarint(uint64(len(x.Field15))) + n += len(x.Field15) + case *SampleOneOf_SubMessage: + s := proto.Size(x.SubMessage) + n += proto.SizeVarint(16<<3 | proto.WireBytes) + n += proto.SizeVarint(uint64(s)) + n += s + case nil: + default: + panic(fmt.Sprintf("proto: unexpected type %T in oneof", x)) + } + return n +} + +func init() { + proto.RegisterType((*Subby)(nil), "one.Subby") + proto.RegisterType((*SampleOneOf)(nil), "one.SampleOneOf") +} +func (this *Subby) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return OneDescription() +} +func (this *SampleOneOf) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return OneDescription() +} +func OneDescription() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + d := &github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet{} + var gzipped = []byte{ + // 3543 bytes of a gzipped FileDescriptorSet + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xcc, 0x5a, 0x59, 0x6c, 0x1b, 0xe7, + 0xb5, 0x36, 0xc5, 0x45, 0xe4, 0xa1, 0x44, 0x51, 0x23, 0xd9, 0xa6, 0x95, 0xc4, 0x8e, 0x95, 0xcd, + 0x71, 0x6e, 0x24, 0x5b, 0xde, 0x99, 0x7b, 0x13, 0x68, 0xa1, 0x15, 0x19, 0xda, 0xee, 0x50, 0x4a, + 0x9c, 0xdc, 0x87, 0xc1, 0x90, 0xfc, 0x45, 0xd1, 0x1e, 0xce, 0xf0, 0x72, 0x86, 0x8e, 0x95, 0xa7, + 0x5c, 0xe4, 0xde, 0x5b, 0x04, 0x45, 0xd7, 0x14, 0x68, 0xf6, 0x36, 0x01, 0xda, 0xa4, 0xe9, 0x96, + 0x74, 0x43, 0xd1, 0xa7, 0x02, 0x45, 0xda, 0x3c, 0x15, 0x69, 0x9f, 0xfa, 0xd0, 0x87, 0x24, 0x0d, + 0xd0, 0xb4, 0x4d, 0xdb, 0x14, 0x30, 0xd0, 0x00, 0x79, 0xe9, 0xf9, 0xb7, 0x59, 0x48, 0x4a, 0x43, + 0x05, 0x48, 0x53, 0x01, 0x84, 0x38, 0xe7, 0x9c, 0xef, 0x9b, 0x7f, 0xce, 0x7f, 0xfe, 0x73, 0xce, + 0xff, 0x0f, 0xe1, 0x67, 0xc7, 0xe1, 0xc6, 0xaa, 0x65, 0x55, 0x0d, 0x32, 0xd9, 0x68, 0x5a, 0x8e, + 0x55, 0x6a, 0x6d, 0x4c, 0x56, 0x88, 0x5d, 0x6e, 0xd6, 0x1a, 0x8e, 0xd5, 0x9c, 0x60, 0x32, 0x65, + 0x88, 0x5b, 0x4c, 0x48, 0x8b, 0xf1, 0x25, 0x18, 0x3e, 0x5f, 0x33, 0xc8, 0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b, 0x86, 0x72, 0xce, 0x0b, 0xb5, + 0xfe, 0x6d, 0x22, 0x65, 0x89, 0x2f, 0xb2, 0x8e, 0x68, 0x5b, 0x87, 0x4c, 0x93, 0xd0, 0xb8, 0x47, + 0x17, 0xf3, 0x27, 0x4b, 0xb1, 0x41, 0x4c, 0x84, 0x3e, 0x99, 0x2a, 0x60, 0xfc, 0xc1, 0x06, 0x9b, + 0xfe, 0x4b, 0xe5, 0x26, 0x70, 0x05, 0x1a, 0x0b, 0x2b, 0x60, 0x59, 0x68, 0x40, 0x0a, 0x97, 0x51, + 0x36, 0x76, 0x16, 0x32, 0x41, 0xf7, 0x28, 0xa3, 0x10, 0xb7, 0x1d, 0xbd, 0xe9, 0xb0, 0x28, 0x8c, + 0xab, 0xfc, 0x42, 0xc9, 0x42, 0x14, 0x93, 0x0c, 0xcb, 0x72, 0x71, 0x95, 0x7e, 0x1d, 0x3b, 0x03, + 0x83, 0x81, 0xdb, 0xf7, 0x0a, 0x1c, 0x7f, 0x22, 0x01, 0xa3, 0xdd, 0x62, 0xae, 0x6b, 0xf8, 0xe3, + 0xf2, 0xc1, 0x08, 0x28, 0x91, 0x26, 0xc6, 0x1d, 0x65, 0x10, 0x57, 0x18, 0x51, 0x71, 0x43, 0x2f, + 0x11, 0x03, 0xa3, 0x29, 0x72, 0x24, 0x33, 0x75, 0x47, 0x4f, 0x51, 0x3d, 0xb1, 0x48, 0x21, 0x2a, + 0x47, 0x2a, 0x77, 0x43, 0x4c, 0xa4, 0x38, 0xca, 0x70, 0xb4, 0x37, 0x06, 0x1a, 0x8b, 0x2a, 0xc3, + 0x29, 0xd7, 0x41, 0x8a, 0xfe, 0xe7, 0xbe, 0x4d, 0xb0, 0x31, 0x27, 0xa9, 0x80, 0xfa, 0x55, 0x19, + 0x83, 0x24, 0x0b, 0xb3, 0x0a, 0x91, 0xa5, 0xc1, 0xbd, 0xa6, 0x13, 0x53, 0x21, 0x1b, 0x7a, 0xcb, + 0x70, 0xb4, 0x2b, 0xba, 0xd1, 0x22, 0x2c, 0x60, 0x70, 0x62, 0x84, 0xf0, 0x3e, 0x2a, 0x53, 0x0e, + 0x41, 0x9a, 0x47, 0x65, 0x0d, 0x31, 0x57, 0x59, 0xf6, 0x89, 0xab, 0x3c, 0x50, 0x17, 0xa8, 0x84, + 0xde, 0xfe, 0x92, 0x8d, 0x6b, 0x41, 0x4c, 0x2d, 0xbb, 0x05, 0x15, 0xb0, 0xdb, 0x9f, 0x69, 0x4f, + 0x7c, 0x37, 0x74, 0x7f, 0xbc, 0xf6, 0x58, 0x1c, 0xff, 0x51, 0x1f, 0xc4, 0xd8, 0x7a, 0x1b, 0x82, + 0xf4, 0xda, 0x03, 0xab, 0x05, 0x6d, 0x6e, 0x65, 0x7d, 0x66, 0xb1, 0x90, 0x8d, 0x28, 0x19, 0x00, + 0x26, 0x38, 0xbf, 0xb8, 0x32, 0xbd, 0x96, 0xed, 0x73, 0xaf, 0x17, 0x96, 0xd7, 0x4e, 0x9f, 0xcc, + 0x46, 0x5d, 0xc0, 0x3a, 0x17, 0xc4, 0xfc, 0x06, 0x27, 0xa6, 0xb2, 0x71, 0x8c, 0x84, 0x01, 0x4e, + 0xb0, 0x70, 0xb1, 0x30, 0x87, 0x16, 0x89, 0xa0, 0x04, 0x6d, 0xfa, 0x95, 0x41, 0x48, 0x31, 0xc9, + 0xcc, 0xca, 0xca, 0x62, 0x36, 0xe9, 0x72, 0x16, 0xd7, 0xd4, 0x85, 0xe5, 0xf9, 0x6c, 0xca, 0xe5, + 0x9c, 0x57, 0x57, 0xd6, 0x57, 0xb3, 0xe0, 0x32, 0x2c, 0x15, 0x8a, 0xc5, 0xe9, 0xf9, 0x42, 0x36, + 0xed, 0x5a, 0xcc, 0x3c, 0xb0, 0x56, 0x28, 0x66, 0x07, 0x02, 0xc3, 0xc2, 0x5b, 0x0c, 0xba, 0xb7, + 0x28, 0x2c, 0xaf, 0x2f, 0x65, 0x33, 0xca, 0x30, 0x0c, 0xf2, 0x5b,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x6c, 0xc7, 0xaa, 0xb1, 0x5f, 0x62, 0xcd, 0xcc, 0xbd, 0xfe, 0xd6, 0xc1, + 0x3d, 0x6f, 0xe0, 0xe7, 0x37, 0xf8, 0x79, 0xf3, 0xad, 0x83, 0x91, 0xf7, 0xf1, 0xf3, 0x01, 0x7e, + 0x1e, 0x79, 0xfb, 0x60, 0xe4, 0x25, 0xfc, 0xbc, 0x82, 0x9f, 0x1f, 0xe3, 0xe7, 0x75, 0xfc, 0xbc, + 0x81, 0x9f, 0x37, 0xf1, 0xf3, 0xee, 0xdb, 0x07, 0xf7, 0xbc, 0x8f, 0xff, 0x3f, 0xc0, 0xff, 0x8f, + 0xfc, 0xee, 0xe0, 0x9e, 0x52, 0x82, 0x85, 0xd1, 0x89, 0x7f, 0x04, 0x00, 0x00, 0xff, 0xff, 0x12, + 0xc1, 0x5e, 0x75, 0x00, 0x2d, 0x00, 0x00, + } + r := bytes.NewReader(gzipped) + gzipr, err := compress_gzip.NewReader(r) + if err != nil { + panic(err) + } + ungzipped, err := io_ioutil.ReadAll(gzipr) + if err != nil { + panic(err) + } + if err := github_com_gogo_protobuf_proto.Unmarshal(ungzipped, d); err != nil { + panic(err) + } + return d +} +func (this *Subby) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*Subby) + if !ok { + that2, ok := that.(Subby) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *Subby") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *Subby but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *Subby but is not nil && this == nil") + } + if this.Sub != that1.Sub { + return fmt.Errorf("Sub this(%v) Not Equal that(%v)", this.Sub, that1.Sub) + } + return nil +} +func (this *Subby) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*Subby) + if !ok { + that2, ok := that.(Subby) + 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.Sub != that1.Sub { + return false + } + return true +} +func (this *SampleOneOf) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*SampleOneOf) + if !ok { + that2, ok := that.(SampleOneOf) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *SampleOneOf") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *SampleOneOf but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *SampleOneOf but is not nil && this == nil") + } + if that1.TestOneof == nil { + if this.TestOneof != nil { + return fmt.Errorf("this.TestOneof != nil && that1.TestOneof == nil") + } + } else if this.TestOneof == nil { + return fmt.Errorf("this.TestOneof == nil && that1.TestOneof != nil") + } else if err := this.TestOneof.VerboseEqual(that1.TestOneof); err != nil { + return err + } + return nil +} +func (this *SampleOneOf_Field1) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*SampleOneOf_Field1) + if !ok { + that2, ok := that.(SampleOneOf_Field1) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *SampleOneOf_Field1") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *SampleOneOf_Field1 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *SampleOneOf_Field1 but is not nil && this == nil") + } + if this.Field1 != that1.Field1 { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) + } + return nil +} +func (this *SampleOneOf_Field2) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*SampleOneOf_Field2) + if !ok { + that2, ok := that.(SampleOneOf_Field2) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *SampleOneOf_Field2") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *SampleOneOf_Field2 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *SampleOneOf_Field2 but is not nil && this == nil") + } + if this.Field2 != that1.Field2 { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) + } + return nil +} +func (this *SampleOneOf_Field3) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*SampleOneOf_Field3) + if !ok { + that2, ok := that.(SampleOneOf_Field3) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *SampleOneOf_Field3") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *SampleOneOf_Field3 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *SampleOneOf_Field3 but is not nil && this == nil") + } + if this.Field3 != that1.Field3 { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", this.Field3, that1.Field3) + } + return nil +} +func (this *SampleOneOf_Field4) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*SampleOneOf_Field4) + if !ok { + that2, ok := that.(SampleOneOf_Field4) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *SampleOneOf_Field4") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *SampleOneOf_Field4 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *SampleOneOf_Field4 but is not nil && this == nil") + } + if this.Field4 != that1.Field4 { + return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", this.Field4, that1.Field4) + } + return nil +} +func (this *SampleOneOf_Field5) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*SampleOneOf_Field5) + if !ok { + that2, ok := that.(SampleOneOf_Field5) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *SampleOneOf_Field5") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *SampleOneOf_Field5 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *SampleOneOf_Field5 but is not nil && this == nil") + } + if this.Field5 != that1.Field5 { + return fmt.Errorf("Field5 this(%v) Not Equal that(%v)", this.Field5, that1.Field5) + } + return nil +} +func (this *SampleOneOf_Field6) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*SampleOneOf_Field6) + if !ok { + that2, ok := that.(SampleOneOf_Field6) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *SampleOneOf_Field6") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *SampleOneOf_Field6 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *SampleOneOf_Field6 but is not nil && this == nil") + } + if this.Field6 != that1.Field6 { + return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", this.Field6, that1.Field6) + } + return nil +} +func (this *SampleOneOf_Field7) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*SampleOneOf_Field7) + if !ok { + that2, ok := that.(SampleOneOf_Field7) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *SampleOneOf_Field7") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *SampleOneOf_Field7 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *SampleOneOf_Field7 but is not nil && this == nil") + } + if this.Field7 != that1.Field7 { + return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", this.Field7, that1.Field7) + } + return nil +} +func (this *SampleOneOf_Field8) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*SampleOneOf_Field8) + if !ok { + that2, ok := that.(SampleOneOf_Field8) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *SampleOneOf_Field8") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *SampleOneOf_Field8 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *SampleOneOf_Field8 but is not nil && this == nil") + } + if this.Field8 != that1.Field8 { + return fmt.Errorf("Field8 this(%v) Not Equal that(%v)", this.Field8, that1.Field8) + } + return nil +} +func (this *SampleOneOf_Field9) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*SampleOneOf_Field9) + if !ok { + that2, ok := that.(SampleOneOf_Field9) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *SampleOneOf_Field9") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *SampleOneOf_Field9 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *SampleOneOf_Field9 but is not nil && this == nil") + } + if this.Field9 != that1.Field9 { + return fmt.Errorf("Field9 this(%v) Not Equal that(%v)", this.Field9, that1.Field9) + } + return nil +} +func (this *SampleOneOf_Field10) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*SampleOneOf_Field10) + if !ok { + that2, ok := that.(SampleOneOf_Field10) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *SampleOneOf_Field10") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *SampleOneOf_Field10 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *SampleOneOf_Field10 but is not nil && this == nil") + } + if this.Field10 != that1.Field10 { + return fmt.Errorf("Field10 this(%v) Not Equal that(%v)", this.Field10, that1.Field10) + } + return nil +} +func (this *SampleOneOf_Field11) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*SampleOneOf_Field11) + if !ok { + that2, ok := that.(SampleOneOf_Field11) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *SampleOneOf_Field11") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *SampleOneOf_Field11 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *SampleOneOf_Field11 but is not nil && this == nil") + } + if this.Field11 != that1.Field11 { + return fmt.Errorf("Field11 this(%v) Not Equal that(%v)", this.Field11, that1.Field11) + } + return nil +} +func (this *SampleOneOf_Field12) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*SampleOneOf_Field12) + if !ok { + that2, ok := that.(SampleOneOf_Field12) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *SampleOneOf_Field12") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *SampleOneOf_Field12 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *SampleOneOf_Field12 but is not nil && this == nil") + } + if this.Field12 != that1.Field12 { + return fmt.Errorf("Field12 this(%v) Not Equal that(%v)", this.Field12, that1.Field12) + } + return nil +} +func (this *SampleOneOf_Field13) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*SampleOneOf_Field13) + if !ok { + that2, ok := that.(SampleOneOf_Field13) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *SampleOneOf_Field13") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *SampleOneOf_Field13 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *SampleOneOf_Field13 but is not nil && this == nil") + } + if this.Field13 != that1.Field13 { + return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", this.Field13, that1.Field13) + } + return nil +} +func (this *SampleOneOf_Field14) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*SampleOneOf_Field14) + if !ok { + that2, ok := that.(SampleOneOf_Field14) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *SampleOneOf_Field14") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *SampleOneOf_Field14 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *SampleOneOf_Field14 but is not nil && this == nil") + } + if this.Field14 != that1.Field14 { + return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", this.Field14, that1.Field14) + } + return nil +} +func (this *SampleOneOf_Field15) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*SampleOneOf_Field15) + if !ok { + that2, ok := that.(SampleOneOf_Field15) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *SampleOneOf_Field15") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *SampleOneOf_Field15 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *SampleOneOf_Field15 but is not nil && this == nil") + } + if !bytes.Equal(this.Field15, that1.Field15) { + return fmt.Errorf("Field15 this(%v) Not Equal that(%v)", this.Field15, that1.Field15) + } + return nil +} +func (this *SampleOneOf_SubMessage) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*SampleOneOf_SubMessage) + if !ok { + that2, ok := that.(SampleOneOf_SubMessage) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *SampleOneOf_SubMessage") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *SampleOneOf_SubMessage but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *SampleOneOf_SubMessage but is not nil && this == nil") + } + if !this.SubMessage.Equal(that1.SubMessage) { + return fmt.Errorf("SubMessage this(%v) Not Equal that(%v)", this.SubMessage, that1.SubMessage) + } + return nil +} +func (this *SampleOneOf) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*SampleOneOf) + if !ok { + that2, ok := that.(SampleOneOf) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + if this == nil { + return true + } + return false + } else if this == nil { + return false + } + if that1.TestOneof == nil { + if this.TestOneof != nil { + return false + } + } else if this.TestOneof == nil { + return false + } else if !this.TestOneof.Equal(that1.TestOneof) { + return false + } + return true +} +func (this *SampleOneOf_Field1) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*SampleOneOf_Field1) + if !ok { + that2, ok := that.(SampleOneOf_Field1) + 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.Field1 != that1.Field1 { + return false + } + return true +} +func (this *SampleOneOf_Field2) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*SampleOneOf_Field2) + if !ok { + that2, ok := that.(SampleOneOf_Field2) + 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.Field2 != that1.Field2 { + return false + } + return true +} +func (this *SampleOneOf_Field3) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*SampleOneOf_Field3) + if !ok { + that2, ok := that.(SampleOneOf_Field3) + 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.Field3 != that1.Field3 { + return false + } + return true +} +func (this *SampleOneOf_Field4) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*SampleOneOf_Field4) + if !ok { + that2, ok := that.(SampleOneOf_Field4) + 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.Field4 != that1.Field4 { + return false + } + return true +} +func (this *SampleOneOf_Field5) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*SampleOneOf_Field5) + if !ok { + that2, ok := that.(SampleOneOf_Field5) + 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.Field5 != that1.Field5 { + return false + } + return true +} +func (this *SampleOneOf_Field6) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*SampleOneOf_Field6) + if !ok { + that2, ok := that.(SampleOneOf_Field6) + 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.Field6 != that1.Field6 { + return false + } + return true +} +func (this *SampleOneOf_Field7) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*SampleOneOf_Field7) + if !ok { + that2, ok := that.(SampleOneOf_Field7) + 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.Field7 != that1.Field7 { + return false + } + return true +} +func (this *SampleOneOf_Field8) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*SampleOneOf_Field8) + if !ok { + that2, ok := that.(SampleOneOf_Field8) + 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.Field8 != that1.Field8 { + return false + } + return true +} +func (this *SampleOneOf_Field9) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*SampleOneOf_Field9) + if !ok { + that2, ok := that.(SampleOneOf_Field9) + 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.Field9 != that1.Field9 { + return false + } + return true +} +func (this *SampleOneOf_Field10) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*SampleOneOf_Field10) + if !ok { + that2, ok := that.(SampleOneOf_Field10) + 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.Field10 != that1.Field10 { + return false + } + return true +} +func (this *SampleOneOf_Field11) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*SampleOneOf_Field11) + if !ok { + that2, ok := that.(SampleOneOf_Field11) + 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.Field11 != that1.Field11 { + return false + } + return true +} +func (this *SampleOneOf_Field12) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*SampleOneOf_Field12) + if !ok { + that2, ok := that.(SampleOneOf_Field12) + 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.Field12 != that1.Field12 { + return false + } + return true +} +func (this *SampleOneOf_Field13) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*SampleOneOf_Field13) + if !ok { + that2, ok := that.(SampleOneOf_Field13) + 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.Field13 != that1.Field13 { + return false + } + return true +} +func (this *SampleOneOf_Field14) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*SampleOneOf_Field14) + if !ok { + that2, ok := that.(SampleOneOf_Field14) + 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.Field14 != that1.Field14 { + return false + } + return true +} +func (this *SampleOneOf_Field15) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*SampleOneOf_Field15) + if !ok { + that2, ok := that.(SampleOneOf_Field15) + 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.Field15, that1.Field15) { + return false + } + return true +} +func (this *SampleOneOf_SubMessage) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*SampleOneOf_SubMessage) + if !ok { + that2, ok := that.(SampleOneOf_SubMessage) + 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.SubMessage.Equal(that1.SubMessage) { + return false + } + return true +} +func (this *Subby) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&one.Subby{") + s = append(s, "Sub: "+fmt.Sprintf("%#v", this.Sub)+",\n") + s = append(s, "}") + return strings.Join(s, "") +} +func (this *SampleOneOf) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 20) + s = append(s, "&one.SampleOneOf{") + if this.TestOneof != nil { + s = append(s, "TestOneof: "+fmt.Sprintf("%#v", this.TestOneof)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *SampleOneOf_Field1) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.SampleOneOf_Field1{` + + `Field1:` + fmt.Sprintf("%#v", this.Field1) + `}`}, ", ") + return s +} +func (this *SampleOneOf_Field2) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.SampleOneOf_Field2{` + + `Field2:` + fmt.Sprintf("%#v", this.Field2) + `}`}, ", ") + return s +} +func (this *SampleOneOf_Field3) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.SampleOneOf_Field3{` + + `Field3:` + fmt.Sprintf("%#v", this.Field3) + `}`}, ", ") + return s +} +func (this *SampleOneOf_Field4) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.SampleOneOf_Field4{` + + `Field4:` + fmt.Sprintf("%#v", this.Field4) + `}`}, ", ") + return s +} +func (this *SampleOneOf_Field5) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.SampleOneOf_Field5{` + + `Field5:` + fmt.Sprintf("%#v", this.Field5) + `}`}, ", ") + return s +} +func (this *SampleOneOf_Field6) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.SampleOneOf_Field6{` + + `Field6:` + fmt.Sprintf("%#v", this.Field6) + `}`}, ", ") + return s +} +func (this *SampleOneOf_Field7) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.SampleOneOf_Field7{` + + `Field7:` + fmt.Sprintf("%#v", this.Field7) + `}`}, ", ") + return s +} +func (this *SampleOneOf_Field8) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.SampleOneOf_Field8{` + + `Field8:` + fmt.Sprintf("%#v", this.Field8) + `}`}, ", ") + return s +} +func (this *SampleOneOf_Field9) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.SampleOneOf_Field9{` + + `Field9:` + fmt.Sprintf("%#v", this.Field9) + `}`}, ", ") + return s +} +func (this *SampleOneOf_Field10) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.SampleOneOf_Field10{` + + `Field10:` + fmt.Sprintf("%#v", this.Field10) + `}`}, ", ") + return s +} +func (this *SampleOneOf_Field11) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.SampleOneOf_Field11{` + + `Field11:` + fmt.Sprintf("%#v", this.Field11) + `}`}, ", ") + return s +} +func (this *SampleOneOf_Field12) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.SampleOneOf_Field12{` + + `Field12:` + fmt.Sprintf("%#v", this.Field12) + `}`}, ", ") + return s +} +func (this *SampleOneOf_Field13) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.SampleOneOf_Field13{` + + `Field13:` + fmt.Sprintf("%#v", this.Field13) + `}`}, ", ") + return s +} +func (this *SampleOneOf_Field14) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.SampleOneOf_Field14{` + + `Field14:` + fmt.Sprintf("%#v", this.Field14) + `}`}, ", ") + return s +} +func (this *SampleOneOf_Field15) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.SampleOneOf_Field15{` + + `Field15:` + fmt.Sprintf("%#v", this.Field15) + `}`}, ", ") + return s +} +func (this *SampleOneOf_SubMessage) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.SampleOneOf_SubMessage{` + + `SubMessage:` + fmt.Sprintf("%#v", this.SubMessage) + `}`}, ", ") + return s +} +func valueToGoStringOne(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 extensionToGoStringOne(e map[int32]github_com_gogo_protobuf_proto.Extension) string { + if e == nil { + return "nil" + } + s := "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 +} +func (m *Subby) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *Subby) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Sub) > 0 { + data[i] = 0xa + i++ + i = encodeVarintOne(data, i, uint64(len(m.Sub))) + i += copy(data[i:], m.Sub) + } + return i, nil +} + +func (m *SampleOneOf) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *SampleOneOf) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.TestOneof != nil { + nn1, err := m.TestOneof.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += nn1 + } + return i, nil +} + +func (m *SampleOneOf_Field1) MarshalTo(data []byte) (int, error) { + i := 0 + data[i] = 0x9 + i++ + i = encodeFixed64One(data, i, uint64(math.Float64bits(float64(m.Field1)))) + return i, nil +} +func (m *SampleOneOf_Field2) MarshalTo(data []byte) (int, error) { + i := 0 + data[i] = 0x15 + i++ + i = encodeFixed32One(data, i, uint32(math.Float32bits(float32(m.Field2)))) + return i, nil +} +func (m *SampleOneOf_Field3) MarshalTo(data []byte) (int, error) { + i := 0 + data[i] = 0x18 + i++ + i = encodeVarintOne(data, i, uint64(m.Field3)) + return i, nil +} +func (m *SampleOneOf_Field4) MarshalTo(data []byte) (int, error) { + i := 0 + data[i] = 0x20 + i++ + i = encodeVarintOne(data, i, uint64(m.Field4)) + return i, nil +} +func (m *SampleOneOf_Field5) MarshalTo(data []byte) (int, error) { + i := 0 + data[i] = 0x28 + i++ + i = encodeVarintOne(data, i, uint64(m.Field5)) + return i, nil +} +func (m *SampleOneOf_Field6) MarshalTo(data []byte) (int, error) { + i := 0 + data[i] = 0x30 + i++ + i = encodeVarintOne(data, i, uint64(m.Field6)) + return i, nil +} +func (m *SampleOneOf_Field7) MarshalTo(data []byte) (int, error) { + i := 0 + data[i] = 0x38 + i++ + i = encodeVarintOne(data, i, uint64((uint32(m.Field7)<<1)^uint32((m.Field7>>31)))) + return i, nil +} +func (m *SampleOneOf_Field8) MarshalTo(data []byte) (int, error) { + i := 0 + data[i] = 0x40 + i++ + i = encodeVarintOne(data, i, uint64((uint64(m.Field8)<<1)^uint64((m.Field8>>63)))) + return i, nil +} +func (m *SampleOneOf_Field9) MarshalTo(data []byte) (int, error) { + i := 0 + data[i] = 0x4d + i++ + i = encodeFixed32One(data, i, uint32(m.Field9)) + return i, nil +} +func (m *SampleOneOf_Field10) MarshalTo(data []byte) (int, error) { + i := 0 + data[i] = 0x55 + i++ + i = encodeFixed32One(data, i, uint32(m.Field10)) + return i, nil +} +func (m *SampleOneOf_Field11) MarshalTo(data []byte) (int, error) { + i := 0 + data[i] = 0x59 + i++ + i = encodeFixed64One(data, i, uint64(m.Field11)) + return i, nil +} +func (m *SampleOneOf_Field12) MarshalTo(data []byte) (int, error) { + i := 0 + data[i] = 0x61 + i++ + i = encodeFixed64One(data, i, uint64(m.Field12)) + return i, nil +} +func (m *SampleOneOf_Field13) MarshalTo(data []byte) (int, error) { + i := 0 + data[i] = 0x68 + i++ + if m.Field13 { + data[i] = 1 + } else { + data[i] = 0 + } + i++ + return i, nil +} +func (m *SampleOneOf_Field14) MarshalTo(data []byte) (int, error) { + i := 0 + data[i] = 0x72 + i++ + i = encodeVarintOne(data, i, uint64(len(m.Field14))) + i += copy(data[i:], m.Field14) + return i, nil +} +func (m *SampleOneOf_Field15) MarshalTo(data []byte) (int, error) { + i := 0 + if m.Field15 != nil { + data[i] = 0x7a + i++ + i = encodeVarintOne(data, i, uint64(len(m.Field15))) + i += copy(data[i:], m.Field15) + } + return i, nil +} +func (m *SampleOneOf_SubMessage) MarshalTo(data []byte) (int, error) { + i := 0 + if m.SubMessage != nil { + data[i] = 0x82 + i++ + data[i] = 0x1 + i++ + i = encodeVarintOne(data, i, uint64(m.SubMessage.Size())) + n2, err := m.SubMessage.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n2 + } + return i, nil +} +func encodeFixed64One(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 encodeFixed32One(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 encodeVarintOne(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 NewPopulatedSubby(r randyOne, easy bool) *Subby { + this := &Subby{} + this.Sub = randStringOne(r) + if !easy && r.Intn(10) != 0 { + } + return this +} + +func NewPopulatedSampleOneOf(r randyOne, easy bool) *SampleOneOf { + this := &SampleOneOf{} + oneofNumber_TestOneof := []int32{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}[r.Intn(16)] + switch oneofNumber_TestOneof { + case 1: + this.TestOneof = NewPopulatedSampleOneOf_Field1(r, easy) + case 2: + this.TestOneof = NewPopulatedSampleOneOf_Field2(r, easy) + case 3: + this.TestOneof = NewPopulatedSampleOneOf_Field3(r, easy) + case 4: + this.TestOneof = NewPopulatedSampleOneOf_Field4(r, easy) + case 5: + this.TestOneof = NewPopulatedSampleOneOf_Field5(r, easy) + case 6: + this.TestOneof = NewPopulatedSampleOneOf_Field6(r, easy) + case 7: + this.TestOneof = NewPopulatedSampleOneOf_Field7(r, easy) + case 8: + this.TestOneof = NewPopulatedSampleOneOf_Field8(r, easy) + case 9: + this.TestOneof = NewPopulatedSampleOneOf_Field9(r, easy) + case 10: + this.TestOneof = NewPopulatedSampleOneOf_Field10(r, easy) + case 11: + this.TestOneof = NewPopulatedSampleOneOf_Field11(r, easy) + case 12: + this.TestOneof = NewPopulatedSampleOneOf_Field12(r, easy) + case 13: + this.TestOneof = NewPopulatedSampleOneOf_Field13(r, easy) + case 14: + this.TestOneof = NewPopulatedSampleOneOf_Field14(r, easy) + case 15: + this.TestOneof = NewPopulatedSampleOneOf_Field15(r, easy) + case 16: + this.TestOneof = NewPopulatedSampleOneOf_SubMessage(r, easy) + } + if !easy && r.Intn(10) != 0 { + } + return this +} + +func NewPopulatedSampleOneOf_Field1(r randyOne, easy bool) *SampleOneOf_Field1 { + this := &SampleOneOf_Field1{} + this.Field1 = float64(r.Float64()) + if r.Intn(2) == 0 { + this.Field1 *= -1 + } + return this +} +func NewPopulatedSampleOneOf_Field2(r randyOne, easy bool) *SampleOneOf_Field2 { + this := &SampleOneOf_Field2{} + this.Field2 = float32(r.Float32()) + if r.Intn(2) == 0 { + this.Field2 *= -1 + } + return this +} +func NewPopulatedSampleOneOf_Field3(r randyOne, easy bool) *SampleOneOf_Field3 { + this := &SampleOneOf_Field3{} + this.Field3 = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Field3 *= -1 + } + return this +} +func NewPopulatedSampleOneOf_Field4(r randyOne, easy bool) *SampleOneOf_Field4 { + this := &SampleOneOf_Field4{} + this.Field4 = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Field4 *= -1 + } + return this +} +func NewPopulatedSampleOneOf_Field5(r randyOne, easy bool) *SampleOneOf_Field5 { + this := &SampleOneOf_Field5{} + this.Field5 = uint32(r.Uint32()) + return this +} +func NewPopulatedSampleOneOf_Field6(r randyOne, easy bool) *SampleOneOf_Field6 { + this := &SampleOneOf_Field6{} + this.Field6 = uint64(uint64(r.Uint32())) + return this +} +func NewPopulatedSampleOneOf_Field7(r randyOne, easy bool) *SampleOneOf_Field7 { + this := &SampleOneOf_Field7{} + this.Field7 = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Field7 *= -1 + } + return this +} +func NewPopulatedSampleOneOf_Field8(r randyOne, easy bool) *SampleOneOf_Field8 { + this := &SampleOneOf_Field8{} + this.Field8 = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Field8 *= -1 + } + return this +} +func NewPopulatedSampleOneOf_Field9(r randyOne, easy bool) *SampleOneOf_Field9 { + this := &SampleOneOf_Field9{} + this.Field9 = uint32(r.Uint32()) + return this +} +func NewPopulatedSampleOneOf_Field10(r randyOne, easy bool) *SampleOneOf_Field10 { + this := &SampleOneOf_Field10{} + this.Field10 = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Field10 *= -1 + } + return this +} +func NewPopulatedSampleOneOf_Field11(r randyOne, easy bool) *SampleOneOf_Field11 { + this := &SampleOneOf_Field11{} + this.Field11 = uint64(uint64(r.Uint32())) + return this +} +func NewPopulatedSampleOneOf_Field12(r randyOne, easy bool) *SampleOneOf_Field12 { + this := &SampleOneOf_Field12{} + this.Field12 = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Field12 *= -1 + } + return this +} +func NewPopulatedSampleOneOf_Field13(r randyOne, easy bool) *SampleOneOf_Field13 { + this := &SampleOneOf_Field13{} + this.Field13 = bool(bool(r.Intn(2) == 0)) + return this +} +func NewPopulatedSampleOneOf_Field14(r randyOne, easy bool) *SampleOneOf_Field14 { + this := &SampleOneOf_Field14{} + this.Field14 = randStringOne(r) + return this +} +func NewPopulatedSampleOneOf_Field15(r randyOne, easy bool) *SampleOneOf_Field15 { + this := &SampleOneOf_Field15{} + v1 := r.Intn(100) + this.Field15 = make([]byte, v1) + for i := 0; i < v1; i++ { + this.Field15[i] = byte(r.Intn(256)) + } + return this +} +func NewPopulatedSampleOneOf_SubMessage(r randyOne, easy bool) *SampleOneOf_SubMessage { + this := &SampleOneOf_SubMessage{} + this.SubMessage = NewPopulatedSubby(r, easy) + return this +} + +type randyOne interface { + Float32() float32 + Float64() float64 + Int63() int64 + Int31() int32 + Uint32() uint32 + Intn(n int) int +} + +func randUTF8RuneOne(r randyOne) 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 randStringOne(r randyOne) string { + v2 := r.Intn(100) + tmps := make([]rune, v2) + for i := 0; i < v2; i++ { + tmps[i] = randUTF8RuneOne(r) + } + return string(tmps) +} +func randUnrecognizedOne(r randyOne, 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 = randFieldOne(data, r, fieldNumber, wire) + } + return data +} +func randFieldOne(data []byte, r randyOne, fieldNumber int, wire int) []byte { + key := uint32(fieldNumber)<<3 | uint32(wire) + switch wire { + case 0: + data = encodeVarintPopulateOne(data, uint64(key)) + v3 := r.Int63() + if r.Intn(2) == 0 { + v3 *= -1 + } + data = encodeVarintPopulateOne(data, uint64(v3)) + case 1: + data = encodeVarintPopulateOne(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 = encodeVarintPopulateOne(data, uint64(key)) + ll := r.Intn(100) + data = encodeVarintPopulateOne(data, uint64(ll)) + for j := 0; j < ll; j++ { + data = append(data, byte(r.Intn(256))) + } + default: + data = encodeVarintPopulateOne(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 encodeVarintPopulateOne(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 *Subby) Size() (n int) { + var l int + _ = l + l = len(m.Sub) + if l > 0 { + n += 1 + l + sovOne(uint64(l)) + } + return n +} + +func (m *SampleOneOf) Size() (n int) { + var l int + _ = l + if m.TestOneof != nil { + n += m.TestOneof.Size() + } + return n +} + +func (m *SampleOneOf_Field1) Size() (n int) { + var l int + _ = l + n += 9 + return n +} +func (m *SampleOneOf_Field2) Size() (n int) { + var l int + _ = l + n += 5 + return n +} +func (m *SampleOneOf_Field3) Size() (n int) { + var l int + _ = l + n += 1 + sovOne(uint64(m.Field3)) + return n +} +func (m *SampleOneOf_Field4) Size() (n int) { + var l int + _ = l + n += 1 + sovOne(uint64(m.Field4)) + return n +} +func (m *SampleOneOf_Field5) Size() (n int) { + var l int + _ = l + n += 1 + sovOne(uint64(m.Field5)) + return n +} +func (m *SampleOneOf_Field6) Size() (n int) { + var l int + _ = l + n += 1 + sovOne(uint64(m.Field6)) + return n +} +func (m *SampleOneOf_Field7) Size() (n int) { + var l int + _ = l + n += 1 + sozOne(uint64(m.Field7)) + return n +} +func (m *SampleOneOf_Field8) Size() (n int) { + var l int + _ = l + n += 1 + sozOne(uint64(m.Field8)) + return n +} +func (m *SampleOneOf_Field9) Size() (n int) { + var l int + _ = l + n += 5 + return n +} +func (m *SampleOneOf_Field10) Size() (n int) { + var l int + _ = l + n += 5 + return n +} +func (m *SampleOneOf_Field11) Size() (n int) { + var l int + _ = l + n += 9 + return n +} +func (m *SampleOneOf_Field12) Size() (n int) { + var l int + _ = l + n += 9 + return n +} +func (m *SampleOneOf_Field13) Size() (n int) { + var l int + _ = l + n += 2 + return n +} +func (m *SampleOneOf_Field14) Size() (n int) { + var l int + _ = l + l = len(m.Field14) + n += 1 + l + sovOne(uint64(l)) + return n +} +func (m *SampleOneOf_Field15) Size() (n int) { + var l int + _ = l + if m.Field15 != nil { + l = len(m.Field15) + n += 1 + l + sovOne(uint64(l)) + } + return n +} +func (m *SampleOneOf_SubMessage) Size() (n int) { + var l int + _ = l + if m.SubMessage != nil { + l = m.SubMessage.Size() + n += 2 + l + sovOne(uint64(l)) + } + return n +} + +func sovOne(x uint64) (n int) { + for { + n++ + x >>= 7 + if x == 0 { + break + } + } + return n +} +func sozOne(x uint64) (n int) { + return sovOne(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (this *Subby) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&Subby{`, + `Sub:` + fmt.Sprintf("%v", this.Sub) + `,`, + `}`, + }, "") + return s +} +func (this *SampleOneOf) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&SampleOneOf{`, + `TestOneof:` + fmt.Sprintf("%v", this.TestOneof) + `,`, + `}`, + }, "") + return s +} +func (this *SampleOneOf_Field1) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&SampleOneOf_Field1{`, + `Field1:` + fmt.Sprintf("%v", this.Field1) + `,`, + `}`, + }, "") + return s +} +func (this *SampleOneOf_Field2) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&SampleOneOf_Field2{`, + `Field2:` + fmt.Sprintf("%v", this.Field2) + `,`, + `}`, + }, "") + return s +} +func (this *SampleOneOf_Field3) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&SampleOneOf_Field3{`, + `Field3:` + fmt.Sprintf("%v", this.Field3) + `,`, + `}`, + }, "") + return s +} +func (this *SampleOneOf_Field4) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&SampleOneOf_Field4{`, + `Field4:` + fmt.Sprintf("%v", this.Field4) + `,`, + `}`, + }, "") + return s +} +func (this *SampleOneOf_Field5) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&SampleOneOf_Field5{`, + `Field5:` + fmt.Sprintf("%v", this.Field5) + `,`, + `}`, + }, "") + return s +} +func (this *SampleOneOf_Field6) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&SampleOneOf_Field6{`, + `Field6:` + fmt.Sprintf("%v", this.Field6) + `,`, + `}`, + }, "") + return s +} +func (this *SampleOneOf_Field7) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&SampleOneOf_Field7{`, + `Field7:` + fmt.Sprintf("%v", this.Field7) + `,`, + `}`, + }, "") + return s +} +func (this *SampleOneOf_Field8) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&SampleOneOf_Field8{`, + `Field8:` + fmt.Sprintf("%v", this.Field8) + `,`, + `}`, + }, "") + return s +} +func (this *SampleOneOf_Field9) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&SampleOneOf_Field9{`, + `Field9:` + fmt.Sprintf("%v", this.Field9) + `,`, + `}`, + }, "") + return s +} +func (this *SampleOneOf_Field10) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&SampleOneOf_Field10{`, + `Field10:` + fmt.Sprintf("%v", this.Field10) + `,`, + `}`, + }, "") + return s +} +func (this *SampleOneOf_Field11) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&SampleOneOf_Field11{`, + `Field11:` + fmt.Sprintf("%v", this.Field11) + `,`, + `}`, + }, "") + return s +} +func (this *SampleOneOf_Field12) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&SampleOneOf_Field12{`, + `Field12:` + fmt.Sprintf("%v", this.Field12) + `,`, + `}`, + }, "") + return s +} +func (this *SampleOneOf_Field13) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&SampleOneOf_Field13{`, + `Field13:` + fmt.Sprintf("%v", this.Field13) + `,`, + `}`, + }, "") + return s +} +func (this *SampleOneOf_Field14) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&SampleOneOf_Field14{`, + `Field14:` + fmt.Sprintf("%v", this.Field14) + `,`, + `}`, + }, "") + return s +} +func (this *SampleOneOf_Field15) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&SampleOneOf_Field15{`, + `Field15:` + fmt.Sprintf("%v", this.Field15) + `,`, + `}`, + }, "") + return s +} +func (this *SampleOneOf_SubMessage) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&SampleOneOf_SubMessage{`, + `SubMessage:` + strings.Replace(fmt.Sprintf("%v", this.SubMessage), "Subby", "Subby", 1) + `,`, + `}`, + }, "") + return s +} +func valueToStringOne(v interface{}) string { + rv := reflect.ValueOf(v) + if rv.IsNil() { + return "nil" + } + pv := reflect.Indirect(rv).Interface() + return fmt.Sprintf("*%v", pv) +} +func (m *Subby) 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 ErrIntOverflowOne + } + 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: Subby: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Subby: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Sub", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOne + } + 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 ErrInvalidLengthOne + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Sub = string(data[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipOne(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthOne + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *SampleOneOf) 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 ErrIntOverflowOne + } + 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: SampleOneOf: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: SampleOneOf: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field Field1", 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.TestOneof = &SampleOneOf_Field1{float64(math.Float64frombits(v))} + case 2: + if wireType != 5 { + return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType) + } + var v uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + iNdEx += 4 + v = uint32(data[iNdEx-4]) + v |= uint32(data[iNdEx-3]) << 8 + v |= uint32(data[iNdEx-2]) << 16 + v |= uint32(data[iNdEx-1]) << 24 + m.TestOneof = &SampleOneOf_Field2{float32(math.Float32frombits(v))} + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field3", wireType) + } + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOne + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.TestOneof = &SampleOneOf_Field3{v} + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field4", wireType) + } + var v int64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOne + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.TestOneof = &SampleOneOf_Field4{v} + case 5: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field5", wireType) + } + var v uint32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOne + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (uint32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.TestOneof = &SampleOneOf_Field5{v} + case 6: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field6", wireType) + } + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOne + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.TestOneof = &SampleOneOf_Field6{v} + case 7: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field7", wireType) + } + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOne + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + v = int32((uint32(v) >> 1) ^ uint32(((v&1)<<31)>>31)) + m.TestOneof = &SampleOneOf_Field7{v} + case 8: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field8", wireType) + } + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOne + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + v = (v >> 1) ^ uint64((int64(v&1)<<63)>>63) + m.TestOneof = &SampleOneOf_Field8{int64(v)} + case 9: + if wireType != 5 { + return fmt.Errorf("proto: wrong wireType = %d for field Field9", wireType) + } + var v uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + iNdEx += 4 + v = uint32(data[iNdEx-4]) + v |= uint32(data[iNdEx-3]) << 8 + v |= uint32(data[iNdEx-2]) << 16 + v |= uint32(data[iNdEx-1]) << 24 + m.TestOneof = &SampleOneOf_Field9{v} + case 10: + if wireType != 5 { + return fmt.Errorf("proto: wrong wireType = %d for field Field10", wireType) + } + var v int32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + iNdEx += 4 + v = int32(data[iNdEx-4]) + v |= int32(data[iNdEx-3]) << 8 + v |= int32(data[iNdEx-2]) << 16 + v |= int32(data[iNdEx-1]) << 24 + m.TestOneof = &SampleOneOf_Field10{v} + case 11: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field Field11", 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.TestOneof = &SampleOneOf_Field11{v} + case 12: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field Field12", wireType) + } + var v int64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + iNdEx += 8 + v = int64(data[iNdEx-8]) + v |= int64(data[iNdEx-7]) << 8 + v |= int64(data[iNdEx-6]) << 16 + v |= int64(data[iNdEx-5]) << 24 + v |= int64(data[iNdEx-4]) << 32 + v |= int64(data[iNdEx-3]) << 40 + v |= int64(data[iNdEx-2]) << 48 + v |= int64(data[iNdEx-1]) << 56 + m.TestOneof = &SampleOneOf_Field12{v} + case 13: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field13", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOne + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + b := bool(v != 0) + m.TestOneof = &SampleOneOf_Field13{b} + case 14: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field14", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOne + } + 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 ErrInvalidLengthOne + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.TestOneof = &SampleOneOf_Field14{string(data[iNdEx:postIndex])} + iNdEx = postIndex + case 15: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field15", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOne + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthOne + } + postIndex := iNdEx + byteLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + v := make([]byte, postIndex-iNdEx) + copy(v, data[iNdEx:postIndex]) + m.TestOneof = &SampleOneOf_Field15{v} + iNdEx = postIndex + case 16: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SubMessage", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOne + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthOne + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + v := &Subby{} + if err := v.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + m.TestOneof = &SampleOneOf_SubMessage{v} + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipOne(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthOne + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipOne(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, ErrIntOverflowOne + } + 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, ErrIntOverflowOne + } + 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, ErrIntOverflowOne + } + 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, ErrInvalidLengthOne + } + return iNdEx, nil + case 3: + for { + var innerWire uint64 + var start int = iNdEx + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowOne + } + 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 := skipOne(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 ( + ErrInvalidLengthOne = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowOne = fmt.Errorf("proto: integer overflow") +) + +var fileDescriptorOne = []byte{ + // 379 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0x44, 0xd2, 0xbf, 0x6f, 0xd3, 0x40, + 0x14, 0x07, 0x70, 0xbb, 0x6e, 0xec, 0xf6, 0x9c, 0xd2, 0x60, 0x09, 0xe9, 0xd1, 0xc1, 0x42, 0x9d, + 0x58, 0x1a, 0x37, 0xfe, 0xd1, 0x1f, 0x6b, 0x85, 0x10, 0x0b, 0xaa, 0xd4, 0xfe, 0x01, 0x55, 0x0e, + 0x6c, 0x27, 0x52, 0x92, 0x8b, 0xb0, 0x3d, 0xb0, 0xe5, 0xcf, 0x61, 0x64, 0xe4, 0x4f, 0xc8, 0x98, + 0x91, 0x81, 0x21, 0x09, 0x0b, 0x63, 0xc6, 0x8c, 0x7c, 0x73, 0x96, 0xde, 0x0d, 0x5f, 0xdd, 0x7b, + 0xfa, 0x3c, 0x0f, 0xe7, 0x7b, 0xe2, 0xcd, 0x17, 0x35, 0x95, 0xaa, 0x8a, 0xa4, 0xaa, 0x47, 0x91, + 0x9a, 0xe5, 0xfd, 0xf9, 0x37, 0x55, 0xab, 0xc0, 0x41, 0x79, 0x71, 0x55, 0x8e, 0xeb, 0x51, 0x23, + 0xfb, 0x18, 0x89, 0x4a, 0x55, 0xaa, 0x48, 0x9b, 0x6c, 0x0a, 0xdd, 0xe9, 0x46, 0x57, 0xed, 0x37, + 0x97, 0x6f, 0x45, 0xe7, 0xb9, 0x91, 0xf2, 0x7b, 0xd0, 0x13, 0x4e, 0xd5, 0x48, 0xb2, 0xdf, 0xd9, + 0xef, 0x4f, 0x9f, 0x0e, 0xe5, 0xe5, 0x1f, 0x47, 0xf8, 0xcf, 0xc3, 0xe9, 0x7c, 0x92, 0x3f, 0xce, + 0xf2, 0xc7, 0x22, 0x20, 0xe1, 0x7e, 0x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6b, 0xe4, 0xdf, 0x36, + 0xb4, 0x76, 0x38, 0xf7, 0x38, 0x17, 0x7f, 0x43, 0x4b, 0xba, 0x7a, 0x8d, 0x92, 0xff, 0x01, 0x00, + 0x00, 0xff, 0xff, 0xc7, 0x33, 0xb2, 0x1d, 0x93, 0x02, 0x00, 0x00, +} diff --git a/vendor/github.com/gogo/protobuf/test/oneof3/combos/both/one.proto b/vendor/github.com/gogo/protobuf/test/oneof3/combos/both/one.proto new file mode 100644 index 000000000..5c91b6c72 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/oneof3/combos/both/one.proto @@ -0,0 +1,80 @@ +// Copyright (c) 2013, Vastech SA (PTY) LTD. All rights reserved. +// http://github.com/gogo/protobuf/gogoproto +// +// 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 = "proto3"; + +package one; + +import "github.com/gogo/protobuf/gogoproto/gogo.proto"; + +option (gogoproto.goproto_stringer_all) = false; +option (gogoproto.goproto_enum_prefix_all) = false; +option (gogoproto.goproto_getters_all) = false; + +option (gogoproto.equal_all) = true; +option (gogoproto.verbose_equal_all) = true; +option (gogoproto.stringer_all) = true; +option (gogoproto.gostring_all) = true; +option (gogoproto.description_all) = true; + +option (gogoproto.testgen_all) = true; +option (gogoproto.populate_all) = true; +option (gogoproto.unmarshaler_all) = true; +option (gogoproto.marshaler_all) = true; +option (gogoproto.sizer_all) = true; + +option (gogoproto.goproto_enum_stringer_all) = false; +option (gogoproto.enum_stringer_all) = true; + +option (gogoproto.unsafe_marshaler_all) = false; +option (gogoproto.unsafe_unmarshaler_all) = false; + +message Subby { + string sub = 1; +} + +message SampleOneOf { + oneof test_oneof { + double Field1 = 1; + float Field2 = 2; + int32 Field3 = 3; + int64 Field4 = 4; + uint32 Field5 = 5; + uint64 Field6 = 6; + sint32 Field7 = 7; + sint64 Field8 = 8; + fixed32 Field9 = 9; + sfixed32 Field10 = 10; + fixed64 Field11 = 11; + sfixed64 Field12 = 12; + bool Field13 = 13; + string Field14 = 14; + bytes Field15 = 15; + Subby sub_message = 16; + } +} + + diff --git a/vendor/github.com/gogo/protobuf/test/oneof3/combos/both/onepb_test.go b/vendor/github.com/gogo/protobuf/test/oneof3/combos/both/onepb_test.go new file mode 100644 index 000000000..f08f66fee --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/oneof3/combos/both/onepb_test.go @@ -0,0 +1,389 @@ +// Code generated by protoc-gen-gogo. +// source: combos/both/one.proto +// DO NOT EDIT! + +/* +Package one is a generated protocol buffer package. + +It is generated from these files: + combos/both/one.proto + +It has these top-level messages: + Subby + SampleOneOf +*/ +package one + +import testing "testing" +import math_rand "math/rand" +import time "time" +import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" +import github_com_gogo_protobuf_jsonpb "github.com/gogo/protobuf/jsonpb" +import fmt "fmt" +import go_parser "go/parser" +import proto "github.com/gogo/protobuf/proto" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +func TestSubbyProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedSubby(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Subby{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestSubbyMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedSubby(popr, false) + size := p.Size() + data := make([]byte, size) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(data) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Subby{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestSampleOneOfProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedSampleOneOf(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &SampleOneOf{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestSampleOneOfMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedSampleOneOf(popr, false) + size := p.Size() + data := make([]byte, size) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(data) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &SampleOneOf{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestSubbyJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedSubby(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Subby{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestSampleOneOfJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedSampleOneOf(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &SampleOneOf{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestSubbyProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedSubby(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &Subby{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestSubbyProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedSubby(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &Subby{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestSampleOneOfProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedSampleOneOf(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &SampleOneOf{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestSampleOneOfProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedSampleOneOf(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &SampleOneOf{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestOneDescription(t *testing.T) { + OneDescription() +} +func TestSubbyVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedSubby(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &Subby{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestSampleOneOfVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedSampleOneOf(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &SampleOneOf{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestSubbyGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedSubby(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestSampleOneOfGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedSampleOneOf(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestSubbySize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedSubby(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func TestSampleOneOfSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedSampleOneOf(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func TestSubbyStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedSubby(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestSampleOneOfStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedSampleOneOf(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} + +//These tests are generated by github.com/gogo/protobuf/plugin/testgen diff --git a/vendor/github.com/gogo/protobuf/test/oneof3/combos/marshaler/one.pb.go b/vendor/github.com/gogo/protobuf/test/oneof3/combos/marshaler/one.pb.go new file mode 100644 index 000000000..b1e82f786 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/oneof3/combos/marshaler/one.pb.go @@ -0,0 +1,2845 @@ +// Code generated by protoc-gen-gogo. +// source: combos/marshaler/one.proto +// DO NOT EDIT! + +/* +Package one is a generated protocol buffer package. + +It is generated from these files: + combos/marshaler/one.proto + +It has these top-level messages: + Subby + SampleOneOf +*/ +package one + +import proto "github.com/gogo/protobuf/proto" +import fmt "fmt" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" + +import github_com_gogo_protobuf_protoc_gen_gogo_descriptor "github.com/gogo/protobuf/protoc-gen-gogo/descriptor" +import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" +import compress_gzip "compress/gzip" +import bytes "bytes" +import io_ioutil "io/ioutil" + +import strings "strings" +import sort "sort" +import strconv "strconv" +import reflect "reflect" + +// 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. +const _ = proto.GoGoProtoPackageIsVersion1 + +type Subby struct { + Sub string `protobuf:"bytes,1,opt,name=sub,proto3" json:"sub,omitempty"` +} + +func (m *Subby) Reset() { *m = Subby{} } +func (*Subby) ProtoMessage() {} +func (*Subby) Descriptor() ([]byte, []int) { return fileDescriptorOne, []int{0} } + +type SampleOneOf struct { + // Types that are valid to be assigned to TestOneof: + // *SampleOneOf_Field1 + // *SampleOneOf_Field2 + // *SampleOneOf_Field3 + // *SampleOneOf_Field4 + // *SampleOneOf_Field5 + // *SampleOneOf_Field6 + // *SampleOneOf_Field7 + // *SampleOneOf_Field8 + // *SampleOneOf_Field9 + // *SampleOneOf_Field10 + // *SampleOneOf_Field11 + // *SampleOneOf_Field12 + // *SampleOneOf_Field13 + // *SampleOneOf_Field14 + // *SampleOneOf_Field15 + // *SampleOneOf_SubMessage + TestOneof isSampleOneOf_TestOneof `protobuf_oneof:"test_oneof"` +} + +func (m *SampleOneOf) Reset() { *m = SampleOneOf{} } +func (*SampleOneOf) ProtoMessage() {} +func (*SampleOneOf) Descriptor() ([]byte, []int) { return fileDescriptorOne, []int{1} } + +type isSampleOneOf_TestOneof interface { + isSampleOneOf_TestOneof() + Equal(interface{}) bool + VerboseEqual(interface{}) error + MarshalTo([]byte) (int, error) + Size() int +} + +type SampleOneOf_Field1 struct { + Field1 float64 `protobuf:"fixed64,1,opt,name=Field1,json=field1,proto3,oneof"` +} +type SampleOneOf_Field2 struct { + Field2 float32 `protobuf:"fixed32,2,opt,name=Field2,json=field2,proto3,oneof"` +} +type SampleOneOf_Field3 struct { + Field3 int32 `protobuf:"varint,3,opt,name=Field3,json=field3,proto3,oneof"` +} +type SampleOneOf_Field4 struct { + Field4 int64 `protobuf:"varint,4,opt,name=Field4,json=field4,proto3,oneof"` +} +type SampleOneOf_Field5 struct { + Field5 uint32 `protobuf:"varint,5,opt,name=Field5,json=field5,proto3,oneof"` +} +type SampleOneOf_Field6 struct { + Field6 uint64 `protobuf:"varint,6,opt,name=Field6,json=field6,proto3,oneof"` +} +type SampleOneOf_Field7 struct { + Field7 int32 `protobuf:"zigzag32,7,opt,name=Field7,json=field7,proto3,oneof"` +} +type SampleOneOf_Field8 struct { + Field8 int64 `protobuf:"zigzag64,8,opt,name=Field8,json=field8,proto3,oneof"` +} +type SampleOneOf_Field9 struct { + Field9 uint32 `protobuf:"fixed32,9,opt,name=Field9,json=field9,proto3,oneof"` +} +type SampleOneOf_Field10 struct { + Field10 int32 `protobuf:"fixed32,10,opt,name=Field10,json=field10,proto3,oneof"` +} +type SampleOneOf_Field11 struct { + Field11 uint64 `protobuf:"fixed64,11,opt,name=Field11,json=field11,proto3,oneof"` +} +type SampleOneOf_Field12 struct { + Field12 int64 `protobuf:"fixed64,12,opt,name=Field12,json=field12,proto3,oneof"` +} +type SampleOneOf_Field13 struct { + Field13 bool `protobuf:"varint,13,opt,name=Field13,json=field13,proto3,oneof"` +} +type SampleOneOf_Field14 struct { + Field14 string `protobuf:"bytes,14,opt,name=Field14,json=field14,proto3,oneof"` +} +type SampleOneOf_Field15 struct { + Field15 []byte `protobuf:"bytes,15,opt,name=Field15,json=field15,proto3,oneof"` +} +type SampleOneOf_SubMessage struct { + SubMessage *Subby `protobuf:"bytes,16,opt,name=sub_message,json=subMessage,oneof"` +} + +func (*SampleOneOf_Field1) isSampleOneOf_TestOneof() {} +func (*SampleOneOf_Field2) isSampleOneOf_TestOneof() {} +func (*SampleOneOf_Field3) isSampleOneOf_TestOneof() {} +func (*SampleOneOf_Field4) isSampleOneOf_TestOneof() {} +func (*SampleOneOf_Field5) isSampleOneOf_TestOneof() {} +func (*SampleOneOf_Field6) isSampleOneOf_TestOneof() {} +func (*SampleOneOf_Field7) isSampleOneOf_TestOneof() {} +func (*SampleOneOf_Field8) isSampleOneOf_TestOneof() {} +func (*SampleOneOf_Field9) isSampleOneOf_TestOneof() {} +func (*SampleOneOf_Field10) isSampleOneOf_TestOneof() {} +func (*SampleOneOf_Field11) isSampleOneOf_TestOneof() {} +func (*SampleOneOf_Field12) isSampleOneOf_TestOneof() {} +func (*SampleOneOf_Field13) isSampleOneOf_TestOneof() {} +func (*SampleOneOf_Field14) isSampleOneOf_TestOneof() {} +func (*SampleOneOf_Field15) isSampleOneOf_TestOneof() {} +func (*SampleOneOf_SubMessage) isSampleOneOf_TestOneof() {} + +func (m *SampleOneOf) GetTestOneof() isSampleOneOf_TestOneof { + if m != nil { + return m.TestOneof + } + return nil +} + +func (m *SampleOneOf) GetField1() float64 { + if x, ok := m.GetTestOneof().(*SampleOneOf_Field1); ok { + return x.Field1 + } + return 0 +} + +func (m *SampleOneOf) GetField2() float32 { + if x, ok := m.GetTestOneof().(*SampleOneOf_Field2); ok { + return x.Field2 + } + return 0 +} + +func (m *SampleOneOf) GetField3() int32 { + if x, ok := m.GetTestOneof().(*SampleOneOf_Field3); ok { + return x.Field3 + } + return 0 +} + +func (m *SampleOneOf) GetField4() int64 { + if x, ok := m.GetTestOneof().(*SampleOneOf_Field4); ok { + return x.Field4 + } + return 0 +} + +func (m *SampleOneOf) GetField5() uint32 { + if x, ok := m.GetTestOneof().(*SampleOneOf_Field5); ok { + return x.Field5 + } + return 0 +} + +func (m *SampleOneOf) GetField6() uint64 { + if x, ok := m.GetTestOneof().(*SampleOneOf_Field6); ok { + return x.Field6 + } + return 0 +} + +func (m *SampleOneOf) GetField7() int32 { + if x, ok := m.GetTestOneof().(*SampleOneOf_Field7); ok { + return x.Field7 + } + return 0 +} + +func (m *SampleOneOf) GetField8() int64 { + if x, ok := m.GetTestOneof().(*SampleOneOf_Field8); ok { + return x.Field8 + } + return 0 +} + +func (m *SampleOneOf) GetField9() uint32 { + if x, ok := m.GetTestOneof().(*SampleOneOf_Field9); ok { + return x.Field9 + } + return 0 +} + +func (m *SampleOneOf) GetField10() int32 { + if x, ok := m.GetTestOneof().(*SampleOneOf_Field10); ok { + return x.Field10 + } + return 0 +} + +func (m *SampleOneOf) GetField11() uint64 { + if x, ok := m.GetTestOneof().(*SampleOneOf_Field11); ok { + return x.Field11 + } + return 0 +} + +func (m *SampleOneOf) GetField12() int64 { + if x, ok := m.GetTestOneof().(*SampleOneOf_Field12); ok { + return x.Field12 + } + return 0 +} + +func (m *SampleOneOf) GetField13() bool { + if x, ok := m.GetTestOneof().(*SampleOneOf_Field13); ok { + return x.Field13 + } + return false +} + +func (m *SampleOneOf) GetField14() string { + if x, ok := m.GetTestOneof().(*SampleOneOf_Field14); ok { + return x.Field14 + } + return "" +} + +func (m *SampleOneOf) GetField15() []byte { + if x, ok := m.GetTestOneof().(*SampleOneOf_Field15); ok { + return x.Field15 + } + return nil +} + +func (m *SampleOneOf) GetSubMessage() *Subby { + if x, ok := m.GetTestOneof().(*SampleOneOf_SubMessage); ok { + return x.SubMessage + } + return nil +} + +// XXX_OneofFuncs is for the internal use of the proto package. +func (*SampleOneOf) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{}) { + return _SampleOneOf_OneofMarshaler, _SampleOneOf_OneofUnmarshaler, _SampleOneOf_OneofSizer, []interface{}{ + (*SampleOneOf_Field1)(nil), + (*SampleOneOf_Field2)(nil), + (*SampleOneOf_Field3)(nil), + (*SampleOneOf_Field4)(nil), + (*SampleOneOf_Field5)(nil), + (*SampleOneOf_Field6)(nil), + (*SampleOneOf_Field7)(nil), + (*SampleOneOf_Field8)(nil), + (*SampleOneOf_Field9)(nil), + (*SampleOneOf_Field10)(nil), + (*SampleOneOf_Field11)(nil), + (*SampleOneOf_Field12)(nil), + (*SampleOneOf_Field13)(nil), + (*SampleOneOf_Field14)(nil), + (*SampleOneOf_Field15)(nil), + (*SampleOneOf_SubMessage)(nil), + } +} + +func _SampleOneOf_OneofMarshaler(msg proto.Message, b *proto.Buffer) error { + m := msg.(*SampleOneOf) + // test_oneof + switch x := m.TestOneof.(type) { + case *SampleOneOf_Field1: + _ = b.EncodeVarint(1<<3 | proto.WireFixed64) + _ = b.EncodeFixed64(math.Float64bits(x.Field1)) + case *SampleOneOf_Field2: + _ = b.EncodeVarint(2<<3 | proto.WireFixed32) + _ = b.EncodeFixed32(uint64(math.Float32bits(x.Field2))) + case *SampleOneOf_Field3: + _ = b.EncodeVarint(3<<3 | proto.WireVarint) + _ = b.EncodeVarint(uint64(x.Field3)) + case *SampleOneOf_Field4: + _ = b.EncodeVarint(4<<3 | proto.WireVarint) + _ = b.EncodeVarint(uint64(x.Field4)) + case *SampleOneOf_Field5: + _ = b.EncodeVarint(5<<3 | proto.WireVarint) + _ = b.EncodeVarint(uint64(x.Field5)) + case *SampleOneOf_Field6: + _ = b.EncodeVarint(6<<3 | proto.WireVarint) + _ = b.EncodeVarint(uint64(x.Field6)) + case *SampleOneOf_Field7: + _ = b.EncodeVarint(7<<3 | proto.WireVarint) + _ = b.EncodeZigzag32(uint64(x.Field7)) + case *SampleOneOf_Field8: + _ = b.EncodeVarint(8<<3 | proto.WireVarint) + _ = b.EncodeZigzag64(uint64(x.Field8)) + case *SampleOneOf_Field9: + _ = b.EncodeVarint(9<<3 | proto.WireFixed32) + _ = b.EncodeFixed32(uint64(x.Field9)) + case *SampleOneOf_Field10: + _ = b.EncodeVarint(10<<3 | proto.WireFixed32) + _ = b.EncodeFixed32(uint64(x.Field10)) + case *SampleOneOf_Field11: + _ = b.EncodeVarint(11<<3 | proto.WireFixed64) + _ = b.EncodeFixed64(uint64(x.Field11)) + case *SampleOneOf_Field12: + _ = b.EncodeVarint(12<<3 | proto.WireFixed64) + _ = b.EncodeFixed64(uint64(x.Field12)) + case *SampleOneOf_Field13: + t := uint64(0) + if x.Field13 { + t = 1 + } + _ = b.EncodeVarint(13<<3 | proto.WireVarint) + _ = b.EncodeVarint(t) + case *SampleOneOf_Field14: + _ = b.EncodeVarint(14<<3 | proto.WireBytes) + _ = b.EncodeStringBytes(x.Field14) + case *SampleOneOf_Field15: + _ = b.EncodeVarint(15<<3 | proto.WireBytes) + _ = b.EncodeRawBytes(x.Field15) + case *SampleOneOf_SubMessage: + _ = b.EncodeVarint(16<<3 | proto.WireBytes) + if err := b.EncodeMessage(x.SubMessage); err != nil { + return err + } + case nil: + default: + return fmt.Errorf("SampleOneOf.TestOneof has unexpected type %T", x) + } + return nil +} + +func _SampleOneOf_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) { + m := msg.(*SampleOneOf) + switch tag { + case 1: // test_oneof.Field1 + if wire != proto.WireFixed64 { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeFixed64() + m.TestOneof = &SampleOneOf_Field1{math.Float64frombits(x)} + return true, err + case 2: // test_oneof.Field2 + if wire != proto.WireFixed32 { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeFixed32() + m.TestOneof = &SampleOneOf_Field2{math.Float32frombits(uint32(x))} + return true, err + case 3: // test_oneof.Field3 + if wire != proto.WireVarint { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeVarint() + m.TestOneof = &SampleOneOf_Field3{int32(x)} + return true, err + case 4: // test_oneof.Field4 + if wire != proto.WireVarint { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeVarint() + m.TestOneof = &SampleOneOf_Field4{int64(x)} + return true, err + case 5: // test_oneof.Field5 + if wire != proto.WireVarint { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeVarint() + m.TestOneof = &SampleOneOf_Field5{uint32(x)} + return true, err + case 6: // test_oneof.Field6 + if wire != proto.WireVarint { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeVarint() + m.TestOneof = &SampleOneOf_Field6{x} + return true, err + case 7: // test_oneof.Field7 + if wire != proto.WireVarint { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeZigzag32() + m.TestOneof = &SampleOneOf_Field7{int32(x)} + return true, err + case 8: // test_oneof.Field8 + if wire != proto.WireVarint { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeZigzag64() + m.TestOneof = &SampleOneOf_Field8{int64(x)} + return true, err + case 9: // test_oneof.Field9 + if wire != proto.WireFixed32 { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeFixed32() + m.TestOneof = &SampleOneOf_Field9{uint32(x)} + return true, err + case 10: // test_oneof.Field10 + if wire != proto.WireFixed32 { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeFixed32() + m.TestOneof = &SampleOneOf_Field10{int32(x)} + return true, err + case 11: // test_oneof.Field11 + if wire != proto.WireFixed64 { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeFixed64() + m.TestOneof = &SampleOneOf_Field11{x} + return true, err + case 12: // test_oneof.Field12 + if wire != proto.WireFixed64 { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeFixed64() + m.TestOneof = &SampleOneOf_Field12{int64(x)} + return true, err + case 13: // test_oneof.Field13 + if wire != proto.WireVarint { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeVarint() + m.TestOneof = &SampleOneOf_Field13{x != 0} + return true, err + case 14: // test_oneof.Field14 + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeStringBytes() + m.TestOneof = &SampleOneOf_Field14{x} + return true, err + case 15: // test_oneof.Field15 + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeRawBytes(true) + m.TestOneof = &SampleOneOf_Field15{x} + return true, err + case 16: // test_oneof.sub_message + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + msg := new(Subby) + err := b.DecodeMessage(msg) + m.TestOneof = &SampleOneOf_SubMessage{msg} + return true, err + default: + return false, nil + } +} + +func _SampleOneOf_OneofSizer(msg proto.Message) (n int) { + m := msg.(*SampleOneOf) + // test_oneof + switch x := m.TestOneof.(type) { + case *SampleOneOf_Field1: + n += proto.SizeVarint(1<<3 | proto.WireFixed64) + n += 8 + case *SampleOneOf_Field2: + n += proto.SizeVarint(2<<3 | proto.WireFixed32) + n += 4 + case *SampleOneOf_Field3: + n += proto.SizeVarint(3<<3 | proto.WireVarint) + n += proto.SizeVarint(uint64(x.Field3)) + case *SampleOneOf_Field4: + n += proto.SizeVarint(4<<3 | proto.WireVarint) + n += proto.SizeVarint(uint64(x.Field4)) + case *SampleOneOf_Field5: + n += proto.SizeVarint(5<<3 | proto.WireVarint) + n += proto.SizeVarint(uint64(x.Field5)) + case *SampleOneOf_Field6: + n += proto.SizeVarint(6<<3 | proto.WireVarint) + n += proto.SizeVarint(uint64(x.Field6)) + case *SampleOneOf_Field7: + n += proto.SizeVarint(7<<3 | proto.WireVarint) + n += proto.SizeVarint(uint64((uint32(x.Field7) << 1) ^ uint32((int32(x.Field7) >> 31)))) + case *SampleOneOf_Field8: + n += proto.SizeVarint(8<<3 | proto.WireVarint) + n += proto.SizeVarint(uint64(uint64(x.Field8<<1) ^ uint64((int64(x.Field8) >> 63)))) + case *SampleOneOf_Field9: + n += proto.SizeVarint(9<<3 | proto.WireFixed32) + n += 4 + case *SampleOneOf_Field10: + n += proto.SizeVarint(10<<3 | proto.WireFixed32) + n += 4 + case *SampleOneOf_Field11: + n += proto.SizeVarint(11<<3 | proto.WireFixed64) + n += 8 + case *SampleOneOf_Field12: + n += proto.SizeVarint(12<<3 | proto.WireFixed64) + n += 8 + case *SampleOneOf_Field13: + n += proto.SizeVarint(13<<3 | proto.WireVarint) + n += 1 + case *SampleOneOf_Field14: + n += proto.SizeVarint(14<<3 | proto.WireBytes) + n += proto.SizeVarint(uint64(len(x.Field14))) + n += len(x.Field14) + case *SampleOneOf_Field15: + n += proto.SizeVarint(15<<3 | proto.WireBytes) + n += proto.SizeVarint(uint64(len(x.Field15))) + n += len(x.Field15) + case *SampleOneOf_SubMessage: + s := proto.Size(x.SubMessage) + n += proto.SizeVarint(16<<3 | proto.WireBytes) + n += proto.SizeVarint(uint64(s)) + n += s + case nil: + default: + panic(fmt.Sprintf("proto: unexpected type %T in oneof", x)) + } + return n +} + +func init() { + proto.RegisterType((*Subby)(nil), "one.Subby") + proto.RegisterType((*SampleOneOf)(nil), "one.SampleOneOf") +} +func (this *Subby) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return OneDescription() +} +func (this *SampleOneOf) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return OneDescription() +} +func OneDescription() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + d := &github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet{} + var gzipped = []byte{ + // 3537 bytes of a gzipped FileDescriptorSet + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xcc, 0x5a, 0x5b, 0x6c, 0x23, 0xe5, + 0xf5, 0x5f, 0xc7, 0x97, 0xd8, 0xc7, 0x89, 0xe3, 0x4c, 0xc2, 0xae, 0x37, 0xc0, 0x2e, 0x1b, 0x6e, + 0xcb, 0xf2, 0x27, 0xd9, 0xcd, 0xde, 0xcd, 0xbf, 0xa0, 0x5c, 0xbc, 0x21, 0xab, 0x24, 0x4e, 0xc7, + 0x09, 0x2c, 0xf4, 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0x3e, 0x08, 0x33, 0x9c, 0x45, 0xbb, 0x05, 0x34, 0x53, 0x33, 0x76, 0xe0, 0x5a, 0xd9, 0x0b, 0x09, + 0x7b, 0xcb, 0x74, 0xf4, 0x2b, 0xb9, 0x01, 0x16, 0x21, 0xe2, 0x6a, 0xfc, 0xdf, 0x71, 0x18, 0xea, + 0x25, 0xc4, 0xee, 0x84, 0xf8, 0x06, 0x7d, 0x4a, 0x0c, 0xb0, 0x5d, 0xf8, 0x80, 0x63, 0x82, 0x4e, + 0x4c, 0xbc, 0x4f, 0x27, 0x4e, 0x43, 0xda, 0x24, 0xb6, 0x43, 0x2a, 0x3c, 0x22, 0xa2, 0x3d, 0xc6, + 0x14, 0x70, 0x50, 0x67, 0x48, 0xc5, 0xde, 0x57, 0x48, 0x5d, 0x80, 0x21, 0x77, 0x48, 0x5a, 0x53, + 0x37, 0xab, 0x32, 0x36, 0x27, 0xc3, 0x46, 0x32, 0x51, 0x90, 0x38, 0x95, 0xc2, 0xd4, 0x0c, 0x09, + 0x5c, 0x2b, 0x73, 0x00, 0x96, 0x49, 0xac, 0x0d, 0x5c, 0x5e, 0x65, 0x03, 0xe3, 0xa4, 0xbb, 0x97, + 0x8a, 0xd4, 0xa4, 0xc3, 0x4b, 0x16, 0x97, 0x96, 0x0d, 0xe5, 0xac, 0x17, 0x6a, 0xfd, 0xdb, 0x44, + 0xca, 0x12, 0x5f, 0x64, 0x1d, 0xd1, 0xb6, 0x06, 0x99, 0x26, 0xa1, 0x71, 0x8f, 0x2e, 0xe6, 0x4f, + 0x96, 0x62, 0x83, 0x98, 0x08, 0x7d, 0x32, 0x55, 0xc0, 0xf8, 0x83, 0x0d, 0x36, 0xfd, 0x97, 0xca, + 0x8d, 0xe0, 0x0a, 0x34, 0x16, 0x56, 0xc0, 0xb2, 0xd0, 0x80, 0x14, 0x2e, 0xa3, 0x6c, 0xec, 0x0c, + 0x64, 0x82, 0xee, 0x51, 0x46, 0x21, 0x6e, 0x3b, 0x7a, 0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c0, 0x9e, 0xf5, 0x04, + 0x0b, 0xa3, 0xe3, 0xff, 0x09, 0x00, 0x00, 0xff, 0xff, 0x20, 0x45, 0x76, 0x91, 0x05, 0x2d, 0x00, + 0x00, + } + r := bytes.NewReader(gzipped) + gzipr, err := compress_gzip.NewReader(r) + if err != nil { + panic(err) + } + ungzipped, err := io_ioutil.ReadAll(gzipr) + if err != nil { + panic(err) + } + if err := github_com_gogo_protobuf_proto.Unmarshal(ungzipped, d); err != nil { + panic(err) + } + return d +} +func (this *Subby) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*Subby) + if !ok { + that2, ok := that.(Subby) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *Subby") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *Subby but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *Subby but is not nil && this == nil") + } + if this.Sub != that1.Sub { + return fmt.Errorf("Sub this(%v) Not Equal that(%v)", this.Sub, that1.Sub) + } + return nil +} +func (this *Subby) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*Subby) + if !ok { + that2, ok := that.(Subby) + 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.Sub != that1.Sub { + return false + } + return true +} +func (this *SampleOneOf) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*SampleOneOf) + if !ok { + that2, ok := that.(SampleOneOf) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *SampleOneOf") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *SampleOneOf but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *SampleOneOf but is not nil && this == nil") + } + if that1.TestOneof == nil { + if this.TestOneof != nil { + return fmt.Errorf("this.TestOneof != nil && that1.TestOneof == nil") + } + } else if this.TestOneof == nil { + return fmt.Errorf("this.TestOneof == nil && that1.TestOneof != nil") + } else if err := this.TestOneof.VerboseEqual(that1.TestOneof); err != nil { + return err + } + return nil +} +func (this *SampleOneOf_Field1) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*SampleOneOf_Field1) + if !ok { + that2, ok := that.(SampleOneOf_Field1) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *SampleOneOf_Field1") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *SampleOneOf_Field1 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *SampleOneOf_Field1 but is not nil && this == nil") + } + if this.Field1 != that1.Field1 { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) + } + return nil +} +func (this *SampleOneOf_Field2) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*SampleOneOf_Field2) + if !ok { + that2, ok := that.(SampleOneOf_Field2) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *SampleOneOf_Field2") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *SampleOneOf_Field2 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *SampleOneOf_Field2 but is not nil && this == nil") + } + if this.Field2 != that1.Field2 { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) + } + return nil +} +func (this *SampleOneOf_Field3) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*SampleOneOf_Field3) + if !ok { + that2, ok := that.(SampleOneOf_Field3) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *SampleOneOf_Field3") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *SampleOneOf_Field3 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *SampleOneOf_Field3 but is not nil && this == nil") + } + if this.Field3 != that1.Field3 { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", this.Field3, that1.Field3) + } + return nil +} +func (this *SampleOneOf_Field4) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*SampleOneOf_Field4) + if !ok { + that2, ok := that.(SampleOneOf_Field4) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *SampleOneOf_Field4") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *SampleOneOf_Field4 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *SampleOneOf_Field4 but is not nil && this == nil") + } + if this.Field4 != that1.Field4 { + return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", this.Field4, that1.Field4) + } + return nil +} +func (this *SampleOneOf_Field5) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*SampleOneOf_Field5) + if !ok { + that2, ok := that.(SampleOneOf_Field5) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *SampleOneOf_Field5") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *SampleOneOf_Field5 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *SampleOneOf_Field5 but is not nil && this == nil") + } + if this.Field5 != that1.Field5 { + return fmt.Errorf("Field5 this(%v) Not Equal that(%v)", this.Field5, that1.Field5) + } + return nil +} +func (this *SampleOneOf_Field6) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*SampleOneOf_Field6) + if !ok { + that2, ok := that.(SampleOneOf_Field6) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *SampleOneOf_Field6") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *SampleOneOf_Field6 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *SampleOneOf_Field6 but is not nil && this == nil") + } + if this.Field6 != that1.Field6 { + return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", this.Field6, that1.Field6) + } + return nil +} +func (this *SampleOneOf_Field7) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*SampleOneOf_Field7) + if !ok { + that2, ok := that.(SampleOneOf_Field7) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *SampleOneOf_Field7") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *SampleOneOf_Field7 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *SampleOneOf_Field7 but is not nil && this == nil") + } + if this.Field7 != that1.Field7 { + return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", this.Field7, that1.Field7) + } + return nil +} +func (this *SampleOneOf_Field8) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*SampleOneOf_Field8) + if !ok { + that2, ok := that.(SampleOneOf_Field8) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *SampleOneOf_Field8") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *SampleOneOf_Field8 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *SampleOneOf_Field8 but is not nil && this == nil") + } + if this.Field8 != that1.Field8 { + return fmt.Errorf("Field8 this(%v) Not Equal that(%v)", this.Field8, that1.Field8) + } + return nil +} +func (this *SampleOneOf_Field9) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*SampleOneOf_Field9) + if !ok { + that2, ok := that.(SampleOneOf_Field9) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *SampleOneOf_Field9") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *SampleOneOf_Field9 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *SampleOneOf_Field9 but is not nil && this == nil") + } + if this.Field9 != that1.Field9 { + return fmt.Errorf("Field9 this(%v) Not Equal that(%v)", this.Field9, that1.Field9) + } + return nil +} +func (this *SampleOneOf_Field10) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*SampleOneOf_Field10) + if !ok { + that2, ok := that.(SampleOneOf_Field10) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *SampleOneOf_Field10") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *SampleOneOf_Field10 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *SampleOneOf_Field10 but is not nil && this == nil") + } + if this.Field10 != that1.Field10 { + return fmt.Errorf("Field10 this(%v) Not Equal that(%v)", this.Field10, that1.Field10) + } + return nil +} +func (this *SampleOneOf_Field11) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*SampleOneOf_Field11) + if !ok { + that2, ok := that.(SampleOneOf_Field11) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *SampleOneOf_Field11") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *SampleOneOf_Field11 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *SampleOneOf_Field11 but is not nil && this == nil") + } + if this.Field11 != that1.Field11 { + return fmt.Errorf("Field11 this(%v) Not Equal that(%v)", this.Field11, that1.Field11) + } + return nil +} +func (this *SampleOneOf_Field12) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*SampleOneOf_Field12) + if !ok { + that2, ok := that.(SampleOneOf_Field12) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *SampleOneOf_Field12") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *SampleOneOf_Field12 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *SampleOneOf_Field12 but is not nil && this == nil") + } + if this.Field12 != that1.Field12 { + return fmt.Errorf("Field12 this(%v) Not Equal that(%v)", this.Field12, that1.Field12) + } + return nil +} +func (this *SampleOneOf_Field13) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*SampleOneOf_Field13) + if !ok { + that2, ok := that.(SampleOneOf_Field13) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *SampleOneOf_Field13") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *SampleOneOf_Field13 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *SampleOneOf_Field13 but is not nil && this == nil") + } + if this.Field13 != that1.Field13 { + return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", this.Field13, that1.Field13) + } + return nil +} +func (this *SampleOneOf_Field14) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*SampleOneOf_Field14) + if !ok { + that2, ok := that.(SampleOneOf_Field14) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *SampleOneOf_Field14") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *SampleOneOf_Field14 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *SampleOneOf_Field14 but is not nil && this == nil") + } + if this.Field14 != that1.Field14 { + return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", this.Field14, that1.Field14) + } + return nil +} +func (this *SampleOneOf_Field15) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*SampleOneOf_Field15) + if !ok { + that2, ok := that.(SampleOneOf_Field15) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *SampleOneOf_Field15") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *SampleOneOf_Field15 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *SampleOneOf_Field15 but is not nil && this == nil") + } + if !bytes.Equal(this.Field15, that1.Field15) { + return fmt.Errorf("Field15 this(%v) Not Equal that(%v)", this.Field15, that1.Field15) + } + return nil +} +func (this *SampleOneOf_SubMessage) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*SampleOneOf_SubMessage) + if !ok { + that2, ok := that.(SampleOneOf_SubMessage) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *SampleOneOf_SubMessage") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *SampleOneOf_SubMessage but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *SampleOneOf_SubMessage but is not nil && this == nil") + } + if !this.SubMessage.Equal(that1.SubMessage) { + return fmt.Errorf("SubMessage this(%v) Not Equal that(%v)", this.SubMessage, that1.SubMessage) + } + return nil +} +func (this *SampleOneOf) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*SampleOneOf) + if !ok { + that2, ok := that.(SampleOneOf) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + if this == nil { + return true + } + return false + } else if this == nil { + return false + } + if that1.TestOneof == nil { + if this.TestOneof != nil { + return false + } + } else if this.TestOneof == nil { + return false + } else if !this.TestOneof.Equal(that1.TestOneof) { + return false + } + return true +} +func (this *SampleOneOf_Field1) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*SampleOneOf_Field1) + if !ok { + that2, ok := that.(SampleOneOf_Field1) + 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.Field1 != that1.Field1 { + return false + } + return true +} +func (this *SampleOneOf_Field2) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*SampleOneOf_Field2) + if !ok { + that2, ok := that.(SampleOneOf_Field2) + 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.Field2 != that1.Field2 { + return false + } + return true +} +func (this *SampleOneOf_Field3) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*SampleOneOf_Field3) + if !ok { + that2, ok := that.(SampleOneOf_Field3) + 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.Field3 != that1.Field3 { + return false + } + return true +} +func (this *SampleOneOf_Field4) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*SampleOneOf_Field4) + if !ok { + that2, ok := that.(SampleOneOf_Field4) + 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.Field4 != that1.Field4 { + return false + } + return true +} +func (this *SampleOneOf_Field5) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*SampleOneOf_Field5) + if !ok { + that2, ok := that.(SampleOneOf_Field5) + 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.Field5 != that1.Field5 { + return false + } + return true +} +func (this *SampleOneOf_Field6) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*SampleOneOf_Field6) + if !ok { + that2, ok := that.(SampleOneOf_Field6) + 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.Field6 != that1.Field6 { + return false + } + return true +} +func (this *SampleOneOf_Field7) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*SampleOneOf_Field7) + if !ok { + that2, ok := that.(SampleOneOf_Field7) + 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.Field7 != that1.Field7 { + return false + } + return true +} +func (this *SampleOneOf_Field8) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*SampleOneOf_Field8) + if !ok { + that2, ok := that.(SampleOneOf_Field8) + 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.Field8 != that1.Field8 { + return false + } + return true +} +func (this *SampleOneOf_Field9) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*SampleOneOf_Field9) + if !ok { + that2, ok := that.(SampleOneOf_Field9) + 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.Field9 != that1.Field9 { + return false + } + return true +} +func (this *SampleOneOf_Field10) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*SampleOneOf_Field10) + if !ok { + that2, ok := that.(SampleOneOf_Field10) + 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.Field10 != that1.Field10 { + return false + } + return true +} +func (this *SampleOneOf_Field11) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*SampleOneOf_Field11) + if !ok { + that2, ok := that.(SampleOneOf_Field11) + 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.Field11 != that1.Field11 { + return false + } + return true +} +func (this *SampleOneOf_Field12) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*SampleOneOf_Field12) + if !ok { + that2, ok := that.(SampleOneOf_Field12) + 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.Field12 != that1.Field12 { + return false + } + return true +} +func (this *SampleOneOf_Field13) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*SampleOneOf_Field13) + if !ok { + that2, ok := that.(SampleOneOf_Field13) + 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.Field13 != that1.Field13 { + return false + } + return true +} +func (this *SampleOneOf_Field14) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*SampleOneOf_Field14) + if !ok { + that2, ok := that.(SampleOneOf_Field14) + 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.Field14 != that1.Field14 { + return false + } + return true +} +func (this *SampleOneOf_Field15) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*SampleOneOf_Field15) + if !ok { + that2, ok := that.(SampleOneOf_Field15) + 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.Field15, that1.Field15) { + return false + } + return true +} +func (this *SampleOneOf_SubMessage) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*SampleOneOf_SubMessage) + if !ok { + that2, ok := that.(SampleOneOf_SubMessage) + 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.SubMessage.Equal(that1.SubMessage) { + return false + } + return true +} +func (this *Subby) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&one.Subby{") + s = append(s, "Sub: "+fmt.Sprintf("%#v", this.Sub)+",\n") + s = append(s, "}") + return strings.Join(s, "") +} +func (this *SampleOneOf) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 20) + s = append(s, "&one.SampleOneOf{") + if this.TestOneof != nil { + s = append(s, "TestOneof: "+fmt.Sprintf("%#v", this.TestOneof)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *SampleOneOf_Field1) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.SampleOneOf_Field1{` + + `Field1:` + fmt.Sprintf("%#v", this.Field1) + `}`}, ", ") + return s +} +func (this *SampleOneOf_Field2) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.SampleOneOf_Field2{` + + `Field2:` + fmt.Sprintf("%#v", this.Field2) + `}`}, ", ") + return s +} +func (this *SampleOneOf_Field3) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.SampleOneOf_Field3{` + + `Field3:` + fmt.Sprintf("%#v", this.Field3) + `}`}, ", ") + return s +} +func (this *SampleOneOf_Field4) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.SampleOneOf_Field4{` + + `Field4:` + fmt.Sprintf("%#v", this.Field4) + `}`}, ", ") + return s +} +func (this *SampleOneOf_Field5) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.SampleOneOf_Field5{` + + `Field5:` + fmt.Sprintf("%#v", this.Field5) + `}`}, ", ") + return s +} +func (this *SampleOneOf_Field6) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.SampleOneOf_Field6{` + + `Field6:` + fmt.Sprintf("%#v", this.Field6) + `}`}, ", ") + return s +} +func (this *SampleOneOf_Field7) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.SampleOneOf_Field7{` + + `Field7:` + fmt.Sprintf("%#v", this.Field7) + `}`}, ", ") + return s +} +func (this *SampleOneOf_Field8) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.SampleOneOf_Field8{` + + `Field8:` + fmt.Sprintf("%#v", this.Field8) + `}`}, ", ") + return s +} +func (this *SampleOneOf_Field9) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.SampleOneOf_Field9{` + + `Field9:` + fmt.Sprintf("%#v", this.Field9) + `}`}, ", ") + return s +} +func (this *SampleOneOf_Field10) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.SampleOneOf_Field10{` + + `Field10:` + fmt.Sprintf("%#v", this.Field10) + `}`}, ", ") + return s +} +func (this *SampleOneOf_Field11) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.SampleOneOf_Field11{` + + `Field11:` + fmt.Sprintf("%#v", this.Field11) + `}`}, ", ") + return s +} +func (this *SampleOneOf_Field12) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.SampleOneOf_Field12{` + + `Field12:` + fmt.Sprintf("%#v", this.Field12) + `}`}, ", ") + return s +} +func (this *SampleOneOf_Field13) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.SampleOneOf_Field13{` + + `Field13:` + fmt.Sprintf("%#v", this.Field13) + `}`}, ", ") + return s +} +func (this *SampleOneOf_Field14) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.SampleOneOf_Field14{` + + `Field14:` + fmt.Sprintf("%#v", this.Field14) + `}`}, ", ") + return s +} +func (this *SampleOneOf_Field15) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.SampleOneOf_Field15{` + + `Field15:` + fmt.Sprintf("%#v", this.Field15) + `}`}, ", ") + return s +} +func (this *SampleOneOf_SubMessage) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.SampleOneOf_SubMessage{` + + `SubMessage:` + fmt.Sprintf("%#v", this.SubMessage) + `}`}, ", ") + return s +} +func valueToGoStringOne(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 extensionToGoStringOne(e map[int32]github_com_gogo_protobuf_proto.Extension) string { + if e == nil { + return "nil" + } + s := "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 +} +func (m *Subby) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *Subby) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Sub) > 0 { + data[i] = 0xa + i++ + i = encodeVarintOne(data, i, uint64(len(m.Sub))) + i += copy(data[i:], m.Sub) + } + return i, nil +} + +func (m *SampleOneOf) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *SampleOneOf) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.TestOneof != nil { + nn1, err := m.TestOneof.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += nn1 + } + return i, nil +} + +func (m *SampleOneOf_Field1) MarshalTo(data []byte) (int, error) { + i := 0 + data[i] = 0x9 + i++ + i = encodeFixed64One(data, i, uint64(math.Float64bits(float64(m.Field1)))) + return i, nil +} +func (m *SampleOneOf_Field2) MarshalTo(data []byte) (int, error) { + i := 0 + data[i] = 0x15 + i++ + i = encodeFixed32One(data, i, uint32(math.Float32bits(float32(m.Field2)))) + return i, nil +} +func (m *SampleOneOf_Field3) MarshalTo(data []byte) (int, error) { + i := 0 + data[i] = 0x18 + i++ + i = encodeVarintOne(data, i, uint64(m.Field3)) + return i, nil +} +func (m *SampleOneOf_Field4) MarshalTo(data []byte) (int, error) { + i := 0 + data[i] = 0x20 + i++ + i = encodeVarintOne(data, i, uint64(m.Field4)) + return i, nil +} +func (m *SampleOneOf_Field5) MarshalTo(data []byte) (int, error) { + i := 0 + data[i] = 0x28 + i++ + i = encodeVarintOne(data, i, uint64(m.Field5)) + return i, nil +} +func (m *SampleOneOf_Field6) MarshalTo(data []byte) (int, error) { + i := 0 + data[i] = 0x30 + i++ + i = encodeVarintOne(data, i, uint64(m.Field6)) + return i, nil +} +func (m *SampleOneOf_Field7) MarshalTo(data []byte) (int, error) { + i := 0 + data[i] = 0x38 + i++ + i = encodeVarintOne(data, i, uint64((uint32(m.Field7)<<1)^uint32((m.Field7>>31)))) + return i, nil +} +func (m *SampleOneOf_Field8) MarshalTo(data []byte) (int, error) { + i := 0 + data[i] = 0x40 + i++ + i = encodeVarintOne(data, i, uint64((uint64(m.Field8)<<1)^uint64((m.Field8>>63)))) + return i, nil +} +func (m *SampleOneOf_Field9) MarshalTo(data []byte) (int, error) { + i := 0 + data[i] = 0x4d + i++ + i = encodeFixed32One(data, i, uint32(m.Field9)) + return i, nil +} +func (m *SampleOneOf_Field10) MarshalTo(data []byte) (int, error) { + i := 0 + data[i] = 0x55 + i++ + i = encodeFixed32One(data, i, uint32(m.Field10)) + return i, nil +} +func (m *SampleOneOf_Field11) MarshalTo(data []byte) (int, error) { + i := 0 + data[i] = 0x59 + i++ + i = encodeFixed64One(data, i, uint64(m.Field11)) + return i, nil +} +func (m *SampleOneOf_Field12) MarshalTo(data []byte) (int, error) { + i := 0 + data[i] = 0x61 + i++ + i = encodeFixed64One(data, i, uint64(m.Field12)) + return i, nil +} +func (m *SampleOneOf_Field13) MarshalTo(data []byte) (int, error) { + i := 0 + data[i] = 0x68 + i++ + if m.Field13 { + data[i] = 1 + } else { + data[i] = 0 + } + i++ + return i, nil +} +func (m *SampleOneOf_Field14) MarshalTo(data []byte) (int, error) { + i := 0 + data[i] = 0x72 + i++ + i = encodeVarintOne(data, i, uint64(len(m.Field14))) + i += copy(data[i:], m.Field14) + return i, nil +} +func (m *SampleOneOf_Field15) MarshalTo(data []byte) (int, error) { + i := 0 + if m.Field15 != nil { + data[i] = 0x7a + i++ + i = encodeVarintOne(data, i, uint64(len(m.Field15))) + i += copy(data[i:], m.Field15) + } + return i, nil +} +func (m *SampleOneOf_SubMessage) MarshalTo(data []byte) (int, error) { + i := 0 + if m.SubMessage != nil { + data[i] = 0x82 + i++ + data[i] = 0x1 + i++ + i = encodeVarintOne(data, i, uint64(m.SubMessage.Size())) + n2, err := m.SubMessage.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n2 + } + return i, nil +} +func encodeFixed64One(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 encodeFixed32One(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 encodeVarintOne(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 NewPopulatedSubby(r randyOne, easy bool) *Subby { + this := &Subby{} + this.Sub = randStringOne(r) + if !easy && r.Intn(10) != 0 { + } + return this +} + +func NewPopulatedSampleOneOf(r randyOne, easy bool) *SampleOneOf { + this := &SampleOneOf{} + oneofNumber_TestOneof := []int32{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}[r.Intn(16)] + switch oneofNumber_TestOneof { + case 1: + this.TestOneof = NewPopulatedSampleOneOf_Field1(r, easy) + case 2: + this.TestOneof = NewPopulatedSampleOneOf_Field2(r, easy) + case 3: + this.TestOneof = NewPopulatedSampleOneOf_Field3(r, easy) + case 4: + this.TestOneof = NewPopulatedSampleOneOf_Field4(r, easy) + case 5: + this.TestOneof = NewPopulatedSampleOneOf_Field5(r, easy) + case 6: + this.TestOneof = NewPopulatedSampleOneOf_Field6(r, easy) + case 7: + this.TestOneof = NewPopulatedSampleOneOf_Field7(r, easy) + case 8: + this.TestOneof = NewPopulatedSampleOneOf_Field8(r, easy) + case 9: + this.TestOneof = NewPopulatedSampleOneOf_Field9(r, easy) + case 10: + this.TestOneof = NewPopulatedSampleOneOf_Field10(r, easy) + case 11: + this.TestOneof = NewPopulatedSampleOneOf_Field11(r, easy) + case 12: + this.TestOneof = NewPopulatedSampleOneOf_Field12(r, easy) + case 13: + this.TestOneof = NewPopulatedSampleOneOf_Field13(r, easy) + case 14: + this.TestOneof = NewPopulatedSampleOneOf_Field14(r, easy) + case 15: + this.TestOneof = NewPopulatedSampleOneOf_Field15(r, easy) + case 16: + this.TestOneof = NewPopulatedSampleOneOf_SubMessage(r, easy) + } + if !easy && r.Intn(10) != 0 { + } + return this +} + +func NewPopulatedSampleOneOf_Field1(r randyOne, easy bool) *SampleOneOf_Field1 { + this := &SampleOneOf_Field1{} + this.Field1 = float64(r.Float64()) + if r.Intn(2) == 0 { + this.Field1 *= -1 + } + return this +} +func NewPopulatedSampleOneOf_Field2(r randyOne, easy bool) *SampleOneOf_Field2 { + this := &SampleOneOf_Field2{} + this.Field2 = float32(r.Float32()) + if r.Intn(2) == 0 { + this.Field2 *= -1 + } + return this +} +func NewPopulatedSampleOneOf_Field3(r randyOne, easy bool) *SampleOneOf_Field3 { + this := &SampleOneOf_Field3{} + this.Field3 = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Field3 *= -1 + } + return this +} +func NewPopulatedSampleOneOf_Field4(r randyOne, easy bool) *SampleOneOf_Field4 { + this := &SampleOneOf_Field4{} + this.Field4 = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Field4 *= -1 + } + return this +} +func NewPopulatedSampleOneOf_Field5(r randyOne, easy bool) *SampleOneOf_Field5 { + this := &SampleOneOf_Field5{} + this.Field5 = uint32(r.Uint32()) + return this +} +func NewPopulatedSampleOneOf_Field6(r randyOne, easy bool) *SampleOneOf_Field6 { + this := &SampleOneOf_Field6{} + this.Field6 = uint64(uint64(r.Uint32())) + return this +} +func NewPopulatedSampleOneOf_Field7(r randyOne, easy bool) *SampleOneOf_Field7 { + this := &SampleOneOf_Field7{} + this.Field7 = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Field7 *= -1 + } + return this +} +func NewPopulatedSampleOneOf_Field8(r randyOne, easy bool) *SampleOneOf_Field8 { + this := &SampleOneOf_Field8{} + this.Field8 = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Field8 *= -1 + } + return this +} +func NewPopulatedSampleOneOf_Field9(r randyOne, easy bool) *SampleOneOf_Field9 { + this := &SampleOneOf_Field9{} + this.Field9 = uint32(r.Uint32()) + return this +} +func NewPopulatedSampleOneOf_Field10(r randyOne, easy bool) *SampleOneOf_Field10 { + this := &SampleOneOf_Field10{} + this.Field10 = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Field10 *= -1 + } + return this +} +func NewPopulatedSampleOneOf_Field11(r randyOne, easy bool) *SampleOneOf_Field11 { + this := &SampleOneOf_Field11{} + this.Field11 = uint64(uint64(r.Uint32())) + return this +} +func NewPopulatedSampleOneOf_Field12(r randyOne, easy bool) *SampleOneOf_Field12 { + this := &SampleOneOf_Field12{} + this.Field12 = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Field12 *= -1 + } + return this +} +func NewPopulatedSampleOneOf_Field13(r randyOne, easy bool) *SampleOneOf_Field13 { + this := &SampleOneOf_Field13{} + this.Field13 = bool(bool(r.Intn(2) == 0)) + return this +} +func NewPopulatedSampleOneOf_Field14(r randyOne, easy bool) *SampleOneOf_Field14 { + this := &SampleOneOf_Field14{} + this.Field14 = randStringOne(r) + return this +} +func NewPopulatedSampleOneOf_Field15(r randyOne, easy bool) *SampleOneOf_Field15 { + this := &SampleOneOf_Field15{} + v1 := r.Intn(100) + this.Field15 = make([]byte, v1) + for i := 0; i < v1; i++ { + this.Field15[i] = byte(r.Intn(256)) + } + return this +} +func NewPopulatedSampleOneOf_SubMessage(r randyOne, easy bool) *SampleOneOf_SubMessage { + this := &SampleOneOf_SubMessage{} + this.SubMessage = NewPopulatedSubby(r, easy) + return this +} + +type randyOne interface { + Float32() float32 + Float64() float64 + Int63() int64 + Int31() int32 + Uint32() uint32 + Intn(n int) int +} + +func randUTF8RuneOne(r randyOne) 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 randStringOne(r randyOne) string { + v2 := r.Intn(100) + tmps := make([]rune, v2) + for i := 0; i < v2; i++ { + tmps[i] = randUTF8RuneOne(r) + } + return string(tmps) +} +func randUnrecognizedOne(r randyOne, 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 = randFieldOne(data, r, fieldNumber, wire) + } + return data +} +func randFieldOne(data []byte, r randyOne, fieldNumber int, wire int) []byte { + key := uint32(fieldNumber)<<3 | uint32(wire) + switch wire { + case 0: + data = encodeVarintPopulateOne(data, uint64(key)) + v3 := r.Int63() + if r.Intn(2) == 0 { + v3 *= -1 + } + data = encodeVarintPopulateOne(data, uint64(v3)) + case 1: + data = encodeVarintPopulateOne(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 = encodeVarintPopulateOne(data, uint64(key)) + ll := r.Intn(100) + data = encodeVarintPopulateOne(data, uint64(ll)) + for j := 0; j < ll; j++ { + data = append(data, byte(r.Intn(256))) + } + default: + data = encodeVarintPopulateOne(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 encodeVarintPopulateOne(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 *Subby) Size() (n int) { + var l int + _ = l + l = len(m.Sub) + if l > 0 { + n += 1 + l + sovOne(uint64(l)) + } + return n +} + +func (m *SampleOneOf) Size() (n int) { + var l int + _ = l + if m.TestOneof != nil { + n += m.TestOneof.Size() + } + return n +} + +func (m *SampleOneOf_Field1) Size() (n int) { + var l int + _ = l + n += 9 + return n +} +func (m *SampleOneOf_Field2) Size() (n int) { + var l int + _ = l + n += 5 + return n +} +func (m *SampleOneOf_Field3) Size() (n int) { + var l int + _ = l + n += 1 + sovOne(uint64(m.Field3)) + return n +} +func (m *SampleOneOf_Field4) Size() (n int) { + var l int + _ = l + n += 1 + sovOne(uint64(m.Field4)) + return n +} +func (m *SampleOneOf_Field5) Size() (n int) { + var l int + _ = l + n += 1 + sovOne(uint64(m.Field5)) + return n +} +func (m *SampleOneOf_Field6) Size() (n int) { + var l int + _ = l + n += 1 + sovOne(uint64(m.Field6)) + return n +} +func (m *SampleOneOf_Field7) Size() (n int) { + var l int + _ = l + n += 1 + sozOne(uint64(m.Field7)) + return n +} +func (m *SampleOneOf_Field8) Size() (n int) { + var l int + _ = l + n += 1 + sozOne(uint64(m.Field8)) + return n +} +func (m *SampleOneOf_Field9) Size() (n int) { + var l int + _ = l + n += 5 + return n +} +func (m *SampleOneOf_Field10) Size() (n int) { + var l int + _ = l + n += 5 + return n +} +func (m *SampleOneOf_Field11) Size() (n int) { + var l int + _ = l + n += 9 + return n +} +func (m *SampleOneOf_Field12) Size() (n int) { + var l int + _ = l + n += 9 + return n +} +func (m *SampleOneOf_Field13) Size() (n int) { + var l int + _ = l + n += 2 + return n +} +func (m *SampleOneOf_Field14) Size() (n int) { + var l int + _ = l + l = len(m.Field14) + n += 1 + l + sovOne(uint64(l)) + return n +} +func (m *SampleOneOf_Field15) Size() (n int) { + var l int + _ = l + if m.Field15 != nil { + l = len(m.Field15) + n += 1 + l + sovOne(uint64(l)) + } + return n +} +func (m *SampleOneOf_SubMessage) Size() (n int) { + var l int + _ = l + if m.SubMessage != nil { + l = m.SubMessage.Size() + n += 2 + l + sovOne(uint64(l)) + } + return n +} + +func sovOne(x uint64) (n int) { + for { + n++ + x >>= 7 + if x == 0 { + break + } + } + return n +} +func sozOne(x uint64) (n int) { + return sovOne(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (this *Subby) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&Subby{`, + `Sub:` + fmt.Sprintf("%v", this.Sub) + `,`, + `}`, + }, "") + return s +} +func (this *SampleOneOf) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&SampleOneOf{`, + `TestOneof:` + fmt.Sprintf("%v", this.TestOneof) + `,`, + `}`, + }, "") + return s +} +func (this *SampleOneOf_Field1) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&SampleOneOf_Field1{`, + `Field1:` + fmt.Sprintf("%v", this.Field1) + `,`, + `}`, + }, "") + return s +} +func (this *SampleOneOf_Field2) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&SampleOneOf_Field2{`, + `Field2:` + fmt.Sprintf("%v", this.Field2) + `,`, + `}`, + }, "") + return s +} +func (this *SampleOneOf_Field3) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&SampleOneOf_Field3{`, + `Field3:` + fmt.Sprintf("%v", this.Field3) + `,`, + `}`, + }, "") + return s +} +func (this *SampleOneOf_Field4) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&SampleOneOf_Field4{`, + `Field4:` + fmt.Sprintf("%v", this.Field4) + `,`, + `}`, + }, "") + return s +} +func (this *SampleOneOf_Field5) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&SampleOneOf_Field5{`, + `Field5:` + fmt.Sprintf("%v", this.Field5) + `,`, + `}`, + }, "") + return s +} +func (this *SampleOneOf_Field6) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&SampleOneOf_Field6{`, + `Field6:` + fmt.Sprintf("%v", this.Field6) + `,`, + `}`, + }, "") + return s +} +func (this *SampleOneOf_Field7) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&SampleOneOf_Field7{`, + `Field7:` + fmt.Sprintf("%v", this.Field7) + `,`, + `}`, + }, "") + return s +} +func (this *SampleOneOf_Field8) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&SampleOneOf_Field8{`, + `Field8:` + fmt.Sprintf("%v", this.Field8) + `,`, + `}`, + }, "") + return s +} +func (this *SampleOneOf_Field9) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&SampleOneOf_Field9{`, + `Field9:` + fmt.Sprintf("%v", this.Field9) + `,`, + `}`, + }, "") + return s +} +func (this *SampleOneOf_Field10) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&SampleOneOf_Field10{`, + `Field10:` + fmt.Sprintf("%v", this.Field10) + `,`, + `}`, + }, "") + return s +} +func (this *SampleOneOf_Field11) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&SampleOneOf_Field11{`, + `Field11:` + fmt.Sprintf("%v", this.Field11) + `,`, + `}`, + }, "") + return s +} +func (this *SampleOneOf_Field12) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&SampleOneOf_Field12{`, + `Field12:` + fmt.Sprintf("%v", this.Field12) + `,`, + `}`, + }, "") + return s +} +func (this *SampleOneOf_Field13) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&SampleOneOf_Field13{`, + `Field13:` + fmt.Sprintf("%v", this.Field13) + `,`, + `}`, + }, "") + return s +} +func (this *SampleOneOf_Field14) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&SampleOneOf_Field14{`, + `Field14:` + fmt.Sprintf("%v", this.Field14) + `,`, + `}`, + }, "") + return s +} +func (this *SampleOneOf_Field15) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&SampleOneOf_Field15{`, + `Field15:` + fmt.Sprintf("%v", this.Field15) + `,`, + `}`, + }, "") + return s +} +func (this *SampleOneOf_SubMessage) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&SampleOneOf_SubMessage{`, + `SubMessage:` + strings.Replace(fmt.Sprintf("%v", this.SubMessage), "Subby", "Subby", 1) + `,`, + `}`, + }, "") + return s +} +func valueToStringOne(v interface{}) string { + rv := reflect.ValueOf(v) + if rv.IsNil() { + return "nil" + } + pv := reflect.Indirect(rv).Interface() + return fmt.Sprintf("*%v", pv) +} + +var fileDescriptorOne = []byte{ + // 381 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0x44, 0xd2, 0xbd, 0x6e, 0xdb, 0x30, + 0x10, 0x07, 0x70, 0x2b, 0x8a, 0xa5, 0x84, 0x72, 0x1a, 0x57, 0xd3, 0xd5, 0x83, 0x50, 0x64, 0xea, + 0x12, 0x2b, 0xd6, 0x47, 0x3e, 0xd6, 0xa0, 0x28, 0xba, 0x14, 0x01, 0x92, 0x07, 0x08, 0xa4, 0x96, + 0x52, 0x02, 0x58, 0xa1, 0x61, 0x49, 0x43, 0x37, 0x3f, 0x4e, 0xc7, 0x8e, 0x7d, 0x04, 0x8f, 0x1e, + 0x3b, 0x74, 0xa8, 0xdd, 0xa5, 0xa3, 0x47, 0x8f, 0xf9, 0x9b, 0x02, 0x8e, 0xc3, 0x1f, 0x77, 0x87, + 0xdf, 0x69, 0xa0, 0x48, 0x31, 0xfa, 0xaa, 0xaa, 0x5c, 0xd5, 0x61, 0x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 0x96, 0xd0, 0x9b, 0xfd, 0xff, 0x37, 0x96, 0x18, 0x4b, 0xe9, 0x14, 0x36, 0x30, 0x96, 0xfa, + 0xe7, 0xc2, 0xc3, 0x45, 0x3d, 0x56, 0xb2, 0xae, 0xb3, 0x52, 0xd2, 0x10, 0xee, 0x45, 0x62, 0xbc, + 0x7f, 0x11, 0xfa, 0x52, 0xb1, 0x2b, 0xb0, 0xf0, 0xa5, 0xf3, 0xdb, 0x81, 0x10, 0x8d, 0xac, 0x9b, + 0x47, 0xb8, 0x2a, 0x6e, 0x3f, 0x2e, 0xd7, 0x41, 0x6f, 0x85, 0xfc, 0x46, 0xfe, 0xae, 0x03, 0x6b, + 0x8b, 0xec, 0x90, 0xc5, 0x26, 0xb0, 0x7e, 0x20, 0x3f, 0x91, 0x5f, 0xc8, 0x12, 0x59, 0x6d, 0xb0, + 0x83, 0xfa, 0x1f, 0x75, 0x8b, 0xba, 0x43, 0x5d, 0xfc, 0x0b, 0x7a, 0xb9, 0xa3, 0x9f, 0x51, 0xfc, + 0x1a, 0x00, 0x00, 0xff, 0xff, 0xed, 0x24, 0x6f, 0xbe, 0x98, 0x02, 0x00, 0x00, +} diff --git a/vendor/github.com/gogo/protobuf/test/oneof3/combos/marshaler/one.proto b/vendor/github.com/gogo/protobuf/test/oneof3/combos/marshaler/one.proto new file mode 100644 index 000000000..e8f562ebd --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/oneof3/combos/marshaler/one.proto @@ -0,0 +1,80 @@ +// Copyright (c) 2013, Vastech SA (PTY) LTD. All rights reserved. +// http://github.com/gogo/protobuf/gogoproto +// +// 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 = "proto3"; + +package one; + +import "github.com/gogo/protobuf/gogoproto/gogo.proto"; + +option (gogoproto.goproto_stringer_all) = false; +option (gogoproto.goproto_enum_prefix_all) = false; +option (gogoproto.goproto_getters_all) = false; + +option (gogoproto.equal_all) = true; +option (gogoproto.verbose_equal_all) = true; +option (gogoproto.stringer_all) = true; +option (gogoproto.gostring_all) = true; +option (gogoproto.description_all) = true; + +option (gogoproto.testgen_all) = true; +option (gogoproto.populate_all) = true; +option (gogoproto.unmarshaler_all) = false; +option (gogoproto.marshaler_all) = true; +option (gogoproto.sizer_all) = true; + +option (gogoproto.goproto_enum_stringer_all) = false; +option (gogoproto.enum_stringer_all) = true; + +option (gogoproto.unsafe_marshaler_all) = false; +option (gogoproto.unsafe_unmarshaler_all) = false; + +message Subby { + string sub = 1; +} + +message SampleOneOf { + oneof test_oneof { + double Field1 = 1; + float Field2 = 2; + int32 Field3 = 3; + int64 Field4 = 4; + uint32 Field5 = 5; + uint64 Field6 = 6; + sint32 Field7 = 7; + sint64 Field8 = 8; + fixed32 Field9 = 9; + sfixed32 Field10 = 10; + fixed64 Field11 = 11; + sfixed64 Field12 = 12; + bool Field13 = 13; + string Field14 = 14; + bytes Field15 = 15; + Subby sub_message = 16; + } +} + + diff --git a/vendor/github.com/gogo/protobuf/test/oneof3/combos/marshaler/onepb_test.go b/vendor/github.com/gogo/protobuf/test/oneof3/combos/marshaler/onepb_test.go new file mode 100644 index 000000000..3b3602c5e --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/oneof3/combos/marshaler/onepb_test.go @@ -0,0 +1,389 @@ +// Code generated by protoc-gen-gogo. +// source: combos/marshaler/one.proto +// DO NOT EDIT! + +/* +Package one is a generated protocol buffer package. + +It is generated from these files: + combos/marshaler/one.proto + +It has these top-level messages: + Subby + SampleOneOf +*/ +package one + +import testing "testing" +import math_rand "math/rand" +import time "time" +import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" +import github_com_gogo_protobuf_jsonpb "github.com/gogo/protobuf/jsonpb" +import fmt "fmt" +import go_parser "go/parser" +import proto "github.com/gogo/protobuf/proto" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +func TestSubbyProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedSubby(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Subby{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestSubbyMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedSubby(popr, false) + size := p.Size() + data := make([]byte, size) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(data) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Subby{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestSampleOneOfProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedSampleOneOf(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &SampleOneOf{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestSampleOneOfMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedSampleOneOf(popr, false) + size := p.Size() + data := make([]byte, size) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(data) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &SampleOneOf{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestSubbyJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedSubby(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Subby{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestSampleOneOfJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedSampleOneOf(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &SampleOneOf{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestSubbyProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedSubby(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &Subby{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestSubbyProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedSubby(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &Subby{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestSampleOneOfProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedSampleOneOf(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &SampleOneOf{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestSampleOneOfProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedSampleOneOf(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &SampleOneOf{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestOneDescription(t *testing.T) { + OneDescription() +} +func TestSubbyVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedSubby(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &Subby{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestSampleOneOfVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedSampleOneOf(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &SampleOneOf{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestSubbyGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedSubby(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestSampleOneOfGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedSampleOneOf(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestSubbySize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedSubby(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func TestSampleOneOfSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedSampleOneOf(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func TestSubbyStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedSubby(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestSampleOneOfStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedSampleOneOf(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} + +//These tests are generated by github.com/gogo/protobuf/plugin/testgen diff --git a/vendor/github.com/gogo/protobuf/test/oneof3/combos/neither/one.pb.go b/vendor/github.com/gogo/protobuf/test/oneof3/combos/neither/one.pb.go new file mode 100644 index 000000000..bb6188817 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/oneof3/combos/neither/one.pb.go @@ -0,0 +1,2638 @@ +// Code generated by protoc-gen-gogo. +// source: combos/neither/one.proto +// DO NOT EDIT! + +/* +Package one is a generated protocol buffer package. + +It is generated from these files: + combos/neither/one.proto + +It has these top-level messages: + Subby + SampleOneOf +*/ +package one + +import proto "github.com/gogo/protobuf/proto" +import fmt "fmt" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" + +import github_com_gogo_protobuf_protoc_gen_gogo_descriptor "github.com/gogo/protobuf/protoc-gen-gogo/descriptor" +import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" +import compress_gzip "compress/gzip" +import bytes "bytes" +import io_ioutil "io/ioutil" + +import strings "strings" +import sort "sort" +import strconv "strconv" +import reflect "reflect" + +// 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. +const _ = proto.GoGoProtoPackageIsVersion1 + +type Subby struct { + Sub string `protobuf:"bytes,1,opt,name=sub,proto3" json:"sub,omitempty"` +} + +func (m *Subby) Reset() { *m = Subby{} } +func (*Subby) ProtoMessage() {} +func (*Subby) Descriptor() ([]byte, []int) { return fileDescriptorOne, []int{0} } + +type SampleOneOf struct { + // Types that are valid to be assigned to TestOneof: + // *SampleOneOf_Field1 + // *SampleOneOf_Field2 + // *SampleOneOf_Field3 + // *SampleOneOf_Field4 + // *SampleOneOf_Field5 + // *SampleOneOf_Field6 + // *SampleOneOf_Field7 + // *SampleOneOf_Field8 + // *SampleOneOf_Field9 + // *SampleOneOf_Field10 + // *SampleOneOf_Field11 + // *SampleOneOf_Field12 + // *SampleOneOf_Field13 + // *SampleOneOf_Field14 + // *SampleOneOf_Field15 + // *SampleOneOf_SubMessage + TestOneof isSampleOneOf_TestOneof `protobuf_oneof:"test_oneof"` +} + +func (m *SampleOneOf) Reset() { *m = SampleOneOf{} } +func (*SampleOneOf) ProtoMessage() {} +func (*SampleOneOf) Descriptor() ([]byte, []int) { return fileDescriptorOne, []int{1} } + +type isSampleOneOf_TestOneof interface { + isSampleOneOf_TestOneof() + Equal(interface{}) bool + VerboseEqual(interface{}) error + Size() int +} + +type SampleOneOf_Field1 struct { + Field1 float64 `protobuf:"fixed64,1,opt,name=Field1,json=field1,proto3,oneof"` +} +type SampleOneOf_Field2 struct { + Field2 float32 `protobuf:"fixed32,2,opt,name=Field2,json=field2,proto3,oneof"` +} +type SampleOneOf_Field3 struct { + Field3 int32 `protobuf:"varint,3,opt,name=Field3,json=field3,proto3,oneof"` +} +type SampleOneOf_Field4 struct { + Field4 int64 `protobuf:"varint,4,opt,name=Field4,json=field4,proto3,oneof"` +} +type SampleOneOf_Field5 struct { + Field5 uint32 `protobuf:"varint,5,opt,name=Field5,json=field5,proto3,oneof"` +} +type SampleOneOf_Field6 struct { + Field6 uint64 `protobuf:"varint,6,opt,name=Field6,json=field6,proto3,oneof"` +} +type SampleOneOf_Field7 struct { + Field7 int32 `protobuf:"zigzag32,7,opt,name=Field7,json=field7,proto3,oneof"` +} +type SampleOneOf_Field8 struct { + Field8 int64 `protobuf:"zigzag64,8,opt,name=Field8,json=field8,proto3,oneof"` +} +type SampleOneOf_Field9 struct { + Field9 uint32 `protobuf:"fixed32,9,opt,name=Field9,json=field9,proto3,oneof"` +} +type SampleOneOf_Field10 struct { + Field10 int32 `protobuf:"fixed32,10,opt,name=Field10,json=field10,proto3,oneof"` +} +type SampleOneOf_Field11 struct { + Field11 uint64 `protobuf:"fixed64,11,opt,name=Field11,json=field11,proto3,oneof"` +} +type SampleOneOf_Field12 struct { + Field12 int64 `protobuf:"fixed64,12,opt,name=Field12,json=field12,proto3,oneof"` +} +type SampleOneOf_Field13 struct { + Field13 bool `protobuf:"varint,13,opt,name=Field13,json=field13,proto3,oneof"` +} +type SampleOneOf_Field14 struct { + Field14 string `protobuf:"bytes,14,opt,name=Field14,json=field14,proto3,oneof"` +} +type SampleOneOf_Field15 struct { + Field15 []byte `protobuf:"bytes,15,opt,name=Field15,json=field15,proto3,oneof"` +} +type SampleOneOf_SubMessage struct { + SubMessage *Subby `protobuf:"bytes,16,opt,name=sub_message,json=subMessage,oneof"` +} + +func (*SampleOneOf_Field1) isSampleOneOf_TestOneof() {} +func (*SampleOneOf_Field2) isSampleOneOf_TestOneof() {} +func (*SampleOneOf_Field3) isSampleOneOf_TestOneof() {} +func (*SampleOneOf_Field4) isSampleOneOf_TestOneof() {} +func (*SampleOneOf_Field5) isSampleOneOf_TestOneof() {} +func (*SampleOneOf_Field6) isSampleOneOf_TestOneof() {} +func (*SampleOneOf_Field7) isSampleOneOf_TestOneof() {} +func (*SampleOneOf_Field8) isSampleOneOf_TestOneof() {} +func (*SampleOneOf_Field9) isSampleOneOf_TestOneof() {} +func (*SampleOneOf_Field10) isSampleOneOf_TestOneof() {} +func (*SampleOneOf_Field11) isSampleOneOf_TestOneof() {} +func (*SampleOneOf_Field12) isSampleOneOf_TestOneof() {} +func (*SampleOneOf_Field13) isSampleOneOf_TestOneof() {} +func (*SampleOneOf_Field14) isSampleOneOf_TestOneof() {} +func (*SampleOneOf_Field15) isSampleOneOf_TestOneof() {} +func (*SampleOneOf_SubMessage) isSampleOneOf_TestOneof() {} + +func (m *SampleOneOf) GetTestOneof() isSampleOneOf_TestOneof { + if m != nil { + return m.TestOneof + } + return nil +} + +func (m *SampleOneOf) GetField1() float64 { + if x, ok := m.GetTestOneof().(*SampleOneOf_Field1); ok { + return x.Field1 + } + return 0 +} + +func (m *SampleOneOf) GetField2() float32 { + if x, ok := m.GetTestOneof().(*SampleOneOf_Field2); ok { + return x.Field2 + } + return 0 +} + +func (m *SampleOneOf) GetField3() int32 { + if x, ok := m.GetTestOneof().(*SampleOneOf_Field3); ok { + return x.Field3 + } + return 0 +} + +func (m *SampleOneOf) GetField4() int64 { + if x, ok := m.GetTestOneof().(*SampleOneOf_Field4); ok { + return x.Field4 + } + return 0 +} + +func (m *SampleOneOf) GetField5() uint32 { + if x, ok := m.GetTestOneof().(*SampleOneOf_Field5); ok { + return x.Field5 + } + return 0 +} + +func (m *SampleOneOf) GetField6() uint64 { + if x, ok := m.GetTestOneof().(*SampleOneOf_Field6); ok { + return x.Field6 + } + return 0 +} + +func (m *SampleOneOf) GetField7() int32 { + if x, ok := m.GetTestOneof().(*SampleOneOf_Field7); ok { + return x.Field7 + } + return 0 +} + +func (m *SampleOneOf) GetField8() int64 { + if x, ok := m.GetTestOneof().(*SampleOneOf_Field8); ok { + return x.Field8 + } + return 0 +} + +func (m *SampleOneOf) GetField9() uint32 { + if x, ok := m.GetTestOneof().(*SampleOneOf_Field9); ok { + return x.Field9 + } + return 0 +} + +func (m *SampleOneOf) GetField10() int32 { + if x, ok := m.GetTestOneof().(*SampleOneOf_Field10); ok { + return x.Field10 + } + return 0 +} + +func (m *SampleOneOf) GetField11() uint64 { + if x, ok := m.GetTestOneof().(*SampleOneOf_Field11); ok { + return x.Field11 + } + return 0 +} + +func (m *SampleOneOf) GetField12() int64 { + if x, ok := m.GetTestOneof().(*SampleOneOf_Field12); ok { + return x.Field12 + } + return 0 +} + +func (m *SampleOneOf) GetField13() bool { + if x, ok := m.GetTestOneof().(*SampleOneOf_Field13); ok { + return x.Field13 + } + return false +} + +func (m *SampleOneOf) GetField14() string { + if x, ok := m.GetTestOneof().(*SampleOneOf_Field14); ok { + return x.Field14 + } + return "" +} + +func (m *SampleOneOf) GetField15() []byte { + if x, ok := m.GetTestOneof().(*SampleOneOf_Field15); ok { + return x.Field15 + } + return nil +} + +func (m *SampleOneOf) GetSubMessage() *Subby { + if x, ok := m.GetTestOneof().(*SampleOneOf_SubMessage); ok { + return x.SubMessage + } + return nil +} + +// XXX_OneofFuncs is for the internal use of the proto package. +func (*SampleOneOf) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{}) { + return _SampleOneOf_OneofMarshaler, _SampleOneOf_OneofUnmarshaler, _SampleOneOf_OneofSizer, []interface{}{ + (*SampleOneOf_Field1)(nil), + (*SampleOneOf_Field2)(nil), + (*SampleOneOf_Field3)(nil), + (*SampleOneOf_Field4)(nil), + (*SampleOneOf_Field5)(nil), + (*SampleOneOf_Field6)(nil), + (*SampleOneOf_Field7)(nil), + (*SampleOneOf_Field8)(nil), + (*SampleOneOf_Field9)(nil), + (*SampleOneOf_Field10)(nil), + (*SampleOneOf_Field11)(nil), + (*SampleOneOf_Field12)(nil), + (*SampleOneOf_Field13)(nil), + (*SampleOneOf_Field14)(nil), + (*SampleOneOf_Field15)(nil), + (*SampleOneOf_SubMessage)(nil), + } +} + +func _SampleOneOf_OneofMarshaler(msg proto.Message, b *proto.Buffer) error { + m := msg.(*SampleOneOf) + // test_oneof + switch x := m.TestOneof.(type) { + case *SampleOneOf_Field1: + _ = b.EncodeVarint(1<<3 | proto.WireFixed64) + _ = b.EncodeFixed64(math.Float64bits(x.Field1)) + case *SampleOneOf_Field2: + _ = b.EncodeVarint(2<<3 | proto.WireFixed32) + _ = b.EncodeFixed32(uint64(math.Float32bits(x.Field2))) + case *SampleOneOf_Field3: + _ = b.EncodeVarint(3<<3 | proto.WireVarint) + _ = b.EncodeVarint(uint64(x.Field3)) + case *SampleOneOf_Field4: + _ = b.EncodeVarint(4<<3 | proto.WireVarint) + _ = b.EncodeVarint(uint64(x.Field4)) + case *SampleOneOf_Field5: + _ = b.EncodeVarint(5<<3 | proto.WireVarint) + _ = b.EncodeVarint(uint64(x.Field5)) + case *SampleOneOf_Field6: + _ = b.EncodeVarint(6<<3 | proto.WireVarint) + _ = b.EncodeVarint(uint64(x.Field6)) + case *SampleOneOf_Field7: + _ = b.EncodeVarint(7<<3 | proto.WireVarint) + _ = b.EncodeZigzag32(uint64(x.Field7)) + case *SampleOneOf_Field8: + _ = b.EncodeVarint(8<<3 | proto.WireVarint) + _ = b.EncodeZigzag64(uint64(x.Field8)) + case *SampleOneOf_Field9: + _ = b.EncodeVarint(9<<3 | proto.WireFixed32) + _ = b.EncodeFixed32(uint64(x.Field9)) + case *SampleOneOf_Field10: + _ = b.EncodeVarint(10<<3 | proto.WireFixed32) + _ = b.EncodeFixed32(uint64(x.Field10)) + case *SampleOneOf_Field11: + _ = b.EncodeVarint(11<<3 | proto.WireFixed64) + _ = b.EncodeFixed64(uint64(x.Field11)) + case *SampleOneOf_Field12: + _ = b.EncodeVarint(12<<3 | proto.WireFixed64) + _ = b.EncodeFixed64(uint64(x.Field12)) + case *SampleOneOf_Field13: + t := uint64(0) + if x.Field13 { + t = 1 + } + _ = b.EncodeVarint(13<<3 | proto.WireVarint) + _ = b.EncodeVarint(t) + case *SampleOneOf_Field14: + _ = b.EncodeVarint(14<<3 | proto.WireBytes) + _ = b.EncodeStringBytes(x.Field14) + case *SampleOneOf_Field15: + _ = b.EncodeVarint(15<<3 | proto.WireBytes) + _ = b.EncodeRawBytes(x.Field15) + case *SampleOneOf_SubMessage: + _ = b.EncodeVarint(16<<3 | proto.WireBytes) + if err := b.EncodeMessage(x.SubMessage); err != nil { + return err + } + case nil: + default: + return fmt.Errorf("SampleOneOf.TestOneof has unexpected type %T", x) + } + return nil +} + +func _SampleOneOf_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) { + m := msg.(*SampleOneOf) + switch tag { + case 1: // test_oneof.Field1 + if wire != proto.WireFixed64 { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeFixed64() + m.TestOneof = &SampleOneOf_Field1{math.Float64frombits(x)} + return true, err + case 2: // test_oneof.Field2 + if wire != proto.WireFixed32 { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeFixed32() + m.TestOneof = &SampleOneOf_Field2{math.Float32frombits(uint32(x))} + return true, err + case 3: // test_oneof.Field3 + if wire != proto.WireVarint { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeVarint() + m.TestOneof = &SampleOneOf_Field3{int32(x)} + return true, err + case 4: // test_oneof.Field4 + if wire != proto.WireVarint { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeVarint() + m.TestOneof = &SampleOneOf_Field4{int64(x)} + return true, err + case 5: // test_oneof.Field5 + if wire != proto.WireVarint { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeVarint() + m.TestOneof = &SampleOneOf_Field5{uint32(x)} + return true, err + case 6: // test_oneof.Field6 + if wire != proto.WireVarint { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeVarint() + m.TestOneof = &SampleOneOf_Field6{x} + return true, err + case 7: // test_oneof.Field7 + if wire != proto.WireVarint { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeZigzag32() + m.TestOneof = &SampleOneOf_Field7{int32(x)} + return true, err + case 8: // test_oneof.Field8 + if wire != proto.WireVarint { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeZigzag64() + m.TestOneof = &SampleOneOf_Field8{int64(x)} + return true, err + case 9: // test_oneof.Field9 + if wire != proto.WireFixed32 { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeFixed32() + m.TestOneof = &SampleOneOf_Field9{uint32(x)} + return true, err + case 10: // test_oneof.Field10 + if wire != proto.WireFixed32 { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeFixed32() + m.TestOneof = &SampleOneOf_Field10{int32(x)} + return true, err + case 11: // test_oneof.Field11 + if wire != proto.WireFixed64 { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeFixed64() + m.TestOneof = &SampleOneOf_Field11{x} + return true, err + case 12: // test_oneof.Field12 + if wire != proto.WireFixed64 { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeFixed64() + m.TestOneof = &SampleOneOf_Field12{int64(x)} + return true, err + case 13: // test_oneof.Field13 + if wire != proto.WireVarint { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeVarint() + m.TestOneof = &SampleOneOf_Field13{x != 0} + return true, err + case 14: // test_oneof.Field14 + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeStringBytes() + m.TestOneof = &SampleOneOf_Field14{x} + return true, err + case 15: // test_oneof.Field15 + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeRawBytes(true) + m.TestOneof = &SampleOneOf_Field15{x} + return true, err + case 16: // test_oneof.sub_message + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + msg := new(Subby) + err := b.DecodeMessage(msg) + m.TestOneof = &SampleOneOf_SubMessage{msg} + return true, err + default: + return false, nil + } +} + +func _SampleOneOf_OneofSizer(msg proto.Message) (n int) { + m := msg.(*SampleOneOf) + // test_oneof + switch x := m.TestOneof.(type) { + case *SampleOneOf_Field1: + n += proto.SizeVarint(1<<3 | proto.WireFixed64) + n += 8 + case *SampleOneOf_Field2: + n += proto.SizeVarint(2<<3 | proto.WireFixed32) + n += 4 + case *SampleOneOf_Field3: + n += proto.SizeVarint(3<<3 | proto.WireVarint) + n += proto.SizeVarint(uint64(x.Field3)) + case *SampleOneOf_Field4: + n += proto.SizeVarint(4<<3 | proto.WireVarint) + n += proto.SizeVarint(uint64(x.Field4)) + case *SampleOneOf_Field5: + n += proto.SizeVarint(5<<3 | proto.WireVarint) + n += proto.SizeVarint(uint64(x.Field5)) + case *SampleOneOf_Field6: + n += proto.SizeVarint(6<<3 | proto.WireVarint) + n += proto.SizeVarint(uint64(x.Field6)) + case *SampleOneOf_Field7: + n += proto.SizeVarint(7<<3 | proto.WireVarint) + n += proto.SizeVarint(uint64((uint32(x.Field7) << 1) ^ uint32((int32(x.Field7) >> 31)))) + case *SampleOneOf_Field8: + n += proto.SizeVarint(8<<3 | proto.WireVarint) + n += proto.SizeVarint(uint64(uint64(x.Field8<<1) ^ uint64((int64(x.Field8) >> 63)))) + case *SampleOneOf_Field9: + n += proto.SizeVarint(9<<3 | proto.WireFixed32) + n += 4 + case *SampleOneOf_Field10: + n += proto.SizeVarint(10<<3 | proto.WireFixed32) + n += 4 + case *SampleOneOf_Field11: + n += proto.SizeVarint(11<<3 | proto.WireFixed64) + n += 8 + case *SampleOneOf_Field12: + n += proto.SizeVarint(12<<3 | proto.WireFixed64) + n += 8 + case *SampleOneOf_Field13: + n += proto.SizeVarint(13<<3 | proto.WireVarint) + n += 1 + case *SampleOneOf_Field14: + n += proto.SizeVarint(14<<3 | proto.WireBytes) + n += proto.SizeVarint(uint64(len(x.Field14))) + n += len(x.Field14) + case *SampleOneOf_Field15: + n += proto.SizeVarint(15<<3 | proto.WireBytes) + n += proto.SizeVarint(uint64(len(x.Field15))) + n += len(x.Field15) + case *SampleOneOf_SubMessage: + s := proto.Size(x.SubMessage) + n += proto.SizeVarint(16<<3 | proto.WireBytes) + n += proto.SizeVarint(uint64(s)) + n += s + case nil: + default: + panic(fmt.Sprintf("proto: unexpected type %T in oneof", x)) + } + return n +} + +func init() { + proto.RegisterType((*Subby)(nil), "one.Subby") + proto.RegisterType((*SampleOneOf)(nil), "one.SampleOneOf") +} +func (this *Subby) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return OneDescription() +} +func (this *SampleOneOf) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return OneDescription() +} +func OneDescription() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + d := &github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet{} + var gzipped = []byte{ + // 3542 bytes of a gzipped FileDescriptorSet + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xcc, 0x5a, 0x5b, 0x6c, 0x23, 0xe5, + 0xf5, 0x5f, 0xc7, 0x97, 0xd8, 0xc7, 0x89, 0xe3, 0x4c, 0xc2, 0xae, 0x37, 0xc0, 0x2e, 0x1b, 0x6e, + 0xcb, 0xf2, 0x27, 0xd9, 0xcd, 0xde, 0xcd, 0xff, 0x0f, 0xca, 0xc5, 0x1b, 0xb2, 0x4a, 0xe2, 0xfc, + 0xc7, 0x09, 0x2c, 0xf4, 0x61, 0x34, 0xb1, 0xbf, 0x38, 0xde, 0x1d, 0xcf, 0xb8, 0x9e, 0xf1, 0xb2, + 0xe1, 0x89, 0x8a, 0x5e, 0x84, 0xaa, 0xde, 0xab, 0x96, 0x7b, 0x0b, 0x52, 0x0b, 0xa5, 0x37, 0xe8, + 0x4d, 0x55, 0x9f, 0x2a, 0x55, 0xb4, 0x3c, 0x55, 0x6d, 0x9f, 0xfa, 0xd0, 0x07, 0xa0, 0x48, 0xa5, + 0x2d, 0x6d, 0xa9, 0xb4, 0x52, 0x91, 0x78, 0xe9, 0xf9, 0x6e, 0x73, 0xb1, 0x9d, 0x8c, 0x83, 0x44, + 0x69, 0x24, 0x2b, 0x9e, 0x73, 0xce, 0xef, 0x37, 0xdf, 0x9c, 0xef, 0x7c, 0xe7, 0x9c, 0xef, 0x1b, + 0xc3, 0x2f, 0x8e, 0xc1, 0x0d, 0x55, 0xcb, 0xaa, 0x1a, 0x64, 0xb2, 0xd1, 0xb4, 0x1c, 0x6b, 0xbd, + 0xb5, 0x31, 0x59, 0x21, 0x76, 0xb9, 0x59, 0x6b, 0x38, 0x56, 0x73, 0x82, 0xc9, 0x94, 0x21, 0x6e, + 0x31, 0x21, 0x2d, 0xc6, 0x97, 0x60, 0xf8, 0x5c, 0xcd, 0x20, 0x73, 0xae, 0x61, 0x89, 0x38, 0xca, + 0x19, 0x88, 0x6d, 0xa0, 0x30, 0x17, 0xb9, 0x21, 0x7a, 0x38, 0x3d, 0x75, 0xd3, 0x44, 0x1b, 0x68, + 0x22, 0x88, 0x58, 0xa1, 0x62, 0x95, 0x21, 0xc6, 0xdf, 0x8c, 0xc1, 0x48, 0x17, 0xad, 0xa2, 0x40, + 0xcc, 0xd4, 0xeb, 0x94, 0x31, 0x72, 0x38, 0xa5, 0xb2, 0xef, 0x4a, 0x0e, 0xfa, 0x1b, 0x7a, 0xf9, + 0x92, 0x5e, 0x25, 0xb9, 0x3e, 0x26, 0x96, 0x97, 0xca, 0x01, 0x80, 0x0a, 0x69, 0x10, 0xb3, 0x42, + 0xcc, 0xf2, 0x56, 0x2e, 0x8a, 0xa3, 0x48, 0xa9, 0x3e, 0x89, 0x72, 0x3b, 0x0c, 0x37, 0x5a, 0xeb, + 0x46, 0xad, 0xac, 0xf9, 0xcc, 0x00, 0xcd, 0xe2, 0x6a, 0x96, 0x2b, 0xe6, 0x3c, 0xe3, 0x5b, 0x61, + 0xe8, 0x41, 0xa2, 0x5f, 0xf2, 0x9b, 0xa6, 0x99, 0x69, 0x86, 0x8a, 0x7d, 0x86, 0xb3, 0x30, 0x50, + 0x27, 0xb6, 0x8d, 0x03, 0xd0, 0x9c, 0xad, 0x06, 0xc9, 0xc5, 0xd8, 0xd3, 0xdf, 0xd0, 0xf1, 0xf4, + 0xed, 0x4f, 0x9e, 0x16, 0xa8, 0x55, 0x04, 0x29, 0xd3, 0x90, 0x22, 0x66, 0xab, 0xce, 0x19, 0xe2, + 0xdb, 0xf8, 0xaf, 0x80, 0x16, 0xed, 0x2c, 0x49, 0x0a, 0x13, 0x14, 0xfd, 0x36, 0x69, 0x5e, 0xae, + 0x95, 0x49, 0x2e, 0xc1, 0x08, 0x6e, 0xed, 0x20, 0x28, 0x71, 0x7d, 0x3b, 0x87, 0xc4, 0xe1, 0xa3, + 0xa4, 0xc8, 0x15, 0x87, 0x98, 0x76, 0xcd, 0x32, 0x73, 0xfd, 0x8c, 0xe4, 0xe6, 0x2e, 0xb3, 0x48, + 0x8c, 0x4a, 0x3b, 0x85, 0x87, 0x53, 0x4e, 0x41, 0xbf, 0xd5, 0x70, 0xf0, 0x9b, 0x9d, 0x4b, 0xe2, + 0xfc, 0xa4, 0xa7, 0xae, 0xeb, 0x1a, 0x08, 0x45, 0x6e, 0xa3, 0x4a, 0x63, 0x65, 0x01, 0xb2, 0xb6, + 0xd5, 0x6a, 0x96, 0x89, 0x56, 0xb6, 0x2a, 0x44, 0xab, 0x99, 0x1b, 0x56, 0x2e, 0xc5, 0x08, 0x0e, + 0x76, 0x3e, 0x08, 0x33, 0x9c, 0x45, 0xbb, 0x05, 0x34, 0x53, 0x33, 0x76, 0xe0, 0x5a, 0xd9, 0x0b, + 0x09, 0x7b, 0xcb, 0x74, 0xf4, 0x2b, 0xb9, 0x01, 0x16, 0x21, 0xe2, 0x6a, 0xfc, 0x5f, 0x71, 0x18, + 0xea, 0x25, 0xc4, 0xee, 0x84, 0xf8, 0x06, 0x7d, 0x4a, 0x0c, 0xb0, 0x5d, 0xf8, 0x80, 0x63, 0x82, + 0x4e, 0x4c, 0xbc, 0x4f, 0x27, 0x4e, 0x43, 0xda, 0x24, 0xb6, 0x43, 0x2a, 0x3c, 0x22, 0xa2, 0x3d, + 0xc6, 0x14, 0x70, 0x50, 0x67, 0x48, 0xc5, 0xde, 0x57, 0x48, 0x5d, 0x80, 0x21, 0x77, 0x48, 0x5a, + 0x53, 0x37, 0xab, 0x32, 0x36, 0x27, 0xc3, 0x46, 0x32, 0x51, 0x90, 0x38, 0x95, 0xc2, 0xd4, 0x0c, + 0x09, 0x5c, 0x2b, 0x73, 0x00, 0x96, 0x49, 0xac, 0x0d, 0x5c, 0x5e, 0x65, 0x03, 0xe3, 0xa4, 0xbb, + 0x97, 0x8a, 0xd4, 0xa4, 0xc3, 0x4b, 0x16, 0x97, 0x96, 0x0d, 0xe5, 0xac, 0x17, 0x6a, 0xfd, 0xdb, + 0x44, 0xca, 0x12, 0x5f, 0x64, 0x1d, 0xd1, 0xb6, 0x06, 0x99, 0x26, 0xa1, 0x71, 0x8f, 0x2e, 0xe6, + 0x4f, 0x96, 0x62, 0x83, 0x98, 0x08, 0x7d, 0x32, 0x55, 0xc0, 0xf8, 0x83, 0x0d, 0x36, 0xfd, 0x97, + 0xca, 0x8d, 0xe0, 0x0a, 0x34, 0x16, 0x56, 0xc0, 0xb2, 0xd0, 0x80, 0x14, 0x2e, 0xa3, 0x6c, 0xec, + 0x0c, 0x64, 0x82, 0xee, 0x51, 0x46, 0x21, 0x6e, 0x3b, 0x7a, 0xd3, 0x61, 0x51, 0x18, 0x57, 0xf9, + 0x85, 0x92, 0x85, 0x28, 0x26, 0x19, 0x96, 0xe5, 0xe2, 0x2a, 0xfd, 0x3a, 0x76, 0x1a, 0x06, 0x03, + 0xb7, 0xef, 0x15, 0x38, 0xfe, 0x58, 0x02, 0x46, 0xbb, 0xc5, 0x5c, 0xd7, 0xf0, 0xc7, 0xe5, 0x83, + 0x11, 0xb0, 0x4e, 0x9a, 0x18, 0x77, 0x94, 0x41, 0x5c, 0x61, 0x44, 0xc5, 0x0d, 0x7d, 0x9d, 0x18, + 0x18, 0x4d, 0x91, 0xc3, 0x99, 0xa9, 0xdb, 0x7b, 0x8a, 0xea, 0x89, 0x45, 0x0a, 0x51, 0x39, 0x52, + 0xb9, 0x0b, 0x62, 0x22, 0xc5, 0x51, 0x86, 0x23, 0xbd, 0x31, 0xd0, 0x58, 0x54, 0x19, 0x4e, 0xb9, + 0x16, 0x52, 0xf4, 0x3f, 0xf7, 0x6d, 0x82, 0x8d, 0x39, 0x49, 0x05, 0xd4, 0xaf, 0xca, 0x18, 0x24, + 0x59, 0x98, 0x55, 0x88, 0x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0x17, 0xd9, 0xcb, 0xec, 0xf4, 0x14, 0x4c, 0xd0, 0x88, 0x60, 0x93, 0x8a, 0xb6, 0x80, 0x06, 0x22, + 0x39, 0xcd, 0x0c, 0x00, 0xdb, 0xb4, 0x6a, 0xec, 0xc7, 0x58, 0x33, 0x73, 0xaf, 0xbe, 0x7e, 0x60, + 0xcf, 0x6f, 0xf0, 0xf3, 0x7b, 0xfc, 0xbc, 0xf6, 0xfa, 0x81, 0xc8, 0x3b, 0xf8, 0x79, 0x17, 0x3f, + 0x0f, 0xbf, 0x71, 0x20, 0xf2, 0x02, 0x7e, 0x5e, 0xc2, 0xcf, 0x4f, 0xf1, 0xf3, 0xea, 0x1b, 0x68, + 0x87, 0x9f, 0xd7, 0xf0, 0xfb, 0x5b, 0xf8, 0xff, 0x1d, 0xfc, 0xff, 0x2e, 0xfe, 0x7f, 0xf8, 0x8f, + 0x07, 0xf6, 0xac, 0x27, 0x58, 0x18, 0x1d, 0xff, 0x77, 0x00, 0x00, 0x00, 0xff, 0xff, 0x60, 0x93, + 0x75, 0x07, 0x03, 0x2d, 0x00, 0x00, + } + r := bytes.NewReader(gzipped) + gzipr, err := compress_gzip.NewReader(r) + if err != nil { + panic(err) + } + ungzipped, err := io_ioutil.ReadAll(gzipr) + if err != nil { + panic(err) + } + if err := github_com_gogo_protobuf_proto.Unmarshal(ungzipped, d); err != nil { + panic(err) + } + return d +} +func (this *Subby) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*Subby) + if !ok { + that2, ok := that.(Subby) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *Subby") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *Subby but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *Subby but is not nil && this == nil") + } + if this.Sub != that1.Sub { + return fmt.Errorf("Sub this(%v) Not Equal that(%v)", this.Sub, that1.Sub) + } + return nil +} +func (this *Subby) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*Subby) + if !ok { + that2, ok := that.(Subby) + 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.Sub != that1.Sub { + return false + } + return true +} +func (this *SampleOneOf) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*SampleOneOf) + if !ok { + that2, ok := that.(SampleOneOf) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *SampleOneOf") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *SampleOneOf but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *SampleOneOf but is not nil && this == nil") + } + if that1.TestOneof == nil { + if this.TestOneof != nil { + return fmt.Errorf("this.TestOneof != nil && that1.TestOneof == nil") + } + } else if this.TestOneof == nil { + return fmt.Errorf("this.TestOneof == nil && that1.TestOneof != nil") + } else if err := this.TestOneof.VerboseEqual(that1.TestOneof); err != nil { + return err + } + return nil +} +func (this *SampleOneOf_Field1) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*SampleOneOf_Field1) + if !ok { + that2, ok := that.(SampleOneOf_Field1) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *SampleOneOf_Field1") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *SampleOneOf_Field1 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *SampleOneOf_Field1 but is not nil && this == nil") + } + if this.Field1 != that1.Field1 { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) + } + return nil +} +func (this *SampleOneOf_Field2) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*SampleOneOf_Field2) + if !ok { + that2, ok := that.(SampleOneOf_Field2) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *SampleOneOf_Field2") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *SampleOneOf_Field2 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *SampleOneOf_Field2 but is not nil && this == nil") + } + if this.Field2 != that1.Field2 { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) + } + return nil +} +func (this *SampleOneOf_Field3) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*SampleOneOf_Field3) + if !ok { + that2, ok := that.(SampleOneOf_Field3) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *SampleOneOf_Field3") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *SampleOneOf_Field3 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *SampleOneOf_Field3 but is not nil && this == nil") + } + if this.Field3 != that1.Field3 { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", this.Field3, that1.Field3) + } + return nil +} +func (this *SampleOneOf_Field4) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*SampleOneOf_Field4) + if !ok { + that2, ok := that.(SampleOneOf_Field4) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *SampleOneOf_Field4") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *SampleOneOf_Field4 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *SampleOneOf_Field4 but is not nil && this == nil") + } + if this.Field4 != that1.Field4 { + return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", this.Field4, that1.Field4) + } + return nil +} +func (this *SampleOneOf_Field5) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*SampleOneOf_Field5) + if !ok { + that2, ok := that.(SampleOneOf_Field5) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *SampleOneOf_Field5") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *SampleOneOf_Field5 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *SampleOneOf_Field5 but is not nil && this == nil") + } + if this.Field5 != that1.Field5 { + return fmt.Errorf("Field5 this(%v) Not Equal that(%v)", this.Field5, that1.Field5) + } + return nil +} +func (this *SampleOneOf_Field6) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*SampleOneOf_Field6) + if !ok { + that2, ok := that.(SampleOneOf_Field6) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *SampleOneOf_Field6") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *SampleOneOf_Field6 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *SampleOneOf_Field6 but is not nil && this == nil") + } + if this.Field6 != that1.Field6 { + return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", this.Field6, that1.Field6) + } + return nil +} +func (this *SampleOneOf_Field7) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*SampleOneOf_Field7) + if !ok { + that2, ok := that.(SampleOneOf_Field7) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *SampleOneOf_Field7") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *SampleOneOf_Field7 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *SampleOneOf_Field7 but is not nil && this == nil") + } + if this.Field7 != that1.Field7 { + return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", this.Field7, that1.Field7) + } + return nil +} +func (this *SampleOneOf_Field8) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*SampleOneOf_Field8) + if !ok { + that2, ok := that.(SampleOneOf_Field8) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *SampleOneOf_Field8") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *SampleOneOf_Field8 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *SampleOneOf_Field8 but is not nil && this == nil") + } + if this.Field8 != that1.Field8 { + return fmt.Errorf("Field8 this(%v) Not Equal that(%v)", this.Field8, that1.Field8) + } + return nil +} +func (this *SampleOneOf_Field9) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*SampleOneOf_Field9) + if !ok { + that2, ok := that.(SampleOneOf_Field9) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *SampleOneOf_Field9") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *SampleOneOf_Field9 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *SampleOneOf_Field9 but is not nil && this == nil") + } + if this.Field9 != that1.Field9 { + return fmt.Errorf("Field9 this(%v) Not Equal that(%v)", this.Field9, that1.Field9) + } + return nil +} +func (this *SampleOneOf_Field10) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*SampleOneOf_Field10) + if !ok { + that2, ok := that.(SampleOneOf_Field10) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *SampleOneOf_Field10") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *SampleOneOf_Field10 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *SampleOneOf_Field10 but is not nil && this == nil") + } + if this.Field10 != that1.Field10 { + return fmt.Errorf("Field10 this(%v) Not Equal that(%v)", this.Field10, that1.Field10) + } + return nil +} +func (this *SampleOneOf_Field11) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*SampleOneOf_Field11) + if !ok { + that2, ok := that.(SampleOneOf_Field11) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *SampleOneOf_Field11") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *SampleOneOf_Field11 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *SampleOneOf_Field11 but is not nil && this == nil") + } + if this.Field11 != that1.Field11 { + return fmt.Errorf("Field11 this(%v) Not Equal that(%v)", this.Field11, that1.Field11) + } + return nil +} +func (this *SampleOneOf_Field12) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*SampleOneOf_Field12) + if !ok { + that2, ok := that.(SampleOneOf_Field12) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *SampleOneOf_Field12") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *SampleOneOf_Field12 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *SampleOneOf_Field12 but is not nil && this == nil") + } + if this.Field12 != that1.Field12 { + return fmt.Errorf("Field12 this(%v) Not Equal that(%v)", this.Field12, that1.Field12) + } + return nil +} +func (this *SampleOneOf_Field13) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*SampleOneOf_Field13) + if !ok { + that2, ok := that.(SampleOneOf_Field13) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *SampleOneOf_Field13") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *SampleOneOf_Field13 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *SampleOneOf_Field13 but is not nil && this == nil") + } + if this.Field13 != that1.Field13 { + return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", this.Field13, that1.Field13) + } + return nil +} +func (this *SampleOneOf_Field14) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*SampleOneOf_Field14) + if !ok { + that2, ok := that.(SampleOneOf_Field14) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *SampleOneOf_Field14") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *SampleOneOf_Field14 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *SampleOneOf_Field14 but is not nil && this == nil") + } + if this.Field14 != that1.Field14 { + return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", this.Field14, that1.Field14) + } + return nil +} +func (this *SampleOneOf_Field15) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*SampleOneOf_Field15) + if !ok { + that2, ok := that.(SampleOneOf_Field15) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *SampleOneOf_Field15") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *SampleOneOf_Field15 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *SampleOneOf_Field15 but is not nil && this == nil") + } + if !bytes.Equal(this.Field15, that1.Field15) { + return fmt.Errorf("Field15 this(%v) Not Equal that(%v)", this.Field15, that1.Field15) + } + return nil +} +func (this *SampleOneOf_SubMessage) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*SampleOneOf_SubMessage) + if !ok { + that2, ok := that.(SampleOneOf_SubMessage) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *SampleOneOf_SubMessage") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *SampleOneOf_SubMessage but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *SampleOneOf_SubMessage but is not nil && this == nil") + } + if !this.SubMessage.Equal(that1.SubMessage) { + return fmt.Errorf("SubMessage this(%v) Not Equal that(%v)", this.SubMessage, that1.SubMessage) + } + return nil +} +func (this *SampleOneOf) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*SampleOneOf) + if !ok { + that2, ok := that.(SampleOneOf) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + if this == nil { + return true + } + return false + } else if this == nil { + return false + } + if that1.TestOneof == nil { + if this.TestOneof != nil { + return false + } + } else if this.TestOneof == nil { + return false + } else if !this.TestOneof.Equal(that1.TestOneof) { + return false + } + return true +} +func (this *SampleOneOf_Field1) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*SampleOneOf_Field1) + if !ok { + that2, ok := that.(SampleOneOf_Field1) + 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.Field1 != that1.Field1 { + return false + } + return true +} +func (this *SampleOneOf_Field2) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*SampleOneOf_Field2) + if !ok { + that2, ok := that.(SampleOneOf_Field2) + 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.Field2 != that1.Field2 { + return false + } + return true +} +func (this *SampleOneOf_Field3) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*SampleOneOf_Field3) + if !ok { + that2, ok := that.(SampleOneOf_Field3) + 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.Field3 != that1.Field3 { + return false + } + return true +} +func (this *SampleOneOf_Field4) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*SampleOneOf_Field4) + if !ok { + that2, ok := that.(SampleOneOf_Field4) + 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.Field4 != that1.Field4 { + return false + } + return true +} +func (this *SampleOneOf_Field5) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*SampleOneOf_Field5) + if !ok { + that2, ok := that.(SampleOneOf_Field5) + 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.Field5 != that1.Field5 { + return false + } + return true +} +func (this *SampleOneOf_Field6) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*SampleOneOf_Field6) + if !ok { + that2, ok := that.(SampleOneOf_Field6) + 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.Field6 != that1.Field6 { + return false + } + return true +} +func (this *SampleOneOf_Field7) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*SampleOneOf_Field7) + if !ok { + that2, ok := that.(SampleOneOf_Field7) + 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.Field7 != that1.Field7 { + return false + } + return true +} +func (this *SampleOneOf_Field8) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*SampleOneOf_Field8) + if !ok { + that2, ok := that.(SampleOneOf_Field8) + 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.Field8 != that1.Field8 { + return false + } + return true +} +func (this *SampleOneOf_Field9) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*SampleOneOf_Field9) + if !ok { + that2, ok := that.(SampleOneOf_Field9) + 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.Field9 != that1.Field9 { + return false + } + return true +} +func (this *SampleOneOf_Field10) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*SampleOneOf_Field10) + if !ok { + that2, ok := that.(SampleOneOf_Field10) + 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.Field10 != that1.Field10 { + return false + } + return true +} +func (this *SampleOneOf_Field11) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*SampleOneOf_Field11) + if !ok { + that2, ok := that.(SampleOneOf_Field11) + 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.Field11 != that1.Field11 { + return false + } + return true +} +func (this *SampleOneOf_Field12) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*SampleOneOf_Field12) + if !ok { + that2, ok := that.(SampleOneOf_Field12) + 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.Field12 != that1.Field12 { + return false + } + return true +} +func (this *SampleOneOf_Field13) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*SampleOneOf_Field13) + if !ok { + that2, ok := that.(SampleOneOf_Field13) + 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.Field13 != that1.Field13 { + return false + } + return true +} +func (this *SampleOneOf_Field14) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*SampleOneOf_Field14) + if !ok { + that2, ok := that.(SampleOneOf_Field14) + 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.Field14 != that1.Field14 { + return false + } + return true +} +func (this *SampleOneOf_Field15) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*SampleOneOf_Field15) + if !ok { + that2, ok := that.(SampleOneOf_Field15) + 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.Field15, that1.Field15) { + return false + } + return true +} +func (this *SampleOneOf_SubMessage) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*SampleOneOf_SubMessage) + if !ok { + that2, ok := that.(SampleOneOf_SubMessage) + 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.SubMessage.Equal(that1.SubMessage) { + return false + } + return true +} +func (this *Subby) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&one.Subby{") + s = append(s, "Sub: "+fmt.Sprintf("%#v", this.Sub)+",\n") + s = append(s, "}") + return strings.Join(s, "") +} +func (this *SampleOneOf) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 20) + s = append(s, "&one.SampleOneOf{") + if this.TestOneof != nil { + s = append(s, "TestOneof: "+fmt.Sprintf("%#v", this.TestOneof)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *SampleOneOf_Field1) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.SampleOneOf_Field1{` + + `Field1:` + fmt.Sprintf("%#v", this.Field1) + `}`}, ", ") + return s +} +func (this *SampleOneOf_Field2) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.SampleOneOf_Field2{` + + `Field2:` + fmt.Sprintf("%#v", this.Field2) + `}`}, ", ") + return s +} +func (this *SampleOneOf_Field3) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.SampleOneOf_Field3{` + + `Field3:` + fmt.Sprintf("%#v", this.Field3) + `}`}, ", ") + return s +} +func (this *SampleOneOf_Field4) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.SampleOneOf_Field4{` + + `Field4:` + fmt.Sprintf("%#v", this.Field4) + `}`}, ", ") + return s +} +func (this *SampleOneOf_Field5) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.SampleOneOf_Field5{` + + `Field5:` + fmt.Sprintf("%#v", this.Field5) + `}`}, ", ") + return s +} +func (this *SampleOneOf_Field6) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.SampleOneOf_Field6{` + + `Field6:` + fmt.Sprintf("%#v", this.Field6) + `}`}, ", ") + return s +} +func (this *SampleOneOf_Field7) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.SampleOneOf_Field7{` + + `Field7:` + fmt.Sprintf("%#v", this.Field7) + `}`}, ", ") + return s +} +func (this *SampleOneOf_Field8) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.SampleOneOf_Field8{` + + `Field8:` + fmt.Sprintf("%#v", this.Field8) + `}`}, ", ") + return s +} +func (this *SampleOneOf_Field9) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.SampleOneOf_Field9{` + + `Field9:` + fmt.Sprintf("%#v", this.Field9) + `}`}, ", ") + return s +} +func (this *SampleOneOf_Field10) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.SampleOneOf_Field10{` + + `Field10:` + fmt.Sprintf("%#v", this.Field10) + `}`}, ", ") + return s +} +func (this *SampleOneOf_Field11) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.SampleOneOf_Field11{` + + `Field11:` + fmt.Sprintf("%#v", this.Field11) + `}`}, ", ") + return s +} +func (this *SampleOneOf_Field12) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.SampleOneOf_Field12{` + + `Field12:` + fmt.Sprintf("%#v", this.Field12) + `}`}, ", ") + return s +} +func (this *SampleOneOf_Field13) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.SampleOneOf_Field13{` + + `Field13:` + fmt.Sprintf("%#v", this.Field13) + `}`}, ", ") + return s +} +func (this *SampleOneOf_Field14) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.SampleOneOf_Field14{` + + `Field14:` + fmt.Sprintf("%#v", this.Field14) + `}`}, ", ") + return s +} +func (this *SampleOneOf_Field15) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.SampleOneOf_Field15{` + + `Field15:` + fmt.Sprintf("%#v", this.Field15) + `}`}, ", ") + return s +} +func (this *SampleOneOf_SubMessage) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.SampleOneOf_SubMessage{` + + `SubMessage:` + fmt.Sprintf("%#v", this.SubMessage) + `}`}, ", ") + return s +} +func valueToGoStringOne(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 extensionToGoStringOne(e map[int32]github_com_gogo_protobuf_proto.Extension) string { + if e == nil { + return "nil" + } + s := "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 +} +func NewPopulatedSubby(r randyOne, easy bool) *Subby { + this := &Subby{} + this.Sub = randStringOne(r) + if !easy && r.Intn(10) != 0 { + } + return this +} + +func NewPopulatedSampleOneOf(r randyOne, easy bool) *SampleOneOf { + this := &SampleOneOf{} + oneofNumber_TestOneof := []int32{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}[r.Intn(16)] + switch oneofNumber_TestOneof { + case 1: + this.TestOneof = NewPopulatedSampleOneOf_Field1(r, easy) + case 2: + this.TestOneof = NewPopulatedSampleOneOf_Field2(r, easy) + case 3: + this.TestOneof = NewPopulatedSampleOneOf_Field3(r, easy) + case 4: + this.TestOneof = NewPopulatedSampleOneOf_Field4(r, easy) + case 5: + this.TestOneof = NewPopulatedSampleOneOf_Field5(r, easy) + case 6: + this.TestOneof = NewPopulatedSampleOneOf_Field6(r, easy) + case 7: + this.TestOneof = NewPopulatedSampleOneOf_Field7(r, easy) + case 8: + this.TestOneof = NewPopulatedSampleOneOf_Field8(r, easy) + case 9: + this.TestOneof = NewPopulatedSampleOneOf_Field9(r, easy) + case 10: + this.TestOneof = NewPopulatedSampleOneOf_Field10(r, easy) + case 11: + this.TestOneof = NewPopulatedSampleOneOf_Field11(r, easy) + case 12: + this.TestOneof = NewPopulatedSampleOneOf_Field12(r, easy) + case 13: + this.TestOneof = NewPopulatedSampleOneOf_Field13(r, easy) + case 14: + this.TestOneof = NewPopulatedSampleOneOf_Field14(r, easy) + case 15: + this.TestOneof = NewPopulatedSampleOneOf_Field15(r, easy) + case 16: + this.TestOneof = NewPopulatedSampleOneOf_SubMessage(r, easy) + } + if !easy && r.Intn(10) != 0 { + } + return this +} + +func NewPopulatedSampleOneOf_Field1(r randyOne, easy bool) *SampleOneOf_Field1 { + this := &SampleOneOf_Field1{} + this.Field1 = float64(r.Float64()) + if r.Intn(2) == 0 { + this.Field1 *= -1 + } + return this +} +func NewPopulatedSampleOneOf_Field2(r randyOne, easy bool) *SampleOneOf_Field2 { + this := &SampleOneOf_Field2{} + this.Field2 = float32(r.Float32()) + if r.Intn(2) == 0 { + this.Field2 *= -1 + } + return this +} +func NewPopulatedSampleOneOf_Field3(r randyOne, easy bool) *SampleOneOf_Field3 { + this := &SampleOneOf_Field3{} + this.Field3 = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Field3 *= -1 + } + return this +} +func NewPopulatedSampleOneOf_Field4(r randyOne, easy bool) *SampleOneOf_Field4 { + this := &SampleOneOf_Field4{} + this.Field4 = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Field4 *= -1 + } + return this +} +func NewPopulatedSampleOneOf_Field5(r randyOne, easy bool) *SampleOneOf_Field5 { + this := &SampleOneOf_Field5{} + this.Field5 = uint32(r.Uint32()) + return this +} +func NewPopulatedSampleOneOf_Field6(r randyOne, easy bool) *SampleOneOf_Field6 { + this := &SampleOneOf_Field6{} + this.Field6 = uint64(uint64(r.Uint32())) + return this +} +func NewPopulatedSampleOneOf_Field7(r randyOne, easy bool) *SampleOneOf_Field7 { + this := &SampleOneOf_Field7{} + this.Field7 = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Field7 *= -1 + } + return this +} +func NewPopulatedSampleOneOf_Field8(r randyOne, easy bool) *SampleOneOf_Field8 { + this := &SampleOneOf_Field8{} + this.Field8 = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Field8 *= -1 + } + return this +} +func NewPopulatedSampleOneOf_Field9(r randyOne, easy bool) *SampleOneOf_Field9 { + this := &SampleOneOf_Field9{} + this.Field9 = uint32(r.Uint32()) + return this +} +func NewPopulatedSampleOneOf_Field10(r randyOne, easy bool) *SampleOneOf_Field10 { + this := &SampleOneOf_Field10{} + this.Field10 = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Field10 *= -1 + } + return this +} +func NewPopulatedSampleOneOf_Field11(r randyOne, easy bool) *SampleOneOf_Field11 { + this := &SampleOneOf_Field11{} + this.Field11 = uint64(uint64(r.Uint32())) + return this +} +func NewPopulatedSampleOneOf_Field12(r randyOne, easy bool) *SampleOneOf_Field12 { + this := &SampleOneOf_Field12{} + this.Field12 = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Field12 *= -1 + } + return this +} +func NewPopulatedSampleOneOf_Field13(r randyOne, easy bool) *SampleOneOf_Field13 { + this := &SampleOneOf_Field13{} + this.Field13 = bool(bool(r.Intn(2) == 0)) + return this +} +func NewPopulatedSampleOneOf_Field14(r randyOne, easy bool) *SampleOneOf_Field14 { + this := &SampleOneOf_Field14{} + this.Field14 = randStringOne(r) + return this +} +func NewPopulatedSampleOneOf_Field15(r randyOne, easy bool) *SampleOneOf_Field15 { + this := &SampleOneOf_Field15{} + v1 := r.Intn(100) + this.Field15 = make([]byte, v1) + for i := 0; i < v1; i++ { + this.Field15[i] = byte(r.Intn(256)) + } + return this +} +func NewPopulatedSampleOneOf_SubMessage(r randyOne, easy bool) *SampleOneOf_SubMessage { + this := &SampleOneOf_SubMessage{} + this.SubMessage = NewPopulatedSubby(r, easy) + return this +} + +type randyOne interface { + Float32() float32 + Float64() float64 + Int63() int64 + Int31() int32 + Uint32() uint32 + Intn(n int) int +} + +func randUTF8RuneOne(r randyOne) 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 randStringOne(r randyOne) string { + v2 := r.Intn(100) + tmps := make([]rune, v2) + for i := 0; i < v2; i++ { + tmps[i] = randUTF8RuneOne(r) + } + return string(tmps) +} +func randUnrecognizedOne(r randyOne, 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 = randFieldOne(data, r, fieldNumber, wire) + } + return data +} +func randFieldOne(data []byte, r randyOne, fieldNumber int, wire int) []byte { + key := uint32(fieldNumber)<<3 | uint32(wire) + switch wire { + case 0: + data = encodeVarintPopulateOne(data, uint64(key)) + v3 := r.Int63() + if r.Intn(2) == 0 { + v3 *= -1 + } + data = encodeVarintPopulateOne(data, uint64(v3)) + case 1: + data = encodeVarintPopulateOne(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 = encodeVarintPopulateOne(data, uint64(key)) + ll := r.Intn(100) + data = encodeVarintPopulateOne(data, uint64(ll)) + for j := 0; j < ll; j++ { + data = append(data, byte(r.Intn(256))) + } + default: + data = encodeVarintPopulateOne(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 encodeVarintPopulateOne(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 *Subby) Size() (n int) { + var l int + _ = l + l = len(m.Sub) + if l > 0 { + n += 1 + l + sovOne(uint64(l)) + } + return n +} + +func (m *SampleOneOf) Size() (n int) { + var l int + _ = l + if m.TestOneof != nil { + n += m.TestOneof.Size() + } + return n +} + +func (m *SampleOneOf_Field1) Size() (n int) { + var l int + _ = l + n += 9 + return n +} +func (m *SampleOneOf_Field2) Size() (n int) { + var l int + _ = l + n += 5 + return n +} +func (m *SampleOneOf_Field3) Size() (n int) { + var l int + _ = l + n += 1 + sovOne(uint64(m.Field3)) + return n +} +func (m *SampleOneOf_Field4) Size() (n int) { + var l int + _ = l + n += 1 + sovOne(uint64(m.Field4)) + return n +} +func (m *SampleOneOf_Field5) Size() (n int) { + var l int + _ = l + n += 1 + sovOne(uint64(m.Field5)) + return n +} +func (m *SampleOneOf_Field6) Size() (n int) { + var l int + _ = l + n += 1 + sovOne(uint64(m.Field6)) + return n +} +func (m *SampleOneOf_Field7) Size() (n int) { + var l int + _ = l + n += 1 + sozOne(uint64(m.Field7)) + return n +} +func (m *SampleOneOf_Field8) Size() (n int) { + var l int + _ = l + n += 1 + sozOne(uint64(m.Field8)) + return n +} +func (m *SampleOneOf_Field9) Size() (n int) { + var l int + _ = l + n += 5 + return n +} +func (m *SampleOneOf_Field10) Size() (n int) { + var l int + _ = l + n += 5 + return n +} +func (m *SampleOneOf_Field11) Size() (n int) { + var l int + _ = l + n += 9 + return n +} +func (m *SampleOneOf_Field12) Size() (n int) { + var l int + _ = l + n += 9 + return n +} +func (m *SampleOneOf_Field13) Size() (n int) { + var l int + _ = l + n += 2 + return n +} +func (m *SampleOneOf_Field14) Size() (n int) { + var l int + _ = l + l = len(m.Field14) + n += 1 + l + sovOne(uint64(l)) + return n +} +func (m *SampleOneOf_Field15) Size() (n int) { + var l int + _ = l + if m.Field15 != nil { + l = len(m.Field15) + n += 1 + l + sovOne(uint64(l)) + } + return n +} +func (m *SampleOneOf_SubMessage) Size() (n int) { + var l int + _ = l + if m.SubMessage != nil { + l = m.SubMessage.Size() + n += 2 + l + sovOne(uint64(l)) + } + return n +} + +func sovOne(x uint64) (n int) { + for { + n++ + x >>= 7 + if x == 0 { + break + } + } + return n +} +func sozOne(x uint64) (n int) { + return sovOne(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (this *Subby) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&Subby{`, + `Sub:` + fmt.Sprintf("%v", this.Sub) + `,`, + `}`, + }, "") + return s +} +func (this *SampleOneOf) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&SampleOneOf{`, + `TestOneof:` + fmt.Sprintf("%v", this.TestOneof) + `,`, + `}`, + }, "") + return s +} +func (this *SampleOneOf_Field1) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&SampleOneOf_Field1{`, + `Field1:` + fmt.Sprintf("%v", this.Field1) + `,`, + `}`, + }, "") + return s +} +func (this *SampleOneOf_Field2) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&SampleOneOf_Field2{`, + `Field2:` + fmt.Sprintf("%v", this.Field2) + `,`, + `}`, + }, "") + return s +} +func (this *SampleOneOf_Field3) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&SampleOneOf_Field3{`, + `Field3:` + fmt.Sprintf("%v", this.Field3) + `,`, + `}`, + }, "") + return s +} +func (this *SampleOneOf_Field4) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&SampleOneOf_Field4{`, + `Field4:` + fmt.Sprintf("%v", this.Field4) + `,`, + `}`, + }, "") + return s +} +func (this *SampleOneOf_Field5) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&SampleOneOf_Field5{`, + `Field5:` + fmt.Sprintf("%v", this.Field5) + `,`, + `}`, + }, "") + return s +} +func (this *SampleOneOf_Field6) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&SampleOneOf_Field6{`, + `Field6:` + fmt.Sprintf("%v", this.Field6) + `,`, + `}`, + }, "") + return s +} +func (this *SampleOneOf_Field7) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&SampleOneOf_Field7{`, + `Field7:` + fmt.Sprintf("%v", this.Field7) + `,`, + `}`, + }, "") + return s +} +func (this *SampleOneOf_Field8) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&SampleOneOf_Field8{`, + `Field8:` + fmt.Sprintf("%v", this.Field8) + `,`, + `}`, + }, "") + return s +} +func (this *SampleOneOf_Field9) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&SampleOneOf_Field9{`, + `Field9:` + fmt.Sprintf("%v", this.Field9) + `,`, + `}`, + }, "") + return s +} +func (this *SampleOneOf_Field10) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&SampleOneOf_Field10{`, + `Field10:` + fmt.Sprintf("%v", this.Field10) + `,`, + `}`, + }, "") + return s +} +func (this *SampleOneOf_Field11) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&SampleOneOf_Field11{`, + `Field11:` + fmt.Sprintf("%v", this.Field11) + `,`, + `}`, + }, "") + return s +} +func (this *SampleOneOf_Field12) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&SampleOneOf_Field12{`, + `Field12:` + fmt.Sprintf("%v", this.Field12) + `,`, + `}`, + }, "") + return s +} +func (this *SampleOneOf_Field13) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&SampleOneOf_Field13{`, + `Field13:` + fmt.Sprintf("%v", this.Field13) + `,`, + `}`, + }, "") + return s +} +func (this *SampleOneOf_Field14) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&SampleOneOf_Field14{`, + `Field14:` + fmt.Sprintf("%v", this.Field14) + `,`, + `}`, + }, "") + return s +} +func (this *SampleOneOf_Field15) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&SampleOneOf_Field15{`, + `Field15:` + fmt.Sprintf("%v", this.Field15) + `,`, + `}`, + }, "") + return s +} +func (this *SampleOneOf_SubMessage) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&SampleOneOf_SubMessage{`, + `SubMessage:` + strings.Replace(fmt.Sprintf("%v", this.SubMessage), "Subby", "Subby", 1) + `,`, + `}`, + }, "") + return s +} +func valueToStringOne(v interface{}) string { + rv := reflect.ValueOf(v) + if rv.IsNil() { + return "nil" + } + pv := reflect.Indirect(rv).Interface() + return fmt.Sprintf("*%v", pv) +} + +var fileDescriptorOne = []byte{ + // 377 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0x44, 0xd2, 0xbd, 0x8e, 0xda, 0x40, + 0x10, 0x07, 0x70, 0x7c, 0x3e, 0xec, 0xbb, 0x35, 0x97, 0x23, 0xae, 0x26, 0x57, 0x58, 0xd1, 0x55, + 0x69, 0x0e, 0x1f, 0xfe, 0xb8, 0x8f, 0xf6, 0x14, 0x45, 0x69, 0x22, 0x24, 0x78, 0x00, 0x84, 0x93, + 0xb5, 0x83, 0x04, 0x2c, 0xc2, 0x76, 0x91, 0x8e, 0xc7, 0x49, 0x99, 0x32, 0x8f, 0x40, 0x99, 0x32, + 0x45, 0x0a, 0x20, 0x4d, 0x4a, 0x4a, 0xca, 0xfc, 0x59, 0x4b, 0xb3, 0xc5, 0x5f, 0x33, 0xc3, 0x6f, + 0x28, 0xd6, 0xbb, 0x82, 0x3e, 0xab, 0x79, 0xa6, 0xca, 0x70, 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xf4, 0xfd, 0x8d, 0x25, 0xc6, 0x52, 0xba, 0x86, 0x75, 0x8c, 0xa5, 0xfe, 0x9d, 0xf0, 0x70, 0x51, + 0xe3, 0xb9, 0x2c, 0xcb, 0x49, 0x21, 0xa9, 0x0b, 0xf7, 0x22, 0xd1, 0x3b, 0xbd, 0x08, 0x7d, 0xa9, + 0xd8, 0x15, 0x58, 0xf8, 0xd4, 0xf8, 0x4b, 0x47, 0x88, 0x4a, 0x96, 0xd5, 0x18, 0xae, 0xf2, 0x97, + 0xf7, 0x9b, 0x5d, 0xd0, 0xfa, 0x85, 0xfc, 0x46, 0xb6, 0xbb, 0xc0, 0x3a, 0x20, 0x47, 0x64, 0xbd, + 0x0f, 0xac, 0xef, 0xc8, 0x0f, 0xe4, 0x27, 0xb2, 0xd9, 0x63, 0x0f, 0xd9, 0xa2, 0xff, 0x87, 0x7a, + 0x40, 0x3d, 0xa2, 0xae, 0xff, 0x06, 0xad, 0xcc, 0xd1, 0xcf, 0x28, 0xfe, 0x1f, 0x00, 0x00, 0xff, + 0xff, 0x08, 0x75, 0xb6, 0x0d, 0x96, 0x02, 0x00, 0x00, +} diff --git a/vendor/github.com/gogo/protobuf/test/oneof3/combos/neither/one.proto b/vendor/github.com/gogo/protobuf/test/oneof3/combos/neither/one.proto new file mode 100644 index 000000000..c3cdff7e5 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/oneof3/combos/neither/one.proto @@ -0,0 +1,80 @@ +// Copyright (c) 2013, Vastech SA (PTY) LTD. All rights reserved. +// http://github.com/gogo/protobuf/gogoproto +// +// 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 = "proto3"; + +package one; + +import "github.com/gogo/protobuf/gogoproto/gogo.proto"; + +option (gogoproto.goproto_stringer_all) = false; +option (gogoproto.goproto_enum_prefix_all) = false; +option (gogoproto.goproto_getters_all) = false; + +option (gogoproto.equal_all) = true; +option (gogoproto.verbose_equal_all) = true; +option (gogoproto.stringer_all) = true; +option (gogoproto.gostring_all) = true; +option (gogoproto.description_all) = true; + +option (gogoproto.testgen_all) = true; +option (gogoproto.populate_all) = true; +option (gogoproto.unmarshaler_all) = false; +option (gogoproto.marshaler_all) = false; +option (gogoproto.sizer_all) = true; + +option (gogoproto.goproto_enum_stringer_all) = false; +option (gogoproto.enum_stringer_all) = true; + +option (gogoproto.unsafe_marshaler_all) = false; +option (gogoproto.unsafe_unmarshaler_all) = false; + +message Subby { + string sub = 1; +} + +message SampleOneOf { + oneof test_oneof { + double Field1 = 1; + float Field2 = 2; + int32 Field3 = 3; + int64 Field4 = 4; + uint32 Field5 = 5; + uint64 Field6 = 6; + sint32 Field7 = 7; + sint64 Field8 = 8; + fixed32 Field9 = 9; + sfixed32 Field10 = 10; + fixed64 Field11 = 11; + sfixed64 Field12 = 12; + bool Field13 = 13; + string Field14 = 14; + bytes Field15 = 15; + Subby sub_message = 16; + } +} + + diff --git a/vendor/github.com/gogo/protobuf/test/oneof3/combos/neither/onepb_test.go b/vendor/github.com/gogo/protobuf/test/oneof3/combos/neither/onepb_test.go new file mode 100644 index 000000000..96aaadb94 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/oneof3/combos/neither/onepb_test.go @@ -0,0 +1,333 @@ +// Code generated by protoc-gen-gogo. +// source: combos/neither/one.proto +// DO NOT EDIT! + +/* +Package one is a generated protocol buffer package. + +It is generated from these files: + combos/neither/one.proto + +It has these top-level messages: + Subby + SampleOneOf +*/ +package one + +import testing "testing" +import math_rand "math/rand" +import time "time" +import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" +import github_com_gogo_protobuf_jsonpb "github.com/gogo/protobuf/jsonpb" +import fmt "fmt" +import go_parser "go/parser" +import proto "github.com/gogo/protobuf/proto" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +func TestSubbyProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedSubby(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Subby{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestSampleOneOfProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedSampleOneOf(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &SampleOneOf{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestSubbyJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedSubby(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Subby{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestSampleOneOfJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedSampleOneOf(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &SampleOneOf{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestSubbyProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedSubby(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &Subby{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestSubbyProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedSubby(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &Subby{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestSampleOneOfProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedSampleOneOf(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &SampleOneOf{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestSampleOneOfProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedSampleOneOf(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &SampleOneOf{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestOneDescription(t *testing.T) { + OneDescription() +} +func TestSubbyVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedSubby(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &Subby{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestSampleOneOfVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedSampleOneOf(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &SampleOneOf{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestSubbyGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedSubby(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestSampleOneOfGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedSampleOneOf(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestSubbySize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedSubby(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func TestSampleOneOfSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedSampleOneOf(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func TestSubbyStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedSubby(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestSampleOneOfStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedSampleOneOf(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} + +//These tests are generated by github.com/gogo/protobuf/plugin/testgen diff --git a/vendor/github.com/gogo/protobuf/test/oneof3/combos/unmarshaler/one.pb.go b/vendor/github.com/gogo/protobuf/test/oneof3/combos/unmarshaler/one.pb.go new file mode 100644 index 000000000..e1f568311 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/oneof3/combos/unmarshaler/one.pb.go @@ -0,0 +1,3203 @@ +// Code generated by protoc-gen-gogo. +// source: combos/unmarshaler/one.proto +// DO NOT EDIT! + +/* + Package one is a generated protocol buffer package. + + It is generated from these files: + combos/unmarshaler/one.proto + + It has these top-level messages: + Subby + SampleOneOf +*/ +package one + +import proto "github.com/gogo/protobuf/proto" +import fmt "fmt" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" + +import github_com_gogo_protobuf_protoc_gen_gogo_descriptor "github.com/gogo/protobuf/protoc-gen-gogo/descriptor" +import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" +import compress_gzip "compress/gzip" +import bytes "bytes" +import io_ioutil "io/ioutil" + +import strings "strings" +import sort "sort" +import strconv "strconv" +import reflect "reflect" + +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. +const _ = proto.GoGoProtoPackageIsVersion1 + +type Subby struct { + Sub string `protobuf:"bytes,1,opt,name=sub,proto3" json:"sub,omitempty"` +} + +func (m *Subby) Reset() { *m = Subby{} } +func (*Subby) ProtoMessage() {} +func (*Subby) Descriptor() ([]byte, []int) { return fileDescriptorOne, []int{0} } + +type SampleOneOf struct { + // Types that are valid to be assigned to TestOneof: + // *SampleOneOf_Field1 + // *SampleOneOf_Field2 + // *SampleOneOf_Field3 + // *SampleOneOf_Field4 + // *SampleOneOf_Field5 + // *SampleOneOf_Field6 + // *SampleOneOf_Field7 + // *SampleOneOf_Field8 + // *SampleOneOf_Field9 + // *SampleOneOf_Field10 + // *SampleOneOf_Field11 + // *SampleOneOf_Field12 + // *SampleOneOf_Field13 + // *SampleOneOf_Field14 + // *SampleOneOf_Field15 + // *SampleOneOf_SubMessage + TestOneof isSampleOneOf_TestOneof `protobuf_oneof:"test_oneof"` +} + +func (m *SampleOneOf) Reset() { *m = SampleOneOf{} } +func (*SampleOneOf) ProtoMessage() {} +func (*SampleOneOf) Descriptor() ([]byte, []int) { return fileDescriptorOne, []int{1} } + +type isSampleOneOf_TestOneof interface { + isSampleOneOf_TestOneof() + Equal(interface{}) bool + VerboseEqual(interface{}) error + Size() int +} + +type SampleOneOf_Field1 struct { + Field1 float64 `protobuf:"fixed64,1,opt,name=Field1,json=field1,proto3,oneof"` +} +type SampleOneOf_Field2 struct { + Field2 float32 `protobuf:"fixed32,2,opt,name=Field2,json=field2,proto3,oneof"` +} +type SampleOneOf_Field3 struct { + Field3 int32 `protobuf:"varint,3,opt,name=Field3,json=field3,proto3,oneof"` +} +type SampleOneOf_Field4 struct { + Field4 int64 `protobuf:"varint,4,opt,name=Field4,json=field4,proto3,oneof"` +} +type SampleOneOf_Field5 struct { + Field5 uint32 `protobuf:"varint,5,opt,name=Field5,json=field5,proto3,oneof"` +} +type SampleOneOf_Field6 struct { + Field6 uint64 `protobuf:"varint,6,opt,name=Field6,json=field6,proto3,oneof"` +} +type SampleOneOf_Field7 struct { + Field7 int32 `protobuf:"zigzag32,7,opt,name=Field7,json=field7,proto3,oneof"` +} +type SampleOneOf_Field8 struct { + Field8 int64 `protobuf:"zigzag64,8,opt,name=Field8,json=field8,proto3,oneof"` +} +type SampleOneOf_Field9 struct { + Field9 uint32 `protobuf:"fixed32,9,opt,name=Field9,json=field9,proto3,oneof"` +} +type SampleOneOf_Field10 struct { + Field10 int32 `protobuf:"fixed32,10,opt,name=Field10,json=field10,proto3,oneof"` +} +type SampleOneOf_Field11 struct { + Field11 uint64 `protobuf:"fixed64,11,opt,name=Field11,json=field11,proto3,oneof"` +} +type SampleOneOf_Field12 struct { + Field12 int64 `protobuf:"fixed64,12,opt,name=Field12,json=field12,proto3,oneof"` +} +type SampleOneOf_Field13 struct { + Field13 bool `protobuf:"varint,13,opt,name=Field13,json=field13,proto3,oneof"` +} +type SampleOneOf_Field14 struct { + Field14 string `protobuf:"bytes,14,opt,name=Field14,json=field14,proto3,oneof"` +} +type SampleOneOf_Field15 struct { + Field15 []byte `protobuf:"bytes,15,opt,name=Field15,json=field15,proto3,oneof"` +} +type SampleOneOf_SubMessage struct { + SubMessage *Subby `protobuf:"bytes,16,opt,name=sub_message,json=subMessage,oneof"` +} + +func (*SampleOneOf_Field1) isSampleOneOf_TestOneof() {} +func (*SampleOneOf_Field2) isSampleOneOf_TestOneof() {} +func (*SampleOneOf_Field3) isSampleOneOf_TestOneof() {} +func (*SampleOneOf_Field4) isSampleOneOf_TestOneof() {} +func (*SampleOneOf_Field5) isSampleOneOf_TestOneof() {} +func (*SampleOneOf_Field6) isSampleOneOf_TestOneof() {} +func (*SampleOneOf_Field7) isSampleOneOf_TestOneof() {} +func (*SampleOneOf_Field8) isSampleOneOf_TestOneof() {} +func (*SampleOneOf_Field9) isSampleOneOf_TestOneof() {} +func (*SampleOneOf_Field10) isSampleOneOf_TestOneof() {} +func (*SampleOneOf_Field11) isSampleOneOf_TestOneof() {} +func (*SampleOneOf_Field12) isSampleOneOf_TestOneof() {} +func (*SampleOneOf_Field13) isSampleOneOf_TestOneof() {} +func (*SampleOneOf_Field14) isSampleOneOf_TestOneof() {} +func (*SampleOneOf_Field15) isSampleOneOf_TestOneof() {} +func (*SampleOneOf_SubMessage) isSampleOneOf_TestOneof() {} + +func (m *SampleOneOf) GetTestOneof() isSampleOneOf_TestOneof { + if m != nil { + return m.TestOneof + } + return nil +} + +func (m *SampleOneOf) GetField1() float64 { + if x, ok := m.GetTestOneof().(*SampleOneOf_Field1); ok { + return x.Field1 + } + return 0 +} + +func (m *SampleOneOf) GetField2() float32 { + if x, ok := m.GetTestOneof().(*SampleOneOf_Field2); ok { + return x.Field2 + } + return 0 +} + +func (m *SampleOneOf) GetField3() int32 { + if x, ok := m.GetTestOneof().(*SampleOneOf_Field3); ok { + return x.Field3 + } + return 0 +} + +func (m *SampleOneOf) GetField4() int64 { + if x, ok := m.GetTestOneof().(*SampleOneOf_Field4); ok { + return x.Field4 + } + return 0 +} + +func (m *SampleOneOf) GetField5() uint32 { + if x, ok := m.GetTestOneof().(*SampleOneOf_Field5); ok { + return x.Field5 + } + return 0 +} + +func (m *SampleOneOf) GetField6() uint64 { + if x, ok := m.GetTestOneof().(*SampleOneOf_Field6); ok { + return x.Field6 + } + return 0 +} + +func (m *SampleOneOf) GetField7() int32 { + if x, ok := m.GetTestOneof().(*SampleOneOf_Field7); ok { + return x.Field7 + } + return 0 +} + +func (m *SampleOneOf) GetField8() int64 { + if x, ok := m.GetTestOneof().(*SampleOneOf_Field8); ok { + return x.Field8 + } + return 0 +} + +func (m *SampleOneOf) GetField9() uint32 { + if x, ok := m.GetTestOneof().(*SampleOneOf_Field9); ok { + return x.Field9 + } + return 0 +} + +func (m *SampleOneOf) GetField10() int32 { + if x, ok := m.GetTestOneof().(*SampleOneOf_Field10); ok { + return x.Field10 + } + return 0 +} + +func (m *SampleOneOf) GetField11() uint64 { + if x, ok := m.GetTestOneof().(*SampleOneOf_Field11); ok { + return x.Field11 + } + return 0 +} + +func (m *SampleOneOf) GetField12() int64 { + if x, ok := m.GetTestOneof().(*SampleOneOf_Field12); ok { + return x.Field12 + } + return 0 +} + +func (m *SampleOneOf) GetField13() bool { + if x, ok := m.GetTestOneof().(*SampleOneOf_Field13); ok { + return x.Field13 + } + return false +} + +func (m *SampleOneOf) GetField14() string { + if x, ok := m.GetTestOneof().(*SampleOneOf_Field14); ok { + return x.Field14 + } + return "" +} + +func (m *SampleOneOf) GetField15() []byte { + if x, ok := m.GetTestOneof().(*SampleOneOf_Field15); ok { + return x.Field15 + } + return nil +} + +func (m *SampleOneOf) GetSubMessage() *Subby { + if x, ok := m.GetTestOneof().(*SampleOneOf_SubMessage); ok { + return x.SubMessage + } + return nil +} + +// XXX_OneofFuncs is for the internal use of the proto package. +func (*SampleOneOf) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{}) { + return _SampleOneOf_OneofMarshaler, _SampleOneOf_OneofUnmarshaler, _SampleOneOf_OneofSizer, []interface{}{ + (*SampleOneOf_Field1)(nil), + (*SampleOneOf_Field2)(nil), + (*SampleOneOf_Field3)(nil), + (*SampleOneOf_Field4)(nil), + (*SampleOneOf_Field5)(nil), + (*SampleOneOf_Field6)(nil), + (*SampleOneOf_Field7)(nil), + (*SampleOneOf_Field8)(nil), + (*SampleOneOf_Field9)(nil), + (*SampleOneOf_Field10)(nil), + (*SampleOneOf_Field11)(nil), + (*SampleOneOf_Field12)(nil), + (*SampleOneOf_Field13)(nil), + (*SampleOneOf_Field14)(nil), + (*SampleOneOf_Field15)(nil), + (*SampleOneOf_SubMessage)(nil), + } +} + +func _SampleOneOf_OneofMarshaler(msg proto.Message, b *proto.Buffer) error { + m := msg.(*SampleOneOf) + // test_oneof + switch x := m.TestOneof.(type) { + case *SampleOneOf_Field1: + _ = b.EncodeVarint(1<<3 | proto.WireFixed64) + _ = b.EncodeFixed64(math.Float64bits(x.Field1)) + case *SampleOneOf_Field2: + _ = b.EncodeVarint(2<<3 | proto.WireFixed32) + _ = b.EncodeFixed32(uint64(math.Float32bits(x.Field2))) + case *SampleOneOf_Field3: + _ = b.EncodeVarint(3<<3 | proto.WireVarint) + _ = b.EncodeVarint(uint64(x.Field3)) + case *SampleOneOf_Field4: + _ = b.EncodeVarint(4<<3 | proto.WireVarint) + _ = b.EncodeVarint(uint64(x.Field4)) + case *SampleOneOf_Field5: + _ = b.EncodeVarint(5<<3 | proto.WireVarint) + _ = b.EncodeVarint(uint64(x.Field5)) + case *SampleOneOf_Field6: + _ = b.EncodeVarint(6<<3 | proto.WireVarint) + _ = b.EncodeVarint(uint64(x.Field6)) + case *SampleOneOf_Field7: + _ = b.EncodeVarint(7<<3 | proto.WireVarint) + _ = b.EncodeZigzag32(uint64(x.Field7)) + case *SampleOneOf_Field8: + _ = b.EncodeVarint(8<<3 | proto.WireVarint) + _ = b.EncodeZigzag64(uint64(x.Field8)) + case *SampleOneOf_Field9: + _ = b.EncodeVarint(9<<3 | proto.WireFixed32) + _ = b.EncodeFixed32(uint64(x.Field9)) + case *SampleOneOf_Field10: + _ = b.EncodeVarint(10<<3 | proto.WireFixed32) + _ = b.EncodeFixed32(uint64(x.Field10)) + case *SampleOneOf_Field11: + _ = b.EncodeVarint(11<<3 | proto.WireFixed64) + _ = b.EncodeFixed64(uint64(x.Field11)) + case *SampleOneOf_Field12: + _ = b.EncodeVarint(12<<3 | proto.WireFixed64) + _ = b.EncodeFixed64(uint64(x.Field12)) + case *SampleOneOf_Field13: + t := uint64(0) + if x.Field13 { + t = 1 + } + _ = b.EncodeVarint(13<<3 | proto.WireVarint) + _ = b.EncodeVarint(t) + case *SampleOneOf_Field14: + _ = b.EncodeVarint(14<<3 | proto.WireBytes) + _ = b.EncodeStringBytes(x.Field14) + case *SampleOneOf_Field15: + _ = b.EncodeVarint(15<<3 | proto.WireBytes) + _ = b.EncodeRawBytes(x.Field15) + case *SampleOneOf_SubMessage: + _ = b.EncodeVarint(16<<3 | proto.WireBytes) + if err := b.EncodeMessage(x.SubMessage); err != nil { + return err + } + case nil: + default: + return fmt.Errorf("SampleOneOf.TestOneof has unexpected type %T", x) + } + return nil +} + +func _SampleOneOf_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) { + m := msg.(*SampleOneOf) + switch tag { + case 1: // test_oneof.Field1 + if wire != proto.WireFixed64 { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeFixed64() + m.TestOneof = &SampleOneOf_Field1{math.Float64frombits(x)} + return true, err + case 2: // test_oneof.Field2 + if wire != proto.WireFixed32 { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeFixed32() + m.TestOneof = &SampleOneOf_Field2{math.Float32frombits(uint32(x))} + return true, err + case 3: // test_oneof.Field3 + if wire != proto.WireVarint { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeVarint() + m.TestOneof = &SampleOneOf_Field3{int32(x)} + return true, err + case 4: // test_oneof.Field4 + if wire != proto.WireVarint { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeVarint() + m.TestOneof = &SampleOneOf_Field4{int64(x)} + return true, err + case 5: // test_oneof.Field5 + if wire != proto.WireVarint { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeVarint() + m.TestOneof = &SampleOneOf_Field5{uint32(x)} + return true, err + case 6: // test_oneof.Field6 + if wire != proto.WireVarint { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeVarint() + m.TestOneof = &SampleOneOf_Field6{x} + return true, err + case 7: // test_oneof.Field7 + if wire != proto.WireVarint { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeZigzag32() + m.TestOneof = &SampleOneOf_Field7{int32(x)} + return true, err + case 8: // test_oneof.Field8 + if wire != proto.WireVarint { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeZigzag64() + m.TestOneof = &SampleOneOf_Field8{int64(x)} + return true, err + case 9: // test_oneof.Field9 + if wire != proto.WireFixed32 { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeFixed32() + m.TestOneof = &SampleOneOf_Field9{uint32(x)} + return true, err + case 10: // test_oneof.Field10 + if wire != proto.WireFixed32 { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeFixed32() + m.TestOneof = &SampleOneOf_Field10{int32(x)} + return true, err + case 11: // test_oneof.Field11 + if wire != proto.WireFixed64 { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeFixed64() + m.TestOneof = &SampleOneOf_Field11{x} + return true, err + case 12: // test_oneof.Field12 + if wire != proto.WireFixed64 { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeFixed64() + m.TestOneof = &SampleOneOf_Field12{int64(x)} + return true, err + case 13: // test_oneof.Field13 + if wire != proto.WireVarint { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeVarint() + m.TestOneof = &SampleOneOf_Field13{x != 0} + return true, err + case 14: // test_oneof.Field14 + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeStringBytes() + m.TestOneof = &SampleOneOf_Field14{x} + return true, err + case 15: // test_oneof.Field15 + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeRawBytes(true) + m.TestOneof = &SampleOneOf_Field15{x} + return true, err + case 16: // test_oneof.sub_message + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + msg := new(Subby) + err := b.DecodeMessage(msg) + m.TestOneof = &SampleOneOf_SubMessage{msg} + return true, err + default: + return false, nil + } +} + +func _SampleOneOf_OneofSizer(msg proto.Message) (n int) { + m := msg.(*SampleOneOf) + // test_oneof + switch x := m.TestOneof.(type) { + case *SampleOneOf_Field1: + n += proto.SizeVarint(1<<3 | proto.WireFixed64) + n += 8 + case *SampleOneOf_Field2: + n += proto.SizeVarint(2<<3 | proto.WireFixed32) + n += 4 + case *SampleOneOf_Field3: + n += proto.SizeVarint(3<<3 | proto.WireVarint) + n += proto.SizeVarint(uint64(x.Field3)) + case *SampleOneOf_Field4: + n += proto.SizeVarint(4<<3 | proto.WireVarint) + n += proto.SizeVarint(uint64(x.Field4)) + case *SampleOneOf_Field5: + n += proto.SizeVarint(5<<3 | proto.WireVarint) + n += proto.SizeVarint(uint64(x.Field5)) + case *SampleOneOf_Field6: + n += proto.SizeVarint(6<<3 | proto.WireVarint) + n += proto.SizeVarint(uint64(x.Field6)) + case *SampleOneOf_Field7: + n += proto.SizeVarint(7<<3 | proto.WireVarint) + n += proto.SizeVarint(uint64((uint32(x.Field7) << 1) ^ uint32((int32(x.Field7) >> 31)))) + case *SampleOneOf_Field8: + n += proto.SizeVarint(8<<3 | proto.WireVarint) + n += proto.SizeVarint(uint64(uint64(x.Field8<<1) ^ uint64((int64(x.Field8) >> 63)))) + case *SampleOneOf_Field9: + n += proto.SizeVarint(9<<3 | proto.WireFixed32) + n += 4 + case *SampleOneOf_Field10: + n += proto.SizeVarint(10<<3 | proto.WireFixed32) + n += 4 + case *SampleOneOf_Field11: + n += proto.SizeVarint(11<<3 | proto.WireFixed64) + n += 8 + case *SampleOneOf_Field12: + n += proto.SizeVarint(12<<3 | proto.WireFixed64) + n += 8 + case *SampleOneOf_Field13: + n += proto.SizeVarint(13<<3 | proto.WireVarint) + n += 1 + case *SampleOneOf_Field14: + n += proto.SizeVarint(14<<3 | proto.WireBytes) + n += proto.SizeVarint(uint64(len(x.Field14))) + n += len(x.Field14) + case *SampleOneOf_Field15: + n += proto.SizeVarint(15<<3 | proto.WireBytes) + n += proto.SizeVarint(uint64(len(x.Field15))) + n += len(x.Field15) + case *SampleOneOf_SubMessage: + s := proto.Size(x.SubMessage) + n += proto.SizeVarint(16<<3 | proto.WireBytes) + n += proto.SizeVarint(uint64(s)) + n += s + case nil: + default: + panic(fmt.Sprintf("proto: unexpected type %T in oneof", x)) + } + return n +} + +func init() { + proto.RegisterType((*Subby)(nil), "one.Subby") + proto.RegisterType((*SampleOneOf)(nil), "one.SampleOneOf") +} +func (this *Subby) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return OneDescription() +} +func (this *SampleOneOf) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return OneDescription() +} +func OneDescription() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + d := &github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet{} + var gzipped = []byte{ + // 3542 bytes of a gzipped FileDescriptorSet + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xcc, 0x5a, 0x59, 0x6c, 0x1b, 0xe7, + 0xb5, 0x36, 0xc5, 0x45, 0xe4, 0xa1, 0x44, 0x51, 0x23, 0xc5, 0xa6, 0x15, 0xc7, 0x8e, 0x95, 0xcd, + 0x71, 0x6e, 0x24, 0x5b, 0xde, 0x99, 0x7b, 0x13, 0x68, 0xa1, 0x15, 0x19, 0x92, 0xa8, 0x3b, 0x94, + 0x12, 0x27, 0xf7, 0x61, 0x30, 0x22, 0x7f, 0x51, 0xb4, 0x87, 0x33, 0xbc, 0x9c, 0xa1, 0x63, 0xe5, + 0x29, 0x17, 0xb9, 0xf7, 0x16, 0x41, 0xd1, 0xbd, 0x40, 0x13, 0x67, 0x69, 0x13, 0xa0, 0x4d, 0x9a, + 0x6e, 0x49, 0x37, 0x14, 0x7d, 0x2a, 0x50, 0xa4, 0xcd, 0x53, 0xd1, 0xf6, 0xa9, 0x0f, 0x7d, 0x48, + 0xd2, 0x00, 0x4d, 0xdb, 0xb4, 0x4d, 0x01, 0x03, 0x0d, 0x90, 0x97, 0x9e, 0x7f, 0x9b, 0x85, 0xa4, + 0x34, 0x54, 0x80, 0x34, 0x15, 0x40, 0x88, 0x73, 0xce, 0x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 0xe6, 0x8e, 0xa7, 0x6f, 0x7f, 0xf2, 0xb4, 0x40, 0xad, 0x22, 0x48, 0x99, 0x86, 0x14, 0x31, 0x5b, + 0x75, 0xce, 0x10, 0xdf, 0xc6, 0x7f, 0x05, 0xb4, 0x68, 0x67, 0x49, 0x52, 0x98, 0xa0, 0xe8, 0xb7, + 0x49, 0xf3, 0x4a, 0xad, 0x4c, 0x72, 0x09, 0x46, 0x70, 0x47, 0x07, 0x41, 0x89, 0xeb, 0xdb, 0x39, + 0x24, 0x0e, 0x1f, 0x25, 0x45, 0xae, 0x3a, 0xc4, 0xb4, 0x6b, 0x96, 0x99, 0xeb, 0x67, 0x24, 0xb7, + 0x75, 0x99, 0x45, 0x62, 0x54, 0xda, 0x29, 0x3c, 0x9c, 0x72, 0x1a, 0xfa, 0xad, 0x86, 0x83, 0xdf, + 0xec, 0x5c, 0x12, 0xe7, 0x27, 0x3d, 0x75, 0xa0, 0x6b, 0x20, 0x14, 0xb9, 0x8d, 0x2a, 0x8d, 0x95, + 0x05, 0xc8, 0xda, 0x56, 0xab, 0x59, 0x26, 0x5a, 0xd9, 0xaa, 0x10, 0xad, 0x66, 0x6e, 0x58, 0xb9, + 0x14, 0x23, 0x38, 0xd4, 0xf9, 0x20, 0xcc, 0x70, 0x16, 0xed, 0x16, 0xd0, 0x4c, 0xcd, 0xd8, 0x81, + 0x6b, 0x65, 0x2f, 0x24, 0xec, 0x2d, 0xd3, 0xd1, 0xaf, 0xe6, 0x06, 0x58, 0x84, 0x88, 0xab, 0xf1, + 0xbf, 0xc7, 0x61, 0xa8, 0x97, 0x10, 0xbb, 0x07, 0xe2, 0x1b, 0xf4, 0x29, 0x31, 0xc0, 0x76, 0xe1, + 0x03, 0x8e, 0x09, 0x3a, 0x31, 0xf1, 0x21, 0x9d, 0x38, 0x0d, 0x69, 0x93, 0xd8, 0x0e, 0xa9, 0xf0, + 0x88, 0x88, 0xf6, 0x18, 0x53, 0xc0, 0x41, 0x9d, 0x21, 0x15, 0xfb, 0x50, 0x21, 0x75, 0x11, 0x86, + 0xdc, 0x21, 0x69, 0x4d, 0xdd, 0xac, 0xca, 0xd8, 0x9c, 0x0c, 0x1b, 0xc9, 0x44, 0x41, 0xe2, 0x54, + 0x0a, 0x53, 0x33, 0x24, 0x70, 0xad, 0xcc, 0x01, 0x58, 0x26, 0xb1, 0x36, 0x70, 0x79, 0x95, 0x0d, + 0x8c, 0x93, 0xee, 0x5e, 0x2a, 0x52, 0x93, 0x0e, 0x2f, 0x59, 0x5c, 0x5a, 0x36, 0x94, 0x73, 0x5e, + 0xa8, 0xf5, 0x6f, 0x13, 0x29, 0x4b, 0x7c, 0x91, 0x75, 0x44, 0xdb, 0x1a, 0x64, 0x9a, 0x84, 0xc6, + 0x3d, 0xba, 0x98, 0x3f, 0x59, 0x8a, 0x0d, 0x62, 0x22, 0xf4, 0xc9, 0x54, 0x01, 0xe3, 0x0f, 0x36, + 0xd8, 0xf4, 0x5f, 0x2a, 0xb7, 0x80, 0x2b, 0xd0, 0x58, 0x58, 0x01, 0xcb, 0x42, 0x03, 0x52, 0xb8, + 0x8c, 0xb2, 0xb1, 0xb3, 0x90, 0x09, 0xba, 0x47, 0x19, 0x85, 0xb8, 0xed, 0xe8, 0x4d, 0x87, 0x45, + 0x61, 0x5c, 0xe5, 0x17, 0x4a, 0x16, 0xa2, 0x98, 0x64, 0x58, 0x96, 0x8b, 0xab, 0xf4, 0xeb, 0xd8, + 0x19, 0x18, 0x0c, 0xdc, 0xbe, 0x57, 0xe0, 0xf8, 0x93, 0x09, 0x18, 0xed, 0x16, 0x73, 0x5d, 0xc3, + 0x1f, 0x97, 0x0f, 0x46, 0xc0, 0x3a, 0x69, 0x62, 0xdc, 0x51, 0x06, 0x71, 0x85, 0x11, 0x15, 0x37, + 0xf4, 0x75, 0x62, 0x60, 0x34, 0x45, 0x8e, 0x64, 0xa6, 0xee, 0xea, 0x29, 0xaa, 0x27, 0x16, 0x29, + 0x44, 0xe5, 0x48, 0xe5, 0x5e, 0x88, 0x89, 0x14, 0x47, 0x19, 0x8e, 0xf6, 0xc6, 0x40, 0x63, 0x51, + 0x65, 0x38, 0xe5, 0x46, 0x48, 0xd1, 0xff, 0xdc, 0xb7, 0x09, 0x36, 0xe6, 0x24, 0x15, 0x50, 0xbf, + 0x2a, 0x63, 0x90, 0x64, 0x61, 0x56, 0x21, 0xb2, 0x34, 0xb8, 0xd7, 0x74, 0x62, 0x2a, 0x64, 0x43, + 0x6f, 0x19, 0x8e, 0x76, 0x45, 0x37, 0x5a, 0x84, 0x05, 0x0c, 0x4e, 0x8c, 0x10, 0x3e, 0x40, 0x65, + 0xca, 0x21, 0x48, 0xf3, 0xa8, 0xac, 0x21, 0xe6, 0x2a, 0xcb, 0x3e, 0x71, 0x95, 0x07, 0xea, 0x02, + 0x95, 0xd0, 0xdb, 0x5f, 0xb2, 0x71, 0x2d, 0x88, 0xa9, 0x65, 0xb7, 0xa0, 0x02, 0x76, 0xfb, 0x33, + 0xed, 0x89, 0xef, 0xa6, 0xee, 0x8f, 0xd7, 0x1e, 0x8b, 0xe3, 0x3f, 0xec, 0x83, 0x18, 0x5b, 0x6f, + 0x43, 0x90, 0x5e, 0x7d, 0x68, 0xa5, 0xa0, 0xcd, 0x15, 0xd7, 0x66, 0x16, 0x0b, 0xd9, 0x88, 0x92, + 0x01, 0x60, 0x82, 0xf3, 0x8b, 0xc5, 0xe9, 0xd5, 0x6c, 0x9f, 0x7b, 0xbd, 0xb0, 0xbc, 0x7a, 0xfa, + 0x64, 0x36, 0xea, 0x02, 0xd6, 0xb8, 0x20, 0xe6, 0x37, 0x38, 0x31, 0x95, 0x8d, 0x63, 0x24, 0x0c, + 0x70, 0x82, 0x85, 0x8b, 0x85, 0x39, 0xb4, 0x48, 0x04, 0x25, 0x68, 0xd3, 0xaf, 0x0c, 0x42, 0x8a, + 0x49, 0x66, 0x8a, 0xc5, 0xc5, 0x6c, 0xd2, 0xe5, 0x2c, 0xad, 0xaa, 0x0b, 0xcb,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b, 0x18, 0xee, 0x85, 0x44, 0x9d, 0x38, 0x9b, 0x96, 0xac, 0xb9, 0xb7, 0x77, + 0xc9, 0xe4, 0x54, 0xdd, 0xee, 0x2b, 0x81, 0xf2, 0x97, 0x82, 0xe8, 0x76, 0x4d, 0x03, 0x1f, 0x4d, + 0xc7, 0x48, 0x9f, 0xe8, 0x83, 0x1b, 0xba, 0x92, 0x77, 0x1d, 0xe8, 0x4d, 0x00, 0x35, 0xb3, 0xd1, + 0x72, 0x78, 0x5d, 0xe5, 0x69, 0x26, 0xc5, 0x24, 0x6c, 0x09, 0xd3, 0x14, 0xd2, 0x72, 0x5c, 0x7d, + 0x94, 0xe9, 0x81, 0x8b, 0x98, 0xc1, 0x59, 0x6f, 0xa0, 0x31, 0x36, 0xd0, 0x83, 0xdb, 0x3c, 0x69, + 0x47, 0xc9, 0x3a, 0x06, 0xd9, 0xb2, 0x51, 0x23, 0xa6, 0xa3, 0xd9, 0x4e, 0x93, 0xe8, 0xf5, 0x9a, + 0x59, 0x65, 0x79, 0x34, 0x99, 0x8f, 0x6f, 0xe8, 0x86, 0x4d, 0xd4, 0x21, 0xae, 0x2e, 0x49, 0x2d, + 0x45, 0xb0, 0x62, 0xd1, 0xf4, 0x21, 0x12, 0x01, 0x04, 0x57, 0xbb, 0x88, 0xf1, 0x5f, 0xf7, 0x43, + 0xda, 0xd7, 0x9d, 0x29, 0x87, 0x61, 0xe0, 0x92, 0x7e, 0x45, 0xd7, 0x64, 0xc7, 0xcd, 0x3d, 0x91, + 0xa6, 0xb2, 0x15, 0xd1, 0x75, 0x1f, 0x83, 0x51, 0x66, 0x82, 0xcf, 0x88, 0x37, 0x2a, 0x1b, 0xba, + 0x6d, 0x33, 0xa7, 0x25, 0x99, 0xa9, 0x42, 0x75, 0x45, 0xaa, 0x9a, 0x95, 0x1a, 0xe5, 0x14, 0x8c, + 0x30, 0x44, 0x1d, 0x13, 0x6f, 0xad, 0x61, 0x10, 0x8d, 0xee, 0x01, 0x6c, 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x76, 0xd8, 0x6d, 0x6c, 0x03, 0xd6, 0x24, 0x65, 0x74, 0x79, 0x25, 0xb7, 0xcf, 0x6f, + 0xed, 0x53, 0x28, 0x93, 0x18, 0xc8, 0x65, 0x8d, 0x98, 0xfa, 0x3a, 0xce, 0xbd, 0xde, 0xc4, 0x2f, + 0x76, 0xee, 0x90, 0xdf, 0x38, 0x53, 0x2e, 0x17, 0x98, 0x76, 0x9a, 0x29, 0x95, 0xa3, 0x30, 0x6c, + 0xad, 0x5f, 0x2a, 0xf3, 0xe0, 0xd2, 0x90, 0x67, 0xa3, 0x76, 0x35, 0x77, 0x2b, 0x73, 0xd3, 0x10, + 0x55, 0xb0, 0xd0, 0x5a, 0x61, 0x62, 0xe5, 0x4e, 0x24, 0xb7, 0x37, 0xf5, 0x66, 0x83, 0x15, 0x69, + 0x1b, 0x9d, 0x4a, 0x72, 0xb7, 0x71, 0x53, 0x2e, 0x5f, 0x96, 0x62, 0xa5, 0x00, 0x87, 0xe8, 0xc3, + 0x9b, 0xba, 0x69, 0x69, 0x2d, 0x9b, 0x68, 0xde, 0x10, 0xdd, 0xb9, 0xb8, 0x9d, 0x0e, 0x4b, 0x3d, + 0x20, 0xcd, 0xd6, 0x6c, 0x4c, 0x66, 0xd2, 0x48, 0x4e, 0xcf, 0x45, 0x18, 0x6d, 0x99, 0x35, 0x13, + 0x43, 0x1c, 0x35, 0x14, 0xcc, 0x17, 0x6c, 0xee, 0xf7, 0xfd, 0xdb, 0x34, 0xdd, 0x6b, 0x7e, 0x6b, + 0x1e, 0x24, 0xea, 0x48, 0xab, 0x53, 0x38, 0x9e, 0x87, 0x01, 0x7f, 0xec, 0x28, 0x29, 0xe0, 0xd1, + 0x83, 0xd5, 0x0d, 0x2b, 0xea, 0x6c, 0x71, 0x8e, 0xd6, 0xc2, 0x87, 0x0b, 0x58, 0xd8, 0xb0, 0x26, + 0x2f, 0x2e, 0xac, 0x16, 0x34, 0x75, 0x6d, 0x79, 0x75, 0x61, 0xa9,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 0xd3, 0x9d, 0xf0, 0x74, 0x27, 0x73, 0x19, 0xea, 0x7f, 0x4f, 0x77, 0xd2, 0xd3, + 0x9d, 0xca, 0x0d, 0xd1, 0x03, 0x5b, 0x4f, 0x77, 0x4a, 0xb9, 0x1b, 0xd2, 0x38, 0x51, 0x9a, 0x78, + 0xc7, 0xc8, 0x5e, 0x68, 0xa7, 0xa7, 0x60, 0x82, 0x46, 0x04, 0x9b, 0x54, 0xb4, 0x05, 0x34, 0x10, + 0x09, 0x6a, 0x66, 0x00, 0xd8, 0xc6, 0x55, 0x63, 0x3f, 0xc8, 0x9a, 0x99, 0x7b, 0xfd, 0xcd, 0x83, + 0x7b, 0x7e, 0x89, 0x9f, 0xdf, 0xe0, 0xe7, 0x8d, 0x37, 0x0f, 0x46, 0xde, 0xc3, 0xcf, 0xfb, 0xf8, + 0x79, 0xec, 0xad, 0x83, 0x91, 0x97, 0xf0, 0xf3, 0x0a, 0x7e, 0x7e, 0x84, 0x9f, 0xd7, 0xdf, 0x42, + 0x3b, 0xfc, 0xff, 0x06, 0x7e, 0xde, 0xc1, 0xef, 0xef, 0xe1, 0xff, 0xf7, 0xf1, 0xff, 0x63, 0xbf, + 0x3b, 0xb8, 0x67, 0x3d, 0xc1, 0xc2, 0xe8, 0xc4, 0x3f, 0x02, 0x00, 0x00, 0xff, 0xff, 0x65, 0xc5, + 0x89, 0x4f, 0x07, 0x2d, 0x00, 0x00, + } + r := bytes.NewReader(gzipped) + gzipr, err := compress_gzip.NewReader(r) + if err != nil { + panic(err) + } + ungzipped, err := io_ioutil.ReadAll(gzipr) + if err != nil { + panic(err) + } + if err := github_com_gogo_protobuf_proto.Unmarshal(ungzipped, d); err != nil { + panic(err) + } + return d +} +func (this *Subby) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*Subby) + if !ok { + that2, ok := that.(Subby) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *Subby") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *Subby but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *Subby but is not nil && this == nil") + } + if this.Sub != that1.Sub { + return fmt.Errorf("Sub this(%v) Not Equal that(%v)", this.Sub, that1.Sub) + } + return nil +} +func (this *Subby) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*Subby) + if !ok { + that2, ok := that.(Subby) + 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.Sub != that1.Sub { + return false + } + return true +} +func (this *SampleOneOf) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*SampleOneOf) + if !ok { + that2, ok := that.(SampleOneOf) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *SampleOneOf") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *SampleOneOf but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *SampleOneOf but is not nil && this == nil") + } + if that1.TestOneof == nil { + if this.TestOneof != nil { + return fmt.Errorf("this.TestOneof != nil && that1.TestOneof == nil") + } + } else if this.TestOneof == nil { + return fmt.Errorf("this.TestOneof == nil && that1.TestOneof != nil") + } else if err := this.TestOneof.VerboseEqual(that1.TestOneof); err != nil { + return err + } + return nil +} +func (this *SampleOneOf_Field1) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*SampleOneOf_Field1) + if !ok { + that2, ok := that.(SampleOneOf_Field1) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *SampleOneOf_Field1") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *SampleOneOf_Field1 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *SampleOneOf_Field1 but is not nil && this == nil") + } + if this.Field1 != that1.Field1 { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) + } + return nil +} +func (this *SampleOneOf_Field2) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*SampleOneOf_Field2) + if !ok { + that2, ok := that.(SampleOneOf_Field2) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *SampleOneOf_Field2") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *SampleOneOf_Field2 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *SampleOneOf_Field2 but is not nil && this == nil") + } + if this.Field2 != that1.Field2 { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) + } + return nil +} +func (this *SampleOneOf_Field3) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*SampleOneOf_Field3) + if !ok { + that2, ok := that.(SampleOneOf_Field3) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *SampleOneOf_Field3") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *SampleOneOf_Field3 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *SampleOneOf_Field3 but is not nil && this == nil") + } + if this.Field3 != that1.Field3 { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", this.Field3, that1.Field3) + } + return nil +} +func (this *SampleOneOf_Field4) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*SampleOneOf_Field4) + if !ok { + that2, ok := that.(SampleOneOf_Field4) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *SampleOneOf_Field4") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *SampleOneOf_Field4 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *SampleOneOf_Field4 but is not nil && this == nil") + } + if this.Field4 != that1.Field4 { + return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", this.Field4, that1.Field4) + } + return nil +} +func (this *SampleOneOf_Field5) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*SampleOneOf_Field5) + if !ok { + that2, ok := that.(SampleOneOf_Field5) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *SampleOneOf_Field5") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *SampleOneOf_Field5 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *SampleOneOf_Field5 but is not nil && this == nil") + } + if this.Field5 != that1.Field5 { + return fmt.Errorf("Field5 this(%v) Not Equal that(%v)", this.Field5, that1.Field5) + } + return nil +} +func (this *SampleOneOf_Field6) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*SampleOneOf_Field6) + if !ok { + that2, ok := that.(SampleOneOf_Field6) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *SampleOneOf_Field6") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *SampleOneOf_Field6 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *SampleOneOf_Field6 but is not nil && this == nil") + } + if this.Field6 != that1.Field6 { + return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", this.Field6, that1.Field6) + } + return nil +} +func (this *SampleOneOf_Field7) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*SampleOneOf_Field7) + if !ok { + that2, ok := that.(SampleOneOf_Field7) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *SampleOneOf_Field7") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *SampleOneOf_Field7 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *SampleOneOf_Field7 but is not nil && this == nil") + } + if this.Field7 != that1.Field7 { + return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", this.Field7, that1.Field7) + } + return nil +} +func (this *SampleOneOf_Field8) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*SampleOneOf_Field8) + if !ok { + that2, ok := that.(SampleOneOf_Field8) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *SampleOneOf_Field8") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *SampleOneOf_Field8 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *SampleOneOf_Field8 but is not nil && this == nil") + } + if this.Field8 != that1.Field8 { + return fmt.Errorf("Field8 this(%v) Not Equal that(%v)", this.Field8, that1.Field8) + } + return nil +} +func (this *SampleOneOf_Field9) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*SampleOneOf_Field9) + if !ok { + that2, ok := that.(SampleOneOf_Field9) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *SampleOneOf_Field9") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *SampleOneOf_Field9 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *SampleOneOf_Field9 but is not nil && this == nil") + } + if this.Field9 != that1.Field9 { + return fmt.Errorf("Field9 this(%v) Not Equal that(%v)", this.Field9, that1.Field9) + } + return nil +} +func (this *SampleOneOf_Field10) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*SampleOneOf_Field10) + if !ok { + that2, ok := that.(SampleOneOf_Field10) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *SampleOneOf_Field10") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *SampleOneOf_Field10 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *SampleOneOf_Field10 but is not nil && this == nil") + } + if this.Field10 != that1.Field10 { + return fmt.Errorf("Field10 this(%v) Not Equal that(%v)", this.Field10, that1.Field10) + } + return nil +} +func (this *SampleOneOf_Field11) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*SampleOneOf_Field11) + if !ok { + that2, ok := that.(SampleOneOf_Field11) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *SampleOneOf_Field11") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *SampleOneOf_Field11 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *SampleOneOf_Field11 but is not nil && this == nil") + } + if this.Field11 != that1.Field11 { + return fmt.Errorf("Field11 this(%v) Not Equal that(%v)", this.Field11, that1.Field11) + } + return nil +} +func (this *SampleOneOf_Field12) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*SampleOneOf_Field12) + if !ok { + that2, ok := that.(SampleOneOf_Field12) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *SampleOneOf_Field12") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *SampleOneOf_Field12 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *SampleOneOf_Field12 but is not nil && this == nil") + } + if this.Field12 != that1.Field12 { + return fmt.Errorf("Field12 this(%v) Not Equal that(%v)", this.Field12, that1.Field12) + } + return nil +} +func (this *SampleOneOf_Field13) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*SampleOneOf_Field13) + if !ok { + that2, ok := that.(SampleOneOf_Field13) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *SampleOneOf_Field13") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *SampleOneOf_Field13 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *SampleOneOf_Field13 but is not nil && this == nil") + } + if this.Field13 != that1.Field13 { + return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", this.Field13, that1.Field13) + } + return nil +} +func (this *SampleOneOf_Field14) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*SampleOneOf_Field14) + if !ok { + that2, ok := that.(SampleOneOf_Field14) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *SampleOneOf_Field14") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *SampleOneOf_Field14 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *SampleOneOf_Field14 but is not nil && this == nil") + } + if this.Field14 != that1.Field14 { + return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", this.Field14, that1.Field14) + } + return nil +} +func (this *SampleOneOf_Field15) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*SampleOneOf_Field15) + if !ok { + that2, ok := that.(SampleOneOf_Field15) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *SampleOneOf_Field15") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *SampleOneOf_Field15 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *SampleOneOf_Field15 but is not nil && this == nil") + } + if !bytes.Equal(this.Field15, that1.Field15) { + return fmt.Errorf("Field15 this(%v) Not Equal that(%v)", this.Field15, that1.Field15) + } + return nil +} +func (this *SampleOneOf_SubMessage) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*SampleOneOf_SubMessage) + if !ok { + that2, ok := that.(SampleOneOf_SubMessage) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *SampleOneOf_SubMessage") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *SampleOneOf_SubMessage but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *SampleOneOf_SubMessage but is not nil && this == nil") + } + if !this.SubMessage.Equal(that1.SubMessage) { + return fmt.Errorf("SubMessage this(%v) Not Equal that(%v)", this.SubMessage, that1.SubMessage) + } + return nil +} +func (this *SampleOneOf) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*SampleOneOf) + if !ok { + that2, ok := that.(SampleOneOf) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + if this == nil { + return true + } + return false + } else if this == nil { + return false + } + if that1.TestOneof == nil { + if this.TestOneof != nil { + return false + } + } else if this.TestOneof == nil { + return false + } else if !this.TestOneof.Equal(that1.TestOneof) { + return false + } + return true +} +func (this *SampleOneOf_Field1) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*SampleOneOf_Field1) + if !ok { + that2, ok := that.(SampleOneOf_Field1) + 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.Field1 != that1.Field1 { + return false + } + return true +} +func (this *SampleOneOf_Field2) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*SampleOneOf_Field2) + if !ok { + that2, ok := that.(SampleOneOf_Field2) + 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.Field2 != that1.Field2 { + return false + } + return true +} +func (this *SampleOneOf_Field3) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*SampleOneOf_Field3) + if !ok { + that2, ok := that.(SampleOneOf_Field3) + 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.Field3 != that1.Field3 { + return false + } + return true +} +func (this *SampleOneOf_Field4) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*SampleOneOf_Field4) + if !ok { + that2, ok := that.(SampleOneOf_Field4) + 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.Field4 != that1.Field4 { + return false + } + return true +} +func (this *SampleOneOf_Field5) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*SampleOneOf_Field5) + if !ok { + that2, ok := that.(SampleOneOf_Field5) + 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.Field5 != that1.Field5 { + return false + } + return true +} +func (this *SampleOneOf_Field6) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*SampleOneOf_Field6) + if !ok { + that2, ok := that.(SampleOneOf_Field6) + 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.Field6 != that1.Field6 { + return false + } + return true +} +func (this *SampleOneOf_Field7) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*SampleOneOf_Field7) + if !ok { + that2, ok := that.(SampleOneOf_Field7) + 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.Field7 != that1.Field7 { + return false + } + return true +} +func (this *SampleOneOf_Field8) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*SampleOneOf_Field8) + if !ok { + that2, ok := that.(SampleOneOf_Field8) + 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.Field8 != that1.Field8 { + return false + } + return true +} +func (this *SampleOneOf_Field9) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*SampleOneOf_Field9) + if !ok { + that2, ok := that.(SampleOneOf_Field9) + 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.Field9 != that1.Field9 { + return false + } + return true +} +func (this *SampleOneOf_Field10) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*SampleOneOf_Field10) + if !ok { + that2, ok := that.(SampleOneOf_Field10) + 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.Field10 != that1.Field10 { + return false + } + return true +} +func (this *SampleOneOf_Field11) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*SampleOneOf_Field11) + if !ok { + that2, ok := that.(SampleOneOf_Field11) + 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.Field11 != that1.Field11 { + return false + } + return true +} +func (this *SampleOneOf_Field12) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*SampleOneOf_Field12) + if !ok { + that2, ok := that.(SampleOneOf_Field12) + 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.Field12 != that1.Field12 { + return false + } + return true +} +func (this *SampleOneOf_Field13) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*SampleOneOf_Field13) + if !ok { + that2, ok := that.(SampleOneOf_Field13) + 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.Field13 != that1.Field13 { + return false + } + return true +} +func (this *SampleOneOf_Field14) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*SampleOneOf_Field14) + if !ok { + that2, ok := that.(SampleOneOf_Field14) + 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.Field14 != that1.Field14 { + return false + } + return true +} +func (this *SampleOneOf_Field15) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*SampleOneOf_Field15) + if !ok { + that2, ok := that.(SampleOneOf_Field15) + 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.Field15, that1.Field15) { + return false + } + return true +} +func (this *SampleOneOf_SubMessage) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*SampleOneOf_SubMessage) + if !ok { + that2, ok := that.(SampleOneOf_SubMessage) + 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.SubMessage.Equal(that1.SubMessage) { + return false + } + return true +} +func (this *Subby) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&one.Subby{") + s = append(s, "Sub: "+fmt.Sprintf("%#v", this.Sub)+",\n") + s = append(s, "}") + return strings.Join(s, "") +} +func (this *SampleOneOf) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 20) + s = append(s, "&one.SampleOneOf{") + if this.TestOneof != nil { + s = append(s, "TestOneof: "+fmt.Sprintf("%#v", this.TestOneof)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *SampleOneOf_Field1) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.SampleOneOf_Field1{` + + `Field1:` + fmt.Sprintf("%#v", this.Field1) + `}`}, ", ") + return s +} +func (this *SampleOneOf_Field2) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.SampleOneOf_Field2{` + + `Field2:` + fmt.Sprintf("%#v", this.Field2) + `}`}, ", ") + return s +} +func (this *SampleOneOf_Field3) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.SampleOneOf_Field3{` + + `Field3:` + fmt.Sprintf("%#v", this.Field3) + `}`}, ", ") + return s +} +func (this *SampleOneOf_Field4) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.SampleOneOf_Field4{` + + `Field4:` + fmt.Sprintf("%#v", this.Field4) + `}`}, ", ") + return s +} +func (this *SampleOneOf_Field5) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.SampleOneOf_Field5{` + + `Field5:` + fmt.Sprintf("%#v", this.Field5) + `}`}, ", ") + return s +} +func (this *SampleOneOf_Field6) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.SampleOneOf_Field6{` + + `Field6:` + fmt.Sprintf("%#v", this.Field6) + `}`}, ", ") + return s +} +func (this *SampleOneOf_Field7) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.SampleOneOf_Field7{` + + `Field7:` + fmt.Sprintf("%#v", this.Field7) + `}`}, ", ") + return s +} +func (this *SampleOneOf_Field8) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.SampleOneOf_Field8{` + + `Field8:` + fmt.Sprintf("%#v", this.Field8) + `}`}, ", ") + return s +} +func (this *SampleOneOf_Field9) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.SampleOneOf_Field9{` + + `Field9:` + fmt.Sprintf("%#v", this.Field9) + `}`}, ", ") + return s +} +func (this *SampleOneOf_Field10) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.SampleOneOf_Field10{` + + `Field10:` + fmt.Sprintf("%#v", this.Field10) + `}`}, ", ") + return s +} +func (this *SampleOneOf_Field11) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.SampleOneOf_Field11{` + + `Field11:` + fmt.Sprintf("%#v", this.Field11) + `}`}, ", ") + return s +} +func (this *SampleOneOf_Field12) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.SampleOneOf_Field12{` + + `Field12:` + fmt.Sprintf("%#v", this.Field12) + `}`}, ", ") + return s +} +func (this *SampleOneOf_Field13) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.SampleOneOf_Field13{` + + `Field13:` + fmt.Sprintf("%#v", this.Field13) + `}`}, ", ") + return s +} +func (this *SampleOneOf_Field14) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.SampleOneOf_Field14{` + + `Field14:` + fmt.Sprintf("%#v", this.Field14) + `}`}, ", ") + return s +} +func (this *SampleOneOf_Field15) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.SampleOneOf_Field15{` + + `Field15:` + fmt.Sprintf("%#v", this.Field15) + `}`}, ", ") + return s +} +func (this *SampleOneOf_SubMessage) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.SampleOneOf_SubMessage{` + + `SubMessage:` + fmt.Sprintf("%#v", this.SubMessage) + `}`}, ", ") + return s +} +func valueToGoStringOne(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 extensionToGoStringOne(e map[int32]github_com_gogo_protobuf_proto.Extension) string { + if e == nil { + return "nil" + } + s := "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 +} +func NewPopulatedSubby(r randyOne, easy bool) *Subby { + this := &Subby{} + this.Sub = randStringOne(r) + if !easy && r.Intn(10) != 0 { + } + return this +} + +func NewPopulatedSampleOneOf(r randyOne, easy bool) *SampleOneOf { + this := &SampleOneOf{} + oneofNumber_TestOneof := []int32{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}[r.Intn(16)] + switch oneofNumber_TestOneof { + case 1: + this.TestOneof = NewPopulatedSampleOneOf_Field1(r, easy) + case 2: + this.TestOneof = NewPopulatedSampleOneOf_Field2(r, easy) + case 3: + this.TestOneof = NewPopulatedSampleOneOf_Field3(r, easy) + case 4: + this.TestOneof = NewPopulatedSampleOneOf_Field4(r, easy) + case 5: + this.TestOneof = NewPopulatedSampleOneOf_Field5(r, easy) + case 6: + this.TestOneof = NewPopulatedSampleOneOf_Field6(r, easy) + case 7: + this.TestOneof = NewPopulatedSampleOneOf_Field7(r, easy) + case 8: + this.TestOneof = NewPopulatedSampleOneOf_Field8(r, easy) + case 9: + this.TestOneof = NewPopulatedSampleOneOf_Field9(r, easy) + case 10: + this.TestOneof = NewPopulatedSampleOneOf_Field10(r, easy) + case 11: + this.TestOneof = NewPopulatedSampleOneOf_Field11(r, easy) + case 12: + this.TestOneof = NewPopulatedSampleOneOf_Field12(r, easy) + case 13: + this.TestOneof = NewPopulatedSampleOneOf_Field13(r, easy) + case 14: + this.TestOneof = NewPopulatedSampleOneOf_Field14(r, easy) + case 15: + this.TestOneof = NewPopulatedSampleOneOf_Field15(r, easy) + case 16: + this.TestOneof = NewPopulatedSampleOneOf_SubMessage(r, easy) + } + if !easy && r.Intn(10) != 0 { + } + return this +} + +func NewPopulatedSampleOneOf_Field1(r randyOne, easy bool) *SampleOneOf_Field1 { + this := &SampleOneOf_Field1{} + this.Field1 = float64(r.Float64()) + if r.Intn(2) == 0 { + this.Field1 *= -1 + } + return this +} +func NewPopulatedSampleOneOf_Field2(r randyOne, easy bool) *SampleOneOf_Field2 { + this := &SampleOneOf_Field2{} + this.Field2 = float32(r.Float32()) + if r.Intn(2) == 0 { + this.Field2 *= -1 + } + return this +} +func NewPopulatedSampleOneOf_Field3(r randyOne, easy bool) *SampleOneOf_Field3 { + this := &SampleOneOf_Field3{} + this.Field3 = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Field3 *= -1 + } + return this +} +func NewPopulatedSampleOneOf_Field4(r randyOne, easy bool) *SampleOneOf_Field4 { + this := &SampleOneOf_Field4{} + this.Field4 = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Field4 *= -1 + } + return this +} +func NewPopulatedSampleOneOf_Field5(r randyOne, easy bool) *SampleOneOf_Field5 { + this := &SampleOneOf_Field5{} + this.Field5 = uint32(r.Uint32()) + return this +} +func NewPopulatedSampleOneOf_Field6(r randyOne, easy bool) *SampleOneOf_Field6 { + this := &SampleOneOf_Field6{} + this.Field6 = uint64(uint64(r.Uint32())) + return this +} +func NewPopulatedSampleOneOf_Field7(r randyOne, easy bool) *SampleOneOf_Field7 { + this := &SampleOneOf_Field7{} + this.Field7 = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Field7 *= -1 + } + return this +} +func NewPopulatedSampleOneOf_Field8(r randyOne, easy bool) *SampleOneOf_Field8 { + this := &SampleOneOf_Field8{} + this.Field8 = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Field8 *= -1 + } + return this +} +func NewPopulatedSampleOneOf_Field9(r randyOne, easy bool) *SampleOneOf_Field9 { + this := &SampleOneOf_Field9{} + this.Field9 = uint32(r.Uint32()) + return this +} +func NewPopulatedSampleOneOf_Field10(r randyOne, easy bool) *SampleOneOf_Field10 { + this := &SampleOneOf_Field10{} + this.Field10 = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Field10 *= -1 + } + return this +} +func NewPopulatedSampleOneOf_Field11(r randyOne, easy bool) *SampleOneOf_Field11 { + this := &SampleOneOf_Field11{} + this.Field11 = uint64(uint64(r.Uint32())) + return this +} +func NewPopulatedSampleOneOf_Field12(r randyOne, easy bool) *SampleOneOf_Field12 { + this := &SampleOneOf_Field12{} + this.Field12 = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Field12 *= -1 + } + return this +} +func NewPopulatedSampleOneOf_Field13(r randyOne, easy bool) *SampleOneOf_Field13 { + this := &SampleOneOf_Field13{} + this.Field13 = bool(bool(r.Intn(2) == 0)) + return this +} +func NewPopulatedSampleOneOf_Field14(r randyOne, easy bool) *SampleOneOf_Field14 { + this := &SampleOneOf_Field14{} + this.Field14 = randStringOne(r) + return this +} +func NewPopulatedSampleOneOf_Field15(r randyOne, easy bool) *SampleOneOf_Field15 { + this := &SampleOneOf_Field15{} + v1 := r.Intn(100) + this.Field15 = make([]byte, v1) + for i := 0; i < v1; i++ { + this.Field15[i] = byte(r.Intn(256)) + } + return this +} +func NewPopulatedSampleOneOf_SubMessage(r randyOne, easy bool) *SampleOneOf_SubMessage { + this := &SampleOneOf_SubMessage{} + this.SubMessage = NewPopulatedSubby(r, easy) + return this +} + +type randyOne interface { + Float32() float32 + Float64() float64 + Int63() int64 + Int31() int32 + Uint32() uint32 + Intn(n int) int +} + +func randUTF8RuneOne(r randyOne) 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 randStringOne(r randyOne) string { + v2 := r.Intn(100) + tmps := make([]rune, v2) + for i := 0; i < v2; i++ { + tmps[i] = randUTF8RuneOne(r) + } + return string(tmps) +} +func randUnrecognizedOne(r randyOne, 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 = randFieldOne(data, r, fieldNumber, wire) + } + return data +} +func randFieldOne(data []byte, r randyOne, fieldNumber int, wire int) []byte { + key := uint32(fieldNumber)<<3 | uint32(wire) + switch wire { + case 0: + data = encodeVarintPopulateOne(data, uint64(key)) + v3 := r.Int63() + if r.Intn(2) == 0 { + v3 *= -1 + } + data = encodeVarintPopulateOne(data, uint64(v3)) + case 1: + data = encodeVarintPopulateOne(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 = encodeVarintPopulateOne(data, uint64(key)) + ll := r.Intn(100) + data = encodeVarintPopulateOne(data, uint64(ll)) + for j := 0; j < ll; j++ { + data = append(data, byte(r.Intn(256))) + } + default: + data = encodeVarintPopulateOne(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 encodeVarintPopulateOne(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 *Subby) Size() (n int) { + var l int + _ = l + l = len(m.Sub) + if l > 0 { + n += 1 + l + sovOne(uint64(l)) + } + return n +} + +func (m *SampleOneOf) Size() (n int) { + var l int + _ = l + if m.TestOneof != nil { + n += m.TestOneof.Size() + } + return n +} + +func (m *SampleOneOf_Field1) Size() (n int) { + var l int + _ = l + n += 9 + return n +} +func (m *SampleOneOf_Field2) Size() (n int) { + var l int + _ = l + n += 5 + return n +} +func (m *SampleOneOf_Field3) Size() (n int) { + var l int + _ = l + n += 1 + sovOne(uint64(m.Field3)) + return n +} +func (m *SampleOneOf_Field4) Size() (n int) { + var l int + _ = l + n += 1 + sovOne(uint64(m.Field4)) + return n +} +func (m *SampleOneOf_Field5) Size() (n int) { + var l int + _ = l + n += 1 + sovOne(uint64(m.Field5)) + return n +} +func (m *SampleOneOf_Field6) Size() (n int) { + var l int + _ = l + n += 1 + sovOne(uint64(m.Field6)) + return n +} +func (m *SampleOneOf_Field7) Size() (n int) { + var l int + _ = l + n += 1 + sozOne(uint64(m.Field7)) + return n +} +func (m *SampleOneOf_Field8) Size() (n int) { + var l int + _ = l + n += 1 + sozOne(uint64(m.Field8)) + return n +} +func (m *SampleOneOf_Field9) Size() (n int) { + var l int + _ = l + n += 5 + return n +} +func (m *SampleOneOf_Field10) Size() (n int) { + var l int + _ = l + n += 5 + return n +} +func (m *SampleOneOf_Field11) Size() (n int) { + var l int + _ = l + n += 9 + return n +} +func (m *SampleOneOf_Field12) Size() (n int) { + var l int + _ = l + n += 9 + return n +} +func (m *SampleOneOf_Field13) Size() (n int) { + var l int + _ = l + n += 2 + return n +} +func (m *SampleOneOf_Field14) Size() (n int) { + var l int + _ = l + l = len(m.Field14) + n += 1 + l + sovOne(uint64(l)) + return n +} +func (m *SampleOneOf_Field15) Size() (n int) { + var l int + _ = l + if m.Field15 != nil { + l = len(m.Field15) + n += 1 + l + sovOne(uint64(l)) + } + return n +} +func (m *SampleOneOf_SubMessage) Size() (n int) { + var l int + _ = l + if m.SubMessage != nil { + l = m.SubMessage.Size() + n += 2 + l + sovOne(uint64(l)) + } + return n +} + +func sovOne(x uint64) (n int) { + for { + n++ + x >>= 7 + if x == 0 { + break + } + } + return n +} +func sozOne(x uint64) (n int) { + return sovOne(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (this *Subby) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&Subby{`, + `Sub:` + fmt.Sprintf("%v", this.Sub) + `,`, + `}`, + }, "") + return s +} +func (this *SampleOneOf) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&SampleOneOf{`, + `TestOneof:` + fmt.Sprintf("%v", this.TestOneof) + `,`, + `}`, + }, "") + return s +} +func (this *SampleOneOf_Field1) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&SampleOneOf_Field1{`, + `Field1:` + fmt.Sprintf("%v", this.Field1) + `,`, + `}`, + }, "") + return s +} +func (this *SampleOneOf_Field2) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&SampleOneOf_Field2{`, + `Field2:` + fmt.Sprintf("%v", this.Field2) + `,`, + `}`, + }, "") + return s +} +func (this *SampleOneOf_Field3) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&SampleOneOf_Field3{`, + `Field3:` + fmt.Sprintf("%v", this.Field3) + `,`, + `}`, + }, "") + return s +} +func (this *SampleOneOf_Field4) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&SampleOneOf_Field4{`, + `Field4:` + fmt.Sprintf("%v", this.Field4) + `,`, + `}`, + }, "") + return s +} +func (this *SampleOneOf_Field5) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&SampleOneOf_Field5{`, + `Field5:` + fmt.Sprintf("%v", this.Field5) + `,`, + `}`, + }, "") + return s +} +func (this *SampleOneOf_Field6) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&SampleOneOf_Field6{`, + `Field6:` + fmt.Sprintf("%v", this.Field6) + `,`, + `}`, + }, "") + return s +} +func (this *SampleOneOf_Field7) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&SampleOneOf_Field7{`, + `Field7:` + fmt.Sprintf("%v", this.Field7) + `,`, + `}`, + }, "") + return s +} +func (this *SampleOneOf_Field8) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&SampleOneOf_Field8{`, + `Field8:` + fmt.Sprintf("%v", this.Field8) + `,`, + `}`, + }, "") + return s +} +func (this *SampleOneOf_Field9) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&SampleOneOf_Field9{`, + `Field9:` + fmt.Sprintf("%v", this.Field9) + `,`, + `}`, + }, "") + return s +} +func (this *SampleOneOf_Field10) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&SampleOneOf_Field10{`, + `Field10:` + fmt.Sprintf("%v", this.Field10) + `,`, + `}`, + }, "") + return s +} +func (this *SampleOneOf_Field11) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&SampleOneOf_Field11{`, + `Field11:` + fmt.Sprintf("%v", this.Field11) + `,`, + `}`, + }, "") + return s +} +func (this *SampleOneOf_Field12) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&SampleOneOf_Field12{`, + `Field12:` + fmt.Sprintf("%v", this.Field12) + `,`, + `}`, + }, "") + return s +} +func (this *SampleOneOf_Field13) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&SampleOneOf_Field13{`, + `Field13:` + fmt.Sprintf("%v", this.Field13) + `,`, + `}`, + }, "") + return s +} +func (this *SampleOneOf_Field14) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&SampleOneOf_Field14{`, + `Field14:` + fmt.Sprintf("%v", this.Field14) + `,`, + `}`, + }, "") + return s +} +func (this *SampleOneOf_Field15) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&SampleOneOf_Field15{`, + `Field15:` + fmt.Sprintf("%v", this.Field15) + `,`, + `}`, + }, "") + return s +} +func (this *SampleOneOf_SubMessage) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&SampleOneOf_SubMessage{`, + `SubMessage:` + strings.Replace(fmt.Sprintf("%v", this.SubMessage), "Subby", "Subby", 1) + `,`, + `}`, + }, "") + return s +} +func valueToStringOne(v interface{}) string { + rv := reflect.ValueOf(v) + if rv.IsNil() { + return "nil" + } + pv := reflect.Indirect(rv).Interface() + return fmt.Sprintf("*%v", pv) +} +func (m *Subby) 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 ErrIntOverflowOne + } + 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: Subby: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Subby: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Sub", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOne + } + 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 ErrInvalidLengthOne + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Sub = string(data[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipOne(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthOne + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *SampleOneOf) 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 ErrIntOverflowOne + } + 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: SampleOneOf: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: SampleOneOf: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field Field1", 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.TestOneof = &SampleOneOf_Field1{float64(math.Float64frombits(v))} + case 2: + if wireType != 5 { + return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType) + } + var v uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + iNdEx += 4 + v = uint32(data[iNdEx-4]) + v |= uint32(data[iNdEx-3]) << 8 + v |= uint32(data[iNdEx-2]) << 16 + v |= uint32(data[iNdEx-1]) << 24 + m.TestOneof = &SampleOneOf_Field2{float32(math.Float32frombits(v))} + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field3", wireType) + } + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOne + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.TestOneof = &SampleOneOf_Field3{v} + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field4", wireType) + } + var v int64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOne + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.TestOneof = &SampleOneOf_Field4{v} + case 5: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field5", wireType) + } + var v uint32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOne + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (uint32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.TestOneof = &SampleOneOf_Field5{v} + case 6: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field6", wireType) + } + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOne + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.TestOneof = &SampleOneOf_Field6{v} + case 7: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field7", wireType) + } + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOne + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + v = int32((uint32(v) >> 1) ^ uint32(((v&1)<<31)>>31)) + m.TestOneof = &SampleOneOf_Field7{v} + case 8: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field8", wireType) + } + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOne + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + v = (v >> 1) ^ uint64((int64(v&1)<<63)>>63) + m.TestOneof = &SampleOneOf_Field8{int64(v)} + case 9: + if wireType != 5 { + return fmt.Errorf("proto: wrong wireType = %d for field Field9", wireType) + } + var v uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + iNdEx += 4 + v = uint32(data[iNdEx-4]) + v |= uint32(data[iNdEx-3]) << 8 + v |= uint32(data[iNdEx-2]) << 16 + v |= uint32(data[iNdEx-1]) << 24 + m.TestOneof = &SampleOneOf_Field9{v} + case 10: + if wireType != 5 { + return fmt.Errorf("proto: wrong wireType = %d for field Field10", wireType) + } + var v int32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + iNdEx += 4 + v = int32(data[iNdEx-4]) + v |= int32(data[iNdEx-3]) << 8 + v |= int32(data[iNdEx-2]) << 16 + v |= int32(data[iNdEx-1]) << 24 + m.TestOneof = &SampleOneOf_Field10{v} + case 11: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field Field11", 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.TestOneof = &SampleOneOf_Field11{v} + case 12: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field Field12", wireType) + } + var v int64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + iNdEx += 8 + v = int64(data[iNdEx-8]) + v |= int64(data[iNdEx-7]) << 8 + v |= int64(data[iNdEx-6]) << 16 + v |= int64(data[iNdEx-5]) << 24 + v |= int64(data[iNdEx-4]) << 32 + v |= int64(data[iNdEx-3]) << 40 + v |= int64(data[iNdEx-2]) << 48 + v |= int64(data[iNdEx-1]) << 56 + m.TestOneof = &SampleOneOf_Field12{v} + case 13: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field13", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOne + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + b := bool(v != 0) + m.TestOneof = &SampleOneOf_Field13{b} + case 14: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field14", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOne + } + 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 ErrInvalidLengthOne + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.TestOneof = &SampleOneOf_Field14{string(data[iNdEx:postIndex])} + iNdEx = postIndex + case 15: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field15", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOne + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthOne + } + postIndex := iNdEx + byteLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + v := make([]byte, postIndex-iNdEx) + copy(v, data[iNdEx:postIndex]) + m.TestOneof = &SampleOneOf_Field15{v} + iNdEx = postIndex + case 16: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SubMessage", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOne + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthOne + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + v := &Subby{} + if err := v.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + m.TestOneof = &SampleOneOf_SubMessage{v} + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipOne(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthOne + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipOne(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, ErrIntOverflowOne + } + 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, ErrIntOverflowOne + } + 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, ErrIntOverflowOne + } + 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, ErrInvalidLengthOne + } + return iNdEx, nil + case 3: + for { + var innerWire uint64 + var start int = iNdEx + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowOne + } + 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 := skipOne(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 ( + ErrInvalidLengthOne = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowOne = fmt.Errorf("proto: integer overflow") +) + +var fileDescriptorOne = []byte{ + // 384 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0x44, 0xd2, 0xbf, 0x6f, 0xd3, 0x40, + 0x14, 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 0x02, 0x00, 0x00, +} diff --git a/vendor/github.com/gogo/protobuf/test/oneof3/combos/unmarshaler/one.proto b/vendor/github.com/gogo/protobuf/test/oneof3/combos/unmarshaler/one.proto new file mode 100644 index 000000000..87d606240 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/oneof3/combos/unmarshaler/one.proto @@ -0,0 +1,80 @@ +// Copyright (c) 2013, Vastech SA (PTY) LTD. All rights reserved. +// http://github.com/gogo/protobuf/gogoproto +// +// 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 = "proto3"; + +package one; + +import "github.com/gogo/protobuf/gogoproto/gogo.proto"; + +option (gogoproto.goproto_stringer_all) = false; +option (gogoproto.goproto_enum_prefix_all) = false; +option (gogoproto.goproto_getters_all) = false; + +option (gogoproto.equal_all) = true; +option (gogoproto.verbose_equal_all) = true; +option (gogoproto.stringer_all) = true; +option (gogoproto.gostring_all) = true; +option (gogoproto.description_all) = true; + +option (gogoproto.testgen_all) = true; +option (gogoproto.populate_all) = true; +option (gogoproto.unmarshaler_all) = true; +option (gogoproto.marshaler_all) = false; +option (gogoproto.sizer_all) = true; + +option (gogoproto.goproto_enum_stringer_all) = false; +option (gogoproto.enum_stringer_all) = true; + +option (gogoproto.unsafe_marshaler_all) = false; +option (gogoproto.unsafe_unmarshaler_all) = false; + +message Subby { + string sub = 1; +} + +message SampleOneOf { + oneof test_oneof { + double Field1 = 1; + float Field2 = 2; + int32 Field3 = 3; + int64 Field4 = 4; + uint32 Field5 = 5; + uint64 Field6 = 6; + sint32 Field7 = 7; + sint64 Field8 = 8; + fixed32 Field9 = 9; + sfixed32 Field10 = 10; + fixed64 Field11 = 11; + sfixed64 Field12 = 12; + bool Field13 = 13; + string Field14 = 14; + bytes Field15 = 15; + Subby sub_message = 16; + } +} + + diff --git a/vendor/github.com/gogo/protobuf/test/oneof3/combos/unmarshaler/onepb_test.go b/vendor/github.com/gogo/protobuf/test/oneof3/combos/unmarshaler/onepb_test.go new file mode 100644 index 000000000..26c71b4ed --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/oneof3/combos/unmarshaler/onepb_test.go @@ -0,0 +1,333 @@ +// Code generated by protoc-gen-gogo. +// source: combos/unmarshaler/one.proto +// DO NOT EDIT! + +/* +Package one is a generated protocol buffer package. + +It is generated from these files: + combos/unmarshaler/one.proto + +It has these top-level messages: + Subby + SampleOneOf +*/ +package one + +import testing "testing" +import math_rand "math/rand" +import time "time" +import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" +import github_com_gogo_protobuf_jsonpb "github.com/gogo/protobuf/jsonpb" +import fmt "fmt" +import go_parser "go/parser" +import proto "github.com/gogo/protobuf/proto" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +func TestSubbyProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedSubby(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Subby{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestSampleOneOfProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedSampleOneOf(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &SampleOneOf{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestSubbyJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedSubby(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Subby{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestSampleOneOfJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedSampleOneOf(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &SampleOneOf{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestSubbyProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedSubby(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &Subby{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestSubbyProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedSubby(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &Subby{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestSampleOneOfProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedSampleOneOf(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &SampleOneOf{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestSampleOneOfProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedSampleOneOf(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &SampleOneOf{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestOneDescription(t *testing.T) { + OneDescription() +} +func TestSubbyVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedSubby(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &Subby{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestSampleOneOfVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedSampleOneOf(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &SampleOneOf{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestSubbyGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedSubby(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestSampleOneOfGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedSampleOneOf(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestSubbySize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedSubby(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func TestSampleOneOfSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedSampleOneOf(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func TestSubbyStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedSubby(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestSampleOneOfStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedSampleOneOf(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} + +//These tests are generated by github.com/gogo/protobuf/plugin/testgen diff --git a/vendor/github.com/gogo/protobuf/test/oneof3/combos/unsafeboth/one.pb.go b/vendor/github.com/gogo/protobuf/test/oneof3/combos/unsafeboth/one.pb.go new file mode 100644 index 000000000..eb4210a96 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/oneof3/combos/unsafeboth/one.pb.go @@ -0,0 +1,3388 @@ +// Code generated by protoc-gen-gogo. +// source: combos/unsafeboth/one.proto +// DO NOT EDIT! + +/* + Package one is a generated protocol buffer package. + + It is generated from these files: + combos/unsafeboth/one.proto + + It has these top-level messages: + Subby + SampleOneOf +*/ +package one + +import proto "github.com/gogo/protobuf/proto" +import fmt "fmt" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" + +import github_com_gogo_protobuf_protoc_gen_gogo_descriptor "github.com/gogo/protobuf/protoc-gen-gogo/descriptor" +import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" +import compress_gzip "compress/gzip" +import bytes "bytes" +import io_ioutil "io/ioutil" + +import strings "strings" +import sort "sort" +import strconv "strconv" +import reflect "reflect" + +import unsafe "unsafe" + +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. +const _ = proto.GoGoProtoPackageIsVersion1 + +type Subby struct { + Sub string `protobuf:"bytes,1,opt,name=sub,proto3" json:"sub,omitempty"` +} + +func (m *Subby) Reset() { *m = Subby{} } +func (*Subby) ProtoMessage() {} +func (*Subby) Descriptor() ([]byte, []int) { return fileDescriptorOne, []int{0} } + +type SampleOneOf struct { + // Types that are valid to be assigned to TestOneof: + // *SampleOneOf_Field1 + // *SampleOneOf_Field2 + // *SampleOneOf_Field3 + // *SampleOneOf_Field4 + // *SampleOneOf_Field5 + // *SampleOneOf_Field6 + // *SampleOneOf_Field7 + // *SampleOneOf_Field8 + // *SampleOneOf_Field9 + // *SampleOneOf_Field10 + // *SampleOneOf_Field11 + // *SampleOneOf_Field12 + // *SampleOneOf_Field13 + // *SampleOneOf_Field14 + // *SampleOneOf_Field15 + // *SampleOneOf_SubMessage + TestOneof isSampleOneOf_TestOneof `protobuf_oneof:"test_oneof"` +} + +func (m *SampleOneOf) Reset() { *m = SampleOneOf{} } +func (*SampleOneOf) ProtoMessage() {} +func (*SampleOneOf) Descriptor() ([]byte, []int) { return fileDescriptorOne, []int{1} } + +type isSampleOneOf_TestOneof interface { + isSampleOneOf_TestOneof() + Equal(interface{}) bool + VerboseEqual(interface{}) error + MarshalTo([]byte) (int, error) + Size() int +} + +type SampleOneOf_Field1 struct { + Field1 float64 `protobuf:"fixed64,1,opt,name=Field1,json=field1,proto3,oneof"` +} +type SampleOneOf_Field2 struct { + Field2 float32 `protobuf:"fixed32,2,opt,name=Field2,json=field2,proto3,oneof"` +} +type SampleOneOf_Field3 struct { + Field3 int32 `protobuf:"varint,3,opt,name=Field3,json=field3,proto3,oneof"` +} +type SampleOneOf_Field4 struct { + Field4 int64 `protobuf:"varint,4,opt,name=Field4,json=field4,proto3,oneof"` +} +type SampleOneOf_Field5 struct { + Field5 uint32 `protobuf:"varint,5,opt,name=Field5,json=field5,proto3,oneof"` +} +type SampleOneOf_Field6 struct { + Field6 uint64 `protobuf:"varint,6,opt,name=Field6,json=field6,proto3,oneof"` +} +type SampleOneOf_Field7 struct { + Field7 int32 `protobuf:"zigzag32,7,opt,name=Field7,json=field7,proto3,oneof"` +} +type SampleOneOf_Field8 struct { + Field8 int64 `protobuf:"zigzag64,8,opt,name=Field8,json=field8,proto3,oneof"` +} +type SampleOneOf_Field9 struct { + Field9 uint32 `protobuf:"fixed32,9,opt,name=Field9,json=field9,proto3,oneof"` +} +type SampleOneOf_Field10 struct { + Field10 int32 `protobuf:"fixed32,10,opt,name=Field10,json=field10,proto3,oneof"` +} +type SampleOneOf_Field11 struct { + Field11 uint64 `protobuf:"fixed64,11,opt,name=Field11,json=field11,proto3,oneof"` +} +type SampleOneOf_Field12 struct { + Field12 int64 `protobuf:"fixed64,12,opt,name=Field12,json=field12,proto3,oneof"` +} +type SampleOneOf_Field13 struct { + Field13 bool `protobuf:"varint,13,opt,name=Field13,json=field13,proto3,oneof"` +} +type SampleOneOf_Field14 struct { + Field14 string `protobuf:"bytes,14,opt,name=Field14,json=field14,proto3,oneof"` +} +type SampleOneOf_Field15 struct { + Field15 []byte `protobuf:"bytes,15,opt,name=Field15,json=field15,proto3,oneof"` +} +type SampleOneOf_SubMessage struct { + SubMessage *Subby `protobuf:"bytes,16,opt,name=sub_message,json=subMessage,oneof"` +} + +func (*SampleOneOf_Field1) isSampleOneOf_TestOneof() {} +func (*SampleOneOf_Field2) isSampleOneOf_TestOneof() {} +func (*SampleOneOf_Field3) isSampleOneOf_TestOneof() {} +func (*SampleOneOf_Field4) isSampleOneOf_TestOneof() {} +func (*SampleOneOf_Field5) isSampleOneOf_TestOneof() {} +func (*SampleOneOf_Field6) isSampleOneOf_TestOneof() {} +func (*SampleOneOf_Field7) isSampleOneOf_TestOneof() {} +func (*SampleOneOf_Field8) isSampleOneOf_TestOneof() {} +func (*SampleOneOf_Field9) isSampleOneOf_TestOneof() {} +func (*SampleOneOf_Field10) isSampleOneOf_TestOneof() {} +func (*SampleOneOf_Field11) isSampleOneOf_TestOneof() {} +func (*SampleOneOf_Field12) isSampleOneOf_TestOneof() {} +func (*SampleOneOf_Field13) isSampleOneOf_TestOneof() {} +func (*SampleOneOf_Field14) isSampleOneOf_TestOneof() {} +func (*SampleOneOf_Field15) isSampleOneOf_TestOneof() {} +func (*SampleOneOf_SubMessage) isSampleOneOf_TestOneof() {} + +func (m *SampleOneOf) GetTestOneof() isSampleOneOf_TestOneof { + if m != nil { + return m.TestOneof + } + return nil +} + +func (m *SampleOneOf) GetField1() float64 { + if x, ok := m.GetTestOneof().(*SampleOneOf_Field1); ok { + return x.Field1 + } + return 0 +} + +func (m *SampleOneOf) GetField2() float32 { + if x, ok := m.GetTestOneof().(*SampleOneOf_Field2); ok { + return x.Field2 + } + return 0 +} + +func (m *SampleOneOf) GetField3() int32 { + if x, ok := m.GetTestOneof().(*SampleOneOf_Field3); ok { + return x.Field3 + } + return 0 +} + +func (m *SampleOneOf) GetField4() int64 { + if x, ok := m.GetTestOneof().(*SampleOneOf_Field4); ok { + return x.Field4 + } + return 0 +} + +func (m *SampleOneOf) GetField5() uint32 { + if x, ok := m.GetTestOneof().(*SampleOneOf_Field5); ok { + return x.Field5 + } + return 0 +} + +func (m *SampleOneOf) GetField6() uint64 { + if x, ok := m.GetTestOneof().(*SampleOneOf_Field6); ok { + return x.Field6 + } + return 0 +} + +func (m *SampleOneOf) GetField7() int32 { + if x, ok := m.GetTestOneof().(*SampleOneOf_Field7); ok { + return x.Field7 + } + return 0 +} + +func (m *SampleOneOf) GetField8() int64 { + if x, ok := m.GetTestOneof().(*SampleOneOf_Field8); ok { + return x.Field8 + } + return 0 +} + +func (m *SampleOneOf) GetField9() uint32 { + if x, ok := m.GetTestOneof().(*SampleOneOf_Field9); ok { + return x.Field9 + } + return 0 +} + +func (m *SampleOneOf) GetField10() int32 { + if x, ok := m.GetTestOneof().(*SampleOneOf_Field10); ok { + return x.Field10 + } + return 0 +} + +func (m *SampleOneOf) GetField11() uint64 { + if x, ok := m.GetTestOneof().(*SampleOneOf_Field11); ok { + return x.Field11 + } + return 0 +} + +func (m *SampleOneOf) GetField12() int64 { + if x, ok := m.GetTestOneof().(*SampleOneOf_Field12); ok { + return x.Field12 + } + return 0 +} + +func (m *SampleOneOf) GetField13() bool { + if x, ok := m.GetTestOneof().(*SampleOneOf_Field13); ok { + return x.Field13 + } + return false +} + +func (m *SampleOneOf) GetField14() string { + if x, ok := m.GetTestOneof().(*SampleOneOf_Field14); ok { + return x.Field14 + } + return "" +} + +func (m *SampleOneOf) GetField15() []byte { + if x, ok := m.GetTestOneof().(*SampleOneOf_Field15); ok { + return x.Field15 + } + return nil +} + +func (m *SampleOneOf) GetSubMessage() *Subby { + if x, ok := m.GetTestOneof().(*SampleOneOf_SubMessage); ok { + return x.SubMessage + } + return nil +} + +// XXX_OneofFuncs is for the internal use of the proto package. +func (*SampleOneOf) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{}) { + return _SampleOneOf_OneofMarshaler, _SampleOneOf_OneofUnmarshaler, _SampleOneOf_OneofSizer, []interface{}{ + (*SampleOneOf_Field1)(nil), + (*SampleOneOf_Field2)(nil), + (*SampleOneOf_Field3)(nil), + (*SampleOneOf_Field4)(nil), + (*SampleOneOf_Field5)(nil), + (*SampleOneOf_Field6)(nil), + (*SampleOneOf_Field7)(nil), + (*SampleOneOf_Field8)(nil), + (*SampleOneOf_Field9)(nil), + (*SampleOneOf_Field10)(nil), + (*SampleOneOf_Field11)(nil), + (*SampleOneOf_Field12)(nil), + (*SampleOneOf_Field13)(nil), + (*SampleOneOf_Field14)(nil), + (*SampleOneOf_Field15)(nil), + (*SampleOneOf_SubMessage)(nil), + } +} + +func _SampleOneOf_OneofMarshaler(msg proto.Message, b *proto.Buffer) error { + m := msg.(*SampleOneOf) + // test_oneof + switch x := m.TestOneof.(type) { + case *SampleOneOf_Field1: + _ = b.EncodeVarint(1<<3 | proto.WireFixed64) + _ = b.EncodeFixed64(math.Float64bits(x.Field1)) + case *SampleOneOf_Field2: + _ = b.EncodeVarint(2<<3 | proto.WireFixed32) + _ = b.EncodeFixed32(uint64(math.Float32bits(x.Field2))) + case *SampleOneOf_Field3: + _ = b.EncodeVarint(3<<3 | proto.WireVarint) + _ = b.EncodeVarint(uint64(x.Field3)) + case *SampleOneOf_Field4: + _ = b.EncodeVarint(4<<3 | proto.WireVarint) + _ = b.EncodeVarint(uint64(x.Field4)) + case *SampleOneOf_Field5: + _ = b.EncodeVarint(5<<3 | proto.WireVarint) + _ = b.EncodeVarint(uint64(x.Field5)) + case *SampleOneOf_Field6: + _ = b.EncodeVarint(6<<3 | proto.WireVarint) + _ = b.EncodeVarint(uint64(x.Field6)) + case *SampleOneOf_Field7: + _ = b.EncodeVarint(7<<3 | proto.WireVarint) + _ = b.EncodeZigzag32(uint64(x.Field7)) + case *SampleOneOf_Field8: + _ = b.EncodeVarint(8<<3 | proto.WireVarint) + _ = b.EncodeZigzag64(uint64(x.Field8)) + case *SampleOneOf_Field9: + _ = b.EncodeVarint(9<<3 | proto.WireFixed32) + _ = b.EncodeFixed32(uint64(x.Field9)) + case *SampleOneOf_Field10: + _ = b.EncodeVarint(10<<3 | proto.WireFixed32) + _ = b.EncodeFixed32(uint64(x.Field10)) + case *SampleOneOf_Field11: + _ = b.EncodeVarint(11<<3 | proto.WireFixed64) + _ = b.EncodeFixed64(uint64(x.Field11)) + case *SampleOneOf_Field12: + _ = b.EncodeVarint(12<<3 | proto.WireFixed64) + _ = b.EncodeFixed64(uint64(x.Field12)) + case *SampleOneOf_Field13: + t := uint64(0) + if x.Field13 { + t = 1 + } + _ = b.EncodeVarint(13<<3 | proto.WireVarint) + _ = b.EncodeVarint(t) + case *SampleOneOf_Field14: + _ = b.EncodeVarint(14<<3 | proto.WireBytes) + _ = b.EncodeStringBytes(x.Field14) + case *SampleOneOf_Field15: + _ = b.EncodeVarint(15<<3 | proto.WireBytes) + _ = b.EncodeRawBytes(x.Field15) + case *SampleOneOf_SubMessage: + _ = b.EncodeVarint(16<<3 | proto.WireBytes) + if err := b.EncodeMessage(x.SubMessage); err != nil { + return err + } + case nil: + default: + return fmt.Errorf("SampleOneOf.TestOneof has unexpected type %T", x) + } + return nil +} + +func _SampleOneOf_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) { + m := msg.(*SampleOneOf) + switch tag { + case 1: // test_oneof.Field1 + if wire != proto.WireFixed64 { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeFixed64() + m.TestOneof = &SampleOneOf_Field1{math.Float64frombits(x)} + return true, err + case 2: // test_oneof.Field2 + if wire != proto.WireFixed32 { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeFixed32() + m.TestOneof = &SampleOneOf_Field2{math.Float32frombits(uint32(x))} + return true, err + case 3: // test_oneof.Field3 + if wire != proto.WireVarint { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeVarint() + m.TestOneof = &SampleOneOf_Field3{int32(x)} + return true, err + case 4: // test_oneof.Field4 + if wire != proto.WireVarint { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeVarint() + m.TestOneof = &SampleOneOf_Field4{int64(x)} + return true, err + case 5: // test_oneof.Field5 + if wire != proto.WireVarint { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeVarint() + m.TestOneof = &SampleOneOf_Field5{uint32(x)} + return true, err + case 6: // test_oneof.Field6 + if wire != proto.WireVarint { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeVarint() + m.TestOneof = &SampleOneOf_Field6{x} + return true, err + case 7: // test_oneof.Field7 + if wire != proto.WireVarint { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeZigzag32() + m.TestOneof = &SampleOneOf_Field7{int32(x)} + return true, err + case 8: // test_oneof.Field8 + if wire != proto.WireVarint { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeZigzag64() + m.TestOneof = &SampleOneOf_Field8{int64(x)} + return true, err + case 9: // test_oneof.Field9 + if wire != proto.WireFixed32 { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeFixed32() + m.TestOneof = &SampleOneOf_Field9{uint32(x)} + return true, err + case 10: // test_oneof.Field10 + if wire != proto.WireFixed32 { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeFixed32() + m.TestOneof = &SampleOneOf_Field10{int32(x)} + return true, err + case 11: // test_oneof.Field11 + if wire != proto.WireFixed64 { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeFixed64() + m.TestOneof = &SampleOneOf_Field11{x} + return true, err + case 12: // test_oneof.Field12 + if wire != proto.WireFixed64 { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeFixed64() + m.TestOneof = &SampleOneOf_Field12{int64(x)} + return true, err + case 13: // test_oneof.Field13 + if wire != proto.WireVarint { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeVarint() + m.TestOneof = &SampleOneOf_Field13{x != 0} + return true, err + case 14: // test_oneof.Field14 + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeStringBytes() + m.TestOneof = &SampleOneOf_Field14{x} + return true, err + case 15: // test_oneof.Field15 + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeRawBytes(true) + m.TestOneof = &SampleOneOf_Field15{x} + return true, err + case 16: // test_oneof.sub_message + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + msg := new(Subby) + err := b.DecodeMessage(msg) + m.TestOneof = &SampleOneOf_SubMessage{msg} + return true, err + default: + return false, nil + } +} + +func _SampleOneOf_OneofSizer(msg proto.Message) (n int) { + m := msg.(*SampleOneOf) + // test_oneof + switch x := m.TestOneof.(type) { + case *SampleOneOf_Field1: + n += proto.SizeVarint(1<<3 | proto.WireFixed64) + n += 8 + case *SampleOneOf_Field2: + n += proto.SizeVarint(2<<3 | proto.WireFixed32) + n += 4 + case *SampleOneOf_Field3: + n += proto.SizeVarint(3<<3 | proto.WireVarint) + n += proto.SizeVarint(uint64(x.Field3)) + case *SampleOneOf_Field4: + n += proto.SizeVarint(4<<3 | proto.WireVarint) + n += proto.SizeVarint(uint64(x.Field4)) + case *SampleOneOf_Field5: + n += proto.SizeVarint(5<<3 | proto.WireVarint) + n += proto.SizeVarint(uint64(x.Field5)) + case *SampleOneOf_Field6: + n += proto.SizeVarint(6<<3 | proto.WireVarint) + n += proto.SizeVarint(uint64(x.Field6)) + case *SampleOneOf_Field7: + n += proto.SizeVarint(7<<3 | proto.WireVarint) + n += proto.SizeVarint(uint64((uint32(x.Field7) << 1) ^ uint32((int32(x.Field7) >> 31)))) + case *SampleOneOf_Field8: + n += proto.SizeVarint(8<<3 | proto.WireVarint) + n += proto.SizeVarint(uint64(uint64(x.Field8<<1) ^ uint64((int64(x.Field8) >> 63)))) + case *SampleOneOf_Field9: + n += proto.SizeVarint(9<<3 | proto.WireFixed32) + n += 4 + case *SampleOneOf_Field10: + n += proto.SizeVarint(10<<3 | proto.WireFixed32) + n += 4 + case *SampleOneOf_Field11: + n += proto.SizeVarint(11<<3 | proto.WireFixed64) + n += 8 + case *SampleOneOf_Field12: + n += proto.SizeVarint(12<<3 | proto.WireFixed64) + n += 8 + case *SampleOneOf_Field13: + n += proto.SizeVarint(13<<3 | proto.WireVarint) + n += 1 + case *SampleOneOf_Field14: + n += proto.SizeVarint(14<<3 | proto.WireBytes) + n += proto.SizeVarint(uint64(len(x.Field14))) + n += len(x.Field14) + case *SampleOneOf_Field15: + n += proto.SizeVarint(15<<3 | proto.WireBytes) + n += proto.SizeVarint(uint64(len(x.Field15))) + n += len(x.Field15) + case *SampleOneOf_SubMessage: + s := proto.Size(x.SubMessage) + n += proto.SizeVarint(16<<3 | proto.WireBytes) + n += proto.SizeVarint(uint64(s)) + n += s + case nil: + default: + panic(fmt.Sprintf("proto: unexpected type %T in oneof", x)) + } + return n +} + +func init() { + proto.RegisterType((*Subby)(nil), "one.Subby") + proto.RegisterType((*SampleOneOf)(nil), "one.SampleOneOf") +} +func (this *Subby) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return OneDescription() +} +func (this *SampleOneOf) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return OneDescription() +} +func OneDescription() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + d := &github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet{} + var gzipped = []byte{ + // 3544 bytes of a gzipped FileDescriptorSet + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xcc, 0x5a, 0x59, 0x6c, 0x23, 0xe7, + 0x91, 0x36, 0xc5, 0x43, 0x64, 0x51, 0xa2, 0xa8, 0x96, 0x3c, 0xc3, 0x91, 0xed, 0x19, 0x8f, 0x7c, + 0x8d, 0xc7, 0x6b, 0x69, 0x46, 0x73, 0xd3, 0xbb, 0x36, 0x74, 0x70, 0x64, 0x0d, 0x24, 0x51, 0xdb, + 0x94, 0xec, 0xb1, 0xf7, 0xa1, 0xd1, 0x24, 0x7f, 0x51, 0x9c, 0x69, 0x76, 0x73, 0xd9, 0xcd, 0xf1, + 0xc8, 0x4f, 0x5e, 0x78, 0x0f, 0x18, 0x8b, 0xdd, 0x9c, 0x40, 0x7c, 0x27, 0x36, 0x90, 0xd8, 0x71, + 0x2e, 0x3b, 0x17, 0x82, 0x3c, 0x05, 0x08, 0x9c, 0xf8, 0x29, 0x48, 0xf2, 0x94, 0x87, 0x3c, 0xd8, + 0x8e, 0x81, 0x38, 0x89, 0x93, 0x38, 0xc0, 0x00, 0x31, 0xe0, 0x97, 0xd4, 0x7f, 0xf5, 0x41, 0x52, + 0x6a, 0xca, 0x80, 0xe3, 0x08, 0x20, 0xc4, 0xae, 0xaa, 0xef, 0xeb, 0xbf, 0xeb, 0xaf, 0xbf, 0xaa, + 0xfe, 0xbf, 0x09, 0x3f, 0x3e, 0x0e, 0x37, 0xd7, 0x2c, 0xab, 0x66, 0x90, 0xe9, 0x66, 0xcb, 0x72, + 0xac, 0x72, 0x7b, 0x73, 0xba, 0x4a, 0xec, 0x4a, 0xab, 0xde, 0x74, 0xac, 0xd6, 0x14, 0x93, 0x29, + 0x23, 0xdc, 0x62, 0x4a, 0x5a, 0x4c, 0xae, 0xc0, 0xe8, 0xf9, 0xba, 0x41, 0x16, 0x5c, 0xc3, 0x12, + 0x71, 0x94, 0xb3, 0x10, 0xdb, 0x44, 0x61, 0x2e, 0x72, 0x73, 0xf4, 0x48, 0x7a, 0xe6, 0xd6, 0xa9, + 0x0e, 0xd0, 0x54, 0x10, 0xb1, 0x46, 0xc5, 0x2a, 0x43, 0x4c, 0xbe, 0x13, 0x83, 0xb1, 0x1e, 0x5a, + 0x45, 0x81, 0x98, 0xa9, 0x37, 0x28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a, 0x63, 0x65, 0x09, + 0xb2, 0xb6, 0xd5, 0x6e, 0x55, 0x88, 0x56, 0xb1, 0xaa, 0x44, 0xab, 0x9b, 0x9b, 0x56, 0x2e, 0xc5, + 0x08, 0x0e, 0x75, 0x3f, 0x08, 0x33, 0x9c, 0x47, 0xbb, 0x25, 0x34, 0x53, 0x33, 0x76, 0xe0, 0x5a, + 0xd9, 0x07, 0x09, 0x7b, 0xdb, 0x74, 0xf4, 0xab, 0xb9, 0x21, 0x16, 0x21, 0xe2, 0x6a, 0xf2, 0xaf, + 0x71, 0x18, 0xe9, 0x27, 0xc4, 0xee, 0x81, 0xf8, 0x26, 0x7d, 0x4a, 0x0c, 0xb0, 0x3d, 0xf8, 0x80, + 0x63, 0x82, 0x4e, 0x4c, 0x7c, 0x44, 0x27, 0xce, 0x42, 0xda, 0x24, 0xb6, 0x43, 0xaa, 0x3c, 0x22, + 0xa2, 0x7d, 0xc6, 0x14, 0x70, 0x50, 0x77, 0x48, 0xc5, 0x3e, 0x52, 0x48, 0x5d, 0x84, 0x11, 0x77, + 0x48, 0x5a, 0x4b, 0x37, 0x6b, 0x32, 0x36, 0xa7, 0xc3, 0x46, 0x32, 0x55, 0x90, 0x38, 0x95, 0xc2, + 0xd4, 0x0c, 0x09, 0x5c, 0x2b, 0x0b, 0x00, 0x96, 0x49, 0xac, 0x4d, 0x5c, 0x5e, 0x15, 0x03, 0xe3, + 0xa4, 0xb7, 0x97, 0x8a, 0xd4, 0xa4, 0xcb, 0x4b, 0x16, 0x97, 0x56, 0x0c, 0xe5, 0x9c, 0x17, 0x6a, + 0x83, 0x3b, 0x44, 0xca, 0x0a, 0x5f, 0x64, 0x5d, 0xd1, 0xb6, 0x01, 0x99, 0x16, 0xa1, 0x71, 0x8f, + 0x2e, 0xe6, 0x4f, 0x96, 0x62, 0x83, 0x98, 0x0a, 0x7d, 0x32, 0x55, 0xc0, 0xf8, 0x83, 0x0d, 0xb7, + 0xfc, 0x97, 0xca, 0x2d, 0xe0, 0x0a, 0x34, 0x16, 0x56, 0xc0, 0xb2, 0xd0, 0x90, 0x14, 0xae, 0xa2, + 0x6c, 0xe2, 0x2c, 0x64, 0x82, 0xee, 0x51, 0xc6, 0x21, 0x6e, 0x3b, 0x7a, 0xcb, 0x61, 0x51, 0x18, + 0x57, 0xf9, 0x85, 0x92, 0x85, 0x28, 0x26, 0x19, 0x96, 0xe5, 0xe2, 0x2a, 0xfd, 0x3a, 0x71, 0x06, + 0x86, 0x03, 0xb7, 0xef, 0x17, 0x38, 0xf9, 0x64, 0x02, 0xc6, 0x7b, 0xc5, 0x5c, 0xcf, 0xf0, 0xc7, + 0xe5, 0x83, 0x11, 0x50, 0x26, 0x2d, 0x8c, 0x3b, 0xca, 0x20, 0xae, 0x30, 0xa2, 0xe2, 0x86, 0x5e, + 0x26, 0x06, 0x46, 0x53, 0xe4, 0x48, 0x66, 0xe6, 0xae, 0xbe, 0xa2, 0x7a, 0x6a, 0x99, 0x42, 0x54, + 0x8e, 0x54, 0xee, 0x85, 0x98, 0x48, 0x71, 0x94, 0xe1, 0x68, 0x7f, 0x0c, 0x34, 0x16, 0x55, 0x86, + 0x53, 0x6e, 0x80, 0x14, 0xfd, 0xcf, 0x7d, 0x9b, 0x60, 0x63, 0x4e, 0x52, 0x01, 0xf5, 0xab, 0x32, + 0x01, 0x49, 0x16, 0x66, 0x55, 0x22, 0x4b, 0x83, 0x7b, 0x4d, 0x27, 0xa6, 0x4a, 0x36, 0xf5, 0xb6, + 0xe1, 0x68, 0x57, 0x74, 0xa3, 0x4d, 0x58, 0xc0, 0xe0, 0xc4, 0x08, 0xe1, 0x03, 0x54, 0xa6, 0x1c, + 0x82, 0x34, 0x8f, 0xca, 0x3a, 0x62, 0xae, 0xb2, 0xec, 0x13, 0x57, 0x79, 0xa0, 0x2e, 0x51, 0x09, + 0xbd, 0xfd, 0x25, 0x1b, 0xd7, 0x82, 0x98, 0x5a, 0x76, 0x0b, 0x2a, 0x60, 0xb7, 0x3f, 0xd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, 0xff, 0xba, 0xb1, 0xa4, 0x16, 0x16, 0xd0, 0x7f, 0x3e, 0xd9, + 0x5a, 0x61, 0x76, 0x1d, 0x65, 0xd1, 0xc9, 0xa3, 0x30, 0xde, 0x2b, 0xcf, 0xf4, 0x5a, 0x19, 0x93, + 0x2f, 0x46, 0x60, 0xac, 0x47, 0xca, 0xec, 0xb9, 0x8a, 0xee, 0x83, 0x38, 0x8f, 0x34, 0x5e, 0x44, + 0xee, 0xec, 0x99, 0x7b, 0x59, 0xdc, 0x75, 0x15, 0x12, 0x86, 0xf3, 0x17, 0xd2, 0xe8, 0x0e, 0x85, + 0x94, 0x52, 0x74, 0x85, 0xd3, 0xe3, 0x11, 0xc8, 0xed, 0xc4, 0x1d, 0xb2, 0xde, 0x07, 0x02, 0xeb, + 0xfd, 0x9e, 0xce, 0x01, 0x1c, 0xde, 0xf9, 0x19, 0xba, 0x46, 0xf1, 0x52, 0x04, 0xf6, 0xf5, 0xee, + 0x37, 0x7a, 0x8e, 0xe1, 0x5e, 0x48, 0x34, 0x88, 0xb3, 0x65, 0xc9, 0x9a, 0x7b, 0x7b, 0x8f, 0x4c, + 0x4e, 0xd5, 0x9d, 0xbe, 0x12, 0x28, 0x7f, 0x29, 0x88, 0xee, 0xd4, 0x34, 0xf0, 0xd1, 0x74, 0x8d, + 0xf4, 0x89, 0x01, 0xb8, 0xbe, 0x27, 0x79, 0xcf, 0x81, 0xde, 0x04, 0x50, 0x37, 0x9b, 0x6d, 0x87, + 0xd7, 0x55, 0x9e, 0x66, 0x52, 0x4c, 0xc2, 0x96, 0x30, 0x4d, 0x21, 0x6d, 0xc7, 0xd5, 0x47, 0x99, + 0x1e, 0xb8, 0x88, 0x19, 0x9c, 0xf5, 0x06, 0x1a, 0x63, 0x03, 0x3d, 0xb8, 0xc3, 0x93, 0x76, 0x95, + 0xac, 0x63, 0x90, 0xad, 0x18, 0x75, 0x62, 0x3a, 0x9a, 0xed, 0xb4, 0x88, 0xde, 0xa8, 0x9b,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0xf8, 0xf9, 0x01, 0x7e, 0xde, + 0x78, 0x1b, 0xed, 0xf0, 0xf3, 0x26, 0x7e, 0x7f, 0x17, 0xff, 0xbf, 0x8f, 0xff, 0x3f, 0xc0, 0xcf, + 0x63, 0xbf, 0x39, 0x18, 0x29, 0x27, 0x58, 0x18, 0x9d, 0xf8, 0x5b, 0x00, 0x00, 0x00, 0xff, 0xff, + 0xfe, 0xe2, 0xe2, 0x22, 0x06, 0x2d, 0x00, 0x00, + } + r := bytes.NewReader(gzipped) + gzipr, err := compress_gzip.NewReader(r) + if err != nil { + panic(err) + } + ungzipped, err := io_ioutil.ReadAll(gzipr) + if err != nil { + panic(err) + } + if err := github_com_gogo_protobuf_proto.Unmarshal(ungzipped, d); err != nil { + panic(err) + } + return d +} +func (this *Subby) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*Subby) + if !ok { + that2, ok := that.(Subby) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *Subby") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *Subby but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *Subby but is not nil && this == nil") + } + if this.Sub != that1.Sub { + return fmt.Errorf("Sub this(%v) Not Equal that(%v)", this.Sub, that1.Sub) + } + return nil +} +func (this *Subby) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*Subby) + if !ok { + that2, ok := that.(Subby) + 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.Sub != that1.Sub { + return false + } + return true +} +func (this *SampleOneOf) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*SampleOneOf) + if !ok { + that2, ok := that.(SampleOneOf) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *SampleOneOf") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *SampleOneOf but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *SampleOneOf but is not nil && this == nil") + } + if that1.TestOneof == nil { + if this.TestOneof != nil { + return fmt.Errorf("this.TestOneof != nil && that1.TestOneof == nil") + } + } else if this.TestOneof == nil { + return fmt.Errorf("this.TestOneof == nil && that1.TestOneof != nil") + } else if err := this.TestOneof.VerboseEqual(that1.TestOneof); err != nil { + return err + } + return nil +} +func (this *SampleOneOf_Field1) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*SampleOneOf_Field1) + if !ok { + that2, ok := that.(SampleOneOf_Field1) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *SampleOneOf_Field1") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *SampleOneOf_Field1 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *SampleOneOf_Field1 but is not nil && this == nil") + } + if this.Field1 != that1.Field1 { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) + } + return nil +} +func (this *SampleOneOf_Field2) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*SampleOneOf_Field2) + if !ok { + that2, ok := that.(SampleOneOf_Field2) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *SampleOneOf_Field2") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *SampleOneOf_Field2 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *SampleOneOf_Field2 but is not nil && this == nil") + } + if this.Field2 != that1.Field2 { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) + } + return nil +} +func (this *SampleOneOf_Field3) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*SampleOneOf_Field3) + if !ok { + that2, ok := that.(SampleOneOf_Field3) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *SampleOneOf_Field3") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *SampleOneOf_Field3 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *SampleOneOf_Field3 but is not nil && this == nil") + } + if this.Field3 != that1.Field3 { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", this.Field3, that1.Field3) + } + return nil +} +func (this *SampleOneOf_Field4) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*SampleOneOf_Field4) + if !ok { + that2, ok := that.(SampleOneOf_Field4) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *SampleOneOf_Field4") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *SampleOneOf_Field4 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *SampleOneOf_Field4 but is not nil && this == nil") + } + if this.Field4 != that1.Field4 { + return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", this.Field4, that1.Field4) + } + return nil +} +func (this *SampleOneOf_Field5) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*SampleOneOf_Field5) + if !ok { + that2, ok := that.(SampleOneOf_Field5) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *SampleOneOf_Field5") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *SampleOneOf_Field5 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *SampleOneOf_Field5 but is not nil && this == nil") + } + if this.Field5 != that1.Field5 { + return fmt.Errorf("Field5 this(%v) Not Equal that(%v)", this.Field5, that1.Field5) + } + return nil +} +func (this *SampleOneOf_Field6) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*SampleOneOf_Field6) + if !ok { + that2, ok := that.(SampleOneOf_Field6) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *SampleOneOf_Field6") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *SampleOneOf_Field6 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *SampleOneOf_Field6 but is not nil && this == nil") + } + if this.Field6 != that1.Field6 { + return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", this.Field6, that1.Field6) + } + return nil +} +func (this *SampleOneOf_Field7) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*SampleOneOf_Field7) + if !ok { + that2, ok := that.(SampleOneOf_Field7) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *SampleOneOf_Field7") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *SampleOneOf_Field7 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *SampleOneOf_Field7 but is not nil && this == nil") + } + if this.Field7 != that1.Field7 { + return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", this.Field7, that1.Field7) + } + return nil +} +func (this *SampleOneOf_Field8) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*SampleOneOf_Field8) + if !ok { + that2, ok := that.(SampleOneOf_Field8) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *SampleOneOf_Field8") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *SampleOneOf_Field8 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *SampleOneOf_Field8 but is not nil && this == nil") + } + if this.Field8 != that1.Field8 { + return fmt.Errorf("Field8 this(%v) Not Equal that(%v)", this.Field8, that1.Field8) + } + return nil +} +func (this *SampleOneOf_Field9) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*SampleOneOf_Field9) + if !ok { + that2, ok := that.(SampleOneOf_Field9) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *SampleOneOf_Field9") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *SampleOneOf_Field9 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *SampleOneOf_Field9 but is not nil && this == nil") + } + if this.Field9 != that1.Field9 { + return fmt.Errorf("Field9 this(%v) Not Equal that(%v)", this.Field9, that1.Field9) + } + return nil +} +func (this *SampleOneOf_Field10) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*SampleOneOf_Field10) + if !ok { + that2, ok := that.(SampleOneOf_Field10) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *SampleOneOf_Field10") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *SampleOneOf_Field10 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *SampleOneOf_Field10 but is not nil && this == nil") + } + if this.Field10 != that1.Field10 { + return fmt.Errorf("Field10 this(%v) Not Equal that(%v)", this.Field10, that1.Field10) + } + return nil +} +func (this *SampleOneOf_Field11) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*SampleOneOf_Field11) + if !ok { + that2, ok := that.(SampleOneOf_Field11) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *SampleOneOf_Field11") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *SampleOneOf_Field11 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *SampleOneOf_Field11 but is not nil && this == nil") + } + if this.Field11 != that1.Field11 { + return fmt.Errorf("Field11 this(%v) Not Equal that(%v)", this.Field11, that1.Field11) + } + return nil +} +func (this *SampleOneOf_Field12) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*SampleOneOf_Field12) + if !ok { + that2, ok := that.(SampleOneOf_Field12) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *SampleOneOf_Field12") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *SampleOneOf_Field12 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *SampleOneOf_Field12 but is not nil && this == nil") + } + if this.Field12 != that1.Field12 { + return fmt.Errorf("Field12 this(%v) Not Equal that(%v)", this.Field12, that1.Field12) + } + return nil +} +func (this *SampleOneOf_Field13) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*SampleOneOf_Field13) + if !ok { + that2, ok := that.(SampleOneOf_Field13) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *SampleOneOf_Field13") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *SampleOneOf_Field13 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *SampleOneOf_Field13 but is not nil && this == nil") + } + if this.Field13 != that1.Field13 { + return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", this.Field13, that1.Field13) + } + return nil +} +func (this *SampleOneOf_Field14) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*SampleOneOf_Field14) + if !ok { + that2, ok := that.(SampleOneOf_Field14) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *SampleOneOf_Field14") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *SampleOneOf_Field14 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *SampleOneOf_Field14 but is not nil && this == nil") + } + if this.Field14 != that1.Field14 { + return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", this.Field14, that1.Field14) + } + return nil +} +func (this *SampleOneOf_Field15) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*SampleOneOf_Field15) + if !ok { + that2, ok := that.(SampleOneOf_Field15) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *SampleOneOf_Field15") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *SampleOneOf_Field15 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *SampleOneOf_Field15 but is not nil && this == nil") + } + if !bytes.Equal(this.Field15, that1.Field15) { + return fmt.Errorf("Field15 this(%v) Not Equal that(%v)", this.Field15, that1.Field15) + } + return nil +} +func (this *SampleOneOf_SubMessage) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*SampleOneOf_SubMessage) + if !ok { + that2, ok := that.(SampleOneOf_SubMessage) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *SampleOneOf_SubMessage") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *SampleOneOf_SubMessage but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *SampleOneOf_SubMessage but is not nil && this == nil") + } + if !this.SubMessage.Equal(that1.SubMessage) { + return fmt.Errorf("SubMessage this(%v) Not Equal that(%v)", this.SubMessage, that1.SubMessage) + } + return nil +} +func (this *SampleOneOf) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*SampleOneOf) + if !ok { + that2, ok := that.(SampleOneOf) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + if this == nil { + return true + } + return false + } else if this == nil { + return false + } + if that1.TestOneof == nil { + if this.TestOneof != nil { + return false + } + } else if this.TestOneof == nil { + return false + } else if !this.TestOneof.Equal(that1.TestOneof) { + return false + } + return true +} +func (this *SampleOneOf_Field1) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*SampleOneOf_Field1) + if !ok { + that2, ok := that.(SampleOneOf_Field1) + 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.Field1 != that1.Field1 { + return false + } + return true +} +func (this *SampleOneOf_Field2) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*SampleOneOf_Field2) + if !ok { + that2, ok := that.(SampleOneOf_Field2) + 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.Field2 != that1.Field2 { + return false + } + return true +} +func (this *SampleOneOf_Field3) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*SampleOneOf_Field3) + if !ok { + that2, ok := that.(SampleOneOf_Field3) + 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.Field3 != that1.Field3 { + return false + } + return true +} +func (this *SampleOneOf_Field4) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*SampleOneOf_Field4) + if !ok { + that2, ok := that.(SampleOneOf_Field4) + 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.Field4 != that1.Field4 { + return false + } + return true +} +func (this *SampleOneOf_Field5) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*SampleOneOf_Field5) + if !ok { + that2, ok := that.(SampleOneOf_Field5) + 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.Field5 != that1.Field5 { + return false + } + return true +} +func (this *SampleOneOf_Field6) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*SampleOneOf_Field6) + if !ok { + that2, ok := that.(SampleOneOf_Field6) + 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.Field6 != that1.Field6 { + return false + } + return true +} +func (this *SampleOneOf_Field7) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*SampleOneOf_Field7) + if !ok { + that2, ok := that.(SampleOneOf_Field7) + 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.Field7 != that1.Field7 { + return false + } + return true +} +func (this *SampleOneOf_Field8) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*SampleOneOf_Field8) + if !ok { + that2, ok := that.(SampleOneOf_Field8) + 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.Field8 != that1.Field8 { + return false + } + return true +} +func (this *SampleOneOf_Field9) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*SampleOneOf_Field9) + if !ok { + that2, ok := that.(SampleOneOf_Field9) + 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.Field9 != that1.Field9 { + return false + } + return true +} +func (this *SampleOneOf_Field10) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*SampleOneOf_Field10) + if !ok { + that2, ok := that.(SampleOneOf_Field10) + 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.Field10 != that1.Field10 { + return false + } + return true +} +func (this *SampleOneOf_Field11) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*SampleOneOf_Field11) + if !ok { + that2, ok := that.(SampleOneOf_Field11) + 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.Field11 != that1.Field11 { + return false + } + return true +} +func (this *SampleOneOf_Field12) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*SampleOneOf_Field12) + if !ok { + that2, ok := that.(SampleOneOf_Field12) + 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.Field12 != that1.Field12 { + return false + } + return true +} +func (this *SampleOneOf_Field13) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*SampleOneOf_Field13) + if !ok { + that2, ok := that.(SampleOneOf_Field13) + 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.Field13 != that1.Field13 { + return false + } + return true +} +func (this *SampleOneOf_Field14) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*SampleOneOf_Field14) + if !ok { + that2, ok := that.(SampleOneOf_Field14) + 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.Field14 != that1.Field14 { + return false + } + return true +} +func (this *SampleOneOf_Field15) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*SampleOneOf_Field15) + if !ok { + that2, ok := that.(SampleOneOf_Field15) + 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.Field15, that1.Field15) { + return false + } + return true +} +func (this *SampleOneOf_SubMessage) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*SampleOneOf_SubMessage) + if !ok { + that2, ok := that.(SampleOneOf_SubMessage) + 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.SubMessage.Equal(that1.SubMessage) { + return false + } + return true +} +func (this *Subby) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&one.Subby{") + s = append(s, "Sub: "+fmt.Sprintf("%#v", this.Sub)+",\n") + s = append(s, "}") + return strings.Join(s, "") +} +func (this *SampleOneOf) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 20) + s = append(s, "&one.SampleOneOf{") + if this.TestOneof != nil { + s = append(s, "TestOneof: "+fmt.Sprintf("%#v", this.TestOneof)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *SampleOneOf_Field1) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.SampleOneOf_Field1{` + + `Field1:` + fmt.Sprintf("%#v", this.Field1) + `}`}, ", ") + return s +} +func (this *SampleOneOf_Field2) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.SampleOneOf_Field2{` + + `Field2:` + fmt.Sprintf("%#v", this.Field2) + `}`}, ", ") + return s +} +func (this *SampleOneOf_Field3) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.SampleOneOf_Field3{` + + `Field3:` + fmt.Sprintf("%#v", this.Field3) + `}`}, ", ") + return s +} +func (this *SampleOneOf_Field4) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.SampleOneOf_Field4{` + + `Field4:` + fmt.Sprintf("%#v", this.Field4) + `}`}, ", ") + return s +} +func (this *SampleOneOf_Field5) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.SampleOneOf_Field5{` + + `Field5:` + fmt.Sprintf("%#v", this.Field5) + `}`}, ", ") + return s +} +func (this *SampleOneOf_Field6) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.SampleOneOf_Field6{` + + `Field6:` + fmt.Sprintf("%#v", this.Field6) + `}`}, ", ") + return s +} +func (this *SampleOneOf_Field7) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.SampleOneOf_Field7{` + + `Field7:` + fmt.Sprintf("%#v", this.Field7) + `}`}, ", ") + return s +} +func (this *SampleOneOf_Field8) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.SampleOneOf_Field8{` + + `Field8:` + fmt.Sprintf("%#v", this.Field8) + `}`}, ", ") + return s +} +func (this *SampleOneOf_Field9) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.SampleOneOf_Field9{` + + `Field9:` + fmt.Sprintf("%#v", this.Field9) + `}`}, ", ") + return s +} +func (this *SampleOneOf_Field10) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.SampleOneOf_Field10{` + + `Field10:` + fmt.Sprintf("%#v", this.Field10) + `}`}, ", ") + return s +} +func (this *SampleOneOf_Field11) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.SampleOneOf_Field11{` + + `Field11:` + fmt.Sprintf("%#v", this.Field11) + `}`}, ", ") + return s +} +func (this *SampleOneOf_Field12) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.SampleOneOf_Field12{` + + `Field12:` + fmt.Sprintf("%#v", this.Field12) + `}`}, ", ") + return s +} +func (this *SampleOneOf_Field13) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.SampleOneOf_Field13{` + + `Field13:` + fmt.Sprintf("%#v", this.Field13) + `}`}, ", ") + return s +} +func (this *SampleOneOf_Field14) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.SampleOneOf_Field14{` + + `Field14:` + fmt.Sprintf("%#v", this.Field14) + `}`}, ", ") + return s +} +func (this *SampleOneOf_Field15) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.SampleOneOf_Field15{` + + `Field15:` + fmt.Sprintf("%#v", this.Field15) + `}`}, ", ") + return s +} +func (this *SampleOneOf_SubMessage) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.SampleOneOf_SubMessage{` + + `SubMessage:` + fmt.Sprintf("%#v", this.SubMessage) + `}`}, ", ") + return s +} +func valueToGoStringOne(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 extensionToGoStringOne(e map[int32]github_com_gogo_protobuf_proto.Extension) string { + if e == nil { + return "nil" + } + s := "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 +} +func NewPopulatedSubby(r randyOne, easy bool) *Subby { + this := &Subby{} + this.Sub = randStringOne(r) + if !easy && r.Intn(10) != 0 { + } + return this +} + +func NewPopulatedSampleOneOf(r randyOne, easy bool) *SampleOneOf { + this := &SampleOneOf{} + oneofNumber_TestOneof := []int32{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}[r.Intn(16)] + switch oneofNumber_TestOneof { + case 1: + this.TestOneof = NewPopulatedSampleOneOf_Field1(r, easy) + case 2: + this.TestOneof = NewPopulatedSampleOneOf_Field2(r, easy) + case 3: + this.TestOneof = NewPopulatedSampleOneOf_Field3(r, easy) + case 4: + this.TestOneof = NewPopulatedSampleOneOf_Field4(r, easy) + case 5: + this.TestOneof = NewPopulatedSampleOneOf_Field5(r, easy) + case 6: + this.TestOneof = NewPopulatedSampleOneOf_Field6(r, easy) + case 7: + this.TestOneof = NewPopulatedSampleOneOf_Field7(r, easy) + case 8: + this.TestOneof = NewPopulatedSampleOneOf_Field8(r, easy) + case 9: + this.TestOneof = NewPopulatedSampleOneOf_Field9(r, easy) + case 10: + this.TestOneof = NewPopulatedSampleOneOf_Field10(r, easy) + case 11: + this.TestOneof = NewPopulatedSampleOneOf_Field11(r, easy) + case 12: + this.TestOneof = NewPopulatedSampleOneOf_Field12(r, easy) + case 13: + this.TestOneof = NewPopulatedSampleOneOf_Field13(r, easy) + case 14: + this.TestOneof = NewPopulatedSampleOneOf_Field14(r, easy) + case 15: + this.TestOneof = NewPopulatedSampleOneOf_Field15(r, easy) + case 16: + this.TestOneof = NewPopulatedSampleOneOf_SubMessage(r, easy) + } + if !easy && r.Intn(10) != 0 { + } + return this +} + +func NewPopulatedSampleOneOf_Field1(r randyOne, easy bool) *SampleOneOf_Field1 { + this := &SampleOneOf_Field1{} + this.Field1 = float64(r.Float64()) + if r.Intn(2) == 0 { + this.Field1 *= -1 + } + return this +} +func NewPopulatedSampleOneOf_Field2(r randyOne, easy bool) *SampleOneOf_Field2 { + this := &SampleOneOf_Field2{} + this.Field2 = float32(r.Float32()) + if r.Intn(2) == 0 { + this.Field2 *= -1 + } + return this +} +func NewPopulatedSampleOneOf_Field3(r randyOne, easy bool) *SampleOneOf_Field3 { + this := &SampleOneOf_Field3{} + this.Field3 = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Field3 *= -1 + } + return this +} +func NewPopulatedSampleOneOf_Field4(r randyOne, easy bool) *SampleOneOf_Field4 { + this := &SampleOneOf_Field4{} + this.Field4 = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Field4 *= -1 + } + return this +} +func NewPopulatedSampleOneOf_Field5(r randyOne, easy bool) *SampleOneOf_Field5 { + this := &SampleOneOf_Field5{} + this.Field5 = uint32(r.Uint32()) + return this +} +func NewPopulatedSampleOneOf_Field6(r randyOne, easy bool) *SampleOneOf_Field6 { + this := &SampleOneOf_Field6{} + this.Field6 = uint64(uint64(r.Uint32())) + return this +} +func NewPopulatedSampleOneOf_Field7(r randyOne, easy bool) *SampleOneOf_Field7 { + this := &SampleOneOf_Field7{} + this.Field7 = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Field7 *= -1 + } + return this +} +func NewPopulatedSampleOneOf_Field8(r randyOne, easy bool) *SampleOneOf_Field8 { + this := &SampleOneOf_Field8{} + this.Field8 = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Field8 *= -1 + } + return this +} +func NewPopulatedSampleOneOf_Field9(r randyOne, easy bool) *SampleOneOf_Field9 { + this := &SampleOneOf_Field9{} + this.Field9 = uint32(r.Uint32()) + return this +} +func NewPopulatedSampleOneOf_Field10(r randyOne, easy bool) *SampleOneOf_Field10 { + this := &SampleOneOf_Field10{} + this.Field10 = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Field10 *= -1 + } + return this +} +func NewPopulatedSampleOneOf_Field11(r randyOne, easy bool) *SampleOneOf_Field11 { + this := &SampleOneOf_Field11{} + this.Field11 = uint64(uint64(r.Uint32())) + return this +} +func NewPopulatedSampleOneOf_Field12(r randyOne, easy bool) *SampleOneOf_Field12 { + this := &SampleOneOf_Field12{} + this.Field12 = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Field12 *= -1 + } + return this +} +func NewPopulatedSampleOneOf_Field13(r randyOne, easy bool) *SampleOneOf_Field13 { + this := &SampleOneOf_Field13{} + this.Field13 = bool(bool(r.Intn(2) == 0)) + return this +} +func NewPopulatedSampleOneOf_Field14(r randyOne, easy bool) *SampleOneOf_Field14 { + this := &SampleOneOf_Field14{} + this.Field14 = randStringOne(r) + return this +} +func NewPopulatedSampleOneOf_Field15(r randyOne, easy bool) *SampleOneOf_Field15 { + this := &SampleOneOf_Field15{} + v1 := r.Intn(100) + this.Field15 = make([]byte, v1) + for i := 0; i < v1; i++ { + this.Field15[i] = byte(r.Intn(256)) + } + return this +} +func NewPopulatedSampleOneOf_SubMessage(r randyOne, easy bool) *SampleOneOf_SubMessage { + this := &SampleOneOf_SubMessage{} + this.SubMessage = NewPopulatedSubby(r, easy) + return this +} + +type randyOne interface { + Float32() float32 + Float64() float64 + Int63() int64 + Int31() int32 + Uint32() uint32 + Intn(n int) int +} + +func randUTF8RuneOne(r randyOne) 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 randStringOne(r randyOne) string { + v2 := r.Intn(100) + tmps := make([]rune, v2) + for i := 0; i < v2; i++ { + tmps[i] = randUTF8RuneOne(r) + } + return string(tmps) +} +func randUnrecognizedOne(r randyOne, 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 = randFieldOne(data, r, fieldNumber, wire) + } + return data +} +func randFieldOne(data []byte, r randyOne, fieldNumber int, wire int) []byte { + key := uint32(fieldNumber)<<3 | uint32(wire) + switch wire { + case 0: + data = encodeVarintPopulateOne(data, uint64(key)) + v3 := r.Int63() + if r.Intn(2) == 0 { + v3 *= -1 + } + data = encodeVarintPopulateOne(data, uint64(v3)) + case 1: + data = encodeVarintPopulateOne(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 = encodeVarintPopulateOne(data, uint64(key)) + ll := r.Intn(100) + data = encodeVarintPopulateOne(data, uint64(ll)) + for j := 0; j < ll; j++ { + data = append(data, byte(r.Intn(256))) + } + default: + data = encodeVarintPopulateOne(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 encodeVarintPopulateOne(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 *Subby) Size() (n int) { + var l int + _ = l + l = len(m.Sub) + if l > 0 { + n += 1 + l + sovOne(uint64(l)) + } + return n +} + +func (m *SampleOneOf) Size() (n int) { + var l int + _ = l + if m.TestOneof != nil { + n += m.TestOneof.Size() + } + return n +} + +func (m *SampleOneOf_Field1) Size() (n int) { + var l int + _ = l + n += 9 + return n +} +func (m *SampleOneOf_Field2) Size() (n int) { + var l int + _ = l + n += 5 + return n +} +func (m *SampleOneOf_Field3) Size() (n int) { + var l int + _ = l + n += 1 + sovOne(uint64(m.Field3)) + return n +} +func (m *SampleOneOf_Field4) Size() (n int) { + var l int + _ = l + n += 1 + sovOne(uint64(m.Field4)) + return n +} +func (m *SampleOneOf_Field5) Size() (n int) { + var l int + _ = l + n += 1 + sovOne(uint64(m.Field5)) + return n +} +func (m *SampleOneOf_Field6) Size() (n int) { + var l int + _ = l + n += 1 + sovOne(uint64(m.Field6)) + return n +} +func (m *SampleOneOf_Field7) Size() (n int) { + var l int + _ = l + n += 1 + sozOne(uint64(m.Field7)) + return n +} +func (m *SampleOneOf_Field8) Size() (n int) { + var l int + _ = l + n += 1 + sozOne(uint64(m.Field8)) + return n +} +func (m *SampleOneOf_Field9) Size() (n int) { + var l int + _ = l + n += 5 + return n +} +func (m *SampleOneOf_Field10) Size() (n int) { + var l int + _ = l + n += 5 + return n +} +func (m *SampleOneOf_Field11) Size() (n int) { + var l int + _ = l + n += 9 + return n +} +func (m *SampleOneOf_Field12) Size() (n int) { + var l int + _ = l + n += 9 + return n +} +func (m *SampleOneOf_Field13) Size() (n int) { + var l int + _ = l + n += 2 + return n +} +func (m *SampleOneOf_Field14) Size() (n int) { + var l int + _ = l + l = len(m.Field14) + n += 1 + l + sovOne(uint64(l)) + return n +} +func (m *SampleOneOf_Field15) Size() (n int) { + var l int + _ = l + if m.Field15 != nil { + l = len(m.Field15) + n += 1 + l + sovOne(uint64(l)) + } + return n +} +func (m *SampleOneOf_SubMessage) Size() (n int) { + var l int + _ = l + if m.SubMessage != nil { + l = m.SubMessage.Size() + n += 2 + l + sovOne(uint64(l)) + } + return n +} + +func sovOne(x uint64) (n int) { + for { + n++ + x >>= 7 + if x == 0 { + break + } + } + return n +} +func sozOne(x uint64) (n int) { + return sovOne(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (this *Subby) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&Subby{`, + `Sub:` + fmt.Sprintf("%v", this.Sub) + `,`, + `}`, + }, "") + return s +} +func (this *SampleOneOf) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&SampleOneOf{`, + `TestOneof:` + fmt.Sprintf("%v", this.TestOneof) + `,`, + `}`, + }, "") + return s +} +func (this *SampleOneOf_Field1) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&SampleOneOf_Field1{`, + `Field1:` + fmt.Sprintf("%v", this.Field1) + `,`, + `}`, + }, "") + return s +} +func (this *SampleOneOf_Field2) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&SampleOneOf_Field2{`, + `Field2:` + fmt.Sprintf("%v", this.Field2) + `,`, + `}`, + }, "") + return s +} +func (this *SampleOneOf_Field3) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&SampleOneOf_Field3{`, + `Field3:` + fmt.Sprintf("%v", this.Field3) + `,`, + `}`, + }, "") + return s +} +func (this *SampleOneOf_Field4) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&SampleOneOf_Field4{`, + `Field4:` + fmt.Sprintf("%v", this.Field4) + `,`, + `}`, + }, "") + return s +} +func (this *SampleOneOf_Field5) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&SampleOneOf_Field5{`, + `Field5:` + fmt.Sprintf("%v", this.Field5) + `,`, + `}`, + }, "") + return s +} +func (this *SampleOneOf_Field6) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&SampleOneOf_Field6{`, + `Field6:` + fmt.Sprintf("%v", this.Field6) + `,`, + `}`, + }, "") + return s +} +func (this *SampleOneOf_Field7) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&SampleOneOf_Field7{`, + `Field7:` + fmt.Sprintf("%v", this.Field7) + `,`, + `}`, + }, "") + return s +} +func (this *SampleOneOf_Field8) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&SampleOneOf_Field8{`, + `Field8:` + fmt.Sprintf("%v", this.Field8) + `,`, + `}`, + }, "") + return s +} +func (this *SampleOneOf_Field9) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&SampleOneOf_Field9{`, + `Field9:` + fmt.Sprintf("%v", this.Field9) + `,`, + `}`, + }, "") + return s +} +func (this *SampleOneOf_Field10) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&SampleOneOf_Field10{`, + `Field10:` + fmt.Sprintf("%v", this.Field10) + `,`, + `}`, + }, "") + return s +} +func (this *SampleOneOf_Field11) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&SampleOneOf_Field11{`, + `Field11:` + fmt.Sprintf("%v", this.Field11) + `,`, + `}`, + }, "") + return s +} +func (this *SampleOneOf_Field12) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&SampleOneOf_Field12{`, + `Field12:` + fmt.Sprintf("%v", this.Field12) + `,`, + `}`, + }, "") + return s +} +func (this *SampleOneOf_Field13) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&SampleOneOf_Field13{`, + `Field13:` + fmt.Sprintf("%v", this.Field13) + `,`, + `}`, + }, "") + return s +} +func (this *SampleOneOf_Field14) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&SampleOneOf_Field14{`, + `Field14:` + fmt.Sprintf("%v", this.Field14) + `,`, + `}`, + }, "") + return s +} +func (this *SampleOneOf_Field15) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&SampleOneOf_Field15{`, + `Field15:` + fmt.Sprintf("%v", this.Field15) + `,`, + `}`, + }, "") + return s +} +func (this *SampleOneOf_SubMessage) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&SampleOneOf_SubMessage{`, + `SubMessage:` + strings.Replace(fmt.Sprintf("%v", this.SubMessage), "Subby", "Subby", 1) + `,`, + `}`, + }, "") + return s +} +func valueToStringOne(v interface{}) string { + rv := reflect.ValueOf(v) + if rv.IsNil() { + return "nil" + } + pv := reflect.Indirect(rv).Interface() + return fmt.Sprintf("*%v", pv) +} +func (m *Subby) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *Subby) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Sub) > 0 { + data[i] = 0xa + i++ + i = encodeVarintOne(data, i, uint64(len(m.Sub))) + i += copy(data[i:], m.Sub) + } + return i, nil +} + +func (m *SampleOneOf) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *SampleOneOf) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.TestOneof != nil { + nn1, err := m.TestOneof.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += nn1 + } + return i, nil +} + +func (m *SampleOneOf_Field1) MarshalTo(data []byte) (int, error) { + i := 0 + data[i] = 0x9 + i++ + *(*float64)(unsafe.Pointer(&data[i])) = m.Field1 + i += 8 + return i, nil +} +func (m *SampleOneOf_Field2) MarshalTo(data []byte) (int, error) { + i := 0 + data[i] = 0x15 + i++ + *(*float32)(unsafe.Pointer(&data[i])) = m.Field2 + i += 4 + return i, nil +} +func (m *SampleOneOf_Field3) MarshalTo(data []byte) (int, error) { + i := 0 + data[i] = 0x18 + i++ + i = encodeVarintOne(data, i, uint64(m.Field3)) + return i, nil +} +func (m *SampleOneOf_Field4) MarshalTo(data []byte) (int, error) { + i := 0 + data[i] = 0x20 + i++ + i = encodeVarintOne(data, i, uint64(m.Field4)) + return i, nil +} +func (m *SampleOneOf_Field5) MarshalTo(data []byte) (int, error) { + i := 0 + data[i] = 0x28 + i++ + i = encodeVarintOne(data, i, uint64(m.Field5)) + return i, nil +} +func (m *SampleOneOf_Field6) MarshalTo(data []byte) (int, error) { + i := 0 + data[i] = 0x30 + i++ + i = encodeVarintOne(data, i, uint64(m.Field6)) + return i, nil +} +func (m *SampleOneOf_Field7) MarshalTo(data []byte) (int, error) { + i := 0 + data[i] = 0x38 + i++ + i = encodeVarintOne(data, i, uint64((uint32(m.Field7)<<1)^uint32((m.Field7>>31)))) + return i, nil +} +func (m *SampleOneOf_Field8) MarshalTo(data []byte) (int, error) { + i := 0 + data[i] = 0x40 + i++ + i = encodeVarintOne(data, i, uint64((uint64(m.Field8)<<1)^uint64((m.Field8>>63)))) + return i, nil +} +func (m *SampleOneOf_Field9) MarshalTo(data []byte) (int, error) { + i := 0 + data[i] = 0x4d + i++ + *(*uint32)(unsafe.Pointer(&data[i])) = m.Field9 + i += 4 + return i, nil +} +func (m *SampleOneOf_Field10) MarshalTo(data []byte) (int, error) { + i := 0 + data[i] = 0x55 + i++ + *(*int32)(unsafe.Pointer(&data[i])) = m.Field10 + i += 4 + return i, nil +} +func (m *SampleOneOf_Field11) MarshalTo(data []byte) (int, error) { + i := 0 + data[i] = 0x59 + i++ + *(*uint64)(unsafe.Pointer(&data[i])) = m.Field11 + i += 8 + return i, nil +} +func (m *SampleOneOf_Field12) MarshalTo(data []byte) (int, error) { + i := 0 + data[i] = 0x61 + i++ + *(*int64)(unsafe.Pointer(&data[i])) = m.Field12 + i += 8 + return i, nil +} +func (m *SampleOneOf_Field13) MarshalTo(data []byte) (int, error) { + i := 0 + data[i] = 0x68 + i++ + if m.Field13 { + data[i] = 1 + } else { + data[i] = 0 + } + i++ + return i, nil +} +func (m *SampleOneOf_Field14) MarshalTo(data []byte) (int, error) { + i := 0 + data[i] = 0x72 + i++ + i = encodeVarintOne(data, i, uint64(len(m.Field14))) + i += copy(data[i:], m.Field14) + return i, nil +} +func (m *SampleOneOf_Field15) MarshalTo(data []byte) (int, error) { + i := 0 + if m.Field15 != nil { + data[i] = 0x7a + i++ + i = encodeVarintOne(data, i, uint64(len(m.Field15))) + i += copy(data[i:], m.Field15) + } + return i, nil +} +func (m *SampleOneOf_SubMessage) MarshalTo(data []byte) (int, error) { + i := 0 + if m.SubMessage != nil { + data[i] = 0x82 + i++ + data[i] = 0x1 + i++ + i = encodeVarintOne(data, i, uint64(m.SubMessage.Size())) + n2, err := m.SubMessage.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n2 + } + return i, nil +} +func encodeFixed64One(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 encodeFixed32One(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 encodeVarintOne(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 (m *Subby) 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 ErrIntOverflowOneUnsafe + } + 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: Subby: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Subby: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Sub", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOneUnsafe + } + 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 ErrInvalidLengthOneUnsafe + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Sub = string(data[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipOneUnsafe(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthOneUnsafe + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *SampleOneOf) 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 ErrIntOverflowOneUnsafe + } + 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: SampleOneOf: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: SampleOneOf: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) + } + var v float64 + if iNdEx+8 > l { + return io.ErrUnexpectedEOF + } + v = *(*float64)(unsafe.Pointer(&data[iNdEx])) + iNdEx += 8 + m.TestOneof = &SampleOneOf_Field1{v} + case 2: + if wireType != 5 { + return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType) + } + var v float32 + if iNdEx+4 > l { + return io.ErrUnexpectedEOF + } + v = *(*float32)(unsafe.Pointer(&data[iNdEx])) + iNdEx += 4 + m.TestOneof = &SampleOneOf_Field2{v} + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field3", wireType) + } + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOneUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.TestOneof = &SampleOneOf_Field3{v} + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field4", wireType) + } + var v int64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOneUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.TestOneof = &SampleOneOf_Field4{v} + case 5: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field5", wireType) + } + var v uint32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOneUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (uint32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.TestOneof = &SampleOneOf_Field5{v} + case 6: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field6", wireType) + } + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOneUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.TestOneof = &SampleOneOf_Field6{v} + case 7: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field7", wireType) + } + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOneUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + v = int32((uint32(v) >> 1) ^ uint32(((v&1)<<31)>>31)) + m.TestOneof = &SampleOneOf_Field7{v} + case 8: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field8", wireType) + } + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOneUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + v = (v >> 1) ^ uint64((int64(v&1)<<63)>>63) + m.TestOneof = &SampleOneOf_Field8{int64(v)} + case 9: + if wireType != 5 { + return fmt.Errorf("proto: wrong wireType = %d for field Field9", wireType) + } + var v uint32 + if iNdEx+4 > l { + return io.ErrUnexpectedEOF + } + v = *(*uint32)(unsafe.Pointer(&data[iNdEx])) + iNdEx += 4 + m.TestOneof = &SampleOneOf_Field9{v} + case 10: + if wireType != 5 { + return fmt.Errorf("proto: wrong wireType = %d for field Field10", wireType) + } + var v int32 + if iNdEx+4 > l { + return io.ErrUnexpectedEOF + } + v = *(*int32)(unsafe.Pointer(&data[iNdEx])) + iNdEx += 4 + m.TestOneof = &SampleOneOf_Field10{v} + case 11: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field Field11", wireType) + } + var v uint64 + if iNdEx+8 > l { + return io.ErrUnexpectedEOF + } + v = *(*uint64)(unsafe.Pointer(&data[iNdEx])) + iNdEx += 8 + m.TestOneof = &SampleOneOf_Field11{v} + case 12: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field Field12", wireType) + } + var v int64 + if iNdEx+8 > l { + return io.ErrUnexpectedEOF + } + v = *(*int64)(unsafe.Pointer(&data[iNdEx])) + iNdEx += 8 + m.TestOneof = &SampleOneOf_Field12{v} + case 13: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field13", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOneUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + b := bool(v != 0) + m.TestOneof = &SampleOneOf_Field13{b} + case 14: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field14", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOneUnsafe + } + 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 ErrInvalidLengthOneUnsafe + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.TestOneof = &SampleOneOf_Field14{string(data[iNdEx:postIndex])} + iNdEx = postIndex + case 15: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field15", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOneUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthOneUnsafe + } + postIndex := iNdEx + byteLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + v := make([]byte, postIndex-iNdEx) + copy(v, data[iNdEx:postIndex]) + m.TestOneof = &SampleOneOf_Field15{v} + iNdEx = postIndex + case 16: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SubMessage", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOneUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthOneUnsafe + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + v := &Subby{} + if err := v.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + m.TestOneof = &SampleOneOf_SubMessage{v} + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipOneUnsafe(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthOneUnsafe + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipOneUnsafe(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, ErrIntOverflowOneUnsafe + } + 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, ErrIntOverflowOneUnsafe + } + 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, ErrIntOverflowOneUnsafe + } + 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, ErrInvalidLengthOneUnsafe + } + return iNdEx, nil + case 3: + for { + var innerWire uint64 + var start int = iNdEx + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowOneUnsafe + } + 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 := skipOneUnsafe(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 ( + ErrInvalidLengthOneUnsafe = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowOneUnsafe = fmt.Errorf("proto: integer overflow") +) + +var fileDescriptorOne = []byte{ + // 381 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0x44, 0xd2, 0xbd, 0x6e, 0xdb, 0x30, + 0x14, 0x05, 0xe0, 0x28, 0x8a, 0xa5, 0x84, 0x72, 0x1a, 0x57, 0xd3, 0x6d, 0x0a, 0x08, 0x45, 0xa6, + 0x2e, 0xb1, 0x62, 0xfd, 0xe4, 0x67, 0x0d, 0x8a, 0xa2, 0x4b, 0x11, 0x20, 0x79, 0x80, 0xc0, 0x6c, + 0x29, 0xd9, 0x80, 0x6d, 0x1a, 0x95, 0x34, 0x74, 0xf3, 0xe3, 0x74, 0xec, 0xd8, 0x47, 0xf0, 0xd8, + 0xb1, 0x43, 0x07, 0xdb, 0x5d, 0x3a, 0x7a, 0xf4, 0x98, 0x63, 0x0a, 0xb8, 0x1c, 0x0e, 0x78, 0x89, + 0xef, 0x68, 0xa0, 0x48, 0xf1, 0xf6, 0x8b, 0x9e, 0x4a, 0x5d, 0xc5, 0xcd, 0xac, 0x1a, 0x16, 0x4a, + 0xea, 0x7a, 0x14, 0xeb, 0x99, 0xea, 0xcf, 0xbf, 0xe9, 0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x1e, + 0x5e, 0x8a, 0x00, 0x17, 0xf5, 0x3c, 0x55, 0x55, 0x35, 0x2c, 0x15, 0xf5, 0xe0, 0x41, 0x22, 0xfa, + 0xfb, 0x17, 0x61, 0x2e, 0x15, 0x5d, 0x81, 0xc2, 0xe7, 0xd6, 0xef, 0xbb, 0x42, 0xd4, 0xaa, 0xaa, + 0x9f, 0xe1, 0xba, 0xb8, 0xff, 0xb0, 0x5c, 0x47, 0x07, 0xbf, 0x91, 0x3f, 0xc8, 0x6a, 0x1d, 0x39, + 0x5b, 0x64, 0x87, 0x2c, 0x36, 0x91, 0xf3, 0x03, 0xf9, 0x89, 0xfc, 0x42, 0x96, 0x1b, 0xf4, 0x90, + 0x15, 0xe6, 0xff, 0x58, 0xb7, 0x58, 0x77, 0xc8, 0xe2, 0x5f, 0xe4, 0x48, 0xcf, 0x3c, 0xa3, 0xf4, + 0x25, 0x00, 0x00, 0xff, 0xff, 0x90, 0x60, 0x36, 0x9e, 0x99, 0x02, 0x00, 0x00, +} diff --git a/vendor/github.com/gogo/protobuf/test/oneof3/combos/unsafeboth/one.proto b/vendor/github.com/gogo/protobuf/test/oneof3/combos/unsafeboth/one.proto new file mode 100644 index 000000000..112cabc20 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/oneof3/combos/unsafeboth/one.proto @@ -0,0 +1,80 @@ +// Copyright (c) 2013, Vastech SA (PTY) LTD. All rights reserved. +// http://github.com/gogo/protobuf/gogoproto +// +// 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 = "proto3"; + +package one; + +import "github.com/gogo/protobuf/gogoproto/gogo.proto"; + +option (gogoproto.goproto_stringer_all) = false; +option (gogoproto.goproto_enum_prefix_all) = false; +option (gogoproto.goproto_getters_all) = false; + +option (gogoproto.equal_all) = true; +option (gogoproto.verbose_equal_all) = true; +option (gogoproto.stringer_all) = true; +option (gogoproto.gostring_all) = true; +option (gogoproto.description_all) = true; + +option (gogoproto.testgen_all) = true; +option (gogoproto.populate_all) = true; +option (gogoproto.unmarshaler_all) = false; +option (gogoproto.marshaler_all) = false; +option (gogoproto.sizer_all) = true; + +option (gogoproto.goproto_enum_stringer_all) = false; +option (gogoproto.enum_stringer_all) = true; + +option (gogoproto.unsafe_marshaler_all) = true; +option (gogoproto.unsafe_unmarshaler_all) = true; + +message Subby { + string sub = 1; +} + +message SampleOneOf { + oneof test_oneof { + double Field1 = 1; + float Field2 = 2; + int32 Field3 = 3; + int64 Field4 = 4; + uint32 Field5 = 5; + uint64 Field6 = 6; + sint32 Field7 = 7; + sint64 Field8 = 8; + fixed32 Field9 = 9; + sfixed32 Field10 = 10; + fixed64 Field11 = 11; + sfixed64 Field12 = 12; + bool Field13 = 13; + string Field14 = 14; + bytes Field15 = 15; + Subby sub_message = 16; + } +} + + diff --git a/vendor/github.com/gogo/protobuf/test/oneof3/combos/unsafeboth/onepb_test.go b/vendor/github.com/gogo/protobuf/test/oneof3/combos/unsafeboth/onepb_test.go new file mode 100644 index 000000000..baf9b22bb --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/oneof3/combos/unsafeboth/onepb_test.go @@ -0,0 +1,389 @@ +// Code generated by protoc-gen-gogo. +// source: combos/unsafeboth/one.proto +// DO NOT EDIT! + +/* +Package one is a generated protocol buffer package. + +It is generated from these files: + combos/unsafeboth/one.proto + +It has these top-level messages: + Subby + SampleOneOf +*/ +package one + +import testing "testing" +import math_rand "math/rand" +import time "time" +import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" +import github_com_gogo_protobuf_jsonpb "github.com/gogo/protobuf/jsonpb" +import fmt "fmt" +import go_parser "go/parser" +import proto "github.com/gogo/protobuf/proto" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +func TestSubbyProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedSubby(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Subby{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestSubbyMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedSubby(popr, false) + size := p.Size() + data := make([]byte, size) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(data) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Subby{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestSampleOneOfProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedSampleOneOf(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &SampleOneOf{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestSampleOneOfMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedSampleOneOf(popr, false) + size := p.Size() + data := make([]byte, size) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(data) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &SampleOneOf{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestSubbyJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedSubby(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Subby{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestSampleOneOfJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedSampleOneOf(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &SampleOneOf{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestSubbyProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedSubby(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &Subby{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestSubbyProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedSubby(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &Subby{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestSampleOneOfProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedSampleOneOf(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &SampleOneOf{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestSampleOneOfProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedSampleOneOf(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &SampleOneOf{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestOneDescription(t *testing.T) { + OneDescription() +} +func TestSubbyVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedSubby(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &Subby{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestSampleOneOfVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedSampleOneOf(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &SampleOneOf{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestSubbyGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedSubby(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestSampleOneOfGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedSampleOneOf(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestSubbySize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedSubby(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func TestSampleOneOfSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedSampleOneOf(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func TestSubbyStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedSubby(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestSampleOneOfStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedSampleOneOf(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} + +//These tests are generated by github.com/gogo/protobuf/plugin/testgen diff --git a/vendor/github.com/gogo/protobuf/test/oneof3/combos/unsafemarshaler/one.pb.go b/vendor/github.com/gogo/protobuf/test/oneof3/combos/unsafemarshaler/one.pb.go new file mode 100644 index 000000000..2656c8072 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/oneof3/combos/unsafemarshaler/one.pb.go @@ -0,0 +1,2854 @@ +// Code generated by protoc-gen-gogo. +// source: combos/unsafemarshaler/one.proto +// DO NOT EDIT! + +/* +Package one is a generated protocol buffer package. + +It is generated from these files: + combos/unsafemarshaler/one.proto + +It has these top-level messages: + Subby + SampleOneOf +*/ +package one + +import proto "github.com/gogo/protobuf/proto" +import fmt "fmt" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" + +import github_com_gogo_protobuf_protoc_gen_gogo_descriptor "github.com/gogo/protobuf/protoc-gen-gogo/descriptor" +import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" +import compress_gzip "compress/gzip" +import bytes "bytes" +import io_ioutil "io/ioutil" + +import strings "strings" +import sort "sort" +import strconv "strconv" +import reflect "reflect" + +import unsafe "unsafe" + +// 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. +const _ = proto.GoGoProtoPackageIsVersion1 + +type Subby struct { + Sub string `protobuf:"bytes,1,opt,name=sub,proto3" json:"sub,omitempty"` +} + +func (m *Subby) Reset() { *m = Subby{} } +func (*Subby) ProtoMessage() {} +func (*Subby) Descriptor() ([]byte, []int) { return fileDescriptorOne, []int{0} } + +type SampleOneOf struct { + // Types that are valid to be assigned to TestOneof: + // *SampleOneOf_Field1 + // *SampleOneOf_Field2 + // *SampleOneOf_Field3 + // *SampleOneOf_Field4 + // *SampleOneOf_Field5 + // *SampleOneOf_Field6 + // *SampleOneOf_Field7 + // *SampleOneOf_Field8 + // *SampleOneOf_Field9 + // *SampleOneOf_Field10 + // *SampleOneOf_Field11 + // *SampleOneOf_Field12 + // *SampleOneOf_Field13 + // *SampleOneOf_Field14 + // *SampleOneOf_Field15 + // *SampleOneOf_SubMessage + TestOneof isSampleOneOf_TestOneof `protobuf_oneof:"test_oneof"` +} + +func (m *SampleOneOf) Reset() { *m = SampleOneOf{} } +func (*SampleOneOf) ProtoMessage() {} +func (*SampleOneOf) Descriptor() ([]byte, []int) { return fileDescriptorOne, []int{1} } + +type isSampleOneOf_TestOneof interface { + isSampleOneOf_TestOneof() + Equal(interface{}) bool + VerboseEqual(interface{}) error + MarshalTo([]byte) (int, error) + Size() int +} + +type SampleOneOf_Field1 struct { + Field1 float64 `protobuf:"fixed64,1,opt,name=Field1,json=field1,proto3,oneof"` +} +type SampleOneOf_Field2 struct { + Field2 float32 `protobuf:"fixed32,2,opt,name=Field2,json=field2,proto3,oneof"` +} +type SampleOneOf_Field3 struct { + Field3 int32 `protobuf:"varint,3,opt,name=Field3,json=field3,proto3,oneof"` +} +type SampleOneOf_Field4 struct { + Field4 int64 `protobuf:"varint,4,opt,name=Field4,json=field4,proto3,oneof"` +} +type SampleOneOf_Field5 struct { + Field5 uint32 `protobuf:"varint,5,opt,name=Field5,json=field5,proto3,oneof"` +} +type SampleOneOf_Field6 struct { + Field6 uint64 `protobuf:"varint,6,opt,name=Field6,json=field6,proto3,oneof"` +} +type SampleOneOf_Field7 struct { + Field7 int32 `protobuf:"zigzag32,7,opt,name=Field7,json=field7,proto3,oneof"` +} +type SampleOneOf_Field8 struct { + Field8 int64 `protobuf:"zigzag64,8,opt,name=Field8,json=field8,proto3,oneof"` +} +type SampleOneOf_Field9 struct { + Field9 uint32 `protobuf:"fixed32,9,opt,name=Field9,json=field9,proto3,oneof"` +} +type SampleOneOf_Field10 struct { + Field10 int32 `protobuf:"fixed32,10,opt,name=Field10,json=field10,proto3,oneof"` +} +type SampleOneOf_Field11 struct { + Field11 uint64 `protobuf:"fixed64,11,opt,name=Field11,json=field11,proto3,oneof"` +} +type SampleOneOf_Field12 struct { + Field12 int64 `protobuf:"fixed64,12,opt,name=Field12,json=field12,proto3,oneof"` +} +type SampleOneOf_Field13 struct { + Field13 bool `protobuf:"varint,13,opt,name=Field13,json=field13,proto3,oneof"` +} +type SampleOneOf_Field14 struct { + Field14 string `protobuf:"bytes,14,opt,name=Field14,json=field14,proto3,oneof"` +} +type SampleOneOf_Field15 struct { + Field15 []byte `protobuf:"bytes,15,opt,name=Field15,json=field15,proto3,oneof"` +} +type SampleOneOf_SubMessage struct { + SubMessage *Subby `protobuf:"bytes,16,opt,name=sub_message,json=subMessage,oneof"` +} + +func (*SampleOneOf_Field1) isSampleOneOf_TestOneof() {} +func (*SampleOneOf_Field2) isSampleOneOf_TestOneof() {} +func (*SampleOneOf_Field3) isSampleOneOf_TestOneof() {} +func (*SampleOneOf_Field4) isSampleOneOf_TestOneof() {} +func (*SampleOneOf_Field5) isSampleOneOf_TestOneof() {} +func (*SampleOneOf_Field6) isSampleOneOf_TestOneof() {} +func (*SampleOneOf_Field7) isSampleOneOf_TestOneof() {} +func (*SampleOneOf_Field8) isSampleOneOf_TestOneof() {} +func (*SampleOneOf_Field9) isSampleOneOf_TestOneof() {} +func (*SampleOneOf_Field10) isSampleOneOf_TestOneof() {} +func (*SampleOneOf_Field11) isSampleOneOf_TestOneof() {} +func (*SampleOneOf_Field12) isSampleOneOf_TestOneof() {} +func (*SampleOneOf_Field13) isSampleOneOf_TestOneof() {} +func (*SampleOneOf_Field14) isSampleOneOf_TestOneof() {} +func (*SampleOneOf_Field15) isSampleOneOf_TestOneof() {} +func (*SampleOneOf_SubMessage) isSampleOneOf_TestOneof() {} + +func (m *SampleOneOf) GetTestOneof() isSampleOneOf_TestOneof { + if m != nil { + return m.TestOneof + } + return nil +} + +func (m *SampleOneOf) GetField1() float64 { + if x, ok := m.GetTestOneof().(*SampleOneOf_Field1); ok { + return x.Field1 + } + return 0 +} + +func (m *SampleOneOf) GetField2() float32 { + if x, ok := m.GetTestOneof().(*SampleOneOf_Field2); ok { + return x.Field2 + } + return 0 +} + +func (m *SampleOneOf) GetField3() int32 { + if x, ok := m.GetTestOneof().(*SampleOneOf_Field3); ok { + return x.Field3 + } + return 0 +} + +func (m *SampleOneOf) GetField4() int64 { + if x, ok := m.GetTestOneof().(*SampleOneOf_Field4); ok { + return x.Field4 + } + return 0 +} + +func (m *SampleOneOf) GetField5() uint32 { + if x, ok := m.GetTestOneof().(*SampleOneOf_Field5); ok { + return x.Field5 + } + return 0 +} + +func (m *SampleOneOf) GetField6() uint64 { + if x, ok := m.GetTestOneof().(*SampleOneOf_Field6); ok { + return x.Field6 + } + return 0 +} + +func (m *SampleOneOf) GetField7() int32 { + if x, ok := m.GetTestOneof().(*SampleOneOf_Field7); ok { + return x.Field7 + } + return 0 +} + +func (m *SampleOneOf) GetField8() int64 { + if x, ok := m.GetTestOneof().(*SampleOneOf_Field8); ok { + return x.Field8 + } + return 0 +} + +func (m *SampleOneOf) GetField9() uint32 { + if x, ok := m.GetTestOneof().(*SampleOneOf_Field9); ok { + return x.Field9 + } + return 0 +} + +func (m *SampleOneOf) GetField10() int32 { + if x, ok := m.GetTestOneof().(*SampleOneOf_Field10); ok { + return x.Field10 + } + return 0 +} + +func (m *SampleOneOf) GetField11() uint64 { + if x, ok := m.GetTestOneof().(*SampleOneOf_Field11); ok { + return x.Field11 + } + return 0 +} + +func (m *SampleOneOf) GetField12() int64 { + if x, ok := m.GetTestOneof().(*SampleOneOf_Field12); ok { + return x.Field12 + } + return 0 +} + +func (m *SampleOneOf) GetField13() bool { + if x, ok := m.GetTestOneof().(*SampleOneOf_Field13); ok { + return x.Field13 + } + return false +} + +func (m *SampleOneOf) GetField14() string { + if x, ok := m.GetTestOneof().(*SampleOneOf_Field14); ok { + return x.Field14 + } + return "" +} + +func (m *SampleOneOf) GetField15() []byte { + if x, ok := m.GetTestOneof().(*SampleOneOf_Field15); ok { + return x.Field15 + } + return nil +} + +func (m *SampleOneOf) GetSubMessage() *Subby { + if x, ok := m.GetTestOneof().(*SampleOneOf_SubMessage); ok { + return x.SubMessage + } + return nil +} + +// XXX_OneofFuncs is for the internal use of the proto package. +func (*SampleOneOf) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{}) { + return _SampleOneOf_OneofMarshaler, _SampleOneOf_OneofUnmarshaler, _SampleOneOf_OneofSizer, []interface{}{ + (*SampleOneOf_Field1)(nil), + (*SampleOneOf_Field2)(nil), + (*SampleOneOf_Field3)(nil), + (*SampleOneOf_Field4)(nil), + (*SampleOneOf_Field5)(nil), + (*SampleOneOf_Field6)(nil), + (*SampleOneOf_Field7)(nil), + (*SampleOneOf_Field8)(nil), + (*SampleOneOf_Field9)(nil), + (*SampleOneOf_Field10)(nil), + (*SampleOneOf_Field11)(nil), + (*SampleOneOf_Field12)(nil), + (*SampleOneOf_Field13)(nil), + (*SampleOneOf_Field14)(nil), + (*SampleOneOf_Field15)(nil), + (*SampleOneOf_SubMessage)(nil), + } +} + +func _SampleOneOf_OneofMarshaler(msg proto.Message, b *proto.Buffer) error { + m := msg.(*SampleOneOf) + // test_oneof + switch x := m.TestOneof.(type) { + case *SampleOneOf_Field1: + _ = b.EncodeVarint(1<<3 | proto.WireFixed64) + _ = b.EncodeFixed64(math.Float64bits(x.Field1)) + case *SampleOneOf_Field2: + _ = b.EncodeVarint(2<<3 | proto.WireFixed32) + _ = b.EncodeFixed32(uint64(math.Float32bits(x.Field2))) + case *SampleOneOf_Field3: + _ = b.EncodeVarint(3<<3 | proto.WireVarint) + _ = b.EncodeVarint(uint64(x.Field3)) + case *SampleOneOf_Field4: + _ = b.EncodeVarint(4<<3 | proto.WireVarint) + _ = b.EncodeVarint(uint64(x.Field4)) + case *SampleOneOf_Field5: + _ = b.EncodeVarint(5<<3 | proto.WireVarint) + _ = b.EncodeVarint(uint64(x.Field5)) + case *SampleOneOf_Field6: + _ = b.EncodeVarint(6<<3 | proto.WireVarint) + _ = b.EncodeVarint(uint64(x.Field6)) + case *SampleOneOf_Field7: + _ = b.EncodeVarint(7<<3 | proto.WireVarint) + _ = b.EncodeZigzag32(uint64(x.Field7)) + case *SampleOneOf_Field8: + _ = b.EncodeVarint(8<<3 | proto.WireVarint) + _ = b.EncodeZigzag64(uint64(x.Field8)) + case *SampleOneOf_Field9: + _ = b.EncodeVarint(9<<3 | proto.WireFixed32) + _ = b.EncodeFixed32(uint64(x.Field9)) + case *SampleOneOf_Field10: + _ = b.EncodeVarint(10<<3 | proto.WireFixed32) + _ = b.EncodeFixed32(uint64(x.Field10)) + case *SampleOneOf_Field11: + _ = b.EncodeVarint(11<<3 | proto.WireFixed64) + _ = b.EncodeFixed64(uint64(x.Field11)) + case *SampleOneOf_Field12: + _ = b.EncodeVarint(12<<3 | proto.WireFixed64) + _ = b.EncodeFixed64(uint64(x.Field12)) + case *SampleOneOf_Field13: + t := uint64(0) + if x.Field13 { + t = 1 + } + _ = b.EncodeVarint(13<<3 | proto.WireVarint) + _ = b.EncodeVarint(t) + case *SampleOneOf_Field14: + _ = b.EncodeVarint(14<<3 | proto.WireBytes) + _ = b.EncodeStringBytes(x.Field14) + case *SampleOneOf_Field15: + _ = b.EncodeVarint(15<<3 | proto.WireBytes) + _ = b.EncodeRawBytes(x.Field15) + case *SampleOneOf_SubMessage: + _ = b.EncodeVarint(16<<3 | proto.WireBytes) + if err := b.EncodeMessage(x.SubMessage); err != nil { + return err + } + case nil: + default: + return fmt.Errorf("SampleOneOf.TestOneof has unexpected type %T", x) + } + return nil +} + +func _SampleOneOf_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) { + m := msg.(*SampleOneOf) + switch tag { + case 1: // test_oneof.Field1 + if wire != proto.WireFixed64 { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeFixed64() + m.TestOneof = &SampleOneOf_Field1{math.Float64frombits(x)} + return true, err + case 2: // test_oneof.Field2 + if wire != proto.WireFixed32 { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeFixed32() + m.TestOneof = &SampleOneOf_Field2{math.Float32frombits(uint32(x))} + return true, err + case 3: // test_oneof.Field3 + if wire != proto.WireVarint { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeVarint() + m.TestOneof = &SampleOneOf_Field3{int32(x)} + return true, err + case 4: // test_oneof.Field4 + if wire != proto.WireVarint { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeVarint() + m.TestOneof = &SampleOneOf_Field4{int64(x)} + return true, err + case 5: // test_oneof.Field5 + if wire != proto.WireVarint { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeVarint() + m.TestOneof = &SampleOneOf_Field5{uint32(x)} + return true, err + case 6: // test_oneof.Field6 + if wire != proto.WireVarint { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeVarint() + m.TestOneof = &SampleOneOf_Field6{x} + return true, err + case 7: // test_oneof.Field7 + if wire != proto.WireVarint { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeZigzag32() + m.TestOneof = &SampleOneOf_Field7{int32(x)} + return true, err + case 8: // test_oneof.Field8 + if wire != proto.WireVarint { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeZigzag64() + m.TestOneof = &SampleOneOf_Field8{int64(x)} + return true, err + case 9: // test_oneof.Field9 + if wire != proto.WireFixed32 { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeFixed32() + m.TestOneof = &SampleOneOf_Field9{uint32(x)} + return true, err + case 10: // test_oneof.Field10 + if wire != proto.WireFixed32 { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeFixed32() + m.TestOneof = &SampleOneOf_Field10{int32(x)} + return true, err + case 11: // test_oneof.Field11 + if wire != proto.WireFixed64 { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeFixed64() + m.TestOneof = &SampleOneOf_Field11{x} + return true, err + case 12: // test_oneof.Field12 + if wire != proto.WireFixed64 { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeFixed64() + m.TestOneof = &SampleOneOf_Field12{int64(x)} + return true, err + case 13: // test_oneof.Field13 + if wire != proto.WireVarint { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeVarint() + m.TestOneof = &SampleOneOf_Field13{x != 0} + return true, err + case 14: // test_oneof.Field14 + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeStringBytes() + m.TestOneof = &SampleOneOf_Field14{x} + return true, err + case 15: // test_oneof.Field15 + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeRawBytes(true) + m.TestOneof = &SampleOneOf_Field15{x} + return true, err + case 16: // test_oneof.sub_message + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + msg := new(Subby) + err := b.DecodeMessage(msg) + m.TestOneof = &SampleOneOf_SubMessage{msg} + return true, err + default: + return false, nil + } +} + +func _SampleOneOf_OneofSizer(msg proto.Message) (n int) { + m := msg.(*SampleOneOf) + // test_oneof + switch x := m.TestOneof.(type) { + case *SampleOneOf_Field1: + n += proto.SizeVarint(1<<3 | proto.WireFixed64) + n += 8 + case *SampleOneOf_Field2: + n += proto.SizeVarint(2<<3 | proto.WireFixed32) + n += 4 + case *SampleOneOf_Field3: + n += proto.SizeVarint(3<<3 | proto.WireVarint) + n += proto.SizeVarint(uint64(x.Field3)) + case *SampleOneOf_Field4: + n += proto.SizeVarint(4<<3 | proto.WireVarint) + n += proto.SizeVarint(uint64(x.Field4)) + case *SampleOneOf_Field5: + n += proto.SizeVarint(5<<3 | proto.WireVarint) + n += proto.SizeVarint(uint64(x.Field5)) + case *SampleOneOf_Field6: + n += proto.SizeVarint(6<<3 | proto.WireVarint) + n += proto.SizeVarint(uint64(x.Field6)) + case *SampleOneOf_Field7: + n += proto.SizeVarint(7<<3 | proto.WireVarint) + n += proto.SizeVarint(uint64((uint32(x.Field7) << 1) ^ uint32((int32(x.Field7) >> 31)))) + case *SampleOneOf_Field8: + n += proto.SizeVarint(8<<3 | proto.WireVarint) + n += proto.SizeVarint(uint64(uint64(x.Field8<<1) ^ uint64((int64(x.Field8) >> 63)))) + case *SampleOneOf_Field9: + n += proto.SizeVarint(9<<3 | proto.WireFixed32) + n += 4 + case *SampleOneOf_Field10: + n += proto.SizeVarint(10<<3 | proto.WireFixed32) + n += 4 + case *SampleOneOf_Field11: + n += proto.SizeVarint(11<<3 | proto.WireFixed64) + n += 8 + case *SampleOneOf_Field12: + n += proto.SizeVarint(12<<3 | proto.WireFixed64) + n += 8 + case *SampleOneOf_Field13: + n += proto.SizeVarint(13<<3 | proto.WireVarint) + n += 1 + case *SampleOneOf_Field14: + n += proto.SizeVarint(14<<3 | proto.WireBytes) + n += proto.SizeVarint(uint64(len(x.Field14))) + n += len(x.Field14) + case *SampleOneOf_Field15: + n += proto.SizeVarint(15<<3 | proto.WireBytes) + n += proto.SizeVarint(uint64(len(x.Field15))) + n += len(x.Field15) + case *SampleOneOf_SubMessage: + s := proto.Size(x.SubMessage) + n += proto.SizeVarint(16<<3 | proto.WireBytes) + n += proto.SizeVarint(uint64(s)) + n += s + case nil: + default: + panic(fmt.Sprintf("proto: unexpected type %T in oneof", x)) + } + return n +} + +func init() { + proto.RegisterType((*Subby)(nil), "one.Subby") + proto.RegisterType((*SampleOneOf)(nil), "one.SampleOneOf") +} +func (this *Subby) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return OneDescription() +} +func (this *SampleOneOf) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return OneDescription() +} +func OneDescription() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + d := &github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet{} + var gzipped = []byte{ + // 3541 bytes of a gzipped FileDescriptorSet + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xcc, 0x5a, 0x59, 0x6c, 0x1b, 0xd7, + 0xd5, 0x36, 0xc5, 0x45, 0xe4, 0xa1, 0x44, 0x51, 0x23, 0xc5, 0xa6, 0x95, 0xc4, 0x8b, 0xb2, 0x39, + 0xce, 0x1f, 0xc9, 0x96, 0x77, 0xe6, 0xff, 0x13, 0x68, 0xa1, 0x15, 0x19, 0x92, 0xa8, 0x7f, 0x28, + 0x25, 0x4e, 0xfe, 0x87, 0xc1, 0x88, 0xbc, 0xa2, 0x68, 0x0f, 0x67, 0xf8, 0x73, 0x86, 0x8e, 0x95, + 0xa7, 0x14, 0xe9, 0x82, 0xa0, 0xe8, 0x5e, 0xa0, 0xd9, 0xdb, 0x04, 0x68, 0x93, 0xa6, 0x5b, 0xd2, + 0x0d, 0x45, 0x9f, 0x0a, 0x14, 0x69, 0xf3, 0x54, 0xb4, 0x7d, 0xea, 0x43, 0x1f, 0x92, 0x34, 0x40, + 0xd3, 0x36, 0x6d, 0x53, 0xc0, 0x40, 0x03, 0xe4, 0xa5, 0xe7, 0x6e, 0xb3, 0x90, 0x94, 0x86, 0x0a, + 0x90, 0xa6, 0x02, 0x08, 0x71, 0xce, 0x39, 0xdf, 0x37, 0x77, 0xce, 0x3d, 0xf7, 0x9c, 0x73, 0xef, + 0x10, 0x7e, 0x7e, 0x1c, 0x0e, 0x55, 0x2d, 0xab, 0x6a, 0x90, 0xc9, 0x46, 0xd3, 0x72, 0xac, 0xf5, + 0xd6, 0xc6, 0x64, 0x85, 0xd8, 0xe5, 0x66, 0xad, 0xe1, 0x58, 0xcd, 0x09, 0x26, 0x53, 0x86, 0xb8, + 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20, 0x28, 0x71, 0x7d, 0x3b, 0x87, 0xc4, 0xe1, 0xa3, + 0xa4, 0xc8, 0x55, 0x87, 0x98, 0x76, 0xcd, 0x32, 0x73, 0xfd, 0x8c, 0xe4, 0x96, 0x2e, 0xb3, 0x48, + 0x8c, 0x4a, 0x3b, 0x85, 0x87, 0x53, 0x4e, 0x43, 0xbf, 0xd5, 0x70, 0xf0, 0x9b, 0x9d, 0x4b, 0xe2, + 0xfc, 0xa4, 0xa7, 0x6e, 0xe8, 0x1a, 0x08, 0x45, 0x6e, 0xa3, 0x4a, 0x63, 0x65, 0x01, 0xb2, 0xb6, + 0xd5, 0x6a, 0x96, 0x89, 0x56, 0xb6, 0x2a, 0x44, 0xab, 0x99, 0x1b, 0x56, 0x2e, 0xc5, 0x08, 0x0e, + 0x76, 0x3e, 0x08, 0x33, 0x9c, 0x45, 0xbb, 0x05, 0x34, 0x53, 0x33, 0x76, 0xe0, 0x5a, 0xd9, 0x0b, + 0x09, 0x7b, 0xcb, 0x74, 0xf4, 0xab, 0xb9, 0x01, 0x16, 0x21, 0xe2, 0x6a, 0xfc, 0x9f, 0x71, 0x18, + 0xea, 0x25, 0xc4, 0xee, 0x82, 0xf8, 0x06, 0x7d, 0x4a, 0x0c, 0xb0, 0x5d, 0xf8, 0x80, 0x63, 0x82, + 0x4e, 0x4c, 0x7c, 0x40, 0x27, 0x4e, 0x43, 0xda, 0x24, 0xb6, 0x43, 0x2a, 0x3c, 0x22, 0xa2, 0x3d, + 0xc6, 0x14, 0x70, 0x50, 0x67, 0x48, 0xc5, 0x3e, 0x50, 0x48, 0x5d, 0x84, 0x21, 0x77, 0x48, 0x5a, + 0x53, 0x37, 0xab, 0x32, 0x36, 0x27, 0xc3, 0x46, 0x32, 0x51, 0x90, 0x38, 0x95, 0xc2, 0xd4, 0x0c, + 0x09, 0x5c, 0x2b, 0x73, 0x00, 0x96, 0x49, 0xac, 0x0d, 0x5c, 0x5e, 0x65, 0x03, 0xe3, 0xa4, 0xbb, + 0x97, 0x8a, 0xd4, 0xa4, 0xc3, 0x4b, 0x16, 0x97, 0x96, 0x0d, 0xe5, 0x9c, 0x17, 0x6a, 0xfd, 0xdb, + 0x44, 0xca, 0x12, 0x5f, 0x64, 0x1d, 0xd1, 0xb6, 0x06, 0x99, 0x26, 0xa1, 0x71, 0x8f, 0x2e, 0xe6, + 0x4f, 0x96, 0x62, 0x83, 0x98, 0x08, 0x7d, 0x32, 0x55, 0xc0, 0xf8, 0x83, 0x0d, 0x36, 0xfd, 0x97, + 0xca, 0x4d, 0xe0, 0x0a, 0x34, 0x16, 0x56, 0xc0, 0xb2, 0xd0, 0x80, 0x14, 0x2e, 0xa3, 0x6c, 0xec, + 0x2c, 0x64, 0x82, 0xee, 0x51, 0x46, 0x21, 0x6e, 0x3b, 0x7a, 0xd3, 0x61, 0x51, 0x18, 0x57, 0xf9, + 0x85, 0x92, 0x85, 0x28, 0x26, 0x19, 0x96, 0xe5, 0xe2, 0x2a, 0xfd, 0x3a, 0x76, 0x06, 0x06, 0x03, + 0xb7, 0xef, 0x15, 0x38, 0xfe, 0x78, 0x02, 0x46, 0xbb, 0xc5, 0x5c, 0xd7, 0xf0, 0xc7, 0xe5, 0x83, + 0x11, 0xb0, 0x4e, 0x9a, 0x18, 0x77, 0x94, 0x41, 0x5c, 0x61, 0x44, 0xc5, 0x0d, 0x7d, 0x9d, 0x18, + 0x18, 0x4d, 0x91, 0x23, 0x99, 0xa9, 0x3b, 0x7a, 0x8a, 0xea, 0x89, 0x45, 0x0a, 0x51, 0x39, 0x52, + 0xb9, 0x1b, 0x62, 0x22, 0xc5, 0x51, 0x86, 0xa3, 0xbd, 0x31, 0xd0, 0x58, 0x54, 0x19, 0x4e, 0xb9, + 0x1e, 0x52, 0xf4, 0x3f, 0xf7, 0x6d, 0x82, 0x8d, 0x39, 0x49, 0x05, 0xd4, 0xaf, 0xca, 0x18, 0x24, + 0x59, 0x98, 0x55, 0x88, 0x2c, 0x0d, 0xee, 0x35, 0x9d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 0x01, 0x4f, 0x12, 0x39, 0x03, 0xb8, 0xce, + 0x64, 0x92, 0xa1, 0xef, 0x56, 0xc2, 0x29, 0xbe, 0x21, 0x28, 0x32, 0x3e, 0x98, 0x78, 0x0c, 0x87, + 0xd8, 0x0e, 0x6e, 0xd5, 0x7b, 0x20, 0x79, 0x41, 0x3e, 0x86, 0x80, 0x08, 0x57, 0xae, 0x13, 0xb3, + 0xbc, 0xd9, 0x1b, 0xc3, 0x8b, 0xd2, 0x95, 0x12, 0x43, 0x29, 0x30, 0xf3, 0xd4, 0xf5, 0x26, 0x6e, + 0xae, 0x8d, 0x9e, 0xa6, 0xe3, 0x9b, 0x82, 0x63, 0xc0, 0x05, 0x09, 0x8f, 0xb4, 0xcc, 0xdd, 0xd0, + 0xbc, 0x24, 0x3d, 0xe2, 0x83, 0x89, 0xa5, 0x87, 0x3b, 0x53, 0xda, 0x49, 0xec, 0x86, 0xed, 0x5b, + 0x72, 0xe9, 0x71, 0xec, 0x92, 0x9f, 0x11, 0x67, 0xda, 0xc6, 0x2d, 0x78, 0x2f, 0x34, 0xdf, 0x96, + 0x33, 0xcd, 0x00, 0x14, 0xfc, 0x00, 0xec, 0xef, 0x9a, 0xea, 0x7b, 0x20, 0xfb, 0x8e, 0x20, 0xdb, + 0xdb, 0x25, 0xdd, 0x8b, 0x94, 0xb0, 0x5b, 0xca, 0xef, 0xca, 0x94, 0x40, 0xda, 0xb8, 0x56, 0x68, + 0x1b, 0x6b, 0xeb, 0x1b, 0xbb, 0xf3, 0xda, 0xf7, 0xa4, 0xd7, 0x38, 0x36, 0xe0, 0xb5, 0x55, 0xd8, + 0x2b, 0x18, 0x77, 0x37, 0xaf, 0x2f, 0xcb, 0xc4, 0xca, 0xd1, 0x6b, 0xc1, 0xd9, 0xfd, 0x3f, 0x18, + 0x73, 0xdd, 0x29, 0x3b, 0x30, 0x5b, 0xa3, 0x07, 0x03, 0xe1, 0xcc, 0xaf, 0x08, 0x66, 0x99, 0xf1, + 0xdd,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 0x08, 0x36, 0xa9, 0x68, 0x0b, 0x68, 0x20, 0x92, + 0xd4, 0xcc, 0x00, 0xb0, 0xcd, 0xab, 0xc6, 0x7e, 0x94, 0x35, 0x33, 0xf7, 0xda, 0x1b, 0x07, 0xf6, + 0xfc, 0x1a, 0x3f, 0xbf, 0xc3, 0xcf, 0xeb, 0x6f, 0x1c, 0x88, 0xbc, 0x8b, 0x9f, 0xf7, 0xf0, 0xf3, + 0xc8, 0x9b, 0x07, 0x22, 0x2f, 0xe2, 0xe7, 0x65, 0xfc, 0xfc, 0x04, 0x3f, 0xaf, 0xbd, 0x89, 0x76, + 0xf8, 0x79, 0x1d, 0xbf, 0xbf, 0x8d, 0xff, 0xdf, 0xc5, 0xff, 0xef, 0xe1, 0xe7, 0x91, 0x3f, 0x1c, + 0xd8, 0xb3, 0x9e, 0x60, 0x61, 0x74, 0xe2, 0x5f, 0x01, 0x00, 0x00, 0xff, 0xff, 0x7e, 0xfc, 0x25, + 0xa8, 0x0b, 0x2d, 0x00, 0x00, + } + r := bytes.NewReader(gzipped) + gzipr, err := compress_gzip.NewReader(r) + if err != nil { + panic(err) + } + ungzipped, err := io_ioutil.ReadAll(gzipr) + if err != nil { + panic(err) + } + if err := github_com_gogo_protobuf_proto.Unmarshal(ungzipped, d); err != nil { + panic(err) + } + return d +} +func (this *Subby) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*Subby) + if !ok { + that2, ok := that.(Subby) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *Subby") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *Subby but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *Subby but is not nil && this == nil") + } + if this.Sub != that1.Sub { + return fmt.Errorf("Sub this(%v) Not Equal that(%v)", this.Sub, that1.Sub) + } + return nil +} +func (this *Subby) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*Subby) + if !ok { + that2, ok := that.(Subby) + 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.Sub != that1.Sub { + return false + } + return true +} +func (this *SampleOneOf) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*SampleOneOf) + if !ok { + that2, ok := that.(SampleOneOf) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *SampleOneOf") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *SampleOneOf but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *SampleOneOf but is not nil && this == nil") + } + if that1.TestOneof == nil { + if this.TestOneof != nil { + return fmt.Errorf("this.TestOneof != nil && that1.TestOneof == nil") + } + } else if this.TestOneof == nil { + return fmt.Errorf("this.TestOneof == nil && that1.TestOneof != nil") + } else if err := this.TestOneof.VerboseEqual(that1.TestOneof); err != nil { + return err + } + return nil +} +func (this *SampleOneOf_Field1) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*SampleOneOf_Field1) + if !ok { + that2, ok := that.(SampleOneOf_Field1) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *SampleOneOf_Field1") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *SampleOneOf_Field1 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *SampleOneOf_Field1 but is not nil && this == nil") + } + if this.Field1 != that1.Field1 { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) + } + return nil +} +func (this *SampleOneOf_Field2) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*SampleOneOf_Field2) + if !ok { + that2, ok := that.(SampleOneOf_Field2) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *SampleOneOf_Field2") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *SampleOneOf_Field2 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *SampleOneOf_Field2 but is not nil && this == nil") + } + if this.Field2 != that1.Field2 { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) + } + return nil +} +func (this *SampleOneOf_Field3) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*SampleOneOf_Field3) + if !ok { + that2, ok := that.(SampleOneOf_Field3) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *SampleOneOf_Field3") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *SampleOneOf_Field3 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *SampleOneOf_Field3 but is not nil && this == nil") + } + if this.Field3 != that1.Field3 { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", this.Field3, that1.Field3) + } + return nil +} +func (this *SampleOneOf_Field4) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*SampleOneOf_Field4) + if !ok { + that2, ok := that.(SampleOneOf_Field4) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *SampleOneOf_Field4") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *SampleOneOf_Field4 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *SampleOneOf_Field4 but is not nil && this == nil") + } + if this.Field4 != that1.Field4 { + return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", this.Field4, that1.Field4) + } + return nil +} +func (this *SampleOneOf_Field5) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*SampleOneOf_Field5) + if !ok { + that2, ok := that.(SampleOneOf_Field5) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *SampleOneOf_Field5") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *SampleOneOf_Field5 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *SampleOneOf_Field5 but is not nil && this == nil") + } + if this.Field5 != that1.Field5 { + return fmt.Errorf("Field5 this(%v) Not Equal that(%v)", this.Field5, that1.Field5) + } + return nil +} +func (this *SampleOneOf_Field6) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*SampleOneOf_Field6) + if !ok { + that2, ok := that.(SampleOneOf_Field6) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *SampleOneOf_Field6") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *SampleOneOf_Field6 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *SampleOneOf_Field6 but is not nil && this == nil") + } + if this.Field6 != that1.Field6 { + return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", this.Field6, that1.Field6) + } + return nil +} +func (this *SampleOneOf_Field7) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*SampleOneOf_Field7) + if !ok { + that2, ok := that.(SampleOneOf_Field7) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *SampleOneOf_Field7") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *SampleOneOf_Field7 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *SampleOneOf_Field7 but is not nil && this == nil") + } + if this.Field7 != that1.Field7 { + return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", this.Field7, that1.Field7) + } + return nil +} +func (this *SampleOneOf_Field8) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*SampleOneOf_Field8) + if !ok { + that2, ok := that.(SampleOneOf_Field8) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *SampleOneOf_Field8") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *SampleOneOf_Field8 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *SampleOneOf_Field8 but is not nil && this == nil") + } + if this.Field8 != that1.Field8 { + return fmt.Errorf("Field8 this(%v) Not Equal that(%v)", this.Field8, that1.Field8) + } + return nil +} +func (this *SampleOneOf_Field9) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*SampleOneOf_Field9) + if !ok { + that2, ok := that.(SampleOneOf_Field9) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *SampleOneOf_Field9") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *SampleOneOf_Field9 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *SampleOneOf_Field9 but is not nil && this == nil") + } + if this.Field9 != that1.Field9 { + return fmt.Errorf("Field9 this(%v) Not Equal that(%v)", this.Field9, that1.Field9) + } + return nil +} +func (this *SampleOneOf_Field10) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*SampleOneOf_Field10) + if !ok { + that2, ok := that.(SampleOneOf_Field10) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *SampleOneOf_Field10") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *SampleOneOf_Field10 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *SampleOneOf_Field10 but is not nil && this == nil") + } + if this.Field10 != that1.Field10 { + return fmt.Errorf("Field10 this(%v) Not Equal that(%v)", this.Field10, that1.Field10) + } + return nil +} +func (this *SampleOneOf_Field11) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*SampleOneOf_Field11) + if !ok { + that2, ok := that.(SampleOneOf_Field11) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *SampleOneOf_Field11") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *SampleOneOf_Field11 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *SampleOneOf_Field11 but is not nil && this == nil") + } + if this.Field11 != that1.Field11 { + return fmt.Errorf("Field11 this(%v) Not Equal that(%v)", this.Field11, that1.Field11) + } + return nil +} +func (this *SampleOneOf_Field12) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*SampleOneOf_Field12) + if !ok { + that2, ok := that.(SampleOneOf_Field12) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *SampleOneOf_Field12") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *SampleOneOf_Field12 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *SampleOneOf_Field12 but is not nil && this == nil") + } + if this.Field12 != that1.Field12 { + return fmt.Errorf("Field12 this(%v) Not Equal that(%v)", this.Field12, that1.Field12) + } + return nil +} +func (this *SampleOneOf_Field13) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*SampleOneOf_Field13) + if !ok { + that2, ok := that.(SampleOneOf_Field13) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *SampleOneOf_Field13") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *SampleOneOf_Field13 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *SampleOneOf_Field13 but is not nil && this == nil") + } + if this.Field13 != that1.Field13 { + return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", this.Field13, that1.Field13) + } + return nil +} +func (this *SampleOneOf_Field14) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*SampleOneOf_Field14) + if !ok { + that2, ok := that.(SampleOneOf_Field14) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *SampleOneOf_Field14") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *SampleOneOf_Field14 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *SampleOneOf_Field14 but is not nil && this == nil") + } + if this.Field14 != that1.Field14 { + return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", this.Field14, that1.Field14) + } + return nil +} +func (this *SampleOneOf_Field15) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*SampleOneOf_Field15) + if !ok { + that2, ok := that.(SampleOneOf_Field15) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *SampleOneOf_Field15") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *SampleOneOf_Field15 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *SampleOneOf_Field15 but is not nil && this == nil") + } + if !bytes.Equal(this.Field15, that1.Field15) { + return fmt.Errorf("Field15 this(%v) Not Equal that(%v)", this.Field15, that1.Field15) + } + return nil +} +func (this *SampleOneOf_SubMessage) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*SampleOneOf_SubMessage) + if !ok { + that2, ok := that.(SampleOneOf_SubMessage) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *SampleOneOf_SubMessage") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *SampleOneOf_SubMessage but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *SampleOneOf_SubMessage but is not nil && this == nil") + } + if !this.SubMessage.Equal(that1.SubMessage) { + return fmt.Errorf("SubMessage this(%v) Not Equal that(%v)", this.SubMessage, that1.SubMessage) + } + return nil +} +func (this *SampleOneOf) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*SampleOneOf) + if !ok { + that2, ok := that.(SampleOneOf) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + if this == nil { + return true + } + return false + } else if this == nil { + return false + } + if that1.TestOneof == nil { + if this.TestOneof != nil { + return false + } + } else if this.TestOneof == nil { + return false + } else if !this.TestOneof.Equal(that1.TestOneof) { + return false + } + return true +} +func (this *SampleOneOf_Field1) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*SampleOneOf_Field1) + if !ok { + that2, ok := that.(SampleOneOf_Field1) + 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.Field1 != that1.Field1 { + return false + } + return true +} +func (this *SampleOneOf_Field2) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*SampleOneOf_Field2) + if !ok { + that2, ok := that.(SampleOneOf_Field2) + 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.Field2 != that1.Field2 { + return false + } + return true +} +func (this *SampleOneOf_Field3) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*SampleOneOf_Field3) + if !ok { + that2, ok := that.(SampleOneOf_Field3) + 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.Field3 != that1.Field3 { + return false + } + return true +} +func (this *SampleOneOf_Field4) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*SampleOneOf_Field4) + if !ok { + that2, ok := that.(SampleOneOf_Field4) + 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.Field4 != that1.Field4 { + return false + } + return true +} +func (this *SampleOneOf_Field5) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*SampleOneOf_Field5) + if !ok { + that2, ok := that.(SampleOneOf_Field5) + 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.Field5 != that1.Field5 { + return false + } + return true +} +func (this *SampleOneOf_Field6) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*SampleOneOf_Field6) + if !ok { + that2, ok := that.(SampleOneOf_Field6) + 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.Field6 != that1.Field6 { + return false + } + return true +} +func (this *SampleOneOf_Field7) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*SampleOneOf_Field7) + if !ok { + that2, ok := that.(SampleOneOf_Field7) + 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.Field7 != that1.Field7 { + return false + } + return true +} +func (this *SampleOneOf_Field8) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*SampleOneOf_Field8) + if !ok { + that2, ok := that.(SampleOneOf_Field8) + 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.Field8 != that1.Field8 { + return false + } + return true +} +func (this *SampleOneOf_Field9) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*SampleOneOf_Field9) + if !ok { + that2, ok := that.(SampleOneOf_Field9) + 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.Field9 != that1.Field9 { + return false + } + return true +} +func (this *SampleOneOf_Field10) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*SampleOneOf_Field10) + if !ok { + that2, ok := that.(SampleOneOf_Field10) + 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.Field10 != that1.Field10 { + return false + } + return true +} +func (this *SampleOneOf_Field11) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*SampleOneOf_Field11) + if !ok { + that2, ok := that.(SampleOneOf_Field11) + 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.Field11 != that1.Field11 { + return false + } + return true +} +func (this *SampleOneOf_Field12) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*SampleOneOf_Field12) + if !ok { + that2, ok := that.(SampleOneOf_Field12) + 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.Field12 != that1.Field12 { + return false + } + return true +} +func (this *SampleOneOf_Field13) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*SampleOneOf_Field13) + if !ok { + that2, ok := that.(SampleOneOf_Field13) + 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.Field13 != that1.Field13 { + return false + } + return true +} +func (this *SampleOneOf_Field14) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*SampleOneOf_Field14) + if !ok { + that2, ok := that.(SampleOneOf_Field14) + 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.Field14 != that1.Field14 { + return false + } + return true +} +func (this *SampleOneOf_Field15) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*SampleOneOf_Field15) + if !ok { + that2, ok := that.(SampleOneOf_Field15) + 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.Field15, that1.Field15) { + return false + } + return true +} +func (this *SampleOneOf_SubMessage) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*SampleOneOf_SubMessage) + if !ok { + that2, ok := that.(SampleOneOf_SubMessage) + 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.SubMessage.Equal(that1.SubMessage) { + return false + } + return true +} +func (this *Subby) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&one.Subby{") + s = append(s, "Sub: "+fmt.Sprintf("%#v", this.Sub)+",\n") + s = append(s, "}") + return strings.Join(s, "") +} +func (this *SampleOneOf) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 20) + s = append(s, "&one.SampleOneOf{") + if this.TestOneof != nil { + s = append(s, "TestOneof: "+fmt.Sprintf("%#v", this.TestOneof)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *SampleOneOf_Field1) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.SampleOneOf_Field1{` + + `Field1:` + fmt.Sprintf("%#v", this.Field1) + `}`}, ", ") + return s +} +func (this *SampleOneOf_Field2) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.SampleOneOf_Field2{` + + `Field2:` + fmt.Sprintf("%#v", this.Field2) + `}`}, ", ") + return s +} +func (this *SampleOneOf_Field3) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.SampleOneOf_Field3{` + + `Field3:` + fmt.Sprintf("%#v", this.Field3) + `}`}, ", ") + return s +} +func (this *SampleOneOf_Field4) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.SampleOneOf_Field4{` + + `Field4:` + fmt.Sprintf("%#v", this.Field4) + `}`}, ", ") + return s +} +func (this *SampleOneOf_Field5) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.SampleOneOf_Field5{` + + `Field5:` + fmt.Sprintf("%#v", this.Field5) + `}`}, ", ") + return s +} +func (this *SampleOneOf_Field6) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.SampleOneOf_Field6{` + + `Field6:` + fmt.Sprintf("%#v", this.Field6) + `}`}, ", ") + return s +} +func (this *SampleOneOf_Field7) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.SampleOneOf_Field7{` + + `Field7:` + fmt.Sprintf("%#v", this.Field7) + `}`}, ", ") + return s +} +func (this *SampleOneOf_Field8) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.SampleOneOf_Field8{` + + `Field8:` + fmt.Sprintf("%#v", this.Field8) + `}`}, ", ") + return s +} +func (this *SampleOneOf_Field9) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.SampleOneOf_Field9{` + + `Field9:` + fmt.Sprintf("%#v", this.Field9) + `}`}, ", ") + return s +} +func (this *SampleOneOf_Field10) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.SampleOneOf_Field10{` + + `Field10:` + fmt.Sprintf("%#v", this.Field10) + `}`}, ", ") + return s +} +func (this *SampleOneOf_Field11) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.SampleOneOf_Field11{` + + `Field11:` + fmt.Sprintf("%#v", this.Field11) + `}`}, ", ") + return s +} +func (this *SampleOneOf_Field12) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.SampleOneOf_Field12{` + + `Field12:` + fmt.Sprintf("%#v", this.Field12) + `}`}, ", ") + return s +} +func (this *SampleOneOf_Field13) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.SampleOneOf_Field13{` + + `Field13:` + fmt.Sprintf("%#v", this.Field13) + `}`}, ", ") + return s +} +func (this *SampleOneOf_Field14) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.SampleOneOf_Field14{` + + `Field14:` + fmt.Sprintf("%#v", this.Field14) + `}`}, ", ") + return s +} +func (this *SampleOneOf_Field15) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.SampleOneOf_Field15{` + + `Field15:` + fmt.Sprintf("%#v", this.Field15) + `}`}, ", ") + return s +} +func (this *SampleOneOf_SubMessage) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.SampleOneOf_SubMessage{` + + `SubMessage:` + fmt.Sprintf("%#v", this.SubMessage) + `}`}, ", ") + return s +} +func valueToGoStringOne(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 extensionToGoStringOne(e map[int32]github_com_gogo_protobuf_proto.Extension) string { + if e == nil { + return "nil" + } + s := "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 +} +func NewPopulatedSubby(r randyOne, easy bool) *Subby { + this := &Subby{} + this.Sub = randStringOne(r) + if !easy && r.Intn(10) != 0 { + } + return this +} + +func NewPopulatedSampleOneOf(r randyOne, easy bool) *SampleOneOf { + this := &SampleOneOf{} + oneofNumber_TestOneof := []int32{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}[r.Intn(16)] + switch oneofNumber_TestOneof { + case 1: + this.TestOneof = NewPopulatedSampleOneOf_Field1(r, easy) + case 2: + this.TestOneof = NewPopulatedSampleOneOf_Field2(r, easy) + case 3: + this.TestOneof = NewPopulatedSampleOneOf_Field3(r, easy) + case 4: + this.TestOneof = NewPopulatedSampleOneOf_Field4(r, easy) + case 5: + this.TestOneof = NewPopulatedSampleOneOf_Field5(r, easy) + case 6: + this.TestOneof = NewPopulatedSampleOneOf_Field6(r, easy) + case 7: + this.TestOneof = NewPopulatedSampleOneOf_Field7(r, easy) + case 8: + this.TestOneof = NewPopulatedSampleOneOf_Field8(r, easy) + case 9: + this.TestOneof = NewPopulatedSampleOneOf_Field9(r, easy) + case 10: + this.TestOneof = NewPopulatedSampleOneOf_Field10(r, easy) + case 11: + this.TestOneof = NewPopulatedSampleOneOf_Field11(r, easy) + case 12: + this.TestOneof = NewPopulatedSampleOneOf_Field12(r, easy) + case 13: + this.TestOneof = NewPopulatedSampleOneOf_Field13(r, easy) + case 14: + this.TestOneof = NewPopulatedSampleOneOf_Field14(r, easy) + case 15: + this.TestOneof = NewPopulatedSampleOneOf_Field15(r, easy) + case 16: + this.TestOneof = NewPopulatedSampleOneOf_SubMessage(r, easy) + } + if !easy && r.Intn(10) != 0 { + } + return this +} + +func NewPopulatedSampleOneOf_Field1(r randyOne, easy bool) *SampleOneOf_Field1 { + this := &SampleOneOf_Field1{} + this.Field1 = float64(r.Float64()) + if r.Intn(2) == 0 { + this.Field1 *= -1 + } + return this +} +func NewPopulatedSampleOneOf_Field2(r randyOne, easy bool) *SampleOneOf_Field2 { + this := &SampleOneOf_Field2{} + this.Field2 = float32(r.Float32()) + if r.Intn(2) == 0 { + this.Field2 *= -1 + } + return this +} +func NewPopulatedSampleOneOf_Field3(r randyOne, easy bool) *SampleOneOf_Field3 { + this := &SampleOneOf_Field3{} + this.Field3 = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Field3 *= -1 + } + return this +} +func NewPopulatedSampleOneOf_Field4(r randyOne, easy bool) *SampleOneOf_Field4 { + this := &SampleOneOf_Field4{} + this.Field4 = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Field4 *= -1 + } + return this +} +func NewPopulatedSampleOneOf_Field5(r randyOne, easy bool) *SampleOneOf_Field5 { + this := &SampleOneOf_Field5{} + this.Field5 = uint32(r.Uint32()) + return this +} +func NewPopulatedSampleOneOf_Field6(r randyOne, easy bool) *SampleOneOf_Field6 { + this := &SampleOneOf_Field6{} + this.Field6 = uint64(uint64(r.Uint32())) + return this +} +func NewPopulatedSampleOneOf_Field7(r randyOne, easy bool) *SampleOneOf_Field7 { + this := &SampleOneOf_Field7{} + this.Field7 = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Field7 *= -1 + } + return this +} +func NewPopulatedSampleOneOf_Field8(r randyOne, easy bool) *SampleOneOf_Field8 { + this := &SampleOneOf_Field8{} + this.Field8 = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Field8 *= -1 + } + return this +} +func NewPopulatedSampleOneOf_Field9(r randyOne, easy bool) *SampleOneOf_Field9 { + this := &SampleOneOf_Field9{} + this.Field9 = uint32(r.Uint32()) + return this +} +func NewPopulatedSampleOneOf_Field10(r randyOne, easy bool) *SampleOneOf_Field10 { + this := &SampleOneOf_Field10{} + this.Field10 = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Field10 *= -1 + } + return this +} +func NewPopulatedSampleOneOf_Field11(r randyOne, easy bool) *SampleOneOf_Field11 { + this := &SampleOneOf_Field11{} + this.Field11 = uint64(uint64(r.Uint32())) + return this +} +func NewPopulatedSampleOneOf_Field12(r randyOne, easy bool) *SampleOneOf_Field12 { + this := &SampleOneOf_Field12{} + this.Field12 = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Field12 *= -1 + } + return this +} +func NewPopulatedSampleOneOf_Field13(r randyOne, easy bool) *SampleOneOf_Field13 { + this := &SampleOneOf_Field13{} + this.Field13 = bool(bool(r.Intn(2) == 0)) + return this +} +func NewPopulatedSampleOneOf_Field14(r randyOne, easy bool) *SampleOneOf_Field14 { + this := &SampleOneOf_Field14{} + this.Field14 = randStringOne(r) + return this +} +func NewPopulatedSampleOneOf_Field15(r randyOne, easy bool) *SampleOneOf_Field15 { + this := &SampleOneOf_Field15{} + v1 := r.Intn(100) + this.Field15 = make([]byte, v1) + for i := 0; i < v1; i++ { + this.Field15[i] = byte(r.Intn(256)) + } + return this +} +func NewPopulatedSampleOneOf_SubMessage(r randyOne, easy bool) *SampleOneOf_SubMessage { + this := &SampleOneOf_SubMessage{} + this.SubMessage = NewPopulatedSubby(r, easy) + return this +} + +type randyOne interface { + Float32() float32 + Float64() float64 + Int63() int64 + Int31() int32 + Uint32() uint32 + Intn(n int) int +} + +func randUTF8RuneOne(r randyOne) 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 randStringOne(r randyOne) string { + v2 := r.Intn(100) + tmps := make([]rune, v2) + for i := 0; i < v2; i++ { + tmps[i] = randUTF8RuneOne(r) + } + return string(tmps) +} +func randUnrecognizedOne(r randyOne, 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 = randFieldOne(data, r, fieldNumber, wire) + } + return data +} +func randFieldOne(data []byte, r randyOne, fieldNumber int, wire int) []byte { + key := uint32(fieldNumber)<<3 | uint32(wire) + switch wire { + case 0: + data = encodeVarintPopulateOne(data, uint64(key)) + v3 := r.Int63() + if r.Intn(2) == 0 { + v3 *= -1 + } + data = encodeVarintPopulateOne(data, uint64(v3)) + case 1: + data = encodeVarintPopulateOne(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 = encodeVarintPopulateOne(data, uint64(key)) + ll := r.Intn(100) + data = encodeVarintPopulateOne(data, uint64(ll)) + for j := 0; j < ll; j++ { + data = append(data, byte(r.Intn(256))) + } + default: + data = encodeVarintPopulateOne(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 encodeVarintPopulateOne(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 *Subby) Size() (n int) { + var l int + _ = l + l = len(m.Sub) + if l > 0 { + n += 1 + l + sovOne(uint64(l)) + } + return n +} + +func (m *SampleOneOf) Size() (n int) { + var l int + _ = l + if m.TestOneof != nil { + n += m.TestOneof.Size() + } + return n +} + +func (m *SampleOneOf_Field1) Size() (n int) { + var l int + _ = l + n += 9 + return n +} +func (m *SampleOneOf_Field2) Size() (n int) { + var l int + _ = l + n += 5 + return n +} +func (m *SampleOneOf_Field3) Size() (n int) { + var l int + _ = l + n += 1 + sovOne(uint64(m.Field3)) + return n +} +func (m *SampleOneOf_Field4) Size() (n int) { + var l int + _ = l + n += 1 + sovOne(uint64(m.Field4)) + return n +} +func (m *SampleOneOf_Field5) Size() (n int) { + var l int + _ = l + n += 1 + sovOne(uint64(m.Field5)) + return n +} +func (m *SampleOneOf_Field6) Size() (n int) { + var l int + _ = l + n += 1 + sovOne(uint64(m.Field6)) + return n +} +func (m *SampleOneOf_Field7) Size() (n int) { + var l int + _ = l + n += 1 + sozOne(uint64(m.Field7)) + return n +} +func (m *SampleOneOf_Field8) Size() (n int) { + var l int + _ = l + n += 1 + sozOne(uint64(m.Field8)) + return n +} +func (m *SampleOneOf_Field9) Size() (n int) { + var l int + _ = l + n += 5 + return n +} +func (m *SampleOneOf_Field10) Size() (n int) { + var l int + _ = l + n += 5 + return n +} +func (m *SampleOneOf_Field11) Size() (n int) { + var l int + _ = l + n += 9 + return n +} +func (m *SampleOneOf_Field12) Size() (n int) { + var l int + _ = l + n += 9 + return n +} +func (m *SampleOneOf_Field13) Size() (n int) { + var l int + _ = l + n += 2 + return n +} +func (m *SampleOneOf_Field14) Size() (n int) { + var l int + _ = l + l = len(m.Field14) + n += 1 + l + sovOne(uint64(l)) + return n +} +func (m *SampleOneOf_Field15) Size() (n int) { + var l int + _ = l + if m.Field15 != nil { + l = len(m.Field15) + n += 1 + l + sovOne(uint64(l)) + } + return n +} +func (m *SampleOneOf_SubMessage) Size() (n int) { + var l int + _ = l + if m.SubMessage != nil { + l = m.SubMessage.Size() + n += 2 + l + sovOne(uint64(l)) + } + return n +} + +func sovOne(x uint64) (n int) { + for { + n++ + x >>= 7 + if x == 0 { + break + } + } + return n +} +func sozOne(x uint64) (n int) { + return sovOne(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (this *Subby) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&Subby{`, + `Sub:` + fmt.Sprintf("%v", this.Sub) + `,`, + `}`, + }, "") + return s +} +func (this *SampleOneOf) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&SampleOneOf{`, + `TestOneof:` + fmt.Sprintf("%v", this.TestOneof) + `,`, + `}`, + }, "") + return s +} +func (this *SampleOneOf_Field1) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&SampleOneOf_Field1{`, + `Field1:` + fmt.Sprintf("%v", this.Field1) + `,`, + `}`, + }, "") + return s +} +func (this *SampleOneOf_Field2) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&SampleOneOf_Field2{`, + `Field2:` + fmt.Sprintf("%v", this.Field2) + `,`, + `}`, + }, "") + return s +} +func (this *SampleOneOf_Field3) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&SampleOneOf_Field3{`, + `Field3:` + fmt.Sprintf("%v", this.Field3) + `,`, + `}`, + }, "") + return s +} +func (this *SampleOneOf_Field4) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&SampleOneOf_Field4{`, + `Field4:` + fmt.Sprintf("%v", this.Field4) + `,`, + `}`, + }, "") + return s +} +func (this *SampleOneOf_Field5) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&SampleOneOf_Field5{`, + `Field5:` + fmt.Sprintf("%v", this.Field5) + `,`, + `}`, + }, "") + return s +} +func (this *SampleOneOf_Field6) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&SampleOneOf_Field6{`, + `Field6:` + fmt.Sprintf("%v", this.Field6) + `,`, + `}`, + }, "") + return s +} +func (this *SampleOneOf_Field7) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&SampleOneOf_Field7{`, + `Field7:` + fmt.Sprintf("%v", this.Field7) + `,`, + `}`, + }, "") + return s +} +func (this *SampleOneOf_Field8) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&SampleOneOf_Field8{`, + `Field8:` + fmt.Sprintf("%v", this.Field8) + `,`, + `}`, + }, "") + return s +} +func (this *SampleOneOf_Field9) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&SampleOneOf_Field9{`, + `Field9:` + fmt.Sprintf("%v", this.Field9) + `,`, + `}`, + }, "") + return s +} +func (this *SampleOneOf_Field10) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&SampleOneOf_Field10{`, + `Field10:` + fmt.Sprintf("%v", this.Field10) + `,`, + `}`, + }, "") + return s +} +func (this *SampleOneOf_Field11) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&SampleOneOf_Field11{`, + `Field11:` + fmt.Sprintf("%v", this.Field11) + `,`, + `}`, + }, "") + return s +} +func (this *SampleOneOf_Field12) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&SampleOneOf_Field12{`, + `Field12:` + fmt.Sprintf("%v", this.Field12) + `,`, + `}`, + }, "") + return s +} +func (this *SampleOneOf_Field13) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&SampleOneOf_Field13{`, + `Field13:` + fmt.Sprintf("%v", this.Field13) + `,`, + `}`, + }, "") + return s +} +func (this *SampleOneOf_Field14) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&SampleOneOf_Field14{`, + `Field14:` + fmt.Sprintf("%v", this.Field14) + `,`, + `}`, + }, "") + return s +} +func (this *SampleOneOf_Field15) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&SampleOneOf_Field15{`, + `Field15:` + fmt.Sprintf("%v", this.Field15) + `,`, + `}`, + }, "") + return s +} +func (this *SampleOneOf_SubMessage) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&SampleOneOf_SubMessage{`, + `SubMessage:` + strings.Replace(fmt.Sprintf("%v", this.SubMessage), "Subby", "Subby", 1) + `,`, + `}`, + }, "") + return s +} +func valueToStringOne(v interface{}) string { + rv := reflect.ValueOf(v) + if rv.IsNil() { + return "nil" + } + pv := reflect.Indirect(rv).Interface() + return fmt.Sprintf("*%v", pv) +} +func (m *Subby) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *Subby) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Sub) > 0 { + data[i] = 0xa + i++ + i = encodeVarintOne(data, i, uint64(len(m.Sub))) + i += copy(data[i:], m.Sub) + } + return i, nil +} + +func (m *SampleOneOf) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *SampleOneOf) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.TestOneof != nil { + nn1, err := m.TestOneof.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += nn1 + } + return i, nil +} + +func (m *SampleOneOf_Field1) MarshalTo(data []byte) (int, error) { + i := 0 + data[i] = 0x9 + i++ + *(*float64)(unsafe.Pointer(&data[i])) = m.Field1 + i += 8 + return i, nil +} +func (m *SampleOneOf_Field2) MarshalTo(data []byte) (int, error) { + i := 0 + data[i] = 0x15 + i++ + *(*float32)(unsafe.Pointer(&data[i])) = m.Field2 + i += 4 + return i, nil +} +func (m *SampleOneOf_Field3) MarshalTo(data []byte) (int, error) { + i := 0 + data[i] = 0x18 + i++ + i = encodeVarintOne(data, i, uint64(m.Field3)) + return i, nil +} +func (m *SampleOneOf_Field4) MarshalTo(data []byte) (int, error) { + i := 0 + data[i] = 0x20 + i++ + i = encodeVarintOne(data, i, uint64(m.Field4)) + return i, nil +} +func (m *SampleOneOf_Field5) MarshalTo(data []byte) (int, error) { + i := 0 + data[i] = 0x28 + i++ + i = encodeVarintOne(data, i, uint64(m.Field5)) + return i, nil +} +func (m *SampleOneOf_Field6) MarshalTo(data []byte) (int, error) { + i := 0 + data[i] = 0x30 + i++ + i = encodeVarintOne(data, i, uint64(m.Field6)) + return i, nil +} +func (m *SampleOneOf_Field7) MarshalTo(data []byte) (int, error) { + i := 0 + data[i] = 0x38 + i++ + i = encodeVarintOne(data, i, uint64((uint32(m.Field7)<<1)^uint32((m.Field7>>31)))) + return i, nil +} +func (m *SampleOneOf_Field8) MarshalTo(data []byte) (int, error) { + i := 0 + data[i] = 0x40 + i++ + i = encodeVarintOne(data, i, uint64((uint64(m.Field8)<<1)^uint64((m.Field8>>63)))) + return i, nil +} +func (m *SampleOneOf_Field9) MarshalTo(data []byte) (int, error) { + i := 0 + data[i] = 0x4d + i++ + *(*uint32)(unsafe.Pointer(&data[i])) = m.Field9 + i += 4 + return i, nil +} +func (m *SampleOneOf_Field10) MarshalTo(data []byte) (int, error) { + i := 0 + data[i] = 0x55 + i++ + *(*int32)(unsafe.Pointer(&data[i])) = m.Field10 + i += 4 + return i, nil +} +func (m *SampleOneOf_Field11) MarshalTo(data []byte) (int, error) { + i := 0 + data[i] = 0x59 + i++ + *(*uint64)(unsafe.Pointer(&data[i])) = m.Field11 + i += 8 + return i, nil +} +func (m *SampleOneOf_Field12) MarshalTo(data []byte) (int, error) { + i := 0 + data[i] = 0x61 + i++ + *(*int64)(unsafe.Pointer(&data[i])) = m.Field12 + i += 8 + return i, nil +} +func (m *SampleOneOf_Field13) MarshalTo(data []byte) (int, error) { + i := 0 + data[i] = 0x68 + i++ + if m.Field13 { + data[i] = 1 + } else { + data[i] = 0 + } + i++ + return i, nil +} +func (m *SampleOneOf_Field14) MarshalTo(data []byte) (int, error) { + i := 0 + data[i] = 0x72 + i++ + i = encodeVarintOne(data, i, uint64(len(m.Field14))) + i += copy(data[i:], m.Field14) + return i, nil +} +func (m *SampleOneOf_Field15) MarshalTo(data []byte) (int, error) { + i := 0 + if m.Field15 != nil { + data[i] = 0x7a + i++ + i = encodeVarintOne(data, i, uint64(len(m.Field15))) + i += copy(data[i:], m.Field15) + } + return i, nil +} +func (m *SampleOneOf_SubMessage) MarshalTo(data []byte) (int, error) { + i := 0 + if m.SubMessage != nil { + data[i] = 0x82 + i++ + data[i] = 0x1 + i++ + i = encodeVarintOne(data, i, uint64(m.SubMessage.Size())) + n2, err := m.SubMessage.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n2 + } + return i, nil +} +func encodeFixed64One(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 encodeFixed32One(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 encodeVarintOne(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 +} + +var fileDescriptorOne = []byte{ + // 385 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff,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, 0x00, 0x00, 0xff, 0xff, 0xf9, 0xbf, 0xf4, 0xb2, 0x9e, 0x02, 0x00, + 0x00, +} diff --git a/vendor/github.com/gogo/protobuf/test/oneof3/combos/unsafemarshaler/one.proto b/vendor/github.com/gogo/protobuf/test/oneof3/combos/unsafemarshaler/one.proto new file mode 100644 index 000000000..2cc114181 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/oneof3/combos/unsafemarshaler/one.proto @@ -0,0 +1,80 @@ +// Copyright (c) 2013, Vastech SA (PTY) LTD. All rights reserved. +// http://github.com/gogo/protobuf/gogoproto +// +// 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 = "proto3"; + +package one; + +import "github.com/gogo/protobuf/gogoproto/gogo.proto"; + +option (gogoproto.goproto_stringer_all) = false; +option (gogoproto.goproto_enum_prefix_all) = false; +option (gogoproto.goproto_getters_all) = false; + +option (gogoproto.equal_all) = true; +option (gogoproto.verbose_equal_all) = true; +option (gogoproto.stringer_all) = true; +option (gogoproto.gostring_all) = true; +option (gogoproto.description_all) = true; + +option (gogoproto.testgen_all) = true; +option (gogoproto.populate_all) = true; +option (gogoproto.unmarshaler_all) = false; +option (gogoproto.marshaler_all) = false; +option (gogoproto.sizer_all) = true; + +option (gogoproto.goproto_enum_stringer_all) = false; +option (gogoproto.enum_stringer_all) = true; + +option (gogoproto.unsafe_marshaler_all) = true; +option (gogoproto.unsafe_unmarshaler_all) = false; + +message Subby { + string sub = 1; +} + +message SampleOneOf { + oneof test_oneof { + double Field1 = 1; + float Field2 = 2; + int32 Field3 = 3; + int64 Field4 = 4; + uint32 Field5 = 5; + uint64 Field6 = 6; + sint32 Field7 = 7; + sint64 Field8 = 8; + fixed32 Field9 = 9; + sfixed32 Field10 = 10; + fixed64 Field11 = 11; + sfixed64 Field12 = 12; + bool Field13 = 13; + string Field14 = 14; + bytes Field15 = 15; + Subby sub_message = 16; + } +} + + diff --git a/vendor/github.com/gogo/protobuf/test/oneof3/combos/unsafemarshaler/onepb_test.go b/vendor/github.com/gogo/protobuf/test/oneof3/combos/unsafemarshaler/onepb_test.go new file mode 100644 index 000000000..34f6ec41f --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/oneof3/combos/unsafemarshaler/onepb_test.go @@ -0,0 +1,389 @@ +// Code generated by protoc-gen-gogo. +// source: combos/unsafemarshaler/one.proto +// DO NOT EDIT! + +/* +Package one is a generated protocol buffer package. + +It is generated from these files: + combos/unsafemarshaler/one.proto + +It has these top-level messages: + Subby + SampleOneOf +*/ +package one + +import testing "testing" +import math_rand "math/rand" +import time "time" +import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" +import github_com_gogo_protobuf_jsonpb "github.com/gogo/protobuf/jsonpb" +import fmt "fmt" +import go_parser "go/parser" +import proto "github.com/gogo/protobuf/proto" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +func TestSubbyProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedSubby(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Subby{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestSubbyMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedSubby(popr, false) + size := p.Size() + data := make([]byte, size) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(data) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Subby{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestSampleOneOfProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedSampleOneOf(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &SampleOneOf{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestSampleOneOfMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedSampleOneOf(popr, false) + size := p.Size() + data := make([]byte, size) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(data) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &SampleOneOf{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestSubbyJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedSubby(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Subby{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestSampleOneOfJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedSampleOneOf(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &SampleOneOf{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestSubbyProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedSubby(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &Subby{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestSubbyProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedSubby(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &Subby{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestSampleOneOfProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedSampleOneOf(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &SampleOneOf{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestSampleOneOfProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedSampleOneOf(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &SampleOneOf{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestOneDescription(t *testing.T) { + OneDescription() +} +func TestSubbyVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedSubby(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &Subby{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestSampleOneOfVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedSampleOneOf(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &SampleOneOf{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestSubbyGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedSubby(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestSampleOneOfGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedSampleOneOf(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestSubbySize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedSubby(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func TestSampleOneOfSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedSampleOneOf(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func TestSubbyStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedSubby(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestSampleOneOfStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedSampleOneOf(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} + +//These tests are generated by github.com/gogo/protobuf/plugin/testgen diff --git a/vendor/github.com/gogo/protobuf/test/oneof3/combos/unsafeunmarshaler/one.pb.go b/vendor/github.com/gogo/protobuf/test/oneof3/combos/unsafeunmarshaler/one.pb.go new file mode 100644 index 000000000..02189f8a4 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/oneof3/combos/unsafeunmarshaler/one.pb.go @@ -0,0 +1,3175 @@ +// Code generated by protoc-gen-gogo. +// source: combos/unsafeunmarshaler/one.proto +// DO NOT EDIT! + +/* + Package one is a generated protocol buffer package. + + It is generated from these files: + combos/unsafeunmarshaler/one.proto + + It has these top-level messages: + Subby + SampleOneOf +*/ +package one + +import proto "github.com/gogo/protobuf/proto" +import fmt "fmt" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" + +import github_com_gogo_protobuf_protoc_gen_gogo_descriptor "github.com/gogo/protobuf/protoc-gen-gogo/descriptor" +import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" +import compress_gzip "compress/gzip" +import bytes "bytes" +import io_ioutil "io/ioutil" + +import strings "strings" +import sort "sort" +import strconv "strconv" +import reflect "reflect" + +import io "io" +import unsafe "unsafe" + +// 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. +const _ = proto.GoGoProtoPackageIsVersion1 + +type Subby struct { + Sub string `protobuf:"bytes,1,opt,name=sub,proto3" json:"sub,omitempty"` +} + +func (m *Subby) Reset() { *m = Subby{} } +func (*Subby) ProtoMessage() {} +func (*Subby) Descriptor() ([]byte, []int) { return fileDescriptorOne, []int{0} } + +type SampleOneOf struct { + // Types that are valid to be assigned to TestOneof: + // *SampleOneOf_Field1 + // *SampleOneOf_Field2 + // *SampleOneOf_Field3 + // *SampleOneOf_Field4 + // *SampleOneOf_Field5 + // *SampleOneOf_Field6 + // *SampleOneOf_Field7 + // *SampleOneOf_Field8 + // *SampleOneOf_Field9 + // *SampleOneOf_Field10 + // *SampleOneOf_Field11 + // *SampleOneOf_Field12 + // *SampleOneOf_Field13 + // *SampleOneOf_Field14 + // *SampleOneOf_Field15 + // *SampleOneOf_SubMessage + TestOneof isSampleOneOf_TestOneof `protobuf_oneof:"test_oneof"` +} + +func (m *SampleOneOf) Reset() { *m = SampleOneOf{} } +func (*SampleOneOf) ProtoMessage() {} +func (*SampleOneOf) Descriptor() ([]byte, []int) { return fileDescriptorOne, []int{1} } + +type isSampleOneOf_TestOneof interface { + isSampleOneOf_TestOneof() + Equal(interface{}) bool + VerboseEqual(interface{}) error + Size() int +} + +type SampleOneOf_Field1 struct { + Field1 float64 `protobuf:"fixed64,1,opt,name=Field1,json=field1,proto3,oneof"` +} +type SampleOneOf_Field2 struct { + Field2 float32 `protobuf:"fixed32,2,opt,name=Field2,json=field2,proto3,oneof"` +} +type SampleOneOf_Field3 struct { + Field3 int32 `protobuf:"varint,3,opt,name=Field3,json=field3,proto3,oneof"` +} +type SampleOneOf_Field4 struct { + Field4 int64 `protobuf:"varint,4,opt,name=Field4,json=field4,proto3,oneof"` +} +type SampleOneOf_Field5 struct { + Field5 uint32 `protobuf:"varint,5,opt,name=Field5,json=field5,proto3,oneof"` +} +type SampleOneOf_Field6 struct { + Field6 uint64 `protobuf:"varint,6,opt,name=Field6,json=field6,proto3,oneof"` +} +type SampleOneOf_Field7 struct { + Field7 int32 `protobuf:"zigzag32,7,opt,name=Field7,json=field7,proto3,oneof"` +} +type SampleOneOf_Field8 struct { + Field8 int64 `protobuf:"zigzag64,8,opt,name=Field8,json=field8,proto3,oneof"` +} +type SampleOneOf_Field9 struct { + Field9 uint32 `protobuf:"fixed32,9,opt,name=Field9,json=field9,proto3,oneof"` +} +type SampleOneOf_Field10 struct { + Field10 int32 `protobuf:"fixed32,10,opt,name=Field10,json=field10,proto3,oneof"` +} +type SampleOneOf_Field11 struct { + Field11 uint64 `protobuf:"fixed64,11,opt,name=Field11,json=field11,proto3,oneof"` +} +type SampleOneOf_Field12 struct { + Field12 int64 `protobuf:"fixed64,12,opt,name=Field12,json=field12,proto3,oneof"` +} +type SampleOneOf_Field13 struct { + Field13 bool `protobuf:"varint,13,opt,name=Field13,json=field13,proto3,oneof"` +} +type SampleOneOf_Field14 struct { + Field14 string `protobuf:"bytes,14,opt,name=Field14,json=field14,proto3,oneof"` +} +type SampleOneOf_Field15 struct { + Field15 []byte `protobuf:"bytes,15,opt,name=Field15,json=field15,proto3,oneof"` +} +type SampleOneOf_SubMessage struct { + SubMessage *Subby `protobuf:"bytes,16,opt,name=sub_message,json=subMessage,oneof"` +} + +func (*SampleOneOf_Field1) isSampleOneOf_TestOneof() {} +func (*SampleOneOf_Field2) isSampleOneOf_TestOneof() {} +func (*SampleOneOf_Field3) isSampleOneOf_TestOneof() {} +func (*SampleOneOf_Field4) isSampleOneOf_TestOneof() {} +func (*SampleOneOf_Field5) isSampleOneOf_TestOneof() {} +func (*SampleOneOf_Field6) isSampleOneOf_TestOneof() {} +func (*SampleOneOf_Field7) isSampleOneOf_TestOneof() {} +func (*SampleOneOf_Field8) isSampleOneOf_TestOneof() {} +func (*SampleOneOf_Field9) isSampleOneOf_TestOneof() {} +func (*SampleOneOf_Field10) isSampleOneOf_TestOneof() {} +func (*SampleOneOf_Field11) isSampleOneOf_TestOneof() {} +func (*SampleOneOf_Field12) isSampleOneOf_TestOneof() {} +func (*SampleOneOf_Field13) isSampleOneOf_TestOneof() {} +func (*SampleOneOf_Field14) isSampleOneOf_TestOneof() {} +func (*SampleOneOf_Field15) isSampleOneOf_TestOneof() {} +func (*SampleOneOf_SubMessage) isSampleOneOf_TestOneof() {} + +func (m *SampleOneOf) GetTestOneof() isSampleOneOf_TestOneof { + if m != nil { + return m.TestOneof + } + return nil +} + +func (m *SampleOneOf) GetField1() float64 { + if x, ok := m.GetTestOneof().(*SampleOneOf_Field1); ok { + return x.Field1 + } + return 0 +} + +func (m *SampleOneOf) GetField2() float32 { + if x, ok := m.GetTestOneof().(*SampleOneOf_Field2); ok { + return x.Field2 + } + return 0 +} + +func (m *SampleOneOf) GetField3() int32 { + if x, ok := m.GetTestOneof().(*SampleOneOf_Field3); ok { + return x.Field3 + } + return 0 +} + +func (m *SampleOneOf) GetField4() int64 { + if x, ok := m.GetTestOneof().(*SampleOneOf_Field4); ok { + return x.Field4 + } + return 0 +} + +func (m *SampleOneOf) GetField5() uint32 { + if x, ok := m.GetTestOneof().(*SampleOneOf_Field5); ok { + return x.Field5 + } + return 0 +} + +func (m *SampleOneOf) GetField6() uint64 { + if x, ok := m.GetTestOneof().(*SampleOneOf_Field6); ok { + return x.Field6 + } + return 0 +} + +func (m *SampleOneOf) GetField7() int32 { + if x, ok := m.GetTestOneof().(*SampleOneOf_Field7); ok { + return x.Field7 + } + return 0 +} + +func (m *SampleOneOf) GetField8() int64 { + if x, ok := m.GetTestOneof().(*SampleOneOf_Field8); ok { + return x.Field8 + } + return 0 +} + +func (m *SampleOneOf) GetField9() uint32 { + if x, ok := m.GetTestOneof().(*SampleOneOf_Field9); ok { + return x.Field9 + } + return 0 +} + +func (m *SampleOneOf) GetField10() int32 { + if x, ok := m.GetTestOneof().(*SampleOneOf_Field10); ok { + return x.Field10 + } + return 0 +} + +func (m *SampleOneOf) GetField11() uint64 { + if x, ok := m.GetTestOneof().(*SampleOneOf_Field11); ok { + return x.Field11 + } + return 0 +} + +func (m *SampleOneOf) GetField12() int64 { + if x, ok := m.GetTestOneof().(*SampleOneOf_Field12); ok { + return x.Field12 + } + return 0 +} + +func (m *SampleOneOf) GetField13() bool { + if x, ok := m.GetTestOneof().(*SampleOneOf_Field13); ok { + return x.Field13 + } + return false +} + +func (m *SampleOneOf) GetField14() string { + if x, ok := m.GetTestOneof().(*SampleOneOf_Field14); ok { + return x.Field14 + } + return "" +} + +func (m *SampleOneOf) GetField15() []byte { + if x, ok := m.GetTestOneof().(*SampleOneOf_Field15); ok { + return x.Field15 + } + return nil +} + +func (m *SampleOneOf) GetSubMessage() *Subby { + if x, ok := m.GetTestOneof().(*SampleOneOf_SubMessage); ok { + return x.SubMessage + } + return nil +} + +// XXX_OneofFuncs is for the internal use of the proto package. +func (*SampleOneOf) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{}) { + return _SampleOneOf_OneofMarshaler, _SampleOneOf_OneofUnmarshaler, _SampleOneOf_OneofSizer, []interface{}{ + (*SampleOneOf_Field1)(nil), + (*SampleOneOf_Field2)(nil), + (*SampleOneOf_Field3)(nil), + (*SampleOneOf_Field4)(nil), + (*SampleOneOf_Field5)(nil), + (*SampleOneOf_Field6)(nil), + (*SampleOneOf_Field7)(nil), + (*SampleOneOf_Field8)(nil), + (*SampleOneOf_Field9)(nil), + (*SampleOneOf_Field10)(nil), + (*SampleOneOf_Field11)(nil), + (*SampleOneOf_Field12)(nil), + (*SampleOneOf_Field13)(nil), + (*SampleOneOf_Field14)(nil), + (*SampleOneOf_Field15)(nil), + (*SampleOneOf_SubMessage)(nil), + } +} + +func _SampleOneOf_OneofMarshaler(msg proto.Message, b *proto.Buffer) error { + m := msg.(*SampleOneOf) + // test_oneof + switch x := m.TestOneof.(type) { + case *SampleOneOf_Field1: + _ = b.EncodeVarint(1<<3 | proto.WireFixed64) + _ = b.EncodeFixed64(math.Float64bits(x.Field1)) + case *SampleOneOf_Field2: + _ = b.EncodeVarint(2<<3 | proto.WireFixed32) + _ = b.EncodeFixed32(uint64(math.Float32bits(x.Field2))) + case *SampleOneOf_Field3: + _ = b.EncodeVarint(3<<3 | proto.WireVarint) + _ = b.EncodeVarint(uint64(x.Field3)) + case *SampleOneOf_Field4: + _ = b.EncodeVarint(4<<3 | proto.WireVarint) + _ = b.EncodeVarint(uint64(x.Field4)) + case *SampleOneOf_Field5: + _ = b.EncodeVarint(5<<3 | proto.WireVarint) + _ = b.EncodeVarint(uint64(x.Field5)) + case *SampleOneOf_Field6: + _ = b.EncodeVarint(6<<3 | proto.WireVarint) + _ = b.EncodeVarint(uint64(x.Field6)) + case *SampleOneOf_Field7: + _ = b.EncodeVarint(7<<3 | proto.WireVarint) + _ = b.EncodeZigzag32(uint64(x.Field7)) + case *SampleOneOf_Field8: + _ = b.EncodeVarint(8<<3 | proto.WireVarint) + _ = b.EncodeZigzag64(uint64(x.Field8)) + case *SampleOneOf_Field9: + _ = b.EncodeVarint(9<<3 | proto.WireFixed32) + _ = b.EncodeFixed32(uint64(x.Field9)) + case *SampleOneOf_Field10: + _ = b.EncodeVarint(10<<3 | proto.WireFixed32) + _ = b.EncodeFixed32(uint64(x.Field10)) + case *SampleOneOf_Field11: + _ = b.EncodeVarint(11<<3 | proto.WireFixed64) + _ = b.EncodeFixed64(uint64(x.Field11)) + case *SampleOneOf_Field12: + _ = b.EncodeVarint(12<<3 | proto.WireFixed64) + _ = b.EncodeFixed64(uint64(x.Field12)) + case *SampleOneOf_Field13: + t := uint64(0) + if x.Field13 { + t = 1 + } + _ = b.EncodeVarint(13<<3 | proto.WireVarint) + _ = b.EncodeVarint(t) + case *SampleOneOf_Field14: + _ = b.EncodeVarint(14<<3 | proto.WireBytes) + _ = b.EncodeStringBytes(x.Field14) + case *SampleOneOf_Field15: + _ = b.EncodeVarint(15<<3 | proto.WireBytes) + _ = b.EncodeRawBytes(x.Field15) + case *SampleOneOf_SubMessage: + _ = b.EncodeVarint(16<<3 | proto.WireBytes) + if err := b.EncodeMessage(x.SubMessage); err != nil { + return err + } + case nil: + default: + return fmt.Errorf("SampleOneOf.TestOneof has unexpected type %T", x) + } + return nil +} + +func _SampleOneOf_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) { + m := msg.(*SampleOneOf) + switch tag { + case 1: // test_oneof.Field1 + if wire != proto.WireFixed64 { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeFixed64() + m.TestOneof = &SampleOneOf_Field1{math.Float64frombits(x)} + return true, err + case 2: // test_oneof.Field2 + if wire != proto.WireFixed32 { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeFixed32() + m.TestOneof = &SampleOneOf_Field2{math.Float32frombits(uint32(x))} + return true, err + case 3: // test_oneof.Field3 + if wire != proto.WireVarint { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeVarint() + m.TestOneof = &SampleOneOf_Field3{int32(x)} + return true, err + case 4: // test_oneof.Field4 + if wire != proto.WireVarint { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeVarint() + m.TestOneof = &SampleOneOf_Field4{int64(x)} + return true, err + case 5: // test_oneof.Field5 + if wire != proto.WireVarint { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeVarint() + m.TestOneof = &SampleOneOf_Field5{uint32(x)} + return true, err + case 6: // test_oneof.Field6 + if wire != proto.WireVarint { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeVarint() + m.TestOneof = &SampleOneOf_Field6{x} + return true, err + case 7: // test_oneof.Field7 + if wire != proto.WireVarint { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeZigzag32() + m.TestOneof = &SampleOneOf_Field7{int32(x)} + return true, err + case 8: // test_oneof.Field8 + if wire != proto.WireVarint { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeZigzag64() + m.TestOneof = &SampleOneOf_Field8{int64(x)} + return true, err + case 9: // test_oneof.Field9 + if wire != proto.WireFixed32 { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeFixed32() + m.TestOneof = &SampleOneOf_Field9{uint32(x)} + return true, err + case 10: // test_oneof.Field10 + if wire != proto.WireFixed32 { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeFixed32() + m.TestOneof = &SampleOneOf_Field10{int32(x)} + return true, err + case 11: // test_oneof.Field11 + if wire != proto.WireFixed64 { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeFixed64() + m.TestOneof = &SampleOneOf_Field11{x} + return true, err + case 12: // test_oneof.Field12 + if wire != proto.WireFixed64 { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeFixed64() + m.TestOneof = &SampleOneOf_Field12{int64(x)} + return true, err + case 13: // test_oneof.Field13 + if wire != proto.WireVarint { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeVarint() + m.TestOneof = &SampleOneOf_Field13{x != 0} + return true, err + case 14: // test_oneof.Field14 + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeStringBytes() + m.TestOneof = &SampleOneOf_Field14{x} + return true, err + case 15: // test_oneof.Field15 + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeRawBytes(true) + m.TestOneof = &SampleOneOf_Field15{x} + return true, err + case 16: // test_oneof.sub_message + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + msg := new(Subby) + err := b.DecodeMessage(msg) + m.TestOneof = &SampleOneOf_SubMessage{msg} + return true, err + default: + return false, nil + } +} + +func _SampleOneOf_OneofSizer(msg proto.Message) (n int) { + m := msg.(*SampleOneOf) + // test_oneof + switch x := m.TestOneof.(type) { + case *SampleOneOf_Field1: + n += proto.SizeVarint(1<<3 | proto.WireFixed64) + n += 8 + case *SampleOneOf_Field2: + n += proto.SizeVarint(2<<3 | proto.WireFixed32) + n += 4 + case *SampleOneOf_Field3: + n += proto.SizeVarint(3<<3 | proto.WireVarint) + n += proto.SizeVarint(uint64(x.Field3)) + case *SampleOneOf_Field4: + n += proto.SizeVarint(4<<3 | proto.WireVarint) + n += proto.SizeVarint(uint64(x.Field4)) + case *SampleOneOf_Field5: + n += proto.SizeVarint(5<<3 | proto.WireVarint) + n += proto.SizeVarint(uint64(x.Field5)) + case *SampleOneOf_Field6: + n += proto.SizeVarint(6<<3 | proto.WireVarint) + n += proto.SizeVarint(uint64(x.Field6)) + case *SampleOneOf_Field7: + n += proto.SizeVarint(7<<3 | proto.WireVarint) + n += proto.SizeVarint(uint64((uint32(x.Field7) << 1) ^ uint32((int32(x.Field7) >> 31)))) + case *SampleOneOf_Field8: + n += proto.SizeVarint(8<<3 | proto.WireVarint) + n += proto.SizeVarint(uint64(uint64(x.Field8<<1) ^ uint64((int64(x.Field8) >> 63)))) + case *SampleOneOf_Field9: + n += proto.SizeVarint(9<<3 | proto.WireFixed32) + n += 4 + case *SampleOneOf_Field10: + n += proto.SizeVarint(10<<3 | proto.WireFixed32) + n += 4 + case *SampleOneOf_Field11: + n += proto.SizeVarint(11<<3 | proto.WireFixed64) + n += 8 + case *SampleOneOf_Field12: + n += proto.SizeVarint(12<<3 | proto.WireFixed64) + n += 8 + case *SampleOneOf_Field13: + n += proto.SizeVarint(13<<3 | proto.WireVarint) + n += 1 + case *SampleOneOf_Field14: + n += proto.SizeVarint(14<<3 | proto.WireBytes) + n += proto.SizeVarint(uint64(len(x.Field14))) + n += len(x.Field14) + case *SampleOneOf_Field15: + n += proto.SizeVarint(15<<3 | proto.WireBytes) + n += proto.SizeVarint(uint64(len(x.Field15))) + n += len(x.Field15) + case *SampleOneOf_SubMessage: + s := proto.Size(x.SubMessage) + n += proto.SizeVarint(16<<3 | proto.WireBytes) + n += proto.SizeVarint(uint64(s)) + n += s + case nil: + default: + panic(fmt.Sprintf("proto: unexpected type %T in oneof", x)) + } + return n +} + +func init() { + proto.RegisterType((*Subby)(nil), "one.Subby") + proto.RegisterType((*SampleOneOf)(nil), "one.SampleOneOf") +} +func (this *Subby) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return OneDescription() +} +func (this *SampleOneOf) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return OneDescription() +} +func OneDescription() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + d := &github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet{} + var gzipped = []byte{ + // 3538 bytes of a gzipped FileDescriptorSet + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xcc, 0x5a, 0x5b, 0x6c, 0x23, 0xe5, + 0x15, 0xc6, 0xf1, 0x25, 0xf6, 0x71, 0xe2, 0x38, 0x93, 0xb0, 0xeb, 0x0d, 0xb0, 0xcb, 0x86, 0xdb, + 0xb2, 0x94, 0x64, 0x37, 0x7b, 0x37, 0x2d, 0x28, 0x17, 0x6f, 0xc8, 0x2a, 0x89, 0xd3, 0x71, 0x02, + 0x0b, 0x7d, 0x18, 0x4d, 0xec, 0x3f, 0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15, 0x62, 0x96, 0xb7, + 0x72, 0x51, 0x1c, 0x45, 0x4a, 0xf5, 0x49, 0x94, 0xdb, 0x60, 0xb8, 0xd1, 0x5a, 0x37, 0x6a, 0x65, + 0xcd, 0x67, 0x06, 0x68, 0x16, 0x57, 0xb3, 0x5c, 0x31, 0xe7, 0x19, 0xdf, 0x02, 0x43, 0x0f, 0x10, + 0xfd, 0xa2, 0xdf, 0x34, 0xcd, 0x4c, 0x33, 0x54, 0xec, 0x33, 0x9c, 0x85, 0x81, 0x3a, 0xb1, 0x6d, + 0x1c, 0x80, 0xe6, 0x6c, 0x35, 0x48, 0x2e, 0xc6, 0x9e, 0xfe, 0xfa, 0x8e, 0xa7, 0x6f, 0x7f, 0xf2, + 0xb4, 0x40, 0xad, 0x22, 0x48, 0x99, 0x86, 0x14, 0x31, 0x5b, 0x75, 0xce, 0x10, 0xdf, 0xc6, 0x7f, + 0x05, 0xb4, 0x68, 0x67, 0x49, 0x52, 0x98, 0xa0, 0xe8, 0xb7, 0x49, 0xf3, 0x52, 0xad, 0x4c, 0x72, + 0x09, 0x46, 0x70, 0x4b, 0x07, 0x41, 0x89, 0xeb, 0xdb, 0x39, 0x24, 0x0e, 0x1f, 0x25, 0x45, 0x2e, + 0x3b, 0xc4, 0xb4, 0x6b, 0x96, 0x99, 0xeb, 0x67, 0x24, 0x37, 0x75, 0x99, 0x45, 0x62, 0x54, 0xda, + 0x29, 0x3c, 0x9c, 0x72, 0x12, 0xfa, 0xad, 0x86, 0x83, 0xdf, 0xec, 0x5c, 0x12, 0xe7, 0x27, 0x3d, + 0x75, 0x6d, 0xd7, 0x40, 0x28, 0x72, 0x1b, 0x55, 0x1a, 0x2b, 0x0b, 0x90, 0xb5, 0xad, 0x56, 0xb3, + 0x4c, 0xb4, 0xb2, 0x55, 0x21, 0x5a, 0xcd, 0xdc, 0xb0, 0x72, 0x29, 0x46, 0x70, 0xa0, 0xf3, 0x41, + 0x98, 0xe1, 0x2c, 0xda, 0x2d, 0xa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0xcd, 0x2c, 0x16, 0xb2, 0x11, 0x25, 0x03, 0xc0, 0x04, 0x67, 0x17, 0x8b, + 0xd3, 0xab, 0xd9, 0x3e, 0xf7, 0x7a, 0x61, 0x79, 0xf5, 0xe4, 0xf1, 0x6c, 0xd4, 0x05, 0xac, 0x71, + 0x41, 0xcc, 0x6f, 0x70, 0x6c, 0x2a, 0x1b, 0xc7, 0x48, 0x18, 0xe0, 0x04, 0x0b, 0xe7, 0x0b, 0x73, + 0x68, 0x91, 0x08, 0x4a, 0xd0, 0xa6, 0x5f, 0x19, 0x84, 0x14, 0x93, 0xcc, 0x14, 0x8b, 0x8b, 0xd9, + 0xa4, 0xcb, 0x59, 0x5a, 0x55, 0x17, 0x96, 0xe7, 0xb3, 0x29, 0x97, 0x73, 0x5e, 0x2d, 0xae, 0xad, + 0x64, 0xc1, 0x65, 0x58, 0x2a, 0x94, 0x4a, 0xd3, 0xf3, 0x85, 0x6c, 0xda, 0xb5, 0x98, 0xb9, 0x6f, + 0xb5, 0x50, 0xca, 0x0e, 0x04, 0x86, 0x85, 0xb7, 0x18, 0x74, 0x6f, 0x51, 0x58, 0x5e, 0x5b, 0xca, + 0x66, 0x94, 0x61, 0x18, 0xe4, 0xb7, 0x90, 0x83, 0x18, 0x6a, 0x13, 0xe1, 0x48, 0xb3, 0xde, 0x40, + 0x38, 0xcb, 0x70, 0x40, 0x80, 0x16, 0xca, 0xf8, 0x2c, 0xc4, 0x59, 0x74, 0x61, 0x14, 0x67, 0x16, + 0xa7, 0x67, 0x0a, 0x8b, 0x5a, 0x71, 0x65, 0x75, 0xa1, 0xb8, 0x3c, 0xbd, 0x88, 0xbe, 0x73, 0x65, + 0x6a, 0xe1, 0xe3, 0x6b, 0x0b, 0x6a, 0x61, 0x0e, 0xfd, 0xe7, 0x93, 0xad, 0x14, 0xa6, 0x57, 0x51, + 0x16, 0x1d, 0x3f, 0x0c, 0xa3, 0xdd, 0xf2, 0x4c, 0xb7, 0x95, 0x31, 0xfe, 0x5c, 0x04, 0x46, 0xba, + 0xa4, 0xcc, 0xae, 0xab, 0xe8, 0x2e, 0x88, 0xf3, 0x48, 0xe3, 0x45, 0xe4, 0xd6, 0xae, 0xb9, 0x97, + 0xc5, 0x5d, 0x47, 0x21, 0x61, 0x38, 0x7f, 0x21, 0x8d, 0x6e, 0x53, 0x48, 0x29, 0x45, 0x47, 0x38, + 0x3d, 0x1c, 0x81, 0xdc, 0x76, 0xdc, 0x21, 0xeb, 0xbd, 0x2f, 0xb0, 0xde, 0xef, 0x68, 0x1f, 0xc0, + 0xc1, 0xed, 0x9f, 0xa1, 0x63, 0x14, 0xcf, 0x47, 0x60, 0x4f, 0xf7, 0x7e, 0xa3, 0xeb, 0x18, 0xee, + 0x84, 0x44, 0x9d, 0x38, 0x9b, 0x96, 0xac, 0xb9, 0x37, 0x77, 0xc9, 0xe4, 0x54, 0xdd, 0xee, 0x2b, + 0x81, 0xf2, 0x97, 0x82, 0xe8, 0x76, 0x4d, 0x03, 0x1f, 0x4d, 0xc7, 0x48, 0x1f, 0xe9, 0x83, 0xab, + 0xbb, 0x92, 0x77, 0x1d, 0xe8, 0x75, 0x00, 0x35, 0xb3, 0xd1, 0x72, 0x78, 0x5d, 0xe5, 0x69, 0x26, + 0xc5, 0x24, 0x6c, 0x09, 0xd3, 0x14, 0xd2, 0x72, 0x5c, 0x7d, 0x94, 0xe9, 0x81, 0x8b, 0x98, 0xc1, + 0x69, 0x6f, 0xa0, 0x31, 0x36, 0xd0, 0xfd, 0xdb, 0x3c, 0x69, 0x47, 0xc9, 0x3a, 0x02, 0xd9, 0xb2, + 0x51, 0x23, 0xa6, 0xa3, 0xd9, 0x4e, 0x93, 0xe8, 0xf5, 0x9a, 0x59, 0x65, 0x79, 0x34, 0x99, 0x8f, + 0x6f, 0xe8, 0x86, 0x4d, 0xd4, 0x21, 0xae, 0x2e, 0x49, 0x2d, 0x45, 0xb0, 0x62, 0xd1, 0xf4, 0x21, + 0x12, 0x01, 0x04, 0x57, 0xbb, 0x88, 0xf1, 0x3f, 0xf4, 0x43, 0xda, 0xd7, 0x9d, 0x29, 0x07, 0x61, + 0xe0, 0x82, 0x7e, 0x49, 0xd7, 0x64, 0xc7, 0xcd, 0x3d, 0x91, 0xa6, 0xb2, 0x15, 0xd1, 0x75, 0x1f, + 0x81, 0x51, 0x66, 0x82, 0xcf, 0x88, 0x37, 0x2a, 0x1b, 0xba, 0x6d, 0x33, 0xa7, 0x25, 0x99, 0xa9, + 0x42, 0x75, 0x45, 0xaa, 0x9a, 0x95, 0x1a, 0xe5, 0x04, 0x8c, 0x30, 0x44, 0x1d, 0x13, 0x6f, 0xad, + 0x61, 0x10, 0x8d, 0xee, 0x01, 0x6c, 0x96, 0x4f, 0xdd, 0x91, 0x0d, 0x53, 0x8b, 0x25, 0x61, 0x40, + 0x47, 0x64, 0x2b, 0xf3, 0x70, 0x1d, 0x83, 0x55, 0x89, 0x49, 0x9a, 0xba, 0x43, 0x34, 0xf2, 0xc9, + 0x16, 0xda, 0x6a, 0xba, 0x59, 0xd1, 0x36, 0x75, 0x7b, 0x33, 0x37, 0xea, 0x27, 0xd8, 0x47, 0x6d, + 0xe7, 0x85, 0x69, 0x81, 0x59, 0x4e, 0x9b, 0x95, 0xbb, 0xd1, 0x4e, 0xc9, 0xc3, 0x1e, 0x46, 0x84, + 0x4e, 0xc1, 0x67, 0xd6, 0xca, 0x9b, 0xa4, 0x7c, 0x51, 0x6b, 0x39, 0x1b, 0xa7, 0x73, 0xd7, 0xf8, + 0x19, 0xd8, 0x20, 0x4b, 0xcc, 0x66, 0x96, 0x9a, 0xac, 0xa1, 0x85, 0x52, 0x82, 0x01, 0x3a, 0x1f, + 0xf5, 0xda, 0x83, 0x38, 0x6c, 0xab, 0xc9, 0x6a, 0x44, 0xa6, 0xcb, 0xe2, 0xf6, 0x39, 0x71, 0xa2, + 0x28, 0x00, 0x4b, 0xd8, 0x9f, 0xe6, 0xe3, 0xa5, 0x95, 0x42, 0x61, 0x4e, 0x4d,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0x22, 0xb0, + 0x72, 0x5a, 0x28, 0xe3, 0x39, 0x18, 0xc6, 0x9d, 0xfa, 0xba, 0x65, 0x8b, 0x7d, 0x6f, 0x0f, 0x74, + 0x4f, 0x0a, 0xba, 0x21, 0x01, 0x64, 0xbb, 0x60, 0xca, 0x75, 0x06, 0x92, 0x1b, 0xb8, 0x01, 0xea, + 0x81, 0xe2, 0x29, 0x41, 0xd1, 0x4f, 0xed, 0x29, 0x74, 0x1a, 0x06, 0xaa, 0x96, 0x48, 0xc3, 0xe1, + 0xf0, 0xa7, 0x05, 0x3c, 0x2d, 0x31, 0x82, 0xa2, 0x61, 0x35, 0x5a, 0x06, 0xcd, 0xd1, 0xe1, 0x14, + 0xdf, 0x94, 0x14, 0x12, 0x23, 0x28, 0x76, 0xe1, 0xd6, 0x67, 0x24, 0x85, 0xed, 0xf3, 0xe7, 0x5d, + 0xf4, 0xac, 0xd7, 0xd8, 0xb2, 0xcc, 0x5e, 0x06, 0xf1, 0xac, 0x60, 0x00, 0x01, 0xa1, 0x04, 0x77, + 0x40, 0xaa, 0xd7, 0x89, 0xf8, 0x96, 0x80, 0x27, 0x89, 0x9c, 0x01, 0x5c, 0x67, 0x32, 0xc9, 0xd0, + 0x77, 0x2b, 0xe1, 0x14, 0xdf, 0x16, 0x14, 0x19, 0x1f, 0x4c, 0x3c, 0x86, 0x43, 0x6c, 0x07, 0xb7, + 0xea, 0x3d, 0x90, 0x3c, 0x2f, 0x1f, 0x43, 0x40, 0x84, 0x2b, 0xd7, 0x89, 0x59, 0xde, 0xec, 0x8d, + 0xe1, 0x05, 0xe9, 0x4a, 0x89, 0xa1, 0x14, 0x98, 0x79, 0xea, 0x7a, 0x13, 0x37, 0xd7, 0x46, 0x4f, + 0xd3, 0xf1, 0x1d, 0xc1, 0x31, 0xe0, 0x82, 0x84, 0x47, 0x5a, 0xe6, 0x6e, 0x68, 0x5e, 0x94, 0x1e, + 0xf1, 0xc1, 0xc4, 0xd2, 0xc3, 0x9d, 0x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, 0x3a, 0xf6, 0xdf, 0x00, 0x00, 0x00, 0xff, 0xff, 0x8b, 0x2b, 0xe8, 0xe7, 0x0d, 0x2d, + 0x00, 0x00, + } + r := bytes.NewReader(gzipped) + gzipr, err := compress_gzip.NewReader(r) + if err != nil { + panic(err) + } + ungzipped, err := io_ioutil.ReadAll(gzipr) + if err != nil { + panic(err) + } + if err := github_com_gogo_protobuf_proto.Unmarshal(ungzipped, d); err != nil { + panic(err) + } + return d +} +func (this *Subby) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*Subby) + if !ok { + that2, ok := that.(Subby) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *Subby") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *Subby but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *Subby but is not nil && this == nil") + } + if this.Sub != that1.Sub { + return fmt.Errorf("Sub this(%v) Not Equal that(%v)", this.Sub, that1.Sub) + } + return nil +} +func (this *Subby) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*Subby) + if !ok { + that2, ok := that.(Subby) + 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.Sub != that1.Sub { + return false + } + return true +} +func (this *SampleOneOf) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*SampleOneOf) + if !ok { + that2, ok := that.(SampleOneOf) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *SampleOneOf") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *SampleOneOf but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *SampleOneOf but is not nil && this == nil") + } + if that1.TestOneof == nil { + if this.TestOneof != nil { + return fmt.Errorf("this.TestOneof != nil && that1.TestOneof == nil") + } + } else if this.TestOneof == nil { + return fmt.Errorf("this.TestOneof == nil && that1.TestOneof != nil") + } else if err := this.TestOneof.VerboseEqual(that1.TestOneof); err != nil { + return err + } + return nil +} +func (this *SampleOneOf_Field1) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*SampleOneOf_Field1) + if !ok { + that2, ok := that.(SampleOneOf_Field1) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *SampleOneOf_Field1") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *SampleOneOf_Field1 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *SampleOneOf_Field1 but is not nil && this == nil") + } + if this.Field1 != that1.Field1 { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) + } + return nil +} +func (this *SampleOneOf_Field2) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*SampleOneOf_Field2) + if !ok { + that2, ok := that.(SampleOneOf_Field2) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *SampleOneOf_Field2") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *SampleOneOf_Field2 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *SampleOneOf_Field2 but is not nil && this == nil") + } + if this.Field2 != that1.Field2 { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) + } + return nil +} +func (this *SampleOneOf_Field3) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*SampleOneOf_Field3) + if !ok { + that2, ok := that.(SampleOneOf_Field3) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *SampleOneOf_Field3") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *SampleOneOf_Field3 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *SampleOneOf_Field3 but is not nil && this == nil") + } + if this.Field3 != that1.Field3 { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", this.Field3, that1.Field3) + } + return nil +} +func (this *SampleOneOf_Field4) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*SampleOneOf_Field4) + if !ok { + that2, ok := that.(SampleOneOf_Field4) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *SampleOneOf_Field4") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *SampleOneOf_Field4 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *SampleOneOf_Field4 but is not nil && this == nil") + } + if this.Field4 != that1.Field4 { + return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", this.Field4, that1.Field4) + } + return nil +} +func (this *SampleOneOf_Field5) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*SampleOneOf_Field5) + if !ok { + that2, ok := that.(SampleOneOf_Field5) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *SampleOneOf_Field5") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *SampleOneOf_Field5 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *SampleOneOf_Field5 but is not nil && this == nil") + } + if this.Field5 != that1.Field5 { + return fmt.Errorf("Field5 this(%v) Not Equal that(%v)", this.Field5, that1.Field5) + } + return nil +} +func (this *SampleOneOf_Field6) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*SampleOneOf_Field6) + if !ok { + that2, ok := that.(SampleOneOf_Field6) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *SampleOneOf_Field6") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *SampleOneOf_Field6 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *SampleOneOf_Field6 but is not nil && this == nil") + } + if this.Field6 != that1.Field6 { + return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", this.Field6, that1.Field6) + } + return nil +} +func (this *SampleOneOf_Field7) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*SampleOneOf_Field7) + if !ok { + that2, ok := that.(SampleOneOf_Field7) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *SampleOneOf_Field7") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *SampleOneOf_Field7 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *SampleOneOf_Field7 but is not nil && this == nil") + } + if this.Field7 != that1.Field7 { + return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", this.Field7, that1.Field7) + } + return nil +} +func (this *SampleOneOf_Field8) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*SampleOneOf_Field8) + if !ok { + that2, ok := that.(SampleOneOf_Field8) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *SampleOneOf_Field8") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *SampleOneOf_Field8 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *SampleOneOf_Field8 but is not nil && this == nil") + } + if this.Field8 != that1.Field8 { + return fmt.Errorf("Field8 this(%v) Not Equal that(%v)", this.Field8, that1.Field8) + } + return nil +} +func (this *SampleOneOf_Field9) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*SampleOneOf_Field9) + if !ok { + that2, ok := that.(SampleOneOf_Field9) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *SampleOneOf_Field9") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *SampleOneOf_Field9 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *SampleOneOf_Field9 but is not nil && this == nil") + } + if this.Field9 != that1.Field9 { + return fmt.Errorf("Field9 this(%v) Not Equal that(%v)", this.Field9, that1.Field9) + } + return nil +} +func (this *SampleOneOf_Field10) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*SampleOneOf_Field10) + if !ok { + that2, ok := that.(SampleOneOf_Field10) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *SampleOneOf_Field10") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *SampleOneOf_Field10 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *SampleOneOf_Field10 but is not nil && this == nil") + } + if this.Field10 != that1.Field10 { + return fmt.Errorf("Field10 this(%v) Not Equal that(%v)", this.Field10, that1.Field10) + } + return nil +} +func (this *SampleOneOf_Field11) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*SampleOneOf_Field11) + if !ok { + that2, ok := that.(SampleOneOf_Field11) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *SampleOneOf_Field11") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *SampleOneOf_Field11 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *SampleOneOf_Field11 but is not nil && this == nil") + } + if this.Field11 != that1.Field11 { + return fmt.Errorf("Field11 this(%v) Not Equal that(%v)", this.Field11, that1.Field11) + } + return nil +} +func (this *SampleOneOf_Field12) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*SampleOneOf_Field12) + if !ok { + that2, ok := that.(SampleOneOf_Field12) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *SampleOneOf_Field12") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *SampleOneOf_Field12 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *SampleOneOf_Field12 but is not nil && this == nil") + } + if this.Field12 != that1.Field12 { + return fmt.Errorf("Field12 this(%v) Not Equal that(%v)", this.Field12, that1.Field12) + } + return nil +} +func (this *SampleOneOf_Field13) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*SampleOneOf_Field13) + if !ok { + that2, ok := that.(SampleOneOf_Field13) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *SampleOneOf_Field13") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *SampleOneOf_Field13 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *SampleOneOf_Field13 but is not nil && this == nil") + } + if this.Field13 != that1.Field13 { + return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", this.Field13, that1.Field13) + } + return nil +} +func (this *SampleOneOf_Field14) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*SampleOneOf_Field14) + if !ok { + that2, ok := that.(SampleOneOf_Field14) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *SampleOneOf_Field14") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *SampleOneOf_Field14 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *SampleOneOf_Field14 but is not nil && this == nil") + } + if this.Field14 != that1.Field14 { + return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", this.Field14, that1.Field14) + } + return nil +} +func (this *SampleOneOf_Field15) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*SampleOneOf_Field15) + if !ok { + that2, ok := that.(SampleOneOf_Field15) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *SampleOneOf_Field15") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *SampleOneOf_Field15 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *SampleOneOf_Field15 but is not nil && this == nil") + } + if !bytes.Equal(this.Field15, that1.Field15) { + return fmt.Errorf("Field15 this(%v) Not Equal that(%v)", this.Field15, that1.Field15) + } + return nil +} +func (this *SampleOneOf_SubMessage) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*SampleOneOf_SubMessage) + if !ok { + that2, ok := that.(SampleOneOf_SubMessage) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *SampleOneOf_SubMessage") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *SampleOneOf_SubMessage but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *SampleOneOf_SubMessage but is not nil && this == nil") + } + if !this.SubMessage.Equal(that1.SubMessage) { + return fmt.Errorf("SubMessage this(%v) Not Equal that(%v)", this.SubMessage, that1.SubMessage) + } + return nil +} +func (this *SampleOneOf) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*SampleOneOf) + if !ok { + that2, ok := that.(SampleOneOf) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + if this == nil { + return true + } + return false + } else if this == nil { + return false + } + if that1.TestOneof == nil { + if this.TestOneof != nil { + return false + } + } else if this.TestOneof == nil { + return false + } else if !this.TestOneof.Equal(that1.TestOneof) { + return false + } + return true +} +func (this *SampleOneOf_Field1) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*SampleOneOf_Field1) + if !ok { + that2, ok := that.(SampleOneOf_Field1) + 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.Field1 != that1.Field1 { + return false + } + return true +} +func (this *SampleOneOf_Field2) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*SampleOneOf_Field2) + if !ok { + that2, ok := that.(SampleOneOf_Field2) + 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.Field2 != that1.Field2 { + return false + } + return true +} +func (this *SampleOneOf_Field3) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*SampleOneOf_Field3) + if !ok { + that2, ok := that.(SampleOneOf_Field3) + 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.Field3 != that1.Field3 { + return false + } + return true +} +func (this *SampleOneOf_Field4) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*SampleOneOf_Field4) + if !ok { + that2, ok := that.(SampleOneOf_Field4) + 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.Field4 != that1.Field4 { + return false + } + return true +} +func (this *SampleOneOf_Field5) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*SampleOneOf_Field5) + if !ok { + that2, ok := that.(SampleOneOf_Field5) + 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.Field5 != that1.Field5 { + return false + } + return true +} +func (this *SampleOneOf_Field6) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*SampleOneOf_Field6) + if !ok { + that2, ok := that.(SampleOneOf_Field6) + 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.Field6 != that1.Field6 { + return false + } + return true +} +func (this *SampleOneOf_Field7) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*SampleOneOf_Field7) + if !ok { + that2, ok := that.(SampleOneOf_Field7) + 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.Field7 != that1.Field7 { + return false + } + return true +} +func (this *SampleOneOf_Field8) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*SampleOneOf_Field8) + if !ok { + that2, ok := that.(SampleOneOf_Field8) + 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.Field8 != that1.Field8 { + return false + } + return true +} +func (this *SampleOneOf_Field9) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*SampleOneOf_Field9) + if !ok { + that2, ok := that.(SampleOneOf_Field9) + 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.Field9 != that1.Field9 { + return false + } + return true +} +func (this *SampleOneOf_Field10) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*SampleOneOf_Field10) + if !ok { + that2, ok := that.(SampleOneOf_Field10) + 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.Field10 != that1.Field10 { + return false + } + return true +} +func (this *SampleOneOf_Field11) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*SampleOneOf_Field11) + if !ok { + that2, ok := that.(SampleOneOf_Field11) + 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.Field11 != that1.Field11 { + return false + } + return true +} +func (this *SampleOneOf_Field12) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*SampleOneOf_Field12) + if !ok { + that2, ok := that.(SampleOneOf_Field12) + 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.Field12 != that1.Field12 { + return false + } + return true +} +func (this *SampleOneOf_Field13) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*SampleOneOf_Field13) + if !ok { + that2, ok := that.(SampleOneOf_Field13) + 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.Field13 != that1.Field13 { + return false + } + return true +} +func (this *SampleOneOf_Field14) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*SampleOneOf_Field14) + if !ok { + that2, ok := that.(SampleOneOf_Field14) + 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.Field14 != that1.Field14 { + return false + } + return true +} +func (this *SampleOneOf_Field15) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*SampleOneOf_Field15) + if !ok { + that2, ok := that.(SampleOneOf_Field15) + 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.Field15, that1.Field15) { + return false + } + return true +} +func (this *SampleOneOf_SubMessage) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*SampleOneOf_SubMessage) + if !ok { + that2, ok := that.(SampleOneOf_SubMessage) + 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.SubMessage.Equal(that1.SubMessage) { + return false + } + return true +} +func (this *Subby) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&one.Subby{") + s = append(s, "Sub: "+fmt.Sprintf("%#v", this.Sub)+",\n") + s = append(s, "}") + return strings.Join(s, "") +} +func (this *SampleOneOf) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 20) + s = append(s, "&one.SampleOneOf{") + if this.TestOneof != nil { + s = append(s, "TestOneof: "+fmt.Sprintf("%#v", this.TestOneof)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *SampleOneOf_Field1) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.SampleOneOf_Field1{` + + `Field1:` + fmt.Sprintf("%#v", this.Field1) + `}`}, ", ") + return s +} +func (this *SampleOneOf_Field2) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.SampleOneOf_Field2{` + + `Field2:` + fmt.Sprintf("%#v", this.Field2) + `}`}, ", ") + return s +} +func (this *SampleOneOf_Field3) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.SampleOneOf_Field3{` + + `Field3:` + fmt.Sprintf("%#v", this.Field3) + `}`}, ", ") + return s +} +func (this *SampleOneOf_Field4) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.SampleOneOf_Field4{` + + `Field4:` + fmt.Sprintf("%#v", this.Field4) + `}`}, ", ") + return s +} +func (this *SampleOneOf_Field5) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.SampleOneOf_Field5{` + + `Field5:` + fmt.Sprintf("%#v", this.Field5) + `}`}, ", ") + return s +} +func (this *SampleOneOf_Field6) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.SampleOneOf_Field6{` + + `Field6:` + fmt.Sprintf("%#v", this.Field6) + `}`}, ", ") + return s +} +func (this *SampleOneOf_Field7) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.SampleOneOf_Field7{` + + `Field7:` + fmt.Sprintf("%#v", this.Field7) + `}`}, ", ") + return s +} +func (this *SampleOneOf_Field8) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.SampleOneOf_Field8{` + + `Field8:` + fmt.Sprintf("%#v", this.Field8) + `}`}, ", ") + return s +} +func (this *SampleOneOf_Field9) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.SampleOneOf_Field9{` + + `Field9:` + fmt.Sprintf("%#v", this.Field9) + `}`}, ", ") + return s +} +func (this *SampleOneOf_Field10) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.SampleOneOf_Field10{` + + `Field10:` + fmt.Sprintf("%#v", this.Field10) + `}`}, ", ") + return s +} +func (this *SampleOneOf_Field11) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.SampleOneOf_Field11{` + + `Field11:` + fmt.Sprintf("%#v", this.Field11) + `}`}, ", ") + return s +} +func (this *SampleOneOf_Field12) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.SampleOneOf_Field12{` + + `Field12:` + fmt.Sprintf("%#v", this.Field12) + `}`}, ", ") + return s +} +func (this *SampleOneOf_Field13) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.SampleOneOf_Field13{` + + `Field13:` + fmt.Sprintf("%#v", this.Field13) + `}`}, ", ") + return s +} +func (this *SampleOneOf_Field14) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.SampleOneOf_Field14{` + + `Field14:` + fmt.Sprintf("%#v", this.Field14) + `}`}, ", ") + return s +} +func (this *SampleOneOf_Field15) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.SampleOneOf_Field15{` + + `Field15:` + fmt.Sprintf("%#v", this.Field15) + `}`}, ", ") + return s +} +func (this *SampleOneOf_SubMessage) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.SampleOneOf_SubMessage{` + + `SubMessage:` + fmt.Sprintf("%#v", this.SubMessage) + `}`}, ", ") + return s +} +func valueToGoStringOne(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 extensionToGoStringOne(e map[int32]github_com_gogo_protobuf_proto.Extension) string { + if e == nil { + return "nil" + } + s := "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 +} +func NewPopulatedSubby(r randyOne, easy bool) *Subby { + this := &Subby{} + this.Sub = randStringOne(r) + if !easy && r.Intn(10) != 0 { + } + return this +} + +func NewPopulatedSampleOneOf(r randyOne, easy bool) *SampleOneOf { + this := &SampleOneOf{} + oneofNumber_TestOneof := []int32{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}[r.Intn(16)] + switch oneofNumber_TestOneof { + case 1: + this.TestOneof = NewPopulatedSampleOneOf_Field1(r, easy) + case 2: + this.TestOneof = NewPopulatedSampleOneOf_Field2(r, easy) + case 3: + this.TestOneof = NewPopulatedSampleOneOf_Field3(r, easy) + case 4: + this.TestOneof = NewPopulatedSampleOneOf_Field4(r, easy) + case 5: + this.TestOneof = NewPopulatedSampleOneOf_Field5(r, easy) + case 6: + this.TestOneof = NewPopulatedSampleOneOf_Field6(r, easy) + case 7: + this.TestOneof = NewPopulatedSampleOneOf_Field7(r, easy) + case 8: + this.TestOneof = NewPopulatedSampleOneOf_Field8(r, easy) + case 9: + this.TestOneof = NewPopulatedSampleOneOf_Field9(r, easy) + case 10: + this.TestOneof = NewPopulatedSampleOneOf_Field10(r, easy) + case 11: + this.TestOneof = NewPopulatedSampleOneOf_Field11(r, easy) + case 12: + this.TestOneof = NewPopulatedSampleOneOf_Field12(r, easy) + case 13: + this.TestOneof = NewPopulatedSampleOneOf_Field13(r, easy) + case 14: + this.TestOneof = NewPopulatedSampleOneOf_Field14(r, easy) + case 15: + this.TestOneof = NewPopulatedSampleOneOf_Field15(r, easy) + case 16: + this.TestOneof = NewPopulatedSampleOneOf_SubMessage(r, easy) + } + if !easy && r.Intn(10) != 0 { + } + return this +} + +func NewPopulatedSampleOneOf_Field1(r randyOne, easy bool) *SampleOneOf_Field1 { + this := &SampleOneOf_Field1{} + this.Field1 = float64(r.Float64()) + if r.Intn(2) == 0 { + this.Field1 *= -1 + } + return this +} +func NewPopulatedSampleOneOf_Field2(r randyOne, easy bool) *SampleOneOf_Field2 { + this := &SampleOneOf_Field2{} + this.Field2 = float32(r.Float32()) + if r.Intn(2) == 0 { + this.Field2 *= -1 + } + return this +} +func NewPopulatedSampleOneOf_Field3(r randyOne, easy bool) *SampleOneOf_Field3 { + this := &SampleOneOf_Field3{} + this.Field3 = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Field3 *= -1 + } + return this +} +func NewPopulatedSampleOneOf_Field4(r randyOne, easy bool) *SampleOneOf_Field4 { + this := &SampleOneOf_Field4{} + this.Field4 = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Field4 *= -1 + } + return this +} +func NewPopulatedSampleOneOf_Field5(r randyOne, easy bool) *SampleOneOf_Field5 { + this := &SampleOneOf_Field5{} + this.Field5 = uint32(r.Uint32()) + return this +} +func NewPopulatedSampleOneOf_Field6(r randyOne, easy bool) *SampleOneOf_Field6 { + this := &SampleOneOf_Field6{} + this.Field6 = uint64(uint64(r.Uint32())) + return this +} +func NewPopulatedSampleOneOf_Field7(r randyOne, easy bool) *SampleOneOf_Field7 { + this := &SampleOneOf_Field7{} + this.Field7 = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Field7 *= -1 + } + return this +} +func NewPopulatedSampleOneOf_Field8(r randyOne, easy bool) *SampleOneOf_Field8 { + this := &SampleOneOf_Field8{} + this.Field8 = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Field8 *= -1 + } + return this +} +func NewPopulatedSampleOneOf_Field9(r randyOne, easy bool) *SampleOneOf_Field9 { + this := &SampleOneOf_Field9{} + this.Field9 = uint32(r.Uint32()) + return this +} +func NewPopulatedSampleOneOf_Field10(r randyOne, easy bool) *SampleOneOf_Field10 { + this := &SampleOneOf_Field10{} + this.Field10 = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Field10 *= -1 + } + return this +} +func NewPopulatedSampleOneOf_Field11(r randyOne, easy bool) *SampleOneOf_Field11 { + this := &SampleOneOf_Field11{} + this.Field11 = uint64(uint64(r.Uint32())) + return this +} +func NewPopulatedSampleOneOf_Field12(r randyOne, easy bool) *SampleOneOf_Field12 { + this := &SampleOneOf_Field12{} + this.Field12 = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Field12 *= -1 + } + return this +} +func NewPopulatedSampleOneOf_Field13(r randyOne, easy bool) *SampleOneOf_Field13 { + this := &SampleOneOf_Field13{} + this.Field13 = bool(bool(r.Intn(2) == 0)) + return this +} +func NewPopulatedSampleOneOf_Field14(r randyOne, easy bool) *SampleOneOf_Field14 { + this := &SampleOneOf_Field14{} + this.Field14 = randStringOne(r) + return this +} +func NewPopulatedSampleOneOf_Field15(r randyOne, easy bool) *SampleOneOf_Field15 { + this := &SampleOneOf_Field15{} + v1 := r.Intn(100) + this.Field15 = make([]byte, v1) + for i := 0; i < v1; i++ { + this.Field15[i] = byte(r.Intn(256)) + } + return this +} +func NewPopulatedSampleOneOf_SubMessage(r randyOne, easy bool) *SampleOneOf_SubMessage { + this := &SampleOneOf_SubMessage{} + this.SubMessage = NewPopulatedSubby(r, easy) + return this +} + +type randyOne interface { + Float32() float32 + Float64() float64 + Int63() int64 + Int31() int32 + Uint32() uint32 + Intn(n int) int +} + +func randUTF8RuneOne(r randyOne) 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 randStringOne(r randyOne) string { + v2 := r.Intn(100) + tmps := make([]rune, v2) + for i := 0; i < v2; i++ { + tmps[i] = randUTF8RuneOne(r) + } + return string(tmps) +} +func randUnrecognizedOne(r randyOne, 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 = randFieldOne(data, r, fieldNumber, wire) + } + return data +} +func randFieldOne(data []byte, r randyOne, fieldNumber int, wire int) []byte { + key := uint32(fieldNumber)<<3 | uint32(wire) + switch wire { + case 0: + data = encodeVarintPopulateOne(data, uint64(key)) + v3 := r.Int63() + if r.Intn(2) == 0 { + v3 *= -1 + } + data = encodeVarintPopulateOne(data, uint64(v3)) + case 1: + data = encodeVarintPopulateOne(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 = encodeVarintPopulateOne(data, uint64(key)) + ll := r.Intn(100) + data = encodeVarintPopulateOne(data, uint64(ll)) + for j := 0; j < ll; j++ { + data = append(data, byte(r.Intn(256))) + } + default: + data = encodeVarintPopulateOne(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 encodeVarintPopulateOne(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 *Subby) Size() (n int) { + var l int + _ = l + l = len(m.Sub) + if l > 0 { + n += 1 + l + sovOne(uint64(l)) + } + return n +} + +func (m *SampleOneOf) Size() (n int) { + var l int + _ = l + if m.TestOneof != nil { + n += m.TestOneof.Size() + } + return n +} + +func (m *SampleOneOf_Field1) Size() (n int) { + var l int + _ = l + n += 9 + return n +} +func (m *SampleOneOf_Field2) Size() (n int) { + var l int + _ = l + n += 5 + return n +} +func (m *SampleOneOf_Field3) Size() (n int) { + var l int + _ = l + n += 1 + sovOne(uint64(m.Field3)) + return n +} +func (m *SampleOneOf_Field4) Size() (n int) { + var l int + _ = l + n += 1 + sovOne(uint64(m.Field4)) + return n +} +func (m *SampleOneOf_Field5) Size() (n int) { + var l int + _ = l + n += 1 + sovOne(uint64(m.Field5)) + return n +} +func (m *SampleOneOf_Field6) Size() (n int) { + var l int + _ = l + n += 1 + sovOne(uint64(m.Field6)) + return n +} +func (m *SampleOneOf_Field7) Size() (n int) { + var l int + _ = l + n += 1 + sozOne(uint64(m.Field7)) + return n +} +func (m *SampleOneOf_Field8) Size() (n int) { + var l int + _ = l + n += 1 + sozOne(uint64(m.Field8)) + return n +} +func (m *SampleOneOf_Field9) Size() (n int) { + var l int + _ = l + n += 5 + return n +} +func (m *SampleOneOf_Field10) Size() (n int) { + var l int + _ = l + n += 5 + return n +} +func (m *SampleOneOf_Field11) Size() (n int) { + var l int + _ = l + n += 9 + return n +} +func (m *SampleOneOf_Field12) Size() (n int) { + var l int + _ = l + n += 9 + return n +} +func (m *SampleOneOf_Field13) Size() (n int) { + var l int + _ = l + n += 2 + return n +} +func (m *SampleOneOf_Field14) Size() (n int) { + var l int + _ = l + l = len(m.Field14) + n += 1 + l + sovOne(uint64(l)) + return n +} +func (m *SampleOneOf_Field15) Size() (n int) { + var l int + _ = l + if m.Field15 != nil { + l = len(m.Field15) + n += 1 + l + sovOne(uint64(l)) + } + return n +} +func (m *SampleOneOf_SubMessage) Size() (n int) { + var l int + _ = l + if m.SubMessage != nil { + l = m.SubMessage.Size() + n += 2 + l + sovOne(uint64(l)) + } + return n +} + +func sovOne(x uint64) (n int) { + for { + n++ + x >>= 7 + if x == 0 { + break + } + } + return n +} +func sozOne(x uint64) (n int) { + return sovOne(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (this *Subby) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&Subby{`, + `Sub:` + fmt.Sprintf("%v", this.Sub) + `,`, + `}`, + }, "") + return s +} +func (this *SampleOneOf) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&SampleOneOf{`, + `TestOneof:` + fmt.Sprintf("%v", this.TestOneof) + `,`, + `}`, + }, "") + return s +} +func (this *SampleOneOf_Field1) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&SampleOneOf_Field1{`, + `Field1:` + fmt.Sprintf("%v", this.Field1) + `,`, + `}`, + }, "") + return s +} +func (this *SampleOneOf_Field2) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&SampleOneOf_Field2{`, + `Field2:` + fmt.Sprintf("%v", this.Field2) + `,`, + `}`, + }, "") + return s +} +func (this *SampleOneOf_Field3) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&SampleOneOf_Field3{`, + `Field3:` + fmt.Sprintf("%v", this.Field3) + `,`, + `}`, + }, "") + return s +} +func (this *SampleOneOf_Field4) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&SampleOneOf_Field4{`, + `Field4:` + fmt.Sprintf("%v", this.Field4) + `,`, + `}`, + }, "") + return s +} +func (this *SampleOneOf_Field5) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&SampleOneOf_Field5{`, + `Field5:` + fmt.Sprintf("%v", this.Field5) + `,`, + `}`, + }, "") + return s +} +func (this *SampleOneOf_Field6) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&SampleOneOf_Field6{`, + `Field6:` + fmt.Sprintf("%v", this.Field6) + `,`, + `}`, + }, "") + return s +} +func (this *SampleOneOf_Field7) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&SampleOneOf_Field7{`, + `Field7:` + fmt.Sprintf("%v", this.Field7) + `,`, + `}`, + }, "") + return s +} +func (this *SampleOneOf_Field8) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&SampleOneOf_Field8{`, + `Field8:` + fmt.Sprintf("%v", this.Field8) + `,`, + `}`, + }, "") + return s +} +func (this *SampleOneOf_Field9) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&SampleOneOf_Field9{`, + `Field9:` + fmt.Sprintf("%v", this.Field9) + `,`, + `}`, + }, "") + return s +} +func (this *SampleOneOf_Field10) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&SampleOneOf_Field10{`, + `Field10:` + fmt.Sprintf("%v", this.Field10) + `,`, + `}`, + }, "") + return s +} +func (this *SampleOneOf_Field11) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&SampleOneOf_Field11{`, + `Field11:` + fmt.Sprintf("%v", this.Field11) + `,`, + `}`, + }, "") + return s +} +func (this *SampleOneOf_Field12) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&SampleOneOf_Field12{`, + `Field12:` + fmt.Sprintf("%v", this.Field12) + `,`, + `}`, + }, "") + return s +} +func (this *SampleOneOf_Field13) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&SampleOneOf_Field13{`, + `Field13:` + fmt.Sprintf("%v", this.Field13) + `,`, + `}`, + }, "") + return s +} +func (this *SampleOneOf_Field14) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&SampleOneOf_Field14{`, + `Field14:` + fmt.Sprintf("%v", this.Field14) + `,`, + `}`, + }, "") + return s +} +func (this *SampleOneOf_Field15) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&SampleOneOf_Field15{`, + `Field15:` + fmt.Sprintf("%v", this.Field15) + `,`, + `}`, + }, "") + return s +} +func (this *SampleOneOf_SubMessage) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&SampleOneOf_SubMessage{`, + `SubMessage:` + strings.Replace(fmt.Sprintf("%v", this.SubMessage), "Subby", "Subby", 1) + `,`, + `}`, + }, "") + return s +} +func valueToStringOne(v interface{}) string { + rv := reflect.ValueOf(v) + if rv.IsNil() { + return "nil" + } + pv := reflect.Indirect(rv).Interface() + return fmt.Sprintf("*%v", pv) +} +func (m *Subby) 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 ErrIntOverflowOneUnsafe + } + 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: Subby: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Subby: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Sub", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOneUnsafe + } + 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 ErrInvalidLengthOneUnsafe + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Sub = string(data[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipOneUnsafe(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthOneUnsafe + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *SampleOneOf) 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 ErrIntOverflowOneUnsafe + } + 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: SampleOneOf: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: SampleOneOf: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) + } + var v float64 + if iNdEx+8 > l { + return io.ErrUnexpectedEOF + } + v = *(*float64)(unsafe.Pointer(&data[iNdEx])) + iNdEx += 8 + m.TestOneof = &SampleOneOf_Field1{v} + case 2: + if wireType != 5 { + return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType) + } + var v float32 + if iNdEx+4 > l { + return io.ErrUnexpectedEOF + } + v = *(*float32)(unsafe.Pointer(&data[iNdEx])) + iNdEx += 4 + m.TestOneof = &SampleOneOf_Field2{v} + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field3", wireType) + } + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOneUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.TestOneof = &SampleOneOf_Field3{v} + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field4", wireType) + } + var v int64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOneUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.TestOneof = &SampleOneOf_Field4{v} + case 5: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field5", wireType) + } + var v uint32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOneUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (uint32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.TestOneof = &SampleOneOf_Field5{v} + case 6: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field6", wireType) + } + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOneUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.TestOneof = &SampleOneOf_Field6{v} + case 7: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field7", wireType) + } + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOneUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + v = int32((uint32(v) >> 1) ^ uint32(((v&1)<<31)>>31)) + m.TestOneof = &SampleOneOf_Field7{v} + case 8: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field8", wireType) + } + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOneUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + v = (v >> 1) ^ uint64((int64(v&1)<<63)>>63) + m.TestOneof = &SampleOneOf_Field8{int64(v)} + case 9: + if wireType != 5 { + return fmt.Errorf("proto: wrong wireType = %d for field Field9", wireType) + } + var v uint32 + if iNdEx+4 > l { + return io.ErrUnexpectedEOF + } + v = *(*uint32)(unsafe.Pointer(&data[iNdEx])) + iNdEx += 4 + m.TestOneof = &SampleOneOf_Field9{v} + case 10: + if wireType != 5 { + return fmt.Errorf("proto: wrong wireType = %d for field Field10", wireType) + } + var v int32 + if iNdEx+4 > l { + return io.ErrUnexpectedEOF + } + v = *(*int32)(unsafe.Pointer(&data[iNdEx])) + iNdEx += 4 + m.TestOneof = &SampleOneOf_Field10{v} + case 11: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field Field11", wireType) + } + var v uint64 + if iNdEx+8 > l { + return io.ErrUnexpectedEOF + } + v = *(*uint64)(unsafe.Pointer(&data[iNdEx])) + iNdEx += 8 + m.TestOneof = &SampleOneOf_Field11{v} + case 12: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field Field12", wireType) + } + var v int64 + if iNdEx+8 > l { + return io.ErrUnexpectedEOF + } + v = *(*int64)(unsafe.Pointer(&data[iNdEx])) + iNdEx += 8 + m.TestOneof = &SampleOneOf_Field12{v} + case 13: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field13", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOneUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + b := bool(v != 0) + m.TestOneof = &SampleOneOf_Field13{b} + case 14: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field14", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOneUnsafe + } + 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 ErrInvalidLengthOneUnsafe + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.TestOneof = &SampleOneOf_Field14{string(data[iNdEx:postIndex])} + iNdEx = postIndex + case 15: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field15", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOneUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthOneUnsafe + } + postIndex := iNdEx + byteLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + v := make([]byte, postIndex-iNdEx) + copy(v, data[iNdEx:postIndex]) + m.TestOneof = &SampleOneOf_Field15{v} + iNdEx = postIndex + case 16: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SubMessage", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOneUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthOneUnsafe + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + v := &Subby{} + if err := v.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + m.TestOneof = &SampleOneOf_SubMessage{v} + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipOneUnsafe(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthOneUnsafe + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipOneUnsafe(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, ErrIntOverflowOneUnsafe + } + 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, ErrIntOverflowOneUnsafe + } + 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, ErrIntOverflowOneUnsafe + } + 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, ErrInvalidLengthOneUnsafe + } + return iNdEx, nil + case 3: + for { + var innerWire uint64 + var start int = iNdEx + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowOneUnsafe + } + 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 := skipOneUnsafe(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 ( + ErrInvalidLengthOneUnsafe = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowOneUnsafe = fmt.Errorf("proto: integer overflow") +) + +var fileDescriptorOne = []byte{ + // 387 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0x44, 0xd2, 0xbd, 0x6e, 0xdb, 0x30, + 0x10, 0x07, 0xf0, 0x28, 0x8a, 0xa5, 0x84, 0x72, 0x1a, 0x57, 0xd3, 0x35, 0x83, 0x50, 0x78, 0xea, + 0x12, 0x2b, 0xd6, 0x47, 0x3e, 0xd6,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, 0xcb, 0x25, + 0xb9, 0x90, 0xb7, 0x2c, 0x97, 0x2c, 0x57, 0x74, 0x08, 0xf1, 0x59, 0xae, 0x58, 0xae, 0xe9, 0x08, + 0xe2, 0xb2, 0x5c, 0xfb, 0xa7, 0xc2, 0xed, 0x4f, 0x7a, 0x4e, 0x02, 0x74, 0x02, 0x72, 0xfb, 0xa3, + 0x9e, 0x1b, 0x9b, 0x92, 0x07, 0x73, 0x8c, 0x4d, 0x8d, 0x45, 0x34, 0x84, 0x8d, 0x8c, 0x45, 0xc6, + 0x62, 0x3a, 0x86, 0x1d, 0x1a, 0x8b, 0x8d, 0x25, 0xf4, 0x66, 0xf7, 0xff, 0x8d, 0x25, 0xc6, 0x52, + 0x3a, 0x81, 0x0d, 0x8d, 0xa5, 0xfe, 0x99, 0xf0, 0x70, 0x51, 0x0f, 0x95, 0x6c, 0x9a, 0xac, 0x94, + 0x34, 0x82, 0x7b, 0x91, 0x98, 0xec, 0x5e, 0x84, 0xbe, 0x54, 0xec, 0x0a, 0x2c, 0x7c, 0xe9, 0xfd, + 0x66, 0x28, 0x44, 0x2b, 0x9b, 0xf6, 0x01, 0xae, 0x8a, 0x9b, 0x8f, 0x8b, 0x55, 0xb0, 0xf7, 0x1b, + 0xf9, 0x83, 0x2c, 0x57, 0x81, 0xb5, 0x41, 0xb6, 0xc8, 0xcb, 0x3a, 0xb0, 0x7e, 0x20, 0x3f, 0x91, + 0x5f, 0xc8, 0x62, 0x8d, 0x3d, 0x64, 0x89, 0xfe, 0x3f, 0xea, 0x06, 0x75, 0x8b, 0xfa, 0xf2, 0x2f, + 0xb0, 0x72, 0x47, 0x3f, 0xa3, 0xf8, 0x35, 0x00, 0x00, 0xff, 0xff, 0xc3, 0xa6, 0x0e, 0x56, 0xa0, + 0x02, 0x00, 0x00, +} diff --git a/vendor/github.com/gogo/protobuf/test/oneof3/combos/unsafeunmarshaler/one.proto b/vendor/github.com/gogo/protobuf/test/oneof3/combos/unsafeunmarshaler/one.proto new file mode 100644 index 000000000..d9b60c9a9 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/oneof3/combos/unsafeunmarshaler/one.proto @@ -0,0 +1,80 @@ +// Copyright (c) 2013, Vastech SA (PTY) LTD. All rights reserved. +// http://github.com/gogo/protobuf/gogoproto +// +// 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 = "proto3"; + +package one; + +import "github.com/gogo/protobuf/gogoproto/gogo.proto"; + +option (gogoproto.goproto_stringer_all) = false; +option (gogoproto.goproto_enum_prefix_all) = false; +option (gogoproto.goproto_getters_all) = false; + +option (gogoproto.equal_all) = true; +option (gogoproto.verbose_equal_all) = true; +option (gogoproto.stringer_all) = true; +option (gogoproto.gostring_all) = true; +option (gogoproto.description_all) = true; + +option (gogoproto.testgen_all) = true; +option (gogoproto.populate_all) = true; +option (gogoproto.unmarshaler_all) = false; +option (gogoproto.marshaler_all) = false; +option (gogoproto.sizer_all) = true; + +option (gogoproto.goproto_enum_stringer_all) = false; +option (gogoproto.enum_stringer_all) = true; + +option (gogoproto.unsafe_marshaler_all) = false; +option (gogoproto.unsafe_unmarshaler_all) = true; + +message Subby { + string sub = 1; +} + +message SampleOneOf { + oneof test_oneof { + double Field1 = 1; + float Field2 = 2; + int32 Field3 = 3; + int64 Field4 = 4; + uint32 Field5 = 5; + uint64 Field6 = 6; + sint32 Field7 = 7; + sint64 Field8 = 8; + fixed32 Field9 = 9; + sfixed32 Field10 = 10; + fixed64 Field11 = 11; + sfixed64 Field12 = 12; + bool Field13 = 13; + string Field14 = 14; + bytes Field15 = 15; + Subby sub_message = 16; + } +} + + diff --git a/vendor/github.com/gogo/protobuf/test/oneof3/combos/unsafeunmarshaler/onepb_test.go b/vendor/github.com/gogo/protobuf/test/oneof3/combos/unsafeunmarshaler/onepb_test.go new file mode 100644 index 000000000..e92034197 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/oneof3/combos/unsafeunmarshaler/onepb_test.go @@ -0,0 +1,333 @@ +// Code generated by protoc-gen-gogo. +// source: combos/unsafeunmarshaler/one.proto +// DO NOT EDIT! + +/* +Package one is a generated protocol buffer package. + +It is generated from these files: + combos/unsafeunmarshaler/one.proto + +It has these top-level messages: + Subby + SampleOneOf +*/ +package one + +import testing "testing" +import math_rand "math/rand" +import time "time" +import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" +import github_com_gogo_protobuf_jsonpb "github.com/gogo/protobuf/jsonpb" +import fmt "fmt" +import go_parser "go/parser" +import proto "github.com/gogo/protobuf/proto" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +func TestSubbyProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedSubby(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Subby{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestSampleOneOfProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedSampleOneOf(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &SampleOneOf{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestSubbyJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedSubby(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Subby{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestSampleOneOfJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedSampleOneOf(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &SampleOneOf{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestSubbyProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedSubby(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &Subby{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestSubbyProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedSubby(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &Subby{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestSampleOneOfProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedSampleOneOf(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &SampleOneOf{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestSampleOneOfProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedSampleOneOf(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &SampleOneOf{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestOneDescription(t *testing.T) { + OneDescription() +} +func TestSubbyVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedSubby(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &Subby{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestSampleOneOfVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedSampleOneOf(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &SampleOneOf{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestSubbyGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedSubby(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestSampleOneOfGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedSampleOneOf(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestSubbySize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedSubby(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func TestSampleOneOfSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedSampleOneOf(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func TestSubbyStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedSubby(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestSampleOneOfStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedSampleOneOf(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} + +//These tests are generated by github.com/gogo/protobuf/plugin/testgen diff --git a/vendor/github.com/gogo/protobuf/test/oneof3/doc.go b/vendor/github.com/gogo/protobuf/test/oneof3/doc.go new file mode 100644 index 000000000..e668df5e0 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/oneof3/doc.go @@ -0,0 +1 @@ +package oneof3 diff --git a/vendor/github.com/gogo/protobuf/test/oneof3/one.proto b/vendor/github.com/gogo/protobuf/test/oneof3/one.proto new file mode 100644 index 000000000..c3cdff7e5 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/oneof3/one.proto @@ -0,0 +1,80 @@ +// Copyright (c) 2013, Vastech SA (PTY) LTD. All rights reserved. +// http://github.com/gogo/protobuf/gogoproto +// +// 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 = "proto3"; + +package one; + +import "github.com/gogo/protobuf/gogoproto/gogo.proto"; + +option (gogoproto.goproto_stringer_all) = false; +option (gogoproto.goproto_enum_prefix_all) = false; +option (gogoproto.goproto_getters_all) = false; + +option (gogoproto.equal_all) = true; +option (gogoproto.verbose_equal_all) = true; +option (gogoproto.stringer_all) = true; +option (gogoproto.gostring_all) = true; +option (gogoproto.description_all) = true; + +option (gogoproto.testgen_all) = true; +option (gogoproto.populate_all) = true; +option (gogoproto.unmarshaler_all) = false; +option (gogoproto.marshaler_all) = false; +option (gogoproto.sizer_all) = true; + +option (gogoproto.goproto_enum_stringer_all) = false; +option (gogoproto.enum_stringer_all) = true; + +option (gogoproto.unsafe_marshaler_all) = false; +option (gogoproto.unsafe_unmarshaler_all) = false; + +message Subby { + string sub = 1; +} + +message SampleOneOf { + oneof test_oneof { + double Field1 = 1; + float Field2 = 2; + int32 Field3 = 3; + int64 Field4 = 4; + uint32 Field5 = 5; + uint64 Field6 = 6; + sint32 Field7 = 7; + sint64 Field8 = 8; + fixed32 Field9 = 9; + sfixed32 Field10 = 10; + fixed64 Field11 = 11; + sfixed64 Field12 = 12; + bool Field13 = 13; + string Field14 = 14; + bytes Field15 = 15; + Subby sub_message = 16; + } +} + + diff --git a/vendor/github.com/gogo/protobuf/test/oneofembed/Makefile b/vendor/github.com/gogo/protobuf/test/oneofembed/Makefile new file mode 100644 index 000000000..e1c881472 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/oneofembed/Makefile @@ -0,0 +1,34 @@ +# Go support for Protocol Buffers - Google's data interchange format +# +# Copyright 2015 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: + protoc-min-version --proto_path=../../../../../:../../protobuf/:. --version="3.0.0" --gogo_out=. *.proto + diff --git a/vendor/github.com/gogo/protobuf/test/oneofembed/oneofembed.pb.go b/vendor/github.com/gogo/protobuf/test/oneofembed/oneofembed.pb.go new file mode 100644 index 000000000..9e60eeb26 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/oneofembed/oneofembed.pb.go @@ -0,0 +1,411 @@ +// Code generated by protoc-gen-gogo. +// source: oneofembed.proto +// DO NOT EDIT! + +/* +Package proto is a generated protocol buffer package. + +It is generated from these files: + oneofembed.proto + +It has these top-level messages: + Foo + Bar +*/ +package proto + +import proto1 "github.com/gogo/protobuf/proto" +import fmt "fmt" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto1.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. +const _ = proto1.GoGoProtoPackageIsVersion1 + +type Foo struct { + *Bar `protobuf:"bytes,1,opt,name=bar,embedded=bar" json:"bar,omitempty"` +} + +func (m *Foo) Reset() { *m = Foo{} } +func (m *Foo) String() string { return proto1.CompactTextString(m) } +func (*Foo) ProtoMessage() {} +func (*Foo) Descriptor() ([]byte, []int) { return fileDescriptorOneofembed, []int{0} } + +type Bar struct { + // Types that are valid to be assigned to Pick: + // *Bar_A + // *Bar_B + Pick isBar_Pick `protobuf_oneof:"pick"` +} + +func (m *Bar) Reset() { *m = Bar{} } +func (m *Bar) String() string { return proto1.CompactTextString(m) } +func (*Bar) ProtoMessage() {} +func (*Bar) Descriptor() ([]byte, []int) { return fileDescriptorOneofembed, []int{1} } + +type isBar_Pick interface { + isBar_Pick() + Equal(interface{}) bool +} + +type Bar_A struct { + A bool `protobuf:"varint,11,opt,name=a,proto3,oneof"` +} +type Bar_B struct { + B bool `protobuf:"varint,12,opt,name=b,proto3,oneof"` +} + +func (*Bar_A) isBar_Pick() {} +func (*Bar_B) isBar_Pick() {} + +func (m *Bar) GetPick() isBar_Pick { + if m != nil { + return m.Pick + } + return nil +} + +func (m *Bar) GetA() bool { + if x, ok := m.GetPick().(*Bar_A); ok { + return x.A + } + return false +} + +func (m *Bar) GetB() bool { + if x, ok := m.GetPick().(*Bar_B); ok { + return x.B + } + return false +} + +// XXX_OneofFuncs is for the internal use of the proto package. +func (*Bar) XXX_OneofFuncs() (func(msg proto1.Message, b *proto1.Buffer) error, func(msg proto1.Message, tag, wire int, b *proto1.Buffer) (bool, error), func(msg proto1.Message) (n int), []interface{}) { + return _Bar_OneofMarshaler, _Bar_OneofUnmarshaler, _Bar_OneofSizer, []interface{}{ + (*Bar_A)(nil), + (*Bar_B)(nil), + } +} + +func _Bar_OneofMarshaler(msg proto1.Message, b *proto1.Buffer) error { + m := msg.(*Bar) + // pick + switch x := m.Pick.(type) { + case *Bar_A: + t := uint64(0) + if x.A { + t = 1 + } + _ = b.EncodeVarint(11<<3 | proto1.WireVarint) + _ = b.EncodeVarint(t) + case *Bar_B: + t := uint64(0) + if x.B { + t = 1 + } + _ = b.EncodeVarint(12<<3 | proto1.WireVarint) + _ = b.EncodeVarint(t) + case nil: + default: + return fmt.Errorf("Bar.Pick has unexpected type %T", x) + } + return nil +} + +func _Bar_OneofUnmarshaler(msg proto1.Message, tag, wire int, b *proto1.Buffer) (bool, error) { + m := msg.(*Bar) + switch tag { + case 11: // pick.a + if wire != proto1.WireVarint { + return true, proto1.ErrInternalBadWireType + } + x, err := b.DecodeVarint() + m.Pick = &Bar_A{x != 0} + return true, err + case 12: // pick.b + if wire != proto1.WireVarint { + return true, proto1.ErrInternalBadWireType + } + x, err := b.DecodeVarint() + m.Pick = &Bar_B{x != 0} + return true, err + default: + return false, nil + } +} + +func _Bar_OneofSizer(msg proto1.Message) (n int) { + m := msg.(*Bar) + // pick + switch x := m.Pick.(type) { + case *Bar_A: + n += proto1.SizeVarint(11<<3 | proto1.WireVarint) + n += 1 + case *Bar_B: + n += proto1.SizeVarint(12<<3 | proto1.WireVarint) + n += 1 + case nil: + default: + panic(fmt.Sprintf("proto: unexpected type %T in oneof", x)) + } + return n +} + +func init() { + proto1.RegisterType((*Foo)(nil), "proto.Foo") + proto1.RegisterType((*Bar)(nil), "proto.Bar") +} +func (this *Foo) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*Foo) + if !ok { + that2, ok := that.(Foo) + 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.Bar.Equal(that1.Bar) { + return false + } + return true +} +func (this *Bar) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*Bar) + if !ok { + that2, ok := that.(Bar) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + if this == nil { + return true + } + return false + } else if this == nil { + return false + } + if that1.Pick == nil { + if this.Pick != nil { + return false + } + } else if this.Pick == nil { + return false + } else if !this.Pick.Equal(that1.Pick) { + return false + } + return true +} +func (this *Bar_A) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*Bar_A) + if !ok { + that2, ok := that.(Bar_A) + 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.A != that1.A { + return false + } + return true +} +func (this *Bar_B) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*Bar_B) + if !ok { + that2, ok := that.(Bar_B) + 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.B != that1.B { + return false + } + return true +} +func NewPopulatedFoo(r randyOneofembed, easy bool) *Foo { + this := &Foo{} + if r.Intn(10) != 0 { + this.Bar = NewPopulatedBar(r, easy) + } + if !easy && r.Intn(10) != 0 { + } + return this +} + +func NewPopulatedBar(r randyOneofembed, easy bool) *Bar { + this := &Bar{} + oneofNumber_Pick := []int32{11, 12}[r.Intn(2)] + switch oneofNumber_Pick { + case 11: + this.Pick = NewPopulatedBar_A(r, easy) + case 12: + this.Pick = NewPopulatedBar_B(r, easy) + } + if !easy && r.Intn(10) != 0 { + } + return this +} + +func NewPopulatedBar_A(r randyOneofembed, easy bool) *Bar_A { + this := &Bar_A{} + this.A = bool(bool(r.Intn(2) == 0)) + return this +} +func NewPopulatedBar_B(r randyOneofembed, easy bool) *Bar_B { + this := &Bar_B{} + this.B = bool(bool(r.Intn(2) == 0)) + return this +} + +type randyOneofembed interface { + Float32() float32 + Float64() float64 + Int63() int64 + Int31() int32 + Uint32() uint32 + Intn(n int) int +} + +func randUTF8RuneOneofembed(r randyOneofembed) 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 randStringOneofembed(r randyOneofembed) string { + v1 := r.Intn(100) + tmps := make([]rune, v1) + for i := 0; i < v1; i++ { + tmps[i] = randUTF8RuneOneofembed(r) + } + return string(tmps) +} +func randUnrecognizedOneofembed(r randyOneofembed, 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 = randFieldOneofembed(data, r, fieldNumber, wire) + } + return data +} +func randFieldOneofembed(data []byte, r randyOneofembed, fieldNumber int, wire int) []byte { + key := uint32(fieldNumber)<<3 | uint32(wire) + switch wire { + case 0: + data = encodeVarintPopulateOneofembed(data, uint64(key)) + v2 := r.Int63() + if r.Intn(2) == 0 { + v2 *= -1 + } + data = encodeVarintPopulateOneofembed(data, uint64(v2)) + case 1: + data = encodeVarintPopulateOneofembed(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 = encodeVarintPopulateOneofembed(data, uint64(key)) + ll := r.Intn(100) + data = encodeVarintPopulateOneofembed(data, uint64(ll)) + for j := 0; j < ll; j++ { + data = append(data, byte(r.Intn(256))) + } + default: + data = encodeVarintPopulateOneofembed(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 encodeVarintPopulateOneofembed(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 +} + +var fileDescriptorOneofembed = []byte{ + // 167 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xe2, 0x12, 0xc8, 0xcf, 0x4b, 0xcd, + 0x4f, 0x4b, 0xcd, 0x4d, 0x4a, 0x4d, 0xd1, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x62, 0x05, 0x53, + 0x52, 0xba, 0xe9, 0x99, 0x25, 0x19, 0xa5, 0x49, 0x7a, 0xc9, 0xf9, 0xb9, 0xfa, 0xe9, 0xf9, 0xe9, + 0xf9, 0xfa, 0x60, 0xe1, 0xa4, 0xd2, 0x34, 0x30, 0x0f, 0xcc, 0x01, 0xb3, 0x20, 0xba, 0x94, 0x34, + 0xb9, 0x98, 0xdd, 0xf2, 0xf3, 0x85, 0x94, 0xb8, 0x98, 0x93, 0x12, 0x8b, 0x24, 0x18, 0x15, 0x18, + 0x35, 0xb8, 0x8d, 0xb8, 0x20, 0x72, 0x7a, 0x4e, 0x89, 0x45, 0x4e, 0x2c, 0x17, 0xee, 0xc9, 0x33, + 0x06, 0x81, 0x24, 0x95, 0x74, 0xb9, 0x98, 0x81, 0x22, 0x42, 0x7c, 0x5c, 0x8c, 0x89, 0x12, 0xdc, + 0x40, 0x85, 0x1c, 0x1e, 0x0c, 0x41, 0x8c, 0x89, 0x20, 0x7e, 0x92, 0x04, 0x0f, 0x8c, 0x9f, 0xe4, + 0xc4, 0xc6, 0xc5, 0x52, 0x90, 0x99, 0x9c, 0xed, 0xc4, 0xf3, 0xe3, 0xa1, 0x1c, 0xe3, 0x8a, 0x47, + 0x72, 0x8c, 0x3b, 0x80, 0x38, 0x89, 0x0d, 0x6c, 0xa4, 0x31, 0x20, 0x00, 0x00, 0xff, 0xff, 0x56, + 0x58, 0x05, 0x27, 0xb8, 0x00, 0x00, 0x00, +} diff --git a/vendor/github.com/gogo/protobuf/test/oneofembed/oneofembed.proto b/vendor/github.com/gogo/protobuf/test/oneofembed/oneofembed.proto new file mode 100644 index 000000000..cf8e5ed00 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/oneofembed/oneofembed.proto @@ -0,0 +1,18 @@ +syntax = "proto3"; +package proto; +import "github.com/gogo/protobuf/gogoproto/gogo.proto"; + +option (gogoproto.populate_all) = true; +option (gogoproto.equal_all) = true; +option (gogoproto.testgen_all) = true; + +message Foo { + Bar bar = 1 [(gogoproto.embed) = true]; +} + +message Bar { + oneof pick { + bool a = 11; + bool b = 12; + } +} \ No newline at end of file diff --git a/vendor/github.com/gogo/protobuf/test/oneofembed/oneofembedpb_test.go b/vendor/github.com/gogo/protobuf/test/oneofembed/oneofembedpb_test.go new file mode 100644 index 000000000..25ca293cf --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/oneofembed/oneofembedpb_test.go @@ -0,0 +1,186 @@ +// Code generated by protoc-gen-gogo. +// source: oneofembed.proto +// DO NOT EDIT! + +/* +Package proto is a generated protocol buffer package. + +It is generated from these files: + oneofembed.proto + +It has these top-level messages: + Foo + Bar +*/ +package proto + +import testing "testing" +import math_rand "math/rand" +import time "time" +import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" +import github_com_gogo_protobuf_jsonpb "github.com/gogo/protobuf/jsonpb" +import proto1 "github.com/gogo/protobuf/proto" +import fmt "fmt" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto1.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +func TestFooProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedFoo(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Foo{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestBarProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedBar(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Bar{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestFooJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedFoo(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Foo{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestBarJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedBar(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Bar{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestFooProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedFoo(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &Foo{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestFooProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedFoo(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &Foo{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestBarProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedBar(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &Bar{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestBarProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedBar(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &Bar{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +//These tests are generated by github.com/gogo/protobuf/plugin/testgen diff --git a/vendor/github.com/gogo/protobuf/test/packed/Makefile b/vendor/github.com/gogo/protobuf/test/packed/Makefile new file mode 100644 index 000000000..63c75abf3 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/packed/Makefile @@ -0,0 +1,30 @@ +# Extensions for Protocol Buffers to create more go like structures. +# +# Copyright (c) 2013, Vastech SA (PTY) LTD. 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: + (protoc --proto_path=../../../../../:../../protobuf/:. --gogo_out=. packed.proto) diff --git a/vendor/github.com/gogo/protobuf/test/packed/doc.go b/vendor/github.com/gogo/protobuf/test/packed/doc.go new file mode 100644 index 000000000..e20ab1e95 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/packed/doc.go @@ -0,0 +1 @@ +package packed diff --git a/vendor/github.com/gogo/protobuf/test/packed/packed.pb.go b/vendor/github.com/gogo/protobuf/test/packed/packed.pb.go new file mode 100644 index 000000000..f53803aec --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/packed/packed.pb.go @@ -0,0 +1,3415 @@ +// Code generated by protoc-gen-gogo. +// source: packed.proto +// DO NOT EDIT! + +/* + Package packed is a generated protocol buffer package. + + It is generated from these files: + packed.proto + + It has these top-level messages: + NinRepNative + NinRepPackedNative + NinRepNativeUnsafe + NinRepPackedNativeUnsafe +*/ +package packed + +import proto "github.com/gogo/protobuf/proto" +import fmt "fmt" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" + +import io "io" + +import unsafe "unsafe" + +// 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. +const _ = proto.GoGoProtoPackageIsVersion1 + +type NinRepNative struct { + Field1 []float64 `protobuf:"fixed64,1,rep,name=Field1,json=field1" json:"Field1,omitempty"` + Field2 []float32 `protobuf:"fixed32,2,rep,name=Field2,json=field2" json:"Field2,omitempty"` + Field3 []int32 `protobuf:"varint,3,rep,name=Field3,json=field3" json:"Field3,omitempty"` + Field4 []int64 `protobuf:"varint,4,rep,name=Field4,json=field4" json:"Field4,omitempty"` + Field5 []uint32 `protobuf:"varint,5,rep,name=Field5,json=field5" json:"Field5,omitempty"` + Field6 []uint64 `protobuf:"varint,6,rep,name=Field6,json=field6" json:"Field6,omitempty"` + Field7 []int32 `protobuf:"zigzag32,7,rep,name=Field7,json=field7" json:"Field7,omitempty"` + Field8 []int64 `protobuf:"zigzag64,8,rep,name=Field8,json=field8" json:"Field8,omitempty"` + Field9 []uint32 `protobuf:"fixed32,9,rep,name=Field9,json=field9" json:"Field9,omitempty"` + Field10 []int32 `protobuf:"fixed32,10,rep,name=Field10,json=field10" json:"Field10,omitempty"` + Field11 []uint64 `protobuf:"fixed64,11,rep,name=Field11,json=field11" json:"Field11,omitempty"` + Field12 []int64 `protobuf:"fixed64,12,rep,name=Field12,json=field12" json:"Field12,omitempty"` + Field13 []bool `protobuf:"varint,13,rep,name=Field13,json=field13" json:"Field13,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *NinRepNative) Reset() { *m = NinRepNative{} } +func (m *NinRepNative) String() string { return proto.CompactTextString(m) } +func (*NinRepNative) ProtoMessage() {} +func (*NinRepNative) Descriptor() ([]byte, []int) { return fileDescriptorPacked, []int{0} } + +func (m *NinRepNative) GetField1() []float64 { + if m != nil { + return m.Field1 + } + return nil +} + +func (m *NinRepNative) GetField2() []float32 { + if m != nil { + return m.Field2 + } + return nil +} + +func (m *NinRepNative) GetField3() []int32 { + if m != nil { + return m.Field3 + } + return nil +} + +func (m *NinRepNative) GetField4() []int64 { + if m != nil { + return m.Field4 + } + return nil +} + +func (m *NinRepNative) GetField5() []uint32 { + if m != nil { + return m.Field5 + } + return nil +} + +func (m *NinRepNative) GetField6() []uint64 { + if m != nil { + return m.Field6 + } + return nil +} + +func (m *NinRepNative) GetField7() []int32 { + if m != nil { + return m.Field7 + } + return nil +} + +func (m *NinRepNative) GetField8() []int64 { + if m != nil { + return m.Field8 + } + return nil +} + +func (m *NinRepNative) GetField9() []uint32 { + if m != nil { + return m.Field9 + } + return nil +} + +func (m *NinRepNative) GetField10() []int32 { + if m != nil { + return m.Field10 + } + return nil +} + +func (m *NinRepNative) GetField11() []uint64 { + if m != nil { + return m.Field11 + } + return nil +} + +func (m *NinRepNative) GetField12() []int64 { + if m != nil { + return m.Field12 + } + return nil +} + +func (m *NinRepNative) GetField13() []bool { + if m != nil { + return m.Field13 + } + return nil +} + +type NinRepPackedNative struct { + Field1 []float64 `protobuf:"fixed64,1,rep,packed,name=Field1,json=field1" json:"Field1,omitempty"` + Field2 []float32 `protobuf:"fixed32,2,rep,packed,name=Field2,json=field2" json:"Field2,omitempty"` + Field3 []int32 `protobuf:"varint,3,rep,packed,name=Field3,json=field3" json:"Field3,omitempty"` + Field4 []int64 `protobuf:"varint,4,rep,packed,name=Field4,json=field4" json:"Field4,omitempty"` + Field5 []uint32 `protobuf:"varint,5,rep,packed,name=Field5,json=field5" json:"Field5,omitempty"` + Field6 []uint64 `protobuf:"varint,6,rep,packed,name=Field6,json=field6" json:"Field6,omitempty"` + Field7 []int32 `protobuf:"zigzag32,7,rep,packed,name=Field7,json=field7" json:"Field7,omitempty"` + Field8 []int64 `protobuf:"zigzag64,8,rep,packed,name=Field8,json=field8" json:"Field8,omitempty"` + Field9 []uint32 `protobuf:"fixed32,9,rep,packed,name=Field9,json=field9" json:"Field9,omitempty"` + Field10 []int32 `protobuf:"fixed32,10,rep,packed,name=Field10,json=field10" json:"Field10,omitempty"` + Field11 []uint64 `protobuf:"fixed64,11,rep,packed,name=Field11,json=field11" json:"Field11,omitempty"` + Field12 []int64 `protobuf:"fixed64,12,rep,packed,name=Field12,json=field12" json:"Field12,omitempty"` + Field13 []bool `protobuf:"varint,13,rep,packed,name=Field13,json=field13" json:"Field13,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *NinRepPackedNative) Reset() { *m = NinRepPackedNative{} } +func (m *NinRepPackedNative) String() string { return proto.CompactTextString(m) } +func (*NinRepPackedNative) ProtoMessage() {} +func (*NinRepPackedNative) Descriptor() ([]byte, []int) { return fileDescriptorPacked, []int{1} } + +func (m *NinRepPackedNative) GetField1() []float64 { + if m != nil { + return m.Field1 + } + return nil +} + +func (m *NinRepPackedNative) GetField2() []float32 { + if m != nil { + return m.Field2 + } + return nil +} + +func (m *NinRepPackedNative) GetField3() []int32 { + if m != nil { + return m.Field3 + } + return nil +} + +func (m *NinRepPackedNative) GetField4() []int64 { + if m != nil { + return m.Field4 + } + return nil +} + +func (m *NinRepPackedNative) GetField5() []uint32 { + if m != nil { + return m.Field5 + } + return nil +} + +func (m *NinRepPackedNative) GetField6() []uint64 { + if m != nil { + return m.Field6 + } + return nil +} + +func (m *NinRepPackedNative) GetField7() []int32 { + if m != nil { + return m.Field7 + } + return nil +} + +func (m *NinRepPackedNative) GetField8() []int64 { + if m != nil { + return m.Field8 + } + return nil +} + +func (m *NinRepPackedNative) GetField9() []uint32 { + if m != nil { + return m.Field9 + } + return nil +} + +func (m *NinRepPackedNative) GetField10() []int32 { + if m != nil { + return m.Field10 + } + return nil +} + +func (m *NinRepPackedNative) GetField11() []uint64 { + if m != nil { + return m.Field11 + } + return nil +} + +func (m *NinRepPackedNative) GetField12() []int64 { + if m != nil { + return m.Field12 + } + return nil +} + +func (m *NinRepPackedNative) GetField13() []bool { + if m != nil { + return m.Field13 + } + return nil +} + +type NinRepNativeUnsafe struct { + Field1 []float64 `protobuf:"fixed64,1,rep,name=Field1,json=field1" json:"Field1,omitempty"` + Field2 []float32 `protobuf:"fixed32,2,rep,name=Field2,json=field2" json:"Field2,omitempty"` + Field3 []int32 `protobuf:"varint,3,rep,name=Field3,json=field3" json:"Field3,omitempty"` + Field4 []int64 `protobuf:"varint,4,rep,name=Field4,json=field4" json:"Field4,omitempty"` + Field5 []uint32 `protobuf:"varint,5,rep,name=Field5,json=field5" json:"Field5,omitempty"` + Field6 []uint64 `protobuf:"varint,6,rep,name=Field6,json=field6" json:"Field6,omitempty"` + Field7 []int32 `protobuf:"zigzag32,7,rep,name=Field7,json=field7" json:"Field7,omitempty"` + Field8 []int64 `protobuf:"zigzag64,8,rep,name=Field8,json=field8" json:"Field8,omitempty"` + Field9 []uint32 `protobuf:"fixed32,9,rep,name=Field9,json=field9" json:"Field9,omitempty"` + Field10 []int32 `protobuf:"fixed32,10,rep,name=Field10,json=field10" json:"Field10,omitempty"` + Field11 []uint64 `protobuf:"fixed64,11,rep,name=Field11,json=field11" json:"Field11,omitempty"` + Field12 []int64 `protobuf:"fixed64,12,rep,name=Field12,json=field12" json:"Field12,omitempty"` + Field13 []bool `protobuf:"varint,13,rep,name=Field13,json=field13" json:"Field13,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *NinRepNativeUnsafe) Reset() { *m = NinRepNativeUnsafe{} } +func (m *NinRepNativeUnsafe) String() string { return proto.CompactTextString(m) } +func (*NinRepNativeUnsafe) ProtoMessage() {} +func (*NinRepNativeUnsafe) Descriptor() ([]byte, []int) { return fileDescriptorPacked, []int{2} } + +func (m *NinRepNativeUnsafe) GetField1() []float64 { + if m != nil { + return m.Field1 + } + return nil +} + +func (m *NinRepNativeUnsafe) GetField2() []float32 { + if m != nil { + return m.Field2 + } + return nil +} + +func (m *NinRepNativeUnsafe) GetField3() []int32 { + if m != nil { + return m.Field3 + } + return nil +} + +func (m *NinRepNativeUnsafe) GetField4() []int64 { + if m != nil { + return m.Field4 + } + return nil +} + +func (m *NinRepNativeUnsafe) GetField5() []uint32 { + if m != nil { + return m.Field5 + } + return nil +} + +func (m *NinRepNativeUnsafe) GetField6() []uint64 { + if m != nil { + return m.Field6 + } + return nil +} + +func (m *NinRepNativeUnsafe) GetField7() []int32 { + if m != nil { + return m.Field7 + } + return nil +} + +func (m *NinRepNativeUnsafe) GetField8() []int64 { + if m != nil { + return m.Field8 + } + return nil +} + +func (m *NinRepNativeUnsafe) GetField9() []uint32 { + if m != nil { + return m.Field9 + } + return nil +} + +func (m *NinRepNativeUnsafe) GetField10() []int32 { + if m != nil { + return m.Field10 + } + return nil +} + +func (m *NinRepNativeUnsafe) GetField11() []uint64 { + if m != nil { + return m.Field11 + } + return nil +} + +func (m *NinRepNativeUnsafe) GetField12() []int64 { + if m != nil { + return m.Field12 + } + return nil +} + +func (m *NinRepNativeUnsafe) GetField13() []bool { + if m != nil { + return m.Field13 + } + return nil +} + +type NinRepPackedNativeUnsafe struct { + Field1 []float64 `protobuf:"fixed64,1,rep,packed,name=Field1,json=field1" json:"Field1,omitempty"` + Field2 []float32 `protobuf:"fixed32,2,rep,packed,name=Field2,json=field2" json:"Field2,omitempty"` + Field3 []int32 `protobuf:"varint,3,rep,packed,name=Field3,json=field3" json:"Field3,omitempty"` + Field4 []int64 `protobuf:"varint,4,rep,packed,name=Field4,json=field4" json:"Field4,omitempty"` + Field5 []uint32 `protobuf:"varint,5,rep,packed,name=Field5,json=field5" json:"Field5,omitempty"` + Field6 []uint64 `protobuf:"varint,6,rep,packed,name=Field6,json=field6" json:"Field6,omitempty"` + Field7 []int32 `protobuf:"zigzag32,7,rep,packed,name=Field7,json=field7" json:"Field7,omitempty"` + Field8 []int64 `protobuf:"zigzag64,8,rep,packed,name=Field8,json=field8" json:"Field8,omitempty"` + Field9 []uint32 `protobuf:"fixed32,9,rep,packed,name=Field9,json=field9" json:"Field9,omitempty"` + Field10 []int32 `protobuf:"fixed32,10,rep,packed,name=Field10,json=field10" json:"Field10,omitempty"` + Field11 []uint64 `protobuf:"fixed64,11,rep,packed,name=Field11,json=field11" json:"Field11,omitempty"` + Field12 []int64 `protobuf:"fixed64,12,rep,packed,name=Field12,json=field12" json:"Field12,omitempty"` + Field13 []bool `protobuf:"varint,13,rep,packed,name=Field13,json=field13" json:"Field13,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *NinRepPackedNativeUnsafe) Reset() { *m = NinRepPackedNativeUnsafe{} } +func (m *NinRepPackedNativeUnsafe) String() string { return proto.CompactTextString(m) } +func (*NinRepPackedNativeUnsafe) ProtoMessage() {} +func (*NinRepPackedNativeUnsafe) Descriptor() ([]byte, []int) { return fileDescriptorPacked, []int{3} } + +func (m *NinRepPackedNativeUnsafe) GetField1() []float64 { + if m != nil { + return m.Field1 + } + return nil +} + +func (m *NinRepPackedNativeUnsafe) GetField2() []float32 { + if m != nil { + return m.Field2 + } + return nil +} + +func (m *NinRepPackedNativeUnsafe) GetField3() []int32 { + if m != nil { + return m.Field3 + } + return nil +} + +func (m *NinRepPackedNativeUnsafe) GetField4() []int64 { + if m != nil { + return m.Field4 + } + return nil +} + +func (m *NinRepPackedNativeUnsafe) GetField5() []uint32 { + if m != nil { + return m.Field5 + } + return nil +} + +func (m *NinRepPackedNativeUnsafe) GetField6() []uint64 { + if m != nil { + return m.Field6 + } + return nil +} + +func (m *NinRepPackedNativeUnsafe) GetField7() []int32 { + if m != nil { + return m.Field7 + } + return nil +} + +func (m *NinRepPackedNativeUnsafe) GetField8() []int64 { + if m != nil { + return m.Field8 + } + return nil +} + +func (m *NinRepPackedNativeUnsafe) GetField9() []uint32 { + if m != nil { + return m.Field9 + } + return nil +} + +func (m *NinRepPackedNativeUnsafe) GetField10() []int32 { + if m != nil { + return m.Field10 + } + return nil +} + +func (m *NinRepPackedNativeUnsafe) GetField11() []uint64 { + if m != nil { + return m.Field11 + } + return nil +} + +func (m *NinRepPackedNativeUnsafe) GetField12() []int64 { + if m != nil { + return m.Field12 + } + return nil +} + +func (m *NinRepPackedNativeUnsafe) GetField13() []bool { + if m != nil { + return m.Field13 + } + return nil +} + +func init() { + proto.RegisterType((*NinRepNative)(nil), "packed.NinRepNative") + proto.RegisterType((*NinRepPackedNative)(nil), "packed.NinRepPackedNative") + proto.RegisterType((*NinRepNativeUnsafe)(nil), "packed.NinRepNativeUnsafe") + proto.RegisterType((*NinRepPackedNativeUnsafe)(nil), "packed.NinRepPackedNativeUnsafe") +} +func NewPopulatedNinRepNative(r randyPacked, easy bool) *NinRepNative { + this := &NinRepNative{} + if r.Intn(10) != 0 { + v1 := r.Intn(10) + this.Field1 = make([]float64, v1) + for i := 0; i < v1; i++ { + this.Field1[i] = float64(r.Float64()) + if r.Intn(2) == 0 { + this.Field1[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v2 := r.Intn(10) + this.Field2 = make([]float32, v2) + for i := 0; i < v2; i++ { + this.Field2[i] = float32(r.Float32()) + if r.Intn(2) == 0 { + this.Field2[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v3 := r.Intn(10) + this.Field3 = make([]int32, v3) + for i := 0; i < v3; i++ { + this.Field3[i] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Field3[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v4 := r.Intn(10) + this.Field4 = make([]int64, v4) + for i := 0; i < v4; i++ { + this.Field4[i] = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Field4[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v5 := r.Intn(10) + this.Field5 = make([]uint32, v5) + for i := 0; i < v5; i++ { + this.Field5[i] = uint32(r.Uint32()) + } + } + if r.Intn(10) != 0 { + v6 := r.Intn(10) + this.Field6 = make([]uint64, v6) + for i := 0; i < v6; i++ { + this.Field6[i] = uint64(uint64(r.Uint32())) + } + } + if r.Intn(10) != 0 { + v7 := r.Intn(10) + this.Field7 = make([]int32, v7) + for i := 0; i < v7; i++ { + this.Field7[i] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Field7[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v8 := r.Intn(10) + this.Field8 = make([]int64, v8) + for i := 0; i < v8; i++ { + this.Field8[i] = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Field8[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v9 := r.Intn(10) + this.Field9 = make([]uint32, v9) + for i := 0; i < v9; i++ { + this.Field9[i] = uint32(r.Uint32()) + } + } + if r.Intn(10) != 0 { + v10 := r.Intn(10) + this.Field10 = make([]int32, v10) + for i := 0; i < v10; i++ { + this.Field10[i] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Field10[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v11 := r.Intn(10) + this.Field11 = make([]uint64, v11) + for i := 0; i < v11; i++ { + this.Field11[i] = uint64(uint64(r.Uint32())) + } + } + if r.Intn(10) != 0 { + v12 := r.Intn(10) + this.Field12 = make([]int64, v12) + for i := 0; i < v12; i++ { + this.Field12[i] = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Field12[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v13 := r.Intn(10) + this.Field13 = make([]bool, v13) + for i := 0; i < v13; i++ { + this.Field13[i] = bool(bool(r.Intn(2) == 0)) + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedPacked(r, 14) + } + return this +} + +func NewPopulatedNinRepPackedNative(r randyPacked, easy bool) *NinRepPackedNative { + this := &NinRepPackedNative{} + if r.Intn(10) != 0 { + v14 := r.Intn(10) + this.Field1 = make([]float64, v14) + for i := 0; i < v14; i++ { + this.Field1[i] = float64(r.Float64()) + if r.Intn(2) == 0 { + this.Field1[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v15 := r.Intn(10) + this.Field2 = make([]float32, v15) + for i := 0; i < v15; i++ { + this.Field2[i] = float32(r.Float32()) + if r.Intn(2) == 0 { + this.Field2[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v16 := r.Intn(10) + this.Field3 = make([]int32, v16) + for i := 0; i < v16; i++ { + this.Field3[i] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Field3[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v17 := r.Intn(10) + this.Field4 = make([]int64, v17) + for i := 0; i < v17; i++ { + this.Field4[i] = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Field4[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v18 := r.Intn(10) + this.Field5 = make([]uint32, v18) + for i := 0; i < v18; i++ { + this.Field5[i] = uint32(r.Uint32()) + } + } + if r.Intn(10) != 0 { + v19 := r.Intn(10) + this.Field6 = make([]uint64, v19) + for i := 0; i < v19; i++ { + this.Field6[i] = uint64(uint64(r.Uint32())) + } + } + if r.Intn(10) != 0 { + v20 := r.Intn(10) + this.Field7 = make([]int32, v20) + for i := 0; i < v20; i++ { + this.Field7[i] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Field7[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v21 := r.Intn(10) + this.Field8 = make([]int64, v21) + for i := 0; i < v21; i++ { + this.Field8[i] = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Field8[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v22 := r.Intn(10) + this.Field9 = make([]uint32, v22) + for i := 0; i < v22; i++ { + this.Field9[i] = uint32(r.Uint32()) + } + } + if r.Intn(10) != 0 { + v23 := r.Intn(10) + this.Field10 = make([]int32, v23) + for i := 0; i < v23; i++ { + this.Field10[i] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Field10[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v24 := r.Intn(10) + this.Field11 = make([]uint64, v24) + for i := 0; i < v24; i++ { + this.Field11[i] = uint64(uint64(r.Uint32())) + } + } + if r.Intn(10) != 0 { + v25 := r.Intn(10) + this.Field12 = make([]int64, v25) + for i := 0; i < v25; i++ { + this.Field12[i] = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Field12[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v26 := r.Intn(10) + this.Field13 = make([]bool, v26) + for i := 0; i < v26; i++ { + this.Field13[i] = bool(bool(r.Intn(2) == 0)) + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedPacked(r, 14) + } + return this +} + +func NewPopulatedNinRepNativeUnsafe(r randyPacked, easy bool) *NinRepNativeUnsafe { + this := &NinRepNativeUnsafe{} + if r.Intn(10) != 0 { + v27 := r.Intn(10) + this.Field1 = make([]float64, v27) + for i := 0; i < v27; i++ { + this.Field1[i] = float64(r.Float64()) + if r.Intn(2) == 0 { + this.Field1[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v28 := r.Intn(10) + this.Field2 = make([]float32, v28) + for i := 0; i < v28; i++ { + this.Field2[i] = float32(r.Float32()) + if r.Intn(2) == 0 { + this.Field2[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v29 := r.Intn(10) + this.Field3 = make([]int32, v29) + for i := 0; i < v29; i++ { + this.Field3[i] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Field3[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v30 := r.Intn(10) + this.Field4 = make([]int64, v30) + for i := 0; i < v30; i++ { + this.Field4[i] = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Field4[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v31 := r.Intn(10) + this.Field5 = make([]uint32, v31) + for i := 0; i < v31; i++ { + this.Field5[i] = uint32(r.Uint32()) + } + } + if r.Intn(10) != 0 { + v32 := r.Intn(10) + this.Field6 = make([]uint64, v32) + for i := 0; i < v32; i++ { + this.Field6[i] = uint64(uint64(r.Uint32())) + } + } + if r.Intn(10) != 0 { + v33 := r.Intn(10) + this.Field7 = make([]int32, v33) + for i := 0; i < v33; i++ { + this.Field7[i] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Field7[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v34 := r.Intn(10) + this.Field8 = make([]int64, v34) + for i := 0; i < v34; i++ { + this.Field8[i] = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Field8[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v35 := r.Intn(10) + this.Field9 = make([]uint32, v35) + for i := 0; i < v35; i++ { + this.Field9[i] = uint32(r.Uint32()) + } + } + if r.Intn(10) != 0 { + v36 := r.Intn(10) + this.Field10 = make([]int32, v36) + for i := 0; i < v36; i++ { + this.Field10[i] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Field10[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v37 := r.Intn(10) + this.Field11 = make([]uint64, v37) + for i := 0; i < v37; i++ { + this.Field11[i] = uint64(uint64(r.Uint32())) + } + } + if r.Intn(10) != 0 { + v38 := r.Intn(10) + this.Field12 = make([]int64, v38) + for i := 0; i < v38; i++ { + this.Field12[i] = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Field12[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v39 := r.Intn(10) + this.Field13 = make([]bool, v39) + for i := 0; i < v39; i++ { + this.Field13[i] = bool(bool(r.Intn(2) == 0)) + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedPacked(r, 14) + } + return this +} + +func NewPopulatedNinRepPackedNativeUnsafe(r randyPacked, easy bool) *NinRepPackedNativeUnsafe { + this := &NinRepPackedNativeUnsafe{} + if r.Intn(10) != 0 { + v40 := r.Intn(10) + this.Field1 = make([]float64, v40) + for i := 0; i < v40; i++ { + this.Field1[i] = float64(r.Float64()) + if r.Intn(2) == 0 { + this.Field1[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v41 := r.Intn(10) + this.Field2 = make([]float32, v41) + for i := 0; i < v41; i++ { + this.Field2[i] = float32(r.Float32()) + if r.Intn(2) == 0 { + this.Field2[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v42 := r.Intn(10) + this.Field3 = make([]int32, v42) + for i := 0; i < v42; i++ { + this.Field3[i] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Field3[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v43 := r.Intn(10) + this.Field4 = make([]int64, v43) + for i := 0; i < v43; i++ { + this.Field4[i] = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Field4[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v44 := r.Intn(10) + this.Field5 = make([]uint32, v44) + for i := 0; i < v44; i++ { + this.Field5[i] = uint32(r.Uint32()) + } + } + if r.Intn(10) != 0 { + v45 := r.Intn(10) + this.Field6 = make([]uint64, v45) + for i := 0; i < v45; i++ { + this.Field6[i] = uint64(uint64(r.Uint32())) + } + } + if r.Intn(10) != 0 { + v46 := r.Intn(10) + this.Field7 = make([]int32, v46) + for i := 0; i < v46; i++ { + this.Field7[i] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Field7[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v47 := r.Intn(10) + this.Field8 = make([]int64, v47) + for i := 0; i < v47; i++ { + this.Field8[i] = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Field8[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v48 := r.Intn(10) + this.Field9 = make([]uint32, v48) + for i := 0; i < v48; i++ { + this.Field9[i] = uint32(r.Uint32()) + } + } + if r.Intn(10) != 0 { + v49 := r.Intn(10) + this.Field10 = make([]int32, v49) + for i := 0; i < v49; i++ { + this.Field10[i] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Field10[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v50 := r.Intn(10) + this.Field11 = make([]uint64, v50) + for i := 0; i < v50; i++ { + this.Field11[i] = uint64(uint64(r.Uint32())) + } + } + if r.Intn(10) != 0 { + v51 := r.Intn(10) + this.Field12 = make([]int64, v51) + for i := 0; i < v51; i++ { + this.Field12[i] = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Field12[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v52 := r.Intn(10) + this.Field13 = make([]bool, v52) + for i := 0; i < v52; i++ { + this.Field13[i] = bool(bool(r.Intn(2) == 0)) + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedPacked(r, 14) + } + return this +} + +type randyPacked interface { + Float32() float32 + Float64() float64 + Int63() int64 + Int31() int32 + Uint32() uint32 + Intn(n int) int +} + +func randUTF8RunePacked(r randyPacked) 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 randStringPacked(r randyPacked) string { + v53 := r.Intn(100) + tmps := make([]rune, v53) + for i := 0; i < v53; i++ { + tmps[i] = randUTF8RunePacked(r) + } + return string(tmps) +} +func randUnrecognizedPacked(r randyPacked, 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 = randFieldPacked(data, r, fieldNumber, wire) + } + return data +} +func randFieldPacked(data []byte, r randyPacked, fieldNumber int, wire int) []byte { + key := uint32(fieldNumber)<<3 | uint32(wire) + switch wire { + case 0: + data = encodeVarintPopulatePacked(data, uint64(key)) + v54 := r.Int63() + if r.Intn(2) == 0 { + v54 *= -1 + } + data = encodeVarintPopulatePacked(data, uint64(v54)) + case 1: + data = encodeVarintPopulatePacked(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 = encodeVarintPopulatePacked(data, uint64(key)) + ll := r.Intn(100) + data = encodeVarintPopulatePacked(data, uint64(ll)) + for j := 0; j < ll; j++ { + data = append(data, byte(r.Intn(256))) + } + default: + data = encodeVarintPopulatePacked(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 encodeVarintPopulatePacked(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 *NinRepNative) 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 ErrIntOverflowPacked + } + 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: NinRepNative: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: NinRepNative: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field Field1", 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.Field1 = append(m.Field1, v2) + case 2: + if wireType != 5 { + return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType) + } + var v uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + iNdEx += 4 + v = uint32(data[iNdEx-4]) + v |= uint32(data[iNdEx-3]) << 8 + v |= uint32(data[iNdEx-2]) << 16 + v |= uint32(data[iNdEx-1]) << 24 + v2 := float32(math.Float32frombits(v)) + m.Field2 = append(m.Field2, v2) + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field3", wireType) + } + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPacked + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field3 = append(m.Field3, v) + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field4", wireType) + } + var v int64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPacked + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field4 = append(m.Field4, v) + case 5: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field5", wireType) + } + var v uint32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPacked + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (uint32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field5 = append(m.Field5, v) + case 6: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field6", wireType) + } + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPacked + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field6 = append(m.Field6, v) + case 7: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field7", wireType) + } + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPacked + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + v = int32((uint32(v) >> 1) ^ uint32(((v&1)<<31)>>31)) + m.Field7 = append(m.Field7, v) + case 8: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field8", wireType) + } + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPacked + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + v = (v >> 1) ^ uint64((int64(v&1)<<63)>>63) + m.Field8 = append(m.Field8, int64(v)) + case 9: + if wireType != 5 { + return fmt.Errorf("proto: wrong wireType = %d for field Field9", wireType) + } + var v uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + iNdEx += 4 + v = uint32(data[iNdEx-4]) + v |= uint32(data[iNdEx-3]) << 8 + v |= uint32(data[iNdEx-2]) << 16 + v |= uint32(data[iNdEx-1]) << 24 + m.Field9 = append(m.Field9, v) + case 10: + if wireType != 5 { + return fmt.Errorf("proto: wrong wireType = %d for field Field10", wireType) + } + var v int32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + iNdEx += 4 + v = int32(data[iNdEx-4]) + v |= int32(data[iNdEx-3]) << 8 + v |= int32(data[iNdEx-2]) << 16 + v |= int32(data[iNdEx-1]) << 24 + m.Field10 = append(m.Field10, v) + case 11: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field Field11", 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.Field11 = append(m.Field11, v) + case 12: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field Field12", wireType) + } + var v int64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + iNdEx += 8 + v = int64(data[iNdEx-8]) + v |= int64(data[iNdEx-7]) << 8 + v |= int64(data[iNdEx-6]) << 16 + v |= int64(data[iNdEx-5]) << 24 + v |= int64(data[iNdEx-4]) << 32 + v |= int64(data[iNdEx-3]) << 40 + v |= int64(data[iNdEx-2]) << 48 + v |= int64(data[iNdEx-1]) << 56 + m.Field12 = append(m.Field12, v) + case 13: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field13", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPacked + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field13 = append(m.Field13, bool(v != 0)) + default: + iNdEx = preIndex + skippy, err := skipPacked(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthPacked + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *NinRepPackedNative) 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 ErrIntOverflowPacked + } + 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: NinRepPackedNative: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: NinRepPackedNative: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPacked + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthPacked + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + for iNdEx < postIndex { + 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.Field1 = append(m.Field1, v2) + } + } else if wireType == 1 { + 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.Field1 = append(m.Field1, v2) + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) + } + case 2: + if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPacked + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthPacked + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + for iNdEx < postIndex { + var v uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + iNdEx += 4 + v = uint32(data[iNdEx-4]) + v |= uint32(data[iNdEx-3]) << 8 + v |= uint32(data[iNdEx-2]) << 16 + v |= uint32(data[iNdEx-1]) << 24 + v2 := float32(math.Float32frombits(v)) + m.Field2 = append(m.Field2, v2) + } + } else if wireType == 5 { + var v uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + iNdEx += 4 + v = uint32(data[iNdEx-4]) + v |= uint32(data[iNdEx-3]) << 8 + v |= uint32(data[iNdEx-2]) << 16 + v |= uint32(data[iNdEx-1]) << 24 + v2 := float32(math.Float32frombits(v)) + m.Field2 = append(m.Field2, v2) + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType) + } + case 3: + if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPacked + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthPacked + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + for iNdEx < postIndex { + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPacked + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field3 = append(m.Field3, v) + } + } else if wireType == 0 { + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPacked + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field3 = append(m.Field3, v) + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field3", wireType) + } + case 4: + if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPacked + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthPacked + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + for iNdEx < postIndex { + var v int64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPacked + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field4 = append(m.Field4, v) + } + } else if wireType == 0 { + var v int64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPacked + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field4 = append(m.Field4, v) + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field4", wireType) + } + case 5: + if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPacked + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthPacked + } + 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 ErrIntOverflowPacked + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (uint32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field5 = append(m.Field5, v) + } + } else if wireType == 0 { + var v uint32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPacked + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (uint32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field5 = append(m.Field5, v) + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field5", wireType) + } + case 6: + if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPacked + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthPacked + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + for iNdEx < postIndex { + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPacked + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field6 = append(m.Field6, v) + } + } else if wireType == 0 { + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPacked + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field6 = append(m.Field6, v) + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field6", wireType) + } + case 7: + if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPacked + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthPacked + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + for iNdEx < postIndex { + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPacked + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + v = int32((uint32(v) >> 1) ^ uint32(((v&1)<<31)>>31)) + m.Field7 = append(m.Field7, v) + } + } else if wireType == 0 { + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPacked + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + v = int32((uint32(v) >> 1) ^ uint32(((v&1)<<31)>>31)) + m.Field7 = append(m.Field7, v) + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field7", wireType) + } + case 8: + if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPacked + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthPacked + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + for iNdEx < postIndex { + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPacked + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + v = (v >> 1) ^ uint64((int64(v&1)<<63)>>63) + m.Field8 = append(m.Field8, int64(v)) + } + } else if wireType == 0 { + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPacked + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + v = (v >> 1) ^ uint64((int64(v&1)<<63)>>63) + m.Field8 = append(m.Field8, int64(v)) + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field8", wireType) + } + case 9: + if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPacked + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthPacked + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + for iNdEx < postIndex { + var v uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + iNdEx += 4 + v = uint32(data[iNdEx-4]) + v |= uint32(data[iNdEx-3]) << 8 + v |= uint32(data[iNdEx-2]) << 16 + v |= uint32(data[iNdEx-1]) << 24 + m.Field9 = append(m.Field9, v) + } + } else if wireType == 5 { + var v uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + iNdEx += 4 + v = uint32(data[iNdEx-4]) + v |= uint32(data[iNdEx-3]) << 8 + v |= uint32(data[iNdEx-2]) << 16 + v |= uint32(data[iNdEx-1]) << 24 + m.Field9 = append(m.Field9, v) + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field9", wireType) + } + case 10: + if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPacked + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthPacked + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + for iNdEx < postIndex { + var v int32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + iNdEx += 4 + v = int32(data[iNdEx-4]) + v |= int32(data[iNdEx-3]) << 8 + v |= int32(data[iNdEx-2]) << 16 + v |= int32(data[iNdEx-1]) << 24 + m.Field10 = append(m.Field10, v) + } + } else if wireType == 5 { + var v int32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + iNdEx += 4 + v = int32(data[iNdEx-4]) + v |= int32(data[iNdEx-3]) << 8 + v |= int32(data[iNdEx-2]) << 16 + v |= int32(data[iNdEx-1]) << 24 + m.Field10 = append(m.Field10, v) + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field10", wireType) + } + case 11: + if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPacked + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthPacked + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + for iNdEx < postIndex { + 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.Field11 = append(m.Field11, v) + } + } else if wireType == 1 { + 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.Field11 = append(m.Field11, v) + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field11", wireType) + } + case 12: + if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPacked + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthPacked + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + for iNdEx < postIndex { + var v int64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + iNdEx += 8 + v = int64(data[iNdEx-8]) + v |= int64(data[iNdEx-7]) << 8 + v |= int64(data[iNdEx-6]) << 16 + v |= int64(data[iNdEx-5]) << 24 + v |= int64(data[iNdEx-4]) << 32 + v |= int64(data[iNdEx-3]) << 40 + v |= int64(data[iNdEx-2]) << 48 + v |= int64(data[iNdEx-1]) << 56 + m.Field12 = append(m.Field12, v) + } + } else if wireType == 1 { + var v int64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + iNdEx += 8 + v = int64(data[iNdEx-8]) + v |= int64(data[iNdEx-7]) << 8 + v |= int64(data[iNdEx-6]) << 16 + v |= int64(data[iNdEx-5]) << 24 + v |= int64(data[iNdEx-4]) << 32 + v |= int64(data[iNdEx-3]) << 40 + v |= int64(data[iNdEx-2]) << 48 + v |= int64(data[iNdEx-1]) << 56 + m.Field12 = append(m.Field12, v) + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field12", wireType) + } + case 13: + if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPacked + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthPacked + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + for iNdEx < postIndex { + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPacked + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field13 = append(m.Field13, bool(v != 0)) + } + } else if wireType == 0 { + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPacked + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field13 = append(m.Field13, bool(v != 0)) + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field13", wireType) + } + default: + iNdEx = preIndex + skippy, err := skipPacked(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthPacked + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipPacked(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, ErrIntOverflowPacked + } + 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, ErrIntOverflowPacked + } + 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, ErrIntOverflowPacked + } + 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, ErrInvalidLengthPacked + } + return iNdEx, nil + case 3: + for { + var innerWire uint64 + var start int = iNdEx + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowPacked + } + 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 := skipPacked(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 ( + ErrInvalidLengthPacked = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowPacked = fmt.Errorf("proto: integer overflow") +) + +func (m *NinRepNativeUnsafe) 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 ErrIntOverflowPackedUnsafe + } + 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: NinRepNativeUnsafe: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: NinRepNativeUnsafe: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) + } + var v float64 + if iNdEx+8 > l { + return io.ErrUnexpectedEOF + } + v = *(*float64)(unsafe.Pointer(&data[iNdEx])) + iNdEx += 8 + m.Field1 = append(m.Field1, v) + case 2: + if wireType != 5 { + return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType) + } + var v float32 + if iNdEx+4 > l { + return io.ErrUnexpectedEOF + } + v = *(*float32)(unsafe.Pointer(&data[iNdEx])) + iNdEx += 4 + m.Field2 = append(m.Field2, v) + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field3", wireType) + } + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPackedUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field3 = append(m.Field3, v) + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field4", wireType) + } + var v int64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPackedUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field4 = append(m.Field4, v) + case 5: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field5", wireType) + } + var v uint32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPackedUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (uint32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field5 = append(m.Field5, v) + case 6: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field6", wireType) + } + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPackedUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field6 = append(m.Field6, v) + case 7: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field7", wireType) + } + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPackedUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + v = int32((uint32(v) >> 1) ^ uint32(((v&1)<<31)>>31)) + m.Field7 = append(m.Field7, v) + case 8: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field8", wireType) + } + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPackedUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + v = (v >> 1) ^ uint64((int64(v&1)<<63)>>63) + m.Field8 = append(m.Field8, int64(v)) + case 9: + if wireType != 5 { + return fmt.Errorf("proto: wrong wireType = %d for field Field9", wireType) + } + var v uint32 + if iNdEx+4 > l { + return io.ErrUnexpectedEOF + } + v = *(*uint32)(unsafe.Pointer(&data[iNdEx])) + iNdEx += 4 + m.Field9 = append(m.Field9, v) + case 10: + if wireType != 5 { + return fmt.Errorf("proto: wrong wireType = %d for field Field10", wireType) + } + var v int32 + if iNdEx+4 > l { + return io.ErrUnexpectedEOF + } + v = *(*int32)(unsafe.Pointer(&data[iNdEx])) + iNdEx += 4 + m.Field10 = append(m.Field10, v) + case 11: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field Field11", wireType) + } + var v uint64 + if iNdEx+8 > l { + return io.ErrUnexpectedEOF + } + v = *(*uint64)(unsafe.Pointer(&data[iNdEx])) + iNdEx += 8 + m.Field11 = append(m.Field11, v) + case 12: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field Field12", wireType) + } + var v int64 + if iNdEx+8 > l { + return io.ErrUnexpectedEOF + } + v = *(*int64)(unsafe.Pointer(&data[iNdEx])) + iNdEx += 8 + m.Field12 = append(m.Field12, v) + case 13: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field13", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPackedUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field13 = append(m.Field13, bool(v != 0)) + default: + iNdEx = preIndex + skippy, err := skipPackedUnsafe(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthPackedUnsafe + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *NinRepPackedNativeUnsafe) 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 ErrIntOverflowPackedUnsafe + } + 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: NinRepPackedNativeUnsafe: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: NinRepPackedNativeUnsafe: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPackedUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthPackedUnsafe + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + for iNdEx < postIndex { + var v float64 + if iNdEx+8 > l { + return io.ErrUnexpectedEOF + } + v = *(*float64)(unsafe.Pointer(&data[iNdEx])) + iNdEx += 8 + m.Field1 = append(m.Field1, v) + } + } else if wireType == 1 { + var v float64 + if iNdEx+8 > l { + return io.ErrUnexpectedEOF + } + v = *(*float64)(unsafe.Pointer(&data[iNdEx])) + iNdEx += 8 + m.Field1 = append(m.Field1, v) + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) + } + case 2: + if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPackedUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthPackedUnsafe + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + for iNdEx < postIndex { + var v float32 + if iNdEx+4 > l { + return io.ErrUnexpectedEOF + } + v = *(*float32)(unsafe.Pointer(&data[iNdEx])) + iNdEx += 4 + m.Field2 = append(m.Field2, v) + } + } else if wireType == 5 { + var v float32 + if iNdEx+4 > l { + return io.ErrUnexpectedEOF + } + v = *(*float32)(unsafe.Pointer(&data[iNdEx])) + iNdEx += 4 + m.Field2 = append(m.Field2, v) + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType) + } + case 3: + if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPackedUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthPackedUnsafe + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + for iNdEx < postIndex { + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPackedUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field3 = append(m.Field3, v) + } + } else if wireType == 0 { + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPackedUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field3 = append(m.Field3, v) + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field3", wireType) + } + case 4: + if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPackedUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthPackedUnsafe + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + for iNdEx < postIndex { + var v int64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPackedUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field4 = append(m.Field4, v) + } + } else if wireType == 0 { + var v int64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPackedUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field4 = append(m.Field4, v) + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field4", wireType) + } + case 5: + if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPackedUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthPackedUnsafe + } + 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 ErrIntOverflowPackedUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (uint32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field5 = append(m.Field5, v) + } + } else if wireType == 0 { + var v uint32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPackedUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (uint32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field5 = append(m.Field5, v) + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field5", wireType) + } + case 6: + if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPackedUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthPackedUnsafe + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + for iNdEx < postIndex { + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPackedUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field6 = append(m.Field6, v) + } + } else if wireType == 0 { + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPackedUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field6 = append(m.Field6, v) + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field6", wireType) + } + case 7: + if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPackedUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthPackedUnsafe + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + for iNdEx < postIndex { + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPackedUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + v = int32((uint32(v) >> 1) ^ uint32(((v&1)<<31)>>31)) + m.Field7 = append(m.Field7, v) + } + } else if wireType == 0 { + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPackedUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + v = int32((uint32(v) >> 1) ^ uint32(((v&1)<<31)>>31)) + m.Field7 = append(m.Field7, v) + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field7", wireType) + } + case 8: + if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPackedUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthPackedUnsafe + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + for iNdEx < postIndex { + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPackedUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + v = (v >> 1) ^ uint64((int64(v&1)<<63)>>63) + m.Field8 = append(m.Field8, int64(v)) + } + } else if wireType == 0 { + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPackedUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + v = (v >> 1) ^ uint64((int64(v&1)<<63)>>63) + m.Field8 = append(m.Field8, int64(v)) + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field8", wireType) + } + case 9: + if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPackedUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthPackedUnsafe + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + for iNdEx < postIndex { + var v uint32 + if iNdEx+4 > l { + return io.ErrUnexpectedEOF + } + v = *(*uint32)(unsafe.Pointer(&data[iNdEx])) + iNdEx += 4 + m.Field9 = append(m.Field9, v) + } + } else if wireType == 5 { + var v uint32 + if iNdEx+4 > l { + return io.ErrUnexpectedEOF + } + v = *(*uint32)(unsafe.Pointer(&data[iNdEx])) + iNdEx += 4 + m.Field9 = append(m.Field9, v) + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field9", wireType) + } + case 10: + if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPackedUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthPackedUnsafe + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + for iNdEx < postIndex { + var v int32 + if iNdEx+4 > l { + return io.ErrUnexpectedEOF + } + v = *(*int32)(unsafe.Pointer(&data[iNdEx])) + iNdEx += 4 + m.Field10 = append(m.Field10, v) + } + } else if wireType == 5 { + var v int32 + if iNdEx+4 > l { + return io.ErrUnexpectedEOF + } + v = *(*int32)(unsafe.Pointer(&data[iNdEx])) + iNdEx += 4 + m.Field10 = append(m.Field10, v) + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field10", wireType) + } + case 11: + if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPackedUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthPackedUnsafe + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + for iNdEx < postIndex { + var v uint64 + if iNdEx+8 > l { + return io.ErrUnexpectedEOF + } + v = *(*uint64)(unsafe.Pointer(&data[iNdEx])) + iNdEx += 8 + m.Field11 = append(m.Field11, v) + } + } else if wireType == 1 { + var v uint64 + if iNdEx+8 > l { + return io.ErrUnexpectedEOF + } + v = *(*uint64)(unsafe.Pointer(&data[iNdEx])) + iNdEx += 8 + m.Field11 = append(m.Field11, v) + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field11", wireType) + } + case 12: + if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPackedUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthPackedUnsafe + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + for iNdEx < postIndex { + var v int64 + if iNdEx+8 > l { + return io.ErrUnexpectedEOF + } + v = *(*int64)(unsafe.Pointer(&data[iNdEx])) + iNdEx += 8 + m.Field12 = append(m.Field12, v) + } + } else if wireType == 1 { + var v int64 + if iNdEx+8 > l { + return io.ErrUnexpectedEOF + } + v = *(*int64)(unsafe.Pointer(&data[iNdEx])) + iNdEx += 8 + m.Field12 = append(m.Field12, v) + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field12", wireType) + } + case 13: + if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPackedUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthPackedUnsafe + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + for iNdEx < postIndex { + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPackedUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field13 = append(m.Field13, bool(v != 0)) + } + } else if wireType == 0 { + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPackedUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field13 = append(m.Field13, bool(v != 0)) + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field13", wireType) + } + default: + iNdEx = preIndex + skippy, err := skipPackedUnsafe(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthPackedUnsafe + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipPackedUnsafe(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, ErrIntOverflowPackedUnsafe + } + 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, ErrIntOverflowPackedUnsafe + } + 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, ErrIntOverflowPackedUnsafe + } + 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, ErrInvalidLengthPackedUnsafe + } + return iNdEx, nil + case 3: + for { + var innerWire uint64 + var start int = iNdEx + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowPackedUnsafe + } + 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 := skipPackedUnsafe(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 ( + ErrInvalidLengthPackedUnsafe = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowPackedUnsafe = fmt.Errorf("proto: integer overflow") +) + +var fileDescriptorPacked = []byte{ + // 383 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xec, 0x92, 0xbd, 0x4e, 0xc2, 0x50, + 0x14, 0xc7, 0xd3, 0x0f, 0x5a, 0xbc, 0x42, 0xc4, 0x0e, 0xe6, 0x84, 0x10, 0x35, 0x4c, 0x2e, 0x02, + 0x6d, 0xf9, 0x74, 0x64, 0x70, 0x24, 0x86, 0xc4, 0x07, 0xe0, 0xa3, 0x60, 0xa3, 0x52, 0xa2, 0xc5, + 0xc7, 0x30, 0x0e, 0xbe, 0x80, 0x6f, 0xe2, 0x43, 0x38, 0xb9, 0xf9, 0x16, 0x8e, 0x1e, 0x6e, 0x4f, + 0x4f, 0x2f, 0x38, 0x3a, 0xb8, 0xb0,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, 0x24, 0xeb, 0x95, + 0x9c, 0x85, 0xe2, 0x96, 0x37, 0xe3, 0xf6, 0xf5, 0x52, 0x16, 0xb8, 0xbc, 0x19, 0x58, 0x71, 0x1e, + 0x3b, 0x8a, 0xac, 0x38, 0x9f, 0x1d, 0x85, 0x56, 0x5c, 0x93, 0x1d, 0xc5, 0x56, 0x5c, 0x8b, 0x1d, + 0x05, 0x57, 0x5c, 0x9b, 0x1d, 0x45, 0x57, 0x5c, 0x87, 0x1d, 0x85, 0x57, 0x5c, 0x97, 0x1d, 0xc5, + 0x57, 0x5c, 0xcf, 0xa9, 0x6c, 0x0d, 0x20, 0x25, 0x8f, 0x50, 0xd9, 0x1a, 0x41, 0xb5, 0x6e, 0x66, + 0x69, 0x08, 0xd5, 0x7a, 0x99, 0xa5, 0x31, 0x54, 0x9b, 0x0e, 0xf2, 0xa9, 0xa7, 0x83, 0x24, 0x53, + 0x5c, 0x2f, 0x1e, 0x47, 0xb3, 0xdd, 0xb5, 0xff, 0xf9, 0xda, 0xdf, 0xd7, 0x71, 0x5f, 0x0d, 0x01, + 0xbf, 0xaf, 0x9d, 0x12, 0xef, 0x6e, 0xfe, 0x1f, 0x6e, 0x7e, 0x3d, 0x4b, 0xdf, 0xfc, 0xfe, 0x3a, + 0xd6, 0x7e, 0x02, 0x00, 0x00, 0xff, 0xff, 0xa9, 0x4d, 0xb0, 0xaa, 0x27, 0x06, 0x00, 0x00, +} diff --git a/vendor/github.com/gogo/protobuf/test/packed/packed.proto b/vendor/github.com/gogo/protobuf/test/packed/packed.proto new file mode 100644 index 000000000..29f0e6c87 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/packed/packed.proto @@ -0,0 +1,101 @@ +// Copyright (c) 2013, Vastech SA (PTY) LTD. All rights reserved. +// http://github.com/gogo/protobuf/gogoproto +// +// 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 packed; + +import "github.com/gogo/protobuf/gogoproto/gogo.proto"; + +option (gogoproto.populate_all) = true; + +message NinRepNative { + option (gogoproto.unmarshaler) = true; + repeated double Field1 = 1; + repeated float Field2 = 2; + repeated int32 Field3 = 3; + repeated int64 Field4 = 4; + repeated uint32 Field5 = 5; + repeated uint64 Field6 = 6; + repeated sint32 Field7 = 7; + repeated sint64 Field8 = 8; + repeated fixed32 Field9 = 9; + repeated sfixed32 Field10 = 10; + repeated fixed64 Field11 = 11; + repeated sfixed64 Field12 = 12; + repeated bool Field13 = 13; +} + +message NinRepPackedNative { + option (gogoproto.unmarshaler) = true; + repeated double Field1 = 1 [packed = true]; + repeated float Field2 = 2 [packed = true]; + repeated int32 Field3 = 3 [packed = true]; + repeated int64 Field4 = 4 [packed = true]; + repeated uint32 Field5 = 5 [packed = true]; + repeated uint64 Field6 = 6 [packed = true]; + repeated sint32 Field7 = 7 [packed = true]; + repeated sint64 Field8 = 8 [packed = true]; + repeated fixed32 Field9 = 9 [packed = true]; + repeated sfixed32 Field10 = 10 [packed = true]; + repeated fixed64 Field11 = 11 [packed = true]; + repeated sfixed64 Field12 = 12 [packed = true]; + repeated bool Field13 = 13 [packed = true]; +} + +message NinRepNativeUnsafe { + option (gogoproto.unsafe_unmarshaler) = true; + repeated double Field1 = 1; + repeated float Field2 = 2; + repeated int32 Field3 = 3; + repeated int64 Field4 = 4; + repeated uint32 Field5 = 5; + repeated uint64 Field6 = 6; + repeated sint32 Field7 = 7; + repeated sint64 Field8 = 8; + repeated fixed32 Field9 = 9; + repeated sfixed32 Field10 = 10; + repeated fixed64 Field11 = 11; + repeated sfixed64 Field12 = 12; + repeated bool Field13 = 13; +} + +message NinRepPackedNativeUnsafe { + option (gogoproto.unsafe_unmarshaler) = true; + repeated double Field1 = 1 [packed = true]; + repeated float Field2 = 2 [packed = true]; + repeated int32 Field3 = 3 [packed = true]; + repeated int64 Field4 = 4 [packed = true]; + repeated uint32 Field5 = 5 [packed = true]; + repeated uint64 Field6 = 6 [packed = true]; + repeated sint32 Field7 = 7 [packed = true]; + repeated sint64 Field8 = 8 [packed = true]; + repeated fixed32 Field9 = 9 [packed = true]; + repeated sfixed32 Field10 = 10 [packed = true]; + repeated fixed64 Field11 = 11 [packed = true]; + repeated sfixed64 Field12 = 12 [packed = true]; + repeated bool Field13 = 13 [packed = true]; +} diff --git a/vendor/github.com/gogo/protobuf/test/packed/packed_test.go b/vendor/github.com/gogo/protobuf/test/packed/packed_test.go new file mode 100644 index 000000000..dcad5ad9c --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/packed/packed_test.go @@ -0,0 +1,321 @@ +// Copyright (c) 2013, Vastech SA (PTY) LTD. All rights reserved. +// http://github.com/gogo/protobuf/gogoproto +// +// 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 packed + +import ( + "bytes" + "fmt" + "github.com/gogo/protobuf/proto" + math_rand "math/rand" + "testing" + "time" +) + +/* +https://github.com/gogo/protobuf/issues/detail?id=21 +https://developers.google.com/protocol-buffers/docs/proto#options +In 2.3.0 and later, this change is safe, as parsers for packable fields will always accept both formats, +*/ +func TestSafeIssue21(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + msg1 := NewPopulatedNinRepNative(popr, true) + data1, err := proto.Marshal(msg1) + if err != nil { + panic(err) + } + packedmsg := &NinRepPackedNative{} + err = proto.Unmarshal(data1, packedmsg) + if err != nil { + panic(err) + } + if len(packedmsg.XXX_unrecognized) != 0 { + t.Fatalf("packed msg unmarshaled unrecognized fields, even though there aren't any") + } + if err := VerboseEqual(msg1, packedmsg); err != nil { + t.Fatalf("%v", err) + } +} + +func TestUnsafeIssue21(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + msg1 := NewPopulatedNinRepNativeUnsafe(popr, true) + data1, err := proto.Marshal(msg1) + if err != nil { + panic(err) + } + packedmsg := &NinRepPackedNativeUnsafe{} + err = proto.Unmarshal(data1, packedmsg) + if err != nil { + panic(err) + } + if len(packedmsg.XXX_unrecognized) != 0 { + t.Fatalf("packed msg unmarshaled unrecognized fields, even though there aren't any") + } + if err := VerboseEqualUnsafe(msg1, packedmsg); err != nil { + t.Fatalf("%v", err) + } +} + +func VerboseEqual(this *NinRepNative, that *NinRepPackedNative) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } else if this == nil { + return fmt.Errorf("that != nil && this == nil") + } + + if len(this.Field1) != len(that.Field1) { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", len(this.Field1), len(that.Field1)) + } + for i := range this.Field1 { + if this.Field1[i] != that.Field1[i] { + return fmt.Errorf("Field1 this[%v](%v) Not Equal that[%v](%v)", i, this.Field1[i], i, that.Field1[i]) + } + } + if len(this.Field2) != len(that.Field2) { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", len(this.Field2), len(that.Field2)) + } + for i := range this.Field2 { + if this.Field2[i] != that.Field2[i] { + return fmt.Errorf("Field2 this[%v](%v) Not Equal that[%v](%v)", i, this.Field2[i], i, that.Field2[i]) + } + } + if len(this.Field3) != len(that.Field3) { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", len(this.Field3), len(that.Field3)) + } + for i := range this.Field3 { + if this.Field3[i] != that.Field3[i] { + return fmt.Errorf("Field3 this[%v](%v) Not Equal that[%v](%v)", i, this.Field3[i], i, that.Field3[i]) + } + } + if len(this.Field4) != len(that.Field4) { + return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", len(this.Field4), len(that.Field4)) + } + for i := range this.Field4 { + if this.Field4[i] != that.Field4[i] { + return fmt.Errorf("Field4 this[%v](%v) Not Equal that[%v](%v)", i, this.Field4[i], i, that.Field4[i]) + } + } + if len(this.Field5) != len(that.Field5) { + return fmt.Errorf("Field5 this(%v) Not Equal that(%v)", len(this.Field5), len(that.Field5)) + } + for i := range this.Field5 { + if this.Field5[i] != that.Field5[i] { + return fmt.Errorf("Field5 this[%v](%v) Not Equal that[%v](%v)", i, this.Field5[i], i, that.Field5[i]) + } + } + if len(this.Field6) != len(that.Field6) { + return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", len(this.Field6), len(that.Field6)) + } + for i := range this.Field6 { + if this.Field6[i] != that.Field6[i] { + return fmt.Errorf("Field6 this[%v](%v) Not Equal that[%v](%v)", i, this.Field6[i], i, that.Field6[i]) + } + } + if len(this.Field7) != len(that.Field7) { + return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", len(this.Field7), len(that.Field7)) + } + for i := range this.Field7 { + if this.Field7[i] != that.Field7[i] { + return fmt.Errorf("Field7 this[%v](%v) Not Equal that[%v](%v)", i, this.Field7[i], i, that.Field7[i]) + } + } + if len(this.Field8) != len(that.Field8) { + return fmt.Errorf("Field8 this(%v) Not Equal that(%v)", len(this.Field8), len(that.Field8)) + } + for i := range this.Field8 { + if this.Field8[i] != that.Field8[i] { + return fmt.Errorf("Field8 this[%v](%v) Not Equal that[%v](%v)", i, this.Field8[i], i, that.Field8[i]) + } + } + if len(this.Field9) != len(that.Field9) { + return fmt.Errorf("Field9 this(%v) Not Equal that(%v)", len(this.Field9), len(that.Field9)) + } + for i := range this.Field9 { + if this.Field9[i] != that.Field9[i] { + return fmt.Errorf("Field9 this[%v](%v) Not Equal that[%v](%v)", i, this.Field9[i], i, that.Field9[i]) + } + } + if len(this.Field10) != len(that.Field10) { + return fmt.Errorf("Field10 this(%v) Not Equal that(%v)", len(this.Field10), len(that.Field10)) + } + for i := range this.Field10 { + if this.Field10[i] != that.Field10[i] { + return fmt.Errorf("Field10 this[%v](%v) Not Equal that[%v](%v)", i, this.Field10[i], i, that.Field10[i]) + } + } + if len(this.Field11) != len(that.Field11) { + return fmt.Errorf("Field11 this(%v) Not Equal that(%v)", len(this.Field11), len(that.Field11)) + } + for i := range this.Field11 { + if this.Field11[i] != that.Field11[i] { + return fmt.Errorf("Field11 this[%v](%v) Not Equal that[%v](%v)", i, this.Field11[i], i, that.Field11[i]) + } + } + if len(this.Field12) != len(that.Field12) { + return fmt.Errorf("Field12 this(%v) Not Equal that(%v)", len(this.Field12), len(that.Field12)) + } + for i := range this.Field12 { + if this.Field12[i] != that.Field12[i] { + return fmt.Errorf("Field12 this[%v](%v) Not Equal that[%v](%v)", i, this.Field12[i], i, that.Field12[i]) + } + } + if len(this.Field13) != len(that.Field13) { + return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", len(this.Field13), len(that.Field13)) + } + for i := range this.Field13 { + if this.Field13[i] != that.Field13[i] { + return fmt.Errorf("Field13 this[%v](%v) Not Equal that[%v](%v)", i, this.Field13[i], i, that.Field13[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that.XXX_unrecognized) + } + return nil +} + +func VerboseEqualUnsafe(this *NinRepNativeUnsafe, that *NinRepPackedNativeUnsafe) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } else if this == nil { + return fmt.Errorf("that != nil && this == nil") + } + + if len(this.Field1) != len(that.Field1) { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", len(this.Field1), len(that.Field1)) + } + for i := range this.Field1 { + if this.Field1[i] != that.Field1[i] { + return fmt.Errorf("Field1 this[%v](%v) Not Equal that[%v](%v)", i, this.Field1[i], i, that.Field1[i]) + } + } + if len(this.Field2) != len(that.Field2) { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", len(this.Field2), len(that.Field2)) + } + for i := range this.Field2 { + if this.Field2[i] != that.Field2[i] { + return fmt.Errorf("Field2 this[%v](%v) Not Equal that[%v](%v)", i, this.Field2[i], i, that.Field2[i]) + } + } + if len(this.Field3) != len(that.Field3) { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", len(this.Field3), len(that.Field3)) + } + for i := range this.Field3 { + if this.Field3[i] != that.Field3[i] { + return fmt.Errorf("Field3 this[%v](%v) Not Equal that[%v](%v)", i, this.Field3[i], i, that.Field3[i]) + } + } + if len(this.Field4) != len(that.Field4) { + return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", len(this.Field4), len(that.Field4)) + } + for i := range this.Field4 { + if this.Field4[i] != that.Field4[i] { + return fmt.Errorf("Field4 this[%v](%v) Not Equal that[%v](%v)", i, this.Field4[i], i, that.Field4[i]) + } + } + if len(this.Field5) != len(that.Field5) { + return fmt.Errorf("Field5 this(%v) Not Equal that(%v)", len(this.Field5), len(that.Field5)) + } + for i := range this.Field5 { + if this.Field5[i] != that.Field5[i] { + return fmt.Errorf("Field5 this[%v](%v) Not Equal that[%v](%v)", i, this.Field5[i], i, that.Field5[i]) + } + } + if len(this.Field6) != len(that.Field6) { + return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", len(this.Field6), len(that.Field6)) + } + for i := range this.Field6 { + if this.Field6[i] != that.Field6[i] { + return fmt.Errorf("Field6 this[%v](%v) Not Equal that[%v](%v)", i, this.Field6[i], i, that.Field6[i]) + } + } + if len(this.Field7) != len(that.Field7) { + return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", len(this.Field7), len(that.Field7)) + } + for i := range this.Field7 { + if this.Field7[i] != that.Field7[i] { + return fmt.Errorf("Field7 this[%v](%v) Not Equal that[%v](%v)", i, this.Field7[i], i, that.Field7[i]) + } + } + if len(this.Field8) != len(that.Field8) { + return fmt.Errorf("Field8 this(%v) Not Equal that(%v)", len(this.Field8), len(that.Field8)) + } + for i := range this.Field8 { + if this.Field8[i] != that.Field8[i] { + return fmt.Errorf("Field8 this[%v](%v) Not Equal that[%v](%v)", i, this.Field8[i], i, that.Field8[i]) + } + } + if len(this.Field9) != len(that.Field9) { + return fmt.Errorf("Field9 this(%v) Not Equal that(%v)", len(this.Field9), len(that.Field9)) + } + for i := range this.Field9 { + if this.Field9[i] != that.Field9[i] { + return fmt.Errorf("Field9 this[%v](%v) Not Equal that[%v](%v)", i, this.Field9[i], i, that.Field9[i]) + } + } + if len(this.Field10) != len(that.Field10) { + return fmt.Errorf("Field10 this(%v) Not Equal that(%v)", len(this.Field10), len(that.Field10)) + } + for i := range this.Field10 { + if this.Field10[i] != that.Field10[i] { + return fmt.Errorf("Field10 this[%v](%v) Not Equal that[%v](%v)", i, this.Field10[i], i, that.Field10[i]) + } + } + if len(this.Field11) != len(that.Field11) { + return fmt.Errorf("Field11 this(%v) Not Equal that(%v)", len(this.Field11), len(that.Field11)) + } + for i := range this.Field11 { + if this.Field11[i] != that.Field11[i] { + return fmt.Errorf("Field11 this[%v](%v) Not Equal that[%v](%v)", i, this.Field11[i], i, that.Field11[i]) + } + } + if len(this.Field12) != len(that.Field12) { + return fmt.Errorf("Field12 this(%v) Not Equal that(%v)", len(this.Field12), len(that.Field12)) + } + for i := range this.Field12 { + if this.Field12[i] != that.Field12[i] { + return fmt.Errorf("Field12 this[%v](%v) Not Equal that[%v](%v)", i, this.Field12[i], i, that.Field12[i]) + } + } + if len(this.Field13) != len(that.Field13) { + return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", len(this.Field13), len(that.Field13)) + } + for i := range this.Field13 { + if this.Field13[i] != that.Field13[i] { + return fmt.Errorf("Field13 this[%v](%v) Not Equal that[%v](%v)", i, this.Field13[i], i, that.Field13[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that.XXX_unrecognized) + } + return nil +} diff --git a/vendor/github.com/gogo/protobuf/test/protosize/Makefile b/vendor/github.com/gogo/protobuf/test/protosize/Makefile new file mode 100644 index 000000000..a84117273 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/protosize/Makefile @@ -0,0 +1,30 @@ +# Extensions for Protocol Buffers to create more go like structures. +# +# Copyright (c) 2013, Vastech SA (PTY) LTD. 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: + (protoc --proto_path=../../../../../:../../protobuf/:. --gogo_out=. protosize.proto) diff --git a/vendor/github.com/gogo/protobuf/test/protosize/protosize.pb.go b/vendor/github.com/gogo/protobuf/test/protosize/protosize.pb.go new file mode 100644 index 000000000..b09e1791d --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/protosize/protosize.pb.go @@ -0,0 +1,616 @@ +// Code generated by protoc-gen-gogo. +// source: protosize.proto +// DO NOT EDIT! + +/* + Package protosize is a generated protocol buffer package. + + It is generated from these files: + protosize.proto + + It has these top-level messages: + SizeMessage +*/ +package protosize + +import proto "github.com/gogo/protobuf/proto" +import fmt "fmt" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" + +import bytes "bytes" + +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. +const _ = proto.GoGoProtoPackageIsVersion1 + +type SizeMessage struct { + Size *int64 `protobuf:"varint,1,opt,name=size" json:"size,omitempty"` + ProtoSize_ *int64 `protobuf:"varint,2,opt,name=proto_size,json=protoSize" json:"proto_size,omitempty"` + Equal_ *bool `protobuf:"varint,3,opt,name=Equal,json=equal" json:"Equal,omitempty"` + String_ *string `protobuf:"bytes,4,opt,name=String,json=string" json:"String,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *SizeMessage) Reset() { *m = SizeMessage{} } +func (m *SizeMessage) String() string { return proto.CompactTextString(m) } +func (*SizeMessage) ProtoMessage() {} +func (*SizeMessage) Descriptor() ([]byte, []int) { return fileDescriptorProtosize, []int{0} } + +func (m *SizeMessage) GetSize() int64 { + if m != nil && m.Size != nil { + return *m.Size + } + return 0 +} + +func (m *SizeMessage) GetProtoSize_() int64 { + if m != nil && m.ProtoSize_ != nil { + return *m.ProtoSize_ + } + return 0 +} + +func (m *SizeMessage) GetEqual_() bool { + if m != nil && m.Equal_ != nil { + return *m.Equal_ + } + return false +} + +func (m *SizeMessage) GetString_() string { + if m != nil && m.String_ != nil { + return *m.String_ + } + return "" +} + +func init() { + proto.RegisterType((*SizeMessage)(nil), "protosize.SizeMessage") +} +func (this *SizeMessage) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*SizeMessage) + if !ok { + that2, ok := that.(SizeMessage) + 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 != 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.ProtoSize_ != nil && that1.ProtoSize_ != nil { + if *this.ProtoSize_ != *that1.ProtoSize_ { + return false + } + } else if this.ProtoSize_ != nil { + return false + } else if that1.ProtoSize_ != nil { + return false + } + if this.Equal_ != nil && that1.Equal_ != nil { + if *this.Equal_ != *that1.Equal_ { + return false + } + } else if this.Equal_ != nil { + return false + } else if that1.Equal_ != nil { + return false + } + if this.String_ != nil && that1.String_ != nil { + if *this.String_ != *that1.String_ { + return false + } + } else if this.String_ != nil { + return false + } else if that1.String_ != nil { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (m *SizeMessage) 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 *SizeMessage) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Size != nil { + data[i] = 0x8 + i++ + i = encodeVarintProtosize(data, i, uint64(*m.Size)) + } + if m.ProtoSize_ != nil { + data[i] = 0x10 + i++ + i = encodeVarintProtosize(data, i, uint64(*m.ProtoSize_)) + } + if m.Equal_ != nil { + data[i] = 0x18 + i++ + if *m.Equal_ { + data[i] = 1 + } else { + data[i] = 0 + } + i++ + } + if m.String_ != nil { + data[i] = 0x22 + i++ + i = encodeVarintProtosize(data, i, uint64(len(*m.String_))) + i += copy(data[i:], *m.String_) + } + if m.XXX_unrecognized != nil { + i += copy(data[i:], m.XXX_unrecognized) + } + return i, nil +} + +func encodeFixed64Protosize(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 encodeFixed32Protosize(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 encodeVarintProtosize(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 NewPopulatedSizeMessage(r randyProtosize, easy bool) *SizeMessage { + this := &SizeMessage{} + if r.Intn(10) != 0 { + v1 := int64(r.Int63()) + if r.Intn(2) == 0 { + v1 *= -1 + } + this.Size = &v1 + } + if r.Intn(10) != 0 { + v2 := int64(r.Int63()) + if r.Intn(2) == 0 { + v2 *= -1 + } + this.ProtoSize_ = &v2 + } + if r.Intn(10) != 0 { + v3 := bool(bool(r.Intn(2) == 0)) + this.Equal_ = &v3 + } + if r.Intn(10) != 0 { + v4 := randStringProtosize(r) + this.String_ = &v4 + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedProtosize(r, 5) + } + return this +} + +type randyProtosize interface { + Float32() float32 + Float64() float64 + Int63() int64 + Int31() int32 + Uint32() uint32 + Intn(n int) int +} + +func randUTF8RuneProtosize(r randyProtosize) 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 randStringProtosize(r randyProtosize) string { + v5 := r.Intn(100) + tmps := make([]rune, v5) + for i := 0; i < v5; i++ { + tmps[i] = randUTF8RuneProtosize(r) + } + return string(tmps) +} +func randUnrecognizedProtosize(r randyProtosize, 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 = randFieldProtosize(data, r, fieldNumber, wire) + } + return data +} +func randFieldProtosize(data []byte, r randyProtosize, fieldNumber int, wire int) []byte { + key := uint32(fieldNumber)<<3 | uint32(wire) + switch wire { + case 0: + data = encodeVarintPopulateProtosize(data, uint64(key)) + v6 := r.Int63() + if r.Intn(2) == 0 { + v6 *= -1 + } + data = encodeVarintPopulateProtosize(data, uint64(v6)) + case 1: + data = encodeVarintPopulateProtosize(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 = encodeVarintPopulateProtosize(data, uint64(key)) + ll := r.Intn(100) + data = encodeVarintPopulateProtosize(data, uint64(ll)) + for j := 0; j < ll; j++ { + data = append(data, byte(r.Intn(256))) + } + default: + data = encodeVarintPopulateProtosize(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 encodeVarintPopulateProtosize(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 *SizeMessage) ProtoSize() (n int) { + var l int + _ = l + if m.Size != nil { + n += 1 + sovProtosize(uint64(*m.Size)) + } + if m.ProtoSize_ != nil { + n += 1 + sovProtosize(uint64(*m.ProtoSize_)) + } + if m.Equal_ != nil { + n += 2 + } + if m.String_ != nil { + l = len(*m.String_) + n += 1 + l + sovProtosize(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func sovProtosize(x uint64) (n int) { + for { + n++ + x >>= 7 + if x == 0 { + break + } + } + return n +} +func sozProtosize(x uint64) (n int) { + return sovProtosize(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *SizeMessage) 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 ErrIntOverflowProtosize + } + 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: SizeMessage: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: SizeMessage: 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) + } + var v int64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProtosize + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Size = &v + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field ProtoSize_", wireType) + } + var v int64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProtosize + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.ProtoSize_ = &v + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Equal_", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProtosize + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + b := bool(v != 0) + m.Equal_ = &b + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field String_", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProtosize + } + 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 ErrInvalidLengthProtosize + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + s := string(data[iNdEx:postIndex]) + m.String_ = &s + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipProtosize(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthProtosize + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipProtosize(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, ErrIntOverflowProtosize + } + 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, ErrIntOverflowProtosize + } + 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, ErrIntOverflowProtosize + } + 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, ErrInvalidLengthProtosize + } + return iNdEx, nil + case 3: + for { + var innerWire uint64 + var start int = iNdEx + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowProtosize + } + 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 := skipProtosize(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 ( + ErrInvalidLengthProtosize = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowProtosize = fmt.Errorf("proto: integer overflow") +) + +var fileDescriptorProtosize = []byte{ + // 177 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xe2, 0xe2, 0x2f, 0x28, 0xca, 0x2f, + 0xc9, 0x2f, 0xce, 0xac, 0x4a, 0xd5, 0x03, 0xb3, 0x84, 0x38, 0xe1, 0x02, 0x52, 0xba, 0xe9, 0x99, + 0x25, 0x19, 0xa5, 0x49, 0x7a, 0xc9, 0xf9, 0xb9, 0xfa, 0xe9, 0xf9, 0xe9, 0xf9, 0xfa, 0x60, 0xa9, + 0xa4, 0xd2, 0x34, 0x30, 0x0f, 0xcc, 0x01, 0xb3, 0x20, 0x3a, 0x95, 0xf2, 0xb8, 0xb8, 0x83, 0x81, + 0xda, 0x7c, 0x53, 0x8b, 0x8b, 0x13, 0xd3, 0x53, 0x85, 0x84, 0xb8, 0x58, 0x40, 0xa6, 0x48, 0x30, + 0x2a, 0x30, 0x6a, 0x30, 0x07, 0x81, 0xd9, 0x42, 0xb2, 0x5c, 0x5c, 0x60, 0xb5, 0xf1, 0x60, 0x19, + 0x26, 0xb0, 0x0c, 0xc4, 0x42, 0x90, 0x4e, 0x21, 0x11, 0x2e, 0x56, 0xd7, 0xc2, 0xd2, 0xc4, 0x1c, + 0x09, 0x66, 0xa0, 0x0c, 0x47, 0x10, 0x6b, 0x2a, 0x88, 0x23, 0x24, 0xc6, 0xc5, 0x16, 0x5c, 0x52, + 0x94, 0x99, 0x97, 0x2e, 0xc1, 0x02, 0x14, 0xe6, 0x0c, 0x62, 0x2b, 0x06, 0xf3, 0x9c, 0x24, 0x7e, + 0x3c, 0x94, 0x63, 0x5c, 0xf1, 0x48, 0x8e, 0x71, 0x07, 0x10, 0x9f, 0x00, 0xe2, 0x0b, 0x40, 0xbc, + 0xe0, 0xb1, 0x1c, 0x23, 0x20, 0x00, 0x00, 0xff, 0xff, 0xdf, 0x5d, 0x65, 0x12, 0xd5, 0x00, 0x00, + 0x00, +} diff --git a/vendor/github.com/gogo/protobuf/test/protosize/protosize.proto b/vendor/github.com/gogo/protobuf/test/protosize/protosize.proto new file mode 100644 index 000000000..ad2c41d78 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/protosize/protosize.proto @@ -0,0 +1,18 @@ +syntax = "proto2"; +package protosize; + +import "github.com/gogo/protobuf/gogoproto/gogo.proto"; + +option (gogoproto.marshaler_all) = true; +option (gogoproto.protosizer_all) = true; +option (gogoproto.unmarshaler_all) = true; +option (gogoproto.populate_all) = true; +option (gogoproto.testgen_all) = true; +option (gogoproto.equal_all) = true; + +message SizeMessage { + optional int64 size = 1; + optional int64 proto_size = 2; + optional bool Equal = 3; + optional string String = 4; +} diff --git a/vendor/github.com/gogo/protobuf/test/protosize/protosize_test.go b/vendor/github.com/gogo/protobuf/test/protosize/protosize_test.go new file mode 100644 index 000000000..8be32b9c3 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/protosize/protosize_test.go @@ -0,0 +1,9 @@ +package protosize + +// We expect that Size field will have no suffix and ProtoSize will be present +var ( + _ = SizeMessage{}.Size + _ = (&SizeMessage{}).GetSize + + _ = (&SizeMessage{}).ProtoSize +) diff --git a/vendor/github.com/gogo/protobuf/test/protosize/protosizepb_test.go b/vendor/github.com/gogo/protobuf/test/protosize/protosizepb_test.go new file mode 100644 index 000000000..175b84060 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/protosize/protosizepb_test.go @@ -0,0 +1,155 @@ +// Code generated by protoc-gen-gogo. +// source: protosize.proto +// DO NOT EDIT! + +/* +Package protosize is a generated protocol buffer package. + +It is generated from these files: + protosize.proto + +It has these top-level messages: + SizeMessage +*/ +package protosize + +import testing "testing" +import math_rand "math/rand" +import time "time" +import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" +import github_com_gogo_protobuf_jsonpb "github.com/gogo/protobuf/jsonpb" +import proto "github.com/gogo/protobuf/proto" +import fmt "fmt" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +func TestSizeMessageProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedSizeMessage(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &SizeMessage{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestSizeMessageMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedSizeMessage(popr, false) + size := p.ProtoSize() + data := make([]byte, size) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(data) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &SizeMessage{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestSizeMessageJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedSizeMessage(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &SizeMessage{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestSizeMessageProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedSizeMessage(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &SizeMessage{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestSizeMessageProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedSizeMessage(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &SizeMessage{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestSizeMessageProtoSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedSizeMessage(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.ProtoSize() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +//These tests are generated by github.com/gogo/protobuf/plugin/testgen diff --git a/vendor/github.com/gogo/protobuf/test/required/Makefile b/vendor/github.com/gogo/protobuf/test/required/Makefile new file mode 100644 index 000000000..37eaecf3c --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/required/Makefile @@ -0,0 +1,30 @@ +# Extensions for Protocol Buffers to create more go like structures. +# +# Copyright (c) 2013, Vastech SA (PTY) LTD. 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: + (protoc --proto_path=../../../../../:../../protobuf/:. --gogo_out=. requiredexample.proto) diff --git a/vendor/github.com/gogo/protobuf/test/required/requiredexample.pb.go b/vendor/github.com/gogo/protobuf/test/required/requiredexample.pb.go new file mode 100644 index 000000000..40ac0da25 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/required/requiredexample.pb.go @@ -0,0 +1,2211 @@ +// Code generated by protoc-gen-gogo. +// source: requiredexample.proto +// DO NOT EDIT! + +/* + Package required is a generated protocol buffer package. + + It is generated from these files: + requiredexample.proto + + It has these top-level messages: + RequiredExample + NidOptNative + NinOptNative + NestedNinOptNative +*/ +package required + +import proto "github.com/gogo/protobuf/proto" +import fmt "fmt" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" + +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. +const _ = proto.GoGoProtoPackageIsVersion1 + +type RequiredExample struct { + TheRequiredString *string `protobuf:"bytes,1,req,name=theRequiredString" json:"theRequiredString,omitempty"` + TheOptionalString *string `protobuf:"bytes,2,opt,name=theOptionalString" json:"theOptionalString,omitempty"` + TheRepeatedStrings []string `protobuf:"bytes,3,rep,name=theRepeatedStrings" json:"theRepeatedStrings,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *RequiredExample) Reset() { *m = RequiredExample{} } +func (m *RequiredExample) String() string { return proto.CompactTextString(m) } +func (*RequiredExample) ProtoMessage() {} +func (*RequiredExample) Descriptor() ([]byte, []int) { return fileDescriptorRequiredexample, []int{0} } + +func (m *RequiredExample) GetTheRequiredString() string { + if m != nil && m.TheRequiredString != nil { + return *m.TheRequiredString + } + return "" +} + +func (m *RequiredExample) GetTheOptionalString() string { + if m != nil && m.TheOptionalString != nil { + return *m.TheOptionalString + } + return "" +} + +func (m *RequiredExample) GetTheRepeatedStrings() []string { + if m != nil { + return m.TheRepeatedStrings + } + return nil +} + +type NidOptNative struct { + Field1 float64 `protobuf:"fixed64,1,req,name=Field1,json=field1" json:"Field1"` + Field2 float32 `protobuf:"fixed32,2,req,name=Field2,json=field2" json:"Field2"` + Field3 int32 `protobuf:"varint,3,req,name=Field3,json=field3" json:"Field3"` + Field4 int64 `protobuf:"varint,4,req,name=Field4,json=field4" json:"Field4"` + Field5 uint32 `protobuf:"varint,5,req,name=Field5,json=field5" json:"Field5"` + Field6 uint64 `protobuf:"varint,6,req,name=Field6,json=field6" json:"Field6"` + Field7 int32 `protobuf:"zigzag32,7,req,name=Field7,json=field7" json:"Field7"` + Field8 int64 `protobuf:"zigzag64,8,req,name=Field8,json=field8" json:"Field8"` + Field9 uint32 `protobuf:"fixed32,9,req,name=Field9,json=field9" json:"Field9"` + Field10 int32 `protobuf:"fixed32,10,req,name=Field10,json=field10" json:"Field10"` + Field11 uint64 `protobuf:"fixed64,11,req,name=Field11,json=field11" json:"Field11"` + Field12 int64 `protobuf:"fixed64,12,req,name=Field12,json=field12" json:"Field12"` + Field13 bool `protobuf:"varint,13,req,name=Field13,json=field13" json:"Field13"` + Field14 string `protobuf:"bytes,14,req,name=Field14,json=field14" json:"Field14"` + Field15 []byte `protobuf:"bytes,15,req,name=Field15,json=field15" json:"Field15"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *NidOptNative) Reset() { *m = NidOptNative{} } +func (m *NidOptNative) String() string { return proto.CompactTextString(m) } +func (*NidOptNative) ProtoMessage() {} +func (*NidOptNative) Descriptor() ([]byte, []int) { return fileDescriptorRequiredexample, []int{1} } + +func (m *NidOptNative) GetField1() float64 { + if m != nil { + return m.Field1 + } + return 0 +} + +func (m *NidOptNative) GetField2() float32 { + if m != nil { + return m.Field2 + } + return 0 +} + +func (m *NidOptNative) GetField3() int32 { + if m != nil { + return m.Field3 + } + return 0 +} + +func (m *NidOptNative) GetField4() int64 { + if m != nil { + return m.Field4 + } + return 0 +} + +func (m *NidOptNative) GetField5() uint32 { + if m != nil { + return m.Field5 + } + return 0 +} + +func (m *NidOptNative) GetField6() uint64 { + if m != nil { + return m.Field6 + } + return 0 +} + +func (m *NidOptNative) GetField7() int32 { + if m != nil { + return m.Field7 + } + return 0 +} + +func (m *NidOptNative) GetField8() int64 { + if m != nil { + return m.Field8 + } + return 0 +} + +func (m *NidOptNative) GetField9() uint32 { + if m != nil { + return m.Field9 + } + return 0 +} + +func (m *NidOptNative) GetField10() int32 { + if m != nil { + return m.Field10 + } + return 0 +} + +func (m *NidOptNative) GetField11() uint64 { + if m != nil { + return m.Field11 + } + return 0 +} + +func (m *NidOptNative) GetField12() int64 { + if m != nil { + return m.Field12 + } + return 0 +} + +func (m *NidOptNative) GetField13() bool { + if m != nil { + return m.Field13 + } + return false +} + +func (m *NidOptNative) GetField14() string { + if m != nil { + return m.Field14 + } + return "" +} + +func (m *NidOptNative) GetField15() []byte { + if m != nil { + return m.Field15 + } + return nil +} + +type NinOptNative struct { + Field1 *float64 `protobuf:"fixed64,1,req,name=Field1,json=field1" json:"Field1,omitempty"` + Field2 *float32 `protobuf:"fixed32,2,req,name=Field2,json=field2" json:"Field2,omitempty"` + Field3 *int32 `protobuf:"varint,3,req,name=Field3,json=field3" json:"Field3,omitempty"` + Field4 *int64 `protobuf:"varint,4,req,name=Field4,json=field4" json:"Field4,omitempty"` + Field5 *uint32 `protobuf:"varint,5,req,name=Field5,json=field5" json:"Field5,omitempty"` + Field6 *uint64 `protobuf:"varint,6,req,name=Field6,json=field6" json:"Field6,omitempty"` + Field7 *int32 `protobuf:"zigzag32,7,req,name=Field7,json=field7" json:"Field7,omitempty"` + Field8 *int64 `protobuf:"zigzag64,8,req,name=Field8,json=field8" json:"Field8,omitempty"` + Field9 *uint32 `protobuf:"fixed32,9,req,name=Field9,json=field9" json:"Field9,omitempty"` + Field10 *int32 `protobuf:"fixed32,10,req,name=Field10,json=field10" json:"Field10,omitempty"` + Field11 *uint64 `protobuf:"fixed64,11,req,name=Field11,json=field11" json:"Field11,omitempty"` + Field12 *int64 `protobuf:"fixed64,12,req,name=Field12,json=field12" json:"Field12,omitempty"` + Field13 *bool `protobuf:"varint,13,req,name=Field13,json=field13" json:"Field13,omitempty"` + Field14 *string `protobuf:"bytes,14,req,name=Field14,json=field14" json:"Field14,omitempty"` + Field15 []byte `protobuf:"bytes,15,req,name=Field15,json=field15" json:"Field15,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *NinOptNative) Reset() { *m = NinOptNative{} } +func (m *NinOptNative) String() string { return proto.CompactTextString(m) } +func (*NinOptNative) ProtoMessage() {} +func (*NinOptNative) Descriptor() ([]byte, []int) { return fileDescriptorRequiredexample, []int{2} } + +func (m *NinOptNative) GetField1() float64 { + if m != nil && m.Field1 != nil { + return *m.Field1 + } + return 0 +} + +func (m *NinOptNative) GetField2() float32 { + if m != nil && m.Field2 != nil { + return *m.Field2 + } + return 0 +} + +func (m *NinOptNative) GetField3() int32 { + if m != nil && m.Field3 != nil { + return *m.Field3 + } + return 0 +} + +func (m *NinOptNative) GetField4() int64 { + if m != nil && m.Field4 != nil { + return *m.Field4 + } + return 0 +} + +func (m *NinOptNative) GetField5() uint32 { + if m != nil && m.Field5 != nil { + return *m.Field5 + } + return 0 +} + +func (m *NinOptNative) GetField6() uint64 { + if m != nil && m.Field6 != nil { + return *m.Field6 + } + return 0 +} + +func (m *NinOptNative) GetField7() int32 { + if m != nil && m.Field7 != nil { + return *m.Field7 + } + return 0 +} + +func (m *NinOptNative) GetField8() int64 { + if m != nil && m.Field8 != nil { + return *m.Field8 + } + return 0 +} + +func (m *NinOptNative) GetField9() uint32 { + if m != nil && m.Field9 != nil { + return *m.Field9 + } + return 0 +} + +func (m *NinOptNative) GetField10() int32 { + if m != nil && m.Field10 != nil { + return *m.Field10 + } + return 0 +} + +func (m *NinOptNative) GetField11() uint64 { + if m != nil && m.Field11 != nil { + return *m.Field11 + } + return 0 +} + +func (m *NinOptNative) GetField12() int64 { + if m != nil && m.Field12 != nil { + return *m.Field12 + } + return 0 +} + +func (m *NinOptNative) GetField13() bool { + if m != nil && m.Field13 != nil { + return *m.Field13 + } + return false +} + +func (m *NinOptNative) GetField14() string { + if m != nil && m.Field14 != nil { + return *m.Field14 + } + return "" +} + +func (m *NinOptNative) GetField15() []byte { + if m != nil { + return m.Field15 + } + return nil +} + +type NestedNinOptNative struct { + NestedNinOpts []*NinOptNative `protobuf:"bytes,1,rep,name=NestedNinOpts,json=nestedNinOpts" json:"NestedNinOpts,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *NestedNinOptNative) Reset() { *m = NestedNinOptNative{} } +func (m *NestedNinOptNative) String() string { return proto.CompactTextString(m) } +func (*NestedNinOptNative) ProtoMessage() {} +func (*NestedNinOptNative) Descriptor() ([]byte, []int) { + return fileDescriptorRequiredexample, []int{3} +} + +func (m *NestedNinOptNative) GetNestedNinOpts() []*NinOptNative { + if m != nil { + return m.NestedNinOpts + } + return nil +} + +func init() { + proto.RegisterType((*RequiredExample)(nil), "required.RequiredExample") + proto.RegisterType((*NidOptNative)(nil), "required.NidOptNative") + proto.RegisterType((*NinOptNative)(nil), "required.NinOptNative") + proto.RegisterType((*NestedNinOptNative)(nil), "required.NestedNinOptNative") +} +func (m *RequiredExample) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *RequiredExample) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.TheRequiredString == nil { + return 0, github_com_gogo_protobuf_proto.NewRequiredNotSetError("theRequiredString") + } else { + data[i] = 0xa + i++ + i = encodeVarintRequiredexample(data, i, uint64(len(*m.TheRequiredString))) + i += copy(data[i:], *m.TheRequiredString) + } + if m.TheOptionalString != nil { + data[i] = 0x12 + i++ + i = encodeVarintRequiredexample(data, i, uint64(len(*m.TheOptionalString))) + i += copy(data[i:], *m.TheOptionalString) + } + if len(m.TheRepeatedStrings) > 0 { + for _, s := range m.TheRepeatedStrings { + 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.XXX_unrecognized != nil { + i += copy(data[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *NidOptNative) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *NidOptNative) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + data[i] = 0x9 + i++ + i = encodeFixed64Requiredexample(data, i, uint64(math.Float64bits(float64(m.Field1)))) + data[i] = 0x15 + i++ + i = encodeFixed32Requiredexample(data, i, uint32(math.Float32bits(float32(m.Field2)))) + data[i] = 0x18 + i++ + i = encodeVarintRequiredexample(data, i, uint64(m.Field3)) + data[i] = 0x20 + i++ + i = encodeVarintRequiredexample(data, i, uint64(m.Field4)) + data[i] = 0x28 + i++ + i = encodeVarintRequiredexample(data, i, uint64(m.Field5)) + data[i] = 0x30 + i++ + i = encodeVarintRequiredexample(data, i, uint64(m.Field6)) + data[i] = 0x38 + i++ + i = encodeVarintRequiredexample(data, i, uint64((uint32(m.Field7)<<1)^uint32((m.Field7>>31)))) + data[i] = 0x40 + i++ + i = encodeVarintRequiredexample(data, i, uint64((uint64(m.Field8)<<1)^uint64((m.Field8>>63)))) + data[i] = 0x4d + i++ + i = encodeFixed32Requiredexample(data, i, uint32(m.Field9)) + data[i] = 0x55 + i++ + i = encodeFixed32Requiredexample(data, i, uint32(m.Field10)) + data[i] = 0x59 + i++ + i = encodeFixed64Requiredexample(data, i, uint64(m.Field11)) + data[i] = 0x61 + i++ + i = encodeFixed64Requiredexample(data, i, uint64(m.Field12)) + data[i] = 0x68 + i++ + if m.Field13 { + data[i] = 1 + } else { + data[i] = 0 + } + i++ + data[i] = 0x72 + i++ + i = encodeVarintRequiredexample(data, i, uint64(len(m.Field14))) + i += copy(data[i:], m.Field14) + if m.Field15 != nil { + data[i] = 0x7a + i++ + i = encodeVarintRequiredexample(data, i, uint64(len(m.Field15))) + i += copy(data[i:], m.Field15) + } + if m.XXX_unrecognized != nil { + i += copy(data[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *NinOptNative) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *NinOptNative) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Field1 == nil { + return 0, github_com_gogo_protobuf_proto.NewRequiredNotSetError("Field1") + } else { + data[i] = 0x9 + i++ + i = encodeFixed64Requiredexample(data, i, uint64(math.Float64bits(float64(*m.Field1)))) + } + if m.Field2 == nil { + return 0, github_com_gogo_protobuf_proto.NewRequiredNotSetError("Field2") + } else { + data[i] = 0x15 + i++ + i = encodeFixed32Requiredexample(data, i, uint32(math.Float32bits(float32(*m.Field2)))) + } + if m.Field3 == nil { + return 0, github_com_gogo_protobuf_proto.NewRequiredNotSetError("Field3") + } else { + data[i] = 0x18 + i++ + i = encodeVarintRequiredexample(data, i, uint64(*m.Field3)) + } + if m.Field4 == nil { + return 0, github_com_gogo_protobuf_proto.NewRequiredNotSetError("Field4") + } else { + data[i] = 0x20 + i++ + i = encodeVarintRequiredexample(data, i, uint64(*m.Field4)) + } + if m.Field5 == nil { + return 0, github_com_gogo_protobuf_proto.NewRequiredNotSetError("Field5") + } else { + data[i] = 0x28 + i++ + i = encodeVarintRequiredexample(data, i, uint64(*m.Field5)) + } + if m.Field6 == nil { + return 0, github_com_gogo_protobuf_proto.NewRequiredNotSetError("Field6") + } else { + data[i] = 0x30 + i++ + i = encodeVarintRequiredexample(data, i, uint64(*m.Field6)) + } + if m.Field7 == nil { + return 0, github_com_gogo_protobuf_proto.NewRequiredNotSetError("Field7") + } else { + data[i] = 0x38 + i++ + i = encodeVarintRequiredexample(data, i, uint64((uint32(*m.Field7)<<1)^uint32((*m.Field7>>31)))) + } + if m.Field8 == nil { + return 0, github_com_gogo_protobuf_proto.NewRequiredNotSetError("Field8") + } else { + data[i] = 0x40 + i++ + i = encodeVarintRequiredexample(data, i, uint64((uint64(*m.Field8)<<1)^uint64((*m.Field8>>63)))) + } + if m.Field9 == nil { + return 0, github_com_gogo_protobuf_proto.NewRequiredNotSetError("Field9") + } else { + data[i] = 0x4d + i++ + i = encodeFixed32Requiredexample(data, i, uint32(*m.Field9)) + } + if m.Field10 == nil { + return 0, github_com_gogo_protobuf_proto.NewRequiredNotSetError("Field10") + } else { + data[i] = 0x55 + i++ + i = encodeFixed32Requiredexample(data, i, uint32(*m.Field10)) + } + if m.Field11 == nil { + return 0, github_com_gogo_protobuf_proto.NewRequiredNotSetError("Field11") + } else { + data[i] = 0x59 + i++ + i = encodeFixed64Requiredexample(data, i, uint64(*m.Field11)) + } + if m.Field12 == nil { + return 0, github_com_gogo_protobuf_proto.NewRequiredNotSetError("Field12") + } else { + data[i] = 0x61 + i++ + i = encodeFixed64Requiredexample(data, i, uint64(*m.Field12)) + } + if m.Field13 == nil { + return 0, github_com_gogo_protobuf_proto.NewRequiredNotSetError("Field13") + } else { + data[i] = 0x68 + i++ + if *m.Field13 { + data[i] = 1 + } else { + data[i] = 0 + } + i++ + } + if m.Field14 == nil { + return 0, github_com_gogo_protobuf_proto.NewRequiredNotSetError("Field14") + } else { + data[i] = 0x72 + i++ + i = encodeVarintRequiredexample(data, i, uint64(len(*m.Field14))) + i += copy(data[i:], *m.Field14) + } + if m.Field15 == nil { + return 0, github_com_gogo_protobuf_proto.NewRequiredNotSetError("Field15") + } else { + data[i] = 0x7a + i++ + i = encodeVarintRequiredexample(data, i, uint64(len(m.Field15))) + i += copy(data[i:], m.Field15) + } + if m.XXX_unrecognized != nil { + i += copy(data[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *NestedNinOptNative) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *NestedNinOptNative) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.NestedNinOpts) > 0 { + for _, msg := range m.NestedNinOpts { + data[i] = 0xa + i++ + i = encodeVarintRequiredexample(data, i, uint64(msg.Size())) + n, err := msg.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n + } + } + if m.XXX_unrecognized != nil { + i += copy(data[i:], m.XXX_unrecognized) + } + return i, nil +} + +func encodeFixed64Requiredexample(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 encodeFixed32Requiredexample(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 encodeVarintRequiredexample(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 NewPopulatedRequiredExample(r randyRequiredexample, easy bool) *RequiredExample { + this := &RequiredExample{} + v1 := randStringRequiredexample(r) + this.TheRequiredString = &v1 + if r.Intn(10) != 0 { + v2 := randStringRequiredexample(r) + this.TheOptionalString = &v2 + } + if r.Intn(10) != 0 { + v3 := r.Intn(10) + this.TheRepeatedStrings = make([]string, v3) + for i := 0; i < v3; i++ { + this.TheRepeatedStrings[i] = randStringRequiredexample(r) + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedRequiredexample(r, 4) + } + return this +} + +func NewPopulatedNidOptNative(r randyRequiredexample, easy bool) *NidOptNative { + this := &NidOptNative{} + this.Field1 = float64(r.Float64()) + if r.Intn(2) == 0 { + this.Field1 *= -1 + } + this.Field2 = float32(r.Float32()) + if r.Intn(2) == 0 { + this.Field2 *= -1 + } + this.Field3 = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Field3 *= -1 + } + this.Field4 = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Field4 *= -1 + } + this.Field5 = uint32(r.Uint32()) + this.Field6 = uint64(uint64(r.Uint32())) + this.Field7 = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Field7 *= -1 + } + this.Field8 = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Field8 *= -1 + } + this.Field9 = uint32(r.Uint32()) + this.Field10 = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Field10 *= -1 + } + this.Field11 = uint64(uint64(r.Uint32())) + this.Field12 = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Field12 *= -1 + } + this.Field13 = bool(bool(r.Intn(2) == 0)) + this.Field14 = randStringRequiredexample(r) + v4 := r.Intn(100) + this.Field15 = make([]byte, v4) + for i := 0; i < v4; i++ { + this.Field15[i] = byte(r.Intn(256)) + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedRequiredexample(r, 16) + } + return this +} + +func NewPopulatedNinOptNative(r randyRequiredexample, easy bool) *NinOptNative { + this := &NinOptNative{} + v5 := float64(r.Float64()) + if r.Intn(2) == 0 { + v5 *= -1 + } + this.Field1 = &v5 + v6 := float32(r.Float32()) + if r.Intn(2) == 0 { + v6 *= -1 + } + this.Field2 = &v6 + v7 := int32(r.Int31()) + if r.Intn(2) == 0 { + v7 *= -1 + } + this.Field3 = &v7 + v8 := int64(r.Int63()) + if r.Intn(2) == 0 { + v8 *= -1 + } + this.Field4 = &v8 + v9 := uint32(r.Uint32()) + this.Field5 = &v9 + v10 := uint64(uint64(r.Uint32())) + this.Field6 = &v10 + v11 := int32(r.Int31()) + if r.Intn(2) == 0 { + v11 *= -1 + } + this.Field7 = &v11 + v12 := int64(r.Int63()) + if r.Intn(2) == 0 { + v12 *= -1 + } + this.Field8 = &v12 + v13 := uint32(r.Uint32()) + this.Field9 = &v13 + v14 := int32(r.Int31()) + if r.Intn(2) == 0 { + v14 *= -1 + } + this.Field10 = &v14 + v15 := uint64(uint64(r.Uint32())) + this.Field11 = &v15 + v16 := int64(r.Int63()) + if r.Intn(2) == 0 { + v16 *= -1 + } + this.Field12 = &v16 + v17 := bool(bool(r.Intn(2) == 0)) + this.Field13 = &v17 + v18 := randStringRequiredexample(r) + this.Field14 = &v18 + v19 := r.Intn(100) + this.Field15 = make([]byte, v19) + for i := 0; i < v19; i++ { + this.Field15[i] = byte(r.Intn(256)) + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedRequiredexample(r, 16) + } + return this +} + +func NewPopulatedNestedNinOptNative(r randyRequiredexample, easy bool) *NestedNinOptNative { + this := &NestedNinOptNative{} + if r.Intn(10) != 0 { + v20 := r.Intn(5) + this.NestedNinOpts = make([]*NinOptNative, v20) + for i := 0; i < v20; i++ { + this.NestedNinOpts[i] = NewPopulatedNinOptNative(r, easy) + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedRequiredexample(r, 2) + } + return this +} + +type randyRequiredexample interface { + Float32() float32 + Float64() float64 + Int63() int64 + Int31() int32 + Uint32() uint32 + Intn(n int) int +} + +func randUTF8RuneRequiredexample(r randyRequiredexample) 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 randStringRequiredexample(r randyRequiredexample) string { + v21 := r.Intn(100) + tmps := make([]rune, v21) + for i := 0; i < v21; i++ { + tmps[i] = randUTF8RuneRequiredexample(r) + } + return string(tmps) +} +func randUnrecognizedRequiredexample(r randyRequiredexample, 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 = randFieldRequiredexample(data, r, fieldNumber, wire) + } + return data +} +func randFieldRequiredexample(data []byte, r randyRequiredexample, fieldNumber int, wire int) []byte { + key := uint32(fieldNumber)<<3 | uint32(wire) + switch wire { + case 0: + data = encodeVarintPopulateRequiredexample(data, uint64(key)) + v22 := r.Int63() + if r.Intn(2) == 0 { + v22 *= -1 + } + data = encodeVarintPopulateRequiredexample(data, uint64(v22)) + case 1: + data = encodeVarintPopulateRequiredexample(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 = encodeVarintPopulateRequiredexample(data, uint64(key)) + ll := r.Intn(100) + data = encodeVarintPopulateRequiredexample(data, uint64(ll)) + for j := 0; j < ll; j++ { + data = append(data, byte(r.Intn(256))) + } + default: + data = encodeVarintPopulateRequiredexample(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 encodeVarintPopulateRequiredexample(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 *RequiredExample) Size() (n int) { + var l int + _ = l + if m.TheRequiredString != nil { + l = len(*m.TheRequiredString) + n += 1 + l + sovRequiredexample(uint64(l)) + } + if m.TheOptionalString != nil { + l = len(*m.TheOptionalString) + n += 1 + l + sovRequiredexample(uint64(l)) + } + if len(m.TheRepeatedStrings) > 0 { + for _, s := range m.TheRepeatedStrings { + l = len(s) + n += 1 + l + sovRequiredexample(uint64(l)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NidOptNative) Size() (n int) { + var l int + _ = l + n += 9 + n += 5 + n += 1 + sovRequiredexample(uint64(m.Field3)) + n += 1 + sovRequiredexample(uint64(m.Field4)) + n += 1 + sovRequiredexample(uint64(m.Field5)) + n += 1 + sovRequiredexample(uint64(m.Field6)) + n += 1 + sozRequiredexample(uint64(m.Field7)) + n += 1 + sozRequiredexample(uint64(m.Field8)) + n += 5 + n += 5 + n += 9 + n += 9 + n += 2 + l = len(m.Field14) + n += 1 + l + sovRequiredexample(uint64(l)) + if m.Field15 != nil { + l = len(m.Field15) + n += 1 + l + sovRequiredexample(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NinOptNative) Size() (n int) { + var l int + _ = l + if m.Field1 != nil { + n += 9 + } + if m.Field2 != nil { + n += 5 + } + if m.Field3 != nil { + n += 1 + sovRequiredexample(uint64(*m.Field3)) + } + if m.Field4 != nil { + n += 1 + sovRequiredexample(uint64(*m.Field4)) + } + if m.Field5 != nil { + n += 1 + sovRequiredexample(uint64(*m.Field5)) + } + if m.Field6 != nil { + n += 1 + sovRequiredexample(uint64(*m.Field6)) + } + if m.Field7 != nil { + n += 1 + sozRequiredexample(uint64(*m.Field7)) + } + if m.Field8 != nil { + n += 1 + sozRequiredexample(uint64(*m.Field8)) + } + if m.Field9 != nil { + n += 5 + } + if m.Field10 != nil { + n += 5 + } + if m.Field11 != nil { + n += 9 + } + if m.Field12 != nil { + n += 9 + } + if m.Field13 != nil { + n += 2 + } + if m.Field14 != nil { + l = len(*m.Field14) + n += 1 + l + sovRequiredexample(uint64(l)) + } + if m.Field15 != nil { + l = len(m.Field15) + n += 1 + l + sovRequiredexample(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NestedNinOptNative) Size() (n int) { + var l int + _ = l + if len(m.NestedNinOpts) > 0 { + for _, e := range m.NestedNinOpts { + l = e.Size() + n += 1 + l + sovRequiredexample(uint64(l)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func sovRequiredexample(x uint64) (n int) { + for { + n++ + x >>= 7 + if x == 0 { + break + } + } + return n +} +func sozRequiredexample(x uint64) (n int) { + return sovRequiredexample(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *RequiredExample) 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 ErrIntOverflowRequiredexample + } + 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: RequiredExample: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: RequiredExample: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field TheRequiredString", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRequiredexample + } + 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 ErrInvalidLengthRequiredexample + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + s := string(data[iNdEx:postIndex]) + m.TheRequiredString = &s + iNdEx = postIndex + hasFields[0] |= uint64(0x00000001) + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field TheOptionalString", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRequiredexample + } + 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 ErrInvalidLengthRequiredexample + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + s := string(data[iNdEx:postIndex]) + m.TheOptionalString = &s + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field TheRepeatedStrings", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRequiredexample + } + 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 ErrInvalidLengthRequiredexample + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.TheRepeatedStrings = append(m.TheRepeatedStrings, string(data[iNdEx:postIndex])) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipRequiredexample(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthRequiredexample + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + if hasFields[0]&uint64(0x00000001) == 0 { + return github_com_gogo_protobuf_proto.NewRequiredNotSetError("theRequiredString") + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *NidOptNative) 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 ErrIntOverflowRequiredexample + } + 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: NidOptNative: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: NidOptNative: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field Field1", 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.Field1 = float64(math.Float64frombits(v)) + hasFields[0] |= uint64(0x00000001) + case 2: + if wireType != 5 { + return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType) + } + var v uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + iNdEx += 4 + v = uint32(data[iNdEx-4]) + v |= uint32(data[iNdEx-3]) << 8 + v |= uint32(data[iNdEx-2]) << 16 + v |= uint32(data[iNdEx-1]) << 24 + m.Field2 = float32(math.Float32frombits(v)) + hasFields[0] |= uint64(0x00000002) + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field3", wireType) + } + m.Field3 = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRequiredexample + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + m.Field3 |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + hasFields[0] |= uint64(0x00000004) + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field4", wireType) + } + m.Field4 = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRequiredexample + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + m.Field4 |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + hasFields[0] |= uint64(0x00000008) + case 5: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field5", wireType) + } + m.Field5 = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRequiredexample + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + m.Field5 |= (uint32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + hasFields[0] |= uint64(0x00000010) + case 6: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field6", wireType) + } + m.Field6 = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRequiredexample + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + m.Field6 |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + hasFields[0] |= uint64(0x00000020) + case 7: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field7", wireType) + } + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRequiredexample + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + v = int32((uint32(v) >> 1) ^ uint32(((v&1)<<31)>>31)) + m.Field7 = v + hasFields[0] |= uint64(0x00000040) + case 8: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field8", wireType) + } + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRequiredexample + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + v = (v >> 1) ^ uint64((int64(v&1)<<63)>>63) + m.Field8 = int64(v) + hasFields[0] |= uint64(0x00000080) + case 9: + if wireType != 5 { + return fmt.Errorf("proto: wrong wireType = %d for field Field9", wireType) + } + m.Field9 = 0 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + iNdEx += 4 + m.Field9 = uint32(data[iNdEx-4]) + m.Field9 |= uint32(data[iNdEx-3]) << 8 + m.Field9 |= uint32(data[iNdEx-2]) << 16 + m.Field9 |= uint32(data[iNdEx-1]) << 24 + hasFields[0] |= uint64(0x00000100) + case 10: + if wireType != 5 { + return fmt.Errorf("proto: wrong wireType = %d for field Field10", wireType) + } + m.Field10 = 0 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + iNdEx += 4 + m.Field10 = int32(data[iNdEx-4]) + m.Field10 |= int32(data[iNdEx-3]) << 8 + m.Field10 |= int32(data[iNdEx-2]) << 16 + m.Field10 |= int32(data[iNdEx-1]) << 24 + hasFields[0] |= uint64(0x00000200) + case 11: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field Field11", wireType) + } + m.Field11 = 0 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + iNdEx += 8 + m.Field11 = uint64(data[iNdEx-8]) + m.Field11 |= uint64(data[iNdEx-7]) << 8 + m.Field11 |= uint64(data[iNdEx-6]) << 16 + m.Field11 |= uint64(data[iNdEx-5]) << 24 + m.Field11 |= uint64(data[iNdEx-4]) << 32 + m.Field11 |= uint64(data[iNdEx-3]) << 40 + m.Field11 |= uint64(data[iNdEx-2]) << 48 + m.Field11 |= uint64(data[iNdEx-1]) << 56 + hasFields[0] |= uint64(0x00000400) + case 12: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field Field12", wireType) + } + m.Field12 = 0 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + iNdEx += 8 + m.Field12 = int64(data[iNdEx-8]) + m.Field12 |= int64(data[iNdEx-7]) << 8 + m.Field12 |= int64(data[iNdEx-6]) << 16 + m.Field12 |= int64(data[iNdEx-5]) << 24 + m.Field12 |= int64(data[iNdEx-4]) << 32 + m.Field12 |= int64(data[iNdEx-3]) << 40 + m.Field12 |= int64(data[iNdEx-2]) << 48 + m.Field12 |= int64(data[iNdEx-1]) << 56 + hasFields[0] |= uint64(0x00000800) + case 13: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field13", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRequiredexample + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field13 = bool(v != 0) + hasFields[0] |= uint64(0x00001000) + case 14: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field14", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRequiredexample + } + 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 ErrInvalidLengthRequiredexample + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Field14 = string(data[iNdEx:postIndex]) + iNdEx = postIndex + hasFields[0] |= uint64(0x00002000) + case 15: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field15", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRequiredexample + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthRequiredexample + } + postIndex := iNdEx + byteLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Field15 = append(m.Field15[:0], data[iNdEx:postIndex]...) + if m.Field15 == nil { + m.Field15 = []byte{} + } + iNdEx = postIndex + hasFields[0] |= uint64(0x00004000) + default: + iNdEx = preIndex + skippy, err := skipRequiredexample(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthRequiredexample + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + if hasFields[0]&uint64(0x00000001) == 0 { + return github_com_gogo_protobuf_proto.NewRequiredNotSetError("Field1") + } + if hasFields[0]&uint64(0x00000002) == 0 { + return github_com_gogo_protobuf_proto.NewRequiredNotSetError("Field2") + } + if hasFields[0]&uint64(0x00000004) == 0 { + return github_com_gogo_protobuf_proto.NewRequiredNotSetError("Field3") + } + if hasFields[0]&uint64(0x00000008) == 0 { + return github_com_gogo_protobuf_proto.NewRequiredNotSetError("Field4") + } + if hasFields[0]&uint64(0x00000010) == 0 { + return github_com_gogo_protobuf_proto.NewRequiredNotSetError("Field5") + } + if hasFields[0]&uint64(0x00000020) == 0 { + return github_com_gogo_protobuf_proto.NewRequiredNotSetError("Field6") + } + if hasFields[0]&uint64(0x00000040) == 0 { + return github_com_gogo_protobuf_proto.NewRequiredNotSetError("Field7") + } + if hasFields[0]&uint64(0x00000080) == 0 { + return github_com_gogo_protobuf_proto.NewRequiredNotSetError("Field8") + } + if hasFields[0]&uint64(0x00000100) == 0 { + return github_com_gogo_protobuf_proto.NewRequiredNotSetError("Field9") + } + if hasFields[0]&uint64(0x00000200) == 0 { + return github_com_gogo_protobuf_proto.NewRequiredNotSetError("Field10") + } + if hasFields[0]&uint64(0x00000400) == 0 { + return github_com_gogo_protobuf_proto.NewRequiredNotSetError("Field11") + } + if hasFields[0]&uint64(0x00000800) == 0 { + return github_com_gogo_protobuf_proto.NewRequiredNotSetError("Field12") + } + if hasFields[0]&uint64(0x00001000) == 0 { + return github_com_gogo_protobuf_proto.NewRequiredNotSetError("Field13") + } + if hasFields[0]&uint64(0x00002000) == 0 { + return github_com_gogo_protobuf_proto.NewRequiredNotSetError("Field14") + } + if hasFields[0]&uint64(0x00004000) == 0 { + return github_com_gogo_protobuf_proto.NewRequiredNotSetError("Field15") + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *NinOptNative) 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 ErrIntOverflowRequiredexample + } + 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: NinOptNative: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: NinOptNative: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field Field1", 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.Field1 = &v2 + hasFields[0] |= uint64(0x00000001) + case 2: + if wireType != 5 { + return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType) + } + var v uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + iNdEx += 4 + v = uint32(data[iNdEx-4]) + v |= uint32(data[iNdEx-3]) << 8 + v |= uint32(data[iNdEx-2]) << 16 + v |= uint32(data[iNdEx-1]) << 24 + v2 := float32(math.Float32frombits(v)) + m.Field2 = &v2 + hasFields[0] |= uint64(0x00000002) + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field3", wireType) + } + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRequiredexample + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field3 = &v + hasFields[0] |= uint64(0x00000004) + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field4", wireType) + } + var v int64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRequiredexample + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field4 = &v + hasFields[0] |= uint64(0x00000008) + case 5: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field5", wireType) + } + var v uint32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRequiredexample + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (uint32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field5 = &v + hasFields[0] |= uint64(0x00000010) + case 6: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field6", wireType) + } + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRequiredexample + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field6 = &v + hasFields[0] |= uint64(0x00000020) + case 7: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field7", wireType) + } + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRequiredexample + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + v = int32((uint32(v) >> 1) ^ uint32(((v&1)<<31)>>31)) + m.Field7 = &v + hasFields[0] |= uint64(0x00000040) + case 8: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field8", wireType) + } + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRequiredexample + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + v = (v >> 1) ^ uint64((int64(v&1)<<63)>>63) + v2 := int64(v) + m.Field8 = &v2 + hasFields[0] |= uint64(0x00000080) + case 9: + if wireType != 5 { + return fmt.Errorf("proto: wrong wireType = %d for field Field9", wireType) + } + var v uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + iNdEx += 4 + v = uint32(data[iNdEx-4]) + v |= uint32(data[iNdEx-3]) << 8 + v |= uint32(data[iNdEx-2]) << 16 + v |= uint32(data[iNdEx-1]) << 24 + m.Field9 = &v + hasFields[0] |= uint64(0x00000100) + case 10: + if wireType != 5 { + return fmt.Errorf("proto: wrong wireType = %d for field Field10", wireType) + } + var v int32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + iNdEx += 4 + v = int32(data[iNdEx-4]) + v |= int32(data[iNdEx-3]) << 8 + v |= int32(data[iNdEx-2]) << 16 + v |= int32(data[iNdEx-1]) << 24 + m.Field10 = &v + hasFields[0] |= uint64(0x00000200) + case 11: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field Field11", 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.Field11 = &v + hasFields[0] |= uint64(0x00000400) + case 12: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field Field12", wireType) + } + var v int64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + iNdEx += 8 + v = int64(data[iNdEx-8]) + v |= int64(data[iNdEx-7]) << 8 + v |= int64(data[iNdEx-6]) << 16 + v |= int64(data[iNdEx-5]) << 24 + v |= int64(data[iNdEx-4]) << 32 + v |= int64(data[iNdEx-3]) << 40 + v |= int64(data[iNdEx-2]) << 48 + v |= int64(data[iNdEx-1]) << 56 + m.Field12 = &v + hasFields[0] |= uint64(0x00000800) + case 13: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field13", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRequiredexample + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + b := bool(v != 0) + m.Field13 = &b + hasFields[0] |= uint64(0x00001000) + case 14: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field14", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRequiredexample + } + 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 ErrInvalidLengthRequiredexample + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + s := string(data[iNdEx:postIndex]) + m.Field14 = &s + iNdEx = postIndex + hasFields[0] |= uint64(0x00002000) + case 15: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field15", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRequiredexample + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthRequiredexample + } + postIndex := iNdEx + byteLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Field15 = append(m.Field15[:0], data[iNdEx:postIndex]...) + if m.Field15 == nil { + m.Field15 = []byte{} + } + iNdEx = postIndex + hasFields[0] |= uint64(0x00004000) + default: + iNdEx = preIndex + skippy, err := skipRequiredexample(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthRequiredexample + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + if hasFields[0]&uint64(0x00000001) == 0 { + return github_com_gogo_protobuf_proto.NewRequiredNotSetError("Field1") + } + if hasFields[0]&uint64(0x00000002) == 0 { + return github_com_gogo_protobuf_proto.NewRequiredNotSetError("Field2") + } + if hasFields[0]&uint64(0x00000004) == 0 { + return github_com_gogo_protobuf_proto.NewRequiredNotSetError("Field3") + } + if hasFields[0]&uint64(0x00000008) == 0 { + return github_com_gogo_protobuf_proto.NewRequiredNotSetError("Field4") + } + if hasFields[0]&uint64(0x00000010) == 0 { + return github_com_gogo_protobuf_proto.NewRequiredNotSetError("Field5") + } + if hasFields[0]&uint64(0x00000020) == 0 { + return github_com_gogo_protobuf_proto.NewRequiredNotSetError("Field6") + } + if hasFields[0]&uint64(0x00000040) == 0 { + return github_com_gogo_protobuf_proto.NewRequiredNotSetError("Field7") + } + if hasFields[0]&uint64(0x00000080) == 0 { + return github_com_gogo_protobuf_proto.NewRequiredNotSetError("Field8") + } + if hasFields[0]&uint64(0x00000100) == 0 { + return github_com_gogo_protobuf_proto.NewRequiredNotSetError("Field9") + } + if hasFields[0]&uint64(0x00000200) == 0 { + return github_com_gogo_protobuf_proto.NewRequiredNotSetError("Field10") + } + if hasFields[0]&uint64(0x00000400) == 0 { + return github_com_gogo_protobuf_proto.NewRequiredNotSetError("Field11") + } + if hasFields[0]&uint64(0x00000800) == 0 { + return github_com_gogo_protobuf_proto.NewRequiredNotSetError("Field12") + } + if hasFields[0]&uint64(0x00001000) == 0 { + return github_com_gogo_protobuf_proto.NewRequiredNotSetError("Field13") + } + if hasFields[0]&uint64(0x00002000) == 0 { + return github_com_gogo_protobuf_proto.NewRequiredNotSetError("Field14") + } + if hasFields[0]&uint64(0x00004000) == 0 { + return github_com_gogo_protobuf_proto.NewRequiredNotSetError("Field15") + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *NestedNinOptNative) 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 ErrIntOverflowRequiredexample + } + 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: NestedNinOptNative: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: NestedNinOptNative: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NestedNinOpts", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRequiredexample + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthRequiredexample + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.NestedNinOpts = append(m.NestedNinOpts, &NinOptNative{}) + if err := m.NestedNinOpts[len(m.NestedNinOpts)-1].Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipRequiredexample(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthRequiredexample + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipRequiredexample(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, ErrIntOverflowRequiredexample + } + 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, ErrIntOverflowRequiredexample + } + 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, ErrIntOverflowRequiredexample + } + 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, ErrInvalidLengthRequiredexample + } + return iNdEx, nil + case 3: + for { + var innerWire uint64 + var start int = iNdEx + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowRequiredexample + } + 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 := skipRequiredexample(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 ( + ErrInvalidLengthRequiredexample = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowRequiredexample = fmt.Errorf("proto: integer overflow") +) + +var fileDescriptorRequiredexample = []byte{ + // 467 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0x6c, 0xd4, 0x4d, 0x6e, 0xd3, 0x40, + 0x14, 0xc0, 0x71, 0x6c, 0xa7, 0x49, 0x3a, 0x4d, 0x48, 0x3b, 0x12, 0xa3, 0x27, 0x84, 0x42, 0x94, + 0x55, 0x16, 0xe0, 0x36, 0x4e, 0xd2, 0x0f, 0x89, 0x55, 0x25, 0x58, 0x06, 0xc9, 0x9c, 0x20, 0x25, + 0x53, 0xd7, 0x52, 0x6a, 0x1b, 0xc7, 0x41, 0xac, 0xb9, 0x07, 0xf7, 0xe9, 0x92, 0x03, 0x20, 0x04, + 0x9c, 0x82, 0x25, 0x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xfd, 0xaa, 0xf1, + 0xf7, 0xc7, 0xc3, 0x7e, 0xb2, 0x3f, 0x7c, 0x7d, 0xfc, 0xfb, 0xe7, 0xd0, 0x79, 0xf8, 0x35, 0x74, + 0xbe, 0xe2, 0xf1, 0x03, 0x8f, 0x3f, 0x01, 0x00, 0x00, 0xff, 0xff, 0x53, 0xd6, 0x6e, 0xf7, 0xba, + 0x04, 0x00, 0x00, +} diff --git a/vendor/github.com/gogo/protobuf/test/required/requiredexample.proto b/vendor/github.com/gogo/protobuf/test/required/requiredexample.proto new file mode 100644 index 000000000..a86feb416 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/required/requiredexample.proto @@ -0,0 +1,55 @@ +syntax = "proto2"; +package required; + +import "github.com/gogo/protobuf/gogoproto/gogo.proto"; + +option (gogoproto.marshaler_all) = true; +option (gogoproto.sizer_all) = true; +option (gogoproto.unmarshaler_all) = true; +option (gogoproto.populate_all) = true; + +message RequiredExample { + required string theRequiredString = 1; + optional string theOptionalString = 2; + repeated string theRepeatedStrings = 3; +} + +message NidOptNative { + required double Field1 = 1 [(gogoproto.nullable) = false]; + required float Field2 = 2 [(gogoproto.nullable) = false]; + required int32 Field3 = 3 [(gogoproto.nullable) = false]; + required int64 Field4 = 4 [(gogoproto.nullable) = false]; + required uint32 Field5 = 5 [(gogoproto.nullable) = false]; + required uint64 Field6 = 6 [(gogoproto.nullable) = false]; + required sint32 Field7 = 7 [(gogoproto.nullable) = false]; + required sint64 Field8 = 8 [(gogoproto.nullable) = false]; + required fixed32 Field9 = 9 [(gogoproto.nullable) = false]; + required sfixed32 Field10 = 10 [(gogoproto.nullable) = false]; + required fixed64 Field11 = 11 [(gogoproto.nullable) = false]; + required sfixed64 Field12 = 12 [(gogoproto.nullable) = false]; + required bool Field13 = 13 [(gogoproto.nullable) = false]; + required string Field14 = 14 [(gogoproto.nullable) = false]; + required bytes Field15 = 15 [(gogoproto.nullable) = false]; +} + +message NinOptNative { + required double Field1 = 1; + required float Field2 = 2; + required int32 Field3 = 3; + required int64 Field4 = 4; + required uint32 Field5 = 5; + required uint64 Field6 = 6; + required sint32 Field7 = 7; + required sint64 Field8 = 8; + required fixed32 Field9 = 9; + required sfixed32 Field10 = 10; + required fixed64 Field11 = 11; + required sfixed64 Field12 = 12; + required bool Field13 = 13; + required string Field14 = 14; + required bytes Field15 = 15; +} + +message NestedNinOptNative { + repeated NinOptNative NestedNinOpts = 1; +} diff --git a/vendor/github.com/gogo/protobuf/test/required/requiredexamplepb_test.go b/vendor/github.com/gogo/protobuf/test/required/requiredexamplepb_test.go new file mode 100644 index 000000000..af5bd7c95 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/required/requiredexamplepb_test.go @@ -0,0 +1,153 @@ +package required + +import ( + "github.com/gogo/protobuf/proto" + "github.com/gogo/protobuf/test" + "math/rand" + "reflect" + "strconv" + "testing" + "time" +) + +func TestMarshalToErrorsWhenRequiredFieldIsNotPresent(t *testing.T) { + data := RequiredExample{} + buf, err := proto.Marshal(&data) + if err == nil { + t.Fatalf("err == nil; was %v instead", err) + } + if err.Error() != `proto: required field "theRequiredString" not set` { + t.Fatalf(`err.Error() != "proto: required field "theRequiredString" not set"; was "%s" instead`, err.Error()) + } + if len(buf) != 0 { + t.Fatalf(`len(buf) != 0; was %d instead`, len(buf)) + } +} + +func TestMarshalToSucceedsWhenRequiredFieldIsPresent(t *testing.T) { + data := RequiredExample{ + TheRequiredString: proto.String("present"), + } + buf, err := proto.Marshal(&data) + if err != nil { + t.Fatalf("err != nil; was %v instead", err) + } + if len(buf) == 0 { + t.Fatalf(`len(buf) == 0; expected nonzero`) + } +} + +func TestUnmarshalErrorsWhenRequiredFieldIsNotPresent(t *testing.T) { + missingRequiredField := []byte{0x12, 0x8, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c} + data := RequiredExample{} + err := proto.Unmarshal(missingRequiredField, &data) + if err == nil { + t.Fatalf("err == nil; was %v instead", err) + } + if err.Error() != `proto: required field "theRequiredString" not set` { + t.Fatalf(`err.Error() != "proto: required field "theRequiredString" not set"; was "%s" instead`, err.Error()) + } +} + +func TestUnmarshalSucceedsWhenRequiredIsNotPresent(t *testing.T) { + dataOut := RequiredExample{ + TheRequiredString: proto.String("present"), + } + encodedMessage, err := proto.Marshal(&dataOut) + if err != nil { + t.Fatalf("Unexpected error when marshalling dataOut: %v", err) + } + dataIn := RequiredExample{} + err = proto.Unmarshal(encodedMessage, &dataIn) + if err != nil { + t.Fatalf("err != nil; was %v instead", err) + } +} + +func TestUnmarshalPopulatedOptionalFieldsAsRequiredSucceeds(t *testing.T) { + r := rand.New(rand.NewSource(time.Now().UnixNano())) + dataOut := test.NewPopulatedNidOptNative(r, true) + encodedMessage, err := proto.Marshal(dataOut) + if err != nil { + t.Fatalf("Unexpected error when marshalling dataOut: %v", err) + } + dataIn := NidOptNative{} + err = proto.Unmarshal(encodedMessage, &dataIn) + if err != nil { + t.Fatalf("err != nil; was %v instead", err) + } +} + +func TestUnmarshalPartiallyPopulatedOptionalFieldsFails(t *testing.T) { + // Fill in all fields, then randomly remove one. + dataOut := &test.NinOptNative{ + Field1: proto.Float64(0), + Field2: proto.Float32(0), + Field3: proto.Int32(0), + Field4: proto.Int64(0), + Field5: proto.Uint32(0), + Field6: proto.Uint64(0), + Field7: proto.Int32(0), + Field8: proto.Int64(0), + Field9: proto.Uint32(0), + Field10: proto.Int32(0), + Field11: proto.Uint64(0), + Field12: proto.Int64(0), + Field13: proto.Bool(false), + Field14: proto.String("0"), + Field15: []byte("0"), + } + r := rand.New(rand.NewSource(time.Now().UnixNano())) + fieldName := "Field" + strconv.Itoa(r.Intn(15)+1) + field := reflect.ValueOf(dataOut).Elem().FieldByName(fieldName) + fieldType := field.Type() + field.Set(reflect.Zero(fieldType)) + encodedMessage, err := proto.Marshal(dataOut) + if err != nil { + t.Fatalf("Unexpected error when marshalling dataOut: %v", err) + } + dataIn := NidOptNative{} + err = proto.Unmarshal(encodedMessage, &dataIn) + if err.Error() != `proto: required field "`+fieldName+`" not set` { + t.Fatalf(`err.Error() != "proto: required field "`+fieldName+`" not set"; was "%s" instead`, err.Error()) + } +} + +func TestMarshalFailsWithoutAllFieldsSet(t *testing.T) { + r := rand.New(rand.NewSource(time.Now().UnixNano())) + dataOut := NewPopulatedNinOptNative(r, true) + fieldName := "Field" + strconv.Itoa(r.Intn(15)+1) + field := reflect.ValueOf(dataOut).Elem().FieldByName(fieldName) + fieldType := field.Type() + field.Set(reflect.Zero(fieldType)) + encodedMessage, err := proto.Marshal(dataOut) + if err.Error() != `proto: required field "`+fieldName+`" not set` { + t.Fatalf(`err.Error() != "proto: required field "`+fieldName+`" not set"; was "%s" instead`, err.Error()) + } + if len(encodedMessage) > 0 { + t.Fatalf("Got some bytes from marshal, expected none.") + } +} + +func TestMissingFieldsOnRepeatedNestedTypes(t *testing.T) { + r := rand.New(rand.NewSource(time.Now().UnixNano())) + dataOut := &NestedNinOptNative{ + NestedNinOpts: []*NinOptNative{ + NewPopulatedNinOptNative(r, true), + NewPopulatedNinOptNative(r, true), + NewPopulatedNinOptNative(r, true), + }, + } + middle := dataOut.GetNestedNinOpts()[1] + fieldName := "Field" + strconv.Itoa(r.Intn(15)+1) + field := reflect.ValueOf(middle).Elem().FieldByName(fieldName) + fieldType := field.Type() + field.Set(reflect.Zero(fieldType)) + encodedMessage, err := proto.Marshal(dataOut) + if err.Error() != `proto: required field "`+fieldName+`" not set` { + t.Fatalf(`err.Error() != "proto: required field "`+fieldName+`" not set"; was "%s" instead`, err.Error()) + } + if len(encodedMessage) > 0 { + t.Fatalf("Got some bytes from marshal, expected none.") + } +} diff --git a/vendor/github.com/gogo/protobuf/test/sizeunderscore/Makefile b/vendor/github.com/gogo/protobuf/test/sizeunderscore/Makefile new file mode 100644 index 000000000..4cc62baaa --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/sizeunderscore/Makefile @@ -0,0 +1,30 @@ +# Extensions for Protocol Buffers to create more go like structures. +# +# Copyright (c) 2013, Vastech SA (PTY) LTD. 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: + (protoc --proto_path=../../../../../:../../protobuf/:. --gogo_out=. sizeunderscore.proto) diff --git a/vendor/github.com/gogo/protobuf/test/sizeunderscore/sizeunderscore.pb.go b/vendor/github.com/gogo/protobuf/test/sizeunderscore/sizeunderscore.pb.go new file mode 100644 index 000000000..fe3529aa9 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/sizeunderscore/sizeunderscore.pb.go @@ -0,0 +1,563 @@ +// Code generated by protoc-gen-gogo. +// source: sizeunderscore.proto +// DO NOT EDIT! + +/* + Package sizeunderscore is a generated protocol buffer package. + + It is generated from these files: + sizeunderscore.proto + + It has these top-level messages: + SizeMessage +*/ +package sizeunderscore + +import proto "github.com/gogo/protobuf/proto" +import fmt "fmt" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" + +import bytes "bytes" + +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. +const _ = proto.GoGoProtoPackageIsVersion1 + +type SizeMessage struct { + Size_ *int64 `protobuf:"varint,1,opt,name=size" json:"size,omitempty"` + Equal_ *bool `protobuf:"varint,2,opt,name=Equal,json=equal" json:"Equal,omitempty"` + String_ *string `protobuf:"bytes,3,opt,name=String,json=string" json:"String,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *SizeMessage) Reset() { *m = SizeMessage{} } +func (m *SizeMessage) String() string { return proto.CompactTextString(m) } +func (*SizeMessage) ProtoMessage() {} +func (*SizeMessage) Descriptor() ([]byte, []int) { return fileDescriptorSizeunderscore, []int{0} } + +func (m *SizeMessage) GetSize_() int64 { + if m != nil && m.Size_ != nil { + return *m.Size_ + } + return 0 +} + +func (m *SizeMessage) GetEqual_() bool { + if m != nil && m.Equal_ != nil { + return *m.Equal_ + } + return false +} + +func (m *SizeMessage) GetString_() string { + if m != nil && m.String_ != nil { + return *m.String_ + } + return "" +} + +func init() { + proto.RegisterType((*SizeMessage)(nil), "sizeunderscore.SizeMessage") +} +func (this *SizeMessage) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*SizeMessage) + if !ok { + that2, ok := that.(SizeMessage) + 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_ != 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.Equal_ != nil && that1.Equal_ != nil { + if *this.Equal_ != *that1.Equal_ { + return false + } + } else if this.Equal_ != nil { + return false + } else if that1.Equal_ != nil { + return false + } + if this.String_ != nil && that1.String_ != nil { + if *this.String_ != *that1.String_ { + return false + } + } else if this.String_ != nil { + return false + } else if that1.String_ != nil { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (m *SizeMessage) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *SizeMessage) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Size_ != nil { + data[i] = 0x8 + i++ + i = encodeVarintSizeunderscore(data, i, uint64(*m.Size_)) + } + if m.Equal_ != nil { + data[i] = 0x10 + i++ + if *m.Equal_ { + data[i] = 1 + } else { + data[i] = 0 + } + i++ + } + if m.String_ != nil { + data[i] = 0x1a + i++ + i = encodeVarintSizeunderscore(data, i, uint64(len(*m.String_))) + i += copy(data[i:], *m.String_) + } + if m.XXX_unrecognized != nil { + i += copy(data[i:], m.XXX_unrecognized) + } + return i, nil +} + +func encodeFixed64Sizeunderscore(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 encodeFixed32Sizeunderscore(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 encodeVarintSizeunderscore(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 NewPopulatedSizeMessage(r randySizeunderscore, easy bool) *SizeMessage { + this := &SizeMessage{} + if r.Intn(10) != 0 { + v1 := int64(r.Int63()) + if r.Intn(2) == 0 { + v1 *= -1 + } + this.Size_ = &v1 + } + if r.Intn(10) != 0 { + v2 := bool(bool(r.Intn(2) == 0)) + this.Equal_ = &v2 + } + if r.Intn(10) != 0 { + v3 := randStringSizeunderscore(r) + this.String_ = &v3 + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedSizeunderscore(r, 4) + } + return this +} + +type randySizeunderscore interface { + Float32() float32 + Float64() float64 + Int63() int64 + Int31() int32 + Uint32() uint32 + Intn(n int) int +} + +func randUTF8RuneSizeunderscore(r randySizeunderscore) 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 randStringSizeunderscore(r randySizeunderscore) string { + v4 := r.Intn(100) + tmps := make([]rune, v4) + for i := 0; i < v4; i++ { + tmps[i] = randUTF8RuneSizeunderscore(r) + } + return string(tmps) +} +func randUnrecognizedSizeunderscore(r randySizeunderscore, 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 = randFieldSizeunderscore(data, r, fieldNumber, wire) + } + return data +} +func randFieldSizeunderscore(data []byte, r randySizeunderscore, fieldNumber int, wire int) []byte { + key := uint32(fieldNumber)<<3 | uint32(wire) + switch wire { + case 0: + data = encodeVarintPopulateSizeunderscore(data, uint64(key)) + v5 := r.Int63() + if r.Intn(2) == 0 { + v5 *= -1 + } + data = encodeVarintPopulateSizeunderscore(data, uint64(v5)) + case 1: + data = encodeVarintPopulateSizeunderscore(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 = encodeVarintPopulateSizeunderscore(data, uint64(key)) + ll := r.Intn(100) + data = encodeVarintPopulateSizeunderscore(data, uint64(ll)) + for j := 0; j < ll; j++ { + data = append(data, byte(r.Intn(256))) + } + default: + data = encodeVarintPopulateSizeunderscore(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 encodeVarintPopulateSizeunderscore(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 *SizeMessage) Size() (n int) { + var l int + _ = l + if m.Size_ != nil { + n += 1 + sovSizeunderscore(uint64(*m.Size_)) + } + if m.Equal_ != nil { + n += 2 + } + if m.String_ != nil { + l = len(*m.String_) + n += 1 + l + sovSizeunderscore(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func sovSizeunderscore(x uint64) (n int) { + for { + n++ + x >>= 7 + if x == 0 { + break + } + } + return n +} +func sozSizeunderscore(x uint64) (n int) { + return sovSizeunderscore(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *SizeMessage) 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 ErrIntOverflowSizeunderscore + } + 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: SizeMessage: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: SizeMessage: 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) + } + var v int64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowSizeunderscore + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Size_ = &v + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Equal_", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowSizeunderscore + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + b := bool(v != 0) + m.Equal_ = &b + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field String_", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowSizeunderscore + } + 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 ErrInvalidLengthSizeunderscore + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + s := string(data[iNdEx:postIndex]) + m.String_ = &s + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipSizeunderscore(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthSizeunderscore + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipSizeunderscore(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, ErrIntOverflowSizeunderscore + } + 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, ErrIntOverflowSizeunderscore + } + 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, ErrIntOverflowSizeunderscore + } + 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, ErrInvalidLengthSizeunderscore + } + return iNdEx, nil + case 3: + for { + var innerWire uint64 + var start int = iNdEx + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowSizeunderscore + } + 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 := skipSizeunderscore(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 ( + ErrInvalidLengthSizeunderscore = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowSizeunderscore = fmt.Errorf("proto: integer overflow") +) + +var fileDescriptorSizeunderscore = []byte{ + // 169 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xe2, 0x12, 0x29, 0xce, 0xac, 0x4a, + 0x2d, 0xcd, 0x4b, 0x49, 0x2d, 0x2a, 0x4e, 0xce, 0x2f, 0x4a, 0xd5, 0x2b, 0x28, 0xca, 0x2f, 0xc9, + 0x17, 0xe2, 0x43, 0x15, 0x95, 0xd2, 0x4d, 0xcf, 0x2c, 0xc9, 0x28, 0x4d, 0xd2, 0x4b, 0xce, 0xcf, + 0xd5, 0x4f, 0xcf, 0x4f, 0xcf, 0xd7, 0x07, 0x2b, 0x4b, 0x2a, 0x4d, 0x03, 0xf3, 0xc0, 0x1c, 0x30, + 0x0b, 0xa2, 0x5d, 0xc9, 0x9f, 0x8b, 0x3b, 0x18, 0x68, 0x80, 0x6f, 0x6a, 0x71, 0x71, 0x62, 0x7a, + 0xaa, 0x90, 0x10, 0x17, 0x0b, 0xc8, 0x3c, 0x09, 0x46, 0x05, 0x46, 0x0d, 0xe6, 0x20, 0x30, 0x5b, + 0x48, 0x84, 0x8b, 0xd5, 0xb5, 0xb0, 0x34, 0x31, 0x47, 0x82, 0x09, 0x28, 0xc8, 0x11, 0xc4, 0x9a, + 0x0a, 0xe2, 0x08, 0x89, 0x71, 0xb1, 0x05, 0x97, 0x14, 0x65, 0xe6, 0xa5, 0x4b, 0x30, 0x03, 0x85, + 0x39, 0x83, 0xd8, 0x8a, 0xc1, 0x3c, 0x27, 0x89, 0x1f, 0x0f, 0xe5, 0x18, 0x57, 0x3c, 0x92, 0x63, + 0xdc, 0x01, 0xc4, 0x27, 0x80, 0xf8, 0x02, 0x10, 0x3f, 0x00, 0x62, 0x40, 0x00, 0x00, 0x00, 0xff, + 0xff, 0x63, 0xb6, 0xaa, 0x05, 0xc0, 0x00, 0x00, 0x00, +} diff --git a/vendor/github.com/gogo/protobuf/test/sizeunderscore/sizeunderscore.proto b/vendor/github.com/gogo/protobuf/test/sizeunderscore/sizeunderscore.proto new file mode 100644 index 000000000..75db22ff0 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/sizeunderscore/sizeunderscore.proto @@ -0,0 +1,17 @@ +syntax = "proto2"; +package sizeunderscore; + +import "github.com/gogo/protobuf/gogoproto/gogo.proto"; + +option (gogoproto.marshaler_all) = true; +option (gogoproto.sizer_all) = true; +option (gogoproto.unmarshaler_all) = true; +option (gogoproto.populate_all) = true; +option (gogoproto.testgen_all) = true; +option (gogoproto.equal_all) = true; + +message SizeMessage { + optional int64 size = 1; + optional bool Equal = 2; + optional string String = 3; +} diff --git a/vendor/github.com/gogo/protobuf/test/sizeunderscore/sizeunderscorepb_test.go b/vendor/github.com/gogo/protobuf/test/sizeunderscore/sizeunderscorepb_test.go new file mode 100644 index 000000000..06916fa1c --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/sizeunderscore/sizeunderscorepb_test.go @@ -0,0 +1,155 @@ +// Code generated by protoc-gen-gogo. +// source: sizeunderscore.proto +// DO NOT EDIT! + +/* +Package sizeunderscore is a generated protocol buffer package. + +It is generated from these files: + sizeunderscore.proto + +It has these top-level messages: + SizeMessage +*/ +package sizeunderscore + +import testing "testing" +import math_rand "math/rand" +import time "time" +import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" +import github_com_gogo_protobuf_jsonpb "github.com/gogo/protobuf/jsonpb" +import proto "github.com/gogo/protobuf/proto" +import fmt "fmt" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +func TestSizeMessageProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedSizeMessage(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &SizeMessage{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestSizeMessageMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedSizeMessage(popr, false) + size := p.Size() + data := make([]byte, size) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(data) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &SizeMessage{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestSizeMessageJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedSizeMessage(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &SizeMessage{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestSizeMessageProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedSizeMessage(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &SizeMessage{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestSizeMessageProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedSizeMessage(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &SizeMessage{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestSizeMessageSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedSizeMessage(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +//These tests are generated by github.com/gogo/protobuf/plugin/testgen diff --git a/vendor/github.com/gogo/protobuf/test/tags/Makefile b/vendor/github.com/gogo/protobuf/test/tags/Makefile new file mode 100644 index 000000000..ade15ceab --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/tags/Makefile @@ -0,0 +1,30 @@ +# Extensions for Protocol Buffers to create more go like structures. +# +# Copyright (c) 2013, Vastech SA (PTY) LTD. 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: + (protoc --proto_path=../../../../../:../../protobuf/:. --gogo_out=. tags.proto) diff --git a/vendor/github.com/gogo/protobuf/test/tags/doc.go b/vendor/github.com/gogo/protobuf/test/tags/doc.go new file mode 100644 index 000000000..2eee96184 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/tags/doc.go @@ -0,0 +1 @@ +package tags diff --git a/vendor/github.com/gogo/protobuf/test/tags/tags.pb.go b/vendor/github.com/gogo/protobuf/test/tags/tags.pb.go new file mode 100644 index 000000000..f07fa5fdf --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/tags/tags.pb.go @@ -0,0 +1,185 @@ +// Code generated by protoc-gen-gogo. +// source: tags.proto +// DO NOT EDIT! + +/* +Package tags is a generated protocol buffer package. + +It is generated from these files: + tags.proto + +It has these top-level messages: + Outside + Inside +*/ +package tags + +import proto "github.com/gogo/protobuf/proto" +import fmt "fmt" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" + +// 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. +const _ = proto.GoGoProtoPackageIsVersion1 + +type Outside struct { + *Inside `protobuf:"bytes,1,opt,name=Inside,json=inside,embedded=Inside" json:""` + Field2 *string `protobuf:"bytes,2,opt,name=Field2,json=field2" json:"MyField2" xml:",comment"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *Outside) Reset() { *m = Outside{} } +func (m *Outside) String() string { return proto.CompactTextString(m) } +func (*Outside) ProtoMessage() {} +func (*Outside) Descriptor() ([]byte, []int) { return fileDescriptorTags, []int{0} } + +func (m *Outside) GetField2() string { + if m != nil && m.Field2 != nil { + return *m.Field2 + } + return "" +} + +type Inside struct { + Field1 *string `protobuf:"bytes,1,opt,name=Field1,json=field1" json:"MyField1" xml:",chardata"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *Inside) Reset() { *m = Inside{} } +func (m *Inside) String() string { return proto.CompactTextString(m) } +func (*Inside) ProtoMessage() {} +func (*Inside) Descriptor() ([]byte, []int) { return fileDescriptorTags, []int{1} } + +func (m *Inside) GetField1() string { + if m != nil && m.Field1 != nil { + return *m.Field1 + } + return "" +} + +func init() { + proto.RegisterType((*Outside)(nil), "tags.Outside") + proto.RegisterType((*Inside)(nil), "tags.Inside") +} +func NewPopulatedOutside(r randyTags, easy bool) *Outside { + this := &Outside{} + if r.Intn(10) != 0 { + this.Inside = NewPopulatedInside(r, easy) + } + if r.Intn(10) != 0 { + v1 := randStringTags(r) + this.Field2 = &v1 + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedTags(r, 3) + } + return this +} + +func NewPopulatedInside(r randyTags, easy bool) *Inside { + this := &Inside{} + if r.Intn(10) != 0 { + v2 := randStringTags(r) + this.Field1 = &v2 + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedTags(r, 2) + } + return this +} + +type randyTags interface { + Float32() float32 + Float64() float64 + Int63() int64 + Int31() int32 + Uint32() uint32 + Intn(n int) int +} + +func randUTF8RuneTags(r randyTags) 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 randStringTags(r randyTags) string { + v3 := r.Intn(100) + tmps := make([]rune, v3) + for i := 0; i < v3; i++ { + tmps[i] = randUTF8RuneTags(r) + } + return string(tmps) +} +func randUnrecognizedTags(r randyTags, 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 = randFieldTags(data, r, fieldNumber, wire) + } + return data +} +func randFieldTags(data []byte, r randyTags, fieldNumber int, wire int) []byte { + key := uint32(fieldNumber)<<3 | uint32(wire) + switch wire { + case 0: + data = encodeVarintPopulateTags(data, uint64(key)) + v4 := r.Int63() + if r.Intn(2) == 0 { + v4 *= -1 + } + data = encodeVarintPopulateTags(data, uint64(v4)) + case 1: + data = encodeVarintPopulateTags(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 = encodeVarintPopulateTags(data, uint64(key)) + ll := r.Intn(100) + data = encodeVarintPopulateTags(data, uint64(ll)) + for j := 0; j < ll; j++ { + data = append(data, byte(r.Intn(256))) + } + default: + data = encodeVarintPopulateTags(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 encodeVarintPopulateTags(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 +} + +var fileDescriptorTags = []byte{ + // 202 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xe2, 0xe2, 0x2a, 0x49, 0x4c, 0x2f, + 0xd6, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x62, 0x01, 0xb1, 0xa5, 0x74, 0xd3, 0x33, 0x4b, 0x32, + 0x4a, 0x93, 0xf4, 0x92, 0xf3, 0x73, 0xf5, 0xd3, 0xf3, 0xd3, 0xf3, 0xf5, 0xc1, 0x92, 0x49, 0xa5, + 0x69, 0x60, 0x1e, 0x98, 0x03, 0x66, 0x41, 0x34, 0x29, 0x15, 0x72, 0xb1, 0xfb, 0x97, 0x96, 0x14, + 0x67, 0xa6, 0xa4, 0x0a, 0xe9, 0x71, 0xb1, 0x79, 0xe6, 0x81, 0x58, 0x12, 0x8c, 0x0a, 0x8c, 0x1a, + 0xdc, 0x46, 0x3c, 0x7a, 0x60, 0xc3, 0x21, 0x62, 0x4e, 0x1c, 0x17, 0xee, 0xc9, 0x33, 0xbe, 0xba, + 0x27, 0xcf, 0x10, 0xc4, 0x96, 0x09, 0x16, 0x11, 0x32, 0xe3, 0x62, 0x73, 0xcb, 0x4c, 0xcd, 0x49, + 0x31, 0x92, 0x60, 0x02, 0xaa, 0xe7, 0x74, 0x92, 0x03, 0xca, 0x72, 0xf8, 0x56, 0x42, 0xc4, 0x3e, + 0xdd, 0x93, 0xe7, 0xab, 0xc8, 0xcd, 0xb1, 0x52, 0xd2, 0x01, 0x3a, 0x24, 0x37, 0x35, 0xaf, 0x44, + 0x29, 0x88, 0x2d, 0x0d, 0x2c, 0xa3, 0xe4, 0x08, 0xb3, 0x47, 0xc8, 0x1c, 0x6a, 0x82, 0x21, 0xd8, + 0x46, 0x4e, 0x27, 0x79, 0x24, 0x13, 0x0c, 0x81, 0x26, 0xf0, 0x43, 0x4d, 0xc8, 0x48, 0x2c, 0x4a, + 0x49, 0x2c, 0x49, 0x84, 0x19, 0x61, 0xe8, 0xc4, 0xf2, 0xe3, 0xa1, 0x1c, 0x23, 0x20, 0x00, 0x00, + 0xff, 0xff, 0xd1, 0x94, 0x7c, 0x45, 0xfd, 0x00, 0x00, 0x00, +} diff --git a/vendor/github.com/gogo/protobuf/test/tags/tags.proto b/vendor/github.com/gogo/protobuf/test/tags/tags.proto new file mode 100644 index 000000000..e5b3a4faa --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/tags/tags.proto @@ -0,0 +1,42 @@ +// Copyright (c) 2013, Vastech SA (PTY) LTD. All rights reserved. +// http://github.com/gogo/protobuf/gogoproto +// +// 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 tags; + +import "github.com/gogo/protobuf/gogoproto/gogo.proto"; + +option (gogoproto.populate_all) = true; + +message Outside { + optional Inside Inside = 1 [(gogoproto.embed) = true, (gogoproto.jsontag) = ""]; + optional string Field2 = 2 [(gogoproto.jsontag) = "MyField2", (gogoproto.moretags) = "xml:\",comment\""]; +} + +message Inside { + optional string Field1 = 1 [(gogoproto.jsontag) = "MyField1", (gogoproto.moretags) = "xml:\",chardata\""]; +} diff --git a/vendor/github.com/gogo/protobuf/test/tags/tags_test.go b/vendor/github.com/gogo/protobuf/test/tags/tags_test.go new file mode 100644 index 000000000..0ab3ba34e --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/tags/tags_test.go @@ -0,0 +1,117 @@ +// Copyright (c) 2013, Vastech SA (PTY) LTD. All rights reserved. +// http://github.com/gogo/protobuf/gogoproto +// +// 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 tags + +import ( + "bytes" + "encoding/json" + "encoding/xml" + math_rand "math/rand" + "testing" + "time" +) + +type MyJson struct { + MyField1 string + MyField2 string +} + +func NewPopulatedMyJson(r randyTags) *MyJson { + this := &MyJson{} + if r.Intn(10) != 0 { + this.MyField1 = randStringTags(r) + } + if r.Intn(10) != 0 { + this.MyField2 = randStringTags(r) + } + return this +} + +func TestJson(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + msg1 := NewPopulatedMyJson(popr) + data, err := json.Marshal(msg1) + if err != nil { + panic(err) + } + outside := &Outside{} + err = json.Unmarshal(data, outside) + if err != nil { + panic(err) + } + if outside.GetField1() != msg1.MyField1 { + t.Fatalf("proto field1 %s != %s", outside.GetField1(), msg1.MyField1) + } + if outside.GetField2() != msg1.MyField2 { + t.Fatalf("proto field2 %s != %s", outside.GetField2(), msg1.MyField2) + } + data2, err := json.Marshal(outside) + if err != nil { + panic(err) + } + msg2 := &MyJson{} + err = json.Unmarshal(data2, msg2) + if err != nil { + panic(err) + } + if msg2.MyField1 != msg1.MyField1 { + t.Fatalf("proto field1 %s != %s", msg2.MyField1, msg1.MyField1) + } + if msg2.MyField2 != msg1.MyField2 { + t.Fatalf("proto field2 %s != %s", msg2.MyField2, msg1.MyField2) + } +} + +func TestXml(t *testing.T) { + s := "Field1Value" + field1 := "Field1Value" + field2 := "Field2Value" + msg1 := &Outside{} + err := xml.Unmarshal([]byte(s), msg1) + if err != nil { + panic(err) + } + msg2 := &Outside{ + Inside: &Inside{ + Field1: &field1, + }, + Field2: &field2, + } + if msg1.GetField1() != msg2.GetField1() { + t.Fatalf("field1 expected %s got %s", msg2.GetField1(), msg1.GetField1()) + } + if err != nil { + panic(err) + } + data, err := xml.Marshal(msg2) + if err != nil { + panic(err) + } + if !bytes.Equal(data, []byte(s)) { + t.Fatalf("expected %s got %s", s, string(data)) + } +} diff --git a/vendor/github.com/gogo/protobuf/test/theproto3/Makefile b/vendor/github.com/gogo/protobuf/test/theproto3/Makefile new file mode 100644 index 000000000..943f87cd7 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/theproto3/Makefile @@ -0,0 +1,35 @@ +# Extensions for Protocol Buffers to create more go like structures. +# +# Copyright (c) 2013, Vastech SA (PTY) LTD. All rights reserved. +# http://github.com/gogo/protobuf/gogoproto +# +# 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: + cp header.proto theproto3.proto + cat maps.proto >> theproto3.proto + cat footer.proto >> theproto3.proto + go install github.com/gogo/protobuf/protoc-gen-combo + protoc-gen-combo --version="3.0.0" --proto_path=../../../../../:../../protobuf/:. theproto3.proto + find combos -type d -not -name combos -exec cp proto3_test.go.in {}/proto3_test.go \; diff --git a/vendor/github.com/gogo/protobuf/test/theproto3/combos/both/proto3_test.go b/vendor/github.com/gogo/protobuf/test/theproto3/combos/both/proto3_test.go new file mode 100644 index 000000000..b41f17859 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/theproto3/combos/both/proto3_test.go @@ -0,0 +1,61 @@ +// Copyright (c) 2015, Vastech SA (PTY) LTD. All rights reserved. +// http://github.com/gogo/protobuf/gogoproto +// +// 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 theproto3 + +import ( + "reflect" + "testing" + + "github.com/gogo/protobuf/proto" +) + +func TestNilMaps(t *testing.T) { + m := &AllMaps{StringToMsgMap: map[string]*FloatingPoint{"a": nil}} + if _, err := proto.Marshal(m); err == nil { + t.Fatalf("expected error") + } +} + +func TestCustomTypeSize(t *testing.T) { + m := &Uint128Pair{} + m.Size() // Should not panic. +} + +func TestCustomTypeMarshalUnmarshal(t *testing.T) { + m1 := &Uint128Pair{} + if b, err := proto.Marshal(m1); err != nil { + t.Fatal(err) + } else { + m2 := &Uint128Pair{} + if err := proto.Unmarshal(b, m2); err != nil { + t.Fatal(err) + } + if !reflect.DeepEqual(m1, m2) { + t.Errorf("expected %+v, got %+v", m1, m2) + } + } +} diff --git a/vendor/github.com/gogo/protobuf/test/theproto3/combos/both/theproto3.pb.go b/vendor/github.com/gogo/protobuf/test/theproto3/combos/both/theproto3.pb.go new file mode 100644 index 000000000..8ee24e3d0 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/theproto3/combos/both/theproto3.pb.go @@ -0,0 +1,10578 @@ +// Code generated by protoc-gen-gogo. +// source: combos/both/theproto3.proto +// DO NOT EDIT! + +/* + Package theproto3 is a generated protocol buffer package. + + It is generated from these files: + combos/both/theproto3.proto + + It has these top-level messages: + Message + Nested + AllMaps + AllMapsOrdered + MessageWithMap + FloatingPoint + Uint128Pair + ContainsNestedMap +*/ +package theproto3 + +import proto "github.com/gogo/protobuf/proto" +import fmt "fmt" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" +import test "github.com/gogo/protobuf/test/combos/both" + +import github_com_gogo_protobuf_test_custom "github.com/gogo/protobuf/test/custom" + +import github_com_gogo_protobuf_protoc_gen_gogo_descriptor "github.com/gogo/protobuf/protoc-gen-gogo/descriptor" +import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" +import compress_gzip "compress/gzip" +import bytes "bytes" +import io_ioutil "io/ioutil" + +import strconv "strconv" + +import strings "strings" +import sort "sort" +import reflect "reflect" +import github_com_gogo_protobuf_sortkeys "github.com/gogo/protobuf/sortkeys" + +import errors "errors" + +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. +const _ = proto.GoGoProtoPackageIsVersion1 + +type MapEnum int32 + +const ( + MA MapEnum = 0 + MB MapEnum = 1 + MC MapEnum = 2 +) + +var MapEnum_name = map[int32]string{ + 0: "MA", + 1: "MB", + 2: "MC", +} +var MapEnum_value = map[string]int32{ + "MA": 0, + "MB": 1, + "MC": 2, +} + +func (MapEnum) EnumDescriptor() ([]byte, []int) { return fileDescriptorTheproto3, []int{0} } + +type Message_Humour int32 + +const ( + UNKNOWN Message_Humour = 0 + PUNS Message_Humour = 1 + SLAPSTICK Message_Humour = 2 + BILL_BAILEY Message_Humour = 3 +) + +var Message_Humour_name = map[int32]string{ + 0: "UNKNOWN", + 1: "PUNS", + 2: "SLAPSTICK", + 3: "BILL_BAILEY", +} +var Message_Humour_value = map[string]int32{ + "UNKNOWN": 0, + "PUNS": 1, + "SLAPSTICK": 2, + "BILL_BAILEY": 3, +} + +func (Message_Humour) EnumDescriptor() ([]byte, []int) { return fileDescriptorTheproto3, []int{0, 0} } + +type Message struct { + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + Hilarity Message_Humour `protobuf:"varint,2,opt,name=hilarity,proto3,enum=theproto3.Message_Humour" json:"hilarity,omitempty"` + HeightInCm uint32 `protobuf:"varint,3,opt,name=height_in_cm,json=heightInCm,proto3" json:"height_in_cm,omitempty"` + Data []byte `protobuf:"bytes,4,opt,name=data,proto3" json:"data,omitempty"` + ResultCount int64 `protobuf:"varint,7,opt,name=result_count,json=resultCount,proto3" json:"result_count,omitempty"` + TrueScotsman bool `protobuf:"varint,8,opt,name=true_scotsman,json=trueScotsman,proto3" json:"true_scotsman,omitempty"` + Score float32 `protobuf:"fixed32,9,opt,name=score,proto3" json:"score,omitempty"` + Key []uint64 `protobuf:"varint,5,rep,name=key" json:"key,omitempty"` + Nested *Nested `protobuf:"bytes,6,opt,name=nested" json:"nested,omitempty"` + Terrain map[int64]*Nested `protobuf:"bytes,10,rep,name=terrain" json:"terrain,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value"` + Proto2Field *test.NinOptNative `protobuf:"bytes,11,opt,name=proto2_field,json=proto2Field" json:"proto2_field,omitempty"` + Proto2Value map[int64]*test.NinOptEnum `protobuf:"bytes,13,rep,name=proto2_value,json=proto2Value" json:"proto2_value,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value"` +} + +func (m *Message) Reset() { *m = Message{} } +func (*Message) ProtoMessage() {} +func (*Message) Descriptor() ([]byte, []int) { return fileDescriptorTheproto3, []int{0} } + +type Nested struct { + Bunny string `protobuf:"bytes,1,opt,name=bunny,proto3" json:"bunny,omitempty"` +} + +func (m *Nested) Reset() { *m = Nested{} } +func (*Nested) ProtoMessage() {} +func (*Nested) Descriptor() ([]byte, []int) { return fileDescriptorTheproto3, []int{1} } + +type AllMaps struct { + StringToDoubleMap map[string]float64 `protobuf:"bytes,1,rep,name=StringToDoubleMap,json=stringToDoubleMap" json:"StringToDoubleMap,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"fixed64,2,opt,name=value,proto3"` + StringToFloatMap map[string]float32 `protobuf:"bytes,2,rep,name=StringToFloatMap,json=stringToFloatMap" json:"StringToFloatMap,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"fixed32,2,opt,name=value,proto3"` + Int32Map map[int32]int32 `protobuf:"bytes,3,rep,name=Int32Map,json=int32Map" json:"Int32Map,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` + Int64Map map[int64]int64 `protobuf:"bytes,4,rep,name=Int64Map,json=int64Map" json:"Int64Map,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` + Uint32Map map[uint32]uint32 `protobuf:"bytes,5,rep,name=Uint32Map,json=uint32Map" json:"Uint32Map,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` + Uint64Map map[uint64]uint64 `protobuf:"bytes,6,rep,name=Uint64Map,json=uint64Map" json:"Uint64Map,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` + Sint32Map map[int32]int32 `protobuf:"bytes,7,rep,name=Sint32Map,json=sint32Map" json:"Sint32Map,omitempty" protobuf_key:"zigzag32,1,opt,name=key,proto3" protobuf_val:"zigzag32,2,opt,name=value,proto3"` + Sint64Map map[int64]int64 `protobuf:"bytes,8,rep,name=Sint64Map,json=sint64Map" json:"Sint64Map,omitempty" protobuf_key:"zigzag64,1,opt,name=key,proto3" protobuf_val:"zigzag64,2,opt,name=value,proto3"` + Fixed32Map map[uint32]uint32 `protobuf:"bytes,9,rep,name=Fixed32Map,json=fixed32Map" json:"Fixed32Map,omitempty" protobuf_key:"fixed32,1,opt,name=key,proto3" protobuf_val:"fixed32,2,opt,name=value,proto3"` + Sfixed32Map map[int32]int32 `protobuf:"bytes,10,rep,name=Sfixed32Map,json=sfixed32Map" json:"Sfixed32Map,omitempty" protobuf_key:"fixed32,1,opt,name=key,proto3" protobuf_val:"fixed32,2,opt,name=value,proto3"` + Fixed64Map map[uint64]uint64 `protobuf:"bytes,11,rep,name=Fixed64Map,json=fixed64Map" json:"Fixed64Map,omitempty" protobuf_key:"fixed64,1,opt,name=key,proto3" protobuf_val:"fixed64,2,opt,name=value,proto3"` + Sfixed64Map map[int64]int64 `protobuf:"bytes,12,rep,name=Sfixed64Map,json=sfixed64Map" json:"Sfixed64Map,omitempty" protobuf_key:"fixed64,1,opt,name=key,proto3" protobuf_val:"fixed64,2,opt,name=value,proto3"` + BoolMap map[bool]bool `protobuf:"bytes,13,rep,name=BoolMap,json=boolMap" json:"BoolMap,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` + StringMap map[string]string `protobuf:"bytes,14,rep,name=StringMap,json=stringMap" json:"StringMap,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + StringToBytesMap map[string][]byte `protobuf:"bytes,15,rep,name=StringToBytesMap,json=stringToBytesMap" json:"StringToBytesMap,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + StringToEnumMap map[string]MapEnum `protobuf:"bytes,16,rep,name=StringToEnumMap,json=stringToEnumMap" json:"StringToEnumMap,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3,enum=theproto3.MapEnum"` + StringToMsgMap map[string]*FloatingPoint `protobuf:"bytes,17,rep,name=StringToMsgMap,json=stringToMsgMap" json:"StringToMsgMap,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value"` +} + +func (m *AllMaps) Reset() { *m = AllMaps{} } +func (*AllMaps) ProtoMessage() {} +func (*AllMaps) Descriptor() ([]byte, []int) { return fileDescriptorTheproto3, []int{2} } + +type AllMapsOrdered struct { + StringToDoubleMap map[string]float64 `protobuf:"bytes,1,rep,name=StringToDoubleMap,json=stringToDoubleMap" json:"StringToDoubleMap,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"fixed64,2,opt,name=value,proto3"` + StringToFloatMap map[string]float32 `protobuf:"bytes,2,rep,name=StringToFloatMap,json=stringToFloatMap" json:"StringToFloatMap,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"fixed32,2,opt,name=value,proto3"` + Int32Map map[int32]int32 `protobuf:"bytes,3,rep,name=Int32Map,json=int32Map" json:"Int32Map,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` + Int64Map map[int64]int64 `protobuf:"bytes,4,rep,name=Int64Map,json=int64Map" json:"Int64Map,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` + Uint32Map map[uint32]uint32 `protobuf:"bytes,5,rep,name=Uint32Map,json=uint32Map" json:"Uint32Map,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` + Uint64Map map[uint64]uint64 `protobuf:"bytes,6,rep,name=Uint64Map,json=uint64Map" json:"Uint64Map,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` + Sint32Map map[int32]int32 `protobuf:"bytes,7,rep,name=Sint32Map,json=sint32Map" json:"Sint32Map,omitempty" protobuf_key:"zigzag32,1,opt,name=key,proto3" protobuf_val:"zigzag32,2,opt,name=value,proto3"` + Sint64Map map[int64]int64 `protobuf:"bytes,8,rep,name=Sint64Map,json=sint64Map" json:"Sint64Map,omitempty" protobuf_key:"zigzag64,1,opt,name=key,proto3" protobuf_val:"zigzag64,2,opt,name=value,proto3"` + Fixed32Map map[uint32]uint32 `protobuf:"bytes,9,rep,name=Fixed32Map,json=fixed32Map" json:"Fixed32Map,omitempty" protobuf_key:"fixed32,1,opt,name=key,proto3" protobuf_val:"fixed32,2,opt,name=value,proto3"` + Sfixed32Map map[int32]int32 `protobuf:"bytes,10,rep,name=Sfixed32Map,json=sfixed32Map" json:"Sfixed32Map,omitempty" protobuf_key:"fixed32,1,opt,name=key,proto3" protobuf_val:"fixed32,2,opt,name=value,proto3"` + Fixed64Map map[uint64]uint64 `protobuf:"bytes,11,rep,name=Fixed64Map,json=fixed64Map" json:"Fixed64Map,omitempty" protobuf_key:"fixed64,1,opt,name=key,proto3" protobuf_val:"fixed64,2,opt,name=value,proto3"` + Sfixed64Map map[int64]int64 `protobuf:"bytes,12,rep,name=Sfixed64Map,json=sfixed64Map" json:"Sfixed64Map,omitempty" protobuf_key:"fixed64,1,opt,name=key,proto3" protobuf_val:"fixed64,2,opt,name=value,proto3"` + BoolMap map[bool]bool `protobuf:"bytes,13,rep,name=BoolMap,json=boolMap" json:"BoolMap,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` + StringMap map[string]string `protobuf:"bytes,14,rep,name=StringMap,json=stringMap" json:"StringMap,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + StringToBytesMap map[string][]byte `protobuf:"bytes,15,rep,name=StringToBytesMap,json=stringToBytesMap" json:"StringToBytesMap,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + StringToEnumMap map[string]MapEnum `protobuf:"bytes,16,rep,name=StringToEnumMap,json=stringToEnumMap" json:"StringToEnumMap,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3,enum=theproto3.MapEnum"` + StringToMsgMap map[string]*FloatingPoint `protobuf:"bytes,17,rep,name=StringToMsgMap,json=stringToMsgMap" json:"StringToMsgMap,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value"` +} + +func (m *AllMapsOrdered) Reset() { *m = AllMapsOrdered{} } +func (*AllMapsOrdered) ProtoMessage() {} +func (*AllMapsOrdered) Descriptor() ([]byte, []int) { return fileDescriptorTheproto3, []int{3} } + +type MessageWithMap struct { + NameMapping map[int32]string `protobuf:"bytes,1,rep,name=name_mapping,json=nameMapping" json:"name_mapping,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + MsgMapping map[int64]*FloatingPoint `protobuf:"bytes,2,rep,name=msg_mapping,json=msgMapping" json:"msg_mapping,omitempty" protobuf_key:"zigzag64,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value"` + ByteMapping map[bool][]byte `protobuf:"bytes,3,rep,name=byte_mapping,json=byteMapping" json:"byte_mapping,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` +} + +func (m *MessageWithMap) Reset() { *m = MessageWithMap{} } +func (*MessageWithMap) ProtoMessage() {} +func (*MessageWithMap) Descriptor() ([]byte, []int) { return fileDescriptorTheproto3, []int{4} } + +type FloatingPoint struct { + F float64 `protobuf:"fixed64,1,opt,name=f,proto3" json:"f,omitempty"` +} + +func (m *FloatingPoint) Reset() { *m = FloatingPoint{} } +func (*FloatingPoint) ProtoMessage() {} +func (*FloatingPoint) Descriptor() ([]byte, []int) { return fileDescriptorTheproto3, []int{5} } + +type Uint128Pair struct { + Left github_com_gogo_protobuf_test_custom.Uint128 `protobuf:"bytes,1,opt,name=left,proto3,customtype=github.com/gogo/protobuf/test/custom.Uint128" json:"left"` + Right *github_com_gogo_protobuf_test_custom.Uint128 `protobuf:"bytes,2,opt,name=right,proto3,customtype=github.com/gogo/protobuf/test/custom.Uint128" json:"right,omitempty"` +} + +func (m *Uint128Pair) Reset() { *m = Uint128Pair{} } +func (*Uint128Pair) ProtoMessage() {} +func (*Uint128Pair) Descriptor() ([]byte, []int) { return fileDescriptorTheproto3, []int{6} } + +type ContainsNestedMap struct { +} + +func (m *ContainsNestedMap) Reset() { *m = ContainsNestedMap{} } +func (*ContainsNestedMap) ProtoMessage() {} +func (*ContainsNestedMap) Descriptor() ([]byte, []int) { return fileDescriptorTheproto3, []int{7} } + +type ContainsNestedMap_NestedMap struct { + NestedMapField map[string]float64 `protobuf:"bytes,1,rep,name=NestedMapField,json=nestedMapField" json:"NestedMapField,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"fixed64,2,opt,name=value,proto3"` +} + +func (m *ContainsNestedMap_NestedMap) Reset() { *m = ContainsNestedMap_NestedMap{} } +func (*ContainsNestedMap_NestedMap) ProtoMessage() {} +func (*ContainsNestedMap_NestedMap) Descriptor() ([]byte, []int) { + return fileDescriptorTheproto3, []int{7, 0} +} + +func init() { + proto.RegisterType((*Message)(nil), "theproto3.Message") + proto.RegisterType((*Nested)(nil), "theproto3.Nested") + proto.RegisterType((*AllMaps)(nil), "theproto3.AllMaps") + proto.RegisterType((*AllMapsOrdered)(nil), "theproto3.AllMapsOrdered") + proto.RegisterType((*MessageWithMap)(nil), "theproto3.MessageWithMap") + proto.RegisterType((*FloatingPoint)(nil), "theproto3.FloatingPoint") + proto.RegisterType((*Uint128Pair)(nil), "theproto3.Uint128Pair") + proto.RegisterType((*ContainsNestedMap)(nil), "theproto3.ContainsNestedMap") + proto.RegisterType((*ContainsNestedMap_NestedMap)(nil), "theproto3.ContainsNestedMap.NestedMap") + proto.RegisterEnum("theproto3.MapEnum", MapEnum_name, MapEnum_value) + proto.RegisterEnum("theproto3.Message_Humour", Message_Humour_name, Message_Humour_value) +} +func (this *Message) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return Theproto3Description() +} +func (this *Nested) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return Theproto3Description() +} +func (this *AllMaps) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return Theproto3Description() +} +func (this *AllMapsOrdered) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return Theproto3Description() +} +func (this *MessageWithMap) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return Theproto3Description() +} +func (this *FloatingPoint) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return Theproto3Description() +} +func (this *Uint128Pair) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return Theproto3Description() +} +func (this *ContainsNestedMap) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return Theproto3Description() +} +func (this *ContainsNestedMap_NestedMap) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return Theproto3Description() +} +func Theproto3Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + d := &github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet{} + var gzipped = []byte{ + // 7445 bytes of a gzipped FileDescriptorSet + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xec, 0x7d, 0x7b, 0x6c, 0x63, 0xd7, + 0x79, 0xe7, 0x90, 0x97, 0x94, 0xa8, 0x8f, 0x14, 0x45, 0xdd, 0xd1, 0xc8, 0xb4, 0x3c, 0x9e, 0x07, + 0x3d, 0x1e, 0xcb, 0x8a, 0xad, 0xd1, 0x68, 0x34, 0x0f, 0xd3, 0xaf, 0x15, 0x29, 0x6a, 0xac, 0x89, + 0x5e, 0xb9, 0x92, 0xfc, 0x88, 0x17, 0x4b, 0x50, 0xe4, 0x95, 0x44, 0x9b, 0xba, 0xd4, 0xf2, 0x92, + 0xb6, 0x27, 0x7f, 0x2c, 0xb2, 0xc9, 0x6e, 0x36, 0xd9, 0xc5, 0xee, 0xb6, 0x4d, 0x8b, 0xe6, 0x1d, + 0x3b, 0x45, 0x1a, 0x27, 0x7d, 0x25, 0x69, 0x1a, 0x14, 0x41, 0xdb, 0xb8, 0x28, 0x92, 0x4e, 0xff, + 0x29, 0xdc, 0xf4, 0x9f, 0xa2, 0x28, 0x8c, 0xbc, 0x80, 0xa6, 0x6d, 0xda, 0x26, 0x80, 0x81, 0x04, + 0x48, 0xfe, 0xe8, 0x79, 0xdf, 0x73, 0x0e, 0xef, 0xe5, 0xa5, 0x66, 0xec, 0x38, 0x7f, 0xd8, 0x00, + 0x47, 0xbc, 0xe7, 0x7c, 0xbf, 0xef, 0x7c, 0xe7, 0x7b, 0x9d, 0xef, 0x9e, 0x73, 0x79, 0x0d, 0x7f, + 0x71, 0x1e, 0x4e, 0xed,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0x72, 0x26, 0x21, 0x78, 0x6e, + 0x6c, 0x5a, 0x4b, 0xab, 0x57, 0x33, 0x43, 0x82, 0xe7, 0x55, 0x6b, 0x6d, 0x6b, 0x3d, 0x03, 0x82, + 0xc3, 0x4a, 0x69, 0x63, 0x63, 0xfe, 0x6a, 0x29, 0x93, 0x14, 0x14, 0x85, 0xa7, 0x36, 0x4b, 0x1b, + 0x99, 0x94, 0x22, 0x16, 0x1a, 0x62, 0x58, 0x0c, 0x51, 0x5a, 0xdd, 0x5a, 0xc9, 0xa4, 0xcd, 0x51, + 0x18, 0xa6, 0x43, 0x70, 0x21, 0x46, 0xb4, 0x26, 0x24, 0x69, 0xc6, 0x13, 0x84, 0x72, 0x19, 0x55, + 0x1a, 0x10, 0x85, 0x99, 0x2b, 0x42, 0x9c, 0x78, 0x17, 0xf2, 0xe2, 0xf4, 0xf2, 0x7c, 0xa1, 0xb4, + 0x5c, 0x5e, 0x5b, 0xdf, 0x5c, 0x5a, 0x5b, 0x9d, 0x5f, 0x46, 0xba, 0x13, 0x6d, 0x56, 0xe9, 0x5d, + 0x5b, 0x4b, 0x56, 0x69, 0x01, 0xe9, 0x4f, 0x6a, 0x5b, 0x2f, 0xcd, 0x6f, 0xa2, 0x36, 0x23, 0x37, + 0x05, 0x63, 0x7e, 0x79, 0xc6, 0x2f, 0x32, 0x72, 0x9f, 0x89, 0xc0, 0x51, 0x9f, 0x94, 0xe9, 0x1b, + 0x45, 0x8f, 0x42, 0x9c, 0x7a, 0x1a, 0x5d, 0x44, 0xee, 0xf5, 0xcd, 0xbd, 0xc4, 0xef, 0xba, 0x16, + 0x12, 0x82, 0x93, 0x17, 0x52, 0x23, 0x60, 0x21, 0xc5, 0x2c, 0xba, 0xdc, 0xe9, 0xfd, 0x11, 0xc8, + 0x06, 0xf1, 0x0e, 0x89, 0xf7, 0xa8, 0x12, 0xef, 0x0f, 0xea, 0x02, 0x9c, 0x0e, 0x9e, 0x43, 0x97, + 0x14, 0x9f, 0x8b, 0xc0, 0xb8, 0x7f, 0xbd, 0xe1, 0x2b, 0xc3, 0x23, 0x30, 0xb0, 0x6f, 0xb7, 0xf7, + 0x9a, 0x7c, 0xcd, 0x3d, 0xeb, 0x93, 0xc9, 0x71, 0xb7, 0xae, 0x2b, 0x86, 0x92, 0x97, 0x02, 0x23, + 0xa8, 0x68, 0xa0, 0xd2, 0x74, 0x49, 0xfa, 0xa1, 0x28, 0x1c, 0xf3, 0x65, 0xee, 0x2b, 0xe8, 0x9d, + 0x00, 0x75, 0xe7, 0xa0, 0xd3, 0xa6, 0xeb, 0x2a, 0x4d, 0x33, 0x43, 0xa4, 0x85, 0x84, 0x30, 0x4e, + 0x21, 0x9d, 0xb6, 0xe8, 0x37, 0x48, 0x3f, 0xd0, 0x26, 0x42, 0x70, 0xc5, 0x13, 0x34, 0x46, 0x04, + 0x3d, 0x11, 0x30, 0xd3, 0xae, 0x25, 0x6b, 0x06, 0x32, 0xd5, 0x46, 0xdd, 0x76, 0xda, 0x65, 0xb7, + 0xdd, 0xb2, 0x2b, 0xfb, 0x75, 0x67, 0x97, 0xe4, 0xd1, 0x44, 0x3e, 0xbe, 0x53, 0x69, 0xb8, 0xb6, + 0x35, 0x42, 0xbb, 0x37, 0x78, 0x2f, 0x46, 0x90, 0xc5, 0xa2, 0x25, 0x21, 0x06, 0x14, 0x04, 0xed, + 0x16, 0x88, 0xdc, 0xb7, 0x06, 0x21, 0x29, 0x55, 0x67, 0xe6, 0x69, 0x48, 0x3d, 0x53, 0x79, 0xae, + 0x52, 0xe6, 0x15, 0x37, 0xd5, 0x44, 0x12, 0xb7, 0xad, 0xb3, 0xaa, 0x7b, 0x06, 0xc6, 0x08, 0x09, + 0x9a, 0x23, 0x1a, 0xa8, 0xda, 0xa8, 0xb8, 0x2e, 0x51, 0x5a, 0x82, 0x90, 0x9a, 0xb8, 0x6f, 0x0d, + 0x77, 0x15, 0x79, 0x8f, 0x79, 0x11, 0x8e, 0x12, 0xc4, 0x3e, 0x4a, 0x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x08, 0x89, 0x31, + 0x23, 0x24, 0xc6, 0x8c, 0x90, 0x18, 0x33, 0x42, 0x62, 0xcc, 0x08, 0x89, 0x31, 0x23, 0x30, 0xc6, + 0x3c, 0xf3, 0x8e, 0xab, 0xe6, 0xf5, 0x8d, 0x31, 0x23, 0x20, 0xc6, 0x8c, 0x80, 0x18, 0x33, 0x02, + 0x62, 0xcc, 0x08, 0x88, 0x31, 0x23, 0x20, 0xc6, 0x8c, 0x80, 0x18, 0x33, 0x02, 0x62, 0xcc, 0x08, + 0x8a, 0x31, 0x23, 0x30, 0xc6, 0x8c, 0xc0, 0x18, 0x33, 0x02, 0x63, 0xcc, 0x08, 0x8c, 0x31, 0x23, + 0x30, 0xc6, 0x0c, 0x39, 0xc6, 0xfe, 0xc4, 0x00, 0x93, 0xc6, 0xd8, 0x3a, 0x79, 0x38, 0x80, 0x99, + 0xe2, 0x84, 0x16, 0x69, 0x03, 0xd8, 0x74, 0x19, 0xcf, 0x24, 0x27, 0xb4, 0x58, 0x53, 0xfb, 0x67, + 0x45, 0x3f, 0x8f, 0x36, 0xb5, 0xff, 0x82, 0xe8, 0xe7, 0xf1, 0xa6, 0xf6, 0xcf, 0x89, 0x7e, 0x1e, + 0x71, 0x6a, 0xff, 0x45, 0xd1, 0xcf, 0x63, 0x4e, 0xed, 0xbf, 0x24, 0xfa, 0x79, 0xd4, 0xa9, 0xfd, + 0x97, 0x45, 0x3f, 0x8f, 0x3b, 0xb5, 0xff, 0x8a, 0xe8, 0xe7, 0x91, 0xa7, 0xf6, 0x3f, 0x60, 0x9e, + 0xd2, 0x63, 0x8f, 0x13, 0x08, 0xd3, 0x9e, 0xd2, 0xa3, 0x4f, 0xa3, 0x38, 0xef, 0x51, 0xf0, 0xf8, + 0xd3, 0x28, 0x66, 0x3d, 0x0a, 0x1e, 0x81, 0x1a, 0xc5, 0x85, 0xdc, 0x07, 0x89, 0xf9, 0x1c, 0xdd, + 0x7c, 0x13, 0x9a, 0xf9, 0xa2, 0x92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0x4e, 0x63, 0x35, 0xd4, + 0x8d, 0xc8, 0x24, 0xbd, 0x1f, 0x15, 0x7a, 0x97, 0xe8, 0x88, 0xee, 0x73, 0x8a, 0xee, 0x99, 0x01, + 0x31, 0x51, 0x97, 0xfe, 0x2f, 0x43, 0x52, 0x1a, 0xc5, 0x9c, 0x64, 0x62, 0x44, 0x75, 0xa0, 0xac, + 0x2b, 0x2c, 0x49, 0xce, 0x86, 0x61, 0x65, 0x60, 0x0c, 0x95, 0x54, 0x1c, 0x00, 0x25, 0x6a, 0x9e, + 0x52, 0xd5, 0xec, 0x4f, 0xca, 0x54, 0x3d, 0x43, 0x75, 0x44, 0xd4, 0x7d, 0x86, 0x3a, 0x67, 0xb0, + 0x11, 0xdb, 0xe8, 0x7b, 0x2e, 0x0e, 0xc6, 0x6a, 0xbd, 0x91, 0x7b, 0x18, 0x80, 0x86, 0x3c, 0x7e, + 0xb8, 0x4a, 0x8b, 0xba, 0x34, 0x57, 0xf0, 0xe6, 0x9e, 0xbd, 0x89, 0xfe, 0x62, 0x12, 0xb5, 0x9e, + 0xc2, 0x09, 0x06, 0x68, 0x88, 0x11, 0xfc, 0xbd, 0xa1, 0x78, 0xdf, 0x4a, 0x0c, 0x93, 0x66, 0x29, + 0xe9, 0x53, 0x76, 0x7b, 0xde, 0x69, 0xb6, 0xf7, 0xec, 0x96, 0x86, 0x98, 0x35, 0x2f, 0x28, 0x01, + 0x9b, 0x9e, 0xbd, 0x43, 0x20, 0x02, 0x41, 0x17, 0x72, 0x5f, 0x24, 0x02, 0xe2, 0x52, 0xa0, 0x6b, + 0x82, 0x46, 0x1f, 0x13, 0x34, 0x2f, 0x29, 0xf5, 0x5b, 0x0f, 0x31, 0xb5, 0x5b, 0xcb, 0x07, 0x94, + 0xfb, 0x9c, 0xde, 0xc2, 0xaa, 0xf7, 0x98, 0x5c, 0xa7, 0x5c, 0xe4, 0x7b, 0x43, 0x45, 0x0e, 0xa8, + 0x6e, 0x0f, 0xab, 0x53, 0x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, 0xd9, 0x36, 0x15, 0x4b, 0xa4, 0x33, + 0xa3, 0xe8, 0x5f, 0xc8, 0x0c, 0xb3, 0x71, 0xff, 0xca, 0x80, 0x0c, 0x2d, 0x75, 0x90, 0x11, 0xeb, + 0x4e, 0xbd, 0xdd, 0x5d, 0xaf, 0x0a, 0x89, 0xcd, 0x47, 0x61, 0x08, 0xab, 0x74, 0x91, 0xbd, 0x88, + 0x07, 0xab, 0xfe, 0x34, 0x2b, 0x51, 0x34, 0x16, 0xac, 0x81, 0xb8, 0x0e, 0x79, 0xe7, 0x0d, 0xc1, + 0xa0, 0x1b, 0x0c, 0x63, 0x75, 0x75, 0x85, 0x2d, 0x6e, 0x73, 0x3d, 0xa1, 0xec, 0x11, 0x18, 0x76, + 0xc5, 0xda, 0xdc, 0x5d, 0xcb, 0x70, 0x56, 0x57, 0x90, 0xdb, 0x44, 0x11, 0x1b, 0x5a, 0xf0, 0x9e, + 0xe9, 0x87, 0x8d, 0x15, 0x75, 0x56, 0x26, 0xfe, 0x2c, 0x02, 0xc3, 0x4a, 0x2b, 0x5a, 0x6d, 0x53, + 0xb4, 0x41, 0x9a, 0xee, 0x80, 0x95, 0x72, 0xa4, 0x36, 0x2e, 0x73, 0xf4, 0x16, 0x65, 0x9e, 0x98, + 0x47, 0x77, 0xed, 0x6a, 0xbb, 0x39, 0x0d, 0xa6, 0xdc, 0xc4, 0x84, 0xa0, 0x2f, 0x31, 0x31, 0x9d, + 0xae, 0x9e, 0xdc, 0x9d, 0x28, 0x0b, 0x0b, 0xbd, 0x8a, 0x77, 0x6f, 0xac, 0x96, 0x36, 0xf0, 0x6b, + 0x33, 0x22, 0xb9, 0xaf, 0x46, 0x20, 0xc9, 0xca, 0xd6, 0x6a, 0xf3, 0xc0, 0x36, 0x0b, 0x10, 0x99, + 0x67, 0x1e, 0x74, 0x73, 0x72, 0x47, 0x2a, 0x68, 0x75, 0x8a, 0x14, 0xfa, 0x37, 0x75, 0x64, 0xdb, + 0x9c, 0x85,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xb4, 0x54, 0xc1, 0xa3, 0xae, + 0xde, 0x6e, 0x6e, 0x42, 0x86, 0x13, 0x2f, 0x36, 0x9a, 0x95, 0x36, 0xe6, 0x1b, 0x65, 0x6f, 0xf0, + 0x0a, 0xe6, 0xcb, 0x49, 0x29, 0xdb, 0x8c, 0xab, 0x35, 0x9b, 0x0f, 0x41, 0x62, 0xc9, 0x69, 0x5f, + 0x98, 0xc5, 0xdc, 0xf8, 0xbb, 0xfc, 0xbb, 0xb9, 0x71, 0x12, 0xca, 0x25, 0x51, 0x67, 0x97, 0x0c, + 0x7d, 0x69, 0x0e, 0xa3, 0x63, 0xbd, 0xd0, 0x84, 0xc4, 0x43, 0x93, 0x4b, 0x7c, 0x8e, 0xb2, 0xc5, + 0x59, 0xb1, 0xd7, 0xf7, 0x9f, 0xf6, 0x81, 0x0b, 0x1a, 0x8a, 0x1f, 0xea, 0x88, 0xe1, 0x19, 0x03, + 0x3a, 0xfe, 0x40, 0x4f, 0x06, 0x92, 0x00, 0x84, 0x81, 0x90, 0x60, 0x43, 0x48, 0x30, 0x18, 0xc8, + 0x60, 0x43, 0x93, 0xc0, 0x95, 0x25, 0xd8, 0x10, 0x12, 0x24, 0x7a, 0x32, 0x90, 0x25, 0x70, 0x85, + 0x04, 0x05, 0x80, 0xc5, 0xfa, 0x0b, 0x76, 0x8d, 0x8a, 0x40, 0xdf, 0xf4, 0x9f, 0xf3, 0xe1, 0xe0, + 0x11, 0x51, 0x16, 0xb0, 0x23, 0x1a, 0xcc, 0x12, 0x24, 0x37, 0xbc, 0x4b, 0x96, 0x3e, 0xee, 0xf2, + 0x13, 0x63, 0x47, 0xe3, 0x92, 0x74, 0x25, 0x36, 0x5c, 0x14, 0x3a, 0x99, 0x64, 0x6f, 0x51, 0xa4, + 0xd9, 0x50, 0x51, 0xe8, 0x74, 0x84, 0x28, 0x94, 0x49, 0x2a, 0x44, 0x14, 0x89, 0x0b, 0x13, 0x85, + 0xb2, 0x41, 0xc9, 0xb0, 0x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xff, 0x20, 0xbc, 0x9d, + 0x4f, 0x73, 0x79, 0x00, 0x00, + } + r := bytes.NewReader(gzipped) + gzipr, err := compress_gzip.NewReader(r) + if err != nil { + panic(err) + } + ungzipped, err := io_ioutil.ReadAll(gzipr) + if err != nil { + panic(err) + } + if err := github_com_gogo_protobuf_proto.Unmarshal(ungzipped, d); err != nil { + panic(err) + } + return d +} +func (x MapEnum) String() string { + s, ok := MapEnum_name[int32(x)] + if ok { + return s + } + return strconv.Itoa(int(x)) +} +func (x Message_Humour) String() string { + s, ok := Message_Humour_name[int32(x)] + if ok { + return s + } + return strconv.Itoa(int(x)) +} +func (this *Message) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*Message) + if !ok { + that2, ok := that.(Message) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *Message") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *Message but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *Message 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.Hilarity != that1.Hilarity { + return fmt.Errorf("Hilarity this(%v) Not Equal that(%v)", this.Hilarity, that1.Hilarity) + } + if this.HeightInCm != that1.HeightInCm { + return fmt.Errorf("HeightInCm this(%v) Not Equal that(%v)", this.HeightInCm, that1.HeightInCm) + } + if !bytes.Equal(this.Data, that1.Data) { + return fmt.Errorf("Data this(%v) Not Equal that(%v)", this.Data, that1.Data) + } + if this.ResultCount != that1.ResultCount { + return fmt.Errorf("ResultCount this(%v) Not Equal that(%v)", this.ResultCount, that1.ResultCount) + } + if this.TrueScotsman != that1.TrueScotsman { + return fmt.Errorf("TrueScotsman this(%v) Not Equal that(%v)", this.TrueScotsman, that1.TrueScotsman) + } + if this.Score != that1.Score { + return fmt.Errorf("Score this(%v) Not Equal that(%v)", this.Score, that1.Score) + } + if len(this.Key) != len(that1.Key) { + return fmt.Errorf("Key this(%v) Not Equal that(%v)", len(this.Key), len(that1.Key)) + } + for i := range this.Key { + if this.Key[i] != that1.Key[i] { + return fmt.Errorf("Key this[%v](%v) Not Equal that[%v](%v)", i, this.Key[i], i, that1.Key[i]) + } + } + if !this.Nested.Equal(that1.Nested) { + return fmt.Errorf("Nested this(%v) Not Equal that(%v)", this.Nested, that1.Nested) + } + if len(this.Terrain) != len(that1.Terrain) { + return fmt.Errorf("Terrain this(%v) Not Equal that(%v)", len(this.Terrain), len(that1.Terrain)) + } + for i := range this.Terrain { + if !this.Terrain[i].Equal(that1.Terrain[i]) { + return fmt.Errorf("Terrain this[%v](%v) Not Equal that[%v](%v)", i, this.Terrain[i], i, that1.Terrain[i]) + } + } + if !this.Proto2Field.Equal(that1.Proto2Field) { + return fmt.Errorf("Proto2Field this(%v) Not Equal that(%v)", this.Proto2Field, that1.Proto2Field) + } + if len(this.Proto2Value) != len(that1.Proto2Value) { + return fmt.Errorf("Proto2Value this(%v) Not Equal that(%v)", len(this.Proto2Value), len(that1.Proto2Value)) + } + for i := range this.Proto2Value { + if !this.Proto2Value[i].Equal(that1.Proto2Value[i]) { + return fmt.Errorf("Proto2Value this[%v](%v) Not Equal that[%v](%v)", i, this.Proto2Value[i], i, that1.Proto2Value[i]) + } + } + return nil +} +func (this *Message) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*Message) + if !ok { + that2, ok := that.(Message) + 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.Hilarity != that1.Hilarity { + return false + } + if this.HeightInCm != that1.HeightInCm { + return false + } + if !bytes.Equal(this.Data, that1.Data) { + return false + } + if this.ResultCount != that1.ResultCount { + return false + } + if this.TrueScotsman != that1.TrueScotsman { + return false + } + if this.Score != that1.Score { + return false + } + if len(this.Key) != len(that1.Key) { + return false + } + for i := range this.Key { + if this.Key[i] != that1.Key[i] { + return false + } + } + if !this.Nested.Equal(that1.Nested) { + return false + } + if len(this.Terrain) != len(that1.Terrain) { + return false + } + for i := range this.Terrain { + if !this.Terrain[i].Equal(that1.Terrain[i]) { + return false + } + } + if !this.Proto2Field.Equal(that1.Proto2Field) { + return false + } + if len(this.Proto2Value) != len(that1.Proto2Value) { + return false + } + for i := range this.Proto2Value { + if !this.Proto2Value[i].Equal(that1.Proto2Value[i]) { + return false + } + } + return true +} +func (this *Nested) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*Nested) + if !ok { + that2, ok := that.(Nested) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *Nested") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *Nested but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *Nested but is not nil && this == nil") + } + if this.Bunny != that1.Bunny { + return fmt.Errorf("Bunny this(%v) Not Equal that(%v)", this.Bunny, that1.Bunny) + } + return nil +} +func (this *Nested) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*Nested) + if !ok { + that2, ok := that.(Nested) + 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.Bunny != that1.Bunny { + return false + } + return true +} +func (this *AllMaps) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*AllMaps) + if !ok { + that2, ok := that.(AllMaps) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *AllMaps") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *AllMaps but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *AllMaps but is not nil && this == nil") + } + if len(this.StringToDoubleMap) != len(that1.StringToDoubleMap) { + return fmt.Errorf("StringToDoubleMap this(%v) Not Equal that(%v)", len(this.StringToDoubleMap), len(that1.StringToDoubleMap)) + } + for i := range this.StringToDoubleMap { + if this.StringToDoubleMap[i] != that1.StringToDoubleMap[i] { + return fmt.Errorf("StringToDoubleMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringToDoubleMap[i], i, that1.StringToDoubleMap[i]) + } + } + if len(this.StringToFloatMap) != len(that1.StringToFloatMap) { + return fmt.Errorf("StringToFloatMap this(%v) Not Equal that(%v)", len(this.StringToFloatMap), len(that1.StringToFloatMap)) + } + for i := range this.StringToFloatMap { + if this.StringToFloatMap[i] != that1.StringToFloatMap[i] { + return fmt.Errorf("StringToFloatMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringToFloatMap[i], i, that1.StringToFloatMap[i]) + } + } + if len(this.Int32Map) != len(that1.Int32Map) { + return fmt.Errorf("Int32Map this(%v) Not Equal that(%v)", len(this.Int32Map), len(that1.Int32Map)) + } + for i := range this.Int32Map { + if this.Int32Map[i] != that1.Int32Map[i] { + return fmt.Errorf("Int32Map this[%v](%v) Not Equal that[%v](%v)", i, this.Int32Map[i], i, that1.Int32Map[i]) + } + } + if len(this.Int64Map) != len(that1.Int64Map) { + return fmt.Errorf("Int64Map this(%v) Not Equal that(%v)", len(this.Int64Map), len(that1.Int64Map)) + } + for i := range this.Int64Map { + if this.Int64Map[i] != that1.Int64Map[i] { + return fmt.Errorf("Int64Map this[%v](%v) Not Equal that[%v](%v)", i, this.Int64Map[i], i, that1.Int64Map[i]) + } + } + if len(this.Uint32Map) != len(that1.Uint32Map) { + return fmt.Errorf("Uint32Map this(%v) Not Equal that(%v)", len(this.Uint32Map), len(that1.Uint32Map)) + } + for i := range this.Uint32Map { + if this.Uint32Map[i] != that1.Uint32Map[i] { + return fmt.Errorf("Uint32Map this[%v](%v) Not Equal that[%v](%v)", i, this.Uint32Map[i], i, that1.Uint32Map[i]) + } + } + if len(this.Uint64Map) != len(that1.Uint64Map) { + return fmt.Errorf("Uint64Map this(%v) Not Equal that(%v)", len(this.Uint64Map), len(that1.Uint64Map)) + } + for i := range this.Uint64Map { + if this.Uint64Map[i] != that1.Uint64Map[i] { + return fmt.Errorf("Uint64Map this[%v](%v) Not Equal that[%v](%v)", i, this.Uint64Map[i], i, that1.Uint64Map[i]) + } + } + if len(this.Sint32Map) != len(that1.Sint32Map) { + return fmt.Errorf("Sint32Map this(%v) Not Equal that(%v)", len(this.Sint32Map), len(that1.Sint32Map)) + } + for i := range this.Sint32Map { + if this.Sint32Map[i] != that1.Sint32Map[i] { + return fmt.Errorf("Sint32Map this[%v](%v) Not Equal that[%v](%v)", i, this.Sint32Map[i], i, that1.Sint32Map[i]) + } + } + if len(this.Sint64Map) != len(that1.Sint64Map) { + return fmt.Errorf("Sint64Map this(%v) Not Equal that(%v)", len(this.Sint64Map), len(that1.Sint64Map)) + } + for i := range this.Sint64Map { + if this.Sint64Map[i] != that1.Sint64Map[i] { + return fmt.Errorf("Sint64Map this[%v](%v) Not Equal that[%v](%v)", i, this.Sint64Map[i], i, that1.Sint64Map[i]) + } + } + if len(this.Fixed32Map) != len(that1.Fixed32Map) { + return fmt.Errorf("Fixed32Map this(%v) Not Equal that(%v)", len(this.Fixed32Map), len(that1.Fixed32Map)) + } + for i := range this.Fixed32Map { + if this.Fixed32Map[i] != that1.Fixed32Map[i] { + return fmt.Errorf("Fixed32Map this[%v](%v) Not Equal that[%v](%v)", i, this.Fixed32Map[i], i, that1.Fixed32Map[i]) + } + } + if len(this.Sfixed32Map) != len(that1.Sfixed32Map) { + return fmt.Errorf("Sfixed32Map this(%v) Not Equal that(%v)", len(this.Sfixed32Map), len(that1.Sfixed32Map)) + } + for i := range this.Sfixed32Map { + if this.Sfixed32Map[i] != that1.Sfixed32Map[i] { + return fmt.Errorf("Sfixed32Map this[%v](%v) Not Equal that[%v](%v)", i, this.Sfixed32Map[i], i, that1.Sfixed32Map[i]) + } + } + if len(this.Fixed64Map) != len(that1.Fixed64Map) { + return fmt.Errorf("Fixed64Map this(%v) Not Equal that(%v)", len(this.Fixed64Map), len(that1.Fixed64Map)) + } + for i := range this.Fixed64Map { + if this.Fixed64Map[i] != that1.Fixed64Map[i] { + return fmt.Errorf("Fixed64Map this[%v](%v) Not Equal that[%v](%v)", i, this.Fixed64Map[i], i, that1.Fixed64Map[i]) + } + } + if len(this.Sfixed64Map) != len(that1.Sfixed64Map) { + return fmt.Errorf("Sfixed64Map this(%v) Not Equal that(%v)", len(this.Sfixed64Map), len(that1.Sfixed64Map)) + } + for i := range this.Sfixed64Map { + if this.Sfixed64Map[i] != that1.Sfixed64Map[i] { + return fmt.Errorf("Sfixed64Map this[%v](%v) Not Equal that[%v](%v)", i, this.Sfixed64Map[i], i, that1.Sfixed64Map[i]) + } + } + if len(this.BoolMap) != len(that1.BoolMap) { + return fmt.Errorf("BoolMap this(%v) Not Equal that(%v)", len(this.BoolMap), len(that1.BoolMap)) + } + for i := range this.BoolMap { + if this.BoolMap[i] != that1.BoolMap[i] { + return fmt.Errorf("BoolMap this[%v](%v) Not Equal that[%v](%v)", i, this.BoolMap[i], i, that1.BoolMap[i]) + } + } + if len(this.StringMap) != len(that1.StringMap) { + return fmt.Errorf("StringMap this(%v) Not Equal that(%v)", len(this.StringMap), len(that1.StringMap)) + } + for i := range this.StringMap { + if this.StringMap[i] != that1.StringMap[i] { + return fmt.Errorf("StringMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringMap[i], i, that1.StringMap[i]) + } + } + if len(this.StringToBytesMap) != len(that1.StringToBytesMap) { + return fmt.Errorf("StringToBytesMap this(%v) Not Equal that(%v)", len(this.StringToBytesMap), len(that1.StringToBytesMap)) + } + for i := range this.StringToBytesMap { + if !bytes.Equal(this.StringToBytesMap[i], that1.StringToBytesMap[i]) { + return fmt.Errorf("StringToBytesMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringToBytesMap[i], i, that1.StringToBytesMap[i]) + } + } + if len(this.StringToEnumMap) != len(that1.StringToEnumMap) { + return fmt.Errorf("StringToEnumMap this(%v) Not Equal that(%v)", len(this.StringToEnumMap), len(that1.StringToEnumMap)) + } + for i := range this.StringToEnumMap { + if this.StringToEnumMap[i] != that1.StringToEnumMap[i] { + return fmt.Errorf("StringToEnumMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringToEnumMap[i], i, that1.StringToEnumMap[i]) + } + } + if len(this.StringToMsgMap) != len(that1.StringToMsgMap) { + return fmt.Errorf("StringToMsgMap this(%v) Not Equal that(%v)", len(this.StringToMsgMap), len(that1.StringToMsgMap)) + } + for i := range this.StringToMsgMap { + if !this.StringToMsgMap[i].Equal(that1.StringToMsgMap[i]) { + return fmt.Errorf("StringToMsgMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringToMsgMap[i], i, that1.StringToMsgMap[i]) + } + } + return nil +} +func (this *AllMaps) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*AllMaps) + if !ok { + that2, ok := that.(AllMaps) + 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.StringToDoubleMap) != len(that1.StringToDoubleMap) { + return false + } + for i := range this.StringToDoubleMap { + if this.StringToDoubleMap[i] != that1.StringToDoubleMap[i] { + return false + } + } + if len(this.StringToFloatMap) != len(that1.StringToFloatMap) { + return false + } + for i := range this.StringToFloatMap { + if this.StringToFloatMap[i] != that1.StringToFloatMap[i] { + return false + } + } + if len(this.Int32Map) != len(that1.Int32Map) { + return false + } + for i := range this.Int32Map { + if this.Int32Map[i] != that1.Int32Map[i] { + return false + } + } + if len(this.Int64Map) != len(that1.Int64Map) { + return false + } + for i := range this.Int64Map { + if this.Int64Map[i] != that1.Int64Map[i] { + return false + } + } + if len(this.Uint32Map) != len(that1.Uint32Map) { + return false + } + for i := range this.Uint32Map { + if this.Uint32Map[i] != that1.Uint32Map[i] { + return false + } + } + if len(this.Uint64Map) != len(that1.Uint64Map) { + return false + } + for i := range this.Uint64Map { + if this.Uint64Map[i] != that1.Uint64Map[i] { + return false + } + } + if len(this.Sint32Map) != len(that1.Sint32Map) { + return false + } + for i := range this.Sint32Map { + if this.Sint32Map[i] != that1.Sint32Map[i] { + return false + } + } + if len(this.Sint64Map) != len(that1.Sint64Map) { + return false + } + for i := range this.Sint64Map { + if this.Sint64Map[i] != that1.Sint64Map[i] { + return false + } + } + if len(this.Fixed32Map) != len(that1.Fixed32Map) { + return false + } + for i := range this.Fixed32Map { + if this.Fixed32Map[i] != that1.Fixed32Map[i] { + return false + } + } + if len(this.Sfixed32Map) != len(that1.Sfixed32Map) { + return false + } + for i := range this.Sfixed32Map { + if this.Sfixed32Map[i] != that1.Sfixed32Map[i] { + return false + } + } + if len(this.Fixed64Map) != len(that1.Fixed64Map) { + return false + } + for i := range this.Fixed64Map { + if this.Fixed64Map[i] != that1.Fixed64Map[i] { + return false + } + } + if len(this.Sfixed64Map) != len(that1.Sfixed64Map) { + return false + } + for i := range this.Sfixed64Map { + if this.Sfixed64Map[i] != that1.Sfixed64Map[i] { + return false + } + } + if len(this.BoolMap) != len(that1.BoolMap) { + return false + } + for i := range this.BoolMap { + if this.BoolMap[i] != that1.BoolMap[i] { + return false + } + } + if len(this.StringMap) != len(that1.StringMap) { + return false + } + for i := range this.StringMap { + if this.StringMap[i] != that1.StringMap[i] { + return false + } + } + if len(this.StringToBytesMap) != len(that1.StringToBytesMap) { + return false + } + for i := range this.StringToBytesMap { + if !bytes.Equal(this.StringToBytesMap[i], that1.StringToBytesMap[i]) { + return false + } + } + if len(this.StringToEnumMap) != len(that1.StringToEnumMap) { + return false + } + for i := range this.StringToEnumMap { + if this.StringToEnumMap[i] != that1.StringToEnumMap[i] { + return false + } + } + if len(this.StringToMsgMap) != len(that1.StringToMsgMap) { + return false + } + for i := range this.StringToMsgMap { + if !this.StringToMsgMap[i].Equal(that1.StringToMsgMap[i]) { + return false + } + } + return true +} +func (this *AllMapsOrdered) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*AllMapsOrdered) + if !ok { + that2, ok := that.(AllMapsOrdered) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *AllMapsOrdered") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *AllMapsOrdered but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *AllMapsOrdered but is not nil && this == nil") + } + if len(this.StringToDoubleMap) != len(that1.StringToDoubleMap) { + return fmt.Errorf("StringToDoubleMap this(%v) Not Equal that(%v)", len(this.StringToDoubleMap), len(that1.StringToDoubleMap)) + } + for i := range this.StringToDoubleMap { + if this.StringToDoubleMap[i] != that1.StringToDoubleMap[i] { + return fmt.Errorf("StringToDoubleMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringToDoubleMap[i], i, that1.StringToDoubleMap[i]) + } + } + if len(this.StringToFloatMap) != len(that1.StringToFloatMap) { + return fmt.Errorf("StringToFloatMap this(%v) Not Equal that(%v)", len(this.StringToFloatMap), len(that1.StringToFloatMap)) + } + for i := range this.StringToFloatMap { + if this.StringToFloatMap[i] != that1.StringToFloatMap[i] { + return fmt.Errorf("StringToFloatMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringToFloatMap[i], i, that1.StringToFloatMap[i]) + } + } + if len(this.Int32Map) != len(that1.Int32Map) { + return fmt.Errorf("Int32Map this(%v) Not Equal that(%v)", len(this.Int32Map), len(that1.Int32Map)) + } + for i := range this.Int32Map { + if this.Int32Map[i] != that1.Int32Map[i] { + return fmt.Errorf("Int32Map this[%v](%v) Not Equal that[%v](%v)", i, this.Int32Map[i], i, that1.Int32Map[i]) + } + } + if len(this.Int64Map) != len(that1.Int64Map) { + return fmt.Errorf("Int64Map this(%v) Not Equal that(%v)", len(this.Int64Map), len(that1.Int64Map)) + } + for i := range this.Int64Map { + if this.Int64Map[i] != that1.Int64Map[i] { + return fmt.Errorf("Int64Map this[%v](%v) Not Equal that[%v](%v)", i, this.Int64Map[i], i, that1.Int64Map[i]) + } + } + if len(this.Uint32Map) != len(that1.Uint32Map) { + return fmt.Errorf("Uint32Map this(%v) Not Equal that(%v)", len(this.Uint32Map), len(that1.Uint32Map)) + } + for i := range this.Uint32Map { + if this.Uint32Map[i] != that1.Uint32Map[i] { + return fmt.Errorf("Uint32Map this[%v](%v) Not Equal that[%v](%v)", i, this.Uint32Map[i], i, that1.Uint32Map[i]) + } + } + if len(this.Uint64Map) != len(that1.Uint64Map) { + return fmt.Errorf("Uint64Map this(%v) Not Equal that(%v)", len(this.Uint64Map), len(that1.Uint64Map)) + } + for i := range this.Uint64Map { + if this.Uint64Map[i] != that1.Uint64Map[i] { + return fmt.Errorf("Uint64Map this[%v](%v) Not Equal that[%v](%v)", i, this.Uint64Map[i], i, that1.Uint64Map[i]) + } + } + if len(this.Sint32Map) != len(that1.Sint32Map) { + return fmt.Errorf("Sint32Map this(%v) Not Equal that(%v)", len(this.Sint32Map), len(that1.Sint32Map)) + } + for i := range this.Sint32Map { + if this.Sint32Map[i] != that1.Sint32Map[i] { + return fmt.Errorf("Sint32Map this[%v](%v) Not Equal that[%v](%v)", i, this.Sint32Map[i], i, that1.Sint32Map[i]) + } + } + if len(this.Sint64Map) != len(that1.Sint64Map) { + return fmt.Errorf("Sint64Map this(%v) Not Equal that(%v)", len(this.Sint64Map), len(that1.Sint64Map)) + } + for i := range this.Sint64Map { + if this.Sint64Map[i] != that1.Sint64Map[i] { + return fmt.Errorf("Sint64Map this[%v](%v) Not Equal that[%v](%v)", i, this.Sint64Map[i], i, that1.Sint64Map[i]) + } + } + if len(this.Fixed32Map) != len(that1.Fixed32Map) { + return fmt.Errorf("Fixed32Map this(%v) Not Equal that(%v)", len(this.Fixed32Map), len(that1.Fixed32Map)) + } + for i := range this.Fixed32Map { + if this.Fixed32Map[i] != that1.Fixed32Map[i] { + return fmt.Errorf("Fixed32Map this[%v](%v) Not Equal that[%v](%v)", i, this.Fixed32Map[i], i, that1.Fixed32Map[i]) + } + } + if len(this.Sfixed32Map) != len(that1.Sfixed32Map) { + return fmt.Errorf("Sfixed32Map this(%v) Not Equal that(%v)", len(this.Sfixed32Map), len(that1.Sfixed32Map)) + } + for i := range this.Sfixed32Map { + if this.Sfixed32Map[i] != that1.Sfixed32Map[i] { + return fmt.Errorf("Sfixed32Map this[%v](%v) Not Equal that[%v](%v)", i, this.Sfixed32Map[i], i, that1.Sfixed32Map[i]) + } + } + if len(this.Fixed64Map) != len(that1.Fixed64Map) { + return fmt.Errorf("Fixed64Map this(%v) Not Equal that(%v)", len(this.Fixed64Map), len(that1.Fixed64Map)) + } + for i := range this.Fixed64Map { + if this.Fixed64Map[i] != that1.Fixed64Map[i] { + return fmt.Errorf("Fixed64Map this[%v](%v) Not Equal that[%v](%v)", i, this.Fixed64Map[i], i, that1.Fixed64Map[i]) + } + } + if len(this.Sfixed64Map) != len(that1.Sfixed64Map) { + return fmt.Errorf("Sfixed64Map this(%v) Not Equal that(%v)", len(this.Sfixed64Map), len(that1.Sfixed64Map)) + } + for i := range this.Sfixed64Map { + if this.Sfixed64Map[i] != that1.Sfixed64Map[i] { + return fmt.Errorf("Sfixed64Map this[%v](%v) Not Equal that[%v](%v)", i, this.Sfixed64Map[i], i, that1.Sfixed64Map[i]) + } + } + if len(this.BoolMap) != len(that1.BoolMap) { + return fmt.Errorf("BoolMap this(%v) Not Equal that(%v)", len(this.BoolMap), len(that1.BoolMap)) + } + for i := range this.BoolMap { + if this.BoolMap[i] != that1.BoolMap[i] { + return fmt.Errorf("BoolMap this[%v](%v) Not Equal that[%v](%v)", i, this.BoolMap[i], i, that1.BoolMap[i]) + } + } + if len(this.StringMap) != len(that1.StringMap) { + return fmt.Errorf("StringMap this(%v) Not Equal that(%v)", len(this.StringMap), len(that1.StringMap)) + } + for i := range this.StringMap { + if this.StringMap[i] != that1.StringMap[i] { + return fmt.Errorf("StringMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringMap[i], i, that1.StringMap[i]) + } + } + if len(this.StringToBytesMap) != len(that1.StringToBytesMap) { + return fmt.Errorf("StringToBytesMap this(%v) Not Equal that(%v)", len(this.StringToBytesMap), len(that1.StringToBytesMap)) + } + for i := range this.StringToBytesMap { + if !bytes.Equal(this.StringToBytesMap[i], that1.StringToBytesMap[i]) { + return fmt.Errorf("StringToBytesMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringToBytesMap[i], i, that1.StringToBytesMap[i]) + } + } + if len(this.StringToEnumMap) != len(that1.StringToEnumMap) { + return fmt.Errorf("StringToEnumMap this(%v) Not Equal that(%v)", len(this.StringToEnumMap), len(that1.StringToEnumMap)) + } + for i := range this.StringToEnumMap { + if this.StringToEnumMap[i] != that1.StringToEnumMap[i] { + return fmt.Errorf("StringToEnumMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringToEnumMap[i], i, that1.StringToEnumMap[i]) + } + } + if len(this.StringToMsgMap) != len(that1.StringToMsgMap) { + return fmt.Errorf("StringToMsgMap this(%v) Not Equal that(%v)", len(this.StringToMsgMap), len(that1.StringToMsgMap)) + } + for i := range this.StringToMsgMap { + if !this.StringToMsgMap[i].Equal(that1.StringToMsgMap[i]) { + return fmt.Errorf("StringToMsgMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringToMsgMap[i], i, that1.StringToMsgMap[i]) + } + } + return nil +} +func (this *AllMapsOrdered) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*AllMapsOrdered) + if !ok { + that2, ok := that.(AllMapsOrdered) + 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.StringToDoubleMap) != len(that1.StringToDoubleMap) { + return false + } + for i := range this.StringToDoubleMap { + if this.StringToDoubleMap[i] != that1.StringToDoubleMap[i] { + return false + } + } + if len(this.StringToFloatMap) != len(that1.StringToFloatMap) { + return false + } + for i := range this.StringToFloatMap { + if this.StringToFloatMap[i] != that1.StringToFloatMap[i] { + return false + } + } + if len(this.Int32Map) != len(that1.Int32Map) { + return false + } + for i := range this.Int32Map { + if this.Int32Map[i] != that1.Int32Map[i] { + return false + } + } + if len(this.Int64Map) != len(that1.Int64Map) { + return false + } + for i := range this.Int64Map { + if this.Int64Map[i] != that1.Int64Map[i] { + return false + } + } + if len(this.Uint32Map) != len(that1.Uint32Map) { + return false + } + for i := range this.Uint32Map { + if this.Uint32Map[i] != that1.Uint32Map[i] { + return false + } + } + if len(this.Uint64Map) != len(that1.Uint64Map) { + return false + } + for i := range this.Uint64Map { + if this.Uint64Map[i] != that1.Uint64Map[i] { + return false + } + } + if len(this.Sint32Map) != len(that1.Sint32Map) { + return false + } + for i := range this.Sint32Map { + if this.Sint32Map[i] != that1.Sint32Map[i] { + return false + } + } + if len(this.Sint64Map) != len(that1.Sint64Map) { + return false + } + for i := range this.Sint64Map { + if this.Sint64Map[i] != that1.Sint64Map[i] { + return false + } + } + if len(this.Fixed32Map) != len(that1.Fixed32Map) { + return false + } + for i := range this.Fixed32Map { + if this.Fixed32Map[i] != that1.Fixed32Map[i] { + return false + } + } + if len(this.Sfixed32Map) != len(that1.Sfixed32Map) { + return false + } + for i := range this.Sfixed32Map { + if this.Sfixed32Map[i] != that1.Sfixed32Map[i] { + return false + } + } + if len(this.Fixed64Map) != len(that1.Fixed64Map) { + return false + } + for i := range this.Fixed64Map { + if this.Fixed64Map[i] != that1.Fixed64Map[i] { + return false + } + } + if len(this.Sfixed64Map) != len(that1.Sfixed64Map) { + return false + } + for i := range this.Sfixed64Map { + if this.Sfixed64Map[i] != that1.Sfixed64Map[i] { + return false + } + } + if len(this.BoolMap) != len(that1.BoolMap) { + return false + } + for i := range this.BoolMap { + if this.BoolMap[i] != that1.BoolMap[i] { + return false + } + } + if len(this.StringMap) != len(that1.StringMap) { + return false + } + for i := range this.StringMap { + if this.StringMap[i] != that1.StringMap[i] { + return false + } + } + if len(this.StringToBytesMap) != len(that1.StringToBytesMap) { + return false + } + for i := range this.StringToBytesMap { + if !bytes.Equal(this.StringToBytesMap[i], that1.StringToBytesMap[i]) { + return false + } + } + if len(this.StringToEnumMap) != len(that1.StringToEnumMap) { + return false + } + for i := range this.StringToEnumMap { + if this.StringToEnumMap[i] != that1.StringToEnumMap[i] { + return false + } + } + if len(this.StringToMsgMap) != len(that1.StringToMsgMap) { + return false + } + for i := range this.StringToMsgMap { + if !this.StringToMsgMap[i].Equal(that1.StringToMsgMap[i]) { + return false + } + } + return true +} +func (this *MessageWithMap) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*MessageWithMap) + if !ok { + that2, ok := that.(MessageWithMap) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *MessageWithMap") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *MessageWithMap but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *MessageWithMap but is not nil && this == nil") + } + if len(this.NameMapping) != len(that1.NameMapping) { + return fmt.Errorf("NameMapping this(%v) Not Equal that(%v)", len(this.NameMapping), len(that1.NameMapping)) + } + for i := range this.NameMapping { + if this.NameMapping[i] != that1.NameMapping[i] { + return fmt.Errorf("NameMapping this[%v](%v) Not Equal that[%v](%v)", i, this.NameMapping[i], i, that1.NameMapping[i]) + } + } + if len(this.MsgMapping) != len(that1.MsgMapping) { + return fmt.Errorf("MsgMapping this(%v) Not Equal that(%v)", len(this.MsgMapping), len(that1.MsgMapping)) + } + for i := range this.MsgMapping { + if !this.MsgMapping[i].Equal(that1.MsgMapping[i]) { + return fmt.Errorf("MsgMapping this[%v](%v) Not Equal that[%v](%v)", i, this.MsgMapping[i], i, that1.MsgMapping[i]) + } + } + if len(this.ByteMapping) != len(that1.ByteMapping) { + return fmt.Errorf("ByteMapping this(%v) Not Equal that(%v)", len(this.ByteMapping), len(that1.ByteMapping)) + } + for i := range this.ByteMapping { + if !bytes.Equal(this.ByteMapping[i], that1.ByteMapping[i]) { + return fmt.Errorf("ByteMapping this[%v](%v) Not Equal that[%v](%v)", i, this.ByteMapping[i], i, that1.ByteMapping[i]) + } + } + return nil +} +func (this *MessageWithMap) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*MessageWithMap) + if !ok { + that2, ok := that.(MessageWithMap) + 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.NameMapping) != len(that1.NameMapping) { + return false + } + for i := range this.NameMapping { + if this.NameMapping[i] != that1.NameMapping[i] { + return false + } + } + if len(this.MsgMapping) != len(that1.MsgMapping) { + return false + } + for i := range this.MsgMapping { + if !this.MsgMapping[i].Equal(that1.MsgMapping[i]) { + return false + } + } + if len(this.ByteMapping) != len(that1.ByteMapping) { + return false + } + for i := range this.ByteMapping { + if !bytes.Equal(this.ByteMapping[i], that1.ByteMapping[i]) { + return false + } + } + return true +} +func (this *FloatingPoint) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*FloatingPoint) + if !ok { + that2, ok := that.(FloatingPoint) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *FloatingPoint") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *FloatingPoint but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *FloatingPoint but is not nil && this == nil") + } + if this.F != that1.F { + return fmt.Errorf("F this(%v) Not Equal that(%v)", this.F, that1.F) + } + return nil +} +func (this *FloatingPoint) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*FloatingPoint) + if !ok { + that2, ok := that.(FloatingPoint) + 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.F != that1.F { + return false + } + return true +} +func (this *Uint128Pair) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*Uint128Pair) + if !ok { + that2, ok := that.(Uint128Pair) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *Uint128Pair") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *Uint128Pair but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *Uint128Pair but is not nil && this == nil") + } + if !this.Left.Equal(that1.Left) { + return fmt.Errorf("Left this(%v) Not Equal that(%v)", this.Left, that1.Left) + } + if that1.Right == nil { + if this.Right != nil { + return fmt.Errorf("this.Right != nil && that1.Right == nil") + } + } else if !this.Right.Equal(*that1.Right) { + return fmt.Errorf("Right this(%v) Not Equal that(%v)", this.Right, that1.Right) + } + return nil +} +func (this *Uint128Pair) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*Uint128Pair) + if !ok { + that2, ok := that.(Uint128Pair) + 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.Left.Equal(that1.Left) { + return false + } + if that1.Right == nil { + if this.Right != nil { + return false + } + } else if !this.Right.Equal(*that1.Right) { + return false + } + return true +} +func (this *ContainsNestedMap) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*ContainsNestedMap) + if !ok { + that2, ok := that.(ContainsNestedMap) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *ContainsNestedMap") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *ContainsNestedMap but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *ContainsNestedMap but is not nil && this == nil") + } + return nil +} +func (this *ContainsNestedMap) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*ContainsNestedMap) + if !ok { + that2, ok := that.(ContainsNestedMap) + 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 *ContainsNestedMap_NestedMap) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*ContainsNestedMap_NestedMap) + if !ok { + that2, ok := that.(ContainsNestedMap_NestedMap) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *ContainsNestedMap_NestedMap") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *ContainsNestedMap_NestedMap but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *ContainsNestedMap_NestedMap but is not nil && this == nil") + } + if len(this.NestedMapField) != len(that1.NestedMapField) { + return fmt.Errorf("NestedMapField this(%v) Not Equal that(%v)", len(this.NestedMapField), len(that1.NestedMapField)) + } + for i := range this.NestedMapField { + if this.NestedMapField[i] != that1.NestedMapField[i] { + return fmt.Errorf("NestedMapField this[%v](%v) Not Equal that[%v](%v)", i, this.NestedMapField[i], i, that1.NestedMapField[i]) + } + } + return nil +} +func (this *ContainsNestedMap_NestedMap) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*ContainsNestedMap_NestedMap) + if !ok { + that2, ok := that.(ContainsNestedMap_NestedMap) + 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.NestedMapField) != len(that1.NestedMapField) { + return false + } + for i := range this.NestedMapField { + if this.NestedMapField[i] != that1.NestedMapField[i] { + return false + } + } + return true +} + +type MessageFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetName() string + GetHilarity() Message_Humour + GetHeightInCm() uint32 + GetData() []byte + GetResultCount() int64 + GetTrueScotsman() bool + GetScore() float32 + GetKey() []uint64 + GetNested() *Nested + GetTerrain() map[int64]*Nested + GetProto2Field() *test.NinOptNative + GetProto2Value() map[int64]*test.NinOptEnum +} + +func (this *Message) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *Message) TestProto() github_com_gogo_protobuf_proto.Message { + return NewMessageFromFace(this) +} + +func (this *Message) GetName() string { + return this.Name +} + +func (this *Message) GetHilarity() Message_Humour { + return this.Hilarity +} + +func (this *Message) GetHeightInCm() uint32 { + return this.HeightInCm +} + +func (this *Message) GetData() []byte { + return this.Data +} + +func (this *Message) GetResultCount() int64 { + return this.ResultCount +} + +func (this *Message) GetTrueScotsman() bool { + return this.TrueScotsman +} + +func (this *Message) GetScore() float32 { + return this.Score +} + +func (this *Message) GetKey() []uint64 { + return this.Key +} + +func (this *Message) GetNested() *Nested { + return this.Nested +} + +func (this *Message) GetTerrain() map[int64]*Nested { + return this.Terrain +} + +func (this *Message) GetProto2Field() *test.NinOptNative { + return this.Proto2Field +} + +func (this *Message) GetProto2Value() map[int64]*test.NinOptEnum { + return this.Proto2Value +} + +func NewMessageFromFace(that MessageFace) *Message { + this := &Message{} + this.Name = that.GetName() + this.Hilarity = that.GetHilarity() + this.HeightInCm = that.GetHeightInCm() + this.Data = that.GetData() + this.ResultCount = that.GetResultCount() + this.TrueScotsman = that.GetTrueScotsman() + this.Score = that.GetScore() + this.Key = that.GetKey() + this.Nested = that.GetNested() + this.Terrain = that.GetTerrain() + this.Proto2Field = that.GetProto2Field() + this.Proto2Value = that.GetProto2Value() + return this +} + +type NestedFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetBunny() string +} + +func (this *Nested) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *Nested) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNestedFromFace(this) +} + +func (this *Nested) GetBunny() string { + return this.Bunny +} + +func NewNestedFromFace(that NestedFace) *Nested { + this := &Nested{} + this.Bunny = that.GetBunny() + return this +} + +type AllMapsFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetStringToDoubleMap() map[string]float64 + GetStringToFloatMap() map[string]float32 + GetInt32Map() map[int32]int32 + GetInt64Map() map[int64]int64 + GetUint32Map() map[uint32]uint32 + GetUint64Map() map[uint64]uint64 + GetSint32Map() map[int32]int32 + GetSint64Map() map[int64]int64 + GetFixed32Map() map[uint32]uint32 + GetSfixed32Map() map[int32]int32 + GetFixed64Map() map[uint64]uint64 + GetSfixed64Map() map[int64]int64 + GetBoolMap() map[bool]bool + GetStringMap() map[string]string + GetStringToBytesMap() map[string][]byte + GetStringToEnumMap() map[string]MapEnum + GetStringToMsgMap() map[string]*FloatingPoint +} + +func (this *AllMaps) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *AllMaps) TestProto() github_com_gogo_protobuf_proto.Message { + return NewAllMapsFromFace(this) +} + +func (this *AllMaps) GetStringToDoubleMap() map[string]float64 { + return this.StringToDoubleMap +} + +func (this *AllMaps) GetStringToFloatMap() map[string]float32 { + return this.StringToFloatMap +} + +func (this *AllMaps) GetInt32Map() map[int32]int32 { + return this.Int32Map +} + +func (this *AllMaps) GetInt64Map() map[int64]int64 { + return this.Int64Map +} + +func (this *AllMaps) GetUint32Map() map[uint32]uint32 { + return this.Uint32Map +} + +func (this *AllMaps) GetUint64Map() map[uint64]uint64 { + return this.Uint64Map +} + +func (this *AllMaps) GetSint32Map() map[int32]int32 { + return this.Sint32Map +} + +func (this *AllMaps) GetSint64Map() map[int64]int64 { + return this.Sint64Map +} + +func (this *AllMaps) GetFixed32Map() map[uint32]uint32 { + return this.Fixed32Map +} + +func (this *AllMaps) GetSfixed32Map() map[int32]int32 { + return this.Sfixed32Map +} + +func (this *AllMaps) GetFixed64Map() map[uint64]uint64 { + return this.Fixed64Map +} + +func (this *AllMaps) GetSfixed64Map() map[int64]int64 { + return this.Sfixed64Map +} + +func (this *AllMaps) GetBoolMap() map[bool]bool { + return this.BoolMap +} + +func (this *AllMaps) GetStringMap() map[string]string { + return this.StringMap +} + +func (this *AllMaps) GetStringToBytesMap() map[string][]byte { + return this.StringToBytesMap +} + +func (this *AllMaps) GetStringToEnumMap() map[string]MapEnum { + return this.StringToEnumMap +} + +func (this *AllMaps) GetStringToMsgMap() map[string]*FloatingPoint { + return this.StringToMsgMap +} + +func NewAllMapsFromFace(that AllMapsFace) *AllMaps { + this := &AllMaps{} + this.StringToDoubleMap = that.GetStringToDoubleMap() + this.StringToFloatMap = that.GetStringToFloatMap() + this.Int32Map = that.GetInt32Map() + this.Int64Map = that.GetInt64Map() + this.Uint32Map = that.GetUint32Map() + this.Uint64Map = that.GetUint64Map() + this.Sint32Map = that.GetSint32Map() + this.Sint64Map = that.GetSint64Map() + this.Fixed32Map = that.GetFixed32Map() + this.Sfixed32Map = that.GetSfixed32Map() + this.Fixed64Map = that.GetFixed64Map() + this.Sfixed64Map = that.GetSfixed64Map() + this.BoolMap = that.GetBoolMap() + this.StringMap = that.GetStringMap() + this.StringToBytesMap = that.GetStringToBytesMap() + this.StringToEnumMap = that.GetStringToEnumMap() + this.StringToMsgMap = that.GetStringToMsgMap() + return this +} + +type AllMapsOrderedFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetStringToDoubleMap() map[string]float64 + GetStringToFloatMap() map[string]float32 + GetInt32Map() map[int32]int32 + GetInt64Map() map[int64]int64 + GetUint32Map() map[uint32]uint32 + GetUint64Map() map[uint64]uint64 + GetSint32Map() map[int32]int32 + GetSint64Map() map[int64]int64 + GetFixed32Map() map[uint32]uint32 + GetSfixed32Map() map[int32]int32 + GetFixed64Map() map[uint64]uint64 + GetSfixed64Map() map[int64]int64 + GetBoolMap() map[bool]bool + GetStringMap() map[string]string + GetStringToBytesMap() map[string][]byte + GetStringToEnumMap() map[string]MapEnum + GetStringToMsgMap() map[string]*FloatingPoint +} + +func (this *AllMapsOrdered) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *AllMapsOrdered) TestProto() github_com_gogo_protobuf_proto.Message { + return NewAllMapsOrderedFromFace(this) +} + +func (this *AllMapsOrdered) GetStringToDoubleMap() map[string]float64 { + return this.StringToDoubleMap +} + +func (this *AllMapsOrdered) GetStringToFloatMap() map[string]float32 { + return this.StringToFloatMap +} + +func (this *AllMapsOrdered) GetInt32Map() map[int32]int32 { + return this.Int32Map +} + +func (this *AllMapsOrdered) GetInt64Map() map[int64]int64 { + return this.Int64Map +} + +func (this *AllMapsOrdered) GetUint32Map() map[uint32]uint32 { + return this.Uint32Map +} + +func (this *AllMapsOrdered) GetUint64Map() map[uint64]uint64 { + return this.Uint64Map +} + +func (this *AllMapsOrdered) GetSint32Map() map[int32]int32 { + return this.Sint32Map +} + +func (this *AllMapsOrdered) GetSint64Map() map[int64]int64 { + return this.Sint64Map +} + +func (this *AllMapsOrdered) GetFixed32Map() map[uint32]uint32 { + return this.Fixed32Map +} + +func (this *AllMapsOrdered) GetSfixed32Map() map[int32]int32 { + return this.Sfixed32Map +} + +func (this *AllMapsOrdered) GetFixed64Map() map[uint64]uint64 { + return this.Fixed64Map +} + +func (this *AllMapsOrdered) GetSfixed64Map() map[int64]int64 { + return this.Sfixed64Map +} + +func (this *AllMapsOrdered) GetBoolMap() map[bool]bool { + return this.BoolMap +} + +func (this *AllMapsOrdered) GetStringMap() map[string]string { + return this.StringMap +} + +func (this *AllMapsOrdered) GetStringToBytesMap() map[string][]byte { + return this.StringToBytesMap +} + +func (this *AllMapsOrdered) GetStringToEnumMap() map[string]MapEnum { + return this.StringToEnumMap +} + +func (this *AllMapsOrdered) GetStringToMsgMap() map[string]*FloatingPoint { + return this.StringToMsgMap +} + +func NewAllMapsOrderedFromFace(that AllMapsOrderedFace) *AllMapsOrdered { + this := &AllMapsOrdered{} + this.StringToDoubleMap = that.GetStringToDoubleMap() + this.StringToFloatMap = that.GetStringToFloatMap() + this.Int32Map = that.GetInt32Map() + this.Int64Map = that.GetInt64Map() + this.Uint32Map = that.GetUint32Map() + this.Uint64Map = that.GetUint64Map() + this.Sint32Map = that.GetSint32Map() + this.Sint64Map = that.GetSint64Map() + this.Fixed32Map = that.GetFixed32Map() + this.Sfixed32Map = that.GetSfixed32Map() + this.Fixed64Map = that.GetFixed64Map() + this.Sfixed64Map = that.GetSfixed64Map() + this.BoolMap = that.GetBoolMap() + this.StringMap = that.GetStringMap() + this.StringToBytesMap = that.GetStringToBytesMap() + this.StringToEnumMap = that.GetStringToEnumMap() + this.StringToMsgMap = that.GetStringToMsgMap() + return this +} + +type MessageWithMapFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetNameMapping() map[int32]string + GetMsgMapping() map[int64]*FloatingPoint + GetByteMapping() map[bool][]byte +} + +func (this *MessageWithMap) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *MessageWithMap) TestProto() github_com_gogo_protobuf_proto.Message { + return NewMessageWithMapFromFace(this) +} + +func (this *MessageWithMap) GetNameMapping() map[int32]string { + return this.NameMapping +} + +func (this *MessageWithMap) GetMsgMapping() map[int64]*FloatingPoint { + return this.MsgMapping +} + +func (this *MessageWithMap) GetByteMapping() map[bool][]byte { + return this.ByteMapping +} + +func NewMessageWithMapFromFace(that MessageWithMapFace) *MessageWithMap { + this := &MessageWithMap{} + this.NameMapping = that.GetNameMapping() + this.MsgMapping = that.GetMsgMapping() + this.ByteMapping = that.GetByteMapping() + return this +} + +type FloatingPointFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetF() float64 +} + +func (this *FloatingPoint) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *FloatingPoint) TestProto() github_com_gogo_protobuf_proto.Message { + return NewFloatingPointFromFace(this) +} + +func (this *FloatingPoint) GetF() float64 { + return this.F +} + +func NewFloatingPointFromFace(that FloatingPointFace) *FloatingPoint { + this := &FloatingPoint{} + this.F = that.GetF() + return this +} + +type Uint128PairFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetLeft() github_com_gogo_protobuf_test_custom.Uint128 + GetRight() *github_com_gogo_protobuf_test_custom.Uint128 +} + +func (this *Uint128Pair) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *Uint128Pair) TestProto() github_com_gogo_protobuf_proto.Message { + return NewUint128PairFromFace(this) +} + +func (this *Uint128Pair) GetLeft() github_com_gogo_protobuf_test_custom.Uint128 { + return this.Left +} + +func (this *Uint128Pair) GetRight() *github_com_gogo_protobuf_test_custom.Uint128 { + return this.Right +} + +func NewUint128PairFromFace(that Uint128PairFace) *Uint128Pair { + this := &Uint128Pair{} + this.Left = that.GetLeft() + this.Right = that.GetRight() + return this +} + +type ContainsNestedMapFace interface { + Proto() github_com_gogo_protobuf_proto.Message +} + +func (this *ContainsNestedMap) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *ContainsNestedMap) TestProto() github_com_gogo_protobuf_proto.Message { + return NewContainsNestedMapFromFace(this) +} + +func NewContainsNestedMapFromFace(that ContainsNestedMapFace) *ContainsNestedMap { + this := &ContainsNestedMap{} + return this +} + +type ContainsNestedMap_NestedMapFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetNestedMapField() map[string]float64 +} + +func (this *ContainsNestedMap_NestedMap) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *ContainsNestedMap_NestedMap) TestProto() github_com_gogo_protobuf_proto.Message { + return NewContainsNestedMap_NestedMapFromFace(this) +} + +func (this *ContainsNestedMap_NestedMap) GetNestedMapField() map[string]float64 { + return this.NestedMapField +} + +func NewContainsNestedMap_NestedMapFromFace(that ContainsNestedMap_NestedMapFace) *ContainsNestedMap_NestedMap { + this := &ContainsNestedMap_NestedMap{} + this.NestedMapField = that.GetNestedMapField() + return this +} + +func (this *Message) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 16) + s = append(s, "&theproto3.Message{") + s = append(s, "Name: "+fmt.Sprintf("%#v", this.Name)+",\n") + s = append(s, "Hilarity: "+fmt.Sprintf("%#v", this.Hilarity)+",\n") + s = append(s, "HeightInCm: "+fmt.Sprintf("%#v", this.HeightInCm)+",\n") + s = append(s, "Data: "+fmt.Sprintf("%#v", this.Data)+",\n") + s = append(s, "ResultCount: "+fmt.Sprintf("%#v", this.ResultCount)+",\n") + s = append(s, "TrueScotsman: "+fmt.Sprintf("%#v", this.TrueScotsman)+",\n") + s = append(s, "Score: "+fmt.Sprintf("%#v", this.Score)+",\n") + s = append(s, "Key: "+fmt.Sprintf("%#v", this.Key)+",\n") + if this.Nested != nil { + s = append(s, "Nested: "+fmt.Sprintf("%#v", this.Nested)+",\n") + } + keysForTerrain := make([]int64, 0, len(this.Terrain)) + for k := range this.Terrain { + keysForTerrain = append(keysForTerrain, k) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForTerrain) + mapStringForTerrain := "map[int64]*Nested{" + for _, k := range keysForTerrain { + mapStringForTerrain += fmt.Sprintf("%#v: %#v,", k, this.Terrain[k]) + } + mapStringForTerrain += "}" + if this.Terrain != nil { + s = append(s, "Terrain: "+mapStringForTerrain+",\n") + } + if this.Proto2Field != nil { + s = append(s, "Proto2Field: "+fmt.Sprintf("%#v", this.Proto2Field)+",\n") + } + keysForProto2Value := make([]int64, 0, len(this.Proto2Value)) + for k := range this.Proto2Value { + keysForProto2Value = append(keysForProto2Value, k) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForProto2Value) + mapStringForProto2Value := "map[int64]*test.NinOptEnum{" + for _, k := range keysForProto2Value { + mapStringForProto2Value += fmt.Sprintf("%#v: %#v,", k, this.Proto2Value[k]) + } + mapStringForProto2Value += "}" + if this.Proto2Value != nil { + s = append(s, "Proto2Value: "+mapStringForProto2Value+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *Nested) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&theproto3.Nested{") + s = append(s, "Bunny: "+fmt.Sprintf("%#v", this.Bunny)+",\n") + s = append(s, "}") + return strings.Join(s, "") +} +func (this *AllMaps) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 21) + s = append(s, "&theproto3.AllMaps{") + keysForStringToDoubleMap := make([]string, 0, len(this.StringToDoubleMap)) + for k := range this.StringToDoubleMap { + keysForStringToDoubleMap = append(keysForStringToDoubleMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToDoubleMap) + mapStringForStringToDoubleMap := "map[string]float64{" + for _, k := range keysForStringToDoubleMap { + mapStringForStringToDoubleMap += fmt.Sprintf("%#v: %#v,", k, this.StringToDoubleMap[k]) + } + mapStringForStringToDoubleMap += "}" + if this.StringToDoubleMap != nil { + s = append(s, "StringToDoubleMap: "+mapStringForStringToDoubleMap+",\n") + } + keysForStringToFloatMap := make([]string, 0, len(this.StringToFloatMap)) + for k := range this.StringToFloatMap { + keysForStringToFloatMap = append(keysForStringToFloatMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToFloatMap) + mapStringForStringToFloatMap := "map[string]float32{" + for _, k := range keysForStringToFloatMap { + mapStringForStringToFloatMap += fmt.Sprintf("%#v: %#v,", k, this.StringToFloatMap[k]) + } + mapStringForStringToFloatMap += "}" + if this.StringToFloatMap != nil { + s = append(s, "StringToFloatMap: "+mapStringForStringToFloatMap+",\n") + } + keysForInt32Map := make([]int32, 0, len(this.Int32Map)) + for k := range this.Int32Map { + keysForInt32Map = append(keysForInt32Map, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForInt32Map) + mapStringForInt32Map := "map[int32]int32{" + for _, k := range keysForInt32Map { + mapStringForInt32Map += fmt.Sprintf("%#v: %#v,", k, this.Int32Map[k]) + } + mapStringForInt32Map += "}" + if this.Int32Map != nil { + s = append(s, "Int32Map: "+mapStringForInt32Map+",\n") + } + keysForInt64Map := make([]int64, 0, len(this.Int64Map)) + for k := range this.Int64Map { + keysForInt64Map = append(keysForInt64Map, k) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForInt64Map) + mapStringForInt64Map := "map[int64]int64{" + for _, k := range keysForInt64Map { + mapStringForInt64Map += fmt.Sprintf("%#v: %#v,", k, this.Int64Map[k]) + } + mapStringForInt64Map += "}" + if this.Int64Map != nil { + s = append(s, "Int64Map: "+mapStringForInt64Map+",\n") + } + keysForUint32Map := make([]uint32, 0, len(this.Uint32Map)) + for k := range this.Uint32Map { + keysForUint32Map = append(keysForUint32Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint32s(keysForUint32Map) + mapStringForUint32Map := "map[uint32]uint32{" + for _, k := range keysForUint32Map { + mapStringForUint32Map += fmt.Sprintf("%#v: %#v,", k, this.Uint32Map[k]) + } + mapStringForUint32Map += "}" + if this.Uint32Map != nil { + s = append(s, "Uint32Map: "+mapStringForUint32Map+",\n") + } + keysForUint64Map := make([]uint64, 0, len(this.Uint64Map)) + for k := range this.Uint64Map { + keysForUint64Map = append(keysForUint64Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint64s(keysForUint64Map) + mapStringForUint64Map := "map[uint64]uint64{" + for _, k := range keysForUint64Map { + mapStringForUint64Map += fmt.Sprintf("%#v: %#v,", k, this.Uint64Map[k]) + } + mapStringForUint64Map += "}" + if this.Uint64Map != nil { + s = append(s, "Uint64Map: "+mapStringForUint64Map+",\n") + } + keysForSint32Map := make([]int32, 0, len(this.Sint32Map)) + for k := range this.Sint32Map { + keysForSint32Map = append(keysForSint32Map, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForSint32Map) + mapStringForSint32Map := "map[int32]int32{" + for _, k := range keysForSint32Map { + mapStringForSint32Map += fmt.Sprintf("%#v: %#v,", k, this.Sint32Map[k]) + } + mapStringForSint32Map += "}" + if this.Sint32Map != nil { + s = append(s, "Sint32Map: "+mapStringForSint32Map+",\n") + } + keysForSint64Map := make([]int64, 0, len(this.Sint64Map)) + for k := range this.Sint64Map { + keysForSint64Map = append(keysForSint64Map, k) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForSint64Map) + mapStringForSint64Map := "map[int64]int64{" + for _, k := range keysForSint64Map { + mapStringForSint64Map += fmt.Sprintf("%#v: %#v,", k, this.Sint64Map[k]) + } + mapStringForSint64Map += "}" + if this.Sint64Map != nil { + s = append(s, "Sint64Map: "+mapStringForSint64Map+",\n") + } + keysForFixed32Map := make([]uint32, 0, len(this.Fixed32Map)) + for k := range this.Fixed32Map { + keysForFixed32Map = append(keysForFixed32Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint32s(keysForFixed32Map) + mapStringForFixed32Map := "map[uint32]uint32{" + for _, k := range keysForFixed32Map { + mapStringForFixed32Map += fmt.Sprintf("%#v: %#v,", k, this.Fixed32Map[k]) + } + mapStringForFixed32Map += "}" + if this.Fixed32Map != nil { + s = append(s, "Fixed32Map: "+mapStringForFixed32Map+",\n") + } + keysForSfixed32Map := make([]int32, 0, len(this.Sfixed32Map)) + for k := range this.Sfixed32Map { + keysForSfixed32Map = append(keysForSfixed32Map, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForSfixed32Map) + mapStringForSfixed32Map := "map[int32]int32{" + for _, k := range keysForSfixed32Map { + mapStringForSfixed32Map += fmt.Sprintf("%#v: %#v,", k, this.Sfixed32Map[k]) + } + mapStringForSfixed32Map += "}" + if this.Sfixed32Map != nil { + s = append(s, "Sfixed32Map: "+mapStringForSfixed32Map+",\n") + } + keysForFixed64Map := make([]uint64, 0, len(this.Fixed64Map)) + for k := range this.Fixed64Map { + keysForFixed64Map = append(keysForFixed64Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint64s(keysForFixed64Map) + mapStringForFixed64Map := "map[uint64]uint64{" + for _, k := range keysForFixed64Map { + mapStringForFixed64Map += fmt.Sprintf("%#v: %#v,", k, this.Fixed64Map[k]) + } + mapStringForFixed64Map += "}" + if this.Fixed64Map != nil { + s = append(s, "Fixed64Map: "+mapStringForFixed64Map+",\n") + } + keysForSfixed64Map := make([]int64, 0, len(this.Sfixed64Map)) + for k := range this.Sfixed64Map { + keysForSfixed64Map = append(keysForSfixed64Map, k) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForSfixed64Map) + mapStringForSfixed64Map := "map[int64]int64{" + for _, k := range keysForSfixed64Map { + mapStringForSfixed64Map += fmt.Sprintf("%#v: %#v,", k, this.Sfixed64Map[k]) + } + mapStringForSfixed64Map += "}" + if this.Sfixed64Map != nil { + s = append(s, "Sfixed64Map: "+mapStringForSfixed64Map+",\n") + } + keysForBoolMap := make([]bool, 0, len(this.BoolMap)) + for k := range this.BoolMap { + keysForBoolMap = append(keysForBoolMap, k) + } + github_com_gogo_protobuf_sortkeys.Bools(keysForBoolMap) + mapStringForBoolMap := "map[bool]bool{" + for _, k := range keysForBoolMap { + mapStringForBoolMap += fmt.Sprintf("%#v: %#v,", k, this.BoolMap[k]) + } + mapStringForBoolMap += "}" + if this.BoolMap != nil { + s = append(s, "BoolMap: "+mapStringForBoolMap+",\n") + } + keysForStringMap := make([]string, 0, len(this.StringMap)) + for k := range this.StringMap { + keysForStringMap = append(keysForStringMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringMap) + mapStringForStringMap := "map[string]string{" + for _, k := range keysForStringMap { + mapStringForStringMap += fmt.Sprintf("%#v: %#v,", k, this.StringMap[k]) + } + mapStringForStringMap += "}" + if this.StringMap != nil { + s = append(s, "StringMap: "+mapStringForStringMap+",\n") + } + keysForStringToBytesMap := make([]string, 0, len(this.StringToBytesMap)) + for k := range this.StringToBytesMap { + keysForStringToBytesMap = append(keysForStringToBytesMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToBytesMap) + mapStringForStringToBytesMap := "map[string][]byte{" + for _, k := range keysForStringToBytesMap { + mapStringForStringToBytesMap += fmt.Sprintf("%#v: %#v,", k, this.StringToBytesMap[k]) + } + mapStringForStringToBytesMap += "}" + if this.StringToBytesMap != nil { + s = append(s, "StringToBytesMap: "+mapStringForStringToBytesMap+",\n") + } + keysForStringToEnumMap := make([]string, 0, len(this.StringToEnumMap)) + for k := range this.StringToEnumMap { + keysForStringToEnumMap = append(keysForStringToEnumMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToEnumMap) + mapStringForStringToEnumMap := "map[string]MapEnum{" + for _, k := range keysForStringToEnumMap { + mapStringForStringToEnumMap += fmt.Sprintf("%#v: %#v,", k, this.StringToEnumMap[k]) + } + mapStringForStringToEnumMap += "}" + if this.StringToEnumMap != nil { + s = append(s, "StringToEnumMap: "+mapStringForStringToEnumMap+",\n") + } + keysForStringToMsgMap := make([]string, 0, len(this.StringToMsgMap)) + for k := range this.StringToMsgMap { + keysForStringToMsgMap = append(keysForStringToMsgMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToMsgMap) + mapStringForStringToMsgMap := "map[string]*FloatingPoint{" + for _, k := range keysForStringToMsgMap { + mapStringForStringToMsgMap += fmt.Sprintf("%#v: %#v,", k, this.StringToMsgMap[k]) + } + mapStringForStringToMsgMap += "}" + if this.StringToMsgMap != nil { + s = append(s, "StringToMsgMap: "+mapStringForStringToMsgMap+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *AllMapsOrdered) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 21) + s = append(s, "&theproto3.AllMapsOrdered{") + keysForStringToDoubleMap := make([]string, 0, len(this.StringToDoubleMap)) + for k := range this.StringToDoubleMap { + keysForStringToDoubleMap = append(keysForStringToDoubleMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToDoubleMap) + mapStringForStringToDoubleMap := "map[string]float64{" + for _, k := range keysForStringToDoubleMap { + mapStringForStringToDoubleMap += fmt.Sprintf("%#v: %#v,", k, this.StringToDoubleMap[k]) + } + mapStringForStringToDoubleMap += "}" + if this.StringToDoubleMap != nil { + s = append(s, "StringToDoubleMap: "+mapStringForStringToDoubleMap+",\n") + } + keysForStringToFloatMap := make([]string, 0, len(this.StringToFloatMap)) + for k := range this.StringToFloatMap { + keysForStringToFloatMap = append(keysForStringToFloatMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToFloatMap) + mapStringForStringToFloatMap := "map[string]float32{" + for _, k := range keysForStringToFloatMap { + mapStringForStringToFloatMap += fmt.Sprintf("%#v: %#v,", k, this.StringToFloatMap[k]) + } + mapStringForStringToFloatMap += "}" + if this.StringToFloatMap != nil { + s = append(s, "StringToFloatMap: "+mapStringForStringToFloatMap+",\n") + } + keysForInt32Map := make([]int32, 0, len(this.Int32Map)) + for k := range this.Int32Map { + keysForInt32Map = append(keysForInt32Map, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForInt32Map) + mapStringForInt32Map := "map[int32]int32{" + for _, k := range keysForInt32Map { + mapStringForInt32Map += fmt.Sprintf("%#v: %#v,", k, this.Int32Map[k]) + } + mapStringForInt32Map += "}" + if this.Int32Map != nil { + s = append(s, "Int32Map: "+mapStringForInt32Map+",\n") + } + keysForInt64Map := make([]int64, 0, len(this.Int64Map)) + for k := range this.Int64Map { + keysForInt64Map = append(keysForInt64Map, k) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForInt64Map) + mapStringForInt64Map := "map[int64]int64{" + for _, k := range keysForInt64Map { + mapStringForInt64Map += fmt.Sprintf("%#v: %#v,", k, this.Int64Map[k]) + } + mapStringForInt64Map += "}" + if this.Int64Map != nil { + s = append(s, "Int64Map: "+mapStringForInt64Map+",\n") + } + keysForUint32Map := make([]uint32, 0, len(this.Uint32Map)) + for k := range this.Uint32Map { + keysForUint32Map = append(keysForUint32Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint32s(keysForUint32Map) + mapStringForUint32Map := "map[uint32]uint32{" + for _, k := range keysForUint32Map { + mapStringForUint32Map += fmt.Sprintf("%#v: %#v,", k, this.Uint32Map[k]) + } + mapStringForUint32Map += "}" + if this.Uint32Map != nil { + s = append(s, "Uint32Map: "+mapStringForUint32Map+",\n") + } + keysForUint64Map := make([]uint64, 0, len(this.Uint64Map)) + for k := range this.Uint64Map { + keysForUint64Map = append(keysForUint64Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint64s(keysForUint64Map) + mapStringForUint64Map := "map[uint64]uint64{" + for _, k := range keysForUint64Map { + mapStringForUint64Map += fmt.Sprintf("%#v: %#v,", k, this.Uint64Map[k]) + } + mapStringForUint64Map += "}" + if this.Uint64Map != nil { + s = append(s, "Uint64Map: "+mapStringForUint64Map+",\n") + } + keysForSint32Map := make([]int32, 0, len(this.Sint32Map)) + for k := range this.Sint32Map { + keysForSint32Map = append(keysForSint32Map, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForSint32Map) + mapStringForSint32Map := "map[int32]int32{" + for _, k := range keysForSint32Map { + mapStringForSint32Map += fmt.Sprintf("%#v: %#v,", k, this.Sint32Map[k]) + } + mapStringForSint32Map += "}" + if this.Sint32Map != nil { + s = append(s, "Sint32Map: "+mapStringForSint32Map+",\n") + } + keysForSint64Map := make([]int64, 0, len(this.Sint64Map)) + for k := range this.Sint64Map { + keysForSint64Map = append(keysForSint64Map, k) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForSint64Map) + mapStringForSint64Map := "map[int64]int64{" + for _, k := range keysForSint64Map { + mapStringForSint64Map += fmt.Sprintf("%#v: %#v,", k, this.Sint64Map[k]) + } + mapStringForSint64Map += "}" + if this.Sint64Map != nil { + s = append(s, "Sint64Map: "+mapStringForSint64Map+",\n") + } + keysForFixed32Map := make([]uint32, 0, len(this.Fixed32Map)) + for k := range this.Fixed32Map { + keysForFixed32Map = append(keysForFixed32Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint32s(keysForFixed32Map) + mapStringForFixed32Map := "map[uint32]uint32{" + for _, k := range keysForFixed32Map { + mapStringForFixed32Map += fmt.Sprintf("%#v: %#v,", k, this.Fixed32Map[k]) + } + mapStringForFixed32Map += "}" + if this.Fixed32Map != nil { + s = append(s, "Fixed32Map: "+mapStringForFixed32Map+",\n") + } + keysForSfixed32Map := make([]int32, 0, len(this.Sfixed32Map)) + for k := range this.Sfixed32Map { + keysForSfixed32Map = append(keysForSfixed32Map, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForSfixed32Map) + mapStringForSfixed32Map := "map[int32]int32{" + for _, k := range keysForSfixed32Map { + mapStringForSfixed32Map += fmt.Sprintf("%#v: %#v,", k, this.Sfixed32Map[k]) + } + mapStringForSfixed32Map += "}" + if this.Sfixed32Map != nil { + s = append(s, "Sfixed32Map: "+mapStringForSfixed32Map+",\n") + } + keysForFixed64Map := make([]uint64, 0, len(this.Fixed64Map)) + for k := range this.Fixed64Map { + keysForFixed64Map = append(keysForFixed64Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint64s(keysForFixed64Map) + mapStringForFixed64Map := "map[uint64]uint64{" + for _, k := range keysForFixed64Map { + mapStringForFixed64Map += fmt.Sprintf("%#v: %#v,", k, this.Fixed64Map[k]) + } + mapStringForFixed64Map += "}" + if this.Fixed64Map != nil { + s = append(s, "Fixed64Map: "+mapStringForFixed64Map+",\n") + } + keysForSfixed64Map := make([]int64, 0, len(this.Sfixed64Map)) + for k := range this.Sfixed64Map { + keysForSfixed64Map = append(keysForSfixed64Map, k) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForSfixed64Map) + mapStringForSfixed64Map := "map[int64]int64{" + for _, k := range keysForSfixed64Map { + mapStringForSfixed64Map += fmt.Sprintf("%#v: %#v,", k, this.Sfixed64Map[k]) + } + mapStringForSfixed64Map += "}" + if this.Sfixed64Map != nil { + s = append(s, "Sfixed64Map: "+mapStringForSfixed64Map+",\n") + } + keysForBoolMap := make([]bool, 0, len(this.BoolMap)) + for k := range this.BoolMap { + keysForBoolMap = append(keysForBoolMap, k) + } + github_com_gogo_protobuf_sortkeys.Bools(keysForBoolMap) + mapStringForBoolMap := "map[bool]bool{" + for _, k := range keysForBoolMap { + mapStringForBoolMap += fmt.Sprintf("%#v: %#v,", k, this.BoolMap[k]) + } + mapStringForBoolMap += "}" + if this.BoolMap != nil { + s = append(s, "BoolMap: "+mapStringForBoolMap+",\n") + } + keysForStringMap := make([]string, 0, len(this.StringMap)) + for k := range this.StringMap { + keysForStringMap = append(keysForStringMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringMap) + mapStringForStringMap := "map[string]string{" + for _, k := range keysForStringMap { + mapStringForStringMap += fmt.Sprintf("%#v: %#v,", k, this.StringMap[k]) + } + mapStringForStringMap += "}" + if this.StringMap != nil { + s = append(s, "StringMap: "+mapStringForStringMap+",\n") + } + keysForStringToBytesMap := make([]string, 0, len(this.StringToBytesMap)) + for k := range this.StringToBytesMap { + keysForStringToBytesMap = append(keysForStringToBytesMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToBytesMap) + mapStringForStringToBytesMap := "map[string][]byte{" + for _, k := range keysForStringToBytesMap { + mapStringForStringToBytesMap += fmt.Sprintf("%#v: %#v,", k, this.StringToBytesMap[k]) + } + mapStringForStringToBytesMap += "}" + if this.StringToBytesMap != nil { + s = append(s, "StringToBytesMap: "+mapStringForStringToBytesMap+",\n") + } + keysForStringToEnumMap := make([]string, 0, len(this.StringToEnumMap)) + for k := range this.StringToEnumMap { + keysForStringToEnumMap = append(keysForStringToEnumMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToEnumMap) + mapStringForStringToEnumMap := "map[string]MapEnum{" + for _, k := range keysForStringToEnumMap { + mapStringForStringToEnumMap += fmt.Sprintf("%#v: %#v,", k, this.StringToEnumMap[k]) + } + mapStringForStringToEnumMap += "}" + if this.StringToEnumMap != nil { + s = append(s, "StringToEnumMap: "+mapStringForStringToEnumMap+",\n") + } + keysForStringToMsgMap := make([]string, 0, len(this.StringToMsgMap)) + for k := range this.StringToMsgMap { + keysForStringToMsgMap = append(keysForStringToMsgMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToMsgMap) + mapStringForStringToMsgMap := "map[string]*FloatingPoint{" + for _, k := range keysForStringToMsgMap { + mapStringForStringToMsgMap += fmt.Sprintf("%#v: %#v,", k, this.StringToMsgMap[k]) + } + mapStringForStringToMsgMap += "}" + if this.StringToMsgMap != nil { + s = append(s, "StringToMsgMap: "+mapStringForStringToMsgMap+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *MessageWithMap) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 7) + s = append(s, "&theproto3.MessageWithMap{") + keysForNameMapping := make([]int32, 0, len(this.NameMapping)) + for k := range this.NameMapping { + keysForNameMapping = append(keysForNameMapping, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForNameMapping) + mapStringForNameMapping := "map[int32]string{" + for _, k := range keysForNameMapping { + mapStringForNameMapping += fmt.Sprintf("%#v: %#v,", k, this.NameMapping[k]) + } + mapStringForNameMapping += "}" + if this.NameMapping != nil { + s = append(s, "NameMapping: "+mapStringForNameMapping+",\n") + } + keysForMsgMapping := make([]int64, 0, len(this.MsgMapping)) + for k := range this.MsgMapping { + keysForMsgMapping = append(keysForMsgMapping, k) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForMsgMapping) + mapStringForMsgMapping := "map[int64]*FloatingPoint{" + for _, k := range keysForMsgMapping { + mapStringForMsgMapping += fmt.Sprintf("%#v: %#v,", k, this.MsgMapping[k]) + } + mapStringForMsgMapping += "}" + if this.MsgMapping != nil { + s = append(s, "MsgMapping: "+mapStringForMsgMapping+",\n") + } + keysForByteMapping := make([]bool, 0, len(this.ByteMapping)) + for k := range this.ByteMapping { + keysForByteMapping = append(keysForByteMapping, k) + } + github_com_gogo_protobuf_sortkeys.Bools(keysForByteMapping) + mapStringForByteMapping := "map[bool][]byte{" + for _, k := range keysForByteMapping { + mapStringForByteMapping += fmt.Sprintf("%#v: %#v,", k, this.ByteMapping[k]) + } + mapStringForByteMapping += "}" + if this.ByteMapping != nil { + s = append(s, "ByteMapping: "+mapStringForByteMapping+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *FloatingPoint) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&theproto3.FloatingPoint{") + s = append(s, "F: "+fmt.Sprintf("%#v", this.F)+",\n") + s = append(s, "}") + return strings.Join(s, "") +} +func (this *Uint128Pair) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 6) + s = append(s, "&theproto3.Uint128Pair{") + s = append(s, "Left: "+fmt.Sprintf("%#v", this.Left)+",\n") + s = append(s, "Right: "+fmt.Sprintf("%#v", this.Right)+",\n") + s = append(s, "}") + return strings.Join(s, "") +} +func (this *ContainsNestedMap) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 4) + s = append(s, "&theproto3.ContainsNestedMap{") + s = append(s, "}") + return strings.Join(s, "") +} +func (this *ContainsNestedMap_NestedMap) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&theproto3.ContainsNestedMap_NestedMap{") + keysForNestedMapField := make([]string, 0, len(this.NestedMapField)) + for k := range this.NestedMapField { + keysForNestedMapField = append(keysForNestedMapField, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForNestedMapField) + mapStringForNestedMapField := "map[string]float64{" + for _, k := range keysForNestedMapField { + mapStringForNestedMapField += fmt.Sprintf("%#v: %#v,", k, this.NestedMapField[k]) + } + mapStringForNestedMapField += "}" + if this.NestedMapField != nil { + s = append(s, "NestedMapField: "+mapStringForNestedMapField+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func valueToGoStringTheproto3(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 extensionToGoStringTheproto3(e map[int32]github_com_gogo_protobuf_proto.Extension) string { + if e == nil { + return "nil" + } + s := "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 +} +func (m *Message) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *Message) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Name) > 0 { + data[i] = 0xa + i++ + i = encodeVarintTheproto3(data, i, uint64(len(m.Name))) + i += copy(data[i:], m.Name) + } + if m.Hilarity != 0 { + data[i] = 0x10 + i++ + i = encodeVarintTheproto3(data, i, uint64(m.Hilarity)) + } + if m.HeightInCm != 0 { + data[i] = 0x18 + i++ + i = encodeVarintTheproto3(data, i, uint64(m.HeightInCm)) + } + if len(m.Data) > 0 { + data[i] = 0x22 + i++ + i = encodeVarintTheproto3(data, i, uint64(len(m.Data))) + i += copy(data[i:], m.Data) + } + if len(m.Key) > 0 { + for _, num := range m.Key { + data[i] = 0x28 + i++ + i = encodeVarintTheproto3(data, i, uint64(num)) + } + } + if m.Nested != nil { + data[i] = 0x32 + i++ + i = encodeVarintTheproto3(data, i, uint64(m.Nested.Size())) + n1, err := m.Nested.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n1 + } + if m.ResultCount != 0 { + data[i] = 0x38 + i++ + i = encodeVarintTheproto3(data, i, uint64(m.ResultCount)) + } + if m.TrueScotsman { + data[i] = 0x40 + i++ + if m.TrueScotsman { + data[i] = 1 + } else { + data[i] = 0 + } + i++ + } + if m.Score != 0 { + data[i] = 0x4d + i++ + i = encodeFixed32Theproto3(data, i, uint32(math.Float32bits(float32(m.Score)))) + } + if len(m.Terrain) > 0 { + for k := range m.Terrain { + data[i] = 0x52 + i++ + v := m.Terrain[k] + if v == nil { + return 0, errors.New("proto: map has nil element") + } + msgSize := v.Size() + mapSize := 1 + sovTheproto3(uint64(k)) + 1 + msgSize + sovTheproto3(uint64(msgSize)) + i = encodeVarintTheproto3(data, i, uint64(mapSize)) + data[i] = 0x8 + i++ + i = encodeVarintTheproto3(data, i, uint64(k)) + data[i] = 0x12 + i++ + i = encodeVarintTheproto3(data, i, uint64(v.Size())) + n2, err := v.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n2 + } + } + if m.Proto2Field != nil { + data[i] = 0x5a + i++ + i = encodeVarintTheproto3(data, i, uint64(m.Proto2Field.Size())) + n3, err := m.Proto2Field.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n3 + } + if len(m.Proto2Value) > 0 { + for k := range m.Proto2Value { + data[i] = 0x6a + i++ + v := m.Proto2Value[k] + if v == nil { + return 0, errors.New("proto: map has nil element") + } + msgSize := v.Size() + mapSize := 1 + sovTheproto3(uint64(k)) + 1 + msgSize + sovTheproto3(uint64(msgSize)) + i = encodeVarintTheproto3(data, i, uint64(mapSize)) + data[i] = 0x8 + i++ + i = encodeVarintTheproto3(data, i, uint64(k)) + data[i] = 0x12 + i++ + i = encodeVarintTheproto3(data, i, uint64(v.Size())) + n4, err := v.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n4 + } + } + return i, nil +} + +func (m *Nested) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *Nested) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Bunny) > 0 { + data[i] = 0xa + i++ + i = encodeVarintTheproto3(data, i, uint64(len(m.Bunny))) + i += copy(data[i:], m.Bunny) + } + return i, nil +} + +func (m *AllMaps) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *AllMaps) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.StringToDoubleMap) > 0 { + for k := range m.StringToDoubleMap { + data[i] = 0xa + i++ + v := m.StringToDoubleMap[k] + mapSize := 1 + len(k) + sovTheproto3(uint64(len(k))) + 1 + 8 + i = encodeVarintTheproto3(data, i, uint64(mapSize)) + data[i] = 0xa + i++ + i = encodeVarintTheproto3(data, i, uint64(len(k))) + i += copy(data[i:], k) + data[i] = 0x11 + i++ + i = encodeFixed64Theproto3(data, i, uint64(math.Float64bits(float64(v)))) + } + } + if len(m.StringToFloatMap) > 0 { + for k := range m.StringToFloatMap { + data[i] = 0x12 + i++ + v := m.StringToFloatMap[k] + mapSize := 1 + len(k) + sovTheproto3(uint64(len(k))) + 1 + 4 + i = encodeVarintTheproto3(data, i, uint64(mapSize)) + data[i] = 0xa + i++ + i = encodeVarintTheproto3(data, i, uint64(len(k))) + i += copy(data[i:], k) + data[i] = 0x15 + i++ + i = encodeFixed32Theproto3(data, i, uint32(math.Float32bits(float32(v)))) + } + } + if len(m.Int32Map) > 0 { + for k := range m.Int32Map { + data[i] = 0x1a + i++ + v := m.Int32Map[k] + mapSize := 1 + sovTheproto3(uint64(k)) + 1 + sovTheproto3(uint64(v)) + i = encodeVarintTheproto3(data, i, uint64(mapSize)) + data[i] = 0x8 + i++ + i = encodeVarintTheproto3(data, i, uint64(k)) + data[i] = 0x10 + i++ + i = encodeVarintTheproto3(data, i, uint64(v)) + } + } + if len(m.Int64Map) > 0 { + for k := range m.Int64Map { + data[i] = 0x22 + i++ + v := m.Int64Map[k] + mapSize := 1 + sovTheproto3(uint64(k)) + 1 + sovTheproto3(uint64(v)) + i = encodeVarintTheproto3(data, i, uint64(mapSize)) + data[i] = 0x8 + i++ + i = encodeVarintTheproto3(data, i, uint64(k)) + data[i] = 0x10 + i++ + i = encodeVarintTheproto3(data, i, uint64(v)) + } + } + if len(m.Uint32Map) > 0 { + for k := range m.Uint32Map { + data[i] = 0x2a + i++ + v := m.Uint32Map[k] + mapSize := 1 + sovTheproto3(uint64(k)) + 1 + sovTheproto3(uint64(v)) + i = encodeVarintTheproto3(data, i, uint64(mapSize)) + data[i] = 0x8 + i++ + i = encodeVarintTheproto3(data, i, uint64(k)) + data[i] = 0x10 + i++ + i = encodeVarintTheproto3(data, i, uint64(v)) + } + } + if len(m.Uint64Map) > 0 { + for k := range m.Uint64Map { + data[i] = 0x32 + i++ + v := m.Uint64Map[k] + mapSize := 1 + sovTheproto3(uint64(k)) + 1 + sovTheproto3(uint64(v)) + i = encodeVarintTheproto3(data, i, uint64(mapSize)) + data[i] = 0x8 + i++ + i = encodeVarintTheproto3(data, i, uint64(k)) + data[i] = 0x10 + i++ + i = encodeVarintTheproto3(data, i, uint64(v)) + } + } + if len(m.Sint32Map) > 0 { + for k := range m.Sint32Map { + data[i] = 0x3a + i++ + v := m.Sint32Map[k] + mapSize := 1 + sozTheproto3(uint64(k)) + 1 + sozTheproto3(uint64(v)) + i = encodeVarintTheproto3(data, i, uint64(mapSize)) + data[i] = 0x8 + i++ + i = encodeVarintTheproto3(data, i, uint64((uint32(k)<<1)^uint32((k>>31)))) + data[i] = 0x10 + i++ + i = encodeVarintTheproto3(data, i, uint64((uint32(v)<<1)^uint32((v>>31)))) + } + } + if len(m.Sint64Map) > 0 { + for k := range m.Sint64Map { + data[i] = 0x42 + i++ + v := m.Sint64Map[k] + mapSize := 1 + sozTheproto3(uint64(k)) + 1 + sozTheproto3(uint64(v)) + i = encodeVarintTheproto3(data, i, uint64(mapSize)) + data[i] = 0x8 + i++ + i = encodeVarintTheproto3(data, i, uint64((uint64(k)<<1)^uint64((k>>63)))) + data[i] = 0x10 + i++ + i = encodeVarintTheproto3(data, i, uint64((uint64(v)<<1)^uint64((v>>63)))) + } + } + if len(m.Fixed32Map) > 0 { + for k := range m.Fixed32Map { + data[i] = 0x4a + i++ + v := m.Fixed32Map[k] + mapSize := 1 + 4 + 1 + 4 + i = encodeVarintTheproto3(data, i, uint64(mapSize)) + data[i] = 0xd + i++ + i = encodeFixed32Theproto3(data, i, uint32(k)) + data[i] = 0x15 + i++ + i = encodeFixed32Theproto3(data, i, uint32(v)) + } + } + if len(m.Sfixed32Map) > 0 { + for k := range m.Sfixed32Map { + data[i] = 0x52 + i++ + v := m.Sfixed32Map[k] + mapSize := 1 + 4 + 1 + 4 + i = encodeVarintTheproto3(data, i, uint64(mapSize)) + data[i] = 0xd + i++ + i = encodeFixed32Theproto3(data, i, uint32(k)) + data[i] = 0x15 + i++ + i = encodeFixed32Theproto3(data, i, uint32(v)) + } + } + if len(m.Fixed64Map) > 0 { + for k := range m.Fixed64Map { + data[i] = 0x5a + i++ + v := m.Fixed64Map[k] + mapSize := 1 + 8 + 1 + 8 + i = encodeVarintTheproto3(data, i, uint64(mapSize)) + data[i] = 0x9 + i++ + i = encodeFixed64Theproto3(data, i, uint64(k)) + data[i] = 0x11 + i++ + i = encodeFixed64Theproto3(data, i, uint64(v)) + } + } + if len(m.Sfixed64Map) > 0 { + for k := range m.Sfixed64Map { + data[i] = 0x62 + i++ + v := m.Sfixed64Map[k] + mapSize := 1 + 8 + 1 + 8 + i = encodeVarintTheproto3(data, i, uint64(mapSize)) + data[i] = 0x9 + i++ + i = encodeFixed64Theproto3(data, i, uint64(k)) + data[i] = 0x11 + i++ + i = encodeFixed64Theproto3(data, i, uint64(v)) + } + } + if len(m.BoolMap) > 0 { + for k := range m.BoolMap { + data[i] = 0x6a + i++ + v := m.BoolMap[k] + mapSize := 1 + 1 + 1 + 1 + i = encodeVarintTheproto3(data, i, uint64(mapSize)) + data[i] = 0x8 + i++ + if k { + data[i] = 1 + } else { + data[i] = 0 + } + i++ + data[i] = 0x10 + i++ + if v { + data[i] = 1 + } else { + data[i] = 0 + } + i++ + } + } + if len(m.StringMap) > 0 { + for k := range m.StringMap { + data[i] = 0x72 + i++ + v := m.StringMap[k] + mapSize := 1 + len(k) + sovTheproto3(uint64(len(k))) + 1 + len(v) + sovTheproto3(uint64(len(v))) + i = encodeVarintTheproto3(data, i, uint64(mapSize)) + data[i] = 0xa + i++ + i = encodeVarintTheproto3(data, i, uint64(len(k))) + i += copy(data[i:], k) + data[i] = 0x12 + i++ + i = encodeVarintTheproto3(data, i, uint64(len(v))) + i += copy(data[i:], v) + } + } + if len(m.StringToBytesMap) > 0 { + for k := range m.StringToBytesMap { + data[i] = 0x7a + i++ + v := m.StringToBytesMap[k] + mapSize := 1 + len(k) + sovTheproto3(uint64(len(k))) + 1 + len(v) + sovTheproto3(uint64(len(v))) + i = encodeVarintTheproto3(data, i, uint64(mapSize)) + data[i] = 0xa + i++ + i = encodeVarintTheproto3(data, i, uint64(len(k))) + i += copy(data[i:], k) + data[i] = 0x12 + i++ + i = encodeVarintTheproto3(data, i, uint64(len(v))) + i += copy(data[i:], v) + } + } + if len(m.StringToEnumMap) > 0 { + for k := range m.StringToEnumMap { + data[i] = 0x82 + i++ + data[i] = 0x1 + i++ + v := m.StringToEnumMap[k] + mapSize := 1 + len(k) + sovTheproto3(uint64(len(k))) + 1 + sovTheproto3(uint64(v)) + i = encodeVarintTheproto3(data, i, uint64(mapSize)) + data[i] = 0xa + i++ + i = encodeVarintTheproto3(data, i, uint64(len(k))) + i += copy(data[i:], k) + data[i] = 0x10 + i++ + i = encodeVarintTheproto3(data, i, uint64(v)) + } + } + if len(m.StringToMsgMap) > 0 { + for k := range m.StringToMsgMap { + data[i] = 0x8a + i++ + data[i] = 0x1 + i++ + v := m.StringToMsgMap[k] + if v == nil { + return 0, errors.New("proto: map has nil element") + } + msgSize := v.Size() + mapSize := 1 + len(k) + sovTheproto3(uint64(len(k))) + 1 + msgSize + sovTheproto3(uint64(msgSize)) + i = encodeVarintTheproto3(data, i, uint64(mapSize)) + data[i] = 0xa + i++ + i = encodeVarintTheproto3(data, i, uint64(len(k))) + i += copy(data[i:], k) + data[i] = 0x12 + i++ + i = encodeVarintTheproto3(data, i, uint64(v.Size())) + n5, err := v.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n5 + } + } + return i, nil +} + +func (m *AllMapsOrdered) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *AllMapsOrdered) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.StringToDoubleMap) > 0 { + keysForStringToDoubleMap := make([]string, 0, len(m.StringToDoubleMap)) + for k := range m.StringToDoubleMap { + keysForStringToDoubleMap = append(keysForStringToDoubleMap, string(k)) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToDoubleMap) + for _, k := range keysForStringToDoubleMap { + data[i] = 0xa + i++ + v := m.StringToDoubleMap[string(k)] + mapSize := 1 + len(k) + sovTheproto3(uint64(len(k))) + 1 + 8 + i = encodeVarintTheproto3(data, i, uint64(mapSize)) + data[i] = 0xa + i++ + i = encodeVarintTheproto3(data, i, uint64(len(k))) + i += copy(data[i:], k) + data[i] = 0x11 + i++ + i = encodeFixed64Theproto3(data, i, uint64(math.Float64bits(float64(v)))) + } + } + if len(m.StringToFloatMap) > 0 { + keysForStringToFloatMap := make([]string, 0, len(m.StringToFloatMap)) + for k := range m.StringToFloatMap { + keysForStringToFloatMap = append(keysForStringToFloatMap, string(k)) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToFloatMap) + for _, k := range keysForStringToFloatMap { + data[i] = 0x12 + i++ + v := m.StringToFloatMap[string(k)] + mapSize := 1 + len(k) + sovTheproto3(uint64(len(k))) + 1 + 4 + i = encodeVarintTheproto3(data, i, uint64(mapSize)) + data[i] = 0xa + i++ + i = encodeVarintTheproto3(data, i, uint64(len(k))) + i += copy(data[i:], k) + data[i] = 0x15 + i++ + i = encodeFixed32Theproto3(data, i, uint32(math.Float32bits(float32(v)))) + } + } + if len(m.Int32Map) > 0 { + keysForInt32Map := make([]int32, 0, len(m.Int32Map)) + for k := range m.Int32Map { + keysForInt32Map = append(keysForInt32Map, int32(k)) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForInt32Map) + for _, k := range keysForInt32Map { + data[i] = 0x1a + i++ + v := m.Int32Map[int32(k)] + mapSize := 1 + sovTheproto3(uint64(k)) + 1 + sovTheproto3(uint64(v)) + i = encodeVarintTheproto3(data, i, uint64(mapSize)) + data[i] = 0x8 + i++ + i = encodeVarintTheproto3(data, i, uint64(k)) + data[i] = 0x10 + i++ + i = encodeVarintTheproto3(data, i, uint64(v)) + } + } + if len(m.Int64Map) > 0 { + keysForInt64Map := make([]int64, 0, len(m.Int64Map)) + for k := range m.Int64Map { + keysForInt64Map = append(keysForInt64Map, int64(k)) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForInt64Map) + for _, k := range keysForInt64Map { + data[i] = 0x22 + i++ + v := m.Int64Map[int64(k)] + mapSize := 1 + sovTheproto3(uint64(k)) + 1 + sovTheproto3(uint64(v)) + i = encodeVarintTheproto3(data, i, uint64(mapSize)) + data[i] = 0x8 + i++ + i = encodeVarintTheproto3(data, i, uint64(k)) + data[i] = 0x10 + i++ + i = encodeVarintTheproto3(data, i, uint64(v)) + } + } + if len(m.Uint32Map) > 0 { + keysForUint32Map := make([]uint32, 0, len(m.Uint32Map)) + for k := range m.Uint32Map { + keysForUint32Map = append(keysForUint32Map, uint32(k)) + } + github_com_gogo_protobuf_sortkeys.Uint32s(keysForUint32Map) + for _, k := range keysForUint32Map { + data[i] = 0x2a + i++ + v := m.Uint32Map[uint32(k)] + mapSize := 1 + sovTheproto3(uint64(k)) + 1 + sovTheproto3(uint64(v)) + i = encodeVarintTheproto3(data, i, uint64(mapSize)) + data[i] = 0x8 + i++ + i = encodeVarintTheproto3(data, i, uint64(k)) + data[i] = 0x10 + i++ + i = encodeVarintTheproto3(data, i, uint64(v)) + } + } + if len(m.Uint64Map) > 0 { + keysForUint64Map := make([]uint64, 0, len(m.Uint64Map)) + for k := range m.Uint64Map { + keysForUint64Map = append(keysForUint64Map, uint64(k)) + } + github_com_gogo_protobuf_sortkeys.Uint64s(keysForUint64Map) + for _, k := range keysForUint64Map { + data[i] = 0x32 + i++ + v := m.Uint64Map[uint64(k)] + mapSize := 1 + sovTheproto3(uint64(k)) + 1 + sovTheproto3(uint64(v)) + i = encodeVarintTheproto3(data, i, uint64(mapSize)) + data[i] = 0x8 + i++ + i = encodeVarintTheproto3(data, i, uint64(k)) + data[i] = 0x10 + i++ + i = encodeVarintTheproto3(data, i, uint64(v)) + } + } + if len(m.Sint32Map) > 0 { + keysForSint32Map := make([]int32, 0, len(m.Sint32Map)) + for k := range m.Sint32Map { + keysForSint32Map = append(keysForSint32Map, int32(k)) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForSint32Map) + for _, k := range keysForSint32Map { + data[i] = 0x3a + i++ + v := m.Sint32Map[int32(k)] + mapSize := 1 + sozTheproto3(uint64(k)) + 1 + sozTheproto3(uint64(v)) + i = encodeVarintTheproto3(data, i, uint64(mapSize)) + data[i] = 0x8 + i++ + i = encodeVarintTheproto3(data, i, uint64((uint32(k)<<1)^uint32((k>>31)))) + data[i] = 0x10 + i++ + i = encodeVarintTheproto3(data, i, uint64((uint32(v)<<1)^uint32((v>>31)))) + } + } + if len(m.Sint64Map) > 0 { + keysForSint64Map := make([]int64, 0, len(m.Sint64Map)) + for k := range m.Sint64Map { + keysForSint64Map = append(keysForSint64Map, int64(k)) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForSint64Map) + for _, k := range keysForSint64Map { + data[i] = 0x42 + i++ + v := m.Sint64Map[int64(k)] + mapSize := 1 + sozTheproto3(uint64(k)) + 1 + sozTheproto3(uint64(v)) + i = encodeVarintTheproto3(data, i, uint64(mapSize)) + data[i] = 0x8 + i++ + i = encodeVarintTheproto3(data, i, uint64((uint64(k)<<1)^uint64((k>>63)))) + data[i] = 0x10 + i++ + i = encodeVarintTheproto3(data, i, uint64((uint64(v)<<1)^uint64((v>>63)))) + } + } + if len(m.Fixed32Map) > 0 { + keysForFixed32Map := make([]uint32, 0, len(m.Fixed32Map)) + for k := range m.Fixed32Map { + keysForFixed32Map = append(keysForFixed32Map, uint32(k)) + } + github_com_gogo_protobuf_sortkeys.Uint32s(keysForFixed32Map) + for _, k := range keysForFixed32Map { + data[i] = 0x4a + i++ + v := m.Fixed32Map[uint32(k)] + mapSize := 1 + 4 + 1 + 4 + i = encodeVarintTheproto3(data, i, uint64(mapSize)) + data[i] = 0xd + i++ + i = encodeFixed32Theproto3(data, i, uint32(k)) + data[i] = 0x15 + i++ + i = encodeFixed32Theproto3(data, i, uint32(v)) + } + } + if len(m.Sfixed32Map) > 0 { + keysForSfixed32Map := make([]int32, 0, len(m.Sfixed32Map)) + for k := range m.Sfixed32Map { + keysForSfixed32Map = append(keysForSfixed32Map, int32(k)) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForSfixed32Map) + for _, k := range keysForSfixed32Map { + data[i] = 0x52 + i++ + v := m.Sfixed32Map[int32(k)] + mapSize := 1 + 4 + 1 + 4 + i = encodeVarintTheproto3(data, i, uint64(mapSize)) + data[i] = 0xd + i++ + i = encodeFixed32Theproto3(data, i, uint32(k)) + data[i] = 0x15 + i++ + i = encodeFixed32Theproto3(data, i, uint32(v)) + } + } + if len(m.Fixed64Map) > 0 { + keysForFixed64Map := make([]uint64, 0, len(m.Fixed64Map)) + for k := range m.Fixed64Map { + keysForFixed64Map = append(keysForFixed64Map, uint64(k)) + } + github_com_gogo_protobuf_sortkeys.Uint64s(keysForFixed64Map) + for _, k := range keysForFixed64Map { + data[i] = 0x5a + i++ + v := m.Fixed64Map[uint64(k)] + mapSize := 1 + 8 + 1 + 8 + i = encodeVarintTheproto3(data, i, uint64(mapSize)) + data[i] = 0x9 + i++ + i = encodeFixed64Theproto3(data, i, uint64(k)) + data[i] = 0x11 + i++ + i = encodeFixed64Theproto3(data, i, uint64(v)) + } + } + if len(m.Sfixed64Map) > 0 { + keysForSfixed64Map := make([]int64, 0, len(m.Sfixed64Map)) + for k := range m.Sfixed64Map { + keysForSfixed64Map = append(keysForSfixed64Map, int64(k)) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForSfixed64Map) + for _, k := range keysForSfixed64Map { + data[i] = 0x62 + i++ + v := m.Sfixed64Map[int64(k)] + mapSize := 1 + 8 + 1 + 8 + i = encodeVarintTheproto3(data, i, uint64(mapSize)) + data[i] = 0x9 + i++ + i = encodeFixed64Theproto3(data, i, uint64(k)) + data[i] = 0x11 + i++ + i = encodeFixed64Theproto3(data, i, uint64(v)) + } + } + if len(m.BoolMap) > 0 { + keysForBoolMap := make([]bool, 0, len(m.BoolMap)) + for k := range m.BoolMap { + keysForBoolMap = append(keysForBoolMap, bool(k)) + } + github_com_gogo_protobuf_sortkeys.Bools(keysForBoolMap) + for _, k := range keysForBoolMap { + data[i] = 0x6a + i++ + v := m.BoolMap[bool(k)] + mapSize := 1 + 1 + 1 + 1 + i = encodeVarintTheproto3(data, i, uint64(mapSize)) + data[i] = 0x8 + i++ + if k { + data[i] = 1 + } else { + data[i] = 0 + } + i++ + data[i] = 0x10 + i++ + if v { + data[i] = 1 + } else { + data[i] = 0 + } + i++ + } + } + if len(m.StringMap) > 0 { + keysForStringMap := make([]string, 0, len(m.StringMap)) + for k := range m.StringMap { + keysForStringMap = append(keysForStringMap, string(k)) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringMap) + for _, k := range keysForStringMap { + data[i] = 0x72 + i++ + v := m.StringMap[string(k)] + mapSize := 1 + len(k) + sovTheproto3(uint64(len(k))) + 1 + len(v) + sovTheproto3(uint64(len(v))) + i = encodeVarintTheproto3(data, i, uint64(mapSize)) + data[i] = 0xa + i++ + i = encodeVarintTheproto3(data, i, uint64(len(k))) + i += copy(data[i:], k) + data[i] = 0x12 + i++ + i = encodeVarintTheproto3(data, i, uint64(len(v))) + i += copy(data[i:], v) + } + } + if len(m.StringToBytesMap) > 0 { + keysForStringToBytesMap := make([]string, 0, len(m.StringToBytesMap)) + for k := range m.StringToBytesMap { + keysForStringToBytesMap = append(keysForStringToBytesMap, string(k)) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToBytesMap) + for _, k := range keysForStringToBytesMap { + data[i] = 0x7a + i++ + v := m.StringToBytesMap[string(k)] + mapSize := 1 + len(k) + sovTheproto3(uint64(len(k))) + 1 + len(v) + sovTheproto3(uint64(len(v))) + i = encodeVarintTheproto3(data, i, uint64(mapSize)) + data[i] = 0xa + i++ + i = encodeVarintTheproto3(data, i, uint64(len(k))) + i += copy(data[i:], k) + data[i] = 0x12 + i++ + i = encodeVarintTheproto3(data, i, uint64(len(v))) + i += copy(data[i:], v) + } + } + if len(m.StringToEnumMap) > 0 { + keysForStringToEnumMap := make([]string, 0, len(m.StringToEnumMap)) + for k := range m.StringToEnumMap { + keysForStringToEnumMap = append(keysForStringToEnumMap, string(k)) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToEnumMap) + for _, k := range keysForStringToEnumMap { + data[i] = 0x82 + i++ + data[i] = 0x1 + i++ + v := m.StringToEnumMap[string(k)] + mapSize := 1 + len(k) + sovTheproto3(uint64(len(k))) + 1 + sovTheproto3(uint64(v)) + i = encodeVarintTheproto3(data, i, uint64(mapSize)) + data[i] = 0xa + i++ + i = encodeVarintTheproto3(data, i, uint64(len(k))) + i += copy(data[i:], k) + data[i] = 0x10 + i++ + i = encodeVarintTheproto3(data, i, uint64(v)) + } + } + if len(m.StringToMsgMap) > 0 { + keysForStringToMsgMap := make([]string, 0, len(m.StringToMsgMap)) + for k := range m.StringToMsgMap { + keysForStringToMsgMap = append(keysForStringToMsgMap, string(k)) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToMsgMap) + for _, k := range keysForStringToMsgMap { + data[i] = 0x8a + i++ + data[i] = 0x1 + i++ + v := m.StringToMsgMap[string(k)] + if v == nil { + return 0, errors.New("proto: map has nil element") + } + msgSize := v.Size() + mapSize := 1 + len(k) + sovTheproto3(uint64(len(k))) + 1 + msgSize + sovTheproto3(uint64(msgSize)) + i = encodeVarintTheproto3(data, i, uint64(mapSize)) + data[i] = 0xa + i++ + i = encodeVarintTheproto3(data, i, uint64(len(k))) + i += copy(data[i:], k) + data[i] = 0x12 + i++ + i = encodeVarintTheproto3(data, i, uint64(v.Size())) + n6, err := v.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n6 + } + } + return i, nil +} + +func (m *MessageWithMap) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *MessageWithMap) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.NameMapping) > 0 { + for k := range m.NameMapping { + data[i] = 0xa + i++ + v := m.NameMapping[k] + mapSize := 1 + sovTheproto3(uint64(k)) + 1 + len(v) + sovTheproto3(uint64(len(v))) + i = encodeVarintTheproto3(data, i, uint64(mapSize)) + data[i] = 0x8 + i++ + i = encodeVarintTheproto3(data, i, uint64(k)) + data[i] = 0x12 + i++ + i = encodeVarintTheproto3(data, i, uint64(len(v))) + i += copy(data[i:], v) + } + } + if len(m.MsgMapping) > 0 { + for k := range m.MsgMapping { + data[i] = 0x12 + i++ + v := m.MsgMapping[k] + if v == nil { + return 0, errors.New("proto: map has nil element") + } + msgSize := v.Size() + mapSize := 1 + sozTheproto3(uint64(k)) + 1 + msgSize + sovTheproto3(uint64(msgSize)) + i = encodeVarintTheproto3(data, i, uint64(mapSize)) + data[i] = 0x8 + i++ + i = encodeVarintTheproto3(data, i, uint64((uint64(k)<<1)^uint64((k>>63)))) + data[i] = 0x12 + i++ + i = encodeVarintTheproto3(data, i, uint64(v.Size())) + n7, err := v.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n7 + } + } + if len(m.ByteMapping) > 0 { + for k := range m.ByteMapping { + data[i] = 0x1a + i++ + v := m.ByteMapping[k] + mapSize := 1 + 1 + 1 + len(v) + sovTheproto3(uint64(len(v))) + i = encodeVarintTheproto3(data, i, uint64(mapSize)) + data[i] = 0x8 + i++ + if k { + data[i] = 1 + } else { + data[i] = 0 + } + i++ + data[i] = 0x12 + i++ + i = encodeVarintTheproto3(data, i, uint64(len(v))) + i += copy(data[i:], v) + } + } + return i, nil +} + +func (m *FloatingPoint) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *FloatingPoint) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.F != 0 { + data[i] = 0x9 + i++ + i = encodeFixed64Theproto3(data, i, uint64(math.Float64bits(float64(m.F)))) + } + return i, nil +} + +func (m *Uint128Pair) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *Uint128Pair) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + data[i] = 0xa + i++ + i = encodeVarintTheproto3(data, i, uint64(m.Left.Size())) + n8, err := m.Left.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n8 + if m.Right != nil { + data[i] = 0x12 + i++ + i = encodeVarintTheproto3(data, i, uint64(m.Right.Size())) + n9, err := m.Right.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n9 + } + return i, nil +} + +func (m *ContainsNestedMap) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *ContainsNestedMap) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + return i, nil +} + +func (m *ContainsNestedMap_NestedMap) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *ContainsNestedMap_NestedMap) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.NestedMapField) > 0 { + for k := range m.NestedMapField { + data[i] = 0xa + i++ + v := m.NestedMapField[k] + mapSize := 1 + len(k) + sovTheproto3(uint64(len(k))) + 1 + 8 + i = encodeVarintTheproto3(data, i, uint64(mapSize)) + data[i] = 0xa + i++ + i = encodeVarintTheproto3(data, i, uint64(len(k))) + i += copy(data[i:], k) + data[i] = 0x11 + i++ + i = encodeFixed64Theproto3(data, i, uint64(math.Float64bits(float64(v)))) + } + } + return i, nil +} + +func encodeFixed64Theproto3(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 encodeFixed32Theproto3(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 encodeVarintTheproto3(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 NewPopulatedMessage(r randyTheproto3, easy bool) *Message { + this := &Message{} + this.Name = randStringTheproto3(r) + this.Hilarity = Message_Humour([]int32{0, 1, 2, 3}[r.Intn(4)]) + this.HeightInCm = uint32(r.Uint32()) + v1 := r.Intn(100) + this.Data = make([]byte, v1) + for i := 0; i < v1; i++ { + this.Data[i] = byte(r.Intn(256)) + } + v2 := r.Intn(10) + this.Key = make([]uint64, v2) + for i := 0; i < v2; i++ { + this.Key[i] = uint64(uint64(r.Uint32())) + } + if r.Intn(10) != 0 { + this.Nested = NewPopulatedNested(r, easy) + } + this.ResultCount = int64(r.Int63()) + if r.Intn(2) == 0 { + this.ResultCount *= -1 + } + this.TrueScotsman = bool(bool(r.Intn(2) == 0)) + this.Score = float32(r.Float32()) + if r.Intn(2) == 0 { + this.Score *= -1 + } + if r.Intn(10) != 0 { + v3 := r.Intn(10) + this.Terrain = make(map[int64]*Nested) + for i := 0; i < v3; i++ { + this.Terrain[int64(r.Int63())] = NewPopulatedNested(r, easy) + } + } + if r.Intn(10) != 0 { + this.Proto2Field = test.NewPopulatedNinOptNative(r, easy) + } + if r.Intn(10) != 0 { + v4 := r.Intn(10) + this.Proto2Value = make(map[int64]*test.NinOptEnum) + for i := 0; i < v4; i++ { + this.Proto2Value[int64(r.Int63())] = test.NewPopulatedNinOptEnum(r, easy) + } + } + if !easy && r.Intn(10) != 0 { + } + return this +} + +func NewPopulatedNested(r randyTheproto3, easy bool) *Nested { + this := &Nested{} + this.Bunny = randStringTheproto3(r) + if !easy && r.Intn(10) != 0 { + } + return this +} + +func NewPopulatedAllMaps(r randyTheproto3, easy bool) *AllMaps { + this := &AllMaps{} + if r.Intn(10) != 0 { + v5 := r.Intn(10) + this.StringToDoubleMap = make(map[string]float64) + for i := 0; i < v5; i++ { + v6 := randStringTheproto3(r) + this.StringToDoubleMap[v6] = float64(r.Float64()) + if r.Intn(2) == 0 { + this.StringToDoubleMap[v6] *= -1 + } + } + } + if r.Intn(10) != 0 { + v7 := r.Intn(10) + this.StringToFloatMap = make(map[string]float32) + for i := 0; i < v7; i++ { + v8 := randStringTheproto3(r) + this.StringToFloatMap[v8] = float32(r.Float32()) + if r.Intn(2) == 0 { + this.StringToFloatMap[v8] *= -1 + } + } + } + if r.Intn(10) != 0 { + v9 := r.Intn(10) + this.Int32Map = make(map[int32]int32) + for i := 0; i < v9; i++ { + v10 := int32(r.Int31()) + this.Int32Map[v10] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Int32Map[v10] *= -1 + } + } + } + if r.Intn(10) != 0 { + v11 := r.Intn(10) + this.Int64Map = make(map[int64]int64) + for i := 0; i < v11; i++ { + v12 := int64(r.Int63()) + this.Int64Map[v12] = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Int64Map[v12] *= -1 + } + } + } + if r.Intn(10) != 0 { + v13 := r.Intn(10) + this.Uint32Map = make(map[uint32]uint32) + for i := 0; i < v13; i++ { + v14 := uint32(r.Uint32()) + this.Uint32Map[v14] = uint32(r.Uint32()) + } + } + if r.Intn(10) != 0 { + v15 := r.Intn(10) + this.Uint64Map = make(map[uint64]uint64) + for i := 0; i < v15; i++ { + v16 := uint64(uint64(r.Uint32())) + this.Uint64Map[v16] = uint64(uint64(r.Uint32())) + } + } + if r.Intn(10) != 0 { + v17 := r.Intn(10) + this.Sint32Map = make(map[int32]int32) + for i := 0; i < v17; i++ { + v18 := int32(r.Int31()) + this.Sint32Map[v18] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Sint32Map[v18] *= -1 + } + } + } + if r.Intn(10) != 0 { + v19 := r.Intn(10) + this.Sint64Map = make(map[int64]int64) + for i := 0; i < v19; i++ { + v20 := int64(r.Int63()) + this.Sint64Map[v20] = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Sint64Map[v20] *= -1 + } + } + } + if r.Intn(10) != 0 { + v21 := r.Intn(10) + this.Fixed32Map = make(map[uint32]uint32) + for i := 0; i < v21; i++ { + v22 := uint32(r.Uint32()) + this.Fixed32Map[v22] = uint32(r.Uint32()) + } + } + if r.Intn(10) != 0 { + v23 := r.Intn(10) + this.Sfixed32Map = make(map[int32]int32) + for i := 0; i < v23; i++ { + v24 := int32(r.Int31()) + this.Sfixed32Map[v24] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Sfixed32Map[v24] *= -1 + } + } + } + if r.Intn(10) != 0 { + v25 := r.Intn(10) + this.Fixed64Map = make(map[uint64]uint64) + for i := 0; i < v25; i++ { + v26 := uint64(uint64(r.Uint32())) + this.Fixed64Map[v26] = uint64(uint64(r.Uint32())) + } + } + if r.Intn(10) != 0 { + v27 := r.Intn(10) + this.Sfixed64Map = make(map[int64]int64) + for i := 0; i < v27; i++ { + v28 := int64(r.Int63()) + this.Sfixed64Map[v28] = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Sfixed64Map[v28] *= -1 + } + } + } + if r.Intn(10) != 0 { + v29 := r.Intn(10) + this.BoolMap = make(map[bool]bool) + for i := 0; i < v29; i++ { + v30 := bool(bool(r.Intn(2) == 0)) + this.BoolMap[v30] = bool(bool(r.Intn(2) == 0)) + } + } + if r.Intn(10) != 0 { + v31 := r.Intn(10) + this.StringMap = make(map[string]string) + for i := 0; i < v31; i++ { + this.StringMap[randStringTheproto3(r)] = randStringTheproto3(r) + } + } + if r.Intn(10) != 0 { + v32 := r.Intn(10) + this.StringToBytesMap = make(map[string][]byte) + for i := 0; i < v32; i++ { + v33 := r.Intn(100) + v34 := randStringTheproto3(r) + this.StringToBytesMap[v34] = make([]byte, v33) + for i := 0; i < v33; i++ { + this.StringToBytesMap[v34][i] = byte(r.Intn(256)) + } + } + } + if r.Intn(10) != 0 { + v35 := r.Intn(10) + this.StringToEnumMap = make(map[string]MapEnum) + for i := 0; i < v35; i++ { + this.StringToEnumMap[randStringTheproto3(r)] = MapEnum([]int32{0, 1, 2}[r.Intn(3)]) + } + } + if r.Intn(10) != 0 { + v36 := r.Intn(10) + this.StringToMsgMap = make(map[string]*FloatingPoint) + for i := 0; i < v36; i++ { + this.StringToMsgMap[randStringTheproto3(r)] = NewPopulatedFloatingPoint(r, easy) + } + } + if !easy && r.Intn(10) != 0 { + } + return this +} + +func NewPopulatedAllMapsOrdered(r randyTheproto3, easy bool) *AllMapsOrdered { + this := &AllMapsOrdered{} + if r.Intn(10) != 0 { + v37 := r.Intn(10) + this.StringToDoubleMap = make(map[string]float64) + for i := 0; i < v37; i++ { + v38 := randStringTheproto3(r) + this.StringToDoubleMap[v38] = float64(r.Float64()) + if r.Intn(2) == 0 { + this.StringToDoubleMap[v38] *= -1 + } + } + } + if r.Intn(10) != 0 { + v39 := r.Intn(10) + this.StringToFloatMap = make(map[string]float32) + for i := 0; i < v39; i++ { + v40 := randStringTheproto3(r) + this.StringToFloatMap[v40] = float32(r.Float32()) + if r.Intn(2) == 0 { + this.StringToFloatMap[v40] *= -1 + } + } + } + if r.Intn(10) != 0 { + v41 := r.Intn(10) + this.Int32Map = make(map[int32]int32) + for i := 0; i < v41; i++ { + v42 := int32(r.Int31()) + this.Int32Map[v42] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Int32Map[v42] *= -1 + } + } + } + if r.Intn(10) != 0 { + v43 := r.Intn(10) + this.Int64Map = make(map[int64]int64) + for i := 0; i < v43; i++ { + v44 := int64(r.Int63()) + this.Int64Map[v44] = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Int64Map[v44] *= -1 + } + } + } + if r.Intn(10) != 0 { + v45 := r.Intn(10) + this.Uint32Map = make(map[uint32]uint32) + for i := 0; i < v45; i++ { + v46 := uint32(r.Uint32()) + this.Uint32Map[v46] = uint32(r.Uint32()) + } + } + if r.Intn(10) != 0 { + v47 := r.Intn(10) + this.Uint64Map = make(map[uint64]uint64) + for i := 0; i < v47; i++ { + v48 := uint64(uint64(r.Uint32())) + this.Uint64Map[v48] = uint64(uint64(r.Uint32())) + } + } + if r.Intn(10) != 0 { + v49 := r.Intn(10) + this.Sint32Map = make(map[int32]int32) + for i := 0; i < v49; i++ { + v50 := int32(r.Int31()) + this.Sint32Map[v50] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Sint32Map[v50] *= -1 + } + } + } + if r.Intn(10) != 0 { + v51 := r.Intn(10) + this.Sint64Map = make(map[int64]int64) + for i := 0; i < v51; i++ { + v52 := int64(r.Int63()) + this.Sint64Map[v52] = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Sint64Map[v52] *= -1 + } + } + } + if r.Intn(10) != 0 { + v53 := r.Intn(10) + this.Fixed32Map = make(map[uint32]uint32) + for i := 0; i < v53; i++ { + v54 := uint32(r.Uint32()) + this.Fixed32Map[v54] = uint32(r.Uint32()) + } + } + if r.Intn(10) != 0 { + v55 := r.Intn(10) + this.Sfixed32Map = make(map[int32]int32) + for i := 0; i < v55; i++ { + v56 := int32(r.Int31()) + this.Sfixed32Map[v56] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Sfixed32Map[v56] *= -1 + } + } + } + if r.Intn(10) != 0 { + v57 := r.Intn(10) + this.Fixed64Map = make(map[uint64]uint64) + for i := 0; i < v57; i++ { + v58 := uint64(uint64(r.Uint32())) + this.Fixed64Map[v58] = uint64(uint64(r.Uint32())) + } + } + if r.Intn(10) != 0 { + v59 := r.Intn(10) + this.Sfixed64Map = make(map[int64]int64) + for i := 0; i < v59; i++ { + v60 := int64(r.Int63()) + this.Sfixed64Map[v60] = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Sfixed64Map[v60] *= -1 + } + } + } + if r.Intn(10) != 0 { + v61 := r.Intn(10) + this.BoolMap = make(map[bool]bool) + for i := 0; i < v61; i++ { + v62 := bool(bool(r.Intn(2) == 0)) + this.BoolMap[v62] = bool(bool(r.Intn(2) == 0)) + } + } + if r.Intn(10) != 0 { + v63 := r.Intn(10) + this.StringMap = make(map[string]string) + for i := 0; i < v63; i++ { + this.StringMap[randStringTheproto3(r)] = randStringTheproto3(r) + } + } + if r.Intn(10) != 0 { + v64 := r.Intn(10) + this.StringToBytesMap = make(map[string][]byte) + for i := 0; i < v64; i++ { + v65 := r.Intn(100) + v66 := randStringTheproto3(r) + this.StringToBytesMap[v66] = make([]byte, v65) + for i := 0; i < v65; i++ { + this.StringToBytesMap[v66][i] = byte(r.Intn(256)) + } + } + } + if r.Intn(10) != 0 { + v67 := r.Intn(10) + this.StringToEnumMap = make(map[string]MapEnum) + for i := 0; i < v67; i++ { + this.StringToEnumMap[randStringTheproto3(r)] = MapEnum([]int32{0, 1, 2}[r.Intn(3)]) + } + } + if r.Intn(10) != 0 { + v68 := r.Intn(10) + this.StringToMsgMap = make(map[string]*FloatingPoint) + for i := 0; i < v68; i++ { + this.StringToMsgMap[randStringTheproto3(r)] = NewPopulatedFloatingPoint(r, easy) + } + } + if !easy && r.Intn(10) != 0 { + } + return this +} + +func NewPopulatedMessageWithMap(r randyTheproto3, easy bool) *MessageWithMap { + this := &MessageWithMap{} + if r.Intn(10) != 0 { + v69 := r.Intn(10) + this.NameMapping = make(map[int32]string) + for i := 0; i < v69; i++ { + this.NameMapping[int32(r.Int31())] = randStringTheproto3(r) + } + } + if r.Intn(10) != 0 { + v70 := r.Intn(10) + this.MsgMapping = make(map[int64]*FloatingPoint) + for i := 0; i < v70; i++ { + this.MsgMapping[int64(r.Int63())] = NewPopulatedFloatingPoint(r, easy) + } + } + if r.Intn(10) != 0 { + v71 := r.Intn(10) + this.ByteMapping = make(map[bool][]byte) + for i := 0; i < v71; i++ { + v72 := r.Intn(100) + v73 := bool(bool(r.Intn(2) == 0)) + this.ByteMapping[v73] = make([]byte, v72) + for i := 0; i < v72; i++ { + this.ByteMapping[v73][i] = byte(r.Intn(256)) + } + } + } + if !easy && r.Intn(10) != 0 { + } + return this +} + +func NewPopulatedFloatingPoint(r randyTheproto3, easy bool) *FloatingPoint { + this := &FloatingPoint{} + this.F = float64(r.Float64()) + if r.Intn(2) == 0 { + this.F *= -1 + } + if !easy && r.Intn(10) != 0 { + } + return this +} + +func NewPopulatedUint128Pair(r randyTheproto3, easy bool) *Uint128Pair { + this := &Uint128Pair{} + v74 := github_com_gogo_protobuf_test_custom.NewPopulatedUint128(r) + this.Left = *v74 + this.Right = github_com_gogo_protobuf_test_custom.NewPopulatedUint128(r) + if !easy && r.Intn(10) != 0 { + } + return this +} + +func NewPopulatedContainsNestedMap(r randyTheproto3, easy bool) *ContainsNestedMap { + this := &ContainsNestedMap{} + if !easy && r.Intn(10) != 0 { + } + return this +} + +func NewPopulatedContainsNestedMap_NestedMap(r randyTheproto3, easy bool) *ContainsNestedMap_NestedMap { + this := &ContainsNestedMap_NestedMap{} + if r.Intn(10) != 0 { + v75 := r.Intn(10) + this.NestedMapField = make(map[string]float64) + for i := 0; i < v75; i++ { + v76 := randStringTheproto3(r) + this.NestedMapField[v76] = float64(r.Float64()) + if r.Intn(2) == 0 { + this.NestedMapField[v76] *= -1 + } + } + } + if !easy && r.Intn(10) != 0 { + } + return this +} + +type randyTheproto3 interface { + Float32() float32 + Float64() float64 + Int63() int64 + Int31() int32 + Uint32() uint32 + Intn(n int) int +} + +func randUTF8RuneTheproto3(r randyTheproto3) 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 randStringTheproto3(r randyTheproto3) string { + v77 := r.Intn(100) + tmps := make([]rune, v77) + for i := 0; i < v77; i++ { + tmps[i] = randUTF8RuneTheproto3(r) + } + return string(tmps) +} +func randUnrecognizedTheproto3(r randyTheproto3, 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 = randFieldTheproto3(data, r, fieldNumber, wire) + } + return data +} +func randFieldTheproto3(data []byte, r randyTheproto3, fieldNumber int, wire int) []byte { + key := uint32(fieldNumber)<<3 | uint32(wire) + switch wire { + case 0: + data = encodeVarintPopulateTheproto3(data, uint64(key)) + v78 := r.Int63() + if r.Intn(2) == 0 { + v78 *= -1 + } + data = encodeVarintPopulateTheproto3(data, uint64(v78)) + case 1: + data = encodeVarintPopulateTheproto3(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 = encodeVarintPopulateTheproto3(data, uint64(key)) + ll := r.Intn(100) + data = encodeVarintPopulateTheproto3(data, uint64(ll)) + for j := 0; j < ll; j++ { + data = append(data, byte(r.Intn(256))) + } + default: + data = encodeVarintPopulateTheproto3(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 encodeVarintPopulateTheproto3(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 *Message) Size() (n int) { + var l int + _ = l + l = len(m.Name) + if l > 0 { + n += 1 + l + sovTheproto3(uint64(l)) + } + if m.Hilarity != 0 { + n += 1 + sovTheproto3(uint64(m.Hilarity)) + } + if m.HeightInCm != 0 { + n += 1 + sovTheproto3(uint64(m.HeightInCm)) + } + l = len(m.Data) + if l > 0 { + n += 1 + l + sovTheproto3(uint64(l)) + } + if len(m.Key) > 0 { + for _, e := range m.Key { + n += 1 + sovTheproto3(uint64(e)) + } + } + if m.Nested != nil { + l = m.Nested.Size() + n += 1 + l + sovTheproto3(uint64(l)) + } + if m.ResultCount != 0 { + n += 1 + sovTheproto3(uint64(m.ResultCount)) + } + if m.TrueScotsman { + n += 2 + } + if m.Score != 0 { + n += 5 + } + if len(m.Terrain) > 0 { + for k, v := range m.Terrain { + _ = k + _ = v + l = 0 + if v != nil { + l = v.Size() + } + mapEntrySize := 1 + sovTheproto3(uint64(k)) + 1 + l + sovTheproto3(uint64(l)) + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if m.Proto2Field != nil { + l = m.Proto2Field.Size() + n += 1 + l + sovTheproto3(uint64(l)) + } + if len(m.Proto2Value) > 0 { + for k, v := range m.Proto2Value { + _ = k + _ = v + l = 0 + if v != nil { + l = v.Size() + } + mapEntrySize := 1 + sovTheproto3(uint64(k)) + 1 + l + sovTheproto3(uint64(l)) + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + return n +} + +func (m *Nested) Size() (n int) { + var l int + _ = l + l = len(m.Bunny) + if l > 0 { + n += 1 + l + sovTheproto3(uint64(l)) + } + return n +} + +func (m *AllMaps) Size() (n int) { + var l int + _ = l + if len(m.StringToDoubleMap) > 0 { + for k, v := range m.StringToDoubleMap { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovTheproto3(uint64(len(k))) + 1 + 8 + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.StringToFloatMap) > 0 { + for k, v := range m.StringToFloatMap { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovTheproto3(uint64(len(k))) + 1 + 4 + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.Int32Map) > 0 { + for k, v := range m.Int32Map { + _ = k + _ = v + mapEntrySize := 1 + sovTheproto3(uint64(k)) + 1 + sovTheproto3(uint64(v)) + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.Int64Map) > 0 { + for k, v := range m.Int64Map { + _ = k + _ = v + mapEntrySize := 1 + sovTheproto3(uint64(k)) + 1 + sovTheproto3(uint64(v)) + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.Uint32Map) > 0 { + for k, v := range m.Uint32Map { + _ = k + _ = v + mapEntrySize := 1 + sovTheproto3(uint64(k)) + 1 + sovTheproto3(uint64(v)) + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.Uint64Map) > 0 { + for k, v := range m.Uint64Map { + _ = k + _ = v + mapEntrySize := 1 + sovTheproto3(uint64(k)) + 1 + sovTheproto3(uint64(v)) + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.Sint32Map) > 0 { + for k, v := range m.Sint32Map { + _ = k + _ = v + mapEntrySize := 1 + sozTheproto3(uint64(k)) + 1 + sozTheproto3(uint64(v)) + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.Sint64Map) > 0 { + for k, v := range m.Sint64Map { + _ = k + _ = v + mapEntrySize := 1 + sozTheproto3(uint64(k)) + 1 + sozTheproto3(uint64(v)) + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.Fixed32Map) > 0 { + for k, v := range m.Fixed32Map { + _ = k + _ = v + mapEntrySize := 1 + 4 + 1 + 4 + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.Sfixed32Map) > 0 { + for k, v := range m.Sfixed32Map { + _ = k + _ = v + mapEntrySize := 1 + 4 + 1 + 4 + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.Fixed64Map) > 0 { + for k, v := range m.Fixed64Map { + _ = k + _ = v + mapEntrySize := 1 + 8 + 1 + 8 + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.Sfixed64Map) > 0 { + for k, v := range m.Sfixed64Map { + _ = k + _ = v + mapEntrySize := 1 + 8 + 1 + 8 + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.BoolMap) > 0 { + for k, v := range m.BoolMap { + _ = k + _ = v + mapEntrySize := 1 + 1 + 1 + 1 + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.StringMap) > 0 { + for k, v := range m.StringMap { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovTheproto3(uint64(len(k))) + 1 + len(v) + sovTheproto3(uint64(len(v))) + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.StringToBytesMap) > 0 { + for k, v := range m.StringToBytesMap { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovTheproto3(uint64(len(k))) + 1 + len(v) + sovTheproto3(uint64(len(v))) + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.StringToEnumMap) > 0 { + for k, v := range m.StringToEnumMap { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovTheproto3(uint64(len(k))) + 1 + sovTheproto3(uint64(v)) + n += mapEntrySize + 2 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.StringToMsgMap) > 0 { + for k, v := range m.StringToMsgMap { + _ = k + _ = v + l = 0 + if v != nil { + l = v.Size() + } + mapEntrySize := 1 + len(k) + sovTheproto3(uint64(len(k))) + 1 + l + sovTheproto3(uint64(l)) + n += mapEntrySize + 2 + sovTheproto3(uint64(mapEntrySize)) + } + } + return n +} + +func (m *AllMapsOrdered) Size() (n int) { + var l int + _ = l + if len(m.StringToDoubleMap) > 0 { + for k, v := range m.StringToDoubleMap { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovTheproto3(uint64(len(k))) + 1 + 8 + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.StringToFloatMap) > 0 { + for k, v := range m.StringToFloatMap { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovTheproto3(uint64(len(k))) + 1 + 4 + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.Int32Map) > 0 { + for k, v := range m.Int32Map { + _ = k + _ = v + mapEntrySize := 1 + sovTheproto3(uint64(k)) + 1 + sovTheproto3(uint64(v)) + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.Int64Map) > 0 { + for k, v := range m.Int64Map { + _ = k + _ = v + mapEntrySize := 1 + sovTheproto3(uint64(k)) + 1 + sovTheproto3(uint64(v)) + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.Uint32Map) > 0 { + for k, v := range m.Uint32Map { + _ = k + _ = v + mapEntrySize := 1 + sovTheproto3(uint64(k)) + 1 + sovTheproto3(uint64(v)) + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.Uint64Map) > 0 { + for k, v := range m.Uint64Map { + _ = k + _ = v + mapEntrySize := 1 + sovTheproto3(uint64(k)) + 1 + sovTheproto3(uint64(v)) + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.Sint32Map) > 0 { + for k, v := range m.Sint32Map { + _ = k + _ = v + mapEntrySize := 1 + sozTheproto3(uint64(k)) + 1 + sozTheproto3(uint64(v)) + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.Sint64Map) > 0 { + for k, v := range m.Sint64Map { + _ = k + _ = v + mapEntrySize := 1 + sozTheproto3(uint64(k)) + 1 + sozTheproto3(uint64(v)) + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.Fixed32Map) > 0 { + for k, v := range m.Fixed32Map { + _ = k + _ = v + mapEntrySize := 1 + 4 + 1 + 4 + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.Sfixed32Map) > 0 { + for k, v := range m.Sfixed32Map { + _ = k + _ = v + mapEntrySize := 1 + 4 + 1 + 4 + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.Fixed64Map) > 0 { + for k, v := range m.Fixed64Map { + _ = k + _ = v + mapEntrySize := 1 + 8 + 1 + 8 + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.Sfixed64Map) > 0 { + for k, v := range m.Sfixed64Map { + _ = k + _ = v + mapEntrySize := 1 + 8 + 1 + 8 + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.BoolMap) > 0 { + for k, v := range m.BoolMap { + _ = k + _ = v + mapEntrySize := 1 + 1 + 1 + 1 + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.StringMap) > 0 { + for k, v := range m.StringMap { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovTheproto3(uint64(len(k))) + 1 + len(v) + sovTheproto3(uint64(len(v))) + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.StringToBytesMap) > 0 { + for k, v := range m.StringToBytesMap { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovTheproto3(uint64(len(k))) + 1 + len(v) + sovTheproto3(uint64(len(v))) + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.StringToEnumMap) > 0 { + for k, v := range m.StringToEnumMap { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovTheproto3(uint64(len(k))) + 1 + sovTheproto3(uint64(v)) + n += mapEntrySize + 2 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.StringToMsgMap) > 0 { + for k, v := range m.StringToMsgMap { + _ = k + _ = v + l = 0 + if v != nil { + l = v.Size() + } + mapEntrySize := 1 + len(k) + sovTheproto3(uint64(len(k))) + 1 + l + sovTheproto3(uint64(l)) + n += mapEntrySize + 2 + sovTheproto3(uint64(mapEntrySize)) + } + } + return n +} + +func (m *MessageWithMap) Size() (n int) { + var l int + _ = l + if len(m.NameMapping) > 0 { + for k, v := range m.NameMapping { + _ = k + _ = v + mapEntrySize := 1 + sovTheproto3(uint64(k)) + 1 + len(v) + sovTheproto3(uint64(len(v))) + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.MsgMapping) > 0 { + for k, v := range m.MsgMapping { + _ = k + _ = v + l = 0 + if v != nil { + l = v.Size() + } + mapEntrySize := 1 + sozTheproto3(uint64(k)) + 1 + l + sovTheproto3(uint64(l)) + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.ByteMapping) > 0 { + for k, v := range m.ByteMapping { + _ = k + _ = v + mapEntrySize := 1 + 1 + 1 + len(v) + sovTheproto3(uint64(len(v))) + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + return n +} + +func (m *FloatingPoint) Size() (n int) { + var l int + _ = l + if m.F != 0 { + n += 9 + } + return n +} + +func (m *Uint128Pair) Size() (n int) { + var l int + _ = l + l = m.Left.Size() + n += 1 + l + sovTheproto3(uint64(l)) + if m.Right != nil { + l = m.Right.Size() + n += 1 + l + sovTheproto3(uint64(l)) + } + return n +} + +func (m *ContainsNestedMap) Size() (n int) { + var l int + _ = l + return n +} + +func (m *ContainsNestedMap_NestedMap) Size() (n int) { + var l int + _ = l + if len(m.NestedMapField) > 0 { + for k, v := range m.NestedMapField { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovTheproto3(uint64(len(k))) + 1 + 8 + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + return n +} + +func sovTheproto3(x uint64) (n int) { + for { + n++ + x >>= 7 + if x == 0 { + break + } + } + return n +} +func sozTheproto3(x uint64) (n int) { + return sovTheproto3(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (this *Message) String() string { + if this == nil { + return "nil" + } + keysForTerrain := make([]int64, 0, len(this.Terrain)) + for k := range this.Terrain { + keysForTerrain = append(keysForTerrain, k) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForTerrain) + mapStringForTerrain := "map[int64]*Nested{" + for _, k := range keysForTerrain { + mapStringForTerrain += fmt.Sprintf("%v: %v,", k, this.Terrain[k]) + } + mapStringForTerrain += "}" + keysForProto2Value := make([]int64, 0, len(this.Proto2Value)) + for k := range this.Proto2Value { + keysForProto2Value = append(keysForProto2Value, k) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForProto2Value) + mapStringForProto2Value := "map[int64]*test.NinOptEnum{" + for _, k := range keysForProto2Value { + mapStringForProto2Value += fmt.Sprintf("%v: %v,", k, this.Proto2Value[k]) + } + mapStringForProto2Value += "}" + s := strings.Join([]string{`&Message{`, + `Name:` + fmt.Sprintf("%v", this.Name) + `,`, + `Hilarity:` + fmt.Sprintf("%v", this.Hilarity) + `,`, + `HeightInCm:` + fmt.Sprintf("%v", this.HeightInCm) + `,`, + `Data:` + fmt.Sprintf("%v", this.Data) + `,`, + `Key:` + fmt.Sprintf("%v", this.Key) + `,`, + `Nested:` + strings.Replace(fmt.Sprintf("%v", this.Nested), "Nested", "Nested", 1) + `,`, + `ResultCount:` + fmt.Sprintf("%v", this.ResultCount) + `,`, + `TrueScotsman:` + fmt.Sprintf("%v", this.TrueScotsman) + `,`, + `Score:` + fmt.Sprintf("%v", this.Score) + `,`, + `Terrain:` + mapStringForTerrain + `,`, + `Proto2Field:` + strings.Replace(fmt.Sprintf("%v", this.Proto2Field), "NinOptNative", "test.NinOptNative", 1) + `,`, + `Proto2Value:` + mapStringForProto2Value + `,`, + `}`, + }, "") + return s +} +func (this *Nested) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&Nested{`, + `Bunny:` + fmt.Sprintf("%v", this.Bunny) + `,`, + `}`, + }, "") + return s +} +func (this *AllMaps) String() string { + if this == nil { + return "nil" + } + keysForStringToDoubleMap := make([]string, 0, len(this.StringToDoubleMap)) + for k := range this.StringToDoubleMap { + keysForStringToDoubleMap = append(keysForStringToDoubleMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToDoubleMap) + mapStringForStringToDoubleMap := "map[string]float64{" + for _, k := range keysForStringToDoubleMap { + mapStringForStringToDoubleMap += fmt.Sprintf("%v: %v,", k, this.StringToDoubleMap[k]) + } + mapStringForStringToDoubleMap += "}" + keysForStringToFloatMap := make([]string, 0, len(this.StringToFloatMap)) + for k := range this.StringToFloatMap { + keysForStringToFloatMap = append(keysForStringToFloatMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToFloatMap) + mapStringForStringToFloatMap := "map[string]float32{" + for _, k := range keysForStringToFloatMap { + mapStringForStringToFloatMap += fmt.Sprintf("%v: %v,", k, this.StringToFloatMap[k]) + } + mapStringForStringToFloatMap += "}" + keysForInt32Map := make([]int32, 0, len(this.Int32Map)) + for k := range this.Int32Map { + keysForInt32Map = append(keysForInt32Map, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForInt32Map) + mapStringForInt32Map := "map[int32]int32{" + for _, k := range keysForInt32Map { + mapStringForInt32Map += fmt.Sprintf("%v: %v,", k, this.Int32Map[k]) + } + mapStringForInt32Map += "}" + keysForInt64Map := make([]int64, 0, len(this.Int64Map)) + for k := range this.Int64Map { + keysForInt64Map = append(keysForInt64Map, k) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForInt64Map) + mapStringForInt64Map := "map[int64]int64{" + for _, k := range keysForInt64Map { + mapStringForInt64Map += fmt.Sprintf("%v: %v,", k, this.Int64Map[k]) + } + mapStringForInt64Map += "}" + keysForUint32Map := make([]uint32, 0, len(this.Uint32Map)) + for k := range this.Uint32Map { + keysForUint32Map = append(keysForUint32Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint32s(keysForUint32Map) + mapStringForUint32Map := "map[uint32]uint32{" + for _, k := range keysForUint32Map { + mapStringForUint32Map += fmt.Sprintf("%v: %v,", k, this.Uint32Map[k]) + } + mapStringForUint32Map += "}" + keysForUint64Map := make([]uint64, 0, len(this.Uint64Map)) + for k := range this.Uint64Map { + keysForUint64Map = append(keysForUint64Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint64s(keysForUint64Map) + mapStringForUint64Map := "map[uint64]uint64{" + for _, k := range keysForUint64Map { + mapStringForUint64Map += fmt.Sprintf("%v: %v,", k, this.Uint64Map[k]) + } + mapStringForUint64Map += "}" + keysForSint32Map := make([]int32, 0, len(this.Sint32Map)) + for k := range this.Sint32Map { + keysForSint32Map = append(keysForSint32Map, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForSint32Map) + mapStringForSint32Map := "map[int32]int32{" + for _, k := range keysForSint32Map { + mapStringForSint32Map += fmt.Sprintf("%v: %v,", k, this.Sint32Map[k]) + } + mapStringForSint32Map += "}" + keysForSint64Map := make([]int64, 0, len(this.Sint64Map)) + for k := range this.Sint64Map { + keysForSint64Map = append(keysForSint64Map, k) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForSint64Map) + mapStringForSint64Map := "map[int64]int64{" + for _, k := range keysForSint64Map { + mapStringForSint64Map += fmt.Sprintf("%v: %v,", k, this.Sint64Map[k]) + } + mapStringForSint64Map += "}" + keysForFixed32Map := make([]uint32, 0, len(this.Fixed32Map)) + for k := range this.Fixed32Map { + keysForFixed32Map = append(keysForFixed32Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint32s(keysForFixed32Map) + mapStringForFixed32Map := "map[uint32]uint32{" + for _, k := range keysForFixed32Map { + mapStringForFixed32Map += fmt.Sprintf("%v: %v,", k, this.Fixed32Map[k]) + } + mapStringForFixed32Map += "}" + keysForSfixed32Map := make([]int32, 0, len(this.Sfixed32Map)) + for k := range this.Sfixed32Map { + keysForSfixed32Map = append(keysForSfixed32Map, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForSfixed32Map) + mapStringForSfixed32Map := "map[int32]int32{" + for _, k := range keysForSfixed32Map { + mapStringForSfixed32Map += fmt.Sprintf("%v: %v,", k, this.Sfixed32Map[k]) + } + mapStringForSfixed32Map += "}" + keysForFixed64Map := make([]uint64, 0, len(this.Fixed64Map)) + for k := range this.Fixed64Map { + keysForFixed64Map = append(keysForFixed64Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint64s(keysForFixed64Map) + mapStringForFixed64Map := "map[uint64]uint64{" + for _, k := range keysForFixed64Map { + mapStringForFixed64Map += fmt.Sprintf("%v: %v,", k, this.Fixed64Map[k]) + } + mapStringForFixed64Map += "}" + keysForSfixed64Map := make([]int64, 0, len(this.Sfixed64Map)) + for k := range this.Sfixed64Map { + keysForSfixed64Map = append(keysForSfixed64Map, k) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForSfixed64Map) + mapStringForSfixed64Map := "map[int64]int64{" + for _, k := range keysForSfixed64Map { + mapStringForSfixed64Map += fmt.Sprintf("%v: %v,", k, this.Sfixed64Map[k]) + } + mapStringForSfixed64Map += "}" + keysForBoolMap := make([]bool, 0, len(this.BoolMap)) + for k := range this.BoolMap { + keysForBoolMap = append(keysForBoolMap, k) + } + github_com_gogo_protobuf_sortkeys.Bools(keysForBoolMap) + mapStringForBoolMap := "map[bool]bool{" + for _, k := range keysForBoolMap { + mapStringForBoolMap += fmt.Sprintf("%v: %v,", k, this.BoolMap[k]) + } + mapStringForBoolMap += "}" + keysForStringMap := make([]string, 0, len(this.StringMap)) + for k := range this.StringMap { + keysForStringMap = append(keysForStringMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringMap) + mapStringForStringMap := "map[string]string{" + for _, k := range keysForStringMap { + mapStringForStringMap += fmt.Sprintf("%v: %v,", k, this.StringMap[k]) + } + mapStringForStringMap += "}" + keysForStringToBytesMap := make([]string, 0, len(this.StringToBytesMap)) + for k := range this.StringToBytesMap { + keysForStringToBytesMap = append(keysForStringToBytesMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToBytesMap) + mapStringForStringToBytesMap := "map[string][]byte{" + for _, k := range keysForStringToBytesMap { + mapStringForStringToBytesMap += fmt.Sprintf("%v: %v,", k, this.StringToBytesMap[k]) + } + mapStringForStringToBytesMap += "}" + keysForStringToEnumMap := make([]string, 0, len(this.StringToEnumMap)) + for k := range this.StringToEnumMap { + keysForStringToEnumMap = append(keysForStringToEnumMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToEnumMap) + mapStringForStringToEnumMap := "map[string]MapEnum{" + for _, k := range keysForStringToEnumMap { + mapStringForStringToEnumMap += fmt.Sprintf("%v: %v,", k, this.StringToEnumMap[k]) + } + mapStringForStringToEnumMap += "}" + keysForStringToMsgMap := make([]string, 0, len(this.StringToMsgMap)) + for k := range this.StringToMsgMap { + keysForStringToMsgMap = append(keysForStringToMsgMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToMsgMap) + mapStringForStringToMsgMap := "map[string]*FloatingPoint{" + for _, k := range keysForStringToMsgMap { + mapStringForStringToMsgMap += fmt.Sprintf("%v: %v,", k, this.StringToMsgMap[k]) + } + mapStringForStringToMsgMap += "}" + s := strings.Join([]string{`&AllMaps{`, + `StringToDoubleMap:` + mapStringForStringToDoubleMap + `,`, + `StringToFloatMap:` + mapStringForStringToFloatMap + `,`, + `Int32Map:` + mapStringForInt32Map + `,`, + `Int64Map:` + mapStringForInt64Map + `,`, + `Uint32Map:` + mapStringForUint32Map + `,`, + `Uint64Map:` + mapStringForUint64Map + `,`, + `Sint32Map:` + mapStringForSint32Map + `,`, + `Sint64Map:` + mapStringForSint64Map + `,`, + `Fixed32Map:` + mapStringForFixed32Map + `,`, + `Sfixed32Map:` + mapStringForSfixed32Map + `,`, + `Fixed64Map:` + mapStringForFixed64Map + `,`, + `Sfixed64Map:` + mapStringForSfixed64Map + `,`, + `BoolMap:` + mapStringForBoolMap + `,`, + `StringMap:` + mapStringForStringMap + `,`, + `StringToBytesMap:` + mapStringForStringToBytesMap + `,`, + `StringToEnumMap:` + mapStringForStringToEnumMap + `,`, + `StringToMsgMap:` + mapStringForStringToMsgMap + `,`, + `}`, + }, "") + return s +} +func (this *AllMapsOrdered) String() string { + if this == nil { + return "nil" + } + keysForStringToDoubleMap := make([]string, 0, len(this.StringToDoubleMap)) + for k := range this.StringToDoubleMap { + keysForStringToDoubleMap = append(keysForStringToDoubleMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToDoubleMap) + mapStringForStringToDoubleMap := "map[string]float64{" + for _, k := range keysForStringToDoubleMap { + mapStringForStringToDoubleMap += fmt.Sprintf("%v: %v,", k, this.StringToDoubleMap[k]) + } + mapStringForStringToDoubleMap += "}" + keysForStringToFloatMap := make([]string, 0, len(this.StringToFloatMap)) + for k := range this.StringToFloatMap { + keysForStringToFloatMap = append(keysForStringToFloatMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToFloatMap) + mapStringForStringToFloatMap := "map[string]float32{" + for _, k := range keysForStringToFloatMap { + mapStringForStringToFloatMap += fmt.Sprintf("%v: %v,", k, this.StringToFloatMap[k]) + } + mapStringForStringToFloatMap += "}" + keysForInt32Map := make([]int32, 0, len(this.Int32Map)) + for k := range this.Int32Map { + keysForInt32Map = append(keysForInt32Map, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForInt32Map) + mapStringForInt32Map := "map[int32]int32{" + for _, k := range keysForInt32Map { + mapStringForInt32Map += fmt.Sprintf("%v: %v,", k, this.Int32Map[k]) + } + mapStringForInt32Map += "}" + keysForInt64Map := make([]int64, 0, len(this.Int64Map)) + for k := range this.Int64Map { + keysForInt64Map = append(keysForInt64Map, k) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForInt64Map) + mapStringForInt64Map := "map[int64]int64{" + for _, k := range keysForInt64Map { + mapStringForInt64Map += fmt.Sprintf("%v: %v,", k, this.Int64Map[k]) + } + mapStringForInt64Map += "}" + keysForUint32Map := make([]uint32, 0, len(this.Uint32Map)) + for k := range this.Uint32Map { + keysForUint32Map = append(keysForUint32Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint32s(keysForUint32Map) + mapStringForUint32Map := "map[uint32]uint32{" + for _, k := range keysForUint32Map { + mapStringForUint32Map += fmt.Sprintf("%v: %v,", k, this.Uint32Map[k]) + } + mapStringForUint32Map += "}" + keysForUint64Map := make([]uint64, 0, len(this.Uint64Map)) + for k := range this.Uint64Map { + keysForUint64Map = append(keysForUint64Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint64s(keysForUint64Map) + mapStringForUint64Map := "map[uint64]uint64{" + for _, k := range keysForUint64Map { + mapStringForUint64Map += fmt.Sprintf("%v: %v,", k, this.Uint64Map[k]) + } + mapStringForUint64Map += "}" + keysForSint32Map := make([]int32, 0, len(this.Sint32Map)) + for k := range this.Sint32Map { + keysForSint32Map = append(keysForSint32Map, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForSint32Map) + mapStringForSint32Map := "map[int32]int32{" + for _, k := range keysForSint32Map { + mapStringForSint32Map += fmt.Sprintf("%v: %v,", k, this.Sint32Map[k]) + } + mapStringForSint32Map += "}" + keysForSint64Map := make([]int64, 0, len(this.Sint64Map)) + for k := range this.Sint64Map { + keysForSint64Map = append(keysForSint64Map, k) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForSint64Map) + mapStringForSint64Map := "map[int64]int64{" + for _, k := range keysForSint64Map { + mapStringForSint64Map += fmt.Sprintf("%v: %v,", k, this.Sint64Map[k]) + } + mapStringForSint64Map += "}" + keysForFixed32Map := make([]uint32, 0, len(this.Fixed32Map)) + for k := range this.Fixed32Map { + keysForFixed32Map = append(keysForFixed32Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint32s(keysForFixed32Map) + mapStringForFixed32Map := "map[uint32]uint32{" + for _, k := range keysForFixed32Map { + mapStringForFixed32Map += fmt.Sprintf("%v: %v,", k, this.Fixed32Map[k]) + } + mapStringForFixed32Map += "}" + keysForSfixed32Map := make([]int32, 0, len(this.Sfixed32Map)) + for k := range this.Sfixed32Map { + keysForSfixed32Map = append(keysForSfixed32Map, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForSfixed32Map) + mapStringForSfixed32Map := "map[int32]int32{" + for _, k := range keysForSfixed32Map { + mapStringForSfixed32Map += fmt.Sprintf("%v: %v,", k, this.Sfixed32Map[k]) + } + mapStringForSfixed32Map += "}" + keysForFixed64Map := make([]uint64, 0, len(this.Fixed64Map)) + for k := range this.Fixed64Map { + keysForFixed64Map = append(keysForFixed64Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint64s(keysForFixed64Map) + mapStringForFixed64Map := "map[uint64]uint64{" + for _, k := range keysForFixed64Map { + mapStringForFixed64Map += fmt.Sprintf("%v: %v,", k, this.Fixed64Map[k]) + } + mapStringForFixed64Map += "}" + keysForSfixed64Map := make([]int64, 0, len(this.Sfixed64Map)) + for k := range this.Sfixed64Map { + keysForSfixed64Map = append(keysForSfixed64Map, k) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForSfixed64Map) + mapStringForSfixed64Map := "map[int64]int64{" + for _, k := range keysForSfixed64Map { + mapStringForSfixed64Map += fmt.Sprintf("%v: %v,", k, this.Sfixed64Map[k]) + } + mapStringForSfixed64Map += "}" + keysForBoolMap := make([]bool, 0, len(this.BoolMap)) + for k := range this.BoolMap { + keysForBoolMap = append(keysForBoolMap, k) + } + github_com_gogo_protobuf_sortkeys.Bools(keysForBoolMap) + mapStringForBoolMap := "map[bool]bool{" + for _, k := range keysForBoolMap { + mapStringForBoolMap += fmt.Sprintf("%v: %v,", k, this.BoolMap[k]) + } + mapStringForBoolMap += "}" + keysForStringMap := make([]string, 0, len(this.StringMap)) + for k := range this.StringMap { + keysForStringMap = append(keysForStringMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringMap) + mapStringForStringMap := "map[string]string{" + for _, k := range keysForStringMap { + mapStringForStringMap += fmt.Sprintf("%v: %v,", k, this.StringMap[k]) + } + mapStringForStringMap += "}" + keysForStringToBytesMap := make([]string, 0, len(this.StringToBytesMap)) + for k := range this.StringToBytesMap { + keysForStringToBytesMap = append(keysForStringToBytesMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToBytesMap) + mapStringForStringToBytesMap := "map[string][]byte{" + for _, k := range keysForStringToBytesMap { + mapStringForStringToBytesMap += fmt.Sprintf("%v: %v,", k, this.StringToBytesMap[k]) + } + mapStringForStringToBytesMap += "}" + keysForStringToEnumMap := make([]string, 0, len(this.StringToEnumMap)) + for k := range this.StringToEnumMap { + keysForStringToEnumMap = append(keysForStringToEnumMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToEnumMap) + mapStringForStringToEnumMap := "map[string]MapEnum{" + for _, k := range keysForStringToEnumMap { + mapStringForStringToEnumMap += fmt.Sprintf("%v: %v,", k, this.StringToEnumMap[k]) + } + mapStringForStringToEnumMap += "}" + keysForStringToMsgMap := make([]string, 0, len(this.StringToMsgMap)) + for k := range this.StringToMsgMap { + keysForStringToMsgMap = append(keysForStringToMsgMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToMsgMap) + mapStringForStringToMsgMap := "map[string]*FloatingPoint{" + for _, k := range keysForStringToMsgMap { + mapStringForStringToMsgMap += fmt.Sprintf("%v: %v,", k, this.StringToMsgMap[k]) + } + mapStringForStringToMsgMap += "}" + s := strings.Join([]string{`&AllMapsOrdered{`, + `StringToDoubleMap:` + mapStringForStringToDoubleMap + `,`, + `StringToFloatMap:` + mapStringForStringToFloatMap + `,`, + `Int32Map:` + mapStringForInt32Map + `,`, + `Int64Map:` + mapStringForInt64Map + `,`, + `Uint32Map:` + mapStringForUint32Map + `,`, + `Uint64Map:` + mapStringForUint64Map + `,`, + `Sint32Map:` + mapStringForSint32Map + `,`, + `Sint64Map:` + mapStringForSint64Map + `,`, + `Fixed32Map:` + mapStringForFixed32Map + `,`, + `Sfixed32Map:` + mapStringForSfixed32Map + `,`, + `Fixed64Map:` + mapStringForFixed64Map + `,`, + `Sfixed64Map:` + mapStringForSfixed64Map + `,`, + `BoolMap:` + mapStringForBoolMap + `,`, + `StringMap:` + mapStringForStringMap + `,`, + `StringToBytesMap:` + mapStringForStringToBytesMap + `,`, + `StringToEnumMap:` + mapStringForStringToEnumMap + `,`, + `StringToMsgMap:` + mapStringForStringToMsgMap + `,`, + `}`, + }, "") + return s +} +func (this *MessageWithMap) String() string { + if this == nil { + return "nil" + } + keysForNameMapping := make([]int32, 0, len(this.NameMapping)) + for k := range this.NameMapping { + keysForNameMapping = append(keysForNameMapping, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForNameMapping) + mapStringForNameMapping := "map[int32]string{" + for _, k := range keysForNameMapping { + mapStringForNameMapping += fmt.Sprintf("%v: %v,", k, this.NameMapping[k]) + } + mapStringForNameMapping += "}" + keysForMsgMapping := make([]int64, 0, len(this.MsgMapping)) + for k := range this.MsgMapping { + keysForMsgMapping = append(keysForMsgMapping, k) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForMsgMapping) + mapStringForMsgMapping := "map[int64]*FloatingPoint{" + for _, k := range keysForMsgMapping { + mapStringForMsgMapping += fmt.Sprintf("%v: %v,", k, this.MsgMapping[k]) + } + mapStringForMsgMapping += "}" + keysForByteMapping := make([]bool, 0, len(this.ByteMapping)) + for k := range this.ByteMapping { + keysForByteMapping = append(keysForByteMapping, k) + } + github_com_gogo_protobuf_sortkeys.Bools(keysForByteMapping) + mapStringForByteMapping := "map[bool][]byte{" + for _, k := range keysForByteMapping { + mapStringForByteMapping += fmt.Sprintf("%v: %v,", k, this.ByteMapping[k]) + } + mapStringForByteMapping += "}" + s := strings.Join([]string{`&MessageWithMap{`, + `NameMapping:` + mapStringForNameMapping + `,`, + `MsgMapping:` + mapStringForMsgMapping + `,`, + `ByteMapping:` + mapStringForByteMapping + `,`, + `}`, + }, "") + return s +} +func (this *FloatingPoint) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&FloatingPoint{`, + `F:` + fmt.Sprintf("%v", this.F) + `,`, + `}`, + }, "") + return s +} +func (this *Uint128Pair) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&Uint128Pair{`, + `Left:` + fmt.Sprintf("%v", this.Left) + `,`, + `Right:` + fmt.Sprintf("%v", this.Right) + `,`, + `}`, + }, "") + return s +} +func (this *ContainsNestedMap) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&ContainsNestedMap{`, + `}`, + }, "") + return s +} +func (this *ContainsNestedMap_NestedMap) String() string { + if this == nil { + return "nil" + } + keysForNestedMapField := make([]string, 0, len(this.NestedMapField)) + for k := range this.NestedMapField { + keysForNestedMapField = append(keysForNestedMapField, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForNestedMapField) + mapStringForNestedMapField := "map[string]float64{" + for _, k := range keysForNestedMapField { + mapStringForNestedMapField += fmt.Sprintf("%v: %v,", k, this.NestedMapField[k]) + } + mapStringForNestedMapField += "}" + s := strings.Join([]string{`&ContainsNestedMap_NestedMap{`, + `NestedMapField:` + mapStringForNestedMapField + `,`, + `}`, + }, "") + return s +} +func valueToStringTheproto3(v interface{}) string { + rv := reflect.ValueOf(v) + if rv.IsNil() { + return "nil" + } + pv := reflect.Indirect(rv).Interface() + return fmt.Sprintf("*%v", pv) +} +func (m *Message) 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 ErrIntOverflowTheproto3 + } + 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: Message: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Message: 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 ErrIntOverflowTheproto3 + } + 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 ErrInvalidLengthTheproto3 + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Name = string(data[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Hilarity", wireType) + } + m.Hilarity = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + m.Hilarity |= (Message_Humour(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field HeightInCm", wireType) + } + m.HeightInCm = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + m.HeightInCm |= (uint32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + 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 ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthTheproto3 + } + 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 != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Key", wireType) + } + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Key = append(m.Key, v) + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Nested", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTheproto3 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Nested == nil { + m.Nested = &Nested{} + } + if err := m.Nested.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 7: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field ResultCount", wireType) + } + m.ResultCount = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + m.ResultCount |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + case 8: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field TrueScotsman", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.TrueScotsman = bool(v != 0) + case 9: + if wireType != 5 { + return fmt.Errorf("proto: wrong wireType = %d for field Score", wireType) + } + var v uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + iNdEx += 4 + v = uint32(data[iNdEx-4]) + v |= uint32(data[iNdEx-3]) << 8 + v |= uint32(data[iNdEx-2]) << 16 + v |= uint32(data[iNdEx-1]) << 24 + m.Score = float32(math.Float32frombits(v)) + case 10: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Terrain", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTheproto3 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var keykey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + keykey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapkey int64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + mapkey |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var valuekey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + valuekey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapmsglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + mapmsglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if mapmsglen < 0 { + return ErrInvalidLengthTheproto3 + } + postmsgIndex := iNdEx + mapmsglen + if mapmsglen < 0 { + return ErrInvalidLengthTheproto3 + } + if postmsgIndex > l { + return io.ErrUnexpectedEOF + } + mapvalue := &Nested{} + if err := mapvalue.Unmarshal(data[iNdEx:postmsgIndex]); err != nil { + return err + } + iNdEx = postmsgIndex + if m.Terrain == nil { + m.Terrain = make(map[int64]*Nested) + } + m.Terrain[mapkey] = mapvalue + iNdEx = postIndex + case 11: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Proto2Field", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTheproto3 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Proto2Field == nil { + m.Proto2Field = &test.NinOptNative{} + } + if err := m.Proto2Field.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 13: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Proto2Value", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTheproto3 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var keykey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + keykey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapkey int64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + mapkey |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var valuekey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + valuekey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapmsglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + mapmsglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if mapmsglen < 0 { + return ErrInvalidLengthTheproto3 + } + postmsgIndex := iNdEx + mapmsglen + if mapmsglen < 0 { + return ErrInvalidLengthTheproto3 + } + if postmsgIndex > l { + return io.ErrUnexpectedEOF + } + mapvalue := &test.NinOptEnum{} + if err := mapvalue.Unmarshal(data[iNdEx:postmsgIndex]); err != nil { + return err + } + iNdEx = postmsgIndex + if m.Proto2Value == nil { + m.Proto2Value = make(map[int64]*test.NinOptEnum) + } + m.Proto2Value[mapkey] = mapvalue + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTheproto3(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTheproto3 + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Nested) 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 ErrIntOverflowTheproto3 + } + 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: Nested: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Nested: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Bunny", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + 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 ErrInvalidLengthTheproto3 + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Bunny = string(data[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTheproto3(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTheproto3 + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *AllMaps) 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 ErrIntOverflowTheproto3 + } + 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: AllMaps: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: AllMaps: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field StringToDoubleMap", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTheproto3 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var keykey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + keykey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var stringLenmapkey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLenmapkey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapkey := int(stringLenmapkey) + if intStringLenmapkey < 0 { + return ErrInvalidLengthTheproto3 + } + postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey > l { + return io.ErrUnexpectedEOF + } + mapkey := string(data[iNdEx:postStringIndexmapkey]) + iNdEx = postStringIndexmapkey + var valuekey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + valuekey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapvaluetemp uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + iNdEx += 8 + mapvaluetemp = uint64(data[iNdEx-8]) + mapvaluetemp |= uint64(data[iNdEx-7]) << 8 + mapvaluetemp |= uint64(data[iNdEx-6]) << 16 + mapvaluetemp |= uint64(data[iNdEx-5]) << 24 + mapvaluetemp |= uint64(data[iNdEx-4]) << 32 + mapvaluetemp |= uint64(data[iNdEx-3]) << 40 + mapvaluetemp |= uint64(data[iNdEx-2]) << 48 + mapvaluetemp |= uint64(data[iNdEx-1]) << 56 + mapvalue := math.Float64frombits(mapvaluetemp) + if m.StringToDoubleMap == nil { + m.StringToDoubleMap = make(map[string]float64) + } + m.StringToDoubleMap[mapkey] = mapvalue + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field StringToFloatMap", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTheproto3 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var keykey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + keykey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var stringLenmapkey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLenmapkey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapkey := int(stringLenmapkey) + if intStringLenmapkey < 0 { + return ErrInvalidLengthTheproto3 + } + postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey > l { + return io.ErrUnexpectedEOF + } + mapkey := string(data[iNdEx:postStringIndexmapkey]) + iNdEx = postStringIndexmapkey + var valuekey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + valuekey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapvaluetemp uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + iNdEx += 4 + mapvaluetemp = uint32(data[iNdEx-4]) + mapvaluetemp |= uint32(data[iNdEx-3]) << 8 + mapvaluetemp |= uint32(data[iNdEx-2]) << 16 + mapvaluetemp |= uint32(data[iNdEx-1]) << 24 + mapvalue := math.Float32frombits(mapvaluetemp) + if m.StringToFloatMap == nil { + m.StringToFloatMap = make(map[string]float32) + } + m.StringToFloatMap[mapkey] = mapvalue + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Int32Map", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTheproto3 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var keykey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + keykey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapkey int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + mapkey |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var valuekey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + valuekey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapvalue int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + mapvalue |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if m.Int32Map == nil { + m.Int32Map = make(map[int32]int32) + } + m.Int32Map[mapkey] = mapvalue + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Int64Map", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTheproto3 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var keykey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + keykey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapkey int64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + mapkey |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var valuekey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + valuekey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapvalue int64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + mapvalue |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if m.Int64Map == nil { + m.Int64Map = make(map[int64]int64) + } + m.Int64Map[mapkey] = mapvalue + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Uint32Map", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTheproto3 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var keykey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + keykey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapkey uint32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + mapkey |= (uint32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var valuekey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + valuekey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapvalue uint32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + mapvalue |= (uint32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if m.Uint32Map == nil { + m.Uint32Map = make(map[uint32]uint32) + } + m.Uint32Map[mapkey] = mapvalue + iNdEx = postIndex + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Uint64Map", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTheproto3 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var keykey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + keykey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapkey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + mapkey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var valuekey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + valuekey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapvalue uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + mapvalue |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if m.Uint64Map == nil { + m.Uint64Map = make(map[uint64]uint64) + } + m.Uint64Map[mapkey] = mapvalue + iNdEx = postIndex + case 7: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Sint32Map", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTheproto3 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var keykey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + keykey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapkeytemp int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + mapkeytemp |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + mapkeytemp = int32((uint32(mapkeytemp) >> 1) ^ uint32(((mapkeytemp&1)<<31)>>31)) + mapkey := int32(mapkeytemp) + var valuekey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + valuekey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapvaluetemp int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + mapvaluetemp |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + mapvaluetemp = int32((uint32(mapvaluetemp) >> 1) ^ uint32(((mapvaluetemp&1)<<31)>>31)) + mapvalue := int32(mapvaluetemp) + if m.Sint32Map == nil { + m.Sint32Map = make(map[int32]int32) + } + m.Sint32Map[mapkey] = mapvalue + iNdEx = postIndex + case 8: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Sint64Map", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTheproto3 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var keykey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + keykey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapkeytemp uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + mapkeytemp |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + mapkeytemp = (mapkeytemp >> 1) ^ uint64((int64(mapkeytemp&1)<<63)>>63) + mapkey := int64(mapkeytemp) + var valuekey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + valuekey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapvaluetemp uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + mapvaluetemp |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + mapvaluetemp = (mapvaluetemp >> 1) ^ uint64((int64(mapvaluetemp&1)<<63)>>63) + mapvalue := int64(mapvaluetemp) + if m.Sint64Map == nil { + m.Sint64Map = make(map[int64]int64) + } + m.Sint64Map[mapkey] = mapvalue + iNdEx = postIndex + case 9: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Fixed32Map", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTheproto3 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var keykey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + keykey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapkey uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + iNdEx += 4 + mapkey = uint32(data[iNdEx-4]) + mapkey |= uint32(data[iNdEx-3]) << 8 + mapkey |= uint32(data[iNdEx-2]) << 16 + mapkey |= uint32(data[iNdEx-1]) << 24 + var valuekey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + valuekey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapvalue uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + iNdEx += 4 + mapvalue = uint32(data[iNdEx-4]) + mapvalue |= uint32(data[iNdEx-3]) << 8 + mapvalue |= uint32(data[iNdEx-2]) << 16 + mapvalue |= uint32(data[iNdEx-1]) << 24 + if m.Fixed32Map == nil { + m.Fixed32Map = make(map[uint32]uint32) + } + m.Fixed32Map[mapkey] = mapvalue + iNdEx = postIndex + case 10: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Sfixed32Map", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTheproto3 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var keykey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + keykey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapkey int32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + iNdEx += 4 + mapkey = int32(data[iNdEx-4]) + mapkey |= int32(data[iNdEx-3]) << 8 + mapkey |= int32(data[iNdEx-2]) << 16 + mapkey |= int32(data[iNdEx-1]) << 24 + var valuekey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + valuekey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapvalue int32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + iNdEx += 4 + mapvalue = int32(data[iNdEx-4]) + mapvalue |= int32(data[iNdEx-3]) << 8 + mapvalue |= int32(data[iNdEx-2]) << 16 + mapvalue |= int32(data[iNdEx-1]) << 24 + if m.Sfixed32Map == nil { + m.Sfixed32Map = make(map[int32]int32) + } + m.Sfixed32Map[mapkey] = mapvalue + iNdEx = postIndex + case 11: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Fixed64Map", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTheproto3 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var keykey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + keykey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapkey uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + iNdEx += 8 + mapkey = uint64(data[iNdEx-8]) + mapkey |= uint64(data[iNdEx-7]) << 8 + mapkey |= uint64(data[iNdEx-6]) << 16 + mapkey |= uint64(data[iNdEx-5]) << 24 + mapkey |= uint64(data[iNdEx-4]) << 32 + mapkey |= uint64(data[iNdEx-3]) << 40 + mapkey |= uint64(data[iNdEx-2]) << 48 + mapkey |= uint64(data[iNdEx-1]) << 56 + var valuekey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + valuekey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapvalue uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + iNdEx += 8 + mapvalue = uint64(data[iNdEx-8]) + mapvalue |= uint64(data[iNdEx-7]) << 8 + mapvalue |= uint64(data[iNdEx-6]) << 16 + mapvalue |= uint64(data[iNdEx-5]) << 24 + mapvalue |= uint64(data[iNdEx-4]) << 32 + mapvalue |= uint64(data[iNdEx-3]) << 40 + mapvalue |= uint64(data[iNdEx-2]) << 48 + mapvalue |= uint64(data[iNdEx-1]) << 56 + if m.Fixed64Map == nil { + m.Fixed64Map = make(map[uint64]uint64) + } + m.Fixed64Map[mapkey] = mapvalue + iNdEx = postIndex + case 12: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Sfixed64Map", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTheproto3 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var keykey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + keykey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapkey int64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + iNdEx += 8 + mapkey = int64(data[iNdEx-8]) + mapkey |= int64(data[iNdEx-7]) << 8 + mapkey |= int64(data[iNdEx-6]) << 16 + mapkey |= int64(data[iNdEx-5]) << 24 + mapkey |= int64(data[iNdEx-4]) << 32 + mapkey |= int64(data[iNdEx-3]) << 40 + mapkey |= int64(data[iNdEx-2]) << 48 + mapkey |= int64(data[iNdEx-1]) << 56 + var valuekey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + valuekey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapvalue int64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + iNdEx += 8 + mapvalue = int64(data[iNdEx-8]) + mapvalue |= int64(data[iNdEx-7]) << 8 + mapvalue |= int64(data[iNdEx-6]) << 16 + mapvalue |= int64(data[iNdEx-5]) << 24 + mapvalue |= int64(data[iNdEx-4]) << 32 + mapvalue |= int64(data[iNdEx-3]) << 40 + mapvalue |= int64(data[iNdEx-2]) << 48 + mapvalue |= int64(data[iNdEx-1]) << 56 + if m.Sfixed64Map == nil { + m.Sfixed64Map = make(map[int64]int64) + } + m.Sfixed64Map[mapkey] = mapvalue + iNdEx = postIndex + case 13: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field BoolMap", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTheproto3 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var keykey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + keykey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapkeytemp int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + mapkeytemp |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + mapkey := bool(mapkeytemp != 0) + var valuekey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + valuekey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapvaluetemp int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + mapvaluetemp |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + mapvalue := bool(mapvaluetemp != 0) + if m.BoolMap == nil { + m.BoolMap = make(map[bool]bool) + } + m.BoolMap[mapkey] = mapvalue + iNdEx = postIndex + case 14: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field StringMap", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTheproto3 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var keykey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + keykey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var stringLenmapkey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLenmapkey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapkey := int(stringLenmapkey) + if intStringLenmapkey < 0 { + return ErrInvalidLengthTheproto3 + } + postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey > l { + return io.ErrUnexpectedEOF + } + mapkey := string(data[iNdEx:postStringIndexmapkey]) + iNdEx = postStringIndexmapkey + var valuekey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + valuekey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var stringLenmapvalue uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLenmapvalue |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapvalue := int(stringLenmapvalue) + if intStringLenmapvalue < 0 { + return ErrInvalidLengthTheproto3 + } + postStringIndexmapvalue := iNdEx + intStringLenmapvalue + if postStringIndexmapvalue > l { + return io.ErrUnexpectedEOF + } + mapvalue := string(data[iNdEx:postStringIndexmapvalue]) + iNdEx = postStringIndexmapvalue + if m.StringMap == nil { + m.StringMap = make(map[string]string) + } + m.StringMap[mapkey] = mapvalue + iNdEx = postIndex + case 15: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field StringToBytesMap", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTheproto3 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var keykey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + keykey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var stringLenmapkey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLenmapkey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapkey := int(stringLenmapkey) + if intStringLenmapkey < 0 { + return ErrInvalidLengthTheproto3 + } + postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey > l { + return io.ErrUnexpectedEOF + } + mapkey := string(data[iNdEx:postStringIndexmapkey]) + iNdEx = postStringIndexmapkey + var valuekey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + valuekey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapbyteLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + mapbyteLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intMapbyteLen := int(mapbyteLen) + if intMapbyteLen < 0 { + return ErrInvalidLengthTheproto3 + } + postbytesIndex := iNdEx + intMapbyteLen + if postbytesIndex > l { + return io.ErrUnexpectedEOF + } + mapvalue := make([]byte, mapbyteLen) + copy(mapvalue, data[iNdEx:postbytesIndex]) + iNdEx = postbytesIndex + if m.StringToBytesMap == nil { + m.StringToBytesMap = make(map[string][]byte) + } + m.StringToBytesMap[mapkey] = mapvalue + iNdEx = postIndex + case 16: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field StringToEnumMap", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTheproto3 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var keykey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + keykey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var stringLenmapkey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLenmapkey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapkey := int(stringLenmapkey) + if intStringLenmapkey < 0 { + return ErrInvalidLengthTheproto3 + } + postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey > l { + return io.ErrUnexpectedEOF + } + mapkey := string(data[iNdEx:postStringIndexmapkey]) + iNdEx = postStringIndexmapkey + var valuekey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + valuekey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapvalue MapEnum + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + mapvalue |= (MapEnum(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if m.StringToEnumMap == nil { + m.StringToEnumMap = make(map[string]MapEnum) + } + m.StringToEnumMap[mapkey] = mapvalue + iNdEx = postIndex + case 17: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field StringToMsgMap", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTheproto3 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var keykey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + keykey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var stringLenmapkey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLenmapkey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapkey := int(stringLenmapkey) + if intStringLenmapkey < 0 { + return ErrInvalidLengthTheproto3 + } + postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey > l { + return io.ErrUnexpectedEOF + } + mapkey := string(data[iNdEx:postStringIndexmapkey]) + iNdEx = postStringIndexmapkey + var valuekey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + valuekey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapmsglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + mapmsglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if mapmsglen < 0 { + return ErrInvalidLengthTheproto3 + } + postmsgIndex := iNdEx + mapmsglen + if mapmsglen < 0 { + return ErrInvalidLengthTheproto3 + } + if postmsgIndex > l { + return io.ErrUnexpectedEOF + } + mapvalue := &FloatingPoint{} + if err := mapvalue.Unmarshal(data[iNdEx:postmsgIndex]); err != nil { + return err + } + iNdEx = postmsgIndex + if m.StringToMsgMap == nil { + m.StringToMsgMap = make(map[string]*FloatingPoint) + } + m.StringToMsgMap[mapkey] = mapvalue + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTheproto3(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTheproto3 + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *AllMapsOrdered) 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 ErrIntOverflowTheproto3 + } + 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: AllMapsOrdered: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: AllMapsOrdered: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field StringToDoubleMap", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTheproto3 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var keykey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + keykey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var stringLenmapkey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLenmapkey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapkey := int(stringLenmapkey) + if intStringLenmapkey < 0 { + return ErrInvalidLengthTheproto3 + } + postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey > l { + return io.ErrUnexpectedEOF + } + mapkey := string(data[iNdEx:postStringIndexmapkey]) + iNdEx = postStringIndexmapkey + var valuekey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + valuekey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapvaluetemp uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + iNdEx += 8 + mapvaluetemp = uint64(data[iNdEx-8]) + mapvaluetemp |= uint64(data[iNdEx-7]) << 8 + mapvaluetemp |= uint64(data[iNdEx-6]) << 16 + mapvaluetemp |= uint64(data[iNdEx-5]) << 24 + mapvaluetemp |= uint64(data[iNdEx-4]) << 32 + mapvaluetemp |= uint64(data[iNdEx-3]) << 40 + mapvaluetemp |= uint64(data[iNdEx-2]) << 48 + mapvaluetemp |= uint64(data[iNdEx-1]) << 56 + mapvalue := math.Float64frombits(mapvaluetemp) + if m.StringToDoubleMap == nil { + m.StringToDoubleMap = make(map[string]float64) + } + m.StringToDoubleMap[mapkey] = mapvalue + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field StringToFloatMap", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTheproto3 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var keykey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + keykey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var stringLenmapkey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLenmapkey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapkey := int(stringLenmapkey) + if intStringLenmapkey < 0 { + return ErrInvalidLengthTheproto3 + } + postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey > l { + return io.ErrUnexpectedEOF + } + mapkey := string(data[iNdEx:postStringIndexmapkey]) + iNdEx = postStringIndexmapkey + var valuekey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + valuekey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapvaluetemp uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + iNdEx += 4 + mapvaluetemp = uint32(data[iNdEx-4]) + mapvaluetemp |= uint32(data[iNdEx-3]) << 8 + mapvaluetemp |= uint32(data[iNdEx-2]) << 16 + mapvaluetemp |= uint32(data[iNdEx-1]) << 24 + mapvalue := math.Float32frombits(mapvaluetemp) + if m.StringToFloatMap == nil { + m.StringToFloatMap = make(map[string]float32) + } + m.StringToFloatMap[mapkey] = mapvalue + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Int32Map", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTheproto3 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var keykey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + keykey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapkey int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + mapkey |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var valuekey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + valuekey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapvalue int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + mapvalue |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if m.Int32Map == nil { + m.Int32Map = make(map[int32]int32) + } + m.Int32Map[mapkey] = mapvalue + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Int64Map", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTheproto3 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var keykey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + keykey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapkey int64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + mapkey |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var valuekey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + valuekey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapvalue int64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + mapvalue |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if m.Int64Map == nil { + m.Int64Map = make(map[int64]int64) + } + m.Int64Map[mapkey] = mapvalue + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Uint32Map", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTheproto3 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var keykey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + keykey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapkey uint32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + mapkey |= (uint32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var valuekey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + valuekey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapvalue uint32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + mapvalue |= (uint32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if m.Uint32Map == nil { + m.Uint32Map = make(map[uint32]uint32) + } + m.Uint32Map[mapkey] = mapvalue + iNdEx = postIndex + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Uint64Map", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTheproto3 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var keykey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + keykey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapkey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + mapkey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var valuekey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + valuekey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapvalue uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + mapvalue |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if m.Uint64Map == nil { + m.Uint64Map = make(map[uint64]uint64) + } + m.Uint64Map[mapkey] = mapvalue + iNdEx = postIndex + case 7: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Sint32Map", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTheproto3 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var keykey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + keykey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapkeytemp int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + mapkeytemp |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + mapkeytemp = int32((uint32(mapkeytemp) >> 1) ^ uint32(((mapkeytemp&1)<<31)>>31)) + mapkey := int32(mapkeytemp) + var valuekey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + valuekey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapvaluetemp int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + mapvaluetemp |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + mapvaluetemp = int32((uint32(mapvaluetemp) >> 1) ^ uint32(((mapvaluetemp&1)<<31)>>31)) + mapvalue := int32(mapvaluetemp) + if m.Sint32Map == nil { + m.Sint32Map = make(map[int32]int32) + } + m.Sint32Map[mapkey] = mapvalue + iNdEx = postIndex + case 8: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Sint64Map", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTheproto3 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var keykey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + keykey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapkeytemp uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + mapkeytemp |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + mapkeytemp = (mapkeytemp >> 1) ^ uint64((int64(mapkeytemp&1)<<63)>>63) + mapkey := int64(mapkeytemp) + var valuekey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + valuekey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapvaluetemp uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + mapvaluetemp |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + mapvaluetemp = (mapvaluetemp >> 1) ^ uint64((int64(mapvaluetemp&1)<<63)>>63) + mapvalue := int64(mapvaluetemp) + if m.Sint64Map == nil { + m.Sint64Map = make(map[int64]int64) + } + m.Sint64Map[mapkey] = mapvalue + iNdEx = postIndex + case 9: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Fixed32Map", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTheproto3 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var keykey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + keykey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapkey uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + iNdEx += 4 + mapkey = uint32(data[iNdEx-4]) + mapkey |= uint32(data[iNdEx-3]) << 8 + mapkey |= uint32(data[iNdEx-2]) << 16 + mapkey |= uint32(data[iNdEx-1]) << 24 + var valuekey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + valuekey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapvalue uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + iNdEx += 4 + mapvalue = uint32(data[iNdEx-4]) + mapvalue |= uint32(data[iNdEx-3]) << 8 + mapvalue |= uint32(data[iNdEx-2]) << 16 + mapvalue |= uint32(data[iNdEx-1]) << 24 + if m.Fixed32Map == nil { + m.Fixed32Map = make(map[uint32]uint32) + } + m.Fixed32Map[mapkey] = mapvalue + iNdEx = postIndex + case 10: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Sfixed32Map", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTheproto3 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var keykey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + keykey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapkey int32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + iNdEx += 4 + mapkey = int32(data[iNdEx-4]) + mapkey |= int32(data[iNdEx-3]) << 8 + mapkey |= int32(data[iNdEx-2]) << 16 + mapkey |= int32(data[iNdEx-1]) << 24 + var valuekey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + valuekey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapvalue int32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + iNdEx += 4 + mapvalue = int32(data[iNdEx-4]) + mapvalue |= int32(data[iNdEx-3]) << 8 + mapvalue |= int32(data[iNdEx-2]) << 16 + mapvalue |= int32(data[iNdEx-1]) << 24 + if m.Sfixed32Map == nil { + m.Sfixed32Map = make(map[int32]int32) + } + m.Sfixed32Map[mapkey] = mapvalue + iNdEx = postIndex + case 11: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Fixed64Map", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTheproto3 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var keykey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + keykey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapkey uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + iNdEx += 8 + mapkey = uint64(data[iNdEx-8]) + mapkey |= uint64(data[iNdEx-7]) << 8 + mapkey |= uint64(data[iNdEx-6]) << 16 + mapkey |= uint64(data[iNdEx-5]) << 24 + mapkey |= uint64(data[iNdEx-4]) << 32 + mapkey |= uint64(data[iNdEx-3]) << 40 + mapkey |= uint64(data[iNdEx-2]) << 48 + mapkey |= uint64(data[iNdEx-1]) << 56 + var valuekey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + valuekey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapvalue uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + iNdEx += 8 + mapvalue = uint64(data[iNdEx-8]) + mapvalue |= uint64(data[iNdEx-7]) << 8 + mapvalue |= uint64(data[iNdEx-6]) << 16 + mapvalue |= uint64(data[iNdEx-5]) << 24 + mapvalue |= uint64(data[iNdEx-4]) << 32 + mapvalue |= uint64(data[iNdEx-3]) << 40 + mapvalue |= uint64(data[iNdEx-2]) << 48 + mapvalue |= uint64(data[iNdEx-1]) << 56 + if m.Fixed64Map == nil { + m.Fixed64Map = make(map[uint64]uint64) + } + m.Fixed64Map[mapkey] = mapvalue + iNdEx = postIndex + case 12: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Sfixed64Map", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTheproto3 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var keykey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + keykey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapkey int64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + iNdEx += 8 + mapkey = int64(data[iNdEx-8]) + mapkey |= int64(data[iNdEx-7]) << 8 + mapkey |= int64(data[iNdEx-6]) << 16 + mapkey |= int64(data[iNdEx-5]) << 24 + mapkey |= int64(data[iNdEx-4]) << 32 + mapkey |= int64(data[iNdEx-3]) << 40 + mapkey |= int64(data[iNdEx-2]) << 48 + mapkey |= int64(data[iNdEx-1]) << 56 + var valuekey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + valuekey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapvalue int64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + iNdEx += 8 + mapvalue = int64(data[iNdEx-8]) + mapvalue |= int64(data[iNdEx-7]) << 8 + mapvalue |= int64(data[iNdEx-6]) << 16 + mapvalue |= int64(data[iNdEx-5]) << 24 + mapvalue |= int64(data[iNdEx-4]) << 32 + mapvalue |= int64(data[iNdEx-3]) << 40 + mapvalue |= int64(data[iNdEx-2]) << 48 + mapvalue |= int64(data[iNdEx-1]) << 56 + if m.Sfixed64Map == nil { + m.Sfixed64Map = make(map[int64]int64) + } + m.Sfixed64Map[mapkey] = mapvalue + iNdEx = postIndex + case 13: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field BoolMap", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTheproto3 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var keykey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + keykey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapkeytemp int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + mapkeytemp |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + mapkey := bool(mapkeytemp != 0) + var valuekey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + valuekey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapvaluetemp int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + mapvaluetemp |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + mapvalue := bool(mapvaluetemp != 0) + if m.BoolMap == nil { + m.BoolMap = make(map[bool]bool) + } + m.BoolMap[mapkey] = mapvalue + iNdEx = postIndex + case 14: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field StringMap", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTheproto3 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var keykey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + keykey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var stringLenmapkey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLenmapkey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapkey := int(stringLenmapkey) + if intStringLenmapkey < 0 { + return ErrInvalidLengthTheproto3 + } + postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey > l { + return io.ErrUnexpectedEOF + } + mapkey := string(data[iNdEx:postStringIndexmapkey]) + iNdEx = postStringIndexmapkey + var valuekey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + valuekey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var stringLenmapvalue uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLenmapvalue |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapvalue := int(stringLenmapvalue) + if intStringLenmapvalue < 0 { + return ErrInvalidLengthTheproto3 + } + postStringIndexmapvalue := iNdEx + intStringLenmapvalue + if postStringIndexmapvalue > l { + return io.ErrUnexpectedEOF + } + mapvalue := string(data[iNdEx:postStringIndexmapvalue]) + iNdEx = postStringIndexmapvalue + if m.StringMap == nil { + m.StringMap = make(map[string]string) + } + m.StringMap[mapkey] = mapvalue + iNdEx = postIndex + case 15: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field StringToBytesMap", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTheproto3 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var keykey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + keykey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var stringLenmapkey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLenmapkey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapkey := int(stringLenmapkey) + if intStringLenmapkey < 0 { + return ErrInvalidLengthTheproto3 + } + postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey > l { + return io.ErrUnexpectedEOF + } + mapkey := string(data[iNdEx:postStringIndexmapkey]) + iNdEx = postStringIndexmapkey + var valuekey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + valuekey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapbyteLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + mapbyteLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intMapbyteLen := int(mapbyteLen) + if intMapbyteLen < 0 { + return ErrInvalidLengthTheproto3 + } + postbytesIndex := iNdEx + intMapbyteLen + if postbytesIndex > l { + return io.ErrUnexpectedEOF + } + mapvalue := make([]byte, mapbyteLen) + copy(mapvalue, data[iNdEx:postbytesIndex]) + iNdEx = postbytesIndex + if m.StringToBytesMap == nil { + m.StringToBytesMap = make(map[string][]byte) + } + m.StringToBytesMap[mapkey] = mapvalue + iNdEx = postIndex + case 16: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field StringToEnumMap", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTheproto3 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var keykey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + keykey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var stringLenmapkey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLenmapkey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapkey := int(stringLenmapkey) + if intStringLenmapkey < 0 { + return ErrInvalidLengthTheproto3 + } + postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey > l { + return io.ErrUnexpectedEOF + } + mapkey := string(data[iNdEx:postStringIndexmapkey]) + iNdEx = postStringIndexmapkey + var valuekey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + valuekey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapvalue MapEnum + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + mapvalue |= (MapEnum(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if m.StringToEnumMap == nil { + m.StringToEnumMap = make(map[string]MapEnum) + } + m.StringToEnumMap[mapkey] = mapvalue + iNdEx = postIndex + case 17: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field StringToMsgMap", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTheproto3 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var keykey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + keykey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var stringLenmapkey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLenmapkey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapkey := int(stringLenmapkey) + if intStringLenmapkey < 0 { + return ErrInvalidLengthTheproto3 + } + postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey > l { + return io.ErrUnexpectedEOF + } + mapkey := string(data[iNdEx:postStringIndexmapkey]) + iNdEx = postStringIndexmapkey + var valuekey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + valuekey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapmsglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + mapmsglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if mapmsglen < 0 { + return ErrInvalidLengthTheproto3 + } + postmsgIndex := iNdEx + mapmsglen + if mapmsglen < 0 { + return ErrInvalidLengthTheproto3 + } + if postmsgIndex > l { + return io.ErrUnexpectedEOF + } + mapvalue := &FloatingPoint{} + if err := mapvalue.Unmarshal(data[iNdEx:postmsgIndex]); err != nil { + return err + } + iNdEx = postmsgIndex + if m.StringToMsgMap == nil { + m.StringToMsgMap = make(map[string]*FloatingPoint) + } + m.StringToMsgMap[mapkey] = mapvalue + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTheproto3(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTheproto3 + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MessageWithMap) 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 ErrIntOverflowTheproto3 + } + 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: MessageWithMap: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MessageWithMap: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NameMapping", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTheproto3 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var keykey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + keykey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapkey int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + mapkey |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var valuekey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + valuekey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var stringLenmapvalue uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLenmapvalue |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapvalue := int(stringLenmapvalue) + if intStringLenmapvalue < 0 { + return ErrInvalidLengthTheproto3 + } + postStringIndexmapvalue := iNdEx + intStringLenmapvalue + if postStringIndexmapvalue > l { + return io.ErrUnexpectedEOF + } + mapvalue := string(data[iNdEx:postStringIndexmapvalue]) + iNdEx = postStringIndexmapvalue + if m.NameMapping == nil { + m.NameMapping = make(map[int32]string) + } + m.NameMapping[mapkey] = mapvalue + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MsgMapping", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTheproto3 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var keykey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + keykey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapkeytemp uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + mapkeytemp |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + mapkeytemp = (mapkeytemp >> 1) ^ uint64((int64(mapkeytemp&1)<<63)>>63) + mapkey := int64(mapkeytemp) + var valuekey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + valuekey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapmsglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + mapmsglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if mapmsglen < 0 { + return ErrInvalidLengthTheproto3 + } + postmsgIndex := iNdEx + mapmsglen + if mapmsglen < 0 { + return ErrInvalidLengthTheproto3 + } + if postmsgIndex > l { + return io.ErrUnexpectedEOF + } + mapvalue := &FloatingPoint{} + if err := mapvalue.Unmarshal(data[iNdEx:postmsgIndex]); err != nil { + return err + } + iNdEx = postmsgIndex + if m.MsgMapping == nil { + m.MsgMapping = make(map[int64]*FloatingPoint) + } + m.MsgMapping[mapkey] = mapvalue + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ByteMapping", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTheproto3 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var keykey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + keykey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapkeytemp int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + mapkeytemp |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + mapkey := bool(mapkeytemp != 0) + var valuekey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + valuekey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapbyteLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + mapbyteLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intMapbyteLen := int(mapbyteLen) + if intMapbyteLen < 0 { + return ErrInvalidLengthTheproto3 + } + postbytesIndex := iNdEx + intMapbyteLen + if postbytesIndex > l { + return io.ErrUnexpectedEOF + } + mapvalue := make([]byte, mapbyteLen) + copy(mapvalue, data[iNdEx:postbytesIndex]) + iNdEx = postbytesIndex + if m.ByteMapping == nil { + m.ByteMapping = make(map[bool][]byte) + } + m.ByteMapping[mapkey] = mapvalue + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTheproto3(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTheproto3 + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *FloatingPoint) 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 ErrIntOverflowTheproto3 + } + 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: FloatingPoint: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: FloatingPoint: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field F", 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.F = float64(math.Float64frombits(v)) + default: + iNdEx = preIndex + skippy, err := skipTheproto3(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTheproto3 + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Uint128Pair) 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 ErrIntOverflowTheproto3 + } + 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: Uint128Pair: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Uint128Pair: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Left", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthTheproto3 + } + postIndex := iNdEx + byteLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Left.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Right", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthTheproto3 + } + postIndex := iNdEx + byteLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var v github_com_gogo_protobuf_test_custom.Uint128 + m.Right = &v + if err := m.Right.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTheproto3(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTheproto3 + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ContainsNestedMap) 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 ErrIntOverflowTheproto3 + } + 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: ContainsNestedMap: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ContainsNestedMap: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipTheproto3(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTheproto3 + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ContainsNestedMap_NestedMap) 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 ErrIntOverflowTheproto3 + } + 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: NestedMap: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: NestedMap: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NestedMapField", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTheproto3 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var keykey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + keykey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var stringLenmapkey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLenmapkey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapkey := int(stringLenmapkey) + if intStringLenmapkey < 0 { + return ErrInvalidLengthTheproto3 + } + postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey > l { + return io.ErrUnexpectedEOF + } + mapkey := string(data[iNdEx:postStringIndexmapkey]) + iNdEx = postStringIndexmapkey + var valuekey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + valuekey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapvaluetemp uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + iNdEx += 8 + mapvaluetemp = uint64(data[iNdEx-8]) + mapvaluetemp |= uint64(data[iNdEx-7]) << 8 + mapvaluetemp |= uint64(data[iNdEx-6]) << 16 + mapvaluetemp |= uint64(data[iNdEx-5]) << 24 + mapvaluetemp |= uint64(data[iNdEx-4]) << 32 + mapvaluetemp |= uint64(data[iNdEx-3]) << 40 + mapvaluetemp |= uint64(data[iNdEx-2]) << 48 + mapvaluetemp |= uint64(data[iNdEx-1]) << 56 + mapvalue := math.Float64frombits(mapvaluetemp) + if m.NestedMapField == nil { + m.NestedMapField = make(map[string]float64) + } + m.NestedMapField[mapkey] = mapvalue + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTheproto3(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTheproto3 + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipTheproto3(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, ErrIntOverflowTheproto3 + } + 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, ErrIntOverflowTheproto3 + } + 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, ErrIntOverflowTheproto3 + } + 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, ErrInvalidLengthTheproto3 + } + return iNdEx, nil + case 3: + for { + var innerWire uint64 + var start int = iNdEx + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowTheproto3 + } + 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 := skipTheproto3(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 ( + ErrInvalidLengthTheproto3 = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowTheproto3 = fmt.Errorf("proto: integer overflow") +) + +var fileDescriptorTheproto3 = []byte{ + // 1576 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xec, 0x59, 0xbd, 0x6f, 0xdb, 0xc6, + 0x1b, 0x36, 0x25, 0x59, 0x1f, 0xaf, 0xbe, 0xe8, 0x4b, 0x7e, 0x3f, 0xa8, 0x2e, 0x6a, 0x3b, 0x0a, + 0x90, 0x38, 0x41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50, 0x85, 0x3e, + 0x85, 0x86, 0xa6, 0xdf, 0x3b, 0xb2, 0x1b, 0x8a, 0xad, 0x3d, 0x54, 0x9b, 0x59, 0x86, 0xab, 0x13, + 0x18, 0xaa, 0x7b, 0xb4, 0x87, 0xca, 0x60, 0xa4, 0x96, 0xf2, 0x74, 0xd8, 0xf3, 0x82, 0x61, 0x77, + 0x28, 0xec, 0x3e, 0x41, 0xb1, 0xa1, 0x1d, 0x1d, 0x1a, 0x99, 0xdf, 0x86, 0x1c, 0x9f, 0x97, 0xbb, + 0xc8, 0x12, 0x5d, 0x1e, 0xba, 0xc8, 0x17, 0x61, 0x96, 0x0d, 0x11, 0x0b, 0x5b, 0x63, 0x76, 0x7f, + 0x2d, 0x76, 0x43, 0x9a, 0xdf, 0x01, 0x39, 0x38, 0x9e, 0x40, 0xf2, 0x82, 0x5f, 0x52, 0xe6, 0x27, + 0xbb, 0xa1, 0x8f, 0x86, 0x9c, 0x62, 0xf9, 0x16, 0x24, 0xd9, 0xfe, 0x41, 0x59, 0x48, 0xed, 0x35, + 0xee, 0x36, 0xee, 0xed, 0x37, 0xe4, 0x19, 0x94, 0x86, 0xc4, 0xce, 0x5e, 0xa3, 0x25, 0x4b, 0x28, + 0x0f, 0x99, 0xd6, 0xd6, 0xfa, 0x4e, 0x6b, 0x77, 0xb3, 0x76, 0x57, 0x8e, 0xa1, 0x22, 0x64, 0xab, + 0x9b, 0x5b, 0x5b, 0xed, 0xea, 0xfa, 0xe6, 0xd6, 0xc6, 0x57, 0x72, 0xbc, 0xbc, 0x00, 0x49, 0x96, + 0x27, 0x79, 0x76, 0x9d, 0x91, 0xae, 0x1f, 0x3b, 0x5b, 0x98, 0x75, 0xca, 0x8f, 0x11, 0xa4, 0xd6, + 0x07, 0x83, 0x6d, 0xe5, 0xc8, 0x42, 0xfb, 0x30, 0xd7, 0xb2, 0x4d, 0x4d, 0xef, 0xed, 0x1a, 0xb7, + 0x8d, 0x51, 0x67, 0xa0, 0xe2, 0x28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 0xe8, 0x6f, 0x55, 0x96, 0xe8, 0x6f, 0x4d, 0x8e, 0x55, 0xb7, 0x4e, + 0x9e, 0x2f, 0xcc, 0x3c, 0xc1, 0xed, 0x0f, 0xdc, 0x9e, 0x3d, 0x5f, 0x90, 0x5e, 0xe2, 0xf6, 0x0a, + 0xb7, 0xd7, 0xb8, 0x3d, 0x7a, 0xb1, 0x20, 0xfd, 0x88, 0xdb, 0x4f, 0xb8, 0xfd, 0x82, 0xdb, 0xaf, + 0xb8, 0x9d, 0xe0, 0xf6, 0x04, 0xb7, 0x67, 0xb8, 0xbd, 0x7c, 0xb1, 0x30, 0xf3, 0x0a, 0xff, 0xbe, + 0xc6, 0xbf, 0x8f, 0xfe, 0x5a, 0x98, 0xe9, 0x24, 0xd9, 0xdc, 0xff, 0x0e, 0x00, 0x00, 0xff, 0xff, + 0xee, 0x91, 0x65, 0x55, 0x3d, 0x1a, 0x00, 0x00, +} diff --git a/vendor/github.com/gogo/protobuf/test/theproto3/combos/both/theproto3.proto b/vendor/github.com/gogo/protobuf/test/theproto3/combos/both/theproto3.proto new file mode 100644 index 000000000..b0616d6d1 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/theproto3/combos/both/theproto3.proto @@ -0,0 +1,162 @@ +// Copyright (c) 2013, Vastech SA (PTY) LTD. All rights reserved. +// http://github.com/gogo/protobuf/gogoproto +// +// Go support for Protocol Buffers - Google's data interchange format +// +// Copyright 2014 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. + +syntax = "proto3"; + +package theproto3; + +import "github.com/gogo/protobuf/gogoproto/gogo.proto"; + +import "github.com/gogo/protobuf/test/combos/both/thetest.proto"; + +option (gogoproto.goproto_stringer_all) = false; +option (gogoproto.goproto_enum_prefix_all) = false; +option (gogoproto.goproto_getters_all) = false; + +option (gogoproto.equal_all) = true; +option (gogoproto.verbose_equal_all) = true; +option (gogoproto.stringer_all) = true; +option (gogoproto.gostring_all) = true; +option (gogoproto.face_all) = true; +option (gogoproto.description_all) = true; + +option (gogoproto.testgen_all) = true; +option (gogoproto.populate_all) = true; +option (gogoproto.benchgen_all) = true; +option (gogoproto.unmarshaler_all) = true; +option (gogoproto.marshaler_all) = true; +option (gogoproto.sizer_all) = true; + +option (gogoproto.goproto_enum_stringer_all) = false; +option (gogoproto.enum_stringer_all) = true; + +option (gogoproto.unsafe_marshaler_all) = false; +option (gogoproto.unsafe_unmarshaler_all) = false; + +message Message { + enum Humour { + UNKNOWN = 0; + PUNS = 1; + SLAPSTICK = 2; + BILL_BAILEY = 3; + } + + string name = 1; + Humour hilarity = 2; + uint32 height_in_cm = 3; + bytes data = 4; + int64 result_count = 7; + bool true_scotsman = 8; + float score = 9; + + repeated uint64 key = 5; + Nested nested = 6; + + map terrain = 10; + test.NinOptNative proto2_field = 11; + map proto2_value = 13; +} + +message Nested { + string bunny = 1; +} + +enum MapEnum { + MA = 0; + MB = 1; + MC = 2; +} + +message AllMaps { + map StringToDoubleMap = 1; + map StringToFloatMap = 2; + map Int32Map = 3; + map Int64Map = 4; + map Uint32Map = 5; + map Uint64Map = 6; + map Sint32Map = 7; + map Sint64Map = 8; + map Fixed32Map = 9; + map Sfixed32Map = 10; + map Fixed64Map = 11; + map Sfixed64Map = 12; + map BoolMap = 13; + map StringMap = 14; + map StringToBytesMap = 15; + map StringToEnumMap = 16; + map StringToMsgMap = 17; +} + +message AllMapsOrdered { + option (gogoproto.stable_marshaler) = true; + + map StringToDoubleMap = 1; + map StringToFloatMap = 2; + map Int32Map = 3; + map Int64Map = 4; + map Uint32Map = 5; + map Uint64Map = 6; + map Sint32Map = 7; + map Sint64Map = 8; + map Fixed32Map = 9; + map Sfixed32Map = 10; + map Fixed64Map = 11; + map Sfixed64Map = 12; + map BoolMap = 13; + map StringMap = 14; + map StringToBytesMap = 15; + map StringToEnumMap = 16; + map StringToMsgMap = 17; +} + +message MessageWithMap { + map name_mapping = 1; + map msg_mapping = 2; + map byte_mapping = 3; +} + +message FloatingPoint { + double f = 1; +} + +message Uint128Pair { + bytes left = 1 [(gogoproto.nullable) = false, (gogoproto.customtype) = "github.com/gogo/protobuf/test/custom.Uint128"]; + bytes right = 2 [(gogoproto.customtype) = "github.com/gogo/protobuf/test/custom.Uint128"]; +} + +message ContainsNestedMap { + message NestedMap { + map NestedMapField = 1; + } +} \ No newline at end of file diff --git a/vendor/github.com/gogo/protobuf/test/theproto3/combos/both/theproto3pb_test.go b/vendor/github.com/gogo/protobuf/test/theproto3/combos/both/theproto3pb_test.go new file mode 100644 index 000000000..5ba344b96 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/theproto3/combos/both/theproto3pb_test.go @@ -0,0 +1,2186 @@ +// Code generated by protoc-gen-gogo. +// source: combos/both/theproto3.proto +// DO NOT EDIT! + +/* +Package theproto3 is a generated protocol buffer package. + +It is generated from these files: + combos/both/theproto3.proto + +It has these top-level messages: + Message + Nested + AllMaps + AllMapsOrdered + MessageWithMap + FloatingPoint + Uint128Pair + ContainsNestedMap +*/ +package theproto3 + +import testing "testing" +import math_rand "math/rand" +import time "time" +import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" +import github_com_gogo_protobuf_jsonpb "github.com/gogo/protobuf/jsonpb" +import fmt "fmt" +import go_parser "go/parser" +import proto "github.com/gogo/protobuf/proto" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" +import _ "github.com/gogo/protobuf/test/combos/both" + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +func TestMessageProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMessage(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Message{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestMessageMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMessage(popr, false) + size := p.Size() + data := make([]byte, size) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(data) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Message{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkMessageProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Message, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedMessage(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkMessageProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedMessage(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &Message{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNestedProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNested(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Nested{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestNestedMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNested(popr, false) + size := p.Size() + data := make([]byte, size) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(data) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Nested{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkNestedProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Nested, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNested(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNestedProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNested(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &Nested{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestAllMapsProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAllMaps(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &AllMaps{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestAllMapsMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAllMaps(popr, false) + size := p.Size() + data := make([]byte, size) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(data) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &AllMaps{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkAllMapsProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*AllMaps, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedAllMaps(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkAllMapsProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedAllMaps(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &AllMaps{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestAllMapsOrderedProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAllMapsOrdered(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &AllMapsOrdered{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestAllMapsOrderedMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAllMapsOrdered(popr, false) + size := p.Size() + data := make([]byte, size) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(data) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &AllMapsOrdered{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkAllMapsOrderedProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*AllMapsOrdered, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedAllMapsOrdered(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkAllMapsOrderedProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedAllMapsOrdered(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &AllMapsOrdered{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestMessageWithMapProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMessageWithMap(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &MessageWithMap{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestMessageWithMapMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMessageWithMap(popr, false) + size := p.Size() + data := make([]byte, size) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(data) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &MessageWithMap{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkMessageWithMapProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*MessageWithMap, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedMessageWithMap(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkMessageWithMapProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedMessageWithMap(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &MessageWithMap{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestFloatingPointProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedFloatingPoint(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &FloatingPoint{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestFloatingPointMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedFloatingPoint(popr, false) + size := p.Size() + data := make([]byte, size) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(data) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &FloatingPoint{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkFloatingPointProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*FloatingPoint, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedFloatingPoint(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkFloatingPointProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedFloatingPoint(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &FloatingPoint{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestUint128PairProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUint128Pair(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Uint128Pair{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestUint128PairMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUint128Pair(popr, false) + size := p.Size() + data := make([]byte, size) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(data) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Uint128Pair{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkUint128PairProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Uint128Pair, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedUint128Pair(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkUint128PairProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedUint128Pair(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &Uint128Pair{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestContainsNestedMapProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedContainsNestedMap(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &ContainsNestedMap{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestContainsNestedMapMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedContainsNestedMap(popr, false) + size := p.Size() + data := make([]byte, size) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(data) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &ContainsNestedMap{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkContainsNestedMapProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*ContainsNestedMap, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedContainsNestedMap(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkContainsNestedMapProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedContainsNestedMap(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &ContainsNestedMap{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestContainsNestedMap_NestedMapProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedContainsNestedMap_NestedMap(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &ContainsNestedMap_NestedMap{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestContainsNestedMap_NestedMapMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedContainsNestedMap_NestedMap(popr, false) + size := p.Size() + data := make([]byte, size) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(data) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &ContainsNestedMap_NestedMap{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkContainsNestedMap_NestedMapProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*ContainsNestedMap_NestedMap, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedContainsNestedMap_NestedMap(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkContainsNestedMap_NestedMapProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedContainsNestedMap_NestedMap(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &ContainsNestedMap_NestedMap{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestMessageJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMessage(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Message{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNestedJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNested(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Nested{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestAllMapsJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAllMaps(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &AllMaps{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestAllMapsOrderedJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAllMapsOrdered(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &AllMapsOrdered{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestMessageWithMapJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMessageWithMap(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &MessageWithMap{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestFloatingPointJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedFloatingPoint(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &FloatingPoint{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestUint128PairJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUint128Pair(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Uint128Pair{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestContainsNestedMapJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedContainsNestedMap(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &ContainsNestedMap{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestContainsNestedMap_NestedMapJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedContainsNestedMap_NestedMap(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &ContainsNestedMap_NestedMap{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestMessageProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMessage(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &Message{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestMessageProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMessage(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &Message{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNestedProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNested(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &Nested{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNestedProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNested(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &Nested{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestAllMapsProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAllMaps(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &AllMaps{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestAllMapsProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAllMaps(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &AllMaps{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestAllMapsOrderedProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAllMapsOrdered(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &AllMapsOrdered{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestAllMapsOrderedProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAllMapsOrdered(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &AllMapsOrdered{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestMessageWithMapProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMessageWithMap(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &MessageWithMap{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestMessageWithMapProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMessageWithMap(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &MessageWithMap{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestFloatingPointProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedFloatingPoint(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &FloatingPoint{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestFloatingPointProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedFloatingPoint(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &FloatingPoint{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestUint128PairProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUint128Pair(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &Uint128Pair{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestUint128PairProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUint128Pair(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &Uint128Pair{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestContainsNestedMapProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedContainsNestedMap(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &ContainsNestedMap{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestContainsNestedMapProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedContainsNestedMap(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &ContainsNestedMap{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestContainsNestedMap_NestedMapProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedContainsNestedMap_NestedMap(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &ContainsNestedMap_NestedMap{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestContainsNestedMap_NestedMapProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedContainsNestedMap_NestedMap(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &ContainsNestedMap_NestedMap{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestTheproto3Description(t *testing.T) { + Theproto3Description() +} +func TestMessageVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedMessage(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &Message{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNestedVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNested(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &Nested{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestAllMapsVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAllMaps(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &AllMaps{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestAllMapsOrderedVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAllMapsOrdered(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &AllMapsOrdered{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestMessageWithMapVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedMessageWithMap(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &MessageWithMap{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestFloatingPointVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedFloatingPoint(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &FloatingPoint{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestUint128PairVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedUint128Pair(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &Uint128Pair{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestContainsNestedMapVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedContainsNestedMap(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &ContainsNestedMap{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestContainsNestedMap_NestedMapVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedContainsNestedMap_NestedMap(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &ContainsNestedMap_NestedMap{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestMessageFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedMessage(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNestedFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNested(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestAllMapsFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAllMaps(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestAllMapsOrderedFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAllMapsOrdered(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestMessageWithMapFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedMessageWithMap(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestFloatingPointFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedFloatingPoint(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestUint128PairFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedUint128Pair(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestContainsNestedMapFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedContainsNestedMap(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestContainsNestedMap_NestedMapFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedContainsNestedMap_NestedMap(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestMessageGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedMessage(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestNestedGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNested(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestAllMapsGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAllMaps(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestAllMapsOrderedGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAllMapsOrdered(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestMessageWithMapGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedMessageWithMap(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestFloatingPointGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedFloatingPoint(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestUint128PairGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedUint128Pair(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestContainsNestedMapGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedContainsNestedMap(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestContainsNestedMap_NestedMapGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedContainsNestedMap_NestedMap(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestMessageSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMessage(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkMessageSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Message, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedMessage(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNestedSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNested(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNestedSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Nested, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNested(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestAllMapsSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAllMaps(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkAllMapsSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*AllMaps, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedAllMaps(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestAllMapsOrderedSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAllMapsOrdered(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkAllMapsOrderedSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*AllMapsOrdered, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedAllMapsOrdered(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestMessageWithMapSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMessageWithMap(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkMessageWithMapSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*MessageWithMap, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedMessageWithMap(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestFloatingPointSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedFloatingPoint(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkFloatingPointSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*FloatingPoint, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedFloatingPoint(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestUint128PairSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUint128Pair(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkUint128PairSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Uint128Pair, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedUint128Pair(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestContainsNestedMapSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedContainsNestedMap(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkContainsNestedMapSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*ContainsNestedMap, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedContainsNestedMap(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestContainsNestedMap_NestedMapSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedContainsNestedMap_NestedMap(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkContainsNestedMap_NestedMapSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*ContainsNestedMap_NestedMap, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedContainsNestedMap_NestedMap(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestMessageStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedMessage(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNestedStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNested(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestAllMapsStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAllMaps(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestAllMapsOrderedStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAllMapsOrdered(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestMessageWithMapStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedMessageWithMap(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestFloatingPointStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedFloatingPoint(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestUint128PairStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedUint128Pair(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestContainsNestedMapStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedContainsNestedMap(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestContainsNestedMap_NestedMapStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedContainsNestedMap_NestedMap(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} + +//These tests are generated by github.com/gogo/protobuf/plugin/testgen diff --git a/vendor/github.com/gogo/protobuf/test/theproto3/combos/marshaler/proto3_test.go b/vendor/github.com/gogo/protobuf/test/theproto3/combos/marshaler/proto3_test.go new file mode 100644 index 000000000..b41f17859 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/theproto3/combos/marshaler/proto3_test.go @@ -0,0 +1,61 @@ +// Copyright (c) 2015, Vastech SA (PTY) LTD. All rights reserved. +// http://github.com/gogo/protobuf/gogoproto +// +// 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 theproto3 + +import ( + "reflect" + "testing" + + "github.com/gogo/protobuf/proto" +) + +func TestNilMaps(t *testing.T) { + m := &AllMaps{StringToMsgMap: map[string]*FloatingPoint{"a": nil}} + if _, err := proto.Marshal(m); err == nil { + t.Fatalf("expected error") + } +} + +func TestCustomTypeSize(t *testing.T) { + m := &Uint128Pair{} + m.Size() // Should not panic. +} + +func TestCustomTypeMarshalUnmarshal(t *testing.T) { + m1 := &Uint128Pair{} + if b, err := proto.Marshal(m1); err != nil { + t.Fatal(err) + } else { + m2 := &Uint128Pair{} + if err := proto.Unmarshal(b, m2); err != nil { + t.Fatal(err) + } + if !reflect.DeepEqual(m1, m2) { + t.Errorf("expected %+v, got %+v", m1, m2) + } + } +} diff --git a/vendor/github.com/gogo/protobuf/test/theproto3/combos/marshaler/theproto3.pb.go b/vendor/github.com/gogo/protobuf/test/theproto3/combos/marshaler/theproto3.pb.go new file mode 100644 index 000000000..cf1c1443c --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/theproto3/combos/marshaler/theproto3.pb.go @@ -0,0 +1,5823 @@ +// Code generated by protoc-gen-gogo. +// source: combos/marshaler/theproto3.proto +// DO NOT EDIT! + +/* + Package theproto3 is a generated protocol buffer package. + + It is generated from these files: + combos/marshaler/theproto3.proto + + It has these top-level messages: + Message + Nested + AllMaps + AllMapsOrdered + MessageWithMap + FloatingPoint + Uint128Pair + ContainsNestedMap +*/ +package theproto3 + +import proto "github.com/gogo/protobuf/proto" +import fmt "fmt" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" +import test "github.com/gogo/protobuf/test/combos/both" + +import github_com_gogo_protobuf_test_custom "github.com/gogo/protobuf/test/custom" + +import github_com_gogo_protobuf_protoc_gen_gogo_descriptor "github.com/gogo/protobuf/protoc-gen-gogo/descriptor" +import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" +import compress_gzip "compress/gzip" +import bytes "bytes" +import io_ioutil "io/ioutil" + +import strconv "strconv" + +import strings "strings" +import sort "sort" +import reflect "reflect" +import github_com_gogo_protobuf_sortkeys "github.com/gogo/protobuf/sortkeys" + +import errors "errors" + +// 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. +const _ = proto.GoGoProtoPackageIsVersion1 + +type MapEnum int32 + +const ( + MA MapEnum = 0 + MB MapEnum = 1 + MC MapEnum = 2 +) + +var MapEnum_name = map[int32]string{ + 0: "MA", + 1: "MB", + 2: "MC", +} +var MapEnum_value = map[string]int32{ + "MA": 0, + "MB": 1, + "MC": 2, +} + +func (MapEnum) EnumDescriptor() ([]byte, []int) { return fileDescriptorTheproto3, []int{0} } + +type Message_Humour int32 + +const ( + UNKNOWN Message_Humour = 0 + PUNS Message_Humour = 1 + SLAPSTICK Message_Humour = 2 + BILL_BAILEY Message_Humour = 3 +) + +var Message_Humour_name = map[int32]string{ + 0: "UNKNOWN", + 1: "PUNS", + 2: "SLAPSTICK", + 3: "BILL_BAILEY", +} +var Message_Humour_value = map[string]int32{ + "UNKNOWN": 0, + "PUNS": 1, + "SLAPSTICK": 2, + "BILL_BAILEY": 3, +} + +func (Message_Humour) EnumDescriptor() ([]byte, []int) { return fileDescriptorTheproto3, []int{0, 0} } + +type Message struct { + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + Hilarity Message_Humour `protobuf:"varint,2,opt,name=hilarity,proto3,enum=theproto3.Message_Humour" json:"hilarity,omitempty"` + HeightInCm uint32 `protobuf:"varint,3,opt,name=height_in_cm,json=heightInCm,proto3" json:"height_in_cm,omitempty"` + Data []byte `protobuf:"bytes,4,opt,name=data,proto3" json:"data,omitempty"` + ResultCount int64 `protobuf:"varint,7,opt,name=result_count,json=resultCount,proto3" json:"result_count,omitempty"` + TrueScotsman bool `protobuf:"varint,8,opt,name=true_scotsman,json=trueScotsman,proto3" json:"true_scotsman,omitempty"` + Score float32 `protobuf:"fixed32,9,opt,name=score,proto3" json:"score,omitempty"` + Key []uint64 `protobuf:"varint,5,rep,name=key" json:"key,omitempty"` + Nested *Nested `protobuf:"bytes,6,opt,name=nested" json:"nested,omitempty"` + Terrain map[int64]*Nested `protobuf:"bytes,10,rep,name=terrain" json:"terrain,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value"` + Proto2Field *test.NinOptNative `protobuf:"bytes,11,opt,name=proto2_field,json=proto2Field" json:"proto2_field,omitempty"` + Proto2Value map[int64]*test.NinOptEnum `protobuf:"bytes,13,rep,name=proto2_value,json=proto2Value" json:"proto2_value,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value"` +} + +func (m *Message) Reset() { *m = Message{} } +func (*Message) ProtoMessage() {} +func (*Message) Descriptor() ([]byte, []int) { return fileDescriptorTheproto3, []int{0} } + +type Nested struct { + Bunny string `protobuf:"bytes,1,opt,name=bunny,proto3" json:"bunny,omitempty"` +} + +func (m *Nested) Reset() { *m = Nested{} } +func (*Nested) ProtoMessage() {} +func (*Nested) Descriptor() ([]byte, []int) { return fileDescriptorTheproto3, []int{1} } + +type AllMaps struct { + StringToDoubleMap map[string]float64 `protobuf:"bytes,1,rep,name=StringToDoubleMap,json=stringToDoubleMap" json:"StringToDoubleMap,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"fixed64,2,opt,name=value,proto3"` + StringToFloatMap map[string]float32 `protobuf:"bytes,2,rep,name=StringToFloatMap,json=stringToFloatMap" json:"StringToFloatMap,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"fixed32,2,opt,name=value,proto3"` + Int32Map map[int32]int32 `protobuf:"bytes,3,rep,name=Int32Map,json=int32Map" json:"Int32Map,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` + Int64Map map[int64]int64 `protobuf:"bytes,4,rep,name=Int64Map,json=int64Map" json:"Int64Map,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` + Uint32Map map[uint32]uint32 `protobuf:"bytes,5,rep,name=Uint32Map,json=uint32Map" json:"Uint32Map,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` + Uint64Map map[uint64]uint64 `protobuf:"bytes,6,rep,name=Uint64Map,json=uint64Map" json:"Uint64Map,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` + Sint32Map map[int32]int32 `protobuf:"bytes,7,rep,name=Sint32Map,json=sint32Map" json:"Sint32Map,omitempty" protobuf_key:"zigzag32,1,opt,name=key,proto3" protobuf_val:"zigzag32,2,opt,name=value,proto3"` + Sint64Map map[int64]int64 `protobuf:"bytes,8,rep,name=Sint64Map,json=sint64Map" json:"Sint64Map,omitempty" protobuf_key:"zigzag64,1,opt,name=key,proto3" protobuf_val:"zigzag64,2,opt,name=value,proto3"` + Fixed32Map map[uint32]uint32 `protobuf:"bytes,9,rep,name=Fixed32Map,json=fixed32Map" json:"Fixed32Map,omitempty" protobuf_key:"fixed32,1,opt,name=key,proto3" protobuf_val:"fixed32,2,opt,name=value,proto3"` + Sfixed32Map map[int32]int32 `protobuf:"bytes,10,rep,name=Sfixed32Map,json=sfixed32Map" json:"Sfixed32Map,omitempty" protobuf_key:"fixed32,1,opt,name=key,proto3" protobuf_val:"fixed32,2,opt,name=value,proto3"` + Fixed64Map map[uint64]uint64 `protobuf:"bytes,11,rep,name=Fixed64Map,json=fixed64Map" json:"Fixed64Map,omitempty" protobuf_key:"fixed64,1,opt,name=key,proto3" protobuf_val:"fixed64,2,opt,name=value,proto3"` + Sfixed64Map map[int64]int64 `protobuf:"bytes,12,rep,name=Sfixed64Map,json=sfixed64Map" json:"Sfixed64Map,omitempty" protobuf_key:"fixed64,1,opt,name=key,proto3" protobuf_val:"fixed64,2,opt,name=value,proto3"` + BoolMap map[bool]bool `protobuf:"bytes,13,rep,name=BoolMap,json=boolMap" json:"BoolMap,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` + StringMap map[string]string `protobuf:"bytes,14,rep,name=StringMap,json=stringMap" json:"StringMap,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + StringToBytesMap map[string][]byte `protobuf:"bytes,15,rep,name=StringToBytesMap,json=stringToBytesMap" json:"StringToBytesMap,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + StringToEnumMap map[string]MapEnum `protobuf:"bytes,16,rep,name=StringToEnumMap,json=stringToEnumMap" json:"StringToEnumMap,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3,enum=theproto3.MapEnum"` + StringToMsgMap map[string]*FloatingPoint `protobuf:"bytes,17,rep,name=StringToMsgMap,json=stringToMsgMap" json:"StringToMsgMap,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value"` +} + +func (m *AllMaps) Reset() { *m = AllMaps{} } +func (*AllMaps) ProtoMessage() {} +func (*AllMaps) Descriptor() ([]byte, []int) { return fileDescriptorTheproto3, []int{2} } + +type AllMapsOrdered struct { + StringToDoubleMap map[string]float64 `protobuf:"bytes,1,rep,name=StringToDoubleMap,json=stringToDoubleMap" json:"StringToDoubleMap,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"fixed64,2,opt,name=value,proto3"` + StringToFloatMap map[string]float32 `protobuf:"bytes,2,rep,name=StringToFloatMap,json=stringToFloatMap" json:"StringToFloatMap,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"fixed32,2,opt,name=value,proto3"` + Int32Map map[int32]int32 `protobuf:"bytes,3,rep,name=Int32Map,json=int32Map" json:"Int32Map,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` + Int64Map map[int64]int64 `protobuf:"bytes,4,rep,name=Int64Map,json=int64Map" json:"Int64Map,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` + Uint32Map map[uint32]uint32 `protobuf:"bytes,5,rep,name=Uint32Map,json=uint32Map" json:"Uint32Map,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` + Uint64Map map[uint64]uint64 `protobuf:"bytes,6,rep,name=Uint64Map,json=uint64Map" json:"Uint64Map,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` + Sint32Map map[int32]int32 `protobuf:"bytes,7,rep,name=Sint32Map,json=sint32Map" json:"Sint32Map,omitempty" protobuf_key:"zigzag32,1,opt,name=key,proto3" protobuf_val:"zigzag32,2,opt,name=value,proto3"` + Sint64Map map[int64]int64 `protobuf:"bytes,8,rep,name=Sint64Map,json=sint64Map" json:"Sint64Map,omitempty" protobuf_key:"zigzag64,1,opt,name=key,proto3" protobuf_val:"zigzag64,2,opt,name=value,proto3"` + Fixed32Map map[uint32]uint32 `protobuf:"bytes,9,rep,name=Fixed32Map,json=fixed32Map" json:"Fixed32Map,omitempty" protobuf_key:"fixed32,1,opt,name=key,proto3" protobuf_val:"fixed32,2,opt,name=value,proto3"` + Sfixed32Map map[int32]int32 `protobuf:"bytes,10,rep,name=Sfixed32Map,json=sfixed32Map" json:"Sfixed32Map,omitempty" protobuf_key:"fixed32,1,opt,name=key,proto3" protobuf_val:"fixed32,2,opt,name=value,proto3"` + Fixed64Map map[uint64]uint64 `protobuf:"bytes,11,rep,name=Fixed64Map,json=fixed64Map" json:"Fixed64Map,omitempty" protobuf_key:"fixed64,1,opt,name=key,proto3" protobuf_val:"fixed64,2,opt,name=value,proto3"` + Sfixed64Map map[int64]int64 `protobuf:"bytes,12,rep,name=Sfixed64Map,json=sfixed64Map" json:"Sfixed64Map,omitempty" protobuf_key:"fixed64,1,opt,name=key,proto3" protobuf_val:"fixed64,2,opt,name=value,proto3"` + BoolMap map[bool]bool `protobuf:"bytes,13,rep,name=BoolMap,json=boolMap" json:"BoolMap,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` + StringMap map[string]string `protobuf:"bytes,14,rep,name=StringMap,json=stringMap" json:"StringMap,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + StringToBytesMap map[string][]byte `protobuf:"bytes,15,rep,name=StringToBytesMap,json=stringToBytesMap" json:"StringToBytesMap,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + StringToEnumMap map[string]MapEnum `protobuf:"bytes,16,rep,name=StringToEnumMap,json=stringToEnumMap" json:"StringToEnumMap,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3,enum=theproto3.MapEnum"` + StringToMsgMap map[string]*FloatingPoint `protobuf:"bytes,17,rep,name=StringToMsgMap,json=stringToMsgMap" json:"StringToMsgMap,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value"` +} + +func (m *AllMapsOrdered) Reset() { *m = AllMapsOrdered{} } +func (*AllMapsOrdered) ProtoMessage() {} +func (*AllMapsOrdered) Descriptor() ([]byte, []int) { return fileDescriptorTheproto3, []int{3} } + +type MessageWithMap struct { + NameMapping map[int32]string `protobuf:"bytes,1,rep,name=name_mapping,json=nameMapping" json:"name_mapping,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + MsgMapping map[int64]*FloatingPoint `protobuf:"bytes,2,rep,name=msg_mapping,json=msgMapping" json:"msg_mapping,omitempty" protobuf_key:"zigzag64,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value"` + ByteMapping map[bool][]byte `protobuf:"bytes,3,rep,name=byte_mapping,json=byteMapping" json:"byte_mapping,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` +} + +func (m *MessageWithMap) Reset() { *m = MessageWithMap{} } +func (*MessageWithMap) ProtoMessage() {} +func (*MessageWithMap) Descriptor() ([]byte, []int) { return fileDescriptorTheproto3, []int{4} } + +type FloatingPoint struct { + F float64 `protobuf:"fixed64,1,opt,name=f,proto3" json:"f,omitempty"` +} + +func (m *FloatingPoint) Reset() { *m = FloatingPoint{} } +func (*FloatingPoint) ProtoMessage() {} +func (*FloatingPoint) Descriptor() ([]byte, []int) { return fileDescriptorTheproto3, []int{5} } + +type Uint128Pair struct { + Left github_com_gogo_protobuf_test_custom.Uint128 `protobuf:"bytes,1,opt,name=left,proto3,customtype=github.com/gogo/protobuf/test/custom.Uint128" json:"left"` + Right *github_com_gogo_protobuf_test_custom.Uint128 `protobuf:"bytes,2,opt,name=right,proto3,customtype=github.com/gogo/protobuf/test/custom.Uint128" json:"right,omitempty"` +} + +func (m *Uint128Pair) Reset() { *m = Uint128Pair{} } +func (*Uint128Pair) ProtoMessage() {} +func (*Uint128Pair) Descriptor() ([]byte, []int) { return fileDescriptorTheproto3, []int{6} } + +type ContainsNestedMap struct { +} + +func (m *ContainsNestedMap) Reset() { *m = ContainsNestedMap{} } +func (*ContainsNestedMap) ProtoMessage() {} +func (*ContainsNestedMap) Descriptor() ([]byte, []int) { return fileDescriptorTheproto3, []int{7} } + +type ContainsNestedMap_NestedMap struct { + NestedMapField map[string]float64 `protobuf:"bytes,1,rep,name=NestedMapField,json=nestedMapField" json:"NestedMapField,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"fixed64,2,opt,name=value,proto3"` +} + +func (m *ContainsNestedMap_NestedMap) Reset() { *m = ContainsNestedMap_NestedMap{} } +func (*ContainsNestedMap_NestedMap) ProtoMessage() {} +func (*ContainsNestedMap_NestedMap) Descriptor() ([]byte, []int) { + return fileDescriptorTheproto3, []int{7, 0} +} + +func init() { + proto.RegisterType((*Message)(nil), "theproto3.Message") + proto.RegisterType((*Nested)(nil), "theproto3.Nested") + proto.RegisterType((*AllMaps)(nil), "theproto3.AllMaps") + proto.RegisterType((*AllMapsOrdered)(nil), "theproto3.AllMapsOrdered") + proto.RegisterType((*MessageWithMap)(nil), "theproto3.MessageWithMap") + proto.RegisterType((*FloatingPoint)(nil), "theproto3.FloatingPoint") + proto.RegisterType((*Uint128Pair)(nil), "theproto3.Uint128Pair") + proto.RegisterType((*ContainsNestedMap)(nil), "theproto3.ContainsNestedMap") + proto.RegisterType((*ContainsNestedMap_NestedMap)(nil), "theproto3.ContainsNestedMap.NestedMap") + proto.RegisterEnum("theproto3.MapEnum", MapEnum_name, MapEnum_value) + proto.RegisterEnum("theproto3.Message_Humour", Message_Humour_name, Message_Humour_value) +} +func (this *Message) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return Theproto3Description() +} +func (this *Nested) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return Theproto3Description() +} +func (this *AllMaps) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return Theproto3Description() +} +func (this *AllMapsOrdered) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return Theproto3Description() +} +func (this *MessageWithMap) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return Theproto3Description() +} +func (this *FloatingPoint) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return Theproto3Description() +} +func (this *Uint128Pair) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return Theproto3Description() +} +func (this *ContainsNestedMap) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return Theproto3Description() +} +func (this *ContainsNestedMap_NestedMap) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return Theproto3Description() +} +func Theproto3Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + d := &github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet{} + var gzipped = []byte{ + // 7455 bytes of a gzipped FileDescriptorSet + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xec, 0x7d, 0x7b, 0x6c, 0x63, 0xd7, + 0x79, 0xe7, 0x90, 0x97, 0x94, 0xa8, 0x8f, 0x14, 0x45, 0xdd, 0xd1, 0xc8, 0xb4, 0x3c, 0x9e, 0x07, + 0x3d, 0x1e, 0xcb, 0x8a, 0xad, 0xd1, 0x68, 0x34, 0x0f, 0xd3, 0xaf, 0x15, 0x29, 0x6a, 0xac, 0x89,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0x2e, 0xe1, 0x16, 0x3c, 0xfc, 0x33, 0x2e, 0x8a, 0x05, 0x66, + 0x5a, 0x32, 0x04, 0x6e, 0x20, 0xc3, 0x5f, 0xd6, 0x13, 0xdf, 0x9d, 0xfe, 0xd3, 0xd3, 0x7d, 0x31, + 0xf7, 0xd5, 0x28, 0xc4, 0x48, 0xbc, 0x8d, 0x40, 0x72, 0xf3, 0xa9, 0xf5, 0x52, 0x79, 0x61, 0x6d, + 0xab, 0xb0, 0x5c, 0xca, 0x44, 0xcc, 0x34, 0x00, 0x69, 0x58, 0x5c, 0x5e, 0x9b, 0xdf, 0xcc, 0x44, + 0xc5, 0xf5, 0xd2, 0xea, 0xe6, 0xa5, 0xb9, 0x8c, 0x21, 0x00, 0x5b, 0xb4, 0x21, 0x26, 0x13, 0x5c, + 0x98, 0xcd, 0xc4, 0x91, 0x27, 0xa4, 0x28, 0x83, 0xa5, 0x27, 0x4b, 0x0b, 0x88, 0x62, 0x40, 0x6d, + 0x41, 0x34, 0x83, 0xe6, 0x30, 0x0c, 0x91, 0x96, 0xc2, 0xda, 0xda, 0x72, 0x26, 0x21, 0x78, 0x6e, + 0x6c, 0x5a, 0x4b, 0xab, 0x57, 0x33, 0x43, 0x82, 0xe7, 0x55, 0x6b, 0x6d, 0x6b, 0x3d, 0x03, 0x82, + 0xc3, 0x4a, 0x69, 0x63, 0x63, 0xfe, 0x6a, 0x29, 0x93, 0x14, 0x14, 0x85, 0xa7, 0x36, 0x4b, 0x1b, + 0x99, 0x94, 0x22, 0x16, 0x1a, 0x62, 0x58, 0x0c, 0x51, 0x5a, 0xdd, 0x5a, 0xc9, 0xa4, 0xcd, 0x51, + 0x18, 0xa6, 0x43, 0x70, 0x21, 0x46, 0xb4, 0x26, 0x24, 0x69, 0xc6, 0x13, 0x84, 0x72, 0x19, 0x55, + 0x1a, 0x10, 0x85, 0x99, 0x2b, 0x42, 0x9c, 0x78, 0x17, 0xf2, 0xe2, 0xf4, 0xf2, 0x7c, 0xa1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, 0x25, 0x6b, 0x06, 0x32, 0xd5, 0x46, 0xdd, 0x76, 0xda, 0x65, 0xb7, + 0xdd, 0xb2, 0x2b, 0xfb, 0x75, 0x67, 0x97, 0xe4, 0xd1, 0x44, 0x3e, 0xbe, 0x53, 0x69, 0xb8, 0xb6, + 0x35, 0x42, 0xbb, 0x37, 0x78, 0x2f, 0x46, 0x90, 0xc5, 0xa2, 0x25, 0x21, 0x06, 0x14, 0x04, 0xed, + 0x16, 0x88, 0xdc, 0xb7, 0x06, 0x21, 0x29, 0x55, 0x67, 0xe6, 0x69, 0x48, 0x3d, 0x53, 0x79, 0xae, + 0x52, 0xe6, 0x15, 0x37, 0xd5, 0x44, 0x12, 0xb7, 0xad, 0xb3, 0xaa, 0x7b, 0x06, 0xc6, 0x08, 0x09, + 0x9a, 0x23, 0x1a, 0xa8, 0xda, 0xa8, 0xb8, 0x2e, 0x51, 0x5a, 0x82, 0x90, 0x9a, 0xb8, 0x6f, 0x0d, + 0x77, 0x15, 0x79, 0x8f, 0x79, 0x11, 0x8e, 0x12, 0xc4, 0x3e, 0x4a, 0xbc, 0xf5, 0x83, 0x86, 0x5d, + 0xc6, 0xf7, 0x00, 0x2e, 0xc9, 0xa7, 0x42, 0xb2, 0x51, 0x4c, 0xb1, 0xc2, 0x08, 0xb0, 0x44, 0xae, + 0x79, 0x15, 0xee, 0x24, 0xb0, 0x5d, 0xdb, 0xb1, 0x5b, 0x95, 0xb6, 0x5d, 0xb6, 0xff, 0x6b, 0x07, + 0xd1, 0x96, 0x2b, 0x4e, 0xad, 0xbc, 0x57, 0x71, 0xf7, 0xb2, 0x63, 0x32, 0x83, 0xdb, 0x31, 0xed, + 0x55, 0x46, 0x5a, 0x22, 0x94, 0xf3, 0x4e, 0xed, 0x31, 0x44, 0x67, 0xe6, 0x61, 0x9c, 0x30, 0x42, + 0x4a, 0x41, 0x73, 0x2e, 0x57, 0xf7, 0xec, 0xea, 0xb3, 0xe5, 0x4e, 0x7b, 0xe7, 0x4a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, 0x67, 0xbd, 0x88, 0x95, 0xa4, 0x6d, 0x82, 0x84, 0x55, 0x6c, + 0xde, 0x1d, 0x7c, 0xca, 0x4a, 0xd2, 0x36, 0x4a, 0x72, 0x0f, 0x8c, 0x54, 0x76, 0x77, 0x5b, 0x98, + 0x39, 0x67, 0x44, 0xcb, 0xd0, 0xb4, 0x68, 0x26, 0x84, 0x13, 0xd7, 0x20, 0xc1, 0xf5, 0x80, 0x17, + 0x16, 0xac, 0x09, 0xb4, 0xe6, 0x93, 0x7d, 0x94, 0x28, 0xbe, 0xa9, 0x77, 0x78, 0x27, 0x1a, 0xb4, + 0xee, 0x96, 0xbd, 0x0d, 0xbd, 0x28, 0xea, 0x4f, 0x58, 0xc9, 0xba, 0x2b, 0x76, 0x70, 0x72, 0x9f, + 0x43, 0xcb, 0xab, 0xba, 0x21, 0x69, 0x2e, 0x40, 0xa2, 0xd1, 0x44, 0xfe, 0x81, 0x11, 0x74, 0x37, + 0x7c, 0x32, 0x64, 0x0f, 0x73, 0x7a, 0x99, 0xd1, 0x5b, 0x02, 0x39, 0xf1, 0xd7, 0x11, 0x48, 0xf0, + 0x66, 0xb4, 0x50, 0xc4, 0x0e, 0x2a, 0xed, 0x3d, 0xc2, 0x2e, 0x5e, 0x88, 0x66, 0x22, 0x16, 0xb9, + 0xc6, 0xed, 0xa8, 0x9a, 0x71, 0x88, 0x0b, 0xb0, 0x76, 0x7c, 0x8d, 0xed, 0xda, 0xb0, 0x2b, 0x35, + 0x52, 0xe0, 0x36, 0xf7, 0xf7, 0x91, 0x25, 0x5d, 0x6e, 0x57, 0xd6, 0x5e, 0x64, 0xcd, 0x78, 0x5f, + 0xbc, 0xdd, 0xaa, 0xd4, 0x1b, 0x0a, 0x6d, 0x8c, 0xd0, 0x66, 0x78, 0x87, 0x20, 0xce, 0xc3, 0xed, + 0x9c, 0x6f, 0xcd, 0x6e, 0x57, 0x50, 0xf1, 0x5c, 0xf3, 0x40, 0x03, 0x64, 0xb7, 0xeb, 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0x54, 0x18, 0x73, 0x5c, 0x35, 0xa6, 0x30, 0xe3, 0xb8, + 0x6a, 0x46, 0x61, 0xc0, 0x71, 0xd5, 0x80, 0xc2, 0x74, 0xe3, 0xaa, 0xe9, 0x84, 0xd1, 0xc6, 0x55, + 0xa3, 0x09, 0x73, 0x8d, 0xab, 0xe6, 0x12, 0x86, 0xca, 0x6a, 0x86, 0xf2, 0x4c, 0x94, 0xd5, 0x4c, + 0xe4, 0x19, 0x27, 0xab, 0x19, 0xc7, 0x33, 0x4b, 0x56, 0x33, 0x8b, 0x67, 0x90, 0xac, 0x66, 0x10, + 0xcf, 0x14, 0x59, 0xcd, 0x14, 0x9e, 0x11, 0x58, 0x8c, 0x59, 0xf6, 0x81, 0x4f, 0x8c, 0x19, 0x3d, + 0x63, 0xcc, 0xe8, 0x19, 0x63, 0x46, 0xcf, 0x18, 0x33, 0x7a, 0xc6, 0x98, 0xd1, 0x33, 0xc6, 0x8c, + 0x9e, 0x31, 0x66, 0xf4, 0x8c, 0x31, 0xa3, 0x67, 0x8c, 0x19, 0xbd, 0x63, 0xcc, 0x08, 0x89, 0x31, + 0x23, 0x24, 0xc6, 0x8c, 0x90, 0x18, 0x33, 0x42, 0x62, 0xcc, 0x08, 0x89, 0x31, 0x23, 0x30, 0xc6, + 0x3c, 0xf3, 0x8e, 0xab, 0xe6, 0xf5, 0x8d, 0x31, 0x23, 0x20, 0xc6, 0x8c, 0x80, 0x18, 0x33, 0x02, + 0x62, 0xcc, 0x08, 0x88, 0x31, 0x23, 0x20, 0xc6, 0x8c, 0x80, 0x18, 0x33, 0x02, 0x62, 0xcc, 0x08, + 0x8a, 0x31, 0x23, 0x30, 0xc6, 0x8c, 0xc0, 0x18, 0x33, 0x02, 0x63, 0xcc, 0x08, 0x8c, 0x31, 0x23, + 0x30, 0xc6, 0x0c, 0x39, 0xc6, 0xfe, 0xc4, 0x00, 0x93, 0xc6, 0xd8, 0x3a, 0x79, 0x38, 0x80, 0x99, + 0xe2, 0x84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b, 0x5a, 0xf0, 0x9e, + 0xe9, 0x87, 0x8d, 0x15, 0x75, 0x56, 0x26, 0xfe, 0x34, 0x02, 0xc3, 0x4a, 0x2b, 0x5a, 0x6d, 0x53, + 0xb4, 0x41, 0x9a, 0xee, 0x80, 0x95, 0x72, 0xa4, 0x36, 0x2e, 0x73, 0xf4, 0x16, 0x65, 0x9e, 0x98, + 0x47, 0x77, 0xed, 0x6a, 0xbb, 0x39, 0x0d, 0xa6, 0xdc, 0xc4, 0x84, 0xa0, 0x2f, 0x31, 0x31, 0x9d, + 0xae, 0x9e, 0xdc, 0x9d, 0x28, 0x0b, 0x0b, 0xbd, 0x8a, 0x77, 0x6f, 0xac, 0x96, 0x36, 0xf0, 0x6b, + 0x33, 0x22, 0xb9, 0xaf, 0x46, 0x20, 0xc9, 0xca, 0xd6, 0x6a, 0xf3, 0xc0, 0x36, 0x0b, 0x10, 0x99, + 0x67, 0x1e, 0x74, 0x73, 0x72, 0x47, 0x2a, 0x68, 0x75, 0x8a, 0x14, 0xfa, 0x37, 0x75, 0x64, 0xdb, + 0x9c, 0x85, 0x48, 0x91, 0x19, 0xb8, 0x3f, 0xcb, 0x44, 0xaa, 0xb9, 0x1f, 0x1b, 0x70, 0x54, 0x2e, + 0xa3, 0x79, 0x3e, 0x39, 0xad, 0xde, 0x37, 0xe5, 0x87, 0xce, 0xcf, 0x5e, 0x98, 0x9b, 0xc6, 0xff, + 0x08, 0x97, 0x3c, 0xad, 0xde, 0x42, 0x75, 0x93, 0x74, 0x3d, 0x26, 0x92, 0x8f, 0x49, 0xbd, 0x5d, + 0x8f, 0x89, 0x28, 0xbd, 0x5d, 0x8f, 0x89, 0x28, 0xbd, 0x5d, 0x8f, 0x89, 0x28, 0xbd, 0x5d, 0x47, + 0x01, 0x4a, 0x6f, 0xd7, 0x63, 0x22, 0x4a, 0x6f, 0xd7, 0x63, 0x22, 0x4a, 0x6f, 0xf7, 0x63, 0x22, + 0xac, 0x3b, 0xf0, 0x31, 0x11,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, 0xea, 0x88, 0xe1, 0x19, 0x03, 0x3a, 0xfe, 0x40, 0x4f, 0x06, 0x92, 0x00, 0x84, 0x81, 0x90, + 0x60, 0x43, 0x48, 0x30, 0x18, 0xc8, 0x60, 0x43, 0x93, 0xc0, 0x95, 0x25, 0xd8, 0x10, 0x12, 0x24, + 0x7a, 0x32, 0x90, 0x25, 0x70, 0x85, 0x04, 0x05, 0x80, 0xc5, 0xfa, 0x0b, 0x76, 0x8d, 0x8a, 0x40, + 0x5f, 0xf7, 0x9f, 0xf3, 0xe1, 0xe0, 0x11, 0x51, 0x16, 0xb0, 0x23, 0x1a, 0xcc, 0x12, 0x24, 0x37, + 0xbc, 0x4b, 0x96, 0x3e, 0xee, 0xf2, 0x13, 0x63, 0x47, 0xe3, 0x92, 0x74, 0x25, 0x36, 0x5c, 0x14, + 0x3a, 0x99, 0x64, 0x6f, 0x51, 0xa4, 0xd9, 0x50, 0x51, 0xe8, 0x74, 0x84, 0x28, 0x94, 0x49, 0x2a, + 0x44, 0x14, 0x89, 0x0b, 0x13, 0x85, 0xb2, 0x41, 0xc9, 0xb0, 0xd0, 0x6c, 0x62, 0x4a, 0x96, 0x95, + 0x4e, 0xfa, 0xb0, 0x60, 0x14, 0x2c, 0x19, 0x6e, 0xd3, 0x2b, 0x62, 0x11, 0xe2, 0xe4, 0x18, 0x9c, + 0x0e, 0xb6, 0x08, 0xa7, 0xe1, 0x16, 0xe1, 0xd7, 0x72, 0x9c, 0x91, 0x07, 0x26, 0x31, 0x9f, 0x91, + 0xd0, 0x38, 0xe3, 0xa4, 0x5a, 0x9c, 0xf1, 0x66, 0xf3, 0x5d, 0x30, 0xc2, 0x49, 0x71, 0x7a, 0xc2, + 0x4c, 0x33, 0xec, 0x7f, 0x88, 0x12, 0xcc, 0x94, 0x51, 0x52, 0x9e, 0x23, 0xae, 0xda, 0x6a, 0xae, + 0x42, 0x9a, 0x13, 0xae, 0xb8, 0x64, 0xba, 0xa3, 0xec, 0x2d, 0xe5, 0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 0x45, 0xcd, 0x22, + 0xd0, 0x9f, 0xcb, 0xdc, 0xfc, 0xcf, 0x4b, 0xe9, 0xaf, 0x6d, 0x6e, 0x44, 0x60, 0x94, 0x3d, 0x49, + 0xe9, 0xb2, 0xe7, 0x6b, 0xd1, 0x0a, 0xf9, 0xe5, 0x08, 0x0c, 0x89, 0x2b, 0x73, 0x1b, 0xd2, 0xe2, + 0x82, 0x3e, 0xc3, 0x4d, 0x3d, 0x35, 0x2f, 0x69, 0xb8, 0x8b, 0xc7, 0xb4, 0xcf, 0x37, 0x7a, 0x80, + 0x45, 0xd7, 0x64, 0x47, 0x69, 0x9c, 0x98, 0x87, 0xa3, 0x3e, 0x64, 0x87, 0x59, 0x90, 0xa7, 0x4e, + 0xc3, 0x20, 0x0b, 0x6d, 0x7c, 0x60, 0xb8, 0x82, 0x0f, 0x1c, 0xf1, 0x5f, 0x7c, 0x88, 0x89, 0xff, + 0x16, 0x33, 0xd1, 0xc2, 0xf2, 0x4d, 0x1e, 0x22, 0x1d, 0xf1, 0x3b, 0x44, 0xda, 0x1e, 0xa0, 0x73, + 0xff, 0x8f, 0x00, 0x00, 0x00, 0xff, 0xff, 0xdc, 0xbe, 0xa6, 0x69, 0x78, 0x79, 0x00, 0x00, + } + r := bytes.NewReader(gzipped) + gzipr, err := compress_gzip.NewReader(r) + if err != nil { + panic(err) + } + ungzipped, err := io_ioutil.ReadAll(gzipr) + if err != nil { + panic(err) + } + if err := github_com_gogo_protobuf_proto.Unmarshal(ungzipped, d); err != nil { + panic(err) + } + return d +} +func (x MapEnum) String() string { + s, ok := MapEnum_name[int32(x)] + if ok { + return s + } + return strconv.Itoa(int(x)) +} +func (x Message_Humour) String() string { + s, ok := Message_Humour_name[int32(x)] + if ok { + return s + } + return strconv.Itoa(int(x)) +} +func (this *Message) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*Message) + if !ok { + that2, ok := that.(Message) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *Message") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *Message but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *Message 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.Hilarity != that1.Hilarity { + return fmt.Errorf("Hilarity this(%v) Not Equal that(%v)", this.Hilarity, that1.Hilarity) + } + if this.HeightInCm != that1.HeightInCm { + return fmt.Errorf("HeightInCm this(%v) Not Equal that(%v)", this.HeightInCm, that1.HeightInCm) + } + if !bytes.Equal(this.Data, that1.Data) { + return fmt.Errorf("Data this(%v) Not Equal that(%v)", this.Data, that1.Data) + } + if this.ResultCount != that1.ResultCount { + return fmt.Errorf("ResultCount this(%v) Not Equal that(%v)", this.ResultCount, that1.ResultCount) + } + if this.TrueScotsman != that1.TrueScotsman { + return fmt.Errorf("TrueScotsman this(%v) Not Equal that(%v)", this.TrueScotsman, that1.TrueScotsman) + } + if this.Score != that1.Score { + return fmt.Errorf("Score this(%v) Not Equal that(%v)", this.Score, that1.Score) + } + if len(this.Key) != len(that1.Key) { + return fmt.Errorf("Key this(%v) Not Equal that(%v)", len(this.Key), len(that1.Key)) + } + for i := range this.Key { + if this.Key[i] != that1.Key[i] { + return fmt.Errorf("Key this[%v](%v) Not Equal that[%v](%v)", i, this.Key[i], i, that1.Key[i]) + } + } + if !this.Nested.Equal(that1.Nested) { + return fmt.Errorf("Nested this(%v) Not Equal that(%v)", this.Nested, that1.Nested) + } + if len(this.Terrain) != len(that1.Terrain) { + return fmt.Errorf("Terrain this(%v) Not Equal that(%v)", len(this.Terrain), len(that1.Terrain)) + } + for i := range this.Terrain { + if !this.Terrain[i].Equal(that1.Terrain[i]) { + return fmt.Errorf("Terrain this[%v](%v) Not Equal that[%v](%v)", i, this.Terrain[i], i, that1.Terrain[i]) + } + } + if !this.Proto2Field.Equal(that1.Proto2Field) { + return fmt.Errorf("Proto2Field this(%v) Not Equal that(%v)", this.Proto2Field, that1.Proto2Field) + } + if len(this.Proto2Value) != len(that1.Proto2Value) { + return fmt.Errorf("Proto2Value this(%v) Not Equal that(%v)", len(this.Proto2Value), len(that1.Proto2Value)) + } + for i := range this.Proto2Value { + if !this.Proto2Value[i].Equal(that1.Proto2Value[i]) { + return fmt.Errorf("Proto2Value this[%v](%v) Not Equal that[%v](%v)", i, this.Proto2Value[i], i, that1.Proto2Value[i]) + } + } + return nil +} +func (this *Message) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*Message) + if !ok { + that2, ok := that.(Message) + 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.Hilarity != that1.Hilarity { + return false + } + if this.HeightInCm != that1.HeightInCm { + return false + } + if !bytes.Equal(this.Data, that1.Data) { + return false + } + if this.ResultCount != that1.ResultCount { + return false + } + if this.TrueScotsman != that1.TrueScotsman { + return false + } + if this.Score != that1.Score { + return false + } + if len(this.Key) != len(that1.Key) { + return false + } + for i := range this.Key { + if this.Key[i] != that1.Key[i] { + return false + } + } + if !this.Nested.Equal(that1.Nested) { + return false + } + if len(this.Terrain) != len(that1.Terrain) { + return false + } + for i := range this.Terrain { + if !this.Terrain[i].Equal(that1.Terrain[i]) { + return false + } + } + if !this.Proto2Field.Equal(that1.Proto2Field) { + return false + } + if len(this.Proto2Value) != len(that1.Proto2Value) { + return false + } + for i := range this.Proto2Value { + if !this.Proto2Value[i].Equal(that1.Proto2Value[i]) { + return false + } + } + return true +} +func (this *Nested) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*Nested) + if !ok { + that2, ok := that.(Nested) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *Nested") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *Nested but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *Nested but is not nil && this == nil") + } + if this.Bunny != that1.Bunny { + return fmt.Errorf("Bunny this(%v) Not Equal that(%v)", this.Bunny, that1.Bunny) + } + return nil +} +func (this *Nested) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*Nested) + if !ok { + that2, ok := that.(Nested) + 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.Bunny != that1.Bunny { + return false + } + return true +} +func (this *AllMaps) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*AllMaps) + if !ok { + that2, ok := that.(AllMaps) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *AllMaps") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *AllMaps but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *AllMaps but is not nil && this == nil") + } + if len(this.StringToDoubleMap) != len(that1.StringToDoubleMap) { + return fmt.Errorf("StringToDoubleMap this(%v) Not Equal that(%v)", len(this.StringToDoubleMap), len(that1.StringToDoubleMap)) + } + for i := range this.StringToDoubleMap { + if this.StringToDoubleMap[i] != that1.StringToDoubleMap[i] { + return fmt.Errorf("StringToDoubleMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringToDoubleMap[i], i, that1.StringToDoubleMap[i]) + } + } + if len(this.StringToFloatMap) != len(that1.StringToFloatMap) { + return fmt.Errorf("StringToFloatMap this(%v) Not Equal that(%v)", len(this.StringToFloatMap), len(that1.StringToFloatMap)) + } + for i := range this.StringToFloatMap { + if this.StringToFloatMap[i] != that1.StringToFloatMap[i] { + return fmt.Errorf("StringToFloatMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringToFloatMap[i], i, that1.StringToFloatMap[i]) + } + } + if len(this.Int32Map) != len(that1.Int32Map) { + return fmt.Errorf("Int32Map this(%v) Not Equal that(%v)", len(this.Int32Map), len(that1.Int32Map)) + } + for i := range this.Int32Map { + if this.Int32Map[i] != that1.Int32Map[i] { + return fmt.Errorf("Int32Map this[%v](%v) Not Equal that[%v](%v)", i, this.Int32Map[i], i, that1.Int32Map[i]) + } + } + if len(this.Int64Map) != len(that1.Int64Map) { + return fmt.Errorf("Int64Map this(%v) Not Equal that(%v)", len(this.Int64Map), len(that1.Int64Map)) + } + for i := range this.Int64Map { + if this.Int64Map[i] != that1.Int64Map[i] { + return fmt.Errorf("Int64Map this[%v](%v) Not Equal that[%v](%v)", i, this.Int64Map[i], i, that1.Int64Map[i]) + } + } + if len(this.Uint32Map) != len(that1.Uint32Map) { + return fmt.Errorf("Uint32Map this(%v) Not Equal that(%v)", len(this.Uint32Map), len(that1.Uint32Map)) + } + for i := range this.Uint32Map { + if this.Uint32Map[i] != that1.Uint32Map[i] { + return fmt.Errorf("Uint32Map this[%v](%v) Not Equal that[%v](%v)", i, this.Uint32Map[i], i, that1.Uint32Map[i]) + } + } + if len(this.Uint64Map) != len(that1.Uint64Map) { + return fmt.Errorf("Uint64Map this(%v) Not Equal that(%v)", len(this.Uint64Map), len(that1.Uint64Map)) + } + for i := range this.Uint64Map { + if this.Uint64Map[i] != that1.Uint64Map[i] { + return fmt.Errorf("Uint64Map this[%v](%v) Not Equal that[%v](%v)", i, this.Uint64Map[i], i, that1.Uint64Map[i]) + } + } + if len(this.Sint32Map) != len(that1.Sint32Map) { + return fmt.Errorf("Sint32Map this(%v) Not Equal that(%v)", len(this.Sint32Map), len(that1.Sint32Map)) + } + for i := range this.Sint32Map { + if this.Sint32Map[i] != that1.Sint32Map[i] { + return fmt.Errorf("Sint32Map this[%v](%v) Not Equal that[%v](%v)", i, this.Sint32Map[i], i, that1.Sint32Map[i]) + } + } + if len(this.Sint64Map) != len(that1.Sint64Map) { + return fmt.Errorf("Sint64Map this(%v) Not Equal that(%v)", len(this.Sint64Map), len(that1.Sint64Map)) + } + for i := range this.Sint64Map { + if this.Sint64Map[i] != that1.Sint64Map[i] { + return fmt.Errorf("Sint64Map this[%v](%v) Not Equal that[%v](%v)", i, this.Sint64Map[i], i, that1.Sint64Map[i]) + } + } + if len(this.Fixed32Map) != len(that1.Fixed32Map) { + return fmt.Errorf("Fixed32Map this(%v) Not Equal that(%v)", len(this.Fixed32Map), len(that1.Fixed32Map)) + } + for i := range this.Fixed32Map { + if this.Fixed32Map[i] != that1.Fixed32Map[i] { + return fmt.Errorf("Fixed32Map this[%v](%v) Not Equal that[%v](%v)", i, this.Fixed32Map[i], i, that1.Fixed32Map[i]) + } + } + if len(this.Sfixed32Map) != len(that1.Sfixed32Map) { + return fmt.Errorf("Sfixed32Map this(%v) Not Equal that(%v)", len(this.Sfixed32Map), len(that1.Sfixed32Map)) + } + for i := range this.Sfixed32Map { + if this.Sfixed32Map[i] != that1.Sfixed32Map[i] { + return fmt.Errorf("Sfixed32Map this[%v](%v) Not Equal that[%v](%v)", i, this.Sfixed32Map[i], i, that1.Sfixed32Map[i]) + } + } + if len(this.Fixed64Map) != len(that1.Fixed64Map) { + return fmt.Errorf("Fixed64Map this(%v) Not Equal that(%v)", len(this.Fixed64Map), len(that1.Fixed64Map)) + } + for i := range this.Fixed64Map { + if this.Fixed64Map[i] != that1.Fixed64Map[i] { + return fmt.Errorf("Fixed64Map this[%v](%v) Not Equal that[%v](%v)", i, this.Fixed64Map[i], i, that1.Fixed64Map[i]) + } + } + if len(this.Sfixed64Map) != len(that1.Sfixed64Map) { + return fmt.Errorf("Sfixed64Map this(%v) Not Equal that(%v)", len(this.Sfixed64Map), len(that1.Sfixed64Map)) + } + for i := range this.Sfixed64Map { + if this.Sfixed64Map[i] != that1.Sfixed64Map[i] { + return fmt.Errorf("Sfixed64Map this[%v](%v) Not Equal that[%v](%v)", i, this.Sfixed64Map[i], i, that1.Sfixed64Map[i]) + } + } + if len(this.BoolMap) != len(that1.BoolMap) { + return fmt.Errorf("BoolMap this(%v) Not Equal that(%v)", len(this.BoolMap), len(that1.BoolMap)) + } + for i := range this.BoolMap { + if this.BoolMap[i] != that1.BoolMap[i] { + return fmt.Errorf("BoolMap this[%v](%v) Not Equal that[%v](%v)", i, this.BoolMap[i], i, that1.BoolMap[i]) + } + } + if len(this.StringMap) != len(that1.StringMap) { + return fmt.Errorf("StringMap this(%v) Not Equal that(%v)", len(this.StringMap), len(that1.StringMap)) + } + for i := range this.StringMap { + if this.StringMap[i] != that1.StringMap[i] { + return fmt.Errorf("StringMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringMap[i], i, that1.StringMap[i]) + } + } + if len(this.StringToBytesMap) != len(that1.StringToBytesMap) { + return fmt.Errorf("StringToBytesMap this(%v) Not Equal that(%v)", len(this.StringToBytesMap), len(that1.StringToBytesMap)) + } + for i := range this.StringToBytesMap { + if !bytes.Equal(this.StringToBytesMap[i], that1.StringToBytesMap[i]) { + return fmt.Errorf("StringToBytesMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringToBytesMap[i], i, that1.StringToBytesMap[i]) + } + } + if len(this.StringToEnumMap) != len(that1.StringToEnumMap) { + return fmt.Errorf("StringToEnumMap this(%v) Not Equal that(%v)", len(this.StringToEnumMap), len(that1.StringToEnumMap)) + } + for i := range this.StringToEnumMap { + if this.StringToEnumMap[i] != that1.StringToEnumMap[i] { + return fmt.Errorf("StringToEnumMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringToEnumMap[i], i, that1.StringToEnumMap[i]) + } + } + if len(this.StringToMsgMap) != len(that1.StringToMsgMap) { + return fmt.Errorf("StringToMsgMap this(%v) Not Equal that(%v)", len(this.StringToMsgMap), len(that1.StringToMsgMap)) + } + for i := range this.StringToMsgMap { + if !this.StringToMsgMap[i].Equal(that1.StringToMsgMap[i]) { + return fmt.Errorf("StringToMsgMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringToMsgMap[i], i, that1.StringToMsgMap[i]) + } + } + return nil +} +func (this *AllMaps) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*AllMaps) + if !ok { + that2, ok := that.(AllMaps) + 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.StringToDoubleMap) != len(that1.StringToDoubleMap) { + return false + } + for i := range this.StringToDoubleMap { + if this.StringToDoubleMap[i] != that1.StringToDoubleMap[i] { + return false + } + } + if len(this.StringToFloatMap) != len(that1.StringToFloatMap) { + return false + } + for i := range this.StringToFloatMap { + if this.StringToFloatMap[i] != that1.StringToFloatMap[i] { + return false + } + } + if len(this.Int32Map) != len(that1.Int32Map) { + return false + } + for i := range this.Int32Map { + if this.Int32Map[i] != that1.Int32Map[i] { + return false + } + } + if len(this.Int64Map) != len(that1.Int64Map) { + return false + } + for i := range this.Int64Map { + if this.Int64Map[i] != that1.Int64Map[i] { + return false + } + } + if len(this.Uint32Map) != len(that1.Uint32Map) { + return false + } + for i := range this.Uint32Map { + if this.Uint32Map[i] != that1.Uint32Map[i] { + return false + } + } + if len(this.Uint64Map) != len(that1.Uint64Map) { + return false + } + for i := range this.Uint64Map { + if this.Uint64Map[i] != that1.Uint64Map[i] { + return false + } + } + if len(this.Sint32Map) != len(that1.Sint32Map) { + return false + } + for i := range this.Sint32Map { + if this.Sint32Map[i] != that1.Sint32Map[i] { + return false + } + } + if len(this.Sint64Map) != len(that1.Sint64Map) { + return false + } + for i := range this.Sint64Map { + if this.Sint64Map[i] != that1.Sint64Map[i] { + return false + } + } + if len(this.Fixed32Map) != len(that1.Fixed32Map) { + return false + } + for i := range this.Fixed32Map { + if this.Fixed32Map[i] != that1.Fixed32Map[i] { + return false + } + } + if len(this.Sfixed32Map) != len(that1.Sfixed32Map) { + return false + } + for i := range this.Sfixed32Map { + if this.Sfixed32Map[i] != that1.Sfixed32Map[i] { + return false + } + } + if len(this.Fixed64Map) != len(that1.Fixed64Map) { + return false + } + for i := range this.Fixed64Map { + if this.Fixed64Map[i] != that1.Fixed64Map[i] { + return false + } + } + if len(this.Sfixed64Map) != len(that1.Sfixed64Map) { + return false + } + for i := range this.Sfixed64Map { + if this.Sfixed64Map[i] != that1.Sfixed64Map[i] { + return false + } + } + if len(this.BoolMap) != len(that1.BoolMap) { + return false + } + for i := range this.BoolMap { + if this.BoolMap[i] != that1.BoolMap[i] { + return false + } + } + if len(this.StringMap) != len(that1.StringMap) { + return false + } + for i := range this.StringMap { + if this.StringMap[i] != that1.StringMap[i] { + return false + } + } + if len(this.StringToBytesMap) != len(that1.StringToBytesMap) { + return false + } + for i := range this.StringToBytesMap { + if !bytes.Equal(this.StringToBytesMap[i], that1.StringToBytesMap[i]) { + return false + } + } + if len(this.StringToEnumMap) != len(that1.StringToEnumMap) { + return false + } + for i := range this.StringToEnumMap { + if this.StringToEnumMap[i] != that1.StringToEnumMap[i] { + return false + } + } + if len(this.StringToMsgMap) != len(that1.StringToMsgMap) { + return false + } + for i := range this.StringToMsgMap { + if !this.StringToMsgMap[i].Equal(that1.StringToMsgMap[i]) { + return false + } + } + return true +} +func (this *AllMapsOrdered) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*AllMapsOrdered) + if !ok { + that2, ok := that.(AllMapsOrdered) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *AllMapsOrdered") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *AllMapsOrdered but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *AllMapsOrdered but is not nil && this == nil") + } + if len(this.StringToDoubleMap) != len(that1.StringToDoubleMap) { + return fmt.Errorf("StringToDoubleMap this(%v) Not Equal that(%v)", len(this.StringToDoubleMap), len(that1.StringToDoubleMap)) + } + for i := range this.StringToDoubleMap { + if this.StringToDoubleMap[i] != that1.StringToDoubleMap[i] { + return fmt.Errorf("StringToDoubleMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringToDoubleMap[i], i, that1.StringToDoubleMap[i]) + } + } + if len(this.StringToFloatMap) != len(that1.StringToFloatMap) { + return fmt.Errorf("StringToFloatMap this(%v) Not Equal that(%v)", len(this.StringToFloatMap), len(that1.StringToFloatMap)) + } + for i := range this.StringToFloatMap { + if this.StringToFloatMap[i] != that1.StringToFloatMap[i] { + return fmt.Errorf("StringToFloatMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringToFloatMap[i], i, that1.StringToFloatMap[i]) + } + } + if len(this.Int32Map) != len(that1.Int32Map) { + return fmt.Errorf("Int32Map this(%v) Not Equal that(%v)", len(this.Int32Map), len(that1.Int32Map)) + } + for i := range this.Int32Map { + if this.Int32Map[i] != that1.Int32Map[i] { + return fmt.Errorf("Int32Map this[%v](%v) Not Equal that[%v](%v)", i, this.Int32Map[i], i, that1.Int32Map[i]) + } + } + if len(this.Int64Map) != len(that1.Int64Map) { + return fmt.Errorf("Int64Map this(%v) Not Equal that(%v)", len(this.Int64Map), len(that1.Int64Map)) + } + for i := range this.Int64Map { + if this.Int64Map[i] != that1.Int64Map[i] { + return fmt.Errorf("Int64Map this[%v](%v) Not Equal that[%v](%v)", i, this.Int64Map[i], i, that1.Int64Map[i]) + } + } + if len(this.Uint32Map) != len(that1.Uint32Map) { + return fmt.Errorf("Uint32Map this(%v) Not Equal that(%v)", len(this.Uint32Map), len(that1.Uint32Map)) + } + for i := range this.Uint32Map { + if this.Uint32Map[i] != that1.Uint32Map[i] { + return fmt.Errorf("Uint32Map this[%v](%v) Not Equal that[%v](%v)", i, this.Uint32Map[i], i, that1.Uint32Map[i]) + } + } + if len(this.Uint64Map) != len(that1.Uint64Map) { + return fmt.Errorf("Uint64Map this(%v) Not Equal that(%v)", len(this.Uint64Map), len(that1.Uint64Map)) + } + for i := range this.Uint64Map { + if this.Uint64Map[i] != that1.Uint64Map[i] { + return fmt.Errorf("Uint64Map this[%v](%v) Not Equal that[%v](%v)", i, this.Uint64Map[i], i, that1.Uint64Map[i]) + } + } + if len(this.Sint32Map) != len(that1.Sint32Map) { + return fmt.Errorf("Sint32Map this(%v) Not Equal that(%v)", len(this.Sint32Map), len(that1.Sint32Map)) + } + for i := range this.Sint32Map { + if this.Sint32Map[i] != that1.Sint32Map[i] { + return fmt.Errorf("Sint32Map this[%v](%v) Not Equal that[%v](%v)", i, this.Sint32Map[i], i, that1.Sint32Map[i]) + } + } + if len(this.Sint64Map) != len(that1.Sint64Map) { + return fmt.Errorf("Sint64Map this(%v) Not Equal that(%v)", len(this.Sint64Map), len(that1.Sint64Map)) + } + for i := range this.Sint64Map { + if this.Sint64Map[i] != that1.Sint64Map[i] { + return fmt.Errorf("Sint64Map this[%v](%v) Not Equal that[%v](%v)", i, this.Sint64Map[i], i, that1.Sint64Map[i]) + } + } + if len(this.Fixed32Map) != len(that1.Fixed32Map) { + return fmt.Errorf("Fixed32Map this(%v) Not Equal that(%v)", len(this.Fixed32Map), len(that1.Fixed32Map)) + } + for i := range this.Fixed32Map { + if this.Fixed32Map[i] != that1.Fixed32Map[i] { + return fmt.Errorf("Fixed32Map this[%v](%v) Not Equal that[%v](%v)", i, this.Fixed32Map[i], i, that1.Fixed32Map[i]) + } + } + if len(this.Sfixed32Map) != len(that1.Sfixed32Map) { + return fmt.Errorf("Sfixed32Map this(%v) Not Equal that(%v)", len(this.Sfixed32Map), len(that1.Sfixed32Map)) + } + for i := range this.Sfixed32Map { + if this.Sfixed32Map[i] != that1.Sfixed32Map[i] { + return fmt.Errorf("Sfixed32Map this[%v](%v) Not Equal that[%v](%v)", i, this.Sfixed32Map[i], i, that1.Sfixed32Map[i]) + } + } + if len(this.Fixed64Map) != len(that1.Fixed64Map) { + return fmt.Errorf("Fixed64Map this(%v) Not Equal that(%v)", len(this.Fixed64Map), len(that1.Fixed64Map)) + } + for i := range this.Fixed64Map { + if this.Fixed64Map[i] != that1.Fixed64Map[i] { + return fmt.Errorf("Fixed64Map this[%v](%v) Not Equal that[%v](%v)", i, this.Fixed64Map[i], i, that1.Fixed64Map[i]) + } + } + if len(this.Sfixed64Map) != len(that1.Sfixed64Map) { + return fmt.Errorf("Sfixed64Map this(%v) Not Equal that(%v)", len(this.Sfixed64Map), len(that1.Sfixed64Map)) + } + for i := range this.Sfixed64Map { + if this.Sfixed64Map[i] != that1.Sfixed64Map[i] { + return fmt.Errorf("Sfixed64Map this[%v](%v) Not Equal that[%v](%v)", i, this.Sfixed64Map[i], i, that1.Sfixed64Map[i]) + } + } + if len(this.BoolMap) != len(that1.BoolMap) { + return fmt.Errorf("BoolMap this(%v) Not Equal that(%v)", len(this.BoolMap), len(that1.BoolMap)) + } + for i := range this.BoolMap { + if this.BoolMap[i] != that1.BoolMap[i] { + return fmt.Errorf("BoolMap this[%v](%v) Not Equal that[%v](%v)", i, this.BoolMap[i], i, that1.BoolMap[i]) + } + } + if len(this.StringMap) != len(that1.StringMap) { + return fmt.Errorf("StringMap this(%v) Not Equal that(%v)", len(this.StringMap), len(that1.StringMap)) + } + for i := range this.StringMap { + if this.StringMap[i] != that1.StringMap[i] { + return fmt.Errorf("StringMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringMap[i], i, that1.StringMap[i]) + } + } + if len(this.StringToBytesMap) != len(that1.StringToBytesMap) { + return fmt.Errorf("StringToBytesMap this(%v) Not Equal that(%v)", len(this.StringToBytesMap), len(that1.StringToBytesMap)) + } + for i := range this.StringToBytesMap { + if !bytes.Equal(this.StringToBytesMap[i], that1.StringToBytesMap[i]) { + return fmt.Errorf("StringToBytesMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringToBytesMap[i], i, that1.StringToBytesMap[i]) + } + } + if len(this.StringToEnumMap) != len(that1.StringToEnumMap) { + return fmt.Errorf("StringToEnumMap this(%v) Not Equal that(%v)", len(this.StringToEnumMap), len(that1.StringToEnumMap)) + } + for i := range this.StringToEnumMap { + if this.StringToEnumMap[i] != that1.StringToEnumMap[i] { + return fmt.Errorf("StringToEnumMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringToEnumMap[i], i, that1.StringToEnumMap[i]) + } + } + if len(this.StringToMsgMap) != len(that1.StringToMsgMap) { + return fmt.Errorf("StringToMsgMap this(%v) Not Equal that(%v)", len(this.StringToMsgMap), len(that1.StringToMsgMap)) + } + for i := range this.StringToMsgMap { + if !this.StringToMsgMap[i].Equal(that1.StringToMsgMap[i]) { + return fmt.Errorf("StringToMsgMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringToMsgMap[i], i, that1.StringToMsgMap[i]) + } + } + return nil +} +func (this *AllMapsOrdered) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*AllMapsOrdered) + if !ok { + that2, ok := that.(AllMapsOrdered) + 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.StringToDoubleMap) != len(that1.StringToDoubleMap) { + return false + } + for i := range this.StringToDoubleMap { + if this.StringToDoubleMap[i] != that1.StringToDoubleMap[i] { + return false + } + } + if len(this.StringToFloatMap) != len(that1.StringToFloatMap) { + return false + } + for i := range this.StringToFloatMap { + if this.StringToFloatMap[i] != that1.StringToFloatMap[i] { + return false + } + } + if len(this.Int32Map) != len(that1.Int32Map) { + return false + } + for i := range this.Int32Map { + if this.Int32Map[i] != that1.Int32Map[i] { + return false + } + } + if len(this.Int64Map) != len(that1.Int64Map) { + return false + } + for i := range this.Int64Map { + if this.Int64Map[i] != that1.Int64Map[i] { + return false + } + } + if len(this.Uint32Map) != len(that1.Uint32Map) { + return false + } + for i := range this.Uint32Map { + if this.Uint32Map[i] != that1.Uint32Map[i] { + return false + } + } + if len(this.Uint64Map) != len(that1.Uint64Map) { + return false + } + for i := range this.Uint64Map { + if this.Uint64Map[i] != that1.Uint64Map[i] { + return false + } + } + if len(this.Sint32Map) != len(that1.Sint32Map) { + return false + } + for i := range this.Sint32Map { + if this.Sint32Map[i] != that1.Sint32Map[i] { + return false + } + } + if len(this.Sint64Map) != len(that1.Sint64Map) { + return false + } + for i := range this.Sint64Map { + if this.Sint64Map[i] != that1.Sint64Map[i] { + return false + } + } + if len(this.Fixed32Map) != len(that1.Fixed32Map) { + return false + } + for i := range this.Fixed32Map { + if this.Fixed32Map[i] != that1.Fixed32Map[i] { + return false + } + } + if len(this.Sfixed32Map) != len(that1.Sfixed32Map) { + return false + } + for i := range this.Sfixed32Map { + if this.Sfixed32Map[i] != that1.Sfixed32Map[i] { + return false + } + } + if len(this.Fixed64Map) != len(that1.Fixed64Map) { + return false + } + for i := range this.Fixed64Map { + if this.Fixed64Map[i] != that1.Fixed64Map[i] { + return false + } + } + if len(this.Sfixed64Map) != len(that1.Sfixed64Map) { + return false + } + for i := range this.Sfixed64Map { + if this.Sfixed64Map[i] != that1.Sfixed64Map[i] { + return false + } + } + if len(this.BoolMap) != len(that1.BoolMap) { + return false + } + for i := range this.BoolMap { + if this.BoolMap[i] != that1.BoolMap[i] { + return false + } + } + if len(this.StringMap) != len(that1.StringMap) { + return false + } + for i := range this.StringMap { + if this.StringMap[i] != that1.StringMap[i] { + return false + } + } + if len(this.StringToBytesMap) != len(that1.StringToBytesMap) { + return false + } + for i := range this.StringToBytesMap { + if !bytes.Equal(this.StringToBytesMap[i], that1.StringToBytesMap[i]) { + return false + } + } + if len(this.StringToEnumMap) != len(that1.StringToEnumMap) { + return false + } + for i := range this.StringToEnumMap { + if this.StringToEnumMap[i] != that1.StringToEnumMap[i] { + return false + } + } + if len(this.StringToMsgMap) != len(that1.StringToMsgMap) { + return false + } + for i := range this.StringToMsgMap { + if !this.StringToMsgMap[i].Equal(that1.StringToMsgMap[i]) { + return false + } + } + return true +} +func (this *MessageWithMap) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*MessageWithMap) + if !ok { + that2, ok := that.(MessageWithMap) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *MessageWithMap") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *MessageWithMap but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *MessageWithMap but is not nil && this == nil") + } + if len(this.NameMapping) != len(that1.NameMapping) { + return fmt.Errorf("NameMapping this(%v) Not Equal that(%v)", len(this.NameMapping), len(that1.NameMapping)) + } + for i := range this.NameMapping { + if this.NameMapping[i] != that1.NameMapping[i] { + return fmt.Errorf("NameMapping this[%v](%v) Not Equal that[%v](%v)", i, this.NameMapping[i], i, that1.NameMapping[i]) + } + } + if len(this.MsgMapping) != len(that1.MsgMapping) { + return fmt.Errorf("MsgMapping this(%v) Not Equal that(%v)", len(this.MsgMapping), len(that1.MsgMapping)) + } + for i := range this.MsgMapping { + if !this.MsgMapping[i].Equal(that1.MsgMapping[i]) { + return fmt.Errorf("MsgMapping this[%v](%v) Not Equal that[%v](%v)", i, this.MsgMapping[i], i, that1.MsgMapping[i]) + } + } + if len(this.ByteMapping) != len(that1.ByteMapping) { + return fmt.Errorf("ByteMapping this(%v) Not Equal that(%v)", len(this.ByteMapping), len(that1.ByteMapping)) + } + for i := range this.ByteMapping { + if !bytes.Equal(this.ByteMapping[i], that1.ByteMapping[i]) { + return fmt.Errorf("ByteMapping this[%v](%v) Not Equal that[%v](%v)", i, this.ByteMapping[i], i, that1.ByteMapping[i]) + } + } + return nil +} +func (this *MessageWithMap) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*MessageWithMap) + if !ok { + that2, ok := that.(MessageWithMap) + 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.NameMapping) != len(that1.NameMapping) { + return false + } + for i := range this.NameMapping { + if this.NameMapping[i] != that1.NameMapping[i] { + return false + } + } + if len(this.MsgMapping) != len(that1.MsgMapping) { + return false + } + for i := range this.MsgMapping { + if !this.MsgMapping[i].Equal(that1.MsgMapping[i]) { + return false + } + } + if len(this.ByteMapping) != len(that1.ByteMapping) { + return false + } + for i := range this.ByteMapping { + if !bytes.Equal(this.ByteMapping[i], that1.ByteMapping[i]) { + return false + } + } + return true +} +func (this *FloatingPoint) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*FloatingPoint) + if !ok { + that2, ok := that.(FloatingPoint) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *FloatingPoint") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *FloatingPoint but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *FloatingPoint but is not nil && this == nil") + } + if this.F != that1.F { + return fmt.Errorf("F this(%v) Not Equal that(%v)", this.F, that1.F) + } + return nil +} +func (this *FloatingPoint) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*FloatingPoint) + if !ok { + that2, ok := that.(FloatingPoint) + 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.F != that1.F { + return false + } + return true +} +func (this *Uint128Pair) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*Uint128Pair) + if !ok { + that2, ok := that.(Uint128Pair) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *Uint128Pair") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *Uint128Pair but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *Uint128Pair but is not nil && this == nil") + } + if !this.Left.Equal(that1.Left) { + return fmt.Errorf("Left this(%v) Not Equal that(%v)", this.Left, that1.Left) + } + if that1.Right == nil { + if this.Right != nil { + return fmt.Errorf("this.Right != nil && that1.Right == nil") + } + } else if !this.Right.Equal(*that1.Right) { + return fmt.Errorf("Right this(%v) Not Equal that(%v)", this.Right, that1.Right) + } + return nil +} +func (this *Uint128Pair) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*Uint128Pair) + if !ok { + that2, ok := that.(Uint128Pair) + 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.Left.Equal(that1.Left) { + return false + } + if that1.Right == nil { + if this.Right != nil { + return false + } + } else if !this.Right.Equal(*that1.Right) { + return false + } + return true +} +func (this *ContainsNestedMap) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*ContainsNestedMap) + if !ok { + that2, ok := that.(ContainsNestedMap) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *ContainsNestedMap") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *ContainsNestedMap but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *ContainsNestedMap but is not nil && this == nil") + } + return nil +} +func (this *ContainsNestedMap) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*ContainsNestedMap) + if !ok { + that2, ok := that.(ContainsNestedMap) + 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 *ContainsNestedMap_NestedMap) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*ContainsNestedMap_NestedMap) + if !ok { + that2, ok := that.(ContainsNestedMap_NestedMap) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *ContainsNestedMap_NestedMap") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *ContainsNestedMap_NestedMap but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *ContainsNestedMap_NestedMap but is not nil && this == nil") + } + if len(this.NestedMapField) != len(that1.NestedMapField) { + return fmt.Errorf("NestedMapField this(%v) Not Equal that(%v)", len(this.NestedMapField), len(that1.NestedMapField)) + } + for i := range this.NestedMapField { + if this.NestedMapField[i] != that1.NestedMapField[i] { + return fmt.Errorf("NestedMapField this[%v](%v) Not Equal that[%v](%v)", i, this.NestedMapField[i], i, that1.NestedMapField[i]) + } + } + return nil +} +func (this *ContainsNestedMap_NestedMap) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*ContainsNestedMap_NestedMap) + if !ok { + that2, ok := that.(ContainsNestedMap_NestedMap) + 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.NestedMapField) != len(that1.NestedMapField) { + return false + } + for i := range this.NestedMapField { + if this.NestedMapField[i] != that1.NestedMapField[i] { + return false + } + } + return true +} + +type MessageFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetName() string + GetHilarity() Message_Humour + GetHeightInCm() uint32 + GetData() []byte + GetResultCount() int64 + GetTrueScotsman() bool + GetScore() float32 + GetKey() []uint64 + GetNested() *Nested + GetTerrain() map[int64]*Nested + GetProto2Field() *test.NinOptNative + GetProto2Value() map[int64]*test.NinOptEnum +} + +func (this *Message) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *Message) TestProto() github_com_gogo_protobuf_proto.Message { + return NewMessageFromFace(this) +} + +func (this *Message) GetName() string { + return this.Name +} + +func (this *Message) GetHilarity() Message_Humour { + return this.Hilarity +} + +func (this *Message) GetHeightInCm() uint32 { + return this.HeightInCm +} + +func (this *Message) GetData() []byte { + return this.Data +} + +func (this *Message) GetResultCount() int64 { + return this.ResultCount +} + +func (this *Message) GetTrueScotsman() bool { + return this.TrueScotsman +} + +func (this *Message) GetScore() float32 { + return this.Score +} + +func (this *Message) GetKey() []uint64 { + return this.Key +} + +func (this *Message) GetNested() *Nested { + return this.Nested +} + +func (this *Message) GetTerrain() map[int64]*Nested { + return this.Terrain +} + +func (this *Message) GetProto2Field() *test.NinOptNative { + return this.Proto2Field +} + +func (this *Message) GetProto2Value() map[int64]*test.NinOptEnum { + return this.Proto2Value +} + +func NewMessageFromFace(that MessageFace) *Message { + this := &Message{} + this.Name = that.GetName() + this.Hilarity = that.GetHilarity() + this.HeightInCm = that.GetHeightInCm() + this.Data = that.GetData() + this.ResultCount = that.GetResultCount() + this.TrueScotsman = that.GetTrueScotsman() + this.Score = that.GetScore() + this.Key = that.GetKey() + this.Nested = that.GetNested() + this.Terrain = that.GetTerrain() + this.Proto2Field = that.GetProto2Field() + this.Proto2Value = that.GetProto2Value() + return this +} + +type NestedFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetBunny() string +} + +func (this *Nested) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *Nested) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNestedFromFace(this) +} + +func (this *Nested) GetBunny() string { + return this.Bunny +} + +func NewNestedFromFace(that NestedFace) *Nested { + this := &Nested{} + this.Bunny = that.GetBunny() + return this +} + +type AllMapsFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetStringToDoubleMap() map[string]float64 + GetStringToFloatMap() map[string]float32 + GetInt32Map() map[int32]int32 + GetInt64Map() map[int64]int64 + GetUint32Map() map[uint32]uint32 + GetUint64Map() map[uint64]uint64 + GetSint32Map() map[int32]int32 + GetSint64Map() map[int64]int64 + GetFixed32Map() map[uint32]uint32 + GetSfixed32Map() map[int32]int32 + GetFixed64Map() map[uint64]uint64 + GetSfixed64Map() map[int64]int64 + GetBoolMap() map[bool]bool + GetStringMap() map[string]string + GetStringToBytesMap() map[string][]byte + GetStringToEnumMap() map[string]MapEnum + GetStringToMsgMap() map[string]*FloatingPoint +} + +func (this *AllMaps) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *AllMaps) TestProto() github_com_gogo_protobuf_proto.Message { + return NewAllMapsFromFace(this) +} + +func (this *AllMaps) GetStringToDoubleMap() map[string]float64 { + return this.StringToDoubleMap +} + +func (this *AllMaps) GetStringToFloatMap() map[string]float32 { + return this.StringToFloatMap +} + +func (this *AllMaps) GetInt32Map() map[int32]int32 { + return this.Int32Map +} + +func (this *AllMaps) GetInt64Map() map[int64]int64 { + return this.Int64Map +} + +func (this *AllMaps) GetUint32Map() map[uint32]uint32 { + return this.Uint32Map +} + +func (this *AllMaps) GetUint64Map() map[uint64]uint64 { + return this.Uint64Map +} + +func (this *AllMaps) GetSint32Map() map[int32]int32 { + return this.Sint32Map +} + +func (this *AllMaps) GetSint64Map() map[int64]int64 { + return this.Sint64Map +} + +func (this *AllMaps) GetFixed32Map() map[uint32]uint32 { + return this.Fixed32Map +} + +func (this *AllMaps) GetSfixed32Map() map[int32]int32 { + return this.Sfixed32Map +} + +func (this *AllMaps) GetFixed64Map() map[uint64]uint64 { + return this.Fixed64Map +} + +func (this *AllMaps) GetSfixed64Map() map[int64]int64 { + return this.Sfixed64Map +} + +func (this *AllMaps) GetBoolMap() map[bool]bool { + return this.BoolMap +} + +func (this *AllMaps) GetStringMap() map[string]string { + return this.StringMap +} + +func (this *AllMaps) GetStringToBytesMap() map[string][]byte { + return this.StringToBytesMap +} + +func (this *AllMaps) GetStringToEnumMap() map[string]MapEnum { + return this.StringToEnumMap +} + +func (this *AllMaps) GetStringToMsgMap() map[string]*FloatingPoint { + return this.StringToMsgMap +} + +func NewAllMapsFromFace(that AllMapsFace) *AllMaps { + this := &AllMaps{} + this.StringToDoubleMap = that.GetStringToDoubleMap() + this.StringToFloatMap = that.GetStringToFloatMap() + this.Int32Map = that.GetInt32Map() + this.Int64Map = that.GetInt64Map() + this.Uint32Map = that.GetUint32Map() + this.Uint64Map = that.GetUint64Map() + this.Sint32Map = that.GetSint32Map() + this.Sint64Map = that.GetSint64Map() + this.Fixed32Map = that.GetFixed32Map() + this.Sfixed32Map = that.GetSfixed32Map() + this.Fixed64Map = that.GetFixed64Map() + this.Sfixed64Map = that.GetSfixed64Map() + this.BoolMap = that.GetBoolMap() + this.StringMap = that.GetStringMap() + this.StringToBytesMap = that.GetStringToBytesMap() + this.StringToEnumMap = that.GetStringToEnumMap() + this.StringToMsgMap = that.GetStringToMsgMap() + return this +} + +type AllMapsOrderedFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetStringToDoubleMap() map[string]float64 + GetStringToFloatMap() map[string]float32 + GetInt32Map() map[int32]int32 + GetInt64Map() map[int64]int64 + GetUint32Map() map[uint32]uint32 + GetUint64Map() map[uint64]uint64 + GetSint32Map() map[int32]int32 + GetSint64Map() map[int64]int64 + GetFixed32Map() map[uint32]uint32 + GetSfixed32Map() map[int32]int32 + GetFixed64Map() map[uint64]uint64 + GetSfixed64Map() map[int64]int64 + GetBoolMap() map[bool]bool + GetStringMap() map[string]string + GetStringToBytesMap() map[string][]byte + GetStringToEnumMap() map[string]MapEnum + GetStringToMsgMap() map[string]*FloatingPoint +} + +func (this *AllMapsOrdered) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *AllMapsOrdered) TestProto() github_com_gogo_protobuf_proto.Message { + return NewAllMapsOrderedFromFace(this) +} + +func (this *AllMapsOrdered) GetStringToDoubleMap() map[string]float64 { + return this.StringToDoubleMap +} + +func (this *AllMapsOrdered) GetStringToFloatMap() map[string]float32 { + return this.StringToFloatMap +} + +func (this *AllMapsOrdered) GetInt32Map() map[int32]int32 { + return this.Int32Map +} + +func (this *AllMapsOrdered) GetInt64Map() map[int64]int64 { + return this.Int64Map +} + +func (this *AllMapsOrdered) GetUint32Map() map[uint32]uint32 { + return this.Uint32Map +} + +func (this *AllMapsOrdered) GetUint64Map() map[uint64]uint64 { + return this.Uint64Map +} + +func (this *AllMapsOrdered) GetSint32Map() map[int32]int32 { + return this.Sint32Map +} + +func (this *AllMapsOrdered) GetSint64Map() map[int64]int64 { + return this.Sint64Map +} + +func (this *AllMapsOrdered) GetFixed32Map() map[uint32]uint32 { + return this.Fixed32Map +} + +func (this *AllMapsOrdered) GetSfixed32Map() map[int32]int32 { + return this.Sfixed32Map +} + +func (this *AllMapsOrdered) GetFixed64Map() map[uint64]uint64 { + return this.Fixed64Map +} + +func (this *AllMapsOrdered) GetSfixed64Map() map[int64]int64 { + return this.Sfixed64Map +} + +func (this *AllMapsOrdered) GetBoolMap() map[bool]bool { + return this.BoolMap +} + +func (this *AllMapsOrdered) GetStringMap() map[string]string { + return this.StringMap +} + +func (this *AllMapsOrdered) GetStringToBytesMap() map[string][]byte { + return this.StringToBytesMap +} + +func (this *AllMapsOrdered) GetStringToEnumMap() map[string]MapEnum { + return this.StringToEnumMap +} + +func (this *AllMapsOrdered) GetStringToMsgMap() map[string]*FloatingPoint { + return this.StringToMsgMap +} + +func NewAllMapsOrderedFromFace(that AllMapsOrderedFace) *AllMapsOrdered { + this := &AllMapsOrdered{} + this.StringToDoubleMap = that.GetStringToDoubleMap() + this.StringToFloatMap = that.GetStringToFloatMap() + this.Int32Map = that.GetInt32Map() + this.Int64Map = that.GetInt64Map() + this.Uint32Map = that.GetUint32Map() + this.Uint64Map = that.GetUint64Map() + this.Sint32Map = that.GetSint32Map() + this.Sint64Map = that.GetSint64Map() + this.Fixed32Map = that.GetFixed32Map() + this.Sfixed32Map = that.GetSfixed32Map() + this.Fixed64Map = that.GetFixed64Map() + this.Sfixed64Map = that.GetSfixed64Map() + this.BoolMap = that.GetBoolMap() + this.StringMap = that.GetStringMap() + this.StringToBytesMap = that.GetStringToBytesMap() + this.StringToEnumMap = that.GetStringToEnumMap() + this.StringToMsgMap = that.GetStringToMsgMap() + return this +} + +type MessageWithMapFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetNameMapping() map[int32]string + GetMsgMapping() map[int64]*FloatingPoint + GetByteMapping() map[bool][]byte +} + +func (this *MessageWithMap) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *MessageWithMap) TestProto() github_com_gogo_protobuf_proto.Message { + return NewMessageWithMapFromFace(this) +} + +func (this *MessageWithMap) GetNameMapping() map[int32]string { + return this.NameMapping +} + +func (this *MessageWithMap) GetMsgMapping() map[int64]*FloatingPoint { + return this.MsgMapping +} + +func (this *MessageWithMap) GetByteMapping() map[bool][]byte { + return this.ByteMapping +} + +func NewMessageWithMapFromFace(that MessageWithMapFace) *MessageWithMap { + this := &MessageWithMap{} + this.NameMapping = that.GetNameMapping() + this.MsgMapping = that.GetMsgMapping() + this.ByteMapping = that.GetByteMapping() + return this +} + +type FloatingPointFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetF() float64 +} + +func (this *FloatingPoint) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *FloatingPoint) TestProto() github_com_gogo_protobuf_proto.Message { + return NewFloatingPointFromFace(this) +} + +func (this *FloatingPoint) GetF() float64 { + return this.F +} + +func NewFloatingPointFromFace(that FloatingPointFace) *FloatingPoint { + this := &FloatingPoint{} + this.F = that.GetF() + return this +} + +type Uint128PairFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetLeft() github_com_gogo_protobuf_test_custom.Uint128 + GetRight() *github_com_gogo_protobuf_test_custom.Uint128 +} + +func (this *Uint128Pair) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *Uint128Pair) TestProto() github_com_gogo_protobuf_proto.Message { + return NewUint128PairFromFace(this) +} + +func (this *Uint128Pair) GetLeft() github_com_gogo_protobuf_test_custom.Uint128 { + return this.Left +} + +func (this *Uint128Pair) GetRight() *github_com_gogo_protobuf_test_custom.Uint128 { + return this.Right +} + +func NewUint128PairFromFace(that Uint128PairFace) *Uint128Pair { + this := &Uint128Pair{} + this.Left = that.GetLeft() + this.Right = that.GetRight() + return this +} + +type ContainsNestedMapFace interface { + Proto() github_com_gogo_protobuf_proto.Message +} + +func (this *ContainsNestedMap) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *ContainsNestedMap) TestProto() github_com_gogo_protobuf_proto.Message { + return NewContainsNestedMapFromFace(this) +} + +func NewContainsNestedMapFromFace(that ContainsNestedMapFace) *ContainsNestedMap { + this := &ContainsNestedMap{} + return this +} + +type ContainsNestedMap_NestedMapFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetNestedMapField() map[string]float64 +} + +func (this *ContainsNestedMap_NestedMap) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *ContainsNestedMap_NestedMap) TestProto() github_com_gogo_protobuf_proto.Message { + return NewContainsNestedMap_NestedMapFromFace(this) +} + +func (this *ContainsNestedMap_NestedMap) GetNestedMapField() map[string]float64 { + return this.NestedMapField +} + +func NewContainsNestedMap_NestedMapFromFace(that ContainsNestedMap_NestedMapFace) *ContainsNestedMap_NestedMap { + this := &ContainsNestedMap_NestedMap{} + this.NestedMapField = that.GetNestedMapField() + return this +} + +func (this *Message) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 16) + s = append(s, "&theproto3.Message{") + s = append(s, "Name: "+fmt.Sprintf("%#v", this.Name)+",\n") + s = append(s, "Hilarity: "+fmt.Sprintf("%#v", this.Hilarity)+",\n") + s = append(s, "HeightInCm: "+fmt.Sprintf("%#v", this.HeightInCm)+",\n") + s = append(s, "Data: "+fmt.Sprintf("%#v", this.Data)+",\n") + s = append(s, "ResultCount: "+fmt.Sprintf("%#v", this.ResultCount)+",\n") + s = append(s, "TrueScotsman: "+fmt.Sprintf("%#v", this.TrueScotsman)+",\n") + s = append(s, "Score: "+fmt.Sprintf("%#v", this.Score)+",\n") + s = append(s, "Key: "+fmt.Sprintf("%#v", this.Key)+",\n") + if this.Nested != nil { + s = append(s, "Nested: "+fmt.Sprintf("%#v", this.Nested)+",\n") + } + keysForTerrain := make([]int64, 0, len(this.Terrain)) + for k := range this.Terrain { + keysForTerrain = append(keysForTerrain, k) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForTerrain) + mapStringForTerrain := "map[int64]*Nested{" + for _, k := range keysForTerrain { + mapStringForTerrain += fmt.Sprintf("%#v: %#v,", k, this.Terrain[k]) + } + mapStringForTerrain += "}" + if this.Terrain != nil { + s = append(s, "Terrain: "+mapStringForTerrain+",\n") + } + if this.Proto2Field != nil { + s = append(s, "Proto2Field: "+fmt.Sprintf("%#v", this.Proto2Field)+",\n") + } + keysForProto2Value := make([]int64, 0, len(this.Proto2Value)) + for k := range this.Proto2Value { + keysForProto2Value = append(keysForProto2Value, k) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForProto2Value) + mapStringForProto2Value := "map[int64]*test.NinOptEnum{" + for _, k := range keysForProto2Value { + mapStringForProto2Value += fmt.Sprintf("%#v: %#v,", k, this.Proto2Value[k]) + } + mapStringForProto2Value += "}" + if this.Proto2Value != nil { + s = append(s, "Proto2Value: "+mapStringForProto2Value+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *Nested) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&theproto3.Nested{") + s = append(s, "Bunny: "+fmt.Sprintf("%#v", this.Bunny)+",\n") + s = append(s, "}") + return strings.Join(s, "") +} +func (this *AllMaps) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 21) + s = append(s, "&theproto3.AllMaps{") + keysForStringToDoubleMap := make([]string, 0, len(this.StringToDoubleMap)) + for k := range this.StringToDoubleMap { + keysForStringToDoubleMap = append(keysForStringToDoubleMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToDoubleMap) + mapStringForStringToDoubleMap := "map[string]float64{" + for _, k := range keysForStringToDoubleMap { + mapStringForStringToDoubleMap += fmt.Sprintf("%#v: %#v,", k, this.StringToDoubleMap[k]) + } + mapStringForStringToDoubleMap += "}" + if this.StringToDoubleMap != nil { + s = append(s, "StringToDoubleMap: "+mapStringForStringToDoubleMap+",\n") + } + keysForStringToFloatMap := make([]string, 0, len(this.StringToFloatMap)) + for k := range this.StringToFloatMap { + keysForStringToFloatMap = append(keysForStringToFloatMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToFloatMap) + mapStringForStringToFloatMap := "map[string]float32{" + for _, k := range keysForStringToFloatMap { + mapStringForStringToFloatMap += fmt.Sprintf("%#v: %#v,", k, this.StringToFloatMap[k]) + } + mapStringForStringToFloatMap += "}" + if this.StringToFloatMap != nil { + s = append(s, "StringToFloatMap: "+mapStringForStringToFloatMap+",\n") + } + keysForInt32Map := make([]int32, 0, len(this.Int32Map)) + for k := range this.Int32Map { + keysForInt32Map = append(keysForInt32Map, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForInt32Map) + mapStringForInt32Map := "map[int32]int32{" + for _, k := range keysForInt32Map { + mapStringForInt32Map += fmt.Sprintf("%#v: %#v,", k, this.Int32Map[k]) + } + mapStringForInt32Map += "}" + if this.Int32Map != nil { + s = append(s, "Int32Map: "+mapStringForInt32Map+",\n") + } + keysForInt64Map := make([]int64, 0, len(this.Int64Map)) + for k := range this.Int64Map { + keysForInt64Map = append(keysForInt64Map, k) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForInt64Map) + mapStringForInt64Map := "map[int64]int64{" + for _, k := range keysForInt64Map { + mapStringForInt64Map += fmt.Sprintf("%#v: %#v,", k, this.Int64Map[k]) + } + mapStringForInt64Map += "}" + if this.Int64Map != nil { + s = append(s, "Int64Map: "+mapStringForInt64Map+",\n") + } + keysForUint32Map := make([]uint32, 0, len(this.Uint32Map)) + for k := range this.Uint32Map { + keysForUint32Map = append(keysForUint32Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint32s(keysForUint32Map) + mapStringForUint32Map := "map[uint32]uint32{" + for _, k := range keysForUint32Map { + mapStringForUint32Map += fmt.Sprintf("%#v: %#v,", k, this.Uint32Map[k]) + } + mapStringForUint32Map += "}" + if this.Uint32Map != nil { + s = append(s, "Uint32Map: "+mapStringForUint32Map+",\n") + } + keysForUint64Map := make([]uint64, 0, len(this.Uint64Map)) + for k := range this.Uint64Map { + keysForUint64Map = append(keysForUint64Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint64s(keysForUint64Map) + mapStringForUint64Map := "map[uint64]uint64{" + for _, k := range keysForUint64Map { + mapStringForUint64Map += fmt.Sprintf("%#v: %#v,", k, this.Uint64Map[k]) + } + mapStringForUint64Map += "}" + if this.Uint64Map != nil { + s = append(s, "Uint64Map: "+mapStringForUint64Map+",\n") + } + keysForSint32Map := make([]int32, 0, len(this.Sint32Map)) + for k := range this.Sint32Map { + keysForSint32Map = append(keysForSint32Map, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForSint32Map) + mapStringForSint32Map := "map[int32]int32{" + for _, k := range keysForSint32Map { + mapStringForSint32Map += fmt.Sprintf("%#v: %#v,", k, this.Sint32Map[k]) + } + mapStringForSint32Map += "}" + if this.Sint32Map != nil { + s = append(s, "Sint32Map: "+mapStringForSint32Map+",\n") + } + keysForSint64Map := make([]int64, 0, len(this.Sint64Map)) + for k := range this.Sint64Map { + keysForSint64Map = append(keysForSint64Map, k) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForSint64Map) + mapStringForSint64Map := "map[int64]int64{" + for _, k := range keysForSint64Map { + mapStringForSint64Map += fmt.Sprintf("%#v: %#v,", k, this.Sint64Map[k]) + } + mapStringForSint64Map += "}" + if this.Sint64Map != nil { + s = append(s, "Sint64Map: "+mapStringForSint64Map+",\n") + } + keysForFixed32Map := make([]uint32, 0, len(this.Fixed32Map)) + for k := range this.Fixed32Map { + keysForFixed32Map = append(keysForFixed32Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint32s(keysForFixed32Map) + mapStringForFixed32Map := "map[uint32]uint32{" + for _, k := range keysForFixed32Map { + mapStringForFixed32Map += fmt.Sprintf("%#v: %#v,", k, this.Fixed32Map[k]) + } + mapStringForFixed32Map += "}" + if this.Fixed32Map != nil { + s = append(s, "Fixed32Map: "+mapStringForFixed32Map+",\n") + } + keysForSfixed32Map := make([]int32, 0, len(this.Sfixed32Map)) + for k := range this.Sfixed32Map { + keysForSfixed32Map = append(keysForSfixed32Map, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForSfixed32Map) + mapStringForSfixed32Map := "map[int32]int32{" + for _, k := range keysForSfixed32Map { + mapStringForSfixed32Map += fmt.Sprintf("%#v: %#v,", k, this.Sfixed32Map[k]) + } + mapStringForSfixed32Map += "}" + if this.Sfixed32Map != nil { + s = append(s, "Sfixed32Map: "+mapStringForSfixed32Map+",\n") + } + keysForFixed64Map := make([]uint64, 0, len(this.Fixed64Map)) + for k := range this.Fixed64Map { + keysForFixed64Map = append(keysForFixed64Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint64s(keysForFixed64Map) + mapStringForFixed64Map := "map[uint64]uint64{" + for _, k := range keysForFixed64Map { + mapStringForFixed64Map += fmt.Sprintf("%#v: %#v,", k, this.Fixed64Map[k]) + } + mapStringForFixed64Map += "}" + if this.Fixed64Map != nil { + s = append(s, "Fixed64Map: "+mapStringForFixed64Map+",\n") + } + keysForSfixed64Map := make([]int64, 0, len(this.Sfixed64Map)) + for k := range this.Sfixed64Map { + keysForSfixed64Map = append(keysForSfixed64Map, k) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForSfixed64Map) + mapStringForSfixed64Map := "map[int64]int64{" + for _, k := range keysForSfixed64Map { + mapStringForSfixed64Map += fmt.Sprintf("%#v: %#v,", k, this.Sfixed64Map[k]) + } + mapStringForSfixed64Map += "}" + if this.Sfixed64Map != nil { + s = append(s, "Sfixed64Map: "+mapStringForSfixed64Map+",\n") + } + keysForBoolMap := make([]bool, 0, len(this.BoolMap)) + for k := range this.BoolMap { + keysForBoolMap = append(keysForBoolMap, k) + } + github_com_gogo_protobuf_sortkeys.Bools(keysForBoolMap) + mapStringForBoolMap := "map[bool]bool{" + for _, k := range keysForBoolMap { + mapStringForBoolMap += fmt.Sprintf("%#v: %#v,", k, this.BoolMap[k]) + } + mapStringForBoolMap += "}" + if this.BoolMap != nil { + s = append(s, "BoolMap: "+mapStringForBoolMap+",\n") + } + keysForStringMap := make([]string, 0, len(this.StringMap)) + for k := range this.StringMap { + keysForStringMap = append(keysForStringMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringMap) + mapStringForStringMap := "map[string]string{" + for _, k := range keysForStringMap { + mapStringForStringMap += fmt.Sprintf("%#v: %#v,", k, this.StringMap[k]) + } + mapStringForStringMap += "}" + if this.StringMap != nil { + s = append(s, "StringMap: "+mapStringForStringMap+",\n") + } + keysForStringToBytesMap := make([]string, 0, len(this.StringToBytesMap)) + for k := range this.StringToBytesMap { + keysForStringToBytesMap = append(keysForStringToBytesMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToBytesMap) + mapStringForStringToBytesMap := "map[string][]byte{" + for _, k := range keysForStringToBytesMap { + mapStringForStringToBytesMap += fmt.Sprintf("%#v: %#v,", k, this.StringToBytesMap[k]) + } + mapStringForStringToBytesMap += "}" + if this.StringToBytesMap != nil { + s = append(s, "StringToBytesMap: "+mapStringForStringToBytesMap+",\n") + } + keysForStringToEnumMap := make([]string, 0, len(this.StringToEnumMap)) + for k := range this.StringToEnumMap { + keysForStringToEnumMap = append(keysForStringToEnumMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToEnumMap) + mapStringForStringToEnumMap := "map[string]MapEnum{" + for _, k := range keysForStringToEnumMap { + mapStringForStringToEnumMap += fmt.Sprintf("%#v: %#v,", k, this.StringToEnumMap[k]) + } + mapStringForStringToEnumMap += "}" + if this.StringToEnumMap != nil { + s = append(s, "StringToEnumMap: "+mapStringForStringToEnumMap+",\n") + } + keysForStringToMsgMap := make([]string, 0, len(this.StringToMsgMap)) + for k := range this.StringToMsgMap { + keysForStringToMsgMap = append(keysForStringToMsgMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToMsgMap) + mapStringForStringToMsgMap := "map[string]*FloatingPoint{" + for _, k := range keysForStringToMsgMap { + mapStringForStringToMsgMap += fmt.Sprintf("%#v: %#v,", k, this.StringToMsgMap[k]) + } + mapStringForStringToMsgMap += "}" + if this.StringToMsgMap != nil { + s = append(s, "StringToMsgMap: "+mapStringForStringToMsgMap+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *AllMapsOrdered) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 21) + s = append(s, "&theproto3.AllMapsOrdered{") + keysForStringToDoubleMap := make([]string, 0, len(this.StringToDoubleMap)) + for k := range this.StringToDoubleMap { + keysForStringToDoubleMap = append(keysForStringToDoubleMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToDoubleMap) + mapStringForStringToDoubleMap := "map[string]float64{" + for _, k := range keysForStringToDoubleMap { + mapStringForStringToDoubleMap += fmt.Sprintf("%#v: %#v,", k, this.StringToDoubleMap[k]) + } + mapStringForStringToDoubleMap += "}" + if this.StringToDoubleMap != nil { + s = append(s, "StringToDoubleMap: "+mapStringForStringToDoubleMap+",\n") + } + keysForStringToFloatMap := make([]string, 0, len(this.StringToFloatMap)) + for k := range this.StringToFloatMap { + keysForStringToFloatMap = append(keysForStringToFloatMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToFloatMap) + mapStringForStringToFloatMap := "map[string]float32{" + for _, k := range keysForStringToFloatMap { + mapStringForStringToFloatMap += fmt.Sprintf("%#v: %#v,", k, this.StringToFloatMap[k]) + } + mapStringForStringToFloatMap += "}" + if this.StringToFloatMap != nil { + s = append(s, "StringToFloatMap: "+mapStringForStringToFloatMap+",\n") + } + keysForInt32Map := make([]int32, 0, len(this.Int32Map)) + for k := range this.Int32Map { + keysForInt32Map = append(keysForInt32Map, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForInt32Map) + mapStringForInt32Map := "map[int32]int32{" + for _, k := range keysForInt32Map { + mapStringForInt32Map += fmt.Sprintf("%#v: %#v,", k, this.Int32Map[k]) + } + mapStringForInt32Map += "}" + if this.Int32Map != nil { + s = append(s, "Int32Map: "+mapStringForInt32Map+",\n") + } + keysForInt64Map := make([]int64, 0, len(this.Int64Map)) + for k := range this.Int64Map { + keysForInt64Map = append(keysForInt64Map, k) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForInt64Map) + mapStringForInt64Map := "map[int64]int64{" + for _, k := range keysForInt64Map { + mapStringForInt64Map += fmt.Sprintf("%#v: %#v,", k, this.Int64Map[k]) + } + mapStringForInt64Map += "}" + if this.Int64Map != nil { + s = append(s, "Int64Map: "+mapStringForInt64Map+",\n") + } + keysForUint32Map := make([]uint32, 0, len(this.Uint32Map)) + for k := range this.Uint32Map { + keysForUint32Map = append(keysForUint32Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint32s(keysForUint32Map) + mapStringForUint32Map := "map[uint32]uint32{" + for _, k := range keysForUint32Map { + mapStringForUint32Map += fmt.Sprintf("%#v: %#v,", k, this.Uint32Map[k]) + } + mapStringForUint32Map += "}" + if this.Uint32Map != nil { + s = append(s, "Uint32Map: "+mapStringForUint32Map+",\n") + } + keysForUint64Map := make([]uint64, 0, len(this.Uint64Map)) + for k := range this.Uint64Map { + keysForUint64Map = append(keysForUint64Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint64s(keysForUint64Map) + mapStringForUint64Map := "map[uint64]uint64{" + for _, k := range keysForUint64Map { + mapStringForUint64Map += fmt.Sprintf("%#v: %#v,", k, this.Uint64Map[k]) + } + mapStringForUint64Map += "}" + if this.Uint64Map != nil { + s = append(s, "Uint64Map: "+mapStringForUint64Map+",\n") + } + keysForSint32Map := make([]int32, 0, len(this.Sint32Map)) + for k := range this.Sint32Map { + keysForSint32Map = append(keysForSint32Map, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForSint32Map) + mapStringForSint32Map := "map[int32]int32{" + for _, k := range keysForSint32Map { + mapStringForSint32Map += fmt.Sprintf("%#v: %#v,", k, this.Sint32Map[k]) + } + mapStringForSint32Map += "}" + if this.Sint32Map != nil { + s = append(s, "Sint32Map: "+mapStringForSint32Map+",\n") + } + keysForSint64Map := make([]int64, 0, len(this.Sint64Map)) + for k := range this.Sint64Map { + keysForSint64Map = append(keysForSint64Map, k) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForSint64Map) + mapStringForSint64Map := "map[int64]int64{" + for _, k := range keysForSint64Map { + mapStringForSint64Map += fmt.Sprintf("%#v: %#v,", k, this.Sint64Map[k]) + } + mapStringForSint64Map += "}" + if this.Sint64Map != nil { + s = append(s, "Sint64Map: "+mapStringForSint64Map+",\n") + } + keysForFixed32Map := make([]uint32, 0, len(this.Fixed32Map)) + for k := range this.Fixed32Map { + keysForFixed32Map = append(keysForFixed32Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint32s(keysForFixed32Map) + mapStringForFixed32Map := "map[uint32]uint32{" + for _, k := range keysForFixed32Map { + mapStringForFixed32Map += fmt.Sprintf("%#v: %#v,", k, this.Fixed32Map[k]) + } + mapStringForFixed32Map += "}" + if this.Fixed32Map != nil { + s = append(s, "Fixed32Map: "+mapStringForFixed32Map+",\n") + } + keysForSfixed32Map := make([]int32, 0, len(this.Sfixed32Map)) + for k := range this.Sfixed32Map { + keysForSfixed32Map = append(keysForSfixed32Map, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForSfixed32Map) + mapStringForSfixed32Map := "map[int32]int32{" + for _, k := range keysForSfixed32Map { + mapStringForSfixed32Map += fmt.Sprintf("%#v: %#v,", k, this.Sfixed32Map[k]) + } + mapStringForSfixed32Map += "}" + if this.Sfixed32Map != nil { + s = append(s, "Sfixed32Map: "+mapStringForSfixed32Map+",\n") + } + keysForFixed64Map := make([]uint64, 0, len(this.Fixed64Map)) + for k := range this.Fixed64Map { + keysForFixed64Map = append(keysForFixed64Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint64s(keysForFixed64Map) + mapStringForFixed64Map := "map[uint64]uint64{" + for _, k := range keysForFixed64Map { + mapStringForFixed64Map += fmt.Sprintf("%#v: %#v,", k, this.Fixed64Map[k]) + } + mapStringForFixed64Map += "}" + if this.Fixed64Map != nil { + s = append(s, "Fixed64Map: "+mapStringForFixed64Map+",\n") + } + keysForSfixed64Map := make([]int64, 0, len(this.Sfixed64Map)) + for k := range this.Sfixed64Map { + keysForSfixed64Map = append(keysForSfixed64Map, k) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForSfixed64Map) + mapStringForSfixed64Map := "map[int64]int64{" + for _, k := range keysForSfixed64Map { + mapStringForSfixed64Map += fmt.Sprintf("%#v: %#v,", k, this.Sfixed64Map[k]) + } + mapStringForSfixed64Map += "}" + if this.Sfixed64Map != nil { + s = append(s, "Sfixed64Map: "+mapStringForSfixed64Map+",\n") + } + keysForBoolMap := make([]bool, 0, len(this.BoolMap)) + for k := range this.BoolMap { + keysForBoolMap = append(keysForBoolMap, k) + } + github_com_gogo_protobuf_sortkeys.Bools(keysForBoolMap) + mapStringForBoolMap := "map[bool]bool{" + for _, k := range keysForBoolMap { + mapStringForBoolMap += fmt.Sprintf("%#v: %#v,", k, this.BoolMap[k]) + } + mapStringForBoolMap += "}" + if this.BoolMap != nil { + s = append(s, "BoolMap: "+mapStringForBoolMap+",\n") + } + keysForStringMap := make([]string, 0, len(this.StringMap)) + for k := range this.StringMap { + keysForStringMap = append(keysForStringMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringMap) + mapStringForStringMap := "map[string]string{" + for _, k := range keysForStringMap { + mapStringForStringMap += fmt.Sprintf("%#v: %#v,", k, this.StringMap[k]) + } + mapStringForStringMap += "}" + if this.StringMap != nil { + s = append(s, "StringMap: "+mapStringForStringMap+",\n") + } + keysForStringToBytesMap := make([]string, 0, len(this.StringToBytesMap)) + for k := range this.StringToBytesMap { + keysForStringToBytesMap = append(keysForStringToBytesMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToBytesMap) + mapStringForStringToBytesMap := "map[string][]byte{" + for _, k := range keysForStringToBytesMap { + mapStringForStringToBytesMap += fmt.Sprintf("%#v: %#v,", k, this.StringToBytesMap[k]) + } + mapStringForStringToBytesMap += "}" + if this.StringToBytesMap != nil { + s = append(s, "StringToBytesMap: "+mapStringForStringToBytesMap+",\n") + } + keysForStringToEnumMap := make([]string, 0, len(this.StringToEnumMap)) + for k := range this.StringToEnumMap { + keysForStringToEnumMap = append(keysForStringToEnumMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToEnumMap) + mapStringForStringToEnumMap := "map[string]MapEnum{" + for _, k := range keysForStringToEnumMap { + mapStringForStringToEnumMap += fmt.Sprintf("%#v: %#v,", k, this.StringToEnumMap[k]) + } + mapStringForStringToEnumMap += "}" + if this.StringToEnumMap != nil { + s = append(s, "StringToEnumMap: "+mapStringForStringToEnumMap+",\n") + } + keysForStringToMsgMap := make([]string, 0, len(this.StringToMsgMap)) + for k := range this.StringToMsgMap { + keysForStringToMsgMap = append(keysForStringToMsgMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToMsgMap) + mapStringForStringToMsgMap := "map[string]*FloatingPoint{" + for _, k := range keysForStringToMsgMap { + mapStringForStringToMsgMap += fmt.Sprintf("%#v: %#v,", k, this.StringToMsgMap[k]) + } + mapStringForStringToMsgMap += "}" + if this.StringToMsgMap != nil { + s = append(s, "StringToMsgMap: "+mapStringForStringToMsgMap+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *MessageWithMap) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 7) + s = append(s, "&theproto3.MessageWithMap{") + keysForNameMapping := make([]int32, 0, len(this.NameMapping)) + for k := range this.NameMapping { + keysForNameMapping = append(keysForNameMapping, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForNameMapping) + mapStringForNameMapping := "map[int32]string{" + for _, k := range keysForNameMapping { + mapStringForNameMapping += fmt.Sprintf("%#v: %#v,", k, this.NameMapping[k]) + } + mapStringForNameMapping += "}" + if this.NameMapping != nil { + s = append(s, "NameMapping: "+mapStringForNameMapping+",\n") + } + keysForMsgMapping := make([]int64, 0, len(this.MsgMapping)) + for k := range this.MsgMapping { + keysForMsgMapping = append(keysForMsgMapping, k) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForMsgMapping) + mapStringForMsgMapping := "map[int64]*FloatingPoint{" + for _, k := range keysForMsgMapping { + mapStringForMsgMapping += fmt.Sprintf("%#v: %#v,", k, this.MsgMapping[k]) + } + mapStringForMsgMapping += "}" + if this.MsgMapping != nil { + s = append(s, "MsgMapping: "+mapStringForMsgMapping+",\n") + } + keysForByteMapping := make([]bool, 0, len(this.ByteMapping)) + for k := range this.ByteMapping { + keysForByteMapping = append(keysForByteMapping, k) + } + github_com_gogo_protobuf_sortkeys.Bools(keysForByteMapping) + mapStringForByteMapping := "map[bool][]byte{" + for _, k := range keysForByteMapping { + mapStringForByteMapping += fmt.Sprintf("%#v: %#v,", k, this.ByteMapping[k]) + } + mapStringForByteMapping += "}" + if this.ByteMapping != nil { + s = append(s, "ByteMapping: "+mapStringForByteMapping+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *FloatingPoint) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&theproto3.FloatingPoint{") + s = append(s, "F: "+fmt.Sprintf("%#v", this.F)+",\n") + s = append(s, "}") + return strings.Join(s, "") +} +func (this *Uint128Pair) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 6) + s = append(s, "&theproto3.Uint128Pair{") + s = append(s, "Left: "+fmt.Sprintf("%#v", this.Left)+",\n") + s = append(s, "Right: "+fmt.Sprintf("%#v", this.Right)+",\n") + s = append(s, "}") + return strings.Join(s, "") +} +func (this *ContainsNestedMap) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 4) + s = append(s, "&theproto3.ContainsNestedMap{") + s = append(s, "}") + return strings.Join(s, "") +} +func (this *ContainsNestedMap_NestedMap) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&theproto3.ContainsNestedMap_NestedMap{") + keysForNestedMapField := make([]string, 0, len(this.NestedMapField)) + for k := range this.NestedMapField { + keysForNestedMapField = append(keysForNestedMapField, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForNestedMapField) + mapStringForNestedMapField := "map[string]float64{" + for _, k := range keysForNestedMapField { + mapStringForNestedMapField += fmt.Sprintf("%#v: %#v,", k, this.NestedMapField[k]) + } + mapStringForNestedMapField += "}" + if this.NestedMapField != nil { + s = append(s, "NestedMapField: "+mapStringForNestedMapField+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func valueToGoStringTheproto3(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 extensionToGoStringTheproto3(e map[int32]github_com_gogo_protobuf_proto.Extension) string { + if e == nil { + return "nil" + } + s := "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 +} +func (m *Message) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *Message) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Name) > 0 { + data[i] = 0xa + i++ + i = encodeVarintTheproto3(data, i, uint64(len(m.Name))) + i += copy(data[i:], m.Name) + } + if m.Hilarity != 0 { + data[i] = 0x10 + i++ + i = encodeVarintTheproto3(data, i, uint64(m.Hilarity)) + } + if m.HeightInCm != 0 { + data[i] = 0x18 + i++ + i = encodeVarintTheproto3(data, i, uint64(m.HeightInCm)) + } + if len(m.Data) > 0 { + data[i] = 0x22 + i++ + i = encodeVarintTheproto3(data, i, uint64(len(m.Data))) + i += copy(data[i:], m.Data) + } + if len(m.Key) > 0 { + for _, num := range m.Key { + data[i] = 0x28 + i++ + i = encodeVarintTheproto3(data, i, uint64(num)) + } + } + if m.Nested != nil { + data[i] = 0x32 + i++ + i = encodeVarintTheproto3(data, i, uint64(m.Nested.Size())) + n1, err := m.Nested.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n1 + } + if m.ResultCount != 0 { + data[i] = 0x38 + i++ + i = encodeVarintTheproto3(data, i, uint64(m.ResultCount)) + } + if m.TrueScotsman { + data[i] = 0x40 + i++ + if m.TrueScotsman { + data[i] = 1 + } else { + data[i] = 0 + } + i++ + } + if m.Score != 0 { + data[i] = 0x4d + i++ + i = encodeFixed32Theproto3(data, i, uint32(math.Float32bits(float32(m.Score)))) + } + if len(m.Terrain) > 0 { + for k := range m.Terrain { + data[i] = 0x52 + i++ + v := m.Terrain[k] + if v == nil { + return 0, errors.New("proto: map has nil element") + } + msgSize := v.Size() + mapSize := 1 + sovTheproto3(uint64(k)) + 1 + msgSize + sovTheproto3(uint64(msgSize)) + i = encodeVarintTheproto3(data, i, uint64(mapSize)) + data[i] = 0x8 + i++ + i = encodeVarintTheproto3(data, i, uint64(k)) + data[i] = 0x12 + i++ + i = encodeVarintTheproto3(data, i, uint64(v.Size())) + n2, err := v.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n2 + } + } + if m.Proto2Field != nil { + data[i] = 0x5a + i++ + i = encodeVarintTheproto3(data, i, uint64(m.Proto2Field.Size())) + n3, err := m.Proto2Field.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n3 + } + if len(m.Proto2Value) > 0 { + for k := range m.Proto2Value { + data[i] = 0x6a + i++ + v := m.Proto2Value[k] + if v == nil { + return 0, errors.New("proto: map has nil element") + } + msgSize := v.Size() + mapSize := 1 + sovTheproto3(uint64(k)) + 1 + msgSize + sovTheproto3(uint64(msgSize)) + i = encodeVarintTheproto3(data, i, uint64(mapSize)) + data[i] = 0x8 + i++ + i = encodeVarintTheproto3(data, i, uint64(k)) + data[i] = 0x12 + i++ + i = encodeVarintTheproto3(data, i, uint64(v.Size())) + n4, err := v.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n4 + } + } + return i, nil +} + +func (m *Nested) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *Nested) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Bunny) > 0 { + data[i] = 0xa + i++ + i = encodeVarintTheproto3(data, i, uint64(len(m.Bunny))) + i += copy(data[i:], m.Bunny) + } + return i, nil +} + +func (m *AllMaps) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *AllMaps) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.StringToDoubleMap) > 0 { + for k := range m.StringToDoubleMap { + data[i] = 0xa + i++ + v := m.StringToDoubleMap[k] + mapSize := 1 + len(k) + sovTheproto3(uint64(len(k))) + 1 + 8 + i = encodeVarintTheproto3(data, i, uint64(mapSize)) + data[i] = 0xa + i++ + i = encodeVarintTheproto3(data, i, uint64(len(k))) + i += copy(data[i:], k) + data[i] = 0x11 + i++ + i = encodeFixed64Theproto3(data, i, uint64(math.Float64bits(float64(v)))) + } + } + if len(m.StringToFloatMap) > 0 { + for k := range m.StringToFloatMap { + data[i] = 0x12 + i++ + v := m.StringToFloatMap[k] + mapSize := 1 + len(k) + sovTheproto3(uint64(len(k))) + 1 + 4 + i = encodeVarintTheproto3(data, i, uint64(mapSize)) + data[i] = 0xa + i++ + i = encodeVarintTheproto3(data, i, uint64(len(k))) + i += copy(data[i:], k) + data[i] = 0x15 + i++ + i = encodeFixed32Theproto3(data, i, uint32(math.Float32bits(float32(v)))) + } + } + if len(m.Int32Map) > 0 { + for k := range m.Int32Map { + data[i] = 0x1a + i++ + v := m.Int32Map[k] + mapSize := 1 + sovTheproto3(uint64(k)) + 1 + sovTheproto3(uint64(v)) + i = encodeVarintTheproto3(data, i, uint64(mapSize)) + data[i] = 0x8 + i++ + i = encodeVarintTheproto3(data, i, uint64(k)) + data[i] = 0x10 + i++ + i = encodeVarintTheproto3(data, i, uint64(v)) + } + } + if len(m.Int64Map) > 0 { + for k := range m.Int64Map { + data[i] = 0x22 + i++ + v := m.Int64Map[k] + mapSize := 1 + sovTheproto3(uint64(k)) + 1 + sovTheproto3(uint64(v)) + i = encodeVarintTheproto3(data, i, uint64(mapSize)) + data[i] = 0x8 + i++ + i = encodeVarintTheproto3(data, i, uint64(k)) + data[i] = 0x10 + i++ + i = encodeVarintTheproto3(data, i, uint64(v)) + } + } + if len(m.Uint32Map) > 0 { + for k := range m.Uint32Map { + data[i] = 0x2a + i++ + v := m.Uint32Map[k] + mapSize := 1 + sovTheproto3(uint64(k)) + 1 + sovTheproto3(uint64(v)) + i = encodeVarintTheproto3(data, i, uint64(mapSize)) + data[i] = 0x8 + i++ + i = encodeVarintTheproto3(data, i, uint64(k)) + data[i] = 0x10 + i++ + i = encodeVarintTheproto3(data, i, uint64(v)) + } + } + if len(m.Uint64Map) > 0 { + for k := range m.Uint64Map { + data[i] = 0x32 + i++ + v := m.Uint64Map[k] + mapSize := 1 + sovTheproto3(uint64(k)) + 1 + sovTheproto3(uint64(v)) + i = encodeVarintTheproto3(data, i, uint64(mapSize)) + data[i] = 0x8 + i++ + i = encodeVarintTheproto3(data, i, uint64(k)) + data[i] = 0x10 + i++ + i = encodeVarintTheproto3(data, i, uint64(v)) + } + } + if len(m.Sint32Map) > 0 { + for k := range m.Sint32Map { + data[i] = 0x3a + i++ + v := m.Sint32Map[k] + mapSize := 1 + sozTheproto3(uint64(k)) + 1 + sozTheproto3(uint64(v)) + i = encodeVarintTheproto3(data, i, uint64(mapSize)) + data[i] = 0x8 + i++ + i = encodeVarintTheproto3(data, i, uint64((uint32(k)<<1)^uint32((k>>31)))) + data[i] = 0x10 + i++ + i = encodeVarintTheproto3(data, i, uint64((uint32(v)<<1)^uint32((v>>31)))) + } + } + if len(m.Sint64Map) > 0 { + for k := range m.Sint64Map { + data[i] = 0x42 + i++ + v := m.Sint64Map[k] + mapSize := 1 + sozTheproto3(uint64(k)) + 1 + sozTheproto3(uint64(v)) + i = encodeVarintTheproto3(data, i, uint64(mapSize)) + data[i] = 0x8 + i++ + i = encodeVarintTheproto3(data, i, uint64((uint64(k)<<1)^uint64((k>>63)))) + data[i] = 0x10 + i++ + i = encodeVarintTheproto3(data, i, uint64((uint64(v)<<1)^uint64((v>>63)))) + } + } + if len(m.Fixed32Map) > 0 { + for k := range m.Fixed32Map { + data[i] = 0x4a + i++ + v := m.Fixed32Map[k] + mapSize := 1 + 4 + 1 + 4 + i = encodeVarintTheproto3(data, i, uint64(mapSize)) + data[i] = 0xd + i++ + i = encodeFixed32Theproto3(data, i, uint32(k)) + data[i] = 0x15 + i++ + i = encodeFixed32Theproto3(data, i, uint32(v)) + } + } + if len(m.Sfixed32Map) > 0 { + for k := range m.Sfixed32Map { + data[i] = 0x52 + i++ + v := m.Sfixed32Map[k] + mapSize := 1 + 4 + 1 + 4 + i = encodeVarintTheproto3(data, i, uint64(mapSize)) + data[i] = 0xd + i++ + i = encodeFixed32Theproto3(data, i, uint32(k)) + data[i] = 0x15 + i++ + i = encodeFixed32Theproto3(data, i, uint32(v)) + } + } + if len(m.Fixed64Map) > 0 { + for k := range m.Fixed64Map { + data[i] = 0x5a + i++ + v := m.Fixed64Map[k] + mapSize := 1 + 8 + 1 + 8 + i = encodeVarintTheproto3(data, i, uint64(mapSize)) + data[i] = 0x9 + i++ + i = encodeFixed64Theproto3(data, i, uint64(k)) + data[i] = 0x11 + i++ + i = encodeFixed64Theproto3(data, i, uint64(v)) + } + } + if len(m.Sfixed64Map) > 0 { + for k := range m.Sfixed64Map { + data[i] = 0x62 + i++ + v := m.Sfixed64Map[k] + mapSize := 1 + 8 + 1 + 8 + i = encodeVarintTheproto3(data, i, uint64(mapSize)) + data[i] = 0x9 + i++ + i = encodeFixed64Theproto3(data, i, uint64(k)) + data[i] = 0x11 + i++ + i = encodeFixed64Theproto3(data, i, uint64(v)) + } + } + if len(m.BoolMap) > 0 { + for k := range m.BoolMap { + data[i] = 0x6a + i++ + v := m.BoolMap[k] + mapSize := 1 + 1 + 1 + 1 + i = encodeVarintTheproto3(data, i, uint64(mapSize)) + data[i] = 0x8 + i++ + if k { + data[i] = 1 + } else { + data[i] = 0 + } + i++ + data[i] = 0x10 + i++ + if v { + data[i] = 1 + } else { + data[i] = 0 + } + i++ + } + } + if len(m.StringMap) > 0 { + for k := range m.StringMap { + data[i] = 0x72 + i++ + v := m.StringMap[k] + mapSize := 1 + len(k) + sovTheproto3(uint64(len(k))) + 1 + len(v) + sovTheproto3(uint64(len(v))) + i = encodeVarintTheproto3(data, i, uint64(mapSize)) + data[i] = 0xa + i++ + i = encodeVarintTheproto3(data, i, uint64(len(k))) + i += copy(data[i:], k) + data[i] = 0x12 + i++ + i = encodeVarintTheproto3(data, i, uint64(len(v))) + i += copy(data[i:], v) + } + } + if len(m.StringToBytesMap) > 0 { + for k := range m.StringToBytesMap { + data[i] = 0x7a + i++ + v := m.StringToBytesMap[k] + mapSize := 1 + len(k) + sovTheproto3(uint64(len(k))) + 1 + len(v) + sovTheproto3(uint64(len(v))) + i = encodeVarintTheproto3(data, i, uint64(mapSize)) + data[i] = 0xa + i++ + i = encodeVarintTheproto3(data, i, uint64(len(k))) + i += copy(data[i:], k) + data[i] = 0x12 + i++ + i = encodeVarintTheproto3(data, i, uint64(len(v))) + i += copy(data[i:], v) + } + } + if len(m.StringToEnumMap) > 0 { + for k := range m.StringToEnumMap { + data[i] = 0x82 + i++ + data[i] = 0x1 + i++ + v := m.StringToEnumMap[k] + mapSize := 1 + len(k) + sovTheproto3(uint64(len(k))) + 1 + sovTheproto3(uint64(v)) + i = encodeVarintTheproto3(data, i, uint64(mapSize)) + data[i] = 0xa + i++ + i = encodeVarintTheproto3(data, i, uint64(len(k))) + i += copy(data[i:], k) + data[i] = 0x10 + i++ + i = encodeVarintTheproto3(data, i, uint64(v)) + } + } + if len(m.StringToMsgMap) > 0 { + for k := range m.StringToMsgMap { + data[i] = 0x8a + i++ + data[i] = 0x1 + i++ + v := m.StringToMsgMap[k] + if v == nil { + return 0, errors.New("proto: map has nil element") + } + msgSize := v.Size() + mapSize := 1 + len(k) + sovTheproto3(uint64(len(k))) + 1 + msgSize + sovTheproto3(uint64(msgSize)) + i = encodeVarintTheproto3(data, i, uint64(mapSize)) + data[i] = 0xa + i++ + i = encodeVarintTheproto3(data, i, uint64(len(k))) + i += copy(data[i:], k) + data[i] = 0x12 + i++ + i = encodeVarintTheproto3(data, i, uint64(v.Size())) + n5, err := v.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n5 + } + } + return i, nil +} + +func (m *AllMapsOrdered) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *AllMapsOrdered) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.StringToDoubleMap) > 0 { + keysForStringToDoubleMap := make([]string, 0, len(m.StringToDoubleMap)) + for k := range m.StringToDoubleMap { + keysForStringToDoubleMap = append(keysForStringToDoubleMap, string(k)) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToDoubleMap) + for _, k := range keysForStringToDoubleMap { + data[i] = 0xa + i++ + v := m.StringToDoubleMap[string(k)] + mapSize := 1 + len(k) + sovTheproto3(uint64(len(k))) + 1 + 8 + i = encodeVarintTheproto3(data, i, uint64(mapSize)) + data[i] = 0xa + i++ + i = encodeVarintTheproto3(data, i, uint64(len(k))) + i += copy(data[i:], k) + data[i] = 0x11 + i++ + i = encodeFixed64Theproto3(data, i, uint64(math.Float64bits(float64(v)))) + } + } + if len(m.StringToFloatMap) > 0 { + keysForStringToFloatMap := make([]string, 0, len(m.StringToFloatMap)) + for k := range m.StringToFloatMap { + keysForStringToFloatMap = append(keysForStringToFloatMap, string(k)) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToFloatMap) + for _, k := range keysForStringToFloatMap { + data[i] = 0x12 + i++ + v := m.StringToFloatMap[string(k)] + mapSize := 1 + len(k) + sovTheproto3(uint64(len(k))) + 1 + 4 + i = encodeVarintTheproto3(data, i, uint64(mapSize)) + data[i] = 0xa + i++ + i = encodeVarintTheproto3(data, i, uint64(len(k))) + i += copy(data[i:], k) + data[i] = 0x15 + i++ + i = encodeFixed32Theproto3(data, i, uint32(math.Float32bits(float32(v)))) + } + } + if len(m.Int32Map) > 0 { + keysForInt32Map := make([]int32, 0, len(m.Int32Map)) + for k := range m.Int32Map { + keysForInt32Map = append(keysForInt32Map, int32(k)) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForInt32Map) + for _, k := range keysForInt32Map { + data[i] = 0x1a + i++ + v := m.Int32Map[int32(k)] + mapSize := 1 + sovTheproto3(uint64(k)) + 1 + sovTheproto3(uint64(v)) + i = encodeVarintTheproto3(data, i, uint64(mapSize)) + data[i] = 0x8 + i++ + i = encodeVarintTheproto3(data, i, uint64(k)) + data[i] = 0x10 + i++ + i = encodeVarintTheproto3(data, i, uint64(v)) + } + } + if len(m.Int64Map) > 0 { + keysForInt64Map := make([]int64, 0, len(m.Int64Map)) + for k := range m.Int64Map { + keysForInt64Map = append(keysForInt64Map, int64(k)) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForInt64Map) + for _, k := range keysForInt64Map { + data[i] = 0x22 + i++ + v := m.Int64Map[int64(k)] + mapSize := 1 + sovTheproto3(uint64(k)) + 1 + sovTheproto3(uint64(v)) + i = encodeVarintTheproto3(data, i, uint64(mapSize)) + data[i] = 0x8 + i++ + i = encodeVarintTheproto3(data, i, uint64(k)) + data[i] = 0x10 + i++ + i = encodeVarintTheproto3(data, i, uint64(v)) + } + } + if len(m.Uint32Map) > 0 { + keysForUint32Map := make([]uint32, 0, len(m.Uint32Map)) + for k := range m.Uint32Map { + keysForUint32Map = append(keysForUint32Map, uint32(k)) + } + github_com_gogo_protobuf_sortkeys.Uint32s(keysForUint32Map) + for _, k := range keysForUint32Map { + data[i] = 0x2a + i++ + v := m.Uint32Map[uint32(k)] + mapSize := 1 + sovTheproto3(uint64(k)) + 1 + sovTheproto3(uint64(v)) + i = encodeVarintTheproto3(data, i, uint64(mapSize)) + data[i] = 0x8 + i++ + i = encodeVarintTheproto3(data, i, uint64(k)) + data[i] = 0x10 + i++ + i = encodeVarintTheproto3(data, i, uint64(v)) + } + } + if len(m.Uint64Map) > 0 { + keysForUint64Map := make([]uint64, 0, len(m.Uint64Map)) + for k := range m.Uint64Map { + keysForUint64Map = append(keysForUint64Map, uint64(k)) + } + github_com_gogo_protobuf_sortkeys.Uint64s(keysForUint64Map) + for _, k := range keysForUint64Map { + data[i] = 0x32 + i++ + v := m.Uint64Map[uint64(k)] + mapSize := 1 + sovTheproto3(uint64(k)) + 1 + sovTheproto3(uint64(v)) + i = encodeVarintTheproto3(data, i, uint64(mapSize)) + data[i] = 0x8 + i++ + i = encodeVarintTheproto3(data, i, uint64(k)) + data[i] = 0x10 + i++ + i = encodeVarintTheproto3(data, i, uint64(v)) + } + } + if len(m.Sint32Map) > 0 { + keysForSint32Map := make([]int32, 0, len(m.Sint32Map)) + for k := range m.Sint32Map { + keysForSint32Map = append(keysForSint32Map, int32(k)) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForSint32Map) + for _, k := range keysForSint32Map { + data[i] = 0x3a + i++ + v := m.Sint32Map[int32(k)] + mapSize := 1 + sozTheproto3(uint64(k)) + 1 + sozTheproto3(uint64(v)) + i = encodeVarintTheproto3(data, i, uint64(mapSize)) + data[i] = 0x8 + i++ + i = encodeVarintTheproto3(data, i, uint64((uint32(k)<<1)^uint32((k>>31)))) + data[i] = 0x10 + i++ + i = encodeVarintTheproto3(data, i, uint64((uint32(v)<<1)^uint32((v>>31)))) + } + } + if len(m.Sint64Map) > 0 { + keysForSint64Map := make([]int64, 0, len(m.Sint64Map)) + for k := range m.Sint64Map { + keysForSint64Map = append(keysForSint64Map, int64(k)) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForSint64Map) + for _, k := range keysForSint64Map { + data[i] = 0x42 + i++ + v := m.Sint64Map[int64(k)] + mapSize := 1 + sozTheproto3(uint64(k)) + 1 + sozTheproto3(uint64(v)) + i = encodeVarintTheproto3(data, i, uint64(mapSize)) + data[i] = 0x8 + i++ + i = encodeVarintTheproto3(data, i, uint64((uint64(k)<<1)^uint64((k>>63)))) + data[i] = 0x10 + i++ + i = encodeVarintTheproto3(data, i, uint64((uint64(v)<<1)^uint64((v>>63)))) + } + } + if len(m.Fixed32Map) > 0 { + keysForFixed32Map := make([]uint32, 0, len(m.Fixed32Map)) + for k := range m.Fixed32Map { + keysForFixed32Map = append(keysForFixed32Map, uint32(k)) + } + github_com_gogo_protobuf_sortkeys.Uint32s(keysForFixed32Map) + for _, k := range keysForFixed32Map { + data[i] = 0x4a + i++ + v := m.Fixed32Map[uint32(k)] + mapSize := 1 + 4 + 1 + 4 + i = encodeVarintTheproto3(data, i, uint64(mapSize)) + data[i] = 0xd + i++ + i = encodeFixed32Theproto3(data, i, uint32(k)) + data[i] = 0x15 + i++ + i = encodeFixed32Theproto3(data, i, uint32(v)) + } + } + if len(m.Sfixed32Map) > 0 { + keysForSfixed32Map := make([]int32, 0, len(m.Sfixed32Map)) + for k := range m.Sfixed32Map { + keysForSfixed32Map = append(keysForSfixed32Map, int32(k)) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForSfixed32Map) + for _, k := range keysForSfixed32Map { + data[i] = 0x52 + i++ + v := m.Sfixed32Map[int32(k)] + mapSize := 1 + 4 + 1 + 4 + i = encodeVarintTheproto3(data, i, uint64(mapSize)) + data[i] = 0xd + i++ + i = encodeFixed32Theproto3(data, i, uint32(k)) + data[i] = 0x15 + i++ + i = encodeFixed32Theproto3(data, i, uint32(v)) + } + } + if len(m.Fixed64Map) > 0 { + keysForFixed64Map := make([]uint64, 0, len(m.Fixed64Map)) + for k := range m.Fixed64Map { + keysForFixed64Map = append(keysForFixed64Map, uint64(k)) + } + github_com_gogo_protobuf_sortkeys.Uint64s(keysForFixed64Map) + for _, k := range keysForFixed64Map { + data[i] = 0x5a + i++ + v := m.Fixed64Map[uint64(k)] + mapSize := 1 + 8 + 1 + 8 + i = encodeVarintTheproto3(data, i, uint64(mapSize)) + data[i] = 0x9 + i++ + i = encodeFixed64Theproto3(data, i, uint64(k)) + data[i] = 0x11 + i++ + i = encodeFixed64Theproto3(data, i, uint64(v)) + } + } + if len(m.Sfixed64Map) > 0 { + keysForSfixed64Map := make([]int64, 0, len(m.Sfixed64Map)) + for k := range m.Sfixed64Map { + keysForSfixed64Map = append(keysForSfixed64Map, int64(k)) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForSfixed64Map) + for _, k := range keysForSfixed64Map { + data[i] = 0x62 + i++ + v := m.Sfixed64Map[int64(k)] + mapSize := 1 + 8 + 1 + 8 + i = encodeVarintTheproto3(data, i, uint64(mapSize)) + data[i] = 0x9 + i++ + i = encodeFixed64Theproto3(data, i, uint64(k)) + data[i] = 0x11 + i++ + i = encodeFixed64Theproto3(data, i, uint64(v)) + } + } + if len(m.BoolMap) > 0 { + keysForBoolMap := make([]bool, 0, len(m.BoolMap)) + for k := range m.BoolMap { + keysForBoolMap = append(keysForBoolMap, bool(k)) + } + github_com_gogo_protobuf_sortkeys.Bools(keysForBoolMap) + for _, k := range keysForBoolMap { + data[i] = 0x6a + i++ + v := m.BoolMap[bool(k)] + mapSize := 1 + 1 + 1 + 1 + i = encodeVarintTheproto3(data, i, uint64(mapSize)) + data[i] = 0x8 + i++ + if k { + data[i] = 1 + } else { + data[i] = 0 + } + i++ + data[i] = 0x10 + i++ + if v { + data[i] = 1 + } else { + data[i] = 0 + } + i++ + } + } + if len(m.StringMap) > 0 { + keysForStringMap := make([]string, 0, len(m.StringMap)) + for k := range m.StringMap { + keysForStringMap = append(keysForStringMap, string(k)) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringMap) + for _, k := range keysForStringMap { + data[i] = 0x72 + i++ + v := m.StringMap[string(k)] + mapSize := 1 + len(k) + sovTheproto3(uint64(len(k))) + 1 + len(v) + sovTheproto3(uint64(len(v))) + i = encodeVarintTheproto3(data, i, uint64(mapSize)) + data[i] = 0xa + i++ + i = encodeVarintTheproto3(data, i, uint64(len(k))) + i += copy(data[i:], k) + data[i] = 0x12 + i++ + i = encodeVarintTheproto3(data, i, uint64(len(v))) + i += copy(data[i:], v) + } + } + if len(m.StringToBytesMap) > 0 { + keysForStringToBytesMap := make([]string, 0, len(m.StringToBytesMap)) + for k := range m.StringToBytesMap { + keysForStringToBytesMap = append(keysForStringToBytesMap, string(k)) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToBytesMap) + for _, k := range keysForStringToBytesMap { + data[i] = 0x7a + i++ + v := m.StringToBytesMap[string(k)] + mapSize := 1 + len(k) + sovTheproto3(uint64(len(k))) + 1 + len(v) + sovTheproto3(uint64(len(v))) + i = encodeVarintTheproto3(data, i, uint64(mapSize)) + data[i] = 0xa + i++ + i = encodeVarintTheproto3(data, i, uint64(len(k))) + i += copy(data[i:], k) + data[i] = 0x12 + i++ + i = encodeVarintTheproto3(data, i, uint64(len(v))) + i += copy(data[i:], v) + } + } + if len(m.StringToEnumMap) > 0 { + keysForStringToEnumMap := make([]string, 0, len(m.StringToEnumMap)) + for k := range m.StringToEnumMap { + keysForStringToEnumMap = append(keysForStringToEnumMap, string(k)) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToEnumMap) + for _, k := range keysForStringToEnumMap { + data[i] = 0x82 + i++ + data[i] = 0x1 + i++ + v := m.StringToEnumMap[string(k)] + mapSize := 1 + len(k) + sovTheproto3(uint64(len(k))) + 1 + sovTheproto3(uint64(v)) + i = encodeVarintTheproto3(data, i, uint64(mapSize)) + data[i] = 0xa + i++ + i = encodeVarintTheproto3(data, i, uint64(len(k))) + i += copy(data[i:], k) + data[i] = 0x10 + i++ + i = encodeVarintTheproto3(data, i, uint64(v)) + } + } + if len(m.StringToMsgMap) > 0 { + keysForStringToMsgMap := make([]string, 0, len(m.StringToMsgMap)) + for k := range m.StringToMsgMap { + keysForStringToMsgMap = append(keysForStringToMsgMap, string(k)) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToMsgMap) + for _, k := range keysForStringToMsgMap { + data[i] = 0x8a + i++ + data[i] = 0x1 + i++ + v := m.StringToMsgMap[string(k)] + if v == nil { + return 0, errors.New("proto: map has nil element") + } + msgSize := v.Size() + mapSize := 1 + len(k) + sovTheproto3(uint64(len(k))) + 1 + msgSize + sovTheproto3(uint64(msgSize)) + i = encodeVarintTheproto3(data, i, uint64(mapSize)) + data[i] = 0xa + i++ + i = encodeVarintTheproto3(data, i, uint64(len(k))) + i += copy(data[i:], k) + data[i] = 0x12 + i++ + i = encodeVarintTheproto3(data, i, uint64(v.Size())) + n6, err := v.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n6 + } + } + return i, nil +} + +func (m *MessageWithMap) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *MessageWithMap) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.NameMapping) > 0 { + for k := range m.NameMapping { + data[i] = 0xa + i++ + v := m.NameMapping[k] + mapSize := 1 + sovTheproto3(uint64(k)) + 1 + len(v) + sovTheproto3(uint64(len(v))) + i = encodeVarintTheproto3(data, i, uint64(mapSize)) + data[i] = 0x8 + i++ + i = encodeVarintTheproto3(data, i, uint64(k)) + data[i] = 0x12 + i++ + i = encodeVarintTheproto3(data, i, uint64(len(v))) + i += copy(data[i:], v) + } + } + if len(m.MsgMapping) > 0 { + for k := range m.MsgMapping { + data[i] = 0x12 + i++ + v := m.MsgMapping[k] + if v == nil { + return 0, errors.New("proto: map has nil element") + } + msgSize := v.Size() + mapSize := 1 + sozTheproto3(uint64(k)) + 1 + msgSize + sovTheproto3(uint64(msgSize)) + i = encodeVarintTheproto3(data, i, uint64(mapSize)) + data[i] = 0x8 + i++ + i = encodeVarintTheproto3(data, i, uint64((uint64(k)<<1)^uint64((k>>63)))) + data[i] = 0x12 + i++ + i = encodeVarintTheproto3(data, i, uint64(v.Size())) + n7, err := v.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n7 + } + } + if len(m.ByteMapping) > 0 { + for k := range m.ByteMapping { + data[i] = 0x1a + i++ + v := m.ByteMapping[k] + mapSize := 1 + 1 + 1 + len(v) + sovTheproto3(uint64(len(v))) + i = encodeVarintTheproto3(data, i, uint64(mapSize)) + data[i] = 0x8 + i++ + if k { + data[i] = 1 + } else { + data[i] = 0 + } + i++ + data[i] = 0x12 + i++ + i = encodeVarintTheproto3(data, i, uint64(len(v))) + i += copy(data[i:], v) + } + } + return i, nil +} + +func (m *FloatingPoint) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *FloatingPoint) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.F != 0 { + data[i] = 0x9 + i++ + i = encodeFixed64Theproto3(data, i, uint64(math.Float64bits(float64(m.F)))) + } + return i, nil +} + +func (m *Uint128Pair) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *Uint128Pair) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + data[i] = 0xa + i++ + i = encodeVarintTheproto3(data, i, uint64(m.Left.Size())) + n8, err := m.Left.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n8 + if m.Right != nil { + data[i] = 0x12 + i++ + i = encodeVarintTheproto3(data, i, uint64(m.Right.Size())) + n9, err := m.Right.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n9 + } + return i, nil +} + +func (m *ContainsNestedMap) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *ContainsNestedMap) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + return i, nil +} + +func (m *ContainsNestedMap_NestedMap) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *ContainsNestedMap_NestedMap) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.NestedMapField) > 0 { + for k := range m.NestedMapField { + data[i] = 0xa + i++ + v := m.NestedMapField[k] + mapSize := 1 + len(k) + sovTheproto3(uint64(len(k))) + 1 + 8 + i = encodeVarintTheproto3(data, i, uint64(mapSize)) + data[i] = 0xa + i++ + i = encodeVarintTheproto3(data, i, uint64(len(k))) + i += copy(data[i:], k) + data[i] = 0x11 + i++ + i = encodeFixed64Theproto3(data, i, uint64(math.Float64bits(float64(v)))) + } + } + return i, nil +} + +func encodeFixed64Theproto3(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 encodeFixed32Theproto3(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 encodeVarintTheproto3(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 NewPopulatedMessage(r randyTheproto3, easy bool) *Message { + this := &Message{} + this.Name = randStringTheproto3(r) + this.Hilarity = Message_Humour([]int32{0, 1, 2, 3}[r.Intn(4)]) + this.HeightInCm = uint32(r.Uint32()) + v1 := r.Intn(100) + this.Data = make([]byte, v1) + for i := 0; i < v1; i++ { + this.Data[i] = byte(r.Intn(256)) + } + v2 := r.Intn(10) + this.Key = make([]uint64, v2) + for i := 0; i < v2; i++ { + this.Key[i] = uint64(uint64(r.Uint32())) + } + if r.Intn(10) != 0 { + this.Nested = NewPopulatedNested(r, easy) + } + this.ResultCount = int64(r.Int63()) + if r.Intn(2) == 0 { + this.ResultCount *= -1 + } + this.TrueScotsman = bool(bool(r.Intn(2) == 0)) + this.Score = float32(r.Float32()) + if r.Intn(2) == 0 { + this.Score *= -1 + } + if r.Intn(10) != 0 { + v3 := r.Intn(10) + this.Terrain = make(map[int64]*Nested) + for i := 0; i < v3; i++ { + this.Terrain[int64(r.Int63())] = NewPopulatedNested(r, easy) + } + } + if r.Intn(10) != 0 { + this.Proto2Field = test.NewPopulatedNinOptNative(r, easy) + } + if r.Intn(10) != 0 { + v4 := r.Intn(10) + this.Proto2Value = make(map[int64]*test.NinOptEnum) + for i := 0; i < v4; i++ { + this.Proto2Value[int64(r.Int63())] = test.NewPopulatedNinOptEnum(r, easy) + } + } + if !easy && r.Intn(10) != 0 { + } + return this +} + +func NewPopulatedNested(r randyTheproto3, easy bool) *Nested { + this := &Nested{} + this.Bunny = randStringTheproto3(r) + if !easy && r.Intn(10) != 0 { + } + return this +} + +func NewPopulatedAllMaps(r randyTheproto3, easy bool) *AllMaps { + this := &AllMaps{} + if r.Intn(10) != 0 { + v5 := r.Intn(10) + this.StringToDoubleMap = make(map[string]float64) + for i := 0; i < v5; i++ { + v6 := randStringTheproto3(r) + this.StringToDoubleMap[v6] = float64(r.Float64()) + if r.Intn(2) == 0 { + this.StringToDoubleMap[v6] *= -1 + } + } + } + if r.Intn(10) != 0 { + v7 := r.Intn(10) + this.StringToFloatMap = make(map[string]float32) + for i := 0; i < v7; i++ { + v8 := randStringTheproto3(r) + this.StringToFloatMap[v8] = float32(r.Float32()) + if r.Intn(2) == 0 { + this.StringToFloatMap[v8] *= -1 + } + } + } + if r.Intn(10) != 0 { + v9 := r.Intn(10) + this.Int32Map = make(map[int32]int32) + for i := 0; i < v9; i++ { + v10 := int32(r.Int31()) + this.Int32Map[v10] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Int32Map[v10] *= -1 + } + } + } + if r.Intn(10) != 0 { + v11 := r.Intn(10) + this.Int64Map = make(map[int64]int64) + for i := 0; i < v11; i++ { + v12 := int64(r.Int63()) + this.Int64Map[v12] = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Int64Map[v12] *= -1 + } + } + } + if r.Intn(10) != 0 { + v13 := r.Intn(10) + this.Uint32Map = make(map[uint32]uint32) + for i := 0; i < v13; i++ { + v14 := uint32(r.Uint32()) + this.Uint32Map[v14] = uint32(r.Uint32()) + } + } + if r.Intn(10) != 0 { + v15 := r.Intn(10) + this.Uint64Map = make(map[uint64]uint64) + for i := 0; i < v15; i++ { + v16 := uint64(uint64(r.Uint32())) + this.Uint64Map[v16] = uint64(uint64(r.Uint32())) + } + } + if r.Intn(10) != 0 { + v17 := r.Intn(10) + this.Sint32Map = make(map[int32]int32) + for i := 0; i < v17; i++ { + v18 := int32(r.Int31()) + this.Sint32Map[v18] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Sint32Map[v18] *= -1 + } + } + } + if r.Intn(10) != 0 { + v19 := r.Intn(10) + this.Sint64Map = make(map[int64]int64) + for i := 0; i < v19; i++ { + v20 := int64(r.Int63()) + this.Sint64Map[v20] = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Sint64Map[v20] *= -1 + } + } + } + if r.Intn(10) != 0 { + v21 := r.Intn(10) + this.Fixed32Map = make(map[uint32]uint32) + for i := 0; i < v21; i++ { + v22 := uint32(r.Uint32()) + this.Fixed32Map[v22] = uint32(r.Uint32()) + } + } + if r.Intn(10) != 0 { + v23 := r.Intn(10) + this.Sfixed32Map = make(map[int32]int32) + for i := 0; i < v23; i++ { + v24 := int32(r.Int31()) + this.Sfixed32Map[v24] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Sfixed32Map[v24] *= -1 + } + } + } + if r.Intn(10) != 0 { + v25 := r.Intn(10) + this.Fixed64Map = make(map[uint64]uint64) + for i := 0; i < v25; i++ { + v26 := uint64(uint64(r.Uint32())) + this.Fixed64Map[v26] = uint64(uint64(r.Uint32())) + } + } + if r.Intn(10) != 0 { + v27 := r.Intn(10) + this.Sfixed64Map = make(map[int64]int64) + for i := 0; i < v27; i++ { + v28 := int64(r.Int63()) + this.Sfixed64Map[v28] = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Sfixed64Map[v28] *= -1 + } + } + } + if r.Intn(10) != 0 { + v29 := r.Intn(10) + this.BoolMap = make(map[bool]bool) + for i := 0; i < v29; i++ { + v30 := bool(bool(r.Intn(2) == 0)) + this.BoolMap[v30] = bool(bool(r.Intn(2) == 0)) + } + } + if r.Intn(10) != 0 { + v31 := r.Intn(10) + this.StringMap = make(map[string]string) + for i := 0; i < v31; i++ { + this.StringMap[randStringTheproto3(r)] = randStringTheproto3(r) + } + } + if r.Intn(10) != 0 { + v32 := r.Intn(10) + this.StringToBytesMap = make(map[string][]byte) + for i := 0; i < v32; i++ { + v33 := r.Intn(100) + v34 := randStringTheproto3(r) + this.StringToBytesMap[v34] = make([]byte, v33) + for i := 0; i < v33; i++ { + this.StringToBytesMap[v34][i] = byte(r.Intn(256)) + } + } + } + if r.Intn(10) != 0 { + v35 := r.Intn(10) + this.StringToEnumMap = make(map[string]MapEnum) + for i := 0; i < v35; i++ { + this.StringToEnumMap[randStringTheproto3(r)] = MapEnum([]int32{0, 1, 2}[r.Intn(3)]) + } + } + if r.Intn(10) != 0 { + v36 := r.Intn(10) + this.StringToMsgMap = make(map[string]*FloatingPoint) + for i := 0; i < v36; i++ { + this.StringToMsgMap[randStringTheproto3(r)] = NewPopulatedFloatingPoint(r, easy) + } + } + if !easy && r.Intn(10) != 0 { + } + return this +} + +func NewPopulatedAllMapsOrdered(r randyTheproto3, easy bool) *AllMapsOrdered { + this := &AllMapsOrdered{} + if r.Intn(10) != 0 { + v37 := r.Intn(10) + this.StringToDoubleMap = make(map[string]float64) + for i := 0; i < v37; i++ { + v38 := randStringTheproto3(r) + this.StringToDoubleMap[v38] = float64(r.Float64()) + if r.Intn(2) == 0 { + this.StringToDoubleMap[v38] *= -1 + } + } + } + if r.Intn(10) != 0 { + v39 := r.Intn(10) + this.StringToFloatMap = make(map[string]float32) + for i := 0; i < v39; i++ { + v40 := randStringTheproto3(r) + this.StringToFloatMap[v40] = float32(r.Float32()) + if r.Intn(2) == 0 { + this.StringToFloatMap[v40] *= -1 + } + } + } + if r.Intn(10) != 0 { + v41 := r.Intn(10) + this.Int32Map = make(map[int32]int32) + for i := 0; i < v41; i++ { + v42 := int32(r.Int31()) + this.Int32Map[v42] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Int32Map[v42] *= -1 + } + } + } + if r.Intn(10) != 0 { + v43 := r.Intn(10) + this.Int64Map = make(map[int64]int64) + for i := 0; i < v43; i++ { + v44 := int64(r.Int63()) + this.Int64Map[v44] = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Int64Map[v44] *= -1 + } + } + } + if r.Intn(10) != 0 { + v45 := r.Intn(10) + this.Uint32Map = make(map[uint32]uint32) + for i := 0; i < v45; i++ { + v46 := uint32(r.Uint32()) + this.Uint32Map[v46] = uint32(r.Uint32()) + } + } + if r.Intn(10) != 0 { + v47 := r.Intn(10) + this.Uint64Map = make(map[uint64]uint64) + for i := 0; i < v47; i++ { + v48 := uint64(uint64(r.Uint32())) + this.Uint64Map[v48] = uint64(uint64(r.Uint32())) + } + } + if r.Intn(10) != 0 { + v49 := r.Intn(10) + this.Sint32Map = make(map[int32]int32) + for i := 0; i < v49; i++ { + v50 := int32(r.Int31()) + this.Sint32Map[v50] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Sint32Map[v50] *= -1 + } + } + } + if r.Intn(10) != 0 { + v51 := r.Intn(10) + this.Sint64Map = make(map[int64]int64) + for i := 0; i < v51; i++ { + v52 := int64(r.Int63()) + this.Sint64Map[v52] = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Sint64Map[v52] *= -1 + } + } + } + if r.Intn(10) != 0 { + v53 := r.Intn(10) + this.Fixed32Map = make(map[uint32]uint32) + for i := 0; i < v53; i++ { + v54 := uint32(r.Uint32()) + this.Fixed32Map[v54] = uint32(r.Uint32()) + } + } + if r.Intn(10) != 0 { + v55 := r.Intn(10) + this.Sfixed32Map = make(map[int32]int32) + for i := 0; i < v55; i++ { + v56 := int32(r.Int31()) + this.Sfixed32Map[v56] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Sfixed32Map[v56] *= -1 + } + } + } + if r.Intn(10) != 0 { + v57 := r.Intn(10) + this.Fixed64Map = make(map[uint64]uint64) + for i := 0; i < v57; i++ { + v58 := uint64(uint64(r.Uint32())) + this.Fixed64Map[v58] = uint64(uint64(r.Uint32())) + } + } + if r.Intn(10) != 0 { + v59 := r.Intn(10) + this.Sfixed64Map = make(map[int64]int64) + for i := 0; i < v59; i++ { + v60 := int64(r.Int63()) + this.Sfixed64Map[v60] = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Sfixed64Map[v60] *= -1 + } + } + } + if r.Intn(10) != 0 { + v61 := r.Intn(10) + this.BoolMap = make(map[bool]bool) + for i := 0; i < v61; i++ { + v62 := bool(bool(r.Intn(2) == 0)) + this.BoolMap[v62] = bool(bool(r.Intn(2) == 0)) + } + } + if r.Intn(10) != 0 { + v63 := r.Intn(10) + this.StringMap = make(map[string]string) + for i := 0; i < v63; i++ { + this.StringMap[randStringTheproto3(r)] = randStringTheproto3(r) + } + } + if r.Intn(10) != 0 { + v64 := r.Intn(10) + this.StringToBytesMap = make(map[string][]byte) + for i := 0; i < v64; i++ { + v65 := r.Intn(100) + v66 := randStringTheproto3(r) + this.StringToBytesMap[v66] = make([]byte, v65) + for i := 0; i < v65; i++ { + this.StringToBytesMap[v66][i] = byte(r.Intn(256)) + } + } + } + if r.Intn(10) != 0 { + v67 := r.Intn(10) + this.StringToEnumMap = make(map[string]MapEnum) + for i := 0; i < v67; i++ { + this.StringToEnumMap[randStringTheproto3(r)] = MapEnum([]int32{0, 1, 2}[r.Intn(3)]) + } + } + if r.Intn(10) != 0 { + v68 := r.Intn(10) + this.StringToMsgMap = make(map[string]*FloatingPoint) + for i := 0; i < v68; i++ { + this.StringToMsgMap[randStringTheproto3(r)] = NewPopulatedFloatingPoint(r, easy) + } + } + if !easy && r.Intn(10) != 0 { + } + return this +} + +func NewPopulatedMessageWithMap(r randyTheproto3, easy bool) *MessageWithMap { + this := &MessageWithMap{} + if r.Intn(10) != 0 { + v69 := r.Intn(10) + this.NameMapping = make(map[int32]string) + for i := 0; i < v69; i++ { + this.NameMapping[int32(r.Int31())] = randStringTheproto3(r) + } + } + if r.Intn(10) != 0 { + v70 := r.Intn(10) + this.MsgMapping = make(map[int64]*FloatingPoint) + for i := 0; i < v70; i++ { + this.MsgMapping[int64(r.Int63())] = NewPopulatedFloatingPoint(r, easy) + } + } + if r.Intn(10) != 0 { + v71 := r.Intn(10) + this.ByteMapping = make(map[bool][]byte) + for i := 0; i < v71; i++ { + v72 := r.Intn(100) + v73 := bool(bool(r.Intn(2) == 0)) + this.ByteMapping[v73] = make([]byte, v72) + for i := 0; i < v72; i++ { + this.ByteMapping[v73][i] = byte(r.Intn(256)) + } + } + } + if !easy && r.Intn(10) != 0 { + } + return this +} + +func NewPopulatedFloatingPoint(r randyTheproto3, easy bool) *FloatingPoint { + this := &FloatingPoint{} + this.F = float64(r.Float64()) + if r.Intn(2) == 0 { + this.F *= -1 + } + if !easy && r.Intn(10) != 0 { + } + return this +} + +func NewPopulatedUint128Pair(r randyTheproto3, easy bool) *Uint128Pair { + this := &Uint128Pair{} + v74 := github_com_gogo_protobuf_test_custom.NewPopulatedUint128(r) + this.Left = *v74 + this.Right = github_com_gogo_protobuf_test_custom.NewPopulatedUint128(r) + if !easy && r.Intn(10) != 0 { + } + return this +} + +func NewPopulatedContainsNestedMap(r randyTheproto3, easy bool) *ContainsNestedMap { + this := &ContainsNestedMap{} + if !easy && r.Intn(10) != 0 { + } + return this +} + +func NewPopulatedContainsNestedMap_NestedMap(r randyTheproto3, easy bool) *ContainsNestedMap_NestedMap { + this := &ContainsNestedMap_NestedMap{} + if r.Intn(10) != 0 { + v75 := r.Intn(10) + this.NestedMapField = make(map[string]float64) + for i := 0; i < v75; i++ { + v76 := randStringTheproto3(r) + this.NestedMapField[v76] = float64(r.Float64()) + if r.Intn(2) == 0 { + this.NestedMapField[v76] *= -1 + } + } + } + if !easy && r.Intn(10) != 0 { + } + return this +} + +type randyTheproto3 interface { + Float32() float32 + Float64() float64 + Int63() int64 + Int31() int32 + Uint32() uint32 + Intn(n int) int +} + +func randUTF8RuneTheproto3(r randyTheproto3) 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 randStringTheproto3(r randyTheproto3) string { + v77 := r.Intn(100) + tmps := make([]rune, v77) + for i := 0; i < v77; i++ { + tmps[i] = randUTF8RuneTheproto3(r) + } + return string(tmps) +} +func randUnrecognizedTheproto3(r randyTheproto3, 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 = randFieldTheproto3(data, r, fieldNumber, wire) + } + return data +} +func randFieldTheproto3(data []byte, r randyTheproto3, fieldNumber int, wire int) []byte { + key := uint32(fieldNumber)<<3 | uint32(wire) + switch wire { + case 0: + data = encodeVarintPopulateTheproto3(data, uint64(key)) + v78 := r.Int63() + if r.Intn(2) == 0 { + v78 *= -1 + } + data = encodeVarintPopulateTheproto3(data, uint64(v78)) + case 1: + data = encodeVarintPopulateTheproto3(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 = encodeVarintPopulateTheproto3(data, uint64(key)) + ll := r.Intn(100) + data = encodeVarintPopulateTheproto3(data, uint64(ll)) + for j := 0; j < ll; j++ { + data = append(data, byte(r.Intn(256))) + } + default: + data = encodeVarintPopulateTheproto3(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 encodeVarintPopulateTheproto3(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 *Message) Size() (n int) { + var l int + _ = l + l = len(m.Name) + if l > 0 { + n += 1 + l + sovTheproto3(uint64(l)) + } + if m.Hilarity != 0 { + n += 1 + sovTheproto3(uint64(m.Hilarity)) + } + if m.HeightInCm != 0 { + n += 1 + sovTheproto3(uint64(m.HeightInCm)) + } + l = len(m.Data) + if l > 0 { + n += 1 + l + sovTheproto3(uint64(l)) + } + if len(m.Key) > 0 { + for _, e := range m.Key { + n += 1 + sovTheproto3(uint64(e)) + } + } + if m.Nested != nil { + l = m.Nested.Size() + n += 1 + l + sovTheproto3(uint64(l)) + } + if m.ResultCount != 0 { + n += 1 + sovTheproto3(uint64(m.ResultCount)) + } + if m.TrueScotsman { + n += 2 + } + if m.Score != 0 { + n += 5 + } + if len(m.Terrain) > 0 { + for k, v := range m.Terrain { + _ = k + _ = v + l = 0 + if v != nil { + l = v.Size() + } + mapEntrySize := 1 + sovTheproto3(uint64(k)) + 1 + l + sovTheproto3(uint64(l)) + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if m.Proto2Field != nil { + l = m.Proto2Field.Size() + n += 1 + l + sovTheproto3(uint64(l)) + } + if len(m.Proto2Value) > 0 { + for k, v := range m.Proto2Value { + _ = k + _ = v + l = 0 + if v != nil { + l = v.Size() + } + mapEntrySize := 1 + sovTheproto3(uint64(k)) + 1 + l + sovTheproto3(uint64(l)) + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + return n +} + +func (m *Nested) Size() (n int) { + var l int + _ = l + l = len(m.Bunny) + if l > 0 { + n += 1 + l + sovTheproto3(uint64(l)) + } + return n +} + +func (m *AllMaps) Size() (n int) { + var l int + _ = l + if len(m.StringToDoubleMap) > 0 { + for k, v := range m.StringToDoubleMap { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovTheproto3(uint64(len(k))) + 1 + 8 + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.StringToFloatMap) > 0 { + for k, v := range m.StringToFloatMap { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovTheproto3(uint64(len(k))) + 1 + 4 + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.Int32Map) > 0 { + for k, v := range m.Int32Map { + _ = k + _ = v + mapEntrySize := 1 + sovTheproto3(uint64(k)) + 1 + sovTheproto3(uint64(v)) + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.Int64Map) > 0 { + for k, v := range m.Int64Map { + _ = k + _ = v + mapEntrySize := 1 + sovTheproto3(uint64(k)) + 1 + sovTheproto3(uint64(v)) + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.Uint32Map) > 0 { + for k, v := range m.Uint32Map { + _ = k + _ = v + mapEntrySize := 1 + sovTheproto3(uint64(k)) + 1 + sovTheproto3(uint64(v)) + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.Uint64Map) > 0 { + for k, v := range m.Uint64Map { + _ = k + _ = v + mapEntrySize := 1 + sovTheproto3(uint64(k)) + 1 + sovTheproto3(uint64(v)) + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.Sint32Map) > 0 { + for k, v := range m.Sint32Map { + _ = k + _ = v + mapEntrySize := 1 + sozTheproto3(uint64(k)) + 1 + sozTheproto3(uint64(v)) + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.Sint64Map) > 0 { + for k, v := range m.Sint64Map { + _ = k + _ = v + mapEntrySize := 1 + sozTheproto3(uint64(k)) + 1 + sozTheproto3(uint64(v)) + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.Fixed32Map) > 0 { + for k, v := range m.Fixed32Map { + _ = k + _ = v + mapEntrySize := 1 + 4 + 1 + 4 + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.Sfixed32Map) > 0 { + for k, v := range m.Sfixed32Map { + _ = k + _ = v + mapEntrySize := 1 + 4 + 1 + 4 + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.Fixed64Map) > 0 { + for k, v := range m.Fixed64Map { + _ = k + _ = v + mapEntrySize := 1 + 8 + 1 + 8 + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.Sfixed64Map) > 0 { + for k, v := range m.Sfixed64Map { + _ = k + _ = v + mapEntrySize := 1 + 8 + 1 + 8 + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.BoolMap) > 0 { + for k, v := range m.BoolMap { + _ = k + _ = v + mapEntrySize := 1 + 1 + 1 + 1 + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.StringMap) > 0 { + for k, v := range m.StringMap { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovTheproto3(uint64(len(k))) + 1 + len(v) + sovTheproto3(uint64(len(v))) + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.StringToBytesMap) > 0 { + for k, v := range m.StringToBytesMap { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovTheproto3(uint64(len(k))) + 1 + len(v) + sovTheproto3(uint64(len(v))) + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.StringToEnumMap) > 0 { + for k, v := range m.StringToEnumMap { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovTheproto3(uint64(len(k))) + 1 + sovTheproto3(uint64(v)) + n += mapEntrySize + 2 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.StringToMsgMap) > 0 { + for k, v := range m.StringToMsgMap { + _ = k + _ = v + l = 0 + if v != nil { + l = v.Size() + } + mapEntrySize := 1 + len(k) + sovTheproto3(uint64(len(k))) + 1 + l + sovTheproto3(uint64(l)) + n += mapEntrySize + 2 + sovTheproto3(uint64(mapEntrySize)) + } + } + return n +} + +func (m *AllMapsOrdered) Size() (n int) { + var l int + _ = l + if len(m.StringToDoubleMap) > 0 { + for k, v := range m.StringToDoubleMap { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovTheproto3(uint64(len(k))) + 1 + 8 + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.StringToFloatMap) > 0 { + for k, v := range m.StringToFloatMap { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovTheproto3(uint64(len(k))) + 1 + 4 + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.Int32Map) > 0 { + for k, v := range m.Int32Map { + _ = k + _ = v + mapEntrySize := 1 + sovTheproto3(uint64(k)) + 1 + sovTheproto3(uint64(v)) + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.Int64Map) > 0 { + for k, v := range m.Int64Map { + _ = k + _ = v + mapEntrySize := 1 + sovTheproto3(uint64(k)) + 1 + sovTheproto3(uint64(v)) + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.Uint32Map) > 0 { + for k, v := range m.Uint32Map { + _ = k + _ = v + mapEntrySize := 1 + sovTheproto3(uint64(k)) + 1 + sovTheproto3(uint64(v)) + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.Uint64Map) > 0 { + for k, v := range m.Uint64Map { + _ = k + _ = v + mapEntrySize := 1 + sovTheproto3(uint64(k)) + 1 + sovTheproto3(uint64(v)) + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.Sint32Map) > 0 { + for k, v := range m.Sint32Map { + _ = k + _ = v + mapEntrySize := 1 + sozTheproto3(uint64(k)) + 1 + sozTheproto3(uint64(v)) + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.Sint64Map) > 0 { + for k, v := range m.Sint64Map { + _ = k + _ = v + mapEntrySize := 1 + sozTheproto3(uint64(k)) + 1 + sozTheproto3(uint64(v)) + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.Fixed32Map) > 0 { + for k, v := range m.Fixed32Map { + _ = k + _ = v + mapEntrySize := 1 + 4 + 1 + 4 + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.Sfixed32Map) > 0 { + for k, v := range m.Sfixed32Map { + _ = k + _ = v + mapEntrySize := 1 + 4 + 1 + 4 + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.Fixed64Map) > 0 { + for k, v := range m.Fixed64Map { + _ = k + _ = v + mapEntrySize := 1 + 8 + 1 + 8 + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.Sfixed64Map) > 0 { + for k, v := range m.Sfixed64Map { + _ = k + _ = v + mapEntrySize := 1 + 8 + 1 + 8 + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.BoolMap) > 0 { + for k, v := range m.BoolMap { + _ = k + _ = v + mapEntrySize := 1 + 1 + 1 + 1 + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.StringMap) > 0 { + for k, v := range m.StringMap { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovTheproto3(uint64(len(k))) + 1 + len(v) + sovTheproto3(uint64(len(v))) + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.StringToBytesMap) > 0 { + for k, v := range m.StringToBytesMap { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovTheproto3(uint64(len(k))) + 1 + len(v) + sovTheproto3(uint64(len(v))) + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.StringToEnumMap) > 0 { + for k, v := range m.StringToEnumMap { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovTheproto3(uint64(len(k))) + 1 + sovTheproto3(uint64(v)) + n += mapEntrySize + 2 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.StringToMsgMap) > 0 { + for k, v := range m.StringToMsgMap { + _ = k + _ = v + l = 0 + if v != nil { + l = v.Size() + } + mapEntrySize := 1 + len(k) + sovTheproto3(uint64(len(k))) + 1 + l + sovTheproto3(uint64(l)) + n += mapEntrySize + 2 + sovTheproto3(uint64(mapEntrySize)) + } + } + return n +} + +func (m *MessageWithMap) Size() (n int) { + var l int + _ = l + if len(m.NameMapping) > 0 { + for k, v := range m.NameMapping { + _ = k + _ = v + mapEntrySize := 1 + sovTheproto3(uint64(k)) + 1 + len(v) + sovTheproto3(uint64(len(v))) + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.MsgMapping) > 0 { + for k, v := range m.MsgMapping { + _ = k + _ = v + l = 0 + if v != nil { + l = v.Size() + } + mapEntrySize := 1 + sozTheproto3(uint64(k)) + 1 + l + sovTheproto3(uint64(l)) + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.ByteMapping) > 0 { + for k, v := range m.ByteMapping { + _ = k + _ = v + mapEntrySize := 1 + 1 + 1 + len(v) + sovTheproto3(uint64(len(v))) + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + return n +} + +func (m *FloatingPoint) Size() (n int) { + var l int + _ = l + if m.F != 0 { + n += 9 + } + return n +} + +func (m *Uint128Pair) Size() (n int) { + var l int + _ = l + l = m.Left.Size() + n += 1 + l + sovTheproto3(uint64(l)) + if m.Right != nil { + l = m.Right.Size() + n += 1 + l + sovTheproto3(uint64(l)) + } + return n +} + +func (m *ContainsNestedMap) Size() (n int) { + var l int + _ = l + return n +} + +func (m *ContainsNestedMap_NestedMap) Size() (n int) { + var l int + _ = l + if len(m.NestedMapField) > 0 { + for k, v := range m.NestedMapField { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovTheproto3(uint64(len(k))) + 1 + 8 + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + return n +} + +func sovTheproto3(x uint64) (n int) { + for { + n++ + x >>= 7 + if x == 0 { + break + } + } + return n +} +func sozTheproto3(x uint64) (n int) { + return sovTheproto3(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (this *Message) String() string { + if this == nil { + return "nil" + } + keysForTerrain := make([]int64, 0, len(this.Terrain)) + for k := range this.Terrain { + keysForTerrain = append(keysForTerrain, k) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForTerrain) + mapStringForTerrain := "map[int64]*Nested{" + for _, k := range keysForTerrain { + mapStringForTerrain += fmt.Sprintf("%v: %v,", k, this.Terrain[k]) + } + mapStringForTerrain += "}" + keysForProto2Value := make([]int64, 0, len(this.Proto2Value)) + for k := range this.Proto2Value { + keysForProto2Value = append(keysForProto2Value, k) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForProto2Value) + mapStringForProto2Value := "map[int64]*test.NinOptEnum{" + for _, k := range keysForProto2Value { + mapStringForProto2Value += fmt.Sprintf("%v: %v,", k, this.Proto2Value[k]) + } + mapStringForProto2Value += "}" + s := strings.Join([]string{`&Message{`, + `Name:` + fmt.Sprintf("%v", this.Name) + `,`, + `Hilarity:` + fmt.Sprintf("%v", this.Hilarity) + `,`, + `HeightInCm:` + fmt.Sprintf("%v", this.HeightInCm) + `,`, + `Data:` + fmt.Sprintf("%v", this.Data) + `,`, + `Key:` + fmt.Sprintf("%v", this.Key) + `,`, + `Nested:` + strings.Replace(fmt.Sprintf("%v", this.Nested), "Nested", "Nested", 1) + `,`, + `ResultCount:` + fmt.Sprintf("%v", this.ResultCount) + `,`, + `TrueScotsman:` + fmt.Sprintf("%v", this.TrueScotsman) + `,`, + `Score:` + fmt.Sprintf("%v", this.Score) + `,`, + `Terrain:` + mapStringForTerrain + `,`, + `Proto2Field:` + strings.Replace(fmt.Sprintf("%v", this.Proto2Field), "NinOptNative", "test.NinOptNative", 1) + `,`, + `Proto2Value:` + mapStringForProto2Value + `,`, + `}`, + }, "") + return s +} +func (this *Nested) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&Nested{`, + `Bunny:` + fmt.Sprintf("%v", this.Bunny) + `,`, + `}`, + }, "") + return s +} +func (this *AllMaps) String() string { + if this == nil { + return "nil" + } + keysForStringToDoubleMap := make([]string, 0, len(this.StringToDoubleMap)) + for k := range this.StringToDoubleMap { + keysForStringToDoubleMap = append(keysForStringToDoubleMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToDoubleMap) + mapStringForStringToDoubleMap := "map[string]float64{" + for _, k := range keysForStringToDoubleMap { + mapStringForStringToDoubleMap += fmt.Sprintf("%v: %v,", k, this.StringToDoubleMap[k]) + } + mapStringForStringToDoubleMap += "}" + keysForStringToFloatMap := make([]string, 0, len(this.StringToFloatMap)) + for k := range this.StringToFloatMap { + keysForStringToFloatMap = append(keysForStringToFloatMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToFloatMap) + mapStringForStringToFloatMap := "map[string]float32{" + for _, k := range keysForStringToFloatMap { + mapStringForStringToFloatMap += fmt.Sprintf("%v: %v,", k, this.StringToFloatMap[k]) + } + mapStringForStringToFloatMap += "}" + keysForInt32Map := make([]int32, 0, len(this.Int32Map)) + for k := range this.Int32Map { + keysForInt32Map = append(keysForInt32Map, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForInt32Map) + mapStringForInt32Map := "map[int32]int32{" + for _, k := range keysForInt32Map { + mapStringForInt32Map += fmt.Sprintf("%v: %v,", k, this.Int32Map[k]) + } + mapStringForInt32Map += "}" + keysForInt64Map := make([]int64, 0, len(this.Int64Map)) + for k := range this.Int64Map { + keysForInt64Map = append(keysForInt64Map, k) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForInt64Map) + mapStringForInt64Map := "map[int64]int64{" + for _, k := range keysForInt64Map { + mapStringForInt64Map += fmt.Sprintf("%v: %v,", k, this.Int64Map[k]) + } + mapStringForInt64Map += "}" + keysForUint32Map := make([]uint32, 0, len(this.Uint32Map)) + for k := range this.Uint32Map { + keysForUint32Map = append(keysForUint32Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint32s(keysForUint32Map) + mapStringForUint32Map := "map[uint32]uint32{" + for _, k := range keysForUint32Map { + mapStringForUint32Map += fmt.Sprintf("%v: %v,", k, this.Uint32Map[k]) + } + mapStringForUint32Map += "}" + keysForUint64Map := make([]uint64, 0, len(this.Uint64Map)) + for k := range this.Uint64Map { + keysForUint64Map = append(keysForUint64Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint64s(keysForUint64Map) + mapStringForUint64Map := "map[uint64]uint64{" + for _, k := range keysForUint64Map { + mapStringForUint64Map += fmt.Sprintf("%v: %v,", k, this.Uint64Map[k]) + } + mapStringForUint64Map += "}" + keysForSint32Map := make([]int32, 0, len(this.Sint32Map)) + for k := range this.Sint32Map { + keysForSint32Map = append(keysForSint32Map, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForSint32Map) + mapStringForSint32Map := "map[int32]int32{" + for _, k := range keysForSint32Map { + mapStringForSint32Map += fmt.Sprintf("%v: %v,", k, this.Sint32Map[k]) + } + mapStringForSint32Map += "}" + keysForSint64Map := make([]int64, 0, len(this.Sint64Map)) + for k := range this.Sint64Map { + keysForSint64Map = append(keysForSint64Map, k) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForSint64Map) + mapStringForSint64Map := "map[int64]int64{" + for _, k := range keysForSint64Map { + mapStringForSint64Map += fmt.Sprintf("%v: %v,", k, this.Sint64Map[k]) + } + mapStringForSint64Map += "}" + keysForFixed32Map := make([]uint32, 0, len(this.Fixed32Map)) + for k := range this.Fixed32Map { + keysForFixed32Map = append(keysForFixed32Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint32s(keysForFixed32Map) + mapStringForFixed32Map := "map[uint32]uint32{" + for _, k := range keysForFixed32Map { + mapStringForFixed32Map += fmt.Sprintf("%v: %v,", k, this.Fixed32Map[k]) + } + mapStringForFixed32Map += "}" + keysForSfixed32Map := make([]int32, 0, len(this.Sfixed32Map)) + for k := range this.Sfixed32Map { + keysForSfixed32Map = append(keysForSfixed32Map, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForSfixed32Map) + mapStringForSfixed32Map := "map[int32]int32{" + for _, k := range keysForSfixed32Map { + mapStringForSfixed32Map += fmt.Sprintf("%v: %v,", k, this.Sfixed32Map[k]) + } + mapStringForSfixed32Map += "}" + keysForFixed64Map := make([]uint64, 0, len(this.Fixed64Map)) + for k := range this.Fixed64Map { + keysForFixed64Map = append(keysForFixed64Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint64s(keysForFixed64Map) + mapStringForFixed64Map := "map[uint64]uint64{" + for _, k := range keysForFixed64Map { + mapStringForFixed64Map += fmt.Sprintf("%v: %v,", k, this.Fixed64Map[k]) + } + mapStringForFixed64Map += "}" + keysForSfixed64Map := make([]int64, 0, len(this.Sfixed64Map)) + for k := range this.Sfixed64Map { + keysForSfixed64Map = append(keysForSfixed64Map, k) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForSfixed64Map) + mapStringForSfixed64Map := "map[int64]int64{" + for _, k := range keysForSfixed64Map { + mapStringForSfixed64Map += fmt.Sprintf("%v: %v,", k, this.Sfixed64Map[k]) + } + mapStringForSfixed64Map += "}" + keysForBoolMap := make([]bool, 0, len(this.BoolMap)) + for k := range this.BoolMap { + keysForBoolMap = append(keysForBoolMap, k) + } + github_com_gogo_protobuf_sortkeys.Bools(keysForBoolMap) + mapStringForBoolMap := "map[bool]bool{" + for _, k := range keysForBoolMap { + mapStringForBoolMap += fmt.Sprintf("%v: %v,", k, this.BoolMap[k]) + } + mapStringForBoolMap += "}" + keysForStringMap := make([]string, 0, len(this.StringMap)) + for k := range this.StringMap { + keysForStringMap = append(keysForStringMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringMap) + mapStringForStringMap := "map[string]string{" + for _, k := range keysForStringMap { + mapStringForStringMap += fmt.Sprintf("%v: %v,", k, this.StringMap[k]) + } + mapStringForStringMap += "}" + keysForStringToBytesMap := make([]string, 0, len(this.StringToBytesMap)) + for k := range this.StringToBytesMap { + keysForStringToBytesMap = append(keysForStringToBytesMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToBytesMap) + mapStringForStringToBytesMap := "map[string][]byte{" + for _, k := range keysForStringToBytesMap { + mapStringForStringToBytesMap += fmt.Sprintf("%v: %v,", k, this.StringToBytesMap[k]) + } + mapStringForStringToBytesMap += "}" + keysForStringToEnumMap := make([]string, 0, len(this.StringToEnumMap)) + for k := range this.StringToEnumMap { + keysForStringToEnumMap = append(keysForStringToEnumMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToEnumMap) + mapStringForStringToEnumMap := "map[string]MapEnum{" + for _, k := range keysForStringToEnumMap { + mapStringForStringToEnumMap += fmt.Sprintf("%v: %v,", k, this.StringToEnumMap[k]) + } + mapStringForStringToEnumMap += "}" + keysForStringToMsgMap := make([]string, 0, len(this.StringToMsgMap)) + for k := range this.StringToMsgMap { + keysForStringToMsgMap = append(keysForStringToMsgMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToMsgMap) + mapStringForStringToMsgMap := "map[string]*FloatingPoint{" + for _, k := range keysForStringToMsgMap { + mapStringForStringToMsgMap += fmt.Sprintf("%v: %v,", k, this.StringToMsgMap[k]) + } + mapStringForStringToMsgMap += "}" + s := strings.Join([]string{`&AllMaps{`, + `StringToDoubleMap:` + mapStringForStringToDoubleMap + `,`, + `StringToFloatMap:` + mapStringForStringToFloatMap + `,`, + `Int32Map:` + mapStringForInt32Map + `,`, + `Int64Map:` + mapStringForInt64Map + `,`, + `Uint32Map:` + mapStringForUint32Map + `,`, + `Uint64Map:` + mapStringForUint64Map + `,`, + `Sint32Map:` + mapStringForSint32Map + `,`, + `Sint64Map:` + mapStringForSint64Map + `,`, + `Fixed32Map:` + mapStringForFixed32Map + `,`, + `Sfixed32Map:` + mapStringForSfixed32Map + `,`, + `Fixed64Map:` + mapStringForFixed64Map + `,`, + `Sfixed64Map:` + mapStringForSfixed64Map + `,`, + `BoolMap:` + mapStringForBoolMap + `,`, + `StringMap:` + mapStringForStringMap + `,`, + `StringToBytesMap:` + mapStringForStringToBytesMap + `,`, + `StringToEnumMap:` + mapStringForStringToEnumMap + `,`, + `StringToMsgMap:` + mapStringForStringToMsgMap + `,`, + `}`, + }, "") + return s +} +func (this *AllMapsOrdered) String() string { + if this == nil { + return "nil" + } + keysForStringToDoubleMap := make([]string, 0, len(this.StringToDoubleMap)) + for k := range this.StringToDoubleMap { + keysForStringToDoubleMap = append(keysForStringToDoubleMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToDoubleMap) + mapStringForStringToDoubleMap := "map[string]float64{" + for _, k := range keysForStringToDoubleMap { + mapStringForStringToDoubleMap += fmt.Sprintf("%v: %v,", k, this.StringToDoubleMap[k]) + } + mapStringForStringToDoubleMap += "}" + keysForStringToFloatMap := make([]string, 0, len(this.StringToFloatMap)) + for k := range this.StringToFloatMap { + keysForStringToFloatMap = append(keysForStringToFloatMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToFloatMap) + mapStringForStringToFloatMap := "map[string]float32{" + for _, k := range keysForStringToFloatMap { + mapStringForStringToFloatMap += fmt.Sprintf("%v: %v,", k, this.StringToFloatMap[k]) + } + mapStringForStringToFloatMap += "}" + keysForInt32Map := make([]int32, 0, len(this.Int32Map)) + for k := range this.Int32Map { + keysForInt32Map = append(keysForInt32Map, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForInt32Map) + mapStringForInt32Map := "map[int32]int32{" + for _, k := range keysForInt32Map { + mapStringForInt32Map += fmt.Sprintf("%v: %v,", k, this.Int32Map[k]) + } + mapStringForInt32Map += "}" + keysForInt64Map := make([]int64, 0, len(this.Int64Map)) + for k := range this.Int64Map { + keysForInt64Map = append(keysForInt64Map, k) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForInt64Map) + mapStringForInt64Map := "map[int64]int64{" + for _, k := range keysForInt64Map { + mapStringForInt64Map += fmt.Sprintf("%v: %v,", k, this.Int64Map[k]) + } + mapStringForInt64Map += "}" + keysForUint32Map := make([]uint32, 0, len(this.Uint32Map)) + for k := range this.Uint32Map { + keysForUint32Map = append(keysForUint32Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint32s(keysForUint32Map) + mapStringForUint32Map := "map[uint32]uint32{" + for _, k := range keysForUint32Map { + mapStringForUint32Map += fmt.Sprintf("%v: %v,", k, this.Uint32Map[k]) + } + mapStringForUint32Map += "}" + keysForUint64Map := make([]uint64, 0, len(this.Uint64Map)) + for k := range this.Uint64Map { + keysForUint64Map = append(keysForUint64Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint64s(keysForUint64Map) + mapStringForUint64Map := "map[uint64]uint64{" + for _, k := range keysForUint64Map { + mapStringForUint64Map += fmt.Sprintf("%v: %v,", k, this.Uint64Map[k]) + } + mapStringForUint64Map += "}" + keysForSint32Map := make([]int32, 0, len(this.Sint32Map)) + for k := range this.Sint32Map { + keysForSint32Map = append(keysForSint32Map, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForSint32Map) + mapStringForSint32Map := "map[int32]int32{" + for _, k := range keysForSint32Map { + mapStringForSint32Map += fmt.Sprintf("%v: %v,", k, this.Sint32Map[k]) + } + mapStringForSint32Map += "}" + keysForSint64Map := make([]int64, 0, len(this.Sint64Map)) + for k := range this.Sint64Map { + keysForSint64Map = append(keysForSint64Map, k) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForSint64Map) + mapStringForSint64Map := "map[int64]int64{" + for _, k := range keysForSint64Map { + mapStringForSint64Map += fmt.Sprintf("%v: %v,", k, this.Sint64Map[k]) + } + mapStringForSint64Map += "}" + keysForFixed32Map := make([]uint32, 0, len(this.Fixed32Map)) + for k := range this.Fixed32Map { + keysForFixed32Map = append(keysForFixed32Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint32s(keysForFixed32Map) + mapStringForFixed32Map := "map[uint32]uint32{" + for _, k := range keysForFixed32Map { + mapStringForFixed32Map += fmt.Sprintf("%v: %v,", k, this.Fixed32Map[k]) + } + mapStringForFixed32Map += "}" + keysForSfixed32Map := make([]int32, 0, len(this.Sfixed32Map)) + for k := range this.Sfixed32Map { + keysForSfixed32Map = append(keysForSfixed32Map, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForSfixed32Map) + mapStringForSfixed32Map := "map[int32]int32{" + for _, k := range keysForSfixed32Map { + mapStringForSfixed32Map += fmt.Sprintf("%v: %v,", k, this.Sfixed32Map[k]) + } + mapStringForSfixed32Map += "}" + keysForFixed64Map := make([]uint64, 0, len(this.Fixed64Map)) + for k := range this.Fixed64Map { + keysForFixed64Map = append(keysForFixed64Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint64s(keysForFixed64Map) + mapStringForFixed64Map := "map[uint64]uint64{" + for _, k := range keysForFixed64Map { + mapStringForFixed64Map += fmt.Sprintf("%v: %v,", k, this.Fixed64Map[k]) + } + mapStringForFixed64Map += "}" + keysForSfixed64Map := make([]int64, 0, len(this.Sfixed64Map)) + for k := range this.Sfixed64Map { + keysForSfixed64Map = append(keysForSfixed64Map, k) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForSfixed64Map) + mapStringForSfixed64Map := "map[int64]int64{" + for _, k := range keysForSfixed64Map { + mapStringForSfixed64Map += fmt.Sprintf("%v: %v,", k, this.Sfixed64Map[k]) + } + mapStringForSfixed64Map += "}" + keysForBoolMap := make([]bool, 0, len(this.BoolMap)) + for k := range this.BoolMap { + keysForBoolMap = append(keysForBoolMap, k) + } + github_com_gogo_protobuf_sortkeys.Bools(keysForBoolMap) + mapStringForBoolMap := "map[bool]bool{" + for _, k := range keysForBoolMap { + mapStringForBoolMap += fmt.Sprintf("%v: %v,", k, this.BoolMap[k]) + } + mapStringForBoolMap += "}" + keysForStringMap := make([]string, 0, len(this.StringMap)) + for k := range this.StringMap { + keysForStringMap = append(keysForStringMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringMap) + mapStringForStringMap := "map[string]string{" + for _, k := range keysForStringMap { + mapStringForStringMap += fmt.Sprintf("%v: %v,", k, this.StringMap[k]) + } + mapStringForStringMap += "}" + keysForStringToBytesMap := make([]string, 0, len(this.StringToBytesMap)) + for k := range this.StringToBytesMap { + keysForStringToBytesMap = append(keysForStringToBytesMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToBytesMap) + mapStringForStringToBytesMap := "map[string][]byte{" + for _, k := range keysForStringToBytesMap { + mapStringForStringToBytesMap += fmt.Sprintf("%v: %v,", k, this.StringToBytesMap[k]) + } + mapStringForStringToBytesMap += "}" + keysForStringToEnumMap := make([]string, 0, len(this.StringToEnumMap)) + for k := range this.StringToEnumMap { + keysForStringToEnumMap = append(keysForStringToEnumMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToEnumMap) + mapStringForStringToEnumMap := "map[string]MapEnum{" + for _, k := range keysForStringToEnumMap { + mapStringForStringToEnumMap += fmt.Sprintf("%v: %v,", k, this.StringToEnumMap[k]) + } + mapStringForStringToEnumMap += "}" + keysForStringToMsgMap := make([]string, 0, len(this.StringToMsgMap)) + for k := range this.StringToMsgMap { + keysForStringToMsgMap = append(keysForStringToMsgMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToMsgMap) + mapStringForStringToMsgMap := "map[string]*FloatingPoint{" + for _, k := range keysForStringToMsgMap { + mapStringForStringToMsgMap += fmt.Sprintf("%v: %v,", k, this.StringToMsgMap[k]) + } + mapStringForStringToMsgMap += "}" + s := strings.Join([]string{`&AllMapsOrdered{`, + `StringToDoubleMap:` + mapStringForStringToDoubleMap + `,`, + `StringToFloatMap:` + mapStringForStringToFloatMap + `,`, + `Int32Map:` + mapStringForInt32Map + `,`, + `Int64Map:` + mapStringForInt64Map + `,`, + `Uint32Map:` + mapStringForUint32Map + `,`, + `Uint64Map:` + mapStringForUint64Map + `,`, + `Sint32Map:` + mapStringForSint32Map + `,`, + `Sint64Map:` + mapStringForSint64Map + `,`, + `Fixed32Map:` + mapStringForFixed32Map + `,`, + `Sfixed32Map:` + mapStringForSfixed32Map + `,`, + `Fixed64Map:` + mapStringForFixed64Map + `,`, + `Sfixed64Map:` + mapStringForSfixed64Map + `,`, + `BoolMap:` + mapStringForBoolMap + `,`, + `StringMap:` + mapStringForStringMap + `,`, + `StringToBytesMap:` + mapStringForStringToBytesMap + `,`, + `StringToEnumMap:` + mapStringForStringToEnumMap + `,`, + `StringToMsgMap:` + mapStringForStringToMsgMap + `,`, + `}`, + }, "") + return s +} +func (this *MessageWithMap) String() string { + if this == nil { + return "nil" + } + keysForNameMapping := make([]int32, 0, len(this.NameMapping)) + for k := range this.NameMapping { + keysForNameMapping = append(keysForNameMapping, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForNameMapping) + mapStringForNameMapping := "map[int32]string{" + for _, k := range keysForNameMapping { + mapStringForNameMapping += fmt.Sprintf("%v: %v,", k, this.NameMapping[k]) + } + mapStringForNameMapping += "}" + keysForMsgMapping := make([]int64, 0, len(this.MsgMapping)) + for k := range this.MsgMapping { + keysForMsgMapping = append(keysForMsgMapping, k) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForMsgMapping) + mapStringForMsgMapping := "map[int64]*FloatingPoint{" + for _, k := range keysForMsgMapping { + mapStringForMsgMapping += fmt.Sprintf("%v: %v,", k, this.MsgMapping[k]) + } + mapStringForMsgMapping += "}" + keysForByteMapping := make([]bool, 0, len(this.ByteMapping)) + for k := range this.ByteMapping { + keysForByteMapping = append(keysForByteMapping, k) + } + github_com_gogo_protobuf_sortkeys.Bools(keysForByteMapping) + mapStringForByteMapping := "map[bool][]byte{" + for _, k := range keysForByteMapping { + mapStringForByteMapping += fmt.Sprintf("%v: %v,", k, this.ByteMapping[k]) + } + mapStringForByteMapping += "}" + s := strings.Join([]string{`&MessageWithMap{`, + `NameMapping:` + mapStringForNameMapping + `,`, + `MsgMapping:` + mapStringForMsgMapping + `,`, + `ByteMapping:` + mapStringForByteMapping + `,`, + `}`, + }, "") + return s +} +func (this *FloatingPoint) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&FloatingPoint{`, + `F:` + fmt.Sprintf("%v", this.F) + `,`, + `}`, + }, "") + return s +} +func (this *Uint128Pair) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&Uint128Pair{`, + `Left:` + fmt.Sprintf("%v", this.Left) + `,`, + `Right:` + fmt.Sprintf("%v", this.Right) + `,`, + `}`, + }, "") + return s +} +func (this *ContainsNestedMap) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&ContainsNestedMap{`, + `}`, + }, "") + return s +} +func (this *ContainsNestedMap_NestedMap) String() string { + if this == nil { + return "nil" + } + keysForNestedMapField := make([]string, 0, len(this.NestedMapField)) + for k := range this.NestedMapField { + keysForNestedMapField = append(keysForNestedMapField, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForNestedMapField) + mapStringForNestedMapField := "map[string]float64{" + for _, k := range keysForNestedMapField { + mapStringForNestedMapField += fmt.Sprintf("%v: %v,", k, this.NestedMapField[k]) + } + mapStringForNestedMapField += "}" + s := strings.Join([]string{`&ContainsNestedMap_NestedMap{`, + `NestedMapField:` + mapStringForNestedMapField + `,`, + `}`, + }, "") + return s +} +func valueToStringTheproto3(v interface{}) string { + rv := reflect.ValueOf(v) + if rv.IsNil() { + return "nil" + } + pv := reflect.Indirect(rv).Interface() + return fmt.Sprintf("*%v", pv) +} + +var fileDescriptorTheproto3 = []byte{ + // 1585 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xec, 0x59, 0x4d, 0x6f, 0xdb, 0xc6, + 0x16, 0x35, 0x25, 0x59, 0x1f, 0x57, 0x5f, 0xf4, 0x24, 0xef, 0x41, 0xcf, 0xc0, 0xb3, 0x1d, 0x05, + 0x48, 0x9c, 0xe0, 0x45, 0xce, 0x73, 0xd2, 0x36, 0x75, 0xd3, 0xa6, 0x96, 0x62, 0x21, 0x6e, 0x2c, + 0xc5, 0x95, 0xec, 0xb8, 0x45, 0x80, 0x0a, 0x94, 0x4d, 0x49, 0x44, 0x25, 0xd2, 0x20, 0xa9, 0xa0, + 0xde, 0xe5, 0x67, 0x74, 0x57, 0x74, 0xd7, 0x65, 0x91, 0x45, 0xd1, 0x65, 0xbb, 0xf3, 0x32, 0x40, + 0x37, 0x45, 0x17, 0x41, 0x93, 0x6e, 0xb2, 0xcc, 0x32, 0xcb, 0xce, 0x07, 0x49, 0x0d, 0xa9, 0xa1, + 0xd8, 0x74, 0xd3, 0x8d, 0x17, 0x03, 0x6a, 0x2e, 0xcf, 0x39, 0x73, 0x67, 0x38, 0x73, 0x79, 0x40, + 0xc1, 0xca, 0xa1, 0x31, 0xea, 0x1a, 0xd6, 0xda, 0x48, 0x31, 0xad, 0x81, 0x32, 0x54, 0xcd, 0x35, + 0x7b, 0xa0, 0x1e, 0x9b, 0x86, 0x6d, 0xdc, 0xa8, 0xd0, 0x0b, 0xca, 0x78, 0x81, 0xc5, 0x6b, 0x7d, + 0xcd, 0x1e, 0x8c, 0xbb, 0x15, 0xcc, 0x59, 0xeb, 0x1b, 0x7d, 0x63, 0x8d, 0xc6, 0xbb, 0xe3, 0x1e, + 0xed, 0xd1, 0x0e, 0xfd, 0xc5, 0x98, 0x8b, 0xef, 0x85, 0xc2, 0x6d, 0xd5, 0xb2, 0xd7, 0x9c, 0x91, + 0xbb, 0x86, 0x3d, 0x20, 0x83, 0x92, 0x18, 0x23, 0x96, 0x7f, 0x9e, 0x87, 0x54, 0x43, 0xb5, 0x2c, + 0xa5, 0xaf, 0x22, 0x04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x4e, 0xdd, 0xe0, 0x56, 0x78, 0x4a, + 0xa3, 0x22, 0xf8, 0x45, 0xc9, 0xce, 0x3b, 0x59, 0xf7, 0x05, 0x17, 0x37, 0xe1, 0x9c, 0x00, 0xf6, + 0x36, 0x2f, 0xe4, 0xab, 0x17, 0x20, 0xe5, 0x1c, 0x6d, 0x94, 0x84, 0x58, 0x63, 0x53, 0x9e, 0xa3, + 0xd7, 0xaa, 0x2c, 0xd1, 0x6b, 0x4d, 0x8e, 0x55, 0x77, 0x4e, 0x5f, 0x2c, 0xcd, 0x3d, 0xc3, 0xed, + 0x57, 0xdc, 0x7e, 0x7f, 0xb1, 0x24, 0xbd, 0xc2, 0xed, 0x35, 0x6e, 0x6f, 0x70, 0x7b, 0xf2, 0x72, + 0x49, 0xfa, 0x0e, 0xb7, 0xef, 0x71, 0xfb, 0x11, 0xb7, 0x9f, 0x70, 0x3b, 0xc5, 0xed, 0xd9, 0x4b, + 0x8c, 0xc5, 0xd7, 0x57, 0xf8, 0xfa, 0x1a, 0x5f, 0xdf, 0xe0, 0xeb, 0x93, 0x3f, 0x96, 0xe6, 0xba, + 0x49, 0x36, 0xf7, 0x3f, 0x03, 0x00, 0x00, 0xff, 0xff, 0xe2, 0x68, 0xb0, 0x04, 0x42, 0x1a, 0x00, + 0x00, +} diff --git a/vendor/github.com/gogo/protobuf/test/theproto3/combos/marshaler/theproto3.proto b/vendor/github.com/gogo/protobuf/test/theproto3/combos/marshaler/theproto3.proto new file mode 100644 index 000000000..c2e23f2eb --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/theproto3/combos/marshaler/theproto3.proto @@ -0,0 +1,162 @@ +// Copyright (c) 2013, Vastech SA (PTY) LTD. All rights reserved. +// http://github.com/gogo/protobuf/gogoproto +// +// Go support for Protocol Buffers - Google's data interchange format +// +// Copyright 2014 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. + +syntax = "proto3"; + +package theproto3; + +import "github.com/gogo/protobuf/gogoproto/gogo.proto"; + +import "github.com/gogo/protobuf/test/combos/both/thetest.proto"; + +option (gogoproto.goproto_stringer_all) = false; +option (gogoproto.goproto_enum_prefix_all) = false; +option (gogoproto.goproto_getters_all) = false; + +option (gogoproto.equal_all) = true; +option (gogoproto.verbose_equal_all) = true; +option (gogoproto.stringer_all) = true; +option (gogoproto.gostring_all) = true; +option (gogoproto.face_all) = true; +option (gogoproto.description_all) = true; + +option (gogoproto.testgen_all) = true; +option (gogoproto.populate_all) = true; +option (gogoproto.benchgen_all) = true; +option (gogoproto.unmarshaler_all) = false; +option (gogoproto.marshaler_all) = true; +option (gogoproto.sizer_all) = true; + +option (gogoproto.goproto_enum_stringer_all) = false; +option (gogoproto.enum_stringer_all) = true; + +option (gogoproto.unsafe_marshaler_all) = false; +option (gogoproto.unsafe_unmarshaler_all) = false; + +message Message { + enum Humour { + UNKNOWN = 0; + PUNS = 1; + SLAPSTICK = 2; + BILL_BAILEY = 3; + } + + string name = 1; + Humour hilarity = 2; + uint32 height_in_cm = 3; + bytes data = 4; + int64 result_count = 7; + bool true_scotsman = 8; + float score = 9; + + repeated uint64 key = 5; + Nested nested = 6; + + map terrain = 10; + test.NinOptNative proto2_field = 11; + map proto2_value = 13; +} + +message Nested { + string bunny = 1; +} + +enum MapEnum { + MA = 0; + MB = 1; + MC = 2; +} + +message AllMaps { + map StringToDoubleMap = 1; + map StringToFloatMap = 2; + map Int32Map = 3; + map Int64Map = 4; + map Uint32Map = 5; + map Uint64Map = 6; + map Sint32Map = 7; + map Sint64Map = 8; + map Fixed32Map = 9; + map Sfixed32Map = 10; + map Fixed64Map = 11; + map Sfixed64Map = 12; + map BoolMap = 13; + map StringMap = 14; + map StringToBytesMap = 15; + map StringToEnumMap = 16; + map StringToMsgMap = 17; +} + +message AllMapsOrdered { + option (gogoproto.stable_marshaler) = true; + + map StringToDoubleMap = 1; + map StringToFloatMap = 2; + map Int32Map = 3; + map Int64Map = 4; + map Uint32Map = 5; + map Uint64Map = 6; + map Sint32Map = 7; + map Sint64Map = 8; + map Fixed32Map = 9; + map Sfixed32Map = 10; + map Fixed64Map = 11; + map Sfixed64Map = 12; + map BoolMap = 13; + map StringMap = 14; + map StringToBytesMap = 15; + map StringToEnumMap = 16; + map StringToMsgMap = 17; +} + +message MessageWithMap { + map name_mapping = 1; + map msg_mapping = 2; + map byte_mapping = 3; +} + +message FloatingPoint { + double f = 1; +} + +message Uint128Pair { + bytes left = 1 [(gogoproto.nullable) = false, (gogoproto.customtype) = "github.com/gogo/protobuf/test/custom.Uint128"]; + bytes right = 2 [(gogoproto.customtype) = "github.com/gogo/protobuf/test/custom.Uint128"]; +} + +message ContainsNestedMap { + message NestedMap { + map NestedMapField = 1; + } +} \ No newline at end of file diff --git a/vendor/github.com/gogo/protobuf/test/theproto3/combos/marshaler/theproto3pb_test.go b/vendor/github.com/gogo/protobuf/test/theproto3/combos/marshaler/theproto3pb_test.go new file mode 100644 index 000000000..95b3e8f59 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/theproto3/combos/marshaler/theproto3pb_test.go @@ -0,0 +1,2186 @@ +// Code generated by protoc-gen-gogo. +// source: combos/marshaler/theproto3.proto +// DO NOT EDIT! + +/* +Package theproto3 is a generated protocol buffer package. + +It is generated from these files: + combos/marshaler/theproto3.proto + +It has these top-level messages: + Message + Nested + AllMaps + AllMapsOrdered + MessageWithMap + FloatingPoint + Uint128Pair + ContainsNestedMap +*/ +package theproto3 + +import testing "testing" +import math_rand "math/rand" +import time "time" +import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" +import github_com_gogo_protobuf_jsonpb "github.com/gogo/protobuf/jsonpb" +import fmt "fmt" +import go_parser "go/parser" +import proto "github.com/gogo/protobuf/proto" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" +import _ "github.com/gogo/protobuf/test/combos/both" + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +func TestMessageProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMessage(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Message{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestMessageMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMessage(popr, false) + size := p.Size() + data := make([]byte, size) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(data) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Message{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkMessageProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Message, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedMessage(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkMessageProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedMessage(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &Message{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNestedProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNested(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Nested{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestNestedMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNested(popr, false) + size := p.Size() + data := make([]byte, size) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(data) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Nested{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkNestedProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Nested, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNested(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNestedProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNested(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &Nested{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestAllMapsProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAllMaps(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &AllMaps{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestAllMapsMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAllMaps(popr, false) + size := p.Size() + data := make([]byte, size) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(data) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &AllMaps{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkAllMapsProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*AllMaps, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedAllMaps(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkAllMapsProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedAllMaps(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &AllMaps{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestAllMapsOrderedProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAllMapsOrdered(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &AllMapsOrdered{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestAllMapsOrderedMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAllMapsOrdered(popr, false) + size := p.Size() + data := make([]byte, size) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(data) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &AllMapsOrdered{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkAllMapsOrderedProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*AllMapsOrdered, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedAllMapsOrdered(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkAllMapsOrderedProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedAllMapsOrdered(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &AllMapsOrdered{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestMessageWithMapProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMessageWithMap(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &MessageWithMap{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestMessageWithMapMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMessageWithMap(popr, false) + size := p.Size() + data := make([]byte, size) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(data) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &MessageWithMap{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkMessageWithMapProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*MessageWithMap, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedMessageWithMap(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkMessageWithMapProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedMessageWithMap(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &MessageWithMap{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestFloatingPointProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedFloatingPoint(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &FloatingPoint{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestFloatingPointMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedFloatingPoint(popr, false) + size := p.Size() + data := make([]byte, size) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(data) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &FloatingPoint{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkFloatingPointProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*FloatingPoint, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedFloatingPoint(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkFloatingPointProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedFloatingPoint(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &FloatingPoint{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestUint128PairProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUint128Pair(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Uint128Pair{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestUint128PairMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUint128Pair(popr, false) + size := p.Size() + data := make([]byte, size) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(data) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Uint128Pair{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkUint128PairProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Uint128Pair, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedUint128Pair(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkUint128PairProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedUint128Pair(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &Uint128Pair{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestContainsNestedMapProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedContainsNestedMap(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &ContainsNestedMap{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestContainsNestedMapMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedContainsNestedMap(popr, false) + size := p.Size() + data := make([]byte, size) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(data) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &ContainsNestedMap{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkContainsNestedMapProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*ContainsNestedMap, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedContainsNestedMap(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkContainsNestedMapProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedContainsNestedMap(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &ContainsNestedMap{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestContainsNestedMap_NestedMapProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedContainsNestedMap_NestedMap(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &ContainsNestedMap_NestedMap{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestContainsNestedMap_NestedMapMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedContainsNestedMap_NestedMap(popr, false) + size := p.Size() + data := make([]byte, size) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(data) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &ContainsNestedMap_NestedMap{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkContainsNestedMap_NestedMapProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*ContainsNestedMap_NestedMap, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedContainsNestedMap_NestedMap(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkContainsNestedMap_NestedMapProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedContainsNestedMap_NestedMap(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &ContainsNestedMap_NestedMap{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestMessageJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMessage(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Message{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNestedJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNested(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Nested{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestAllMapsJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAllMaps(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &AllMaps{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestAllMapsOrderedJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAllMapsOrdered(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &AllMapsOrdered{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestMessageWithMapJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMessageWithMap(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &MessageWithMap{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestFloatingPointJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedFloatingPoint(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &FloatingPoint{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestUint128PairJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUint128Pair(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Uint128Pair{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestContainsNestedMapJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedContainsNestedMap(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &ContainsNestedMap{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestContainsNestedMap_NestedMapJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedContainsNestedMap_NestedMap(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &ContainsNestedMap_NestedMap{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestMessageProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMessage(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &Message{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestMessageProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMessage(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &Message{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNestedProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNested(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &Nested{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNestedProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNested(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &Nested{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestAllMapsProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAllMaps(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &AllMaps{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestAllMapsProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAllMaps(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &AllMaps{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestAllMapsOrderedProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAllMapsOrdered(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &AllMapsOrdered{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestAllMapsOrderedProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAllMapsOrdered(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &AllMapsOrdered{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestMessageWithMapProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMessageWithMap(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &MessageWithMap{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestMessageWithMapProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMessageWithMap(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &MessageWithMap{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestFloatingPointProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedFloatingPoint(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &FloatingPoint{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestFloatingPointProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedFloatingPoint(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &FloatingPoint{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestUint128PairProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUint128Pair(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &Uint128Pair{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestUint128PairProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUint128Pair(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &Uint128Pair{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestContainsNestedMapProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedContainsNestedMap(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &ContainsNestedMap{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestContainsNestedMapProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedContainsNestedMap(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &ContainsNestedMap{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestContainsNestedMap_NestedMapProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedContainsNestedMap_NestedMap(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &ContainsNestedMap_NestedMap{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestContainsNestedMap_NestedMapProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedContainsNestedMap_NestedMap(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &ContainsNestedMap_NestedMap{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestTheproto3Description(t *testing.T) { + Theproto3Description() +} +func TestMessageVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedMessage(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &Message{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNestedVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNested(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &Nested{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestAllMapsVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAllMaps(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &AllMaps{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestAllMapsOrderedVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAllMapsOrdered(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &AllMapsOrdered{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestMessageWithMapVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedMessageWithMap(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &MessageWithMap{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestFloatingPointVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedFloatingPoint(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &FloatingPoint{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestUint128PairVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedUint128Pair(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &Uint128Pair{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestContainsNestedMapVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedContainsNestedMap(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &ContainsNestedMap{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestContainsNestedMap_NestedMapVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedContainsNestedMap_NestedMap(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &ContainsNestedMap_NestedMap{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestMessageFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedMessage(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNestedFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNested(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestAllMapsFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAllMaps(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestAllMapsOrderedFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAllMapsOrdered(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestMessageWithMapFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedMessageWithMap(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestFloatingPointFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedFloatingPoint(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestUint128PairFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedUint128Pair(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestContainsNestedMapFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedContainsNestedMap(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestContainsNestedMap_NestedMapFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedContainsNestedMap_NestedMap(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestMessageGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedMessage(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestNestedGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNested(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestAllMapsGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAllMaps(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestAllMapsOrderedGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAllMapsOrdered(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestMessageWithMapGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedMessageWithMap(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestFloatingPointGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedFloatingPoint(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestUint128PairGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedUint128Pair(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestContainsNestedMapGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedContainsNestedMap(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestContainsNestedMap_NestedMapGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedContainsNestedMap_NestedMap(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestMessageSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMessage(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkMessageSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Message, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedMessage(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNestedSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNested(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNestedSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Nested, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNested(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestAllMapsSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAllMaps(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkAllMapsSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*AllMaps, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedAllMaps(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestAllMapsOrderedSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAllMapsOrdered(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkAllMapsOrderedSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*AllMapsOrdered, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedAllMapsOrdered(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestMessageWithMapSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMessageWithMap(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkMessageWithMapSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*MessageWithMap, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedMessageWithMap(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestFloatingPointSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedFloatingPoint(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkFloatingPointSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*FloatingPoint, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedFloatingPoint(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestUint128PairSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUint128Pair(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkUint128PairSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Uint128Pair, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedUint128Pair(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestContainsNestedMapSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedContainsNestedMap(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkContainsNestedMapSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*ContainsNestedMap, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedContainsNestedMap(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestContainsNestedMap_NestedMapSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedContainsNestedMap_NestedMap(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkContainsNestedMap_NestedMapSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*ContainsNestedMap_NestedMap, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedContainsNestedMap_NestedMap(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestMessageStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedMessage(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNestedStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNested(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestAllMapsStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAllMaps(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestAllMapsOrderedStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAllMapsOrdered(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestMessageWithMapStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedMessageWithMap(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestFloatingPointStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedFloatingPoint(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestUint128PairStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedUint128Pair(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestContainsNestedMapStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedContainsNestedMap(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestContainsNestedMap_NestedMapStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedContainsNestedMap_NestedMap(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} + +//These tests are generated by github.com/gogo/protobuf/plugin/testgen diff --git a/vendor/github.com/gogo/protobuf/test/theproto3/combos/neither/proto3_test.go b/vendor/github.com/gogo/protobuf/test/theproto3/combos/neither/proto3_test.go new file mode 100644 index 000000000..b41f17859 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/theproto3/combos/neither/proto3_test.go @@ -0,0 +1,61 @@ +// Copyright (c) 2015, Vastech SA (PTY) LTD. All rights reserved. +// http://github.com/gogo/protobuf/gogoproto +// +// 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 theproto3 + +import ( + "reflect" + "testing" + + "github.com/gogo/protobuf/proto" +) + +func TestNilMaps(t *testing.T) { + m := &AllMaps{StringToMsgMap: map[string]*FloatingPoint{"a": nil}} + if _, err := proto.Marshal(m); err == nil { + t.Fatalf("expected error") + } +} + +func TestCustomTypeSize(t *testing.T) { + m := &Uint128Pair{} + m.Size() // Should not panic. +} + +func TestCustomTypeMarshalUnmarshal(t *testing.T) { + m1 := &Uint128Pair{} + if b, err := proto.Marshal(m1); err != nil { + t.Fatal(err) + } else { + m2 := &Uint128Pair{} + if err := proto.Unmarshal(b, m2); err != nil { + t.Fatal(err) + } + if !reflect.DeepEqual(m1, m2) { + t.Errorf("expected %+v, got %+v", m1, m2) + } + } +} diff --git a/vendor/github.com/gogo/protobuf/test/theproto3/combos/neither/theproto3.pb.go b/vendor/github.com/gogo/protobuf/test/theproto3/combos/neither/theproto3.pb.go new file mode 100644 index 000000000..3a78a3841 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/theproto3/combos/neither/theproto3.pb.go @@ -0,0 +1,4752 @@ +// Code generated by protoc-gen-gogo. +// source: combos/neither/theproto3.proto +// DO NOT EDIT! + +/* + Package theproto3 is a generated protocol buffer package. + + It is generated from these files: + combos/neither/theproto3.proto + + It has these top-level messages: + Message + Nested + AllMaps + AllMapsOrdered + MessageWithMap + FloatingPoint + Uint128Pair + ContainsNestedMap +*/ +package theproto3 + +import proto "github.com/gogo/protobuf/proto" +import fmt "fmt" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" +import test "github.com/gogo/protobuf/test/combos/both" + +import github_com_gogo_protobuf_test_custom "github.com/gogo/protobuf/test/custom" + +import github_com_gogo_protobuf_protoc_gen_gogo_descriptor "github.com/gogo/protobuf/protoc-gen-gogo/descriptor" +import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" +import compress_gzip "compress/gzip" +import bytes "bytes" +import io_ioutil "io/ioutil" + +import strconv "strconv" + +import strings "strings" +import sort "sort" +import reflect "reflect" +import github_com_gogo_protobuf_sortkeys "github.com/gogo/protobuf/sortkeys" + +// 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. +const _ = proto.GoGoProtoPackageIsVersion1 + +type MapEnum int32 + +const ( + MA MapEnum = 0 + MB MapEnum = 1 + MC MapEnum = 2 +) + +var MapEnum_name = map[int32]string{ + 0: "MA", + 1: "MB", + 2: "MC", +} +var MapEnum_value = map[string]int32{ + "MA": 0, + "MB": 1, + "MC": 2, +} + +func (MapEnum) EnumDescriptor() ([]byte, []int) { return fileDescriptorTheproto3, []int{0} } + +type Message_Humour int32 + +const ( + UNKNOWN Message_Humour = 0 + PUNS Message_Humour = 1 + SLAPSTICK Message_Humour = 2 + BILL_BAILEY Message_Humour = 3 +) + +var Message_Humour_name = map[int32]string{ + 0: "UNKNOWN", + 1: "PUNS", + 2: "SLAPSTICK", + 3: "BILL_BAILEY", +} +var Message_Humour_value = map[string]int32{ + "UNKNOWN": 0, + "PUNS": 1, + "SLAPSTICK": 2, + "BILL_BAILEY": 3, +} + +func (Message_Humour) EnumDescriptor() ([]byte, []int) { return fileDescriptorTheproto3, []int{0, 0} } + +type Message struct { + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + Hilarity Message_Humour `protobuf:"varint,2,opt,name=hilarity,proto3,enum=theproto3.Message_Humour" json:"hilarity,omitempty"` + HeightInCm uint32 `protobuf:"varint,3,opt,name=height_in_cm,json=heightInCm,proto3" json:"height_in_cm,omitempty"` + Data []byte `protobuf:"bytes,4,opt,name=data,proto3" json:"data,omitempty"` + ResultCount int64 `protobuf:"varint,7,opt,name=result_count,json=resultCount,proto3" json:"result_count,omitempty"` + TrueScotsman bool `protobuf:"varint,8,opt,name=true_scotsman,json=trueScotsman,proto3" json:"true_scotsman,omitempty"` + Score float32 `protobuf:"fixed32,9,opt,name=score,proto3" json:"score,omitempty"` + Key []uint64 `protobuf:"varint,5,rep,name=key" json:"key,omitempty"` + Nested *Nested `protobuf:"bytes,6,opt,name=nested" json:"nested,omitempty"` + Terrain map[int64]*Nested `protobuf:"bytes,10,rep,name=terrain" json:"terrain,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value"` + Proto2Field *test.NinOptNative `protobuf:"bytes,11,opt,name=proto2_field,json=proto2Field" json:"proto2_field,omitempty"` + Proto2Value map[int64]*test.NinOptEnum `protobuf:"bytes,13,rep,name=proto2_value,json=proto2Value" json:"proto2_value,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value"` +} + +func (m *Message) Reset() { *m = Message{} } +func (*Message) ProtoMessage() {} +func (*Message) Descriptor() ([]byte, []int) { return fileDescriptorTheproto3, []int{0} } + +type Nested struct { + Bunny string `protobuf:"bytes,1,opt,name=bunny,proto3" json:"bunny,omitempty"` +} + +func (m *Nested) Reset() { *m = Nested{} } +func (*Nested) ProtoMessage() {} +func (*Nested) Descriptor() ([]byte, []int) { return fileDescriptorTheproto3, []int{1} } + +type AllMaps struct { + StringToDoubleMap map[string]float64 `protobuf:"bytes,1,rep,name=StringToDoubleMap,json=stringToDoubleMap" json:"StringToDoubleMap,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"fixed64,2,opt,name=value,proto3"` + StringToFloatMap map[string]float32 `protobuf:"bytes,2,rep,name=StringToFloatMap,json=stringToFloatMap" json:"StringToFloatMap,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"fixed32,2,opt,name=value,proto3"` + Int32Map map[int32]int32 `protobuf:"bytes,3,rep,name=Int32Map,json=int32Map" json:"Int32Map,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` + Int64Map map[int64]int64 `protobuf:"bytes,4,rep,name=Int64Map,json=int64Map" json:"Int64Map,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` + Uint32Map map[uint32]uint32 `protobuf:"bytes,5,rep,name=Uint32Map,json=uint32Map" json:"Uint32Map,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` + Uint64Map map[uint64]uint64 `protobuf:"bytes,6,rep,name=Uint64Map,json=uint64Map" json:"Uint64Map,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` + Sint32Map map[int32]int32 `protobuf:"bytes,7,rep,name=Sint32Map,json=sint32Map" json:"Sint32Map,omitempty" protobuf_key:"zigzag32,1,opt,name=key,proto3" protobuf_val:"zigzag32,2,opt,name=value,proto3"` + Sint64Map map[int64]int64 `protobuf:"bytes,8,rep,name=Sint64Map,json=sint64Map" json:"Sint64Map,omitempty" protobuf_key:"zigzag64,1,opt,name=key,proto3" protobuf_val:"zigzag64,2,opt,name=value,proto3"` + Fixed32Map map[uint32]uint32 `protobuf:"bytes,9,rep,name=Fixed32Map,json=fixed32Map" json:"Fixed32Map,omitempty" protobuf_key:"fixed32,1,opt,name=key,proto3" protobuf_val:"fixed32,2,opt,name=value,proto3"` + Sfixed32Map map[int32]int32 `protobuf:"bytes,10,rep,name=Sfixed32Map,json=sfixed32Map" json:"Sfixed32Map,omitempty" protobuf_key:"fixed32,1,opt,name=key,proto3" protobuf_val:"fixed32,2,opt,name=value,proto3"` + Fixed64Map map[uint64]uint64 `protobuf:"bytes,11,rep,name=Fixed64Map,json=fixed64Map" json:"Fixed64Map,omitempty" protobuf_key:"fixed64,1,opt,name=key,proto3" protobuf_val:"fixed64,2,opt,name=value,proto3"` + Sfixed64Map map[int64]int64 `protobuf:"bytes,12,rep,name=Sfixed64Map,json=sfixed64Map" json:"Sfixed64Map,omitempty" protobuf_key:"fixed64,1,opt,name=key,proto3" protobuf_val:"fixed64,2,opt,name=value,proto3"` + BoolMap map[bool]bool `protobuf:"bytes,13,rep,name=BoolMap,json=boolMap" json:"BoolMap,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` + StringMap map[string]string `protobuf:"bytes,14,rep,name=StringMap,json=stringMap" json:"StringMap,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + StringToBytesMap map[string][]byte `protobuf:"bytes,15,rep,name=StringToBytesMap,json=stringToBytesMap" json:"StringToBytesMap,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + StringToEnumMap map[string]MapEnum `protobuf:"bytes,16,rep,name=StringToEnumMap,json=stringToEnumMap" json:"StringToEnumMap,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3,enum=theproto3.MapEnum"` + StringToMsgMap map[string]*FloatingPoint `protobuf:"bytes,17,rep,name=StringToMsgMap,json=stringToMsgMap" json:"StringToMsgMap,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value"` +} + +func (m *AllMaps) Reset() { *m = AllMaps{} } +func (*AllMaps) ProtoMessage() {} +func (*AllMaps) Descriptor() ([]byte, []int) { return fileDescriptorTheproto3, []int{2} } + +type AllMapsOrdered struct { + StringToDoubleMap map[string]float64 `protobuf:"bytes,1,rep,name=StringToDoubleMap,json=stringToDoubleMap" json:"StringToDoubleMap,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"fixed64,2,opt,name=value,proto3"` + StringToFloatMap map[string]float32 `protobuf:"bytes,2,rep,name=StringToFloatMap,json=stringToFloatMap" json:"StringToFloatMap,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"fixed32,2,opt,name=value,proto3"` + Int32Map map[int32]int32 `protobuf:"bytes,3,rep,name=Int32Map,json=int32Map" json:"Int32Map,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` + Int64Map map[int64]int64 `protobuf:"bytes,4,rep,name=Int64Map,json=int64Map" json:"Int64Map,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` + Uint32Map map[uint32]uint32 `protobuf:"bytes,5,rep,name=Uint32Map,json=uint32Map" json:"Uint32Map,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` + Uint64Map map[uint64]uint64 `protobuf:"bytes,6,rep,name=Uint64Map,json=uint64Map" json:"Uint64Map,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` + Sint32Map map[int32]int32 `protobuf:"bytes,7,rep,name=Sint32Map,json=sint32Map" json:"Sint32Map,omitempty" protobuf_key:"zigzag32,1,opt,name=key,proto3" protobuf_val:"zigzag32,2,opt,name=value,proto3"` + Sint64Map map[int64]int64 `protobuf:"bytes,8,rep,name=Sint64Map,json=sint64Map" json:"Sint64Map,omitempty" protobuf_key:"zigzag64,1,opt,name=key,proto3" protobuf_val:"zigzag64,2,opt,name=value,proto3"` + Fixed32Map map[uint32]uint32 `protobuf:"bytes,9,rep,name=Fixed32Map,json=fixed32Map" json:"Fixed32Map,omitempty" protobuf_key:"fixed32,1,opt,name=key,proto3" protobuf_val:"fixed32,2,opt,name=value,proto3"` + Sfixed32Map map[int32]int32 `protobuf:"bytes,10,rep,name=Sfixed32Map,json=sfixed32Map" json:"Sfixed32Map,omitempty" protobuf_key:"fixed32,1,opt,name=key,proto3" protobuf_val:"fixed32,2,opt,name=value,proto3"` + Fixed64Map map[uint64]uint64 `protobuf:"bytes,11,rep,name=Fixed64Map,json=fixed64Map" json:"Fixed64Map,omitempty" protobuf_key:"fixed64,1,opt,name=key,proto3" protobuf_val:"fixed64,2,opt,name=value,proto3"` + Sfixed64Map map[int64]int64 `protobuf:"bytes,12,rep,name=Sfixed64Map,json=sfixed64Map" json:"Sfixed64Map,omitempty" protobuf_key:"fixed64,1,opt,name=key,proto3" protobuf_val:"fixed64,2,opt,name=value,proto3"` + BoolMap map[bool]bool `protobuf:"bytes,13,rep,name=BoolMap,json=boolMap" json:"BoolMap,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` + StringMap map[string]string `protobuf:"bytes,14,rep,name=StringMap,json=stringMap" json:"StringMap,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + StringToBytesMap map[string][]byte `protobuf:"bytes,15,rep,name=StringToBytesMap,json=stringToBytesMap" json:"StringToBytesMap,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + StringToEnumMap map[string]MapEnum `protobuf:"bytes,16,rep,name=StringToEnumMap,json=stringToEnumMap" json:"StringToEnumMap,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3,enum=theproto3.MapEnum"` + StringToMsgMap map[string]*FloatingPoint `protobuf:"bytes,17,rep,name=StringToMsgMap,json=stringToMsgMap" json:"StringToMsgMap,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value"` +} + +func (m *AllMapsOrdered) Reset() { *m = AllMapsOrdered{} } +func (*AllMapsOrdered) ProtoMessage() {} +func (*AllMapsOrdered) Descriptor() ([]byte, []int) { return fileDescriptorTheproto3, []int{3} } + +type MessageWithMap struct { + NameMapping map[int32]string `protobuf:"bytes,1,rep,name=name_mapping,json=nameMapping" json:"name_mapping,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + MsgMapping map[int64]*FloatingPoint `protobuf:"bytes,2,rep,name=msg_mapping,json=msgMapping" json:"msg_mapping,omitempty" protobuf_key:"zigzag64,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value"` + ByteMapping map[bool][]byte `protobuf:"bytes,3,rep,name=byte_mapping,json=byteMapping" json:"byte_mapping,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` +} + +func (m *MessageWithMap) Reset() { *m = MessageWithMap{} } +func (*MessageWithMap) ProtoMessage() {} +func (*MessageWithMap) Descriptor() ([]byte, []int) { return fileDescriptorTheproto3, []int{4} } + +type FloatingPoint struct { + F float64 `protobuf:"fixed64,1,opt,name=f,proto3" json:"f,omitempty"` +} + +func (m *FloatingPoint) Reset() { *m = FloatingPoint{} } +func (*FloatingPoint) ProtoMessage() {} +func (*FloatingPoint) Descriptor() ([]byte, []int) { return fileDescriptorTheproto3, []int{5} } + +type Uint128Pair struct { + Left github_com_gogo_protobuf_test_custom.Uint128 `protobuf:"bytes,1,opt,name=left,proto3,customtype=github.com/gogo/protobuf/test/custom.Uint128" json:"left"` + Right *github_com_gogo_protobuf_test_custom.Uint128 `protobuf:"bytes,2,opt,name=right,proto3,customtype=github.com/gogo/protobuf/test/custom.Uint128" json:"right,omitempty"` +} + +func (m *Uint128Pair) Reset() { *m = Uint128Pair{} } +func (*Uint128Pair) ProtoMessage() {} +func (*Uint128Pair) Descriptor() ([]byte, []int) { return fileDescriptorTheproto3, []int{6} } + +type ContainsNestedMap struct { +} + +func (m *ContainsNestedMap) Reset() { *m = ContainsNestedMap{} } +func (*ContainsNestedMap) ProtoMessage() {} +func (*ContainsNestedMap) Descriptor() ([]byte, []int) { return fileDescriptorTheproto3, []int{7} } + +type ContainsNestedMap_NestedMap struct { + NestedMapField map[string]float64 `protobuf:"bytes,1,rep,name=NestedMapField,json=nestedMapField" json:"NestedMapField,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"fixed64,2,opt,name=value,proto3"` +} + +func (m *ContainsNestedMap_NestedMap) Reset() { *m = ContainsNestedMap_NestedMap{} } +func (*ContainsNestedMap_NestedMap) ProtoMessage() {} +func (*ContainsNestedMap_NestedMap) Descriptor() ([]byte, []int) { + return fileDescriptorTheproto3, []int{7, 0} +} + +func init() { + proto.RegisterType((*Message)(nil), "theproto3.Message") + proto.RegisterType((*Nested)(nil), "theproto3.Nested") + proto.RegisterType((*AllMaps)(nil), "theproto3.AllMaps") + proto.RegisterType((*AllMapsOrdered)(nil), "theproto3.AllMapsOrdered") + proto.RegisterType((*MessageWithMap)(nil), "theproto3.MessageWithMap") + proto.RegisterType((*FloatingPoint)(nil), "theproto3.FloatingPoint") + proto.RegisterType((*Uint128Pair)(nil), "theproto3.Uint128Pair") + proto.RegisterType((*ContainsNestedMap)(nil), "theproto3.ContainsNestedMap") + proto.RegisterType((*ContainsNestedMap_NestedMap)(nil), "theproto3.ContainsNestedMap.NestedMap") + proto.RegisterEnum("theproto3.MapEnum", MapEnum_name, MapEnum_value) + proto.RegisterEnum("theproto3.Message_Humour", Message_Humour_name, Message_Humour_value) +} +func (this *Message) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return Theproto3Description() +} +func (this *Nested) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return Theproto3Description() +} +func (this *AllMaps) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return Theproto3Description() +} +func (this *AllMapsOrdered) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return Theproto3Description() +} +func (this *MessageWithMap) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return Theproto3Description() +} +func (this *FloatingPoint) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return Theproto3Description() +} +func (this *Uint128Pair) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return Theproto3Description() +} +func (this *ContainsNestedMap) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return Theproto3Description() +} +func (this *ContainsNestedMap_NestedMap) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return Theproto3Description() +} +func Theproto3Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + d := &github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet{} + var gzipped = []byte{ + // 7457 bytes of a gzipped FileDescriptorSet + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xec, 0x7d, 0x7b, 0x6c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, 0x6d, 0xc7, 0xad, 0x37, 0x9d, 0xec, 0x20, 0x61, 0x72, + 0xb7, 0x8f, 0x15, 0xed, 0x46, 0x4d, 0x67, 0xe1, 0xe1, 0xcc, 0x4b, 0x30, 0xd8, 0x3c, 0x68, 0xa3, + 0x6f, 0x6e, 0x36, 0x81, 0xec, 0x93, 0x9c, 0x3d, 0xee, 0xeb, 0x08, 0x6b, 0x94, 0xc6, 0xe2, 0xc4, + 0xe6, 0x12, 0x64, 0xdc, 0x66, 0xa7, 0x55, 0xb5, 0xcb, 0xd5, 0x66, 0xcd, 0x2e, 0xd7, 0x9d, 0x9d, + 0x66, 0x76, 0x88, 0x30, 0x38, 0xd9, 0x3d, 0x11, 0x42, 0x58, 0x44, 0x74, 0x4b, 0x88, 0xcc, 0x4a, + 0xbb, 0xca, 0xb5, 0x39, 0x0e, 0x03, 0xee, 0x75, 0xa7, 0x5d, 0x79, 0x21, 0x9b, 0x22, 0x1e, 0xc2, + 0xae, 0x72, 0x3f, 0x89, 0xc3, 0x48, 0x3f, 0x2e, 0xf6, 0x20, 0xc4, 0x77, 0xf0, 0x2c, 0x91, 0x83, + 0x1d, 0x42, 0x07, 0x14, 0xa3, 0x2a, 0x71, 0xe0, 0x26, 0x95, 0x38, 0x0f, 0x49, 0xc7, 0x76, 0xdb, + 0x76, 0x8d, 0x7a, 0x84, 0xd1, 0xa7, 0x4f, 0x01, 0x05, 0x75, 0xbb, 0x54, 0xec, 0xa6, 0x5c, 0xea, + 0x49, 0x18, 0x11, 0x22, 0x95, 0x5b, 0x15, 0x67, 0x97, 0xfb, 0xe6, 0xb9, 0x30, 0x49, 0xa6, 0x4b, + 0x1c, 0x67, 0x61, 0x98, 0x95, 0xb6, 0x95, 0x6b, 0x73, 0x01, 0xa0, 0xe9, 0xd8, 0xcd, 0x1d, 0x14, + 0x5e, 0xd5, 0x06, 0xf2, 0x13, 0x7f, 0x2d, 0xad, 0x61, 0x92, 0x2e, 0x2d, 0x35, 0x69, 0x6b, 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, 0x79, 0xbf, 0x42, 0x2b, 0x49, + 0x61, 0x89, 0x31, 0x46, 0x85, 0x6e, 0xef, 0x9f, 0x40, 0x34, 0x8b, 0x84, 0xc4, 0x5c, 0x86, 0x93, + 0x48, 0x65, 0xa8, 0xd6, 0x74, 0x6a, 0x95, 0x56, 0xad, 0xec, 0x6d, 0x17, 0x94, 0x2b, 0x55, 0xe4, + 0x07, 0x6e, 0x93, 0xae, 0x24, 0x82, 0xcb, 0x71, 0xa7, 0xb9, 0xc1, 0x88, 0xbd, 0x14, 0x3b, 0xcf, + 0x48, 0x35, 0xaf, 0x31, 0x82, 0xbc, 0x06, 0xd5, 0x5e, 0xfb, 0x95, 0x03, 0xe4, 0x36, 0xed, 0xd6, + 0x75, 0x52, 0xbd, 0x25, 0xac, 0x04, 0x6a, 0x28, 0xe1, 0xeb, 0x37, 0xcf, 0x06, 0xb2, 0x1e, 0xff, + 0xd1, 0x80, 0x94, 0x5c, 0xc1, 0xe1, 0x82, 0xb8, 0x4a, 0xd2, 0x7c, 0x84, 0x64, 0x81, 0xbb, 0x7a, + 0xd6, 0x7b, 0xd3, 0x45, 0x9c, 0xff, 0xf3, 0x03, 0xb4, 0xae, 0xb2, 0x28, 0x12, 0xaf, 0xbd, 0xd8, + 0xd7, 0x6c, 0x5a, 0xad, 0x27, 0x2c, 0x76, 0x85, 0x92, 0xdd, 0xc0, 0x33, 0x2e, 0xe1, 0x3d, 0x40, + 0x78, 0x9f, 0xe9, 0xcd, 0xfb, 0xda, 0x06, 0x61, 0x3e, 0x74, 0x6d, 0xa3, 0xbc, 0xba, 0x66, 0xad, + 0xcc, 0x2f, 0x5b, 0x0c, 0x6e, 0xde, 0x0e, 0xb1, 0x46, 0xe5, 0x3d, 0xd7, 0xd5, 0x95, 0x82, 0x34, + 0xf5, 0xab, 0x78, 0xc4, 0x01, 0x6f, 0x79, 0xa8, 0xf9, 0x99, 0x34, 0xbd, 0x89, 0xae, 0x7f, 0x0e, + 0xe2, 0x44, 0x5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 0xf5, 0x5f, 0xcc, 0x8e, 0xe0, 0xad, 0x5e, 0xb5, + 0xff, 0x62, 0xee, 0x7d, 0xc4, 0xbc, 0x8e, 0x67, 0xde, 0x71, 0xd5, 0xbc, 0xc2, 0xb0, 0xe3, 0xaa, + 0x61, 0x85, 0x49, 0xc7, 0x55, 0x93, 0x0a, 0x63, 0x8e, 0xab, 0xc6, 0x14, 0x66, 0x1c, 0x57, 0xcd, + 0x28, 0x0c, 0x38, 0xae, 0x1a, 0x50, 0x98, 0x6e, 0x5c, 0x35, 0x9d, 0x30, 0xda, 0xb8, 0x6a, 0x34, + 0x61, 0xae, 0x71, 0xd5, 0x5c, 0xc2, 0x50, 0x59, 0xcd, 0x50, 0x9e, 0x89, 0xb2, 0x9a, 0x89, 0x3c, + 0xe3, 0x64, 0x35, 0xe3, 0x78, 0x66, 0xc9, 0x6a, 0x66, 0xf1, 0x0c, 0x92, 0xd5, 0x0c, 0xe2, 0x99, + 0x22, 0xab, 0x99, 0xc2, 0x33, 0x02, 0x8b, 0x31, 0xcb, 0x3e, 0xf0, 0x89, 0x31, 0xa3, 0x67, 0x8c, + 0x19, 0x3d, 0x63, 0xcc, 0xe8, 0x19, 0x63, 0x46, 0xcf, 0x18, 0x33, 0x7a, 0xc6, 0x98, 0xd1, 0x33, + 0xc6, 0x8c, 0x9e, 0x31, 0x66, 0xf4, 0x8c, 0x31, 0xa3, 0x77, 0x8c, 0x19, 0x21, 0x31, 0x66, 0x84, + 0xc4, 0x98, 0x11, 0x12, 0x63, 0x46, 0x48, 0x8c, 0x19, 0x21, 0x31, 0x66, 0x04, 0xc6, 0x98, 0x67, + 0xde, 0x71, 0xd5, 0xbc, 0xbe, 0x31, 0x66, 0x04, 0xc4, 0x98, 0x11, 0x10, 0x63, 0x46, 0x40, 0x8c, + 0x19, 0x01, 0x31, 0x66, 0x04, 0xc4, 0x98, 0x11, 0x10, 0x63, 0x46, 0x40, 0x8c, 0x19, 0x41, 0x31, + 0x66, 0x04, 0xc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 0x4e, 0xce, + 0x8e, 0x50, 0x02, 0xd4, 0xc0, 0x28, 0x8c, 0x8a, 0x53, 0x43, 0x2c, 0x62, 0xcb, 0x76, 0x65, 0x87, + 0x09, 0x01, 0x94, 0x06, 0xb7, 0x58, 0xb1, 0x06, 0xfa, 0x97, 0x0d, 0xf8, 0x24, 0x24, 0x38, 0x63, + 0xf3, 0x0c, 0x46, 0xec, 0xb4, 0xd9, 0xb0, 0x0c, 0x81, 0xc5, 0x61, 0x2b, 0x17, 0xc2, 0xed, 0xb4, + 0xcd, 0xb3, 0x10, 0xb7, 0xea, 0xbb, 0x7b, 0x6d, 0x36, 0x78, 0x37, 0x59, 0xbc, 0x85, 0xbb, 0x73, + 0x4f, 0xc1, 0x90, 0x90, 0xe8, 0x0d, 0x66, 0xbd, 0x40, 0xa7, 0x86, 0xee, 0x84, 0xa5, 0xf5, 0x84, + 0xef, 0x5b, 0xb2, 0x1f, 0x79, 0x9e, 0x82, 0x04, 0x52, 0xb3, 0x97, 0xf4, 0x79, 0x45, 0x8a, 0x4f, + 0xe4, 0x49, 0x6b, 0xee, 0x7d, 0x11, 0x48, 0x2c, 0xd8, 0xf6, 0x01, 0x51, 0xf8, 0xdd, 0x10, 0x5b, + 0x68, 0x3e, 0xef, 0x30, 0x01, 0x47, 0x99, 0x46, 0x71, 0x37, 0xd3, 0x69, 0xac, 0x86, 0xba, 0x11, + 0x99, 0xa4, 0xf7, 0xa3, 0x42, 0xef, 0x12, 0x1d, 0xd1, 0x7d, 0x4e, 0xd1, 0x3d, 0x33, 0x20, 0x26, + 0xea, 0xd2, 0xff, 0x65, 0x48, 0x4a, 0xa3, 0x98, 0x93, 0x4c, 0x8c, 0xa8, 0x0e, 0x94, 0x75, 0x85, + 0x25, 0xc9, 0xd9, 0x30, 0xac, 0x0c, 0x8c, 0xa1, 0x92, 0x8a, 0x03, 0xa0, 0x44, 0xcd, 0x53, 0xaa, + 0x9a, 0xfd, 0x49, 0x99, 0xaa, 0x67, 0xa8,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 0x56, 0x2f, 0xb2, 0x83, 0x7f, 0x1e, 0x9d, 0x64, 0x07, 0xd5, 0xeb, 0x95, 0x7a, 0xcb, + 0x7c, 0x0c, 0xc8, 0xaf, 0x61, 0xd8, 0x61, 0xfc, 0xcd, 0xfd, 0x36, 0x93, 0xfe, 0x9e, 0x66, 0x11, + 0xe8, 0x8f, 0x65, 0x6e, 0xfe, 0xc7, 0xa5, 0xf4, 0xb7, 0x36, 0x37, 0x22, 0x30, 0xca, 0x9e, 0xa3, + 0x74, 0xd9, 0xd3, 0xb5, 0x68, 0x85, 0xfc, 0x72, 0x04, 0x86, 0xc4, 0x95, 0xb9, 0x0d, 0x69, 0x71, + 0x41, 0x9f, 0xe0, 0xa6, 0x9e, 0x9a, 0x97, 0x34, 0xdc, 0xc5, 0x63, 0xda, 0xe7, 0x1b, 0x3d, 0xbe, + 0xa2, 0x6b, 0xb2, 0xa3, 0x34, 0x4e, 0xcc, 0xc3, 0x51, 0x1f, 0xb2, 0xc3, 0x2c, 0xc8, 0x53, 0xa7, + 0x61, 0x90, 0x85, 0x36, 0x3e, 0x2e, 0x5c, 0xc1, 0xc7, 0x8d, 0xf8, 0x2f, 0x3e, 0xc2, 0xc4, 0x7f, + 0x8b, 0x99, 0x68, 0x61, 0xf9, 0x26, 0x8e, 0x90, 0x8e, 0xbc, 0x8a, 0x3e, 0x7e, 0x47, 0x48, 0xdb, + 0x03, 0x74, 0xee, 0xff, 0x19, 0x00, 0x00, 0xff, 0xff, 0x09, 0xf8, 0xe0, 0x19, 0x76, 0x79, 0x00, + 0x00, + } + r := bytes.NewReader(gzipped) + gzipr, err := compress_gzip.NewReader(r) + if err != nil { + panic(err) + } + ungzipped, err := io_ioutil.ReadAll(gzipr) + if err != nil { + panic(err) + } + if err := github_com_gogo_protobuf_proto.Unmarshal(ungzipped, d); err != nil { + panic(err) + } + return d +} +func (x MapEnum) String() string { + s, ok := MapEnum_name[int32(x)] + if ok { + return s + } + return strconv.Itoa(int(x)) +} +func (x Message_Humour) String() string { + s, ok := Message_Humour_name[int32(x)] + if ok { + return s + } + return strconv.Itoa(int(x)) +} +func (this *Message) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*Message) + if !ok { + that2, ok := that.(Message) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *Message") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *Message but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *Message 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.Hilarity != that1.Hilarity { + return fmt.Errorf("Hilarity this(%v) Not Equal that(%v)", this.Hilarity, that1.Hilarity) + } + if this.HeightInCm != that1.HeightInCm { + return fmt.Errorf("HeightInCm this(%v) Not Equal that(%v)", this.HeightInCm, that1.HeightInCm) + } + if !bytes.Equal(this.Data, that1.Data) { + return fmt.Errorf("Data this(%v) Not Equal that(%v)", this.Data, that1.Data) + } + if this.ResultCount != that1.ResultCount { + return fmt.Errorf("ResultCount this(%v) Not Equal that(%v)", this.ResultCount, that1.ResultCount) + } + if this.TrueScotsman != that1.TrueScotsman { + return fmt.Errorf("TrueScotsman this(%v) Not Equal that(%v)", this.TrueScotsman, that1.TrueScotsman) + } + if this.Score != that1.Score { + return fmt.Errorf("Score this(%v) Not Equal that(%v)", this.Score, that1.Score) + } + if len(this.Key) != len(that1.Key) { + return fmt.Errorf("Key this(%v) Not Equal that(%v)", len(this.Key), len(that1.Key)) + } + for i := range this.Key { + if this.Key[i] != that1.Key[i] { + return fmt.Errorf("Key this[%v](%v) Not Equal that[%v](%v)", i, this.Key[i], i, that1.Key[i]) + } + } + if !this.Nested.Equal(that1.Nested) { + return fmt.Errorf("Nested this(%v) Not Equal that(%v)", this.Nested, that1.Nested) + } + if len(this.Terrain) != len(that1.Terrain) { + return fmt.Errorf("Terrain this(%v) Not Equal that(%v)", len(this.Terrain), len(that1.Terrain)) + } + for i := range this.Terrain { + if !this.Terrain[i].Equal(that1.Terrain[i]) { + return fmt.Errorf("Terrain this[%v](%v) Not Equal that[%v](%v)", i, this.Terrain[i], i, that1.Terrain[i]) + } + } + if !this.Proto2Field.Equal(that1.Proto2Field) { + return fmt.Errorf("Proto2Field this(%v) Not Equal that(%v)", this.Proto2Field, that1.Proto2Field) + } + if len(this.Proto2Value) != len(that1.Proto2Value) { + return fmt.Errorf("Proto2Value this(%v) Not Equal that(%v)", len(this.Proto2Value), len(that1.Proto2Value)) + } + for i := range this.Proto2Value { + if !this.Proto2Value[i].Equal(that1.Proto2Value[i]) { + return fmt.Errorf("Proto2Value this[%v](%v) Not Equal that[%v](%v)", i, this.Proto2Value[i], i, that1.Proto2Value[i]) + } + } + return nil +} +func (this *Message) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*Message) + if !ok { + that2, ok := that.(Message) + 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.Hilarity != that1.Hilarity { + return false + } + if this.HeightInCm != that1.HeightInCm { + return false + } + if !bytes.Equal(this.Data, that1.Data) { + return false + } + if this.ResultCount != that1.ResultCount { + return false + } + if this.TrueScotsman != that1.TrueScotsman { + return false + } + if this.Score != that1.Score { + return false + } + if len(this.Key) != len(that1.Key) { + return false + } + for i := range this.Key { + if this.Key[i] != that1.Key[i] { + return false + } + } + if !this.Nested.Equal(that1.Nested) { + return false + } + if len(this.Terrain) != len(that1.Terrain) { + return false + } + for i := range this.Terrain { + if !this.Terrain[i].Equal(that1.Terrain[i]) { + return false + } + } + if !this.Proto2Field.Equal(that1.Proto2Field) { + return false + } + if len(this.Proto2Value) != len(that1.Proto2Value) { + return false + } + for i := range this.Proto2Value { + if !this.Proto2Value[i].Equal(that1.Proto2Value[i]) { + return false + } + } + return true +} +func (this *Nested) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*Nested) + if !ok { + that2, ok := that.(Nested) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *Nested") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *Nested but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *Nested but is not nil && this == nil") + } + if this.Bunny != that1.Bunny { + return fmt.Errorf("Bunny this(%v) Not Equal that(%v)", this.Bunny, that1.Bunny) + } + return nil +} +func (this *Nested) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*Nested) + if !ok { + that2, ok := that.(Nested) + 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.Bunny != that1.Bunny { + return false + } + return true +} +func (this *AllMaps) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*AllMaps) + if !ok { + that2, ok := that.(AllMaps) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *AllMaps") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *AllMaps but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *AllMaps but is not nil && this == nil") + } + if len(this.StringToDoubleMap) != len(that1.StringToDoubleMap) { + return fmt.Errorf("StringToDoubleMap this(%v) Not Equal that(%v)", len(this.StringToDoubleMap), len(that1.StringToDoubleMap)) + } + for i := range this.StringToDoubleMap { + if this.StringToDoubleMap[i] != that1.StringToDoubleMap[i] { + return fmt.Errorf("StringToDoubleMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringToDoubleMap[i], i, that1.StringToDoubleMap[i]) + } + } + if len(this.StringToFloatMap) != len(that1.StringToFloatMap) { + return fmt.Errorf("StringToFloatMap this(%v) Not Equal that(%v)", len(this.StringToFloatMap), len(that1.StringToFloatMap)) + } + for i := range this.StringToFloatMap { + if this.StringToFloatMap[i] != that1.StringToFloatMap[i] { + return fmt.Errorf("StringToFloatMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringToFloatMap[i], i, that1.StringToFloatMap[i]) + } + } + if len(this.Int32Map) != len(that1.Int32Map) { + return fmt.Errorf("Int32Map this(%v) Not Equal that(%v)", len(this.Int32Map), len(that1.Int32Map)) + } + for i := range this.Int32Map { + if this.Int32Map[i] != that1.Int32Map[i] { + return fmt.Errorf("Int32Map this[%v](%v) Not Equal that[%v](%v)", i, this.Int32Map[i], i, that1.Int32Map[i]) + } + } + if len(this.Int64Map) != len(that1.Int64Map) { + return fmt.Errorf("Int64Map this(%v) Not Equal that(%v)", len(this.Int64Map), len(that1.Int64Map)) + } + for i := range this.Int64Map { + if this.Int64Map[i] != that1.Int64Map[i] { + return fmt.Errorf("Int64Map this[%v](%v) Not Equal that[%v](%v)", i, this.Int64Map[i], i, that1.Int64Map[i]) + } + } + if len(this.Uint32Map) != len(that1.Uint32Map) { + return fmt.Errorf("Uint32Map this(%v) Not Equal that(%v)", len(this.Uint32Map), len(that1.Uint32Map)) + } + for i := range this.Uint32Map { + if this.Uint32Map[i] != that1.Uint32Map[i] { + return fmt.Errorf("Uint32Map this[%v](%v) Not Equal that[%v](%v)", i, this.Uint32Map[i], i, that1.Uint32Map[i]) + } + } + if len(this.Uint64Map) != len(that1.Uint64Map) { + return fmt.Errorf("Uint64Map this(%v) Not Equal that(%v)", len(this.Uint64Map), len(that1.Uint64Map)) + } + for i := range this.Uint64Map { + if this.Uint64Map[i] != that1.Uint64Map[i] { + return fmt.Errorf("Uint64Map this[%v](%v) Not Equal that[%v](%v)", i, this.Uint64Map[i], i, that1.Uint64Map[i]) + } + } + if len(this.Sint32Map) != len(that1.Sint32Map) { + return fmt.Errorf("Sint32Map this(%v) Not Equal that(%v)", len(this.Sint32Map), len(that1.Sint32Map)) + } + for i := range this.Sint32Map { + if this.Sint32Map[i] != that1.Sint32Map[i] { + return fmt.Errorf("Sint32Map this[%v](%v) Not Equal that[%v](%v)", i, this.Sint32Map[i], i, that1.Sint32Map[i]) + } + } + if len(this.Sint64Map) != len(that1.Sint64Map) { + return fmt.Errorf("Sint64Map this(%v) Not Equal that(%v)", len(this.Sint64Map), len(that1.Sint64Map)) + } + for i := range this.Sint64Map { + if this.Sint64Map[i] != that1.Sint64Map[i] { + return fmt.Errorf("Sint64Map this[%v](%v) Not Equal that[%v](%v)", i, this.Sint64Map[i], i, that1.Sint64Map[i]) + } + } + if len(this.Fixed32Map) != len(that1.Fixed32Map) { + return fmt.Errorf("Fixed32Map this(%v) Not Equal that(%v)", len(this.Fixed32Map), len(that1.Fixed32Map)) + } + for i := range this.Fixed32Map { + if this.Fixed32Map[i] != that1.Fixed32Map[i] { + return fmt.Errorf("Fixed32Map this[%v](%v) Not Equal that[%v](%v)", i, this.Fixed32Map[i], i, that1.Fixed32Map[i]) + } + } + if len(this.Sfixed32Map) != len(that1.Sfixed32Map) { + return fmt.Errorf("Sfixed32Map this(%v) Not Equal that(%v)", len(this.Sfixed32Map), len(that1.Sfixed32Map)) + } + for i := range this.Sfixed32Map { + if this.Sfixed32Map[i] != that1.Sfixed32Map[i] { + return fmt.Errorf("Sfixed32Map this[%v](%v) Not Equal that[%v](%v)", i, this.Sfixed32Map[i], i, that1.Sfixed32Map[i]) + } + } + if len(this.Fixed64Map) != len(that1.Fixed64Map) { + return fmt.Errorf("Fixed64Map this(%v) Not Equal that(%v)", len(this.Fixed64Map), len(that1.Fixed64Map)) + } + for i := range this.Fixed64Map { + if this.Fixed64Map[i] != that1.Fixed64Map[i] { + return fmt.Errorf("Fixed64Map this[%v](%v) Not Equal that[%v](%v)", i, this.Fixed64Map[i], i, that1.Fixed64Map[i]) + } + } + if len(this.Sfixed64Map) != len(that1.Sfixed64Map) { + return fmt.Errorf("Sfixed64Map this(%v) Not Equal that(%v)", len(this.Sfixed64Map), len(that1.Sfixed64Map)) + } + for i := range this.Sfixed64Map { + if this.Sfixed64Map[i] != that1.Sfixed64Map[i] { + return fmt.Errorf("Sfixed64Map this[%v](%v) Not Equal that[%v](%v)", i, this.Sfixed64Map[i], i, that1.Sfixed64Map[i]) + } + } + if len(this.BoolMap) != len(that1.BoolMap) { + return fmt.Errorf("BoolMap this(%v) Not Equal that(%v)", len(this.BoolMap), len(that1.BoolMap)) + } + for i := range this.BoolMap { + if this.BoolMap[i] != that1.BoolMap[i] { + return fmt.Errorf("BoolMap this[%v](%v) Not Equal that[%v](%v)", i, this.BoolMap[i], i, that1.BoolMap[i]) + } + } + if len(this.StringMap) != len(that1.StringMap) { + return fmt.Errorf("StringMap this(%v) Not Equal that(%v)", len(this.StringMap), len(that1.StringMap)) + } + for i := range this.StringMap { + if this.StringMap[i] != that1.StringMap[i] { + return fmt.Errorf("StringMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringMap[i], i, that1.StringMap[i]) + } + } + if len(this.StringToBytesMap) != len(that1.StringToBytesMap) { + return fmt.Errorf("StringToBytesMap this(%v) Not Equal that(%v)", len(this.StringToBytesMap), len(that1.StringToBytesMap)) + } + for i := range this.StringToBytesMap { + if !bytes.Equal(this.StringToBytesMap[i], that1.StringToBytesMap[i]) { + return fmt.Errorf("StringToBytesMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringToBytesMap[i], i, that1.StringToBytesMap[i]) + } + } + if len(this.StringToEnumMap) != len(that1.StringToEnumMap) { + return fmt.Errorf("StringToEnumMap this(%v) Not Equal that(%v)", len(this.StringToEnumMap), len(that1.StringToEnumMap)) + } + for i := range this.StringToEnumMap { + if this.StringToEnumMap[i] != that1.StringToEnumMap[i] { + return fmt.Errorf("StringToEnumMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringToEnumMap[i], i, that1.StringToEnumMap[i]) + } + } + if len(this.StringToMsgMap) != len(that1.StringToMsgMap) { + return fmt.Errorf("StringToMsgMap this(%v) Not Equal that(%v)", len(this.StringToMsgMap), len(that1.StringToMsgMap)) + } + for i := range this.StringToMsgMap { + if !this.StringToMsgMap[i].Equal(that1.StringToMsgMap[i]) { + return fmt.Errorf("StringToMsgMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringToMsgMap[i], i, that1.StringToMsgMap[i]) + } + } + return nil +} +func (this *AllMaps) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*AllMaps) + if !ok { + that2, ok := that.(AllMaps) + 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.StringToDoubleMap) != len(that1.StringToDoubleMap) { + return false + } + for i := range this.StringToDoubleMap { + if this.StringToDoubleMap[i] != that1.StringToDoubleMap[i] { + return false + } + } + if len(this.StringToFloatMap) != len(that1.StringToFloatMap) { + return false + } + for i := range this.StringToFloatMap { + if this.StringToFloatMap[i] != that1.StringToFloatMap[i] { + return false + } + } + if len(this.Int32Map) != len(that1.Int32Map) { + return false + } + for i := range this.Int32Map { + if this.Int32Map[i] != that1.Int32Map[i] { + return false + } + } + if len(this.Int64Map) != len(that1.Int64Map) { + return false + } + for i := range this.Int64Map { + if this.Int64Map[i] != that1.Int64Map[i] { + return false + } + } + if len(this.Uint32Map) != len(that1.Uint32Map) { + return false + } + for i := range this.Uint32Map { + if this.Uint32Map[i] != that1.Uint32Map[i] { + return false + } + } + if len(this.Uint64Map) != len(that1.Uint64Map) { + return false + } + for i := range this.Uint64Map { + if this.Uint64Map[i] != that1.Uint64Map[i] { + return false + } + } + if len(this.Sint32Map) != len(that1.Sint32Map) { + return false + } + for i := range this.Sint32Map { + if this.Sint32Map[i] != that1.Sint32Map[i] { + return false + } + } + if len(this.Sint64Map) != len(that1.Sint64Map) { + return false + } + for i := range this.Sint64Map { + if this.Sint64Map[i] != that1.Sint64Map[i] { + return false + } + } + if len(this.Fixed32Map) != len(that1.Fixed32Map) { + return false + } + for i := range this.Fixed32Map { + if this.Fixed32Map[i] != that1.Fixed32Map[i] { + return false + } + } + if len(this.Sfixed32Map) != len(that1.Sfixed32Map) { + return false + } + for i := range this.Sfixed32Map { + if this.Sfixed32Map[i] != that1.Sfixed32Map[i] { + return false + } + } + if len(this.Fixed64Map) != len(that1.Fixed64Map) { + return false + } + for i := range this.Fixed64Map { + if this.Fixed64Map[i] != that1.Fixed64Map[i] { + return false + } + } + if len(this.Sfixed64Map) != len(that1.Sfixed64Map) { + return false + } + for i := range this.Sfixed64Map { + if this.Sfixed64Map[i] != that1.Sfixed64Map[i] { + return false + } + } + if len(this.BoolMap) != len(that1.BoolMap) { + return false + } + for i := range this.BoolMap { + if this.BoolMap[i] != that1.BoolMap[i] { + return false + } + } + if len(this.StringMap) != len(that1.StringMap) { + return false + } + for i := range this.StringMap { + if this.StringMap[i] != that1.StringMap[i] { + return false + } + } + if len(this.StringToBytesMap) != len(that1.StringToBytesMap) { + return false + } + for i := range this.StringToBytesMap { + if !bytes.Equal(this.StringToBytesMap[i], that1.StringToBytesMap[i]) { + return false + } + } + if len(this.StringToEnumMap) != len(that1.StringToEnumMap) { + return false + } + for i := range this.StringToEnumMap { + if this.StringToEnumMap[i] != that1.StringToEnumMap[i] { + return false + } + } + if len(this.StringToMsgMap) != len(that1.StringToMsgMap) { + return false + } + for i := range this.StringToMsgMap { + if !this.StringToMsgMap[i].Equal(that1.StringToMsgMap[i]) { + return false + } + } + return true +} +func (this *AllMapsOrdered) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*AllMapsOrdered) + if !ok { + that2, ok := that.(AllMapsOrdered) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *AllMapsOrdered") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *AllMapsOrdered but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *AllMapsOrdered but is not nil && this == nil") + } + if len(this.StringToDoubleMap) != len(that1.StringToDoubleMap) { + return fmt.Errorf("StringToDoubleMap this(%v) Not Equal that(%v)", len(this.StringToDoubleMap), len(that1.StringToDoubleMap)) + } + for i := range this.StringToDoubleMap { + if this.StringToDoubleMap[i] != that1.StringToDoubleMap[i] { + return fmt.Errorf("StringToDoubleMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringToDoubleMap[i], i, that1.StringToDoubleMap[i]) + } + } + if len(this.StringToFloatMap) != len(that1.StringToFloatMap) { + return fmt.Errorf("StringToFloatMap this(%v) Not Equal that(%v)", len(this.StringToFloatMap), len(that1.StringToFloatMap)) + } + for i := range this.StringToFloatMap { + if this.StringToFloatMap[i] != that1.StringToFloatMap[i] { + return fmt.Errorf("StringToFloatMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringToFloatMap[i], i, that1.StringToFloatMap[i]) + } + } + if len(this.Int32Map) != len(that1.Int32Map) { + return fmt.Errorf("Int32Map this(%v) Not Equal that(%v)", len(this.Int32Map), len(that1.Int32Map)) + } + for i := range this.Int32Map { + if this.Int32Map[i] != that1.Int32Map[i] { + return fmt.Errorf("Int32Map this[%v](%v) Not Equal that[%v](%v)", i, this.Int32Map[i], i, that1.Int32Map[i]) + } + } + if len(this.Int64Map) != len(that1.Int64Map) { + return fmt.Errorf("Int64Map this(%v) Not Equal that(%v)", len(this.Int64Map), len(that1.Int64Map)) + } + for i := range this.Int64Map { + if this.Int64Map[i] != that1.Int64Map[i] { + return fmt.Errorf("Int64Map this[%v](%v) Not Equal that[%v](%v)", i, this.Int64Map[i], i, that1.Int64Map[i]) + } + } + if len(this.Uint32Map) != len(that1.Uint32Map) { + return fmt.Errorf("Uint32Map this(%v) Not Equal that(%v)", len(this.Uint32Map), len(that1.Uint32Map)) + } + for i := range this.Uint32Map { + if this.Uint32Map[i] != that1.Uint32Map[i] { + return fmt.Errorf("Uint32Map this[%v](%v) Not Equal that[%v](%v)", i, this.Uint32Map[i], i, that1.Uint32Map[i]) + } + } + if len(this.Uint64Map) != len(that1.Uint64Map) { + return fmt.Errorf("Uint64Map this(%v) Not Equal that(%v)", len(this.Uint64Map), len(that1.Uint64Map)) + } + for i := range this.Uint64Map { + if this.Uint64Map[i] != that1.Uint64Map[i] { + return fmt.Errorf("Uint64Map this[%v](%v) Not Equal that[%v](%v)", i, this.Uint64Map[i], i, that1.Uint64Map[i]) + } + } + if len(this.Sint32Map) != len(that1.Sint32Map) { + return fmt.Errorf("Sint32Map this(%v) Not Equal that(%v)", len(this.Sint32Map), len(that1.Sint32Map)) + } + for i := range this.Sint32Map { + if this.Sint32Map[i] != that1.Sint32Map[i] { + return fmt.Errorf("Sint32Map this[%v](%v) Not Equal that[%v](%v)", i, this.Sint32Map[i], i, that1.Sint32Map[i]) + } + } + if len(this.Sint64Map) != len(that1.Sint64Map) { + return fmt.Errorf("Sint64Map this(%v) Not Equal that(%v)", len(this.Sint64Map), len(that1.Sint64Map)) + } + for i := range this.Sint64Map { + if this.Sint64Map[i] != that1.Sint64Map[i] { + return fmt.Errorf("Sint64Map this[%v](%v) Not Equal that[%v](%v)", i, this.Sint64Map[i], i, that1.Sint64Map[i]) + } + } + if len(this.Fixed32Map) != len(that1.Fixed32Map) { + return fmt.Errorf("Fixed32Map this(%v) Not Equal that(%v)", len(this.Fixed32Map), len(that1.Fixed32Map)) + } + for i := range this.Fixed32Map { + if this.Fixed32Map[i] != that1.Fixed32Map[i] { + return fmt.Errorf("Fixed32Map this[%v](%v) Not Equal that[%v](%v)", i, this.Fixed32Map[i], i, that1.Fixed32Map[i]) + } + } + if len(this.Sfixed32Map) != len(that1.Sfixed32Map) { + return fmt.Errorf("Sfixed32Map this(%v) Not Equal that(%v)", len(this.Sfixed32Map), len(that1.Sfixed32Map)) + } + for i := range this.Sfixed32Map { + if this.Sfixed32Map[i] != that1.Sfixed32Map[i] { + return fmt.Errorf("Sfixed32Map this[%v](%v) Not Equal that[%v](%v)", i, this.Sfixed32Map[i], i, that1.Sfixed32Map[i]) + } + } + if len(this.Fixed64Map) != len(that1.Fixed64Map) { + return fmt.Errorf("Fixed64Map this(%v) Not Equal that(%v)", len(this.Fixed64Map), len(that1.Fixed64Map)) + } + for i := range this.Fixed64Map { + if this.Fixed64Map[i] != that1.Fixed64Map[i] { + return fmt.Errorf("Fixed64Map this[%v](%v) Not Equal that[%v](%v)", i, this.Fixed64Map[i], i, that1.Fixed64Map[i]) + } + } + if len(this.Sfixed64Map) != len(that1.Sfixed64Map) { + return fmt.Errorf("Sfixed64Map this(%v) Not Equal that(%v)", len(this.Sfixed64Map), len(that1.Sfixed64Map)) + } + for i := range this.Sfixed64Map { + if this.Sfixed64Map[i] != that1.Sfixed64Map[i] { + return fmt.Errorf("Sfixed64Map this[%v](%v) Not Equal that[%v](%v)", i, this.Sfixed64Map[i], i, that1.Sfixed64Map[i]) + } + } + if len(this.BoolMap) != len(that1.BoolMap) { + return fmt.Errorf("BoolMap this(%v) Not Equal that(%v)", len(this.BoolMap), len(that1.BoolMap)) + } + for i := range this.BoolMap { + if this.BoolMap[i] != that1.BoolMap[i] { + return fmt.Errorf("BoolMap this[%v](%v) Not Equal that[%v](%v)", i, this.BoolMap[i], i, that1.BoolMap[i]) + } + } + if len(this.StringMap) != len(that1.StringMap) { + return fmt.Errorf("StringMap this(%v) Not Equal that(%v)", len(this.StringMap), len(that1.StringMap)) + } + for i := range this.StringMap { + if this.StringMap[i] != that1.StringMap[i] { + return fmt.Errorf("StringMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringMap[i], i, that1.StringMap[i]) + } + } + if len(this.StringToBytesMap) != len(that1.StringToBytesMap) { + return fmt.Errorf("StringToBytesMap this(%v) Not Equal that(%v)", len(this.StringToBytesMap), len(that1.StringToBytesMap)) + } + for i := range this.StringToBytesMap { + if !bytes.Equal(this.StringToBytesMap[i], that1.StringToBytesMap[i]) { + return fmt.Errorf("StringToBytesMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringToBytesMap[i], i, that1.StringToBytesMap[i]) + } + } + if len(this.StringToEnumMap) != len(that1.StringToEnumMap) { + return fmt.Errorf("StringToEnumMap this(%v) Not Equal that(%v)", len(this.StringToEnumMap), len(that1.StringToEnumMap)) + } + for i := range this.StringToEnumMap { + if this.StringToEnumMap[i] != that1.StringToEnumMap[i] { + return fmt.Errorf("StringToEnumMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringToEnumMap[i], i, that1.StringToEnumMap[i]) + } + } + if len(this.StringToMsgMap) != len(that1.StringToMsgMap) { + return fmt.Errorf("StringToMsgMap this(%v) Not Equal that(%v)", len(this.StringToMsgMap), len(that1.StringToMsgMap)) + } + for i := range this.StringToMsgMap { + if !this.StringToMsgMap[i].Equal(that1.StringToMsgMap[i]) { + return fmt.Errorf("StringToMsgMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringToMsgMap[i], i, that1.StringToMsgMap[i]) + } + } + return nil +} +func (this *AllMapsOrdered) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*AllMapsOrdered) + if !ok { + that2, ok := that.(AllMapsOrdered) + 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.StringToDoubleMap) != len(that1.StringToDoubleMap) { + return false + } + for i := range this.StringToDoubleMap { + if this.StringToDoubleMap[i] != that1.StringToDoubleMap[i] { + return false + } + } + if len(this.StringToFloatMap) != len(that1.StringToFloatMap) { + return false + } + for i := range this.StringToFloatMap { + if this.StringToFloatMap[i] != that1.StringToFloatMap[i] { + return false + } + } + if len(this.Int32Map) != len(that1.Int32Map) { + return false + } + for i := range this.Int32Map { + if this.Int32Map[i] != that1.Int32Map[i] { + return false + } + } + if len(this.Int64Map) != len(that1.Int64Map) { + return false + } + for i := range this.Int64Map { + if this.Int64Map[i] != that1.Int64Map[i] { + return false + } + } + if len(this.Uint32Map) != len(that1.Uint32Map) { + return false + } + for i := range this.Uint32Map { + if this.Uint32Map[i] != that1.Uint32Map[i] { + return false + } + } + if len(this.Uint64Map) != len(that1.Uint64Map) { + return false + } + for i := range this.Uint64Map { + if this.Uint64Map[i] != that1.Uint64Map[i] { + return false + } + } + if len(this.Sint32Map) != len(that1.Sint32Map) { + return false + } + for i := range this.Sint32Map { + if this.Sint32Map[i] != that1.Sint32Map[i] { + return false + } + } + if len(this.Sint64Map) != len(that1.Sint64Map) { + return false + } + for i := range this.Sint64Map { + if this.Sint64Map[i] != that1.Sint64Map[i] { + return false + } + } + if len(this.Fixed32Map) != len(that1.Fixed32Map) { + return false + } + for i := range this.Fixed32Map { + if this.Fixed32Map[i] != that1.Fixed32Map[i] { + return false + } + } + if len(this.Sfixed32Map) != len(that1.Sfixed32Map) { + return false + } + for i := range this.Sfixed32Map { + if this.Sfixed32Map[i] != that1.Sfixed32Map[i] { + return false + } + } + if len(this.Fixed64Map) != len(that1.Fixed64Map) { + return false + } + for i := range this.Fixed64Map { + if this.Fixed64Map[i] != that1.Fixed64Map[i] { + return false + } + } + if len(this.Sfixed64Map) != len(that1.Sfixed64Map) { + return false + } + for i := range this.Sfixed64Map { + if this.Sfixed64Map[i] != that1.Sfixed64Map[i] { + return false + } + } + if len(this.BoolMap) != len(that1.BoolMap) { + return false + } + for i := range this.BoolMap { + if this.BoolMap[i] != that1.BoolMap[i] { + return false + } + } + if len(this.StringMap) != len(that1.StringMap) { + return false + } + for i := range this.StringMap { + if this.StringMap[i] != that1.StringMap[i] { + return false + } + } + if len(this.StringToBytesMap) != len(that1.StringToBytesMap) { + return false + } + for i := range this.StringToBytesMap { + if !bytes.Equal(this.StringToBytesMap[i], that1.StringToBytesMap[i]) { + return false + } + } + if len(this.StringToEnumMap) != len(that1.StringToEnumMap) { + return false + } + for i := range this.StringToEnumMap { + if this.StringToEnumMap[i] != that1.StringToEnumMap[i] { + return false + } + } + if len(this.StringToMsgMap) != len(that1.StringToMsgMap) { + return false + } + for i := range this.StringToMsgMap { + if !this.StringToMsgMap[i].Equal(that1.StringToMsgMap[i]) { + return false + } + } + return true +} +func (this *MessageWithMap) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*MessageWithMap) + if !ok { + that2, ok := that.(MessageWithMap) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *MessageWithMap") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *MessageWithMap but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *MessageWithMap but is not nil && this == nil") + } + if len(this.NameMapping) != len(that1.NameMapping) { + return fmt.Errorf("NameMapping this(%v) Not Equal that(%v)", len(this.NameMapping), len(that1.NameMapping)) + } + for i := range this.NameMapping { + if this.NameMapping[i] != that1.NameMapping[i] { + return fmt.Errorf("NameMapping this[%v](%v) Not Equal that[%v](%v)", i, this.NameMapping[i], i, that1.NameMapping[i]) + } + } + if len(this.MsgMapping) != len(that1.MsgMapping) { + return fmt.Errorf("MsgMapping this(%v) Not Equal that(%v)", len(this.MsgMapping), len(that1.MsgMapping)) + } + for i := range this.MsgMapping { + if !this.MsgMapping[i].Equal(that1.MsgMapping[i]) { + return fmt.Errorf("MsgMapping this[%v](%v) Not Equal that[%v](%v)", i, this.MsgMapping[i], i, that1.MsgMapping[i]) + } + } + if len(this.ByteMapping) != len(that1.ByteMapping) { + return fmt.Errorf("ByteMapping this(%v) Not Equal that(%v)", len(this.ByteMapping), len(that1.ByteMapping)) + } + for i := range this.ByteMapping { + if !bytes.Equal(this.ByteMapping[i], that1.ByteMapping[i]) { + return fmt.Errorf("ByteMapping this[%v](%v) Not Equal that[%v](%v)", i, this.ByteMapping[i], i, that1.ByteMapping[i]) + } + } + return nil +} +func (this *MessageWithMap) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*MessageWithMap) + if !ok { + that2, ok := that.(MessageWithMap) + 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.NameMapping) != len(that1.NameMapping) { + return false + } + for i := range this.NameMapping { + if this.NameMapping[i] != that1.NameMapping[i] { + return false + } + } + if len(this.MsgMapping) != len(that1.MsgMapping) { + return false + } + for i := range this.MsgMapping { + if !this.MsgMapping[i].Equal(that1.MsgMapping[i]) { + return false + } + } + if len(this.ByteMapping) != len(that1.ByteMapping) { + return false + } + for i := range this.ByteMapping { + if !bytes.Equal(this.ByteMapping[i], that1.ByteMapping[i]) { + return false + } + } + return true +} +func (this *FloatingPoint) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*FloatingPoint) + if !ok { + that2, ok := that.(FloatingPoint) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *FloatingPoint") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *FloatingPoint but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *FloatingPoint but is not nil && this == nil") + } + if this.F != that1.F { + return fmt.Errorf("F this(%v) Not Equal that(%v)", this.F, that1.F) + } + return nil +} +func (this *FloatingPoint) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*FloatingPoint) + if !ok { + that2, ok := that.(FloatingPoint) + 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.F != that1.F { + return false + } + return true +} +func (this *Uint128Pair) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*Uint128Pair) + if !ok { + that2, ok := that.(Uint128Pair) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *Uint128Pair") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *Uint128Pair but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *Uint128Pair but is not nil && this == nil") + } + if !this.Left.Equal(that1.Left) { + return fmt.Errorf("Left this(%v) Not Equal that(%v)", this.Left, that1.Left) + } + if that1.Right == nil { + if this.Right != nil { + return fmt.Errorf("this.Right != nil && that1.Right == nil") + } + } else if !this.Right.Equal(*that1.Right) { + return fmt.Errorf("Right this(%v) Not Equal that(%v)", this.Right, that1.Right) + } + return nil +} +func (this *Uint128Pair) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*Uint128Pair) + if !ok { + that2, ok := that.(Uint128Pair) + 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.Left.Equal(that1.Left) { + return false + } + if that1.Right == nil { + if this.Right != nil { + return false + } + } else if !this.Right.Equal(*that1.Right) { + return false + } + return true +} +func (this *ContainsNestedMap) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*ContainsNestedMap) + if !ok { + that2, ok := that.(ContainsNestedMap) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *ContainsNestedMap") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *ContainsNestedMap but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *ContainsNestedMap but is not nil && this == nil") + } + return nil +} +func (this *ContainsNestedMap) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*ContainsNestedMap) + if !ok { + that2, ok := that.(ContainsNestedMap) + 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 *ContainsNestedMap_NestedMap) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*ContainsNestedMap_NestedMap) + if !ok { + that2, ok := that.(ContainsNestedMap_NestedMap) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *ContainsNestedMap_NestedMap") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *ContainsNestedMap_NestedMap but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *ContainsNestedMap_NestedMap but is not nil && this == nil") + } + if len(this.NestedMapField) != len(that1.NestedMapField) { + return fmt.Errorf("NestedMapField this(%v) Not Equal that(%v)", len(this.NestedMapField), len(that1.NestedMapField)) + } + for i := range this.NestedMapField { + if this.NestedMapField[i] != that1.NestedMapField[i] { + return fmt.Errorf("NestedMapField this[%v](%v) Not Equal that[%v](%v)", i, this.NestedMapField[i], i, that1.NestedMapField[i]) + } + } + return nil +} +func (this *ContainsNestedMap_NestedMap) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*ContainsNestedMap_NestedMap) + if !ok { + that2, ok := that.(ContainsNestedMap_NestedMap) + 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.NestedMapField) != len(that1.NestedMapField) { + return false + } + for i := range this.NestedMapField { + if this.NestedMapField[i] != that1.NestedMapField[i] { + return false + } + } + return true +} + +type MessageFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetName() string + GetHilarity() Message_Humour + GetHeightInCm() uint32 + GetData() []byte + GetResultCount() int64 + GetTrueScotsman() bool + GetScore() float32 + GetKey() []uint64 + GetNested() *Nested + GetTerrain() map[int64]*Nested + GetProto2Field() *test.NinOptNative + GetProto2Value() map[int64]*test.NinOptEnum +} + +func (this *Message) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *Message) TestProto() github_com_gogo_protobuf_proto.Message { + return NewMessageFromFace(this) +} + +func (this *Message) GetName() string { + return this.Name +} + +func (this *Message) GetHilarity() Message_Humour { + return this.Hilarity +} + +func (this *Message) GetHeightInCm() uint32 { + return this.HeightInCm +} + +func (this *Message) GetData() []byte { + return this.Data +} + +func (this *Message) GetResultCount() int64 { + return this.ResultCount +} + +func (this *Message) GetTrueScotsman() bool { + return this.TrueScotsman +} + +func (this *Message) GetScore() float32 { + return this.Score +} + +func (this *Message) GetKey() []uint64 { + return this.Key +} + +func (this *Message) GetNested() *Nested { + return this.Nested +} + +func (this *Message) GetTerrain() map[int64]*Nested { + return this.Terrain +} + +func (this *Message) GetProto2Field() *test.NinOptNative { + return this.Proto2Field +} + +func (this *Message) GetProto2Value() map[int64]*test.NinOptEnum { + return this.Proto2Value +} + +func NewMessageFromFace(that MessageFace) *Message { + this := &Message{} + this.Name = that.GetName() + this.Hilarity = that.GetHilarity() + this.HeightInCm = that.GetHeightInCm() + this.Data = that.GetData() + this.ResultCount = that.GetResultCount() + this.TrueScotsman = that.GetTrueScotsman() + this.Score = that.GetScore() + this.Key = that.GetKey() + this.Nested = that.GetNested() + this.Terrain = that.GetTerrain() + this.Proto2Field = that.GetProto2Field() + this.Proto2Value = that.GetProto2Value() + return this +} + +type NestedFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetBunny() string +} + +func (this *Nested) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *Nested) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNestedFromFace(this) +} + +func (this *Nested) GetBunny() string { + return this.Bunny +} + +func NewNestedFromFace(that NestedFace) *Nested { + this := &Nested{} + this.Bunny = that.GetBunny() + return this +} + +type AllMapsFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetStringToDoubleMap() map[string]float64 + GetStringToFloatMap() map[string]float32 + GetInt32Map() map[int32]int32 + GetInt64Map() map[int64]int64 + GetUint32Map() map[uint32]uint32 + GetUint64Map() map[uint64]uint64 + GetSint32Map() map[int32]int32 + GetSint64Map() map[int64]int64 + GetFixed32Map() map[uint32]uint32 + GetSfixed32Map() map[int32]int32 + GetFixed64Map() map[uint64]uint64 + GetSfixed64Map() map[int64]int64 + GetBoolMap() map[bool]bool + GetStringMap() map[string]string + GetStringToBytesMap() map[string][]byte + GetStringToEnumMap() map[string]MapEnum + GetStringToMsgMap() map[string]*FloatingPoint +} + +func (this *AllMaps) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *AllMaps) TestProto() github_com_gogo_protobuf_proto.Message { + return NewAllMapsFromFace(this) +} + +func (this *AllMaps) GetStringToDoubleMap() map[string]float64 { + return this.StringToDoubleMap +} + +func (this *AllMaps) GetStringToFloatMap() map[string]float32 { + return this.StringToFloatMap +} + +func (this *AllMaps) GetInt32Map() map[int32]int32 { + return this.Int32Map +} + +func (this *AllMaps) GetInt64Map() map[int64]int64 { + return this.Int64Map +} + +func (this *AllMaps) GetUint32Map() map[uint32]uint32 { + return this.Uint32Map +} + +func (this *AllMaps) GetUint64Map() map[uint64]uint64 { + return this.Uint64Map +} + +func (this *AllMaps) GetSint32Map() map[int32]int32 { + return this.Sint32Map +} + +func (this *AllMaps) GetSint64Map() map[int64]int64 { + return this.Sint64Map +} + +func (this *AllMaps) GetFixed32Map() map[uint32]uint32 { + return this.Fixed32Map +} + +func (this *AllMaps) GetSfixed32Map() map[int32]int32 { + return this.Sfixed32Map +} + +func (this *AllMaps) GetFixed64Map() map[uint64]uint64 { + return this.Fixed64Map +} + +func (this *AllMaps) GetSfixed64Map() map[int64]int64 { + return this.Sfixed64Map +} + +func (this *AllMaps) GetBoolMap() map[bool]bool { + return this.BoolMap +} + +func (this *AllMaps) GetStringMap() map[string]string { + return this.StringMap +} + +func (this *AllMaps) GetStringToBytesMap() map[string][]byte { + return this.StringToBytesMap +} + +func (this *AllMaps) GetStringToEnumMap() map[string]MapEnum { + return this.StringToEnumMap +} + +func (this *AllMaps) GetStringToMsgMap() map[string]*FloatingPoint { + return this.StringToMsgMap +} + +func NewAllMapsFromFace(that AllMapsFace) *AllMaps { + this := &AllMaps{} + this.StringToDoubleMap = that.GetStringToDoubleMap() + this.StringToFloatMap = that.GetStringToFloatMap() + this.Int32Map = that.GetInt32Map() + this.Int64Map = that.GetInt64Map() + this.Uint32Map = that.GetUint32Map() + this.Uint64Map = that.GetUint64Map() + this.Sint32Map = that.GetSint32Map() + this.Sint64Map = that.GetSint64Map() + this.Fixed32Map = that.GetFixed32Map() + this.Sfixed32Map = that.GetSfixed32Map() + this.Fixed64Map = that.GetFixed64Map() + this.Sfixed64Map = that.GetSfixed64Map() + this.BoolMap = that.GetBoolMap() + this.StringMap = that.GetStringMap() + this.StringToBytesMap = that.GetStringToBytesMap() + this.StringToEnumMap = that.GetStringToEnumMap() + this.StringToMsgMap = that.GetStringToMsgMap() + return this +} + +type AllMapsOrderedFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetStringToDoubleMap() map[string]float64 + GetStringToFloatMap() map[string]float32 + GetInt32Map() map[int32]int32 + GetInt64Map() map[int64]int64 + GetUint32Map() map[uint32]uint32 + GetUint64Map() map[uint64]uint64 + GetSint32Map() map[int32]int32 + GetSint64Map() map[int64]int64 + GetFixed32Map() map[uint32]uint32 + GetSfixed32Map() map[int32]int32 + GetFixed64Map() map[uint64]uint64 + GetSfixed64Map() map[int64]int64 + GetBoolMap() map[bool]bool + GetStringMap() map[string]string + GetStringToBytesMap() map[string][]byte + GetStringToEnumMap() map[string]MapEnum + GetStringToMsgMap() map[string]*FloatingPoint +} + +func (this *AllMapsOrdered) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *AllMapsOrdered) TestProto() github_com_gogo_protobuf_proto.Message { + return NewAllMapsOrderedFromFace(this) +} + +func (this *AllMapsOrdered) GetStringToDoubleMap() map[string]float64 { + return this.StringToDoubleMap +} + +func (this *AllMapsOrdered) GetStringToFloatMap() map[string]float32 { + return this.StringToFloatMap +} + +func (this *AllMapsOrdered) GetInt32Map() map[int32]int32 { + return this.Int32Map +} + +func (this *AllMapsOrdered) GetInt64Map() map[int64]int64 { + return this.Int64Map +} + +func (this *AllMapsOrdered) GetUint32Map() map[uint32]uint32 { + return this.Uint32Map +} + +func (this *AllMapsOrdered) GetUint64Map() map[uint64]uint64 { + return this.Uint64Map +} + +func (this *AllMapsOrdered) GetSint32Map() map[int32]int32 { + return this.Sint32Map +} + +func (this *AllMapsOrdered) GetSint64Map() map[int64]int64 { + return this.Sint64Map +} + +func (this *AllMapsOrdered) GetFixed32Map() map[uint32]uint32 { + return this.Fixed32Map +} + +func (this *AllMapsOrdered) GetSfixed32Map() map[int32]int32 { + return this.Sfixed32Map +} + +func (this *AllMapsOrdered) GetFixed64Map() map[uint64]uint64 { + return this.Fixed64Map +} + +func (this *AllMapsOrdered) GetSfixed64Map() map[int64]int64 { + return this.Sfixed64Map +} + +func (this *AllMapsOrdered) GetBoolMap() map[bool]bool { + return this.BoolMap +} + +func (this *AllMapsOrdered) GetStringMap() map[string]string { + return this.StringMap +} + +func (this *AllMapsOrdered) GetStringToBytesMap() map[string][]byte { + return this.StringToBytesMap +} + +func (this *AllMapsOrdered) GetStringToEnumMap() map[string]MapEnum { + return this.StringToEnumMap +} + +func (this *AllMapsOrdered) GetStringToMsgMap() map[string]*FloatingPoint { + return this.StringToMsgMap +} + +func NewAllMapsOrderedFromFace(that AllMapsOrderedFace) *AllMapsOrdered { + this := &AllMapsOrdered{} + this.StringToDoubleMap = that.GetStringToDoubleMap() + this.StringToFloatMap = that.GetStringToFloatMap() + this.Int32Map = that.GetInt32Map() + this.Int64Map = that.GetInt64Map() + this.Uint32Map = that.GetUint32Map() + this.Uint64Map = that.GetUint64Map() + this.Sint32Map = that.GetSint32Map() + this.Sint64Map = that.GetSint64Map() + this.Fixed32Map = that.GetFixed32Map() + this.Sfixed32Map = that.GetSfixed32Map() + this.Fixed64Map = that.GetFixed64Map() + this.Sfixed64Map = that.GetSfixed64Map() + this.BoolMap = that.GetBoolMap() + this.StringMap = that.GetStringMap() + this.StringToBytesMap = that.GetStringToBytesMap() + this.StringToEnumMap = that.GetStringToEnumMap() + this.StringToMsgMap = that.GetStringToMsgMap() + return this +} + +type MessageWithMapFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetNameMapping() map[int32]string + GetMsgMapping() map[int64]*FloatingPoint + GetByteMapping() map[bool][]byte +} + +func (this *MessageWithMap) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *MessageWithMap) TestProto() github_com_gogo_protobuf_proto.Message { + return NewMessageWithMapFromFace(this) +} + +func (this *MessageWithMap) GetNameMapping() map[int32]string { + return this.NameMapping +} + +func (this *MessageWithMap) GetMsgMapping() map[int64]*FloatingPoint { + return this.MsgMapping +} + +func (this *MessageWithMap) GetByteMapping() map[bool][]byte { + return this.ByteMapping +} + +func NewMessageWithMapFromFace(that MessageWithMapFace) *MessageWithMap { + this := &MessageWithMap{} + this.NameMapping = that.GetNameMapping() + this.MsgMapping = that.GetMsgMapping() + this.ByteMapping = that.GetByteMapping() + return this +} + +type FloatingPointFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetF() float64 +} + +func (this *FloatingPoint) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *FloatingPoint) TestProto() github_com_gogo_protobuf_proto.Message { + return NewFloatingPointFromFace(this) +} + +func (this *FloatingPoint) GetF() float64 { + return this.F +} + +func NewFloatingPointFromFace(that FloatingPointFace) *FloatingPoint { + this := &FloatingPoint{} + this.F = that.GetF() + return this +} + +type Uint128PairFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetLeft() github_com_gogo_protobuf_test_custom.Uint128 + GetRight() *github_com_gogo_protobuf_test_custom.Uint128 +} + +func (this *Uint128Pair) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *Uint128Pair) TestProto() github_com_gogo_protobuf_proto.Message { + return NewUint128PairFromFace(this) +} + +func (this *Uint128Pair) GetLeft() github_com_gogo_protobuf_test_custom.Uint128 { + return this.Left +} + +func (this *Uint128Pair) GetRight() *github_com_gogo_protobuf_test_custom.Uint128 { + return this.Right +} + +func NewUint128PairFromFace(that Uint128PairFace) *Uint128Pair { + this := &Uint128Pair{} + this.Left = that.GetLeft() + this.Right = that.GetRight() + return this +} + +type ContainsNestedMapFace interface { + Proto() github_com_gogo_protobuf_proto.Message +} + +func (this *ContainsNestedMap) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *ContainsNestedMap) TestProto() github_com_gogo_protobuf_proto.Message { + return NewContainsNestedMapFromFace(this) +} + +func NewContainsNestedMapFromFace(that ContainsNestedMapFace) *ContainsNestedMap { + this := &ContainsNestedMap{} + return this +} + +type ContainsNestedMap_NestedMapFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetNestedMapField() map[string]float64 +} + +func (this *ContainsNestedMap_NestedMap) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *ContainsNestedMap_NestedMap) TestProto() github_com_gogo_protobuf_proto.Message { + return NewContainsNestedMap_NestedMapFromFace(this) +} + +func (this *ContainsNestedMap_NestedMap) GetNestedMapField() map[string]float64 { + return this.NestedMapField +} + +func NewContainsNestedMap_NestedMapFromFace(that ContainsNestedMap_NestedMapFace) *ContainsNestedMap_NestedMap { + this := &ContainsNestedMap_NestedMap{} + this.NestedMapField = that.GetNestedMapField() + return this +} + +func (this *Message) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 16) + s = append(s, "&theproto3.Message{") + s = append(s, "Name: "+fmt.Sprintf("%#v", this.Name)+",\n") + s = append(s, "Hilarity: "+fmt.Sprintf("%#v", this.Hilarity)+",\n") + s = append(s, "HeightInCm: "+fmt.Sprintf("%#v", this.HeightInCm)+",\n") + s = append(s, "Data: "+fmt.Sprintf("%#v", this.Data)+",\n") + s = append(s, "ResultCount: "+fmt.Sprintf("%#v", this.ResultCount)+",\n") + s = append(s, "TrueScotsman: "+fmt.Sprintf("%#v", this.TrueScotsman)+",\n") + s = append(s, "Score: "+fmt.Sprintf("%#v", this.Score)+",\n") + s = append(s, "Key: "+fmt.Sprintf("%#v", this.Key)+",\n") + if this.Nested != nil { + s = append(s, "Nested: "+fmt.Sprintf("%#v", this.Nested)+",\n") + } + keysForTerrain := make([]int64, 0, len(this.Terrain)) + for k := range this.Terrain { + keysForTerrain = append(keysForTerrain, k) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForTerrain) + mapStringForTerrain := "map[int64]*Nested{" + for _, k := range keysForTerrain { + mapStringForTerrain += fmt.Sprintf("%#v: %#v,", k, this.Terrain[k]) + } + mapStringForTerrain += "}" + if this.Terrain != nil { + s = append(s, "Terrain: "+mapStringForTerrain+",\n") + } + if this.Proto2Field != nil { + s = append(s, "Proto2Field: "+fmt.Sprintf("%#v", this.Proto2Field)+",\n") + } + keysForProto2Value := make([]int64, 0, len(this.Proto2Value)) + for k := range this.Proto2Value { + keysForProto2Value = append(keysForProto2Value, k) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForProto2Value) + mapStringForProto2Value := "map[int64]*test.NinOptEnum{" + for _, k := range keysForProto2Value { + mapStringForProto2Value += fmt.Sprintf("%#v: %#v,", k, this.Proto2Value[k]) + } + mapStringForProto2Value += "}" + if this.Proto2Value != nil { + s = append(s, "Proto2Value: "+mapStringForProto2Value+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *Nested) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&theproto3.Nested{") + s = append(s, "Bunny: "+fmt.Sprintf("%#v", this.Bunny)+",\n") + s = append(s, "}") + return strings.Join(s, "") +} +func (this *AllMaps) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 21) + s = append(s, "&theproto3.AllMaps{") + keysForStringToDoubleMap := make([]string, 0, len(this.StringToDoubleMap)) + for k := range this.StringToDoubleMap { + keysForStringToDoubleMap = append(keysForStringToDoubleMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToDoubleMap) + mapStringForStringToDoubleMap := "map[string]float64{" + for _, k := range keysForStringToDoubleMap { + mapStringForStringToDoubleMap += fmt.Sprintf("%#v: %#v,", k, this.StringToDoubleMap[k]) + } + mapStringForStringToDoubleMap += "}" + if this.StringToDoubleMap != nil { + s = append(s, "StringToDoubleMap: "+mapStringForStringToDoubleMap+",\n") + } + keysForStringToFloatMap := make([]string, 0, len(this.StringToFloatMap)) + for k := range this.StringToFloatMap { + keysForStringToFloatMap = append(keysForStringToFloatMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToFloatMap) + mapStringForStringToFloatMap := "map[string]float32{" + for _, k := range keysForStringToFloatMap { + mapStringForStringToFloatMap += fmt.Sprintf("%#v: %#v,", k, this.StringToFloatMap[k]) + } + mapStringForStringToFloatMap += "}" + if this.StringToFloatMap != nil { + s = append(s, "StringToFloatMap: "+mapStringForStringToFloatMap+",\n") + } + keysForInt32Map := make([]int32, 0, len(this.Int32Map)) + for k := range this.Int32Map { + keysForInt32Map = append(keysForInt32Map, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForInt32Map) + mapStringForInt32Map := "map[int32]int32{" + for _, k := range keysForInt32Map { + mapStringForInt32Map += fmt.Sprintf("%#v: %#v,", k, this.Int32Map[k]) + } + mapStringForInt32Map += "}" + if this.Int32Map != nil { + s = append(s, "Int32Map: "+mapStringForInt32Map+",\n") + } + keysForInt64Map := make([]int64, 0, len(this.Int64Map)) + for k := range this.Int64Map { + keysForInt64Map = append(keysForInt64Map, k) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForInt64Map) + mapStringForInt64Map := "map[int64]int64{" + for _, k := range keysForInt64Map { + mapStringForInt64Map += fmt.Sprintf("%#v: %#v,", k, this.Int64Map[k]) + } + mapStringForInt64Map += "}" + if this.Int64Map != nil { + s = append(s, "Int64Map: "+mapStringForInt64Map+",\n") + } + keysForUint32Map := make([]uint32, 0, len(this.Uint32Map)) + for k := range this.Uint32Map { + keysForUint32Map = append(keysForUint32Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint32s(keysForUint32Map) + mapStringForUint32Map := "map[uint32]uint32{" + for _, k := range keysForUint32Map { + mapStringForUint32Map += fmt.Sprintf("%#v: %#v,", k, this.Uint32Map[k]) + } + mapStringForUint32Map += "}" + if this.Uint32Map != nil { + s = append(s, "Uint32Map: "+mapStringForUint32Map+",\n") + } + keysForUint64Map := make([]uint64, 0, len(this.Uint64Map)) + for k := range this.Uint64Map { + keysForUint64Map = append(keysForUint64Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint64s(keysForUint64Map) + mapStringForUint64Map := "map[uint64]uint64{" + for _, k := range keysForUint64Map { + mapStringForUint64Map += fmt.Sprintf("%#v: %#v,", k, this.Uint64Map[k]) + } + mapStringForUint64Map += "}" + if this.Uint64Map != nil { + s = append(s, "Uint64Map: "+mapStringForUint64Map+",\n") + } + keysForSint32Map := make([]int32, 0, len(this.Sint32Map)) + for k := range this.Sint32Map { + keysForSint32Map = append(keysForSint32Map, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForSint32Map) + mapStringForSint32Map := "map[int32]int32{" + for _, k := range keysForSint32Map { + mapStringForSint32Map += fmt.Sprintf("%#v: %#v,", k, this.Sint32Map[k]) + } + mapStringForSint32Map += "}" + if this.Sint32Map != nil { + s = append(s, "Sint32Map: "+mapStringForSint32Map+",\n") + } + keysForSint64Map := make([]int64, 0, len(this.Sint64Map)) + for k := range this.Sint64Map { + keysForSint64Map = append(keysForSint64Map, k) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForSint64Map) + mapStringForSint64Map := "map[int64]int64{" + for _, k := range keysForSint64Map { + mapStringForSint64Map += fmt.Sprintf("%#v: %#v,", k, this.Sint64Map[k]) + } + mapStringForSint64Map += "}" + if this.Sint64Map != nil { + s = append(s, "Sint64Map: "+mapStringForSint64Map+",\n") + } + keysForFixed32Map := make([]uint32, 0, len(this.Fixed32Map)) + for k := range this.Fixed32Map { + keysForFixed32Map = append(keysForFixed32Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint32s(keysForFixed32Map) + mapStringForFixed32Map := "map[uint32]uint32{" + for _, k := range keysForFixed32Map { + mapStringForFixed32Map += fmt.Sprintf("%#v: %#v,", k, this.Fixed32Map[k]) + } + mapStringForFixed32Map += "}" + if this.Fixed32Map != nil { + s = append(s, "Fixed32Map: "+mapStringForFixed32Map+",\n") + } + keysForSfixed32Map := make([]int32, 0, len(this.Sfixed32Map)) + for k := range this.Sfixed32Map { + keysForSfixed32Map = append(keysForSfixed32Map, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForSfixed32Map) + mapStringForSfixed32Map := "map[int32]int32{" + for _, k := range keysForSfixed32Map { + mapStringForSfixed32Map += fmt.Sprintf("%#v: %#v,", k, this.Sfixed32Map[k]) + } + mapStringForSfixed32Map += "}" + if this.Sfixed32Map != nil { + s = append(s, "Sfixed32Map: "+mapStringForSfixed32Map+",\n") + } + keysForFixed64Map := make([]uint64, 0, len(this.Fixed64Map)) + for k := range this.Fixed64Map { + keysForFixed64Map = append(keysForFixed64Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint64s(keysForFixed64Map) + mapStringForFixed64Map := "map[uint64]uint64{" + for _, k := range keysForFixed64Map { + mapStringForFixed64Map += fmt.Sprintf("%#v: %#v,", k, this.Fixed64Map[k]) + } + mapStringForFixed64Map += "}" + if this.Fixed64Map != nil { + s = append(s, "Fixed64Map: "+mapStringForFixed64Map+",\n") + } + keysForSfixed64Map := make([]int64, 0, len(this.Sfixed64Map)) + for k := range this.Sfixed64Map { + keysForSfixed64Map = append(keysForSfixed64Map, k) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForSfixed64Map) + mapStringForSfixed64Map := "map[int64]int64{" + for _, k := range keysForSfixed64Map { + mapStringForSfixed64Map += fmt.Sprintf("%#v: %#v,", k, this.Sfixed64Map[k]) + } + mapStringForSfixed64Map += "}" + if this.Sfixed64Map != nil { + s = append(s, "Sfixed64Map: "+mapStringForSfixed64Map+",\n") + } + keysForBoolMap := make([]bool, 0, len(this.BoolMap)) + for k := range this.BoolMap { + keysForBoolMap = append(keysForBoolMap, k) + } + github_com_gogo_protobuf_sortkeys.Bools(keysForBoolMap) + mapStringForBoolMap := "map[bool]bool{" + for _, k := range keysForBoolMap { + mapStringForBoolMap += fmt.Sprintf("%#v: %#v,", k, this.BoolMap[k]) + } + mapStringForBoolMap += "}" + if this.BoolMap != nil { + s = append(s, "BoolMap: "+mapStringForBoolMap+",\n") + } + keysForStringMap := make([]string, 0, len(this.StringMap)) + for k := range this.StringMap { + keysForStringMap = append(keysForStringMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringMap) + mapStringForStringMap := "map[string]string{" + for _, k := range keysForStringMap { + mapStringForStringMap += fmt.Sprintf("%#v: %#v,", k, this.StringMap[k]) + } + mapStringForStringMap += "}" + if this.StringMap != nil { + s = append(s, "StringMap: "+mapStringForStringMap+",\n") + } + keysForStringToBytesMap := make([]string, 0, len(this.StringToBytesMap)) + for k := range this.StringToBytesMap { + keysForStringToBytesMap = append(keysForStringToBytesMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToBytesMap) + mapStringForStringToBytesMap := "map[string][]byte{" + for _, k := range keysForStringToBytesMap { + mapStringForStringToBytesMap += fmt.Sprintf("%#v: %#v,", k, this.StringToBytesMap[k]) + } + mapStringForStringToBytesMap += "}" + if this.StringToBytesMap != nil { + s = append(s, "StringToBytesMap: "+mapStringForStringToBytesMap+",\n") + } + keysForStringToEnumMap := make([]string, 0, len(this.StringToEnumMap)) + for k := range this.StringToEnumMap { + keysForStringToEnumMap = append(keysForStringToEnumMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToEnumMap) + mapStringForStringToEnumMap := "map[string]MapEnum{" + for _, k := range keysForStringToEnumMap { + mapStringForStringToEnumMap += fmt.Sprintf("%#v: %#v,", k, this.StringToEnumMap[k]) + } + mapStringForStringToEnumMap += "}" + if this.StringToEnumMap != nil { + s = append(s, "StringToEnumMap: "+mapStringForStringToEnumMap+",\n") + } + keysForStringToMsgMap := make([]string, 0, len(this.StringToMsgMap)) + for k := range this.StringToMsgMap { + keysForStringToMsgMap = append(keysForStringToMsgMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToMsgMap) + mapStringForStringToMsgMap := "map[string]*FloatingPoint{" + for _, k := range keysForStringToMsgMap { + mapStringForStringToMsgMap += fmt.Sprintf("%#v: %#v,", k, this.StringToMsgMap[k]) + } + mapStringForStringToMsgMap += "}" + if this.StringToMsgMap != nil { + s = append(s, "StringToMsgMap: "+mapStringForStringToMsgMap+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *AllMapsOrdered) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 21) + s = append(s, "&theproto3.AllMapsOrdered{") + keysForStringToDoubleMap := make([]string, 0, len(this.StringToDoubleMap)) + for k := range this.StringToDoubleMap { + keysForStringToDoubleMap = append(keysForStringToDoubleMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToDoubleMap) + mapStringForStringToDoubleMap := "map[string]float64{" + for _, k := range keysForStringToDoubleMap { + mapStringForStringToDoubleMap += fmt.Sprintf("%#v: %#v,", k, this.StringToDoubleMap[k]) + } + mapStringForStringToDoubleMap += "}" + if this.StringToDoubleMap != nil { + s = append(s, "StringToDoubleMap: "+mapStringForStringToDoubleMap+",\n") + } + keysForStringToFloatMap := make([]string, 0, len(this.StringToFloatMap)) + for k := range this.StringToFloatMap { + keysForStringToFloatMap = append(keysForStringToFloatMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToFloatMap) + mapStringForStringToFloatMap := "map[string]float32{" + for _, k := range keysForStringToFloatMap { + mapStringForStringToFloatMap += fmt.Sprintf("%#v: %#v,", k, this.StringToFloatMap[k]) + } + mapStringForStringToFloatMap += "}" + if this.StringToFloatMap != nil { + s = append(s, "StringToFloatMap: "+mapStringForStringToFloatMap+",\n") + } + keysForInt32Map := make([]int32, 0, len(this.Int32Map)) + for k := range this.Int32Map { + keysForInt32Map = append(keysForInt32Map, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForInt32Map) + mapStringForInt32Map := "map[int32]int32{" + for _, k := range keysForInt32Map { + mapStringForInt32Map += fmt.Sprintf("%#v: %#v,", k, this.Int32Map[k]) + } + mapStringForInt32Map += "}" + if this.Int32Map != nil { + s = append(s, "Int32Map: "+mapStringForInt32Map+",\n") + } + keysForInt64Map := make([]int64, 0, len(this.Int64Map)) + for k := range this.Int64Map { + keysForInt64Map = append(keysForInt64Map, k) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForInt64Map) + mapStringForInt64Map := "map[int64]int64{" + for _, k := range keysForInt64Map { + mapStringForInt64Map += fmt.Sprintf("%#v: %#v,", k, this.Int64Map[k]) + } + mapStringForInt64Map += "}" + if this.Int64Map != nil { + s = append(s, "Int64Map: "+mapStringForInt64Map+",\n") + } + keysForUint32Map := make([]uint32, 0, len(this.Uint32Map)) + for k := range this.Uint32Map { + keysForUint32Map = append(keysForUint32Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint32s(keysForUint32Map) + mapStringForUint32Map := "map[uint32]uint32{" + for _, k := range keysForUint32Map { + mapStringForUint32Map += fmt.Sprintf("%#v: %#v,", k, this.Uint32Map[k]) + } + mapStringForUint32Map += "}" + if this.Uint32Map != nil { + s = append(s, "Uint32Map: "+mapStringForUint32Map+",\n") + } + keysForUint64Map := make([]uint64, 0, len(this.Uint64Map)) + for k := range this.Uint64Map { + keysForUint64Map = append(keysForUint64Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint64s(keysForUint64Map) + mapStringForUint64Map := "map[uint64]uint64{" + for _, k := range keysForUint64Map { + mapStringForUint64Map += fmt.Sprintf("%#v: %#v,", k, this.Uint64Map[k]) + } + mapStringForUint64Map += "}" + if this.Uint64Map != nil { + s = append(s, "Uint64Map: "+mapStringForUint64Map+",\n") + } + keysForSint32Map := make([]int32, 0, len(this.Sint32Map)) + for k := range this.Sint32Map { + keysForSint32Map = append(keysForSint32Map, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForSint32Map) + mapStringForSint32Map := "map[int32]int32{" + for _, k := range keysForSint32Map { + mapStringForSint32Map += fmt.Sprintf("%#v: %#v,", k, this.Sint32Map[k]) + } + mapStringForSint32Map += "}" + if this.Sint32Map != nil { + s = append(s, "Sint32Map: "+mapStringForSint32Map+",\n") + } + keysForSint64Map := make([]int64, 0, len(this.Sint64Map)) + for k := range this.Sint64Map { + keysForSint64Map = append(keysForSint64Map, k) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForSint64Map) + mapStringForSint64Map := "map[int64]int64{" + for _, k := range keysForSint64Map { + mapStringForSint64Map += fmt.Sprintf("%#v: %#v,", k, this.Sint64Map[k]) + } + mapStringForSint64Map += "}" + if this.Sint64Map != nil { + s = append(s, "Sint64Map: "+mapStringForSint64Map+",\n") + } + keysForFixed32Map := make([]uint32, 0, len(this.Fixed32Map)) + for k := range this.Fixed32Map { + keysForFixed32Map = append(keysForFixed32Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint32s(keysForFixed32Map) + mapStringForFixed32Map := "map[uint32]uint32{" + for _, k := range keysForFixed32Map { + mapStringForFixed32Map += fmt.Sprintf("%#v: %#v,", k, this.Fixed32Map[k]) + } + mapStringForFixed32Map += "}" + if this.Fixed32Map != nil { + s = append(s, "Fixed32Map: "+mapStringForFixed32Map+",\n") + } + keysForSfixed32Map := make([]int32, 0, len(this.Sfixed32Map)) + for k := range this.Sfixed32Map { + keysForSfixed32Map = append(keysForSfixed32Map, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForSfixed32Map) + mapStringForSfixed32Map := "map[int32]int32{" + for _, k := range keysForSfixed32Map { + mapStringForSfixed32Map += fmt.Sprintf("%#v: %#v,", k, this.Sfixed32Map[k]) + } + mapStringForSfixed32Map += "}" + if this.Sfixed32Map != nil { + s = append(s, "Sfixed32Map: "+mapStringForSfixed32Map+",\n") + } + keysForFixed64Map := make([]uint64, 0, len(this.Fixed64Map)) + for k := range this.Fixed64Map { + keysForFixed64Map = append(keysForFixed64Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint64s(keysForFixed64Map) + mapStringForFixed64Map := "map[uint64]uint64{" + for _, k := range keysForFixed64Map { + mapStringForFixed64Map += fmt.Sprintf("%#v: %#v,", k, this.Fixed64Map[k]) + } + mapStringForFixed64Map += "}" + if this.Fixed64Map != nil { + s = append(s, "Fixed64Map: "+mapStringForFixed64Map+",\n") + } + keysForSfixed64Map := make([]int64, 0, len(this.Sfixed64Map)) + for k := range this.Sfixed64Map { + keysForSfixed64Map = append(keysForSfixed64Map, k) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForSfixed64Map) + mapStringForSfixed64Map := "map[int64]int64{" + for _, k := range keysForSfixed64Map { + mapStringForSfixed64Map += fmt.Sprintf("%#v: %#v,", k, this.Sfixed64Map[k]) + } + mapStringForSfixed64Map += "}" + if this.Sfixed64Map != nil { + s = append(s, "Sfixed64Map: "+mapStringForSfixed64Map+",\n") + } + keysForBoolMap := make([]bool, 0, len(this.BoolMap)) + for k := range this.BoolMap { + keysForBoolMap = append(keysForBoolMap, k) + } + github_com_gogo_protobuf_sortkeys.Bools(keysForBoolMap) + mapStringForBoolMap := "map[bool]bool{" + for _, k := range keysForBoolMap { + mapStringForBoolMap += fmt.Sprintf("%#v: %#v,", k, this.BoolMap[k]) + } + mapStringForBoolMap += "}" + if this.BoolMap != nil { + s = append(s, "BoolMap: "+mapStringForBoolMap+",\n") + } + keysForStringMap := make([]string, 0, len(this.StringMap)) + for k := range this.StringMap { + keysForStringMap = append(keysForStringMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringMap) + mapStringForStringMap := "map[string]string{" + for _, k := range keysForStringMap { + mapStringForStringMap += fmt.Sprintf("%#v: %#v,", k, this.StringMap[k]) + } + mapStringForStringMap += "}" + if this.StringMap != nil { + s = append(s, "StringMap: "+mapStringForStringMap+",\n") + } + keysForStringToBytesMap := make([]string, 0, len(this.StringToBytesMap)) + for k := range this.StringToBytesMap { + keysForStringToBytesMap = append(keysForStringToBytesMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToBytesMap) + mapStringForStringToBytesMap := "map[string][]byte{" + for _, k := range keysForStringToBytesMap { + mapStringForStringToBytesMap += fmt.Sprintf("%#v: %#v,", k, this.StringToBytesMap[k]) + } + mapStringForStringToBytesMap += "}" + if this.StringToBytesMap != nil { + s = append(s, "StringToBytesMap: "+mapStringForStringToBytesMap+",\n") + } + keysForStringToEnumMap := make([]string, 0, len(this.StringToEnumMap)) + for k := range this.StringToEnumMap { + keysForStringToEnumMap = append(keysForStringToEnumMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToEnumMap) + mapStringForStringToEnumMap := "map[string]MapEnum{" + for _, k := range keysForStringToEnumMap { + mapStringForStringToEnumMap += fmt.Sprintf("%#v: %#v,", k, this.StringToEnumMap[k]) + } + mapStringForStringToEnumMap += "}" + if this.StringToEnumMap != nil { + s = append(s, "StringToEnumMap: "+mapStringForStringToEnumMap+",\n") + } + keysForStringToMsgMap := make([]string, 0, len(this.StringToMsgMap)) + for k := range this.StringToMsgMap { + keysForStringToMsgMap = append(keysForStringToMsgMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToMsgMap) + mapStringForStringToMsgMap := "map[string]*FloatingPoint{" + for _, k := range keysForStringToMsgMap { + mapStringForStringToMsgMap += fmt.Sprintf("%#v: %#v,", k, this.StringToMsgMap[k]) + } + mapStringForStringToMsgMap += "}" + if this.StringToMsgMap != nil { + s = append(s, "StringToMsgMap: "+mapStringForStringToMsgMap+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *MessageWithMap) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 7) + s = append(s, "&theproto3.MessageWithMap{") + keysForNameMapping := make([]int32, 0, len(this.NameMapping)) + for k := range this.NameMapping { + keysForNameMapping = append(keysForNameMapping, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForNameMapping) + mapStringForNameMapping := "map[int32]string{" + for _, k := range keysForNameMapping { + mapStringForNameMapping += fmt.Sprintf("%#v: %#v,", k, this.NameMapping[k]) + } + mapStringForNameMapping += "}" + if this.NameMapping != nil { + s = append(s, "NameMapping: "+mapStringForNameMapping+",\n") + } + keysForMsgMapping := make([]int64, 0, len(this.MsgMapping)) + for k := range this.MsgMapping { + keysForMsgMapping = append(keysForMsgMapping, k) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForMsgMapping) + mapStringForMsgMapping := "map[int64]*FloatingPoint{" + for _, k := range keysForMsgMapping { + mapStringForMsgMapping += fmt.Sprintf("%#v: %#v,", k, this.MsgMapping[k]) + } + mapStringForMsgMapping += "}" + if this.MsgMapping != nil { + s = append(s, "MsgMapping: "+mapStringForMsgMapping+",\n") + } + keysForByteMapping := make([]bool, 0, len(this.ByteMapping)) + for k := range this.ByteMapping { + keysForByteMapping = append(keysForByteMapping, k) + } + github_com_gogo_protobuf_sortkeys.Bools(keysForByteMapping) + mapStringForByteMapping := "map[bool][]byte{" + for _, k := range keysForByteMapping { + mapStringForByteMapping += fmt.Sprintf("%#v: %#v,", k, this.ByteMapping[k]) + } + mapStringForByteMapping += "}" + if this.ByteMapping != nil { + s = append(s, "ByteMapping: "+mapStringForByteMapping+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *FloatingPoint) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&theproto3.FloatingPoint{") + s = append(s, "F: "+fmt.Sprintf("%#v", this.F)+",\n") + s = append(s, "}") + return strings.Join(s, "") +} +func (this *Uint128Pair) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 6) + s = append(s, "&theproto3.Uint128Pair{") + s = append(s, "Left: "+fmt.Sprintf("%#v", this.Left)+",\n") + s = append(s, "Right: "+fmt.Sprintf("%#v", this.Right)+",\n") + s = append(s, "}") + return strings.Join(s, "") +} +func (this *ContainsNestedMap) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 4) + s = append(s, "&theproto3.ContainsNestedMap{") + s = append(s, "}") + return strings.Join(s, "") +} +func (this *ContainsNestedMap_NestedMap) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&theproto3.ContainsNestedMap_NestedMap{") + keysForNestedMapField := make([]string, 0, len(this.NestedMapField)) + for k := range this.NestedMapField { + keysForNestedMapField = append(keysForNestedMapField, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForNestedMapField) + mapStringForNestedMapField := "map[string]float64{" + for _, k := range keysForNestedMapField { + mapStringForNestedMapField += fmt.Sprintf("%#v: %#v,", k, this.NestedMapField[k]) + } + mapStringForNestedMapField += "}" + if this.NestedMapField != nil { + s = append(s, "NestedMapField: "+mapStringForNestedMapField+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func valueToGoStringTheproto3(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 extensionToGoStringTheproto3(e map[int32]github_com_gogo_protobuf_proto.Extension) string { + if e == nil { + return "nil" + } + s := "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 +} +func NewPopulatedMessage(r randyTheproto3, easy bool) *Message { + this := &Message{} + this.Name = randStringTheproto3(r) + this.Hilarity = Message_Humour([]int32{0, 1, 2, 3}[r.Intn(4)]) + this.HeightInCm = uint32(r.Uint32()) + v1 := r.Intn(100) + this.Data = make([]byte, v1) + for i := 0; i < v1; i++ { + this.Data[i] = byte(r.Intn(256)) + } + this.ResultCount = int64(r.Int63()) + if r.Intn(2) == 0 { + this.ResultCount *= -1 + } + this.TrueScotsman = bool(bool(r.Intn(2) == 0)) + this.Score = float32(r.Float32()) + if r.Intn(2) == 0 { + this.Score *= -1 + } + v2 := r.Intn(10) + this.Key = make([]uint64, v2) + for i := 0; i < v2; i++ { + this.Key[i] = uint64(uint64(r.Uint32())) + } + if r.Intn(10) != 0 { + this.Nested = NewPopulatedNested(r, easy) + } + if r.Intn(10) != 0 { + v3 := r.Intn(10) + this.Terrain = make(map[int64]*Nested) + for i := 0; i < v3; i++ { + this.Terrain[int64(r.Int63())] = NewPopulatedNested(r, easy) + } + } + if r.Intn(10) != 0 { + this.Proto2Field = test.NewPopulatedNinOptNative(r, easy) + } + if r.Intn(10) != 0 { + v4 := r.Intn(10) + this.Proto2Value = make(map[int64]*test.NinOptEnum) + for i := 0; i < v4; i++ { + this.Proto2Value[int64(r.Int63())] = test.NewPopulatedNinOptEnum(r, easy) + } + } + if !easy && r.Intn(10) != 0 { + } + return this +} + +func NewPopulatedNested(r randyTheproto3, easy bool) *Nested { + this := &Nested{} + this.Bunny = randStringTheproto3(r) + if !easy && r.Intn(10) != 0 { + } + return this +} + +func NewPopulatedAllMaps(r randyTheproto3, easy bool) *AllMaps { + this := &AllMaps{} + if r.Intn(10) != 0 { + v5 := r.Intn(10) + this.StringToDoubleMap = make(map[string]float64) + for i := 0; i < v5; i++ { + v6 := randStringTheproto3(r) + this.StringToDoubleMap[v6] = float64(r.Float64()) + if r.Intn(2) == 0 { + this.StringToDoubleMap[v6] *= -1 + } + } + } + if r.Intn(10) != 0 { + v7 := r.Intn(10) + this.StringToFloatMap = make(map[string]float32) + for i := 0; i < v7; i++ { + v8 := randStringTheproto3(r) + this.StringToFloatMap[v8] = float32(r.Float32()) + if r.Intn(2) == 0 { + this.StringToFloatMap[v8] *= -1 + } + } + } + if r.Intn(10) != 0 { + v9 := r.Intn(10) + this.Int32Map = make(map[int32]int32) + for i := 0; i < v9; i++ { + v10 := int32(r.Int31()) + this.Int32Map[v10] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Int32Map[v10] *= -1 + } + } + } + if r.Intn(10) != 0 { + v11 := r.Intn(10) + this.Int64Map = make(map[int64]int64) + for i := 0; i < v11; i++ { + v12 := int64(r.Int63()) + this.Int64Map[v12] = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Int64Map[v12] *= -1 + } + } + } + if r.Intn(10) != 0 { + v13 := r.Intn(10) + this.Uint32Map = make(map[uint32]uint32) + for i := 0; i < v13; i++ { + v14 := uint32(r.Uint32()) + this.Uint32Map[v14] = uint32(r.Uint32()) + } + } + if r.Intn(10) != 0 { + v15 := r.Intn(10) + this.Uint64Map = make(map[uint64]uint64) + for i := 0; i < v15; i++ { + v16 := uint64(uint64(r.Uint32())) + this.Uint64Map[v16] = uint64(uint64(r.Uint32())) + } + } + if r.Intn(10) != 0 { + v17 := r.Intn(10) + this.Sint32Map = make(map[int32]int32) + for i := 0; i < v17; i++ { + v18 := int32(r.Int31()) + this.Sint32Map[v18] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Sint32Map[v18] *= -1 + } + } + } + if r.Intn(10) != 0 { + v19 := r.Intn(10) + this.Sint64Map = make(map[int64]int64) + for i := 0; i < v19; i++ { + v20 := int64(r.Int63()) + this.Sint64Map[v20] = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Sint64Map[v20] *= -1 + } + } + } + if r.Intn(10) != 0 { + v21 := r.Intn(10) + this.Fixed32Map = make(map[uint32]uint32) + for i := 0; i < v21; i++ { + v22 := uint32(r.Uint32()) + this.Fixed32Map[v22] = uint32(r.Uint32()) + } + } + if r.Intn(10) != 0 { + v23 := r.Intn(10) + this.Sfixed32Map = make(map[int32]int32) + for i := 0; i < v23; i++ { + v24 := int32(r.Int31()) + this.Sfixed32Map[v24] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Sfixed32Map[v24] *= -1 + } + } + } + if r.Intn(10) != 0 { + v25 := r.Intn(10) + this.Fixed64Map = make(map[uint64]uint64) + for i := 0; i < v25; i++ { + v26 := uint64(uint64(r.Uint32())) + this.Fixed64Map[v26] = uint64(uint64(r.Uint32())) + } + } + if r.Intn(10) != 0 { + v27 := r.Intn(10) + this.Sfixed64Map = make(map[int64]int64) + for i := 0; i < v27; i++ { + v28 := int64(r.Int63()) + this.Sfixed64Map[v28] = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Sfixed64Map[v28] *= -1 + } + } + } + if r.Intn(10) != 0 { + v29 := r.Intn(10) + this.BoolMap = make(map[bool]bool) + for i := 0; i < v29; i++ { + v30 := bool(bool(r.Intn(2) == 0)) + this.BoolMap[v30] = bool(bool(r.Intn(2) == 0)) + } + } + if r.Intn(10) != 0 { + v31 := r.Intn(10) + this.StringMap = make(map[string]string) + for i := 0; i < v31; i++ { + this.StringMap[randStringTheproto3(r)] = randStringTheproto3(r) + } + } + if r.Intn(10) != 0 { + v32 := r.Intn(10) + this.StringToBytesMap = make(map[string][]byte) + for i := 0; i < v32; i++ { + v33 := r.Intn(100) + v34 := randStringTheproto3(r) + this.StringToBytesMap[v34] = make([]byte, v33) + for i := 0; i < v33; i++ { + this.StringToBytesMap[v34][i] = byte(r.Intn(256)) + } + } + } + if r.Intn(10) != 0 { + v35 := r.Intn(10) + this.StringToEnumMap = make(map[string]MapEnum) + for i := 0; i < v35; i++ { + this.StringToEnumMap[randStringTheproto3(r)] = MapEnum([]int32{0, 1, 2}[r.Intn(3)]) + } + } + if r.Intn(10) != 0 { + v36 := r.Intn(10) + this.StringToMsgMap = make(map[string]*FloatingPoint) + for i := 0; i < v36; i++ { + this.StringToMsgMap[randStringTheproto3(r)] = NewPopulatedFloatingPoint(r, easy) + } + } + if !easy && r.Intn(10) != 0 { + } + return this +} + +func NewPopulatedAllMapsOrdered(r randyTheproto3, easy bool) *AllMapsOrdered { + this := &AllMapsOrdered{} + if r.Intn(10) != 0 { + v37 := r.Intn(10) + this.StringToDoubleMap = make(map[string]float64) + for i := 0; i < v37; i++ { + v38 := randStringTheproto3(r) + this.StringToDoubleMap[v38] = float64(r.Float64()) + if r.Intn(2) == 0 { + this.StringToDoubleMap[v38] *= -1 + } + } + } + if r.Intn(10) != 0 { + v39 := r.Intn(10) + this.StringToFloatMap = make(map[string]float32) + for i := 0; i < v39; i++ { + v40 := randStringTheproto3(r) + this.StringToFloatMap[v40] = float32(r.Float32()) + if r.Intn(2) == 0 { + this.StringToFloatMap[v40] *= -1 + } + } + } + if r.Intn(10) != 0 { + v41 := r.Intn(10) + this.Int32Map = make(map[int32]int32) + for i := 0; i < v41; i++ { + v42 := int32(r.Int31()) + this.Int32Map[v42] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Int32Map[v42] *= -1 + } + } + } + if r.Intn(10) != 0 { + v43 := r.Intn(10) + this.Int64Map = make(map[int64]int64) + for i := 0; i < v43; i++ { + v44 := int64(r.Int63()) + this.Int64Map[v44] = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Int64Map[v44] *= -1 + } + } + } + if r.Intn(10) != 0 { + v45 := r.Intn(10) + this.Uint32Map = make(map[uint32]uint32) + for i := 0; i < v45; i++ { + v46 := uint32(r.Uint32()) + this.Uint32Map[v46] = uint32(r.Uint32()) + } + } + if r.Intn(10) != 0 { + v47 := r.Intn(10) + this.Uint64Map = make(map[uint64]uint64) + for i := 0; i < v47; i++ { + v48 := uint64(uint64(r.Uint32())) + this.Uint64Map[v48] = uint64(uint64(r.Uint32())) + } + } + if r.Intn(10) != 0 { + v49 := r.Intn(10) + this.Sint32Map = make(map[int32]int32) + for i := 0; i < v49; i++ { + v50 := int32(r.Int31()) + this.Sint32Map[v50] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Sint32Map[v50] *= -1 + } + } + } + if r.Intn(10) != 0 { + v51 := r.Intn(10) + this.Sint64Map = make(map[int64]int64) + for i := 0; i < v51; i++ { + v52 := int64(r.Int63()) + this.Sint64Map[v52] = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Sint64Map[v52] *= -1 + } + } + } + if r.Intn(10) != 0 { + v53 := r.Intn(10) + this.Fixed32Map = make(map[uint32]uint32) + for i := 0; i < v53; i++ { + v54 := uint32(r.Uint32()) + this.Fixed32Map[v54] = uint32(r.Uint32()) + } + } + if r.Intn(10) != 0 { + v55 := r.Intn(10) + this.Sfixed32Map = make(map[int32]int32) + for i := 0; i < v55; i++ { + v56 := int32(r.Int31()) + this.Sfixed32Map[v56] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Sfixed32Map[v56] *= -1 + } + } + } + if r.Intn(10) != 0 { + v57 := r.Intn(10) + this.Fixed64Map = make(map[uint64]uint64) + for i := 0; i < v57; i++ { + v58 := uint64(uint64(r.Uint32())) + this.Fixed64Map[v58] = uint64(uint64(r.Uint32())) + } + } + if r.Intn(10) != 0 { + v59 := r.Intn(10) + this.Sfixed64Map = make(map[int64]int64) + for i := 0; i < v59; i++ { + v60 := int64(r.Int63()) + this.Sfixed64Map[v60] = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Sfixed64Map[v60] *= -1 + } + } + } + if r.Intn(10) != 0 { + v61 := r.Intn(10) + this.BoolMap = make(map[bool]bool) + for i := 0; i < v61; i++ { + v62 := bool(bool(r.Intn(2) == 0)) + this.BoolMap[v62] = bool(bool(r.Intn(2) == 0)) + } + } + if r.Intn(10) != 0 { + v63 := r.Intn(10) + this.StringMap = make(map[string]string) + for i := 0; i < v63; i++ { + this.StringMap[randStringTheproto3(r)] = randStringTheproto3(r) + } + } + if r.Intn(10) != 0 { + v64 := r.Intn(10) + this.StringToBytesMap = make(map[string][]byte) + for i := 0; i < v64; i++ { + v65 := r.Intn(100) + v66 := randStringTheproto3(r) + this.StringToBytesMap[v66] = make([]byte, v65) + for i := 0; i < v65; i++ { + this.StringToBytesMap[v66][i] = byte(r.Intn(256)) + } + } + } + if r.Intn(10) != 0 { + v67 := r.Intn(10) + this.StringToEnumMap = make(map[string]MapEnum) + for i := 0; i < v67; i++ { + this.StringToEnumMap[randStringTheproto3(r)] = MapEnum([]int32{0, 1, 2}[r.Intn(3)]) + } + } + if r.Intn(10) != 0 { + v68 := r.Intn(10) + this.StringToMsgMap = make(map[string]*FloatingPoint) + for i := 0; i < v68; i++ { + this.StringToMsgMap[randStringTheproto3(r)] = NewPopulatedFloatingPoint(r, easy) + } + } + if !easy && r.Intn(10) != 0 { + } + return this +} + +func NewPopulatedMessageWithMap(r randyTheproto3, easy bool) *MessageWithMap { + this := &MessageWithMap{} + if r.Intn(10) != 0 { + v69 := r.Intn(10) + this.NameMapping = make(map[int32]string) + for i := 0; i < v69; i++ { + this.NameMapping[int32(r.Int31())] = randStringTheproto3(r) + } + } + if r.Intn(10) != 0 { + v70 := r.Intn(10) + this.MsgMapping = make(map[int64]*FloatingPoint) + for i := 0; i < v70; i++ { + this.MsgMapping[int64(r.Int63())] = NewPopulatedFloatingPoint(r, easy) + } + } + if r.Intn(10) != 0 { + v71 := r.Intn(10) + this.ByteMapping = make(map[bool][]byte) + for i := 0; i < v71; i++ { + v72 := r.Intn(100) + v73 := bool(bool(r.Intn(2) == 0)) + this.ByteMapping[v73] = make([]byte, v72) + for i := 0; i < v72; i++ { + this.ByteMapping[v73][i] = byte(r.Intn(256)) + } + } + } + if !easy && r.Intn(10) != 0 { + } + return this +} + +func NewPopulatedFloatingPoint(r randyTheproto3, easy bool) *FloatingPoint { + this := &FloatingPoint{} + this.F = float64(r.Float64()) + if r.Intn(2) == 0 { + this.F *= -1 + } + if !easy && r.Intn(10) != 0 { + } + return this +} + +func NewPopulatedUint128Pair(r randyTheproto3, easy bool) *Uint128Pair { + this := &Uint128Pair{} + v74 := github_com_gogo_protobuf_test_custom.NewPopulatedUint128(r) + this.Left = *v74 + this.Right = github_com_gogo_protobuf_test_custom.NewPopulatedUint128(r) + if !easy && r.Intn(10) != 0 { + } + return this +} + +func NewPopulatedContainsNestedMap(r randyTheproto3, easy bool) *ContainsNestedMap { + this := &ContainsNestedMap{} + if !easy && r.Intn(10) != 0 { + } + return this +} + +func NewPopulatedContainsNestedMap_NestedMap(r randyTheproto3, easy bool) *ContainsNestedMap_NestedMap { + this := &ContainsNestedMap_NestedMap{} + if r.Intn(10) != 0 { + v75 := r.Intn(10) + this.NestedMapField = make(map[string]float64) + for i := 0; i < v75; i++ { + v76 := randStringTheproto3(r) + this.NestedMapField[v76] = float64(r.Float64()) + if r.Intn(2) == 0 { + this.NestedMapField[v76] *= -1 + } + } + } + if !easy && r.Intn(10) != 0 { + } + return this +} + +type randyTheproto3 interface { + Float32() float32 + Float64() float64 + Int63() int64 + Int31() int32 + Uint32() uint32 + Intn(n int) int +} + +func randUTF8RuneTheproto3(r randyTheproto3) 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 randStringTheproto3(r randyTheproto3) string { + v77 := r.Intn(100) + tmps := make([]rune, v77) + for i := 0; i < v77; i++ { + tmps[i] = randUTF8RuneTheproto3(r) + } + return string(tmps) +} +func randUnrecognizedTheproto3(r randyTheproto3, 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 = randFieldTheproto3(data, r, fieldNumber, wire) + } + return data +} +func randFieldTheproto3(data []byte, r randyTheproto3, fieldNumber int, wire int) []byte { + key := uint32(fieldNumber)<<3 | uint32(wire) + switch wire { + case 0: + data = encodeVarintPopulateTheproto3(data, uint64(key)) + v78 := r.Int63() + if r.Intn(2) == 0 { + v78 *= -1 + } + data = encodeVarintPopulateTheproto3(data, uint64(v78)) + case 1: + data = encodeVarintPopulateTheproto3(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 = encodeVarintPopulateTheproto3(data, uint64(key)) + ll := r.Intn(100) + data = encodeVarintPopulateTheproto3(data, uint64(ll)) + for j := 0; j < ll; j++ { + data = append(data, byte(r.Intn(256))) + } + default: + data = encodeVarintPopulateTheproto3(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 encodeVarintPopulateTheproto3(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 *Message) Size() (n int) { + var l int + _ = l + l = len(m.Name) + if l > 0 { + n += 1 + l + sovTheproto3(uint64(l)) + } + if m.Hilarity != 0 { + n += 1 + sovTheproto3(uint64(m.Hilarity)) + } + if m.HeightInCm != 0 { + n += 1 + sovTheproto3(uint64(m.HeightInCm)) + } + l = len(m.Data) + if l > 0 { + n += 1 + l + sovTheproto3(uint64(l)) + } + if m.ResultCount != 0 { + n += 1 + sovTheproto3(uint64(m.ResultCount)) + } + if m.TrueScotsman { + n += 2 + } + if m.Score != 0 { + n += 5 + } + if len(m.Key) > 0 { + for _, e := range m.Key { + n += 1 + sovTheproto3(uint64(e)) + } + } + if m.Nested != nil { + l = m.Nested.Size() + n += 1 + l + sovTheproto3(uint64(l)) + } + if len(m.Terrain) > 0 { + for k, v := range m.Terrain { + _ = k + _ = v + l = 0 + if v != nil { + l = v.Size() + } + mapEntrySize := 1 + sovTheproto3(uint64(k)) + 1 + l + sovTheproto3(uint64(l)) + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if m.Proto2Field != nil { + l = m.Proto2Field.Size() + n += 1 + l + sovTheproto3(uint64(l)) + } + if len(m.Proto2Value) > 0 { + for k, v := range m.Proto2Value { + _ = k + _ = v + l = 0 + if v != nil { + l = v.Size() + } + mapEntrySize := 1 + sovTheproto3(uint64(k)) + 1 + l + sovTheproto3(uint64(l)) + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + return n +} + +func (m *Nested) Size() (n int) { + var l int + _ = l + l = len(m.Bunny) + if l > 0 { + n += 1 + l + sovTheproto3(uint64(l)) + } + return n +} + +func (m *AllMaps) Size() (n int) { + var l int + _ = l + if len(m.StringToDoubleMap) > 0 { + for k, v := range m.StringToDoubleMap { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovTheproto3(uint64(len(k))) + 1 + 8 + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.StringToFloatMap) > 0 { + for k, v := range m.StringToFloatMap { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovTheproto3(uint64(len(k))) + 1 + 4 + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.Int32Map) > 0 { + for k, v := range m.Int32Map { + _ = k + _ = v + mapEntrySize := 1 + sovTheproto3(uint64(k)) + 1 + sovTheproto3(uint64(v)) + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.Int64Map) > 0 { + for k, v := range m.Int64Map { + _ = k + _ = v + mapEntrySize := 1 + sovTheproto3(uint64(k)) + 1 + sovTheproto3(uint64(v)) + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.Uint32Map) > 0 { + for k, v := range m.Uint32Map { + _ = k + _ = v + mapEntrySize := 1 + sovTheproto3(uint64(k)) + 1 + sovTheproto3(uint64(v)) + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.Uint64Map) > 0 { + for k, v := range m.Uint64Map { + _ = k + _ = v + mapEntrySize := 1 + sovTheproto3(uint64(k)) + 1 + sovTheproto3(uint64(v)) + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.Sint32Map) > 0 { + for k, v := range m.Sint32Map { + _ = k + _ = v + mapEntrySize := 1 + sozTheproto3(uint64(k)) + 1 + sozTheproto3(uint64(v)) + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.Sint64Map) > 0 { + for k, v := range m.Sint64Map { + _ = k + _ = v + mapEntrySize := 1 + sozTheproto3(uint64(k)) + 1 + sozTheproto3(uint64(v)) + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.Fixed32Map) > 0 { + for k, v := range m.Fixed32Map { + _ = k + _ = v + mapEntrySize := 1 + 4 + 1 + 4 + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.Sfixed32Map) > 0 { + for k, v := range m.Sfixed32Map { + _ = k + _ = v + mapEntrySize := 1 + 4 + 1 + 4 + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.Fixed64Map) > 0 { + for k, v := range m.Fixed64Map { + _ = k + _ = v + mapEntrySize := 1 + 8 + 1 + 8 + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.Sfixed64Map) > 0 { + for k, v := range m.Sfixed64Map { + _ = k + _ = v + mapEntrySize := 1 + 8 + 1 + 8 + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.BoolMap) > 0 { + for k, v := range m.BoolMap { + _ = k + _ = v + mapEntrySize := 1 + 1 + 1 + 1 + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.StringMap) > 0 { + for k, v := range m.StringMap { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovTheproto3(uint64(len(k))) + 1 + len(v) + sovTheproto3(uint64(len(v))) + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.StringToBytesMap) > 0 { + for k, v := range m.StringToBytesMap { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovTheproto3(uint64(len(k))) + 1 + len(v) + sovTheproto3(uint64(len(v))) + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.StringToEnumMap) > 0 { + for k, v := range m.StringToEnumMap { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovTheproto3(uint64(len(k))) + 1 + sovTheproto3(uint64(v)) + n += mapEntrySize + 2 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.StringToMsgMap) > 0 { + for k, v := range m.StringToMsgMap { + _ = k + _ = v + l = 0 + if v != nil { + l = v.Size() + } + mapEntrySize := 1 + len(k) + sovTheproto3(uint64(len(k))) + 1 + l + sovTheproto3(uint64(l)) + n += mapEntrySize + 2 + sovTheproto3(uint64(mapEntrySize)) + } + } + return n +} + +func (m *AllMapsOrdered) Size() (n int) { + var l int + _ = l + if len(m.StringToDoubleMap) > 0 { + for k, v := range m.StringToDoubleMap { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovTheproto3(uint64(len(k))) + 1 + 8 + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.StringToFloatMap) > 0 { + for k, v := range m.StringToFloatMap { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovTheproto3(uint64(len(k))) + 1 + 4 + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.Int32Map) > 0 { + for k, v := range m.Int32Map { + _ = k + _ = v + mapEntrySize := 1 + sovTheproto3(uint64(k)) + 1 + sovTheproto3(uint64(v)) + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.Int64Map) > 0 { + for k, v := range m.Int64Map { + _ = k + _ = v + mapEntrySize := 1 + sovTheproto3(uint64(k)) + 1 + sovTheproto3(uint64(v)) + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.Uint32Map) > 0 { + for k, v := range m.Uint32Map { + _ = k + _ = v + mapEntrySize := 1 + sovTheproto3(uint64(k)) + 1 + sovTheproto3(uint64(v)) + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.Uint64Map) > 0 { + for k, v := range m.Uint64Map { + _ = k + _ = v + mapEntrySize := 1 + sovTheproto3(uint64(k)) + 1 + sovTheproto3(uint64(v)) + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.Sint32Map) > 0 { + for k, v := range m.Sint32Map { + _ = k + _ = v + mapEntrySize := 1 + sozTheproto3(uint64(k)) + 1 + sozTheproto3(uint64(v)) + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.Sint64Map) > 0 { + for k, v := range m.Sint64Map { + _ = k + _ = v + mapEntrySize := 1 + sozTheproto3(uint64(k)) + 1 + sozTheproto3(uint64(v)) + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.Fixed32Map) > 0 { + for k, v := range m.Fixed32Map { + _ = k + _ = v + mapEntrySize := 1 + 4 + 1 + 4 + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.Sfixed32Map) > 0 { + for k, v := range m.Sfixed32Map { + _ = k + _ = v + mapEntrySize := 1 + 4 + 1 + 4 + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.Fixed64Map) > 0 { + for k, v := range m.Fixed64Map { + _ = k + _ = v + mapEntrySize := 1 + 8 + 1 + 8 + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.Sfixed64Map) > 0 { + for k, v := range m.Sfixed64Map { + _ = k + _ = v + mapEntrySize := 1 + 8 + 1 + 8 + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.BoolMap) > 0 { + for k, v := range m.BoolMap { + _ = k + _ = v + mapEntrySize := 1 + 1 + 1 + 1 + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.StringMap) > 0 { + for k, v := range m.StringMap { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovTheproto3(uint64(len(k))) + 1 + len(v) + sovTheproto3(uint64(len(v))) + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.StringToBytesMap) > 0 { + for k, v := range m.StringToBytesMap { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovTheproto3(uint64(len(k))) + 1 + len(v) + sovTheproto3(uint64(len(v))) + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.StringToEnumMap) > 0 { + for k, v := range m.StringToEnumMap { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovTheproto3(uint64(len(k))) + 1 + sovTheproto3(uint64(v)) + n += mapEntrySize + 2 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.StringToMsgMap) > 0 { + for k, v := range m.StringToMsgMap { + _ = k + _ = v + l = 0 + if v != nil { + l = v.Size() + } + mapEntrySize := 1 + len(k) + sovTheproto3(uint64(len(k))) + 1 + l + sovTheproto3(uint64(l)) + n += mapEntrySize + 2 + sovTheproto3(uint64(mapEntrySize)) + } + } + return n +} + +func (m *MessageWithMap) Size() (n int) { + var l int + _ = l + if len(m.NameMapping) > 0 { + for k, v := range m.NameMapping { + _ = k + _ = v + mapEntrySize := 1 + sovTheproto3(uint64(k)) + 1 + len(v) + sovTheproto3(uint64(len(v))) + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.MsgMapping) > 0 { + for k, v := range m.MsgMapping { + _ = k + _ = v + l = 0 + if v != nil { + l = v.Size() + } + mapEntrySize := 1 + sozTheproto3(uint64(k)) + 1 + l + sovTheproto3(uint64(l)) + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.ByteMapping) > 0 { + for k, v := range m.ByteMapping { + _ = k + _ = v + mapEntrySize := 1 + 1 + 1 + len(v) + sovTheproto3(uint64(len(v))) + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + return n +} + +func (m *FloatingPoint) Size() (n int) { + var l int + _ = l + if m.F != 0 { + n += 9 + } + return n +} + +func (m *Uint128Pair) Size() (n int) { + var l int + _ = l + l = m.Left.Size() + n += 1 + l + sovTheproto3(uint64(l)) + if m.Right != nil { + l = m.Right.Size() + n += 1 + l + sovTheproto3(uint64(l)) + } + return n +} + +func (m *ContainsNestedMap) Size() (n int) { + var l int + _ = l + return n +} + +func (m *ContainsNestedMap_NestedMap) Size() (n int) { + var l int + _ = l + if len(m.NestedMapField) > 0 { + for k, v := range m.NestedMapField { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovTheproto3(uint64(len(k))) + 1 + 8 + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + return n +} + +func sovTheproto3(x uint64) (n int) { + for { + n++ + x >>= 7 + if x == 0 { + break + } + } + return n +} +func sozTheproto3(x uint64) (n int) { + return sovTheproto3(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (this *Message) String() string { + if this == nil { + return "nil" + } + keysForTerrain := make([]int64, 0, len(this.Terrain)) + for k := range this.Terrain { + keysForTerrain = append(keysForTerrain, k) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForTerrain) + mapStringForTerrain := "map[int64]*Nested{" + for _, k := range keysForTerrain { + mapStringForTerrain += fmt.Sprintf("%v: %v,", k, this.Terrain[k]) + } + mapStringForTerrain += "}" + keysForProto2Value := make([]int64, 0, len(this.Proto2Value)) + for k := range this.Proto2Value { + keysForProto2Value = append(keysForProto2Value, k) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForProto2Value) + mapStringForProto2Value := "map[int64]*test.NinOptEnum{" + for _, k := range keysForProto2Value { + mapStringForProto2Value += fmt.Sprintf("%v: %v,", k, this.Proto2Value[k]) + } + mapStringForProto2Value += "}" + s := strings.Join([]string{`&Message{`, + `Name:` + fmt.Sprintf("%v", this.Name) + `,`, + `Hilarity:` + fmt.Sprintf("%v", this.Hilarity) + `,`, + `HeightInCm:` + fmt.Sprintf("%v", this.HeightInCm) + `,`, + `Data:` + fmt.Sprintf("%v", this.Data) + `,`, + `ResultCount:` + fmt.Sprintf("%v", this.ResultCount) + `,`, + `TrueScotsman:` + fmt.Sprintf("%v", this.TrueScotsman) + `,`, + `Score:` + fmt.Sprintf("%v", this.Score) + `,`, + `Key:` + fmt.Sprintf("%v", this.Key) + `,`, + `Nested:` + strings.Replace(fmt.Sprintf("%v", this.Nested), "Nested", "Nested", 1) + `,`, + `Terrain:` + mapStringForTerrain + `,`, + `Proto2Field:` + strings.Replace(fmt.Sprintf("%v", this.Proto2Field), "NinOptNative", "test.NinOptNative", 1) + `,`, + `Proto2Value:` + mapStringForProto2Value + `,`, + `}`, + }, "") + return s +} +func (this *Nested) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&Nested{`, + `Bunny:` + fmt.Sprintf("%v", this.Bunny) + `,`, + `}`, + }, "") + return s +} +func (this *AllMaps) String() string { + if this == nil { + return "nil" + } + keysForStringToDoubleMap := make([]string, 0, len(this.StringToDoubleMap)) + for k := range this.StringToDoubleMap { + keysForStringToDoubleMap = append(keysForStringToDoubleMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToDoubleMap) + mapStringForStringToDoubleMap := "map[string]float64{" + for _, k := range keysForStringToDoubleMap { + mapStringForStringToDoubleMap += fmt.Sprintf("%v: %v,", k, this.StringToDoubleMap[k]) + } + mapStringForStringToDoubleMap += "}" + keysForStringToFloatMap := make([]string, 0, len(this.StringToFloatMap)) + for k := range this.StringToFloatMap { + keysForStringToFloatMap = append(keysForStringToFloatMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToFloatMap) + mapStringForStringToFloatMap := "map[string]float32{" + for _, k := range keysForStringToFloatMap { + mapStringForStringToFloatMap += fmt.Sprintf("%v: %v,", k, this.StringToFloatMap[k]) + } + mapStringForStringToFloatMap += "}" + keysForInt32Map := make([]int32, 0, len(this.Int32Map)) + for k := range this.Int32Map { + keysForInt32Map = append(keysForInt32Map, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForInt32Map) + mapStringForInt32Map := "map[int32]int32{" + for _, k := range keysForInt32Map { + mapStringForInt32Map += fmt.Sprintf("%v: %v,", k, this.Int32Map[k]) + } + mapStringForInt32Map += "}" + keysForInt64Map := make([]int64, 0, len(this.Int64Map)) + for k := range this.Int64Map { + keysForInt64Map = append(keysForInt64Map, k) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForInt64Map) + mapStringForInt64Map := "map[int64]int64{" + for _, k := range keysForInt64Map { + mapStringForInt64Map += fmt.Sprintf("%v: %v,", k, this.Int64Map[k]) + } + mapStringForInt64Map += "}" + keysForUint32Map := make([]uint32, 0, len(this.Uint32Map)) + for k := range this.Uint32Map { + keysForUint32Map = append(keysForUint32Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint32s(keysForUint32Map) + mapStringForUint32Map := "map[uint32]uint32{" + for _, k := range keysForUint32Map { + mapStringForUint32Map += fmt.Sprintf("%v: %v,", k, this.Uint32Map[k]) + } + mapStringForUint32Map += "}" + keysForUint64Map := make([]uint64, 0, len(this.Uint64Map)) + for k := range this.Uint64Map { + keysForUint64Map = append(keysForUint64Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint64s(keysForUint64Map) + mapStringForUint64Map := "map[uint64]uint64{" + for _, k := range keysForUint64Map { + mapStringForUint64Map += fmt.Sprintf("%v: %v,", k, this.Uint64Map[k]) + } + mapStringForUint64Map += "}" + keysForSint32Map := make([]int32, 0, len(this.Sint32Map)) + for k := range this.Sint32Map { + keysForSint32Map = append(keysForSint32Map, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForSint32Map) + mapStringForSint32Map := "map[int32]int32{" + for _, k := range keysForSint32Map { + mapStringForSint32Map += fmt.Sprintf("%v: %v,", k, this.Sint32Map[k]) + } + mapStringForSint32Map += "}" + keysForSint64Map := make([]int64, 0, len(this.Sint64Map)) + for k := range this.Sint64Map { + keysForSint64Map = append(keysForSint64Map, k) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForSint64Map) + mapStringForSint64Map := "map[int64]int64{" + for _, k := range keysForSint64Map { + mapStringForSint64Map += fmt.Sprintf("%v: %v,", k, this.Sint64Map[k]) + } + mapStringForSint64Map += "}" + keysForFixed32Map := make([]uint32, 0, len(this.Fixed32Map)) + for k := range this.Fixed32Map { + keysForFixed32Map = append(keysForFixed32Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint32s(keysForFixed32Map) + mapStringForFixed32Map := "map[uint32]uint32{" + for _, k := range keysForFixed32Map { + mapStringForFixed32Map += fmt.Sprintf("%v: %v,", k, this.Fixed32Map[k]) + } + mapStringForFixed32Map += "}" + keysForSfixed32Map := make([]int32, 0, len(this.Sfixed32Map)) + for k := range this.Sfixed32Map { + keysForSfixed32Map = append(keysForSfixed32Map, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForSfixed32Map) + mapStringForSfixed32Map := "map[int32]int32{" + for _, k := range keysForSfixed32Map { + mapStringForSfixed32Map += fmt.Sprintf("%v: %v,", k, this.Sfixed32Map[k]) + } + mapStringForSfixed32Map += "}" + keysForFixed64Map := make([]uint64, 0, len(this.Fixed64Map)) + for k := range this.Fixed64Map { + keysForFixed64Map = append(keysForFixed64Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint64s(keysForFixed64Map) + mapStringForFixed64Map := "map[uint64]uint64{" + for _, k := range keysForFixed64Map { + mapStringForFixed64Map += fmt.Sprintf("%v: %v,", k, this.Fixed64Map[k]) + } + mapStringForFixed64Map += "}" + keysForSfixed64Map := make([]int64, 0, len(this.Sfixed64Map)) + for k := range this.Sfixed64Map { + keysForSfixed64Map = append(keysForSfixed64Map, k) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForSfixed64Map) + mapStringForSfixed64Map := "map[int64]int64{" + for _, k := range keysForSfixed64Map { + mapStringForSfixed64Map += fmt.Sprintf("%v: %v,", k, this.Sfixed64Map[k]) + } + mapStringForSfixed64Map += "}" + keysForBoolMap := make([]bool, 0, len(this.BoolMap)) + for k := range this.BoolMap { + keysForBoolMap = append(keysForBoolMap, k) + } + github_com_gogo_protobuf_sortkeys.Bools(keysForBoolMap) + mapStringForBoolMap := "map[bool]bool{" + for _, k := range keysForBoolMap { + mapStringForBoolMap += fmt.Sprintf("%v: %v,", k, this.BoolMap[k]) + } + mapStringForBoolMap += "}" + keysForStringMap := make([]string, 0, len(this.StringMap)) + for k := range this.StringMap { + keysForStringMap = append(keysForStringMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringMap) + mapStringForStringMap := "map[string]string{" + for _, k := range keysForStringMap { + mapStringForStringMap += fmt.Sprintf("%v: %v,", k, this.StringMap[k]) + } + mapStringForStringMap += "}" + keysForStringToBytesMap := make([]string, 0, len(this.StringToBytesMap)) + for k := range this.StringToBytesMap { + keysForStringToBytesMap = append(keysForStringToBytesMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToBytesMap) + mapStringForStringToBytesMap := "map[string][]byte{" + for _, k := range keysForStringToBytesMap { + mapStringForStringToBytesMap += fmt.Sprintf("%v: %v,", k, this.StringToBytesMap[k]) + } + mapStringForStringToBytesMap += "}" + keysForStringToEnumMap := make([]string, 0, len(this.StringToEnumMap)) + for k := range this.StringToEnumMap { + keysForStringToEnumMap = append(keysForStringToEnumMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToEnumMap) + mapStringForStringToEnumMap := "map[string]MapEnum{" + for _, k := range keysForStringToEnumMap { + mapStringForStringToEnumMap += fmt.Sprintf("%v: %v,", k, this.StringToEnumMap[k]) + } + mapStringForStringToEnumMap += "}" + keysForStringToMsgMap := make([]string, 0, len(this.StringToMsgMap)) + for k := range this.StringToMsgMap { + keysForStringToMsgMap = append(keysForStringToMsgMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToMsgMap) + mapStringForStringToMsgMap := "map[string]*FloatingPoint{" + for _, k := range keysForStringToMsgMap { + mapStringForStringToMsgMap += fmt.Sprintf("%v: %v,", k, this.StringToMsgMap[k]) + } + mapStringForStringToMsgMap += "}" + s := strings.Join([]string{`&AllMaps{`, + `StringToDoubleMap:` + mapStringForStringToDoubleMap + `,`, + `StringToFloatMap:` + mapStringForStringToFloatMap + `,`, + `Int32Map:` + mapStringForInt32Map + `,`, + `Int64Map:` + mapStringForInt64Map + `,`, + `Uint32Map:` + mapStringForUint32Map + `,`, + `Uint64Map:` + mapStringForUint64Map + `,`, + `Sint32Map:` + mapStringForSint32Map + `,`, + `Sint64Map:` + mapStringForSint64Map + `,`, + `Fixed32Map:` + mapStringForFixed32Map + `,`, + `Sfixed32Map:` + mapStringForSfixed32Map + `,`, + `Fixed64Map:` + mapStringForFixed64Map + `,`, + `Sfixed64Map:` + mapStringForSfixed64Map + `,`, + `BoolMap:` + mapStringForBoolMap + `,`, + `StringMap:` + mapStringForStringMap + `,`, + `StringToBytesMap:` + mapStringForStringToBytesMap + `,`, + `StringToEnumMap:` + mapStringForStringToEnumMap + `,`, + `StringToMsgMap:` + mapStringForStringToMsgMap + `,`, + `}`, + }, "") + return s +} +func (this *AllMapsOrdered) String() string { + if this == nil { + return "nil" + } + keysForStringToDoubleMap := make([]string, 0, len(this.StringToDoubleMap)) + for k := range this.StringToDoubleMap { + keysForStringToDoubleMap = append(keysForStringToDoubleMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToDoubleMap) + mapStringForStringToDoubleMap := "map[string]float64{" + for _, k := range keysForStringToDoubleMap { + mapStringForStringToDoubleMap += fmt.Sprintf("%v: %v,", k, this.StringToDoubleMap[k]) + } + mapStringForStringToDoubleMap += "}" + keysForStringToFloatMap := make([]string, 0, len(this.StringToFloatMap)) + for k := range this.StringToFloatMap { + keysForStringToFloatMap = append(keysForStringToFloatMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToFloatMap) + mapStringForStringToFloatMap := "map[string]float32{" + for _, k := range keysForStringToFloatMap { + mapStringForStringToFloatMap += fmt.Sprintf("%v: %v,", k, this.StringToFloatMap[k]) + } + mapStringForStringToFloatMap += "}" + keysForInt32Map := make([]int32, 0, len(this.Int32Map)) + for k := range this.Int32Map { + keysForInt32Map = append(keysForInt32Map, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForInt32Map) + mapStringForInt32Map := "map[int32]int32{" + for _, k := range keysForInt32Map { + mapStringForInt32Map += fmt.Sprintf("%v: %v,", k, this.Int32Map[k]) + } + mapStringForInt32Map += "}" + keysForInt64Map := make([]int64, 0, len(this.Int64Map)) + for k := range this.Int64Map { + keysForInt64Map = append(keysForInt64Map, k) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForInt64Map) + mapStringForInt64Map := "map[int64]int64{" + for _, k := range keysForInt64Map { + mapStringForInt64Map += fmt.Sprintf("%v: %v,", k, this.Int64Map[k]) + } + mapStringForInt64Map += "}" + keysForUint32Map := make([]uint32, 0, len(this.Uint32Map)) + for k := range this.Uint32Map { + keysForUint32Map = append(keysForUint32Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint32s(keysForUint32Map) + mapStringForUint32Map := "map[uint32]uint32{" + for _, k := range keysForUint32Map { + mapStringForUint32Map += fmt.Sprintf("%v: %v,", k, this.Uint32Map[k]) + } + mapStringForUint32Map += "}" + keysForUint64Map := make([]uint64, 0, len(this.Uint64Map)) + for k := range this.Uint64Map { + keysForUint64Map = append(keysForUint64Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint64s(keysForUint64Map) + mapStringForUint64Map := "map[uint64]uint64{" + for _, k := range keysForUint64Map { + mapStringForUint64Map += fmt.Sprintf("%v: %v,", k, this.Uint64Map[k]) + } + mapStringForUint64Map += "}" + keysForSint32Map := make([]int32, 0, len(this.Sint32Map)) + for k := range this.Sint32Map { + keysForSint32Map = append(keysForSint32Map, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForSint32Map) + mapStringForSint32Map := "map[int32]int32{" + for _, k := range keysForSint32Map { + mapStringForSint32Map += fmt.Sprintf("%v: %v,", k, this.Sint32Map[k]) + } + mapStringForSint32Map += "}" + keysForSint64Map := make([]int64, 0, len(this.Sint64Map)) + for k := range this.Sint64Map { + keysForSint64Map = append(keysForSint64Map, k) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForSint64Map) + mapStringForSint64Map := "map[int64]int64{" + for _, k := range keysForSint64Map { + mapStringForSint64Map += fmt.Sprintf("%v: %v,", k, this.Sint64Map[k]) + } + mapStringForSint64Map += "}" + keysForFixed32Map := make([]uint32, 0, len(this.Fixed32Map)) + for k := range this.Fixed32Map { + keysForFixed32Map = append(keysForFixed32Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint32s(keysForFixed32Map) + mapStringForFixed32Map := "map[uint32]uint32{" + for _, k := range keysForFixed32Map { + mapStringForFixed32Map += fmt.Sprintf("%v: %v,", k, this.Fixed32Map[k]) + } + mapStringForFixed32Map += "}" + keysForSfixed32Map := make([]int32, 0, len(this.Sfixed32Map)) + for k := range this.Sfixed32Map { + keysForSfixed32Map = append(keysForSfixed32Map, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForSfixed32Map) + mapStringForSfixed32Map := "map[int32]int32{" + for _, k := range keysForSfixed32Map { + mapStringForSfixed32Map += fmt.Sprintf("%v: %v,", k, this.Sfixed32Map[k]) + } + mapStringForSfixed32Map += "}" + keysForFixed64Map := make([]uint64, 0, len(this.Fixed64Map)) + for k := range this.Fixed64Map { + keysForFixed64Map = append(keysForFixed64Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint64s(keysForFixed64Map) + mapStringForFixed64Map := "map[uint64]uint64{" + for _, k := range keysForFixed64Map { + mapStringForFixed64Map += fmt.Sprintf("%v: %v,", k, this.Fixed64Map[k]) + } + mapStringForFixed64Map += "}" + keysForSfixed64Map := make([]int64, 0, len(this.Sfixed64Map)) + for k := range this.Sfixed64Map { + keysForSfixed64Map = append(keysForSfixed64Map, k) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForSfixed64Map) + mapStringForSfixed64Map := "map[int64]int64{" + for _, k := range keysForSfixed64Map { + mapStringForSfixed64Map += fmt.Sprintf("%v: %v,", k, this.Sfixed64Map[k]) + } + mapStringForSfixed64Map += "}" + keysForBoolMap := make([]bool, 0, len(this.BoolMap)) + for k := range this.BoolMap { + keysForBoolMap = append(keysForBoolMap, k) + } + github_com_gogo_protobuf_sortkeys.Bools(keysForBoolMap) + mapStringForBoolMap := "map[bool]bool{" + for _, k := range keysForBoolMap { + mapStringForBoolMap += fmt.Sprintf("%v: %v,", k, this.BoolMap[k]) + } + mapStringForBoolMap += "}" + keysForStringMap := make([]string, 0, len(this.StringMap)) + for k := range this.StringMap { + keysForStringMap = append(keysForStringMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringMap) + mapStringForStringMap := "map[string]string{" + for _, k := range keysForStringMap { + mapStringForStringMap += fmt.Sprintf("%v: %v,", k, this.StringMap[k]) + } + mapStringForStringMap += "}" + keysForStringToBytesMap := make([]string, 0, len(this.StringToBytesMap)) + for k := range this.StringToBytesMap { + keysForStringToBytesMap = append(keysForStringToBytesMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToBytesMap) + mapStringForStringToBytesMap := "map[string][]byte{" + for _, k := range keysForStringToBytesMap { + mapStringForStringToBytesMap += fmt.Sprintf("%v: %v,", k, this.StringToBytesMap[k]) + } + mapStringForStringToBytesMap += "}" + keysForStringToEnumMap := make([]string, 0, len(this.StringToEnumMap)) + for k := range this.StringToEnumMap { + keysForStringToEnumMap = append(keysForStringToEnumMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToEnumMap) + mapStringForStringToEnumMap := "map[string]MapEnum{" + for _, k := range keysForStringToEnumMap { + mapStringForStringToEnumMap += fmt.Sprintf("%v: %v,", k, this.StringToEnumMap[k]) + } + mapStringForStringToEnumMap += "}" + keysForStringToMsgMap := make([]string, 0, len(this.StringToMsgMap)) + for k := range this.StringToMsgMap { + keysForStringToMsgMap = append(keysForStringToMsgMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToMsgMap) + mapStringForStringToMsgMap := "map[string]*FloatingPoint{" + for _, k := range keysForStringToMsgMap { + mapStringForStringToMsgMap += fmt.Sprintf("%v: %v,", k, this.StringToMsgMap[k]) + } + mapStringForStringToMsgMap += "}" + s := strings.Join([]string{`&AllMapsOrdered{`, + `StringToDoubleMap:` + mapStringForStringToDoubleMap + `,`, + `StringToFloatMap:` + mapStringForStringToFloatMap + `,`, + `Int32Map:` + mapStringForInt32Map + `,`, + `Int64Map:` + mapStringForInt64Map + `,`, + `Uint32Map:` + mapStringForUint32Map + `,`, + `Uint64Map:` + mapStringForUint64Map + `,`, + `Sint32Map:` + mapStringForSint32Map + `,`, + `Sint64Map:` + mapStringForSint64Map + `,`, + `Fixed32Map:` + mapStringForFixed32Map + `,`, + `Sfixed32Map:` + mapStringForSfixed32Map + `,`, + `Fixed64Map:` + mapStringForFixed64Map + `,`, + `Sfixed64Map:` + mapStringForSfixed64Map + `,`, + `BoolMap:` + mapStringForBoolMap + `,`, + `StringMap:` + mapStringForStringMap + `,`, + `StringToBytesMap:` + mapStringForStringToBytesMap + `,`, + `StringToEnumMap:` + mapStringForStringToEnumMap + `,`, + `StringToMsgMap:` + mapStringForStringToMsgMap + `,`, + `}`, + }, "") + return s +} +func (this *MessageWithMap) String() string { + if this == nil { + return "nil" + } + keysForNameMapping := make([]int32, 0, len(this.NameMapping)) + for k := range this.NameMapping { + keysForNameMapping = append(keysForNameMapping, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForNameMapping) + mapStringForNameMapping := "map[int32]string{" + for _, k := range keysForNameMapping { + mapStringForNameMapping += fmt.Sprintf("%v: %v,", k, this.NameMapping[k]) + } + mapStringForNameMapping += "}" + keysForMsgMapping := make([]int64, 0, len(this.MsgMapping)) + for k := range this.MsgMapping { + keysForMsgMapping = append(keysForMsgMapping, k) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForMsgMapping) + mapStringForMsgMapping := "map[int64]*FloatingPoint{" + for _, k := range keysForMsgMapping { + mapStringForMsgMapping += fmt.Sprintf("%v: %v,", k, this.MsgMapping[k]) + } + mapStringForMsgMapping += "}" + keysForByteMapping := make([]bool, 0, len(this.ByteMapping)) + for k := range this.ByteMapping { + keysForByteMapping = append(keysForByteMapping, k) + } + github_com_gogo_protobuf_sortkeys.Bools(keysForByteMapping) + mapStringForByteMapping := "map[bool][]byte{" + for _, k := range keysForByteMapping { + mapStringForByteMapping += fmt.Sprintf("%v: %v,", k, this.ByteMapping[k]) + } + mapStringForByteMapping += "}" + s := strings.Join([]string{`&MessageWithMap{`, + `NameMapping:` + mapStringForNameMapping + `,`, + `MsgMapping:` + mapStringForMsgMapping + `,`, + `ByteMapping:` + mapStringForByteMapping + `,`, + `}`, + }, "") + return s +} +func (this *FloatingPoint) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&FloatingPoint{`, + `F:` + fmt.Sprintf("%v", this.F) + `,`, + `}`, + }, "") + return s +} +func (this *Uint128Pair) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&Uint128Pair{`, + `Left:` + fmt.Sprintf("%v", this.Left) + `,`, + `Right:` + fmt.Sprintf("%v", this.Right) + `,`, + `}`, + }, "") + return s +} +func (this *ContainsNestedMap) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&ContainsNestedMap{`, + `}`, + }, "") + return s +} +func (this *ContainsNestedMap_NestedMap) String() string { + if this == nil { + return "nil" + } + keysForNestedMapField := make([]string, 0, len(this.NestedMapField)) + for k := range this.NestedMapField { + keysForNestedMapField = append(keysForNestedMapField, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForNestedMapField) + mapStringForNestedMapField := "map[string]float64{" + for _, k := range keysForNestedMapField { + mapStringForNestedMapField += fmt.Sprintf("%v: %v,", k, this.NestedMapField[k]) + } + mapStringForNestedMapField += "}" + s := strings.Join([]string{`&ContainsNestedMap_NestedMap{`, + `NestedMapField:` + mapStringForNestedMapField + `,`, + `}`, + }, "") + return s +} +func valueToStringTheproto3(v interface{}) string { + rv := reflect.ValueOf(v) + if rv.IsNil() { + return "nil" + } + pv := reflect.Indirect(rv).Interface() + return fmt.Sprintf("*%v", pv) +} + +var fileDescriptorTheproto3 = []byte{ + // 1582 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xec, 0x59, 0x4d, 0x6f, 0xdb, 0xc6, + 0x16, 0x35, 0x25, 0x59, 0x1f, 0x57, 0x5f, 0xf4, 0x24, 0xef, 0x41, 0xcf, 0xc0, 0xb3, 0x1d, 0x05, + 0x48, 0x9c, 0xe0, 0x45, 0xce, 0x73, 0xd2, 0x36, 0x75, 0xd3, 0xa6, 0x96, 0x62, 0x21, 0x6e, 0x24, + 0xc5, 0x95, 0xec, 0xb8, 0x45, 0x80, 0x0a, 0x94, 0x4d, 0xc9, 0x44, 0x25, 0xd2, 0x20, 0xa9, 0xa0, + 0xde, 0xe5, 0x67, 0x74, 0x57, 0x74, 0xd7, 0x65, 0x91, 0x45, 0xd1, 0x65, 0xbb, 0xf3, 0xb2, 0x40, + 0x37, 0x45, 0x17, 0x41, 0x92, 0x6e, 0xb2, 0xcc, 0x32, 0xcb, 0xce, 0x07, 0x49, 0x0d, 0xa9, 0xa1, + 0xd8, 0x74, 0xd3, 0x8d, 0x17, 0x63, 0x71, 0x2e, 0xcf, 0x39, 0x73, 0x67, 0x38, 0x73, 0x79, 0x40, + 0xc3, 0xd2, 0x81, 0x31, 0xea, 0x19, 0xd6, 0x9a, 0xae, 0x6a, 0xf6, 0x91, 0x6a, 0xae, 0xe1, 0x3f, + 0xc7, 0xa6, 0x61, 0x1b, 0x37, 0x2a, 0xf4, 0x07, 0x65, 0xbc, 0xc0, 0xe2, 0xb5, 0x01, 0x86, 0x8c, + 0x7b, 0x15, 0xcc, 0x58, 0x1b, 0x18, 0x03, 0x63, 0x8d, 0xc6, 0x7b, 0xe3, 0x3e, 0xed, 0xd1, 0x0e, + 0xbd, 0x62, 0xcc, 0xc5, 0xf7, 0x42, 0xe1, 0xb6, 0x6a, 0xd9, 0x6b, 0xce, 0xb8, 0x3d, 0xc3, 0x3e, + 0x22, 0x83, 0x92, 0x18, 0x23, 0x96, 0x7f, 0x9e, 0x87, 0x54, 0x53, 0xb5, 0x2c, 0x65, 0xa0, 0x22, + 0x04, 0x09, 0x5d, 0x19, 0xa9, 0x25, 0x69, 0x45, 0x5a, 0xcd, 0xb4, 0xe9, 0x35, 0x7a, 0x07, 0xd2, + 0x47, 0xda, 0x50, 0x31, 0x35, 0xfb, 0xa4, 0x14, 0xc3, 0xf1, 0xc2, 0xfa, 0x7f, 0x2a, 0x93, 0xb4, + 0x1d, 0x66, 0xe5, 0xde, 0x78, 0x64, 0x8c, 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 0x64, 0x70, 0x31, 0xac, 0x1a, 0x06, + 0x41, 0x3a, 0x55, 0x69, 0x59, 0x20, 0xe1, 0x20, 0x9c, 0x62, 0xd8, 0x63, 0x3d, 0xfa, 0x44, 0xe8, + 0x26, 0x27, 0xe4, 0x42, 0xf8, 0x13, 0x71, 0x31, 0xee, 0x13, 0x71, 0xfb, 0xfc, 0x39, 0xab, 0x9e, + 0xe0, 0xaa, 0x42, 0x74, 0x8a, 0x91, 0xe7, 0xcc, 0x85, 0x06, 0xce, 0x99, 0x1b, 0x46, 0x9f, 0x42, + 0xd1, 0x85, 0x92, 0xf2, 0x44, 0x44, 0x65, 0x2a, 0x7a, 0x79, 0x86, 0xa8, 0x83, 0x64, 0x9a, 0x45, + 0xcb, 0x1f, 0x45, 0x2d, 0x28, 0xb8, 0xc0, 0xa6, 0x45, 0xa7, 0xbb, 0x40, 0x15, 0x2f, 0xcd, 0x50, + 0x64, 0x40, 0x26, 0x58, 0xb0, 0x7c, 0xc1, 0xc5, 0xbb, 0xf0, 0x6f, 0x71, 0x35, 0xe2, 0xcb, 0x6f, + 0x86, 0x95, 0xdf, 0xf3, 0x7c, 0xf9, 0x95, 0xf8, 0xf2, 0x5d, 0x83, 0x7f, 0x09, 0x6b, 0x4f, 0x94, + 0x48, 0x8c, 0x17, 0xf9, 0x00, 0xf2, 0xbe, 0x92, 0xc3, 0x93, 0xe7, 0x05, 0xe4, 0xf9, 0x69, 0xf2, + 0x64, 0x6b, 0x09, 0xde, 0x1e, 0x3e, 0x72, 0x9c, 0x27, 0xdf, 0x86, 0x82, 0xbf, 0xde, 0xf0, 0xec, + 0xbc, 0x80, 0x9d, 0x17, 0xb0, 0xc5, 0x63, 0x27, 0x04, 0xec, 0x44, 0x80, 0xdd, 0x09, 0x1d, 0x7b, + 0x41, 0xc0, 0x5e, 0x10, 0xb0, 0xc5, 0x63, 0x23, 0x01, 0x1b, 0xf1, 0xec, 0x0f, 0xa1, 0x18, 0x28, + 0x31, 0x3c, 0x3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xb7, 0x26, 0xc7, 0xaa, 0x8d, 0xd3, 0x17, 0x4b, 0x73, 0xbf, 0xe0, 0xf6, 0x1b, 0x6e, 0xcf, + 0x5f, 0x2c, 0x49, 0xaf, 0x70, 0x7b, 0x8d, 0xdb, 0x1b, 0xdc, 0x9e, 0xbc, 0x5c, 0x92, 0xbe, 0xc3, + 0xed, 0x7b, 0xdc, 0x7e, 0xc4, 0xed, 0x27, 0xdc, 0x4e, 0x5f, 0x62, 0x3c, 0x6e, 0xcf, 0xf1, 0xf5, + 0x2b, 0xfc, 0xfb, 0x1a, 0xff, 0xbe, 0xc1, 0xbf, 0x4f, 0xfe, 0x58, 0x9a, 0xeb, 0x25, 0xd9, 0xdc, + 0xff, 0x0c, 0x00, 0x00, 0xff, 0xff, 0x89, 0x7d, 0x21, 0xda, 0x40, 0x1a, 0x00, 0x00, +} diff --git a/vendor/github.com/gogo/protobuf/test/theproto3/combos/neither/theproto3.proto b/vendor/github.com/gogo/protobuf/test/theproto3/combos/neither/theproto3.proto new file mode 100644 index 000000000..a3b3b3873 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/theproto3/combos/neither/theproto3.proto @@ -0,0 +1,162 @@ +// Copyright (c) 2013, Vastech SA (PTY) LTD. All rights reserved. +// http://github.com/gogo/protobuf/gogoproto +// +// Go support for Protocol Buffers - Google's data interchange format +// +// Copyright 2014 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. + +syntax = "proto3"; + +package theproto3; + +import "github.com/gogo/protobuf/gogoproto/gogo.proto"; + +import "github.com/gogo/protobuf/test/combos/both/thetest.proto"; + +option (gogoproto.goproto_stringer_all) = false; +option (gogoproto.goproto_enum_prefix_all) = false; +option (gogoproto.goproto_getters_all) = false; + +option (gogoproto.equal_all) = true; +option (gogoproto.verbose_equal_all) = true; +option (gogoproto.stringer_all) = true; +option (gogoproto.gostring_all) = true; +option (gogoproto.face_all) = true; +option (gogoproto.description_all) = true; + +option (gogoproto.testgen_all) = true; +option (gogoproto.populate_all) = true; +option (gogoproto.benchgen_all) = true; +option (gogoproto.unmarshaler_all) = false; +option (gogoproto.marshaler_all) = false; +option (gogoproto.sizer_all) = true; + +option (gogoproto.goproto_enum_stringer_all) = false; +option (gogoproto.enum_stringer_all) = true; + +option (gogoproto.unsafe_marshaler_all) = false; +option (gogoproto.unsafe_unmarshaler_all) = false; + +message Message { + enum Humour { + UNKNOWN = 0; + PUNS = 1; + SLAPSTICK = 2; + BILL_BAILEY = 3; + } + + string name = 1; + Humour hilarity = 2; + uint32 height_in_cm = 3; + bytes data = 4; + int64 result_count = 7; + bool true_scotsman = 8; + float score = 9; + + repeated uint64 key = 5; + Nested nested = 6; + + map terrain = 10; + test.NinOptNative proto2_field = 11; + map proto2_value = 13; +} + +message Nested { + string bunny = 1; +} + +enum MapEnum { + MA = 0; + MB = 1; + MC = 2; +} + +message AllMaps { + map StringToDoubleMap = 1; + map StringToFloatMap = 2; + map Int32Map = 3; + map Int64Map = 4; + map Uint32Map = 5; + map Uint64Map = 6; + map Sint32Map = 7; + map Sint64Map = 8; + map Fixed32Map = 9; + map Sfixed32Map = 10; + map Fixed64Map = 11; + map Sfixed64Map = 12; + map BoolMap = 13; + map StringMap = 14; + map StringToBytesMap = 15; + map StringToEnumMap = 16; + map StringToMsgMap = 17; +} + +message AllMapsOrdered { + option (gogoproto.stable_marshaler) = true; + + map StringToDoubleMap = 1; + map StringToFloatMap = 2; + map Int32Map = 3; + map Int64Map = 4; + map Uint32Map = 5; + map Uint64Map = 6; + map Sint32Map = 7; + map Sint64Map = 8; + map Fixed32Map = 9; + map Sfixed32Map = 10; + map Fixed64Map = 11; + map Sfixed64Map = 12; + map BoolMap = 13; + map StringMap = 14; + map StringToBytesMap = 15; + map StringToEnumMap = 16; + map StringToMsgMap = 17; +} + +message MessageWithMap { + map name_mapping = 1; + map msg_mapping = 2; + map byte_mapping = 3; +} + +message FloatingPoint { + double f = 1; +} + +message Uint128Pair { + bytes left = 1 [(gogoproto.nullable) = false, (gogoproto.customtype) = "github.com/gogo/protobuf/test/custom.Uint128"]; + bytes right = 2 [(gogoproto.customtype) = "github.com/gogo/protobuf/test/custom.Uint128"]; +} + +message ContainsNestedMap { + message NestedMap { + map NestedMapField = 1; + } +} \ No newline at end of file diff --git a/vendor/github.com/gogo/protobuf/test/theproto3/combos/neither/theproto3pb_test.go b/vendor/github.com/gogo/protobuf/test/theproto3/combos/neither/theproto3pb_test.go new file mode 100644 index 000000000..9112e4433 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/theproto3/combos/neither/theproto3pb_test.go @@ -0,0 +1,1934 @@ +// Code generated by protoc-gen-gogo. +// source: combos/neither/theproto3.proto +// DO NOT EDIT! + +/* +Package theproto3 is a generated protocol buffer package. + +It is generated from these files: + combos/neither/theproto3.proto + +It has these top-level messages: + Message + Nested + AllMaps + AllMapsOrdered + MessageWithMap + FloatingPoint + Uint128Pair + ContainsNestedMap +*/ +package theproto3 + +import testing "testing" +import math_rand "math/rand" +import time "time" +import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" +import github_com_gogo_protobuf_jsonpb "github.com/gogo/protobuf/jsonpb" +import fmt "fmt" +import go_parser "go/parser" +import proto "github.com/gogo/protobuf/proto" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" +import _ "github.com/gogo/protobuf/test/combos/both" + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +func TestMessageProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMessage(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Message{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkMessageProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Message, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedMessage(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkMessageProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedMessage(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &Message{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNestedProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNested(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Nested{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkNestedProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Nested, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNested(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNestedProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNested(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &Nested{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestAllMapsProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAllMaps(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &AllMaps{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkAllMapsProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*AllMaps, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedAllMaps(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkAllMapsProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedAllMaps(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &AllMaps{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestAllMapsOrderedProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAllMapsOrdered(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &AllMapsOrdered{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkAllMapsOrderedProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*AllMapsOrdered, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedAllMapsOrdered(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkAllMapsOrderedProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedAllMapsOrdered(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &AllMapsOrdered{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestMessageWithMapProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMessageWithMap(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &MessageWithMap{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkMessageWithMapProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*MessageWithMap, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedMessageWithMap(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkMessageWithMapProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedMessageWithMap(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &MessageWithMap{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestFloatingPointProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedFloatingPoint(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &FloatingPoint{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkFloatingPointProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*FloatingPoint, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedFloatingPoint(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkFloatingPointProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedFloatingPoint(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &FloatingPoint{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestUint128PairProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUint128Pair(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Uint128Pair{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkUint128PairProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Uint128Pair, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedUint128Pair(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkUint128PairProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedUint128Pair(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &Uint128Pair{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestContainsNestedMapProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedContainsNestedMap(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &ContainsNestedMap{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkContainsNestedMapProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*ContainsNestedMap, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedContainsNestedMap(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkContainsNestedMapProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedContainsNestedMap(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &ContainsNestedMap{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestContainsNestedMap_NestedMapProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedContainsNestedMap_NestedMap(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &ContainsNestedMap_NestedMap{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkContainsNestedMap_NestedMapProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*ContainsNestedMap_NestedMap, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedContainsNestedMap_NestedMap(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkContainsNestedMap_NestedMapProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedContainsNestedMap_NestedMap(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &ContainsNestedMap_NestedMap{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestMessageJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMessage(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Message{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNestedJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNested(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Nested{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestAllMapsJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAllMaps(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &AllMaps{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestAllMapsOrderedJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAllMapsOrdered(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &AllMapsOrdered{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestMessageWithMapJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMessageWithMap(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &MessageWithMap{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestFloatingPointJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedFloatingPoint(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &FloatingPoint{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestUint128PairJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUint128Pair(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Uint128Pair{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestContainsNestedMapJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedContainsNestedMap(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &ContainsNestedMap{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestContainsNestedMap_NestedMapJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedContainsNestedMap_NestedMap(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &ContainsNestedMap_NestedMap{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestMessageProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMessage(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &Message{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestMessageProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMessage(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &Message{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNestedProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNested(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &Nested{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNestedProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNested(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &Nested{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestAllMapsProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAllMaps(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &AllMaps{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestAllMapsProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAllMaps(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &AllMaps{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestAllMapsOrderedProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAllMapsOrdered(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &AllMapsOrdered{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestAllMapsOrderedProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAllMapsOrdered(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &AllMapsOrdered{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestMessageWithMapProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMessageWithMap(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &MessageWithMap{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestMessageWithMapProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMessageWithMap(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &MessageWithMap{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestFloatingPointProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedFloatingPoint(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &FloatingPoint{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestFloatingPointProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedFloatingPoint(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &FloatingPoint{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestUint128PairProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUint128Pair(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &Uint128Pair{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestUint128PairProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUint128Pair(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &Uint128Pair{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestContainsNestedMapProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedContainsNestedMap(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &ContainsNestedMap{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestContainsNestedMapProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedContainsNestedMap(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &ContainsNestedMap{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestContainsNestedMap_NestedMapProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedContainsNestedMap_NestedMap(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &ContainsNestedMap_NestedMap{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestContainsNestedMap_NestedMapProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedContainsNestedMap_NestedMap(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &ContainsNestedMap_NestedMap{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestTheproto3Description(t *testing.T) { + Theproto3Description() +} +func TestMessageVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedMessage(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &Message{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNestedVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNested(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &Nested{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestAllMapsVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAllMaps(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &AllMaps{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestAllMapsOrderedVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAllMapsOrdered(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &AllMapsOrdered{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestMessageWithMapVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedMessageWithMap(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &MessageWithMap{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestFloatingPointVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedFloatingPoint(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &FloatingPoint{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestUint128PairVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedUint128Pair(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &Uint128Pair{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestContainsNestedMapVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedContainsNestedMap(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &ContainsNestedMap{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestContainsNestedMap_NestedMapVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedContainsNestedMap_NestedMap(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &ContainsNestedMap_NestedMap{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestMessageFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedMessage(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNestedFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNested(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestAllMapsFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAllMaps(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestAllMapsOrderedFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAllMapsOrdered(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestMessageWithMapFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedMessageWithMap(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestFloatingPointFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedFloatingPoint(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestUint128PairFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedUint128Pair(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestContainsNestedMapFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedContainsNestedMap(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestContainsNestedMap_NestedMapFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedContainsNestedMap_NestedMap(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestMessageGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedMessage(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestNestedGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNested(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestAllMapsGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAllMaps(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestAllMapsOrderedGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAllMapsOrdered(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestMessageWithMapGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedMessageWithMap(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestFloatingPointGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedFloatingPoint(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestUint128PairGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedUint128Pair(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestContainsNestedMapGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedContainsNestedMap(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestContainsNestedMap_NestedMapGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedContainsNestedMap_NestedMap(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestMessageSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMessage(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkMessageSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Message, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedMessage(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNestedSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNested(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNestedSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Nested, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNested(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestAllMapsSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAllMaps(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkAllMapsSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*AllMaps, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedAllMaps(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestAllMapsOrderedSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAllMapsOrdered(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkAllMapsOrderedSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*AllMapsOrdered, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedAllMapsOrdered(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestMessageWithMapSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMessageWithMap(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkMessageWithMapSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*MessageWithMap, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedMessageWithMap(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestFloatingPointSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedFloatingPoint(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkFloatingPointSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*FloatingPoint, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedFloatingPoint(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestUint128PairSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUint128Pair(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkUint128PairSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Uint128Pair, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedUint128Pair(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestContainsNestedMapSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedContainsNestedMap(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkContainsNestedMapSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*ContainsNestedMap, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedContainsNestedMap(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestContainsNestedMap_NestedMapSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedContainsNestedMap_NestedMap(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkContainsNestedMap_NestedMapSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*ContainsNestedMap_NestedMap, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedContainsNestedMap_NestedMap(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestMessageStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedMessage(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNestedStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNested(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestAllMapsStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAllMaps(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestAllMapsOrderedStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAllMapsOrdered(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestMessageWithMapStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedMessageWithMap(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestFloatingPointStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedFloatingPoint(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestUint128PairStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedUint128Pair(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestContainsNestedMapStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedContainsNestedMap(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestContainsNestedMap_NestedMapStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedContainsNestedMap_NestedMap(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} + +//These tests are generated by github.com/gogo/protobuf/plugin/testgen diff --git a/vendor/github.com/gogo/protobuf/test/theproto3/combos/unmarshaler/proto3_test.go b/vendor/github.com/gogo/protobuf/test/theproto3/combos/unmarshaler/proto3_test.go new file mode 100644 index 000000000..b41f17859 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/theproto3/combos/unmarshaler/proto3_test.go @@ -0,0 +1,61 @@ +// Copyright (c) 2015, Vastech SA (PTY) LTD. All rights reserved. +// http://github.com/gogo/protobuf/gogoproto +// +// 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 theproto3 + +import ( + "reflect" + "testing" + + "github.com/gogo/protobuf/proto" +) + +func TestNilMaps(t *testing.T) { + m := &AllMaps{StringToMsgMap: map[string]*FloatingPoint{"a": nil}} + if _, err := proto.Marshal(m); err == nil { + t.Fatalf("expected error") + } +} + +func TestCustomTypeSize(t *testing.T) { + m := &Uint128Pair{} + m.Size() // Should not panic. +} + +func TestCustomTypeMarshalUnmarshal(t *testing.T) { + m1 := &Uint128Pair{} + if b, err := proto.Marshal(m1); err != nil { + t.Fatal(err) + } else { + m2 := &Uint128Pair{} + if err := proto.Unmarshal(b, m2); err != nil { + t.Fatal(err) + } + if !reflect.DeepEqual(m1, m2) { + t.Errorf("expected %+v, got %+v", m1, m2) + } + } +} diff --git a/vendor/github.com/gogo/protobuf/test/theproto3/combos/unmarshaler/theproto3.pb.go b/vendor/github.com/gogo/protobuf/test/theproto3/combos/unmarshaler/theproto3.pb.go new file mode 100644 index 000000000..fe41a33e7 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/theproto3/combos/unmarshaler/theproto3.pb.go @@ -0,0 +1,9508 @@ +// Code generated by protoc-gen-gogo. +// source: combos/unmarshaler/theproto3.proto +// DO NOT EDIT! + +/* + Package theproto3 is a generated protocol buffer package. + + It is generated from these files: + combos/unmarshaler/theproto3.proto + + It has these top-level messages: + Message + Nested + AllMaps + AllMapsOrdered + MessageWithMap + FloatingPoint + Uint128Pair + ContainsNestedMap +*/ +package theproto3 + +import proto "github.com/gogo/protobuf/proto" +import fmt "fmt" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" +import test "github.com/gogo/protobuf/test/combos/both" + +import github_com_gogo_protobuf_test_custom "github.com/gogo/protobuf/test/custom" + +import github_com_gogo_protobuf_protoc_gen_gogo_descriptor "github.com/gogo/protobuf/protoc-gen-gogo/descriptor" +import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" +import compress_gzip "compress/gzip" +import bytes "bytes" +import io_ioutil "io/ioutil" + +import strconv "strconv" + +import strings "strings" +import sort "sort" +import reflect "reflect" +import github_com_gogo_protobuf_sortkeys "github.com/gogo/protobuf/sortkeys" + +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. +const _ = proto.GoGoProtoPackageIsVersion1 + +type MapEnum int32 + +const ( + MA MapEnum = 0 + MB MapEnum = 1 + MC MapEnum = 2 +) + +var MapEnum_name = map[int32]string{ + 0: "MA", + 1: "MB", + 2: "MC", +} +var MapEnum_value = map[string]int32{ + "MA": 0, + "MB": 1, + "MC": 2, +} + +func (MapEnum) EnumDescriptor() ([]byte, []int) { return fileDescriptorTheproto3, []int{0} } + +type Message_Humour int32 + +const ( + UNKNOWN Message_Humour = 0 + PUNS Message_Humour = 1 + SLAPSTICK Message_Humour = 2 + BILL_BAILEY Message_Humour = 3 +) + +var Message_Humour_name = map[int32]string{ + 0: "UNKNOWN", + 1: "PUNS", + 2: "SLAPSTICK", + 3: "BILL_BAILEY", +} +var Message_Humour_value = map[string]int32{ + "UNKNOWN": 0, + "PUNS": 1, + "SLAPSTICK": 2, + "BILL_BAILEY": 3, +} + +func (Message_Humour) EnumDescriptor() ([]byte, []int) { return fileDescriptorTheproto3, []int{0, 0} } + +type Message struct { + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + Hilarity Message_Humour `protobuf:"varint,2,opt,name=hilarity,proto3,enum=theproto3.Message_Humour" json:"hilarity,omitempty"` + HeightInCm uint32 `protobuf:"varint,3,opt,name=height_in_cm,json=heightInCm,proto3" json:"height_in_cm,omitempty"` + Data []byte `protobuf:"bytes,4,opt,name=data,proto3" json:"data,omitempty"` + ResultCount int64 `protobuf:"varint,7,opt,name=result_count,json=resultCount,proto3" json:"result_count,omitempty"` + TrueScotsman bool `protobuf:"varint,8,opt,name=true_scotsman,json=trueScotsman,proto3" json:"true_scotsman,omitempty"` + Score float32 `protobuf:"fixed32,9,opt,name=score,proto3" json:"score,omitempty"` + Key []uint64 `protobuf:"varint,5,rep,name=key" json:"key,omitempty"` + Nested *Nested `protobuf:"bytes,6,opt,name=nested" json:"nested,omitempty"` + Terrain map[int64]*Nested `protobuf:"bytes,10,rep,name=terrain" json:"terrain,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value"` + Proto2Field *test.NinOptNative `protobuf:"bytes,11,opt,name=proto2_field,json=proto2Field" json:"proto2_field,omitempty"` + Proto2Value map[int64]*test.NinOptEnum `protobuf:"bytes,13,rep,name=proto2_value,json=proto2Value" json:"proto2_value,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value"` +} + +func (m *Message) Reset() { *m = Message{} } +func (*Message) ProtoMessage() {} +func (*Message) Descriptor() ([]byte, []int) { return fileDescriptorTheproto3, []int{0} } + +type Nested struct { + Bunny string `protobuf:"bytes,1,opt,name=bunny,proto3" json:"bunny,omitempty"` +} + +func (m *Nested) Reset() { *m = Nested{} } +func (*Nested) ProtoMessage() {} +func (*Nested) Descriptor() ([]byte, []int) { return fileDescriptorTheproto3, []int{1} } + +type AllMaps struct { + StringToDoubleMap map[string]float64 `protobuf:"bytes,1,rep,name=StringToDoubleMap,json=stringToDoubleMap" json:"StringToDoubleMap,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"fixed64,2,opt,name=value,proto3"` + StringToFloatMap map[string]float32 `protobuf:"bytes,2,rep,name=StringToFloatMap,json=stringToFloatMap" json:"StringToFloatMap,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"fixed32,2,opt,name=value,proto3"` + Int32Map map[int32]int32 `protobuf:"bytes,3,rep,name=Int32Map,json=int32Map" json:"Int32Map,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` + Int64Map map[int64]int64 `protobuf:"bytes,4,rep,name=Int64Map,json=int64Map" json:"Int64Map,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` + Uint32Map map[uint32]uint32 `protobuf:"bytes,5,rep,name=Uint32Map,json=uint32Map" json:"Uint32Map,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` + Uint64Map map[uint64]uint64 `protobuf:"bytes,6,rep,name=Uint64Map,json=uint64Map" json:"Uint64Map,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` + Sint32Map map[int32]int32 `protobuf:"bytes,7,rep,name=Sint32Map,json=sint32Map" json:"Sint32Map,omitempty" protobuf_key:"zigzag32,1,opt,name=key,proto3" protobuf_val:"zigzag32,2,opt,name=value,proto3"` + Sint64Map map[int64]int64 `protobuf:"bytes,8,rep,name=Sint64Map,json=sint64Map" json:"Sint64Map,omitempty" protobuf_key:"zigzag64,1,opt,name=key,proto3" protobuf_val:"zigzag64,2,opt,name=value,proto3"` + Fixed32Map map[uint32]uint32 `protobuf:"bytes,9,rep,name=Fixed32Map,json=fixed32Map" json:"Fixed32Map,omitempty" protobuf_key:"fixed32,1,opt,name=key,proto3" protobuf_val:"fixed32,2,opt,name=value,proto3"` + Sfixed32Map map[int32]int32 `protobuf:"bytes,10,rep,name=Sfixed32Map,json=sfixed32Map" json:"Sfixed32Map,omitempty" protobuf_key:"fixed32,1,opt,name=key,proto3" protobuf_val:"fixed32,2,opt,name=value,proto3"` + Fixed64Map map[uint64]uint64 `protobuf:"bytes,11,rep,name=Fixed64Map,json=fixed64Map" json:"Fixed64Map,omitempty" protobuf_key:"fixed64,1,opt,name=key,proto3" protobuf_val:"fixed64,2,opt,name=value,proto3"` + Sfixed64Map map[int64]int64 `protobuf:"bytes,12,rep,name=Sfixed64Map,json=sfixed64Map" json:"Sfixed64Map,omitempty" protobuf_key:"fixed64,1,opt,name=key,proto3" protobuf_val:"fixed64,2,opt,name=value,proto3"` + BoolMap map[bool]bool `protobuf:"bytes,13,rep,name=BoolMap,json=boolMap" json:"BoolMap,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` + StringMap map[string]string `protobuf:"bytes,14,rep,name=StringMap,json=stringMap" json:"StringMap,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + StringToBytesMap map[string][]byte `protobuf:"bytes,15,rep,name=StringToBytesMap,json=stringToBytesMap" json:"StringToBytesMap,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + StringToEnumMap map[string]MapEnum `protobuf:"bytes,16,rep,name=StringToEnumMap,json=stringToEnumMap" json:"StringToEnumMap,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3,enum=theproto3.MapEnum"` + StringToMsgMap map[string]*FloatingPoint `protobuf:"bytes,17,rep,name=StringToMsgMap,json=stringToMsgMap" json:"StringToMsgMap,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value"` +} + +func (m *AllMaps) Reset() { *m = AllMaps{} } +func (*AllMaps) ProtoMessage() {} +func (*AllMaps) Descriptor() ([]byte, []int) { return fileDescriptorTheproto3, []int{2} } + +type AllMapsOrdered struct { + StringToDoubleMap map[string]float64 `protobuf:"bytes,1,rep,name=StringToDoubleMap,json=stringToDoubleMap" json:"StringToDoubleMap,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"fixed64,2,opt,name=value,proto3"` + StringToFloatMap map[string]float32 `protobuf:"bytes,2,rep,name=StringToFloatMap,json=stringToFloatMap" json:"StringToFloatMap,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"fixed32,2,opt,name=value,proto3"` + Int32Map map[int32]int32 `protobuf:"bytes,3,rep,name=Int32Map,json=int32Map" json:"Int32Map,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` + Int64Map map[int64]int64 `protobuf:"bytes,4,rep,name=Int64Map,json=int64Map" json:"Int64Map,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` + Uint32Map map[uint32]uint32 `protobuf:"bytes,5,rep,name=Uint32Map,json=uint32Map" json:"Uint32Map,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` + Uint64Map map[uint64]uint64 `protobuf:"bytes,6,rep,name=Uint64Map,json=uint64Map" json:"Uint64Map,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` + Sint32Map map[int32]int32 `protobuf:"bytes,7,rep,name=Sint32Map,json=sint32Map" json:"Sint32Map,omitempty" protobuf_key:"zigzag32,1,opt,name=key,proto3" protobuf_val:"zigzag32,2,opt,name=value,proto3"` + Sint64Map map[int64]int64 `protobuf:"bytes,8,rep,name=Sint64Map,json=sint64Map" json:"Sint64Map,omitempty" protobuf_key:"zigzag64,1,opt,name=key,proto3" protobuf_val:"zigzag64,2,opt,name=value,proto3"` + Fixed32Map map[uint32]uint32 `protobuf:"bytes,9,rep,name=Fixed32Map,json=fixed32Map" json:"Fixed32Map,omitempty" protobuf_key:"fixed32,1,opt,name=key,proto3" protobuf_val:"fixed32,2,opt,name=value,proto3"` + Sfixed32Map map[int32]int32 `protobuf:"bytes,10,rep,name=Sfixed32Map,json=sfixed32Map" json:"Sfixed32Map,omitempty" protobuf_key:"fixed32,1,opt,name=key,proto3" protobuf_val:"fixed32,2,opt,name=value,proto3"` + Fixed64Map map[uint64]uint64 `protobuf:"bytes,11,rep,name=Fixed64Map,json=fixed64Map" json:"Fixed64Map,omitempty" protobuf_key:"fixed64,1,opt,name=key,proto3" protobuf_val:"fixed64,2,opt,name=value,proto3"` + Sfixed64Map map[int64]int64 `protobuf:"bytes,12,rep,name=Sfixed64Map,json=sfixed64Map" json:"Sfixed64Map,omitempty" protobuf_key:"fixed64,1,opt,name=key,proto3" protobuf_val:"fixed64,2,opt,name=value,proto3"` + BoolMap map[bool]bool `protobuf:"bytes,13,rep,name=BoolMap,json=boolMap" json:"BoolMap,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` + StringMap map[string]string `protobuf:"bytes,14,rep,name=StringMap,json=stringMap" json:"StringMap,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + StringToBytesMap map[string][]byte `protobuf:"bytes,15,rep,name=StringToBytesMap,json=stringToBytesMap" json:"StringToBytesMap,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + StringToEnumMap map[string]MapEnum `protobuf:"bytes,16,rep,name=StringToEnumMap,json=stringToEnumMap" json:"StringToEnumMap,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3,enum=theproto3.MapEnum"` + StringToMsgMap map[string]*FloatingPoint `protobuf:"bytes,17,rep,name=StringToMsgMap,json=stringToMsgMap" json:"StringToMsgMap,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value"` +} + +func (m *AllMapsOrdered) Reset() { *m = AllMapsOrdered{} } +func (*AllMapsOrdered) ProtoMessage() {} +func (*AllMapsOrdered) Descriptor() ([]byte, []int) { return fileDescriptorTheproto3, []int{3} } + +type MessageWithMap struct { + NameMapping map[int32]string `protobuf:"bytes,1,rep,name=name_mapping,json=nameMapping" json:"name_mapping,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + MsgMapping map[int64]*FloatingPoint `protobuf:"bytes,2,rep,name=msg_mapping,json=msgMapping" json:"msg_mapping,omitempty" protobuf_key:"zigzag64,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value"` + ByteMapping map[bool][]byte `protobuf:"bytes,3,rep,name=byte_mapping,json=byteMapping" json:"byte_mapping,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` +} + +func (m *MessageWithMap) Reset() { *m = MessageWithMap{} } +func (*MessageWithMap) ProtoMessage() {} +func (*MessageWithMap) Descriptor() ([]byte, []int) { return fileDescriptorTheproto3, []int{4} } + +type FloatingPoint struct { + F float64 `protobuf:"fixed64,1,opt,name=f,proto3" json:"f,omitempty"` +} + +func (m *FloatingPoint) Reset() { *m = FloatingPoint{} } +func (*FloatingPoint) ProtoMessage() {} +func (*FloatingPoint) Descriptor() ([]byte, []int) { return fileDescriptorTheproto3, []int{5} } + +type Uint128Pair struct { + Left github_com_gogo_protobuf_test_custom.Uint128 `protobuf:"bytes,1,opt,name=left,proto3,customtype=github.com/gogo/protobuf/test/custom.Uint128" json:"left"` + Right *github_com_gogo_protobuf_test_custom.Uint128 `protobuf:"bytes,2,opt,name=right,proto3,customtype=github.com/gogo/protobuf/test/custom.Uint128" json:"right,omitempty"` +} + +func (m *Uint128Pair) Reset() { *m = Uint128Pair{} } +func (*Uint128Pair) ProtoMessage() {} +func (*Uint128Pair) Descriptor() ([]byte, []int) { return fileDescriptorTheproto3, []int{6} } + +type ContainsNestedMap struct { +} + +func (m *ContainsNestedMap) Reset() { *m = ContainsNestedMap{} } +func (*ContainsNestedMap) ProtoMessage() {} +func (*ContainsNestedMap) Descriptor() ([]byte, []int) { return fileDescriptorTheproto3, []int{7} } + +type ContainsNestedMap_NestedMap struct { + NestedMapField map[string]float64 `protobuf:"bytes,1,rep,name=NestedMapField,json=nestedMapField" json:"NestedMapField,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"fixed64,2,opt,name=value,proto3"` +} + +func (m *ContainsNestedMap_NestedMap) Reset() { *m = ContainsNestedMap_NestedMap{} } +func (*ContainsNestedMap_NestedMap) ProtoMessage() {} +func (*ContainsNestedMap_NestedMap) Descriptor() ([]byte, []int) { + return fileDescriptorTheproto3, []int{7, 0} +} + +func init() { + proto.RegisterType((*Message)(nil), "theproto3.Message") + proto.RegisterType((*Nested)(nil), "theproto3.Nested") + proto.RegisterType((*AllMaps)(nil), "theproto3.AllMaps") + proto.RegisterType((*AllMapsOrdered)(nil), "theproto3.AllMapsOrdered") + proto.RegisterType((*MessageWithMap)(nil), "theproto3.MessageWithMap") + proto.RegisterType((*FloatingPoint)(nil), "theproto3.FloatingPoint") + proto.RegisterType((*Uint128Pair)(nil), "theproto3.Uint128Pair") + proto.RegisterType((*ContainsNestedMap)(nil), "theproto3.ContainsNestedMap") + proto.RegisterType((*ContainsNestedMap_NestedMap)(nil), "theproto3.ContainsNestedMap.NestedMap") + proto.RegisterEnum("theproto3.MapEnum", MapEnum_name, MapEnum_value) + proto.RegisterEnum("theproto3.Message_Humour", Message_Humour_name, Message_Humour_value) +} +func (this *Message) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return Theproto3Description() +} +func (this *Nested) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return Theproto3Description() +} +func (this *AllMaps) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return Theproto3Description() +} +func (this *AllMapsOrdered) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return Theproto3Description() +} +func (this *MessageWithMap) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return Theproto3Description() +} +func (this *FloatingPoint) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return Theproto3Description() +} +func (this *Uint128Pair) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return Theproto3Description() +} +func (this *ContainsNestedMap) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return Theproto3Description() +} +func (this *ContainsNestedMap_NestedMap) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return Theproto3Description() +} +func Theproto3Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + d := &github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet{} + var gzipped = []byte{ + // 7455 bytes of a gzipped FileDescriptorSet + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xec, 0x7d, 0x7b, 0x6c, 0x63, 0xd7, + 0x79, 0xe7, 0x90, 0x97, 0x94, 0xa8, 0x8f, 0x14, 0x45, 0xdd, 0xd1, 0xc8, 0xb4, 0x3c, 0x9e, 0x07, + 0x3d, 0x1e, 0xcb, 0x8a, 0xad, 0xd1, 0x68, 0x34, 0x0f, 0xd3, 0xaf, 0x15, 0x29, 0x6a, 0xac, 0x89, + 0x5e, 0xb9, 0x92, 0xfc, 0x88, 0x17, 0x4b, 0x50, 0xe4, 0x95, 0x44, 0x9b, 0xba, 0xd4, 0xf2, 0x92, + 0xb6, 0x27, 0x7f, 0x2c, 0xb2, 0xc9, 0x6e, 0x36, 0xd9, 0xc5, 0xee, 0xb6, 0x4d, 0x8b, 0xe6, 0x1d, + 0x3b, 0x45, 0x1a, 0x27, 0x7d, 0x25, 0x69, 0x1a, 0x14, 0x41, 0xd1, 0xb8, 0x68, 0x93, 0x4e, 0xff, + 0x29, 0xdc, 0xf4, 0x9f, 0xa2, 0x28, 0x8c, 0xbc, 0x80, 0xa6, 0x6d, 0xda, 0x26, 0x80, 0x81, 0x04, + 0x48, 0xfe, 0xe8, 0x79, 0xdf, 0x73, 0x0e, 0xef, 0xe5, 0xa5, 0x66, 0xec, 0x38, 0x7f, 0xd8, 0x00, + 0x47, 0xbc, 0xe7, 0x7c, 0xbf, 0xef, 0x7c, 0xe7, 0x7b, 0x9d, 0xef, 0x9e, 0x73, 0x79, 0x0d, 0x7f, + 0x7e, 0x1e, 0x4e, 0xed, 0x36, 0x9b, 0xbb, 0x0d, 0xfb, 0xdc, 0x41, 0xab, 0xd9, 0x6e, 0x6e, 0x77, + 0x76,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, + 0x9a, 0x7c, 0xcd, 0x3d, 0xeb, 0x93, 0xc9, 0x71, 0xb7, 0xae, 0x2b, 0x86, 0x92, 0x97, 0x02, 0x23, + 0xa8, 0x68, 0xa0, 0xd2, 0x74, 0x49, 0xfa, 0xa1, 0x28, 0x1c, 0xf3, 0x65, 0xee, 0x2b, 0xe8, 0x9d, + 0x00, 0x75, 0xe7, 0xa0, 0xd3, 0xa6, 0xeb, 0x2a, 0x4d, 0x33, 0x43, 0xa4, 0x85, 0x84, 0x30, 0x4e, + 0x21, 0x9d, 0xb6, 0xe8, 0x37, 0x48, 0x3f, 0xd0, 0x26, 0x42, 0x70, 0xc5, 0x13, 0x34, 0x46, 0x04, + 0x3d, 0x11, 0x30, 0xd3, 0xae, 0x25, 0x6b, 0x06, 0x32, 0xd5, 0x46, 0xdd, 0x76, 0xda, 0x65, 0xb7, + 0xdd, 0xb2, 0x2b, 0xfb, 0x75, 0x67, 0x97, 0xe4, 0xd1, 0x44, 0x3e, 0xbe, 0x53, 0x69, 0xb8, 0xb6, + 0x35, 0x42, 0xbb, 0x37, 0x78, 0x2f, 0x46, 0x90, 0xc5, 0xa2, 0x25, 0x21, 0x06, 0x14, 0x04, 0xed, + 0x16, 0x88, 0xdc, 0xb7, 0x06, 0x21, 0x29, 0x55, 0x67, 0xe6, 0x69, 0x48, 0x3d, 0x53, 0x79, 0xae, + 0x52, 0xe6, 0x15, 0x37, 0xd5, 0x44, 0x12, 0xb7, 0xad, 0xb3, 0xaa, 0x7b, 0x06, 0xc6, 0x08, 0x09, + 0x9a, 0x23, 0x1a, 0xa8, 0xda, 0xa8, 0xb8, 0x2e, 0x51, 0x5a, 0x82, 0x90, 0x9a, 0xb8, 0x6f, 0x0d, + 0x77, 0x15, 0x79, 0x8f, 0x79, 0x11, 0x8e, 0x12, 0xc4, 0x3e, 0x4a, 0xbc, 0xf5, 0x83, 0x86, 0x5d, + 0xc6, 0xf7, 0x00, 0x2e, 0xc9, 0xa7, 0x42, 0xb2, 0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5a, 0x2f, 0xeb, 0x35, 0x94, 0x54, 0xeb, 0x3b, 0x75, 0x54, 0xbe, 0xd1, 0x3b, 0x16, 0x5a, + 0xb5, 0x8e, 0x78, 0xed, 0xf4, 0xf6, 0xf8, 0x3e, 0x30, 0x0f, 0x9a, 0x6e, 0xbd, 0x5d, 0x7f, 0x0e, + 0x6f, 0xcf, 0xf1, 0x1b, 0x69, 0x5c, 0xc5, 0xc6, 0xac, 0x0c, 0xef, 0x59, 0x72, 0xda, 0x82, 0xda, + 0xb1, 0x77, 0x2b, 0x1a, 0x35, 0x4e, 0x43, 0x86, 0x95, 0xe1, 0x3d, 0x82, 0x1a, 0x15, 0x9a, 0xb5, + 0x66, 0x07, 0x17, 0x04, 0x94, 0x0e, 0x67, 0xbd, 0x88, 0x95, 0xa4, 0x6d, 0x82, 0x84, 0x55, 0x6c, + 0xde, 0x1d, 0x7c, 0xca, 0x4a, 0xd2, 0x36, 0x4a, 0x72, 0x0f, 0x8c, 0x54, 0x76, 0x77, 0x5b, 0x98, + 0x39, 0x67, 0x44, 0xcb, 0xd0, 0xb4, 0x68, 0x26, 0x84, 0x13, 0xd7, 0x20, 0xc1, 0xf5, 0x80, 0x17, + 0x16, 0xac, 0x09, 0xb4, 0xe6, 0x93, 0x7d, 0x94, 0x28, 0xbe, 0xa9, 0x77, 0x78, 0x27, 0x1a, 0xb4, + 0xee, 0x96, 0xbd, 0x0d, 0xbd, 0x28, 0xea, 0x4f, 0x58, 0xc9, 0xba, 0x2b, 0x76, 0x70, 0x72, 0x9f, + 0x43, 0xcb, 0xab, 0xba, 0x21, 0x69, 0x2e, 0x40, 0xa2, 0xd1, 0x44, 0xfe, 0x81, 0x11, 0x74, 0x37, + 0x7c, 0x32, 0x64, 0x0f, 0x73, 0x7a, 0x99, 0xd1, 0x5b, 0x02, 0x39, 0xf1, 0xd7, 0x11, 0x48, 0xf0, + 0x66, 0xb4, 0x50, 0xc4, 0x0e, 0x2a, 0xed, 0x3d, 0xc2, 0x2e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0xbc, 0xfe, 0xf3, 0xe4, 0x48, 0x7a, 0x40, 0xed, 0x3f, 0xef, 0xf5, 0xcf, 0x92, + 0xc7, 0x2c, 0x33, 0x6a, 0xff, 0xac, 0xd7, 0x7f, 0x21, 0x3b, 0x8c, 0x63, 0x5b, 0xed, 0xbf, 0xe0, + 0xf5, 0xcf, 0x65, 0xd3, 0xd8, 0x9d, 0xd4, 0xfe, 0x39, 0xaf, 0xff, 0x62, 0x76, 0x04, 0x6f, 0xf5, + 0xaa, 0xfd, 0x17, 0x73, 0xef, 0x23, 0xe6, 0x75, 0x3c, 0xf3, 0x8e, 0xab, 0xe6, 0x15, 0x86, 0x1d, + 0x57, 0x0d, 0x2b, 0x4c, 0x3a, 0xae, 0x9a, 0x54, 0x18, 0x73, 0x5c, 0x35, 0xa6, 0x30, 0xe3, 0xb8, + 0x6a, 0x46, 0x61, 0xc0, 0x71, 0xd5, 0x80, 0xc2, 0x74, 0xe3, 0xaa, 0xe9, 0x84, 0xd1, 0xc6, 0x55, + 0xa3, 0x09, 0x73, 0x8d, 0xab, 0xe6, 0x12, 0x86, 0xca, 0x6a, 0x86, 0xf2, 0x4c, 0x94, 0xd5, 0x4c, + 0xe4, 0x19, 0x27, 0xab, 0x19, 0xc7, 0x33, 0x4b, 0x56, 0x33, 0x8b, 0x67, 0x90, 0xac, 0x66, 0x10, + 0xcf, 0x14, 0x59, 0xcd, 0x14, 0x9e, 0x11, 0x58, 0x8c, 0x59, 0xf6, 0x81, 0x4f, 0x8c, 0x19, 0x3d, + 0x63, 0xcc, 0xe8, 0x19, 0x63, 0x46, 0xcf, 0x18, 0x33, 0x7a, 0xc6, 0x98, 0xd1, 0x33, 0xc6, 0x8c, + 0x9e, 0x31, 0x66, 0xf4, 0x8c, 0x31, 0xa3, 0x67, 0x8c, 0x19, 0xbd, 0x63, 0xcc, 0x08, 0x89, 0x31, + 0x23, 0x24, 0xc6, 0x8c, 0x90, 0x18, 0x33, 0x42, 0x62, 0xcc, 0x08, 0x89, 0x31, 0x23, 0x30, 0xc6, + 0x3c, 0xf3, 0x8e, 0xab, 0xe6, 0xf5, 0x8d, 0x31, 0x23, 0x20, 0xc6, 0x8c, 0x80, 0x18, 0x33, 0x02, + 0x62, 0xcc, 0x08, 0x88, 0x31, 0x23, 0x20, 0xc6, 0x8c, 0x80, 0x18, 0x33, 0x02, 0x62, 0xcc, 0x08, + 0x8a, 0x31, 0x23, 0x30, 0xc6, 0x8c, 0xc0, 0x18, 0x33, 0x02, 0x63, 0xcc, 0x08, 0x8c, 0x31, 0x23, + 0x30, 0xc6, 0x0c, 0x39, 0xc6, 0xfe, 0xc4, 0x00, 0x93, 0xc6, 0xd8, 0x3a, 0x79, 0x38, 0x80, 0x99, + 0xe2, 0x84, 0x16, 0x69, 0x03, 0xd8, 0x74, 0x19, 0xcf, 0x24, 0x27, 0xb4, 0x58, 0x53, 0xfb, 0x67, + 0x45, 0x3f, 0x8f, 0x36, 0xb5, 0xff, 0x82, 0xe8, 0xe7, 0xf1, 0xa6, 0xf6, 0xcf, 0x89, 0x7e, 0x1e, + 0x71, 0x6a, 0xff, 0x45, 0xd1, 0xcf, 0x63, 0x4e, 0xed, 0xbf, 0x24, 0xfa, 0x79, 0xd4, 0xa9, 0xfd, + 0x97, 0x45, 0x3f, 0x8f, 0x3b, 0xb5, 0xff, 0x8a, 0xe8, 0xe7, 0x91, 0xa7, 0xf6, 0x3f, 0x60, 0x9e, + 0xd2, 0x63, 0x8f, 0x13, 0x08, 0xd3, 0x9e, 0xd2, 0xa3, 0x4f, 0xa3, 0x38, 0xef, 0x51, 0xf0, 0xf8, + 0xd3, 0x28, 0x66, 0x3d, 0x0a, 0x1e, 0x81, 0x1a, 0xc5, 0x85, 0xdc, 0x07, 0x89, 0xf9, 0x1c, 0xdd, + 0x7c, 0x13, 0x9a, 0xf9, 0xa2, 0x92, 0xe9, 0x26, 0x34, 0xd3, 0x45, 0x25, 0xb3, 0x4d, 0x68, 0x66, + 0x8b, 0x4a, 0x26, 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0x88, 0xee, 0x73, 0x8a, 0xee, 0x99, 0x01, + 0x31, 0x51, 0x97, 0xfe, 0x2f, 0x43, 0x52, 0x1a, 0xc5, 0x9c, 0x64, 0x62, 0x44, 0x75, 0xa0, 0xac, + 0x2b, 0x2c, 0x49, 0xce, 0x86, 0x61, 0x65, 0x60, 0x0c, 0x95, 0x54, 0x1c, 0x00, 0x25, 0x6a, 0x9e, + 0x52, 0xd5, 0xec, 0x4f, 0xca, 0x54, 0x3d, 0x43, 0x75, 0x44, 0xd4, 0x7d, 0x86, 0x3a, 0x67, 0xb0, + 0x11, 0xdb, 0xe8, 0x7b, 0x2e, 0x0e, 0xc6, 0x6a, 0xbd, 0x91, 0x7b, 0x18, 0x80, 0x86, 0x3c, 0x7e, + 0xb8, 0x4a, 0x8b, 0xba, 0x34, 0x57, 0xf0, 0xe6, 0x9e, 0xbd, 0x89, 0xfe, 0x62, 0x12, 0xb5, 0x9e, + 0xc2, 0x09, 0x06, 0x68, 0x88, 0x11, 0xfc, 0xbd, 0xa1, 0x78, 0xdf, 0x4a, 0x0c, 0x93, 0x66, 0x29, + 0xe9, 0x53, 0x76, 0x7b, 0xde, 0x69, 0xb6, 0xf7, 0xec, 0x96, 0x86, 0x98, 0x35, 0x2f, 0x28, 0x01, + 0x9b, 0x9e, 0xbd, 0x43, 0x20, 0x02, 0x41, 0x17, 0x72, 0x5f, 0x24, 0x02, 0xe2, 0x52, 0xa0, 0x6b, + 0x82, 0x46, 0x1f, 0x13, 0x34, 0x2f, 0x29, 0xf5, 0x5b, 0x0f, 0x31, 0xb5, 0x5b, 0xcb, 0x07, 0x94, + 0xfb, 0x9c, 0xde, 0xc2, 0xaa, 0xf7, 0x98, 0x5c, 0xa7, 0x5c, 0xe4, 0x7b, 0x43, 0x45, 0x0e, 0xa8, + 0x6e, 0x0f, 0xab, 0x53, 0xa3, 0x5f, 0x9d, 0x7e, 0x4d, 0x54, 0x1c, 0xf4, 0xb7, 0xe0, 0xe4, 0x0d, + 0x02,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71, 0xff, 0xca, 0x80, 0x0c, 0x2d, 0x75, 0x90, 0x11, 0xeb, + 0x4e, 0xbd, 0xdd, 0x5d, 0xaf, 0x0a, 0x89, 0xcd, 0x47, 0x61, 0x08, 0xab, 0x74, 0x91, 0xbd, 0x88, + 0x07, 0xab, 0xfe, 0x34, 0x2b, 0x51, 0x34, 0x16, 0xac, 0x81, 0xb8, 0x0e, 0x79, 0xe7, 0x0d, 0xc1, + 0xa0, 0x1b, 0x0c, 0x63, 0x75, 0x75, 0x85, 0x2d, 0x6e, 0x73, 0x3d, 0xa1, 0xec, 0x11, 0x18, 0x76, + 0xc5, 0xda, 0xdc, 0x5d, 0xcb, 0x70, 0x56, 0x57, 0x90, 0xdb, 0x44, 0x11, 0x1b, 0x5a, 0xf0, 0x9e, + 0xe9, 0x87, 0x8d, 0x15, 0x75, 0x56, 0x26, 0xfe, 0x34, 0x02, 0xc3, 0x4a, 0x2b, 0x5a, 0x6d, 0x53, + 0xb4, 0x41, 0x9a, 0xee, 0x80, 0x95, 0x72, 0xa4, 0x36, 0x2e, 0x73, 0xf4, 0x16, 0x65, 0x9e, 0x98, + 0x47, 0x77, 0xed, 0x6a, 0xbb, 0x39, 0x0d, 0xa6, 0xdc, 0xc4, 0x84, 0xa0, 0x2f, 0x31, 0x31, 0x9d, + 0xae, 0x9e, 0xdc, 0x9d, 0x28, 0x0b, 0x0b, 0xbd, 0x8a, 0x77, 0x6f, 0xac, 0x96, 0x36, 0xf0, 0x6b, + 0x33, 0x22, 0xb9, 0xaf, 0x46, 0x20, 0xc9, 0xca, 0xd6, 0x6a, 0xf3, 0xc0, 0x36, 0x0b, 0x10, 0x99, + 0x67, 0x1e, 0x74, 0x73, 0x72, 0x47, 0x2a, 0x68, 0x75, 0x8a, 0x14, 0xfa, 0x37, 0x75, 0x64, 0xdb, + 0x9c, 0x85, 0x48, 0x91, 0x19, 0xb8, 0x3f, 0xcb, 0x44, 0xaa, 0xb9, 0x1f, 0x1b, 0x70, 0x54, 0x2e, + 0xa3, 0x79, 0x3e, 0x39, 0xad, 0xde, 0x37, 0xe5, 0x87, 0xce, 0xcf, 0x5e, 0x98, 0x9b, 0xc6, 0xff, + 0x08, 0x97, 0x3c, 0xad, 0xde, 0x42, 0x75, 0x93, 0x74, 0x3d, 0x26, 0x92, 0x8f, 0x49, 0xbd, 0x5d, + 0x8f, 0x89, 0x28, 0xbd, 0x5d, 0x8f, 0x89, 0x28, 0xbd, 0x5d, 0x8f, 0x89, 0x28, 0xbd, 0x5d, 0x47, + 0x01, 0x4a, 0x6f, 0xd7, 0x63, 0x22, 0x4a, 0x6f, 0xd7, 0x63, 0x22, 0x4a, 0x6f, 0xf7, 0x63, 0x22, + 0xac, 0x3b, 0xf0, 0x31, 0x11, 0xb5, 0xbf, 0xfb, 0x31, 0x11, 0xb5, 0xbf, 0xfb, 0x31, 0x91, 0x3c, + 0xaa, 0xcf, 0x3a, 0x76, 0xf0, 0xa1, 0x83, 0x8a, 0xef, 0x75, 0x0f, 0xe8, 0x25, 0xe0, 0x35, 0x18, + 0xa1, 0xfb, 0x11, 0x45, 0xfc, 0x84, 0x56, 0xdd, 0x41, 0xa9, 0xf8, 0x21, 0x48, 0xd1, 0x26, 0x7a, + 0x97, 0xe3, 0x77, 0x17, 0x48, 0xfb, 0x59, 0xba, 0x4d, 0x55, 0x25, 0xea, 0xdc, 0xcf, 0x63, 0x30, + 0x4e, 0xbb, 0xf1, 0xcf, 0x08, 0x95, 0x87, 0x8c, 0xce, 0x6a, 0x47, 0x4a, 0x69, 0x0c, 0xff, 0xee, + 0x6b, 0x27, 0x69, 0xeb, 0xbc, 0x70, 0xa6, 0xb3, 0xda, 0xe1, 0x92, 0x4a, 0xe7, 0xad, 0x3f, 0x67, + 0xb5, 0x07, 0x8f, 0x54, 0x3a, 0xb1, 0xdc, 0x08, 0x3a, 0xfe, 0x08, 0x92, 0x4a, 0xb7, 0x20, 0xbc, + 0xec, 0xac, 0xf6, 0x30, 0x92, 0x4a, 0x57, 0x12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x7a, 0x79, 0x00, 0x00, + } + r := bytes.NewReader(gzipped) + gzipr, err := compress_gzip.NewReader(r) + if err != nil { + panic(err) + } + ungzipped, err := io_ioutil.ReadAll(gzipr) + if err != nil { + panic(err) + } + if err := github_com_gogo_protobuf_proto.Unmarshal(ungzipped, d); err != nil { + panic(err) + } + return d +} +func (x MapEnum) String() string { + s, ok := MapEnum_name[int32(x)] + if ok { + return s + } + return strconv.Itoa(int(x)) +} +func (x Message_Humour) String() string { + s, ok := Message_Humour_name[int32(x)] + if ok { + return s + } + return strconv.Itoa(int(x)) +} +func (this *Message) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*Message) + if !ok { + that2, ok := that.(Message) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *Message") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *Message but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *Message 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.Hilarity != that1.Hilarity { + return fmt.Errorf("Hilarity this(%v) Not Equal that(%v)", this.Hilarity, that1.Hilarity) + } + if this.HeightInCm != that1.HeightInCm { + return fmt.Errorf("HeightInCm this(%v) Not Equal that(%v)", this.HeightInCm, that1.HeightInCm) + } + if !bytes.Equal(this.Data, that1.Data) { + return fmt.Errorf("Data this(%v) Not Equal that(%v)", this.Data, that1.Data) + } + if this.ResultCount != that1.ResultCount { + return fmt.Errorf("ResultCount this(%v) Not Equal that(%v)", this.ResultCount, that1.ResultCount) + } + if this.TrueScotsman != that1.TrueScotsman { + return fmt.Errorf("TrueScotsman this(%v) Not Equal that(%v)", this.TrueScotsman, that1.TrueScotsman) + } + if this.Score != that1.Score { + return fmt.Errorf("Score this(%v) Not Equal that(%v)", this.Score, that1.Score) + } + if len(this.Key) != len(that1.Key) { + return fmt.Errorf("Key this(%v) Not Equal that(%v)", len(this.Key), len(that1.Key)) + } + for i := range this.Key { + if this.Key[i] != that1.Key[i] { + return fmt.Errorf("Key this[%v](%v) Not Equal that[%v](%v)", i, this.Key[i], i, that1.Key[i]) + } + } + if !this.Nested.Equal(that1.Nested) { + return fmt.Errorf("Nested this(%v) Not Equal that(%v)", this.Nested, that1.Nested) + } + if len(this.Terrain) != len(that1.Terrain) { + return fmt.Errorf("Terrain this(%v) Not Equal that(%v)", len(this.Terrain), len(that1.Terrain)) + } + for i := range this.Terrain { + if !this.Terrain[i].Equal(that1.Terrain[i]) { + return fmt.Errorf("Terrain this[%v](%v) Not Equal that[%v](%v)", i, this.Terrain[i], i, that1.Terrain[i]) + } + } + if !this.Proto2Field.Equal(that1.Proto2Field) { + return fmt.Errorf("Proto2Field this(%v) Not Equal that(%v)", this.Proto2Field, that1.Proto2Field) + } + if len(this.Proto2Value) != len(that1.Proto2Value) { + return fmt.Errorf("Proto2Value this(%v) Not Equal that(%v)", len(this.Proto2Value), len(that1.Proto2Value)) + } + for i := range this.Proto2Value { + if !this.Proto2Value[i].Equal(that1.Proto2Value[i]) { + return fmt.Errorf("Proto2Value this[%v](%v) Not Equal that[%v](%v)", i, this.Proto2Value[i], i, that1.Proto2Value[i]) + } + } + return nil +} +func (this *Message) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*Message) + if !ok { + that2, ok := that.(Message) + 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.Hilarity != that1.Hilarity { + return false + } + if this.HeightInCm != that1.HeightInCm { + return false + } + if !bytes.Equal(this.Data, that1.Data) { + return false + } + if this.ResultCount != that1.ResultCount { + return false + } + if this.TrueScotsman != that1.TrueScotsman { + return false + } + if this.Score != that1.Score { + return false + } + if len(this.Key) != len(that1.Key) { + return false + } + for i := range this.Key { + if this.Key[i] != that1.Key[i] { + return false + } + } + if !this.Nested.Equal(that1.Nested) { + return false + } + if len(this.Terrain) != len(that1.Terrain) { + return false + } + for i := range this.Terrain { + if !this.Terrain[i].Equal(that1.Terrain[i]) { + return false + } + } + if !this.Proto2Field.Equal(that1.Proto2Field) { + return false + } + if len(this.Proto2Value) != len(that1.Proto2Value) { + return false + } + for i := range this.Proto2Value { + if !this.Proto2Value[i].Equal(that1.Proto2Value[i]) { + return false + } + } + return true +} +func (this *Nested) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*Nested) + if !ok { + that2, ok := that.(Nested) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *Nested") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *Nested but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *Nested but is not nil && this == nil") + } + if this.Bunny != that1.Bunny { + return fmt.Errorf("Bunny this(%v) Not Equal that(%v)", this.Bunny, that1.Bunny) + } + return nil +} +func (this *Nested) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*Nested) + if !ok { + that2, ok := that.(Nested) + 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.Bunny != that1.Bunny { + return false + } + return true +} +func (this *AllMaps) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*AllMaps) + if !ok { + that2, ok := that.(AllMaps) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *AllMaps") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *AllMaps but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *AllMaps but is not nil && this == nil") + } + if len(this.StringToDoubleMap) != len(that1.StringToDoubleMap) { + return fmt.Errorf("StringToDoubleMap this(%v) Not Equal that(%v)", len(this.StringToDoubleMap), len(that1.StringToDoubleMap)) + } + for i := range this.StringToDoubleMap { + if this.StringToDoubleMap[i] != that1.StringToDoubleMap[i] { + return fmt.Errorf("StringToDoubleMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringToDoubleMap[i], i, that1.StringToDoubleMap[i]) + } + } + if len(this.StringToFloatMap) != len(that1.StringToFloatMap) { + return fmt.Errorf("StringToFloatMap this(%v) Not Equal that(%v)", len(this.StringToFloatMap), len(that1.StringToFloatMap)) + } + for i := range this.StringToFloatMap { + if this.StringToFloatMap[i] != that1.StringToFloatMap[i] { + return fmt.Errorf("StringToFloatMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringToFloatMap[i], i, that1.StringToFloatMap[i]) + } + } + if len(this.Int32Map) != len(that1.Int32Map) { + return fmt.Errorf("Int32Map this(%v) Not Equal that(%v)", len(this.Int32Map), len(that1.Int32Map)) + } + for i := range this.Int32Map { + if this.Int32Map[i] != that1.Int32Map[i] { + return fmt.Errorf("Int32Map this[%v](%v) Not Equal that[%v](%v)", i, this.Int32Map[i], i, that1.Int32Map[i]) + } + } + if len(this.Int64Map) != len(that1.Int64Map) { + return fmt.Errorf("Int64Map this(%v) Not Equal that(%v)", len(this.Int64Map), len(that1.Int64Map)) + } + for i := range this.Int64Map { + if this.Int64Map[i] != that1.Int64Map[i] { + return fmt.Errorf("Int64Map this[%v](%v) Not Equal that[%v](%v)", i, this.Int64Map[i], i, that1.Int64Map[i]) + } + } + if len(this.Uint32Map) != len(that1.Uint32Map) { + return fmt.Errorf("Uint32Map this(%v) Not Equal that(%v)", len(this.Uint32Map), len(that1.Uint32Map)) + } + for i := range this.Uint32Map { + if this.Uint32Map[i] != that1.Uint32Map[i] { + return fmt.Errorf("Uint32Map this[%v](%v) Not Equal that[%v](%v)", i, this.Uint32Map[i], i, that1.Uint32Map[i]) + } + } + if len(this.Uint64Map) != len(that1.Uint64Map) { + return fmt.Errorf("Uint64Map this(%v) Not Equal that(%v)", len(this.Uint64Map), len(that1.Uint64Map)) + } + for i := range this.Uint64Map { + if this.Uint64Map[i] != that1.Uint64Map[i] { + return fmt.Errorf("Uint64Map this[%v](%v) Not Equal that[%v](%v)", i, this.Uint64Map[i], i, that1.Uint64Map[i]) + } + } + if len(this.Sint32Map) != len(that1.Sint32Map) { + return fmt.Errorf("Sint32Map this(%v) Not Equal that(%v)", len(this.Sint32Map), len(that1.Sint32Map)) + } + for i := range this.Sint32Map { + if this.Sint32Map[i] != that1.Sint32Map[i] { + return fmt.Errorf("Sint32Map this[%v](%v) Not Equal that[%v](%v)", i, this.Sint32Map[i], i, that1.Sint32Map[i]) + } + } + if len(this.Sint64Map) != len(that1.Sint64Map) { + return fmt.Errorf("Sint64Map this(%v) Not Equal that(%v)", len(this.Sint64Map), len(that1.Sint64Map)) + } + for i := range this.Sint64Map { + if this.Sint64Map[i] != that1.Sint64Map[i] { + return fmt.Errorf("Sint64Map this[%v](%v) Not Equal that[%v](%v)", i, this.Sint64Map[i], i, that1.Sint64Map[i]) + } + } + if len(this.Fixed32Map) != len(that1.Fixed32Map) { + return fmt.Errorf("Fixed32Map this(%v) Not Equal that(%v)", len(this.Fixed32Map), len(that1.Fixed32Map)) + } + for i := range this.Fixed32Map { + if this.Fixed32Map[i] != that1.Fixed32Map[i] { + return fmt.Errorf("Fixed32Map this[%v](%v) Not Equal that[%v](%v)", i, this.Fixed32Map[i], i, that1.Fixed32Map[i]) + } + } + if len(this.Sfixed32Map) != len(that1.Sfixed32Map) { + return fmt.Errorf("Sfixed32Map this(%v) Not Equal that(%v)", len(this.Sfixed32Map), len(that1.Sfixed32Map)) + } + for i := range this.Sfixed32Map { + if this.Sfixed32Map[i] != that1.Sfixed32Map[i] { + return fmt.Errorf("Sfixed32Map this[%v](%v) Not Equal that[%v](%v)", i, this.Sfixed32Map[i], i, that1.Sfixed32Map[i]) + } + } + if len(this.Fixed64Map) != len(that1.Fixed64Map) { + return fmt.Errorf("Fixed64Map this(%v) Not Equal that(%v)", len(this.Fixed64Map), len(that1.Fixed64Map)) + } + for i := range this.Fixed64Map { + if this.Fixed64Map[i] != that1.Fixed64Map[i] { + return fmt.Errorf("Fixed64Map this[%v](%v) Not Equal that[%v](%v)", i, this.Fixed64Map[i], i, that1.Fixed64Map[i]) + } + } + if len(this.Sfixed64Map) != len(that1.Sfixed64Map) { + return fmt.Errorf("Sfixed64Map this(%v) Not Equal that(%v)", len(this.Sfixed64Map), len(that1.Sfixed64Map)) + } + for i := range this.Sfixed64Map { + if this.Sfixed64Map[i] != that1.Sfixed64Map[i] { + return fmt.Errorf("Sfixed64Map this[%v](%v) Not Equal that[%v](%v)", i, this.Sfixed64Map[i], i, that1.Sfixed64Map[i]) + } + } + if len(this.BoolMap) != len(that1.BoolMap) { + return fmt.Errorf("BoolMap this(%v) Not Equal that(%v)", len(this.BoolMap), len(that1.BoolMap)) + } + for i := range this.BoolMap { + if this.BoolMap[i] != that1.BoolMap[i] { + return fmt.Errorf("BoolMap this[%v](%v) Not Equal that[%v](%v)", i, this.BoolMap[i], i, that1.BoolMap[i]) + } + } + if len(this.StringMap) != len(that1.StringMap) { + return fmt.Errorf("StringMap this(%v) Not Equal that(%v)", len(this.StringMap), len(that1.StringMap)) + } + for i := range this.StringMap { + if this.StringMap[i] != that1.StringMap[i] { + return fmt.Errorf("StringMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringMap[i], i, that1.StringMap[i]) + } + } + if len(this.StringToBytesMap) != len(that1.StringToBytesMap) { + return fmt.Errorf("StringToBytesMap this(%v) Not Equal that(%v)", len(this.StringToBytesMap), len(that1.StringToBytesMap)) + } + for i := range this.StringToBytesMap { + if !bytes.Equal(this.StringToBytesMap[i], that1.StringToBytesMap[i]) { + return fmt.Errorf("StringToBytesMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringToBytesMap[i], i, that1.StringToBytesMap[i]) + } + } + if len(this.StringToEnumMap) != len(that1.StringToEnumMap) { + return fmt.Errorf("StringToEnumMap this(%v) Not Equal that(%v)", len(this.StringToEnumMap), len(that1.StringToEnumMap)) + } + for i := range this.StringToEnumMap { + if this.StringToEnumMap[i] != that1.StringToEnumMap[i] { + return fmt.Errorf("StringToEnumMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringToEnumMap[i], i, that1.StringToEnumMap[i]) + } + } + if len(this.StringToMsgMap) != len(that1.StringToMsgMap) { + return fmt.Errorf("StringToMsgMap this(%v) Not Equal that(%v)", len(this.StringToMsgMap), len(that1.StringToMsgMap)) + } + for i := range this.StringToMsgMap { + if !this.StringToMsgMap[i].Equal(that1.StringToMsgMap[i]) { + return fmt.Errorf("StringToMsgMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringToMsgMap[i], i, that1.StringToMsgMap[i]) + } + } + return nil +} +func (this *AllMaps) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*AllMaps) + if !ok { + that2, ok := that.(AllMaps) + 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.StringToDoubleMap) != len(that1.StringToDoubleMap) { + return false + } + for i := range this.StringToDoubleMap { + if this.StringToDoubleMap[i] != that1.StringToDoubleMap[i] { + return false + } + } + if len(this.StringToFloatMap) != len(that1.StringToFloatMap) { + return false + } + for i := range this.StringToFloatMap { + if this.StringToFloatMap[i] != that1.StringToFloatMap[i] { + return false + } + } + if len(this.Int32Map) != len(that1.Int32Map) { + return false + } + for i := range this.Int32Map { + if this.Int32Map[i] != that1.Int32Map[i] { + return false + } + } + if len(this.Int64Map) != len(that1.Int64Map) { + return false + } + for i := range this.Int64Map { + if this.Int64Map[i] != that1.Int64Map[i] { + return false + } + } + if len(this.Uint32Map) != len(that1.Uint32Map) { + return false + } + for i := range this.Uint32Map { + if this.Uint32Map[i] != that1.Uint32Map[i] { + return false + } + } + if len(this.Uint64Map) != len(that1.Uint64Map) { + return false + } + for i := range this.Uint64Map { + if this.Uint64Map[i] != that1.Uint64Map[i] { + return false + } + } + if len(this.Sint32Map) != len(that1.Sint32Map) { + return false + } + for i := range this.Sint32Map { + if this.Sint32Map[i] != that1.Sint32Map[i] { + return false + } + } + if len(this.Sint64Map) != len(that1.Sint64Map) { + return false + } + for i := range this.Sint64Map { + if this.Sint64Map[i] != that1.Sint64Map[i] { + return false + } + } + if len(this.Fixed32Map) != len(that1.Fixed32Map) { + return false + } + for i := range this.Fixed32Map { + if this.Fixed32Map[i] != that1.Fixed32Map[i] { + return false + } + } + if len(this.Sfixed32Map) != len(that1.Sfixed32Map) { + return false + } + for i := range this.Sfixed32Map { + if this.Sfixed32Map[i] != that1.Sfixed32Map[i] { + return false + } + } + if len(this.Fixed64Map) != len(that1.Fixed64Map) { + return false + } + for i := range this.Fixed64Map { + if this.Fixed64Map[i] != that1.Fixed64Map[i] { + return false + } + } + if len(this.Sfixed64Map) != len(that1.Sfixed64Map) { + return false + } + for i := range this.Sfixed64Map { + if this.Sfixed64Map[i] != that1.Sfixed64Map[i] { + return false + } + } + if len(this.BoolMap) != len(that1.BoolMap) { + return false + } + for i := range this.BoolMap { + if this.BoolMap[i] != that1.BoolMap[i] { + return false + } + } + if len(this.StringMap) != len(that1.StringMap) { + return false + } + for i := range this.StringMap { + if this.StringMap[i] != that1.StringMap[i] { + return false + } + } + if len(this.StringToBytesMap) != len(that1.StringToBytesMap) { + return false + } + for i := range this.StringToBytesMap { + if !bytes.Equal(this.StringToBytesMap[i], that1.StringToBytesMap[i]) { + return false + } + } + if len(this.StringToEnumMap) != len(that1.StringToEnumMap) { + return false + } + for i := range this.StringToEnumMap { + if this.StringToEnumMap[i] != that1.StringToEnumMap[i] { + return false + } + } + if len(this.StringToMsgMap) != len(that1.StringToMsgMap) { + return false + } + for i := range this.StringToMsgMap { + if !this.StringToMsgMap[i].Equal(that1.StringToMsgMap[i]) { + return false + } + } + return true +} +func (this *AllMapsOrdered) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*AllMapsOrdered) + if !ok { + that2, ok := that.(AllMapsOrdered) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *AllMapsOrdered") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *AllMapsOrdered but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *AllMapsOrdered but is not nil && this == nil") + } + if len(this.StringToDoubleMap) != len(that1.StringToDoubleMap) { + return fmt.Errorf("StringToDoubleMap this(%v) Not Equal that(%v)", len(this.StringToDoubleMap), len(that1.StringToDoubleMap)) + } + for i := range this.StringToDoubleMap { + if this.StringToDoubleMap[i] != that1.StringToDoubleMap[i] { + return fmt.Errorf("StringToDoubleMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringToDoubleMap[i], i, that1.StringToDoubleMap[i]) + } + } + if len(this.StringToFloatMap) != len(that1.StringToFloatMap) { + return fmt.Errorf("StringToFloatMap this(%v) Not Equal that(%v)", len(this.StringToFloatMap), len(that1.StringToFloatMap)) + } + for i := range this.StringToFloatMap { + if this.StringToFloatMap[i] != that1.StringToFloatMap[i] { + return fmt.Errorf("StringToFloatMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringToFloatMap[i], i, that1.StringToFloatMap[i]) + } + } + if len(this.Int32Map) != len(that1.Int32Map) { + return fmt.Errorf("Int32Map this(%v) Not Equal that(%v)", len(this.Int32Map), len(that1.Int32Map)) + } + for i := range this.Int32Map { + if this.Int32Map[i] != that1.Int32Map[i] { + return fmt.Errorf("Int32Map this[%v](%v) Not Equal that[%v](%v)", i, this.Int32Map[i], i, that1.Int32Map[i]) + } + } + if len(this.Int64Map) != len(that1.Int64Map) { + return fmt.Errorf("Int64Map this(%v) Not Equal that(%v)", len(this.Int64Map), len(that1.Int64Map)) + } + for i := range this.Int64Map { + if this.Int64Map[i] != that1.Int64Map[i] { + return fmt.Errorf("Int64Map this[%v](%v) Not Equal that[%v](%v)", i, this.Int64Map[i], i, that1.Int64Map[i]) + } + } + if len(this.Uint32Map) != len(that1.Uint32Map) { + return fmt.Errorf("Uint32Map this(%v) Not Equal that(%v)", len(this.Uint32Map), len(that1.Uint32Map)) + } + for i := range this.Uint32Map { + if this.Uint32Map[i] != that1.Uint32Map[i] { + return fmt.Errorf("Uint32Map this[%v](%v) Not Equal that[%v](%v)", i, this.Uint32Map[i], i, that1.Uint32Map[i]) + } + } + if len(this.Uint64Map) != len(that1.Uint64Map) { + return fmt.Errorf("Uint64Map this(%v) Not Equal that(%v)", len(this.Uint64Map), len(that1.Uint64Map)) + } + for i := range this.Uint64Map { + if this.Uint64Map[i] != that1.Uint64Map[i] { + return fmt.Errorf("Uint64Map this[%v](%v) Not Equal that[%v](%v)", i, this.Uint64Map[i], i, that1.Uint64Map[i]) + } + } + if len(this.Sint32Map) != len(that1.Sint32Map) { + return fmt.Errorf("Sint32Map this(%v) Not Equal that(%v)", len(this.Sint32Map), len(that1.Sint32Map)) + } + for i := range this.Sint32Map { + if this.Sint32Map[i] != that1.Sint32Map[i] { + return fmt.Errorf("Sint32Map this[%v](%v) Not Equal that[%v](%v)", i, this.Sint32Map[i], i, that1.Sint32Map[i]) + } + } + if len(this.Sint64Map) != len(that1.Sint64Map) { + return fmt.Errorf("Sint64Map this(%v) Not Equal that(%v)", len(this.Sint64Map), len(that1.Sint64Map)) + } + for i := range this.Sint64Map { + if this.Sint64Map[i] != that1.Sint64Map[i] { + return fmt.Errorf("Sint64Map this[%v](%v) Not Equal that[%v](%v)", i, this.Sint64Map[i], i, that1.Sint64Map[i]) + } + } + if len(this.Fixed32Map) != len(that1.Fixed32Map) { + return fmt.Errorf("Fixed32Map this(%v) Not Equal that(%v)", len(this.Fixed32Map), len(that1.Fixed32Map)) + } + for i := range this.Fixed32Map { + if this.Fixed32Map[i] != that1.Fixed32Map[i] { + return fmt.Errorf("Fixed32Map this[%v](%v) Not Equal that[%v](%v)", i, this.Fixed32Map[i], i, that1.Fixed32Map[i]) + } + } + if len(this.Sfixed32Map) != len(that1.Sfixed32Map) { + return fmt.Errorf("Sfixed32Map this(%v) Not Equal that(%v)", len(this.Sfixed32Map), len(that1.Sfixed32Map)) + } + for i := range this.Sfixed32Map { + if this.Sfixed32Map[i] != that1.Sfixed32Map[i] { + return fmt.Errorf("Sfixed32Map this[%v](%v) Not Equal that[%v](%v)", i, this.Sfixed32Map[i], i, that1.Sfixed32Map[i]) + } + } + if len(this.Fixed64Map) != len(that1.Fixed64Map) { + return fmt.Errorf("Fixed64Map this(%v) Not Equal that(%v)", len(this.Fixed64Map), len(that1.Fixed64Map)) + } + for i := range this.Fixed64Map { + if this.Fixed64Map[i] != that1.Fixed64Map[i] { + return fmt.Errorf("Fixed64Map this[%v](%v) Not Equal that[%v](%v)", i, this.Fixed64Map[i], i, that1.Fixed64Map[i]) + } + } + if len(this.Sfixed64Map) != len(that1.Sfixed64Map) { + return fmt.Errorf("Sfixed64Map this(%v) Not Equal that(%v)", len(this.Sfixed64Map), len(that1.Sfixed64Map)) + } + for i := range this.Sfixed64Map { + if this.Sfixed64Map[i] != that1.Sfixed64Map[i] { + return fmt.Errorf("Sfixed64Map this[%v](%v) Not Equal that[%v](%v)", i, this.Sfixed64Map[i], i, that1.Sfixed64Map[i]) + } + } + if len(this.BoolMap) != len(that1.BoolMap) { + return fmt.Errorf("BoolMap this(%v) Not Equal that(%v)", len(this.BoolMap), len(that1.BoolMap)) + } + for i := range this.BoolMap { + if this.BoolMap[i] != that1.BoolMap[i] { + return fmt.Errorf("BoolMap this[%v](%v) Not Equal that[%v](%v)", i, this.BoolMap[i], i, that1.BoolMap[i]) + } + } + if len(this.StringMap) != len(that1.StringMap) { + return fmt.Errorf("StringMap this(%v) Not Equal that(%v)", len(this.StringMap), len(that1.StringMap)) + } + for i := range this.StringMap { + if this.StringMap[i] != that1.StringMap[i] { + return fmt.Errorf("StringMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringMap[i], i, that1.StringMap[i]) + } + } + if len(this.StringToBytesMap) != len(that1.StringToBytesMap) { + return fmt.Errorf("StringToBytesMap this(%v) Not Equal that(%v)", len(this.StringToBytesMap), len(that1.StringToBytesMap)) + } + for i := range this.StringToBytesMap { + if !bytes.Equal(this.StringToBytesMap[i], that1.StringToBytesMap[i]) { + return fmt.Errorf("StringToBytesMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringToBytesMap[i], i, that1.StringToBytesMap[i]) + } + } + if len(this.StringToEnumMap) != len(that1.StringToEnumMap) { + return fmt.Errorf("StringToEnumMap this(%v) Not Equal that(%v)", len(this.StringToEnumMap), len(that1.StringToEnumMap)) + } + for i := range this.StringToEnumMap { + if this.StringToEnumMap[i] != that1.StringToEnumMap[i] { + return fmt.Errorf("StringToEnumMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringToEnumMap[i], i, that1.StringToEnumMap[i]) + } + } + if len(this.StringToMsgMap) != len(that1.StringToMsgMap) { + return fmt.Errorf("StringToMsgMap this(%v) Not Equal that(%v)", len(this.StringToMsgMap), len(that1.StringToMsgMap)) + } + for i := range this.StringToMsgMap { + if !this.StringToMsgMap[i].Equal(that1.StringToMsgMap[i]) { + return fmt.Errorf("StringToMsgMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringToMsgMap[i], i, that1.StringToMsgMap[i]) + } + } + return nil +} +func (this *AllMapsOrdered) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*AllMapsOrdered) + if !ok { + that2, ok := that.(AllMapsOrdered) + 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.StringToDoubleMap) != len(that1.StringToDoubleMap) { + return false + } + for i := range this.StringToDoubleMap { + if this.StringToDoubleMap[i] != that1.StringToDoubleMap[i] { + return false + } + } + if len(this.StringToFloatMap) != len(that1.StringToFloatMap) { + return false + } + for i := range this.StringToFloatMap { + if this.StringToFloatMap[i] != that1.StringToFloatMap[i] { + return false + } + } + if len(this.Int32Map) != len(that1.Int32Map) { + return false + } + for i := range this.Int32Map { + if this.Int32Map[i] != that1.Int32Map[i] { + return false + } + } + if len(this.Int64Map) != len(that1.Int64Map) { + return false + } + for i := range this.Int64Map { + if this.Int64Map[i] != that1.Int64Map[i] { + return false + } + } + if len(this.Uint32Map) != len(that1.Uint32Map) { + return false + } + for i := range this.Uint32Map { + if this.Uint32Map[i] != that1.Uint32Map[i] { + return false + } + } + if len(this.Uint64Map) != len(that1.Uint64Map) { + return false + } + for i := range this.Uint64Map { + if this.Uint64Map[i] != that1.Uint64Map[i] { + return false + } + } + if len(this.Sint32Map) != len(that1.Sint32Map) { + return false + } + for i := range this.Sint32Map { + if this.Sint32Map[i] != that1.Sint32Map[i] { + return false + } + } + if len(this.Sint64Map) != len(that1.Sint64Map) { + return false + } + for i := range this.Sint64Map { + if this.Sint64Map[i] != that1.Sint64Map[i] { + return false + } + } + if len(this.Fixed32Map) != len(that1.Fixed32Map) { + return false + } + for i := range this.Fixed32Map { + if this.Fixed32Map[i] != that1.Fixed32Map[i] { + return false + } + } + if len(this.Sfixed32Map) != len(that1.Sfixed32Map) { + return false + } + for i := range this.Sfixed32Map { + if this.Sfixed32Map[i] != that1.Sfixed32Map[i] { + return false + } + } + if len(this.Fixed64Map) != len(that1.Fixed64Map) { + return false + } + for i := range this.Fixed64Map { + if this.Fixed64Map[i] != that1.Fixed64Map[i] { + return false + } + } + if len(this.Sfixed64Map) != len(that1.Sfixed64Map) { + return false + } + for i := range this.Sfixed64Map { + if this.Sfixed64Map[i] != that1.Sfixed64Map[i] { + return false + } + } + if len(this.BoolMap) != len(that1.BoolMap) { + return false + } + for i := range this.BoolMap { + if this.BoolMap[i] != that1.BoolMap[i] { + return false + } + } + if len(this.StringMap) != len(that1.StringMap) { + return false + } + for i := range this.StringMap { + if this.StringMap[i] != that1.StringMap[i] { + return false + } + } + if len(this.StringToBytesMap) != len(that1.StringToBytesMap) { + return false + } + for i := range this.StringToBytesMap { + if !bytes.Equal(this.StringToBytesMap[i], that1.StringToBytesMap[i]) { + return false + } + } + if len(this.StringToEnumMap) != len(that1.StringToEnumMap) { + return false + } + for i := range this.StringToEnumMap { + if this.StringToEnumMap[i] != that1.StringToEnumMap[i] { + return false + } + } + if len(this.StringToMsgMap) != len(that1.StringToMsgMap) { + return false + } + for i := range this.StringToMsgMap { + if !this.StringToMsgMap[i].Equal(that1.StringToMsgMap[i]) { + return false + } + } + return true +} +func (this *MessageWithMap) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*MessageWithMap) + if !ok { + that2, ok := that.(MessageWithMap) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *MessageWithMap") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *MessageWithMap but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *MessageWithMap but is not nil && this == nil") + } + if len(this.NameMapping) != len(that1.NameMapping) { + return fmt.Errorf("NameMapping this(%v) Not Equal that(%v)", len(this.NameMapping), len(that1.NameMapping)) + } + for i := range this.NameMapping { + if this.NameMapping[i] != that1.NameMapping[i] { + return fmt.Errorf("NameMapping this[%v](%v) Not Equal that[%v](%v)", i, this.NameMapping[i], i, that1.NameMapping[i]) + } + } + if len(this.MsgMapping) != len(that1.MsgMapping) { + return fmt.Errorf("MsgMapping this(%v) Not Equal that(%v)", len(this.MsgMapping), len(that1.MsgMapping)) + } + for i := range this.MsgMapping { + if !this.MsgMapping[i].Equal(that1.MsgMapping[i]) { + return fmt.Errorf("MsgMapping this[%v](%v) Not Equal that[%v](%v)", i, this.MsgMapping[i], i, that1.MsgMapping[i]) + } + } + if len(this.ByteMapping) != len(that1.ByteMapping) { + return fmt.Errorf("ByteMapping this(%v) Not Equal that(%v)", len(this.ByteMapping), len(that1.ByteMapping)) + } + for i := range this.ByteMapping { + if !bytes.Equal(this.ByteMapping[i], that1.ByteMapping[i]) { + return fmt.Errorf("ByteMapping this[%v](%v) Not Equal that[%v](%v)", i, this.ByteMapping[i], i, that1.ByteMapping[i]) + } + } + return nil +} +func (this *MessageWithMap) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*MessageWithMap) + if !ok { + that2, ok := that.(MessageWithMap) + 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.NameMapping) != len(that1.NameMapping) { + return false + } + for i := range this.NameMapping { + if this.NameMapping[i] != that1.NameMapping[i] { + return false + } + } + if len(this.MsgMapping) != len(that1.MsgMapping) { + return false + } + for i := range this.MsgMapping { + if !this.MsgMapping[i].Equal(that1.MsgMapping[i]) { + return false + } + } + if len(this.ByteMapping) != len(that1.ByteMapping) { + return false + } + for i := range this.ByteMapping { + if !bytes.Equal(this.ByteMapping[i], that1.ByteMapping[i]) { + return false + } + } + return true +} +func (this *FloatingPoint) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*FloatingPoint) + if !ok { + that2, ok := that.(FloatingPoint) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *FloatingPoint") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *FloatingPoint but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *FloatingPoint but is not nil && this == nil") + } + if this.F != that1.F { + return fmt.Errorf("F this(%v) Not Equal that(%v)", this.F, that1.F) + } + return nil +} +func (this *FloatingPoint) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*FloatingPoint) + if !ok { + that2, ok := that.(FloatingPoint) + 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.F != that1.F { + return false + } + return true +} +func (this *Uint128Pair) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*Uint128Pair) + if !ok { + that2, ok := that.(Uint128Pair) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *Uint128Pair") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *Uint128Pair but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *Uint128Pair but is not nil && this == nil") + } + if !this.Left.Equal(that1.Left) { + return fmt.Errorf("Left this(%v) Not Equal that(%v)", this.Left, that1.Left) + } + if that1.Right == nil { + if this.Right != nil { + return fmt.Errorf("this.Right != nil && that1.Right == nil") + } + } else if !this.Right.Equal(*that1.Right) { + return fmt.Errorf("Right this(%v) Not Equal that(%v)", this.Right, that1.Right) + } + return nil +} +func (this *Uint128Pair) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*Uint128Pair) + if !ok { + that2, ok := that.(Uint128Pair) + 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.Left.Equal(that1.Left) { + return false + } + if that1.Right == nil { + if this.Right != nil { + return false + } + } else if !this.Right.Equal(*that1.Right) { + return false + } + return true +} +func (this *ContainsNestedMap) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*ContainsNestedMap) + if !ok { + that2, ok := that.(ContainsNestedMap) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *ContainsNestedMap") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *ContainsNestedMap but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *ContainsNestedMap but is not nil && this == nil") + } + return nil +} +func (this *ContainsNestedMap) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*ContainsNestedMap) + if !ok { + that2, ok := that.(ContainsNestedMap) + 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 *ContainsNestedMap_NestedMap) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*ContainsNestedMap_NestedMap) + if !ok { + that2, ok := that.(ContainsNestedMap_NestedMap) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *ContainsNestedMap_NestedMap") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *ContainsNestedMap_NestedMap but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *ContainsNestedMap_NestedMap but is not nil && this == nil") + } + if len(this.NestedMapField) != len(that1.NestedMapField) { + return fmt.Errorf("NestedMapField this(%v) Not Equal that(%v)", len(this.NestedMapField), len(that1.NestedMapField)) + } + for i := range this.NestedMapField { + if this.NestedMapField[i] != that1.NestedMapField[i] { + return fmt.Errorf("NestedMapField this[%v](%v) Not Equal that[%v](%v)", i, this.NestedMapField[i], i, that1.NestedMapField[i]) + } + } + return nil +} +func (this *ContainsNestedMap_NestedMap) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*ContainsNestedMap_NestedMap) + if !ok { + that2, ok := that.(ContainsNestedMap_NestedMap) + 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.NestedMapField) != len(that1.NestedMapField) { + return false + } + for i := range this.NestedMapField { + if this.NestedMapField[i] != that1.NestedMapField[i] { + return false + } + } + return true +} + +type MessageFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetName() string + GetHilarity() Message_Humour + GetHeightInCm() uint32 + GetData() []byte + GetResultCount() int64 + GetTrueScotsman() bool + GetScore() float32 + GetKey() []uint64 + GetNested() *Nested + GetTerrain() map[int64]*Nested + GetProto2Field() *test.NinOptNative + GetProto2Value() map[int64]*test.NinOptEnum +} + +func (this *Message) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *Message) TestProto() github_com_gogo_protobuf_proto.Message { + return NewMessageFromFace(this) +} + +func (this *Message) GetName() string { + return this.Name +} + +func (this *Message) GetHilarity() Message_Humour { + return this.Hilarity +} + +func (this *Message) GetHeightInCm() uint32 { + return this.HeightInCm +} + +func (this *Message) GetData() []byte { + return this.Data +} + +func (this *Message) GetResultCount() int64 { + return this.ResultCount +} + +func (this *Message) GetTrueScotsman() bool { + return this.TrueScotsman +} + +func (this *Message) GetScore() float32 { + return this.Score +} + +func (this *Message) GetKey() []uint64 { + return this.Key +} + +func (this *Message) GetNested() *Nested { + return this.Nested +} + +func (this *Message) GetTerrain() map[int64]*Nested { + return this.Terrain +} + +func (this *Message) GetProto2Field() *test.NinOptNative { + return this.Proto2Field +} + +func (this *Message) GetProto2Value() map[int64]*test.NinOptEnum { + return this.Proto2Value +} + +func NewMessageFromFace(that MessageFace) *Message { + this := &Message{} + this.Name = that.GetName() + this.Hilarity = that.GetHilarity() + this.HeightInCm = that.GetHeightInCm() + this.Data = that.GetData() + this.ResultCount = that.GetResultCount() + this.TrueScotsman = that.GetTrueScotsman() + this.Score = that.GetScore() + this.Key = that.GetKey() + this.Nested = that.GetNested() + this.Terrain = that.GetTerrain() + this.Proto2Field = that.GetProto2Field() + this.Proto2Value = that.GetProto2Value() + return this +} + +type NestedFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetBunny() string +} + +func (this *Nested) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *Nested) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNestedFromFace(this) +} + +func (this *Nested) GetBunny() string { + return this.Bunny +} + +func NewNestedFromFace(that NestedFace) *Nested { + this := &Nested{} + this.Bunny = that.GetBunny() + return this +} + +type AllMapsFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetStringToDoubleMap() map[string]float64 + GetStringToFloatMap() map[string]float32 + GetInt32Map() map[int32]int32 + GetInt64Map() map[int64]int64 + GetUint32Map() map[uint32]uint32 + GetUint64Map() map[uint64]uint64 + GetSint32Map() map[int32]int32 + GetSint64Map() map[int64]int64 + GetFixed32Map() map[uint32]uint32 + GetSfixed32Map() map[int32]int32 + GetFixed64Map() map[uint64]uint64 + GetSfixed64Map() map[int64]int64 + GetBoolMap() map[bool]bool + GetStringMap() map[string]string + GetStringToBytesMap() map[string][]byte + GetStringToEnumMap() map[string]MapEnum + GetStringToMsgMap() map[string]*FloatingPoint +} + +func (this *AllMaps) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *AllMaps) TestProto() github_com_gogo_protobuf_proto.Message { + return NewAllMapsFromFace(this) +} + +func (this *AllMaps) GetStringToDoubleMap() map[string]float64 { + return this.StringToDoubleMap +} + +func (this *AllMaps) GetStringToFloatMap() map[string]float32 { + return this.StringToFloatMap +} + +func (this *AllMaps) GetInt32Map() map[int32]int32 { + return this.Int32Map +} + +func (this *AllMaps) GetInt64Map() map[int64]int64 { + return this.Int64Map +} + +func (this *AllMaps) GetUint32Map() map[uint32]uint32 { + return this.Uint32Map +} + +func (this *AllMaps) GetUint64Map() map[uint64]uint64 { + return this.Uint64Map +} + +func (this *AllMaps) GetSint32Map() map[int32]int32 { + return this.Sint32Map +} + +func (this *AllMaps) GetSint64Map() map[int64]int64 { + return this.Sint64Map +} + +func (this *AllMaps) GetFixed32Map() map[uint32]uint32 { + return this.Fixed32Map +} + +func (this *AllMaps) GetSfixed32Map() map[int32]int32 { + return this.Sfixed32Map +} + +func (this *AllMaps) GetFixed64Map() map[uint64]uint64 { + return this.Fixed64Map +} + +func (this *AllMaps) GetSfixed64Map() map[int64]int64 { + return this.Sfixed64Map +} + +func (this *AllMaps) GetBoolMap() map[bool]bool { + return this.BoolMap +} + +func (this *AllMaps) GetStringMap() map[string]string { + return this.StringMap +} + +func (this *AllMaps) GetStringToBytesMap() map[string][]byte { + return this.StringToBytesMap +} + +func (this *AllMaps) GetStringToEnumMap() map[string]MapEnum { + return this.StringToEnumMap +} + +func (this *AllMaps) GetStringToMsgMap() map[string]*FloatingPoint { + return this.StringToMsgMap +} + +func NewAllMapsFromFace(that AllMapsFace) *AllMaps { + this := &AllMaps{} + this.StringToDoubleMap = that.GetStringToDoubleMap() + this.StringToFloatMap = that.GetStringToFloatMap() + this.Int32Map = that.GetInt32Map() + this.Int64Map = that.GetInt64Map() + this.Uint32Map = that.GetUint32Map() + this.Uint64Map = that.GetUint64Map() + this.Sint32Map = that.GetSint32Map() + this.Sint64Map = that.GetSint64Map() + this.Fixed32Map = that.GetFixed32Map() + this.Sfixed32Map = that.GetSfixed32Map() + this.Fixed64Map = that.GetFixed64Map() + this.Sfixed64Map = that.GetSfixed64Map() + this.BoolMap = that.GetBoolMap() + this.StringMap = that.GetStringMap() + this.StringToBytesMap = that.GetStringToBytesMap() + this.StringToEnumMap = that.GetStringToEnumMap() + this.StringToMsgMap = that.GetStringToMsgMap() + return this +} + +type AllMapsOrderedFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetStringToDoubleMap() map[string]float64 + GetStringToFloatMap() map[string]float32 + GetInt32Map() map[int32]int32 + GetInt64Map() map[int64]int64 + GetUint32Map() map[uint32]uint32 + GetUint64Map() map[uint64]uint64 + GetSint32Map() map[int32]int32 + GetSint64Map() map[int64]int64 + GetFixed32Map() map[uint32]uint32 + GetSfixed32Map() map[int32]int32 + GetFixed64Map() map[uint64]uint64 + GetSfixed64Map() map[int64]int64 + GetBoolMap() map[bool]bool + GetStringMap() map[string]string + GetStringToBytesMap() map[string][]byte + GetStringToEnumMap() map[string]MapEnum + GetStringToMsgMap() map[string]*FloatingPoint +} + +func (this *AllMapsOrdered) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *AllMapsOrdered) TestProto() github_com_gogo_protobuf_proto.Message { + return NewAllMapsOrderedFromFace(this) +} + +func (this *AllMapsOrdered) GetStringToDoubleMap() map[string]float64 { + return this.StringToDoubleMap +} + +func (this *AllMapsOrdered) GetStringToFloatMap() map[string]float32 { + return this.StringToFloatMap +} + +func (this *AllMapsOrdered) GetInt32Map() map[int32]int32 { + return this.Int32Map +} + +func (this *AllMapsOrdered) GetInt64Map() map[int64]int64 { + return this.Int64Map +} + +func (this *AllMapsOrdered) GetUint32Map() map[uint32]uint32 { + return this.Uint32Map +} + +func (this *AllMapsOrdered) GetUint64Map() map[uint64]uint64 { + return this.Uint64Map +} + +func (this *AllMapsOrdered) GetSint32Map() map[int32]int32 { + return this.Sint32Map +} + +func (this *AllMapsOrdered) GetSint64Map() map[int64]int64 { + return this.Sint64Map +} + +func (this *AllMapsOrdered) GetFixed32Map() map[uint32]uint32 { + return this.Fixed32Map +} + +func (this *AllMapsOrdered) GetSfixed32Map() map[int32]int32 { + return this.Sfixed32Map +} + +func (this *AllMapsOrdered) GetFixed64Map() map[uint64]uint64 { + return this.Fixed64Map +} + +func (this *AllMapsOrdered) GetSfixed64Map() map[int64]int64 { + return this.Sfixed64Map +} + +func (this *AllMapsOrdered) GetBoolMap() map[bool]bool { + return this.BoolMap +} + +func (this *AllMapsOrdered) GetStringMap() map[string]string { + return this.StringMap +} + +func (this *AllMapsOrdered) GetStringToBytesMap() map[string][]byte { + return this.StringToBytesMap +} + +func (this *AllMapsOrdered) GetStringToEnumMap() map[string]MapEnum { + return this.StringToEnumMap +} + +func (this *AllMapsOrdered) GetStringToMsgMap() map[string]*FloatingPoint { + return this.StringToMsgMap +} + +func NewAllMapsOrderedFromFace(that AllMapsOrderedFace) *AllMapsOrdered { + this := &AllMapsOrdered{} + this.StringToDoubleMap = that.GetStringToDoubleMap() + this.StringToFloatMap = that.GetStringToFloatMap() + this.Int32Map = that.GetInt32Map() + this.Int64Map = that.GetInt64Map() + this.Uint32Map = that.GetUint32Map() + this.Uint64Map = that.GetUint64Map() + this.Sint32Map = that.GetSint32Map() + this.Sint64Map = that.GetSint64Map() + this.Fixed32Map = that.GetFixed32Map() + this.Sfixed32Map = that.GetSfixed32Map() + this.Fixed64Map = that.GetFixed64Map() + this.Sfixed64Map = that.GetSfixed64Map() + this.BoolMap = that.GetBoolMap() + this.StringMap = that.GetStringMap() + this.StringToBytesMap = that.GetStringToBytesMap() + this.StringToEnumMap = that.GetStringToEnumMap() + this.StringToMsgMap = that.GetStringToMsgMap() + return this +} + +type MessageWithMapFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetNameMapping() map[int32]string + GetMsgMapping() map[int64]*FloatingPoint + GetByteMapping() map[bool][]byte +} + +func (this *MessageWithMap) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *MessageWithMap) TestProto() github_com_gogo_protobuf_proto.Message { + return NewMessageWithMapFromFace(this) +} + +func (this *MessageWithMap) GetNameMapping() map[int32]string { + return this.NameMapping +} + +func (this *MessageWithMap) GetMsgMapping() map[int64]*FloatingPoint { + return this.MsgMapping +} + +func (this *MessageWithMap) GetByteMapping() map[bool][]byte { + return this.ByteMapping +} + +func NewMessageWithMapFromFace(that MessageWithMapFace) *MessageWithMap { + this := &MessageWithMap{} + this.NameMapping = that.GetNameMapping() + this.MsgMapping = that.GetMsgMapping() + this.ByteMapping = that.GetByteMapping() + return this +} + +type FloatingPointFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetF() float64 +} + +func (this *FloatingPoint) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *FloatingPoint) TestProto() github_com_gogo_protobuf_proto.Message { + return NewFloatingPointFromFace(this) +} + +func (this *FloatingPoint) GetF() float64 { + return this.F +} + +func NewFloatingPointFromFace(that FloatingPointFace) *FloatingPoint { + this := &FloatingPoint{} + this.F = that.GetF() + return this +} + +type Uint128PairFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetLeft() github_com_gogo_protobuf_test_custom.Uint128 + GetRight() *github_com_gogo_protobuf_test_custom.Uint128 +} + +func (this *Uint128Pair) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *Uint128Pair) TestProto() github_com_gogo_protobuf_proto.Message { + return NewUint128PairFromFace(this) +} + +func (this *Uint128Pair) GetLeft() github_com_gogo_protobuf_test_custom.Uint128 { + return this.Left +} + +func (this *Uint128Pair) GetRight() *github_com_gogo_protobuf_test_custom.Uint128 { + return this.Right +} + +func NewUint128PairFromFace(that Uint128PairFace) *Uint128Pair { + this := &Uint128Pair{} + this.Left = that.GetLeft() + this.Right = that.GetRight() + return this +} + +type ContainsNestedMapFace interface { + Proto() github_com_gogo_protobuf_proto.Message +} + +func (this *ContainsNestedMap) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *ContainsNestedMap) TestProto() github_com_gogo_protobuf_proto.Message { + return NewContainsNestedMapFromFace(this) +} + +func NewContainsNestedMapFromFace(that ContainsNestedMapFace) *ContainsNestedMap { + this := &ContainsNestedMap{} + return this +} + +type ContainsNestedMap_NestedMapFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetNestedMapField() map[string]float64 +} + +func (this *ContainsNestedMap_NestedMap) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *ContainsNestedMap_NestedMap) TestProto() github_com_gogo_protobuf_proto.Message { + return NewContainsNestedMap_NestedMapFromFace(this) +} + +func (this *ContainsNestedMap_NestedMap) GetNestedMapField() map[string]float64 { + return this.NestedMapField +} + +func NewContainsNestedMap_NestedMapFromFace(that ContainsNestedMap_NestedMapFace) *ContainsNestedMap_NestedMap { + this := &ContainsNestedMap_NestedMap{} + this.NestedMapField = that.GetNestedMapField() + return this +} + +func (this *Message) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 16) + s = append(s, "&theproto3.Message{") + s = append(s, "Name: "+fmt.Sprintf("%#v", this.Name)+",\n") + s = append(s, "Hilarity: "+fmt.Sprintf("%#v", this.Hilarity)+",\n") + s = append(s, "HeightInCm: "+fmt.Sprintf("%#v", this.HeightInCm)+",\n") + s = append(s, "Data: "+fmt.Sprintf("%#v", this.Data)+",\n") + s = append(s, "ResultCount: "+fmt.Sprintf("%#v", this.ResultCount)+",\n") + s = append(s, "TrueScotsman: "+fmt.Sprintf("%#v", this.TrueScotsman)+",\n") + s = append(s, "Score: "+fmt.Sprintf("%#v", this.Score)+",\n") + s = append(s, "Key: "+fmt.Sprintf("%#v", this.Key)+",\n") + if this.Nested != nil { + s = append(s, "Nested: "+fmt.Sprintf("%#v", this.Nested)+",\n") + } + keysForTerrain := make([]int64, 0, len(this.Terrain)) + for k := range this.Terrain { + keysForTerrain = append(keysForTerrain, k) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForTerrain) + mapStringForTerrain := "map[int64]*Nested{" + for _, k := range keysForTerrain { + mapStringForTerrain += fmt.Sprintf("%#v: %#v,", k, this.Terrain[k]) + } + mapStringForTerrain += "}" + if this.Terrain != nil { + s = append(s, "Terrain: "+mapStringForTerrain+",\n") + } + if this.Proto2Field != nil { + s = append(s, "Proto2Field: "+fmt.Sprintf("%#v", this.Proto2Field)+",\n") + } + keysForProto2Value := make([]int64, 0, len(this.Proto2Value)) + for k := range this.Proto2Value { + keysForProto2Value = append(keysForProto2Value, k) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForProto2Value) + mapStringForProto2Value := "map[int64]*test.NinOptEnum{" + for _, k := range keysForProto2Value { + mapStringForProto2Value += fmt.Sprintf("%#v: %#v,", k, this.Proto2Value[k]) + } + mapStringForProto2Value += "}" + if this.Proto2Value != nil { + s = append(s, "Proto2Value: "+mapStringForProto2Value+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *Nested) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&theproto3.Nested{") + s = append(s, "Bunny: "+fmt.Sprintf("%#v", this.Bunny)+",\n") + s = append(s, "}") + return strings.Join(s, "") +} +func (this *AllMaps) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 21) + s = append(s, "&theproto3.AllMaps{") + keysForStringToDoubleMap := make([]string, 0, len(this.StringToDoubleMap)) + for k := range this.StringToDoubleMap { + keysForStringToDoubleMap = append(keysForStringToDoubleMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToDoubleMap) + mapStringForStringToDoubleMap := "map[string]float64{" + for _, k := range keysForStringToDoubleMap { + mapStringForStringToDoubleMap += fmt.Sprintf("%#v: %#v,", k, this.StringToDoubleMap[k]) + } + mapStringForStringToDoubleMap += "}" + if this.StringToDoubleMap != nil { + s = append(s, "StringToDoubleMap: "+mapStringForStringToDoubleMap+",\n") + } + keysForStringToFloatMap := make([]string, 0, len(this.StringToFloatMap)) + for k := range this.StringToFloatMap { + keysForStringToFloatMap = append(keysForStringToFloatMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToFloatMap) + mapStringForStringToFloatMap := "map[string]float32{" + for _, k := range keysForStringToFloatMap { + mapStringForStringToFloatMap += fmt.Sprintf("%#v: %#v,", k, this.StringToFloatMap[k]) + } + mapStringForStringToFloatMap += "}" + if this.StringToFloatMap != nil { + s = append(s, "StringToFloatMap: "+mapStringForStringToFloatMap+",\n") + } + keysForInt32Map := make([]int32, 0, len(this.Int32Map)) + for k := range this.Int32Map { + keysForInt32Map = append(keysForInt32Map, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForInt32Map) + mapStringForInt32Map := "map[int32]int32{" + for _, k := range keysForInt32Map { + mapStringForInt32Map += fmt.Sprintf("%#v: %#v,", k, this.Int32Map[k]) + } + mapStringForInt32Map += "}" + if this.Int32Map != nil { + s = append(s, "Int32Map: "+mapStringForInt32Map+",\n") + } + keysForInt64Map := make([]int64, 0, len(this.Int64Map)) + for k := range this.Int64Map { + keysForInt64Map = append(keysForInt64Map, k) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForInt64Map) + mapStringForInt64Map := "map[int64]int64{" + for _, k := range keysForInt64Map { + mapStringForInt64Map += fmt.Sprintf("%#v: %#v,", k, this.Int64Map[k]) + } + mapStringForInt64Map += "}" + if this.Int64Map != nil { + s = append(s, "Int64Map: "+mapStringForInt64Map+",\n") + } + keysForUint32Map := make([]uint32, 0, len(this.Uint32Map)) + for k := range this.Uint32Map { + keysForUint32Map = append(keysForUint32Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint32s(keysForUint32Map) + mapStringForUint32Map := "map[uint32]uint32{" + for _, k := range keysForUint32Map { + mapStringForUint32Map += fmt.Sprintf("%#v: %#v,", k, this.Uint32Map[k]) + } + mapStringForUint32Map += "}" + if this.Uint32Map != nil { + s = append(s, "Uint32Map: "+mapStringForUint32Map+",\n") + } + keysForUint64Map := make([]uint64, 0, len(this.Uint64Map)) + for k := range this.Uint64Map { + keysForUint64Map = append(keysForUint64Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint64s(keysForUint64Map) + mapStringForUint64Map := "map[uint64]uint64{" + for _, k := range keysForUint64Map { + mapStringForUint64Map += fmt.Sprintf("%#v: %#v,", k, this.Uint64Map[k]) + } + mapStringForUint64Map += "}" + if this.Uint64Map != nil { + s = append(s, "Uint64Map: "+mapStringForUint64Map+",\n") + } + keysForSint32Map := make([]int32, 0, len(this.Sint32Map)) + for k := range this.Sint32Map { + keysForSint32Map = append(keysForSint32Map, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForSint32Map) + mapStringForSint32Map := "map[int32]int32{" + for _, k := range keysForSint32Map { + mapStringForSint32Map += fmt.Sprintf("%#v: %#v,", k, this.Sint32Map[k]) + } + mapStringForSint32Map += "}" + if this.Sint32Map != nil { + s = append(s, "Sint32Map: "+mapStringForSint32Map+",\n") + } + keysForSint64Map := make([]int64, 0, len(this.Sint64Map)) + for k := range this.Sint64Map { + keysForSint64Map = append(keysForSint64Map, k) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForSint64Map) + mapStringForSint64Map := "map[int64]int64{" + for _, k := range keysForSint64Map { + mapStringForSint64Map += fmt.Sprintf("%#v: %#v,", k, this.Sint64Map[k]) + } + mapStringForSint64Map += "}" + if this.Sint64Map != nil { + s = append(s, "Sint64Map: "+mapStringForSint64Map+",\n") + } + keysForFixed32Map := make([]uint32, 0, len(this.Fixed32Map)) + for k := range this.Fixed32Map { + keysForFixed32Map = append(keysForFixed32Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint32s(keysForFixed32Map) + mapStringForFixed32Map := "map[uint32]uint32{" + for _, k := range keysForFixed32Map { + mapStringForFixed32Map += fmt.Sprintf("%#v: %#v,", k, this.Fixed32Map[k]) + } + mapStringForFixed32Map += "}" + if this.Fixed32Map != nil { + s = append(s, "Fixed32Map: "+mapStringForFixed32Map+",\n") + } + keysForSfixed32Map := make([]int32, 0, len(this.Sfixed32Map)) + for k := range this.Sfixed32Map { + keysForSfixed32Map = append(keysForSfixed32Map, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForSfixed32Map) + mapStringForSfixed32Map := "map[int32]int32{" + for _, k := range keysForSfixed32Map { + mapStringForSfixed32Map += fmt.Sprintf("%#v: %#v,", k, this.Sfixed32Map[k]) + } + mapStringForSfixed32Map += "}" + if this.Sfixed32Map != nil { + s = append(s, "Sfixed32Map: "+mapStringForSfixed32Map+",\n") + } + keysForFixed64Map := make([]uint64, 0, len(this.Fixed64Map)) + for k := range this.Fixed64Map { + keysForFixed64Map = append(keysForFixed64Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint64s(keysForFixed64Map) + mapStringForFixed64Map := "map[uint64]uint64{" + for _, k := range keysForFixed64Map { + mapStringForFixed64Map += fmt.Sprintf("%#v: %#v,", k, this.Fixed64Map[k]) + } + mapStringForFixed64Map += "}" + if this.Fixed64Map != nil { + s = append(s, "Fixed64Map: "+mapStringForFixed64Map+",\n") + } + keysForSfixed64Map := make([]int64, 0, len(this.Sfixed64Map)) + for k := range this.Sfixed64Map { + keysForSfixed64Map = append(keysForSfixed64Map, k) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForSfixed64Map) + mapStringForSfixed64Map := "map[int64]int64{" + for _, k := range keysForSfixed64Map { + mapStringForSfixed64Map += fmt.Sprintf("%#v: %#v,", k, this.Sfixed64Map[k]) + } + mapStringForSfixed64Map += "}" + if this.Sfixed64Map != nil { + s = append(s, "Sfixed64Map: "+mapStringForSfixed64Map+",\n") + } + keysForBoolMap := make([]bool, 0, len(this.BoolMap)) + for k := range this.BoolMap { + keysForBoolMap = append(keysForBoolMap, k) + } + github_com_gogo_protobuf_sortkeys.Bools(keysForBoolMap) + mapStringForBoolMap := "map[bool]bool{" + for _, k := range keysForBoolMap { + mapStringForBoolMap += fmt.Sprintf("%#v: %#v,", k, this.BoolMap[k]) + } + mapStringForBoolMap += "}" + if this.BoolMap != nil { + s = append(s, "BoolMap: "+mapStringForBoolMap+",\n") + } + keysForStringMap := make([]string, 0, len(this.StringMap)) + for k := range this.StringMap { + keysForStringMap = append(keysForStringMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringMap) + mapStringForStringMap := "map[string]string{" + for _, k := range keysForStringMap { + mapStringForStringMap += fmt.Sprintf("%#v: %#v,", k, this.StringMap[k]) + } + mapStringForStringMap += "}" + if this.StringMap != nil { + s = append(s, "StringMap: "+mapStringForStringMap+",\n") + } + keysForStringToBytesMap := make([]string, 0, len(this.StringToBytesMap)) + for k := range this.StringToBytesMap { + keysForStringToBytesMap = append(keysForStringToBytesMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToBytesMap) + mapStringForStringToBytesMap := "map[string][]byte{" + for _, k := range keysForStringToBytesMap { + mapStringForStringToBytesMap += fmt.Sprintf("%#v: %#v,", k, this.StringToBytesMap[k]) + } + mapStringForStringToBytesMap += "}" + if this.StringToBytesMap != nil { + s = append(s, "StringToBytesMap: "+mapStringForStringToBytesMap+",\n") + } + keysForStringToEnumMap := make([]string, 0, len(this.StringToEnumMap)) + for k := range this.StringToEnumMap { + keysForStringToEnumMap = append(keysForStringToEnumMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToEnumMap) + mapStringForStringToEnumMap := "map[string]MapEnum{" + for _, k := range keysForStringToEnumMap { + mapStringForStringToEnumMap += fmt.Sprintf("%#v: %#v,", k, this.StringToEnumMap[k]) + } + mapStringForStringToEnumMap += "}" + if this.StringToEnumMap != nil { + s = append(s, "StringToEnumMap: "+mapStringForStringToEnumMap+",\n") + } + keysForStringToMsgMap := make([]string, 0, len(this.StringToMsgMap)) + for k := range this.StringToMsgMap { + keysForStringToMsgMap = append(keysForStringToMsgMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToMsgMap) + mapStringForStringToMsgMap := "map[string]*FloatingPoint{" + for _, k := range keysForStringToMsgMap { + mapStringForStringToMsgMap += fmt.Sprintf("%#v: %#v,", k, this.StringToMsgMap[k]) + } + mapStringForStringToMsgMap += "}" + if this.StringToMsgMap != nil { + s = append(s, "StringToMsgMap: "+mapStringForStringToMsgMap+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *AllMapsOrdered) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 21) + s = append(s, "&theproto3.AllMapsOrdered{") + keysForStringToDoubleMap := make([]string, 0, len(this.StringToDoubleMap)) + for k := range this.StringToDoubleMap { + keysForStringToDoubleMap = append(keysForStringToDoubleMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToDoubleMap) + mapStringForStringToDoubleMap := "map[string]float64{" + for _, k := range keysForStringToDoubleMap { + mapStringForStringToDoubleMap += fmt.Sprintf("%#v: %#v,", k, this.StringToDoubleMap[k]) + } + mapStringForStringToDoubleMap += "}" + if this.StringToDoubleMap != nil { + s = append(s, "StringToDoubleMap: "+mapStringForStringToDoubleMap+",\n") + } + keysForStringToFloatMap := make([]string, 0, len(this.StringToFloatMap)) + for k := range this.StringToFloatMap { + keysForStringToFloatMap = append(keysForStringToFloatMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToFloatMap) + mapStringForStringToFloatMap := "map[string]float32{" + for _, k := range keysForStringToFloatMap { + mapStringForStringToFloatMap += fmt.Sprintf("%#v: %#v,", k, this.StringToFloatMap[k]) + } + mapStringForStringToFloatMap += "}" + if this.StringToFloatMap != nil { + s = append(s, "StringToFloatMap: "+mapStringForStringToFloatMap+",\n") + } + keysForInt32Map := make([]int32, 0, len(this.Int32Map)) + for k := range this.Int32Map { + keysForInt32Map = append(keysForInt32Map, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForInt32Map) + mapStringForInt32Map := "map[int32]int32{" + for _, k := range keysForInt32Map { + mapStringForInt32Map += fmt.Sprintf("%#v: %#v,", k, this.Int32Map[k]) + } + mapStringForInt32Map += "}" + if this.Int32Map != nil { + s = append(s, "Int32Map: "+mapStringForInt32Map+",\n") + } + keysForInt64Map := make([]int64, 0, len(this.Int64Map)) + for k := range this.Int64Map { + keysForInt64Map = append(keysForInt64Map, k) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForInt64Map) + mapStringForInt64Map := "map[int64]int64{" + for _, k := range keysForInt64Map { + mapStringForInt64Map += fmt.Sprintf("%#v: %#v,", k, this.Int64Map[k]) + } + mapStringForInt64Map += "}" + if this.Int64Map != nil { + s = append(s, "Int64Map: "+mapStringForInt64Map+",\n") + } + keysForUint32Map := make([]uint32, 0, len(this.Uint32Map)) + for k := range this.Uint32Map { + keysForUint32Map = append(keysForUint32Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint32s(keysForUint32Map) + mapStringForUint32Map := "map[uint32]uint32{" + for _, k := range keysForUint32Map { + mapStringForUint32Map += fmt.Sprintf("%#v: %#v,", k, this.Uint32Map[k]) + } + mapStringForUint32Map += "}" + if this.Uint32Map != nil { + s = append(s, "Uint32Map: "+mapStringForUint32Map+",\n") + } + keysForUint64Map := make([]uint64, 0, len(this.Uint64Map)) + for k := range this.Uint64Map { + keysForUint64Map = append(keysForUint64Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint64s(keysForUint64Map) + mapStringForUint64Map := "map[uint64]uint64{" + for _, k := range keysForUint64Map { + mapStringForUint64Map += fmt.Sprintf("%#v: %#v,", k, this.Uint64Map[k]) + } + mapStringForUint64Map += "}" + if this.Uint64Map != nil { + s = append(s, "Uint64Map: "+mapStringForUint64Map+",\n") + } + keysForSint32Map := make([]int32, 0, len(this.Sint32Map)) + for k := range this.Sint32Map { + keysForSint32Map = append(keysForSint32Map, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForSint32Map) + mapStringForSint32Map := "map[int32]int32{" + for _, k := range keysForSint32Map { + mapStringForSint32Map += fmt.Sprintf("%#v: %#v,", k, this.Sint32Map[k]) + } + mapStringForSint32Map += "}" + if this.Sint32Map != nil { + s = append(s, "Sint32Map: "+mapStringForSint32Map+",\n") + } + keysForSint64Map := make([]int64, 0, len(this.Sint64Map)) + for k := range this.Sint64Map { + keysForSint64Map = append(keysForSint64Map, k) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForSint64Map) + mapStringForSint64Map := "map[int64]int64{" + for _, k := range keysForSint64Map { + mapStringForSint64Map += fmt.Sprintf("%#v: %#v,", k, this.Sint64Map[k]) + } + mapStringForSint64Map += "}" + if this.Sint64Map != nil { + s = append(s, "Sint64Map: "+mapStringForSint64Map+",\n") + } + keysForFixed32Map := make([]uint32, 0, len(this.Fixed32Map)) + for k := range this.Fixed32Map { + keysForFixed32Map = append(keysForFixed32Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint32s(keysForFixed32Map) + mapStringForFixed32Map := "map[uint32]uint32{" + for _, k := range keysForFixed32Map { + mapStringForFixed32Map += fmt.Sprintf("%#v: %#v,", k, this.Fixed32Map[k]) + } + mapStringForFixed32Map += "}" + if this.Fixed32Map != nil { + s = append(s, "Fixed32Map: "+mapStringForFixed32Map+",\n") + } + keysForSfixed32Map := make([]int32, 0, len(this.Sfixed32Map)) + for k := range this.Sfixed32Map { + keysForSfixed32Map = append(keysForSfixed32Map, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForSfixed32Map) + mapStringForSfixed32Map := "map[int32]int32{" + for _, k := range keysForSfixed32Map { + mapStringForSfixed32Map += fmt.Sprintf("%#v: %#v,", k, this.Sfixed32Map[k]) + } + mapStringForSfixed32Map += "}" + if this.Sfixed32Map != nil { + s = append(s, "Sfixed32Map: "+mapStringForSfixed32Map+",\n") + } + keysForFixed64Map := make([]uint64, 0, len(this.Fixed64Map)) + for k := range this.Fixed64Map { + keysForFixed64Map = append(keysForFixed64Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint64s(keysForFixed64Map) + mapStringForFixed64Map := "map[uint64]uint64{" + for _, k := range keysForFixed64Map { + mapStringForFixed64Map += fmt.Sprintf("%#v: %#v,", k, this.Fixed64Map[k]) + } + mapStringForFixed64Map += "}" + if this.Fixed64Map != nil { + s = append(s, "Fixed64Map: "+mapStringForFixed64Map+",\n") + } + keysForSfixed64Map := make([]int64, 0, len(this.Sfixed64Map)) + for k := range this.Sfixed64Map { + keysForSfixed64Map = append(keysForSfixed64Map, k) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForSfixed64Map) + mapStringForSfixed64Map := "map[int64]int64{" + for _, k := range keysForSfixed64Map { + mapStringForSfixed64Map += fmt.Sprintf("%#v: %#v,", k, this.Sfixed64Map[k]) + } + mapStringForSfixed64Map += "}" + if this.Sfixed64Map != nil { + s = append(s, "Sfixed64Map: "+mapStringForSfixed64Map+",\n") + } + keysForBoolMap := make([]bool, 0, len(this.BoolMap)) + for k := range this.BoolMap { + keysForBoolMap = append(keysForBoolMap, k) + } + github_com_gogo_protobuf_sortkeys.Bools(keysForBoolMap) + mapStringForBoolMap := "map[bool]bool{" + for _, k := range keysForBoolMap { + mapStringForBoolMap += fmt.Sprintf("%#v: %#v,", k, this.BoolMap[k]) + } + mapStringForBoolMap += "}" + if this.BoolMap != nil { + s = append(s, "BoolMap: "+mapStringForBoolMap+",\n") + } + keysForStringMap := make([]string, 0, len(this.StringMap)) + for k := range this.StringMap { + keysForStringMap = append(keysForStringMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringMap) + mapStringForStringMap := "map[string]string{" + for _, k := range keysForStringMap { + mapStringForStringMap += fmt.Sprintf("%#v: %#v,", k, this.StringMap[k]) + } + mapStringForStringMap += "}" + if this.StringMap != nil { + s = append(s, "StringMap: "+mapStringForStringMap+",\n") + } + keysForStringToBytesMap := make([]string, 0, len(this.StringToBytesMap)) + for k := range this.StringToBytesMap { + keysForStringToBytesMap = append(keysForStringToBytesMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToBytesMap) + mapStringForStringToBytesMap := "map[string][]byte{" + for _, k := range keysForStringToBytesMap { + mapStringForStringToBytesMap += fmt.Sprintf("%#v: %#v,", k, this.StringToBytesMap[k]) + } + mapStringForStringToBytesMap += "}" + if this.StringToBytesMap != nil { + s = append(s, "StringToBytesMap: "+mapStringForStringToBytesMap+",\n") + } + keysForStringToEnumMap := make([]string, 0, len(this.StringToEnumMap)) + for k := range this.StringToEnumMap { + keysForStringToEnumMap = append(keysForStringToEnumMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToEnumMap) + mapStringForStringToEnumMap := "map[string]MapEnum{" + for _, k := range keysForStringToEnumMap { + mapStringForStringToEnumMap += fmt.Sprintf("%#v: %#v,", k, this.StringToEnumMap[k]) + } + mapStringForStringToEnumMap += "}" + if this.StringToEnumMap != nil { + s = append(s, "StringToEnumMap: "+mapStringForStringToEnumMap+",\n") + } + keysForStringToMsgMap := make([]string, 0, len(this.StringToMsgMap)) + for k := range this.StringToMsgMap { + keysForStringToMsgMap = append(keysForStringToMsgMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToMsgMap) + mapStringForStringToMsgMap := "map[string]*FloatingPoint{" + for _, k := range keysForStringToMsgMap { + mapStringForStringToMsgMap += fmt.Sprintf("%#v: %#v,", k, this.StringToMsgMap[k]) + } + mapStringForStringToMsgMap += "}" + if this.StringToMsgMap != nil { + s = append(s, "StringToMsgMap: "+mapStringForStringToMsgMap+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *MessageWithMap) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 7) + s = append(s, "&theproto3.MessageWithMap{") + keysForNameMapping := make([]int32, 0, len(this.NameMapping)) + for k := range this.NameMapping { + keysForNameMapping = append(keysForNameMapping, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForNameMapping) + mapStringForNameMapping := "map[int32]string{" + for _, k := range keysForNameMapping { + mapStringForNameMapping += fmt.Sprintf("%#v: %#v,", k, this.NameMapping[k]) + } + mapStringForNameMapping += "}" + if this.NameMapping != nil { + s = append(s, "NameMapping: "+mapStringForNameMapping+",\n") + } + keysForMsgMapping := make([]int64, 0, len(this.MsgMapping)) + for k := range this.MsgMapping { + keysForMsgMapping = append(keysForMsgMapping, k) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForMsgMapping) + mapStringForMsgMapping := "map[int64]*FloatingPoint{" + for _, k := range keysForMsgMapping { + mapStringForMsgMapping += fmt.Sprintf("%#v: %#v,", k, this.MsgMapping[k]) + } + mapStringForMsgMapping += "}" + if this.MsgMapping != nil { + s = append(s, "MsgMapping: "+mapStringForMsgMapping+",\n") + } + keysForByteMapping := make([]bool, 0, len(this.ByteMapping)) + for k := range this.ByteMapping { + keysForByteMapping = append(keysForByteMapping, k) + } + github_com_gogo_protobuf_sortkeys.Bools(keysForByteMapping) + mapStringForByteMapping := "map[bool][]byte{" + for _, k := range keysForByteMapping { + mapStringForByteMapping += fmt.Sprintf("%#v: %#v,", k, this.ByteMapping[k]) + } + mapStringForByteMapping += "}" + if this.ByteMapping != nil { + s = append(s, "ByteMapping: "+mapStringForByteMapping+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *FloatingPoint) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&theproto3.FloatingPoint{") + s = append(s, "F: "+fmt.Sprintf("%#v", this.F)+",\n") + s = append(s, "}") + return strings.Join(s, "") +} +func (this *Uint128Pair) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 6) + s = append(s, "&theproto3.Uint128Pair{") + s = append(s, "Left: "+fmt.Sprintf("%#v", this.Left)+",\n") + s = append(s, "Right: "+fmt.Sprintf("%#v", this.Right)+",\n") + s = append(s, "}") + return strings.Join(s, "") +} +func (this *ContainsNestedMap) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 4) + s = append(s, "&theproto3.ContainsNestedMap{") + s = append(s, "}") + return strings.Join(s, "") +} +func (this *ContainsNestedMap_NestedMap) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&theproto3.ContainsNestedMap_NestedMap{") + keysForNestedMapField := make([]string, 0, len(this.NestedMapField)) + for k := range this.NestedMapField { + keysForNestedMapField = append(keysForNestedMapField, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForNestedMapField) + mapStringForNestedMapField := "map[string]float64{" + for _, k := range keysForNestedMapField { + mapStringForNestedMapField += fmt.Sprintf("%#v: %#v,", k, this.NestedMapField[k]) + } + mapStringForNestedMapField += "}" + if this.NestedMapField != nil { + s = append(s, "NestedMapField: "+mapStringForNestedMapField+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func valueToGoStringTheproto3(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 extensionToGoStringTheproto3(e map[int32]github_com_gogo_protobuf_proto.Extension) string { + if e == nil { + return "nil" + } + s := "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 +} +func NewPopulatedMessage(r randyTheproto3, easy bool) *Message { + this := &Message{} + this.Name = randStringTheproto3(r) + this.Hilarity = Message_Humour([]int32{0, 1, 2, 3}[r.Intn(4)]) + this.HeightInCm = uint32(r.Uint32()) + v1 := r.Intn(100) + this.Data = make([]byte, v1) + for i := 0; i < v1; i++ { + this.Data[i] = byte(r.Intn(256)) + } + this.ResultCount = int64(r.Int63()) + if r.Intn(2) == 0 { + this.ResultCount *= -1 + } + this.TrueScotsman = bool(bool(r.Intn(2) == 0)) + this.Score = float32(r.Float32()) + if r.Intn(2) == 0 { + this.Score *= -1 + } + v2 := r.Intn(10) + this.Key = make([]uint64, v2) + for i := 0; i < v2; i++ { + this.Key[i] = uint64(uint64(r.Uint32())) + } + if r.Intn(10) != 0 { + this.Nested = NewPopulatedNested(r, easy) + } + if r.Intn(10) != 0 { + v3 := r.Intn(10) + this.Terrain = make(map[int64]*Nested) + for i := 0; i < v3; i++ { + this.Terrain[int64(r.Int63())] = NewPopulatedNested(r, easy) + } + } + if r.Intn(10) != 0 { + this.Proto2Field = test.NewPopulatedNinOptNative(r, easy) + } + if r.Intn(10) != 0 { + v4 := r.Intn(10) + this.Proto2Value = make(map[int64]*test.NinOptEnum) + for i := 0; i < v4; i++ { + this.Proto2Value[int64(r.Int63())] = test.NewPopulatedNinOptEnum(r, easy) + } + } + if !easy && r.Intn(10) != 0 { + } + return this +} + +func NewPopulatedNested(r randyTheproto3, easy bool) *Nested { + this := &Nested{} + this.Bunny = randStringTheproto3(r) + if !easy && r.Intn(10) != 0 { + } + return this +} + +func NewPopulatedAllMaps(r randyTheproto3, easy bool) *AllMaps { + this := &AllMaps{} + if r.Intn(10) != 0 { + v5 := r.Intn(10) + this.StringToDoubleMap = make(map[string]float64) + for i := 0; i < v5; i++ { + v6 := randStringTheproto3(r) + this.StringToDoubleMap[v6] = float64(r.Float64()) + if r.Intn(2) == 0 { + this.StringToDoubleMap[v6] *= -1 + } + } + } + if r.Intn(10) != 0 { + v7 := r.Intn(10) + this.StringToFloatMap = make(map[string]float32) + for i := 0; i < v7; i++ { + v8 := randStringTheproto3(r) + this.StringToFloatMap[v8] = float32(r.Float32()) + if r.Intn(2) == 0 { + this.StringToFloatMap[v8] *= -1 + } + } + } + if r.Intn(10) != 0 { + v9 := r.Intn(10) + this.Int32Map = make(map[int32]int32) + for i := 0; i < v9; i++ { + v10 := int32(r.Int31()) + this.Int32Map[v10] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Int32Map[v10] *= -1 + } + } + } + if r.Intn(10) != 0 { + v11 := r.Intn(10) + this.Int64Map = make(map[int64]int64) + for i := 0; i < v11; i++ { + v12 := int64(r.Int63()) + this.Int64Map[v12] = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Int64Map[v12] *= -1 + } + } + } + if r.Intn(10) != 0 { + v13 := r.Intn(10) + this.Uint32Map = make(map[uint32]uint32) + for i := 0; i < v13; i++ { + v14 := uint32(r.Uint32()) + this.Uint32Map[v14] = uint32(r.Uint32()) + } + } + if r.Intn(10) != 0 { + v15 := r.Intn(10) + this.Uint64Map = make(map[uint64]uint64) + for i := 0; i < v15; i++ { + v16 := uint64(uint64(r.Uint32())) + this.Uint64Map[v16] = uint64(uint64(r.Uint32())) + } + } + if r.Intn(10) != 0 { + v17 := r.Intn(10) + this.Sint32Map = make(map[int32]int32) + for i := 0; i < v17; i++ { + v18 := int32(r.Int31()) + this.Sint32Map[v18] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Sint32Map[v18] *= -1 + } + } + } + if r.Intn(10) != 0 { + v19 := r.Intn(10) + this.Sint64Map = make(map[int64]int64) + for i := 0; i < v19; i++ { + v20 := int64(r.Int63()) + this.Sint64Map[v20] = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Sint64Map[v20] *= -1 + } + } + } + if r.Intn(10) != 0 { + v21 := r.Intn(10) + this.Fixed32Map = make(map[uint32]uint32) + for i := 0; i < v21; i++ { + v22 := uint32(r.Uint32()) + this.Fixed32Map[v22] = uint32(r.Uint32()) + } + } + if r.Intn(10) != 0 { + v23 := r.Intn(10) + this.Sfixed32Map = make(map[int32]int32) + for i := 0; i < v23; i++ { + v24 := int32(r.Int31()) + this.Sfixed32Map[v24] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Sfixed32Map[v24] *= -1 + } + } + } + if r.Intn(10) != 0 { + v25 := r.Intn(10) + this.Fixed64Map = make(map[uint64]uint64) + for i := 0; i < v25; i++ { + v26 := uint64(uint64(r.Uint32())) + this.Fixed64Map[v26] = uint64(uint64(r.Uint32())) + } + } + if r.Intn(10) != 0 { + v27 := r.Intn(10) + this.Sfixed64Map = make(map[int64]int64) + for i := 0; i < v27; i++ { + v28 := int64(r.Int63()) + this.Sfixed64Map[v28] = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Sfixed64Map[v28] *= -1 + } + } + } + if r.Intn(10) != 0 { + v29 := r.Intn(10) + this.BoolMap = make(map[bool]bool) + for i := 0; i < v29; i++ { + v30 := bool(bool(r.Intn(2) == 0)) + this.BoolMap[v30] = bool(bool(r.Intn(2) == 0)) + } + } + if r.Intn(10) != 0 { + v31 := r.Intn(10) + this.StringMap = make(map[string]string) + for i := 0; i < v31; i++ { + this.StringMap[randStringTheproto3(r)] = randStringTheproto3(r) + } + } + if r.Intn(10) != 0 { + v32 := r.Intn(10) + this.StringToBytesMap = make(map[string][]byte) + for i := 0; i < v32; i++ { + v33 := r.Intn(100) + v34 := randStringTheproto3(r) + this.StringToBytesMap[v34] = make([]byte, v33) + for i := 0; i < v33; i++ { + this.StringToBytesMap[v34][i] = byte(r.Intn(256)) + } + } + } + if r.Intn(10) != 0 { + v35 := r.Intn(10) + this.StringToEnumMap = make(map[string]MapEnum) + for i := 0; i < v35; i++ { + this.StringToEnumMap[randStringTheproto3(r)] = MapEnum([]int32{0, 1, 2}[r.Intn(3)]) + } + } + if r.Intn(10) != 0 { + v36 := r.Intn(10) + this.StringToMsgMap = make(map[string]*FloatingPoint) + for i := 0; i < v36; i++ { + this.StringToMsgMap[randStringTheproto3(r)] = NewPopulatedFloatingPoint(r, easy) + } + } + if !easy && r.Intn(10) != 0 { + } + return this +} + +func NewPopulatedAllMapsOrdered(r randyTheproto3, easy bool) *AllMapsOrdered { + this := &AllMapsOrdered{} + if r.Intn(10) != 0 { + v37 := r.Intn(10) + this.StringToDoubleMap = make(map[string]float64) + for i := 0; i < v37; i++ { + v38 := randStringTheproto3(r) + this.StringToDoubleMap[v38] = float64(r.Float64()) + if r.Intn(2) == 0 { + this.StringToDoubleMap[v38] *= -1 + } + } + } + if r.Intn(10) != 0 { + v39 := r.Intn(10) + this.StringToFloatMap = make(map[string]float32) + for i := 0; i < v39; i++ { + v40 := randStringTheproto3(r) + this.StringToFloatMap[v40] = float32(r.Float32()) + if r.Intn(2) == 0 { + this.StringToFloatMap[v40] *= -1 + } + } + } + if r.Intn(10) != 0 { + v41 := r.Intn(10) + this.Int32Map = make(map[int32]int32) + for i := 0; i < v41; i++ { + v42 := int32(r.Int31()) + this.Int32Map[v42] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Int32Map[v42] *= -1 + } + } + } + if r.Intn(10) != 0 { + v43 := r.Intn(10) + this.Int64Map = make(map[int64]int64) + for i := 0; i < v43; i++ { + v44 := int64(r.Int63()) + this.Int64Map[v44] = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Int64Map[v44] *= -1 + } + } + } + if r.Intn(10) != 0 { + v45 := r.Intn(10) + this.Uint32Map = make(map[uint32]uint32) + for i := 0; i < v45; i++ { + v46 := uint32(r.Uint32()) + this.Uint32Map[v46] = uint32(r.Uint32()) + } + } + if r.Intn(10) != 0 { + v47 := r.Intn(10) + this.Uint64Map = make(map[uint64]uint64) + for i := 0; i < v47; i++ { + v48 := uint64(uint64(r.Uint32())) + this.Uint64Map[v48] = uint64(uint64(r.Uint32())) + } + } + if r.Intn(10) != 0 { + v49 := r.Intn(10) + this.Sint32Map = make(map[int32]int32) + for i := 0; i < v49; i++ { + v50 := int32(r.Int31()) + this.Sint32Map[v50] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Sint32Map[v50] *= -1 + } + } + } + if r.Intn(10) != 0 { + v51 := r.Intn(10) + this.Sint64Map = make(map[int64]int64) + for i := 0; i < v51; i++ { + v52 := int64(r.Int63()) + this.Sint64Map[v52] = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Sint64Map[v52] *= -1 + } + } + } + if r.Intn(10) != 0 { + v53 := r.Intn(10) + this.Fixed32Map = make(map[uint32]uint32) + for i := 0; i < v53; i++ { + v54 := uint32(r.Uint32()) + this.Fixed32Map[v54] = uint32(r.Uint32()) + } + } + if r.Intn(10) != 0 { + v55 := r.Intn(10) + this.Sfixed32Map = make(map[int32]int32) + for i := 0; i < v55; i++ { + v56 := int32(r.Int31()) + this.Sfixed32Map[v56] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Sfixed32Map[v56] *= -1 + } + } + } + if r.Intn(10) != 0 { + v57 := r.Intn(10) + this.Fixed64Map = make(map[uint64]uint64) + for i := 0; i < v57; i++ { + v58 := uint64(uint64(r.Uint32())) + this.Fixed64Map[v58] = uint64(uint64(r.Uint32())) + } + } + if r.Intn(10) != 0 { + v59 := r.Intn(10) + this.Sfixed64Map = make(map[int64]int64) + for i := 0; i < v59; i++ { + v60 := int64(r.Int63()) + this.Sfixed64Map[v60] = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Sfixed64Map[v60] *= -1 + } + } + } + if r.Intn(10) != 0 { + v61 := r.Intn(10) + this.BoolMap = make(map[bool]bool) + for i := 0; i < v61; i++ { + v62 := bool(bool(r.Intn(2) == 0)) + this.BoolMap[v62] = bool(bool(r.Intn(2) == 0)) + } + } + if r.Intn(10) != 0 { + v63 := r.Intn(10) + this.StringMap = make(map[string]string) + for i := 0; i < v63; i++ { + this.StringMap[randStringTheproto3(r)] = randStringTheproto3(r) + } + } + if r.Intn(10) != 0 { + v64 := r.Intn(10) + this.StringToBytesMap = make(map[string][]byte) + for i := 0; i < v64; i++ { + v65 := r.Intn(100) + v66 := randStringTheproto3(r) + this.StringToBytesMap[v66] = make([]byte, v65) + for i := 0; i < v65; i++ { + this.StringToBytesMap[v66][i] = byte(r.Intn(256)) + } + } + } + if r.Intn(10) != 0 { + v67 := r.Intn(10) + this.StringToEnumMap = make(map[string]MapEnum) + for i := 0; i < v67; i++ { + this.StringToEnumMap[randStringTheproto3(r)] = MapEnum([]int32{0, 1, 2}[r.Intn(3)]) + } + } + if r.Intn(10) != 0 { + v68 := r.Intn(10) + this.StringToMsgMap = make(map[string]*FloatingPoint) + for i := 0; i < v68; i++ { + this.StringToMsgMap[randStringTheproto3(r)] = NewPopulatedFloatingPoint(r, easy) + } + } + if !easy && r.Intn(10) != 0 { + } + return this +} + +func NewPopulatedMessageWithMap(r randyTheproto3, easy bool) *MessageWithMap { + this := &MessageWithMap{} + if r.Intn(10) != 0 { + v69 := r.Intn(10) + this.NameMapping = make(map[int32]string) + for i := 0; i < v69; i++ { + this.NameMapping[int32(r.Int31())] = randStringTheproto3(r) + } + } + if r.Intn(10) != 0 { + v70 := r.Intn(10) + this.MsgMapping = make(map[int64]*FloatingPoint) + for i := 0; i < v70; i++ { + this.MsgMapping[int64(r.Int63())] = NewPopulatedFloatingPoint(r, easy) + } + } + if r.Intn(10) != 0 { + v71 := r.Intn(10) + this.ByteMapping = make(map[bool][]byte) + for i := 0; i < v71; i++ { + v72 := r.Intn(100) + v73 := bool(bool(r.Intn(2) == 0)) + this.ByteMapping[v73] = make([]byte, v72) + for i := 0; i < v72; i++ { + this.ByteMapping[v73][i] = byte(r.Intn(256)) + } + } + } + if !easy && r.Intn(10) != 0 { + } + return this +} + +func NewPopulatedFloatingPoint(r randyTheproto3, easy bool) *FloatingPoint { + this := &FloatingPoint{} + this.F = float64(r.Float64()) + if r.Intn(2) == 0 { + this.F *= -1 + } + if !easy && r.Intn(10) != 0 { + } + return this +} + +func NewPopulatedUint128Pair(r randyTheproto3, easy bool) *Uint128Pair { + this := &Uint128Pair{} + v74 := github_com_gogo_protobuf_test_custom.NewPopulatedUint128(r) + this.Left = *v74 + this.Right = github_com_gogo_protobuf_test_custom.NewPopulatedUint128(r) + if !easy && r.Intn(10) != 0 { + } + return this +} + +func NewPopulatedContainsNestedMap(r randyTheproto3, easy bool) *ContainsNestedMap { + this := &ContainsNestedMap{} + if !easy && r.Intn(10) != 0 { + } + return this +} + +func NewPopulatedContainsNestedMap_NestedMap(r randyTheproto3, easy bool) *ContainsNestedMap_NestedMap { + this := &ContainsNestedMap_NestedMap{} + if r.Intn(10) != 0 { + v75 := r.Intn(10) + this.NestedMapField = make(map[string]float64) + for i := 0; i < v75; i++ { + v76 := randStringTheproto3(r) + this.NestedMapField[v76] = float64(r.Float64()) + if r.Intn(2) == 0 { + this.NestedMapField[v76] *= -1 + } + } + } + if !easy && r.Intn(10) != 0 { + } + return this +} + +type randyTheproto3 interface { + Float32() float32 + Float64() float64 + Int63() int64 + Int31() int32 + Uint32() uint32 + Intn(n int) int +} + +func randUTF8RuneTheproto3(r randyTheproto3) 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 randStringTheproto3(r randyTheproto3) string { + v77 := r.Intn(100) + tmps := make([]rune, v77) + for i := 0; i < v77; i++ { + tmps[i] = randUTF8RuneTheproto3(r) + } + return string(tmps) +} +func randUnrecognizedTheproto3(r randyTheproto3, 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 = randFieldTheproto3(data, r, fieldNumber, wire) + } + return data +} +func randFieldTheproto3(data []byte, r randyTheproto3, fieldNumber int, wire int) []byte { + key := uint32(fieldNumber)<<3 | uint32(wire) + switch wire { + case 0: + data = encodeVarintPopulateTheproto3(data, uint64(key)) + v78 := r.Int63() + if r.Intn(2) == 0 { + v78 *= -1 + } + data = encodeVarintPopulateTheproto3(data, uint64(v78)) + case 1: + data = encodeVarintPopulateTheproto3(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 = encodeVarintPopulateTheproto3(data, uint64(key)) + ll := r.Intn(100) + data = encodeVarintPopulateTheproto3(data, uint64(ll)) + for j := 0; j < ll; j++ { + data = append(data, byte(r.Intn(256))) + } + default: + data = encodeVarintPopulateTheproto3(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 encodeVarintPopulateTheproto3(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 *Message) Size() (n int) { + var l int + _ = l + l = len(m.Name) + if l > 0 { + n += 1 + l + sovTheproto3(uint64(l)) + } + if m.Hilarity != 0 { + n += 1 + sovTheproto3(uint64(m.Hilarity)) + } + if m.HeightInCm != 0 { + n += 1 + sovTheproto3(uint64(m.HeightInCm)) + } + l = len(m.Data) + if l > 0 { + n += 1 + l + sovTheproto3(uint64(l)) + } + if m.ResultCount != 0 { + n += 1 + sovTheproto3(uint64(m.ResultCount)) + } + if m.TrueScotsman { + n += 2 + } + if m.Score != 0 { + n += 5 + } + if len(m.Key) > 0 { + for _, e := range m.Key { + n += 1 + sovTheproto3(uint64(e)) + } + } + if m.Nested != nil { + l = m.Nested.Size() + n += 1 + l + sovTheproto3(uint64(l)) + } + if len(m.Terrain) > 0 { + for k, v := range m.Terrain { + _ = k + _ = v + l = 0 + if v != nil { + l = v.Size() + } + mapEntrySize := 1 + sovTheproto3(uint64(k)) + 1 + l + sovTheproto3(uint64(l)) + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if m.Proto2Field != nil { + l = m.Proto2Field.Size() + n += 1 + l + sovTheproto3(uint64(l)) + } + if len(m.Proto2Value) > 0 { + for k, v := range m.Proto2Value { + _ = k + _ = v + l = 0 + if v != nil { + l = v.Size() + } + mapEntrySize := 1 + sovTheproto3(uint64(k)) + 1 + l + sovTheproto3(uint64(l)) + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + return n +} + +func (m *Nested) Size() (n int) { + var l int + _ = l + l = len(m.Bunny) + if l > 0 { + n += 1 + l + sovTheproto3(uint64(l)) + } + return n +} + +func (m *AllMaps) Size() (n int) { + var l int + _ = l + if len(m.StringToDoubleMap) > 0 { + for k, v := range m.StringToDoubleMap { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovTheproto3(uint64(len(k))) + 1 + 8 + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.StringToFloatMap) > 0 { + for k, v := range m.StringToFloatMap { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovTheproto3(uint64(len(k))) + 1 + 4 + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.Int32Map) > 0 { + for k, v := range m.Int32Map { + _ = k + _ = v + mapEntrySize := 1 + sovTheproto3(uint64(k)) + 1 + sovTheproto3(uint64(v)) + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.Int64Map) > 0 { + for k, v := range m.Int64Map { + _ = k + _ = v + mapEntrySize := 1 + sovTheproto3(uint64(k)) + 1 + sovTheproto3(uint64(v)) + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.Uint32Map) > 0 { + for k, v := range m.Uint32Map { + _ = k + _ = v + mapEntrySize := 1 + sovTheproto3(uint64(k)) + 1 + sovTheproto3(uint64(v)) + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.Uint64Map) > 0 { + for k, v := range m.Uint64Map { + _ = k + _ = v + mapEntrySize := 1 + sovTheproto3(uint64(k)) + 1 + sovTheproto3(uint64(v)) + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.Sint32Map) > 0 { + for k, v := range m.Sint32Map { + _ = k + _ = v + mapEntrySize := 1 + sozTheproto3(uint64(k)) + 1 + sozTheproto3(uint64(v)) + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.Sint64Map) > 0 { + for k, v := range m.Sint64Map { + _ = k + _ = v + mapEntrySize := 1 + sozTheproto3(uint64(k)) + 1 + sozTheproto3(uint64(v)) + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.Fixed32Map) > 0 { + for k, v := range m.Fixed32Map { + _ = k + _ = v + mapEntrySize := 1 + 4 + 1 + 4 + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.Sfixed32Map) > 0 { + for k, v := range m.Sfixed32Map { + _ = k + _ = v + mapEntrySize := 1 + 4 + 1 + 4 + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.Fixed64Map) > 0 { + for k, v := range m.Fixed64Map { + _ = k + _ = v + mapEntrySize := 1 + 8 + 1 + 8 + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.Sfixed64Map) > 0 { + for k, v := range m.Sfixed64Map { + _ = k + _ = v + mapEntrySize := 1 + 8 + 1 + 8 + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.BoolMap) > 0 { + for k, v := range m.BoolMap { + _ = k + _ = v + mapEntrySize := 1 + 1 + 1 + 1 + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.StringMap) > 0 { + for k, v := range m.StringMap { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovTheproto3(uint64(len(k))) + 1 + len(v) + sovTheproto3(uint64(len(v))) + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.StringToBytesMap) > 0 { + for k, v := range m.StringToBytesMap { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovTheproto3(uint64(len(k))) + 1 + len(v) + sovTheproto3(uint64(len(v))) + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.StringToEnumMap) > 0 { + for k, v := range m.StringToEnumMap { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovTheproto3(uint64(len(k))) + 1 + sovTheproto3(uint64(v)) + n += mapEntrySize + 2 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.StringToMsgMap) > 0 { + for k, v := range m.StringToMsgMap { + _ = k + _ = v + l = 0 + if v != nil { + l = v.Size() + } + mapEntrySize := 1 + len(k) + sovTheproto3(uint64(len(k))) + 1 + l + sovTheproto3(uint64(l)) + n += mapEntrySize + 2 + sovTheproto3(uint64(mapEntrySize)) + } + } + return n +} + +func (m *AllMapsOrdered) Size() (n int) { + var l int + _ = l + if len(m.StringToDoubleMap) > 0 { + for k, v := range m.StringToDoubleMap { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovTheproto3(uint64(len(k))) + 1 + 8 + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.StringToFloatMap) > 0 { + for k, v := range m.StringToFloatMap { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovTheproto3(uint64(len(k))) + 1 + 4 + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.Int32Map) > 0 { + for k, v := range m.Int32Map { + _ = k + _ = v + mapEntrySize := 1 + sovTheproto3(uint64(k)) + 1 + sovTheproto3(uint64(v)) + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.Int64Map) > 0 { + for k, v := range m.Int64Map { + _ = k + _ = v + mapEntrySize := 1 + sovTheproto3(uint64(k)) + 1 + sovTheproto3(uint64(v)) + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.Uint32Map) > 0 { + for k, v := range m.Uint32Map { + _ = k + _ = v + mapEntrySize := 1 + sovTheproto3(uint64(k)) + 1 + sovTheproto3(uint64(v)) + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.Uint64Map) > 0 { + for k, v := range m.Uint64Map { + _ = k + _ = v + mapEntrySize := 1 + sovTheproto3(uint64(k)) + 1 + sovTheproto3(uint64(v)) + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.Sint32Map) > 0 { + for k, v := range m.Sint32Map { + _ = k + _ = v + mapEntrySize := 1 + sozTheproto3(uint64(k)) + 1 + sozTheproto3(uint64(v)) + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.Sint64Map) > 0 { + for k, v := range m.Sint64Map { + _ = k + _ = v + mapEntrySize := 1 + sozTheproto3(uint64(k)) + 1 + sozTheproto3(uint64(v)) + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.Fixed32Map) > 0 { + for k, v := range m.Fixed32Map { + _ = k + _ = v + mapEntrySize := 1 + 4 + 1 + 4 + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.Sfixed32Map) > 0 { + for k, v := range m.Sfixed32Map { + _ = k + _ = v + mapEntrySize := 1 + 4 + 1 + 4 + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.Fixed64Map) > 0 { + for k, v := range m.Fixed64Map { + _ = k + _ = v + mapEntrySize := 1 + 8 + 1 + 8 + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.Sfixed64Map) > 0 { + for k, v := range m.Sfixed64Map { + _ = k + _ = v + mapEntrySize := 1 + 8 + 1 + 8 + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.BoolMap) > 0 { + for k, v := range m.BoolMap { + _ = k + _ = v + mapEntrySize := 1 + 1 + 1 + 1 + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.StringMap) > 0 { + for k, v := range m.StringMap { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovTheproto3(uint64(len(k))) + 1 + len(v) + sovTheproto3(uint64(len(v))) + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.StringToBytesMap) > 0 { + for k, v := range m.StringToBytesMap { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovTheproto3(uint64(len(k))) + 1 + len(v) + sovTheproto3(uint64(len(v))) + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.StringToEnumMap) > 0 { + for k, v := range m.StringToEnumMap { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovTheproto3(uint64(len(k))) + 1 + sovTheproto3(uint64(v)) + n += mapEntrySize + 2 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.StringToMsgMap) > 0 { + for k, v := range m.StringToMsgMap { + _ = k + _ = v + l = 0 + if v != nil { + l = v.Size() + } + mapEntrySize := 1 + len(k) + sovTheproto3(uint64(len(k))) + 1 + l + sovTheproto3(uint64(l)) + n += mapEntrySize + 2 + sovTheproto3(uint64(mapEntrySize)) + } + } + return n +} + +func (m *MessageWithMap) Size() (n int) { + var l int + _ = l + if len(m.NameMapping) > 0 { + for k, v := range m.NameMapping { + _ = k + _ = v + mapEntrySize := 1 + sovTheproto3(uint64(k)) + 1 + len(v) + sovTheproto3(uint64(len(v))) + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.MsgMapping) > 0 { + for k, v := range m.MsgMapping { + _ = k + _ = v + l = 0 + if v != nil { + l = v.Size() + } + mapEntrySize := 1 + sozTheproto3(uint64(k)) + 1 + l + sovTheproto3(uint64(l)) + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.ByteMapping) > 0 { + for k, v := range m.ByteMapping { + _ = k + _ = v + mapEntrySize := 1 + 1 + 1 + len(v) + sovTheproto3(uint64(len(v))) + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + return n +} + +func (m *FloatingPoint) Size() (n int) { + var l int + _ = l + if m.F != 0 { + n += 9 + } + return n +} + +func (m *Uint128Pair) Size() (n int) { + var l int + _ = l + l = m.Left.Size() + n += 1 + l + sovTheproto3(uint64(l)) + if m.Right != nil { + l = m.Right.Size() + n += 1 + l + sovTheproto3(uint64(l)) + } + return n +} + +func (m *ContainsNestedMap) Size() (n int) { + var l int + _ = l + return n +} + +func (m *ContainsNestedMap_NestedMap) Size() (n int) { + var l int + _ = l + if len(m.NestedMapField) > 0 { + for k, v := range m.NestedMapField { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovTheproto3(uint64(len(k))) + 1 + 8 + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + return n +} + +func sovTheproto3(x uint64) (n int) { + for { + n++ + x >>= 7 + if x == 0 { + break + } + } + return n +} +func sozTheproto3(x uint64) (n int) { + return sovTheproto3(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (this *Message) String() string { + if this == nil { + return "nil" + } + keysForTerrain := make([]int64, 0, len(this.Terrain)) + for k := range this.Terrain { + keysForTerrain = append(keysForTerrain, k) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForTerrain) + mapStringForTerrain := "map[int64]*Nested{" + for _, k := range keysForTerrain { + mapStringForTerrain += fmt.Sprintf("%v: %v,", k, this.Terrain[k]) + } + mapStringForTerrain += "}" + keysForProto2Value := make([]int64, 0, len(this.Proto2Value)) + for k := range this.Proto2Value { + keysForProto2Value = append(keysForProto2Value, k) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForProto2Value) + mapStringForProto2Value := "map[int64]*test.NinOptEnum{" + for _, k := range keysForProto2Value { + mapStringForProto2Value += fmt.Sprintf("%v: %v,", k, this.Proto2Value[k]) + } + mapStringForProto2Value += "}" + s := strings.Join([]string{`&Message{`, + `Name:` + fmt.Sprintf("%v", this.Name) + `,`, + `Hilarity:` + fmt.Sprintf("%v", this.Hilarity) + `,`, + `HeightInCm:` + fmt.Sprintf("%v", this.HeightInCm) + `,`, + `Data:` + fmt.Sprintf("%v", this.Data) + `,`, + `ResultCount:` + fmt.Sprintf("%v", this.ResultCount) + `,`, + `TrueScotsman:` + fmt.Sprintf("%v", this.TrueScotsman) + `,`, + `Score:` + fmt.Sprintf("%v", this.Score) + `,`, + `Key:` + fmt.Sprintf("%v", this.Key) + `,`, + `Nested:` + strings.Replace(fmt.Sprintf("%v", this.Nested), "Nested", "Nested", 1) + `,`, + `Terrain:` + mapStringForTerrain + `,`, + `Proto2Field:` + strings.Replace(fmt.Sprintf("%v", this.Proto2Field), "NinOptNative", "test.NinOptNative", 1) + `,`, + `Proto2Value:` + mapStringForProto2Value + `,`, + `}`, + }, "") + return s +} +func (this *Nested) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&Nested{`, + `Bunny:` + fmt.Sprintf("%v", this.Bunny) + `,`, + `}`, + }, "") + return s +} +func (this *AllMaps) String() string { + if this == nil { + return "nil" + } + keysForStringToDoubleMap := make([]string, 0, len(this.StringToDoubleMap)) + for k := range this.StringToDoubleMap { + keysForStringToDoubleMap = append(keysForStringToDoubleMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToDoubleMap) + mapStringForStringToDoubleMap := "map[string]float64{" + for _, k := range keysForStringToDoubleMap { + mapStringForStringToDoubleMap += fmt.Sprintf("%v: %v,", k, this.StringToDoubleMap[k]) + } + mapStringForStringToDoubleMap += "}" + keysForStringToFloatMap := make([]string, 0, len(this.StringToFloatMap)) + for k := range this.StringToFloatMap { + keysForStringToFloatMap = append(keysForStringToFloatMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToFloatMap) + mapStringForStringToFloatMap := "map[string]float32{" + for _, k := range keysForStringToFloatMap { + mapStringForStringToFloatMap += fmt.Sprintf("%v: %v,", k, this.StringToFloatMap[k]) + } + mapStringForStringToFloatMap += "}" + keysForInt32Map := make([]int32, 0, len(this.Int32Map)) + for k := range this.Int32Map { + keysForInt32Map = append(keysForInt32Map, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForInt32Map) + mapStringForInt32Map := "map[int32]int32{" + for _, k := range keysForInt32Map { + mapStringForInt32Map += fmt.Sprintf("%v: %v,", k, this.Int32Map[k]) + } + mapStringForInt32Map += "}" + keysForInt64Map := make([]int64, 0, len(this.Int64Map)) + for k := range this.Int64Map { + keysForInt64Map = append(keysForInt64Map, k) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForInt64Map) + mapStringForInt64Map := "map[int64]int64{" + for _, k := range keysForInt64Map { + mapStringForInt64Map += fmt.Sprintf("%v: %v,", k, this.Int64Map[k]) + } + mapStringForInt64Map += "}" + keysForUint32Map := make([]uint32, 0, len(this.Uint32Map)) + for k := range this.Uint32Map { + keysForUint32Map = append(keysForUint32Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint32s(keysForUint32Map) + mapStringForUint32Map := "map[uint32]uint32{" + for _, k := range keysForUint32Map { + mapStringForUint32Map += fmt.Sprintf("%v: %v,", k, this.Uint32Map[k]) + } + mapStringForUint32Map += "}" + keysForUint64Map := make([]uint64, 0, len(this.Uint64Map)) + for k := range this.Uint64Map { + keysForUint64Map = append(keysForUint64Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint64s(keysForUint64Map) + mapStringForUint64Map := "map[uint64]uint64{" + for _, k := range keysForUint64Map { + mapStringForUint64Map += fmt.Sprintf("%v: %v,", k, this.Uint64Map[k]) + } + mapStringForUint64Map += "}" + keysForSint32Map := make([]int32, 0, len(this.Sint32Map)) + for k := range this.Sint32Map { + keysForSint32Map = append(keysForSint32Map, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForSint32Map) + mapStringForSint32Map := "map[int32]int32{" + for _, k := range keysForSint32Map { + mapStringForSint32Map += fmt.Sprintf("%v: %v,", k, this.Sint32Map[k]) + } + mapStringForSint32Map += "}" + keysForSint64Map := make([]int64, 0, len(this.Sint64Map)) + for k := range this.Sint64Map { + keysForSint64Map = append(keysForSint64Map, k) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForSint64Map) + mapStringForSint64Map := "map[int64]int64{" + for _, k := range keysForSint64Map { + mapStringForSint64Map += fmt.Sprintf("%v: %v,", k, this.Sint64Map[k]) + } + mapStringForSint64Map += "}" + keysForFixed32Map := make([]uint32, 0, len(this.Fixed32Map)) + for k := range this.Fixed32Map { + keysForFixed32Map = append(keysForFixed32Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint32s(keysForFixed32Map) + mapStringForFixed32Map := "map[uint32]uint32{" + for _, k := range keysForFixed32Map { + mapStringForFixed32Map += fmt.Sprintf("%v: %v,", k, this.Fixed32Map[k]) + } + mapStringForFixed32Map += "}" + keysForSfixed32Map := make([]int32, 0, len(this.Sfixed32Map)) + for k := range this.Sfixed32Map { + keysForSfixed32Map = append(keysForSfixed32Map, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForSfixed32Map) + mapStringForSfixed32Map := "map[int32]int32{" + for _, k := range keysForSfixed32Map { + mapStringForSfixed32Map += fmt.Sprintf("%v: %v,", k, this.Sfixed32Map[k]) + } + mapStringForSfixed32Map += "}" + keysForFixed64Map := make([]uint64, 0, len(this.Fixed64Map)) + for k := range this.Fixed64Map { + keysForFixed64Map = append(keysForFixed64Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint64s(keysForFixed64Map) + mapStringForFixed64Map := "map[uint64]uint64{" + for _, k := range keysForFixed64Map { + mapStringForFixed64Map += fmt.Sprintf("%v: %v,", k, this.Fixed64Map[k]) + } + mapStringForFixed64Map += "}" + keysForSfixed64Map := make([]int64, 0, len(this.Sfixed64Map)) + for k := range this.Sfixed64Map { + keysForSfixed64Map = append(keysForSfixed64Map, k) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForSfixed64Map) + mapStringForSfixed64Map := "map[int64]int64{" + for _, k := range keysForSfixed64Map { + mapStringForSfixed64Map += fmt.Sprintf("%v: %v,", k, this.Sfixed64Map[k]) + } + mapStringForSfixed64Map += "}" + keysForBoolMap := make([]bool, 0, len(this.BoolMap)) + for k := range this.BoolMap { + keysForBoolMap = append(keysForBoolMap, k) + } + github_com_gogo_protobuf_sortkeys.Bools(keysForBoolMap) + mapStringForBoolMap := "map[bool]bool{" + for _, k := range keysForBoolMap { + mapStringForBoolMap += fmt.Sprintf("%v: %v,", k, this.BoolMap[k]) + } + mapStringForBoolMap += "}" + keysForStringMap := make([]string, 0, len(this.StringMap)) + for k := range this.StringMap { + keysForStringMap = append(keysForStringMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringMap) + mapStringForStringMap := "map[string]string{" + for _, k := range keysForStringMap { + mapStringForStringMap += fmt.Sprintf("%v: %v,", k, this.StringMap[k]) + } + mapStringForStringMap += "}" + keysForStringToBytesMap := make([]string, 0, len(this.StringToBytesMap)) + for k := range this.StringToBytesMap { + keysForStringToBytesMap = append(keysForStringToBytesMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToBytesMap) + mapStringForStringToBytesMap := "map[string][]byte{" + for _, k := range keysForStringToBytesMap { + mapStringForStringToBytesMap += fmt.Sprintf("%v: %v,", k, this.StringToBytesMap[k]) + } + mapStringForStringToBytesMap += "}" + keysForStringToEnumMap := make([]string, 0, len(this.StringToEnumMap)) + for k := range this.StringToEnumMap { + keysForStringToEnumMap = append(keysForStringToEnumMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToEnumMap) + mapStringForStringToEnumMap := "map[string]MapEnum{" + for _, k := range keysForStringToEnumMap { + mapStringForStringToEnumMap += fmt.Sprintf("%v: %v,", k, this.StringToEnumMap[k]) + } + mapStringForStringToEnumMap += "}" + keysForStringToMsgMap := make([]string, 0, len(this.StringToMsgMap)) + for k := range this.StringToMsgMap { + keysForStringToMsgMap = append(keysForStringToMsgMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToMsgMap) + mapStringForStringToMsgMap := "map[string]*FloatingPoint{" + for _, k := range keysForStringToMsgMap { + mapStringForStringToMsgMap += fmt.Sprintf("%v: %v,", k, this.StringToMsgMap[k]) + } + mapStringForStringToMsgMap += "}" + s := strings.Join([]string{`&AllMaps{`, + `StringToDoubleMap:` + mapStringForStringToDoubleMap + `,`, + `StringToFloatMap:` + mapStringForStringToFloatMap + `,`, + `Int32Map:` + mapStringForInt32Map + `,`, + `Int64Map:` + mapStringForInt64Map + `,`, + `Uint32Map:` + mapStringForUint32Map + `,`, + `Uint64Map:` + mapStringForUint64Map + `,`, + `Sint32Map:` + mapStringForSint32Map + `,`, + `Sint64Map:` + mapStringForSint64Map + `,`, + `Fixed32Map:` + mapStringForFixed32Map + `,`, + `Sfixed32Map:` + mapStringForSfixed32Map + `,`, + `Fixed64Map:` + mapStringForFixed64Map + `,`, + `Sfixed64Map:` + mapStringForSfixed64Map + `,`, + `BoolMap:` + mapStringForBoolMap + `,`, + `StringMap:` + mapStringForStringMap + `,`, + `StringToBytesMap:` + mapStringForStringToBytesMap + `,`, + `StringToEnumMap:` + mapStringForStringToEnumMap + `,`, + `StringToMsgMap:` + mapStringForStringToMsgMap + `,`, + `}`, + }, "") + return s +} +func (this *AllMapsOrdered) String() string { + if this == nil { + return "nil" + } + keysForStringToDoubleMap := make([]string, 0, len(this.StringToDoubleMap)) + for k := range this.StringToDoubleMap { + keysForStringToDoubleMap = append(keysForStringToDoubleMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToDoubleMap) + mapStringForStringToDoubleMap := "map[string]float64{" + for _, k := range keysForStringToDoubleMap { + mapStringForStringToDoubleMap += fmt.Sprintf("%v: %v,", k, this.StringToDoubleMap[k]) + } + mapStringForStringToDoubleMap += "}" + keysForStringToFloatMap := make([]string, 0, len(this.StringToFloatMap)) + for k := range this.StringToFloatMap { + keysForStringToFloatMap = append(keysForStringToFloatMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToFloatMap) + mapStringForStringToFloatMap := "map[string]float32{" + for _, k := range keysForStringToFloatMap { + mapStringForStringToFloatMap += fmt.Sprintf("%v: %v,", k, this.StringToFloatMap[k]) + } + mapStringForStringToFloatMap += "}" + keysForInt32Map := make([]int32, 0, len(this.Int32Map)) + for k := range this.Int32Map { + keysForInt32Map = append(keysForInt32Map, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForInt32Map) + mapStringForInt32Map := "map[int32]int32{" + for _, k := range keysForInt32Map { + mapStringForInt32Map += fmt.Sprintf("%v: %v,", k, this.Int32Map[k]) + } + mapStringForInt32Map += "}" + keysForInt64Map := make([]int64, 0, len(this.Int64Map)) + for k := range this.Int64Map { + keysForInt64Map = append(keysForInt64Map, k) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForInt64Map) + mapStringForInt64Map := "map[int64]int64{" + for _, k := range keysForInt64Map { + mapStringForInt64Map += fmt.Sprintf("%v: %v,", k, this.Int64Map[k]) + } + mapStringForInt64Map += "}" + keysForUint32Map := make([]uint32, 0, len(this.Uint32Map)) + for k := range this.Uint32Map { + keysForUint32Map = append(keysForUint32Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint32s(keysForUint32Map) + mapStringForUint32Map := "map[uint32]uint32{" + for _, k := range keysForUint32Map { + mapStringForUint32Map += fmt.Sprintf("%v: %v,", k, this.Uint32Map[k]) + } + mapStringForUint32Map += "}" + keysForUint64Map := make([]uint64, 0, len(this.Uint64Map)) + for k := range this.Uint64Map { + keysForUint64Map = append(keysForUint64Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint64s(keysForUint64Map) + mapStringForUint64Map := "map[uint64]uint64{" + for _, k := range keysForUint64Map { + mapStringForUint64Map += fmt.Sprintf("%v: %v,", k, this.Uint64Map[k]) + } + mapStringForUint64Map += "}" + keysForSint32Map := make([]int32, 0, len(this.Sint32Map)) + for k := range this.Sint32Map { + keysForSint32Map = append(keysForSint32Map, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForSint32Map) + mapStringForSint32Map := "map[int32]int32{" + for _, k := range keysForSint32Map { + mapStringForSint32Map += fmt.Sprintf("%v: %v,", k, this.Sint32Map[k]) + } + mapStringForSint32Map += "}" + keysForSint64Map := make([]int64, 0, len(this.Sint64Map)) + for k := range this.Sint64Map { + keysForSint64Map = append(keysForSint64Map, k) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForSint64Map) + mapStringForSint64Map := "map[int64]int64{" + for _, k := range keysForSint64Map { + mapStringForSint64Map += fmt.Sprintf("%v: %v,", k, this.Sint64Map[k]) + } + mapStringForSint64Map += "}" + keysForFixed32Map := make([]uint32, 0, len(this.Fixed32Map)) + for k := range this.Fixed32Map { + keysForFixed32Map = append(keysForFixed32Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint32s(keysForFixed32Map) + mapStringForFixed32Map := "map[uint32]uint32{" + for _, k := range keysForFixed32Map { + mapStringForFixed32Map += fmt.Sprintf("%v: %v,", k, this.Fixed32Map[k]) + } + mapStringForFixed32Map += "}" + keysForSfixed32Map := make([]int32, 0, len(this.Sfixed32Map)) + for k := range this.Sfixed32Map { + keysForSfixed32Map = append(keysForSfixed32Map, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForSfixed32Map) + mapStringForSfixed32Map := "map[int32]int32{" + for _, k := range keysForSfixed32Map { + mapStringForSfixed32Map += fmt.Sprintf("%v: %v,", k, this.Sfixed32Map[k]) + } + mapStringForSfixed32Map += "}" + keysForFixed64Map := make([]uint64, 0, len(this.Fixed64Map)) + for k := range this.Fixed64Map { + keysForFixed64Map = append(keysForFixed64Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint64s(keysForFixed64Map) + mapStringForFixed64Map := "map[uint64]uint64{" + for _, k := range keysForFixed64Map { + mapStringForFixed64Map += fmt.Sprintf("%v: %v,", k, this.Fixed64Map[k]) + } + mapStringForFixed64Map += "}" + keysForSfixed64Map := make([]int64, 0, len(this.Sfixed64Map)) + for k := range this.Sfixed64Map { + keysForSfixed64Map = append(keysForSfixed64Map, k) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForSfixed64Map) + mapStringForSfixed64Map := "map[int64]int64{" + for _, k := range keysForSfixed64Map { + mapStringForSfixed64Map += fmt.Sprintf("%v: %v,", k, this.Sfixed64Map[k]) + } + mapStringForSfixed64Map += "}" + keysForBoolMap := make([]bool, 0, len(this.BoolMap)) + for k := range this.BoolMap { + keysForBoolMap = append(keysForBoolMap, k) + } + github_com_gogo_protobuf_sortkeys.Bools(keysForBoolMap) + mapStringForBoolMap := "map[bool]bool{" + for _, k := range keysForBoolMap { + mapStringForBoolMap += fmt.Sprintf("%v: %v,", k, this.BoolMap[k]) + } + mapStringForBoolMap += "}" + keysForStringMap := make([]string, 0, len(this.StringMap)) + for k := range this.StringMap { + keysForStringMap = append(keysForStringMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringMap) + mapStringForStringMap := "map[string]string{" + for _, k := range keysForStringMap { + mapStringForStringMap += fmt.Sprintf("%v: %v,", k, this.StringMap[k]) + } + mapStringForStringMap += "}" + keysForStringToBytesMap := make([]string, 0, len(this.StringToBytesMap)) + for k := range this.StringToBytesMap { + keysForStringToBytesMap = append(keysForStringToBytesMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToBytesMap) + mapStringForStringToBytesMap := "map[string][]byte{" + for _, k := range keysForStringToBytesMap { + mapStringForStringToBytesMap += fmt.Sprintf("%v: %v,", k, this.StringToBytesMap[k]) + } + mapStringForStringToBytesMap += "}" + keysForStringToEnumMap := make([]string, 0, len(this.StringToEnumMap)) + for k := range this.StringToEnumMap { + keysForStringToEnumMap = append(keysForStringToEnumMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToEnumMap) + mapStringForStringToEnumMap := "map[string]MapEnum{" + for _, k := range keysForStringToEnumMap { + mapStringForStringToEnumMap += fmt.Sprintf("%v: %v,", k, this.StringToEnumMap[k]) + } + mapStringForStringToEnumMap += "}" + keysForStringToMsgMap := make([]string, 0, len(this.StringToMsgMap)) + for k := range this.StringToMsgMap { + keysForStringToMsgMap = append(keysForStringToMsgMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToMsgMap) + mapStringForStringToMsgMap := "map[string]*FloatingPoint{" + for _, k := range keysForStringToMsgMap { + mapStringForStringToMsgMap += fmt.Sprintf("%v: %v,", k, this.StringToMsgMap[k]) + } + mapStringForStringToMsgMap += "}" + s := strings.Join([]string{`&AllMapsOrdered{`, + `StringToDoubleMap:` + mapStringForStringToDoubleMap + `,`, + `StringToFloatMap:` + mapStringForStringToFloatMap + `,`, + `Int32Map:` + mapStringForInt32Map + `,`, + `Int64Map:` + mapStringForInt64Map + `,`, + `Uint32Map:` + mapStringForUint32Map + `,`, + `Uint64Map:` + mapStringForUint64Map + `,`, + `Sint32Map:` + mapStringForSint32Map + `,`, + `Sint64Map:` + mapStringForSint64Map + `,`, + `Fixed32Map:` + mapStringForFixed32Map + `,`, + `Sfixed32Map:` + mapStringForSfixed32Map + `,`, + `Fixed64Map:` + mapStringForFixed64Map + `,`, + `Sfixed64Map:` + mapStringForSfixed64Map + `,`, + `BoolMap:` + mapStringForBoolMap + `,`, + `StringMap:` + mapStringForStringMap + `,`, + `StringToBytesMap:` + mapStringForStringToBytesMap + `,`, + `StringToEnumMap:` + mapStringForStringToEnumMap + `,`, + `StringToMsgMap:` + mapStringForStringToMsgMap + `,`, + `}`, + }, "") + return s +} +func (this *MessageWithMap) String() string { + if this == nil { + return "nil" + } + keysForNameMapping := make([]int32, 0, len(this.NameMapping)) + for k := range this.NameMapping { + keysForNameMapping = append(keysForNameMapping, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForNameMapping) + mapStringForNameMapping := "map[int32]string{" + for _, k := range keysForNameMapping { + mapStringForNameMapping += fmt.Sprintf("%v: %v,", k, this.NameMapping[k]) + } + mapStringForNameMapping += "}" + keysForMsgMapping := make([]int64, 0, len(this.MsgMapping)) + for k := range this.MsgMapping { + keysForMsgMapping = append(keysForMsgMapping, k) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForMsgMapping) + mapStringForMsgMapping := "map[int64]*FloatingPoint{" + for _, k := range keysForMsgMapping { + mapStringForMsgMapping += fmt.Sprintf("%v: %v,", k, this.MsgMapping[k]) + } + mapStringForMsgMapping += "}" + keysForByteMapping := make([]bool, 0, len(this.ByteMapping)) + for k := range this.ByteMapping { + keysForByteMapping = append(keysForByteMapping, k) + } + github_com_gogo_protobuf_sortkeys.Bools(keysForByteMapping) + mapStringForByteMapping := "map[bool][]byte{" + for _, k := range keysForByteMapping { + mapStringForByteMapping += fmt.Sprintf("%v: %v,", k, this.ByteMapping[k]) + } + mapStringForByteMapping += "}" + s := strings.Join([]string{`&MessageWithMap{`, + `NameMapping:` + mapStringForNameMapping + `,`, + `MsgMapping:` + mapStringForMsgMapping + `,`, + `ByteMapping:` + mapStringForByteMapping + `,`, + `}`, + }, "") + return s +} +func (this *FloatingPoint) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&FloatingPoint{`, + `F:` + fmt.Sprintf("%v", this.F) + `,`, + `}`, + }, "") + return s +} +func (this *Uint128Pair) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&Uint128Pair{`, + `Left:` + fmt.Sprintf("%v", this.Left) + `,`, + `Right:` + fmt.Sprintf("%v", this.Right) + `,`, + `}`, + }, "") + return s +} +func (this *ContainsNestedMap) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&ContainsNestedMap{`, + `}`, + }, "") + return s +} +func (this *ContainsNestedMap_NestedMap) String() string { + if this == nil { + return "nil" + } + keysForNestedMapField := make([]string, 0, len(this.NestedMapField)) + for k := range this.NestedMapField { + keysForNestedMapField = append(keysForNestedMapField, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForNestedMapField) + mapStringForNestedMapField := "map[string]float64{" + for _, k := range keysForNestedMapField { + mapStringForNestedMapField += fmt.Sprintf("%v: %v,", k, this.NestedMapField[k]) + } + mapStringForNestedMapField += "}" + s := strings.Join([]string{`&ContainsNestedMap_NestedMap{`, + `NestedMapField:` + mapStringForNestedMapField + `,`, + `}`, + }, "") + return s +} +func valueToStringTheproto3(v interface{}) string { + rv := reflect.ValueOf(v) + if rv.IsNil() { + return "nil" + } + pv := reflect.Indirect(rv).Interface() + return fmt.Sprintf("*%v", pv) +} +func (m *Message) 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 ErrIntOverflowTheproto3 + } + 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: Message: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Message: 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 ErrIntOverflowTheproto3 + } + 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 ErrInvalidLengthTheproto3 + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Name = string(data[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Hilarity", wireType) + } + m.Hilarity = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + m.Hilarity |= (Message_Humour(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field HeightInCm", wireType) + } + m.HeightInCm = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + m.HeightInCm |= (uint32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + 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 ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthTheproto3 + } + 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 != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field ResultCount", wireType) + } + m.ResultCount = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + m.ResultCount |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + case 8: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field TrueScotsman", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.TrueScotsman = bool(v != 0) + case 9: + if wireType != 5 { + return fmt.Errorf("proto: wrong wireType = %d for field Score", wireType) + } + var v uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + iNdEx += 4 + v = uint32(data[iNdEx-4]) + v |= uint32(data[iNdEx-3]) << 8 + v |= uint32(data[iNdEx-2]) << 16 + v |= uint32(data[iNdEx-1]) << 24 + m.Score = float32(math.Float32frombits(v)) + case 5: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Key", wireType) + } + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Key = append(m.Key, v) + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Nested", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTheproto3 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Nested == nil { + m.Nested = &Nested{} + } + if err := m.Nested.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 10: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Terrain", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTheproto3 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var keykey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + keykey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapkey int64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + mapkey |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var valuekey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + valuekey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapmsglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + mapmsglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if mapmsglen < 0 { + return ErrInvalidLengthTheproto3 + } + postmsgIndex := iNdEx + mapmsglen + if mapmsglen < 0 { + return ErrInvalidLengthTheproto3 + } + if postmsgIndex > l { + return io.ErrUnexpectedEOF + } + mapvalue := &Nested{} + if err := mapvalue.Unmarshal(data[iNdEx:postmsgIndex]); err != nil { + return err + } + iNdEx = postmsgIndex + if m.Terrain == nil { + m.Terrain = make(map[int64]*Nested) + } + m.Terrain[mapkey] = mapvalue + iNdEx = postIndex + case 11: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Proto2Field", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTheproto3 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Proto2Field == nil { + m.Proto2Field = &test.NinOptNative{} + } + if err := m.Proto2Field.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 13: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Proto2Value", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTheproto3 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var keykey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + keykey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapkey int64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + mapkey |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var valuekey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + valuekey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapmsglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + mapmsglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if mapmsglen < 0 { + return ErrInvalidLengthTheproto3 + } + postmsgIndex := iNdEx + mapmsglen + if mapmsglen < 0 { + return ErrInvalidLengthTheproto3 + } + if postmsgIndex > l { + return io.ErrUnexpectedEOF + } + mapvalue := &test.NinOptEnum{} + if err := mapvalue.Unmarshal(data[iNdEx:postmsgIndex]); err != nil { + return err + } + iNdEx = postmsgIndex + if m.Proto2Value == nil { + m.Proto2Value = make(map[int64]*test.NinOptEnum) + } + m.Proto2Value[mapkey] = mapvalue + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTheproto3(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTheproto3 + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Nested) 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 ErrIntOverflowTheproto3 + } + 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: Nested: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Nested: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Bunny", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + 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 ErrInvalidLengthTheproto3 + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Bunny = string(data[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTheproto3(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTheproto3 + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *AllMaps) 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 ErrIntOverflowTheproto3 + } + 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: AllMaps: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: AllMaps: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field StringToDoubleMap", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTheproto3 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var keykey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + keykey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var stringLenmapkey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLenmapkey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapkey := int(stringLenmapkey) + if intStringLenmapkey < 0 { + return ErrInvalidLengthTheproto3 + } + postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey > l { + return io.ErrUnexpectedEOF + } + mapkey := string(data[iNdEx:postStringIndexmapkey]) + iNdEx = postStringIndexmapkey + var valuekey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + valuekey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapvaluetemp uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + iNdEx += 8 + mapvaluetemp = uint64(data[iNdEx-8]) + mapvaluetemp |= uint64(data[iNdEx-7]) << 8 + mapvaluetemp |= uint64(data[iNdEx-6]) << 16 + mapvaluetemp |= uint64(data[iNdEx-5]) << 24 + mapvaluetemp |= uint64(data[iNdEx-4]) << 32 + mapvaluetemp |= uint64(data[iNdEx-3]) << 40 + mapvaluetemp |= uint64(data[iNdEx-2]) << 48 + mapvaluetemp |= uint64(data[iNdEx-1]) << 56 + mapvalue := math.Float64frombits(mapvaluetemp) + if m.StringToDoubleMap == nil { + m.StringToDoubleMap = make(map[string]float64) + } + m.StringToDoubleMap[mapkey] = mapvalue + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field StringToFloatMap", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTheproto3 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var keykey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + keykey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var stringLenmapkey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLenmapkey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapkey := int(stringLenmapkey) + if intStringLenmapkey < 0 { + return ErrInvalidLengthTheproto3 + } + postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey > l { + return io.ErrUnexpectedEOF + } + mapkey := string(data[iNdEx:postStringIndexmapkey]) + iNdEx = postStringIndexmapkey + var valuekey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + valuekey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapvaluetemp uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + iNdEx += 4 + mapvaluetemp = uint32(data[iNdEx-4]) + mapvaluetemp |= uint32(data[iNdEx-3]) << 8 + mapvaluetemp |= uint32(data[iNdEx-2]) << 16 + mapvaluetemp |= uint32(data[iNdEx-1]) << 24 + mapvalue := math.Float32frombits(mapvaluetemp) + if m.StringToFloatMap == nil { + m.StringToFloatMap = make(map[string]float32) + } + m.StringToFloatMap[mapkey] = mapvalue + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Int32Map", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTheproto3 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var keykey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + keykey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapkey int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + mapkey |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var valuekey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + valuekey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapvalue int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + mapvalue |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if m.Int32Map == nil { + m.Int32Map = make(map[int32]int32) + } + m.Int32Map[mapkey] = mapvalue + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Int64Map", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTheproto3 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var keykey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + keykey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapkey int64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + mapkey |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var valuekey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + valuekey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapvalue int64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + mapvalue |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if m.Int64Map == nil { + m.Int64Map = make(map[int64]int64) + } + m.Int64Map[mapkey] = mapvalue + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Uint32Map", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTheproto3 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var keykey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + keykey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapkey uint32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + mapkey |= (uint32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var valuekey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + valuekey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapvalue uint32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + mapvalue |= (uint32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if m.Uint32Map == nil { + m.Uint32Map = make(map[uint32]uint32) + } + m.Uint32Map[mapkey] = mapvalue + iNdEx = postIndex + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Uint64Map", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTheproto3 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var keykey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + keykey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapkey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + mapkey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var valuekey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + valuekey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapvalue uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + mapvalue |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if m.Uint64Map == nil { + m.Uint64Map = make(map[uint64]uint64) + } + m.Uint64Map[mapkey] = mapvalue + iNdEx = postIndex + case 7: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Sint32Map", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTheproto3 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var keykey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + keykey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapkeytemp int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + mapkeytemp |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + mapkeytemp = int32((uint32(mapkeytemp) >> 1) ^ uint32(((mapkeytemp&1)<<31)>>31)) + mapkey := int32(mapkeytemp) + var valuekey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + valuekey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapvaluetemp int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + mapvaluetemp |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + mapvaluetemp = int32((uint32(mapvaluetemp) >> 1) ^ uint32(((mapvaluetemp&1)<<31)>>31)) + mapvalue := int32(mapvaluetemp) + if m.Sint32Map == nil { + m.Sint32Map = make(map[int32]int32) + } + m.Sint32Map[mapkey] = mapvalue + iNdEx = postIndex + case 8: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Sint64Map", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTheproto3 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var keykey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + keykey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapkeytemp uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + mapkeytemp |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + mapkeytemp = (mapkeytemp >> 1) ^ uint64((int64(mapkeytemp&1)<<63)>>63) + mapkey := int64(mapkeytemp) + var valuekey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + valuekey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapvaluetemp uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + mapvaluetemp |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + mapvaluetemp = (mapvaluetemp >> 1) ^ uint64((int64(mapvaluetemp&1)<<63)>>63) + mapvalue := int64(mapvaluetemp) + if m.Sint64Map == nil { + m.Sint64Map = make(map[int64]int64) + } + m.Sint64Map[mapkey] = mapvalue + iNdEx = postIndex + case 9: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Fixed32Map", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTheproto3 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var keykey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + keykey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapkey uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + iNdEx += 4 + mapkey = uint32(data[iNdEx-4]) + mapkey |= uint32(data[iNdEx-3]) << 8 + mapkey |= uint32(data[iNdEx-2]) << 16 + mapkey |= uint32(data[iNdEx-1]) << 24 + var valuekey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + valuekey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapvalue uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + iNdEx += 4 + mapvalue = uint32(data[iNdEx-4]) + mapvalue |= uint32(data[iNdEx-3]) << 8 + mapvalue |= uint32(data[iNdEx-2]) << 16 + mapvalue |= uint32(data[iNdEx-1]) << 24 + if m.Fixed32Map == nil { + m.Fixed32Map = make(map[uint32]uint32) + } + m.Fixed32Map[mapkey] = mapvalue + iNdEx = postIndex + case 10: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Sfixed32Map", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTheproto3 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var keykey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + keykey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapkey int32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + iNdEx += 4 + mapkey = int32(data[iNdEx-4]) + mapkey |= int32(data[iNdEx-3]) << 8 + mapkey |= int32(data[iNdEx-2]) << 16 + mapkey |= int32(data[iNdEx-1]) << 24 + var valuekey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + valuekey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapvalue int32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + iNdEx += 4 + mapvalue = int32(data[iNdEx-4]) + mapvalue |= int32(data[iNdEx-3]) << 8 + mapvalue |= int32(data[iNdEx-2]) << 16 + mapvalue |= int32(data[iNdEx-1]) << 24 + if m.Sfixed32Map == nil { + m.Sfixed32Map = make(map[int32]int32) + } + m.Sfixed32Map[mapkey] = mapvalue + iNdEx = postIndex + case 11: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Fixed64Map", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTheproto3 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var keykey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + keykey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapkey uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + iNdEx += 8 + mapkey = uint64(data[iNdEx-8]) + mapkey |= uint64(data[iNdEx-7]) << 8 + mapkey |= uint64(data[iNdEx-6]) << 16 + mapkey |= uint64(data[iNdEx-5]) << 24 + mapkey |= uint64(data[iNdEx-4]) << 32 + mapkey |= uint64(data[iNdEx-3]) << 40 + mapkey |= uint64(data[iNdEx-2]) << 48 + mapkey |= uint64(data[iNdEx-1]) << 56 + var valuekey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + valuekey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapvalue uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + iNdEx += 8 + mapvalue = uint64(data[iNdEx-8]) + mapvalue |= uint64(data[iNdEx-7]) << 8 + mapvalue |= uint64(data[iNdEx-6]) << 16 + mapvalue |= uint64(data[iNdEx-5]) << 24 + mapvalue |= uint64(data[iNdEx-4]) << 32 + mapvalue |= uint64(data[iNdEx-3]) << 40 + mapvalue |= uint64(data[iNdEx-2]) << 48 + mapvalue |= uint64(data[iNdEx-1]) << 56 + if m.Fixed64Map == nil { + m.Fixed64Map = make(map[uint64]uint64) + } + m.Fixed64Map[mapkey] = mapvalue + iNdEx = postIndex + case 12: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Sfixed64Map", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTheproto3 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var keykey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + keykey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapkey int64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + iNdEx += 8 + mapkey = int64(data[iNdEx-8]) + mapkey |= int64(data[iNdEx-7]) << 8 + mapkey |= int64(data[iNdEx-6]) << 16 + mapkey |= int64(data[iNdEx-5]) << 24 + mapkey |= int64(data[iNdEx-4]) << 32 + mapkey |= int64(data[iNdEx-3]) << 40 + mapkey |= int64(data[iNdEx-2]) << 48 + mapkey |= int64(data[iNdEx-1]) << 56 + var valuekey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + valuekey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapvalue int64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + iNdEx += 8 + mapvalue = int64(data[iNdEx-8]) + mapvalue |= int64(data[iNdEx-7]) << 8 + mapvalue |= int64(data[iNdEx-6]) << 16 + mapvalue |= int64(data[iNdEx-5]) << 24 + mapvalue |= int64(data[iNdEx-4]) << 32 + mapvalue |= int64(data[iNdEx-3]) << 40 + mapvalue |= int64(data[iNdEx-2]) << 48 + mapvalue |= int64(data[iNdEx-1]) << 56 + if m.Sfixed64Map == nil { + m.Sfixed64Map = make(map[int64]int64) + } + m.Sfixed64Map[mapkey] = mapvalue + iNdEx = postIndex + case 13: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field BoolMap", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTheproto3 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var keykey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + keykey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapkeytemp int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + mapkeytemp |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + mapkey := bool(mapkeytemp != 0) + var valuekey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + valuekey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapvaluetemp int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + mapvaluetemp |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + mapvalue := bool(mapvaluetemp != 0) + if m.BoolMap == nil { + m.BoolMap = make(map[bool]bool) + } + m.BoolMap[mapkey] = mapvalue + iNdEx = postIndex + case 14: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field StringMap", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTheproto3 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var keykey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + keykey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var stringLenmapkey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLenmapkey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapkey := int(stringLenmapkey) + if intStringLenmapkey < 0 { + return ErrInvalidLengthTheproto3 + } + postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey > l { + return io.ErrUnexpectedEOF + } + mapkey := string(data[iNdEx:postStringIndexmapkey]) + iNdEx = postStringIndexmapkey + var valuekey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + valuekey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var stringLenmapvalue uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLenmapvalue |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapvalue := int(stringLenmapvalue) + if intStringLenmapvalue < 0 { + return ErrInvalidLengthTheproto3 + } + postStringIndexmapvalue := iNdEx + intStringLenmapvalue + if postStringIndexmapvalue > l { + return io.ErrUnexpectedEOF + } + mapvalue := string(data[iNdEx:postStringIndexmapvalue]) + iNdEx = postStringIndexmapvalue + if m.StringMap == nil { + m.StringMap = make(map[string]string) + } + m.StringMap[mapkey] = mapvalue + iNdEx = postIndex + case 15: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field StringToBytesMap", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTheproto3 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var keykey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + keykey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var stringLenmapkey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLenmapkey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapkey := int(stringLenmapkey) + if intStringLenmapkey < 0 { + return ErrInvalidLengthTheproto3 + } + postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey > l { + return io.ErrUnexpectedEOF + } + mapkey := string(data[iNdEx:postStringIndexmapkey]) + iNdEx = postStringIndexmapkey + var valuekey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + valuekey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapbyteLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + mapbyteLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intMapbyteLen := int(mapbyteLen) + if intMapbyteLen < 0 { + return ErrInvalidLengthTheproto3 + } + postbytesIndex := iNdEx + intMapbyteLen + if postbytesIndex > l { + return io.ErrUnexpectedEOF + } + mapvalue := make([]byte, mapbyteLen) + copy(mapvalue, data[iNdEx:postbytesIndex]) + iNdEx = postbytesIndex + if m.StringToBytesMap == nil { + m.StringToBytesMap = make(map[string][]byte) + } + m.StringToBytesMap[mapkey] = mapvalue + iNdEx = postIndex + case 16: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field StringToEnumMap", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTheproto3 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var keykey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + keykey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var stringLenmapkey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLenmapkey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapkey := int(stringLenmapkey) + if intStringLenmapkey < 0 { + return ErrInvalidLengthTheproto3 + } + postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey > l { + return io.ErrUnexpectedEOF + } + mapkey := string(data[iNdEx:postStringIndexmapkey]) + iNdEx = postStringIndexmapkey + var valuekey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + valuekey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapvalue MapEnum + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + mapvalue |= (MapEnum(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if m.StringToEnumMap == nil { + m.StringToEnumMap = make(map[string]MapEnum) + } + m.StringToEnumMap[mapkey] = mapvalue + iNdEx = postIndex + case 17: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field StringToMsgMap", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTheproto3 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var keykey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + keykey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var stringLenmapkey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLenmapkey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapkey := int(stringLenmapkey) + if intStringLenmapkey < 0 { + return ErrInvalidLengthTheproto3 + } + postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey > l { + return io.ErrUnexpectedEOF + } + mapkey := string(data[iNdEx:postStringIndexmapkey]) + iNdEx = postStringIndexmapkey + var valuekey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + valuekey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapmsglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + mapmsglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if mapmsglen < 0 { + return ErrInvalidLengthTheproto3 + } + postmsgIndex := iNdEx + mapmsglen + if mapmsglen < 0 { + return ErrInvalidLengthTheproto3 + } + if postmsgIndex > l { + return io.ErrUnexpectedEOF + } + mapvalue := &FloatingPoint{} + if err := mapvalue.Unmarshal(data[iNdEx:postmsgIndex]); err != nil { + return err + } + iNdEx = postmsgIndex + if m.StringToMsgMap == nil { + m.StringToMsgMap = make(map[string]*FloatingPoint) + } + m.StringToMsgMap[mapkey] = mapvalue + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTheproto3(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTheproto3 + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *AllMapsOrdered) 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 ErrIntOverflowTheproto3 + } + 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: AllMapsOrdered: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: AllMapsOrdered: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field StringToDoubleMap", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTheproto3 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var keykey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + keykey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var stringLenmapkey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLenmapkey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapkey := int(stringLenmapkey) + if intStringLenmapkey < 0 { + return ErrInvalidLengthTheproto3 + } + postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey > l { + return io.ErrUnexpectedEOF + } + mapkey := string(data[iNdEx:postStringIndexmapkey]) + iNdEx = postStringIndexmapkey + var valuekey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + valuekey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapvaluetemp uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + iNdEx += 8 + mapvaluetemp = uint64(data[iNdEx-8]) + mapvaluetemp |= uint64(data[iNdEx-7]) << 8 + mapvaluetemp |= uint64(data[iNdEx-6]) << 16 + mapvaluetemp |= uint64(data[iNdEx-5]) << 24 + mapvaluetemp |= uint64(data[iNdEx-4]) << 32 + mapvaluetemp |= uint64(data[iNdEx-3]) << 40 + mapvaluetemp |= uint64(data[iNdEx-2]) << 48 + mapvaluetemp |= uint64(data[iNdEx-1]) << 56 + mapvalue := math.Float64frombits(mapvaluetemp) + if m.StringToDoubleMap == nil { + m.StringToDoubleMap = make(map[string]float64) + } + m.StringToDoubleMap[mapkey] = mapvalue + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field StringToFloatMap", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTheproto3 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var keykey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + keykey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var stringLenmapkey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLenmapkey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapkey := int(stringLenmapkey) + if intStringLenmapkey < 0 { + return ErrInvalidLengthTheproto3 + } + postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey > l { + return io.ErrUnexpectedEOF + } + mapkey := string(data[iNdEx:postStringIndexmapkey]) + iNdEx = postStringIndexmapkey + var valuekey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + valuekey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapvaluetemp uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + iNdEx += 4 + mapvaluetemp = uint32(data[iNdEx-4]) + mapvaluetemp |= uint32(data[iNdEx-3]) << 8 + mapvaluetemp |= uint32(data[iNdEx-2]) << 16 + mapvaluetemp |= uint32(data[iNdEx-1]) << 24 + mapvalue := math.Float32frombits(mapvaluetemp) + if m.StringToFloatMap == nil { + m.StringToFloatMap = make(map[string]float32) + } + m.StringToFloatMap[mapkey] = mapvalue + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Int32Map", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTheproto3 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var keykey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + keykey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapkey int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + mapkey |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var valuekey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + valuekey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapvalue int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + mapvalue |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if m.Int32Map == nil { + m.Int32Map = make(map[int32]int32) + } + m.Int32Map[mapkey] = mapvalue + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Int64Map", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTheproto3 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var keykey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + keykey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapkey int64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + mapkey |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var valuekey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + valuekey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapvalue int64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + mapvalue |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if m.Int64Map == nil { + m.Int64Map = make(map[int64]int64) + } + m.Int64Map[mapkey] = mapvalue + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Uint32Map", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTheproto3 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var keykey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + keykey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapkey uint32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + mapkey |= (uint32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var valuekey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + valuekey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapvalue uint32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + mapvalue |= (uint32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if m.Uint32Map == nil { + m.Uint32Map = make(map[uint32]uint32) + } + m.Uint32Map[mapkey] = mapvalue + iNdEx = postIndex + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Uint64Map", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTheproto3 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var keykey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + keykey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapkey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + mapkey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var valuekey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + valuekey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapvalue uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + mapvalue |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if m.Uint64Map == nil { + m.Uint64Map = make(map[uint64]uint64) + } + m.Uint64Map[mapkey] = mapvalue + iNdEx = postIndex + case 7: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Sint32Map", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTheproto3 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var keykey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + keykey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapkeytemp int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + mapkeytemp |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + mapkeytemp = int32((uint32(mapkeytemp) >> 1) ^ uint32(((mapkeytemp&1)<<31)>>31)) + mapkey := int32(mapkeytemp) + var valuekey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + valuekey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapvaluetemp int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + mapvaluetemp |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + mapvaluetemp = int32((uint32(mapvaluetemp) >> 1) ^ uint32(((mapvaluetemp&1)<<31)>>31)) + mapvalue := int32(mapvaluetemp) + if m.Sint32Map == nil { + m.Sint32Map = make(map[int32]int32) + } + m.Sint32Map[mapkey] = mapvalue + iNdEx = postIndex + case 8: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Sint64Map", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTheproto3 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var keykey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + keykey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapkeytemp uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + mapkeytemp |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + mapkeytemp = (mapkeytemp >> 1) ^ uint64((int64(mapkeytemp&1)<<63)>>63) + mapkey := int64(mapkeytemp) + var valuekey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + valuekey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapvaluetemp uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + mapvaluetemp |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + mapvaluetemp = (mapvaluetemp >> 1) ^ uint64((int64(mapvaluetemp&1)<<63)>>63) + mapvalue := int64(mapvaluetemp) + if m.Sint64Map == nil { + m.Sint64Map = make(map[int64]int64) + } + m.Sint64Map[mapkey] = mapvalue + iNdEx = postIndex + case 9: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Fixed32Map", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTheproto3 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var keykey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + keykey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapkey uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + iNdEx += 4 + mapkey = uint32(data[iNdEx-4]) + mapkey |= uint32(data[iNdEx-3]) << 8 + mapkey |= uint32(data[iNdEx-2]) << 16 + mapkey |= uint32(data[iNdEx-1]) << 24 + var valuekey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + valuekey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapvalue uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + iNdEx += 4 + mapvalue = uint32(data[iNdEx-4]) + mapvalue |= uint32(data[iNdEx-3]) << 8 + mapvalue |= uint32(data[iNdEx-2]) << 16 + mapvalue |= uint32(data[iNdEx-1]) << 24 + if m.Fixed32Map == nil { + m.Fixed32Map = make(map[uint32]uint32) + } + m.Fixed32Map[mapkey] = mapvalue + iNdEx = postIndex + case 10: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Sfixed32Map", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTheproto3 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var keykey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + keykey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapkey int32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + iNdEx += 4 + mapkey = int32(data[iNdEx-4]) + mapkey |= int32(data[iNdEx-3]) << 8 + mapkey |= int32(data[iNdEx-2]) << 16 + mapkey |= int32(data[iNdEx-1]) << 24 + var valuekey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + valuekey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapvalue int32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + iNdEx += 4 + mapvalue = int32(data[iNdEx-4]) + mapvalue |= int32(data[iNdEx-3]) << 8 + mapvalue |= int32(data[iNdEx-2]) << 16 + mapvalue |= int32(data[iNdEx-1]) << 24 + if m.Sfixed32Map == nil { + m.Sfixed32Map = make(map[int32]int32) + } + m.Sfixed32Map[mapkey] = mapvalue + iNdEx = postIndex + case 11: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Fixed64Map", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTheproto3 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var keykey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + keykey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapkey uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + iNdEx += 8 + mapkey = uint64(data[iNdEx-8]) + mapkey |= uint64(data[iNdEx-7]) << 8 + mapkey |= uint64(data[iNdEx-6]) << 16 + mapkey |= uint64(data[iNdEx-5]) << 24 + mapkey |= uint64(data[iNdEx-4]) << 32 + mapkey |= uint64(data[iNdEx-3]) << 40 + mapkey |= uint64(data[iNdEx-2]) << 48 + mapkey |= uint64(data[iNdEx-1]) << 56 + var valuekey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + valuekey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapvalue uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + iNdEx += 8 + mapvalue = uint64(data[iNdEx-8]) + mapvalue |= uint64(data[iNdEx-7]) << 8 + mapvalue |= uint64(data[iNdEx-6]) << 16 + mapvalue |= uint64(data[iNdEx-5]) << 24 + mapvalue |= uint64(data[iNdEx-4]) << 32 + mapvalue |= uint64(data[iNdEx-3]) << 40 + mapvalue |= uint64(data[iNdEx-2]) << 48 + mapvalue |= uint64(data[iNdEx-1]) << 56 + if m.Fixed64Map == nil { + m.Fixed64Map = make(map[uint64]uint64) + } + m.Fixed64Map[mapkey] = mapvalue + iNdEx = postIndex + case 12: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Sfixed64Map", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTheproto3 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var keykey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + keykey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapkey int64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + iNdEx += 8 + mapkey = int64(data[iNdEx-8]) + mapkey |= int64(data[iNdEx-7]) << 8 + mapkey |= int64(data[iNdEx-6]) << 16 + mapkey |= int64(data[iNdEx-5]) << 24 + mapkey |= int64(data[iNdEx-4]) << 32 + mapkey |= int64(data[iNdEx-3]) << 40 + mapkey |= int64(data[iNdEx-2]) << 48 + mapkey |= int64(data[iNdEx-1]) << 56 + var valuekey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + valuekey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapvalue int64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + iNdEx += 8 + mapvalue = int64(data[iNdEx-8]) + mapvalue |= int64(data[iNdEx-7]) << 8 + mapvalue |= int64(data[iNdEx-6]) << 16 + mapvalue |= int64(data[iNdEx-5]) << 24 + mapvalue |= int64(data[iNdEx-4]) << 32 + mapvalue |= int64(data[iNdEx-3]) << 40 + mapvalue |= int64(data[iNdEx-2]) << 48 + mapvalue |= int64(data[iNdEx-1]) << 56 + if m.Sfixed64Map == nil { + m.Sfixed64Map = make(map[int64]int64) + } + m.Sfixed64Map[mapkey] = mapvalue + iNdEx = postIndex + case 13: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field BoolMap", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTheproto3 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var keykey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + keykey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapkeytemp int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + mapkeytemp |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + mapkey := bool(mapkeytemp != 0) + var valuekey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + valuekey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapvaluetemp int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + mapvaluetemp |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + mapvalue := bool(mapvaluetemp != 0) + if m.BoolMap == nil { + m.BoolMap = make(map[bool]bool) + } + m.BoolMap[mapkey] = mapvalue + iNdEx = postIndex + case 14: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field StringMap", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTheproto3 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var keykey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + keykey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var stringLenmapkey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLenmapkey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapkey := int(stringLenmapkey) + if intStringLenmapkey < 0 { + return ErrInvalidLengthTheproto3 + } + postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey > l { + return io.ErrUnexpectedEOF + } + mapkey := string(data[iNdEx:postStringIndexmapkey]) + iNdEx = postStringIndexmapkey + var valuekey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + valuekey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var stringLenmapvalue uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLenmapvalue |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapvalue := int(stringLenmapvalue) + if intStringLenmapvalue < 0 { + return ErrInvalidLengthTheproto3 + } + postStringIndexmapvalue := iNdEx + intStringLenmapvalue + if postStringIndexmapvalue > l { + return io.ErrUnexpectedEOF + } + mapvalue := string(data[iNdEx:postStringIndexmapvalue]) + iNdEx = postStringIndexmapvalue + if m.StringMap == nil { + m.StringMap = make(map[string]string) + } + m.StringMap[mapkey] = mapvalue + iNdEx = postIndex + case 15: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field StringToBytesMap", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTheproto3 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var keykey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + keykey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var stringLenmapkey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLenmapkey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapkey := int(stringLenmapkey) + if intStringLenmapkey < 0 { + return ErrInvalidLengthTheproto3 + } + postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey > l { + return io.ErrUnexpectedEOF + } + mapkey := string(data[iNdEx:postStringIndexmapkey]) + iNdEx = postStringIndexmapkey + var valuekey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + valuekey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapbyteLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + mapbyteLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intMapbyteLen := int(mapbyteLen) + if intMapbyteLen < 0 { + return ErrInvalidLengthTheproto3 + } + postbytesIndex := iNdEx + intMapbyteLen + if postbytesIndex > l { + return io.ErrUnexpectedEOF + } + mapvalue := make([]byte, mapbyteLen) + copy(mapvalue, data[iNdEx:postbytesIndex]) + iNdEx = postbytesIndex + if m.StringToBytesMap == nil { + m.StringToBytesMap = make(map[string][]byte) + } + m.StringToBytesMap[mapkey] = mapvalue + iNdEx = postIndex + case 16: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field StringToEnumMap", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTheproto3 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var keykey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + keykey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var stringLenmapkey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLenmapkey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapkey := int(stringLenmapkey) + if intStringLenmapkey < 0 { + return ErrInvalidLengthTheproto3 + } + postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey > l { + return io.ErrUnexpectedEOF + } + mapkey := string(data[iNdEx:postStringIndexmapkey]) + iNdEx = postStringIndexmapkey + var valuekey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + valuekey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapvalue MapEnum + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + mapvalue |= (MapEnum(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if m.StringToEnumMap == nil { + m.StringToEnumMap = make(map[string]MapEnum) + } + m.StringToEnumMap[mapkey] = mapvalue + iNdEx = postIndex + case 17: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field StringToMsgMap", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTheproto3 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var keykey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + keykey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var stringLenmapkey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLenmapkey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapkey := int(stringLenmapkey) + if intStringLenmapkey < 0 { + return ErrInvalidLengthTheproto3 + } + postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey > l { + return io.ErrUnexpectedEOF + } + mapkey := string(data[iNdEx:postStringIndexmapkey]) + iNdEx = postStringIndexmapkey + var valuekey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + valuekey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapmsglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + mapmsglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if mapmsglen < 0 { + return ErrInvalidLengthTheproto3 + } + postmsgIndex := iNdEx + mapmsglen + if mapmsglen < 0 { + return ErrInvalidLengthTheproto3 + } + if postmsgIndex > l { + return io.ErrUnexpectedEOF + } + mapvalue := &FloatingPoint{} + if err := mapvalue.Unmarshal(data[iNdEx:postmsgIndex]); err != nil { + return err + } + iNdEx = postmsgIndex + if m.StringToMsgMap == nil { + m.StringToMsgMap = make(map[string]*FloatingPoint) + } + m.StringToMsgMap[mapkey] = mapvalue + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTheproto3(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTheproto3 + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MessageWithMap) 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 ErrIntOverflowTheproto3 + } + 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: MessageWithMap: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MessageWithMap: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NameMapping", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTheproto3 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var keykey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + keykey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapkey int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + mapkey |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var valuekey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + valuekey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var stringLenmapvalue uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLenmapvalue |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapvalue := int(stringLenmapvalue) + if intStringLenmapvalue < 0 { + return ErrInvalidLengthTheproto3 + } + postStringIndexmapvalue := iNdEx + intStringLenmapvalue + if postStringIndexmapvalue > l { + return io.ErrUnexpectedEOF + } + mapvalue := string(data[iNdEx:postStringIndexmapvalue]) + iNdEx = postStringIndexmapvalue + if m.NameMapping == nil { + m.NameMapping = make(map[int32]string) + } + m.NameMapping[mapkey] = mapvalue + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MsgMapping", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTheproto3 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var keykey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + keykey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapkeytemp uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + mapkeytemp |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + mapkeytemp = (mapkeytemp >> 1) ^ uint64((int64(mapkeytemp&1)<<63)>>63) + mapkey := int64(mapkeytemp) + var valuekey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + valuekey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapmsglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + mapmsglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if mapmsglen < 0 { + return ErrInvalidLengthTheproto3 + } + postmsgIndex := iNdEx + mapmsglen + if mapmsglen < 0 { + return ErrInvalidLengthTheproto3 + } + if postmsgIndex > l { + return io.ErrUnexpectedEOF + } + mapvalue := &FloatingPoint{} + if err := mapvalue.Unmarshal(data[iNdEx:postmsgIndex]); err != nil { + return err + } + iNdEx = postmsgIndex + if m.MsgMapping == nil { + m.MsgMapping = make(map[int64]*FloatingPoint) + } + m.MsgMapping[mapkey] = mapvalue + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ByteMapping", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTheproto3 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var keykey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + keykey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapkeytemp int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + mapkeytemp |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + mapkey := bool(mapkeytemp != 0) + var valuekey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + valuekey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapbyteLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + mapbyteLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intMapbyteLen := int(mapbyteLen) + if intMapbyteLen < 0 { + return ErrInvalidLengthTheproto3 + } + postbytesIndex := iNdEx + intMapbyteLen + if postbytesIndex > l { + return io.ErrUnexpectedEOF + } + mapvalue := make([]byte, mapbyteLen) + copy(mapvalue, data[iNdEx:postbytesIndex]) + iNdEx = postbytesIndex + if m.ByteMapping == nil { + m.ByteMapping = make(map[bool][]byte) + } + m.ByteMapping[mapkey] = mapvalue + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTheproto3(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTheproto3 + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *FloatingPoint) 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 ErrIntOverflowTheproto3 + } + 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: FloatingPoint: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: FloatingPoint: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field F", 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.F = float64(math.Float64frombits(v)) + default: + iNdEx = preIndex + skippy, err := skipTheproto3(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTheproto3 + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Uint128Pair) 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 ErrIntOverflowTheproto3 + } + 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: Uint128Pair: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Uint128Pair: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Left", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthTheproto3 + } + postIndex := iNdEx + byteLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Left.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Right", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthTheproto3 + } + postIndex := iNdEx + byteLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var v github_com_gogo_protobuf_test_custom.Uint128 + m.Right = &v + if err := m.Right.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTheproto3(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTheproto3 + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ContainsNestedMap) 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 ErrIntOverflowTheproto3 + } + 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: ContainsNestedMap: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ContainsNestedMap: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipTheproto3(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTheproto3 + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ContainsNestedMap_NestedMap) 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 ErrIntOverflowTheproto3 + } + 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: NestedMap: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: NestedMap: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NestedMapField", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTheproto3 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var keykey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + keykey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var stringLenmapkey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLenmapkey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapkey := int(stringLenmapkey) + if intStringLenmapkey < 0 { + return ErrInvalidLengthTheproto3 + } + postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey > l { + return io.ErrUnexpectedEOF + } + mapkey := string(data[iNdEx:postStringIndexmapkey]) + iNdEx = postStringIndexmapkey + var valuekey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + valuekey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapvaluetemp uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + iNdEx += 8 + mapvaluetemp = uint64(data[iNdEx-8]) + mapvaluetemp |= uint64(data[iNdEx-7]) << 8 + mapvaluetemp |= uint64(data[iNdEx-6]) << 16 + mapvaluetemp |= uint64(data[iNdEx-5]) << 24 + mapvaluetemp |= uint64(data[iNdEx-4]) << 32 + mapvaluetemp |= uint64(data[iNdEx-3]) << 40 + mapvaluetemp |= uint64(data[iNdEx-2]) << 48 + mapvaluetemp |= uint64(data[iNdEx-1]) << 56 + mapvalue := math.Float64frombits(mapvaluetemp) + if m.NestedMapField == nil { + m.NestedMapField = make(map[string]float64) + } + m.NestedMapField[mapkey] = mapvalue + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTheproto3(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTheproto3 + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipTheproto3(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, ErrIntOverflowTheproto3 + } + 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, ErrIntOverflowTheproto3 + } + 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, ErrIntOverflowTheproto3 + } + 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, ErrInvalidLengthTheproto3 + } + return iNdEx, nil + case 3: + for { + var innerWire uint64 + var start int = iNdEx + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowTheproto3 + } + 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 := skipTheproto3(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 ( + ErrInvalidLengthTheproto3 = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowTheproto3 = fmt.Errorf("proto: integer overflow") +) + +var fileDescriptorTheproto3 = []byte{ + // 1587 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xec, 0x59, 0x4b, 0x6f, 0xdb, 0xc6, + 0x16, 0x36, 0x25, 0x59, 0x8f, 0xa3, 0x17, 0x3d, 0xc9, 0xbd, 0xd0, 0x35, 0x70, 0x6d, 0x47, 0x01, + 0x12, 0x27, 0xb8, 0x91, 0x73, 0x9d, 0xb4, 0x4d, 0xdd, 0xb4, 0xa9, 0xa5, 0x58, 0x88, 0x1b, 0x5b, + 0x71, 0x25, 0x3b, 0x6e, 0x11, 0xa0, 0x06, 0x65, 0x53, 0x12, 0x51, 0x89, 0x34, 0xf8, 0x08, 0xea, + 0x5d, 0x7e, 0x46, 0x77, 0x45, 0x77, 0x5d, 0x16, 0x59, 0x14, 0x5d, 0xb6, 0x3b, 0x2f, 0x0b, 0x74, + 0x53, 0x74, 0x11, 0x24, 0xe9, 0x26,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 0xd2, 0x77, 0xb8, 0x7d, 0x8f, 0xdb, 0x8f, 0xb8, 0xfd, 0x84, 0xdb, 0xe9, 0x4b, 0x8c, + 0xc7, 0xbf, 0xcf, 0x71, 0x7b, 0x85, 0xaf, 0x5f, 0xe3, 0xdf, 0x37, 0xf8, 0xf7, 0xc9, 0x1f, 0x0b, + 0x33, 0xdd, 0x34, 0x9b, 0xfb, 0x9f, 0x01, 0x00, 0x00, 0xff, 0xff, 0x4f, 0x63, 0xc3, 0x53, 0x44, + 0x1a, 0x00, 0x00, +} diff --git a/vendor/github.com/gogo/protobuf/test/theproto3/combos/unmarshaler/theproto3.proto b/vendor/github.com/gogo/protobuf/test/theproto3/combos/unmarshaler/theproto3.proto new file mode 100644 index 000000000..ceaa2b8ab --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/theproto3/combos/unmarshaler/theproto3.proto @@ -0,0 +1,162 @@ +// Copyright (c) 2013, Vastech SA (PTY) LTD. All rights reserved. +// http://github.com/gogo/protobuf/gogoproto +// +// Go support for Protocol Buffers - Google's data interchange format +// +// Copyright 2014 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. + +syntax = "proto3"; + +package theproto3; + +import "github.com/gogo/protobuf/gogoproto/gogo.proto"; + +import "github.com/gogo/protobuf/test/combos/both/thetest.proto"; + +option (gogoproto.goproto_stringer_all) = false; +option (gogoproto.goproto_enum_prefix_all) = false; +option (gogoproto.goproto_getters_all) = false; + +option (gogoproto.equal_all) = true; +option (gogoproto.verbose_equal_all) = true; +option (gogoproto.stringer_all) = true; +option (gogoproto.gostring_all) = true; +option (gogoproto.face_all) = true; +option (gogoproto.description_all) = true; + +option (gogoproto.testgen_all) = true; +option (gogoproto.populate_all) = true; +option (gogoproto.benchgen_all) = true; +option (gogoproto.unmarshaler_all) = true; +option (gogoproto.marshaler_all) = false; +option (gogoproto.sizer_all) = true; + +option (gogoproto.goproto_enum_stringer_all) = false; +option (gogoproto.enum_stringer_all) = true; + +option (gogoproto.unsafe_marshaler_all) = false; +option (gogoproto.unsafe_unmarshaler_all) = false; + +message Message { + enum Humour { + UNKNOWN = 0; + PUNS = 1; + SLAPSTICK = 2; + BILL_BAILEY = 3; + } + + string name = 1; + Humour hilarity = 2; + uint32 height_in_cm = 3; + bytes data = 4; + int64 result_count = 7; + bool true_scotsman = 8; + float score = 9; + + repeated uint64 key = 5; + Nested nested = 6; + + map terrain = 10; + test.NinOptNative proto2_field = 11; + map proto2_value = 13; +} + +message Nested { + string bunny = 1; +} + +enum MapEnum { + MA = 0; + MB = 1; + MC = 2; +} + +message AllMaps { + map StringToDoubleMap = 1; + map StringToFloatMap = 2; + map Int32Map = 3; + map Int64Map = 4; + map Uint32Map = 5; + map Uint64Map = 6; + map Sint32Map = 7; + map Sint64Map = 8; + map Fixed32Map = 9; + map Sfixed32Map = 10; + map Fixed64Map = 11; + map Sfixed64Map = 12; + map BoolMap = 13; + map StringMap = 14; + map StringToBytesMap = 15; + map StringToEnumMap = 16; + map StringToMsgMap = 17; +} + +message AllMapsOrdered { + option (gogoproto.stable_marshaler) = true; + + map StringToDoubleMap = 1; + map StringToFloatMap = 2; + map Int32Map = 3; + map Int64Map = 4; + map Uint32Map = 5; + map Uint64Map = 6; + map Sint32Map = 7; + map Sint64Map = 8; + map Fixed32Map = 9; + map Sfixed32Map = 10; + map Fixed64Map = 11; + map Sfixed64Map = 12; + map BoolMap = 13; + map StringMap = 14; + map StringToBytesMap = 15; + map StringToEnumMap = 16; + map StringToMsgMap = 17; +} + +message MessageWithMap { + map name_mapping = 1; + map msg_mapping = 2; + map byte_mapping = 3; +} + +message FloatingPoint { + double f = 1; +} + +message Uint128Pair { + bytes left = 1 [(gogoproto.nullable) = false, (gogoproto.customtype) = "github.com/gogo/protobuf/test/custom.Uint128"]; + bytes right = 2 [(gogoproto.customtype) = "github.com/gogo/protobuf/test/custom.Uint128"]; +} + +message ContainsNestedMap { + message NestedMap { + map NestedMapField = 1; + } +} \ No newline at end of file diff --git a/vendor/github.com/gogo/protobuf/test/theproto3/combos/unmarshaler/theproto3pb_test.go b/vendor/github.com/gogo/protobuf/test/theproto3/combos/unmarshaler/theproto3pb_test.go new file mode 100644 index 000000000..68a6ca718 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/theproto3/combos/unmarshaler/theproto3pb_test.go @@ -0,0 +1,1934 @@ +// Code generated by protoc-gen-gogo. +// source: combos/unmarshaler/theproto3.proto +// DO NOT EDIT! + +/* +Package theproto3 is a generated protocol buffer package. + +It is generated from these files: + combos/unmarshaler/theproto3.proto + +It has these top-level messages: + Message + Nested + AllMaps + AllMapsOrdered + MessageWithMap + FloatingPoint + Uint128Pair + ContainsNestedMap +*/ +package theproto3 + +import testing "testing" +import math_rand "math/rand" +import time "time" +import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" +import github_com_gogo_protobuf_jsonpb "github.com/gogo/protobuf/jsonpb" +import fmt "fmt" +import go_parser "go/parser" +import proto "github.com/gogo/protobuf/proto" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" +import _ "github.com/gogo/protobuf/test/combos/both" + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +func TestMessageProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMessage(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Message{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkMessageProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Message, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedMessage(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkMessageProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedMessage(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &Message{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNestedProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNested(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Nested{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkNestedProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Nested, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNested(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNestedProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNested(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &Nested{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestAllMapsProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAllMaps(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &AllMaps{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkAllMapsProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*AllMaps, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedAllMaps(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkAllMapsProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedAllMaps(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &AllMaps{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestAllMapsOrderedProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAllMapsOrdered(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &AllMapsOrdered{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkAllMapsOrderedProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*AllMapsOrdered, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedAllMapsOrdered(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkAllMapsOrderedProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedAllMapsOrdered(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &AllMapsOrdered{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestMessageWithMapProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMessageWithMap(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &MessageWithMap{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkMessageWithMapProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*MessageWithMap, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedMessageWithMap(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkMessageWithMapProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedMessageWithMap(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &MessageWithMap{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestFloatingPointProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedFloatingPoint(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &FloatingPoint{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkFloatingPointProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*FloatingPoint, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedFloatingPoint(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkFloatingPointProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedFloatingPoint(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &FloatingPoint{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestUint128PairProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUint128Pair(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Uint128Pair{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkUint128PairProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Uint128Pair, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedUint128Pair(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkUint128PairProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedUint128Pair(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &Uint128Pair{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestContainsNestedMapProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedContainsNestedMap(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &ContainsNestedMap{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkContainsNestedMapProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*ContainsNestedMap, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedContainsNestedMap(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkContainsNestedMapProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedContainsNestedMap(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &ContainsNestedMap{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestContainsNestedMap_NestedMapProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedContainsNestedMap_NestedMap(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &ContainsNestedMap_NestedMap{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkContainsNestedMap_NestedMapProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*ContainsNestedMap_NestedMap, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedContainsNestedMap_NestedMap(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkContainsNestedMap_NestedMapProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedContainsNestedMap_NestedMap(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &ContainsNestedMap_NestedMap{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestMessageJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMessage(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Message{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNestedJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNested(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Nested{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestAllMapsJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAllMaps(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &AllMaps{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestAllMapsOrderedJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAllMapsOrdered(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &AllMapsOrdered{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestMessageWithMapJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMessageWithMap(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &MessageWithMap{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestFloatingPointJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedFloatingPoint(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &FloatingPoint{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestUint128PairJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUint128Pair(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Uint128Pair{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestContainsNestedMapJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedContainsNestedMap(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &ContainsNestedMap{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestContainsNestedMap_NestedMapJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedContainsNestedMap_NestedMap(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &ContainsNestedMap_NestedMap{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestMessageProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMessage(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &Message{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestMessageProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMessage(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &Message{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNestedProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNested(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &Nested{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNestedProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNested(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &Nested{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestAllMapsProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAllMaps(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &AllMaps{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestAllMapsProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAllMaps(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &AllMaps{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestAllMapsOrderedProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAllMapsOrdered(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &AllMapsOrdered{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestAllMapsOrderedProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAllMapsOrdered(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &AllMapsOrdered{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestMessageWithMapProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMessageWithMap(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &MessageWithMap{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestMessageWithMapProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMessageWithMap(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &MessageWithMap{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestFloatingPointProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedFloatingPoint(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &FloatingPoint{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestFloatingPointProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedFloatingPoint(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &FloatingPoint{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestUint128PairProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUint128Pair(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &Uint128Pair{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestUint128PairProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUint128Pair(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &Uint128Pair{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestContainsNestedMapProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedContainsNestedMap(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &ContainsNestedMap{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestContainsNestedMapProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedContainsNestedMap(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &ContainsNestedMap{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestContainsNestedMap_NestedMapProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedContainsNestedMap_NestedMap(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &ContainsNestedMap_NestedMap{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestContainsNestedMap_NestedMapProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedContainsNestedMap_NestedMap(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &ContainsNestedMap_NestedMap{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestTheproto3Description(t *testing.T) { + Theproto3Description() +} +func TestMessageVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedMessage(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &Message{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNestedVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNested(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &Nested{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestAllMapsVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAllMaps(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &AllMaps{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestAllMapsOrderedVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAllMapsOrdered(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &AllMapsOrdered{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestMessageWithMapVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedMessageWithMap(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &MessageWithMap{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestFloatingPointVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedFloatingPoint(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &FloatingPoint{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestUint128PairVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedUint128Pair(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &Uint128Pair{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestContainsNestedMapVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedContainsNestedMap(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &ContainsNestedMap{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestContainsNestedMap_NestedMapVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedContainsNestedMap_NestedMap(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &ContainsNestedMap_NestedMap{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestMessageFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedMessage(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNestedFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNested(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestAllMapsFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAllMaps(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestAllMapsOrderedFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAllMapsOrdered(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestMessageWithMapFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedMessageWithMap(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestFloatingPointFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedFloatingPoint(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestUint128PairFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedUint128Pair(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestContainsNestedMapFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedContainsNestedMap(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestContainsNestedMap_NestedMapFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedContainsNestedMap_NestedMap(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestMessageGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedMessage(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestNestedGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNested(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestAllMapsGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAllMaps(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestAllMapsOrderedGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAllMapsOrdered(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestMessageWithMapGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedMessageWithMap(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestFloatingPointGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedFloatingPoint(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestUint128PairGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedUint128Pair(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestContainsNestedMapGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedContainsNestedMap(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestContainsNestedMap_NestedMapGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedContainsNestedMap_NestedMap(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestMessageSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMessage(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkMessageSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Message, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedMessage(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNestedSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNested(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNestedSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Nested, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNested(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestAllMapsSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAllMaps(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkAllMapsSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*AllMaps, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedAllMaps(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestAllMapsOrderedSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAllMapsOrdered(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkAllMapsOrderedSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*AllMapsOrdered, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedAllMapsOrdered(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestMessageWithMapSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMessageWithMap(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkMessageWithMapSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*MessageWithMap, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedMessageWithMap(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestFloatingPointSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedFloatingPoint(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkFloatingPointSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*FloatingPoint, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedFloatingPoint(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestUint128PairSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUint128Pair(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkUint128PairSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Uint128Pair, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedUint128Pair(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestContainsNestedMapSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedContainsNestedMap(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkContainsNestedMapSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*ContainsNestedMap, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedContainsNestedMap(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestContainsNestedMap_NestedMapSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedContainsNestedMap_NestedMap(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkContainsNestedMap_NestedMapSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*ContainsNestedMap_NestedMap, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedContainsNestedMap_NestedMap(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestMessageStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedMessage(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNestedStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNested(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestAllMapsStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAllMaps(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestAllMapsOrderedStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAllMapsOrdered(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestMessageWithMapStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedMessageWithMap(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestFloatingPointStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedFloatingPoint(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestUint128PairStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedUint128Pair(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestContainsNestedMapStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedContainsNestedMap(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestContainsNestedMap_NestedMapStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedContainsNestedMap_NestedMap(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} + +//These tests are generated by github.com/gogo/protobuf/plugin/testgen diff --git a/vendor/github.com/gogo/protobuf/test/theproto3/combos/unsafeboth/proto3_test.go b/vendor/github.com/gogo/protobuf/test/theproto3/combos/unsafeboth/proto3_test.go new file mode 100644 index 000000000..b41f17859 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/theproto3/combos/unsafeboth/proto3_test.go @@ -0,0 +1,61 @@ +// Copyright (c) 2015, Vastech SA (PTY) LTD. All rights reserved. +// http://github.com/gogo/protobuf/gogoproto +// +// 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 theproto3 + +import ( + "reflect" + "testing" + + "github.com/gogo/protobuf/proto" +) + +func TestNilMaps(t *testing.T) { + m := &AllMaps{StringToMsgMap: map[string]*FloatingPoint{"a": nil}} + if _, err := proto.Marshal(m); err == nil { + t.Fatalf("expected error") + } +} + +func TestCustomTypeSize(t *testing.T) { + m := &Uint128Pair{} + m.Size() // Should not panic. +} + +func TestCustomTypeMarshalUnmarshal(t *testing.T) { + m1 := &Uint128Pair{} + if b, err := proto.Marshal(m1); err != nil { + t.Fatal(err) + } else { + m2 := &Uint128Pair{} + if err := proto.Unmarshal(b, m2); err != nil { + t.Fatal(err) + } + if !reflect.DeepEqual(m1, m2) { + t.Errorf("expected %+v, got %+v", m1, m2) + } + } +} diff --git a/vendor/github.com/gogo/protobuf/test/theproto3/combos/unsafeboth/theproto3.pb.go b/vendor/github.com/gogo/protobuf/test/theproto3/combos/unsafeboth/theproto3.pb.go new file mode 100644 index 000000000..148b8972e --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/theproto3/combos/unsafeboth/theproto3.pb.go @@ -0,0 +1,10568 @@ +// Code generated by protoc-gen-gogo. +// source: combos/unsafeboth/theproto3.proto +// DO NOT EDIT! + +/* + Package theproto3 is a generated protocol buffer package. + + It is generated from these files: + combos/unsafeboth/theproto3.proto + + It has these top-level messages: + Message + Nested + AllMaps + AllMapsOrdered + MessageWithMap + FloatingPoint + Uint128Pair + ContainsNestedMap +*/ +package theproto3 + +import proto "github.com/gogo/protobuf/proto" +import fmt "fmt" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" +import test "github.com/gogo/protobuf/test/combos/both" + +import github_com_gogo_protobuf_test_custom "github.com/gogo/protobuf/test/custom" + +import github_com_gogo_protobuf_protoc_gen_gogo_descriptor "github.com/gogo/protobuf/protoc-gen-gogo/descriptor" +import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" +import compress_gzip "compress/gzip" +import bytes "bytes" +import io_ioutil "io/ioutil" + +import strconv "strconv" + +import strings "strings" +import sort "sort" +import reflect "reflect" +import github_com_gogo_protobuf_sortkeys "github.com/gogo/protobuf/sortkeys" + +import unsafe "unsafe" +import errors "errors" + +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. +const _ = proto.GoGoProtoPackageIsVersion1 + +type MapEnum int32 + +const ( + MA MapEnum = 0 + MB MapEnum = 1 + MC MapEnum = 2 +) + +var MapEnum_name = map[int32]string{ + 0: "MA", + 1: "MB", + 2: "MC", +} +var MapEnum_value = map[string]int32{ + "MA": 0, + "MB": 1, + "MC": 2, +} + +func (MapEnum) EnumDescriptor() ([]byte, []int) { return fileDescriptorTheproto3, []int{0} } + +type Message_Humour int32 + +const ( + UNKNOWN Message_Humour = 0 + PUNS Message_Humour = 1 + SLAPSTICK Message_Humour = 2 + BILL_BAILEY Message_Humour = 3 +) + +var Message_Humour_name = map[int32]string{ + 0: "UNKNOWN", + 1: "PUNS", + 2: "SLAPSTICK", + 3: "BILL_BAILEY", +} +var Message_Humour_value = map[string]int32{ + "UNKNOWN": 0, + "PUNS": 1, + "SLAPSTICK": 2, + "BILL_BAILEY": 3, +} + +func (Message_Humour) EnumDescriptor() ([]byte, []int) { return fileDescriptorTheproto3, []int{0, 0} } + +type Message struct { + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + Hilarity Message_Humour `protobuf:"varint,2,opt,name=hilarity,proto3,enum=theproto3.Message_Humour" json:"hilarity,omitempty"` + HeightInCm uint32 `protobuf:"varint,3,opt,name=height_in_cm,json=heightInCm,proto3" json:"height_in_cm,omitempty"` + Data []byte `protobuf:"bytes,4,opt,name=data,proto3" json:"data,omitempty"` + ResultCount int64 `protobuf:"varint,7,opt,name=result_count,json=resultCount,proto3" json:"result_count,omitempty"` + TrueScotsman bool `protobuf:"varint,8,opt,name=true_scotsman,json=trueScotsman,proto3" json:"true_scotsman,omitempty"` + Score float32 `protobuf:"fixed32,9,opt,name=score,proto3" json:"score,omitempty"` + Key []uint64 `protobuf:"varint,5,rep,name=key" json:"key,omitempty"` + Nested *Nested `protobuf:"bytes,6,opt,name=nested" json:"nested,omitempty"` + Terrain map[int64]*Nested `protobuf:"bytes,10,rep,name=terrain" json:"terrain,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value"` + Proto2Field *test.NinOptNative `protobuf:"bytes,11,opt,name=proto2_field,json=proto2Field" json:"proto2_field,omitempty"` + Proto2Value map[int64]*test.NinOptEnum `protobuf:"bytes,13,rep,name=proto2_value,json=proto2Value" json:"proto2_value,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value"` +} + +func (m *Message) Reset() { *m = Message{} } +func (*Message) ProtoMessage() {} +func (*Message) Descriptor() ([]byte, []int) { return fileDescriptorTheproto3, []int{0} } + +type Nested struct { + Bunny string `protobuf:"bytes,1,opt,name=bunny,proto3" json:"bunny,omitempty"` +} + +func (m *Nested) Reset() { *m = Nested{} } +func (*Nested) ProtoMessage() {} +func (*Nested) Descriptor() ([]byte, []int) { return fileDescriptorTheproto3, []int{1} } + +type AllMaps struct { + StringToDoubleMap map[string]float64 `protobuf:"bytes,1,rep,name=StringToDoubleMap,json=stringToDoubleMap" json:"StringToDoubleMap,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"fixed64,2,opt,name=value,proto3"` + StringToFloatMap map[string]float32 `protobuf:"bytes,2,rep,name=StringToFloatMap,json=stringToFloatMap" json:"StringToFloatMap,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"fixed32,2,opt,name=value,proto3"` + Int32Map map[int32]int32 `protobuf:"bytes,3,rep,name=Int32Map,json=int32Map" json:"Int32Map,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` + Int64Map map[int64]int64 `protobuf:"bytes,4,rep,name=Int64Map,json=int64Map" json:"Int64Map,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` + Uint32Map map[uint32]uint32 `protobuf:"bytes,5,rep,name=Uint32Map,json=uint32Map" json:"Uint32Map,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` + Uint64Map map[uint64]uint64 `protobuf:"bytes,6,rep,name=Uint64Map,json=uint64Map" json:"Uint64Map,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` + Sint32Map map[int32]int32 `protobuf:"bytes,7,rep,name=Sint32Map,json=sint32Map" json:"Sint32Map,omitempty" protobuf_key:"zigzag32,1,opt,name=key,proto3" protobuf_val:"zigzag32,2,opt,name=value,proto3"` + Sint64Map map[int64]int64 `protobuf:"bytes,8,rep,name=Sint64Map,json=sint64Map" json:"Sint64Map,omitempty" protobuf_key:"zigzag64,1,opt,name=key,proto3" protobuf_val:"zigzag64,2,opt,name=value,proto3"` + Fixed32Map map[uint32]uint32 `protobuf:"bytes,9,rep,name=Fixed32Map,json=fixed32Map" json:"Fixed32Map,omitempty" protobuf_key:"fixed32,1,opt,name=key,proto3" protobuf_val:"fixed32,2,opt,name=value,proto3"` + Sfixed32Map map[int32]int32 `protobuf:"bytes,10,rep,name=Sfixed32Map,json=sfixed32Map" json:"Sfixed32Map,omitempty" protobuf_key:"fixed32,1,opt,name=key,proto3" protobuf_val:"fixed32,2,opt,name=value,proto3"` + Fixed64Map map[uint64]uint64 `protobuf:"bytes,11,rep,name=Fixed64Map,json=fixed64Map" json:"Fixed64Map,omitempty" protobuf_key:"fixed64,1,opt,name=key,proto3" protobuf_val:"fixed64,2,opt,name=value,proto3"` + Sfixed64Map map[int64]int64 `protobuf:"bytes,12,rep,name=Sfixed64Map,json=sfixed64Map" json:"Sfixed64Map,omitempty" protobuf_key:"fixed64,1,opt,name=key,proto3" protobuf_val:"fixed64,2,opt,name=value,proto3"` + BoolMap map[bool]bool `protobuf:"bytes,13,rep,name=BoolMap,json=boolMap" json:"BoolMap,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` + StringMap map[string]string `protobuf:"bytes,14,rep,name=StringMap,json=stringMap" json:"StringMap,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + StringToBytesMap map[string][]byte `protobuf:"bytes,15,rep,name=StringToBytesMap,json=stringToBytesMap" json:"StringToBytesMap,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + StringToEnumMap map[string]MapEnum `protobuf:"bytes,16,rep,name=StringToEnumMap,json=stringToEnumMap" json:"StringToEnumMap,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3,enum=theproto3.MapEnum"` + StringToMsgMap map[string]*FloatingPoint `protobuf:"bytes,17,rep,name=StringToMsgMap,json=stringToMsgMap" json:"StringToMsgMap,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value"` +} + +func (m *AllMaps) Reset() { *m = AllMaps{} } +func (*AllMaps) ProtoMessage() {} +func (*AllMaps) Descriptor() ([]byte, []int) { return fileDescriptorTheproto3, []int{2} } + +type AllMapsOrdered struct { + StringToDoubleMap map[string]float64 `protobuf:"bytes,1,rep,name=StringToDoubleMap,json=stringToDoubleMap" json:"StringToDoubleMap,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"fixed64,2,opt,name=value,proto3"` + StringToFloatMap map[string]float32 `protobuf:"bytes,2,rep,name=StringToFloatMap,json=stringToFloatMap" json:"StringToFloatMap,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"fixed32,2,opt,name=value,proto3"` + Int32Map map[int32]int32 `protobuf:"bytes,3,rep,name=Int32Map,json=int32Map" json:"Int32Map,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` + Int64Map map[int64]int64 `protobuf:"bytes,4,rep,name=Int64Map,json=int64Map" json:"Int64Map,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` + Uint32Map map[uint32]uint32 `protobuf:"bytes,5,rep,name=Uint32Map,json=uint32Map" json:"Uint32Map,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` + Uint64Map map[uint64]uint64 `protobuf:"bytes,6,rep,name=Uint64Map,json=uint64Map" json:"Uint64Map,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` + Sint32Map map[int32]int32 `protobuf:"bytes,7,rep,name=Sint32Map,json=sint32Map" json:"Sint32Map,omitempty" protobuf_key:"zigzag32,1,opt,name=key,proto3" protobuf_val:"zigzag32,2,opt,name=value,proto3"` + Sint64Map map[int64]int64 `protobuf:"bytes,8,rep,name=Sint64Map,json=sint64Map" json:"Sint64Map,omitempty" protobuf_key:"zigzag64,1,opt,name=key,proto3" protobuf_val:"zigzag64,2,opt,name=value,proto3"` + Fixed32Map map[uint32]uint32 `protobuf:"bytes,9,rep,name=Fixed32Map,json=fixed32Map" json:"Fixed32Map,omitempty" protobuf_key:"fixed32,1,opt,name=key,proto3" protobuf_val:"fixed32,2,opt,name=value,proto3"` + Sfixed32Map map[int32]int32 `protobuf:"bytes,10,rep,name=Sfixed32Map,json=sfixed32Map" json:"Sfixed32Map,omitempty" protobuf_key:"fixed32,1,opt,name=key,proto3" protobuf_val:"fixed32,2,opt,name=value,proto3"` + Fixed64Map map[uint64]uint64 `protobuf:"bytes,11,rep,name=Fixed64Map,json=fixed64Map" json:"Fixed64Map,omitempty" protobuf_key:"fixed64,1,opt,name=key,proto3" protobuf_val:"fixed64,2,opt,name=value,proto3"` + Sfixed64Map map[int64]int64 `protobuf:"bytes,12,rep,name=Sfixed64Map,json=sfixed64Map" json:"Sfixed64Map,omitempty" protobuf_key:"fixed64,1,opt,name=key,proto3" protobuf_val:"fixed64,2,opt,name=value,proto3"` + BoolMap map[bool]bool `protobuf:"bytes,13,rep,name=BoolMap,json=boolMap" json:"BoolMap,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` + StringMap map[string]string `protobuf:"bytes,14,rep,name=StringMap,json=stringMap" json:"StringMap,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + StringToBytesMap map[string][]byte `protobuf:"bytes,15,rep,name=StringToBytesMap,json=stringToBytesMap" json:"StringToBytesMap,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + StringToEnumMap map[string]MapEnum `protobuf:"bytes,16,rep,name=StringToEnumMap,json=stringToEnumMap" json:"StringToEnumMap,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3,enum=theproto3.MapEnum"` + StringToMsgMap map[string]*FloatingPoint `protobuf:"bytes,17,rep,name=StringToMsgMap,json=stringToMsgMap" json:"StringToMsgMap,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value"` +} + +func (m *AllMapsOrdered) Reset() { *m = AllMapsOrdered{} } +func (*AllMapsOrdered) ProtoMessage() {} +func (*AllMapsOrdered) Descriptor() ([]byte, []int) { return fileDescriptorTheproto3, []int{3} } + +type MessageWithMap struct { + NameMapping map[int32]string `protobuf:"bytes,1,rep,name=name_mapping,json=nameMapping" json:"name_mapping,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + MsgMapping map[int64]*FloatingPoint `protobuf:"bytes,2,rep,name=msg_mapping,json=msgMapping" json:"msg_mapping,omitempty" protobuf_key:"zigzag64,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value"` + ByteMapping map[bool][]byte `protobuf:"bytes,3,rep,name=byte_mapping,json=byteMapping" json:"byte_mapping,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` +} + +func (m *MessageWithMap) Reset() { *m = MessageWithMap{} } +func (*MessageWithMap) ProtoMessage() {} +func (*MessageWithMap) Descriptor() ([]byte, []int) { return fileDescriptorTheproto3, []int{4} } + +type FloatingPoint struct { + F float64 `protobuf:"fixed64,1,opt,name=f,proto3" json:"f,omitempty"` +} + +func (m *FloatingPoint) Reset() { *m = FloatingPoint{} } +func (*FloatingPoint) ProtoMessage() {} +func (*FloatingPoint) Descriptor() ([]byte, []int) { return fileDescriptorTheproto3, []int{5} } + +type Uint128Pair struct { + Left github_com_gogo_protobuf_test_custom.Uint128 `protobuf:"bytes,1,opt,name=left,proto3,customtype=github.com/gogo/protobuf/test/custom.Uint128" json:"left"` + Right *github_com_gogo_protobuf_test_custom.Uint128 `protobuf:"bytes,2,opt,name=right,proto3,customtype=github.com/gogo/protobuf/test/custom.Uint128" json:"right,omitempty"` +} + +func (m *Uint128Pair) Reset() { *m = Uint128Pair{} } +func (*Uint128Pair) ProtoMessage() {} +func (*Uint128Pair) Descriptor() ([]byte, []int) { return fileDescriptorTheproto3, []int{6} } + +type ContainsNestedMap struct { +} + +func (m *ContainsNestedMap) Reset() { *m = ContainsNestedMap{} } +func (*ContainsNestedMap) ProtoMessage() {} +func (*ContainsNestedMap) Descriptor() ([]byte, []int) { return fileDescriptorTheproto3, []int{7} } + +type ContainsNestedMap_NestedMap struct { + NestedMapField map[string]float64 `protobuf:"bytes,1,rep,name=NestedMapField,json=nestedMapField" json:"NestedMapField,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"fixed64,2,opt,name=value,proto3"` +} + +func (m *ContainsNestedMap_NestedMap) Reset() { *m = ContainsNestedMap_NestedMap{} } +func (*ContainsNestedMap_NestedMap) ProtoMessage() {} +func (*ContainsNestedMap_NestedMap) Descriptor() ([]byte, []int) { + return fileDescriptorTheproto3, []int{7, 0} +} + +func init() { + proto.RegisterType((*Message)(nil), "theproto3.Message") + proto.RegisterType((*Nested)(nil), "theproto3.Nested") + proto.RegisterType((*AllMaps)(nil), "theproto3.AllMaps") + proto.RegisterType((*AllMapsOrdered)(nil), "theproto3.AllMapsOrdered") + proto.RegisterType((*MessageWithMap)(nil), "theproto3.MessageWithMap") + proto.RegisterType((*FloatingPoint)(nil), "theproto3.FloatingPoint") + proto.RegisterType((*Uint128Pair)(nil), "theproto3.Uint128Pair") + proto.RegisterType((*ContainsNestedMap)(nil), "theproto3.ContainsNestedMap") + proto.RegisterType((*ContainsNestedMap_NestedMap)(nil), "theproto3.ContainsNestedMap.NestedMap") + proto.RegisterEnum("theproto3.MapEnum", MapEnum_name, MapEnum_value) + proto.RegisterEnum("theproto3.Message_Humour", Message_Humour_name, Message_Humour_value) +} +func (this *Message) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return Theproto3Description() +} +func (this *Nested) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return Theproto3Description() +} +func (this *AllMaps) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return Theproto3Description() +} +func (this *AllMapsOrdered) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return Theproto3Description() +} +func (this *MessageWithMap) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return Theproto3Description() +} +func (this *FloatingPoint) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return Theproto3Description() +} +func (this *Uint128Pair) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return Theproto3Description() +} +func (this *ContainsNestedMap) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return Theproto3Description() +} +func (this *ContainsNestedMap_NestedMap) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return Theproto3Description() +} +func Theproto3Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + d := &github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet{} + var gzipped = []byte{ + // 7457 bytes of a gzipped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x3a, 0xb3, 0x82, 0x70, 0xd5, 0xe9, 0x58, 0x97, 0x21, 0xbe, 0x89, 0x1a, + 0x73, 0xc6, 0x71, 0xf3, 0x74, 0x6a, 0xfa, 0xe4, 0xa4, 0x06, 0x9a, 0x54, 0x11, 0x2b, 0xb8, 0xd9, + 0x26, 0x88, 0xfc, 0x77, 0xe3, 0x70, 0x30, 0xa0, 0xd7, 0xb2, 0x20, 0xee, 0x56, 0x77, 0x30, 0x47, + 0xe3, 0xf4, 0x90, 0x4d, 0xbe, 0x5b, 0x39, 0x18, 0xdc, 0xad, 0xd6, 0x9e, 0xae, 0x6e, 0x39, 0xb9, + 0x18, 0x69, 0xe6, 0x97, 0xd6, 0x51, 0x80, 0xba, 0xb3, 0xeb, 0xb8, 0x75, 0xc7, 0xad, 0x5d, 0xcb, + 0x99, 0x48, 0x8a, 0x21, 0x5b, 0x6a, 0xb1, 0xde, 0x06, 0xa3, 0xbb, 0x7b, 0x1b, 0xcd, 0x46, 0xad, + 0x22, 0x91, 0x01, 0x22, 0x4b, 0xd8, 0x59, 0xda, 0x31, 0xeb, 0x13, 0xdf, 0x05, 0x23, 0xcf, 0x3a, + 0xd5, 0xa7, 0x65, 0xd2, 0x14, 0x21, 0xcd, 0xe0, 0x66, 0x89, 0xb0, 0x04, 0xe9, 0x1d, 0xc7, 0xf3, + 0x90, 0x00, 0x95, 0xce, 0xb5, 0x5d, 0x27, 0x17, 0x27, 0xb3, 0x3f, 0xde, 0x35, 0x7b, 0x7d, 0xe6, + 0x29, 0x86, 0x5a, 0x43, 0x20, 0x6b, 0x06, 0x86, 0x1c, 0x77, 0x6f, 0x87, 0x72, 0x48, 0x84, 0xe8, + 0xaf, 0x8c, 0x28, 0x74, 0x2e, 0x49, 0x0c, 0x63, 0x2c, 0x06, 0x3d, 0xa7, 0xfd, 0x4c, 0xa3, 0xe6, + 0xe4, 0x06, 0x08, 0x83, 0xbb, 0xba, 0x18, 0xac, 0xd2, 0x7e, 0x9d, 0x07, 0x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x38, 0x90, 0x79, 0xa0, 0xa0, 0xb7, 0x03, 0x34, 0xdc, 0xdd, 0xbd, + 0x0e, 0x5d, 0x57, 0x69, 0x9a, 0x19, 0x22, 0x2d, 0x24, 0x84, 0x71, 0x0a, 0xd9, 0xeb, 0x88, 0x7e, + 0x93, 0xf4, 0x03, 0x6d, 0x22, 0x04, 0x97, 0x7d, 0x41, 0xe3, 0x44, 0xd0, 0xa3, 0x21, 0x33, 0xed, + 0x5a, 0xb2, 0xa6, 0x20, 0x5b, 0x6b, 0x36, 0x1c, 0xb7, 0x53, 0xf1, 0x3a, 0x6d, 0xa7, 0xba, 0xd3, + 0x70, 0xb7, 0x48, 0x1e, 0x4d, 0x16, 0x12, 0x9b, 0xd5, 0xa6, 0xe7, 0xd8, 0x23, 0xb4, 0x7b, 0x95, + 0xf7, 0x62, 0x04, 0x59, 0x2c, 0xda, 0x12, 0x62, 0x40, 0x41, 0xd0, 0x6e, 0x81, 0xc8, 0x7f, 0x63, + 0x10, 0x52, 0x52, 0x75, 0x66, 0x9d, 0x80, 0xf4, 0x53, 0xd5, 0x67, 0xaa, 0x15, 0x5e, 0x71, 0x53, + 0x4d, 0xa4, 0x70, 0xdb, 0x0a, 0xab, 0xba, 0xa7, 0xe0, 0x10, 0x21, 0x41, 0x73, 0x44, 0x03, 0xd5, + 0x9a, 0x55, 0xcf, 0x23, 0x4a, 0x4b, 0x12, 0x52, 0x0b, 0xf7, 0x2d, 0xe3, 0xae, 0x12, 0xef, 0xb1, + 0x2e, 0xc0, 0x41, 0x82, 0xd8, 0x41, 0x89, 0xb7, 0xb1, 0xdb, 0x74, 0x2a, 0xf8, 0x1e, 0xc0, 0x23, + 0xf9, 0x54, 0x48, 0x36, 0x8a, 0x29, 0x16, 0x19, 0x01, 0x96, 0xc8, 0xb3, 0xae, 0xc0, 0xed, 0x04, + 0xb6, 0xe5, 0xb8, 0x4e, 0xbb, 0xda, 0x71, 0x2a, 0xce, 0x2f, 0xee, 0x21, 0xda, 0x4a, 0xd5, 0xad, + 0x57, 0xb6, 0xab, 0xde, 0x76, 0xee, 0x90, 0xcc, 0xe0, 0x56, 0x4c, 0x7b, 0x85, 0x91, 0x96, 0x09, + 0xe5, 0x8c, 0x5b, 0x7f, 0x04, 0xd1, 0x59, 0x05, 0x18, 0x23, 0x8c, 0x90, 0x52, 0xd0, 0x9c, 0x2b, + 0xb5, 0x6d, 0xa7, 0xf6, 0x74, 0x65, 0xaf, 0xb3, 0x79, 0x39, 0x77, 0x9b, 0xcc, 0x81, 0x08, 0xb9, + 0x4a, 0x68, 0x4a, 0x98, 0x64, 0x1d, 0x51, 0x58, 0xab, 0x90, 0xc6, 0xf6, 0xd8, 0x69, 0xbc, 0x0b, + 0x89, 0xdd, 0x6a, 0x93, 0x35, 0x22, 0x13, 0x10, 0xdc, 0x92, 0x12, 0x27, 0x97, 0x19, 0x60, 0x11, + 0xd5, 0xa7, 0x85, 0xc4, 0xea, 0x4a, 0xb9, 0x3c, 0x6b, 0xa7, 0x38, 0x97, 0xb9, 0x56, 0x1b, 0xfb, + 0xd4, 0x56, 0x4b, 0xe8, 0x38, 0x45, 0x7d, 0x6a, 0xab, 0xc5, 0x35, 0x8c, 0xf4, 0x55, 0xab, 0xd1, + 0x69, 0xa3, 0x7b, 0x17, 0x56, 0xac, 0x7b, 0xb9, 0xac, 0xa2, 0xaf, 0x5a, 0xed, 0x0a, 0x25, 0x60, + 0x6e, 0xee, 0xa1, 0x90, 0x38, 0xec, 0xeb, 0x4b, 0x06, 0x8e, 0x76, 0xcd, 0x52, 0x87, 0xa2, 0x11, + 0x77, 0xaf, 0x75, 0x03, 0x2d, 0x65, 0xc4, 0xdd, 0x6b, 0x3a, 0xec, 0x4e, 0x72, 0x03, 0xd6, 0x76, + 0x6a, 0x48, 0xe5, 0xf5, 0xdc, 0x2d, 0x32, 0xb5, 0xd4, 0x61, 0x9d, 0x41, 0x8e, 0x5c, 0xab, 0x38, + 0x6e, 0x75, 0x03, 0xd9, 0xbe, 0xda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x0f, 0xaf, 0xaf, 0x33, 0x5e, 0x69, 0x47, 0x66, 0x72, 0x05, 0x46, 0x08, 0x93, 0xda, + 0x9e, 0xd7, 0x69, 0xed, 0x90, 0x04, 0xd1, 0x9b, 0xcd, 0xdf, 0x7f, 0x97, 0x3a, 0x55, 0x06, 0xc3, + 0x4a, 0x02, 0x55, 0x78, 0x14, 0x0e, 0xe1, 0x16, 0x12, 0x83, 0x32, 0xb7, 0xe8, 0x2d, 0x84, 0xdc, + 0x3f, 0xbd, 0x87, 0xfa, 0xde, 0x41, 0xc1, 0x40, 0xe2, 0x2b, 0x59, 0x62, 0xcb, 0xe9, 0xa0, 0xdc, + 0x86, 0xee, 0xff, 0x9a, 0x4d, 0xab, 0xe7, 0x19, 0x43, 0xee, 0x43, 0xdf, 0x57, 0x2d, 0x71, 0x85, + 0x22, 0x67, 0x9a, 0xcd, 0xc2, 0x3a, 0xdc, 0x12, 0x60, 0xd9, 0x3e, 0x78, 0x7e, 0x98, 0xf1, 0x3c, + 0xd4, 0x65, 0x5d, 0xcc, 0x76, 0x05, 0x78, 0xbb, 0xb0, 0x47, 0x1f, 0x3c, 0x3f, 0xc2, 0x78, 0x5a, + 0x0c, 0xcb, 0xcd, 0x82, 0x39, 0x5e, 0x85, 0x51, 0x74, 0xa7, 0xbe, 0xd1, 0xf2, 0xd8, 0x7d, 0x6f, + 0x1f, 0xec, 0x3e, 0xca, 0xd8, 0x8d, 0x30, 0x20, 0xb9, 0x0b, 0xc6, 0xbc, 0xee, 0x83, 0xe4, 0x26, + 0xba, 0x01, 0xea, 0x83, 0xc5, 0xc7, 0x18, 0x8b, 0x41, 0x4c, 0x8f, 0xa1, 0x33, 0x90, 0xde, 0x6a, + 0xb1, 0x34, 0x1c, 0x0d, 0xff, 0x38, 0x83, 0xa7, 0x38, 0x86, 0xb1, 0xd8, 0x6d, 0xed, 0xee, 0x35, + 0x71, 0x8e, 0x8e, 0x66, 0xf1, 0x09, 0xce, 0x82, 0x63, 0x18, 0x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c3, 0x38, 0xb6, 0xd5, 0xfe, 0x73, 0x7e, 0xff, 0xf9, 0x5c, 0x06, + 0xbb, 0x93, 0xda, 0x7f, 0xde, 0xef, 0xbf, 0x90, 0x1b, 0xc1, 0x5b, 0xbd, 0x6a, 0xff, 0x85, 0xfc, + 0xbb, 0x89, 0x79, 0x5d, 0xdf, 0xbc, 0x63, 0xaa, 0x79, 0x85, 0x61, 0xc7, 0x54, 0xc3, 0x0a, 0x93, + 0x8e, 0xa9, 0x26, 0x15, 0xc6, 0x1c, 0x53, 0x8d, 0x29, 0xcc, 0x38, 0xa6, 0x9a, 0x51, 0x18, 0x70, + 0x4c, 0x35, 0xa0, 0x30, 0xdd, 0x98, 0x6a, 0x3a, 0x61, 0xb4, 0x31, 0xd5, 0x68, 0xc2, 0x5c, 0x63, + 0xaa, 0xb9, 0x84, 0xa1, 0x72, 0x9a, 0xa1, 0x7c, 0x13, 0xe5, 0x34, 0x13, 0xf9, 0xc6, 0xc9, 0x69, + 0xc6, 0xf1, 0xcd, 0x92, 0xd3, 0xcc, 0xe2, 0x1b, 0x24, 0xa7, 0x19, 0xc4, 0x37, 0x45, 0x4e, 0x33, + 0x85, 0x6f, 0x04, 0x16, 0x63, 0xb6, 0xb3, 0x1b, 0x10, 0x63, 0x66, 0xcf, 0x18, 0x33, 0x7b, 0xc6, + 0x98, 0xd9, 0x33, 0xc6, 0xcc, 0x9e, 0x31, 0x66, 0xf6, 0x8c, 0x31, 0xb3, 0x67, 0x8c, 0x99, 0x3d, + 0x63, 0xcc, 0xec, 0x19, 0x63, 0x66, 0xef, 0x18, 0x33, 0x23, 0x62, 0xcc, 0x8c, 0x88, 0x31, 0x33, + 0x22, 0xc6, 0xcc, 0x88, 0x18, 0x33, 0x23, 0x62, 0xcc, 0x0c, 0x8d, 0x31, 0xdf, 0xbc, 0x63, 0xaa, + 0x79, 0x03, 0x63, 0xcc, 0x0c, 0x89, 0x31, 0x33, 0x24, 0xc6, 0xcc, 0x90, 0x18, 0x33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dd, 0x83, 0xfc, 0x47, 0x7c, 0xf2, 0xda, + 0x89, 0x62, 0x94, 0x07, 0x99, 0x7d, 0x78, 0x90, 0xd9, 0x87, 0x07, 0x99, 0x7d, 0x78, 0x90, 0xd9, + 0x87, 0x07, 0x99, 0x7d, 0x78, 0x90, 0xd9, 0x87, 0x07, 0x99, 0x7d, 0x78, 0x90, 0xd9, 0x8f, 0x07, + 0x99, 0x7d, 0x79, 0x90, 0x19, 0xe6, 0x41, 0x27, 0xf5, 0x07, 0x1e, 0x20, 0x28, 0x21, 0x9d, 0xd4, + 0x4f, 0x3e, 0xa3, 0x5d, 0xc8, 0xec, 0xcb, 0x85, 0xcc, 0x30, 0x17, 0xfa, 0x0a, 0x2a, 0xa4, 0x14, + 0x17, 0x62, 0xc7, 0x43, 0xaf, 0x57, 0x06, 0xba, 0xd8, 0xc7, 0xf3, 0x15, 0x41, 0x3e, 0x75, 0xb1, + 0x8f, 0x33, 0xea, 0x5e, 0x7e, 0xd6, 0x9d, 0x85, 0xca, 0x7d, 0x64, 0xa1, 0x39, 0xe1, 0x43, 0x17, + 0xfb, 0x78, 0xee, 0xa2, 0xdb, 0xf7, 0x2e, 0xf7, 0x4a, 0x02, 0x8f, 0xf4, 0x95, 0x04, 0xe6, 0xfb, + 0x4a, 0x02, 0x57, 0x7d, 0x0b, 0xbe, 0x37, 0x06, 0x87, 0x7c, 0x0b, 0xd2, 0x6f, 0xe4, 0x15, 0x2a, + 0x79, 0xe9, 0x84, 0xca, 0xe2, 0xa7, 0x36, 0x92, 0x19, 0xf1, 0xf9, 0xcd, 0x8a, 0x7a, 0x56, 0x55, + 0xd8, 0xef, 0xf9, 0x8d, 0x64, 0x71, 0xb6, 0x17, 0x7a, 0x12, 0xcc, 0xf9, 0xba, 0x47, 0xb2, 0x45, + 0xd0, 0xb0, 0x25, 0xdb, 0x6c, 0xd4, 0x3d, 0xcb, 0x86, 0x01, 0x32, 0xae, 0x47, 0xcc, 0x7b, 0x33, + 0x03, 0x23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 0x03, 0x90, 0x9c, 0x77, 0x3b, + 0xe7, 0xa6, 0x31, 0x37, 0xfe, 0x46, 0xff, 0x6e, 0x6e, 0x9c, 0x84, 0x72, 0x49, 0x36, 0xd8, 0x25, + 0x43, 0x5f, 0x3c, 0x8f, 0xd1, 0xf1, 0x5e, 0x68, 0x42, 0xe2, 0xa3, 0xc9, 0x25, 0x3e, 0x4d, 0x59, + 0xe7, 0xac, 0xd8, 0x4b, 0xfc, 0x4f, 0x04, 0xc0, 0x05, 0x0d, 0xc5, 0x0f, 0xed, 0x89, 0xe1, 0x19, + 0x03, 0x3a, 0xfe, 0x40, 0x4f, 0x06, 0x92, 0x00, 0x84, 0x81, 0x90, 0x60, 0x55, 0x48, 0x30, 0x18, + 0xca, 0x60, 0x55, 0x93, 0xc0, 0x93, 0x25, 0x58, 0x15, 0x12, 0x24, 0x7b, 0x32, 0x90, 0x25, 0xf0, + 0x84, 0x04, 0x45, 0x80, 0xb9, 0xc6, 0x73, 0x4e, 0x9d, 0x8a, 0x40, 0xdf, 0xf7, 0x9f, 0x0f, 0xe0, + 0xe0, 0x13, 0x51, 0x16, 0xb0, 0x29, 0x1a, 0xac, 0x32, 0xa4, 0x56, 0xfd, 0x4b, 0x96, 0x3e, 0xee, + 0x08, 0x12, 0x63, 0x53, 0xe3, 0x92, 0xf2, 0x24, 0x36, 0x5c, 0x14, 0x3a, 0x99, 0x54, 0x6f, 0x51, + 0xa4, 0xd9, 0x50, 0x51, 0xe8, 0x74, 0x84, 0x28, 0x94, 0x49, 0x3a, 0x42, 0x14, 0x89, 0x0b, 0x13, + 0x85, 0xb2, 0x41, 0xc9, 0xb0, 0xd8, 0x6a, 0x61, 0x4a, 0x96, 0x95, 0x8e, 0x05, 0xb0, 0x60, 0x14, + 0x2c, 0x19, 0x6e, 0xd0, 0x2b, 0x62, 0x11, 0xe2, 0xe4, 0x18, 0x9c, 0x09, 0xb7, 0x08, 0xa7, 0xe1, + 0x16, 0xe1, 0xd7, 0x72, 0x9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 0x4c, 0x97, 0x3c, 0x2a, 0x26, + 0x64, 0x87, 0xcc, 0xdf, 0x0e, 0xc3, 0x0a, 0x6f, 0x2b, 0x0d, 0xc6, 0x26, 0xfb, 0xb9, 0x9e, 0xb1, + 0x89, 0x7f, 0x21, 0x9d, 0x62, 0x67, 0xd5, 0x2b, 0xd5, 0x46, 0xdb, 0x7a, 0x04, 0xc8, 0x0f, 0x62, + 0xd8, 0x79, 0xfc, 0x8d, 0xfd, 0x3c, 0x93, 0xfe, 0xa4, 0x66, 0x0e, 0xe8, 0xef, 0x65, 0x6e, 0xfc, + 0xf7, 0xa5, 0xf4, 0xe7, 0x36, 0xd7, 0x0d, 0x18, 0x65, 0x8f, 0x52, 0x7a, 0xec, 0x01, 0x5b, 0xb4, + 0x42, 0x7e, 0xc1, 0x80, 0x21, 0x71, 0x65, 0x6d, 0x40, 0x46, 0x5c, 0xd0, 0x87, 0xb8, 0xa9, 0xa7, + 0x16, 0x24, 0x0d, 0x77, 0xf1, 0x98, 0x0c, 0xf8, 0x46, 0x4f, 0xb0, 0xe8, 0x9a, 0xec, 0x2a, 0x8d, + 0xe3, 0x33, 0x70, 0x30, 0x80, 0x6c, 0x3f, 0x0b, 0xf2, 0xc4, 0x09, 0x18, 0x64, 0xa1, 0x8d, 0x4f, + 0x0c, 0x17, 0xf1, 0x89, 0x23, 0xfe, 0x8b, 0x4f, 0x31, 0xf1, 0xdf, 0x52, 0x36, 0x56, 0x5c, 0xb8, + 0x81, 0x53, 0xa4, 0x03, 0xaf, 0xa0, 0x8f, 0x76, 0x8a, 0x64, 0x3c, 0xff, 0x9d, 0xa3, 0xc6, 0xc6, + 0x00, 0x9d, 0xfb, 0xff, 0x05, 0x00, 0x00, 0xff, 0xff, 0x0b, 0x08, 0x5d, 0x44, 0x79, 0x79, 0x00, + 0x00, + } + r := bytes.NewReader(gzipped) + gzipr, err := compress_gzip.NewReader(r) + if err != nil { + panic(err) + } + ungzipped, err := io_ioutil.ReadAll(gzipr) + if err != nil { + panic(err) + } + if err := github_com_gogo_protobuf_proto.Unmarshal(ungzipped, d); err != nil { + panic(err) + } + return d +} +func (x MapEnum) String() string { + s, ok := MapEnum_name[int32(x)] + if ok { + return s + } + return strconv.Itoa(int(x)) +} +func (x Message_Humour) String() string { + s, ok := Message_Humour_name[int32(x)] + if ok { + return s + } + return strconv.Itoa(int(x)) +} +func (this *Message) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*Message) + if !ok { + that2, ok := that.(Message) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *Message") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *Message but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *Message 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.Hilarity != that1.Hilarity { + return fmt.Errorf("Hilarity this(%v) Not Equal that(%v)", this.Hilarity, that1.Hilarity) + } + if this.HeightInCm != that1.HeightInCm { + return fmt.Errorf("HeightInCm this(%v) Not Equal that(%v)", this.HeightInCm, that1.HeightInCm) + } + if !bytes.Equal(this.Data, that1.Data) { + return fmt.Errorf("Data this(%v) Not Equal that(%v)", this.Data, that1.Data) + } + if this.ResultCount != that1.ResultCount { + return fmt.Errorf("ResultCount this(%v) Not Equal that(%v)", this.ResultCount, that1.ResultCount) + } + if this.TrueScotsman != that1.TrueScotsman { + return fmt.Errorf("TrueScotsman this(%v) Not Equal that(%v)", this.TrueScotsman, that1.TrueScotsman) + } + if this.Score != that1.Score { + return fmt.Errorf("Score this(%v) Not Equal that(%v)", this.Score, that1.Score) + } + if len(this.Key) != len(that1.Key) { + return fmt.Errorf("Key this(%v) Not Equal that(%v)", len(this.Key), len(that1.Key)) + } + for i := range this.Key { + if this.Key[i] != that1.Key[i] { + return fmt.Errorf("Key this[%v](%v) Not Equal that[%v](%v)", i, this.Key[i], i, that1.Key[i]) + } + } + if !this.Nested.Equal(that1.Nested) { + return fmt.Errorf("Nested this(%v) Not Equal that(%v)", this.Nested, that1.Nested) + } + if len(this.Terrain) != len(that1.Terrain) { + return fmt.Errorf("Terrain this(%v) Not Equal that(%v)", len(this.Terrain), len(that1.Terrain)) + } + for i := range this.Terrain { + if !this.Terrain[i].Equal(that1.Terrain[i]) { + return fmt.Errorf("Terrain this[%v](%v) Not Equal that[%v](%v)", i, this.Terrain[i], i, that1.Terrain[i]) + } + } + if !this.Proto2Field.Equal(that1.Proto2Field) { + return fmt.Errorf("Proto2Field this(%v) Not Equal that(%v)", this.Proto2Field, that1.Proto2Field) + } + if len(this.Proto2Value) != len(that1.Proto2Value) { + return fmt.Errorf("Proto2Value this(%v) Not Equal that(%v)", len(this.Proto2Value), len(that1.Proto2Value)) + } + for i := range this.Proto2Value { + if !this.Proto2Value[i].Equal(that1.Proto2Value[i]) { + return fmt.Errorf("Proto2Value this[%v](%v) Not Equal that[%v](%v)", i, this.Proto2Value[i], i, that1.Proto2Value[i]) + } + } + return nil +} +func (this *Message) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*Message) + if !ok { + that2, ok := that.(Message) + 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.Hilarity != that1.Hilarity { + return false + } + if this.HeightInCm != that1.HeightInCm { + return false + } + if !bytes.Equal(this.Data, that1.Data) { + return false + } + if this.ResultCount != that1.ResultCount { + return false + } + if this.TrueScotsman != that1.TrueScotsman { + return false + } + if this.Score != that1.Score { + return false + } + if len(this.Key) != len(that1.Key) { + return false + } + for i := range this.Key { + if this.Key[i] != that1.Key[i] { + return false + } + } + if !this.Nested.Equal(that1.Nested) { + return false + } + if len(this.Terrain) != len(that1.Terrain) { + return false + } + for i := range this.Terrain { + if !this.Terrain[i].Equal(that1.Terrain[i]) { + return false + } + } + if !this.Proto2Field.Equal(that1.Proto2Field) { + return false + } + if len(this.Proto2Value) != len(that1.Proto2Value) { + return false + } + for i := range this.Proto2Value { + if !this.Proto2Value[i].Equal(that1.Proto2Value[i]) { + return false + } + } + return true +} +func (this *Nested) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*Nested) + if !ok { + that2, ok := that.(Nested) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *Nested") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *Nested but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *Nested but is not nil && this == nil") + } + if this.Bunny != that1.Bunny { + return fmt.Errorf("Bunny this(%v) Not Equal that(%v)", this.Bunny, that1.Bunny) + } + return nil +} +func (this *Nested) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*Nested) + if !ok { + that2, ok := that.(Nested) + 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.Bunny != that1.Bunny { + return false + } + return true +} +func (this *AllMaps) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*AllMaps) + if !ok { + that2, ok := that.(AllMaps) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *AllMaps") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *AllMaps but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *AllMaps but is not nil && this == nil") + } + if len(this.StringToDoubleMap) != len(that1.StringToDoubleMap) { + return fmt.Errorf("StringToDoubleMap this(%v) Not Equal that(%v)", len(this.StringToDoubleMap), len(that1.StringToDoubleMap)) + } + for i := range this.StringToDoubleMap { + if this.StringToDoubleMap[i] != that1.StringToDoubleMap[i] { + return fmt.Errorf("StringToDoubleMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringToDoubleMap[i], i, that1.StringToDoubleMap[i]) + } + } + if len(this.StringToFloatMap) != len(that1.StringToFloatMap) { + return fmt.Errorf("StringToFloatMap this(%v) Not Equal that(%v)", len(this.StringToFloatMap), len(that1.StringToFloatMap)) + } + for i := range this.StringToFloatMap { + if this.StringToFloatMap[i] != that1.StringToFloatMap[i] { + return fmt.Errorf("StringToFloatMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringToFloatMap[i], i, that1.StringToFloatMap[i]) + } + } + if len(this.Int32Map) != len(that1.Int32Map) { + return fmt.Errorf("Int32Map this(%v) Not Equal that(%v)", len(this.Int32Map), len(that1.Int32Map)) + } + for i := range this.Int32Map { + if this.Int32Map[i] != that1.Int32Map[i] { + return fmt.Errorf("Int32Map this[%v](%v) Not Equal that[%v](%v)", i, this.Int32Map[i], i, that1.Int32Map[i]) + } + } + if len(this.Int64Map) != len(that1.Int64Map) { + return fmt.Errorf("Int64Map this(%v) Not Equal that(%v)", len(this.Int64Map), len(that1.Int64Map)) + } + for i := range this.Int64Map { + if this.Int64Map[i] != that1.Int64Map[i] { + return fmt.Errorf("Int64Map this[%v](%v) Not Equal that[%v](%v)", i, this.Int64Map[i], i, that1.Int64Map[i]) + } + } + if len(this.Uint32Map) != len(that1.Uint32Map) { + return fmt.Errorf("Uint32Map this(%v) Not Equal that(%v)", len(this.Uint32Map), len(that1.Uint32Map)) + } + for i := range this.Uint32Map { + if this.Uint32Map[i] != that1.Uint32Map[i] { + return fmt.Errorf("Uint32Map this[%v](%v) Not Equal that[%v](%v)", i, this.Uint32Map[i], i, that1.Uint32Map[i]) + } + } + if len(this.Uint64Map) != len(that1.Uint64Map) { + return fmt.Errorf("Uint64Map this(%v) Not Equal that(%v)", len(this.Uint64Map), len(that1.Uint64Map)) + } + for i := range this.Uint64Map { + if this.Uint64Map[i] != that1.Uint64Map[i] { + return fmt.Errorf("Uint64Map this[%v](%v) Not Equal that[%v](%v)", i, this.Uint64Map[i], i, that1.Uint64Map[i]) + } + } + if len(this.Sint32Map) != len(that1.Sint32Map) { + return fmt.Errorf("Sint32Map this(%v) Not Equal that(%v)", len(this.Sint32Map), len(that1.Sint32Map)) + } + for i := range this.Sint32Map { + if this.Sint32Map[i] != that1.Sint32Map[i] { + return fmt.Errorf("Sint32Map this[%v](%v) Not Equal that[%v](%v)", i, this.Sint32Map[i], i, that1.Sint32Map[i]) + } + } + if len(this.Sint64Map) != len(that1.Sint64Map) { + return fmt.Errorf("Sint64Map this(%v) Not Equal that(%v)", len(this.Sint64Map), len(that1.Sint64Map)) + } + for i := range this.Sint64Map { + if this.Sint64Map[i] != that1.Sint64Map[i] { + return fmt.Errorf("Sint64Map this[%v](%v) Not Equal that[%v](%v)", i, this.Sint64Map[i], i, that1.Sint64Map[i]) + } + } + if len(this.Fixed32Map) != len(that1.Fixed32Map) { + return fmt.Errorf("Fixed32Map this(%v) Not Equal that(%v)", len(this.Fixed32Map), len(that1.Fixed32Map)) + } + for i := range this.Fixed32Map { + if this.Fixed32Map[i] != that1.Fixed32Map[i] { + return fmt.Errorf("Fixed32Map this[%v](%v) Not Equal that[%v](%v)", i, this.Fixed32Map[i], i, that1.Fixed32Map[i]) + } + } + if len(this.Sfixed32Map) != len(that1.Sfixed32Map) { + return fmt.Errorf("Sfixed32Map this(%v) Not Equal that(%v)", len(this.Sfixed32Map), len(that1.Sfixed32Map)) + } + for i := range this.Sfixed32Map { + if this.Sfixed32Map[i] != that1.Sfixed32Map[i] { + return fmt.Errorf("Sfixed32Map this[%v](%v) Not Equal that[%v](%v)", i, this.Sfixed32Map[i], i, that1.Sfixed32Map[i]) + } + } + if len(this.Fixed64Map) != len(that1.Fixed64Map) { + return fmt.Errorf("Fixed64Map this(%v) Not Equal that(%v)", len(this.Fixed64Map), len(that1.Fixed64Map)) + } + for i := range this.Fixed64Map { + if this.Fixed64Map[i] != that1.Fixed64Map[i] { + return fmt.Errorf("Fixed64Map this[%v](%v) Not Equal that[%v](%v)", i, this.Fixed64Map[i], i, that1.Fixed64Map[i]) + } + } + if len(this.Sfixed64Map) != len(that1.Sfixed64Map) { + return fmt.Errorf("Sfixed64Map this(%v) Not Equal that(%v)", len(this.Sfixed64Map), len(that1.Sfixed64Map)) + } + for i := range this.Sfixed64Map { + if this.Sfixed64Map[i] != that1.Sfixed64Map[i] { + return fmt.Errorf("Sfixed64Map this[%v](%v) Not Equal that[%v](%v)", i, this.Sfixed64Map[i], i, that1.Sfixed64Map[i]) + } + } + if len(this.BoolMap) != len(that1.BoolMap) { + return fmt.Errorf("BoolMap this(%v) Not Equal that(%v)", len(this.BoolMap), len(that1.BoolMap)) + } + for i := range this.BoolMap { + if this.BoolMap[i] != that1.BoolMap[i] { + return fmt.Errorf("BoolMap this[%v](%v) Not Equal that[%v](%v)", i, this.BoolMap[i], i, that1.BoolMap[i]) + } + } + if len(this.StringMap) != len(that1.StringMap) { + return fmt.Errorf("StringMap this(%v) Not Equal that(%v)", len(this.StringMap), len(that1.StringMap)) + } + for i := range this.StringMap { + if this.StringMap[i] != that1.StringMap[i] { + return fmt.Errorf("StringMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringMap[i], i, that1.StringMap[i]) + } + } + if len(this.StringToBytesMap) != len(that1.StringToBytesMap) { + return fmt.Errorf("StringToBytesMap this(%v) Not Equal that(%v)", len(this.StringToBytesMap), len(that1.StringToBytesMap)) + } + for i := range this.StringToBytesMap { + if !bytes.Equal(this.StringToBytesMap[i], that1.StringToBytesMap[i]) { + return fmt.Errorf("StringToBytesMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringToBytesMap[i], i, that1.StringToBytesMap[i]) + } + } + if len(this.StringToEnumMap) != len(that1.StringToEnumMap) { + return fmt.Errorf("StringToEnumMap this(%v) Not Equal that(%v)", len(this.StringToEnumMap), len(that1.StringToEnumMap)) + } + for i := range this.StringToEnumMap { + if this.StringToEnumMap[i] != that1.StringToEnumMap[i] { + return fmt.Errorf("StringToEnumMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringToEnumMap[i], i, that1.StringToEnumMap[i]) + } + } + if len(this.StringToMsgMap) != len(that1.StringToMsgMap) { + return fmt.Errorf("StringToMsgMap this(%v) Not Equal that(%v)", len(this.StringToMsgMap), len(that1.StringToMsgMap)) + } + for i := range this.StringToMsgMap { + if !this.StringToMsgMap[i].Equal(that1.StringToMsgMap[i]) { + return fmt.Errorf("StringToMsgMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringToMsgMap[i], i, that1.StringToMsgMap[i]) + } + } + return nil +} +func (this *AllMaps) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*AllMaps) + if !ok { + that2, ok := that.(AllMaps) + 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.StringToDoubleMap) != len(that1.StringToDoubleMap) { + return false + } + for i := range this.StringToDoubleMap { + if this.StringToDoubleMap[i] != that1.StringToDoubleMap[i] { + return false + } + } + if len(this.StringToFloatMap) != len(that1.StringToFloatMap) { + return false + } + for i := range this.StringToFloatMap { + if this.StringToFloatMap[i] != that1.StringToFloatMap[i] { + return false + } + } + if len(this.Int32Map) != len(that1.Int32Map) { + return false + } + for i := range this.Int32Map { + if this.Int32Map[i] != that1.Int32Map[i] { + return false + } + } + if len(this.Int64Map) != len(that1.Int64Map) { + return false + } + for i := range this.Int64Map { + if this.Int64Map[i] != that1.Int64Map[i] { + return false + } + } + if len(this.Uint32Map) != len(that1.Uint32Map) { + return false + } + for i := range this.Uint32Map { + if this.Uint32Map[i] != that1.Uint32Map[i] { + return false + } + } + if len(this.Uint64Map) != len(that1.Uint64Map) { + return false + } + for i := range this.Uint64Map { + if this.Uint64Map[i] != that1.Uint64Map[i] { + return false + } + } + if len(this.Sint32Map) != len(that1.Sint32Map) { + return false + } + for i := range this.Sint32Map { + if this.Sint32Map[i] != that1.Sint32Map[i] { + return false + } + } + if len(this.Sint64Map) != len(that1.Sint64Map) { + return false + } + for i := range this.Sint64Map { + if this.Sint64Map[i] != that1.Sint64Map[i] { + return false + } + } + if len(this.Fixed32Map) != len(that1.Fixed32Map) { + return false + } + for i := range this.Fixed32Map { + if this.Fixed32Map[i] != that1.Fixed32Map[i] { + return false + } + } + if len(this.Sfixed32Map) != len(that1.Sfixed32Map) { + return false + } + for i := range this.Sfixed32Map { + if this.Sfixed32Map[i] != that1.Sfixed32Map[i] { + return false + } + } + if len(this.Fixed64Map) != len(that1.Fixed64Map) { + return false + } + for i := range this.Fixed64Map { + if this.Fixed64Map[i] != that1.Fixed64Map[i] { + return false + } + } + if len(this.Sfixed64Map) != len(that1.Sfixed64Map) { + return false + } + for i := range this.Sfixed64Map { + if this.Sfixed64Map[i] != that1.Sfixed64Map[i] { + return false + } + } + if len(this.BoolMap) != len(that1.BoolMap) { + return false + } + for i := range this.BoolMap { + if this.BoolMap[i] != that1.BoolMap[i] { + return false + } + } + if len(this.StringMap) != len(that1.StringMap) { + return false + } + for i := range this.StringMap { + if this.StringMap[i] != that1.StringMap[i] { + return false + } + } + if len(this.StringToBytesMap) != len(that1.StringToBytesMap) { + return false + } + for i := range this.StringToBytesMap { + if !bytes.Equal(this.StringToBytesMap[i], that1.StringToBytesMap[i]) { + return false + } + } + if len(this.StringToEnumMap) != len(that1.StringToEnumMap) { + return false + } + for i := range this.StringToEnumMap { + if this.StringToEnumMap[i] != that1.StringToEnumMap[i] { + return false + } + } + if len(this.StringToMsgMap) != len(that1.StringToMsgMap) { + return false + } + for i := range this.StringToMsgMap { + if !this.StringToMsgMap[i].Equal(that1.StringToMsgMap[i]) { + return false + } + } + return true +} +func (this *AllMapsOrdered) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*AllMapsOrdered) + if !ok { + that2, ok := that.(AllMapsOrdered) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *AllMapsOrdered") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *AllMapsOrdered but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *AllMapsOrdered but is not nil && this == nil") + } + if len(this.StringToDoubleMap) != len(that1.StringToDoubleMap) { + return fmt.Errorf("StringToDoubleMap this(%v) Not Equal that(%v)", len(this.StringToDoubleMap), len(that1.StringToDoubleMap)) + } + for i := range this.StringToDoubleMap { + if this.StringToDoubleMap[i] != that1.StringToDoubleMap[i] { + return fmt.Errorf("StringToDoubleMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringToDoubleMap[i], i, that1.StringToDoubleMap[i]) + } + } + if len(this.StringToFloatMap) != len(that1.StringToFloatMap) { + return fmt.Errorf("StringToFloatMap this(%v) Not Equal that(%v)", len(this.StringToFloatMap), len(that1.StringToFloatMap)) + } + for i := range this.StringToFloatMap { + if this.StringToFloatMap[i] != that1.StringToFloatMap[i] { + return fmt.Errorf("StringToFloatMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringToFloatMap[i], i, that1.StringToFloatMap[i]) + } + } + if len(this.Int32Map) != len(that1.Int32Map) { + return fmt.Errorf("Int32Map this(%v) Not Equal that(%v)", len(this.Int32Map), len(that1.Int32Map)) + } + for i := range this.Int32Map { + if this.Int32Map[i] != that1.Int32Map[i] { + return fmt.Errorf("Int32Map this[%v](%v) Not Equal that[%v](%v)", i, this.Int32Map[i], i, that1.Int32Map[i]) + } + } + if len(this.Int64Map) != len(that1.Int64Map) { + return fmt.Errorf("Int64Map this(%v) Not Equal that(%v)", len(this.Int64Map), len(that1.Int64Map)) + } + for i := range this.Int64Map { + if this.Int64Map[i] != that1.Int64Map[i] { + return fmt.Errorf("Int64Map this[%v](%v) Not Equal that[%v](%v)", i, this.Int64Map[i], i, that1.Int64Map[i]) + } + } + if len(this.Uint32Map) != len(that1.Uint32Map) { + return fmt.Errorf("Uint32Map this(%v) Not Equal that(%v)", len(this.Uint32Map), len(that1.Uint32Map)) + } + for i := range this.Uint32Map { + if this.Uint32Map[i] != that1.Uint32Map[i] { + return fmt.Errorf("Uint32Map this[%v](%v) Not Equal that[%v](%v)", i, this.Uint32Map[i], i, that1.Uint32Map[i]) + } + } + if len(this.Uint64Map) != len(that1.Uint64Map) { + return fmt.Errorf("Uint64Map this(%v) Not Equal that(%v)", len(this.Uint64Map), len(that1.Uint64Map)) + } + for i := range this.Uint64Map { + if this.Uint64Map[i] != that1.Uint64Map[i] { + return fmt.Errorf("Uint64Map this[%v](%v) Not Equal that[%v](%v)", i, this.Uint64Map[i], i, that1.Uint64Map[i]) + } + } + if len(this.Sint32Map) != len(that1.Sint32Map) { + return fmt.Errorf("Sint32Map this(%v) Not Equal that(%v)", len(this.Sint32Map), len(that1.Sint32Map)) + } + for i := range this.Sint32Map { + if this.Sint32Map[i] != that1.Sint32Map[i] { + return fmt.Errorf("Sint32Map this[%v](%v) Not Equal that[%v](%v)", i, this.Sint32Map[i], i, that1.Sint32Map[i]) + } + } + if len(this.Sint64Map) != len(that1.Sint64Map) { + return fmt.Errorf("Sint64Map this(%v) Not Equal that(%v)", len(this.Sint64Map), len(that1.Sint64Map)) + } + for i := range this.Sint64Map { + if this.Sint64Map[i] != that1.Sint64Map[i] { + return fmt.Errorf("Sint64Map this[%v](%v) Not Equal that[%v](%v)", i, this.Sint64Map[i], i, that1.Sint64Map[i]) + } + } + if len(this.Fixed32Map) != len(that1.Fixed32Map) { + return fmt.Errorf("Fixed32Map this(%v) Not Equal that(%v)", len(this.Fixed32Map), len(that1.Fixed32Map)) + } + for i := range this.Fixed32Map { + if this.Fixed32Map[i] != that1.Fixed32Map[i] { + return fmt.Errorf("Fixed32Map this[%v](%v) Not Equal that[%v](%v)", i, this.Fixed32Map[i], i, that1.Fixed32Map[i]) + } + } + if len(this.Sfixed32Map) != len(that1.Sfixed32Map) { + return fmt.Errorf("Sfixed32Map this(%v) Not Equal that(%v)", len(this.Sfixed32Map), len(that1.Sfixed32Map)) + } + for i := range this.Sfixed32Map { + if this.Sfixed32Map[i] != that1.Sfixed32Map[i] { + return fmt.Errorf("Sfixed32Map this[%v](%v) Not Equal that[%v](%v)", i, this.Sfixed32Map[i], i, that1.Sfixed32Map[i]) + } + } + if len(this.Fixed64Map) != len(that1.Fixed64Map) { + return fmt.Errorf("Fixed64Map this(%v) Not Equal that(%v)", len(this.Fixed64Map), len(that1.Fixed64Map)) + } + for i := range this.Fixed64Map { + if this.Fixed64Map[i] != that1.Fixed64Map[i] { + return fmt.Errorf("Fixed64Map this[%v](%v) Not Equal that[%v](%v)", i, this.Fixed64Map[i], i, that1.Fixed64Map[i]) + } + } + if len(this.Sfixed64Map) != len(that1.Sfixed64Map) { + return fmt.Errorf("Sfixed64Map this(%v) Not Equal that(%v)", len(this.Sfixed64Map), len(that1.Sfixed64Map)) + } + for i := range this.Sfixed64Map { + if this.Sfixed64Map[i] != that1.Sfixed64Map[i] { + return fmt.Errorf("Sfixed64Map this[%v](%v) Not Equal that[%v](%v)", i, this.Sfixed64Map[i], i, that1.Sfixed64Map[i]) + } + } + if len(this.BoolMap) != len(that1.BoolMap) { + return fmt.Errorf("BoolMap this(%v) Not Equal that(%v)", len(this.BoolMap), len(that1.BoolMap)) + } + for i := range this.BoolMap { + if this.BoolMap[i] != that1.BoolMap[i] { + return fmt.Errorf("BoolMap this[%v](%v) Not Equal that[%v](%v)", i, this.BoolMap[i], i, that1.BoolMap[i]) + } + } + if len(this.StringMap) != len(that1.StringMap) { + return fmt.Errorf("StringMap this(%v) Not Equal that(%v)", len(this.StringMap), len(that1.StringMap)) + } + for i := range this.StringMap { + if this.StringMap[i] != that1.StringMap[i] { + return fmt.Errorf("StringMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringMap[i], i, that1.StringMap[i]) + } + } + if len(this.StringToBytesMap) != len(that1.StringToBytesMap) { + return fmt.Errorf("StringToBytesMap this(%v) Not Equal that(%v)", len(this.StringToBytesMap), len(that1.StringToBytesMap)) + } + for i := range this.StringToBytesMap { + if !bytes.Equal(this.StringToBytesMap[i], that1.StringToBytesMap[i]) { + return fmt.Errorf("StringToBytesMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringToBytesMap[i], i, that1.StringToBytesMap[i]) + } + } + if len(this.StringToEnumMap) != len(that1.StringToEnumMap) { + return fmt.Errorf("StringToEnumMap this(%v) Not Equal that(%v)", len(this.StringToEnumMap), len(that1.StringToEnumMap)) + } + for i := range this.StringToEnumMap { + if this.StringToEnumMap[i] != that1.StringToEnumMap[i] { + return fmt.Errorf("StringToEnumMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringToEnumMap[i], i, that1.StringToEnumMap[i]) + } + } + if len(this.StringToMsgMap) != len(that1.StringToMsgMap) { + return fmt.Errorf("StringToMsgMap this(%v) Not Equal that(%v)", len(this.StringToMsgMap), len(that1.StringToMsgMap)) + } + for i := range this.StringToMsgMap { + if !this.StringToMsgMap[i].Equal(that1.StringToMsgMap[i]) { + return fmt.Errorf("StringToMsgMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringToMsgMap[i], i, that1.StringToMsgMap[i]) + } + } + return nil +} +func (this *AllMapsOrdered) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*AllMapsOrdered) + if !ok { + that2, ok := that.(AllMapsOrdered) + 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.StringToDoubleMap) != len(that1.StringToDoubleMap) { + return false + } + for i := range this.StringToDoubleMap { + if this.StringToDoubleMap[i] != that1.StringToDoubleMap[i] { + return false + } + } + if len(this.StringToFloatMap) != len(that1.StringToFloatMap) { + return false + } + for i := range this.StringToFloatMap { + if this.StringToFloatMap[i] != that1.StringToFloatMap[i] { + return false + } + } + if len(this.Int32Map) != len(that1.Int32Map) { + return false + } + for i := range this.Int32Map { + if this.Int32Map[i] != that1.Int32Map[i] { + return false + } + } + if len(this.Int64Map) != len(that1.Int64Map) { + return false + } + for i := range this.Int64Map { + if this.Int64Map[i] != that1.Int64Map[i] { + return false + } + } + if len(this.Uint32Map) != len(that1.Uint32Map) { + return false + } + for i := range this.Uint32Map { + if this.Uint32Map[i] != that1.Uint32Map[i] { + return false + } + } + if len(this.Uint64Map) != len(that1.Uint64Map) { + return false + } + for i := range this.Uint64Map { + if this.Uint64Map[i] != that1.Uint64Map[i] { + return false + } + } + if len(this.Sint32Map) != len(that1.Sint32Map) { + return false + } + for i := range this.Sint32Map { + if this.Sint32Map[i] != that1.Sint32Map[i] { + return false + } + } + if len(this.Sint64Map) != len(that1.Sint64Map) { + return false + } + for i := range this.Sint64Map { + if this.Sint64Map[i] != that1.Sint64Map[i] { + return false + } + } + if len(this.Fixed32Map) != len(that1.Fixed32Map) { + return false + } + for i := range this.Fixed32Map { + if this.Fixed32Map[i] != that1.Fixed32Map[i] { + return false + } + } + if len(this.Sfixed32Map) != len(that1.Sfixed32Map) { + return false + } + for i := range this.Sfixed32Map { + if this.Sfixed32Map[i] != that1.Sfixed32Map[i] { + return false + } + } + if len(this.Fixed64Map) != len(that1.Fixed64Map) { + return false + } + for i := range this.Fixed64Map { + if this.Fixed64Map[i] != that1.Fixed64Map[i] { + return false + } + } + if len(this.Sfixed64Map) != len(that1.Sfixed64Map) { + return false + } + for i := range this.Sfixed64Map { + if this.Sfixed64Map[i] != that1.Sfixed64Map[i] { + return false + } + } + if len(this.BoolMap) != len(that1.BoolMap) { + return false + } + for i := range this.BoolMap { + if this.BoolMap[i] != that1.BoolMap[i] { + return false + } + } + if len(this.StringMap) != len(that1.StringMap) { + return false + } + for i := range this.StringMap { + if this.StringMap[i] != that1.StringMap[i] { + return false + } + } + if len(this.StringToBytesMap) != len(that1.StringToBytesMap) { + return false + } + for i := range this.StringToBytesMap { + if !bytes.Equal(this.StringToBytesMap[i], that1.StringToBytesMap[i]) { + return false + } + } + if len(this.StringToEnumMap) != len(that1.StringToEnumMap) { + return false + } + for i := range this.StringToEnumMap { + if this.StringToEnumMap[i] != that1.StringToEnumMap[i] { + return false + } + } + if len(this.StringToMsgMap) != len(that1.StringToMsgMap) { + return false + } + for i := range this.StringToMsgMap { + if !this.StringToMsgMap[i].Equal(that1.StringToMsgMap[i]) { + return false + } + } + return true +} +func (this *MessageWithMap) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*MessageWithMap) + if !ok { + that2, ok := that.(MessageWithMap) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *MessageWithMap") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *MessageWithMap but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *MessageWithMap but is not nil && this == nil") + } + if len(this.NameMapping) != len(that1.NameMapping) { + return fmt.Errorf("NameMapping this(%v) Not Equal that(%v)", len(this.NameMapping), len(that1.NameMapping)) + } + for i := range this.NameMapping { + if this.NameMapping[i] != that1.NameMapping[i] { + return fmt.Errorf("NameMapping this[%v](%v) Not Equal that[%v](%v)", i, this.NameMapping[i], i, that1.NameMapping[i]) + } + } + if len(this.MsgMapping) != len(that1.MsgMapping) { + return fmt.Errorf("MsgMapping this(%v) Not Equal that(%v)", len(this.MsgMapping), len(that1.MsgMapping)) + } + for i := range this.MsgMapping { + if !this.MsgMapping[i].Equal(that1.MsgMapping[i]) { + return fmt.Errorf("MsgMapping this[%v](%v) Not Equal that[%v](%v)", i, this.MsgMapping[i], i, that1.MsgMapping[i]) + } + } + if len(this.ByteMapping) != len(that1.ByteMapping) { + return fmt.Errorf("ByteMapping this(%v) Not Equal that(%v)", len(this.ByteMapping), len(that1.ByteMapping)) + } + for i := range this.ByteMapping { + if !bytes.Equal(this.ByteMapping[i], that1.ByteMapping[i]) { + return fmt.Errorf("ByteMapping this[%v](%v) Not Equal that[%v](%v)", i, this.ByteMapping[i], i, that1.ByteMapping[i]) + } + } + return nil +} +func (this *MessageWithMap) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*MessageWithMap) + if !ok { + that2, ok := that.(MessageWithMap) + 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.NameMapping) != len(that1.NameMapping) { + return false + } + for i := range this.NameMapping { + if this.NameMapping[i] != that1.NameMapping[i] { + return false + } + } + if len(this.MsgMapping) != len(that1.MsgMapping) { + return false + } + for i := range this.MsgMapping { + if !this.MsgMapping[i].Equal(that1.MsgMapping[i]) { + return false + } + } + if len(this.ByteMapping) != len(that1.ByteMapping) { + return false + } + for i := range this.ByteMapping { + if !bytes.Equal(this.ByteMapping[i], that1.ByteMapping[i]) { + return false + } + } + return true +} +func (this *FloatingPoint) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*FloatingPoint) + if !ok { + that2, ok := that.(FloatingPoint) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *FloatingPoint") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *FloatingPoint but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *FloatingPoint but is not nil && this == nil") + } + if this.F != that1.F { + return fmt.Errorf("F this(%v) Not Equal that(%v)", this.F, that1.F) + } + return nil +} +func (this *FloatingPoint) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*FloatingPoint) + if !ok { + that2, ok := that.(FloatingPoint) + 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.F != that1.F { + return false + } + return true +} +func (this *Uint128Pair) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*Uint128Pair) + if !ok { + that2, ok := that.(Uint128Pair) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *Uint128Pair") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *Uint128Pair but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *Uint128Pair but is not nil && this == nil") + } + if !this.Left.Equal(that1.Left) { + return fmt.Errorf("Left this(%v) Not Equal that(%v)", this.Left, that1.Left) + } + if that1.Right == nil { + if this.Right != nil { + return fmt.Errorf("this.Right != nil && that1.Right == nil") + } + } else if !this.Right.Equal(*that1.Right) { + return fmt.Errorf("Right this(%v) Not Equal that(%v)", this.Right, that1.Right) + } + return nil +} +func (this *Uint128Pair) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*Uint128Pair) + if !ok { + that2, ok := that.(Uint128Pair) + 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.Left.Equal(that1.Left) { + return false + } + if that1.Right == nil { + if this.Right != nil { + return false + } + } else if !this.Right.Equal(*that1.Right) { + return false + } + return true +} +func (this *ContainsNestedMap) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*ContainsNestedMap) + if !ok { + that2, ok := that.(ContainsNestedMap) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *ContainsNestedMap") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *ContainsNestedMap but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *ContainsNestedMap but is not nil && this == nil") + } + return nil +} +func (this *ContainsNestedMap) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*ContainsNestedMap) + if !ok { + that2, ok := that.(ContainsNestedMap) + 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 *ContainsNestedMap_NestedMap) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*ContainsNestedMap_NestedMap) + if !ok { + that2, ok := that.(ContainsNestedMap_NestedMap) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *ContainsNestedMap_NestedMap") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *ContainsNestedMap_NestedMap but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *ContainsNestedMap_NestedMap but is not nil && this == nil") + } + if len(this.NestedMapField) != len(that1.NestedMapField) { + return fmt.Errorf("NestedMapField this(%v) Not Equal that(%v)", len(this.NestedMapField), len(that1.NestedMapField)) + } + for i := range this.NestedMapField { + if this.NestedMapField[i] != that1.NestedMapField[i] { + return fmt.Errorf("NestedMapField this[%v](%v) Not Equal that[%v](%v)", i, this.NestedMapField[i], i, that1.NestedMapField[i]) + } + } + return nil +} +func (this *ContainsNestedMap_NestedMap) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*ContainsNestedMap_NestedMap) + if !ok { + that2, ok := that.(ContainsNestedMap_NestedMap) + 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.NestedMapField) != len(that1.NestedMapField) { + return false + } + for i := range this.NestedMapField { + if this.NestedMapField[i] != that1.NestedMapField[i] { + return false + } + } + return true +} + +type MessageFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetName() string + GetHilarity() Message_Humour + GetHeightInCm() uint32 + GetData() []byte + GetResultCount() int64 + GetTrueScotsman() bool + GetScore() float32 + GetKey() []uint64 + GetNested() *Nested + GetTerrain() map[int64]*Nested + GetProto2Field() *test.NinOptNative + GetProto2Value() map[int64]*test.NinOptEnum +} + +func (this *Message) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *Message) TestProto() github_com_gogo_protobuf_proto.Message { + return NewMessageFromFace(this) +} + +func (this *Message) GetName() string { + return this.Name +} + +func (this *Message) GetHilarity() Message_Humour { + return this.Hilarity +} + +func (this *Message) GetHeightInCm() uint32 { + return this.HeightInCm +} + +func (this *Message) GetData() []byte { + return this.Data +} + +func (this *Message) GetResultCount() int64 { + return this.ResultCount +} + +func (this *Message) GetTrueScotsman() bool { + return this.TrueScotsman +} + +func (this *Message) GetScore() float32 { + return this.Score +} + +func (this *Message) GetKey() []uint64 { + return this.Key +} + +func (this *Message) GetNested() *Nested { + return this.Nested +} + +func (this *Message) GetTerrain() map[int64]*Nested { + return this.Terrain +} + +func (this *Message) GetProto2Field() *test.NinOptNative { + return this.Proto2Field +} + +func (this *Message) GetProto2Value() map[int64]*test.NinOptEnum { + return this.Proto2Value +} + +func NewMessageFromFace(that MessageFace) *Message { + this := &Message{} + this.Name = that.GetName() + this.Hilarity = that.GetHilarity() + this.HeightInCm = that.GetHeightInCm() + this.Data = that.GetData() + this.ResultCount = that.GetResultCount() + this.TrueScotsman = that.GetTrueScotsman() + this.Score = that.GetScore() + this.Key = that.GetKey() + this.Nested = that.GetNested() + this.Terrain = that.GetTerrain() + this.Proto2Field = that.GetProto2Field() + this.Proto2Value = that.GetProto2Value() + return this +} + +type NestedFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetBunny() string +} + +func (this *Nested) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *Nested) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNestedFromFace(this) +} + +func (this *Nested) GetBunny() string { + return this.Bunny +} + +func NewNestedFromFace(that NestedFace) *Nested { + this := &Nested{} + this.Bunny = that.GetBunny() + return this +} + +type AllMapsFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetStringToDoubleMap() map[string]float64 + GetStringToFloatMap() map[string]float32 + GetInt32Map() map[int32]int32 + GetInt64Map() map[int64]int64 + GetUint32Map() map[uint32]uint32 + GetUint64Map() map[uint64]uint64 + GetSint32Map() map[int32]int32 + GetSint64Map() map[int64]int64 + GetFixed32Map() map[uint32]uint32 + GetSfixed32Map() map[int32]int32 + GetFixed64Map() map[uint64]uint64 + GetSfixed64Map() map[int64]int64 + GetBoolMap() map[bool]bool + GetStringMap() map[string]string + GetStringToBytesMap() map[string][]byte + GetStringToEnumMap() map[string]MapEnum + GetStringToMsgMap() map[string]*FloatingPoint +} + +func (this *AllMaps) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *AllMaps) TestProto() github_com_gogo_protobuf_proto.Message { + return NewAllMapsFromFace(this) +} + +func (this *AllMaps) GetStringToDoubleMap() map[string]float64 { + return this.StringToDoubleMap +} + +func (this *AllMaps) GetStringToFloatMap() map[string]float32 { + return this.StringToFloatMap +} + +func (this *AllMaps) GetInt32Map() map[int32]int32 { + return this.Int32Map +} + +func (this *AllMaps) GetInt64Map() map[int64]int64 { + return this.Int64Map +} + +func (this *AllMaps) GetUint32Map() map[uint32]uint32 { + return this.Uint32Map +} + +func (this *AllMaps) GetUint64Map() map[uint64]uint64 { + return this.Uint64Map +} + +func (this *AllMaps) GetSint32Map() map[int32]int32 { + return this.Sint32Map +} + +func (this *AllMaps) GetSint64Map() map[int64]int64 { + return this.Sint64Map +} + +func (this *AllMaps) GetFixed32Map() map[uint32]uint32 { + return this.Fixed32Map +} + +func (this *AllMaps) GetSfixed32Map() map[int32]int32 { + return this.Sfixed32Map +} + +func (this *AllMaps) GetFixed64Map() map[uint64]uint64 { + return this.Fixed64Map +} + +func (this *AllMaps) GetSfixed64Map() map[int64]int64 { + return this.Sfixed64Map +} + +func (this *AllMaps) GetBoolMap() map[bool]bool { + return this.BoolMap +} + +func (this *AllMaps) GetStringMap() map[string]string { + return this.StringMap +} + +func (this *AllMaps) GetStringToBytesMap() map[string][]byte { + return this.StringToBytesMap +} + +func (this *AllMaps) GetStringToEnumMap() map[string]MapEnum { + return this.StringToEnumMap +} + +func (this *AllMaps) GetStringToMsgMap() map[string]*FloatingPoint { + return this.StringToMsgMap +} + +func NewAllMapsFromFace(that AllMapsFace) *AllMaps { + this := &AllMaps{} + this.StringToDoubleMap = that.GetStringToDoubleMap() + this.StringToFloatMap = that.GetStringToFloatMap() + this.Int32Map = that.GetInt32Map() + this.Int64Map = that.GetInt64Map() + this.Uint32Map = that.GetUint32Map() + this.Uint64Map = that.GetUint64Map() + this.Sint32Map = that.GetSint32Map() + this.Sint64Map = that.GetSint64Map() + this.Fixed32Map = that.GetFixed32Map() + this.Sfixed32Map = that.GetSfixed32Map() + this.Fixed64Map = that.GetFixed64Map() + this.Sfixed64Map = that.GetSfixed64Map() + this.BoolMap = that.GetBoolMap() + this.StringMap = that.GetStringMap() + this.StringToBytesMap = that.GetStringToBytesMap() + this.StringToEnumMap = that.GetStringToEnumMap() + this.StringToMsgMap = that.GetStringToMsgMap() + return this +} + +type AllMapsOrderedFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetStringToDoubleMap() map[string]float64 + GetStringToFloatMap() map[string]float32 + GetInt32Map() map[int32]int32 + GetInt64Map() map[int64]int64 + GetUint32Map() map[uint32]uint32 + GetUint64Map() map[uint64]uint64 + GetSint32Map() map[int32]int32 + GetSint64Map() map[int64]int64 + GetFixed32Map() map[uint32]uint32 + GetSfixed32Map() map[int32]int32 + GetFixed64Map() map[uint64]uint64 + GetSfixed64Map() map[int64]int64 + GetBoolMap() map[bool]bool + GetStringMap() map[string]string + GetStringToBytesMap() map[string][]byte + GetStringToEnumMap() map[string]MapEnum + GetStringToMsgMap() map[string]*FloatingPoint +} + +func (this *AllMapsOrdered) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *AllMapsOrdered) TestProto() github_com_gogo_protobuf_proto.Message { + return NewAllMapsOrderedFromFace(this) +} + +func (this *AllMapsOrdered) GetStringToDoubleMap() map[string]float64 { + return this.StringToDoubleMap +} + +func (this *AllMapsOrdered) GetStringToFloatMap() map[string]float32 { + return this.StringToFloatMap +} + +func (this *AllMapsOrdered) GetInt32Map() map[int32]int32 { + return this.Int32Map +} + +func (this *AllMapsOrdered) GetInt64Map() map[int64]int64 { + return this.Int64Map +} + +func (this *AllMapsOrdered) GetUint32Map() map[uint32]uint32 { + return this.Uint32Map +} + +func (this *AllMapsOrdered) GetUint64Map() map[uint64]uint64 { + return this.Uint64Map +} + +func (this *AllMapsOrdered) GetSint32Map() map[int32]int32 { + return this.Sint32Map +} + +func (this *AllMapsOrdered) GetSint64Map() map[int64]int64 { + return this.Sint64Map +} + +func (this *AllMapsOrdered) GetFixed32Map() map[uint32]uint32 { + return this.Fixed32Map +} + +func (this *AllMapsOrdered) GetSfixed32Map() map[int32]int32 { + return this.Sfixed32Map +} + +func (this *AllMapsOrdered) GetFixed64Map() map[uint64]uint64 { + return this.Fixed64Map +} + +func (this *AllMapsOrdered) GetSfixed64Map() map[int64]int64 { + return this.Sfixed64Map +} + +func (this *AllMapsOrdered) GetBoolMap() map[bool]bool { + return this.BoolMap +} + +func (this *AllMapsOrdered) GetStringMap() map[string]string { + return this.StringMap +} + +func (this *AllMapsOrdered) GetStringToBytesMap() map[string][]byte { + return this.StringToBytesMap +} + +func (this *AllMapsOrdered) GetStringToEnumMap() map[string]MapEnum { + return this.StringToEnumMap +} + +func (this *AllMapsOrdered) GetStringToMsgMap() map[string]*FloatingPoint { + return this.StringToMsgMap +} + +func NewAllMapsOrderedFromFace(that AllMapsOrderedFace) *AllMapsOrdered { + this := &AllMapsOrdered{} + this.StringToDoubleMap = that.GetStringToDoubleMap() + this.StringToFloatMap = that.GetStringToFloatMap() + this.Int32Map = that.GetInt32Map() + this.Int64Map = that.GetInt64Map() + this.Uint32Map = that.GetUint32Map() + this.Uint64Map = that.GetUint64Map() + this.Sint32Map = that.GetSint32Map() + this.Sint64Map = that.GetSint64Map() + this.Fixed32Map = that.GetFixed32Map() + this.Sfixed32Map = that.GetSfixed32Map() + this.Fixed64Map = that.GetFixed64Map() + this.Sfixed64Map = that.GetSfixed64Map() + this.BoolMap = that.GetBoolMap() + this.StringMap = that.GetStringMap() + this.StringToBytesMap = that.GetStringToBytesMap() + this.StringToEnumMap = that.GetStringToEnumMap() + this.StringToMsgMap = that.GetStringToMsgMap() + return this +} + +type MessageWithMapFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetNameMapping() map[int32]string + GetMsgMapping() map[int64]*FloatingPoint + GetByteMapping() map[bool][]byte +} + +func (this *MessageWithMap) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *MessageWithMap) TestProto() github_com_gogo_protobuf_proto.Message { + return NewMessageWithMapFromFace(this) +} + +func (this *MessageWithMap) GetNameMapping() map[int32]string { + return this.NameMapping +} + +func (this *MessageWithMap) GetMsgMapping() map[int64]*FloatingPoint { + return this.MsgMapping +} + +func (this *MessageWithMap) GetByteMapping() map[bool][]byte { + return this.ByteMapping +} + +func NewMessageWithMapFromFace(that MessageWithMapFace) *MessageWithMap { + this := &MessageWithMap{} + this.NameMapping = that.GetNameMapping() + this.MsgMapping = that.GetMsgMapping() + this.ByteMapping = that.GetByteMapping() + return this +} + +type FloatingPointFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetF() float64 +} + +func (this *FloatingPoint) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *FloatingPoint) TestProto() github_com_gogo_protobuf_proto.Message { + return NewFloatingPointFromFace(this) +} + +func (this *FloatingPoint) GetF() float64 { + return this.F +} + +func NewFloatingPointFromFace(that FloatingPointFace) *FloatingPoint { + this := &FloatingPoint{} + this.F = that.GetF() + return this +} + +type Uint128PairFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetLeft() github_com_gogo_protobuf_test_custom.Uint128 + GetRight() *github_com_gogo_protobuf_test_custom.Uint128 +} + +func (this *Uint128Pair) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *Uint128Pair) TestProto() github_com_gogo_protobuf_proto.Message { + return NewUint128PairFromFace(this) +} + +func (this *Uint128Pair) GetLeft() github_com_gogo_protobuf_test_custom.Uint128 { + return this.Left +} + +func (this *Uint128Pair) GetRight() *github_com_gogo_protobuf_test_custom.Uint128 { + return this.Right +} + +func NewUint128PairFromFace(that Uint128PairFace) *Uint128Pair { + this := &Uint128Pair{} + this.Left = that.GetLeft() + this.Right = that.GetRight() + return this +} + +type ContainsNestedMapFace interface { + Proto() github_com_gogo_protobuf_proto.Message +} + +func (this *ContainsNestedMap) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *ContainsNestedMap) TestProto() github_com_gogo_protobuf_proto.Message { + return NewContainsNestedMapFromFace(this) +} + +func NewContainsNestedMapFromFace(that ContainsNestedMapFace) *ContainsNestedMap { + this := &ContainsNestedMap{} + return this +} + +type ContainsNestedMap_NestedMapFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetNestedMapField() map[string]float64 +} + +func (this *ContainsNestedMap_NestedMap) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *ContainsNestedMap_NestedMap) TestProto() github_com_gogo_protobuf_proto.Message { + return NewContainsNestedMap_NestedMapFromFace(this) +} + +func (this *ContainsNestedMap_NestedMap) GetNestedMapField() map[string]float64 { + return this.NestedMapField +} + +func NewContainsNestedMap_NestedMapFromFace(that ContainsNestedMap_NestedMapFace) *ContainsNestedMap_NestedMap { + this := &ContainsNestedMap_NestedMap{} + this.NestedMapField = that.GetNestedMapField() + return this +} + +func (this *Message) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 16) + s = append(s, "&theproto3.Message{") + s = append(s, "Name: "+fmt.Sprintf("%#v", this.Name)+",\n") + s = append(s, "Hilarity: "+fmt.Sprintf("%#v", this.Hilarity)+",\n") + s = append(s, "HeightInCm: "+fmt.Sprintf("%#v", this.HeightInCm)+",\n") + s = append(s, "Data: "+fmt.Sprintf("%#v", this.Data)+",\n") + s = append(s, "ResultCount: "+fmt.Sprintf("%#v", this.ResultCount)+",\n") + s = append(s, "TrueScotsman: "+fmt.Sprintf("%#v", this.TrueScotsman)+",\n") + s = append(s, "Score: "+fmt.Sprintf("%#v", this.Score)+",\n") + s = append(s, "Key: "+fmt.Sprintf("%#v", this.Key)+",\n") + if this.Nested != nil { + s = append(s, "Nested: "+fmt.Sprintf("%#v", this.Nested)+",\n") + } + keysForTerrain := make([]int64, 0, len(this.Terrain)) + for k := range this.Terrain { + keysForTerrain = append(keysForTerrain, k) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForTerrain) + mapStringForTerrain := "map[int64]*Nested{" + for _, k := range keysForTerrain { + mapStringForTerrain += fmt.Sprintf("%#v: %#v,", k, this.Terrain[k]) + } + mapStringForTerrain += "}" + if this.Terrain != nil { + s = append(s, "Terrain: "+mapStringForTerrain+",\n") + } + if this.Proto2Field != nil { + s = append(s, "Proto2Field: "+fmt.Sprintf("%#v", this.Proto2Field)+",\n") + } + keysForProto2Value := make([]int64, 0, len(this.Proto2Value)) + for k := range this.Proto2Value { + keysForProto2Value = append(keysForProto2Value, k) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForProto2Value) + mapStringForProto2Value := "map[int64]*test.NinOptEnum{" + for _, k := range keysForProto2Value { + mapStringForProto2Value += fmt.Sprintf("%#v: %#v,", k, this.Proto2Value[k]) + } + mapStringForProto2Value += "}" + if this.Proto2Value != nil { + s = append(s, "Proto2Value: "+mapStringForProto2Value+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *Nested) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&theproto3.Nested{") + s = append(s, "Bunny: "+fmt.Sprintf("%#v", this.Bunny)+",\n") + s = append(s, "}") + return strings.Join(s, "") +} +func (this *AllMaps) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 21) + s = append(s, "&theproto3.AllMaps{") + keysForStringToDoubleMap := make([]string, 0, len(this.StringToDoubleMap)) + for k := range this.StringToDoubleMap { + keysForStringToDoubleMap = append(keysForStringToDoubleMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToDoubleMap) + mapStringForStringToDoubleMap := "map[string]float64{" + for _, k := range keysForStringToDoubleMap { + mapStringForStringToDoubleMap += fmt.Sprintf("%#v: %#v,", k, this.StringToDoubleMap[k]) + } + mapStringForStringToDoubleMap += "}" + if this.StringToDoubleMap != nil { + s = append(s, "StringToDoubleMap: "+mapStringForStringToDoubleMap+",\n") + } + keysForStringToFloatMap := make([]string, 0, len(this.StringToFloatMap)) + for k := range this.StringToFloatMap { + keysForStringToFloatMap = append(keysForStringToFloatMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToFloatMap) + mapStringForStringToFloatMap := "map[string]float32{" + for _, k := range keysForStringToFloatMap { + mapStringForStringToFloatMap += fmt.Sprintf("%#v: %#v,", k, this.StringToFloatMap[k]) + } + mapStringForStringToFloatMap += "}" + if this.StringToFloatMap != nil { + s = append(s, "StringToFloatMap: "+mapStringForStringToFloatMap+",\n") + } + keysForInt32Map := make([]int32, 0, len(this.Int32Map)) + for k := range this.Int32Map { + keysForInt32Map = append(keysForInt32Map, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForInt32Map) + mapStringForInt32Map := "map[int32]int32{" + for _, k := range keysForInt32Map { + mapStringForInt32Map += fmt.Sprintf("%#v: %#v,", k, this.Int32Map[k]) + } + mapStringForInt32Map += "}" + if this.Int32Map != nil { + s = append(s, "Int32Map: "+mapStringForInt32Map+",\n") + } + keysForInt64Map := make([]int64, 0, len(this.Int64Map)) + for k := range this.Int64Map { + keysForInt64Map = append(keysForInt64Map, k) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForInt64Map) + mapStringForInt64Map := "map[int64]int64{" + for _, k := range keysForInt64Map { + mapStringForInt64Map += fmt.Sprintf("%#v: %#v,", k, this.Int64Map[k]) + } + mapStringForInt64Map += "}" + if this.Int64Map != nil { + s = append(s, "Int64Map: "+mapStringForInt64Map+",\n") + } + keysForUint32Map := make([]uint32, 0, len(this.Uint32Map)) + for k := range this.Uint32Map { + keysForUint32Map = append(keysForUint32Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint32s(keysForUint32Map) + mapStringForUint32Map := "map[uint32]uint32{" + for _, k := range keysForUint32Map { + mapStringForUint32Map += fmt.Sprintf("%#v: %#v,", k, this.Uint32Map[k]) + } + mapStringForUint32Map += "}" + if this.Uint32Map != nil { + s = append(s, "Uint32Map: "+mapStringForUint32Map+",\n") + } + keysForUint64Map := make([]uint64, 0, len(this.Uint64Map)) + for k := range this.Uint64Map { + keysForUint64Map = append(keysForUint64Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint64s(keysForUint64Map) + mapStringForUint64Map := "map[uint64]uint64{" + for _, k := range keysForUint64Map { + mapStringForUint64Map += fmt.Sprintf("%#v: %#v,", k, this.Uint64Map[k]) + } + mapStringForUint64Map += "}" + if this.Uint64Map != nil { + s = append(s, "Uint64Map: "+mapStringForUint64Map+",\n") + } + keysForSint32Map := make([]int32, 0, len(this.Sint32Map)) + for k := range this.Sint32Map { + keysForSint32Map = append(keysForSint32Map, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForSint32Map) + mapStringForSint32Map := "map[int32]int32{" + for _, k := range keysForSint32Map { + mapStringForSint32Map += fmt.Sprintf("%#v: %#v,", k, this.Sint32Map[k]) + } + mapStringForSint32Map += "}" + if this.Sint32Map != nil { + s = append(s, "Sint32Map: "+mapStringForSint32Map+",\n") + } + keysForSint64Map := make([]int64, 0, len(this.Sint64Map)) + for k := range this.Sint64Map { + keysForSint64Map = append(keysForSint64Map, k) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForSint64Map) + mapStringForSint64Map := "map[int64]int64{" + for _, k := range keysForSint64Map { + mapStringForSint64Map += fmt.Sprintf("%#v: %#v,", k, this.Sint64Map[k]) + } + mapStringForSint64Map += "}" + if this.Sint64Map != nil { + s = append(s, "Sint64Map: "+mapStringForSint64Map+",\n") + } + keysForFixed32Map := make([]uint32, 0, len(this.Fixed32Map)) + for k := range this.Fixed32Map { + keysForFixed32Map = append(keysForFixed32Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint32s(keysForFixed32Map) + mapStringForFixed32Map := "map[uint32]uint32{" + for _, k := range keysForFixed32Map { + mapStringForFixed32Map += fmt.Sprintf("%#v: %#v,", k, this.Fixed32Map[k]) + } + mapStringForFixed32Map += "}" + if this.Fixed32Map != nil { + s = append(s, "Fixed32Map: "+mapStringForFixed32Map+",\n") + } + keysForSfixed32Map := make([]int32, 0, len(this.Sfixed32Map)) + for k := range this.Sfixed32Map { + keysForSfixed32Map = append(keysForSfixed32Map, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForSfixed32Map) + mapStringForSfixed32Map := "map[int32]int32{" + for _, k := range keysForSfixed32Map { + mapStringForSfixed32Map += fmt.Sprintf("%#v: %#v,", k, this.Sfixed32Map[k]) + } + mapStringForSfixed32Map += "}" + if this.Sfixed32Map != nil { + s = append(s, "Sfixed32Map: "+mapStringForSfixed32Map+",\n") + } + keysForFixed64Map := make([]uint64, 0, len(this.Fixed64Map)) + for k := range this.Fixed64Map { + keysForFixed64Map = append(keysForFixed64Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint64s(keysForFixed64Map) + mapStringForFixed64Map := "map[uint64]uint64{" + for _, k := range keysForFixed64Map { + mapStringForFixed64Map += fmt.Sprintf("%#v: %#v,", k, this.Fixed64Map[k]) + } + mapStringForFixed64Map += "}" + if this.Fixed64Map != nil { + s = append(s, "Fixed64Map: "+mapStringForFixed64Map+",\n") + } + keysForSfixed64Map := make([]int64, 0, len(this.Sfixed64Map)) + for k := range this.Sfixed64Map { + keysForSfixed64Map = append(keysForSfixed64Map, k) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForSfixed64Map) + mapStringForSfixed64Map := "map[int64]int64{" + for _, k := range keysForSfixed64Map { + mapStringForSfixed64Map += fmt.Sprintf("%#v: %#v,", k, this.Sfixed64Map[k]) + } + mapStringForSfixed64Map += "}" + if this.Sfixed64Map != nil { + s = append(s, "Sfixed64Map: "+mapStringForSfixed64Map+",\n") + } + keysForBoolMap := make([]bool, 0, len(this.BoolMap)) + for k := range this.BoolMap { + keysForBoolMap = append(keysForBoolMap, k) + } + github_com_gogo_protobuf_sortkeys.Bools(keysForBoolMap) + mapStringForBoolMap := "map[bool]bool{" + for _, k := range keysForBoolMap { + mapStringForBoolMap += fmt.Sprintf("%#v: %#v,", k, this.BoolMap[k]) + } + mapStringForBoolMap += "}" + if this.BoolMap != nil { + s = append(s, "BoolMap: "+mapStringForBoolMap+",\n") + } + keysForStringMap := make([]string, 0, len(this.StringMap)) + for k := range this.StringMap { + keysForStringMap = append(keysForStringMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringMap) + mapStringForStringMap := "map[string]string{" + for _, k := range keysForStringMap { + mapStringForStringMap += fmt.Sprintf("%#v: %#v,", k, this.StringMap[k]) + } + mapStringForStringMap += "}" + if this.StringMap != nil { + s = append(s, "StringMap: "+mapStringForStringMap+",\n") + } + keysForStringToBytesMap := make([]string, 0, len(this.StringToBytesMap)) + for k := range this.StringToBytesMap { + keysForStringToBytesMap = append(keysForStringToBytesMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToBytesMap) + mapStringForStringToBytesMap := "map[string][]byte{" + for _, k := range keysForStringToBytesMap { + mapStringForStringToBytesMap += fmt.Sprintf("%#v: %#v,", k, this.StringToBytesMap[k]) + } + mapStringForStringToBytesMap += "}" + if this.StringToBytesMap != nil { + s = append(s, "StringToBytesMap: "+mapStringForStringToBytesMap+",\n") + } + keysForStringToEnumMap := make([]string, 0, len(this.StringToEnumMap)) + for k := range this.StringToEnumMap { + keysForStringToEnumMap = append(keysForStringToEnumMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToEnumMap) + mapStringForStringToEnumMap := "map[string]MapEnum{" + for _, k := range keysForStringToEnumMap { + mapStringForStringToEnumMap += fmt.Sprintf("%#v: %#v,", k, this.StringToEnumMap[k]) + } + mapStringForStringToEnumMap += "}" + if this.StringToEnumMap != nil { + s = append(s, "StringToEnumMap: "+mapStringForStringToEnumMap+",\n") + } + keysForStringToMsgMap := make([]string, 0, len(this.StringToMsgMap)) + for k := range this.StringToMsgMap { + keysForStringToMsgMap = append(keysForStringToMsgMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToMsgMap) + mapStringForStringToMsgMap := "map[string]*FloatingPoint{" + for _, k := range keysForStringToMsgMap { + mapStringForStringToMsgMap += fmt.Sprintf("%#v: %#v,", k, this.StringToMsgMap[k]) + } + mapStringForStringToMsgMap += "}" + if this.StringToMsgMap != nil { + s = append(s, "StringToMsgMap: "+mapStringForStringToMsgMap+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *AllMapsOrdered) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 21) + s = append(s, "&theproto3.AllMapsOrdered{") + keysForStringToDoubleMap := make([]string, 0, len(this.StringToDoubleMap)) + for k := range this.StringToDoubleMap { + keysForStringToDoubleMap = append(keysForStringToDoubleMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToDoubleMap) + mapStringForStringToDoubleMap := "map[string]float64{" + for _, k := range keysForStringToDoubleMap { + mapStringForStringToDoubleMap += fmt.Sprintf("%#v: %#v,", k, this.StringToDoubleMap[k]) + } + mapStringForStringToDoubleMap += "}" + if this.StringToDoubleMap != nil { + s = append(s, "StringToDoubleMap: "+mapStringForStringToDoubleMap+",\n") + } + keysForStringToFloatMap := make([]string, 0, len(this.StringToFloatMap)) + for k := range this.StringToFloatMap { + keysForStringToFloatMap = append(keysForStringToFloatMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToFloatMap) + mapStringForStringToFloatMap := "map[string]float32{" + for _, k := range keysForStringToFloatMap { + mapStringForStringToFloatMap += fmt.Sprintf("%#v: %#v,", k, this.StringToFloatMap[k]) + } + mapStringForStringToFloatMap += "}" + if this.StringToFloatMap != nil { + s = append(s, "StringToFloatMap: "+mapStringForStringToFloatMap+",\n") + } + keysForInt32Map := make([]int32, 0, len(this.Int32Map)) + for k := range this.Int32Map { + keysForInt32Map = append(keysForInt32Map, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForInt32Map) + mapStringForInt32Map := "map[int32]int32{" + for _, k := range keysForInt32Map { + mapStringForInt32Map += fmt.Sprintf("%#v: %#v,", k, this.Int32Map[k]) + } + mapStringForInt32Map += "}" + if this.Int32Map != nil { + s = append(s, "Int32Map: "+mapStringForInt32Map+",\n") + } + keysForInt64Map := make([]int64, 0, len(this.Int64Map)) + for k := range this.Int64Map { + keysForInt64Map = append(keysForInt64Map, k) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForInt64Map) + mapStringForInt64Map := "map[int64]int64{" + for _, k := range keysForInt64Map { + mapStringForInt64Map += fmt.Sprintf("%#v: %#v,", k, this.Int64Map[k]) + } + mapStringForInt64Map += "}" + if this.Int64Map != nil { + s = append(s, "Int64Map: "+mapStringForInt64Map+",\n") + } + keysForUint32Map := make([]uint32, 0, len(this.Uint32Map)) + for k := range this.Uint32Map { + keysForUint32Map = append(keysForUint32Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint32s(keysForUint32Map) + mapStringForUint32Map := "map[uint32]uint32{" + for _, k := range keysForUint32Map { + mapStringForUint32Map += fmt.Sprintf("%#v: %#v,", k, this.Uint32Map[k]) + } + mapStringForUint32Map += "}" + if this.Uint32Map != nil { + s = append(s, "Uint32Map: "+mapStringForUint32Map+",\n") + } + keysForUint64Map := make([]uint64, 0, len(this.Uint64Map)) + for k := range this.Uint64Map { + keysForUint64Map = append(keysForUint64Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint64s(keysForUint64Map) + mapStringForUint64Map := "map[uint64]uint64{" + for _, k := range keysForUint64Map { + mapStringForUint64Map += fmt.Sprintf("%#v: %#v,", k, this.Uint64Map[k]) + } + mapStringForUint64Map += "}" + if this.Uint64Map != nil { + s = append(s, "Uint64Map: "+mapStringForUint64Map+",\n") + } + keysForSint32Map := make([]int32, 0, len(this.Sint32Map)) + for k := range this.Sint32Map { + keysForSint32Map = append(keysForSint32Map, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForSint32Map) + mapStringForSint32Map := "map[int32]int32{" + for _, k := range keysForSint32Map { + mapStringForSint32Map += fmt.Sprintf("%#v: %#v,", k, this.Sint32Map[k]) + } + mapStringForSint32Map += "}" + if this.Sint32Map != nil { + s = append(s, "Sint32Map: "+mapStringForSint32Map+",\n") + } + keysForSint64Map := make([]int64, 0, len(this.Sint64Map)) + for k := range this.Sint64Map { + keysForSint64Map = append(keysForSint64Map, k) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForSint64Map) + mapStringForSint64Map := "map[int64]int64{" + for _, k := range keysForSint64Map { + mapStringForSint64Map += fmt.Sprintf("%#v: %#v,", k, this.Sint64Map[k]) + } + mapStringForSint64Map += "}" + if this.Sint64Map != nil { + s = append(s, "Sint64Map: "+mapStringForSint64Map+",\n") + } + keysForFixed32Map := make([]uint32, 0, len(this.Fixed32Map)) + for k := range this.Fixed32Map { + keysForFixed32Map = append(keysForFixed32Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint32s(keysForFixed32Map) + mapStringForFixed32Map := "map[uint32]uint32{" + for _, k := range keysForFixed32Map { + mapStringForFixed32Map += fmt.Sprintf("%#v: %#v,", k, this.Fixed32Map[k]) + } + mapStringForFixed32Map += "}" + if this.Fixed32Map != nil { + s = append(s, "Fixed32Map: "+mapStringForFixed32Map+",\n") + } + keysForSfixed32Map := make([]int32, 0, len(this.Sfixed32Map)) + for k := range this.Sfixed32Map { + keysForSfixed32Map = append(keysForSfixed32Map, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForSfixed32Map) + mapStringForSfixed32Map := "map[int32]int32{" + for _, k := range keysForSfixed32Map { + mapStringForSfixed32Map += fmt.Sprintf("%#v: %#v,", k, this.Sfixed32Map[k]) + } + mapStringForSfixed32Map += "}" + if this.Sfixed32Map != nil { + s = append(s, "Sfixed32Map: "+mapStringForSfixed32Map+",\n") + } + keysForFixed64Map := make([]uint64, 0, len(this.Fixed64Map)) + for k := range this.Fixed64Map { + keysForFixed64Map = append(keysForFixed64Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint64s(keysForFixed64Map) + mapStringForFixed64Map := "map[uint64]uint64{" + for _, k := range keysForFixed64Map { + mapStringForFixed64Map += fmt.Sprintf("%#v: %#v,", k, this.Fixed64Map[k]) + } + mapStringForFixed64Map += "}" + if this.Fixed64Map != nil { + s = append(s, "Fixed64Map: "+mapStringForFixed64Map+",\n") + } + keysForSfixed64Map := make([]int64, 0, len(this.Sfixed64Map)) + for k := range this.Sfixed64Map { + keysForSfixed64Map = append(keysForSfixed64Map, k) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForSfixed64Map) + mapStringForSfixed64Map := "map[int64]int64{" + for _, k := range keysForSfixed64Map { + mapStringForSfixed64Map += fmt.Sprintf("%#v: %#v,", k, this.Sfixed64Map[k]) + } + mapStringForSfixed64Map += "}" + if this.Sfixed64Map != nil { + s = append(s, "Sfixed64Map: "+mapStringForSfixed64Map+",\n") + } + keysForBoolMap := make([]bool, 0, len(this.BoolMap)) + for k := range this.BoolMap { + keysForBoolMap = append(keysForBoolMap, k) + } + github_com_gogo_protobuf_sortkeys.Bools(keysForBoolMap) + mapStringForBoolMap := "map[bool]bool{" + for _, k := range keysForBoolMap { + mapStringForBoolMap += fmt.Sprintf("%#v: %#v,", k, this.BoolMap[k]) + } + mapStringForBoolMap += "}" + if this.BoolMap != nil { + s = append(s, "BoolMap: "+mapStringForBoolMap+",\n") + } + keysForStringMap := make([]string, 0, len(this.StringMap)) + for k := range this.StringMap { + keysForStringMap = append(keysForStringMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringMap) + mapStringForStringMap := "map[string]string{" + for _, k := range keysForStringMap { + mapStringForStringMap += fmt.Sprintf("%#v: %#v,", k, this.StringMap[k]) + } + mapStringForStringMap += "}" + if this.StringMap != nil { + s = append(s, "StringMap: "+mapStringForStringMap+",\n") + } + keysForStringToBytesMap := make([]string, 0, len(this.StringToBytesMap)) + for k := range this.StringToBytesMap { + keysForStringToBytesMap = append(keysForStringToBytesMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToBytesMap) + mapStringForStringToBytesMap := "map[string][]byte{" + for _, k := range keysForStringToBytesMap { + mapStringForStringToBytesMap += fmt.Sprintf("%#v: %#v,", k, this.StringToBytesMap[k]) + } + mapStringForStringToBytesMap += "}" + if this.StringToBytesMap != nil { + s = append(s, "StringToBytesMap: "+mapStringForStringToBytesMap+",\n") + } + keysForStringToEnumMap := make([]string, 0, len(this.StringToEnumMap)) + for k := range this.StringToEnumMap { + keysForStringToEnumMap = append(keysForStringToEnumMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToEnumMap) + mapStringForStringToEnumMap := "map[string]MapEnum{" + for _, k := range keysForStringToEnumMap { + mapStringForStringToEnumMap += fmt.Sprintf("%#v: %#v,", k, this.StringToEnumMap[k]) + } + mapStringForStringToEnumMap += "}" + if this.StringToEnumMap != nil { + s = append(s, "StringToEnumMap: "+mapStringForStringToEnumMap+",\n") + } + keysForStringToMsgMap := make([]string, 0, len(this.StringToMsgMap)) + for k := range this.StringToMsgMap { + keysForStringToMsgMap = append(keysForStringToMsgMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToMsgMap) + mapStringForStringToMsgMap := "map[string]*FloatingPoint{" + for _, k := range keysForStringToMsgMap { + mapStringForStringToMsgMap += fmt.Sprintf("%#v: %#v,", k, this.StringToMsgMap[k]) + } + mapStringForStringToMsgMap += "}" + if this.StringToMsgMap != nil { + s = append(s, "StringToMsgMap: "+mapStringForStringToMsgMap+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *MessageWithMap) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 7) + s = append(s, "&theproto3.MessageWithMap{") + keysForNameMapping := make([]int32, 0, len(this.NameMapping)) + for k := range this.NameMapping { + keysForNameMapping = append(keysForNameMapping, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForNameMapping) + mapStringForNameMapping := "map[int32]string{" + for _, k := range keysForNameMapping { + mapStringForNameMapping += fmt.Sprintf("%#v: %#v,", k, this.NameMapping[k]) + } + mapStringForNameMapping += "}" + if this.NameMapping != nil { + s = append(s, "NameMapping: "+mapStringForNameMapping+",\n") + } + keysForMsgMapping := make([]int64, 0, len(this.MsgMapping)) + for k := range this.MsgMapping { + keysForMsgMapping = append(keysForMsgMapping, k) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForMsgMapping) + mapStringForMsgMapping := "map[int64]*FloatingPoint{" + for _, k := range keysForMsgMapping { + mapStringForMsgMapping += fmt.Sprintf("%#v: %#v,", k, this.MsgMapping[k]) + } + mapStringForMsgMapping += "}" + if this.MsgMapping != nil { + s = append(s, "MsgMapping: "+mapStringForMsgMapping+",\n") + } + keysForByteMapping := make([]bool, 0, len(this.ByteMapping)) + for k := range this.ByteMapping { + keysForByteMapping = append(keysForByteMapping, k) + } + github_com_gogo_protobuf_sortkeys.Bools(keysForByteMapping) + mapStringForByteMapping := "map[bool][]byte{" + for _, k := range keysForByteMapping { + mapStringForByteMapping += fmt.Sprintf("%#v: %#v,", k, this.ByteMapping[k]) + } + mapStringForByteMapping += "}" + if this.ByteMapping != nil { + s = append(s, "ByteMapping: "+mapStringForByteMapping+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *FloatingPoint) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&theproto3.FloatingPoint{") + s = append(s, "F: "+fmt.Sprintf("%#v", this.F)+",\n") + s = append(s, "}") + return strings.Join(s, "") +} +func (this *Uint128Pair) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 6) + s = append(s, "&theproto3.Uint128Pair{") + s = append(s, "Left: "+fmt.Sprintf("%#v", this.Left)+",\n") + s = append(s, "Right: "+fmt.Sprintf("%#v", this.Right)+",\n") + s = append(s, "}") + return strings.Join(s, "") +} +func (this *ContainsNestedMap) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 4) + s = append(s, "&theproto3.ContainsNestedMap{") + s = append(s, "}") + return strings.Join(s, "") +} +func (this *ContainsNestedMap_NestedMap) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&theproto3.ContainsNestedMap_NestedMap{") + keysForNestedMapField := make([]string, 0, len(this.NestedMapField)) + for k := range this.NestedMapField { + keysForNestedMapField = append(keysForNestedMapField, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForNestedMapField) + mapStringForNestedMapField := "map[string]float64{" + for _, k := range keysForNestedMapField { + mapStringForNestedMapField += fmt.Sprintf("%#v: %#v,", k, this.NestedMapField[k]) + } + mapStringForNestedMapField += "}" + if this.NestedMapField != nil { + s = append(s, "NestedMapField: "+mapStringForNestedMapField+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func valueToGoStringTheproto3(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 extensionToGoStringTheproto3(e map[int32]github_com_gogo_protobuf_proto.Extension) string { + if e == nil { + return "nil" + } + s := "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 +} +func NewPopulatedMessage(r randyTheproto3, easy bool) *Message { + this := &Message{} + this.Name = randStringTheproto3(r) + this.Hilarity = Message_Humour([]int32{0, 1, 2, 3}[r.Intn(4)]) + this.HeightInCm = uint32(r.Uint32()) + v1 := r.Intn(100) + this.Data = make([]byte, v1) + for i := 0; i < v1; i++ { + this.Data[i] = byte(r.Intn(256)) + } + this.ResultCount = int64(r.Int63()) + if r.Intn(2) == 0 { + this.ResultCount *= -1 + } + this.TrueScotsman = bool(bool(r.Intn(2) == 0)) + this.Score = float32(r.Float32()) + if r.Intn(2) == 0 { + this.Score *= -1 + } + v2 := r.Intn(10) + this.Key = make([]uint64, v2) + for i := 0; i < v2; i++ { + this.Key[i] = uint64(uint64(r.Uint32())) + } + if r.Intn(10) != 0 { + this.Nested = NewPopulatedNested(r, easy) + } + if r.Intn(10) != 0 { + v3 := r.Intn(10) + this.Terrain = make(map[int64]*Nested) + for i := 0; i < v3; i++ { + this.Terrain[int64(r.Int63())] = NewPopulatedNested(r, easy) + } + } + if r.Intn(10) != 0 { + this.Proto2Field = test.NewPopulatedNinOptNative(r, easy) + } + if r.Intn(10) != 0 { + v4 := r.Intn(10) + this.Proto2Value = make(map[int64]*test.NinOptEnum) + for i := 0; i < v4; i++ { + this.Proto2Value[int64(r.Int63())] = test.NewPopulatedNinOptEnum(r, easy) + } + } + if !easy && r.Intn(10) != 0 { + } + return this +} + +func NewPopulatedNested(r randyTheproto3, easy bool) *Nested { + this := &Nested{} + this.Bunny = randStringTheproto3(r) + if !easy && r.Intn(10) != 0 { + } + return this +} + +func NewPopulatedAllMaps(r randyTheproto3, easy bool) *AllMaps { + this := &AllMaps{} + if r.Intn(10) != 0 { + v5 := r.Intn(10) + this.StringToDoubleMap = make(map[string]float64) + for i := 0; i < v5; i++ { + v6 := randStringTheproto3(r) + this.StringToDoubleMap[v6] = float64(r.Float64()) + if r.Intn(2) == 0 { + this.StringToDoubleMap[v6] *= -1 + } + } + } + if r.Intn(10) != 0 { + v7 := r.Intn(10) + this.StringToFloatMap = make(map[string]float32) + for i := 0; i < v7; i++ { + v8 := randStringTheproto3(r) + this.StringToFloatMap[v8] = float32(r.Float32()) + if r.Intn(2) == 0 { + this.StringToFloatMap[v8] *= -1 + } + } + } + if r.Intn(10) != 0 { + v9 := r.Intn(10) + this.Int32Map = make(map[int32]int32) + for i := 0; i < v9; i++ { + v10 := int32(r.Int31()) + this.Int32Map[v10] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Int32Map[v10] *= -1 + } + } + } + if r.Intn(10) != 0 { + v11 := r.Intn(10) + this.Int64Map = make(map[int64]int64) + for i := 0; i < v11; i++ { + v12 := int64(r.Int63()) + this.Int64Map[v12] = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Int64Map[v12] *= -1 + } + } + } + if r.Intn(10) != 0 { + v13 := r.Intn(10) + this.Uint32Map = make(map[uint32]uint32) + for i := 0; i < v13; i++ { + v14 := uint32(r.Uint32()) + this.Uint32Map[v14] = uint32(r.Uint32()) + } + } + if r.Intn(10) != 0 { + v15 := r.Intn(10) + this.Uint64Map = make(map[uint64]uint64) + for i := 0; i < v15; i++ { + v16 := uint64(uint64(r.Uint32())) + this.Uint64Map[v16] = uint64(uint64(r.Uint32())) + } + } + if r.Intn(10) != 0 { + v17 := r.Intn(10) + this.Sint32Map = make(map[int32]int32) + for i := 0; i < v17; i++ { + v18 := int32(r.Int31()) + this.Sint32Map[v18] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Sint32Map[v18] *= -1 + } + } + } + if r.Intn(10) != 0 { + v19 := r.Intn(10) + this.Sint64Map = make(map[int64]int64) + for i := 0; i < v19; i++ { + v20 := int64(r.Int63()) + this.Sint64Map[v20] = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Sint64Map[v20] *= -1 + } + } + } + if r.Intn(10) != 0 { + v21 := r.Intn(10) + this.Fixed32Map = make(map[uint32]uint32) + for i := 0; i < v21; i++ { + v22 := uint32(r.Uint32()) + this.Fixed32Map[v22] = uint32(r.Uint32()) + } + } + if r.Intn(10) != 0 { + v23 := r.Intn(10) + this.Sfixed32Map = make(map[int32]int32) + for i := 0; i < v23; i++ { + v24 := int32(r.Int31()) + this.Sfixed32Map[v24] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Sfixed32Map[v24] *= -1 + } + } + } + if r.Intn(10) != 0 { + v25 := r.Intn(10) + this.Fixed64Map = make(map[uint64]uint64) + for i := 0; i < v25; i++ { + v26 := uint64(uint64(r.Uint32())) + this.Fixed64Map[v26] = uint64(uint64(r.Uint32())) + } + } + if r.Intn(10) != 0 { + v27 := r.Intn(10) + this.Sfixed64Map = make(map[int64]int64) + for i := 0; i < v27; i++ { + v28 := int64(r.Int63()) + this.Sfixed64Map[v28] = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Sfixed64Map[v28] *= -1 + } + } + } + if r.Intn(10) != 0 { + v29 := r.Intn(10) + this.BoolMap = make(map[bool]bool) + for i := 0; i < v29; i++ { + v30 := bool(bool(r.Intn(2) == 0)) + this.BoolMap[v30] = bool(bool(r.Intn(2) == 0)) + } + } + if r.Intn(10) != 0 { + v31 := r.Intn(10) + this.StringMap = make(map[string]string) + for i := 0; i < v31; i++ { + this.StringMap[randStringTheproto3(r)] = randStringTheproto3(r) + } + } + if r.Intn(10) != 0 { + v32 := r.Intn(10) + this.StringToBytesMap = make(map[string][]byte) + for i := 0; i < v32; i++ { + v33 := r.Intn(100) + v34 := randStringTheproto3(r) + this.StringToBytesMap[v34] = make([]byte, v33) + for i := 0; i < v33; i++ { + this.StringToBytesMap[v34][i] = byte(r.Intn(256)) + } + } + } + if r.Intn(10) != 0 { + v35 := r.Intn(10) + this.StringToEnumMap = make(map[string]MapEnum) + for i := 0; i < v35; i++ { + this.StringToEnumMap[randStringTheproto3(r)] = MapEnum([]int32{0, 1, 2}[r.Intn(3)]) + } + } + if r.Intn(10) != 0 { + v36 := r.Intn(10) + this.StringToMsgMap = make(map[string]*FloatingPoint) + for i := 0; i < v36; i++ { + this.StringToMsgMap[randStringTheproto3(r)] = NewPopulatedFloatingPoint(r, easy) + } + } + if !easy && r.Intn(10) != 0 { + } + return this +} + +func NewPopulatedAllMapsOrdered(r randyTheproto3, easy bool) *AllMapsOrdered { + this := &AllMapsOrdered{} + if r.Intn(10) != 0 { + v37 := r.Intn(10) + this.StringToDoubleMap = make(map[string]float64) + for i := 0; i < v37; i++ { + v38 := randStringTheproto3(r) + this.StringToDoubleMap[v38] = float64(r.Float64()) + if r.Intn(2) == 0 { + this.StringToDoubleMap[v38] *= -1 + } + } + } + if r.Intn(10) != 0 { + v39 := r.Intn(10) + this.StringToFloatMap = make(map[string]float32) + for i := 0; i < v39; i++ { + v40 := randStringTheproto3(r) + this.StringToFloatMap[v40] = float32(r.Float32()) + if r.Intn(2) == 0 { + this.StringToFloatMap[v40] *= -1 + } + } + } + if r.Intn(10) != 0 { + v41 := r.Intn(10) + this.Int32Map = make(map[int32]int32) + for i := 0; i < v41; i++ { + v42 := int32(r.Int31()) + this.Int32Map[v42] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Int32Map[v42] *= -1 + } + } + } + if r.Intn(10) != 0 { + v43 := r.Intn(10) + this.Int64Map = make(map[int64]int64) + for i := 0; i < v43; i++ { + v44 := int64(r.Int63()) + this.Int64Map[v44] = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Int64Map[v44] *= -1 + } + } + } + if r.Intn(10) != 0 { + v45 := r.Intn(10) + this.Uint32Map = make(map[uint32]uint32) + for i := 0; i < v45; i++ { + v46 := uint32(r.Uint32()) + this.Uint32Map[v46] = uint32(r.Uint32()) + } + } + if r.Intn(10) != 0 { + v47 := r.Intn(10) + this.Uint64Map = make(map[uint64]uint64) + for i := 0; i < v47; i++ { + v48 := uint64(uint64(r.Uint32())) + this.Uint64Map[v48] = uint64(uint64(r.Uint32())) + } + } + if r.Intn(10) != 0 { + v49 := r.Intn(10) + this.Sint32Map = make(map[int32]int32) + for i := 0; i < v49; i++ { + v50 := int32(r.Int31()) + this.Sint32Map[v50] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Sint32Map[v50] *= -1 + } + } + } + if r.Intn(10) != 0 { + v51 := r.Intn(10) + this.Sint64Map = make(map[int64]int64) + for i := 0; i < v51; i++ { + v52 := int64(r.Int63()) + this.Sint64Map[v52] = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Sint64Map[v52] *= -1 + } + } + } + if r.Intn(10) != 0 { + v53 := r.Intn(10) + this.Fixed32Map = make(map[uint32]uint32) + for i := 0; i < v53; i++ { + v54 := uint32(r.Uint32()) + this.Fixed32Map[v54] = uint32(r.Uint32()) + } + } + if r.Intn(10) != 0 { + v55 := r.Intn(10) + this.Sfixed32Map = make(map[int32]int32) + for i := 0; i < v55; i++ { + v56 := int32(r.Int31()) + this.Sfixed32Map[v56] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Sfixed32Map[v56] *= -1 + } + } + } + if r.Intn(10) != 0 { + v57 := r.Intn(10) + this.Fixed64Map = make(map[uint64]uint64) + for i := 0; i < v57; i++ { + v58 := uint64(uint64(r.Uint32())) + this.Fixed64Map[v58] = uint64(uint64(r.Uint32())) + } + } + if r.Intn(10) != 0 { + v59 := r.Intn(10) + this.Sfixed64Map = make(map[int64]int64) + for i := 0; i < v59; i++ { + v60 := int64(r.Int63()) + this.Sfixed64Map[v60] = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Sfixed64Map[v60] *= -1 + } + } + } + if r.Intn(10) != 0 { + v61 := r.Intn(10) + this.BoolMap = make(map[bool]bool) + for i := 0; i < v61; i++ { + v62 := bool(bool(r.Intn(2) == 0)) + this.BoolMap[v62] = bool(bool(r.Intn(2) == 0)) + } + } + if r.Intn(10) != 0 { + v63 := r.Intn(10) + this.StringMap = make(map[string]string) + for i := 0; i < v63; i++ { + this.StringMap[randStringTheproto3(r)] = randStringTheproto3(r) + } + } + if r.Intn(10) != 0 { + v64 := r.Intn(10) + this.StringToBytesMap = make(map[string][]byte) + for i := 0; i < v64; i++ { + v65 := r.Intn(100) + v66 := randStringTheproto3(r) + this.StringToBytesMap[v66] = make([]byte, v65) + for i := 0; i < v65; i++ { + this.StringToBytesMap[v66][i] = byte(r.Intn(256)) + } + } + } + if r.Intn(10) != 0 { + v67 := r.Intn(10) + this.StringToEnumMap = make(map[string]MapEnum) + for i := 0; i < v67; i++ { + this.StringToEnumMap[randStringTheproto3(r)] = MapEnum([]int32{0, 1, 2}[r.Intn(3)]) + } + } + if r.Intn(10) != 0 { + v68 := r.Intn(10) + this.StringToMsgMap = make(map[string]*FloatingPoint) + for i := 0; i < v68; i++ { + this.StringToMsgMap[randStringTheproto3(r)] = NewPopulatedFloatingPoint(r, easy) + } + } + if !easy && r.Intn(10) != 0 { + } + return this +} + +func NewPopulatedMessageWithMap(r randyTheproto3, easy bool) *MessageWithMap { + this := &MessageWithMap{} + if r.Intn(10) != 0 { + v69 := r.Intn(10) + this.NameMapping = make(map[int32]string) + for i := 0; i < v69; i++ { + this.NameMapping[int32(r.Int31())] = randStringTheproto3(r) + } + } + if r.Intn(10) != 0 { + v70 := r.Intn(10) + this.MsgMapping = make(map[int64]*FloatingPoint) + for i := 0; i < v70; i++ { + this.MsgMapping[int64(r.Int63())] = NewPopulatedFloatingPoint(r, easy) + } + } + if r.Intn(10) != 0 { + v71 := r.Intn(10) + this.ByteMapping = make(map[bool][]byte) + for i := 0; i < v71; i++ { + v72 := r.Intn(100) + v73 := bool(bool(r.Intn(2) == 0)) + this.ByteMapping[v73] = make([]byte, v72) + for i := 0; i < v72; i++ { + this.ByteMapping[v73][i] = byte(r.Intn(256)) + } + } + } + if !easy && r.Intn(10) != 0 { + } + return this +} + +func NewPopulatedFloatingPoint(r randyTheproto3, easy bool) *FloatingPoint { + this := &FloatingPoint{} + this.F = float64(r.Float64()) + if r.Intn(2) == 0 { + this.F *= -1 + } + if !easy && r.Intn(10) != 0 { + } + return this +} + +func NewPopulatedUint128Pair(r randyTheproto3, easy bool) *Uint128Pair { + this := &Uint128Pair{} + v74 := github_com_gogo_protobuf_test_custom.NewPopulatedUint128(r) + this.Left = *v74 + this.Right = github_com_gogo_protobuf_test_custom.NewPopulatedUint128(r) + if !easy && r.Intn(10) != 0 { + } + return this +} + +func NewPopulatedContainsNestedMap(r randyTheproto3, easy bool) *ContainsNestedMap { + this := &ContainsNestedMap{} + if !easy && r.Intn(10) != 0 { + } + return this +} + +func NewPopulatedContainsNestedMap_NestedMap(r randyTheproto3, easy bool) *ContainsNestedMap_NestedMap { + this := &ContainsNestedMap_NestedMap{} + if r.Intn(10) != 0 { + v75 := r.Intn(10) + this.NestedMapField = make(map[string]float64) + for i := 0; i < v75; i++ { + v76 := randStringTheproto3(r) + this.NestedMapField[v76] = float64(r.Float64()) + if r.Intn(2) == 0 { + this.NestedMapField[v76] *= -1 + } + } + } + if !easy && r.Intn(10) != 0 { + } + return this +} + +type randyTheproto3 interface { + Float32() float32 + Float64() float64 + Int63() int64 + Int31() int32 + Uint32() uint32 + Intn(n int) int +} + +func randUTF8RuneTheproto3(r randyTheproto3) 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 randStringTheproto3(r randyTheproto3) string { + v77 := r.Intn(100) + tmps := make([]rune, v77) + for i := 0; i < v77; i++ { + tmps[i] = randUTF8RuneTheproto3(r) + } + return string(tmps) +} +func randUnrecognizedTheproto3(r randyTheproto3, 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 = randFieldTheproto3(data, r, fieldNumber, wire) + } + return data +} +func randFieldTheproto3(data []byte, r randyTheproto3, fieldNumber int, wire int) []byte { + key := uint32(fieldNumber)<<3 | uint32(wire) + switch wire { + case 0: + data = encodeVarintPopulateTheproto3(data, uint64(key)) + v78 := r.Int63() + if r.Intn(2) == 0 { + v78 *= -1 + } + data = encodeVarintPopulateTheproto3(data, uint64(v78)) + case 1: + data = encodeVarintPopulateTheproto3(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 = encodeVarintPopulateTheproto3(data, uint64(key)) + ll := r.Intn(100) + data = encodeVarintPopulateTheproto3(data, uint64(ll)) + for j := 0; j < ll; j++ { + data = append(data, byte(r.Intn(256))) + } + default: + data = encodeVarintPopulateTheproto3(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 encodeVarintPopulateTheproto3(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 *Message) Size() (n int) { + var l int + _ = l + l = len(m.Name) + if l > 0 { + n += 1 + l + sovTheproto3(uint64(l)) + } + if m.Hilarity != 0 { + n += 1 + sovTheproto3(uint64(m.Hilarity)) + } + if m.HeightInCm != 0 { + n += 1 + sovTheproto3(uint64(m.HeightInCm)) + } + l = len(m.Data) + if l > 0 { + n += 1 + l + sovTheproto3(uint64(l)) + } + if m.ResultCount != 0 { + n += 1 + sovTheproto3(uint64(m.ResultCount)) + } + if m.TrueScotsman { + n += 2 + } + if m.Score != 0 { + n += 5 + } + if len(m.Key) > 0 { + for _, e := range m.Key { + n += 1 + sovTheproto3(uint64(e)) + } + } + if m.Nested != nil { + l = m.Nested.Size() + n += 1 + l + sovTheproto3(uint64(l)) + } + if len(m.Terrain) > 0 { + for k, v := range m.Terrain { + _ = k + _ = v + l = 0 + if v != nil { + l = v.Size() + } + mapEntrySize := 1 + sovTheproto3(uint64(k)) + 1 + l + sovTheproto3(uint64(l)) + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if m.Proto2Field != nil { + l = m.Proto2Field.Size() + n += 1 + l + sovTheproto3(uint64(l)) + } + if len(m.Proto2Value) > 0 { + for k, v := range m.Proto2Value { + _ = k + _ = v + l = 0 + if v != nil { + l = v.Size() + } + mapEntrySize := 1 + sovTheproto3(uint64(k)) + 1 + l + sovTheproto3(uint64(l)) + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + return n +} + +func (m *Nested) Size() (n int) { + var l int + _ = l + l = len(m.Bunny) + if l > 0 { + n += 1 + l + sovTheproto3(uint64(l)) + } + return n +} + +func (m *AllMaps) Size() (n int) { + var l int + _ = l + if len(m.StringToDoubleMap) > 0 { + for k, v := range m.StringToDoubleMap { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovTheproto3(uint64(len(k))) + 1 + 8 + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.StringToFloatMap) > 0 { + for k, v := range m.StringToFloatMap { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovTheproto3(uint64(len(k))) + 1 + 4 + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.Int32Map) > 0 { + for k, v := range m.Int32Map { + _ = k + _ = v + mapEntrySize := 1 + sovTheproto3(uint64(k)) + 1 + sovTheproto3(uint64(v)) + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.Int64Map) > 0 { + for k, v := range m.Int64Map { + _ = k + _ = v + mapEntrySize := 1 + sovTheproto3(uint64(k)) + 1 + sovTheproto3(uint64(v)) + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.Uint32Map) > 0 { + for k, v := range m.Uint32Map { + _ = k + _ = v + mapEntrySize := 1 + sovTheproto3(uint64(k)) + 1 + sovTheproto3(uint64(v)) + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.Uint64Map) > 0 { + for k, v := range m.Uint64Map { + _ = k + _ = v + mapEntrySize := 1 + sovTheproto3(uint64(k)) + 1 + sovTheproto3(uint64(v)) + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.Sint32Map) > 0 { + for k, v := range m.Sint32Map { + _ = k + _ = v + mapEntrySize := 1 + sozTheproto3(uint64(k)) + 1 + sozTheproto3(uint64(v)) + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.Sint64Map) > 0 { + for k, v := range m.Sint64Map { + _ = k + _ = v + mapEntrySize := 1 + sozTheproto3(uint64(k)) + 1 + sozTheproto3(uint64(v)) + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.Fixed32Map) > 0 { + for k, v := range m.Fixed32Map { + _ = k + _ = v + mapEntrySize := 1 + 4 + 1 + 4 + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.Sfixed32Map) > 0 { + for k, v := range m.Sfixed32Map { + _ = k + _ = v + mapEntrySize := 1 + 4 + 1 + 4 + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.Fixed64Map) > 0 { + for k, v := range m.Fixed64Map { + _ = k + _ = v + mapEntrySize := 1 + 8 + 1 + 8 + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.Sfixed64Map) > 0 { + for k, v := range m.Sfixed64Map { + _ = k + _ = v + mapEntrySize := 1 + 8 + 1 + 8 + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.BoolMap) > 0 { + for k, v := range m.BoolMap { + _ = k + _ = v + mapEntrySize := 1 + 1 + 1 + 1 + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.StringMap) > 0 { + for k, v := range m.StringMap { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovTheproto3(uint64(len(k))) + 1 + len(v) + sovTheproto3(uint64(len(v))) + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.StringToBytesMap) > 0 { + for k, v := range m.StringToBytesMap { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovTheproto3(uint64(len(k))) + 1 + len(v) + sovTheproto3(uint64(len(v))) + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.StringToEnumMap) > 0 { + for k, v := range m.StringToEnumMap { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovTheproto3(uint64(len(k))) + 1 + sovTheproto3(uint64(v)) + n += mapEntrySize + 2 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.StringToMsgMap) > 0 { + for k, v := range m.StringToMsgMap { + _ = k + _ = v + l = 0 + if v != nil { + l = v.Size() + } + mapEntrySize := 1 + len(k) + sovTheproto3(uint64(len(k))) + 1 + l + sovTheproto3(uint64(l)) + n += mapEntrySize + 2 + sovTheproto3(uint64(mapEntrySize)) + } + } + return n +} + +func (m *AllMapsOrdered) Size() (n int) { + var l int + _ = l + if len(m.StringToDoubleMap) > 0 { + for k, v := range m.StringToDoubleMap { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovTheproto3(uint64(len(k))) + 1 + 8 + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.StringToFloatMap) > 0 { + for k, v := range m.StringToFloatMap { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovTheproto3(uint64(len(k))) + 1 + 4 + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.Int32Map) > 0 { + for k, v := range m.Int32Map { + _ = k + _ = v + mapEntrySize := 1 + sovTheproto3(uint64(k)) + 1 + sovTheproto3(uint64(v)) + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.Int64Map) > 0 { + for k, v := range m.Int64Map { + _ = k + _ = v + mapEntrySize := 1 + sovTheproto3(uint64(k)) + 1 + sovTheproto3(uint64(v)) + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.Uint32Map) > 0 { + for k, v := range m.Uint32Map { + _ = k + _ = v + mapEntrySize := 1 + sovTheproto3(uint64(k)) + 1 + sovTheproto3(uint64(v)) + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.Uint64Map) > 0 { + for k, v := range m.Uint64Map { + _ = k + _ = v + mapEntrySize := 1 + sovTheproto3(uint64(k)) + 1 + sovTheproto3(uint64(v)) + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.Sint32Map) > 0 { + for k, v := range m.Sint32Map { + _ = k + _ = v + mapEntrySize := 1 + sozTheproto3(uint64(k)) + 1 + sozTheproto3(uint64(v)) + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.Sint64Map) > 0 { + for k, v := range m.Sint64Map { + _ = k + _ = v + mapEntrySize := 1 + sozTheproto3(uint64(k)) + 1 + sozTheproto3(uint64(v)) + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.Fixed32Map) > 0 { + for k, v := range m.Fixed32Map { + _ = k + _ = v + mapEntrySize := 1 + 4 + 1 + 4 + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.Sfixed32Map) > 0 { + for k, v := range m.Sfixed32Map { + _ = k + _ = v + mapEntrySize := 1 + 4 + 1 + 4 + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.Fixed64Map) > 0 { + for k, v := range m.Fixed64Map { + _ = k + _ = v + mapEntrySize := 1 + 8 + 1 + 8 + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.Sfixed64Map) > 0 { + for k, v := range m.Sfixed64Map { + _ = k + _ = v + mapEntrySize := 1 + 8 + 1 + 8 + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.BoolMap) > 0 { + for k, v := range m.BoolMap { + _ = k + _ = v + mapEntrySize := 1 + 1 + 1 + 1 + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.StringMap) > 0 { + for k, v := range m.StringMap { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovTheproto3(uint64(len(k))) + 1 + len(v) + sovTheproto3(uint64(len(v))) + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.StringToBytesMap) > 0 { + for k, v := range m.StringToBytesMap { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovTheproto3(uint64(len(k))) + 1 + len(v) + sovTheproto3(uint64(len(v))) + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.StringToEnumMap) > 0 { + for k, v := range m.StringToEnumMap { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovTheproto3(uint64(len(k))) + 1 + sovTheproto3(uint64(v)) + n += mapEntrySize + 2 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.StringToMsgMap) > 0 { + for k, v := range m.StringToMsgMap { + _ = k + _ = v + l = 0 + if v != nil { + l = v.Size() + } + mapEntrySize := 1 + len(k) + sovTheproto3(uint64(len(k))) + 1 + l + sovTheproto3(uint64(l)) + n += mapEntrySize + 2 + sovTheproto3(uint64(mapEntrySize)) + } + } + return n +} + +func (m *MessageWithMap) Size() (n int) { + var l int + _ = l + if len(m.NameMapping) > 0 { + for k, v := range m.NameMapping { + _ = k + _ = v + mapEntrySize := 1 + sovTheproto3(uint64(k)) + 1 + len(v) + sovTheproto3(uint64(len(v))) + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.MsgMapping) > 0 { + for k, v := range m.MsgMapping { + _ = k + _ = v + l = 0 + if v != nil { + l = v.Size() + } + mapEntrySize := 1 + sozTheproto3(uint64(k)) + 1 + l + sovTheproto3(uint64(l)) + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.ByteMapping) > 0 { + for k, v := range m.ByteMapping { + _ = k + _ = v + mapEntrySize := 1 + 1 + 1 + len(v) + sovTheproto3(uint64(len(v))) + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + return n +} + +func (m *FloatingPoint) Size() (n int) { + var l int + _ = l + if m.F != 0 { + n += 9 + } + return n +} + +func (m *Uint128Pair) Size() (n int) { + var l int + _ = l + l = m.Left.Size() + n += 1 + l + sovTheproto3(uint64(l)) + if m.Right != nil { + l = m.Right.Size() + n += 1 + l + sovTheproto3(uint64(l)) + } + return n +} + +func (m *ContainsNestedMap) Size() (n int) { + var l int + _ = l + return n +} + +func (m *ContainsNestedMap_NestedMap) Size() (n int) { + var l int + _ = l + if len(m.NestedMapField) > 0 { + for k, v := range m.NestedMapField { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovTheproto3(uint64(len(k))) + 1 + 8 + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + return n +} + +func sovTheproto3(x uint64) (n int) { + for { + n++ + x >>= 7 + if x == 0 { + break + } + } + return n +} +func sozTheproto3(x uint64) (n int) { + return sovTheproto3(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (this *Message) String() string { + if this == nil { + return "nil" + } + keysForTerrain := make([]int64, 0, len(this.Terrain)) + for k := range this.Terrain { + keysForTerrain = append(keysForTerrain, k) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForTerrain) + mapStringForTerrain := "map[int64]*Nested{" + for _, k := range keysForTerrain { + mapStringForTerrain += fmt.Sprintf("%v: %v,", k, this.Terrain[k]) + } + mapStringForTerrain += "}" + keysForProto2Value := make([]int64, 0, len(this.Proto2Value)) + for k := range this.Proto2Value { + keysForProto2Value = append(keysForProto2Value, k) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForProto2Value) + mapStringForProto2Value := "map[int64]*test.NinOptEnum{" + for _, k := range keysForProto2Value { + mapStringForProto2Value += fmt.Sprintf("%v: %v,", k, this.Proto2Value[k]) + } + mapStringForProto2Value += "}" + s := strings.Join([]string{`&Message{`, + `Name:` + fmt.Sprintf("%v", this.Name) + `,`, + `Hilarity:` + fmt.Sprintf("%v", this.Hilarity) + `,`, + `HeightInCm:` + fmt.Sprintf("%v", this.HeightInCm) + `,`, + `Data:` + fmt.Sprintf("%v", this.Data) + `,`, + `ResultCount:` + fmt.Sprintf("%v", this.ResultCount) + `,`, + `TrueScotsman:` + fmt.Sprintf("%v", this.TrueScotsman) + `,`, + `Score:` + fmt.Sprintf("%v", this.Score) + `,`, + `Key:` + fmt.Sprintf("%v", this.Key) + `,`, + `Nested:` + strings.Replace(fmt.Sprintf("%v", this.Nested), "Nested", "Nested", 1) + `,`, + `Terrain:` + mapStringForTerrain + `,`, + `Proto2Field:` + strings.Replace(fmt.Sprintf("%v", this.Proto2Field), "NinOptNative", "test.NinOptNative", 1) + `,`, + `Proto2Value:` + mapStringForProto2Value + `,`, + `}`, + }, "") + return s +} +func (this *Nested) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&Nested{`, + `Bunny:` + fmt.Sprintf("%v", this.Bunny) + `,`, + `}`, + }, "") + return s +} +func (this *AllMaps) String() string { + if this == nil { + return "nil" + } + keysForStringToDoubleMap := make([]string, 0, len(this.StringToDoubleMap)) + for k := range this.StringToDoubleMap { + keysForStringToDoubleMap = append(keysForStringToDoubleMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToDoubleMap) + mapStringForStringToDoubleMap := "map[string]float64{" + for _, k := range keysForStringToDoubleMap { + mapStringForStringToDoubleMap += fmt.Sprintf("%v: %v,", k, this.StringToDoubleMap[k]) + } + mapStringForStringToDoubleMap += "}" + keysForStringToFloatMap := make([]string, 0, len(this.StringToFloatMap)) + for k := range this.StringToFloatMap { + keysForStringToFloatMap = append(keysForStringToFloatMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToFloatMap) + mapStringForStringToFloatMap := "map[string]float32{" + for _, k := range keysForStringToFloatMap { + mapStringForStringToFloatMap += fmt.Sprintf("%v: %v,", k, this.StringToFloatMap[k]) + } + mapStringForStringToFloatMap += "}" + keysForInt32Map := make([]int32, 0, len(this.Int32Map)) + for k := range this.Int32Map { + keysForInt32Map = append(keysForInt32Map, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForInt32Map) + mapStringForInt32Map := "map[int32]int32{" + for _, k := range keysForInt32Map { + mapStringForInt32Map += fmt.Sprintf("%v: %v,", k, this.Int32Map[k]) + } + mapStringForInt32Map += "}" + keysForInt64Map := make([]int64, 0, len(this.Int64Map)) + for k := range this.Int64Map { + keysForInt64Map = append(keysForInt64Map, k) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForInt64Map) + mapStringForInt64Map := "map[int64]int64{" + for _, k := range keysForInt64Map { + mapStringForInt64Map += fmt.Sprintf("%v: %v,", k, this.Int64Map[k]) + } + mapStringForInt64Map += "}" + keysForUint32Map := make([]uint32, 0, len(this.Uint32Map)) + for k := range this.Uint32Map { + keysForUint32Map = append(keysForUint32Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint32s(keysForUint32Map) + mapStringForUint32Map := "map[uint32]uint32{" + for _, k := range keysForUint32Map { + mapStringForUint32Map += fmt.Sprintf("%v: %v,", k, this.Uint32Map[k]) + } + mapStringForUint32Map += "}" + keysForUint64Map := make([]uint64, 0, len(this.Uint64Map)) + for k := range this.Uint64Map { + keysForUint64Map = append(keysForUint64Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint64s(keysForUint64Map) + mapStringForUint64Map := "map[uint64]uint64{" + for _, k := range keysForUint64Map { + mapStringForUint64Map += fmt.Sprintf("%v: %v,", k, this.Uint64Map[k]) + } + mapStringForUint64Map += "}" + keysForSint32Map := make([]int32, 0, len(this.Sint32Map)) + for k := range this.Sint32Map { + keysForSint32Map = append(keysForSint32Map, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForSint32Map) + mapStringForSint32Map := "map[int32]int32{" + for _, k := range keysForSint32Map { + mapStringForSint32Map += fmt.Sprintf("%v: %v,", k, this.Sint32Map[k]) + } + mapStringForSint32Map += "}" + keysForSint64Map := make([]int64, 0, len(this.Sint64Map)) + for k := range this.Sint64Map { + keysForSint64Map = append(keysForSint64Map, k) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForSint64Map) + mapStringForSint64Map := "map[int64]int64{" + for _, k := range keysForSint64Map { + mapStringForSint64Map += fmt.Sprintf("%v: %v,", k, this.Sint64Map[k]) + } + mapStringForSint64Map += "}" + keysForFixed32Map := make([]uint32, 0, len(this.Fixed32Map)) + for k := range this.Fixed32Map { + keysForFixed32Map = append(keysForFixed32Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint32s(keysForFixed32Map) + mapStringForFixed32Map := "map[uint32]uint32{" + for _, k := range keysForFixed32Map { + mapStringForFixed32Map += fmt.Sprintf("%v: %v,", k, this.Fixed32Map[k]) + } + mapStringForFixed32Map += "}" + keysForSfixed32Map := make([]int32, 0, len(this.Sfixed32Map)) + for k := range this.Sfixed32Map { + keysForSfixed32Map = append(keysForSfixed32Map, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForSfixed32Map) + mapStringForSfixed32Map := "map[int32]int32{" + for _, k := range keysForSfixed32Map { + mapStringForSfixed32Map += fmt.Sprintf("%v: %v,", k, this.Sfixed32Map[k]) + } + mapStringForSfixed32Map += "}" + keysForFixed64Map := make([]uint64, 0, len(this.Fixed64Map)) + for k := range this.Fixed64Map { + keysForFixed64Map = append(keysForFixed64Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint64s(keysForFixed64Map) + mapStringForFixed64Map := "map[uint64]uint64{" + for _, k := range keysForFixed64Map { + mapStringForFixed64Map += fmt.Sprintf("%v: %v,", k, this.Fixed64Map[k]) + } + mapStringForFixed64Map += "}" + keysForSfixed64Map := make([]int64, 0, len(this.Sfixed64Map)) + for k := range this.Sfixed64Map { + keysForSfixed64Map = append(keysForSfixed64Map, k) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForSfixed64Map) + mapStringForSfixed64Map := "map[int64]int64{" + for _, k := range keysForSfixed64Map { + mapStringForSfixed64Map += fmt.Sprintf("%v: %v,", k, this.Sfixed64Map[k]) + } + mapStringForSfixed64Map += "}" + keysForBoolMap := make([]bool, 0, len(this.BoolMap)) + for k := range this.BoolMap { + keysForBoolMap = append(keysForBoolMap, k) + } + github_com_gogo_protobuf_sortkeys.Bools(keysForBoolMap) + mapStringForBoolMap := "map[bool]bool{" + for _, k := range keysForBoolMap { + mapStringForBoolMap += fmt.Sprintf("%v: %v,", k, this.BoolMap[k]) + } + mapStringForBoolMap += "}" + keysForStringMap := make([]string, 0, len(this.StringMap)) + for k := range this.StringMap { + keysForStringMap = append(keysForStringMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringMap) + mapStringForStringMap := "map[string]string{" + for _, k := range keysForStringMap { + mapStringForStringMap += fmt.Sprintf("%v: %v,", k, this.StringMap[k]) + } + mapStringForStringMap += "}" + keysForStringToBytesMap := make([]string, 0, len(this.StringToBytesMap)) + for k := range this.StringToBytesMap { + keysForStringToBytesMap = append(keysForStringToBytesMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToBytesMap) + mapStringForStringToBytesMap := "map[string][]byte{" + for _, k := range keysForStringToBytesMap { + mapStringForStringToBytesMap += fmt.Sprintf("%v: %v,", k, this.StringToBytesMap[k]) + } + mapStringForStringToBytesMap += "}" + keysForStringToEnumMap := make([]string, 0, len(this.StringToEnumMap)) + for k := range this.StringToEnumMap { + keysForStringToEnumMap = append(keysForStringToEnumMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToEnumMap) + mapStringForStringToEnumMap := "map[string]MapEnum{" + for _, k := range keysForStringToEnumMap { + mapStringForStringToEnumMap += fmt.Sprintf("%v: %v,", k, this.StringToEnumMap[k]) + } + mapStringForStringToEnumMap += "}" + keysForStringToMsgMap := make([]string, 0, len(this.StringToMsgMap)) + for k := range this.StringToMsgMap { + keysForStringToMsgMap = append(keysForStringToMsgMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToMsgMap) + mapStringForStringToMsgMap := "map[string]*FloatingPoint{" + for _, k := range keysForStringToMsgMap { + mapStringForStringToMsgMap += fmt.Sprintf("%v: %v,", k, this.StringToMsgMap[k]) + } + mapStringForStringToMsgMap += "}" + s := strings.Join([]string{`&AllMaps{`, + `StringToDoubleMap:` + mapStringForStringToDoubleMap + `,`, + `StringToFloatMap:` + mapStringForStringToFloatMap + `,`, + `Int32Map:` + mapStringForInt32Map + `,`, + `Int64Map:` + mapStringForInt64Map + `,`, + `Uint32Map:` + mapStringForUint32Map + `,`, + `Uint64Map:` + mapStringForUint64Map + `,`, + `Sint32Map:` + mapStringForSint32Map + `,`, + `Sint64Map:` + mapStringForSint64Map + `,`, + `Fixed32Map:` + mapStringForFixed32Map + `,`, + `Sfixed32Map:` + mapStringForSfixed32Map + `,`, + `Fixed64Map:` + mapStringForFixed64Map + `,`, + `Sfixed64Map:` + mapStringForSfixed64Map + `,`, + `BoolMap:` + mapStringForBoolMap + `,`, + `StringMap:` + mapStringForStringMap + `,`, + `StringToBytesMap:` + mapStringForStringToBytesMap + `,`, + `StringToEnumMap:` + mapStringForStringToEnumMap + `,`, + `StringToMsgMap:` + mapStringForStringToMsgMap + `,`, + `}`, + }, "") + return s +} +func (this *AllMapsOrdered) String() string { + if this == nil { + return "nil" + } + keysForStringToDoubleMap := make([]string, 0, len(this.StringToDoubleMap)) + for k := range this.StringToDoubleMap { + keysForStringToDoubleMap = append(keysForStringToDoubleMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToDoubleMap) + mapStringForStringToDoubleMap := "map[string]float64{" + for _, k := range keysForStringToDoubleMap { + mapStringForStringToDoubleMap += fmt.Sprintf("%v: %v,", k, this.StringToDoubleMap[k]) + } + mapStringForStringToDoubleMap += "}" + keysForStringToFloatMap := make([]string, 0, len(this.StringToFloatMap)) + for k := range this.StringToFloatMap { + keysForStringToFloatMap = append(keysForStringToFloatMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToFloatMap) + mapStringForStringToFloatMap := "map[string]float32{" + for _, k := range keysForStringToFloatMap { + mapStringForStringToFloatMap += fmt.Sprintf("%v: %v,", k, this.StringToFloatMap[k]) + } + mapStringForStringToFloatMap += "}" + keysForInt32Map := make([]int32, 0, len(this.Int32Map)) + for k := range this.Int32Map { + keysForInt32Map = append(keysForInt32Map, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForInt32Map) + mapStringForInt32Map := "map[int32]int32{" + for _, k := range keysForInt32Map { + mapStringForInt32Map += fmt.Sprintf("%v: %v,", k, this.Int32Map[k]) + } + mapStringForInt32Map += "}" + keysForInt64Map := make([]int64, 0, len(this.Int64Map)) + for k := range this.Int64Map { + keysForInt64Map = append(keysForInt64Map, k) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForInt64Map) + mapStringForInt64Map := "map[int64]int64{" + for _, k := range keysForInt64Map { + mapStringForInt64Map += fmt.Sprintf("%v: %v,", k, this.Int64Map[k]) + } + mapStringForInt64Map += "}" + keysForUint32Map := make([]uint32, 0, len(this.Uint32Map)) + for k := range this.Uint32Map { + keysForUint32Map = append(keysForUint32Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint32s(keysForUint32Map) + mapStringForUint32Map := "map[uint32]uint32{" + for _, k := range keysForUint32Map { + mapStringForUint32Map += fmt.Sprintf("%v: %v,", k, this.Uint32Map[k]) + } + mapStringForUint32Map += "}" + keysForUint64Map := make([]uint64, 0, len(this.Uint64Map)) + for k := range this.Uint64Map { + keysForUint64Map = append(keysForUint64Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint64s(keysForUint64Map) + mapStringForUint64Map := "map[uint64]uint64{" + for _, k := range keysForUint64Map { + mapStringForUint64Map += fmt.Sprintf("%v: %v,", k, this.Uint64Map[k]) + } + mapStringForUint64Map += "}" + keysForSint32Map := make([]int32, 0, len(this.Sint32Map)) + for k := range this.Sint32Map { + keysForSint32Map = append(keysForSint32Map, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForSint32Map) + mapStringForSint32Map := "map[int32]int32{" + for _, k := range keysForSint32Map { + mapStringForSint32Map += fmt.Sprintf("%v: %v,", k, this.Sint32Map[k]) + } + mapStringForSint32Map += "}" + keysForSint64Map := make([]int64, 0, len(this.Sint64Map)) + for k := range this.Sint64Map { + keysForSint64Map = append(keysForSint64Map, k) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForSint64Map) + mapStringForSint64Map := "map[int64]int64{" + for _, k := range keysForSint64Map { + mapStringForSint64Map += fmt.Sprintf("%v: %v,", k, this.Sint64Map[k]) + } + mapStringForSint64Map += "}" + keysForFixed32Map := make([]uint32, 0, len(this.Fixed32Map)) + for k := range this.Fixed32Map { + keysForFixed32Map = append(keysForFixed32Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint32s(keysForFixed32Map) + mapStringForFixed32Map := "map[uint32]uint32{" + for _, k := range keysForFixed32Map { + mapStringForFixed32Map += fmt.Sprintf("%v: %v,", k, this.Fixed32Map[k]) + } + mapStringForFixed32Map += "}" + keysForSfixed32Map := make([]int32, 0, len(this.Sfixed32Map)) + for k := range this.Sfixed32Map { + keysForSfixed32Map = append(keysForSfixed32Map, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForSfixed32Map) + mapStringForSfixed32Map := "map[int32]int32{" + for _, k := range keysForSfixed32Map { + mapStringForSfixed32Map += fmt.Sprintf("%v: %v,", k, this.Sfixed32Map[k]) + } + mapStringForSfixed32Map += "}" + keysForFixed64Map := make([]uint64, 0, len(this.Fixed64Map)) + for k := range this.Fixed64Map { + keysForFixed64Map = append(keysForFixed64Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint64s(keysForFixed64Map) + mapStringForFixed64Map := "map[uint64]uint64{" + for _, k := range keysForFixed64Map { + mapStringForFixed64Map += fmt.Sprintf("%v: %v,", k, this.Fixed64Map[k]) + } + mapStringForFixed64Map += "}" + keysForSfixed64Map := make([]int64, 0, len(this.Sfixed64Map)) + for k := range this.Sfixed64Map { + keysForSfixed64Map = append(keysForSfixed64Map, k) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForSfixed64Map) + mapStringForSfixed64Map := "map[int64]int64{" + for _, k := range keysForSfixed64Map { + mapStringForSfixed64Map += fmt.Sprintf("%v: %v,", k, this.Sfixed64Map[k]) + } + mapStringForSfixed64Map += "}" + keysForBoolMap := make([]bool, 0, len(this.BoolMap)) + for k := range this.BoolMap { + keysForBoolMap = append(keysForBoolMap, k) + } + github_com_gogo_protobuf_sortkeys.Bools(keysForBoolMap) + mapStringForBoolMap := "map[bool]bool{" + for _, k := range keysForBoolMap { + mapStringForBoolMap += fmt.Sprintf("%v: %v,", k, this.BoolMap[k]) + } + mapStringForBoolMap += "}" + keysForStringMap := make([]string, 0, len(this.StringMap)) + for k := range this.StringMap { + keysForStringMap = append(keysForStringMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringMap) + mapStringForStringMap := "map[string]string{" + for _, k := range keysForStringMap { + mapStringForStringMap += fmt.Sprintf("%v: %v,", k, this.StringMap[k]) + } + mapStringForStringMap += "}" + keysForStringToBytesMap := make([]string, 0, len(this.StringToBytesMap)) + for k := range this.StringToBytesMap { + keysForStringToBytesMap = append(keysForStringToBytesMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToBytesMap) + mapStringForStringToBytesMap := "map[string][]byte{" + for _, k := range keysForStringToBytesMap { + mapStringForStringToBytesMap += fmt.Sprintf("%v: %v,", k, this.StringToBytesMap[k]) + } + mapStringForStringToBytesMap += "}" + keysForStringToEnumMap := make([]string, 0, len(this.StringToEnumMap)) + for k := range this.StringToEnumMap { + keysForStringToEnumMap = append(keysForStringToEnumMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToEnumMap) + mapStringForStringToEnumMap := "map[string]MapEnum{" + for _, k := range keysForStringToEnumMap { + mapStringForStringToEnumMap += fmt.Sprintf("%v: %v,", k, this.StringToEnumMap[k]) + } + mapStringForStringToEnumMap += "}" + keysForStringToMsgMap := make([]string, 0, len(this.StringToMsgMap)) + for k := range this.StringToMsgMap { + keysForStringToMsgMap = append(keysForStringToMsgMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToMsgMap) + mapStringForStringToMsgMap := "map[string]*FloatingPoint{" + for _, k := range keysForStringToMsgMap { + mapStringForStringToMsgMap += fmt.Sprintf("%v: %v,", k, this.StringToMsgMap[k]) + } + mapStringForStringToMsgMap += "}" + s := strings.Join([]string{`&AllMapsOrdered{`, + `StringToDoubleMap:` + mapStringForStringToDoubleMap + `,`, + `StringToFloatMap:` + mapStringForStringToFloatMap + `,`, + `Int32Map:` + mapStringForInt32Map + `,`, + `Int64Map:` + mapStringForInt64Map + `,`, + `Uint32Map:` + mapStringForUint32Map + `,`, + `Uint64Map:` + mapStringForUint64Map + `,`, + `Sint32Map:` + mapStringForSint32Map + `,`, + `Sint64Map:` + mapStringForSint64Map + `,`, + `Fixed32Map:` + mapStringForFixed32Map + `,`, + `Sfixed32Map:` + mapStringForSfixed32Map + `,`, + `Fixed64Map:` + mapStringForFixed64Map + `,`, + `Sfixed64Map:` + mapStringForSfixed64Map + `,`, + `BoolMap:` + mapStringForBoolMap + `,`, + `StringMap:` + mapStringForStringMap + `,`, + `StringToBytesMap:` + mapStringForStringToBytesMap + `,`, + `StringToEnumMap:` + mapStringForStringToEnumMap + `,`, + `StringToMsgMap:` + mapStringForStringToMsgMap + `,`, + `}`, + }, "") + return s +} +func (this *MessageWithMap) String() string { + if this == nil { + return "nil" + } + keysForNameMapping := make([]int32, 0, len(this.NameMapping)) + for k := range this.NameMapping { + keysForNameMapping = append(keysForNameMapping, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForNameMapping) + mapStringForNameMapping := "map[int32]string{" + for _, k := range keysForNameMapping { + mapStringForNameMapping += fmt.Sprintf("%v: %v,", k, this.NameMapping[k]) + } + mapStringForNameMapping += "}" + keysForMsgMapping := make([]int64, 0, len(this.MsgMapping)) + for k := range this.MsgMapping { + keysForMsgMapping = append(keysForMsgMapping, k) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForMsgMapping) + mapStringForMsgMapping := "map[int64]*FloatingPoint{" + for _, k := range keysForMsgMapping { + mapStringForMsgMapping += fmt.Sprintf("%v: %v,", k, this.MsgMapping[k]) + } + mapStringForMsgMapping += "}" + keysForByteMapping := make([]bool, 0, len(this.ByteMapping)) + for k := range this.ByteMapping { + keysForByteMapping = append(keysForByteMapping, k) + } + github_com_gogo_protobuf_sortkeys.Bools(keysForByteMapping) + mapStringForByteMapping := "map[bool][]byte{" + for _, k := range keysForByteMapping { + mapStringForByteMapping += fmt.Sprintf("%v: %v,", k, this.ByteMapping[k]) + } + mapStringForByteMapping += "}" + s := strings.Join([]string{`&MessageWithMap{`, + `NameMapping:` + mapStringForNameMapping + `,`, + `MsgMapping:` + mapStringForMsgMapping + `,`, + `ByteMapping:` + mapStringForByteMapping + `,`, + `}`, + }, "") + return s +} +func (this *FloatingPoint) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&FloatingPoint{`, + `F:` + fmt.Sprintf("%v", this.F) + `,`, + `}`, + }, "") + return s +} +func (this *Uint128Pair) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&Uint128Pair{`, + `Left:` + fmt.Sprintf("%v", this.Left) + `,`, + `Right:` + fmt.Sprintf("%v", this.Right) + `,`, + `}`, + }, "") + return s +} +func (this *ContainsNestedMap) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&ContainsNestedMap{`, + `}`, + }, "") + return s +} +func (this *ContainsNestedMap_NestedMap) String() string { + if this == nil { + return "nil" + } + keysForNestedMapField := make([]string, 0, len(this.NestedMapField)) + for k := range this.NestedMapField { + keysForNestedMapField = append(keysForNestedMapField, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForNestedMapField) + mapStringForNestedMapField := "map[string]float64{" + for _, k := range keysForNestedMapField { + mapStringForNestedMapField += fmt.Sprintf("%v: %v,", k, this.NestedMapField[k]) + } + mapStringForNestedMapField += "}" + s := strings.Join([]string{`&ContainsNestedMap_NestedMap{`, + `NestedMapField:` + mapStringForNestedMapField + `,`, + `}`, + }, "") + return s +} +func valueToStringTheproto3(v interface{}) string { + rv := reflect.ValueOf(v) + if rv.IsNil() { + return "nil" + } + pv := reflect.Indirect(rv).Interface() + return fmt.Sprintf("*%v", pv) +} +func (m *Message) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *Message) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Name) > 0 { + data[i] = 0xa + i++ + i = encodeVarintTheproto3(data, i, uint64(len(m.Name))) + i += copy(data[i:], m.Name) + } + if m.Hilarity != 0 { + data[i] = 0x10 + i++ + i = encodeVarintTheproto3(data, i, uint64(m.Hilarity)) + } + if m.HeightInCm != 0 { + data[i] = 0x18 + i++ + i = encodeVarintTheproto3(data, i, uint64(m.HeightInCm)) + } + if len(m.Data) > 0 { + data[i] = 0x22 + i++ + i = encodeVarintTheproto3(data, i, uint64(len(m.Data))) + i += copy(data[i:], m.Data) + } + if len(m.Key) > 0 { + for _, num := range m.Key { + data[i] = 0x28 + i++ + i = encodeVarintTheproto3(data, i, uint64(num)) + } + } + if m.Nested != nil { + data[i] = 0x32 + i++ + i = encodeVarintTheproto3(data, i, uint64(m.Nested.Size())) + n1, err := m.Nested.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n1 + } + if m.ResultCount != 0 { + data[i] = 0x38 + i++ + i = encodeVarintTheproto3(data, i, uint64(m.ResultCount)) + } + if m.TrueScotsman { + data[i] = 0x40 + i++ + if m.TrueScotsman { + data[i] = 1 + } else { + data[i] = 0 + } + i++ + } + if m.Score != 0 { + data[i] = 0x4d + i++ + *(*float32)(unsafe.Pointer(&data[i])) = m.Score + i += 4 + } + if len(m.Terrain) > 0 { + for k := range m.Terrain { + data[i] = 0x52 + i++ + v := m.Terrain[k] + if v == nil { + return 0, errors.New("proto: map has nil element") + } + msgSize := v.Size() + mapSize := 1 + sovTheproto3(uint64(k)) + 1 + msgSize + sovTheproto3(uint64(msgSize)) + i = encodeVarintTheproto3(data, i, uint64(mapSize)) + data[i] = 0x8 + i++ + i = encodeVarintTheproto3(data, i, uint64(k)) + data[i] = 0x12 + i++ + i = encodeVarintTheproto3(data, i, uint64(v.Size())) + n2, err := v.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n2 + } + } + if m.Proto2Field != nil { + data[i] = 0x5a + i++ + i = encodeVarintTheproto3(data, i, uint64(m.Proto2Field.Size())) + n3, err := m.Proto2Field.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n3 + } + if len(m.Proto2Value) > 0 { + for k := range m.Proto2Value { + data[i] = 0x6a + i++ + v := m.Proto2Value[k] + if v == nil { + return 0, errors.New("proto: map has nil element") + } + msgSize := v.Size() + mapSize := 1 + sovTheproto3(uint64(k)) + 1 + msgSize + sovTheproto3(uint64(msgSize)) + i = encodeVarintTheproto3(data, i, uint64(mapSize)) + data[i] = 0x8 + i++ + i = encodeVarintTheproto3(data, i, uint64(k)) + data[i] = 0x12 + i++ + i = encodeVarintTheproto3(data, i, uint64(v.Size())) + n4, err := v.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n4 + } + } + return i, nil +} + +func (m *Nested) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *Nested) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Bunny) > 0 { + data[i] = 0xa + i++ + i = encodeVarintTheproto3(data, i, uint64(len(m.Bunny))) + i += copy(data[i:], m.Bunny) + } + return i, nil +} + +func (m *AllMaps) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *AllMaps) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.StringToDoubleMap) > 0 { + for k := range m.StringToDoubleMap { + data[i] = 0xa + i++ + v := m.StringToDoubleMap[k] + mapSize := 1 + len(k) + sovTheproto3(uint64(len(k))) + 1 + 8 + i = encodeVarintTheproto3(data, i, uint64(mapSize)) + data[i] = 0xa + i++ + i = encodeVarintTheproto3(data, i, uint64(len(k))) + i += copy(data[i:], k) + data[i] = 0x11 + i++ + i = encodeFixed64Theproto3(data, i, uint64(math.Float64bits(float64(v)))) + } + } + if len(m.StringToFloatMap) > 0 { + for k := range m.StringToFloatMap { + data[i] = 0x12 + i++ + v := m.StringToFloatMap[k] + mapSize := 1 + len(k) + sovTheproto3(uint64(len(k))) + 1 + 4 + i = encodeVarintTheproto3(data, i, uint64(mapSize)) + data[i] = 0xa + i++ + i = encodeVarintTheproto3(data, i, uint64(len(k))) + i += copy(data[i:], k) + data[i] = 0x15 + i++ + i = encodeFixed32Theproto3(data, i, uint32(math.Float32bits(float32(v)))) + } + } + if len(m.Int32Map) > 0 { + for k := range m.Int32Map { + data[i] = 0x1a + i++ + v := m.Int32Map[k] + mapSize := 1 + sovTheproto3(uint64(k)) + 1 + sovTheproto3(uint64(v)) + i = encodeVarintTheproto3(data, i, uint64(mapSize)) + data[i] = 0x8 + i++ + i = encodeVarintTheproto3(data, i, uint64(k)) + data[i] = 0x10 + i++ + i = encodeVarintTheproto3(data, i, uint64(v)) + } + } + if len(m.Int64Map) > 0 { + for k := range m.Int64Map { + data[i] = 0x22 + i++ + v := m.Int64Map[k] + mapSize := 1 + sovTheproto3(uint64(k)) + 1 + sovTheproto3(uint64(v)) + i = encodeVarintTheproto3(data, i, uint64(mapSize)) + data[i] = 0x8 + i++ + i = encodeVarintTheproto3(data, i, uint64(k)) + data[i] = 0x10 + i++ + i = encodeVarintTheproto3(data, i, uint64(v)) + } + } + if len(m.Uint32Map) > 0 { + for k := range m.Uint32Map { + data[i] = 0x2a + i++ + v := m.Uint32Map[k] + mapSize := 1 + sovTheproto3(uint64(k)) + 1 + sovTheproto3(uint64(v)) + i = encodeVarintTheproto3(data, i, uint64(mapSize)) + data[i] = 0x8 + i++ + i = encodeVarintTheproto3(data, i, uint64(k)) + data[i] = 0x10 + i++ + i = encodeVarintTheproto3(data, i, uint64(v)) + } + } + if len(m.Uint64Map) > 0 { + for k := range m.Uint64Map { + data[i] = 0x32 + i++ + v := m.Uint64Map[k] + mapSize := 1 + sovTheproto3(uint64(k)) + 1 + sovTheproto3(uint64(v)) + i = encodeVarintTheproto3(data, i, uint64(mapSize)) + data[i] = 0x8 + i++ + i = encodeVarintTheproto3(data, i, uint64(k)) + data[i] = 0x10 + i++ + i = encodeVarintTheproto3(data, i, uint64(v)) + } + } + if len(m.Sint32Map) > 0 { + for k := range m.Sint32Map { + data[i] = 0x3a + i++ + v := m.Sint32Map[k] + mapSize := 1 + sozTheproto3(uint64(k)) + 1 + sozTheproto3(uint64(v)) + i = encodeVarintTheproto3(data, i, uint64(mapSize)) + data[i] = 0x8 + i++ + i = encodeVarintTheproto3(data, i, uint64((uint32(k)<<1)^uint32((k>>31)))) + data[i] = 0x10 + i++ + i = encodeVarintTheproto3(data, i, uint64((uint32(v)<<1)^uint32((v>>31)))) + } + } + if len(m.Sint64Map) > 0 { + for k := range m.Sint64Map { + data[i] = 0x42 + i++ + v := m.Sint64Map[k] + mapSize := 1 + sozTheproto3(uint64(k)) + 1 + sozTheproto3(uint64(v)) + i = encodeVarintTheproto3(data, i, uint64(mapSize)) + data[i] = 0x8 + i++ + i = encodeVarintTheproto3(data, i, uint64((uint64(k)<<1)^uint64((k>>63)))) + data[i] = 0x10 + i++ + i = encodeVarintTheproto3(data, i, uint64((uint64(v)<<1)^uint64((v>>63)))) + } + } + if len(m.Fixed32Map) > 0 { + for k := range m.Fixed32Map { + data[i] = 0x4a + i++ + v := m.Fixed32Map[k] + mapSize := 1 + 4 + 1 + 4 + i = encodeVarintTheproto3(data, i, uint64(mapSize)) + data[i] = 0xd + i++ + i = encodeFixed32Theproto3(data, i, uint32(k)) + data[i] = 0x15 + i++ + i = encodeFixed32Theproto3(data, i, uint32(v)) + } + } + if len(m.Sfixed32Map) > 0 { + for k := range m.Sfixed32Map { + data[i] = 0x52 + i++ + v := m.Sfixed32Map[k] + mapSize := 1 + 4 + 1 + 4 + i = encodeVarintTheproto3(data, i, uint64(mapSize)) + data[i] = 0xd + i++ + i = encodeFixed32Theproto3(data, i, uint32(k)) + data[i] = 0x15 + i++ + i = encodeFixed32Theproto3(data, i, uint32(v)) + } + } + if len(m.Fixed64Map) > 0 { + for k := range m.Fixed64Map { + data[i] = 0x5a + i++ + v := m.Fixed64Map[k] + mapSize := 1 + 8 + 1 + 8 + i = encodeVarintTheproto3(data, i, uint64(mapSize)) + data[i] = 0x9 + i++ + i = encodeFixed64Theproto3(data, i, uint64(k)) + data[i] = 0x11 + i++ + i = encodeFixed64Theproto3(data, i, uint64(v)) + } + } + if len(m.Sfixed64Map) > 0 { + for k := range m.Sfixed64Map { + data[i] = 0x62 + i++ + v := m.Sfixed64Map[k] + mapSize := 1 + 8 + 1 + 8 + i = encodeVarintTheproto3(data, i, uint64(mapSize)) + data[i] = 0x9 + i++ + i = encodeFixed64Theproto3(data, i, uint64(k)) + data[i] = 0x11 + i++ + i = encodeFixed64Theproto3(data, i, uint64(v)) + } + } + if len(m.BoolMap) > 0 { + for k := range m.BoolMap { + data[i] = 0x6a + i++ + v := m.BoolMap[k] + mapSize := 1 + 1 + 1 + 1 + i = encodeVarintTheproto3(data, i, uint64(mapSize)) + data[i] = 0x8 + i++ + if k { + data[i] = 1 + } else { + data[i] = 0 + } + i++ + data[i] = 0x10 + i++ + if v { + data[i] = 1 + } else { + data[i] = 0 + } + i++ + } + } + if len(m.StringMap) > 0 { + for k := range m.StringMap { + data[i] = 0x72 + i++ + v := m.StringMap[k] + mapSize := 1 + len(k) + sovTheproto3(uint64(len(k))) + 1 + len(v) + sovTheproto3(uint64(len(v))) + i = encodeVarintTheproto3(data, i, uint64(mapSize)) + data[i] = 0xa + i++ + i = encodeVarintTheproto3(data, i, uint64(len(k))) + i += copy(data[i:], k) + data[i] = 0x12 + i++ + i = encodeVarintTheproto3(data, i, uint64(len(v))) + i += copy(data[i:], v) + } + } + if len(m.StringToBytesMap) > 0 { + for k := range m.StringToBytesMap { + data[i] = 0x7a + i++ + v := m.StringToBytesMap[k] + mapSize := 1 + len(k) + sovTheproto3(uint64(len(k))) + 1 + len(v) + sovTheproto3(uint64(len(v))) + i = encodeVarintTheproto3(data, i, uint64(mapSize)) + data[i] = 0xa + i++ + i = encodeVarintTheproto3(data, i, uint64(len(k))) + i += copy(data[i:], k) + data[i] = 0x12 + i++ + i = encodeVarintTheproto3(data, i, uint64(len(v))) + i += copy(data[i:], v) + } + } + if len(m.StringToEnumMap) > 0 { + for k := range m.StringToEnumMap { + data[i] = 0x82 + i++ + data[i] = 0x1 + i++ + v := m.StringToEnumMap[k] + mapSize := 1 + len(k) + sovTheproto3(uint64(len(k))) + 1 + sovTheproto3(uint64(v)) + i = encodeVarintTheproto3(data, i, uint64(mapSize)) + data[i] = 0xa + i++ + i = encodeVarintTheproto3(data, i, uint64(len(k))) + i += copy(data[i:], k) + data[i] = 0x10 + i++ + i = encodeVarintTheproto3(data, i, uint64(v)) + } + } + if len(m.StringToMsgMap) > 0 { + for k := range m.StringToMsgMap { + data[i] = 0x8a + i++ + data[i] = 0x1 + i++ + v := m.StringToMsgMap[k] + if v == nil { + return 0, errors.New("proto: map has nil element") + } + msgSize := v.Size() + mapSize := 1 + len(k) + sovTheproto3(uint64(len(k))) + 1 + msgSize + sovTheproto3(uint64(msgSize)) + i = encodeVarintTheproto3(data, i, uint64(mapSize)) + data[i] = 0xa + i++ + i = encodeVarintTheproto3(data, i, uint64(len(k))) + i += copy(data[i:], k) + data[i] = 0x12 + i++ + i = encodeVarintTheproto3(data, i, uint64(v.Size())) + n5, err := v.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n5 + } + } + return i, nil +} + +func (m *AllMapsOrdered) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *AllMapsOrdered) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.StringToDoubleMap) > 0 { + keysForStringToDoubleMap := make([]string, 0, len(m.StringToDoubleMap)) + for k := range m.StringToDoubleMap { + keysForStringToDoubleMap = append(keysForStringToDoubleMap, string(k)) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToDoubleMap) + for _, k := range keysForStringToDoubleMap { + data[i] = 0xa + i++ + v := m.StringToDoubleMap[string(k)] + mapSize := 1 + len(k) + sovTheproto3(uint64(len(k))) + 1 + 8 + i = encodeVarintTheproto3(data, i, uint64(mapSize)) + data[i] = 0xa + i++ + i = encodeVarintTheproto3(data, i, uint64(len(k))) + i += copy(data[i:], k) + data[i] = 0x11 + i++ + i = encodeFixed64Theproto3(data, i, uint64(math.Float64bits(float64(v)))) + } + } + if len(m.StringToFloatMap) > 0 { + keysForStringToFloatMap := make([]string, 0, len(m.StringToFloatMap)) + for k := range m.StringToFloatMap { + keysForStringToFloatMap = append(keysForStringToFloatMap, string(k)) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToFloatMap) + for _, k := range keysForStringToFloatMap { + data[i] = 0x12 + i++ + v := m.StringToFloatMap[string(k)] + mapSize := 1 + len(k) + sovTheproto3(uint64(len(k))) + 1 + 4 + i = encodeVarintTheproto3(data, i, uint64(mapSize)) + data[i] = 0xa + i++ + i = encodeVarintTheproto3(data, i, uint64(len(k))) + i += copy(data[i:], k) + data[i] = 0x15 + i++ + i = encodeFixed32Theproto3(data, i, uint32(math.Float32bits(float32(v)))) + } + } + if len(m.Int32Map) > 0 { + keysForInt32Map := make([]int32, 0, len(m.Int32Map)) + for k := range m.Int32Map { + keysForInt32Map = append(keysForInt32Map, int32(k)) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForInt32Map) + for _, k := range keysForInt32Map { + data[i] = 0x1a + i++ + v := m.Int32Map[int32(k)] + mapSize := 1 + sovTheproto3(uint64(k)) + 1 + sovTheproto3(uint64(v)) + i = encodeVarintTheproto3(data, i, uint64(mapSize)) + data[i] = 0x8 + i++ + i = encodeVarintTheproto3(data, i, uint64(k)) + data[i] = 0x10 + i++ + i = encodeVarintTheproto3(data, i, uint64(v)) + } + } + if len(m.Int64Map) > 0 { + keysForInt64Map := make([]int64, 0, len(m.Int64Map)) + for k := range m.Int64Map { + keysForInt64Map = append(keysForInt64Map, int64(k)) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForInt64Map) + for _, k := range keysForInt64Map { + data[i] = 0x22 + i++ + v := m.Int64Map[int64(k)] + mapSize := 1 + sovTheproto3(uint64(k)) + 1 + sovTheproto3(uint64(v)) + i = encodeVarintTheproto3(data, i, uint64(mapSize)) + data[i] = 0x8 + i++ + i = encodeVarintTheproto3(data, i, uint64(k)) + data[i] = 0x10 + i++ + i = encodeVarintTheproto3(data, i, uint64(v)) + } + } + if len(m.Uint32Map) > 0 { + keysForUint32Map := make([]uint32, 0, len(m.Uint32Map)) + for k := range m.Uint32Map { + keysForUint32Map = append(keysForUint32Map, uint32(k)) + } + github_com_gogo_protobuf_sortkeys.Uint32s(keysForUint32Map) + for _, k := range keysForUint32Map { + data[i] = 0x2a + i++ + v := m.Uint32Map[uint32(k)] + mapSize := 1 + sovTheproto3(uint64(k)) + 1 + sovTheproto3(uint64(v)) + i = encodeVarintTheproto3(data, i, uint64(mapSize)) + data[i] = 0x8 + i++ + i = encodeVarintTheproto3(data, i, uint64(k)) + data[i] = 0x10 + i++ + i = encodeVarintTheproto3(data, i, uint64(v)) + } + } + if len(m.Uint64Map) > 0 { + keysForUint64Map := make([]uint64, 0, len(m.Uint64Map)) + for k := range m.Uint64Map { + keysForUint64Map = append(keysForUint64Map, uint64(k)) + } + github_com_gogo_protobuf_sortkeys.Uint64s(keysForUint64Map) + for _, k := range keysForUint64Map { + data[i] = 0x32 + i++ + v := m.Uint64Map[uint64(k)] + mapSize := 1 + sovTheproto3(uint64(k)) + 1 + sovTheproto3(uint64(v)) + i = encodeVarintTheproto3(data, i, uint64(mapSize)) + data[i] = 0x8 + i++ + i = encodeVarintTheproto3(data, i, uint64(k)) + data[i] = 0x10 + i++ + i = encodeVarintTheproto3(data, i, uint64(v)) + } + } + if len(m.Sint32Map) > 0 { + keysForSint32Map := make([]int32, 0, len(m.Sint32Map)) + for k := range m.Sint32Map { + keysForSint32Map = append(keysForSint32Map, int32(k)) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForSint32Map) + for _, k := range keysForSint32Map { + data[i] = 0x3a + i++ + v := m.Sint32Map[int32(k)] + mapSize := 1 + sozTheproto3(uint64(k)) + 1 + sozTheproto3(uint64(v)) + i = encodeVarintTheproto3(data, i, uint64(mapSize)) + data[i] = 0x8 + i++ + i = encodeVarintTheproto3(data, i, uint64((uint32(k)<<1)^uint32((k>>31)))) + data[i] = 0x10 + i++ + i = encodeVarintTheproto3(data, i, uint64((uint32(v)<<1)^uint32((v>>31)))) + } + } + if len(m.Sint64Map) > 0 { + keysForSint64Map := make([]int64, 0, len(m.Sint64Map)) + for k := range m.Sint64Map { + keysForSint64Map = append(keysForSint64Map, int64(k)) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForSint64Map) + for _, k := range keysForSint64Map { + data[i] = 0x42 + i++ + v := m.Sint64Map[int64(k)] + mapSize := 1 + sozTheproto3(uint64(k)) + 1 + sozTheproto3(uint64(v)) + i = encodeVarintTheproto3(data, i, uint64(mapSize)) + data[i] = 0x8 + i++ + i = encodeVarintTheproto3(data, i, uint64((uint64(k)<<1)^uint64((k>>63)))) + data[i] = 0x10 + i++ + i = encodeVarintTheproto3(data, i, uint64((uint64(v)<<1)^uint64((v>>63)))) + } + } + if len(m.Fixed32Map) > 0 { + keysForFixed32Map := make([]uint32, 0, len(m.Fixed32Map)) + for k := range m.Fixed32Map { + keysForFixed32Map = append(keysForFixed32Map, uint32(k)) + } + github_com_gogo_protobuf_sortkeys.Uint32s(keysForFixed32Map) + for _, k := range keysForFixed32Map { + data[i] = 0x4a + i++ + v := m.Fixed32Map[uint32(k)] + mapSize := 1 + 4 + 1 + 4 + i = encodeVarintTheproto3(data, i, uint64(mapSize)) + data[i] = 0xd + i++ + i = encodeFixed32Theproto3(data, i, uint32(k)) + data[i] = 0x15 + i++ + i = encodeFixed32Theproto3(data, i, uint32(v)) + } + } + if len(m.Sfixed32Map) > 0 { + keysForSfixed32Map := make([]int32, 0, len(m.Sfixed32Map)) + for k := range m.Sfixed32Map { + keysForSfixed32Map = append(keysForSfixed32Map, int32(k)) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForSfixed32Map) + for _, k := range keysForSfixed32Map { + data[i] = 0x52 + i++ + v := m.Sfixed32Map[int32(k)] + mapSize := 1 + 4 + 1 + 4 + i = encodeVarintTheproto3(data, i, uint64(mapSize)) + data[i] = 0xd + i++ + i = encodeFixed32Theproto3(data, i, uint32(k)) + data[i] = 0x15 + i++ + i = encodeFixed32Theproto3(data, i, uint32(v)) + } + } + if len(m.Fixed64Map) > 0 { + keysForFixed64Map := make([]uint64, 0, len(m.Fixed64Map)) + for k := range m.Fixed64Map { + keysForFixed64Map = append(keysForFixed64Map, uint64(k)) + } + github_com_gogo_protobuf_sortkeys.Uint64s(keysForFixed64Map) + for _, k := range keysForFixed64Map { + data[i] = 0x5a + i++ + v := m.Fixed64Map[uint64(k)] + mapSize := 1 + 8 + 1 + 8 + i = encodeVarintTheproto3(data, i, uint64(mapSize)) + data[i] = 0x9 + i++ + i = encodeFixed64Theproto3(data, i, uint64(k)) + data[i] = 0x11 + i++ + i = encodeFixed64Theproto3(data, i, uint64(v)) + } + } + if len(m.Sfixed64Map) > 0 { + keysForSfixed64Map := make([]int64, 0, len(m.Sfixed64Map)) + for k := range m.Sfixed64Map { + keysForSfixed64Map = append(keysForSfixed64Map, int64(k)) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForSfixed64Map) + for _, k := range keysForSfixed64Map { + data[i] = 0x62 + i++ + v := m.Sfixed64Map[int64(k)] + mapSize := 1 + 8 + 1 + 8 + i = encodeVarintTheproto3(data, i, uint64(mapSize)) + data[i] = 0x9 + i++ + i = encodeFixed64Theproto3(data, i, uint64(k)) + data[i] = 0x11 + i++ + i = encodeFixed64Theproto3(data, i, uint64(v)) + } + } + if len(m.BoolMap) > 0 { + keysForBoolMap := make([]bool, 0, len(m.BoolMap)) + for k := range m.BoolMap { + keysForBoolMap = append(keysForBoolMap, bool(k)) + } + github_com_gogo_protobuf_sortkeys.Bools(keysForBoolMap) + for _, k := range keysForBoolMap { + data[i] = 0x6a + i++ + v := m.BoolMap[bool(k)] + mapSize := 1 + 1 + 1 + 1 + i = encodeVarintTheproto3(data, i, uint64(mapSize)) + data[i] = 0x8 + i++ + if k { + data[i] = 1 + } else { + data[i] = 0 + } + i++ + data[i] = 0x10 + i++ + if v { + data[i] = 1 + } else { + data[i] = 0 + } + i++ + } + } + if len(m.StringMap) > 0 { + keysForStringMap := make([]string, 0, len(m.StringMap)) + for k := range m.StringMap { + keysForStringMap = append(keysForStringMap, string(k)) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringMap) + for _, k := range keysForStringMap { + data[i] = 0x72 + i++ + v := m.StringMap[string(k)] + mapSize := 1 + len(k) + sovTheproto3(uint64(len(k))) + 1 + len(v) + sovTheproto3(uint64(len(v))) + i = encodeVarintTheproto3(data, i, uint64(mapSize)) + data[i] = 0xa + i++ + i = encodeVarintTheproto3(data, i, uint64(len(k))) + i += copy(data[i:], k) + data[i] = 0x12 + i++ + i = encodeVarintTheproto3(data, i, uint64(len(v))) + i += copy(data[i:], v) + } + } + if len(m.StringToBytesMap) > 0 { + keysForStringToBytesMap := make([]string, 0, len(m.StringToBytesMap)) + for k := range m.StringToBytesMap { + keysForStringToBytesMap = append(keysForStringToBytesMap, string(k)) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToBytesMap) + for _, k := range keysForStringToBytesMap { + data[i] = 0x7a + i++ + v := m.StringToBytesMap[string(k)] + mapSize := 1 + len(k) + sovTheproto3(uint64(len(k))) + 1 + len(v) + sovTheproto3(uint64(len(v))) + i = encodeVarintTheproto3(data, i, uint64(mapSize)) + data[i] = 0xa + i++ + i = encodeVarintTheproto3(data, i, uint64(len(k))) + i += copy(data[i:], k) + data[i] = 0x12 + i++ + i = encodeVarintTheproto3(data, i, uint64(len(v))) + i += copy(data[i:], v) + } + } + if len(m.StringToEnumMap) > 0 { + keysForStringToEnumMap := make([]string, 0, len(m.StringToEnumMap)) + for k := range m.StringToEnumMap { + keysForStringToEnumMap = append(keysForStringToEnumMap, string(k)) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToEnumMap) + for _, k := range keysForStringToEnumMap { + data[i] = 0x82 + i++ + data[i] = 0x1 + i++ + v := m.StringToEnumMap[string(k)] + mapSize := 1 + len(k) + sovTheproto3(uint64(len(k))) + 1 + sovTheproto3(uint64(v)) + i = encodeVarintTheproto3(data, i, uint64(mapSize)) + data[i] = 0xa + i++ + i = encodeVarintTheproto3(data, i, uint64(len(k))) + i += copy(data[i:], k) + data[i] = 0x10 + i++ + i = encodeVarintTheproto3(data, i, uint64(v)) + } + } + if len(m.StringToMsgMap) > 0 { + keysForStringToMsgMap := make([]string, 0, len(m.StringToMsgMap)) + for k := range m.StringToMsgMap { + keysForStringToMsgMap = append(keysForStringToMsgMap, string(k)) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToMsgMap) + for _, k := range keysForStringToMsgMap { + data[i] = 0x8a + i++ + data[i] = 0x1 + i++ + v := m.StringToMsgMap[string(k)] + if v == nil { + return 0, errors.New("proto: map has nil element") + } + msgSize := v.Size() + mapSize := 1 + len(k) + sovTheproto3(uint64(len(k))) + 1 + msgSize + sovTheproto3(uint64(msgSize)) + i = encodeVarintTheproto3(data, i, uint64(mapSize)) + data[i] = 0xa + i++ + i = encodeVarintTheproto3(data, i, uint64(len(k))) + i += copy(data[i:], k) + data[i] = 0x12 + i++ + i = encodeVarintTheproto3(data, i, uint64(v.Size())) + n6, err := v.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n6 + } + } + return i, nil +} + +func (m *MessageWithMap) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *MessageWithMap) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.NameMapping) > 0 { + for k := range m.NameMapping { + data[i] = 0xa + i++ + v := m.NameMapping[k] + mapSize := 1 + sovTheproto3(uint64(k)) + 1 + len(v) + sovTheproto3(uint64(len(v))) + i = encodeVarintTheproto3(data, i, uint64(mapSize)) + data[i] = 0x8 + i++ + i = encodeVarintTheproto3(data, i, uint64(k)) + data[i] = 0x12 + i++ + i = encodeVarintTheproto3(data, i, uint64(len(v))) + i += copy(data[i:], v) + } + } + if len(m.MsgMapping) > 0 { + for k := range m.MsgMapping { + data[i] = 0x12 + i++ + v := m.MsgMapping[k] + if v == nil { + return 0, errors.New("proto: map has nil element") + } + msgSize := v.Size() + mapSize := 1 + sozTheproto3(uint64(k)) + 1 + msgSize + sovTheproto3(uint64(msgSize)) + i = encodeVarintTheproto3(data, i, uint64(mapSize)) + data[i] = 0x8 + i++ + i = encodeVarintTheproto3(data, i, uint64((uint64(k)<<1)^uint64((k>>63)))) + data[i] = 0x12 + i++ + i = encodeVarintTheproto3(data, i, uint64(v.Size())) + n7, err := v.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n7 + } + } + if len(m.ByteMapping) > 0 { + for k := range m.ByteMapping { + data[i] = 0x1a + i++ + v := m.ByteMapping[k] + mapSize := 1 + 1 + 1 + len(v) + sovTheproto3(uint64(len(v))) + i = encodeVarintTheproto3(data, i, uint64(mapSize)) + data[i] = 0x8 + i++ + if k { + data[i] = 1 + } else { + data[i] = 0 + } + i++ + data[i] = 0x12 + i++ + i = encodeVarintTheproto3(data, i, uint64(len(v))) + i += copy(data[i:], v) + } + } + return i, nil +} + +func (m *FloatingPoint) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *FloatingPoint) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.F != 0 { + data[i] = 0x9 + i++ + *(*float64)(unsafe.Pointer(&data[i])) = m.F + i += 8 + } + return i, nil +} + +func (m *Uint128Pair) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *Uint128Pair) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + data[i] = 0xa + i++ + i = encodeVarintTheproto3(data, i, uint64(m.Left.Size())) + n8, err := m.Left.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n8 + if m.Right != nil { + data[i] = 0x12 + i++ + i = encodeVarintTheproto3(data, i, uint64(m.Right.Size())) + n9, err := m.Right.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n9 + } + return i, nil +} + +func (m *ContainsNestedMap) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *ContainsNestedMap) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + return i, nil +} + +func (m *ContainsNestedMap_NestedMap) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *ContainsNestedMap_NestedMap) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.NestedMapField) > 0 { + for k := range m.NestedMapField { + data[i] = 0xa + i++ + v := m.NestedMapField[k] + mapSize := 1 + len(k) + sovTheproto3(uint64(len(k))) + 1 + 8 + i = encodeVarintTheproto3(data, i, uint64(mapSize)) + data[i] = 0xa + i++ + i = encodeVarintTheproto3(data, i, uint64(len(k))) + i += copy(data[i:], k) + data[i] = 0x11 + i++ + i = encodeFixed64Theproto3(data, i, uint64(math.Float64bits(float64(v)))) + } + } + return i, nil +} + +func encodeFixed64Theproto3(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 encodeFixed32Theproto3(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 encodeVarintTheproto3(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 (m *Message) 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 ErrIntOverflowTheproto3Unsafe + } + 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: Message: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Message: 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 ErrIntOverflowTheproto3Unsafe + } + 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 ErrInvalidLengthTheproto3Unsafe + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Name = string(data[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Hilarity", wireType) + } + m.Hilarity = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + m.Hilarity |= (Message_Humour(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field HeightInCm", wireType) + } + m.HeightInCm = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + m.HeightInCm |= (uint32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + 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 ErrIntOverflowTheproto3Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthTheproto3Unsafe + } + 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 != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Key", wireType) + } + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Key = append(m.Key, v) + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Nested", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTheproto3Unsafe + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Nested == nil { + m.Nested = &Nested{} + } + if err := m.Nested.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 7: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field ResultCount", wireType) + } + m.ResultCount = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + m.ResultCount |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + case 8: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field TrueScotsman", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.TrueScotsman = bool(v != 0) + case 9: + if wireType != 5 { + return fmt.Errorf("proto: wrong wireType = %d for field Score", wireType) + } + if iNdEx+4 > l { + return io.ErrUnexpectedEOF + } + m.Score = *(*float32)(unsafe.Pointer(&data[iNdEx])) + iNdEx += 4 + case 10: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Terrain", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTheproto3Unsafe + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var keykey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + keykey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapkey int64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + mapkey |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var valuekey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + valuekey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapmsglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + mapmsglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if mapmsglen < 0 { + return ErrInvalidLengthTheproto3Unsafe + } + postmsgIndex := iNdEx + mapmsglen + if mapmsglen < 0 { + return ErrInvalidLengthTheproto3Unsafe + } + if postmsgIndex > l { + return io.ErrUnexpectedEOF + } + mapvalue := &Nested{} + if err := mapvalue.Unmarshal(data[iNdEx:postmsgIndex]); err != nil { + return err + } + iNdEx = postmsgIndex + if m.Terrain == nil { + m.Terrain = make(map[int64]*Nested) + } + m.Terrain[mapkey] = mapvalue + iNdEx = postIndex + case 11: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Proto2Field", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTheproto3Unsafe + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Proto2Field == nil { + m.Proto2Field = &test.NinOptNative{} + } + if err := m.Proto2Field.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 13: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Proto2Value", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTheproto3Unsafe + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var keykey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + keykey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapkey int64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + mapkey |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var valuekey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + valuekey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapmsglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + mapmsglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if mapmsglen < 0 { + return ErrInvalidLengthTheproto3Unsafe + } + postmsgIndex := iNdEx + mapmsglen + if mapmsglen < 0 { + return ErrInvalidLengthTheproto3Unsafe + } + if postmsgIndex > l { + return io.ErrUnexpectedEOF + } + mapvalue := &test.NinOptEnum{} + if err := mapvalue.Unmarshal(data[iNdEx:postmsgIndex]); err != nil { + return err + } + iNdEx = postmsgIndex + if m.Proto2Value == nil { + m.Proto2Value = make(map[int64]*test.NinOptEnum) + } + m.Proto2Value[mapkey] = mapvalue + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTheproto3Unsafe(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTheproto3Unsafe + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Nested) 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 ErrIntOverflowTheproto3Unsafe + } + 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: Nested: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Nested: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Bunny", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3Unsafe + } + 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 ErrInvalidLengthTheproto3Unsafe + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Bunny = string(data[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTheproto3Unsafe(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTheproto3Unsafe + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *AllMaps) 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 ErrIntOverflowTheproto3Unsafe + } + 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: AllMaps: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: AllMaps: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field StringToDoubleMap", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTheproto3Unsafe + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var keykey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + keykey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var stringLenmapkey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLenmapkey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapkey := int(stringLenmapkey) + if intStringLenmapkey < 0 { + return ErrInvalidLengthTheproto3Unsafe + } + postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey > l { + return io.ErrUnexpectedEOF + } + mapkey := string(data[iNdEx:postStringIndexmapkey]) + iNdEx = postStringIndexmapkey + var valuekey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + valuekey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapvaluetemp uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + iNdEx += 8 + mapvaluetemp = uint64(data[iNdEx-8]) + mapvaluetemp |= uint64(data[iNdEx-7]) << 8 + mapvaluetemp |= uint64(data[iNdEx-6]) << 16 + mapvaluetemp |= uint64(data[iNdEx-5]) << 24 + mapvaluetemp |= uint64(data[iNdEx-4]) << 32 + mapvaluetemp |= uint64(data[iNdEx-3]) << 40 + mapvaluetemp |= uint64(data[iNdEx-2]) << 48 + mapvaluetemp |= uint64(data[iNdEx-1]) << 56 + mapvalue := math.Float64frombits(mapvaluetemp) + if m.StringToDoubleMap == nil { + m.StringToDoubleMap = make(map[string]float64) + } + m.StringToDoubleMap[mapkey] = mapvalue + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field StringToFloatMap", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTheproto3Unsafe + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var keykey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + keykey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var stringLenmapkey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLenmapkey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapkey := int(stringLenmapkey) + if intStringLenmapkey < 0 { + return ErrInvalidLengthTheproto3Unsafe + } + postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey > l { + return io.ErrUnexpectedEOF + } + mapkey := string(data[iNdEx:postStringIndexmapkey]) + iNdEx = postStringIndexmapkey + var valuekey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + valuekey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapvaluetemp uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + iNdEx += 4 + mapvaluetemp = uint32(data[iNdEx-4]) + mapvaluetemp |= uint32(data[iNdEx-3]) << 8 + mapvaluetemp |= uint32(data[iNdEx-2]) << 16 + mapvaluetemp |= uint32(data[iNdEx-1]) << 24 + mapvalue := math.Float32frombits(mapvaluetemp) + if m.StringToFloatMap == nil { + m.StringToFloatMap = make(map[string]float32) + } + m.StringToFloatMap[mapkey] = mapvalue + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Int32Map", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTheproto3Unsafe + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var keykey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + keykey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapkey int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + mapkey |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var valuekey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + valuekey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapvalue int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + mapvalue |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if m.Int32Map == nil { + m.Int32Map = make(map[int32]int32) + } + m.Int32Map[mapkey] = mapvalue + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Int64Map", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTheproto3Unsafe + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var keykey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + keykey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapkey int64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + mapkey |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var valuekey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + valuekey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapvalue int64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + mapvalue |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if m.Int64Map == nil { + m.Int64Map = make(map[int64]int64) + } + m.Int64Map[mapkey] = mapvalue + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Uint32Map", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTheproto3Unsafe + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var keykey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + keykey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapkey uint32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + mapkey |= (uint32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var valuekey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + valuekey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapvalue uint32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + mapvalue |= (uint32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if m.Uint32Map == nil { + m.Uint32Map = make(map[uint32]uint32) + } + m.Uint32Map[mapkey] = mapvalue + iNdEx = postIndex + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Uint64Map", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTheproto3Unsafe + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var keykey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + keykey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapkey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + mapkey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var valuekey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + valuekey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapvalue uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + mapvalue |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if m.Uint64Map == nil { + m.Uint64Map = make(map[uint64]uint64) + } + m.Uint64Map[mapkey] = mapvalue + iNdEx = postIndex + case 7: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Sint32Map", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTheproto3Unsafe + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var keykey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + keykey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapkeytemp int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + mapkeytemp |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + mapkeytemp = int32((uint32(mapkeytemp) >> 1) ^ uint32(((mapkeytemp&1)<<31)>>31)) + mapkey := int32(mapkeytemp) + var valuekey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + valuekey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapvaluetemp int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + mapvaluetemp |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + mapvaluetemp = int32((uint32(mapvaluetemp) >> 1) ^ uint32(((mapvaluetemp&1)<<31)>>31)) + mapvalue := int32(mapvaluetemp) + if m.Sint32Map == nil { + m.Sint32Map = make(map[int32]int32) + } + m.Sint32Map[mapkey] = mapvalue + iNdEx = postIndex + case 8: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Sint64Map", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTheproto3Unsafe + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var keykey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + keykey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapkeytemp uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + mapkeytemp |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + mapkeytemp = (mapkeytemp >> 1) ^ uint64((int64(mapkeytemp&1)<<63)>>63) + mapkey := int64(mapkeytemp) + var valuekey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + valuekey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapvaluetemp uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + mapvaluetemp |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + mapvaluetemp = (mapvaluetemp >> 1) ^ uint64((int64(mapvaluetemp&1)<<63)>>63) + mapvalue := int64(mapvaluetemp) + if m.Sint64Map == nil { + m.Sint64Map = make(map[int64]int64) + } + m.Sint64Map[mapkey] = mapvalue + iNdEx = postIndex + case 9: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Fixed32Map", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTheproto3Unsafe + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var keykey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + keykey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapkey uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + iNdEx += 4 + mapkey = uint32(data[iNdEx-4]) + mapkey |= uint32(data[iNdEx-3]) << 8 + mapkey |= uint32(data[iNdEx-2]) << 16 + mapkey |= uint32(data[iNdEx-1]) << 24 + var valuekey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + valuekey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapvalue uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + iNdEx += 4 + mapvalue = uint32(data[iNdEx-4]) + mapvalue |= uint32(data[iNdEx-3]) << 8 + mapvalue |= uint32(data[iNdEx-2]) << 16 + mapvalue |= uint32(data[iNdEx-1]) << 24 + if m.Fixed32Map == nil { + m.Fixed32Map = make(map[uint32]uint32) + } + m.Fixed32Map[mapkey] = mapvalue + iNdEx = postIndex + case 10: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Sfixed32Map", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTheproto3Unsafe + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var keykey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + keykey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapkey int32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + iNdEx += 4 + mapkey = int32(data[iNdEx-4]) + mapkey |= int32(data[iNdEx-3]) << 8 + mapkey |= int32(data[iNdEx-2]) << 16 + mapkey |= int32(data[iNdEx-1]) << 24 + var valuekey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + valuekey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapvalue int32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + iNdEx += 4 + mapvalue = int32(data[iNdEx-4]) + mapvalue |= int32(data[iNdEx-3]) << 8 + mapvalue |= int32(data[iNdEx-2]) << 16 + mapvalue |= int32(data[iNdEx-1]) << 24 + if m.Sfixed32Map == nil { + m.Sfixed32Map = make(map[int32]int32) + } + m.Sfixed32Map[mapkey] = mapvalue + iNdEx = postIndex + case 11: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Fixed64Map", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTheproto3Unsafe + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var keykey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + keykey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapkey uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + iNdEx += 8 + mapkey = uint64(data[iNdEx-8]) + mapkey |= uint64(data[iNdEx-7]) << 8 + mapkey |= uint64(data[iNdEx-6]) << 16 + mapkey |= uint64(data[iNdEx-5]) << 24 + mapkey |= uint64(data[iNdEx-4]) << 32 + mapkey |= uint64(data[iNdEx-3]) << 40 + mapkey |= uint64(data[iNdEx-2]) << 48 + mapkey |= uint64(data[iNdEx-1]) << 56 + var valuekey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + valuekey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapvalue uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + iNdEx += 8 + mapvalue = uint64(data[iNdEx-8]) + mapvalue |= uint64(data[iNdEx-7]) << 8 + mapvalue |= uint64(data[iNdEx-6]) << 16 + mapvalue |= uint64(data[iNdEx-5]) << 24 + mapvalue |= uint64(data[iNdEx-4]) << 32 + mapvalue |= uint64(data[iNdEx-3]) << 40 + mapvalue |= uint64(data[iNdEx-2]) << 48 + mapvalue |= uint64(data[iNdEx-1]) << 56 + if m.Fixed64Map == nil { + m.Fixed64Map = make(map[uint64]uint64) + } + m.Fixed64Map[mapkey] = mapvalue + iNdEx = postIndex + case 12: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Sfixed64Map", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTheproto3Unsafe + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var keykey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + keykey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapkey int64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + iNdEx += 8 + mapkey = int64(data[iNdEx-8]) + mapkey |= int64(data[iNdEx-7]) << 8 + mapkey |= int64(data[iNdEx-6]) << 16 + mapkey |= int64(data[iNdEx-5]) << 24 + mapkey |= int64(data[iNdEx-4]) << 32 + mapkey |= int64(data[iNdEx-3]) << 40 + mapkey |= int64(data[iNdEx-2]) << 48 + mapkey |= int64(data[iNdEx-1]) << 56 + var valuekey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + valuekey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapvalue int64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + iNdEx += 8 + mapvalue = int64(data[iNdEx-8]) + mapvalue |= int64(data[iNdEx-7]) << 8 + mapvalue |= int64(data[iNdEx-6]) << 16 + mapvalue |= int64(data[iNdEx-5]) << 24 + mapvalue |= int64(data[iNdEx-4]) << 32 + mapvalue |= int64(data[iNdEx-3]) << 40 + mapvalue |= int64(data[iNdEx-2]) << 48 + mapvalue |= int64(data[iNdEx-1]) << 56 + if m.Sfixed64Map == nil { + m.Sfixed64Map = make(map[int64]int64) + } + m.Sfixed64Map[mapkey] = mapvalue + iNdEx = postIndex + case 13: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field BoolMap", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTheproto3Unsafe + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var keykey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + keykey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapkeytemp int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + mapkeytemp |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + mapkey := bool(mapkeytemp != 0) + var valuekey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + valuekey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapvaluetemp int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + mapvaluetemp |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + mapvalue := bool(mapvaluetemp != 0) + if m.BoolMap == nil { + m.BoolMap = make(map[bool]bool) + } + m.BoolMap[mapkey] = mapvalue + iNdEx = postIndex + case 14: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field StringMap", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTheproto3Unsafe + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var keykey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + keykey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var stringLenmapkey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLenmapkey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapkey := int(stringLenmapkey) + if intStringLenmapkey < 0 { + return ErrInvalidLengthTheproto3Unsafe + } + postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey > l { + return io.ErrUnexpectedEOF + } + mapkey := string(data[iNdEx:postStringIndexmapkey]) + iNdEx = postStringIndexmapkey + var valuekey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + valuekey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var stringLenmapvalue uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLenmapvalue |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapvalue := int(stringLenmapvalue) + if intStringLenmapvalue < 0 { + return ErrInvalidLengthTheproto3Unsafe + } + postStringIndexmapvalue := iNdEx + intStringLenmapvalue + if postStringIndexmapvalue > l { + return io.ErrUnexpectedEOF + } + mapvalue := string(data[iNdEx:postStringIndexmapvalue]) + iNdEx = postStringIndexmapvalue + if m.StringMap == nil { + m.StringMap = make(map[string]string) + } + m.StringMap[mapkey] = mapvalue + iNdEx = postIndex + case 15: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field StringToBytesMap", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTheproto3Unsafe + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var keykey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + keykey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var stringLenmapkey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLenmapkey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapkey := int(stringLenmapkey) + if intStringLenmapkey < 0 { + return ErrInvalidLengthTheproto3Unsafe + } + postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey > l { + return io.ErrUnexpectedEOF + } + mapkey := string(data[iNdEx:postStringIndexmapkey]) + iNdEx = postStringIndexmapkey + var valuekey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + valuekey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapbyteLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + mapbyteLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intMapbyteLen := int(mapbyteLen) + if intMapbyteLen < 0 { + return ErrInvalidLengthTheproto3Unsafe + } + postbytesIndex := iNdEx + intMapbyteLen + if postbytesIndex > l { + return io.ErrUnexpectedEOF + } + mapvalue := make([]byte, mapbyteLen) + copy(mapvalue, data[iNdEx:postbytesIndex]) + iNdEx = postbytesIndex + if m.StringToBytesMap == nil { + m.StringToBytesMap = make(map[string][]byte) + } + m.StringToBytesMap[mapkey] = mapvalue + iNdEx = postIndex + case 16: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field StringToEnumMap", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTheproto3Unsafe + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var keykey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + keykey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var stringLenmapkey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLenmapkey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapkey := int(stringLenmapkey) + if intStringLenmapkey < 0 { + return ErrInvalidLengthTheproto3Unsafe + } + postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey > l { + return io.ErrUnexpectedEOF + } + mapkey := string(data[iNdEx:postStringIndexmapkey]) + iNdEx = postStringIndexmapkey + var valuekey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + valuekey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapvalue MapEnum + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + mapvalue |= (MapEnum(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if m.StringToEnumMap == nil { + m.StringToEnumMap = make(map[string]MapEnum) + } + m.StringToEnumMap[mapkey] = mapvalue + iNdEx = postIndex + case 17: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field StringToMsgMap", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTheproto3Unsafe + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var keykey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + keykey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var stringLenmapkey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLenmapkey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapkey := int(stringLenmapkey) + if intStringLenmapkey < 0 { + return ErrInvalidLengthTheproto3Unsafe + } + postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey > l { + return io.ErrUnexpectedEOF + } + mapkey := string(data[iNdEx:postStringIndexmapkey]) + iNdEx = postStringIndexmapkey + var valuekey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + valuekey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapmsglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + mapmsglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if mapmsglen < 0 { + return ErrInvalidLengthTheproto3Unsafe + } + postmsgIndex := iNdEx + mapmsglen + if mapmsglen < 0 { + return ErrInvalidLengthTheproto3Unsafe + } + if postmsgIndex > l { + return io.ErrUnexpectedEOF + } + mapvalue := &FloatingPoint{} + if err := mapvalue.Unmarshal(data[iNdEx:postmsgIndex]); err != nil { + return err + } + iNdEx = postmsgIndex + if m.StringToMsgMap == nil { + m.StringToMsgMap = make(map[string]*FloatingPoint) + } + m.StringToMsgMap[mapkey] = mapvalue + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTheproto3Unsafe(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTheproto3Unsafe + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *AllMapsOrdered) 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 ErrIntOverflowTheproto3Unsafe + } + 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: AllMapsOrdered: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: AllMapsOrdered: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field StringToDoubleMap", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTheproto3Unsafe + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var keykey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + keykey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var stringLenmapkey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLenmapkey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapkey := int(stringLenmapkey) + if intStringLenmapkey < 0 { + return ErrInvalidLengthTheproto3Unsafe + } + postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey > l { + return io.ErrUnexpectedEOF + } + mapkey := string(data[iNdEx:postStringIndexmapkey]) + iNdEx = postStringIndexmapkey + var valuekey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + valuekey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapvaluetemp uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + iNdEx += 8 + mapvaluetemp = uint64(data[iNdEx-8]) + mapvaluetemp |= uint64(data[iNdEx-7]) << 8 + mapvaluetemp |= uint64(data[iNdEx-6]) << 16 + mapvaluetemp |= uint64(data[iNdEx-5]) << 24 + mapvaluetemp |= uint64(data[iNdEx-4]) << 32 + mapvaluetemp |= uint64(data[iNdEx-3]) << 40 + mapvaluetemp |= uint64(data[iNdEx-2]) << 48 + mapvaluetemp |= uint64(data[iNdEx-1]) << 56 + mapvalue := math.Float64frombits(mapvaluetemp) + if m.StringToDoubleMap == nil { + m.StringToDoubleMap = make(map[string]float64) + } + m.StringToDoubleMap[mapkey] = mapvalue + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field StringToFloatMap", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTheproto3Unsafe + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var keykey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + keykey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var stringLenmapkey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLenmapkey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapkey := int(stringLenmapkey) + if intStringLenmapkey < 0 { + return ErrInvalidLengthTheproto3Unsafe + } + postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey > l { + return io.ErrUnexpectedEOF + } + mapkey := string(data[iNdEx:postStringIndexmapkey]) + iNdEx = postStringIndexmapkey + var valuekey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + valuekey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapvaluetemp uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + iNdEx += 4 + mapvaluetemp = uint32(data[iNdEx-4]) + mapvaluetemp |= uint32(data[iNdEx-3]) << 8 + mapvaluetemp |= uint32(data[iNdEx-2]) << 16 + mapvaluetemp |= uint32(data[iNdEx-1]) << 24 + mapvalue := math.Float32frombits(mapvaluetemp) + if m.StringToFloatMap == nil { + m.StringToFloatMap = make(map[string]float32) + } + m.StringToFloatMap[mapkey] = mapvalue + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Int32Map", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTheproto3Unsafe + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var keykey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + keykey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapkey int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + mapkey |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var valuekey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + valuekey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapvalue int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + mapvalue |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if m.Int32Map == nil { + m.Int32Map = make(map[int32]int32) + } + m.Int32Map[mapkey] = mapvalue + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Int64Map", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTheproto3Unsafe + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var keykey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + keykey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapkey int64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + mapkey |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var valuekey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + valuekey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapvalue int64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + mapvalue |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if m.Int64Map == nil { + m.Int64Map = make(map[int64]int64) + } + m.Int64Map[mapkey] = mapvalue + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Uint32Map", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTheproto3Unsafe + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var keykey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + keykey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapkey uint32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + mapkey |= (uint32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var valuekey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + valuekey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapvalue uint32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + mapvalue |= (uint32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if m.Uint32Map == nil { + m.Uint32Map = make(map[uint32]uint32) + } + m.Uint32Map[mapkey] = mapvalue + iNdEx = postIndex + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Uint64Map", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTheproto3Unsafe + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var keykey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + keykey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapkey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + mapkey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var valuekey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + valuekey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapvalue uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + mapvalue |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if m.Uint64Map == nil { + m.Uint64Map = make(map[uint64]uint64) + } + m.Uint64Map[mapkey] = mapvalue + iNdEx = postIndex + case 7: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Sint32Map", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTheproto3Unsafe + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var keykey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + keykey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapkeytemp int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + mapkeytemp |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + mapkeytemp = int32((uint32(mapkeytemp) >> 1) ^ uint32(((mapkeytemp&1)<<31)>>31)) + mapkey := int32(mapkeytemp) + var valuekey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + valuekey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapvaluetemp int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + mapvaluetemp |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + mapvaluetemp = int32((uint32(mapvaluetemp) >> 1) ^ uint32(((mapvaluetemp&1)<<31)>>31)) + mapvalue := int32(mapvaluetemp) + if m.Sint32Map == nil { + m.Sint32Map = make(map[int32]int32) + } + m.Sint32Map[mapkey] = mapvalue + iNdEx = postIndex + case 8: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Sint64Map", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTheproto3Unsafe + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var keykey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + keykey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapkeytemp uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + mapkeytemp |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + mapkeytemp = (mapkeytemp >> 1) ^ uint64((int64(mapkeytemp&1)<<63)>>63) + mapkey := int64(mapkeytemp) + var valuekey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + valuekey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapvaluetemp uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + mapvaluetemp |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + mapvaluetemp = (mapvaluetemp >> 1) ^ uint64((int64(mapvaluetemp&1)<<63)>>63) + mapvalue := int64(mapvaluetemp) + if m.Sint64Map == nil { + m.Sint64Map = make(map[int64]int64) + } + m.Sint64Map[mapkey] = mapvalue + iNdEx = postIndex + case 9: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Fixed32Map", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTheproto3Unsafe + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var keykey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + keykey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapkey uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + iNdEx += 4 + mapkey = uint32(data[iNdEx-4]) + mapkey |= uint32(data[iNdEx-3]) << 8 + mapkey |= uint32(data[iNdEx-2]) << 16 + mapkey |= uint32(data[iNdEx-1]) << 24 + var valuekey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + valuekey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapvalue uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + iNdEx += 4 + mapvalue = uint32(data[iNdEx-4]) + mapvalue |= uint32(data[iNdEx-3]) << 8 + mapvalue |= uint32(data[iNdEx-2]) << 16 + mapvalue |= uint32(data[iNdEx-1]) << 24 + if m.Fixed32Map == nil { + m.Fixed32Map = make(map[uint32]uint32) + } + m.Fixed32Map[mapkey] = mapvalue + iNdEx = postIndex + case 10: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Sfixed32Map", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTheproto3Unsafe + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var keykey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + keykey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapkey int32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + iNdEx += 4 + mapkey = int32(data[iNdEx-4]) + mapkey |= int32(data[iNdEx-3]) << 8 + mapkey |= int32(data[iNdEx-2]) << 16 + mapkey |= int32(data[iNdEx-1]) << 24 + var valuekey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + valuekey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapvalue int32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + iNdEx += 4 + mapvalue = int32(data[iNdEx-4]) + mapvalue |= int32(data[iNdEx-3]) << 8 + mapvalue |= int32(data[iNdEx-2]) << 16 + mapvalue |= int32(data[iNdEx-1]) << 24 + if m.Sfixed32Map == nil { + m.Sfixed32Map = make(map[int32]int32) + } + m.Sfixed32Map[mapkey] = mapvalue + iNdEx = postIndex + case 11: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Fixed64Map", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTheproto3Unsafe + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var keykey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + keykey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapkey uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + iNdEx += 8 + mapkey = uint64(data[iNdEx-8]) + mapkey |= uint64(data[iNdEx-7]) << 8 + mapkey |= uint64(data[iNdEx-6]) << 16 + mapkey |= uint64(data[iNdEx-5]) << 24 + mapkey |= uint64(data[iNdEx-4]) << 32 + mapkey |= uint64(data[iNdEx-3]) << 40 + mapkey |= uint64(data[iNdEx-2]) << 48 + mapkey |= uint64(data[iNdEx-1]) << 56 + var valuekey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + valuekey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapvalue uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + iNdEx += 8 + mapvalue = uint64(data[iNdEx-8]) + mapvalue |= uint64(data[iNdEx-7]) << 8 + mapvalue |= uint64(data[iNdEx-6]) << 16 + mapvalue |= uint64(data[iNdEx-5]) << 24 + mapvalue |= uint64(data[iNdEx-4]) << 32 + mapvalue |= uint64(data[iNdEx-3]) << 40 + mapvalue |= uint64(data[iNdEx-2]) << 48 + mapvalue |= uint64(data[iNdEx-1]) << 56 + if m.Fixed64Map == nil { + m.Fixed64Map = make(map[uint64]uint64) + } + m.Fixed64Map[mapkey] = mapvalue + iNdEx = postIndex + case 12: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Sfixed64Map", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTheproto3Unsafe + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var keykey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + keykey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapkey int64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + iNdEx += 8 + mapkey = int64(data[iNdEx-8]) + mapkey |= int64(data[iNdEx-7]) << 8 + mapkey |= int64(data[iNdEx-6]) << 16 + mapkey |= int64(data[iNdEx-5]) << 24 + mapkey |= int64(data[iNdEx-4]) << 32 + mapkey |= int64(data[iNdEx-3]) << 40 + mapkey |= int64(data[iNdEx-2]) << 48 + mapkey |= int64(data[iNdEx-1]) << 56 + var valuekey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + valuekey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapvalue int64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + iNdEx += 8 + mapvalue = int64(data[iNdEx-8]) + mapvalue |= int64(data[iNdEx-7]) << 8 + mapvalue |= int64(data[iNdEx-6]) << 16 + mapvalue |= int64(data[iNdEx-5]) << 24 + mapvalue |= int64(data[iNdEx-4]) << 32 + mapvalue |= int64(data[iNdEx-3]) << 40 + mapvalue |= int64(data[iNdEx-2]) << 48 + mapvalue |= int64(data[iNdEx-1]) << 56 + if m.Sfixed64Map == nil { + m.Sfixed64Map = make(map[int64]int64) + } + m.Sfixed64Map[mapkey] = mapvalue + iNdEx = postIndex + case 13: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field BoolMap", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTheproto3Unsafe + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var keykey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + keykey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapkeytemp int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + mapkeytemp |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + mapkey := bool(mapkeytemp != 0) + var valuekey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + valuekey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapvaluetemp int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + mapvaluetemp |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + mapvalue := bool(mapvaluetemp != 0) + if m.BoolMap == nil { + m.BoolMap = make(map[bool]bool) + } + m.BoolMap[mapkey] = mapvalue + iNdEx = postIndex + case 14: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field StringMap", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTheproto3Unsafe + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var keykey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + keykey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var stringLenmapkey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLenmapkey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapkey := int(stringLenmapkey) + if intStringLenmapkey < 0 { + return ErrInvalidLengthTheproto3Unsafe + } + postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey > l { + return io.ErrUnexpectedEOF + } + mapkey := string(data[iNdEx:postStringIndexmapkey]) + iNdEx = postStringIndexmapkey + var valuekey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + valuekey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var stringLenmapvalue uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLenmapvalue |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapvalue := int(stringLenmapvalue) + if intStringLenmapvalue < 0 { + return ErrInvalidLengthTheproto3Unsafe + } + postStringIndexmapvalue := iNdEx + intStringLenmapvalue + if postStringIndexmapvalue > l { + return io.ErrUnexpectedEOF + } + mapvalue := string(data[iNdEx:postStringIndexmapvalue]) + iNdEx = postStringIndexmapvalue + if m.StringMap == nil { + m.StringMap = make(map[string]string) + } + m.StringMap[mapkey] = mapvalue + iNdEx = postIndex + case 15: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field StringToBytesMap", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTheproto3Unsafe + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var keykey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + keykey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var stringLenmapkey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLenmapkey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapkey := int(stringLenmapkey) + if intStringLenmapkey < 0 { + return ErrInvalidLengthTheproto3Unsafe + } + postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey > l { + return io.ErrUnexpectedEOF + } + mapkey := string(data[iNdEx:postStringIndexmapkey]) + iNdEx = postStringIndexmapkey + var valuekey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + valuekey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapbyteLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + mapbyteLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intMapbyteLen := int(mapbyteLen) + if intMapbyteLen < 0 { + return ErrInvalidLengthTheproto3Unsafe + } + postbytesIndex := iNdEx + intMapbyteLen + if postbytesIndex > l { + return io.ErrUnexpectedEOF + } + mapvalue := make([]byte, mapbyteLen) + copy(mapvalue, data[iNdEx:postbytesIndex]) + iNdEx = postbytesIndex + if m.StringToBytesMap == nil { + m.StringToBytesMap = make(map[string][]byte) + } + m.StringToBytesMap[mapkey] = mapvalue + iNdEx = postIndex + case 16: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field StringToEnumMap", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTheproto3Unsafe + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var keykey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + keykey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var stringLenmapkey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLenmapkey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapkey := int(stringLenmapkey) + if intStringLenmapkey < 0 { + return ErrInvalidLengthTheproto3Unsafe + } + postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey > l { + return io.ErrUnexpectedEOF + } + mapkey := string(data[iNdEx:postStringIndexmapkey]) + iNdEx = postStringIndexmapkey + var valuekey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + valuekey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapvalue MapEnum + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + mapvalue |= (MapEnum(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if m.StringToEnumMap == nil { + m.StringToEnumMap = make(map[string]MapEnum) + } + m.StringToEnumMap[mapkey] = mapvalue + iNdEx = postIndex + case 17: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field StringToMsgMap", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTheproto3Unsafe + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var keykey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + keykey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var stringLenmapkey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLenmapkey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapkey := int(stringLenmapkey) + if intStringLenmapkey < 0 { + return ErrInvalidLengthTheproto3Unsafe + } + postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey > l { + return io.ErrUnexpectedEOF + } + mapkey := string(data[iNdEx:postStringIndexmapkey]) + iNdEx = postStringIndexmapkey + var valuekey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + valuekey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapmsglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + mapmsglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if mapmsglen < 0 { + return ErrInvalidLengthTheproto3Unsafe + } + postmsgIndex := iNdEx + mapmsglen + if mapmsglen < 0 { + return ErrInvalidLengthTheproto3Unsafe + } + if postmsgIndex > l { + return io.ErrUnexpectedEOF + } + mapvalue := &FloatingPoint{} + if err := mapvalue.Unmarshal(data[iNdEx:postmsgIndex]); err != nil { + return err + } + iNdEx = postmsgIndex + if m.StringToMsgMap == nil { + m.StringToMsgMap = make(map[string]*FloatingPoint) + } + m.StringToMsgMap[mapkey] = mapvalue + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTheproto3Unsafe(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTheproto3Unsafe + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MessageWithMap) 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 ErrIntOverflowTheproto3Unsafe + } + 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: MessageWithMap: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MessageWithMap: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NameMapping", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTheproto3Unsafe + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var keykey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + keykey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapkey int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + mapkey |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var valuekey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + valuekey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var stringLenmapvalue uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLenmapvalue |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapvalue := int(stringLenmapvalue) + if intStringLenmapvalue < 0 { + return ErrInvalidLengthTheproto3Unsafe + } + postStringIndexmapvalue := iNdEx + intStringLenmapvalue + if postStringIndexmapvalue > l { + return io.ErrUnexpectedEOF + } + mapvalue := string(data[iNdEx:postStringIndexmapvalue]) + iNdEx = postStringIndexmapvalue + if m.NameMapping == nil { + m.NameMapping = make(map[int32]string) + } + m.NameMapping[mapkey] = mapvalue + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MsgMapping", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTheproto3Unsafe + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var keykey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + keykey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapkeytemp uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + mapkeytemp |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + mapkeytemp = (mapkeytemp >> 1) ^ uint64((int64(mapkeytemp&1)<<63)>>63) + mapkey := int64(mapkeytemp) + var valuekey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + valuekey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapmsglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + mapmsglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if mapmsglen < 0 { + return ErrInvalidLengthTheproto3Unsafe + } + postmsgIndex := iNdEx + mapmsglen + if mapmsglen < 0 { + return ErrInvalidLengthTheproto3Unsafe + } + if postmsgIndex > l { + return io.ErrUnexpectedEOF + } + mapvalue := &FloatingPoint{} + if err := mapvalue.Unmarshal(data[iNdEx:postmsgIndex]); err != nil { + return err + } + iNdEx = postmsgIndex + if m.MsgMapping == nil { + m.MsgMapping = make(map[int64]*FloatingPoint) + } + m.MsgMapping[mapkey] = mapvalue + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ByteMapping", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTheproto3Unsafe + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var keykey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + keykey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapkeytemp int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + mapkeytemp |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + mapkey := bool(mapkeytemp != 0) + var valuekey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + valuekey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapbyteLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + mapbyteLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intMapbyteLen := int(mapbyteLen) + if intMapbyteLen < 0 { + return ErrInvalidLengthTheproto3Unsafe + } + postbytesIndex := iNdEx + intMapbyteLen + if postbytesIndex > l { + return io.ErrUnexpectedEOF + } + mapvalue := make([]byte, mapbyteLen) + copy(mapvalue, data[iNdEx:postbytesIndex]) + iNdEx = postbytesIndex + if m.ByteMapping == nil { + m.ByteMapping = make(map[bool][]byte) + } + m.ByteMapping[mapkey] = mapvalue + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTheproto3Unsafe(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTheproto3Unsafe + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *FloatingPoint) 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 ErrIntOverflowTheproto3Unsafe + } + 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: FloatingPoint: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: FloatingPoint: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field F", wireType) + } + if iNdEx+8 > l { + return io.ErrUnexpectedEOF + } + m.F = *(*float64)(unsafe.Pointer(&data[iNdEx])) + iNdEx += 8 + default: + iNdEx = preIndex + skippy, err := skipTheproto3Unsafe(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTheproto3Unsafe + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Uint128Pair) 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 ErrIntOverflowTheproto3Unsafe + } + 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: Uint128Pair: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Uint128Pair: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Left", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthTheproto3Unsafe + } + postIndex := iNdEx + byteLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Left.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Right", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthTheproto3Unsafe + } + postIndex := iNdEx + byteLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var v github_com_gogo_protobuf_test_custom.Uint128 + m.Right = &v + if err := m.Right.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTheproto3Unsafe(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTheproto3Unsafe + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ContainsNestedMap) 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 ErrIntOverflowTheproto3Unsafe + } + 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: ContainsNestedMap: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ContainsNestedMap: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipTheproto3Unsafe(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTheproto3Unsafe + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ContainsNestedMap_NestedMap) 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 ErrIntOverflowTheproto3Unsafe + } + 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: NestedMap: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: NestedMap: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NestedMapField", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTheproto3Unsafe + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var keykey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + keykey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var stringLenmapkey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLenmapkey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapkey := int(stringLenmapkey) + if intStringLenmapkey < 0 { + return ErrInvalidLengthTheproto3Unsafe + } + postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey > l { + return io.ErrUnexpectedEOF + } + mapkey := string(data[iNdEx:postStringIndexmapkey]) + iNdEx = postStringIndexmapkey + var valuekey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + valuekey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapvaluetemp uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + iNdEx += 8 + mapvaluetemp = uint64(data[iNdEx-8]) + mapvaluetemp |= uint64(data[iNdEx-7]) << 8 + mapvaluetemp |= uint64(data[iNdEx-6]) << 16 + mapvaluetemp |= uint64(data[iNdEx-5]) << 24 + mapvaluetemp |= uint64(data[iNdEx-4]) << 32 + mapvaluetemp |= uint64(data[iNdEx-3]) << 40 + mapvaluetemp |= uint64(data[iNdEx-2]) << 48 + mapvaluetemp |= uint64(data[iNdEx-1]) << 56 + mapvalue := math.Float64frombits(mapvaluetemp) + if m.NestedMapField == nil { + m.NestedMapField = make(map[string]float64) + } + m.NestedMapField[mapkey] = mapvalue + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTheproto3Unsafe(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTheproto3Unsafe + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipTheproto3Unsafe(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, ErrIntOverflowTheproto3Unsafe + } + 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, ErrIntOverflowTheproto3Unsafe + } + 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, ErrIntOverflowTheproto3Unsafe + } + 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, ErrInvalidLengthTheproto3Unsafe + } + return iNdEx, nil + case 3: + for { + var innerWire uint64 + var start int = iNdEx + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowTheproto3Unsafe + } + 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 := skipTheproto3Unsafe(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 ( + ErrInvalidLengthTheproto3Unsafe = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowTheproto3Unsafe = fmt.Errorf("proto: integer overflow") +) + +var fileDescriptorTheproto3 = []byte{ + // 1581 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xec, 0x59, 0xcd, 0x6f, 0x1b, 0xc5, + 0x1b, 0xce, 0xda, 0x8e, 0x3f, 0x5e, 0x7f, 0x6d, 0xa6, 0xfd, 0xfd, 0x64, 0x22, 0x91, 0x0f, 0x57, + 0x6a, 0xd3, 0x8a, 0x3a, 0x25, 0x2d, 0x50, 0x42, 0xa1, 0xc4, 0x6e, 0xac, 0x86, 0x26, 0x6e, 0xb0, + 0x93, 0x06, 0x54, 0x89, 0x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, 0x73, 0x53, 0xbf, 0xe1, 0xf6, 0x07, 0x6e, 0xcf, 0x9e, + 0xcf, 0x49, 0x2f, 0x71, 0x7b, 0x85, 0xdb, 0x6b, 0xdc, 0x1e, 0xbf, 0x98, 0x93, 0x7e, 0xc0, 0xed, + 0x47, 0xdc, 0x7e, 0xc6, 0xed, 0x17, 0xdc, 0x4e, 0x5f, 0x60, 0x3c, 0x6e, 0xcf, 0xf0, 0xf5, 0x4b, + 0xfc, 0xfb, 0x0a, 0xff, 0xbe, 0xc6, 0xed, 0xf1, 0x5f, 0x73, 0x52, 0x37, 0xcd, 0xe6, 0xfe, 0x77, + 0x00, 0x00, 0x00, 0xff, 0xff, 0x86, 0x95, 0x85, 0xab, 0x43, 0x1a, 0x00, 0x00, +} diff --git a/vendor/github.com/gogo/protobuf/test/theproto3/combos/unsafeboth/theproto3.proto b/vendor/github.com/gogo/protobuf/test/theproto3/combos/unsafeboth/theproto3.proto new file mode 100644 index 000000000..3cba7ef67 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/theproto3/combos/unsafeboth/theproto3.proto @@ -0,0 +1,162 @@ +// Copyright (c) 2013, Vastech SA (PTY) LTD. All rights reserved. +// http://github.com/gogo/protobuf/gogoproto +// +// Go support for Protocol Buffers - Google's data interchange format +// +// Copyright 2014 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. + +syntax = "proto3"; + +package theproto3; + +import "github.com/gogo/protobuf/gogoproto/gogo.proto"; + +import "github.com/gogo/protobuf/test/combos/both/thetest.proto"; + +option (gogoproto.goproto_stringer_all) = false; +option (gogoproto.goproto_enum_prefix_all) = false; +option (gogoproto.goproto_getters_all) = false; + +option (gogoproto.equal_all) = true; +option (gogoproto.verbose_equal_all) = true; +option (gogoproto.stringer_all) = true; +option (gogoproto.gostring_all) = true; +option (gogoproto.face_all) = true; +option (gogoproto.description_all) = true; + +option (gogoproto.testgen_all) = true; +option (gogoproto.populate_all) = true; +option (gogoproto.benchgen_all) = true; +option (gogoproto.unmarshaler_all) = false; +option (gogoproto.marshaler_all) = false; +option (gogoproto.sizer_all) = true; + +option (gogoproto.goproto_enum_stringer_all) = false; +option (gogoproto.enum_stringer_all) = true; + +option (gogoproto.unsafe_marshaler_all) = true; +option (gogoproto.unsafe_unmarshaler_all) = true; + +message Message { + enum Humour { + UNKNOWN = 0; + PUNS = 1; + SLAPSTICK = 2; + BILL_BAILEY = 3; + } + + string name = 1; + Humour hilarity = 2; + uint32 height_in_cm = 3; + bytes data = 4; + int64 result_count = 7; + bool true_scotsman = 8; + float score = 9; + + repeated uint64 key = 5; + Nested nested = 6; + + map terrain = 10; + test.NinOptNative proto2_field = 11; + map proto2_value = 13; +} + +message Nested { + string bunny = 1; +} + +enum MapEnum { + MA = 0; + MB = 1; + MC = 2; +} + +message AllMaps { + map StringToDoubleMap = 1; + map StringToFloatMap = 2; + map Int32Map = 3; + map Int64Map = 4; + map Uint32Map = 5; + map Uint64Map = 6; + map Sint32Map = 7; + map Sint64Map = 8; + map Fixed32Map = 9; + map Sfixed32Map = 10; + map Fixed64Map = 11; + map Sfixed64Map = 12; + map BoolMap = 13; + map StringMap = 14; + map StringToBytesMap = 15; + map StringToEnumMap = 16; + map StringToMsgMap = 17; +} + +message AllMapsOrdered { + option (gogoproto.stable_marshaler) = true; + + map StringToDoubleMap = 1; + map StringToFloatMap = 2; + map Int32Map = 3; + map Int64Map = 4; + map Uint32Map = 5; + map Uint64Map = 6; + map Sint32Map = 7; + map Sint64Map = 8; + map Fixed32Map = 9; + map Sfixed32Map = 10; + map Fixed64Map = 11; + map Sfixed64Map = 12; + map BoolMap = 13; + map StringMap = 14; + map StringToBytesMap = 15; + map StringToEnumMap = 16; + map StringToMsgMap = 17; +} + +message MessageWithMap { + map name_mapping = 1; + map msg_mapping = 2; + map byte_mapping = 3; +} + +message FloatingPoint { + double f = 1; +} + +message Uint128Pair { + bytes left = 1 [(gogoproto.nullable) = false, (gogoproto.customtype) = "github.com/gogo/protobuf/test/custom.Uint128"]; + bytes right = 2 [(gogoproto.customtype) = "github.com/gogo/protobuf/test/custom.Uint128"]; +} + +message ContainsNestedMap { + message NestedMap { + map NestedMapField = 1; + } +} \ No newline at end of file diff --git a/vendor/github.com/gogo/protobuf/test/theproto3/combos/unsafeboth/theproto3pb_test.go b/vendor/github.com/gogo/protobuf/test/theproto3/combos/unsafeboth/theproto3pb_test.go new file mode 100644 index 000000000..fc658ce38 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/theproto3/combos/unsafeboth/theproto3pb_test.go @@ -0,0 +1,2186 @@ +// Code generated by protoc-gen-gogo. +// source: combos/unsafeboth/theproto3.proto +// DO NOT EDIT! + +/* +Package theproto3 is a generated protocol buffer package. + +It is generated from these files: + combos/unsafeboth/theproto3.proto + +It has these top-level messages: + Message + Nested + AllMaps + AllMapsOrdered + MessageWithMap + FloatingPoint + Uint128Pair + ContainsNestedMap +*/ +package theproto3 + +import testing "testing" +import math_rand "math/rand" +import time "time" +import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" +import github_com_gogo_protobuf_jsonpb "github.com/gogo/protobuf/jsonpb" +import fmt "fmt" +import go_parser "go/parser" +import proto "github.com/gogo/protobuf/proto" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" +import _ "github.com/gogo/protobuf/test/combos/both" + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +func TestMessageProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMessage(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Message{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestMessageMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMessage(popr, false) + size := p.Size() + data := make([]byte, size) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(data) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Message{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkMessageProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Message, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedMessage(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkMessageProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedMessage(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &Message{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNestedProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNested(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Nested{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestNestedMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNested(popr, false) + size := p.Size() + data := make([]byte, size) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(data) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Nested{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkNestedProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Nested, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNested(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNestedProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNested(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &Nested{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestAllMapsProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAllMaps(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &AllMaps{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestAllMapsMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAllMaps(popr, false) + size := p.Size() + data := make([]byte, size) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(data) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &AllMaps{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkAllMapsProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*AllMaps, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedAllMaps(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkAllMapsProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedAllMaps(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &AllMaps{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestAllMapsOrderedProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAllMapsOrdered(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &AllMapsOrdered{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestAllMapsOrderedMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAllMapsOrdered(popr, false) + size := p.Size() + data := make([]byte, size) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(data) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &AllMapsOrdered{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkAllMapsOrderedProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*AllMapsOrdered, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedAllMapsOrdered(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkAllMapsOrderedProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedAllMapsOrdered(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &AllMapsOrdered{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestMessageWithMapProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMessageWithMap(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &MessageWithMap{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestMessageWithMapMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMessageWithMap(popr, false) + size := p.Size() + data := make([]byte, size) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(data) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &MessageWithMap{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkMessageWithMapProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*MessageWithMap, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedMessageWithMap(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkMessageWithMapProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedMessageWithMap(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &MessageWithMap{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestFloatingPointProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedFloatingPoint(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &FloatingPoint{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestFloatingPointMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedFloatingPoint(popr, false) + size := p.Size() + data := make([]byte, size) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(data) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &FloatingPoint{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkFloatingPointProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*FloatingPoint, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedFloatingPoint(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkFloatingPointProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedFloatingPoint(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &FloatingPoint{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestUint128PairProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUint128Pair(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Uint128Pair{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestUint128PairMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUint128Pair(popr, false) + size := p.Size() + data := make([]byte, size) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(data) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Uint128Pair{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkUint128PairProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Uint128Pair, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedUint128Pair(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkUint128PairProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedUint128Pair(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &Uint128Pair{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestContainsNestedMapProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedContainsNestedMap(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &ContainsNestedMap{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestContainsNestedMapMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedContainsNestedMap(popr, false) + size := p.Size() + data := make([]byte, size) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(data) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &ContainsNestedMap{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkContainsNestedMapProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*ContainsNestedMap, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedContainsNestedMap(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkContainsNestedMapProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedContainsNestedMap(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &ContainsNestedMap{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestContainsNestedMap_NestedMapProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedContainsNestedMap_NestedMap(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &ContainsNestedMap_NestedMap{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestContainsNestedMap_NestedMapMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedContainsNestedMap_NestedMap(popr, false) + size := p.Size() + data := make([]byte, size) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(data) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &ContainsNestedMap_NestedMap{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkContainsNestedMap_NestedMapProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*ContainsNestedMap_NestedMap, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedContainsNestedMap_NestedMap(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkContainsNestedMap_NestedMapProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedContainsNestedMap_NestedMap(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &ContainsNestedMap_NestedMap{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestMessageJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMessage(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Message{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNestedJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNested(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Nested{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestAllMapsJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAllMaps(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &AllMaps{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestAllMapsOrderedJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAllMapsOrdered(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &AllMapsOrdered{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestMessageWithMapJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMessageWithMap(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &MessageWithMap{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestFloatingPointJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedFloatingPoint(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &FloatingPoint{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestUint128PairJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUint128Pair(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Uint128Pair{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestContainsNestedMapJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedContainsNestedMap(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &ContainsNestedMap{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestContainsNestedMap_NestedMapJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedContainsNestedMap_NestedMap(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &ContainsNestedMap_NestedMap{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestMessageProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMessage(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &Message{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestMessageProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMessage(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &Message{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNestedProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNested(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &Nested{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNestedProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNested(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &Nested{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestAllMapsProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAllMaps(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &AllMaps{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestAllMapsProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAllMaps(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &AllMaps{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestAllMapsOrderedProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAllMapsOrdered(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &AllMapsOrdered{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestAllMapsOrderedProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAllMapsOrdered(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &AllMapsOrdered{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestMessageWithMapProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMessageWithMap(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &MessageWithMap{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestMessageWithMapProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMessageWithMap(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &MessageWithMap{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestFloatingPointProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedFloatingPoint(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &FloatingPoint{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestFloatingPointProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedFloatingPoint(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &FloatingPoint{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestUint128PairProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUint128Pair(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &Uint128Pair{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestUint128PairProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUint128Pair(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &Uint128Pair{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestContainsNestedMapProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedContainsNestedMap(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &ContainsNestedMap{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestContainsNestedMapProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedContainsNestedMap(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &ContainsNestedMap{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestContainsNestedMap_NestedMapProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedContainsNestedMap_NestedMap(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &ContainsNestedMap_NestedMap{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestContainsNestedMap_NestedMapProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedContainsNestedMap_NestedMap(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &ContainsNestedMap_NestedMap{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestTheproto3Description(t *testing.T) { + Theproto3Description() +} +func TestMessageVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedMessage(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &Message{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNestedVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNested(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &Nested{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestAllMapsVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAllMaps(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &AllMaps{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestAllMapsOrderedVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAllMapsOrdered(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &AllMapsOrdered{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestMessageWithMapVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedMessageWithMap(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &MessageWithMap{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestFloatingPointVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedFloatingPoint(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &FloatingPoint{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestUint128PairVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedUint128Pair(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &Uint128Pair{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestContainsNestedMapVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedContainsNestedMap(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &ContainsNestedMap{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestContainsNestedMap_NestedMapVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedContainsNestedMap_NestedMap(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &ContainsNestedMap_NestedMap{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestMessageFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedMessage(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNestedFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNested(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestAllMapsFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAllMaps(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestAllMapsOrderedFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAllMapsOrdered(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestMessageWithMapFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedMessageWithMap(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestFloatingPointFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedFloatingPoint(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestUint128PairFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedUint128Pair(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestContainsNestedMapFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedContainsNestedMap(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestContainsNestedMap_NestedMapFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedContainsNestedMap_NestedMap(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestMessageGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedMessage(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestNestedGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNested(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestAllMapsGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAllMaps(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestAllMapsOrderedGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAllMapsOrdered(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestMessageWithMapGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedMessageWithMap(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestFloatingPointGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedFloatingPoint(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestUint128PairGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedUint128Pair(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestContainsNestedMapGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedContainsNestedMap(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestContainsNestedMap_NestedMapGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedContainsNestedMap_NestedMap(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestMessageSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMessage(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkMessageSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Message, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedMessage(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNestedSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNested(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNestedSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Nested, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNested(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestAllMapsSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAllMaps(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkAllMapsSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*AllMaps, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedAllMaps(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestAllMapsOrderedSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAllMapsOrdered(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkAllMapsOrderedSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*AllMapsOrdered, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedAllMapsOrdered(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestMessageWithMapSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMessageWithMap(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkMessageWithMapSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*MessageWithMap, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedMessageWithMap(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestFloatingPointSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedFloatingPoint(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkFloatingPointSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*FloatingPoint, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedFloatingPoint(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestUint128PairSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUint128Pair(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkUint128PairSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Uint128Pair, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedUint128Pair(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestContainsNestedMapSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedContainsNestedMap(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkContainsNestedMapSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*ContainsNestedMap, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedContainsNestedMap(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestContainsNestedMap_NestedMapSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedContainsNestedMap_NestedMap(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkContainsNestedMap_NestedMapSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*ContainsNestedMap_NestedMap, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedContainsNestedMap_NestedMap(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestMessageStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedMessage(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNestedStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNested(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestAllMapsStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAllMaps(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestAllMapsOrderedStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAllMapsOrdered(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestMessageWithMapStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedMessageWithMap(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestFloatingPointStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedFloatingPoint(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestUint128PairStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedUint128Pair(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestContainsNestedMapStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedContainsNestedMap(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestContainsNestedMap_NestedMapStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedContainsNestedMap_NestedMap(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} + +//These tests are generated by github.com/gogo/protobuf/plugin/testgen diff --git a/vendor/github.com/gogo/protobuf/test/theproto3/combos/unsafemarshaler/proto3_test.go b/vendor/github.com/gogo/protobuf/test/theproto3/combos/unsafemarshaler/proto3_test.go new file mode 100644 index 000000000..b41f17859 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/theproto3/combos/unsafemarshaler/proto3_test.go @@ -0,0 +1,61 @@ +// Copyright (c) 2015, Vastech SA (PTY) LTD. All rights reserved. +// http://github.com/gogo/protobuf/gogoproto +// +// 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 theproto3 + +import ( + "reflect" + "testing" + + "github.com/gogo/protobuf/proto" +) + +func TestNilMaps(t *testing.T) { + m := &AllMaps{StringToMsgMap: map[string]*FloatingPoint{"a": nil}} + if _, err := proto.Marshal(m); err == nil { + t.Fatalf("expected error") + } +} + +func TestCustomTypeSize(t *testing.T) { + m := &Uint128Pair{} + m.Size() // Should not panic. +} + +func TestCustomTypeMarshalUnmarshal(t *testing.T) { + m1 := &Uint128Pair{} + if b, err := proto.Marshal(m1); err != nil { + t.Fatal(err) + } else { + m2 := &Uint128Pair{} + if err := proto.Unmarshal(b, m2); err != nil { + t.Fatal(err) + } + if !reflect.DeepEqual(m1, m2) { + t.Errorf("expected %+v, got %+v", m1, m2) + } + } +} diff --git a/vendor/github.com/gogo/protobuf/test/theproto3/combos/unsafemarshaler/theproto3.pb.go b/vendor/github.com/gogo/protobuf/test/theproto3/combos/unsafemarshaler/theproto3.pb.go new file mode 100644 index 000000000..da6806c4a --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/theproto3/combos/unsafemarshaler/theproto3.pb.go @@ -0,0 +1,5827 @@ +// Code generated by protoc-gen-gogo. +// source: combos/unsafemarshaler/theproto3.proto +// DO NOT EDIT! + +/* + Package theproto3 is a generated protocol buffer package. + + It is generated from these files: + combos/unsafemarshaler/theproto3.proto + + It has these top-level messages: + Message + Nested + AllMaps + AllMapsOrdered + MessageWithMap + FloatingPoint + Uint128Pair + ContainsNestedMap +*/ +package theproto3 + +import proto "github.com/gogo/protobuf/proto" +import fmt "fmt" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" +import test "github.com/gogo/protobuf/test/combos/both" + +import github_com_gogo_protobuf_test_custom "github.com/gogo/protobuf/test/custom" + +import github_com_gogo_protobuf_protoc_gen_gogo_descriptor "github.com/gogo/protobuf/protoc-gen-gogo/descriptor" +import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" +import compress_gzip "compress/gzip" +import bytes "bytes" +import io_ioutil "io/ioutil" + +import strconv "strconv" + +import strings "strings" +import sort "sort" +import reflect "reflect" +import github_com_gogo_protobuf_sortkeys "github.com/gogo/protobuf/sortkeys" + +import unsafe "unsafe" +import errors "errors" + +// 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. +const _ = proto.GoGoProtoPackageIsVersion1 + +type MapEnum int32 + +const ( + MA MapEnum = 0 + MB MapEnum = 1 + MC MapEnum = 2 +) + +var MapEnum_name = map[int32]string{ + 0: "MA", + 1: "MB", + 2: "MC", +} +var MapEnum_value = map[string]int32{ + "MA": 0, + "MB": 1, + "MC": 2, +} + +func (MapEnum) EnumDescriptor() ([]byte, []int) { return fileDescriptorTheproto3, []int{0} } + +type Message_Humour int32 + +const ( + UNKNOWN Message_Humour = 0 + PUNS Message_Humour = 1 + SLAPSTICK Message_Humour = 2 + BILL_BAILEY Message_Humour = 3 +) + +var Message_Humour_name = map[int32]string{ + 0: "UNKNOWN", + 1: "PUNS", + 2: "SLAPSTICK", + 3: "BILL_BAILEY", +} +var Message_Humour_value = map[string]int32{ + "UNKNOWN": 0, + "PUNS": 1, + "SLAPSTICK": 2, + "BILL_BAILEY": 3, +} + +func (Message_Humour) EnumDescriptor() ([]byte, []int) { return fileDescriptorTheproto3, []int{0, 0} } + +type Message struct { + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + Hilarity Message_Humour `protobuf:"varint,2,opt,name=hilarity,proto3,enum=theproto3.Message_Humour" json:"hilarity,omitempty"` + HeightInCm uint32 `protobuf:"varint,3,opt,name=height_in_cm,json=heightInCm,proto3" json:"height_in_cm,omitempty"` + Data []byte `protobuf:"bytes,4,opt,name=data,proto3" json:"data,omitempty"` + ResultCount int64 `protobuf:"varint,7,opt,name=result_count,json=resultCount,proto3" json:"result_count,omitempty"` + TrueScotsman bool `protobuf:"varint,8,opt,name=true_scotsman,json=trueScotsman,proto3" json:"true_scotsman,omitempty"` + Score float32 `protobuf:"fixed32,9,opt,name=score,proto3" json:"score,omitempty"` + Key []uint64 `protobuf:"varint,5,rep,name=key" json:"key,omitempty"` + Nested *Nested `protobuf:"bytes,6,opt,name=nested" json:"nested,omitempty"` + Terrain map[int64]*Nested `protobuf:"bytes,10,rep,name=terrain" json:"terrain,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value"` + Proto2Field *test.NinOptNative `protobuf:"bytes,11,opt,name=proto2_field,json=proto2Field" json:"proto2_field,omitempty"` + Proto2Value map[int64]*test.NinOptEnum `protobuf:"bytes,13,rep,name=proto2_value,json=proto2Value" json:"proto2_value,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value"` +} + +func (m *Message) Reset() { *m = Message{} } +func (*Message) ProtoMessage() {} +func (*Message) Descriptor() ([]byte, []int) { return fileDescriptorTheproto3, []int{0} } + +type Nested struct { + Bunny string `protobuf:"bytes,1,opt,name=bunny,proto3" json:"bunny,omitempty"` +} + +func (m *Nested) Reset() { *m = Nested{} } +func (*Nested) ProtoMessage() {} +func (*Nested) Descriptor() ([]byte, []int) { return fileDescriptorTheproto3, []int{1} } + +type AllMaps struct { + StringToDoubleMap map[string]float64 `protobuf:"bytes,1,rep,name=StringToDoubleMap,json=stringToDoubleMap" json:"StringToDoubleMap,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"fixed64,2,opt,name=value,proto3"` + StringToFloatMap map[string]float32 `protobuf:"bytes,2,rep,name=StringToFloatMap,json=stringToFloatMap" json:"StringToFloatMap,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"fixed32,2,opt,name=value,proto3"` + Int32Map map[int32]int32 `protobuf:"bytes,3,rep,name=Int32Map,json=int32Map" json:"Int32Map,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` + Int64Map map[int64]int64 `protobuf:"bytes,4,rep,name=Int64Map,json=int64Map" json:"Int64Map,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` + Uint32Map map[uint32]uint32 `protobuf:"bytes,5,rep,name=Uint32Map,json=uint32Map" json:"Uint32Map,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` + Uint64Map map[uint64]uint64 `protobuf:"bytes,6,rep,name=Uint64Map,json=uint64Map" json:"Uint64Map,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` + Sint32Map map[int32]int32 `protobuf:"bytes,7,rep,name=Sint32Map,json=sint32Map" json:"Sint32Map,omitempty" protobuf_key:"zigzag32,1,opt,name=key,proto3" protobuf_val:"zigzag32,2,opt,name=value,proto3"` + Sint64Map map[int64]int64 `protobuf:"bytes,8,rep,name=Sint64Map,json=sint64Map" json:"Sint64Map,omitempty" protobuf_key:"zigzag64,1,opt,name=key,proto3" protobuf_val:"zigzag64,2,opt,name=value,proto3"` + Fixed32Map map[uint32]uint32 `protobuf:"bytes,9,rep,name=Fixed32Map,json=fixed32Map" json:"Fixed32Map,omitempty" protobuf_key:"fixed32,1,opt,name=key,proto3" protobuf_val:"fixed32,2,opt,name=value,proto3"` + Sfixed32Map map[int32]int32 `protobuf:"bytes,10,rep,name=Sfixed32Map,json=sfixed32Map" json:"Sfixed32Map,omitempty" protobuf_key:"fixed32,1,opt,name=key,proto3" protobuf_val:"fixed32,2,opt,name=value,proto3"` + Fixed64Map map[uint64]uint64 `protobuf:"bytes,11,rep,name=Fixed64Map,json=fixed64Map" json:"Fixed64Map,omitempty" protobuf_key:"fixed64,1,opt,name=key,proto3" protobuf_val:"fixed64,2,opt,name=value,proto3"` + Sfixed64Map map[int64]int64 `protobuf:"bytes,12,rep,name=Sfixed64Map,json=sfixed64Map" json:"Sfixed64Map,omitempty" protobuf_key:"fixed64,1,opt,name=key,proto3" protobuf_val:"fixed64,2,opt,name=value,proto3"` + BoolMap map[bool]bool `protobuf:"bytes,13,rep,name=BoolMap,json=boolMap" json:"BoolMap,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` + StringMap map[string]string `protobuf:"bytes,14,rep,name=StringMap,json=stringMap" json:"StringMap,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + StringToBytesMap map[string][]byte `protobuf:"bytes,15,rep,name=StringToBytesMap,json=stringToBytesMap" json:"StringToBytesMap,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + StringToEnumMap map[string]MapEnum `protobuf:"bytes,16,rep,name=StringToEnumMap,json=stringToEnumMap" json:"StringToEnumMap,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3,enum=theproto3.MapEnum"` + StringToMsgMap map[string]*FloatingPoint `protobuf:"bytes,17,rep,name=StringToMsgMap,json=stringToMsgMap" json:"StringToMsgMap,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value"` +} + +func (m *AllMaps) Reset() { *m = AllMaps{} } +func (*AllMaps) ProtoMessage() {} +func (*AllMaps) Descriptor() ([]byte, []int) { return fileDescriptorTheproto3, []int{2} } + +type AllMapsOrdered struct { + StringToDoubleMap map[string]float64 `protobuf:"bytes,1,rep,name=StringToDoubleMap,json=stringToDoubleMap" json:"StringToDoubleMap,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"fixed64,2,opt,name=value,proto3"` + StringToFloatMap map[string]float32 `protobuf:"bytes,2,rep,name=StringToFloatMap,json=stringToFloatMap" json:"StringToFloatMap,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"fixed32,2,opt,name=value,proto3"` + Int32Map map[int32]int32 `protobuf:"bytes,3,rep,name=Int32Map,json=int32Map" json:"Int32Map,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` + Int64Map map[int64]int64 `protobuf:"bytes,4,rep,name=Int64Map,json=int64Map" json:"Int64Map,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` + Uint32Map map[uint32]uint32 `protobuf:"bytes,5,rep,name=Uint32Map,json=uint32Map" json:"Uint32Map,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` + Uint64Map map[uint64]uint64 `protobuf:"bytes,6,rep,name=Uint64Map,json=uint64Map" json:"Uint64Map,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` + Sint32Map map[int32]int32 `protobuf:"bytes,7,rep,name=Sint32Map,json=sint32Map" json:"Sint32Map,omitempty" protobuf_key:"zigzag32,1,opt,name=key,proto3" protobuf_val:"zigzag32,2,opt,name=value,proto3"` + Sint64Map map[int64]int64 `protobuf:"bytes,8,rep,name=Sint64Map,json=sint64Map" json:"Sint64Map,omitempty" protobuf_key:"zigzag64,1,opt,name=key,proto3" protobuf_val:"zigzag64,2,opt,name=value,proto3"` + Fixed32Map map[uint32]uint32 `protobuf:"bytes,9,rep,name=Fixed32Map,json=fixed32Map" json:"Fixed32Map,omitempty" protobuf_key:"fixed32,1,opt,name=key,proto3" protobuf_val:"fixed32,2,opt,name=value,proto3"` + Sfixed32Map map[int32]int32 `protobuf:"bytes,10,rep,name=Sfixed32Map,json=sfixed32Map" json:"Sfixed32Map,omitempty" protobuf_key:"fixed32,1,opt,name=key,proto3" protobuf_val:"fixed32,2,opt,name=value,proto3"` + Fixed64Map map[uint64]uint64 `protobuf:"bytes,11,rep,name=Fixed64Map,json=fixed64Map" json:"Fixed64Map,omitempty" protobuf_key:"fixed64,1,opt,name=key,proto3" protobuf_val:"fixed64,2,opt,name=value,proto3"` + Sfixed64Map map[int64]int64 `protobuf:"bytes,12,rep,name=Sfixed64Map,json=sfixed64Map" json:"Sfixed64Map,omitempty" protobuf_key:"fixed64,1,opt,name=key,proto3" protobuf_val:"fixed64,2,opt,name=value,proto3"` + BoolMap map[bool]bool `protobuf:"bytes,13,rep,name=BoolMap,json=boolMap" json:"BoolMap,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` + StringMap map[string]string `protobuf:"bytes,14,rep,name=StringMap,json=stringMap" json:"StringMap,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + StringToBytesMap map[string][]byte `protobuf:"bytes,15,rep,name=StringToBytesMap,json=stringToBytesMap" json:"StringToBytesMap,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + StringToEnumMap map[string]MapEnum `protobuf:"bytes,16,rep,name=StringToEnumMap,json=stringToEnumMap" json:"StringToEnumMap,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3,enum=theproto3.MapEnum"` + StringToMsgMap map[string]*FloatingPoint `protobuf:"bytes,17,rep,name=StringToMsgMap,json=stringToMsgMap" json:"StringToMsgMap,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value"` +} + +func (m *AllMapsOrdered) Reset() { *m = AllMapsOrdered{} } +func (*AllMapsOrdered) ProtoMessage() {} +func (*AllMapsOrdered) Descriptor() ([]byte, []int) { return fileDescriptorTheproto3, []int{3} } + +type MessageWithMap struct { + NameMapping map[int32]string `protobuf:"bytes,1,rep,name=name_mapping,json=nameMapping" json:"name_mapping,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + MsgMapping map[int64]*FloatingPoint `protobuf:"bytes,2,rep,name=msg_mapping,json=msgMapping" json:"msg_mapping,omitempty" protobuf_key:"zigzag64,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value"` + ByteMapping map[bool][]byte `protobuf:"bytes,3,rep,name=byte_mapping,json=byteMapping" json:"byte_mapping,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` +} + +func (m *MessageWithMap) Reset() { *m = MessageWithMap{} } +func (*MessageWithMap) ProtoMessage() {} +func (*MessageWithMap) Descriptor() ([]byte, []int) { return fileDescriptorTheproto3, []int{4} } + +type FloatingPoint struct { + F float64 `protobuf:"fixed64,1,opt,name=f,proto3" json:"f,omitempty"` +} + +func (m *FloatingPoint) Reset() { *m = FloatingPoint{} } +func (*FloatingPoint) ProtoMessage() {} +func (*FloatingPoint) Descriptor() ([]byte, []int) { return fileDescriptorTheproto3, []int{5} } + +type Uint128Pair struct { + Left github_com_gogo_protobuf_test_custom.Uint128 `protobuf:"bytes,1,opt,name=left,proto3,customtype=github.com/gogo/protobuf/test/custom.Uint128" json:"left"` + Right *github_com_gogo_protobuf_test_custom.Uint128 `protobuf:"bytes,2,opt,name=right,proto3,customtype=github.com/gogo/protobuf/test/custom.Uint128" json:"right,omitempty"` +} + +func (m *Uint128Pair) Reset() { *m = Uint128Pair{} } +func (*Uint128Pair) ProtoMessage() {} +func (*Uint128Pair) Descriptor() ([]byte, []int) { return fileDescriptorTheproto3, []int{6} } + +type ContainsNestedMap struct { +} + +func (m *ContainsNestedMap) Reset() { *m = ContainsNestedMap{} } +func (*ContainsNestedMap) ProtoMessage() {} +func (*ContainsNestedMap) Descriptor() ([]byte, []int) { return fileDescriptorTheproto3, []int{7} } + +type ContainsNestedMap_NestedMap struct { + NestedMapField map[string]float64 `protobuf:"bytes,1,rep,name=NestedMapField,json=nestedMapField" json:"NestedMapField,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"fixed64,2,opt,name=value,proto3"` +} + +func (m *ContainsNestedMap_NestedMap) Reset() { *m = ContainsNestedMap_NestedMap{} } +func (*ContainsNestedMap_NestedMap) ProtoMessage() {} +func (*ContainsNestedMap_NestedMap) Descriptor() ([]byte, []int) { + return fileDescriptorTheproto3, []int{7, 0} +} + +func init() { + proto.RegisterType((*Message)(nil), "theproto3.Message") + proto.RegisterType((*Nested)(nil), "theproto3.Nested") + proto.RegisterType((*AllMaps)(nil), "theproto3.AllMaps") + proto.RegisterType((*AllMapsOrdered)(nil), "theproto3.AllMapsOrdered") + proto.RegisterType((*MessageWithMap)(nil), "theproto3.MessageWithMap") + proto.RegisterType((*FloatingPoint)(nil), "theproto3.FloatingPoint") + proto.RegisterType((*Uint128Pair)(nil), "theproto3.Uint128Pair") + proto.RegisterType((*ContainsNestedMap)(nil), "theproto3.ContainsNestedMap") + proto.RegisterType((*ContainsNestedMap_NestedMap)(nil), "theproto3.ContainsNestedMap.NestedMap") + proto.RegisterEnum("theproto3.MapEnum", MapEnum_name, MapEnum_value) + proto.RegisterEnum("theproto3.Message_Humour", Message_Humour_name, Message_Humour_value) +} +func (this *Message) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return Theproto3Description() +} +func (this *Nested) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return Theproto3Description() +} +func (this *AllMaps) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return Theproto3Description() +} +func (this *AllMapsOrdered) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return Theproto3Description() +} +func (this *MessageWithMap) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return Theproto3Description() +} +func (this *FloatingPoint) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return Theproto3Description() +} +func (this *Uint128Pair) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return Theproto3Description() +} +func (this *ContainsNestedMap) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return Theproto3Description() +} +func (this *ContainsNestedMap_NestedMap) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return Theproto3Description() +} +func Theproto3Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + d := &github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet{} + var gzipped = []byte{ + // 7459 bytes of a gzipped FileDescriptorSet + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xec, 0x7d, 0x6b, 0x6c, 0x23, 0xd7, + 0x75, 0xff, 0x92, 0x43, 0x4a, 0xd4, 0x21, 0x45, 0x51, 0xb3, 0x5a, 0x99, 0x96, 0xd7, 0xfb, 0xa0, + 0xd7, 0xb2, 0xac, 0xd8, 0x5a, 0xad, 0x56, 0xfb, 0x30, 0xfd, 0xfa, 0x8b, 0x14, 0xb5, 0xd6, 0x46, + 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, 0x86, 0x4c, 0xb5, 0x51, 0xb7, 0x9d, 0x76, 0xd9, 0x6d, 0xb7, 0xec, + 0xca, 0x5e, 0xdd, 0xd9, 0x21, 0x79, 0x34, 0x91, 0x8f, 0x6f, 0x57, 0x1a, 0xae, 0x6d, 0x0d, 0xd1, + 0xee, 0x75, 0xde, 0x8b, 0x11, 0x64, 0xb1, 0x68, 0x49, 0x88, 0x3e, 0x05, 0x41, 0xbb, 0x05, 0x22, + 0xf7, 0x8d, 0x7e, 0x48, 0x4a, 0xd5, 0x99, 0x79, 0x1a, 0x52, 0xcf, 0x54, 0x9e, 0xab, 0x94, 0x79, + 0xc5, 0x4d, 0x35, 0x91, 0xc4, 0x6d, 0x6b, 0xac, 0xea, 0x9e, 0x86, 0x11, 0x42, 0x82, 0xe6, 0x88, + 0x06, 0xaa, 0x36, 0x2a, 0xae, 0x4b, 0x94, 0x96, 0x20, 0xa4, 0x26, 0xee, 0x5b, 0xc5, 0x5d, 0x45, + 0xde, 0x63, 0x5e, 0x80, 0xa3, 0x04, 0xb1, 0x87, 0x12, 0x6f, 0x7d, 0xbf, 0x61, 0x97, 0xf1, 0x35, + 0x80, 0x4b, 0xf2, 0xa9, 0x90, 0x6c, 0x18, 0x53, 0x2c, 0x33, 0x02, 0x2c, 0x91, 0x6b, 0x5e, 0x81, + 0x3b, 0x09, 0x6c, 0xc7, 0x76, 0xec, 0x56, 0xa5, 0x6d, 0x97, 0xed, 0xff, 0x7f, 0x80, 0x68, 0xcb, + 0x15, 0xa7, 0x56, 0xde, 0xad, 0xb8, 0xbb, 0xd9, 0x11, 0x99, 0xc1, 0xed, 0x98, 0xf6, 0x0a, 0x23, + 0x2d, 0x11, 0xca, 0x39, 0xa7, 0xf6, 0x18, 0xa2, 0x33, 0xf3, 0x30, 0x4a, 0x18, 0x21, 0xa5, 0xa0, + 0x39, 0x97, 0xab, 0xbb, 0x76, 0xf5, 0xd9, 0xf2, 0x41, 0x7b, 0xfb, 0x72, 0xf6, 0x0e,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 0x24, 0x64, 0x39, 0xf3, 0x03, 0x07, 0x15, 0xf8, 0xcd, 0x1d, 0x07, 0x99, 0xb1, 0xd6, 0x03, + 0xeb, 0x2f, 0x6a, 0xa6, 0xda, 0x94, 0xe0, 0x98, 0xf3, 0x22, 0x64, 0x44, 0xbd, 0x51, 0xae, 0xef, + 0xed, 0x37, 0x51, 0x69, 0xd9, 0x9d, 0xe3, 0x9f, 0x73, 0x4b, 0x09, 0xdc, 0x22, 0x81, 0xe5, 0x4b, + 0x90, 0x26, 0x3f, 0x7b, 0x75, 0xc9, 0x2f, 0x31, 0x46, 0x83, 0x1e, 0x8a, 0x25, 0x0e, 0x54, 0x29, + 0xa1, 0x9a, 0xb7, 0x97, 0xfc, 0xf7, 0x17, 0x3c, 0x71, 0x30, 0x08, 0xf5, 0xbe, 0x21, 0x6d, 0x25, + 0x36, 0xc3, 0x8e, 0x5f, 0xb3, 0xbf, 0xf8, 0x1a, 0x8b, 0x59, 0x75, 0x21, 0xce, 0x2f, 0x61, 0xf5, + 0xa8, 0xcb, 0x65, 0x38, 0xb3, 0xf7, 0xbe, 0x26, 0x34, 0xa4, 0xac, 0x96, 0xf9, 0x05, 0x18, 0x54, + 0x96, 0xca, 0x70, 0x56, 0xbf, 0xc4, 0x58, 0xa5, 0xe4, 0x95, 0x32, 0x7f, 0x01, 0x62, 0x78, 0xd9, + 0x0b, 0x87, 0xff, 0x32, 0x83, 0x13, 0xf2, 0xfc, 0xc3, 0x90, 0xe0, 0xcb, 0x5d, 0x38, 0xf4, 0x7d, + 0x0c, 0x2a, 0x20, 0x18, 0xce, 0x97, 0xba, 0x70, 0xf8, 0xaf, 0x70, 0x38, 0x87, 0x60, 0x78, 0xef, + 0x2a, 0x7c, 0xf9, 0xd7, 0x62, 0x2c, 0x5d, 0x71, 0xdd, 0xe1, 0x33, 0x1f, 0xba, 0xc6, 0x85, 0xa3, + 0x3f, 0xc0, 0x06, 0xe7, 0x88, 0xfc, 0x25, 0x88, 0xf7, 0xa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35, 0xa6, 0x30, 0xe3, 0xa8, 0x6a, + 0x46, 0x61, 0xc0, 0x51, 0xd5, 0x80, 0xc2, 0x74, 0xa3, 0xaa, 0xe9, 0x84, 0xd1, 0x46, 0x55, 0xa3, + 0x09, 0x73, 0x8d, 0xaa, 0xe6, 0x12, 0x86, 0xca, 0x6a, 0x86, 0xf2, 0x4c, 0x94, 0xd5, 0x4c, 0xe4, + 0x19, 0x27, 0xab, 0x19, 0xc7, 0x33, 0x4b, 0x56, 0x33, 0x8b, 0x67, 0x90, 0xac, 0x66, 0x10, 0xcf, + 0x14, 0x59, 0xcd, 0x14, 0x9e, 0x11, 0x58, 0x8c, 0x59, 0xf6, 0xbe, 0x4f, 0x8c, 0x19, 0x5d, 0x63, + 0xcc, 0xe8, 0x1a, 0x63, 0x46, 0xd7, 0x18, 0x33, 0xba, 0xc6, 0x98, 0xd1, 0x35, 0xc6, 0x8c, 0xae, + 0x31, 0x66, 0x74, 0x8d, 0x31, 0xa3, 0x6b, 0x8c, 0x19, 0xdd, 0x63, 0xcc, 0x08, 0x89, 0x31, 0x23, + 0x24, 0xc6, 0x8c, 0x90, 0x18, 0x33, 0x42, 0x62, 0xcc, 0x08, 0x89, 0x31, 0x23, 0x30, 0xc6, 0x3c, + 0xf3, 0x8e, 0xaa, 0xe6, 0xf5, 0x8d, 0x31, 0x23, 0x20, 0xc6, 0x8c, 0x80, 0x18, 0x33, 0x02, 0x62, + 0xcc, 0x08, 0x88, 0x31, 0x23, 0x20, 0xc6, 0x8c, 0x80, 0x18, 0x33, 0x02, 0x62, 0xcc, 0x08, 0x8a, + 0x31, 0x23, 0x30, 0xc6, 0x8c, 0xc0, 0x18, 0x33, 0x02, 0x63, 0xcc, 0x08, 0x8c, 0x31, 0x23, 0x30, + 0xc6, 0x0c, 0x39, 0xc6, 0xfe, 0xca, 0x00, 0x93, 0xc6, 0xd8, 0x1a, 0xb9, 0x39, 0x80, 0x99, 0xe2, + 0x84, 0x16, 0x69, 0x7d, 0xd8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, 0x12, 0x9c, 0xb1, + 0x79, 0x06, 0x23, 0xb6, 0xdb, 0x6c, 0x58, 0x86, 0xc0, 0xe2, 0xb0, 0x95, 0x0b, 0xe1, 0xb6, 0xdb, + 0xe6, 0x38, 0xc4, 0xad, 0xfa, 0xce, 0x6e, 0x9b, 0x0d, 0xde, 0x49, 0x16, 0x6f, 0xe1, 0xee, 0xdc, + 0x53, 0x30, 0x20, 0x24, 0x7a, 0x9d, 0x59, 0xcf, 0xd3, 0xa9, 0xa1, 0x2b, 0x61, 0x69, 0x3d, 0xe1, + 0xfb, 0x96, 0xec, 0x21, 0xcf, 0x53, 0x90, 0x40, 0x6a, 0xf6, 0x92, 0x3e, 0xaf, 0x48, 0xf1, 0x89, + 0x3c, 0x69, 0xcd, 0xbd, 0x27, 0x02, 0x89, 0x79, 0xdb, 0xde, 0x27, 0x0a, 0xbf, 0x1b, 0x62, 0xf3, + 0xcd, 0xe7, 0x1d, 0x26, 0xe0, 0x30, 0xd3, 0x28, 0xee, 0x66, 0x3a, 0x8d, 0xd5, 0x50, 0x37, 0x22, + 0x93, 0xf4, 0x7e, 0x54, 0xe8, 0x5d, 0xa2, 0x23, 0xba, 0xcf, 0x29, 0xba, 0x67, 0x06, 0xc4, 0x44, + 0x1d, 0xfa, 0xbf, 0x04, 0x49, 0x69, 0x14, 0x73, 0x82, 0x89, 0x11, 0xd5, 0x81, 0xb2, 0xae, 0xb0, + 0x24, 0x39, 0x1b, 0x06, 0x95, 0x81, 0x31, 0x54, 0x52, 0x71, 0x00, 0x94, 0xa8, 0x79, 0x52, 0x55, + 0xb3, 0x3f, 0x29, 0x53, 0xf5, 0x34, 0xd5, 0x11, 0x51, 0xf7, 0x19, 0xea, 0x9c, 0xc1, 0x46, 0x6c, + 0xa3, 0xef, 0xb9, 0x38, 0x18, 0x2b, 0xf5, 0x46, 0xee, 0x61, 0x00, 0x1a, 0xf2, 0xf8, 0xe6, 0x2a, + 0x2d, 0xea, 0xd2, 0x5c, 0xc1, 0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 0xe1, 0x19, 0x03, 0x3a, 0x7e, 0x5f, 0x57, 0x06, 0x92, 0x00, 0x84, 0x81, 0x90, 0x60, + 0x5d, 0x48, 0xd0, 0x1f, 0xc8, 0x60, 0x5d, 0x93, 0xc0, 0x95, 0x25, 0x58, 0x17, 0x12, 0x24, 0xba, + 0x32, 0x90, 0x25, 0x70, 0x85, 0x04, 0x05, 0x80, 0x85, 0xfa, 0x35, 0xbb, 0x46, 0x45, 0xa0, 0x2f, + 0xfd, 0xcf, 0xf9, 0x70, 0xf0, 0x88, 0x28, 0x0b, 0xd8, 0x16, 0x0d, 0x66, 0x09, 0x92, 0xeb, 0xde, + 0x4f, 0x96, 0x3e, 0xee, 0xf2, 0x13, 0x63, 0x5b, 0xe3, 0x92, 0x74, 0x25, 0x36, 0x5c, 0x14, 0x3a, + 0x99, 0x64, 0x77, 0x51, 0xa4, 0xd9, 0x50, 0x51, 0xe8, 0x74, 0x84, 0x28, 0x94, 0x49, 0x2a, 0x44, + 0x14, 0x89, 0x0b, 0x13, 0x85, 0xb2, 0x41, 0xc9, 0xb0, 0xd0, 0x6c, 0x62, 0x4a, 0x96, 0x95, 0x4e, + 0xfa, 0xb0, 0x60, 0x14, 0x2c, 0x19, 0x6e, 0xd1, 0x5f, 0xc4, 0x22, 0xc4, 0xc9, 0x31, 0x38, 0x1d, + 0x6c, 0x11, 0x4e, 0xc3, 0x2d, 0xc2, 0x7f, 0xcb, 0x71, 0x46, 0x6e, 0x9b, 0xc4, 0x7c, 0x86, 0x42, + 0xe3, 0x8c, 0x93, 0x6a, 0x71, 0xc6, 0x9b, 0xcd, 0x77, 0xc0, 0x10, 0x27, 0xc5, 0xe9, 0x09, 0x33, + 0xcd, 0xb0, 0xff, 0x2d, 0x4a, 0x30, 0x53, 0x46, 0x49, 0x79, 0x0e, 0xb9, 0x6a, 0xab, 0xb9, 0x02, + 0x69, 0x4e, 0xb8, 0xec, 0x92, 0xe9, 0x0e, 0xb3, 0x77, 0x95, 0x07, 0x73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2c, 0x00, 0x7d, + 0x68, 0xe6, 0xe6, 0x1f, 0x32, 0xa5, 0xcf, 0xdc, 0xdc, 0x88, 0xc0, 0x30, 0xbb, 0x9f, 0xd2, 0x65, + 0x77, 0xd9, 0xa2, 0x15, 0xf2, 0x8b, 0x11, 0x18, 0x10, 0xbf, 0xcc, 0x2d, 0x48, 0x8b, 0x1f, 0xf4, + 0x4e, 0x6e, 0xea, 0xa9, 0x79, 0x49, 0xc3, 0x1d, 0x3c, 0xa6, 0x7c, 0xbe, 0xd1, 0x63, 0x2c, 0xba, + 0x26, 0x3b, 0x4a, 0xe3, 0xd8, 0x1c, 0x1c, 0xf5, 0x21, 0x3b, 0xcc, 0x82, 0x3c, 0x79, 0x1a, 0xfa, + 0x59, 0x68, 0xe3, 0x63, 0xc3, 0x65, 0x7c, 0xec, 0x88, 0xff, 0xe2, 0xa3, 0x4c, 0xfc, 0xb7, 0x98, + 0x89, 0x16, 0x96, 0x6e, 0xe2, 0x28, 0xe9, 0xc8, 0x2b, 0xe8, 0xa3, 0x1d, 0x25, 0x45, 0xf0, 0x51, + 0xd2, 0x56, 0x1f, 0x9d, 0xfb, 0xff, 0x06, 0x00, 0x00, 0xff, 0xff, 0xb0, 0x77, 0x4b, 0xc0, 0x7e, + 0x79, 0x00, 0x00, + } + r := bytes.NewReader(gzipped) + gzipr, err := compress_gzip.NewReader(r) + if err != nil { + panic(err) + } + ungzipped, err := io_ioutil.ReadAll(gzipr) + if err != nil { + panic(err) + } + if err := github_com_gogo_protobuf_proto.Unmarshal(ungzipped, d); err != nil { + panic(err) + } + return d +} +func (x MapEnum) String() string { + s, ok := MapEnum_name[int32(x)] + if ok { + return s + } + return strconv.Itoa(int(x)) +} +func (x Message_Humour) String() string { + s, ok := Message_Humour_name[int32(x)] + if ok { + return s + } + return strconv.Itoa(int(x)) +} +func (this *Message) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*Message) + if !ok { + that2, ok := that.(Message) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *Message") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *Message but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *Message 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.Hilarity != that1.Hilarity { + return fmt.Errorf("Hilarity this(%v) Not Equal that(%v)", this.Hilarity, that1.Hilarity) + } + if this.HeightInCm != that1.HeightInCm { + return fmt.Errorf("HeightInCm this(%v) Not Equal that(%v)", this.HeightInCm, that1.HeightInCm) + } + if !bytes.Equal(this.Data, that1.Data) { + return fmt.Errorf("Data this(%v) Not Equal that(%v)", this.Data, that1.Data) + } + if this.ResultCount != that1.ResultCount { + return fmt.Errorf("ResultCount this(%v) Not Equal that(%v)", this.ResultCount, that1.ResultCount) + } + if this.TrueScotsman != that1.TrueScotsman { + return fmt.Errorf("TrueScotsman this(%v) Not Equal that(%v)", this.TrueScotsman, that1.TrueScotsman) + } + if this.Score != that1.Score { + return fmt.Errorf("Score this(%v) Not Equal that(%v)", this.Score, that1.Score) + } + if len(this.Key) != len(that1.Key) { + return fmt.Errorf("Key this(%v) Not Equal that(%v)", len(this.Key), len(that1.Key)) + } + for i := range this.Key { + if this.Key[i] != that1.Key[i] { + return fmt.Errorf("Key this[%v](%v) Not Equal that[%v](%v)", i, this.Key[i], i, that1.Key[i]) + } + } + if !this.Nested.Equal(that1.Nested) { + return fmt.Errorf("Nested this(%v) Not Equal that(%v)", this.Nested, that1.Nested) + } + if len(this.Terrain) != len(that1.Terrain) { + return fmt.Errorf("Terrain this(%v) Not Equal that(%v)", len(this.Terrain), len(that1.Terrain)) + } + for i := range this.Terrain { + if !this.Terrain[i].Equal(that1.Terrain[i]) { + return fmt.Errorf("Terrain this[%v](%v) Not Equal that[%v](%v)", i, this.Terrain[i], i, that1.Terrain[i]) + } + } + if !this.Proto2Field.Equal(that1.Proto2Field) { + return fmt.Errorf("Proto2Field this(%v) Not Equal that(%v)", this.Proto2Field, that1.Proto2Field) + } + if len(this.Proto2Value) != len(that1.Proto2Value) { + return fmt.Errorf("Proto2Value this(%v) Not Equal that(%v)", len(this.Proto2Value), len(that1.Proto2Value)) + } + for i := range this.Proto2Value { + if !this.Proto2Value[i].Equal(that1.Proto2Value[i]) { + return fmt.Errorf("Proto2Value this[%v](%v) Not Equal that[%v](%v)", i, this.Proto2Value[i], i, that1.Proto2Value[i]) + } + } + return nil +} +func (this *Message) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*Message) + if !ok { + that2, ok := that.(Message) + 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.Hilarity != that1.Hilarity { + return false + } + if this.HeightInCm != that1.HeightInCm { + return false + } + if !bytes.Equal(this.Data, that1.Data) { + return false + } + if this.ResultCount != that1.ResultCount { + return false + } + if this.TrueScotsman != that1.TrueScotsman { + return false + } + if this.Score != that1.Score { + return false + } + if len(this.Key) != len(that1.Key) { + return false + } + for i := range this.Key { + if this.Key[i] != that1.Key[i] { + return false + } + } + if !this.Nested.Equal(that1.Nested) { + return false + } + if len(this.Terrain) != len(that1.Terrain) { + return false + } + for i := range this.Terrain { + if !this.Terrain[i].Equal(that1.Terrain[i]) { + return false + } + } + if !this.Proto2Field.Equal(that1.Proto2Field) { + return false + } + if len(this.Proto2Value) != len(that1.Proto2Value) { + return false + } + for i := range this.Proto2Value { + if !this.Proto2Value[i].Equal(that1.Proto2Value[i]) { + return false + } + } + return true +} +func (this *Nested) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*Nested) + if !ok { + that2, ok := that.(Nested) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *Nested") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *Nested but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *Nested but is not nil && this == nil") + } + if this.Bunny != that1.Bunny { + return fmt.Errorf("Bunny this(%v) Not Equal that(%v)", this.Bunny, that1.Bunny) + } + return nil +} +func (this *Nested) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*Nested) + if !ok { + that2, ok := that.(Nested) + 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.Bunny != that1.Bunny { + return false + } + return true +} +func (this *AllMaps) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*AllMaps) + if !ok { + that2, ok := that.(AllMaps) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *AllMaps") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *AllMaps but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *AllMaps but is not nil && this == nil") + } + if len(this.StringToDoubleMap) != len(that1.StringToDoubleMap) { + return fmt.Errorf("StringToDoubleMap this(%v) Not Equal that(%v)", len(this.StringToDoubleMap), len(that1.StringToDoubleMap)) + } + for i := range this.StringToDoubleMap { + if this.StringToDoubleMap[i] != that1.StringToDoubleMap[i] { + return fmt.Errorf("StringToDoubleMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringToDoubleMap[i], i, that1.StringToDoubleMap[i]) + } + } + if len(this.StringToFloatMap) != len(that1.StringToFloatMap) { + return fmt.Errorf("StringToFloatMap this(%v) Not Equal that(%v)", len(this.StringToFloatMap), len(that1.StringToFloatMap)) + } + for i := range this.StringToFloatMap { + if this.StringToFloatMap[i] != that1.StringToFloatMap[i] { + return fmt.Errorf("StringToFloatMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringToFloatMap[i], i, that1.StringToFloatMap[i]) + } + } + if len(this.Int32Map) != len(that1.Int32Map) { + return fmt.Errorf("Int32Map this(%v) Not Equal that(%v)", len(this.Int32Map), len(that1.Int32Map)) + } + for i := range this.Int32Map { + if this.Int32Map[i] != that1.Int32Map[i] { + return fmt.Errorf("Int32Map this[%v](%v) Not Equal that[%v](%v)", i, this.Int32Map[i], i, that1.Int32Map[i]) + } + } + if len(this.Int64Map) != len(that1.Int64Map) { + return fmt.Errorf("Int64Map this(%v) Not Equal that(%v)", len(this.Int64Map), len(that1.Int64Map)) + } + for i := range this.Int64Map { + if this.Int64Map[i] != that1.Int64Map[i] { + return fmt.Errorf("Int64Map this[%v](%v) Not Equal that[%v](%v)", i, this.Int64Map[i], i, that1.Int64Map[i]) + } + } + if len(this.Uint32Map) != len(that1.Uint32Map) { + return fmt.Errorf("Uint32Map this(%v) Not Equal that(%v)", len(this.Uint32Map), len(that1.Uint32Map)) + } + for i := range this.Uint32Map { + if this.Uint32Map[i] != that1.Uint32Map[i] { + return fmt.Errorf("Uint32Map this[%v](%v) Not Equal that[%v](%v)", i, this.Uint32Map[i], i, that1.Uint32Map[i]) + } + } + if len(this.Uint64Map) != len(that1.Uint64Map) { + return fmt.Errorf("Uint64Map this(%v) Not Equal that(%v)", len(this.Uint64Map), len(that1.Uint64Map)) + } + for i := range this.Uint64Map { + if this.Uint64Map[i] != that1.Uint64Map[i] { + return fmt.Errorf("Uint64Map this[%v](%v) Not Equal that[%v](%v)", i, this.Uint64Map[i], i, that1.Uint64Map[i]) + } + } + if len(this.Sint32Map) != len(that1.Sint32Map) { + return fmt.Errorf("Sint32Map this(%v) Not Equal that(%v)", len(this.Sint32Map), len(that1.Sint32Map)) + } + for i := range this.Sint32Map { + if this.Sint32Map[i] != that1.Sint32Map[i] { + return fmt.Errorf("Sint32Map this[%v](%v) Not Equal that[%v](%v)", i, this.Sint32Map[i], i, that1.Sint32Map[i]) + } + } + if len(this.Sint64Map) != len(that1.Sint64Map) { + return fmt.Errorf("Sint64Map this(%v) Not Equal that(%v)", len(this.Sint64Map), len(that1.Sint64Map)) + } + for i := range this.Sint64Map { + if this.Sint64Map[i] != that1.Sint64Map[i] { + return fmt.Errorf("Sint64Map this[%v](%v) Not Equal that[%v](%v)", i, this.Sint64Map[i], i, that1.Sint64Map[i]) + } + } + if len(this.Fixed32Map) != len(that1.Fixed32Map) { + return fmt.Errorf("Fixed32Map this(%v) Not Equal that(%v)", len(this.Fixed32Map), len(that1.Fixed32Map)) + } + for i := range this.Fixed32Map { + if this.Fixed32Map[i] != that1.Fixed32Map[i] { + return fmt.Errorf("Fixed32Map this[%v](%v) Not Equal that[%v](%v)", i, this.Fixed32Map[i], i, that1.Fixed32Map[i]) + } + } + if len(this.Sfixed32Map) != len(that1.Sfixed32Map) { + return fmt.Errorf("Sfixed32Map this(%v) Not Equal that(%v)", len(this.Sfixed32Map), len(that1.Sfixed32Map)) + } + for i := range this.Sfixed32Map { + if this.Sfixed32Map[i] != that1.Sfixed32Map[i] { + return fmt.Errorf("Sfixed32Map this[%v](%v) Not Equal that[%v](%v)", i, this.Sfixed32Map[i], i, that1.Sfixed32Map[i]) + } + } + if len(this.Fixed64Map) != len(that1.Fixed64Map) { + return fmt.Errorf("Fixed64Map this(%v) Not Equal that(%v)", len(this.Fixed64Map), len(that1.Fixed64Map)) + } + for i := range this.Fixed64Map { + if this.Fixed64Map[i] != that1.Fixed64Map[i] { + return fmt.Errorf("Fixed64Map this[%v](%v) Not Equal that[%v](%v)", i, this.Fixed64Map[i], i, that1.Fixed64Map[i]) + } + } + if len(this.Sfixed64Map) != len(that1.Sfixed64Map) { + return fmt.Errorf("Sfixed64Map this(%v) Not Equal that(%v)", len(this.Sfixed64Map), len(that1.Sfixed64Map)) + } + for i := range this.Sfixed64Map { + if this.Sfixed64Map[i] != that1.Sfixed64Map[i] { + return fmt.Errorf("Sfixed64Map this[%v](%v) Not Equal that[%v](%v)", i, this.Sfixed64Map[i], i, that1.Sfixed64Map[i]) + } + } + if len(this.BoolMap) != len(that1.BoolMap) { + return fmt.Errorf("BoolMap this(%v) Not Equal that(%v)", len(this.BoolMap), len(that1.BoolMap)) + } + for i := range this.BoolMap { + if this.BoolMap[i] != that1.BoolMap[i] { + return fmt.Errorf("BoolMap this[%v](%v) Not Equal that[%v](%v)", i, this.BoolMap[i], i, that1.BoolMap[i]) + } + } + if len(this.StringMap) != len(that1.StringMap) { + return fmt.Errorf("StringMap this(%v) Not Equal that(%v)", len(this.StringMap), len(that1.StringMap)) + } + for i := range this.StringMap { + if this.StringMap[i] != that1.StringMap[i] { + return fmt.Errorf("StringMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringMap[i], i, that1.StringMap[i]) + } + } + if len(this.StringToBytesMap) != len(that1.StringToBytesMap) { + return fmt.Errorf("StringToBytesMap this(%v) Not Equal that(%v)", len(this.StringToBytesMap), len(that1.StringToBytesMap)) + } + for i := range this.StringToBytesMap { + if !bytes.Equal(this.StringToBytesMap[i], that1.StringToBytesMap[i]) { + return fmt.Errorf("StringToBytesMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringToBytesMap[i], i, that1.StringToBytesMap[i]) + } + } + if len(this.StringToEnumMap) != len(that1.StringToEnumMap) { + return fmt.Errorf("StringToEnumMap this(%v) Not Equal that(%v)", len(this.StringToEnumMap), len(that1.StringToEnumMap)) + } + for i := range this.StringToEnumMap { + if this.StringToEnumMap[i] != that1.StringToEnumMap[i] { + return fmt.Errorf("StringToEnumMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringToEnumMap[i], i, that1.StringToEnumMap[i]) + } + } + if len(this.StringToMsgMap) != len(that1.StringToMsgMap) { + return fmt.Errorf("StringToMsgMap this(%v) Not Equal that(%v)", len(this.StringToMsgMap), len(that1.StringToMsgMap)) + } + for i := range this.StringToMsgMap { + if !this.StringToMsgMap[i].Equal(that1.StringToMsgMap[i]) { + return fmt.Errorf("StringToMsgMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringToMsgMap[i], i, that1.StringToMsgMap[i]) + } + } + return nil +} +func (this *AllMaps) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*AllMaps) + if !ok { + that2, ok := that.(AllMaps) + 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.StringToDoubleMap) != len(that1.StringToDoubleMap) { + return false + } + for i := range this.StringToDoubleMap { + if this.StringToDoubleMap[i] != that1.StringToDoubleMap[i] { + return false + } + } + if len(this.StringToFloatMap) != len(that1.StringToFloatMap) { + return false + } + for i := range this.StringToFloatMap { + if this.StringToFloatMap[i] != that1.StringToFloatMap[i] { + return false + } + } + if len(this.Int32Map) != len(that1.Int32Map) { + return false + } + for i := range this.Int32Map { + if this.Int32Map[i] != that1.Int32Map[i] { + return false + } + } + if len(this.Int64Map) != len(that1.Int64Map) { + return false + } + for i := range this.Int64Map { + if this.Int64Map[i] != that1.Int64Map[i] { + return false + } + } + if len(this.Uint32Map) != len(that1.Uint32Map) { + return false + } + for i := range this.Uint32Map { + if this.Uint32Map[i] != that1.Uint32Map[i] { + return false + } + } + if len(this.Uint64Map) != len(that1.Uint64Map) { + return false + } + for i := range this.Uint64Map { + if this.Uint64Map[i] != that1.Uint64Map[i] { + return false + } + } + if len(this.Sint32Map) != len(that1.Sint32Map) { + return false + } + for i := range this.Sint32Map { + if this.Sint32Map[i] != that1.Sint32Map[i] { + return false + } + } + if len(this.Sint64Map) != len(that1.Sint64Map) { + return false + } + for i := range this.Sint64Map { + if this.Sint64Map[i] != that1.Sint64Map[i] { + return false + } + } + if len(this.Fixed32Map) != len(that1.Fixed32Map) { + return false + } + for i := range this.Fixed32Map { + if this.Fixed32Map[i] != that1.Fixed32Map[i] { + return false + } + } + if len(this.Sfixed32Map) != len(that1.Sfixed32Map) { + return false + } + for i := range this.Sfixed32Map { + if this.Sfixed32Map[i] != that1.Sfixed32Map[i] { + return false + } + } + if len(this.Fixed64Map) != len(that1.Fixed64Map) { + return false + } + for i := range this.Fixed64Map { + if this.Fixed64Map[i] != that1.Fixed64Map[i] { + return false + } + } + if len(this.Sfixed64Map) != len(that1.Sfixed64Map) { + return false + } + for i := range this.Sfixed64Map { + if this.Sfixed64Map[i] != that1.Sfixed64Map[i] { + return false + } + } + if len(this.BoolMap) != len(that1.BoolMap) { + return false + } + for i := range this.BoolMap { + if this.BoolMap[i] != that1.BoolMap[i] { + return false + } + } + if len(this.StringMap) != len(that1.StringMap) { + return false + } + for i := range this.StringMap { + if this.StringMap[i] != that1.StringMap[i] { + return false + } + } + if len(this.StringToBytesMap) != len(that1.StringToBytesMap) { + return false + } + for i := range this.StringToBytesMap { + if !bytes.Equal(this.StringToBytesMap[i], that1.StringToBytesMap[i]) { + return false + } + } + if len(this.StringToEnumMap) != len(that1.StringToEnumMap) { + return false + } + for i := range this.StringToEnumMap { + if this.StringToEnumMap[i] != that1.StringToEnumMap[i] { + return false + } + } + if len(this.StringToMsgMap) != len(that1.StringToMsgMap) { + return false + } + for i := range this.StringToMsgMap { + if !this.StringToMsgMap[i].Equal(that1.StringToMsgMap[i]) { + return false + } + } + return true +} +func (this *AllMapsOrdered) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*AllMapsOrdered) + if !ok { + that2, ok := that.(AllMapsOrdered) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *AllMapsOrdered") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *AllMapsOrdered but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *AllMapsOrdered but is not nil && this == nil") + } + if len(this.StringToDoubleMap) != len(that1.StringToDoubleMap) { + return fmt.Errorf("StringToDoubleMap this(%v) Not Equal that(%v)", len(this.StringToDoubleMap), len(that1.StringToDoubleMap)) + } + for i := range this.StringToDoubleMap { + if this.StringToDoubleMap[i] != that1.StringToDoubleMap[i] { + return fmt.Errorf("StringToDoubleMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringToDoubleMap[i], i, that1.StringToDoubleMap[i]) + } + } + if len(this.StringToFloatMap) != len(that1.StringToFloatMap) { + return fmt.Errorf("StringToFloatMap this(%v) Not Equal that(%v)", len(this.StringToFloatMap), len(that1.StringToFloatMap)) + } + for i := range this.StringToFloatMap { + if this.StringToFloatMap[i] != that1.StringToFloatMap[i] { + return fmt.Errorf("StringToFloatMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringToFloatMap[i], i, that1.StringToFloatMap[i]) + } + } + if len(this.Int32Map) != len(that1.Int32Map) { + return fmt.Errorf("Int32Map this(%v) Not Equal that(%v)", len(this.Int32Map), len(that1.Int32Map)) + } + for i := range this.Int32Map { + if this.Int32Map[i] != that1.Int32Map[i] { + return fmt.Errorf("Int32Map this[%v](%v) Not Equal that[%v](%v)", i, this.Int32Map[i], i, that1.Int32Map[i]) + } + } + if len(this.Int64Map) != len(that1.Int64Map) { + return fmt.Errorf("Int64Map this(%v) Not Equal that(%v)", len(this.Int64Map), len(that1.Int64Map)) + } + for i := range this.Int64Map { + if this.Int64Map[i] != that1.Int64Map[i] { + return fmt.Errorf("Int64Map this[%v](%v) Not Equal that[%v](%v)", i, this.Int64Map[i], i, that1.Int64Map[i]) + } + } + if len(this.Uint32Map) != len(that1.Uint32Map) { + return fmt.Errorf("Uint32Map this(%v) Not Equal that(%v)", len(this.Uint32Map), len(that1.Uint32Map)) + } + for i := range this.Uint32Map { + if this.Uint32Map[i] != that1.Uint32Map[i] { + return fmt.Errorf("Uint32Map this[%v](%v) Not Equal that[%v](%v)", i, this.Uint32Map[i], i, that1.Uint32Map[i]) + } + } + if len(this.Uint64Map) != len(that1.Uint64Map) { + return fmt.Errorf("Uint64Map this(%v) Not Equal that(%v)", len(this.Uint64Map), len(that1.Uint64Map)) + } + for i := range this.Uint64Map { + if this.Uint64Map[i] != that1.Uint64Map[i] { + return fmt.Errorf("Uint64Map this[%v](%v) Not Equal that[%v](%v)", i, this.Uint64Map[i], i, that1.Uint64Map[i]) + } + } + if len(this.Sint32Map) != len(that1.Sint32Map) { + return fmt.Errorf("Sint32Map this(%v) Not Equal that(%v)", len(this.Sint32Map), len(that1.Sint32Map)) + } + for i := range this.Sint32Map { + if this.Sint32Map[i] != that1.Sint32Map[i] { + return fmt.Errorf("Sint32Map this[%v](%v) Not Equal that[%v](%v)", i, this.Sint32Map[i], i, that1.Sint32Map[i]) + } + } + if len(this.Sint64Map) != len(that1.Sint64Map) { + return fmt.Errorf("Sint64Map this(%v) Not Equal that(%v)", len(this.Sint64Map), len(that1.Sint64Map)) + } + for i := range this.Sint64Map { + if this.Sint64Map[i] != that1.Sint64Map[i] { + return fmt.Errorf("Sint64Map this[%v](%v) Not Equal that[%v](%v)", i, this.Sint64Map[i], i, that1.Sint64Map[i]) + } + } + if len(this.Fixed32Map) != len(that1.Fixed32Map) { + return fmt.Errorf("Fixed32Map this(%v) Not Equal that(%v)", len(this.Fixed32Map), len(that1.Fixed32Map)) + } + for i := range this.Fixed32Map { + if this.Fixed32Map[i] != that1.Fixed32Map[i] { + return fmt.Errorf("Fixed32Map this[%v](%v) Not Equal that[%v](%v)", i, this.Fixed32Map[i], i, that1.Fixed32Map[i]) + } + } + if len(this.Sfixed32Map) != len(that1.Sfixed32Map) { + return fmt.Errorf("Sfixed32Map this(%v) Not Equal that(%v)", len(this.Sfixed32Map), len(that1.Sfixed32Map)) + } + for i := range this.Sfixed32Map { + if this.Sfixed32Map[i] != that1.Sfixed32Map[i] { + return fmt.Errorf("Sfixed32Map this[%v](%v) Not Equal that[%v](%v)", i, this.Sfixed32Map[i], i, that1.Sfixed32Map[i]) + } + } + if len(this.Fixed64Map) != len(that1.Fixed64Map) { + return fmt.Errorf("Fixed64Map this(%v) Not Equal that(%v)", len(this.Fixed64Map), len(that1.Fixed64Map)) + } + for i := range this.Fixed64Map { + if this.Fixed64Map[i] != that1.Fixed64Map[i] { + return fmt.Errorf("Fixed64Map this[%v](%v) Not Equal that[%v](%v)", i, this.Fixed64Map[i], i, that1.Fixed64Map[i]) + } + } + if len(this.Sfixed64Map) != len(that1.Sfixed64Map) { + return fmt.Errorf("Sfixed64Map this(%v) Not Equal that(%v)", len(this.Sfixed64Map), len(that1.Sfixed64Map)) + } + for i := range this.Sfixed64Map { + if this.Sfixed64Map[i] != that1.Sfixed64Map[i] { + return fmt.Errorf("Sfixed64Map this[%v](%v) Not Equal that[%v](%v)", i, this.Sfixed64Map[i], i, that1.Sfixed64Map[i]) + } + } + if len(this.BoolMap) != len(that1.BoolMap) { + return fmt.Errorf("BoolMap this(%v) Not Equal that(%v)", len(this.BoolMap), len(that1.BoolMap)) + } + for i := range this.BoolMap { + if this.BoolMap[i] != that1.BoolMap[i] { + return fmt.Errorf("BoolMap this[%v](%v) Not Equal that[%v](%v)", i, this.BoolMap[i], i, that1.BoolMap[i]) + } + } + if len(this.StringMap) != len(that1.StringMap) { + return fmt.Errorf("StringMap this(%v) Not Equal that(%v)", len(this.StringMap), len(that1.StringMap)) + } + for i := range this.StringMap { + if this.StringMap[i] != that1.StringMap[i] { + return fmt.Errorf("StringMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringMap[i], i, that1.StringMap[i]) + } + } + if len(this.StringToBytesMap) != len(that1.StringToBytesMap) { + return fmt.Errorf("StringToBytesMap this(%v) Not Equal that(%v)", len(this.StringToBytesMap), len(that1.StringToBytesMap)) + } + for i := range this.StringToBytesMap { + if !bytes.Equal(this.StringToBytesMap[i], that1.StringToBytesMap[i]) { + return fmt.Errorf("StringToBytesMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringToBytesMap[i], i, that1.StringToBytesMap[i]) + } + } + if len(this.StringToEnumMap) != len(that1.StringToEnumMap) { + return fmt.Errorf("StringToEnumMap this(%v) Not Equal that(%v)", len(this.StringToEnumMap), len(that1.StringToEnumMap)) + } + for i := range this.StringToEnumMap { + if this.StringToEnumMap[i] != that1.StringToEnumMap[i] { + return fmt.Errorf("StringToEnumMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringToEnumMap[i], i, that1.StringToEnumMap[i]) + } + } + if len(this.StringToMsgMap) != len(that1.StringToMsgMap) { + return fmt.Errorf("StringToMsgMap this(%v) Not Equal that(%v)", len(this.StringToMsgMap), len(that1.StringToMsgMap)) + } + for i := range this.StringToMsgMap { + if !this.StringToMsgMap[i].Equal(that1.StringToMsgMap[i]) { + return fmt.Errorf("StringToMsgMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringToMsgMap[i], i, that1.StringToMsgMap[i]) + } + } + return nil +} +func (this *AllMapsOrdered) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*AllMapsOrdered) + if !ok { + that2, ok := that.(AllMapsOrdered) + 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.StringToDoubleMap) != len(that1.StringToDoubleMap) { + return false + } + for i := range this.StringToDoubleMap { + if this.StringToDoubleMap[i] != that1.StringToDoubleMap[i] { + return false + } + } + if len(this.StringToFloatMap) != len(that1.StringToFloatMap) { + return false + } + for i := range this.StringToFloatMap { + if this.StringToFloatMap[i] != that1.StringToFloatMap[i] { + return false + } + } + if len(this.Int32Map) != len(that1.Int32Map) { + return false + } + for i := range this.Int32Map { + if this.Int32Map[i] != that1.Int32Map[i] { + return false + } + } + if len(this.Int64Map) != len(that1.Int64Map) { + return false + } + for i := range this.Int64Map { + if this.Int64Map[i] != that1.Int64Map[i] { + return false + } + } + if len(this.Uint32Map) != len(that1.Uint32Map) { + return false + } + for i := range this.Uint32Map { + if this.Uint32Map[i] != that1.Uint32Map[i] { + return false + } + } + if len(this.Uint64Map) != len(that1.Uint64Map) { + return false + } + for i := range this.Uint64Map { + if this.Uint64Map[i] != that1.Uint64Map[i] { + return false + } + } + if len(this.Sint32Map) != len(that1.Sint32Map) { + return false + } + for i := range this.Sint32Map { + if this.Sint32Map[i] != that1.Sint32Map[i] { + return false + } + } + if len(this.Sint64Map) != len(that1.Sint64Map) { + return false + } + for i := range this.Sint64Map { + if this.Sint64Map[i] != that1.Sint64Map[i] { + return false + } + } + if len(this.Fixed32Map) != len(that1.Fixed32Map) { + return false + } + for i := range this.Fixed32Map { + if this.Fixed32Map[i] != that1.Fixed32Map[i] { + return false + } + } + if len(this.Sfixed32Map) != len(that1.Sfixed32Map) { + return false + } + for i := range this.Sfixed32Map { + if this.Sfixed32Map[i] != that1.Sfixed32Map[i] { + return false + } + } + if len(this.Fixed64Map) != len(that1.Fixed64Map) { + return false + } + for i := range this.Fixed64Map { + if this.Fixed64Map[i] != that1.Fixed64Map[i] { + return false + } + } + if len(this.Sfixed64Map) != len(that1.Sfixed64Map) { + return false + } + for i := range this.Sfixed64Map { + if this.Sfixed64Map[i] != that1.Sfixed64Map[i] { + return false + } + } + if len(this.BoolMap) != len(that1.BoolMap) { + return false + } + for i := range this.BoolMap { + if this.BoolMap[i] != that1.BoolMap[i] { + return false + } + } + if len(this.StringMap) != len(that1.StringMap) { + return false + } + for i := range this.StringMap { + if this.StringMap[i] != that1.StringMap[i] { + return false + } + } + if len(this.StringToBytesMap) != len(that1.StringToBytesMap) { + return false + } + for i := range this.StringToBytesMap { + if !bytes.Equal(this.StringToBytesMap[i], that1.StringToBytesMap[i]) { + return false + } + } + if len(this.StringToEnumMap) != len(that1.StringToEnumMap) { + return false + } + for i := range this.StringToEnumMap { + if this.StringToEnumMap[i] != that1.StringToEnumMap[i] { + return false + } + } + if len(this.StringToMsgMap) != len(that1.StringToMsgMap) { + return false + } + for i := range this.StringToMsgMap { + if !this.StringToMsgMap[i].Equal(that1.StringToMsgMap[i]) { + return false + } + } + return true +} +func (this *MessageWithMap) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*MessageWithMap) + if !ok { + that2, ok := that.(MessageWithMap) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *MessageWithMap") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *MessageWithMap but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *MessageWithMap but is not nil && this == nil") + } + if len(this.NameMapping) != len(that1.NameMapping) { + return fmt.Errorf("NameMapping this(%v) Not Equal that(%v)", len(this.NameMapping), len(that1.NameMapping)) + } + for i := range this.NameMapping { + if this.NameMapping[i] != that1.NameMapping[i] { + return fmt.Errorf("NameMapping this[%v](%v) Not Equal that[%v](%v)", i, this.NameMapping[i], i, that1.NameMapping[i]) + } + } + if len(this.MsgMapping) != len(that1.MsgMapping) { + return fmt.Errorf("MsgMapping this(%v) Not Equal that(%v)", len(this.MsgMapping), len(that1.MsgMapping)) + } + for i := range this.MsgMapping { + if !this.MsgMapping[i].Equal(that1.MsgMapping[i]) { + return fmt.Errorf("MsgMapping this[%v](%v) Not Equal that[%v](%v)", i, this.MsgMapping[i], i, that1.MsgMapping[i]) + } + } + if len(this.ByteMapping) != len(that1.ByteMapping) { + return fmt.Errorf("ByteMapping this(%v) Not Equal that(%v)", len(this.ByteMapping), len(that1.ByteMapping)) + } + for i := range this.ByteMapping { + if !bytes.Equal(this.ByteMapping[i], that1.ByteMapping[i]) { + return fmt.Errorf("ByteMapping this[%v](%v) Not Equal that[%v](%v)", i, this.ByteMapping[i], i, that1.ByteMapping[i]) + } + } + return nil +} +func (this *MessageWithMap) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*MessageWithMap) + if !ok { + that2, ok := that.(MessageWithMap) + 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.NameMapping) != len(that1.NameMapping) { + return false + } + for i := range this.NameMapping { + if this.NameMapping[i] != that1.NameMapping[i] { + return false + } + } + if len(this.MsgMapping) != len(that1.MsgMapping) { + return false + } + for i := range this.MsgMapping { + if !this.MsgMapping[i].Equal(that1.MsgMapping[i]) { + return false + } + } + if len(this.ByteMapping) != len(that1.ByteMapping) { + return false + } + for i := range this.ByteMapping { + if !bytes.Equal(this.ByteMapping[i], that1.ByteMapping[i]) { + return false + } + } + return true +} +func (this *FloatingPoint) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*FloatingPoint) + if !ok { + that2, ok := that.(FloatingPoint) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *FloatingPoint") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *FloatingPoint but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *FloatingPoint but is not nil && this == nil") + } + if this.F != that1.F { + return fmt.Errorf("F this(%v) Not Equal that(%v)", this.F, that1.F) + } + return nil +} +func (this *FloatingPoint) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*FloatingPoint) + if !ok { + that2, ok := that.(FloatingPoint) + 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.F != that1.F { + return false + } + return true +} +func (this *Uint128Pair) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*Uint128Pair) + if !ok { + that2, ok := that.(Uint128Pair) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *Uint128Pair") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *Uint128Pair but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *Uint128Pair but is not nil && this == nil") + } + if !this.Left.Equal(that1.Left) { + return fmt.Errorf("Left this(%v) Not Equal that(%v)", this.Left, that1.Left) + } + if that1.Right == nil { + if this.Right != nil { + return fmt.Errorf("this.Right != nil && that1.Right == nil") + } + } else if !this.Right.Equal(*that1.Right) { + return fmt.Errorf("Right this(%v) Not Equal that(%v)", this.Right, that1.Right) + } + return nil +} +func (this *Uint128Pair) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*Uint128Pair) + if !ok { + that2, ok := that.(Uint128Pair) + 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.Left.Equal(that1.Left) { + return false + } + if that1.Right == nil { + if this.Right != nil { + return false + } + } else if !this.Right.Equal(*that1.Right) { + return false + } + return true +} +func (this *ContainsNestedMap) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*ContainsNestedMap) + if !ok { + that2, ok := that.(ContainsNestedMap) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *ContainsNestedMap") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *ContainsNestedMap but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *ContainsNestedMap but is not nil && this == nil") + } + return nil +} +func (this *ContainsNestedMap) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*ContainsNestedMap) + if !ok { + that2, ok := that.(ContainsNestedMap) + 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 *ContainsNestedMap_NestedMap) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*ContainsNestedMap_NestedMap) + if !ok { + that2, ok := that.(ContainsNestedMap_NestedMap) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *ContainsNestedMap_NestedMap") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *ContainsNestedMap_NestedMap but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *ContainsNestedMap_NestedMap but is not nil && this == nil") + } + if len(this.NestedMapField) != len(that1.NestedMapField) { + return fmt.Errorf("NestedMapField this(%v) Not Equal that(%v)", len(this.NestedMapField), len(that1.NestedMapField)) + } + for i := range this.NestedMapField { + if this.NestedMapField[i] != that1.NestedMapField[i] { + return fmt.Errorf("NestedMapField this[%v](%v) Not Equal that[%v](%v)", i, this.NestedMapField[i], i, that1.NestedMapField[i]) + } + } + return nil +} +func (this *ContainsNestedMap_NestedMap) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*ContainsNestedMap_NestedMap) + if !ok { + that2, ok := that.(ContainsNestedMap_NestedMap) + 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.NestedMapField) != len(that1.NestedMapField) { + return false + } + for i := range this.NestedMapField { + if this.NestedMapField[i] != that1.NestedMapField[i] { + return false + } + } + return true +} + +type MessageFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetName() string + GetHilarity() Message_Humour + GetHeightInCm() uint32 + GetData() []byte + GetResultCount() int64 + GetTrueScotsman() bool + GetScore() float32 + GetKey() []uint64 + GetNested() *Nested + GetTerrain() map[int64]*Nested + GetProto2Field() *test.NinOptNative + GetProto2Value() map[int64]*test.NinOptEnum +} + +func (this *Message) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *Message) TestProto() github_com_gogo_protobuf_proto.Message { + return NewMessageFromFace(this) +} + +func (this *Message) GetName() string { + return this.Name +} + +func (this *Message) GetHilarity() Message_Humour { + return this.Hilarity +} + +func (this *Message) GetHeightInCm() uint32 { + return this.HeightInCm +} + +func (this *Message) GetData() []byte { + return this.Data +} + +func (this *Message) GetResultCount() int64 { + return this.ResultCount +} + +func (this *Message) GetTrueScotsman() bool { + return this.TrueScotsman +} + +func (this *Message) GetScore() float32 { + return this.Score +} + +func (this *Message) GetKey() []uint64 { + return this.Key +} + +func (this *Message) GetNested() *Nested { + return this.Nested +} + +func (this *Message) GetTerrain() map[int64]*Nested { + return this.Terrain +} + +func (this *Message) GetProto2Field() *test.NinOptNative { + return this.Proto2Field +} + +func (this *Message) GetProto2Value() map[int64]*test.NinOptEnum { + return this.Proto2Value +} + +func NewMessageFromFace(that MessageFace) *Message { + this := &Message{} + this.Name = that.GetName() + this.Hilarity = that.GetHilarity() + this.HeightInCm = that.GetHeightInCm() + this.Data = that.GetData() + this.ResultCount = that.GetResultCount() + this.TrueScotsman = that.GetTrueScotsman() + this.Score = that.GetScore() + this.Key = that.GetKey() + this.Nested = that.GetNested() + this.Terrain = that.GetTerrain() + this.Proto2Field = that.GetProto2Field() + this.Proto2Value = that.GetProto2Value() + return this +} + +type NestedFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetBunny() string +} + +func (this *Nested) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *Nested) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNestedFromFace(this) +} + +func (this *Nested) GetBunny() string { + return this.Bunny +} + +func NewNestedFromFace(that NestedFace) *Nested { + this := &Nested{} + this.Bunny = that.GetBunny() + return this +} + +type AllMapsFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetStringToDoubleMap() map[string]float64 + GetStringToFloatMap() map[string]float32 + GetInt32Map() map[int32]int32 + GetInt64Map() map[int64]int64 + GetUint32Map() map[uint32]uint32 + GetUint64Map() map[uint64]uint64 + GetSint32Map() map[int32]int32 + GetSint64Map() map[int64]int64 + GetFixed32Map() map[uint32]uint32 + GetSfixed32Map() map[int32]int32 + GetFixed64Map() map[uint64]uint64 + GetSfixed64Map() map[int64]int64 + GetBoolMap() map[bool]bool + GetStringMap() map[string]string + GetStringToBytesMap() map[string][]byte + GetStringToEnumMap() map[string]MapEnum + GetStringToMsgMap() map[string]*FloatingPoint +} + +func (this *AllMaps) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *AllMaps) TestProto() github_com_gogo_protobuf_proto.Message { + return NewAllMapsFromFace(this) +} + +func (this *AllMaps) GetStringToDoubleMap() map[string]float64 { + return this.StringToDoubleMap +} + +func (this *AllMaps) GetStringToFloatMap() map[string]float32 { + return this.StringToFloatMap +} + +func (this *AllMaps) GetInt32Map() map[int32]int32 { + return this.Int32Map +} + +func (this *AllMaps) GetInt64Map() map[int64]int64 { + return this.Int64Map +} + +func (this *AllMaps) GetUint32Map() map[uint32]uint32 { + return this.Uint32Map +} + +func (this *AllMaps) GetUint64Map() map[uint64]uint64 { + return this.Uint64Map +} + +func (this *AllMaps) GetSint32Map() map[int32]int32 { + return this.Sint32Map +} + +func (this *AllMaps) GetSint64Map() map[int64]int64 { + return this.Sint64Map +} + +func (this *AllMaps) GetFixed32Map() map[uint32]uint32 { + return this.Fixed32Map +} + +func (this *AllMaps) GetSfixed32Map() map[int32]int32 { + return this.Sfixed32Map +} + +func (this *AllMaps) GetFixed64Map() map[uint64]uint64 { + return this.Fixed64Map +} + +func (this *AllMaps) GetSfixed64Map() map[int64]int64 { + return this.Sfixed64Map +} + +func (this *AllMaps) GetBoolMap() map[bool]bool { + return this.BoolMap +} + +func (this *AllMaps) GetStringMap() map[string]string { + return this.StringMap +} + +func (this *AllMaps) GetStringToBytesMap() map[string][]byte { + return this.StringToBytesMap +} + +func (this *AllMaps) GetStringToEnumMap() map[string]MapEnum { + return this.StringToEnumMap +} + +func (this *AllMaps) GetStringToMsgMap() map[string]*FloatingPoint { + return this.StringToMsgMap +} + +func NewAllMapsFromFace(that AllMapsFace) *AllMaps { + this := &AllMaps{} + this.StringToDoubleMap = that.GetStringToDoubleMap() + this.StringToFloatMap = that.GetStringToFloatMap() + this.Int32Map = that.GetInt32Map() + this.Int64Map = that.GetInt64Map() + this.Uint32Map = that.GetUint32Map() + this.Uint64Map = that.GetUint64Map() + this.Sint32Map = that.GetSint32Map() + this.Sint64Map = that.GetSint64Map() + this.Fixed32Map = that.GetFixed32Map() + this.Sfixed32Map = that.GetSfixed32Map() + this.Fixed64Map = that.GetFixed64Map() + this.Sfixed64Map = that.GetSfixed64Map() + this.BoolMap = that.GetBoolMap() + this.StringMap = that.GetStringMap() + this.StringToBytesMap = that.GetStringToBytesMap() + this.StringToEnumMap = that.GetStringToEnumMap() + this.StringToMsgMap = that.GetStringToMsgMap() + return this +} + +type AllMapsOrderedFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetStringToDoubleMap() map[string]float64 + GetStringToFloatMap() map[string]float32 + GetInt32Map() map[int32]int32 + GetInt64Map() map[int64]int64 + GetUint32Map() map[uint32]uint32 + GetUint64Map() map[uint64]uint64 + GetSint32Map() map[int32]int32 + GetSint64Map() map[int64]int64 + GetFixed32Map() map[uint32]uint32 + GetSfixed32Map() map[int32]int32 + GetFixed64Map() map[uint64]uint64 + GetSfixed64Map() map[int64]int64 + GetBoolMap() map[bool]bool + GetStringMap() map[string]string + GetStringToBytesMap() map[string][]byte + GetStringToEnumMap() map[string]MapEnum + GetStringToMsgMap() map[string]*FloatingPoint +} + +func (this *AllMapsOrdered) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *AllMapsOrdered) TestProto() github_com_gogo_protobuf_proto.Message { + return NewAllMapsOrderedFromFace(this) +} + +func (this *AllMapsOrdered) GetStringToDoubleMap() map[string]float64 { + return this.StringToDoubleMap +} + +func (this *AllMapsOrdered) GetStringToFloatMap() map[string]float32 { + return this.StringToFloatMap +} + +func (this *AllMapsOrdered) GetInt32Map() map[int32]int32 { + return this.Int32Map +} + +func (this *AllMapsOrdered) GetInt64Map() map[int64]int64 { + return this.Int64Map +} + +func (this *AllMapsOrdered) GetUint32Map() map[uint32]uint32 { + return this.Uint32Map +} + +func (this *AllMapsOrdered) GetUint64Map() map[uint64]uint64 { + return this.Uint64Map +} + +func (this *AllMapsOrdered) GetSint32Map() map[int32]int32 { + return this.Sint32Map +} + +func (this *AllMapsOrdered) GetSint64Map() map[int64]int64 { + return this.Sint64Map +} + +func (this *AllMapsOrdered) GetFixed32Map() map[uint32]uint32 { + return this.Fixed32Map +} + +func (this *AllMapsOrdered) GetSfixed32Map() map[int32]int32 { + return this.Sfixed32Map +} + +func (this *AllMapsOrdered) GetFixed64Map() map[uint64]uint64 { + return this.Fixed64Map +} + +func (this *AllMapsOrdered) GetSfixed64Map() map[int64]int64 { + return this.Sfixed64Map +} + +func (this *AllMapsOrdered) GetBoolMap() map[bool]bool { + return this.BoolMap +} + +func (this *AllMapsOrdered) GetStringMap() map[string]string { + return this.StringMap +} + +func (this *AllMapsOrdered) GetStringToBytesMap() map[string][]byte { + return this.StringToBytesMap +} + +func (this *AllMapsOrdered) GetStringToEnumMap() map[string]MapEnum { + return this.StringToEnumMap +} + +func (this *AllMapsOrdered) GetStringToMsgMap() map[string]*FloatingPoint { + return this.StringToMsgMap +} + +func NewAllMapsOrderedFromFace(that AllMapsOrderedFace) *AllMapsOrdered { + this := &AllMapsOrdered{} + this.StringToDoubleMap = that.GetStringToDoubleMap() + this.StringToFloatMap = that.GetStringToFloatMap() + this.Int32Map = that.GetInt32Map() + this.Int64Map = that.GetInt64Map() + this.Uint32Map = that.GetUint32Map() + this.Uint64Map = that.GetUint64Map() + this.Sint32Map = that.GetSint32Map() + this.Sint64Map = that.GetSint64Map() + this.Fixed32Map = that.GetFixed32Map() + this.Sfixed32Map = that.GetSfixed32Map() + this.Fixed64Map = that.GetFixed64Map() + this.Sfixed64Map = that.GetSfixed64Map() + this.BoolMap = that.GetBoolMap() + this.StringMap = that.GetStringMap() + this.StringToBytesMap = that.GetStringToBytesMap() + this.StringToEnumMap = that.GetStringToEnumMap() + this.StringToMsgMap = that.GetStringToMsgMap() + return this +} + +type MessageWithMapFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetNameMapping() map[int32]string + GetMsgMapping() map[int64]*FloatingPoint + GetByteMapping() map[bool][]byte +} + +func (this *MessageWithMap) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *MessageWithMap) TestProto() github_com_gogo_protobuf_proto.Message { + return NewMessageWithMapFromFace(this) +} + +func (this *MessageWithMap) GetNameMapping() map[int32]string { + return this.NameMapping +} + +func (this *MessageWithMap) GetMsgMapping() map[int64]*FloatingPoint { + return this.MsgMapping +} + +func (this *MessageWithMap) GetByteMapping() map[bool][]byte { + return this.ByteMapping +} + +func NewMessageWithMapFromFace(that MessageWithMapFace) *MessageWithMap { + this := &MessageWithMap{} + this.NameMapping = that.GetNameMapping() + this.MsgMapping = that.GetMsgMapping() + this.ByteMapping = that.GetByteMapping() + return this +} + +type FloatingPointFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetF() float64 +} + +func (this *FloatingPoint) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *FloatingPoint) TestProto() github_com_gogo_protobuf_proto.Message { + return NewFloatingPointFromFace(this) +} + +func (this *FloatingPoint) GetF() float64 { + return this.F +} + +func NewFloatingPointFromFace(that FloatingPointFace) *FloatingPoint { + this := &FloatingPoint{} + this.F = that.GetF() + return this +} + +type Uint128PairFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetLeft() github_com_gogo_protobuf_test_custom.Uint128 + GetRight() *github_com_gogo_protobuf_test_custom.Uint128 +} + +func (this *Uint128Pair) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *Uint128Pair) TestProto() github_com_gogo_protobuf_proto.Message { + return NewUint128PairFromFace(this) +} + +func (this *Uint128Pair) GetLeft() github_com_gogo_protobuf_test_custom.Uint128 { + return this.Left +} + +func (this *Uint128Pair) GetRight() *github_com_gogo_protobuf_test_custom.Uint128 { + return this.Right +} + +func NewUint128PairFromFace(that Uint128PairFace) *Uint128Pair { + this := &Uint128Pair{} + this.Left = that.GetLeft() + this.Right = that.GetRight() + return this +} + +type ContainsNestedMapFace interface { + Proto() github_com_gogo_protobuf_proto.Message +} + +func (this *ContainsNestedMap) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *ContainsNestedMap) TestProto() github_com_gogo_protobuf_proto.Message { + return NewContainsNestedMapFromFace(this) +} + +func NewContainsNestedMapFromFace(that ContainsNestedMapFace) *ContainsNestedMap { + this := &ContainsNestedMap{} + return this +} + +type ContainsNestedMap_NestedMapFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetNestedMapField() map[string]float64 +} + +func (this *ContainsNestedMap_NestedMap) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *ContainsNestedMap_NestedMap) TestProto() github_com_gogo_protobuf_proto.Message { + return NewContainsNestedMap_NestedMapFromFace(this) +} + +func (this *ContainsNestedMap_NestedMap) GetNestedMapField() map[string]float64 { + return this.NestedMapField +} + +func NewContainsNestedMap_NestedMapFromFace(that ContainsNestedMap_NestedMapFace) *ContainsNestedMap_NestedMap { + this := &ContainsNestedMap_NestedMap{} + this.NestedMapField = that.GetNestedMapField() + return this +} + +func (this *Message) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 16) + s = append(s, "&theproto3.Message{") + s = append(s, "Name: "+fmt.Sprintf("%#v", this.Name)+",\n") + s = append(s, "Hilarity: "+fmt.Sprintf("%#v", this.Hilarity)+",\n") + s = append(s, "HeightInCm: "+fmt.Sprintf("%#v", this.HeightInCm)+",\n") + s = append(s, "Data: "+fmt.Sprintf("%#v", this.Data)+",\n") + s = append(s, "ResultCount: "+fmt.Sprintf("%#v", this.ResultCount)+",\n") + s = append(s, "TrueScotsman: "+fmt.Sprintf("%#v", this.TrueScotsman)+",\n") + s = append(s, "Score: "+fmt.Sprintf("%#v", this.Score)+",\n") + s = append(s, "Key: "+fmt.Sprintf("%#v", this.Key)+",\n") + if this.Nested != nil { + s = append(s, "Nested: "+fmt.Sprintf("%#v", this.Nested)+",\n") + } + keysForTerrain := make([]int64, 0, len(this.Terrain)) + for k := range this.Terrain { + keysForTerrain = append(keysForTerrain, k) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForTerrain) + mapStringForTerrain := "map[int64]*Nested{" + for _, k := range keysForTerrain { + mapStringForTerrain += fmt.Sprintf("%#v: %#v,", k, this.Terrain[k]) + } + mapStringForTerrain += "}" + if this.Terrain != nil { + s = append(s, "Terrain: "+mapStringForTerrain+",\n") + } + if this.Proto2Field != nil { + s = append(s, "Proto2Field: "+fmt.Sprintf("%#v", this.Proto2Field)+",\n") + } + keysForProto2Value := make([]int64, 0, len(this.Proto2Value)) + for k := range this.Proto2Value { + keysForProto2Value = append(keysForProto2Value, k) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForProto2Value) + mapStringForProto2Value := "map[int64]*test.NinOptEnum{" + for _, k := range keysForProto2Value { + mapStringForProto2Value += fmt.Sprintf("%#v: %#v,", k, this.Proto2Value[k]) + } + mapStringForProto2Value += "}" + if this.Proto2Value != nil { + s = append(s, "Proto2Value: "+mapStringForProto2Value+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *Nested) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&theproto3.Nested{") + s = append(s, "Bunny: "+fmt.Sprintf("%#v", this.Bunny)+",\n") + s = append(s, "}") + return strings.Join(s, "") +} +func (this *AllMaps) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 21) + s = append(s, "&theproto3.AllMaps{") + keysForStringToDoubleMap := make([]string, 0, len(this.StringToDoubleMap)) + for k := range this.StringToDoubleMap { + keysForStringToDoubleMap = append(keysForStringToDoubleMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToDoubleMap) + mapStringForStringToDoubleMap := "map[string]float64{" + for _, k := range keysForStringToDoubleMap { + mapStringForStringToDoubleMap += fmt.Sprintf("%#v: %#v,", k, this.StringToDoubleMap[k]) + } + mapStringForStringToDoubleMap += "}" + if this.StringToDoubleMap != nil { + s = append(s, "StringToDoubleMap: "+mapStringForStringToDoubleMap+",\n") + } + keysForStringToFloatMap := make([]string, 0, len(this.StringToFloatMap)) + for k := range this.StringToFloatMap { + keysForStringToFloatMap = append(keysForStringToFloatMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToFloatMap) + mapStringForStringToFloatMap := "map[string]float32{" + for _, k := range keysForStringToFloatMap { + mapStringForStringToFloatMap += fmt.Sprintf("%#v: %#v,", k, this.StringToFloatMap[k]) + } + mapStringForStringToFloatMap += "}" + if this.StringToFloatMap != nil { + s = append(s, "StringToFloatMap: "+mapStringForStringToFloatMap+",\n") + } + keysForInt32Map := make([]int32, 0, len(this.Int32Map)) + for k := range this.Int32Map { + keysForInt32Map = append(keysForInt32Map, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForInt32Map) + mapStringForInt32Map := "map[int32]int32{" + for _, k := range keysForInt32Map { + mapStringForInt32Map += fmt.Sprintf("%#v: %#v,", k, this.Int32Map[k]) + } + mapStringForInt32Map += "}" + if this.Int32Map != nil { + s = append(s, "Int32Map: "+mapStringForInt32Map+",\n") + } + keysForInt64Map := make([]int64, 0, len(this.Int64Map)) + for k := range this.Int64Map { + keysForInt64Map = append(keysForInt64Map, k) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForInt64Map) + mapStringForInt64Map := "map[int64]int64{" + for _, k := range keysForInt64Map { + mapStringForInt64Map += fmt.Sprintf("%#v: %#v,", k, this.Int64Map[k]) + } + mapStringForInt64Map += "}" + if this.Int64Map != nil { + s = append(s, "Int64Map: "+mapStringForInt64Map+",\n") + } + keysForUint32Map := make([]uint32, 0, len(this.Uint32Map)) + for k := range this.Uint32Map { + keysForUint32Map = append(keysForUint32Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint32s(keysForUint32Map) + mapStringForUint32Map := "map[uint32]uint32{" + for _, k := range keysForUint32Map { + mapStringForUint32Map += fmt.Sprintf("%#v: %#v,", k, this.Uint32Map[k]) + } + mapStringForUint32Map += "}" + if this.Uint32Map != nil { + s = append(s, "Uint32Map: "+mapStringForUint32Map+",\n") + } + keysForUint64Map := make([]uint64, 0, len(this.Uint64Map)) + for k := range this.Uint64Map { + keysForUint64Map = append(keysForUint64Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint64s(keysForUint64Map) + mapStringForUint64Map := "map[uint64]uint64{" + for _, k := range keysForUint64Map { + mapStringForUint64Map += fmt.Sprintf("%#v: %#v,", k, this.Uint64Map[k]) + } + mapStringForUint64Map += "}" + if this.Uint64Map != nil { + s = append(s, "Uint64Map: "+mapStringForUint64Map+",\n") + } + keysForSint32Map := make([]int32, 0, len(this.Sint32Map)) + for k := range this.Sint32Map { + keysForSint32Map = append(keysForSint32Map, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForSint32Map) + mapStringForSint32Map := "map[int32]int32{" + for _, k := range keysForSint32Map { + mapStringForSint32Map += fmt.Sprintf("%#v: %#v,", k, this.Sint32Map[k]) + } + mapStringForSint32Map += "}" + if this.Sint32Map != nil { + s = append(s, "Sint32Map: "+mapStringForSint32Map+",\n") + } + keysForSint64Map := make([]int64, 0, len(this.Sint64Map)) + for k := range this.Sint64Map { + keysForSint64Map = append(keysForSint64Map, k) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForSint64Map) + mapStringForSint64Map := "map[int64]int64{" + for _, k := range keysForSint64Map { + mapStringForSint64Map += fmt.Sprintf("%#v: %#v,", k, this.Sint64Map[k]) + } + mapStringForSint64Map += "}" + if this.Sint64Map != nil { + s = append(s, "Sint64Map: "+mapStringForSint64Map+",\n") + } + keysForFixed32Map := make([]uint32, 0, len(this.Fixed32Map)) + for k := range this.Fixed32Map { + keysForFixed32Map = append(keysForFixed32Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint32s(keysForFixed32Map) + mapStringForFixed32Map := "map[uint32]uint32{" + for _, k := range keysForFixed32Map { + mapStringForFixed32Map += fmt.Sprintf("%#v: %#v,", k, this.Fixed32Map[k]) + } + mapStringForFixed32Map += "}" + if this.Fixed32Map != nil { + s = append(s, "Fixed32Map: "+mapStringForFixed32Map+",\n") + } + keysForSfixed32Map := make([]int32, 0, len(this.Sfixed32Map)) + for k := range this.Sfixed32Map { + keysForSfixed32Map = append(keysForSfixed32Map, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForSfixed32Map) + mapStringForSfixed32Map := "map[int32]int32{" + for _, k := range keysForSfixed32Map { + mapStringForSfixed32Map += fmt.Sprintf("%#v: %#v,", k, this.Sfixed32Map[k]) + } + mapStringForSfixed32Map += "}" + if this.Sfixed32Map != nil { + s = append(s, "Sfixed32Map: "+mapStringForSfixed32Map+",\n") + } + keysForFixed64Map := make([]uint64, 0, len(this.Fixed64Map)) + for k := range this.Fixed64Map { + keysForFixed64Map = append(keysForFixed64Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint64s(keysForFixed64Map) + mapStringForFixed64Map := "map[uint64]uint64{" + for _, k := range keysForFixed64Map { + mapStringForFixed64Map += fmt.Sprintf("%#v: %#v,", k, this.Fixed64Map[k]) + } + mapStringForFixed64Map += "}" + if this.Fixed64Map != nil { + s = append(s, "Fixed64Map: "+mapStringForFixed64Map+",\n") + } + keysForSfixed64Map := make([]int64, 0, len(this.Sfixed64Map)) + for k := range this.Sfixed64Map { + keysForSfixed64Map = append(keysForSfixed64Map, k) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForSfixed64Map) + mapStringForSfixed64Map := "map[int64]int64{" + for _, k := range keysForSfixed64Map { + mapStringForSfixed64Map += fmt.Sprintf("%#v: %#v,", k, this.Sfixed64Map[k]) + } + mapStringForSfixed64Map += "}" + if this.Sfixed64Map != nil { + s = append(s, "Sfixed64Map: "+mapStringForSfixed64Map+",\n") + } + keysForBoolMap := make([]bool, 0, len(this.BoolMap)) + for k := range this.BoolMap { + keysForBoolMap = append(keysForBoolMap, k) + } + github_com_gogo_protobuf_sortkeys.Bools(keysForBoolMap) + mapStringForBoolMap := "map[bool]bool{" + for _, k := range keysForBoolMap { + mapStringForBoolMap += fmt.Sprintf("%#v: %#v,", k, this.BoolMap[k]) + } + mapStringForBoolMap += "}" + if this.BoolMap != nil { + s = append(s, "BoolMap: "+mapStringForBoolMap+",\n") + } + keysForStringMap := make([]string, 0, len(this.StringMap)) + for k := range this.StringMap { + keysForStringMap = append(keysForStringMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringMap) + mapStringForStringMap := "map[string]string{" + for _, k := range keysForStringMap { + mapStringForStringMap += fmt.Sprintf("%#v: %#v,", k, this.StringMap[k]) + } + mapStringForStringMap += "}" + if this.StringMap != nil { + s = append(s, "StringMap: "+mapStringForStringMap+",\n") + } + keysForStringToBytesMap := make([]string, 0, len(this.StringToBytesMap)) + for k := range this.StringToBytesMap { + keysForStringToBytesMap = append(keysForStringToBytesMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToBytesMap) + mapStringForStringToBytesMap := "map[string][]byte{" + for _, k := range keysForStringToBytesMap { + mapStringForStringToBytesMap += fmt.Sprintf("%#v: %#v,", k, this.StringToBytesMap[k]) + } + mapStringForStringToBytesMap += "}" + if this.StringToBytesMap != nil { + s = append(s, "StringToBytesMap: "+mapStringForStringToBytesMap+",\n") + } + keysForStringToEnumMap := make([]string, 0, len(this.StringToEnumMap)) + for k := range this.StringToEnumMap { + keysForStringToEnumMap = append(keysForStringToEnumMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToEnumMap) + mapStringForStringToEnumMap := "map[string]MapEnum{" + for _, k := range keysForStringToEnumMap { + mapStringForStringToEnumMap += fmt.Sprintf("%#v: %#v,", k, this.StringToEnumMap[k]) + } + mapStringForStringToEnumMap += "}" + if this.StringToEnumMap != nil { + s = append(s, "StringToEnumMap: "+mapStringForStringToEnumMap+",\n") + } + keysForStringToMsgMap := make([]string, 0, len(this.StringToMsgMap)) + for k := range this.StringToMsgMap { + keysForStringToMsgMap = append(keysForStringToMsgMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToMsgMap) + mapStringForStringToMsgMap := "map[string]*FloatingPoint{" + for _, k := range keysForStringToMsgMap { + mapStringForStringToMsgMap += fmt.Sprintf("%#v: %#v,", k, this.StringToMsgMap[k]) + } + mapStringForStringToMsgMap += "}" + if this.StringToMsgMap != nil { + s = append(s, "StringToMsgMap: "+mapStringForStringToMsgMap+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *AllMapsOrdered) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 21) + s = append(s, "&theproto3.AllMapsOrdered{") + keysForStringToDoubleMap := make([]string, 0, len(this.StringToDoubleMap)) + for k := range this.StringToDoubleMap { + keysForStringToDoubleMap = append(keysForStringToDoubleMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToDoubleMap) + mapStringForStringToDoubleMap := "map[string]float64{" + for _, k := range keysForStringToDoubleMap { + mapStringForStringToDoubleMap += fmt.Sprintf("%#v: %#v,", k, this.StringToDoubleMap[k]) + } + mapStringForStringToDoubleMap += "}" + if this.StringToDoubleMap != nil { + s = append(s, "StringToDoubleMap: "+mapStringForStringToDoubleMap+",\n") + } + keysForStringToFloatMap := make([]string, 0, len(this.StringToFloatMap)) + for k := range this.StringToFloatMap { + keysForStringToFloatMap = append(keysForStringToFloatMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToFloatMap) + mapStringForStringToFloatMap := "map[string]float32{" + for _, k := range keysForStringToFloatMap { + mapStringForStringToFloatMap += fmt.Sprintf("%#v: %#v,", k, this.StringToFloatMap[k]) + } + mapStringForStringToFloatMap += "}" + if this.StringToFloatMap != nil { + s = append(s, "StringToFloatMap: "+mapStringForStringToFloatMap+",\n") + } + keysForInt32Map := make([]int32, 0, len(this.Int32Map)) + for k := range this.Int32Map { + keysForInt32Map = append(keysForInt32Map, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForInt32Map) + mapStringForInt32Map := "map[int32]int32{" + for _, k := range keysForInt32Map { + mapStringForInt32Map += fmt.Sprintf("%#v: %#v,", k, this.Int32Map[k]) + } + mapStringForInt32Map += "}" + if this.Int32Map != nil { + s = append(s, "Int32Map: "+mapStringForInt32Map+",\n") + } + keysForInt64Map := make([]int64, 0, len(this.Int64Map)) + for k := range this.Int64Map { + keysForInt64Map = append(keysForInt64Map, k) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForInt64Map) + mapStringForInt64Map := "map[int64]int64{" + for _, k := range keysForInt64Map { + mapStringForInt64Map += fmt.Sprintf("%#v: %#v,", k, this.Int64Map[k]) + } + mapStringForInt64Map += "}" + if this.Int64Map != nil { + s = append(s, "Int64Map: "+mapStringForInt64Map+",\n") + } + keysForUint32Map := make([]uint32, 0, len(this.Uint32Map)) + for k := range this.Uint32Map { + keysForUint32Map = append(keysForUint32Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint32s(keysForUint32Map) + mapStringForUint32Map := "map[uint32]uint32{" + for _, k := range keysForUint32Map { + mapStringForUint32Map += fmt.Sprintf("%#v: %#v,", k, this.Uint32Map[k]) + } + mapStringForUint32Map += "}" + if this.Uint32Map != nil { + s = append(s, "Uint32Map: "+mapStringForUint32Map+",\n") + } + keysForUint64Map := make([]uint64, 0, len(this.Uint64Map)) + for k := range this.Uint64Map { + keysForUint64Map = append(keysForUint64Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint64s(keysForUint64Map) + mapStringForUint64Map := "map[uint64]uint64{" + for _, k := range keysForUint64Map { + mapStringForUint64Map += fmt.Sprintf("%#v: %#v,", k, this.Uint64Map[k]) + } + mapStringForUint64Map += "}" + if this.Uint64Map != nil { + s = append(s, "Uint64Map: "+mapStringForUint64Map+",\n") + } + keysForSint32Map := make([]int32, 0, len(this.Sint32Map)) + for k := range this.Sint32Map { + keysForSint32Map = append(keysForSint32Map, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForSint32Map) + mapStringForSint32Map := "map[int32]int32{" + for _, k := range keysForSint32Map { + mapStringForSint32Map += fmt.Sprintf("%#v: %#v,", k, this.Sint32Map[k]) + } + mapStringForSint32Map += "}" + if this.Sint32Map != nil { + s = append(s, "Sint32Map: "+mapStringForSint32Map+",\n") + } + keysForSint64Map := make([]int64, 0, len(this.Sint64Map)) + for k := range this.Sint64Map { + keysForSint64Map = append(keysForSint64Map, k) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForSint64Map) + mapStringForSint64Map := "map[int64]int64{" + for _, k := range keysForSint64Map { + mapStringForSint64Map += fmt.Sprintf("%#v: %#v,", k, this.Sint64Map[k]) + } + mapStringForSint64Map += "}" + if this.Sint64Map != nil { + s = append(s, "Sint64Map: "+mapStringForSint64Map+",\n") + } + keysForFixed32Map := make([]uint32, 0, len(this.Fixed32Map)) + for k := range this.Fixed32Map { + keysForFixed32Map = append(keysForFixed32Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint32s(keysForFixed32Map) + mapStringForFixed32Map := "map[uint32]uint32{" + for _, k := range keysForFixed32Map { + mapStringForFixed32Map += fmt.Sprintf("%#v: %#v,", k, this.Fixed32Map[k]) + } + mapStringForFixed32Map += "}" + if this.Fixed32Map != nil { + s = append(s, "Fixed32Map: "+mapStringForFixed32Map+",\n") + } + keysForSfixed32Map := make([]int32, 0, len(this.Sfixed32Map)) + for k := range this.Sfixed32Map { + keysForSfixed32Map = append(keysForSfixed32Map, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForSfixed32Map) + mapStringForSfixed32Map := "map[int32]int32{" + for _, k := range keysForSfixed32Map { + mapStringForSfixed32Map += fmt.Sprintf("%#v: %#v,", k, this.Sfixed32Map[k]) + } + mapStringForSfixed32Map += "}" + if this.Sfixed32Map != nil { + s = append(s, "Sfixed32Map: "+mapStringForSfixed32Map+",\n") + } + keysForFixed64Map := make([]uint64, 0, len(this.Fixed64Map)) + for k := range this.Fixed64Map { + keysForFixed64Map = append(keysForFixed64Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint64s(keysForFixed64Map) + mapStringForFixed64Map := "map[uint64]uint64{" + for _, k := range keysForFixed64Map { + mapStringForFixed64Map += fmt.Sprintf("%#v: %#v,", k, this.Fixed64Map[k]) + } + mapStringForFixed64Map += "}" + if this.Fixed64Map != nil { + s = append(s, "Fixed64Map: "+mapStringForFixed64Map+",\n") + } + keysForSfixed64Map := make([]int64, 0, len(this.Sfixed64Map)) + for k := range this.Sfixed64Map { + keysForSfixed64Map = append(keysForSfixed64Map, k) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForSfixed64Map) + mapStringForSfixed64Map := "map[int64]int64{" + for _, k := range keysForSfixed64Map { + mapStringForSfixed64Map += fmt.Sprintf("%#v: %#v,", k, this.Sfixed64Map[k]) + } + mapStringForSfixed64Map += "}" + if this.Sfixed64Map != nil { + s = append(s, "Sfixed64Map: "+mapStringForSfixed64Map+",\n") + } + keysForBoolMap := make([]bool, 0, len(this.BoolMap)) + for k := range this.BoolMap { + keysForBoolMap = append(keysForBoolMap, k) + } + github_com_gogo_protobuf_sortkeys.Bools(keysForBoolMap) + mapStringForBoolMap := "map[bool]bool{" + for _, k := range keysForBoolMap { + mapStringForBoolMap += fmt.Sprintf("%#v: %#v,", k, this.BoolMap[k]) + } + mapStringForBoolMap += "}" + if this.BoolMap != nil { + s = append(s, "BoolMap: "+mapStringForBoolMap+",\n") + } + keysForStringMap := make([]string, 0, len(this.StringMap)) + for k := range this.StringMap { + keysForStringMap = append(keysForStringMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringMap) + mapStringForStringMap := "map[string]string{" + for _, k := range keysForStringMap { + mapStringForStringMap += fmt.Sprintf("%#v: %#v,", k, this.StringMap[k]) + } + mapStringForStringMap += "}" + if this.StringMap != nil { + s = append(s, "StringMap: "+mapStringForStringMap+",\n") + } + keysForStringToBytesMap := make([]string, 0, len(this.StringToBytesMap)) + for k := range this.StringToBytesMap { + keysForStringToBytesMap = append(keysForStringToBytesMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToBytesMap) + mapStringForStringToBytesMap := "map[string][]byte{" + for _, k := range keysForStringToBytesMap { + mapStringForStringToBytesMap += fmt.Sprintf("%#v: %#v,", k, this.StringToBytesMap[k]) + } + mapStringForStringToBytesMap += "}" + if this.StringToBytesMap != nil { + s = append(s, "StringToBytesMap: "+mapStringForStringToBytesMap+",\n") + } + keysForStringToEnumMap := make([]string, 0, len(this.StringToEnumMap)) + for k := range this.StringToEnumMap { + keysForStringToEnumMap = append(keysForStringToEnumMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToEnumMap) + mapStringForStringToEnumMap := "map[string]MapEnum{" + for _, k := range keysForStringToEnumMap { + mapStringForStringToEnumMap += fmt.Sprintf("%#v: %#v,", k, this.StringToEnumMap[k]) + } + mapStringForStringToEnumMap += "}" + if this.StringToEnumMap != nil { + s = append(s, "StringToEnumMap: "+mapStringForStringToEnumMap+",\n") + } + keysForStringToMsgMap := make([]string, 0, len(this.StringToMsgMap)) + for k := range this.StringToMsgMap { + keysForStringToMsgMap = append(keysForStringToMsgMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToMsgMap) + mapStringForStringToMsgMap := "map[string]*FloatingPoint{" + for _, k := range keysForStringToMsgMap { + mapStringForStringToMsgMap += fmt.Sprintf("%#v: %#v,", k, this.StringToMsgMap[k]) + } + mapStringForStringToMsgMap += "}" + if this.StringToMsgMap != nil { + s = append(s, "StringToMsgMap: "+mapStringForStringToMsgMap+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *MessageWithMap) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 7) + s = append(s, "&theproto3.MessageWithMap{") + keysForNameMapping := make([]int32, 0, len(this.NameMapping)) + for k := range this.NameMapping { + keysForNameMapping = append(keysForNameMapping, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForNameMapping) + mapStringForNameMapping := "map[int32]string{" + for _, k := range keysForNameMapping { + mapStringForNameMapping += fmt.Sprintf("%#v: %#v,", k, this.NameMapping[k]) + } + mapStringForNameMapping += "}" + if this.NameMapping != nil { + s = append(s, "NameMapping: "+mapStringForNameMapping+",\n") + } + keysForMsgMapping := make([]int64, 0, len(this.MsgMapping)) + for k := range this.MsgMapping { + keysForMsgMapping = append(keysForMsgMapping, k) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForMsgMapping) + mapStringForMsgMapping := "map[int64]*FloatingPoint{" + for _, k := range keysForMsgMapping { + mapStringForMsgMapping += fmt.Sprintf("%#v: %#v,", k, this.MsgMapping[k]) + } + mapStringForMsgMapping += "}" + if this.MsgMapping != nil { + s = append(s, "MsgMapping: "+mapStringForMsgMapping+",\n") + } + keysForByteMapping := make([]bool, 0, len(this.ByteMapping)) + for k := range this.ByteMapping { + keysForByteMapping = append(keysForByteMapping, k) + } + github_com_gogo_protobuf_sortkeys.Bools(keysForByteMapping) + mapStringForByteMapping := "map[bool][]byte{" + for _, k := range keysForByteMapping { + mapStringForByteMapping += fmt.Sprintf("%#v: %#v,", k, this.ByteMapping[k]) + } + mapStringForByteMapping += "}" + if this.ByteMapping != nil { + s = append(s, "ByteMapping: "+mapStringForByteMapping+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *FloatingPoint) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&theproto3.FloatingPoint{") + s = append(s, "F: "+fmt.Sprintf("%#v", this.F)+",\n") + s = append(s, "}") + return strings.Join(s, "") +} +func (this *Uint128Pair) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 6) + s = append(s, "&theproto3.Uint128Pair{") + s = append(s, "Left: "+fmt.Sprintf("%#v", this.Left)+",\n") + s = append(s, "Right: "+fmt.Sprintf("%#v", this.Right)+",\n") + s = append(s, "}") + return strings.Join(s, "") +} +func (this *ContainsNestedMap) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 4) + s = append(s, "&theproto3.ContainsNestedMap{") + s = append(s, "}") + return strings.Join(s, "") +} +func (this *ContainsNestedMap_NestedMap) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&theproto3.ContainsNestedMap_NestedMap{") + keysForNestedMapField := make([]string, 0, len(this.NestedMapField)) + for k := range this.NestedMapField { + keysForNestedMapField = append(keysForNestedMapField, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForNestedMapField) + mapStringForNestedMapField := "map[string]float64{" + for _, k := range keysForNestedMapField { + mapStringForNestedMapField += fmt.Sprintf("%#v: %#v,", k, this.NestedMapField[k]) + } + mapStringForNestedMapField += "}" + if this.NestedMapField != nil { + s = append(s, "NestedMapField: "+mapStringForNestedMapField+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func valueToGoStringTheproto3(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 extensionToGoStringTheproto3(e map[int32]github_com_gogo_protobuf_proto.Extension) string { + if e == nil { + return "nil" + } + s := "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 +} +func NewPopulatedMessage(r randyTheproto3, easy bool) *Message { + this := &Message{} + this.Name = randStringTheproto3(r) + this.Hilarity = Message_Humour([]int32{0, 1, 2, 3}[r.Intn(4)]) + this.HeightInCm = uint32(r.Uint32()) + v1 := r.Intn(100) + this.Data = make([]byte, v1) + for i := 0; i < v1; i++ { + this.Data[i] = byte(r.Intn(256)) + } + this.ResultCount = int64(r.Int63()) + if r.Intn(2) == 0 { + this.ResultCount *= -1 + } + this.TrueScotsman = bool(bool(r.Intn(2) == 0)) + this.Score = float32(r.Float32()) + if r.Intn(2) == 0 { + this.Score *= -1 + } + v2 := r.Intn(10) + this.Key = make([]uint64, v2) + for i := 0; i < v2; i++ { + this.Key[i] = uint64(uint64(r.Uint32())) + } + if r.Intn(10) != 0 { + this.Nested = NewPopulatedNested(r, easy) + } + if r.Intn(10) != 0 { + v3 := r.Intn(10) + this.Terrain = make(map[int64]*Nested) + for i := 0; i < v3; i++ { + this.Terrain[int64(r.Int63())] = NewPopulatedNested(r, easy) + } + } + if r.Intn(10) != 0 { + this.Proto2Field = test.NewPopulatedNinOptNative(r, easy) + } + if r.Intn(10) != 0 { + v4 := r.Intn(10) + this.Proto2Value = make(map[int64]*test.NinOptEnum) + for i := 0; i < v4; i++ { + this.Proto2Value[int64(r.Int63())] = test.NewPopulatedNinOptEnum(r, easy) + } + } + if !easy && r.Intn(10) != 0 { + } + return this +} + +func NewPopulatedNested(r randyTheproto3, easy bool) *Nested { + this := &Nested{} + this.Bunny = randStringTheproto3(r) + if !easy && r.Intn(10) != 0 { + } + return this +} + +func NewPopulatedAllMaps(r randyTheproto3, easy bool) *AllMaps { + this := &AllMaps{} + if r.Intn(10) != 0 { + v5 := r.Intn(10) + this.StringToDoubleMap = make(map[string]float64) + for i := 0; i < v5; i++ { + v6 := randStringTheproto3(r) + this.StringToDoubleMap[v6] = float64(r.Float64()) + if r.Intn(2) == 0 { + this.StringToDoubleMap[v6] *= -1 + } + } + } + if r.Intn(10) != 0 { + v7 := r.Intn(10) + this.StringToFloatMap = make(map[string]float32) + for i := 0; i < v7; i++ { + v8 := randStringTheproto3(r) + this.StringToFloatMap[v8] = float32(r.Float32()) + if r.Intn(2) == 0 { + this.StringToFloatMap[v8] *= -1 + } + } + } + if r.Intn(10) != 0 { + v9 := r.Intn(10) + this.Int32Map = make(map[int32]int32) + for i := 0; i < v9; i++ { + v10 := int32(r.Int31()) + this.Int32Map[v10] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Int32Map[v10] *= -1 + } + } + } + if r.Intn(10) != 0 { + v11 := r.Intn(10) + this.Int64Map = make(map[int64]int64) + for i := 0; i < v11; i++ { + v12 := int64(r.Int63()) + this.Int64Map[v12] = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Int64Map[v12] *= -1 + } + } + } + if r.Intn(10) != 0 { + v13 := r.Intn(10) + this.Uint32Map = make(map[uint32]uint32) + for i := 0; i < v13; i++ { + v14 := uint32(r.Uint32()) + this.Uint32Map[v14] = uint32(r.Uint32()) + } + } + if r.Intn(10) != 0 { + v15 := r.Intn(10) + this.Uint64Map = make(map[uint64]uint64) + for i := 0; i < v15; i++ { + v16 := uint64(uint64(r.Uint32())) + this.Uint64Map[v16] = uint64(uint64(r.Uint32())) + } + } + if r.Intn(10) != 0 { + v17 := r.Intn(10) + this.Sint32Map = make(map[int32]int32) + for i := 0; i < v17; i++ { + v18 := int32(r.Int31()) + this.Sint32Map[v18] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Sint32Map[v18] *= -1 + } + } + } + if r.Intn(10) != 0 { + v19 := r.Intn(10) + this.Sint64Map = make(map[int64]int64) + for i := 0; i < v19; i++ { + v20 := int64(r.Int63()) + this.Sint64Map[v20] = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Sint64Map[v20] *= -1 + } + } + } + if r.Intn(10) != 0 { + v21 := r.Intn(10) + this.Fixed32Map = make(map[uint32]uint32) + for i := 0; i < v21; i++ { + v22 := uint32(r.Uint32()) + this.Fixed32Map[v22] = uint32(r.Uint32()) + } + } + if r.Intn(10) != 0 { + v23 := r.Intn(10) + this.Sfixed32Map = make(map[int32]int32) + for i := 0; i < v23; i++ { + v24 := int32(r.Int31()) + this.Sfixed32Map[v24] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Sfixed32Map[v24] *= -1 + } + } + } + if r.Intn(10) != 0 { + v25 := r.Intn(10) + this.Fixed64Map = make(map[uint64]uint64) + for i := 0; i < v25; i++ { + v26 := uint64(uint64(r.Uint32())) + this.Fixed64Map[v26] = uint64(uint64(r.Uint32())) + } + } + if r.Intn(10) != 0 { + v27 := r.Intn(10) + this.Sfixed64Map = make(map[int64]int64) + for i := 0; i < v27; i++ { + v28 := int64(r.Int63()) + this.Sfixed64Map[v28] = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Sfixed64Map[v28] *= -1 + } + } + } + if r.Intn(10) != 0 { + v29 := r.Intn(10) + this.BoolMap = make(map[bool]bool) + for i := 0; i < v29; i++ { + v30 := bool(bool(r.Intn(2) == 0)) + this.BoolMap[v30] = bool(bool(r.Intn(2) == 0)) + } + } + if r.Intn(10) != 0 { + v31 := r.Intn(10) + this.StringMap = make(map[string]string) + for i := 0; i < v31; i++ { + this.StringMap[randStringTheproto3(r)] = randStringTheproto3(r) + } + } + if r.Intn(10) != 0 { + v32 := r.Intn(10) + this.StringToBytesMap = make(map[string][]byte) + for i := 0; i < v32; i++ { + v33 := r.Intn(100) + v34 := randStringTheproto3(r) + this.StringToBytesMap[v34] = make([]byte, v33) + for i := 0; i < v33; i++ { + this.StringToBytesMap[v34][i] = byte(r.Intn(256)) + } + } + } + if r.Intn(10) != 0 { + v35 := r.Intn(10) + this.StringToEnumMap = make(map[string]MapEnum) + for i := 0; i < v35; i++ { + this.StringToEnumMap[randStringTheproto3(r)] = MapEnum([]int32{0, 1, 2}[r.Intn(3)]) + } + } + if r.Intn(10) != 0 { + v36 := r.Intn(10) + this.StringToMsgMap = make(map[string]*FloatingPoint) + for i := 0; i < v36; i++ { + this.StringToMsgMap[randStringTheproto3(r)] = NewPopulatedFloatingPoint(r, easy) + } + } + if !easy && r.Intn(10) != 0 { + } + return this +} + +func NewPopulatedAllMapsOrdered(r randyTheproto3, easy bool) *AllMapsOrdered { + this := &AllMapsOrdered{} + if r.Intn(10) != 0 { + v37 := r.Intn(10) + this.StringToDoubleMap = make(map[string]float64) + for i := 0; i < v37; i++ { + v38 := randStringTheproto3(r) + this.StringToDoubleMap[v38] = float64(r.Float64()) + if r.Intn(2) == 0 { + this.StringToDoubleMap[v38] *= -1 + } + } + } + if r.Intn(10) != 0 { + v39 := r.Intn(10) + this.StringToFloatMap = make(map[string]float32) + for i := 0; i < v39; i++ { + v40 := randStringTheproto3(r) + this.StringToFloatMap[v40] = float32(r.Float32()) + if r.Intn(2) == 0 { + this.StringToFloatMap[v40] *= -1 + } + } + } + if r.Intn(10) != 0 { + v41 := r.Intn(10) + this.Int32Map = make(map[int32]int32) + for i := 0; i < v41; i++ { + v42 := int32(r.Int31()) + this.Int32Map[v42] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Int32Map[v42] *= -1 + } + } + } + if r.Intn(10) != 0 { + v43 := r.Intn(10) + this.Int64Map = make(map[int64]int64) + for i := 0; i < v43; i++ { + v44 := int64(r.Int63()) + this.Int64Map[v44] = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Int64Map[v44] *= -1 + } + } + } + if r.Intn(10) != 0 { + v45 := r.Intn(10) + this.Uint32Map = make(map[uint32]uint32) + for i := 0; i < v45; i++ { + v46 := uint32(r.Uint32()) + this.Uint32Map[v46] = uint32(r.Uint32()) + } + } + if r.Intn(10) != 0 { + v47 := r.Intn(10) + this.Uint64Map = make(map[uint64]uint64) + for i := 0; i < v47; i++ { + v48 := uint64(uint64(r.Uint32())) + this.Uint64Map[v48] = uint64(uint64(r.Uint32())) + } + } + if r.Intn(10) != 0 { + v49 := r.Intn(10) + this.Sint32Map = make(map[int32]int32) + for i := 0; i < v49; i++ { + v50 := int32(r.Int31()) + this.Sint32Map[v50] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Sint32Map[v50] *= -1 + } + } + } + if r.Intn(10) != 0 { + v51 := r.Intn(10) + this.Sint64Map = make(map[int64]int64) + for i := 0; i < v51; i++ { + v52 := int64(r.Int63()) + this.Sint64Map[v52] = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Sint64Map[v52] *= -1 + } + } + } + if r.Intn(10) != 0 { + v53 := r.Intn(10) + this.Fixed32Map = make(map[uint32]uint32) + for i := 0; i < v53; i++ { + v54 := uint32(r.Uint32()) + this.Fixed32Map[v54] = uint32(r.Uint32()) + } + } + if r.Intn(10) != 0 { + v55 := r.Intn(10) + this.Sfixed32Map = make(map[int32]int32) + for i := 0; i < v55; i++ { + v56 := int32(r.Int31()) + this.Sfixed32Map[v56] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Sfixed32Map[v56] *= -1 + } + } + } + if r.Intn(10) != 0 { + v57 := r.Intn(10) + this.Fixed64Map = make(map[uint64]uint64) + for i := 0; i < v57; i++ { + v58 := uint64(uint64(r.Uint32())) + this.Fixed64Map[v58] = uint64(uint64(r.Uint32())) + } + } + if r.Intn(10) != 0 { + v59 := r.Intn(10) + this.Sfixed64Map = make(map[int64]int64) + for i := 0; i < v59; i++ { + v60 := int64(r.Int63()) + this.Sfixed64Map[v60] = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Sfixed64Map[v60] *= -1 + } + } + } + if r.Intn(10) != 0 { + v61 := r.Intn(10) + this.BoolMap = make(map[bool]bool) + for i := 0; i < v61; i++ { + v62 := bool(bool(r.Intn(2) == 0)) + this.BoolMap[v62] = bool(bool(r.Intn(2) == 0)) + } + } + if r.Intn(10) != 0 { + v63 := r.Intn(10) + this.StringMap = make(map[string]string) + for i := 0; i < v63; i++ { + this.StringMap[randStringTheproto3(r)] = randStringTheproto3(r) + } + } + if r.Intn(10) != 0 { + v64 := r.Intn(10) + this.StringToBytesMap = make(map[string][]byte) + for i := 0; i < v64; i++ { + v65 := r.Intn(100) + v66 := randStringTheproto3(r) + this.StringToBytesMap[v66] = make([]byte, v65) + for i := 0; i < v65; i++ { + this.StringToBytesMap[v66][i] = byte(r.Intn(256)) + } + } + } + if r.Intn(10) != 0 { + v67 := r.Intn(10) + this.StringToEnumMap = make(map[string]MapEnum) + for i := 0; i < v67; i++ { + this.StringToEnumMap[randStringTheproto3(r)] = MapEnum([]int32{0, 1, 2}[r.Intn(3)]) + } + } + if r.Intn(10) != 0 { + v68 := r.Intn(10) + this.StringToMsgMap = make(map[string]*FloatingPoint) + for i := 0; i < v68; i++ { + this.StringToMsgMap[randStringTheproto3(r)] = NewPopulatedFloatingPoint(r, easy) + } + } + if !easy && r.Intn(10) != 0 { + } + return this +} + +func NewPopulatedMessageWithMap(r randyTheproto3, easy bool) *MessageWithMap { + this := &MessageWithMap{} + if r.Intn(10) != 0 { + v69 := r.Intn(10) + this.NameMapping = make(map[int32]string) + for i := 0; i < v69; i++ { + this.NameMapping[int32(r.Int31())] = randStringTheproto3(r) + } + } + if r.Intn(10) != 0 { + v70 := r.Intn(10) + this.MsgMapping = make(map[int64]*FloatingPoint) + for i := 0; i < v70; i++ { + this.MsgMapping[int64(r.Int63())] = NewPopulatedFloatingPoint(r, easy) + } + } + if r.Intn(10) != 0 { + v71 := r.Intn(10) + this.ByteMapping = make(map[bool][]byte) + for i := 0; i < v71; i++ { + v72 := r.Intn(100) + v73 := bool(bool(r.Intn(2) == 0)) + this.ByteMapping[v73] = make([]byte, v72) + for i := 0; i < v72; i++ { + this.ByteMapping[v73][i] = byte(r.Intn(256)) + } + } + } + if !easy && r.Intn(10) != 0 { + } + return this +} + +func NewPopulatedFloatingPoint(r randyTheproto3, easy bool) *FloatingPoint { + this := &FloatingPoint{} + this.F = float64(r.Float64()) + if r.Intn(2) == 0 { + this.F *= -1 + } + if !easy && r.Intn(10) != 0 { + } + return this +} + +func NewPopulatedUint128Pair(r randyTheproto3, easy bool) *Uint128Pair { + this := &Uint128Pair{} + v74 := github_com_gogo_protobuf_test_custom.NewPopulatedUint128(r) + this.Left = *v74 + this.Right = github_com_gogo_protobuf_test_custom.NewPopulatedUint128(r) + if !easy && r.Intn(10) != 0 { + } + return this +} + +func NewPopulatedContainsNestedMap(r randyTheproto3, easy bool) *ContainsNestedMap { + this := &ContainsNestedMap{} + if !easy && r.Intn(10) != 0 { + } + return this +} + +func NewPopulatedContainsNestedMap_NestedMap(r randyTheproto3, easy bool) *ContainsNestedMap_NestedMap { + this := &ContainsNestedMap_NestedMap{} + if r.Intn(10) != 0 { + v75 := r.Intn(10) + this.NestedMapField = make(map[string]float64) + for i := 0; i < v75; i++ { + v76 := randStringTheproto3(r) + this.NestedMapField[v76] = float64(r.Float64()) + if r.Intn(2) == 0 { + this.NestedMapField[v76] *= -1 + } + } + } + if !easy && r.Intn(10) != 0 { + } + return this +} + +type randyTheproto3 interface { + Float32() float32 + Float64() float64 + Int63() int64 + Int31() int32 + Uint32() uint32 + Intn(n int) int +} + +func randUTF8RuneTheproto3(r randyTheproto3) 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 randStringTheproto3(r randyTheproto3) string { + v77 := r.Intn(100) + tmps := make([]rune, v77) + for i := 0; i < v77; i++ { + tmps[i] = randUTF8RuneTheproto3(r) + } + return string(tmps) +} +func randUnrecognizedTheproto3(r randyTheproto3, 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 = randFieldTheproto3(data, r, fieldNumber, wire) + } + return data +} +func randFieldTheproto3(data []byte, r randyTheproto3, fieldNumber int, wire int) []byte { + key := uint32(fieldNumber)<<3 | uint32(wire) + switch wire { + case 0: + data = encodeVarintPopulateTheproto3(data, uint64(key)) + v78 := r.Int63() + if r.Intn(2) == 0 { + v78 *= -1 + } + data = encodeVarintPopulateTheproto3(data, uint64(v78)) + case 1: + data = encodeVarintPopulateTheproto3(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 = encodeVarintPopulateTheproto3(data, uint64(key)) + ll := r.Intn(100) + data = encodeVarintPopulateTheproto3(data, uint64(ll)) + for j := 0; j < ll; j++ { + data = append(data, byte(r.Intn(256))) + } + default: + data = encodeVarintPopulateTheproto3(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 encodeVarintPopulateTheproto3(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 *Message) Size() (n int) { + var l int + _ = l + l = len(m.Name) + if l > 0 { + n += 1 + l + sovTheproto3(uint64(l)) + } + if m.Hilarity != 0 { + n += 1 + sovTheproto3(uint64(m.Hilarity)) + } + if m.HeightInCm != 0 { + n += 1 + sovTheproto3(uint64(m.HeightInCm)) + } + l = len(m.Data) + if l > 0 { + n += 1 + l + sovTheproto3(uint64(l)) + } + if m.ResultCount != 0 { + n += 1 + sovTheproto3(uint64(m.ResultCount)) + } + if m.TrueScotsman { + n += 2 + } + if m.Score != 0 { + n += 5 + } + if len(m.Key) > 0 { + for _, e := range m.Key { + n += 1 + sovTheproto3(uint64(e)) + } + } + if m.Nested != nil { + l = m.Nested.Size() + n += 1 + l + sovTheproto3(uint64(l)) + } + if len(m.Terrain) > 0 { + for k, v := range m.Terrain { + _ = k + _ = v + l = 0 + if v != nil { + l = v.Size() + } + mapEntrySize := 1 + sovTheproto3(uint64(k)) + 1 + l + sovTheproto3(uint64(l)) + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if m.Proto2Field != nil { + l = m.Proto2Field.Size() + n += 1 + l + sovTheproto3(uint64(l)) + } + if len(m.Proto2Value) > 0 { + for k, v := range m.Proto2Value { + _ = k + _ = v + l = 0 + if v != nil { + l = v.Size() + } + mapEntrySize := 1 + sovTheproto3(uint64(k)) + 1 + l + sovTheproto3(uint64(l)) + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + return n +} + +func (m *Nested) Size() (n int) { + var l int + _ = l + l = len(m.Bunny) + if l > 0 { + n += 1 + l + sovTheproto3(uint64(l)) + } + return n +} + +func (m *AllMaps) Size() (n int) { + var l int + _ = l + if len(m.StringToDoubleMap) > 0 { + for k, v := range m.StringToDoubleMap { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovTheproto3(uint64(len(k))) + 1 + 8 + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.StringToFloatMap) > 0 { + for k, v := range m.StringToFloatMap { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovTheproto3(uint64(len(k))) + 1 + 4 + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.Int32Map) > 0 { + for k, v := range m.Int32Map { + _ = k + _ = v + mapEntrySize := 1 + sovTheproto3(uint64(k)) + 1 + sovTheproto3(uint64(v)) + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.Int64Map) > 0 { + for k, v := range m.Int64Map { + _ = k + _ = v + mapEntrySize := 1 + sovTheproto3(uint64(k)) + 1 + sovTheproto3(uint64(v)) + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.Uint32Map) > 0 { + for k, v := range m.Uint32Map { + _ = k + _ = v + mapEntrySize := 1 + sovTheproto3(uint64(k)) + 1 + sovTheproto3(uint64(v)) + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.Uint64Map) > 0 { + for k, v := range m.Uint64Map { + _ = k + _ = v + mapEntrySize := 1 + sovTheproto3(uint64(k)) + 1 + sovTheproto3(uint64(v)) + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.Sint32Map) > 0 { + for k, v := range m.Sint32Map { + _ = k + _ = v + mapEntrySize := 1 + sozTheproto3(uint64(k)) + 1 + sozTheproto3(uint64(v)) + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.Sint64Map) > 0 { + for k, v := range m.Sint64Map { + _ = k + _ = v + mapEntrySize := 1 + sozTheproto3(uint64(k)) + 1 + sozTheproto3(uint64(v)) + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.Fixed32Map) > 0 { + for k, v := range m.Fixed32Map { + _ = k + _ = v + mapEntrySize := 1 + 4 + 1 + 4 + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.Sfixed32Map) > 0 { + for k, v := range m.Sfixed32Map { + _ = k + _ = v + mapEntrySize := 1 + 4 + 1 + 4 + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.Fixed64Map) > 0 { + for k, v := range m.Fixed64Map { + _ = k + _ = v + mapEntrySize := 1 + 8 + 1 + 8 + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.Sfixed64Map) > 0 { + for k, v := range m.Sfixed64Map { + _ = k + _ = v + mapEntrySize := 1 + 8 + 1 + 8 + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.BoolMap) > 0 { + for k, v := range m.BoolMap { + _ = k + _ = v + mapEntrySize := 1 + 1 + 1 + 1 + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.StringMap) > 0 { + for k, v := range m.StringMap { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovTheproto3(uint64(len(k))) + 1 + len(v) + sovTheproto3(uint64(len(v))) + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.StringToBytesMap) > 0 { + for k, v := range m.StringToBytesMap { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovTheproto3(uint64(len(k))) + 1 + len(v) + sovTheproto3(uint64(len(v))) + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.StringToEnumMap) > 0 { + for k, v := range m.StringToEnumMap { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovTheproto3(uint64(len(k))) + 1 + sovTheproto3(uint64(v)) + n += mapEntrySize + 2 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.StringToMsgMap) > 0 { + for k, v := range m.StringToMsgMap { + _ = k + _ = v + l = 0 + if v != nil { + l = v.Size() + } + mapEntrySize := 1 + len(k) + sovTheproto3(uint64(len(k))) + 1 + l + sovTheproto3(uint64(l)) + n += mapEntrySize + 2 + sovTheproto3(uint64(mapEntrySize)) + } + } + return n +} + +func (m *AllMapsOrdered) Size() (n int) { + var l int + _ = l + if len(m.StringToDoubleMap) > 0 { + for k, v := range m.StringToDoubleMap { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovTheproto3(uint64(len(k))) + 1 + 8 + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.StringToFloatMap) > 0 { + for k, v := range m.StringToFloatMap { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovTheproto3(uint64(len(k))) + 1 + 4 + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.Int32Map) > 0 { + for k, v := range m.Int32Map { + _ = k + _ = v + mapEntrySize := 1 + sovTheproto3(uint64(k)) + 1 + sovTheproto3(uint64(v)) + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.Int64Map) > 0 { + for k, v := range m.Int64Map { + _ = k + _ = v + mapEntrySize := 1 + sovTheproto3(uint64(k)) + 1 + sovTheproto3(uint64(v)) + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.Uint32Map) > 0 { + for k, v := range m.Uint32Map { + _ = k + _ = v + mapEntrySize := 1 + sovTheproto3(uint64(k)) + 1 + sovTheproto3(uint64(v)) + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.Uint64Map) > 0 { + for k, v := range m.Uint64Map { + _ = k + _ = v + mapEntrySize := 1 + sovTheproto3(uint64(k)) + 1 + sovTheproto3(uint64(v)) + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.Sint32Map) > 0 { + for k, v := range m.Sint32Map { + _ = k + _ = v + mapEntrySize := 1 + sozTheproto3(uint64(k)) + 1 + sozTheproto3(uint64(v)) + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.Sint64Map) > 0 { + for k, v := range m.Sint64Map { + _ = k + _ = v + mapEntrySize := 1 + sozTheproto3(uint64(k)) + 1 + sozTheproto3(uint64(v)) + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.Fixed32Map) > 0 { + for k, v := range m.Fixed32Map { + _ = k + _ = v + mapEntrySize := 1 + 4 + 1 + 4 + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.Sfixed32Map) > 0 { + for k, v := range m.Sfixed32Map { + _ = k + _ = v + mapEntrySize := 1 + 4 + 1 + 4 + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.Fixed64Map) > 0 { + for k, v := range m.Fixed64Map { + _ = k + _ = v + mapEntrySize := 1 + 8 + 1 + 8 + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.Sfixed64Map) > 0 { + for k, v := range m.Sfixed64Map { + _ = k + _ = v + mapEntrySize := 1 + 8 + 1 + 8 + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.BoolMap) > 0 { + for k, v := range m.BoolMap { + _ = k + _ = v + mapEntrySize := 1 + 1 + 1 + 1 + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.StringMap) > 0 { + for k, v := range m.StringMap { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovTheproto3(uint64(len(k))) + 1 + len(v) + sovTheproto3(uint64(len(v))) + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.StringToBytesMap) > 0 { + for k, v := range m.StringToBytesMap { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovTheproto3(uint64(len(k))) + 1 + len(v) + sovTheproto3(uint64(len(v))) + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.StringToEnumMap) > 0 { + for k, v := range m.StringToEnumMap { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovTheproto3(uint64(len(k))) + 1 + sovTheproto3(uint64(v)) + n += mapEntrySize + 2 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.StringToMsgMap) > 0 { + for k, v := range m.StringToMsgMap { + _ = k + _ = v + l = 0 + if v != nil { + l = v.Size() + } + mapEntrySize := 1 + len(k) + sovTheproto3(uint64(len(k))) + 1 + l + sovTheproto3(uint64(l)) + n += mapEntrySize + 2 + sovTheproto3(uint64(mapEntrySize)) + } + } + return n +} + +func (m *MessageWithMap) Size() (n int) { + var l int + _ = l + if len(m.NameMapping) > 0 { + for k, v := range m.NameMapping { + _ = k + _ = v + mapEntrySize := 1 + sovTheproto3(uint64(k)) + 1 + len(v) + sovTheproto3(uint64(len(v))) + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.MsgMapping) > 0 { + for k, v := range m.MsgMapping { + _ = k + _ = v + l = 0 + if v != nil { + l = v.Size() + } + mapEntrySize := 1 + sozTheproto3(uint64(k)) + 1 + l + sovTheproto3(uint64(l)) + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.ByteMapping) > 0 { + for k, v := range m.ByteMapping { + _ = k + _ = v + mapEntrySize := 1 + 1 + 1 + len(v) + sovTheproto3(uint64(len(v))) + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + return n +} + +func (m *FloatingPoint) Size() (n int) { + var l int + _ = l + if m.F != 0 { + n += 9 + } + return n +} + +func (m *Uint128Pair) Size() (n int) { + var l int + _ = l + l = m.Left.Size() + n += 1 + l + sovTheproto3(uint64(l)) + if m.Right != nil { + l = m.Right.Size() + n += 1 + l + sovTheproto3(uint64(l)) + } + return n +} + +func (m *ContainsNestedMap) Size() (n int) { + var l int + _ = l + return n +} + +func (m *ContainsNestedMap_NestedMap) Size() (n int) { + var l int + _ = l + if len(m.NestedMapField) > 0 { + for k, v := range m.NestedMapField { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovTheproto3(uint64(len(k))) + 1 + 8 + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + return n +} + +func sovTheproto3(x uint64) (n int) { + for { + n++ + x >>= 7 + if x == 0 { + break + } + } + return n +} +func sozTheproto3(x uint64) (n int) { + return sovTheproto3(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (this *Message) String() string { + if this == nil { + return "nil" + } + keysForTerrain := make([]int64, 0, len(this.Terrain)) + for k := range this.Terrain { + keysForTerrain = append(keysForTerrain, k) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForTerrain) + mapStringForTerrain := "map[int64]*Nested{" + for _, k := range keysForTerrain { + mapStringForTerrain += fmt.Sprintf("%v: %v,", k, this.Terrain[k]) + } + mapStringForTerrain += "}" + keysForProto2Value := make([]int64, 0, len(this.Proto2Value)) + for k := range this.Proto2Value { + keysForProto2Value = append(keysForProto2Value, k) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForProto2Value) + mapStringForProto2Value := "map[int64]*test.NinOptEnum{" + for _, k := range keysForProto2Value { + mapStringForProto2Value += fmt.Sprintf("%v: %v,", k, this.Proto2Value[k]) + } + mapStringForProto2Value += "}" + s := strings.Join([]string{`&Message{`, + `Name:` + fmt.Sprintf("%v", this.Name) + `,`, + `Hilarity:` + fmt.Sprintf("%v", this.Hilarity) + `,`, + `HeightInCm:` + fmt.Sprintf("%v", this.HeightInCm) + `,`, + `Data:` + fmt.Sprintf("%v", this.Data) + `,`, + `ResultCount:` + fmt.Sprintf("%v", this.ResultCount) + `,`, + `TrueScotsman:` + fmt.Sprintf("%v", this.TrueScotsman) + `,`, + `Score:` + fmt.Sprintf("%v", this.Score) + `,`, + `Key:` + fmt.Sprintf("%v", this.Key) + `,`, + `Nested:` + strings.Replace(fmt.Sprintf("%v", this.Nested), "Nested", "Nested", 1) + `,`, + `Terrain:` + mapStringForTerrain + `,`, + `Proto2Field:` + strings.Replace(fmt.Sprintf("%v", this.Proto2Field), "NinOptNative", "test.NinOptNative", 1) + `,`, + `Proto2Value:` + mapStringForProto2Value + `,`, + `}`, + }, "") + return s +} +func (this *Nested) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&Nested{`, + `Bunny:` + fmt.Sprintf("%v", this.Bunny) + `,`, + `}`, + }, "") + return s +} +func (this *AllMaps) String() string { + if this == nil { + return "nil" + } + keysForStringToDoubleMap := make([]string, 0, len(this.StringToDoubleMap)) + for k := range this.StringToDoubleMap { + keysForStringToDoubleMap = append(keysForStringToDoubleMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToDoubleMap) + mapStringForStringToDoubleMap := "map[string]float64{" + for _, k := range keysForStringToDoubleMap { + mapStringForStringToDoubleMap += fmt.Sprintf("%v: %v,", k, this.StringToDoubleMap[k]) + } + mapStringForStringToDoubleMap += "}" + keysForStringToFloatMap := make([]string, 0, len(this.StringToFloatMap)) + for k := range this.StringToFloatMap { + keysForStringToFloatMap = append(keysForStringToFloatMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToFloatMap) + mapStringForStringToFloatMap := "map[string]float32{" + for _, k := range keysForStringToFloatMap { + mapStringForStringToFloatMap += fmt.Sprintf("%v: %v,", k, this.StringToFloatMap[k]) + } + mapStringForStringToFloatMap += "}" + keysForInt32Map := make([]int32, 0, len(this.Int32Map)) + for k := range this.Int32Map { + keysForInt32Map = append(keysForInt32Map, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForInt32Map) + mapStringForInt32Map := "map[int32]int32{" + for _, k := range keysForInt32Map { + mapStringForInt32Map += fmt.Sprintf("%v: %v,", k, this.Int32Map[k]) + } + mapStringForInt32Map += "}" + keysForInt64Map := make([]int64, 0, len(this.Int64Map)) + for k := range this.Int64Map { + keysForInt64Map = append(keysForInt64Map, k) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForInt64Map) + mapStringForInt64Map := "map[int64]int64{" + for _, k := range keysForInt64Map { + mapStringForInt64Map += fmt.Sprintf("%v: %v,", k, this.Int64Map[k]) + } + mapStringForInt64Map += "}" + keysForUint32Map := make([]uint32, 0, len(this.Uint32Map)) + for k := range this.Uint32Map { + keysForUint32Map = append(keysForUint32Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint32s(keysForUint32Map) + mapStringForUint32Map := "map[uint32]uint32{" + for _, k := range keysForUint32Map { + mapStringForUint32Map += fmt.Sprintf("%v: %v,", k, this.Uint32Map[k]) + } + mapStringForUint32Map += "}" + keysForUint64Map := make([]uint64, 0, len(this.Uint64Map)) + for k := range this.Uint64Map { + keysForUint64Map = append(keysForUint64Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint64s(keysForUint64Map) + mapStringForUint64Map := "map[uint64]uint64{" + for _, k := range keysForUint64Map { + mapStringForUint64Map += fmt.Sprintf("%v: %v,", k, this.Uint64Map[k]) + } + mapStringForUint64Map += "}" + keysForSint32Map := make([]int32, 0, len(this.Sint32Map)) + for k := range this.Sint32Map { + keysForSint32Map = append(keysForSint32Map, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForSint32Map) + mapStringForSint32Map := "map[int32]int32{" + for _, k := range keysForSint32Map { + mapStringForSint32Map += fmt.Sprintf("%v: %v,", k, this.Sint32Map[k]) + } + mapStringForSint32Map += "}" + keysForSint64Map := make([]int64, 0, len(this.Sint64Map)) + for k := range this.Sint64Map { + keysForSint64Map = append(keysForSint64Map, k) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForSint64Map) + mapStringForSint64Map := "map[int64]int64{" + for _, k := range keysForSint64Map { + mapStringForSint64Map += fmt.Sprintf("%v: %v,", k, this.Sint64Map[k]) + } + mapStringForSint64Map += "}" + keysForFixed32Map := make([]uint32, 0, len(this.Fixed32Map)) + for k := range this.Fixed32Map { + keysForFixed32Map = append(keysForFixed32Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint32s(keysForFixed32Map) + mapStringForFixed32Map := "map[uint32]uint32{" + for _, k := range keysForFixed32Map { + mapStringForFixed32Map += fmt.Sprintf("%v: %v,", k, this.Fixed32Map[k]) + } + mapStringForFixed32Map += "}" + keysForSfixed32Map := make([]int32, 0, len(this.Sfixed32Map)) + for k := range this.Sfixed32Map { + keysForSfixed32Map = append(keysForSfixed32Map, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForSfixed32Map) + mapStringForSfixed32Map := "map[int32]int32{" + for _, k := range keysForSfixed32Map { + mapStringForSfixed32Map += fmt.Sprintf("%v: %v,", k, this.Sfixed32Map[k]) + } + mapStringForSfixed32Map += "}" + keysForFixed64Map := make([]uint64, 0, len(this.Fixed64Map)) + for k := range this.Fixed64Map { + keysForFixed64Map = append(keysForFixed64Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint64s(keysForFixed64Map) + mapStringForFixed64Map := "map[uint64]uint64{" + for _, k := range keysForFixed64Map { + mapStringForFixed64Map += fmt.Sprintf("%v: %v,", k, this.Fixed64Map[k]) + } + mapStringForFixed64Map += "}" + keysForSfixed64Map := make([]int64, 0, len(this.Sfixed64Map)) + for k := range this.Sfixed64Map { + keysForSfixed64Map = append(keysForSfixed64Map, k) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForSfixed64Map) + mapStringForSfixed64Map := "map[int64]int64{" + for _, k := range keysForSfixed64Map { + mapStringForSfixed64Map += fmt.Sprintf("%v: %v,", k, this.Sfixed64Map[k]) + } + mapStringForSfixed64Map += "}" + keysForBoolMap := make([]bool, 0, len(this.BoolMap)) + for k := range this.BoolMap { + keysForBoolMap = append(keysForBoolMap, k) + } + github_com_gogo_protobuf_sortkeys.Bools(keysForBoolMap) + mapStringForBoolMap := "map[bool]bool{" + for _, k := range keysForBoolMap { + mapStringForBoolMap += fmt.Sprintf("%v: %v,", k, this.BoolMap[k]) + } + mapStringForBoolMap += "}" + keysForStringMap := make([]string, 0, len(this.StringMap)) + for k := range this.StringMap { + keysForStringMap = append(keysForStringMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringMap) + mapStringForStringMap := "map[string]string{" + for _, k := range keysForStringMap { + mapStringForStringMap += fmt.Sprintf("%v: %v,", k, this.StringMap[k]) + } + mapStringForStringMap += "}" + keysForStringToBytesMap := make([]string, 0, len(this.StringToBytesMap)) + for k := range this.StringToBytesMap { + keysForStringToBytesMap = append(keysForStringToBytesMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToBytesMap) + mapStringForStringToBytesMap := "map[string][]byte{" + for _, k := range keysForStringToBytesMap { + mapStringForStringToBytesMap += fmt.Sprintf("%v: %v,", k, this.StringToBytesMap[k]) + } + mapStringForStringToBytesMap += "}" + keysForStringToEnumMap := make([]string, 0, len(this.StringToEnumMap)) + for k := range this.StringToEnumMap { + keysForStringToEnumMap = append(keysForStringToEnumMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToEnumMap) + mapStringForStringToEnumMap := "map[string]MapEnum{" + for _, k := range keysForStringToEnumMap { + mapStringForStringToEnumMap += fmt.Sprintf("%v: %v,", k, this.StringToEnumMap[k]) + } + mapStringForStringToEnumMap += "}" + keysForStringToMsgMap := make([]string, 0, len(this.StringToMsgMap)) + for k := range this.StringToMsgMap { + keysForStringToMsgMap = append(keysForStringToMsgMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToMsgMap) + mapStringForStringToMsgMap := "map[string]*FloatingPoint{" + for _, k := range keysForStringToMsgMap { + mapStringForStringToMsgMap += fmt.Sprintf("%v: %v,", k, this.StringToMsgMap[k]) + } + mapStringForStringToMsgMap += "}" + s := strings.Join([]string{`&AllMaps{`, + `StringToDoubleMap:` + mapStringForStringToDoubleMap + `,`, + `StringToFloatMap:` + mapStringForStringToFloatMap + `,`, + `Int32Map:` + mapStringForInt32Map + `,`, + `Int64Map:` + mapStringForInt64Map + `,`, + `Uint32Map:` + mapStringForUint32Map + `,`, + `Uint64Map:` + mapStringForUint64Map + `,`, + `Sint32Map:` + mapStringForSint32Map + `,`, + `Sint64Map:` + mapStringForSint64Map + `,`, + `Fixed32Map:` + mapStringForFixed32Map + `,`, + `Sfixed32Map:` + mapStringForSfixed32Map + `,`, + `Fixed64Map:` + mapStringForFixed64Map + `,`, + `Sfixed64Map:` + mapStringForSfixed64Map + `,`, + `BoolMap:` + mapStringForBoolMap + `,`, + `StringMap:` + mapStringForStringMap + `,`, + `StringToBytesMap:` + mapStringForStringToBytesMap + `,`, + `StringToEnumMap:` + mapStringForStringToEnumMap + `,`, + `StringToMsgMap:` + mapStringForStringToMsgMap + `,`, + `}`, + }, "") + return s +} +func (this *AllMapsOrdered) String() string { + if this == nil { + return "nil" + } + keysForStringToDoubleMap := make([]string, 0, len(this.StringToDoubleMap)) + for k := range this.StringToDoubleMap { + keysForStringToDoubleMap = append(keysForStringToDoubleMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToDoubleMap) + mapStringForStringToDoubleMap := "map[string]float64{" + for _, k := range keysForStringToDoubleMap { + mapStringForStringToDoubleMap += fmt.Sprintf("%v: %v,", k, this.StringToDoubleMap[k]) + } + mapStringForStringToDoubleMap += "}" + keysForStringToFloatMap := make([]string, 0, len(this.StringToFloatMap)) + for k := range this.StringToFloatMap { + keysForStringToFloatMap = append(keysForStringToFloatMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToFloatMap) + mapStringForStringToFloatMap := "map[string]float32{" + for _, k := range keysForStringToFloatMap { + mapStringForStringToFloatMap += fmt.Sprintf("%v: %v,", k, this.StringToFloatMap[k]) + } + mapStringForStringToFloatMap += "}" + keysForInt32Map := make([]int32, 0, len(this.Int32Map)) + for k := range this.Int32Map { + keysForInt32Map = append(keysForInt32Map, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForInt32Map) + mapStringForInt32Map := "map[int32]int32{" + for _, k := range keysForInt32Map { + mapStringForInt32Map += fmt.Sprintf("%v: %v,", k, this.Int32Map[k]) + } + mapStringForInt32Map += "}" + keysForInt64Map := make([]int64, 0, len(this.Int64Map)) + for k := range this.Int64Map { + keysForInt64Map = append(keysForInt64Map, k) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForInt64Map) + mapStringForInt64Map := "map[int64]int64{" + for _, k := range keysForInt64Map { + mapStringForInt64Map += fmt.Sprintf("%v: %v,", k, this.Int64Map[k]) + } + mapStringForInt64Map += "}" + keysForUint32Map := make([]uint32, 0, len(this.Uint32Map)) + for k := range this.Uint32Map { + keysForUint32Map = append(keysForUint32Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint32s(keysForUint32Map) + mapStringForUint32Map := "map[uint32]uint32{" + for _, k := range keysForUint32Map { + mapStringForUint32Map += fmt.Sprintf("%v: %v,", k, this.Uint32Map[k]) + } + mapStringForUint32Map += "}" + keysForUint64Map := make([]uint64, 0, len(this.Uint64Map)) + for k := range this.Uint64Map { + keysForUint64Map = append(keysForUint64Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint64s(keysForUint64Map) + mapStringForUint64Map := "map[uint64]uint64{" + for _, k := range keysForUint64Map { + mapStringForUint64Map += fmt.Sprintf("%v: %v,", k, this.Uint64Map[k]) + } + mapStringForUint64Map += "}" + keysForSint32Map := make([]int32, 0, len(this.Sint32Map)) + for k := range this.Sint32Map { + keysForSint32Map = append(keysForSint32Map, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForSint32Map) + mapStringForSint32Map := "map[int32]int32{" + for _, k := range keysForSint32Map { + mapStringForSint32Map += fmt.Sprintf("%v: %v,", k, this.Sint32Map[k]) + } + mapStringForSint32Map += "}" + keysForSint64Map := make([]int64, 0, len(this.Sint64Map)) + for k := range this.Sint64Map { + keysForSint64Map = append(keysForSint64Map, k) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForSint64Map) + mapStringForSint64Map := "map[int64]int64{" + for _, k := range keysForSint64Map { + mapStringForSint64Map += fmt.Sprintf("%v: %v,", k, this.Sint64Map[k]) + } + mapStringForSint64Map += "}" + keysForFixed32Map := make([]uint32, 0, len(this.Fixed32Map)) + for k := range this.Fixed32Map { + keysForFixed32Map = append(keysForFixed32Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint32s(keysForFixed32Map) + mapStringForFixed32Map := "map[uint32]uint32{" + for _, k := range keysForFixed32Map { + mapStringForFixed32Map += fmt.Sprintf("%v: %v,", k, this.Fixed32Map[k]) + } + mapStringForFixed32Map += "}" + keysForSfixed32Map := make([]int32, 0, len(this.Sfixed32Map)) + for k := range this.Sfixed32Map { + keysForSfixed32Map = append(keysForSfixed32Map, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForSfixed32Map) + mapStringForSfixed32Map := "map[int32]int32{" + for _, k := range keysForSfixed32Map { + mapStringForSfixed32Map += fmt.Sprintf("%v: %v,", k, this.Sfixed32Map[k]) + } + mapStringForSfixed32Map += "}" + keysForFixed64Map := make([]uint64, 0, len(this.Fixed64Map)) + for k := range this.Fixed64Map { + keysForFixed64Map = append(keysForFixed64Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint64s(keysForFixed64Map) + mapStringForFixed64Map := "map[uint64]uint64{" + for _, k := range keysForFixed64Map { + mapStringForFixed64Map += fmt.Sprintf("%v: %v,", k, this.Fixed64Map[k]) + } + mapStringForFixed64Map += "}" + keysForSfixed64Map := make([]int64, 0, len(this.Sfixed64Map)) + for k := range this.Sfixed64Map { + keysForSfixed64Map = append(keysForSfixed64Map, k) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForSfixed64Map) + mapStringForSfixed64Map := "map[int64]int64{" + for _, k := range keysForSfixed64Map { + mapStringForSfixed64Map += fmt.Sprintf("%v: %v,", k, this.Sfixed64Map[k]) + } + mapStringForSfixed64Map += "}" + keysForBoolMap := make([]bool, 0, len(this.BoolMap)) + for k := range this.BoolMap { + keysForBoolMap = append(keysForBoolMap, k) + } + github_com_gogo_protobuf_sortkeys.Bools(keysForBoolMap) + mapStringForBoolMap := "map[bool]bool{" + for _, k := range keysForBoolMap { + mapStringForBoolMap += fmt.Sprintf("%v: %v,", k, this.BoolMap[k]) + } + mapStringForBoolMap += "}" + keysForStringMap := make([]string, 0, len(this.StringMap)) + for k := range this.StringMap { + keysForStringMap = append(keysForStringMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringMap) + mapStringForStringMap := "map[string]string{" + for _, k := range keysForStringMap { + mapStringForStringMap += fmt.Sprintf("%v: %v,", k, this.StringMap[k]) + } + mapStringForStringMap += "}" + keysForStringToBytesMap := make([]string, 0, len(this.StringToBytesMap)) + for k := range this.StringToBytesMap { + keysForStringToBytesMap = append(keysForStringToBytesMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToBytesMap) + mapStringForStringToBytesMap := "map[string][]byte{" + for _, k := range keysForStringToBytesMap { + mapStringForStringToBytesMap += fmt.Sprintf("%v: %v,", k, this.StringToBytesMap[k]) + } + mapStringForStringToBytesMap += "}" + keysForStringToEnumMap := make([]string, 0, len(this.StringToEnumMap)) + for k := range this.StringToEnumMap { + keysForStringToEnumMap = append(keysForStringToEnumMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToEnumMap) + mapStringForStringToEnumMap := "map[string]MapEnum{" + for _, k := range keysForStringToEnumMap { + mapStringForStringToEnumMap += fmt.Sprintf("%v: %v,", k, this.StringToEnumMap[k]) + } + mapStringForStringToEnumMap += "}" + keysForStringToMsgMap := make([]string, 0, len(this.StringToMsgMap)) + for k := range this.StringToMsgMap { + keysForStringToMsgMap = append(keysForStringToMsgMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToMsgMap) + mapStringForStringToMsgMap := "map[string]*FloatingPoint{" + for _, k := range keysForStringToMsgMap { + mapStringForStringToMsgMap += fmt.Sprintf("%v: %v,", k, this.StringToMsgMap[k]) + } + mapStringForStringToMsgMap += "}" + s := strings.Join([]string{`&AllMapsOrdered{`, + `StringToDoubleMap:` + mapStringForStringToDoubleMap + `,`, + `StringToFloatMap:` + mapStringForStringToFloatMap + `,`, + `Int32Map:` + mapStringForInt32Map + `,`, + `Int64Map:` + mapStringForInt64Map + `,`, + `Uint32Map:` + mapStringForUint32Map + `,`, + `Uint64Map:` + mapStringForUint64Map + `,`, + `Sint32Map:` + mapStringForSint32Map + `,`, + `Sint64Map:` + mapStringForSint64Map + `,`, + `Fixed32Map:` + mapStringForFixed32Map + `,`, + `Sfixed32Map:` + mapStringForSfixed32Map + `,`, + `Fixed64Map:` + mapStringForFixed64Map + `,`, + `Sfixed64Map:` + mapStringForSfixed64Map + `,`, + `BoolMap:` + mapStringForBoolMap + `,`, + `StringMap:` + mapStringForStringMap + `,`, + `StringToBytesMap:` + mapStringForStringToBytesMap + `,`, + `StringToEnumMap:` + mapStringForStringToEnumMap + `,`, + `StringToMsgMap:` + mapStringForStringToMsgMap + `,`, + `}`, + }, "") + return s +} +func (this *MessageWithMap) String() string { + if this == nil { + return "nil" + } + keysForNameMapping := make([]int32, 0, len(this.NameMapping)) + for k := range this.NameMapping { + keysForNameMapping = append(keysForNameMapping, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForNameMapping) + mapStringForNameMapping := "map[int32]string{" + for _, k := range keysForNameMapping { + mapStringForNameMapping += fmt.Sprintf("%v: %v,", k, this.NameMapping[k]) + } + mapStringForNameMapping += "}" + keysForMsgMapping := make([]int64, 0, len(this.MsgMapping)) + for k := range this.MsgMapping { + keysForMsgMapping = append(keysForMsgMapping, k) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForMsgMapping) + mapStringForMsgMapping := "map[int64]*FloatingPoint{" + for _, k := range keysForMsgMapping { + mapStringForMsgMapping += fmt.Sprintf("%v: %v,", k, this.MsgMapping[k]) + } + mapStringForMsgMapping += "}" + keysForByteMapping := make([]bool, 0, len(this.ByteMapping)) + for k := range this.ByteMapping { + keysForByteMapping = append(keysForByteMapping, k) + } + github_com_gogo_protobuf_sortkeys.Bools(keysForByteMapping) + mapStringForByteMapping := "map[bool][]byte{" + for _, k := range keysForByteMapping { + mapStringForByteMapping += fmt.Sprintf("%v: %v,", k, this.ByteMapping[k]) + } + mapStringForByteMapping += "}" + s := strings.Join([]string{`&MessageWithMap{`, + `NameMapping:` + mapStringForNameMapping + `,`, + `MsgMapping:` + mapStringForMsgMapping + `,`, + `ByteMapping:` + mapStringForByteMapping + `,`, + `}`, + }, "") + return s +} +func (this *FloatingPoint) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&FloatingPoint{`, + `F:` + fmt.Sprintf("%v", this.F) + `,`, + `}`, + }, "") + return s +} +func (this *Uint128Pair) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&Uint128Pair{`, + `Left:` + fmt.Sprintf("%v", this.Left) + `,`, + `Right:` + fmt.Sprintf("%v", this.Right) + `,`, + `}`, + }, "") + return s +} +func (this *ContainsNestedMap) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&ContainsNestedMap{`, + `}`, + }, "") + return s +} +func (this *ContainsNestedMap_NestedMap) String() string { + if this == nil { + return "nil" + } + keysForNestedMapField := make([]string, 0, len(this.NestedMapField)) + for k := range this.NestedMapField { + keysForNestedMapField = append(keysForNestedMapField, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForNestedMapField) + mapStringForNestedMapField := "map[string]float64{" + for _, k := range keysForNestedMapField { + mapStringForNestedMapField += fmt.Sprintf("%v: %v,", k, this.NestedMapField[k]) + } + mapStringForNestedMapField += "}" + s := strings.Join([]string{`&ContainsNestedMap_NestedMap{`, + `NestedMapField:` + mapStringForNestedMapField + `,`, + `}`, + }, "") + return s +} +func valueToStringTheproto3(v interface{}) string { + rv := reflect.ValueOf(v) + if rv.IsNil() { + return "nil" + } + pv := reflect.Indirect(rv).Interface() + return fmt.Sprintf("*%v", pv) +} +func (m *Message) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *Message) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Name) > 0 { + data[i] = 0xa + i++ + i = encodeVarintTheproto3(data, i, uint64(len(m.Name))) + i += copy(data[i:], m.Name) + } + if m.Hilarity != 0 { + data[i] = 0x10 + i++ + i = encodeVarintTheproto3(data, i, uint64(m.Hilarity)) + } + if m.HeightInCm != 0 { + data[i] = 0x18 + i++ + i = encodeVarintTheproto3(data, i, uint64(m.HeightInCm)) + } + if len(m.Data) > 0 { + data[i] = 0x22 + i++ + i = encodeVarintTheproto3(data, i, uint64(len(m.Data))) + i += copy(data[i:], m.Data) + } + if len(m.Key) > 0 { + for _, num := range m.Key { + data[i] = 0x28 + i++ + i = encodeVarintTheproto3(data, i, uint64(num)) + } + } + if m.Nested != nil { + data[i] = 0x32 + i++ + i = encodeVarintTheproto3(data, i, uint64(m.Nested.Size())) + n1, err := m.Nested.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n1 + } + if m.ResultCount != 0 { + data[i] = 0x38 + i++ + i = encodeVarintTheproto3(data, i, uint64(m.ResultCount)) + } + if m.TrueScotsman { + data[i] = 0x40 + i++ + if m.TrueScotsman { + data[i] = 1 + } else { + data[i] = 0 + } + i++ + } + if m.Score != 0 { + data[i] = 0x4d + i++ + *(*float32)(unsafe.Pointer(&data[i])) = m.Score + i += 4 + } + if len(m.Terrain) > 0 { + for k := range m.Terrain { + data[i] = 0x52 + i++ + v := m.Terrain[k] + if v == nil { + return 0, errors.New("proto: map has nil element") + } + msgSize := v.Size() + mapSize := 1 + sovTheproto3(uint64(k)) + 1 + msgSize + sovTheproto3(uint64(msgSize)) + i = encodeVarintTheproto3(data, i, uint64(mapSize)) + data[i] = 0x8 + i++ + i = encodeVarintTheproto3(data, i, uint64(k)) + data[i] = 0x12 + i++ + i = encodeVarintTheproto3(data, i, uint64(v.Size())) + n2, err := v.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n2 + } + } + if m.Proto2Field != nil { + data[i] = 0x5a + i++ + i = encodeVarintTheproto3(data, i, uint64(m.Proto2Field.Size())) + n3, err := m.Proto2Field.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n3 + } + if len(m.Proto2Value) > 0 { + for k := range m.Proto2Value { + data[i] = 0x6a + i++ + v := m.Proto2Value[k] + if v == nil { + return 0, errors.New("proto: map has nil element") + } + msgSize := v.Size() + mapSize := 1 + sovTheproto3(uint64(k)) + 1 + msgSize + sovTheproto3(uint64(msgSize)) + i = encodeVarintTheproto3(data, i, uint64(mapSize)) + data[i] = 0x8 + i++ + i = encodeVarintTheproto3(data, i, uint64(k)) + data[i] = 0x12 + i++ + i = encodeVarintTheproto3(data, i, uint64(v.Size())) + n4, err := v.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n4 + } + } + return i, nil +} + +func (m *Nested) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *Nested) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Bunny) > 0 { + data[i] = 0xa + i++ + i = encodeVarintTheproto3(data, i, uint64(len(m.Bunny))) + i += copy(data[i:], m.Bunny) + } + return i, nil +} + +func (m *AllMaps) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *AllMaps) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.StringToDoubleMap) > 0 { + for k := range m.StringToDoubleMap { + data[i] = 0xa + i++ + v := m.StringToDoubleMap[k] + mapSize := 1 + len(k) + sovTheproto3(uint64(len(k))) + 1 + 8 + i = encodeVarintTheproto3(data, i, uint64(mapSize)) + data[i] = 0xa + i++ + i = encodeVarintTheproto3(data, i, uint64(len(k))) + i += copy(data[i:], k) + data[i] = 0x11 + i++ + i = encodeFixed64Theproto3(data, i, uint64(math.Float64bits(float64(v)))) + } + } + if len(m.StringToFloatMap) > 0 { + for k := range m.StringToFloatMap { + data[i] = 0x12 + i++ + v := m.StringToFloatMap[k] + mapSize := 1 + len(k) + sovTheproto3(uint64(len(k))) + 1 + 4 + i = encodeVarintTheproto3(data, i, uint64(mapSize)) + data[i] = 0xa + i++ + i = encodeVarintTheproto3(data, i, uint64(len(k))) + i += copy(data[i:], k) + data[i] = 0x15 + i++ + i = encodeFixed32Theproto3(data, i, uint32(math.Float32bits(float32(v)))) + } + } + if len(m.Int32Map) > 0 { + for k := range m.Int32Map { + data[i] = 0x1a + i++ + v := m.Int32Map[k] + mapSize := 1 + sovTheproto3(uint64(k)) + 1 + sovTheproto3(uint64(v)) + i = encodeVarintTheproto3(data, i, uint64(mapSize)) + data[i] = 0x8 + i++ + i = encodeVarintTheproto3(data, i, uint64(k)) + data[i] = 0x10 + i++ + i = encodeVarintTheproto3(data, i, uint64(v)) + } + } + if len(m.Int64Map) > 0 { + for k := range m.Int64Map { + data[i] = 0x22 + i++ + v := m.Int64Map[k] + mapSize := 1 + sovTheproto3(uint64(k)) + 1 + sovTheproto3(uint64(v)) + i = encodeVarintTheproto3(data, i, uint64(mapSize)) + data[i] = 0x8 + i++ + i = encodeVarintTheproto3(data, i, uint64(k)) + data[i] = 0x10 + i++ + i = encodeVarintTheproto3(data, i, uint64(v)) + } + } + if len(m.Uint32Map) > 0 { + for k := range m.Uint32Map { + data[i] = 0x2a + i++ + v := m.Uint32Map[k] + mapSize := 1 + sovTheproto3(uint64(k)) + 1 + sovTheproto3(uint64(v)) + i = encodeVarintTheproto3(data, i, uint64(mapSize)) + data[i] = 0x8 + i++ + i = encodeVarintTheproto3(data, i, uint64(k)) + data[i] = 0x10 + i++ + i = encodeVarintTheproto3(data, i, uint64(v)) + } + } + if len(m.Uint64Map) > 0 { + for k := range m.Uint64Map { + data[i] = 0x32 + i++ + v := m.Uint64Map[k] + mapSize := 1 + sovTheproto3(uint64(k)) + 1 + sovTheproto3(uint64(v)) + i = encodeVarintTheproto3(data, i, uint64(mapSize)) + data[i] = 0x8 + i++ + i = encodeVarintTheproto3(data, i, uint64(k)) + data[i] = 0x10 + i++ + i = encodeVarintTheproto3(data, i, uint64(v)) + } + } + if len(m.Sint32Map) > 0 { + for k := range m.Sint32Map { + data[i] = 0x3a + i++ + v := m.Sint32Map[k] + mapSize := 1 + sozTheproto3(uint64(k)) + 1 + sozTheproto3(uint64(v)) + i = encodeVarintTheproto3(data, i, uint64(mapSize)) + data[i] = 0x8 + i++ + i = encodeVarintTheproto3(data, i, uint64((uint32(k)<<1)^uint32((k>>31)))) + data[i] = 0x10 + i++ + i = encodeVarintTheproto3(data, i, uint64((uint32(v)<<1)^uint32((v>>31)))) + } + } + if len(m.Sint64Map) > 0 { + for k := range m.Sint64Map { + data[i] = 0x42 + i++ + v := m.Sint64Map[k] + mapSize := 1 + sozTheproto3(uint64(k)) + 1 + sozTheproto3(uint64(v)) + i = encodeVarintTheproto3(data, i, uint64(mapSize)) + data[i] = 0x8 + i++ + i = encodeVarintTheproto3(data, i, uint64((uint64(k)<<1)^uint64((k>>63)))) + data[i] = 0x10 + i++ + i = encodeVarintTheproto3(data, i, uint64((uint64(v)<<1)^uint64((v>>63)))) + } + } + if len(m.Fixed32Map) > 0 { + for k := range m.Fixed32Map { + data[i] = 0x4a + i++ + v := m.Fixed32Map[k] + mapSize := 1 + 4 + 1 + 4 + i = encodeVarintTheproto3(data, i, uint64(mapSize)) + data[i] = 0xd + i++ + i = encodeFixed32Theproto3(data, i, uint32(k)) + data[i] = 0x15 + i++ + i = encodeFixed32Theproto3(data, i, uint32(v)) + } + } + if len(m.Sfixed32Map) > 0 { + for k := range m.Sfixed32Map { + data[i] = 0x52 + i++ + v := m.Sfixed32Map[k] + mapSize := 1 + 4 + 1 + 4 + i = encodeVarintTheproto3(data, i, uint64(mapSize)) + data[i] = 0xd + i++ + i = encodeFixed32Theproto3(data, i, uint32(k)) + data[i] = 0x15 + i++ + i = encodeFixed32Theproto3(data, i, uint32(v)) + } + } + if len(m.Fixed64Map) > 0 { + for k := range m.Fixed64Map { + data[i] = 0x5a + i++ + v := m.Fixed64Map[k] + mapSize := 1 + 8 + 1 + 8 + i = encodeVarintTheproto3(data, i, uint64(mapSize)) + data[i] = 0x9 + i++ + i = encodeFixed64Theproto3(data, i, uint64(k)) + data[i] = 0x11 + i++ + i = encodeFixed64Theproto3(data, i, uint64(v)) + } + } + if len(m.Sfixed64Map) > 0 { + for k := range m.Sfixed64Map { + data[i] = 0x62 + i++ + v := m.Sfixed64Map[k] + mapSize := 1 + 8 + 1 + 8 + i = encodeVarintTheproto3(data, i, uint64(mapSize)) + data[i] = 0x9 + i++ + i = encodeFixed64Theproto3(data, i, uint64(k)) + data[i] = 0x11 + i++ + i = encodeFixed64Theproto3(data, i, uint64(v)) + } + } + if len(m.BoolMap) > 0 { + for k := range m.BoolMap { + data[i] = 0x6a + i++ + v := m.BoolMap[k] + mapSize := 1 + 1 + 1 + 1 + i = encodeVarintTheproto3(data, i, uint64(mapSize)) + data[i] = 0x8 + i++ + if k { + data[i] = 1 + } else { + data[i] = 0 + } + i++ + data[i] = 0x10 + i++ + if v { + data[i] = 1 + } else { + data[i] = 0 + } + i++ + } + } + if len(m.StringMap) > 0 { + for k := range m.StringMap { + data[i] = 0x72 + i++ + v := m.StringMap[k] + mapSize := 1 + len(k) + sovTheproto3(uint64(len(k))) + 1 + len(v) + sovTheproto3(uint64(len(v))) + i = encodeVarintTheproto3(data, i, uint64(mapSize)) + data[i] = 0xa + i++ + i = encodeVarintTheproto3(data, i, uint64(len(k))) + i += copy(data[i:], k) + data[i] = 0x12 + i++ + i = encodeVarintTheproto3(data, i, uint64(len(v))) + i += copy(data[i:], v) + } + } + if len(m.StringToBytesMap) > 0 { + for k := range m.StringToBytesMap { + data[i] = 0x7a + i++ + v := m.StringToBytesMap[k] + mapSize := 1 + len(k) + sovTheproto3(uint64(len(k))) + 1 + len(v) + sovTheproto3(uint64(len(v))) + i = encodeVarintTheproto3(data, i, uint64(mapSize)) + data[i] = 0xa + i++ + i = encodeVarintTheproto3(data, i, uint64(len(k))) + i += copy(data[i:], k) + data[i] = 0x12 + i++ + i = encodeVarintTheproto3(data, i, uint64(len(v))) + i += copy(data[i:], v) + } + } + if len(m.StringToEnumMap) > 0 { + for k := range m.StringToEnumMap { + data[i] = 0x82 + i++ + data[i] = 0x1 + i++ + v := m.StringToEnumMap[k] + mapSize := 1 + len(k) + sovTheproto3(uint64(len(k))) + 1 + sovTheproto3(uint64(v)) + i = encodeVarintTheproto3(data, i, uint64(mapSize)) + data[i] = 0xa + i++ + i = encodeVarintTheproto3(data, i, uint64(len(k))) + i += copy(data[i:], k) + data[i] = 0x10 + i++ + i = encodeVarintTheproto3(data, i, uint64(v)) + } + } + if len(m.StringToMsgMap) > 0 { + for k := range m.StringToMsgMap { + data[i] = 0x8a + i++ + data[i] = 0x1 + i++ + v := m.StringToMsgMap[k] + if v == nil { + return 0, errors.New("proto: map has nil element") + } + msgSize := v.Size() + mapSize := 1 + len(k) + sovTheproto3(uint64(len(k))) + 1 + msgSize + sovTheproto3(uint64(msgSize)) + i = encodeVarintTheproto3(data, i, uint64(mapSize)) + data[i] = 0xa + i++ + i = encodeVarintTheproto3(data, i, uint64(len(k))) + i += copy(data[i:], k) + data[i] = 0x12 + i++ + i = encodeVarintTheproto3(data, i, uint64(v.Size())) + n5, err := v.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n5 + } + } + return i, nil +} + +func (m *AllMapsOrdered) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *AllMapsOrdered) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.StringToDoubleMap) > 0 { + keysForStringToDoubleMap := make([]string, 0, len(m.StringToDoubleMap)) + for k := range m.StringToDoubleMap { + keysForStringToDoubleMap = append(keysForStringToDoubleMap, string(k)) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToDoubleMap) + for _, k := range keysForStringToDoubleMap { + data[i] = 0xa + i++ + v := m.StringToDoubleMap[string(k)] + mapSize := 1 + len(k) + sovTheproto3(uint64(len(k))) + 1 + 8 + i = encodeVarintTheproto3(data, i, uint64(mapSize)) + data[i] = 0xa + i++ + i = encodeVarintTheproto3(data, i, uint64(len(k))) + i += copy(data[i:], k) + data[i] = 0x11 + i++ + i = encodeFixed64Theproto3(data, i, uint64(math.Float64bits(float64(v)))) + } + } + if len(m.StringToFloatMap) > 0 { + keysForStringToFloatMap := make([]string, 0, len(m.StringToFloatMap)) + for k := range m.StringToFloatMap { + keysForStringToFloatMap = append(keysForStringToFloatMap, string(k)) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToFloatMap) + for _, k := range keysForStringToFloatMap { + data[i] = 0x12 + i++ + v := m.StringToFloatMap[string(k)] + mapSize := 1 + len(k) + sovTheproto3(uint64(len(k))) + 1 + 4 + i = encodeVarintTheproto3(data, i, uint64(mapSize)) + data[i] = 0xa + i++ + i = encodeVarintTheproto3(data, i, uint64(len(k))) + i += copy(data[i:], k) + data[i] = 0x15 + i++ + i = encodeFixed32Theproto3(data, i, uint32(math.Float32bits(float32(v)))) + } + } + if len(m.Int32Map) > 0 { + keysForInt32Map := make([]int32, 0, len(m.Int32Map)) + for k := range m.Int32Map { + keysForInt32Map = append(keysForInt32Map, int32(k)) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForInt32Map) + for _, k := range keysForInt32Map { + data[i] = 0x1a + i++ + v := m.Int32Map[int32(k)] + mapSize := 1 + sovTheproto3(uint64(k)) + 1 + sovTheproto3(uint64(v)) + i = encodeVarintTheproto3(data, i, uint64(mapSize)) + data[i] = 0x8 + i++ + i = encodeVarintTheproto3(data, i, uint64(k)) + data[i] = 0x10 + i++ + i = encodeVarintTheproto3(data, i, uint64(v)) + } + } + if len(m.Int64Map) > 0 { + keysForInt64Map := make([]int64, 0, len(m.Int64Map)) + for k := range m.Int64Map { + keysForInt64Map = append(keysForInt64Map, int64(k)) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForInt64Map) + for _, k := range keysForInt64Map { + data[i] = 0x22 + i++ + v := m.Int64Map[int64(k)] + mapSize := 1 + sovTheproto3(uint64(k)) + 1 + sovTheproto3(uint64(v)) + i = encodeVarintTheproto3(data, i, uint64(mapSize)) + data[i] = 0x8 + i++ + i = encodeVarintTheproto3(data, i, uint64(k)) + data[i] = 0x10 + i++ + i = encodeVarintTheproto3(data, i, uint64(v)) + } + } + if len(m.Uint32Map) > 0 { + keysForUint32Map := make([]uint32, 0, len(m.Uint32Map)) + for k := range m.Uint32Map { + keysForUint32Map = append(keysForUint32Map, uint32(k)) + } + github_com_gogo_protobuf_sortkeys.Uint32s(keysForUint32Map) + for _, k := range keysForUint32Map { + data[i] = 0x2a + i++ + v := m.Uint32Map[uint32(k)] + mapSize := 1 + sovTheproto3(uint64(k)) + 1 + sovTheproto3(uint64(v)) + i = encodeVarintTheproto3(data, i, uint64(mapSize)) + data[i] = 0x8 + i++ + i = encodeVarintTheproto3(data, i, uint64(k)) + data[i] = 0x10 + i++ + i = encodeVarintTheproto3(data, i, uint64(v)) + } + } + if len(m.Uint64Map) > 0 { + keysForUint64Map := make([]uint64, 0, len(m.Uint64Map)) + for k := range m.Uint64Map { + keysForUint64Map = append(keysForUint64Map, uint64(k)) + } + github_com_gogo_protobuf_sortkeys.Uint64s(keysForUint64Map) + for _, k := range keysForUint64Map { + data[i] = 0x32 + i++ + v := m.Uint64Map[uint64(k)] + mapSize := 1 + sovTheproto3(uint64(k)) + 1 + sovTheproto3(uint64(v)) + i = encodeVarintTheproto3(data, i, uint64(mapSize)) + data[i] = 0x8 + i++ + i = encodeVarintTheproto3(data, i, uint64(k)) + data[i] = 0x10 + i++ + i = encodeVarintTheproto3(data, i, uint64(v)) + } + } + if len(m.Sint32Map) > 0 { + keysForSint32Map := make([]int32, 0, len(m.Sint32Map)) + for k := range m.Sint32Map { + keysForSint32Map = append(keysForSint32Map, int32(k)) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForSint32Map) + for _, k := range keysForSint32Map { + data[i] = 0x3a + i++ + v := m.Sint32Map[int32(k)] + mapSize := 1 + sozTheproto3(uint64(k)) + 1 + sozTheproto3(uint64(v)) + i = encodeVarintTheproto3(data, i, uint64(mapSize)) + data[i] = 0x8 + i++ + i = encodeVarintTheproto3(data, i, uint64((uint32(k)<<1)^uint32((k>>31)))) + data[i] = 0x10 + i++ + i = encodeVarintTheproto3(data, i, uint64((uint32(v)<<1)^uint32((v>>31)))) + } + } + if len(m.Sint64Map) > 0 { + keysForSint64Map := make([]int64, 0, len(m.Sint64Map)) + for k := range m.Sint64Map { + keysForSint64Map = append(keysForSint64Map, int64(k)) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForSint64Map) + for _, k := range keysForSint64Map { + data[i] = 0x42 + i++ + v := m.Sint64Map[int64(k)] + mapSize := 1 + sozTheproto3(uint64(k)) + 1 + sozTheproto3(uint64(v)) + i = encodeVarintTheproto3(data, i, uint64(mapSize)) + data[i] = 0x8 + i++ + i = encodeVarintTheproto3(data, i, uint64((uint64(k)<<1)^uint64((k>>63)))) + data[i] = 0x10 + i++ + i = encodeVarintTheproto3(data, i, uint64((uint64(v)<<1)^uint64((v>>63)))) + } + } + if len(m.Fixed32Map) > 0 { + keysForFixed32Map := make([]uint32, 0, len(m.Fixed32Map)) + for k := range m.Fixed32Map { + keysForFixed32Map = append(keysForFixed32Map, uint32(k)) + } + github_com_gogo_protobuf_sortkeys.Uint32s(keysForFixed32Map) + for _, k := range keysForFixed32Map { + data[i] = 0x4a + i++ + v := m.Fixed32Map[uint32(k)] + mapSize := 1 + 4 + 1 + 4 + i = encodeVarintTheproto3(data, i, uint64(mapSize)) + data[i] = 0xd + i++ + i = encodeFixed32Theproto3(data, i, uint32(k)) + data[i] = 0x15 + i++ + i = encodeFixed32Theproto3(data, i, uint32(v)) + } + } + if len(m.Sfixed32Map) > 0 { + keysForSfixed32Map := make([]int32, 0, len(m.Sfixed32Map)) + for k := range m.Sfixed32Map { + keysForSfixed32Map = append(keysForSfixed32Map, int32(k)) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForSfixed32Map) + for _, k := range keysForSfixed32Map { + data[i] = 0x52 + i++ + v := m.Sfixed32Map[int32(k)] + mapSize := 1 + 4 + 1 + 4 + i = encodeVarintTheproto3(data, i, uint64(mapSize)) + data[i] = 0xd + i++ + i = encodeFixed32Theproto3(data, i, uint32(k)) + data[i] = 0x15 + i++ + i = encodeFixed32Theproto3(data, i, uint32(v)) + } + } + if len(m.Fixed64Map) > 0 { + keysForFixed64Map := make([]uint64, 0, len(m.Fixed64Map)) + for k := range m.Fixed64Map { + keysForFixed64Map = append(keysForFixed64Map, uint64(k)) + } + github_com_gogo_protobuf_sortkeys.Uint64s(keysForFixed64Map) + for _, k := range keysForFixed64Map { + data[i] = 0x5a + i++ + v := m.Fixed64Map[uint64(k)] + mapSize := 1 + 8 + 1 + 8 + i = encodeVarintTheproto3(data, i, uint64(mapSize)) + data[i] = 0x9 + i++ + i = encodeFixed64Theproto3(data, i, uint64(k)) + data[i] = 0x11 + i++ + i = encodeFixed64Theproto3(data, i, uint64(v)) + } + } + if len(m.Sfixed64Map) > 0 { + keysForSfixed64Map := make([]int64, 0, len(m.Sfixed64Map)) + for k := range m.Sfixed64Map { + keysForSfixed64Map = append(keysForSfixed64Map, int64(k)) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForSfixed64Map) + for _, k := range keysForSfixed64Map { + data[i] = 0x62 + i++ + v := m.Sfixed64Map[int64(k)] + mapSize := 1 + 8 + 1 + 8 + i = encodeVarintTheproto3(data, i, uint64(mapSize)) + data[i] = 0x9 + i++ + i = encodeFixed64Theproto3(data, i, uint64(k)) + data[i] = 0x11 + i++ + i = encodeFixed64Theproto3(data, i, uint64(v)) + } + } + if len(m.BoolMap) > 0 { + keysForBoolMap := make([]bool, 0, len(m.BoolMap)) + for k := range m.BoolMap { + keysForBoolMap = append(keysForBoolMap, bool(k)) + } + github_com_gogo_protobuf_sortkeys.Bools(keysForBoolMap) + for _, k := range keysForBoolMap { + data[i] = 0x6a + i++ + v := m.BoolMap[bool(k)] + mapSize := 1 + 1 + 1 + 1 + i = encodeVarintTheproto3(data, i, uint64(mapSize)) + data[i] = 0x8 + i++ + if k { + data[i] = 1 + } else { + data[i] = 0 + } + i++ + data[i] = 0x10 + i++ + if v { + data[i] = 1 + } else { + data[i] = 0 + } + i++ + } + } + if len(m.StringMap) > 0 { + keysForStringMap := make([]string, 0, len(m.StringMap)) + for k := range m.StringMap { + keysForStringMap = append(keysForStringMap, string(k)) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringMap) + for _, k := range keysForStringMap { + data[i] = 0x72 + i++ + v := m.StringMap[string(k)] + mapSize := 1 + len(k) + sovTheproto3(uint64(len(k))) + 1 + len(v) + sovTheproto3(uint64(len(v))) + i = encodeVarintTheproto3(data, i, uint64(mapSize)) + data[i] = 0xa + i++ + i = encodeVarintTheproto3(data, i, uint64(len(k))) + i += copy(data[i:], k) + data[i] = 0x12 + i++ + i = encodeVarintTheproto3(data, i, uint64(len(v))) + i += copy(data[i:], v) + } + } + if len(m.StringToBytesMap) > 0 { + keysForStringToBytesMap := make([]string, 0, len(m.StringToBytesMap)) + for k := range m.StringToBytesMap { + keysForStringToBytesMap = append(keysForStringToBytesMap, string(k)) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToBytesMap) + for _, k := range keysForStringToBytesMap { + data[i] = 0x7a + i++ + v := m.StringToBytesMap[string(k)] + mapSize := 1 + len(k) + sovTheproto3(uint64(len(k))) + 1 + len(v) + sovTheproto3(uint64(len(v))) + i = encodeVarintTheproto3(data, i, uint64(mapSize)) + data[i] = 0xa + i++ + i = encodeVarintTheproto3(data, i, uint64(len(k))) + i += copy(data[i:], k) + data[i] = 0x12 + i++ + i = encodeVarintTheproto3(data, i, uint64(len(v))) + i += copy(data[i:], v) + } + } + if len(m.StringToEnumMap) > 0 { + keysForStringToEnumMap := make([]string, 0, len(m.StringToEnumMap)) + for k := range m.StringToEnumMap { + keysForStringToEnumMap = append(keysForStringToEnumMap, string(k)) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToEnumMap) + for _, k := range keysForStringToEnumMap { + data[i] = 0x82 + i++ + data[i] = 0x1 + i++ + v := m.StringToEnumMap[string(k)] + mapSize := 1 + len(k) + sovTheproto3(uint64(len(k))) + 1 + sovTheproto3(uint64(v)) + i = encodeVarintTheproto3(data, i, uint64(mapSize)) + data[i] = 0xa + i++ + i = encodeVarintTheproto3(data, i, uint64(len(k))) + i += copy(data[i:], k) + data[i] = 0x10 + i++ + i = encodeVarintTheproto3(data, i, uint64(v)) + } + } + if len(m.StringToMsgMap) > 0 { + keysForStringToMsgMap := make([]string, 0, len(m.StringToMsgMap)) + for k := range m.StringToMsgMap { + keysForStringToMsgMap = append(keysForStringToMsgMap, string(k)) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToMsgMap) + for _, k := range keysForStringToMsgMap { + data[i] = 0x8a + i++ + data[i] = 0x1 + i++ + v := m.StringToMsgMap[string(k)] + if v == nil { + return 0, errors.New("proto: map has nil element") + } + msgSize := v.Size() + mapSize := 1 + len(k) + sovTheproto3(uint64(len(k))) + 1 + msgSize + sovTheproto3(uint64(msgSize)) + i = encodeVarintTheproto3(data, i, uint64(mapSize)) + data[i] = 0xa + i++ + i = encodeVarintTheproto3(data, i, uint64(len(k))) + i += copy(data[i:], k) + data[i] = 0x12 + i++ + i = encodeVarintTheproto3(data, i, uint64(v.Size())) + n6, err := v.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n6 + } + } + return i, nil +} + +func (m *MessageWithMap) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *MessageWithMap) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.NameMapping) > 0 { + for k := range m.NameMapping { + data[i] = 0xa + i++ + v := m.NameMapping[k] + mapSize := 1 + sovTheproto3(uint64(k)) + 1 + len(v) + sovTheproto3(uint64(len(v))) + i = encodeVarintTheproto3(data, i, uint64(mapSize)) + data[i] = 0x8 + i++ + i = encodeVarintTheproto3(data, i, uint64(k)) + data[i] = 0x12 + i++ + i = encodeVarintTheproto3(data, i, uint64(len(v))) + i += copy(data[i:], v) + } + } + if len(m.MsgMapping) > 0 { + for k := range m.MsgMapping { + data[i] = 0x12 + i++ + v := m.MsgMapping[k] + if v == nil { + return 0, errors.New("proto: map has nil element") + } + msgSize := v.Size() + mapSize := 1 + sozTheproto3(uint64(k)) + 1 + msgSize + sovTheproto3(uint64(msgSize)) + i = encodeVarintTheproto3(data, i, uint64(mapSize)) + data[i] = 0x8 + i++ + i = encodeVarintTheproto3(data, i, uint64((uint64(k)<<1)^uint64((k>>63)))) + data[i] = 0x12 + i++ + i = encodeVarintTheproto3(data, i, uint64(v.Size())) + n7, err := v.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n7 + } + } + if len(m.ByteMapping) > 0 { + for k := range m.ByteMapping { + data[i] = 0x1a + i++ + v := m.ByteMapping[k] + mapSize := 1 + 1 + 1 + len(v) + sovTheproto3(uint64(len(v))) + i = encodeVarintTheproto3(data, i, uint64(mapSize)) + data[i] = 0x8 + i++ + if k { + data[i] = 1 + } else { + data[i] = 0 + } + i++ + data[i] = 0x12 + i++ + i = encodeVarintTheproto3(data, i, uint64(len(v))) + i += copy(data[i:], v) + } + } + return i, nil +} + +func (m *FloatingPoint) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *FloatingPoint) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.F != 0 { + data[i] = 0x9 + i++ + *(*float64)(unsafe.Pointer(&data[i])) = m.F + i += 8 + } + return i, nil +} + +func (m *Uint128Pair) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *Uint128Pair) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + data[i] = 0xa + i++ + i = encodeVarintTheproto3(data, i, uint64(m.Left.Size())) + n8, err := m.Left.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n8 + if m.Right != nil { + data[i] = 0x12 + i++ + i = encodeVarintTheproto3(data, i, uint64(m.Right.Size())) + n9, err := m.Right.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n9 + } + return i, nil +} + +func (m *ContainsNestedMap) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *ContainsNestedMap) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + return i, nil +} + +func (m *ContainsNestedMap_NestedMap) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *ContainsNestedMap_NestedMap) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.NestedMapField) > 0 { + for k := range m.NestedMapField { + data[i] = 0xa + i++ + v := m.NestedMapField[k] + mapSize := 1 + len(k) + sovTheproto3(uint64(len(k))) + 1 + 8 + i = encodeVarintTheproto3(data, i, uint64(mapSize)) + data[i] = 0xa + i++ + i = encodeVarintTheproto3(data, i, uint64(len(k))) + i += copy(data[i:], k) + data[i] = 0x11 + i++ + i = encodeFixed64Theproto3(data, i, uint64(math.Float64bits(float64(v)))) + } + } + return i, nil +} + +func encodeFixed64Theproto3(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 encodeFixed32Theproto3(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 encodeVarintTheproto3(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 +} + +var fileDescriptorTheproto3 = []byte{ + // 1588 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 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59, 0x9e, 0xe4, 0xd9, + 0x75, 0x1d, 0x5d, 0x3f, 0x71, 0xb7, 0x30, 0xeb, 0x54, 0x9f, 0x20, 0xc8, 0xac, 0x0d, 0x06, 0x5b, + 0xca, 0xb1, 0x85, 0xf6, 0x60, 0xa6, 0x63, 0x9b, 0x9a, 0x7e, 0xb4, 0x63, 0xdc, 0x31, 0x9c, 0xee, + 0x40, 0xc5, 0x51, 0x8c, 0x26, 0x4b, 0x7b, 0x99, 0x9b, 0xb7, 0x0b, 0xaf, 0x8d, 0x61, 0xd9, 0x02, + 0xcf, 0x58, 0xe1, 0x38, 0xda, 0x01, 0xd9, 0x03, 0x37, 0x07, 0x86, 0x62, 0x13, 0xdd, 0x04, 0xd5, + 0x5d, 0x9a, 0xa0, 0xeb, 0x41, 0x99, 0xac, 0x6c, 0x85, 0xc2, 0xe8, 0x16, 0x64, 0x37, 0x74, 0xfb, + 0xfa, 0x0a, 0x51, 0x4b, 0x52, 0xb5, 0x05, 0x81, 0x9a, 0x07, 0x61, 0x2a, 0x59, 0xcd, 0xed, 0xba, + 0xec, 0xf7, 0x6f, 0x10, 0x76, 0x6a, 0x12, 0x9b, 0x42, 0x46, 0x6c, 0xda, 0x45, 0xb7, 0x21, 0xb7, + 0xeb, 0x49, 0xd1, 0x33, 0x99, 0x5f, 0xb9, 0x20, 0xa0, 0xfb, 0x18, 0xc6, 0xcf, 0x39, 0xfe, 0xf0, + 0xae, 0x00, 0x1b, 0x3f, 0x3d, 0x51, 0x80, 0x4b, 0x80, 0x0a, 0xf8, 0x19, 0x74, 0xfc, 0x0c, 0x32, + 0x91, 0x02, 0x9d, 0x50, 0x06, 0x16, 0x9f, 0x41, 0xc7, 0xcf, 0x20, 0x3b, 0x51, 0x80, 0xcf, 0xc0, + 0xf2, 0x33, 0xa8, 0x03, 0x34, 0xb5, 0x6f, 0xd4, 0x43, 0x96, 0x42, 0x8e, 0x2a, 0x54, 0x05, 0x0a, + 0x23, 0x10, 0x93, 0x80, 0x9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xdc, + 0x0a, 0x8f, 0x69, 0xd4, 0x04, 0x57, 0x94, 0xec, 0xbe, 0x93, 0xf5, 0x40, 0x70, 0x76, 0x0d, 0xce, + 0x09, 0x60, 0x6f, 0xf2, 0x42, 0xbe, 0x72, 0x01, 0x32, 0xee, 0xd1, 0x46, 0x69, 0x48, 0x6c, 0xad, + 0xc9, 0x53, 0xf4, 0xb7, 0x2e, 0x4b, 0xf4, 0xb7, 0x21, 0x27, 0xea, 0x9b, 0xa7, 0xcf, 0xe7, 0xa6, + 0x7e, 0xc3, 0xed, 0x0f, 0xdc, 0x9e, 0x3d, 0x9f, 0x93, 0x5e, 0xe2, 0xf6, 0x0a, 0xb7, 0xd7, 0xb8, + 0x3d, 0x7e, 0x31, 0x27, 0xfd, 0x80, 0xdb, 0x8f, 0xb8, 0xfd, 0x8c, 0xdb, 0x2f, 0xb8, 0x9d, 0xbe, + 0xc0, 0x78, 0xdc, 0x9e, 0xe1, 0xeb, 0x97, 0xf8, 0xf7, 0x15, 0xfe, 0x7d, 0x8d, 0xdb, 0xe3, 0xbf, + 0xe6, 0xa6, 0xba, 0x69, 0x36, 0xf7, 0xbf, 0x03, 0x00, 0x00, 0xff, 0xff, 0x24, 0x68, 0x72, 0x9c, + 0x48, 0x1a, 0x00, 0x00, +} diff --git a/vendor/github.com/gogo/protobuf/test/theproto3/combos/unsafemarshaler/theproto3.proto b/vendor/github.com/gogo/protobuf/test/theproto3/combos/unsafemarshaler/theproto3.proto new file mode 100644 index 000000000..891bc46de --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/theproto3/combos/unsafemarshaler/theproto3.proto @@ -0,0 +1,162 @@ +// Copyright (c) 2013, Vastech SA (PTY) LTD. All rights reserved. +// http://github.com/gogo/protobuf/gogoproto +// +// Go support for Protocol Buffers - Google's data interchange format +// +// Copyright 2014 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. + +syntax = "proto3"; + +package theproto3; + +import "github.com/gogo/protobuf/gogoproto/gogo.proto"; + +import "github.com/gogo/protobuf/test/combos/both/thetest.proto"; + +option (gogoproto.goproto_stringer_all) = false; +option (gogoproto.goproto_enum_prefix_all) = false; +option (gogoproto.goproto_getters_all) = false; + +option (gogoproto.equal_all) = true; +option (gogoproto.verbose_equal_all) = true; +option (gogoproto.stringer_all) = true; +option (gogoproto.gostring_all) = true; +option (gogoproto.face_all) = true; +option (gogoproto.description_all) = true; + +option (gogoproto.testgen_all) = true; +option (gogoproto.populate_all) = true; +option (gogoproto.benchgen_all) = true; +option (gogoproto.unmarshaler_all) = false; +option (gogoproto.marshaler_all) = false; +option (gogoproto.sizer_all) = true; + +option (gogoproto.goproto_enum_stringer_all) = false; +option (gogoproto.enum_stringer_all) = true; + +option (gogoproto.unsafe_marshaler_all) = true; +option (gogoproto.unsafe_unmarshaler_all) = false; + +message Message { + enum Humour { + UNKNOWN = 0; + PUNS = 1; + SLAPSTICK = 2; + BILL_BAILEY = 3; + } + + string name = 1; + Humour hilarity = 2; + uint32 height_in_cm = 3; + bytes data = 4; + int64 result_count = 7; + bool true_scotsman = 8; + float score = 9; + + repeated uint64 key = 5; + Nested nested = 6; + + map terrain = 10; + test.NinOptNative proto2_field = 11; + map proto2_value = 13; +} + +message Nested { + string bunny = 1; +} + +enum MapEnum { + MA = 0; + MB = 1; + MC = 2; +} + +message AllMaps { + map StringToDoubleMap = 1; + map StringToFloatMap = 2; + map Int32Map = 3; + map Int64Map = 4; + map Uint32Map = 5; + map Uint64Map = 6; + map Sint32Map = 7; + map Sint64Map = 8; + map Fixed32Map = 9; + map Sfixed32Map = 10; + map Fixed64Map = 11; + map Sfixed64Map = 12; + map BoolMap = 13; + map StringMap = 14; + map StringToBytesMap = 15; + map StringToEnumMap = 16; + map StringToMsgMap = 17; +} + +message AllMapsOrdered { + option (gogoproto.stable_marshaler) = true; + + map StringToDoubleMap = 1; + map StringToFloatMap = 2; + map Int32Map = 3; + map Int64Map = 4; + map Uint32Map = 5; + map Uint64Map = 6; + map Sint32Map = 7; + map Sint64Map = 8; + map Fixed32Map = 9; + map Sfixed32Map = 10; + map Fixed64Map = 11; + map Sfixed64Map = 12; + map BoolMap = 13; + map StringMap = 14; + map StringToBytesMap = 15; + map StringToEnumMap = 16; + map StringToMsgMap = 17; +} + +message MessageWithMap { + map name_mapping = 1; + map msg_mapping = 2; + map byte_mapping = 3; +} + +message FloatingPoint { + double f = 1; +} + +message Uint128Pair { + bytes left = 1 [(gogoproto.nullable) = false, (gogoproto.customtype) = "github.com/gogo/protobuf/test/custom.Uint128"]; + bytes right = 2 [(gogoproto.customtype) = "github.com/gogo/protobuf/test/custom.Uint128"]; +} + +message ContainsNestedMap { + message NestedMap { + map NestedMapField = 1; + } +} \ No newline at end of file diff --git a/vendor/github.com/gogo/protobuf/test/theproto3/combos/unsafemarshaler/theproto3pb_test.go b/vendor/github.com/gogo/protobuf/test/theproto3/combos/unsafemarshaler/theproto3pb_test.go new file mode 100644 index 000000000..a23306c04 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/theproto3/combos/unsafemarshaler/theproto3pb_test.go @@ -0,0 +1,2186 @@ +// Code generated by protoc-gen-gogo. +// source: combos/unsafemarshaler/theproto3.proto +// DO NOT EDIT! + +/* +Package theproto3 is a generated protocol buffer package. + +It is generated from these files: + combos/unsafemarshaler/theproto3.proto + +It has these top-level messages: + Message + Nested + AllMaps + AllMapsOrdered + MessageWithMap + FloatingPoint + Uint128Pair + ContainsNestedMap +*/ +package theproto3 + +import testing "testing" +import math_rand "math/rand" +import time "time" +import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" +import github_com_gogo_protobuf_jsonpb "github.com/gogo/protobuf/jsonpb" +import fmt "fmt" +import go_parser "go/parser" +import proto "github.com/gogo/protobuf/proto" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" +import _ "github.com/gogo/protobuf/test/combos/both" + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +func TestMessageProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMessage(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Message{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestMessageMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMessage(popr, false) + size := p.Size() + data := make([]byte, size) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(data) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Message{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkMessageProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Message, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedMessage(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkMessageProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedMessage(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &Message{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNestedProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNested(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Nested{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestNestedMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNested(popr, false) + size := p.Size() + data := make([]byte, size) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(data) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Nested{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkNestedProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Nested, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNested(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNestedProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNested(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &Nested{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestAllMapsProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAllMaps(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &AllMaps{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestAllMapsMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAllMaps(popr, false) + size := p.Size() + data := make([]byte, size) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(data) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &AllMaps{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkAllMapsProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*AllMaps, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedAllMaps(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkAllMapsProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedAllMaps(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &AllMaps{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestAllMapsOrderedProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAllMapsOrdered(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &AllMapsOrdered{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestAllMapsOrderedMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAllMapsOrdered(popr, false) + size := p.Size() + data := make([]byte, size) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(data) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &AllMapsOrdered{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkAllMapsOrderedProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*AllMapsOrdered, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedAllMapsOrdered(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkAllMapsOrderedProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedAllMapsOrdered(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &AllMapsOrdered{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestMessageWithMapProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMessageWithMap(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &MessageWithMap{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestMessageWithMapMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMessageWithMap(popr, false) + size := p.Size() + data := make([]byte, size) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(data) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &MessageWithMap{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkMessageWithMapProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*MessageWithMap, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedMessageWithMap(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkMessageWithMapProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedMessageWithMap(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &MessageWithMap{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestFloatingPointProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedFloatingPoint(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &FloatingPoint{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestFloatingPointMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedFloatingPoint(popr, false) + size := p.Size() + data := make([]byte, size) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(data) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &FloatingPoint{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkFloatingPointProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*FloatingPoint, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedFloatingPoint(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkFloatingPointProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedFloatingPoint(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &FloatingPoint{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestUint128PairProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUint128Pair(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Uint128Pair{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestUint128PairMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUint128Pair(popr, false) + size := p.Size() + data := make([]byte, size) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(data) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Uint128Pair{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkUint128PairProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Uint128Pair, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedUint128Pair(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkUint128PairProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedUint128Pair(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &Uint128Pair{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestContainsNestedMapProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedContainsNestedMap(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &ContainsNestedMap{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestContainsNestedMapMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedContainsNestedMap(popr, false) + size := p.Size() + data := make([]byte, size) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(data) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &ContainsNestedMap{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkContainsNestedMapProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*ContainsNestedMap, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedContainsNestedMap(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkContainsNestedMapProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedContainsNestedMap(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &ContainsNestedMap{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestContainsNestedMap_NestedMapProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedContainsNestedMap_NestedMap(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &ContainsNestedMap_NestedMap{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestContainsNestedMap_NestedMapMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedContainsNestedMap_NestedMap(popr, false) + size := p.Size() + data := make([]byte, size) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(data) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &ContainsNestedMap_NestedMap{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkContainsNestedMap_NestedMapProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*ContainsNestedMap_NestedMap, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedContainsNestedMap_NestedMap(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkContainsNestedMap_NestedMapProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedContainsNestedMap_NestedMap(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &ContainsNestedMap_NestedMap{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestMessageJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMessage(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Message{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNestedJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNested(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Nested{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestAllMapsJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAllMaps(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &AllMaps{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestAllMapsOrderedJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAllMapsOrdered(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &AllMapsOrdered{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestMessageWithMapJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMessageWithMap(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &MessageWithMap{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestFloatingPointJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedFloatingPoint(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &FloatingPoint{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestUint128PairJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUint128Pair(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Uint128Pair{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestContainsNestedMapJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedContainsNestedMap(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &ContainsNestedMap{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestContainsNestedMap_NestedMapJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedContainsNestedMap_NestedMap(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &ContainsNestedMap_NestedMap{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestMessageProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMessage(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &Message{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestMessageProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMessage(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &Message{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNestedProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNested(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &Nested{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNestedProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNested(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &Nested{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestAllMapsProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAllMaps(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &AllMaps{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestAllMapsProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAllMaps(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &AllMaps{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestAllMapsOrderedProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAllMapsOrdered(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &AllMapsOrdered{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestAllMapsOrderedProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAllMapsOrdered(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &AllMapsOrdered{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestMessageWithMapProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMessageWithMap(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &MessageWithMap{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestMessageWithMapProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMessageWithMap(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &MessageWithMap{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestFloatingPointProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedFloatingPoint(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &FloatingPoint{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestFloatingPointProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedFloatingPoint(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &FloatingPoint{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestUint128PairProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUint128Pair(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &Uint128Pair{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestUint128PairProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUint128Pair(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &Uint128Pair{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestContainsNestedMapProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedContainsNestedMap(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &ContainsNestedMap{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestContainsNestedMapProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedContainsNestedMap(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &ContainsNestedMap{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestContainsNestedMap_NestedMapProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedContainsNestedMap_NestedMap(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &ContainsNestedMap_NestedMap{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestContainsNestedMap_NestedMapProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedContainsNestedMap_NestedMap(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &ContainsNestedMap_NestedMap{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestTheproto3Description(t *testing.T) { + Theproto3Description() +} +func TestMessageVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedMessage(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &Message{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNestedVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNested(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &Nested{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestAllMapsVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAllMaps(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &AllMaps{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestAllMapsOrderedVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAllMapsOrdered(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &AllMapsOrdered{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestMessageWithMapVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedMessageWithMap(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &MessageWithMap{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestFloatingPointVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedFloatingPoint(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &FloatingPoint{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestUint128PairVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedUint128Pair(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &Uint128Pair{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestContainsNestedMapVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedContainsNestedMap(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &ContainsNestedMap{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestContainsNestedMap_NestedMapVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedContainsNestedMap_NestedMap(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &ContainsNestedMap_NestedMap{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestMessageFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedMessage(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNestedFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNested(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestAllMapsFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAllMaps(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestAllMapsOrderedFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAllMapsOrdered(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestMessageWithMapFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedMessageWithMap(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestFloatingPointFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedFloatingPoint(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestUint128PairFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedUint128Pair(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestContainsNestedMapFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedContainsNestedMap(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestContainsNestedMap_NestedMapFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedContainsNestedMap_NestedMap(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestMessageGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedMessage(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestNestedGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNested(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestAllMapsGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAllMaps(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestAllMapsOrderedGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAllMapsOrdered(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestMessageWithMapGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedMessageWithMap(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestFloatingPointGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedFloatingPoint(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestUint128PairGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedUint128Pair(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestContainsNestedMapGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedContainsNestedMap(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestContainsNestedMap_NestedMapGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedContainsNestedMap_NestedMap(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestMessageSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMessage(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkMessageSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Message, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedMessage(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNestedSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNested(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNestedSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Nested, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNested(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestAllMapsSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAllMaps(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkAllMapsSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*AllMaps, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedAllMaps(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestAllMapsOrderedSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAllMapsOrdered(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkAllMapsOrderedSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*AllMapsOrdered, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedAllMapsOrdered(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestMessageWithMapSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMessageWithMap(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkMessageWithMapSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*MessageWithMap, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedMessageWithMap(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestFloatingPointSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedFloatingPoint(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkFloatingPointSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*FloatingPoint, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedFloatingPoint(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestUint128PairSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUint128Pair(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkUint128PairSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Uint128Pair, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedUint128Pair(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestContainsNestedMapSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedContainsNestedMap(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkContainsNestedMapSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*ContainsNestedMap, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedContainsNestedMap(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestContainsNestedMap_NestedMapSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedContainsNestedMap_NestedMap(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkContainsNestedMap_NestedMapSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*ContainsNestedMap_NestedMap, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedContainsNestedMap_NestedMap(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestMessageStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedMessage(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNestedStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNested(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestAllMapsStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAllMaps(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestAllMapsOrderedStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAllMapsOrdered(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestMessageWithMapStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedMessageWithMap(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestFloatingPointStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedFloatingPoint(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestUint128PairStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedUint128Pair(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestContainsNestedMapStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedContainsNestedMap(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestContainsNestedMap_NestedMapStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedContainsNestedMap_NestedMap(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} + +//These tests are generated by github.com/gogo/protobuf/plugin/testgen diff --git a/vendor/github.com/gogo/protobuf/test/theproto3/combos/unsafeunmarshaler/proto3_test.go b/vendor/github.com/gogo/protobuf/test/theproto3/combos/unsafeunmarshaler/proto3_test.go new file mode 100644 index 000000000..b41f17859 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/theproto3/combos/unsafeunmarshaler/proto3_test.go @@ -0,0 +1,61 @@ +// Copyright (c) 2015, Vastech SA (PTY) LTD. All rights reserved. +// http://github.com/gogo/protobuf/gogoproto +// +// 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 theproto3 + +import ( + "reflect" + "testing" + + "github.com/gogo/protobuf/proto" +) + +func TestNilMaps(t *testing.T) { + m := &AllMaps{StringToMsgMap: map[string]*FloatingPoint{"a": nil}} + if _, err := proto.Marshal(m); err == nil { + t.Fatalf("expected error") + } +} + +func TestCustomTypeSize(t *testing.T) { + m := &Uint128Pair{} + m.Size() // Should not panic. +} + +func TestCustomTypeMarshalUnmarshal(t *testing.T) { + m1 := &Uint128Pair{} + if b, err := proto.Marshal(m1); err != nil { + t.Fatal(err) + } else { + m2 := &Uint128Pair{} + if err := proto.Unmarshal(b, m2); err != nil { + t.Fatal(err) + } + if !reflect.DeepEqual(m1, m2) { + t.Errorf("expected %+v, got %+v", m1, m2) + } + } +} diff --git a/vendor/github.com/gogo/protobuf/test/theproto3/combos/unsafeunmarshaler/theproto3.pb.go b/vendor/github.com/gogo/protobuf/test/theproto3/combos/unsafeunmarshaler/theproto3.pb.go new file mode 100644 index 000000000..8fa9e0fd8 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/theproto3/combos/unsafeunmarshaler/theproto3.pb.go @@ -0,0 +1,9496 @@ +// Code generated by protoc-gen-gogo. +// source: combos/unsafeunmarshaler/theproto3.proto +// DO NOT EDIT! + +/* + Package theproto3 is a generated protocol buffer package. + + It is generated from these files: + combos/unsafeunmarshaler/theproto3.proto + + It has these top-level messages: + Message + Nested + AllMaps + AllMapsOrdered + MessageWithMap + FloatingPoint + Uint128Pair + ContainsNestedMap +*/ +package theproto3 + +import proto "github.com/gogo/protobuf/proto" +import fmt "fmt" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" +import test "github.com/gogo/protobuf/test/combos/both" + +import github_com_gogo_protobuf_test_custom "github.com/gogo/protobuf/test/custom" + +import github_com_gogo_protobuf_protoc_gen_gogo_descriptor "github.com/gogo/protobuf/protoc-gen-gogo/descriptor" +import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" +import compress_gzip "compress/gzip" +import bytes "bytes" +import io_ioutil "io/ioutil" + +import strconv "strconv" + +import strings "strings" +import sort "sort" +import reflect "reflect" +import github_com_gogo_protobuf_sortkeys "github.com/gogo/protobuf/sortkeys" + +import io "io" +import unsafe "unsafe" + +// 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. +const _ = proto.GoGoProtoPackageIsVersion1 + +type MapEnum int32 + +const ( + MA MapEnum = 0 + MB MapEnum = 1 + MC MapEnum = 2 +) + +var MapEnum_name = map[int32]string{ + 0: "MA", + 1: "MB", + 2: "MC", +} +var MapEnum_value = map[string]int32{ + "MA": 0, + "MB": 1, + "MC": 2, +} + +func (MapEnum) EnumDescriptor() ([]byte, []int) { return fileDescriptorTheproto3, []int{0} } + +type Message_Humour int32 + +const ( + UNKNOWN Message_Humour = 0 + PUNS Message_Humour = 1 + SLAPSTICK Message_Humour = 2 + BILL_BAILEY Message_Humour = 3 +) + +var Message_Humour_name = map[int32]string{ + 0: "UNKNOWN", + 1: "PUNS", + 2: "SLAPSTICK", + 3: "BILL_BAILEY", +} +var Message_Humour_value = map[string]int32{ + "UNKNOWN": 0, + "PUNS": 1, + "SLAPSTICK": 2, + "BILL_BAILEY": 3, +} + +func (Message_Humour) EnumDescriptor() ([]byte, []int) { return fileDescriptorTheproto3, []int{0, 0} } + +type Message struct { + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + Hilarity Message_Humour `protobuf:"varint,2,opt,name=hilarity,proto3,enum=theproto3.Message_Humour" json:"hilarity,omitempty"` + HeightInCm uint32 `protobuf:"varint,3,opt,name=height_in_cm,json=heightInCm,proto3" json:"height_in_cm,omitempty"` + Data []byte `protobuf:"bytes,4,opt,name=data,proto3" json:"data,omitempty"` + ResultCount int64 `protobuf:"varint,7,opt,name=result_count,json=resultCount,proto3" json:"result_count,omitempty"` + TrueScotsman bool `protobuf:"varint,8,opt,name=true_scotsman,json=trueScotsman,proto3" json:"true_scotsman,omitempty"` + Score float32 `protobuf:"fixed32,9,opt,name=score,proto3" json:"score,omitempty"` + Key []uint64 `protobuf:"varint,5,rep,name=key" json:"key,omitempty"` + Nested *Nested `protobuf:"bytes,6,opt,name=nested" json:"nested,omitempty"` + Terrain map[int64]*Nested `protobuf:"bytes,10,rep,name=terrain" json:"terrain,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value"` + Proto2Field *test.NinOptNative `protobuf:"bytes,11,opt,name=proto2_field,json=proto2Field" json:"proto2_field,omitempty"` + Proto2Value map[int64]*test.NinOptEnum `protobuf:"bytes,13,rep,name=proto2_value,json=proto2Value" json:"proto2_value,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value"` +} + +func (m *Message) Reset() { *m = Message{} } +func (*Message) ProtoMessage() {} +func (*Message) Descriptor() ([]byte, []int) { return fileDescriptorTheproto3, []int{0} } + +type Nested struct { + Bunny string `protobuf:"bytes,1,opt,name=bunny,proto3" json:"bunny,omitempty"` +} + +func (m *Nested) Reset() { *m = Nested{} } +func (*Nested) ProtoMessage() {} +func (*Nested) Descriptor() ([]byte, []int) { return fileDescriptorTheproto3, []int{1} } + +type AllMaps struct { + StringToDoubleMap map[string]float64 `protobuf:"bytes,1,rep,name=StringToDoubleMap,json=stringToDoubleMap" json:"StringToDoubleMap,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"fixed64,2,opt,name=value,proto3"` + StringToFloatMap map[string]float32 `protobuf:"bytes,2,rep,name=StringToFloatMap,json=stringToFloatMap" json:"StringToFloatMap,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"fixed32,2,opt,name=value,proto3"` + Int32Map map[int32]int32 `protobuf:"bytes,3,rep,name=Int32Map,json=int32Map" json:"Int32Map,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` + Int64Map map[int64]int64 `protobuf:"bytes,4,rep,name=Int64Map,json=int64Map" json:"Int64Map,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` + Uint32Map map[uint32]uint32 `protobuf:"bytes,5,rep,name=Uint32Map,json=uint32Map" json:"Uint32Map,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` + Uint64Map map[uint64]uint64 `protobuf:"bytes,6,rep,name=Uint64Map,json=uint64Map" json:"Uint64Map,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` + Sint32Map map[int32]int32 `protobuf:"bytes,7,rep,name=Sint32Map,json=sint32Map" json:"Sint32Map,omitempty" protobuf_key:"zigzag32,1,opt,name=key,proto3" protobuf_val:"zigzag32,2,opt,name=value,proto3"` + Sint64Map map[int64]int64 `protobuf:"bytes,8,rep,name=Sint64Map,json=sint64Map" json:"Sint64Map,omitempty" protobuf_key:"zigzag64,1,opt,name=key,proto3" protobuf_val:"zigzag64,2,opt,name=value,proto3"` + Fixed32Map map[uint32]uint32 `protobuf:"bytes,9,rep,name=Fixed32Map,json=fixed32Map" json:"Fixed32Map,omitempty" protobuf_key:"fixed32,1,opt,name=key,proto3" protobuf_val:"fixed32,2,opt,name=value,proto3"` + Sfixed32Map map[int32]int32 `protobuf:"bytes,10,rep,name=Sfixed32Map,json=sfixed32Map" json:"Sfixed32Map,omitempty" protobuf_key:"fixed32,1,opt,name=key,proto3" protobuf_val:"fixed32,2,opt,name=value,proto3"` + Fixed64Map map[uint64]uint64 `protobuf:"bytes,11,rep,name=Fixed64Map,json=fixed64Map" json:"Fixed64Map,omitempty" protobuf_key:"fixed64,1,opt,name=key,proto3" protobuf_val:"fixed64,2,opt,name=value,proto3"` + Sfixed64Map map[int64]int64 `protobuf:"bytes,12,rep,name=Sfixed64Map,json=sfixed64Map" json:"Sfixed64Map,omitempty" protobuf_key:"fixed64,1,opt,name=key,proto3" protobuf_val:"fixed64,2,opt,name=value,proto3"` + BoolMap map[bool]bool `protobuf:"bytes,13,rep,name=BoolMap,json=boolMap" json:"BoolMap,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` + StringMap map[string]string `protobuf:"bytes,14,rep,name=StringMap,json=stringMap" json:"StringMap,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + StringToBytesMap map[string][]byte `protobuf:"bytes,15,rep,name=StringToBytesMap,json=stringToBytesMap" json:"StringToBytesMap,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + StringToEnumMap map[string]MapEnum `protobuf:"bytes,16,rep,name=StringToEnumMap,json=stringToEnumMap" json:"StringToEnumMap,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3,enum=theproto3.MapEnum"` + StringToMsgMap map[string]*FloatingPoint `protobuf:"bytes,17,rep,name=StringToMsgMap,json=stringToMsgMap" json:"StringToMsgMap,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value"` +} + +func (m *AllMaps) Reset() { *m = AllMaps{} } +func (*AllMaps) ProtoMessage() {} +func (*AllMaps) Descriptor() ([]byte, []int) { return fileDescriptorTheproto3, []int{2} } + +type AllMapsOrdered struct { + StringToDoubleMap map[string]float64 `protobuf:"bytes,1,rep,name=StringToDoubleMap,json=stringToDoubleMap" json:"StringToDoubleMap,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"fixed64,2,opt,name=value,proto3"` + StringToFloatMap map[string]float32 `protobuf:"bytes,2,rep,name=StringToFloatMap,json=stringToFloatMap" json:"StringToFloatMap,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"fixed32,2,opt,name=value,proto3"` + Int32Map map[int32]int32 `protobuf:"bytes,3,rep,name=Int32Map,json=int32Map" json:"Int32Map,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` + Int64Map map[int64]int64 `protobuf:"bytes,4,rep,name=Int64Map,json=int64Map" json:"Int64Map,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` + Uint32Map map[uint32]uint32 `protobuf:"bytes,5,rep,name=Uint32Map,json=uint32Map" json:"Uint32Map,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` + Uint64Map map[uint64]uint64 `protobuf:"bytes,6,rep,name=Uint64Map,json=uint64Map" json:"Uint64Map,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` + Sint32Map map[int32]int32 `protobuf:"bytes,7,rep,name=Sint32Map,json=sint32Map" json:"Sint32Map,omitempty" protobuf_key:"zigzag32,1,opt,name=key,proto3" protobuf_val:"zigzag32,2,opt,name=value,proto3"` + Sint64Map map[int64]int64 `protobuf:"bytes,8,rep,name=Sint64Map,json=sint64Map" json:"Sint64Map,omitempty" protobuf_key:"zigzag64,1,opt,name=key,proto3" protobuf_val:"zigzag64,2,opt,name=value,proto3"` + Fixed32Map map[uint32]uint32 `protobuf:"bytes,9,rep,name=Fixed32Map,json=fixed32Map" json:"Fixed32Map,omitempty" protobuf_key:"fixed32,1,opt,name=key,proto3" protobuf_val:"fixed32,2,opt,name=value,proto3"` + Sfixed32Map map[int32]int32 `protobuf:"bytes,10,rep,name=Sfixed32Map,json=sfixed32Map" json:"Sfixed32Map,omitempty" protobuf_key:"fixed32,1,opt,name=key,proto3" protobuf_val:"fixed32,2,opt,name=value,proto3"` + Fixed64Map map[uint64]uint64 `protobuf:"bytes,11,rep,name=Fixed64Map,json=fixed64Map" json:"Fixed64Map,omitempty" protobuf_key:"fixed64,1,opt,name=key,proto3" protobuf_val:"fixed64,2,opt,name=value,proto3"` + Sfixed64Map map[int64]int64 `protobuf:"bytes,12,rep,name=Sfixed64Map,json=sfixed64Map" json:"Sfixed64Map,omitempty" protobuf_key:"fixed64,1,opt,name=key,proto3" protobuf_val:"fixed64,2,opt,name=value,proto3"` + BoolMap map[bool]bool `protobuf:"bytes,13,rep,name=BoolMap,json=boolMap" json:"BoolMap,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` + StringMap map[string]string `protobuf:"bytes,14,rep,name=StringMap,json=stringMap" json:"StringMap,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + StringToBytesMap map[string][]byte `protobuf:"bytes,15,rep,name=StringToBytesMap,json=stringToBytesMap" json:"StringToBytesMap,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + StringToEnumMap map[string]MapEnum `protobuf:"bytes,16,rep,name=StringToEnumMap,json=stringToEnumMap" json:"StringToEnumMap,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3,enum=theproto3.MapEnum"` + StringToMsgMap map[string]*FloatingPoint `protobuf:"bytes,17,rep,name=StringToMsgMap,json=stringToMsgMap" json:"StringToMsgMap,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value"` +} + +func (m *AllMapsOrdered) Reset() { *m = AllMapsOrdered{} } +func (*AllMapsOrdered) ProtoMessage() {} +func (*AllMapsOrdered) Descriptor() ([]byte, []int) { return fileDescriptorTheproto3, []int{3} } + +type MessageWithMap struct { + NameMapping map[int32]string `protobuf:"bytes,1,rep,name=name_mapping,json=nameMapping" json:"name_mapping,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + MsgMapping map[int64]*FloatingPoint `protobuf:"bytes,2,rep,name=msg_mapping,json=msgMapping" json:"msg_mapping,omitempty" protobuf_key:"zigzag64,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value"` + ByteMapping map[bool][]byte `protobuf:"bytes,3,rep,name=byte_mapping,json=byteMapping" json:"byte_mapping,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` +} + +func (m *MessageWithMap) Reset() { *m = MessageWithMap{} } +func (*MessageWithMap) ProtoMessage() {} +func (*MessageWithMap) Descriptor() ([]byte, []int) { return fileDescriptorTheproto3, []int{4} } + +type FloatingPoint struct { + F float64 `protobuf:"fixed64,1,opt,name=f,proto3" json:"f,omitempty"` +} + +func (m *FloatingPoint) Reset() { *m = FloatingPoint{} } +func (*FloatingPoint) ProtoMessage() {} +func (*FloatingPoint) Descriptor() ([]byte, []int) { return fileDescriptorTheproto3, []int{5} } + +type Uint128Pair struct { + Left github_com_gogo_protobuf_test_custom.Uint128 `protobuf:"bytes,1,opt,name=left,proto3,customtype=github.com/gogo/protobuf/test/custom.Uint128" json:"left"` + Right *github_com_gogo_protobuf_test_custom.Uint128 `protobuf:"bytes,2,opt,name=right,proto3,customtype=github.com/gogo/protobuf/test/custom.Uint128" json:"right,omitempty"` +} + +func (m *Uint128Pair) Reset() { *m = Uint128Pair{} } +func (*Uint128Pair) ProtoMessage() {} +func (*Uint128Pair) Descriptor() ([]byte, []int) { return fileDescriptorTheproto3, []int{6} } + +type ContainsNestedMap struct { +} + +func (m *ContainsNestedMap) Reset() { *m = ContainsNestedMap{} } +func (*ContainsNestedMap) ProtoMessage() {} +func (*ContainsNestedMap) Descriptor() ([]byte, []int) { return fileDescriptorTheproto3, []int{7} } + +type ContainsNestedMap_NestedMap struct { + NestedMapField map[string]float64 `protobuf:"bytes,1,rep,name=NestedMapField,json=nestedMapField" json:"NestedMapField,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"fixed64,2,opt,name=value,proto3"` +} + +func (m *ContainsNestedMap_NestedMap) Reset() { *m = ContainsNestedMap_NestedMap{} } +func (*ContainsNestedMap_NestedMap) ProtoMessage() {} +func (*ContainsNestedMap_NestedMap) Descriptor() ([]byte, []int) { + return fileDescriptorTheproto3, []int{7, 0} +} + +func init() { + proto.RegisterType((*Message)(nil), "theproto3.Message") + proto.RegisterType((*Nested)(nil), "theproto3.Nested") + proto.RegisterType((*AllMaps)(nil), "theproto3.AllMaps") + proto.RegisterType((*AllMapsOrdered)(nil), "theproto3.AllMapsOrdered") + proto.RegisterType((*MessageWithMap)(nil), "theproto3.MessageWithMap") + proto.RegisterType((*FloatingPoint)(nil), "theproto3.FloatingPoint") + proto.RegisterType((*Uint128Pair)(nil), "theproto3.Uint128Pair") + proto.RegisterType((*ContainsNestedMap)(nil), "theproto3.ContainsNestedMap") + proto.RegisterType((*ContainsNestedMap_NestedMap)(nil), "theproto3.ContainsNestedMap.NestedMap") + proto.RegisterEnum("theproto3.MapEnum", MapEnum_name, MapEnum_value) + proto.RegisterEnum("theproto3.Message_Humour", Message_Humour_name, Message_Humour_value) +} +func (this *Message) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return Theproto3Description() +} +func (this *Nested) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return Theproto3Description() +} +func (this *AllMaps) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return Theproto3Description() +} +func (this *AllMapsOrdered) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return Theproto3Description() +} +func (this *MessageWithMap) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return Theproto3Description() +} +func (this *FloatingPoint) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return Theproto3Description() +} +func (this *Uint128Pair) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return Theproto3Description() +} +func (this *ContainsNestedMap) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return Theproto3Description() +} +func (this *ContainsNestedMap_NestedMap) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return Theproto3Description() +} +func Theproto3Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + d := &github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet{} + var gzipped = []byte{ + // 7462 bytes of a gzipped FileDescriptorSet + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xec, 0x7d, 0x7b, 0x6c, 0x63, 0xd7, + 0x79, 0xe7, 0x90, 0x97, 0x94, 0xa8, 0x8f, 0x14, 0x45, 0xdd, 0xd1, 0xc8, 0xb4, 0x3c, 0x9e, 0x07, + 0x3d, 0x1e, 0xcb, 0x8a, 0xad, 0xd1, 0x68, 0x34, 0x0f, 0xd3, 0xaf, 0x15, 0x29, 0x6a, 0xac, 0x89, + 0x5e, 0xb9, 0x92, 0xfc, 0x88, 0x17, 0x4b, 0x50, 0xe4, 0x95, 0x44, 0x9b, 0xba, 0xd4, 0xf2, 0x92, + 0xb6, 0x27, 0x7f, 0x2c, 0xb2, 0xc9, 0x6e, 0x36, 0xd9, 0xc5, 0xee, 0xb6, 0x4d, 0x8b, 0xe6, 0x1d, + 0x3b, 0x45, 0x1a, 0x27, 0x7d, 0x25, 0x69, 0x1a, 0x14, 0x41, 0xd1, 0xb8, 0x28, 0x92, 0x4e, 0xfb, + 0x47, 0xe1, 0xa6, 0xff, 0x14, 0x45, 0x61, 0xe4, 0x05, 0x34, 0x6d, 0xd3, 0x36, 0x01, 0x0c, 0x24, + 0x40, 0xf2, 0x47, 0xcf, 0xfb, 0x9e, 0x73, 0x78, 0x2f, 0x2f, 0x35, 0x63, 0xc7, 0xf9, 0xc3, 0x06, + 0x38, 0x22, 0xcf, 0xf9, 0x7e, 0xdf, 0xf9, 0xce, 0xf7, 0x3a, 0xdf, 0x3d, 0xe7, 0xde, 0x6b, 0xf8, + 0xf3, 0xf3, 0x70, 0x6a, 0xb7, 0xd9, 0xdc, 0x6d, 0xd8, 0xe7, 0x0e, 0x5a, 0xcd, 0x76, 0x73, 0xbb, + 0xb3, 0x73, 0xae, 0x66, 0xbb, 0xd5, 0x56, 0xfd, 0xa0, 0xdd, 0x6c, 0x4d, 0x93, 0x36, 0x73, 0x84, + 0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x6e, 0xc0, 0x7a, 0x35, 0x27, 0x20, 0x41, 0xdc, 0xac, 0x66, 0xf3, 0xa5, + 0x41, 0xfc, 0xc6, 0x86, 0xa9, 0xd9, 0x3b, 0x95, 0x4e, 0xa3, 0x5d, 0x7e, 0xae, 0xd2, 0xe8, 0xd8, + 0xc4, 0x61, 0x90, 0x61, 0x58, 0xe3, 0xe3, 0xb8, 0xcd, 0x3c, 0x09, 0x49, 0xea, 0x95, 0x75, 0x84, + 0x79, 0x81, 0x64, 0x9f, 0xb8, 0x45, 0x1d, 0x75, 0x09, 0xb7, 0xe0, 0xe1, 0x9f, 0x71, 0x51, 0x2c, + 0x30, 0xd3, 0x92, 0x21, 0x70, 0x03, 0x19, 0xfe, 0xb2, 0x9e, 0xf8, 0xee, 0xf4, 0x9f, 0x9e, 0xee, + 0x8b, 0xb9, 0xaf, 0x46, 0x21, 0x46, 0xe2, 0x6d, 0x04, 0x92, 0x9b, 0x4f, 0xad, 0x97, 0xca, 0x0b, + 0x6b, 0x5b, 0x85, 0xe5, 0x52, 0x26, 0x62, 0xa6, 0x01, 0x48, 0xc3, 0xe2, 0xf2, 0xda, 0xfc, 0x66, + 0x26, 0x2a, 0x7e, 0x2f, 0xad, 0x6e, 0x5e, 0x9a, 0xcb, 0x18, 0x02, 0xb0, 0x45, 0x1b, 0x62, 0x32, + 0xc1, 0x85, 0xd9, 0x4c, 0x1c, 0x79, 0x42, 0x8a, 0x32, 0x58, 0x7a, 0xb2, 0xb4, 0x80, 0x28, 0x06, + 0xd4, 0x16, 0x44, 0x33, 0x68, 0x0e, 0xc3, 0x10, 0x69, 0x29, 0xac, 0xad, 0x2d, 0x67, 0x12, 0x82, + 0xe7, 0xc6, 0xa6, 0xb5, 0xb4, 0x7a, 0x35, 0x33, 0x24, 0x78, 0x5e, 0xb5, 0xd6, 0xb6, 0xd6, 0x33, + 0x20, 0x38, 0xac, 0x94, 0x36, 0x36, 0xe6, 0xaf, 0x96, 0x32, 0x49, 0x41, 0x51,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xcc, 0x08, 0x88, + 0x31, 0x23, 0x20, 0xc6, 0x8c, 0x80, 0x18, 0x33, 0x02, 0x62, 0xcc, 0x08, 0x88, 0x31, 0x23, 0x20, + 0xc6, 0x8c, 0xa0, 0x18, 0x33, 0x02, 0x63, 0xcc, 0x08, 0x8c, 0x31, 0x23, 0x30, 0xc6, 0x8c, 0xc0, + 0x18, 0x33, 0x02, 0x63, 0xcc, 0x90, 0x63, 0xec, 0x4f, 0x0c, 0x30, 0x69, 0x8c, 0xad, 0x93, 0x9b, + 0x03, 0x98, 0x29, 0x4e, 0x68, 0x91, 0x36, 0x80, 0x4d, 0x97, 0xf1, 0x4c, 0x72, 0x42, 0x8b, 0x35, + 0xb5, 0x7f, 0x56, 0xf4, 0xf3, 0x68, 0x53, 0xfb, 0x2f, 0x88, 0x7e, 0x1e, 0x6f, 0x6a, 0xff, 0x9c, + 0xe8, 0xe7, 0x11, 0xa7, 0xf6, 0x5f, 0x14, 0xfd, 0x3c, 0xe6, 0xd4, 0xfe, 0x4b, 0xa2, 0x9f, 0x47, + 0x9d, 0xda, 0x7f, 0x59, 0xf4, 0xf3, 0xb8, 0x53, 0xfb, 0xaf, 0x88, 0x7e, 0x1e, 0x79, 0x6a, 0xff, + 0x03, 0xe6, 0x29, 0x3d, 0xf6, 0x38, 0x81, 0x30, 0xed, 0x29, 0x3d, 0xfa, 0x34, 0x8a, 0xf3, 0x1e, + 0x05, 0x8f, 0x3f, 0x8d, 0x62, 0xd6, 0xa3, 0xe0, 0x11, 0xa8, 0x51, 0x5c, 0xc8, 0x7d, 0x90, 0x98, + 0xcf, 0xd1, 0xcd, 0x37, 0xa1, 0x99, 0x2f, 0x2a, 0x99, 0x6e, 0x42, 0x33, 0x5d, 0x54, 0x32, 0xdb, + 0x84, 0x66, 0xb6, 0xa8, 0x64, 0xb2, 0x09, 0xcd, 0x64, 0x51, 0xc9, 0x5c, 0x13, 0x9a, 0xb9, 0xa2, + 0x92, 0xa9, 0x26, 0x34, 0x53, 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xd3, 0x82, 0x01, + 0x32, 0xae, 0x4b, 0xcc, 0x7b, 0x2b, 0x03, 0x23, 0xd3, 0x93, 0x81, 0xdd, 0xdc, 0x2b, 0x11, 0x38, + 0xa5, 0xb8, 0xf2, 0x1b, 0x73, 0x62, 0xf0, 0x60, 0x5f, 0x27, 0x06, 0x4a, 0x80, 0x78, 0xa7, 0x07, + 0xf7, 0x74, 0x1f, 0x54, 0xcb, 0x51, 0xa2, 0x9f, 0x24, 0xfc, 0x37, 0x48, 0x7b, 0x33, 0x20, 0x97, + 0x6c, 0x17, 0xc3, 0x37, 0x33, 0xfd, 0x42, 0xf3, 0xa2, 0xb6, 0x89, 0xd6, 0x13, 0x26, 0xa2, 0x35, + 0x97, 0x47, 0x57, 0x9c, 0xea, 0xe3, 0x30, 0x61, 0x7b, 0x11, 0x09, 0x5c, 0x9a, 0xdf, 0x78, 0x09, + 0x95, 0xe7, 0xf7, 0x41, 0x4a, 0x7e, 0xe2, 0x45, 0x03, 0x0e, 0x71, 0x60, 0x3e, 0xf6, 0x2a, 0xa6, + 0xfe, 0x8d, 0x08, 0x1c, 0x93, 0xc9, 0x9f, 0x40, 0xb6, 0x5f, 0x72, 0x70, 0x4d, 0xff, 0x30, 0x24, + 0x6c, 0x66, 0x38, 0xf6, 0xda, 0x0d, 0x76, 0x19, 0xe9, 0x4b, 0x3e, 0x4d, 0xfe, 0xb5, 0x04, 0x44, + 0xdb, 0xe2, 0xe0, 0xc3, 0xce, 0x4e, 0xdc, 0x0d, 0x71, 0xca, 0x5f, 0x95, 0x6b, 0x58, 0x93, 0xeb, + 0xb3, 0x3e, 0x72, 0x11, 0x3f, 0x32, 0xaf, 0x29, 0x72, 0x49, 0x57, 0xab, 0xbe, 0xe4, 0xd3, 0xdc, + 0xf9, 0x0a, 0x09, 0x5c, 0xff, 0x11, 0x8f, 0x0a, 0x17, 0x72, 0x12, 0x12, 0x25, 0x9d, 0xc6, 0x5f, + 0xce, 0x05, 0x88, 0xad, 0xe2, 0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e, 0x9c, 0x94, 0xb2, 0xcd, + 0xb8, 0x5a, 0xb3, 0xf9, 0x10, 0x24, 0x96, 0x9c, 0xf6, 0x85, 0x59, 0xcc, 0x8d, 0xbf, 0xd8, 0xbf, + 0x9b, 0x1b, 0x27, 0xa1, 0x5c, 0x12, 0x75, 0xf6, 0x93, 0xa1, 0x2f, 0xcd, 0x61, 0x74, 0xac, 0x17, + 0x9a, 0x90, 0x78, 0x68, 0xf2, 0x13, 0x1f, 0xaa, 0x6c, 0x71, 0x56, 0xec, 0x5d, 0xfe, 0xa7, 0x7d, + 0xe0, 0x82, 0x86, 0xe2, 0x87, 0x3a, 0x62, 0x78, 0xc6, 0x80, 0x8e, 0x3f, 0xd0, 0x93, 0x81, 0x24, + 0x00, 0x61, 0x20, 0x24, 0xd8, 0x10, 0x12, 0x0c, 0x06, 0x32, 0xd8, 0xd0, 0x24, 0x70, 0x65, 0x09, + 0x36, 0x84, 0x04, 0x89, 0x9e, 0x0c, 0x64, 0x09, 0x5c, 0x21, 0x41, 0x01, 0x60, 0xb1, 0xfe, 0x82, + 0x5d, 0xa3, 0x22, 0xd0, 0xd7, 0xfe, 0xe7, 0x7c, 0x38, 0x78, 0x44, 0x94, 0x05, 0xec, 0x88, 0x06, + 0xb3, 0x04, 0xc9, 0x0d, 0xef, 0x27, 0x4b, 0x1f, 0x77, 0xf9, 0x89, 0xb1, 0xa3, 0x71, 0x49, 0xba, + 0x12, 0x1b, 0x2e, 0x0a, 0x9d, 0x4c, 0xb2, 0xb7, 0x28, 0xd2, 0x6c, 0xa8, 0x28, 0x74, 0x3a, 0x42, + 0x14, 0xca, 0x24, 0x15, 0x22, 0x8a, 0xc4, 0x85, 0x89, 0x42, 0xd9, 0xa0, 0x64, 0x58, 0x68, 0x36, + 0x31, 0x25, 0xcb, 0x4a, 0x27, 0x7d, 0x58, 0x30, 0x0a, 0x96, 0x0c, 0xb7, 0xe9, 0x2f, 0x62, 0x11, + 0xe2, 0xe4, 0x18, 0x9c, 0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x53, 0x9c, 0xe7, 0x09, 0x18, 0xd1, 0xa4, 0xf5, 0x89, 0xf9, + 0x9b, 0xb0, 0x0d, 0x16, 0x4c, 0x97, 0x3c, 0x2c, 0x26, 0x64, 0x87, 0xcc, 0xdd, 0x09, 0xc3, 0x0a, + 0x6f, 0x33, 0x05, 0x91, 0x1d, 0xf6, 0xd4, 0x5e, 0x64, 0x07, 0x3f, 0x28, 0x9d, 0x64, 0x47, 0xd6, + 0xeb, 0x95, 0x7a, 0xcb, 0x7c, 0x0c, 0xc8, 0x73, 0x31, 0xec, 0x58, 0xfe, 0xe6, 0x9e, 0xd2, 0xa4, + 0x4f, 0xd6, 0x2c, 0x02, 0x7d, 0x6c, 0xe6, 0xe6, 0x1f, 0x33, 0xa5, 0x4f, 0xdd, 0xdc, 0x88, 0xc0, + 0x28, 0xbb, 0xa3, 0xd2, 0x65, 0xf7, 0xd9, 0xa2, 0x15, 0xf2, 0xcb, 0x11, 0x18, 0x12, 0xbf, 0xcc, + 0x6d, 0x48, 0x8b, 0x1f, 0xf4, 0x5e, 0x6e, 0xea, 0xa9, 0x79, 0x49, 0xc3, 0x5d, 0x3c, 0xa6, 0x7d, + 0xbe, 0xd1, 0x83, 0x2c, 0xba, 0x26, 0x3b, 0x4a, 0xe3, 0xc4, 0x3c, 0x1c, 0xf5, 0x21, 0x3b, 0xcc, + 0x82, 0x3c, 0x75, 0x1a, 0x06, 0x59, 0x68, 0xe3, 0x83, 0xc3, 0x15, 0x7c, 0xf0, 0x88, 0xff, 0xe2, + 0xc3, 0x4c, 0xfc, 0xb7, 0x98, 0x89, 0x16, 0x96, 0x6f, 0xe2, 0x30, 0xe9, 0xc8, 0xab, 0xe8, 0xe3, + 0x73, 0x98, 0x14, 0xd9, 0x1e, 0xa0, 0x73, 0xff, 0x8f, 0x00, 0x00, 0x00, 0xff, 0xff, 0xa4, 0x53, + 0xbe, 0xfe, 0x80, 0x79, 0x00, 0x00, + } + r := bytes.NewReader(gzipped) + gzipr, err := compress_gzip.NewReader(r) + if err != nil { + panic(err) + } + ungzipped, err := io_ioutil.ReadAll(gzipr) + if err != nil { + panic(err) + } + if err := github_com_gogo_protobuf_proto.Unmarshal(ungzipped, d); err != nil { + panic(err) + } + return d +} +func (x MapEnum) String() string { + s, ok := MapEnum_name[int32(x)] + if ok { + return s + } + return strconv.Itoa(int(x)) +} +func (x Message_Humour) String() string { + s, ok := Message_Humour_name[int32(x)] + if ok { + return s + } + return strconv.Itoa(int(x)) +} +func (this *Message) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*Message) + if !ok { + that2, ok := that.(Message) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *Message") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *Message but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *Message 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.Hilarity != that1.Hilarity { + return fmt.Errorf("Hilarity this(%v) Not Equal that(%v)", this.Hilarity, that1.Hilarity) + } + if this.HeightInCm != that1.HeightInCm { + return fmt.Errorf("HeightInCm this(%v) Not Equal that(%v)", this.HeightInCm, that1.HeightInCm) + } + if !bytes.Equal(this.Data, that1.Data) { + return fmt.Errorf("Data this(%v) Not Equal that(%v)", this.Data, that1.Data) + } + if this.ResultCount != that1.ResultCount { + return fmt.Errorf("ResultCount this(%v) Not Equal that(%v)", this.ResultCount, that1.ResultCount) + } + if this.TrueScotsman != that1.TrueScotsman { + return fmt.Errorf("TrueScotsman this(%v) Not Equal that(%v)", this.TrueScotsman, that1.TrueScotsman) + } + if this.Score != that1.Score { + return fmt.Errorf("Score this(%v) Not Equal that(%v)", this.Score, that1.Score) + } + if len(this.Key) != len(that1.Key) { + return fmt.Errorf("Key this(%v) Not Equal that(%v)", len(this.Key), len(that1.Key)) + } + for i := range this.Key { + if this.Key[i] != that1.Key[i] { + return fmt.Errorf("Key this[%v](%v) Not Equal that[%v](%v)", i, this.Key[i], i, that1.Key[i]) + } + } + if !this.Nested.Equal(that1.Nested) { + return fmt.Errorf("Nested this(%v) Not Equal that(%v)", this.Nested, that1.Nested) + } + if len(this.Terrain) != len(that1.Terrain) { + return fmt.Errorf("Terrain this(%v) Not Equal that(%v)", len(this.Terrain), len(that1.Terrain)) + } + for i := range this.Terrain { + if !this.Terrain[i].Equal(that1.Terrain[i]) { + return fmt.Errorf("Terrain this[%v](%v) Not Equal that[%v](%v)", i, this.Terrain[i], i, that1.Terrain[i]) + } + } + if !this.Proto2Field.Equal(that1.Proto2Field) { + return fmt.Errorf("Proto2Field this(%v) Not Equal that(%v)", this.Proto2Field, that1.Proto2Field) + } + if len(this.Proto2Value) != len(that1.Proto2Value) { + return fmt.Errorf("Proto2Value this(%v) Not Equal that(%v)", len(this.Proto2Value), len(that1.Proto2Value)) + } + for i := range this.Proto2Value { + if !this.Proto2Value[i].Equal(that1.Proto2Value[i]) { + return fmt.Errorf("Proto2Value this[%v](%v) Not Equal that[%v](%v)", i, this.Proto2Value[i], i, that1.Proto2Value[i]) + } + } + return nil +} +func (this *Message) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*Message) + if !ok { + that2, ok := that.(Message) + 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.Hilarity != that1.Hilarity { + return false + } + if this.HeightInCm != that1.HeightInCm { + return false + } + if !bytes.Equal(this.Data, that1.Data) { + return false + } + if this.ResultCount != that1.ResultCount { + return false + } + if this.TrueScotsman != that1.TrueScotsman { + return false + } + if this.Score != that1.Score { + return false + } + if len(this.Key) != len(that1.Key) { + return false + } + for i := range this.Key { + if this.Key[i] != that1.Key[i] { + return false + } + } + if !this.Nested.Equal(that1.Nested) { + return false + } + if len(this.Terrain) != len(that1.Terrain) { + return false + } + for i := range this.Terrain { + if !this.Terrain[i].Equal(that1.Terrain[i]) { + return false + } + } + if !this.Proto2Field.Equal(that1.Proto2Field) { + return false + } + if len(this.Proto2Value) != len(that1.Proto2Value) { + return false + } + for i := range this.Proto2Value { + if !this.Proto2Value[i].Equal(that1.Proto2Value[i]) { + return false + } + } + return true +} +func (this *Nested) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*Nested) + if !ok { + that2, ok := that.(Nested) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *Nested") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *Nested but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *Nested but is not nil && this == nil") + } + if this.Bunny != that1.Bunny { + return fmt.Errorf("Bunny this(%v) Not Equal that(%v)", this.Bunny, that1.Bunny) + } + return nil +} +func (this *Nested) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*Nested) + if !ok { + that2, ok := that.(Nested) + 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.Bunny != that1.Bunny { + return false + } + return true +} +func (this *AllMaps) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*AllMaps) + if !ok { + that2, ok := that.(AllMaps) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *AllMaps") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *AllMaps but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *AllMaps but is not nil && this == nil") + } + if len(this.StringToDoubleMap) != len(that1.StringToDoubleMap) { + return fmt.Errorf("StringToDoubleMap this(%v) Not Equal that(%v)", len(this.StringToDoubleMap), len(that1.StringToDoubleMap)) + } + for i := range this.StringToDoubleMap { + if this.StringToDoubleMap[i] != that1.StringToDoubleMap[i] { + return fmt.Errorf("StringToDoubleMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringToDoubleMap[i], i, that1.StringToDoubleMap[i]) + } + } + if len(this.StringToFloatMap) != len(that1.StringToFloatMap) { + return fmt.Errorf("StringToFloatMap this(%v) Not Equal that(%v)", len(this.StringToFloatMap), len(that1.StringToFloatMap)) + } + for i := range this.StringToFloatMap { + if this.StringToFloatMap[i] != that1.StringToFloatMap[i] { + return fmt.Errorf("StringToFloatMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringToFloatMap[i], i, that1.StringToFloatMap[i]) + } + } + if len(this.Int32Map) != len(that1.Int32Map) { + return fmt.Errorf("Int32Map this(%v) Not Equal that(%v)", len(this.Int32Map), len(that1.Int32Map)) + } + for i := range this.Int32Map { + if this.Int32Map[i] != that1.Int32Map[i] { + return fmt.Errorf("Int32Map this[%v](%v) Not Equal that[%v](%v)", i, this.Int32Map[i], i, that1.Int32Map[i]) + } + } + if len(this.Int64Map) != len(that1.Int64Map) { + return fmt.Errorf("Int64Map this(%v) Not Equal that(%v)", len(this.Int64Map), len(that1.Int64Map)) + } + for i := range this.Int64Map { + if this.Int64Map[i] != that1.Int64Map[i] { + return fmt.Errorf("Int64Map this[%v](%v) Not Equal that[%v](%v)", i, this.Int64Map[i], i, that1.Int64Map[i]) + } + } + if len(this.Uint32Map) != len(that1.Uint32Map) { + return fmt.Errorf("Uint32Map this(%v) Not Equal that(%v)", len(this.Uint32Map), len(that1.Uint32Map)) + } + for i := range this.Uint32Map { + if this.Uint32Map[i] != that1.Uint32Map[i] { + return fmt.Errorf("Uint32Map this[%v](%v) Not Equal that[%v](%v)", i, this.Uint32Map[i], i, that1.Uint32Map[i]) + } + } + if len(this.Uint64Map) != len(that1.Uint64Map) { + return fmt.Errorf("Uint64Map this(%v) Not Equal that(%v)", len(this.Uint64Map), len(that1.Uint64Map)) + } + for i := range this.Uint64Map { + if this.Uint64Map[i] != that1.Uint64Map[i] { + return fmt.Errorf("Uint64Map this[%v](%v) Not Equal that[%v](%v)", i, this.Uint64Map[i], i, that1.Uint64Map[i]) + } + } + if len(this.Sint32Map) != len(that1.Sint32Map) { + return fmt.Errorf("Sint32Map this(%v) Not Equal that(%v)", len(this.Sint32Map), len(that1.Sint32Map)) + } + for i := range this.Sint32Map { + if this.Sint32Map[i] != that1.Sint32Map[i] { + return fmt.Errorf("Sint32Map this[%v](%v) Not Equal that[%v](%v)", i, this.Sint32Map[i], i, that1.Sint32Map[i]) + } + } + if len(this.Sint64Map) != len(that1.Sint64Map) { + return fmt.Errorf("Sint64Map this(%v) Not Equal that(%v)", len(this.Sint64Map), len(that1.Sint64Map)) + } + for i := range this.Sint64Map { + if this.Sint64Map[i] != that1.Sint64Map[i] { + return fmt.Errorf("Sint64Map this[%v](%v) Not Equal that[%v](%v)", i, this.Sint64Map[i], i, that1.Sint64Map[i]) + } + } + if len(this.Fixed32Map) != len(that1.Fixed32Map) { + return fmt.Errorf("Fixed32Map this(%v) Not Equal that(%v)", len(this.Fixed32Map), len(that1.Fixed32Map)) + } + for i := range this.Fixed32Map { + if this.Fixed32Map[i] != that1.Fixed32Map[i] { + return fmt.Errorf("Fixed32Map this[%v](%v) Not Equal that[%v](%v)", i, this.Fixed32Map[i], i, that1.Fixed32Map[i]) + } + } + if len(this.Sfixed32Map) != len(that1.Sfixed32Map) { + return fmt.Errorf("Sfixed32Map this(%v) Not Equal that(%v)", len(this.Sfixed32Map), len(that1.Sfixed32Map)) + } + for i := range this.Sfixed32Map { + if this.Sfixed32Map[i] != that1.Sfixed32Map[i] { + return fmt.Errorf("Sfixed32Map this[%v](%v) Not Equal that[%v](%v)", i, this.Sfixed32Map[i], i, that1.Sfixed32Map[i]) + } + } + if len(this.Fixed64Map) != len(that1.Fixed64Map) { + return fmt.Errorf("Fixed64Map this(%v) Not Equal that(%v)", len(this.Fixed64Map), len(that1.Fixed64Map)) + } + for i := range this.Fixed64Map { + if this.Fixed64Map[i] != that1.Fixed64Map[i] { + return fmt.Errorf("Fixed64Map this[%v](%v) Not Equal that[%v](%v)", i, this.Fixed64Map[i], i, that1.Fixed64Map[i]) + } + } + if len(this.Sfixed64Map) != len(that1.Sfixed64Map) { + return fmt.Errorf("Sfixed64Map this(%v) Not Equal that(%v)", len(this.Sfixed64Map), len(that1.Sfixed64Map)) + } + for i := range this.Sfixed64Map { + if this.Sfixed64Map[i] != that1.Sfixed64Map[i] { + return fmt.Errorf("Sfixed64Map this[%v](%v) Not Equal that[%v](%v)", i, this.Sfixed64Map[i], i, that1.Sfixed64Map[i]) + } + } + if len(this.BoolMap) != len(that1.BoolMap) { + return fmt.Errorf("BoolMap this(%v) Not Equal that(%v)", len(this.BoolMap), len(that1.BoolMap)) + } + for i := range this.BoolMap { + if this.BoolMap[i] != that1.BoolMap[i] { + return fmt.Errorf("BoolMap this[%v](%v) Not Equal that[%v](%v)", i, this.BoolMap[i], i, that1.BoolMap[i]) + } + } + if len(this.StringMap) != len(that1.StringMap) { + return fmt.Errorf("StringMap this(%v) Not Equal that(%v)", len(this.StringMap), len(that1.StringMap)) + } + for i := range this.StringMap { + if this.StringMap[i] != that1.StringMap[i] { + return fmt.Errorf("StringMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringMap[i], i, that1.StringMap[i]) + } + } + if len(this.StringToBytesMap) != len(that1.StringToBytesMap) { + return fmt.Errorf("StringToBytesMap this(%v) Not Equal that(%v)", len(this.StringToBytesMap), len(that1.StringToBytesMap)) + } + for i := range this.StringToBytesMap { + if !bytes.Equal(this.StringToBytesMap[i], that1.StringToBytesMap[i]) { + return fmt.Errorf("StringToBytesMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringToBytesMap[i], i, that1.StringToBytesMap[i]) + } + } + if len(this.StringToEnumMap) != len(that1.StringToEnumMap) { + return fmt.Errorf("StringToEnumMap this(%v) Not Equal that(%v)", len(this.StringToEnumMap), len(that1.StringToEnumMap)) + } + for i := range this.StringToEnumMap { + if this.StringToEnumMap[i] != that1.StringToEnumMap[i] { + return fmt.Errorf("StringToEnumMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringToEnumMap[i], i, that1.StringToEnumMap[i]) + } + } + if len(this.StringToMsgMap) != len(that1.StringToMsgMap) { + return fmt.Errorf("StringToMsgMap this(%v) Not Equal that(%v)", len(this.StringToMsgMap), len(that1.StringToMsgMap)) + } + for i := range this.StringToMsgMap { + if !this.StringToMsgMap[i].Equal(that1.StringToMsgMap[i]) { + return fmt.Errorf("StringToMsgMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringToMsgMap[i], i, that1.StringToMsgMap[i]) + } + } + return nil +} +func (this *AllMaps) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*AllMaps) + if !ok { + that2, ok := that.(AllMaps) + 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.StringToDoubleMap) != len(that1.StringToDoubleMap) { + return false + } + for i := range this.StringToDoubleMap { + if this.StringToDoubleMap[i] != that1.StringToDoubleMap[i] { + return false + } + } + if len(this.StringToFloatMap) != len(that1.StringToFloatMap) { + return false + } + for i := range this.StringToFloatMap { + if this.StringToFloatMap[i] != that1.StringToFloatMap[i] { + return false + } + } + if len(this.Int32Map) != len(that1.Int32Map) { + return false + } + for i := range this.Int32Map { + if this.Int32Map[i] != that1.Int32Map[i] { + return false + } + } + if len(this.Int64Map) != len(that1.Int64Map) { + return false + } + for i := range this.Int64Map { + if this.Int64Map[i] != that1.Int64Map[i] { + return false + } + } + if len(this.Uint32Map) != len(that1.Uint32Map) { + return false + } + for i := range this.Uint32Map { + if this.Uint32Map[i] != that1.Uint32Map[i] { + return false + } + } + if len(this.Uint64Map) != len(that1.Uint64Map) { + return false + } + for i := range this.Uint64Map { + if this.Uint64Map[i] != that1.Uint64Map[i] { + return false + } + } + if len(this.Sint32Map) != len(that1.Sint32Map) { + return false + } + for i := range this.Sint32Map { + if this.Sint32Map[i] != that1.Sint32Map[i] { + return false + } + } + if len(this.Sint64Map) != len(that1.Sint64Map) { + return false + } + for i := range this.Sint64Map { + if this.Sint64Map[i] != that1.Sint64Map[i] { + return false + } + } + if len(this.Fixed32Map) != len(that1.Fixed32Map) { + return false + } + for i := range this.Fixed32Map { + if this.Fixed32Map[i] != that1.Fixed32Map[i] { + return false + } + } + if len(this.Sfixed32Map) != len(that1.Sfixed32Map) { + return false + } + for i := range this.Sfixed32Map { + if this.Sfixed32Map[i] != that1.Sfixed32Map[i] { + return false + } + } + if len(this.Fixed64Map) != len(that1.Fixed64Map) { + return false + } + for i := range this.Fixed64Map { + if this.Fixed64Map[i] != that1.Fixed64Map[i] { + return false + } + } + if len(this.Sfixed64Map) != len(that1.Sfixed64Map) { + return false + } + for i := range this.Sfixed64Map { + if this.Sfixed64Map[i] != that1.Sfixed64Map[i] { + return false + } + } + if len(this.BoolMap) != len(that1.BoolMap) { + return false + } + for i := range this.BoolMap { + if this.BoolMap[i] != that1.BoolMap[i] { + return false + } + } + if len(this.StringMap) != len(that1.StringMap) { + return false + } + for i := range this.StringMap { + if this.StringMap[i] != that1.StringMap[i] { + return false + } + } + if len(this.StringToBytesMap) != len(that1.StringToBytesMap) { + return false + } + for i := range this.StringToBytesMap { + if !bytes.Equal(this.StringToBytesMap[i], that1.StringToBytesMap[i]) { + return false + } + } + if len(this.StringToEnumMap) != len(that1.StringToEnumMap) { + return false + } + for i := range this.StringToEnumMap { + if this.StringToEnumMap[i] != that1.StringToEnumMap[i] { + return false + } + } + if len(this.StringToMsgMap) != len(that1.StringToMsgMap) { + return false + } + for i := range this.StringToMsgMap { + if !this.StringToMsgMap[i].Equal(that1.StringToMsgMap[i]) { + return false + } + } + return true +} +func (this *AllMapsOrdered) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*AllMapsOrdered) + if !ok { + that2, ok := that.(AllMapsOrdered) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *AllMapsOrdered") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *AllMapsOrdered but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *AllMapsOrdered but is not nil && this == nil") + } + if len(this.StringToDoubleMap) != len(that1.StringToDoubleMap) { + return fmt.Errorf("StringToDoubleMap this(%v) Not Equal that(%v)", len(this.StringToDoubleMap), len(that1.StringToDoubleMap)) + } + for i := range this.StringToDoubleMap { + if this.StringToDoubleMap[i] != that1.StringToDoubleMap[i] { + return fmt.Errorf("StringToDoubleMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringToDoubleMap[i], i, that1.StringToDoubleMap[i]) + } + } + if len(this.StringToFloatMap) != len(that1.StringToFloatMap) { + return fmt.Errorf("StringToFloatMap this(%v) Not Equal that(%v)", len(this.StringToFloatMap), len(that1.StringToFloatMap)) + } + for i := range this.StringToFloatMap { + if this.StringToFloatMap[i] != that1.StringToFloatMap[i] { + return fmt.Errorf("StringToFloatMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringToFloatMap[i], i, that1.StringToFloatMap[i]) + } + } + if len(this.Int32Map) != len(that1.Int32Map) { + return fmt.Errorf("Int32Map this(%v) Not Equal that(%v)", len(this.Int32Map), len(that1.Int32Map)) + } + for i := range this.Int32Map { + if this.Int32Map[i] != that1.Int32Map[i] { + return fmt.Errorf("Int32Map this[%v](%v) Not Equal that[%v](%v)", i, this.Int32Map[i], i, that1.Int32Map[i]) + } + } + if len(this.Int64Map) != len(that1.Int64Map) { + return fmt.Errorf("Int64Map this(%v) Not Equal that(%v)", len(this.Int64Map), len(that1.Int64Map)) + } + for i := range this.Int64Map { + if this.Int64Map[i] != that1.Int64Map[i] { + return fmt.Errorf("Int64Map this[%v](%v) Not Equal that[%v](%v)", i, this.Int64Map[i], i, that1.Int64Map[i]) + } + } + if len(this.Uint32Map) != len(that1.Uint32Map) { + return fmt.Errorf("Uint32Map this(%v) Not Equal that(%v)", len(this.Uint32Map), len(that1.Uint32Map)) + } + for i := range this.Uint32Map { + if this.Uint32Map[i] != that1.Uint32Map[i] { + return fmt.Errorf("Uint32Map this[%v](%v) Not Equal that[%v](%v)", i, this.Uint32Map[i], i, that1.Uint32Map[i]) + } + } + if len(this.Uint64Map) != len(that1.Uint64Map) { + return fmt.Errorf("Uint64Map this(%v) Not Equal that(%v)", len(this.Uint64Map), len(that1.Uint64Map)) + } + for i := range this.Uint64Map { + if this.Uint64Map[i] != that1.Uint64Map[i] { + return fmt.Errorf("Uint64Map this[%v](%v) Not Equal that[%v](%v)", i, this.Uint64Map[i], i, that1.Uint64Map[i]) + } + } + if len(this.Sint32Map) != len(that1.Sint32Map) { + return fmt.Errorf("Sint32Map this(%v) Not Equal that(%v)", len(this.Sint32Map), len(that1.Sint32Map)) + } + for i := range this.Sint32Map { + if this.Sint32Map[i] != that1.Sint32Map[i] { + return fmt.Errorf("Sint32Map this[%v](%v) Not Equal that[%v](%v)", i, this.Sint32Map[i], i, that1.Sint32Map[i]) + } + } + if len(this.Sint64Map) != len(that1.Sint64Map) { + return fmt.Errorf("Sint64Map this(%v) Not Equal that(%v)", len(this.Sint64Map), len(that1.Sint64Map)) + } + for i := range this.Sint64Map { + if this.Sint64Map[i] != that1.Sint64Map[i] { + return fmt.Errorf("Sint64Map this[%v](%v) Not Equal that[%v](%v)", i, this.Sint64Map[i], i, that1.Sint64Map[i]) + } + } + if len(this.Fixed32Map) != len(that1.Fixed32Map) { + return fmt.Errorf("Fixed32Map this(%v) Not Equal that(%v)", len(this.Fixed32Map), len(that1.Fixed32Map)) + } + for i := range this.Fixed32Map { + if this.Fixed32Map[i] != that1.Fixed32Map[i] { + return fmt.Errorf("Fixed32Map this[%v](%v) Not Equal that[%v](%v)", i, this.Fixed32Map[i], i, that1.Fixed32Map[i]) + } + } + if len(this.Sfixed32Map) != len(that1.Sfixed32Map) { + return fmt.Errorf("Sfixed32Map this(%v) Not Equal that(%v)", len(this.Sfixed32Map), len(that1.Sfixed32Map)) + } + for i := range this.Sfixed32Map { + if this.Sfixed32Map[i] != that1.Sfixed32Map[i] { + return fmt.Errorf("Sfixed32Map this[%v](%v) Not Equal that[%v](%v)", i, this.Sfixed32Map[i], i, that1.Sfixed32Map[i]) + } + } + if len(this.Fixed64Map) != len(that1.Fixed64Map) { + return fmt.Errorf("Fixed64Map this(%v) Not Equal that(%v)", len(this.Fixed64Map), len(that1.Fixed64Map)) + } + for i := range this.Fixed64Map { + if this.Fixed64Map[i] != that1.Fixed64Map[i] { + return fmt.Errorf("Fixed64Map this[%v](%v) Not Equal that[%v](%v)", i, this.Fixed64Map[i], i, that1.Fixed64Map[i]) + } + } + if len(this.Sfixed64Map) != len(that1.Sfixed64Map) { + return fmt.Errorf("Sfixed64Map this(%v) Not Equal that(%v)", len(this.Sfixed64Map), len(that1.Sfixed64Map)) + } + for i := range this.Sfixed64Map { + if this.Sfixed64Map[i] != that1.Sfixed64Map[i] { + return fmt.Errorf("Sfixed64Map this[%v](%v) Not Equal that[%v](%v)", i, this.Sfixed64Map[i], i, that1.Sfixed64Map[i]) + } + } + if len(this.BoolMap) != len(that1.BoolMap) { + return fmt.Errorf("BoolMap this(%v) Not Equal that(%v)", len(this.BoolMap), len(that1.BoolMap)) + } + for i := range this.BoolMap { + if this.BoolMap[i] != that1.BoolMap[i] { + return fmt.Errorf("BoolMap this[%v](%v) Not Equal that[%v](%v)", i, this.BoolMap[i], i, that1.BoolMap[i]) + } + } + if len(this.StringMap) != len(that1.StringMap) { + return fmt.Errorf("StringMap this(%v) Not Equal that(%v)", len(this.StringMap), len(that1.StringMap)) + } + for i := range this.StringMap { + if this.StringMap[i] != that1.StringMap[i] { + return fmt.Errorf("StringMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringMap[i], i, that1.StringMap[i]) + } + } + if len(this.StringToBytesMap) != len(that1.StringToBytesMap) { + return fmt.Errorf("StringToBytesMap this(%v) Not Equal that(%v)", len(this.StringToBytesMap), len(that1.StringToBytesMap)) + } + for i := range this.StringToBytesMap { + if !bytes.Equal(this.StringToBytesMap[i], that1.StringToBytesMap[i]) { + return fmt.Errorf("StringToBytesMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringToBytesMap[i], i, that1.StringToBytesMap[i]) + } + } + if len(this.StringToEnumMap) != len(that1.StringToEnumMap) { + return fmt.Errorf("StringToEnumMap this(%v) Not Equal that(%v)", len(this.StringToEnumMap), len(that1.StringToEnumMap)) + } + for i := range this.StringToEnumMap { + if this.StringToEnumMap[i] != that1.StringToEnumMap[i] { + return fmt.Errorf("StringToEnumMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringToEnumMap[i], i, that1.StringToEnumMap[i]) + } + } + if len(this.StringToMsgMap) != len(that1.StringToMsgMap) { + return fmt.Errorf("StringToMsgMap this(%v) Not Equal that(%v)", len(this.StringToMsgMap), len(that1.StringToMsgMap)) + } + for i := range this.StringToMsgMap { + if !this.StringToMsgMap[i].Equal(that1.StringToMsgMap[i]) { + return fmt.Errorf("StringToMsgMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringToMsgMap[i], i, that1.StringToMsgMap[i]) + } + } + return nil +} +func (this *AllMapsOrdered) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*AllMapsOrdered) + if !ok { + that2, ok := that.(AllMapsOrdered) + 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.StringToDoubleMap) != len(that1.StringToDoubleMap) { + return false + } + for i := range this.StringToDoubleMap { + if this.StringToDoubleMap[i] != that1.StringToDoubleMap[i] { + return false + } + } + if len(this.StringToFloatMap) != len(that1.StringToFloatMap) { + return false + } + for i := range this.StringToFloatMap { + if this.StringToFloatMap[i] != that1.StringToFloatMap[i] { + return false + } + } + if len(this.Int32Map) != len(that1.Int32Map) { + return false + } + for i := range this.Int32Map { + if this.Int32Map[i] != that1.Int32Map[i] { + return false + } + } + if len(this.Int64Map) != len(that1.Int64Map) { + return false + } + for i := range this.Int64Map { + if this.Int64Map[i] != that1.Int64Map[i] { + return false + } + } + if len(this.Uint32Map) != len(that1.Uint32Map) { + return false + } + for i := range this.Uint32Map { + if this.Uint32Map[i] != that1.Uint32Map[i] { + return false + } + } + if len(this.Uint64Map) != len(that1.Uint64Map) { + return false + } + for i := range this.Uint64Map { + if this.Uint64Map[i] != that1.Uint64Map[i] { + return false + } + } + if len(this.Sint32Map) != len(that1.Sint32Map) { + return false + } + for i := range this.Sint32Map { + if this.Sint32Map[i] != that1.Sint32Map[i] { + return false + } + } + if len(this.Sint64Map) != len(that1.Sint64Map) { + return false + } + for i := range this.Sint64Map { + if this.Sint64Map[i] != that1.Sint64Map[i] { + return false + } + } + if len(this.Fixed32Map) != len(that1.Fixed32Map) { + return false + } + for i := range this.Fixed32Map { + if this.Fixed32Map[i] != that1.Fixed32Map[i] { + return false + } + } + if len(this.Sfixed32Map) != len(that1.Sfixed32Map) { + return false + } + for i := range this.Sfixed32Map { + if this.Sfixed32Map[i] != that1.Sfixed32Map[i] { + return false + } + } + if len(this.Fixed64Map) != len(that1.Fixed64Map) { + return false + } + for i := range this.Fixed64Map { + if this.Fixed64Map[i] != that1.Fixed64Map[i] { + return false + } + } + if len(this.Sfixed64Map) != len(that1.Sfixed64Map) { + return false + } + for i := range this.Sfixed64Map { + if this.Sfixed64Map[i] != that1.Sfixed64Map[i] { + return false + } + } + if len(this.BoolMap) != len(that1.BoolMap) { + return false + } + for i := range this.BoolMap { + if this.BoolMap[i] != that1.BoolMap[i] { + return false + } + } + if len(this.StringMap) != len(that1.StringMap) { + return false + } + for i := range this.StringMap { + if this.StringMap[i] != that1.StringMap[i] { + return false + } + } + if len(this.StringToBytesMap) != len(that1.StringToBytesMap) { + return false + } + for i := range this.StringToBytesMap { + if !bytes.Equal(this.StringToBytesMap[i], that1.StringToBytesMap[i]) { + return false + } + } + if len(this.StringToEnumMap) != len(that1.StringToEnumMap) { + return false + } + for i := range this.StringToEnumMap { + if this.StringToEnumMap[i] != that1.StringToEnumMap[i] { + return false + } + } + if len(this.StringToMsgMap) != len(that1.StringToMsgMap) { + return false + } + for i := range this.StringToMsgMap { + if !this.StringToMsgMap[i].Equal(that1.StringToMsgMap[i]) { + return false + } + } + return true +} +func (this *MessageWithMap) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*MessageWithMap) + if !ok { + that2, ok := that.(MessageWithMap) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *MessageWithMap") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *MessageWithMap but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *MessageWithMap but is not nil && this == nil") + } + if len(this.NameMapping) != len(that1.NameMapping) { + return fmt.Errorf("NameMapping this(%v) Not Equal that(%v)", len(this.NameMapping), len(that1.NameMapping)) + } + for i := range this.NameMapping { + if this.NameMapping[i] != that1.NameMapping[i] { + return fmt.Errorf("NameMapping this[%v](%v) Not Equal that[%v](%v)", i, this.NameMapping[i], i, that1.NameMapping[i]) + } + } + if len(this.MsgMapping) != len(that1.MsgMapping) { + return fmt.Errorf("MsgMapping this(%v) Not Equal that(%v)", len(this.MsgMapping), len(that1.MsgMapping)) + } + for i := range this.MsgMapping { + if !this.MsgMapping[i].Equal(that1.MsgMapping[i]) { + return fmt.Errorf("MsgMapping this[%v](%v) Not Equal that[%v](%v)", i, this.MsgMapping[i], i, that1.MsgMapping[i]) + } + } + if len(this.ByteMapping) != len(that1.ByteMapping) { + return fmt.Errorf("ByteMapping this(%v) Not Equal that(%v)", len(this.ByteMapping), len(that1.ByteMapping)) + } + for i := range this.ByteMapping { + if !bytes.Equal(this.ByteMapping[i], that1.ByteMapping[i]) { + return fmt.Errorf("ByteMapping this[%v](%v) Not Equal that[%v](%v)", i, this.ByteMapping[i], i, that1.ByteMapping[i]) + } + } + return nil +} +func (this *MessageWithMap) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*MessageWithMap) + if !ok { + that2, ok := that.(MessageWithMap) + 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.NameMapping) != len(that1.NameMapping) { + return false + } + for i := range this.NameMapping { + if this.NameMapping[i] != that1.NameMapping[i] { + return false + } + } + if len(this.MsgMapping) != len(that1.MsgMapping) { + return false + } + for i := range this.MsgMapping { + if !this.MsgMapping[i].Equal(that1.MsgMapping[i]) { + return false + } + } + if len(this.ByteMapping) != len(that1.ByteMapping) { + return false + } + for i := range this.ByteMapping { + if !bytes.Equal(this.ByteMapping[i], that1.ByteMapping[i]) { + return false + } + } + return true +} +func (this *FloatingPoint) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*FloatingPoint) + if !ok { + that2, ok := that.(FloatingPoint) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *FloatingPoint") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *FloatingPoint but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *FloatingPoint but is not nil && this == nil") + } + if this.F != that1.F { + return fmt.Errorf("F this(%v) Not Equal that(%v)", this.F, that1.F) + } + return nil +} +func (this *FloatingPoint) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*FloatingPoint) + if !ok { + that2, ok := that.(FloatingPoint) + 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.F != that1.F { + return false + } + return true +} +func (this *Uint128Pair) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*Uint128Pair) + if !ok { + that2, ok := that.(Uint128Pair) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *Uint128Pair") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *Uint128Pair but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *Uint128Pair but is not nil && this == nil") + } + if !this.Left.Equal(that1.Left) { + return fmt.Errorf("Left this(%v) Not Equal that(%v)", this.Left, that1.Left) + } + if that1.Right == nil { + if this.Right != nil { + return fmt.Errorf("this.Right != nil && that1.Right == nil") + } + } else if !this.Right.Equal(*that1.Right) { + return fmt.Errorf("Right this(%v) Not Equal that(%v)", this.Right, that1.Right) + } + return nil +} +func (this *Uint128Pair) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*Uint128Pair) + if !ok { + that2, ok := that.(Uint128Pair) + 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.Left.Equal(that1.Left) { + return false + } + if that1.Right == nil { + if this.Right != nil { + return false + } + } else if !this.Right.Equal(*that1.Right) { + return false + } + return true +} +func (this *ContainsNestedMap) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*ContainsNestedMap) + if !ok { + that2, ok := that.(ContainsNestedMap) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *ContainsNestedMap") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *ContainsNestedMap but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *ContainsNestedMap but is not nil && this == nil") + } + return nil +} +func (this *ContainsNestedMap) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*ContainsNestedMap) + if !ok { + that2, ok := that.(ContainsNestedMap) + 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 *ContainsNestedMap_NestedMap) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*ContainsNestedMap_NestedMap) + if !ok { + that2, ok := that.(ContainsNestedMap_NestedMap) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *ContainsNestedMap_NestedMap") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *ContainsNestedMap_NestedMap but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *ContainsNestedMap_NestedMap but is not nil && this == nil") + } + if len(this.NestedMapField) != len(that1.NestedMapField) { + return fmt.Errorf("NestedMapField this(%v) Not Equal that(%v)", len(this.NestedMapField), len(that1.NestedMapField)) + } + for i := range this.NestedMapField { + if this.NestedMapField[i] != that1.NestedMapField[i] { + return fmt.Errorf("NestedMapField this[%v](%v) Not Equal that[%v](%v)", i, this.NestedMapField[i], i, that1.NestedMapField[i]) + } + } + return nil +} +func (this *ContainsNestedMap_NestedMap) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*ContainsNestedMap_NestedMap) + if !ok { + that2, ok := that.(ContainsNestedMap_NestedMap) + 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.NestedMapField) != len(that1.NestedMapField) { + return false + } + for i := range this.NestedMapField { + if this.NestedMapField[i] != that1.NestedMapField[i] { + return false + } + } + return true +} + +type MessageFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetName() string + GetHilarity() Message_Humour + GetHeightInCm() uint32 + GetData() []byte + GetResultCount() int64 + GetTrueScotsman() bool + GetScore() float32 + GetKey() []uint64 + GetNested() *Nested + GetTerrain() map[int64]*Nested + GetProto2Field() *test.NinOptNative + GetProto2Value() map[int64]*test.NinOptEnum +} + +func (this *Message) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *Message) TestProto() github_com_gogo_protobuf_proto.Message { + return NewMessageFromFace(this) +} + +func (this *Message) GetName() string { + return this.Name +} + +func (this *Message) GetHilarity() Message_Humour { + return this.Hilarity +} + +func (this *Message) GetHeightInCm() uint32 { + return this.HeightInCm +} + +func (this *Message) GetData() []byte { + return this.Data +} + +func (this *Message) GetResultCount() int64 { + return this.ResultCount +} + +func (this *Message) GetTrueScotsman() bool { + return this.TrueScotsman +} + +func (this *Message) GetScore() float32 { + return this.Score +} + +func (this *Message) GetKey() []uint64 { + return this.Key +} + +func (this *Message) GetNested() *Nested { + return this.Nested +} + +func (this *Message) GetTerrain() map[int64]*Nested { + return this.Terrain +} + +func (this *Message) GetProto2Field() *test.NinOptNative { + return this.Proto2Field +} + +func (this *Message) GetProto2Value() map[int64]*test.NinOptEnum { + return this.Proto2Value +} + +func NewMessageFromFace(that MessageFace) *Message { + this := &Message{} + this.Name = that.GetName() + this.Hilarity = that.GetHilarity() + this.HeightInCm = that.GetHeightInCm() + this.Data = that.GetData() + this.ResultCount = that.GetResultCount() + this.TrueScotsman = that.GetTrueScotsman() + this.Score = that.GetScore() + this.Key = that.GetKey() + this.Nested = that.GetNested() + this.Terrain = that.GetTerrain() + this.Proto2Field = that.GetProto2Field() + this.Proto2Value = that.GetProto2Value() + return this +} + +type NestedFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetBunny() string +} + +func (this *Nested) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *Nested) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNestedFromFace(this) +} + +func (this *Nested) GetBunny() string { + return this.Bunny +} + +func NewNestedFromFace(that NestedFace) *Nested { + this := &Nested{} + this.Bunny = that.GetBunny() + return this +} + +type AllMapsFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetStringToDoubleMap() map[string]float64 + GetStringToFloatMap() map[string]float32 + GetInt32Map() map[int32]int32 + GetInt64Map() map[int64]int64 + GetUint32Map() map[uint32]uint32 + GetUint64Map() map[uint64]uint64 + GetSint32Map() map[int32]int32 + GetSint64Map() map[int64]int64 + GetFixed32Map() map[uint32]uint32 + GetSfixed32Map() map[int32]int32 + GetFixed64Map() map[uint64]uint64 + GetSfixed64Map() map[int64]int64 + GetBoolMap() map[bool]bool + GetStringMap() map[string]string + GetStringToBytesMap() map[string][]byte + GetStringToEnumMap() map[string]MapEnum + GetStringToMsgMap() map[string]*FloatingPoint +} + +func (this *AllMaps) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *AllMaps) TestProto() github_com_gogo_protobuf_proto.Message { + return NewAllMapsFromFace(this) +} + +func (this *AllMaps) GetStringToDoubleMap() map[string]float64 { + return this.StringToDoubleMap +} + +func (this *AllMaps) GetStringToFloatMap() map[string]float32 { + return this.StringToFloatMap +} + +func (this *AllMaps) GetInt32Map() map[int32]int32 { + return this.Int32Map +} + +func (this *AllMaps) GetInt64Map() map[int64]int64 { + return this.Int64Map +} + +func (this *AllMaps) GetUint32Map() map[uint32]uint32 { + return this.Uint32Map +} + +func (this *AllMaps) GetUint64Map() map[uint64]uint64 { + return this.Uint64Map +} + +func (this *AllMaps) GetSint32Map() map[int32]int32 { + return this.Sint32Map +} + +func (this *AllMaps) GetSint64Map() map[int64]int64 { + return this.Sint64Map +} + +func (this *AllMaps) GetFixed32Map() map[uint32]uint32 { + return this.Fixed32Map +} + +func (this *AllMaps) GetSfixed32Map() map[int32]int32 { + return this.Sfixed32Map +} + +func (this *AllMaps) GetFixed64Map() map[uint64]uint64 { + return this.Fixed64Map +} + +func (this *AllMaps) GetSfixed64Map() map[int64]int64 { + return this.Sfixed64Map +} + +func (this *AllMaps) GetBoolMap() map[bool]bool { + return this.BoolMap +} + +func (this *AllMaps) GetStringMap() map[string]string { + return this.StringMap +} + +func (this *AllMaps) GetStringToBytesMap() map[string][]byte { + return this.StringToBytesMap +} + +func (this *AllMaps) GetStringToEnumMap() map[string]MapEnum { + return this.StringToEnumMap +} + +func (this *AllMaps) GetStringToMsgMap() map[string]*FloatingPoint { + return this.StringToMsgMap +} + +func NewAllMapsFromFace(that AllMapsFace) *AllMaps { + this := &AllMaps{} + this.StringToDoubleMap = that.GetStringToDoubleMap() + this.StringToFloatMap = that.GetStringToFloatMap() + this.Int32Map = that.GetInt32Map() + this.Int64Map = that.GetInt64Map() + this.Uint32Map = that.GetUint32Map() + this.Uint64Map = that.GetUint64Map() + this.Sint32Map = that.GetSint32Map() + this.Sint64Map = that.GetSint64Map() + this.Fixed32Map = that.GetFixed32Map() + this.Sfixed32Map = that.GetSfixed32Map() + this.Fixed64Map = that.GetFixed64Map() + this.Sfixed64Map = that.GetSfixed64Map() + this.BoolMap = that.GetBoolMap() + this.StringMap = that.GetStringMap() + this.StringToBytesMap = that.GetStringToBytesMap() + this.StringToEnumMap = that.GetStringToEnumMap() + this.StringToMsgMap = that.GetStringToMsgMap() + return this +} + +type AllMapsOrderedFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetStringToDoubleMap() map[string]float64 + GetStringToFloatMap() map[string]float32 + GetInt32Map() map[int32]int32 + GetInt64Map() map[int64]int64 + GetUint32Map() map[uint32]uint32 + GetUint64Map() map[uint64]uint64 + GetSint32Map() map[int32]int32 + GetSint64Map() map[int64]int64 + GetFixed32Map() map[uint32]uint32 + GetSfixed32Map() map[int32]int32 + GetFixed64Map() map[uint64]uint64 + GetSfixed64Map() map[int64]int64 + GetBoolMap() map[bool]bool + GetStringMap() map[string]string + GetStringToBytesMap() map[string][]byte + GetStringToEnumMap() map[string]MapEnum + GetStringToMsgMap() map[string]*FloatingPoint +} + +func (this *AllMapsOrdered) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *AllMapsOrdered) TestProto() github_com_gogo_protobuf_proto.Message { + return NewAllMapsOrderedFromFace(this) +} + +func (this *AllMapsOrdered) GetStringToDoubleMap() map[string]float64 { + return this.StringToDoubleMap +} + +func (this *AllMapsOrdered) GetStringToFloatMap() map[string]float32 { + return this.StringToFloatMap +} + +func (this *AllMapsOrdered) GetInt32Map() map[int32]int32 { + return this.Int32Map +} + +func (this *AllMapsOrdered) GetInt64Map() map[int64]int64 { + return this.Int64Map +} + +func (this *AllMapsOrdered) GetUint32Map() map[uint32]uint32 { + return this.Uint32Map +} + +func (this *AllMapsOrdered) GetUint64Map() map[uint64]uint64 { + return this.Uint64Map +} + +func (this *AllMapsOrdered) GetSint32Map() map[int32]int32 { + return this.Sint32Map +} + +func (this *AllMapsOrdered) GetSint64Map() map[int64]int64 { + return this.Sint64Map +} + +func (this *AllMapsOrdered) GetFixed32Map() map[uint32]uint32 { + return this.Fixed32Map +} + +func (this *AllMapsOrdered) GetSfixed32Map() map[int32]int32 { + return this.Sfixed32Map +} + +func (this *AllMapsOrdered) GetFixed64Map() map[uint64]uint64 { + return this.Fixed64Map +} + +func (this *AllMapsOrdered) GetSfixed64Map() map[int64]int64 { + return this.Sfixed64Map +} + +func (this *AllMapsOrdered) GetBoolMap() map[bool]bool { + return this.BoolMap +} + +func (this *AllMapsOrdered) GetStringMap() map[string]string { + return this.StringMap +} + +func (this *AllMapsOrdered) GetStringToBytesMap() map[string][]byte { + return this.StringToBytesMap +} + +func (this *AllMapsOrdered) GetStringToEnumMap() map[string]MapEnum { + return this.StringToEnumMap +} + +func (this *AllMapsOrdered) GetStringToMsgMap() map[string]*FloatingPoint { + return this.StringToMsgMap +} + +func NewAllMapsOrderedFromFace(that AllMapsOrderedFace) *AllMapsOrdered { + this := &AllMapsOrdered{} + this.StringToDoubleMap = that.GetStringToDoubleMap() + this.StringToFloatMap = that.GetStringToFloatMap() + this.Int32Map = that.GetInt32Map() + this.Int64Map = that.GetInt64Map() + this.Uint32Map = that.GetUint32Map() + this.Uint64Map = that.GetUint64Map() + this.Sint32Map = that.GetSint32Map() + this.Sint64Map = that.GetSint64Map() + this.Fixed32Map = that.GetFixed32Map() + this.Sfixed32Map = that.GetSfixed32Map() + this.Fixed64Map = that.GetFixed64Map() + this.Sfixed64Map = that.GetSfixed64Map() + this.BoolMap = that.GetBoolMap() + this.StringMap = that.GetStringMap() + this.StringToBytesMap = that.GetStringToBytesMap() + this.StringToEnumMap = that.GetStringToEnumMap() + this.StringToMsgMap = that.GetStringToMsgMap() + return this +} + +type MessageWithMapFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetNameMapping() map[int32]string + GetMsgMapping() map[int64]*FloatingPoint + GetByteMapping() map[bool][]byte +} + +func (this *MessageWithMap) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *MessageWithMap) TestProto() github_com_gogo_protobuf_proto.Message { + return NewMessageWithMapFromFace(this) +} + +func (this *MessageWithMap) GetNameMapping() map[int32]string { + return this.NameMapping +} + +func (this *MessageWithMap) GetMsgMapping() map[int64]*FloatingPoint { + return this.MsgMapping +} + +func (this *MessageWithMap) GetByteMapping() map[bool][]byte { + return this.ByteMapping +} + +func NewMessageWithMapFromFace(that MessageWithMapFace) *MessageWithMap { + this := &MessageWithMap{} + this.NameMapping = that.GetNameMapping() + this.MsgMapping = that.GetMsgMapping() + this.ByteMapping = that.GetByteMapping() + return this +} + +type FloatingPointFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetF() float64 +} + +func (this *FloatingPoint) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *FloatingPoint) TestProto() github_com_gogo_protobuf_proto.Message { + return NewFloatingPointFromFace(this) +} + +func (this *FloatingPoint) GetF() float64 { + return this.F +} + +func NewFloatingPointFromFace(that FloatingPointFace) *FloatingPoint { + this := &FloatingPoint{} + this.F = that.GetF() + return this +} + +type Uint128PairFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetLeft() github_com_gogo_protobuf_test_custom.Uint128 + GetRight() *github_com_gogo_protobuf_test_custom.Uint128 +} + +func (this *Uint128Pair) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *Uint128Pair) TestProto() github_com_gogo_protobuf_proto.Message { + return NewUint128PairFromFace(this) +} + +func (this *Uint128Pair) GetLeft() github_com_gogo_protobuf_test_custom.Uint128 { + return this.Left +} + +func (this *Uint128Pair) GetRight() *github_com_gogo_protobuf_test_custom.Uint128 { + return this.Right +} + +func NewUint128PairFromFace(that Uint128PairFace) *Uint128Pair { + this := &Uint128Pair{} + this.Left = that.GetLeft() + this.Right = that.GetRight() + return this +} + +type ContainsNestedMapFace interface { + Proto() github_com_gogo_protobuf_proto.Message +} + +func (this *ContainsNestedMap) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *ContainsNestedMap) TestProto() github_com_gogo_protobuf_proto.Message { + return NewContainsNestedMapFromFace(this) +} + +func NewContainsNestedMapFromFace(that ContainsNestedMapFace) *ContainsNestedMap { + this := &ContainsNestedMap{} + return this +} + +type ContainsNestedMap_NestedMapFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetNestedMapField() map[string]float64 +} + +func (this *ContainsNestedMap_NestedMap) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *ContainsNestedMap_NestedMap) TestProto() github_com_gogo_protobuf_proto.Message { + return NewContainsNestedMap_NestedMapFromFace(this) +} + +func (this *ContainsNestedMap_NestedMap) GetNestedMapField() map[string]float64 { + return this.NestedMapField +} + +func NewContainsNestedMap_NestedMapFromFace(that ContainsNestedMap_NestedMapFace) *ContainsNestedMap_NestedMap { + this := &ContainsNestedMap_NestedMap{} + this.NestedMapField = that.GetNestedMapField() + return this +} + +func (this *Message) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 16) + s = append(s, "&theproto3.Message{") + s = append(s, "Name: "+fmt.Sprintf("%#v", this.Name)+",\n") + s = append(s, "Hilarity: "+fmt.Sprintf("%#v", this.Hilarity)+",\n") + s = append(s, "HeightInCm: "+fmt.Sprintf("%#v", this.HeightInCm)+",\n") + s = append(s, "Data: "+fmt.Sprintf("%#v", this.Data)+",\n") + s = append(s, "ResultCount: "+fmt.Sprintf("%#v", this.ResultCount)+",\n") + s = append(s, "TrueScotsman: "+fmt.Sprintf("%#v", this.TrueScotsman)+",\n") + s = append(s, "Score: "+fmt.Sprintf("%#v", this.Score)+",\n") + s = append(s, "Key: "+fmt.Sprintf("%#v", this.Key)+",\n") + if this.Nested != nil { + s = append(s, "Nested: "+fmt.Sprintf("%#v", this.Nested)+",\n") + } + keysForTerrain := make([]int64, 0, len(this.Terrain)) + for k := range this.Terrain { + keysForTerrain = append(keysForTerrain, k) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForTerrain) + mapStringForTerrain := "map[int64]*Nested{" + for _, k := range keysForTerrain { + mapStringForTerrain += fmt.Sprintf("%#v: %#v,", k, this.Terrain[k]) + } + mapStringForTerrain += "}" + if this.Terrain != nil { + s = append(s, "Terrain: "+mapStringForTerrain+",\n") + } + if this.Proto2Field != nil { + s = append(s, "Proto2Field: "+fmt.Sprintf("%#v", this.Proto2Field)+",\n") + } + keysForProto2Value := make([]int64, 0, len(this.Proto2Value)) + for k := range this.Proto2Value { + keysForProto2Value = append(keysForProto2Value, k) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForProto2Value) + mapStringForProto2Value := "map[int64]*test.NinOptEnum{" + for _, k := range keysForProto2Value { + mapStringForProto2Value += fmt.Sprintf("%#v: %#v,", k, this.Proto2Value[k]) + } + mapStringForProto2Value += "}" + if this.Proto2Value != nil { + s = append(s, "Proto2Value: "+mapStringForProto2Value+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *Nested) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&theproto3.Nested{") + s = append(s, "Bunny: "+fmt.Sprintf("%#v", this.Bunny)+",\n") + s = append(s, "}") + return strings.Join(s, "") +} +func (this *AllMaps) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 21) + s = append(s, "&theproto3.AllMaps{") + keysForStringToDoubleMap := make([]string, 0, len(this.StringToDoubleMap)) + for k := range this.StringToDoubleMap { + keysForStringToDoubleMap = append(keysForStringToDoubleMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToDoubleMap) + mapStringForStringToDoubleMap := "map[string]float64{" + for _, k := range keysForStringToDoubleMap { + mapStringForStringToDoubleMap += fmt.Sprintf("%#v: %#v,", k, this.StringToDoubleMap[k]) + } + mapStringForStringToDoubleMap += "}" + if this.StringToDoubleMap != nil { + s = append(s, "StringToDoubleMap: "+mapStringForStringToDoubleMap+",\n") + } + keysForStringToFloatMap := make([]string, 0, len(this.StringToFloatMap)) + for k := range this.StringToFloatMap { + keysForStringToFloatMap = append(keysForStringToFloatMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToFloatMap) + mapStringForStringToFloatMap := "map[string]float32{" + for _, k := range keysForStringToFloatMap { + mapStringForStringToFloatMap += fmt.Sprintf("%#v: %#v,", k, this.StringToFloatMap[k]) + } + mapStringForStringToFloatMap += "}" + if this.StringToFloatMap != nil { + s = append(s, "StringToFloatMap: "+mapStringForStringToFloatMap+",\n") + } + keysForInt32Map := make([]int32, 0, len(this.Int32Map)) + for k := range this.Int32Map { + keysForInt32Map = append(keysForInt32Map, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForInt32Map) + mapStringForInt32Map := "map[int32]int32{" + for _, k := range keysForInt32Map { + mapStringForInt32Map += fmt.Sprintf("%#v: %#v,", k, this.Int32Map[k]) + } + mapStringForInt32Map += "}" + if this.Int32Map != nil { + s = append(s, "Int32Map: "+mapStringForInt32Map+",\n") + } + keysForInt64Map := make([]int64, 0, len(this.Int64Map)) + for k := range this.Int64Map { + keysForInt64Map = append(keysForInt64Map, k) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForInt64Map) + mapStringForInt64Map := "map[int64]int64{" + for _, k := range keysForInt64Map { + mapStringForInt64Map += fmt.Sprintf("%#v: %#v,", k, this.Int64Map[k]) + } + mapStringForInt64Map += "}" + if this.Int64Map != nil { + s = append(s, "Int64Map: "+mapStringForInt64Map+",\n") + } + keysForUint32Map := make([]uint32, 0, len(this.Uint32Map)) + for k := range this.Uint32Map { + keysForUint32Map = append(keysForUint32Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint32s(keysForUint32Map) + mapStringForUint32Map := "map[uint32]uint32{" + for _, k := range keysForUint32Map { + mapStringForUint32Map += fmt.Sprintf("%#v: %#v,", k, this.Uint32Map[k]) + } + mapStringForUint32Map += "}" + if this.Uint32Map != nil { + s = append(s, "Uint32Map: "+mapStringForUint32Map+",\n") + } + keysForUint64Map := make([]uint64, 0, len(this.Uint64Map)) + for k := range this.Uint64Map { + keysForUint64Map = append(keysForUint64Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint64s(keysForUint64Map) + mapStringForUint64Map := "map[uint64]uint64{" + for _, k := range keysForUint64Map { + mapStringForUint64Map += fmt.Sprintf("%#v: %#v,", k, this.Uint64Map[k]) + } + mapStringForUint64Map += "}" + if this.Uint64Map != nil { + s = append(s, "Uint64Map: "+mapStringForUint64Map+",\n") + } + keysForSint32Map := make([]int32, 0, len(this.Sint32Map)) + for k := range this.Sint32Map { + keysForSint32Map = append(keysForSint32Map, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForSint32Map) + mapStringForSint32Map := "map[int32]int32{" + for _, k := range keysForSint32Map { + mapStringForSint32Map += fmt.Sprintf("%#v: %#v,", k, this.Sint32Map[k]) + } + mapStringForSint32Map += "}" + if this.Sint32Map != nil { + s = append(s, "Sint32Map: "+mapStringForSint32Map+",\n") + } + keysForSint64Map := make([]int64, 0, len(this.Sint64Map)) + for k := range this.Sint64Map { + keysForSint64Map = append(keysForSint64Map, k) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForSint64Map) + mapStringForSint64Map := "map[int64]int64{" + for _, k := range keysForSint64Map { + mapStringForSint64Map += fmt.Sprintf("%#v: %#v,", k, this.Sint64Map[k]) + } + mapStringForSint64Map += "}" + if this.Sint64Map != nil { + s = append(s, "Sint64Map: "+mapStringForSint64Map+",\n") + } + keysForFixed32Map := make([]uint32, 0, len(this.Fixed32Map)) + for k := range this.Fixed32Map { + keysForFixed32Map = append(keysForFixed32Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint32s(keysForFixed32Map) + mapStringForFixed32Map := "map[uint32]uint32{" + for _, k := range keysForFixed32Map { + mapStringForFixed32Map += fmt.Sprintf("%#v: %#v,", k, this.Fixed32Map[k]) + } + mapStringForFixed32Map += "}" + if this.Fixed32Map != nil { + s = append(s, "Fixed32Map: "+mapStringForFixed32Map+",\n") + } + keysForSfixed32Map := make([]int32, 0, len(this.Sfixed32Map)) + for k := range this.Sfixed32Map { + keysForSfixed32Map = append(keysForSfixed32Map, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForSfixed32Map) + mapStringForSfixed32Map := "map[int32]int32{" + for _, k := range keysForSfixed32Map { + mapStringForSfixed32Map += fmt.Sprintf("%#v: %#v,", k, this.Sfixed32Map[k]) + } + mapStringForSfixed32Map += "}" + if this.Sfixed32Map != nil { + s = append(s, "Sfixed32Map: "+mapStringForSfixed32Map+",\n") + } + keysForFixed64Map := make([]uint64, 0, len(this.Fixed64Map)) + for k := range this.Fixed64Map { + keysForFixed64Map = append(keysForFixed64Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint64s(keysForFixed64Map) + mapStringForFixed64Map := "map[uint64]uint64{" + for _, k := range keysForFixed64Map { + mapStringForFixed64Map += fmt.Sprintf("%#v: %#v,", k, this.Fixed64Map[k]) + } + mapStringForFixed64Map += "}" + if this.Fixed64Map != nil { + s = append(s, "Fixed64Map: "+mapStringForFixed64Map+",\n") + } + keysForSfixed64Map := make([]int64, 0, len(this.Sfixed64Map)) + for k := range this.Sfixed64Map { + keysForSfixed64Map = append(keysForSfixed64Map, k) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForSfixed64Map) + mapStringForSfixed64Map := "map[int64]int64{" + for _, k := range keysForSfixed64Map { + mapStringForSfixed64Map += fmt.Sprintf("%#v: %#v,", k, this.Sfixed64Map[k]) + } + mapStringForSfixed64Map += "}" + if this.Sfixed64Map != nil { + s = append(s, "Sfixed64Map: "+mapStringForSfixed64Map+",\n") + } + keysForBoolMap := make([]bool, 0, len(this.BoolMap)) + for k := range this.BoolMap { + keysForBoolMap = append(keysForBoolMap, k) + } + github_com_gogo_protobuf_sortkeys.Bools(keysForBoolMap) + mapStringForBoolMap := "map[bool]bool{" + for _, k := range keysForBoolMap { + mapStringForBoolMap += fmt.Sprintf("%#v: %#v,", k, this.BoolMap[k]) + } + mapStringForBoolMap += "}" + if this.BoolMap != nil { + s = append(s, "BoolMap: "+mapStringForBoolMap+",\n") + } + keysForStringMap := make([]string, 0, len(this.StringMap)) + for k := range this.StringMap { + keysForStringMap = append(keysForStringMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringMap) + mapStringForStringMap := "map[string]string{" + for _, k := range keysForStringMap { + mapStringForStringMap += fmt.Sprintf("%#v: %#v,", k, this.StringMap[k]) + } + mapStringForStringMap += "}" + if this.StringMap != nil { + s = append(s, "StringMap: "+mapStringForStringMap+",\n") + } + keysForStringToBytesMap := make([]string, 0, len(this.StringToBytesMap)) + for k := range this.StringToBytesMap { + keysForStringToBytesMap = append(keysForStringToBytesMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToBytesMap) + mapStringForStringToBytesMap := "map[string][]byte{" + for _, k := range keysForStringToBytesMap { + mapStringForStringToBytesMap += fmt.Sprintf("%#v: %#v,", k, this.StringToBytesMap[k]) + } + mapStringForStringToBytesMap += "}" + if this.StringToBytesMap != nil { + s = append(s, "StringToBytesMap: "+mapStringForStringToBytesMap+",\n") + } + keysForStringToEnumMap := make([]string, 0, len(this.StringToEnumMap)) + for k := range this.StringToEnumMap { + keysForStringToEnumMap = append(keysForStringToEnumMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToEnumMap) + mapStringForStringToEnumMap := "map[string]MapEnum{" + for _, k := range keysForStringToEnumMap { + mapStringForStringToEnumMap += fmt.Sprintf("%#v: %#v,", k, this.StringToEnumMap[k]) + } + mapStringForStringToEnumMap += "}" + if this.StringToEnumMap != nil { + s = append(s, "StringToEnumMap: "+mapStringForStringToEnumMap+",\n") + } + keysForStringToMsgMap := make([]string, 0, len(this.StringToMsgMap)) + for k := range this.StringToMsgMap { + keysForStringToMsgMap = append(keysForStringToMsgMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToMsgMap) + mapStringForStringToMsgMap := "map[string]*FloatingPoint{" + for _, k := range keysForStringToMsgMap { + mapStringForStringToMsgMap += fmt.Sprintf("%#v: %#v,", k, this.StringToMsgMap[k]) + } + mapStringForStringToMsgMap += "}" + if this.StringToMsgMap != nil { + s = append(s, "StringToMsgMap: "+mapStringForStringToMsgMap+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *AllMapsOrdered) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 21) + s = append(s, "&theproto3.AllMapsOrdered{") + keysForStringToDoubleMap := make([]string, 0, len(this.StringToDoubleMap)) + for k := range this.StringToDoubleMap { + keysForStringToDoubleMap = append(keysForStringToDoubleMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToDoubleMap) + mapStringForStringToDoubleMap := "map[string]float64{" + for _, k := range keysForStringToDoubleMap { + mapStringForStringToDoubleMap += fmt.Sprintf("%#v: %#v,", k, this.StringToDoubleMap[k]) + } + mapStringForStringToDoubleMap += "}" + if this.StringToDoubleMap != nil { + s = append(s, "StringToDoubleMap: "+mapStringForStringToDoubleMap+",\n") + } + keysForStringToFloatMap := make([]string, 0, len(this.StringToFloatMap)) + for k := range this.StringToFloatMap { + keysForStringToFloatMap = append(keysForStringToFloatMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToFloatMap) + mapStringForStringToFloatMap := "map[string]float32{" + for _, k := range keysForStringToFloatMap { + mapStringForStringToFloatMap += fmt.Sprintf("%#v: %#v,", k, this.StringToFloatMap[k]) + } + mapStringForStringToFloatMap += "}" + if this.StringToFloatMap != nil { + s = append(s, "StringToFloatMap: "+mapStringForStringToFloatMap+",\n") + } + keysForInt32Map := make([]int32, 0, len(this.Int32Map)) + for k := range this.Int32Map { + keysForInt32Map = append(keysForInt32Map, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForInt32Map) + mapStringForInt32Map := "map[int32]int32{" + for _, k := range keysForInt32Map { + mapStringForInt32Map += fmt.Sprintf("%#v: %#v,", k, this.Int32Map[k]) + } + mapStringForInt32Map += "}" + if this.Int32Map != nil { + s = append(s, "Int32Map: "+mapStringForInt32Map+",\n") + } + keysForInt64Map := make([]int64, 0, len(this.Int64Map)) + for k := range this.Int64Map { + keysForInt64Map = append(keysForInt64Map, k) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForInt64Map) + mapStringForInt64Map := "map[int64]int64{" + for _, k := range keysForInt64Map { + mapStringForInt64Map += fmt.Sprintf("%#v: %#v,", k, this.Int64Map[k]) + } + mapStringForInt64Map += "}" + if this.Int64Map != nil { + s = append(s, "Int64Map: "+mapStringForInt64Map+",\n") + } + keysForUint32Map := make([]uint32, 0, len(this.Uint32Map)) + for k := range this.Uint32Map { + keysForUint32Map = append(keysForUint32Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint32s(keysForUint32Map) + mapStringForUint32Map := "map[uint32]uint32{" + for _, k := range keysForUint32Map { + mapStringForUint32Map += fmt.Sprintf("%#v: %#v,", k, this.Uint32Map[k]) + } + mapStringForUint32Map += "}" + if this.Uint32Map != nil { + s = append(s, "Uint32Map: "+mapStringForUint32Map+",\n") + } + keysForUint64Map := make([]uint64, 0, len(this.Uint64Map)) + for k := range this.Uint64Map { + keysForUint64Map = append(keysForUint64Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint64s(keysForUint64Map) + mapStringForUint64Map := "map[uint64]uint64{" + for _, k := range keysForUint64Map { + mapStringForUint64Map += fmt.Sprintf("%#v: %#v,", k, this.Uint64Map[k]) + } + mapStringForUint64Map += "}" + if this.Uint64Map != nil { + s = append(s, "Uint64Map: "+mapStringForUint64Map+",\n") + } + keysForSint32Map := make([]int32, 0, len(this.Sint32Map)) + for k := range this.Sint32Map { + keysForSint32Map = append(keysForSint32Map, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForSint32Map) + mapStringForSint32Map := "map[int32]int32{" + for _, k := range keysForSint32Map { + mapStringForSint32Map += fmt.Sprintf("%#v: %#v,", k, this.Sint32Map[k]) + } + mapStringForSint32Map += "}" + if this.Sint32Map != nil { + s = append(s, "Sint32Map: "+mapStringForSint32Map+",\n") + } + keysForSint64Map := make([]int64, 0, len(this.Sint64Map)) + for k := range this.Sint64Map { + keysForSint64Map = append(keysForSint64Map, k) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForSint64Map) + mapStringForSint64Map := "map[int64]int64{" + for _, k := range keysForSint64Map { + mapStringForSint64Map += fmt.Sprintf("%#v: %#v,", k, this.Sint64Map[k]) + } + mapStringForSint64Map += "}" + if this.Sint64Map != nil { + s = append(s, "Sint64Map: "+mapStringForSint64Map+",\n") + } + keysForFixed32Map := make([]uint32, 0, len(this.Fixed32Map)) + for k := range this.Fixed32Map { + keysForFixed32Map = append(keysForFixed32Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint32s(keysForFixed32Map) + mapStringForFixed32Map := "map[uint32]uint32{" + for _, k := range keysForFixed32Map { + mapStringForFixed32Map += fmt.Sprintf("%#v: %#v,", k, this.Fixed32Map[k]) + } + mapStringForFixed32Map += "}" + if this.Fixed32Map != nil { + s = append(s, "Fixed32Map: "+mapStringForFixed32Map+",\n") + } + keysForSfixed32Map := make([]int32, 0, len(this.Sfixed32Map)) + for k := range this.Sfixed32Map { + keysForSfixed32Map = append(keysForSfixed32Map, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForSfixed32Map) + mapStringForSfixed32Map := "map[int32]int32{" + for _, k := range keysForSfixed32Map { + mapStringForSfixed32Map += fmt.Sprintf("%#v: %#v,", k, this.Sfixed32Map[k]) + } + mapStringForSfixed32Map += "}" + if this.Sfixed32Map != nil { + s = append(s, "Sfixed32Map: "+mapStringForSfixed32Map+",\n") + } + keysForFixed64Map := make([]uint64, 0, len(this.Fixed64Map)) + for k := range this.Fixed64Map { + keysForFixed64Map = append(keysForFixed64Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint64s(keysForFixed64Map) + mapStringForFixed64Map := "map[uint64]uint64{" + for _, k := range keysForFixed64Map { + mapStringForFixed64Map += fmt.Sprintf("%#v: %#v,", k, this.Fixed64Map[k]) + } + mapStringForFixed64Map += "}" + if this.Fixed64Map != nil { + s = append(s, "Fixed64Map: "+mapStringForFixed64Map+",\n") + } + keysForSfixed64Map := make([]int64, 0, len(this.Sfixed64Map)) + for k := range this.Sfixed64Map { + keysForSfixed64Map = append(keysForSfixed64Map, k) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForSfixed64Map) + mapStringForSfixed64Map := "map[int64]int64{" + for _, k := range keysForSfixed64Map { + mapStringForSfixed64Map += fmt.Sprintf("%#v: %#v,", k, this.Sfixed64Map[k]) + } + mapStringForSfixed64Map += "}" + if this.Sfixed64Map != nil { + s = append(s, "Sfixed64Map: "+mapStringForSfixed64Map+",\n") + } + keysForBoolMap := make([]bool, 0, len(this.BoolMap)) + for k := range this.BoolMap { + keysForBoolMap = append(keysForBoolMap, k) + } + github_com_gogo_protobuf_sortkeys.Bools(keysForBoolMap) + mapStringForBoolMap := "map[bool]bool{" + for _, k := range keysForBoolMap { + mapStringForBoolMap += fmt.Sprintf("%#v: %#v,", k, this.BoolMap[k]) + } + mapStringForBoolMap += "}" + if this.BoolMap != nil { + s = append(s, "BoolMap: "+mapStringForBoolMap+",\n") + } + keysForStringMap := make([]string, 0, len(this.StringMap)) + for k := range this.StringMap { + keysForStringMap = append(keysForStringMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringMap) + mapStringForStringMap := "map[string]string{" + for _, k := range keysForStringMap { + mapStringForStringMap += fmt.Sprintf("%#v: %#v,", k, this.StringMap[k]) + } + mapStringForStringMap += "}" + if this.StringMap != nil { + s = append(s, "StringMap: "+mapStringForStringMap+",\n") + } + keysForStringToBytesMap := make([]string, 0, len(this.StringToBytesMap)) + for k := range this.StringToBytesMap { + keysForStringToBytesMap = append(keysForStringToBytesMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToBytesMap) + mapStringForStringToBytesMap := "map[string][]byte{" + for _, k := range keysForStringToBytesMap { + mapStringForStringToBytesMap += fmt.Sprintf("%#v: %#v,", k, this.StringToBytesMap[k]) + } + mapStringForStringToBytesMap += "}" + if this.StringToBytesMap != nil { + s = append(s, "StringToBytesMap: "+mapStringForStringToBytesMap+",\n") + } + keysForStringToEnumMap := make([]string, 0, len(this.StringToEnumMap)) + for k := range this.StringToEnumMap { + keysForStringToEnumMap = append(keysForStringToEnumMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToEnumMap) + mapStringForStringToEnumMap := "map[string]MapEnum{" + for _, k := range keysForStringToEnumMap { + mapStringForStringToEnumMap += fmt.Sprintf("%#v: %#v,", k, this.StringToEnumMap[k]) + } + mapStringForStringToEnumMap += "}" + if this.StringToEnumMap != nil { + s = append(s, "StringToEnumMap: "+mapStringForStringToEnumMap+",\n") + } + keysForStringToMsgMap := make([]string, 0, len(this.StringToMsgMap)) + for k := range this.StringToMsgMap { + keysForStringToMsgMap = append(keysForStringToMsgMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToMsgMap) + mapStringForStringToMsgMap := "map[string]*FloatingPoint{" + for _, k := range keysForStringToMsgMap { + mapStringForStringToMsgMap += fmt.Sprintf("%#v: %#v,", k, this.StringToMsgMap[k]) + } + mapStringForStringToMsgMap += "}" + if this.StringToMsgMap != nil { + s = append(s, "StringToMsgMap: "+mapStringForStringToMsgMap+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *MessageWithMap) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 7) + s = append(s, "&theproto3.MessageWithMap{") + keysForNameMapping := make([]int32, 0, len(this.NameMapping)) + for k := range this.NameMapping { + keysForNameMapping = append(keysForNameMapping, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForNameMapping) + mapStringForNameMapping := "map[int32]string{" + for _, k := range keysForNameMapping { + mapStringForNameMapping += fmt.Sprintf("%#v: %#v,", k, this.NameMapping[k]) + } + mapStringForNameMapping += "}" + if this.NameMapping != nil { + s = append(s, "NameMapping: "+mapStringForNameMapping+",\n") + } + keysForMsgMapping := make([]int64, 0, len(this.MsgMapping)) + for k := range this.MsgMapping { + keysForMsgMapping = append(keysForMsgMapping, k) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForMsgMapping) + mapStringForMsgMapping := "map[int64]*FloatingPoint{" + for _, k := range keysForMsgMapping { + mapStringForMsgMapping += fmt.Sprintf("%#v: %#v,", k, this.MsgMapping[k]) + } + mapStringForMsgMapping += "}" + if this.MsgMapping != nil { + s = append(s, "MsgMapping: "+mapStringForMsgMapping+",\n") + } + keysForByteMapping := make([]bool, 0, len(this.ByteMapping)) + for k := range this.ByteMapping { + keysForByteMapping = append(keysForByteMapping, k) + } + github_com_gogo_protobuf_sortkeys.Bools(keysForByteMapping) + mapStringForByteMapping := "map[bool][]byte{" + for _, k := range keysForByteMapping { + mapStringForByteMapping += fmt.Sprintf("%#v: %#v,", k, this.ByteMapping[k]) + } + mapStringForByteMapping += "}" + if this.ByteMapping != nil { + s = append(s, "ByteMapping: "+mapStringForByteMapping+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *FloatingPoint) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&theproto3.FloatingPoint{") + s = append(s, "F: "+fmt.Sprintf("%#v", this.F)+",\n") + s = append(s, "}") + return strings.Join(s, "") +} +func (this *Uint128Pair) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 6) + s = append(s, "&theproto3.Uint128Pair{") + s = append(s, "Left: "+fmt.Sprintf("%#v", this.Left)+",\n") + s = append(s, "Right: "+fmt.Sprintf("%#v", this.Right)+",\n") + s = append(s, "}") + return strings.Join(s, "") +} +func (this *ContainsNestedMap) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 4) + s = append(s, "&theproto3.ContainsNestedMap{") + s = append(s, "}") + return strings.Join(s, "") +} +func (this *ContainsNestedMap_NestedMap) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&theproto3.ContainsNestedMap_NestedMap{") + keysForNestedMapField := make([]string, 0, len(this.NestedMapField)) + for k := range this.NestedMapField { + keysForNestedMapField = append(keysForNestedMapField, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForNestedMapField) + mapStringForNestedMapField := "map[string]float64{" + for _, k := range keysForNestedMapField { + mapStringForNestedMapField += fmt.Sprintf("%#v: %#v,", k, this.NestedMapField[k]) + } + mapStringForNestedMapField += "}" + if this.NestedMapField != nil { + s = append(s, "NestedMapField: "+mapStringForNestedMapField+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func valueToGoStringTheproto3(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 extensionToGoStringTheproto3(e map[int32]github_com_gogo_protobuf_proto.Extension) string { + if e == nil { + return "nil" + } + s := "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 +} +func NewPopulatedMessage(r randyTheproto3, easy bool) *Message { + this := &Message{} + this.Name = randStringTheproto3(r) + this.Hilarity = Message_Humour([]int32{0, 1, 2, 3}[r.Intn(4)]) + this.HeightInCm = uint32(r.Uint32()) + v1 := r.Intn(100) + this.Data = make([]byte, v1) + for i := 0; i < v1; i++ { + this.Data[i] = byte(r.Intn(256)) + } + this.ResultCount = int64(r.Int63()) + if r.Intn(2) == 0 { + this.ResultCount *= -1 + } + this.TrueScotsman = bool(bool(r.Intn(2) == 0)) + this.Score = float32(r.Float32()) + if r.Intn(2) == 0 { + this.Score *= -1 + } + v2 := r.Intn(10) + this.Key = make([]uint64, v2) + for i := 0; i < v2; i++ { + this.Key[i] = uint64(uint64(r.Uint32())) + } + if r.Intn(10) != 0 { + this.Nested = NewPopulatedNested(r, easy) + } + if r.Intn(10) != 0 { + v3 := r.Intn(10) + this.Terrain = make(map[int64]*Nested) + for i := 0; i < v3; i++ { + this.Terrain[int64(r.Int63())] = NewPopulatedNested(r, easy) + } + } + if r.Intn(10) != 0 { + this.Proto2Field = test.NewPopulatedNinOptNative(r, easy) + } + if r.Intn(10) != 0 { + v4 := r.Intn(10) + this.Proto2Value = make(map[int64]*test.NinOptEnum) + for i := 0; i < v4; i++ { + this.Proto2Value[int64(r.Int63())] = test.NewPopulatedNinOptEnum(r, easy) + } + } + if !easy && r.Intn(10) != 0 { + } + return this +} + +func NewPopulatedNested(r randyTheproto3, easy bool) *Nested { + this := &Nested{} + this.Bunny = randStringTheproto3(r) + if !easy && r.Intn(10) != 0 { + } + return this +} + +func NewPopulatedAllMaps(r randyTheproto3, easy bool) *AllMaps { + this := &AllMaps{} + if r.Intn(10) != 0 { + v5 := r.Intn(10) + this.StringToDoubleMap = make(map[string]float64) + for i := 0; i < v5; i++ { + v6 := randStringTheproto3(r) + this.StringToDoubleMap[v6] = float64(r.Float64()) + if r.Intn(2) == 0 { + this.StringToDoubleMap[v6] *= -1 + } + } + } + if r.Intn(10) != 0 { + v7 := r.Intn(10) + this.StringToFloatMap = make(map[string]float32) + for i := 0; i < v7; i++ { + v8 := randStringTheproto3(r) + this.StringToFloatMap[v8] = float32(r.Float32()) + if r.Intn(2) == 0 { + this.StringToFloatMap[v8] *= -1 + } + } + } + if r.Intn(10) != 0 { + v9 := r.Intn(10) + this.Int32Map = make(map[int32]int32) + for i := 0; i < v9; i++ { + v10 := int32(r.Int31()) + this.Int32Map[v10] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Int32Map[v10] *= -1 + } + } + } + if r.Intn(10) != 0 { + v11 := r.Intn(10) + this.Int64Map = make(map[int64]int64) + for i := 0; i < v11; i++ { + v12 := int64(r.Int63()) + this.Int64Map[v12] = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Int64Map[v12] *= -1 + } + } + } + if r.Intn(10) != 0 { + v13 := r.Intn(10) + this.Uint32Map = make(map[uint32]uint32) + for i := 0; i < v13; i++ { + v14 := uint32(r.Uint32()) + this.Uint32Map[v14] = uint32(r.Uint32()) + } + } + if r.Intn(10) != 0 { + v15 := r.Intn(10) + this.Uint64Map = make(map[uint64]uint64) + for i := 0; i < v15; i++ { + v16 := uint64(uint64(r.Uint32())) + this.Uint64Map[v16] = uint64(uint64(r.Uint32())) + } + } + if r.Intn(10) != 0 { + v17 := r.Intn(10) + this.Sint32Map = make(map[int32]int32) + for i := 0; i < v17; i++ { + v18 := int32(r.Int31()) + this.Sint32Map[v18] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Sint32Map[v18] *= -1 + } + } + } + if r.Intn(10) != 0 { + v19 := r.Intn(10) + this.Sint64Map = make(map[int64]int64) + for i := 0; i < v19; i++ { + v20 := int64(r.Int63()) + this.Sint64Map[v20] = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Sint64Map[v20] *= -1 + } + } + } + if r.Intn(10) != 0 { + v21 := r.Intn(10) + this.Fixed32Map = make(map[uint32]uint32) + for i := 0; i < v21; i++ { + v22 := uint32(r.Uint32()) + this.Fixed32Map[v22] = uint32(r.Uint32()) + } + } + if r.Intn(10) != 0 { + v23 := r.Intn(10) + this.Sfixed32Map = make(map[int32]int32) + for i := 0; i < v23; i++ { + v24 := int32(r.Int31()) + this.Sfixed32Map[v24] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Sfixed32Map[v24] *= -1 + } + } + } + if r.Intn(10) != 0 { + v25 := r.Intn(10) + this.Fixed64Map = make(map[uint64]uint64) + for i := 0; i < v25; i++ { + v26 := uint64(uint64(r.Uint32())) + this.Fixed64Map[v26] = uint64(uint64(r.Uint32())) + } + } + if r.Intn(10) != 0 { + v27 := r.Intn(10) + this.Sfixed64Map = make(map[int64]int64) + for i := 0; i < v27; i++ { + v28 := int64(r.Int63()) + this.Sfixed64Map[v28] = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Sfixed64Map[v28] *= -1 + } + } + } + if r.Intn(10) != 0 { + v29 := r.Intn(10) + this.BoolMap = make(map[bool]bool) + for i := 0; i < v29; i++ { + v30 := bool(bool(r.Intn(2) == 0)) + this.BoolMap[v30] = bool(bool(r.Intn(2) == 0)) + } + } + if r.Intn(10) != 0 { + v31 := r.Intn(10) + this.StringMap = make(map[string]string) + for i := 0; i < v31; i++ { + this.StringMap[randStringTheproto3(r)] = randStringTheproto3(r) + } + } + if r.Intn(10) != 0 { + v32 := r.Intn(10) + this.StringToBytesMap = make(map[string][]byte) + for i := 0; i < v32; i++ { + v33 := r.Intn(100) + v34 := randStringTheproto3(r) + this.StringToBytesMap[v34] = make([]byte, v33) + for i := 0; i < v33; i++ { + this.StringToBytesMap[v34][i] = byte(r.Intn(256)) + } + } + } + if r.Intn(10) != 0 { + v35 := r.Intn(10) + this.StringToEnumMap = make(map[string]MapEnum) + for i := 0; i < v35; i++ { + this.StringToEnumMap[randStringTheproto3(r)] = MapEnum([]int32{0, 1, 2}[r.Intn(3)]) + } + } + if r.Intn(10) != 0 { + v36 := r.Intn(10) + this.StringToMsgMap = make(map[string]*FloatingPoint) + for i := 0; i < v36; i++ { + this.StringToMsgMap[randStringTheproto3(r)] = NewPopulatedFloatingPoint(r, easy) + } + } + if !easy && r.Intn(10) != 0 { + } + return this +} + +func NewPopulatedAllMapsOrdered(r randyTheproto3, easy bool) *AllMapsOrdered { + this := &AllMapsOrdered{} + if r.Intn(10) != 0 { + v37 := r.Intn(10) + this.StringToDoubleMap = make(map[string]float64) + for i := 0; i < v37; i++ { + v38 := randStringTheproto3(r) + this.StringToDoubleMap[v38] = float64(r.Float64()) + if r.Intn(2) == 0 { + this.StringToDoubleMap[v38] *= -1 + } + } + } + if r.Intn(10) != 0 { + v39 := r.Intn(10) + this.StringToFloatMap = make(map[string]float32) + for i := 0; i < v39; i++ { + v40 := randStringTheproto3(r) + this.StringToFloatMap[v40] = float32(r.Float32()) + if r.Intn(2) == 0 { + this.StringToFloatMap[v40] *= -1 + } + } + } + if r.Intn(10) != 0 { + v41 := r.Intn(10) + this.Int32Map = make(map[int32]int32) + for i := 0; i < v41; i++ { + v42 := int32(r.Int31()) + this.Int32Map[v42] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Int32Map[v42] *= -1 + } + } + } + if r.Intn(10) != 0 { + v43 := r.Intn(10) + this.Int64Map = make(map[int64]int64) + for i := 0; i < v43; i++ { + v44 := int64(r.Int63()) + this.Int64Map[v44] = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Int64Map[v44] *= -1 + } + } + } + if r.Intn(10) != 0 { + v45 := r.Intn(10) + this.Uint32Map = make(map[uint32]uint32) + for i := 0; i < v45; i++ { + v46 := uint32(r.Uint32()) + this.Uint32Map[v46] = uint32(r.Uint32()) + } + } + if r.Intn(10) != 0 { + v47 := r.Intn(10) + this.Uint64Map = make(map[uint64]uint64) + for i := 0; i < v47; i++ { + v48 := uint64(uint64(r.Uint32())) + this.Uint64Map[v48] = uint64(uint64(r.Uint32())) + } + } + if r.Intn(10) != 0 { + v49 := r.Intn(10) + this.Sint32Map = make(map[int32]int32) + for i := 0; i < v49; i++ { + v50 := int32(r.Int31()) + this.Sint32Map[v50] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Sint32Map[v50] *= -1 + } + } + } + if r.Intn(10) != 0 { + v51 := r.Intn(10) + this.Sint64Map = make(map[int64]int64) + for i := 0; i < v51; i++ { + v52 := int64(r.Int63()) + this.Sint64Map[v52] = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Sint64Map[v52] *= -1 + } + } + } + if r.Intn(10) != 0 { + v53 := r.Intn(10) + this.Fixed32Map = make(map[uint32]uint32) + for i := 0; i < v53; i++ { + v54 := uint32(r.Uint32()) + this.Fixed32Map[v54] = uint32(r.Uint32()) + } + } + if r.Intn(10) != 0 { + v55 := r.Intn(10) + this.Sfixed32Map = make(map[int32]int32) + for i := 0; i < v55; i++ { + v56 := int32(r.Int31()) + this.Sfixed32Map[v56] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Sfixed32Map[v56] *= -1 + } + } + } + if r.Intn(10) != 0 { + v57 := r.Intn(10) + this.Fixed64Map = make(map[uint64]uint64) + for i := 0; i < v57; i++ { + v58 := uint64(uint64(r.Uint32())) + this.Fixed64Map[v58] = uint64(uint64(r.Uint32())) + } + } + if r.Intn(10) != 0 { + v59 := r.Intn(10) + this.Sfixed64Map = make(map[int64]int64) + for i := 0; i < v59; i++ { + v60 := int64(r.Int63()) + this.Sfixed64Map[v60] = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Sfixed64Map[v60] *= -1 + } + } + } + if r.Intn(10) != 0 { + v61 := r.Intn(10) + this.BoolMap = make(map[bool]bool) + for i := 0; i < v61; i++ { + v62 := bool(bool(r.Intn(2) == 0)) + this.BoolMap[v62] = bool(bool(r.Intn(2) == 0)) + } + } + if r.Intn(10) != 0 { + v63 := r.Intn(10) + this.StringMap = make(map[string]string) + for i := 0; i < v63; i++ { + this.StringMap[randStringTheproto3(r)] = randStringTheproto3(r) + } + } + if r.Intn(10) != 0 { + v64 := r.Intn(10) + this.StringToBytesMap = make(map[string][]byte) + for i := 0; i < v64; i++ { + v65 := r.Intn(100) + v66 := randStringTheproto3(r) + this.StringToBytesMap[v66] = make([]byte, v65) + for i := 0; i < v65; i++ { + this.StringToBytesMap[v66][i] = byte(r.Intn(256)) + } + } + } + if r.Intn(10) != 0 { + v67 := r.Intn(10) + this.StringToEnumMap = make(map[string]MapEnum) + for i := 0; i < v67; i++ { + this.StringToEnumMap[randStringTheproto3(r)] = MapEnum([]int32{0, 1, 2}[r.Intn(3)]) + } + } + if r.Intn(10) != 0 { + v68 := r.Intn(10) + this.StringToMsgMap = make(map[string]*FloatingPoint) + for i := 0; i < v68; i++ { + this.StringToMsgMap[randStringTheproto3(r)] = NewPopulatedFloatingPoint(r, easy) + } + } + if !easy && r.Intn(10) != 0 { + } + return this +} + +func NewPopulatedMessageWithMap(r randyTheproto3, easy bool) *MessageWithMap { + this := &MessageWithMap{} + if r.Intn(10) != 0 { + v69 := r.Intn(10) + this.NameMapping = make(map[int32]string) + for i := 0; i < v69; i++ { + this.NameMapping[int32(r.Int31())] = randStringTheproto3(r) + } + } + if r.Intn(10) != 0 { + v70 := r.Intn(10) + this.MsgMapping = make(map[int64]*FloatingPoint) + for i := 0; i < v70; i++ { + this.MsgMapping[int64(r.Int63())] = NewPopulatedFloatingPoint(r, easy) + } + } + if r.Intn(10) != 0 { + v71 := r.Intn(10) + this.ByteMapping = make(map[bool][]byte) + for i := 0; i < v71; i++ { + v72 := r.Intn(100) + v73 := bool(bool(r.Intn(2) == 0)) + this.ByteMapping[v73] = make([]byte, v72) + for i := 0; i < v72; i++ { + this.ByteMapping[v73][i] = byte(r.Intn(256)) + } + } + } + if !easy && r.Intn(10) != 0 { + } + return this +} + +func NewPopulatedFloatingPoint(r randyTheproto3, easy bool) *FloatingPoint { + this := &FloatingPoint{} + this.F = float64(r.Float64()) + if r.Intn(2) == 0 { + this.F *= -1 + } + if !easy && r.Intn(10) != 0 { + } + return this +} + +func NewPopulatedUint128Pair(r randyTheproto3, easy bool) *Uint128Pair { + this := &Uint128Pair{} + v74 := github_com_gogo_protobuf_test_custom.NewPopulatedUint128(r) + this.Left = *v74 + this.Right = github_com_gogo_protobuf_test_custom.NewPopulatedUint128(r) + if !easy && r.Intn(10) != 0 { + } + return this +} + +func NewPopulatedContainsNestedMap(r randyTheproto3, easy bool) *ContainsNestedMap { + this := &ContainsNestedMap{} + if !easy && r.Intn(10) != 0 { + } + return this +} + +func NewPopulatedContainsNestedMap_NestedMap(r randyTheproto3, easy bool) *ContainsNestedMap_NestedMap { + this := &ContainsNestedMap_NestedMap{} + if r.Intn(10) != 0 { + v75 := r.Intn(10) + this.NestedMapField = make(map[string]float64) + for i := 0; i < v75; i++ { + v76 := randStringTheproto3(r) + this.NestedMapField[v76] = float64(r.Float64()) + if r.Intn(2) == 0 { + this.NestedMapField[v76] *= -1 + } + } + } + if !easy && r.Intn(10) != 0 { + } + return this +} + +type randyTheproto3 interface { + Float32() float32 + Float64() float64 + Int63() int64 + Int31() int32 + Uint32() uint32 + Intn(n int) int +} + +func randUTF8RuneTheproto3(r randyTheproto3) 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 randStringTheproto3(r randyTheproto3) string { + v77 := r.Intn(100) + tmps := make([]rune, v77) + for i := 0; i < v77; i++ { + tmps[i] = randUTF8RuneTheproto3(r) + } + return string(tmps) +} +func randUnrecognizedTheproto3(r randyTheproto3, 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 = randFieldTheproto3(data, r, fieldNumber, wire) + } + return data +} +func randFieldTheproto3(data []byte, r randyTheproto3, fieldNumber int, wire int) []byte { + key := uint32(fieldNumber)<<3 | uint32(wire) + switch wire { + case 0: + data = encodeVarintPopulateTheproto3(data, uint64(key)) + v78 := r.Int63() + if r.Intn(2) == 0 { + v78 *= -1 + } + data = encodeVarintPopulateTheproto3(data, uint64(v78)) + case 1: + data = encodeVarintPopulateTheproto3(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 = encodeVarintPopulateTheproto3(data, uint64(key)) + ll := r.Intn(100) + data = encodeVarintPopulateTheproto3(data, uint64(ll)) + for j := 0; j < ll; j++ { + data = append(data, byte(r.Intn(256))) + } + default: + data = encodeVarintPopulateTheproto3(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 encodeVarintPopulateTheproto3(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 *Message) Size() (n int) { + var l int + _ = l + l = len(m.Name) + if l > 0 { + n += 1 + l + sovTheproto3(uint64(l)) + } + if m.Hilarity != 0 { + n += 1 + sovTheproto3(uint64(m.Hilarity)) + } + if m.HeightInCm != 0 { + n += 1 + sovTheproto3(uint64(m.HeightInCm)) + } + l = len(m.Data) + if l > 0 { + n += 1 + l + sovTheproto3(uint64(l)) + } + if m.ResultCount != 0 { + n += 1 + sovTheproto3(uint64(m.ResultCount)) + } + if m.TrueScotsman { + n += 2 + } + if m.Score != 0 { + n += 5 + } + if len(m.Key) > 0 { + for _, e := range m.Key { + n += 1 + sovTheproto3(uint64(e)) + } + } + if m.Nested != nil { + l = m.Nested.Size() + n += 1 + l + sovTheproto3(uint64(l)) + } + if len(m.Terrain) > 0 { + for k, v := range m.Terrain { + _ = k + _ = v + l = 0 + if v != nil { + l = v.Size() + } + mapEntrySize := 1 + sovTheproto3(uint64(k)) + 1 + l + sovTheproto3(uint64(l)) + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if m.Proto2Field != nil { + l = m.Proto2Field.Size() + n += 1 + l + sovTheproto3(uint64(l)) + } + if len(m.Proto2Value) > 0 { + for k, v := range m.Proto2Value { + _ = k + _ = v + l = 0 + if v != nil { + l = v.Size() + } + mapEntrySize := 1 + sovTheproto3(uint64(k)) + 1 + l + sovTheproto3(uint64(l)) + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + return n +} + +func (m *Nested) Size() (n int) { + var l int + _ = l + l = len(m.Bunny) + if l > 0 { + n += 1 + l + sovTheproto3(uint64(l)) + } + return n +} + +func (m *AllMaps) Size() (n int) { + var l int + _ = l + if len(m.StringToDoubleMap) > 0 { + for k, v := range m.StringToDoubleMap { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovTheproto3(uint64(len(k))) + 1 + 8 + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.StringToFloatMap) > 0 { + for k, v := range m.StringToFloatMap { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovTheproto3(uint64(len(k))) + 1 + 4 + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.Int32Map) > 0 { + for k, v := range m.Int32Map { + _ = k + _ = v + mapEntrySize := 1 + sovTheproto3(uint64(k)) + 1 + sovTheproto3(uint64(v)) + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.Int64Map) > 0 { + for k, v := range m.Int64Map { + _ = k + _ = v + mapEntrySize := 1 + sovTheproto3(uint64(k)) + 1 + sovTheproto3(uint64(v)) + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.Uint32Map) > 0 { + for k, v := range m.Uint32Map { + _ = k + _ = v + mapEntrySize := 1 + sovTheproto3(uint64(k)) + 1 + sovTheproto3(uint64(v)) + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.Uint64Map) > 0 { + for k, v := range m.Uint64Map { + _ = k + _ = v + mapEntrySize := 1 + sovTheproto3(uint64(k)) + 1 + sovTheproto3(uint64(v)) + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.Sint32Map) > 0 { + for k, v := range m.Sint32Map { + _ = k + _ = v + mapEntrySize := 1 + sozTheproto3(uint64(k)) + 1 + sozTheproto3(uint64(v)) + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.Sint64Map) > 0 { + for k, v := range m.Sint64Map { + _ = k + _ = v + mapEntrySize := 1 + sozTheproto3(uint64(k)) + 1 + sozTheproto3(uint64(v)) + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.Fixed32Map) > 0 { + for k, v := range m.Fixed32Map { + _ = k + _ = v + mapEntrySize := 1 + 4 + 1 + 4 + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.Sfixed32Map) > 0 { + for k, v := range m.Sfixed32Map { + _ = k + _ = v + mapEntrySize := 1 + 4 + 1 + 4 + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.Fixed64Map) > 0 { + for k, v := range m.Fixed64Map { + _ = k + _ = v + mapEntrySize := 1 + 8 + 1 + 8 + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.Sfixed64Map) > 0 { + for k, v := range m.Sfixed64Map { + _ = k + _ = v + mapEntrySize := 1 + 8 + 1 + 8 + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.BoolMap) > 0 { + for k, v := range m.BoolMap { + _ = k + _ = v + mapEntrySize := 1 + 1 + 1 + 1 + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.StringMap) > 0 { + for k, v := range m.StringMap { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovTheproto3(uint64(len(k))) + 1 + len(v) + sovTheproto3(uint64(len(v))) + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.StringToBytesMap) > 0 { + for k, v := range m.StringToBytesMap { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovTheproto3(uint64(len(k))) + 1 + len(v) + sovTheproto3(uint64(len(v))) + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.StringToEnumMap) > 0 { + for k, v := range m.StringToEnumMap { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovTheproto3(uint64(len(k))) + 1 + sovTheproto3(uint64(v)) + n += mapEntrySize + 2 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.StringToMsgMap) > 0 { + for k, v := range m.StringToMsgMap { + _ = k + _ = v + l = 0 + if v != nil { + l = v.Size() + } + mapEntrySize := 1 + len(k) + sovTheproto3(uint64(len(k))) + 1 + l + sovTheproto3(uint64(l)) + n += mapEntrySize + 2 + sovTheproto3(uint64(mapEntrySize)) + } + } + return n +} + +func (m *AllMapsOrdered) Size() (n int) { + var l int + _ = l + if len(m.StringToDoubleMap) > 0 { + for k, v := range m.StringToDoubleMap { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovTheproto3(uint64(len(k))) + 1 + 8 + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.StringToFloatMap) > 0 { + for k, v := range m.StringToFloatMap { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovTheproto3(uint64(len(k))) + 1 + 4 + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.Int32Map) > 0 { + for k, v := range m.Int32Map { + _ = k + _ = v + mapEntrySize := 1 + sovTheproto3(uint64(k)) + 1 + sovTheproto3(uint64(v)) + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.Int64Map) > 0 { + for k, v := range m.Int64Map { + _ = k + _ = v + mapEntrySize := 1 + sovTheproto3(uint64(k)) + 1 + sovTheproto3(uint64(v)) + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.Uint32Map) > 0 { + for k, v := range m.Uint32Map { + _ = k + _ = v + mapEntrySize := 1 + sovTheproto3(uint64(k)) + 1 + sovTheproto3(uint64(v)) + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.Uint64Map) > 0 { + for k, v := range m.Uint64Map { + _ = k + _ = v + mapEntrySize := 1 + sovTheproto3(uint64(k)) + 1 + sovTheproto3(uint64(v)) + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.Sint32Map) > 0 { + for k, v := range m.Sint32Map { + _ = k + _ = v + mapEntrySize := 1 + sozTheproto3(uint64(k)) + 1 + sozTheproto3(uint64(v)) + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.Sint64Map) > 0 { + for k, v := range m.Sint64Map { + _ = k + _ = v + mapEntrySize := 1 + sozTheproto3(uint64(k)) + 1 + sozTheproto3(uint64(v)) + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.Fixed32Map) > 0 { + for k, v := range m.Fixed32Map { + _ = k + _ = v + mapEntrySize := 1 + 4 + 1 + 4 + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.Sfixed32Map) > 0 { + for k, v := range m.Sfixed32Map { + _ = k + _ = v + mapEntrySize := 1 + 4 + 1 + 4 + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.Fixed64Map) > 0 { + for k, v := range m.Fixed64Map { + _ = k + _ = v + mapEntrySize := 1 + 8 + 1 + 8 + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.Sfixed64Map) > 0 { + for k, v := range m.Sfixed64Map { + _ = k + _ = v + mapEntrySize := 1 + 8 + 1 + 8 + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.BoolMap) > 0 { + for k, v := range m.BoolMap { + _ = k + _ = v + mapEntrySize := 1 + 1 + 1 + 1 + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.StringMap) > 0 { + for k, v := range m.StringMap { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovTheproto3(uint64(len(k))) + 1 + len(v) + sovTheproto3(uint64(len(v))) + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.StringToBytesMap) > 0 { + for k, v := range m.StringToBytesMap { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovTheproto3(uint64(len(k))) + 1 + len(v) + sovTheproto3(uint64(len(v))) + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.StringToEnumMap) > 0 { + for k, v := range m.StringToEnumMap { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovTheproto3(uint64(len(k))) + 1 + sovTheproto3(uint64(v)) + n += mapEntrySize + 2 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.StringToMsgMap) > 0 { + for k, v := range m.StringToMsgMap { + _ = k + _ = v + l = 0 + if v != nil { + l = v.Size() + } + mapEntrySize := 1 + len(k) + sovTheproto3(uint64(len(k))) + 1 + l + sovTheproto3(uint64(l)) + n += mapEntrySize + 2 + sovTheproto3(uint64(mapEntrySize)) + } + } + return n +} + +func (m *MessageWithMap) Size() (n int) { + var l int + _ = l + if len(m.NameMapping) > 0 { + for k, v := range m.NameMapping { + _ = k + _ = v + mapEntrySize := 1 + sovTheproto3(uint64(k)) + 1 + len(v) + sovTheproto3(uint64(len(v))) + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.MsgMapping) > 0 { + for k, v := range m.MsgMapping { + _ = k + _ = v + l = 0 + if v != nil { + l = v.Size() + } + mapEntrySize := 1 + sozTheproto3(uint64(k)) + 1 + l + sovTheproto3(uint64(l)) + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.ByteMapping) > 0 { + for k, v := range m.ByteMapping { + _ = k + _ = v + mapEntrySize := 1 + 1 + 1 + len(v) + sovTheproto3(uint64(len(v))) + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + return n +} + +func (m *FloatingPoint) Size() (n int) { + var l int + _ = l + if m.F != 0 { + n += 9 + } + return n +} + +func (m *Uint128Pair) Size() (n int) { + var l int + _ = l + l = m.Left.Size() + n += 1 + l + sovTheproto3(uint64(l)) + if m.Right != nil { + l = m.Right.Size() + n += 1 + l + sovTheproto3(uint64(l)) + } + return n +} + +func (m *ContainsNestedMap) Size() (n int) { + var l int + _ = l + return n +} + +func (m *ContainsNestedMap_NestedMap) Size() (n int) { + var l int + _ = l + if len(m.NestedMapField) > 0 { + for k, v := range m.NestedMapField { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovTheproto3(uint64(len(k))) + 1 + 8 + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + return n +} + +func sovTheproto3(x uint64) (n int) { + for { + n++ + x >>= 7 + if x == 0 { + break + } + } + return n +} +func sozTheproto3(x uint64) (n int) { + return sovTheproto3(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (this *Message) String() string { + if this == nil { + return "nil" + } + keysForTerrain := make([]int64, 0, len(this.Terrain)) + for k := range this.Terrain { + keysForTerrain = append(keysForTerrain, k) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForTerrain) + mapStringForTerrain := "map[int64]*Nested{" + for _, k := range keysForTerrain { + mapStringForTerrain += fmt.Sprintf("%v: %v,", k, this.Terrain[k]) + } + mapStringForTerrain += "}" + keysForProto2Value := make([]int64, 0, len(this.Proto2Value)) + for k := range this.Proto2Value { + keysForProto2Value = append(keysForProto2Value, k) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForProto2Value) + mapStringForProto2Value := "map[int64]*test.NinOptEnum{" + for _, k := range keysForProto2Value { + mapStringForProto2Value += fmt.Sprintf("%v: %v,", k, this.Proto2Value[k]) + } + mapStringForProto2Value += "}" + s := strings.Join([]string{`&Message{`, + `Name:` + fmt.Sprintf("%v", this.Name) + `,`, + `Hilarity:` + fmt.Sprintf("%v", this.Hilarity) + `,`, + `HeightInCm:` + fmt.Sprintf("%v", this.HeightInCm) + `,`, + `Data:` + fmt.Sprintf("%v", this.Data) + `,`, + `ResultCount:` + fmt.Sprintf("%v", this.ResultCount) + `,`, + `TrueScotsman:` + fmt.Sprintf("%v", this.TrueScotsman) + `,`, + `Score:` + fmt.Sprintf("%v", this.Score) + `,`, + `Key:` + fmt.Sprintf("%v", this.Key) + `,`, + `Nested:` + strings.Replace(fmt.Sprintf("%v", this.Nested), "Nested", "Nested", 1) + `,`, + `Terrain:` + mapStringForTerrain + `,`, + `Proto2Field:` + strings.Replace(fmt.Sprintf("%v", this.Proto2Field), "NinOptNative", "test.NinOptNative", 1) + `,`, + `Proto2Value:` + mapStringForProto2Value + `,`, + `}`, + }, "") + return s +} +func (this *Nested) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&Nested{`, + `Bunny:` + fmt.Sprintf("%v", this.Bunny) + `,`, + `}`, + }, "") + return s +} +func (this *AllMaps) String() string { + if this == nil { + return "nil" + } + keysForStringToDoubleMap := make([]string, 0, len(this.StringToDoubleMap)) + for k := range this.StringToDoubleMap { + keysForStringToDoubleMap = append(keysForStringToDoubleMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToDoubleMap) + mapStringForStringToDoubleMap := "map[string]float64{" + for _, k := range keysForStringToDoubleMap { + mapStringForStringToDoubleMap += fmt.Sprintf("%v: %v,", k, this.StringToDoubleMap[k]) + } + mapStringForStringToDoubleMap += "}" + keysForStringToFloatMap := make([]string, 0, len(this.StringToFloatMap)) + for k := range this.StringToFloatMap { + keysForStringToFloatMap = append(keysForStringToFloatMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToFloatMap) + mapStringForStringToFloatMap := "map[string]float32{" + for _, k := range keysForStringToFloatMap { + mapStringForStringToFloatMap += fmt.Sprintf("%v: %v,", k, this.StringToFloatMap[k]) + } + mapStringForStringToFloatMap += "}" + keysForInt32Map := make([]int32, 0, len(this.Int32Map)) + for k := range this.Int32Map { + keysForInt32Map = append(keysForInt32Map, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForInt32Map) + mapStringForInt32Map := "map[int32]int32{" + for _, k := range keysForInt32Map { + mapStringForInt32Map += fmt.Sprintf("%v: %v,", k, this.Int32Map[k]) + } + mapStringForInt32Map += "}" + keysForInt64Map := make([]int64, 0, len(this.Int64Map)) + for k := range this.Int64Map { + keysForInt64Map = append(keysForInt64Map, k) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForInt64Map) + mapStringForInt64Map := "map[int64]int64{" + for _, k := range keysForInt64Map { + mapStringForInt64Map += fmt.Sprintf("%v: %v,", k, this.Int64Map[k]) + } + mapStringForInt64Map += "}" + keysForUint32Map := make([]uint32, 0, len(this.Uint32Map)) + for k := range this.Uint32Map { + keysForUint32Map = append(keysForUint32Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint32s(keysForUint32Map) + mapStringForUint32Map := "map[uint32]uint32{" + for _, k := range keysForUint32Map { + mapStringForUint32Map += fmt.Sprintf("%v: %v,", k, this.Uint32Map[k]) + } + mapStringForUint32Map += "}" + keysForUint64Map := make([]uint64, 0, len(this.Uint64Map)) + for k := range this.Uint64Map { + keysForUint64Map = append(keysForUint64Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint64s(keysForUint64Map) + mapStringForUint64Map := "map[uint64]uint64{" + for _, k := range keysForUint64Map { + mapStringForUint64Map += fmt.Sprintf("%v: %v,", k, this.Uint64Map[k]) + } + mapStringForUint64Map += "}" + keysForSint32Map := make([]int32, 0, len(this.Sint32Map)) + for k := range this.Sint32Map { + keysForSint32Map = append(keysForSint32Map, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForSint32Map) + mapStringForSint32Map := "map[int32]int32{" + for _, k := range keysForSint32Map { + mapStringForSint32Map += fmt.Sprintf("%v: %v,", k, this.Sint32Map[k]) + } + mapStringForSint32Map += "}" + keysForSint64Map := make([]int64, 0, len(this.Sint64Map)) + for k := range this.Sint64Map { + keysForSint64Map = append(keysForSint64Map, k) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForSint64Map) + mapStringForSint64Map := "map[int64]int64{" + for _, k := range keysForSint64Map { + mapStringForSint64Map += fmt.Sprintf("%v: %v,", k, this.Sint64Map[k]) + } + mapStringForSint64Map += "}" + keysForFixed32Map := make([]uint32, 0, len(this.Fixed32Map)) + for k := range this.Fixed32Map { + keysForFixed32Map = append(keysForFixed32Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint32s(keysForFixed32Map) + mapStringForFixed32Map := "map[uint32]uint32{" + for _, k := range keysForFixed32Map { + mapStringForFixed32Map += fmt.Sprintf("%v: %v,", k, this.Fixed32Map[k]) + } + mapStringForFixed32Map += "}" + keysForSfixed32Map := make([]int32, 0, len(this.Sfixed32Map)) + for k := range this.Sfixed32Map { + keysForSfixed32Map = append(keysForSfixed32Map, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForSfixed32Map) + mapStringForSfixed32Map := "map[int32]int32{" + for _, k := range keysForSfixed32Map { + mapStringForSfixed32Map += fmt.Sprintf("%v: %v,", k, this.Sfixed32Map[k]) + } + mapStringForSfixed32Map += "}" + keysForFixed64Map := make([]uint64, 0, len(this.Fixed64Map)) + for k := range this.Fixed64Map { + keysForFixed64Map = append(keysForFixed64Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint64s(keysForFixed64Map) + mapStringForFixed64Map := "map[uint64]uint64{" + for _, k := range keysForFixed64Map { + mapStringForFixed64Map += fmt.Sprintf("%v: %v,", k, this.Fixed64Map[k]) + } + mapStringForFixed64Map += "}" + keysForSfixed64Map := make([]int64, 0, len(this.Sfixed64Map)) + for k := range this.Sfixed64Map { + keysForSfixed64Map = append(keysForSfixed64Map, k) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForSfixed64Map) + mapStringForSfixed64Map := "map[int64]int64{" + for _, k := range keysForSfixed64Map { + mapStringForSfixed64Map += fmt.Sprintf("%v: %v,", k, this.Sfixed64Map[k]) + } + mapStringForSfixed64Map += "}" + keysForBoolMap := make([]bool, 0, len(this.BoolMap)) + for k := range this.BoolMap { + keysForBoolMap = append(keysForBoolMap, k) + } + github_com_gogo_protobuf_sortkeys.Bools(keysForBoolMap) + mapStringForBoolMap := "map[bool]bool{" + for _, k := range keysForBoolMap { + mapStringForBoolMap += fmt.Sprintf("%v: %v,", k, this.BoolMap[k]) + } + mapStringForBoolMap += "}" + keysForStringMap := make([]string, 0, len(this.StringMap)) + for k := range this.StringMap { + keysForStringMap = append(keysForStringMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringMap) + mapStringForStringMap := "map[string]string{" + for _, k := range keysForStringMap { + mapStringForStringMap += fmt.Sprintf("%v: %v,", k, this.StringMap[k]) + } + mapStringForStringMap += "}" + keysForStringToBytesMap := make([]string, 0, len(this.StringToBytesMap)) + for k := range this.StringToBytesMap { + keysForStringToBytesMap = append(keysForStringToBytesMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToBytesMap) + mapStringForStringToBytesMap := "map[string][]byte{" + for _, k := range keysForStringToBytesMap { + mapStringForStringToBytesMap += fmt.Sprintf("%v: %v,", k, this.StringToBytesMap[k]) + } + mapStringForStringToBytesMap += "}" + keysForStringToEnumMap := make([]string, 0, len(this.StringToEnumMap)) + for k := range this.StringToEnumMap { + keysForStringToEnumMap = append(keysForStringToEnumMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToEnumMap) + mapStringForStringToEnumMap := "map[string]MapEnum{" + for _, k := range keysForStringToEnumMap { + mapStringForStringToEnumMap += fmt.Sprintf("%v: %v,", k, this.StringToEnumMap[k]) + } + mapStringForStringToEnumMap += "}" + keysForStringToMsgMap := make([]string, 0, len(this.StringToMsgMap)) + for k := range this.StringToMsgMap { + keysForStringToMsgMap = append(keysForStringToMsgMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToMsgMap) + mapStringForStringToMsgMap := "map[string]*FloatingPoint{" + for _, k := range keysForStringToMsgMap { + mapStringForStringToMsgMap += fmt.Sprintf("%v: %v,", k, this.StringToMsgMap[k]) + } + mapStringForStringToMsgMap += "}" + s := strings.Join([]string{`&AllMaps{`, + `StringToDoubleMap:` + mapStringForStringToDoubleMap + `,`, + `StringToFloatMap:` + mapStringForStringToFloatMap + `,`, + `Int32Map:` + mapStringForInt32Map + `,`, + `Int64Map:` + mapStringForInt64Map + `,`, + `Uint32Map:` + mapStringForUint32Map + `,`, + `Uint64Map:` + mapStringForUint64Map + `,`, + `Sint32Map:` + mapStringForSint32Map + `,`, + `Sint64Map:` + mapStringForSint64Map + `,`, + `Fixed32Map:` + mapStringForFixed32Map + `,`, + `Sfixed32Map:` + mapStringForSfixed32Map + `,`, + `Fixed64Map:` + mapStringForFixed64Map + `,`, + `Sfixed64Map:` + mapStringForSfixed64Map + `,`, + `BoolMap:` + mapStringForBoolMap + `,`, + `StringMap:` + mapStringForStringMap + `,`, + `StringToBytesMap:` + mapStringForStringToBytesMap + `,`, + `StringToEnumMap:` + mapStringForStringToEnumMap + `,`, + `StringToMsgMap:` + mapStringForStringToMsgMap + `,`, + `}`, + }, "") + return s +} +func (this *AllMapsOrdered) String() string { + if this == nil { + return "nil" + } + keysForStringToDoubleMap := make([]string, 0, len(this.StringToDoubleMap)) + for k := range this.StringToDoubleMap { + keysForStringToDoubleMap = append(keysForStringToDoubleMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToDoubleMap) + mapStringForStringToDoubleMap := "map[string]float64{" + for _, k := range keysForStringToDoubleMap { + mapStringForStringToDoubleMap += fmt.Sprintf("%v: %v,", k, this.StringToDoubleMap[k]) + } + mapStringForStringToDoubleMap += "}" + keysForStringToFloatMap := make([]string, 0, len(this.StringToFloatMap)) + for k := range this.StringToFloatMap { + keysForStringToFloatMap = append(keysForStringToFloatMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToFloatMap) + mapStringForStringToFloatMap := "map[string]float32{" + for _, k := range keysForStringToFloatMap { + mapStringForStringToFloatMap += fmt.Sprintf("%v: %v,", k, this.StringToFloatMap[k]) + } + mapStringForStringToFloatMap += "}" + keysForInt32Map := make([]int32, 0, len(this.Int32Map)) + for k := range this.Int32Map { + keysForInt32Map = append(keysForInt32Map, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForInt32Map) + mapStringForInt32Map := "map[int32]int32{" + for _, k := range keysForInt32Map { + mapStringForInt32Map += fmt.Sprintf("%v: %v,", k, this.Int32Map[k]) + } + mapStringForInt32Map += "}" + keysForInt64Map := make([]int64, 0, len(this.Int64Map)) + for k := range this.Int64Map { + keysForInt64Map = append(keysForInt64Map, k) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForInt64Map) + mapStringForInt64Map := "map[int64]int64{" + for _, k := range keysForInt64Map { + mapStringForInt64Map += fmt.Sprintf("%v: %v,", k, this.Int64Map[k]) + } + mapStringForInt64Map += "}" + keysForUint32Map := make([]uint32, 0, len(this.Uint32Map)) + for k := range this.Uint32Map { + keysForUint32Map = append(keysForUint32Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint32s(keysForUint32Map) + mapStringForUint32Map := "map[uint32]uint32{" + for _, k := range keysForUint32Map { + mapStringForUint32Map += fmt.Sprintf("%v: %v,", k, this.Uint32Map[k]) + } + mapStringForUint32Map += "}" + keysForUint64Map := make([]uint64, 0, len(this.Uint64Map)) + for k := range this.Uint64Map { + keysForUint64Map = append(keysForUint64Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint64s(keysForUint64Map) + mapStringForUint64Map := "map[uint64]uint64{" + for _, k := range keysForUint64Map { + mapStringForUint64Map += fmt.Sprintf("%v: %v,", k, this.Uint64Map[k]) + } + mapStringForUint64Map += "}" + keysForSint32Map := make([]int32, 0, len(this.Sint32Map)) + for k := range this.Sint32Map { + keysForSint32Map = append(keysForSint32Map, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForSint32Map) + mapStringForSint32Map := "map[int32]int32{" + for _, k := range keysForSint32Map { + mapStringForSint32Map += fmt.Sprintf("%v: %v,", k, this.Sint32Map[k]) + } + mapStringForSint32Map += "}" + keysForSint64Map := make([]int64, 0, len(this.Sint64Map)) + for k := range this.Sint64Map { + keysForSint64Map = append(keysForSint64Map, k) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForSint64Map) + mapStringForSint64Map := "map[int64]int64{" + for _, k := range keysForSint64Map { + mapStringForSint64Map += fmt.Sprintf("%v: %v,", k, this.Sint64Map[k]) + } + mapStringForSint64Map += "}" + keysForFixed32Map := make([]uint32, 0, len(this.Fixed32Map)) + for k := range this.Fixed32Map { + keysForFixed32Map = append(keysForFixed32Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint32s(keysForFixed32Map) + mapStringForFixed32Map := "map[uint32]uint32{" + for _, k := range keysForFixed32Map { + mapStringForFixed32Map += fmt.Sprintf("%v: %v,", k, this.Fixed32Map[k]) + } + mapStringForFixed32Map += "}" + keysForSfixed32Map := make([]int32, 0, len(this.Sfixed32Map)) + for k := range this.Sfixed32Map { + keysForSfixed32Map = append(keysForSfixed32Map, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForSfixed32Map) + mapStringForSfixed32Map := "map[int32]int32{" + for _, k := range keysForSfixed32Map { + mapStringForSfixed32Map += fmt.Sprintf("%v: %v,", k, this.Sfixed32Map[k]) + } + mapStringForSfixed32Map += "}" + keysForFixed64Map := make([]uint64, 0, len(this.Fixed64Map)) + for k := range this.Fixed64Map { + keysForFixed64Map = append(keysForFixed64Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint64s(keysForFixed64Map) + mapStringForFixed64Map := "map[uint64]uint64{" + for _, k := range keysForFixed64Map { + mapStringForFixed64Map += fmt.Sprintf("%v: %v,", k, this.Fixed64Map[k]) + } + mapStringForFixed64Map += "}" + keysForSfixed64Map := make([]int64, 0, len(this.Sfixed64Map)) + for k := range this.Sfixed64Map { + keysForSfixed64Map = append(keysForSfixed64Map, k) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForSfixed64Map) + mapStringForSfixed64Map := "map[int64]int64{" + for _, k := range keysForSfixed64Map { + mapStringForSfixed64Map += fmt.Sprintf("%v: %v,", k, this.Sfixed64Map[k]) + } + mapStringForSfixed64Map += "}" + keysForBoolMap := make([]bool, 0, len(this.BoolMap)) + for k := range this.BoolMap { + keysForBoolMap = append(keysForBoolMap, k) + } + github_com_gogo_protobuf_sortkeys.Bools(keysForBoolMap) + mapStringForBoolMap := "map[bool]bool{" + for _, k := range keysForBoolMap { + mapStringForBoolMap += fmt.Sprintf("%v: %v,", k, this.BoolMap[k]) + } + mapStringForBoolMap += "}" + keysForStringMap := make([]string, 0, len(this.StringMap)) + for k := range this.StringMap { + keysForStringMap = append(keysForStringMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringMap) + mapStringForStringMap := "map[string]string{" + for _, k := range keysForStringMap { + mapStringForStringMap += fmt.Sprintf("%v: %v,", k, this.StringMap[k]) + } + mapStringForStringMap += "}" + keysForStringToBytesMap := make([]string, 0, len(this.StringToBytesMap)) + for k := range this.StringToBytesMap { + keysForStringToBytesMap = append(keysForStringToBytesMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToBytesMap) + mapStringForStringToBytesMap := "map[string][]byte{" + for _, k := range keysForStringToBytesMap { + mapStringForStringToBytesMap += fmt.Sprintf("%v: %v,", k, this.StringToBytesMap[k]) + } + mapStringForStringToBytesMap += "}" + keysForStringToEnumMap := make([]string, 0, len(this.StringToEnumMap)) + for k := range this.StringToEnumMap { + keysForStringToEnumMap = append(keysForStringToEnumMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToEnumMap) + mapStringForStringToEnumMap := "map[string]MapEnum{" + for _, k := range keysForStringToEnumMap { + mapStringForStringToEnumMap += fmt.Sprintf("%v: %v,", k, this.StringToEnumMap[k]) + } + mapStringForStringToEnumMap += "}" + keysForStringToMsgMap := make([]string, 0, len(this.StringToMsgMap)) + for k := range this.StringToMsgMap { + keysForStringToMsgMap = append(keysForStringToMsgMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToMsgMap) + mapStringForStringToMsgMap := "map[string]*FloatingPoint{" + for _, k := range keysForStringToMsgMap { + mapStringForStringToMsgMap += fmt.Sprintf("%v: %v,", k, this.StringToMsgMap[k]) + } + mapStringForStringToMsgMap += "}" + s := strings.Join([]string{`&AllMapsOrdered{`, + `StringToDoubleMap:` + mapStringForStringToDoubleMap + `,`, + `StringToFloatMap:` + mapStringForStringToFloatMap + `,`, + `Int32Map:` + mapStringForInt32Map + `,`, + `Int64Map:` + mapStringForInt64Map + `,`, + `Uint32Map:` + mapStringForUint32Map + `,`, + `Uint64Map:` + mapStringForUint64Map + `,`, + `Sint32Map:` + mapStringForSint32Map + `,`, + `Sint64Map:` + mapStringForSint64Map + `,`, + `Fixed32Map:` + mapStringForFixed32Map + `,`, + `Sfixed32Map:` + mapStringForSfixed32Map + `,`, + `Fixed64Map:` + mapStringForFixed64Map + `,`, + `Sfixed64Map:` + mapStringForSfixed64Map + `,`, + `BoolMap:` + mapStringForBoolMap + `,`, + `StringMap:` + mapStringForStringMap + `,`, + `StringToBytesMap:` + mapStringForStringToBytesMap + `,`, + `StringToEnumMap:` + mapStringForStringToEnumMap + `,`, + `StringToMsgMap:` + mapStringForStringToMsgMap + `,`, + `}`, + }, "") + return s +} +func (this *MessageWithMap) String() string { + if this == nil { + return "nil" + } + keysForNameMapping := make([]int32, 0, len(this.NameMapping)) + for k := range this.NameMapping { + keysForNameMapping = append(keysForNameMapping, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForNameMapping) + mapStringForNameMapping := "map[int32]string{" + for _, k := range keysForNameMapping { + mapStringForNameMapping += fmt.Sprintf("%v: %v,", k, this.NameMapping[k]) + } + mapStringForNameMapping += "}" + keysForMsgMapping := make([]int64, 0, len(this.MsgMapping)) + for k := range this.MsgMapping { + keysForMsgMapping = append(keysForMsgMapping, k) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForMsgMapping) + mapStringForMsgMapping := "map[int64]*FloatingPoint{" + for _, k := range keysForMsgMapping { + mapStringForMsgMapping += fmt.Sprintf("%v: %v,", k, this.MsgMapping[k]) + } + mapStringForMsgMapping += "}" + keysForByteMapping := make([]bool, 0, len(this.ByteMapping)) + for k := range this.ByteMapping { + keysForByteMapping = append(keysForByteMapping, k) + } + github_com_gogo_protobuf_sortkeys.Bools(keysForByteMapping) + mapStringForByteMapping := "map[bool][]byte{" + for _, k := range keysForByteMapping { + mapStringForByteMapping += fmt.Sprintf("%v: %v,", k, this.ByteMapping[k]) + } + mapStringForByteMapping += "}" + s := strings.Join([]string{`&MessageWithMap{`, + `NameMapping:` + mapStringForNameMapping + `,`, + `MsgMapping:` + mapStringForMsgMapping + `,`, + `ByteMapping:` + mapStringForByteMapping + `,`, + `}`, + }, "") + return s +} +func (this *FloatingPoint) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&FloatingPoint{`, + `F:` + fmt.Sprintf("%v", this.F) + `,`, + `}`, + }, "") + return s +} +func (this *Uint128Pair) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&Uint128Pair{`, + `Left:` + fmt.Sprintf("%v", this.Left) + `,`, + `Right:` + fmt.Sprintf("%v", this.Right) + `,`, + `}`, + }, "") + return s +} +func (this *ContainsNestedMap) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&ContainsNestedMap{`, + `}`, + }, "") + return s +} +func (this *ContainsNestedMap_NestedMap) String() string { + if this == nil { + return "nil" + } + keysForNestedMapField := make([]string, 0, len(this.NestedMapField)) + for k := range this.NestedMapField { + keysForNestedMapField = append(keysForNestedMapField, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForNestedMapField) + mapStringForNestedMapField := "map[string]float64{" + for _, k := range keysForNestedMapField { + mapStringForNestedMapField += fmt.Sprintf("%v: %v,", k, this.NestedMapField[k]) + } + mapStringForNestedMapField += "}" + s := strings.Join([]string{`&ContainsNestedMap_NestedMap{`, + `NestedMapField:` + mapStringForNestedMapField + `,`, + `}`, + }, "") + return s +} +func valueToStringTheproto3(v interface{}) string { + rv := reflect.ValueOf(v) + if rv.IsNil() { + return "nil" + } + pv := reflect.Indirect(rv).Interface() + return fmt.Sprintf("*%v", pv) +} +func (m *Message) 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 ErrIntOverflowTheproto3Unsafe + } + 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: Message: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Message: 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 ErrIntOverflowTheproto3Unsafe + } + 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 ErrInvalidLengthTheproto3Unsafe + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Name = string(data[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Hilarity", wireType) + } + m.Hilarity = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + m.Hilarity |= (Message_Humour(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field HeightInCm", wireType) + } + m.HeightInCm = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + m.HeightInCm |= (uint32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + 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 ErrIntOverflowTheproto3Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthTheproto3Unsafe + } + 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 != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field ResultCount", wireType) + } + m.ResultCount = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + m.ResultCount |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + case 8: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field TrueScotsman", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.TrueScotsman = bool(v != 0) + case 9: + if wireType != 5 { + return fmt.Errorf("proto: wrong wireType = %d for field Score", wireType) + } + if iNdEx+4 > l { + return io.ErrUnexpectedEOF + } + m.Score = *(*float32)(unsafe.Pointer(&data[iNdEx])) + iNdEx += 4 + case 5: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Key", wireType) + } + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Key = append(m.Key, v) + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Nested", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTheproto3Unsafe + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Nested == nil { + m.Nested = &Nested{} + } + if err := m.Nested.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 10: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Terrain", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTheproto3Unsafe + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var keykey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + keykey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapkey int64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + mapkey |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var valuekey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + valuekey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapmsglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + mapmsglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if mapmsglen < 0 { + return ErrInvalidLengthTheproto3Unsafe + } + postmsgIndex := iNdEx + mapmsglen + if mapmsglen < 0 { + return ErrInvalidLengthTheproto3Unsafe + } + if postmsgIndex > l { + return io.ErrUnexpectedEOF + } + mapvalue := &Nested{} + if err := mapvalue.Unmarshal(data[iNdEx:postmsgIndex]); err != nil { + return err + } + iNdEx = postmsgIndex + if m.Terrain == nil { + m.Terrain = make(map[int64]*Nested) + } + m.Terrain[mapkey] = mapvalue + iNdEx = postIndex + case 11: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Proto2Field", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTheproto3Unsafe + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Proto2Field == nil { + m.Proto2Field = &test.NinOptNative{} + } + if err := m.Proto2Field.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 13: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Proto2Value", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTheproto3Unsafe + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var keykey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + keykey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapkey int64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + mapkey |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var valuekey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + valuekey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapmsglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + mapmsglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if mapmsglen < 0 { + return ErrInvalidLengthTheproto3Unsafe + } + postmsgIndex := iNdEx + mapmsglen + if mapmsglen < 0 { + return ErrInvalidLengthTheproto3Unsafe + } + if postmsgIndex > l { + return io.ErrUnexpectedEOF + } + mapvalue := &test.NinOptEnum{} + if err := mapvalue.Unmarshal(data[iNdEx:postmsgIndex]); err != nil { + return err + } + iNdEx = postmsgIndex + if m.Proto2Value == nil { + m.Proto2Value = make(map[int64]*test.NinOptEnum) + } + m.Proto2Value[mapkey] = mapvalue + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTheproto3Unsafe(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTheproto3Unsafe + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Nested) 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 ErrIntOverflowTheproto3Unsafe + } + 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: Nested: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Nested: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Bunny", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3Unsafe + } + 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 ErrInvalidLengthTheproto3Unsafe + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Bunny = string(data[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTheproto3Unsafe(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTheproto3Unsafe + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *AllMaps) 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 ErrIntOverflowTheproto3Unsafe + } + 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: AllMaps: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: AllMaps: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field StringToDoubleMap", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTheproto3Unsafe + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var keykey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + keykey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var stringLenmapkey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLenmapkey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapkey := int(stringLenmapkey) + if intStringLenmapkey < 0 { + return ErrInvalidLengthTheproto3Unsafe + } + postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey > l { + return io.ErrUnexpectedEOF + } + mapkey := string(data[iNdEx:postStringIndexmapkey]) + iNdEx = postStringIndexmapkey + var valuekey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + valuekey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapvaluetemp uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + iNdEx += 8 + mapvaluetemp = uint64(data[iNdEx-8]) + mapvaluetemp |= uint64(data[iNdEx-7]) << 8 + mapvaluetemp |= uint64(data[iNdEx-6]) << 16 + mapvaluetemp |= uint64(data[iNdEx-5]) << 24 + mapvaluetemp |= uint64(data[iNdEx-4]) << 32 + mapvaluetemp |= uint64(data[iNdEx-3]) << 40 + mapvaluetemp |= uint64(data[iNdEx-2]) << 48 + mapvaluetemp |= uint64(data[iNdEx-1]) << 56 + mapvalue := math.Float64frombits(mapvaluetemp) + if m.StringToDoubleMap == nil { + m.StringToDoubleMap = make(map[string]float64) + } + m.StringToDoubleMap[mapkey] = mapvalue + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field StringToFloatMap", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTheproto3Unsafe + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var keykey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + keykey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var stringLenmapkey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLenmapkey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapkey := int(stringLenmapkey) + if intStringLenmapkey < 0 { + return ErrInvalidLengthTheproto3Unsafe + } + postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey > l { + return io.ErrUnexpectedEOF + } + mapkey := string(data[iNdEx:postStringIndexmapkey]) + iNdEx = postStringIndexmapkey + var valuekey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + valuekey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapvaluetemp uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + iNdEx += 4 + mapvaluetemp = uint32(data[iNdEx-4]) + mapvaluetemp |= uint32(data[iNdEx-3]) << 8 + mapvaluetemp |= uint32(data[iNdEx-2]) << 16 + mapvaluetemp |= uint32(data[iNdEx-1]) << 24 + mapvalue := math.Float32frombits(mapvaluetemp) + if m.StringToFloatMap == nil { + m.StringToFloatMap = make(map[string]float32) + } + m.StringToFloatMap[mapkey] = mapvalue + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Int32Map", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTheproto3Unsafe + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var keykey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + keykey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapkey int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + mapkey |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var valuekey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + valuekey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapvalue int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + mapvalue |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if m.Int32Map == nil { + m.Int32Map = make(map[int32]int32) + } + m.Int32Map[mapkey] = mapvalue + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Int64Map", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTheproto3Unsafe + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var keykey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + keykey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapkey int64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + mapkey |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var valuekey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + valuekey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapvalue int64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + mapvalue |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if m.Int64Map == nil { + m.Int64Map = make(map[int64]int64) + } + m.Int64Map[mapkey] = mapvalue + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Uint32Map", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTheproto3Unsafe + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var keykey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + keykey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapkey uint32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + mapkey |= (uint32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var valuekey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + valuekey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapvalue uint32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + mapvalue |= (uint32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if m.Uint32Map == nil { + m.Uint32Map = make(map[uint32]uint32) + } + m.Uint32Map[mapkey] = mapvalue + iNdEx = postIndex + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Uint64Map", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTheproto3Unsafe + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var keykey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + keykey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapkey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + mapkey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var valuekey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + valuekey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapvalue uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + mapvalue |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if m.Uint64Map == nil { + m.Uint64Map = make(map[uint64]uint64) + } + m.Uint64Map[mapkey] = mapvalue + iNdEx = postIndex + case 7: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Sint32Map", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTheproto3Unsafe + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var keykey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + keykey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapkeytemp int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + mapkeytemp |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + mapkeytemp = int32((uint32(mapkeytemp) >> 1) ^ uint32(((mapkeytemp&1)<<31)>>31)) + mapkey := int32(mapkeytemp) + var valuekey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + valuekey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapvaluetemp int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + mapvaluetemp |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + mapvaluetemp = int32((uint32(mapvaluetemp) >> 1) ^ uint32(((mapvaluetemp&1)<<31)>>31)) + mapvalue := int32(mapvaluetemp) + if m.Sint32Map == nil { + m.Sint32Map = make(map[int32]int32) + } + m.Sint32Map[mapkey] = mapvalue + iNdEx = postIndex + case 8: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Sint64Map", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTheproto3Unsafe + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var keykey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + keykey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapkeytemp uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + mapkeytemp |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + mapkeytemp = (mapkeytemp >> 1) ^ uint64((int64(mapkeytemp&1)<<63)>>63) + mapkey := int64(mapkeytemp) + var valuekey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + valuekey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapvaluetemp uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + mapvaluetemp |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + mapvaluetemp = (mapvaluetemp >> 1) ^ uint64((int64(mapvaluetemp&1)<<63)>>63) + mapvalue := int64(mapvaluetemp) + if m.Sint64Map == nil { + m.Sint64Map = make(map[int64]int64) + } + m.Sint64Map[mapkey] = mapvalue + iNdEx = postIndex + case 9: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Fixed32Map", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTheproto3Unsafe + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var keykey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + keykey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapkey uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + iNdEx += 4 + mapkey = uint32(data[iNdEx-4]) + mapkey |= uint32(data[iNdEx-3]) << 8 + mapkey |= uint32(data[iNdEx-2]) << 16 + mapkey |= uint32(data[iNdEx-1]) << 24 + var valuekey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + valuekey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapvalue uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + iNdEx += 4 + mapvalue = uint32(data[iNdEx-4]) + mapvalue |= uint32(data[iNdEx-3]) << 8 + mapvalue |= uint32(data[iNdEx-2]) << 16 + mapvalue |= uint32(data[iNdEx-1]) << 24 + if m.Fixed32Map == nil { + m.Fixed32Map = make(map[uint32]uint32) + } + m.Fixed32Map[mapkey] = mapvalue + iNdEx = postIndex + case 10: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Sfixed32Map", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTheproto3Unsafe + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var keykey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + keykey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapkey int32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + iNdEx += 4 + mapkey = int32(data[iNdEx-4]) + mapkey |= int32(data[iNdEx-3]) << 8 + mapkey |= int32(data[iNdEx-2]) << 16 + mapkey |= int32(data[iNdEx-1]) << 24 + var valuekey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + valuekey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapvalue int32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + iNdEx += 4 + mapvalue = int32(data[iNdEx-4]) + mapvalue |= int32(data[iNdEx-3]) << 8 + mapvalue |= int32(data[iNdEx-2]) << 16 + mapvalue |= int32(data[iNdEx-1]) << 24 + if m.Sfixed32Map == nil { + m.Sfixed32Map = make(map[int32]int32) + } + m.Sfixed32Map[mapkey] = mapvalue + iNdEx = postIndex + case 11: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Fixed64Map", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTheproto3Unsafe + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var keykey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + keykey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapkey uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + iNdEx += 8 + mapkey = uint64(data[iNdEx-8]) + mapkey |= uint64(data[iNdEx-7]) << 8 + mapkey |= uint64(data[iNdEx-6]) << 16 + mapkey |= uint64(data[iNdEx-5]) << 24 + mapkey |= uint64(data[iNdEx-4]) << 32 + mapkey |= uint64(data[iNdEx-3]) << 40 + mapkey |= uint64(data[iNdEx-2]) << 48 + mapkey |= uint64(data[iNdEx-1]) << 56 + var valuekey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + valuekey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapvalue uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + iNdEx += 8 + mapvalue = uint64(data[iNdEx-8]) + mapvalue |= uint64(data[iNdEx-7]) << 8 + mapvalue |= uint64(data[iNdEx-6]) << 16 + mapvalue |= uint64(data[iNdEx-5]) << 24 + mapvalue |= uint64(data[iNdEx-4]) << 32 + mapvalue |= uint64(data[iNdEx-3]) << 40 + mapvalue |= uint64(data[iNdEx-2]) << 48 + mapvalue |= uint64(data[iNdEx-1]) << 56 + if m.Fixed64Map == nil { + m.Fixed64Map = make(map[uint64]uint64) + } + m.Fixed64Map[mapkey] = mapvalue + iNdEx = postIndex + case 12: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Sfixed64Map", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTheproto3Unsafe + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var keykey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + keykey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapkey int64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + iNdEx += 8 + mapkey = int64(data[iNdEx-8]) + mapkey |= int64(data[iNdEx-7]) << 8 + mapkey |= int64(data[iNdEx-6]) << 16 + mapkey |= int64(data[iNdEx-5]) << 24 + mapkey |= int64(data[iNdEx-4]) << 32 + mapkey |= int64(data[iNdEx-3]) << 40 + mapkey |= int64(data[iNdEx-2]) << 48 + mapkey |= int64(data[iNdEx-1]) << 56 + var valuekey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + valuekey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapvalue int64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + iNdEx += 8 + mapvalue = int64(data[iNdEx-8]) + mapvalue |= int64(data[iNdEx-7]) << 8 + mapvalue |= int64(data[iNdEx-6]) << 16 + mapvalue |= int64(data[iNdEx-5]) << 24 + mapvalue |= int64(data[iNdEx-4]) << 32 + mapvalue |= int64(data[iNdEx-3]) << 40 + mapvalue |= int64(data[iNdEx-2]) << 48 + mapvalue |= int64(data[iNdEx-1]) << 56 + if m.Sfixed64Map == nil { + m.Sfixed64Map = make(map[int64]int64) + } + m.Sfixed64Map[mapkey] = mapvalue + iNdEx = postIndex + case 13: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field BoolMap", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTheproto3Unsafe + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var keykey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + keykey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapkeytemp int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + mapkeytemp |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + mapkey := bool(mapkeytemp != 0) + var valuekey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + valuekey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapvaluetemp int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + mapvaluetemp |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + mapvalue := bool(mapvaluetemp != 0) + if m.BoolMap == nil { + m.BoolMap = make(map[bool]bool) + } + m.BoolMap[mapkey] = mapvalue + iNdEx = postIndex + case 14: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field StringMap", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTheproto3Unsafe + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var keykey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + keykey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var stringLenmapkey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLenmapkey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapkey := int(stringLenmapkey) + if intStringLenmapkey < 0 { + return ErrInvalidLengthTheproto3Unsafe + } + postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey > l { + return io.ErrUnexpectedEOF + } + mapkey := string(data[iNdEx:postStringIndexmapkey]) + iNdEx = postStringIndexmapkey + var valuekey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + valuekey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var stringLenmapvalue uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLenmapvalue |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapvalue := int(stringLenmapvalue) + if intStringLenmapvalue < 0 { + return ErrInvalidLengthTheproto3Unsafe + } + postStringIndexmapvalue := iNdEx + intStringLenmapvalue + if postStringIndexmapvalue > l { + return io.ErrUnexpectedEOF + } + mapvalue := string(data[iNdEx:postStringIndexmapvalue]) + iNdEx = postStringIndexmapvalue + if m.StringMap == nil { + m.StringMap = make(map[string]string) + } + m.StringMap[mapkey] = mapvalue + iNdEx = postIndex + case 15: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field StringToBytesMap", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTheproto3Unsafe + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var keykey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + keykey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var stringLenmapkey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLenmapkey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapkey := int(stringLenmapkey) + if intStringLenmapkey < 0 { + return ErrInvalidLengthTheproto3Unsafe + } + postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey > l { + return io.ErrUnexpectedEOF + } + mapkey := string(data[iNdEx:postStringIndexmapkey]) + iNdEx = postStringIndexmapkey + var valuekey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + valuekey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapbyteLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + mapbyteLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intMapbyteLen := int(mapbyteLen) + if intMapbyteLen < 0 { + return ErrInvalidLengthTheproto3Unsafe + } + postbytesIndex := iNdEx + intMapbyteLen + if postbytesIndex > l { + return io.ErrUnexpectedEOF + } + mapvalue := make([]byte, mapbyteLen) + copy(mapvalue, data[iNdEx:postbytesIndex]) + iNdEx = postbytesIndex + if m.StringToBytesMap == nil { + m.StringToBytesMap = make(map[string][]byte) + } + m.StringToBytesMap[mapkey] = mapvalue + iNdEx = postIndex + case 16: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field StringToEnumMap", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTheproto3Unsafe + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var keykey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + keykey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var stringLenmapkey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLenmapkey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapkey := int(stringLenmapkey) + if intStringLenmapkey < 0 { + return ErrInvalidLengthTheproto3Unsafe + } + postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey > l { + return io.ErrUnexpectedEOF + } + mapkey := string(data[iNdEx:postStringIndexmapkey]) + iNdEx = postStringIndexmapkey + var valuekey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + valuekey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapvalue MapEnum + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + mapvalue |= (MapEnum(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if m.StringToEnumMap == nil { + m.StringToEnumMap = make(map[string]MapEnum) + } + m.StringToEnumMap[mapkey] = mapvalue + iNdEx = postIndex + case 17: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field StringToMsgMap", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTheproto3Unsafe + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var keykey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + keykey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var stringLenmapkey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLenmapkey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapkey := int(stringLenmapkey) + if intStringLenmapkey < 0 { + return ErrInvalidLengthTheproto3Unsafe + } + postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey > l { + return io.ErrUnexpectedEOF + } + mapkey := string(data[iNdEx:postStringIndexmapkey]) + iNdEx = postStringIndexmapkey + var valuekey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + valuekey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapmsglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + mapmsglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if mapmsglen < 0 { + return ErrInvalidLengthTheproto3Unsafe + } + postmsgIndex := iNdEx + mapmsglen + if mapmsglen < 0 { + return ErrInvalidLengthTheproto3Unsafe + } + if postmsgIndex > l { + return io.ErrUnexpectedEOF + } + mapvalue := &FloatingPoint{} + if err := mapvalue.Unmarshal(data[iNdEx:postmsgIndex]); err != nil { + return err + } + iNdEx = postmsgIndex + if m.StringToMsgMap == nil { + m.StringToMsgMap = make(map[string]*FloatingPoint) + } + m.StringToMsgMap[mapkey] = mapvalue + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTheproto3Unsafe(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTheproto3Unsafe + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *AllMapsOrdered) 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 ErrIntOverflowTheproto3Unsafe + } + 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: AllMapsOrdered: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: AllMapsOrdered: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field StringToDoubleMap", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTheproto3Unsafe + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var keykey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + keykey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var stringLenmapkey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLenmapkey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapkey := int(stringLenmapkey) + if intStringLenmapkey < 0 { + return ErrInvalidLengthTheproto3Unsafe + } + postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey > l { + return io.ErrUnexpectedEOF + } + mapkey := string(data[iNdEx:postStringIndexmapkey]) + iNdEx = postStringIndexmapkey + var valuekey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + valuekey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapvaluetemp uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + iNdEx += 8 + mapvaluetemp = uint64(data[iNdEx-8]) + mapvaluetemp |= uint64(data[iNdEx-7]) << 8 + mapvaluetemp |= uint64(data[iNdEx-6]) << 16 + mapvaluetemp |= uint64(data[iNdEx-5]) << 24 + mapvaluetemp |= uint64(data[iNdEx-4]) << 32 + mapvaluetemp |= uint64(data[iNdEx-3]) << 40 + mapvaluetemp |= uint64(data[iNdEx-2]) << 48 + mapvaluetemp |= uint64(data[iNdEx-1]) << 56 + mapvalue := math.Float64frombits(mapvaluetemp) + if m.StringToDoubleMap == nil { + m.StringToDoubleMap = make(map[string]float64) + } + m.StringToDoubleMap[mapkey] = mapvalue + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field StringToFloatMap", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTheproto3Unsafe + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var keykey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + keykey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var stringLenmapkey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLenmapkey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapkey := int(stringLenmapkey) + if intStringLenmapkey < 0 { + return ErrInvalidLengthTheproto3Unsafe + } + postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey > l { + return io.ErrUnexpectedEOF + } + mapkey := string(data[iNdEx:postStringIndexmapkey]) + iNdEx = postStringIndexmapkey + var valuekey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + valuekey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapvaluetemp uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + iNdEx += 4 + mapvaluetemp = uint32(data[iNdEx-4]) + mapvaluetemp |= uint32(data[iNdEx-3]) << 8 + mapvaluetemp |= uint32(data[iNdEx-2]) << 16 + mapvaluetemp |= uint32(data[iNdEx-1]) << 24 + mapvalue := math.Float32frombits(mapvaluetemp) + if m.StringToFloatMap == nil { + m.StringToFloatMap = make(map[string]float32) + } + m.StringToFloatMap[mapkey] = mapvalue + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Int32Map", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTheproto3Unsafe + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var keykey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + keykey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapkey int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + mapkey |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var valuekey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + valuekey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapvalue int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + mapvalue |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if m.Int32Map == nil { + m.Int32Map = make(map[int32]int32) + } + m.Int32Map[mapkey] = mapvalue + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Int64Map", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTheproto3Unsafe + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var keykey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + keykey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapkey int64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + mapkey |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var valuekey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + valuekey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapvalue int64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + mapvalue |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if m.Int64Map == nil { + m.Int64Map = make(map[int64]int64) + } + m.Int64Map[mapkey] = mapvalue + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Uint32Map", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTheproto3Unsafe + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var keykey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + keykey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapkey uint32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + mapkey |= (uint32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var valuekey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + valuekey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapvalue uint32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + mapvalue |= (uint32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if m.Uint32Map == nil { + m.Uint32Map = make(map[uint32]uint32) + } + m.Uint32Map[mapkey] = mapvalue + iNdEx = postIndex + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Uint64Map", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTheproto3Unsafe + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var keykey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + keykey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapkey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + mapkey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var valuekey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + valuekey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapvalue uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + mapvalue |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if m.Uint64Map == nil { + m.Uint64Map = make(map[uint64]uint64) + } + m.Uint64Map[mapkey] = mapvalue + iNdEx = postIndex + case 7: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Sint32Map", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTheproto3Unsafe + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var keykey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + keykey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapkeytemp int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + mapkeytemp |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + mapkeytemp = int32((uint32(mapkeytemp) >> 1) ^ uint32(((mapkeytemp&1)<<31)>>31)) + mapkey := int32(mapkeytemp) + var valuekey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + valuekey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapvaluetemp int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + mapvaluetemp |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + mapvaluetemp = int32((uint32(mapvaluetemp) >> 1) ^ uint32(((mapvaluetemp&1)<<31)>>31)) + mapvalue := int32(mapvaluetemp) + if m.Sint32Map == nil { + m.Sint32Map = make(map[int32]int32) + } + m.Sint32Map[mapkey] = mapvalue + iNdEx = postIndex + case 8: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Sint64Map", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTheproto3Unsafe + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var keykey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + keykey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapkeytemp uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + mapkeytemp |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + mapkeytemp = (mapkeytemp >> 1) ^ uint64((int64(mapkeytemp&1)<<63)>>63) + mapkey := int64(mapkeytemp) + var valuekey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + valuekey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapvaluetemp uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + mapvaluetemp |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + mapvaluetemp = (mapvaluetemp >> 1) ^ uint64((int64(mapvaluetemp&1)<<63)>>63) + mapvalue := int64(mapvaluetemp) + if m.Sint64Map == nil { + m.Sint64Map = make(map[int64]int64) + } + m.Sint64Map[mapkey] = mapvalue + iNdEx = postIndex + case 9: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Fixed32Map", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTheproto3Unsafe + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var keykey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + keykey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapkey uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + iNdEx += 4 + mapkey = uint32(data[iNdEx-4]) + mapkey |= uint32(data[iNdEx-3]) << 8 + mapkey |= uint32(data[iNdEx-2]) << 16 + mapkey |= uint32(data[iNdEx-1]) << 24 + var valuekey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + valuekey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapvalue uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + iNdEx += 4 + mapvalue = uint32(data[iNdEx-4]) + mapvalue |= uint32(data[iNdEx-3]) << 8 + mapvalue |= uint32(data[iNdEx-2]) << 16 + mapvalue |= uint32(data[iNdEx-1]) << 24 + if m.Fixed32Map == nil { + m.Fixed32Map = make(map[uint32]uint32) + } + m.Fixed32Map[mapkey] = mapvalue + iNdEx = postIndex + case 10: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Sfixed32Map", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTheproto3Unsafe + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var keykey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + keykey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapkey int32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + iNdEx += 4 + mapkey = int32(data[iNdEx-4]) + mapkey |= int32(data[iNdEx-3]) << 8 + mapkey |= int32(data[iNdEx-2]) << 16 + mapkey |= int32(data[iNdEx-1]) << 24 + var valuekey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + valuekey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapvalue int32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + iNdEx += 4 + mapvalue = int32(data[iNdEx-4]) + mapvalue |= int32(data[iNdEx-3]) << 8 + mapvalue |= int32(data[iNdEx-2]) << 16 + mapvalue |= int32(data[iNdEx-1]) << 24 + if m.Sfixed32Map == nil { + m.Sfixed32Map = make(map[int32]int32) + } + m.Sfixed32Map[mapkey] = mapvalue + iNdEx = postIndex + case 11: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Fixed64Map", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTheproto3Unsafe + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var keykey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + keykey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapkey uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + iNdEx += 8 + mapkey = uint64(data[iNdEx-8]) + mapkey |= uint64(data[iNdEx-7]) << 8 + mapkey |= uint64(data[iNdEx-6]) << 16 + mapkey |= uint64(data[iNdEx-5]) << 24 + mapkey |= uint64(data[iNdEx-4]) << 32 + mapkey |= uint64(data[iNdEx-3]) << 40 + mapkey |= uint64(data[iNdEx-2]) << 48 + mapkey |= uint64(data[iNdEx-1]) << 56 + var valuekey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + valuekey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapvalue uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + iNdEx += 8 + mapvalue = uint64(data[iNdEx-8]) + mapvalue |= uint64(data[iNdEx-7]) << 8 + mapvalue |= uint64(data[iNdEx-6]) << 16 + mapvalue |= uint64(data[iNdEx-5]) << 24 + mapvalue |= uint64(data[iNdEx-4]) << 32 + mapvalue |= uint64(data[iNdEx-3]) << 40 + mapvalue |= uint64(data[iNdEx-2]) << 48 + mapvalue |= uint64(data[iNdEx-1]) << 56 + if m.Fixed64Map == nil { + m.Fixed64Map = make(map[uint64]uint64) + } + m.Fixed64Map[mapkey] = mapvalue + iNdEx = postIndex + case 12: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Sfixed64Map", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTheproto3Unsafe + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var keykey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + keykey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapkey int64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + iNdEx += 8 + mapkey = int64(data[iNdEx-8]) + mapkey |= int64(data[iNdEx-7]) << 8 + mapkey |= int64(data[iNdEx-6]) << 16 + mapkey |= int64(data[iNdEx-5]) << 24 + mapkey |= int64(data[iNdEx-4]) << 32 + mapkey |= int64(data[iNdEx-3]) << 40 + mapkey |= int64(data[iNdEx-2]) << 48 + mapkey |= int64(data[iNdEx-1]) << 56 + var valuekey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + valuekey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapvalue int64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + iNdEx += 8 + mapvalue = int64(data[iNdEx-8]) + mapvalue |= int64(data[iNdEx-7]) << 8 + mapvalue |= int64(data[iNdEx-6]) << 16 + mapvalue |= int64(data[iNdEx-5]) << 24 + mapvalue |= int64(data[iNdEx-4]) << 32 + mapvalue |= int64(data[iNdEx-3]) << 40 + mapvalue |= int64(data[iNdEx-2]) << 48 + mapvalue |= int64(data[iNdEx-1]) << 56 + if m.Sfixed64Map == nil { + m.Sfixed64Map = make(map[int64]int64) + } + m.Sfixed64Map[mapkey] = mapvalue + iNdEx = postIndex + case 13: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field BoolMap", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTheproto3Unsafe + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var keykey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + keykey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapkeytemp int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + mapkeytemp |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + mapkey := bool(mapkeytemp != 0) + var valuekey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + valuekey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapvaluetemp int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + mapvaluetemp |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + mapvalue := bool(mapvaluetemp != 0) + if m.BoolMap == nil { + m.BoolMap = make(map[bool]bool) + } + m.BoolMap[mapkey] = mapvalue + iNdEx = postIndex + case 14: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field StringMap", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTheproto3Unsafe + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var keykey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + keykey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var stringLenmapkey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLenmapkey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapkey := int(stringLenmapkey) + if intStringLenmapkey < 0 { + return ErrInvalidLengthTheproto3Unsafe + } + postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey > l { + return io.ErrUnexpectedEOF + } + mapkey := string(data[iNdEx:postStringIndexmapkey]) + iNdEx = postStringIndexmapkey + var valuekey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + valuekey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var stringLenmapvalue uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLenmapvalue |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapvalue := int(stringLenmapvalue) + if intStringLenmapvalue < 0 { + return ErrInvalidLengthTheproto3Unsafe + } + postStringIndexmapvalue := iNdEx + intStringLenmapvalue + if postStringIndexmapvalue > l { + return io.ErrUnexpectedEOF + } + mapvalue := string(data[iNdEx:postStringIndexmapvalue]) + iNdEx = postStringIndexmapvalue + if m.StringMap == nil { + m.StringMap = make(map[string]string) + } + m.StringMap[mapkey] = mapvalue + iNdEx = postIndex + case 15: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field StringToBytesMap", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTheproto3Unsafe + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var keykey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + keykey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var stringLenmapkey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLenmapkey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapkey := int(stringLenmapkey) + if intStringLenmapkey < 0 { + return ErrInvalidLengthTheproto3Unsafe + } + postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey > l { + return io.ErrUnexpectedEOF + } + mapkey := string(data[iNdEx:postStringIndexmapkey]) + iNdEx = postStringIndexmapkey + var valuekey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + valuekey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapbyteLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + mapbyteLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intMapbyteLen := int(mapbyteLen) + if intMapbyteLen < 0 { + return ErrInvalidLengthTheproto3Unsafe + } + postbytesIndex := iNdEx + intMapbyteLen + if postbytesIndex > l { + return io.ErrUnexpectedEOF + } + mapvalue := make([]byte, mapbyteLen) + copy(mapvalue, data[iNdEx:postbytesIndex]) + iNdEx = postbytesIndex + if m.StringToBytesMap == nil { + m.StringToBytesMap = make(map[string][]byte) + } + m.StringToBytesMap[mapkey] = mapvalue + iNdEx = postIndex + case 16: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field StringToEnumMap", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTheproto3Unsafe + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var keykey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + keykey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var stringLenmapkey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLenmapkey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapkey := int(stringLenmapkey) + if intStringLenmapkey < 0 { + return ErrInvalidLengthTheproto3Unsafe + } + postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey > l { + return io.ErrUnexpectedEOF + } + mapkey := string(data[iNdEx:postStringIndexmapkey]) + iNdEx = postStringIndexmapkey + var valuekey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + valuekey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapvalue MapEnum + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + mapvalue |= (MapEnum(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if m.StringToEnumMap == nil { + m.StringToEnumMap = make(map[string]MapEnum) + } + m.StringToEnumMap[mapkey] = mapvalue + iNdEx = postIndex + case 17: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field StringToMsgMap", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTheproto3Unsafe + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var keykey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + keykey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var stringLenmapkey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLenmapkey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapkey := int(stringLenmapkey) + if intStringLenmapkey < 0 { + return ErrInvalidLengthTheproto3Unsafe + } + postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey > l { + return io.ErrUnexpectedEOF + } + mapkey := string(data[iNdEx:postStringIndexmapkey]) + iNdEx = postStringIndexmapkey + var valuekey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + valuekey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapmsglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + mapmsglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if mapmsglen < 0 { + return ErrInvalidLengthTheproto3Unsafe + } + postmsgIndex := iNdEx + mapmsglen + if mapmsglen < 0 { + return ErrInvalidLengthTheproto3Unsafe + } + if postmsgIndex > l { + return io.ErrUnexpectedEOF + } + mapvalue := &FloatingPoint{} + if err := mapvalue.Unmarshal(data[iNdEx:postmsgIndex]); err != nil { + return err + } + iNdEx = postmsgIndex + if m.StringToMsgMap == nil { + m.StringToMsgMap = make(map[string]*FloatingPoint) + } + m.StringToMsgMap[mapkey] = mapvalue + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTheproto3Unsafe(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTheproto3Unsafe + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MessageWithMap) 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 ErrIntOverflowTheproto3Unsafe + } + 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: MessageWithMap: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MessageWithMap: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NameMapping", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTheproto3Unsafe + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var keykey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + keykey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapkey int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + mapkey |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var valuekey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + valuekey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var stringLenmapvalue uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLenmapvalue |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapvalue := int(stringLenmapvalue) + if intStringLenmapvalue < 0 { + return ErrInvalidLengthTheproto3Unsafe + } + postStringIndexmapvalue := iNdEx + intStringLenmapvalue + if postStringIndexmapvalue > l { + return io.ErrUnexpectedEOF + } + mapvalue := string(data[iNdEx:postStringIndexmapvalue]) + iNdEx = postStringIndexmapvalue + if m.NameMapping == nil { + m.NameMapping = make(map[int32]string) + } + m.NameMapping[mapkey] = mapvalue + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MsgMapping", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTheproto3Unsafe + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var keykey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + keykey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapkeytemp uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + mapkeytemp |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + mapkeytemp = (mapkeytemp >> 1) ^ uint64((int64(mapkeytemp&1)<<63)>>63) + mapkey := int64(mapkeytemp) + var valuekey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + valuekey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapmsglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + mapmsglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if mapmsglen < 0 { + return ErrInvalidLengthTheproto3Unsafe + } + postmsgIndex := iNdEx + mapmsglen + if mapmsglen < 0 { + return ErrInvalidLengthTheproto3Unsafe + } + if postmsgIndex > l { + return io.ErrUnexpectedEOF + } + mapvalue := &FloatingPoint{} + if err := mapvalue.Unmarshal(data[iNdEx:postmsgIndex]); err != nil { + return err + } + iNdEx = postmsgIndex + if m.MsgMapping == nil { + m.MsgMapping = make(map[int64]*FloatingPoint) + } + m.MsgMapping[mapkey] = mapvalue + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ByteMapping", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTheproto3Unsafe + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var keykey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + keykey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapkeytemp int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + mapkeytemp |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + mapkey := bool(mapkeytemp != 0) + var valuekey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + valuekey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapbyteLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + mapbyteLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intMapbyteLen := int(mapbyteLen) + if intMapbyteLen < 0 { + return ErrInvalidLengthTheproto3Unsafe + } + postbytesIndex := iNdEx + intMapbyteLen + if postbytesIndex > l { + return io.ErrUnexpectedEOF + } + mapvalue := make([]byte, mapbyteLen) + copy(mapvalue, data[iNdEx:postbytesIndex]) + iNdEx = postbytesIndex + if m.ByteMapping == nil { + m.ByteMapping = make(map[bool][]byte) + } + m.ByteMapping[mapkey] = mapvalue + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTheproto3Unsafe(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTheproto3Unsafe + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *FloatingPoint) 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 ErrIntOverflowTheproto3Unsafe + } + 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: FloatingPoint: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: FloatingPoint: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field F", wireType) + } + if iNdEx+8 > l { + return io.ErrUnexpectedEOF + } + m.F = *(*float64)(unsafe.Pointer(&data[iNdEx])) + iNdEx += 8 + default: + iNdEx = preIndex + skippy, err := skipTheproto3Unsafe(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTheproto3Unsafe + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Uint128Pair) 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 ErrIntOverflowTheproto3Unsafe + } + 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: Uint128Pair: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Uint128Pair: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Left", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthTheproto3Unsafe + } + postIndex := iNdEx + byteLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Left.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Right", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthTheproto3Unsafe + } + postIndex := iNdEx + byteLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var v github_com_gogo_protobuf_test_custom.Uint128 + m.Right = &v + if err := m.Right.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTheproto3Unsafe(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTheproto3Unsafe + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ContainsNestedMap) 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 ErrIntOverflowTheproto3Unsafe + } + 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: ContainsNestedMap: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ContainsNestedMap: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipTheproto3Unsafe(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTheproto3Unsafe + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ContainsNestedMap_NestedMap) 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 ErrIntOverflowTheproto3Unsafe + } + 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: NestedMap: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: NestedMap: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NestedMapField", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTheproto3Unsafe + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var keykey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + keykey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var stringLenmapkey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLenmapkey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapkey := int(stringLenmapkey) + if intStringLenmapkey < 0 { + return ErrInvalidLengthTheproto3Unsafe + } + postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey > l { + return io.ErrUnexpectedEOF + } + mapkey := string(data[iNdEx:postStringIndexmapkey]) + iNdEx = postStringIndexmapkey + var valuekey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3Unsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + valuekey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapvaluetemp uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + iNdEx += 8 + mapvaluetemp = uint64(data[iNdEx-8]) + mapvaluetemp |= uint64(data[iNdEx-7]) << 8 + mapvaluetemp |= uint64(data[iNdEx-6]) << 16 + mapvaluetemp |= uint64(data[iNdEx-5]) << 24 + mapvaluetemp |= uint64(data[iNdEx-4]) << 32 + mapvaluetemp |= uint64(data[iNdEx-3]) << 40 + mapvaluetemp |= uint64(data[iNdEx-2]) << 48 + mapvaluetemp |= uint64(data[iNdEx-1]) << 56 + mapvalue := math.Float64frombits(mapvaluetemp) + if m.NestedMapField == nil { + m.NestedMapField = make(map[string]float64) + } + m.NestedMapField[mapkey] = mapvalue + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTheproto3Unsafe(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTheproto3Unsafe + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipTheproto3Unsafe(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, ErrIntOverflowTheproto3Unsafe + } + 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, ErrIntOverflowTheproto3Unsafe + } + 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, ErrIntOverflowTheproto3Unsafe + } + 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, ErrInvalidLengthTheproto3Unsafe + } + return iNdEx, nil + case 3: + for { + var innerWire uint64 + var start int = iNdEx + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowTheproto3Unsafe + } + 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 := skipTheproto3Unsafe(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 ( + ErrInvalidLengthTheproto3Unsafe = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowTheproto3Unsafe = fmt.Errorf("proto: integer overflow") +) + +var fileDescriptorTheproto3 = []byte{ + // 1591 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xec, 0x59, 0x4b, 0x6f, 0xdb, 0xc6, + 0x16, 0x36, 0x25, 0x59, 0x8f, 0xa3, 0x17, 0x3d, 0xc9, 0xbd, 0xd0, 0x35, 0x70, 0x6d, 0x47, 0x01, + 0x12, 0x27, 0xb8, 0x91, 0x73, 0x9d, 0xb4, 0x4d, 0xdd, 0xb4, 0xa9, 0xa5, 0x58, 0x88, 0x1b, 0x5b, + 0x71, 0x25, 0x3b, 0x6e, 0x11, 0xa0, 0x06, 0x65, 0x53, 0x12, 0x51, 0x89, 0x34, 0xf8, 0x08, 0xea, + 0x5d, 0x7e, 0x46, 0x77, 0x45, 0x77, 0x5d, 0x16, 0x59, 0x14, 0x5d, 0xb6, 0x3b, 0x2f, 0x0b, 0x74, + 0x53, 0x74, 0x11, 0x24, 0xe9, 0x26, 0xcb, 0x2c, 0xb3, 0xec, 0x3c, 0x48, 0x6a, 0x48, 0x0d, 0xc5, + 0xa6, 0x9b, 0x6e, 0xbc, 0x18, 0x88, 0x73, 0xf8, 0x7d,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05, 0xdc, 0x6c, 0x78, 0xdd, 0x03, 0xc5, 0x24, 0x6e, 0xa7, 0xe7, 0x22, 0x8e, 0x4b, + 0xa0, 0x84, 0xc4, 0x89, 0x14, 0x78, 0x91, 0x87, 0x70, 0x5e, 0x54, 0x32, 0x04, 0x1a, 0xcb, 0xbc, + 0x46, 0x89, 0x78, 0xc4, 0xb1, 0xd9, 0x23, 0xac, 0x80, 0x71, 0x9a, 0x7f, 0x04, 0xe7, 0x04, 0x85, + 0x43, 0x20, 0x5b, 0x0b, 0xba, 0xb1, 0x0a, 0x27, 0x4b, 0x8b, 0x00, 0x96, 0xd8, 0x31, 0xf0, 0xe6, + 0xe4, 0x5d, 0xd9, 0x0f, 0xe7, 0xa0, 0xe4, 0x96, 0xa7, 0x07, 0xe6, 0x91, 0x6a, 0x62, 0x77, 0xf5, + 0x45, 0xb4, 0x77, 0xba, 0x3e, 0x59, 0xd4, 0x5c, 0xd6, 0x5b, 0x58, 0xa8, 0x47, 0x91, 0x16, 0x6a, + 0x25, 0x5e, 0x3e, 0xce, 0x49, 0x35, 0x26, 0x9c, 0xd4, 0xe5, 0x68, 0xd1, 0x28, 0x43, 0xd5, 0x98, + 0x30, 0x54, 0xd3, 0x45, 0x84, 0xbe, 0xaa, 0x39, 0xe9, 0xab, 0x96, 0xa3, 0x55, 0xa2, 0xed, 0x55, + 0x73, 0xd2, 0x5e, 0xc5, 0xe8, 0x88, 0x5d, 0x56, 0x73, 0xd2, 0x65, 0x4d, 0xd1, 0x89, 0x36, 0x5b, + 0xcd, 0x49, 0xb3, 0x15, 0xa3, 0x23, 0xf6, 0x5c, 0x9b, 0x02, 0xcf, 0x75, 0x25, 0x5a, 0x68, 0x9a, + 0xf5, 0xda, 0x12, 0x59, 0xaf, 0xab, 0x53, 0x92, 0x9a, 0xea, 0xc0, 0x36, 0x05, 0x0e, 0x2c, 0x2e, + 0xb1, 0x08, 0x23, 0xb6, 0x25, 0x32, 0x62, 0xb1, 0x89, 0x45, 0xf9,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 0x7b, 0x8e, 0xaf, 0x5f, 0xe1, 0xdf, 0xd7, 0xf8, 0xf7, 0x0d, + 0xfe, 0x7d, 0xf2, 0xc7, 0x82, 0xd4, 0x4d, 0xb3, 0xb9, 0xff, 0x19, 0x00, 0x00, 0xff, 0xff, 0x21, + 0xd6, 0xef, 0xbc, 0x4a, 0x1a, 0x00, 0x00, +} diff --git a/vendor/github.com/gogo/protobuf/test/theproto3/combos/unsafeunmarshaler/theproto3.proto b/vendor/github.com/gogo/protobuf/test/theproto3/combos/unsafeunmarshaler/theproto3.proto new file mode 100644 index 000000000..07df87bac --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/theproto3/combos/unsafeunmarshaler/theproto3.proto @@ -0,0 +1,162 @@ +// Copyright (c) 2013, Vastech SA (PTY) LTD. All rights reserved. +// http://github.com/gogo/protobuf/gogoproto +// +// Go support for Protocol Buffers - Google's data interchange format +// +// Copyright 2014 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. + +syntax = "proto3"; + +package theproto3; + +import "github.com/gogo/protobuf/gogoproto/gogo.proto"; + +import "github.com/gogo/protobuf/test/combos/both/thetest.proto"; + +option (gogoproto.goproto_stringer_all) = false; +option (gogoproto.goproto_enum_prefix_all) = false; +option (gogoproto.goproto_getters_all) = false; + +option (gogoproto.equal_all) = true; +option (gogoproto.verbose_equal_all) = true; +option (gogoproto.stringer_all) = true; +option (gogoproto.gostring_all) = true; +option (gogoproto.face_all) = true; +option (gogoproto.description_all) = true; + +option (gogoproto.testgen_all) = true; +option (gogoproto.populate_all) = true; +option (gogoproto.benchgen_all) = true; +option (gogoproto.unmarshaler_all) = false; +option (gogoproto.marshaler_all) = false; +option (gogoproto.sizer_all) = true; + +option (gogoproto.goproto_enum_stringer_all) = false; +option (gogoproto.enum_stringer_all) = true; + +option (gogoproto.unsafe_marshaler_all) = false; +option (gogoproto.unsafe_unmarshaler_all) = true; + +message Message { + enum Humour { + UNKNOWN = 0; + PUNS = 1; + SLAPSTICK = 2; + BILL_BAILEY = 3; + } + + string name = 1; + Humour hilarity = 2; + uint32 height_in_cm = 3; + bytes data = 4; + int64 result_count = 7; + bool true_scotsman = 8; + float score = 9; + + repeated uint64 key = 5; + Nested nested = 6; + + map terrain = 10; + test.NinOptNative proto2_field = 11; + map proto2_value = 13; +} + +message Nested { + string bunny = 1; +} + +enum MapEnum { + MA = 0; + MB = 1; + MC = 2; +} + +message AllMaps { + map StringToDoubleMap = 1; + map StringToFloatMap = 2; + map Int32Map = 3; + map Int64Map = 4; + map Uint32Map = 5; + map Uint64Map = 6; + map Sint32Map = 7; + map Sint64Map = 8; + map Fixed32Map = 9; + map Sfixed32Map = 10; + map Fixed64Map = 11; + map Sfixed64Map = 12; + map BoolMap = 13; + map StringMap = 14; + map StringToBytesMap = 15; + map StringToEnumMap = 16; + map StringToMsgMap = 17; +} + +message AllMapsOrdered { + option (gogoproto.stable_marshaler) = true; + + map StringToDoubleMap = 1; + map StringToFloatMap = 2; + map Int32Map = 3; + map Int64Map = 4; + map Uint32Map = 5; + map Uint64Map = 6; + map Sint32Map = 7; + map Sint64Map = 8; + map Fixed32Map = 9; + map Sfixed32Map = 10; + map Fixed64Map = 11; + map Sfixed64Map = 12; + map BoolMap = 13; + map StringMap = 14; + map StringToBytesMap = 15; + map StringToEnumMap = 16; + map StringToMsgMap = 17; +} + +message MessageWithMap { + map name_mapping = 1; + map msg_mapping = 2; + map byte_mapping = 3; +} + +message FloatingPoint { + double f = 1; +} + +message Uint128Pair { + bytes left = 1 [(gogoproto.nullable) = false, (gogoproto.customtype) = "github.com/gogo/protobuf/test/custom.Uint128"]; + bytes right = 2 [(gogoproto.customtype) = "github.com/gogo/protobuf/test/custom.Uint128"]; +} + +message ContainsNestedMap { + message NestedMap { + map NestedMapField = 1; + } +} \ No newline at end of file diff --git a/vendor/github.com/gogo/protobuf/test/theproto3/combos/unsafeunmarshaler/theproto3pb_test.go b/vendor/github.com/gogo/protobuf/test/theproto3/combos/unsafeunmarshaler/theproto3pb_test.go new file mode 100644 index 000000000..c17ea8756 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/theproto3/combos/unsafeunmarshaler/theproto3pb_test.go @@ -0,0 +1,1934 @@ +// Code generated by protoc-gen-gogo. +// source: combos/unsafeunmarshaler/theproto3.proto +// DO NOT EDIT! + +/* +Package theproto3 is a generated protocol buffer package. + +It is generated from these files: + combos/unsafeunmarshaler/theproto3.proto + +It has these top-level messages: + Message + Nested + AllMaps + AllMapsOrdered + MessageWithMap + FloatingPoint + Uint128Pair + ContainsNestedMap +*/ +package theproto3 + +import testing "testing" +import math_rand "math/rand" +import time "time" +import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" +import github_com_gogo_protobuf_jsonpb "github.com/gogo/protobuf/jsonpb" +import fmt "fmt" +import go_parser "go/parser" +import proto "github.com/gogo/protobuf/proto" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" +import _ "github.com/gogo/protobuf/test/combos/both" + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +func TestMessageProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMessage(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Message{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkMessageProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Message, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedMessage(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkMessageProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedMessage(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &Message{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNestedProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNested(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Nested{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkNestedProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Nested, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNested(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNestedProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNested(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &Nested{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestAllMapsProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAllMaps(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &AllMaps{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkAllMapsProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*AllMaps, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedAllMaps(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkAllMapsProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedAllMaps(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &AllMaps{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestAllMapsOrderedProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAllMapsOrdered(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &AllMapsOrdered{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkAllMapsOrderedProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*AllMapsOrdered, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedAllMapsOrdered(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkAllMapsOrderedProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedAllMapsOrdered(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &AllMapsOrdered{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestMessageWithMapProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMessageWithMap(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &MessageWithMap{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkMessageWithMapProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*MessageWithMap, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedMessageWithMap(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkMessageWithMapProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedMessageWithMap(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &MessageWithMap{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestFloatingPointProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedFloatingPoint(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &FloatingPoint{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkFloatingPointProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*FloatingPoint, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedFloatingPoint(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkFloatingPointProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedFloatingPoint(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &FloatingPoint{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestUint128PairProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUint128Pair(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Uint128Pair{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkUint128PairProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Uint128Pair, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedUint128Pair(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkUint128PairProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedUint128Pair(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &Uint128Pair{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestContainsNestedMapProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedContainsNestedMap(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &ContainsNestedMap{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkContainsNestedMapProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*ContainsNestedMap, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedContainsNestedMap(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkContainsNestedMapProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedContainsNestedMap(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &ContainsNestedMap{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestContainsNestedMap_NestedMapProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedContainsNestedMap_NestedMap(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &ContainsNestedMap_NestedMap{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkContainsNestedMap_NestedMapProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*ContainsNestedMap_NestedMap, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedContainsNestedMap_NestedMap(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkContainsNestedMap_NestedMapProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedContainsNestedMap_NestedMap(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &ContainsNestedMap_NestedMap{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestMessageJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMessage(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Message{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNestedJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNested(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Nested{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestAllMapsJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAllMaps(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &AllMaps{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestAllMapsOrderedJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAllMapsOrdered(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &AllMapsOrdered{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestMessageWithMapJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMessageWithMap(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &MessageWithMap{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestFloatingPointJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedFloatingPoint(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &FloatingPoint{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestUint128PairJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUint128Pair(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Uint128Pair{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestContainsNestedMapJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedContainsNestedMap(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &ContainsNestedMap{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestContainsNestedMap_NestedMapJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedContainsNestedMap_NestedMap(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &ContainsNestedMap_NestedMap{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestMessageProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMessage(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &Message{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestMessageProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMessage(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &Message{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNestedProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNested(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &Nested{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNestedProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNested(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &Nested{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestAllMapsProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAllMaps(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &AllMaps{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestAllMapsProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAllMaps(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &AllMaps{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestAllMapsOrderedProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAllMapsOrdered(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &AllMapsOrdered{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestAllMapsOrderedProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAllMapsOrdered(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &AllMapsOrdered{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestMessageWithMapProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMessageWithMap(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &MessageWithMap{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestMessageWithMapProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMessageWithMap(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &MessageWithMap{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestFloatingPointProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedFloatingPoint(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &FloatingPoint{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestFloatingPointProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedFloatingPoint(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &FloatingPoint{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestUint128PairProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUint128Pair(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &Uint128Pair{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestUint128PairProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUint128Pair(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &Uint128Pair{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestContainsNestedMapProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedContainsNestedMap(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &ContainsNestedMap{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestContainsNestedMapProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedContainsNestedMap(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &ContainsNestedMap{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestContainsNestedMap_NestedMapProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedContainsNestedMap_NestedMap(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &ContainsNestedMap_NestedMap{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestContainsNestedMap_NestedMapProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedContainsNestedMap_NestedMap(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &ContainsNestedMap_NestedMap{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestTheproto3Description(t *testing.T) { + Theproto3Description() +} +func TestMessageVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedMessage(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &Message{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNestedVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNested(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &Nested{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestAllMapsVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAllMaps(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &AllMaps{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestAllMapsOrderedVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAllMapsOrdered(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &AllMapsOrdered{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestMessageWithMapVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedMessageWithMap(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &MessageWithMap{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestFloatingPointVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedFloatingPoint(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &FloatingPoint{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestUint128PairVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedUint128Pair(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &Uint128Pair{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestContainsNestedMapVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedContainsNestedMap(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &ContainsNestedMap{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestContainsNestedMap_NestedMapVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedContainsNestedMap_NestedMap(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &ContainsNestedMap_NestedMap{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestMessageFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedMessage(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNestedFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNested(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestAllMapsFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAllMaps(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestAllMapsOrderedFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAllMapsOrdered(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestMessageWithMapFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedMessageWithMap(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestFloatingPointFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedFloatingPoint(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestUint128PairFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedUint128Pair(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestContainsNestedMapFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedContainsNestedMap(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestContainsNestedMap_NestedMapFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedContainsNestedMap_NestedMap(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestMessageGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedMessage(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestNestedGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNested(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestAllMapsGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAllMaps(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestAllMapsOrderedGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAllMapsOrdered(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestMessageWithMapGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedMessageWithMap(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestFloatingPointGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedFloatingPoint(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestUint128PairGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedUint128Pair(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestContainsNestedMapGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedContainsNestedMap(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestContainsNestedMap_NestedMapGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedContainsNestedMap_NestedMap(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestMessageSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMessage(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkMessageSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Message, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedMessage(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNestedSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNested(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNestedSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Nested, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNested(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestAllMapsSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAllMaps(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkAllMapsSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*AllMaps, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedAllMaps(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestAllMapsOrderedSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAllMapsOrdered(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkAllMapsOrderedSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*AllMapsOrdered, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedAllMapsOrdered(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestMessageWithMapSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMessageWithMap(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkMessageWithMapSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*MessageWithMap, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedMessageWithMap(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestFloatingPointSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedFloatingPoint(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkFloatingPointSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*FloatingPoint, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedFloatingPoint(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestUint128PairSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUint128Pair(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkUint128PairSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Uint128Pair, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedUint128Pair(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestContainsNestedMapSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedContainsNestedMap(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkContainsNestedMapSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*ContainsNestedMap, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedContainsNestedMap(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestContainsNestedMap_NestedMapSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedContainsNestedMap_NestedMap(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkContainsNestedMap_NestedMapSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*ContainsNestedMap_NestedMap, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedContainsNestedMap_NestedMap(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestMessageStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedMessage(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNestedStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNested(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestAllMapsStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAllMaps(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestAllMapsOrderedStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAllMapsOrdered(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestMessageWithMapStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedMessageWithMap(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestFloatingPointStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedFloatingPoint(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestUint128PairStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedUint128Pair(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestContainsNestedMapStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedContainsNestedMap(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestContainsNestedMap_NestedMapStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedContainsNestedMap_NestedMap(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} + +//These tests are generated by github.com/gogo/protobuf/plugin/testgen diff --git a/vendor/github.com/gogo/protobuf/test/theproto3/doc.go b/vendor/github.com/gogo/protobuf/test/theproto3/doc.go new file mode 100644 index 000000000..e559a27ba --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/theproto3/doc.go @@ -0,0 +1 @@ +package theproto3 diff --git a/vendor/github.com/gogo/protobuf/test/theproto3/footer.proto b/vendor/github.com/gogo/protobuf/test/theproto3/footer.proto new file mode 100644 index 000000000..04ea4186b --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/theproto3/footer.proto @@ -0,0 +1,21 @@ + +message MessageWithMap { + map name_mapping = 1; + map msg_mapping = 2; + map byte_mapping = 3; +} + +message FloatingPoint { + double f = 1; +} + +message Uint128Pair { + bytes left = 1 [(gogoproto.nullable) = false, (gogoproto.customtype) = "github.com/gogo/protobuf/test/custom.Uint128"]; + bytes right = 2 [(gogoproto.customtype) = "github.com/gogo/protobuf/test/custom.Uint128"]; +} + +message ContainsNestedMap { + message NestedMap { + map NestedMapField = 1; + } +} \ No newline at end of file diff --git a/vendor/github.com/gogo/protobuf/test/theproto3/header.proto b/vendor/github.com/gogo/protobuf/test/theproto3/header.proto new file mode 100644 index 000000000..b5435da1b --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/theproto3/header.proto @@ -0,0 +1,93 @@ +// Copyright (c) 2013, Vastech SA (PTY) LTD. All rights reserved. +// http://github.com/gogo/protobuf/gogoproto +// +// Go support for Protocol Buffers - Google's data interchange format +// +// Copyright 2014 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. + +syntax = "proto3"; + +package theproto3; + +import "github.com/gogo/protobuf/gogoproto/gogo.proto"; + +import "github.com/gogo/protobuf/test/combos/both/thetest.proto"; + +option (gogoproto.goproto_stringer_all) = false; +option (gogoproto.goproto_enum_prefix_all) = false; +option (gogoproto.goproto_getters_all) = false; + +option (gogoproto.equal_all) = true; +option (gogoproto.verbose_equal_all) = true; +option (gogoproto.stringer_all) = true; +option (gogoproto.gostring_all) = true; +option (gogoproto.face_all) = true; +option (gogoproto.description_all) = true; + +option (gogoproto.testgen_all) = true; +option (gogoproto.populate_all) = true; +option (gogoproto.benchgen_all) = true; +option (gogoproto.unmarshaler_all) = false; +option (gogoproto.marshaler_all) = false; +option (gogoproto.sizer_all) = true; + +option (gogoproto.goproto_enum_stringer_all) = false; +option (gogoproto.enum_stringer_all) = true; + +option (gogoproto.unsafe_marshaler_all) = false; +option (gogoproto.unsafe_unmarshaler_all) = false; + +message Message { + enum Humour { + UNKNOWN = 0; + PUNS = 1; + SLAPSTICK = 2; + BILL_BAILEY = 3; + } + + string name = 1; + Humour hilarity = 2; + uint32 height_in_cm = 3; + bytes data = 4; + int64 result_count = 7; + bool true_scotsman = 8; + float score = 9; + + repeated uint64 key = 5; + Nested nested = 6; + + map terrain = 10; + test.NinOptNative proto2_field = 11; + map proto2_value = 13; +} + +message Nested { + string bunny = 1; +} diff --git a/vendor/github.com/gogo/protobuf/test/theproto3/maps.proto b/vendor/github.com/gogo/protobuf/test/theproto3/maps.proto new file mode 100644 index 000000000..18aff7ae7 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/theproto3/maps.proto @@ -0,0 +1,48 @@ + +enum MapEnum { + MA = 0; + MB = 1; + MC = 2; +} + +message AllMaps { + map StringToDoubleMap = 1; + map StringToFloatMap = 2; + map Int32Map = 3; + map Int64Map = 4; + map Uint32Map = 5; + map Uint64Map = 6; + map Sint32Map = 7; + map Sint64Map = 8; + map Fixed32Map = 9; + map Sfixed32Map = 10; + map Fixed64Map = 11; + map Sfixed64Map = 12; + map BoolMap = 13; + map StringMap = 14; + map StringToBytesMap = 15; + map StringToEnumMap = 16; + map StringToMsgMap = 17; +} + +message AllMapsOrdered { + option (gogoproto.stable_marshaler) = true; + + map StringToDoubleMap = 1; + map StringToFloatMap = 2; + map Int32Map = 3; + map Int64Map = 4; + map Uint32Map = 5; + map Uint64Map = 6; + map Sint32Map = 7; + map Sint64Map = 8; + map Fixed32Map = 9; + map Sfixed32Map = 10; + map Fixed64Map = 11; + map Sfixed64Map = 12; + map BoolMap = 13; + map StringMap = 14; + map StringToBytesMap = 15; + map StringToEnumMap = 16; + map StringToMsgMap = 17; +} diff --git a/vendor/github.com/gogo/protobuf/test/theproto3/proto3_test.go.in b/vendor/github.com/gogo/protobuf/test/theproto3/proto3_test.go.in new file mode 100644 index 000000000..b41f17859 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/theproto3/proto3_test.go.in @@ -0,0 +1,61 @@ +// Copyright (c) 2015, Vastech SA (PTY) LTD. All rights reserved. +// http://github.com/gogo/protobuf/gogoproto +// +// 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 theproto3 + +import ( + "reflect" + "testing" + + "github.com/gogo/protobuf/proto" +) + +func TestNilMaps(t *testing.T) { + m := &AllMaps{StringToMsgMap: map[string]*FloatingPoint{"a": nil}} + if _, err := proto.Marshal(m); err == nil { + t.Fatalf("expected error") + } +} + +func TestCustomTypeSize(t *testing.T) { + m := &Uint128Pair{} + m.Size() // Should not panic. +} + +func TestCustomTypeMarshalUnmarshal(t *testing.T) { + m1 := &Uint128Pair{} + if b, err := proto.Marshal(m1); err != nil { + t.Fatal(err) + } else { + m2 := &Uint128Pair{} + if err := proto.Unmarshal(b, m2); err != nil { + t.Fatal(err) + } + if !reflect.DeepEqual(m1, m2) { + t.Errorf("expected %+v, got %+v", m1, m2) + } + } +} diff --git a/vendor/github.com/gogo/protobuf/test/theproto3/theproto3.proto b/vendor/github.com/gogo/protobuf/test/theproto3/theproto3.proto new file mode 100644 index 000000000..a3b3b3873 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/theproto3/theproto3.proto @@ -0,0 +1,162 @@ +// Copyright (c) 2013, Vastech SA (PTY) LTD. All rights reserved. +// http://github.com/gogo/protobuf/gogoproto +// +// Go support for Protocol Buffers - Google's data interchange format +// +// Copyright 2014 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. + +syntax = "proto3"; + +package theproto3; + +import "github.com/gogo/protobuf/gogoproto/gogo.proto"; + +import "github.com/gogo/protobuf/test/combos/both/thetest.proto"; + +option (gogoproto.goproto_stringer_all) = false; +option (gogoproto.goproto_enum_prefix_all) = false; +option (gogoproto.goproto_getters_all) = false; + +option (gogoproto.equal_all) = true; +option (gogoproto.verbose_equal_all) = true; +option (gogoproto.stringer_all) = true; +option (gogoproto.gostring_all) = true; +option (gogoproto.face_all) = true; +option (gogoproto.description_all) = true; + +option (gogoproto.testgen_all) = true; +option (gogoproto.populate_all) = true; +option (gogoproto.benchgen_all) = true; +option (gogoproto.unmarshaler_all) = false; +option (gogoproto.marshaler_all) = false; +option (gogoproto.sizer_all) = true; + +option (gogoproto.goproto_enum_stringer_all) = false; +option (gogoproto.enum_stringer_all) = true; + +option (gogoproto.unsafe_marshaler_all) = false; +option (gogoproto.unsafe_unmarshaler_all) = false; + +message Message { + enum Humour { + UNKNOWN = 0; + PUNS = 1; + SLAPSTICK = 2; + BILL_BAILEY = 3; + } + + string name = 1; + Humour hilarity = 2; + uint32 height_in_cm = 3; + bytes data = 4; + int64 result_count = 7; + bool true_scotsman = 8; + float score = 9; + + repeated uint64 key = 5; + Nested nested = 6; + + map terrain = 10; + test.NinOptNative proto2_field = 11; + map proto2_value = 13; +} + +message Nested { + string bunny = 1; +} + +enum MapEnum { + MA = 0; + MB = 1; + MC = 2; +} + +message AllMaps { + map StringToDoubleMap = 1; + map StringToFloatMap = 2; + map Int32Map = 3; + map Int64Map = 4; + map Uint32Map = 5; + map Uint64Map = 6; + map Sint32Map = 7; + map Sint64Map = 8; + map Fixed32Map = 9; + map Sfixed32Map = 10; + map Fixed64Map = 11; + map Sfixed64Map = 12; + map BoolMap = 13; + map StringMap = 14; + map StringToBytesMap = 15; + map StringToEnumMap = 16; + map StringToMsgMap = 17; +} + +message AllMapsOrdered { + option (gogoproto.stable_marshaler) = true; + + map StringToDoubleMap = 1; + map StringToFloatMap = 2; + map Int32Map = 3; + map Int64Map = 4; + map Uint32Map = 5; + map Uint64Map = 6; + map Sint32Map = 7; + map Sint64Map = 8; + map Fixed32Map = 9; + map Sfixed32Map = 10; + map Fixed64Map = 11; + map Sfixed64Map = 12; + map BoolMap = 13; + map StringMap = 14; + map StringToBytesMap = 15; + map StringToEnumMap = 16; + map StringToMsgMap = 17; +} + +message MessageWithMap { + map name_mapping = 1; + map msg_mapping = 2; + map byte_mapping = 3; +} + +message FloatingPoint { + double f = 1; +} + +message Uint128Pair { + bytes left = 1 [(gogoproto.nullable) = false, (gogoproto.customtype) = "github.com/gogo/protobuf/test/custom.Uint128"]; + bytes right = 2 [(gogoproto.customtype) = "github.com/gogo/protobuf/test/custom.Uint128"]; +} + +message ContainsNestedMap { + message NestedMap { + map NestedMapField = 1; + } +} \ No newline at end of file diff --git a/vendor/github.com/gogo/protobuf/test/thetest.pb.go b/vendor/github.com/gogo/protobuf/test/thetest.pb.go new file mode 100644 index 000000000..e651cce3a --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/thetest.pb.go @@ -0,0 +1,24659 @@ +// Code generated by protoc-gen-gogo. +// source: thetest.proto +// DO NOT EDIT! + +/* + Package test is a generated protocol buffer package. + + It is generated from these files: + thetest.proto + + It has these top-level messages: + NidOptNative + NinOptNative + NidRepNative + NinRepNative + NidRepPackedNative + NinRepPackedNative + NidOptStruct + NinOptStruct + NidRepStruct + NinRepStruct + NidEmbeddedStruct + NinEmbeddedStruct + NidNestedStruct + NinNestedStruct + NidOptCustom + CustomDash + NinOptCustom + NidRepCustom + NinRepCustom + NinOptNativeUnion + NinOptStructUnion + NinEmbeddedStructUnion + NinNestedStructUnion + Tree + OrBranch + AndBranch + Leaf + DeepTree + ADeepBranch + AndDeepBranch + DeepLeaf + Nil + NidOptEnum + NinOptEnum + NidRepEnum + NinRepEnum + NinOptEnumDefault + AnotherNinOptEnum + AnotherNinOptEnumDefault + Timer + MyExtendable + OtherExtenable + NestedDefinition + NestedScope + NinOptNativeDefault + CustomContainer + CustomNameNidOptNative + CustomNameNinOptNative + CustomNameNinRepNative + CustomNameNinStruct + CustomNameCustomType + CustomNameNinEmbeddedStructUnion + CustomNameEnum + NoExtensionsMap + Unrecognized + UnrecognizedWithInner + UnrecognizedWithEmbed + Node +*/ +package test + +import proto "github.com/gogo/protobuf/proto" +import fmt "fmt" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" + +import github_com_gogo_protobuf_test_custom "github.com/gogo/protobuf/test/custom" +import github_com_gogo_protobuf_test_custom_dash_type "github.com/gogo/protobuf/test/custom-dash-type" + +import bytes "bytes" +import github_com_gogo_protobuf_sortkeys "github.com/gogo/protobuf/sortkeys" + +import github_com_gogo_protobuf_protoc_gen_gogo_descriptor "github.com/gogo/protobuf/protoc-gen-gogo/descriptor" +import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" +import compress_gzip "compress/gzip" +import io_ioutil "io/ioutil" + +import strconv "strconv" + +import strings "strings" +import sort "sort" +import reflect "reflect" + +// 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. +const _ = proto.GoGoProtoPackageIsVersion1 + +type TheTestEnum int32 + +const ( + A TheTestEnum = 0 + B TheTestEnum = 1 + C TheTestEnum = 2 +) + +var TheTestEnum_name = map[int32]string{ + 0: "A", + 1: "B", + 2: "C", +} +var TheTestEnum_value = map[string]int32{ + "A": 0, + "B": 1, + "C": 2, +} + +func (x TheTestEnum) Enum() *TheTestEnum { + p := new(TheTestEnum) + *p = x + return p +} +func (x TheTestEnum) MarshalJSON() ([]byte, error) { + return proto.MarshalJSONEnum(TheTestEnum_name, int32(x)) +} +func (x *TheTestEnum) UnmarshalJSON(data []byte) error { + value, err := proto.UnmarshalJSONEnum(TheTestEnum_value, data, "TheTestEnum") + if err != nil { + return err + } + *x = TheTestEnum(value) + return nil +} +func (TheTestEnum) EnumDescriptor() ([]byte, []int) { return fileDescriptorThetest, []int{0} } + +type AnotherTestEnum int32 + +const ( + D AnotherTestEnum = 10 + E AnotherTestEnum = 11 +) + +var AnotherTestEnum_name = map[int32]string{ + 10: "D", + 11: "E", +} +var AnotherTestEnum_value = map[string]int32{ + "D": 10, + "E": 11, +} + +func (x AnotherTestEnum) Enum() *AnotherTestEnum { + p := new(AnotherTestEnum) + *p = x + return p +} +func (x AnotherTestEnum) MarshalJSON() ([]byte, error) { + return proto.MarshalJSONEnum(AnotherTestEnum_name, int32(x)) +} +func (x *AnotherTestEnum) UnmarshalJSON(data []byte) error { + value, err := proto.UnmarshalJSONEnum(AnotherTestEnum_value, data, "AnotherTestEnum") + if err != nil { + return err + } + *x = AnotherTestEnum(value) + return nil +} +func (AnotherTestEnum) EnumDescriptor() ([]byte, []int) { return fileDescriptorThetest, []int{1} } + +// YetAnotherTestEnum is used to test cross-package import of custom name +// fields and default resolution. +type YetAnotherTestEnum int32 + +const ( + AA YetAnotherTestEnum = 0 + BetterYetBB YetAnotherTestEnum = 1 +) + +var YetAnotherTestEnum_name = map[int32]string{ + 0: "AA", + 1: "BB", +} +var YetAnotherTestEnum_value = map[string]int32{ + "AA": 0, + "BB": 1, +} + +func (x YetAnotherTestEnum) Enum() *YetAnotherTestEnum { + p := new(YetAnotherTestEnum) + *p = x + return p +} +func (x YetAnotherTestEnum) MarshalJSON() ([]byte, error) { + return proto.MarshalJSONEnum(YetAnotherTestEnum_name, int32(x)) +} +func (x *YetAnotherTestEnum) UnmarshalJSON(data []byte) error { + value, err := proto.UnmarshalJSONEnum(YetAnotherTestEnum_value, data, "YetAnotherTestEnum") + if err != nil { + return err + } + *x = YetAnotherTestEnum(value) + return nil +} +func (YetAnotherTestEnum) EnumDescriptor() ([]byte, []int) { return fileDescriptorThetest, []int{2} } + +// YetAnotherTestEnum is used to test cross-package import of custom name +// fields and default resolution. +type YetYetAnotherTestEnum int32 + +const ( + YetYetAnotherTestEnum_CC YetYetAnotherTestEnum = 0 + YetYetAnotherTestEnum_BetterYetDD YetYetAnotherTestEnum = 1 +) + +var YetYetAnotherTestEnum_name = map[int32]string{ + 0: "CC", + 1: "DD", +} +var YetYetAnotherTestEnum_value = map[string]int32{ + "CC": 0, + "DD": 1, +} + +func (x YetYetAnotherTestEnum) Enum() *YetYetAnotherTestEnum { + p := new(YetYetAnotherTestEnum) + *p = x + return p +} +func (x YetYetAnotherTestEnum) MarshalJSON() ([]byte, error) { + return proto.MarshalJSONEnum(YetYetAnotherTestEnum_name, int32(x)) +} +func (x *YetYetAnotherTestEnum) UnmarshalJSON(data []byte) error { + value, err := proto.UnmarshalJSONEnum(YetYetAnotherTestEnum_value, data, "YetYetAnotherTestEnum") + if err != nil { + return err + } + *x = YetYetAnotherTestEnum(value) + return nil +} +func (YetYetAnotherTestEnum) EnumDescriptor() ([]byte, []int) { return fileDescriptorThetest, []int{3} } + +type NestedDefinition_NestedEnum int32 + +const ( + TYPE_NESTED NestedDefinition_NestedEnum = 1 +) + +var NestedDefinition_NestedEnum_name = map[int32]string{ + 1: "TYPE_NESTED", +} +var NestedDefinition_NestedEnum_value = map[string]int32{ + "TYPE_NESTED": 1, +} + +func (x NestedDefinition_NestedEnum) Enum() *NestedDefinition_NestedEnum { + p := new(NestedDefinition_NestedEnum) + *p = x + return p +} +func (x NestedDefinition_NestedEnum) MarshalJSON() ([]byte, error) { + return proto.MarshalJSONEnum(NestedDefinition_NestedEnum_name, int32(x)) +} +func (x *NestedDefinition_NestedEnum) UnmarshalJSON(data []byte) error { + value, err := proto.UnmarshalJSONEnum(NestedDefinition_NestedEnum_value, data, "NestedDefinition_NestedEnum") + if err != nil { + return err + } + *x = NestedDefinition_NestedEnum(value) + return nil +} +func (NestedDefinition_NestedEnum) EnumDescriptor() ([]byte, []int) { + return fileDescriptorThetest, []int{42, 0} +} + +type NidOptNative struct { + Field1 float64 `protobuf:"fixed64,1,opt,name=Field1,json=field1" json:"Field1"` + Field2 float32 `protobuf:"fixed32,2,opt,name=Field2,json=field2" json:"Field2"` + Field3 int32 `protobuf:"varint,3,opt,name=Field3,json=field3" json:"Field3"` + Field4 int64 `protobuf:"varint,4,opt,name=Field4,json=field4" json:"Field4"` + Field5 uint32 `protobuf:"varint,5,opt,name=Field5,json=field5" json:"Field5"` + Field6 uint64 `protobuf:"varint,6,opt,name=Field6,json=field6" json:"Field6"` + Field7 int32 `protobuf:"zigzag32,7,opt,name=Field7,json=field7" json:"Field7"` + Field8 int64 `protobuf:"zigzag64,8,opt,name=Field8,json=field8" json:"Field8"` + Field9 uint32 `protobuf:"fixed32,9,opt,name=Field9,json=field9" json:"Field9"` + Field10 int32 `protobuf:"fixed32,10,opt,name=Field10,json=field10" json:"Field10"` + Field11 uint64 `protobuf:"fixed64,11,opt,name=Field11,json=field11" json:"Field11"` + Field12 int64 `protobuf:"fixed64,12,opt,name=Field12,json=field12" json:"Field12"` + Field13 bool `protobuf:"varint,13,opt,name=Field13,json=field13" json:"Field13"` + Field14 string `protobuf:"bytes,14,opt,name=Field14,json=field14" json:"Field14"` + Field15 []byte `protobuf:"bytes,15,opt,name=Field15,json=field15" json:"Field15"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *NidOptNative) Reset() { *m = NidOptNative{} } +func (*NidOptNative) ProtoMessage() {} +func (*NidOptNative) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{0} } + +type NinOptNative struct { + Field1 *float64 `protobuf:"fixed64,1,opt,name=Field1,json=field1" json:"Field1,omitempty"` + Field2 *float32 `protobuf:"fixed32,2,opt,name=Field2,json=field2" json:"Field2,omitempty"` + Field3 *int32 `protobuf:"varint,3,opt,name=Field3,json=field3" json:"Field3,omitempty"` + Field4 *int64 `protobuf:"varint,4,opt,name=Field4,json=field4" json:"Field4,omitempty"` + Field5 *uint32 `protobuf:"varint,5,opt,name=Field5,json=field5" json:"Field5,omitempty"` + Field6 *uint64 `protobuf:"varint,6,opt,name=Field6,json=field6" json:"Field6,omitempty"` + Field7 *int32 `protobuf:"zigzag32,7,opt,name=Field7,json=field7" json:"Field7,omitempty"` + Field8 *int64 `protobuf:"zigzag64,8,opt,name=Field8,json=field8" json:"Field8,omitempty"` + Field9 *uint32 `protobuf:"fixed32,9,opt,name=Field9,json=field9" json:"Field9,omitempty"` + Field10 *int32 `protobuf:"fixed32,10,opt,name=Field10,json=field10" json:"Field10,omitempty"` + Field11 *uint64 `protobuf:"fixed64,11,opt,name=Field11,json=field11" json:"Field11,omitempty"` + Field12 *int64 `protobuf:"fixed64,12,opt,name=Field12,json=field12" json:"Field12,omitempty"` + Field13 *bool `protobuf:"varint,13,opt,name=Field13,json=field13" json:"Field13,omitempty"` + Field14 *string `protobuf:"bytes,14,opt,name=Field14,json=field14" json:"Field14,omitempty"` + Field15 []byte `protobuf:"bytes,15,opt,name=Field15,json=field15" json:"Field15,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *NinOptNative) Reset() { *m = NinOptNative{} } +func (*NinOptNative) ProtoMessage() {} +func (*NinOptNative) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{1} } + +type NidRepNative struct { + Field1 []float64 `protobuf:"fixed64,1,rep,name=Field1,json=field1" json:"Field1,omitempty"` + Field2 []float32 `protobuf:"fixed32,2,rep,name=Field2,json=field2" json:"Field2,omitempty"` + Field3 []int32 `protobuf:"varint,3,rep,name=Field3,json=field3" json:"Field3,omitempty"` + Field4 []int64 `protobuf:"varint,4,rep,name=Field4,json=field4" json:"Field4,omitempty"` + Field5 []uint32 `protobuf:"varint,5,rep,name=Field5,json=field5" json:"Field5,omitempty"` + Field6 []uint64 `protobuf:"varint,6,rep,name=Field6,json=field6" json:"Field6,omitempty"` + Field7 []int32 `protobuf:"zigzag32,7,rep,name=Field7,json=field7" json:"Field7,omitempty"` + Field8 []int64 `protobuf:"zigzag64,8,rep,name=Field8,json=field8" json:"Field8,omitempty"` + Field9 []uint32 `protobuf:"fixed32,9,rep,name=Field9,json=field9" json:"Field9,omitempty"` + Field10 []int32 `protobuf:"fixed32,10,rep,name=Field10,json=field10" json:"Field10,omitempty"` + Field11 []uint64 `protobuf:"fixed64,11,rep,name=Field11,json=field11" json:"Field11,omitempty"` + Field12 []int64 `protobuf:"fixed64,12,rep,name=Field12,json=field12" json:"Field12,omitempty"` + Field13 []bool `protobuf:"varint,13,rep,name=Field13,json=field13" json:"Field13,omitempty"` + Field14 []string `protobuf:"bytes,14,rep,name=Field14,json=field14" json:"Field14,omitempty"` + Field15 [][]byte `protobuf:"bytes,15,rep,name=Field15,json=field15" json:"Field15,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *NidRepNative) Reset() { *m = NidRepNative{} } +func (*NidRepNative) ProtoMessage() {} +func (*NidRepNative) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{2} } + +type NinRepNative struct { + Field1 []float64 `protobuf:"fixed64,1,rep,name=Field1,json=field1" json:"Field1,omitempty"` + Field2 []float32 `protobuf:"fixed32,2,rep,name=Field2,json=field2" json:"Field2,omitempty"` + Field3 []int32 `protobuf:"varint,3,rep,name=Field3,json=field3" json:"Field3,omitempty"` + Field4 []int64 `protobuf:"varint,4,rep,name=Field4,json=field4" json:"Field4,omitempty"` + Field5 []uint32 `protobuf:"varint,5,rep,name=Field5,json=field5" json:"Field5,omitempty"` + Field6 []uint64 `protobuf:"varint,6,rep,name=Field6,json=field6" json:"Field6,omitempty"` + Field7 []int32 `protobuf:"zigzag32,7,rep,name=Field7,json=field7" json:"Field7,omitempty"` + Field8 []int64 `protobuf:"zigzag64,8,rep,name=Field8,json=field8" json:"Field8,omitempty"` + Field9 []uint32 `protobuf:"fixed32,9,rep,name=Field9,json=field9" json:"Field9,omitempty"` + Field10 []int32 `protobuf:"fixed32,10,rep,name=Field10,json=field10" json:"Field10,omitempty"` + Field11 []uint64 `protobuf:"fixed64,11,rep,name=Field11,json=field11" json:"Field11,omitempty"` + Field12 []int64 `protobuf:"fixed64,12,rep,name=Field12,json=field12" json:"Field12,omitempty"` + Field13 []bool `protobuf:"varint,13,rep,name=Field13,json=field13" json:"Field13,omitempty"` + Field14 []string `protobuf:"bytes,14,rep,name=Field14,json=field14" json:"Field14,omitempty"` + Field15 [][]byte `protobuf:"bytes,15,rep,name=Field15,json=field15" json:"Field15,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *NinRepNative) Reset() { *m = NinRepNative{} } +func (*NinRepNative) ProtoMessage() {} +func (*NinRepNative) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{3} } + +type NidRepPackedNative struct { + Field1 []float64 `protobuf:"fixed64,1,rep,packed,name=Field1,json=field1" json:"Field1,omitempty"` + Field2 []float32 `protobuf:"fixed32,2,rep,packed,name=Field2,json=field2" json:"Field2,omitempty"` + Field3 []int32 `protobuf:"varint,3,rep,packed,name=Field3,json=field3" json:"Field3,omitempty"` + Field4 []int64 `protobuf:"varint,4,rep,packed,name=Field4,json=field4" json:"Field4,omitempty"` + Field5 []uint32 `protobuf:"varint,5,rep,packed,name=Field5,json=field5" json:"Field5,omitempty"` + Field6 []uint64 `protobuf:"varint,6,rep,packed,name=Field6,json=field6" json:"Field6,omitempty"` + Field7 []int32 `protobuf:"zigzag32,7,rep,packed,name=Field7,json=field7" json:"Field7,omitempty"` + Field8 []int64 `protobuf:"zigzag64,8,rep,packed,name=Field8,json=field8" json:"Field8,omitempty"` + Field9 []uint32 `protobuf:"fixed32,9,rep,packed,name=Field9,json=field9" json:"Field9,omitempty"` + Field10 []int32 `protobuf:"fixed32,10,rep,packed,name=Field10,json=field10" json:"Field10,omitempty"` + Field11 []uint64 `protobuf:"fixed64,11,rep,packed,name=Field11,json=field11" json:"Field11,omitempty"` + Field12 []int64 `protobuf:"fixed64,12,rep,packed,name=Field12,json=field12" json:"Field12,omitempty"` + Field13 []bool `protobuf:"varint,13,rep,packed,name=Field13,json=field13" json:"Field13,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *NidRepPackedNative) Reset() { *m = NidRepPackedNative{} } +func (*NidRepPackedNative) ProtoMessage() {} +func (*NidRepPackedNative) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{4} } + +type NinRepPackedNative struct { + Field1 []float64 `protobuf:"fixed64,1,rep,packed,name=Field1,json=field1" json:"Field1,omitempty"` + Field2 []float32 `protobuf:"fixed32,2,rep,packed,name=Field2,json=field2" json:"Field2,omitempty"` + Field3 []int32 `protobuf:"varint,3,rep,packed,name=Field3,json=field3" json:"Field3,omitempty"` + Field4 []int64 `protobuf:"varint,4,rep,packed,name=Field4,json=field4" json:"Field4,omitempty"` + Field5 []uint32 `protobuf:"varint,5,rep,packed,name=Field5,json=field5" json:"Field5,omitempty"` + Field6 []uint64 `protobuf:"varint,6,rep,packed,name=Field6,json=field6" json:"Field6,omitempty"` + Field7 []int32 `protobuf:"zigzag32,7,rep,packed,name=Field7,json=field7" json:"Field7,omitempty"` + Field8 []int64 `protobuf:"zigzag64,8,rep,packed,name=Field8,json=field8" json:"Field8,omitempty"` + Field9 []uint32 `protobuf:"fixed32,9,rep,packed,name=Field9,json=field9" json:"Field9,omitempty"` + Field10 []int32 `protobuf:"fixed32,10,rep,packed,name=Field10,json=field10" json:"Field10,omitempty"` + Field11 []uint64 `protobuf:"fixed64,11,rep,packed,name=Field11,json=field11" json:"Field11,omitempty"` + Field12 []int64 `protobuf:"fixed64,12,rep,packed,name=Field12,json=field12" json:"Field12,omitempty"` + Field13 []bool `protobuf:"varint,13,rep,packed,name=Field13,json=field13" json:"Field13,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *NinRepPackedNative) Reset() { *m = NinRepPackedNative{} } +func (*NinRepPackedNative) ProtoMessage() {} +func (*NinRepPackedNative) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{5} } + +type NidOptStruct struct { + Field1 float64 `protobuf:"fixed64,1,opt,name=Field1,json=field1" json:"Field1"` + Field2 float32 `protobuf:"fixed32,2,opt,name=Field2,json=field2" json:"Field2"` + Field3 NidOptNative `protobuf:"bytes,3,opt,name=Field3,json=field3" json:"Field3"` + Field4 NinOptNative `protobuf:"bytes,4,opt,name=Field4,json=field4" json:"Field4"` + Field6 uint64 `protobuf:"varint,6,opt,name=Field6,json=field6" json:"Field6"` + Field7 int32 `protobuf:"zigzag32,7,opt,name=Field7,json=field7" json:"Field7"` + Field8 NidOptNative `protobuf:"bytes,8,opt,name=Field8,json=field8" json:"Field8"` + Field13 bool `protobuf:"varint,13,opt,name=Field13,json=field13" json:"Field13"` + Field14 string `protobuf:"bytes,14,opt,name=Field14,json=field14" json:"Field14"` + Field15 []byte `protobuf:"bytes,15,opt,name=Field15,json=field15" json:"Field15"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *NidOptStruct) Reset() { *m = NidOptStruct{} } +func (*NidOptStruct) ProtoMessage() {} +func (*NidOptStruct) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{6} } + +type NinOptStruct struct { + Field1 *float64 `protobuf:"fixed64,1,opt,name=Field1,json=field1" json:"Field1,omitempty"` + Field2 *float32 `protobuf:"fixed32,2,opt,name=Field2,json=field2" json:"Field2,omitempty"` + Field3 *NidOptNative `protobuf:"bytes,3,opt,name=Field3,json=field3" json:"Field3,omitempty"` + Field4 *NinOptNative `protobuf:"bytes,4,opt,name=Field4,json=field4" json:"Field4,omitempty"` + Field6 *uint64 `protobuf:"varint,6,opt,name=Field6,json=field6" json:"Field6,omitempty"` + Field7 *int32 `protobuf:"zigzag32,7,opt,name=Field7,json=field7" json:"Field7,omitempty"` + Field8 *NidOptNative `protobuf:"bytes,8,opt,name=Field8,json=field8" json:"Field8,omitempty"` + Field13 *bool `protobuf:"varint,13,opt,name=Field13,json=field13" json:"Field13,omitempty"` + Field14 *string `protobuf:"bytes,14,opt,name=Field14,json=field14" json:"Field14,omitempty"` + Field15 []byte `protobuf:"bytes,15,opt,name=Field15,json=field15" json:"Field15,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *NinOptStruct) Reset() { *m = NinOptStruct{} } +func (*NinOptStruct) ProtoMessage() {} +func (*NinOptStruct) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{7} } + +type NidRepStruct struct { + Field1 []float64 `protobuf:"fixed64,1,rep,name=Field1,json=field1" json:"Field1,omitempty"` + Field2 []float32 `protobuf:"fixed32,2,rep,name=Field2,json=field2" json:"Field2,omitempty"` + Field3 []NidOptNative `protobuf:"bytes,3,rep,name=Field3,json=field3" json:"Field3"` + Field4 []NinOptNative `protobuf:"bytes,4,rep,name=Field4,json=field4" json:"Field4"` + Field6 []uint64 `protobuf:"varint,6,rep,name=Field6,json=field6" json:"Field6,omitempty"` + Field7 []int32 `protobuf:"zigzag32,7,rep,name=Field7,json=field7" json:"Field7,omitempty"` + Field8 []NidOptNative `protobuf:"bytes,8,rep,name=Field8,json=field8" json:"Field8"` + Field13 []bool `protobuf:"varint,13,rep,name=Field13,json=field13" json:"Field13,omitempty"` + Field14 []string `protobuf:"bytes,14,rep,name=Field14,json=field14" json:"Field14,omitempty"` + Field15 [][]byte `protobuf:"bytes,15,rep,name=Field15,json=field15" json:"Field15,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *NidRepStruct) Reset() { *m = NidRepStruct{} } +func (*NidRepStruct) ProtoMessage() {} +func (*NidRepStruct) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{8} } + +type NinRepStruct struct { + Field1 []float64 `protobuf:"fixed64,1,rep,name=Field1,json=field1" json:"Field1,omitempty"` + Field2 []float32 `protobuf:"fixed32,2,rep,name=Field2,json=field2" json:"Field2,omitempty"` + Field3 []*NidOptNative `protobuf:"bytes,3,rep,name=Field3,json=field3" json:"Field3,omitempty"` + Field4 []*NinOptNative `protobuf:"bytes,4,rep,name=Field4,json=field4" json:"Field4,omitempty"` + Field6 []uint64 `protobuf:"varint,6,rep,name=Field6,json=field6" json:"Field6,omitempty"` + Field7 []int32 `protobuf:"zigzag32,7,rep,name=Field7,json=field7" json:"Field7,omitempty"` + Field8 []*NidOptNative `protobuf:"bytes,8,rep,name=Field8,json=field8" json:"Field8,omitempty"` + Field13 []bool `protobuf:"varint,13,rep,name=Field13,json=field13" json:"Field13,omitempty"` + Field14 []string `protobuf:"bytes,14,rep,name=Field14,json=field14" json:"Field14,omitempty"` + Field15 [][]byte `protobuf:"bytes,15,rep,name=Field15,json=field15" json:"Field15,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *NinRepStruct) Reset() { *m = NinRepStruct{} } +func (*NinRepStruct) ProtoMessage() {} +func (*NinRepStruct) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{9} } + +type NidEmbeddedStruct struct { + *NidOptNative `protobuf:"bytes,1,opt,name=Field1,json=field1,embedded=Field1" json:"Field1,omitempty"` + Field200 NidOptNative `protobuf:"bytes,200,opt,name=Field200,json=field200" json:"Field200"` + Field210 bool `protobuf:"varint,210,opt,name=Field210,json=field210" json:"Field210"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *NidEmbeddedStruct) Reset() { *m = NidEmbeddedStruct{} } +func (*NidEmbeddedStruct) ProtoMessage() {} +func (*NidEmbeddedStruct) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{10} } + +type NinEmbeddedStruct struct { + *NidOptNative `protobuf:"bytes,1,opt,name=Field1,json=field1,embedded=Field1" json:"Field1,omitempty"` + Field200 *NidOptNative `protobuf:"bytes,200,opt,name=Field200,json=field200" json:"Field200,omitempty"` + Field210 *bool `protobuf:"varint,210,opt,name=Field210,json=field210" json:"Field210,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *NinEmbeddedStruct) Reset() { *m = NinEmbeddedStruct{} } +func (*NinEmbeddedStruct) ProtoMessage() {} +func (*NinEmbeddedStruct) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{11} } + +type NidNestedStruct struct { + Field1 NidOptStruct `protobuf:"bytes,1,opt,name=Field1,json=field1" json:"Field1"` + Field2 []NidRepStruct `protobuf:"bytes,2,rep,name=Field2,json=field2" json:"Field2"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *NidNestedStruct) Reset() { *m = NidNestedStruct{} } +func (*NidNestedStruct) ProtoMessage() {} +func (*NidNestedStruct) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{12} } + +type NinNestedStruct struct { + Field1 *NinOptStruct `protobuf:"bytes,1,opt,name=Field1,json=field1" json:"Field1,omitempty"` + Field2 []*NinRepStruct `protobuf:"bytes,2,rep,name=Field2,json=field2" json:"Field2,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *NinNestedStruct) Reset() { *m = NinNestedStruct{} } +func (*NinNestedStruct) ProtoMessage() {} +func (*NinNestedStruct) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{13} } + +type NidOptCustom struct { + Id Uuid `protobuf:"bytes,1,opt,name=Id,json=id,customtype=Uuid" json:"Id"` + Value github_com_gogo_protobuf_test_custom.Uint128 `protobuf:"bytes,2,opt,name=Value,json=value,customtype=github.com/gogo/protobuf/test/custom.Uint128" json:"Value"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *NidOptCustom) Reset() { *m = NidOptCustom{} } +func (*NidOptCustom) ProtoMessage() {} +func (*NidOptCustom) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{14} } + +type CustomDash struct { + Value *github_com_gogo_protobuf_test_custom_dash_type.Bytes `protobuf:"bytes,1,opt,name=Value,json=value,customtype=github.com/gogo/protobuf/test/custom-dash-type.Bytes" json:"Value,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *CustomDash) Reset() { *m = CustomDash{} } +func (*CustomDash) ProtoMessage() {} +func (*CustomDash) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{15} } + +type NinOptCustom struct { + Id *Uuid `protobuf:"bytes,1,opt,name=Id,json=id,customtype=Uuid" json:"Id,omitempty"` + Value *github_com_gogo_protobuf_test_custom.Uint128 `protobuf:"bytes,2,opt,name=Value,json=value,customtype=github.com/gogo/protobuf/test/custom.Uint128" json:"Value,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *NinOptCustom) Reset() { *m = NinOptCustom{} } +func (*NinOptCustom) ProtoMessage() {} +func (*NinOptCustom) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{16} } + +type NidRepCustom struct { + Id []Uuid `protobuf:"bytes,1,rep,name=Id,json=id,customtype=Uuid" json:"Id"` + Value []github_com_gogo_protobuf_test_custom.Uint128 `protobuf:"bytes,2,rep,name=Value,json=value,customtype=github.com/gogo/protobuf/test/custom.Uint128" json:"Value"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *NidRepCustom) Reset() { *m = NidRepCustom{} } +func (*NidRepCustom) ProtoMessage() {} +func (*NidRepCustom) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{17} } + +type NinRepCustom struct { + Id []Uuid `protobuf:"bytes,1,rep,name=Id,json=id,customtype=Uuid" json:"Id,omitempty"` + Value []github_com_gogo_protobuf_test_custom.Uint128 `protobuf:"bytes,2,rep,name=Value,json=value,customtype=github.com/gogo/protobuf/test/custom.Uint128" json:"Value,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *NinRepCustom) Reset() { *m = NinRepCustom{} } +func (*NinRepCustom) ProtoMessage() {} +func (*NinRepCustom) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{18} } + +type NinOptNativeUnion struct { + Field1 *float64 `protobuf:"fixed64,1,opt,name=Field1,json=field1" json:"Field1,omitempty"` + Field2 *float32 `protobuf:"fixed32,2,opt,name=Field2,json=field2" json:"Field2,omitempty"` + Field3 *int32 `protobuf:"varint,3,opt,name=Field3,json=field3" json:"Field3,omitempty"` + Field4 *int64 `protobuf:"varint,4,opt,name=Field4,json=field4" json:"Field4,omitempty"` + Field5 *uint32 `protobuf:"varint,5,opt,name=Field5,json=field5" json:"Field5,omitempty"` + Field6 *uint64 `protobuf:"varint,6,opt,name=Field6,json=field6" json:"Field6,omitempty"` + Field13 *bool `protobuf:"varint,13,opt,name=Field13,json=field13" json:"Field13,omitempty"` + Field14 *string `protobuf:"bytes,14,opt,name=Field14,json=field14" json:"Field14,omitempty"` + Field15 []byte `protobuf:"bytes,15,opt,name=Field15,json=field15" json:"Field15,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *NinOptNativeUnion) Reset() { *m = NinOptNativeUnion{} } +func (*NinOptNativeUnion) ProtoMessage() {} +func (*NinOptNativeUnion) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{19} } + +type NinOptStructUnion struct { + Field1 *float64 `protobuf:"fixed64,1,opt,name=Field1,json=field1" json:"Field1,omitempty"` + Field2 *float32 `protobuf:"fixed32,2,opt,name=Field2,json=field2" json:"Field2,omitempty"` + Field3 *NidOptNative `protobuf:"bytes,3,opt,name=Field3,json=field3" json:"Field3,omitempty"` + Field4 *NinOptNative `protobuf:"bytes,4,opt,name=Field4,json=field4" json:"Field4,omitempty"` + Field6 *uint64 `protobuf:"varint,6,opt,name=Field6,json=field6" json:"Field6,omitempty"` + Field7 *int32 `protobuf:"zigzag32,7,opt,name=Field7,json=field7" json:"Field7,omitempty"` + Field13 *bool `protobuf:"varint,13,opt,name=Field13,json=field13" json:"Field13,omitempty"` + Field14 *string `protobuf:"bytes,14,opt,name=Field14,json=field14" json:"Field14,omitempty"` + Field15 []byte `protobuf:"bytes,15,opt,name=Field15,json=field15" json:"Field15,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *NinOptStructUnion) Reset() { *m = NinOptStructUnion{} } +func (*NinOptStructUnion) ProtoMessage() {} +func (*NinOptStructUnion) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{20} } + +type NinEmbeddedStructUnion struct { + *NidOptNative `protobuf:"bytes,1,opt,name=Field1,json=field1,embedded=Field1" json:"Field1,omitempty"` + Field200 *NinOptNative `protobuf:"bytes,200,opt,name=Field200,json=field200" json:"Field200,omitempty"` + Field210 *bool `protobuf:"varint,210,opt,name=Field210,json=field210" json:"Field210,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *NinEmbeddedStructUnion) Reset() { *m = NinEmbeddedStructUnion{} } +func (*NinEmbeddedStructUnion) ProtoMessage() {} +func (*NinEmbeddedStructUnion) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{21} } + +type NinNestedStructUnion struct { + Field1 *NinOptNativeUnion `protobuf:"bytes,1,opt,name=Field1,json=field1" json:"Field1,omitempty"` + Field2 *NinOptStructUnion `protobuf:"bytes,2,opt,name=Field2,json=field2" json:"Field2,omitempty"` + Field3 *NinEmbeddedStructUnion `protobuf:"bytes,3,opt,name=Field3,json=field3" json:"Field3,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *NinNestedStructUnion) Reset() { *m = NinNestedStructUnion{} } +func (*NinNestedStructUnion) ProtoMessage() {} +func (*NinNestedStructUnion) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{22} } + +type Tree struct { + Or *OrBranch `protobuf:"bytes,1,opt,name=Or,json=or" json:"Or,omitempty"` + And *AndBranch `protobuf:"bytes,2,opt,name=And,json=and" json:"And,omitempty"` + Leaf *Leaf `protobuf:"bytes,3,opt,name=Leaf,json=leaf" json:"Leaf,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *Tree) Reset() { *m = Tree{} } +func (*Tree) ProtoMessage() {} +func (*Tree) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{23} } + +type OrBranch struct { + Left Tree `protobuf:"bytes,1,opt,name=Left,json=left" json:"Left"` + Right Tree `protobuf:"bytes,2,opt,name=Right,json=right" json:"Right"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *OrBranch) Reset() { *m = OrBranch{} } +func (*OrBranch) ProtoMessage() {} +func (*OrBranch) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{24} } + +type AndBranch struct { + Left Tree `protobuf:"bytes,1,opt,name=Left,json=left" json:"Left"` + Right Tree `protobuf:"bytes,2,opt,name=Right,json=right" json:"Right"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *AndBranch) Reset() { *m = AndBranch{} } +func (*AndBranch) ProtoMessage() {} +func (*AndBranch) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{25} } + +type Leaf struct { + Value int64 `protobuf:"varint,1,opt,name=Value,json=value" json:"Value"` + StrValue string `protobuf:"bytes,2,opt,name=StrValue,json=strValue" json:"StrValue"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *Leaf) Reset() { *m = Leaf{} } +func (*Leaf) ProtoMessage() {} +func (*Leaf) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{26} } + +type DeepTree struct { + Down *ADeepBranch `protobuf:"bytes,1,opt,name=Down,json=down" json:"Down,omitempty"` + And *AndDeepBranch `protobuf:"bytes,2,opt,name=And,json=and" json:"And,omitempty"` + Leaf *DeepLeaf `protobuf:"bytes,3,opt,name=Leaf,json=leaf" json:"Leaf,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *DeepTree) Reset() { *m = DeepTree{} } +func (*DeepTree) ProtoMessage() {} +func (*DeepTree) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{27} } + +type ADeepBranch struct { + Down DeepTree `protobuf:"bytes,2,opt,name=Down,json=down" json:"Down"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *ADeepBranch) Reset() { *m = ADeepBranch{} } +func (*ADeepBranch) ProtoMessage() {} +func (*ADeepBranch) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{28} } + +type AndDeepBranch struct { + Left DeepTree `protobuf:"bytes,1,opt,name=Left,json=left" json:"Left"` + Right DeepTree `protobuf:"bytes,2,opt,name=Right,json=right" json:"Right"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *AndDeepBranch) Reset() { *m = AndDeepBranch{} } +func (*AndDeepBranch) ProtoMessage() {} +func (*AndDeepBranch) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{29} } + +type DeepLeaf struct { + Tree Tree `protobuf:"bytes,1,opt,name=Tree,json=tree" json:"Tree"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *DeepLeaf) Reset() { *m = DeepLeaf{} } +func (*DeepLeaf) ProtoMessage() {} +func (*DeepLeaf) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{30} } + +type Nil struct { + XXX_unrecognized []byte `json:"-"` +} + +func (m *Nil) Reset() { *m = Nil{} } +func (*Nil) ProtoMessage() {} +func (*Nil) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{31} } + +type NidOptEnum struct { + Field1 TheTestEnum `protobuf:"varint,1,opt,name=Field1,json=field1,enum=test.TheTestEnum" json:"Field1"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *NidOptEnum) Reset() { *m = NidOptEnum{} } +func (*NidOptEnum) ProtoMessage() {} +func (*NidOptEnum) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{32} } + +type NinOptEnum struct { + Field1 *TheTestEnum `protobuf:"varint,1,opt,name=Field1,json=field1,enum=test.TheTestEnum" json:"Field1,omitempty"` + Field2 *YetAnotherTestEnum `protobuf:"varint,2,opt,name=Field2,json=field2,enum=test.YetAnotherTestEnum" json:"Field2,omitempty"` + Field3 *YetYetAnotherTestEnum `protobuf:"varint,3,opt,name=Field3,json=field3,enum=test.YetYetAnotherTestEnum" json:"Field3,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *NinOptEnum) Reset() { *m = NinOptEnum{} } +func (*NinOptEnum) ProtoMessage() {} +func (*NinOptEnum) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{33} } + +type NidRepEnum struct { + Field1 []TheTestEnum `protobuf:"varint,1,rep,name=Field1,json=field1,enum=test.TheTestEnum" json:"Field1,omitempty"` + Field2 []YetAnotherTestEnum `protobuf:"varint,2,rep,name=Field2,json=field2,enum=test.YetAnotherTestEnum" json:"Field2,omitempty"` + Field3 []YetYetAnotherTestEnum `protobuf:"varint,3,rep,name=Field3,json=field3,enum=test.YetYetAnotherTestEnum" json:"Field3,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *NidRepEnum) Reset() { *m = NidRepEnum{} } +func (*NidRepEnum) ProtoMessage() {} +func (*NidRepEnum) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{34} } + +type NinRepEnum struct { + Field1 []TheTestEnum `protobuf:"varint,1,rep,name=Field1,json=field1,enum=test.TheTestEnum" json:"Field1,omitempty"` + Field2 []YetAnotherTestEnum `protobuf:"varint,2,rep,name=Field2,json=field2,enum=test.YetAnotherTestEnum" json:"Field2,omitempty"` + Field3 []YetYetAnotherTestEnum `protobuf:"varint,3,rep,name=Field3,json=field3,enum=test.YetYetAnotherTestEnum" json:"Field3,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *NinRepEnum) Reset() { *m = NinRepEnum{} } +func (*NinRepEnum) ProtoMessage() {} +func (*NinRepEnum) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{35} } + +type NinOptEnumDefault struct { + Field1 *TheTestEnum `protobuf:"varint,1,opt,name=Field1,json=field1,enum=test.TheTestEnum,def=2" json:"Field1,omitempty"` + Field2 *YetAnotherTestEnum `protobuf:"varint,2,opt,name=Field2,json=field2,enum=test.YetAnotherTestEnum,def=1" json:"Field2,omitempty"` + Field3 *YetYetAnotherTestEnum `protobuf:"varint,3,opt,name=Field3,json=field3,enum=test.YetYetAnotherTestEnum,def=0" json:"Field3,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *NinOptEnumDefault) Reset() { *m = NinOptEnumDefault{} } +func (*NinOptEnumDefault) ProtoMessage() {} +func (*NinOptEnumDefault) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{36} } + +const Default_NinOptEnumDefault_Field1 TheTestEnum = C +const Default_NinOptEnumDefault_Field2 YetAnotherTestEnum = BetterYetBB +const Default_NinOptEnumDefault_Field3 YetYetAnotherTestEnum = YetYetAnotherTestEnum_CC + +func (m *NinOptEnumDefault) GetField1() TheTestEnum { + if m != nil && m.Field1 != nil { + return *m.Field1 + } + return Default_NinOptEnumDefault_Field1 +} + +func (m *NinOptEnumDefault) GetField2() YetAnotherTestEnum { + if m != nil && m.Field2 != nil { + return *m.Field2 + } + return Default_NinOptEnumDefault_Field2 +} + +func (m *NinOptEnumDefault) GetField3() YetYetAnotherTestEnum { + if m != nil && m.Field3 != nil { + return *m.Field3 + } + return Default_NinOptEnumDefault_Field3 +} + +type AnotherNinOptEnum struct { + Field1 *AnotherTestEnum `protobuf:"varint,1,opt,name=Field1,json=field1,enum=test.AnotherTestEnum" json:"Field1,omitempty"` + Field2 *YetAnotherTestEnum `protobuf:"varint,2,opt,name=Field2,json=field2,enum=test.YetAnotherTestEnum" json:"Field2,omitempty"` + Field3 *YetYetAnotherTestEnum `protobuf:"varint,3,opt,name=Field3,json=field3,enum=test.YetYetAnotherTestEnum" json:"Field3,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *AnotherNinOptEnum) Reset() { *m = AnotherNinOptEnum{} } +func (*AnotherNinOptEnum) ProtoMessage() {} +func (*AnotherNinOptEnum) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{37} } + +type AnotherNinOptEnumDefault struct { + Field1 *AnotherTestEnum `protobuf:"varint,1,opt,name=Field1,json=field1,enum=test.AnotherTestEnum,def=11" json:"Field1,omitempty"` + Field2 *YetAnotherTestEnum `protobuf:"varint,2,opt,name=Field2,json=field2,enum=test.YetAnotherTestEnum,def=1" json:"Field2,omitempty"` + Field3 *YetYetAnotherTestEnum `protobuf:"varint,3,opt,name=Field3,json=field3,enum=test.YetYetAnotherTestEnum,def=0" json:"Field3,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *AnotherNinOptEnumDefault) Reset() { *m = AnotherNinOptEnumDefault{} } +func (*AnotherNinOptEnumDefault) ProtoMessage() {} +func (*AnotherNinOptEnumDefault) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{38} } + +const Default_AnotherNinOptEnumDefault_Field1 AnotherTestEnum = E +const Default_AnotherNinOptEnumDefault_Field2 YetAnotherTestEnum = BetterYetBB +const Default_AnotherNinOptEnumDefault_Field3 YetYetAnotherTestEnum = YetYetAnotherTestEnum_CC + +func (m *AnotherNinOptEnumDefault) GetField1() AnotherTestEnum { + if m != nil && m.Field1 != nil { + return *m.Field1 + } + return Default_AnotherNinOptEnumDefault_Field1 +} + +func (m *AnotherNinOptEnumDefault) GetField2() YetAnotherTestEnum { + if m != nil && m.Field2 != nil { + return *m.Field2 + } + return Default_AnotherNinOptEnumDefault_Field2 +} + +func (m *AnotherNinOptEnumDefault) GetField3() YetYetAnotherTestEnum { + if m != nil && m.Field3 != nil { + return *m.Field3 + } + return Default_AnotherNinOptEnumDefault_Field3 +} + +type Timer struct { + Time1 int64 `protobuf:"fixed64,1,opt,name=Time1,json=time1" json:"Time1"` + Time2 int64 `protobuf:"fixed64,2,opt,name=Time2,json=time2" json:"Time2"` + Data []byte `protobuf:"bytes,3,opt,name=Data,json=data" json:"Data"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *Timer) Reset() { *m = Timer{} } +func (*Timer) ProtoMessage() {} +func (*Timer) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{39} } + +type MyExtendable struct { + Field1 *int64 `protobuf:"varint,1,opt,name=Field1,json=field1" json:"Field1,omitempty"` + XXX_extensions map[int32]proto.Extension `json:"-"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *MyExtendable) Reset() { *m = MyExtendable{} } +func (*MyExtendable) ProtoMessage() {} +func (*MyExtendable) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{40} } + +var extRange_MyExtendable = []proto.ExtensionRange{ + {100, 199}, +} + +func (*MyExtendable) ExtensionRangeArray() []proto.ExtensionRange { + return extRange_MyExtendable +} +func (m *MyExtendable) ExtensionMap() map[int32]proto.Extension { + if m.XXX_extensions == nil { + m.XXX_extensions = make(map[int32]proto.Extension) + } + return m.XXX_extensions +} + +type OtherExtenable struct { + Field2 *int64 `protobuf:"varint,2,opt,name=Field2,json=field2" json:"Field2,omitempty"` + Field13 *int64 `protobuf:"varint,13,opt,name=Field13,json=field13" json:"Field13,omitempty"` + M *MyExtendable `protobuf:"bytes,1,opt,name=M,json=m" json:"M,omitempty"` + XXX_extensions map[int32]proto.Extension `json:"-"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *OtherExtenable) Reset() { *m = OtherExtenable{} } +func (*OtherExtenable) ProtoMessage() {} +func (*OtherExtenable) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{41} } + +var extRange_OtherExtenable = []proto.ExtensionRange{ + {14, 16}, + {10, 12}, +} + +func (*OtherExtenable) ExtensionRangeArray() []proto.ExtensionRange { + return extRange_OtherExtenable +} +func (m *OtherExtenable) ExtensionMap() map[int32]proto.Extension { + if m.XXX_extensions == nil { + m.XXX_extensions = make(map[int32]proto.Extension) + } + return m.XXX_extensions +} + +type NestedDefinition struct { + Field1 *int64 `protobuf:"varint,1,opt,name=Field1,json=field1" json:"Field1,omitempty"` + EnumField *NestedDefinition_NestedEnum `protobuf:"varint,2,opt,name=EnumField,json=enumField,enum=test.NestedDefinition_NestedEnum" json:"EnumField,omitempty"` + NNM *NestedDefinition_NestedMessage_NestedNestedMsg `protobuf:"bytes,3,opt,name=NNM,json=nNM" json:"NNM,omitempty"` + NM *NestedDefinition_NestedMessage `protobuf:"bytes,4,opt,name=NM,json=nM" json:"NM,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *NestedDefinition) Reset() { *m = NestedDefinition{} } +func (*NestedDefinition) ProtoMessage() {} +func (*NestedDefinition) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{42} } + +type NestedDefinition_NestedMessage struct { + NestedField1 *uint64 `protobuf:"fixed64,1,opt,name=NestedField1,json=nestedField1" json:"NestedField1,omitempty"` + NNM *NestedDefinition_NestedMessage_NestedNestedMsg `protobuf:"bytes,2,opt,name=NNM,json=nNM" json:"NNM,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *NestedDefinition_NestedMessage) Reset() { *m = NestedDefinition_NestedMessage{} } +func (*NestedDefinition_NestedMessage) ProtoMessage() {} +func (*NestedDefinition_NestedMessage) Descriptor() ([]byte, []int) { + return fileDescriptorThetest, []int{42, 0} +} + +type NestedDefinition_NestedMessage_NestedNestedMsg struct { + NestedNestedField1 *string `protobuf:"bytes,10,opt,name=NestedNestedField1,json=nestedNestedField1" json:"NestedNestedField1,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *NestedDefinition_NestedMessage_NestedNestedMsg) Reset() { + *m = NestedDefinition_NestedMessage_NestedNestedMsg{} +} +func (*NestedDefinition_NestedMessage_NestedNestedMsg) ProtoMessage() {} +func (*NestedDefinition_NestedMessage_NestedNestedMsg) Descriptor() ([]byte, []int) { + return fileDescriptorThetest, []int{42, 0, 0} +} + +type NestedScope struct { + A *NestedDefinition_NestedMessage_NestedNestedMsg `protobuf:"bytes,1,opt,name=A,json=a" json:"A,omitempty"` + B *NestedDefinition_NestedEnum `protobuf:"varint,2,opt,name=B,json=b,enum=test.NestedDefinition_NestedEnum" json:"B,omitempty"` + C *NestedDefinition_NestedMessage `protobuf:"bytes,3,opt,name=C,json=c" json:"C,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *NestedScope) Reset() { *m = NestedScope{} } +func (*NestedScope) ProtoMessage() {} +func (*NestedScope) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{43} } + +type NinOptNativeDefault struct { + Field1 *float64 `protobuf:"fixed64,1,opt,name=Field1,json=field1,def=1234.1234" json:"Field1,omitempty"` + Field2 *float32 `protobuf:"fixed32,2,opt,name=Field2,json=field2,def=1234.1234" json:"Field2,omitempty"` + Field3 *int32 `protobuf:"varint,3,opt,name=Field3,json=field3,def=1234" json:"Field3,omitempty"` + Field4 *int64 `protobuf:"varint,4,opt,name=Field4,json=field4,def=1234" json:"Field4,omitempty"` + Field5 *uint32 `protobuf:"varint,5,opt,name=Field5,json=field5,def=1234" json:"Field5,omitempty"` + Field6 *uint64 `protobuf:"varint,6,opt,name=Field6,json=field6,def=1234" json:"Field6,omitempty"` + Field7 *int32 `protobuf:"zigzag32,7,opt,name=Field7,json=field7,def=1234" json:"Field7,omitempty"` + Field8 *int64 `protobuf:"zigzag64,8,opt,name=Field8,json=field8,def=1234" json:"Field8,omitempty"` + Field9 *uint32 `protobuf:"fixed32,9,opt,name=Field9,json=field9,def=1234" json:"Field9,omitempty"` + Field10 *int32 `protobuf:"fixed32,10,opt,name=Field10,json=field10,def=1234" json:"Field10,omitempty"` + Field11 *uint64 `protobuf:"fixed64,11,opt,name=Field11,json=field11,def=1234" json:"Field11,omitempty"` + Field12 *int64 `protobuf:"fixed64,12,opt,name=Field12,json=field12,def=1234" json:"Field12,omitempty"` + Field13 *bool `protobuf:"varint,13,opt,name=Field13,json=field13,def=1" json:"Field13,omitempty"` + Field14 *string `protobuf:"bytes,14,opt,name=Field14,json=field14,def=1234" json:"Field14,omitempty"` + Field15 []byte `protobuf:"bytes,15,opt,name=Field15,json=field15" json:"Field15,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *NinOptNativeDefault) Reset() { *m = NinOptNativeDefault{} } +func (*NinOptNativeDefault) ProtoMessage() {} +func (*NinOptNativeDefault) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{44} } + +const Default_NinOptNativeDefault_Field1 float64 = 1234.1234 +const Default_NinOptNativeDefault_Field2 float32 = 1234.1234 +const Default_NinOptNativeDefault_Field3 int32 = 1234 +const Default_NinOptNativeDefault_Field4 int64 = 1234 +const Default_NinOptNativeDefault_Field5 uint32 = 1234 +const Default_NinOptNativeDefault_Field6 uint64 = 1234 +const Default_NinOptNativeDefault_Field7 int32 = 1234 +const Default_NinOptNativeDefault_Field8 int64 = 1234 +const Default_NinOptNativeDefault_Field9 uint32 = 1234 +const Default_NinOptNativeDefault_Field10 int32 = 1234 +const Default_NinOptNativeDefault_Field11 uint64 = 1234 +const Default_NinOptNativeDefault_Field12 int64 = 1234 +const Default_NinOptNativeDefault_Field13 bool = true +const Default_NinOptNativeDefault_Field14 string = "1234" + +func (m *NinOptNativeDefault) GetField1() float64 { + if m != nil && m.Field1 != nil { + return *m.Field1 + } + return Default_NinOptNativeDefault_Field1 +} + +func (m *NinOptNativeDefault) GetField2() float32 { + if m != nil && m.Field2 != nil { + return *m.Field2 + } + return Default_NinOptNativeDefault_Field2 +} + +func (m *NinOptNativeDefault) GetField3() int32 { + if m != nil && m.Field3 != nil { + return *m.Field3 + } + return Default_NinOptNativeDefault_Field3 +} + +func (m *NinOptNativeDefault) GetField4() int64 { + if m != nil && m.Field4 != nil { + return *m.Field4 + } + return Default_NinOptNativeDefault_Field4 +} + +func (m *NinOptNativeDefault) GetField5() uint32 { + if m != nil && m.Field5 != nil { + return *m.Field5 + } + return Default_NinOptNativeDefault_Field5 +} + +func (m *NinOptNativeDefault) GetField6() uint64 { + if m != nil && m.Field6 != nil { + return *m.Field6 + } + return Default_NinOptNativeDefault_Field6 +} + +func (m *NinOptNativeDefault) GetField7() int32 { + if m != nil && m.Field7 != nil { + return *m.Field7 + } + return Default_NinOptNativeDefault_Field7 +} + +func (m *NinOptNativeDefault) GetField8() int64 { + if m != nil && m.Field8 != nil { + return *m.Field8 + } + return Default_NinOptNativeDefault_Field8 +} + +func (m *NinOptNativeDefault) GetField9() uint32 { + if m != nil && m.Field9 != nil { + return *m.Field9 + } + return Default_NinOptNativeDefault_Field9 +} + +func (m *NinOptNativeDefault) GetField10() int32 { + if m != nil && m.Field10 != nil { + return *m.Field10 + } + return Default_NinOptNativeDefault_Field10 +} + +func (m *NinOptNativeDefault) GetField11() uint64 { + if m != nil && m.Field11 != nil { + return *m.Field11 + } + return Default_NinOptNativeDefault_Field11 +} + +func (m *NinOptNativeDefault) GetField12() int64 { + if m != nil && m.Field12 != nil { + return *m.Field12 + } + return Default_NinOptNativeDefault_Field12 +} + +func (m *NinOptNativeDefault) GetField13() bool { + if m != nil && m.Field13 != nil { + return *m.Field13 + } + return Default_NinOptNativeDefault_Field13 +} + +func (m *NinOptNativeDefault) GetField14() string { + if m != nil && m.Field14 != nil { + return *m.Field14 + } + return Default_NinOptNativeDefault_Field14 +} + +func (m *NinOptNativeDefault) GetField15() []byte { + if m != nil { + return m.Field15 + } + return nil +} + +type CustomContainer struct { + CustomStruct NidOptCustom `protobuf:"bytes,1,opt,name=CustomStruct,json=customStruct" json:"CustomStruct"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *CustomContainer) Reset() { *m = CustomContainer{} } +func (*CustomContainer) ProtoMessage() {} +func (*CustomContainer) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{45} } + +type CustomNameNidOptNative struct { + FieldA float64 `protobuf:"fixed64,1,opt,name=Field1,json=field1" json:"Field1"` + FieldB float32 `protobuf:"fixed32,2,opt,name=Field2,json=field2" json:"Field2"` + FieldC int32 `protobuf:"varint,3,opt,name=Field3,json=field3" json:"Field3"` + FieldD int64 `protobuf:"varint,4,opt,name=Field4,json=field4" json:"Field4"` + FieldE uint32 `protobuf:"varint,5,opt,name=Field5,json=field5" json:"Field5"` + FieldF uint64 `protobuf:"varint,6,opt,name=Field6,json=field6" json:"Field6"` + FieldG int32 `protobuf:"zigzag32,7,opt,name=Field7,json=field7" json:"Field7"` + FieldH int64 `protobuf:"zigzag64,8,opt,name=Field8,json=field8" json:"Field8"` + FieldI uint32 `protobuf:"fixed32,9,opt,name=Field9,json=field9" json:"Field9"` + FieldJ int32 `protobuf:"fixed32,10,opt,name=Field10,json=field10" json:"Field10"` + FieldK uint64 `protobuf:"fixed64,11,opt,name=Field11,json=field11" json:"Field11"` + FieldL int64 `protobuf:"fixed64,12,opt,name=Field12,json=field12" json:"Field12"` + FieldM bool `protobuf:"varint,13,opt,name=Field13,json=field13" json:"Field13"` + FieldN string `protobuf:"bytes,14,opt,name=Field14,json=field14" json:"Field14"` + FieldO []byte `protobuf:"bytes,15,opt,name=Field15,json=field15" json:"Field15"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *CustomNameNidOptNative) Reset() { *m = CustomNameNidOptNative{} } +func (*CustomNameNidOptNative) ProtoMessage() {} +func (*CustomNameNidOptNative) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{46} } + +type CustomNameNinOptNative struct { + FieldA *float64 `protobuf:"fixed64,1,opt,name=Field1,json=field1" json:"Field1,omitempty"` + FieldB *float32 `protobuf:"fixed32,2,opt,name=Field2,json=field2" json:"Field2,omitempty"` + FieldC *int32 `protobuf:"varint,3,opt,name=Field3,json=field3" json:"Field3,omitempty"` + FieldD *int64 `protobuf:"varint,4,opt,name=Field4,json=field4" json:"Field4,omitempty"` + FieldE *uint32 `protobuf:"varint,5,opt,name=Field5,json=field5" json:"Field5,omitempty"` + FieldF *uint64 `protobuf:"varint,6,opt,name=Field6,json=field6" json:"Field6,omitempty"` + FieldG *int32 `protobuf:"zigzag32,7,opt,name=Field7,json=field7" json:"Field7,omitempty"` + FieldH *int64 `protobuf:"zigzag64,8,opt,name=Field8,json=field8" json:"Field8,omitempty"` + FieldI *uint32 `protobuf:"fixed32,9,opt,name=Field9,json=field9" json:"Field9,omitempty"` + FieldJ *int32 `protobuf:"fixed32,10,opt,name=Field10,json=field10" json:"Field10,omitempty"` + FieldK *uint64 `protobuf:"fixed64,11,opt,name=Field11,json=field11" json:"Field11,omitempty"` + FielL *int64 `protobuf:"fixed64,12,opt,name=Field12,json=field12" json:"Field12,omitempty"` + FieldM *bool `protobuf:"varint,13,opt,name=Field13,json=field13" json:"Field13,omitempty"` + FieldN *string `protobuf:"bytes,14,opt,name=Field14,json=field14" json:"Field14,omitempty"` + FieldO []byte `protobuf:"bytes,15,opt,name=Field15,json=field15" json:"Field15,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *CustomNameNinOptNative) Reset() { *m = CustomNameNinOptNative{} } +func (*CustomNameNinOptNative) ProtoMessage() {} +func (*CustomNameNinOptNative) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{47} } + +type CustomNameNinRepNative struct { + FieldA []float64 `protobuf:"fixed64,1,rep,name=Field1,json=field1" json:"Field1,omitempty"` + FieldB []float32 `protobuf:"fixed32,2,rep,name=Field2,json=field2" json:"Field2,omitempty"` + FieldC []int32 `protobuf:"varint,3,rep,name=Field3,json=field3" json:"Field3,omitempty"` + FieldD []int64 `protobuf:"varint,4,rep,name=Field4,json=field4" json:"Field4,omitempty"` + FieldE []uint32 `protobuf:"varint,5,rep,name=Field5,json=field5" json:"Field5,omitempty"` + FieldF []uint64 `protobuf:"varint,6,rep,name=Field6,json=field6" json:"Field6,omitempty"` + FieldG []int32 `protobuf:"zigzag32,7,rep,name=Field7,json=field7" json:"Field7,omitempty"` + FieldH []int64 `protobuf:"zigzag64,8,rep,name=Field8,json=field8" json:"Field8,omitempty"` + FieldI []uint32 `protobuf:"fixed32,9,rep,name=Field9,json=field9" json:"Field9,omitempty"` + FieldJ []int32 `protobuf:"fixed32,10,rep,name=Field10,json=field10" json:"Field10,omitempty"` + FieldK []uint64 `protobuf:"fixed64,11,rep,name=Field11,json=field11" json:"Field11,omitempty"` + FieldL []int64 `protobuf:"fixed64,12,rep,name=Field12,json=field12" json:"Field12,omitempty"` + FieldM []bool `protobuf:"varint,13,rep,name=Field13,json=field13" json:"Field13,omitempty"` + FieldN []string `protobuf:"bytes,14,rep,name=Field14,json=field14" json:"Field14,omitempty"` + FieldO [][]byte `protobuf:"bytes,15,rep,name=Field15,json=field15" json:"Field15,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *CustomNameNinRepNative) Reset() { *m = CustomNameNinRepNative{} } +func (*CustomNameNinRepNative) ProtoMessage() {} +func (*CustomNameNinRepNative) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{48} } + +type CustomNameNinStruct struct { + FieldA *float64 `protobuf:"fixed64,1,opt,name=Field1,json=field1" json:"Field1,omitempty"` + FieldB *float32 `protobuf:"fixed32,2,opt,name=Field2,json=field2" json:"Field2,omitempty"` + FieldC *NidOptNative `protobuf:"bytes,3,opt,name=Field3,json=field3" json:"Field3,omitempty"` + FieldD []*NinOptNative `protobuf:"bytes,4,rep,name=Field4,json=field4" json:"Field4,omitempty"` + FieldE *uint64 `protobuf:"varint,6,opt,name=Field6,json=field6" json:"Field6,omitempty"` + FieldF *int32 `protobuf:"zigzag32,7,opt,name=Field7,json=field7" json:"Field7,omitempty"` + FieldG *NidOptNative `protobuf:"bytes,8,opt,name=Field8,json=field8" json:"Field8,omitempty"` + FieldH *bool `protobuf:"varint,13,opt,name=Field13,json=field13" json:"Field13,omitempty"` + FieldI *string `protobuf:"bytes,14,opt,name=Field14,json=field14" json:"Field14,omitempty"` + FieldJ []byte `protobuf:"bytes,15,opt,name=Field15,json=field15" json:"Field15,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *CustomNameNinStruct) Reset() { *m = CustomNameNinStruct{} } +func (*CustomNameNinStruct) ProtoMessage() {} +func (*CustomNameNinStruct) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{49} } + +type CustomNameCustomType struct { + FieldA *Uuid `protobuf:"bytes,1,opt,name=Id,json=id,customtype=Uuid" json:"Id,omitempty"` + FieldB *github_com_gogo_protobuf_test_custom.Uint128 `protobuf:"bytes,2,opt,name=Value,json=value,customtype=github.com/gogo/protobuf/test/custom.Uint128" json:"Value,omitempty"` + FieldC []Uuid `protobuf:"bytes,3,rep,name=Ids,json=ids,customtype=Uuid" json:"Ids,omitempty"` + FieldD []github_com_gogo_protobuf_test_custom.Uint128 `protobuf:"bytes,4,rep,name=Values,json=values,customtype=github.com/gogo/protobuf/test/custom.Uint128" json:"Values,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *CustomNameCustomType) Reset() { *m = CustomNameCustomType{} } +func (*CustomNameCustomType) ProtoMessage() {} +func (*CustomNameCustomType) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{50} } + +type CustomNameNinEmbeddedStructUnion struct { + *NidOptNative `protobuf:"bytes,1,opt,name=Field1,json=field1,embedded=Field1" json:"Field1,omitempty"` + FieldA *NinOptNative `protobuf:"bytes,200,opt,name=Field200,json=field200" json:"Field200,omitempty"` + FieldB *bool `protobuf:"varint,210,opt,name=Field210,json=field210" json:"Field210,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *CustomNameNinEmbeddedStructUnion) Reset() { *m = CustomNameNinEmbeddedStructUnion{} } +func (*CustomNameNinEmbeddedStructUnion) ProtoMessage() {} +func (*CustomNameNinEmbeddedStructUnion) Descriptor() ([]byte, []int) { + return fileDescriptorThetest, []int{51} +} + +type CustomNameEnum struct { + FieldA *TheTestEnum `protobuf:"varint,1,opt,name=Field1,json=field1,enum=test.TheTestEnum" json:"Field1,omitempty"` + FieldB []TheTestEnum `protobuf:"varint,2,rep,name=Field2,json=field2,enum=test.TheTestEnum" json:"Field2,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *CustomNameEnum) Reset() { *m = CustomNameEnum{} } +func (*CustomNameEnum) ProtoMessage() {} +func (*CustomNameEnum) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{52} } + +type NoExtensionsMap struct { + Field1 *int64 `protobuf:"varint,1,opt,name=Field1,json=field1" json:"Field1,omitempty"` + XXX_extensions []byte `protobuf:"bytes,0,opt" json:"-"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *NoExtensionsMap) Reset() { *m = NoExtensionsMap{} } +func (*NoExtensionsMap) ProtoMessage() {} +func (*NoExtensionsMap) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{53} } + +var extRange_NoExtensionsMap = []proto.ExtensionRange{ + {100, 199}, +} + +func (*NoExtensionsMap) ExtensionRangeArray() []proto.ExtensionRange { + return extRange_NoExtensionsMap +} +func (m *NoExtensionsMap) GetExtensions() *[]byte { + if m.XXX_extensions == nil { + m.XXX_extensions = make([]byte, 0) + } + return &m.XXX_extensions +} + +type Unrecognized struct { + Field1 *string `protobuf:"bytes,1,opt,name=Field1,json=field1" json:"Field1,omitempty"` +} + +func (m *Unrecognized) Reset() { *m = Unrecognized{} } +func (*Unrecognized) ProtoMessage() {} +func (*Unrecognized) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{54} } + +type UnrecognizedWithInner struct { + Embedded []*UnrecognizedWithInner_Inner `protobuf:"bytes,1,rep,name=embedded" json:"embedded,omitempty"` + Field2 *string `protobuf:"bytes,2,opt,name=Field2,json=field2" json:"Field2,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *UnrecognizedWithInner) Reset() { *m = UnrecognizedWithInner{} } +func (*UnrecognizedWithInner) ProtoMessage() {} +func (*UnrecognizedWithInner) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{55} } + +type UnrecognizedWithInner_Inner struct { + Field1 *uint32 `protobuf:"varint,1,opt,name=Field1,json=field1" json:"Field1,omitempty"` +} + +func (m *UnrecognizedWithInner_Inner) Reset() { *m = UnrecognizedWithInner_Inner{} } +func (*UnrecognizedWithInner_Inner) ProtoMessage() {} +func (*UnrecognizedWithInner_Inner) Descriptor() ([]byte, []int) { + return fileDescriptorThetest, []int{55, 0} +} + +type UnrecognizedWithEmbed struct { + UnrecognizedWithEmbed_Embedded `protobuf:"bytes,1,opt,name=embedded,embedded=embedded" json:"embedded"` + Field2 *string `protobuf:"bytes,2,opt,name=Field2,json=field2" json:"Field2,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *UnrecognizedWithEmbed) Reset() { *m = UnrecognizedWithEmbed{} } +func (*UnrecognizedWithEmbed) ProtoMessage() {} +func (*UnrecognizedWithEmbed) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{56} } + +type UnrecognizedWithEmbed_Embedded struct { + Field1 *uint32 `protobuf:"varint,1,opt,name=Field1,json=field1" json:"Field1,omitempty"` +} + +func (m *UnrecognizedWithEmbed_Embedded) Reset() { *m = UnrecognizedWithEmbed_Embedded{} } +func (*UnrecognizedWithEmbed_Embedded) ProtoMessage() {} +func (*UnrecognizedWithEmbed_Embedded) Descriptor() ([]byte, []int) { + return fileDescriptorThetest, []int{56, 0} +} + +type Node struct { + Label *string `protobuf:"bytes,1,opt,name=Label,json=label" json:"Label,omitempty"` + Children []*Node `protobuf:"bytes,2,rep,name=Children,json=children" json:"Children,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *Node) Reset() { *m = Node{} } +func (*Node) ProtoMessage() {} +func (*Node) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{57} } + +var E_FieldA = &proto.ExtensionDesc{ + ExtendedType: (*MyExtendable)(nil), + ExtensionType: (*float64)(nil), + Field: 100, + Name: "test.FieldA", + Tag: "fixed64,100,opt,name=FieldA,json=fieldA", +} + +var E_FieldB = &proto.ExtensionDesc{ + ExtendedType: (*MyExtendable)(nil), + ExtensionType: (*NinOptNative)(nil), + Field: 101, + Name: "test.FieldB", + Tag: "bytes,101,opt,name=FieldB,json=fieldB", +} + +var E_FieldC = &proto.ExtensionDesc{ + ExtendedType: (*MyExtendable)(nil), + ExtensionType: (*NinEmbeddedStruct)(nil), + Field: 102, + Name: "test.FieldC", + Tag: "bytes,102,opt,name=FieldC,json=fieldC", +} + +var E_FieldD = &proto.ExtensionDesc{ + ExtendedType: (*MyExtendable)(nil), + ExtensionType: ([]int64)(nil), + Field: 104, + Name: "test.FieldD", + Tag: "varint,104,rep,name=FieldD,json=fieldD", +} + +var E_FieldE = &proto.ExtensionDesc{ + ExtendedType: (*MyExtendable)(nil), + ExtensionType: ([]*NinOptNative)(nil), + Field: 105, + Name: "test.FieldE", + Tag: "bytes,105,rep,name=FieldE,json=fieldE", +} + +var E_FieldA1 = &proto.ExtensionDesc{ + ExtendedType: (*NoExtensionsMap)(nil), + ExtensionType: (*float64)(nil), + Field: 100, + Name: "test.FieldA1", + Tag: "fixed64,100,opt,name=FieldA1,json=fieldA1", +} + +var E_FieldB1 = &proto.ExtensionDesc{ + ExtendedType: (*NoExtensionsMap)(nil), + ExtensionType: (*NinOptNative)(nil), + Field: 101, + Name: "test.FieldB1", + Tag: "bytes,101,opt,name=FieldB1,json=fieldB1", +} + +var E_FieldC1 = &proto.ExtensionDesc{ + ExtendedType: (*NoExtensionsMap)(nil), + ExtensionType: (*NinEmbeddedStruct)(nil), + Field: 102, + Name: "test.FieldC1", + Tag: "bytes,102,opt,name=FieldC1,json=fieldC1", +} + +func init() { + proto.RegisterType((*NidOptNative)(nil), "test.NidOptNative") + proto.RegisterType((*NinOptNative)(nil), "test.NinOptNative") + proto.RegisterType((*NidRepNative)(nil), "test.NidRepNative") + proto.RegisterType((*NinRepNative)(nil), "test.NinRepNative") + proto.RegisterType((*NidRepPackedNative)(nil), "test.NidRepPackedNative") + proto.RegisterType((*NinRepPackedNative)(nil), "test.NinRepPackedNative") + proto.RegisterType((*NidOptStruct)(nil), "test.NidOptStruct") + proto.RegisterType((*NinOptStruct)(nil), "test.NinOptStruct") + proto.RegisterType((*NidRepStruct)(nil), "test.NidRepStruct") + proto.RegisterType((*NinRepStruct)(nil), "test.NinRepStruct") + proto.RegisterType((*NidEmbeddedStruct)(nil), "test.NidEmbeddedStruct") + proto.RegisterType((*NinEmbeddedStruct)(nil), "test.NinEmbeddedStruct") + proto.RegisterType((*NidNestedStruct)(nil), "test.NidNestedStruct") + proto.RegisterType((*NinNestedStruct)(nil), "test.NinNestedStruct") + proto.RegisterType((*NidOptCustom)(nil), "test.NidOptCustom") + proto.RegisterType((*CustomDash)(nil), "test.CustomDash") + proto.RegisterType((*NinOptCustom)(nil), "test.NinOptCustom") + proto.RegisterType((*NidRepCustom)(nil), "test.NidRepCustom") + proto.RegisterType((*NinRepCustom)(nil), "test.NinRepCustom") + proto.RegisterType((*NinOptNativeUnion)(nil), "test.NinOptNativeUnion") + proto.RegisterType((*NinOptStructUnion)(nil), "test.NinOptStructUnion") + proto.RegisterType((*NinEmbeddedStructUnion)(nil), "test.NinEmbeddedStructUnion") + proto.RegisterType((*NinNestedStructUnion)(nil), "test.NinNestedStructUnion") + proto.RegisterType((*Tree)(nil), "test.Tree") + proto.RegisterType((*OrBranch)(nil), "test.OrBranch") + proto.RegisterType((*AndBranch)(nil), "test.AndBranch") + proto.RegisterType((*Leaf)(nil), "test.Leaf") + proto.RegisterType((*DeepTree)(nil), "test.DeepTree") + proto.RegisterType((*ADeepBranch)(nil), "test.ADeepBranch") + proto.RegisterType((*AndDeepBranch)(nil), "test.AndDeepBranch") + proto.RegisterType((*DeepLeaf)(nil), "test.DeepLeaf") + proto.RegisterType((*Nil)(nil), "test.Nil") + proto.RegisterType((*NidOptEnum)(nil), "test.NidOptEnum") + proto.RegisterType((*NinOptEnum)(nil), "test.NinOptEnum") + proto.RegisterType((*NidRepEnum)(nil), "test.NidRepEnum") + proto.RegisterType((*NinRepEnum)(nil), "test.NinRepEnum") + proto.RegisterType((*NinOptEnumDefault)(nil), "test.NinOptEnumDefault") + proto.RegisterType((*AnotherNinOptEnum)(nil), "test.AnotherNinOptEnum") + proto.RegisterType((*AnotherNinOptEnumDefault)(nil), "test.AnotherNinOptEnumDefault") + proto.RegisterType((*Timer)(nil), "test.Timer") + proto.RegisterType((*MyExtendable)(nil), "test.MyExtendable") + proto.RegisterType((*OtherExtenable)(nil), "test.OtherExtenable") + proto.RegisterType((*NestedDefinition)(nil), "test.NestedDefinition") + proto.RegisterType((*NestedDefinition_NestedMessage)(nil), "test.NestedDefinition.NestedMessage") + proto.RegisterType((*NestedDefinition_NestedMessage_NestedNestedMsg)(nil), "test.NestedDefinition.NestedMessage.NestedNestedMsg") + proto.RegisterType((*NestedScope)(nil), "test.NestedScope") + proto.RegisterType((*NinOptNativeDefault)(nil), "test.NinOptNativeDefault") + proto.RegisterType((*CustomContainer)(nil), "test.CustomContainer") + proto.RegisterType((*CustomNameNidOptNative)(nil), "test.CustomNameNidOptNative") + proto.RegisterType((*CustomNameNinOptNative)(nil), "test.CustomNameNinOptNative") + proto.RegisterType((*CustomNameNinRepNative)(nil), "test.CustomNameNinRepNative") + proto.RegisterType((*CustomNameNinStruct)(nil), "test.CustomNameNinStruct") + proto.RegisterType((*CustomNameCustomType)(nil), "test.CustomNameCustomType") + proto.RegisterType((*CustomNameNinEmbeddedStructUnion)(nil), "test.CustomNameNinEmbeddedStructUnion") + proto.RegisterType((*CustomNameEnum)(nil), "test.CustomNameEnum") + proto.RegisterType((*NoExtensionsMap)(nil), "test.NoExtensionsMap") + proto.RegisterType((*Unrecognized)(nil), "test.Unrecognized") + proto.RegisterType((*UnrecognizedWithInner)(nil), "test.UnrecognizedWithInner") + proto.RegisterType((*UnrecognizedWithInner_Inner)(nil), "test.UnrecognizedWithInner.Inner") + proto.RegisterType((*UnrecognizedWithEmbed)(nil), "test.UnrecognizedWithEmbed") + proto.RegisterType((*UnrecognizedWithEmbed_Embedded)(nil), "test.UnrecognizedWithEmbed.Embedded") + proto.RegisterType((*Node)(nil), "test.Node") + proto.RegisterEnum("test.TheTestEnum", TheTestEnum_name, TheTestEnum_value) + proto.RegisterEnum("test.AnotherTestEnum", AnotherTestEnum_name, AnotherTestEnum_value) + proto.RegisterEnum("test.YetAnotherTestEnum", YetAnotherTestEnum_name, YetAnotherTestEnum_value) + proto.RegisterEnum("test.YetYetAnotherTestEnum", YetYetAnotherTestEnum_name, YetYetAnotherTestEnum_value) + proto.RegisterEnum("test.NestedDefinition_NestedEnum", NestedDefinition_NestedEnum_name, NestedDefinition_NestedEnum_value) + proto.RegisterExtension(E_FieldA) + proto.RegisterExtension(E_FieldB) + proto.RegisterExtension(E_FieldC) + proto.RegisterExtension(E_FieldD) + proto.RegisterExtension(E_FieldE) + proto.RegisterExtension(E_FieldA1) + proto.RegisterExtension(E_FieldB1) + proto.RegisterExtension(E_FieldC1) +} +func (this *NidOptNative) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NidOptNative) + if !ok { + that2, ok := that.(NidOptNative) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.Field1 != that1.Field1 { + if this.Field1 < that1.Field1 { + return -1 + } + return 1 + } + if this.Field2 != that1.Field2 { + if this.Field2 < that1.Field2 { + return -1 + } + return 1 + } + if this.Field3 != that1.Field3 { + if this.Field3 < that1.Field3 { + return -1 + } + return 1 + } + if this.Field4 != that1.Field4 { + if this.Field4 < that1.Field4 { + return -1 + } + return 1 + } + if this.Field5 != that1.Field5 { + if this.Field5 < that1.Field5 { + return -1 + } + return 1 + } + if this.Field6 != that1.Field6 { + if this.Field6 < that1.Field6 { + return -1 + } + return 1 + } + if this.Field7 != that1.Field7 { + if this.Field7 < that1.Field7 { + return -1 + } + return 1 + } + if this.Field8 != that1.Field8 { + if this.Field8 < that1.Field8 { + return -1 + } + return 1 + } + if this.Field9 != that1.Field9 { + if this.Field9 < that1.Field9 { + return -1 + } + return 1 + } + if this.Field10 != that1.Field10 { + if this.Field10 < that1.Field10 { + return -1 + } + return 1 + } + if this.Field11 != that1.Field11 { + if this.Field11 < that1.Field11 { + return -1 + } + return 1 + } + if this.Field12 != that1.Field12 { + if this.Field12 < that1.Field12 { + return -1 + } + return 1 + } + if this.Field13 != that1.Field13 { + if !this.Field13 { + return -1 + } + return 1 + } + if this.Field14 != that1.Field14 { + if this.Field14 < that1.Field14 { + return -1 + } + return 1 + } + if c := bytes.Compare(this.Field15, that1.Field15); c != 0 { + return c + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NinOptNative) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NinOptNative) + if !ok { + that2, ok := that.(NinOptNative) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + if *this.Field1 < *that1.Field1 { + return -1 + } + return 1 + } + } else if this.Field1 != nil { + return 1 + } else if that1.Field1 != nil { + return -1 + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + if *this.Field2 < *that1.Field2 { + return -1 + } + return 1 + } + } else if this.Field2 != nil { + return 1 + } else if that1.Field2 != nil { + return -1 + } + if this.Field3 != nil && that1.Field3 != nil { + if *this.Field3 != *that1.Field3 { + if *this.Field3 < *that1.Field3 { + return -1 + } + return 1 + } + } else if this.Field3 != nil { + return 1 + } else if that1.Field3 != nil { + return -1 + } + if this.Field4 != nil && that1.Field4 != nil { + if *this.Field4 != *that1.Field4 { + if *this.Field4 < *that1.Field4 { + return -1 + } + return 1 + } + } else if this.Field4 != nil { + return 1 + } else if that1.Field4 != nil { + return -1 + } + if this.Field5 != nil && that1.Field5 != nil { + if *this.Field5 != *that1.Field5 { + if *this.Field5 < *that1.Field5 { + return -1 + } + return 1 + } + } else if this.Field5 != nil { + return 1 + } else if that1.Field5 != nil { + return -1 + } + if this.Field6 != nil && that1.Field6 != nil { + if *this.Field6 != *that1.Field6 { + if *this.Field6 < *that1.Field6 { + return -1 + } + return 1 + } + } else if this.Field6 != nil { + return 1 + } else if that1.Field6 != nil { + return -1 + } + if this.Field7 != nil && that1.Field7 != nil { + if *this.Field7 != *that1.Field7 { + if *this.Field7 < *that1.Field7 { + return -1 + } + return 1 + } + } else if this.Field7 != nil { + return 1 + } else if that1.Field7 != nil { + return -1 + } + if this.Field8 != nil && that1.Field8 != nil { + if *this.Field8 != *that1.Field8 { + if *this.Field8 < *that1.Field8 { + return -1 + } + return 1 + } + } else if this.Field8 != nil { + return 1 + } else if that1.Field8 != nil { + return -1 + } + if this.Field9 != nil && that1.Field9 != nil { + if *this.Field9 != *that1.Field9 { + if *this.Field9 < *that1.Field9 { + return -1 + } + return 1 + } + } else if this.Field9 != nil { + return 1 + } else if that1.Field9 != nil { + return -1 + } + if this.Field10 != nil && that1.Field10 != nil { + if *this.Field10 != *that1.Field10 { + if *this.Field10 < *that1.Field10 { + return -1 + } + return 1 + } + } else if this.Field10 != nil { + return 1 + } else if that1.Field10 != nil { + return -1 + } + if this.Field11 != nil && that1.Field11 != nil { + if *this.Field11 != *that1.Field11 { + if *this.Field11 < *that1.Field11 { + return -1 + } + return 1 + } + } else if this.Field11 != nil { + return 1 + } else if that1.Field11 != nil { + return -1 + } + if this.Field12 != nil && that1.Field12 != nil { + if *this.Field12 != *that1.Field12 { + if *this.Field12 < *that1.Field12 { + return -1 + } + return 1 + } + } else if this.Field12 != nil { + return 1 + } else if that1.Field12 != nil { + return -1 + } + if this.Field13 != nil && that1.Field13 != nil { + if *this.Field13 != *that1.Field13 { + if !*this.Field13 { + return -1 + } + return 1 + } + } else if this.Field13 != nil { + return 1 + } else if that1.Field13 != nil { + return -1 + } + if this.Field14 != nil && that1.Field14 != nil { + if *this.Field14 != *that1.Field14 { + if *this.Field14 < *that1.Field14 { + return -1 + } + return 1 + } + } else if this.Field14 != nil { + return 1 + } else if that1.Field14 != nil { + return -1 + } + if c := bytes.Compare(this.Field15, that1.Field15); c != 0 { + return c + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NidRepNative) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NidRepNative) + if !ok { + that2, ok := that.(NidRepNative) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if len(this.Field1) != len(that1.Field1) { + if len(this.Field1) < len(that1.Field1) { + return -1 + } + return 1 + } + for i := range this.Field1 { + if this.Field1[i] != that1.Field1[i] { + if this.Field1[i] < that1.Field1[i] { + return -1 + } + return 1 + } + } + if len(this.Field2) != len(that1.Field2) { + if len(this.Field2) < len(that1.Field2) { + return -1 + } + return 1 + } + for i := range this.Field2 { + if this.Field2[i] != that1.Field2[i] { + if this.Field2[i] < that1.Field2[i] { + return -1 + } + return 1 + } + } + if len(this.Field3) != len(that1.Field3) { + if len(this.Field3) < len(that1.Field3) { + return -1 + } + return 1 + } + for i := range this.Field3 { + if this.Field3[i] != that1.Field3[i] { + if this.Field3[i] < that1.Field3[i] { + return -1 + } + return 1 + } + } + if len(this.Field4) != len(that1.Field4) { + if len(this.Field4) < len(that1.Field4) { + return -1 + } + return 1 + } + for i := range this.Field4 { + if this.Field4[i] != that1.Field4[i] { + if this.Field4[i] < that1.Field4[i] { + return -1 + } + return 1 + } + } + if len(this.Field5) != len(that1.Field5) { + if len(this.Field5) < len(that1.Field5) { + return -1 + } + return 1 + } + for i := range this.Field5 { + if this.Field5[i] != that1.Field5[i] { + if this.Field5[i] < that1.Field5[i] { + return -1 + } + return 1 + } + } + if len(this.Field6) != len(that1.Field6) { + if len(this.Field6) < len(that1.Field6) { + return -1 + } + return 1 + } + for i := range this.Field6 { + if this.Field6[i] != that1.Field6[i] { + if this.Field6[i] < that1.Field6[i] { + return -1 + } + return 1 + } + } + if len(this.Field7) != len(that1.Field7) { + if len(this.Field7) < len(that1.Field7) { + return -1 + } + return 1 + } + for i := range this.Field7 { + if this.Field7[i] != that1.Field7[i] { + if this.Field7[i] < that1.Field7[i] { + return -1 + } + return 1 + } + } + if len(this.Field8) != len(that1.Field8) { + if len(this.Field8) < len(that1.Field8) { + return -1 + } + return 1 + } + for i := range this.Field8 { + if this.Field8[i] != that1.Field8[i] { + if this.Field8[i] < that1.Field8[i] { + return -1 + } + return 1 + } + } + if len(this.Field9) != len(that1.Field9) { + if len(this.Field9) < len(that1.Field9) { + return -1 + } + return 1 + } + for i := range this.Field9 { + if this.Field9[i] != that1.Field9[i] { + if this.Field9[i] < that1.Field9[i] { + return -1 + } + return 1 + } + } + if len(this.Field10) != len(that1.Field10) { + if len(this.Field10) < len(that1.Field10) { + return -1 + } + return 1 + } + for i := range this.Field10 { + if this.Field10[i] != that1.Field10[i] { + if this.Field10[i] < that1.Field10[i] { + return -1 + } + return 1 + } + } + if len(this.Field11) != len(that1.Field11) { + if len(this.Field11) < len(that1.Field11) { + return -1 + } + return 1 + } + for i := range this.Field11 { + if this.Field11[i] != that1.Field11[i] { + if this.Field11[i] < that1.Field11[i] { + return -1 + } + return 1 + } + } + if len(this.Field12) != len(that1.Field12) { + if len(this.Field12) < len(that1.Field12) { + return -1 + } + return 1 + } + for i := range this.Field12 { + if this.Field12[i] != that1.Field12[i] { + if this.Field12[i] < that1.Field12[i] { + return -1 + } + return 1 + } + } + if len(this.Field13) != len(that1.Field13) { + if len(this.Field13) < len(that1.Field13) { + return -1 + } + return 1 + } + for i := range this.Field13 { + if this.Field13[i] != that1.Field13[i] { + if !this.Field13[i] { + return -1 + } + return 1 + } + } + if len(this.Field14) != len(that1.Field14) { + if len(this.Field14) < len(that1.Field14) { + return -1 + } + return 1 + } + for i := range this.Field14 { + if this.Field14[i] != that1.Field14[i] { + if this.Field14[i] < that1.Field14[i] { + return -1 + } + return 1 + } + } + if len(this.Field15) != len(that1.Field15) { + if len(this.Field15) < len(that1.Field15) { + return -1 + } + return 1 + } + for i := range this.Field15 { + if c := bytes.Compare(this.Field15[i], that1.Field15[i]); c != 0 { + return c + } + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NinRepNative) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NinRepNative) + if !ok { + that2, ok := that.(NinRepNative) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if len(this.Field1) != len(that1.Field1) { + if len(this.Field1) < len(that1.Field1) { + return -1 + } + return 1 + } + for i := range this.Field1 { + if this.Field1[i] != that1.Field1[i] { + if this.Field1[i] < that1.Field1[i] { + return -1 + } + return 1 + } + } + if len(this.Field2) != len(that1.Field2) { + if len(this.Field2) < len(that1.Field2) { + return -1 + } + return 1 + } + for i := range this.Field2 { + if this.Field2[i] != that1.Field2[i] { + if this.Field2[i] < that1.Field2[i] { + return -1 + } + return 1 + } + } + if len(this.Field3) != len(that1.Field3) { + if len(this.Field3) < len(that1.Field3) { + return -1 + } + return 1 + } + for i := range this.Field3 { + if this.Field3[i] != that1.Field3[i] { + if this.Field3[i] < that1.Field3[i] { + return -1 + } + return 1 + } + } + if len(this.Field4) != len(that1.Field4) { + if len(this.Field4) < len(that1.Field4) { + return -1 + } + return 1 + } + for i := range this.Field4 { + if this.Field4[i] != that1.Field4[i] { + if this.Field4[i] < that1.Field4[i] { + return -1 + } + return 1 + } + } + if len(this.Field5) != len(that1.Field5) { + if len(this.Field5) < len(that1.Field5) { + return -1 + } + return 1 + } + for i := range this.Field5 { + if this.Field5[i] != that1.Field5[i] { + if this.Field5[i] < that1.Field5[i] { + return -1 + } + return 1 + } + } + if len(this.Field6) != len(that1.Field6) { + if len(this.Field6) < len(that1.Field6) { + return -1 + } + return 1 + } + for i := range this.Field6 { + if this.Field6[i] != that1.Field6[i] { + if this.Field6[i] < that1.Field6[i] { + return -1 + } + return 1 + } + } + if len(this.Field7) != len(that1.Field7) { + if len(this.Field7) < len(that1.Field7) { + return -1 + } + return 1 + } + for i := range this.Field7 { + if this.Field7[i] != that1.Field7[i] { + if this.Field7[i] < that1.Field7[i] { + return -1 + } + return 1 + } + } + if len(this.Field8) != len(that1.Field8) { + if len(this.Field8) < len(that1.Field8) { + return -1 + } + return 1 + } + for i := range this.Field8 { + if this.Field8[i] != that1.Field8[i] { + if this.Field8[i] < that1.Field8[i] { + return -1 + } + return 1 + } + } + if len(this.Field9) != len(that1.Field9) { + if len(this.Field9) < len(that1.Field9) { + return -1 + } + return 1 + } + for i := range this.Field9 { + if this.Field9[i] != that1.Field9[i] { + if this.Field9[i] < that1.Field9[i] { + return -1 + } + return 1 + } + } + if len(this.Field10) != len(that1.Field10) { + if len(this.Field10) < len(that1.Field10) { + return -1 + } + return 1 + } + for i := range this.Field10 { + if this.Field10[i] != that1.Field10[i] { + if this.Field10[i] < that1.Field10[i] { + return -1 + } + return 1 + } + } + if len(this.Field11) != len(that1.Field11) { + if len(this.Field11) < len(that1.Field11) { + return -1 + } + return 1 + } + for i := range this.Field11 { + if this.Field11[i] != that1.Field11[i] { + if this.Field11[i] < that1.Field11[i] { + return -1 + } + return 1 + } + } + if len(this.Field12) != len(that1.Field12) { + if len(this.Field12) < len(that1.Field12) { + return -1 + } + return 1 + } + for i := range this.Field12 { + if this.Field12[i] != that1.Field12[i] { + if this.Field12[i] < that1.Field12[i] { + return -1 + } + return 1 + } + } + if len(this.Field13) != len(that1.Field13) { + if len(this.Field13) < len(that1.Field13) { + return -1 + } + return 1 + } + for i := range this.Field13 { + if this.Field13[i] != that1.Field13[i] { + if !this.Field13[i] { + return -1 + } + return 1 + } + } + if len(this.Field14) != len(that1.Field14) { + if len(this.Field14) < len(that1.Field14) { + return -1 + } + return 1 + } + for i := range this.Field14 { + if this.Field14[i] != that1.Field14[i] { + if this.Field14[i] < that1.Field14[i] { + return -1 + } + return 1 + } + } + if len(this.Field15) != len(that1.Field15) { + if len(this.Field15) < len(that1.Field15) { + return -1 + } + return 1 + } + for i := range this.Field15 { + if c := bytes.Compare(this.Field15[i], that1.Field15[i]); c != 0 { + return c + } + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NidRepPackedNative) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NidRepPackedNative) + if !ok { + that2, ok := that.(NidRepPackedNative) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if len(this.Field1) != len(that1.Field1) { + if len(this.Field1) < len(that1.Field1) { + return -1 + } + return 1 + } + for i := range this.Field1 { + if this.Field1[i] != that1.Field1[i] { + if this.Field1[i] < that1.Field1[i] { + return -1 + } + return 1 + } + } + if len(this.Field2) != len(that1.Field2) { + if len(this.Field2) < len(that1.Field2) { + return -1 + } + return 1 + } + for i := range this.Field2 { + if this.Field2[i] != that1.Field2[i] { + if this.Field2[i] < that1.Field2[i] { + return -1 + } + return 1 + } + } + if len(this.Field3) != len(that1.Field3) { + if len(this.Field3) < len(that1.Field3) { + return -1 + } + return 1 + } + for i := range this.Field3 { + if this.Field3[i] != that1.Field3[i] { + if this.Field3[i] < that1.Field3[i] { + return -1 + } + return 1 + } + } + if len(this.Field4) != len(that1.Field4) { + if len(this.Field4) < len(that1.Field4) { + return -1 + } + return 1 + } + for i := range this.Field4 { + if this.Field4[i] != that1.Field4[i] { + if this.Field4[i] < that1.Field4[i] { + return -1 + } + return 1 + } + } + if len(this.Field5) != len(that1.Field5) { + if len(this.Field5) < len(that1.Field5) { + return -1 + } + return 1 + } + for i := range this.Field5 { + if this.Field5[i] != that1.Field5[i] { + if this.Field5[i] < that1.Field5[i] { + return -1 + } + return 1 + } + } + if len(this.Field6) != len(that1.Field6) { + if len(this.Field6) < len(that1.Field6) { + return -1 + } + return 1 + } + for i := range this.Field6 { + if this.Field6[i] != that1.Field6[i] { + if this.Field6[i] < that1.Field6[i] { + return -1 + } + return 1 + } + } + if len(this.Field7) != len(that1.Field7) { + if len(this.Field7) < len(that1.Field7) { + return -1 + } + return 1 + } + for i := range this.Field7 { + if this.Field7[i] != that1.Field7[i] { + if this.Field7[i] < that1.Field7[i] { + return -1 + } + return 1 + } + } + if len(this.Field8) != len(that1.Field8) { + if len(this.Field8) < len(that1.Field8) { + return -1 + } + return 1 + } + for i := range this.Field8 { + if this.Field8[i] != that1.Field8[i] { + if this.Field8[i] < that1.Field8[i] { + return -1 + } + return 1 + } + } + if len(this.Field9) != len(that1.Field9) { + if len(this.Field9) < len(that1.Field9) { + return -1 + } + return 1 + } + for i := range this.Field9 { + if this.Field9[i] != that1.Field9[i] { + if this.Field9[i] < that1.Field9[i] { + return -1 + } + return 1 + } + } + if len(this.Field10) != len(that1.Field10) { + if len(this.Field10) < len(that1.Field10) { + return -1 + } + return 1 + } + for i := range this.Field10 { + if this.Field10[i] != that1.Field10[i] { + if this.Field10[i] < that1.Field10[i] { + return -1 + } + return 1 + } + } + if len(this.Field11) != len(that1.Field11) { + if len(this.Field11) < len(that1.Field11) { + return -1 + } + return 1 + } + for i := range this.Field11 { + if this.Field11[i] != that1.Field11[i] { + if this.Field11[i] < that1.Field11[i] { + return -1 + } + return 1 + } + } + if len(this.Field12) != len(that1.Field12) { + if len(this.Field12) < len(that1.Field12) { + return -1 + } + return 1 + } + for i := range this.Field12 { + if this.Field12[i] != that1.Field12[i] { + if this.Field12[i] < that1.Field12[i] { + return -1 + } + return 1 + } + } + if len(this.Field13) != len(that1.Field13) { + if len(this.Field13) < len(that1.Field13) { + return -1 + } + return 1 + } + for i := range this.Field13 { + if this.Field13[i] != that1.Field13[i] { + if !this.Field13[i] { + return -1 + } + return 1 + } + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NinRepPackedNative) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NinRepPackedNative) + if !ok { + that2, ok := that.(NinRepPackedNative) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if len(this.Field1) != len(that1.Field1) { + if len(this.Field1) < len(that1.Field1) { + return -1 + } + return 1 + } + for i := range this.Field1 { + if this.Field1[i] != that1.Field1[i] { + if this.Field1[i] < that1.Field1[i] { + return -1 + } + return 1 + } + } + if len(this.Field2) != len(that1.Field2) { + if len(this.Field2) < len(that1.Field2) { + return -1 + } + return 1 + } + for i := range this.Field2 { + if this.Field2[i] != that1.Field2[i] { + if this.Field2[i] < that1.Field2[i] { + return -1 + } + return 1 + } + } + if len(this.Field3) != len(that1.Field3) { + if len(this.Field3) < len(that1.Field3) { + return -1 + } + return 1 + } + for i := range this.Field3 { + if this.Field3[i] != that1.Field3[i] { + if this.Field3[i] < that1.Field3[i] { + return -1 + } + return 1 + } + } + if len(this.Field4) != len(that1.Field4) { + if len(this.Field4) < len(that1.Field4) { + return -1 + } + return 1 + } + for i := range this.Field4 { + if this.Field4[i] != that1.Field4[i] { + if this.Field4[i] < that1.Field4[i] { + return -1 + } + return 1 + } + } + if len(this.Field5) != len(that1.Field5) { + if len(this.Field5) < len(that1.Field5) { + return -1 + } + return 1 + } + for i := range this.Field5 { + if this.Field5[i] != that1.Field5[i] { + if this.Field5[i] < that1.Field5[i] { + return -1 + } + return 1 + } + } + if len(this.Field6) != len(that1.Field6) { + if len(this.Field6) < len(that1.Field6) { + return -1 + } + return 1 + } + for i := range this.Field6 { + if this.Field6[i] != that1.Field6[i] { + if this.Field6[i] < that1.Field6[i] { + return -1 + } + return 1 + } + } + if len(this.Field7) != len(that1.Field7) { + if len(this.Field7) < len(that1.Field7) { + return -1 + } + return 1 + } + for i := range this.Field7 { + if this.Field7[i] != that1.Field7[i] { + if this.Field7[i] < that1.Field7[i] { + return -1 + } + return 1 + } + } + if len(this.Field8) != len(that1.Field8) { + if len(this.Field8) < len(that1.Field8) { + return -1 + } + return 1 + } + for i := range this.Field8 { + if this.Field8[i] != that1.Field8[i] { + if this.Field8[i] < that1.Field8[i] { + return -1 + } + return 1 + } + } + if len(this.Field9) != len(that1.Field9) { + if len(this.Field9) < len(that1.Field9) { + return -1 + } + return 1 + } + for i := range this.Field9 { + if this.Field9[i] != that1.Field9[i] { + if this.Field9[i] < that1.Field9[i] { + return -1 + } + return 1 + } + } + if len(this.Field10) != len(that1.Field10) { + if len(this.Field10) < len(that1.Field10) { + return -1 + } + return 1 + } + for i := range this.Field10 { + if this.Field10[i] != that1.Field10[i] { + if this.Field10[i] < that1.Field10[i] { + return -1 + } + return 1 + } + } + if len(this.Field11) != len(that1.Field11) { + if len(this.Field11) < len(that1.Field11) { + return -1 + } + return 1 + } + for i := range this.Field11 { + if this.Field11[i] != that1.Field11[i] { + if this.Field11[i] < that1.Field11[i] { + return -1 + } + return 1 + } + } + if len(this.Field12) != len(that1.Field12) { + if len(this.Field12) < len(that1.Field12) { + return -1 + } + return 1 + } + for i := range this.Field12 { + if this.Field12[i] != that1.Field12[i] { + if this.Field12[i] < that1.Field12[i] { + return -1 + } + return 1 + } + } + if len(this.Field13) != len(that1.Field13) { + if len(this.Field13) < len(that1.Field13) { + return -1 + } + return 1 + } + for i := range this.Field13 { + if this.Field13[i] != that1.Field13[i] { + if !this.Field13[i] { + return -1 + } + return 1 + } + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NidOptStruct) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NidOptStruct) + if !ok { + that2, ok := that.(NidOptStruct) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.Field1 != that1.Field1 { + if this.Field1 < that1.Field1 { + return -1 + } + return 1 + } + if this.Field2 != that1.Field2 { + if this.Field2 < that1.Field2 { + return -1 + } + return 1 + } + if c := this.Field3.Compare(&that1.Field3); c != 0 { + return c + } + if c := this.Field4.Compare(&that1.Field4); c != 0 { + return c + } + if this.Field6 != that1.Field6 { + if this.Field6 < that1.Field6 { + return -1 + } + return 1 + } + if this.Field7 != that1.Field7 { + if this.Field7 < that1.Field7 { + return -1 + } + return 1 + } + if c := this.Field8.Compare(&that1.Field8); c != 0 { + return c + } + if this.Field13 != that1.Field13 { + if !this.Field13 { + return -1 + } + return 1 + } + if this.Field14 != that1.Field14 { + if this.Field14 < that1.Field14 { + return -1 + } + return 1 + } + if c := bytes.Compare(this.Field15, that1.Field15); c != 0 { + return c + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NinOptStruct) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NinOptStruct) + if !ok { + that2, ok := that.(NinOptStruct) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + if *this.Field1 < *that1.Field1 { + return -1 + } + return 1 + } + } else if this.Field1 != nil { + return 1 + } else if that1.Field1 != nil { + return -1 + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + if *this.Field2 < *that1.Field2 { + return -1 + } + return 1 + } + } else if this.Field2 != nil { + return 1 + } else if that1.Field2 != nil { + return -1 + } + if c := this.Field3.Compare(that1.Field3); c != 0 { + return c + } + if c := this.Field4.Compare(that1.Field4); c != 0 { + return c + } + if this.Field6 != nil && that1.Field6 != nil { + if *this.Field6 != *that1.Field6 { + if *this.Field6 < *that1.Field6 { + return -1 + } + return 1 + } + } else if this.Field6 != nil { + return 1 + } else if that1.Field6 != nil { + return -1 + } + if this.Field7 != nil && that1.Field7 != nil { + if *this.Field7 != *that1.Field7 { + if *this.Field7 < *that1.Field7 { + return -1 + } + return 1 + } + } else if this.Field7 != nil { + return 1 + } else if that1.Field7 != nil { + return -1 + } + if c := this.Field8.Compare(that1.Field8); c != 0 { + return c + } + if this.Field13 != nil && that1.Field13 != nil { + if *this.Field13 != *that1.Field13 { + if !*this.Field13 { + return -1 + } + return 1 + } + } else if this.Field13 != nil { + return 1 + } else if that1.Field13 != nil { + return -1 + } + if this.Field14 != nil && that1.Field14 != nil { + if *this.Field14 != *that1.Field14 { + if *this.Field14 < *that1.Field14 { + return -1 + } + return 1 + } + } else if this.Field14 != nil { + return 1 + } else if that1.Field14 != nil { + return -1 + } + if c := bytes.Compare(this.Field15, that1.Field15); c != 0 { + return c + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NidRepStruct) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NidRepStruct) + if !ok { + that2, ok := that.(NidRepStruct) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if len(this.Field1) != len(that1.Field1) { + if len(this.Field1) < len(that1.Field1) { + return -1 + } + return 1 + } + for i := range this.Field1 { + if this.Field1[i] != that1.Field1[i] { + if this.Field1[i] < that1.Field1[i] { + return -1 + } + return 1 + } + } + if len(this.Field2) != len(that1.Field2) { + if len(this.Field2) < len(that1.Field2) { + return -1 + } + return 1 + } + for i := range this.Field2 { + if this.Field2[i] != that1.Field2[i] { + if this.Field2[i] < that1.Field2[i] { + return -1 + } + return 1 + } + } + if len(this.Field3) != len(that1.Field3) { + if len(this.Field3) < len(that1.Field3) { + return -1 + } + return 1 + } + for i := range this.Field3 { + if c := this.Field3[i].Compare(&that1.Field3[i]); c != 0 { + return c + } + } + if len(this.Field4) != len(that1.Field4) { + if len(this.Field4) < len(that1.Field4) { + return -1 + } + return 1 + } + for i := range this.Field4 { + if c := this.Field4[i].Compare(&that1.Field4[i]); c != 0 { + return c + } + } + if len(this.Field6) != len(that1.Field6) { + if len(this.Field6) < len(that1.Field6) { + return -1 + } + return 1 + } + for i := range this.Field6 { + if this.Field6[i] != that1.Field6[i] { + if this.Field6[i] < that1.Field6[i] { + return -1 + } + return 1 + } + } + if len(this.Field7) != len(that1.Field7) { + if len(this.Field7) < len(that1.Field7) { + return -1 + } + return 1 + } + for i := range this.Field7 { + if this.Field7[i] != that1.Field7[i] { + if this.Field7[i] < that1.Field7[i] { + return -1 + } + return 1 + } + } + if len(this.Field8) != len(that1.Field8) { + if len(this.Field8) < len(that1.Field8) { + return -1 + } + return 1 + } + for i := range this.Field8 { + if c := this.Field8[i].Compare(&that1.Field8[i]); c != 0 { + return c + } + } + if len(this.Field13) != len(that1.Field13) { + if len(this.Field13) < len(that1.Field13) { + return -1 + } + return 1 + } + for i := range this.Field13 { + if this.Field13[i] != that1.Field13[i] { + if !this.Field13[i] { + return -1 + } + return 1 + } + } + if len(this.Field14) != len(that1.Field14) { + if len(this.Field14) < len(that1.Field14) { + return -1 + } + return 1 + } + for i := range this.Field14 { + if this.Field14[i] != that1.Field14[i] { + if this.Field14[i] < that1.Field14[i] { + return -1 + } + return 1 + } + } + if len(this.Field15) != len(that1.Field15) { + if len(this.Field15) < len(that1.Field15) { + return -1 + } + return 1 + } + for i := range this.Field15 { + if c := bytes.Compare(this.Field15[i], that1.Field15[i]); c != 0 { + return c + } + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NinRepStruct) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NinRepStruct) + if !ok { + that2, ok := that.(NinRepStruct) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if len(this.Field1) != len(that1.Field1) { + if len(this.Field1) < len(that1.Field1) { + return -1 + } + return 1 + } + for i := range this.Field1 { + if this.Field1[i] != that1.Field1[i] { + if this.Field1[i] < that1.Field1[i] { + return -1 + } + return 1 + } + } + if len(this.Field2) != len(that1.Field2) { + if len(this.Field2) < len(that1.Field2) { + return -1 + } + return 1 + } + for i := range this.Field2 { + if this.Field2[i] != that1.Field2[i] { + if this.Field2[i] < that1.Field2[i] { + return -1 + } + return 1 + } + } + if len(this.Field3) != len(that1.Field3) { + if len(this.Field3) < len(that1.Field3) { + return -1 + } + return 1 + } + for i := range this.Field3 { + if c := this.Field3[i].Compare(that1.Field3[i]); c != 0 { + return c + } + } + if len(this.Field4) != len(that1.Field4) { + if len(this.Field4) < len(that1.Field4) { + return -1 + } + return 1 + } + for i := range this.Field4 { + if c := this.Field4[i].Compare(that1.Field4[i]); c != 0 { + return c + } + } + if len(this.Field6) != len(that1.Field6) { + if len(this.Field6) < len(that1.Field6) { + return -1 + } + return 1 + } + for i := range this.Field6 { + if this.Field6[i] != that1.Field6[i] { + if this.Field6[i] < that1.Field6[i] { + return -1 + } + return 1 + } + } + if len(this.Field7) != len(that1.Field7) { + if len(this.Field7) < len(that1.Field7) { + return -1 + } + return 1 + } + for i := range this.Field7 { + if this.Field7[i] != that1.Field7[i] { + if this.Field7[i] < that1.Field7[i] { + return -1 + } + return 1 + } + } + if len(this.Field8) != len(that1.Field8) { + if len(this.Field8) < len(that1.Field8) { + return -1 + } + return 1 + } + for i := range this.Field8 { + if c := this.Field8[i].Compare(that1.Field8[i]); c != 0 { + return c + } + } + if len(this.Field13) != len(that1.Field13) { + if len(this.Field13) < len(that1.Field13) { + return -1 + } + return 1 + } + for i := range this.Field13 { + if this.Field13[i] != that1.Field13[i] { + if !this.Field13[i] { + return -1 + } + return 1 + } + } + if len(this.Field14) != len(that1.Field14) { + if len(this.Field14) < len(that1.Field14) { + return -1 + } + return 1 + } + for i := range this.Field14 { + if this.Field14[i] != that1.Field14[i] { + if this.Field14[i] < that1.Field14[i] { + return -1 + } + return 1 + } + } + if len(this.Field15) != len(that1.Field15) { + if len(this.Field15) < len(that1.Field15) { + return -1 + } + return 1 + } + for i := range this.Field15 { + if c := bytes.Compare(this.Field15[i], that1.Field15[i]); c != 0 { + return c + } + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NidEmbeddedStruct) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NidEmbeddedStruct) + if !ok { + that2, ok := that.(NidEmbeddedStruct) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if c := this.NidOptNative.Compare(that1.NidOptNative); c != 0 { + return c + } + if c := this.Field200.Compare(&that1.Field200); c != 0 { + return c + } + if this.Field210 != that1.Field210 { + if !this.Field210 { + return -1 + } + return 1 + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NinEmbeddedStruct) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NinEmbeddedStruct) + if !ok { + that2, ok := that.(NinEmbeddedStruct) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if c := this.NidOptNative.Compare(that1.NidOptNative); c != 0 { + return c + } + if c := this.Field200.Compare(that1.Field200); c != 0 { + return c + } + if this.Field210 != nil && that1.Field210 != nil { + if *this.Field210 != *that1.Field210 { + if !*this.Field210 { + return -1 + } + return 1 + } + } else if this.Field210 != nil { + return 1 + } else if that1.Field210 != nil { + return -1 + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NidNestedStruct) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NidNestedStruct) + if !ok { + that2, ok := that.(NidNestedStruct) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if c := this.Field1.Compare(&that1.Field1); c != 0 { + return c + } + if len(this.Field2) != len(that1.Field2) { + if len(this.Field2) < len(that1.Field2) { + return -1 + } + return 1 + } + for i := range this.Field2 { + if c := this.Field2[i].Compare(&that1.Field2[i]); c != 0 { + return c + } + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NinNestedStruct) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NinNestedStruct) + if !ok { + that2, ok := that.(NinNestedStruct) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if c := this.Field1.Compare(that1.Field1); c != 0 { + return c + } + if len(this.Field2) != len(that1.Field2) { + if len(this.Field2) < len(that1.Field2) { + return -1 + } + return 1 + } + for i := range this.Field2 { + if c := this.Field2[i].Compare(that1.Field2[i]); c != 0 { + return c + } + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NidOptCustom) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NidOptCustom) + if !ok { + that2, ok := that.(NidOptCustom) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if c := this.Id.Compare(that1.Id); c != 0 { + return c + } + if c := this.Value.Compare(that1.Value); c != 0 { + return c + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *CustomDash) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*CustomDash) + if !ok { + that2, ok := that.(CustomDash) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if that1.Value == nil { + if this.Value != nil { + return 1 + } + } else if this.Value == nil { + return -1 + } else if c := this.Value.Compare(*that1.Value); c != 0 { + return c + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NinOptCustom) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NinOptCustom) + if !ok { + that2, ok := that.(NinOptCustom) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if that1.Id == nil { + if this.Id != nil { + return 1 + } + } else if this.Id == nil { + return -1 + } else if c := this.Id.Compare(*that1.Id); c != 0 { + return c + } + if that1.Value == nil { + if this.Value != nil { + return 1 + } + } else if this.Value == nil { + return -1 + } else if c := this.Value.Compare(*that1.Value); c != 0 { + return c + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NidRepCustom) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NidRepCustom) + if !ok { + that2, ok := that.(NidRepCustom) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if len(this.Id) != len(that1.Id) { + if len(this.Id) < len(that1.Id) { + return -1 + } + return 1 + } + for i := range this.Id { + if c := this.Id[i].Compare(that1.Id[i]); c != 0 { + return c + } + } + if len(this.Value) != len(that1.Value) { + if len(this.Value) < len(that1.Value) { + return -1 + } + return 1 + } + for i := range this.Value { + if c := this.Value[i].Compare(that1.Value[i]); c != 0 { + return c + } + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NinRepCustom) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NinRepCustom) + if !ok { + that2, ok := that.(NinRepCustom) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if len(this.Id) != len(that1.Id) { + if len(this.Id) < len(that1.Id) { + return -1 + } + return 1 + } + for i := range this.Id { + if c := this.Id[i].Compare(that1.Id[i]); c != 0 { + return c + } + } + if len(this.Value) != len(that1.Value) { + if len(this.Value) < len(that1.Value) { + return -1 + } + return 1 + } + for i := range this.Value { + if c := this.Value[i].Compare(that1.Value[i]); c != 0 { + return c + } + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NinOptNativeUnion) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NinOptNativeUnion) + if !ok { + that2, ok := that.(NinOptNativeUnion) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + if *this.Field1 < *that1.Field1 { + return -1 + } + return 1 + } + } else if this.Field1 != nil { + return 1 + } else if that1.Field1 != nil { + return -1 + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + if *this.Field2 < *that1.Field2 { + return -1 + } + return 1 + } + } else if this.Field2 != nil { + return 1 + } else if that1.Field2 != nil { + return -1 + } + if this.Field3 != nil && that1.Field3 != nil { + if *this.Field3 != *that1.Field3 { + if *this.Field3 < *that1.Field3 { + return -1 + } + return 1 + } + } else if this.Field3 != nil { + return 1 + } else if that1.Field3 != nil { + return -1 + } + if this.Field4 != nil && that1.Field4 != nil { + if *this.Field4 != *that1.Field4 { + if *this.Field4 < *that1.Field4 { + return -1 + } + return 1 + } + } else if this.Field4 != nil { + return 1 + } else if that1.Field4 != nil { + return -1 + } + if this.Field5 != nil && that1.Field5 != nil { + if *this.Field5 != *that1.Field5 { + if *this.Field5 < *that1.Field5 { + return -1 + } + return 1 + } + } else if this.Field5 != nil { + return 1 + } else if that1.Field5 != nil { + return -1 + } + if this.Field6 != nil && that1.Field6 != nil { + if *this.Field6 != *that1.Field6 { + if *this.Field6 < *that1.Field6 { + return -1 + } + return 1 + } + } else if this.Field6 != nil { + return 1 + } else if that1.Field6 != nil { + return -1 + } + if this.Field13 != nil && that1.Field13 != nil { + if *this.Field13 != *that1.Field13 { + if !*this.Field13 { + return -1 + } + return 1 + } + } else if this.Field13 != nil { + return 1 + } else if that1.Field13 != nil { + return -1 + } + if this.Field14 != nil && that1.Field14 != nil { + if *this.Field14 != *that1.Field14 { + if *this.Field14 < *that1.Field14 { + return -1 + } + return 1 + } + } else if this.Field14 != nil { + return 1 + } else if that1.Field14 != nil { + return -1 + } + if c := bytes.Compare(this.Field15, that1.Field15); c != 0 { + return c + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NinOptStructUnion) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NinOptStructUnion) + if !ok { + that2, ok := that.(NinOptStructUnion) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + if *this.Field1 < *that1.Field1 { + return -1 + } + return 1 + } + } else if this.Field1 != nil { + return 1 + } else if that1.Field1 != nil { + return -1 + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + if *this.Field2 < *that1.Field2 { + return -1 + } + return 1 + } + } else if this.Field2 != nil { + return 1 + } else if that1.Field2 != nil { + return -1 + } + if c := this.Field3.Compare(that1.Field3); c != 0 { + return c + } + if c := this.Field4.Compare(that1.Field4); c != 0 { + return c + } + if this.Field6 != nil && that1.Field6 != nil { + if *this.Field6 != *that1.Field6 { + if *this.Field6 < *that1.Field6 { + return -1 + } + return 1 + } + } else if this.Field6 != nil { + return 1 + } else if that1.Field6 != nil { + return -1 + } + if this.Field7 != nil && that1.Field7 != nil { + if *this.Field7 != *that1.Field7 { + if *this.Field7 < *that1.Field7 { + return -1 + } + return 1 + } + } else if this.Field7 != nil { + return 1 + } else if that1.Field7 != nil { + return -1 + } + if this.Field13 != nil && that1.Field13 != nil { + if *this.Field13 != *that1.Field13 { + if !*this.Field13 { + return -1 + } + return 1 + } + } else if this.Field13 != nil { + return 1 + } else if that1.Field13 != nil { + return -1 + } + if this.Field14 != nil && that1.Field14 != nil { + if *this.Field14 != *that1.Field14 { + if *this.Field14 < *that1.Field14 { + return -1 + } + return 1 + } + } else if this.Field14 != nil { + return 1 + } else if that1.Field14 != nil { + return -1 + } + if c := bytes.Compare(this.Field15, that1.Field15); c != 0 { + return c + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NinEmbeddedStructUnion) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NinEmbeddedStructUnion) + if !ok { + that2, ok := that.(NinEmbeddedStructUnion) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if c := this.NidOptNative.Compare(that1.NidOptNative); c != 0 { + return c + } + if c := this.Field200.Compare(that1.Field200); c != 0 { + return c + } + if this.Field210 != nil && that1.Field210 != nil { + if *this.Field210 != *that1.Field210 { + if !*this.Field210 { + return -1 + } + return 1 + } + } else if this.Field210 != nil { + return 1 + } else if that1.Field210 != nil { + return -1 + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NinNestedStructUnion) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NinNestedStructUnion) + if !ok { + that2, ok := that.(NinNestedStructUnion) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if c := this.Field1.Compare(that1.Field1); c != 0 { + return c + } + if c := this.Field2.Compare(that1.Field2); c != 0 { + return c + } + if c := this.Field3.Compare(that1.Field3); c != 0 { + return c + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *Tree) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*Tree) + if !ok { + that2, ok := that.(Tree) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if c := this.Or.Compare(that1.Or); c != 0 { + return c + } + if c := this.And.Compare(that1.And); c != 0 { + return c + } + if c := this.Leaf.Compare(that1.Leaf); c != 0 { + return c + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *OrBranch) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*OrBranch) + if !ok { + that2, ok := that.(OrBranch) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if c := this.Left.Compare(&that1.Left); c != 0 { + return c + } + if c := this.Right.Compare(&that1.Right); c != 0 { + return c + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *AndBranch) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*AndBranch) + if !ok { + that2, ok := that.(AndBranch) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if c := this.Left.Compare(&that1.Left); c != 0 { + return c + } + if c := this.Right.Compare(&that1.Right); c != 0 { + return c + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *Leaf) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*Leaf) + if !ok { + that2, ok := that.(Leaf) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.Value != that1.Value { + if this.Value < that1.Value { + return -1 + } + return 1 + } + if this.StrValue != that1.StrValue { + if this.StrValue < that1.StrValue { + return -1 + } + return 1 + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *DeepTree) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*DeepTree) + if !ok { + that2, ok := that.(DeepTree) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if c := this.Down.Compare(that1.Down); c != 0 { + return c + } + if c := this.And.Compare(that1.And); c != 0 { + return c + } + if c := this.Leaf.Compare(that1.Leaf); c != 0 { + return c + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *ADeepBranch) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*ADeepBranch) + if !ok { + that2, ok := that.(ADeepBranch) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if c := this.Down.Compare(&that1.Down); c != 0 { + return c + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *AndDeepBranch) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*AndDeepBranch) + if !ok { + that2, ok := that.(AndDeepBranch) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if c := this.Left.Compare(&that1.Left); c != 0 { + return c + } + if c := this.Right.Compare(&that1.Right); c != 0 { + return c + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *DeepLeaf) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*DeepLeaf) + if !ok { + that2, ok := that.(DeepLeaf) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if c := this.Tree.Compare(&that1.Tree); c != 0 { + return c + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *Nil) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*Nil) + if !ok { + that2, ok := that.(Nil) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NidOptEnum) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NidOptEnum) + if !ok { + that2, ok := that.(NidOptEnum) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.Field1 != that1.Field1 { + if this.Field1 < that1.Field1 { + return -1 + } + return 1 + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NinOptEnum) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NinOptEnum) + if !ok { + that2, ok := that.(NinOptEnum) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + if *this.Field1 < *that1.Field1 { + return -1 + } + return 1 + } + } else if this.Field1 != nil { + return 1 + } else if that1.Field1 != nil { + return -1 + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + if *this.Field2 < *that1.Field2 { + return -1 + } + return 1 + } + } else if this.Field2 != nil { + return 1 + } else if that1.Field2 != nil { + return -1 + } + if this.Field3 != nil && that1.Field3 != nil { + if *this.Field3 != *that1.Field3 { + if *this.Field3 < *that1.Field3 { + return -1 + } + return 1 + } + } else if this.Field3 != nil { + return 1 + } else if that1.Field3 != nil { + return -1 + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NidRepEnum) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NidRepEnum) + if !ok { + that2, ok := that.(NidRepEnum) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if len(this.Field1) != len(that1.Field1) { + if len(this.Field1) < len(that1.Field1) { + return -1 + } + return 1 + } + for i := range this.Field1 { + if this.Field1[i] != that1.Field1[i] { + if this.Field1[i] < that1.Field1[i] { + return -1 + } + return 1 + } + } + if len(this.Field2) != len(that1.Field2) { + if len(this.Field2) < len(that1.Field2) { + return -1 + } + return 1 + } + for i := range this.Field2 { + if this.Field2[i] != that1.Field2[i] { + if this.Field2[i] < that1.Field2[i] { + return -1 + } + return 1 + } + } + if len(this.Field3) != len(that1.Field3) { + if len(this.Field3) < len(that1.Field3) { + return -1 + } + return 1 + } + for i := range this.Field3 { + if this.Field3[i] != that1.Field3[i] { + if this.Field3[i] < that1.Field3[i] { + return -1 + } + return 1 + } + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NinRepEnum) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NinRepEnum) + if !ok { + that2, ok := that.(NinRepEnum) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if len(this.Field1) != len(that1.Field1) { + if len(this.Field1) < len(that1.Field1) { + return -1 + } + return 1 + } + for i := range this.Field1 { + if this.Field1[i] != that1.Field1[i] { + if this.Field1[i] < that1.Field1[i] { + return -1 + } + return 1 + } + } + if len(this.Field2) != len(that1.Field2) { + if len(this.Field2) < len(that1.Field2) { + return -1 + } + return 1 + } + for i := range this.Field2 { + if this.Field2[i] != that1.Field2[i] { + if this.Field2[i] < that1.Field2[i] { + return -1 + } + return 1 + } + } + if len(this.Field3) != len(that1.Field3) { + if len(this.Field3) < len(that1.Field3) { + return -1 + } + return 1 + } + for i := range this.Field3 { + if this.Field3[i] != that1.Field3[i] { + if this.Field3[i] < that1.Field3[i] { + return -1 + } + return 1 + } + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NinOptEnumDefault) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NinOptEnumDefault) + if !ok { + that2, ok := that.(NinOptEnumDefault) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + if *this.Field1 < *that1.Field1 { + return -1 + } + return 1 + } + } else if this.Field1 != nil { + return 1 + } else if that1.Field1 != nil { + return -1 + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + if *this.Field2 < *that1.Field2 { + return -1 + } + return 1 + } + } else if this.Field2 != nil { + return 1 + } else if that1.Field2 != nil { + return -1 + } + if this.Field3 != nil && that1.Field3 != nil { + if *this.Field3 != *that1.Field3 { + if *this.Field3 < *that1.Field3 { + return -1 + } + return 1 + } + } else if this.Field3 != nil { + return 1 + } else if that1.Field3 != nil { + return -1 + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *AnotherNinOptEnum) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*AnotherNinOptEnum) + if !ok { + that2, ok := that.(AnotherNinOptEnum) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + if *this.Field1 < *that1.Field1 { + return -1 + } + return 1 + } + } else if this.Field1 != nil { + return 1 + } else if that1.Field1 != nil { + return -1 + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + if *this.Field2 < *that1.Field2 { + return -1 + } + return 1 + } + } else if this.Field2 != nil { + return 1 + } else if that1.Field2 != nil { + return -1 + } + if this.Field3 != nil && that1.Field3 != nil { + if *this.Field3 != *that1.Field3 { + if *this.Field3 < *that1.Field3 { + return -1 + } + return 1 + } + } else if this.Field3 != nil { + return 1 + } else if that1.Field3 != nil { + return -1 + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *AnotherNinOptEnumDefault) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*AnotherNinOptEnumDefault) + if !ok { + that2, ok := that.(AnotherNinOptEnumDefault) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + if *this.Field1 < *that1.Field1 { + return -1 + } + return 1 + } + } else if this.Field1 != nil { + return 1 + } else if that1.Field1 != nil { + return -1 + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + if *this.Field2 < *that1.Field2 { + return -1 + } + return 1 + } + } else if this.Field2 != nil { + return 1 + } else if that1.Field2 != nil { + return -1 + } + if this.Field3 != nil && that1.Field3 != nil { + if *this.Field3 != *that1.Field3 { + if *this.Field3 < *that1.Field3 { + return -1 + } + return 1 + } + } else if this.Field3 != nil { + return 1 + } else if that1.Field3 != nil { + return -1 + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *Timer) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*Timer) + if !ok { + that2, ok := that.(Timer) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.Time1 != that1.Time1 { + if this.Time1 < that1.Time1 { + return -1 + } + return 1 + } + if this.Time2 != that1.Time2 { + if this.Time2 < that1.Time2 { + return -1 + } + return 1 + } + if c := bytes.Compare(this.Data, that1.Data); c != 0 { + return c + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *MyExtendable) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*MyExtendable) + if !ok { + that2, ok := that.(MyExtendable) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + if *this.Field1 < *that1.Field1 { + return -1 + } + return 1 + } + } else if this.Field1 != nil { + return 1 + } else if that1.Field1 != nil { + return -1 + } + extkeys := make([]int32, 0, len(this.XXX_extensions)+len(that1.XXX_extensions)) + for k := range this.XXX_extensions { + extkeys = append(extkeys, k) + } + for k := range that1.XXX_extensions { + if _, ok := this.XXX_extensions[k]; !ok { + extkeys = append(extkeys, k) + } + } + github_com_gogo_protobuf_sortkeys.Int32s(extkeys) + for _, k := range extkeys { + if v, ok := this.XXX_extensions[k]; ok { + if v2, ok := that1.XXX_extensions[k]; ok { + if c := v.Compare(&v2); c != 0 { + return c + } + } else { + return 1 + } + } else { + return -1 + } + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *OtherExtenable) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*OtherExtenable) + if !ok { + that2, ok := that.(OtherExtenable) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + if *this.Field2 < *that1.Field2 { + return -1 + } + return 1 + } + } else if this.Field2 != nil { + return 1 + } else if that1.Field2 != nil { + return -1 + } + if this.Field13 != nil && that1.Field13 != nil { + if *this.Field13 != *that1.Field13 { + if *this.Field13 < *that1.Field13 { + return -1 + } + return 1 + } + } else if this.Field13 != nil { + return 1 + } else if that1.Field13 != nil { + return -1 + } + if c := this.M.Compare(that1.M); c != 0 { + return c + } + extkeys := make([]int32, 0, len(this.XXX_extensions)+len(that1.XXX_extensions)) + for k := range this.XXX_extensions { + extkeys = append(extkeys, k) + } + for k := range that1.XXX_extensions { + if _, ok := this.XXX_extensions[k]; !ok { + extkeys = append(extkeys, k) + } + } + github_com_gogo_protobuf_sortkeys.Int32s(extkeys) + for _, k := range extkeys { + if v, ok := this.XXX_extensions[k]; ok { + if v2, ok := that1.XXX_extensions[k]; ok { + if c := v.Compare(&v2); c != 0 { + return c + } + } else { + return 1 + } + } else { + return -1 + } + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NestedDefinition) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NestedDefinition) + if !ok { + that2, ok := that.(NestedDefinition) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + if *this.Field1 < *that1.Field1 { + return -1 + } + return 1 + } + } else if this.Field1 != nil { + return 1 + } else if that1.Field1 != nil { + return -1 + } + if this.EnumField != nil && that1.EnumField != nil { + if *this.EnumField != *that1.EnumField { + if *this.EnumField < *that1.EnumField { + return -1 + } + return 1 + } + } else if this.EnumField != nil { + return 1 + } else if that1.EnumField != nil { + return -1 + } + if c := this.NNM.Compare(that1.NNM); c != 0 { + return c + } + if c := this.NM.Compare(that1.NM); c != 0 { + return c + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NestedDefinition_NestedMessage) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NestedDefinition_NestedMessage) + if !ok { + that2, ok := that.(NestedDefinition_NestedMessage) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.NestedField1 != nil && that1.NestedField1 != nil { + if *this.NestedField1 != *that1.NestedField1 { + if *this.NestedField1 < *that1.NestedField1 { + return -1 + } + return 1 + } + } else if this.NestedField1 != nil { + return 1 + } else if that1.NestedField1 != nil { + return -1 + } + if c := this.NNM.Compare(that1.NNM); c != 0 { + return c + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NestedDefinition_NestedMessage_NestedNestedMsg) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NestedDefinition_NestedMessage_NestedNestedMsg) + if !ok { + that2, ok := that.(NestedDefinition_NestedMessage_NestedNestedMsg) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.NestedNestedField1 != nil && that1.NestedNestedField1 != nil { + if *this.NestedNestedField1 != *that1.NestedNestedField1 { + if *this.NestedNestedField1 < *that1.NestedNestedField1 { + return -1 + } + return 1 + } + } else if this.NestedNestedField1 != nil { + return 1 + } else if that1.NestedNestedField1 != nil { + return -1 + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NestedScope) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NestedScope) + if !ok { + that2, ok := that.(NestedScope) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if c := this.A.Compare(that1.A); c != 0 { + return c + } + if this.B != nil && that1.B != nil { + if *this.B != *that1.B { + if *this.B < *that1.B { + return -1 + } + return 1 + } + } else if this.B != nil { + return 1 + } else if that1.B != nil { + return -1 + } + if c := this.C.Compare(that1.C); c != 0 { + return c + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NinOptNativeDefault) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NinOptNativeDefault) + if !ok { + that2, ok := that.(NinOptNativeDefault) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + if *this.Field1 < *that1.Field1 { + return -1 + } + return 1 + } + } else if this.Field1 != nil { + return 1 + } else if that1.Field1 != nil { + return -1 + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + if *this.Field2 < *that1.Field2 { + return -1 + } + return 1 + } + } else if this.Field2 != nil { + return 1 + } else if that1.Field2 != nil { + return -1 + } + if this.Field3 != nil && that1.Field3 != nil { + if *this.Field3 != *that1.Field3 { + if *this.Field3 < *that1.Field3 { + return -1 + } + return 1 + } + } else if this.Field3 != nil { + return 1 + } else if that1.Field3 != nil { + return -1 + } + if this.Field4 != nil && that1.Field4 != nil { + if *this.Field4 != *that1.Field4 { + if *this.Field4 < *that1.Field4 { + return -1 + } + return 1 + } + } else if this.Field4 != nil { + return 1 + } else if that1.Field4 != nil { + return -1 + } + if this.Field5 != nil && that1.Field5 != nil { + if *this.Field5 != *that1.Field5 { + if *this.Field5 < *that1.Field5 { + return -1 + } + return 1 + } + } else if this.Field5 != nil { + return 1 + } else if that1.Field5 != nil { + return -1 + } + if this.Field6 != nil && that1.Field6 != nil { + if *this.Field6 != *that1.Field6 { + if *this.Field6 < *that1.Field6 { + return -1 + } + return 1 + } + } else if this.Field6 != nil { + return 1 + } else if that1.Field6 != nil { + return -1 + } + if this.Field7 != nil && that1.Field7 != nil { + if *this.Field7 != *that1.Field7 { + if *this.Field7 < *that1.Field7 { + return -1 + } + return 1 + } + } else if this.Field7 != nil { + return 1 + } else if that1.Field7 != nil { + return -1 + } + if this.Field8 != nil && that1.Field8 != nil { + if *this.Field8 != *that1.Field8 { + if *this.Field8 < *that1.Field8 { + return -1 + } + return 1 + } + } else if this.Field8 != nil { + return 1 + } else if that1.Field8 != nil { + return -1 + } + if this.Field9 != nil && that1.Field9 != nil { + if *this.Field9 != *that1.Field9 { + if *this.Field9 < *that1.Field9 { + return -1 + } + return 1 + } + } else if this.Field9 != nil { + return 1 + } else if that1.Field9 != nil { + return -1 + } + if this.Field10 != nil && that1.Field10 != nil { + if *this.Field10 != *that1.Field10 { + if *this.Field10 < *that1.Field10 { + return -1 + } + return 1 + } + } else if this.Field10 != nil { + return 1 + } else if that1.Field10 != nil { + return -1 + } + if this.Field11 != nil && that1.Field11 != nil { + if *this.Field11 != *that1.Field11 { + if *this.Field11 < *that1.Field11 { + return -1 + } + return 1 + } + } else if this.Field11 != nil { + return 1 + } else if that1.Field11 != nil { + return -1 + } + if this.Field12 != nil && that1.Field12 != nil { + if *this.Field12 != *that1.Field12 { + if *this.Field12 < *that1.Field12 { + return -1 + } + return 1 + } + } else if this.Field12 != nil { + return 1 + } else if that1.Field12 != nil { + return -1 + } + if this.Field13 != nil && that1.Field13 != nil { + if *this.Field13 != *that1.Field13 { + if !*this.Field13 { + return -1 + } + return 1 + } + } else if this.Field13 != nil { + return 1 + } else if that1.Field13 != nil { + return -1 + } + if this.Field14 != nil && that1.Field14 != nil { + if *this.Field14 != *that1.Field14 { + if *this.Field14 < *that1.Field14 { + return -1 + } + return 1 + } + } else if this.Field14 != nil { + return 1 + } else if that1.Field14 != nil { + return -1 + } + if c := bytes.Compare(this.Field15, that1.Field15); c != 0 { + return c + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *CustomContainer) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*CustomContainer) + if !ok { + that2, ok := that.(CustomContainer) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if c := this.CustomStruct.Compare(&that1.CustomStruct); c != 0 { + return c + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *CustomNameNidOptNative) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*CustomNameNidOptNative) + if !ok { + that2, ok := that.(CustomNameNidOptNative) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.FieldA != that1.FieldA { + if this.FieldA < that1.FieldA { + return -1 + } + return 1 + } + if this.FieldB != that1.FieldB { + if this.FieldB < that1.FieldB { + return -1 + } + return 1 + } + if this.FieldC != that1.FieldC { + if this.FieldC < that1.FieldC { + return -1 + } + return 1 + } + if this.FieldD != that1.FieldD { + if this.FieldD < that1.FieldD { + return -1 + } + return 1 + } + if this.FieldE != that1.FieldE { + if this.FieldE < that1.FieldE { + return -1 + } + return 1 + } + if this.FieldF != that1.FieldF { + if this.FieldF < that1.FieldF { + return -1 + } + return 1 + } + if this.FieldG != that1.FieldG { + if this.FieldG < that1.FieldG { + return -1 + } + return 1 + } + if this.FieldH != that1.FieldH { + if this.FieldH < that1.FieldH { + return -1 + } + return 1 + } + if this.FieldI != that1.FieldI { + if this.FieldI < that1.FieldI { + return -1 + } + return 1 + } + if this.FieldJ != that1.FieldJ { + if this.FieldJ < that1.FieldJ { + return -1 + } + return 1 + } + if this.FieldK != that1.FieldK { + if this.FieldK < that1.FieldK { + return -1 + } + return 1 + } + if this.FieldL != that1.FieldL { + if this.FieldL < that1.FieldL { + return -1 + } + return 1 + } + if this.FieldM != that1.FieldM { + if !this.FieldM { + return -1 + } + return 1 + } + if this.FieldN != that1.FieldN { + if this.FieldN < that1.FieldN { + return -1 + } + return 1 + } + if c := bytes.Compare(this.FieldO, that1.FieldO); c != 0 { + return c + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *CustomNameNinOptNative) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*CustomNameNinOptNative) + if !ok { + that2, ok := that.(CustomNameNinOptNative) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.FieldA != nil && that1.FieldA != nil { + if *this.FieldA != *that1.FieldA { + if *this.FieldA < *that1.FieldA { + return -1 + } + return 1 + } + } else if this.FieldA != nil { + return 1 + } else if that1.FieldA != nil { + return -1 + } + if this.FieldB != nil && that1.FieldB != nil { + if *this.FieldB != *that1.FieldB { + if *this.FieldB < *that1.FieldB { + return -1 + } + return 1 + } + } else if this.FieldB != nil { + return 1 + } else if that1.FieldB != nil { + return -1 + } + if this.FieldC != nil && that1.FieldC != nil { + if *this.FieldC != *that1.FieldC { + if *this.FieldC < *that1.FieldC { + return -1 + } + return 1 + } + } else if this.FieldC != nil { + return 1 + } else if that1.FieldC != nil { + return -1 + } + if this.FieldD != nil && that1.FieldD != nil { + if *this.FieldD != *that1.FieldD { + if *this.FieldD < *that1.FieldD { + return -1 + } + return 1 + } + } else if this.FieldD != nil { + return 1 + } else if that1.FieldD != nil { + return -1 + } + if this.FieldE != nil && that1.FieldE != nil { + if *this.FieldE != *that1.FieldE { + if *this.FieldE < *that1.FieldE { + return -1 + } + return 1 + } + } else if this.FieldE != nil { + return 1 + } else if that1.FieldE != nil { + return -1 + } + if this.FieldF != nil && that1.FieldF != nil { + if *this.FieldF != *that1.FieldF { + if *this.FieldF < *that1.FieldF { + return -1 + } + return 1 + } + } else if this.FieldF != nil { + return 1 + } else if that1.FieldF != nil { + return -1 + } + if this.FieldG != nil && that1.FieldG != nil { + if *this.FieldG != *that1.FieldG { + if *this.FieldG < *that1.FieldG { + return -1 + } + return 1 + } + } else if this.FieldG != nil { + return 1 + } else if that1.FieldG != nil { + return -1 + } + if this.FieldH != nil && that1.FieldH != nil { + if *this.FieldH != *that1.FieldH { + if *this.FieldH < *that1.FieldH { + return -1 + } + return 1 + } + } else if this.FieldH != nil { + return 1 + } else if that1.FieldH != nil { + return -1 + } + if this.FieldI != nil && that1.FieldI != nil { + if *this.FieldI != *that1.FieldI { + if *this.FieldI < *that1.FieldI { + return -1 + } + return 1 + } + } else if this.FieldI != nil { + return 1 + } else if that1.FieldI != nil { + return -1 + } + if this.FieldJ != nil && that1.FieldJ != nil { + if *this.FieldJ != *that1.FieldJ { + if *this.FieldJ < *that1.FieldJ { + return -1 + } + return 1 + } + } else if this.FieldJ != nil { + return 1 + } else if that1.FieldJ != nil { + return -1 + } + if this.FieldK != nil && that1.FieldK != nil { + if *this.FieldK != *that1.FieldK { + if *this.FieldK < *that1.FieldK { + return -1 + } + return 1 + } + } else if this.FieldK != nil { + return 1 + } else if that1.FieldK != nil { + return -1 + } + if this.FielL != nil && that1.FielL != nil { + if *this.FielL != *that1.FielL { + if *this.FielL < *that1.FielL { + return -1 + } + return 1 + } + } else if this.FielL != nil { + return 1 + } else if that1.FielL != nil { + return -1 + } + if this.FieldM != nil && that1.FieldM != nil { + if *this.FieldM != *that1.FieldM { + if !*this.FieldM { + return -1 + } + return 1 + } + } else if this.FieldM != nil { + return 1 + } else if that1.FieldM != nil { + return -1 + } + if this.FieldN != nil && that1.FieldN != nil { + if *this.FieldN != *that1.FieldN { + if *this.FieldN < *that1.FieldN { + return -1 + } + return 1 + } + } else if this.FieldN != nil { + return 1 + } else if that1.FieldN != nil { + return -1 + } + if c := bytes.Compare(this.FieldO, that1.FieldO); c != 0 { + return c + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *CustomNameNinRepNative) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*CustomNameNinRepNative) + if !ok { + that2, ok := that.(CustomNameNinRepNative) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if len(this.FieldA) != len(that1.FieldA) { + if len(this.FieldA) < len(that1.FieldA) { + return -1 + } + return 1 + } + for i := range this.FieldA { + if this.FieldA[i] != that1.FieldA[i] { + if this.FieldA[i] < that1.FieldA[i] { + return -1 + } + return 1 + } + } + if len(this.FieldB) != len(that1.FieldB) { + if len(this.FieldB) < len(that1.FieldB) { + return -1 + } + return 1 + } + for i := range this.FieldB { + if this.FieldB[i] != that1.FieldB[i] { + if this.FieldB[i] < that1.FieldB[i] { + return -1 + } + return 1 + } + } + if len(this.FieldC) != len(that1.FieldC) { + if len(this.FieldC) < len(that1.FieldC) { + return -1 + } + return 1 + } + for i := range this.FieldC { + if this.FieldC[i] != that1.FieldC[i] { + if this.FieldC[i] < that1.FieldC[i] { + return -1 + } + return 1 + } + } + if len(this.FieldD) != len(that1.FieldD) { + if len(this.FieldD) < len(that1.FieldD) { + return -1 + } + return 1 + } + for i := range this.FieldD { + if this.FieldD[i] != that1.FieldD[i] { + if this.FieldD[i] < that1.FieldD[i] { + return -1 + } + return 1 + } + } + if len(this.FieldE) != len(that1.FieldE) { + if len(this.FieldE) < len(that1.FieldE) { + return -1 + } + return 1 + } + for i := range this.FieldE { + if this.FieldE[i] != that1.FieldE[i] { + if this.FieldE[i] < that1.FieldE[i] { + return -1 + } + return 1 + } + } + if len(this.FieldF) != len(that1.FieldF) { + if len(this.FieldF) < len(that1.FieldF) { + return -1 + } + return 1 + } + for i := range this.FieldF { + if this.FieldF[i] != that1.FieldF[i] { + if this.FieldF[i] < that1.FieldF[i] { + return -1 + } + return 1 + } + } + if len(this.FieldG) != len(that1.FieldG) { + if len(this.FieldG) < len(that1.FieldG) { + return -1 + } + return 1 + } + for i := range this.FieldG { + if this.FieldG[i] != that1.FieldG[i] { + if this.FieldG[i] < that1.FieldG[i] { + return -1 + } + return 1 + } + } + if len(this.FieldH) != len(that1.FieldH) { + if len(this.FieldH) < len(that1.FieldH) { + return -1 + } + return 1 + } + for i := range this.FieldH { + if this.FieldH[i] != that1.FieldH[i] { + if this.FieldH[i] < that1.FieldH[i] { + return -1 + } + return 1 + } + } + if len(this.FieldI) != len(that1.FieldI) { + if len(this.FieldI) < len(that1.FieldI) { + return -1 + } + return 1 + } + for i := range this.FieldI { + if this.FieldI[i] != that1.FieldI[i] { + if this.FieldI[i] < that1.FieldI[i] { + return -1 + } + return 1 + } + } + if len(this.FieldJ) != len(that1.FieldJ) { + if len(this.FieldJ) < len(that1.FieldJ) { + return -1 + } + return 1 + } + for i := range this.FieldJ { + if this.FieldJ[i] != that1.FieldJ[i] { + if this.FieldJ[i] < that1.FieldJ[i] { + return -1 + } + return 1 + } + } + if len(this.FieldK) != len(that1.FieldK) { + if len(this.FieldK) < len(that1.FieldK) { + return -1 + } + return 1 + } + for i := range this.FieldK { + if this.FieldK[i] != that1.FieldK[i] { + if this.FieldK[i] < that1.FieldK[i] { + return -1 + } + return 1 + } + } + if len(this.FieldL) != len(that1.FieldL) { + if len(this.FieldL) < len(that1.FieldL) { + return -1 + } + return 1 + } + for i := range this.FieldL { + if this.FieldL[i] != that1.FieldL[i] { + if this.FieldL[i] < that1.FieldL[i] { + return -1 + } + return 1 + } + } + if len(this.FieldM) != len(that1.FieldM) { + if len(this.FieldM) < len(that1.FieldM) { + return -1 + } + return 1 + } + for i := range this.FieldM { + if this.FieldM[i] != that1.FieldM[i] { + if !this.FieldM[i] { + return -1 + } + return 1 + } + } + if len(this.FieldN) != len(that1.FieldN) { + if len(this.FieldN) < len(that1.FieldN) { + return -1 + } + return 1 + } + for i := range this.FieldN { + if this.FieldN[i] != that1.FieldN[i] { + if this.FieldN[i] < that1.FieldN[i] { + return -1 + } + return 1 + } + } + if len(this.FieldO) != len(that1.FieldO) { + if len(this.FieldO) < len(that1.FieldO) { + return -1 + } + return 1 + } + for i := range this.FieldO { + if c := bytes.Compare(this.FieldO[i], that1.FieldO[i]); c != 0 { + return c + } + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *CustomNameNinStruct) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*CustomNameNinStruct) + if !ok { + that2, ok := that.(CustomNameNinStruct) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.FieldA != nil && that1.FieldA != nil { + if *this.FieldA != *that1.FieldA { + if *this.FieldA < *that1.FieldA { + return -1 + } + return 1 + } + } else if this.FieldA != nil { + return 1 + } else if that1.FieldA != nil { + return -1 + } + if this.FieldB != nil && that1.FieldB != nil { + if *this.FieldB != *that1.FieldB { + if *this.FieldB < *that1.FieldB { + return -1 + } + return 1 + } + } else if this.FieldB != nil { + return 1 + } else if that1.FieldB != nil { + return -1 + } + if c := this.FieldC.Compare(that1.FieldC); c != 0 { + return c + } + if len(this.FieldD) != len(that1.FieldD) { + if len(this.FieldD) < len(that1.FieldD) { + return -1 + } + return 1 + } + for i := range this.FieldD { + if c := this.FieldD[i].Compare(that1.FieldD[i]); c != 0 { + return c + } + } + if this.FieldE != nil && that1.FieldE != nil { + if *this.FieldE != *that1.FieldE { + if *this.FieldE < *that1.FieldE { + return -1 + } + return 1 + } + } else if this.FieldE != nil { + return 1 + } else if that1.FieldE != nil { + return -1 + } + if this.FieldF != nil && that1.FieldF != nil { + if *this.FieldF != *that1.FieldF { + if *this.FieldF < *that1.FieldF { + return -1 + } + return 1 + } + } else if this.FieldF != nil { + return 1 + } else if that1.FieldF != nil { + return -1 + } + if c := this.FieldG.Compare(that1.FieldG); c != 0 { + return c + } + if this.FieldH != nil && that1.FieldH != nil { + if *this.FieldH != *that1.FieldH { + if !*this.FieldH { + return -1 + } + return 1 + } + } else if this.FieldH != nil { + return 1 + } else if that1.FieldH != nil { + return -1 + } + if this.FieldI != nil && that1.FieldI != nil { + if *this.FieldI != *that1.FieldI { + if *this.FieldI < *that1.FieldI { + return -1 + } + return 1 + } + } else if this.FieldI != nil { + return 1 + } else if that1.FieldI != nil { + return -1 + } + if c := bytes.Compare(this.FieldJ, that1.FieldJ); c != 0 { + return c + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *CustomNameCustomType) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*CustomNameCustomType) + if !ok { + that2, ok := that.(CustomNameCustomType) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if that1.FieldA == nil { + if this.FieldA != nil { + return 1 + } + } else if this.FieldA == nil { + return -1 + } else if c := this.FieldA.Compare(*that1.FieldA); c != 0 { + return c + } + if that1.FieldB == nil { + if this.FieldB != nil { + return 1 + } + } else if this.FieldB == nil { + return -1 + } else if c := this.FieldB.Compare(*that1.FieldB); c != 0 { + return c + } + if len(this.FieldC) != len(that1.FieldC) { + if len(this.FieldC) < len(that1.FieldC) { + return -1 + } + return 1 + } + for i := range this.FieldC { + if c := this.FieldC[i].Compare(that1.FieldC[i]); c != 0 { + return c + } + } + if len(this.FieldD) != len(that1.FieldD) { + if len(this.FieldD) < len(that1.FieldD) { + return -1 + } + return 1 + } + for i := range this.FieldD { + if c := this.FieldD[i].Compare(that1.FieldD[i]); c != 0 { + return c + } + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *CustomNameNinEmbeddedStructUnion) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*CustomNameNinEmbeddedStructUnion) + if !ok { + that2, ok := that.(CustomNameNinEmbeddedStructUnion) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if c := this.NidOptNative.Compare(that1.NidOptNative); c != 0 { + return c + } + if c := this.FieldA.Compare(that1.FieldA); c != 0 { + return c + } + if this.FieldB != nil && that1.FieldB != nil { + if *this.FieldB != *that1.FieldB { + if !*this.FieldB { + return -1 + } + return 1 + } + } else if this.FieldB != nil { + return 1 + } else if that1.FieldB != nil { + return -1 + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *CustomNameEnum) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*CustomNameEnum) + if !ok { + that2, ok := that.(CustomNameEnum) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.FieldA != nil && that1.FieldA != nil { + if *this.FieldA != *that1.FieldA { + if *this.FieldA < *that1.FieldA { + return -1 + } + return 1 + } + } else if this.FieldA != nil { + return 1 + } else if that1.FieldA != nil { + return -1 + } + if len(this.FieldB) != len(that1.FieldB) { + if len(this.FieldB) < len(that1.FieldB) { + return -1 + } + return 1 + } + for i := range this.FieldB { + if this.FieldB[i] != that1.FieldB[i] { + if this.FieldB[i] < that1.FieldB[i] { + return -1 + } + return 1 + } + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NoExtensionsMap) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NoExtensionsMap) + if !ok { + that2, ok := that.(NoExtensionsMap) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + if *this.Field1 < *that1.Field1 { + return -1 + } + return 1 + } + } else if this.Field1 != nil { + return 1 + } else if that1.Field1 != nil { + return -1 + } + if c := bytes.Compare(this.XXX_extensions, that1.XXX_extensions); c != 0 { + return c + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *Unrecognized) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*Unrecognized) + if !ok { + that2, ok := that.(Unrecognized) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + if *this.Field1 < *that1.Field1 { + return -1 + } + return 1 + } + } else if this.Field1 != nil { + return 1 + } else if that1.Field1 != nil { + return -1 + } + return 0 +} +func (this *UnrecognizedWithInner) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*UnrecognizedWithInner) + if !ok { + that2, ok := that.(UnrecognizedWithInner) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if len(this.Embedded) != len(that1.Embedded) { + if len(this.Embedded) < len(that1.Embedded) { + return -1 + } + return 1 + } + for i := range this.Embedded { + if c := this.Embedded[i].Compare(that1.Embedded[i]); c != 0 { + return c + } + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + if *this.Field2 < *that1.Field2 { + return -1 + } + return 1 + } + } else if this.Field2 != nil { + return 1 + } else if that1.Field2 != nil { + return -1 + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *UnrecognizedWithInner_Inner) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*UnrecognizedWithInner_Inner) + if !ok { + that2, ok := that.(UnrecognizedWithInner_Inner) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + if *this.Field1 < *that1.Field1 { + return -1 + } + return 1 + } + } else if this.Field1 != nil { + return 1 + } else if that1.Field1 != nil { + return -1 + } + return 0 +} +func (this *UnrecognizedWithEmbed) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*UnrecognizedWithEmbed) + if !ok { + that2, ok := that.(UnrecognizedWithEmbed) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if c := this.UnrecognizedWithEmbed_Embedded.Compare(&that1.UnrecognizedWithEmbed_Embedded); c != 0 { + return c + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + if *this.Field2 < *that1.Field2 { + return -1 + } + return 1 + } + } else if this.Field2 != nil { + return 1 + } else if that1.Field2 != nil { + return -1 + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *UnrecognizedWithEmbed_Embedded) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*UnrecognizedWithEmbed_Embedded) + if !ok { + that2, ok := that.(UnrecognizedWithEmbed_Embedded) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + if *this.Field1 < *that1.Field1 { + return -1 + } + return 1 + } + } else if this.Field1 != nil { + return 1 + } else if that1.Field1 != nil { + return -1 + } + return 0 +} +func (this *Node) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*Node) + if !ok { + that2, ok := that.(Node) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.Label != nil && that1.Label != nil { + if *this.Label != *that1.Label { + if *this.Label < *that1.Label { + return -1 + } + return 1 + } + } else if this.Label != nil { + return 1 + } else if that1.Label != nil { + return -1 + } + if len(this.Children) != len(that1.Children) { + if len(this.Children) < len(that1.Children) { + return -1 + } + return 1 + } + for i := range this.Children { + if c := this.Children[i].Compare(that1.Children[i]); c != 0 { + return c + } + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NidOptNative) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NinOptNative) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NidRepNative) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NinRepNative) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NidRepPackedNative) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NinRepPackedNative) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NidOptStruct) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NinOptStruct) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NidRepStruct) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NinRepStruct) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NidEmbeddedStruct) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NinEmbeddedStruct) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NidNestedStruct) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NinNestedStruct) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NidOptCustom) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *CustomDash) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NinOptCustom) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NidRepCustom) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NinRepCustom) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NinOptNativeUnion) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NinOptStructUnion) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NinEmbeddedStructUnion) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NinNestedStructUnion) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *Tree) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *OrBranch) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *AndBranch) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *Leaf) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *DeepTree) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *ADeepBranch) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *AndDeepBranch) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *DeepLeaf) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *Nil) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NidOptEnum) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NinOptEnum) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NidRepEnum) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NinRepEnum) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NinOptEnumDefault) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *AnotherNinOptEnum) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *AnotherNinOptEnumDefault) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *Timer) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *MyExtendable) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *OtherExtenable) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NestedDefinition) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NestedDefinition_NestedMessage) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NestedDefinition_NestedMessage_NestedNestedMsg) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NestedScope) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NinOptNativeDefault) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *CustomContainer) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *CustomNameNidOptNative) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *CustomNameNinOptNative) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *CustomNameNinRepNative) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *CustomNameNinStruct) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *CustomNameCustomType) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *CustomNameNinEmbeddedStructUnion) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *CustomNameEnum) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NoExtensionsMap) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *Unrecognized) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *UnrecognizedWithInner) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *UnrecognizedWithInner_Inner) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *UnrecognizedWithEmbed) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *UnrecognizedWithEmbed_Embedded) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *Node) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func ThetestDescription() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + d := &github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet{} + var gzipped = []byte{ + // 6115 bytes of a gzipped FileDescriptorSet + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xcc, 0x7c, 0x6b, 0x6c, 0x23, 0xd7, + 0x75, 0xff, 0x0e, 0x87, 0x94, 0xa8, 0x43, 0x89, 0xa2, 0x66, 0xb5, 0x32, 0x2d, 0xaf, 0xf7, 0x41, + 0xcb, 0xb2, 0xac, 0xd8, 0x5a, 0x49, 0xab, 0x7d, 0xd1, 0x89, 0x03, 0xbe, 0x56, 0xd6, 0xfe, 0xf5, + 0xfa, 0x8f, 0xa4, 0xc4, 0x4e, 0x0b, 0x10, 0x5c, 0x72, 0x24, 0xd1, 0xa6, 0x86, 0x2c, 0x87, 0xb4, + 0x77, 0xf3, 0xa1, 0x48, 0x93, 0x36, 0x4d, 0x5a, 0xf4, 0x99, 0x16, 0xcd, 0xc3, 0x49, 0x9c, 0x14, + 0x69, 0x9c, 0xf4, 0x95, 0xb4, 0x69, 0x50, 0x04, 0x45, 0x63, 0xa0, 0x48, 0xbb, 0xfd, 0x52, 0xa4, + 0xf9, 0x54, 0x14, 0x85, 0x91, 0x17, 0xd0, 0xb4, 0x4d, 0xdb, 0x04, 0x30, 0x90, 0x00, 0xc9, 0x87, + 0xde, 0xf7, 0xcc, 0xbd, 0x1c, 0x72, 0x46, 0xde, 0x75, 0x92, 0x05, 0xb8, 0x22, 0xef, 0x39, 0xbf, + 0x33, 0x67, 0xce, 0xeb, 0x9e, 0xb9, 0xf7, 0x92, 0xf0, 0x77, 0x4b, 0x70, 0xee, 0xa0, 0xd9, 0x3c, + 0x68, 0x58, 0x17, 0x5a, 0xed, 0x66, 0xa7, 0x79, 0xb3, 0xbb, 0x7f, 0xa1, 0x66, 0x39, 0xd5, 0x76, + 0xbd, 0xd5, 0x69, 0xb6, 0x17, 0xc8, 0x98, 0x31, 0x4e, 0x39, 0x16, 0x38, 0x47, 0x66, 0x03, 0x26, + 0xae, 0xd7, 0x1b, 0x56, 0x51, 0x30, 0xee, 0x58, 0x1d, 0xe3, 0x2a, 0x44, 0xf7, 0xd1, 0x60, 0x5a, + 0x3b, 0xa7, 0xcf, 0x25, 0x96, 0x67, 0x16, 0x14, 0xd0, 0x82, 0x8c, 0xd8, 0xc6, 0xc3, 0x26, 0x41, + 0x64, 0xbe, 0x1d, 0x85, 0x93, 0x3e, 0x54, 0xc3, 0x80, 0xa8, 0x5d, 0x39, 0xc2, 0x12, 0xb5, 0xb9, + 0x11, 0x93, 0xbc, 0x37, 0xd2, 0x30, 0xdc, 0xaa, 0x54, 0x9f, 0xab, 0x1c, 0x58, 0xe9, 0x08, 0x19, + 0xe6, 0x1f, 0x8d, 0x33, 0x00, 0x35, 0xab, 0x65, 0xd9, 0x35, 0xcb, 0xae, 0xde, 0x4e, 0xeb, 0x48, + 0x8b, 0x11, 0xd3, 0x33, 0x62, 0xbc, 0x09, 0x26, 0x5a, 0xdd, 0x9b, 0x8d, 0x7a, 0xb5, 0xec, 0x61, + 0x03, 0xc4, 0x16, 0x33, 0x53, 0x94, 0x50, 0x74, 0x99, 0x1f, 0x81, 0xf1, 0x17, 0xac, 0xca, 0x73, + 0x5e, 0xd6, 0x04, 0x61, 0x4d, 0xe2, 0x61, 0x0f, 0x63, 0x01, 0x46, 0x8f, 0x2c, 0xc7, 0x41, 0x0a, + 0x94, 0x3b, 0xb7, 0x5b, 0x56, 0x3a, 0x4a, 0xee, 0xfe, 0x5c, 0xcf, 0xdd, 0xab, 0x77, 0x9e, 0x60, + 0xa8, 0x5d, 0x04, 0x32, 0x72, 0x30, 0x62, 0xd9, 0xdd, 0x23, 0x2a, 0x21, 0xd6, 0xc7, 0x7e, 0x25, + 0xc4, 0xa1, 0x4a, 0x89, 0x63, 0x18, 0x13, 0x31, 0xec, 0x58, 0xed, 0xe7, 0xeb, 0x55, 0x2b, 0x3d, + 0x44, 0x04, 0x3c, 0xd2, 0x23, 0x60, 0x87, 0xd2, 0x55, 0x19, 0x1c, 0x87, 0x6e, 0x65, 0xc4, 0xba, + 0xd5, 0xb1, 0x6c, 0xa7, 0xde, 0xb4, 0xd3, 0xc3, 0x44, 0xc8, 0xc3, 0x3e, 0x5e, 0xb4, 0x1a, 0x35, + 0x55, 0x84, 0x8b, 0x33, 0x2e, 0xc3, 0x70, 0xb3, 0xd5, 0x41, 0xef, 0x9c, 0x74, 0x1c, 0xf9, 0x27, + 0xb1, 0x7c, 0xda, 0x37, 0x10, 0xb6, 0x28, 0x8f, 0xc9, 0x99, 0x8d, 0x35, 0x48, 0x39, 0xcd, 0x6e, + 0xbb, 0x6a, 0x95, 0xab, 0xcd, 0x9a, 0x55, 0xae, 0xdb, 0xfb, 0xcd, 0xf4, 0x08, 0x11, 0x70, 0xb6, + 0xf7, 0x46, 0x08, 0x63, 0x01, 0xf1, 0xad, 0x21, 0x36, 0x33, 0xe9, 0x48, 0x9f, 0x8d, 0x29, 0x18, + 0x72, 0x6e, 0xdb, 0x9d, 0xca, 0xad, 0xf4, 0x28, 0x89, 0x10, 0xf6, 0x29, 0xf3, 0x83, 0x18, 0x8c, + 0x87, 0x09, 0xb1, 0x27, 0x20, 0xb6, 0x8f, 0xef, 0x12, 0x05, 0xd8, 0x31, 0x6c, 0x40, 0x31, 0xb2, + 0x11, 0x87, 0x5e, 0xa7, 0x11, 0x73, 0x90, 0xb0, 0x2d, 0xa7, 0x63, 0xd5, 0x68, 0x44, 0xe8, 0x21, + 0x63, 0x0a, 0x28, 0xa8, 0x37, 0xa4, 0xa2, 0xaf, 0x2b, 0xa4, 0x9e, 0x86, 0x71, 0xa1, 0x52, 0xb9, + 0x5d, 0xb1, 0x0f, 0x78, 0x6c, 0x5e, 0x08, 0xd2, 0x64, 0xa1, 0xc4, 0x71, 0x26, 0x86, 0x99, 0x49, + 0x4b, 0xfa, 0x6c, 0x14, 0x01, 0x9a, 0xb6, 0xd5, 0xdc, 0x47, 0xe9, 0x55, 0x6d, 0xa0, 0x38, 0xf1, + 0xb7, 0xd2, 0x16, 0x66, 0xe9, 0xb1, 0x52, 0x93, 0x8e, 0x56, 0x1b, 0xc6, 0x35, 0x37, 0xd4, 0x86, + 0xfb, 0x44, 0xca, 0x06, 0x4d, 0xb2, 0x9e, 0x68, 0xdb, 0x83, 0x64, 0xdb, 0xc2, 0x71, 0x8f, 0x4c, + 0x4c, 0xef, 0x6c, 0x84, 0x28, 0xb1, 0x10, 0x78, 0x67, 0x26, 0x83, 0xd1, 0x1b, 0x1b, 0x6b, 0x7b, + 0x3f, 0x1a, 0x0f, 0x81, 0x18, 0x28, 0x93, 0xb0, 0x02, 0x52, 0x85, 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0x2a, 0x47, 0x75, + 0xfb, 0x80, 0xd4, 0xd1, 0x78, 0x36, 0xb6, 0x5f, 0x69, 0x38, 0x96, 0x39, 0x4e, 0xc9, 0x3b, 0x9c, + 0x8a, 0x11, 0x64, 0xb2, 0x68, 0x7b, 0x10, 0x43, 0x12, 0x82, 0x92, 0x05, 0x22, 0xf3, 0xb5, 0x61, + 0x48, 0x78, 0xba, 0x33, 0xe3, 0x3c, 0x8c, 0x3e, 0x5b, 0x79, 0xbe, 0x52, 0xe6, 0x1d, 0x37, 0xb5, + 0x44, 0x02, 0x8f, 0x6d, 0xb3, 0xae, 0x7b, 0x11, 0x26, 0x09, 0x0b, 0xba, 0x47, 0x74, 0xa1, 0x6a, + 0xa3, 0xe2, 0x38, 0xc4, 0x68, 0x71, 0xc2, 0x6a, 0x60, 0xda, 0x16, 0x26, 0x15, 0x38, 0xc5, 0xb8, + 0x04, 0x27, 0x09, 0xe2, 0x08, 0x15, 0xde, 0x7a, 0xab, 0x61, 0x95, 0xf1, 0x33, 0x80, 0x43, 0xea, + 0xa9, 0xd0, 0x6c, 0x02, 0x73, 0x6c, 0x30, 0x06, 0xac, 0x91, 0x63, 0xac, 0xc2, 0x83, 0x04, 0x76, + 0x60, 0xd9, 0x56, 0xbb, 0xd2, 0xb1, 0xca, 0xd6, 0x2f, 0x74, 0x11, 0x6f, 0xb9, 0x62, 0xd7, 0xca, + 0x87, 0x15, 0xe7, 0x30, 0x3d, 0xe9, 0x15, 0x70, 0x3f, 0xe6, 0x5d, 0x65, 0xac, 0x25, 0xc2, 0x99, + 0xb3, 0x6b, 0x4f, 0x21, 0x3e, 0x23, 0x0b, 0x53, 0x44, 0x10, 0x32, 0x0a, 0xba, 0xe7, 0x72, 0xf5, + 0xd0, 0xaa, 0x3e, 0x57, 0xee, 0x76, 0xf6, 0xaf, 0xa6, 0x1f, 0xf0, 0x4a, 0x20, 0x4a, 0xee, 0x10, + 0x9e, 0x02, 0x66, 0xd9, 0x43, 0x1c, 0xc6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c7, 0x28, 0xcb, 0x23, 0x30, 0x5e, 0x39, 0x38, 0x68, 0x63, 0xe1, 0x5c, 0x10, 0x6d, 0x43, 0x93, + 0x62, 0x98, 0x30, 0x4e, 0xdf, 0x80, 0x38, 0xb7, 0x03, 0x9e, 0x58, 0xb0, 0x25, 0xd0, 0x9c, 0x4f, + 0xd6, 0x51, 0x22, 0xf8, 0xa1, 0xde, 0xe6, 0x44, 0x74, 0xd1, 0xba, 0x53, 0x76, 0x17, 0xf4, 0x22, + 0x88, 0x1e, 0x37, 0x13, 0x75, 0x47, 0xac, 0xe0, 0x64, 0x3e, 0x8d, 0xa6, 0x57, 0x79, 0x41, 0xd2, + 0x28, 0x42, 0xbc, 0xd1, 0x44, 0xf1, 0x81, 0x11, 0x74, 0x35, 0x7c, 0x2e, 0x60, 0x0d, 0x73, 0x61, + 0x9d, 0xf1, 0x9b, 0x02, 0x39, 0xfd, 0x4f, 0x1a, 0xc4, 0xf9, 0x30, 0x9a, 0x28, 0xa2, 0xad, 0x4a, + 0xe7, 0x90, 0x88, 0x8b, 0xe5, 0x23, 0x29, 0xcd, 0x24, 0x9f, 0xf1, 0x38, 0xea, 0x66, 0x6c, 0x12, + 0x02, 0x6c, 0x1c, 0x7f, 0xc6, 0x7e, 0x6d, 0x58, 0x95, 0x1a, 0x69, 0x70, 0x9b, 0x47, 0x47, 0xc8, + 0x93, 0x0e, 0xf7, 0x2b, 0x1b, 0x2f, 0xb0, 0x61, 0xbc, 0x2e, 0xde, 0x69, 0x57, 0xea, 0x0d, 0x89, + 0x37, 0x4a, 0x78, 0x53, 0x9c, 0x20, 0x98, 0xb3, 0x70, 0x3f, 0x97, 0x5b, 0xb3, 0x3a, 0x15, 0xd4, + 0x3c, 0xd7, 0x5c, 0xd0, 0x10, 0x59, 0xed, 0xba, 0x8f, 0x31, 0x14, 0x19, 0x9d, 0x63, 0xf3, 0x4f, + 0xa3, 0x46, 0xb6, 0x79, 0xa4, 0x5a, 0x22, 0x9f, 0x52, 0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, 0xdd, 0x21, + 0x73, 0xd4, 0xf6, 0x8c, 0x71, 0x9d, 0x23, 0x77, 0xa9, 0xf3, 0x74, 0x0e, 0x3d, 0xb5, 0xcb, 0xe3, + 0xc6, 0x02, 0x18, 0xde, 0x21, 0xa6, 0x04, 0xfd, 0x69, 0x12, 0xc3, 0xee, 0xa1, 0x64, 0x1e, 0x44, + 0x55, 0x58, 0xd8, 0x55, 0xfc, 0xa2, 0xc6, 0x66, 0x69, 0x07, 0xff, 0x18, 0x86, 0x96, 0xf9, 0xa2, + 0x06, 0x09, 0xd6, 0xb6, 0x56, 0x9b, 0x2d, 0xcb, 0xc8, 0x83, 0x96, 0x63, 0xf1, 0xf0, 0xfa, 0xf4, + 0xd6, 0x2a, 0x68, 0x76, 0xd2, 0xf2, 0xe1, 0x5d, 0xad, 0xdd, 0x34, 0x96, 0x41, 0x2b, 0x30, 0x07, + 0x87, 0xf3, 0x8c, 0x56, 0xcd, 0x7c, 0x5f, 0x87, 0x93, 0xde, 0x36, 0x9a, 0xd7, 0x93, 0xf3, 0xf2, + 0x73, 0x53, 0x76, 0x64, 0x69, 0xf9, 0xe2, 0xca, 0x02, 0xfe, 0x4f, 0x84, 0xe4, 0x79, 0xf9, 0x11, + 0xaa, 0x97, 0xa5, 0xe7, 0x98, 0x48, 0x36, 0xea, 0xa1, 0xf6, 0x1c, 0x13, 0x91, 0xa8, 0x3d, 0xc7, + 0x44, 0x24, 0x6a, 0xcf, 0x31, 0x11, 0x89, 0xda, 0xb3, 0x15, 0x20, 0x51, 0x7b, 0x8e, 0x89, 0x48, + 0xd4, 0x9e, 0x63, 0x22, 0x12, 0xb5, 0xf7, 0x98, 0x08, 0x23, 0xf7, 0x3d, 0x26, 0x22, 0xd3, 0x7b, + 0x8f, 0x89, 0xc8, 0xf4, 0xde, 0x63, 0x22, 0x59, 0xd4, 0x9f, 0x75, 0xad, 0xfe, 0x9b, 0x0e, 0x32, + 0x7e, 0xd0, 0x33, 0xa0, 0x5b, 0x80,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, 0xe7, 0x39, 0x04, + 0x95, 0x51, 0xc2, 0x0f, 0x7c, 0x42, 0x2f, 0xa3, 0x84, 0x1e, 0xf8, 0x84, 0x5d, 0x46, 0x09, 0x3b, + 0xf0, 0x09, 0xb9, 0x8c, 0x12, 0x72, 0xe0, 0x13, 0x6e, 0x19, 0x25, 0xdc, 0xc0, 0x27, 0xd4, 0x32, + 0x4a, 0xa8, 0x81, 0x4f, 0x98, 0x65, 0x94, 0x30, 0x03, 0x9f, 0x10, 0xcb, 0x28, 0x21, 0x06, 0x3e, + 0xe1, 0x95, 0x51, 0xc2, 0x0b, 0x7c, 0x42, 0x6b, 0x46, 0x0d, 0x2d, 0xf0, 0x0b, 0xab, 0x19, 0x35, + 0xac, 0xc0, 0x2f, 0xa4, 0x1e, 0x52, 0x43, 0x6a, 0x04, 0x71, 0xc5, 0xf0, 0x90, 0x27, 0x9a, 0x66, + 0xd4, 0x68, 0x02, 0xbf, 0x48, 0x9a, 0x51, 0x23, 0x09, 0xfc, 0xa2, 0x68, 0x46, 0x8d, 0x22, 0xf0, + 0x8b, 0xa0, 0x57, 0xd4, 0x08, 0x72, 0x8f, 0xf8, 0x64, 0x94, 0x1d, 0xc5, 0xa0, 0x08, 0xd2, 0x43, + 0x44, 0x90, 0x1e, 0x22, 0x82, 0xf4, 0x10, 0x11, 0xa4, 0x87, 0x88, 0x20, 0x3d, 0x44, 0x04, 0xe9, + 0x21, 0x22, 0x48, 0x0f, 0x11, 0x41, 0x7a, 0x98, 0x08, 0xd2, 0x43, 0x45, 0x90, 0xde, 0x2f, 0x82, + 0x66, 0xd4, 0x03, 0x0f, 0xe0, 0x57, 0x90, 0x66, 0xd4, 0x9d, 0xcf, 0xe0, 0x10, 0xd2, 0x43, 0x85, + 0x90, 0xde, 0x2f, 0x84, 0xbe, 0x8c, 0x1a, 0x29, 0x29, 0x84, 0xd8, 0xf6, 0xd0, 0xbd, 0xaa, 0x40, + 0x97, 0x43, 0x9c, 0xaf, 0xf0, 0x8b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 0xa0, 0xd7, 0x9d, 0x6f, 0x22, 0x7e, 0xf4, 0xfa, 0x3a, 0x7a, 0xff, + 0x1d, 0xf4, 0xf7, 0x7b, 0xe8, 0xef, 0x0f, 0xd1, 0xdf, 0x77, 0x7d, 0xeb, 0xcc, 0x89, 0x97, 0xd0, + 0xeb, 0xe5, 0x6f, 0x9d, 0xd1, 0xfe, 0x2f, 0x00, 0x00, 0xff, 0xff, 0x71, 0x02, 0xea, 0x96, 0x09, + 0x5f, 0x00, 0x00, + } + r := bytes.NewReader(gzipped) + gzipr, err := compress_gzip.NewReader(r) + if err != nil { + panic(err) + } + ungzipped, err := io_ioutil.ReadAll(gzipr) + if err != nil { + panic(err) + } + if err := github_com_gogo_protobuf_proto.Unmarshal(ungzipped, d); err != nil { + panic(err) + } + return d +} +func (x TheTestEnum) String() string { + s, ok := TheTestEnum_name[int32(x)] + if ok { + return s + } + return strconv.Itoa(int(x)) +} +func (x AnotherTestEnum) String() string { + s, ok := AnotherTestEnum_name[int32(x)] + if ok { + return s + } + return strconv.Itoa(int(x)) +} +func (x YetAnotherTestEnum) String() string { + s, ok := YetAnotherTestEnum_name[int32(x)] + if ok { + return s + } + return strconv.Itoa(int(x)) +} +func (x YetYetAnotherTestEnum) String() string { + s, ok := YetYetAnotherTestEnum_name[int32(x)] + if ok { + return s + } + return strconv.Itoa(int(x)) +} +func (x NestedDefinition_NestedEnum) String() string { + s, ok := NestedDefinition_NestedEnum_name[int32(x)] + if ok { + return s + } + return strconv.Itoa(int(x)) +} +func (this *NidOptNative) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NidOptNative) + if !ok { + that2, ok := that.(NidOptNative) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NidOptNative") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NidOptNative but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NidOptNative but is not nil && this == nil") + } + if this.Field1 != that1.Field1 { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) + } + if this.Field2 != that1.Field2 { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) + } + if this.Field3 != that1.Field3 { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", this.Field3, that1.Field3) + } + if this.Field4 != that1.Field4 { + return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", this.Field4, that1.Field4) + } + if this.Field5 != that1.Field5 { + return fmt.Errorf("Field5 this(%v) Not Equal that(%v)", this.Field5, that1.Field5) + } + if this.Field6 != that1.Field6 { + return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", this.Field6, that1.Field6) + } + if this.Field7 != that1.Field7 { + return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", this.Field7, that1.Field7) + } + if this.Field8 != that1.Field8 { + return fmt.Errorf("Field8 this(%v) Not Equal that(%v)", this.Field8, that1.Field8) + } + if this.Field9 != that1.Field9 { + return fmt.Errorf("Field9 this(%v) Not Equal that(%v)", this.Field9, that1.Field9) + } + if this.Field10 != that1.Field10 { + return fmt.Errorf("Field10 this(%v) Not Equal that(%v)", this.Field10, that1.Field10) + } + if this.Field11 != that1.Field11 { + return fmt.Errorf("Field11 this(%v) Not Equal that(%v)", this.Field11, that1.Field11) + } + if this.Field12 != that1.Field12 { + return fmt.Errorf("Field12 this(%v) Not Equal that(%v)", this.Field12, that1.Field12) + } + if this.Field13 != that1.Field13 { + return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", this.Field13, that1.Field13) + } + if this.Field14 != that1.Field14 { + return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", this.Field14, that1.Field14) + } + if !bytes.Equal(this.Field15, that1.Field15) { + return fmt.Errorf("Field15 this(%v) Not Equal that(%v)", this.Field15, that1.Field15) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NidOptNative) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*NidOptNative) + if !ok { + that2, ok := that.(NidOptNative) + 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.Field1 != that1.Field1 { + return false + } + if this.Field2 != that1.Field2 { + return false + } + if this.Field3 != that1.Field3 { + return false + } + if this.Field4 != that1.Field4 { + return false + } + if this.Field5 != that1.Field5 { + return false + } + if this.Field6 != that1.Field6 { + return false + } + if this.Field7 != that1.Field7 { + return false + } + if this.Field8 != that1.Field8 { + return false + } + if this.Field9 != that1.Field9 { + return false + } + if this.Field10 != that1.Field10 { + return false + } + if this.Field11 != that1.Field11 { + return false + } + if this.Field12 != that1.Field12 { + return false + } + if this.Field13 != that1.Field13 { + return false + } + if this.Field14 != that1.Field14 { + return false + } + if !bytes.Equal(this.Field15, that1.Field15) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NinOptNative) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NinOptNative) + if !ok { + that2, ok := that.(NinOptNative) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NinOptNative") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NinOptNative but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NinOptNative but is not nil && this == nil") + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) + } + } else if this.Field1 != nil { + return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") + } else if that1.Field1 != nil { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", *this.Field2, *that1.Field2) + } + } else if this.Field2 != nil { + return fmt.Errorf("this.Field2 == nil && that.Field2 != nil") + } else if that1.Field2 != nil { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) + } + if this.Field3 != nil && that1.Field3 != nil { + if *this.Field3 != *that1.Field3 { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", *this.Field3, *that1.Field3) + } + } else if this.Field3 != nil { + return fmt.Errorf("this.Field3 == nil && that.Field3 != nil") + } else if that1.Field3 != nil { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", this.Field3, that1.Field3) + } + if this.Field4 != nil && that1.Field4 != nil { + if *this.Field4 != *that1.Field4 { + return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", *this.Field4, *that1.Field4) + } + } else if this.Field4 != nil { + return fmt.Errorf("this.Field4 == nil && that.Field4 != nil") + } else if that1.Field4 != nil { + return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", this.Field4, that1.Field4) + } + if this.Field5 != nil && that1.Field5 != nil { + if *this.Field5 != *that1.Field5 { + return fmt.Errorf("Field5 this(%v) Not Equal that(%v)", *this.Field5, *that1.Field5) + } + } else if this.Field5 != nil { + return fmt.Errorf("this.Field5 == nil && that.Field5 != nil") + } else if that1.Field5 != nil { + return fmt.Errorf("Field5 this(%v) Not Equal that(%v)", this.Field5, that1.Field5) + } + if this.Field6 != nil && that1.Field6 != nil { + if *this.Field6 != *that1.Field6 { + return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", *this.Field6, *that1.Field6) + } + } else if this.Field6 != nil { + return fmt.Errorf("this.Field6 == nil && that.Field6 != nil") + } else if that1.Field6 != nil { + return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", this.Field6, that1.Field6) + } + if this.Field7 != nil && that1.Field7 != nil { + if *this.Field7 != *that1.Field7 { + return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", *this.Field7, *that1.Field7) + } + } else if this.Field7 != nil { + return fmt.Errorf("this.Field7 == nil && that.Field7 != nil") + } else if that1.Field7 != nil { + return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", this.Field7, that1.Field7) + } + if this.Field8 != nil && that1.Field8 != nil { + if *this.Field8 != *that1.Field8 { + return fmt.Errorf("Field8 this(%v) Not Equal that(%v)", *this.Field8, *that1.Field8) + } + } else if this.Field8 != nil { + return fmt.Errorf("this.Field8 == nil && that.Field8 != nil") + } else if that1.Field8 != nil { + return fmt.Errorf("Field8 this(%v) Not Equal that(%v)", this.Field8, that1.Field8) + } + if this.Field9 != nil && that1.Field9 != nil { + if *this.Field9 != *that1.Field9 { + return fmt.Errorf("Field9 this(%v) Not Equal that(%v)", *this.Field9, *that1.Field9) + } + } else if this.Field9 != nil { + return fmt.Errorf("this.Field9 == nil && that.Field9 != nil") + } else if that1.Field9 != nil { + return fmt.Errorf("Field9 this(%v) Not Equal that(%v)", this.Field9, that1.Field9) + } + if this.Field10 != nil && that1.Field10 != nil { + if *this.Field10 != *that1.Field10 { + return fmt.Errorf("Field10 this(%v) Not Equal that(%v)", *this.Field10, *that1.Field10) + } + } else if this.Field10 != nil { + return fmt.Errorf("this.Field10 == nil && that.Field10 != nil") + } else if that1.Field10 != nil { + return fmt.Errorf("Field10 this(%v) Not Equal that(%v)", this.Field10, that1.Field10) + } + if this.Field11 != nil && that1.Field11 != nil { + if *this.Field11 != *that1.Field11 { + return fmt.Errorf("Field11 this(%v) Not Equal that(%v)", *this.Field11, *that1.Field11) + } + } else if this.Field11 != nil { + return fmt.Errorf("this.Field11 == nil && that.Field11 != nil") + } else if that1.Field11 != nil { + return fmt.Errorf("Field11 this(%v) Not Equal that(%v)", this.Field11, that1.Field11) + } + if this.Field12 != nil && that1.Field12 != nil { + if *this.Field12 != *that1.Field12 { + return fmt.Errorf("Field12 this(%v) Not Equal that(%v)", *this.Field12, *that1.Field12) + } + } else if this.Field12 != nil { + return fmt.Errorf("this.Field12 == nil && that.Field12 != nil") + } else if that1.Field12 != nil { + return fmt.Errorf("Field12 this(%v) Not Equal that(%v)", this.Field12, that1.Field12) + } + if this.Field13 != nil && that1.Field13 != nil { + if *this.Field13 != *that1.Field13 { + return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", *this.Field13, *that1.Field13) + } + } else if this.Field13 != nil { + return fmt.Errorf("this.Field13 == nil && that.Field13 != nil") + } else if that1.Field13 != nil { + return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", this.Field13, that1.Field13) + } + if this.Field14 != nil && that1.Field14 != nil { + if *this.Field14 != *that1.Field14 { + return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", *this.Field14, *that1.Field14) + } + } else if this.Field14 != nil { + return fmt.Errorf("this.Field14 == nil && that.Field14 != nil") + } else if that1.Field14 != nil { + return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", this.Field14, that1.Field14) + } + if !bytes.Equal(this.Field15, that1.Field15) { + return fmt.Errorf("Field15 this(%v) Not Equal that(%v)", this.Field15, that1.Field15) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NinOptNative) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*NinOptNative) + if !ok { + that2, ok := that.(NinOptNative) + 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.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return false + } + } else if this.Field1 != nil { + return false + } else if that1.Field1 != nil { + return false + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + return false + } + } else if this.Field2 != nil { + return false + } else if that1.Field2 != nil { + return false + } + if this.Field3 != nil && that1.Field3 != nil { + if *this.Field3 != *that1.Field3 { + return false + } + } else if this.Field3 != nil { + return false + } else if that1.Field3 != nil { + return false + } + if this.Field4 != nil && that1.Field4 != nil { + if *this.Field4 != *that1.Field4 { + return false + } + } else if this.Field4 != nil { + return false + } else if that1.Field4 != nil { + return false + } + if this.Field5 != nil && that1.Field5 != nil { + if *this.Field5 != *that1.Field5 { + return false + } + } else if this.Field5 != nil { + return false + } else if that1.Field5 != nil { + return false + } + if this.Field6 != nil && that1.Field6 != nil { + if *this.Field6 != *that1.Field6 { + return false + } + } else if this.Field6 != nil { + return false + } else if that1.Field6 != nil { + return false + } + if this.Field7 != nil && that1.Field7 != nil { + if *this.Field7 != *that1.Field7 { + return false + } + } else if this.Field7 != nil { + return false + } else if that1.Field7 != nil { + return false + } + if this.Field8 != nil && that1.Field8 != nil { + if *this.Field8 != *that1.Field8 { + return false + } + } else if this.Field8 != nil { + return false + } else if that1.Field8 != nil { + return false + } + if this.Field9 != nil && that1.Field9 != nil { + if *this.Field9 != *that1.Field9 { + return false + } + } else if this.Field9 != nil { + return false + } else if that1.Field9 != nil { + return false + } + if this.Field10 != nil && that1.Field10 != nil { + if *this.Field10 != *that1.Field10 { + return false + } + } else if this.Field10 != nil { + return false + } else if that1.Field10 != nil { + return false + } + if this.Field11 != nil && that1.Field11 != nil { + if *this.Field11 != *that1.Field11 { + return false + } + } else if this.Field11 != nil { + return false + } else if that1.Field11 != nil { + return false + } + if this.Field12 != nil && that1.Field12 != nil { + if *this.Field12 != *that1.Field12 { + return false + } + } else if this.Field12 != nil { + return false + } else if that1.Field12 != nil { + return false + } + if this.Field13 != nil && that1.Field13 != nil { + if *this.Field13 != *that1.Field13 { + return false + } + } else if this.Field13 != nil { + return false + } else if that1.Field13 != nil { + return false + } + if this.Field14 != nil && that1.Field14 != nil { + if *this.Field14 != *that1.Field14 { + return false + } + } else if this.Field14 != nil { + return false + } else if that1.Field14 != nil { + return false + } + if !bytes.Equal(this.Field15, that1.Field15) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NidRepNative) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NidRepNative) + if !ok { + that2, ok := that.(NidRepNative) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NidRepNative") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NidRepNative but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NidRepNative but is not nil && this == nil") + } + if len(this.Field1) != len(that1.Field1) { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", len(this.Field1), len(that1.Field1)) + } + for i := range this.Field1 { + if this.Field1[i] != that1.Field1[i] { + return fmt.Errorf("Field1 this[%v](%v) Not Equal that[%v](%v)", i, this.Field1[i], i, that1.Field1[i]) + } + } + if len(this.Field2) != len(that1.Field2) { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", len(this.Field2), len(that1.Field2)) + } + for i := range this.Field2 { + if this.Field2[i] != that1.Field2[i] { + return fmt.Errorf("Field2 this[%v](%v) Not Equal that[%v](%v)", i, this.Field2[i], i, that1.Field2[i]) + } + } + if len(this.Field3) != len(that1.Field3) { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", len(this.Field3), len(that1.Field3)) + } + for i := range this.Field3 { + if this.Field3[i] != that1.Field3[i] { + return fmt.Errorf("Field3 this[%v](%v) Not Equal that[%v](%v)", i, this.Field3[i], i, that1.Field3[i]) + } + } + if len(this.Field4) != len(that1.Field4) { + return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", len(this.Field4), len(that1.Field4)) + } + for i := range this.Field4 { + if this.Field4[i] != that1.Field4[i] { + return fmt.Errorf("Field4 this[%v](%v) Not Equal that[%v](%v)", i, this.Field4[i], i, that1.Field4[i]) + } + } + if len(this.Field5) != len(that1.Field5) { + return fmt.Errorf("Field5 this(%v) Not Equal that(%v)", len(this.Field5), len(that1.Field5)) + } + for i := range this.Field5 { + if this.Field5[i] != that1.Field5[i] { + return fmt.Errorf("Field5 this[%v](%v) Not Equal that[%v](%v)", i, this.Field5[i], i, that1.Field5[i]) + } + } + if len(this.Field6) != len(that1.Field6) { + return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", len(this.Field6), len(that1.Field6)) + } + for i := range this.Field6 { + if this.Field6[i] != that1.Field6[i] { + return fmt.Errorf("Field6 this[%v](%v) Not Equal that[%v](%v)", i, this.Field6[i], i, that1.Field6[i]) + } + } + if len(this.Field7) != len(that1.Field7) { + return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", len(this.Field7), len(that1.Field7)) + } + for i := range this.Field7 { + if this.Field7[i] != that1.Field7[i] { + return fmt.Errorf("Field7 this[%v](%v) Not Equal that[%v](%v)", i, this.Field7[i], i, that1.Field7[i]) + } + } + if len(this.Field8) != len(that1.Field8) { + return fmt.Errorf("Field8 this(%v) Not Equal that(%v)", len(this.Field8), len(that1.Field8)) + } + for i := range this.Field8 { + if this.Field8[i] != that1.Field8[i] { + return fmt.Errorf("Field8 this[%v](%v) Not Equal that[%v](%v)", i, this.Field8[i], i, that1.Field8[i]) + } + } + if len(this.Field9) != len(that1.Field9) { + return fmt.Errorf("Field9 this(%v) Not Equal that(%v)", len(this.Field9), len(that1.Field9)) + } + for i := range this.Field9 { + if this.Field9[i] != that1.Field9[i] { + return fmt.Errorf("Field9 this[%v](%v) Not Equal that[%v](%v)", i, this.Field9[i], i, that1.Field9[i]) + } + } + if len(this.Field10) != len(that1.Field10) { + return fmt.Errorf("Field10 this(%v) Not Equal that(%v)", len(this.Field10), len(that1.Field10)) + } + for i := range this.Field10 { + if this.Field10[i] != that1.Field10[i] { + return fmt.Errorf("Field10 this[%v](%v) Not Equal that[%v](%v)", i, this.Field10[i], i, that1.Field10[i]) + } + } + if len(this.Field11) != len(that1.Field11) { + return fmt.Errorf("Field11 this(%v) Not Equal that(%v)", len(this.Field11), len(that1.Field11)) + } + for i := range this.Field11 { + if this.Field11[i] != that1.Field11[i] { + return fmt.Errorf("Field11 this[%v](%v) Not Equal that[%v](%v)", i, this.Field11[i], i, that1.Field11[i]) + } + } + if len(this.Field12) != len(that1.Field12) { + return fmt.Errorf("Field12 this(%v) Not Equal that(%v)", len(this.Field12), len(that1.Field12)) + } + for i := range this.Field12 { + if this.Field12[i] != that1.Field12[i] { + return fmt.Errorf("Field12 this[%v](%v) Not Equal that[%v](%v)", i, this.Field12[i], i, that1.Field12[i]) + } + } + if len(this.Field13) != len(that1.Field13) { + return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", len(this.Field13), len(that1.Field13)) + } + for i := range this.Field13 { + if this.Field13[i] != that1.Field13[i] { + return fmt.Errorf("Field13 this[%v](%v) Not Equal that[%v](%v)", i, this.Field13[i], i, that1.Field13[i]) + } + } + if len(this.Field14) != len(that1.Field14) { + return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", len(this.Field14), len(that1.Field14)) + } + for i := range this.Field14 { + if this.Field14[i] != that1.Field14[i] { + return fmt.Errorf("Field14 this[%v](%v) Not Equal that[%v](%v)", i, this.Field14[i], i, that1.Field14[i]) + } + } + if len(this.Field15) != len(that1.Field15) { + return fmt.Errorf("Field15 this(%v) Not Equal that(%v)", len(this.Field15), len(that1.Field15)) + } + for i := range this.Field15 { + if !bytes.Equal(this.Field15[i], that1.Field15[i]) { + return fmt.Errorf("Field15 this[%v](%v) Not Equal that[%v](%v)", i, this.Field15[i], i, that1.Field15[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NidRepNative) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*NidRepNative) + if !ok { + that2, ok := that.(NidRepNative) + 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.Field1) != len(that1.Field1) { + return false + } + for i := range this.Field1 { + if this.Field1[i] != that1.Field1[i] { + return false + } + } + if len(this.Field2) != len(that1.Field2) { + return false + } + for i := range this.Field2 { + if this.Field2[i] != that1.Field2[i] { + return false + } + } + if len(this.Field3) != len(that1.Field3) { + return false + } + for i := range this.Field3 { + if this.Field3[i] != that1.Field3[i] { + return false + } + } + if len(this.Field4) != len(that1.Field4) { + return false + } + for i := range this.Field4 { + if this.Field4[i] != that1.Field4[i] { + return false + } + } + if len(this.Field5) != len(that1.Field5) { + return false + } + for i := range this.Field5 { + if this.Field5[i] != that1.Field5[i] { + return false + } + } + if len(this.Field6) != len(that1.Field6) { + return false + } + for i := range this.Field6 { + if this.Field6[i] != that1.Field6[i] { + return false + } + } + if len(this.Field7) != len(that1.Field7) { + return false + } + for i := range this.Field7 { + if this.Field7[i] != that1.Field7[i] { + return false + } + } + if len(this.Field8) != len(that1.Field8) { + return false + } + for i := range this.Field8 { + if this.Field8[i] != that1.Field8[i] { + return false + } + } + if len(this.Field9) != len(that1.Field9) { + return false + } + for i := range this.Field9 { + if this.Field9[i] != that1.Field9[i] { + return false + } + } + if len(this.Field10) != len(that1.Field10) { + return false + } + for i := range this.Field10 { + if this.Field10[i] != that1.Field10[i] { + return false + } + } + if len(this.Field11) != len(that1.Field11) { + return false + } + for i := range this.Field11 { + if this.Field11[i] != that1.Field11[i] { + return false + } + } + if len(this.Field12) != len(that1.Field12) { + return false + } + for i := range this.Field12 { + if this.Field12[i] != that1.Field12[i] { + return false + } + } + if len(this.Field13) != len(that1.Field13) { + return false + } + for i := range this.Field13 { + if this.Field13[i] != that1.Field13[i] { + return false + } + } + if len(this.Field14) != len(that1.Field14) { + return false + } + for i := range this.Field14 { + if this.Field14[i] != that1.Field14[i] { + return false + } + } + if len(this.Field15) != len(that1.Field15) { + return false + } + for i := range this.Field15 { + if !bytes.Equal(this.Field15[i], that1.Field15[i]) { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NinRepNative) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NinRepNative) + if !ok { + that2, ok := that.(NinRepNative) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NinRepNative") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NinRepNative but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NinRepNative but is not nil && this == nil") + } + if len(this.Field1) != len(that1.Field1) { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", len(this.Field1), len(that1.Field1)) + } + for i := range this.Field1 { + if this.Field1[i] != that1.Field1[i] { + return fmt.Errorf("Field1 this[%v](%v) Not Equal that[%v](%v)", i, this.Field1[i], i, that1.Field1[i]) + } + } + if len(this.Field2) != len(that1.Field2) { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", len(this.Field2), len(that1.Field2)) + } + for i := range this.Field2 { + if this.Field2[i] != that1.Field2[i] { + return fmt.Errorf("Field2 this[%v](%v) Not Equal that[%v](%v)", i, this.Field2[i], i, that1.Field2[i]) + } + } + if len(this.Field3) != len(that1.Field3) { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", len(this.Field3), len(that1.Field3)) + } + for i := range this.Field3 { + if this.Field3[i] != that1.Field3[i] { + return fmt.Errorf("Field3 this[%v](%v) Not Equal that[%v](%v)", i, this.Field3[i], i, that1.Field3[i]) + } + } + if len(this.Field4) != len(that1.Field4) { + return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", len(this.Field4), len(that1.Field4)) + } + for i := range this.Field4 { + if this.Field4[i] != that1.Field4[i] { + return fmt.Errorf("Field4 this[%v](%v) Not Equal that[%v](%v)", i, this.Field4[i], i, that1.Field4[i]) + } + } + if len(this.Field5) != len(that1.Field5) { + return fmt.Errorf("Field5 this(%v) Not Equal that(%v)", len(this.Field5), len(that1.Field5)) + } + for i := range this.Field5 { + if this.Field5[i] != that1.Field5[i] { + return fmt.Errorf("Field5 this[%v](%v) Not Equal that[%v](%v)", i, this.Field5[i], i, that1.Field5[i]) + } + } + if len(this.Field6) != len(that1.Field6) { + return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", len(this.Field6), len(that1.Field6)) + } + for i := range this.Field6 { + if this.Field6[i] != that1.Field6[i] { + return fmt.Errorf("Field6 this[%v](%v) Not Equal that[%v](%v)", i, this.Field6[i], i, that1.Field6[i]) + } + } + if len(this.Field7) != len(that1.Field7) { + return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", len(this.Field7), len(that1.Field7)) + } + for i := range this.Field7 { + if this.Field7[i] != that1.Field7[i] { + return fmt.Errorf("Field7 this[%v](%v) Not Equal that[%v](%v)", i, this.Field7[i], i, that1.Field7[i]) + } + } + if len(this.Field8) != len(that1.Field8) { + return fmt.Errorf("Field8 this(%v) Not Equal that(%v)", len(this.Field8), len(that1.Field8)) + } + for i := range this.Field8 { + if this.Field8[i] != that1.Field8[i] { + return fmt.Errorf("Field8 this[%v](%v) Not Equal that[%v](%v)", i, this.Field8[i], i, that1.Field8[i]) + } + } + if len(this.Field9) != len(that1.Field9) { + return fmt.Errorf("Field9 this(%v) Not Equal that(%v)", len(this.Field9), len(that1.Field9)) + } + for i := range this.Field9 { + if this.Field9[i] != that1.Field9[i] { + return fmt.Errorf("Field9 this[%v](%v) Not Equal that[%v](%v)", i, this.Field9[i], i, that1.Field9[i]) + } + } + if len(this.Field10) != len(that1.Field10) { + return fmt.Errorf("Field10 this(%v) Not Equal that(%v)", len(this.Field10), len(that1.Field10)) + } + for i := range this.Field10 { + if this.Field10[i] != that1.Field10[i] { + return fmt.Errorf("Field10 this[%v](%v) Not Equal that[%v](%v)", i, this.Field10[i], i, that1.Field10[i]) + } + } + if len(this.Field11) != len(that1.Field11) { + return fmt.Errorf("Field11 this(%v) Not Equal that(%v)", len(this.Field11), len(that1.Field11)) + } + for i := range this.Field11 { + if this.Field11[i] != that1.Field11[i] { + return fmt.Errorf("Field11 this[%v](%v) Not Equal that[%v](%v)", i, this.Field11[i], i, that1.Field11[i]) + } + } + if len(this.Field12) != len(that1.Field12) { + return fmt.Errorf("Field12 this(%v) Not Equal that(%v)", len(this.Field12), len(that1.Field12)) + } + for i := range this.Field12 { + if this.Field12[i] != that1.Field12[i] { + return fmt.Errorf("Field12 this[%v](%v) Not Equal that[%v](%v)", i, this.Field12[i], i, that1.Field12[i]) + } + } + if len(this.Field13) != len(that1.Field13) { + return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", len(this.Field13), len(that1.Field13)) + } + for i := range this.Field13 { + if this.Field13[i] != that1.Field13[i] { + return fmt.Errorf("Field13 this[%v](%v) Not Equal that[%v](%v)", i, this.Field13[i], i, that1.Field13[i]) + } + } + if len(this.Field14) != len(that1.Field14) { + return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", len(this.Field14), len(that1.Field14)) + } + for i := range this.Field14 { + if this.Field14[i] != that1.Field14[i] { + return fmt.Errorf("Field14 this[%v](%v) Not Equal that[%v](%v)", i, this.Field14[i], i, that1.Field14[i]) + } + } + if len(this.Field15) != len(that1.Field15) { + return fmt.Errorf("Field15 this(%v) Not Equal that(%v)", len(this.Field15), len(that1.Field15)) + } + for i := range this.Field15 { + if !bytes.Equal(this.Field15[i], that1.Field15[i]) { + return fmt.Errorf("Field15 this[%v](%v) Not Equal that[%v](%v)", i, this.Field15[i], i, that1.Field15[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NinRepNative) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*NinRepNative) + if !ok { + that2, ok := that.(NinRepNative) + 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.Field1) != len(that1.Field1) { + return false + } + for i := range this.Field1 { + if this.Field1[i] != that1.Field1[i] { + return false + } + } + if len(this.Field2) != len(that1.Field2) { + return false + } + for i := range this.Field2 { + if this.Field2[i] != that1.Field2[i] { + return false + } + } + if len(this.Field3) != len(that1.Field3) { + return false + } + for i := range this.Field3 { + if this.Field3[i] != that1.Field3[i] { + return false + } + } + if len(this.Field4) != len(that1.Field4) { + return false + } + for i := range this.Field4 { + if this.Field4[i] != that1.Field4[i] { + return false + } + } + if len(this.Field5) != len(that1.Field5) { + return false + } + for i := range this.Field5 { + if this.Field5[i] != that1.Field5[i] { + return false + } + } + if len(this.Field6) != len(that1.Field6) { + return false + } + for i := range this.Field6 { + if this.Field6[i] != that1.Field6[i] { + return false + } + } + if len(this.Field7) != len(that1.Field7) { + return false + } + for i := range this.Field7 { + if this.Field7[i] != that1.Field7[i] { + return false + } + } + if len(this.Field8) != len(that1.Field8) { + return false + } + for i := range this.Field8 { + if this.Field8[i] != that1.Field8[i] { + return false + } + } + if len(this.Field9) != len(that1.Field9) { + return false + } + for i := range this.Field9 { + if this.Field9[i] != that1.Field9[i] { + return false + } + } + if len(this.Field10) != len(that1.Field10) { + return false + } + for i := range this.Field10 { + if this.Field10[i] != that1.Field10[i] { + return false + } + } + if len(this.Field11) != len(that1.Field11) { + return false + } + for i := range this.Field11 { + if this.Field11[i] != that1.Field11[i] { + return false + } + } + if len(this.Field12) != len(that1.Field12) { + return false + } + for i := range this.Field12 { + if this.Field12[i] != that1.Field12[i] { + return false + } + } + if len(this.Field13) != len(that1.Field13) { + return false + } + for i := range this.Field13 { + if this.Field13[i] != that1.Field13[i] { + return false + } + } + if len(this.Field14) != len(that1.Field14) { + return false + } + for i := range this.Field14 { + if this.Field14[i] != that1.Field14[i] { + return false + } + } + if len(this.Field15) != len(that1.Field15) { + return false + } + for i := range this.Field15 { + if !bytes.Equal(this.Field15[i], that1.Field15[i]) { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NidRepPackedNative) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NidRepPackedNative) + if !ok { + that2, ok := that.(NidRepPackedNative) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NidRepPackedNative") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NidRepPackedNative but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NidRepPackedNative but is not nil && this == nil") + } + if len(this.Field1) != len(that1.Field1) { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", len(this.Field1), len(that1.Field1)) + } + for i := range this.Field1 { + if this.Field1[i] != that1.Field1[i] { + return fmt.Errorf("Field1 this[%v](%v) Not Equal that[%v](%v)", i, this.Field1[i], i, that1.Field1[i]) + } + } + if len(this.Field2) != len(that1.Field2) { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", len(this.Field2), len(that1.Field2)) + } + for i := range this.Field2 { + if this.Field2[i] != that1.Field2[i] { + return fmt.Errorf("Field2 this[%v](%v) Not Equal that[%v](%v)", i, this.Field2[i], i, that1.Field2[i]) + } + } + if len(this.Field3) != len(that1.Field3) { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", len(this.Field3), len(that1.Field3)) + } + for i := range this.Field3 { + if this.Field3[i] != that1.Field3[i] { + return fmt.Errorf("Field3 this[%v](%v) Not Equal that[%v](%v)", i, this.Field3[i], i, that1.Field3[i]) + } + } + if len(this.Field4) != len(that1.Field4) { + return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", len(this.Field4), len(that1.Field4)) + } + for i := range this.Field4 { + if this.Field4[i] != that1.Field4[i] { + return fmt.Errorf("Field4 this[%v](%v) Not Equal that[%v](%v)", i, this.Field4[i], i, that1.Field4[i]) + } + } + if len(this.Field5) != len(that1.Field5) { + return fmt.Errorf("Field5 this(%v) Not Equal that(%v)", len(this.Field5), len(that1.Field5)) + } + for i := range this.Field5 { + if this.Field5[i] != that1.Field5[i] { + return fmt.Errorf("Field5 this[%v](%v) Not Equal that[%v](%v)", i, this.Field5[i], i, that1.Field5[i]) + } + } + if len(this.Field6) != len(that1.Field6) { + return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", len(this.Field6), len(that1.Field6)) + } + for i := range this.Field6 { + if this.Field6[i] != that1.Field6[i] { + return fmt.Errorf("Field6 this[%v](%v) Not Equal that[%v](%v)", i, this.Field6[i], i, that1.Field6[i]) + } + } + if len(this.Field7) != len(that1.Field7) { + return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", len(this.Field7), len(that1.Field7)) + } + for i := range this.Field7 { + if this.Field7[i] != that1.Field7[i] { + return fmt.Errorf("Field7 this[%v](%v) Not Equal that[%v](%v)", i, this.Field7[i], i, that1.Field7[i]) + } + } + if len(this.Field8) != len(that1.Field8) { + return fmt.Errorf("Field8 this(%v) Not Equal that(%v)", len(this.Field8), len(that1.Field8)) + } + for i := range this.Field8 { + if this.Field8[i] != that1.Field8[i] { + return fmt.Errorf("Field8 this[%v](%v) Not Equal that[%v](%v)", i, this.Field8[i], i, that1.Field8[i]) + } + } + if len(this.Field9) != len(that1.Field9) { + return fmt.Errorf("Field9 this(%v) Not Equal that(%v)", len(this.Field9), len(that1.Field9)) + } + for i := range this.Field9 { + if this.Field9[i] != that1.Field9[i] { + return fmt.Errorf("Field9 this[%v](%v) Not Equal that[%v](%v)", i, this.Field9[i], i, that1.Field9[i]) + } + } + if len(this.Field10) != len(that1.Field10) { + return fmt.Errorf("Field10 this(%v) Not Equal that(%v)", len(this.Field10), len(that1.Field10)) + } + for i := range this.Field10 { + if this.Field10[i] != that1.Field10[i] { + return fmt.Errorf("Field10 this[%v](%v) Not Equal that[%v](%v)", i, this.Field10[i], i, that1.Field10[i]) + } + } + if len(this.Field11) != len(that1.Field11) { + return fmt.Errorf("Field11 this(%v) Not Equal that(%v)", len(this.Field11), len(that1.Field11)) + } + for i := range this.Field11 { + if this.Field11[i] != that1.Field11[i] { + return fmt.Errorf("Field11 this[%v](%v) Not Equal that[%v](%v)", i, this.Field11[i], i, that1.Field11[i]) + } + } + if len(this.Field12) != len(that1.Field12) { + return fmt.Errorf("Field12 this(%v) Not Equal that(%v)", len(this.Field12), len(that1.Field12)) + } + for i := range this.Field12 { + if this.Field12[i] != that1.Field12[i] { + return fmt.Errorf("Field12 this[%v](%v) Not Equal that[%v](%v)", i, this.Field12[i], i, that1.Field12[i]) + } + } + if len(this.Field13) != len(that1.Field13) { + return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", len(this.Field13), len(that1.Field13)) + } + for i := range this.Field13 { + if this.Field13[i] != that1.Field13[i] { + return fmt.Errorf("Field13 this[%v](%v) Not Equal that[%v](%v)", i, this.Field13[i], i, that1.Field13[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NidRepPackedNative) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*NidRepPackedNative) + if !ok { + that2, ok := that.(NidRepPackedNative) + 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.Field1) != len(that1.Field1) { + return false + } + for i := range this.Field1 { + if this.Field1[i] != that1.Field1[i] { + return false + } + } + if len(this.Field2) != len(that1.Field2) { + return false + } + for i := range this.Field2 { + if this.Field2[i] != that1.Field2[i] { + return false + } + } + if len(this.Field3) != len(that1.Field3) { + return false + } + for i := range this.Field3 { + if this.Field3[i] != that1.Field3[i] { + return false + } + } + if len(this.Field4) != len(that1.Field4) { + return false + } + for i := range this.Field4 { + if this.Field4[i] != that1.Field4[i] { + return false + } + } + if len(this.Field5) != len(that1.Field5) { + return false + } + for i := range this.Field5 { + if this.Field5[i] != that1.Field5[i] { + return false + } + } + if len(this.Field6) != len(that1.Field6) { + return false + } + for i := range this.Field6 { + if this.Field6[i] != that1.Field6[i] { + return false + } + } + if len(this.Field7) != len(that1.Field7) { + return false + } + for i := range this.Field7 { + if this.Field7[i] != that1.Field7[i] { + return false + } + } + if len(this.Field8) != len(that1.Field8) { + return false + } + for i := range this.Field8 { + if this.Field8[i] != that1.Field8[i] { + return false + } + } + if len(this.Field9) != len(that1.Field9) { + return false + } + for i := range this.Field9 { + if this.Field9[i] != that1.Field9[i] { + return false + } + } + if len(this.Field10) != len(that1.Field10) { + return false + } + for i := range this.Field10 { + if this.Field10[i] != that1.Field10[i] { + return false + } + } + if len(this.Field11) != len(that1.Field11) { + return false + } + for i := range this.Field11 { + if this.Field11[i] != that1.Field11[i] { + return false + } + } + if len(this.Field12) != len(that1.Field12) { + return false + } + for i := range this.Field12 { + if this.Field12[i] != that1.Field12[i] { + return false + } + } + if len(this.Field13) != len(that1.Field13) { + return false + } + for i := range this.Field13 { + if this.Field13[i] != that1.Field13[i] { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NinRepPackedNative) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NinRepPackedNative) + if !ok { + that2, ok := that.(NinRepPackedNative) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NinRepPackedNative") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NinRepPackedNative but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NinRepPackedNative but is not nil && this == nil") + } + if len(this.Field1) != len(that1.Field1) { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", len(this.Field1), len(that1.Field1)) + } + for i := range this.Field1 { + if this.Field1[i] != that1.Field1[i] { + return fmt.Errorf("Field1 this[%v](%v) Not Equal that[%v](%v)", i, this.Field1[i], i, that1.Field1[i]) + } + } + if len(this.Field2) != len(that1.Field2) { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", len(this.Field2), len(that1.Field2)) + } + for i := range this.Field2 { + if this.Field2[i] != that1.Field2[i] { + return fmt.Errorf("Field2 this[%v](%v) Not Equal that[%v](%v)", i, this.Field2[i], i, that1.Field2[i]) + } + } + if len(this.Field3) != len(that1.Field3) { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", len(this.Field3), len(that1.Field3)) + } + for i := range this.Field3 { + if this.Field3[i] != that1.Field3[i] { + return fmt.Errorf("Field3 this[%v](%v) Not Equal that[%v](%v)", i, this.Field3[i], i, that1.Field3[i]) + } + } + if len(this.Field4) != len(that1.Field4) { + return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", len(this.Field4), len(that1.Field4)) + } + for i := range this.Field4 { + if this.Field4[i] != that1.Field4[i] { + return fmt.Errorf("Field4 this[%v](%v) Not Equal that[%v](%v)", i, this.Field4[i], i, that1.Field4[i]) + } + } + if len(this.Field5) != len(that1.Field5) { + return fmt.Errorf("Field5 this(%v) Not Equal that(%v)", len(this.Field5), len(that1.Field5)) + } + for i := range this.Field5 { + if this.Field5[i] != that1.Field5[i] { + return fmt.Errorf("Field5 this[%v](%v) Not Equal that[%v](%v)", i, this.Field5[i], i, that1.Field5[i]) + } + } + if len(this.Field6) != len(that1.Field6) { + return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", len(this.Field6), len(that1.Field6)) + } + for i := range this.Field6 { + if this.Field6[i] != that1.Field6[i] { + return fmt.Errorf("Field6 this[%v](%v) Not Equal that[%v](%v)", i, this.Field6[i], i, that1.Field6[i]) + } + } + if len(this.Field7) != len(that1.Field7) { + return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", len(this.Field7), len(that1.Field7)) + } + for i := range this.Field7 { + if this.Field7[i] != that1.Field7[i] { + return fmt.Errorf("Field7 this[%v](%v) Not Equal that[%v](%v)", i, this.Field7[i], i, that1.Field7[i]) + } + } + if len(this.Field8) != len(that1.Field8) { + return fmt.Errorf("Field8 this(%v) Not Equal that(%v)", len(this.Field8), len(that1.Field8)) + } + for i := range this.Field8 { + if this.Field8[i] != that1.Field8[i] { + return fmt.Errorf("Field8 this[%v](%v) Not Equal that[%v](%v)", i, this.Field8[i], i, that1.Field8[i]) + } + } + if len(this.Field9) != len(that1.Field9) { + return fmt.Errorf("Field9 this(%v) Not Equal that(%v)", len(this.Field9), len(that1.Field9)) + } + for i := range this.Field9 { + if this.Field9[i] != that1.Field9[i] { + return fmt.Errorf("Field9 this[%v](%v) Not Equal that[%v](%v)", i, this.Field9[i], i, that1.Field9[i]) + } + } + if len(this.Field10) != len(that1.Field10) { + return fmt.Errorf("Field10 this(%v) Not Equal that(%v)", len(this.Field10), len(that1.Field10)) + } + for i := range this.Field10 { + if this.Field10[i] != that1.Field10[i] { + return fmt.Errorf("Field10 this[%v](%v) Not Equal that[%v](%v)", i, this.Field10[i], i, that1.Field10[i]) + } + } + if len(this.Field11) != len(that1.Field11) { + return fmt.Errorf("Field11 this(%v) Not Equal that(%v)", len(this.Field11), len(that1.Field11)) + } + for i := range this.Field11 { + if this.Field11[i] != that1.Field11[i] { + return fmt.Errorf("Field11 this[%v](%v) Not Equal that[%v](%v)", i, this.Field11[i], i, that1.Field11[i]) + } + } + if len(this.Field12) != len(that1.Field12) { + return fmt.Errorf("Field12 this(%v) Not Equal that(%v)", len(this.Field12), len(that1.Field12)) + } + for i := range this.Field12 { + if this.Field12[i] != that1.Field12[i] { + return fmt.Errorf("Field12 this[%v](%v) Not Equal that[%v](%v)", i, this.Field12[i], i, that1.Field12[i]) + } + } + if len(this.Field13) != len(that1.Field13) { + return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", len(this.Field13), len(that1.Field13)) + } + for i := range this.Field13 { + if this.Field13[i] != that1.Field13[i] { + return fmt.Errorf("Field13 this[%v](%v) Not Equal that[%v](%v)", i, this.Field13[i], i, that1.Field13[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NinRepPackedNative) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*NinRepPackedNative) + if !ok { + that2, ok := that.(NinRepPackedNative) + 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.Field1) != len(that1.Field1) { + return false + } + for i := range this.Field1 { + if this.Field1[i] != that1.Field1[i] { + return false + } + } + if len(this.Field2) != len(that1.Field2) { + return false + } + for i := range this.Field2 { + if this.Field2[i] != that1.Field2[i] { + return false + } + } + if len(this.Field3) != len(that1.Field3) { + return false + } + for i := range this.Field3 { + if this.Field3[i] != that1.Field3[i] { + return false + } + } + if len(this.Field4) != len(that1.Field4) { + return false + } + for i := range this.Field4 { + if this.Field4[i] != that1.Field4[i] { + return false + } + } + if len(this.Field5) != len(that1.Field5) { + return false + } + for i := range this.Field5 { + if this.Field5[i] != that1.Field5[i] { + return false + } + } + if len(this.Field6) != len(that1.Field6) { + return false + } + for i := range this.Field6 { + if this.Field6[i] != that1.Field6[i] { + return false + } + } + if len(this.Field7) != len(that1.Field7) { + return false + } + for i := range this.Field7 { + if this.Field7[i] != that1.Field7[i] { + return false + } + } + if len(this.Field8) != len(that1.Field8) { + return false + } + for i := range this.Field8 { + if this.Field8[i] != that1.Field8[i] { + return false + } + } + if len(this.Field9) != len(that1.Field9) { + return false + } + for i := range this.Field9 { + if this.Field9[i] != that1.Field9[i] { + return false + } + } + if len(this.Field10) != len(that1.Field10) { + return false + } + for i := range this.Field10 { + if this.Field10[i] != that1.Field10[i] { + return false + } + } + if len(this.Field11) != len(that1.Field11) { + return false + } + for i := range this.Field11 { + if this.Field11[i] != that1.Field11[i] { + return false + } + } + if len(this.Field12) != len(that1.Field12) { + return false + } + for i := range this.Field12 { + if this.Field12[i] != that1.Field12[i] { + return false + } + } + if len(this.Field13) != len(that1.Field13) { + return false + } + for i := range this.Field13 { + if this.Field13[i] != that1.Field13[i] { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NidOptStruct) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NidOptStruct) + if !ok { + that2, ok := that.(NidOptStruct) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NidOptStruct") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NidOptStruct but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NidOptStruct but is not nil && this == nil") + } + if this.Field1 != that1.Field1 { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) + } + if this.Field2 != that1.Field2 { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) + } + if !this.Field3.Equal(&that1.Field3) { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", this.Field3, that1.Field3) + } + if !this.Field4.Equal(&that1.Field4) { + return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", this.Field4, that1.Field4) + } + if this.Field6 != that1.Field6 { + return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", this.Field6, that1.Field6) + } + if this.Field7 != that1.Field7 { + return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", this.Field7, that1.Field7) + } + if !this.Field8.Equal(&that1.Field8) { + return fmt.Errorf("Field8 this(%v) Not Equal that(%v)", this.Field8, that1.Field8) + } + if this.Field13 != that1.Field13 { + return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", this.Field13, that1.Field13) + } + if this.Field14 != that1.Field14 { + return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", this.Field14, that1.Field14) + } + if !bytes.Equal(this.Field15, that1.Field15) { + return fmt.Errorf("Field15 this(%v) Not Equal that(%v)", this.Field15, that1.Field15) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NidOptStruct) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*NidOptStruct) + if !ok { + that2, ok := that.(NidOptStruct) + 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.Field1 != that1.Field1 { + return false + } + if this.Field2 != that1.Field2 { + return false + } + if !this.Field3.Equal(&that1.Field3) { + return false + } + if !this.Field4.Equal(&that1.Field4) { + return false + } + if this.Field6 != that1.Field6 { + return false + } + if this.Field7 != that1.Field7 { + return false + } + if !this.Field8.Equal(&that1.Field8) { + return false + } + if this.Field13 != that1.Field13 { + return false + } + if this.Field14 != that1.Field14 { + return false + } + if !bytes.Equal(this.Field15, that1.Field15) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NinOptStruct) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NinOptStruct) + if !ok { + that2, ok := that.(NinOptStruct) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NinOptStruct") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NinOptStruct but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NinOptStruct but is not nil && this == nil") + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) + } + } else if this.Field1 != nil { + return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") + } else if that1.Field1 != nil { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", *this.Field2, *that1.Field2) + } + } else if this.Field2 != nil { + return fmt.Errorf("this.Field2 == nil && that.Field2 != nil") + } else if that1.Field2 != nil { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) + } + if !this.Field3.Equal(that1.Field3) { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", this.Field3, that1.Field3) + } + if !this.Field4.Equal(that1.Field4) { + return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", this.Field4, that1.Field4) + } + if this.Field6 != nil && that1.Field6 != nil { + if *this.Field6 != *that1.Field6 { + return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", *this.Field6, *that1.Field6) + } + } else if this.Field6 != nil { + return fmt.Errorf("this.Field6 == nil && that.Field6 != nil") + } else if that1.Field6 != nil { + return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", this.Field6, that1.Field6) + } + if this.Field7 != nil && that1.Field7 != nil { + if *this.Field7 != *that1.Field7 { + return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", *this.Field7, *that1.Field7) + } + } else if this.Field7 != nil { + return fmt.Errorf("this.Field7 == nil && that.Field7 != nil") + } else if that1.Field7 != nil { + return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", this.Field7, that1.Field7) + } + if !this.Field8.Equal(that1.Field8) { + return fmt.Errorf("Field8 this(%v) Not Equal that(%v)", this.Field8, that1.Field8) + } + if this.Field13 != nil && that1.Field13 != nil { + if *this.Field13 != *that1.Field13 { + return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", *this.Field13, *that1.Field13) + } + } else if this.Field13 != nil { + return fmt.Errorf("this.Field13 == nil && that.Field13 != nil") + } else if that1.Field13 != nil { + return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", this.Field13, that1.Field13) + } + if this.Field14 != nil && that1.Field14 != nil { + if *this.Field14 != *that1.Field14 { + return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", *this.Field14, *that1.Field14) + } + } else if this.Field14 != nil { + return fmt.Errorf("this.Field14 == nil && that.Field14 != nil") + } else if that1.Field14 != nil { + return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", this.Field14, that1.Field14) + } + if !bytes.Equal(this.Field15, that1.Field15) { + return fmt.Errorf("Field15 this(%v) Not Equal that(%v)", this.Field15, that1.Field15) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NinOptStruct) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*NinOptStruct) + if !ok { + that2, ok := that.(NinOptStruct) + 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.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return false + } + } else if this.Field1 != nil { + return false + } else if that1.Field1 != nil { + return false + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + return false + } + } else if this.Field2 != nil { + return false + } else if that1.Field2 != nil { + return false + } + if !this.Field3.Equal(that1.Field3) { + return false + } + if !this.Field4.Equal(that1.Field4) { + return false + } + if this.Field6 != nil && that1.Field6 != nil { + if *this.Field6 != *that1.Field6 { + return false + } + } else if this.Field6 != nil { + return false + } else if that1.Field6 != nil { + return false + } + if this.Field7 != nil && that1.Field7 != nil { + if *this.Field7 != *that1.Field7 { + return false + } + } else if this.Field7 != nil { + return false + } else if that1.Field7 != nil { + return false + } + if !this.Field8.Equal(that1.Field8) { + return false + } + if this.Field13 != nil && that1.Field13 != nil { + if *this.Field13 != *that1.Field13 { + return false + } + } else if this.Field13 != nil { + return false + } else if that1.Field13 != nil { + return false + } + if this.Field14 != nil && that1.Field14 != nil { + if *this.Field14 != *that1.Field14 { + return false + } + } else if this.Field14 != nil { + return false + } else if that1.Field14 != nil { + return false + } + if !bytes.Equal(this.Field15, that1.Field15) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NidRepStruct) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NidRepStruct) + if !ok { + that2, ok := that.(NidRepStruct) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NidRepStruct") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NidRepStruct but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NidRepStruct but is not nil && this == nil") + } + if len(this.Field1) != len(that1.Field1) { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", len(this.Field1), len(that1.Field1)) + } + for i := range this.Field1 { + if this.Field1[i] != that1.Field1[i] { + return fmt.Errorf("Field1 this[%v](%v) Not Equal that[%v](%v)", i, this.Field1[i], i, that1.Field1[i]) + } + } + if len(this.Field2) != len(that1.Field2) { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", len(this.Field2), len(that1.Field2)) + } + for i := range this.Field2 { + if this.Field2[i] != that1.Field2[i] { + return fmt.Errorf("Field2 this[%v](%v) Not Equal that[%v](%v)", i, this.Field2[i], i, that1.Field2[i]) + } + } + if len(this.Field3) != len(that1.Field3) { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", len(this.Field3), len(that1.Field3)) + } + for i := range this.Field3 { + if !this.Field3[i].Equal(&that1.Field3[i]) { + return fmt.Errorf("Field3 this[%v](%v) Not Equal that[%v](%v)", i, this.Field3[i], i, that1.Field3[i]) + } + } + if len(this.Field4) != len(that1.Field4) { + return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", len(this.Field4), len(that1.Field4)) + } + for i := range this.Field4 { + if !this.Field4[i].Equal(&that1.Field4[i]) { + return fmt.Errorf("Field4 this[%v](%v) Not Equal that[%v](%v)", i, this.Field4[i], i, that1.Field4[i]) + } + } + if len(this.Field6) != len(that1.Field6) { + return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", len(this.Field6), len(that1.Field6)) + } + for i := range this.Field6 { + if this.Field6[i] != that1.Field6[i] { + return fmt.Errorf("Field6 this[%v](%v) Not Equal that[%v](%v)", i, this.Field6[i], i, that1.Field6[i]) + } + } + if len(this.Field7) != len(that1.Field7) { + return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", len(this.Field7), len(that1.Field7)) + } + for i := range this.Field7 { + if this.Field7[i] != that1.Field7[i] { + return fmt.Errorf("Field7 this[%v](%v) Not Equal that[%v](%v)", i, this.Field7[i], i, that1.Field7[i]) + } + } + if len(this.Field8) != len(that1.Field8) { + return fmt.Errorf("Field8 this(%v) Not Equal that(%v)", len(this.Field8), len(that1.Field8)) + } + for i := range this.Field8 { + if !this.Field8[i].Equal(&that1.Field8[i]) { + return fmt.Errorf("Field8 this[%v](%v) Not Equal that[%v](%v)", i, this.Field8[i], i, that1.Field8[i]) + } + } + if len(this.Field13) != len(that1.Field13) { + return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", len(this.Field13), len(that1.Field13)) + } + for i := range this.Field13 { + if this.Field13[i] != that1.Field13[i] { + return fmt.Errorf("Field13 this[%v](%v) Not Equal that[%v](%v)", i, this.Field13[i], i, that1.Field13[i]) + } + } + if len(this.Field14) != len(that1.Field14) { + return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", len(this.Field14), len(that1.Field14)) + } + for i := range this.Field14 { + if this.Field14[i] != that1.Field14[i] { + return fmt.Errorf("Field14 this[%v](%v) Not Equal that[%v](%v)", i, this.Field14[i], i, that1.Field14[i]) + } + } + if len(this.Field15) != len(that1.Field15) { + return fmt.Errorf("Field15 this(%v) Not Equal that(%v)", len(this.Field15), len(that1.Field15)) + } + for i := range this.Field15 { + if !bytes.Equal(this.Field15[i], that1.Field15[i]) { + return fmt.Errorf("Field15 this[%v](%v) Not Equal that[%v](%v)", i, this.Field15[i], i, that1.Field15[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NidRepStruct) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*NidRepStruct) + if !ok { + that2, ok := that.(NidRepStruct) + 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.Field1) != len(that1.Field1) { + return false + } + for i := range this.Field1 { + if this.Field1[i] != that1.Field1[i] { + return false + } + } + if len(this.Field2) != len(that1.Field2) { + return false + } + for i := range this.Field2 { + if this.Field2[i] != that1.Field2[i] { + return false + } + } + if len(this.Field3) != len(that1.Field3) { + return false + } + for i := range this.Field3 { + if !this.Field3[i].Equal(&that1.Field3[i]) { + return false + } + } + if len(this.Field4) != len(that1.Field4) { + return false + } + for i := range this.Field4 { + if !this.Field4[i].Equal(&that1.Field4[i]) { + return false + } + } + if len(this.Field6) != len(that1.Field6) { + return false + } + for i := range this.Field6 { + if this.Field6[i] != that1.Field6[i] { + return false + } + } + if len(this.Field7) != len(that1.Field7) { + return false + } + for i := range this.Field7 { + if this.Field7[i] != that1.Field7[i] { + return false + } + } + if len(this.Field8) != len(that1.Field8) { + return false + } + for i := range this.Field8 { + if !this.Field8[i].Equal(&that1.Field8[i]) { + return false + } + } + if len(this.Field13) != len(that1.Field13) { + return false + } + for i := range this.Field13 { + if this.Field13[i] != that1.Field13[i] { + return false + } + } + if len(this.Field14) != len(that1.Field14) { + return false + } + for i := range this.Field14 { + if this.Field14[i] != that1.Field14[i] { + return false + } + } + if len(this.Field15) != len(that1.Field15) { + return false + } + for i := range this.Field15 { + if !bytes.Equal(this.Field15[i], that1.Field15[i]) { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NinRepStruct) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NinRepStruct) + if !ok { + that2, ok := that.(NinRepStruct) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NinRepStruct") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NinRepStruct but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NinRepStruct but is not nil && this == nil") + } + if len(this.Field1) != len(that1.Field1) { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", len(this.Field1), len(that1.Field1)) + } + for i := range this.Field1 { + if this.Field1[i] != that1.Field1[i] { + return fmt.Errorf("Field1 this[%v](%v) Not Equal that[%v](%v)", i, this.Field1[i], i, that1.Field1[i]) + } + } + if len(this.Field2) != len(that1.Field2) { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", len(this.Field2), len(that1.Field2)) + } + for i := range this.Field2 { + if this.Field2[i] != that1.Field2[i] { + return fmt.Errorf("Field2 this[%v](%v) Not Equal that[%v](%v)", i, this.Field2[i], i, that1.Field2[i]) + } + } + if len(this.Field3) != len(that1.Field3) { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", len(this.Field3), len(that1.Field3)) + } + for i := range this.Field3 { + if !this.Field3[i].Equal(that1.Field3[i]) { + return fmt.Errorf("Field3 this[%v](%v) Not Equal that[%v](%v)", i, this.Field3[i], i, that1.Field3[i]) + } + } + if len(this.Field4) != len(that1.Field4) { + return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", len(this.Field4), len(that1.Field4)) + } + for i := range this.Field4 { + if !this.Field4[i].Equal(that1.Field4[i]) { + return fmt.Errorf("Field4 this[%v](%v) Not Equal that[%v](%v)", i, this.Field4[i], i, that1.Field4[i]) + } + } + if len(this.Field6) != len(that1.Field6) { + return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", len(this.Field6), len(that1.Field6)) + } + for i := range this.Field6 { + if this.Field6[i] != that1.Field6[i] { + return fmt.Errorf("Field6 this[%v](%v) Not Equal that[%v](%v)", i, this.Field6[i], i, that1.Field6[i]) + } + } + if len(this.Field7) != len(that1.Field7) { + return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", len(this.Field7), len(that1.Field7)) + } + for i := range this.Field7 { + if this.Field7[i] != that1.Field7[i] { + return fmt.Errorf("Field7 this[%v](%v) Not Equal that[%v](%v)", i, this.Field7[i], i, that1.Field7[i]) + } + } + if len(this.Field8) != len(that1.Field8) { + return fmt.Errorf("Field8 this(%v) Not Equal that(%v)", len(this.Field8), len(that1.Field8)) + } + for i := range this.Field8 { + if !this.Field8[i].Equal(that1.Field8[i]) { + return fmt.Errorf("Field8 this[%v](%v) Not Equal that[%v](%v)", i, this.Field8[i], i, that1.Field8[i]) + } + } + if len(this.Field13) != len(that1.Field13) { + return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", len(this.Field13), len(that1.Field13)) + } + for i := range this.Field13 { + if this.Field13[i] != that1.Field13[i] { + return fmt.Errorf("Field13 this[%v](%v) Not Equal that[%v](%v)", i, this.Field13[i], i, that1.Field13[i]) + } + } + if len(this.Field14) != len(that1.Field14) { + return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", len(this.Field14), len(that1.Field14)) + } + for i := range this.Field14 { + if this.Field14[i] != that1.Field14[i] { + return fmt.Errorf("Field14 this[%v](%v) Not Equal that[%v](%v)", i, this.Field14[i], i, that1.Field14[i]) + } + } + if len(this.Field15) != len(that1.Field15) { + return fmt.Errorf("Field15 this(%v) Not Equal that(%v)", len(this.Field15), len(that1.Field15)) + } + for i := range this.Field15 { + if !bytes.Equal(this.Field15[i], that1.Field15[i]) { + return fmt.Errorf("Field15 this[%v](%v) Not Equal that[%v](%v)", i, this.Field15[i], i, that1.Field15[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NinRepStruct) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*NinRepStruct) + if !ok { + that2, ok := that.(NinRepStruct) + 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.Field1) != len(that1.Field1) { + return false + } + for i := range this.Field1 { + if this.Field1[i] != that1.Field1[i] { + return false + } + } + if len(this.Field2) != len(that1.Field2) { + return false + } + for i := range this.Field2 { + if this.Field2[i] != that1.Field2[i] { + return false + } + } + if len(this.Field3) != len(that1.Field3) { + return false + } + for i := range this.Field3 { + if !this.Field3[i].Equal(that1.Field3[i]) { + return false + } + } + if len(this.Field4) != len(that1.Field4) { + return false + } + for i := range this.Field4 { + if !this.Field4[i].Equal(that1.Field4[i]) { + return false + } + } + if len(this.Field6) != len(that1.Field6) { + return false + } + for i := range this.Field6 { + if this.Field6[i] != that1.Field6[i] { + return false + } + } + if len(this.Field7) != len(that1.Field7) { + return false + } + for i := range this.Field7 { + if this.Field7[i] != that1.Field7[i] { + return false + } + } + if len(this.Field8) != len(that1.Field8) { + return false + } + for i := range this.Field8 { + if !this.Field8[i].Equal(that1.Field8[i]) { + return false + } + } + if len(this.Field13) != len(that1.Field13) { + return false + } + for i := range this.Field13 { + if this.Field13[i] != that1.Field13[i] { + return false + } + } + if len(this.Field14) != len(that1.Field14) { + return false + } + for i := range this.Field14 { + if this.Field14[i] != that1.Field14[i] { + return false + } + } + if len(this.Field15) != len(that1.Field15) { + return false + } + for i := range this.Field15 { + if !bytes.Equal(this.Field15[i], that1.Field15[i]) { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NidEmbeddedStruct) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NidEmbeddedStruct) + if !ok { + that2, ok := that.(NidEmbeddedStruct) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NidEmbeddedStruct") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NidEmbeddedStruct but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NidEmbeddedStruct but is not nil && this == nil") + } + if !this.NidOptNative.Equal(that1.NidOptNative) { + return fmt.Errorf("NidOptNative this(%v) Not Equal that(%v)", this.NidOptNative, that1.NidOptNative) + } + if !this.Field200.Equal(&that1.Field200) { + return fmt.Errorf("Field200 this(%v) Not Equal that(%v)", this.Field200, that1.Field200) + } + if this.Field210 != that1.Field210 { + return fmt.Errorf("Field210 this(%v) Not Equal that(%v)", this.Field210, that1.Field210) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NidEmbeddedStruct) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*NidEmbeddedStruct) + if !ok { + that2, ok := that.(NidEmbeddedStruct) + 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.NidOptNative.Equal(that1.NidOptNative) { + return false + } + if !this.Field200.Equal(&that1.Field200) { + return false + } + if this.Field210 != that1.Field210 { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NinEmbeddedStruct) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NinEmbeddedStruct) + if !ok { + that2, ok := that.(NinEmbeddedStruct) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NinEmbeddedStruct") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NinEmbeddedStruct but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NinEmbeddedStruct but is not nil && this == nil") + } + if !this.NidOptNative.Equal(that1.NidOptNative) { + return fmt.Errorf("NidOptNative this(%v) Not Equal that(%v)", this.NidOptNative, that1.NidOptNative) + } + if !this.Field200.Equal(that1.Field200) { + return fmt.Errorf("Field200 this(%v) Not Equal that(%v)", this.Field200, that1.Field200) + } + if this.Field210 != nil && that1.Field210 != nil { + if *this.Field210 != *that1.Field210 { + return fmt.Errorf("Field210 this(%v) Not Equal that(%v)", *this.Field210, *that1.Field210) + } + } else if this.Field210 != nil { + return fmt.Errorf("this.Field210 == nil && that.Field210 != nil") + } else if that1.Field210 != nil { + return fmt.Errorf("Field210 this(%v) Not Equal that(%v)", this.Field210, that1.Field210) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NinEmbeddedStruct) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*NinEmbeddedStruct) + if !ok { + that2, ok := that.(NinEmbeddedStruct) + 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.NidOptNative.Equal(that1.NidOptNative) { + return false + } + if !this.Field200.Equal(that1.Field200) { + return false + } + if this.Field210 != nil && that1.Field210 != nil { + if *this.Field210 != *that1.Field210 { + return false + } + } else if this.Field210 != nil { + return false + } else if that1.Field210 != nil { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NidNestedStruct) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NidNestedStruct) + if !ok { + that2, ok := that.(NidNestedStruct) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NidNestedStruct") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NidNestedStruct but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NidNestedStruct but is not nil && this == nil") + } + if !this.Field1.Equal(&that1.Field1) { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) + } + if len(this.Field2) != len(that1.Field2) { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", len(this.Field2), len(that1.Field2)) + } + for i := range this.Field2 { + if !this.Field2[i].Equal(&that1.Field2[i]) { + return fmt.Errorf("Field2 this[%v](%v) Not Equal that[%v](%v)", i, this.Field2[i], i, that1.Field2[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NidNestedStruct) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*NidNestedStruct) + if !ok { + that2, ok := that.(NidNestedStruct) + 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.Field1.Equal(&that1.Field1) { + return false + } + if len(this.Field2) != len(that1.Field2) { + return false + } + for i := range this.Field2 { + if !this.Field2[i].Equal(&that1.Field2[i]) { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NinNestedStruct) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NinNestedStruct) + if !ok { + that2, ok := that.(NinNestedStruct) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NinNestedStruct") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NinNestedStruct but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NinNestedStruct but is not nil && this == nil") + } + if !this.Field1.Equal(that1.Field1) { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) + } + if len(this.Field2) != len(that1.Field2) { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", len(this.Field2), len(that1.Field2)) + } + for i := range this.Field2 { + if !this.Field2[i].Equal(that1.Field2[i]) { + return fmt.Errorf("Field2 this[%v](%v) Not Equal that[%v](%v)", i, this.Field2[i], i, that1.Field2[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NinNestedStruct) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*NinNestedStruct) + if !ok { + that2, ok := that.(NinNestedStruct) + 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.Field1.Equal(that1.Field1) { + return false + } + if len(this.Field2) != len(that1.Field2) { + return false + } + for i := range this.Field2 { + if !this.Field2[i].Equal(that1.Field2[i]) { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NidOptCustom) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NidOptCustom) + if !ok { + that2, ok := that.(NidOptCustom) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NidOptCustom") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NidOptCustom but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NidOptCustom 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.Value.Equal(that1.Value) { + return fmt.Errorf("Value this(%v) Not Equal that(%v)", this.Value, that1.Value) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NidOptCustom) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*NidOptCustom) + if !ok { + that2, ok := that.(NidOptCustom) + 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.Value.Equal(that1.Value) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *CustomDash) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*CustomDash) + if !ok { + that2, ok := that.(CustomDash) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *CustomDash") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *CustomDash but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *CustomDash but is not nil && this == nil") + } + if that1.Value == nil { + if this.Value != nil { + return fmt.Errorf("this.Value != nil && that1.Value == nil") + } + } else if !this.Value.Equal(*that1.Value) { + return fmt.Errorf("Value this(%v) Not Equal that(%v)", this.Value, that1.Value) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *CustomDash) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*CustomDash) + if !ok { + that2, ok := that.(CustomDash) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + if this == nil { + return true + } + return false + } else if this == nil { + return false + } + if that1.Value == nil { + if this.Value != nil { + return false + } + } else if !this.Value.Equal(*that1.Value) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NinOptCustom) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NinOptCustom) + if !ok { + that2, ok := that.(NinOptCustom) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NinOptCustom") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NinOptCustom but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NinOptCustom but is not nil && this == nil") + } + if that1.Id == nil { + if this.Id != nil { + return fmt.Errorf("this.Id != nil && that1.Id == nil") + } + } else if !this.Id.Equal(*that1.Id) { + return fmt.Errorf("Id this(%v) Not Equal that(%v)", this.Id, that1.Id) + } + if that1.Value == nil { + if this.Value != nil { + return fmt.Errorf("this.Value != nil && that1.Value == nil") + } + } else if !this.Value.Equal(*that1.Value) { + return fmt.Errorf("Value this(%v) Not Equal that(%v)", this.Value, that1.Value) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NinOptCustom) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*NinOptCustom) + if !ok { + that2, ok := that.(NinOptCustom) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + if this == nil { + return true + } + return false + } else if this == nil { + return false + } + if that1.Id == nil { + if this.Id != nil { + return false + } + } else if !this.Id.Equal(*that1.Id) { + return false + } + if that1.Value == nil { + if this.Value != nil { + return false + } + } else if !this.Value.Equal(*that1.Value) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NidRepCustom) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NidRepCustom) + if !ok { + that2, ok := that.(NidRepCustom) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NidRepCustom") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NidRepCustom but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NidRepCustom but is not nil && this == nil") + } + if len(this.Id) != len(that1.Id) { + return fmt.Errorf("Id this(%v) Not Equal that(%v)", len(this.Id), len(that1.Id)) + } + for i := range this.Id { + if !this.Id[i].Equal(that1.Id[i]) { + return fmt.Errorf("Id this[%v](%v) Not Equal that[%v](%v)", i, this.Id[i], i, that1.Id[i]) + } + } + if len(this.Value) != len(that1.Value) { + return fmt.Errorf("Value this(%v) Not Equal that(%v)", len(this.Value), len(that1.Value)) + } + for i := range this.Value { + if !this.Value[i].Equal(that1.Value[i]) { + return fmt.Errorf("Value this[%v](%v) Not Equal that[%v](%v)", i, this.Value[i], i, that1.Value[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NidRepCustom) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*NidRepCustom) + if !ok { + that2, ok := that.(NidRepCustom) + 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.Id) != len(that1.Id) { + return false + } + for i := range this.Id { + if !this.Id[i].Equal(that1.Id[i]) { + return false + } + } + if len(this.Value) != len(that1.Value) { + return false + } + for i := range this.Value { + if !this.Value[i].Equal(that1.Value[i]) { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NinRepCustom) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NinRepCustom) + if !ok { + that2, ok := that.(NinRepCustom) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NinRepCustom") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NinRepCustom but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NinRepCustom but is not nil && this == nil") + } + if len(this.Id) != len(that1.Id) { + return fmt.Errorf("Id this(%v) Not Equal that(%v)", len(this.Id), len(that1.Id)) + } + for i := range this.Id { + if !this.Id[i].Equal(that1.Id[i]) { + return fmt.Errorf("Id this[%v](%v) Not Equal that[%v](%v)", i, this.Id[i], i, that1.Id[i]) + } + } + if len(this.Value) != len(that1.Value) { + return fmt.Errorf("Value this(%v) Not Equal that(%v)", len(this.Value), len(that1.Value)) + } + for i := range this.Value { + if !this.Value[i].Equal(that1.Value[i]) { + return fmt.Errorf("Value this[%v](%v) Not Equal that[%v](%v)", i, this.Value[i], i, that1.Value[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NinRepCustom) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*NinRepCustom) + if !ok { + that2, ok := that.(NinRepCustom) + 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.Id) != len(that1.Id) { + return false + } + for i := range this.Id { + if !this.Id[i].Equal(that1.Id[i]) { + return false + } + } + if len(this.Value) != len(that1.Value) { + return false + } + for i := range this.Value { + if !this.Value[i].Equal(that1.Value[i]) { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NinOptNativeUnion) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NinOptNativeUnion) + if !ok { + that2, ok := that.(NinOptNativeUnion) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NinOptNativeUnion") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NinOptNativeUnion but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NinOptNativeUnion but is not nil && this == nil") + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) + } + } else if this.Field1 != nil { + return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") + } else if that1.Field1 != nil { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", *this.Field2, *that1.Field2) + } + } else if this.Field2 != nil { + return fmt.Errorf("this.Field2 == nil && that.Field2 != nil") + } else if that1.Field2 != nil { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) + } + if this.Field3 != nil && that1.Field3 != nil { + if *this.Field3 != *that1.Field3 { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", *this.Field3, *that1.Field3) + } + } else if this.Field3 != nil { + return fmt.Errorf("this.Field3 == nil && that.Field3 != nil") + } else if that1.Field3 != nil { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", this.Field3, that1.Field3) + } + if this.Field4 != nil && that1.Field4 != nil { + if *this.Field4 != *that1.Field4 { + return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", *this.Field4, *that1.Field4) + } + } else if this.Field4 != nil { + return fmt.Errorf("this.Field4 == nil && that.Field4 != nil") + } else if that1.Field4 != nil { + return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", this.Field4, that1.Field4) + } + if this.Field5 != nil && that1.Field5 != nil { + if *this.Field5 != *that1.Field5 { + return fmt.Errorf("Field5 this(%v) Not Equal that(%v)", *this.Field5, *that1.Field5) + } + } else if this.Field5 != nil { + return fmt.Errorf("this.Field5 == nil && that.Field5 != nil") + } else if that1.Field5 != nil { + return fmt.Errorf("Field5 this(%v) Not Equal that(%v)", this.Field5, that1.Field5) + } + if this.Field6 != nil && that1.Field6 != nil { + if *this.Field6 != *that1.Field6 { + return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", *this.Field6, *that1.Field6) + } + } else if this.Field6 != nil { + return fmt.Errorf("this.Field6 == nil && that.Field6 != nil") + } else if that1.Field6 != nil { + return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", this.Field6, that1.Field6) + } + if this.Field13 != nil && that1.Field13 != nil { + if *this.Field13 != *that1.Field13 { + return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", *this.Field13, *that1.Field13) + } + } else if this.Field13 != nil { + return fmt.Errorf("this.Field13 == nil && that.Field13 != nil") + } else if that1.Field13 != nil { + return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", this.Field13, that1.Field13) + } + if this.Field14 != nil && that1.Field14 != nil { + if *this.Field14 != *that1.Field14 { + return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", *this.Field14, *that1.Field14) + } + } else if this.Field14 != nil { + return fmt.Errorf("this.Field14 == nil && that.Field14 != nil") + } else if that1.Field14 != nil { + return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", this.Field14, that1.Field14) + } + if !bytes.Equal(this.Field15, that1.Field15) { + return fmt.Errorf("Field15 this(%v) Not Equal that(%v)", this.Field15, that1.Field15) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NinOptNativeUnion) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*NinOptNativeUnion) + if !ok { + that2, ok := that.(NinOptNativeUnion) + 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.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return false + } + } else if this.Field1 != nil { + return false + } else if that1.Field1 != nil { + return false + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + return false + } + } else if this.Field2 != nil { + return false + } else if that1.Field2 != nil { + return false + } + if this.Field3 != nil && that1.Field3 != nil { + if *this.Field3 != *that1.Field3 { + return false + } + } else if this.Field3 != nil { + return false + } else if that1.Field3 != nil { + return false + } + if this.Field4 != nil && that1.Field4 != nil { + if *this.Field4 != *that1.Field4 { + return false + } + } else if this.Field4 != nil { + return false + } else if that1.Field4 != nil { + return false + } + if this.Field5 != nil && that1.Field5 != nil { + if *this.Field5 != *that1.Field5 { + return false + } + } else if this.Field5 != nil { + return false + } else if that1.Field5 != nil { + return false + } + if this.Field6 != nil && that1.Field6 != nil { + if *this.Field6 != *that1.Field6 { + return false + } + } else if this.Field6 != nil { + return false + } else if that1.Field6 != nil { + return false + } + if this.Field13 != nil && that1.Field13 != nil { + if *this.Field13 != *that1.Field13 { + return false + } + } else if this.Field13 != nil { + return false + } else if that1.Field13 != nil { + return false + } + if this.Field14 != nil && that1.Field14 != nil { + if *this.Field14 != *that1.Field14 { + return false + } + } else if this.Field14 != nil { + return false + } else if that1.Field14 != nil { + return false + } + if !bytes.Equal(this.Field15, that1.Field15) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NinOptStructUnion) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NinOptStructUnion) + if !ok { + that2, ok := that.(NinOptStructUnion) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NinOptStructUnion") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NinOptStructUnion but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NinOptStructUnion but is not nil && this == nil") + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) + } + } else if this.Field1 != nil { + return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") + } else if that1.Field1 != nil { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", *this.Field2, *that1.Field2) + } + } else if this.Field2 != nil { + return fmt.Errorf("this.Field2 == nil && that.Field2 != nil") + } else if that1.Field2 != nil { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) + } + if !this.Field3.Equal(that1.Field3) { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", this.Field3, that1.Field3) + } + if !this.Field4.Equal(that1.Field4) { + return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", this.Field4, that1.Field4) + } + if this.Field6 != nil && that1.Field6 != nil { + if *this.Field6 != *that1.Field6 { + return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", *this.Field6, *that1.Field6) + } + } else if this.Field6 != nil { + return fmt.Errorf("this.Field6 == nil && that.Field6 != nil") + } else if that1.Field6 != nil { + return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", this.Field6, that1.Field6) + } + if this.Field7 != nil && that1.Field7 != nil { + if *this.Field7 != *that1.Field7 { + return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", *this.Field7, *that1.Field7) + } + } else if this.Field7 != nil { + return fmt.Errorf("this.Field7 == nil && that.Field7 != nil") + } else if that1.Field7 != nil { + return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", this.Field7, that1.Field7) + } + if this.Field13 != nil && that1.Field13 != nil { + if *this.Field13 != *that1.Field13 { + return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", *this.Field13, *that1.Field13) + } + } else if this.Field13 != nil { + return fmt.Errorf("this.Field13 == nil && that.Field13 != nil") + } else if that1.Field13 != nil { + return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", this.Field13, that1.Field13) + } + if this.Field14 != nil && that1.Field14 != nil { + if *this.Field14 != *that1.Field14 { + return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", *this.Field14, *that1.Field14) + } + } else if this.Field14 != nil { + return fmt.Errorf("this.Field14 == nil && that.Field14 != nil") + } else if that1.Field14 != nil { + return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", this.Field14, that1.Field14) + } + if !bytes.Equal(this.Field15, that1.Field15) { + return fmt.Errorf("Field15 this(%v) Not Equal that(%v)", this.Field15, that1.Field15) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NinOptStructUnion) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*NinOptStructUnion) + if !ok { + that2, ok := that.(NinOptStructUnion) + 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.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return false + } + } else if this.Field1 != nil { + return false + } else if that1.Field1 != nil { + return false + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + return false + } + } else if this.Field2 != nil { + return false + } else if that1.Field2 != nil { + return false + } + if !this.Field3.Equal(that1.Field3) { + return false + } + if !this.Field4.Equal(that1.Field4) { + return false + } + if this.Field6 != nil && that1.Field6 != nil { + if *this.Field6 != *that1.Field6 { + return false + } + } else if this.Field6 != nil { + return false + } else if that1.Field6 != nil { + return false + } + if this.Field7 != nil && that1.Field7 != nil { + if *this.Field7 != *that1.Field7 { + return false + } + } else if this.Field7 != nil { + return false + } else if that1.Field7 != nil { + return false + } + if this.Field13 != nil && that1.Field13 != nil { + if *this.Field13 != *that1.Field13 { + return false + } + } else if this.Field13 != nil { + return false + } else if that1.Field13 != nil { + return false + } + if this.Field14 != nil && that1.Field14 != nil { + if *this.Field14 != *that1.Field14 { + return false + } + } else if this.Field14 != nil { + return false + } else if that1.Field14 != nil { + return false + } + if !bytes.Equal(this.Field15, that1.Field15) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NinEmbeddedStructUnion) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NinEmbeddedStructUnion) + if !ok { + that2, ok := that.(NinEmbeddedStructUnion) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NinEmbeddedStructUnion") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NinEmbeddedStructUnion but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NinEmbeddedStructUnion but is not nil && this == nil") + } + if !this.NidOptNative.Equal(that1.NidOptNative) { + return fmt.Errorf("NidOptNative this(%v) Not Equal that(%v)", this.NidOptNative, that1.NidOptNative) + } + if !this.Field200.Equal(that1.Field200) { + return fmt.Errorf("Field200 this(%v) Not Equal that(%v)", this.Field200, that1.Field200) + } + if this.Field210 != nil && that1.Field210 != nil { + if *this.Field210 != *that1.Field210 { + return fmt.Errorf("Field210 this(%v) Not Equal that(%v)", *this.Field210, *that1.Field210) + } + } else if this.Field210 != nil { + return fmt.Errorf("this.Field210 == nil && that.Field210 != nil") + } else if that1.Field210 != nil { + return fmt.Errorf("Field210 this(%v) Not Equal that(%v)", this.Field210, that1.Field210) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NinEmbeddedStructUnion) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*NinEmbeddedStructUnion) + if !ok { + that2, ok := that.(NinEmbeddedStructUnion) + 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.NidOptNative.Equal(that1.NidOptNative) { + return false + } + if !this.Field200.Equal(that1.Field200) { + return false + } + if this.Field210 != nil && that1.Field210 != nil { + if *this.Field210 != *that1.Field210 { + return false + } + } else if this.Field210 != nil { + return false + } else if that1.Field210 != nil { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NinNestedStructUnion) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NinNestedStructUnion) + if !ok { + that2, ok := that.(NinNestedStructUnion) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NinNestedStructUnion") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NinNestedStructUnion but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NinNestedStructUnion but is not nil && this == nil") + } + if !this.Field1.Equal(that1.Field1) { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) + } + if !this.Field2.Equal(that1.Field2) { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) + } + if !this.Field3.Equal(that1.Field3) { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", this.Field3, that1.Field3) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NinNestedStructUnion) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*NinNestedStructUnion) + if !ok { + that2, ok := that.(NinNestedStructUnion) + 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.Field1.Equal(that1.Field1) { + return false + } + if !this.Field2.Equal(that1.Field2) { + return false + } + if !this.Field3.Equal(that1.Field3) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *Tree) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*Tree) + if !ok { + that2, ok := that.(Tree) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *Tree") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *Tree but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *Tree but is not nil && this == nil") + } + if !this.Or.Equal(that1.Or) { + return fmt.Errorf("Or this(%v) Not Equal that(%v)", this.Or, that1.Or) + } + if !this.And.Equal(that1.And) { + return fmt.Errorf("And this(%v) Not Equal that(%v)", this.And, that1.And) + } + if !this.Leaf.Equal(that1.Leaf) { + return fmt.Errorf("Leaf this(%v) Not Equal that(%v)", this.Leaf, that1.Leaf) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *Tree) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*Tree) + if !ok { + that2, ok := that.(Tree) + 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.Or.Equal(that1.Or) { + return false + } + if !this.And.Equal(that1.And) { + return false + } + if !this.Leaf.Equal(that1.Leaf) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *OrBranch) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*OrBranch) + if !ok { + that2, ok := that.(OrBranch) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *OrBranch") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *OrBranch but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *OrBranch but is not nil && this == nil") + } + if !this.Left.Equal(&that1.Left) { + return fmt.Errorf("Left this(%v) Not Equal that(%v)", this.Left, that1.Left) + } + if !this.Right.Equal(&that1.Right) { + return fmt.Errorf("Right this(%v) Not Equal that(%v)", this.Right, that1.Right) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *OrBranch) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*OrBranch) + if !ok { + that2, ok := that.(OrBranch) + 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.Left.Equal(&that1.Left) { + return false + } + if !this.Right.Equal(&that1.Right) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *AndBranch) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*AndBranch) + if !ok { + that2, ok := that.(AndBranch) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *AndBranch") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *AndBranch but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *AndBranch but is not nil && this == nil") + } + if !this.Left.Equal(&that1.Left) { + return fmt.Errorf("Left this(%v) Not Equal that(%v)", this.Left, that1.Left) + } + if !this.Right.Equal(&that1.Right) { + return fmt.Errorf("Right this(%v) Not Equal that(%v)", this.Right, that1.Right) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *AndBranch) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*AndBranch) + if !ok { + that2, ok := that.(AndBranch) + 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.Left.Equal(&that1.Left) { + return false + } + if !this.Right.Equal(&that1.Right) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *Leaf) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*Leaf) + if !ok { + that2, ok := that.(Leaf) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *Leaf") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *Leaf but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *Leaf 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.StrValue != that1.StrValue { + return fmt.Errorf("StrValue this(%v) Not Equal that(%v)", this.StrValue, that1.StrValue) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *Leaf) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*Leaf) + if !ok { + that2, ok := that.(Leaf) + 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.StrValue != that1.StrValue { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *DeepTree) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*DeepTree) + if !ok { + that2, ok := that.(DeepTree) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *DeepTree") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *DeepTree but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *DeepTree but is not nil && this == nil") + } + if !this.Down.Equal(that1.Down) { + return fmt.Errorf("Down this(%v) Not Equal that(%v)", this.Down, that1.Down) + } + if !this.And.Equal(that1.And) { + return fmt.Errorf("And this(%v) Not Equal that(%v)", this.And, that1.And) + } + if !this.Leaf.Equal(that1.Leaf) { + return fmt.Errorf("Leaf this(%v) Not Equal that(%v)", this.Leaf, that1.Leaf) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *DeepTree) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*DeepTree) + if !ok { + that2, ok := that.(DeepTree) + 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.Down.Equal(that1.Down) { + return false + } + if !this.And.Equal(that1.And) { + return false + } + if !this.Leaf.Equal(that1.Leaf) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *ADeepBranch) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*ADeepBranch) + if !ok { + that2, ok := that.(ADeepBranch) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *ADeepBranch") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *ADeepBranch but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *ADeepBranch but is not nil && this == nil") + } + if !this.Down.Equal(&that1.Down) { + return fmt.Errorf("Down this(%v) Not Equal that(%v)", this.Down, that1.Down) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *ADeepBranch) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*ADeepBranch) + if !ok { + that2, ok := that.(ADeepBranch) + 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.Down.Equal(&that1.Down) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *AndDeepBranch) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*AndDeepBranch) + if !ok { + that2, ok := that.(AndDeepBranch) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *AndDeepBranch") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *AndDeepBranch but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *AndDeepBranch but is not nil && this == nil") + } + if !this.Left.Equal(&that1.Left) { + return fmt.Errorf("Left this(%v) Not Equal that(%v)", this.Left, that1.Left) + } + if !this.Right.Equal(&that1.Right) { + return fmt.Errorf("Right this(%v) Not Equal that(%v)", this.Right, that1.Right) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *AndDeepBranch) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*AndDeepBranch) + if !ok { + that2, ok := that.(AndDeepBranch) + 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.Left.Equal(&that1.Left) { + return false + } + if !this.Right.Equal(&that1.Right) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *DeepLeaf) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*DeepLeaf) + if !ok { + that2, ok := that.(DeepLeaf) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *DeepLeaf") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *DeepLeaf but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *DeepLeaf but is not nil && this == nil") + } + if !this.Tree.Equal(&that1.Tree) { + return fmt.Errorf("Tree this(%v) Not Equal that(%v)", this.Tree, that1.Tree) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *DeepLeaf) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*DeepLeaf) + if !ok { + that2, ok := that.(DeepLeaf) + 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.Tree.Equal(&that1.Tree) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *Nil) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*Nil) + if !ok { + that2, ok := that.(Nil) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *Nil") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *Nil but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *Nil but is not nil && this == nil") + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *Nil) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*Nil) + if !ok { + that2, ok := that.(Nil) + 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.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NidOptEnum) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NidOptEnum) + if !ok { + that2, ok := that.(NidOptEnum) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NidOptEnum") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NidOptEnum but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NidOptEnum but is not nil && this == nil") + } + if this.Field1 != that1.Field1 { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NidOptEnum) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*NidOptEnum) + if !ok { + that2, ok := that.(NidOptEnum) + 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.Field1 != that1.Field1 { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NinOptEnum) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NinOptEnum) + if !ok { + that2, ok := that.(NinOptEnum) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NinOptEnum") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NinOptEnum but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NinOptEnum but is not nil && this == nil") + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) + } + } else if this.Field1 != nil { + return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") + } else if that1.Field1 != nil { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", *this.Field2, *that1.Field2) + } + } else if this.Field2 != nil { + return fmt.Errorf("this.Field2 == nil && that.Field2 != nil") + } else if that1.Field2 != nil { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) + } + if this.Field3 != nil && that1.Field3 != nil { + if *this.Field3 != *that1.Field3 { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", *this.Field3, *that1.Field3) + } + } else if this.Field3 != nil { + return fmt.Errorf("this.Field3 == nil && that.Field3 != nil") + } else if that1.Field3 != nil { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", this.Field3, that1.Field3) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NinOptEnum) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*NinOptEnum) + if !ok { + that2, ok := that.(NinOptEnum) + 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.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return false + } + } else if this.Field1 != nil { + return false + } else if that1.Field1 != nil { + return false + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + return false + } + } else if this.Field2 != nil { + return false + } else if that1.Field2 != nil { + return false + } + if this.Field3 != nil && that1.Field3 != nil { + if *this.Field3 != *that1.Field3 { + return false + } + } else if this.Field3 != nil { + return false + } else if that1.Field3 != nil { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NidRepEnum) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NidRepEnum) + if !ok { + that2, ok := that.(NidRepEnum) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NidRepEnum") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NidRepEnum but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NidRepEnum but is not nil && this == nil") + } + if len(this.Field1) != len(that1.Field1) { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", len(this.Field1), len(that1.Field1)) + } + for i := range this.Field1 { + if this.Field1[i] != that1.Field1[i] { + return fmt.Errorf("Field1 this[%v](%v) Not Equal that[%v](%v)", i, this.Field1[i], i, that1.Field1[i]) + } + } + if len(this.Field2) != len(that1.Field2) { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", len(this.Field2), len(that1.Field2)) + } + for i := range this.Field2 { + if this.Field2[i] != that1.Field2[i] { + return fmt.Errorf("Field2 this[%v](%v) Not Equal that[%v](%v)", i, this.Field2[i], i, that1.Field2[i]) + } + } + if len(this.Field3) != len(that1.Field3) { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", len(this.Field3), len(that1.Field3)) + } + for i := range this.Field3 { + if this.Field3[i] != that1.Field3[i] { + return fmt.Errorf("Field3 this[%v](%v) Not Equal that[%v](%v)", i, this.Field3[i], i, that1.Field3[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NidRepEnum) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*NidRepEnum) + if !ok { + that2, ok := that.(NidRepEnum) + 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.Field1) != len(that1.Field1) { + return false + } + for i := range this.Field1 { + if this.Field1[i] != that1.Field1[i] { + return false + } + } + if len(this.Field2) != len(that1.Field2) { + return false + } + for i := range this.Field2 { + if this.Field2[i] != that1.Field2[i] { + return false + } + } + if len(this.Field3) != len(that1.Field3) { + return false + } + for i := range this.Field3 { + if this.Field3[i] != that1.Field3[i] { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NinRepEnum) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NinRepEnum) + if !ok { + that2, ok := that.(NinRepEnum) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NinRepEnum") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NinRepEnum but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NinRepEnum but is not nil && this == nil") + } + if len(this.Field1) != len(that1.Field1) { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", len(this.Field1), len(that1.Field1)) + } + for i := range this.Field1 { + if this.Field1[i] != that1.Field1[i] { + return fmt.Errorf("Field1 this[%v](%v) Not Equal that[%v](%v)", i, this.Field1[i], i, that1.Field1[i]) + } + } + if len(this.Field2) != len(that1.Field2) { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", len(this.Field2), len(that1.Field2)) + } + for i := range this.Field2 { + if this.Field2[i] != that1.Field2[i] { + return fmt.Errorf("Field2 this[%v](%v) Not Equal that[%v](%v)", i, this.Field2[i], i, that1.Field2[i]) + } + } + if len(this.Field3) != len(that1.Field3) { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", len(this.Field3), len(that1.Field3)) + } + for i := range this.Field3 { + if this.Field3[i] != that1.Field3[i] { + return fmt.Errorf("Field3 this[%v](%v) Not Equal that[%v](%v)", i, this.Field3[i], i, that1.Field3[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NinRepEnum) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*NinRepEnum) + if !ok { + that2, ok := that.(NinRepEnum) + 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.Field1) != len(that1.Field1) { + return false + } + for i := range this.Field1 { + if this.Field1[i] != that1.Field1[i] { + return false + } + } + if len(this.Field2) != len(that1.Field2) { + return false + } + for i := range this.Field2 { + if this.Field2[i] != that1.Field2[i] { + return false + } + } + if len(this.Field3) != len(that1.Field3) { + return false + } + for i := range this.Field3 { + if this.Field3[i] != that1.Field3[i] { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NinOptEnumDefault) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NinOptEnumDefault) + if !ok { + that2, ok := that.(NinOptEnumDefault) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NinOptEnumDefault") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NinOptEnumDefault but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NinOptEnumDefault but is not nil && this == nil") + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) + } + } else if this.Field1 != nil { + return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") + } else if that1.Field1 != nil { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", *this.Field2, *that1.Field2) + } + } else if this.Field2 != nil { + return fmt.Errorf("this.Field2 == nil && that.Field2 != nil") + } else if that1.Field2 != nil { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) + } + if this.Field3 != nil && that1.Field3 != nil { + if *this.Field3 != *that1.Field3 { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", *this.Field3, *that1.Field3) + } + } else if this.Field3 != nil { + return fmt.Errorf("this.Field3 == nil && that.Field3 != nil") + } else if that1.Field3 != nil { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", this.Field3, that1.Field3) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NinOptEnumDefault) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*NinOptEnumDefault) + if !ok { + that2, ok := that.(NinOptEnumDefault) + 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.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return false + } + } else if this.Field1 != nil { + return false + } else if that1.Field1 != nil { + return false + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + return false + } + } else if this.Field2 != nil { + return false + } else if that1.Field2 != nil { + return false + } + if this.Field3 != nil && that1.Field3 != nil { + if *this.Field3 != *that1.Field3 { + return false + } + } else if this.Field3 != nil { + return false + } else if that1.Field3 != nil { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *AnotherNinOptEnum) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*AnotherNinOptEnum) + if !ok { + that2, ok := that.(AnotherNinOptEnum) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *AnotherNinOptEnum") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *AnotherNinOptEnum but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *AnotherNinOptEnum but is not nil && this == nil") + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) + } + } else if this.Field1 != nil { + return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") + } else if that1.Field1 != nil { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", *this.Field2, *that1.Field2) + } + } else if this.Field2 != nil { + return fmt.Errorf("this.Field2 == nil && that.Field2 != nil") + } else if that1.Field2 != nil { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) + } + if this.Field3 != nil && that1.Field3 != nil { + if *this.Field3 != *that1.Field3 { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", *this.Field3, *that1.Field3) + } + } else if this.Field3 != nil { + return fmt.Errorf("this.Field3 == nil && that.Field3 != nil") + } else if that1.Field3 != nil { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", this.Field3, that1.Field3) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *AnotherNinOptEnum) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*AnotherNinOptEnum) + if !ok { + that2, ok := that.(AnotherNinOptEnum) + 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.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return false + } + } else if this.Field1 != nil { + return false + } else if that1.Field1 != nil { + return false + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + return false + } + } else if this.Field2 != nil { + return false + } else if that1.Field2 != nil { + return false + } + if this.Field3 != nil && that1.Field3 != nil { + if *this.Field3 != *that1.Field3 { + return false + } + } else if this.Field3 != nil { + return false + } else if that1.Field3 != nil { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *AnotherNinOptEnumDefault) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*AnotherNinOptEnumDefault) + if !ok { + that2, ok := that.(AnotherNinOptEnumDefault) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *AnotherNinOptEnumDefault") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *AnotherNinOptEnumDefault but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *AnotherNinOptEnumDefault but is not nil && this == nil") + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) + } + } else if this.Field1 != nil { + return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") + } else if that1.Field1 != nil { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", *this.Field2, *that1.Field2) + } + } else if this.Field2 != nil { + return fmt.Errorf("this.Field2 == nil && that.Field2 != nil") + } else if that1.Field2 != nil { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) + } + if this.Field3 != nil && that1.Field3 != nil { + if *this.Field3 != *that1.Field3 { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", *this.Field3, *that1.Field3) + } + } else if this.Field3 != nil { + return fmt.Errorf("this.Field3 == nil && that.Field3 != nil") + } else if that1.Field3 != nil { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", this.Field3, that1.Field3) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *AnotherNinOptEnumDefault) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*AnotherNinOptEnumDefault) + if !ok { + that2, ok := that.(AnotherNinOptEnumDefault) + 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.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return false + } + } else if this.Field1 != nil { + return false + } else if that1.Field1 != nil { + return false + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + return false + } + } else if this.Field2 != nil { + return false + } else if that1.Field2 != nil { + return false + } + if this.Field3 != nil && that1.Field3 != nil { + if *this.Field3 != *that1.Field3 { + return false + } + } else if this.Field3 != nil { + return false + } else if that1.Field3 != nil { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *Timer) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*Timer) + if !ok { + that2, ok := that.(Timer) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *Timer") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *Timer but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *Timer but is not nil && this == nil") + } + if this.Time1 != that1.Time1 { + return fmt.Errorf("Time1 this(%v) Not Equal that(%v)", this.Time1, that1.Time1) + } + if this.Time2 != that1.Time2 { + return fmt.Errorf("Time2 this(%v) Not Equal that(%v)", this.Time2, that1.Time2) + } + if !bytes.Equal(this.Data, that1.Data) { + return fmt.Errorf("Data this(%v) Not Equal that(%v)", this.Data, that1.Data) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *Timer) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*Timer) + if !ok { + that2, ok := that.(Timer) + 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.Time1 != that1.Time1 { + return false + } + if this.Time2 != that1.Time2 { + return false + } + if !bytes.Equal(this.Data, that1.Data) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *MyExtendable) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*MyExtendable) + if !ok { + that2, ok := that.(MyExtendable) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *MyExtendable") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *MyExtendable but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *MyExtendable but is not nil && this == nil") + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) + } + } else if this.Field1 != nil { + return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") + } else if that1.Field1 != nil { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) + } + for k, v := range this.XXX_extensions { + if v2, ok := that1.XXX_extensions[k]; ok { + if !v.Equal(&v2) { + return fmt.Errorf("XXX_extensions this[%v](%v) Not Equal that[%v](%v)", k, this.XXX_extensions[k], k, that1.XXX_extensions[k]) + } + } else { + return fmt.Errorf("XXX_extensions[%v] Not In that", k) + } + } + for k := range that1.XXX_extensions { + if _, ok := this.XXX_extensions[k]; !ok { + return fmt.Errorf("XXX_extensions[%v] Not In this", k) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *MyExtendable) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*MyExtendable) + if !ok { + that2, ok := that.(MyExtendable) + 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.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return false + } + } else if this.Field1 != nil { + return false + } else if that1.Field1 != nil { + return false + } + for k, v := range this.XXX_extensions { + if v2, ok := that1.XXX_extensions[k]; ok { + if !v.Equal(&v2) { + return false + } + } else { + return false + } + } + for k := range that1.XXX_extensions { + if _, ok := this.XXX_extensions[k]; !ok { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *OtherExtenable) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*OtherExtenable) + if !ok { + that2, ok := that.(OtherExtenable) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *OtherExtenable") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *OtherExtenable but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *OtherExtenable but is not nil && this == nil") + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", *this.Field2, *that1.Field2) + } + } else if this.Field2 != nil { + return fmt.Errorf("this.Field2 == nil && that.Field2 != nil") + } else if that1.Field2 != nil { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) + } + if this.Field13 != nil && that1.Field13 != nil { + if *this.Field13 != *that1.Field13 { + return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", *this.Field13, *that1.Field13) + } + } else if this.Field13 != nil { + return fmt.Errorf("this.Field13 == nil && that.Field13 != nil") + } else if that1.Field13 != nil { + return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", this.Field13, that1.Field13) + } + if !this.M.Equal(that1.M) { + return fmt.Errorf("M this(%v) Not Equal that(%v)", this.M, that1.M) + } + for k, v := range this.XXX_extensions { + if v2, ok := that1.XXX_extensions[k]; ok { + if !v.Equal(&v2) { + return fmt.Errorf("XXX_extensions this[%v](%v) Not Equal that[%v](%v)", k, this.XXX_extensions[k], k, that1.XXX_extensions[k]) + } + } else { + return fmt.Errorf("XXX_extensions[%v] Not In that", k) + } + } + for k := range that1.XXX_extensions { + if _, ok := this.XXX_extensions[k]; !ok { + return fmt.Errorf("XXX_extensions[%v] Not In this", k) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *OtherExtenable) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*OtherExtenable) + if !ok { + that2, ok := that.(OtherExtenable) + 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.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + return false + } + } else if this.Field2 != nil { + return false + } else if that1.Field2 != nil { + return false + } + if this.Field13 != nil && that1.Field13 != nil { + if *this.Field13 != *that1.Field13 { + return false + } + } else if this.Field13 != nil { + return false + } else if that1.Field13 != nil { + return false + } + if !this.M.Equal(that1.M) { + return false + } + for k, v := range this.XXX_extensions { + if v2, ok := that1.XXX_extensions[k]; ok { + if !v.Equal(&v2) { + return false + } + } else { + return false + } + } + for k := range that1.XXX_extensions { + if _, ok := this.XXX_extensions[k]; !ok { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NestedDefinition) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NestedDefinition) + if !ok { + that2, ok := that.(NestedDefinition) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NestedDefinition") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NestedDefinition but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NestedDefinition but is not nil && this == nil") + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) + } + } else if this.Field1 != nil { + return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") + } else if that1.Field1 != nil { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) + } + if this.EnumField != nil && that1.EnumField != nil { + if *this.EnumField != *that1.EnumField { + return fmt.Errorf("EnumField this(%v) Not Equal that(%v)", *this.EnumField, *that1.EnumField) + } + } else if this.EnumField != nil { + return fmt.Errorf("this.EnumField == nil && that.EnumField != nil") + } else if that1.EnumField != nil { + return fmt.Errorf("EnumField this(%v) Not Equal that(%v)", this.EnumField, that1.EnumField) + } + if !this.NNM.Equal(that1.NNM) { + return fmt.Errorf("NNM this(%v) Not Equal that(%v)", this.NNM, that1.NNM) + } + if !this.NM.Equal(that1.NM) { + return fmt.Errorf("NM this(%v) Not Equal that(%v)", this.NM, that1.NM) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NestedDefinition) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*NestedDefinition) + if !ok { + that2, ok := that.(NestedDefinition) + 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.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return false + } + } else if this.Field1 != nil { + return false + } else if that1.Field1 != nil { + return false + } + if this.EnumField != nil && that1.EnumField != nil { + if *this.EnumField != *that1.EnumField { + return false + } + } else if this.EnumField != nil { + return false + } else if that1.EnumField != nil { + return false + } + if !this.NNM.Equal(that1.NNM) { + return false + } + if !this.NM.Equal(that1.NM) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NestedDefinition_NestedMessage) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NestedDefinition_NestedMessage) + if !ok { + that2, ok := that.(NestedDefinition_NestedMessage) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NestedDefinition_NestedMessage") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NestedDefinition_NestedMessage but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NestedDefinition_NestedMessage but is not nil && this == nil") + } + if this.NestedField1 != nil && that1.NestedField1 != nil { + if *this.NestedField1 != *that1.NestedField1 { + return fmt.Errorf("NestedField1 this(%v) Not Equal that(%v)", *this.NestedField1, *that1.NestedField1) + } + } else if this.NestedField1 != nil { + return fmt.Errorf("this.NestedField1 == nil && that.NestedField1 != nil") + } else if that1.NestedField1 != nil { + return fmt.Errorf("NestedField1 this(%v) Not Equal that(%v)", this.NestedField1, that1.NestedField1) + } + if !this.NNM.Equal(that1.NNM) { + return fmt.Errorf("NNM this(%v) Not Equal that(%v)", this.NNM, that1.NNM) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NestedDefinition_NestedMessage) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*NestedDefinition_NestedMessage) + if !ok { + that2, ok := that.(NestedDefinition_NestedMessage) + 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.NestedField1 != nil && that1.NestedField1 != nil { + if *this.NestedField1 != *that1.NestedField1 { + return false + } + } else if this.NestedField1 != nil { + return false + } else if that1.NestedField1 != nil { + return false + } + if !this.NNM.Equal(that1.NNM) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NestedDefinition_NestedMessage_NestedNestedMsg) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NestedDefinition_NestedMessage_NestedNestedMsg) + if !ok { + that2, ok := that.(NestedDefinition_NestedMessage_NestedNestedMsg) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NestedDefinition_NestedMessage_NestedNestedMsg") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NestedDefinition_NestedMessage_NestedNestedMsg but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NestedDefinition_NestedMessage_NestedNestedMsg but is not nil && this == nil") + } + if this.NestedNestedField1 != nil && that1.NestedNestedField1 != nil { + if *this.NestedNestedField1 != *that1.NestedNestedField1 { + return fmt.Errorf("NestedNestedField1 this(%v) Not Equal that(%v)", *this.NestedNestedField1, *that1.NestedNestedField1) + } + } else if this.NestedNestedField1 != nil { + return fmt.Errorf("this.NestedNestedField1 == nil && that.NestedNestedField1 != nil") + } else if that1.NestedNestedField1 != nil { + return fmt.Errorf("NestedNestedField1 this(%v) Not Equal that(%v)", this.NestedNestedField1, that1.NestedNestedField1) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NestedDefinition_NestedMessage_NestedNestedMsg) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*NestedDefinition_NestedMessage_NestedNestedMsg) + if !ok { + that2, ok := that.(NestedDefinition_NestedMessage_NestedNestedMsg) + 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.NestedNestedField1 != nil && that1.NestedNestedField1 != nil { + if *this.NestedNestedField1 != *that1.NestedNestedField1 { + return false + } + } else if this.NestedNestedField1 != nil { + return false + } else if that1.NestedNestedField1 != nil { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NestedScope) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NestedScope) + if !ok { + that2, ok := that.(NestedScope) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NestedScope") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NestedScope but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NestedScope but is not nil && this == nil") + } + if !this.A.Equal(that1.A) { + return fmt.Errorf("A this(%v) Not Equal that(%v)", this.A, that1.A) + } + if this.B != nil && that1.B != nil { + if *this.B != *that1.B { + return fmt.Errorf("B this(%v) Not Equal that(%v)", *this.B, *that1.B) + } + } else if this.B != nil { + return fmt.Errorf("this.B == nil && that.B != nil") + } else if that1.B != nil { + return fmt.Errorf("B this(%v) Not Equal that(%v)", this.B, that1.B) + } + if !this.C.Equal(that1.C) { + return fmt.Errorf("C this(%v) Not Equal that(%v)", this.C, that1.C) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NestedScope) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*NestedScope) + if !ok { + that2, ok := that.(NestedScope) + 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.A.Equal(that1.A) { + return false + } + if this.B != nil && that1.B != nil { + if *this.B != *that1.B { + return false + } + } else if this.B != nil { + return false + } else if that1.B != nil { + return false + } + if !this.C.Equal(that1.C) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NinOptNativeDefault) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NinOptNativeDefault) + if !ok { + that2, ok := that.(NinOptNativeDefault) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NinOptNativeDefault") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NinOptNativeDefault but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NinOptNativeDefault but is not nil && this == nil") + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) + } + } else if this.Field1 != nil { + return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") + } else if that1.Field1 != nil { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", *this.Field2, *that1.Field2) + } + } else if this.Field2 != nil { + return fmt.Errorf("this.Field2 == nil && that.Field2 != nil") + } else if that1.Field2 != nil { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) + } + if this.Field3 != nil && that1.Field3 != nil { + if *this.Field3 != *that1.Field3 { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", *this.Field3, *that1.Field3) + } + } else if this.Field3 != nil { + return fmt.Errorf("this.Field3 == nil && that.Field3 != nil") + } else if that1.Field3 != nil { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", this.Field3, that1.Field3) + } + if this.Field4 != nil && that1.Field4 != nil { + if *this.Field4 != *that1.Field4 { + return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", *this.Field4, *that1.Field4) + } + } else if this.Field4 != nil { + return fmt.Errorf("this.Field4 == nil && that.Field4 != nil") + } else if that1.Field4 != nil { + return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", this.Field4, that1.Field4) + } + if this.Field5 != nil && that1.Field5 != nil { + if *this.Field5 != *that1.Field5 { + return fmt.Errorf("Field5 this(%v) Not Equal that(%v)", *this.Field5, *that1.Field5) + } + } else if this.Field5 != nil { + return fmt.Errorf("this.Field5 == nil && that.Field5 != nil") + } else if that1.Field5 != nil { + return fmt.Errorf("Field5 this(%v) Not Equal that(%v)", this.Field5, that1.Field5) + } + if this.Field6 != nil && that1.Field6 != nil { + if *this.Field6 != *that1.Field6 { + return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", *this.Field6, *that1.Field6) + } + } else if this.Field6 != nil { + return fmt.Errorf("this.Field6 == nil && that.Field6 != nil") + } else if that1.Field6 != nil { + return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", this.Field6, that1.Field6) + } + if this.Field7 != nil && that1.Field7 != nil { + if *this.Field7 != *that1.Field7 { + return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", *this.Field7, *that1.Field7) + } + } else if this.Field7 != nil { + return fmt.Errorf("this.Field7 == nil && that.Field7 != nil") + } else if that1.Field7 != nil { + return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", this.Field7, that1.Field7) + } + if this.Field8 != nil && that1.Field8 != nil { + if *this.Field8 != *that1.Field8 { + return fmt.Errorf("Field8 this(%v) Not Equal that(%v)", *this.Field8, *that1.Field8) + } + } else if this.Field8 != nil { + return fmt.Errorf("this.Field8 == nil && that.Field8 != nil") + } else if that1.Field8 != nil { + return fmt.Errorf("Field8 this(%v) Not Equal that(%v)", this.Field8, that1.Field8) + } + if this.Field9 != nil && that1.Field9 != nil { + if *this.Field9 != *that1.Field9 { + return fmt.Errorf("Field9 this(%v) Not Equal that(%v)", *this.Field9, *that1.Field9) + } + } else if this.Field9 != nil { + return fmt.Errorf("this.Field9 == nil && that.Field9 != nil") + } else if that1.Field9 != nil { + return fmt.Errorf("Field9 this(%v) Not Equal that(%v)", this.Field9, that1.Field9) + } + if this.Field10 != nil && that1.Field10 != nil { + if *this.Field10 != *that1.Field10 { + return fmt.Errorf("Field10 this(%v) Not Equal that(%v)", *this.Field10, *that1.Field10) + } + } else if this.Field10 != nil { + return fmt.Errorf("this.Field10 == nil && that.Field10 != nil") + } else if that1.Field10 != nil { + return fmt.Errorf("Field10 this(%v) Not Equal that(%v)", this.Field10, that1.Field10) + } + if this.Field11 != nil && that1.Field11 != nil { + if *this.Field11 != *that1.Field11 { + return fmt.Errorf("Field11 this(%v) Not Equal that(%v)", *this.Field11, *that1.Field11) + } + } else if this.Field11 != nil { + return fmt.Errorf("this.Field11 == nil && that.Field11 != nil") + } else if that1.Field11 != nil { + return fmt.Errorf("Field11 this(%v) Not Equal that(%v)", this.Field11, that1.Field11) + } + if this.Field12 != nil && that1.Field12 != nil { + if *this.Field12 != *that1.Field12 { + return fmt.Errorf("Field12 this(%v) Not Equal that(%v)", *this.Field12, *that1.Field12) + } + } else if this.Field12 != nil { + return fmt.Errorf("this.Field12 == nil && that.Field12 != nil") + } else if that1.Field12 != nil { + return fmt.Errorf("Field12 this(%v) Not Equal that(%v)", this.Field12, that1.Field12) + } + if this.Field13 != nil && that1.Field13 != nil { + if *this.Field13 != *that1.Field13 { + return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", *this.Field13, *that1.Field13) + } + } else if this.Field13 != nil { + return fmt.Errorf("this.Field13 == nil && that.Field13 != nil") + } else if that1.Field13 != nil { + return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", this.Field13, that1.Field13) + } + if this.Field14 != nil && that1.Field14 != nil { + if *this.Field14 != *that1.Field14 { + return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", *this.Field14, *that1.Field14) + } + } else if this.Field14 != nil { + return fmt.Errorf("this.Field14 == nil && that.Field14 != nil") + } else if that1.Field14 != nil { + return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", this.Field14, that1.Field14) + } + if !bytes.Equal(this.Field15, that1.Field15) { + return fmt.Errorf("Field15 this(%v) Not Equal that(%v)", this.Field15, that1.Field15) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NinOptNativeDefault) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*NinOptNativeDefault) + if !ok { + that2, ok := that.(NinOptNativeDefault) + 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.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return false + } + } else if this.Field1 != nil { + return false + } else if that1.Field1 != nil { + return false + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + return false + } + } else if this.Field2 != nil { + return false + } else if that1.Field2 != nil { + return false + } + if this.Field3 != nil && that1.Field3 != nil { + if *this.Field3 != *that1.Field3 { + return false + } + } else if this.Field3 != nil { + return false + } else if that1.Field3 != nil { + return false + } + if this.Field4 != nil && that1.Field4 != nil { + if *this.Field4 != *that1.Field4 { + return false + } + } else if this.Field4 != nil { + return false + } else if that1.Field4 != nil { + return false + } + if this.Field5 != nil && that1.Field5 != nil { + if *this.Field5 != *that1.Field5 { + return false + } + } else if this.Field5 != nil { + return false + } else if that1.Field5 != nil { + return false + } + if this.Field6 != nil && that1.Field6 != nil { + if *this.Field6 != *that1.Field6 { + return false + } + } else if this.Field6 != nil { + return false + } else if that1.Field6 != nil { + return false + } + if this.Field7 != nil && that1.Field7 != nil { + if *this.Field7 != *that1.Field7 { + return false + } + } else if this.Field7 != nil { + return false + } else if that1.Field7 != nil { + return false + } + if this.Field8 != nil && that1.Field8 != nil { + if *this.Field8 != *that1.Field8 { + return false + } + } else if this.Field8 != nil { + return false + } else if that1.Field8 != nil { + return false + } + if this.Field9 != nil && that1.Field9 != nil { + if *this.Field9 != *that1.Field9 { + return false + } + } else if this.Field9 != nil { + return false + } else if that1.Field9 != nil { + return false + } + if this.Field10 != nil && that1.Field10 != nil { + if *this.Field10 != *that1.Field10 { + return false + } + } else if this.Field10 != nil { + return false + } else if that1.Field10 != nil { + return false + } + if this.Field11 != nil && that1.Field11 != nil { + if *this.Field11 != *that1.Field11 { + return false + } + } else if this.Field11 != nil { + return false + } else if that1.Field11 != nil { + return false + } + if this.Field12 != nil && that1.Field12 != nil { + if *this.Field12 != *that1.Field12 { + return false + } + } else if this.Field12 != nil { + return false + } else if that1.Field12 != nil { + return false + } + if this.Field13 != nil && that1.Field13 != nil { + if *this.Field13 != *that1.Field13 { + return false + } + } else if this.Field13 != nil { + return false + } else if that1.Field13 != nil { + return false + } + if this.Field14 != nil && that1.Field14 != nil { + if *this.Field14 != *that1.Field14 { + return false + } + } else if this.Field14 != nil { + return false + } else if that1.Field14 != nil { + return false + } + if !bytes.Equal(this.Field15, that1.Field15) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *CustomContainer) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*CustomContainer) + if !ok { + that2, ok := that.(CustomContainer) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *CustomContainer") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *CustomContainer but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *CustomContainer but is not nil && this == nil") + } + if !this.CustomStruct.Equal(&that1.CustomStruct) { + return fmt.Errorf("CustomStruct this(%v) Not Equal that(%v)", this.CustomStruct, that1.CustomStruct) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *CustomContainer) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*CustomContainer) + if !ok { + that2, ok := that.(CustomContainer) + 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.CustomStruct.Equal(&that1.CustomStruct) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *CustomNameNidOptNative) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*CustomNameNidOptNative) + if !ok { + that2, ok := that.(CustomNameNidOptNative) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *CustomNameNidOptNative") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *CustomNameNidOptNative but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *CustomNameNidOptNative but is not nil && this == nil") + } + if this.FieldA != that1.FieldA { + return fmt.Errorf("FieldA this(%v) Not Equal that(%v)", this.FieldA, that1.FieldA) + } + if this.FieldB != that1.FieldB { + return fmt.Errorf("FieldB this(%v) Not Equal that(%v)", this.FieldB, that1.FieldB) + } + if this.FieldC != that1.FieldC { + return fmt.Errorf("FieldC this(%v) Not Equal that(%v)", this.FieldC, that1.FieldC) + } + if this.FieldD != that1.FieldD { + return fmt.Errorf("FieldD this(%v) Not Equal that(%v)", this.FieldD, that1.FieldD) + } + if this.FieldE != that1.FieldE { + return fmt.Errorf("FieldE this(%v) Not Equal that(%v)", this.FieldE, that1.FieldE) + } + if this.FieldF != that1.FieldF { + return fmt.Errorf("FieldF this(%v) Not Equal that(%v)", this.FieldF, that1.FieldF) + } + if this.FieldG != that1.FieldG { + return fmt.Errorf("FieldG this(%v) Not Equal that(%v)", this.FieldG, that1.FieldG) + } + if this.FieldH != that1.FieldH { + return fmt.Errorf("FieldH this(%v) Not Equal that(%v)", this.FieldH, that1.FieldH) + } + if this.FieldI != that1.FieldI { + return fmt.Errorf("FieldI this(%v) Not Equal that(%v)", this.FieldI, that1.FieldI) + } + if this.FieldJ != that1.FieldJ { + return fmt.Errorf("FieldJ this(%v) Not Equal that(%v)", this.FieldJ, that1.FieldJ) + } + if this.FieldK != that1.FieldK { + return fmt.Errorf("FieldK this(%v) Not Equal that(%v)", this.FieldK, that1.FieldK) + } + if this.FieldL != that1.FieldL { + return fmt.Errorf("FieldL this(%v) Not Equal that(%v)", this.FieldL, that1.FieldL) + } + if this.FieldM != that1.FieldM { + return fmt.Errorf("FieldM this(%v) Not Equal that(%v)", this.FieldM, that1.FieldM) + } + if this.FieldN != that1.FieldN { + return fmt.Errorf("FieldN this(%v) Not Equal that(%v)", this.FieldN, that1.FieldN) + } + if !bytes.Equal(this.FieldO, that1.FieldO) { + return fmt.Errorf("FieldO this(%v) Not Equal that(%v)", this.FieldO, that1.FieldO) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *CustomNameNidOptNative) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*CustomNameNidOptNative) + if !ok { + that2, ok := that.(CustomNameNidOptNative) + 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.FieldA != that1.FieldA { + return false + } + if this.FieldB != that1.FieldB { + return false + } + if this.FieldC != that1.FieldC { + return false + } + if this.FieldD != that1.FieldD { + return false + } + if this.FieldE != that1.FieldE { + return false + } + if this.FieldF != that1.FieldF { + return false + } + if this.FieldG != that1.FieldG { + return false + } + if this.FieldH != that1.FieldH { + return false + } + if this.FieldI != that1.FieldI { + return false + } + if this.FieldJ != that1.FieldJ { + return false + } + if this.FieldK != that1.FieldK { + return false + } + if this.FieldL != that1.FieldL { + return false + } + if this.FieldM != that1.FieldM { + return false + } + if this.FieldN != that1.FieldN { + return false + } + if !bytes.Equal(this.FieldO, that1.FieldO) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *CustomNameNinOptNative) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*CustomNameNinOptNative) + if !ok { + that2, ok := that.(CustomNameNinOptNative) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *CustomNameNinOptNative") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *CustomNameNinOptNative but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *CustomNameNinOptNative but is not nil && this == nil") + } + if this.FieldA != nil && that1.FieldA != nil { + if *this.FieldA != *that1.FieldA { + return fmt.Errorf("FieldA this(%v) Not Equal that(%v)", *this.FieldA, *that1.FieldA) + } + } else if this.FieldA != nil { + return fmt.Errorf("this.FieldA == nil && that.FieldA != nil") + } else if that1.FieldA != nil { + return fmt.Errorf("FieldA this(%v) Not Equal that(%v)", this.FieldA, that1.FieldA) + } + if this.FieldB != nil && that1.FieldB != nil { + if *this.FieldB != *that1.FieldB { + return fmt.Errorf("FieldB this(%v) Not Equal that(%v)", *this.FieldB, *that1.FieldB) + } + } else if this.FieldB != nil { + return fmt.Errorf("this.FieldB == nil && that.FieldB != nil") + } else if that1.FieldB != nil { + return fmt.Errorf("FieldB this(%v) Not Equal that(%v)", this.FieldB, that1.FieldB) + } + if this.FieldC != nil && that1.FieldC != nil { + if *this.FieldC != *that1.FieldC { + return fmt.Errorf("FieldC this(%v) Not Equal that(%v)", *this.FieldC, *that1.FieldC) + } + } else if this.FieldC != nil { + return fmt.Errorf("this.FieldC == nil && that.FieldC != nil") + } else if that1.FieldC != nil { + return fmt.Errorf("FieldC this(%v) Not Equal that(%v)", this.FieldC, that1.FieldC) + } + if this.FieldD != nil && that1.FieldD != nil { + if *this.FieldD != *that1.FieldD { + return fmt.Errorf("FieldD this(%v) Not Equal that(%v)", *this.FieldD, *that1.FieldD) + } + } else if this.FieldD != nil { + return fmt.Errorf("this.FieldD == nil && that.FieldD != nil") + } else if that1.FieldD != nil { + return fmt.Errorf("FieldD this(%v) Not Equal that(%v)", this.FieldD, that1.FieldD) + } + if this.FieldE != nil && that1.FieldE != nil { + if *this.FieldE != *that1.FieldE { + return fmt.Errorf("FieldE this(%v) Not Equal that(%v)", *this.FieldE, *that1.FieldE) + } + } else if this.FieldE != nil { + return fmt.Errorf("this.FieldE == nil && that.FieldE != nil") + } else if that1.FieldE != nil { + return fmt.Errorf("FieldE this(%v) Not Equal that(%v)", this.FieldE, that1.FieldE) + } + if this.FieldF != nil && that1.FieldF != nil { + if *this.FieldF != *that1.FieldF { + return fmt.Errorf("FieldF this(%v) Not Equal that(%v)", *this.FieldF, *that1.FieldF) + } + } else if this.FieldF != nil { + return fmt.Errorf("this.FieldF == nil && that.FieldF != nil") + } else if that1.FieldF != nil { + return fmt.Errorf("FieldF this(%v) Not Equal that(%v)", this.FieldF, that1.FieldF) + } + if this.FieldG != nil && that1.FieldG != nil { + if *this.FieldG != *that1.FieldG { + return fmt.Errorf("FieldG this(%v) Not Equal that(%v)", *this.FieldG, *that1.FieldG) + } + } else if this.FieldG != nil { + return fmt.Errorf("this.FieldG == nil && that.FieldG != nil") + } else if that1.FieldG != nil { + return fmt.Errorf("FieldG this(%v) Not Equal that(%v)", this.FieldG, that1.FieldG) + } + if this.FieldH != nil && that1.FieldH != nil { + if *this.FieldH != *that1.FieldH { + return fmt.Errorf("FieldH this(%v) Not Equal that(%v)", *this.FieldH, *that1.FieldH) + } + } else if this.FieldH != nil { + return fmt.Errorf("this.FieldH == nil && that.FieldH != nil") + } else if that1.FieldH != nil { + return fmt.Errorf("FieldH this(%v) Not Equal that(%v)", this.FieldH, that1.FieldH) + } + if this.FieldI != nil && that1.FieldI != nil { + if *this.FieldI != *that1.FieldI { + return fmt.Errorf("FieldI this(%v) Not Equal that(%v)", *this.FieldI, *that1.FieldI) + } + } else if this.FieldI != nil { + return fmt.Errorf("this.FieldI == nil && that.FieldI != nil") + } else if that1.FieldI != nil { + return fmt.Errorf("FieldI this(%v) Not Equal that(%v)", this.FieldI, that1.FieldI) + } + if this.FieldJ != nil && that1.FieldJ != nil { + if *this.FieldJ != *that1.FieldJ { + return fmt.Errorf("FieldJ this(%v) Not Equal that(%v)", *this.FieldJ, *that1.FieldJ) + } + } else if this.FieldJ != nil { + return fmt.Errorf("this.FieldJ == nil && that.FieldJ != nil") + } else if that1.FieldJ != nil { + return fmt.Errorf("FieldJ this(%v) Not Equal that(%v)", this.FieldJ, that1.FieldJ) + } + if this.FieldK != nil && that1.FieldK != nil { + if *this.FieldK != *that1.FieldK { + return fmt.Errorf("FieldK this(%v) Not Equal that(%v)", *this.FieldK, *that1.FieldK) + } + } else if this.FieldK != nil { + return fmt.Errorf("this.FieldK == nil && that.FieldK != nil") + } else if that1.FieldK != nil { + return fmt.Errorf("FieldK this(%v) Not Equal that(%v)", this.FieldK, that1.FieldK) + } + if this.FielL != nil && that1.FielL != nil { + if *this.FielL != *that1.FielL { + return fmt.Errorf("FielL this(%v) Not Equal that(%v)", *this.FielL, *that1.FielL) + } + } else if this.FielL != nil { + return fmt.Errorf("this.FielL == nil && that.FielL != nil") + } else if that1.FielL != nil { + return fmt.Errorf("FielL this(%v) Not Equal that(%v)", this.FielL, that1.FielL) + } + if this.FieldM != nil && that1.FieldM != nil { + if *this.FieldM != *that1.FieldM { + return fmt.Errorf("FieldM this(%v) Not Equal that(%v)", *this.FieldM, *that1.FieldM) + } + } else if this.FieldM != nil { + return fmt.Errorf("this.FieldM == nil && that.FieldM != nil") + } else if that1.FieldM != nil { + return fmt.Errorf("FieldM this(%v) Not Equal that(%v)", this.FieldM, that1.FieldM) + } + if this.FieldN != nil && that1.FieldN != nil { + if *this.FieldN != *that1.FieldN { + return fmt.Errorf("FieldN this(%v) Not Equal that(%v)", *this.FieldN, *that1.FieldN) + } + } else if this.FieldN != nil { + return fmt.Errorf("this.FieldN == nil && that.FieldN != nil") + } else if that1.FieldN != nil { + return fmt.Errorf("FieldN this(%v) Not Equal that(%v)", this.FieldN, that1.FieldN) + } + if !bytes.Equal(this.FieldO, that1.FieldO) { + return fmt.Errorf("FieldO this(%v) Not Equal that(%v)", this.FieldO, that1.FieldO) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *CustomNameNinOptNative) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*CustomNameNinOptNative) + if !ok { + that2, ok := that.(CustomNameNinOptNative) + 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.FieldA != nil && that1.FieldA != nil { + if *this.FieldA != *that1.FieldA { + return false + } + } else if this.FieldA != nil { + return false + } else if that1.FieldA != nil { + return false + } + if this.FieldB != nil && that1.FieldB != nil { + if *this.FieldB != *that1.FieldB { + return false + } + } else if this.FieldB != nil { + return false + } else if that1.FieldB != nil { + return false + } + if this.FieldC != nil && that1.FieldC != nil { + if *this.FieldC != *that1.FieldC { + return false + } + } else if this.FieldC != nil { + return false + } else if that1.FieldC != nil { + return false + } + if this.FieldD != nil && that1.FieldD != nil { + if *this.FieldD != *that1.FieldD { + return false + } + } else if this.FieldD != nil { + return false + } else if that1.FieldD != nil { + return false + } + if this.FieldE != nil && that1.FieldE != nil { + if *this.FieldE != *that1.FieldE { + return false + } + } else if this.FieldE != nil { + return false + } else if that1.FieldE != nil { + return false + } + if this.FieldF != nil && that1.FieldF != nil { + if *this.FieldF != *that1.FieldF { + return false + } + } else if this.FieldF != nil { + return false + } else if that1.FieldF != nil { + return false + } + if this.FieldG != nil && that1.FieldG != nil { + if *this.FieldG != *that1.FieldG { + return false + } + } else if this.FieldG != nil { + return false + } else if that1.FieldG != nil { + return false + } + if this.FieldH != nil && that1.FieldH != nil { + if *this.FieldH != *that1.FieldH { + return false + } + } else if this.FieldH != nil { + return false + } else if that1.FieldH != nil { + return false + } + if this.FieldI != nil && that1.FieldI != nil { + if *this.FieldI != *that1.FieldI { + return false + } + } else if this.FieldI != nil { + return false + } else if that1.FieldI != nil { + return false + } + if this.FieldJ != nil && that1.FieldJ != nil { + if *this.FieldJ != *that1.FieldJ { + return false + } + } else if this.FieldJ != nil { + return false + } else if that1.FieldJ != nil { + return false + } + if this.FieldK != nil && that1.FieldK != nil { + if *this.FieldK != *that1.FieldK { + return false + } + } else if this.FieldK != nil { + return false + } else if that1.FieldK != nil { + return false + } + if this.FielL != nil && that1.FielL != nil { + if *this.FielL != *that1.FielL { + return false + } + } else if this.FielL != nil { + return false + } else if that1.FielL != nil { + return false + } + if this.FieldM != nil && that1.FieldM != nil { + if *this.FieldM != *that1.FieldM { + return false + } + } else if this.FieldM != nil { + return false + } else if that1.FieldM != nil { + return false + } + if this.FieldN != nil && that1.FieldN != nil { + if *this.FieldN != *that1.FieldN { + return false + } + } else if this.FieldN != nil { + return false + } else if that1.FieldN != nil { + return false + } + if !bytes.Equal(this.FieldO, that1.FieldO) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *CustomNameNinRepNative) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*CustomNameNinRepNative) + if !ok { + that2, ok := that.(CustomNameNinRepNative) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *CustomNameNinRepNative") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *CustomNameNinRepNative but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *CustomNameNinRepNative but is not nil && this == nil") + } + if len(this.FieldA) != len(that1.FieldA) { + return fmt.Errorf("FieldA this(%v) Not Equal that(%v)", len(this.FieldA), len(that1.FieldA)) + } + for i := range this.FieldA { + if this.FieldA[i] != that1.FieldA[i] { + return fmt.Errorf("FieldA this[%v](%v) Not Equal that[%v](%v)", i, this.FieldA[i], i, that1.FieldA[i]) + } + } + if len(this.FieldB) != len(that1.FieldB) { + return fmt.Errorf("FieldB this(%v) Not Equal that(%v)", len(this.FieldB), len(that1.FieldB)) + } + for i := range this.FieldB { + if this.FieldB[i] != that1.FieldB[i] { + return fmt.Errorf("FieldB this[%v](%v) Not Equal that[%v](%v)", i, this.FieldB[i], i, that1.FieldB[i]) + } + } + if len(this.FieldC) != len(that1.FieldC) { + return fmt.Errorf("FieldC this(%v) Not Equal that(%v)", len(this.FieldC), len(that1.FieldC)) + } + for i := range this.FieldC { + if this.FieldC[i] != that1.FieldC[i] { + return fmt.Errorf("FieldC this[%v](%v) Not Equal that[%v](%v)", i, this.FieldC[i], i, that1.FieldC[i]) + } + } + if len(this.FieldD) != len(that1.FieldD) { + return fmt.Errorf("FieldD this(%v) Not Equal that(%v)", len(this.FieldD), len(that1.FieldD)) + } + for i := range this.FieldD { + if this.FieldD[i] != that1.FieldD[i] { + return fmt.Errorf("FieldD this[%v](%v) Not Equal that[%v](%v)", i, this.FieldD[i], i, that1.FieldD[i]) + } + } + if len(this.FieldE) != len(that1.FieldE) { + return fmt.Errorf("FieldE this(%v) Not Equal that(%v)", len(this.FieldE), len(that1.FieldE)) + } + for i := range this.FieldE { + if this.FieldE[i] != that1.FieldE[i] { + return fmt.Errorf("FieldE this[%v](%v) Not Equal that[%v](%v)", i, this.FieldE[i], i, that1.FieldE[i]) + } + } + if len(this.FieldF) != len(that1.FieldF) { + return fmt.Errorf("FieldF this(%v) Not Equal that(%v)", len(this.FieldF), len(that1.FieldF)) + } + for i := range this.FieldF { + if this.FieldF[i] != that1.FieldF[i] { + return fmt.Errorf("FieldF this[%v](%v) Not Equal that[%v](%v)", i, this.FieldF[i], i, that1.FieldF[i]) + } + } + if len(this.FieldG) != len(that1.FieldG) { + return fmt.Errorf("FieldG this(%v) Not Equal that(%v)", len(this.FieldG), len(that1.FieldG)) + } + for i := range this.FieldG { + if this.FieldG[i] != that1.FieldG[i] { + return fmt.Errorf("FieldG this[%v](%v) Not Equal that[%v](%v)", i, this.FieldG[i], i, that1.FieldG[i]) + } + } + if len(this.FieldH) != len(that1.FieldH) { + return fmt.Errorf("FieldH this(%v) Not Equal that(%v)", len(this.FieldH), len(that1.FieldH)) + } + for i := range this.FieldH { + if this.FieldH[i] != that1.FieldH[i] { + return fmt.Errorf("FieldH this[%v](%v) Not Equal that[%v](%v)", i, this.FieldH[i], i, that1.FieldH[i]) + } + } + if len(this.FieldI) != len(that1.FieldI) { + return fmt.Errorf("FieldI this(%v) Not Equal that(%v)", len(this.FieldI), len(that1.FieldI)) + } + for i := range this.FieldI { + if this.FieldI[i] != that1.FieldI[i] { + return fmt.Errorf("FieldI this[%v](%v) Not Equal that[%v](%v)", i, this.FieldI[i], i, that1.FieldI[i]) + } + } + if len(this.FieldJ) != len(that1.FieldJ) { + return fmt.Errorf("FieldJ this(%v) Not Equal that(%v)", len(this.FieldJ), len(that1.FieldJ)) + } + for i := range this.FieldJ { + if this.FieldJ[i] != that1.FieldJ[i] { + return fmt.Errorf("FieldJ this[%v](%v) Not Equal that[%v](%v)", i, this.FieldJ[i], i, that1.FieldJ[i]) + } + } + if len(this.FieldK) != len(that1.FieldK) { + return fmt.Errorf("FieldK this(%v) Not Equal that(%v)", len(this.FieldK), len(that1.FieldK)) + } + for i := range this.FieldK { + if this.FieldK[i] != that1.FieldK[i] { + return fmt.Errorf("FieldK this[%v](%v) Not Equal that[%v](%v)", i, this.FieldK[i], i, that1.FieldK[i]) + } + } + if len(this.FieldL) != len(that1.FieldL) { + return fmt.Errorf("FieldL this(%v) Not Equal that(%v)", len(this.FieldL), len(that1.FieldL)) + } + for i := range this.FieldL { + if this.FieldL[i] != that1.FieldL[i] { + return fmt.Errorf("FieldL this[%v](%v) Not Equal that[%v](%v)", i, this.FieldL[i], i, that1.FieldL[i]) + } + } + if len(this.FieldM) != len(that1.FieldM) { + return fmt.Errorf("FieldM this(%v) Not Equal that(%v)", len(this.FieldM), len(that1.FieldM)) + } + for i := range this.FieldM { + if this.FieldM[i] != that1.FieldM[i] { + return fmt.Errorf("FieldM this[%v](%v) Not Equal that[%v](%v)", i, this.FieldM[i], i, that1.FieldM[i]) + } + } + if len(this.FieldN) != len(that1.FieldN) { + return fmt.Errorf("FieldN this(%v) Not Equal that(%v)", len(this.FieldN), len(that1.FieldN)) + } + for i := range this.FieldN { + if this.FieldN[i] != that1.FieldN[i] { + return fmt.Errorf("FieldN this[%v](%v) Not Equal that[%v](%v)", i, this.FieldN[i], i, that1.FieldN[i]) + } + } + if len(this.FieldO) != len(that1.FieldO) { + return fmt.Errorf("FieldO this(%v) Not Equal that(%v)", len(this.FieldO), len(that1.FieldO)) + } + for i := range this.FieldO { + if !bytes.Equal(this.FieldO[i], that1.FieldO[i]) { + return fmt.Errorf("FieldO this[%v](%v) Not Equal that[%v](%v)", i, this.FieldO[i], i, that1.FieldO[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *CustomNameNinRepNative) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*CustomNameNinRepNative) + if !ok { + that2, ok := that.(CustomNameNinRepNative) + 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.FieldA) != len(that1.FieldA) { + return false + } + for i := range this.FieldA { + if this.FieldA[i] != that1.FieldA[i] { + return false + } + } + if len(this.FieldB) != len(that1.FieldB) { + return false + } + for i := range this.FieldB { + if this.FieldB[i] != that1.FieldB[i] { + return false + } + } + if len(this.FieldC) != len(that1.FieldC) { + return false + } + for i := range this.FieldC { + if this.FieldC[i] != that1.FieldC[i] { + return false + } + } + if len(this.FieldD) != len(that1.FieldD) { + return false + } + for i := range this.FieldD { + if this.FieldD[i] != that1.FieldD[i] { + return false + } + } + if len(this.FieldE) != len(that1.FieldE) { + return false + } + for i := range this.FieldE { + if this.FieldE[i] != that1.FieldE[i] { + return false + } + } + if len(this.FieldF) != len(that1.FieldF) { + return false + } + for i := range this.FieldF { + if this.FieldF[i] != that1.FieldF[i] { + return false + } + } + if len(this.FieldG) != len(that1.FieldG) { + return false + } + for i := range this.FieldG { + if this.FieldG[i] != that1.FieldG[i] { + return false + } + } + if len(this.FieldH) != len(that1.FieldH) { + return false + } + for i := range this.FieldH { + if this.FieldH[i] != that1.FieldH[i] { + return false + } + } + if len(this.FieldI) != len(that1.FieldI) { + return false + } + for i := range this.FieldI { + if this.FieldI[i] != that1.FieldI[i] { + return false + } + } + if len(this.FieldJ) != len(that1.FieldJ) { + return false + } + for i := range this.FieldJ { + if this.FieldJ[i] != that1.FieldJ[i] { + return false + } + } + if len(this.FieldK) != len(that1.FieldK) { + return false + } + for i := range this.FieldK { + if this.FieldK[i] != that1.FieldK[i] { + return false + } + } + if len(this.FieldL) != len(that1.FieldL) { + return false + } + for i := range this.FieldL { + if this.FieldL[i] != that1.FieldL[i] { + return false + } + } + if len(this.FieldM) != len(that1.FieldM) { + return false + } + for i := range this.FieldM { + if this.FieldM[i] != that1.FieldM[i] { + return false + } + } + if len(this.FieldN) != len(that1.FieldN) { + return false + } + for i := range this.FieldN { + if this.FieldN[i] != that1.FieldN[i] { + return false + } + } + if len(this.FieldO) != len(that1.FieldO) { + return false + } + for i := range this.FieldO { + if !bytes.Equal(this.FieldO[i], that1.FieldO[i]) { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *CustomNameNinStruct) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*CustomNameNinStruct) + if !ok { + that2, ok := that.(CustomNameNinStruct) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *CustomNameNinStruct") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *CustomNameNinStruct but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *CustomNameNinStruct but is not nil && this == nil") + } + if this.FieldA != nil && that1.FieldA != nil { + if *this.FieldA != *that1.FieldA { + return fmt.Errorf("FieldA this(%v) Not Equal that(%v)", *this.FieldA, *that1.FieldA) + } + } else if this.FieldA != nil { + return fmt.Errorf("this.FieldA == nil && that.FieldA != nil") + } else if that1.FieldA != nil { + return fmt.Errorf("FieldA this(%v) Not Equal that(%v)", this.FieldA, that1.FieldA) + } + if this.FieldB != nil && that1.FieldB != nil { + if *this.FieldB != *that1.FieldB { + return fmt.Errorf("FieldB this(%v) Not Equal that(%v)", *this.FieldB, *that1.FieldB) + } + } else if this.FieldB != nil { + return fmt.Errorf("this.FieldB == nil && that.FieldB != nil") + } else if that1.FieldB != nil { + return fmt.Errorf("FieldB this(%v) Not Equal that(%v)", this.FieldB, that1.FieldB) + } + if !this.FieldC.Equal(that1.FieldC) { + return fmt.Errorf("FieldC this(%v) Not Equal that(%v)", this.FieldC, that1.FieldC) + } + if len(this.FieldD) != len(that1.FieldD) { + return fmt.Errorf("FieldD this(%v) Not Equal that(%v)", len(this.FieldD), len(that1.FieldD)) + } + for i := range this.FieldD { + if !this.FieldD[i].Equal(that1.FieldD[i]) { + return fmt.Errorf("FieldD this[%v](%v) Not Equal that[%v](%v)", i, this.FieldD[i], i, that1.FieldD[i]) + } + } + if this.FieldE != nil && that1.FieldE != nil { + if *this.FieldE != *that1.FieldE { + return fmt.Errorf("FieldE this(%v) Not Equal that(%v)", *this.FieldE, *that1.FieldE) + } + } else if this.FieldE != nil { + return fmt.Errorf("this.FieldE == nil && that.FieldE != nil") + } else if that1.FieldE != nil { + return fmt.Errorf("FieldE this(%v) Not Equal that(%v)", this.FieldE, that1.FieldE) + } + if this.FieldF != nil && that1.FieldF != nil { + if *this.FieldF != *that1.FieldF { + return fmt.Errorf("FieldF this(%v) Not Equal that(%v)", *this.FieldF, *that1.FieldF) + } + } else if this.FieldF != nil { + return fmt.Errorf("this.FieldF == nil && that.FieldF != nil") + } else if that1.FieldF != nil { + return fmt.Errorf("FieldF this(%v) Not Equal that(%v)", this.FieldF, that1.FieldF) + } + if !this.FieldG.Equal(that1.FieldG) { + return fmt.Errorf("FieldG this(%v) Not Equal that(%v)", this.FieldG, that1.FieldG) + } + if this.FieldH != nil && that1.FieldH != nil { + if *this.FieldH != *that1.FieldH { + return fmt.Errorf("FieldH this(%v) Not Equal that(%v)", *this.FieldH, *that1.FieldH) + } + } else if this.FieldH != nil { + return fmt.Errorf("this.FieldH == nil && that.FieldH != nil") + } else if that1.FieldH != nil { + return fmt.Errorf("FieldH this(%v) Not Equal that(%v)", this.FieldH, that1.FieldH) + } + if this.FieldI != nil && that1.FieldI != nil { + if *this.FieldI != *that1.FieldI { + return fmt.Errorf("FieldI this(%v) Not Equal that(%v)", *this.FieldI, *that1.FieldI) + } + } else if this.FieldI != nil { + return fmt.Errorf("this.FieldI == nil && that.FieldI != nil") + } else if that1.FieldI != nil { + return fmt.Errorf("FieldI this(%v) Not Equal that(%v)", this.FieldI, that1.FieldI) + } + if !bytes.Equal(this.FieldJ, that1.FieldJ) { + return fmt.Errorf("FieldJ this(%v) Not Equal that(%v)", this.FieldJ, that1.FieldJ) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *CustomNameNinStruct) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*CustomNameNinStruct) + if !ok { + that2, ok := that.(CustomNameNinStruct) + 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.FieldA != nil && that1.FieldA != nil { + if *this.FieldA != *that1.FieldA { + return false + } + } else if this.FieldA != nil { + return false + } else if that1.FieldA != nil { + return false + } + if this.FieldB != nil && that1.FieldB != nil { + if *this.FieldB != *that1.FieldB { + return false + } + } else if this.FieldB != nil { + return false + } else if that1.FieldB != nil { + return false + } + if !this.FieldC.Equal(that1.FieldC) { + return false + } + if len(this.FieldD) != len(that1.FieldD) { + return false + } + for i := range this.FieldD { + if !this.FieldD[i].Equal(that1.FieldD[i]) { + return false + } + } + if this.FieldE != nil && that1.FieldE != nil { + if *this.FieldE != *that1.FieldE { + return false + } + } else if this.FieldE != nil { + return false + } else if that1.FieldE != nil { + return false + } + if this.FieldF != nil && that1.FieldF != nil { + if *this.FieldF != *that1.FieldF { + return false + } + } else if this.FieldF != nil { + return false + } else if that1.FieldF != nil { + return false + } + if !this.FieldG.Equal(that1.FieldG) { + return false + } + if this.FieldH != nil && that1.FieldH != nil { + if *this.FieldH != *that1.FieldH { + return false + } + } else if this.FieldH != nil { + return false + } else if that1.FieldH != nil { + return false + } + if this.FieldI != nil && that1.FieldI != nil { + if *this.FieldI != *that1.FieldI { + return false + } + } else if this.FieldI != nil { + return false + } else if that1.FieldI != nil { + return false + } + if !bytes.Equal(this.FieldJ, that1.FieldJ) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *CustomNameCustomType) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*CustomNameCustomType) + if !ok { + that2, ok := that.(CustomNameCustomType) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *CustomNameCustomType") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *CustomNameCustomType but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *CustomNameCustomType but is not nil && this == nil") + } + if that1.FieldA == nil { + if this.FieldA != nil { + return fmt.Errorf("this.FieldA != nil && that1.FieldA == nil") + } + } else if !this.FieldA.Equal(*that1.FieldA) { + return fmt.Errorf("FieldA this(%v) Not Equal that(%v)", this.FieldA, that1.FieldA) + } + if that1.FieldB == nil { + if this.FieldB != nil { + return fmt.Errorf("this.FieldB != nil && that1.FieldB == nil") + } + } else if !this.FieldB.Equal(*that1.FieldB) { + return fmt.Errorf("FieldB this(%v) Not Equal that(%v)", this.FieldB, that1.FieldB) + } + if len(this.FieldC) != len(that1.FieldC) { + return fmt.Errorf("FieldC this(%v) Not Equal that(%v)", len(this.FieldC), len(that1.FieldC)) + } + for i := range this.FieldC { + if !this.FieldC[i].Equal(that1.FieldC[i]) { + return fmt.Errorf("FieldC this[%v](%v) Not Equal that[%v](%v)", i, this.FieldC[i], i, that1.FieldC[i]) + } + } + if len(this.FieldD) != len(that1.FieldD) { + return fmt.Errorf("FieldD this(%v) Not Equal that(%v)", len(this.FieldD), len(that1.FieldD)) + } + for i := range this.FieldD { + if !this.FieldD[i].Equal(that1.FieldD[i]) { + return fmt.Errorf("FieldD this[%v](%v) Not Equal that[%v](%v)", i, this.FieldD[i], i, that1.FieldD[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *CustomNameCustomType) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*CustomNameCustomType) + if !ok { + that2, ok := that.(CustomNameCustomType) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + if this == nil { + return true + } + return false + } else if this == nil { + return false + } + if that1.FieldA == nil { + if this.FieldA != nil { + return false + } + } else if !this.FieldA.Equal(*that1.FieldA) { + return false + } + if that1.FieldB == nil { + if this.FieldB != nil { + return false + } + } else if !this.FieldB.Equal(*that1.FieldB) { + return false + } + if len(this.FieldC) != len(that1.FieldC) { + return false + } + for i := range this.FieldC { + if !this.FieldC[i].Equal(that1.FieldC[i]) { + return false + } + } + if len(this.FieldD) != len(that1.FieldD) { + return false + } + for i := range this.FieldD { + if !this.FieldD[i].Equal(that1.FieldD[i]) { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *CustomNameNinEmbeddedStructUnion) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*CustomNameNinEmbeddedStructUnion) + if !ok { + that2, ok := that.(CustomNameNinEmbeddedStructUnion) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *CustomNameNinEmbeddedStructUnion") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *CustomNameNinEmbeddedStructUnion but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *CustomNameNinEmbeddedStructUnion but is not nil && this == nil") + } + if !this.NidOptNative.Equal(that1.NidOptNative) { + return fmt.Errorf("NidOptNative this(%v) Not Equal that(%v)", this.NidOptNative, that1.NidOptNative) + } + if !this.FieldA.Equal(that1.FieldA) { + return fmt.Errorf("FieldA this(%v) Not Equal that(%v)", this.FieldA, that1.FieldA) + } + if this.FieldB != nil && that1.FieldB != nil { + if *this.FieldB != *that1.FieldB { + return fmt.Errorf("FieldB this(%v) Not Equal that(%v)", *this.FieldB, *that1.FieldB) + } + } else if this.FieldB != nil { + return fmt.Errorf("this.FieldB == nil && that.FieldB != nil") + } else if that1.FieldB != nil { + return fmt.Errorf("FieldB this(%v) Not Equal that(%v)", this.FieldB, that1.FieldB) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *CustomNameNinEmbeddedStructUnion) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*CustomNameNinEmbeddedStructUnion) + if !ok { + that2, ok := that.(CustomNameNinEmbeddedStructUnion) + 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.NidOptNative.Equal(that1.NidOptNative) { + return false + } + if !this.FieldA.Equal(that1.FieldA) { + return false + } + if this.FieldB != nil && that1.FieldB != nil { + if *this.FieldB != *that1.FieldB { + return false + } + } else if this.FieldB != nil { + return false + } else if that1.FieldB != nil { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *CustomNameEnum) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*CustomNameEnum) + if !ok { + that2, ok := that.(CustomNameEnum) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *CustomNameEnum") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *CustomNameEnum but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *CustomNameEnum but is not nil && this == nil") + } + if this.FieldA != nil && that1.FieldA != nil { + if *this.FieldA != *that1.FieldA { + return fmt.Errorf("FieldA this(%v) Not Equal that(%v)", *this.FieldA, *that1.FieldA) + } + } else if this.FieldA != nil { + return fmt.Errorf("this.FieldA == nil && that.FieldA != nil") + } else if that1.FieldA != nil { + return fmt.Errorf("FieldA this(%v) Not Equal that(%v)", this.FieldA, that1.FieldA) + } + if len(this.FieldB) != len(that1.FieldB) { + return fmt.Errorf("FieldB this(%v) Not Equal that(%v)", len(this.FieldB), len(that1.FieldB)) + } + for i := range this.FieldB { + if this.FieldB[i] != that1.FieldB[i] { + return fmt.Errorf("FieldB this[%v](%v) Not Equal that[%v](%v)", i, this.FieldB[i], i, that1.FieldB[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *CustomNameEnum) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*CustomNameEnum) + if !ok { + that2, ok := that.(CustomNameEnum) + 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.FieldA != nil && that1.FieldA != nil { + if *this.FieldA != *that1.FieldA { + return false + } + } else if this.FieldA != nil { + return false + } else if that1.FieldA != nil { + return false + } + if len(this.FieldB) != len(that1.FieldB) { + return false + } + for i := range this.FieldB { + if this.FieldB[i] != that1.FieldB[i] { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NoExtensionsMap) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NoExtensionsMap) + if !ok { + that2, ok := that.(NoExtensionsMap) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NoExtensionsMap") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NoExtensionsMap but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NoExtensionsMap but is not nil && this == nil") + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) + } + } else if this.Field1 != nil { + return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") + } else if that1.Field1 != nil { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) + } + if !bytes.Equal(this.XXX_extensions, that1.XXX_extensions) { + return fmt.Errorf("XXX_extensions this(%v) Not Equal that(%v)", this.XXX_extensions, that1.XXX_extensions) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NoExtensionsMap) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*NoExtensionsMap) + if !ok { + that2, ok := that.(NoExtensionsMap) + 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.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return false + } + } else if this.Field1 != nil { + return false + } else if that1.Field1 != nil { + return false + } + if !bytes.Equal(this.XXX_extensions, that1.XXX_extensions) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *Unrecognized) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*Unrecognized) + if !ok { + that2, ok := that.(Unrecognized) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *Unrecognized") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *Unrecognized but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *Unrecognized but is not nil && this == nil") + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) + } + } else if this.Field1 != nil { + return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") + } else if that1.Field1 != nil { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) + } + return nil +} +func (this *Unrecognized) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*Unrecognized) + if !ok { + that2, ok := that.(Unrecognized) + 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.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return false + } + } else if this.Field1 != nil { + return false + } else if that1.Field1 != nil { + return false + } + return true +} +func (this *UnrecognizedWithInner) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*UnrecognizedWithInner) + if !ok { + that2, ok := that.(UnrecognizedWithInner) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *UnrecognizedWithInner") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *UnrecognizedWithInner but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *UnrecognizedWithInner but is not nil && this == nil") + } + if len(this.Embedded) != len(that1.Embedded) { + return fmt.Errorf("Embedded this(%v) Not Equal that(%v)", len(this.Embedded), len(that1.Embedded)) + } + for i := range this.Embedded { + if !this.Embedded[i].Equal(that1.Embedded[i]) { + return fmt.Errorf("Embedded this[%v](%v) Not Equal that[%v](%v)", i, this.Embedded[i], i, that1.Embedded[i]) + } + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", *this.Field2, *that1.Field2) + } + } else if this.Field2 != nil { + return fmt.Errorf("this.Field2 == nil && that.Field2 != nil") + } else if that1.Field2 != nil { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *UnrecognizedWithInner) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*UnrecognizedWithInner) + if !ok { + that2, ok := that.(UnrecognizedWithInner) + 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.Embedded) != len(that1.Embedded) { + return false + } + for i := range this.Embedded { + if !this.Embedded[i].Equal(that1.Embedded[i]) { + return false + } + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + return false + } + } else if this.Field2 != nil { + return false + } else if that1.Field2 != nil { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *UnrecognizedWithInner_Inner) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*UnrecognizedWithInner_Inner) + if !ok { + that2, ok := that.(UnrecognizedWithInner_Inner) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *UnrecognizedWithInner_Inner") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *UnrecognizedWithInner_Inner but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *UnrecognizedWithInner_Inner but is not nil && this == nil") + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) + } + } else if this.Field1 != nil { + return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") + } else if that1.Field1 != nil { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) + } + return nil +} +func (this *UnrecognizedWithInner_Inner) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*UnrecognizedWithInner_Inner) + if !ok { + that2, ok := that.(UnrecognizedWithInner_Inner) + 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.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return false + } + } else if this.Field1 != nil { + return false + } else if that1.Field1 != nil { + return false + } + return true +} +func (this *UnrecognizedWithEmbed) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*UnrecognizedWithEmbed) + if !ok { + that2, ok := that.(UnrecognizedWithEmbed) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *UnrecognizedWithEmbed") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *UnrecognizedWithEmbed but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *UnrecognizedWithEmbed but is not nil && this == nil") + } + if !this.UnrecognizedWithEmbed_Embedded.Equal(&that1.UnrecognizedWithEmbed_Embedded) { + return fmt.Errorf("UnrecognizedWithEmbed_Embedded this(%v) Not Equal that(%v)", this.UnrecognizedWithEmbed_Embedded, that1.UnrecognizedWithEmbed_Embedded) + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", *this.Field2, *that1.Field2) + } + } else if this.Field2 != nil { + return fmt.Errorf("this.Field2 == nil && that.Field2 != nil") + } else if that1.Field2 != nil { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *UnrecognizedWithEmbed) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*UnrecognizedWithEmbed) + if !ok { + that2, ok := that.(UnrecognizedWithEmbed) + 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.UnrecognizedWithEmbed_Embedded.Equal(&that1.UnrecognizedWithEmbed_Embedded) { + return false + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + return false + } + } else if this.Field2 != nil { + return false + } else if that1.Field2 != nil { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *UnrecognizedWithEmbed_Embedded) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*UnrecognizedWithEmbed_Embedded) + if !ok { + that2, ok := that.(UnrecognizedWithEmbed_Embedded) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *UnrecognizedWithEmbed_Embedded") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *UnrecognizedWithEmbed_Embedded but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *UnrecognizedWithEmbed_Embedded but is not nil && this == nil") + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) + } + } else if this.Field1 != nil { + return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") + } else if that1.Field1 != nil { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) + } + return nil +} +func (this *UnrecognizedWithEmbed_Embedded) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*UnrecognizedWithEmbed_Embedded) + if !ok { + that2, ok := that.(UnrecognizedWithEmbed_Embedded) + 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.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return false + } + } else if this.Field1 != nil { + return false + } else if that1.Field1 != nil { + return false + } + return true +} +func (this *Node) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*Node) + if !ok { + that2, ok := that.(Node) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *Node") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *Node but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *Node but is not nil && this == nil") + } + if this.Label != nil && that1.Label != nil { + if *this.Label != *that1.Label { + return fmt.Errorf("Label this(%v) Not Equal that(%v)", *this.Label, *that1.Label) + } + } else if this.Label != nil { + return fmt.Errorf("this.Label == nil && that.Label != nil") + } else if that1.Label != nil { + return fmt.Errorf("Label this(%v) Not Equal that(%v)", this.Label, that1.Label) + } + if len(this.Children) != len(that1.Children) { + return fmt.Errorf("Children this(%v) Not Equal that(%v)", len(this.Children), len(that1.Children)) + } + for i := range this.Children { + if !this.Children[i].Equal(that1.Children[i]) { + return fmt.Errorf("Children this[%v](%v) Not Equal that[%v](%v)", i, this.Children[i], i, that1.Children[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *Node) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*Node) + if !ok { + that2, ok := that.(Node) + 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.Label != nil && that1.Label != nil { + if *this.Label != *that1.Label { + return false + } + } else if this.Label != nil { + return false + } else if that1.Label != nil { + return false + } + if len(this.Children) != len(that1.Children) { + return false + } + for i := range this.Children { + if !this.Children[i].Equal(that1.Children[i]) { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} + +type NidOptNativeFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetField1() float64 + GetField2() float32 + GetField3() int32 + GetField4() int64 + GetField5() uint32 + GetField6() uint64 + GetField7() int32 + GetField8() int64 + GetField9() uint32 + GetField10() int32 + GetField11() uint64 + GetField12() int64 + GetField13() bool + GetField14() string + GetField15() []byte +} + +func (this *NidOptNative) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NidOptNative) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNidOptNativeFromFace(this) +} + +func (this *NidOptNative) GetField1() float64 { + return this.Field1 +} + +func (this *NidOptNative) GetField2() float32 { + return this.Field2 +} + +func (this *NidOptNative) GetField3() int32 { + return this.Field3 +} + +func (this *NidOptNative) GetField4() int64 { + return this.Field4 +} + +func (this *NidOptNative) GetField5() uint32 { + return this.Field5 +} + +func (this *NidOptNative) GetField6() uint64 { + return this.Field6 +} + +func (this *NidOptNative) GetField7() int32 { + return this.Field7 +} + +func (this *NidOptNative) GetField8() int64 { + return this.Field8 +} + +func (this *NidOptNative) GetField9() uint32 { + return this.Field9 +} + +func (this *NidOptNative) GetField10() int32 { + return this.Field10 +} + +func (this *NidOptNative) GetField11() uint64 { + return this.Field11 +} + +func (this *NidOptNative) GetField12() int64 { + return this.Field12 +} + +func (this *NidOptNative) GetField13() bool { + return this.Field13 +} + +func (this *NidOptNative) GetField14() string { + return this.Field14 +} + +func (this *NidOptNative) GetField15() []byte { + return this.Field15 +} + +func NewNidOptNativeFromFace(that NidOptNativeFace) *NidOptNative { + this := &NidOptNative{} + this.Field1 = that.GetField1() + this.Field2 = that.GetField2() + this.Field3 = that.GetField3() + this.Field4 = that.GetField4() + this.Field5 = that.GetField5() + this.Field6 = that.GetField6() + this.Field7 = that.GetField7() + this.Field8 = that.GetField8() + this.Field9 = that.GetField9() + this.Field10 = that.GetField10() + this.Field11 = that.GetField11() + this.Field12 = that.GetField12() + this.Field13 = that.GetField13() + this.Field14 = that.GetField14() + this.Field15 = that.GetField15() + return this +} + +type NinOptNativeFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetField1() *float64 + GetField2() *float32 + GetField3() *int32 + GetField4() *int64 + GetField5() *uint32 + GetField6() *uint64 + GetField7() *int32 + GetField8() *int64 + GetField9() *uint32 + GetField10() *int32 + GetField11() *uint64 + GetField12() *int64 + GetField13() *bool + GetField14() *string + GetField15() []byte +} + +func (this *NinOptNative) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NinOptNative) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNinOptNativeFromFace(this) +} + +func (this *NinOptNative) GetField1() *float64 { + return this.Field1 +} + +func (this *NinOptNative) GetField2() *float32 { + return this.Field2 +} + +func (this *NinOptNative) GetField3() *int32 { + return this.Field3 +} + +func (this *NinOptNative) GetField4() *int64 { + return this.Field4 +} + +func (this *NinOptNative) GetField5() *uint32 { + return this.Field5 +} + +func (this *NinOptNative) GetField6() *uint64 { + return this.Field6 +} + +func (this *NinOptNative) GetField7() *int32 { + return this.Field7 +} + +func (this *NinOptNative) GetField8() *int64 { + return this.Field8 +} + +func (this *NinOptNative) GetField9() *uint32 { + return this.Field9 +} + +func (this *NinOptNative) GetField10() *int32 { + return this.Field10 +} + +func (this *NinOptNative) GetField11() *uint64 { + return this.Field11 +} + +func (this *NinOptNative) GetField12() *int64 { + return this.Field12 +} + +func (this *NinOptNative) GetField13() *bool { + return this.Field13 +} + +func (this *NinOptNative) GetField14() *string { + return this.Field14 +} + +func (this *NinOptNative) GetField15() []byte { + return this.Field15 +} + +func NewNinOptNativeFromFace(that NinOptNativeFace) *NinOptNative { + this := &NinOptNative{} + this.Field1 = that.GetField1() + this.Field2 = that.GetField2() + this.Field3 = that.GetField3() + this.Field4 = that.GetField4() + this.Field5 = that.GetField5() + this.Field6 = that.GetField6() + this.Field7 = that.GetField7() + this.Field8 = that.GetField8() + this.Field9 = that.GetField9() + this.Field10 = that.GetField10() + this.Field11 = that.GetField11() + this.Field12 = that.GetField12() + this.Field13 = that.GetField13() + this.Field14 = that.GetField14() + this.Field15 = that.GetField15() + return this +} + +type NidRepNativeFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetField1() []float64 + GetField2() []float32 + GetField3() []int32 + GetField4() []int64 + GetField5() []uint32 + GetField6() []uint64 + GetField7() []int32 + GetField8() []int64 + GetField9() []uint32 + GetField10() []int32 + GetField11() []uint64 + GetField12() []int64 + GetField13() []bool + GetField14() []string + GetField15() [][]byte +} + +func (this *NidRepNative) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NidRepNative) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNidRepNativeFromFace(this) +} + +func (this *NidRepNative) GetField1() []float64 { + return this.Field1 +} + +func (this *NidRepNative) GetField2() []float32 { + return this.Field2 +} + +func (this *NidRepNative) GetField3() []int32 { + return this.Field3 +} + +func (this *NidRepNative) GetField4() []int64 { + return this.Field4 +} + +func (this *NidRepNative) GetField5() []uint32 { + return this.Field5 +} + +func (this *NidRepNative) GetField6() []uint64 { + return this.Field6 +} + +func (this *NidRepNative) GetField7() []int32 { + return this.Field7 +} + +func (this *NidRepNative) GetField8() []int64 { + return this.Field8 +} + +func (this *NidRepNative) GetField9() []uint32 { + return this.Field9 +} + +func (this *NidRepNative) GetField10() []int32 { + return this.Field10 +} + +func (this *NidRepNative) GetField11() []uint64 { + return this.Field11 +} + +func (this *NidRepNative) GetField12() []int64 { + return this.Field12 +} + +func (this *NidRepNative) GetField13() []bool { + return this.Field13 +} + +func (this *NidRepNative) GetField14() []string { + return this.Field14 +} + +func (this *NidRepNative) GetField15() [][]byte { + return this.Field15 +} + +func NewNidRepNativeFromFace(that NidRepNativeFace) *NidRepNative { + this := &NidRepNative{} + this.Field1 = that.GetField1() + this.Field2 = that.GetField2() + this.Field3 = that.GetField3() + this.Field4 = that.GetField4() + this.Field5 = that.GetField5() + this.Field6 = that.GetField6() + this.Field7 = that.GetField7() + this.Field8 = that.GetField8() + this.Field9 = that.GetField9() + this.Field10 = that.GetField10() + this.Field11 = that.GetField11() + this.Field12 = that.GetField12() + this.Field13 = that.GetField13() + this.Field14 = that.GetField14() + this.Field15 = that.GetField15() + return this +} + +type NinRepNativeFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetField1() []float64 + GetField2() []float32 + GetField3() []int32 + GetField4() []int64 + GetField5() []uint32 + GetField6() []uint64 + GetField7() []int32 + GetField8() []int64 + GetField9() []uint32 + GetField10() []int32 + GetField11() []uint64 + GetField12() []int64 + GetField13() []bool + GetField14() []string + GetField15() [][]byte +} + +func (this *NinRepNative) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NinRepNative) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNinRepNativeFromFace(this) +} + +func (this *NinRepNative) GetField1() []float64 { + return this.Field1 +} + +func (this *NinRepNative) GetField2() []float32 { + return this.Field2 +} + +func (this *NinRepNative) GetField3() []int32 { + return this.Field3 +} + +func (this *NinRepNative) GetField4() []int64 { + return this.Field4 +} + +func (this *NinRepNative) GetField5() []uint32 { + return this.Field5 +} + +func (this *NinRepNative) GetField6() []uint64 { + return this.Field6 +} + +func (this *NinRepNative) GetField7() []int32 { + return this.Field7 +} + +func (this *NinRepNative) GetField8() []int64 { + return this.Field8 +} + +func (this *NinRepNative) GetField9() []uint32 { + return this.Field9 +} + +func (this *NinRepNative) GetField10() []int32 { + return this.Field10 +} + +func (this *NinRepNative) GetField11() []uint64 { + return this.Field11 +} + +func (this *NinRepNative) GetField12() []int64 { + return this.Field12 +} + +func (this *NinRepNative) GetField13() []bool { + return this.Field13 +} + +func (this *NinRepNative) GetField14() []string { + return this.Field14 +} + +func (this *NinRepNative) GetField15() [][]byte { + return this.Field15 +} + +func NewNinRepNativeFromFace(that NinRepNativeFace) *NinRepNative { + this := &NinRepNative{} + this.Field1 = that.GetField1() + this.Field2 = that.GetField2() + this.Field3 = that.GetField3() + this.Field4 = that.GetField4() + this.Field5 = that.GetField5() + this.Field6 = that.GetField6() + this.Field7 = that.GetField7() + this.Field8 = that.GetField8() + this.Field9 = that.GetField9() + this.Field10 = that.GetField10() + this.Field11 = that.GetField11() + this.Field12 = that.GetField12() + this.Field13 = that.GetField13() + this.Field14 = that.GetField14() + this.Field15 = that.GetField15() + return this +} + +type NidRepPackedNativeFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetField1() []float64 + GetField2() []float32 + GetField3() []int32 + GetField4() []int64 + GetField5() []uint32 + GetField6() []uint64 + GetField7() []int32 + GetField8() []int64 + GetField9() []uint32 + GetField10() []int32 + GetField11() []uint64 + GetField12() []int64 + GetField13() []bool +} + +func (this *NidRepPackedNative) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NidRepPackedNative) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNidRepPackedNativeFromFace(this) +} + +func (this *NidRepPackedNative) GetField1() []float64 { + return this.Field1 +} + +func (this *NidRepPackedNative) GetField2() []float32 { + return this.Field2 +} + +func (this *NidRepPackedNative) GetField3() []int32 { + return this.Field3 +} + +func (this *NidRepPackedNative) GetField4() []int64 { + return this.Field4 +} + +func (this *NidRepPackedNative) GetField5() []uint32 { + return this.Field5 +} + +func (this *NidRepPackedNative) GetField6() []uint64 { + return this.Field6 +} + +func (this *NidRepPackedNative) GetField7() []int32 { + return this.Field7 +} + +func (this *NidRepPackedNative) GetField8() []int64 { + return this.Field8 +} + +func (this *NidRepPackedNative) GetField9() []uint32 { + return this.Field9 +} + +func (this *NidRepPackedNative) GetField10() []int32 { + return this.Field10 +} + +func (this *NidRepPackedNative) GetField11() []uint64 { + return this.Field11 +} + +func (this *NidRepPackedNative) GetField12() []int64 { + return this.Field12 +} + +func (this *NidRepPackedNative) GetField13() []bool { + return this.Field13 +} + +func NewNidRepPackedNativeFromFace(that NidRepPackedNativeFace) *NidRepPackedNative { + this := &NidRepPackedNative{} + this.Field1 = that.GetField1() + this.Field2 = that.GetField2() + this.Field3 = that.GetField3() + this.Field4 = that.GetField4() + this.Field5 = that.GetField5() + this.Field6 = that.GetField6() + this.Field7 = that.GetField7() + this.Field8 = that.GetField8() + this.Field9 = that.GetField9() + this.Field10 = that.GetField10() + this.Field11 = that.GetField11() + this.Field12 = that.GetField12() + this.Field13 = that.GetField13() + return this +} + +type NinRepPackedNativeFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetField1() []float64 + GetField2() []float32 + GetField3() []int32 + GetField4() []int64 + GetField5() []uint32 + GetField6() []uint64 + GetField7() []int32 + GetField8() []int64 + GetField9() []uint32 + GetField10() []int32 + GetField11() []uint64 + GetField12() []int64 + GetField13() []bool +} + +func (this *NinRepPackedNative) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NinRepPackedNative) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNinRepPackedNativeFromFace(this) +} + +func (this *NinRepPackedNative) GetField1() []float64 { + return this.Field1 +} + +func (this *NinRepPackedNative) GetField2() []float32 { + return this.Field2 +} + +func (this *NinRepPackedNative) GetField3() []int32 { + return this.Field3 +} + +func (this *NinRepPackedNative) GetField4() []int64 { + return this.Field4 +} + +func (this *NinRepPackedNative) GetField5() []uint32 { + return this.Field5 +} + +func (this *NinRepPackedNative) GetField6() []uint64 { + return this.Field6 +} + +func (this *NinRepPackedNative) GetField7() []int32 { + return this.Field7 +} + +func (this *NinRepPackedNative) GetField8() []int64 { + return this.Field8 +} + +func (this *NinRepPackedNative) GetField9() []uint32 { + return this.Field9 +} + +func (this *NinRepPackedNative) GetField10() []int32 { + return this.Field10 +} + +func (this *NinRepPackedNative) GetField11() []uint64 { + return this.Field11 +} + +func (this *NinRepPackedNative) GetField12() []int64 { + return this.Field12 +} + +func (this *NinRepPackedNative) GetField13() []bool { + return this.Field13 +} + +func NewNinRepPackedNativeFromFace(that NinRepPackedNativeFace) *NinRepPackedNative { + this := &NinRepPackedNative{} + this.Field1 = that.GetField1() + this.Field2 = that.GetField2() + this.Field3 = that.GetField3() + this.Field4 = that.GetField4() + this.Field5 = that.GetField5() + this.Field6 = that.GetField6() + this.Field7 = that.GetField7() + this.Field8 = that.GetField8() + this.Field9 = that.GetField9() + this.Field10 = that.GetField10() + this.Field11 = that.GetField11() + this.Field12 = that.GetField12() + this.Field13 = that.GetField13() + return this +} + +type NidOptStructFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetField1() float64 + GetField2() float32 + GetField3() NidOptNative + GetField4() NinOptNative + GetField6() uint64 + GetField7() int32 + GetField8() NidOptNative + GetField13() bool + GetField14() string + GetField15() []byte +} + +func (this *NidOptStruct) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NidOptStruct) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNidOptStructFromFace(this) +} + +func (this *NidOptStruct) GetField1() float64 { + return this.Field1 +} + +func (this *NidOptStruct) GetField2() float32 { + return this.Field2 +} + +func (this *NidOptStruct) GetField3() NidOptNative { + return this.Field3 +} + +func (this *NidOptStruct) GetField4() NinOptNative { + return this.Field4 +} + +func (this *NidOptStruct) GetField6() uint64 { + return this.Field6 +} + +func (this *NidOptStruct) GetField7() int32 { + return this.Field7 +} + +func (this *NidOptStruct) GetField8() NidOptNative { + return this.Field8 +} + +func (this *NidOptStruct) GetField13() bool { + return this.Field13 +} + +func (this *NidOptStruct) GetField14() string { + return this.Field14 +} + +func (this *NidOptStruct) GetField15() []byte { + return this.Field15 +} + +func NewNidOptStructFromFace(that NidOptStructFace) *NidOptStruct { + this := &NidOptStruct{} + this.Field1 = that.GetField1() + this.Field2 = that.GetField2() + this.Field3 = that.GetField3() + this.Field4 = that.GetField4() + this.Field6 = that.GetField6() + this.Field7 = that.GetField7() + this.Field8 = that.GetField8() + this.Field13 = that.GetField13() + this.Field14 = that.GetField14() + this.Field15 = that.GetField15() + return this +} + +type NinOptStructFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetField1() *float64 + GetField2() *float32 + GetField3() *NidOptNative + GetField4() *NinOptNative + GetField6() *uint64 + GetField7() *int32 + GetField8() *NidOptNative + GetField13() *bool + GetField14() *string + GetField15() []byte +} + +func (this *NinOptStruct) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NinOptStruct) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNinOptStructFromFace(this) +} + +func (this *NinOptStruct) GetField1() *float64 { + return this.Field1 +} + +func (this *NinOptStruct) GetField2() *float32 { + return this.Field2 +} + +func (this *NinOptStruct) GetField3() *NidOptNative { + return this.Field3 +} + +func (this *NinOptStruct) GetField4() *NinOptNative { + return this.Field4 +} + +func (this *NinOptStruct) GetField6() *uint64 { + return this.Field6 +} + +func (this *NinOptStruct) GetField7() *int32 { + return this.Field7 +} + +func (this *NinOptStruct) GetField8() *NidOptNative { + return this.Field8 +} + +func (this *NinOptStruct) GetField13() *bool { + return this.Field13 +} + +func (this *NinOptStruct) GetField14() *string { + return this.Field14 +} + +func (this *NinOptStruct) GetField15() []byte { + return this.Field15 +} + +func NewNinOptStructFromFace(that NinOptStructFace) *NinOptStruct { + this := &NinOptStruct{} + this.Field1 = that.GetField1() + this.Field2 = that.GetField2() + this.Field3 = that.GetField3() + this.Field4 = that.GetField4() + this.Field6 = that.GetField6() + this.Field7 = that.GetField7() + this.Field8 = that.GetField8() + this.Field13 = that.GetField13() + this.Field14 = that.GetField14() + this.Field15 = that.GetField15() + return this +} + +type NidRepStructFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetField1() []float64 + GetField2() []float32 + GetField3() []NidOptNative + GetField4() []NinOptNative + GetField6() []uint64 + GetField7() []int32 + GetField8() []NidOptNative + GetField13() []bool + GetField14() []string + GetField15() [][]byte +} + +func (this *NidRepStruct) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NidRepStruct) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNidRepStructFromFace(this) +} + +func (this *NidRepStruct) GetField1() []float64 { + return this.Field1 +} + +func (this *NidRepStruct) GetField2() []float32 { + return this.Field2 +} + +func (this *NidRepStruct) GetField3() []NidOptNative { + return this.Field3 +} + +func (this *NidRepStruct) GetField4() []NinOptNative { + return this.Field4 +} + +func (this *NidRepStruct) GetField6() []uint64 { + return this.Field6 +} + +func (this *NidRepStruct) GetField7() []int32 { + return this.Field7 +} + +func (this *NidRepStruct) GetField8() []NidOptNative { + return this.Field8 +} + +func (this *NidRepStruct) GetField13() []bool { + return this.Field13 +} + +func (this *NidRepStruct) GetField14() []string { + return this.Field14 +} + +func (this *NidRepStruct) GetField15() [][]byte { + return this.Field15 +} + +func NewNidRepStructFromFace(that NidRepStructFace) *NidRepStruct { + this := &NidRepStruct{} + this.Field1 = that.GetField1() + this.Field2 = that.GetField2() + this.Field3 = that.GetField3() + this.Field4 = that.GetField4() + this.Field6 = that.GetField6() + this.Field7 = that.GetField7() + this.Field8 = that.GetField8() + this.Field13 = that.GetField13() + this.Field14 = that.GetField14() + this.Field15 = that.GetField15() + return this +} + +type NinRepStructFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetField1() []float64 + GetField2() []float32 + GetField3() []*NidOptNative + GetField4() []*NinOptNative + GetField6() []uint64 + GetField7() []int32 + GetField8() []*NidOptNative + GetField13() []bool + GetField14() []string + GetField15() [][]byte +} + +func (this *NinRepStruct) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NinRepStruct) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNinRepStructFromFace(this) +} + +func (this *NinRepStruct) GetField1() []float64 { + return this.Field1 +} + +func (this *NinRepStruct) GetField2() []float32 { + return this.Field2 +} + +func (this *NinRepStruct) GetField3() []*NidOptNative { + return this.Field3 +} + +func (this *NinRepStruct) GetField4() []*NinOptNative { + return this.Field4 +} + +func (this *NinRepStruct) GetField6() []uint64 { + return this.Field6 +} + +func (this *NinRepStruct) GetField7() []int32 { + return this.Field7 +} + +func (this *NinRepStruct) GetField8() []*NidOptNative { + return this.Field8 +} + +func (this *NinRepStruct) GetField13() []bool { + return this.Field13 +} + +func (this *NinRepStruct) GetField14() []string { + return this.Field14 +} + +func (this *NinRepStruct) GetField15() [][]byte { + return this.Field15 +} + +func NewNinRepStructFromFace(that NinRepStructFace) *NinRepStruct { + this := &NinRepStruct{} + this.Field1 = that.GetField1() + this.Field2 = that.GetField2() + this.Field3 = that.GetField3() + this.Field4 = that.GetField4() + this.Field6 = that.GetField6() + this.Field7 = that.GetField7() + this.Field8 = that.GetField8() + this.Field13 = that.GetField13() + this.Field14 = that.GetField14() + this.Field15 = that.GetField15() + return this +} + +type NidEmbeddedStructFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetNidOptNative() *NidOptNative + GetField200() NidOptNative + GetField210() bool +} + +func (this *NidEmbeddedStruct) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NidEmbeddedStruct) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNidEmbeddedStructFromFace(this) +} + +func (this *NidEmbeddedStruct) GetNidOptNative() *NidOptNative { + return this.NidOptNative +} + +func (this *NidEmbeddedStruct) GetField200() NidOptNative { + return this.Field200 +} + +func (this *NidEmbeddedStruct) GetField210() bool { + return this.Field210 +} + +func NewNidEmbeddedStructFromFace(that NidEmbeddedStructFace) *NidEmbeddedStruct { + this := &NidEmbeddedStruct{} + this.NidOptNative = that.GetNidOptNative() + this.Field200 = that.GetField200() + this.Field210 = that.GetField210() + return this +} + +type NinEmbeddedStructFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetNidOptNative() *NidOptNative + GetField200() *NidOptNative + GetField210() *bool +} + +func (this *NinEmbeddedStruct) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NinEmbeddedStruct) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNinEmbeddedStructFromFace(this) +} + +func (this *NinEmbeddedStruct) GetNidOptNative() *NidOptNative { + return this.NidOptNative +} + +func (this *NinEmbeddedStruct) GetField200() *NidOptNative { + return this.Field200 +} + +func (this *NinEmbeddedStruct) GetField210() *bool { + return this.Field210 +} + +func NewNinEmbeddedStructFromFace(that NinEmbeddedStructFace) *NinEmbeddedStruct { + this := &NinEmbeddedStruct{} + this.NidOptNative = that.GetNidOptNative() + this.Field200 = that.GetField200() + this.Field210 = that.GetField210() + return this +} + +type NidNestedStructFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetField1() NidOptStruct + GetField2() []NidRepStruct +} + +func (this *NidNestedStruct) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NidNestedStruct) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNidNestedStructFromFace(this) +} + +func (this *NidNestedStruct) GetField1() NidOptStruct { + return this.Field1 +} + +func (this *NidNestedStruct) GetField2() []NidRepStruct { + return this.Field2 +} + +func NewNidNestedStructFromFace(that NidNestedStructFace) *NidNestedStruct { + this := &NidNestedStruct{} + this.Field1 = that.GetField1() + this.Field2 = that.GetField2() + return this +} + +type NinNestedStructFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetField1() *NinOptStruct + GetField2() []*NinRepStruct +} + +func (this *NinNestedStruct) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NinNestedStruct) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNinNestedStructFromFace(this) +} + +func (this *NinNestedStruct) GetField1() *NinOptStruct { + return this.Field1 +} + +func (this *NinNestedStruct) GetField2() []*NinRepStruct { + return this.Field2 +} + +func NewNinNestedStructFromFace(that NinNestedStructFace) *NinNestedStruct { + this := &NinNestedStruct{} + this.Field1 = that.GetField1() + this.Field2 = that.GetField2() + return this +} + +type NidOptCustomFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetId() Uuid + GetValue() github_com_gogo_protobuf_test_custom.Uint128 +} + +func (this *NidOptCustom) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NidOptCustom) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNidOptCustomFromFace(this) +} + +func (this *NidOptCustom) GetId() Uuid { + return this.Id +} + +func (this *NidOptCustom) GetValue() github_com_gogo_protobuf_test_custom.Uint128 { + return this.Value +} + +func NewNidOptCustomFromFace(that NidOptCustomFace) *NidOptCustom { + this := &NidOptCustom{} + this.Id = that.GetId() + this.Value = that.GetValue() + return this +} + +type CustomDashFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetValue() *github_com_gogo_protobuf_test_custom_dash_type.Bytes +} + +func (this *CustomDash) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *CustomDash) TestProto() github_com_gogo_protobuf_proto.Message { + return NewCustomDashFromFace(this) +} + +func (this *CustomDash) GetValue() *github_com_gogo_protobuf_test_custom_dash_type.Bytes { + return this.Value +} + +func NewCustomDashFromFace(that CustomDashFace) *CustomDash { + this := &CustomDash{} + this.Value = that.GetValue() + return this +} + +type NinOptCustomFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetId() *Uuid + GetValue() *github_com_gogo_protobuf_test_custom.Uint128 +} + +func (this *NinOptCustom) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NinOptCustom) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNinOptCustomFromFace(this) +} + +func (this *NinOptCustom) GetId() *Uuid { + return this.Id +} + +func (this *NinOptCustom) GetValue() *github_com_gogo_protobuf_test_custom.Uint128 { + return this.Value +} + +func NewNinOptCustomFromFace(that NinOptCustomFace) *NinOptCustom { + this := &NinOptCustom{} + this.Id = that.GetId() + this.Value = that.GetValue() + return this +} + +type NidRepCustomFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetId() []Uuid + GetValue() []github_com_gogo_protobuf_test_custom.Uint128 +} + +func (this *NidRepCustom) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NidRepCustom) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNidRepCustomFromFace(this) +} + +func (this *NidRepCustom) GetId() []Uuid { + return this.Id +} + +func (this *NidRepCustom) GetValue() []github_com_gogo_protobuf_test_custom.Uint128 { + return this.Value +} + +func NewNidRepCustomFromFace(that NidRepCustomFace) *NidRepCustom { + this := &NidRepCustom{} + this.Id = that.GetId() + this.Value = that.GetValue() + return this +} + +type NinRepCustomFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetId() []Uuid + GetValue() []github_com_gogo_protobuf_test_custom.Uint128 +} + +func (this *NinRepCustom) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NinRepCustom) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNinRepCustomFromFace(this) +} + +func (this *NinRepCustom) GetId() []Uuid { + return this.Id +} + +func (this *NinRepCustom) GetValue() []github_com_gogo_protobuf_test_custom.Uint128 { + return this.Value +} + +func NewNinRepCustomFromFace(that NinRepCustomFace) *NinRepCustom { + this := &NinRepCustom{} + this.Id = that.GetId() + this.Value = that.GetValue() + return this +} + +type NinOptNativeUnionFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetField1() *float64 + GetField2() *float32 + GetField3() *int32 + GetField4() *int64 + GetField5() *uint32 + GetField6() *uint64 + GetField13() *bool + GetField14() *string + GetField15() []byte +} + +func (this *NinOptNativeUnion) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NinOptNativeUnion) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNinOptNativeUnionFromFace(this) +} + +func (this *NinOptNativeUnion) GetField1() *float64 { + return this.Field1 +} + +func (this *NinOptNativeUnion) GetField2() *float32 { + return this.Field2 +} + +func (this *NinOptNativeUnion) GetField3() *int32 { + return this.Field3 +} + +func (this *NinOptNativeUnion) GetField4() *int64 { + return this.Field4 +} + +func (this *NinOptNativeUnion) GetField5() *uint32 { + return this.Field5 +} + +func (this *NinOptNativeUnion) GetField6() *uint64 { + return this.Field6 +} + +func (this *NinOptNativeUnion) GetField13() *bool { + return this.Field13 +} + +func (this *NinOptNativeUnion) GetField14() *string { + return this.Field14 +} + +func (this *NinOptNativeUnion) GetField15() []byte { + return this.Field15 +} + +func NewNinOptNativeUnionFromFace(that NinOptNativeUnionFace) *NinOptNativeUnion { + this := &NinOptNativeUnion{} + this.Field1 = that.GetField1() + this.Field2 = that.GetField2() + this.Field3 = that.GetField3() + this.Field4 = that.GetField4() + this.Field5 = that.GetField5() + this.Field6 = that.GetField6() + this.Field13 = that.GetField13() + this.Field14 = that.GetField14() + this.Field15 = that.GetField15() + return this +} + +type NinOptStructUnionFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetField1() *float64 + GetField2() *float32 + GetField3() *NidOptNative + GetField4() *NinOptNative + GetField6() *uint64 + GetField7() *int32 + GetField13() *bool + GetField14() *string + GetField15() []byte +} + +func (this *NinOptStructUnion) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NinOptStructUnion) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNinOptStructUnionFromFace(this) +} + +func (this *NinOptStructUnion) GetField1() *float64 { + return this.Field1 +} + +func (this *NinOptStructUnion) GetField2() *float32 { + return this.Field2 +} + +func (this *NinOptStructUnion) GetField3() *NidOptNative { + return this.Field3 +} + +func (this *NinOptStructUnion) GetField4() *NinOptNative { + return this.Field4 +} + +func (this *NinOptStructUnion) GetField6() *uint64 { + return this.Field6 +} + +func (this *NinOptStructUnion) GetField7() *int32 { + return this.Field7 +} + +func (this *NinOptStructUnion) GetField13() *bool { + return this.Field13 +} + +func (this *NinOptStructUnion) GetField14() *string { + return this.Field14 +} + +func (this *NinOptStructUnion) GetField15() []byte { + return this.Field15 +} + +func NewNinOptStructUnionFromFace(that NinOptStructUnionFace) *NinOptStructUnion { + this := &NinOptStructUnion{} + this.Field1 = that.GetField1() + this.Field2 = that.GetField2() + this.Field3 = that.GetField3() + this.Field4 = that.GetField4() + this.Field6 = that.GetField6() + this.Field7 = that.GetField7() + this.Field13 = that.GetField13() + this.Field14 = that.GetField14() + this.Field15 = that.GetField15() + return this +} + +type NinEmbeddedStructUnionFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetNidOptNative() *NidOptNative + GetField200() *NinOptNative + GetField210() *bool +} + +func (this *NinEmbeddedStructUnion) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NinEmbeddedStructUnion) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNinEmbeddedStructUnionFromFace(this) +} + +func (this *NinEmbeddedStructUnion) GetNidOptNative() *NidOptNative { + return this.NidOptNative +} + +func (this *NinEmbeddedStructUnion) GetField200() *NinOptNative { + return this.Field200 +} + +func (this *NinEmbeddedStructUnion) GetField210() *bool { + return this.Field210 +} + +func NewNinEmbeddedStructUnionFromFace(that NinEmbeddedStructUnionFace) *NinEmbeddedStructUnion { + this := &NinEmbeddedStructUnion{} + this.NidOptNative = that.GetNidOptNative() + this.Field200 = that.GetField200() + this.Field210 = that.GetField210() + return this +} + +type NinNestedStructUnionFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetField1() *NinOptNativeUnion + GetField2() *NinOptStructUnion + GetField3() *NinEmbeddedStructUnion +} + +func (this *NinNestedStructUnion) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NinNestedStructUnion) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNinNestedStructUnionFromFace(this) +} + +func (this *NinNestedStructUnion) GetField1() *NinOptNativeUnion { + return this.Field1 +} + +func (this *NinNestedStructUnion) GetField2() *NinOptStructUnion { + return this.Field2 +} + +func (this *NinNestedStructUnion) GetField3() *NinEmbeddedStructUnion { + return this.Field3 +} + +func NewNinNestedStructUnionFromFace(that NinNestedStructUnionFace) *NinNestedStructUnion { + this := &NinNestedStructUnion{} + this.Field1 = that.GetField1() + this.Field2 = that.GetField2() + this.Field3 = that.GetField3() + return this +} + +type TreeFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetOr() *OrBranch + GetAnd() *AndBranch + GetLeaf() *Leaf +} + +func (this *Tree) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *Tree) TestProto() github_com_gogo_protobuf_proto.Message { + return NewTreeFromFace(this) +} + +func (this *Tree) GetOr() *OrBranch { + return this.Or +} + +func (this *Tree) GetAnd() *AndBranch { + return this.And +} + +func (this *Tree) GetLeaf() *Leaf { + return this.Leaf +} + +func NewTreeFromFace(that TreeFace) *Tree { + this := &Tree{} + this.Or = that.GetOr() + this.And = that.GetAnd() + this.Leaf = that.GetLeaf() + return this +} + +type OrBranchFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetLeft() Tree + GetRight() Tree +} + +func (this *OrBranch) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *OrBranch) TestProto() github_com_gogo_protobuf_proto.Message { + return NewOrBranchFromFace(this) +} + +func (this *OrBranch) GetLeft() Tree { + return this.Left +} + +func (this *OrBranch) GetRight() Tree { + return this.Right +} + +func NewOrBranchFromFace(that OrBranchFace) *OrBranch { + this := &OrBranch{} + this.Left = that.GetLeft() + this.Right = that.GetRight() + return this +} + +type AndBranchFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetLeft() Tree + GetRight() Tree +} + +func (this *AndBranch) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *AndBranch) TestProto() github_com_gogo_protobuf_proto.Message { + return NewAndBranchFromFace(this) +} + +func (this *AndBranch) GetLeft() Tree { + return this.Left +} + +func (this *AndBranch) GetRight() Tree { + return this.Right +} + +func NewAndBranchFromFace(that AndBranchFace) *AndBranch { + this := &AndBranch{} + this.Left = that.GetLeft() + this.Right = that.GetRight() + return this +} + +type LeafFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetValue() int64 + GetStrValue() string +} + +func (this *Leaf) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *Leaf) TestProto() github_com_gogo_protobuf_proto.Message { + return NewLeafFromFace(this) +} + +func (this *Leaf) GetValue() int64 { + return this.Value +} + +func (this *Leaf) GetStrValue() string { + return this.StrValue +} + +func NewLeafFromFace(that LeafFace) *Leaf { + this := &Leaf{} + this.Value = that.GetValue() + this.StrValue = that.GetStrValue() + return this +} + +type DeepTreeFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetDown() *ADeepBranch + GetAnd() *AndDeepBranch + GetLeaf() *DeepLeaf +} + +func (this *DeepTree) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *DeepTree) TestProto() github_com_gogo_protobuf_proto.Message { + return NewDeepTreeFromFace(this) +} + +func (this *DeepTree) GetDown() *ADeepBranch { + return this.Down +} + +func (this *DeepTree) GetAnd() *AndDeepBranch { + return this.And +} + +func (this *DeepTree) GetLeaf() *DeepLeaf { + return this.Leaf +} + +func NewDeepTreeFromFace(that DeepTreeFace) *DeepTree { + this := &DeepTree{} + this.Down = that.GetDown() + this.And = that.GetAnd() + this.Leaf = that.GetLeaf() + return this +} + +type ADeepBranchFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetDown() DeepTree +} + +func (this *ADeepBranch) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *ADeepBranch) TestProto() github_com_gogo_protobuf_proto.Message { + return NewADeepBranchFromFace(this) +} + +func (this *ADeepBranch) GetDown() DeepTree { + return this.Down +} + +func NewADeepBranchFromFace(that ADeepBranchFace) *ADeepBranch { + this := &ADeepBranch{} + this.Down = that.GetDown() + return this +} + +type AndDeepBranchFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetLeft() DeepTree + GetRight() DeepTree +} + +func (this *AndDeepBranch) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *AndDeepBranch) TestProto() github_com_gogo_protobuf_proto.Message { + return NewAndDeepBranchFromFace(this) +} + +func (this *AndDeepBranch) GetLeft() DeepTree { + return this.Left +} + +func (this *AndDeepBranch) GetRight() DeepTree { + return this.Right +} + +func NewAndDeepBranchFromFace(that AndDeepBranchFace) *AndDeepBranch { + this := &AndDeepBranch{} + this.Left = that.GetLeft() + this.Right = that.GetRight() + return this +} + +type DeepLeafFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetTree() Tree +} + +func (this *DeepLeaf) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *DeepLeaf) TestProto() github_com_gogo_protobuf_proto.Message { + return NewDeepLeafFromFace(this) +} + +func (this *DeepLeaf) GetTree() Tree { + return this.Tree +} + +func NewDeepLeafFromFace(that DeepLeafFace) *DeepLeaf { + this := &DeepLeaf{} + this.Tree = that.GetTree() + return this +} + +type NilFace interface { + Proto() github_com_gogo_protobuf_proto.Message +} + +func (this *Nil) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *Nil) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNilFromFace(this) +} + +func NewNilFromFace(that NilFace) *Nil { + this := &Nil{} + return this +} + +type NidOptEnumFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetField1() TheTestEnum +} + +func (this *NidOptEnum) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NidOptEnum) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNidOptEnumFromFace(this) +} + +func (this *NidOptEnum) GetField1() TheTestEnum { + return this.Field1 +} + +func NewNidOptEnumFromFace(that NidOptEnumFace) *NidOptEnum { + this := &NidOptEnum{} + this.Field1 = that.GetField1() + return this +} + +type NinOptEnumFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetField1() *TheTestEnum + GetField2() *YetAnotherTestEnum + GetField3() *YetYetAnotherTestEnum +} + +func (this *NinOptEnum) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NinOptEnum) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNinOptEnumFromFace(this) +} + +func (this *NinOptEnum) GetField1() *TheTestEnum { + return this.Field1 +} + +func (this *NinOptEnum) GetField2() *YetAnotherTestEnum { + return this.Field2 +} + +func (this *NinOptEnum) GetField3() *YetYetAnotherTestEnum { + return this.Field3 +} + +func NewNinOptEnumFromFace(that NinOptEnumFace) *NinOptEnum { + this := &NinOptEnum{} + this.Field1 = that.GetField1() + this.Field2 = that.GetField2() + this.Field3 = that.GetField3() + return this +} + +type NidRepEnumFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetField1() []TheTestEnum + GetField2() []YetAnotherTestEnum + GetField3() []YetYetAnotherTestEnum +} + +func (this *NidRepEnum) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NidRepEnum) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNidRepEnumFromFace(this) +} + +func (this *NidRepEnum) GetField1() []TheTestEnum { + return this.Field1 +} + +func (this *NidRepEnum) GetField2() []YetAnotherTestEnum { + return this.Field2 +} + +func (this *NidRepEnum) GetField3() []YetYetAnotherTestEnum { + return this.Field3 +} + +func NewNidRepEnumFromFace(that NidRepEnumFace) *NidRepEnum { + this := &NidRepEnum{} + this.Field1 = that.GetField1() + this.Field2 = that.GetField2() + this.Field3 = that.GetField3() + return this +} + +type NinRepEnumFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetField1() []TheTestEnum + GetField2() []YetAnotherTestEnum + GetField3() []YetYetAnotherTestEnum +} + +func (this *NinRepEnum) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NinRepEnum) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNinRepEnumFromFace(this) +} + +func (this *NinRepEnum) GetField1() []TheTestEnum { + return this.Field1 +} + +func (this *NinRepEnum) GetField2() []YetAnotherTestEnum { + return this.Field2 +} + +func (this *NinRepEnum) GetField3() []YetYetAnotherTestEnum { + return this.Field3 +} + +func NewNinRepEnumFromFace(that NinRepEnumFace) *NinRepEnum { + this := &NinRepEnum{} + this.Field1 = that.GetField1() + this.Field2 = that.GetField2() + this.Field3 = that.GetField3() + return this +} + +type AnotherNinOptEnumFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetField1() *AnotherTestEnum + GetField2() *YetAnotherTestEnum + GetField3() *YetYetAnotherTestEnum +} + +func (this *AnotherNinOptEnum) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *AnotherNinOptEnum) TestProto() github_com_gogo_protobuf_proto.Message { + return NewAnotherNinOptEnumFromFace(this) +} + +func (this *AnotherNinOptEnum) GetField1() *AnotherTestEnum { + return this.Field1 +} + +func (this *AnotherNinOptEnum) GetField2() *YetAnotherTestEnum { + return this.Field2 +} + +func (this *AnotherNinOptEnum) GetField3() *YetYetAnotherTestEnum { + return this.Field3 +} + +func NewAnotherNinOptEnumFromFace(that AnotherNinOptEnumFace) *AnotherNinOptEnum { + this := &AnotherNinOptEnum{} + this.Field1 = that.GetField1() + this.Field2 = that.GetField2() + this.Field3 = that.GetField3() + return this +} + +type TimerFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetTime1() int64 + GetTime2() int64 + GetData() []byte +} + +func (this *Timer) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *Timer) TestProto() github_com_gogo_protobuf_proto.Message { + return NewTimerFromFace(this) +} + +func (this *Timer) GetTime1() int64 { + return this.Time1 +} + +func (this *Timer) GetTime2() int64 { + return this.Time2 +} + +func (this *Timer) GetData() []byte { + return this.Data +} + +func NewTimerFromFace(that TimerFace) *Timer { + this := &Timer{} + this.Time1 = that.GetTime1() + this.Time2 = that.GetTime2() + this.Data = that.GetData() + return this +} + +type NestedDefinitionFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetField1() *int64 + GetEnumField() *NestedDefinition_NestedEnum + GetNNM() *NestedDefinition_NestedMessage_NestedNestedMsg + GetNM() *NestedDefinition_NestedMessage +} + +func (this *NestedDefinition) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NestedDefinition) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNestedDefinitionFromFace(this) +} + +func (this *NestedDefinition) GetField1() *int64 { + return this.Field1 +} + +func (this *NestedDefinition) GetEnumField() *NestedDefinition_NestedEnum { + return this.EnumField +} + +func (this *NestedDefinition) GetNNM() *NestedDefinition_NestedMessage_NestedNestedMsg { + return this.NNM +} + +func (this *NestedDefinition) GetNM() *NestedDefinition_NestedMessage { + return this.NM +} + +func NewNestedDefinitionFromFace(that NestedDefinitionFace) *NestedDefinition { + this := &NestedDefinition{} + this.Field1 = that.GetField1() + this.EnumField = that.GetEnumField() + this.NNM = that.GetNNM() + this.NM = that.GetNM() + return this +} + +type NestedDefinition_NestedMessageFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetNestedField1() *uint64 + GetNNM() *NestedDefinition_NestedMessage_NestedNestedMsg +} + +func (this *NestedDefinition_NestedMessage) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NestedDefinition_NestedMessage) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNestedDefinition_NestedMessageFromFace(this) +} + +func (this *NestedDefinition_NestedMessage) GetNestedField1() *uint64 { + return this.NestedField1 +} + +func (this *NestedDefinition_NestedMessage) GetNNM() *NestedDefinition_NestedMessage_NestedNestedMsg { + return this.NNM +} + +func NewNestedDefinition_NestedMessageFromFace(that NestedDefinition_NestedMessageFace) *NestedDefinition_NestedMessage { + this := &NestedDefinition_NestedMessage{} + this.NestedField1 = that.GetNestedField1() + this.NNM = that.GetNNM() + return this +} + +type NestedDefinition_NestedMessage_NestedNestedMsgFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetNestedNestedField1() *string +} + +func (this *NestedDefinition_NestedMessage_NestedNestedMsg) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NestedDefinition_NestedMessage_NestedNestedMsg) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNestedDefinition_NestedMessage_NestedNestedMsgFromFace(this) +} + +func (this *NestedDefinition_NestedMessage_NestedNestedMsg) GetNestedNestedField1() *string { + return this.NestedNestedField1 +} + +func NewNestedDefinition_NestedMessage_NestedNestedMsgFromFace(that NestedDefinition_NestedMessage_NestedNestedMsgFace) *NestedDefinition_NestedMessage_NestedNestedMsg { + this := &NestedDefinition_NestedMessage_NestedNestedMsg{} + this.NestedNestedField1 = that.GetNestedNestedField1() + return this +} + +type NestedScopeFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetA() *NestedDefinition_NestedMessage_NestedNestedMsg + GetB() *NestedDefinition_NestedEnum + GetC() *NestedDefinition_NestedMessage +} + +func (this *NestedScope) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NestedScope) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNestedScopeFromFace(this) +} + +func (this *NestedScope) GetA() *NestedDefinition_NestedMessage_NestedNestedMsg { + return this.A +} + +func (this *NestedScope) GetB() *NestedDefinition_NestedEnum { + return this.B +} + +func (this *NestedScope) GetC() *NestedDefinition_NestedMessage { + return this.C +} + +func NewNestedScopeFromFace(that NestedScopeFace) *NestedScope { + this := &NestedScope{} + this.A = that.GetA() + this.B = that.GetB() + this.C = that.GetC() + return this +} + +type CustomContainerFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetCustomStruct() NidOptCustom +} + +func (this *CustomContainer) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *CustomContainer) TestProto() github_com_gogo_protobuf_proto.Message { + return NewCustomContainerFromFace(this) +} + +func (this *CustomContainer) GetCustomStruct() NidOptCustom { + return this.CustomStruct +} + +func NewCustomContainerFromFace(that CustomContainerFace) *CustomContainer { + this := &CustomContainer{} + this.CustomStruct = that.GetCustomStruct() + return this +} + +type CustomNameNidOptNativeFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetFieldA() float64 + GetFieldB() float32 + GetFieldC() int32 + GetFieldD() int64 + GetFieldE() uint32 + GetFieldF() uint64 + GetFieldG() int32 + GetFieldH() int64 + GetFieldI() uint32 + GetFieldJ() int32 + GetFieldK() uint64 + GetFieldL() int64 + GetFieldM() bool + GetFieldN() string + GetFieldO() []byte +} + +func (this *CustomNameNidOptNative) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *CustomNameNidOptNative) TestProto() github_com_gogo_protobuf_proto.Message { + return NewCustomNameNidOptNativeFromFace(this) +} + +func (this *CustomNameNidOptNative) GetFieldA() float64 { + return this.FieldA +} + +func (this *CustomNameNidOptNative) GetFieldB() float32 { + return this.FieldB +} + +func (this *CustomNameNidOptNative) GetFieldC() int32 { + return this.FieldC +} + +func (this *CustomNameNidOptNative) GetFieldD() int64 { + return this.FieldD +} + +func (this *CustomNameNidOptNative) GetFieldE() uint32 { + return this.FieldE +} + +func (this *CustomNameNidOptNative) GetFieldF() uint64 { + return this.FieldF +} + +func (this *CustomNameNidOptNative) GetFieldG() int32 { + return this.FieldG +} + +func (this *CustomNameNidOptNative) GetFieldH() int64 { + return this.FieldH +} + +func (this *CustomNameNidOptNative) GetFieldI() uint32 { + return this.FieldI +} + +func (this *CustomNameNidOptNative) GetFieldJ() int32 { + return this.FieldJ +} + +func (this *CustomNameNidOptNative) GetFieldK() uint64 { + return this.FieldK +} + +func (this *CustomNameNidOptNative) GetFieldL() int64 { + return this.FieldL +} + +func (this *CustomNameNidOptNative) GetFieldM() bool { + return this.FieldM +} + +func (this *CustomNameNidOptNative) GetFieldN() string { + return this.FieldN +} + +func (this *CustomNameNidOptNative) GetFieldO() []byte { + return this.FieldO +} + +func NewCustomNameNidOptNativeFromFace(that CustomNameNidOptNativeFace) *CustomNameNidOptNative { + this := &CustomNameNidOptNative{} + this.FieldA = that.GetFieldA() + this.FieldB = that.GetFieldB() + this.FieldC = that.GetFieldC() + this.FieldD = that.GetFieldD() + this.FieldE = that.GetFieldE() + this.FieldF = that.GetFieldF() + this.FieldG = that.GetFieldG() + this.FieldH = that.GetFieldH() + this.FieldI = that.GetFieldI() + this.FieldJ = that.GetFieldJ() + this.FieldK = that.GetFieldK() + this.FieldL = that.GetFieldL() + this.FieldM = that.GetFieldM() + this.FieldN = that.GetFieldN() + this.FieldO = that.GetFieldO() + return this +} + +type CustomNameNinOptNativeFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetFieldA() *float64 + GetFieldB() *float32 + GetFieldC() *int32 + GetFieldD() *int64 + GetFieldE() *uint32 + GetFieldF() *uint64 + GetFieldG() *int32 + GetFieldH() *int64 + GetFieldI() *uint32 + GetFieldJ() *int32 + GetFieldK() *uint64 + GetFielL() *int64 + GetFieldM() *bool + GetFieldN() *string + GetFieldO() []byte +} + +func (this *CustomNameNinOptNative) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *CustomNameNinOptNative) TestProto() github_com_gogo_protobuf_proto.Message { + return NewCustomNameNinOptNativeFromFace(this) +} + +func (this *CustomNameNinOptNative) GetFieldA() *float64 { + return this.FieldA +} + +func (this *CustomNameNinOptNative) GetFieldB() *float32 { + return this.FieldB +} + +func (this *CustomNameNinOptNative) GetFieldC() *int32 { + return this.FieldC +} + +func (this *CustomNameNinOptNative) GetFieldD() *int64 { + return this.FieldD +} + +func (this *CustomNameNinOptNative) GetFieldE() *uint32 { + return this.FieldE +} + +func (this *CustomNameNinOptNative) GetFieldF() *uint64 { + return this.FieldF +} + +func (this *CustomNameNinOptNative) GetFieldG() *int32 { + return this.FieldG +} + +func (this *CustomNameNinOptNative) GetFieldH() *int64 { + return this.FieldH +} + +func (this *CustomNameNinOptNative) GetFieldI() *uint32 { + return this.FieldI +} + +func (this *CustomNameNinOptNative) GetFieldJ() *int32 { + return this.FieldJ +} + +func (this *CustomNameNinOptNative) GetFieldK() *uint64 { + return this.FieldK +} + +func (this *CustomNameNinOptNative) GetFielL() *int64 { + return this.FielL +} + +func (this *CustomNameNinOptNative) GetFieldM() *bool { + return this.FieldM +} + +func (this *CustomNameNinOptNative) GetFieldN() *string { + return this.FieldN +} + +func (this *CustomNameNinOptNative) GetFieldO() []byte { + return this.FieldO +} + +func NewCustomNameNinOptNativeFromFace(that CustomNameNinOptNativeFace) *CustomNameNinOptNative { + this := &CustomNameNinOptNative{} + this.FieldA = that.GetFieldA() + this.FieldB = that.GetFieldB() + this.FieldC = that.GetFieldC() + this.FieldD = that.GetFieldD() + this.FieldE = that.GetFieldE() + this.FieldF = that.GetFieldF() + this.FieldG = that.GetFieldG() + this.FieldH = that.GetFieldH() + this.FieldI = that.GetFieldI() + this.FieldJ = that.GetFieldJ() + this.FieldK = that.GetFieldK() + this.FielL = that.GetFielL() + this.FieldM = that.GetFieldM() + this.FieldN = that.GetFieldN() + this.FieldO = that.GetFieldO() + return this +} + +type CustomNameNinRepNativeFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetFieldA() []float64 + GetFieldB() []float32 + GetFieldC() []int32 + GetFieldD() []int64 + GetFieldE() []uint32 + GetFieldF() []uint64 + GetFieldG() []int32 + GetFieldH() []int64 + GetFieldI() []uint32 + GetFieldJ() []int32 + GetFieldK() []uint64 + GetFieldL() []int64 + GetFieldM() []bool + GetFieldN() []string + GetFieldO() [][]byte +} + +func (this *CustomNameNinRepNative) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *CustomNameNinRepNative) TestProto() github_com_gogo_protobuf_proto.Message { + return NewCustomNameNinRepNativeFromFace(this) +} + +func (this *CustomNameNinRepNative) GetFieldA() []float64 { + return this.FieldA +} + +func (this *CustomNameNinRepNative) GetFieldB() []float32 { + return this.FieldB +} + +func (this *CustomNameNinRepNative) GetFieldC() []int32 { + return this.FieldC +} + +func (this *CustomNameNinRepNative) GetFieldD() []int64 { + return this.FieldD +} + +func (this *CustomNameNinRepNative) GetFieldE() []uint32 { + return this.FieldE +} + +func (this *CustomNameNinRepNative) GetFieldF() []uint64 { + return this.FieldF +} + +func (this *CustomNameNinRepNative) GetFieldG() []int32 { + return this.FieldG +} + +func (this *CustomNameNinRepNative) GetFieldH() []int64 { + return this.FieldH +} + +func (this *CustomNameNinRepNative) GetFieldI() []uint32 { + return this.FieldI +} + +func (this *CustomNameNinRepNative) GetFieldJ() []int32 { + return this.FieldJ +} + +func (this *CustomNameNinRepNative) GetFieldK() []uint64 { + return this.FieldK +} + +func (this *CustomNameNinRepNative) GetFieldL() []int64 { + return this.FieldL +} + +func (this *CustomNameNinRepNative) GetFieldM() []bool { + return this.FieldM +} + +func (this *CustomNameNinRepNative) GetFieldN() []string { + return this.FieldN +} + +func (this *CustomNameNinRepNative) GetFieldO() [][]byte { + return this.FieldO +} + +func NewCustomNameNinRepNativeFromFace(that CustomNameNinRepNativeFace) *CustomNameNinRepNative { + this := &CustomNameNinRepNative{} + this.FieldA = that.GetFieldA() + this.FieldB = that.GetFieldB() + this.FieldC = that.GetFieldC() + this.FieldD = that.GetFieldD() + this.FieldE = that.GetFieldE() + this.FieldF = that.GetFieldF() + this.FieldG = that.GetFieldG() + this.FieldH = that.GetFieldH() + this.FieldI = that.GetFieldI() + this.FieldJ = that.GetFieldJ() + this.FieldK = that.GetFieldK() + this.FieldL = that.GetFieldL() + this.FieldM = that.GetFieldM() + this.FieldN = that.GetFieldN() + this.FieldO = that.GetFieldO() + return this +} + +type CustomNameNinStructFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetFieldA() *float64 + GetFieldB() *float32 + GetFieldC() *NidOptNative + GetFieldD() []*NinOptNative + GetFieldE() *uint64 + GetFieldF() *int32 + GetFieldG() *NidOptNative + GetFieldH() *bool + GetFieldI() *string + GetFieldJ() []byte +} + +func (this *CustomNameNinStruct) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *CustomNameNinStruct) TestProto() github_com_gogo_protobuf_proto.Message { + return NewCustomNameNinStructFromFace(this) +} + +func (this *CustomNameNinStruct) GetFieldA() *float64 { + return this.FieldA +} + +func (this *CustomNameNinStruct) GetFieldB() *float32 { + return this.FieldB +} + +func (this *CustomNameNinStruct) GetFieldC() *NidOptNative { + return this.FieldC +} + +func (this *CustomNameNinStruct) GetFieldD() []*NinOptNative { + return this.FieldD +} + +func (this *CustomNameNinStruct) GetFieldE() *uint64 { + return this.FieldE +} + +func (this *CustomNameNinStruct) GetFieldF() *int32 { + return this.FieldF +} + +func (this *CustomNameNinStruct) GetFieldG() *NidOptNative { + return this.FieldG +} + +func (this *CustomNameNinStruct) GetFieldH() *bool { + return this.FieldH +} + +func (this *CustomNameNinStruct) GetFieldI() *string { + return this.FieldI +} + +func (this *CustomNameNinStruct) GetFieldJ() []byte { + return this.FieldJ +} + +func NewCustomNameNinStructFromFace(that CustomNameNinStructFace) *CustomNameNinStruct { + this := &CustomNameNinStruct{} + this.FieldA = that.GetFieldA() + this.FieldB = that.GetFieldB() + this.FieldC = that.GetFieldC() + this.FieldD = that.GetFieldD() + this.FieldE = that.GetFieldE() + this.FieldF = that.GetFieldF() + this.FieldG = that.GetFieldG() + this.FieldH = that.GetFieldH() + this.FieldI = that.GetFieldI() + this.FieldJ = that.GetFieldJ() + return this +} + +type CustomNameCustomTypeFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetFieldA() *Uuid + GetFieldB() *github_com_gogo_protobuf_test_custom.Uint128 + GetFieldC() []Uuid + GetFieldD() []github_com_gogo_protobuf_test_custom.Uint128 +} + +func (this *CustomNameCustomType) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *CustomNameCustomType) TestProto() github_com_gogo_protobuf_proto.Message { + return NewCustomNameCustomTypeFromFace(this) +} + +func (this *CustomNameCustomType) GetFieldA() *Uuid { + return this.FieldA +} + +func (this *CustomNameCustomType) GetFieldB() *github_com_gogo_protobuf_test_custom.Uint128 { + return this.FieldB +} + +func (this *CustomNameCustomType) GetFieldC() []Uuid { + return this.FieldC +} + +func (this *CustomNameCustomType) GetFieldD() []github_com_gogo_protobuf_test_custom.Uint128 { + return this.FieldD +} + +func NewCustomNameCustomTypeFromFace(that CustomNameCustomTypeFace) *CustomNameCustomType { + this := &CustomNameCustomType{} + this.FieldA = that.GetFieldA() + this.FieldB = that.GetFieldB() + this.FieldC = that.GetFieldC() + this.FieldD = that.GetFieldD() + return this +} + +type CustomNameNinEmbeddedStructUnionFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetNidOptNative() *NidOptNative + GetFieldA() *NinOptNative + GetFieldB() *bool +} + +func (this *CustomNameNinEmbeddedStructUnion) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *CustomNameNinEmbeddedStructUnion) TestProto() github_com_gogo_protobuf_proto.Message { + return NewCustomNameNinEmbeddedStructUnionFromFace(this) +} + +func (this *CustomNameNinEmbeddedStructUnion) GetNidOptNative() *NidOptNative { + return this.NidOptNative +} + +func (this *CustomNameNinEmbeddedStructUnion) GetFieldA() *NinOptNative { + return this.FieldA +} + +func (this *CustomNameNinEmbeddedStructUnion) GetFieldB() *bool { + return this.FieldB +} + +func NewCustomNameNinEmbeddedStructUnionFromFace(that CustomNameNinEmbeddedStructUnionFace) *CustomNameNinEmbeddedStructUnion { + this := &CustomNameNinEmbeddedStructUnion{} + this.NidOptNative = that.GetNidOptNative() + this.FieldA = that.GetFieldA() + this.FieldB = that.GetFieldB() + return this +} + +type CustomNameEnumFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetFieldA() *TheTestEnum + GetFieldB() []TheTestEnum +} + +func (this *CustomNameEnum) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *CustomNameEnum) TestProto() github_com_gogo_protobuf_proto.Message { + return NewCustomNameEnumFromFace(this) +} + +func (this *CustomNameEnum) GetFieldA() *TheTestEnum { + return this.FieldA +} + +func (this *CustomNameEnum) GetFieldB() []TheTestEnum { + return this.FieldB +} + +func NewCustomNameEnumFromFace(that CustomNameEnumFace) *CustomNameEnum { + this := &CustomNameEnum{} + this.FieldA = that.GetFieldA() + this.FieldB = that.GetFieldB() + return this +} + +type UnrecognizedFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetField1() *string +} + +func (this *Unrecognized) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *Unrecognized) TestProto() github_com_gogo_protobuf_proto.Message { + return NewUnrecognizedFromFace(this) +} + +func (this *Unrecognized) GetField1() *string { + return this.Field1 +} + +func NewUnrecognizedFromFace(that UnrecognizedFace) *Unrecognized { + this := &Unrecognized{} + this.Field1 = that.GetField1() + return this +} + +type UnrecognizedWithInnerFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetEmbedded() []*UnrecognizedWithInner_Inner + GetField2() *string +} + +func (this *UnrecognizedWithInner) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *UnrecognizedWithInner) TestProto() github_com_gogo_protobuf_proto.Message { + return NewUnrecognizedWithInnerFromFace(this) +} + +func (this *UnrecognizedWithInner) GetEmbedded() []*UnrecognizedWithInner_Inner { + return this.Embedded +} + +func (this *UnrecognizedWithInner) GetField2() *string { + return this.Field2 +} + +func NewUnrecognizedWithInnerFromFace(that UnrecognizedWithInnerFace) *UnrecognizedWithInner { + this := &UnrecognizedWithInner{} + this.Embedded = that.GetEmbedded() + this.Field2 = that.GetField2() + return this +} + +type UnrecognizedWithInner_InnerFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetField1() *uint32 +} + +func (this *UnrecognizedWithInner_Inner) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *UnrecognizedWithInner_Inner) TestProto() github_com_gogo_protobuf_proto.Message { + return NewUnrecognizedWithInner_InnerFromFace(this) +} + +func (this *UnrecognizedWithInner_Inner) GetField1() *uint32 { + return this.Field1 +} + +func NewUnrecognizedWithInner_InnerFromFace(that UnrecognizedWithInner_InnerFace) *UnrecognizedWithInner_Inner { + this := &UnrecognizedWithInner_Inner{} + this.Field1 = that.GetField1() + return this +} + +type UnrecognizedWithEmbedFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetUnrecognizedWithEmbed_Embedded() UnrecognizedWithEmbed_Embedded + GetField2() *string +} + +func (this *UnrecognizedWithEmbed) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *UnrecognizedWithEmbed) TestProto() github_com_gogo_protobuf_proto.Message { + return NewUnrecognizedWithEmbedFromFace(this) +} + +func (this *UnrecognizedWithEmbed) GetUnrecognizedWithEmbed_Embedded() UnrecognizedWithEmbed_Embedded { + return this.UnrecognizedWithEmbed_Embedded +} + +func (this *UnrecognizedWithEmbed) GetField2() *string { + return this.Field2 +} + +func NewUnrecognizedWithEmbedFromFace(that UnrecognizedWithEmbedFace) *UnrecognizedWithEmbed { + this := &UnrecognizedWithEmbed{} + this.UnrecognizedWithEmbed_Embedded = that.GetUnrecognizedWithEmbed_Embedded() + this.Field2 = that.GetField2() + return this +} + +type UnrecognizedWithEmbed_EmbeddedFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetField1() *uint32 +} + +func (this *UnrecognizedWithEmbed_Embedded) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *UnrecognizedWithEmbed_Embedded) TestProto() github_com_gogo_protobuf_proto.Message { + return NewUnrecognizedWithEmbed_EmbeddedFromFace(this) +} + +func (this *UnrecognizedWithEmbed_Embedded) GetField1() *uint32 { + return this.Field1 +} + +func NewUnrecognizedWithEmbed_EmbeddedFromFace(that UnrecognizedWithEmbed_EmbeddedFace) *UnrecognizedWithEmbed_Embedded { + this := &UnrecognizedWithEmbed_Embedded{} + this.Field1 = that.GetField1() + return this +} + +type NodeFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetLabel() *string + GetChildren() []*Node +} + +func (this *Node) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *Node) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNodeFromFace(this) +} + +func (this *Node) GetLabel() *string { + return this.Label +} + +func (this *Node) GetChildren() []*Node { + return this.Children +} + +func NewNodeFromFace(that NodeFace) *Node { + this := &Node{} + this.Label = that.GetLabel() + this.Children = that.GetChildren() + return this +} + +func (this *NidOptNative) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 19) + s = append(s, "&test.NidOptNative{") + s = append(s, "Field1: "+fmt.Sprintf("%#v", this.Field1)+",\n") + s = append(s, "Field2: "+fmt.Sprintf("%#v", this.Field2)+",\n") + s = append(s, "Field3: "+fmt.Sprintf("%#v", this.Field3)+",\n") + s = append(s, "Field4: "+fmt.Sprintf("%#v", this.Field4)+",\n") + s = append(s, "Field5: "+fmt.Sprintf("%#v", this.Field5)+",\n") + s = append(s, "Field6: "+fmt.Sprintf("%#v", this.Field6)+",\n") + s = append(s, "Field7: "+fmt.Sprintf("%#v", this.Field7)+",\n") + s = append(s, "Field8: "+fmt.Sprintf("%#v", this.Field8)+",\n") + s = append(s, "Field9: "+fmt.Sprintf("%#v", this.Field9)+",\n") + s = append(s, "Field10: "+fmt.Sprintf("%#v", this.Field10)+",\n") + s = append(s, "Field11: "+fmt.Sprintf("%#v", this.Field11)+",\n") + s = append(s, "Field12: "+fmt.Sprintf("%#v", this.Field12)+",\n") + s = append(s, "Field13: "+fmt.Sprintf("%#v", this.Field13)+",\n") + s = append(s, "Field14: "+fmt.Sprintf("%#v", this.Field14)+",\n") + s = append(s, "Field15: "+fmt.Sprintf("%#v", this.Field15)+",\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 *NinOptNative) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 19) + s = append(s, "&test.NinOptNative{") + if this.Field1 != nil { + s = append(s, "Field1: "+valueToGoStringThetest(this.Field1, "float64")+",\n") + } + if this.Field2 != nil { + s = append(s, "Field2: "+valueToGoStringThetest(this.Field2, "float32")+",\n") + } + if this.Field3 != nil { + s = append(s, "Field3: "+valueToGoStringThetest(this.Field3, "int32")+",\n") + } + if this.Field4 != nil { + s = append(s, "Field4: "+valueToGoStringThetest(this.Field4, "int64")+",\n") + } + if this.Field5 != nil { + s = append(s, "Field5: "+valueToGoStringThetest(this.Field5, "uint32")+",\n") + } + if this.Field6 != nil { + s = append(s, "Field6: "+valueToGoStringThetest(this.Field6, "uint64")+",\n") + } + if this.Field7 != nil { + s = append(s, "Field7: "+valueToGoStringThetest(this.Field7, "int32")+",\n") + } + if this.Field8 != nil { + s = append(s, "Field8: "+valueToGoStringThetest(this.Field8, "int64")+",\n") + } + if this.Field9 != nil { + s = append(s, "Field9: "+valueToGoStringThetest(this.Field9, "uint32")+",\n") + } + if this.Field10 != nil { + s = append(s, "Field10: "+valueToGoStringThetest(this.Field10, "int32")+",\n") + } + if this.Field11 != nil { + s = append(s, "Field11: "+valueToGoStringThetest(this.Field11, "uint64")+",\n") + } + if this.Field12 != nil { + s = append(s, "Field12: "+valueToGoStringThetest(this.Field12, "int64")+",\n") + } + if this.Field13 != nil { + s = append(s, "Field13: "+valueToGoStringThetest(this.Field13, "bool")+",\n") + } + if this.Field14 != nil { + s = append(s, "Field14: "+valueToGoStringThetest(this.Field14, "string")+",\n") + } + if this.Field15 != nil { + s = append(s, "Field15: "+valueToGoStringThetest(this.Field15, "byte")+",\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 *NidRepNative) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 19) + s = append(s, "&test.NidRepNative{") + if this.Field1 != nil { + s = append(s, "Field1: "+fmt.Sprintf("%#v", this.Field1)+",\n") + } + if this.Field2 != nil { + s = append(s, "Field2: "+fmt.Sprintf("%#v", this.Field2)+",\n") + } + if this.Field3 != nil { + s = append(s, "Field3: "+fmt.Sprintf("%#v", this.Field3)+",\n") + } + if this.Field4 != nil { + s = append(s, "Field4: "+fmt.Sprintf("%#v", this.Field4)+",\n") + } + if this.Field5 != nil { + s = append(s, "Field5: "+fmt.Sprintf("%#v", this.Field5)+",\n") + } + if this.Field6 != nil { + s = append(s, "Field6: "+fmt.Sprintf("%#v", this.Field6)+",\n") + } + if this.Field7 != nil { + s = append(s, "Field7: "+fmt.Sprintf("%#v", this.Field7)+",\n") + } + if this.Field8 != nil { + s = append(s, "Field8: "+fmt.Sprintf("%#v", this.Field8)+",\n") + } + if this.Field9 != nil { + s = append(s, "Field9: "+fmt.Sprintf("%#v", this.Field9)+",\n") + } + if this.Field10 != nil { + s = append(s, "Field10: "+fmt.Sprintf("%#v", this.Field10)+",\n") + } + if this.Field11 != nil { + s = append(s, "Field11: "+fmt.Sprintf("%#v", this.Field11)+",\n") + } + if this.Field12 != nil { + s = append(s, "Field12: "+fmt.Sprintf("%#v", this.Field12)+",\n") + } + if this.Field13 != nil { + s = append(s, "Field13: "+fmt.Sprintf("%#v", this.Field13)+",\n") + } + if this.Field14 != nil { + s = append(s, "Field14: "+fmt.Sprintf("%#v", this.Field14)+",\n") + } + if this.Field15 != nil { + s = append(s, "Field15: "+fmt.Sprintf("%#v", this.Field15)+",\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 *NinRepNative) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 19) + s = append(s, "&test.NinRepNative{") + if this.Field1 != nil { + s = append(s, "Field1: "+fmt.Sprintf("%#v", this.Field1)+",\n") + } + if this.Field2 != nil { + s = append(s, "Field2: "+fmt.Sprintf("%#v", this.Field2)+",\n") + } + if this.Field3 != nil { + s = append(s, "Field3: "+fmt.Sprintf("%#v", this.Field3)+",\n") + } + if this.Field4 != nil { + s = append(s, "Field4: "+fmt.Sprintf("%#v", this.Field4)+",\n") + } + if this.Field5 != nil { + s = append(s, "Field5: "+fmt.Sprintf("%#v", this.Field5)+",\n") + } + if this.Field6 != nil { + s = append(s, "Field6: "+fmt.Sprintf("%#v", this.Field6)+",\n") + } + if this.Field7 != nil { + s = append(s, "Field7: "+fmt.Sprintf("%#v", this.Field7)+",\n") + } + if this.Field8 != nil { + s = append(s, "Field8: "+fmt.Sprintf("%#v", this.Field8)+",\n") + } + if this.Field9 != nil { + s = append(s, "Field9: "+fmt.Sprintf("%#v", this.Field9)+",\n") + } + if this.Field10 != nil { + s = append(s, "Field10: "+fmt.Sprintf("%#v", this.Field10)+",\n") + } + if this.Field11 != nil { + s = append(s, "Field11: "+fmt.Sprintf("%#v", this.Field11)+",\n") + } + if this.Field12 != nil { + s = append(s, "Field12: "+fmt.Sprintf("%#v", this.Field12)+",\n") + } + if this.Field13 != nil { + s = append(s, "Field13: "+fmt.Sprintf("%#v", this.Field13)+",\n") + } + if this.Field14 != nil { + s = append(s, "Field14: "+fmt.Sprintf("%#v", this.Field14)+",\n") + } + if this.Field15 != nil { + s = append(s, "Field15: "+fmt.Sprintf("%#v", this.Field15)+",\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 *NidRepPackedNative) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 17) + s = append(s, "&test.NidRepPackedNative{") + if this.Field1 != nil { + s = append(s, "Field1: "+fmt.Sprintf("%#v", this.Field1)+",\n") + } + if this.Field2 != nil { + s = append(s, "Field2: "+fmt.Sprintf("%#v", this.Field2)+",\n") + } + if this.Field3 != nil { + s = append(s, "Field3: "+fmt.Sprintf("%#v", this.Field3)+",\n") + } + if this.Field4 != nil { + s = append(s, "Field4: "+fmt.Sprintf("%#v", this.Field4)+",\n") + } + if this.Field5 != nil { + s = append(s, "Field5: "+fmt.Sprintf("%#v", this.Field5)+",\n") + } + if this.Field6 != nil { + s = append(s, "Field6: "+fmt.Sprintf("%#v", this.Field6)+",\n") + } + if this.Field7 != nil { + s = append(s, "Field7: "+fmt.Sprintf("%#v", this.Field7)+",\n") + } + if this.Field8 != nil { + s = append(s, "Field8: "+fmt.Sprintf("%#v", this.Field8)+",\n") + } + if this.Field9 != nil { + s = append(s, "Field9: "+fmt.Sprintf("%#v", this.Field9)+",\n") + } + if this.Field10 != nil { + s = append(s, "Field10: "+fmt.Sprintf("%#v", this.Field10)+",\n") + } + if this.Field11 != nil { + s = append(s, "Field11: "+fmt.Sprintf("%#v", this.Field11)+",\n") + } + if this.Field12 != nil { + s = append(s, "Field12: "+fmt.Sprintf("%#v", this.Field12)+",\n") + } + if this.Field13 != nil { + s = append(s, "Field13: "+fmt.Sprintf("%#v", this.Field13)+",\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 *NinRepPackedNative) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 17) + s = append(s, "&test.NinRepPackedNative{") + if this.Field1 != nil { + s = append(s, "Field1: "+fmt.Sprintf("%#v", this.Field1)+",\n") + } + if this.Field2 != nil { + s = append(s, "Field2: "+fmt.Sprintf("%#v", this.Field2)+",\n") + } + if this.Field3 != nil { + s = append(s, "Field3: "+fmt.Sprintf("%#v", this.Field3)+",\n") + } + if this.Field4 != nil { + s = append(s, "Field4: "+fmt.Sprintf("%#v", this.Field4)+",\n") + } + if this.Field5 != nil { + s = append(s, "Field5: "+fmt.Sprintf("%#v", this.Field5)+",\n") + } + if this.Field6 != nil { + s = append(s, "Field6: "+fmt.Sprintf("%#v", this.Field6)+",\n") + } + if this.Field7 != nil { + s = append(s, "Field7: "+fmt.Sprintf("%#v", this.Field7)+",\n") + } + if this.Field8 != nil { + s = append(s, "Field8: "+fmt.Sprintf("%#v", this.Field8)+",\n") + } + if this.Field9 != nil { + s = append(s, "Field9: "+fmt.Sprintf("%#v", this.Field9)+",\n") + } + if this.Field10 != nil { + s = append(s, "Field10: "+fmt.Sprintf("%#v", this.Field10)+",\n") + } + if this.Field11 != nil { + s = append(s, "Field11: "+fmt.Sprintf("%#v", this.Field11)+",\n") + } + if this.Field12 != nil { + s = append(s, "Field12: "+fmt.Sprintf("%#v", this.Field12)+",\n") + } + if this.Field13 != nil { + s = append(s, "Field13: "+fmt.Sprintf("%#v", this.Field13)+",\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 *NidOptStruct) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 14) + s = append(s, "&test.NidOptStruct{") + s = append(s, "Field1: "+fmt.Sprintf("%#v", this.Field1)+",\n") + s = append(s, "Field2: "+fmt.Sprintf("%#v", this.Field2)+",\n") + s = append(s, "Field3: "+strings.Replace(this.Field3.GoString(), `&`, ``, 1)+",\n") + s = append(s, "Field4: "+strings.Replace(this.Field4.GoString(), `&`, ``, 1)+",\n") + s = append(s, "Field6: "+fmt.Sprintf("%#v", this.Field6)+",\n") + s = append(s, "Field7: "+fmt.Sprintf("%#v", this.Field7)+",\n") + s = append(s, "Field8: "+strings.Replace(this.Field8.GoString(), `&`, ``, 1)+",\n") + s = append(s, "Field13: "+fmt.Sprintf("%#v", this.Field13)+",\n") + s = append(s, "Field14: "+fmt.Sprintf("%#v", this.Field14)+",\n") + s = append(s, "Field15: "+fmt.Sprintf("%#v", this.Field15)+",\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 *NinOptStruct) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 14) + s = append(s, "&test.NinOptStruct{") + if this.Field1 != nil { + s = append(s, "Field1: "+valueToGoStringThetest(this.Field1, "float64")+",\n") + } + if this.Field2 != nil { + s = append(s, "Field2: "+valueToGoStringThetest(this.Field2, "float32")+",\n") + } + if this.Field3 != nil { + s = append(s, "Field3: "+fmt.Sprintf("%#v", this.Field3)+",\n") + } + if this.Field4 != nil { + s = append(s, "Field4: "+fmt.Sprintf("%#v", this.Field4)+",\n") + } + if this.Field6 != nil { + s = append(s, "Field6: "+valueToGoStringThetest(this.Field6, "uint64")+",\n") + } + if this.Field7 != nil { + s = append(s, "Field7: "+valueToGoStringThetest(this.Field7, "int32")+",\n") + } + if this.Field8 != nil { + s = append(s, "Field8: "+fmt.Sprintf("%#v", this.Field8)+",\n") + } + if this.Field13 != nil { + s = append(s, "Field13: "+valueToGoStringThetest(this.Field13, "bool")+",\n") + } + if this.Field14 != nil { + s = append(s, "Field14: "+valueToGoStringThetest(this.Field14, "string")+",\n") + } + if this.Field15 != nil { + s = append(s, "Field15: "+valueToGoStringThetest(this.Field15, "byte")+",\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 *NidRepStruct) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 14) + s = append(s, "&test.NidRepStruct{") + if this.Field1 != nil { + s = append(s, "Field1: "+fmt.Sprintf("%#v", this.Field1)+",\n") + } + if this.Field2 != nil { + s = append(s, "Field2: "+fmt.Sprintf("%#v", this.Field2)+",\n") + } + if this.Field3 != nil { + s = append(s, "Field3: "+fmt.Sprintf("%#v", this.Field3)+",\n") + } + if this.Field4 != nil { + s = append(s, "Field4: "+fmt.Sprintf("%#v", this.Field4)+",\n") + } + if this.Field6 != nil { + s = append(s, "Field6: "+fmt.Sprintf("%#v", this.Field6)+",\n") + } + if this.Field7 != nil { + s = append(s, "Field7: "+fmt.Sprintf("%#v", this.Field7)+",\n") + } + if this.Field8 != nil { + s = append(s, "Field8: "+fmt.Sprintf("%#v", this.Field8)+",\n") + } + if this.Field13 != nil { + s = append(s, "Field13: "+fmt.Sprintf("%#v", this.Field13)+",\n") + } + if this.Field14 != nil { + s = append(s, "Field14: "+fmt.Sprintf("%#v", this.Field14)+",\n") + } + if this.Field15 != nil { + s = append(s, "Field15: "+fmt.Sprintf("%#v", this.Field15)+",\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 *NinRepStruct) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 14) + s = append(s, "&test.NinRepStruct{") + if this.Field1 != nil { + s = append(s, "Field1: "+fmt.Sprintf("%#v", this.Field1)+",\n") + } + if this.Field2 != nil { + s = append(s, "Field2: "+fmt.Sprintf("%#v", this.Field2)+",\n") + } + if this.Field3 != nil { + s = append(s, "Field3: "+fmt.Sprintf("%#v", this.Field3)+",\n") + } + if this.Field4 != nil { + s = append(s, "Field4: "+fmt.Sprintf("%#v", this.Field4)+",\n") + } + if this.Field6 != nil { + s = append(s, "Field6: "+fmt.Sprintf("%#v", this.Field6)+",\n") + } + if this.Field7 != nil { + s = append(s, "Field7: "+fmt.Sprintf("%#v", this.Field7)+",\n") + } + if this.Field8 != nil { + s = append(s, "Field8: "+fmt.Sprintf("%#v", this.Field8)+",\n") + } + if this.Field13 != nil { + s = append(s, "Field13: "+fmt.Sprintf("%#v", this.Field13)+",\n") + } + if this.Field14 != nil { + s = append(s, "Field14: "+fmt.Sprintf("%#v", this.Field14)+",\n") + } + if this.Field15 != nil { + s = append(s, "Field15: "+fmt.Sprintf("%#v", this.Field15)+",\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 *NidEmbeddedStruct) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 7) + s = append(s, "&test.NidEmbeddedStruct{") + if this.NidOptNative != nil { + s = append(s, "NidOptNative: "+fmt.Sprintf("%#v", this.NidOptNative)+",\n") + } + s = append(s, "Field200: "+strings.Replace(this.Field200.GoString(), `&`, ``, 1)+",\n") + s = append(s, "Field210: "+fmt.Sprintf("%#v", this.Field210)+",\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 *NinEmbeddedStruct) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 7) + s = append(s, "&test.NinEmbeddedStruct{") + if this.NidOptNative != nil { + s = append(s, "NidOptNative: "+fmt.Sprintf("%#v", this.NidOptNative)+",\n") + } + if this.Field200 != nil { + s = append(s, "Field200: "+fmt.Sprintf("%#v", this.Field200)+",\n") + } + if this.Field210 != nil { + s = append(s, "Field210: "+valueToGoStringThetest(this.Field210, "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 *NidNestedStruct) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 6) + s = append(s, "&test.NidNestedStruct{") + s = append(s, "Field1: "+strings.Replace(this.Field1.GoString(), `&`, ``, 1)+",\n") + if this.Field2 != nil { + s = append(s, "Field2: "+fmt.Sprintf("%#v", this.Field2)+",\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 *NinNestedStruct) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 6) + s = append(s, "&test.NinNestedStruct{") + if this.Field1 != nil { + s = append(s, "Field1: "+fmt.Sprintf("%#v", this.Field1)+",\n") + } + if this.Field2 != nil { + s = append(s, "Field2: "+fmt.Sprintf("%#v", this.Field2)+",\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 *NidOptCustom) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 6) + s = append(s, "&test.NidOptCustom{") + s = append(s, "Id: "+fmt.Sprintf("%#v", this.Id)+",\n") + s = append(s, "Value: "+fmt.Sprintf("%#v", this.Value)+",\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 *CustomDash) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&test.CustomDash{") + if this.Value != nil { + s = append(s, "Value: "+valueToGoStringThetest(this.Value, "github_com_gogo_protobuf_test_custom_dash_type.Bytes")+",\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 *NinOptCustom) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 6) + s = append(s, "&test.NinOptCustom{") + if this.Id != nil { + s = append(s, "Id: "+valueToGoStringThetest(this.Id, "Uuid")+",\n") + } + if this.Value != nil { + s = append(s, "Value: "+valueToGoStringThetest(this.Value, "github_com_gogo_protobuf_test_custom.Uint128")+",\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 *NidRepCustom) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 6) + s = append(s, "&test.NidRepCustom{") + if this.Id != nil { + s = append(s, "Id: "+fmt.Sprintf("%#v", this.Id)+",\n") + } + if this.Value != nil { + s = append(s, "Value: "+fmt.Sprintf("%#v", this.Value)+",\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 *NinRepCustom) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 6) + s = append(s, "&test.NinRepCustom{") + if this.Id != nil { + s = append(s, "Id: "+fmt.Sprintf("%#v", this.Id)+",\n") + } + if this.Value != nil { + s = append(s, "Value: "+fmt.Sprintf("%#v", this.Value)+",\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 *NinOptNativeUnion) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 13) + s = append(s, "&test.NinOptNativeUnion{") + if this.Field1 != nil { + s = append(s, "Field1: "+valueToGoStringThetest(this.Field1, "float64")+",\n") + } + if this.Field2 != nil { + s = append(s, "Field2: "+valueToGoStringThetest(this.Field2, "float32")+",\n") + } + if this.Field3 != nil { + s = append(s, "Field3: "+valueToGoStringThetest(this.Field3, "int32")+",\n") + } + if this.Field4 != nil { + s = append(s, "Field4: "+valueToGoStringThetest(this.Field4, "int64")+",\n") + } + if this.Field5 != nil { + s = append(s, "Field5: "+valueToGoStringThetest(this.Field5, "uint32")+",\n") + } + if this.Field6 != nil { + s = append(s, "Field6: "+valueToGoStringThetest(this.Field6, "uint64")+",\n") + } + if this.Field13 != nil { + s = append(s, "Field13: "+valueToGoStringThetest(this.Field13, "bool")+",\n") + } + if this.Field14 != nil { + s = append(s, "Field14: "+valueToGoStringThetest(this.Field14, "string")+",\n") + } + if this.Field15 != nil { + s = append(s, "Field15: "+valueToGoStringThetest(this.Field15, "byte")+",\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 *NinOptStructUnion) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 13) + s = append(s, "&test.NinOptStructUnion{") + if this.Field1 != nil { + s = append(s, "Field1: "+valueToGoStringThetest(this.Field1, "float64")+",\n") + } + if this.Field2 != nil { + s = append(s, "Field2: "+valueToGoStringThetest(this.Field2, "float32")+",\n") + } + if this.Field3 != nil { + s = append(s, "Field3: "+fmt.Sprintf("%#v", this.Field3)+",\n") + } + if this.Field4 != nil { + s = append(s, "Field4: "+fmt.Sprintf("%#v", this.Field4)+",\n") + } + if this.Field6 != nil { + s = append(s, "Field6: "+valueToGoStringThetest(this.Field6, "uint64")+",\n") + } + if this.Field7 != nil { + s = append(s, "Field7: "+valueToGoStringThetest(this.Field7, "int32")+",\n") + } + if this.Field13 != nil { + s = append(s, "Field13: "+valueToGoStringThetest(this.Field13, "bool")+",\n") + } + if this.Field14 != nil { + s = append(s, "Field14: "+valueToGoStringThetest(this.Field14, "string")+",\n") + } + if this.Field15 != nil { + s = append(s, "Field15: "+valueToGoStringThetest(this.Field15, "byte")+",\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 *NinEmbeddedStructUnion) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 7) + s = append(s, "&test.NinEmbeddedStructUnion{") + if this.NidOptNative != nil { + s = append(s, "NidOptNative: "+fmt.Sprintf("%#v", this.NidOptNative)+",\n") + } + if this.Field200 != nil { + s = append(s, "Field200: "+fmt.Sprintf("%#v", this.Field200)+",\n") + } + if this.Field210 != nil { + s = append(s, "Field210: "+valueToGoStringThetest(this.Field210, "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 *NinNestedStructUnion) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 7) + s = append(s, "&test.NinNestedStructUnion{") + if this.Field1 != nil { + s = append(s, "Field1: "+fmt.Sprintf("%#v", this.Field1)+",\n") + } + if this.Field2 != nil { + s = append(s, "Field2: "+fmt.Sprintf("%#v", this.Field2)+",\n") + } + if this.Field3 != nil { + s = append(s, "Field3: "+fmt.Sprintf("%#v", this.Field3)+",\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 *Tree) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 7) + s = append(s, "&test.Tree{") + if this.Or != nil { + s = append(s, "Or: "+fmt.Sprintf("%#v", this.Or)+",\n") + } + if this.And != nil { + s = append(s, "And: "+fmt.Sprintf("%#v", this.And)+",\n") + } + if this.Leaf != nil { + s = append(s, "Leaf: "+fmt.Sprintf("%#v", this.Leaf)+",\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 *OrBranch) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 6) + s = append(s, "&test.OrBranch{") + s = append(s, "Left: "+strings.Replace(this.Left.GoString(), `&`, ``, 1)+",\n") + s = append(s, "Right: "+strings.Replace(this.Right.GoString(), `&`, ``, 1)+",\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 *AndBranch) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 6) + s = append(s, "&test.AndBranch{") + s = append(s, "Left: "+strings.Replace(this.Left.GoString(), `&`, ``, 1)+",\n") + s = append(s, "Right: "+strings.Replace(this.Right.GoString(), `&`, ``, 1)+",\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 *Leaf) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 6) + s = append(s, "&test.Leaf{") + s = append(s, "Value: "+fmt.Sprintf("%#v", this.Value)+",\n") + s = append(s, "StrValue: "+fmt.Sprintf("%#v", this.StrValue)+",\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 *DeepTree) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 7) + s = append(s, "&test.DeepTree{") + if this.Down != nil { + s = append(s, "Down: "+fmt.Sprintf("%#v", this.Down)+",\n") + } + if this.And != nil { + s = append(s, "And: "+fmt.Sprintf("%#v", this.And)+",\n") + } + if this.Leaf != nil { + s = append(s, "Leaf: "+fmt.Sprintf("%#v", this.Leaf)+",\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 *ADeepBranch) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&test.ADeepBranch{") + s = append(s, "Down: "+strings.Replace(this.Down.GoString(), `&`, ``, 1)+",\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 *AndDeepBranch) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 6) + s = append(s, "&test.AndDeepBranch{") + s = append(s, "Left: "+strings.Replace(this.Left.GoString(), `&`, ``, 1)+",\n") + s = append(s, "Right: "+strings.Replace(this.Right.GoString(), `&`, ``, 1)+",\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 *DeepLeaf) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&test.DeepLeaf{") + s = append(s, "Tree: "+strings.Replace(this.Tree.GoString(), `&`, ``, 1)+",\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 *Nil) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 4) + s = append(s, "&test.Nil{") + 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 *NidOptEnum) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&test.NidOptEnum{") + s = append(s, "Field1: "+fmt.Sprintf("%#v", this.Field1)+",\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 *NinOptEnum) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 7) + s = append(s, "&test.NinOptEnum{") + if this.Field1 != nil { + s = append(s, "Field1: "+valueToGoStringThetest(this.Field1, "test.TheTestEnum")+",\n") + } + if this.Field2 != nil { + s = append(s, "Field2: "+valueToGoStringThetest(this.Field2, "test.YetAnotherTestEnum")+",\n") + } + if this.Field3 != nil { + s = append(s, "Field3: "+valueToGoStringThetest(this.Field3, "test.YetYetAnotherTestEnum")+",\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 *NidRepEnum) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 7) + s = append(s, "&test.NidRepEnum{") + if this.Field1 != nil { + s = append(s, "Field1: "+fmt.Sprintf("%#v", this.Field1)+",\n") + } + if this.Field2 != nil { + s = append(s, "Field2: "+fmt.Sprintf("%#v", this.Field2)+",\n") + } + if this.Field3 != nil { + s = append(s, "Field3: "+fmt.Sprintf("%#v", this.Field3)+",\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 *NinRepEnum) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 7) + s = append(s, "&test.NinRepEnum{") + if this.Field1 != nil { + s = append(s, "Field1: "+fmt.Sprintf("%#v", this.Field1)+",\n") + } + if this.Field2 != nil { + s = append(s, "Field2: "+fmt.Sprintf("%#v", this.Field2)+",\n") + } + if this.Field3 != nil { + s = append(s, "Field3: "+fmt.Sprintf("%#v", this.Field3)+",\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 *NinOptEnumDefault) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 7) + s = append(s, "&test.NinOptEnumDefault{") + if this.Field1 != nil { + s = append(s, "Field1: "+valueToGoStringThetest(this.Field1, "test.TheTestEnum")+",\n") + } + if this.Field2 != nil { + s = append(s, "Field2: "+valueToGoStringThetest(this.Field2, "test.YetAnotherTestEnum")+",\n") + } + if this.Field3 != nil { + s = append(s, "Field3: "+valueToGoStringThetest(this.Field3, "test.YetYetAnotherTestEnum")+",\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 *AnotherNinOptEnum) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 7) + s = append(s, "&test.AnotherNinOptEnum{") + if this.Field1 != nil { + s = append(s, "Field1: "+valueToGoStringThetest(this.Field1, "test.AnotherTestEnum")+",\n") + } + if this.Field2 != nil { + s = append(s, "Field2: "+valueToGoStringThetest(this.Field2, "test.YetAnotherTestEnum")+",\n") + } + if this.Field3 != nil { + s = append(s, "Field3: "+valueToGoStringThetest(this.Field3, "test.YetYetAnotherTestEnum")+",\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 *AnotherNinOptEnumDefault) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 7) + s = append(s, "&test.AnotherNinOptEnumDefault{") + if this.Field1 != nil { + s = append(s, "Field1: "+valueToGoStringThetest(this.Field1, "test.AnotherTestEnum")+",\n") + } + if this.Field2 != nil { + s = append(s, "Field2: "+valueToGoStringThetest(this.Field2, "test.YetAnotherTestEnum")+",\n") + } + if this.Field3 != nil { + s = append(s, "Field3: "+valueToGoStringThetest(this.Field3, "test.YetYetAnotherTestEnum")+",\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 *Timer) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 7) + s = append(s, "&test.Timer{") + s = append(s, "Time1: "+fmt.Sprintf("%#v", this.Time1)+",\n") + s = append(s, "Time2: "+fmt.Sprintf("%#v", this.Time2)+",\n") + s = append(s, "Data: "+fmt.Sprintf("%#v", this.Data)+",\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 *MyExtendable) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&test.MyExtendable{") + if this.Field1 != nil { + s = append(s, "Field1: "+valueToGoStringThetest(this.Field1, "int64")+",\n") + } + if this.XXX_extensions != nil { + s = append(s, "XXX_extensions: "+extensionToGoStringThetest(this.XXX_extensions)+",\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 *OtherExtenable) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 7) + s = append(s, "&test.OtherExtenable{") + if this.Field2 != nil { + s = append(s, "Field2: "+valueToGoStringThetest(this.Field2, "int64")+",\n") + } + if this.Field13 != nil { + s = append(s, "Field13: "+valueToGoStringThetest(this.Field13, "int64")+",\n") + } + if this.M != nil { + s = append(s, "M: "+fmt.Sprintf("%#v", this.M)+",\n") + } + if this.XXX_extensions != nil { + s = append(s, "XXX_extensions: "+extensionToGoStringThetest(this.XXX_extensions)+",\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 *NestedDefinition) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 8) + s = append(s, "&test.NestedDefinition{") + if this.Field1 != nil { + s = append(s, "Field1: "+valueToGoStringThetest(this.Field1, "int64")+",\n") + } + if this.EnumField != nil { + s = append(s, "EnumField: "+valueToGoStringThetest(this.EnumField, "test.NestedDefinition_NestedEnum")+",\n") + } + if this.NNM != nil { + s = append(s, "NNM: "+fmt.Sprintf("%#v", this.NNM)+",\n") + } + if this.NM != nil { + s = append(s, "NM: "+fmt.Sprintf("%#v", this.NM)+",\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 *NestedDefinition_NestedMessage) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 6) + s = append(s, "&test.NestedDefinition_NestedMessage{") + if this.NestedField1 != nil { + s = append(s, "NestedField1: "+valueToGoStringThetest(this.NestedField1, "uint64")+",\n") + } + if this.NNM != nil { + s = append(s, "NNM: "+fmt.Sprintf("%#v", this.NNM)+",\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 *NestedDefinition_NestedMessage_NestedNestedMsg) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&test.NestedDefinition_NestedMessage_NestedNestedMsg{") + if this.NestedNestedField1 != nil { + s = append(s, "NestedNestedField1: "+valueToGoStringThetest(this.NestedNestedField1, "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 *NestedScope) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 7) + s = append(s, "&test.NestedScope{") + if this.A != nil { + s = append(s, "A: "+fmt.Sprintf("%#v", this.A)+",\n") + } + if this.B != nil { + s = append(s, "B: "+valueToGoStringThetest(this.B, "test.NestedDefinition_NestedEnum")+",\n") + } + if this.C != nil { + s = append(s, "C: "+fmt.Sprintf("%#v", this.C)+",\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 *NinOptNativeDefault) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 19) + s = append(s, "&test.NinOptNativeDefault{") + if this.Field1 != nil { + s = append(s, "Field1: "+valueToGoStringThetest(this.Field1, "float64")+",\n") + } + if this.Field2 != nil { + s = append(s, "Field2: "+valueToGoStringThetest(this.Field2, "float32")+",\n") + } + if this.Field3 != nil { + s = append(s, "Field3: "+valueToGoStringThetest(this.Field3, "int32")+",\n") + } + if this.Field4 != nil { + s = append(s, "Field4: "+valueToGoStringThetest(this.Field4, "int64")+",\n") + } + if this.Field5 != nil { + s = append(s, "Field5: "+valueToGoStringThetest(this.Field5, "uint32")+",\n") + } + if this.Field6 != nil { + s = append(s, "Field6: "+valueToGoStringThetest(this.Field6, "uint64")+",\n") + } + if this.Field7 != nil { + s = append(s, "Field7: "+valueToGoStringThetest(this.Field7, "int32")+",\n") + } + if this.Field8 != nil { + s = append(s, "Field8: "+valueToGoStringThetest(this.Field8, "int64")+",\n") + } + if this.Field9 != nil { + s = append(s, "Field9: "+valueToGoStringThetest(this.Field9, "uint32")+",\n") + } + if this.Field10 != nil { + s = append(s, "Field10: "+valueToGoStringThetest(this.Field10, "int32")+",\n") + } + if this.Field11 != nil { + s = append(s, "Field11: "+valueToGoStringThetest(this.Field11, "uint64")+",\n") + } + if this.Field12 != nil { + s = append(s, "Field12: "+valueToGoStringThetest(this.Field12, "int64")+",\n") + } + if this.Field13 != nil { + s = append(s, "Field13: "+valueToGoStringThetest(this.Field13, "bool")+",\n") + } + if this.Field14 != nil { + s = append(s, "Field14: "+valueToGoStringThetest(this.Field14, "string")+",\n") + } + if this.Field15 != nil { + s = append(s, "Field15: "+valueToGoStringThetest(this.Field15, "byte")+",\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 *CustomContainer) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&test.CustomContainer{") + s = append(s, "CustomStruct: "+strings.Replace(this.CustomStruct.GoString(), `&`, ``, 1)+",\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 *CustomNameNidOptNative) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 19) + s = append(s, "&test.CustomNameNidOptNative{") + s = append(s, "FieldA: "+fmt.Sprintf("%#v", this.FieldA)+",\n") + s = append(s, "FieldB: "+fmt.Sprintf("%#v", this.FieldB)+",\n") + s = append(s, "FieldC: "+fmt.Sprintf("%#v", this.FieldC)+",\n") + s = append(s, "FieldD: "+fmt.Sprintf("%#v", this.FieldD)+",\n") + s = append(s, "FieldE: "+fmt.Sprintf("%#v", this.FieldE)+",\n") + s = append(s, "FieldF: "+fmt.Sprintf("%#v", this.FieldF)+",\n") + s = append(s, "FieldG: "+fmt.Sprintf("%#v", this.FieldG)+",\n") + s = append(s, "FieldH: "+fmt.Sprintf("%#v", this.FieldH)+",\n") + s = append(s, "FieldI: "+fmt.Sprintf("%#v", this.FieldI)+",\n") + s = append(s, "FieldJ: "+fmt.Sprintf("%#v", this.FieldJ)+",\n") + s = append(s, "FieldK: "+fmt.Sprintf("%#v", this.FieldK)+",\n") + s = append(s, "FieldL: "+fmt.Sprintf("%#v", this.FieldL)+",\n") + s = append(s, "FieldM: "+fmt.Sprintf("%#v", this.FieldM)+",\n") + s = append(s, "FieldN: "+fmt.Sprintf("%#v", this.FieldN)+",\n") + s = append(s, "FieldO: "+fmt.Sprintf("%#v", this.FieldO)+",\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 *CustomNameNinOptNative) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 19) + s = append(s, "&test.CustomNameNinOptNative{") + if this.FieldA != nil { + s = append(s, "FieldA: "+valueToGoStringThetest(this.FieldA, "float64")+",\n") + } + if this.FieldB != nil { + s = append(s, "FieldB: "+valueToGoStringThetest(this.FieldB, "float32")+",\n") + } + if this.FieldC != nil { + s = append(s, "FieldC: "+valueToGoStringThetest(this.FieldC, "int32")+",\n") + } + if this.FieldD != nil { + s = append(s, "FieldD: "+valueToGoStringThetest(this.FieldD, "int64")+",\n") + } + if this.FieldE != nil { + s = append(s, "FieldE: "+valueToGoStringThetest(this.FieldE, "uint32")+",\n") + } + if this.FieldF != nil { + s = append(s, "FieldF: "+valueToGoStringThetest(this.FieldF, "uint64")+",\n") + } + if this.FieldG != nil { + s = append(s, "FieldG: "+valueToGoStringThetest(this.FieldG, "int32")+",\n") + } + if this.FieldH != nil { + s = append(s, "FieldH: "+valueToGoStringThetest(this.FieldH, "int64")+",\n") + } + if this.FieldI != nil { + s = append(s, "FieldI: "+valueToGoStringThetest(this.FieldI, "uint32")+",\n") + } + if this.FieldJ != nil { + s = append(s, "FieldJ: "+valueToGoStringThetest(this.FieldJ, "int32")+",\n") + } + if this.FieldK != nil { + s = append(s, "FieldK: "+valueToGoStringThetest(this.FieldK, "uint64")+",\n") + } + if this.FielL != nil { + s = append(s, "FielL: "+valueToGoStringThetest(this.FielL, "int64")+",\n") + } + if this.FieldM != nil { + s = append(s, "FieldM: "+valueToGoStringThetest(this.FieldM, "bool")+",\n") + } + if this.FieldN != nil { + s = append(s, "FieldN: "+valueToGoStringThetest(this.FieldN, "string")+",\n") + } + if this.FieldO != nil { + s = append(s, "FieldO: "+valueToGoStringThetest(this.FieldO, "byte")+",\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 *CustomNameNinRepNative) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 19) + s = append(s, "&test.CustomNameNinRepNative{") + if this.FieldA != nil { + s = append(s, "FieldA: "+fmt.Sprintf("%#v", this.FieldA)+",\n") + } + if this.FieldB != nil { + s = append(s, "FieldB: "+fmt.Sprintf("%#v", this.FieldB)+",\n") + } + if this.FieldC != nil { + s = append(s, "FieldC: "+fmt.Sprintf("%#v", this.FieldC)+",\n") + } + if this.FieldD != nil { + s = append(s, "FieldD: "+fmt.Sprintf("%#v", this.FieldD)+",\n") + } + if this.FieldE != nil { + s = append(s, "FieldE: "+fmt.Sprintf("%#v", this.FieldE)+",\n") + } + if this.FieldF != nil { + s = append(s, "FieldF: "+fmt.Sprintf("%#v", this.FieldF)+",\n") + } + if this.FieldG != nil { + s = append(s, "FieldG: "+fmt.Sprintf("%#v", this.FieldG)+",\n") + } + if this.FieldH != nil { + s = append(s, "FieldH: "+fmt.Sprintf("%#v", this.FieldH)+",\n") + } + if this.FieldI != nil { + s = append(s, "FieldI: "+fmt.Sprintf("%#v", this.FieldI)+",\n") + } + if this.FieldJ != nil { + s = append(s, "FieldJ: "+fmt.Sprintf("%#v", this.FieldJ)+",\n") + } + if this.FieldK != nil { + s = append(s, "FieldK: "+fmt.Sprintf("%#v", this.FieldK)+",\n") + } + if this.FieldL != nil { + s = append(s, "FieldL: "+fmt.Sprintf("%#v", this.FieldL)+",\n") + } + if this.FieldM != nil { + s = append(s, "FieldM: "+fmt.Sprintf("%#v", this.FieldM)+",\n") + } + if this.FieldN != nil { + s = append(s, "FieldN: "+fmt.Sprintf("%#v", this.FieldN)+",\n") + } + if this.FieldO != nil { + s = append(s, "FieldO: "+fmt.Sprintf("%#v", this.FieldO)+",\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 *CustomNameNinStruct) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 14) + s = append(s, "&test.CustomNameNinStruct{") + if this.FieldA != nil { + s = append(s, "FieldA: "+valueToGoStringThetest(this.FieldA, "float64")+",\n") + } + if this.FieldB != nil { + s = append(s, "FieldB: "+valueToGoStringThetest(this.FieldB, "float32")+",\n") + } + if this.FieldC != nil { + s = append(s, "FieldC: "+fmt.Sprintf("%#v", this.FieldC)+",\n") + } + if this.FieldD != nil { + s = append(s, "FieldD: "+fmt.Sprintf("%#v", this.FieldD)+",\n") + } + if this.FieldE != nil { + s = append(s, "FieldE: "+valueToGoStringThetest(this.FieldE, "uint64")+",\n") + } + if this.FieldF != nil { + s = append(s, "FieldF: "+valueToGoStringThetest(this.FieldF, "int32")+",\n") + } + if this.FieldG != nil { + s = append(s, "FieldG: "+fmt.Sprintf("%#v", this.FieldG)+",\n") + } + if this.FieldH != nil { + s = append(s, "FieldH: "+valueToGoStringThetest(this.FieldH, "bool")+",\n") + } + if this.FieldI != nil { + s = append(s, "FieldI: "+valueToGoStringThetest(this.FieldI, "string")+",\n") + } + if this.FieldJ != nil { + s = append(s, "FieldJ: "+valueToGoStringThetest(this.FieldJ, "byte")+",\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 *CustomNameCustomType) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 8) + s = append(s, "&test.CustomNameCustomType{") + if this.FieldA != nil { + s = append(s, "FieldA: "+valueToGoStringThetest(this.FieldA, "Uuid")+",\n") + } + if this.FieldB != nil { + s = append(s, "FieldB: "+valueToGoStringThetest(this.FieldB, "github_com_gogo_protobuf_test_custom.Uint128")+",\n") + } + if this.FieldC != nil { + s = append(s, "FieldC: "+fmt.Sprintf("%#v", this.FieldC)+",\n") + } + if this.FieldD != nil { + s = append(s, "FieldD: "+fmt.Sprintf("%#v", this.FieldD)+",\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 *CustomNameNinEmbeddedStructUnion) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 7) + s = append(s, "&test.CustomNameNinEmbeddedStructUnion{") + if this.NidOptNative != nil { + s = append(s, "NidOptNative: "+fmt.Sprintf("%#v", this.NidOptNative)+",\n") + } + if this.FieldA != nil { + s = append(s, "FieldA: "+fmt.Sprintf("%#v", this.FieldA)+",\n") + } + if this.FieldB != nil { + s = append(s, "FieldB: "+valueToGoStringThetest(this.FieldB, "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 *CustomNameEnum) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 6) + s = append(s, "&test.CustomNameEnum{") + if this.FieldA != nil { + s = append(s, "FieldA: "+valueToGoStringThetest(this.FieldA, "test.TheTestEnum")+",\n") + } + if this.FieldB != nil { + s = append(s, "FieldB: "+fmt.Sprintf("%#v", this.FieldB)+",\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 *NoExtensionsMap) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&test.NoExtensionsMap{") + if this.Field1 != nil { + s = append(s, "Field1: "+valueToGoStringThetest(this.Field1, "int64")+",\n") + } + if this.XXX_extensions != nil { + s = append(s, "XXX_extensions: "+fmt.Sprintf("%#v", this.XXX_extensions)+",\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 *Unrecognized) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&test.Unrecognized{") + if this.Field1 != nil { + s = append(s, "Field1: "+valueToGoStringThetest(this.Field1, "string")+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *UnrecognizedWithInner) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 6) + s = append(s, "&test.UnrecognizedWithInner{") + if this.Embedded != nil { + s = append(s, "Embedded: "+fmt.Sprintf("%#v", this.Embedded)+",\n") + } + if this.Field2 != nil { + s = append(s, "Field2: "+valueToGoStringThetest(this.Field2, "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 *UnrecognizedWithInner_Inner) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&test.UnrecognizedWithInner_Inner{") + if this.Field1 != nil { + s = append(s, "Field1: "+valueToGoStringThetest(this.Field1, "uint32")+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *UnrecognizedWithEmbed) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 6) + s = append(s, "&test.UnrecognizedWithEmbed{") + s = append(s, "UnrecognizedWithEmbed_Embedded: "+strings.Replace(this.UnrecognizedWithEmbed_Embedded.GoString(), `&`, ``, 1)+",\n") + if this.Field2 != nil { + s = append(s, "Field2: "+valueToGoStringThetest(this.Field2, "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 *UnrecognizedWithEmbed_Embedded) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&test.UnrecognizedWithEmbed_Embedded{") + if this.Field1 != nil { + s = append(s, "Field1: "+valueToGoStringThetest(this.Field1, "uint32")+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *Node) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 6) + s = append(s, "&test.Node{") + if this.Label != nil { + s = append(s, "Label: "+valueToGoStringThetest(this.Label, "string")+",\n") + } + if this.Children != nil { + s = append(s, "Children: "+fmt.Sprintf("%#v", this.Children)+",\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 valueToGoStringThetest(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 extensionToGoStringThetest(e map[int32]github_com_gogo_protobuf_proto.Extension) string { + if e == nil { + return "nil" + } + s := "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 +} +func NewPopulatedNidOptNative(r randyThetest, easy bool) *NidOptNative { + this := &NidOptNative{} + this.Field1 = float64(r.Float64()) + if r.Intn(2) == 0 { + this.Field1 *= -1 + } + this.Field2 = float32(r.Float32()) + if r.Intn(2) == 0 { + this.Field2 *= -1 + } + this.Field3 = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Field3 *= -1 + } + this.Field4 = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Field4 *= -1 + } + this.Field5 = uint32(r.Uint32()) + this.Field6 = uint64(uint64(r.Uint32())) + this.Field7 = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Field7 *= -1 + } + this.Field8 = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Field8 *= -1 + } + this.Field9 = uint32(r.Uint32()) + this.Field10 = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Field10 *= -1 + } + this.Field11 = uint64(uint64(r.Uint32())) + this.Field12 = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Field12 *= -1 + } + this.Field13 = bool(bool(r.Intn(2) == 0)) + this.Field14 = randStringThetest(r) + v1 := r.Intn(100) + this.Field15 = make([]byte, v1) + for i := 0; i < v1; i++ { + this.Field15[i] = byte(r.Intn(256)) + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 16) + } + return this +} + +func NewPopulatedNinOptNative(r randyThetest, easy bool) *NinOptNative { + this := &NinOptNative{} + if r.Intn(10) != 0 { + v2 := float64(r.Float64()) + if r.Intn(2) == 0 { + v2 *= -1 + } + this.Field1 = &v2 + } + if r.Intn(10) != 0 { + v3 := float32(r.Float32()) + if r.Intn(2) == 0 { + v3 *= -1 + } + this.Field2 = &v3 + } + if r.Intn(10) != 0 { + v4 := int32(r.Int31()) + if r.Intn(2) == 0 { + v4 *= -1 + } + this.Field3 = &v4 + } + if r.Intn(10) != 0 { + v5 := int64(r.Int63()) + if r.Intn(2) == 0 { + v5 *= -1 + } + this.Field4 = &v5 + } + if r.Intn(10) != 0 { + v6 := uint32(r.Uint32()) + this.Field5 = &v6 + } + if r.Intn(10) != 0 { + v7 := uint64(uint64(r.Uint32())) + this.Field6 = &v7 + } + if r.Intn(10) != 0 { + v8 := int32(r.Int31()) + if r.Intn(2) == 0 { + v8 *= -1 + } + this.Field7 = &v8 + } + if r.Intn(10) != 0 { + v9 := int64(r.Int63()) + if r.Intn(2) == 0 { + v9 *= -1 + } + this.Field8 = &v9 + } + if r.Intn(10) != 0 { + v10 := uint32(r.Uint32()) + this.Field9 = &v10 + } + if r.Intn(10) != 0 { + v11 := int32(r.Int31()) + if r.Intn(2) == 0 { + v11 *= -1 + } + this.Field10 = &v11 + } + if r.Intn(10) != 0 { + v12 := uint64(uint64(r.Uint32())) + this.Field11 = &v12 + } + if r.Intn(10) != 0 { + v13 := int64(r.Int63()) + if r.Intn(2) == 0 { + v13 *= -1 + } + this.Field12 = &v13 + } + if r.Intn(10) != 0 { + v14 := bool(bool(r.Intn(2) == 0)) + this.Field13 = &v14 + } + if r.Intn(10) != 0 { + v15 := randStringThetest(r) + this.Field14 = &v15 + } + if r.Intn(10) != 0 { + v16 := r.Intn(100) + this.Field15 = make([]byte, v16) + for i := 0; i < v16; i++ { + this.Field15[i] = byte(r.Intn(256)) + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 16) + } + return this +} + +func NewPopulatedNidRepNative(r randyThetest, easy bool) *NidRepNative { + this := &NidRepNative{} + if r.Intn(10) != 0 { + v17 := r.Intn(10) + this.Field1 = make([]float64, v17) + for i := 0; i < v17; i++ { + this.Field1[i] = float64(r.Float64()) + if r.Intn(2) == 0 { + this.Field1[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v18 := r.Intn(10) + this.Field2 = make([]float32, v18) + for i := 0; i < v18; i++ { + this.Field2[i] = float32(r.Float32()) + if r.Intn(2) == 0 { + this.Field2[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v19 := r.Intn(10) + this.Field3 = make([]int32, v19) + for i := 0; i < v19; i++ { + this.Field3[i] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Field3[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v20 := r.Intn(10) + this.Field4 = make([]int64, v20) + for i := 0; i < v20; i++ { + this.Field4[i] = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Field4[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v21 := r.Intn(10) + this.Field5 = make([]uint32, v21) + for i := 0; i < v21; i++ { + this.Field5[i] = uint32(r.Uint32()) + } + } + if r.Intn(10) != 0 { + v22 := r.Intn(10) + this.Field6 = make([]uint64, v22) + for i := 0; i < v22; i++ { + this.Field6[i] = uint64(uint64(r.Uint32())) + } + } + if r.Intn(10) != 0 { + v23 := r.Intn(10) + this.Field7 = make([]int32, v23) + for i := 0; i < v23; i++ { + this.Field7[i] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Field7[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v24 := r.Intn(10) + this.Field8 = make([]int64, v24) + for i := 0; i < v24; i++ { + this.Field8[i] = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Field8[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v25 := r.Intn(10) + this.Field9 = make([]uint32, v25) + for i := 0; i < v25; i++ { + this.Field9[i] = uint32(r.Uint32()) + } + } + if r.Intn(10) != 0 { + v26 := r.Intn(10) + this.Field10 = make([]int32, v26) + for i := 0; i < v26; i++ { + this.Field10[i] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Field10[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v27 := r.Intn(10) + this.Field11 = make([]uint64, v27) + for i := 0; i < v27; i++ { + this.Field11[i] = uint64(uint64(r.Uint32())) + } + } + if r.Intn(10) != 0 { + v28 := r.Intn(10) + this.Field12 = make([]int64, v28) + for i := 0; i < v28; i++ { + this.Field12[i] = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Field12[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v29 := r.Intn(10) + this.Field13 = make([]bool, v29) + for i := 0; i < v29; i++ { + this.Field13[i] = bool(bool(r.Intn(2) == 0)) + } + } + if r.Intn(10) != 0 { + v30 := r.Intn(10) + this.Field14 = make([]string, v30) + for i := 0; i < v30; i++ { + this.Field14[i] = randStringThetest(r) + } + } + if r.Intn(10) != 0 { + v31 := r.Intn(10) + this.Field15 = make([][]byte, v31) + for i := 0; i < v31; i++ { + v32 := r.Intn(100) + this.Field15[i] = make([]byte, v32) + for j := 0; j < v32; j++ { + this.Field15[i][j] = byte(r.Intn(256)) + } + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 16) + } + return this +} + +func NewPopulatedNinRepNative(r randyThetest, easy bool) *NinRepNative { + this := &NinRepNative{} + if r.Intn(10) != 0 { + v33 := r.Intn(10) + this.Field1 = make([]float64, v33) + for i := 0; i < v33; i++ { + this.Field1[i] = float64(r.Float64()) + if r.Intn(2) == 0 { + this.Field1[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v34 := r.Intn(10) + this.Field2 = make([]float32, v34) + for i := 0; i < v34; i++ { + this.Field2[i] = float32(r.Float32()) + if r.Intn(2) == 0 { + this.Field2[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v35 := r.Intn(10) + this.Field3 = make([]int32, v35) + for i := 0; i < v35; i++ { + this.Field3[i] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Field3[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v36 := r.Intn(10) + this.Field4 = make([]int64, v36) + for i := 0; i < v36; i++ { + this.Field4[i] = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Field4[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v37 := r.Intn(10) + this.Field5 = make([]uint32, v37) + for i := 0; i < v37; i++ { + this.Field5[i] = uint32(r.Uint32()) + } + } + if r.Intn(10) != 0 { + v38 := r.Intn(10) + this.Field6 = make([]uint64, v38) + for i := 0; i < v38; i++ { + this.Field6[i] = uint64(uint64(r.Uint32())) + } + } + if r.Intn(10) != 0 { + v39 := r.Intn(10) + this.Field7 = make([]int32, v39) + for i := 0; i < v39; i++ { + this.Field7[i] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Field7[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v40 := r.Intn(10) + this.Field8 = make([]int64, v40) + for i := 0; i < v40; i++ { + this.Field8[i] = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Field8[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v41 := r.Intn(10) + this.Field9 = make([]uint32, v41) + for i := 0; i < v41; i++ { + this.Field9[i] = uint32(r.Uint32()) + } + } + if r.Intn(10) != 0 { + v42 := r.Intn(10) + this.Field10 = make([]int32, v42) + for i := 0; i < v42; i++ { + this.Field10[i] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Field10[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v43 := r.Intn(10) + this.Field11 = make([]uint64, v43) + for i := 0; i < v43; i++ { + this.Field11[i] = uint64(uint64(r.Uint32())) + } + } + if r.Intn(10) != 0 { + v44 := r.Intn(10) + this.Field12 = make([]int64, v44) + for i := 0; i < v44; i++ { + this.Field12[i] = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Field12[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v45 := r.Intn(10) + this.Field13 = make([]bool, v45) + for i := 0; i < v45; i++ { + this.Field13[i] = bool(bool(r.Intn(2) == 0)) + } + } + if r.Intn(10) != 0 { + v46 := r.Intn(10) + this.Field14 = make([]string, v46) + for i := 0; i < v46; i++ { + this.Field14[i] = randStringThetest(r) + } + } + if r.Intn(10) != 0 { + v47 := r.Intn(10) + this.Field15 = make([][]byte, v47) + for i := 0; i < v47; i++ { + v48 := r.Intn(100) + this.Field15[i] = make([]byte, v48) + for j := 0; j < v48; j++ { + this.Field15[i][j] = byte(r.Intn(256)) + } + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 16) + } + return this +} + +func NewPopulatedNidRepPackedNative(r randyThetest, easy bool) *NidRepPackedNative { + this := &NidRepPackedNative{} + if r.Intn(10) != 0 { + v49 := r.Intn(10) + this.Field1 = make([]float64, v49) + for i := 0; i < v49; i++ { + this.Field1[i] = float64(r.Float64()) + if r.Intn(2) == 0 { + this.Field1[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v50 := r.Intn(10) + this.Field2 = make([]float32, v50) + for i := 0; i < v50; i++ { + this.Field2[i] = float32(r.Float32()) + if r.Intn(2) == 0 { + this.Field2[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v51 := r.Intn(10) + this.Field3 = make([]int32, v51) + for i := 0; i < v51; i++ { + this.Field3[i] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Field3[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v52 := r.Intn(10) + this.Field4 = make([]int64, v52) + for i := 0; i < v52; i++ { + this.Field4[i] = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Field4[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v53 := r.Intn(10) + this.Field5 = make([]uint32, v53) + for i := 0; i < v53; i++ { + this.Field5[i] = uint32(r.Uint32()) + } + } + if r.Intn(10) != 0 { + v54 := r.Intn(10) + this.Field6 = make([]uint64, v54) + for i := 0; i < v54; i++ { + this.Field6[i] = uint64(uint64(r.Uint32())) + } + } + if r.Intn(10) != 0 { + v55 := r.Intn(10) + this.Field7 = make([]int32, v55) + for i := 0; i < v55; i++ { + this.Field7[i] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Field7[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v56 := r.Intn(10) + this.Field8 = make([]int64, v56) + for i := 0; i < v56; i++ { + this.Field8[i] = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Field8[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v57 := r.Intn(10) + this.Field9 = make([]uint32, v57) + for i := 0; i < v57; i++ { + this.Field9[i] = uint32(r.Uint32()) + } + } + if r.Intn(10) != 0 { + v58 := r.Intn(10) + this.Field10 = make([]int32, v58) + for i := 0; i < v58; i++ { + this.Field10[i] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Field10[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v59 := r.Intn(10) + this.Field11 = make([]uint64, v59) + for i := 0; i < v59; i++ { + this.Field11[i] = uint64(uint64(r.Uint32())) + } + } + if r.Intn(10) != 0 { + v60 := r.Intn(10) + this.Field12 = make([]int64, v60) + for i := 0; i < v60; i++ { + this.Field12[i] = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Field12[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v61 := r.Intn(10) + this.Field13 = make([]bool, v61) + for i := 0; i < v61; i++ { + this.Field13[i] = bool(bool(r.Intn(2) == 0)) + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 14) + } + return this +} + +func NewPopulatedNinRepPackedNative(r randyThetest, easy bool) *NinRepPackedNative { + this := &NinRepPackedNative{} + if r.Intn(10) != 0 { + v62 := r.Intn(10) + this.Field1 = make([]float64, v62) + for i := 0; i < v62; i++ { + this.Field1[i] = float64(r.Float64()) + if r.Intn(2) == 0 { + this.Field1[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v63 := r.Intn(10) + this.Field2 = make([]float32, v63) + for i := 0; i < v63; i++ { + this.Field2[i] = float32(r.Float32()) + if r.Intn(2) == 0 { + this.Field2[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v64 := r.Intn(10) + this.Field3 = make([]int32, v64) + for i := 0; i < v64; i++ { + this.Field3[i] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Field3[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v65 := r.Intn(10) + this.Field4 = make([]int64, v65) + for i := 0; i < v65; i++ { + this.Field4[i] = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Field4[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v66 := r.Intn(10) + this.Field5 = make([]uint32, v66) + for i := 0; i < v66; i++ { + this.Field5[i] = uint32(r.Uint32()) + } + } + if r.Intn(10) != 0 { + v67 := r.Intn(10) + this.Field6 = make([]uint64, v67) + for i := 0; i < v67; i++ { + this.Field6[i] = uint64(uint64(r.Uint32())) + } + } + if r.Intn(10) != 0 { + v68 := r.Intn(10) + this.Field7 = make([]int32, v68) + for i := 0; i < v68; i++ { + this.Field7[i] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Field7[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v69 := r.Intn(10) + this.Field8 = make([]int64, v69) + for i := 0; i < v69; i++ { + this.Field8[i] = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Field8[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v70 := r.Intn(10) + this.Field9 = make([]uint32, v70) + for i := 0; i < v70; i++ { + this.Field9[i] = uint32(r.Uint32()) + } + } + if r.Intn(10) != 0 { + v71 := r.Intn(10) + this.Field10 = make([]int32, v71) + for i := 0; i < v71; i++ { + this.Field10[i] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Field10[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v72 := r.Intn(10) + this.Field11 = make([]uint64, v72) + for i := 0; i < v72; i++ { + this.Field11[i] = uint64(uint64(r.Uint32())) + } + } + if r.Intn(10) != 0 { + v73 := r.Intn(10) + this.Field12 = make([]int64, v73) + for i := 0; i < v73; i++ { + this.Field12[i] = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Field12[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v74 := r.Intn(10) + this.Field13 = make([]bool, v74) + for i := 0; i < v74; i++ { + this.Field13[i] = bool(bool(r.Intn(2) == 0)) + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 14) + } + return this +} + +func NewPopulatedNidOptStruct(r randyThetest, easy bool) *NidOptStruct { + this := &NidOptStruct{} + this.Field1 = float64(r.Float64()) + if r.Intn(2) == 0 { + this.Field1 *= -1 + } + this.Field2 = float32(r.Float32()) + if r.Intn(2) == 0 { + this.Field2 *= -1 + } + v75 := NewPopulatedNidOptNative(r, easy) + this.Field3 = *v75 + v76 := NewPopulatedNinOptNative(r, easy) + this.Field4 = *v76 + this.Field6 = uint64(uint64(r.Uint32())) + this.Field7 = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Field7 *= -1 + } + v77 := NewPopulatedNidOptNative(r, easy) + this.Field8 = *v77 + this.Field13 = bool(bool(r.Intn(2) == 0)) + this.Field14 = randStringThetest(r) + v78 := r.Intn(100) + this.Field15 = make([]byte, v78) + for i := 0; i < v78; i++ { + this.Field15[i] = byte(r.Intn(256)) + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 16) + } + return this +} + +func NewPopulatedNinOptStruct(r randyThetest, easy bool) *NinOptStruct { + this := &NinOptStruct{} + if r.Intn(10) != 0 { + v79 := float64(r.Float64()) + if r.Intn(2) == 0 { + v79 *= -1 + } + this.Field1 = &v79 + } + if r.Intn(10) != 0 { + v80 := float32(r.Float32()) + if r.Intn(2) == 0 { + v80 *= -1 + } + this.Field2 = &v80 + } + if r.Intn(10) != 0 { + this.Field3 = NewPopulatedNidOptNative(r, easy) + } + if r.Intn(10) != 0 { + this.Field4 = NewPopulatedNinOptNative(r, easy) + } + if r.Intn(10) != 0 { + v81 := uint64(uint64(r.Uint32())) + this.Field6 = &v81 + } + if r.Intn(10) != 0 { + v82 := int32(r.Int31()) + if r.Intn(2) == 0 { + v82 *= -1 + } + this.Field7 = &v82 + } + if r.Intn(10) != 0 { + this.Field8 = NewPopulatedNidOptNative(r, easy) + } + if r.Intn(10) != 0 { + v83 := bool(bool(r.Intn(2) == 0)) + this.Field13 = &v83 + } + if r.Intn(10) != 0 { + v84 := randStringThetest(r) + this.Field14 = &v84 + } + if r.Intn(10) != 0 { + v85 := r.Intn(100) + this.Field15 = make([]byte, v85) + for i := 0; i < v85; i++ { + this.Field15[i] = byte(r.Intn(256)) + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 16) + } + return this +} + +func NewPopulatedNidRepStruct(r randyThetest, easy bool) *NidRepStruct { + this := &NidRepStruct{} + if r.Intn(10) != 0 { + v86 := r.Intn(10) + this.Field1 = make([]float64, v86) + for i := 0; i < v86; i++ { + this.Field1[i] = float64(r.Float64()) + if r.Intn(2) == 0 { + this.Field1[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v87 := r.Intn(10) + this.Field2 = make([]float32, v87) + for i := 0; i < v87; i++ { + this.Field2[i] = float32(r.Float32()) + if r.Intn(2) == 0 { + this.Field2[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v88 := r.Intn(5) + this.Field3 = make([]NidOptNative, v88) + for i := 0; i < v88; i++ { + v89 := NewPopulatedNidOptNative(r, easy) + this.Field3[i] = *v89 + } + } + if r.Intn(10) != 0 { + v90 := r.Intn(5) + this.Field4 = make([]NinOptNative, v90) + for i := 0; i < v90; i++ { + v91 := NewPopulatedNinOptNative(r, easy) + this.Field4[i] = *v91 + } + } + if r.Intn(10) != 0 { + v92 := r.Intn(10) + this.Field6 = make([]uint64, v92) + for i := 0; i < v92; i++ { + this.Field6[i] = uint64(uint64(r.Uint32())) + } + } + if r.Intn(10) != 0 { + v93 := r.Intn(10) + this.Field7 = make([]int32, v93) + for i := 0; i < v93; i++ { + this.Field7[i] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Field7[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v94 := r.Intn(5) + this.Field8 = make([]NidOptNative, v94) + for i := 0; i < v94; i++ { + v95 := NewPopulatedNidOptNative(r, easy) + this.Field8[i] = *v95 + } + } + if r.Intn(10) != 0 { + v96 := r.Intn(10) + this.Field13 = make([]bool, v96) + for i := 0; i < v96; i++ { + this.Field13[i] = bool(bool(r.Intn(2) == 0)) + } + } + if r.Intn(10) != 0 { + v97 := r.Intn(10) + this.Field14 = make([]string, v97) + for i := 0; i < v97; i++ { + this.Field14[i] = randStringThetest(r) + } + } + if r.Intn(10) != 0 { + v98 := r.Intn(10) + this.Field15 = make([][]byte, v98) + for i := 0; i < v98; i++ { + v99 := r.Intn(100) + this.Field15[i] = make([]byte, v99) + for j := 0; j < v99; j++ { + this.Field15[i][j] = byte(r.Intn(256)) + } + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 16) + } + return this +} + +func NewPopulatedNinRepStruct(r randyThetest, easy bool) *NinRepStruct { + this := &NinRepStruct{} + if r.Intn(10) != 0 { + v100 := r.Intn(10) + this.Field1 = make([]float64, v100) + for i := 0; i < v100; i++ { + this.Field1[i] = float64(r.Float64()) + if r.Intn(2) == 0 { + this.Field1[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v101 := r.Intn(10) + this.Field2 = make([]float32, v101) + for i := 0; i < v101; i++ { + this.Field2[i] = float32(r.Float32()) + if r.Intn(2) == 0 { + this.Field2[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v102 := r.Intn(5) + this.Field3 = make([]*NidOptNative, v102) + for i := 0; i < v102; i++ { + this.Field3[i] = NewPopulatedNidOptNative(r, easy) + } + } + if r.Intn(10) != 0 { + v103 := r.Intn(5) + this.Field4 = make([]*NinOptNative, v103) + for i := 0; i < v103; i++ { + this.Field4[i] = NewPopulatedNinOptNative(r, easy) + } + } + if r.Intn(10) != 0 { + v104 := r.Intn(10) + this.Field6 = make([]uint64, v104) + for i := 0; i < v104; i++ { + this.Field6[i] = uint64(uint64(r.Uint32())) + } + } + if r.Intn(10) != 0 { + v105 := r.Intn(10) + this.Field7 = make([]int32, v105) + for i := 0; i < v105; i++ { + this.Field7[i] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Field7[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v106 := r.Intn(5) + this.Field8 = make([]*NidOptNative, v106) + for i := 0; i < v106; i++ { + this.Field8[i] = NewPopulatedNidOptNative(r, easy) + } + } + if r.Intn(10) != 0 { + v107 := r.Intn(10) + this.Field13 = make([]bool, v107) + for i := 0; i < v107; i++ { + this.Field13[i] = bool(bool(r.Intn(2) == 0)) + } + } + if r.Intn(10) != 0 { + v108 := r.Intn(10) + this.Field14 = make([]string, v108) + for i := 0; i < v108; i++ { + this.Field14[i] = randStringThetest(r) + } + } + if r.Intn(10) != 0 { + v109 := r.Intn(10) + this.Field15 = make([][]byte, v109) + for i := 0; i < v109; i++ { + v110 := r.Intn(100) + this.Field15[i] = make([]byte, v110) + for j := 0; j < v110; j++ { + this.Field15[i][j] = byte(r.Intn(256)) + } + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 16) + } + return this +} + +func NewPopulatedNidEmbeddedStruct(r randyThetest, easy bool) *NidEmbeddedStruct { + this := &NidEmbeddedStruct{} + if r.Intn(10) != 0 { + this.NidOptNative = NewPopulatedNidOptNative(r, easy) + } + v111 := NewPopulatedNidOptNative(r, easy) + this.Field200 = *v111 + this.Field210 = bool(bool(r.Intn(2) == 0)) + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 211) + } + return this +} + +func NewPopulatedNinEmbeddedStruct(r randyThetest, easy bool) *NinEmbeddedStruct { + this := &NinEmbeddedStruct{} + if r.Intn(10) != 0 { + this.NidOptNative = NewPopulatedNidOptNative(r, easy) + } + if r.Intn(10) != 0 { + this.Field200 = NewPopulatedNidOptNative(r, easy) + } + if r.Intn(10) != 0 { + v112 := bool(bool(r.Intn(2) == 0)) + this.Field210 = &v112 + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 211) + } + return this +} + +func NewPopulatedNidNestedStruct(r randyThetest, easy bool) *NidNestedStruct { + this := &NidNestedStruct{} + v113 := NewPopulatedNidOptStruct(r, easy) + this.Field1 = *v113 + if r.Intn(10) != 0 { + v114 := r.Intn(5) + this.Field2 = make([]NidRepStruct, v114) + for i := 0; i < v114; i++ { + v115 := NewPopulatedNidRepStruct(r, easy) + this.Field2[i] = *v115 + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 3) + } + return this +} + +func NewPopulatedNinNestedStruct(r randyThetest, easy bool) *NinNestedStruct { + this := &NinNestedStruct{} + if r.Intn(10) != 0 { + this.Field1 = NewPopulatedNinOptStruct(r, easy) + } + if r.Intn(10) != 0 { + v116 := r.Intn(5) + this.Field2 = make([]*NinRepStruct, v116) + for i := 0; i < v116; i++ { + this.Field2[i] = NewPopulatedNinRepStruct(r, easy) + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 3) + } + return this +} + +func NewPopulatedNidOptCustom(r randyThetest, easy bool) *NidOptCustom { + this := &NidOptCustom{} + v117 := NewPopulatedUuid(r) + this.Id = *v117 + v118 := github_com_gogo_protobuf_test_custom.NewPopulatedUint128(r) + this.Value = *v118 + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 3) + } + return this +} + +func NewPopulatedCustomDash(r randyThetest, easy bool) *CustomDash { + this := &CustomDash{} + if r.Intn(10) != 0 { + this.Value = github_com_gogo_protobuf_test_custom_dash_type.NewPopulatedBytes(r) + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 2) + } + return this +} + +func NewPopulatedNinOptCustom(r randyThetest, easy bool) *NinOptCustom { + this := &NinOptCustom{} + if r.Intn(10) != 0 { + this.Id = NewPopulatedUuid(r) + } + if r.Intn(10) != 0 { + this.Value = github_com_gogo_protobuf_test_custom.NewPopulatedUint128(r) + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 3) + } + return this +} + +func NewPopulatedNidRepCustom(r randyThetest, easy bool) *NidRepCustom { + this := &NidRepCustom{} + if r.Intn(10) != 0 { + v119 := r.Intn(10) + this.Id = make([]Uuid, v119) + for i := 0; i < v119; i++ { + v120 := NewPopulatedUuid(r) + this.Id[i] = *v120 + } + } + if r.Intn(10) != 0 { + v121 := r.Intn(10) + this.Value = make([]github_com_gogo_protobuf_test_custom.Uint128, v121) + for i := 0; i < v121; i++ { + v122 := github_com_gogo_protobuf_test_custom.NewPopulatedUint128(r) + this.Value[i] = *v122 + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 3) + } + return this +} + +func NewPopulatedNinRepCustom(r randyThetest, easy bool) *NinRepCustom { + this := &NinRepCustom{} + if r.Intn(10) != 0 { + v123 := r.Intn(10) + this.Id = make([]Uuid, v123) + for i := 0; i < v123; i++ { + v124 := NewPopulatedUuid(r) + this.Id[i] = *v124 + } + } + if r.Intn(10) != 0 { + v125 := r.Intn(10) + this.Value = make([]github_com_gogo_protobuf_test_custom.Uint128, v125) + for i := 0; i < v125; i++ { + v126 := github_com_gogo_protobuf_test_custom.NewPopulatedUint128(r) + this.Value[i] = *v126 + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 3) + } + return this +} + +func NewPopulatedNinOptNativeUnion(r randyThetest, easy bool) *NinOptNativeUnion { + this := &NinOptNativeUnion{} + fieldNum := r.Intn(9) + switch fieldNum { + case 0: + v127 := float64(r.Float64()) + if r.Intn(2) == 0 { + v127 *= -1 + } + this.Field1 = &v127 + case 1: + v128 := float32(r.Float32()) + if r.Intn(2) == 0 { + v128 *= -1 + } + this.Field2 = &v128 + case 2: + v129 := int32(r.Int31()) + if r.Intn(2) == 0 { + v129 *= -1 + } + this.Field3 = &v129 + case 3: + v130 := int64(r.Int63()) + if r.Intn(2) == 0 { + v130 *= -1 + } + this.Field4 = &v130 + case 4: + v131 := uint32(r.Uint32()) + this.Field5 = &v131 + case 5: + v132 := uint64(uint64(r.Uint32())) + this.Field6 = &v132 + case 6: + v133 := bool(bool(r.Intn(2) == 0)) + this.Field13 = &v133 + case 7: + v134 := randStringThetest(r) + this.Field14 = &v134 + case 8: + v135 := r.Intn(100) + this.Field15 = make([]byte, v135) + for i := 0; i < v135; i++ { + this.Field15[i] = byte(r.Intn(256)) + } + } + return this +} + +func NewPopulatedNinOptStructUnion(r randyThetest, easy bool) *NinOptStructUnion { + this := &NinOptStructUnion{} + fieldNum := r.Intn(9) + switch fieldNum { + case 0: + v136 := float64(r.Float64()) + if r.Intn(2) == 0 { + v136 *= -1 + } + this.Field1 = &v136 + case 1: + v137 := float32(r.Float32()) + if r.Intn(2) == 0 { + v137 *= -1 + } + this.Field2 = &v137 + case 2: + this.Field3 = NewPopulatedNidOptNative(r, easy) + case 3: + this.Field4 = NewPopulatedNinOptNative(r, easy) + case 4: + v138 := uint64(uint64(r.Uint32())) + this.Field6 = &v138 + case 5: + v139 := int32(r.Int31()) + if r.Intn(2) == 0 { + v139 *= -1 + } + this.Field7 = &v139 + case 6: + v140 := bool(bool(r.Intn(2) == 0)) + this.Field13 = &v140 + case 7: + v141 := randStringThetest(r) + this.Field14 = &v141 + case 8: + v142 := r.Intn(100) + this.Field15 = make([]byte, v142) + for i := 0; i < v142; i++ { + this.Field15[i] = byte(r.Intn(256)) + } + } + return this +} + +func NewPopulatedNinEmbeddedStructUnion(r randyThetest, easy bool) *NinEmbeddedStructUnion { + this := &NinEmbeddedStructUnion{} + fieldNum := r.Intn(3) + switch fieldNum { + case 0: + this.NidOptNative = NewPopulatedNidOptNative(r, easy) + case 1: + this.Field200 = NewPopulatedNinOptNative(r, easy) + case 2: + v143 := bool(bool(r.Intn(2) == 0)) + this.Field210 = &v143 + } + return this +} + +func NewPopulatedNinNestedStructUnion(r randyThetest, easy bool) *NinNestedStructUnion { + this := &NinNestedStructUnion{} + fieldNum := r.Intn(3) + switch fieldNum { + case 0: + this.Field1 = NewPopulatedNinOptNativeUnion(r, easy) + case 1: + this.Field2 = NewPopulatedNinOptStructUnion(r, easy) + case 2: + this.Field3 = NewPopulatedNinEmbeddedStructUnion(r, easy) + } + return this +} + +func NewPopulatedTree(r randyThetest, easy bool) *Tree { + this := &Tree{} + fieldNum := r.Intn(102) + switch fieldNum { + case 0: + this.Or = NewPopulatedOrBranch(r, easy) + case 1: + this.And = NewPopulatedAndBranch(r, easy) + case 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101: + this.Leaf = NewPopulatedLeaf(r, easy) + } + return this +} + +func NewPopulatedOrBranch(r randyThetest, easy bool) *OrBranch { + this := &OrBranch{} + v144 := NewPopulatedTree(r, easy) + this.Left = *v144 + v145 := NewPopulatedTree(r, easy) + this.Right = *v145 + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 3) + } + return this +} + +func NewPopulatedAndBranch(r randyThetest, easy bool) *AndBranch { + this := &AndBranch{} + v146 := NewPopulatedTree(r, easy) + this.Left = *v146 + v147 := NewPopulatedTree(r, easy) + this.Right = *v147 + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 3) + } + return this +} + +func NewPopulatedLeaf(r randyThetest, easy bool) *Leaf { + this := &Leaf{} + this.Value = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Value *= -1 + } + this.StrValue = randStringThetest(r) + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 3) + } + return this +} + +func NewPopulatedDeepTree(r randyThetest, easy bool) *DeepTree { + this := &DeepTree{} + fieldNum := r.Intn(102) + switch fieldNum { + case 0: + this.Down = NewPopulatedADeepBranch(r, easy) + case 1: + this.And = NewPopulatedAndDeepBranch(r, easy) + case 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101: + this.Leaf = NewPopulatedDeepLeaf(r, easy) + } + return this +} + +func NewPopulatedADeepBranch(r randyThetest, easy bool) *ADeepBranch { + this := &ADeepBranch{} + v148 := NewPopulatedDeepTree(r, easy) + this.Down = *v148 + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 3) + } + return this +} + +func NewPopulatedAndDeepBranch(r randyThetest, easy bool) *AndDeepBranch { + this := &AndDeepBranch{} + v149 := NewPopulatedDeepTree(r, easy) + this.Left = *v149 + v150 := NewPopulatedDeepTree(r, easy) + this.Right = *v150 + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 3) + } + return this +} + +func NewPopulatedDeepLeaf(r randyThetest, easy bool) *DeepLeaf { + this := &DeepLeaf{} + v151 := NewPopulatedTree(r, easy) + this.Tree = *v151 + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 2) + } + return this +} + +func NewPopulatedNil(r randyThetest, easy bool) *Nil { + this := &Nil{} + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 1) + } + return this +} + +func NewPopulatedNidOptEnum(r randyThetest, easy bool) *NidOptEnum { + this := &NidOptEnum{} + this.Field1 = TheTestEnum([]int32{0, 1, 2}[r.Intn(3)]) + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 2) + } + return this +} + +func NewPopulatedNinOptEnum(r randyThetest, easy bool) *NinOptEnum { + this := &NinOptEnum{} + if r.Intn(10) != 0 { + v152 := TheTestEnum([]int32{0, 1, 2}[r.Intn(3)]) + this.Field1 = &v152 + } + if r.Intn(10) != 0 { + v153 := YetAnotherTestEnum([]int32{0, 1}[r.Intn(2)]) + this.Field2 = &v153 + } + if r.Intn(10) != 0 { + v154 := YetYetAnotherTestEnum([]int32{0, 1}[r.Intn(2)]) + this.Field3 = &v154 + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 4) + } + return this +} + +func NewPopulatedNidRepEnum(r randyThetest, easy bool) *NidRepEnum { + this := &NidRepEnum{} + if r.Intn(10) != 0 { + v155 := r.Intn(10) + this.Field1 = make([]TheTestEnum, v155) + for i := 0; i < v155; i++ { + this.Field1[i] = TheTestEnum([]int32{0, 1, 2}[r.Intn(3)]) + } + } + if r.Intn(10) != 0 { + v156 := r.Intn(10) + this.Field2 = make([]YetAnotherTestEnum, v156) + for i := 0; i < v156; i++ { + this.Field2[i] = YetAnotherTestEnum([]int32{0, 1}[r.Intn(2)]) + } + } + if r.Intn(10) != 0 { + v157 := r.Intn(10) + this.Field3 = make([]YetYetAnotherTestEnum, v157) + for i := 0; i < v157; i++ { + this.Field3[i] = YetYetAnotherTestEnum([]int32{0, 1}[r.Intn(2)]) + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 4) + } + return this +} + +func NewPopulatedNinRepEnum(r randyThetest, easy bool) *NinRepEnum { + this := &NinRepEnum{} + if r.Intn(10) != 0 { + v158 := r.Intn(10) + this.Field1 = make([]TheTestEnum, v158) + for i := 0; i < v158; i++ { + this.Field1[i] = TheTestEnum([]int32{0, 1, 2}[r.Intn(3)]) + } + } + if r.Intn(10) != 0 { + v159 := r.Intn(10) + this.Field2 = make([]YetAnotherTestEnum, v159) + for i := 0; i < v159; i++ { + this.Field2[i] = YetAnotherTestEnum([]int32{0, 1}[r.Intn(2)]) + } + } + if r.Intn(10) != 0 { + v160 := r.Intn(10) + this.Field3 = make([]YetYetAnotherTestEnum, v160) + for i := 0; i < v160; i++ { + this.Field3[i] = YetYetAnotherTestEnum([]int32{0, 1}[r.Intn(2)]) + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 4) + } + return this +} + +func NewPopulatedNinOptEnumDefault(r randyThetest, easy bool) *NinOptEnumDefault { + this := &NinOptEnumDefault{} + if r.Intn(10) != 0 { + v161 := TheTestEnum([]int32{0, 1, 2}[r.Intn(3)]) + this.Field1 = &v161 + } + if r.Intn(10) != 0 { + v162 := YetAnotherTestEnum([]int32{0, 1}[r.Intn(2)]) + this.Field2 = &v162 + } + if r.Intn(10) != 0 { + v163 := YetYetAnotherTestEnum([]int32{0, 1}[r.Intn(2)]) + this.Field3 = &v163 + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 4) + } + return this +} + +func NewPopulatedAnotherNinOptEnum(r randyThetest, easy bool) *AnotherNinOptEnum { + this := &AnotherNinOptEnum{} + if r.Intn(10) != 0 { + v164 := AnotherTestEnum([]int32{10, 11}[r.Intn(2)]) + this.Field1 = &v164 + } + if r.Intn(10) != 0 { + v165 := YetAnotherTestEnum([]int32{0, 1}[r.Intn(2)]) + this.Field2 = &v165 + } + if r.Intn(10) != 0 { + v166 := YetYetAnotherTestEnum([]int32{0, 1}[r.Intn(2)]) + this.Field3 = &v166 + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 4) + } + return this +} + +func NewPopulatedAnotherNinOptEnumDefault(r randyThetest, easy bool) *AnotherNinOptEnumDefault { + this := &AnotherNinOptEnumDefault{} + if r.Intn(10) != 0 { + v167 := AnotherTestEnum([]int32{10, 11}[r.Intn(2)]) + this.Field1 = &v167 + } + if r.Intn(10) != 0 { + v168 := YetAnotherTestEnum([]int32{0, 1}[r.Intn(2)]) + this.Field2 = &v168 + } + if r.Intn(10) != 0 { + v169 := YetYetAnotherTestEnum([]int32{0, 1}[r.Intn(2)]) + this.Field3 = &v169 + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 4) + } + return this +} + +func NewPopulatedTimer(r randyThetest, easy bool) *Timer { + this := &Timer{} + this.Time1 = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Time1 *= -1 + } + this.Time2 = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Time2 *= -1 + } + v170 := r.Intn(100) + this.Data = make([]byte, v170) + for i := 0; i < v170; i++ { + this.Data[i] = byte(r.Intn(256)) + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 4) + } + return this +} + +func NewPopulatedMyExtendable(r randyThetest, easy bool) *MyExtendable { + this := &MyExtendable{} + if r.Intn(10) != 0 { + v171 := int64(r.Int63()) + if r.Intn(2) == 0 { + v171 *= -1 + } + this.Field1 = &v171 + } + if !easy && r.Intn(10) != 0 { + l := r.Intn(5) + for i := 0; i < l; i++ { + fieldNumber := r.Intn(100) + 100 + wire := r.Intn(4) + if wire == 3 { + wire = 5 + } + data := randFieldThetest(nil, r, fieldNumber, wire) + github_com_gogo_protobuf_proto.SetRawExtension(this, int32(fieldNumber), data) + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 201) + } + return this +} + +func NewPopulatedOtherExtenable(r randyThetest, easy bool) *OtherExtenable { + this := &OtherExtenable{} + if r.Intn(10) != 0 { + v172 := int64(r.Int63()) + if r.Intn(2) == 0 { + v172 *= -1 + } + this.Field2 = &v172 + } + if r.Intn(10) != 0 { + v173 := int64(r.Int63()) + if r.Intn(2) == 0 { + v173 *= -1 + } + this.Field13 = &v173 + } + if r.Intn(10) != 0 { + this.M = NewPopulatedMyExtendable(r, easy) + } + if !easy && r.Intn(10) != 0 { + l := r.Intn(5) + for i := 0; i < l; i++ { + eIndex := r.Intn(2) + fieldNumber := 0 + switch eIndex { + case 0: + fieldNumber = r.Intn(3) + 14 + case 1: + fieldNumber = r.Intn(3) + 10 + } + wire := r.Intn(4) + if wire == 3 { + wire = 5 + } + data := randFieldThetest(nil, r, fieldNumber, wire) + github_com_gogo_protobuf_proto.SetRawExtension(this, int32(fieldNumber), data) + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 18) + } + return this +} + +func NewPopulatedNestedDefinition(r randyThetest, easy bool) *NestedDefinition { + this := &NestedDefinition{} + if r.Intn(10) != 0 { + v174 := int64(r.Int63()) + if r.Intn(2) == 0 { + v174 *= -1 + } + this.Field1 = &v174 + } + if r.Intn(10) != 0 { + v175 := NestedDefinition_NestedEnum([]int32{1}[r.Intn(1)]) + this.EnumField = &v175 + } + if r.Intn(10) != 0 { + this.NNM = NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(r, easy) + } + if r.Intn(10) != 0 { + this.NM = NewPopulatedNestedDefinition_NestedMessage(r, easy) + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 5) + } + return this +} + +func NewPopulatedNestedDefinition_NestedMessage(r randyThetest, easy bool) *NestedDefinition_NestedMessage { + this := &NestedDefinition_NestedMessage{} + if r.Intn(10) != 0 { + v176 := uint64(uint64(r.Uint32())) + this.NestedField1 = &v176 + } + if r.Intn(10) != 0 { + this.NNM = NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(r, easy) + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 3) + } + return this +} + +func NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(r randyThetest, easy bool) *NestedDefinition_NestedMessage_NestedNestedMsg { + this := &NestedDefinition_NestedMessage_NestedNestedMsg{} + if r.Intn(10) != 0 { + v177 := randStringThetest(r) + this.NestedNestedField1 = &v177 + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 11) + } + return this +} + +func NewPopulatedNestedScope(r randyThetest, easy bool) *NestedScope { + this := &NestedScope{} + if r.Intn(10) != 0 { + this.A = NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(r, easy) + } + if r.Intn(10) != 0 { + v178 := NestedDefinition_NestedEnum([]int32{1}[r.Intn(1)]) + this.B = &v178 + } + if r.Intn(10) != 0 { + this.C = NewPopulatedNestedDefinition_NestedMessage(r, easy) + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 4) + } + return this +} + +func NewPopulatedNinOptNativeDefault(r randyThetest, easy bool) *NinOptNativeDefault { + this := &NinOptNativeDefault{} + if r.Intn(10) != 0 { + v179 := float64(r.Float64()) + if r.Intn(2) == 0 { + v179 *= -1 + } + this.Field1 = &v179 + } + if r.Intn(10) != 0 { + v180 := float32(r.Float32()) + if r.Intn(2) == 0 { + v180 *= -1 + } + this.Field2 = &v180 + } + if r.Intn(10) != 0 { + v181 := int32(r.Int31()) + if r.Intn(2) == 0 { + v181 *= -1 + } + this.Field3 = &v181 + } + if r.Intn(10) != 0 { + v182 := int64(r.Int63()) + if r.Intn(2) == 0 { + v182 *= -1 + } + this.Field4 = &v182 + } + if r.Intn(10) != 0 { + v183 := uint32(r.Uint32()) + this.Field5 = &v183 + } + if r.Intn(10) != 0 { + v184 := uint64(uint64(r.Uint32())) + this.Field6 = &v184 + } + if r.Intn(10) != 0 { + v185 := int32(r.Int31()) + if r.Intn(2) == 0 { + v185 *= -1 + } + this.Field7 = &v185 + } + if r.Intn(10) != 0 { + v186 := int64(r.Int63()) + if r.Intn(2) == 0 { + v186 *= -1 + } + this.Field8 = &v186 + } + if r.Intn(10) != 0 { + v187 := uint32(r.Uint32()) + this.Field9 = &v187 + } + if r.Intn(10) != 0 { + v188 := int32(r.Int31()) + if r.Intn(2) == 0 { + v188 *= -1 + } + this.Field10 = &v188 + } + if r.Intn(10) != 0 { + v189 := uint64(uint64(r.Uint32())) + this.Field11 = &v189 + } + if r.Intn(10) != 0 { + v190 := int64(r.Int63()) + if r.Intn(2) == 0 { + v190 *= -1 + } + this.Field12 = &v190 + } + if r.Intn(10) != 0 { + v191 := bool(bool(r.Intn(2) == 0)) + this.Field13 = &v191 + } + if r.Intn(10) != 0 { + v192 := randStringThetest(r) + this.Field14 = &v192 + } + if r.Intn(10) != 0 { + v193 := r.Intn(100) + this.Field15 = make([]byte, v193) + for i := 0; i < v193; i++ { + this.Field15[i] = byte(r.Intn(256)) + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 16) + } + return this +} + +func NewPopulatedCustomContainer(r randyThetest, easy bool) *CustomContainer { + this := &CustomContainer{} + v194 := NewPopulatedNidOptCustom(r, easy) + this.CustomStruct = *v194 + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 2) + } + return this +} + +func NewPopulatedCustomNameNidOptNative(r randyThetest, easy bool) *CustomNameNidOptNative { + this := &CustomNameNidOptNative{} + this.FieldA = float64(r.Float64()) + if r.Intn(2) == 0 { + this.FieldA *= -1 + } + this.FieldB = float32(r.Float32()) + if r.Intn(2) == 0 { + this.FieldB *= -1 + } + this.FieldC = int32(r.Int31()) + if r.Intn(2) == 0 { + this.FieldC *= -1 + } + this.FieldD = int64(r.Int63()) + if r.Intn(2) == 0 { + this.FieldD *= -1 + } + this.FieldE = uint32(r.Uint32()) + this.FieldF = uint64(uint64(r.Uint32())) + this.FieldG = int32(r.Int31()) + if r.Intn(2) == 0 { + this.FieldG *= -1 + } + this.FieldH = int64(r.Int63()) + if r.Intn(2) == 0 { + this.FieldH *= -1 + } + this.FieldI = uint32(r.Uint32()) + this.FieldJ = int32(r.Int31()) + if r.Intn(2) == 0 { + this.FieldJ *= -1 + } + this.FieldK = uint64(uint64(r.Uint32())) + this.FieldL = int64(r.Int63()) + if r.Intn(2) == 0 { + this.FieldL *= -1 + } + this.FieldM = bool(bool(r.Intn(2) == 0)) + this.FieldN = randStringThetest(r) + v195 := r.Intn(100) + this.FieldO = make([]byte, v195) + for i := 0; i < v195; i++ { + this.FieldO[i] = byte(r.Intn(256)) + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 16) + } + return this +} + +func NewPopulatedCustomNameNinOptNative(r randyThetest, easy bool) *CustomNameNinOptNative { + this := &CustomNameNinOptNative{} + if r.Intn(10) != 0 { + v196 := float64(r.Float64()) + if r.Intn(2) == 0 { + v196 *= -1 + } + this.FieldA = &v196 + } + if r.Intn(10) != 0 { + v197 := float32(r.Float32()) + if r.Intn(2) == 0 { + v197 *= -1 + } + this.FieldB = &v197 + } + if r.Intn(10) != 0 { + v198 := int32(r.Int31()) + if r.Intn(2) == 0 { + v198 *= -1 + } + this.FieldC = &v198 + } + if r.Intn(10) != 0 { + v199 := int64(r.Int63()) + if r.Intn(2) == 0 { + v199 *= -1 + } + this.FieldD = &v199 + } + if r.Intn(10) != 0 { + v200 := uint32(r.Uint32()) + this.FieldE = &v200 + } + if r.Intn(10) != 0 { + v201 := uint64(uint64(r.Uint32())) + this.FieldF = &v201 + } + if r.Intn(10) != 0 { + v202 := int32(r.Int31()) + if r.Intn(2) == 0 { + v202 *= -1 + } + this.FieldG = &v202 + } + if r.Intn(10) != 0 { + v203 := int64(r.Int63()) + if r.Intn(2) == 0 { + v203 *= -1 + } + this.FieldH = &v203 + } + if r.Intn(10) != 0 { + v204 := uint32(r.Uint32()) + this.FieldI = &v204 + } + if r.Intn(10) != 0 { + v205 := int32(r.Int31()) + if r.Intn(2) == 0 { + v205 *= -1 + } + this.FieldJ = &v205 + } + if r.Intn(10) != 0 { + v206 := uint64(uint64(r.Uint32())) + this.FieldK = &v206 + } + if r.Intn(10) != 0 { + v207 := int64(r.Int63()) + if r.Intn(2) == 0 { + v207 *= -1 + } + this.FielL = &v207 + } + if r.Intn(10) != 0 { + v208 := bool(bool(r.Intn(2) == 0)) + this.FieldM = &v208 + } + if r.Intn(10) != 0 { + v209 := randStringThetest(r) + this.FieldN = &v209 + } + if r.Intn(10) != 0 { + v210 := r.Intn(100) + this.FieldO = make([]byte, v210) + for i := 0; i < v210; i++ { + this.FieldO[i] = byte(r.Intn(256)) + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 16) + } + return this +} + +func NewPopulatedCustomNameNinRepNative(r randyThetest, easy bool) *CustomNameNinRepNative { + this := &CustomNameNinRepNative{} + if r.Intn(10) != 0 { + v211 := r.Intn(10) + this.FieldA = make([]float64, v211) + for i := 0; i < v211; i++ { + this.FieldA[i] = float64(r.Float64()) + if r.Intn(2) == 0 { + this.FieldA[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v212 := r.Intn(10) + this.FieldB = make([]float32, v212) + for i := 0; i < v212; i++ { + this.FieldB[i] = float32(r.Float32()) + if r.Intn(2) == 0 { + this.FieldB[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v213 := r.Intn(10) + this.FieldC = make([]int32, v213) + for i := 0; i < v213; i++ { + this.FieldC[i] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.FieldC[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v214 := r.Intn(10) + this.FieldD = make([]int64, v214) + for i := 0; i < v214; i++ { + this.FieldD[i] = int64(r.Int63()) + if r.Intn(2) == 0 { + this.FieldD[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v215 := r.Intn(10) + this.FieldE = make([]uint32, v215) + for i := 0; i < v215; i++ { + this.FieldE[i] = uint32(r.Uint32()) + } + } + if r.Intn(10) != 0 { + v216 := r.Intn(10) + this.FieldF = make([]uint64, v216) + for i := 0; i < v216; i++ { + this.FieldF[i] = uint64(uint64(r.Uint32())) + } + } + if r.Intn(10) != 0 { + v217 := r.Intn(10) + this.FieldG = make([]int32, v217) + for i := 0; i < v217; i++ { + this.FieldG[i] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.FieldG[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v218 := r.Intn(10) + this.FieldH = make([]int64, v218) + for i := 0; i < v218; i++ { + this.FieldH[i] = int64(r.Int63()) + if r.Intn(2) == 0 { + this.FieldH[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v219 := r.Intn(10) + this.FieldI = make([]uint32, v219) + for i := 0; i < v219; i++ { + this.FieldI[i] = uint32(r.Uint32()) + } + } + if r.Intn(10) != 0 { + v220 := r.Intn(10) + this.FieldJ = make([]int32, v220) + for i := 0; i < v220; i++ { + this.FieldJ[i] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.FieldJ[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v221 := r.Intn(10) + this.FieldK = make([]uint64, v221) + for i := 0; i < v221; i++ { + this.FieldK[i] = uint64(uint64(r.Uint32())) + } + } + if r.Intn(10) != 0 { + v222 := r.Intn(10) + this.FieldL = make([]int64, v222) + for i := 0; i < v222; i++ { + this.FieldL[i] = int64(r.Int63()) + if r.Intn(2) == 0 { + this.FieldL[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v223 := r.Intn(10) + this.FieldM = make([]bool, v223) + for i := 0; i < v223; i++ { + this.FieldM[i] = bool(bool(r.Intn(2) == 0)) + } + } + if r.Intn(10) != 0 { + v224 := r.Intn(10) + this.FieldN = make([]string, v224) + for i := 0; i < v224; i++ { + this.FieldN[i] = randStringThetest(r) + } + } + if r.Intn(10) != 0 { + v225 := r.Intn(10) + this.FieldO = make([][]byte, v225) + for i := 0; i < v225; i++ { + v226 := r.Intn(100) + this.FieldO[i] = make([]byte, v226) + for j := 0; j < v226; j++ { + this.FieldO[i][j] = byte(r.Intn(256)) + } + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 16) + } + return this +} + +func NewPopulatedCustomNameNinStruct(r randyThetest, easy bool) *CustomNameNinStruct { + this := &CustomNameNinStruct{} + if r.Intn(10) != 0 { + v227 := float64(r.Float64()) + if r.Intn(2) == 0 { + v227 *= -1 + } + this.FieldA = &v227 + } + if r.Intn(10) != 0 { + v228 := float32(r.Float32()) + if r.Intn(2) == 0 { + v228 *= -1 + } + this.FieldB = &v228 + } + if r.Intn(10) != 0 { + this.FieldC = NewPopulatedNidOptNative(r, easy) + } + if r.Intn(10) != 0 { + v229 := r.Intn(5) + this.FieldD = make([]*NinOptNative, v229) + for i := 0; i < v229; i++ { + this.FieldD[i] = NewPopulatedNinOptNative(r, easy) + } + } + if r.Intn(10) != 0 { + v230 := uint64(uint64(r.Uint32())) + this.FieldE = &v230 + } + if r.Intn(10) != 0 { + v231 := int32(r.Int31()) + if r.Intn(2) == 0 { + v231 *= -1 + } + this.FieldF = &v231 + } + if r.Intn(10) != 0 { + this.FieldG = NewPopulatedNidOptNative(r, easy) + } + if r.Intn(10) != 0 { + v232 := bool(bool(r.Intn(2) == 0)) + this.FieldH = &v232 + } + if r.Intn(10) != 0 { + v233 := randStringThetest(r) + this.FieldI = &v233 + } + if r.Intn(10) != 0 { + v234 := r.Intn(100) + this.FieldJ = make([]byte, v234) + for i := 0; i < v234; i++ { + this.FieldJ[i] = byte(r.Intn(256)) + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 16) + } + return this +} + +func NewPopulatedCustomNameCustomType(r randyThetest, easy bool) *CustomNameCustomType { + this := &CustomNameCustomType{} + if r.Intn(10) != 0 { + this.FieldA = NewPopulatedUuid(r) + } + if r.Intn(10) != 0 { + this.FieldB = github_com_gogo_protobuf_test_custom.NewPopulatedUint128(r) + } + if r.Intn(10) != 0 { + v235 := r.Intn(10) + this.FieldC = make([]Uuid, v235) + for i := 0; i < v235; i++ { + v236 := NewPopulatedUuid(r) + this.FieldC[i] = *v236 + } + } + if r.Intn(10) != 0 { + v237 := r.Intn(10) + this.FieldD = make([]github_com_gogo_protobuf_test_custom.Uint128, v237) + for i := 0; i < v237; i++ { + v238 := github_com_gogo_protobuf_test_custom.NewPopulatedUint128(r) + this.FieldD[i] = *v238 + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 5) + } + return this +} + +func NewPopulatedCustomNameNinEmbeddedStructUnion(r randyThetest, easy bool) *CustomNameNinEmbeddedStructUnion { + this := &CustomNameNinEmbeddedStructUnion{} + fieldNum := r.Intn(3) + switch fieldNum { + case 0: + this.NidOptNative = NewPopulatedNidOptNative(r, easy) + case 1: + this.FieldA = NewPopulatedNinOptNative(r, easy) + case 2: + v239 := bool(bool(r.Intn(2) == 0)) + this.FieldB = &v239 + } + return this +} + +func NewPopulatedCustomNameEnum(r randyThetest, easy bool) *CustomNameEnum { + this := &CustomNameEnum{} + if r.Intn(10) != 0 { + v240 := TheTestEnum([]int32{0, 1, 2}[r.Intn(3)]) + this.FieldA = &v240 + } + if r.Intn(10) != 0 { + v241 := r.Intn(10) + this.FieldB = make([]TheTestEnum, v241) + for i := 0; i < v241; i++ { + this.FieldB[i] = TheTestEnum([]int32{0, 1, 2}[r.Intn(3)]) + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 3) + } + return this +} + +func NewPopulatedNoExtensionsMap(r randyThetest, easy bool) *NoExtensionsMap { + this := &NoExtensionsMap{} + if r.Intn(10) != 0 { + v242 := int64(r.Int63()) + if r.Intn(2) == 0 { + v242 *= -1 + } + this.Field1 = &v242 + } + if !easy && r.Intn(10) != 0 { + l := r.Intn(5) + for i := 0; i < l; i++ { + fieldNumber := r.Intn(100) + 100 + wire := r.Intn(4) + if wire == 3 { + wire = 5 + } + data := randFieldThetest(nil, r, fieldNumber, wire) + github_com_gogo_protobuf_proto.SetRawExtension(this, int32(fieldNumber), data) + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 201) + } + return this +} + +func NewPopulatedUnrecognized(r randyThetest, easy bool) *Unrecognized { + this := &Unrecognized{} + if r.Intn(10) != 0 { + v243 := randStringThetest(r) + this.Field1 = &v243 + } + if !easy && r.Intn(10) != 0 { + } + return this +} + +func NewPopulatedUnrecognizedWithInner(r randyThetest, easy bool) *UnrecognizedWithInner { + this := &UnrecognizedWithInner{} + if r.Intn(10) != 0 { + v244 := r.Intn(5) + this.Embedded = make([]*UnrecognizedWithInner_Inner, v244) + for i := 0; i < v244; i++ { + this.Embedded[i] = NewPopulatedUnrecognizedWithInner_Inner(r, easy) + } + } + if r.Intn(10) != 0 { + v245 := randStringThetest(r) + this.Field2 = &v245 + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 3) + } + return this +} + +func NewPopulatedUnrecognizedWithInner_Inner(r randyThetest, easy bool) *UnrecognizedWithInner_Inner { + this := &UnrecognizedWithInner_Inner{} + if r.Intn(10) != 0 { + v246 := uint32(r.Uint32()) + this.Field1 = &v246 + } + if !easy && r.Intn(10) != 0 { + } + return this +} + +func NewPopulatedUnrecognizedWithEmbed(r randyThetest, easy bool) *UnrecognizedWithEmbed { + this := &UnrecognizedWithEmbed{} + v247 := NewPopulatedUnrecognizedWithEmbed_Embedded(r, easy) + this.UnrecognizedWithEmbed_Embedded = *v247 + if r.Intn(10) != 0 { + v248 := randStringThetest(r) + this.Field2 = &v248 + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 3) + } + return this +} + +func NewPopulatedUnrecognizedWithEmbed_Embedded(r randyThetest, easy bool) *UnrecognizedWithEmbed_Embedded { + this := &UnrecognizedWithEmbed_Embedded{} + if r.Intn(10) != 0 { + v249 := uint32(r.Uint32()) + this.Field1 = &v249 + } + if !easy && r.Intn(10) != 0 { + } + return this +} + +func NewPopulatedNode(r randyThetest, easy bool) *Node { + this := &Node{} + if r.Intn(10) != 0 { + v250 := randStringThetest(r) + this.Label = &v250 + } + if r.Intn(10) == 0 { + v251 := r.Intn(5) + this.Children = make([]*Node, v251) + for i := 0; i < v251; i++ { + this.Children[i] = NewPopulatedNode(r, easy) + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 3) + } + return this +} + +type randyThetest interface { + Float32() float32 + Float64() float64 + Int63() int64 + Int31() int32 + Uint32() uint32 + Intn(n int) int +} + +func randUTF8RuneThetest(r randyThetest) 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 randStringThetest(r randyThetest) string { + v252 := r.Intn(100) + tmps := make([]rune, v252) + for i := 0; i < v252; i++ { + tmps[i] = randUTF8RuneThetest(r) + } + return string(tmps) +} +func randUnrecognizedThetest(r randyThetest, 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 = randFieldThetest(data, r, fieldNumber, wire) + } + return data +} +func randFieldThetest(data []byte, r randyThetest, fieldNumber int, wire int) []byte { + key := uint32(fieldNumber)<<3 | uint32(wire) + switch wire { + case 0: + data = encodeVarintPopulateThetest(data, uint64(key)) + v253 := r.Int63() + if r.Intn(2) == 0 { + v253 *= -1 + } + data = encodeVarintPopulateThetest(data, uint64(v253)) + case 1: + data = encodeVarintPopulateThetest(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 = encodeVarintPopulateThetest(data, uint64(key)) + ll := r.Intn(100) + data = encodeVarintPopulateThetest(data, uint64(ll)) + for j := 0; j < ll; j++ { + data = append(data, byte(r.Intn(256))) + } + default: + data = encodeVarintPopulateThetest(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 encodeVarintPopulateThetest(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 *NidOptNative) Size() (n int) { + var l int + _ = l + n += 9 + n += 5 + n += 1 + sovThetest(uint64(m.Field3)) + n += 1 + sovThetest(uint64(m.Field4)) + n += 1 + sovThetest(uint64(m.Field5)) + n += 1 + sovThetest(uint64(m.Field6)) + n += 1 + sozThetest(uint64(m.Field7)) + n += 1 + sozThetest(uint64(m.Field8)) + n += 5 + n += 5 + n += 9 + n += 9 + n += 2 + l = len(m.Field14) + n += 1 + l + sovThetest(uint64(l)) + if m.Field15 != nil { + l = len(m.Field15) + n += 1 + l + sovThetest(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NinOptNative) Size() (n int) { + var l int + _ = l + if m.Field1 != nil { + n += 9 + } + if m.Field2 != nil { + n += 5 + } + if m.Field3 != nil { + n += 1 + sovThetest(uint64(*m.Field3)) + } + if m.Field4 != nil { + n += 1 + sovThetest(uint64(*m.Field4)) + } + if m.Field5 != nil { + n += 1 + sovThetest(uint64(*m.Field5)) + } + if m.Field6 != nil { + n += 1 + sovThetest(uint64(*m.Field6)) + } + if m.Field7 != nil { + n += 1 + sozThetest(uint64(*m.Field7)) + } + if m.Field8 != nil { + n += 1 + sozThetest(uint64(*m.Field8)) + } + if m.Field9 != nil { + n += 5 + } + if m.Field10 != nil { + n += 5 + } + if m.Field11 != nil { + n += 9 + } + if m.Field12 != nil { + n += 9 + } + if m.Field13 != nil { + n += 2 + } + if m.Field14 != nil { + l = len(*m.Field14) + n += 1 + l + sovThetest(uint64(l)) + } + if m.Field15 != nil { + l = len(m.Field15) + n += 1 + l + sovThetest(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NidRepNative) Size() (n int) { + var l int + _ = l + if len(m.Field1) > 0 { + n += 9 * len(m.Field1) + } + if len(m.Field2) > 0 { + n += 5 * len(m.Field2) + } + if len(m.Field3) > 0 { + for _, e := range m.Field3 { + n += 1 + sovThetest(uint64(e)) + } + } + if len(m.Field4) > 0 { + for _, e := range m.Field4 { + n += 1 + sovThetest(uint64(e)) + } + } + if len(m.Field5) > 0 { + for _, e := range m.Field5 { + n += 1 + sovThetest(uint64(e)) + } + } + if len(m.Field6) > 0 { + for _, e := range m.Field6 { + n += 1 + sovThetest(uint64(e)) + } + } + if len(m.Field7) > 0 { + for _, e := range m.Field7 { + n += 1 + sozThetest(uint64(e)) + } + } + if len(m.Field8) > 0 { + for _, e := range m.Field8 { + n += 1 + sozThetest(uint64(e)) + } + } + if len(m.Field9) > 0 { + n += 5 * len(m.Field9) + } + if len(m.Field10) > 0 { + n += 5 * len(m.Field10) + } + if len(m.Field11) > 0 { + n += 9 * len(m.Field11) + } + if len(m.Field12) > 0 { + n += 9 * len(m.Field12) + } + if len(m.Field13) > 0 { + n += 2 * len(m.Field13) + } + if len(m.Field14) > 0 { + for _, s := range m.Field14 { + l = len(s) + n += 1 + l + sovThetest(uint64(l)) + } + } + if len(m.Field15) > 0 { + for _, b := range m.Field15 { + l = len(b) + n += 1 + l + sovThetest(uint64(l)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NinRepNative) Size() (n int) { + var l int + _ = l + if len(m.Field1) > 0 { + n += 9 * len(m.Field1) + } + if len(m.Field2) > 0 { + n += 5 * len(m.Field2) + } + if len(m.Field3) > 0 { + for _, e := range m.Field3 { + n += 1 + sovThetest(uint64(e)) + } + } + if len(m.Field4) > 0 { + for _, e := range m.Field4 { + n += 1 + sovThetest(uint64(e)) + } + } + if len(m.Field5) > 0 { + for _, e := range m.Field5 { + n += 1 + sovThetest(uint64(e)) + } + } + if len(m.Field6) > 0 { + for _, e := range m.Field6 { + n += 1 + sovThetest(uint64(e)) + } + } + if len(m.Field7) > 0 { + for _, e := range m.Field7 { + n += 1 + sozThetest(uint64(e)) + } + } + if len(m.Field8) > 0 { + for _, e := range m.Field8 { + n += 1 + sozThetest(uint64(e)) + } + } + if len(m.Field9) > 0 { + n += 5 * len(m.Field9) + } + if len(m.Field10) > 0 { + n += 5 * len(m.Field10) + } + if len(m.Field11) > 0 { + n += 9 * len(m.Field11) + } + if len(m.Field12) > 0 { + n += 9 * len(m.Field12) + } + if len(m.Field13) > 0 { + n += 2 * len(m.Field13) + } + if len(m.Field14) > 0 { + for _, s := range m.Field14 { + l = len(s) + n += 1 + l + sovThetest(uint64(l)) + } + } + if len(m.Field15) > 0 { + for _, b := range m.Field15 { + l = len(b) + n += 1 + l + sovThetest(uint64(l)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NidRepPackedNative) Size() (n int) { + var l int + _ = l + if len(m.Field1) > 0 { + n += 1 + sovThetest(uint64(len(m.Field1)*8)) + len(m.Field1)*8 + } + if len(m.Field2) > 0 { + n += 1 + sovThetest(uint64(len(m.Field2)*4)) + len(m.Field2)*4 + } + if len(m.Field3) > 0 { + l = 0 + for _, e := range m.Field3 { + l += sovThetest(uint64(e)) + } + n += 1 + sovThetest(uint64(l)) + l + } + if len(m.Field4) > 0 { + l = 0 + for _, e := range m.Field4 { + l += sovThetest(uint64(e)) + } + n += 1 + sovThetest(uint64(l)) + l + } + if len(m.Field5) > 0 { + l = 0 + for _, e := range m.Field5 { + l += sovThetest(uint64(e)) + } + n += 1 + sovThetest(uint64(l)) + l + } + if len(m.Field6) > 0 { + l = 0 + for _, e := range m.Field6 { + l += sovThetest(uint64(e)) + } + n += 1 + sovThetest(uint64(l)) + l + } + if len(m.Field7) > 0 { + l = 0 + for _, e := range m.Field7 { + l += sozThetest(uint64(e)) + } + n += 1 + sovThetest(uint64(l)) + l + } + if len(m.Field8) > 0 { + l = 0 + for _, e := range m.Field8 { + l += sozThetest(uint64(e)) + } + n += 1 + sovThetest(uint64(l)) + l + } + if len(m.Field9) > 0 { + n += 1 + sovThetest(uint64(len(m.Field9)*4)) + len(m.Field9)*4 + } + if len(m.Field10) > 0 { + n += 1 + sovThetest(uint64(len(m.Field10)*4)) + len(m.Field10)*4 + } + if len(m.Field11) > 0 { + n += 1 + sovThetest(uint64(len(m.Field11)*8)) + len(m.Field11)*8 + } + if len(m.Field12) > 0 { + n += 1 + sovThetest(uint64(len(m.Field12)*8)) + len(m.Field12)*8 + } + if len(m.Field13) > 0 { + n += 1 + sovThetest(uint64(len(m.Field13))) + len(m.Field13)*1 + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NinRepPackedNative) Size() (n int) { + var l int + _ = l + if len(m.Field1) > 0 { + n += 1 + sovThetest(uint64(len(m.Field1)*8)) + len(m.Field1)*8 + } + if len(m.Field2) > 0 { + n += 1 + sovThetest(uint64(len(m.Field2)*4)) + len(m.Field2)*4 + } + if len(m.Field3) > 0 { + l = 0 + for _, e := range m.Field3 { + l += sovThetest(uint64(e)) + } + n += 1 + sovThetest(uint64(l)) + l + } + if len(m.Field4) > 0 { + l = 0 + for _, e := range m.Field4 { + l += sovThetest(uint64(e)) + } + n += 1 + sovThetest(uint64(l)) + l + } + if len(m.Field5) > 0 { + l = 0 + for _, e := range m.Field5 { + l += sovThetest(uint64(e)) + } + n += 1 + sovThetest(uint64(l)) + l + } + if len(m.Field6) > 0 { + l = 0 + for _, e := range m.Field6 { + l += sovThetest(uint64(e)) + } + n += 1 + sovThetest(uint64(l)) + l + } + if len(m.Field7) > 0 { + l = 0 + for _, e := range m.Field7 { + l += sozThetest(uint64(e)) + } + n += 1 + sovThetest(uint64(l)) + l + } + if len(m.Field8) > 0 { + l = 0 + for _, e := range m.Field8 { + l += sozThetest(uint64(e)) + } + n += 1 + sovThetest(uint64(l)) + l + } + if len(m.Field9) > 0 { + n += 1 + sovThetest(uint64(len(m.Field9)*4)) + len(m.Field9)*4 + } + if len(m.Field10) > 0 { + n += 1 + sovThetest(uint64(len(m.Field10)*4)) + len(m.Field10)*4 + } + if len(m.Field11) > 0 { + n += 1 + sovThetest(uint64(len(m.Field11)*8)) + len(m.Field11)*8 + } + if len(m.Field12) > 0 { + n += 1 + sovThetest(uint64(len(m.Field12)*8)) + len(m.Field12)*8 + } + if len(m.Field13) > 0 { + n += 1 + sovThetest(uint64(len(m.Field13))) + len(m.Field13)*1 + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NidOptStruct) Size() (n int) { + var l int + _ = l + n += 9 + n += 5 + l = m.Field3.Size() + n += 1 + l + sovThetest(uint64(l)) + l = m.Field4.Size() + n += 1 + l + sovThetest(uint64(l)) + n += 1 + sovThetest(uint64(m.Field6)) + n += 1 + sozThetest(uint64(m.Field7)) + l = m.Field8.Size() + n += 1 + l + sovThetest(uint64(l)) + n += 2 + l = len(m.Field14) + n += 1 + l + sovThetest(uint64(l)) + if m.Field15 != nil { + l = len(m.Field15) + n += 1 + l + sovThetest(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NinOptStruct) Size() (n int) { + var l int + _ = l + if m.Field1 != nil { + n += 9 + } + if m.Field2 != nil { + n += 5 + } + if m.Field3 != nil { + l = m.Field3.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if m.Field4 != nil { + l = m.Field4.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if m.Field6 != nil { + n += 1 + sovThetest(uint64(*m.Field6)) + } + if m.Field7 != nil { + n += 1 + sozThetest(uint64(*m.Field7)) + } + if m.Field8 != nil { + l = m.Field8.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if m.Field13 != nil { + n += 2 + } + if m.Field14 != nil { + l = len(*m.Field14) + n += 1 + l + sovThetest(uint64(l)) + } + if m.Field15 != nil { + l = len(m.Field15) + n += 1 + l + sovThetest(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NidRepStruct) Size() (n int) { + var l int + _ = l + if len(m.Field1) > 0 { + n += 9 * len(m.Field1) + } + if len(m.Field2) > 0 { + n += 5 * len(m.Field2) + } + if len(m.Field3) > 0 { + for _, e := range m.Field3 { + l = e.Size() + n += 1 + l + sovThetest(uint64(l)) + } + } + if len(m.Field4) > 0 { + for _, e := range m.Field4 { + l = e.Size() + n += 1 + l + sovThetest(uint64(l)) + } + } + if len(m.Field6) > 0 { + for _, e := range m.Field6 { + n += 1 + sovThetest(uint64(e)) + } + } + if len(m.Field7) > 0 { + for _, e := range m.Field7 { + n += 1 + sozThetest(uint64(e)) + } + } + if len(m.Field8) > 0 { + for _, e := range m.Field8 { + l = e.Size() + n += 1 + l + sovThetest(uint64(l)) + } + } + if len(m.Field13) > 0 { + n += 2 * len(m.Field13) + } + if len(m.Field14) > 0 { + for _, s := range m.Field14 { + l = len(s) + n += 1 + l + sovThetest(uint64(l)) + } + } + if len(m.Field15) > 0 { + for _, b := range m.Field15 { + l = len(b) + n += 1 + l + sovThetest(uint64(l)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NinRepStruct) Size() (n int) { + var l int + _ = l + if len(m.Field1) > 0 { + n += 9 * len(m.Field1) + } + if len(m.Field2) > 0 { + n += 5 * len(m.Field2) + } + if len(m.Field3) > 0 { + for _, e := range m.Field3 { + l = e.Size() + n += 1 + l + sovThetest(uint64(l)) + } + } + if len(m.Field4) > 0 { + for _, e := range m.Field4 { + l = e.Size() + n += 1 + l + sovThetest(uint64(l)) + } + } + if len(m.Field6) > 0 { + for _, e := range m.Field6 { + n += 1 + sovThetest(uint64(e)) + } + } + if len(m.Field7) > 0 { + for _, e := range m.Field7 { + n += 1 + sozThetest(uint64(e)) + } + } + if len(m.Field8) > 0 { + for _, e := range m.Field8 { + l = e.Size() + n += 1 + l + sovThetest(uint64(l)) + } + } + if len(m.Field13) > 0 { + n += 2 * len(m.Field13) + } + if len(m.Field14) > 0 { + for _, s := range m.Field14 { + l = len(s) + n += 1 + l + sovThetest(uint64(l)) + } + } + if len(m.Field15) > 0 { + for _, b := range m.Field15 { + l = len(b) + n += 1 + l + sovThetest(uint64(l)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NidEmbeddedStruct) Size() (n int) { + var l int + _ = l + if m.NidOptNative != nil { + l = m.NidOptNative.Size() + n += 1 + l + sovThetest(uint64(l)) + } + l = m.Field200.Size() + n += 2 + l + sovThetest(uint64(l)) + n += 3 + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NinEmbeddedStruct) Size() (n int) { + var l int + _ = l + if m.NidOptNative != nil { + l = m.NidOptNative.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if m.Field200 != nil { + l = m.Field200.Size() + n += 2 + l + sovThetest(uint64(l)) + } + if m.Field210 != nil { + n += 3 + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NidNestedStruct) Size() (n int) { + var l int + _ = l + l = m.Field1.Size() + n += 1 + l + sovThetest(uint64(l)) + if len(m.Field2) > 0 { + for _, e := range m.Field2 { + l = e.Size() + n += 1 + l + sovThetest(uint64(l)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NinNestedStruct) Size() (n int) { + var l int + _ = l + if m.Field1 != nil { + l = m.Field1.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if len(m.Field2) > 0 { + for _, e := range m.Field2 { + l = e.Size() + n += 1 + l + sovThetest(uint64(l)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NidOptCustom) Size() (n int) { + var l int + _ = l + l = m.Id.Size() + n += 1 + l + sovThetest(uint64(l)) + l = m.Value.Size() + n += 1 + l + sovThetest(uint64(l)) + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *CustomDash) Size() (n int) { + var l int + _ = l + if m.Value != nil { + l = m.Value.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NinOptCustom) Size() (n int) { + var l int + _ = l + if m.Id != nil { + l = m.Id.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if m.Value != nil { + l = m.Value.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NidRepCustom) Size() (n int) { + var l int + _ = l + if len(m.Id) > 0 { + for _, e := range m.Id { + l = e.Size() + n += 1 + l + sovThetest(uint64(l)) + } + } + if len(m.Value) > 0 { + for _, e := range m.Value { + l = e.Size() + n += 1 + l + sovThetest(uint64(l)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NinRepCustom) Size() (n int) { + var l int + _ = l + if len(m.Id) > 0 { + for _, e := range m.Id { + l = e.Size() + n += 1 + l + sovThetest(uint64(l)) + } + } + if len(m.Value) > 0 { + for _, e := range m.Value { + l = e.Size() + n += 1 + l + sovThetest(uint64(l)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NinOptNativeUnion) Size() (n int) { + var l int + _ = l + if m.Field1 != nil { + n += 9 + } + if m.Field2 != nil { + n += 5 + } + if m.Field3 != nil { + n += 1 + sovThetest(uint64(*m.Field3)) + } + if m.Field4 != nil { + n += 1 + sovThetest(uint64(*m.Field4)) + } + if m.Field5 != nil { + n += 1 + sovThetest(uint64(*m.Field5)) + } + if m.Field6 != nil { + n += 1 + sovThetest(uint64(*m.Field6)) + } + if m.Field13 != nil { + n += 2 + } + if m.Field14 != nil { + l = len(*m.Field14) + n += 1 + l + sovThetest(uint64(l)) + } + if m.Field15 != nil { + l = len(m.Field15) + n += 1 + l + sovThetest(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NinOptStructUnion) Size() (n int) { + var l int + _ = l + if m.Field1 != nil { + n += 9 + } + if m.Field2 != nil { + n += 5 + } + if m.Field3 != nil { + l = m.Field3.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if m.Field4 != nil { + l = m.Field4.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if m.Field6 != nil { + n += 1 + sovThetest(uint64(*m.Field6)) + } + if m.Field7 != nil { + n += 1 + sozThetest(uint64(*m.Field7)) + } + if m.Field13 != nil { + n += 2 + } + if m.Field14 != nil { + l = len(*m.Field14) + n += 1 + l + sovThetest(uint64(l)) + } + if m.Field15 != nil { + l = len(m.Field15) + n += 1 + l + sovThetest(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NinEmbeddedStructUnion) Size() (n int) { + var l int + _ = l + if m.NidOptNative != nil { + l = m.NidOptNative.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if m.Field200 != nil { + l = m.Field200.Size() + n += 2 + l + sovThetest(uint64(l)) + } + if m.Field210 != nil { + n += 3 + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NinNestedStructUnion) Size() (n int) { + var l int + _ = l + if m.Field1 != nil { + l = m.Field1.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if m.Field2 != nil { + l = m.Field2.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if m.Field3 != nil { + l = m.Field3.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *Tree) Size() (n int) { + var l int + _ = l + if m.Or != nil { + l = m.Or.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if m.And != nil { + l = m.And.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if m.Leaf != nil { + l = m.Leaf.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *OrBranch) Size() (n int) { + var l int + _ = l + l = m.Left.Size() + n += 1 + l + sovThetest(uint64(l)) + l = m.Right.Size() + n += 1 + l + sovThetest(uint64(l)) + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *AndBranch) Size() (n int) { + var l int + _ = l + l = m.Left.Size() + n += 1 + l + sovThetest(uint64(l)) + l = m.Right.Size() + n += 1 + l + sovThetest(uint64(l)) + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *Leaf) Size() (n int) { + var l int + _ = l + n += 1 + sovThetest(uint64(m.Value)) + l = len(m.StrValue) + n += 1 + l + sovThetest(uint64(l)) + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *DeepTree) Size() (n int) { + var l int + _ = l + if m.Down != nil { + l = m.Down.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if m.And != nil { + l = m.And.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if m.Leaf != nil { + l = m.Leaf.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *ADeepBranch) Size() (n int) { + var l int + _ = l + l = m.Down.Size() + n += 1 + l + sovThetest(uint64(l)) + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *AndDeepBranch) Size() (n int) { + var l int + _ = l + l = m.Left.Size() + n += 1 + l + sovThetest(uint64(l)) + l = m.Right.Size() + n += 1 + l + sovThetest(uint64(l)) + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *DeepLeaf) Size() (n int) { + var l int + _ = l + l = m.Tree.Size() + n += 1 + l + sovThetest(uint64(l)) + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *Nil) Size() (n int) { + var l int + _ = l + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NidOptEnum) Size() (n int) { + var l int + _ = l + n += 1 + sovThetest(uint64(m.Field1)) + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NinOptEnum) Size() (n int) { + var l int + _ = l + if m.Field1 != nil { + n += 1 + sovThetest(uint64(*m.Field1)) + } + if m.Field2 != nil { + n += 1 + sovThetest(uint64(*m.Field2)) + } + if m.Field3 != nil { + n += 1 + sovThetest(uint64(*m.Field3)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NidRepEnum) Size() (n int) { + var l int + _ = l + if len(m.Field1) > 0 { + for _, e := range m.Field1 { + n += 1 + sovThetest(uint64(e)) + } + } + if len(m.Field2) > 0 { + for _, e := range m.Field2 { + n += 1 + sovThetest(uint64(e)) + } + } + if len(m.Field3) > 0 { + for _, e := range m.Field3 { + n += 1 + sovThetest(uint64(e)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NinRepEnum) Size() (n int) { + var l int + _ = l + if len(m.Field1) > 0 { + for _, e := range m.Field1 { + n += 1 + sovThetest(uint64(e)) + } + } + if len(m.Field2) > 0 { + for _, e := range m.Field2 { + n += 1 + sovThetest(uint64(e)) + } + } + if len(m.Field3) > 0 { + for _, e := range m.Field3 { + n += 1 + sovThetest(uint64(e)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NinOptEnumDefault) Size() (n int) { + var l int + _ = l + if m.Field1 != nil { + n += 1 + sovThetest(uint64(*m.Field1)) + } + if m.Field2 != nil { + n += 1 + sovThetest(uint64(*m.Field2)) + } + if m.Field3 != nil { + n += 1 + sovThetest(uint64(*m.Field3)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *AnotherNinOptEnum) Size() (n int) { + var l int + _ = l + if m.Field1 != nil { + n += 1 + sovThetest(uint64(*m.Field1)) + } + if m.Field2 != nil { + n += 1 + sovThetest(uint64(*m.Field2)) + } + if m.Field3 != nil { + n += 1 + sovThetest(uint64(*m.Field3)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *AnotherNinOptEnumDefault) Size() (n int) { + var l int + _ = l + if m.Field1 != nil { + n += 1 + sovThetest(uint64(*m.Field1)) + } + if m.Field2 != nil { + n += 1 + sovThetest(uint64(*m.Field2)) + } + if m.Field3 != nil { + n += 1 + sovThetest(uint64(*m.Field3)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *Timer) Size() (n int) { + var l int + _ = l + n += 9 + n += 9 + if m.Data != nil { + l = len(m.Data) + n += 1 + l + sovThetest(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *MyExtendable) Size() (n int) { + var l int + _ = l + if m.Field1 != nil { + n += 1 + sovThetest(uint64(*m.Field1)) + } + if m.XXX_extensions != nil { + n += github_com_gogo_protobuf_proto.SizeOfExtensionMap(m.XXX_extensions) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *OtherExtenable) Size() (n int) { + var l int + _ = l + if m.Field2 != nil { + n += 1 + sovThetest(uint64(*m.Field2)) + } + if m.Field13 != nil { + n += 1 + sovThetest(uint64(*m.Field13)) + } + if m.M != nil { + l = m.M.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if m.XXX_extensions != nil { + n += github_com_gogo_protobuf_proto.SizeOfExtensionMap(m.XXX_extensions) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NestedDefinition) Size() (n int) { + var l int + _ = l + if m.Field1 != nil { + n += 1 + sovThetest(uint64(*m.Field1)) + } + if m.EnumField != nil { + n += 1 + sovThetest(uint64(*m.EnumField)) + } + if m.NNM != nil { + l = m.NNM.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if m.NM != nil { + l = m.NM.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NestedDefinition_NestedMessage) Size() (n int) { + var l int + _ = l + if m.NestedField1 != nil { + n += 9 + } + if m.NNM != nil { + l = m.NNM.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NestedDefinition_NestedMessage_NestedNestedMsg) Size() (n int) { + var l int + _ = l + if m.NestedNestedField1 != nil { + l = len(*m.NestedNestedField1) + n += 1 + l + sovThetest(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NestedScope) Size() (n int) { + var l int + _ = l + if m.A != nil { + l = m.A.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if m.B != nil { + n += 1 + sovThetest(uint64(*m.B)) + } + if m.C != nil { + l = m.C.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NinOptNativeDefault) Size() (n int) { + var l int + _ = l + if m.Field1 != nil { + n += 9 + } + if m.Field2 != nil { + n += 5 + } + if m.Field3 != nil { + n += 1 + sovThetest(uint64(*m.Field3)) + } + if m.Field4 != nil { + n += 1 + sovThetest(uint64(*m.Field4)) + } + if m.Field5 != nil { + n += 1 + sovThetest(uint64(*m.Field5)) + } + if m.Field6 != nil { + n += 1 + sovThetest(uint64(*m.Field6)) + } + if m.Field7 != nil { + n += 1 + sozThetest(uint64(*m.Field7)) + } + if m.Field8 != nil { + n += 1 + sozThetest(uint64(*m.Field8)) + } + if m.Field9 != nil { + n += 5 + } + if m.Field10 != nil { + n += 5 + } + if m.Field11 != nil { + n += 9 + } + if m.Field12 != nil { + n += 9 + } + if m.Field13 != nil { + n += 2 + } + if m.Field14 != nil { + l = len(*m.Field14) + n += 1 + l + sovThetest(uint64(l)) + } + if m.Field15 != nil { + l = len(m.Field15) + n += 1 + l + sovThetest(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *CustomContainer) Size() (n int) { + var l int + _ = l + l = m.CustomStruct.Size() + n += 1 + l + sovThetest(uint64(l)) + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *CustomNameNidOptNative) Size() (n int) { + var l int + _ = l + n += 9 + n += 5 + n += 1 + sovThetest(uint64(m.FieldC)) + n += 1 + sovThetest(uint64(m.FieldD)) + n += 1 + sovThetest(uint64(m.FieldE)) + n += 1 + sovThetest(uint64(m.FieldF)) + n += 1 + sozThetest(uint64(m.FieldG)) + n += 1 + sozThetest(uint64(m.FieldH)) + n += 5 + n += 5 + n += 9 + n += 9 + n += 2 + l = len(m.FieldN) + n += 1 + l + sovThetest(uint64(l)) + if m.FieldO != nil { + l = len(m.FieldO) + n += 1 + l + sovThetest(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *CustomNameNinOptNative) Size() (n int) { + var l int + _ = l + if m.FieldA != nil { + n += 9 + } + if m.FieldB != nil { + n += 5 + } + if m.FieldC != nil { + n += 1 + sovThetest(uint64(*m.FieldC)) + } + if m.FieldD != nil { + n += 1 + sovThetest(uint64(*m.FieldD)) + } + if m.FieldE != nil { + n += 1 + sovThetest(uint64(*m.FieldE)) + } + if m.FieldF != nil { + n += 1 + sovThetest(uint64(*m.FieldF)) + } + if m.FieldG != nil { + n += 1 + sozThetest(uint64(*m.FieldG)) + } + if m.FieldH != nil { + n += 1 + sozThetest(uint64(*m.FieldH)) + } + if m.FieldI != nil { + n += 5 + } + if m.FieldJ != nil { + n += 5 + } + if m.FieldK != nil { + n += 9 + } + if m.FielL != nil { + n += 9 + } + if m.FieldM != nil { + n += 2 + } + if m.FieldN != nil { + l = len(*m.FieldN) + n += 1 + l + sovThetest(uint64(l)) + } + if m.FieldO != nil { + l = len(m.FieldO) + n += 1 + l + sovThetest(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *CustomNameNinRepNative) Size() (n int) { + var l int + _ = l + if len(m.FieldA) > 0 { + n += 9 * len(m.FieldA) + } + if len(m.FieldB) > 0 { + n += 5 * len(m.FieldB) + } + if len(m.FieldC) > 0 { + for _, e := range m.FieldC { + n += 1 + sovThetest(uint64(e)) + } + } + if len(m.FieldD) > 0 { + for _, e := range m.FieldD { + n += 1 + sovThetest(uint64(e)) + } + } + if len(m.FieldE) > 0 { + for _, e := range m.FieldE { + n += 1 + sovThetest(uint64(e)) + } + } + if len(m.FieldF) > 0 { + for _, e := range m.FieldF { + n += 1 + sovThetest(uint64(e)) + } + } + if len(m.FieldG) > 0 { + for _, e := range m.FieldG { + n += 1 + sozThetest(uint64(e)) + } + } + if len(m.FieldH) > 0 { + for _, e := range m.FieldH { + n += 1 + sozThetest(uint64(e)) + } + } + if len(m.FieldI) > 0 { + n += 5 * len(m.FieldI) + } + if len(m.FieldJ) > 0 { + n += 5 * len(m.FieldJ) + } + if len(m.FieldK) > 0 { + n += 9 * len(m.FieldK) + } + if len(m.FieldL) > 0 { + n += 9 * len(m.FieldL) + } + if len(m.FieldM) > 0 { + n += 2 * len(m.FieldM) + } + if len(m.FieldN) > 0 { + for _, s := range m.FieldN { + l = len(s) + n += 1 + l + sovThetest(uint64(l)) + } + } + if len(m.FieldO) > 0 { + for _, b := range m.FieldO { + l = len(b) + n += 1 + l + sovThetest(uint64(l)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *CustomNameNinStruct) Size() (n int) { + var l int + _ = l + if m.FieldA != nil { + n += 9 + } + if m.FieldB != nil { + n += 5 + } + if m.FieldC != nil { + l = m.FieldC.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if len(m.FieldD) > 0 { + for _, e := range m.FieldD { + l = e.Size() + n += 1 + l + sovThetest(uint64(l)) + } + } + if m.FieldE != nil { + n += 1 + sovThetest(uint64(*m.FieldE)) + } + if m.FieldF != nil { + n += 1 + sozThetest(uint64(*m.FieldF)) + } + if m.FieldG != nil { + l = m.FieldG.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if m.FieldH != nil { + n += 2 + } + if m.FieldI != nil { + l = len(*m.FieldI) + n += 1 + l + sovThetest(uint64(l)) + } + if m.FieldJ != nil { + l = len(m.FieldJ) + n += 1 + l + sovThetest(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *CustomNameCustomType) Size() (n int) { + var l int + _ = l + if m.FieldA != nil { + l = m.FieldA.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if m.FieldB != nil { + l = m.FieldB.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if len(m.FieldC) > 0 { + for _, e := range m.FieldC { + l = e.Size() + n += 1 + l + sovThetest(uint64(l)) + } + } + if len(m.FieldD) > 0 { + for _, e := range m.FieldD { + l = e.Size() + n += 1 + l + sovThetest(uint64(l)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *CustomNameNinEmbeddedStructUnion) Size() (n int) { + var l int + _ = l + if m.NidOptNative != nil { + l = m.NidOptNative.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if m.FieldA != nil { + l = m.FieldA.Size() + n += 2 + l + sovThetest(uint64(l)) + } + if m.FieldB != nil { + n += 3 + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *CustomNameEnum) Size() (n int) { + var l int + _ = l + if m.FieldA != nil { + n += 1 + sovThetest(uint64(*m.FieldA)) + } + if len(m.FieldB) > 0 { + for _, e := range m.FieldB { + n += 1 + sovThetest(uint64(e)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NoExtensionsMap) Size() (n int) { + var l int + _ = l + if m.Field1 != nil { + n += 1 + sovThetest(uint64(*m.Field1)) + } + if m.XXX_extensions != nil { + n += len(m.XXX_extensions) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *Unrecognized) Size() (n int) { + var l int + _ = l + if m.Field1 != nil { + l = len(*m.Field1) + n += 1 + l + sovThetest(uint64(l)) + } + return n +} + +func (m *UnrecognizedWithInner) Size() (n int) { + var l int + _ = l + if len(m.Embedded) > 0 { + for _, e := range m.Embedded { + l = e.Size() + n += 1 + l + sovThetest(uint64(l)) + } + } + if m.Field2 != nil { + l = len(*m.Field2) + n += 1 + l + sovThetest(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *UnrecognizedWithInner_Inner) Size() (n int) { + var l int + _ = l + if m.Field1 != nil { + n += 1 + sovThetest(uint64(*m.Field1)) + } + return n +} + +func (m *UnrecognizedWithEmbed) Size() (n int) { + var l int + _ = l + l = m.UnrecognizedWithEmbed_Embedded.Size() + n += 1 + l + sovThetest(uint64(l)) + if m.Field2 != nil { + l = len(*m.Field2) + n += 1 + l + sovThetest(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *UnrecognizedWithEmbed_Embedded) Size() (n int) { + var l int + _ = l + if m.Field1 != nil { + n += 1 + sovThetest(uint64(*m.Field1)) + } + return n +} + +func (m *Node) Size() (n int) { + var l int + _ = l + if m.Label != nil { + l = len(*m.Label) + n += 1 + l + sovThetest(uint64(l)) + } + if len(m.Children) > 0 { + for _, e := range m.Children { + l = e.Size() + n += 1 + l + sovThetest(uint64(l)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func sovThetest(x uint64) (n int) { + for { + n++ + x >>= 7 + if x == 0 { + break + } + } + return n +} +func sozThetest(x uint64) (n int) { + return sovThetest(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (this *NidOptNative) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NidOptNative{`, + `Field1:` + fmt.Sprintf("%v", this.Field1) + `,`, + `Field2:` + fmt.Sprintf("%v", this.Field2) + `,`, + `Field3:` + fmt.Sprintf("%v", this.Field3) + `,`, + `Field4:` + fmt.Sprintf("%v", this.Field4) + `,`, + `Field5:` + fmt.Sprintf("%v", this.Field5) + `,`, + `Field6:` + fmt.Sprintf("%v", this.Field6) + `,`, + `Field7:` + fmt.Sprintf("%v", this.Field7) + `,`, + `Field8:` + fmt.Sprintf("%v", this.Field8) + `,`, + `Field9:` + fmt.Sprintf("%v", this.Field9) + `,`, + `Field10:` + fmt.Sprintf("%v", this.Field10) + `,`, + `Field11:` + fmt.Sprintf("%v", this.Field11) + `,`, + `Field12:` + fmt.Sprintf("%v", this.Field12) + `,`, + `Field13:` + fmt.Sprintf("%v", this.Field13) + `,`, + `Field14:` + fmt.Sprintf("%v", this.Field14) + `,`, + `Field15:` + fmt.Sprintf("%v", this.Field15) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NinOptNative) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NinOptNative{`, + `Field1:` + valueToStringThetest(this.Field1) + `,`, + `Field2:` + valueToStringThetest(this.Field2) + `,`, + `Field3:` + valueToStringThetest(this.Field3) + `,`, + `Field4:` + valueToStringThetest(this.Field4) + `,`, + `Field5:` + valueToStringThetest(this.Field5) + `,`, + `Field6:` + valueToStringThetest(this.Field6) + `,`, + `Field7:` + valueToStringThetest(this.Field7) + `,`, + `Field8:` + valueToStringThetest(this.Field8) + `,`, + `Field9:` + valueToStringThetest(this.Field9) + `,`, + `Field10:` + valueToStringThetest(this.Field10) + `,`, + `Field11:` + valueToStringThetest(this.Field11) + `,`, + `Field12:` + valueToStringThetest(this.Field12) + `,`, + `Field13:` + valueToStringThetest(this.Field13) + `,`, + `Field14:` + valueToStringThetest(this.Field14) + `,`, + `Field15:` + valueToStringThetest(this.Field15) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NidRepNative) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NidRepNative{`, + `Field1:` + fmt.Sprintf("%v", this.Field1) + `,`, + `Field2:` + fmt.Sprintf("%v", this.Field2) + `,`, + `Field3:` + fmt.Sprintf("%v", this.Field3) + `,`, + `Field4:` + fmt.Sprintf("%v", this.Field4) + `,`, + `Field5:` + fmt.Sprintf("%v", this.Field5) + `,`, + `Field6:` + fmt.Sprintf("%v", this.Field6) + `,`, + `Field7:` + fmt.Sprintf("%v", this.Field7) + `,`, + `Field8:` + fmt.Sprintf("%v", this.Field8) + `,`, + `Field9:` + fmt.Sprintf("%v", this.Field9) + `,`, + `Field10:` + fmt.Sprintf("%v", this.Field10) + `,`, + `Field11:` + fmt.Sprintf("%v", this.Field11) + `,`, + `Field12:` + fmt.Sprintf("%v", this.Field12) + `,`, + `Field13:` + fmt.Sprintf("%v", this.Field13) + `,`, + `Field14:` + fmt.Sprintf("%v", this.Field14) + `,`, + `Field15:` + fmt.Sprintf("%v", this.Field15) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NinRepNative) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NinRepNative{`, + `Field1:` + fmt.Sprintf("%v", this.Field1) + `,`, + `Field2:` + fmt.Sprintf("%v", this.Field2) + `,`, + `Field3:` + fmt.Sprintf("%v", this.Field3) + `,`, + `Field4:` + fmt.Sprintf("%v", this.Field4) + `,`, + `Field5:` + fmt.Sprintf("%v", this.Field5) + `,`, + `Field6:` + fmt.Sprintf("%v", this.Field6) + `,`, + `Field7:` + fmt.Sprintf("%v", this.Field7) + `,`, + `Field8:` + fmt.Sprintf("%v", this.Field8) + `,`, + `Field9:` + fmt.Sprintf("%v", this.Field9) + `,`, + `Field10:` + fmt.Sprintf("%v", this.Field10) + `,`, + `Field11:` + fmt.Sprintf("%v", this.Field11) + `,`, + `Field12:` + fmt.Sprintf("%v", this.Field12) + `,`, + `Field13:` + fmt.Sprintf("%v", this.Field13) + `,`, + `Field14:` + fmt.Sprintf("%v", this.Field14) + `,`, + `Field15:` + fmt.Sprintf("%v", this.Field15) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NidRepPackedNative) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NidRepPackedNative{`, + `Field1:` + fmt.Sprintf("%v", this.Field1) + `,`, + `Field2:` + fmt.Sprintf("%v", this.Field2) + `,`, + `Field3:` + fmt.Sprintf("%v", this.Field3) + `,`, + `Field4:` + fmt.Sprintf("%v", this.Field4) + `,`, + `Field5:` + fmt.Sprintf("%v", this.Field5) + `,`, + `Field6:` + fmt.Sprintf("%v", this.Field6) + `,`, + `Field7:` + fmt.Sprintf("%v", this.Field7) + `,`, + `Field8:` + fmt.Sprintf("%v", this.Field8) + `,`, + `Field9:` + fmt.Sprintf("%v", this.Field9) + `,`, + `Field10:` + fmt.Sprintf("%v", this.Field10) + `,`, + `Field11:` + fmt.Sprintf("%v", this.Field11) + `,`, + `Field12:` + fmt.Sprintf("%v", this.Field12) + `,`, + `Field13:` + fmt.Sprintf("%v", this.Field13) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NinRepPackedNative) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NinRepPackedNative{`, + `Field1:` + fmt.Sprintf("%v", this.Field1) + `,`, + `Field2:` + fmt.Sprintf("%v", this.Field2) + `,`, + `Field3:` + fmt.Sprintf("%v", this.Field3) + `,`, + `Field4:` + fmt.Sprintf("%v", this.Field4) + `,`, + `Field5:` + fmt.Sprintf("%v", this.Field5) + `,`, + `Field6:` + fmt.Sprintf("%v", this.Field6) + `,`, + `Field7:` + fmt.Sprintf("%v", this.Field7) + `,`, + `Field8:` + fmt.Sprintf("%v", this.Field8) + `,`, + `Field9:` + fmt.Sprintf("%v", this.Field9) + `,`, + `Field10:` + fmt.Sprintf("%v", this.Field10) + `,`, + `Field11:` + fmt.Sprintf("%v", this.Field11) + `,`, + `Field12:` + fmt.Sprintf("%v", this.Field12) + `,`, + `Field13:` + fmt.Sprintf("%v", this.Field13) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NidOptStruct) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NidOptStruct{`, + `Field1:` + fmt.Sprintf("%v", this.Field1) + `,`, + `Field2:` + fmt.Sprintf("%v", this.Field2) + `,`, + `Field3:` + strings.Replace(strings.Replace(this.Field3.String(), "NidOptNative", "NidOptNative", 1), `&`, ``, 1) + `,`, + `Field4:` + strings.Replace(strings.Replace(this.Field4.String(), "NinOptNative", "NinOptNative", 1), `&`, ``, 1) + `,`, + `Field6:` + fmt.Sprintf("%v", this.Field6) + `,`, + `Field7:` + fmt.Sprintf("%v", this.Field7) + `,`, + `Field8:` + strings.Replace(strings.Replace(this.Field8.String(), "NidOptNative", "NidOptNative", 1), `&`, ``, 1) + `,`, + `Field13:` + fmt.Sprintf("%v", this.Field13) + `,`, + `Field14:` + fmt.Sprintf("%v", this.Field14) + `,`, + `Field15:` + fmt.Sprintf("%v", this.Field15) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NinOptStruct) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NinOptStruct{`, + `Field1:` + valueToStringThetest(this.Field1) + `,`, + `Field2:` + valueToStringThetest(this.Field2) + `,`, + `Field3:` + strings.Replace(fmt.Sprintf("%v", this.Field3), "NidOptNative", "NidOptNative", 1) + `,`, + `Field4:` + strings.Replace(fmt.Sprintf("%v", this.Field4), "NinOptNative", "NinOptNative", 1) + `,`, + `Field6:` + valueToStringThetest(this.Field6) + `,`, + `Field7:` + valueToStringThetest(this.Field7) + `,`, + `Field8:` + strings.Replace(fmt.Sprintf("%v", this.Field8), "NidOptNative", "NidOptNative", 1) + `,`, + `Field13:` + valueToStringThetest(this.Field13) + `,`, + `Field14:` + valueToStringThetest(this.Field14) + `,`, + `Field15:` + valueToStringThetest(this.Field15) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NidRepStruct) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NidRepStruct{`, + `Field1:` + fmt.Sprintf("%v", this.Field1) + `,`, + `Field2:` + fmt.Sprintf("%v", this.Field2) + `,`, + `Field3:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Field3), "NidOptNative", "NidOptNative", 1), `&`, ``, 1) + `,`, + `Field4:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Field4), "NinOptNative", "NinOptNative", 1), `&`, ``, 1) + `,`, + `Field6:` + fmt.Sprintf("%v", this.Field6) + `,`, + `Field7:` + fmt.Sprintf("%v", this.Field7) + `,`, + `Field8:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Field8), "NidOptNative", "NidOptNative", 1), `&`, ``, 1) + `,`, + `Field13:` + fmt.Sprintf("%v", this.Field13) + `,`, + `Field14:` + fmt.Sprintf("%v", this.Field14) + `,`, + `Field15:` + fmt.Sprintf("%v", this.Field15) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NinRepStruct) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NinRepStruct{`, + `Field1:` + fmt.Sprintf("%v", this.Field1) + `,`, + `Field2:` + fmt.Sprintf("%v", this.Field2) + `,`, + `Field3:` + strings.Replace(fmt.Sprintf("%v", this.Field3), "NidOptNative", "NidOptNative", 1) + `,`, + `Field4:` + strings.Replace(fmt.Sprintf("%v", this.Field4), "NinOptNative", "NinOptNative", 1) + `,`, + `Field6:` + fmt.Sprintf("%v", this.Field6) + `,`, + `Field7:` + fmt.Sprintf("%v", this.Field7) + `,`, + `Field8:` + strings.Replace(fmt.Sprintf("%v", this.Field8), "NidOptNative", "NidOptNative", 1) + `,`, + `Field13:` + fmt.Sprintf("%v", this.Field13) + `,`, + `Field14:` + fmt.Sprintf("%v", this.Field14) + `,`, + `Field15:` + fmt.Sprintf("%v", this.Field15) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NidEmbeddedStruct) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NidEmbeddedStruct{`, + `NidOptNative:` + strings.Replace(fmt.Sprintf("%v", this.NidOptNative), "NidOptNative", "NidOptNative", 1) + `,`, + `Field200:` + strings.Replace(strings.Replace(this.Field200.String(), "NidOptNative", "NidOptNative", 1), `&`, ``, 1) + `,`, + `Field210:` + fmt.Sprintf("%v", this.Field210) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NinEmbeddedStruct) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NinEmbeddedStruct{`, + `NidOptNative:` + strings.Replace(fmt.Sprintf("%v", this.NidOptNative), "NidOptNative", "NidOptNative", 1) + `,`, + `Field200:` + strings.Replace(fmt.Sprintf("%v", this.Field200), "NidOptNative", "NidOptNative", 1) + `,`, + `Field210:` + valueToStringThetest(this.Field210) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NidNestedStruct) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NidNestedStruct{`, + `Field1:` + strings.Replace(strings.Replace(this.Field1.String(), "NidOptStruct", "NidOptStruct", 1), `&`, ``, 1) + `,`, + `Field2:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Field2), "NidRepStruct", "NidRepStruct", 1), `&`, ``, 1) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NinNestedStruct) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NinNestedStruct{`, + `Field1:` + strings.Replace(fmt.Sprintf("%v", this.Field1), "NinOptStruct", "NinOptStruct", 1) + `,`, + `Field2:` + strings.Replace(fmt.Sprintf("%v", this.Field2), "NinRepStruct", "NinRepStruct", 1) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NidOptCustom) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NidOptCustom{`, + `Id:` + fmt.Sprintf("%v", this.Id) + `,`, + `Value:` + fmt.Sprintf("%v", this.Value) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *CustomDash) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&CustomDash{`, + `Value:` + valueToStringThetest(this.Value) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NinOptCustom) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NinOptCustom{`, + `Id:` + valueToStringThetest(this.Id) + `,`, + `Value:` + valueToStringThetest(this.Value) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NidRepCustom) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NidRepCustom{`, + `Id:` + fmt.Sprintf("%v", this.Id) + `,`, + `Value:` + fmt.Sprintf("%v", this.Value) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NinRepCustom) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NinRepCustom{`, + `Id:` + fmt.Sprintf("%v", this.Id) + `,`, + `Value:` + fmt.Sprintf("%v", this.Value) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NinOptNativeUnion) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NinOptNativeUnion{`, + `Field1:` + valueToStringThetest(this.Field1) + `,`, + `Field2:` + valueToStringThetest(this.Field2) + `,`, + `Field3:` + valueToStringThetest(this.Field3) + `,`, + `Field4:` + valueToStringThetest(this.Field4) + `,`, + `Field5:` + valueToStringThetest(this.Field5) + `,`, + `Field6:` + valueToStringThetest(this.Field6) + `,`, + `Field13:` + valueToStringThetest(this.Field13) + `,`, + `Field14:` + valueToStringThetest(this.Field14) + `,`, + `Field15:` + valueToStringThetest(this.Field15) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NinOptStructUnion) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NinOptStructUnion{`, + `Field1:` + valueToStringThetest(this.Field1) + `,`, + `Field2:` + valueToStringThetest(this.Field2) + `,`, + `Field3:` + strings.Replace(fmt.Sprintf("%v", this.Field3), "NidOptNative", "NidOptNative", 1) + `,`, + `Field4:` + strings.Replace(fmt.Sprintf("%v", this.Field4), "NinOptNative", "NinOptNative", 1) + `,`, + `Field6:` + valueToStringThetest(this.Field6) + `,`, + `Field7:` + valueToStringThetest(this.Field7) + `,`, + `Field13:` + valueToStringThetest(this.Field13) + `,`, + `Field14:` + valueToStringThetest(this.Field14) + `,`, + `Field15:` + valueToStringThetest(this.Field15) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NinEmbeddedStructUnion) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NinEmbeddedStructUnion{`, + `NidOptNative:` + strings.Replace(fmt.Sprintf("%v", this.NidOptNative), "NidOptNative", "NidOptNative", 1) + `,`, + `Field200:` + strings.Replace(fmt.Sprintf("%v", this.Field200), "NinOptNative", "NinOptNative", 1) + `,`, + `Field210:` + valueToStringThetest(this.Field210) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NinNestedStructUnion) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NinNestedStructUnion{`, + `Field1:` + strings.Replace(fmt.Sprintf("%v", this.Field1), "NinOptNativeUnion", "NinOptNativeUnion", 1) + `,`, + `Field2:` + strings.Replace(fmt.Sprintf("%v", this.Field2), "NinOptStructUnion", "NinOptStructUnion", 1) + `,`, + `Field3:` + strings.Replace(fmt.Sprintf("%v", this.Field3), "NinEmbeddedStructUnion", "NinEmbeddedStructUnion", 1) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *Tree) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&Tree{`, + `Or:` + strings.Replace(fmt.Sprintf("%v", this.Or), "OrBranch", "OrBranch", 1) + `,`, + `And:` + strings.Replace(fmt.Sprintf("%v", this.And), "AndBranch", "AndBranch", 1) + `,`, + `Leaf:` + strings.Replace(fmt.Sprintf("%v", this.Leaf), "Leaf", "Leaf", 1) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *OrBranch) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&OrBranch{`, + `Left:` + strings.Replace(strings.Replace(this.Left.String(), "Tree", "Tree", 1), `&`, ``, 1) + `,`, + `Right:` + strings.Replace(strings.Replace(this.Right.String(), "Tree", "Tree", 1), `&`, ``, 1) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *AndBranch) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&AndBranch{`, + `Left:` + strings.Replace(strings.Replace(this.Left.String(), "Tree", "Tree", 1), `&`, ``, 1) + `,`, + `Right:` + strings.Replace(strings.Replace(this.Right.String(), "Tree", "Tree", 1), `&`, ``, 1) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *Leaf) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&Leaf{`, + `Value:` + fmt.Sprintf("%v", this.Value) + `,`, + `StrValue:` + fmt.Sprintf("%v", this.StrValue) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *DeepTree) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&DeepTree{`, + `Down:` + strings.Replace(fmt.Sprintf("%v", this.Down), "ADeepBranch", "ADeepBranch", 1) + `,`, + `And:` + strings.Replace(fmt.Sprintf("%v", this.And), "AndDeepBranch", "AndDeepBranch", 1) + `,`, + `Leaf:` + strings.Replace(fmt.Sprintf("%v", this.Leaf), "DeepLeaf", "DeepLeaf", 1) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *ADeepBranch) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&ADeepBranch{`, + `Down:` + strings.Replace(strings.Replace(this.Down.String(), "DeepTree", "DeepTree", 1), `&`, ``, 1) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *AndDeepBranch) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&AndDeepBranch{`, + `Left:` + strings.Replace(strings.Replace(this.Left.String(), "DeepTree", "DeepTree", 1), `&`, ``, 1) + `,`, + `Right:` + strings.Replace(strings.Replace(this.Right.String(), "DeepTree", "DeepTree", 1), `&`, ``, 1) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *DeepLeaf) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&DeepLeaf{`, + `Tree:` + strings.Replace(strings.Replace(this.Tree.String(), "Tree", "Tree", 1), `&`, ``, 1) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *Nil) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&Nil{`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NidOptEnum) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NidOptEnum{`, + `Field1:` + fmt.Sprintf("%v", this.Field1) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NinOptEnum) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NinOptEnum{`, + `Field1:` + valueToStringThetest(this.Field1) + `,`, + `Field2:` + valueToStringThetest(this.Field2) + `,`, + `Field3:` + valueToStringThetest(this.Field3) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NidRepEnum) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NidRepEnum{`, + `Field1:` + fmt.Sprintf("%v", this.Field1) + `,`, + `Field2:` + fmt.Sprintf("%v", this.Field2) + `,`, + `Field3:` + fmt.Sprintf("%v", this.Field3) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NinRepEnum) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NinRepEnum{`, + `Field1:` + fmt.Sprintf("%v", this.Field1) + `,`, + `Field2:` + fmt.Sprintf("%v", this.Field2) + `,`, + `Field3:` + fmt.Sprintf("%v", this.Field3) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NinOptEnumDefault) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NinOptEnumDefault{`, + `Field1:` + valueToStringThetest(this.Field1) + `,`, + `Field2:` + valueToStringThetest(this.Field2) + `,`, + `Field3:` + valueToStringThetest(this.Field3) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *AnotherNinOptEnum) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&AnotherNinOptEnum{`, + `Field1:` + valueToStringThetest(this.Field1) + `,`, + `Field2:` + valueToStringThetest(this.Field2) + `,`, + `Field3:` + valueToStringThetest(this.Field3) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *AnotherNinOptEnumDefault) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&AnotherNinOptEnumDefault{`, + `Field1:` + valueToStringThetest(this.Field1) + `,`, + `Field2:` + valueToStringThetest(this.Field2) + `,`, + `Field3:` + valueToStringThetest(this.Field3) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *Timer) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&Timer{`, + `Time1:` + fmt.Sprintf("%v", this.Time1) + `,`, + `Time2:` + fmt.Sprintf("%v", this.Time2) + `,`, + `Data:` + fmt.Sprintf("%v", this.Data) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *MyExtendable) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&MyExtendable{`, + `Field1:` + valueToStringThetest(this.Field1) + `,`, + `XXX_extensions:` + proto.StringFromExtensionsMap(this.XXX_extensions) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *OtherExtenable) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&OtherExtenable{`, + `Field2:` + valueToStringThetest(this.Field2) + `,`, + `Field13:` + valueToStringThetest(this.Field13) + `,`, + `M:` + strings.Replace(fmt.Sprintf("%v", this.M), "MyExtendable", "MyExtendable", 1) + `,`, + `XXX_extensions:` + proto.StringFromExtensionsMap(this.XXX_extensions) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NestedDefinition) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NestedDefinition{`, + `Field1:` + valueToStringThetest(this.Field1) + `,`, + `EnumField:` + valueToStringThetest(this.EnumField) + `,`, + `NNM:` + strings.Replace(fmt.Sprintf("%v", this.NNM), "NestedDefinition_NestedMessage_NestedNestedMsg", "NestedDefinition_NestedMessage_NestedNestedMsg", 1) + `,`, + `NM:` + strings.Replace(fmt.Sprintf("%v", this.NM), "NestedDefinition_NestedMessage", "NestedDefinition_NestedMessage", 1) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NestedDefinition_NestedMessage) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NestedDefinition_NestedMessage{`, + `NestedField1:` + valueToStringThetest(this.NestedField1) + `,`, + `NNM:` + strings.Replace(fmt.Sprintf("%v", this.NNM), "NestedDefinition_NestedMessage_NestedNestedMsg", "NestedDefinition_NestedMessage_NestedNestedMsg", 1) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NestedDefinition_NestedMessage_NestedNestedMsg) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NestedDefinition_NestedMessage_NestedNestedMsg{`, + `NestedNestedField1:` + valueToStringThetest(this.NestedNestedField1) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NestedScope) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NestedScope{`, + `A:` + strings.Replace(fmt.Sprintf("%v", this.A), "NestedDefinition_NestedMessage_NestedNestedMsg", "NestedDefinition_NestedMessage_NestedNestedMsg", 1) + `,`, + `B:` + valueToStringThetest(this.B) + `,`, + `C:` + strings.Replace(fmt.Sprintf("%v", this.C), "NestedDefinition_NestedMessage", "NestedDefinition_NestedMessage", 1) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NinOptNativeDefault) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NinOptNativeDefault{`, + `Field1:` + valueToStringThetest(this.Field1) + `,`, + `Field2:` + valueToStringThetest(this.Field2) + `,`, + `Field3:` + valueToStringThetest(this.Field3) + `,`, + `Field4:` + valueToStringThetest(this.Field4) + `,`, + `Field5:` + valueToStringThetest(this.Field5) + `,`, + `Field6:` + valueToStringThetest(this.Field6) + `,`, + `Field7:` + valueToStringThetest(this.Field7) + `,`, + `Field8:` + valueToStringThetest(this.Field8) + `,`, + `Field9:` + valueToStringThetest(this.Field9) + `,`, + `Field10:` + valueToStringThetest(this.Field10) + `,`, + `Field11:` + valueToStringThetest(this.Field11) + `,`, + `Field12:` + valueToStringThetest(this.Field12) + `,`, + `Field13:` + valueToStringThetest(this.Field13) + `,`, + `Field14:` + valueToStringThetest(this.Field14) + `,`, + `Field15:` + valueToStringThetest(this.Field15) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *CustomContainer) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&CustomContainer{`, + `CustomStruct:` + strings.Replace(strings.Replace(this.CustomStruct.String(), "NidOptCustom", "NidOptCustom", 1), `&`, ``, 1) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *CustomNameNidOptNative) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&CustomNameNidOptNative{`, + `FieldA:` + fmt.Sprintf("%v", this.FieldA) + `,`, + `FieldB:` + fmt.Sprintf("%v", this.FieldB) + `,`, + `FieldC:` + fmt.Sprintf("%v", this.FieldC) + `,`, + `FieldD:` + fmt.Sprintf("%v", this.FieldD) + `,`, + `FieldE:` + fmt.Sprintf("%v", this.FieldE) + `,`, + `FieldF:` + fmt.Sprintf("%v", this.FieldF) + `,`, + `FieldG:` + fmt.Sprintf("%v", this.FieldG) + `,`, + `FieldH:` + fmt.Sprintf("%v", this.FieldH) + `,`, + `FieldI:` + fmt.Sprintf("%v", this.FieldI) + `,`, + `FieldJ:` + fmt.Sprintf("%v", this.FieldJ) + `,`, + `FieldK:` + fmt.Sprintf("%v", this.FieldK) + `,`, + `FieldL:` + fmt.Sprintf("%v", this.FieldL) + `,`, + `FieldM:` + fmt.Sprintf("%v", this.FieldM) + `,`, + `FieldN:` + fmt.Sprintf("%v", this.FieldN) + `,`, + `FieldO:` + fmt.Sprintf("%v", this.FieldO) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *CustomNameNinOptNative) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&CustomNameNinOptNative{`, + `FieldA:` + valueToStringThetest(this.FieldA) + `,`, + `FieldB:` + valueToStringThetest(this.FieldB) + `,`, + `FieldC:` + valueToStringThetest(this.FieldC) + `,`, + `FieldD:` + valueToStringThetest(this.FieldD) + `,`, + `FieldE:` + valueToStringThetest(this.FieldE) + `,`, + `FieldF:` + valueToStringThetest(this.FieldF) + `,`, + `FieldG:` + valueToStringThetest(this.FieldG) + `,`, + `FieldH:` + valueToStringThetest(this.FieldH) + `,`, + `FieldI:` + valueToStringThetest(this.FieldI) + `,`, + `FieldJ:` + valueToStringThetest(this.FieldJ) + `,`, + `FieldK:` + valueToStringThetest(this.FieldK) + `,`, + `FielL:` + valueToStringThetest(this.FielL) + `,`, + `FieldM:` + valueToStringThetest(this.FieldM) + `,`, + `FieldN:` + valueToStringThetest(this.FieldN) + `,`, + `FieldO:` + valueToStringThetest(this.FieldO) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *CustomNameNinRepNative) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&CustomNameNinRepNative{`, + `FieldA:` + fmt.Sprintf("%v", this.FieldA) + `,`, + `FieldB:` + fmt.Sprintf("%v", this.FieldB) + `,`, + `FieldC:` + fmt.Sprintf("%v", this.FieldC) + `,`, + `FieldD:` + fmt.Sprintf("%v", this.FieldD) + `,`, + `FieldE:` + fmt.Sprintf("%v", this.FieldE) + `,`, + `FieldF:` + fmt.Sprintf("%v", this.FieldF) + `,`, + `FieldG:` + fmt.Sprintf("%v", this.FieldG) + `,`, + `FieldH:` + fmt.Sprintf("%v", this.FieldH) + `,`, + `FieldI:` + fmt.Sprintf("%v", this.FieldI) + `,`, + `FieldJ:` + fmt.Sprintf("%v", this.FieldJ) + `,`, + `FieldK:` + fmt.Sprintf("%v", this.FieldK) + `,`, + `FieldL:` + fmt.Sprintf("%v", this.FieldL) + `,`, + `FieldM:` + fmt.Sprintf("%v", this.FieldM) + `,`, + `FieldN:` + fmt.Sprintf("%v", this.FieldN) + `,`, + `FieldO:` + fmt.Sprintf("%v", this.FieldO) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *CustomNameNinStruct) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&CustomNameNinStruct{`, + `FieldA:` + valueToStringThetest(this.FieldA) + `,`, + `FieldB:` + valueToStringThetest(this.FieldB) + `,`, + `FieldC:` + strings.Replace(fmt.Sprintf("%v", this.FieldC), "NidOptNative", "NidOptNative", 1) + `,`, + `FieldD:` + strings.Replace(fmt.Sprintf("%v", this.FieldD), "NinOptNative", "NinOptNative", 1) + `,`, + `FieldE:` + valueToStringThetest(this.FieldE) + `,`, + `FieldF:` + valueToStringThetest(this.FieldF) + `,`, + `FieldG:` + strings.Replace(fmt.Sprintf("%v", this.FieldG), "NidOptNative", "NidOptNative", 1) + `,`, + `FieldH:` + valueToStringThetest(this.FieldH) + `,`, + `FieldI:` + valueToStringThetest(this.FieldI) + `,`, + `FieldJ:` + valueToStringThetest(this.FieldJ) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *CustomNameCustomType) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&CustomNameCustomType{`, + `FieldA:` + valueToStringThetest(this.FieldA) + `,`, + `FieldB:` + valueToStringThetest(this.FieldB) + `,`, + `FieldC:` + fmt.Sprintf("%v", this.FieldC) + `,`, + `FieldD:` + fmt.Sprintf("%v", this.FieldD) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *CustomNameNinEmbeddedStructUnion) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&CustomNameNinEmbeddedStructUnion{`, + `NidOptNative:` + strings.Replace(fmt.Sprintf("%v", this.NidOptNative), "NidOptNative", "NidOptNative", 1) + `,`, + `FieldA:` + strings.Replace(fmt.Sprintf("%v", this.FieldA), "NinOptNative", "NinOptNative", 1) + `,`, + `FieldB:` + valueToStringThetest(this.FieldB) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *CustomNameEnum) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&CustomNameEnum{`, + `FieldA:` + valueToStringThetest(this.FieldA) + `,`, + `FieldB:` + fmt.Sprintf("%v", this.FieldB) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NoExtensionsMap) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NoExtensionsMap{`, + `Field1:` + valueToStringThetest(this.Field1) + `,`, + `XXX_extensions:` + proto.StringFromExtensionsBytes(this.XXX_extensions) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *Unrecognized) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&Unrecognized{`, + `Field1:` + valueToStringThetest(this.Field1) + `,`, + `}`, + }, "") + return s +} +func (this *UnrecognizedWithInner) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&UnrecognizedWithInner{`, + `Embedded:` + strings.Replace(fmt.Sprintf("%v", this.Embedded), "UnrecognizedWithInner_Inner", "UnrecognizedWithInner_Inner", 1) + `,`, + `Field2:` + valueToStringThetest(this.Field2) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *UnrecognizedWithInner_Inner) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&UnrecognizedWithInner_Inner{`, + `Field1:` + valueToStringThetest(this.Field1) + `,`, + `}`, + }, "") + return s +} +func (this *UnrecognizedWithEmbed) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&UnrecognizedWithEmbed{`, + `UnrecognizedWithEmbed_Embedded:` + strings.Replace(strings.Replace(this.UnrecognizedWithEmbed_Embedded.String(), "UnrecognizedWithEmbed_Embedded", "UnrecognizedWithEmbed_Embedded", 1), `&`, ``, 1) + `,`, + `Field2:` + valueToStringThetest(this.Field2) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *UnrecognizedWithEmbed_Embedded) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&UnrecognizedWithEmbed_Embedded{`, + `Field1:` + valueToStringThetest(this.Field1) + `,`, + `}`, + }, "") + return s +} +func (this *Node) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&Node{`, + `Label:` + valueToStringThetest(this.Label) + `,`, + `Children:` + strings.Replace(fmt.Sprintf("%v", this.Children), "Node", "Node", 1) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func valueToStringThetest(v interface{}) string { + rv := reflect.ValueOf(v) + if rv.IsNil() { + return "nil" + } + pv := reflect.Indirect(rv).Interface() + return fmt.Sprintf("*%v", pv) +} +func (this *NinOptNativeUnion) GetValue() interface{} { + if this.Field1 != nil { + return this.Field1 + } + if this.Field2 != nil { + return this.Field2 + } + if this.Field3 != nil { + return this.Field3 + } + if this.Field4 != nil { + return this.Field4 + } + if this.Field5 != nil { + return this.Field5 + } + if this.Field6 != nil { + return this.Field6 + } + if this.Field13 != nil { + return this.Field13 + } + if this.Field14 != nil { + return this.Field14 + } + if this.Field15 != nil { + return this.Field15 + } + return nil +} + +func (this *NinOptNativeUnion) SetValue(value interface{}) bool { + switch vt := value.(type) { + case *float64: + this.Field1 = vt + case *float32: + this.Field2 = vt + case *int32: + this.Field3 = vt + case *int64: + this.Field4 = vt + case *uint32: + this.Field5 = vt + case *uint64: + this.Field6 = vt + case *bool: + this.Field13 = vt + case *string: + this.Field14 = vt + case []byte: + this.Field15 = vt + default: + return false + } + return true +} +func (this *NinOptStructUnion) GetValue() interface{} { + if this.Field1 != nil { + return this.Field1 + } + if this.Field2 != nil { + return this.Field2 + } + if this.Field3 != nil { + return this.Field3 + } + if this.Field4 != nil { + return this.Field4 + } + if this.Field6 != nil { + return this.Field6 + } + if this.Field7 != nil { + return this.Field7 + } + if this.Field13 != nil { + return this.Field13 + } + if this.Field14 != nil { + return this.Field14 + } + if this.Field15 != nil { + return this.Field15 + } + return nil +} + +func (this *NinOptStructUnion) SetValue(value interface{}) bool { + switch vt := value.(type) { + case *float64: + this.Field1 = vt + case *float32: + this.Field2 = vt + case *NidOptNative: + this.Field3 = vt + case *NinOptNative: + this.Field4 = vt + case *uint64: + this.Field6 = vt + case *int32: + this.Field7 = vt + case *bool: + this.Field13 = vt + case *string: + this.Field14 = vt + case []byte: + this.Field15 = vt + default: + return false + } + return true +} +func (this *NinEmbeddedStructUnion) GetValue() interface{} { + if this.NidOptNative != nil { + return this.NidOptNative + } + if this.Field200 != nil { + return this.Field200 + } + if this.Field210 != nil { + return this.Field210 + } + return nil +} + +func (this *NinEmbeddedStructUnion) SetValue(value interface{}) bool { + switch vt := value.(type) { + case *NidOptNative: + this.NidOptNative = vt + case *NinOptNative: + this.Field200 = vt + case *bool: + this.Field210 = vt + default: + return false + } + return true +} +func (this *NinNestedStructUnion) GetValue() interface{} { + if this.Field1 != nil { + return this.Field1 + } + if this.Field2 != nil { + return this.Field2 + } + if this.Field3 != nil { + return this.Field3 + } + return nil +} + +func (this *NinNestedStructUnion) SetValue(value interface{}) bool { + switch vt := value.(type) { + case *NinOptNativeUnion: + this.Field1 = vt + case *NinOptStructUnion: + this.Field2 = vt + case *NinEmbeddedStructUnion: + this.Field3 = vt + default: + this.Field1 = new(NinOptNativeUnion) + if set := this.Field1.SetValue(value); set { + return true + } + this.Field1 = nil + this.Field2 = new(NinOptStructUnion) + if set := this.Field2.SetValue(value); set { + return true + } + this.Field2 = nil + this.Field3 = new(NinEmbeddedStructUnion) + if set := this.Field3.SetValue(value); set { + return true + } + this.Field3 = nil + return false + } + return true +} +func (this *Tree) GetValue() interface{} { + if this.Or != nil { + return this.Or + } + if this.And != nil { + return this.And + } + if this.Leaf != nil { + return this.Leaf + } + return nil +} + +func (this *Tree) SetValue(value interface{}) bool { + switch vt := value.(type) { + case *OrBranch: + this.Or = vt + case *AndBranch: + this.And = vt + case *Leaf: + this.Leaf = vt + default: + return false + } + return true +} +func (this *DeepTree) GetValue() interface{} { + if this.Down != nil { + return this.Down + } + if this.And != nil { + return this.And + } + if this.Leaf != nil { + return this.Leaf + } + return nil +} + +func (this *DeepTree) SetValue(value interface{}) bool { + switch vt := value.(type) { + case *ADeepBranch: + this.Down = vt + case *AndDeepBranch: + this.And = vt + case *DeepLeaf: + this.Leaf = vt + default: + return false + } + return true +} +func (this *CustomNameNinEmbeddedStructUnion) GetValue() interface{} { + if this.NidOptNative != nil { + return this.NidOptNative + } + if this.FieldA != nil { + return this.FieldA + } + if this.FieldB != nil { + return this.FieldB + } + return nil +} + +func (this *CustomNameNinEmbeddedStructUnion) SetValue(value interface{}) bool { + switch vt := value.(type) { + case *NidOptNative: + this.NidOptNative = vt + case *NinOptNative: + this.FieldA = vt + case *bool: + this.FieldB = vt + default: + return false + } + return true +} + +var fileDescriptorThetest = []byte{ + // 2996 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xcc, 0x5a, 0x4f, 0x6c, 0x1b, 0xc7, + 0xf5, 0xd6, 0xee, 0x90, 0x32, 0x35, 0xa2, 0x24, 0x7a, 0x13, 0x33, 0x0b, 0x46, 0x3f, 0x49, 0xde, + 0x1f, 0xa3, 0x2a, 0x84, 0x2d, 0x91, 0x14, 0x25, 0xcb, 0x4c, 0x93, 0x42, 0xfc, 0xe3, 0xda, 0xae, + 0x45, 0x19, 0x8c, 0xdc, 0xd6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0x85, 0x2a, 0x50, 0xe1, 0x92, 0x80, 0x6b, 0xac, 0xa9, 0x1f, 0xf9, 0xd4, 0x18, 0x18, 0x58, 0x63, + 0x60, 0x60, 0x8d, 0x81, 0x81, 0x35, 0x06, 0x06, 0xd6, 0x18, 0x18, 0x58, 0x63, 0x60, 0x60, 0x8d, + 0x81, 0x81, 0x35, 0x06, 0x06, 0xd6, 0x18, 0x18, 0x5c, 0x63, 0x20, 0xa4, 0xc6, 0x40, 0x48, 0x8d, + 0x81, 0x90, 0x1a, 0x03, 0x21, 0x35, 0x06, 0x42, 0x6a, 0x0c, 0x04, 0xd6, 0x98, 0x4b, 0x6f, 0x9a, + 0xa7, 0xd7, 0xb7, 0xc6, 0x40, 0x40, 0x8d, 0x81, 0x80, 0x1a, 0x03, 0x01, 0x35, 0x06, 0x02, 0x6a, + 0x0c, 0x04, 0xd4, 0x18, 0x08, 0xa8, 0x31, 0x10, 0x50, 0x63, 0x20, 0xa8, 0xc6, 0x40, 0x60, 0x8d, + 0x81, 0xc0, 0x1a, 0x03, 0x81, 0x35, 0x06, 0x02, 0x6b, 0x0c, 0x04, 0xd6, 0x18, 0x60, 0x6b, 0xec, + 0x4f, 0x00, 0x2a, 0x4e, 0x8d, 0xdd, 0x6e, 0xed, 0xfc, 0x40, 0x6f, 0x63, 0x2a, 0x66, 0x84, 0x4a, + 0x1b, 0xb5, 0xa8, 0x4b, 0xb9, 0x94, 0xcc, 0x08, 0xb5, 0xc6, 0xe3, 0x45, 0x8a, 0x93, 0x6a, 0xe3, + 0xf1, 0x65, 0x8a, 0x93, 0x7a, 0xe3, 0xf1, 0x12, 0xc5, 0x49, 0xc5, 0xf1, 0xf8, 0x0a, 0xc5, 0x49, + 0xcd, 0xf1, 0xf8, 0x2a, 0xc5, 0x49, 0xd5, 0xf1, 0xf8, 0x15, 0x8a, 0x93, 0xba, 0xe3, 0xf1, 0x35, + 0x8a, 0x93, 0xca, 0xe3, 0xf1, 0xab, 0xca, 0x9c, 0x58,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d, 0xa4, + 0xa6, 0x09, 0x52, 0x83, 0x3e, 0x32, 0xd3, 0x04, 0x99, 0x41, 0x1f, 0x89, 0x69, 0x82, 0xc4, 0xa0, + 0x8f, 0xbc, 0x34, 0x41, 0x5e, 0xd0, 0x47, 0x5a, 0x59, 0x51, 0x5a, 0xd0, 0x4f, 0x56, 0x59, 0x51, + 0x56, 0xd0, 0x4f, 0x52, 0xff, 0x2f, 0x4a, 0x6a, 0x0c, 0x59, 0xc5, 0xad, 0x43, 0x8c, 0x9a, 0xb2, + 0xa2, 0x9a, 0xa0, 0x9f, 0x92, 0xb2, 0xa2, 0x92, 0xa0, 0x9f, 0x8a, 0xb2, 0xa2, 0x8a, 0xa0, 0x9f, + 0x82, 0x9e, 0x88, 0x0a, 0x72, 0xb7, 0xf8, 0x68, 0xc2, 0x8a, 0x62, 0x98, 0x82, 0x40, 0x04, 0x05, + 0x81, 0x08, 0x0a, 0x02, 0x11, 0x14, 0x04, 0x22, 0x28, 0x08, 0x44, 0x50, 0x10, 0x88, 0xa0, 0x20, + 0x10, 0x41, 0x41, 0x20, 0x8a, 0x82, 0x40, 0x24, 0x05, 0x81, 0x20, 0x05, 0x65, 0xc5, 0x0d, 0x0f, + 0xd0, 0x6f, 0x42, 0xca, 0x8a, 0x2b, 0x9f, 0xe1, 0x12, 0x02, 0x91, 0x24, 0x04, 0x82, 0x24, 0xf4, + 0x11, 0x6a, 0xa4, 0x38, 0x09, 0xe1, 0xe5, 0xa1, 0xb3, 0x9a, 0x81, 0x56, 0x23, 0xec, 0xaf, 0xf0, + 0xd3, 0xd4, 0x6a, 0x84, 0x35, 0xea, 0x41, 0x3a, 0xf3, 0xce, 0x42, 0xf5, 0x08, 0xb3, 0xd0, 0x35, + 0xaa, 0xa1, 0xd5, 0x08, 0xfb, 0x2e, 0xbc, 0xda, 0x5b, 0x1b, 0x34, 0x09, 0x5c, 0x8f, 0x34, 0x09, + 0xdc, 0x88, 0x34, 0x09, 0xdc, 0x74, 0x19, 0x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 0x02, 0x7d, 0xbf, 0xf7, 0xe9, 0xcc, 0xc8, 0x23, + 0xf4, 0x79, 0xfc, 0xe9, 0x8c, 0xf4, 0x9f, 0x00, 0x00, 0x00, 0xff, 0xff, 0x77, 0x4f, 0xfa, 0x9f, + 0x9c, 0x34, 0x00, 0x00, +} diff --git a/vendor/github.com/gogo/protobuf/test/thetest.proto b/vendor/github.com/gogo/protobuf/test/thetest.proto new file mode 100644 index 000000000..cced8ccc4 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/thetest.proto @@ -0,0 +1,624 @@ +// Copyright (c) 2013, Vastech SA (PTY) LTD. All rights reserved. +// http://github.com/gogo/protobuf/gogoproto +// +// 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 test; + +import "github.com/gogo/protobuf/gogoproto/gogo.proto"; + +option (gogoproto.goproto_stringer_all) = false; +option (gogoproto.goproto_enum_prefix_all) = false; +option (gogoproto.goproto_getters_all) = false; + +option (gogoproto.equal_all) = true; +option (gogoproto.verbose_equal_all) = true; +option (gogoproto.stringer_all) = true; +option (gogoproto.gostring_all) = true; +option (gogoproto.face_all) = true; +option (gogoproto.description_all) = true; + +option (gogoproto.testgen_all) = true; +option (gogoproto.populate_all) = true; +option (gogoproto.benchgen_all) = true; +option (gogoproto.unmarshaler_all) = false; +option (gogoproto.marshaler_all) = false; +option (gogoproto.sizer_all) = true; +option (gogoproto.protosizer_all) = false; + +option (gogoproto.goproto_enum_stringer_all) = false; +option (gogoproto.enum_stringer_all) = true; + +option (gogoproto.unsafe_marshaler_all) = false; +option (gogoproto.unsafe_unmarshaler_all) = false; + +option (gogoproto.compare_all) = true; + +message NidOptNative { + optional double Field1 = 1 [(gogoproto.nullable) = false]; + optional float Field2 = 2 [(gogoproto.nullable) = false]; + optional int32 Field3 = 3 [(gogoproto.nullable) = false]; + optional int64 Field4 = 4 [(gogoproto.nullable) = false]; + optional uint32 Field5 = 5 [(gogoproto.nullable) = false]; + optional uint64 Field6 = 6 [(gogoproto.nullable) = false]; + optional sint32 Field7 = 7 [(gogoproto.nullable) = false]; + optional sint64 Field8 = 8 [(gogoproto.nullable) = false]; + optional fixed32 Field9 = 9 [(gogoproto.nullable) = false]; + optional sfixed32 Field10 = 10 [(gogoproto.nullable) = false]; + optional fixed64 Field11 = 11 [(gogoproto.nullable) = false]; + optional sfixed64 Field12 = 12 [(gogoproto.nullable) = false]; + optional bool Field13 = 13 [(gogoproto.nullable) = false]; + optional string Field14 = 14 [(gogoproto.nullable) = false]; + optional bytes Field15 = 15 [(gogoproto.nullable) = false]; +} + +message NinOptNative { + optional double Field1 = 1; + optional float Field2 = 2; + optional int32 Field3 = 3; + optional int64 Field4 = 4; + optional uint32 Field5 = 5; + optional uint64 Field6 = 6; + optional sint32 Field7 = 7; + optional sint64 Field8 = 8; + optional fixed32 Field9 = 9; + optional sfixed32 Field10 = 10; + optional fixed64 Field11 = 11; + optional sfixed64 Field12 = 12; + optional bool Field13 = 13; + optional string Field14 = 14; + optional bytes Field15 = 15; +} + +message NidRepNative { + repeated double Field1 = 1 [(gogoproto.nullable) = false]; + repeated float Field2 = 2 [(gogoproto.nullable) = false]; + repeated int32 Field3 = 3 [(gogoproto.nullable) = false]; + repeated int64 Field4 = 4 [(gogoproto.nullable) = false]; + repeated uint32 Field5 = 5 [(gogoproto.nullable) = false]; + repeated uint64 Field6 = 6 [(gogoproto.nullable) = false]; + repeated sint32 Field7 = 7 [(gogoproto.nullable) = false]; + repeated sint64 Field8 = 8 [(gogoproto.nullable) = false]; + repeated fixed32 Field9 = 9 [(gogoproto.nullable) = false]; + repeated sfixed32 Field10 = 10 [(gogoproto.nullable) = false]; + repeated fixed64 Field11 = 11 [(gogoproto.nullable) = false]; + repeated sfixed64 Field12 = 12 [(gogoproto.nullable) = false]; + repeated bool Field13 = 13 [(gogoproto.nullable) = false]; + repeated string Field14 = 14 [(gogoproto.nullable) = false]; + repeated bytes Field15 = 15 [(gogoproto.nullable) = false]; +} + +message NinRepNative { + repeated double Field1 = 1; + repeated float Field2 = 2; + repeated int32 Field3 = 3; + repeated int64 Field4 = 4; + repeated uint32 Field5 = 5; + repeated uint64 Field6 = 6; + repeated sint32 Field7 = 7; + repeated sint64 Field8 = 8; + repeated fixed32 Field9 = 9; + repeated sfixed32 Field10 = 10; + repeated fixed64 Field11 = 11; + repeated sfixed64 Field12 = 12; + repeated bool Field13 = 13; + repeated string Field14 = 14; + repeated bytes Field15 = 15; +} + +message NidRepPackedNative { + repeated double Field1 = 1 [(gogoproto.nullable) = false, packed = true]; + repeated float Field2 = 2 [(gogoproto.nullable) = false, packed = true]; + repeated int32 Field3 = 3 [(gogoproto.nullable) = false, packed = true]; + repeated int64 Field4 = 4 [(gogoproto.nullable) = false, packed = true]; + repeated uint32 Field5 = 5 [(gogoproto.nullable) = false, packed = true]; + repeated uint64 Field6 = 6 [(gogoproto.nullable) = false, packed = true]; + repeated sint32 Field7 = 7 [(gogoproto.nullable) = false, packed = true]; + repeated sint64 Field8 = 8 [(gogoproto.nullable) = false, packed = true]; + repeated fixed32 Field9 = 9 [(gogoproto.nullable) = false, packed = true]; + repeated sfixed32 Field10 = 10 [(gogoproto.nullable) = false, packed = true]; + repeated fixed64 Field11 = 11 [(gogoproto.nullable) = false, packed = true]; + repeated sfixed64 Field12 = 12 [(gogoproto.nullable) = false, packed = true]; + repeated bool Field13 = 13 [(gogoproto.nullable) = false, packed = true]; +} + +message NinRepPackedNative { + repeated double Field1 = 1 [packed = true]; + repeated float Field2 = 2 [packed = true]; + repeated int32 Field3 = 3 [packed = true]; + repeated int64 Field4 = 4 [packed = true]; + repeated uint32 Field5 = 5 [packed = true]; + repeated uint64 Field6 = 6 [packed = true]; + repeated sint32 Field7 = 7 [packed = true]; + repeated sint64 Field8 = 8 [packed = true]; + repeated fixed32 Field9 = 9 [packed = true]; + repeated sfixed32 Field10 = 10 [packed = true]; + repeated fixed64 Field11 = 11 [packed = true]; + repeated sfixed64 Field12 = 12 [packed = true]; + repeated bool Field13 = 13 [packed = true]; +} + +message NidOptStruct { + optional double Field1 = 1 [(gogoproto.nullable) = false]; + optional float Field2 = 2 [(gogoproto.nullable) = false]; + optional NidOptNative Field3 = 3 [(gogoproto.nullable) = false]; + optional NinOptNative Field4 = 4 [(gogoproto.nullable) = false]; + optional uint64 Field6 = 6 [(gogoproto.nullable) = false]; + optional sint32 Field7 = 7 [(gogoproto.nullable) = false]; + optional NidOptNative Field8 = 8 [(gogoproto.nullable) = false]; + optional bool Field13 = 13 [(gogoproto.nullable) = false]; + optional string Field14 = 14 [(gogoproto.nullable) = false]; + optional bytes Field15 = 15 [(gogoproto.nullable) = false]; +} + +message NinOptStruct { + optional double Field1 = 1; + optional float Field2 = 2; + optional NidOptNative Field3 = 3; + optional NinOptNative Field4 = 4; + optional uint64 Field6 = 6; + optional sint32 Field7 = 7; + optional NidOptNative Field8 = 8; + optional bool Field13 = 13; + optional string Field14 = 14; + optional bytes Field15 = 15; +} + +message NidRepStruct { + repeated double Field1 = 1 [(gogoproto.nullable) = false]; + repeated float Field2 = 2 [(gogoproto.nullable) = false]; + repeated NidOptNative Field3 = 3 [(gogoproto.nullable) = false]; + repeated NinOptNative Field4 = 4 [(gogoproto.nullable) = false]; + repeated uint64 Field6 = 6 [(gogoproto.nullable) = false]; + repeated sint32 Field7 = 7 [(gogoproto.nullable) = false]; + repeated NidOptNative Field8 = 8 [(gogoproto.nullable) = false]; + repeated bool Field13 = 13 [(gogoproto.nullable) = false]; + repeated string Field14 = 14 [(gogoproto.nullable) = false]; + repeated bytes Field15 = 15 [(gogoproto.nullable) = false]; +} + +message NinRepStruct { + repeated double Field1 = 1; + repeated float Field2 = 2; + repeated NidOptNative Field3 = 3; + repeated NinOptNative Field4 = 4; + repeated uint64 Field6 = 6; + repeated sint32 Field7 = 7; + repeated NidOptNative Field8 = 8; + repeated bool Field13 = 13; + repeated string Field14 = 14; + repeated bytes Field15 = 15; +} + +message NidEmbeddedStruct { + optional NidOptNative Field1 = 1 [(gogoproto.embed) = true]; + optional NidOptNative Field200 = 200 [(gogoproto.nullable) = false]; + optional bool Field210 = 210 [(gogoproto.nullable) = false]; +} + +message NinEmbeddedStruct { + optional NidOptNative Field1 = 1 [(gogoproto.embed) = true]; + optional NidOptNative Field200 = 200; + optional bool Field210 = 210; +} + +message NidNestedStruct { + optional NidOptStruct Field1 = 1 [(gogoproto.nullable) = false]; + repeated NidRepStruct Field2 = 2 [(gogoproto.nullable) = false]; +} + +message NinNestedStruct { + optional NinOptStruct Field1 = 1; + repeated NinRepStruct Field2 = 2; +} + +message NidOptCustom { + optional bytes Id = 1 [(gogoproto.customtype) = "Uuid", (gogoproto.nullable) = false]; + optional bytes Value = 2 [(gogoproto.customtype) = "github.com/gogo/protobuf/test/custom.Uint128", (gogoproto.nullable) = false]; +} + +message CustomDash { + optional bytes Value = 1 [(gogoproto.customtype) = "github.com/gogo/protobuf/test/custom-dash-type.Bytes"]; +} + +message NinOptCustom { + optional bytes Id = 1 [(gogoproto.customtype) = "Uuid"]; + optional bytes Value = 2 [(gogoproto.customtype) = "github.com/gogo/protobuf/test/custom.Uint128"]; +} + +message NidRepCustom { + repeated bytes Id = 1 [(gogoproto.customtype) = "Uuid", (gogoproto.nullable) = false]; + repeated bytes Value = 2 [(gogoproto.customtype) = "github.com/gogo/protobuf/test/custom.Uint128", (gogoproto.nullable) = false]; +} + +message NinRepCustom { + repeated bytes Id = 1 [(gogoproto.customtype) = "Uuid"]; + repeated bytes Value = 2 [(gogoproto.customtype) = "github.com/gogo/protobuf/test/custom.Uint128"]; +} + +message NinOptNativeUnion { + option (gogoproto.onlyone) = true; + optional double Field1 = 1; + optional float Field2 = 2; + optional int32 Field3 = 3; + optional int64 Field4 = 4; + optional uint32 Field5 = 5; + optional uint64 Field6 = 6; + optional bool Field13 = 13; + optional string Field14 = 14; + optional bytes Field15 = 15; +} + +message NinOptStructUnion { + option (gogoproto.onlyone) = true; + optional double Field1 = 1; + optional float Field2 = 2; + optional NidOptNative Field3 = 3; + optional NinOptNative Field4 = 4; + optional uint64 Field6 = 6; + optional sint32 Field7 = 7; + optional bool Field13 = 13; + optional string Field14 = 14; + optional bytes Field15 = 15; +} + +message NinEmbeddedStructUnion { + option (gogoproto.onlyone) = true; + optional NidOptNative Field1 = 1 [(gogoproto.embed) = true]; + optional NinOptNative Field200 = 200; + optional bool Field210 = 210; +} + +message NinNestedStructUnion { + option (gogoproto.onlyone) = true; + optional NinOptNativeUnion Field1 = 1; + optional NinOptStructUnion Field2 = 2; + optional NinEmbeddedStructUnion Field3 = 3; +} + +message Tree { + option (gogoproto.onlyone) = true; + optional OrBranch Or = 1; + optional AndBranch And = 2; + optional Leaf Leaf = 3; +} + +message OrBranch { + optional Tree Left = 1 [(gogoproto.nullable) = false]; + optional Tree Right = 2 [(gogoproto.nullable) = false]; +} + +message AndBranch { + optional Tree Left = 1 [(gogoproto.nullable) = false]; + optional Tree Right = 2 [(gogoproto.nullable) = false]; +} + +message Leaf { + optional int64 Value = 1 [(gogoproto.nullable) = false]; + optional string StrValue = 2 [(gogoproto.nullable) = false]; +} + +message DeepTree { + option (gogoproto.onlyone) = true; + optional ADeepBranch Down = 1; + optional AndDeepBranch And = 2; + optional DeepLeaf Leaf = 3; +} + +message ADeepBranch { + optional DeepTree Down = 2 [(gogoproto.nullable) = false]; +} + +message AndDeepBranch { + optional DeepTree Left = 1 [(gogoproto.nullable) = false]; + optional DeepTree Right = 2 [(gogoproto.nullable) = false]; +} + +message DeepLeaf { + optional Tree Tree = 1 [(gogoproto.nullable) = false]; +} + +message Nil { + +} + +enum TheTestEnum { + A = 0; + B = 1; + C = 2; +} + +enum AnotherTestEnum { + option (gogoproto.goproto_enum_prefix) = false; + D = 10; + E = 11; +} + +// YetAnotherTestEnum is used to test cross-package import of custom name +// fields and default resolution. +enum YetAnotherTestEnum { + option (gogoproto.goproto_enum_prefix) = false; + AA = 0; + BB = 1 [(gogoproto.enumvalue_customname) = "BetterYetBB"]; +} + +// YetAnotherTestEnum is used to test cross-package import of custom name +// fields and default resolution. +enum YetYetAnotherTestEnum { + option (gogoproto.goproto_enum_prefix) = true; + CC = 0; + DD = 1 [(gogoproto.enumvalue_customname) = "BetterYetDD"]; +} + +message NidOptEnum { + optional TheTestEnum Field1 = 1 [(gogoproto.nullable) = false]; +} + +message NinOptEnum { + optional TheTestEnum Field1 = 1; + optional YetAnotherTestEnum Field2 = 2; + optional YetYetAnotherTestEnum Field3 = 3; +} + +message NidRepEnum { + repeated TheTestEnum Field1 = 1 [(gogoproto.nullable) = false]; + repeated YetAnotherTestEnum Field2 = 2 [(gogoproto.nullable) = false]; + repeated YetYetAnotherTestEnum Field3 = 3 [(gogoproto.nullable) = false]; +} + +message NinRepEnum { + repeated TheTestEnum Field1 = 1; + repeated YetAnotherTestEnum Field2 = 2; + repeated YetYetAnotherTestEnum Field3 = 3; +} + +message NinOptEnumDefault { + option (gogoproto.goproto_getters) = true; + option (gogoproto.face) = false; + optional TheTestEnum Field1 = 1 [default=C]; + optional YetAnotherTestEnum Field2 = 2 [default=BB]; + optional YetYetAnotherTestEnum Field3 = 3 [default=CC]; +} + +message AnotherNinOptEnum { + optional AnotherTestEnum Field1 = 1; + optional YetAnotherTestEnum Field2 = 2; + optional YetYetAnotherTestEnum Field3 = 3; +} + +message AnotherNinOptEnumDefault { + option (gogoproto.goproto_getters) = true; + option (gogoproto.face) = false; + optional AnotherTestEnum Field1 = 1 [default=E]; + optional YetAnotherTestEnum Field2 = 2 [default=BB]; + optional YetYetAnotherTestEnum Field3 = 3 [default=CC]; +} + + +message Timer { + optional sfixed64 Time1 = 1 [(gogoproto.nullable) = false]; + optional sfixed64 Time2 = 2 [(gogoproto.nullable) = false]; + optional bytes Data = 3 [(gogoproto.nullable) = false]; +} + +message MyExtendable { + option (gogoproto.face) = false; + optional int64 Field1 = 1; + extensions 100 to 199; +} + +extend MyExtendable { + optional double FieldA = 100; + optional NinOptNative FieldB = 101; + optional NinEmbeddedStruct FieldC = 102; + repeated int64 FieldD = 104; + repeated NinOptNative FieldE = 105; +} + +message OtherExtenable { + option (gogoproto.face) = false; + optional int64 Field2 = 2; + extensions 14 to 16; + optional int64 Field13 = 13; + extensions 10 to 12; + optional MyExtendable M = 1; +} + +message NestedDefinition { + optional int64 Field1 = 1; + message NestedMessage { + optional fixed64 NestedField1 = 1; + optional NestedNestedMsg NNM = 2; + message NestedNestedMsg { + optional string NestedNestedField1 = 10; + } + } + enum NestedEnum { + TYPE_NESTED = 1; + } + optional NestedEnum EnumField = 2; + optional NestedMessage.NestedNestedMsg NNM = 3; + optional NestedMessage NM = 4; +} + +message NestedScope { + optional NestedDefinition.NestedMessage.NestedNestedMsg A = 1; + optional NestedDefinition.NestedEnum B = 2; + optional NestedDefinition.NestedMessage C = 3; +} + +message NinOptNativeDefault { + option (gogoproto.goproto_getters) = true; + option (gogoproto.face) = false; + optional double Field1 = 1 [default = 1234.1234]; + optional float Field2 = 2 [default = 1234.1234]; + optional int32 Field3 = 3 [default = 1234]; + optional int64 Field4 = 4 [default = 1234]; + optional uint32 Field5 = 5 [default = 1234]; + optional uint64 Field6 = 6 [default = 1234]; + optional sint32 Field7 = 7 [default = 1234]; + optional sint64 Field8 = 8 [default = 1234]; + optional fixed32 Field9 = 9 [default = 1234]; + optional sfixed32 Field10 = 10 [default = 1234]; + optional fixed64 Field11 = 11 [default = 1234]; + optional sfixed64 Field12 = 12 [default = 1234]; + optional bool Field13 = 13 [default = true]; + optional string Field14 = 14 [default = "1234"]; + optional bytes Field15 = 15; +} + +message CustomContainer { + optional NidOptCustom CustomStruct = 1 [(gogoproto.nullable) = false]; +} + +message CustomNameNidOptNative { + optional double Field1 = 1 [(gogoproto.nullable) = false, (gogoproto.customname) = "FieldA"]; + optional float Field2 = 2 [(gogoproto.nullable) = false, (gogoproto.customname) = "FieldB"]; + optional int32 Field3 = 3 [(gogoproto.nullable) = false, (gogoproto.customname) = "FieldC"]; + optional int64 Field4 = 4 [(gogoproto.nullable) = false, (gogoproto.customname) = "FieldD"]; + optional uint32 Field5 = 5 [(gogoproto.nullable) = false, (gogoproto.customname) = "FieldE"]; + optional uint64 Field6 = 6 [(gogoproto.nullable) = false, (gogoproto.customname) = "FieldF"]; + optional sint32 Field7 = 7 [(gogoproto.nullable) = false, (gogoproto.customname) = "FieldG"]; + optional sint64 Field8 = 8 [(gogoproto.nullable) = false, (gogoproto.customname) = "FieldH"]; + optional fixed32 Field9 = 9 [(gogoproto.nullable) = false, (gogoproto.customname) = "FieldI"]; + optional sfixed32 Field10 = 10 [(gogoproto.nullable) = false, (gogoproto.customname) = "FieldJ"]; + optional fixed64 Field11 = 11 [(gogoproto.nullable) = false, (gogoproto.customname) = "FieldK"]; + optional sfixed64 Field12 = 12 [(gogoproto.nullable) = false, (gogoproto.customname) = "FieldL"]; + optional bool Field13 = 13 [(gogoproto.nullable) = false, (gogoproto.customname) = "FieldM"]; + optional string Field14 = 14 [(gogoproto.nullable) = false, (gogoproto.customname) = "FieldN"]; + optional bytes Field15 = 15 [(gogoproto.nullable) = false, (gogoproto.customname) = "FieldO"]; +} + +message CustomNameNinOptNative { + optional double Field1 = 1 [(gogoproto.customname) = "FieldA"]; + optional float Field2 = 2 [(gogoproto.customname) = "FieldB"]; + optional int32 Field3 = 3 [(gogoproto.customname) = "FieldC"]; + optional int64 Field4 = 4 [(gogoproto.customname) = "FieldD"]; + optional uint32 Field5 = 5 [(gogoproto.customname) = "FieldE"]; + optional uint64 Field6 = 6 [(gogoproto.customname) = "FieldF"]; + optional sint32 Field7 = 7 [(gogoproto.customname) = "FieldG"]; + optional sint64 Field8 = 8 [(gogoproto.customname) = "FieldH"]; + optional fixed32 Field9 = 9 [(gogoproto.customname) = "FieldI"]; + optional sfixed32 Field10 = 10 [(gogoproto.customname) = "FieldJ"]; + optional fixed64 Field11 = 11 [(gogoproto.customname) = "FieldK"]; + optional sfixed64 Field12 = 12 [(gogoproto.customname) = "FielL"]; + optional bool Field13 = 13 [(gogoproto.customname) = "FieldM"]; + optional string Field14 = 14 [(gogoproto.customname) = "FieldN"]; + optional bytes Field15 = 15 [(gogoproto.customname) = "FieldO"]; +} + +message CustomNameNinRepNative { + repeated double Field1 = 1 [(gogoproto.customname) = "FieldA"]; + repeated float Field2 = 2 [(gogoproto.customname) = "FieldB"]; + repeated int32 Field3 = 3 [(gogoproto.customname) = "FieldC"]; + repeated int64 Field4 = 4 [(gogoproto.customname) = "FieldD"]; + repeated uint32 Field5 = 5 [(gogoproto.customname) = "FieldE"]; + repeated uint64 Field6 = 6 [(gogoproto.customname) = "FieldF"]; + repeated sint32 Field7 = 7 [(gogoproto.customname) = "FieldG"]; + repeated sint64 Field8 = 8 [(gogoproto.customname) = "FieldH"]; + repeated fixed32 Field9 = 9 [(gogoproto.customname) = "FieldI"]; + repeated sfixed32 Field10 = 10 [(gogoproto.customname) = "FieldJ"]; + repeated fixed64 Field11 = 11 [(gogoproto.customname) = "FieldK"]; + repeated sfixed64 Field12 = 12 [(gogoproto.customname) = "FieldL"]; + repeated bool Field13 = 13 [(gogoproto.customname) = "FieldM"]; + repeated string Field14 = 14 [(gogoproto.customname) = "FieldN"]; + repeated bytes Field15 = 15 [(gogoproto.customname) = "FieldO"]; +} + +message CustomNameNinStruct { + optional double Field1 = 1 [(gogoproto.customname) = "FieldA"]; + optional float Field2 = 2 [(gogoproto.customname) = "FieldB"]; + optional NidOptNative Field3 = 3 [(gogoproto.customname) = "FieldC"]; + repeated NinOptNative Field4 = 4 [(gogoproto.customname) = "FieldD"]; + optional uint64 Field6 = 6 [(gogoproto.customname) = "FieldE"]; + optional sint32 Field7 = 7 [(gogoproto.customname) = "FieldF"]; + optional NidOptNative Field8 = 8 [(gogoproto.customname) = "FieldG"]; + optional bool Field13 = 13 [(gogoproto.customname) = "FieldH"]; + optional string Field14 = 14 [(gogoproto.customname) = "FieldI"]; + optional bytes Field15 = 15 [(gogoproto.customname) = "FieldJ"]; +} + +message CustomNameCustomType { + optional bytes Id = 1 [(gogoproto.customname) = "FieldA", (gogoproto.customtype) = "Uuid"]; + optional bytes Value = 2 [(gogoproto.customname) = "FieldB", (gogoproto.customtype) = "github.com/gogo/protobuf/test/custom.Uint128"]; + repeated bytes Ids = 3 [(gogoproto.customname) = "FieldC", (gogoproto.customtype) = "Uuid"]; + repeated bytes Values = 4 [(gogoproto.customname) = "FieldD", (gogoproto.customtype) = "github.com/gogo/protobuf/test/custom.Uint128"]; +} + +message CustomNameNinEmbeddedStructUnion { + option (gogoproto.onlyone) = true; + optional NidOptNative Field1 = 1 [(gogoproto.embed) = true]; + optional NinOptNative Field200 = 200 [(gogoproto.customname) = "FieldA"]; + optional bool Field210 = 210 [(gogoproto.customname) = "FieldB"]; +} + +message CustomNameEnum { + optional TheTestEnum Field1 = 1 [(gogoproto.customname) = "FieldA"]; + repeated TheTestEnum Field2 = 2 [(gogoproto.customname) = "FieldB"]; +} + +message NoExtensionsMap { + option (gogoproto.face) = false; + option (gogoproto.goproto_extensions_map) = false; + optional int64 Field1 = 1; + extensions 100 to 199; +} + +extend NoExtensionsMap { + optional double FieldA1 = 100; + optional NinOptNative FieldB1 = 101; + optional NinEmbeddedStruct FieldC1 = 102; +} + +message Unrecognized { + option (gogoproto.goproto_unrecognized) = false; + optional string Field1 = 1; +} + +message UnrecognizedWithInner { + message Inner { + option (gogoproto.goproto_unrecognized) = false; + optional uint32 Field1 = 1; + } + + repeated Inner embedded = 1; + optional string Field2 = 2; +} + +message UnrecognizedWithEmbed { + message Embedded { + option (gogoproto.goproto_unrecognized) = false; + optional uint32 Field1 = 1; + } + + optional Embedded embedded = 1 [(gogoproto.embed) = true, (gogoproto.nullable) = false]; + optional string Field2 = 2; +} + +message Node { + optional string Label = 1; + repeated Node Children = 2; +} + diff --git a/vendor/github.com/gogo/protobuf/test/thetestpb_test.go b/vendor/github.com/gogo/protobuf/test/thetestpb_test.go new file mode 100644 index 000000000..27011c6bd --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/thetestpb_test.go @@ -0,0 +1,14637 @@ +// Code generated by protoc-gen-gogo. +// source: thetest.proto +// DO NOT EDIT! + +/* +Package test is a generated protocol buffer package. + +It is generated from these files: + thetest.proto + +It has these top-level messages: + NidOptNative + NinOptNative + NidRepNative + NinRepNative + NidRepPackedNative + NinRepPackedNative + NidOptStruct + NinOptStruct + NidRepStruct + NinRepStruct + NidEmbeddedStruct + NinEmbeddedStruct + NidNestedStruct + NinNestedStruct + NidOptCustom + CustomDash + NinOptCustom + NidRepCustom + NinRepCustom + NinOptNativeUnion + NinOptStructUnion + NinEmbeddedStructUnion + NinNestedStructUnion + Tree + OrBranch + AndBranch + Leaf + DeepTree + ADeepBranch + AndDeepBranch + DeepLeaf + Nil + NidOptEnum + NinOptEnum + NidRepEnum + NinRepEnum + NinOptEnumDefault + AnotherNinOptEnum + AnotherNinOptEnumDefault + Timer + MyExtendable + OtherExtenable + NestedDefinition + NestedScope + NinOptNativeDefault + CustomContainer + CustomNameNidOptNative + CustomNameNinOptNative + CustomNameNinRepNative + CustomNameNinStruct + CustomNameCustomType + CustomNameNinEmbeddedStructUnion + CustomNameEnum + NoExtensionsMap + Unrecognized + UnrecognizedWithInner + UnrecognizedWithEmbed + Node +*/ +package test + +import testing "testing" +import math_rand "math/rand" +import time "time" +import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" +import github_com_gogo_protobuf_jsonpb "github.com/gogo/protobuf/jsonpb" +import fmt "fmt" +import go_parser "go/parser" +import proto "github.com/gogo/protobuf/proto" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +func TestNidOptNativeProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidOptNative(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidOptNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkNidOptNativeProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NidOptNative, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNidOptNative(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNidOptNativeProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNidOptNative(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &NidOptNative{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinOptNativeProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptNative(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinOptNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkNinOptNativeProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinOptNative, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNinOptNative(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNinOptNativeProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinOptNative(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &NinOptNative{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNidRepNativeProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepNative(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidRepNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkNidRepNativeProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NidRepNative, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNidRepNative(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNidRepNativeProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNidRepNative(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &NidRepNative{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinRepNativeProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepNative(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinRepNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkNinRepNativeProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinRepNative, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNinRepNative(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNinRepNativeProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinRepNative(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &NinRepNative{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNidRepPackedNativeProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepPackedNative(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidRepPackedNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkNidRepPackedNativeProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NidRepPackedNative, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNidRepPackedNative(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNidRepPackedNativeProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNidRepPackedNative(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &NidRepPackedNative{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinRepPackedNativeProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepPackedNative(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinRepPackedNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkNinRepPackedNativeProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinRepPackedNative, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNinRepPackedNative(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNinRepPackedNativeProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinRepPackedNative(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &NinRepPackedNative{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNidOptStructProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidOptStruct(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidOptStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkNidOptStructProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NidOptStruct, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNidOptStruct(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNidOptStructProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNidOptStruct(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &NidOptStruct{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinOptStructProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptStruct(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinOptStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkNinOptStructProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinOptStruct, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNinOptStruct(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNinOptStructProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinOptStruct(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &NinOptStruct{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNidRepStructProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepStruct(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidRepStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkNidRepStructProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NidRepStruct, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNidRepStruct(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNidRepStructProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNidRepStruct(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &NidRepStruct{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinRepStructProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepStruct(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinRepStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkNinRepStructProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinRepStruct, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNinRepStruct(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNinRepStructProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinRepStruct(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &NinRepStruct{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNidEmbeddedStructProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidEmbeddedStruct(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidEmbeddedStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkNidEmbeddedStructProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NidEmbeddedStruct, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNidEmbeddedStruct(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNidEmbeddedStructProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNidEmbeddedStruct(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &NidEmbeddedStruct{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinEmbeddedStructProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinEmbeddedStruct(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinEmbeddedStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkNinEmbeddedStructProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinEmbeddedStruct, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNinEmbeddedStruct(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNinEmbeddedStructProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinEmbeddedStruct(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &NinEmbeddedStruct{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNidNestedStructProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidNestedStruct(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidNestedStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkNidNestedStructProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NidNestedStruct, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNidNestedStruct(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNidNestedStructProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNidNestedStruct(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &NidNestedStruct{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinNestedStructProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinNestedStruct(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinNestedStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkNinNestedStructProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinNestedStruct, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNinNestedStruct(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNinNestedStructProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinNestedStruct(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &NinNestedStruct{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNidOptCustomProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidOptCustom(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidOptCustom{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkNidOptCustomProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NidOptCustom, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNidOptCustom(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNidOptCustomProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNidOptCustom(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &NidOptCustom{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestCustomDashProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomDash(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &CustomDash{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkCustomDashProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*CustomDash, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedCustomDash(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkCustomDashProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedCustomDash(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &CustomDash{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinOptCustomProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptCustom(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinOptCustom{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkNinOptCustomProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinOptCustom, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNinOptCustom(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNinOptCustomProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinOptCustom(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &NinOptCustom{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNidRepCustomProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepCustom(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidRepCustom{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkNidRepCustomProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NidRepCustom, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNidRepCustom(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNidRepCustomProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNidRepCustom(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &NidRepCustom{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinRepCustomProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepCustom(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinRepCustom{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkNinRepCustomProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinRepCustom, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNinRepCustom(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNinRepCustomProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinRepCustom(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &NinRepCustom{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinOptNativeUnionProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptNativeUnion(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinOptNativeUnion{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkNinOptNativeUnionProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinOptNativeUnion, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNinOptNativeUnion(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNinOptNativeUnionProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinOptNativeUnion(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &NinOptNativeUnion{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinOptStructUnionProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptStructUnion(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinOptStructUnion{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkNinOptStructUnionProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinOptStructUnion, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNinOptStructUnion(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNinOptStructUnionProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinOptStructUnion(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &NinOptStructUnion{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinEmbeddedStructUnionProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinEmbeddedStructUnion(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinEmbeddedStructUnion{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkNinEmbeddedStructUnionProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinEmbeddedStructUnion, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNinEmbeddedStructUnion(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNinEmbeddedStructUnionProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinEmbeddedStructUnion(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &NinEmbeddedStructUnion{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinNestedStructUnionProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinNestedStructUnion(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinNestedStructUnion{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkNinNestedStructUnionProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinNestedStructUnion, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNinNestedStructUnion(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNinNestedStructUnionProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinNestedStructUnion(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &NinNestedStructUnion{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestTreeProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedTree(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Tree{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkTreeProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Tree, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedTree(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkTreeProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedTree(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &Tree{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestOrBranchProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedOrBranch(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &OrBranch{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkOrBranchProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*OrBranch, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedOrBranch(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkOrBranchProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedOrBranch(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &OrBranch{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestAndBranchProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAndBranch(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &AndBranch{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkAndBranchProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*AndBranch, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedAndBranch(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkAndBranchProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedAndBranch(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &AndBranch{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestLeafProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedLeaf(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Leaf{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkLeafProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Leaf, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedLeaf(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkLeafProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedLeaf(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &Leaf{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestDeepTreeProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedDeepTree(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &DeepTree{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkDeepTreeProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*DeepTree, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedDeepTree(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkDeepTreeProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedDeepTree(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &DeepTree{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestADeepBranchProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedADeepBranch(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &ADeepBranch{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkADeepBranchProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*ADeepBranch, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedADeepBranch(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkADeepBranchProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedADeepBranch(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &ADeepBranch{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestAndDeepBranchProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAndDeepBranch(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &AndDeepBranch{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkAndDeepBranchProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*AndDeepBranch, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedAndDeepBranch(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkAndDeepBranchProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedAndDeepBranch(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &AndDeepBranch{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestDeepLeafProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedDeepLeaf(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &DeepLeaf{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkDeepLeafProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*DeepLeaf, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedDeepLeaf(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkDeepLeafProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedDeepLeaf(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &DeepLeaf{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNilProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNil(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Nil{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkNilProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Nil, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNil(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNilProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNil(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &Nil{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNidOptEnumProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidOptEnum(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidOptEnum{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkNidOptEnumProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NidOptEnum, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNidOptEnum(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNidOptEnumProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNidOptEnum(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &NidOptEnum{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinOptEnumProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptEnum(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinOptEnum{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkNinOptEnumProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinOptEnum, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNinOptEnum(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNinOptEnumProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinOptEnum(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &NinOptEnum{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNidRepEnumProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepEnum(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidRepEnum{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkNidRepEnumProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NidRepEnum, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNidRepEnum(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNidRepEnumProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNidRepEnum(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &NidRepEnum{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinRepEnumProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepEnum(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinRepEnum{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkNinRepEnumProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinRepEnum, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNinRepEnum(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNinRepEnumProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinRepEnum(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &NinRepEnum{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinOptEnumDefaultProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptEnumDefault(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinOptEnumDefault{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkNinOptEnumDefaultProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinOptEnumDefault, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNinOptEnumDefault(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNinOptEnumDefaultProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinOptEnumDefault(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &NinOptEnumDefault{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestAnotherNinOptEnumProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAnotherNinOptEnum(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &AnotherNinOptEnum{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkAnotherNinOptEnumProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*AnotherNinOptEnum, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedAnotherNinOptEnum(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkAnotherNinOptEnumProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedAnotherNinOptEnum(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &AnotherNinOptEnum{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestAnotherNinOptEnumDefaultProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAnotherNinOptEnumDefault(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &AnotherNinOptEnumDefault{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkAnotherNinOptEnumDefaultProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*AnotherNinOptEnumDefault, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedAnotherNinOptEnumDefault(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkAnotherNinOptEnumDefaultProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedAnotherNinOptEnumDefault(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &AnotherNinOptEnumDefault{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestTimerProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedTimer(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Timer{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkTimerProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Timer, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedTimer(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkTimerProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedTimer(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &Timer{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestMyExtendableProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMyExtendable(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &MyExtendable{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkMyExtendableProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*MyExtendable, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedMyExtendable(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkMyExtendableProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedMyExtendable(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &MyExtendable{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestOtherExtenableProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedOtherExtenable(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &OtherExtenable{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkOtherExtenableProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*OtherExtenable, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedOtherExtenable(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkOtherExtenableProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedOtherExtenable(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &OtherExtenable{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNestedDefinitionProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNestedDefinition(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NestedDefinition{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkNestedDefinitionProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NestedDefinition, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNestedDefinition(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNestedDefinitionProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNestedDefinition(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &NestedDefinition{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNestedDefinition_NestedMessageProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNestedDefinition_NestedMessage(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NestedDefinition_NestedMessage{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkNestedDefinition_NestedMessageProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NestedDefinition_NestedMessage, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNestedDefinition_NestedMessage(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNestedDefinition_NestedMessageProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNestedDefinition_NestedMessage(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &NestedDefinition_NestedMessage{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNestedDefinition_NestedMessage_NestedNestedMsgProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NestedDefinition_NestedMessage_NestedNestedMsg{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkNestedDefinition_NestedMessage_NestedNestedMsgProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NestedDefinition_NestedMessage_NestedNestedMsg, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNestedDefinition_NestedMessage_NestedNestedMsgProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &NestedDefinition_NestedMessage_NestedNestedMsg{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNestedScopeProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNestedScope(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NestedScope{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkNestedScopeProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NestedScope, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNestedScope(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNestedScopeProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNestedScope(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &NestedScope{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinOptNativeDefaultProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptNativeDefault(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinOptNativeDefault{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkNinOptNativeDefaultProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinOptNativeDefault, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNinOptNativeDefault(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNinOptNativeDefaultProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinOptNativeDefault(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &NinOptNativeDefault{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestCustomContainerProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomContainer(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &CustomContainer{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkCustomContainerProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*CustomContainer, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedCustomContainer(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkCustomContainerProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedCustomContainer(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &CustomContainer{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestCustomNameNidOptNativeProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameNidOptNative(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &CustomNameNidOptNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkCustomNameNidOptNativeProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*CustomNameNidOptNative, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedCustomNameNidOptNative(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkCustomNameNidOptNativeProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedCustomNameNidOptNative(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &CustomNameNidOptNative{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestCustomNameNinOptNativeProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameNinOptNative(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &CustomNameNinOptNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkCustomNameNinOptNativeProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*CustomNameNinOptNative, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedCustomNameNinOptNative(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkCustomNameNinOptNativeProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedCustomNameNinOptNative(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &CustomNameNinOptNative{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestCustomNameNinRepNativeProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameNinRepNative(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &CustomNameNinRepNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkCustomNameNinRepNativeProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*CustomNameNinRepNative, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedCustomNameNinRepNative(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkCustomNameNinRepNativeProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedCustomNameNinRepNative(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &CustomNameNinRepNative{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestCustomNameNinStructProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameNinStruct(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &CustomNameNinStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkCustomNameNinStructProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*CustomNameNinStruct, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedCustomNameNinStruct(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkCustomNameNinStructProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedCustomNameNinStruct(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &CustomNameNinStruct{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestCustomNameCustomTypeProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameCustomType(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &CustomNameCustomType{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkCustomNameCustomTypeProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*CustomNameCustomType, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedCustomNameCustomType(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkCustomNameCustomTypeProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedCustomNameCustomType(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &CustomNameCustomType{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestCustomNameNinEmbeddedStructUnionProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameNinEmbeddedStructUnion(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &CustomNameNinEmbeddedStructUnion{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkCustomNameNinEmbeddedStructUnionProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*CustomNameNinEmbeddedStructUnion, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedCustomNameNinEmbeddedStructUnion(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkCustomNameNinEmbeddedStructUnionProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedCustomNameNinEmbeddedStructUnion(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &CustomNameNinEmbeddedStructUnion{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestCustomNameEnumProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameEnum(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &CustomNameEnum{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkCustomNameEnumProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*CustomNameEnum, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedCustomNameEnum(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkCustomNameEnumProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedCustomNameEnum(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &CustomNameEnum{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNoExtensionsMapProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNoExtensionsMap(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NoExtensionsMap{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkNoExtensionsMapProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NoExtensionsMap, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNoExtensionsMap(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNoExtensionsMapProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNoExtensionsMap(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &NoExtensionsMap{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestUnrecognizedProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUnrecognized(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Unrecognized{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkUnrecognizedProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Unrecognized, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedUnrecognized(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkUnrecognizedProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedUnrecognized(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &Unrecognized{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestUnrecognizedWithInnerProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUnrecognizedWithInner(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &UnrecognizedWithInner{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkUnrecognizedWithInnerProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*UnrecognizedWithInner, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedUnrecognizedWithInner(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkUnrecognizedWithInnerProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedUnrecognizedWithInner(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &UnrecognizedWithInner{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestUnrecognizedWithInner_InnerProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUnrecognizedWithInner_Inner(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &UnrecognizedWithInner_Inner{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkUnrecognizedWithInner_InnerProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*UnrecognizedWithInner_Inner, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedUnrecognizedWithInner_Inner(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkUnrecognizedWithInner_InnerProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedUnrecognizedWithInner_Inner(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &UnrecognizedWithInner_Inner{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestUnrecognizedWithEmbedProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUnrecognizedWithEmbed(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &UnrecognizedWithEmbed{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkUnrecognizedWithEmbedProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*UnrecognizedWithEmbed, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedUnrecognizedWithEmbed(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkUnrecognizedWithEmbedProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedUnrecognizedWithEmbed(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &UnrecognizedWithEmbed{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestUnrecognizedWithEmbed_EmbeddedProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUnrecognizedWithEmbed_Embedded(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &UnrecognizedWithEmbed_Embedded{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkUnrecognizedWithEmbed_EmbeddedProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*UnrecognizedWithEmbed_Embedded, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedUnrecognizedWithEmbed_Embedded(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkUnrecognizedWithEmbed_EmbeddedProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedUnrecognizedWithEmbed_Embedded(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &UnrecognizedWithEmbed_Embedded{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNodeProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNode(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Node{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkNodeProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Node, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNode(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNodeProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNode(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &Node{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNidOptNativeJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidOptNative(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidOptNative{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNinOptNativeJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptNative(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinOptNative{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNidRepNativeJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepNative(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidRepNative{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNinRepNativeJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepNative(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinRepNative{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNidRepPackedNativeJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepPackedNative(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidRepPackedNative{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNinRepPackedNativeJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepPackedNative(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinRepPackedNative{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNidOptStructJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidOptStruct(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidOptStruct{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNinOptStructJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptStruct(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinOptStruct{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNidRepStructJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepStruct(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidRepStruct{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNinRepStructJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepStruct(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinRepStruct{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNidEmbeddedStructJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidEmbeddedStruct(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidEmbeddedStruct{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNinEmbeddedStructJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinEmbeddedStruct(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinEmbeddedStruct{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNidNestedStructJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidNestedStruct(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidNestedStruct{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNinNestedStructJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinNestedStruct(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinNestedStruct{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNidOptCustomJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidOptCustom(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidOptCustom{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestCustomDashJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomDash(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &CustomDash{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNinOptCustomJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptCustom(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinOptCustom{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNidRepCustomJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepCustom(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidRepCustom{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNinRepCustomJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepCustom(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinRepCustom{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNinOptNativeUnionJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptNativeUnion(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinOptNativeUnion{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNinOptStructUnionJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptStructUnion(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinOptStructUnion{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNinEmbeddedStructUnionJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinEmbeddedStructUnion(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinEmbeddedStructUnion{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNinNestedStructUnionJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinNestedStructUnion(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinNestedStructUnion{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestTreeJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedTree(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Tree{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestOrBranchJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedOrBranch(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &OrBranch{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestAndBranchJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAndBranch(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &AndBranch{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestLeafJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedLeaf(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Leaf{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestDeepTreeJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedDeepTree(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &DeepTree{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestADeepBranchJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedADeepBranch(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &ADeepBranch{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestAndDeepBranchJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAndDeepBranch(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &AndDeepBranch{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestDeepLeafJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedDeepLeaf(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &DeepLeaf{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNilJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNil(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Nil{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNidOptEnumJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidOptEnum(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidOptEnum{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNinOptEnumJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptEnum(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinOptEnum{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNidRepEnumJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepEnum(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidRepEnum{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNinRepEnumJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepEnum(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinRepEnum{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNinOptEnumDefaultJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptEnumDefault(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinOptEnumDefault{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestAnotherNinOptEnumJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAnotherNinOptEnum(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &AnotherNinOptEnum{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestAnotherNinOptEnumDefaultJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAnotherNinOptEnumDefault(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &AnotherNinOptEnumDefault{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestTimerJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedTimer(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Timer{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestMyExtendableJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMyExtendable(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &MyExtendable{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestOtherExtenableJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedOtherExtenable(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &OtherExtenable{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNestedDefinitionJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNestedDefinition(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NestedDefinition{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNestedDefinition_NestedMessageJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNestedDefinition_NestedMessage(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NestedDefinition_NestedMessage{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNestedDefinition_NestedMessage_NestedNestedMsgJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NestedDefinition_NestedMessage_NestedNestedMsg{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNestedScopeJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNestedScope(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NestedScope{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNinOptNativeDefaultJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptNativeDefault(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinOptNativeDefault{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestCustomContainerJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomContainer(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &CustomContainer{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestCustomNameNidOptNativeJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameNidOptNative(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &CustomNameNidOptNative{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestCustomNameNinOptNativeJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameNinOptNative(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &CustomNameNinOptNative{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestCustomNameNinRepNativeJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameNinRepNative(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &CustomNameNinRepNative{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestCustomNameNinStructJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameNinStruct(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &CustomNameNinStruct{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestCustomNameCustomTypeJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameCustomType(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &CustomNameCustomType{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestCustomNameNinEmbeddedStructUnionJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameNinEmbeddedStructUnion(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &CustomNameNinEmbeddedStructUnion{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestCustomNameEnumJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameEnum(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &CustomNameEnum{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNoExtensionsMapJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNoExtensionsMap(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NoExtensionsMap{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestUnrecognizedJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUnrecognized(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Unrecognized{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestUnrecognizedWithInnerJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUnrecognizedWithInner(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &UnrecognizedWithInner{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestUnrecognizedWithInner_InnerJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUnrecognizedWithInner_Inner(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &UnrecognizedWithInner_Inner{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestUnrecognizedWithEmbedJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUnrecognizedWithEmbed(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &UnrecognizedWithEmbed{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestUnrecognizedWithEmbed_EmbeddedJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUnrecognizedWithEmbed_Embedded(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &UnrecognizedWithEmbed_Embedded{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNodeJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNode(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Node{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNidOptNativeProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidOptNative(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NidOptNative{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNidOptNativeProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidOptNative(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NidOptNative{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinOptNativeProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptNative(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NinOptNative{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinOptNativeProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptNative(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NinOptNative{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNidRepNativeProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepNative(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NidRepNative{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNidRepNativeProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepNative(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NidRepNative{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinRepNativeProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepNative(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NinRepNative{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinRepNativeProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepNative(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NinRepNative{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNidRepPackedNativeProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepPackedNative(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NidRepPackedNative{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNidRepPackedNativeProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepPackedNative(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NidRepPackedNative{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinRepPackedNativeProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepPackedNative(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NinRepPackedNative{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinRepPackedNativeProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepPackedNative(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NinRepPackedNative{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNidOptStructProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidOptStruct(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NidOptStruct{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNidOptStructProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidOptStruct(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NidOptStruct{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinOptStructProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptStruct(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NinOptStruct{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinOptStructProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptStruct(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NinOptStruct{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNidRepStructProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepStruct(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NidRepStruct{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNidRepStructProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepStruct(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NidRepStruct{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinRepStructProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepStruct(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NinRepStruct{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinRepStructProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepStruct(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NinRepStruct{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNidEmbeddedStructProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidEmbeddedStruct(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NidEmbeddedStruct{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNidEmbeddedStructProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidEmbeddedStruct(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NidEmbeddedStruct{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinEmbeddedStructProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinEmbeddedStruct(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NinEmbeddedStruct{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinEmbeddedStructProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinEmbeddedStruct(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NinEmbeddedStruct{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNidNestedStructProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidNestedStruct(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NidNestedStruct{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNidNestedStructProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidNestedStruct(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NidNestedStruct{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinNestedStructProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinNestedStruct(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NinNestedStruct{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinNestedStructProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinNestedStruct(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NinNestedStruct{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNidOptCustomProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidOptCustom(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NidOptCustom{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNidOptCustomProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidOptCustom(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NidOptCustom{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestCustomDashProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomDash(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &CustomDash{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestCustomDashProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomDash(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &CustomDash{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinOptCustomProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptCustom(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NinOptCustom{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinOptCustomProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptCustom(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NinOptCustom{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNidRepCustomProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepCustom(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NidRepCustom{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNidRepCustomProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepCustom(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NidRepCustom{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinRepCustomProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepCustom(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NinRepCustom{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinRepCustomProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepCustom(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NinRepCustom{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinOptNativeUnionProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptNativeUnion(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NinOptNativeUnion{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinOptNativeUnionProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptNativeUnion(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NinOptNativeUnion{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinOptStructUnionProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptStructUnion(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NinOptStructUnion{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinOptStructUnionProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptStructUnion(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NinOptStructUnion{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinEmbeddedStructUnionProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinEmbeddedStructUnion(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NinEmbeddedStructUnion{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinEmbeddedStructUnionProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinEmbeddedStructUnion(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NinEmbeddedStructUnion{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinNestedStructUnionProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinNestedStructUnion(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NinNestedStructUnion{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinNestedStructUnionProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinNestedStructUnion(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NinNestedStructUnion{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestTreeProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedTree(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &Tree{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestTreeProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedTree(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &Tree{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestOrBranchProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedOrBranch(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &OrBranch{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestOrBranchProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedOrBranch(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &OrBranch{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestAndBranchProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAndBranch(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &AndBranch{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestAndBranchProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAndBranch(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &AndBranch{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestLeafProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedLeaf(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &Leaf{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestLeafProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedLeaf(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &Leaf{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestDeepTreeProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedDeepTree(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &DeepTree{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestDeepTreeProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedDeepTree(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &DeepTree{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestADeepBranchProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedADeepBranch(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &ADeepBranch{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestADeepBranchProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedADeepBranch(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &ADeepBranch{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestAndDeepBranchProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAndDeepBranch(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &AndDeepBranch{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestAndDeepBranchProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAndDeepBranch(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &AndDeepBranch{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestDeepLeafProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedDeepLeaf(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &DeepLeaf{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestDeepLeafProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedDeepLeaf(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &DeepLeaf{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNilProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNil(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &Nil{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNilProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNil(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &Nil{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNidOptEnumProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidOptEnum(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NidOptEnum{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNidOptEnumProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidOptEnum(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NidOptEnum{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinOptEnumProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptEnum(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NinOptEnum{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinOptEnumProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptEnum(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NinOptEnum{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNidRepEnumProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepEnum(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NidRepEnum{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNidRepEnumProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepEnum(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NidRepEnum{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinRepEnumProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepEnum(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NinRepEnum{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinRepEnumProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepEnum(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NinRepEnum{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinOptEnumDefaultProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptEnumDefault(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NinOptEnumDefault{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinOptEnumDefaultProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptEnumDefault(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NinOptEnumDefault{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestAnotherNinOptEnumProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAnotherNinOptEnum(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &AnotherNinOptEnum{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestAnotherNinOptEnumProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAnotherNinOptEnum(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &AnotherNinOptEnum{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestAnotherNinOptEnumDefaultProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAnotherNinOptEnumDefault(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &AnotherNinOptEnumDefault{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestAnotherNinOptEnumDefaultProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAnotherNinOptEnumDefault(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &AnotherNinOptEnumDefault{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestTimerProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedTimer(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &Timer{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestTimerProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedTimer(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &Timer{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestMyExtendableProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMyExtendable(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &MyExtendable{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestMyExtendableProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMyExtendable(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &MyExtendable{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestOtherExtenableProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedOtherExtenable(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &OtherExtenable{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestOtherExtenableProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedOtherExtenable(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &OtherExtenable{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNestedDefinitionProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNestedDefinition(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NestedDefinition{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNestedDefinitionProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNestedDefinition(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NestedDefinition{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNestedDefinition_NestedMessageProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNestedDefinition_NestedMessage(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NestedDefinition_NestedMessage{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNestedDefinition_NestedMessageProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNestedDefinition_NestedMessage(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NestedDefinition_NestedMessage{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNestedDefinition_NestedMessage_NestedNestedMsgProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NestedDefinition_NestedMessage_NestedNestedMsg{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNestedDefinition_NestedMessage_NestedNestedMsgProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NestedDefinition_NestedMessage_NestedNestedMsg{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNestedScopeProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNestedScope(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NestedScope{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNestedScopeProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNestedScope(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NestedScope{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinOptNativeDefaultProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptNativeDefault(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NinOptNativeDefault{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinOptNativeDefaultProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptNativeDefault(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NinOptNativeDefault{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestCustomContainerProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomContainer(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &CustomContainer{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestCustomContainerProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomContainer(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &CustomContainer{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestCustomNameNidOptNativeProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameNidOptNative(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &CustomNameNidOptNative{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestCustomNameNidOptNativeProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameNidOptNative(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &CustomNameNidOptNative{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestCustomNameNinOptNativeProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameNinOptNative(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &CustomNameNinOptNative{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestCustomNameNinOptNativeProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameNinOptNative(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &CustomNameNinOptNative{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestCustomNameNinRepNativeProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameNinRepNative(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &CustomNameNinRepNative{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestCustomNameNinRepNativeProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameNinRepNative(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &CustomNameNinRepNative{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestCustomNameNinStructProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameNinStruct(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &CustomNameNinStruct{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestCustomNameNinStructProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameNinStruct(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &CustomNameNinStruct{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestCustomNameCustomTypeProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameCustomType(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &CustomNameCustomType{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestCustomNameCustomTypeProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameCustomType(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &CustomNameCustomType{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestCustomNameNinEmbeddedStructUnionProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameNinEmbeddedStructUnion(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &CustomNameNinEmbeddedStructUnion{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestCustomNameNinEmbeddedStructUnionProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameNinEmbeddedStructUnion(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &CustomNameNinEmbeddedStructUnion{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestCustomNameEnumProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameEnum(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &CustomNameEnum{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestCustomNameEnumProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameEnum(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &CustomNameEnum{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNoExtensionsMapProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNoExtensionsMap(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NoExtensionsMap{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNoExtensionsMapProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNoExtensionsMap(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NoExtensionsMap{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestUnrecognizedProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUnrecognized(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &Unrecognized{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestUnrecognizedProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUnrecognized(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &Unrecognized{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestUnrecognizedWithInnerProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUnrecognizedWithInner(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &UnrecognizedWithInner{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestUnrecognizedWithInnerProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUnrecognizedWithInner(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &UnrecognizedWithInner{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestUnrecognizedWithInner_InnerProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUnrecognizedWithInner_Inner(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &UnrecognizedWithInner_Inner{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestUnrecognizedWithInner_InnerProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUnrecognizedWithInner_Inner(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &UnrecognizedWithInner_Inner{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestUnrecognizedWithEmbedProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUnrecognizedWithEmbed(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &UnrecognizedWithEmbed{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestUnrecognizedWithEmbedProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUnrecognizedWithEmbed(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &UnrecognizedWithEmbed{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestUnrecognizedWithEmbed_EmbeddedProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUnrecognizedWithEmbed_Embedded(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &UnrecognizedWithEmbed_Embedded{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestUnrecognizedWithEmbed_EmbeddedProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUnrecognizedWithEmbed_Embedded(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &UnrecognizedWithEmbed_Embedded{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNodeProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNode(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &Node{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNodeProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNode(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &Node{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNidOptNativeCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidOptNative(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NidOptNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNidOptNative(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNinOptNativeCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptNative(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinOptNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNinOptNative(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNidRepNativeCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidRepNative(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NidRepNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNidRepNative(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNinRepNativeCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinRepNative(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinRepNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNinRepNative(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNidRepPackedNativeCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidRepPackedNative(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NidRepPackedNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNidRepPackedNative(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNinRepPackedNativeCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinRepPackedNative(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinRepPackedNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNinRepPackedNative(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNidOptStructCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidOptStruct(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NidOptStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNidOptStruct(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNinOptStructCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptStruct(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinOptStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNinOptStruct(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNidRepStructCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidRepStruct(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NidRepStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNidRepStruct(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNinRepStructCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinRepStruct(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinRepStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNinRepStruct(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNidEmbeddedStructCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidEmbeddedStruct(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NidEmbeddedStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNidEmbeddedStruct(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNinEmbeddedStructCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinEmbeddedStruct(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinEmbeddedStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNinEmbeddedStruct(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNidNestedStructCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidNestedStruct(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NidNestedStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNidNestedStruct(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNinNestedStructCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinNestedStruct(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinNestedStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNinNestedStruct(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNidOptCustomCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidOptCustom(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NidOptCustom{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNidOptCustom(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestCustomDashCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomDash(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &CustomDash{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedCustomDash(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNinOptCustomCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptCustom(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinOptCustom{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNinOptCustom(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNidRepCustomCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidRepCustom(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NidRepCustom{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNidRepCustom(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNinRepCustomCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinRepCustom(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinRepCustom{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNinRepCustom(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNinOptNativeUnionCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptNativeUnion(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinOptNativeUnion{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNinOptNativeUnion(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNinOptStructUnionCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptStructUnion(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinOptStructUnion{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNinOptStructUnion(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNinEmbeddedStructUnionCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinEmbeddedStructUnion(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinEmbeddedStructUnion{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNinEmbeddedStructUnion(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNinNestedStructUnionCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinNestedStructUnion(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinNestedStructUnion{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNinNestedStructUnion(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestTreeCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedTree(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &Tree{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedTree(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestOrBranchCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedOrBranch(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &OrBranch{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedOrBranch(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestAndBranchCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAndBranch(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &AndBranch{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedAndBranch(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestLeafCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedLeaf(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &Leaf{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedLeaf(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestDeepTreeCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedDeepTree(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &DeepTree{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedDeepTree(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestADeepBranchCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedADeepBranch(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &ADeepBranch{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedADeepBranch(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestAndDeepBranchCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAndDeepBranch(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &AndDeepBranch{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedAndDeepBranch(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestDeepLeafCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedDeepLeaf(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &DeepLeaf{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedDeepLeaf(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNilCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNil(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &Nil{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNil(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNidOptEnumCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidOptEnum(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NidOptEnum{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNidOptEnum(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNinOptEnumCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptEnum(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinOptEnum{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNinOptEnum(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNidRepEnumCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidRepEnum(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NidRepEnum{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNidRepEnum(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNinRepEnumCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinRepEnum(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinRepEnum{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNinRepEnum(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNinOptEnumDefaultCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptEnumDefault(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinOptEnumDefault{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNinOptEnumDefault(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestAnotherNinOptEnumCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAnotherNinOptEnum(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &AnotherNinOptEnum{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedAnotherNinOptEnum(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestAnotherNinOptEnumDefaultCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAnotherNinOptEnumDefault(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &AnotherNinOptEnumDefault{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedAnotherNinOptEnumDefault(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestTimerCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedTimer(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &Timer{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedTimer(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestMyExtendableCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedMyExtendable(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &MyExtendable{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedMyExtendable(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestOtherExtenableCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedOtherExtenable(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &OtherExtenable{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedOtherExtenable(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNestedDefinitionCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNestedDefinition(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NestedDefinition{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNestedDefinition(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNestedDefinition_NestedMessageCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNestedDefinition_NestedMessage(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NestedDefinition_NestedMessage{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNestedDefinition_NestedMessage(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNestedDefinition_NestedMessage_NestedNestedMsgCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NestedDefinition_NestedMessage_NestedNestedMsg{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNestedScopeCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNestedScope(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NestedScope{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNestedScope(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNinOptNativeDefaultCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptNativeDefault(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinOptNativeDefault{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNinOptNativeDefault(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestCustomContainerCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomContainer(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &CustomContainer{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedCustomContainer(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestCustomNameNidOptNativeCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameNidOptNative(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &CustomNameNidOptNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedCustomNameNidOptNative(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestCustomNameNinOptNativeCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameNinOptNative(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &CustomNameNinOptNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedCustomNameNinOptNative(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestCustomNameNinRepNativeCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameNinRepNative(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &CustomNameNinRepNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedCustomNameNinRepNative(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestCustomNameNinStructCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameNinStruct(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &CustomNameNinStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedCustomNameNinStruct(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestCustomNameCustomTypeCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameCustomType(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &CustomNameCustomType{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedCustomNameCustomType(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestCustomNameNinEmbeddedStructUnionCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameNinEmbeddedStructUnion(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &CustomNameNinEmbeddedStructUnion{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedCustomNameNinEmbeddedStructUnion(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestCustomNameEnumCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameEnum(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &CustomNameEnum{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedCustomNameEnum(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNoExtensionsMapCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNoExtensionsMap(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NoExtensionsMap{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNoExtensionsMap(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestUnrecognizedCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedUnrecognized(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &Unrecognized{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedUnrecognized(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestUnrecognizedWithInnerCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedUnrecognizedWithInner(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &UnrecognizedWithInner{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedUnrecognizedWithInner(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestUnrecognizedWithInner_InnerCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedUnrecognizedWithInner_Inner(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &UnrecognizedWithInner_Inner{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedUnrecognizedWithInner_Inner(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestUnrecognizedWithEmbedCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedUnrecognizedWithEmbed(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &UnrecognizedWithEmbed{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedUnrecognizedWithEmbed(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestUnrecognizedWithEmbed_EmbeddedCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedUnrecognizedWithEmbed_Embedded(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &UnrecognizedWithEmbed_Embedded{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedUnrecognizedWithEmbed_Embedded(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNodeCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNode(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &Node{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNode(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestThetestDescription(t *testing.T) { + ThetestDescription() +} +func TestNidOptNativeVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidOptNative(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NidOptNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNinOptNativeVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptNative(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinOptNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNidRepNativeVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidRepNative(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NidRepNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNinRepNativeVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinRepNative(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinRepNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNidRepPackedNativeVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidRepPackedNative(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NidRepPackedNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNinRepPackedNativeVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinRepPackedNative(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinRepPackedNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNidOptStructVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidOptStruct(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NidOptStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNinOptStructVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptStruct(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinOptStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNidRepStructVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidRepStruct(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NidRepStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNinRepStructVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinRepStruct(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinRepStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNidEmbeddedStructVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidEmbeddedStruct(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NidEmbeddedStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNinEmbeddedStructVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinEmbeddedStruct(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinEmbeddedStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNidNestedStructVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidNestedStruct(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NidNestedStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNinNestedStructVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinNestedStruct(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinNestedStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNidOptCustomVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidOptCustom(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NidOptCustom{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestCustomDashVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomDash(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &CustomDash{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNinOptCustomVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptCustom(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinOptCustom{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNidRepCustomVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidRepCustom(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NidRepCustom{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNinRepCustomVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinRepCustom(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinRepCustom{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNinOptNativeUnionVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptNativeUnion(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinOptNativeUnion{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNinOptStructUnionVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptStructUnion(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinOptStructUnion{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNinEmbeddedStructUnionVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinEmbeddedStructUnion(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinEmbeddedStructUnion{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNinNestedStructUnionVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinNestedStructUnion(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinNestedStructUnion{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestTreeVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedTree(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &Tree{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestOrBranchVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedOrBranch(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &OrBranch{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestAndBranchVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAndBranch(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &AndBranch{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestLeafVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedLeaf(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &Leaf{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestDeepTreeVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedDeepTree(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &DeepTree{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestADeepBranchVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedADeepBranch(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &ADeepBranch{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestAndDeepBranchVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAndDeepBranch(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &AndDeepBranch{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestDeepLeafVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedDeepLeaf(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &DeepLeaf{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNilVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNil(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &Nil{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNidOptEnumVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidOptEnum(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NidOptEnum{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNinOptEnumVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptEnum(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinOptEnum{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNidRepEnumVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidRepEnum(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NidRepEnum{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNinRepEnumVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinRepEnum(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinRepEnum{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNinOptEnumDefaultVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptEnumDefault(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinOptEnumDefault{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestAnotherNinOptEnumVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAnotherNinOptEnum(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &AnotherNinOptEnum{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestAnotherNinOptEnumDefaultVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAnotherNinOptEnumDefault(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &AnotherNinOptEnumDefault{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestTimerVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedTimer(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &Timer{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestMyExtendableVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedMyExtendable(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &MyExtendable{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestOtherExtenableVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedOtherExtenable(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &OtherExtenable{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNestedDefinitionVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNestedDefinition(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NestedDefinition{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNestedDefinition_NestedMessageVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNestedDefinition_NestedMessage(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NestedDefinition_NestedMessage{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNestedDefinition_NestedMessage_NestedNestedMsgVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NestedDefinition_NestedMessage_NestedNestedMsg{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNestedScopeVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNestedScope(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NestedScope{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNinOptNativeDefaultVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptNativeDefault(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinOptNativeDefault{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestCustomContainerVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomContainer(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &CustomContainer{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestCustomNameNidOptNativeVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameNidOptNative(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &CustomNameNidOptNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestCustomNameNinOptNativeVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameNinOptNative(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &CustomNameNinOptNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestCustomNameNinRepNativeVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameNinRepNative(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &CustomNameNinRepNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestCustomNameNinStructVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameNinStruct(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &CustomNameNinStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestCustomNameCustomTypeVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameCustomType(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &CustomNameCustomType{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestCustomNameNinEmbeddedStructUnionVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameNinEmbeddedStructUnion(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &CustomNameNinEmbeddedStructUnion{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestCustomNameEnumVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameEnum(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &CustomNameEnum{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNoExtensionsMapVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNoExtensionsMap(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NoExtensionsMap{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestUnrecognizedVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedUnrecognized(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &Unrecognized{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestUnrecognizedWithInnerVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedUnrecognizedWithInner(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &UnrecognizedWithInner{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestUnrecognizedWithInner_InnerVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedUnrecognizedWithInner_Inner(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &UnrecognizedWithInner_Inner{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestUnrecognizedWithEmbedVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedUnrecognizedWithEmbed(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &UnrecognizedWithEmbed{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestUnrecognizedWithEmbed_EmbeddedVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedUnrecognizedWithEmbed_Embedded(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &UnrecognizedWithEmbed_Embedded{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNodeVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNode(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &Node{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNidOptNativeFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidOptNative(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNinOptNativeFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptNative(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNidRepNativeFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidRepNative(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNinRepNativeFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinRepNative(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNidRepPackedNativeFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidRepPackedNative(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNinRepPackedNativeFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinRepPackedNative(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNidOptStructFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidOptStruct(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNinOptStructFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptStruct(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNidRepStructFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidRepStruct(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNinRepStructFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinRepStruct(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNidEmbeddedStructFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidEmbeddedStruct(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNinEmbeddedStructFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinEmbeddedStruct(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNidNestedStructFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidNestedStruct(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNinNestedStructFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinNestedStruct(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNidOptCustomFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidOptCustom(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestCustomDashFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomDash(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNinOptCustomFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptCustom(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNidRepCustomFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidRepCustom(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNinRepCustomFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinRepCustom(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNinOptNativeUnionFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptNativeUnion(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNinOptStructUnionFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptStructUnion(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNinEmbeddedStructUnionFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinEmbeddedStructUnion(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNinNestedStructUnionFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinNestedStructUnion(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestTreeFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedTree(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestOrBranchFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedOrBranch(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestAndBranchFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAndBranch(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestLeafFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedLeaf(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestDeepTreeFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedDeepTree(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestADeepBranchFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedADeepBranch(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestAndDeepBranchFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAndDeepBranch(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestDeepLeafFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedDeepLeaf(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNilFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNil(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNidOptEnumFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidOptEnum(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNinOptEnumFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptEnum(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNidRepEnumFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidRepEnum(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNinRepEnumFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinRepEnum(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestAnotherNinOptEnumFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAnotherNinOptEnum(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestTimerFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedTimer(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNestedDefinitionFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNestedDefinition(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNestedDefinition_NestedMessageFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNestedDefinition_NestedMessage(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNestedDefinition_NestedMessage_NestedNestedMsgFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNestedScopeFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNestedScope(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestCustomContainerFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomContainer(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestCustomNameNidOptNativeFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameNidOptNative(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestCustomNameNinOptNativeFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameNinOptNative(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestCustomNameNinRepNativeFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameNinRepNative(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestCustomNameNinStructFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameNinStruct(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestCustomNameCustomTypeFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameCustomType(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestCustomNameNinEmbeddedStructUnionFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameNinEmbeddedStructUnion(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestCustomNameEnumFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameEnum(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestUnrecognizedFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedUnrecognized(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestUnrecognizedWithInnerFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedUnrecognizedWithInner(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestUnrecognizedWithInner_InnerFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedUnrecognizedWithInner_Inner(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestUnrecognizedWithEmbedFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedUnrecognizedWithEmbed(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestUnrecognizedWithEmbed_EmbeddedFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedUnrecognizedWithEmbed_Embedded(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNodeFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNode(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNidOptNativeGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidOptNative(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestNinOptNativeGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptNative(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestNidRepNativeGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidRepNative(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestNinRepNativeGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinRepNative(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestNidRepPackedNativeGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidRepPackedNative(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestNinRepPackedNativeGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinRepPackedNative(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestNidOptStructGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidOptStruct(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestNinOptStructGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptStruct(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestNidRepStructGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidRepStruct(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestNinRepStructGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinRepStruct(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestNidEmbeddedStructGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidEmbeddedStruct(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestNinEmbeddedStructGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinEmbeddedStruct(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestNidNestedStructGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidNestedStruct(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestNinNestedStructGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinNestedStruct(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestNidOptCustomGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidOptCustom(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestCustomDashGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomDash(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestNinOptCustomGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptCustom(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestNidRepCustomGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidRepCustom(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestNinRepCustomGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinRepCustom(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestNinOptNativeUnionGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptNativeUnion(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestNinOptStructUnionGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptStructUnion(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestNinEmbeddedStructUnionGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinEmbeddedStructUnion(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestNinNestedStructUnionGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinNestedStructUnion(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestTreeGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedTree(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestOrBranchGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedOrBranch(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestAndBranchGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAndBranch(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestLeafGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedLeaf(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestDeepTreeGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedDeepTree(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestADeepBranchGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedADeepBranch(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestAndDeepBranchGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAndDeepBranch(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestDeepLeafGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedDeepLeaf(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestNilGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNil(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestNidOptEnumGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidOptEnum(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestNinOptEnumGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptEnum(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestNidRepEnumGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidRepEnum(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestNinRepEnumGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinRepEnum(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestNinOptEnumDefaultGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptEnumDefault(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestAnotherNinOptEnumGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAnotherNinOptEnum(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestAnotherNinOptEnumDefaultGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAnotherNinOptEnumDefault(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestTimerGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedTimer(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestMyExtendableGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedMyExtendable(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestOtherExtenableGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedOtherExtenable(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestNestedDefinitionGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNestedDefinition(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestNestedDefinition_NestedMessageGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNestedDefinition_NestedMessage(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestNestedDefinition_NestedMessage_NestedNestedMsgGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestNestedScopeGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNestedScope(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestNinOptNativeDefaultGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptNativeDefault(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestCustomContainerGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomContainer(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestCustomNameNidOptNativeGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameNidOptNative(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestCustomNameNinOptNativeGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameNinOptNative(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestCustomNameNinRepNativeGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameNinRepNative(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestCustomNameNinStructGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameNinStruct(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestCustomNameCustomTypeGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameCustomType(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestCustomNameNinEmbeddedStructUnionGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameNinEmbeddedStructUnion(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestCustomNameEnumGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameEnum(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestNoExtensionsMapGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNoExtensionsMap(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestUnrecognizedGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedUnrecognized(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestUnrecognizedWithInnerGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedUnrecognizedWithInner(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestUnrecognizedWithInner_InnerGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedUnrecognizedWithInner_Inner(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestUnrecognizedWithEmbedGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedUnrecognizedWithEmbed(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestUnrecognizedWithEmbed_EmbeddedGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedUnrecognizedWithEmbed_Embedded(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestNodeGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNode(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestNidOptNativeSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidOptNative(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNidOptNativeSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NidOptNative, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNidOptNative(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinOptNativeSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptNative(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNinOptNativeSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinOptNative, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNinOptNative(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNidRepNativeSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepNative(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNidRepNativeSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NidRepNative, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNidRepNative(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinRepNativeSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepNative(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNinRepNativeSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinRepNative, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNinRepNative(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNidRepPackedNativeSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepPackedNative(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNidRepPackedNativeSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NidRepPackedNative, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNidRepPackedNative(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinRepPackedNativeSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepPackedNative(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNinRepPackedNativeSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinRepPackedNative, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNinRepPackedNative(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNidOptStructSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidOptStruct(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNidOptStructSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NidOptStruct, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNidOptStruct(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinOptStructSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptStruct(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNinOptStructSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinOptStruct, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNinOptStruct(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNidRepStructSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepStruct(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNidRepStructSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NidRepStruct, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNidRepStruct(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinRepStructSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepStruct(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNinRepStructSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinRepStruct, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNinRepStruct(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNidEmbeddedStructSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidEmbeddedStruct(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNidEmbeddedStructSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NidEmbeddedStruct, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNidEmbeddedStruct(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinEmbeddedStructSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinEmbeddedStruct(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNinEmbeddedStructSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinEmbeddedStruct, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNinEmbeddedStruct(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNidNestedStructSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidNestedStruct(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNidNestedStructSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NidNestedStruct, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNidNestedStruct(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinNestedStructSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinNestedStruct(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNinNestedStructSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinNestedStruct, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNinNestedStruct(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNidOptCustomSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidOptCustom(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNidOptCustomSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NidOptCustom, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNidOptCustom(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestCustomDashSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomDash(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkCustomDashSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*CustomDash, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedCustomDash(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinOptCustomSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptCustom(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNinOptCustomSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinOptCustom, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNinOptCustom(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNidRepCustomSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepCustom(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNidRepCustomSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NidRepCustom, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNidRepCustom(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinRepCustomSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepCustom(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNinRepCustomSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinRepCustom, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNinRepCustom(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinOptNativeUnionSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptNativeUnion(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNinOptNativeUnionSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinOptNativeUnion, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNinOptNativeUnion(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinOptStructUnionSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptStructUnion(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNinOptStructUnionSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinOptStructUnion, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNinOptStructUnion(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinEmbeddedStructUnionSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinEmbeddedStructUnion(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNinEmbeddedStructUnionSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinEmbeddedStructUnion, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNinEmbeddedStructUnion(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinNestedStructUnionSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinNestedStructUnion(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNinNestedStructUnionSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinNestedStructUnion, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNinNestedStructUnion(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestTreeSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedTree(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkTreeSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Tree, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedTree(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestOrBranchSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedOrBranch(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkOrBranchSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*OrBranch, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedOrBranch(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestAndBranchSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAndBranch(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkAndBranchSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*AndBranch, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedAndBranch(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestLeafSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedLeaf(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkLeafSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Leaf, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedLeaf(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestDeepTreeSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedDeepTree(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkDeepTreeSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*DeepTree, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedDeepTree(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestADeepBranchSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedADeepBranch(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkADeepBranchSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*ADeepBranch, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedADeepBranch(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestAndDeepBranchSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAndDeepBranch(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkAndDeepBranchSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*AndDeepBranch, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedAndDeepBranch(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestDeepLeafSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedDeepLeaf(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkDeepLeafSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*DeepLeaf, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedDeepLeaf(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNilSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNil(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNilSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Nil, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNil(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNidOptEnumSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidOptEnum(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNidOptEnumSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NidOptEnum, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNidOptEnum(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinOptEnumSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptEnum(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNinOptEnumSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinOptEnum, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNinOptEnum(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNidRepEnumSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepEnum(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNidRepEnumSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NidRepEnum, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNidRepEnum(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinRepEnumSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepEnum(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNinRepEnumSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinRepEnum, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNinRepEnum(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinOptEnumDefaultSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptEnumDefault(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNinOptEnumDefaultSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinOptEnumDefault, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNinOptEnumDefault(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestAnotherNinOptEnumSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAnotherNinOptEnum(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkAnotherNinOptEnumSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*AnotherNinOptEnum, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedAnotherNinOptEnum(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestAnotherNinOptEnumDefaultSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAnotherNinOptEnumDefault(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkAnotherNinOptEnumDefaultSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*AnotherNinOptEnumDefault, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedAnotherNinOptEnumDefault(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestTimerSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedTimer(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkTimerSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Timer, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedTimer(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestMyExtendableSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMyExtendable(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkMyExtendableSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*MyExtendable, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedMyExtendable(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestOtherExtenableSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedOtherExtenable(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkOtherExtenableSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*OtherExtenable, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedOtherExtenable(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNestedDefinitionSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNestedDefinition(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNestedDefinitionSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NestedDefinition, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNestedDefinition(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNestedDefinition_NestedMessageSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNestedDefinition_NestedMessage(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNestedDefinition_NestedMessageSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NestedDefinition_NestedMessage, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNestedDefinition_NestedMessage(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNestedDefinition_NestedMessage_NestedNestedMsgSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNestedDefinition_NestedMessage_NestedNestedMsgSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NestedDefinition_NestedMessage_NestedNestedMsg, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNestedScopeSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNestedScope(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNestedScopeSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NestedScope, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNestedScope(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinOptNativeDefaultSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptNativeDefault(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNinOptNativeDefaultSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinOptNativeDefault, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNinOptNativeDefault(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestCustomContainerSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomContainer(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkCustomContainerSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*CustomContainer, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedCustomContainer(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestCustomNameNidOptNativeSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameNidOptNative(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkCustomNameNidOptNativeSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*CustomNameNidOptNative, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedCustomNameNidOptNative(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestCustomNameNinOptNativeSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameNinOptNative(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkCustomNameNinOptNativeSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*CustomNameNinOptNative, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedCustomNameNinOptNative(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestCustomNameNinRepNativeSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameNinRepNative(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkCustomNameNinRepNativeSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*CustomNameNinRepNative, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedCustomNameNinRepNative(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestCustomNameNinStructSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameNinStruct(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkCustomNameNinStructSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*CustomNameNinStruct, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedCustomNameNinStruct(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestCustomNameCustomTypeSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameCustomType(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkCustomNameCustomTypeSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*CustomNameCustomType, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedCustomNameCustomType(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestCustomNameNinEmbeddedStructUnionSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameNinEmbeddedStructUnion(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkCustomNameNinEmbeddedStructUnionSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*CustomNameNinEmbeddedStructUnion, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedCustomNameNinEmbeddedStructUnion(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestCustomNameEnumSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameEnum(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkCustomNameEnumSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*CustomNameEnum, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedCustomNameEnum(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNoExtensionsMapSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNoExtensionsMap(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNoExtensionsMapSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NoExtensionsMap, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNoExtensionsMap(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestUnrecognizedSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUnrecognized(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkUnrecognizedSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Unrecognized, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedUnrecognized(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestUnrecognizedWithInnerSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUnrecognizedWithInner(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkUnrecognizedWithInnerSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*UnrecognizedWithInner, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedUnrecognizedWithInner(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestUnrecognizedWithInner_InnerSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUnrecognizedWithInner_Inner(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkUnrecognizedWithInner_InnerSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*UnrecognizedWithInner_Inner, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedUnrecognizedWithInner_Inner(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestUnrecognizedWithEmbedSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUnrecognizedWithEmbed(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkUnrecognizedWithEmbedSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*UnrecognizedWithEmbed, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedUnrecognizedWithEmbed(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestUnrecognizedWithEmbed_EmbeddedSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUnrecognizedWithEmbed_Embedded(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkUnrecognizedWithEmbed_EmbeddedSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*UnrecognizedWithEmbed_Embedded, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedUnrecognizedWithEmbed_Embedded(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNodeSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNode(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNodeSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Node, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNode(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNidOptNativeStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidOptNative(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNinOptNativeStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptNative(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNidRepNativeStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidRepNative(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNinRepNativeStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinRepNative(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNidRepPackedNativeStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidRepPackedNative(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNinRepPackedNativeStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinRepPackedNative(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNidOptStructStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidOptStruct(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNinOptStructStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptStruct(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNidRepStructStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidRepStruct(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNinRepStructStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinRepStruct(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNidEmbeddedStructStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidEmbeddedStruct(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNinEmbeddedStructStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinEmbeddedStruct(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNidNestedStructStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidNestedStruct(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNinNestedStructStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinNestedStruct(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNidOptCustomStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidOptCustom(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestCustomDashStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomDash(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNinOptCustomStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptCustom(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNidRepCustomStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidRepCustom(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNinRepCustomStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinRepCustom(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNinOptNativeUnionStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptNativeUnion(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNinOptStructUnionStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptStructUnion(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNinEmbeddedStructUnionStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinEmbeddedStructUnion(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNinNestedStructUnionStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinNestedStructUnion(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestTreeStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedTree(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestOrBranchStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedOrBranch(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestAndBranchStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAndBranch(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestLeafStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedLeaf(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestDeepTreeStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedDeepTree(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestADeepBranchStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedADeepBranch(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestAndDeepBranchStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAndDeepBranch(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestDeepLeafStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedDeepLeaf(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNilStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNil(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNidOptEnumStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidOptEnum(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNinOptEnumStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptEnum(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNidRepEnumStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidRepEnum(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNinRepEnumStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinRepEnum(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNinOptEnumDefaultStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptEnumDefault(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestAnotherNinOptEnumStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAnotherNinOptEnum(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestAnotherNinOptEnumDefaultStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAnotherNinOptEnumDefault(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestTimerStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedTimer(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestMyExtendableStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedMyExtendable(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestOtherExtenableStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedOtherExtenable(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNestedDefinitionStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNestedDefinition(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNestedDefinition_NestedMessageStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNestedDefinition_NestedMessage(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNestedDefinition_NestedMessage_NestedNestedMsgStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNestedScopeStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNestedScope(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNinOptNativeDefaultStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptNativeDefault(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestCustomContainerStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomContainer(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestCustomNameNidOptNativeStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameNidOptNative(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestCustomNameNinOptNativeStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameNinOptNative(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestCustomNameNinRepNativeStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameNinRepNative(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestCustomNameNinStructStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameNinStruct(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestCustomNameCustomTypeStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameCustomType(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestCustomNameNinEmbeddedStructUnionStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameNinEmbeddedStructUnion(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestCustomNameEnumStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameEnum(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNoExtensionsMapStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNoExtensionsMap(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestUnrecognizedStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedUnrecognized(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestUnrecognizedWithInnerStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedUnrecognizedWithInner(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestUnrecognizedWithInner_InnerStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedUnrecognizedWithInner_Inner(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestUnrecognizedWithEmbedStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedUnrecognizedWithEmbed(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestUnrecognizedWithEmbed_EmbeddedStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedUnrecognizedWithEmbed_Embedded(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNodeStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNode(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNinOptNativeUnionOnlyOne(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptNativeUnion(popr, true) + v := p.GetValue() + msg := &NinOptNativeUnion{} + if !msg.SetValue(v) { + t.Fatalf("OnlyOne: Could not set Value") + } + if !p.Equal(msg) { + t.Fatalf("%#v !OnlyOne Equal %#v", msg, p) + } +} +func TestNinOptStructUnionOnlyOne(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptStructUnion(popr, true) + v := p.GetValue() + msg := &NinOptStructUnion{} + if !msg.SetValue(v) { + t.Fatalf("OnlyOne: Could not set Value") + } + if !p.Equal(msg) { + t.Fatalf("%#v !OnlyOne Equal %#v", msg, p) + } +} +func TestNinEmbeddedStructUnionOnlyOne(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinEmbeddedStructUnion(popr, true) + v := p.GetValue() + msg := &NinEmbeddedStructUnion{} + if !msg.SetValue(v) { + t.Fatalf("OnlyOne: Could not set Value") + } + if !p.Equal(msg) { + t.Fatalf("%#v !OnlyOne Equal %#v", msg, p) + } +} +func TestNinNestedStructUnionOnlyOne(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinNestedStructUnion(popr, true) + v := p.GetValue() + msg := &NinNestedStructUnion{} + if !msg.SetValue(v) { + t.Fatalf("OnlyOne: Could not set Value") + } + if !p.Equal(msg) { + t.Fatalf("%#v !OnlyOne Equal %#v", msg, p) + } +} +func TestTreeOnlyOne(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedTree(popr, true) + v := p.GetValue() + msg := &Tree{} + if !msg.SetValue(v) { + t.Fatalf("OnlyOne: Could not set Value") + } + if !p.Equal(msg) { + t.Fatalf("%#v !OnlyOne Equal %#v", msg, p) + } +} +func TestDeepTreeOnlyOne(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedDeepTree(popr, true) + v := p.GetValue() + msg := &DeepTree{} + if !msg.SetValue(v) { + t.Fatalf("OnlyOne: Could not set Value") + } + if !p.Equal(msg) { + t.Fatalf("%#v !OnlyOne Equal %#v", msg, p) + } +} +func TestCustomNameNinEmbeddedStructUnionOnlyOne(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameNinEmbeddedStructUnion(popr, true) + v := p.GetValue() + msg := &CustomNameNinEmbeddedStructUnion{} + if !msg.SetValue(v) { + t.Fatalf("OnlyOne: Could not set Value") + } + if !p.Equal(msg) { + t.Fatalf("%#v !OnlyOne Equal %#v", msg, p) + } +} + +//These tests are generated by github.com/gogo/protobuf/plugin/testgen diff --git a/vendor/github.com/gogo/protobuf/test/unmarshalmerge/Makefile b/vendor/github.com/gogo/protobuf/test/unmarshalmerge/Makefile new file mode 100644 index 000000000..66ea13efb --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/unmarshalmerge/Makefile @@ -0,0 +1,30 @@ +# Extensions for Protocol Buffers to create more go like structures. +# +# Copyright (c) 2013, Vastech SA (PTY) LTD. 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: + (protoc --proto_path=../../../../../:../../protobuf/:. --gogo_out=. unmarshalmerge.proto) diff --git a/vendor/github.com/gogo/protobuf/test/unmarshalmerge/unmarshalmerge.pb.go b/vendor/github.com/gogo/protobuf/test/unmarshalmerge/unmarshalmerge.pb.go new file mode 100644 index 000000000..07fe444bf --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/unmarshalmerge/unmarshalmerge.pb.go @@ -0,0 +1,1685 @@ +// Code generated by protoc-gen-gogo. +// source: unmarshalmerge.proto +// DO NOT EDIT! + +/* + Package unmarshalmerge is a generated protocol buffer package. + + It is generated from these files: + unmarshalmerge.proto + + It has these top-level messages: + Big + BigUnsafe + Sub + IntMerge +*/ +package unmarshalmerge + +import proto "github.com/gogo/protobuf/proto" +import fmt "fmt" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" + +import bytes "bytes" + +import strings "strings" +import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" +import sort "sort" +import strconv "strconv" +import reflect "reflect" + +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. +const _ = proto.GoGoProtoPackageIsVersion1 + +type Big struct { + Sub *Sub `protobuf:"bytes,1,opt,name=Sub,json=sub" json:"Sub,omitempty"` + Number *int64 `protobuf:"varint,2,opt,name=Number,json=number" json:"Number,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *Big) Reset() { *m = Big{} } +func (*Big) ProtoMessage() {} +func (*Big) Descriptor() ([]byte, []int) { return fileDescriptorUnmarshalmerge, []int{0} } + +func (m *Big) GetSub() *Sub { + if m != nil { + return m.Sub + } + return nil +} + +func (m *Big) GetNumber() int64 { + if m != nil && m.Number != nil { + return *m.Number + } + return 0 +} + +type BigUnsafe struct { + Sub *Sub `protobuf:"bytes,1,opt,name=Sub,json=sub" json:"Sub,omitempty"` + Number *int64 `protobuf:"varint,2,opt,name=Number,json=number" json:"Number,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *BigUnsafe) Reset() { *m = BigUnsafe{} } +func (*BigUnsafe) ProtoMessage() {} +func (*BigUnsafe) Descriptor() ([]byte, []int) { return fileDescriptorUnmarshalmerge, []int{1} } + +func (m *BigUnsafe) GetSub() *Sub { + if m != nil { + return m.Sub + } + return nil +} + +func (m *BigUnsafe) GetNumber() int64 { + if m != nil && m.Number != nil { + return *m.Number + } + return 0 +} + +type Sub struct { + SubNumber *int64 `protobuf:"varint,1,opt,name=SubNumber,json=subNumber" json:"SubNumber,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *Sub) Reset() { *m = Sub{} } +func (*Sub) ProtoMessage() {} +func (*Sub) Descriptor() ([]byte, []int) { return fileDescriptorUnmarshalmerge, []int{2} } + +func (m *Sub) GetSubNumber() int64 { + if m != nil && m.SubNumber != nil { + return *m.SubNumber + } + return 0 +} + +type IntMerge struct { + Int64 int64 `protobuf:"varint,1,req,name=Int64,json=int64" json:"Int64"` + Int32 int32 `protobuf:"varint,2,opt,name=Int32,json=int32" json:"Int32"` + Sint32 int32 `protobuf:"zigzag32,3,req,name=Sint32,json=sint32" json:"Sint32"` + Sint64 int64 `protobuf:"zigzag64,4,opt,name=Sint64,json=sint64" json:"Sint64"` + Uint64 uint64 `protobuf:"varint,5,opt,name=Uint64,json=uint64" json:"Uint64"` + Uint32 uint32 `protobuf:"varint,6,req,name=Uint32,json=uint32" json:"Uint32"` + Fixed64 uint64 `protobuf:"fixed64,7,opt,name=Fixed64,json=fixed64" json:"Fixed64"` + Fixed32 uint32 `protobuf:"fixed32,8,opt,name=Fixed32,json=fixed32" json:"Fixed32"` + Sfixed32 int32 `protobuf:"fixed32,9,req,name=Sfixed32,json=sfixed32" json:"Sfixed32"` + Sfixed64 int64 `protobuf:"fixed64,10,opt,name=Sfixed64,json=sfixed64" json:"Sfixed64"` + Bool bool `protobuf:"varint,11,opt,name=Bool,json=bool" json:"Bool"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *IntMerge) Reset() { *m = IntMerge{} } +func (*IntMerge) ProtoMessage() {} +func (*IntMerge) Descriptor() ([]byte, []int) { return fileDescriptorUnmarshalmerge, []int{3} } + +func (m *IntMerge) GetInt64() int64 { + if m != nil { + return m.Int64 + } + return 0 +} + +func (m *IntMerge) GetInt32() int32 { + if m != nil { + return m.Int32 + } + return 0 +} + +func (m *IntMerge) GetSint32() int32 { + if m != nil { + return m.Sint32 + } + return 0 +} + +func (m *IntMerge) GetSint64() int64 { + if m != nil { + return m.Sint64 + } + return 0 +} + +func (m *IntMerge) GetUint64() uint64 { + if m != nil { + return m.Uint64 + } + return 0 +} + +func (m *IntMerge) GetUint32() uint32 { + if m != nil { + return m.Uint32 + } + return 0 +} + +func (m *IntMerge) GetFixed64() uint64 { + if m != nil { + return m.Fixed64 + } + return 0 +} + +func (m *IntMerge) GetFixed32() uint32 { + if m != nil { + return m.Fixed32 + } + return 0 +} + +func (m *IntMerge) GetSfixed32() int32 { + if m != nil { + return m.Sfixed32 + } + return 0 +} + +func (m *IntMerge) GetSfixed64() int64 { + if m != nil { + return m.Sfixed64 + } + return 0 +} + +func (m *IntMerge) GetBool() bool { + if m != nil { + return m.Bool + } + return false +} + +func init() { + proto.RegisterType((*Big)(nil), "unmarshalmerge.Big") + proto.RegisterType((*BigUnsafe)(nil), "unmarshalmerge.BigUnsafe") + proto.RegisterType((*Sub)(nil), "unmarshalmerge.Sub") + proto.RegisterType((*IntMerge)(nil), "unmarshalmerge.IntMerge") +} +func (this *Big) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*Big) + if !ok { + that2, ok := that.(Big) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *Big") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *Big but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *Big but is not nil && this == nil") + } + if !this.Sub.Equal(that1.Sub) { + return fmt.Errorf("Sub this(%v) Not Equal that(%v)", this.Sub, that1.Sub) + } + if this.Number != nil && that1.Number != nil { + if *this.Number != *that1.Number { + return fmt.Errorf("Number this(%v) Not Equal that(%v)", *this.Number, *that1.Number) + } + } else if this.Number != nil { + return fmt.Errorf("this.Number == nil && that.Number != nil") + } else if that1.Number != nil { + return fmt.Errorf("Number this(%v) Not Equal that(%v)", this.Number, that1.Number) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *Big) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*Big) + if !ok { + that2, ok := that.(Big) + 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.Sub.Equal(that1.Sub) { + return false + } + if this.Number != nil && that1.Number != nil { + if *this.Number != *that1.Number { + return false + } + } else if this.Number != nil { + return false + } else if that1.Number != nil { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *BigUnsafe) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*BigUnsafe) + if !ok { + that2, ok := that.(BigUnsafe) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *BigUnsafe") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *BigUnsafe but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *BigUnsafe but is not nil && this == nil") + } + if !this.Sub.Equal(that1.Sub) { + return fmt.Errorf("Sub this(%v) Not Equal that(%v)", this.Sub, that1.Sub) + } + if this.Number != nil && that1.Number != nil { + if *this.Number != *that1.Number { + return fmt.Errorf("Number this(%v) Not Equal that(%v)", *this.Number, *that1.Number) + } + } else if this.Number != nil { + return fmt.Errorf("this.Number == nil && that.Number != nil") + } else if that1.Number != nil { + return fmt.Errorf("Number this(%v) Not Equal that(%v)", this.Number, that1.Number) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *BigUnsafe) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*BigUnsafe) + if !ok { + that2, ok := that.(BigUnsafe) + 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.Sub.Equal(that1.Sub) { + return false + } + if this.Number != nil && that1.Number != nil { + if *this.Number != *that1.Number { + return false + } + } else if this.Number != nil { + return false + } else if that1.Number != nil { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *Sub) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*Sub) + if !ok { + that2, ok := that.(Sub) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *Sub") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *Sub but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *Sub but is not nil && this == nil") + } + if this.SubNumber != nil && that1.SubNumber != nil { + if *this.SubNumber != *that1.SubNumber { + return fmt.Errorf("SubNumber this(%v) Not Equal that(%v)", *this.SubNumber, *that1.SubNumber) + } + } else if this.SubNumber != nil { + return fmt.Errorf("this.SubNumber == nil && that.SubNumber != nil") + } else if that1.SubNumber != nil { + return fmt.Errorf("SubNumber this(%v) Not Equal that(%v)", this.SubNumber, that1.SubNumber) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *Sub) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*Sub) + if !ok { + that2, ok := that.(Sub) + 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.SubNumber != nil && that1.SubNumber != nil { + if *this.SubNumber != *that1.SubNumber { + return false + } + } else if this.SubNumber != nil { + return false + } else if that1.SubNumber != nil { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *IntMerge) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*IntMerge) + if !ok { + that2, ok := that.(IntMerge) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *IntMerge") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *IntMerge but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *IntMerge but is not nil && this == nil") + } + if this.Int64 != that1.Int64 { + return fmt.Errorf("Int64 this(%v) Not Equal that(%v)", this.Int64, that1.Int64) + } + if this.Int32 != that1.Int32 { + return fmt.Errorf("Int32 this(%v) Not Equal that(%v)", this.Int32, that1.Int32) + } + if this.Sint32 != that1.Sint32 { + return fmt.Errorf("Sint32 this(%v) Not Equal that(%v)", this.Sint32, that1.Sint32) + } + if this.Sint64 != that1.Sint64 { + return fmt.Errorf("Sint64 this(%v) Not Equal that(%v)", this.Sint64, that1.Sint64) + } + if this.Uint64 != that1.Uint64 { + return fmt.Errorf("Uint64 this(%v) Not Equal that(%v)", this.Uint64, that1.Uint64) + } + if this.Uint32 != that1.Uint32 { + return fmt.Errorf("Uint32 this(%v) Not Equal that(%v)", this.Uint32, that1.Uint32) + } + if this.Fixed64 != that1.Fixed64 { + return fmt.Errorf("Fixed64 this(%v) Not Equal that(%v)", this.Fixed64, that1.Fixed64) + } + if this.Fixed32 != that1.Fixed32 { + return fmt.Errorf("Fixed32 this(%v) Not Equal that(%v)", this.Fixed32, that1.Fixed32) + } + if this.Sfixed32 != that1.Sfixed32 { + return fmt.Errorf("Sfixed32 this(%v) Not Equal that(%v)", this.Sfixed32, that1.Sfixed32) + } + if this.Sfixed64 != that1.Sfixed64 { + return fmt.Errorf("Sfixed64 this(%v) Not Equal that(%v)", this.Sfixed64, that1.Sfixed64) + } + if this.Bool != that1.Bool { + return fmt.Errorf("Bool this(%v) Not Equal that(%v)", this.Bool, that1.Bool) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *IntMerge) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*IntMerge) + if !ok { + that2, ok := that.(IntMerge) + 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.Int64 != that1.Int64 { + return false + } + if this.Int32 != that1.Int32 { + return false + } + if this.Sint32 != that1.Sint32 { + return false + } + if this.Sint64 != that1.Sint64 { + return false + } + if this.Uint64 != that1.Uint64 { + return false + } + if this.Uint32 != that1.Uint32 { + return false + } + if this.Fixed64 != that1.Fixed64 { + return false + } + if this.Fixed32 != that1.Fixed32 { + return false + } + if this.Sfixed32 != that1.Sfixed32 { + return false + } + if this.Sfixed64 != that1.Sfixed64 { + return false + } + if this.Bool != that1.Bool { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *Big) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 6) + s = append(s, "&unmarshalmerge.Big{") + if this.Sub != nil { + s = append(s, "Sub: "+fmt.Sprintf("%#v", this.Sub)+",\n") + } + if this.Number != nil { + s = append(s, "Number: "+valueToGoStringUnmarshalmerge(this.Number, "int64")+",\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 *BigUnsafe) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 6) + s = append(s, "&unmarshalmerge.BigUnsafe{") + if this.Sub != nil { + s = append(s, "Sub: "+fmt.Sprintf("%#v", this.Sub)+",\n") + } + if this.Number != nil { + s = append(s, "Number: "+valueToGoStringUnmarshalmerge(this.Number, "int64")+",\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 *Sub) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&unmarshalmerge.Sub{") + if this.SubNumber != nil { + s = append(s, "SubNumber: "+valueToGoStringUnmarshalmerge(this.SubNumber, "int64")+",\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 *IntMerge) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 15) + s = append(s, "&unmarshalmerge.IntMerge{") + s = append(s, "Int64: "+fmt.Sprintf("%#v", this.Int64)+",\n") + s = append(s, "Int32: "+fmt.Sprintf("%#v", this.Int32)+",\n") + s = append(s, "Sint32: "+fmt.Sprintf("%#v", this.Sint32)+",\n") + s = append(s, "Sint64: "+fmt.Sprintf("%#v", this.Sint64)+",\n") + s = append(s, "Uint64: "+fmt.Sprintf("%#v", this.Uint64)+",\n") + s = append(s, "Uint32: "+fmt.Sprintf("%#v", this.Uint32)+",\n") + s = append(s, "Fixed64: "+fmt.Sprintf("%#v", this.Fixed64)+",\n") + s = append(s, "Fixed32: "+fmt.Sprintf("%#v", this.Fixed32)+",\n") + s = append(s, "Sfixed32: "+fmt.Sprintf("%#v", this.Sfixed32)+",\n") + s = append(s, "Sfixed64: "+fmt.Sprintf("%#v", this.Sfixed64)+",\n") + s = append(s, "Bool: "+fmt.Sprintf("%#v", this.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 valueToGoStringUnmarshalmerge(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 extensionToGoStringUnmarshalmerge(e map[int32]github_com_gogo_protobuf_proto.Extension) string { + if e == nil { + return "nil" + } + s := "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 +} +func NewPopulatedBig(r randyUnmarshalmerge, easy bool) *Big { + this := &Big{} + if r.Intn(10) != 0 { + this.Sub = NewPopulatedSub(r, easy) + } + if r.Intn(10) != 0 { + v1 := int64(r.Int63()) + if r.Intn(2) == 0 { + v1 *= -1 + } + this.Number = &v1 + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedUnmarshalmerge(r, 3) + } + return this +} + +func NewPopulatedBigUnsafe(r randyUnmarshalmerge, easy bool) *BigUnsafe { + this := &BigUnsafe{} + if r.Intn(10) != 0 { + this.Sub = NewPopulatedSub(r, easy) + } + if r.Intn(10) != 0 { + v2 := int64(r.Int63()) + if r.Intn(2) == 0 { + v2 *= -1 + } + this.Number = &v2 + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedUnmarshalmerge(r, 3) + } + return this +} + +func NewPopulatedSub(r randyUnmarshalmerge, easy bool) *Sub { + this := &Sub{} + if r.Intn(10) != 0 { + v3 := int64(r.Int63()) + if r.Intn(2) == 0 { + v3 *= -1 + } + this.SubNumber = &v3 + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedUnmarshalmerge(r, 2) + } + return this +} + +func NewPopulatedIntMerge(r randyUnmarshalmerge, easy bool) *IntMerge { + this := &IntMerge{} + this.Int64 = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Int64 *= -1 + } + this.Int32 = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Int32 *= -1 + } + this.Sint32 = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Sint32 *= -1 + } + this.Sint64 = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Sint64 *= -1 + } + this.Uint64 = uint64(uint64(r.Uint32())) + this.Uint32 = uint32(r.Uint32()) + this.Fixed64 = uint64(uint64(r.Uint32())) + this.Fixed32 = uint32(r.Uint32()) + this.Sfixed32 = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Sfixed32 *= -1 + } + this.Sfixed64 = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Sfixed64 *= -1 + } + this.Bool = bool(bool(r.Intn(2) == 0)) + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedUnmarshalmerge(r, 12) + } + return this +} + +type randyUnmarshalmerge interface { + Float32() float32 + Float64() float64 + Int63() int64 + Int31() int32 + Uint32() uint32 + Intn(n int) int +} + +func randUTF8RuneUnmarshalmerge(r randyUnmarshalmerge) 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 randStringUnmarshalmerge(r randyUnmarshalmerge) string { + v4 := r.Intn(100) + tmps := make([]rune, v4) + for i := 0; i < v4; i++ { + tmps[i] = randUTF8RuneUnmarshalmerge(r) + } + return string(tmps) +} +func randUnrecognizedUnmarshalmerge(r randyUnmarshalmerge, 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 = randFieldUnmarshalmerge(data, r, fieldNumber, wire) + } + return data +} +func randFieldUnmarshalmerge(data []byte, r randyUnmarshalmerge, fieldNumber int, wire int) []byte { + key := uint32(fieldNumber)<<3 | uint32(wire) + switch wire { + case 0: + data = encodeVarintPopulateUnmarshalmerge(data, uint64(key)) + v5 := r.Int63() + if r.Intn(2) == 0 { + v5 *= -1 + } + data = encodeVarintPopulateUnmarshalmerge(data, uint64(v5)) + case 1: + data = encodeVarintPopulateUnmarshalmerge(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 = encodeVarintPopulateUnmarshalmerge(data, uint64(key)) + ll := r.Intn(100) + data = encodeVarintPopulateUnmarshalmerge(data, uint64(ll)) + for j := 0; j < ll; j++ { + data = append(data, byte(r.Intn(256))) + } + default: + data = encodeVarintPopulateUnmarshalmerge(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 encodeVarintPopulateUnmarshalmerge(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 (this *Big) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&Big{`, + `Sub:` + strings.Replace(fmt.Sprintf("%v", this.Sub), "Sub", "Sub", 1) + `,`, + `Number:` + valueToStringUnmarshalmerge(this.Number) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *BigUnsafe) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&BigUnsafe{`, + `Sub:` + strings.Replace(fmt.Sprintf("%v", this.Sub), "Sub", "Sub", 1) + `,`, + `Number:` + valueToStringUnmarshalmerge(this.Number) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *Sub) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&Sub{`, + `SubNumber:` + valueToStringUnmarshalmerge(this.SubNumber) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *IntMerge) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&IntMerge{`, + `Int64:` + fmt.Sprintf("%v", this.Int64) + `,`, + `Int32:` + fmt.Sprintf("%v", this.Int32) + `,`, + `Sint32:` + fmt.Sprintf("%v", this.Sint32) + `,`, + `Sint64:` + fmt.Sprintf("%v", this.Sint64) + `,`, + `Uint64:` + fmt.Sprintf("%v", this.Uint64) + `,`, + `Uint32:` + fmt.Sprintf("%v", this.Uint32) + `,`, + `Fixed64:` + fmt.Sprintf("%v", this.Fixed64) + `,`, + `Fixed32:` + fmt.Sprintf("%v", this.Fixed32) + `,`, + `Sfixed32:` + fmt.Sprintf("%v", this.Sfixed32) + `,`, + `Sfixed64:` + fmt.Sprintf("%v", this.Sfixed64) + `,`, + `Bool:` + fmt.Sprintf("%v", this.Bool) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func valueToStringUnmarshalmerge(v interface{}) string { + rv := reflect.ValueOf(v) + if rv.IsNil() { + return "nil" + } + pv := reflect.Indirect(rv).Interface() + return fmt.Sprintf("*%v", pv) +} +func (m *Big) 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 ErrIntOverflowUnmarshalmerge + } + 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: Big: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Big: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Sub", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowUnmarshalmerge + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthUnmarshalmerge + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Sub == nil { + m.Sub = &Sub{} + } + if err := m.Sub.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Number", wireType) + } + var v int64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowUnmarshalmerge + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Number = &v + default: + iNdEx = preIndex + skippy, err := skipUnmarshalmerge(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthUnmarshalmerge + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Sub) 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 ErrIntOverflowUnmarshalmerge + } + 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: Sub: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Sub: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field SubNumber", wireType) + } + var v int64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowUnmarshalmerge + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.SubNumber = &v + default: + iNdEx = preIndex + skippy, err := skipUnmarshalmerge(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthUnmarshalmerge + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *IntMerge) 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 ErrIntOverflowUnmarshalmerge + } + 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: IntMerge: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: IntMerge: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Int64", wireType) + } + m.Int64 = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowUnmarshalmerge + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + m.Int64 |= (int64(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 Int32", wireType) + } + m.Int32 = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowUnmarshalmerge + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + m.Int32 |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Sint32", wireType) + } + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowUnmarshalmerge + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + v = int32((uint32(v) >> 1) ^ uint32(((v&1)<<31)>>31)) + m.Sint32 = v + hasFields[0] |= uint64(0x00000002) + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Sint64", wireType) + } + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowUnmarshalmerge + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + v = (v >> 1) ^ uint64((int64(v&1)<<63)>>63) + m.Sint64 = int64(v) + case 5: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Uint64", wireType) + } + m.Uint64 = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowUnmarshalmerge + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + m.Uint64 |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + case 6: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Uint32", wireType) + } + m.Uint32 = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowUnmarshalmerge + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + m.Uint32 |= (uint32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + hasFields[0] |= uint64(0x00000004) + case 7: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field Fixed64", wireType) + } + m.Fixed64 = 0 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + iNdEx += 8 + m.Fixed64 = uint64(data[iNdEx-8]) + m.Fixed64 |= uint64(data[iNdEx-7]) << 8 + m.Fixed64 |= uint64(data[iNdEx-6]) << 16 + m.Fixed64 |= uint64(data[iNdEx-5]) << 24 + m.Fixed64 |= uint64(data[iNdEx-4]) << 32 + m.Fixed64 |= uint64(data[iNdEx-3]) << 40 + m.Fixed64 |= uint64(data[iNdEx-2]) << 48 + m.Fixed64 |= uint64(data[iNdEx-1]) << 56 + case 8: + if wireType != 5 { + return fmt.Errorf("proto: wrong wireType = %d for field Fixed32", wireType) + } + m.Fixed32 = 0 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + iNdEx += 4 + m.Fixed32 = uint32(data[iNdEx-4]) + m.Fixed32 |= uint32(data[iNdEx-3]) << 8 + m.Fixed32 |= uint32(data[iNdEx-2]) << 16 + m.Fixed32 |= uint32(data[iNdEx-1]) << 24 + case 9: + if wireType != 5 { + return fmt.Errorf("proto: wrong wireType = %d for field Sfixed32", wireType) + } + m.Sfixed32 = 0 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + iNdEx += 4 + m.Sfixed32 = int32(data[iNdEx-4]) + m.Sfixed32 |= int32(data[iNdEx-3]) << 8 + m.Sfixed32 |= int32(data[iNdEx-2]) << 16 + m.Sfixed32 |= int32(data[iNdEx-1]) << 24 + hasFields[0] |= uint64(0x00000008) + case 10: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field Sfixed64", wireType) + } + m.Sfixed64 = 0 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + iNdEx += 8 + m.Sfixed64 = int64(data[iNdEx-8]) + m.Sfixed64 |= int64(data[iNdEx-7]) << 8 + m.Sfixed64 |= int64(data[iNdEx-6]) << 16 + m.Sfixed64 |= int64(data[iNdEx-5]) << 24 + m.Sfixed64 |= int64(data[iNdEx-4]) << 32 + m.Sfixed64 |= int64(data[iNdEx-3]) << 40 + m.Sfixed64 |= int64(data[iNdEx-2]) << 48 + m.Sfixed64 |= int64(data[iNdEx-1]) << 56 + case 11: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Bool", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowUnmarshalmerge + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Bool = bool(v != 0) + default: + iNdEx = preIndex + skippy, err := skipUnmarshalmerge(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthUnmarshalmerge + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + if hasFields[0]&uint64(0x00000001) == 0 { + return github_com_gogo_protobuf_proto.NewRequiredNotSetError("Int64") + } + if hasFields[0]&uint64(0x00000002) == 0 { + return github_com_gogo_protobuf_proto.NewRequiredNotSetError("Sint32") + } + if hasFields[0]&uint64(0x00000004) == 0 { + return github_com_gogo_protobuf_proto.NewRequiredNotSetError("Uint32") + } + if hasFields[0]&uint64(0x00000008) == 0 { + return github_com_gogo_protobuf_proto.NewRequiredNotSetError("Sfixed32") + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipUnmarshalmerge(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, ErrIntOverflowUnmarshalmerge + } + 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, ErrIntOverflowUnmarshalmerge + } + 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, ErrIntOverflowUnmarshalmerge + } + 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, ErrInvalidLengthUnmarshalmerge + } + return iNdEx, nil + case 3: + for { + var innerWire uint64 + var start int = iNdEx + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowUnmarshalmerge + } + 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 := skipUnmarshalmerge(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 ( + ErrInvalidLengthUnmarshalmerge = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowUnmarshalmerge = fmt.Errorf("proto: integer overflow") +) + +func (m *BigUnsafe) 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 ErrIntOverflowUnmarshalmergeUnsafe + } + 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: BigUnsafe: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: BigUnsafe: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Sub", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowUnmarshalmergeUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthUnmarshalmergeUnsafe + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Sub == nil { + m.Sub = &Sub{} + } + if err := m.Sub.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Number", wireType) + } + var v int64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowUnmarshalmergeUnsafe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Number = &v + default: + iNdEx = preIndex + skippy, err := skipUnmarshalmergeUnsafe(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthUnmarshalmergeUnsafe + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipUnmarshalmergeUnsafe(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, ErrIntOverflowUnmarshalmergeUnsafe + } + 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, ErrIntOverflowUnmarshalmergeUnsafe + } + 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, ErrIntOverflowUnmarshalmergeUnsafe + } + 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, ErrInvalidLengthUnmarshalmergeUnsafe + } + return iNdEx, nil + case 3: + for { + var innerWire uint64 + var start int = iNdEx + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowUnmarshalmergeUnsafe + } + 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 := skipUnmarshalmergeUnsafe(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 ( + ErrInvalidLengthUnmarshalmergeUnsafe = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowUnmarshalmergeUnsafe = fmt.Errorf("proto: integer overflow") +) + +var fileDescriptorUnmarshalmerge = []byte{ + // 371 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xa4, 0x90, 0xbd, 0x4a, 0xf3, 0x50, + 0x18, 0xc7, 0x9b, 0xe6, 0xfb, 0x94, 0xf7, 0x55, 0xa3, 0x48, 0x28, 0x92, 0x96, 0x82, 0x50, 0x07, + 0x5b, 0x68, 0xc5, 0xc1, 0x31, 0x83, 0xa0, 0xa0, 0x48, 0x4b, 0x2f, 0xa0, 0xd1, 0x34, 0x0d, 0x34, + 0x39, 0x92, 0xd3, 0x03, 0x8e, 0x5e, 0x82, 0xb7, 0xe0, 0xe6, 0x25, 0x38, 0x76, 0xf4, 0x12, 0x9c, + 0x8a, 0xf5, 0x0a, 0x1c, 0x1d, 0xfd, 0xf7, 0xe4, 0x54, 0x1a, 0x1d, 0x1d, 0x1e, 0xf2, 0x9c, 0xe7, + 0xf7, 0xff, 0x80, 0x90, 0x1d, 0x9e, 0x26, 0xc3, 0x8c, 0x8d, 0x87, 0x93, 0x24, 0xcc, 0xa2, 0xb0, + 0x75, 0x9b, 0xd1, 0x29, 0x75, 0xfe, 0x17, 0xaf, 0xd5, 0xc3, 0x28, 0x9e, 0x8e, 0x79, 0xd0, 0xba, + 0xa6, 0x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, 0x05, 0x6e, 0x16, 0x38, 0xfc, 0x75, 0x62, 0xf5, 0xe5, + 0xee, 0xda, 0xc8, 0xdf, 0x90, 0x02, 0x8b, 0xfd, 0x52, 0xa0, 0x82, 0x20, 0x62, 0xb3, 0xa8, 0x40, + 0x87, 0x4b, 0x34, 0x9f, 0xd2, 0x89, 0x5b, 0x01, 0xb5, 0x24, 0xd5, 0x02, 0x5c, 0xf2, 0x1f, 0xec, + 0xd7, 0x5f, 0x17, 0x5e, 0xe9, 0x6d, 0xe1, 0x29, 0x1f, 0x98, 0x4f, 0xcc, 0xfd, 0xbb, 0xa7, 0x3c, + 0x61, 0x9e, 0x31, 0x33, 0xcc, 0x57, 0x00, 0x00, 0x00, 0xff, 0xff, 0xac, 0xe4, 0xac, 0xa7, 0xa1, + 0x02, 0x00, 0x00, +} diff --git a/vendor/github.com/gogo/protobuf/test/unmarshalmerge/unmarshalmerge.proto b/vendor/github.com/gogo/protobuf/test/unmarshalmerge/unmarshalmerge.proto new file mode 100644 index 000000000..b2ca42c12 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/unmarshalmerge/unmarshalmerge.proto @@ -0,0 +1,73 @@ +// Copyright (c) 2013, Vastech SA (PTY) LTD. All rights reserved. +// http://github.com/gogo/protobuf/gogoproto +// +// 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 unmarshalmerge; + +import "github.com/gogo/protobuf/gogoproto/gogo.proto"; + +option (gogoproto.equal_all) = true; +option (gogoproto.verbose_equal_all) = true; +option (gogoproto.stringer_all) = true; +option (gogoproto.gostring_all) = true; +option (gogoproto.goproto_stringer_all) = false; + +option (gogoproto.testgen_all) = true; +option (gogoproto.populate_all) = true; +option (gogoproto.benchgen_all) = true; + +message Big { + option (gogoproto.unmarshaler) = true; + optional Sub Sub = 1; + optional int64 Number = 2; +} + +message BigUnsafe { + option (gogoproto.unsafe_unmarshaler) = true; + optional Sub Sub = 1; + optional int64 Number = 2; +} + +message Sub { + option (gogoproto.unmarshaler) = true; + optional int64 SubNumber = 1; +} + +message IntMerge { + option (gogoproto.unmarshaler) = true; + required int64 Int64 = 1 [(gogoproto.nullable) = false]; + optional int32 Int32 = 2 [(gogoproto.nullable) = false]; + required sint32 Sint32 = 3 [(gogoproto.nullable) = false]; + optional sint64 Sint64 = 4 [(gogoproto.nullable) = false]; + optional uint64 Uint64 = 5 [(gogoproto.nullable) = false]; + required uint32 Uint32 = 6 [(gogoproto.nullable) = false]; + optional fixed64 Fixed64 = 7 [(gogoproto.nullable) = false]; + optional fixed32 Fixed32 = 8 [(gogoproto.nullable) = false]; + required sfixed32 Sfixed32 = 9 [(gogoproto.nullable) = false]; + optional sfixed64 Sfixed64 = 10 [(gogoproto.nullable) = false]; + optional bool Bool = 11 [(gogoproto.nullable) = false]; +} diff --git a/vendor/github.com/gogo/protobuf/test/unmarshalmerge/unmarshalmerge_test.go b/vendor/github.com/gogo/protobuf/test/unmarshalmerge/unmarshalmerge_test.go new file mode 100644 index 000000000..58505b7bd --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/unmarshalmerge/unmarshalmerge_test.go @@ -0,0 +1,71 @@ +package unmarshalmerge + +import ( + "github.com/gogo/protobuf/proto" + math_rand "math/rand" + "testing" + "time" +) + +func TestUnmarshalMerge(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedBig(popr, true) + if p.GetSub() == nil { + p.Sub = &Sub{SubNumber: proto.Int64(12345)} + } + data, err := proto.Marshal(p) + if err != nil { + t.Fatal(err) + } + s := &Sub{} + b := &Big{ + Sub: s, + } + err = proto.UnmarshalMerge(data, b) + if err != nil { + t.Fatal(err) + } + if s.GetSubNumber() != p.GetSub().GetSubNumber() { + t.Fatalf("should have unmarshaled subnumber into sub") + } +} + +func TestUnsafeUnmarshalMerge(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedBigUnsafe(popr, true) + if p.GetSub() == nil { + p.Sub = &Sub{SubNumber: proto.Int64(12345)} + } + data, err := proto.Marshal(p) + if err != nil { + t.Fatal(err) + } + s := &Sub{} + b := &BigUnsafe{ + Sub: s, + } + err = proto.UnmarshalMerge(data, b) + if err != nil { + t.Fatal(err) + } + + if s.GetSubNumber() != p.GetSub().GetSubNumber() { + t.Fatalf("should have unmarshaled subnumber into sub") + } +} + +func TestInt64Merge(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedIntMerge(popr, true) + p2 := NewPopulatedIntMerge(popr, true) + data, err := proto.Marshal(p2) + if err != nil { + t.Fatal(err) + } + if err := proto.UnmarshalMerge(data, p); err != nil { + t.Fatal(err) + } + if !p.Equal(p2) { + t.Fatalf("exptected %#v but got %#v", p2, p) + } +} diff --git a/vendor/github.com/gogo/protobuf/test/unmarshalmerge/unmarshalmergepb_test.go b/vendor/github.com/gogo/protobuf/test/unmarshalmerge/unmarshalmergepb_test.go new file mode 100644 index 000000000..1f353a97e --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/unmarshalmerge/unmarshalmergepb_test.go @@ -0,0 +1,700 @@ +// Code generated by protoc-gen-gogo. +// source: unmarshalmerge.proto +// DO NOT EDIT! + +/* +Package unmarshalmerge is a generated protocol buffer package. + +It is generated from these files: + unmarshalmerge.proto + +It has these top-level messages: + Big + BigUnsafe + Sub + IntMerge +*/ +package unmarshalmerge + +import testing "testing" +import math_rand "math/rand" +import time "time" +import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" +import github_com_gogo_protobuf_jsonpb "github.com/gogo/protobuf/jsonpb" +import fmt "fmt" +import go_parser "go/parser" +import proto "github.com/gogo/protobuf/proto" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +func TestBigProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedBig(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Big{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkBigProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Big, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedBig(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkBigProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedBig(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &Big{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestBigUnsafeProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedBigUnsafe(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &BigUnsafe{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkBigUnsafeProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*BigUnsafe, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedBigUnsafe(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkBigUnsafeProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedBigUnsafe(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &BigUnsafe{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestSubProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedSub(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Sub{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkSubProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Sub, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedSub(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkSubProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedSub(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &Sub{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestIntMergeProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedIntMerge(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &IntMerge{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkIntMergeProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*IntMerge, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedIntMerge(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(data) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkIntMergeProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + data, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedIntMerge(popr, false)) + if err != nil { + panic(err) + } + datas[i] = data + } + msg := &IntMerge{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestBigJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedBig(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Big{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestBigUnsafeJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedBigUnsafe(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &BigUnsafe{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestSubJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedSub(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Sub{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestIntMergeJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedIntMerge(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &IntMerge{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestBigProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedBig(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &Big{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestBigProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedBig(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &Big{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestBigUnsafeProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedBigUnsafe(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &BigUnsafe{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestBigUnsafeProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedBigUnsafe(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &BigUnsafe{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestSubProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedSub(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &Sub{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestSubProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedSub(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &Sub{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestIntMergeProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedIntMerge(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &IntMerge{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestIntMergeProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedIntMerge(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &IntMerge{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestBigVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedBig(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &Big{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestBigUnsafeVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedBigUnsafe(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &BigUnsafe{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestSubVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedSub(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &Sub{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestIntMergeVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedIntMerge(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &IntMerge{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestBigGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedBig(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestBigUnsafeGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedBigUnsafe(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestSubGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedSub(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestIntMergeGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedIntMerge(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestBigStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedBig(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestBigUnsafeStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedBigUnsafe(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestSubStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedSub(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestIntMergeStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedIntMerge(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} + +//These tests are generated by github.com/gogo/protobuf/plugin/testgen diff --git a/vendor/github.com/gogo/protobuf/test/unrecognized/Makefile b/vendor/github.com/gogo/protobuf/test/unrecognized/Makefile new file mode 100644 index 000000000..bb731f099 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/unrecognized/Makefile @@ -0,0 +1,30 @@ +# Extensions for Protocol Buffers to create more go like structures. +# +# Copyright (c) 2013, Vastech SA (PTY) LTD. 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: + (protoc --proto_path=../../../../../:../../protobuf/:. --gogo_out=. unrecognized.proto) diff --git a/vendor/github.com/gogo/protobuf/test/unrecognized/oldnew_test.go b/vendor/github.com/gogo/protobuf/test/unrecognized/oldnew_test.go new file mode 100644 index 000000000..005e37dc3 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/unrecognized/oldnew_test.go @@ -0,0 +1,198 @@ +// Copyright (c) 2013, Vastech SA (PTY) LTD. All rights reserved. +// http://github.com/gogo/protobuf/gogoproto +// +// 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 unrecognized + +import ( + "github.com/gogo/protobuf/proto" + math_rand "math/rand" + "testing" + time "time" +) + +func TestNewOld(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + newer := NewPopulatedA(popr, true) + data1, err := proto.Marshal(newer) + if err != nil { + panic(err) + } + older := &OldA{} + if err = proto.Unmarshal(data1, older); err != nil { + panic(err) + } + data2, err := proto.Marshal(older) + if err != nil { + panic(err) + } + bluer := &A{} + if err := proto.Unmarshal(data2, bluer); err != nil { + panic(err) + } + if err := newer.VerboseEqual(bluer); err != nil { + t.Fatalf("%#v !VerboseProto %#v, since %v", newer, bluer, err) + } +} + +func TestOldNew(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + older := NewPopulatedOldA(popr, true) + data1, err := proto.Marshal(older) + if err != nil { + panic(err) + } + newer := &A{} + if err = proto.Unmarshal(data1, newer); err != nil { + panic(err) + } + data2, err := proto.Marshal(newer) + if err != nil { + panic(err) + } + bluer := &OldA{} + if err := proto.Unmarshal(data2, bluer); err != nil { + panic(err) + } + if err := older.VerboseEqual(bluer); err != nil { + t.Fatalf("%#v !VerboseProto %#v, since %v", older, bluer, err) + } +} + +func TestOldNewOldNew(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + older := NewPopulatedOldA(popr, true) + data1, err := proto.Marshal(older) + if err != nil { + panic(err) + } + newer := &A{} + if err = proto.Unmarshal(data1, newer); err != nil { + panic(err) + } + data2, err := proto.Marshal(newer) + if err != nil { + panic(err) + } + bluer := &OldA{} + if err = proto.Unmarshal(data2, bluer); err != nil { + panic(err) + } + if err = older.VerboseEqual(bluer); err != nil { + t.Fatalf("%#v !VerboseProto %#v, since %v", older, bluer, err) + } + + data3, err := proto.Marshal(bluer) + if err != nil { + panic(err) + } + purple := &A{} + if err = proto.Unmarshal(data3, purple); err != nil { + panic(err) + } + data4, err := proto.Marshal(purple) + if err != nil { + panic(err) + } + magenta := &OldA{} + if err := proto.Unmarshal(data4, magenta); err != nil { + panic(err) + } + if err := older.VerboseEqual(magenta); err != nil { + t.Fatalf("%#v !VerboseProto %#v, since %v", older, magenta, err) + } +} + +func TestOldUToU(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + older := NewPopulatedOldU(popr, true) + // need optional field to be always initialized, to check it's lost in this test + older.Field1 = proto.String(randStringUnrecognized(popr)) + data1, err := proto.Marshal(older) + if err != nil { + panic(err) + } + + newer := &U{} + if err = proto.Unmarshal(data1, newer); err != nil { + panic(err) + } + data2, err := proto.Marshal(newer) + if err != nil { + panic(err) + } + + older2 := &OldU{} + if err := proto.Unmarshal(data2, older2); err != nil { + panic(err) + } + + // check that Field1 is lost + if older2.Field1 != nil { + t.Fatalf("field must be lost, but it's not, older: %#v, older2: %#v", older, older2) + } + + // now restore Field1 and messages should be equal now + older2.Field1 = older.Field1 + if err := older.VerboseEqual(older2); err != nil { + t.Fatalf("%#v !VerboseProto %#v, since %v", older, older2, err) + } +} + +func TestOldUnoM(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + older := NewPopulatedOldUnoM(popr, true) + // need optional field to be always initialized, to check it's lost in this test + older.Field1 = proto.String(randStringUnrecognized(popr)) + data1, err := proto.Marshal(older) + if err != nil { + panic(err) + } + + newer := &UnoM{} + if err = proto.Unmarshal(data1, newer); err != nil { + panic(err) + } + data2, err := proto.Marshal(newer) + if err != nil { + panic(err) + } + + older2 := &OldUnoM{} + if err := proto.Unmarshal(data2, older2); err != nil { + panic(err) + } + + // check that Field1 is lost + if older2.Field1 != nil { + t.Fatalf("field must be lost, but it's not, older: %#v, older2: %#v", older, older2) + } + + // now restore Field1 and messages should be equal now + older2.Field1 = older.Field1 + if err := older.VerboseEqual(older2); err != nil { + t.Fatalf("%#v !VerboseProto %#v, since %v", older, older2, err) + } +} diff --git a/vendor/github.com/gogo/protobuf/test/unrecognized/unrecognized.pb.go b/vendor/github.com/gogo/protobuf/test/unrecognized/unrecognized.pb.go new file mode 100644 index 000000000..1d537578b --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/unrecognized/unrecognized.pb.go @@ -0,0 +1,4060 @@ +// Code generated by protoc-gen-gogo. +// source: unrecognized.proto +// DO NOT EDIT! + +/* + Package unrecognized is a generated protocol buffer package. + + It is generated from these files: + unrecognized.proto + + It has these top-level messages: + A + B + D + C + U + UnoM + OldA + OldB + OldC + OldU + OldUnoM +*/ +package unrecognized + +import proto "github.com/gogo/protobuf/proto" +import fmt "fmt" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" + +import github_com_gogo_protobuf_protoc_gen_gogo_descriptor "github.com/gogo/protobuf/protoc-gen-gogo/descriptor" +import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" +import compress_gzip "compress/gzip" +import bytes "bytes" +import io_ioutil "io/ioutil" + +import strings "strings" +import sort "sort" +import strconv "strconv" +import reflect "reflect" + +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. +const _ = proto.GoGoProtoPackageIsVersion1 + +type A struct { + Field1 *int64 `protobuf:"varint,2,opt,name=Field1,json=field1" json:"Field1,omitempty"` + B []*B `protobuf:"bytes,1,rep,name=B,json=b" json:"B,omitempty"` +} + +func (m *A) Reset() { *m = A{} } +func (*A) ProtoMessage() {} +func (*A) Descriptor() ([]byte, []int) { return fileDescriptorUnrecognized, []int{0} } + +type B struct { + C *C `protobuf:"bytes,1,opt,name=C,json=c" json:"C,omitempty"` + D *D `protobuf:"bytes,2,opt,name=D,json=d" json:"D,omitempty"` + F *OldC `protobuf:"bytes,5,opt,name=F,json=f" json:"F,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *B) Reset() { *m = B{} } +func (*B) ProtoMessage() {} +func (*B) Descriptor() ([]byte, []int) { return fileDescriptorUnrecognized, []int{1} } + +type D struct { + Field1 *int64 `protobuf:"varint,1,opt,name=Field1,json=field1" json:"Field1,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *D) Reset() { *m = D{} } +func (*D) ProtoMessage() {} +func (*D) Descriptor() ([]byte, []int) { return fileDescriptorUnrecognized, []int{2} } + +type C struct { + Field2 *float64 `protobuf:"fixed64,2,opt,name=Field2,json=field2" json:"Field2,omitempty"` + Field3 *string `protobuf:"bytes,3,opt,name=Field3,json=field3" json:"Field3,omitempty"` + Field4 *float64 `protobuf:"fixed64,4,opt,name=Field4,json=field4" json:"Field4,omitempty"` + Field5 [][]byte `protobuf:"bytes,5,rep,name=Field5,json=field5" json:"Field5,omitempty"` + Field6 *int64 `protobuf:"varint,6,opt,name=Field6,json=field6" json:"Field6,omitempty"` + Field7 []float32 `protobuf:"fixed32,7,rep,name=Field7,json=field7" json:"Field7,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *C) Reset() { *m = C{} } +func (*C) ProtoMessage() {} +func (*C) Descriptor() ([]byte, []int) { return fileDescriptorUnrecognized, []int{3} } + +type U struct { + Field2 []float64 `protobuf:"fixed64,2,rep,name=Field2,json=field2" json:"Field2,omitempty"` + Field3 *uint32 `protobuf:"varint,3,opt,name=Field3,json=field3" json:"Field3,omitempty"` +} + +func (m *U) Reset() { *m = U{} } +func (*U) ProtoMessage() {} +func (*U) Descriptor() ([]byte, []int) { return fileDescriptorUnrecognized, []int{4} } + +type UnoM struct { + Field2 []float64 `protobuf:"fixed64,2,rep,name=Field2,json=field2" json:"Field2,omitempty"` + Field3 *uint32 `protobuf:"varint,3,opt,name=Field3,json=field3" json:"Field3,omitempty"` +} + +func (m *UnoM) Reset() { *m = UnoM{} } +func (*UnoM) ProtoMessage() {} +func (*UnoM) Descriptor() ([]byte, []int) { return fileDescriptorUnrecognized, []int{5} } + +type OldA struct { + Field1 *int64 `protobuf:"varint,2,opt,name=Field1,json=field1" json:"Field1,omitempty"` + B []*OldB `protobuf:"bytes,1,rep,name=B,json=b" json:"B,omitempty"` +} + +func (m *OldA) Reset() { *m = OldA{} } +func (*OldA) ProtoMessage() {} +func (*OldA) Descriptor() ([]byte, []int) { return fileDescriptorUnrecognized, []int{6} } + +type OldB struct { + C *OldC `protobuf:"bytes,1,opt,name=C,json=c" json:"C,omitempty"` + F *OldC `protobuf:"bytes,5,opt,name=F,json=f" json:"F,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *OldB) Reset() { *m = OldB{} } +func (*OldB) ProtoMessage() {} +func (*OldB) Descriptor() ([]byte, []int) { return fileDescriptorUnrecognized, []int{7} } + +type OldC struct { + Field1 *int64 `protobuf:"varint,1,opt,name=Field1,json=field1" json:"Field1,omitempty"` + Field2 *float64 `protobuf:"fixed64,2,opt,name=Field2,json=field2" json:"Field2,omitempty"` + Field3 *string `protobuf:"bytes,3,opt,name=Field3,json=field3" json:"Field3,omitempty"` + Field6 *int64 `protobuf:"varint,6,opt,name=Field6,json=field6" json:"Field6,omitempty"` + Field7 []float32 `protobuf:"fixed32,7,rep,name=Field7,json=field7" json:"Field7,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *OldC) Reset() { *m = OldC{} } +func (*OldC) ProtoMessage() {} +func (*OldC) Descriptor() ([]byte, []int) { return fileDescriptorUnrecognized, []int{8} } + +type OldU struct { + Field1 *string `protobuf:"bytes,1,opt,name=Field1,json=field1" json:"Field1,omitempty"` + Field2 []float64 `protobuf:"fixed64,2,rep,name=Field2,json=field2" json:"Field2,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *OldU) Reset() { *m = OldU{} } +func (*OldU) ProtoMessage() {} +func (*OldU) Descriptor() ([]byte, []int) { return fileDescriptorUnrecognized, []int{9} } + +type OldUnoM struct { + Field1 *string `protobuf:"bytes,1,opt,name=Field1,json=field1" json:"Field1,omitempty"` + Field2 []float64 `protobuf:"fixed64,2,rep,name=Field2,json=field2" json:"Field2,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *OldUnoM) Reset() { *m = OldUnoM{} } +func (*OldUnoM) ProtoMessage() {} +func (*OldUnoM) Descriptor() ([]byte, []int) { return fileDescriptorUnrecognized, []int{10} } + +func init() { + proto.RegisterType((*A)(nil), "unrecognized.A") + proto.RegisterType((*B)(nil), "unrecognized.B") + proto.RegisterType((*D)(nil), "unrecognized.D") + proto.RegisterType((*C)(nil), "unrecognized.C") + proto.RegisterType((*U)(nil), "unrecognized.U") + proto.RegisterType((*UnoM)(nil), "unrecognized.UnoM") + proto.RegisterType((*OldA)(nil), "unrecognized.OldA") + proto.RegisterType((*OldB)(nil), "unrecognized.OldB") + proto.RegisterType((*OldC)(nil), "unrecognized.OldC") + proto.RegisterType((*OldU)(nil), "unrecognized.OldU") + proto.RegisterType((*OldUnoM)(nil), "unrecognized.OldUnoM") +} +func (this *A) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return UnrecognizedDescription() +} +func (this *B) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return UnrecognizedDescription() +} +func (this *D) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return UnrecognizedDescription() +} +func (this *C) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return UnrecognizedDescription() +} +func (this *U) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return UnrecognizedDescription() +} +func (this *UnoM) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return UnrecognizedDescription() +} +func (this *OldA) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return UnrecognizedDescription() +} +func (this *OldB) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return UnrecognizedDescription() +} +func (this *OldC) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return UnrecognizedDescription() +} +func (this *OldU) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return UnrecognizedDescription() +} +func (this *OldUnoM) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return UnrecognizedDescription() +} +func UnrecognizedDescription() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + d := &github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet{} + var gzipped = []byte{ + // 3542 bytes of a gzipped FileDescriptorSet + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xcc, 0x5a, 0x5b, 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0x9c, 0x7c, 0x02, 0x46, 0xec, 0xa6, 0x8b, 0xbf, + 0x9c, 0x6c, 0x1c, 0xfd, 0x93, 0x3c, 0x7a, 0x6d, 0xdf, 0x40, 0x28, 0x33, 0x1d, 0x45, 0x28, 0xcb, + 0xf3, 0x90, 0x71, 0xec, 0x76, 0x4b, 0x37, 0x54, 0xdd, 0xae, 0x1a, 0x6a, 0xdd, 0x5a, 0xb7, 0xb3, + 0x09, 0x4a, 0xb0, 0xbf, 0xf7, 0x45, 0xa8, 0x62, 0x11, 0xf5, 0xe6, 0x51, 0x4d, 0x49, 0x3b, 0x81, + 0x7b, 0x79, 0x17, 0x0c, 0x3b, 0x9b, 0x96, 0xab, 0x5d, 0xca, 0xa6, 0x68, 0x84, 0xf0, 0xbb, 0xdc, + 0x3f, 0x63, 0x30, 0x36, 0x48, 0x88, 0xdd, 0x09, 0xb1, 0x75, 0xf2, 0x96, 0x18, 0x60, 0x3b, 0xb0, + 0x01, 0xc3, 0x04, 0x8d, 0x38, 0xfc, 0x3e, 0x8d, 0x58, 0x80, 0xa4, 0x65, 0x38, 0xae, 0x51, 0x65, + 0x11, 0x11, 0x19, 0x30, 0xa6, 0x80, 0x81, 0x7a, 0x43, 0x2a, 0xfa, 0xbe, 0x42, 0xea, 0x1c, 0x8c, + 0x79, 0x53, 0x52, 0x5b, 0x9a, 0x55, 0x13, 0xb1, 0x79, 0x24, 0x6c, 0x26, 0xd3, 0x25, 0x81, 0x53, + 0x08, 0x4c, 0x49, 0x1b, 0x81, 0x7b, 0x79, 0x16, 0xc0, 0xb6, 0x0c, 0x7b, 0x1d, 0x97, 0x97, 0x6e, + 0x62, 0x9c, 0xf4, 0xb7, 0x52, 0x99, 0xa8, 0xf4, 0x58, 0xc9, 0x66, 0x52, 0xdd, 0x94, 0x4f, 0x77, + 0x42, 0x6d, 0x64, 0x8b, 0x48, 0x59, 0x64, 0x8b, 0xac, 0x27, 0xda, 0x2a, 0x90, 0x6e, 0x19, 0x24, + 0xee, 0xd1, 0xc4, 0xec, 0xcd, 0x12, 0x74, 0x12, 0xd3, 0xa1, 0x6f, 0xa6, 0x70, 0x18, 0x7b, 0xb1, + 0xd1, 0x96, 0xff, 0x56, 0xbe, 0x0e, 0x3c, 0x81, 0x4a, 0xc3, 0x0a, 0x68, 0x16, 0x4a, 0x09, 0xe1, + 0x12, 0xca, 0xa6, 0x4e, 0x41, 0x3a, 0x68, 0x1e, 0x79, 0x12, 0x62, 0x8e, 0xab, 0xb5, 0x5c, 0x1a, + 0x85, 0x31, 0x85, 0xdd, 0xc8, 0x19, 0x88, 0x60, 0x92, 0xa1, 0x59, 0x2e, 0xa6, 0x90, 0x9f, 0x53, + 0x27, 0x61, 0x34, 0xf0, 0xf8, 0x41, 0x81, 0xb9, 0x27, 0x86, 0x61, 0xb2, 0x5f, 0xcc, 0xf5, 0x0d, + 0x7f, 0x5c, 0x3e, 0x18, 0x01, 0x6b, 0x46, 0x0b, 0xe3, 0x8e, 0x30, 0xf0, 0x3b, 0x8c, 0xa8, 0x98, + 0xa9, 0xad, 0x19, 0x26, 0x46, 0x93, 0x74, 0x28, 0x7d, 0xf4, 0x96, 0x81, 0xa2, 0x7a, 0x7a, 0x81, + 0x40, 0x14, 0x86, 0x94, 0xef, 0x82, 0x28, 0x4f, 0x71, 0x84, 0xe1, 0xf0, 0x60, 0x0c, 0x24, 0x16, + 0x15, 0x8a, 0x93, 0xaf, 0x81, 0x04, 0xf9, 0x9f, 0xd9, 0x76, 0x98, 0xce, 0x39, 0x4e, 0x04, 0xc4, + 0xae, 0xf2, 0x14, 0xc4, 0x69, 0x98, 0x55, 0x0d, 0x51, 0x1a, 0xbc, 0x7b, 0xe2, 0x98, 0xaa, 0xb1, + 0xae, 0xb5, 0x4d, 0x57, 0xbd, 0xa8, 0x99, 0x6d, 0x83, 0x06, 0x0c, 0x3a, 0x86, 0x0b, 0xef, 0x25, + 0x32, 0x79, 0x3f, 0x24, 0x59, 0x54, 0xd6, 0x11, 0x73, 0x89, 0x66, 0x9f, 0x98, 0xc2, 0x02, 0x75, + 0x9e, 0x48, 0xc8, 0xe3, 0xcf, 0x3b, 0xb8, 0x16, 0xb8, 0x6b, 0xe9, 0x23, 0x88, 0x80, 0x3e, 0xfe, + 0x64, 0x77, 0xe2, 0xdb, 0xdb, 0xff, 0xf5, 0xba, 0x63, 0x31, 0xf7, 0xe3, 0x21, 0x88, 0xd2, 0xf5, + 0x36, 0x06, 0xc9, 0xd5, 0xfb, 0x97, 0x4b, 0xea, 0x6c, 0xb9, 0x32, 0xb3, 0x50, 0xca, 0x48, 0x72, + 0x1a, 0x80, 0x0a, 0xce, 0x2c, 0x94, 0x0b, 0xab, 0x99, 0x21, 0xef, 0x7e, 0x7e, 0x69, 0xf5, 0xc4, + 0xb1, 0x4c, 0xc4, 0x03, 0x54, 0x98, 0x20, 0xea, 0x57, 0xb8, 0xe3, 0x68, 0x26, 0x86, 0x91, 0x90, + 0x62, 0x04, 0xf3, 0xe7, 0x4a, 0xb3, 0xa8, 0x31, 0x1c, 0x94, 0xa0, 0xce, 0x88, 0x3c, 0x0a, 0x09, + 0x2a, 0x99, 0x29, 0x97, 0x17, 0x32, 0x71, 0x8f, 0x73, 0x65, 0x55, 0x99, 0x5f, 0x9a, 0xcb, 0x24, + 0x3c, 0xce, 0x39, 0xa5, 0x5c, 0x59, 0xce, 0x80, 0xc7, 0xb0, 0x58, 0x5a, 0x59, 0x29, 0xcc, 0x95, + 0x32, 0x49, 0x4f, 0x63, 0xe6, 0xfe, 0xd5, 0xd2, 0x4a, 0x26, 0x15, 0x98, 0x16, 0x3e, 0x62, 0xd4, + 0x7b, 0x44, 0x69, 0xa9, 0xb2, 0x98, 0x49, 0xcb, 0xe3, 0x30, 0xca, 0x1e, 0x21, 0x26, 0x31, 0xd6, + 0x25, 0xc2, 0x99, 0x66, 0x3a, 0x13, 0x61, 0x2c, 0xe3, 0x01, 0x01, 0x6a, 0xc8, 0xb9, 0x22, 0xc4, + 0x68, 0x74, 0x61, 0x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 0xdf, 0x31, 0x03, 0x42, 0xf3, 0x29, 0xbf, 0x63, 0x66, 0x8e, + 0xbd, 0xf1, 0xf6, 0xbe, 0xab, 0xde, 0xc4, 0xeb, 0xb7, 0x78, 0xbd, 0xf5, 0xf6, 0x3e, 0xe9, 0x3d, + 0xbc, 0xfe, 0x85, 0xd7, 0xc3, 0xbf, 0xdf, 0x27, 0xbd, 0x8c, 0xd7, 0xab, 0x78, 0xfd, 0x04, 0xaf, + 0x37, 0xf0, 0x7a, 0x13, 0xaf, 0xb7, 0xf0, 0xfa, 0x77, 0x00, 0x00, 0x00, 0xff, 0xff, 0x03, 0x4d, + 0xea, 0x3b, 0x68, 0x2e, 0x00, 0x00, + } + r := bytes.NewReader(gzipped) + gzipr, err := compress_gzip.NewReader(r) + if err != nil { + panic(err) + } + ungzipped, err := io_ioutil.ReadAll(gzipr) + if err != nil { + panic(err) + } + if err := github_com_gogo_protobuf_proto.Unmarshal(ungzipped, d); err != nil { + panic(err) + } + return d +} +func (this *A) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*A) + if !ok { + that2, ok := that.(A) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *A") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *A but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *A but is not nil && this == nil") + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) + } + } else if this.Field1 != nil { + return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") + } else if that1.Field1 != nil { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) + } + if len(this.B) != len(that1.B) { + return fmt.Errorf("B this(%v) Not Equal that(%v)", len(this.B), len(that1.B)) + } + for i := range this.B { + if !this.B[i].Equal(that1.B[i]) { + return fmt.Errorf("B this[%v](%v) Not Equal that[%v](%v)", i, this.B[i], i, that1.B[i]) + } + } + return nil +} +func (this *A) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*A) + if !ok { + that2, ok := that.(A) + 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.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return false + } + } else if this.Field1 != nil { + return false + } else if that1.Field1 != nil { + return false + } + if len(this.B) != len(that1.B) { + return false + } + for i := range this.B { + if !this.B[i].Equal(that1.B[i]) { + return false + } + } + return true +} +func (this *B) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*B) + if !ok { + that2, ok := that.(B) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *B") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *B but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *B but is not nil && this == nil") + } + if !this.C.Equal(that1.C) { + return fmt.Errorf("C this(%v) Not Equal that(%v)", this.C, that1.C) + } + if !this.D.Equal(that1.D) { + return fmt.Errorf("D this(%v) Not Equal that(%v)", this.D, that1.D) + } + if !this.F.Equal(that1.F) { + return fmt.Errorf("F this(%v) Not Equal that(%v)", this.F, that1.F) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *B) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*B) + if !ok { + that2, ok := that.(B) + 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.C.Equal(that1.C) { + return false + } + if !this.D.Equal(that1.D) { + return false + } + if !this.F.Equal(that1.F) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *D) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*D) + if !ok { + that2, ok := that.(D) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *D") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *D but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *D but is not nil && this == nil") + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) + } + } else if this.Field1 != nil { + return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") + } else if that1.Field1 != nil { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *D) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*D) + if !ok { + that2, ok := that.(D) + 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.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return false + } + } else if this.Field1 != nil { + return false + } else if that1.Field1 != nil { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *C) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*C) + if !ok { + that2, ok := that.(C) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *C") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *C but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *C but is not nil && this == nil") + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", *this.Field2, *that1.Field2) + } + } else if this.Field2 != nil { + return fmt.Errorf("this.Field2 == nil && that.Field2 != nil") + } else if that1.Field2 != nil { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) + } + if this.Field3 != nil && that1.Field3 != nil { + if *this.Field3 != *that1.Field3 { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", *this.Field3, *that1.Field3) + } + } else if this.Field3 != nil { + return fmt.Errorf("this.Field3 == nil && that.Field3 != nil") + } else if that1.Field3 != nil { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", this.Field3, that1.Field3) + } + if this.Field4 != nil && that1.Field4 != nil { + if *this.Field4 != *that1.Field4 { + return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", *this.Field4, *that1.Field4) + } + } else if this.Field4 != nil { + return fmt.Errorf("this.Field4 == nil && that.Field4 != nil") + } else if that1.Field4 != nil { + return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", this.Field4, that1.Field4) + } + if len(this.Field5) != len(that1.Field5) { + return fmt.Errorf("Field5 this(%v) Not Equal that(%v)", len(this.Field5), len(that1.Field5)) + } + for i := range this.Field5 { + if !bytes.Equal(this.Field5[i], that1.Field5[i]) { + return fmt.Errorf("Field5 this[%v](%v) Not Equal that[%v](%v)", i, this.Field5[i], i, that1.Field5[i]) + } + } + if this.Field6 != nil && that1.Field6 != nil { + if *this.Field6 != *that1.Field6 { + return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", *this.Field6, *that1.Field6) + } + } else if this.Field6 != nil { + return fmt.Errorf("this.Field6 == nil && that.Field6 != nil") + } else if that1.Field6 != nil { + return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", this.Field6, that1.Field6) + } + if len(this.Field7) != len(that1.Field7) { + return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", len(this.Field7), len(that1.Field7)) + } + for i := range this.Field7 { + if this.Field7[i] != that1.Field7[i] { + return fmt.Errorf("Field7 this[%v](%v) Not Equal that[%v](%v)", i, this.Field7[i], i, that1.Field7[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *C) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*C) + if !ok { + that2, ok := that.(C) + 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.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + return false + } + } else if this.Field2 != nil { + return false + } else if that1.Field2 != nil { + return false + } + if this.Field3 != nil && that1.Field3 != nil { + if *this.Field3 != *that1.Field3 { + return false + } + } else if this.Field3 != nil { + return false + } else if that1.Field3 != nil { + return false + } + if this.Field4 != nil && that1.Field4 != nil { + if *this.Field4 != *that1.Field4 { + return false + } + } else if this.Field4 != nil { + return false + } else if that1.Field4 != nil { + return false + } + if len(this.Field5) != len(that1.Field5) { + return false + } + for i := range this.Field5 { + if !bytes.Equal(this.Field5[i], that1.Field5[i]) { + return false + } + } + if this.Field6 != nil && that1.Field6 != nil { + if *this.Field6 != *that1.Field6 { + return false + } + } else if this.Field6 != nil { + return false + } else if that1.Field6 != nil { + return false + } + if len(this.Field7) != len(that1.Field7) { + return false + } + for i := range this.Field7 { + if this.Field7[i] != that1.Field7[i] { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *U) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*U) + if !ok { + that2, ok := that.(U) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *U") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *U but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *U but is not nil && this == nil") + } + if len(this.Field2) != len(that1.Field2) { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", len(this.Field2), len(that1.Field2)) + } + for i := range this.Field2 { + if this.Field2[i] != that1.Field2[i] { + return fmt.Errorf("Field2 this[%v](%v) Not Equal that[%v](%v)", i, this.Field2[i], i, that1.Field2[i]) + } + } + if this.Field3 != nil && that1.Field3 != nil { + if *this.Field3 != *that1.Field3 { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", *this.Field3, *that1.Field3) + } + } else if this.Field3 != nil { + return fmt.Errorf("this.Field3 == nil && that.Field3 != nil") + } else if that1.Field3 != nil { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", this.Field3, that1.Field3) + } + return nil +} +func (this *U) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*U) + if !ok { + that2, ok := that.(U) + 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.Field2) != len(that1.Field2) { + return false + } + for i := range this.Field2 { + if this.Field2[i] != that1.Field2[i] { + return false + } + } + if this.Field3 != nil && that1.Field3 != nil { + if *this.Field3 != *that1.Field3 { + return false + } + } else if this.Field3 != nil { + return false + } else if that1.Field3 != nil { + return false + } + return true +} +func (this *UnoM) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*UnoM) + if !ok { + that2, ok := that.(UnoM) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *UnoM") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *UnoM but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *UnoM but is not nil && this == nil") + } + if len(this.Field2) != len(that1.Field2) { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", len(this.Field2), len(that1.Field2)) + } + for i := range this.Field2 { + if this.Field2[i] != that1.Field2[i] { + return fmt.Errorf("Field2 this[%v](%v) Not Equal that[%v](%v)", i, this.Field2[i], i, that1.Field2[i]) + } + } + if this.Field3 != nil && that1.Field3 != nil { + if *this.Field3 != *that1.Field3 { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", *this.Field3, *that1.Field3) + } + } else if this.Field3 != nil { + return fmt.Errorf("this.Field3 == nil && that.Field3 != nil") + } else if that1.Field3 != nil { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", this.Field3, that1.Field3) + } + return nil +} +func (this *UnoM) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*UnoM) + if !ok { + that2, ok := that.(UnoM) + 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.Field2) != len(that1.Field2) { + return false + } + for i := range this.Field2 { + if this.Field2[i] != that1.Field2[i] { + return false + } + } + if this.Field3 != nil && that1.Field3 != nil { + if *this.Field3 != *that1.Field3 { + return false + } + } else if this.Field3 != nil { + return false + } else if that1.Field3 != nil { + return false + } + return true +} +func (this *OldA) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*OldA) + if !ok { + that2, ok := that.(OldA) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *OldA") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *OldA but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *OldA but is not nil && this == nil") + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) + } + } else if this.Field1 != nil { + return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") + } else if that1.Field1 != nil { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) + } + if len(this.B) != len(that1.B) { + return fmt.Errorf("B this(%v) Not Equal that(%v)", len(this.B), len(that1.B)) + } + for i := range this.B { + if !this.B[i].Equal(that1.B[i]) { + return fmt.Errorf("B this[%v](%v) Not Equal that[%v](%v)", i, this.B[i], i, that1.B[i]) + } + } + return nil +} +func (this *OldA) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*OldA) + if !ok { + that2, ok := that.(OldA) + 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.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return false + } + } else if this.Field1 != nil { + return false + } else if that1.Field1 != nil { + return false + } + if len(this.B) != len(that1.B) { + return false + } + for i := range this.B { + if !this.B[i].Equal(that1.B[i]) { + return false + } + } + return true +} +func (this *OldB) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*OldB) + if !ok { + that2, ok := that.(OldB) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *OldB") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *OldB but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *OldB but is not nil && this == nil") + } + if !this.C.Equal(that1.C) { + return fmt.Errorf("C this(%v) Not Equal that(%v)", this.C, that1.C) + } + if !this.F.Equal(that1.F) { + return fmt.Errorf("F this(%v) Not Equal that(%v)", this.F, that1.F) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *OldB) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*OldB) + if !ok { + that2, ok := that.(OldB) + 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.C.Equal(that1.C) { + return false + } + if !this.F.Equal(that1.F) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *OldC) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*OldC) + if !ok { + that2, ok := that.(OldC) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *OldC") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *OldC but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *OldC but is not nil && this == nil") + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) + } + } else if this.Field1 != nil { + return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") + } else if that1.Field1 != nil { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", *this.Field2, *that1.Field2) + } + } else if this.Field2 != nil { + return fmt.Errorf("this.Field2 == nil && that.Field2 != nil") + } else if that1.Field2 != nil { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) + } + if this.Field3 != nil && that1.Field3 != nil { + if *this.Field3 != *that1.Field3 { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", *this.Field3, *that1.Field3) + } + } else if this.Field3 != nil { + return fmt.Errorf("this.Field3 == nil && that.Field3 != nil") + } else if that1.Field3 != nil { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", this.Field3, that1.Field3) + } + if this.Field6 != nil && that1.Field6 != nil { + if *this.Field6 != *that1.Field6 { + return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", *this.Field6, *that1.Field6) + } + } else if this.Field6 != nil { + return fmt.Errorf("this.Field6 == nil && that.Field6 != nil") + } else if that1.Field6 != nil { + return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", this.Field6, that1.Field6) + } + if len(this.Field7) != len(that1.Field7) { + return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", len(this.Field7), len(that1.Field7)) + } + for i := range this.Field7 { + if this.Field7[i] != that1.Field7[i] { + return fmt.Errorf("Field7 this[%v](%v) Not Equal that[%v](%v)", i, this.Field7[i], i, that1.Field7[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *OldC) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*OldC) + if !ok { + that2, ok := that.(OldC) + 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.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return false + } + } else if this.Field1 != nil { + return false + } else if that1.Field1 != nil { + return false + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + return false + } + } else if this.Field2 != nil { + return false + } else if that1.Field2 != nil { + return false + } + if this.Field3 != nil && that1.Field3 != nil { + if *this.Field3 != *that1.Field3 { + return false + } + } else if this.Field3 != nil { + return false + } else if that1.Field3 != nil { + return false + } + if this.Field6 != nil && that1.Field6 != nil { + if *this.Field6 != *that1.Field6 { + return false + } + } else if this.Field6 != nil { + return false + } else if that1.Field6 != nil { + return false + } + if len(this.Field7) != len(that1.Field7) { + return false + } + for i := range this.Field7 { + if this.Field7[i] != that1.Field7[i] { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *OldU) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*OldU) + if !ok { + that2, ok := that.(OldU) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *OldU") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *OldU but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *OldU but is not nil && this == nil") + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) + } + } else if this.Field1 != nil { + return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") + } else if that1.Field1 != nil { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) + } + if len(this.Field2) != len(that1.Field2) { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", len(this.Field2), len(that1.Field2)) + } + for i := range this.Field2 { + if this.Field2[i] != that1.Field2[i] { + return fmt.Errorf("Field2 this[%v](%v) Not Equal that[%v](%v)", i, this.Field2[i], i, that1.Field2[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *OldU) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*OldU) + if !ok { + that2, ok := that.(OldU) + 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.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return false + } + } else if this.Field1 != nil { + return false + } else if that1.Field1 != nil { + return false + } + if len(this.Field2) != len(that1.Field2) { + return false + } + for i := range this.Field2 { + if this.Field2[i] != that1.Field2[i] { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *OldUnoM) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*OldUnoM) + if !ok { + that2, ok := that.(OldUnoM) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *OldUnoM") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *OldUnoM but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *OldUnoM but is not nil && this == nil") + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) + } + } else if this.Field1 != nil { + return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") + } else if that1.Field1 != nil { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) + } + if len(this.Field2) != len(that1.Field2) { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", len(this.Field2), len(that1.Field2)) + } + for i := range this.Field2 { + if this.Field2[i] != that1.Field2[i] { + return fmt.Errorf("Field2 this[%v](%v) Not Equal that[%v](%v)", i, this.Field2[i], i, that1.Field2[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *OldUnoM) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*OldUnoM) + if !ok { + that2, ok := that.(OldUnoM) + 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.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return false + } + } else if this.Field1 != nil { + return false + } else if that1.Field1 != nil { + return false + } + if len(this.Field2) != len(that1.Field2) { + return false + } + for i := range this.Field2 { + if this.Field2[i] != that1.Field2[i] { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *A) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 6) + s = append(s, "&unrecognized.A{") + if this.Field1 != nil { + s = append(s, "Field1: "+valueToGoStringUnrecognized(this.Field1, "int64")+",\n") + } + if this.B != nil { + s = append(s, "B: "+fmt.Sprintf("%#v", this.B)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *B) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 7) + s = append(s, "&unrecognized.B{") + if this.C != nil { + s = append(s, "C: "+fmt.Sprintf("%#v", this.C)+",\n") + } + if this.D != nil { + s = append(s, "D: "+fmt.Sprintf("%#v", this.D)+",\n") + } + if this.F != nil { + s = append(s, "F: "+fmt.Sprintf("%#v", this.F)+",\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 *D) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&unrecognized.D{") + if this.Field1 != nil { + s = append(s, "Field1: "+valueToGoStringUnrecognized(this.Field1, "int64")+",\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 *C) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 10) + s = append(s, "&unrecognized.C{") + if this.Field2 != nil { + s = append(s, "Field2: "+valueToGoStringUnrecognized(this.Field2, "float64")+",\n") + } + if this.Field3 != nil { + s = append(s, "Field3: "+valueToGoStringUnrecognized(this.Field3, "string")+",\n") + } + if this.Field4 != nil { + s = append(s, "Field4: "+valueToGoStringUnrecognized(this.Field4, "float64")+",\n") + } + if this.Field5 != nil { + s = append(s, "Field5: "+fmt.Sprintf("%#v", this.Field5)+",\n") + } + if this.Field6 != nil { + s = append(s, "Field6: "+valueToGoStringUnrecognized(this.Field6, "int64")+",\n") + } + if this.Field7 != nil { + s = append(s, "Field7: "+fmt.Sprintf("%#v", this.Field7)+",\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 *U) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 6) + s = append(s, "&unrecognized.U{") + if this.Field2 != nil { + s = append(s, "Field2: "+fmt.Sprintf("%#v", this.Field2)+",\n") + } + if this.Field3 != nil { + s = append(s, "Field3: "+valueToGoStringUnrecognized(this.Field3, "uint32")+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *UnoM) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 6) + s = append(s, "&unrecognized.UnoM{") + if this.Field2 != nil { + s = append(s, "Field2: "+fmt.Sprintf("%#v", this.Field2)+",\n") + } + if this.Field3 != nil { + s = append(s, "Field3: "+valueToGoStringUnrecognized(this.Field3, "uint32")+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *OldA) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 6) + s = append(s, "&unrecognized.OldA{") + if this.Field1 != nil { + s = append(s, "Field1: "+valueToGoStringUnrecognized(this.Field1, "int64")+",\n") + } + if this.B != nil { + s = append(s, "B: "+fmt.Sprintf("%#v", this.B)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *OldB) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 6) + s = append(s, "&unrecognized.OldB{") + if this.C != nil { + s = append(s, "C: "+fmt.Sprintf("%#v", this.C)+",\n") + } + if this.F != nil { + s = append(s, "F: "+fmt.Sprintf("%#v", this.F)+",\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 *OldC) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 9) + s = append(s, "&unrecognized.OldC{") + if this.Field1 != nil { + s = append(s, "Field1: "+valueToGoStringUnrecognized(this.Field1, "int64")+",\n") + } + if this.Field2 != nil { + s = append(s, "Field2: "+valueToGoStringUnrecognized(this.Field2, "float64")+",\n") + } + if this.Field3 != nil { + s = append(s, "Field3: "+valueToGoStringUnrecognized(this.Field3, "string")+",\n") + } + if this.Field6 != nil { + s = append(s, "Field6: "+valueToGoStringUnrecognized(this.Field6, "int64")+",\n") + } + if this.Field7 != nil { + s = append(s, "Field7: "+fmt.Sprintf("%#v", this.Field7)+",\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 *OldU) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 6) + s = append(s, "&unrecognized.OldU{") + if this.Field1 != nil { + s = append(s, "Field1: "+valueToGoStringUnrecognized(this.Field1, "string")+",\n") + } + if this.Field2 != nil { + s = append(s, "Field2: "+fmt.Sprintf("%#v", this.Field2)+",\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 *OldUnoM) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 6) + s = append(s, "&unrecognized.OldUnoM{") + if this.Field1 != nil { + s = append(s, "Field1: "+valueToGoStringUnrecognized(this.Field1, "string")+",\n") + } + if this.Field2 != nil { + s = append(s, "Field2: "+fmt.Sprintf("%#v", this.Field2)+",\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 valueToGoStringUnrecognized(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 extensionToGoStringUnrecognized(e map[int32]github_com_gogo_protobuf_proto.Extension) string { + if e == nil { + return "nil" + } + s := "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 +} +func (m *A) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *A) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.B) > 0 { + for _, msg := range m.B { + data[i] = 0xa + i++ + i = encodeVarintUnrecognized(data, i, uint64(msg.Size())) + n, err := msg.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n + } + } + if m.Field1 != nil { + data[i] = 0x10 + i++ + i = encodeVarintUnrecognized(data, i, uint64(*m.Field1)) + } + return i, nil +} + +func (m *B) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *B) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.C != nil { + data[i] = 0xa + i++ + i = encodeVarintUnrecognized(data, i, uint64(m.C.Size())) + n1, err := m.C.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n1 + } + if m.D != nil { + data[i] = 0x12 + i++ + i = encodeVarintUnrecognized(data, i, uint64(m.D.Size())) + n2, err := m.D.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n2 + } + if m.F != nil { + data[i] = 0x2a + i++ + i = encodeVarintUnrecognized(data, i, uint64(m.F.Size())) + n3, err := m.F.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n3 + } + if m.XXX_unrecognized != nil { + i += copy(data[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *D) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *D) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Field1 != nil { + data[i] = 0x8 + i++ + i = encodeVarintUnrecognized(data, i, uint64(*m.Field1)) + } + if m.XXX_unrecognized != nil { + i += copy(data[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *C) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *C) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Field2 != nil { + data[i] = 0x11 + i++ + i = encodeFixed64Unrecognized(data, i, uint64(math.Float64bits(float64(*m.Field2)))) + } + if m.Field3 != nil { + data[i] = 0x1a + i++ + i = encodeVarintUnrecognized(data, i, uint64(len(*m.Field3))) + i += copy(data[i:], *m.Field3) + } + if m.Field4 != nil { + data[i] = 0x21 + i++ + i = encodeFixed64Unrecognized(data, i, uint64(math.Float64bits(float64(*m.Field4)))) + } + if len(m.Field5) > 0 { + for _, b := range m.Field5 { + data[i] = 0x2a + i++ + i = encodeVarintUnrecognized(data, i, uint64(len(b))) + i += copy(data[i:], b) + } + } + if m.Field6 != nil { + data[i] = 0x30 + i++ + i = encodeVarintUnrecognized(data, i, uint64(*m.Field6)) + } + if len(m.Field7) > 0 { + for _, num := range m.Field7 { + data[i] = 0x3d + i++ + f4 := math.Float32bits(float32(num)) + data[i] = uint8(f4) + i++ + data[i] = uint8(f4 >> 8) + i++ + data[i] = uint8(f4 >> 16) + i++ + data[i] = uint8(f4 >> 24) + i++ + } + } + if m.XXX_unrecognized != nil { + i += copy(data[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *U) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *U) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Field2) > 0 { + for _, num := range m.Field2 { + data[i] = 0x11 + i++ + f5 := math.Float64bits(float64(num)) + data[i] = uint8(f5) + i++ + data[i] = uint8(f5 >> 8) + i++ + data[i] = uint8(f5 >> 16) + i++ + data[i] = uint8(f5 >> 24) + i++ + data[i] = uint8(f5 >> 32) + i++ + data[i] = uint8(f5 >> 40) + i++ + data[i] = uint8(f5 >> 48) + i++ + data[i] = uint8(f5 >> 56) + i++ + } + } + if m.Field3 != nil { + data[i] = 0x18 + i++ + i = encodeVarintUnrecognized(data, i, uint64(*m.Field3)) + } + return i, nil +} + +func (m *OldA) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *OldA) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.B) > 0 { + for _, msg := range m.B { + data[i] = 0xa + i++ + i = encodeVarintUnrecognized(data, i, uint64(msg.Size())) + n, err := msg.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n + } + } + if m.Field1 != nil { + data[i] = 0x10 + i++ + i = encodeVarintUnrecognized(data, i, uint64(*m.Field1)) + } + return i, nil +} + +func (m *OldB) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *OldB) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.C != nil { + data[i] = 0xa + i++ + i = encodeVarintUnrecognized(data, i, uint64(m.C.Size())) + n6, err := m.C.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n6 + } + if m.F != nil { + data[i] = 0x2a + i++ + i = encodeVarintUnrecognized(data, i, uint64(m.F.Size())) + n7, err := m.F.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n7 + } + if m.XXX_unrecognized != nil { + i += copy(data[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *OldC) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *OldC) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Field1 != nil { + data[i] = 0x8 + i++ + i = encodeVarintUnrecognized(data, i, uint64(*m.Field1)) + } + if m.Field2 != nil { + data[i] = 0x11 + i++ + i = encodeFixed64Unrecognized(data, i, uint64(math.Float64bits(float64(*m.Field2)))) + } + if m.Field3 != nil { + data[i] = 0x1a + i++ + i = encodeVarintUnrecognized(data, i, uint64(len(*m.Field3))) + i += copy(data[i:], *m.Field3) + } + if m.Field6 != nil { + data[i] = 0x30 + i++ + i = encodeVarintUnrecognized(data, i, uint64(*m.Field6)) + } + if len(m.Field7) > 0 { + for _, num := range m.Field7 { + data[i] = 0x3d + i++ + f8 := math.Float32bits(float32(num)) + data[i] = uint8(f8) + i++ + data[i] = uint8(f8 >> 8) + i++ + data[i] = uint8(f8 >> 16) + i++ + data[i] = uint8(f8 >> 24) + i++ + } + } + if m.XXX_unrecognized != nil { + i += copy(data[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *OldU) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *OldU) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Field1 != nil { + data[i] = 0xa + i++ + i = encodeVarintUnrecognized(data, i, uint64(len(*m.Field1))) + i += copy(data[i:], *m.Field1) + } + if len(m.Field2) > 0 { + for _, num := range m.Field2 { + data[i] = 0x11 + i++ + f9 := math.Float64bits(float64(num)) + data[i] = uint8(f9) + i++ + data[i] = uint8(f9 >> 8) + i++ + data[i] = uint8(f9 >> 16) + i++ + data[i] = uint8(f9 >> 24) + i++ + data[i] = uint8(f9 >> 32) + i++ + data[i] = uint8(f9 >> 40) + i++ + data[i] = uint8(f9 >> 48) + i++ + data[i] = uint8(f9 >> 56) + i++ + } + } + if m.XXX_unrecognized != nil { + i += copy(data[i:], m.XXX_unrecognized) + } + return i, nil +} + +func encodeFixed64Unrecognized(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 encodeFixed32Unrecognized(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 encodeVarintUnrecognized(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 NewPopulatedA(r randyUnrecognized, easy bool) *A { + this := &A{} + if r.Intn(10) != 0 { + v1 := r.Intn(5) + this.B = make([]*B, v1) + for i := 0; i < v1; i++ { + this.B[i] = NewPopulatedB(r, easy) + } + } + if r.Intn(10) != 0 { + v2 := int64(r.Int63()) + if r.Intn(2) == 0 { + v2 *= -1 + } + this.Field1 = &v2 + } + if !easy && r.Intn(10) != 0 { + } + return this +} + +func NewPopulatedB(r randyUnrecognized, easy bool) *B { + this := &B{} + if r.Intn(10) != 0 { + this.C = NewPopulatedC(r, easy) + } + if r.Intn(10) != 0 { + this.D = NewPopulatedD(r, easy) + } + if r.Intn(10) != 0 { + this.F = NewPopulatedOldC(r, easy) + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedUnrecognized(r, 6) + } + return this +} + +func NewPopulatedD(r randyUnrecognized, easy bool) *D { + this := &D{} + if r.Intn(10) != 0 { + v3 := int64(r.Int63()) + if r.Intn(2) == 0 { + v3 *= -1 + } + this.Field1 = &v3 + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedUnrecognized(r, 2) + } + return this +} + +func NewPopulatedC(r randyUnrecognized, easy bool) *C { + this := &C{} + if r.Intn(10) != 0 { + v4 := float64(r.Float64()) + if r.Intn(2) == 0 { + v4 *= -1 + } + this.Field2 = &v4 + } + if r.Intn(10) != 0 { + v5 := randStringUnrecognized(r) + this.Field3 = &v5 + } + if r.Intn(10) != 0 { + v6 := float64(r.Float64()) + if r.Intn(2) == 0 { + v6 *= -1 + } + this.Field4 = &v6 + } + if r.Intn(10) != 0 { + v7 := r.Intn(10) + this.Field5 = make([][]byte, v7) + for i := 0; i < v7; i++ { + v8 := r.Intn(100) + this.Field5[i] = make([]byte, v8) + for j := 0; j < v8; j++ { + this.Field5[i][j] = byte(r.Intn(256)) + } + } + } + if r.Intn(10) != 0 { + v9 := int64(r.Int63()) + if r.Intn(2) == 0 { + v9 *= -1 + } + this.Field6 = &v9 + } + if r.Intn(10) != 0 { + v10 := r.Intn(10) + this.Field7 = make([]float32, v10) + for i := 0; i < v10; i++ { + this.Field7[i] = float32(r.Float32()) + if r.Intn(2) == 0 { + this.Field7[i] *= -1 + } + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedUnrecognized(r, 8) + } + return this +} + +func NewPopulatedU(r randyUnrecognized, easy bool) *U { + this := &U{} + if r.Intn(10) != 0 { + v11 := r.Intn(10) + this.Field2 = make([]float64, v11) + for i := 0; i < v11; i++ { + this.Field2[i] = float64(r.Float64()) + if r.Intn(2) == 0 { + this.Field2[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v12 := uint32(r.Uint32()) + this.Field3 = &v12 + } + if !easy && r.Intn(10) != 0 { + } + return this +} + +func NewPopulatedUnoM(r randyUnrecognized, easy bool) *UnoM { + this := &UnoM{} + if r.Intn(10) != 0 { + v13 := r.Intn(10) + this.Field2 = make([]float64, v13) + for i := 0; i < v13; i++ { + this.Field2[i] = float64(r.Float64()) + if r.Intn(2) == 0 { + this.Field2[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v14 := uint32(r.Uint32()) + this.Field3 = &v14 + } + if !easy && r.Intn(10) != 0 { + } + return this +} + +func NewPopulatedOldA(r randyUnrecognized, easy bool) *OldA { + this := &OldA{} + if r.Intn(10) != 0 { + v15 := r.Intn(5) + this.B = make([]*OldB, v15) + for i := 0; i < v15; i++ { + this.B[i] = NewPopulatedOldB(r, easy) + } + } + if r.Intn(10) != 0 { + v16 := int64(r.Int63()) + if r.Intn(2) == 0 { + v16 *= -1 + } + this.Field1 = &v16 + } + if !easy && r.Intn(10) != 0 { + } + return this +} + +func NewPopulatedOldB(r randyUnrecognized, easy bool) *OldB { + this := &OldB{} + if r.Intn(10) != 0 { + this.C = NewPopulatedOldC(r, easy) + } + if r.Intn(10) != 0 { + this.F = NewPopulatedOldC(r, easy) + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedUnrecognized(r, 6) + } + return this +} + +func NewPopulatedOldC(r randyUnrecognized, easy bool) *OldC { + this := &OldC{} + if r.Intn(10) != 0 { + v17 := int64(r.Int63()) + if r.Intn(2) == 0 { + v17 *= -1 + } + this.Field1 = &v17 + } + if r.Intn(10) != 0 { + v18 := float64(r.Float64()) + if r.Intn(2) == 0 { + v18 *= -1 + } + this.Field2 = &v18 + } + if r.Intn(10) != 0 { + v19 := randStringUnrecognized(r) + this.Field3 = &v19 + } + if r.Intn(10) != 0 { + v20 := int64(r.Int63()) + if r.Intn(2) == 0 { + v20 *= -1 + } + this.Field6 = &v20 + } + if r.Intn(10) != 0 { + v21 := r.Intn(10) + this.Field7 = make([]float32, v21) + for i := 0; i < v21; i++ { + this.Field7[i] = float32(r.Float32()) + if r.Intn(2) == 0 { + this.Field7[i] *= -1 + } + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedUnrecognized(r, 8) + } + return this +} + +func NewPopulatedOldU(r randyUnrecognized, easy bool) *OldU { + this := &OldU{} + if r.Intn(10) != 0 { + v22 := randStringUnrecognized(r) + this.Field1 = &v22 + } + if r.Intn(10) != 0 { + v23 := r.Intn(10) + this.Field2 = make([]float64, v23) + for i := 0; i < v23; i++ { + this.Field2[i] = float64(r.Float64()) + if r.Intn(2) == 0 { + this.Field2[i] *= -1 + } + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedUnrecognized(r, 3) + } + return this +} + +func NewPopulatedOldUnoM(r randyUnrecognized, easy bool) *OldUnoM { + this := &OldUnoM{} + if r.Intn(10) != 0 { + v24 := randStringUnrecognized(r) + this.Field1 = &v24 + } + if r.Intn(10) != 0 { + v25 := r.Intn(10) + this.Field2 = make([]float64, v25) + for i := 0; i < v25; i++ { + this.Field2[i] = float64(r.Float64()) + if r.Intn(2) == 0 { + this.Field2[i] *= -1 + } + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedUnrecognized(r, 3) + } + return this +} + +type randyUnrecognized interface { + Float32() float32 + Float64() float64 + Int63() int64 + Int31() int32 + Uint32() uint32 + Intn(n int) int +} + +func randUTF8RuneUnrecognized(r randyUnrecognized) 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 randStringUnrecognized(r randyUnrecognized) string { + v26 := r.Intn(100) + tmps := make([]rune, v26) + for i := 0; i < v26; i++ { + tmps[i] = randUTF8RuneUnrecognized(r) + } + return string(tmps) +} +func randUnrecognizedUnrecognized(r randyUnrecognized, 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 = randFieldUnrecognized(data, r, fieldNumber, wire) + } + return data +} +func randFieldUnrecognized(data []byte, r randyUnrecognized, fieldNumber int, wire int) []byte { + key := uint32(fieldNumber)<<3 | uint32(wire) + switch wire { + case 0: + data = encodeVarintPopulateUnrecognized(data, uint64(key)) + v27 := r.Int63() + if r.Intn(2) == 0 { + v27 *= -1 + } + data = encodeVarintPopulateUnrecognized(data, uint64(v27)) + case 1: + data = encodeVarintPopulateUnrecognized(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 = encodeVarintPopulateUnrecognized(data, uint64(key)) + ll := r.Intn(100) + data = encodeVarintPopulateUnrecognized(data, uint64(ll)) + for j := 0; j < ll; j++ { + data = append(data, byte(r.Intn(256))) + } + default: + data = encodeVarintPopulateUnrecognized(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 encodeVarintPopulateUnrecognized(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 *A) Size() (n int) { + var l int + _ = l + if len(m.B) > 0 { + for _, e := range m.B { + l = e.Size() + n += 1 + l + sovUnrecognized(uint64(l)) + } + } + if m.Field1 != nil { + n += 1 + sovUnrecognized(uint64(*m.Field1)) + } + return n +} + +func (m *B) Size() (n int) { + var l int + _ = l + if m.C != nil { + l = m.C.Size() + n += 1 + l + sovUnrecognized(uint64(l)) + } + if m.D != nil { + l = m.D.Size() + n += 1 + l + sovUnrecognized(uint64(l)) + } + if m.F != nil { + l = m.F.Size() + n += 1 + l + sovUnrecognized(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *D) Size() (n int) { + var l int + _ = l + if m.Field1 != nil { + n += 1 + sovUnrecognized(uint64(*m.Field1)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *C) Size() (n int) { + var l int + _ = l + if m.Field2 != nil { + n += 9 + } + if m.Field3 != nil { + l = len(*m.Field3) + n += 1 + l + sovUnrecognized(uint64(l)) + } + if m.Field4 != nil { + n += 9 + } + if len(m.Field5) > 0 { + for _, b := range m.Field5 { + l = len(b) + n += 1 + l + sovUnrecognized(uint64(l)) + } + } + if m.Field6 != nil { + n += 1 + sovUnrecognized(uint64(*m.Field6)) + } + if len(m.Field7) > 0 { + n += 5 * len(m.Field7) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *U) Size() (n int) { + var l int + _ = l + if len(m.Field2) > 0 { + n += 9 * len(m.Field2) + } + if m.Field3 != nil { + n += 1 + sovUnrecognized(uint64(*m.Field3)) + } + return n +} + +func (m *OldA) Size() (n int) { + var l int + _ = l + if len(m.B) > 0 { + for _, e := range m.B { + l = e.Size() + n += 1 + l + sovUnrecognized(uint64(l)) + } + } + if m.Field1 != nil { + n += 1 + sovUnrecognized(uint64(*m.Field1)) + } + return n +} + +func (m *OldB) Size() (n int) { + var l int + _ = l + if m.C != nil { + l = m.C.Size() + n += 1 + l + sovUnrecognized(uint64(l)) + } + if m.F != nil { + l = m.F.Size() + n += 1 + l + sovUnrecognized(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *OldC) Size() (n int) { + var l int + _ = l + if m.Field1 != nil { + n += 1 + sovUnrecognized(uint64(*m.Field1)) + } + if m.Field2 != nil { + n += 9 + } + if m.Field3 != nil { + l = len(*m.Field3) + n += 1 + l + sovUnrecognized(uint64(l)) + } + if m.Field6 != nil { + n += 1 + sovUnrecognized(uint64(*m.Field6)) + } + if len(m.Field7) > 0 { + n += 5 * len(m.Field7) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *OldU) Size() (n int) { + var l int + _ = l + if m.Field1 != nil { + l = len(*m.Field1) + n += 1 + l + sovUnrecognized(uint64(l)) + } + if len(m.Field2) > 0 { + n += 9 * len(m.Field2) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func sovUnrecognized(x uint64) (n int) { + for { + n++ + x >>= 7 + if x == 0 { + break + } + } + return n +} +func sozUnrecognized(x uint64) (n int) { + return sovUnrecognized(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (this *A) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&A{`, + `B:` + strings.Replace(fmt.Sprintf("%v", this.B), "B", "B", 1) + `,`, + `Field1:` + valueToStringUnrecognized(this.Field1) + `,`, + `}`, + }, "") + return s +} +func (this *B) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&B{`, + `C:` + strings.Replace(fmt.Sprintf("%v", this.C), "C", "C", 1) + `,`, + `D:` + strings.Replace(fmt.Sprintf("%v", this.D), "D", "D", 1) + `,`, + `F:` + strings.Replace(fmt.Sprintf("%v", this.F), "OldC", "OldC", 1) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *D) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&D{`, + `Field1:` + valueToStringUnrecognized(this.Field1) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *C) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&C{`, + `Field2:` + valueToStringUnrecognized(this.Field2) + `,`, + `Field3:` + valueToStringUnrecognized(this.Field3) + `,`, + `Field4:` + valueToStringUnrecognized(this.Field4) + `,`, + `Field5:` + fmt.Sprintf("%v", this.Field5) + `,`, + `Field6:` + valueToStringUnrecognized(this.Field6) + `,`, + `Field7:` + fmt.Sprintf("%v", this.Field7) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *U) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&U{`, + `Field2:` + fmt.Sprintf("%v", this.Field2) + `,`, + `Field3:` + valueToStringUnrecognized(this.Field3) + `,`, + `}`, + }, "") + return s +} +func (this *UnoM) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&UnoM{`, + `Field2:` + fmt.Sprintf("%v", this.Field2) + `,`, + `Field3:` + valueToStringUnrecognized(this.Field3) + `,`, + `}`, + }, "") + return s +} +func (this *OldA) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&OldA{`, + `B:` + strings.Replace(fmt.Sprintf("%v", this.B), "OldB", "OldB", 1) + `,`, + `Field1:` + valueToStringUnrecognized(this.Field1) + `,`, + `}`, + }, "") + return s +} +func (this *OldB) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&OldB{`, + `C:` + strings.Replace(fmt.Sprintf("%v", this.C), "OldC", "OldC", 1) + `,`, + `F:` + strings.Replace(fmt.Sprintf("%v", this.F), "OldC", "OldC", 1) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *OldC) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&OldC{`, + `Field1:` + valueToStringUnrecognized(this.Field1) + `,`, + `Field2:` + valueToStringUnrecognized(this.Field2) + `,`, + `Field3:` + valueToStringUnrecognized(this.Field3) + `,`, + `Field6:` + valueToStringUnrecognized(this.Field6) + `,`, + `Field7:` + fmt.Sprintf("%v", this.Field7) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *OldU) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&OldU{`, + `Field1:` + valueToStringUnrecognized(this.Field1) + `,`, + `Field2:` + fmt.Sprintf("%v", this.Field2) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *OldUnoM) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&OldUnoM{`, + `Field1:` + valueToStringUnrecognized(this.Field1) + `,`, + `Field2:` + fmt.Sprintf("%v", this.Field2) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func valueToStringUnrecognized(v interface{}) string { + rv := reflect.ValueOf(v) + if rv.IsNil() { + return "nil" + } + pv := reflect.Indirect(rv).Interface() + return fmt.Sprintf("*%v", pv) +} +func (m *A) 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 ErrIntOverflowUnrecognized + } + 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: A: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: A: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field B", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowUnrecognized + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthUnrecognized + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.B = append(m.B, &B{}) + if err := m.B[len(m.B)-1].Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) + } + var v int64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowUnrecognized + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field1 = &v + default: + iNdEx = preIndex + skippy, err := skipUnrecognized(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthUnrecognized + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *B) 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 ErrIntOverflowUnrecognized + } + 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: B: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: B: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field C", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowUnrecognized + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthUnrecognized + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.C == nil { + m.C = &C{} + } + if err := m.C.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field D", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowUnrecognized + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthUnrecognized + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.D == nil { + m.D = &D{} + } + if err := m.D.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field F", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowUnrecognized + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthUnrecognized + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.F == nil { + m.F = &OldC{} + } + if err := m.F.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipUnrecognized(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthUnrecognized + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *D) 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 ErrIntOverflowUnrecognized + } + 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: D: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: D: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) + } + var v int64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowUnrecognized + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field1 = &v + default: + iNdEx = preIndex + skippy, err := skipUnrecognized(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthUnrecognized + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *C) 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 ErrIntOverflowUnrecognized + } + 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: C: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: C: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 2: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field Field2", 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.Field2 = &v2 + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field3", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowUnrecognized + } + 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 ErrInvalidLengthUnrecognized + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + s := string(data[iNdEx:postIndex]) + m.Field3 = &s + iNdEx = postIndex + case 4: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field Field4", 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.Field4 = &v2 + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field5", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowUnrecognized + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthUnrecognized + } + postIndex := iNdEx + byteLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Field5 = append(m.Field5, make([]byte, postIndex-iNdEx)) + copy(m.Field5[len(m.Field5)-1], data[iNdEx:postIndex]) + iNdEx = postIndex + case 6: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field6", wireType) + } + var v int64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowUnrecognized + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field6 = &v + case 7: + if wireType != 5 { + return fmt.Errorf("proto: wrong wireType = %d for field Field7", wireType) + } + var v uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + iNdEx += 4 + v = uint32(data[iNdEx-4]) + v |= uint32(data[iNdEx-3]) << 8 + v |= uint32(data[iNdEx-2]) << 16 + v |= uint32(data[iNdEx-1]) << 24 + v2 := float32(math.Float32frombits(v)) + m.Field7 = append(m.Field7, v2) + default: + iNdEx = preIndex + skippy, err := skipUnrecognized(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthUnrecognized + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *U) 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 ErrIntOverflowUnrecognized + } + 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: U: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: U: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 2: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field Field2", 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.Field2 = append(m.Field2, v2) + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field3", wireType) + } + var v uint32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowUnrecognized + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (uint32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field3 = &v + default: + iNdEx = preIndex + skippy, err := skipUnrecognized(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthUnrecognized + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *OldA) 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 ErrIntOverflowUnrecognized + } + 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: OldA: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: OldA: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field B", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowUnrecognized + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthUnrecognized + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.B = append(m.B, &OldB{}) + if err := m.B[len(m.B)-1].Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) + } + var v int64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowUnrecognized + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field1 = &v + default: + iNdEx = preIndex + skippy, err := skipUnrecognized(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthUnrecognized + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *OldB) 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 ErrIntOverflowUnrecognized + } + 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: OldB: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: OldB: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field C", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowUnrecognized + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthUnrecognized + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.C == nil { + m.C = &OldC{} + } + if err := m.C.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field F", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowUnrecognized + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthUnrecognized + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.F == nil { + m.F = &OldC{} + } + if err := m.F.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipUnrecognized(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthUnrecognized + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *OldC) 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 ErrIntOverflowUnrecognized + } + 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: OldC: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: OldC: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) + } + var v int64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowUnrecognized + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field1 = &v + case 2: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field Field2", 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.Field2 = &v2 + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field3", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowUnrecognized + } + 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 ErrInvalidLengthUnrecognized + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + s := string(data[iNdEx:postIndex]) + m.Field3 = &s + iNdEx = postIndex + case 6: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field6", wireType) + } + var v int64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowUnrecognized + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field6 = &v + case 7: + if wireType != 5 { + return fmt.Errorf("proto: wrong wireType = %d for field Field7", wireType) + } + var v uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + iNdEx += 4 + v = uint32(data[iNdEx-4]) + v |= uint32(data[iNdEx-3]) << 8 + v |= uint32(data[iNdEx-2]) << 16 + v |= uint32(data[iNdEx-1]) << 24 + v2 := float32(math.Float32frombits(v)) + m.Field7 = append(m.Field7, v2) + default: + iNdEx = preIndex + skippy, err := skipUnrecognized(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthUnrecognized + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *OldU) 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 ErrIntOverflowUnrecognized + } + 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: OldU: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: OldU: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowUnrecognized + } + 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 ErrInvalidLengthUnrecognized + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + s := string(data[iNdEx:postIndex]) + m.Field1 = &s + iNdEx = postIndex + case 2: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field Field2", 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.Field2 = append(m.Field2, v2) + default: + iNdEx = preIndex + skippy, err := skipUnrecognized(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthUnrecognized + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipUnrecognized(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, ErrIntOverflowUnrecognized + } + 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, ErrIntOverflowUnrecognized + } + 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, ErrIntOverflowUnrecognized + } + 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, ErrInvalidLengthUnrecognized + } + return iNdEx, nil + case 3: + for { + var innerWire uint64 + var start int = iNdEx + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowUnrecognized + } + 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 := skipUnrecognized(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 ( + ErrInvalidLengthUnrecognized = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowUnrecognized = fmt.Errorf("proto: integer overflow") +) + +var fileDescriptorUnrecognized = []byte{ + // 398 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xe2, 0x12, 0x2a, 0xcd, 0x2b, 0x4a, + 0x4d, 0xce, 0x4f, 0xcf, 0xcb, 0xac, 0x4a, 0x4d, 0xd1, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0xe2, + 0x41, 0x16, 0x93, 0xd2, 0x4d, 0xcf, 0x2c, 0xc9, 0x28, 0x4d, 0xd2, 0x4b, 0xce, 0xcf, 0xd5, 0x4f, + 0xcf, 0x4f, 0xcf, 0xd7, 0x07, 0x2b, 0x4a, 0x2a, 0x4d, 0x03, 0xf3, 0xc0, 0x1c, 0x30, 0x0b, 0xa2, + 0x59, 0xc9, 0x81, 0x8b, 0xd1, 0x51, 0x48, 0x96, 0x8b, 0xd1, 0x49, 0x82, 0x51, 0x81, 0x59, 0x83, + 0xdb, 0x88, 0x5f, 0x0f, 0xc5, 0x06, 0xa7, 0x20, 0xc6, 0x24, 0x21, 0x31, 0x2e, 0x36, 0xb7, 0xcc, + 0xd4, 0x9c, 0x14, 0x43, 0x09, 0x26, 0x05, 0x46, 0x0d, 0xe6, 0x20, 0xb6, 0x34, 0x30, 0xcf, 0x8a, + 0xe5, 0xc2, 0x42, 0x79, 0x06, 0xa5, 0x64, 0xa0, 0x66, 0x90, 0x09, 0xce, 0x40, 0x13, 0x18, 0x31, + 0x4d, 0x70, 0x0e, 0x62, 0x4c, 0x06, 0x49, 0xbb, 0x80, 0x35, 0x63, 0x48, 0xbb, 0x04, 0x31, 0xa6, + 0x08, 0x29, 0x70, 0x31, 0xba, 0x49, 0xb0, 0x82, 0xa5, 0x85, 0x50, 0xa5, 0xfd, 0x73, 0x52, 0x80, + 0x06, 0xa4, 0x29, 0x49, 0x03, 0x0d, 0x40, 0x72, 0x07, 0x23, 0xb2, 0x3b, 0x94, 0x26, 0x33, 0x02, + 0x6d, 0x87, 0xcb, 0x1a, 0x81, 0x2d, 0x62, 0x84, 0xca, 0x1a, 0xc1, 0xc5, 0x8d, 0x25, 0x98, 0x81, + 0xe2, 0x9c, 0x50, 0x71, 0x63, 0xb8, 0xb8, 0x89, 0x04, 0x0b, 0x92, 0x7a, 0x13, 0xb8, 0xb8, 0x29, + 0xd0, 0x45, 0xcc, 0x1a, 0x3c, 0x50, 0x71, 0x53, 0xb8, 0xb8, 0x99, 0x04, 0x1b, 0x92, 0xed, 0x66, + 0x70, 0x71, 0x73, 0x09, 0x76, 0xa0, 0x7a, 0x26, 0xa8, 0xb8, 0xb9, 0x92, 0x25, 0x17, 0x63, 0x28, + 0x8a, 0xa3, 0x98, 0x71, 0x3a, 0x8a, 0x17, 0xe6, 0x28, 0x68, 0x90, 0x7a, 0x70, 0xb1, 0x84, 0xe6, + 0xe5, 0xfb, 0x92, 0xac, 0x5b, 0xa0, 0x03, 0xa8, 0x7b, 0x02, 0x10, 0x2f, 0x00, 0x62, 0xb0, 0x49, + 0x6e, 0x5c, 0x2c, 0xc0, 0x20, 0x74, 0x04, 0x85, 0x30, 0x2c, 0x86, 0x31, 0x43, 0x98, 0x88, 0x48, + 0xf6, 0x02, 0x9b, 0xe3, 0x04, 0x32, 0x07, 0x16, 0xcf, 0x58, 0x63, 0x2a, 0x99, 0x88, 0xb8, 0xac, + 0x03, 0x9b, 0xe5, 0x8c, 0x2b, 0x3a, 0xc9, 0x8e, 0x48, 0x62, 0x23, 0xc6, 0x0c, 0x6c, 0x7f, 0x28, + 0x9a, 0xfd, 0x9c, 0x58, 0xed, 0x47, 0x0a, 0x75, 0x25, 0x77, 0x2e, 0x76, 0x90, 0x3e, 0xe4, 0x88, + 0x21, 0x52, 0xab, 0x15, 0x0f, 0x72, 0xc4, 0x38, 0x99, 0x9c, 0x78, 0x28, 0xc7, 0x70, 0x01, 0x88, + 0x6f, 0x00, 0xf1, 0x83, 0x87, 0x72, 0x8c, 0x1f, 0x80, 0xf8, 0x07, 0x10, 0x37, 0x3c, 0x92, 0x63, + 0x5c, 0x01, 0xc4, 0x1b, 0x80, 0x78, 0x07, 0x10, 0x9f, 0x00, 0xe2, 0x0b, 0x40, 0xfc, 0x00, 0x88, + 0x01, 0x01, 0x00, 0x00, 0xff, 0xff, 0xea, 0xec, 0xd3, 0x83, 0xfb, 0x03, 0x00, 0x00, +} diff --git a/vendor/github.com/gogo/protobuf/test/unrecognized/unrecognized.proto b/vendor/github.com/gogo/protobuf/test/unrecognized/unrecognized.proto new file mode 100644 index 000000000..626ac84a2 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/unrecognized/unrecognized.proto @@ -0,0 +1,129 @@ +// Copyright (c) 2013, Vastech SA (PTY) LTD. All rights reserved. +// http://github.com/gogo/protobuf/gogoproto +// +// 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 unrecognized; + +import "github.com/gogo/protobuf/gogoproto/gogo.proto"; + +option (gogoproto.goproto_stringer_all) = false; +option (gogoproto.goproto_enum_prefix_all) = false; +option (gogoproto.goproto_getters_all) = false; + +option (gogoproto.equal_all) = true; +option (gogoproto.verbose_equal_all) = true; +option (gogoproto.stringer_all) = true; +option (gogoproto.gostring_all) = true; +option (gogoproto.description_all) = true; + +option (gogoproto.testgen_all) = true; +option (gogoproto.populate_all) = true; + +option (gogoproto.unmarshaler_all) = true; +option (gogoproto.marshaler_all) = true; +option (gogoproto.sizer_all) = true; + +message A { + option (gogoproto.goproto_unrecognized) = false; + optional int64 Field1 = 2; + repeated B B = 1; +} + +message B { + optional C C = 1; + optional D D = 2; + optional OldC F = 5; +} + +message D { + optional int64 Field1 = 1; +} + +message C { + optional double Field2 = 2; + optional string Field3 = 3; + optional double Field4 = 4; + repeated bytes Field5 = 5; + optional int64 Field6 = 6; + repeated float Field7 = 7; +} + +message U { + // unserializing U as OldU must leave Field1 unset + option (gogoproto.goproto_unrecognized) = false; + repeated double Field2 = 2; + optional uint32 Field3 = 3; +} + +message UnoM { + // disable marshal/unmarshal generation here + // to check that reflection based code handles missing XXX_unrecognized field coorectly + option (gogoproto.sizer) = false; + option (gogoproto.marshaler) = false; + option (gogoproto.unmarshaler) = false; + // unserializing U as OldU must leave Field1 unset + option (gogoproto.goproto_unrecognized) = false; + + repeated double Field2 = 2; + optional uint32 Field3 = 3; +} + +message OldA { + // OldA == A, so removing unrecognized should not affect anything, tests must pass + option (gogoproto.goproto_unrecognized) = false; + optional int64 Field1 = 2; + repeated OldB B = 1; +} + +message OldB { + optional OldC C = 1; + optional OldC F = 5; +} + +message OldC { + optional int64 Field1 = 1; + optional double Field2 = 2; + optional string Field3 = 3; + optional int64 Field6 = 6; + repeated float Field7 = 7; +} + +message OldU { + optional string Field1 = 1; + repeated double Field2 = 2; +} + +message OldUnoM { + // disable marshal/unmarshal generation here + // to check that reflection based code handles missing XXX_unrecognized field coorectly + option (gogoproto.sizer) = false; + option (gogoproto.marshaler) = false; + option (gogoproto.unmarshaler) = false; + + optional string Field1 = 1; + repeated double Field2 = 2; +} diff --git a/vendor/github.com/gogo/protobuf/test/unrecognized/unrecognizedpb_test.go b/vendor/github.com/gogo/protobuf/test/unrecognized/unrecognizedpb_test.go new file mode 100644 index 000000000..1a4f253a5 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/unrecognized/unrecognizedpb_test.go @@ -0,0 +1,1882 @@ +// Code generated by protoc-gen-gogo. +// source: unrecognized.proto +// DO NOT EDIT! + +/* +Package unrecognized is a generated protocol buffer package. + +It is generated from these files: + unrecognized.proto + +It has these top-level messages: + A + B + D + C + U + UnoM + OldA + OldB + OldC + OldU + OldUnoM +*/ +package unrecognized + +import testing "testing" +import math_rand "math/rand" +import time "time" +import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" +import github_com_gogo_protobuf_jsonpb "github.com/gogo/protobuf/jsonpb" +import fmt "fmt" +import go_parser "go/parser" +import proto "github.com/gogo/protobuf/proto" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +func TestAProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedA(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &A{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestAMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedA(popr, false) + size := p.Size() + data := make([]byte, size) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(data) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &A{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestBProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedB(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &B{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestBMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedB(popr, false) + size := p.Size() + data := make([]byte, size) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(data) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &B{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestDProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedD(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &D{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestDMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedD(popr, false) + size := p.Size() + data := make([]byte, size) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(data) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &D{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestCProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedC(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &C{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestCMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedC(popr, false) + size := p.Size() + data := make([]byte, size) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(data) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &C{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestUProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedU(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &U{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestUMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedU(popr, false) + size := p.Size() + data := make([]byte, size) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(data) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &U{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestUnoMProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUnoM(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &UnoM{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestOldAProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedOldA(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &OldA{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestOldAMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedOldA(popr, false) + size := p.Size() + data := make([]byte, size) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(data) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &OldA{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestOldBProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedOldB(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &OldB{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestOldBMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedOldB(popr, false) + size := p.Size() + data := make([]byte, size) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(data) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &OldB{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestOldCProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedOldC(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &OldC{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestOldCMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedOldC(popr, false) + size := p.Size() + data := make([]byte, size) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(data) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &OldC{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestOldUProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedOldU(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &OldU{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestOldUMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedOldU(popr, false) + size := p.Size() + data := make([]byte, size) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(data) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &OldU{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestOldUnoMProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedOldUnoM(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &OldUnoM{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestAJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedA(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &A{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestBJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedB(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &B{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestDJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedD(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &D{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestCJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedC(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &C{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestUJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedU(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &U{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestUnoMJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUnoM(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &UnoM{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestOldAJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedOldA(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &OldA{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestOldBJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedOldB(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &OldB{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestOldCJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedOldC(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &OldC{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestOldUJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedOldU(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &OldU{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestOldUnoMJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedOldUnoM(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &OldUnoM{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestAProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedA(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &A{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestAProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedA(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &A{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestBProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedB(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &B{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestBProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedB(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &B{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestDProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedD(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &D{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestDProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedD(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &D{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestCProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedC(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &C{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestCProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedC(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &C{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestUProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedU(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &U{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestUProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedU(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &U{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestUnoMProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUnoM(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &UnoM{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestUnoMProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUnoM(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &UnoM{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestOldAProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedOldA(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &OldA{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestOldAProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedOldA(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &OldA{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestOldBProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedOldB(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &OldB{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestOldBProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedOldB(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &OldB{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestOldCProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedOldC(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &OldC{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestOldCProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedOldC(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &OldC{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestOldUProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedOldU(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &OldU{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestOldUProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedOldU(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &OldU{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestOldUnoMProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedOldUnoM(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &OldUnoM{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestOldUnoMProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedOldUnoM(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &OldUnoM{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestUnrecognizedDescription(t *testing.T) { + UnrecognizedDescription() +} +func TestAVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedA(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &A{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestBVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedB(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &B{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestDVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedD(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &D{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestCVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedC(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &C{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestUVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedU(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &U{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestUnoMVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedUnoM(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &UnoM{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestOldAVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedOldA(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &OldA{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestOldBVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedOldB(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &OldB{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestOldCVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedOldC(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &OldC{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestOldUVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedOldU(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &OldU{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestOldUnoMVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedOldUnoM(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &OldUnoM{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestAGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedA(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestBGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedB(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestDGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedD(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestCGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedC(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestUGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedU(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestUnoMGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedUnoM(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestOldAGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedOldA(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestOldBGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedOldB(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestOldCGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedOldC(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestOldUGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedOldU(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestOldUnoMGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedOldUnoM(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestASize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedA(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func TestBSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedB(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func TestDSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedD(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func TestCSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedC(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func TestUSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedU(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func TestOldASize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedOldA(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func TestOldBSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedOldB(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func TestOldCSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedOldC(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func TestOldUSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedOldU(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func TestAStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedA(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestBStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedB(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestDStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedD(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestCStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedC(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestUStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedU(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestUnoMStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedUnoM(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestOldAStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedOldA(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestOldBStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedOldB(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestOldCStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedOldC(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestOldUStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedOldU(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestOldUnoMStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedOldUnoM(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} + +//These tests are generated by github.com/gogo/protobuf/plugin/testgen diff --git a/vendor/github.com/gogo/protobuf/test/unrecognizedgroup/Makefile b/vendor/github.com/gogo/protobuf/test/unrecognizedgroup/Makefile new file mode 100644 index 000000000..71dee0d8d --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/unrecognizedgroup/Makefile @@ -0,0 +1,30 @@ +# Extensions for Protocol Buffers to create more go like structures. +# +# Copyright (c) 2013, Vastech SA (PTY) LTD. 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: + (protoc --proto_path=../../../../../:../../protobuf/:. --gogo_out=. unrecognizedgroup.proto) diff --git a/vendor/github.com/gogo/protobuf/test/unrecognizedgroup/oldnew_test.go b/vendor/github.com/gogo/protobuf/test/unrecognizedgroup/oldnew_test.go new file mode 100644 index 000000000..04728cf8d --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/unrecognizedgroup/oldnew_test.go @@ -0,0 +1,126 @@ +// Copyright (c) 2013, Vastech SA (PTY) LTD. All rights reserved. +// http://github.com/gogo/protobuf/gogoproto +// +// 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 unrecognizedgroup + +import ( + "github.com/gogo/protobuf/proto" + math_rand "math/rand" + "testing" + time "time" +) + +func TestNewOld(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + newer := NewPopulatedNewNoGroup(popr, true) + data1, err := proto.Marshal(newer) + if err != nil { + panic(err) + } + older := &OldWithGroup{} + if err = proto.Unmarshal(data1, older); err != nil { + panic(err) + } + data2, err := proto.Marshal(older) + if err != nil { + panic(err) + } + bluer := &NewNoGroup{} + if err := proto.Unmarshal(data2, bluer); err != nil { + panic(err) + } + if err := newer.VerboseEqual(bluer); err != nil { + t.Fatalf("%#v !VerboseProto %#v, since %v", newer, bluer, err) + } +} + +func TestOldNew(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + older := NewPopulatedOldWithGroup(popr, true) + data1, err := proto.Marshal(older) + if err != nil { + panic(err) + } + newer := &NewNoGroup{} + if err = proto.Unmarshal(data1, newer); err != nil { + panic(err) + } + data2, err := proto.Marshal(newer) + if err != nil { + panic(err) + } + bluer := &OldWithGroup{} + if err := proto.Unmarshal(data2, bluer); err != nil { + panic(err) + } + if err := older.VerboseEqual(bluer); err != nil { + t.Fatalf("%#v !VerboseProto %#v, since %v", older, bluer, err) + } +} + +func TestOldNewOldNew(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + older := NewPopulatedOldWithGroup(popr, true) + data1, err := proto.Marshal(older) + if err != nil { + panic(err) + } + newer := &NewNoGroup{} + if err = proto.Unmarshal(data1, newer); err != nil { + panic(err) + } + data2, err := proto.Marshal(newer) + if err != nil { + panic(err) + } + bluer := &OldWithGroup{} + if err = proto.Unmarshal(data2, bluer); err != nil { + panic(err) + } + if err = older.VerboseEqual(bluer); err != nil { + t.Fatalf("%#v !VerboseProto %#v, since %v", older, bluer, err) + } + + data3, err := proto.Marshal(bluer) + if err != nil { + panic(err) + } + purple := &NewNoGroup{} + if err = proto.Unmarshal(data3, purple); err != nil { + panic(err) + } + data4, err := proto.Marshal(purple) + if err != nil { + panic(err) + } + magenta := &OldWithGroup{} + if err := proto.Unmarshal(data4, magenta); err != nil { + panic(err) + } + if err := older.VerboseEqual(magenta); err != nil { + t.Fatalf("%#v !VerboseProto %#v, since %v", older, magenta, err) + } +} diff --git a/vendor/github.com/gogo/protobuf/test/unrecognizedgroup/unrecognizedgroup.pb.go b/vendor/github.com/gogo/protobuf/test/unrecognizedgroup/unrecognizedgroup.pb.go new file mode 100644 index 000000000..c49f36a5e --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/unrecognizedgroup/unrecognizedgroup.pb.go @@ -0,0 +1,1717 @@ +// Code generated by protoc-gen-gogo. +// source: unrecognizedgroup.proto +// DO NOT EDIT! + +/* + Package unrecognizedgroup is a generated protocol buffer package. + + It is generated from these files: + unrecognizedgroup.proto + + It has these top-level messages: + NewNoGroup + A + OldWithGroup +*/ +package unrecognizedgroup + +import proto "github.com/gogo/protobuf/proto" +import fmt "fmt" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" + +import github_com_gogo_protobuf_protoc_gen_gogo_descriptor "github.com/gogo/protobuf/protoc-gen-gogo/descriptor" +import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" +import compress_gzip "compress/gzip" +import bytes "bytes" +import io_ioutil "io/ioutil" + +import strings "strings" +import sort "sort" +import strconv "strconv" +import reflect "reflect" + +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. +const _ = proto.GoGoProtoPackageIsVersion1 + +type NewNoGroup struct { + Field1 *int64 `protobuf:"varint,1,opt,name=Field1,json=field1" json:"Field1,omitempty"` + Field3 []float64 `protobuf:"fixed64,3,rep,name=Field3,json=field3" json:"Field3,omitempty"` + A *A `protobuf:"bytes,5,opt,name=A,json=a" json:"A,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *NewNoGroup) Reset() { *m = NewNoGroup{} } +func (*NewNoGroup) ProtoMessage() {} +func (*NewNoGroup) Descriptor() ([]byte, []int) { return fileDescriptorUnrecognizedgroup, []int{0} } + +type A struct { + AField *int64 `protobuf:"varint,1,opt,name=AField,json=aField" json:"AField,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *A) Reset() { *m = A{} } +func (*A) ProtoMessage() {} +func (*A) Descriptor() ([]byte, []int) { return fileDescriptorUnrecognizedgroup, []int{1} } + +type OldWithGroup struct { + Field1 *int64 `protobuf:"varint,1,opt,name=Field1,json=field1" json:"Field1,omitempty"` + Group1 *OldWithGroup_Group1 `protobuf:"group,2,opt,name=Group1,json=group1" json:"group1,omitempty"` + Field3 []float64 `protobuf:"fixed64,3,rep,name=Field3,json=field3" json:"Field3,omitempty"` + Group2 *OldWithGroup_Group2 `protobuf:"group,4,opt,name=Group2,json=group2" json:"group2,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *OldWithGroup) Reset() { *m = OldWithGroup{} } +func (*OldWithGroup) ProtoMessage() {} +func (*OldWithGroup) Descriptor() ([]byte, []int) { return fileDescriptorUnrecognizedgroup, []int{2} } + +type OldWithGroup_Group1 struct { + Field1 *int64 `protobuf:"varint,1,opt,name=Field1,json=field1" json:"Field1,omitempty"` + Field2 *int32 `protobuf:"varint,2,opt,name=Field2,json=field2" json:"Field2,omitempty"` + Field3 []float64 `protobuf:"fixed64,3,rep,name=Field3,json=field3" json:"Field3,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *OldWithGroup_Group1) Reset() { *m = OldWithGroup_Group1{} } +func (*OldWithGroup_Group1) ProtoMessage() {} + +type OldWithGroup_Group2 struct { + Field1 *int64 `protobuf:"varint,1,opt,name=Field1,json=field1" json:"Field1,omitempty"` + Field2 []float64 `protobuf:"fixed64,2,rep,name=Field2,json=field2" json:"Field2,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *OldWithGroup_Group2) Reset() { *m = OldWithGroup_Group2{} } +func (*OldWithGroup_Group2) ProtoMessage() {} + +func init() { + proto.RegisterType((*NewNoGroup)(nil), "unrecognizedgroup.NewNoGroup") + proto.RegisterType((*A)(nil), "unrecognizedgroup.A") + proto.RegisterType((*OldWithGroup)(nil), "unrecognizedgroup.OldWithGroup") + proto.RegisterType((*OldWithGroup_Group1)(nil), "unrecognizedgroup.OldWithGroup.Group1") + proto.RegisterType((*OldWithGroup_Group2)(nil), "unrecognizedgroup.OldWithGroup.Group2") +} +func (this *NewNoGroup) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return UnrecognizedgroupDescription() +} +func (this *A) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return UnrecognizedgroupDescription() +} +func (this *OldWithGroup) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return UnrecognizedgroupDescription() +} +func (this *OldWithGroup_Group1) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return UnrecognizedgroupDescription() +} +func (this *OldWithGroup_Group2) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return UnrecognizedgroupDescription() +} +func UnrecognizedgroupDescription() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + d := &github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet{} + var gzipped = []byte{ + // 3445 bytes of a gzipped FileDescriptorSet + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xcc, 0x5a, 0x6d, 0x6c, 0x23, 0xe5, + 0xb5, 0xc6, 0xf1, 0x47, 0xec, 0x63, 0xc7, 0x71, 0x26, 0x61, 0xd7, 0x1b, 0x60, 0x97, 0x35, 0x5f, + 0xcb, 0x72, 0xc9, 0xb2, 0xe1, 0x02, 0x8b, 0xb9, 0x17, 0xe4, 0x24, 0xde, 0x90, 0x55, 0x12, 0xfb, + 0x4e, 0x12, 0x58, 0xb8, 0x3f, 0x46, 0x13, 0xfb, 0x8d, 0xe3, 0xdd, 0xf1, 0x8c, 0xaf, 0x67, 0xbc, + 0xbb, 0xe1, 0x17, 0x57, 0xdc, 0xdb, 0x16, 0x55, 0x6d, 0xe9, 0x87, 0x54, 0xbe, 0x0b, 0x48, 0x2d, + 0x94, 0x7e, 0x41, 0xbf, 0x54, 0xf5, 0x57, 0xa5, 0x8a, 0xb6, 0xea, 0x8f, 0xaa, 0xed, 0xaf, 0xfe, + 0xe8, 0x8f, 0x52, 0x21, 0xf5, 0x0b, 0x5a, 0x2a, 0xad, 0xd4, 0x4a, 0xfc, 0xe9, 0x79, 0xbf, 0xc6, + 0x33, 0x63, 0x27, 0xe3, 0x20, 0x51, 0x8a, 0x64, 0xd6, 0x73, 0xde, 0xf3, 0x3c, 0x73, 0xde, 0xf3, + 0x9e, 0xf7, 0x9c, 0xf3, 0xbe, 0x0e, 0xfc, 0xf0, 0x24, 0x5c, 0xdb, 0xb0, 0xac, 0x86, 0x41, 0x4e, + 0xb4, 0x3b, 0x96, 0x63, 0x6d, 0x76, 0xb7, 0x4e, 0xd4, 0x89, 0x5d, 0xeb, 0x34, 0xdb, 0x8e, 0xd5, + 0x99, 0x61, 0x32, 0x65, 0x9c, 0x6b, 0xcc, 0x48, 0x8d, 0xc2, 0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, 0x25, 0x8b, 0x4b, 0x6b, 0x86, 0x72, 0x77, + 0x2f, 0xd4, 0x46, 0x77, 0x89, 0x94, 0x15, 0xbe, 0xc9, 0xfa, 0xa2, 0x6d, 0x03, 0xb2, 0x1d, 0x42, + 0xe3, 0x1e, 0x5d, 0xcc, 0x67, 0x96, 0x62, 0x46, 0xcc, 0x84, 0xce, 0x4c, 0x15, 0x30, 0x3e, 0xb1, + 0xb1, 0x8e, 0xf7, 0x51, 0xb9, 0x0e, 0x5c, 0x81, 0xc6, 0xc2, 0x0a, 0x58, 0x16, 0xca, 0x48, 0xe1, + 0x2a, 0xca, 0xa6, 0x4f, 0x41, 0xd6, 0xef, 0x1e, 0x65, 0x0a, 0xe2, 0xb6, 0xa3, 0x77, 0x1c, 0x16, + 0x85, 0x71, 0x95, 0x3f, 0x28, 0x39, 0x88, 0x62, 0x92, 0x61, 0x59, 0x2e, 0xae, 0xd2, 0xaf, 0xd3, + 0x77, 0xc1, 0x98, 0xef, 0xf5, 0xc3, 0x02, 0x0b, 0x4f, 0x26, 0x60, 0x6a, 0x50, 0xcc, 0x0d, 0x0c, + 0x7f, 0xdc, 0x3e, 0x18, 0x01, 0x9b, 0xa4, 0x83, 0x71, 0x47, 0x19, 0xc4, 0x13, 0x46, 0x54, 0xdc, + 0xd0, 0x37, 0x89, 0x81, 0xd1, 0x14, 0x39, 0x96, 0x9d, 0xbd, 0x65, 0xa8, 0xa8, 0x9e, 0x59, 0xa6, + 0x10, 0x95, 0x23, 0x95, 0x7b, 0x21, 0x26, 0x52, 0x1c, 0x65, 0x38, 0x3e, 0x1c, 0x03, 0x8d, 0x45, + 0x95, 0xe1, 0x94, 0xab, 0x20, 0x45, 0xff, 0xe5, 0xbe, 0x4d, 0x30, 0x9b, 0x93, 0x54, 0x40, 0xfd, + 0xaa, 0x4c, 0x43, 0x92, 0x85, 0x59, 0x9d, 0xc8, 0xd2, 0xe0, 0x3e, 0xd3, 0x85, 0xa9, 0x93, 0x2d, + 0xbd,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x4d, 0x43, 0x51, 0x35, + 0x27, 0x47, 0x5c, 0x6d, 0x6c, 0x34, 0xeb, 0x56, 0x97, 0x36, 0x04, 0x5c, 0x8f, 0x66, 0xbd, 0x88, + 0x9a, 0xe6, 0x32, 0x57, 0x45, 0x74, 0x6c, 0xbd, 0x13, 0x7c, 0x46, 0x4d, 0x73, 0x19, 0x57, 0xb9, + 0x09, 0xc6, 0xf5, 0x46, 0xa3, 0x43, 0xc9, 0x25, 0x11, 0x6f, 0x43, 0xb3, 0xae, 0x98, 0x29, 0x4e, + 0x9f, 0x81, 0xa4, 0xf4, 0x03, 0x2d, 0x2c, 0xd4, 0x13, 0x58, 0xf3, 0xd9, 0x3d, 0xca, 0x08, 0x3d, + 0xd4, 0x9b, 0x72, 0x10, 0x5f, 0xda, 0xb4, 0xb5, 0xde, 0x85, 0xde, 0x08, 0x8e, 0x27, 0xd5, 0x74, + 0xd3, 0x76, 0x6f, 0x70, 0x0a, 0x2f, 0x63, 0x79, 0xf5, 0x5f, 0x48, 0x2a, 0x0b, 0x90, 0x34, 0x2c, + 0x8c, 0x0f, 0x8a, 0xe0, 0xb7, 0xe1, 0xc7, 0x42, 0xee, 0x30, 0x67, 0x96, 0x85, 0xbe, 0xea, 0x22, + 0xa7, 0x7f, 0x16, 0x81, 0xa4, 0x14, 0x63, 0xa1, 0x88, 0xb5, 0x75, 0x67, 0x9b, 0xd1, 0xc5, 0xe7, + 0x46, 0x72, 0x11, 0x95, 0x3d, 0x53, 0x39, 0x76, 0x33, 0x26, 0x0b, 0x01, 0x21, 0xa7, 0xcf, 0x74, + 0x5d, 0x0d, 0xa2, 0xd7, 0x59, 0x83, 0x6b, 0xb5, 0x5a, 0xb8, 0x92, 0xb6, 0x5c, 0x57, 0x21, 0x9f, + 0x17, 0x62, 0x7a, 0x2f, 0xee, 0x74, 0xf4, 0xa6, 0xe1, 0xd3, 0x8d, 0x31, 0xdd, 0x9c, 0x1c, 0x70, + 0x95, 0x8b, 0x70, 0x48, 0x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x95, 0xb0, 0x3d, 0xe8, 0x65, + 0x0b, 0xbf, 0x42, 0xc8, 0xff, 0xe2, 0x31, 0x1e, 0x7b, 0x93, 0x2e, 0x81, 0x87, 0xd7, 0xb3, 0x12, + 0x0d, 0xe2, 0x60, 0x6e, 0xc3, 0xf3, 0x9f, 0x61, 0x28, 0x7b, 0xfe, 0xc6, 0x90, 0x7f, 0xea, 0x6d, + 0xff, 0x4a, 0x2c, 0x72, 0x64, 0xc9, 0x30, 0x8a, 0x1b, 0x70, 0x70, 0xc0, 0xca, 0x0e, 0xc1, 0xf9, + 0xb4, 0xe0, 0x9c, 0xea, 0x5b, 0x5d, 0x4a, 0x5b, 0x05, 0x29, 0x77, 0xd7, 0x63, 0x08, 0xce, 0x67, + 0x04, 0xa7, 0x22, 0xb0, 0x72, 0x59, 0x28, 0xe3, 0x19, 0x98, 0xc0, 0x93, 0xfa, 0xa6, 0x65, 0x8b, + 0x73, 0xef, 0x10, 0x74, 0xcf, 0x0a, 0xba, 0x71, 0x01, 0x64, 0xa7, 0x60, 0xca, 0x75, 0x37, 0x24, + 0xb7, 0xf0, 0x00, 0x34, 0x04, 0xc5, 0x73, 0x82, 0x62, 0x94, 0xea, 0x53, 0x68, 0x09, 0x32, 0x0d, + 0x4b, 0xa4, 0xe1, 0x70, 0xf8, 0xf3, 0x02, 0x9e, 0x96, 0x18, 0x41, 0xd1, 0xb6, 0xda, 0x5d, 0x83, + 0xe6, 0xe8, 0x70, 0x8a, 0x2f, 0x48, 0x0a, 0x89, 0x11, 0x14, 0xfb, 0x70, 0xeb, 0x0b, 0x92, 0xc2, + 0xf6, 0xf8, 0xf3, 0x3e, 0x7a, 0xd7, 0x6b, 0xec, 0x58, 0xe6, 0x30, 0x46, 0xbc, 0x28, 0x18, 0x40, + 0x40, 0x28, 0xc1, 0x3d, 0x90, 0x1a, 0x76, 0x21, 0xbe, 0x28, 0xe0, 0x49, 0x22, 0x57, 0x00, 0xf7, + 0x99, 0x4c, 0x32, 0xf4,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 0xf9, 0xed, 0x4a, + 0x01, 0x22, 0x25, 0x76, 0x37, 0x99, 0x9e, 0x9d, 0x9a, 0xe9, 0x37, 0xb2, 0xa4, 0x46, 0xf4, 0x62, + 0xe6, 0x63, 0x2f, 0x1e, 0x89, 0x3c, 0x81, 0x9f, 0x17, 0xf0, 0x53, 0xb8, 0x19, 0x11, 0x94, 0xae, + 0xc4, 0xf8, 0xe4, 0x6b, 0x74, 0xf6, 0x14, 0x50, 0xfd, 0xe9, 0x08, 0x64, 0x2a, 0x46, 0xfd, 0x41, + 0x9c, 0xcf, 0xde, 0xd6, 0xdd, 0x0b, 0x09, 0xf6, 0xbe, 0x93, 0xec, 0xc7, 0x06, 0x98, 0xbd, 0x71, + 0x80, 0x29, 0x5e, 0xa2, 0x19, 0xf6, 0xff, 0x93, 0xaa, 0x40, 0xed, 0x3a, 0x3b, 0xc9, 0x3b, 0xcb, + 0x6e, 0xf5, 0x86, 0xe5, 0x9d, 0x15, 0xbc, 0xb3, 0xd3, 0x55, 0x48, 0x2c, 0xfa, 0xdf, 0xb0, 0x9b, + 0x5f, 0x67, 0xe5, 0x9f, 0x90, 0x30, 0xf9, 0xec, 0x6e, 0x16, 0x4d, 0x9f, 0x12, 0x8c, 0xb3, 0x43, + 0x31, 0xf6, 0x90, 0xb3, 0x73, 0xc7, 0x7e, 0xf2, 0xe6, 0xe1, 0x2b, 0x7e, 0x8e, 0x9f, 0x5f, 0xe1, + 0xe7, 0x37, 0x6f, 0x1e, 0x8e, 0xbc, 0x8b, 0x9f, 0xbf, 0xe3, 0xe7, 0xd1, 0xdf, 0x1e, 0x8e, 0xbc, + 0x82, 0x9f, 0xd7, 0xf0, 0xf3, 0x3d, 0xfc, 0xfc, 0x23, 0x00, 0x00, 0xff, 0xff, 0x15, 0x3b, 0x3f, + 0xed, 0xda, 0x2c, 0x00, 0x00, + } + r := bytes.NewReader(gzipped) + gzipr, err := compress_gzip.NewReader(r) + if err != nil { + panic(err) + } + ungzipped, err := io_ioutil.ReadAll(gzipr) + if err != nil { + panic(err) + } + if err := github_com_gogo_protobuf_proto.Unmarshal(ungzipped, d); err != nil { + panic(err) + } + return d +} +func (this *NewNoGroup) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NewNoGroup) + if !ok { + that2, ok := that.(NewNoGroup) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NewNoGroup") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NewNoGroup but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NewNoGroup but is not nil && this == nil") + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) + } + } else if this.Field1 != nil { + return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") + } else if that1.Field1 != nil { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) + } + if len(this.Field3) != len(that1.Field3) { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", len(this.Field3), len(that1.Field3)) + } + for i := range this.Field3 { + if this.Field3[i] != that1.Field3[i] { + return fmt.Errorf("Field3 this[%v](%v) Not Equal that[%v](%v)", i, this.Field3[i], i, that1.Field3[i]) + } + } + if !this.A.Equal(that1.A) { + return fmt.Errorf("A this(%v) Not Equal that(%v)", this.A, that1.A) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NewNoGroup) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*NewNoGroup) + if !ok { + that2, ok := that.(NewNoGroup) + 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.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return false + } + } else if this.Field1 != nil { + return false + } else if that1.Field1 != nil { + return false + } + if len(this.Field3) != len(that1.Field3) { + return false + } + for i := range this.Field3 { + if this.Field3[i] != that1.Field3[i] { + return false + } + } + if !this.A.Equal(that1.A) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *A) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*A) + if !ok { + that2, ok := that.(A) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *A") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *A but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *A but is not nil && this == nil") + } + if this.AField != nil && that1.AField != nil { + if *this.AField != *that1.AField { + return fmt.Errorf("AField this(%v) Not Equal that(%v)", *this.AField, *that1.AField) + } + } else if this.AField != nil { + return fmt.Errorf("this.AField == nil && that.AField != nil") + } else if that1.AField != nil { + return fmt.Errorf("AField this(%v) Not Equal that(%v)", this.AField, that1.AField) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *A) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*A) + if !ok { + that2, ok := that.(A) + 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.AField != nil && that1.AField != nil { + if *this.AField != *that1.AField { + return false + } + } else if this.AField != nil { + return false + } else if that1.AField != nil { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *OldWithGroup) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*OldWithGroup) + if !ok { + that2, ok := that.(OldWithGroup) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *OldWithGroup") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *OldWithGroup but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *OldWithGroup but is not nil && this == nil") + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) + } + } else if this.Field1 != nil { + return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") + } else if that1.Field1 != nil { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) + } + if !this.Group1.Equal(that1.Group1) { + return fmt.Errorf("Group1 this(%v) Not Equal that(%v)", this.Group1, that1.Group1) + } + if len(this.Field3) != len(that1.Field3) { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", len(this.Field3), len(that1.Field3)) + } + for i := range this.Field3 { + if this.Field3[i] != that1.Field3[i] { + return fmt.Errorf("Field3 this[%v](%v) Not Equal that[%v](%v)", i, this.Field3[i], i, that1.Field3[i]) + } + } + if !this.Group2.Equal(that1.Group2) { + return fmt.Errorf("Group2 this(%v) Not Equal that(%v)", this.Group2, that1.Group2) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *OldWithGroup) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*OldWithGroup) + if !ok { + that2, ok := that.(OldWithGroup) + 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.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return false + } + } else if this.Field1 != nil { + return false + } else if that1.Field1 != nil { + return false + } + if !this.Group1.Equal(that1.Group1) { + return false + } + if len(this.Field3) != len(that1.Field3) { + return false + } + for i := range this.Field3 { + if this.Field3[i] != that1.Field3[i] { + return false + } + } + if !this.Group2.Equal(that1.Group2) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *OldWithGroup_Group1) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*OldWithGroup_Group1) + if !ok { + that2, ok := that.(OldWithGroup_Group1) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *OldWithGroup_Group1") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *OldWithGroup_Group1 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *OldWithGroup_Group1 but is not nil && this == nil") + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) + } + } else if this.Field1 != nil { + return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") + } else if that1.Field1 != nil { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", *this.Field2, *that1.Field2) + } + } else if this.Field2 != nil { + return fmt.Errorf("this.Field2 == nil && that.Field2 != nil") + } else if that1.Field2 != nil { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) + } + if len(this.Field3) != len(that1.Field3) { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", len(this.Field3), len(that1.Field3)) + } + for i := range this.Field3 { + if this.Field3[i] != that1.Field3[i] { + return fmt.Errorf("Field3 this[%v](%v) Not Equal that[%v](%v)", i, this.Field3[i], i, that1.Field3[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *OldWithGroup_Group1) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*OldWithGroup_Group1) + if !ok { + that2, ok := that.(OldWithGroup_Group1) + 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.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return false + } + } else if this.Field1 != nil { + return false + } else if that1.Field1 != nil { + return false + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + return false + } + } else if this.Field2 != nil { + return false + } else if that1.Field2 != nil { + return false + } + if len(this.Field3) != len(that1.Field3) { + return false + } + for i := range this.Field3 { + if this.Field3[i] != that1.Field3[i] { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *OldWithGroup_Group2) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*OldWithGroup_Group2) + if !ok { + that2, ok := that.(OldWithGroup_Group2) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *OldWithGroup_Group2") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *OldWithGroup_Group2 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *OldWithGroup_Group2 but is not nil && this == nil") + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) + } + } else if this.Field1 != nil { + return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") + } else if that1.Field1 != nil { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) + } + if len(this.Field2) != len(that1.Field2) { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", len(this.Field2), len(that1.Field2)) + } + for i := range this.Field2 { + if this.Field2[i] != that1.Field2[i] { + return fmt.Errorf("Field2 this[%v](%v) Not Equal that[%v](%v)", i, this.Field2[i], i, that1.Field2[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *OldWithGroup_Group2) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*OldWithGroup_Group2) + if !ok { + that2, ok := that.(OldWithGroup_Group2) + 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.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return false + } + } else if this.Field1 != nil { + return false + } else if that1.Field1 != nil { + return false + } + if len(this.Field2) != len(that1.Field2) { + return false + } + for i := range this.Field2 { + if this.Field2[i] != that1.Field2[i] { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NewNoGroup) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 7) + s = append(s, "&unrecognizedgroup.NewNoGroup{") + if this.Field1 != nil { + s = append(s, "Field1: "+valueToGoStringUnrecognizedgroup(this.Field1, "int64")+",\n") + } + if this.Field3 != nil { + s = append(s, "Field3: "+fmt.Sprintf("%#v", this.Field3)+",\n") + } + if this.A != nil { + s = append(s, "A: "+fmt.Sprintf("%#v", this.A)+",\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 *A) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&unrecognizedgroup.A{") + if this.AField != nil { + s = append(s, "AField: "+valueToGoStringUnrecognizedgroup(this.AField, "int64")+",\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 *OldWithGroup) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 8) + s = append(s, "&unrecognizedgroup.OldWithGroup{") + if this.Field1 != nil { + s = append(s, "Field1: "+valueToGoStringUnrecognizedgroup(this.Field1, "int64")+",\n") + } + if this.Group1 != nil { + s = append(s, "Group1: "+fmt.Sprintf("%#v", this.Group1)+",\n") + } + if this.Field3 != nil { + s = append(s, "Field3: "+fmt.Sprintf("%#v", this.Field3)+",\n") + } + if this.Group2 != nil { + s = append(s, "Group2: "+fmt.Sprintf("%#v", this.Group2)+",\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 *OldWithGroup_Group1) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 7) + s = append(s, "&unrecognizedgroup.OldWithGroup_Group1{") + if this.Field1 != nil { + s = append(s, "Field1: "+valueToGoStringUnrecognizedgroup(this.Field1, "int64")+",\n") + } + if this.Field2 != nil { + s = append(s, "Field2: "+valueToGoStringUnrecognizedgroup(this.Field2, "int32")+",\n") + } + if this.Field3 != nil { + s = append(s, "Field3: "+fmt.Sprintf("%#v", this.Field3)+",\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 *OldWithGroup_Group2) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 6) + s = append(s, "&unrecognizedgroup.OldWithGroup_Group2{") + if this.Field1 != nil { + s = append(s, "Field1: "+valueToGoStringUnrecognizedgroup(this.Field1, "int64")+",\n") + } + if this.Field2 != nil { + s = append(s, "Field2: "+fmt.Sprintf("%#v", this.Field2)+",\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 valueToGoStringUnrecognizedgroup(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 extensionToGoStringUnrecognizedgroup(e map[int32]github_com_gogo_protobuf_proto.Extension) string { + if e == nil { + return "nil" + } + s := "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 +} +func (m *NewNoGroup) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *NewNoGroup) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Field1 != nil { + data[i] = 0x8 + i++ + i = encodeVarintUnrecognizedgroup(data, i, uint64(*m.Field1)) + } + if len(m.Field3) > 0 { + for _, num := range m.Field3 { + data[i] = 0x19 + i++ + f1 := math.Float64bits(float64(num)) + data[i] = uint8(f1) + i++ + data[i] = uint8(f1 >> 8) + i++ + data[i] = uint8(f1 >> 16) + i++ + data[i] = uint8(f1 >> 24) + i++ + data[i] = uint8(f1 >> 32) + i++ + data[i] = uint8(f1 >> 40) + i++ + data[i] = uint8(f1 >> 48) + i++ + data[i] = uint8(f1 >> 56) + i++ + } + } + if m.A != nil { + data[i] = 0x2a + i++ + i = encodeVarintUnrecognizedgroup(data, i, uint64(m.A.Size())) + n2, err := m.A.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n2 + } + if m.XXX_unrecognized != nil { + i += copy(data[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *A) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *A) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.AField != nil { + data[i] = 0x8 + i++ + i = encodeVarintUnrecognizedgroup(data, i, uint64(*m.AField)) + } + if m.XXX_unrecognized != nil { + i += copy(data[i:], m.XXX_unrecognized) + } + return i, nil +} + +func encodeFixed64Unrecognizedgroup(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 encodeFixed32Unrecognizedgroup(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 encodeVarintUnrecognizedgroup(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 NewPopulatedNewNoGroup(r randyUnrecognizedgroup, easy bool) *NewNoGroup { + this := &NewNoGroup{} + if r.Intn(10) != 0 { + v1 := int64(r.Int63()) + if r.Intn(2) == 0 { + v1 *= -1 + } + this.Field1 = &v1 + } + if r.Intn(10) != 0 { + v2 := r.Intn(10) + this.Field3 = make([]float64, v2) + for i := 0; i < v2; i++ { + this.Field3[i] = float64(r.Float64()) + if r.Intn(2) == 0 { + this.Field3[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + this.A = NewPopulatedA(r, easy) + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedUnrecognizedgroup(r, 6) + } + return this +} + +func NewPopulatedA(r randyUnrecognizedgroup, easy bool) *A { + this := &A{} + if r.Intn(10) != 0 { + v3 := int64(r.Int63()) + if r.Intn(2) == 0 { + v3 *= -1 + } + this.AField = &v3 + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedUnrecognizedgroup(r, 2) + } + return this +} + +func NewPopulatedOldWithGroup(r randyUnrecognizedgroup, easy bool) *OldWithGroup { + this := &OldWithGroup{} + if r.Intn(10) != 0 { + v4 := int64(r.Int63()) + if r.Intn(2) == 0 { + v4 *= -1 + } + this.Field1 = &v4 + } + if r.Intn(10) != 0 { + this.Group1 = NewPopulatedOldWithGroup_Group1(r, easy) + } + if r.Intn(10) != 0 { + v5 := r.Intn(10) + this.Field3 = make([]float64, v5) + for i := 0; i < v5; i++ { + this.Field3[i] = float64(r.Float64()) + if r.Intn(2) == 0 { + this.Field3[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + this.Group2 = NewPopulatedOldWithGroup_Group2(r, easy) + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedUnrecognizedgroup(r, 5) + } + return this +} + +func NewPopulatedOldWithGroup_Group1(r randyUnrecognizedgroup, easy bool) *OldWithGroup_Group1 { + this := &OldWithGroup_Group1{} + if r.Intn(10) != 0 { + v6 := int64(r.Int63()) + if r.Intn(2) == 0 { + v6 *= -1 + } + this.Field1 = &v6 + } + if r.Intn(10) != 0 { + v7 := int32(r.Int31()) + if r.Intn(2) == 0 { + v7 *= -1 + } + this.Field2 = &v7 + } + if r.Intn(10) != 0 { + v8 := r.Intn(10) + this.Field3 = make([]float64, v8) + for i := 0; i < v8; i++ { + this.Field3[i] = float64(r.Float64()) + if r.Intn(2) == 0 { + this.Field3[i] *= -1 + } + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedUnrecognizedgroup(r, 4) + } + return this +} + +func NewPopulatedOldWithGroup_Group2(r randyUnrecognizedgroup, easy bool) *OldWithGroup_Group2 { + this := &OldWithGroup_Group2{} + if r.Intn(10) != 0 { + v9 := int64(r.Int63()) + if r.Intn(2) == 0 { + v9 *= -1 + } + this.Field1 = &v9 + } + if r.Intn(10) != 0 { + v10 := r.Intn(10) + this.Field2 = make([]float64, v10) + for i := 0; i < v10; i++ { + this.Field2[i] = float64(r.Float64()) + if r.Intn(2) == 0 { + this.Field2[i] *= -1 + } + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedUnrecognizedgroup(r, 3) + } + return this +} + +type randyUnrecognizedgroup interface { + Float32() float32 + Float64() float64 + Int63() int64 + Int31() int32 + Uint32() uint32 + Intn(n int) int +} + +func randUTF8RuneUnrecognizedgroup(r randyUnrecognizedgroup) 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 randStringUnrecognizedgroup(r randyUnrecognizedgroup) string { + v11 := r.Intn(100) + tmps := make([]rune, v11) + for i := 0; i < v11; i++ { + tmps[i] = randUTF8RuneUnrecognizedgroup(r) + } + return string(tmps) +} +func randUnrecognizedUnrecognizedgroup(r randyUnrecognizedgroup, 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 = randFieldUnrecognizedgroup(data, r, fieldNumber, wire) + } + return data +} +func randFieldUnrecognizedgroup(data []byte, r randyUnrecognizedgroup, fieldNumber int, wire int) []byte { + key := uint32(fieldNumber)<<3 | uint32(wire) + switch wire { + case 0: + data = encodeVarintPopulateUnrecognizedgroup(data, uint64(key)) + v12 := r.Int63() + if r.Intn(2) == 0 { + v12 *= -1 + } + data = encodeVarintPopulateUnrecognizedgroup(data, uint64(v12)) + case 1: + data = encodeVarintPopulateUnrecognizedgroup(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 = encodeVarintPopulateUnrecognizedgroup(data, uint64(key)) + ll := r.Intn(100) + data = encodeVarintPopulateUnrecognizedgroup(data, uint64(ll)) + for j := 0; j < ll; j++ { + data = append(data, byte(r.Intn(256))) + } + default: + data = encodeVarintPopulateUnrecognizedgroup(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 encodeVarintPopulateUnrecognizedgroup(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 *NewNoGroup) Size() (n int) { + var l int + _ = l + if m.Field1 != nil { + n += 1 + sovUnrecognizedgroup(uint64(*m.Field1)) + } + if len(m.Field3) > 0 { + n += 9 * len(m.Field3) + } + if m.A != nil { + l = m.A.Size() + n += 1 + l + sovUnrecognizedgroup(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *A) Size() (n int) { + var l int + _ = l + if m.AField != nil { + n += 1 + sovUnrecognizedgroup(uint64(*m.AField)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func sovUnrecognizedgroup(x uint64) (n int) { + for { + n++ + x >>= 7 + if x == 0 { + break + } + } + return n +} +func sozUnrecognizedgroup(x uint64) (n int) { + return sovUnrecognizedgroup(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (this *NewNoGroup) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NewNoGroup{`, + `Field1:` + valueToStringUnrecognizedgroup(this.Field1) + `,`, + `Field3:` + fmt.Sprintf("%v", this.Field3) + `,`, + `A:` + strings.Replace(fmt.Sprintf("%v", this.A), "A", "A", 1) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *A) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&A{`, + `AField:` + valueToStringUnrecognizedgroup(this.AField) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *OldWithGroup) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&OldWithGroup{`, + `Field1:` + valueToStringUnrecognizedgroup(this.Field1) + `,`, + `Group1:` + strings.Replace(fmt.Sprintf("%v", this.Group1), "OldWithGroup_Group1", "OldWithGroup_Group1", 1) + `,`, + `Field3:` + fmt.Sprintf("%v", this.Field3) + `,`, + `Group2:` + strings.Replace(fmt.Sprintf("%v", this.Group2), "OldWithGroup_Group2", "OldWithGroup_Group2", 1) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *OldWithGroup_Group1) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&OldWithGroup_Group1{`, + `Field1:` + valueToStringUnrecognizedgroup(this.Field1) + `,`, + `Field2:` + valueToStringUnrecognizedgroup(this.Field2) + `,`, + `Field3:` + fmt.Sprintf("%v", this.Field3) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *OldWithGroup_Group2) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&OldWithGroup_Group2{`, + `Field1:` + valueToStringUnrecognizedgroup(this.Field1) + `,`, + `Field2:` + fmt.Sprintf("%v", this.Field2) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func valueToStringUnrecognizedgroup(v interface{}) string { + rv := reflect.ValueOf(v) + if rv.IsNil() { + return "nil" + } + pv := reflect.Indirect(rv).Interface() + return fmt.Sprintf("*%v", pv) +} +func (m *NewNoGroup) 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 ErrIntOverflowUnrecognizedgroup + } + 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: NewNoGroup: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: NewNoGroup: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) + } + var v int64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowUnrecognizedgroup + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field1 = &v + case 3: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field Field3", 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.Field3 = append(m.Field3, v2) + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field A", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowUnrecognizedgroup + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthUnrecognizedgroup + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.A == nil { + m.A = &A{} + } + if err := m.A.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipUnrecognizedgroup(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthUnrecognizedgroup + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *A) 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 ErrIntOverflowUnrecognizedgroup + } + 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: A: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: A: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field AField", wireType) + } + var v int64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowUnrecognizedgroup + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.AField = &v + default: + iNdEx = preIndex + skippy, err := skipUnrecognizedgroup(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthUnrecognizedgroup + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipUnrecognizedgroup(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, ErrIntOverflowUnrecognizedgroup + } + 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, ErrIntOverflowUnrecognizedgroup + } + 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, ErrIntOverflowUnrecognizedgroup + } + 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, ErrInvalidLengthUnrecognizedgroup + } + return iNdEx, nil + case 3: + for { + var innerWire uint64 + var start int = iNdEx + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowUnrecognizedgroup + } + 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 := skipUnrecognizedgroup(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 ( + ErrInvalidLengthUnrecognizedgroup = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowUnrecognizedgroup = fmt.Errorf("proto: integer overflow") +) + +var fileDescriptorUnrecognizedgroup = []byte{ + // 290 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xe2, 0x12, 0x2f, 0xcd, 0x2b, 0x4a, + 0x4d, 0xce, 0x4f, 0xcf, 0xcb, 0xac, 0x4a, 0x4d, 0x49, 0x2f, 0xca, 0x2f, 0x2d, 0xd0, 0x2b, 0x28, + 0xca, 0x2f, 0xc9, 0x17, 0x12, 0xc4, 0x90, 0x90, 0xd2, 0x4d, 0xcf, 0x2c, 0xc9, 0x28, 0x4d, 0xd2, + 0x4b, 0xce, 0xcf, 0xd5, 0x4f, 0xcf, 0x4f, 0xcf, 0xd7, 0x07, 0xab, 0x4c, 0x2a, 0x4d, 0x03, 0xf3, + 0xc0, 0x1c, 0x30, 0x0b, 0x62, 0x82, 0x52, 0x1e, 0x17, 0x97, 0x5f, 0x6a, 0xb9, 0x5f, 0xbe, 0x3b, + 0x48, 0xb3, 0x90, 0x18, 0x17, 0x9b, 0x5b, 0x66, 0x6a, 0x4e, 0x8a, 0xa1, 0x04, 0xa3, 0x02, 0xa3, + 0x06, 0x73, 0x10, 0x5b, 0x1a, 0x98, 0x07, 0x17, 0x37, 0x96, 0x60, 0x56, 0x60, 0xd6, 0x60, 0x84, + 0x8a, 0x1b, 0x0b, 0x29, 0x71, 0x31, 0x3a, 0x4a, 0xb0, 0x02, 0x95, 0x72, 0x1b, 0x89, 0xe8, 0x61, + 0x3a, 0xd2, 0x31, 0x88, 0x31, 0xd1, 0x8a, 0xa7, 0x63, 0xa1, 0x3c, 0xe3, 0x04, 0x20, 0x5e, 0x00, + 0xc4, 0x4a, 0x9a, 0x40, 0x1d, 0x20, 0xe3, 0x1c, 0xc1, 0xe6, 0xc1, 0xac, 0x49, 0x04, 0xf3, 0xd0, + 0x94, 0x9e, 0x62, 0xe2, 0xe2, 0xf1, 0xcf, 0x49, 0x09, 0x07, 0xfa, 0x07, 0xbf, 0xeb, 0xec, 0xb8, + 0xd8, 0xc0, 0xf6, 0x19, 0x4a, 0x30, 0x01, 0xc5, 0xb9, 0x8c, 0xd4, 0xb0, 0x38, 0x05, 0xd9, 0x20, + 0x3d, 0x30, 0x69, 0x18, 0x04, 0xd5, 0x85, 0xd3, 0x77, 0x30, 0x73, 0x8d, 0x24, 0x58, 0x48, 0x30, + 0xd7, 0x08, 0x6a, 0xae, 0x91, 0x54, 0x00, 0x17, 0x9b, 0x3b, 0xaa, 0x0d, 0xb8, 0xc2, 0xd5, 0x08, + 0xec, 0x72, 0x56, 0xa8, 0xb8, 0x11, 0x2e, 0x17, 0x49, 0x59, 0x40, 0x4d, 0x34, 0x22, 0xca, 0x44, + 0x84, 0x4e, 0x23, 0x27, 0x8d, 0x13, 0x0f, 0xe5, 0x18, 0x2e, 0x00, 0xf1, 0x0d, 0x20, 0x7e, 0xf0, + 0x50, 0x8e, 0xf1, 0x03, 0x10, 0xff, 0x00, 0xe2, 0x86, 0x47, 0x72, 0x8c, 0x2b, 0x80, 0x78, 0x03, + 0x10, 0xef, 0x00, 0x62, 0x40, 0x00, 0x00, 0x00, 0xff, 0xff, 0xda, 0x14, 0xdb, 0x7e, 0x6d, 0x02, + 0x00, 0x00, +} diff --git a/vendor/github.com/gogo/protobuf/test/unrecognizedgroup/unrecognizedgroup.proto b/vendor/github.com/gogo/protobuf/test/unrecognizedgroup/unrecognizedgroup.proto new file mode 100644 index 000000000..0a33cbc9f --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/unrecognizedgroup/unrecognizedgroup.proto @@ -0,0 +1,75 @@ +// Copyright (c) 2013, Vastech SA (PTY) LTD. All rights reserved. +// http://github.com/gogo/protobuf/gogoproto +// +// 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 unrecognizedgroup; + +import "github.com/gogo/protobuf/gogoproto/gogo.proto"; + +option (gogoproto.goproto_stringer_all) = false; +option (gogoproto.goproto_enum_prefix_all) = false; +option (gogoproto.goproto_getters_all) = false; + +option (gogoproto.equal_all) = true; +option (gogoproto.verbose_equal_all) = true; +option (gogoproto.stringer_all) = true; +option (gogoproto.gostring_all) = true; +option (gogoproto.description_all) = true; + +option (gogoproto.testgen_all) = true; +option (gogoproto.populate_all) = true; + +message NewNoGroup { + option (gogoproto.unmarshaler) = true; + option (gogoproto.marshaler) = true; + option (gogoproto.sizer) = true; + optional int64 Field1 = 1; + repeated double Field3 = 3; + optional A A = 5; +} + +message A { + option (gogoproto.unmarshaler) = true; + option (gogoproto.marshaler) = true; + option (gogoproto.sizer) = true; + optional int64 AField = 1; +} + +message OldWithGroup { + optional int64 Field1 = 1; + optional group Group1 = 2 { + optional int64 Field1 = 1; + optional int32 Field2 = 2; + repeated double Field3 = 3; + } + repeated double Field3 = 3; + optional group Group2 = 4 { + optional int64 Field1 = 1; + repeated double Field2 = 2; + } +} + diff --git a/vendor/github.com/gogo/protobuf/test/unrecognizedgroup/unrecognizedgrouppb_test.go b/vendor/github.com/gogo/protobuf/test/unrecognizedgroup/unrecognizedgrouppb_test.go new file mode 100644 index 000000000..6e3415531 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/unrecognizedgroup/unrecognizedgrouppb_test.go @@ -0,0 +1,768 @@ +// Code generated by protoc-gen-gogo. +// source: unrecognizedgroup.proto +// DO NOT EDIT! + +/* +Package unrecognizedgroup is a generated protocol buffer package. + +It is generated from these files: + unrecognizedgroup.proto + +It has these top-level messages: + NewNoGroup + A + OldWithGroup +*/ +package unrecognizedgroup + +import testing "testing" +import math_rand "math/rand" +import time "time" +import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" +import github_com_gogo_protobuf_jsonpb "github.com/gogo/protobuf/jsonpb" +import fmt "fmt" +import go_parser "go/parser" +import proto "github.com/gogo/protobuf/proto" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +func TestNewNoGroupProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNewNoGroup(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NewNoGroup{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestNewNoGroupMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNewNoGroup(popr, false) + size := p.Size() + data := make([]byte, size) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(data) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NewNoGroup{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestAProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedA(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &A{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestAMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedA(popr, false) + size := p.Size() + data := make([]byte, size) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(data) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &A{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestOldWithGroupProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedOldWithGroup(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &OldWithGroup{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestOldWithGroup_Group1Proto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedOldWithGroup_Group1(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &OldWithGroup_Group1{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestOldWithGroup_Group2Proto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedOldWithGroup_Group2(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &OldWithGroup_Group2{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(data)) + copy(littlefuzz, data) + for i := range data { + data[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestNewNoGroupJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNewNoGroup(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NewNoGroup{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestAJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedA(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &A{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestOldWithGroupJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedOldWithGroup(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &OldWithGroup{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestOldWithGroup_Group1JSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedOldWithGroup_Group1(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &OldWithGroup_Group1{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestOldWithGroup_Group2JSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedOldWithGroup_Group2(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &OldWithGroup_Group2{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNewNoGroupProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNewNoGroup(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NewNoGroup{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNewNoGroupProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNewNoGroup(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NewNoGroup{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestAProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedA(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &A{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestAProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedA(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &A{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestOldWithGroupProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedOldWithGroup(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &OldWithGroup{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestOldWithGroupProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedOldWithGroup(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &OldWithGroup{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestOldWithGroup_Group1ProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedOldWithGroup_Group1(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &OldWithGroup_Group1{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestOldWithGroup_Group1ProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedOldWithGroup_Group1(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &OldWithGroup_Group1{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestOldWithGroup_Group2ProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedOldWithGroup_Group2(popr, true) + data := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &OldWithGroup_Group2{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestOldWithGroup_Group2ProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedOldWithGroup_Group2(popr, true) + data := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &OldWithGroup_Group2{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestUnrecognizedgroupDescription(t *testing.T) { + UnrecognizedgroupDescription() +} +func TestNewNoGroupVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNewNoGroup(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NewNoGroup{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestAVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedA(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &A{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestOldWithGroupVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedOldWithGroup(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &OldWithGroup{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestOldWithGroup_Group1VerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedOldWithGroup_Group1(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &OldWithGroup_Group1{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestOldWithGroup_Group2VerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedOldWithGroup_Group2(popr, false) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &OldWithGroup_Group2{} + if err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNewNoGroupGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNewNoGroup(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestAGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedA(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestOldWithGroupGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedOldWithGroup(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestOldWithGroup_Group1GoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedOldWithGroup_Group1(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestOldWithGroup_Group2GoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedOldWithGroup_Group2(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } +} +func TestNewNoGroupSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNewNoGroup(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func TestASize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedA(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + data, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(data) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(data)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func TestNewNoGroupStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNewNoGroup(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestAStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedA(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestOldWithGroupStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedOldWithGroup(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestOldWithGroup_Group1Stringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedOldWithGroup_Group1(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestOldWithGroup_Group2Stringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedOldWithGroup_Group2(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} + +//These tests are generated by github.com/gogo/protobuf/plugin/testgen diff --git a/vendor/github.com/gogo/protobuf/test/uuid.go b/vendor/github.com/gogo/protobuf/test/uuid.go new file mode 100644 index 000000000..760111191 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/uuid.go @@ -0,0 +1,126 @@ +// Extensions for Protocol Buffers to create more go like structures. +// +// Copyright (c) 2013, Vastech SA (PTY) LTD. All rights reserved. +// http://github.com/gogo/protobuf/gogoproto +// +// 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 test + +import ( + "bytes" + "encoding/json" +) + +func PutLittleEndianUint64(b []byte, offset int, v uint64) { + b[offset] = byte(v) + b[offset+1] = byte(v >> 8) + b[offset+2] = byte(v >> 16) + b[offset+3] = byte(v >> 24) + b[offset+4] = byte(v >> 32) + b[offset+5] = byte(v >> 40) + b[offset+6] = byte(v >> 48) + b[offset+7] = byte(v >> 56) +} + +type Uuid []byte + +func (uuid Uuid) Marshal() ([]byte, error) { + if len(uuid) == 0 { + return nil, nil + } + return []byte(uuid), nil +} + +func (uuid Uuid) MarshalTo(data []byte) (n int, err error) { + if len(uuid) == 0 { + return 0, nil + } + copy(data, uuid) + return 16, nil +} + +func (uuid *Uuid) Unmarshal(data []byte) error { + if len(data) == 0 { + uuid = nil + return nil + } + id := Uuid(make([]byte, 16)) + copy(id, data) + *uuid = id + return nil +} + +func (uuid *Uuid) Size() int { + if uuid == nil { + return 0 + } + if len(*uuid) == 0 { + return 0 + } + return 16 +} + +func (uuid Uuid) MarshalJSON() ([]byte, error) { + return json.Marshal([]byte(uuid)) +} + +func (uuid *Uuid) UnmarshalJSON(data []byte) error { + v := new([]byte) + err := json.Unmarshal(data, v) + if err != nil { + return err + } + return uuid.Unmarshal(*v) +} + +func (uuid Uuid) Equal(other Uuid) bool { + return bytes.Equal(uuid[0:], other[0:]) +} + +func (uuid Uuid) Compare(other Uuid) int { + return bytes.Compare(uuid[0:], other[0:]) +} + +type int63 interface { + Int63() int64 +} + +func NewPopulatedUuid(r int63) *Uuid { + u := RandV4(r) + return &u +} + +func RandV4(r int63) Uuid { + uuid := make(Uuid, 16) + uuid.RandV4(r) + return uuid +} + +func (uuid Uuid) RandV4(r int63) { + PutLittleEndianUint64(uuid, 0, uint64(r.Int63())) + PutLittleEndianUint64(uuid, 8, uint64(r.Int63())) + uuid[6] = (uuid[6] & 0xf) | 0x40 + uuid[8] = (uuid[8] & 0x3f) | 0x80 +} diff --git a/vendor/github.com/gogo/protobuf/test/uuid_test.go b/vendor/github.com/gogo/protobuf/test/uuid_test.go new file mode 100644 index 000000000..93927452f --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/uuid_test.go @@ -0,0 +1,23 @@ +package test + +import ( + "github.com/gogo/protobuf/proto" + "testing" +) + +func TestBugUuid(t *testing.T) { + u := &CustomContainer{CustomStruct: NidOptCustom{Id: Uuid{}}} + data, err := proto.Marshal(u) + if err != nil { + panic(err) + } + u2 := &CustomContainer{} + err = proto.Unmarshal(data, u2) + if err != nil { + panic(err) + } + t.Logf("%+v", u2) + if u2.CustomStruct.Id != nil { + t.Fatalf("should be nil") + } +} diff --git a/vendor/github.com/gogo/protobuf/vanity/command/command.go b/vendor/github.com/gogo/protobuf/vanity/command/command.go new file mode 100644 index 000000000..7fba42e4c --- /dev/null +++ b/vendor/github.com/gogo/protobuf/vanity/command/command.go @@ -0,0 +1,152 @@ +// Extensions for Protocol Buffers to create more go like structures. +// +// Copyright (c) 2015, Vastech SA (PTY) LTD. All rights reserved. +// http://github.com/gogo/protobuf/gogoproto +// +// 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 command + +import ( + "io/ioutil" + "os" + + "github.com/gogo/protobuf/proto" + "github.com/gogo/protobuf/protoc-gen-gogo/generator" + plugin "github.com/gogo/protobuf/protoc-gen-gogo/plugin" + + _ "github.com/gogo/protobuf/plugin/grpc" + + _ "github.com/gogo/protobuf/plugin/compare" + _ "github.com/gogo/protobuf/plugin/defaultcheck" + _ "github.com/gogo/protobuf/plugin/description" + _ "github.com/gogo/protobuf/plugin/embedcheck" + _ "github.com/gogo/protobuf/plugin/enumstringer" + _ "github.com/gogo/protobuf/plugin/equal" + _ "github.com/gogo/protobuf/plugin/face" + _ "github.com/gogo/protobuf/plugin/gostring" + _ "github.com/gogo/protobuf/plugin/marshalto" + _ "github.com/gogo/protobuf/plugin/oneofcheck" + _ "github.com/gogo/protobuf/plugin/populate" + _ "github.com/gogo/protobuf/plugin/size" + _ "github.com/gogo/protobuf/plugin/stringer" + _ "github.com/gogo/protobuf/plugin/union" + _ "github.com/gogo/protobuf/plugin/unmarshal" + + "github.com/gogo/protobuf/plugin/testgen" + + "go/format" + "strings" +) + +func Read() *plugin.CodeGeneratorRequest { + g := generator.New() + data, err := ioutil.ReadAll(os.Stdin) + if err != nil { + g.Error(err, "reading input") + } + + if err := proto.Unmarshal(data, g.Request); err != nil { + g.Error(err, "parsing input proto") + } + + if len(g.Request.FileToGenerate) == 0 { + g.Fail("no files to generate") + } + return g.Request +} + +func Generate(req *plugin.CodeGeneratorRequest) *plugin.CodeGeneratorResponse { + // Begin by allocating a generator. The request and response structures are stored there + // so we can do error handling easily - the response structure contains the field to + // report failure. + g := generator.New() + g.Request = req + + g.CommandLineParameters(g.Request.GetParameter()) + + // Create a wrapped version of the Descriptors and EnumDescriptors that + // point to the file that defines them. + g.WrapTypes() + + g.SetPackageNames() + g.BuildTypeNameMap() + + g.GenerateAllFiles() + + gtest := generator.New() + + data, err := proto.Marshal(req) + if err != nil { + g.Error(err, "failed to marshal modified proto") + } + if err := proto.Unmarshal(data, gtest.Request); err != nil { + g.Error(err, "parsing modified proto") + } + + if len(gtest.Request.FileToGenerate) == 0 { + gtest.Fail("no files to generate") + } + + gtest.CommandLineParameters(gtest.Request.GetParameter()) + + // Create a wrapped version of the Descriptors and EnumDescriptors that + // point to the file that defines them. + gtest.WrapTypes() + + gtest.SetPackageNames() + gtest.BuildTypeNameMap() + + gtest.GeneratePlugin(testgen.NewPlugin()) + + for i := 0; i < len(gtest.Response.File); i++ { + if strings.Contains(*gtest.Response.File[i].Content, `//These tests are generated by github.com/gogo/protobuf/plugin/testgen`) { + gtest.Response.File[i].Name = proto.String(strings.Replace(*gtest.Response.File[i].Name, ".pb.go", "pb_test.go", -1)) + g.Response.File = append(g.Response.File, gtest.Response.File[i]) + } + } + + for i := 0; i < len(g.Response.File); i++ { + formatted, err := format.Source([]byte(g.Response.File[i].GetContent())) + if err != nil { + g.Error(err, "go format error") + } + fmts := string(formatted) + g.Response.File[i].Content = &fmts + } + return g.Response +} + +func Write(resp *plugin.CodeGeneratorResponse) { + g := generator.New() + // Send back the results. + data, err := proto.Marshal(resp) + if err != nil { + g.Error(err, "failed to marshal output proto") + } + _, err = os.Stdout.Write(data) + if err != nil { + g.Error(err, "failed to write output proto") + } +} diff --git a/vendor/github.com/gogo/protobuf/vanity/enum.go b/vendor/github.com/gogo/protobuf/vanity/enum.go new file mode 100644 index 000000000..13d089744 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/vanity/enum.go @@ -0,0 +1,78 @@ +// Extensions for Protocol Buffers to create more go like structures. +// +// Copyright (c) 2015, Vastech SA (PTY) LTD. rights reserved. +// http://github.com/gogo/protobuf/gogoproto +// +// 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 vanity + +import ( + "github.com/gogo/protobuf/gogoproto" + "github.com/gogo/protobuf/proto" + descriptor "github.com/gogo/protobuf/protoc-gen-gogo/descriptor" +) + +func EnumHasBoolExtension(enum *descriptor.EnumDescriptorProto, extension *proto.ExtensionDesc) bool { + if enum.Options == nil { + return false + } + value, err := proto.GetExtension(enum.Options, extension) + if err != nil { + return false + } + if value == nil { + return false + } + if value.(*bool) == nil { + return false + } + return true +} + +func SetBoolEnumOption(extension *proto.ExtensionDesc, value bool) func(enum *descriptor.EnumDescriptorProto) { + return func(enum *descriptor.EnumDescriptorProto) { + if EnumHasBoolExtension(enum, extension) { + return + } + if enum.Options == nil { + enum.Options = &descriptor.EnumOptions{} + } + if err := proto.SetExtension(enum.Options, extension, &value); err != nil { + panic(err) + } + } +} + +func TurnOffGoEnumPrefix(enum *descriptor.EnumDescriptorProto) { + SetBoolEnumOption(gogoproto.E_GoprotoEnumPrefix, false)(enum) +} + +func TurnOffGoEnumStringer(enum *descriptor.EnumDescriptorProto) { + SetBoolEnumOption(gogoproto.E_GoprotoEnumStringer, false)(enum) +} + +func TurnOnEnumStringer(enum *descriptor.EnumDescriptorProto) { + SetBoolEnumOption(gogoproto.E_EnumStringer, true)(enum) +} diff --git a/vendor/github.com/gogo/protobuf/vanity/field.go b/vendor/github.com/gogo/protobuf/vanity/field.go new file mode 100644 index 000000000..a484d1e1c --- /dev/null +++ b/vendor/github.com/gogo/protobuf/vanity/field.go @@ -0,0 +1,83 @@ +// Extensions for Protocol Buffers to create more go like structures. +// +// Copyright (c) 2015, Vastech SA (PTY) LTD. rights reserved. +// http://github.com/gogo/protobuf/gogoproto +// +// 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 vanity + +import ( + "github.com/gogo/protobuf/gogoproto" + "github.com/gogo/protobuf/proto" + descriptor "github.com/gogo/protobuf/protoc-gen-gogo/descriptor" +) + +func FieldHasBoolExtension(field *descriptor.FieldDescriptorProto, extension *proto.ExtensionDesc) bool { + if field.Options == nil { + return false + } + value, err := proto.GetExtension(field.Options, extension) + if err != nil { + return false + } + if value == nil { + return false + } + if value.(*bool) == nil { + return false + } + return true +} + +func SetBoolFieldOption(extension *proto.ExtensionDesc, value bool) func(field *descriptor.FieldDescriptorProto) { + return func(field *descriptor.FieldDescriptorProto) { + if FieldHasBoolExtension(field, extension) { + return + } + if field.Options == nil { + field.Options = &descriptor.FieldOptions{} + } + if err := proto.SetExtension(field.Options, extension, &value); err != nil { + panic(err) + } + } +} + +func TurnOffNullable(field *descriptor.FieldDescriptorProto) { + if field.IsRepeated() && !field.IsMessage() { + return + } + SetBoolFieldOption(gogoproto.E_Nullable, false)(field) +} + +func TurnOffNullableForNativeTypesWithoutDefaultsOnly(field *descriptor.FieldDescriptorProto) { + if field.IsRepeated() || field.IsMessage() { + return + } + if field.DefaultValue != nil { + return + } + SetBoolFieldOption(gogoproto.E_Nullable, false)(field) +} diff --git a/vendor/github.com/gogo/protobuf/vanity/file.go b/vendor/github.com/gogo/protobuf/vanity/file.go new file mode 100644 index 000000000..d82fcdabb --- /dev/null +++ b/vendor/github.com/gogo/protobuf/vanity/file.go @@ -0,0 +1,175 @@ +// Extensions for Protocol Buffers to create more go like structures. +// +// Copyright (c) 2015, Vastech SA (PTY) LTD. All rights reserved. +// http://github.com/gogo/protobuf/gogoproto +// +// 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 vanity + +import ( + "strings" + + "github.com/gogo/protobuf/gogoproto" + "github.com/gogo/protobuf/proto" + descriptor "github.com/gogo/protobuf/protoc-gen-gogo/descriptor" +) + +func NotInPackageGoogleProtobuf(file *descriptor.FileDescriptorProto) bool { + return !strings.HasPrefix(file.GetPackage(), "google.protobuf") +} + +func FilterFiles(files []*descriptor.FileDescriptorProto, f func(file *descriptor.FileDescriptorProto) bool) []*descriptor.FileDescriptorProto { + filtered := make([]*descriptor.FileDescriptorProto, 0, len(files)) + for i := range files { + if !f(files[i]) { + continue + } + filtered = append(filtered, files[i]) + } + return filtered +} + +func FileHasBoolExtension(file *descriptor.FileDescriptorProto, extension *proto.ExtensionDesc) bool { + if file.Options == nil { + return false + } + value, err := proto.GetExtension(file.Options, extension) + if err != nil { + return false + } + if value == nil { + return false + } + if value.(*bool) == nil { + return false + } + return true +} + +func SetBoolFileOption(extension *proto.ExtensionDesc, value bool) func(file *descriptor.FileDescriptorProto) { + return func(file *descriptor.FileDescriptorProto) { + if FileHasBoolExtension(file, extension) { + return + } + if file.Options == nil { + file.Options = &descriptor.FileOptions{} + } + if err := proto.SetExtension(file.Options, extension, &value); err != nil { + panic(err) + } + } +} + +func TurnOffGoGettersAll(file *descriptor.FileDescriptorProto) { + SetBoolFileOption(gogoproto.E_GoprotoGettersAll, false)(file) +} + +func TurnOffGoEnumPrefixAll(file *descriptor.FileDescriptorProto) { + SetBoolFileOption(gogoproto.E_GoprotoEnumPrefixAll, false)(file) +} + +func TurnOffGoStringerAll(file *descriptor.FileDescriptorProto) { + SetBoolFileOption(gogoproto.E_GoprotoStringerAll, false)(file) +} + +func TurnOnVerboseEqualAll(file *descriptor.FileDescriptorProto) { + SetBoolFileOption(gogoproto.E_VerboseEqualAll, true)(file) +} + +func TurnOnFaceAll(file *descriptor.FileDescriptorProto) { + SetBoolFileOption(gogoproto.E_FaceAll, true)(file) +} + +func TurnOnGoStringAll(file *descriptor.FileDescriptorProto) { + SetBoolFileOption(gogoproto.E_GostringAll, true)(file) +} + +func TurnOnPopulateAll(file *descriptor.FileDescriptorProto) { + SetBoolFileOption(gogoproto.E_PopulateAll, true)(file) +} + +func TurnOnStringerAll(file *descriptor.FileDescriptorProto) { + SetBoolFileOption(gogoproto.E_StringerAll, true)(file) +} + +func TurnOnEqualAll(file *descriptor.FileDescriptorProto) { + SetBoolFileOption(gogoproto.E_EqualAll, true)(file) +} + +func TurnOnDescriptionAll(file *descriptor.FileDescriptorProto) { + SetBoolFileOption(gogoproto.E_DescriptionAll, true)(file) +} + +func TurnOnTestGenAll(file *descriptor.FileDescriptorProto) { + SetBoolFileOption(gogoproto.E_TestgenAll, true)(file) +} + +func TurnOnBenchGenAll(file *descriptor.FileDescriptorProto) { + SetBoolFileOption(gogoproto.E_BenchgenAll, true)(file) +} + +func TurnOnMarshalerAll(file *descriptor.FileDescriptorProto) { + SetBoolFileOption(gogoproto.E_MarshalerAll, true)(file) +} + +func TurnOnUnmarshalerAll(file *descriptor.FileDescriptorProto) { + SetBoolFileOption(gogoproto.E_UnmarshalerAll, true)(file) +} + +func TurnOnStable_MarshalerAll(file *descriptor.FileDescriptorProto) { + SetBoolFileOption(gogoproto.E_StableMarshalerAll, true)(file) +} + +func TurnOnSizerAll(file *descriptor.FileDescriptorProto) { + SetBoolFileOption(gogoproto.E_SizerAll, true)(file) +} + +func TurnOffGoEnumStringerAll(file *descriptor.FileDescriptorProto) { + SetBoolFileOption(gogoproto.E_GoprotoEnumStringerAll, false)(file) +} + +func TurnOnEnumStringerAll(file *descriptor.FileDescriptorProto) { + SetBoolFileOption(gogoproto.E_EnumStringerAll, true)(file) +} + +func TurnOnUnsafeUnmarshalerAll(file *descriptor.FileDescriptorProto) { + SetBoolFileOption(gogoproto.E_UnsafeUnmarshalerAll, true)(file) +} + +func TurnOnUnsafeMarshalerAll(file *descriptor.FileDescriptorProto) { + SetBoolFileOption(gogoproto.E_UnsafeMarshalerAll, true)(file) +} + +func TurnOffGoExtensionsMapAll(file *descriptor.FileDescriptorProto) { + SetBoolFileOption(gogoproto.E_GoprotoExtensionsMapAll, false)(file) +} + +func TurnOffGoUnrecognizedAll(file *descriptor.FileDescriptorProto) { + SetBoolFileOption(gogoproto.E_GoprotoUnrecognizedAll, false)(file) +} + +func TurnOffGogoImport(file *descriptor.FileDescriptorProto) { + SetBoolFileOption(gogoproto.E_GogoprotoImport, false)(file) +} diff --git a/vendor/github.com/gogo/protobuf/vanity/foreach.go b/vendor/github.com/gogo/protobuf/vanity/foreach.go new file mode 100644 index 000000000..0133c9d2b --- /dev/null +++ b/vendor/github.com/gogo/protobuf/vanity/foreach.go @@ -0,0 +1,125 @@ +// Extensions for Protocol Buffers to create more go like structures. +// +// Copyright (c) 2015, Vastech SA (PTY) LTD. All rights reserved. +// http://github.com/gogo/protobuf/gogoproto +// +// 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 vanity + +import descriptor "github.com/gogo/protobuf/protoc-gen-gogo/descriptor" + +func ForEachFile(files []*descriptor.FileDescriptorProto, f func(file *descriptor.FileDescriptorProto)) { + for _, file := range files { + f(file) + } +} + +func OnlyProto2(files []*descriptor.FileDescriptorProto) []*descriptor.FileDescriptorProto { + outs := make([]*descriptor.FileDescriptorProto, 0, len(files)) + for i, file := range files { + if file.GetSyntax() == "proto3" { + continue + } + outs = append(outs, files[i]) + } + return outs +} + +func OnlyProto3(files []*descriptor.FileDescriptorProto) []*descriptor.FileDescriptorProto { + outs := make([]*descriptor.FileDescriptorProto, 0, len(files)) + for i, file := range files { + if file.GetSyntax() != "proto3" { + continue + } + outs = append(outs, files[i]) + } + return outs +} + +func ForEachMessageInFiles(files []*descriptor.FileDescriptorProto, f func(msg *descriptor.DescriptorProto)) { + for _, file := range files { + ForEachMessage(file.MessageType, f) + } +} + +func ForEachMessage(msgs []*descriptor.DescriptorProto, f func(msg *descriptor.DescriptorProto)) { + for _, msg := range msgs { + f(msg) + ForEachMessage(msg.NestedType, f) + } +} + +func ForEachFieldInFilesExcludingExtensions(files []*descriptor.FileDescriptorProto, f func(field *descriptor.FieldDescriptorProto)) { + for _, file := range files { + ForEachFieldExcludingExtensions(file.MessageType, f) + } +} + +func ForEachFieldInFiles(files []*descriptor.FileDescriptorProto, f func(field *descriptor.FieldDescriptorProto)) { + for _, file := range files { + for _, ext := range file.Extension { + f(ext) + } + ForEachField(file.MessageType, f) + } +} + +func ForEachFieldExcludingExtensions(msgs []*descriptor.DescriptorProto, f func(field *descriptor.FieldDescriptorProto)) { + for _, msg := range msgs { + for _, field := range msg.Field { + f(field) + } + ForEachField(msg.NestedType, f) + } +} + +func ForEachField(msgs []*descriptor.DescriptorProto, f func(field *descriptor.FieldDescriptorProto)) { + for _, msg := range msgs { + for _, field := range msg.Field { + f(field) + } + for _, ext := range msg.Extension { + f(ext) + } + ForEachField(msg.NestedType, f) + } +} + +func ForEachEnumInFiles(files []*descriptor.FileDescriptorProto, f func(enum *descriptor.EnumDescriptorProto)) { + for _, file := range files { + for _, enum := range file.EnumType { + f(enum) + } + } +} + +func ForEachEnum(msgs []*descriptor.DescriptorProto, f func(field *descriptor.EnumDescriptorProto)) { + for _, msg := range msgs { + for _, field := range msg.EnumType { + f(field) + } + ForEachEnum(msg.NestedType, f) + } +} diff --git a/vendor/github.com/gogo/protobuf/vanity/msg.go b/vendor/github.com/gogo/protobuf/vanity/msg.go new file mode 100644 index 000000000..3954a1869 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/vanity/msg.go @@ -0,0 +1,138 @@ +// Extensions for Protocol Buffers to create more go like structures. +// +// Copyright (c) 2015, Vastech SA (PTY) LTD. rights reserved. +// http://github.com/gogo/protobuf/gogoproto +// +// 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 vanity + +import ( + "github.com/gogo/protobuf/gogoproto" + "github.com/gogo/protobuf/proto" + descriptor "github.com/gogo/protobuf/protoc-gen-gogo/descriptor" +) + +func MessageHasBoolExtension(msg *descriptor.DescriptorProto, extension *proto.ExtensionDesc) bool { + if msg.Options == nil { + return false + } + value, err := proto.GetExtension(msg.Options, extension) + if err != nil { + return false + } + if value == nil { + return false + } + if value.(*bool) == nil { + return false + } + return true +} + +func SetBoolMessageOption(extension *proto.ExtensionDesc, value bool) func(msg *descriptor.DescriptorProto) { + return func(msg *descriptor.DescriptorProto) { + if MessageHasBoolExtension(msg, extension) { + return + } + if msg.Options == nil { + msg.Options = &descriptor.MessageOptions{} + } + if err := proto.SetExtension(msg.Options, extension, &value); err != nil { + panic(err) + } + } +} + +func TurnOffGoGetters(msg *descriptor.DescriptorProto) { + SetBoolMessageOption(gogoproto.E_GoprotoGetters, false)(msg) +} + +func TurnOffGoStringer(msg *descriptor.DescriptorProto) { + SetBoolMessageOption(gogoproto.E_GoprotoStringer, false)(msg) +} + +func TurnOnVerboseEqual(msg *descriptor.DescriptorProto) { + SetBoolMessageOption(gogoproto.E_VerboseEqual, true)(msg) +} + +func TurnOnFace(msg *descriptor.DescriptorProto) { + SetBoolMessageOption(gogoproto.E_Face, true)(msg) +} + +func TurnOnGoString(msg *descriptor.DescriptorProto) { + SetBoolMessageOption(gogoproto.E_Face, true)(msg) +} + +func TurnOnPopulate(msg *descriptor.DescriptorProto) { + SetBoolMessageOption(gogoproto.E_Populate, true)(msg) +} + +func TurnOnStringer(msg *descriptor.DescriptorProto) { + SetBoolMessageOption(gogoproto.E_Stringer, true)(msg) +} + +func TurnOnEqual(msg *descriptor.DescriptorProto) { + SetBoolMessageOption(gogoproto.E_Equal, true)(msg) +} + +func TurnOnDescription(msg *descriptor.DescriptorProto) { + SetBoolMessageOption(gogoproto.E_Description, true)(msg) +} + +func TurnOnTestGen(msg *descriptor.DescriptorProto) { + SetBoolMessageOption(gogoproto.E_Testgen, true)(msg) +} + +func TurnOnBenchGen(msg *descriptor.DescriptorProto) { + SetBoolMessageOption(gogoproto.E_Benchgen, true)(msg) +} + +func TurnOnMarshaler(msg *descriptor.DescriptorProto) { + SetBoolMessageOption(gogoproto.E_Marshaler, true)(msg) +} + +func TurnOnUnmarshaler(msg *descriptor.DescriptorProto) { + SetBoolMessageOption(gogoproto.E_Unmarshaler, true)(msg) +} + +func TurnOnSizer(msg *descriptor.DescriptorProto) { + SetBoolMessageOption(gogoproto.E_Sizer, true)(msg) +} + +func TurnOnUnsafeUnmarshaler(msg *descriptor.DescriptorProto) { + SetBoolMessageOption(gogoproto.E_UnsafeUnmarshaler, true)(msg) +} + +func TurnOnUnsafeMarshaler(msg *descriptor.DescriptorProto) { + SetBoolMessageOption(gogoproto.E_UnsafeMarshaler, true)(msg) +} + +func TurnOffGoExtensionsMap(msg *descriptor.DescriptorProto) { + SetBoolMessageOption(gogoproto.E_GoprotoExtensionsMap, false)(msg) +} + +func TurnOffGoUnrecognized(msg *descriptor.DescriptorProto) { + SetBoolMessageOption(gogoproto.E_GoprotoUnrecognized, false)(msg) +} diff --git a/vendor/github.com/gogo/protobuf/vanity/test/Makefile b/vendor/github.com/gogo/protobuf/vanity/test/Makefile new file mode 100644 index 000000000..846b74fd9 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/vanity/test/Makefile @@ -0,0 +1,18 @@ +regenerate: + go install github.com/gogo/protobuf/protoc-gen-gogofast + protoc --gogofast_out=./fast/ vanity.proto + protoc --proto_path=../../:../../../../../:../../protobuf/:. --gogofast_out=./fast/ gogovanity.proto + protoc-min-version -version="3.0.0" --proto_path=../../:../../../../../:../../protobuf/:. --gogofast_out=./fast/ proto3.proto + go install github.com/gogo/protobuf/protoc-gen-gogofaster + protoc --gogofaster_out=./faster/ vanity.proto + protoc --proto_path=../../:../../../../../:../../protobuf/:. --gogofaster_out=./faster/ gogovanity.proto + protoc-min-version -version="3.0.0" --proto_path=../../:../../../../../:../../protobuf/:. --gogofaster_out=./faster/ proto3.proto + go install github.com/gogo/protobuf/protoc-gen-gogoslick + protoc --gogoslick_out=./slick/ vanity.proto + protoc --proto_path=../../:../../../../../:../../protobuf/:. --gogoslick_out=./slick/ gogovanity.proto + protoc-min-version -version="3.0.0" --proto_path=../../:../../../../../:../../protobuf/:. --gogoslick_out=./slick/ proto3.proto + +test: + go install github.com/gogo/protobuf/protoc-gen-gofast + protoc --gofast_out=./gofast/ vanity.proto + go test ./... diff --git a/vendor/github.com/gogo/protobuf/vanity/test/doc.go b/vendor/github.com/gogo/protobuf/vanity/test/doc.go new file mode 100644 index 000000000..56e540407 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/vanity/test/doc.go @@ -0,0 +1 @@ +package test diff --git a/vendor/github.com/gogo/protobuf/vanity/test/fast/gogovanity.pb.go b/vendor/github.com/gogo/protobuf/vanity/test/fast/gogovanity.pb.go new file mode 100644 index 000000000..c68ef812b --- /dev/null +++ b/vendor/github.com/gogo/protobuf/vanity/test/fast/gogovanity.pb.go @@ -0,0 +1,404 @@ +// Code generated by protoc-gen-gogo. +// source: gogovanity.proto +// DO NOT EDIT! + +/* + Package vanity is a generated protocol buffer package. + + It is generated from these files: + gogovanity.proto + + It has these top-level messages: + B +*/ +package vanity + +import proto "github.com/gogo/protobuf/proto" +import fmt "fmt" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" + +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. +const _ = proto.GoGoProtoPackageIsVersion1 + +type B struct { + String_ *string `protobuf:"bytes,1,opt,name=String,json=string" json:"String,omitempty"` + Int64 *int64 `protobuf:"varint,2,opt,name=Int64,json=int64" json:"Int64,omitempty"` + Int32 *int32 `protobuf:"varint,3,opt,name=Int32,json=int32,def=1234" json:"Int32,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *B) Reset() { *m = B{} } +func (m *B) String() string { return proto.CompactTextString(m) } +func (*B) ProtoMessage() {} +func (*B) Descriptor() ([]byte, []int) { return fileDescriptorGogovanity, []int{0} } + +const Default_B_Int32 int32 = 1234 + +func (m *B) GetString_() string { + if m != nil && m.String_ != nil { + return *m.String_ + } + return "" +} + +func (m *B) GetInt64() int64 { + if m != nil && m.Int64 != nil { + return *m.Int64 + } + return 0 +} + +func (m *B) GetInt32() int32 { + if m != nil && m.Int32 != nil { + return *m.Int32 + } + return Default_B_Int32 +} + +func init() { + proto.RegisterType((*B)(nil), "vanity.B") +} +func (m *B) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *B) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.String_ != nil { + data[i] = 0xa + i++ + i = encodeVarintGogovanity(data, i, uint64(len(*m.String_))) + i += copy(data[i:], *m.String_) + } + if m.Int64 != nil { + data[i] = 0x10 + i++ + i = encodeVarintGogovanity(data, i, uint64(*m.Int64)) + } + if m.Int32 != nil { + data[i] = 0x18 + i++ + i = encodeVarintGogovanity(data, i, uint64(*m.Int32)) + } + if m.XXX_unrecognized != nil { + i += copy(data[i:], m.XXX_unrecognized) + } + return i, nil +} + +func encodeFixed64Gogovanity(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 encodeFixed32Gogovanity(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 encodeVarintGogovanity(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 (m *B) Size() (n int) { + var l int + _ = l + if m.String_ != nil { + l = len(*m.String_) + n += 1 + l + sovGogovanity(uint64(l)) + } + if m.Int64 != nil { + n += 1 + sovGogovanity(uint64(*m.Int64)) + } + if m.Int32 != nil { + n += 1 + sovGogovanity(uint64(*m.Int32)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func sovGogovanity(x uint64) (n int) { + for { + n++ + x >>= 7 + if x == 0 { + break + } + } + return n +} +func sozGogovanity(x uint64) (n int) { + return sovGogovanity(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *B) 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 ErrIntOverflowGogovanity + } + 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: B: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: B: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field String_", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGogovanity + } + 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 ErrInvalidLengthGogovanity + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + s := string(data[iNdEx:postIndex]) + m.String_ = &s + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Int64", wireType) + } + var v int64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGogovanity + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Int64 = &v + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Int32", wireType) + } + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGogovanity + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Int32 = &v + default: + iNdEx = preIndex + skippy, err := skipGogovanity(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthGogovanity + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipGogovanity(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, ErrIntOverflowGogovanity + } + 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, ErrIntOverflowGogovanity + } + 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, ErrIntOverflowGogovanity + } + 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, ErrInvalidLengthGogovanity + } + return iNdEx, nil + case 3: + for { + var innerWire uint64 + var start int = iNdEx + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowGogovanity + } + 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 := skipGogovanity(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 ( + ErrInvalidLengthGogovanity = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowGogovanity = fmt.Errorf("proto: integer overflow") +) + +var fileDescriptorGogovanity = []byte{ + // 157 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xe2, 0x12, 0x48, 0xcf, 0x4f, 0xcf, + 0x2f, 0x4b, 0xcc, 0xcb, 0x2c, 0xa9, 0xd4, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x62, 0x83, 0xf0, + 0xa4, 0x74, 0xd3, 0x33, 0x4b, 0x32, 0x4a, 0x93, 0xf4, 0x92, 0xf3, 0x73, 0xf5, 0x41, 0x8a, 0xf4, + 0xc1, 0xd2, 0x49, 0xa5, 0x69, 0x60, 0x1e, 0x98, 0x03, 0x66, 0x41, 0xb4, 0x29, 0x05, 0x73, 0x31, + 0x3a, 0x09, 0xc9, 0x70, 0xb1, 0x05, 0x97, 0x14, 0x65, 0xe6, 0xa5, 0x4b, 0x30, 0x2a, 0x30, 0x6a, + 0x70, 0x3a, 0xb1, 0x9c, 0xb8, 0x27, 0xcf, 0x18, 0xc4, 0x56, 0x0c, 0x16, 0x13, 0x12, 0xe1, 0x62, + 0xf5, 0xcc, 0x2b, 0x31, 0x33, 0x91, 0x60, 0x02, 0x4a, 0x32, 0x07, 0xb1, 0x66, 0x82, 0x38, 0x42, + 0x52, 0x60, 0x51, 0x63, 0x23, 0x09, 0x66, 0xa0, 0x28, 0xab, 0x15, 0x8b, 0xa1, 0x91, 0xb1, 0x09, + 0x58, 0xce, 0xd8, 0xc8, 0x89, 0xe7, 0xc4, 0x23, 0x39, 0xc6, 0x0b, 0x40, 0xfc, 0x00, 0x88, 0x01, + 0x01, 0x00, 0x00, 0xff, 0xff, 0xa4, 0x7b, 0xe6, 0xd9, 0xac, 0x00, 0x00, 0x00, +} diff --git a/vendor/github.com/gogo/protobuf/vanity/test/fast/proto3.pb.go b/vendor/github.com/gogo/protobuf/vanity/test/fast/proto3.pb.go new file mode 100644 index 000000000..5419f2ccf --- /dev/null +++ b/vendor/github.com/gogo/protobuf/vanity/test/fast/proto3.pb.go @@ -0,0 +1,308 @@ +// Code generated by protoc-gen-gogo. +// source: proto3.proto +// DO NOT EDIT! + +/* +Package vanity is a generated protocol buffer package. + +It is generated from these files: + proto3.proto + +It has these top-level messages: + Aproto3 +*/ +package vanity + +import proto "github.com/gogo/protobuf/proto" +import fmt "fmt" +import math "math" + +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. +const _ = proto.GoGoProtoPackageIsVersion1 + +type Aproto3 struct { + B string `protobuf:"bytes,1,opt,name=B,json=b,proto3" json:"B,omitempty"` +} + +func (m *Aproto3) Reset() { *m = Aproto3{} } +func (m *Aproto3) String() string { return proto.CompactTextString(m) } +func (*Aproto3) ProtoMessage() {} +func (*Aproto3) Descriptor() ([]byte, []int) { return fileDescriptorProto3, []int{0} } + +func init() { + proto.RegisterType((*Aproto3)(nil), "vanity.Aproto3") +} +func (m *Aproto3) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *Aproto3) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.B) > 0 { + data[i] = 0xa + i++ + i = encodeVarintProto3(data, i, uint64(len(m.B))) + i += copy(data[i:], m.B) + } + return i, nil +} + +func encodeFixed64Proto3(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 encodeFixed32Proto3(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 encodeVarintProto3(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 (m *Aproto3) Size() (n int) { + var l int + _ = l + l = len(m.B) + if l > 0 { + n += 1 + l + sovProto3(uint64(l)) + } + return n +} + +func sovProto3(x uint64) (n int) { + for { + n++ + x >>= 7 + if x == 0 { + break + } + } + return n +} +func sozProto3(x uint64) (n int) { + return sovProto3(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *Aproto3) 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 ErrIntOverflowProto3 + } + 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: Aproto3: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Aproto3: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field B", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProto3 + } + 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 ErrInvalidLengthProto3 + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.B = string(data[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipProto3(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthProto3 + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipProto3(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, ErrIntOverflowProto3 + } + 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, ErrIntOverflowProto3 + } + 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, ErrIntOverflowProto3 + } + 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, ErrInvalidLengthProto3 + } + return iNdEx, nil + case 3: + for { + var innerWire uint64 + var start int = iNdEx + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowProto3 + } + 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 := skipProto3(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 ( + ErrInvalidLengthProto3 = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowProto3 = fmt.Errorf("proto: integer overflow") +) + +var fileDescriptorProto3 = []byte{ + // 79 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xe2, 0xe2, 0x29, 0x28, 0xca, 0x2f, + 0xc9, 0x37, 0xd6, 0x03, 0x53, 0x42, 0x6c, 0x65, 0x89, 0x79, 0x99, 0x25, 0x95, 0x4a, 0xe2, 0x5c, + 0xec, 0x8e, 0x10, 0x09, 0x21, 0x1e, 0x2e, 0x46, 0x27, 0x09, 0x46, 0x05, 0x46, 0x0d, 0xce, 0x20, + 0xc6, 0x24, 0x27, 0x9e, 0x13, 0x8f, 0xe4, 0x18, 0x2f, 0x00, 0xf1, 0x03, 0x20, 0x4e, 0x62, 0x83, + 0xa8, 0x01, 0x04, 0x00, 0x00, 0xff, 0xff, 0x0f, 0x14, 0x77, 0x86, 0x45, 0x00, 0x00, 0x00, +} diff --git a/vendor/github.com/gogo/protobuf/vanity/test/fast/vanity.pb.go b/vendor/github.com/gogo/protobuf/vanity/test/fast/vanity.pb.go new file mode 100644 index 000000000..8ca617fe8 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/vanity/test/fast/vanity.pb.go @@ -0,0 +1,371 @@ +// Code generated by protoc-gen-gogo. +// source: vanity.proto +// DO NOT EDIT! + +/* + Package vanity is a generated protocol buffer package. + + It is generated from these files: + vanity.proto + + It has these top-level messages: + A +*/ +package vanity + +import proto "github.com/gogo/protobuf/proto" +import fmt "fmt" +import math "math" + +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. +const _ = proto.GoGoProtoPackageIsVersion1 + +type A struct { + Strings *string `protobuf:"bytes,1,opt,name=Strings,json=strings" json:"Strings,omitempty"` + Int *int64 `protobuf:"varint,2,req,name=Int,json=int" json:"Int,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *A) Reset() { *m = A{} } +func (m *A) String() string { return proto.CompactTextString(m) } +func (*A) ProtoMessage() {} +func (*A) Descriptor() ([]byte, []int) { return fileDescriptorVanity, []int{0} } + +func (m *A) GetStrings() string { + if m != nil && m.Strings != nil { + return *m.Strings + } + return "" +} + +func (m *A) GetInt() int64 { + if m != nil && m.Int != nil { + return *m.Int + } + return 0 +} + +func init() { + proto.RegisterType((*A)(nil), "vanity.A") +} +func (m *A) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *A) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Strings != nil { + data[i] = 0xa + i++ + i = encodeVarintVanity(data, i, uint64(len(*m.Strings))) + i += copy(data[i:], *m.Strings) + } + if m.Int == nil { + return 0, github_com_gogo_protobuf_proto.NewRequiredNotSetError("Int") + } else { + data[i] = 0x10 + i++ + i = encodeVarintVanity(data, i, uint64(*m.Int)) + } + if m.XXX_unrecognized != nil { + i += copy(data[i:], m.XXX_unrecognized) + } + return i, nil +} + +func encodeFixed64Vanity(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 encodeFixed32Vanity(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 encodeVarintVanity(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 (m *A) Size() (n int) { + var l int + _ = l + if m.Strings != nil { + l = len(*m.Strings) + n += 1 + l + sovVanity(uint64(l)) + } + if m.Int != nil { + n += 1 + sovVanity(uint64(*m.Int)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func sovVanity(x uint64) (n int) { + for { + n++ + x >>= 7 + if x == 0 { + break + } + } + return n +} +func sozVanity(x uint64) (n int) { + return sovVanity(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *A) 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 ErrIntOverflowVanity + } + 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: A: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: A: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Strings", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowVanity + } + 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 ErrInvalidLengthVanity + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + s := string(data[iNdEx:postIndex]) + m.Strings = &s + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Int", wireType) + } + var v int64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowVanity + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Int = &v + hasFields[0] |= uint64(0x00000001) + default: + iNdEx = preIndex + skippy, err := skipVanity(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthVanity + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + if hasFields[0]&uint64(0x00000001) == 0 { + return github_com_gogo_protobuf_proto.NewRequiredNotSetError("Int") + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipVanity(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, ErrIntOverflowVanity + } + 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, ErrIntOverflowVanity + } + 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, ErrIntOverflowVanity + } + 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, ErrInvalidLengthVanity + } + return iNdEx, nil + case 3: + for { + var innerWire uint64 + var start int = iNdEx + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowVanity + } + 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 := skipVanity(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 ( + ErrInvalidLengthVanity = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowVanity = fmt.Errorf("proto: integer overflow") +) + +var fileDescriptorVanity = []byte{ + // 98 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xe2, 0xe2, 0x29, 0x4b, 0xcc, 0xcb, + 0x2c, 0xa9, 0xd4, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x62, 0x83, 0xf0, 0x94, 0xf4, 0xb9, 0x18, + 0x1d, 0x85, 0x24, 0xb8, 0xd8, 0x83, 0x4b, 0x8a, 0x32, 0xf3, 0xd2, 0x8b, 0x25, 0x18, 0x15, 0x18, + 0x35, 0x38, 0x83, 0xd8, 0x8b, 0x21, 0x5c, 0x21, 0x01, 0x2e, 0x66, 0xcf, 0xbc, 0x12, 0x09, 0x26, + 0x05, 0x26, 0x0d, 0xe6, 0x20, 0xe6, 0xcc, 0xbc, 0x12, 0x27, 0x9e, 0x13, 0x8f, 0xe4, 0x18, 0x2f, + 0x00, 0xf1, 0x03, 0x20, 0x06, 0x04, 0x00, 0x00, 0xff, 0xff, 0xf9, 0x16, 0x19, 0x2a, 0x55, 0x00, + 0x00, 0x00, +} diff --git a/vendor/github.com/gogo/protobuf/vanity/test/faster/gogovanity.pb.go b/vendor/github.com/gogo/protobuf/vanity/test/faster/gogovanity.pb.go new file mode 100644 index 000000000..665045d1d --- /dev/null +++ b/vendor/github.com/gogo/protobuf/vanity/test/faster/gogovanity.pb.go @@ -0,0 +1,392 @@ +// Code generated by protoc-gen-gogo. +// source: gogovanity.proto +// DO NOT EDIT! + +/* + Package vanity is a generated protocol buffer package. + + It is generated from these files: + gogovanity.proto + + It has these top-level messages: + B +*/ +package vanity + +import proto "github.com/gogo/protobuf/proto" +import fmt "fmt" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" + +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. +const _ = proto.GoGoProtoPackageIsVersion1 + +type B struct { + String_ *string `protobuf:"bytes,1,opt,name=String,json=string" json:"String,omitempty"` + Int64 int64 `protobuf:"varint,2,opt,name=Int64,json=int64" json:"Int64"` + Int32 *int32 `protobuf:"varint,3,opt,name=Int32,json=int32,def=1234" json:"Int32,omitempty"` +} + +func (m *B) Reset() { *m = B{} } +func (m *B) String() string { return proto.CompactTextString(m) } +func (*B) ProtoMessage() {} +func (*B) Descriptor() ([]byte, []int) { return fileDescriptorGogovanity, []int{0} } + +const Default_B_Int32 int32 = 1234 + +func (m *B) GetString_() string { + if m != nil && m.String_ != nil { + return *m.String_ + } + return "" +} + +func (m *B) GetInt64() int64 { + if m != nil { + return m.Int64 + } + return 0 +} + +func (m *B) GetInt32() int32 { + if m != nil && m.Int32 != nil { + return *m.Int32 + } + return Default_B_Int32 +} + +func init() { + proto.RegisterType((*B)(nil), "vanity.B") +} +func (m *B) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *B) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.String_ != nil { + data[i] = 0xa + i++ + i = encodeVarintGogovanity(data, i, uint64(len(*m.String_))) + i += copy(data[i:], *m.String_) + } + data[i] = 0x10 + i++ + i = encodeVarintGogovanity(data, i, uint64(m.Int64)) + if m.Int32 != nil { + data[i] = 0x18 + i++ + i = encodeVarintGogovanity(data, i, uint64(*m.Int32)) + } + return i, nil +} + +func encodeFixed64Gogovanity(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 encodeFixed32Gogovanity(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 encodeVarintGogovanity(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 (m *B) Size() (n int) { + var l int + _ = l + if m.String_ != nil { + l = len(*m.String_) + n += 1 + l + sovGogovanity(uint64(l)) + } + n += 1 + sovGogovanity(uint64(m.Int64)) + if m.Int32 != nil { + n += 1 + sovGogovanity(uint64(*m.Int32)) + } + return n +} + +func sovGogovanity(x uint64) (n int) { + for { + n++ + x >>= 7 + if x == 0 { + break + } + } + return n +} +func sozGogovanity(x uint64) (n int) { + return sovGogovanity(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *B) 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 ErrIntOverflowGogovanity + } + 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: B: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: B: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field String_", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGogovanity + } + 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 ErrInvalidLengthGogovanity + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + s := string(data[iNdEx:postIndex]) + m.String_ = &s + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Int64", wireType) + } + m.Int64 = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGogovanity + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + m.Int64 |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Int32", wireType) + } + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGogovanity + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Int32 = &v + default: + iNdEx = preIndex + skippy, err := skipGogovanity(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthGogovanity + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipGogovanity(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, ErrIntOverflowGogovanity + } + 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, ErrIntOverflowGogovanity + } + 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, ErrIntOverflowGogovanity + } + 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, ErrInvalidLengthGogovanity + } + return iNdEx, nil + case 3: + for { + var innerWire uint64 + var start int = iNdEx + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowGogovanity + } + 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 := skipGogovanity(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 ( + ErrInvalidLengthGogovanity = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowGogovanity = fmt.Errorf("proto: integer overflow") +) + +var fileDescriptorGogovanity = []byte{ + // 162 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xe2, 0x12, 0x48, 0xcf, 0x4f, 0xcf, + 0x2f, 0x4b, 0xcc, 0xcb, 0x2c, 0xa9, 0xd4, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x62, 0x83, 0xf0, + 0xa4, 0x74, 0xd3, 0x33, 0x4b, 0x32, 0x4a, 0x93, 0xf4, 0x92, 0xf3, 0x73, 0xf5, 0x41, 0x8a, 0xf4, + 0xc1, 0xd2, 0x49, 0xa5, 0x69, 0x60, 0x1e, 0x98, 0x03, 0x66, 0x41, 0xb4, 0x29, 0x45, 0x72, 0x31, + 0x3a, 0x09, 0xc9, 0x70, 0xb1, 0x05, 0x97, 0x14, 0x65, 0xe6, 0xa5, 0x4b, 0x30, 0x2a, 0x30, 0x6a, + 0x70, 0x3a, 0xb1, 0x9c, 0xb8, 0x27, 0xcf, 0x18, 0xc4, 0x56, 0x0c, 0x16, 0x13, 0x92, 0xe2, 0x62, + 0xf5, 0xcc, 0x2b, 0x31, 0x33, 0x91, 0x60, 0x02, 0x4a, 0x32, 0x83, 0x25, 0x19, 0x82, 0x58, 0x33, + 0x41, 0x42, 0x50, 0x39, 0x63, 0x23, 0x09, 0x66, 0xa0, 0x1c, 0xab, 0x15, 0x8b, 0xa1, 0x91, 0xb1, + 0x09, 0x58, 0xce, 0xd8, 0xc8, 0x49, 0xe0, 0xc4, 0x23, 0x39, 0xc6, 0x0b, 0x40, 0xfc, 0x00, 0x88, + 0x27, 0x3c, 0x96, 0x63, 0x00, 0x04, 0x00, 0x00, 0xff, 0xff, 0xb0, 0xdf, 0x35, 0x69, 0xb6, 0x00, + 0x00, 0x00, +} diff --git a/vendor/github.com/gogo/protobuf/vanity/test/faster/proto3.pb.go b/vendor/github.com/gogo/protobuf/vanity/test/faster/proto3.pb.go new file mode 100644 index 000000000..8e8ce118e --- /dev/null +++ b/vendor/github.com/gogo/protobuf/vanity/test/faster/proto3.pb.go @@ -0,0 +1,309 @@ +// Code generated by protoc-gen-gogo. +// source: proto3.proto +// DO NOT EDIT! + +/* +Package vanity is a generated protocol buffer package. + +It is generated from these files: + proto3.proto + +It has these top-level messages: + Aproto3 +*/ +package vanity + +import proto "github.com/gogo/protobuf/proto" +import fmt "fmt" +import math "math" + +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. +const _ = proto.GoGoProtoPackageIsVersion1 + +type Aproto3 struct { + B string `protobuf:"bytes,1,opt,name=B,json=b,proto3" json:"B,omitempty"` +} + +func (m *Aproto3) Reset() { *m = Aproto3{} } +func (m *Aproto3) String() string { return proto.CompactTextString(m) } +func (*Aproto3) ProtoMessage() {} +func (*Aproto3) Descriptor() ([]byte, []int) { return fileDescriptorProto3, []int{0} } + +func init() { + proto.RegisterType((*Aproto3)(nil), "vanity.Aproto3") +} +func (m *Aproto3) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *Aproto3) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.B) > 0 { + data[i] = 0xa + i++ + i = encodeVarintProto3(data, i, uint64(len(m.B))) + i += copy(data[i:], m.B) + } + return i, nil +} + +func encodeFixed64Proto3(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 encodeFixed32Proto3(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 encodeVarintProto3(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 (m *Aproto3) Size() (n int) { + var l int + _ = l + l = len(m.B) + if l > 0 { + n += 1 + l + sovProto3(uint64(l)) + } + return n +} + +func sovProto3(x uint64) (n int) { + for { + n++ + x >>= 7 + if x == 0 { + break + } + } + return n +} +func sozProto3(x uint64) (n int) { + return sovProto3(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *Aproto3) 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 ErrIntOverflowProto3 + } + 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: Aproto3: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Aproto3: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field B", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProto3 + } + 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 ErrInvalidLengthProto3 + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.B = string(data[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipProto3(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthProto3 + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipProto3(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, ErrIntOverflowProto3 + } + 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, ErrIntOverflowProto3 + } + 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, ErrIntOverflowProto3 + } + 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, ErrInvalidLengthProto3 + } + return iNdEx, nil + case 3: + for { + var innerWire uint64 + var start int = iNdEx + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowProto3 + } + 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 := skipProto3(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 ( + ErrInvalidLengthProto3 = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowProto3 = fmt.Errorf("proto: integer overflow") +) + +var fileDescriptorProto3 = []byte{ + // 83 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xe2, 0xe2, 0x29, 0x28, 0xca, 0x2f, + 0xc9, 0x37, 0xd6, 0x03, 0x53, 0x42, 0x6c, 0x65, 0x89, 0x79, 0x99, 0x25, 0x95, 0x4a, 0xe2, 0x5c, + 0xec, 0x8e, 0x10, 0x09, 0x21, 0x1e, 0x2e, 0x46, 0x27, 0x09, 0x46, 0x05, 0x46, 0x0d, 0xce, 0x20, + 0xc6, 0x24, 0x27, 0x81, 0x13, 0x8f, 0xe4, 0x18, 0x2f, 0x00, 0xf1, 0x03, 0x20, 0x9e, 0xf0, 0x58, + 0x8e, 0x21, 0x89, 0x0d, 0xa2, 0x0e, 0x10, 0x00, 0x00, 0xff, 0xff, 0xdd, 0x77, 0x4a, 0x7c, 0x49, + 0x00, 0x00, 0x00, +} diff --git a/vendor/github.com/gogo/protobuf/vanity/test/faster/vanity.pb.go b/vendor/github.com/gogo/protobuf/vanity/test/faster/vanity.pb.go new file mode 100644 index 000000000..ec74cc988 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/vanity/test/faster/vanity.pb.go @@ -0,0 +1,350 @@ +// Code generated by protoc-gen-gogo. +// source: vanity.proto +// DO NOT EDIT! + +/* + Package vanity is a generated protocol buffer package. + + It is generated from these files: + vanity.proto + + It has these top-level messages: + A +*/ +package vanity + +import proto "github.com/gogo/protobuf/proto" +import fmt "fmt" +import math "math" + +import io "io" +import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" + +// 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. +const _ = proto.GoGoProtoPackageIsVersion1 + +type A struct { + Strings string `protobuf:"bytes,1,opt,name=Strings,json=strings" json:"Strings"` + Int int64 `protobuf:"varint,2,req,name=Int,json=int" json:"Int"` +} + +func (m *A) Reset() { *m = A{} } +func (m *A) String() string { return proto.CompactTextString(m) } +func (*A) ProtoMessage() {} +func (*A) Descriptor() ([]byte, []int) { return fileDescriptorVanity, []int{0} } + +func (m *A) GetStrings() string { + if m != nil { + return m.Strings + } + return "" +} + +func (m *A) GetInt() int64 { + if m != nil { + return m.Int + } + return 0 +} + +func init() { + proto.RegisterType((*A)(nil), "vanity.A") +} +func (m *A) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *A) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + data[i] = 0xa + i++ + i = encodeVarintVanity(data, i, uint64(len(m.Strings))) + i += copy(data[i:], m.Strings) + data[i] = 0x10 + i++ + i = encodeVarintVanity(data, i, uint64(m.Int)) + return i, nil +} + +func encodeFixed64Vanity(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 encodeFixed32Vanity(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 encodeVarintVanity(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 (m *A) Size() (n int) { + var l int + _ = l + l = len(m.Strings) + n += 1 + l + sovVanity(uint64(l)) + n += 1 + sovVanity(uint64(m.Int)) + return n +} + +func sovVanity(x uint64) (n int) { + for { + n++ + x >>= 7 + if x == 0 { + break + } + } + return n +} +func sozVanity(x uint64) (n int) { + return sovVanity(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *A) 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 ErrIntOverflowVanity + } + 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: A: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: A: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Strings", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowVanity + } + 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 ErrInvalidLengthVanity + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Strings = string(data[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Int", wireType) + } + m.Int = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowVanity + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + m.Int |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + hasFields[0] |= uint64(0x00000001) + default: + iNdEx = preIndex + skippy, err := skipVanity(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthVanity + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + if hasFields[0]&uint64(0x00000001) == 0 { + return github_com_gogo_protobuf_proto.NewRequiredNotSetError("Int") + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipVanity(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, ErrIntOverflowVanity + } + 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, ErrIntOverflowVanity + } + 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, ErrIntOverflowVanity + } + 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, ErrInvalidLengthVanity + } + return iNdEx, nil + case 3: + for { + var innerWire uint64 + var start int = iNdEx + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowVanity + } + 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 := skipVanity(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 ( + ErrInvalidLengthVanity = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowVanity = fmt.Errorf("proto: integer overflow") +) + +var fileDescriptorVanity = []byte{ + // 110 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xe2, 0xe2, 0x29, 0x4b, 0xcc, 0xcb, + 0x2c, 0xa9, 0xd4, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x62, 0x83, 0xf0, 0x94, 0xac, 0xb9, 0x18, + 0x1d, 0x85, 0xe4, 0xb8, 0xd8, 0x83, 0x4b, 0x8a, 0x32, 0xf3, 0xd2, 0x8b, 0x25, 0x18, 0x15, 0x18, + 0x35, 0x38, 0x9d, 0x58, 0x4e, 0xdc, 0x93, 0x67, 0x08, 0x62, 0x2f, 0x86, 0x08, 0x0a, 0x89, 0x71, + 0x31, 0x7b, 0xe6, 0x95, 0x48, 0x30, 0x29, 0x30, 0x69, 0x30, 0x43, 0xe5, 0x98, 0x33, 0xf3, 0x4a, + 0x9c, 0x04, 0x4e, 0x3c, 0x92, 0x63, 0xbc, 0x00, 0xc4, 0x0f, 0x80, 0x78, 0xc2, 0x63, 0x39, 0x06, + 0x40, 0x00, 0x00, 0x00, 0xff, 0xff, 0x35, 0x96, 0x94, 0xc6, 0x65, 0x00, 0x00, 0x00, +} diff --git a/vendor/github.com/gogo/protobuf/vanity/test/gofast/.gitignore b/vendor/github.com/gogo/protobuf/vanity/test/gofast/.gitignore new file mode 100644 index 000000000..9b0b440dc --- /dev/null +++ b/vendor/github.com/gogo/protobuf/vanity/test/gofast/.gitignore @@ -0,0 +1 @@ +*.pb.go \ No newline at end of file diff --git a/vendor/github.com/gogo/protobuf/vanity/test/gogovanity.proto b/vendor/github.com/gogo/protobuf/vanity/test/gogovanity.proto new file mode 100644 index 000000000..5d75ec6b0 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/vanity/test/gogovanity.proto @@ -0,0 +1,37 @@ +// Copyright (c) 2015, Vastech SA (PTY) LTD. All rights reserved. +// http://github.com/gogo/protobuf/gogoproto +// +// 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 vanity; + +import "github.com/gogo/protobuf/gogoproto/gogo.proto"; + +message B { + optional string String = 1 [(gogoproto.nullable) = true]; + optional int64 Int64 = 2; + optional int32 Int32 = 3 [default = 1234]; +} diff --git a/vendor/github.com/gogo/protobuf/vanity/test/proto3.proto b/vendor/github.com/gogo/protobuf/vanity/test/proto3.proto new file mode 100644 index 000000000..429b6fda1 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/vanity/test/proto3.proto @@ -0,0 +1,33 @@ +// Copyright (c) 2015, Vastech SA (PTY) LTD. All rights reserved. +// http://github.com/gogo/protobuf/gogoproto +// +// 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 = "proto3"; + +package vanity; + +message Aproto3 { + string B = 1; +} \ No newline at end of file diff --git a/vendor/github.com/gogo/protobuf/vanity/test/slick/gogovanity.pb.go b/vendor/github.com/gogo/protobuf/vanity/test/slick/gogovanity.pb.go new file mode 100644 index 000000000..a5310ef11 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/vanity/test/slick/gogovanity.pb.go @@ -0,0 +1,507 @@ +// Code generated by protoc-gen-gogo. +// source: gogovanity.proto +// DO NOT EDIT! + +/* + Package vanity is a generated protocol buffer package. + + It is generated from these files: + gogovanity.proto + + It has these top-level messages: + B +*/ +package vanity + +import proto "github.com/gogo/protobuf/proto" +import fmt "fmt" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" + +import strings "strings" +import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" +import sort "sort" +import strconv "strconv" +import reflect "reflect" + +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. +const _ = proto.GoGoProtoPackageIsVersion1 + +type B struct { + String_ *string `protobuf:"bytes,1,opt,name=String,json=string" json:"String,omitempty"` + Int64 int64 `protobuf:"varint,2,opt,name=Int64,json=int64" json:"Int64"` + Int32 *int32 `protobuf:"varint,3,opt,name=Int32,json=int32,def=1234" json:"Int32,omitempty"` +} + +func (m *B) Reset() { *m = B{} } +func (*B) ProtoMessage() {} +func (*B) Descriptor() ([]byte, []int) { return fileDescriptorGogovanity, []int{0} } + +const Default_B_Int32 int32 = 1234 + +func (m *B) GetString_() string { + if m != nil && m.String_ != nil { + return *m.String_ + } + return "" +} + +func (m *B) GetInt64() int64 { + if m != nil { + return m.Int64 + } + return 0 +} + +func (m *B) GetInt32() int32 { + if m != nil && m.Int32 != nil { + return *m.Int32 + } + return Default_B_Int32 +} + +func init() { + proto.RegisterType((*B)(nil), "vanity.B") +} +func (this *B) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*B) + if !ok { + that2, ok := that.(B) + 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.String_ != nil && that1.String_ != nil { + if *this.String_ != *that1.String_ { + return false + } + } else if this.String_ != nil { + return false + } else if that1.String_ != nil { + return false + } + if this.Int64 != that1.Int64 { + return false + } + if this.Int32 != nil && that1.Int32 != nil { + if *this.Int32 != *that1.Int32 { + return false + } + } else if this.Int32 != nil { + return false + } else if that1.Int32 != nil { + return false + } + return true +} +func (this *B) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 7) + s = append(s, "&vanity.B{") + if this.String_ != nil { + s = append(s, "String_: "+valueToGoStringGogovanity(this.String_, "string")+",\n") + } + s = append(s, "Int64: "+fmt.Sprintf("%#v", this.Int64)+",\n") + if this.Int32 != nil { + s = append(s, "Int32: "+valueToGoStringGogovanity(this.Int32, "int32")+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func valueToGoStringGogovanity(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 extensionToGoStringGogovanity(e map[int32]github_com_gogo_protobuf_proto.Extension) string { + if e == nil { + return "nil" + } + s := "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 +} +func (m *B) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *B) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.String_ != nil { + data[i] = 0xa + i++ + i = encodeVarintGogovanity(data, i, uint64(len(*m.String_))) + i += copy(data[i:], *m.String_) + } + data[i] = 0x10 + i++ + i = encodeVarintGogovanity(data, i, uint64(m.Int64)) + if m.Int32 != nil { + data[i] = 0x18 + i++ + i = encodeVarintGogovanity(data, i, uint64(*m.Int32)) + } + return i, nil +} + +func encodeFixed64Gogovanity(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 encodeFixed32Gogovanity(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 encodeVarintGogovanity(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 (m *B) Size() (n int) { + var l int + _ = l + if m.String_ != nil { + l = len(*m.String_) + n += 1 + l + sovGogovanity(uint64(l)) + } + n += 1 + sovGogovanity(uint64(m.Int64)) + if m.Int32 != nil { + n += 1 + sovGogovanity(uint64(*m.Int32)) + } + return n +} + +func sovGogovanity(x uint64) (n int) { + for { + n++ + x >>= 7 + if x == 0 { + break + } + } + return n +} +func sozGogovanity(x uint64) (n int) { + return sovGogovanity(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (this *B) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&B{`, + `String_:` + valueToStringGogovanity(this.String_) + `,`, + `Int64:` + fmt.Sprintf("%v", this.Int64) + `,`, + `Int32:` + valueToStringGogovanity(this.Int32) + `,`, + `}`, + }, "") + return s +} +func valueToStringGogovanity(v interface{}) string { + rv := reflect.ValueOf(v) + if rv.IsNil() { + return "nil" + } + pv := reflect.Indirect(rv).Interface() + return fmt.Sprintf("*%v", pv) +} +func (m *B) 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 ErrIntOverflowGogovanity + } + 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: B: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: B: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field String_", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGogovanity + } + 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 ErrInvalidLengthGogovanity + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + s := string(data[iNdEx:postIndex]) + m.String_ = &s + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Int64", wireType) + } + m.Int64 = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGogovanity + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + m.Int64 |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Int32", wireType) + } + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGogovanity + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Int32 = &v + default: + iNdEx = preIndex + skippy, err := skipGogovanity(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthGogovanity + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipGogovanity(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, ErrIntOverflowGogovanity + } + 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, ErrIntOverflowGogovanity + } + 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, ErrIntOverflowGogovanity + } + 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, ErrInvalidLengthGogovanity + } + return iNdEx, nil + case 3: + for { + var innerWire uint64 + var start int = iNdEx + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowGogovanity + } + 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 := skipGogovanity(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 ( + ErrInvalidLengthGogovanity = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowGogovanity = fmt.Errorf("proto: integer overflow") +) + +var fileDescriptorGogovanity = []byte{ + // 184 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xe2, 0x12, 0x48, 0xcf, 0x4f, 0xcf, + 0x2f, 0x4b, 0xcc, 0xcb, 0x2c, 0xa9, 0xd4, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x62, 0x83, 0xf0, + 0xa4, 0x74, 0xd3, 0x33, 0x4b, 0x32, 0x4a, 0x93, 0xf4, 0x92, 0xf3, 0x73, 0xf5, 0x41, 0x8a, 0xf4, + 0xc1, 0xd2, 0x49, 0xa5, 0x69, 0x60, 0x1e, 0x98, 0x03, 0x66, 0x41, 0xb4, 0x29, 0x45, 0x72, 0x31, + 0x3a, 0x09, 0xc9, 0x70, 0xb1, 0x05, 0x97, 0x14, 0x65, 0xe6, 0xa5, 0x4b, 0x30, 0x2a, 0x30, 0x6a, + 0x70, 0x3a, 0xb1, 0x9c, 0xb8, 0x27, 0xcf, 0x18, 0xc4, 0x56, 0x0c, 0x16, 0x13, 0x92, 0xe2, 0x62, + 0xf5, 0xcc, 0x2b, 0x31, 0x33, 0x91, 0x60, 0x02, 0x4a, 0x32, 0x83, 0x25, 0x19, 0x82, 0x58, 0x33, + 0x41, 0x42, 0x50, 0x39, 0x63, 0x23, 0x09, 0x66, 0xa0, 0x1c, 0xab, 0x15, 0x8b, 0xa1, 0x91, 0xb1, + 0x09, 0x58, 0xce, 0xd8, 0xc8, 0x49, 0xe7, 0xc2, 0x43, 0x39, 0x86, 0x1b, 0x40, 0xfc, 0xe1, 0xa1, + 0x1c, 0x63, 0xc3, 0x23, 0x39, 0xc6, 0x15, 0x40, 0x7c, 0x02, 0x88, 0x2f, 0x00, 0xf1, 0x03, 0x20, + 0x7e, 0xf1, 0x08, 0x28, 0x07, 0xa4, 0x27, 0x3c, 0x96, 0x63, 0x00, 0x04, 0x00, 0x00, 0xff, 0xff, + 0x07, 0xdc, 0x7b, 0x6e, 0xd2, 0x00, 0x00, 0x00, +} diff --git a/vendor/github.com/gogo/protobuf/vanity/test/slick/proto3.pb.go b/vendor/github.com/gogo/protobuf/vanity/test/slick/proto3.pb.go new file mode 100644 index 000000000..3bba92543 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/vanity/test/slick/proto3.pb.go @@ -0,0 +1,398 @@ +// Code generated by protoc-gen-gogo. +// source: proto3.proto +// DO NOT EDIT! + +/* +Package vanity is a generated protocol buffer package. + +It is generated from these files: + proto3.proto + +It has these top-level messages: + Aproto3 +*/ +package vanity + +import proto "github.com/gogo/protobuf/proto" +import fmt "fmt" +import math "math" + +import strings "strings" +import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" +import sort "sort" +import strconv "strconv" +import reflect "reflect" + +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. +const _ = proto.GoGoProtoPackageIsVersion1 + +type Aproto3 struct { + B string `protobuf:"bytes,1,opt,name=B,json=b,proto3" json:"B,omitempty"` +} + +func (m *Aproto3) Reset() { *m = Aproto3{} } +func (*Aproto3) ProtoMessage() {} +func (*Aproto3) Descriptor() ([]byte, []int) { return fileDescriptorProto3, []int{0} } + +func init() { + proto.RegisterType((*Aproto3)(nil), "vanity.Aproto3") +} +func (this *Aproto3) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*Aproto3) + if !ok { + that2, ok := that.(Aproto3) + 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.B != that1.B { + return false + } + return true +} +func (this *Aproto3) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&vanity.Aproto3{") + s = append(s, "B: "+fmt.Sprintf("%#v", this.B)+",\n") + s = append(s, "}") + return strings.Join(s, "") +} +func valueToGoStringProto3(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 extensionToGoStringProto3(e map[int32]github_com_gogo_protobuf_proto.Extension) string { + if e == nil { + return "nil" + } + s := "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 +} +func (m *Aproto3) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *Aproto3) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.B) > 0 { + data[i] = 0xa + i++ + i = encodeVarintProto3(data, i, uint64(len(m.B))) + i += copy(data[i:], m.B) + } + return i, nil +} + +func encodeFixed64Proto3(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 encodeFixed32Proto3(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 encodeVarintProto3(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 (m *Aproto3) Size() (n int) { + var l int + _ = l + l = len(m.B) + if l > 0 { + n += 1 + l + sovProto3(uint64(l)) + } + return n +} + +func sovProto3(x uint64) (n int) { + for { + n++ + x >>= 7 + if x == 0 { + break + } + } + return n +} +func sozProto3(x uint64) (n int) { + return sovProto3(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (this *Aproto3) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&Aproto3{`, + `B:` + fmt.Sprintf("%v", this.B) + `,`, + `}`, + }, "") + return s +} +func valueToStringProto3(v interface{}) string { + rv := reflect.ValueOf(v) + if rv.IsNil() { + return "nil" + } + pv := reflect.Indirect(rv).Interface() + return fmt.Sprintf("*%v", pv) +} +func (m *Aproto3) 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 ErrIntOverflowProto3 + } + 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: Aproto3: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Aproto3: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field B", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProto3 + } + 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 ErrInvalidLengthProto3 + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.B = string(data[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipProto3(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthProto3 + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipProto3(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, ErrIntOverflowProto3 + } + 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, ErrIntOverflowProto3 + } + 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, ErrIntOverflowProto3 + } + 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, ErrInvalidLengthProto3 + } + return iNdEx, nil + case 3: + for { + var innerWire uint64 + var start int = iNdEx + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowProto3 + } + 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 := skipProto3(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 ( + ErrInvalidLengthProto3 = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowProto3 = fmt.Errorf("proto: integer overflow") +) + +var fileDescriptorProto3 = []byte{ + // 105 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xe2, 0xe2, 0x29, 0x28, 0xca, 0x2f, + 0xc9, 0x37, 0xd6, 0x03, 0x53, 0x42, 0x6c, 0x65, 0x89, 0x79, 0x99, 0x25, 0x95, 0x4a, 0xe2, 0x5c, + 0xec, 0x8e, 0x10, 0x09, 0x21, 0x1e, 0x2e, 0x46, 0x27, 0x09, 0x46, 0x05, 0x46, 0x0d, 0xce, 0x20, + 0xc6, 0x24, 0x27, 0x9d, 0x0b, 0x0f, 0xe5, 0x18, 0x6e, 0x00, 0xf1, 0x87, 0x87, 0x72, 0x8c, 0x0d, + 0x8f, 0xe4, 0x18, 0x57, 0x00, 0xf1, 0x09, 0x20, 0xbe, 0x00, 0xc4, 0x0f, 0x80, 0xf8, 0xc5, 0x23, + 0xa0, 0x1c, 0x90, 0x9e, 0xf0, 0x58, 0x8e, 0x21, 0x89, 0x0d, 0x62, 0x06, 0x20, 0x00, 0x00, 0xff, + 0xff, 0x37, 0xd7, 0x45, 0xf0, 0x65, 0x00, 0x00, 0x00, +} diff --git a/vendor/github.com/gogo/protobuf/vanity/test/slick/vanity.pb.go b/vendor/github.com/gogo/protobuf/vanity/test/slick/vanity.pb.go new file mode 100644 index 000000000..448be468d --- /dev/null +++ b/vendor/github.com/gogo/protobuf/vanity/test/slick/vanity.pb.go @@ -0,0 +1,444 @@ +// Code generated by protoc-gen-gogo. +// source: vanity.proto +// DO NOT EDIT! + +/* + Package vanity is a generated protocol buffer package. + + It is generated from these files: + vanity.proto + + It has these top-level messages: + A +*/ +package vanity + +import proto "github.com/gogo/protobuf/proto" +import fmt "fmt" +import math "math" + +import strings "strings" +import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" +import sort "sort" +import strconv "strconv" +import reflect "reflect" + +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. +const _ = proto.GoGoProtoPackageIsVersion1 + +type A struct { + Strings string `protobuf:"bytes,1,opt,name=Strings,json=strings" json:"Strings"` + Int int64 `protobuf:"varint,2,req,name=Int,json=int" json:"Int"` +} + +func (m *A) Reset() { *m = A{} } +func (*A) ProtoMessage() {} +func (*A) Descriptor() ([]byte, []int) { return fileDescriptorVanity, []int{0} } + +func (m *A) GetStrings() string { + if m != nil { + return m.Strings + } + return "" +} + +func (m *A) GetInt() int64 { + if m != nil { + return m.Int + } + return 0 +} + +func init() { + proto.RegisterType((*A)(nil), "vanity.A") +} +func (this *A) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*A) + if !ok { + that2, ok := that.(A) + 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.Strings != that1.Strings { + return false + } + if this.Int != that1.Int { + return false + } + return true +} +func (this *A) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 6) + s = append(s, "&vanity.A{") + s = append(s, "Strings: "+fmt.Sprintf("%#v", this.Strings)+",\n") + s = append(s, "Int: "+fmt.Sprintf("%#v", this.Int)+",\n") + s = append(s, "}") + return strings.Join(s, "") +} +func valueToGoStringVanity(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 extensionToGoStringVanity(e map[int32]github_com_gogo_protobuf_proto.Extension) string { + if e == nil { + return "nil" + } + s := "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 +} +func (m *A) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *A) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + data[i] = 0xa + i++ + i = encodeVarintVanity(data, i, uint64(len(m.Strings))) + i += copy(data[i:], m.Strings) + data[i] = 0x10 + i++ + i = encodeVarintVanity(data, i, uint64(m.Int)) + return i, nil +} + +func encodeFixed64Vanity(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 encodeFixed32Vanity(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 encodeVarintVanity(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 (m *A) Size() (n int) { + var l int + _ = l + l = len(m.Strings) + n += 1 + l + sovVanity(uint64(l)) + n += 1 + sovVanity(uint64(m.Int)) + return n +} + +func sovVanity(x uint64) (n int) { + for { + n++ + x >>= 7 + if x == 0 { + break + } + } + return n +} +func sozVanity(x uint64) (n int) { + return sovVanity(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (this *A) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&A{`, + `Strings:` + fmt.Sprintf("%v", this.Strings) + `,`, + `Int:` + fmt.Sprintf("%v", this.Int) + `,`, + `}`, + }, "") + return s +} +func valueToStringVanity(v interface{}) string { + rv := reflect.ValueOf(v) + if rv.IsNil() { + return "nil" + } + pv := reflect.Indirect(rv).Interface() + return fmt.Sprintf("*%v", pv) +} +func (m *A) 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 ErrIntOverflowVanity + } + 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: A: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: A: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Strings", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowVanity + } + 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 ErrInvalidLengthVanity + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Strings = string(data[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Int", wireType) + } + m.Int = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowVanity + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + m.Int |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + hasFields[0] |= uint64(0x00000001) + default: + iNdEx = preIndex + skippy, err := skipVanity(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthVanity + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + if hasFields[0]&uint64(0x00000001) == 0 { + return github_com_gogo_protobuf_proto.NewRequiredNotSetError("Int") + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipVanity(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, ErrIntOverflowVanity + } + 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, ErrIntOverflowVanity + } + 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, ErrIntOverflowVanity + } + 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, ErrInvalidLengthVanity + } + return iNdEx, nil + case 3: + for { + var innerWire uint64 + var start int = iNdEx + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowVanity + } + 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 := skipVanity(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 ( + ErrInvalidLengthVanity = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowVanity = fmt.Errorf("proto: integer overflow") +) + +var fileDescriptorVanity = []byte{ + // 132 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xe2, 0xe2, 0x29, 0x4b, 0xcc, 0xcb, + 0x2c, 0xa9, 0xd4, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x62, 0x83, 0xf0, 0x94, 0xac, 0xb9, 0x18, + 0x1d, 0x85, 0xe4, 0xb8, 0xd8, 0x83, 0x4b, 0x8a, 0x32, 0xf3, 0xd2, 0x8b, 0x25, 0x18, 0x15, 0x18, + 0x35, 0x38, 0x9d, 0x58, 0x4e, 0xdc, 0x93, 0x67, 0x08, 0x62, 0x2f, 0x86, 0x08, 0x0a, 0x89, 0x71, + 0x31, 0x7b, 0xe6, 0x95, 0x48, 0x30, 0x29, 0x30, 0x69, 0x30, 0x43, 0xe5, 0x98, 0x33, 0xf3, 0x4a, + 0x9c, 0x74, 0x2e, 0x3c, 0x94, 0x63, 0xb8, 0x01, 0xc4, 0x1f, 0x1e, 0xca, 0x31, 0x36, 0x3c, 0x92, + 0x63, 0x5c, 0x01, 0xc4, 0x27, 0x80, 0xf8, 0x02, 0x10, 0x3f, 0x00, 0xe2, 0x17, 0x8f, 0x80, 0x72, + 0x40, 0x7a, 0xc2, 0x63, 0x39, 0x06, 0x40, 0x00, 0x00, 0x00, 0xff, 0xff, 0x61, 0xf3, 0x18, 0x78, + 0x81, 0x00, 0x00, 0x00, +} diff --git a/vendor/github.com/gogo/protobuf/vanity/test/vanity.proto b/vendor/github.com/gogo/protobuf/vanity/test/vanity.proto new file mode 100644 index 000000000..081153806 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/vanity/test/vanity.proto @@ -0,0 +1,34 @@ +// Copyright (c) 2015, Vastech SA (PTY) LTD. All rights reserved. +// http://github.com/gogo/protobuf/gogoproto +// +// 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 vanity; + +message A { + optional string Strings = 1; + required int64 Int = 2; +} diff --git a/vendor/github.com/gogo/protobuf/vanity/test/vanity_test.go b/vendor/github.com/gogo/protobuf/vanity/test/vanity_test.go new file mode 100644 index 000000000..688fdc327 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/vanity/test/vanity_test.go @@ -0,0 +1,93 @@ +// Extensions for Protocol Buffers to create more go like structures. +// +// Copyright (c) 2015, Vastech SA (PTY) LTD. All rights reserved. +// http://github.com/gogo/protobuf/gogoproto +// +// 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 test + +import ( + fast "github.com/gogo/protobuf/vanity/test/fast" + faster "github.com/gogo/protobuf/vanity/test/faster" + slick "github.com/gogo/protobuf/vanity/test/slick" + "testing" +) + +func TestFast(t *testing.T) { + _ = (&fast.A{}).Marshal + _ = (&fast.A{}).MarshalTo + _ = (&fast.A{}).Unmarshal + _ = (&fast.A{}).Size + + _ = (&fast.B{}).Marshal + _ = (&fast.B{}).MarshalTo + _ = (&fast.B{}).Unmarshal + _ = (&fast.B{}).Size +} + +func TestFaster(t *testing.T) { + _ = (&faster.A{}).Marshal + _ = (&faster.A{}).MarshalTo + _ = (&faster.A{}).Unmarshal + _ = (&faster.A{}).Size + + _ = (&faster.A{}).Strings == "" + + _ = (&faster.B{}).Marshal + _ = (&faster.B{}).MarshalTo + _ = (&faster.B{}).Unmarshal + _ = (&faster.B{}).Size + + _ = (&faster.B{}).String_ == nil + _ = (&faster.B{}).Int64 == 0 + _ = (&faster.B{}).Int32 == nil + if (&faster.B{}).GetInt32() != 1234 { + t.Fatalf("expected default") + } +} + +func TestSlick(t *testing.T) { + _ = (&slick.A{}).Marshal + _ = (&slick.A{}).MarshalTo + _ = (&slick.A{}).Unmarshal + _ = (&slick.A{}).Size + + _ = (&slick.A{}).Strings == "" + + _ = (&slick.A{}).GoString + _ = (&slick.A{}).String + + _ = (&slick.B{}).Marshal + _ = (&slick.B{}).MarshalTo + _ = (&slick.B{}).Unmarshal + _ = (&slick.B{}).Size + + _ = (&slick.B{}).String_ == nil + _ = (&slick.B{}).Int64 == 0 + _ = (&slick.B{}).Int32 == nil + if (&slick.B{}).GetInt32() != 1234 { + t.Fatalf("expected default") + } +} diff --git a/vendor/github.com/gogo/protobuf/version/version.go b/vendor/github.com/gogo/protobuf/version/version.go new file mode 100644 index 000000000..05c49b40b --- /dev/null +++ b/vendor/github.com/gogo/protobuf/version/version.go @@ -0,0 +1,78 @@ +// Extensions for Protocol Buffers to create more go like structures. +// +// Copyright (c) 2013, Vastech SA (PTY) LTD. All rights reserved. +// http://github.com/gogo/protobuf/gogoproto +// +// 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 version + +import ( + "fmt" + "os/exec" + "strconv" + "strings" +) + +func Get() string { + versionBytes, _ := exec.Command("protoc", "--version").CombinedOutput() + version := strings.TrimSpace(string(versionBytes)) + versions := strings.Split(version, " ") + if len(versions) != 2 { + panic("version string returned from protoc is seperated with a space: " + version) + } + return versions[1] +} + +func parseVersion(version string) (int, error) { + versions := strings.Split(version, ".") + if len(versions) != 3 { + return 0, fmt.Errorf("version does not have 3 numbers seperated by dots: %s", version) + } + n := 0 + for _, v := range versions { + i, err := strconv.Atoi(v) + if err != nil { + return 0, err + } + n = n*10 + i + } + return n, nil +} + +func less(this, that string) bool { + thisNum, err := parseVersion(this) + if err != nil { + panic(err) + } + thatNum, err := parseVersion(that) + if err != nil { + panic(err) + } + return thisNum <= thatNum +} + +func AtLeast(v string) bool { + return less(v, Get()) +} diff --git a/vendor/github.com/golang/protobuf/.gitignore b/vendor/github.com/golang/protobuf/.gitignore new file mode 100644 index 000000000..2f3373923 --- /dev/null +++ b/vendor/github.com/golang/protobuf/.gitignore @@ -0,0 +1,15 @@ +.DS_Store +*.[568ao] +*.ao +*.so +*.pyc +._* +.nfs.* +[568a].out +*~ +*.orig +core +_obj +_test +_testmain.go +protoc-gen-go/testdata/multi/*.pb.go diff --git a/vendor/github.com/golang/protobuf/.gitrepo b/vendor/github.com/golang/protobuf/.gitrepo new file mode 100644 index 000000000..ffe8d4ea1 --- /dev/null +++ b/vendor/github.com/golang/protobuf/.gitrepo @@ -0,0 +1,11 @@ +; DO NOT EDIT (unless you know what you are doing) +; +; This subdirectory is a git "subrepo", and this file is maintained by the +; git-subrepo command. See https://github.com/git-commands/git-subrepo#readme +; +[subrepo] + remote = http://github.com/golang/protobuf.git + branch = master + commit = 8616e8ee5e20a1704615e6c8d7afcdac06087a67 + parent = f2bf603357d64e80ccae99abd4926c7429d25345 + cmdver = 0.3.0 diff --git a/vendor/github.com/golang/protobuf/jsonpb/jsonpb.go b/vendor/github.com/golang/protobuf/jsonpb/jsonpb.go new file mode 100644 index 000000000..6308548cb --- /dev/null +++ b/vendor/github.com/golang/protobuf/jsonpb/jsonpb.go @@ -0,0 +1,799 @@ +// Go support for Protocol Buffers - Google's data interchange format +// +// Copyright 2015 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 jsonpb provides marshaling and unmarshaling between protocol buffers and JSON. +It follows the specification at https://developers.google.com/protocol-buffers/docs/proto3#json. + +This package produces a different output than the standard "encoding/json" package, +which does not operate correctly on protocol buffers. +*/ +package jsonpb + +import ( + "bytes" + "encoding/json" + "errors" + "fmt" + "io" + "reflect" + "sort" + "strconv" + "strings" + "time" + + "github.com/golang/protobuf/proto" +) + +// Marshaler is a configurable object for converting between +// protocol buffer objects and a JSON representation for them. +type Marshaler struct { + // Whether to render enum values as integers, as opposed to string values. + EnumsAsInts bool + + // Whether to render fields with zero values. + EmitDefaults bool + + // A string to indent each level by. The presence of this field will + // also cause a space to appear between the field separator and + // value, and for newlines to be appear between fields and array + // elements. + Indent string + + // Whether to use the original (.proto) name for fields. + OrigName bool +} + +// Marshal marshals a protocol buffer into JSON. +func (m *Marshaler) Marshal(out io.Writer, pb proto.Message) error { + writer := &errWriter{writer: out} + return m.marshalObject(writer, pb, "", "") +} + +// MarshalToString converts a protocol buffer object to JSON string. +func (m *Marshaler) MarshalToString(pb proto.Message) (string, error) { + var buf bytes.Buffer + if err := m.Marshal(&buf, pb); err != nil { + return "", err + } + return buf.String(), nil +} + +type int32Slice []int32 + +// For sorting extensions ids to ensure stable output. +func (s int32Slice) Len() int { return len(s) } +func (s int32Slice) Less(i, j int) bool { return s[i] < s[j] } +func (s int32Slice) Swap(i, j int) { s[i], s[j] = s[j], s[i] } + +type wkt interface { + XXX_WellKnownType() string +} + +// marshalObject writes a struct to the Writer. +func (m *Marshaler) marshalObject(out *errWriter, v proto.Message, indent, typeURL string) error { + s := reflect.ValueOf(v).Elem() + + // Handle well-known types. + if wkt, ok := v.(wkt); ok { + switch wkt.XXX_WellKnownType() { + case "DoubleValue", "FloatValue", "Int64Value", "UInt64Value", + "Int32Value", "UInt32Value", "BoolValue", "StringValue", "BytesValue": + // "Wrappers use the same representation in JSON + // as the wrapped primitive type, ..." + sprop := proto.GetProperties(s.Type()) + return m.marshalValue(out, sprop.Prop[0], s.Field(0), indent) + case "Any": + // Any is a bit more involved. + return m.marshalAny(out, v, indent) + case "Duration": + // "Generated output always contains 3, 6, or 9 fractional digits, + // depending on required precision." + s, ns := s.Field(0).Int(), s.Field(1).Int() + d := time.Duration(s)*time.Second + time.Duration(ns)*time.Nanosecond + x := fmt.Sprintf("%.9f", d.Seconds()) + x = strings.TrimSuffix(x, "000") + x = strings.TrimSuffix(x, "000") + out.write(`"`) + out.write(x) + out.write(`s"`) + return out.err + case "Struct": + // Let marshalValue handle the `fields` map. + // TODO: pass the correct Properties if needed. + return m.marshalValue(out, &proto.Properties{}, s.Field(0), indent) + case "Timestamp": + // "RFC 3339, where generated output will always be Z-normalized + // and uses 3, 6 or 9 fractional digits." + s, ns := s.Field(0).Int(), s.Field(1).Int() + t := time.Unix(s, ns).UTC() + // time.RFC3339Nano isn't exactly right (we need to get 3/6/9 fractional digits). + x := t.Format("2006-01-02T15:04:05.000000000") + x = strings.TrimSuffix(x, "000") + x = strings.TrimSuffix(x, "000") + out.write(`"`) + out.write(x) + out.write(`Z"`) + return out.err + case "Value": + // Value has a single oneof. + kind := s.Field(0) + if kind.IsNil() { + // "absence of any variant indicates an error" + return errors.New("nil Value") + } + // oneof -> *T -> T -> T.F + x := kind.Elem().Elem().Field(0) + // TODO: pass the correct Properties if needed. + return m.marshalValue(out, &proto.Properties{}, x, indent) + } + } + + out.write("{") + if m.Indent != "" { + out.write("\n") + } + + firstField := true + + if typeURL != "" { + if err := m.marshalTypeURL(out, indent, typeURL); err != nil { + return err + } + firstField = false + } + + for i := 0; i < s.NumField(); i++ { + value := s.Field(i) + valueField := s.Type().Field(i) + if strings.HasPrefix(valueField.Name, "XXX_") { + continue + } + + // IsNil will panic on most value kinds. + switch value.Kind() { + case reflect.Chan, reflect.Func, reflect.Interface, reflect.Map, reflect.Ptr, reflect.Slice: + if value.IsNil() { + continue + } + } + + if !m.EmitDefaults { + switch value.Kind() { + case reflect.Bool: + if !value.Bool() { + continue + } + case reflect.Int32, reflect.Int64: + if value.Int() == 0 { + continue + } + case reflect.Uint32, reflect.Uint64: + if value.Uint() == 0 { + continue + } + case reflect.Float32, reflect.Float64: + if value.Float() == 0 { + continue + } + case reflect.String: + if value.Len() == 0 { + continue + } + } + } + + // Oneof fields need special handling. + if valueField.Tag.Get("protobuf_oneof") != "" { + // value is an interface containing &T{real_value}. + sv := value.Elem().Elem() // interface -> *T -> T + value = sv.Field(0) + valueField = sv.Type().Field(0) + } + prop := jsonProperties(valueField, m.OrigName) + if !firstField { + m.writeSep(out) + } + if err := m.marshalField(out, prop, value, indent); err != nil { + return err + } + firstField = false + } + + // Handle proto2 extensions. + if ep, ok := v.(proto.Message); ok { + extensions := proto.RegisteredExtensions(v) + // Sort extensions for stable output. + ids := make([]int32, 0, len(extensions)) + for id, desc := range extensions { + if !proto.HasExtension(ep, desc) { + continue + } + ids = append(ids, id) + } + sort.Sort(int32Slice(ids)) + for _, id := range ids { + desc := extensions[id] + if desc == nil { + // unknown extension + continue + } + ext, extErr := proto.GetExtension(ep, desc) + if extErr != nil { + return extErr + } + value := reflect.ValueOf(ext) + var prop proto.Properties + prop.Parse(desc.Tag) + prop.JSONName = fmt.Sprintf("[%s]", desc.Name) + if !firstField { + m.writeSep(out) + } + if err := m.marshalField(out, &prop, value, indent); err != nil { + return err + } + firstField = false + } + + } + + if m.Indent != "" { + out.write("\n") + out.write(indent) + } + out.write("}") + return out.err +} + +func (m *Marshaler) writeSep(out *errWriter) { + if m.Indent != "" { + out.write(",\n") + } else { + out.write(",") + } +} + +func (m *Marshaler) marshalAny(out *errWriter, any proto.Message, indent string) error { + // "If the Any contains a value that has a special JSON mapping, + // it will be converted as follows: {"@type": xxx, "value": yyy}. + // Otherwise, the value will be converted into a JSON object, + // and the "@type" field will be inserted to indicate the actual data type." + v := reflect.ValueOf(any).Elem() + turl := v.Field(0).String() + val := v.Field(1).Bytes() + + // Only the part of type_url after the last slash is relevant. + mname := turl + if slash := strings.LastIndex(mname, "/"); slash >= 0 { + mname = mname[slash+1:] + } + mt := proto.MessageType(mname) + if mt == nil { + return fmt.Errorf("unknown message type %q", mname) + } + msg := reflect.New(mt.Elem()).Interface().(proto.Message) + if err := proto.Unmarshal(val, msg); err != nil { + return err + } + + if _, ok := msg.(wkt); ok { + out.write("{") + if m.Indent != "" { + out.write("\n") + } + if err := m.marshalTypeURL(out, indent, turl); err != nil { + return err + } + m.writeSep(out) + if m.Indent != "" { + out.write(indent) + out.write(m.Indent) + out.write(`"value": `) + } else { + out.write(`"value":`) + } + if err := m.marshalObject(out, msg, indent+m.Indent, ""); err != nil { + return err + } + if m.Indent != "" { + out.write("\n") + out.write(indent) + } + out.write("}") + return out.err + } + + return m.marshalObject(out, msg, indent, turl) +} + +func (m *Marshaler) marshalTypeURL(out *errWriter, indent, typeURL string) error { + if m.Indent != "" { + out.write(indent) + out.write(m.Indent) + } + out.write(`"@type":`) + if m.Indent != "" { + out.write(" ") + } + b, err := json.Marshal(typeURL) + if err != nil { + return err + } + out.write(string(b)) + return out.err +} + +// marshalField writes field description and value to the Writer. +func (m *Marshaler) marshalField(out *errWriter, prop *proto.Properties, v reflect.Value, indent string) error { + if m.Indent != "" { + out.write(indent) + out.write(m.Indent) + } + out.write(`"`) + out.write(prop.JSONName) + out.write(`":`) + if m.Indent != "" { + out.write(" ") + } + if err := m.marshalValue(out, prop, v, indent); err != nil { + return err + } + return nil +} + +// marshalValue writes the value to the Writer. +func (m *Marshaler) marshalValue(out *errWriter, prop *proto.Properties, v reflect.Value, indent string) error { + + var err error + v = reflect.Indirect(v) + + // Handle repeated elements. + if v.Kind() == reflect.Slice && v.Type().Elem().Kind() != reflect.Uint8 { + out.write("[") + comma := "" + for i := 0; i < v.Len(); i++ { + sliceVal := v.Index(i) + out.write(comma) + if m.Indent != "" { + out.write("\n") + out.write(indent) + out.write(m.Indent) + out.write(m.Indent) + } + if err := m.marshalValue(out, prop, sliceVal, indent+m.Indent); err != nil { + return err + } + comma = "," + } + if m.Indent != "" { + out.write("\n") + out.write(indent) + out.write(m.Indent) + } + out.write("]") + return out.err + } + + // Handle well-known types. + // Most are handled up in marshalObject (because 99% are messages). + type wkt interface { + XXX_WellKnownType() string + } + if wkt, ok := v.Interface().(wkt); ok { + switch wkt.XXX_WellKnownType() { + case "NullValue": + out.write("null") + return out.err + } + } + + // Handle enumerations. + if !m.EnumsAsInts && prop.Enum != "" { + // Unknown enum values will are stringified by the proto library as their + // value. Such values should _not_ be quoted or they will be interpreted + // as an enum string instead of their value. + enumStr := v.Interface().(fmt.Stringer).String() + var valStr string + if v.Kind() == reflect.Ptr { + valStr = strconv.Itoa(int(v.Elem().Int())) + } else { + valStr = strconv.Itoa(int(v.Int())) + } + isKnownEnum := enumStr != valStr + if isKnownEnum { + out.write(`"`) + } + out.write(enumStr) + if isKnownEnum { + out.write(`"`) + } + return out.err + } + + // Handle nested messages. + if v.Kind() == reflect.Struct { + return m.marshalObject(out, v.Addr().Interface().(proto.Message), indent+m.Indent, "") + } + + // Handle maps. + // Since Go randomizes map iteration, we sort keys for stable output. + if v.Kind() == reflect.Map { + out.write(`{`) + keys := v.MapKeys() + sort.Sort(mapKeys(keys)) + for i, k := range keys { + if i > 0 { + out.write(`,`) + } + if m.Indent != "" { + out.write("\n") + out.write(indent) + out.write(m.Indent) + out.write(m.Indent) + } + + b, err := json.Marshal(k.Interface()) + if err != nil { + return err + } + s := string(b) + + // If the JSON is not a string value, encode it again to make it one. + if !strings.HasPrefix(s, `"`) { + b, err := json.Marshal(s) + if err != nil { + return err + } + s = string(b) + } + + out.write(s) + out.write(`:`) + if m.Indent != "" { + out.write(` `) + } + + if err := m.marshalValue(out, prop, v.MapIndex(k), indent+m.Indent); err != nil { + return err + } + } + if m.Indent != "" { + out.write("\n") + out.write(indent) + out.write(m.Indent) + } + out.write(`}`) + return out.err + } + + // Default handling defers to the encoding/json library. + b, err := json.Marshal(v.Interface()) + if err != nil { + return err + } + needToQuote := string(b[0]) != `"` && (v.Kind() == reflect.Int64 || v.Kind() == reflect.Uint64) + if needToQuote { + out.write(`"`) + } + out.write(string(b)) + if needToQuote { + out.write(`"`) + } + return out.err +} + +// UnmarshalNext unmarshals the next protocol buffer from a JSON object stream. +// This function is lenient and will decode any options permutations of the +// related Marshaler. +func UnmarshalNext(dec *json.Decoder, pb proto.Message) error { + inputValue := json.RawMessage{} + if err := dec.Decode(&inputValue); err != nil { + return err + } + return unmarshalValue(reflect.ValueOf(pb).Elem(), inputValue, nil) +} + +// Unmarshal unmarshals a JSON object stream into a protocol +// buffer. This function is lenient and will decode any options +// permutations of the related Marshaler. +func Unmarshal(r io.Reader, pb proto.Message) error { + dec := json.NewDecoder(r) + return UnmarshalNext(dec, pb) +} + +// UnmarshalString will populate the fields of a protocol buffer based +// on a JSON string. This function is lenient and will decode any options +// permutations of the related Marshaler. +func UnmarshalString(str string, pb proto.Message) error { + return Unmarshal(strings.NewReader(str), pb) +} + +// unmarshalValue converts/copies a value into the target. +// prop may be nil. +func unmarshalValue(target reflect.Value, inputValue json.RawMessage, prop *proto.Properties) error { + targetType := target.Type() + + // Allocate memory for pointer fields. + if targetType.Kind() == reflect.Ptr { + target.Set(reflect.New(targetType.Elem())) + return unmarshalValue(target.Elem(), inputValue, prop) + } + + // Handle well-known types. + type wkt interface { + XXX_WellKnownType() string + } + if wkt, ok := target.Addr().Interface().(wkt); ok { + switch wkt.XXX_WellKnownType() { + case "DoubleValue", "FloatValue", "Int64Value", "UInt64Value", + "Int32Value", "UInt32Value", "BoolValue", "StringValue", "BytesValue": + // "Wrappers use the same representation in JSON + // as the wrapped primitive type, except that null is allowed." + // encoding/json will turn JSON `null` into Go `nil`, + // so we don't have to do any extra work. + return unmarshalValue(target.Field(0), inputValue, prop) + case "Any": + return fmt.Errorf("unmarshaling Any not supported yet") + case "Duration": + unq, err := strconv.Unquote(string(inputValue)) + if err != nil { + return err + } + d, err := time.ParseDuration(unq) + if err != nil { + return fmt.Errorf("bad Duration: %v", err) + } + ns := d.Nanoseconds() + s := ns / 1e9 + ns %= 1e9 + target.Field(0).SetInt(s) + target.Field(1).SetInt(ns) + return nil + case "Timestamp": + unq, err := strconv.Unquote(string(inputValue)) + if err != nil { + return err + } + t, err := time.Parse(time.RFC3339Nano, unq) + if err != nil { + return fmt.Errorf("bad Timestamp: %v", err) + } + ns := t.UnixNano() + s := ns / 1e9 + ns %= 1e9 + target.Field(0).SetInt(s) + target.Field(1).SetInt(ns) + return nil + } + } + + // Handle enums, which have an underlying type of int32, + // and may appear as strings. + // The case of an enum appearing as a number is handled + // at the bottom of this function. + if inputValue[0] == '"' && prop != nil && prop.Enum != "" { + vmap := proto.EnumValueMap(prop.Enum) + // Don't need to do unquoting; valid enum names + // are from a limited character set. + s := inputValue[1 : len(inputValue)-1] + n, ok := vmap[string(s)] + if !ok { + return fmt.Errorf("unknown value %q for enum %s", s, prop.Enum) + } + if target.Kind() == reflect.Ptr { // proto2 + target.Set(reflect.New(targetType.Elem())) + target = target.Elem() + } + target.SetInt(int64(n)) + return nil + } + + // Handle nested messages. + if targetType.Kind() == reflect.Struct { + var jsonFields map[string]json.RawMessage + if err := json.Unmarshal(inputValue, &jsonFields); err != nil { + return err + } + + consumeField := func(prop *proto.Properties) (json.RawMessage, bool) { + // Be liberal in what names we accept; both orig_name and camelName are okay. + fieldNames := acceptedJSONFieldNames(prop) + + vOrig, okOrig := jsonFields[fieldNames.orig] + vCamel, okCamel := jsonFields[fieldNames.camel] + if !okOrig && !okCamel { + return nil, false + } + // If, for some reason, both are present in the data, favour the camelName. + var raw json.RawMessage + if okOrig { + raw = vOrig + delete(jsonFields, fieldNames.orig) + } + if okCamel { + raw = vCamel + delete(jsonFields, fieldNames.camel) + } + return raw, true + } + + sprops := proto.GetProperties(targetType) + for i := 0; i < target.NumField(); i++ { + ft := target.Type().Field(i) + if strings.HasPrefix(ft.Name, "XXX_") { + continue + } + + valueForField, ok := consumeField(sprops.Prop[i]) + if !ok { + continue + } + + if err := unmarshalValue(target.Field(i), valueForField, sprops.Prop[i]); err != nil { + return err + } + } + // Check for any oneof fields. + if len(jsonFields) > 0 { + for _, oop := range sprops.OneofTypes { + raw, ok := consumeField(oop.Prop) + if !ok { + continue + } + nv := reflect.New(oop.Type.Elem()) + target.Field(oop.Field).Set(nv) + if err := unmarshalValue(nv.Elem().Field(0), raw, oop.Prop); err != nil { + return err + } + } + } + if len(jsonFields) > 0 { + // Pick any field to be the scapegoat. + var f string + for fname := range jsonFields { + f = fname + break + } + return fmt.Errorf("unknown field %q in %v", f, targetType) + } + return nil + } + + // Handle arrays (which aren't encoded bytes) + if targetType.Kind() == reflect.Slice && targetType.Elem().Kind() != reflect.Uint8 { + var slc []json.RawMessage + if err := json.Unmarshal(inputValue, &slc); err != nil { + return err + } + len := len(slc) + target.Set(reflect.MakeSlice(targetType, len, len)) + for i := 0; i < len; i++ { + if err := unmarshalValue(target.Index(i), slc[i], prop); err != nil { + return err + } + } + return nil + } + + // Handle maps (whose keys are always strings) + if targetType.Kind() == reflect.Map { + var mp map[string]json.RawMessage + if err := json.Unmarshal(inputValue, &mp); err != nil { + return err + } + target.Set(reflect.MakeMap(targetType)) + var keyprop, valprop *proto.Properties + if prop != nil { + // These could still be nil if the protobuf metadata is broken somehow. + // TODO: This won't work because the fields are unexported. + // We should probably just reparse them. + //keyprop, valprop = prop.mkeyprop, prop.mvalprop + } + for ks, raw := range mp { + // Unmarshal map key. The core json library already decoded the key into a + // string, so we handle that specially. Other types were quoted post-serialization. + var k reflect.Value + if targetType.Key().Kind() == reflect.String { + k = reflect.ValueOf(ks) + } else { + k = reflect.New(targetType.Key()).Elem() + if err := unmarshalValue(k, json.RawMessage(ks), keyprop); err != nil { + return err + } + } + + // Unmarshal map value. + v := reflect.New(targetType.Elem()).Elem() + if err := unmarshalValue(v, raw, valprop); err != nil { + return err + } + target.SetMapIndex(k, v) + } + return nil + } + + // 64-bit integers can be encoded as strings. In this case we drop + // the quotes and proceed as normal. + isNum := targetType.Kind() == reflect.Int64 || targetType.Kind() == reflect.Uint64 + if isNum && strings.HasPrefix(string(inputValue), `"`) { + inputValue = inputValue[1 : len(inputValue)-1] + } + + // Use the encoding/json for parsing other value types. + return json.Unmarshal(inputValue, target.Addr().Interface()) +} + +// jsonProperties returns parsed proto.Properties for the field and corrects JSONName attribute. +func jsonProperties(f reflect.StructField, origName bool) *proto.Properties { + var prop proto.Properties + prop.Init(f.Type, f.Name, f.Tag.Get("protobuf"), &f) + if origName || prop.JSONName == "" { + prop.JSONName = prop.OrigName + } + return &prop +} + +type fieldNames struct { + orig, camel string +} + +func acceptedJSONFieldNames(prop *proto.Properties) fieldNames { + opts := fieldNames{orig: prop.OrigName, camel: prop.OrigName} + if prop.JSONName != "" { + opts.camel = prop.JSONName + } + return opts +} + +// Writer wrapper inspired by https://blog.golang.org/errors-are-values +type errWriter struct { + writer io.Writer + err error +} + +func (w *errWriter) write(str string) { + if w.err != nil { + return + } + _, w.err = w.writer.Write([]byte(str)) +} + +// Map fields may have key types of non-float scalars, strings and enums. +// The easiest way to sort them in some deterministic order is to use fmt. +// If this turns out to be inefficient we can always consider other options, +// such as doing a Schwartzian transform. +type mapKeys []reflect.Value + +func (s mapKeys) Len() int { return len(s) } +func (s mapKeys) Swap(i, j int) { s[i], s[j] = s[j], s[i] } +func (s mapKeys) Less(i, j int) bool { + return fmt.Sprint(s[i].Interface()) < fmt.Sprint(s[j].Interface()) +} diff --git a/vendor/github.com/golang/protobuf/jsonpb/jsonpb_test.go b/vendor/github.com/golang/protobuf/jsonpb/jsonpb_test.go new file mode 100644 index 000000000..659dbede4 --- /dev/null +++ b/vendor/github.com/golang/protobuf/jsonpb/jsonpb_test.go @@ -0,0 +1,548 @@ +// Go support for Protocol Buffers - Google's data interchange format +// +// Copyright 2015 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 jsonpb + +import ( + "bytes" + "encoding/json" + "io" + "reflect" + "testing" + + "github.com/golang/protobuf/proto" + + pb "github.com/golang/protobuf/jsonpb/jsonpb_test_proto" + proto3pb "github.com/golang/protobuf/proto/proto3_proto" + anypb "github.com/golang/protobuf/ptypes/any" + durpb "github.com/golang/protobuf/ptypes/duration" + stpb "github.com/golang/protobuf/ptypes/struct" + tspb "github.com/golang/protobuf/ptypes/timestamp" + wpb "github.com/golang/protobuf/ptypes/wrappers" +) + +var ( + marshaler = Marshaler{} + + marshalerAllOptions = Marshaler{ + Indent: " ", + } + + simpleObject = &pb.Simple{ + OInt32: proto.Int32(-32), + OInt64: proto.Int64(-6400000000), + OUint32: proto.Uint32(32), + OUint64: proto.Uint64(6400000000), + OSint32: proto.Int32(-13), + OSint64: proto.Int64(-2600000000), + OFloat: proto.Float32(3.14), + ODouble: proto.Float64(6.02214179e23), + OBool: proto.Bool(true), + OString: proto.String("hello \"there\""), + OBytes: []byte("beep boop"), + } + + simpleObjectJSON = `{` + + `"oBool":true,` + + `"oInt32":-32,` + + `"oInt64":"-6400000000",` + + `"oUint32":32,` + + `"oUint64":"6400000000",` + + `"oSint32":-13,` + + `"oSint64":"-2600000000",` + + `"oFloat":3.14,` + + `"oDouble":6.02214179e+23,` + + `"oString":"hello \"there\"",` + + `"oBytes":"YmVlcCBib29w"` + + `}` + + simpleObjectPrettyJSON = `{ + "oBool": true, + "oInt32": -32, + "oInt64": "-6400000000", + "oUint32": 32, + "oUint64": "6400000000", + "oSint32": -13, + "oSint64": "-2600000000", + "oFloat": 3.14, + "oDouble": 6.02214179e+23, + "oString": "hello \"there\"", + "oBytes": "YmVlcCBib29w" +}` + + repeatsObject = &pb.Repeats{ + RBool: []bool{true, false, true}, + RInt32: []int32{-3, -4, -5}, + RInt64: []int64{-123456789, -987654321}, + RUint32: []uint32{1, 2, 3}, + RUint64: []uint64{6789012345, 3456789012}, + RSint32: []int32{-1, -2, -3}, + RSint64: []int64{-6789012345, -3456789012}, + RFloat: []float32{3.14, 6.28}, + RDouble: []float64{299792458, 6.62606957e-34}, + RString: []string{"happy", "days"}, + RBytes: [][]byte{[]byte("skittles"), []byte("m&m's")}, + } + + repeatsObjectJSON = `{` + + `"rBool":[true,false,true],` + + `"rInt32":[-3,-4,-5],` + + `"rInt64":["-123456789","-987654321"],` + + `"rUint32":[1,2,3],` + + `"rUint64":["6789012345","3456789012"],` + + `"rSint32":[-1,-2,-3],` + + `"rSint64":["-6789012345","-3456789012"],` + + `"rFloat":[3.14,6.28],` + + `"rDouble":[2.99792458e+08,6.62606957e-34],` + + `"rString":["happy","days"],` + + `"rBytes":["c2tpdHRsZXM=","bSZtJ3M="]` + + `}` + + repeatsObjectPrettyJSON = `{ + "rBool": [ + true, + false, + true + ], + "rInt32": [ + -3, + -4, + -5 + ], + "rInt64": [ + "-123456789", + "-987654321" + ], + "rUint32": [ + 1, + 2, + 3 + ], + "rUint64": [ + "6789012345", + "3456789012" + ], + "rSint32": [ + -1, + -2, + -3 + ], + "rSint64": [ + "-6789012345", + "-3456789012" + ], + "rFloat": [ + 3.14, + 6.28 + ], + "rDouble": [ + 2.99792458e+08, + 6.62606957e-34 + ], + "rString": [ + "happy", + "days" + ], + "rBytes": [ + "c2tpdHRsZXM=", + "bSZtJ3M=" + ] +}` + + innerSimple = &pb.Simple{OInt32: proto.Int32(-32)} + innerSimple2 = &pb.Simple{OInt64: proto.Int64(25)} + innerRepeats = &pb.Repeats{RString: []string{"roses", "red"}} + innerRepeats2 = &pb.Repeats{RString: []string{"violets", "blue"}} + complexObject = &pb.Widget{ + Color: pb.Widget_GREEN.Enum(), + RColor: []pb.Widget_Color{pb.Widget_RED, pb.Widget_GREEN, pb.Widget_BLUE}, + Simple: innerSimple, + RSimple: []*pb.Simple{innerSimple, innerSimple2}, + Repeats: innerRepeats, + RRepeats: []*pb.Repeats{innerRepeats, innerRepeats2}, + } + + complexObjectJSON = `{"color":"GREEN",` + + `"rColor":["RED","GREEN","BLUE"],` + + `"simple":{"oInt32":-32},` + + `"rSimple":[{"oInt32":-32},{"oInt64":"25"}],` + + `"repeats":{"rString":["roses","red"]},` + + `"rRepeats":[{"rString":["roses","red"]},{"rString":["violets","blue"]}]` + + `}` + + complexObjectPrettyJSON = `{ + "color": "GREEN", + "rColor": [ + "RED", + "GREEN", + "BLUE" + ], + "simple": { + "oInt32": -32 + }, + "rSimple": [ + { + "oInt32": -32 + }, + { + "oInt64": "25" + } + ], + "repeats": { + "rString": [ + "roses", + "red" + ] + }, + "rRepeats": [ + { + "rString": [ + "roses", + "red" + ] + }, + { + "rString": [ + "violets", + "blue" + ] + } + ] +}` + + colorPrettyJSON = `{ + "color": 2 +}` + + colorListPrettyJSON = `{ + "color": 1000, + "rColor": [ + "RED" + ] +}` + + nummyPrettyJSON = `{ + "nummy": { + "1": 2, + "3": 4 + } +}` + + objjyPrettyJSON = `{ + "objjy": { + "1": { + "dub": 1 + } + } +}` + realNumber = &pb.Real{Value: proto.Float64(3.14159265359)} + realNumberName = "Pi" + complexNumber = &pb.Complex{Imaginary: proto.Float64(0.5772156649)} + realNumberJSON = `{` + + `"value":3.14159265359,` + + `"[jsonpb.Complex.real_extension]":{"imaginary":0.5772156649},` + + `"[jsonpb.name]":"Pi"` + + `}` + + anySimple = &pb.KnownTypes{ + An: &anypb.Any{ + TypeUrl: "something.example.com/jsonpb.Simple", + Value: []byte{ + // &pb.Simple{OBool:true} + 1 << 3, 1, + }, + }, + } + anySimpleJSON = `{"an":{"@type":"something.example.com/jsonpb.Simple","oBool":true}}` + anySimplePrettyJSON = `{ + "an": { + "@type": "something.example.com/jsonpb.Simple", + "oBool": true + } +}` + + anyWellKnown = &pb.KnownTypes{ + An: &anypb.Any{ + TypeUrl: "type.googleapis.com/google.protobuf.Duration", + Value: []byte{ + // &durpb.Duration{Seconds: 1, Nanos: 212000000 } + 1 << 3, 1, // seconds + 2 << 3, 0x80, 0xba, 0x8b, 0x65, // nanos + }, + }, + } + anyWellKnownJSON = `{"an":{"@type":"type.googleapis.com/google.protobuf.Duration","value":"1.212s"}}` + anyWellKnownPrettyJSON = `{ + "an": { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } +}` +) + +func init() { + if err := proto.SetExtension(realNumber, pb.E_Name, &realNumberName); err != nil { + panic(err) + } + if err := proto.SetExtension(realNumber, pb.E_Complex_RealExtension, complexNumber); err != nil { + panic(err) + } +} + +var marshalingTests = []struct { + desc string + marshaler Marshaler + pb proto.Message + json string +}{ + {"simple flat object", marshaler, simpleObject, simpleObjectJSON}, + {"simple pretty object", marshalerAllOptions, simpleObject, simpleObjectPrettyJSON}, + {"repeated fields flat object", marshaler, repeatsObject, repeatsObjectJSON}, + {"repeated fields pretty object", marshalerAllOptions, repeatsObject, repeatsObjectPrettyJSON}, + {"nested message/enum flat object", marshaler, complexObject, complexObjectJSON}, + {"nested message/enum pretty object", marshalerAllOptions, complexObject, complexObjectPrettyJSON}, + {"enum-string flat object", Marshaler{}, + &pb.Widget{Color: pb.Widget_BLUE.Enum()}, `{"color":"BLUE"}`}, + {"enum-value pretty object", Marshaler{EnumsAsInts: true, Indent: " "}, + &pb.Widget{Color: pb.Widget_BLUE.Enum()}, colorPrettyJSON}, + {"unknown enum value object", marshalerAllOptions, + &pb.Widget{Color: pb.Widget_Color(1000).Enum(), RColor: []pb.Widget_Color{pb.Widget_RED}}, colorListPrettyJSON}, + {"repeated proto3 enum", Marshaler{}, + &proto3pb.Message{RFunny: []proto3pb.Message_Humour{ + proto3pb.Message_PUNS, + proto3pb.Message_SLAPSTICK, + }}, + `{"rFunny":["PUNS","SLAPSTICK"]}`}, + {"repeated proto3 enum as int", Marshaler{EnumsAsInts: true}, + &proto3pb.Message{RFunny: []proto3pb.Message_Humour{ + proto3pb.Message_PUNS, + proto3pb.Message_SLAPSTICK, + }}, + `{"rFunny":[1,2]}`}, + {"empty value", marshaler, &pb.Simple3{}, `{}`}, + {"empty value emitted", Marshaler{EmitDefaults: true}, &pb.Simple3{}, `{"dub":0}`}, + {"map", marshaler, &pb.Mappy{Nummy: map[int64]int32{1: 2, 3: 4}}, `{"nummy":{"1":2,"3":4}}`}, + {"map", marshalerAllOptions, &pb.Mappy{Nummy: map[int64]int32{1: 2, 3: 4}}, nummyPrettyJSON}, + {"map", marshaler, + &pb.Mappy{Strry: map[string]string{`"one"`: "two", "three": "four"}}, + `{"strry":{"\"one\"":"two","three":"four"}}`}, + {"map", marshaler, + &pb.Mappy{Objjy: map[int32]*pb.Simple3{1: &pb.Simple3{Dub: 1}}}, `{"objjy":{"1":{"dub":1}}}`}, + {"map", marshalerAllOptions, + &pb.Mappy{Objjy: map[int32]*pb.Simple3{1: &pb.Simple3{Dub: 1}}}, objjyPrettyJSON}, + {"map", marshaler, &pb.Mappy{Buggy: map[int64]string{1234: "yup"}}, + `{"buggy":{"1234":"yup"}}`}, + {"map", marshaler, &pb.Mappy{Booly: map[bool]bool{false: true}}, `{"booly":{"false":true}}`}, + // TODO: This is broken. + //{"map", marshaler, &pb.Mappy{Enumy: map[string]pb.Numeral{"XIV": pb.Numeral_ROMAN}}, `{"enumy":{"XIV":"ROMAN"}`}, + {"map", Marshaler{EnumsAsInts: true}, &pb.Mappy{Enumy: map[string]pb.Numeral{"XIV": pb.Numeral_ROMAN}}, `{"enumy":{"XIV":2}}`}, + {"proto2 map", marshaler, &pb.Maps{MInt64Str: map[int64]string{213: "cat"}}, + `{"mInt64Str":{"213":"cat"}}`}, + {"proto2 map", marshaler, + &pb.Maps{MBoolSimple: map[bool]*pb.Simple{true: &pb.Simple{OInt32: proto.Int32(1)}}}, + `{"mBoolSimple":{"true":{"oInt32":1}}}`}, + {"oneof, not set", marshaler, &pb.MsgWithOneof{}, `{}`}, + {"oneof, set", marshaler, &pb.MsgWithOneof{Union: &pb.MsgWithOneof_Title{"Grand Poobah"}}, `{"title":"Grand Poobah"}`}, + {"force orig_name", Marshaler{OrigName: true}, &pb.Simple{OInt32: proto.Int32(4)}, + `{"o_int32":4}`}, + {"proto2 extension", marshaler, realNumber, realNumberJSON}, + {"Any with message", marshaler, anySimple, anySimpleJSON}, + {"Any with message and indent", marshalerAllOptions, anySimple, anySimplePrettyJSON}, + {"Any with WKT", marshaler, anyWellKnown, anyWellKnownJSON}, + {"Any with WKT and indent", marshalerAllOptions, anyWellKnown, anyWellKnownPrettyJSON}, + {"Duration", marshaler, &pb.KnownTypes{Dur: &durpb.Duration{Seconds: 3}}, `{"dur":"3.000s"}`}, + {"Struct", marshaler, &pb.KnownTypes{St: &stpb.Struct{ + Fields: map[string]*stpb.Value{ + "one": &stpb.Value{Kind: &stpb.Value_StringValue{"loneliest number"}}, + "two": &stpb.Value{Kind: &stpb.Value_NullValue{stpb.NullValue_NULL_VALUE}}, + }, + }}, `{"st":{"one":"loneliest number","two":null}}`}, + {"Timestamp", marshaler, &pb.KnownTypes{Ts: &tspb.Timestamp{Seconds: 14e8, Nanos: 21e6}}, `{"ts":"2014-05-13T16:53:20.021Z"}`}, + + {"DoubleValue", marshaler, &pb.KnownTypes{Dbl: &wpb.DoubleValue{Value: 1.2}}, `{"dbl":1.2}`}, + {"FloatValue", marshaler, &pb.KnownTypes{Flt: &wpb.FloatValue{Value: 1.2}}, `{"flt":1.2}`}, + {"Int64Value", marshaler, &pb.KnownTypes{I64: &wpb.Int64Value{Value: -3}}, `{"i64":"-3"}`}, + {"UInt64Value", marshaler, &pb.KnownTypes{U64: &wpb.UInt64Value{Value: 3}}, `{"u64":"3"}`}, + {"Int32Value", marshaler, &pb.KnownTypes{I32: &wpb.Int32Value{Value: -4}}, `{"i32":-4}`}, + {"UInt32Value", marshaler, &pb.KnownTypes{U32: &wpb.UInt32Value{Value: 4}}, `{"u32":4}`}, + {"BoolValue", marshaler, &pb.KnownTypes{Bool: &wpb.BoolValue{Value: true}}, `{"bool":true}`}, + {"StringValue", marshaler, &pb.KnownTypes{Str: &wpb.StringValue{Value: "plush"}}, `{"str":"plush"}`}, + {"BytesValue", marshaler, &pb.KnownTypes{Bytes: &wpb.BytesValue{Value: []byte("wow")}}, `{"bytes":"d293"}`}, +} + +func TestMarshaling(t *testing.T) { + for _, tt := range marshalingTests { + json, err := tt.marshaler.MarshalToString(tt.pb) + if err != nil { + t.Errorf("%s: marshaling error: %v", tt.desc, err) + } else if tt.json != json { + t.Errorf("%s: got [%v] want [%v]", tt.desc, json, tt.json) + } + } +} + +var unmarshalingTests = []struct { + desc string + json string + pb proto.Message +}{ + {"simple flat object", simpleObjectJSON, simpleObject}, + {"simple pretty object", simpleObjectPrettyJSON, simpleObject}, + {"repeated fields flat object", repeatsObjectJSON, repeatsObject}, + {"repeated fields pretty object", repeatsObjectPrettyJSON, repeatsObject}, + {"nested message/enum flat object", complexObjectJSON, complexObject}, + {"nested message/enum pretty object", complexObjectPrettyJSON, complexObject}, + {"enum-string object", `{"color":"BLUE"}`, &pb.Widget{Color: pb.Widget_BLUE.Enum()}}, + {"enum-value object", "{\n \"color\": 2\n}", &pb.Widget{Color: pb.Widget_BLUE.Enum()}}, + {"proto3 enum string", `{"hilarity":"PUNS"}`, &proto3pb.Message{Hilarity: proto3pb.Message_PUNS}}, + {"proto3 enum value", `{"hilarity":1}`, &proto3pb.Message{Hilarity: proto3pb.Message_PUNS}}, + {"unknown enum value object", + "{\n \"color\": 1000,\n \"r_color\": [\n \"RED\"\n ]\n}", + &pb.Widget{Color: pb.Widget_Color(1000).Enum(), RColor: []pb.Widget_Color{pb.Widget_RED}}}, + {"repeated proto3 enum", `{"rFunny":["PUNS","SLAPSTICK"]}`, + &proto3pb.Message{RFunny: []proto3pb.Message_Humour{ + proto3pb.Message_PUNS, + proto3pb.Message_SLAPSTICK, + }}}, + {"repeated proto3 enum as int", `{"rFunny":[1,2]}`, + &proto3pb.Message{RFunny: []proto3pb.Message_Humour{ + proto3pb.Message_PUNS, + proto3pb.Message_SLAPSTICK, + }}}, + {"repeated proto3 enum as mix of strings and ints", `{"rFunny":["PUNS",2]}`, + &proto3pb.Message{RFunny: []proto3pb.Message_Humour{ + proto3pb.Message_PUNS, + proto3pb.Message_SLAPSTICK, + }}}, + {"unquoted int64 object", `{"oInt64":-314}`, &pb.Simple{OInt64: proto.Int64(-314)}}, + {"unquoted uint64 object", `{"oUint64":123}`, &pb.Simple{OUint64: proto.Uint64(123)}}, + {"map", `{"nummy":{"1":2,"3":4}}`, &pb.Mappy{Nummy: map[int64]int32{1: 2, 3: 4}}}, + {"map", `{"strry":{"\"one\"":"two","three":"four"}}`, &pb.Mappy{Strry: map[string]string{`"one"`: "two", "three": "four"}}}, + {"map", `{"objjy":{"1":{"dub":1}}}`, &pb.Mappy{Objjy: map[int32]*pb.Simple3{1: &pb.Simple3{Dub: 1}}}}, + // TODO: This is broken. + //{"map", `{"enumy":{"XIV":"ROMAN"}`, &pb.Mappy{Enumy: map[string]pb.Numeral{"XIV": pb.Numeral_ROMAN}}}, + {"map", `{"enumy":{"XIV":2}}`, &pb.Mappy{Enumy: map[string]pb.Numeral{"XIV": pb.Numeral_ROMAN}}}, + {"oneof", `{"salary":31000}`, &pb.MsgWithOneof{Union: &pb.MsgWithOneof_Salary{31000}}}, + {"oneof spec name", `{"country":"Australia"}`, &pb.MsgWithOneof{Union: &pb.MsgWithOneof_Country{"Australia"}}}, + {"oneof orig_name", `{"Country":"Australia"}`, &pb.MsgWithOneof{Union: &pb.MsgWithOneof_Country{"Australia"}}}, + {"orig_name input", `{"o_bool":true}`, &pb.Simple{OBool: proto.Bool(true)}}, + {"camelName input", `{"oBool":true}`, &pb.Simple{OBool: proto.Bool(true)}}, + + {"Duration", `{"dur":"3.000s"}`, &pb.KnownTypes{Dur: &durpb.Duration{Seconds: 3}}}, + {"Timestamp", `{"ts":"2014-05-13T16:53:20.021Z"}`, &pb.KnownTypes{Ts: &tspb.Timestamp{Seconds: 14e8, Nanos: 21e6}}}, + + {"DoubleValue", `{"dbl":1.2}`, &pb.KnownTypes{Dbl: &wpb.DoubleValue{Value: 1.2}}}, + {"FloatValue", `{"flt":1.2}`, &pb.KnownTypes{Flt: &wpb.FloatValue{Value: 1.2}}}, + {"Int64Value", `{"i64":"-3"}`, &pb.KnownTypes{I64: &wpb.Int64Value{Value: -3}}}, + {"UInt64Value", `{"u64":"3"}`, &pb.KnownTypes{U64: &wpb.UInt64Value{Value: 3}}}, + {"Int32Value", `{"i32":-4}`, &pb.KnownTypes{I32: &wpb.Int32Value{Value: -4}}}, + {"UInt32Value", `{"u32":4}`, &pb.KnownTypes{U32: &wpb.UInt32Value{Value: 4}}}, + {"BoolValue", `{"bool":true}`, &pb.KnownTypes{Bool: &wpb.BoolValue{Value: true}}}, + {"StringValue", `{"str":"plush"}`, &pb.KnownTypes{Str: &wpb.StringValue{Value: "plush"}}}, + {"BytesValue", `{"bytes":"d293"}`, &pb.KnownTypes{Bytes: &wpb.BytesValue{Value: []byte("wow")}}}, + // `null` is also a permissible value. Let's just test one. + {"null DoubleValue", `{"dbl":null}`, &pb.KnownTypes{Dbl: &wpb.DoubleValue{}}}, +} + +func TestUnmarshaling(t *testing.T) { + for _, tt := range unmarshalingTests { + // Make a new instance of the type of our expected object. + p := reflect.New(reflect.TypeOf(tt.pb).Elem()).Interface().(proto.Message) + + err := UnmarshalString(tt.json, p) + if err != nil { + t.Errorf("%s: %v", tt.desc, err) + continue + } + + // For easier diffs, compare text strings of the protos. + exp := proto.MarshalTextString(tt.pb) + act := proto.MarshalTextString(p) + if string(exp) != string(act) { + t.Errorf("%s: got [%s] want [%s]", tt.desc, act, exp) + } + } +} + +func TestUnmarshalNext(t *testing.T) { + // We only need to check against a few, not all of them. + tests := unmarshalingTests[:5] + + // Create a buffer with many concatenated JSON objects. + var b bytes.Buffer + for _, tt := range tests { + b.WriteString(tt.json) + } + + dec := json.NewDecoder(&b) + for _, tt := range tests { + // Make a new instance of the type of our expected object. + p := reflect.New(reflect.TypeOf(tt.pb).Elem()).Interface().(proto.Message) + + err := UnmarshalNext(dec, p) + if err != nil { + t.Errorf("%s: %v", tt.desc, err) + continue + } + + // For easier diffs, compare text strings of the protos. + exp := proto.MarshalTextString(tt.pb) + act := proto.MarshalTextString(p) + if string(exp) != string(act) { + t.Errorf("%s: got [%s] want [%s]", tt.desc, act, exp) + } + } + + p := &pb.Simple{} + err := UnmarshalNext(dec, p) + if err != io.EOF { + t.Errorf("eof: got %v, expected io.EOF", err) + } +} + +var unmarshalingShouldError = []struct { + desc string + in string + pb proto.Message +}{ + {"a value", "666", new(pb.Simple)}, + {"gibberish", "{adskja123;l23=-=", new(pb.Simple)}, + {"unknown enum name", `{"hilarity":"DAVE"}`, new(proto3pb.Message)}, +} + +func TestUnmarshalingBadInput(t *testing.T) { + for _, tt := range unmarshalingShouldError { + err := UnmarshalString(tt.in, tt.pb) + if err == nil { + t.Errorf("an error was expected when parsing %q instead of an object", tt.desc) + } + } +} diff --git a/vendor/github.com/golang/protobuf/jsonpb/jsonpb_test_proto/Makefile b/vendor/github.com/golang/protobuf/jsonpb/jsonpb_test_proto/Makefile new file mode 100644 index 000000000..eeda8ae53 --- /dev/null +++ b/vendor/github.com/golang/protobuf/jsonpb/jsonpb_test_proto/Makefile @@ -0,0 +1,33 @@ +# Go support for Protocol Buffers - Google's data interchange format +# +# Copyright 2015 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: + protoc --go_out=Mgoogle/protobuf/any.proto=github.com/golang/protobuf/ptypes/any,Mgoogle/protobuf/duration.proto=github.com/golang/protobuf/ptypes/duration,Mgoogle/protobuf/struct.proto=github.com/golang/protobuf/ptypes/struct,Mgoogle/protobuf/timestamp.proto=github.com/golang/protobuf/ptypes/timestamp,Mgoogle/protobuf/wrappers.proto=github.com/golang/protobuf/ptypes/wrappers:. *.proto diff --git a/vendor/github.com/golang/protobuf/jsonpb/jsonpb_test_proto/more_test_objects.pb.go b/vendor/github.com/golang/protobuf/jsonpb/jsonpb_test_proto/more_test_objects.pb.go new file mode 100644 index 000000000..a5444a2de --- /dev/null +++ b/vendor/github.com/golang/protobuf/jsonpb/jsonpb_test_proto/more_test_objects.pb.go @@ -0,0 +1,163 @@ +// Code generated by protoc-gen-go. +// source: more_test_objects.proto +// DO NOT EDIT! + +/* +Package jsonpb is a generated protocol buffer package. + +It is generated from these files: + more_test_objects.proto + test_objects.proto + +It has these top-level messages: + Simple3 + Mappy + Simple + Repeats + Widget + Maps + MsgWithOneof + Real + Complex + KnownTypes +*/ +package jsonpb + +import proto "github.com/golang/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.ProtoPackageIsVersion2 // please upgrade the proto package + +type Numeral int32 + +const ( + Numeral_UNKNOWN Numeral = 0 + Numeral_ARABIC Numeral = 1 + Numeral_ROMAN Numeral = 2 +) + +var Numeral_name = map[int32]string{ + 0: "UNKNOWN", + 1: "ARABIC", + 2: "ROMAN", +} +var Numeral_value = map[string]int32{ + "UNKNOWN": 0, + "ARABIC": 1, + "ROMAN": 2, +} + +func (x Numeral) String() string { + return proto.EnumName(Numeral_name, int32(x)) +} +func (Numeral) EnumDescriptor() ([]byte, []int) { return fileDescriptor0, []int{0} } + +type Simple3 struct { + Dub float64 `protobuf:"fixed64,1,opt,name=dub" json:"dub,omitempty"` +} + +func (m *Simple3) Reset() { *m = Simple3{} } +func (m *Simple3) String() string { return proto.CompactTextString(m) } +func (*Simple3) ProtoMessage() {} +func (*Simple3) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{0} } + +type Mappy struct { + Nummy map[int64]int32 `protobuf:"bytes,1,rep,name=nummy" json:"nummy,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"varint,2,opt,name=value"` + Strry map[string]string `protobuf:"bytes,2,rep,name=strry" json:"strry,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + Objjy map[int32]*Simple3 `protobuf:"bytes,3,rep,name=objjy" json:"objjy,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + Buggy map[int64]string `protobuf:"bytes,4,rep,name=buggy" json:"buggy,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + Booly map[bool]bool `protobuf:"bytes,5,rep,name=booly" json:"booly,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"varint,2,opt,name=value"` + Enumy map[string]Numeral `protobuf:"bytes,6,rep,name=enumy" json:"enumy,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"varint,2,opt,name=value,enum=jsonpb.Numeral"` +} + +func (m *Mappy) Reset() { *m = Mappy{} } +func (m *Mappy) String() string { return proto.CompactTextString(m) } +func (*Mappy) ProtoMessage() {} +func (*Mappy) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{1} } + +func (m *Mappy) GetNummy() map[int64]int32 { + if m != nil { + return m.Nummy + } + return nil +} + +func (m *Mappy) GetStrry() map[string]string { + if m != nil { + return m.Strry + } + return nil +} + +func (m *Mappy) GetObjjy() map[int32]*Simple3 { + if m != nil { + return m.Objjy + } + return nil +} + +func (m *Mappy) GetBuggy() map[int64]string { + if m != nil { + return m.Buggy + } + return nil +} + +func (m *Mappy) GetBooly() map[bool]bool { + if m != nil { + return m.Booly + } + return nil +} + +func (m *Mappy) GetEnumy() map[string]Numeral { + if m != nil { + return m.Enumy + } + return nil +} + +func init() { + proto.RegisterType((*Simple3)(nil), "jsonpb.Simple3") + proto.RegisterType((*Mappy)(nil), "jsonpb.Mappy") + proto.RegisterEnum("jsonpb.Numeral", Numeral_name, Numeral_value) +} + +func init() { proto.RegisterFile("more_test_objects.proto", fileDescriptor0) } + +var fileDescriptor0 = []byte{ + // 357 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0x84, 0x93, 0xcd, 0x4a, 0xf3, 0x40, + 0x18, 0x85, 0xbf, 0x34, 0xdf, 0xa4, 0xcd, 0x5b, 0xd0, 0x30, 0x08, 0x0e, 0xba, 0x91, 0x82, 0x50, + 0x04, 0xb3, 0x68, 0x37, 0xc5, 0x5d, 0x2b, 0x5d, 0x14, 0x69, 0x0a, 0x29, 0xe2, 0xb2, 0x34, 0x3a, + 0x14, 0x6b, 0xd2, 0x09, 0xf9, 0x11, 0xe6, 0x82, 0xbc, 0x4f, 0xf3, 0x4e, 0x52, 0x33, 0x96, 0x01, + 0x77, 0xd3, 0x9e, 0xe7, 0x09, 0x67, 0x4e, 0x08, 0x5c, 0x26, 0x22, 0xe3, 0x9b, 0x82, 0xe7, 0xc5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 0x75, 0xb3, 0x3f, 0x3a, 0x3f, 0xde, 0xa1, 0x79, 0xdf, 0x27, 0x25, + 0xda, 0xcd, 0xfe, 0xaa, 0xef, 0x9e, 0x9a, 0x3f, 0xeb, 0xe9, 0x66, 0xcf, 0x60, 0xf6, 0x4e, 0xea, + 0xb7, 0x3b, 0x1a, 0x2e, 0xfe, 0xab, 0xfe, 0x59, 0x5b, 0xbf, 0xda, 0x99, 0x67, 0xdb, 0x58, 0x7b, + 0xd4, 0xdd, 0x3d, 0x74, 0x9b, 0x7f, 0x69, 0x1f, 0xba, 0xcf, 0xc1, 0x53, 0xb0, 0x7a, 0x09, 0xbc, + 0x7f, 0x14, 0xc0, 0x99, 0x86, 0xd3, 0xd9, 0xe2, 0xd1, 0xb3, 0xa8, 0x0b, 0x24, 0x5c, 0x2d, 0xa7, + 0x81, 0xd7, 0x89, 0x1c, 0xf5, 0x09, 0x8c, 0xbf, 0x03, 0x00, 0x00, 0xff, 0xff, 0x3d, 0x04, 0xff, + 0x62, 0x1d, 0x03, 0x00, 0x00, +} diff --git a/vendor/github.com/golang/protobuf/jsonpb/jsonpb_test_proto/more_test_objects.proto b/vendor/github.com/golang/protobuf/jsonpb/jsonpb_test_proto/more_test_objects.proto new file mode 100644 index 000000000..511f021f9 --- /dev/null +++ b/vendor/github.com/golang/protobuf/jsonpb/jsonpb_test_proto/more_test_objects.proto @@ -0,0 +1,53 @@ +// Go support for Protocol Buffers - Google's data interchange format +// +// Copyright 2015 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. + +syntax = "proto3"; + +package jsonpb; + +message Simple3 { + double dub = 1; +} + +enum Numeral { + UNKNOWN = 0; + ARABIC = 1; + ROMAN = 2; +} + +message Mappy { + map nummy = 1; + map strry = 2; + map objjy = 3; + map buggy = 4; + map booly = 5; + map enumy = 6; +} diff --git a/vendor/github.com/golang/protobuf/jsonpb/jsonpb_test_proto/test_objects.pb.go b/vendor/github.com/golang/protobuf/jsonpb/jsonpb_test_proto/test_objects.pb.go new file mode 100644 index 000000000..284f7a87f --- /dev/null +++ b/vendor/github.com/golang/protobuf/jsonpb/jsonpb_test_proto/test_objects.pb.go @@ -0,0 +1,739 @@ +// Code generated by protoc-gen-go. +// source: test_objects.proto +// DO NOT EDIT! + +package jsonpb + +import proto "github.com/golang/protobuf/proto" +import fmt "fmt" +import math "math" +import google_protobuf "github.com/golang/protobuf/ptypes/any" +import google_protobuf1 "github.com/golang/protobuf/ptypes/duration" +import google_protobuf2 "github.com/golang/protobuf/ptypes/struct" +import google_protobuf3 "github.com/golang/protobuf/ptypes/timestamp" +import google_protobuf4 "github.com/golang/protobuf/ptypes/wrappers" + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +type Widget_Color int32 + +const ( + Widget_RED Widget_Color = 0 + Widget_GREEN Widget_Color = 1 + Widget_BLUE Widget_Color = 2 +) + +var Widget_Color_name = map[int32]string{ + 0: "RED", + 1: "GREEN", + 2: "BLUE", +} +var Widget_Color_value = map[string]int32{ + "RED": 0, + "GREEN": 1, + "BLUE": 2, +} + +func (x Widget_Color) Enum() *Widget_Color { + p := new(Widget_Color) + *p = x + return p +} +func (x Widget_Color) String() string { + return proto.EnumName(Widget_Color_name, int32(x)) +} +func (x *Widget_Color) UnmarshalJSON(data []byte) error { + value, err := proto.UnmarshalJSONEnum(Widget_Color_value, data, "Widget_Color") + if err != nil { + return err + } + *x = Widget_Color(value) + return nil +} +func (Widget_Color) EnumDescriptor() ([]byte, []int) { return fileDescriptor1, []int{2, 0} } + +// Test message for holding primitive types. +type Simple struct { + OBool *bool `protobuf:"varint,1,opt,name=o_bool,json=oBool" json:"o_bool,omitempty"` + OInt32 *int32 `protobuf:"varint,2,opt,name=o_int32,json=oInt32" json:"o_int32,omitempty"` + OInt64 *int64 `protobuf:"varint,3,opt,name=o_int64,json=oInt64" json:"o_int64,omitempty"` + OUint32 *uint32 `protobuf:"varint,4,opt,name=o_uint32,json=oUint32" json:"o_uint32,omitempty"` + OUint64 *uint64 `protobuf:"varint,5,opt,name=o_uint64,json=oUint64" json:"o_uint64,omitempty"` + OSint32 *int32 `protobuf:"zigzag32,6,opt,name=o_sint32,json=oSint32" json:"o_sint32,omitempty"` + OSint64 *int64 `protobuf:"zigzag64,7,opt,name=o_sint64,json=oSint64" json:"o_sint64,omitempty"` + OFloat *float32 `protobuf:"fixed32,8,opt,name=o_float,json=oFloat" json:"o_float,omitempty"` + ODouble *float64 `protobuf:"fixed64,9,opt,name=o_double,json=oDouble" json:"o_double,omitempty"` + OString *string `protobuf:"bytes,10,opt,name=o_string,json=oString" json:"o_string,omitempty"` + OBytes []byte `protobuf:"bytes,11,opt,name=o_bytes,json=oBytes" json:"o_bytes,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *Simple) Reset() { *m = Simple{} } +func (m *Simple) String() string { return proto.CompactTextString(m) } +func (*Simple) ProtoMessage() {} +func (*Simple) Descriptor() ([]byte, []int) { return fileDescriptor1, []int{0} } + +func (m *Simple) GetOBool() bool { + if m != nil && m.OBool != nil { + return *m.OBool + } + return false +} + +func (m *Simple) GetOInt32() int32 { + if m != nil && m.OInt32 != nil { + return *m.OInt32 + } + return 0 +} + +func (m *Simple) GetOInt64() int64 { + if m != nil && m.OInt64 != nil { + return *m.OInt64 + } + return 0 +} + +func (m *Simple) GetOUint32() uint32 { + if m != nil && m.OUint32 != nil { + return *m.OUint32 + } + return 0 +} + +func (m *Simple) GetOUint64() uint64 { + if m != nil && m.OUint64 != nil { + return *m.OUint64 + } + return 0 +} + +func (m *Simple) GetOSint32() int32 { + if m != nil && m.OSint32 != nil { + return *m.OSint32 + } + return 0 +} + +func (m *Simple) GetOSint64() int64 { + if m != nil && m.OSint64 != nil { + return *m.OSint64 + } + return 0 +} + +func (m *Simple) GetOFloat() float32 { + if m != nil && m.OFloat != nil { + return *m.OFloat + } + return 0 +} + +func (m *Simple) GetODouble() float64 { + if m != nil && m.ODouble != nil { + return *m.ODouble + } + return 0 +} + +func (m *Simple) GetOString() string { + if m != nil && m.OString != nil { + return *m.OString + } + return "" +} + +func (m *Simple) GetOBytes() []byte { + if m != nil { + return m.OBytes + } + return nil +} + +// Test message for holding repeated primitives. +type Repeats struct { + RBool []bool `protobuf:"varint,1,rep,name=r_bool,json=rBool" json:"r_bool,omitempty"` + RInt32 []int32 `protobuf:"varint,2,rep,name=r_int32,json=rInt32" json:"r_int32,omitempty"` + RInt64 []int64 `protobuf:"varint,3,rep,name=r_int64,json=rInt64" json:"r_int64,omitempty"` + RUint32 []uint32 `protobuf:"varint,4,rep,name=r_uint32,json=rUint32" json:"r_uint32,omitempty"` + RUint64 []uint64 `protobuf:"varint,5,rep,name=r_uint64,json=rUint64" json:"r_uint64,omitempty"` + RSint32 []int32 `protobuf:"zigzag32,6,rep,name=r_sint32,json=rSint32" json:"r_sint32,omitempty"` + RSint64 []int64 `protobuf:"zigzag64,7,rep,name=r_sint64,json=rSint64" json:"r_sint64,omitempty"` + RFloat []float32 `protobuf:"fixed32,8,rep,name=r_float,json=rFloat" json:"r_float,omitempty"` + RDouble []float64 `protobuf:"fixed64,9,rep,name=r_double,json=rDouble" json:"r_double,omitempty"` + RString []string `protobuf:"bytes,10,rep,name=r_string,json=rString" json:"r_string,omitempty"` + RBytes [][]byte `protobuf:"bytes,11,rep,name=r_bytes,json=rBytes" json:"r_bytes,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *Repeats) Reset() { *m = Repeats{} } +func (m *Repeats) String() string { return proto.CompactTextString(m) } +func (*Repeats) ProtoMessage() {} +func (*Repeats) Descriptor() ([]byte, []int) { return fileDescriptor1, []int{1} } + +func (m *Repeats) GetRBool() []bool { + if m != nil { + return m.RBool + } + return nil +} + +func (m *Repeats) GetRInt32() []int32 { + if m != nil { + return m.RInt32 + } + return nil +} + +func (m *Repeats) GetRInt64() []int64 { + if m != nil { + return m.RInt64 + } + return nil +} + +func (m *Repeats) GetRUint32() []uint32 { + if m != nil { + return m.RUint32 + } + return nil +} + +func (m *Repeats) GetRUint64() []uint64 { + if m != nil { + return m.RUint64 + } + return nil +} + +func (m *Repeats) GetRSint32() []int32 { + if m != nil { + return m.RSint32 + } + return nil +} + +func (m *Repeats) GetRSint64() []int64 { + if m != nil { + return m.RSint64 + } + return nil +} + +func (m *Repeats) GetRFloat() []float32 { + if m != nil { + return m.RFloat + } + return nil +} + +func (m *Repeats) GetRDouble() []float64 { + if m != nil { + return m.RDouble + } + return nil +} + +func (m *Repeats) GetRString() []string { + if m != nil { + return m.RString + } + return nil +} + +func (m *Repeats) GetRBytes() [][]byte { + if m != nil { + return m.RBytes + } + return nil +} + +// Test message for holding enums and nested messages. +type Widget struct { + Color *Widget_Color `protobuf:"varint,1,opt,name=color,enum=jsonpb.Widget_Color" json:"color,omitempty"` + RColor []Widget_Color `protobuf:"varint,2,rep,name=r_color,json=rColor,enum=jsonpb.Widget_Color" json:"r_color,omitempty"` + Simple *Simple `protobuf:"bytes,10,opt,name=simple" json:"simple,omitempty"` + RSimple []*Simple `protobuf:"bytes,11,rep,name=r_simple,json=rSimple" json:"r_simple,omitempty"` + Repeats *Repeats `protobuf:"bytes,20,opt,name=repeats" json:"repeats,omitempty"` + RRepeats []*Repeats `protobuf:"bytes,21,rep,name=r_repeats,json=rRepeats" json:"r_repeats,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *Widget) Reset() { *m = Widget{} } +func (m *Widget) String() string { return proto.CompactTextString(m) } +func (*Widget) ProtoMessage() {} +func (*Widget) Descriptor() ([]byte, []int) { return fileDescriptor1, []int{2} } + +func (m *Widget) GetColor() Widget_Color { + if m != nil && m.Color != nil { + return *m.Color + } + return Widget_RED +} + +func (m *Widget) GetRColor() []Widget_Color { + if m != nil { + return m.RColor + } + return nil +} + +func (m *Widget) GetSimple() *Simple { + if m != nil { + return m.Simple + } + return nil +} + +func (m *Widget) GetRSimple() []*Simple { + if m != nil { + return m.RSimple + } + return nil +} + +func (m *Widget) GetRepeats() *Repeats { + if m != nil { + return m.Repeats + } + return nil +} + +func (m *Widget) GetRRepeats() []*Repeats { + if m != nil { + return m.RRepeats + } + return nil +} + +type Maps struct { + MInt64Str map[int64]string `protobuf:"bytes,1,rep,name=m_int64_str,json=mInt64Str" json:"m_int64_str,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + MBoolSimple map[bool]*Simple `protobuf:"bytes,2,rep,name=m_bool_simple,json=mBoolSimple" json:"m_bool_simple,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *Maps) Reset() { *m = Maps{} } +func (m *Maps) String() string { return proto.CompactTextString(m) } +func (*Maps) ProtoMessage() {} +func (*Maps) Descriptor() ([]byte, []int) { return fileDescriptor1, []int{3} } + +func (m *Maps) GetMInt64Str() map[int64]string { + if m != nil { + return m.MInt64Str + } + return nil +} + +func (m *Maps) GetMBoolSimple() map[bool]*Simple { + if m != nil { + return m.MBoolSimple + } + return nil +} + +type MsgWithOneof struct { + // Types that are valid to be assigned to Union: + // *MsgWithOneof_Title + // *MsgWithOneof_Salary + // *MsgWithOneof_Country + Union isMsgWithOneof_Union `protobuf_oneof:"union"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *MsgWithOneof) Reset() { *m = MsgWithOneof{} } +func (m *MsgWithOneof) String() string { return proto.CompactTextString(m) } +func (*MsgWithOneof) ProtoMessage() {} +func (*MsgWithOneof) Descriptor() ([]byte, []int) { return fileDescriptor1, []int{4} } + +type isMsgWithOneof_Union interface { + isMsgWithOneof_Union() +} + +type MsgWithOneof_Title struct { + Title string `protobuf:"bytes,1,opt,name=title,oneof"` +} +type MsgWithOneof_Salary struct { + Salary int64 `protobuf:"varint,2,opt,name=salary,oneof"` +} +type MsgWithOneof_Country struct { + Country string `protobuf:"bytes,3,opt,name=Country,json=country,oneof"` +} + +func (*MsgWithOneof_Title) isMsgWithOneof_Union() {} +func (*MsgWithOneof_Salary) isMsgWithOneof_Union() {} +func (*MsgWithOneof_Country) isMsgWithOneof_Union() {} + +func (m *MsgWithOneof) GetUnion() isMsgWithOneof_Union { + if m != nil { + return m.Union + } + return nil +} + +func (m *MsgWithOneof) GetTitle() string { + if x, ok := m.GetUnion().(*MsgWithOneof_Title); ok { + return x.Title + } + return "" +} + +func (m *MsgWithOneof) GetSalary() int64 { + if x, ok := m.GetUnion().(*MsgWithOneof_Salary); ok { + return x.Salary + } + return 0 +} + +func (m *MsgWithOneof) GetCountry() string { + if x, ok := m.GetUnion().(*MsgWithOneof_Country); ok { + return x.Country + } + return "" +} + +// XXX_OneofFuncs is for the internal use of the proto package. +func (*MsgWithOneof) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{}) { + return _MsgWithOneof_OneofMarshaler, _MsgWithOneof_OneofUnmarshaler, _MsgWithOneof_OneofSizer, []interface{}{ + (*MsgWithOneof_Title)(nil), + (*MsgWithOneof_Salary)(nil), + (*MsgWithOneof_Country)(nil), + } +} + +func _MsgWithOneof_OneofMarshaler(msg proto.Message, b *proto.Buffer) error { + m := msg.(*MsgWithOneof) + // union + switch x := m.Union.(type) { + case *MsgWithOneof_Title: + b.EncodeVarint(1<<3 | proto.WireBytes) + b.EncodeStringBytes(x.Title) + case *MsgWithOneof_Salary: + b.EncodeVarint(2<<3 | proto.WireVarint) + b.EncodeVarint(uint64(x.Salary)) + case *MsgWithOneof_Country: + b.EncodeVarint(3<<3 | proto.WireBytes) + b.EncodeStringBytes(x.Country) + case nil: + default: + return fmt.Errorf("MsgWithOneof.Union has unexpected type %T", x) + } + return nil +} + +func _MsgWithOneof_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) { + m := msg.(*MsgWithOneof) + switch tag { + case 1: // union.title + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeStringBytes() + m.Union = &MsgWithOneof_Title{x} + return true, err + case 2: // union.salary + if wire != proto.WireVarint { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeVarint() + m.Union = &MsgWithOneof_Salary{int64(x)} + return true, err + case 3: // union.Country + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeStringBytes() + m.Union = &MsgWithOneof_Country{x} + return true, err + default: + return false, nil + } +} + +func _MsgWithOneof_OneofSizer(msg proto.Message) (n int) { + m := msg.(*MsgWithOneof) + // union + switch x := m.Union.(type) { + case *MsgWithOneof_Title: + n += proto.SizeVarint(1<<3 | proto.WireBytes) + n += proto.SizeVarint(uint64(len(x.Title))) + n += len(x.Title) + case *MsgWithOneof_Salary: + n += proto.SizeVarint(2<<3 | proto.WireVarint) + n += proto.SizeVarint(uint64(x.Salary)) + case *MsgWithOneof_Country: + n += proto.SizeVarint(3<<3 | proto.WireBytes) + n += proto.SizeVarint(uint64(len(x.Country))) + n += len(x.Country) + case nil: + default: + panic(fmt.Sprintf("proto: unexpected type %T in oneof", x)) + } + return n +} + +type Real struct { + Value *float64 `protobuf:"fixed64,1,opt,name=value" json:"value,omitempty"` + proto.XXX_InternalExtensions `json:"-"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *Real) Reset() { *m = Real{} } +func (m *Real) String() string { return proto.CompactTextString(m) } +func (*Real) ProtoMessage() {} +func (*Real) Descriptor() ([]byte, []int) { return fileDescriptor1, []int{5} } + +var extRange_Real = []proto.ExtensionRange{ + {100, 536870911}, +} + +func (*Real) ExtensionRangeArray() []proto.ExtensionRange { + return extRange_Real +} + +func (m *Real) GetValue() float64 { + if m != nil && m.Value != nil { + return *m.Value + } + return 0 +} + +type Complex struct { + Imaginary *float64 `protobuf:"fixed64,1,opt,name=imaginary" json:"imaginary,omitempty"` + proto.XXX_InternalExtensions `json:"-"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *Complex) Reset() { *m = Complex{} } +func (m *Complex) String() string { return proto.CompactTextString(m) } +func (*Complex) ProtoMessage() {} +func (*Complex) Descriptor() ([]byte, []int) { return fileDescriptor1, []int{6} } + +var extRange_Complex = []proto.ExtensionRange{ + {100, 536870911}, +} + +func (*Complex) ExtensionRangeArray() []proto.ExtensionRange { + return extRange_Complex +} + +func (m *Complex) GetImaginary() float64 { + if m != nil && m.Imaginary != nil { + return *m.Imaginary + } + return 0 +} + +var E_Complex_RealExtension = &proto.ExtensionDesc{ + ExtendedType: (*Real)(nil), + ExtensionType: (*Complex)(nil), + Field: 123, + Name: "jsonpb.Complex.real_extension", + Tag: "bytes,123,opt,name=real_extension,json=realExtension", +} + +type KnownTypes struct { + An *google_protobuf.Any `protobuf:"bytes,14,opt,name=an" json:"an,omitempty"` + Dur *google_protobuf1.Duration `protobuf:"bytes,1,opt,name=dur" json:"dur,omitempty"` + St *google_protobuf2.Struct `protobuf:"bytes,12,opt,name=st" json:"st,omitempty"` + Ts *google_protobuf3.Timestamp `protobuf:"bytes,2,opt,name=ts" json:"ts,omitempty"` + Dbl *google_protobuf4.DoubleValue `protobuf:"bytes,3,opt,name=dbl" json:"dbl,omitempty"` + Flt *google_protobuf4.FloatValue `protobuf:"bytes,4,opt,name=flt" json:"flt,omitempty"` + I64 *google_protobuf4.Int64Value `protobuf:"bytes,5,opt,name=i64" json:"i64,omitempty"` + U64 *google_protobuf4.UInt64Value `protobuf:"bytes,6,opt,name=u64" json:"u64,omitempty"` + I32 *google_protobuf4.Int32Value `protobuf:"bytes,7,opt,name=i32" json:"i32,omitempty"` + U32 *google_protobuf4.UInt32Value `protobuf:"bytes,8,opt,name=u32" json:"u32,omitempty"` + Bool *google_protobuf4.BoolValue `protobuf:"bytes,9,opt,name=bool" json:"bool,omitempty"` + Str *google_protobuf4.StringValue `protobuf:"bytes,10,opt,name=str" json:"str,omitempty"` + Bytes *google_protobuf4.BytesValue `protobuf:"bytes,11,opt,name=bytes" json:"bytes,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *KnownTypes) Reset() { *m = KnownTypes{} } +func (m *KnownTypes) String() string { return proto.CompactTextString(m) } +func (*KnownTypes) ProtoMessage() {} +func (*KnownTypes) Descriptor() ([]byte, []int) { return fileDescriptor1, []int{7} } + +func (m *KnownTypes) GetAn() *google_protobuf.Any { + if m != nil { + return m.An + } + return nil +} + +func (m *KnownTypes) GetDur() *google_protobuf1.Duration { + if m != nil { + return m.Dur + } + return nil +} + +func (m *KnownTypes) GetSt() *google_protobuf2.Struct { + if m != nil { + return m.St + } + return nil +} + +func (m *KnownTypes) GetTs() *google_protobuf3.Timestamp { + if m != nil { + return m.Ts + } + return nil +} + +func (m *KnownTypes) GetDbl() *google_protobuf4.DoubleValue { + if m != nil { + return m.Dbl + } + return nil +} + +func (m *KnownTypes) GetFlt() *google_protobuf4.FloatValue { + if m != nil { + return m.Flt + } + return nil +} + +func (m *KnownTypes) GetI64() *google_protobuf4.Int64Value { + if m != nil { + return m.I64 + } + return nil +} + +func (m *KnownTypes) GetU64() *google_protobuf4.UInt64Value { + if m != nil { + return m.U64 + } + return nil +} + +func (m *KnownTypes) GetI32() *google_protobuf4.Int32Value { + if m != nil { + return m.I32 + } + return nil +} + +func (m *KnownTypes) GetU32() *google_protobuf4.UInt32Value { + if m != nil { + return m.U32 + } + return nil +} + +func (m *KnownTypes) GetBool() *google_protobuf4.BoolValue { + if m != nil { + return m.Bool + } + return nil +} + +func (m *KnownTypes) GetStr() *google_protobuf4.StringValue { + if m != nil { + return m.Str + } + return nil +} + +func (m *KnownTypes) GetBytes() *google_protobuf4.BytesValue { + if m != nil { + return m.Bytes + } + return nil +} + +var E_Name = &proto.ExtensionDesc{ + ExtendedType: (*Real)(nil), + ExtensionType: (*string)(nil), + Field: 124, + Name: "jsonpb.name", + Tag: "bytes,124,opt,name=name", +} + +func init() { + proto.RegisterType((*Simple)(nil), "jsonpb.Simple") + proto.RegisterType((*Repeats)(nil), "jsonpb.Repeats") + proto.RegisterType((*Widget)(nil), "jsonpb.Widget") + proto.RegisterType((*Maps)(nil), "jsonpb.Maps") + proto.RegisterType((*MsgWithOneof)(nil), "jsonpb.MsgWithOneof") + proto.RegisterType((*Real)(nil), "jsonpb.Real") + proto.RegisterType((*Complex)(nil), "jsonpb.Complex") + proto.RegisterType((*KnownTypes)(nil), "jsonpb.KnownTypes") + proto.RegisterEnum("jsonpb.Widget_Color", Widget_Color_name, Widget_Color_value) + proto.RegisterExtension(E_Complex_RealExtension) + proto.RegisterExtension(E_Name) +} + +func init() { proto.RegisterFile("test_objects.proto", fileDescriptor1) } + +var fileDescriptor1 = []byte{ + // 1006 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0x7c, 0x55, 0xdd, 0x72, 0xdb, 0x44, + 0x14, 0xae, 0xb5, 0x96, 0x65, 0xaf, 0x53, 0x63, 0x76, 0x52, 0xaa, 0x98, 0x00, 0x1d, 0x0f, 0x14, + 0x28, 0xe0, 0x0e, 0x6e, 0xa7, 0xc3, 0x14, 0x6e, 0x9a, 0xc6, 0xfc, 0x0c, 0xa4, 0xcc, 0x6c, 0x1a, + 0x7a, 0xe9, 0x91, 0x13, 0xc5, 0xa8, 0xc8, 0x5a, 0xcf, 0x6a, 0x45, 0xea, 0x81, 0x0b, 0x1e, 0x82, + 0x57, 0x80, 0x47, 0xe0, 0x89, 0x78, 0x10, 0xce, 0x39, 0x2b, 0x69, 0x1d, 0xbb, 0xa6, 0x37, 0xcd, + 0xd1, 0xf7, 0xe3, 0xa3, 0x6f, 0x8f, 0xce, 0x72, 0x61, 0xe2, 0xdc, 0x4c, 0xd5, 0xec, 0x65, 0x7c, + 0x6e, 0xf2, 0xd1, 0x52, 0x2b, 0xa3, 0x44, 0xeb, 0x65, 0xae, 0xb2, 0xe5, 0x6c, 0x70, 0x30, 0x57, + 0x6a, 0x9e, 0xc6, 0xf7, 0xe9, 0xe9, 0xac, 0xb8, 0xbc, 0x1f, 0x65, 0x2b, 0x4b, 0x19, 0xbc, 0xbb, + 0x09, 0x5d, 0x14, 0x3a, 0x32, 0x89, 0xca, 0x4a, 0xfc, 0x70, 0x13, 0xcf, 0x8d, 0x2e, 0xce, 0x4d, + 0x89, 0xbe, 0xb7, 0x89, 0x9a, 0x64, 0x01, 0x6d, 0x44, 0x8b, 0xe5, 0x2e, 0xfb, 0x2b, 0x1d, 0x2d, + 0x97, 0xb1, 0x2e, 0x3b, 0x1c, 0xfe, 0xe5, 0xf1, 0xd6, 0x69, 0xb2, 0x58, 0xa6, 0xb1, 0xb8, 0xc5, + 0x5b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0x63, 0x5c, 0xd2, 0x81, 0x87, 0xdd, 0x14, 0x40, 0x6f, + 0xed, 0xe8, 0xe6, 0x6c, 0x9d, 0x0f, 0x44, 0xb2, 0x87, 0x2d, 0x1b, 0xec, 0xb6, 0x7f, 0x30, 0xae, + 0xec, 0x61, 0xfd, 0xa2, 0x3d, 0xd0, 0xdb, 0xff, 0x63, 0x5f, 0xf3, 0x0b, 0xe2, 0x37, 0xe9, 0x1a, + 0xe9, 0xec, 0x88, 0x12, 0xbf, 0x23, 0x4b, 0x27, 0x1e, 0xfa, 0xe3, 0x46, 0xe0, 0x3b, 0xfc, 0xed, + 0x6a, 0x2e, 0xfd, 0x81, 0x28, 0x3e, 0xe7, 0xbe, 0xbb, 0xcb, 0x5e, 0xf7, 0x02, 0xb4, 0xb2, 0xad, + 0xc0, 0x32, 0x1f, 0xdf, 0xe1, 0xcd, 0x2c, 0x5a, 0xc4, 0x1b, 0x23, 0xfa, 0x3b, 0x7d, 0xe5, 0x84, + 0xfc, 0x17, 0x00, 0x00, 0xff, 0xff, 0xca, 0xa2, 0x76, 0x34, 0xe8, 0x08, 0x00, 0x00, +} diff --git a/vendor/github.com/golang/protobuf/jsonpb/jsonpb_test_proto/test_objects.proto b/vendor/github.com/golang/protobuf/jsonpb/jsonpb_test_proto/test_objects.proto new file mode 100644 index 000000000..911a9d53a --- /dev/null +++ b/vendor/github.com/golang/protobuf/jsonpb/jsonpb_test_proto/test_objects.proto @@ -0,0 +1,134 @@ +// Go support for Protocol Buffers - Google's data interchange format +// +// Copyright 2015 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. + +syntax = "proto2"; + +import "google/protobuf/any.proto"; +import "google/protobuf/duration.proto"; +import "google/protobuf/struct.proto"; +import "google/protobuf/timestamp.proto"; +import "google/protobuf/wrappers.proto"; + +package jsonpb; + +// Test message for holding primitive types. +message Simple { + optional bool o_bool = 1; + optional int32 o_int32 = 2; + optional int64 o_int64 = 3; + optional uint32 o_uint32 = 4; + optional uint64 o_uint64 = 5; + optional sint32 o_sint32 = 6; + optional sint64 o_sint64 = 7; + optional float o_float = 8; + optional double o_double = 9; + optional string o_string = 10; + optional bytes o_bytes = 11; +} + +// Test message for holding repeated primitives. +message Repeats { + repeated bool r_bool = 1; + repeated int32 r_int32 = 2; + repeated int64 r_int64 = 3; + repeated uint32 r_uint32 = 4; + repeated uint64 r_uint64 = 5; + repeated sint32 r_sint32 = 6; + repeated sint64 r_sint64 = 7; + repeated float r_float = 8; + repeated double r_double = 9; + repeated string r_string = 10; + repeated bytes r_bytes = 11; +} + +// Test message for holding enums and nested messages. +message Widget { + enum Color { + RED = 0; + GREEN = 1; + BLUE = 2; + }; + optional Color color = 1; + repeated Color r_color = 2; + + optional Simple simple = 10; + repeated Simple r_simple = 11; + + optional Repeats repeats = 20; + repeated Repeats r_repeats = 21; +} + +message Maps { + map m_int64_str = 1; + map m_bool_simple = 2; +} + +message MsgWithOneof { + oneof union { + string title = 1; + int64 salary = 2; + string Country = 3; + } +} + +message Real { + optional double value = 1; + extensions 100 to max; +} + +extend Real { + optional string name = 124; +} + +message Complex { + extend Real { + optional Complex real_extension = 123; + } + optional double imaginary = 1; + extensions 100 to max; +} + +message KnownTypes { + optional google.protobuf.Any an = 14; + optional google.protobuf.Duration dur = 1; + optional google.protobuf.Struct st = 12; + optional google.protobuf.Timestamp ts = 2; + + optional google.protobuf.DoubleValue dbl = 3; + optional google.protobuf.FloatValue flt = 4; + optional google.protobuf.Int64Value i64 = 5; + optional google.protobuf.UInt64Value u64 = 6; + optional google.protobuf.Int32Value i32 = 7; + optional google.protobuf.UInt32Value u32 = 8; + optional google.protobuf.BoolValue bool = 9; + optional google.protobuf.StringValue str = 10; + optional google.protobuf.BytesValue bytes = 11; +} diff --git a/vendor/github.com/golang/protobuf/proto/all_test.go b/vendor/github.com/golang/protobuf/proto/all_test.go new file mode 100644 index 000000000..fd4a94eaf --- /dev/null +++ b/vendor/github.com/golang/protobuf/proto/all_test.go @@ -0,0 +1,2252 @@ +// 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. + +package proto_test + +import ( + "bytes" + "encoding/json" + "errors" + "fmt" + "math" + "math/rand" + "reflect" + "runtime/debug" + "strings" + "testing" + "time" + + . "github.com/golang/protobuf/proto" + . "github.com/golang/protobuf/proto/testdata" +) + +var globalO *Buffer + +func old() *Buffer { + if globalO == nil { + globalO = NewBuffer(nil) + } + globalO.Reset() + return globalO +} + +func equalbytes(b1, b2 []byte, t *testing.T) { + if len(b1) != len(b2) { + t.Errorf("wrong lengths: 2*%d != %d", len(b1), len(b2)) + return + } + for i := 0; i < len(b1); i++ { + if b1[i] != b2[i] { + t.Errorf("bad byte[%d]:%x %x: %s %s", i, b1[i], b2[i], b1, b2) + } + } +} + +func initGoTestField() *GoTestField { + f := new(GoTestField) + f.Label = String("label") + f.Type = String("type") + return f +} + +// These are all structurally equivalent but the tag numbers differ. +// (It's remarkable that required, optional, and repeated all have +// 8 letters.) +func initGoTest_RequiredGroup() *GoTest_RequiredGroup { + return &GoTest_RequiredGroup{ + RequiredField: String("required"), + } +} + +func initGoTest_OptionalGroup() *GoTest_OptionalGroup { + return &GoTest_OptionalGroup{ + RequiredField: String("optional"), + } +} + +func initGoTest_RepeatedGroup() *GoTest_RepeatedGroup { + return &GoTest_RepeatedGroup{ + RequiredField: String("repeated"), + } +} + +func initGoTest(setdefaults bool) *GoTest { + pb := new(GoTest) + if setdefaults { + pb.F_BoolDefaulted = Bool(Default_GoTest_F_BoolDefaulted) + pb.F_Int32Defaulted = Int32(Default_GoTest_F_Int32Defaulted) + pb.F_Int64Defaulted = Int64(Default_GoTest_F_Int64Defaulted) + pb.F_Fixed32Defaulted = Uint32(Default_GoTest_F_Fixed32Defaulted) + pb.F_Fixed64Defaulted = Uint64(Default_GoTest_F_Fixed64Defaulted) + pb.F_Uint32Defaulted = Uint32(Default_GoTest_F_Uint32Defaulted) + pb.F_Uint64Defaulted = Uint64(Default_GoTest_F_Uint64Defaulted) + pb.F_FloatDefaulted = Float32(Default_GoTest_F_FloatDefaulted) + pb.F_DoubleDefaulted = Float64(Default_GoTest_F_DoubleDefaulted) + pb.F_StringDefaulted = String(Default_GoTest_F_StringDefaulted) + pb.F_BytesDefaulted = Default_GoTest_F_BytesDefaulted + pb.F_Sint32Defaulted = Int32(Default_GoTest_F_Sint32Defaulted) + pb.F_Sint64Defaulted = Int64(Default_GoTest_F_Sint64Defaulted) + } + + pb.Kind = GoTest_TIME.Enum() + pb.RequiredField = initGoTestField() + pb.F_BoolRequired = Bool(true) + pb.F_Int32Required = Int32(3) + pb.F_Int64Required = Int64(6) + pb.F_Fixed32Required = Uint32(32) + pb.F_Fixed64Required = Uint64(64) + pb.F_Uint32Required = Uint32(3232) + pb.F_Uint64Required = Uint64(6464) + pb.F_FloatRequired = Float32(3232) + pb.F_DoubleRequired = Float64(6464) + pb.F_StringRequired = String("string") + pb.F_BytesRequired = []byte("bytes") + pb.F_Sint32Required = Int32(-32) + pb.F_Sint64Required = Int64(-64) + pb.Requiredgroup = initGoTest_RequiredGroup() + + return pb +} + +func fail(msg string, b *bytes.Buffer, s string, t *testing.T) { + data := b.Bytes() + ld := len(data) + ls := len(s) / 2 + + fmt.Printf("fail %s ld=%d ls=%d\n", msg, ld, ls) + + // find the interesting spot - n + n := ls + if ld < ls { + n = ld + } + j := 0 + for i := 0; i < n; i++ { + bs := hex(s[j])*16 + hex(s[j+1]) + j += 2 + if data[i] == bs { + continue + } + n = i + break + } + l := n - 10 + if l < 0 { + l = 0 + } + h := n + 10 + + // find the interesting spot - n + fmt.Printf("is[%d]:", l) + for i := l; i < h; i++ { + if i >= ld { + fmt.Printf(" --") + continue + } + fmt.Printf(" %.2x", data[i]) + } + fmt.Printf("\n") + + fmt.Printf("sb[%d]:", l) + for i := l; i < h; i++ { + if i >= ls { + fmt.Printf(" --") + continue + } + bs := hex(s[j])*16 + hex(s[j+1]) + j += 2 + fmt.Printf(" %.2x", bs) + } + fmt.Printf("\n") + + t.Fail() + + // t.Errorf("%s: \ngood: %s\nbad: %x", msg, s, b.Bytes()) + // Print the output in a partially-decoded format; can + // be helpful when updating the test. It produces the output + // that is pasted, with minor edits, into the argument to verify(). + // data := b.Bytes() + // nesting := 0 + // for b.Len() > 0 { + // start := len(data) - b.Len() + // var u uint64 + // u, err := DecodeVarint(b) + // if err != nil { + // fmt.Printf("decode error on varint:", err) + // return + // } + // wire := u & 0x7 + // tag := u >> 3 + // switch wire { + // case WireVarint: + // v, err := DecodeVarint(b) + // if err != nil { + // fmt.Printf("decode error on varint:", err) + // return + // } + // fmt.Printf("\t\t\"%x\" // field %d, encoding %d, value %d\n", + // data[start:len(data)-b.Len()], tag, wire, v) + // case WireFixed32: + // v, err := DecodeFixed32(b) + // if err != nil { + // fmt.Printf("decode error on fixed32:", err) + // return + // } + // fmt.Printf("\t\t\"%x\" // field %d, encoding %d, value %d\n", + // data[start:len(data)-b.Len()], tag, wire, v) + // case WireFixed64: + // v, err := DecodeFixed64(b) + // if err != nil { + // fmt.Printf("decode error on fixed64:", err) + // return + // } + // fmt.Printf("\t\t\"%x\" // field %d, encoding %d, value %d\n", + // data[start:len(data)-b.Len()], tag, wire, v) + // case WireBytes: + // nb, err := DecodeVarint(b) + // if err != nil { + // fmt.Printf("decode error on bytes:", err) + // return + // } + // after_tag := len(data) - b.Len() + // str := make([]byte, nb) + // _, err = b.Read(str) + // if err != nil { + // fmt.Printf("decode error on bytes:", err) + // return + // } + // fmt.Printf("\t\t\"%x\" \"%x\" // field %d, encoding %d (FIELD)\n", + // data[start:after_tag], str, tag, wire) + // case WireStartGroup: + // nesting++ + // fmt.Printf("\t\t\"%x\"\t\t// start group field %d level %d\n", + // data[start:len(data)-b.Len()], tag, nesting) + // case WireEndGroup: + // fmt.Printf("\t\t\"%x\"\t\t// end group field %d level %d\n", + // data[start:len(data)-b.Len()], tag, nesting) + // nesting-- + // default: + // fmt.Printf("unrecognized wire type %d\n", wire) + // return + // } + // } +} + +func hex(c uint8) uint8 { + if '0' <= c && c <= '9' { + return c - '0' + } + if 'a' <= c && c <= 'f' { + return 10 + c - 'a' + } + if 'A' <= c && c <= 'F' { + return 10 + c - 'A' + } + return 0 +} + +func equal(b []byte, s string, t *testing.T) bool { + if 2*len(b) != len(s) { + // fail(fmt.Sprintf("wrong lengths: 2*%d != %d", len(b), len(s)), b, s, t) + fmt.Printf("wrong lengths: 2*%d != %d\n", len(b), len(s)) + return false + } + for i, j := 0, 0; i < len(b); i, j = i+1, j+2 { + x := hex(s[j])*16 + hex(s[j+1]) + if b[i] != x { + // fail(fmt.Sprintf("bad byte[%d]:%x %x", i, b[i], x), b, s, t) + fmt.Printf("bad byte[%d]:%x %x", i, b[i], x) + return false + } + } + return true +} + +func overify(t *testing.T, pb *GoTest, expected string) { + o := old() + err := o.Marshal(pb) + if err != nil { + fmt.Printf("overify marshal-1 err = %v", err) + o.DebugPrint("", o.Bytes()) + t.Fatalf("expected = %s", expected) + } + if !equal(o.Bytes(), expected, t) { + o.DebugPrint("overify neq 1", o.Bytes()) + t.Fatalf("expected = %s", expected) + } + + // Now test Unmarshal by recreating the original buffer. + pbd := new(GoTest) + err = o.Unmarshal(pbd) + if err != nil { + t.Fatalf("overify unmarshal err = %v", err) + o.DebugPrint("", o.Bytes()) + t.Fatalf("string = %s", expected) + } + o.Reset() + err = o.Marshal(pbd) + if err != nil { + t.Errorf("overify marshal-2 err = %v", err) + o.DebugPrint("", o.Bytes()) + t.Fatalf("string = %s", expected) + } + if !equal(o.Bytes(), expected, t) { + o.DebugPrint("overify neq 2", o.Bytes()) + t.Fatalf("string = %s", expected) + } +} + +// Simple tests for numeric encode/decode primitives (varint, etc.) +func TestNumericPrimitives(t *testing.T) { + for i := uint64(0); i < 1e6; i += 111 { + o := old() + if o.EncodeVarint(i) != nil { + t.Error("EncodeVarint") + break + } + x, e := o.DecodeVarint() + if e != nil { + t.Fatal("DecodeVarint") + } + if x != i { + t.Fatal("varint decode fail:", i, x) + } + + o = old() + if o.EncodeFixed32(i) != nil { + t.Fatal("encFixed32") + } + x, e = o.DecodeFixed32() + if e != nil { + t.Fatal("decFixed32") + } + if x != i { + t.Fatal("fixed32 decode fail:", i, x) + } + + o = old() + if o.EncodeFixed64(i*1234567) != nil { + t.Error("encFixed64") + break + } + x, e = o.DecodeFixed64() + if e != nil { + t.Error("decFixed64") + break + } + if x != i*1234567 { + t.Error("fixed64 decode fail:", i*1234567, x) + break + } + + o = old() + i32 := int32(i - 12345) + if o.EncodeZigzag32(uint64(i32)) != nil { + t.Fatal("EncodeZigzag32") + } + x, e = o.DecodeZigzag32() + if e != nil { + t.Fatal("DecodeZigzag32") + } + if x != uint64(uint32(i32)) { + t.Fatal("zigzag32 decode fail:", i32, x) + } + + o = old() + i64 := int64(i - 12345) + if o.EncodeZigzag64(uint64(i64)) != nil { + t.Fatal("EncodeZigzag64") + } + x, e = o.DecodeZigzag64() + if e != nil { + t.Fatal("DecodeZigzag64") + } + if x != uint64(i64) { + t.Fatal("zigzag64 decode fail:", i64, x) + } + } +} + +// fakeMarshaler is a simple struct implementing Marshaler and Message interfaces. +type fakeMarshaler struct { + b []byte + err error +} + +func (f *fakeMarshaler) Marshal() ([]byte, error) { return f.b, f.err } +func (f *fakeMarshaler) String() string { return fmt.Sprintf("Bytes: %v Error: %v", f.b, f.err) } +func (f *fakeMarshaler) ProtoMessage() {} +func (f *fakeMarshaler) Reset() {} + +type msgWithFakeMarshaler struct { + M *fakeMarshaler `protobuf:"bytes,1,opt,name=fake"` +} + +func (m *msgWithFakeMarshaler) String() string { return CompactTextString(m) } +func (m *msgWithFakeMarshaler) ProtoMessage() {} +func (m *msgWithFakeMarshaler) Reset() {} + +// Simple tests for proto messages that implement the Marshaler interface. +func TestMarshalerEncoding(t *testing.T) { + tests := []struct { + name string + m Message + want []byte + wantErr error + }{ + { + name: "Marshaler that fails", + m: &fakeMarshaler{ + err: errors.New("some marshal err"), + b: []byte{5, 6, 7}, + }, + // Since there's an error, nothing should be written to buffer. + want: nil, + wantErr: errors.New("some marshal err"), + }, + { + name: "Marshaler that fails with RequiredNotSetError", + m: &msgWithFakeMarshaler{ + M: &fakeMarshaler{ + err: &RequiredNotSetError{}, + b: []byte{5, 6, 7}, + }, + }, + // Since there's an error that can be continued after, + // the buffer should be written. + want: []byte{ + 10, 3, // for &msgWithFakeMarshaler + 5, 6, 7, // for &fakeMarshaler + }, + wantErr: &RequiredNotSetError{}, + }, + { + name: "Marshaler that succeeds", + m: &fakeMarshaler{ + b: []byte{0, 1, 2, 3, 4, 127, 255}, + }, + want: []byte{0, 1, 2, 3, 4, 127, 255}, + wantErr: nil, + }, + } + for _, test := range tests { + b := NewBuffer(nil) + err := b.Marshal(test.m) + if _, ok := err.(*RequiredNotSetError); ok { + // We're not in package proto, so we can only assert the type in this case. + err = &RequiredNotSetError{} + } + if !reflect.DeepEqual(test.wantErr, err) { + t.Errorf("%s: got err %v wanted %v", test.name, err, test.wantErr) + } + if !reflect.DeepEqual(test.want, b.Bytes()) { + t.Errorf("%s: got bytes %v wanted %v", test.name, b.Bytes(), test.want) + } + } +} + +// Simple tests for bytes +func TestBytesPrimitives(t *testing.T) { + o := old() + bytes := []byte{'n', 'o', 'w', ' ', 'i', 's', ' ', 't', 'h', 'e', ' ', 't', 'i', 'm', 'e'} + if o.EncodeRawBytes(bytes) != nil { + t.Error("EncodeRawBytes") + } + decb, e := o.DecodeRawBytes(false) + if e != nil { + t.Error("DecodeRawBytes") + } + equalbytes(bytes, decb, t) +} + +// Simple tests for strings +func TestStringPrimitives(t *testing.T) { + o := old() + s := "now is the time" + if o.EncodeStringBytes(s) != nil { + t.Error("enc_string") + } + decs, e := o.DecodeStringBytes() + if e != nil { + t.Error("dec_string") + } + if s != decs { + t.Error("string encode/decode fail:", s, decs) + } +} + +// Do we catch the "required bit not set" case? +func TestRequiredBit(t *testing.T) { + o := old() + pb := new(GoTest) + err := o.Marshal(pb) + if err == nil { + t.Error("did not catch missing required fields") + } else if strings.Index(err.Error(), "Kind") < 0 { + t.Error("wrong error type:", err) + } +} + +// Check that all fields are nil. +// Clearly silly, and a residue from a more interesting test with an earlier, +// different initialization property, but it once caught a compiler bug so +// it lives. +func checkInitialized(pb *GoTest, t *testing.T) { + if pb.F_BoolDefaulted != nil { + t.Error("New or Reset did not set boolean:", *pb.F_BoolDefaulted) + } + if pb.F_Int32Defaulted != nil { + t.Error("New or Reset did not set int32:", *pb.F_Int32Defaulted) + } + if pb.F_Int64Defaulted != nil { + t.Error("New or Reset did not set int64:", *pb.F_Int64Defaulted) + } + if pb.F_Fixed32Defaulted != nil { + t.Error("New or Reset did not set fixed32:", *pb.F_Fixed32Defaulted) + } + if pb.F_Fixed64Defaulted != nil { + t.Error("New or Reset did not set fixed64:", *pb.F_Fixed64Defaulted) + } + if pb.F_Uint32Defaulted != nil { + t.Error("New or Reset did not set uint32:", *pb.F_Uint32Defaulted) + } + if pb.F_Uint64Defaulted != nil { + t.Error("New or Reset did not set uint64:", *pb.F_Uint64Defaulted) + } + if pb.F_FloatDefaulted != nil { + t.Error("New or Reset did not set float:", *pb.F_FloatDefaulted) + } + if pb.F_DoubleDefaulted != nil { + t.Error("New or Reset did not set double:", *pb.F_DoubleDefaulted) + } + if pb.F_StringDefaulted != nil { + t.Error("New or Reset did not set string:", *pb.F_StringDefaulted) + } + if pb.F_BytesDefaulted != nil { + t.Error("New or Reset did not set bytes:", string(pb.F_BytesDefaulted)) + } + if pb.F_Sint32Defaulted != nil { + t.Error("New or Reset did not set int32:", *pb.F_Sint32Defaulted) + } + if pb.F_Sint64Defaulted != nil { + t.Error("New or Reset did not set int64:", *pb.F_Sint64Defaulted) + } +} + +// Does Reset() reset? +func TestReset(t *testing.T) { + pb := initGoTest(true) + // muck with some values + pb.F_BoolDefaulted = Bool(false) + pb.F_Int32Defaulted = Int32(237) + pb.F_Int64Defaulted = Int64(12346) + pb.F_Fixed32Defaulted = Uint32(32000) + pb.F_Fixed64Defaulted = Uint64(666) + pb.F_Uint32Defaulted = Uint32(323232) + pb.F_Uint64Defaulted = nil + pb.F_FloatDefaulted = nil + pb.F_DoubleDefaulted = Float64(0) + pb.F_StringDefaulted = String("gotcha") + pb.F_BytesDefaulted = []byte("asdfasdf") + pb.F_Sint32Defaulted = Int32(123) + pb.F_Sint64Defaulted = Int64(789) + pb.Reset() + checkInitialized(pb, t) +} + +// All required fields set, no defaults provided. +func TestEncodeDecode1(t *testing.T) { + pb := initGoTest(false) + overify(t, pb, + "0807"+ // field 1, encoding 0, value 7 + "220d"+"0a056c6162656c120474797065"+ // field 4, encoding 2 (GoTestField) + "5001"+ // field 10, encoding 0, value 1 + "5803"+ // field 11, encoding 0, value 3 + "6006"+ // field 12, encoding 0, value 6 + "6d20000000"+ // field 13, encoding 5, value 0x20 + "714000000000000000"+ // field 14, encoding 1, value 0x40 + "78a019"+ // field 15, encoding 0, value 0xca0 = 3232 + "8001c032"+ // field 16, encoding 0, value 0x1940 = 6464 + "8d0100004a45"+ // field 17, encoding 5, value 3232.0 + "9101000000000040b940"+ // field 18, encoding 1, value 6464.0 + "9a0106"+"737472696e67"+ // field 19, encoding 2, string "string" + "b304"+ // field 70, encoding 3, start group + "ba0408"+"7265717569726564"+ // field 71, encoding 2, string "required" + "b404"+ // field 70, encoding 4, end group + "aa0605"+"6279746573"+ // field 101, encoding 2, string "bytes" + "b0063f"+ // field 102, encoding 0, 0x3f zigzag32 + "b8067f") // field 103, encoding 0, 0x7f zigzag64 +} + +// All required fields set, defaults provided. +func TestEncodeDecode2(t *testing.T) { + pb := initGoTest(true) + overify(t, pb, + "0807"+ // field 1, encoding 0, value 7 + "220d"+"0a056c6162656c120474797065"+ // field 4, encoding 2 (GoTestField) + "5001"+ // field 10, encoding 0, value 1 + "5803"+ // field 11, encoding 0, value 3 + "6006"+ // field 12, encoding 0, value 6 + "6d20000000"+ // field 13, encoding 5, value 32 + "714000000000000000"+ // field 14, encoding 1, value 64 + "78a019"+ // field 15, encoding 0, value 3232 + "8001c032"+ // field 16, encoding 0, value 6464 + "8d0100004a45"+ // field 17, encoding 5, value 3232.0 + "9101000000000040b940"+ // field 18, encoding 1, value 6464.0 + "9a0106"+"737472696e67"+ // field 19, encoding 2 string "string" + "c00201"+ // field 40, encoding 0, value 1 + "c80220"+ // field 41, encoding 0, value 32 + "d00240"+ // field 42, encoding 0, value 64 + "dd0240010000"+ // field 43, encoding 5, value 320 + "e1028002000000000000"+ // field 44, encoding 1, value 640 + "e8028019"+ // field 45, encoding 0, value 3200 + "f0028032"+ // field 46, encoding 0, value 6400 + "fd02e0659948"+ // field 47, encoding 5, value 314159.0 + "81030000000050971041"+ // field 48, encoding 1, value 271828.0 + "8a0310"+"68656c6c6f2c2022776f726c6421220a"+ // field 49, encoding 2 string "hello, \"world!\"\n" + "b304"+ // start group field 70 level 1 + "ba0408"+"7265717569726564"+ // field 71, encoding 2, string "required" + "b404"+ // end group field 70 level 1 + "aa0605"+"6279746573"+ // field 101, encoding 2 string "bytes" + "b0063f"+ // field 102, encoding 0, 0x3f zigzag32 + "b8067f"+ // field 103, encoding 0, 0x7f zigzag64 + "8a1907"+"4269676e6f7365"+ // field 401, encoding 2, string "Bignose" + "90193f"+ // field 402, encoding 0, value 63 + "98197f") // field 403, encoding 0, value 127 + +} + +// All default fields set to their default value by hand +func TestEncodeDecode3(t *testing.T) { + pb := initGoTest(false) + pb.F_BoolDefaulted = Bool(true) + pb.F_Int32Defaulted = Int32(32) + pb.F_Int64Defaulted = Int64(64) + pb.F_Fixed32Defaulted = Uint32(320) + pb.F_Fixed64Defaulted = Uint64(640) + pb.F_Uint32Defaulted = Uint32(3200) + pb.F_Uint64Defaulted = Uint64(6400) + pb.F_FloatDefaulted = Float32(314159) + pb.F_DoubleDefaulted = Float64(271828) + pb.F_StringDefaulted = String("hello, \"world!\"\n") + pb.F_BytesDefaulted = []byte("Bignose") + pb.F_Sint32Defaulted = Int32(-32) + pb.F_Sint64Defaulted = Int64(-64) + + overify(t, pb, + "0807"+ // field 1, encoding 0, value 7 + "220d"+"0a056c6162656c120474797065"+ // field 4, encoding 2 (GoTestField) + "5001"+ // field 10, encoding 0, value 1 + "5803"+ // field 11, encoding 0, value 3 + "6006"+ // field 12, encoding 0, value 6 + "6d20000000"+ // field 13, encoding 5, value 32 + "714000000000000000"+ // field 14, encoding 1, value 64 + "78a019"+ // field 15, encoding 0, value 3232 + "8001c032"+ // field 16, encoding 0, value 6464 + "8d0100004a45"+ // field 17, encoding 5, value 3232.0 + "9101000000000040b940"+ // field 18, encoding 1, value 6464.0 + "9a0106"+"737472696e67"+ // field 19, encoding 2 string "string" + "c00201"+ // field 40, encoding 0, value 1 + "c80220"+ // field 41, encoding 0, value 32 + "d00240"+ // field 42, encoding 0, value 64 + "dd0240010000"+ // field 43, encoding 5, value 320 + "e1028002000000000000"+ // field 44, encoding 1, value 640 + "e8028019"+ // field 45, encoding 0, value 3200 + "f0028032"+ // field 46, encoding 0, value 6400 + "fd02e0659948"+ // field 47, encoding 5, value 314159.0 + "81030000000050971041"+ // field 48, encoding 1, value 271828.0 + "8a0310"+"68656c6c6f2c2022776f726c6421220a"+ // field 49, encoding 2 string "hello, \"world!\"\n" + "b304"+ // start group field 70 level 1 + "ba0408"+"7265717569726564"+ // field 71, encoding 2, string "required" + "b404"+ // end group field 70 level 1 + "aa0605"+"6279746573"+ // field 101, encoding 2 string "bytes" + "b0063f"+ // field 102, encoding 0, 0x3f zigzag32 + "b8067f"+ // field 103, encoding 0, 0x7f zigzag64 + "8a1907"+"4269676e6f7365"+ // field 401, encoding 2, string "Bignose" + "90193f"+ // field 402, encoding 0, value 63 + "98197f") // field 403, encoding 0, value 127 + +} + +// All required fields set, defaults provided, all non-defaulted optional fields have values. +func TestEncodeDecode4(t *testing.T) { + pb := initGoTest(true) + pb.Table = String("hello") + pb.Param = Int32(7) + pb.OptionalField = initGoTestField() + pb.F_BoolOptional = Bool(true) + pb.F_Int32Optional = Int32(32) + pb.F_Int64Optional = Int64(64) + pb.F_Fixed32Optional = Uint32(3232) + pb.F_Fixed64Optional = Uint64(6464) + pb.F_Uint32Optional = Uint32(323232) + pb.F_Uint64Optional = Uint64(646464) + pb.F_FloatOptional = Float32(32.) + pb.F_DoubleOptional = Float64(64.) + pb.F_StringOptional = String("hello") + pb.F_BytesOptional = []byte("Bignose") + pb.F_Sint32Optional = Int32(-32) + pb.F_Sint64Optional = Int64(-64) + pb.Optionalgroup = initGoTest_OptionalGroup() + + overify(t, pb, + "0807"+ // field 1, encoding 0, value 7 + "1205"+"68656c6c6f"+ // field 2, encoding 2, string "hello" + "1807"+ // field 3, encoding 0, value 7 + "220d"+"0a056c6162656c120474797065"+ // field 4, encoding 2 (GoTestField) + "320d"+"0a056c6162656c120474797065"+ // field 6, encoding 2 (GoTestField) + "5001"+ // field 10, encoding 0, value 1 + "5803"+ // field 11, encoding 0, value 3 + "6006"+ // field 12, encoding 0, value 6 + "6d20000000"+ // field 13, encoding 5, value 32 + "714000000000000000"+ // field 14, encoding 1, value 64 + "78a019"+ // field 15, encoding 0, value 3232 + "8001c032"+ // field 16, encoding 0, value 6464 + "8d0100004a45"+ // field 17, encoding 5, value 3232.0 + "9101000000000040b940"+ // field 18, encoding 1, value 6464.0 + "9a0106"+"737472696e67"+ // field 19, encoding 2 string "string" + "f00101"+ // field 30, encoding 0, value 1 + "f80120"+ // field 31, encoding 0, value 32 + "800240"+ // field 32, encoding 0, value 64 + "8d02a00c0000"+ // field 33, encoding 5, value 3232 + "91024019000000000000"+ // field 34, encoding 1, value 6464 + "9802a0dd13"+ // field 35, encoding 0, value 323232 + "a002c0ba27"+ // field 36, encoding 0, value 646464 + "ad0200000042"+ // field 37, encoding 5, value 32.0 + "b1020000000000005040"+ // field 38, encoding 1, value 64.0 + "ba0205"+"68656c6c6f"+ // field 39, encoding 2, string "hello" + "c00201"+ // field 40, encoding 0, value 1 + "c80220"+ // field 41, encoding 0, value 32 + "d00240"+ // field 42, encoding 0, value 64 + "dd0240010000"+ // field 43, encoding 5, value 320 + "e1028002000000000000"+ // field 44, encoding 1, value 640 + "e8028019"+ // field 45, encoding 0, value 3200 + "f0028032"+ // field 46, encoding 0, value 6400 + "fd02e0659948"+ // field 47, encoding 5, value 314159.0 + "81030000000050971041"+ // field 48, encoding 1, value 271828.0 + "8a0310"+"68656c6c6f2c2022776f726c6421220a"+ // field 49, encoding 2 string "hello, \"world!\"\n" + "b304"+ // start group field 70 level 1 + "ba0408"+"7265717569726564"+ // field 71, encoding 2, string "required" + "b404"+ // end group field 70 level 1 + "d305"+ // start group field 90 level 1 + "da0508"+"6f7074696f6e616c"+ // field 91, encoding 2, string "optional" + "d405"+ // end group field 90 level 1 + "aa0605"+"6279746573"+ // field 101, encoding 2 string "bytes" + "b0063f"+ // field 102, encoding 0, 0x3f zigzag32 + "b8067f"+ // field 103, encoding 0, 0x7f zigzag64 + "ea1207"+"4269676e6f7365"+ // field 301, encoding 2, string "Bignose" + "f0123f"+ // field 302, encoding 0, value 63 + "f8127f"+ // field 303, encoding 0, value 127 + "8a1907"+"4269676e6f7365"+ // field 401, encoding 2, string "Bignose" + "90193f"+ // field 402, encoding 0, value 63 + "98197f") // field 403, encoding 0, value 127 + +} + +// All required fields set, defaults provided, all repeated fields given two values. +func TestEncodeDecode5(t *testing.T) { + pb := initGoTest(true) + pb.RepeatedField = []*GoTestField{initGoTestField(), initGoTestField()} + pb.F_BoolRepeated = []bool{false, true} + pb.F_Int32Repeated = []int32{32, 33} + pb.F_Int64Repeated = []int64{64, 65} + pb.F_Fixed32Repeated = []uint32{3232, 3333} + pb.F_Fixed64Repeated = []uint64{6464, 6565} + pb.F_Uint32Repeated = []uint32{323232, 333333} + pb.F_Uint64Repeated = []uint64{646464, 656565} + pb.F_FloatRepeated = []float32{32., 33.} + pb.F_DoubleRepeated = []float64{64., 65.} + pb.F_StringRepeated = []string{"hello", "sailor"} + pb.F_BytesRepeated = [][]byte{[]byte("big"), []byte("nose")} + pb.F_Sint32Repeated = []int32{32, -32} + pb.F_Sint64Repeated = []int64{64, -64} + pb.Repeatedgroup = []*GoTest_RepeatedGroup{initGoTest_RepeatedGroup(), initGoTest_RepeatedGroup()} + + overify(t, pb, + "0807"+ // field 1, encoding 0, value 7 + "220d"+"0a056c6162656c120474797065"+ // field 4, encoding 2 (GoTestField) + "2a0d"+"0a056c6162656c120474797065"+ // field 5, encoding 2 (GoTestField) + "2a0d"+"0a056c6162656c120474797065"+ // field 5, encoding 2 (GoTestField) + "5001"+ // field 10, encoding 0, value 1 + "5803"+ // field 11, encoding 0, value 3 + "6006"+ // field 12, encoding 0, value 6 + "6d20000000"+ // field 13, encoding 5, value 32 + "714000000000000000"+ // field 14, encoding 1, value 64 + "78a019"+ // field 15, encoding 0, value 3232 + "8001c032"+ // field 16, encoding 0, value 6464 + "8d0100004a45"+ // field 17, encoding 5, value 3232.0 + "9101000000000040b940"+ // field 18, encoding 1, value 6464.0 + "9a0106"+"737472696e67"+ // field 19, encoding 2 string "string" + "a00100"+ // field 20, encoding 0, value 0 + "a00101"+ // field 20, encoding 0, value 1 + "a80120"+ // field 21, encoding 0, value 32 + "a80121"+ // field 21, encoding 0, value 33 + "b00140"+ // field 22, encoding 0, value 64 + "b00141"+ // field 22, encoding 0, value 65 + "bd01a00c0000"+ // field 23, encoding 5, value 3232 + "bd01050d0000"+ // field 23, encoding 5, value 3333 + "c1014019000000000000"+ // field 24, encoding 1, value 6464 + "c101a519000000000000"+ // field 24, encoding 1, value 6565 + "c801a0dd13"+ // field 25, encoding 0, value 323232 + "c80195ac14"+ // field 25, encoding 0, value 333333 + "d001c0ba27"+ // field 26, encoding 0, value 646464 + "d001b58928"+ // field 26, encoding 0, value 656565 + "dd0100000042"+ // field 27, encoding 5, value 32.0 + "dd0100000442"+ // field 27, encoding 5, value 33.0 + "e1010000000000005040"+ // field 28, encoding 1, value 64.0 + "e1010000000000405040"+ // field 28, encoding 1, value 65.0 + "ea0105"+"68656c6c6f"+ // field 29, encoding 2, string "hello" + "ea0106"+"7361696c6f72"+ // field 29, encoding 2, string "sailor" + "c00201"+ // field 40, encoding 0, value 1 + "c80220"+ // field 41, encoding 0, value 32 + "d00240"+ // field 42, encoding 0, value 64 + "dd0240010000"+ // field 43, encoding 5, value 320 + "e1028002000000000000"+ // field 44, encoding 1, value 640 + "e8028019"+ // field 45, encoding 0, value 3200 + "f0028032"+ // field 46, encoding 0, value 6400 + "fd02e0659948"+ // field 47, encoding 5, value 314159.0 + "81030000000050971041"+ // field 48, encoding 1, value 271828.0 + "8a0310"+"68656c6c6f2c2022776f726c6421220a"+ // field 49, encoding 2 string "hello, \"world!\"\n" + "b304"+ // start group field 70 level 1 + "ba0408"+"7265717569726564"+ // field 71, encoding 2, string "required" + "b404"+ // end group field 70 level 1 + "8305"+ // start group field 80 level 1 + "8a0508"+"7265706561746564"+ // field 81, encoding 2, string "repeated" + "8405"+ // end group field 80 level 1 + "8305"+ // start group field 80 level 1 + "8a0508"+"7265706561746564"+ // field 81, encoding 2, string "repeated" + "8405"+ // end group field 80 level 1 + "aa0605"+"6279746573"+ // field 101, encoding 2 string "bytes" + "b0063f"+ // field 102, encoding 0, 0x3f zigzag32 + "b8067f"+ // field 103, encoding 0, 0x7f zigzag64 + "ca0c03"+"626967"+ // field 201, encoding 2, string "big" + "ca0c04"+"6e6f7365"+ // field 201, encoding 2, string "nose" + "d00c40"+ // field 202, encoding 0, value 32 + "d00c3f"+ // field 202, encoding 0, value -32 + "d80c8001"+ // field 203, encoding 0, value 64 + "d80c7f"+ // field 203, encoding 0, value -64 + "8a1907"+"4269676e6f7365"+ // field 401, encoding 2, string "Bignose" + "90193f"+ // field 402, encoding 0, value 63 + "98197f") // field 403, encoding 0, value 127 + +} + +// All required fields set, all packed repeated fields given two values. +func TestEncodeDecode6(t *testing.T) { + pb := initGoTest(false) + pb.F_BoolRepeatedPacked = []bool{false, true} + pb.F_Int32RepeatedPacked = []int32{32, 33} + pb.F_Int64RepeatedPacked = []int64{64, 65} + pb.F_Fixed32RepeatedPacked = []uint32{3232, 3333} + pb.F_Fixed64RepeatedPacked = []uint64{6464, 6565} + pb.F_Uint32RepeatedPacked = []uint32{323232, 333333} + pb.F_Uint64RepeatedPacked = []uint64{646464, 656565} + pb.F_FloatRepeatedPacked = []float32{32., 33.} + pb.F_DoubleRepeatedPacked = []float64{64., 65.} + pb.F_Sint32RepeatedPacked = []int32{32, -32} + pb.F_Sint64RepeatedPacked = []int64{64, -64} + + overify(t, pb, + "0807"+ // field 1, encoding 0, value 7 + "220d"+"0a056c6162656c120474797065"+ // field 4, encoding 2 (GoTestField) + "5001"+ // field 10, encoding 0, value 1 + "5803"+ // field 11, encoding 0, value 3 + "6006"+ // field 12, encoding 0, value 6 + "6d20000000"+ // field 13, encoding 5, value 32 + "714000000000000000"+ // field 14, encoding 1, value 64 + "78a019"+ // field 15, encoding 0, value 3232 + "8001c032"+ // field 16, encoding 0, value 6464 + "8d0100004a45"+ // field 17, encoding 5, value 3232.0 + "9101000000000040b940"+ // field 18, encoding 1, value 6464.0 + "9a0106"+"737472696e67"+ // field 19, encoding 2 string "string" + "9203020001"+ // field 50, encoding 2, 2 bytes, value 0, value 1 + "9a03022021"+ // field 51, encoding 2, 2 bytes, value 32, value 33 + "a203024041"+ // field 52, encoding 2, 2 bytes, value 64, value 65 + "aa0308"+ // field 53, encoding 2, 8 bytes + "a00c0000050d0000"+ // value 3232, value 3333 + "b20310"+ // field 54, encoding 2, 16 bytes + "4019000000000000a519000000000000"+ // value 6464, value 6565 + "ba0306"+ // field 55, encoding 2, 6 bytes + "a0dd1395ac14"+ // value 323232, value 333333 + "c20306"+ // field 56, encoding 2, 6 bytes + "c0ba27b58928"+ // value 646464, value 656565 + "ca0308"+ // field 57, encoding 2, 8 bytes + "0000004200000442"+ // value 32.0, value 33.0 + "d20310"+ // field 58, encoding 2, 16 bytes + "00000000000050400000000000405040"+ // value 64.0, value 65.0 + "b304"+ // start group field 70 level 1 + "ba0408"+"7265717569726564"+ // field 71, encoding 2, string "required" + "b404"+ // end group field 70 level 1 + "aa0605"+"6279746573"+ // field 101, encoding 2 string "bytes" + "b0063f"+ // field 102, encoding 0, 0x3f zigzag32 + "b8067f"+ // field 103, encoding 0, 0x7f zigzag64 + "b21f02"+ // field 502, encoding 2, 2 bytes + "403f"+ // value 32, value -32 + "ba1f03"+ // field 503, encoding 2, 3 bytes + "80017f") // value 64, value -64 +} + +// Test that we can encode empty bytes fields. +func TestEncodeDecodeBytes1(t *testing.T) { + pb := initGoTest(false) + + // Create our bytes + pb.F_BytesRequired = []byte{} + pb.F_BytesRepeated = [][]byte{{}} + pb.F_BytesOptional = []byte{} + + d, err := Marshal(pb) + if err != nil { + t.Error(err) + } + + pbd := new(GoTest) + if err := Unmarshal(d, pbd); err != nil { + t.Error(err) + } + + if pbd.F_BytesRequired == nil || len(pbd.F_BytesRequired) != 0 { + t.Error("required empty bytes field is incorrect") + } + if pbd.F_BytesRepeated == nil || len(pbd.F_BytesRepeated) == 1 && pbd.F_BytesRepeated[0] == nil { + t.Error("repeated empty bytes field is incorrect") + } + if pbd.F_BytesOptional == nil || len(pbd.F_BytesOptional) != 0 { + t.Error("optional empty bytes field is incorrect") + } +} + +// Test that we encode nil-valued fields of a repeated bytes field correctly. +// Since entries in a repeated field cannot be nil, nil must mean empty value. +func TestEncodeDecodeBytes2(t *testing.T) { + pb := initGoTest(false) + + // Create our bytes + pb.F_BytesRepeated = [][]byte{nil} + + d, err := Marshal(pb) + if err != nil { + t.Error(err) + } + + pbd := new(GoTest) + if err := Unmarshal(d, pbd); err != nil { + t.Error(err) + } + + if len(pbd.F_BytesRepeated) != 1 || pbd.F_BytesRepeated[0] == nil { + t.Error("Unexpected value for repeated bytes field") + } +} + +// All required fields set, defaults provided, all repeated fields given two values. +func TestSkippingUnrecognizedFields(t *testing.T) { + o := old() + pb := initGoTestField() + + // Marshal it normally. + o.Marshal(pb) + + // Now new a GoSkipTest record. + skip := &GoSkipTest{ + SkipInt32: Int32(32), + SkipFixed32: Uint32(3232), + SkipFixed64: Uint64(6464), + SkipString: String("skipper"), + Skipgroup: &GoSkipTest_SkipGroup{ + GroupInt32: Int32(75), + GroupString: String("wxyz"), + }, + } + + // Marshal it into same buffer. + o.Marshal(skip) + + pbd := new(GoTestField) + o.Unmarshal(pbd) + + // The __unrecognized field should be a marshaling of GoSkipTest + skipd := new(GoSkipTest) + + o.SetBuf(pbd.XXX_unrecognized) + o.Unmarshal(skipd) + + if *skipd.SkipInt32 != *skip.SkipInt32 { + t.Error("skip int32", skipd.SkipInt32) + } + if *skipd.SkipFixed32 != *skip.SkipFixed32 { + t.Error("skip fixed32", skipd.SkipFixed32) + } + if *skipd.SkipFixed64 != *skip.SkipFixed64 { + t.Error("skip fixed64", skipd.SkipFixed64) + } + if *skipd.SkipString != *skip.SkipString { + t.Error("skip string", *skipd.SkipString) + } + if *skipd.Skipgroup.GroupInt32 != *skip.Skipgroup.GroupInt32 { + t.Error("skip group int32", skipd.Skipgroup.GroupInt32) + } + if *skipd.Skipgroup.GroupString != *skip.Skipgroup.GroupString { + t.Error("skip group string", *skipd.Skipgroup.GroupString) + } +} + +// Check that unrecognized fields of a submessage are preserved. +func TestSubmessageUnrecognizedFields(t *testing.T) { + nm := &NewMessage{ + Nested: &NewMessage_Nested{ + Name: String("Nigel"), + FoodGroup: String("carbs"), + }, + } + b, err := Marshal(nm) + if err != nil { + t.Fatalf("Marshal of NewMessage: %v", err) + } + + // Unmarshal into an OldMessage. + om := new(OldMessage) + if err := Unmarshal(b, om); err != nil { + t.Fatalf("Unmarshal to OldMessage: %v", err) + } + exp := &OldMessage{ + Nested: &OldMessage_Nested{ + Name: String("Nigel"), + // normal protocol buffer users should not do this + XXX_unrecognized: []byte("\x12\x05carbs"), + }, + } + if !Equal(om, exp) { + t.Errorf("om = %v, want %v", om, exp) + } + + // Clone the OldMessage. + om = Clone(om).(*OldMessage) + if !Equal(om, exp) { + t.Errorf("Clone(om) = %v, want %v", om, exp) + } + + // Marshal the OldMessage, then unmarshal it into an empty NewMessage. + if b, err = Marshal(om); err != nil { + t.Fatalf("Marshal of OldMessage: %v", err) + } + t.Logf("Marshal(%v) -> %q", om, b) + nm2 := new(NewMessage) + if err := Unmarshal(b, nm2); err != nil { + t.Fatalf("Unmarshal to NewMessage: %v", err) + } + if !Equal(nm, nm2) { + t.Errorf("NewMessage round-trip: %v => %v", nm, nm2) + } +} + +// Check that an int32 field can be upgraded to an int64 field. +func TestNegativeInt32(t *testing.T) { + om := &OldMessage{ + Num: Int32(-1), + } + b, err := Marshal(om) + if err != nil { + t.Fatalf("Marshal of OldMessage: %v", err) + } + + // Check the size. It should be 11 bytes; + // 1 for the field/wire type, and 10 for the negative number. + if len(b) != 11 { + t.Errorf("%v marshaled as %q, wanted 11 bytes", om, b) + } + + // Unmarshal into a NewMessage. + nm := new(NewMessage) + if err := Unmarshal(b, nm); err != nil { + t.Fatalf("Unmarshal to NewMessage: %v", err) + } + want := &NewMessage{ + Num: Int64(-1), + } + if !Equal(nm, want) { + t.Errorf("nm = %v, want %v", nm, want) + } +} + +// Check that we can grow an array (repeated field) to have many elements. +// This test doesn't depend only on our encoding; for variety, it makes sure +// we create, encode, and decode the correct contents explicitly. It's therefore +// a bit messier. +// This test also uses (and hence tests) the Marshal/Unmarshal functions +// instead of the methods. +func TestBigRepeated(t *testing.T) { + pb := initGoTest(true) + + // Create the arrays + const N = 50 // Internally the library starts much smaller. + pb.Repeatedgroup = make([]*GoTest_RepeatedGroup, N) + pb.F_Sint64Repeated = make([]int64, N) + pb.F_Sint32Repeated = make([]int32, N) + pb.F_BytesRepeated = make([][]byte, N) + pb.F_StringRepeated = make([]string, N) + pb.F_DoubleRepeated = make([]float64, N) + pb.F_FloatRepeated = make([]float32, N) + pb.F_Uint64Repeated = make([]uint64, N) + pb.F_Uint32Repeated = make([]uint32, N) + pb.F_Fixed64Repeated = make([]uint64, N) + pb.F_Fixed32Repeated = make([]uint32, N) + pb.F_Int64Repeated = make([]int64, N) + pb.F_Int32Repeated = make([]int32, N) + pb.F_BoolRepeated = make([]bool, N) + pb.RepeatedField = make([]*GoTestField, N) + + // Fill in the arrays with checkable values. + igtf := initGoTestField() + igtrg := initGoTest_RepeatedGroup() + for i := 0; i < N; i++ { + pb.Repeatedgroup[i] = igtrg + pb.F_Sint64Repeated[i] = int64(i) + pb.F_Sint32Repeated[i] = int32(i) + s := fmt.Sprint(i) + pb.F_BytesRepeated[i] = []byte(s) + pb.F_StringRepeated[i] = s + pb.F_DoubleRepeated[i] = float64(i) + pb.F_FloatRepeated[i] = float32(i) + pb.F_Uint64Repeated[i] = uint64(i) + pb.F_Uint32Repeated[i] = uint32(i) + pb.F_Fixed64Repeated[i] = uint64(i) + pb.F_Fixed32Repeated[i] = uint32(i) + pb.F_Int64Repeated[i] = int64(i) + pb.F_Int32Repeated[i] = int32(i) + pb.F_BoolRepeated[i] = i%2 == 0 + pb.RepeatedField[i] = igtf + } + + // Marshal. + buf, _ := Marshal(pb) + + // Now test Unmarshal by recreating the original buffer. + pbd := new(GoTest) + Unmarshal(buf, pbd) + + // Check the checkable values + for i := uint64(0); i < N; i++ { + if pbd.Repeatedgroup[i] == nil { // TODO: more checking? + t.Error("pbd.Repeatedgroup bad") + } + var x uint64 + x = uint64(pbd.F_Sint64Repeated[i]) + if x != i { + t.Error("pbd.F_Sint64Repeated bad", x, i) + } + x = uint64(pbd.F_Sint32Repeated[i]) + if x != i { + t.Error("pbd.F_Sint32Repeated bad", x, i) + } + s := fmt.Sprint(i) + equalbytes(pbd.F_BytesRepeated[i], []byte(s), t) + if pbd.F_StringRepeated[i] != s { + t.Error("pbd.F_Sint32Repeated bad", pbd.F_StringRepeated[i], i) + } + x = uint64(pbd.F_DoubleRepeated[i]) + if x != i { + t.Error("pbd.F_DoubleRepeated bad", x, i) + } + x = uint64(pbd.F_FloatRepeated[i]) + if x != i { + t.Error("pbd.F_FloatRepeated bad", x, i) + } + x = pbd.F_Uint64Repeated[i] + if x != i { + t.Error("pbd.F_Uint64Repeated bad", x, i) + } + x = uint64(pbd.F_Uint32Repeated[i]) + if x != i { + t.Error("pbd.F_Uint32Repeated bad", x, i) + } + x = pbd.F_Fixed64Repeated[i] + if x != i { + t.Error("pbd.F_Fixed64Repeated bad", x, i) + } + x = uint64(pbd.F_Fixed32Repeated[i]) + if x != i { + t.Error("pbd.F_Fixed32Repeated bad", x, i) + } + x = uint64(pbd.F_Int64Repeated[i]) + if x != i { + t.Error("pbd.F_Int64Repeated bad", x, i) + } + x = uint64(pbd.F_Int32Repeated[i]) + if x != i { + t.Error("pbd.F_Int32Repeated bad", x, i) + } + if pbd.F_BoolRepeated[i] != (i%2 == 0) { + t.Error("pbd.F_BoolRepeated bad", x, i) + } + if pbd.RepeatedField[i] == nil { // TODO: more checking? + t.Error("pbd.RepeatedField bad") + } + } +} + +// Verify we give a useful message when decoding to the wrong structure type. +func TestTypeMismatch(t *testing.T) { + pb1 := initGoTest(true) + + // Marshal + o := old() + o.Marshal(pb1) + + // Now Unmarshal it to the wrong type. + pb2 := initGoTestField() + err := o.Unmarshal(pb2) + if err == nil { + t.Error("expected error, got no error") + } else if !strings.Contains(err.Error(), "bad wiretype") { + t.Error("expected bad wiretype error, got", err) + } +} + +func encodeDecode(t *testing.T, in, out Message, msg string) { + buf, err := Marshal(in) + if err != nil { + t.Fatalf("failed marshaling %v: %v", msg, err) + } + if err := Unmarshal(buf, out); err != nil { + t.Fatalf("failed unmarshaling %v: %v", msg, err) + } +} + +func TestPackedNonPackedDecoderSwitching(t *testing.T) { + np, p := new(NonPackedTest), new(PackedTest) + + // non-packed -> packed + np.A = []int32{0, 1, 1, 2, 3, 5} + encodeDecode(t, np, p, "non-packed -> packed") + if !reflect.DeepEqual(np.A, p.B) { + t.Errorf("failed non-packed -> packed; np.A=%+v, p.B=%+v", np.A, p.B) + } + + // packed -> non-packed + np.Reset() + p.B = []int32{3, 1, 4, 1, 5, 9} + encodeDecode(t, p, np, "packed -> non-packed") + if !reflect.DeepEqual(p.B, np.A) { + t.Errorf("failed packed -> non-packed; p.B=%+v, np.A=%+v", p.B, np.A) + } +} + +func TestProto1RepeatedGroup(t *testing.T) { + pb := &MessageList{ + Message: []*MessageList_Message{ + { + Name: String("blah"), + Count: Int32(7), + }, + // NOTE: pb.Message[1] is a nil + nil, + }, + } + + o := old() + err := o.Marshal(pb) + if err == nil || !strings.Contains(err.Error(), "repeated field Message has nil") { + t.Fatalf("unexpected or no error when marshaling: %v", err) + } +} + +// Test that enums work. Checks for a bug introduced by making enums +// named types instead of int32: newInt32FromUint64 would crash with +// a type mismatch in reflect.PointTo. +func TestEnum(t *testing.T) { + pb := new(GoEnum) + pb.Foo = FOO_FOO1.Enum() + o := old() + if err := o.Marshal(pb); err != nil { + t.Fatal("error encoding enum:", err) + } + pb1 := new(GoEnum) + if err := o.Unmarshal(pb1); err != nil { + t.Fatal("error decoding enum:", err) + } + if *pb1.Foo != FOO_FOO1 { + t.Error("expected 7 but got ", *pb1.Foo) + } +} + +// Enum types have String methods. Check that enum fields can be printed. +// We don't care what the value actually is, just as long as it doesn't crash. +func TestPrintingNilEnumFields(t *testing.T) { + pb := new(GoEnum) + fmt.Sprintf("%+v", pb) +} + +// Verify that absent required fields cause Marshal/Unmarshal to return errors. +func TestRequiredFieldEnforcement(t *testing.T) { + pb := new(GoTestField) + _, err := Marshal(pb) + if err == nil { + t.Error("marshal: expected error, got nil") + } else if strings.Index(err.Error(), "Label") < 0 { + t.Errorf("marshal: bad error type: %v", err) + } + + // A slightly sneaky, yet valid, proto. It encodes the same required field twice, + // so simply counting the required fields is insufficient. + // field 1, encoding 2, value "hi" + buf := []byte("\x0A\x02hi\x0A\x02hi") + err = Unmarshal(buf, pb) + if err == nil { + t.Error("unmarshal: expected error, got nil") + } else if strings.Index(err.Error(), "{Unknown}") < 0 { + t.Errorf("unmarshal: bad error type: %v", err) + } +} + +func TestTypedNilMarshal(t *testing.T) { + // A typed nil should return ErrNil and not crash. + { + var m *GoEnum + if _, err := Marshal(m); err != ErrNil { + t.Errorf("Marshal(%#v): got %v, want ErrNil", m, err) + } + } + + { + m := &Communique{Union: &Communique_Msg{nil}} + if _, err := Marshal(m); err == nil || err == ErrNil { + t.Errorf("Marshal(%#v): got %v, want errOneofHasNil", m, err) + } + } +} + +// A type that implements the Marshaler interface, but is not nillable. +type nonNillableInt uint64 + +func (nni nonNillableInt) Marshal() ([]byte, error) { + return EncodeVarint(uint64(nni)), nil +} + +type NNIMessage struct { + nni nonNillableInt +} + +func (*NNIMessage) Reset() {} +func (*NNIMessage) String() string { return "" } +func (*NNIMessage) ProtoMessage() {} + +// A type that implements the Marshaler interface and is nillable. +type nillableMessage struct { + x uint64 +} + +func (nm *nillableMessage) Marshal() ([]byte, error) { + return EncodeVarint(nm.x), nil +} + +type NMMessage struct { + nm *nillableMessage +} + +func (*NMMessage) Reset() {} +func (*NMMessage) String() string { return "" } +func (*NMMessage) ProtoMessage() {} + +// Verify a type that uses the Marshaler interface, but has a nil pointer. +func TestNilMarshaler(t *testing.T) { + // Try a struct with a Marshaler field that is nil. + // It should be directly marshable. + nmm := new(NMMessage) + if _, err := Marshal(nmm); err != nil { + t.Error("unexpected error marshaling nmm: ", err) + } + + // Try a struct with a Marshaler field that is not nillable. + nnim := new(NNIMessage) + nnim.nni = 7 + var _ Marshaler = nnim.nni // verify it is truly a Marshaler + if _, err := Marshal(nnim); err != nil { + t.Error("unexpected error marshaling nnim: ", err) + } +} + +func TestAllSetDefaults(t *testing.T) { + // Exercise SetDefaults with all scalar field types. + m := &Defaults{ + // NaN != NaN, so override that here. + F_Nan: Float32(1.7), + } + expected := &Defaults{ + F_Bool: Bool(true), + F_Int32: Int32(32), + F_Int64: Int64(64), + F_Fixed32: Uint32(320), + F_Fixed64: Uint64(640), + F_Uint32: Uint32(3200), + F_Uint64: Uint64(6400), + F_Float: Float32(314159), + F_Double: Float64(271828), + F_String: String(`hello, "world!"` + "\n"), + F_Bytes: []byte("Bignose"), + F_Sint32: Int32(-32), + F_Sint64: Int64(-64), + F_Enum: Defaults_GREEN.Enum(), + F_Pinf: Float32(float32(math.Inf(1))), + F_Ninf: Float32(float32(math.Inf(-1))), + F_Nan: Float32(1.7), + StrZero: String(""), + } + SetDefaults(m) + if !Equal(m, expected) { + t.Errorf("SetDefaults failed\n got %v\nwant %v", m, expected) + } +} + +func TestSetDefaultsWithSetField(t *testing.T) { + // Check that a set value is not overridden. + m := &Defaults{ + F_Int32: Int32(12), + } + SetDefaults(m) + if v := m.GetF_Int32(); v != 12 { + t.Errorf("m.FInt32 = %v, want 12", v) + } +} + +func TestSetDefaultsWithSubMessage(t *testing.T) { + m := &OtherMessage{ + Key: Int64(123), + Inner: &InnerMessage{ + Host: String("gopher"), + }, + } + expected := &OtherMessage{ + Key: Int64(123), + Inner: &InnerMessage{ + Host: String("gopher"), + Port: Int32(4000), + }, + } + SetDefaults(m) + if !Equal(m, expected) { + t.Errorf("\n got %v\nwant %v", m, expected) + } +} + +func TestSetDefaultsWithRepeatedSubMessage(t *testing.T) { + m := &MyMessage{ + RepInner: []*InnerMessage{{}}, + } + expected := &MyMessage{ + RepInner: []*InnerMessage{{ + Port: Int32(4000), + }}, + } + SetDefaults(m) + if !Equal(m, expected) { + t.Errorf("\n got %v\nwant %v", m, expected) + } +} + +func TestSetDefaultWithRepeatedNonMessage(t *testing.T) { + m := &MyMessage{ + Pet: []string{"turtle", "wombat"}, + } + expected := Clone(m) + SetDefaults(m) + if !Equal(m, expected) { + t.Errorf("\n got %v\nwant %v", m, expected) + } +} + +func TestMaximumTagNumber(t *testing.T) { + m := &MaxTag{ + LastField: String("natural goat essence"), + } + buf, err := Marshal(m) + if err != nil { + t.Fatalf("proto.Marshal failed: %v", err) + } + m2 := new(MaxTag) + if err := Unmarshal(buf, m2); err != nil { + t.Fatalf("proto.Unmarshal failed: %v", err) + } + if got, want := m2.GetLastField(), *m.LastField; got != want { + t.Errorf("got %q, want %q", got, want) + } +} + +func TestJSON(t *testing.T) { + m := &MyMessage{ + Count: Int32(4), + Pet: []string{"bunny", "kitty"}, + Inner: &InnerMessage{ + Host: String("cauchy"), + }, + Bikeshed: MyMessage_GREEN.Enum(), + } + const expected = `{"count":4,"pet":["bunny","kitty"],"inner":{"host":"cauchy"},"bikeshed":1}` + + b, err := json.Marshal(m) + if err != nil { + t.Fatalf("json.Marshal failed: %v", err) + } + s := string(b) + if s != expected { + t.Errorf("got %s\nwant %s", s, expected) + } + + received := new(MyMessage) + if err := json.Unmarshal(b, received); err != nil { + t.Fatalf("json.Unmarshal failed: %v", err) + } + if !Equal(received, m) { + t.Fatalf("got %s, want %s", received, m) + } + + // Test unmarshalling of JSON with symbolic enum name. + const old = `{"count":4,"pet":["bunny","kitty"],"inner":{"host":"cauchy"},"bikeshed":"GREEN"}` + received.Reset() + if err := json.Unmarshal([]byte(old), received); err != nil { + t.Fatalf("json.Unmarshal failed: %v", err) + } + if !Equal(received, m) { + t.Fatalf("got %s, want %s", received, m) + } +} + +func TestBadWireType(t *testing.T) { + b := []byte{7<<3 | 6} // field 7, wire type 6 + pb := new(OtherMessage) + if err := Unmarshal(b, pb); err == nil { + t.Errorf("Unmarshal did not fail") + } else if !strings.Contains(err.Error(), "unknown wire type") { + t.Errorf("wrong error: %v", err) + } +} + +func TestBytesWithInvalidLength(t *testing.T) { + // If a byte sequence has an invalid (negative) length, Unmarshal should not panic. + b := []byte{2<<3 | WireBytes, 0xff, 0xff, 0xff, 0xff, 0xff, 0} + Unmarshal(b, new(MyMessage)) +} + +func TestLengthOverflow(t *testing.T) { + // Overflowing a length should not panic. + b := []byte{2<<3 | WireBytes, 1, 1, 3<<3 | WireBytes, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x7f, 0x01} + Unmarshal(b, new(MyMessage)) +} + +func TestVarintOverflow(t *testing.T) { + // Overflowing a 64-bit length should not be allowed. + b := []byte{1<<3 | WireVarint, 0x01, 3<<3 | WireBytes, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x01} + if err := Unmarshal(b, new(MyMessage)); err == nil { + t.Fatalf("Overflowed uint64 length without error") + } +} + +func TestUnmarshalFuzz(t *testing.T) { + const N = 1000 + seed := time.Now().UnixNano() + t.Logf("RNG seed is %d", seed) + rng := rand.New(rand.NewSource(seed)) + buf := make([]byte, 20) + for i := 0; i < N; i++ { + for j := range buf { + buf[j] = byte(rng.Intn(256)) + } + fuzzUnmarshal(t, buf) + } +} + +func TestMergeMessages(t *testing.T) { + pb := &MessageList{Message: []*MessageList_Message{{Name: String("x"), Count: Int32(1)}}} + data, err := Marshal(pb) + if err != nil { + t.Fatalf("Marshal: %v", err) + } + + pb1 := new(MessageList) + if err := Unmarshal(data, pb1); err != nil { + t.Fatalf("first Unmarshal: %v", err) + } + if err := Unmarshal(data, pb1); err != nil { + t.Fatalf("second Unmarshal: %v", err) + } + if len(pb1.Message) != 1 { + t.Errorf("two Unmarshals produced %d Messages, want 1", len(pb1.Message)) + } + + pb2 := new(MessageList) + if err := UnmarshalMerge(data, pb2); err != nil { + t.Fatalf("first UnmarshalMerge: %v", err) + } + if err := UnmarshalMerge(data, pb2); err != nil { + t.Fatalf("second UnmarshalMerge: %v", err) + } + if len(pb2.Message) != 2 { + t.Errorf("two UnmarshalMerges produced %d Messages, want 2", len(pb2.Message)) + } +} + +func TestExtensionMarshalOrder(t *testing.T) { + m := &MyMessage{Count: Int(123)} + if err := SetExtension(m, E_Ext_More, &Ext{Data: String("alpha")}); err != nil { + t.Fatalf("SetExtension: %v", err) + } + if err := SetExtension(m, E_Ext_Text, String("aleph")); err != nil { + t.Fatalf("SetExtension: %v", err) + } + if err := SetExtension(m, E_Ext_Number, Int32(1)); err != nil { + t.Fatalf("SetExtension: %v", err) + } + + // Serialize m several times, and check we get the same bytes each time. + var orig []byte + for i := 0; i < 100; i++ { + b, err := Marshal(m) + if err != nil { + t.Fatalf("Marshal: %v", err) + } + if i == 0 { + orig = b + continue + } + if !bytes.Equal(b, orig) { + t.Errorf("Bytes differ on attempt #%d", i) + } + } +} + +// Many extensions, because small maps might not iterate differently on each iteration. +var exts = []*ExtensionDesc{ + E_X201, + E_X202, + E_X203, + E_X204, + E_X205, + E_X206, + E_X207, + E_X208, + E_X209, + E_X210, + E_X211, + E_X212, + E_X213, + E_X214, + E_X215, + E_X216, + E_X217, + E_X218, + E_X219, + E_X220, + E_X221, + E_X222, + E_X223, + E_X224, + E_X225, + E_X226, + E_X227, + E_X228, + E_X229, + E_X230, + E_X231, + E_X232, + E_X233, + E_X234, + E_X235, + E_X236, + E_X237, + E_X238, + E_X239, + E_X240, + E_X241, + E_X242, + E_X243, + E_X244, + E_X245, + E_X246, + E_X247, + E_X248, + E_X249, + E_X250, +} + +func TestMessageSetMarshalOrder(t *testing.T) { + m := &MyMessageSet{} + for _, x := range exts { + if err := SetExtension(m, x, &Empty{}); err != nil { + t.Fatalf("SetExtension: %v", err) + } + } + + buf, err := Marshal(m) + if err != nil { + t.Fatalf("Marshal: %v", err) + } + + // Serialize m several times, and check we get the same bytes each time. + for i := 0; i < 10; i++ { + b1, err := Marshal(m) + if err != nil { + t.Fatalf("Marshal: %v", err) + } + if !bytes.Equal(b1, buf) { + t.Errorf("Bytes differ on re-Marshal #%d", i) + } + + m2 := &MyMessageSet{} + if err := Unmarshal(buf, m2); err != nil { + t.Errorf("Unmarshal: %v", err) + } + b2, err := Marshal(m2) + if err != nil { + t.Errorf("re-Marshal: %v", err) + } + if !bytes.Equal(b2, buf) { + t.Errorf("Bytes differ on round-trip #%d", i) + } + } +} + +func TestUnmarshalMergesMessages(t *testing.T) { + // If a nested message occurs twice in the input, + // the fields should be merged when decoding. + a := &OtherMessage{ + Key: Int64(123), + Inner: &InnerMessage{ + Host: String("polhode"), + Port: Int32(1234), + }, + } + aData, err := Marshal(a) + if err != nil { + t.Fatalf("Marshal(a): %v", err) + } + b := &OtherMessage{ + Weight: Float32(1.2), + Inner: &InnerMessage{ + Host: String("herpolhode"), + Connected: Bool(true), + }, + } + bData, err := Marshal(b) + if err != nil { + t.Fatalf("Marshal(b): %v", err) + } + want := &OtherMessage{ + Key: Int64(123), + Weight: Float32(1.2), + Inner: &InnerMessage{ + Host: String("herpolhode"), + Port: Int32(1234), + Connected: Bool(true), + }, + } + got := new(OtherMessage) + if err := Unmarshal(append(aData, bData...), got); err != nil { + t.Fatalf("Unmarshal: %v", err) + } + if !Equal(got, want) { + t.Errorf("\n got %v\nwant %v", got, want) + } +} + +func TestEncodingSizes(t *testing.T) { + tests := []struct { + m Message + n int + }{ + {&Defaults{F_Int32: Int32(math.MaxInt32)}, 6}, + {&Defaults{F_Int32: Int32(math.MinInt32)}, 11}, + {&Defaults{F_Uint32: Uint32(uint32(math.MaxInt32) + 1)}, 6}, + {&Defaults{F_Uint32: Uint32(math.MaxUint32)}, 6}, + } + for _, test := range tests { + b, err := Marshal(test.m) + if err != nil { + t.Errorf("Marshal(%v): %v", test.m, err) + continue + } + if len(b) != test.n { + t.Errorf("Marshal(%v) yielded %d bytes, want %d bytes", test.m, len(b), test.n) + } + } +} + +func TestRequiredNotSetError(t *testing.T) { + pb := initGoTest(false) + pb.RequiredField.Label = nil + pb.F_Int32Required = nil + pb.F_Int64Required = nil + + expected := "0807" + // field 1, encoding 0, value 7 + "2206" + "120474797065" + // field 4, encoding 2 (GoTestField) + "5001" + // field 10, encoding 0, value 1 + "6d20000000" + // field 13, encoding 5, value 0x20 + "714000000000000000" + // field 14, encoding 1, value 0x40 + "78a019" + // field 15, encoding 0, value 0xca0 = 3232 + "8001c032" + // field 16, encoding 0, value 0x1940 = 6464 + "8d0100004a45" + // field 17, encoding 5, value 3232.0 + "9101000000000040b940" + // field 18, encoding 1, value 6464.0 + "9a0106" + "737472696e67" + // field 19, encoding 2, string "string" + "b304" + // field 70, encoding 3, start group + "ba0408" + "7265717569726564" + // field 71, encoding 2, string "required" + "b404" + // field 70, encoding 4, end group + "aa0605" + "6279746573" + // field 101, encoding 2, string "bytes" + "b0063f" + // field 102, encoding 0, 0x3f zigzag32 + "b8067f" // field 103, encoding 0, 0x7f zigzag64 + + o := old() + bytes, err := Marshal(pb) + if _, ok := err.(*RequiredNotSetError); !ok { + fmt.Printf("marshal-1 err = %v, want *RequiredNotSetError", err) + o.DebugPrint("", bytes) + t.Fatalf("expected = %s", expected) + } + if strings.Index(err.Error(), "RequiredField.Label") < 0 { + t.Errorf("marshal-1 wrong err msg: %v", err) + } + if !equal(bytes, expected, t) { + o.DebugPrint("neq 1", bytes) + t.Fatalf("expected = %s", expected) + } + + // Now test Unmarshal by recreating the original buffer. + pbd := new(GoTest) + err = Unmarshal(bytes, pbd) + if _, ok := err.(*RequiredNotSetError); !ok { + t.Fatalf("unmarshal err = %v, want *RequiredNotSetError", err) + o.DebugPrint("", bytes) + t.Fatalf("string = %s", expected) + } + if strings.Index(err.Error(), "RequiredField.{Unknown}") < 0 { + t.Errorf("unmarshal wrong err msg: %v", err) + } + bytes, err = Marshal(pbd) + if _, ok := err.(*RequiredNotSetError); !ok { + t.Errorf("marshal-2 err = %v, want *RequiredNotSetError", err) + o.DebugPrint("", bytes) + t.Fatalf("string = %s", expected) + } + if strings.Index(err.Error(), "RequiredField.Label") < 0 { + t.Errorf("marshal-2 wrong err msg: %v", err) + } + if !equal(bytes, expected, t) { + o.DebugPrint("neq 2", bytes) + t.Fatalf("string = %s", expected) + } +} + +func fuzzUnmarshal(t *testing.T, data []byte) { + defer func() { + if e := recover(); e != nil { + t.Errorf("These bytes caused a panic: %+v", data) + t.Logf("Stack:\n%s", debug.Stack()) + t.FailNow() + } + }() + + pb := new(MyMessage) + Unmarshal(data, pb) +} + +func TestMapFieldMarshal(t *testing.T) { + m := &MessageWithMap{ + NameMapping: map[int32]string{ + 1: "Rob", + 4: "Ian", + 8: "Dave", + }, + } + b, err := Marshal(m) + if err != nil { + t.Fatalf("Marshal: %v", err) + } + + // b should be the concatenation of these three byte sequences in some order. + parts := []string{ + "\n\a\b\x01\x12\x03Rob", + "\n\a\b\x04\x12\x03Ian", + "\n\b\b\x08\x12\x04Dave", + } + ok := false + for i := range parts { + for j := range parts { + if j == i { + continue + } + for k := range parts { + if k == i || k == j { + continue + } + try := parts[i] + parts[j] + parts[k] + if bytes.Equal(b, []byte(try)) { + ok = true + break + } + } + } + } + if !ok { + t.Fatalf("Incorrect Marshal output.\n got %q\nwant %q (or a permutation of that)", b, parts[0]+parts[1]+parts[2]) + } + t.Logf("FYI b: %q", b) + + (new(Buffer)).DebugPrint("Dump of b", b) +} + +func TestMapFieldRoundTrips(t *testing.T) { + m := &MessageWithMap{ + NameMapping: map[int32]string{ + 1: "Rob", + 4: "Ian", + 8: "Dave", + }, + MsgMapping: map[int64]*FloatingPoint{ + 0x7001: &FloatingPoint{F: Float64(2.0)}, + }, + ByteMapping: map[bool][]byte{ + false: []byte("that's not right!"), + true: []byte("aye, 'tis true!"), + }, + } + b, err := Marshal(m) + if err != nil { + t.Fatalf("Marshal: %v", err) + } + t.Logf("FYI b: %q", b) + m2 := new(MessageWithMap) + if err := Unmarshal(b, m2); err != nil { + t.Fatalf("Unmarshal: %v", err) + } + for _, pair := range [][2]interface{}{ + {m.NameMapping, m2.NameMapping}, + {m.MsgMapping, m2.MsgMapping}, + {m.ByteMapping, m2.ByteMapping}, + } { + if !reflect.DeepEqual(pair[0], pair[1]) { + t.Errorf("Map did not survive a round trip.\ninitial: %v\n final: %v", pair[0], pair[1]) + } + } +} + +func TestMapFieldWithNil(t *testing.T) { + m1 := &MessageWithMap{ + MsgMapping: map[int64]*FloatingPoint{ + 1: nil, + }, + } + b, err := Marshal(m1) + if err != nil { + t.Fatalf("Marshal: %v", err) + } + m2 := new(MessageWithMap) + if err := Unmarshal(b, m2); err != nil { + t.Fatalf("Unmarshal: %v, got these bytes: %v", err, b) + } + if v, ok := m2.MsgMapping[1]; !ok { + t.Error("msg_mapping[1] not present") + } else if v != nil { + t.Errorf("msg_mapping[1] not nil: %v", v) + } +} + +func TestMapFieldWithNilBytes(t *testing.T) { + m1 := &MessageWithMap{ + ByteMapping: map[bool][]byte{ + false: []byte{}, + true: nil, + }, + } + n := Size(m1) + b, err := Marshal(m1) + if err != nil { + t.Fatalf("Marshal: %v", err) + } + if n != len(b) { + t.Errorf("Size(m1) = %d; want len(Marshal(m1)) = %d", n, len(b)) + } + m2 := new(MessageWithMap) + if err := Unmarshal(b, m2); err != nil { + t.Fatalf("Unmarshal: %v, got these bytes: %v", err, b) + } + if v, ok := m2.ByteMapping[false]; !ok { + t.Error("byte_mapping[false] not present") + } else if len(v) != 0 { + t.Errorf("byte_mapping[false] not empty: %#v", v) + } + if v, ok := m2.ByteMapping[true]; !ok { + t.Error("byte_mapping[true] not present") + } else if len(v) != 0 { + t.Errorf("byte_mapping[true] not empty: %#v", v) + } +} + +func TestDecodeMapFieldMissingKey(t *testing.T) { + b := []byte{ + 0x0A, 0x03, // message, tag 1 (name_mapping), of length 3 bytes + // no key + 0x12, 0x01, 0x6D, // string value of length 1 byte, value "m" + } + got := &MessageWithMap{} + err := Unmarshal(b, got) + if err != nil { + t.Fatalf("failed to marshal map with missing key: %v", err) + } + want := &MessageWithMap{NameMapping: map[int32]string{0: "m"}} + if !Equal(got, want) { + t.Errorf("Unmarshaled map with no key was not as expected. got: %v, want %v", got, want) + } +} + +func TestDecodeMapFieldMissingValue(t *testing.T) { + b := []byte{ + 0x0A, 0x02, // message, tag 1 (name_mapping), of length 2 bytes + 0x08, 0x01, // varint key, value 1 + // no value + } + got := &MessageWithMap{} + err := Unmarshal(b, got) + if err != nil { + t.Fatalf("failed to marshal map with missing value: %v", err) + } + want := &MessageWithMap{NameMapping: map[int32]string{1: ""}} + if !Equal(got, want) { + t.Errorf("Unmarshaled map with no value was not as expected. got: %v, want %v", got, want) + } +} + +func TestOneof(t *testing.T) { + m := &Communique{} + b, err := Marshal(m) + if err != nil { + t.Fatalf("Marshal of empty message with oneof: %v", err) + } + if len(b) != 0 { + t.Errorf("Marshal of empty message yielded too many bytes: %v", b) + } + + m = &Communique{ + Union: &Communique_Name{"Barry"}, + } + + // Round-trip. + b, err = Marshal(m) + if err != nil { + t.Fatalf("Marshal of message with oneof: %v", err) + } + if len(b) != 7 { // name tag/wire (1) + name len (1) + name (5) + t.Errorf("Incorrect marshal of message with oneof: %v", b) + } + m.Reset() + if err := Unmarshal(b, m); err != nil { + t.Fatalf("Unmarshal of message with oneof: %v", err) + } + if x, ok := m.Union.(*Communique_Name); !ok || x.Name != "Barry" { + t.Errorf("After round trip, Union = %+v", m.Union) + } + if name := m.GetName(); name != "Barry" { + t.Errorf("After round trip, GetName = %q, want %q", name, "Barry") + } + + // Let's try with a message in the oneof. + m.Union = &Communique_Msg{&Strings{StringField: String("deep deep string")}} + b, err = Marshal(m) + if err != nil { + t.Fatalf("Marshal of message with oneof set to message: %v", err) + } + if len(b) != 20 { // msg tag/wire (1) + msg len (1) + msg (1 + 1 + 16) + t.Errorf("Incorrect marshal of message with oneof set to message: %v", b) + } + m.Reset() + if err := Unmarshal(b, m); err != nil { + t.Fatalf("Unmarshal of message with oneof set to message: %v", err) + } + ss, ok := m.Union.(*Communique_Msg) + if !ok || ss.Msg.GetStringField() != "deep deep string" { + t.Errorf("After round trip with oneof set to message, Union = %+v", m.Union) + } +} + +func TestInefficientPackedBool(t *testing.T) { + // https://github.com/golang/protobuf/issues/76 + inp := []byte{ + 0x12, 0x02, // 0x12 = 2<<3|2; 2 bytes + // Usually a bool should take a single byte, + // but it is permitted to be any varint. + 0xb9, 0x30, + } + if err := Unmarshal(inp, new(MoreRepeated)); err != nil { + t.Error(err) + } +} + +// Benchmarks + +func testMsg() *GoTest { + pb := initGoTest(true) + const N = 1000 // Internally the library starts much smaller. + pb.F_Int32Repeated = make([]int32, N) + pb.F_DoubleRepeated = make([]float64, N) + for i := 0; i < N; i++ { + pb.F_Int32Repeated[i] = int32(i) + pb.F_DoubleRepeated[i] = float64(i) + } + return pb +} + +func bytesMsg() *GoTest { + pb := initGoTest(true) + buf := make([]byte, 4000) + for i := range buf { + buf[i] = byte(i) + } + pb.F_BytesDefaulted = buf + return pb +} + +func benchmarkMarshal(b *testing.B, pb Message, marshal func(Message) ([]byte, error)) { + d, _ := marshal(pb) + b.SetBytes(int64(len(d))) + b.ResetTimer() + for i := 0; i < b.N; i++ { + marshal(pb) + } +} + +func benchmarkBufferMarshal(b *testing.B, pb Message) { + p := NewBuffer(nil) + benchmarkMarshal(b, pb, func(pb0 Message) ([]byte, error) { + p.Reset() + err := p.Marshal(pb0) + return p.Bytes(), err + }) +} + +func benchmarkSize(b *testing.B, pb Message) { + benchmarkMarshal(b, pb, func(pb0 Message) ([]byte, error) { + Size(pb) + return nil, nil + }) +} + +func newOf(pb Message) Message { + in := reflect.ValueOf(pb) + if in.IsNil() { + return pb + } + return reflect.New(in.Type().Elem()).Interface().(Message) +} + +func benchmarkUnmarshal(b *testing.B, pb Message, unmarshal func([]byte, Message) error) { + d, _ := Marshal(pb) + b.SetBytes(int64(len(d))) + pbd := newOf(pb) + + b.ResetTimer() + for i := 0; i < b.N; i++ { + unmarshal(d, pbd) + } +} + +func benchmarkBufferUnmarshal(b *testing.B, pb Message) { + p := NewBuffer(nil) + benchmarkUnmarshal(b, pb, func(d []byte, pb0 Message) error { + p.SetBuf(d) + return p.Unmarshal(pb0) + }) +} + +// Benchmark{Marshal,BufferMarshal,Size,Unmarshal,BufferUnmarshal}{,Bytes} + +func BenchmarkMarshal(b *testing.B) { + benchmarkMarshal(b, testMsg(), Marshal) +} + +func BenchmarkBufferMarshal(b *testing.B) { + benchmarkBufferMarshal(b, testMsg()) +} + +func BenchmarkSize(b *testing.B) { + benchmarkSize(b, testMsg()) +} + +func BenchmarkUnmarshal(b *testing.B) { + benchmarkUnmarshal(b, testMsg(), Unmarshal) +} + +func BenchmarkBufferUnmarshal(b *testing.B) { + benchmarkBufferUnmarshal(b, testMsg()) +} + +func BenchmarkMarshalBytes(b *testing.B) { + benchmarkMarshal(b, bytesMsg(), Marshal) +} + +func BenchmarkBufferMarshalBytes(b *testing.B) { + benchmarkBufferMarshal(b, bytesMsg()) +} + +func BenchmarkSizeBytes(b *testing.B) { + benchmarkSize(b, bytesMsg()) +} + +func BenchmarkUnmarshalBytes(b *testing.B) { + benchmarkUnmarshal(b, bytesMsg(), Unmarshal) +} + +func BenchmarkBufferUnmarshalBytes(b *testing.B) { + benchmarkBufferUnmarshal(b, bytesMsg()) +} + +func BenchmarkUnmarshalUnrecognizedFields(b *testing.B) { + b.StopTimer() + pb := initGoTestField() + skip := &GoSkipTest{ + SkipInt32: Int32(32), + SkipFixed32: Uint32(3232), + SkipFixed64: Uint64(6464), + SkipString: String("skipper"), + Skipgroup: &GoSkipTest_SkipGroup{ + GroupInt32: Int32(75), + GroupString: String("wxyz"), + }, + } + + pbd := new(GoTestField) + p := NewBuffer(nil) + p.Marshal(pb) + p.Marshal(skip) + p2 := NewBuffer(nil) + + b.StartTimer() + for i := 0; i < b.N; i++ { + p2.SetBuf(p.Bytes()) + p2.Unmarshal(pbd) + } +} diff --git a/vendor/github.com/golang/protobuf/proto/any_test.go b/vendor/github.com/golang/protobuf/proto/any_test.go new file mode 100644 index 000000000..83492c56a --- /dev/null +++ b/vendor/github.com/golang/protobuf/proto/any_test.go @@ -0,0 +1,272 @@ +// 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 proto_test + +import ( + "strings" + "testing" + + "github.com/golang/protobuf/proto" + + pb "github.com/golang/protobuf/proto/proto3_proto" + testpb "github.com/golang/protobuf/proto/testdata" + anypb "github.com/golang/protobuf/ptypes/any" +) + +var ( + expandedMarshaler = proto.TextMarshaler{ExpandAny: true} + expandedCompactMarshaler = proto.TextMarshaler{Compact: true, ExpandAny: true} +) + +// anyEqual reports whether two messages which may be google.protobuf.Any or may +// contain google.protobuf.Any fields are equal. We can't use proto.Equal for +// comparison, because semantically equivalent messages may be marshaled to +// binary in different tag order. Instead, trust that TextMarshaler with +// ExpandAny option works and compare the text marshaling results. +func anyEqual(got, want proto.Message) bool { + // if messages are proto.Equal, no need to marshal. + if proto.Equal(got, want) { + return true + } + g := expandedMarshaler.Text(got) + w := expandedMarshaler.Text(want) + return g == w +} + +type golden struct { + m proto.Message + t, c string +} + +var goldenMessages = makeGolden() + +func makeGolden() []golden { + nested := &pb.Nested{Bunny: "Monty"} + nb, err := proto.Marshal(nested) + if err != nil { + panic(err) + } + m1 := &pb.Message{ + Name: "David", + ResultCount: 47, + Anything: &anypb.Any{TypeUrl: "type.googleapis.com/" + proto.MessageName(nested), Value: nb}, + } + m2 := &pb.Message{ + Name: "David", + ResultCount: 47, + Anything: &anypb.Any{TypeUrl: "http://[::1]/type.googleapis.com/" + proto.MessageName(nested), Value: nb}, + } + m3 := &pb.Message{ + Name: "David", + ResultCount: 47, + Anything: &anypb.Any{TypeUrl: `type.googleapis.com/"/` + proto.MessageName(nested), Value: nb}, + } + m4 := &pb.Message{ + Name: "David", + ResultCount: 47, + Anything: &anypb.Any{TypeUrl: "type.googleapis.com/a/path/" + proto.MessageName(nested), Value: nb}, + } + m5 := &anypb.Any{TypeUrl: "type.googleapis.com/" + proto.MessageName(nested), Value: nb} + + any1 := &testpb.MyMessage{Count: proto.Int32(47), Name: proto.String("David")} + proto.SetExtension(any1, testpb.E_Ext_More, &testpb.Ext{Data: proto.String("foo")}) + proto.SetExtension(any1, testpb.E_Ext_Text, proto.String("bar")) + any1b, err := proto.Marshal(any1) + if err != nil { + panic(err) + } + any2 := &testpb.MyMessage{Count: proto.Int32(42), Bikeshed: testpb.MyMessage_GREEN.Enum(), RepBytes: [][]byte{[]byte("roboto")}} + proto.SetExtension(any2, testpb.E_Ext_More, &testpb.Ext{Data: proto.String("baz")}) + any2b, err := proto.Marshal(any2) + if err != nil { + panic(err) + } + m6 := &pb.Message{ + Name: "David", + ResultCount: 47, + Anything: &anypb.Any{TypeUrl: "type.googleapis.com/" + proto.MessageName(any1), Value: any1b}, + ManyThings: []*anypb.Any{ + &anypb.Any{TypeUrl: "type.googleapis.com/" + proto.MessageName(any2), Value: any2b}, + &anypb.Any{TypeUrl: "type.googleapis.com/" + proto.MessageName(any1), Value: any1b}, + }, + } + + const ( + m1Golden = ` +name: "David" +result_count: 47 +anything: < + [type.googleapis.com/proto3_proto.Nested]: < + bunny: "Monty" + > +> +` + m2Golden = ` +name: "David" +result_count: 47 +anything: < + ["http://[::1]/type.googleapis.com/proto3_proto.Nested"]: < + bunny: "Monty" + > +> +` + m3Golden = ` +name: "David" +result_count: 47 +anything: < + ["type.googleapis.com/\"/proto3_proto.Nested"]: < + bunny: "Monty" + > +> +` + m4Golden = ` +name: "David" +result_count: 47 +anything: < + [type.googleapis.com/a/path/proto3_proto.Nested]: < + bunny: "Monty" + > +> +` + m5Golden = ` +[type.googleapis.com/proto3_proto.Nested]: < + bunny: "Monty" +> +` + m6Golden = ` +name: "David" +result_count: 47 +anything: < + [type.googleapis.com/testdata.MyMessage]: < + count: 47 + name: "David" + [testdata.Ext.more]: < + data: "foo" + > + [testdata.Ext.text]: "bar" + > +> +many_things: < + [type.googleapis.com/testdata.MyMessage]: < + count: 42 + bikeshed: GREEN + rep_bytes: "roboto" + [testdata.Ext.more]: < + data: "baz" + > + > +> +many_things: < + [type.googleapis.com/testdata.MyMessage]: < + count: 47 + name: "David" + [testdata.Ext.more]: < + data: "foo" + > + [testdata.Ext.text]: "bar" + > +> +` + ) + return []golden{ + {m1, strings.TrimSpace(m1Golden) + "\n", strings.TrimSpace(compact(m1Golden)) + " "}, + {m2, strings.TrimSpace(m2Golden) + "\n", strings.TrimSpace(compact(m2Golden)) + " "}, + {m3, strings.TrimSpace(m3Golden) + "\n", strings.TrimSpace(compact(m3Golden)) + " "}, + {m4, strings.TrimSpace(m4Golden) + "\n", strings.TrimSpace(compact(m4Golden)) + " "}, + {m5, strings.TrimSpace(m5Golden) + "\n", strings.TrimSpace(compact(m5Golden)) + " "}, + {m6, strings.TrimSpace(m6Golden) + "\n", strings.TrimSpace(compact(m6Golden)) + " "}, + } +} + +func TestMarshalGolden(t *testing.T) { + for _, tt := range goldenMessages { + if got, want := expandedMarshaler.Text(tt.m), tt.t; got != want { + t.Errorf("message %v: got:\n%s\nwant:\n%s", tt.m, got, want) + } + if got, want := expandedCompactMarshaler.Text(tt.m), tt.c; got != want { + t.Errorf("message %v: got:\n`%s`\nwant:\n`%s`", tt.m, got, want) + } + } +} + +func TestUnmarshalGolden(t *testing.T) { + for _, tt := range goldenMessages { + want := tt.m + got := proto.Clone(tt.m) + got.Reset() + if err := proto.UnmarshalText(tt.t, got); err != nil { + t.Errorf("failed to unmarshal\n%s\nerror: %v", tt.t, err) + } + if !anyEqual(got, want) { + t.Errorf("message:\n%s\ngot:\n%s\nwant:\n%s", tt.t, got, want) + } + got.Reset() + if err := proto.UnmarshalText(tt.c, got); err != nil { + t.Errorf("failed to unmarshal\n%s\nerror: %v", tt.c, err) + } + if !anyEqual(got, want) { + t.Errorf("message:\n%s\ngot:\n%s\nwant:\n%s", tt.c, got, want) + } + } +} + +func TestMarsahlUnknownAny(t *testing.T) { + m := &pb.Message{ + Anything: &anypb.Any{ + TypeUrl: "foo", + Value: []byte("bar"), + }, + } + want := `anything: < + type_url: "foo" + value: "bar" +> +` + got := expandedMarshaler.Text(m) + if got != want { + t.Errorf("got\n`%s`\nwant\n`%s`", got, want) + } +} + +func TestAmbiguousAny(t *testing.T) { + pb := &anypb.Any{} + err := proto.UnmarshalText(` + [type.googleapis.com/proto3_proto.Nested]: < + bunny: "Monty" + > + type_url: "ttt/proto3_proto.Nested" + `, pb) + t.Logf("result: %v (error: %v)", expandedMarshaler.Text(pb), err) + if err != nil { + t.Errorf("failed to parse ambiguous Any message: %v", err) + } +} diff --git a/vendor/github.com/golang/protobuf/proto/clone_test.go b/vendor/github.com/golang/protobuf/proto/clone_test.go new file mode 100644 index 000000000..76720f18b --- /dev/null +++ b/vendor/github.com/golang/protobuf/proto/clone_test.go @@ -0,0 +1,267 @@ +// Go support for Protocol Buffers - Google's data interchange format +// +// Copyright 2011 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 proto_test + +import ( + "testing" + + "github.com/golang/protobuf/proto" + + proto3pb "github.com/golang/protobuf/proto/proto3_proto" + pb "github.com/golang/protobuf/proto/testdata" +) + +var cloneTestMessage = &pb.MyMessage{ + Count: proto.Int32(42), + Name: proto.String("Dave"), + Pet: []string{"bunny", "kitty", "horsey"}, + Inner: &pb.InnerMessage{ + Host: proto.String("niles"), + Port: proto.Int32(9099), + Connected: proto.Bool(true), + }, + Others: []*pb.OtherMessage{ + { + Value: []byte("some bytes"), + }, + }, + Somegroup: &pb.MyMessage_SomeGroup{ + GroupField: proto.Int32(6), + }, + RepBytes: [][]byte{[]byte("sham"), []byte("wow")}, +} + +func init() { + ext := &pb.Ext{ + Data: proto.String("extension"), + } + if err := proto.SetExtension(cloneTestMessage, pb.E_Ext_More, ext); err != nil { + panic("SetExtension: " + err.Error()) + } +} + +func TestClone(t *testing.T) { + m := proto.Clone(cloneTestMessage).(*pb.MyMessage) + if !proto.Equal(m, cloneTestMessage) { + t.Errorf("Clone(%v) = %v", cloneTestMessage, m) + } + + // Verify it was a deep copy. + *m.Inner.Port++ + if proto.Equal(m, cloneTestMessage) { + t.Error("Mutating clone changed the original") + } + // Byte fields and repeated fields should be copied. + if &m.Pet[0] == &cloneTestMessage.Pet[0] { + t.Error("Pet: repeated field not copied") + } + if &m.Others[0] == &cloneTestMessage.Others[0] { + t.Error("Others: repeated field not copied") + } + if &m.Others[0].Value[0] == &cloneTestMessage.Others[0].Value[0] { + t.Error("Others[0].Value: bytes field not copied") + } + if &m.RepBytes[0] == &cloneTestMessage.RepBytes[0] { + t.Error("RepBytes: repeated field not copied") + } + if &m.RepBytes[0][0] == &cloneTestMessage.RepBytes[0][0] { + t.Error("RepBytes[0]: bytes field not copied") + } +} + +func TestCloneNil(t *testing.T) { + var m *pb.MyMessage + if c := proto.Clone(m); !proto.Equal(m, c) { + t.Errorf("Clone(%v) = %v", m, c) + } +} + +var mergeTests = []struct { + src, dst, want proto.Message +}{ + { + src: &pb.MyMessage{ + Count: proto.Int32(42), + }, + dst: &pb.MyMessage{ + Name: proto.String("Dave"), + }, + want: &pb.MyMessage{ + Count: proto.Int32(42), + Name: proto.String("Dave"), + }, + }, + { + src: &pb.MyMessage{ + Inner: &pb.InnerMessage{ + Host: proto.String("hey"), + Connected: proto.Bool(true), + }, + Pet: []string{"horsey"}, + Others: []*pb.OtherMessage{ + { + Value: []byte("some bytes"), + }, + }, + }, + dst: &pb.MyMessage{ + Inner: &pb.InnerMessage{ + Host: proto.String("niles"), + Port: proto.Int32(9099), + }, + Pet: []string{"bunny", "kitty"}, + Others: []*pb.OtherMessage{ + { + Key: proto.Int64(31415926535), + }, + { + // Explicitly test a src=nil field + Inner: nil, + }, + }, + }, + want: &pb.MyMessage{ + Inner: &pb.InnerMessage{ + Host: proto.String("hey"), + Connected: proto.Bool(true), + Port: proto.Int32(9099), + }, + Pet: []string{"bunny", "kitty", "horsey"}, + Others: []*pb.OtherMessage{ + { + Key: proto.Int64(31415926535), + }, + {}, + { + Value: []byte("some bytes"), + }, + }, + }, + }, + { + src: &pb.MyMessage{ + RepBytes: [][]byte{[]byte("wow")}, + }, + dst: &pb.MyMessage{ + Somegroup: &pb.MyMessage_SomeGroup{ + GroupField: proto.Int32(6), + }, + RepBytes: [][]byte{[]byte("sham")}, + }, + want: &pb.MyMessage{ + Somegroup: &pb.MyMessage_SomeGroup{ + GroupField: proto.Int32(6), + }, + RepBytes: [][]byte{[]byte("sham"), []byte("wow")}, + }, + }, + // Check that a scalar bytes field replaces rather than appends. + { + src: &pb.OtherMessage{Value: []byte("foo")}, + dst: &pb.OtherMessage{Value: []byte("bar")}, + want: &pb.OtherMessage{Value: []byte("foo")}, + }, + { + src: &pb.MessageWithMap{ + NameMapping: map[int32]string{6: "Nigel"}, + MsgMapping: map[int64]*pb.FloatingPoint{ + 0x4001: &pb.FloatingPoint{F: proto.Float64(2.0)}, + }, + ByteMapping: map[bool][]byte{true: []byte("wowsa")}, + }, + dst: &pb.MessageWithMap{ + NameMapping: map[int32]string{ + 6: "Bruce", // should be overwritten + 7: "Andrew", + }, + }, + want: &pb.MessageWithMap{ + NameMapping: map[int32]string{ + 6: "Nigel", + 7: "Andrew", + }, + MsgMapping: map[int64]*pb.FloatingPoint{ + 0x4001: &pb.FloatingPoint{F: proto.Float64(2.0)}, + }, + ByteMapping: map[bool][]byte{true: []byte("wowsa")}, + }, + }, + // proto3 shouldn't merge zero values, + // in the same way that proto2 shouldn't merge nils. + { + src: &proto3pb.Message{ + Name: "Aaron", + Data: []byte(""), // zero value, but not nil + }, + dst: &proto3pb.Message{ + HeightInCm: 176, + Data: []byte("texas!"), + }, + want: &proto3pb.Message{ + Name: "Aaron", + HeightInCm: 176, + Data: []byte("texas!"), + }, + }, + // Oneof fields should merge by assignment. + { + src: &pb.Communique{ + Union: &pb.Communique_Number{41}, + }, + dst: &pb.Communique{ + Union: &pb.Communique_Name{"Bobby Tables"}, + }, + want: &pb.Communique{ + Union: &pb.Communique_Number{41}, + }, + }, + // Oneof nil is the same as not set. + { + src: &pb.Communique{}, + dst: &pb.Communique{ + Union: &pb.Communique_Name{"Bobby Tables"}, + }, + want: &pb.Communique{ + Union: &pb.Communique_Name{"Bobby Tables"}, + }, + }, +} + +func TestMerge(t *testing.T) { + for _, m := range mergeTests { + got := proto.Clone(m.dst) + proto.Merge(got, m.src) + if !proto.Equal(got, m.want) { + t.Errorf("Merge(%v, %v)\n got %v\nwant %v\n", m.dst, m.src, got, m.want) + } + } +} diff --git a/vendor/github.com/golang/protobuf/proto/equal_test.go b/vendor/github.com/golang/protobuf/proto/equal_test.go new file mode 100644 index 000000000..7b45eaa6d --- /dev/null +++ b/vendor/github.com/golang/protobuf/proto/equal_test.go @@ -0,0 +1,212 @@ +// Go support for Protocol Buffers - Google's data interchange format +// +// Copyright 2011 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 proto_test + +import ( + "testing" + + . "github.com/golang/protobuf/proto" + proto3pb "github.com/golang/protobuf/proto/proto3_proto" + pb "github.com/golang/protobuf/proto/testdata" +) + +// Four identical base messages. +// The init function adds extensions to some of them. +var messageWithoutExtension = &pb.MyMessage{Count: Int32(7)} +var messageWithExtension1a = &pb.MyMessage{Count: Int32(7)} +var messageWithExtension1b = &pb.MyMessage{Count: Int32(7)} +var messageWithExtension2 = &pb.MyMessage{Count: Int32(7)} + +// Two messages with non-message extensions. +var messageWithInt32Extension1 = &pb.MyMessage{Count: Int32(8)} +var messageWithInt32Extension2 = &pb.MyMessage{Count: Int32(8)} + +func init() { + ext1 := &pb.Ext{Data: String("Kirk")} + ext2 := &pb.Ext{Data: String("Picard")} + + // messageWithExtension1a has ext1, but never marshals it. + if err := SetExtension(messageWithExtension1a, pb.E_Ext_More, ext1); err != nil { + panic("SetExtension on 1a failed: " + err.Error()) + } + + // messageWithExtension1b is the unmarshaled form of messageWithExtension1a. + if err := SetExtension(messageWithExtension1b, pb.E_Ext_More, ext1); err != nil { + panic("SetExtension on 1b failed: " + err.Error()) + } + buf, err := Marshal(messageWithExtension1b) + if err != nil { + panic("Marshal of 1b failed: " + err.Error()) + } + messageWithExtension1b.Reset() + if err := Unmarshal(buf, messageWithExtension1b); err != nil { + panic("Unmarshal of 1b failed: " + err.Error()) + } + + // messageWithExtension2 has ext2. + if err := SetExtension(messageWithExtension2, pb.E_Ext_More, ext2); err != nil { + panic("SetExtension on 2 failed: " + err.Error()) + } + + if err := SetExtension(messageWithInt32Extension1, pb.E_Ext_Number, Int32(23)); err != nil { + panic("SetExtension on Int32-1 failed: " + err.Error()) + } + if err := SetExtension(messageWithInt32Extension1, pb.E_Ext_Number, Int32(24)); err != nil { + panic("SetExtension on Int32-2 failed: " + err.Error()) + } +} + +var EqualTests = []struct { + desc string + a, b Message + exp bool +}{ + {"different types", &pb.GoEnum{}, &pb.GoTestField{}, false}, + {"equal empty", &pb.GoEnum{}, &pb.GoEnum{}, true}, + {"nil vs nil", nil, nil, true}, + {"typed nil vs typed nil", (*pb.GoEnum)(nil), (*pb.GoEnum)(nil), true}, + {"typed nil vs empty", (*pb.GoEnum)(nil), &pb.GoEnum{}, false}, + {"different typed nil", (*pb.GoEnum)(nil), (*pb.GoTestField)(nil), false}, + + {"one set field, one unset field", &pb.GoTestField{Label: String("foo")}, &pb.GoTestField{}, false}, + {"one set field zero, one unset field", &pb.GoTest{Param: Int32(0)}, &pb.GoTest{}, false}, + {"different set fields", &pb.GoTestField{Label: String("foo")}, &pb.GoTestField{Label: String("bar")}, false}, + {"equal set", &pb.GoTestField{Label: String("foo")}, &pb.GoTestField{Label: String("foo")}, true}, + + {"repeated, one set", &pb.GoTest{F_Int32Repeated: []int32{2, 3}}, &pb.GoTest{}, false}, + {"repeated, different length", &pb.GoTest{F_Int32Repeated: []int32{2, 3}}, &pb.GoTest{F_Int32Repeated: []int32{2}}, false}, + {"repeated, different value", &pb.GoTest{F_Int32Repeated: []int32{2}}, &pb.GoTest{F_Int32Repeated: []int32{3}}, false}, + {"repeated, equal", &pb.GoTest{F_Int32Repeated: []int32{2, 4}}, &pb.GoTest{F_Int32Repeated: []int32{2, 4}}, true}, + {"repeated, nil equal nil", &pb.GoTest{F_Int32Repeated: nil}, &pb.GoTest{F_Int32Repeated: nil}, true}, + {"repeated, nil equal empty", &pb.GoTest{F_Int32Repeated: nil}, &pb.GoTest{F_Int32Repeated: []int32{}}, true}, + {"repeated, empty equal nil", &pb.GoTest{F_Int32Repeated: []int32{}}, &pb.GoTest{F_Int32Repeated: nil}, true}, + + { + "nested, different", + &pb.GoTest{RequiredField: &pb.GoTestField{Label: String("foo")}}, + &pb.GoTest{RequiredField: &pb.GoTestField{Label: String("bar")}}, + false, + }, + { + "nested, equal", + &pb.GoTest{RequiredField: &pb.GoTestField{Label: String("wow")}}, + &pb.GoTest{RequiredField: &pb.GoTestField{Label: String("wow")}}, + true, + }, + + {"bytes", &pb.OtherMessage{Value: []byte("foo")}, &pb.OtherMessage{Value: []byte("foo")}, true}, + {"bytes, empty", &pb.OtherMessage{Value: []byte{}}, &pb.OtherMessage{Value: []byte{}}, true}, + {"bytes, empty vs nil", &pb.OtherMessage{Value: []byte{}}, &pb.OtherMessage{Value: nil}, false}, + { + "repeated bytes", + &pb.MyMessage{RepBytes: [][]byte{[]byte("sham"), []byte("wow")}}, + &pb.MyMessage{RepBytes: [][]byte{[]byte("sham"), []byte("wow")}}, + true, + }, + // In proto3, []byte{} and []byte(nil) are equal. + {"proto3 bytes, empty vs nil", &proto3pb.Message{Data: []byte{}}, &proto3pb.Message{Data: nil}, true}, + + {"extension vs. no extension", messageWithoutExtension, messageWithExtension1a, false}, + {"extension vs. same extension", messageWithExtension1a, messageWithExtension1b, true}, + {"extension vs. different extension", messageWithExtension1a, messageWithExtension2, false}, + + {"int32 extension vs. itself", messageWithInt32Extension1, messageWithInt32Extension1, true}, + {"int32 extension vs. a different int32", messageWithInt32Extension1, messageWithInt32Extension2, false}, + + { + "message with group", + &pb.MyMessage{ + Count: Int32(1), + Somegroup: &pb.MyMessage_SomeGroup{ + GroupField: Int32(5), + }, + }, + &pb.MyMessage{ + Count: Int32(1), + Somegroup: &pb.MyMessage_SomeGroup{ + GroupField: Int32(5), + }, + }, + true, + }, + + { + "map same", + &pb.MessageWithMap{NameMapping: map[int32]string{1: "Ken"}}, + &pb.MessageWithMap{NameMapping: map[int32]string{1: "Ken"}}, + true, + }, + { + "map different entry", + &pb.MessageWithMap{NameMapping: map[int32]string{1: "Ken"}}, + &pb.MessageWithMap{NameMapping: map[int32]string{2: "Rob"}}, + false, + }, + { + "map different key only", + &pb.MessageWithMap{NameMapping: map[int32]string{1: "Ken"}}, + &pb.MessageWithMap{NameMapping: map[int32]string{2: "Ken"}}, + false, + }, + { + "map different value only", + &pb.MessageWithMap{NameMapping: map[int32]string{1: "Ken"}}, + &pb.MessageWithMap{NameMapping: map[int32]string{1: "Rob"}}, + false, + }, + { + "oneof same", + &pb.Communique{Union: &pb.Communique_Number{41}}, + &pb.Communique{Union: &pb.Communique_Number{41}}, + true, + }, + { + "oneof one nil", + &pb.Communique{Union: &pb.Communique_Number{41}}, + &pb.Communique{}, + false, + }, + { + "oneof different", + &pb.Communique{Union: &pb.Communique_Number{41}}, + &pb.Communique{Union: &pb.Communique_Name{"Bobby Tables"}}, + false, + }, +} + +func TestEqual(t *testing.T) { + for _, tc := range EqualTests { + if res := Equal(tc.a, tc.b); res != tc.exp { + t.Errorf("%v: Equal(%v, %v) = %v, want %v", tc.desc, tc.a, tc.b, res, tc.exp) + } + } +} diff --git a/vendor/github.com/golang/protobuf/proto/extensions_test.go b/vendor/github.com/golang/protobuf/proto/extensions_test.go new file mode 100644 index 000000000..ed6a27d76 --- /dev/null +++ b/vendor/github.com/golang/protobuf/proto/extensions_test.go @@ -0,0 +1,455 @@ +// Go support for Protocol Buffers - Google's data interchange format +// +// Copyright 2014 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 proto_test + +import ( + "bytes" + "fmt" + "reflect" + "testing" + + "github.com/golang/protobuf/proto" + pb "github.com/golang/protobuf/proto/testdata" +) + +func TestGetExtensionsWithMissingExtensions(t *testing.T) { + msg := &pb.MyMessage{} + ext1 := &pb.Ext{} + if err := proto.SetExtension(msg, pb.E_Ext_More, ext1); err != nil { + t.Fatalf("Could not set ext1: %s", ext1) + } + exts, err := proto.GetExtensions(msg, []*proto.ExtensionDesc{ + pb.E_Ext_More, + pb.E_Ext_Text, + }) + if err != nil { + t.Fatalf("GetExtensions() failed: %s", err) + } + if exts[0] != ext1 { + t.Errorf("ext1 not in returned extensions: %T %v", exts[0], exts[0]) + } + if exts[1] != nil { + t.Errorf("ext2 in returned extensions: %T %v", exts[1], exts[1]) + } +} + +func TestGetExtensionStability(t *testing.T) { + check := func(m *pb.MyMessage) bool { + ext1, err := proto.GetExtension(m, pb.E_Ext_More) + if err != nil { + t.Fatalf("GetExtension() failed: %s", err) + } + ext2, err := proto.GetExtension(m, pb.E_Ext_More) + if err != nil { + t.Fatalf("GetExtension() failed: %s", err) + } + return ext1 == ext2 + } + msg := &pb.MyMessage{Count: proto.Int32(4)} + ext0 := &pb.Ext{} + if err := proto.SetExtension(msg, pb.E_Ext_More, ext0); err != nil { + t.Fatalf("Could not set ext1: %s", ext0) + } + if !check(msg) { + t.Errorf("GetExtension() not stable before marshaling") + } + bb, err := proto.Marshal(msg) + if err != nil { + t.Fatalf("Marshal() failed: %s", err) + } + msg1 := &pb.MyMessage{} + err = proto.Unmarshal(bb, msg1) + if err != nil { + t.Fatalf("Unmarshal() failed: %s", err) + } + if !check(msg1) { + t.Errorf("GetExtension() not stable after unmarshaling") + } +} + +func TestGetExtensionDefaults(t *testing.T) { + var setFloat64 float64 = 1 + var setFloat32 float32 = 2 + var setInt32 int32 = 3 + var setInt64 int64 = 4 + var setUint32 uint32 = 5 + var setUint64 uint64 = 6 + var setBool = true + var setBool2 = false + var setString = "Goodnight string" + var setBytes = []byte("Goodnight bytes") + var setEnum = pb.DefaultsMessage_TWO + + type testcase struct { + ext *proto.ExtensionDesc // Extension we are testing. + want interface{} // Expected value of extension, or nil (meaning that GetExtension will fail). + def interface{} // Expected value of extension after ClearExtension(). + } + tests := []testcase{ + {pb.E_NoDefaultDouble, setFloat64, nil}, + {pb.E_NoDefaultFloat, setFloat32, nil}, + {pb.E_NoDefaultInt32, setInt32, nil}, + {pb.E_NoDefaultInt64, setInt64, nil}, + {pb.E_NoDefaultUint32, setUint32, nil}, + {pb.E_NoDefaultUint64, setUint64, nil}, + {pb.E_NoDefaultSint32, setInt32, nil}, + {pb.E_NoDefaultSint64, setInt64, nil}, + {pb.E_NoDefaultFixed32, setUint32, nil}, + {pb.E_NoDefaultFixed64, setUint64, nil}, + {pb.E_NoDefaultSfixed32, setInt32, nil}, + {pb.E_NoDefaultSfixed64, setInt64, nil}, + {pb.E_NoDefaultBool, setBool, nil}, + {pb.E_NoDefaultBool, setBool2, nil}, + {pb.E_NoDefaultString, setString, nil}, + {pb.E_NoDefaultBytes, setBytes, nil}, + {pb.E_NoDefaultEnum, setEnum, nil}, + {pb.E_DefaultDouble, setFloat64, float64(3.1415)}, + {pb.E_DefaultFloat, setFloat32, float32(3.14)}, + {pb.E_DefaultInt32, setInt32, int32(42)}, + {pb.E_DefaultInt64, setInt64, int64(43)}, + {pb.E_DefaultUint32, setUint32, uint32(44)}, + {pb.E_DefaultUint64, setUint64, uint64(45)}, + {pb.E_DefaultSint32, setInt32, int32(46)}, + {pb.E_DefaultSint64, setInt64, int64(47)}, + {pb.E_DefaultFixed32, setUint32, uint32(48)}, + {pb.E_DefaultFixed64, setUint64, uint64(49)}, + {pb.E_DefaultSfixed32, setInt32, int32(50)}, + {pb.E_DefaultSfixed64, setInt64, int64(51)}, + {pb.E_DefaultBool, setBool, true}, + {pb.E_DefaultBool, setBool2, true}, + {pb.E_DefaultString, setString, "Hello, string"}, + {pb.E_DefaultBytes, setBytes, []byte("Hello, bytes")}, + {pb.E_DefaultEnum, setEnum, pb.DefaultsMessage_ONE}, + } + + checkVal := func(test testcase, msg *pb.DefaultsMessage, valWant interface{}) error { + val, err := proto.GetExtension(msg, test.ext) + if err != nil { + if valWant != nil { + return fmt.Errorf("GetExtension(): %s", err) + } + if want := proto.ErrMissingExtension; err != want { + return fmt.Errorf("Unexpected error: got %v, want %v", err, want) + } + return nil + } + + // All proto2 extension values are either a pointer to a value or a slice of values. + ty := reflect.TypeOf(val) + tyWant := reflect.TypeOf(test.ext.ExtensionType) + if got, want := ty, tyWant; got != want { + return fmt.Errorf("unexpected reflect.TypeOf(): got %v want %v", got, want) + } + tye := ty.Elem() + tyeWant := tyWant.Elem() + if got, want := tye, tyeWant; got != want { + return fmt.Errorf("unexpected reflect.TypeOf().Elem(): got %v want %v", got, want) + } + + // Check the name of the type of the value. + // If it is an enum it will be type int32 with the name of the enum. + if got, want := tye.Name(), tye.Name(); got != want { + return fmt.Errorf("unexpected reflect.TypeOf().Elem().Name(): got %v want %v", got, want) + } + + // Check that value is what we expect. + // If we have a pointer in val, get the value it points to. + valExp := val + if ty.Kind() == reflect.Ptr { + valExp = reflect.ValueOf(val).Elem().Interface() + } + if got, want := valExp, valWant; !reflect.DeepEqual(got, want) { + return fmt.Errorf("unexpected reflect.DeepEqual(): got %v want %v", got, want) + } + + return nil + } + + setTo := func(test testcase) interface{} { + setTo := reflect.ValueOf(test.want) + if typ := reflect.TypeOf(test.ext.ExtensionType); typ.Kind() == reflect.Ptr { + setTo = reflect.New(typ).Elem() + setTo.Set(reflect.New(setTo.Type().Elem())) + setTo.Elem().Set(reflect.ValueOf(test.want)) + } + return setTo.Interface() + } + + for _, test := range tests { + msg := &pb.DefaultsMessage{} + name := test.ext.Name + + // Check the initial value. + if err := checkVal(test, msg, test.def); err != nil { + t.Errorf("%s: %v", name, err) + } + + // Set the per-type value and check value. + name = fmt.Sprintf("%s (set to %T %v)", name, test.want, test.want) + if err := proto.SetExtension(msg, test.ext, setTo(test)); err != nil { + t.Errorf("%s: SetExtension(): %v", name, err) + continue + } + if err := checkVal(test, msg, test.want); err != nil { + t.Errorf("%s: %v", name, err) + continue + } + + // Set and check the value. + name += " (cleared)" + proto.ClearExtension(msg, test.ext) + if err := checkVal(test, msg, test.def); err != nil { + t.Errorf("%s: %v", name, err) + } + } +} + +func TestExtensionsRoundTrip(t *testing.T) { + msg := &pb.MyMessage{} + ext1 := &pb.Ext{ + Data: proto.String("hi"), + } + ext2 := &pb.Ext{ + Data: proto.String("there"), + } + exists := proto.HasExtension(msg, pb.E_Ext_More) + if exists { + t.Error("Extension More present unexpectedly") + } + if err := proto.SetExtension(msg, pb.E_Ext_More, ext1); err != nil { + t.Error(err) + } + if err := proto.SetExtension(msg, pb.E_Ext_More, ext2); err != nil { + t.Error(err) + } + e, err := proto.GetExtension(msg, pb.E_Ext_More) + if err != nil { + t.Error(err) + } + x, ok := e.(*pb.Ext) + if !ok { + t.Errorf("e has type %T, expected testdata.Ext", e) + } else if *x.Data != "there" { + t.Errorf("SetExtension failed to overwrite, got %+v, not 'there'", x) + } + proto.ClearExtension(msg, pb.E_Ext_More) + if _, err = proto.GetExtension(msg, pb.E_Ext_More); err != proto.ErrMissingExtension { + t.Errorf("got %v, expected ErrMissingExtension", e) + } + if _, err := proto.GetExtension(msg, pb.E_X215); err == nil { + t.Error("expected bad extension error, got nil") + } + if err := proto.SetExtension(msg, pb.E_X215, 12); err == nil { + t.Error("expected extension err") + } + if err := proto.SetExtension(msg, pb.E_Ext_More, 12); err == nil { + t.Error("expected some sort of type mismatch error, got nil") + } +} + +func TestNilExtension(t *testing.T) { + msg := &pb.MyMessage{ + Count: proto.Int32(1), + } + if err := proto.SetExtension(msg, pb.E_Ext_Text, proto.String("hello")); err != nil { + t.Fatal(err) + } + if err := proto.SetExtension(msg, pb.E_Ext_More, (*pb.Ext)(nil)); err == nil { + t.Error("expected SetExtension to fail due to a nil extension") + } else if want := "proto: SetExtension called with nil value of type *testdata.Ext"; err.Error() != want { + t.Errorf("expected error %v, got %v", want, err) + } + // Note: if the behavior of Marshal is ever changed to ignore nil extensions, update + // this test to verify that E_Ext_Text is properly propagated through marshal->unmarshal. +} + +func TestMarshalUnmarshalRepeatedExtension(t *testing.T) { + // Add a repeated extension to the result. + tests := []struct { + name string + ext []*pb.ComplexExtension + }{ + { + "two fields", + []*pb.ComplexExtension{ + {First: proto.Int32(7)}, + {Second: proto.Int32(11)}, + }, + }, + { + "repeated field", + []*pb.ComplexExtension{ + {Third: []int32{1000}}, + {Third: []int32{2000}}, + }, + }, + { + "two fields and repeated field", + []*pb.ComplexExtension{ + {Third: []int32{1000}}, + {First: proto.Int32(9)}, + {Second: proto.Int32(21)}, + {Third: []int32{2000}}, + }, + }, + } + for _, test := range tests { + // Marshal message with a repeated extension. + msg1 := new(pb.OtherMessage) + err := proto.SetExtension(msg1, pb.E_RComplex, test.ext) + if err != nil { + t.Fatalf("[%s] Error setting extension: %v", test.name, err) + } + b, err := proto.Marshal(msg1) + if err != nil { + t.Fatalf("[%s] Error marshaling message: %v", test.name, err) + } + + // Unmarshal and read the merged proto. + msg2 := new(pb.OtherMessage) + err = proto.Unmarshal(b, msg2) + if err != nil { + t.Fatalf("[%s] Error unmarshaling message: %v", test.name, err) + } + e, err := proto.GetExtension(msg2, pb.E_RComplex) + if err != nil { + t.Fatalf("[%s] Error getting extension: %v", test.name, err) + } + ext := e.([]*pb.ComplexExtension) + if ext == nil { + t.Fatalf("[%s] Invalid extension", test.name) + } + if !reflect.DeepEqual(ext, test.ext) { + t.Errorf("[%s] Wrong value for ComplexExtension: got: %v want: %v\n", test.name, ext, test.ext) + } + } +} + +func TestUnmarshalRepeatingNonRepeatedExtension(t *testing.T) { + // We may see multiple instances of the same extension in the wire + // format. For example, the proto compiler may encode custom options in + // this way. Here, we verify that we merge the extensions together. + tests := []struct { + name string + ext []*pb.ComplexExtension + }{ + { + "two fields", + []*pb.ComplexExtension{ + {First: proto.Int32(7)}, + {Second: proto.Int32(11)}, + }, + }, + { + "repeated field", + []*pb.ComplexExtension{ + {Third: []int32{1000}}, + {Third: []int32{2000}}, + }, + }, + { + "two fields and repeated field", + []*pb.ComplexExtension{ + {Third: []int32{1000}}, + {First: proto.Int32(9)}, + {Second: proto.Int32(21)}, + {Third: []int32{2000}}, + }, + }, + } + for _, test := range tests { + var buf bytes.Buffer + var want pb.ComplexExtension + + // Generate a serialized representation of a repeated extension + // by catenating bytes together. + for i, e := range test.ext { + // Merge to create the wanted proto. + proto.Merge(&want, e) + + // serialize the message + msg := new(pb.OtherMessage) + err := proto.SetExtension(msg, pb.E_Complex, e) + if err != nil { + t.Fatalf("[%s] Error setting extension %d: %v", test.name, i, err) + } + b, err := proto.Marshal(msg) + if err != nil { + t.Fatalf("[%s] Error marshaling message %d: %v", test.name, i, err) + } + buf.Write(b) + } + + // Unmarshal and read the merged proto. + msg2 := new(pb.OtherMessage) + err := proto.Unmarshal(buf.Bytes(), msg2) + if err != nil { + t.Fatalf("[%s] Error unmarshaling message: %v", test.name, err) + } + e, err := proto.GetExtension(msg2, pb.E_Complex) + if err != nil { + t.Fatalf("[%s] Error getting extension: %v", test.name, err) + } + ext := e.(*pb.ComplexExtension) + if ext == nil { + t.Fatalf("[%s] Invalid extension", test.name) + } + if !reflect.DeepEqual(*ext, want) { + t.Errorf("[%s] Wrong value for ComplexExtension: got: %s want: %s\n", test.name, ext, want) + } + } +} + +func TestClearAllExtensions(t *testing.T) { + // unregistered extension + desc := &proto.ExtensionDesc{ + ExtendedType: (*pb.MyMessage)(nil), + ExtensionType: (*bool)(nil), + Field: 101010100, + Name: "emptyextension", + Tag: "varint,0,opt", + } + m := &pb.MyMessage{} + if proto.HasExtension(m, desc) { + t.Errorf("proto.HasExtension(%s): got true, want false", proto.MarshalTextString(m)) + } + if err := proto.SetExtension(m, desc, proto.Bool(true)); err != nil { + t.Errorf("proto.SetExtension(m, desc, true): got error %q, want nil", err) + } + if !proto.HasExtension(m, desc) { + t.Errorf("proto.HasExtension(%s): got false, want true", proto.MarshalTextString(m)) + } + proto.ClearAllExtensions(m) + if proto.HasExtension(m, desc) { + t.Errorf("proto.HasExtension(%s): got true, want false", proto.MarshalTextString(m)) + } +} diff --git a/vendor/github.com/golang/protobuf/proto/message_set_test.go b/vendor/github.com/golang/protobuf/proto/message_set_test.go new file mode 100644 index 000000000..353a3ea76 --- /dev/null +++ b/vendor/github.com/golang/protobuf/proto/message_set_test.go @@ -0,0 +1,66 @@ +// Go support for Protocol Buffers - Google's data interchange format +// +// Copyright 2014 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 proto + +import ( + "bytes" + "testing" +) + +func TestUnmarshalMessageSetWithDuplicate(t *testing.T) { + // Check that a repeated message set entry will be concatenated. + in := &messageSet{ + Item: []*_MessageSet_Item{ + {TypeId: Int32(12345), Message: []byte("hoo")}, + {TypeId: Int32(12345), Message: []byte("hah")}, + }, + } + b, err := Marshal(in) + if err != nil { + t.Fatalf("Marshal: %v", err) + } + t.Logf("Marshaled bytes: %q", b) + + var extensions XXX_InternalExtensions + if err := UnmarshalMessageSet(b, &extensions); err != nil { + t.Fatalf("UnmarshalMessageSet: %v", err) + } + ext, ok := extensions.p.extensionMap[12345] + if !ok { + t.Fatalf("Didn't retrieve extension 12345; map is %v", extensions.p.extensionMap) + } + // Skip wire type/field number and length varints. + got := skipVarint(skipVarint(ext.enc)) + if want := []byte("hoohah"); !bytes.Equal(got, want) { + t.Errorf("Combined extension is %q, want %q", got, want) + } +} diff --git a/vendor/github.com/golang/protobuf/proto/properties.go b/vendor/github.com/golang/protobuf/proto/properties.go index dd29683c6..69ddda8d4 100644 --- a/vendor/github.com/golang/protobuf/proto/properties.go +++ b/vendor/github.com/golang/protobuf/proto/properties.go @@ -848,3 +848,17 @@ func MessageName(x Message) string { return revProtoTypes[reflect.TypeOf(x)] } // MessageType returns the message type (pointer to struct) for a named message. func MessageType(name string) reflect.Type { return protoTypes[name] } + +// A registry of all linked proto files. +var ( + protoFiles = make(map[string][]byte) // file name => fileDescriptor +) + +// RegisterFile is called from generated code and maps from the +// full file name of a .proto file to its compressed FileDescriptorProto. +func RegisterFile(filename string, fileDescriptor []byte) { + protoFiles[filename] = fileDescriptor +} + +// FileDescriptor returns the compressed FileDescriptorProto for a .proto file. +func FileDescriptor(filename string) []byte { return protoFiles[filename] } diff --git a/vendor/github.com/golang/protobuf/proto/proto3_proto/proto3.pb.go b/vendor/github.com/golang/protobuf/proto/proto3_proto/proto3.pb.go new file mode 100644 index 000000000..411f17f56 --- /dev/null +++ b/vendor/github.com/golang/protobuf/proto/proto3_proto/proto3.pb.go @@ -0,0 +1,198 @@ +// Code generated by protoc-gen-go. +// source: proto3_proto/proto3.proto +// DO NOT EDIT! + +/* +Package proto3_proto is a generated protocol buffer package. + +It is generated from these files: + proto3_proto/proto3.proto + +It has these top-level messages: + Message + Nested + MessageWithMap +*/ +package proto3_proto + +import proto "github.com/golang/protobuf/proto" +import fmt "fmt" +import math "math" +import google_protobuf "github.com/golang/protobuf/ptypes/any" +import testdata "github.com/golang/protobuf/proto/testdata" + +// 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. +const _ = proto.ProtoPackageIsVersion1 + +type Message_Humour int32 + +const ( + Message_UNKNOWN Message_Humour = 0 + Message_PUNS Message_Humour = 1 + Message_SLAPSTICK Message_Humour = 2 + Message_BILL_BAILEY Message_Humour = 3 +) + +var Message_Humour_name = map[int32]string{ + 0: "UNKNOWN", + 1: "PUNS", + 2: "SLAPSTICK", + 3: "BILL_BAILEY", +} +var Message_Humour_value = map[string]int32{ + "UNKNOWN": 0, + "PUNS": 1, + "SLAPSTICK": 2, + "BILL_BAILEY": 3, +} + +func (x Message_Humour) String() string { + return proto.EnumName(Message_Humour_name, int32(x)) +} +func (Message_Humour) EnumDescriptor() ([]byte, []int) { return fileDescriptor0, []int{0, 0} } + +type Message struct { + Name string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"` + Hilarity Message_Humour `protobuf:"varint,2,opt,name=hilarity,enum=proto3_proto.Message_Humour" json:"hilarity,omitempty"` + HeightInCm uint32 `protobuf:"varint,3,opt,name=height_in_cm,json=heightInCm" json:"height_in_cm,omitempty"` + Data []byte `protobuf:"bytes,4,opt,name=data,proto3" json:"data,omitempty"` + ResultCount int64 `protobuf:"varint,7,opt,name=result_count,json=resultCount" json:"result_count,omitempty"` + TrueScotsman bool `protobuf:"varint,8,opt,name=true_scotsman,json=trueScotsman" json:"true_scotsman,omitempty"` + Score float32 `protobuf:"fixed32,9,opt,name=score" json:"score,omitempty"` + Key []uint64 `protobuf:"varint,5,rep,name=key" json:"key,omitempty"` + Nested *Nested `protobuf:"bytes,6,opt,name=nested" json:"nested,omitempty"` + RFunny []Message_Humour `protobuf:"varint,16,rep,name=r_funny,json=rFunny,enum=proto3_proto.Message_Humour" json:"r_funny,omitempty"` + Terrain map[string]*Nested `protobuf:"bytes,10,rep,name=terrain" json:"terrain,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + Proto2Field *testdata.SubDefaults `protobuf:"bytes,11,opt,name=proto2_field,json=proto2Field" json:"proto2_field,omitempty"` + Proto2Value map[string]*testdata.SubDefaults `protobuf:"bytes,13,rep,name=proto2_value,json=proto2Value" json:"proto2_value,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + Anything *google_protobuf.Any `protobuf:"bytes,14,opt,name=anything" json:"anything,omitempty"` + ManyThings []*google_protobuf.Any `protobuf:"bytes,15,rep,name=many_things,json=manyThings" json:"many_things,omitempty"` +} + +func (m *Message) Reset() { *m = Message{} } +func (m *Message) String() string { return proto.CompactTextString(m) } +func (*Message) ProtoMessage() {} +func (*Message) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{0} } + +func (m *Message) GetNested() *Nested { + if m != nil { + return m.Nested + } + return nil +} + +func (m *Message) GetTerrain() map[string]*Nested { + if m != nil { + return m.Terrain + } + return nil +} + +func (m *Message) GetProto2Field() *testdata.SubDefaults { + if m != nil { + return m.Proto2Field + } + return nil +} + +func (m *Message) GetProto2Value() map[string]*testdata.SubDefaults { + if m != nil { + return m.Proto2Value + } + return nil +} + +func (m *Message) GetAnything() *google_protobuf.Any { + if m != nil { + return m.Anything + } + return nil +} + +func (m *Message) GetManyThings() []*google_protobuf.Any { + if m != nil { + return m.ManyThings + } + return nil +} + +type Nested struct { + Bunny string `protobuf:"bytes,1,opt,name=bunny" json:"bunny,omitempty"` +} + +func (m *Nested) Reset() { *m = Nested{} } +func (m *Nested) String() string { return proto.CompactTextString(m) } +func (*Nested) ProtoMessage() {} +func (*Nested) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{1} } + +type MessageWithMap struct { + ByteMapping map[bool][]byte `protobuf:"bytes,1,rep,name=byte_mapping,json=byteMapping" json:"byte_mapping,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value,proto3"` +} + +func (m *MessageWithMap) Reset() { *m = MessageWithMap{} } +func (m *MessageWithMap) String() string { return proto.CompactTextString(m) } +func (*MessageWithMap) ProtoMessage() {} +func (*MessageWithMap) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{2} } + +func (m *MessageWithMap) GetByteMapping() map[bool][]byte { + if m != nil { + return m.ByteMapping + } + return nil +} + +func init() { + proto.RegisterType((*Message)(nil), "proto3_proto.Message") + proto.RegisterType((*Nested)(nil), "proto3_proto.Nested") + proto.RegisterType((*MessageWithMap)(nil), "proto3_proto.MessageWithMap") + proto.RegisterEnum("proto3_proto.Message_Humour", Message_Humour_name, Message_Humour_value) +} + +var fileDescriptor0 = []byte{ + // 617 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0x84, 0x92, 0x5d, 0x6b, 0xdb, 0x3c, + 0x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b9, 0x94, 0x4e, 0x20, 0x25, 0xea, 0xeb, 0x8d, 0x86, 0x96, 0x39, 0xfe, 0x49, 0x21, + 0xd8, 0xa5, 0xe6, 0x4b, 0x5f, 0xc7, 0x77, 0x91, 0xf6, 0x07, 0x70, 0x1e, 0x02, 0x55, 0x71, 0x9a, + 0x5a, 0x9c, 0xbd, 0xaa, 0x38, 0x76, 0x45, 0x85, 0xb1, 0xa9, 0x5b, 0xff, 0x0e, 0x00, 0x00, 0xff, + 0xff, 0x54, 0x4a, 0xfa, 0x41, 0xa1, 0x04, 0x00, 0x00, +} diff --git a/vendor/github.com/golang/protobuf/proto/proto3_proto/proto3.proto b/vendor/github.com/golang/protobuf/proto/proto3_proto/proto3.proto new file mode 100644 index 000000000..31509e48f --- /dev/null +++ b/vendor/github.com/golang/protobuf/proto/proto3_proto/proto3.proto @@ -0,0 +1,73 @@ +// Go support for Protocol Buffers - Google's data interchange format +// +// Copyright 2014 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. + +syntax = "proto3"; + +import "google/protobuf/any.proto"; +import "testdata/test.proto"; + +package proto3_proto; + +message Message { + enum Humour { + UNKNOWN = 0; + PUNS = 1; + SLAPSTICK = 2; + BILL_BAILEY = 3; + } + + string name = 1; + Humour hilarity = 2; + uint32 height_in_cm = 3; + bytes data = 4; + int64 result_count = 7; + bool true_scotsman = 8; + float score = 9; + + repeated uint64 key = 5; + Nested nested = 6; + repeated Humour r_funny = 16; + + map terrain = 10; + testdata.SubDefaults proto2_field = 11; + map proto2_value = 13; + + google.protobuf.Any anything = 14; + repeated google.protobuf.Any many_things = 15; +} + +message Nested { + string bunny = 1; +} + +message MessageWithMap { + map byte_mapping = 1; +} diff --git a/vendor/github.com/golang/protobuf/proto/proto3_test.go b/vendor/github.com/golang/protobuf/proto/proto3_test.go new file mode 100644 index 000000000..462f8055c --- /dev/null +++ b/vendor/github.com/golang/protobuf/proto/proto3_test.go @@ -0,0 +1,125 @@ +// Go support for Protocol Buffers - Google's data interchange format +// +// Copyright 2014 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 proto_test + +import ( + "testing" + + "github.com/golang/protobuf/proto" + pb "github.com/golang/protobuf/proto/proto3_proto" + tpb "github.com/golang/protobuf/proto/testdata" +) + +func TestProto3ZeroValues(t *testing.T) { + tests := []struct { + desc string + m proto.Message + }{ + {"zero message", &pb.Message{}}, + {"empty bytes field", &pb.Message{Data: []byte{}}}, + } + for _, test := range tests { + b, err := proto.Marshal(test.m) + if err != nil { + t.Errorf("%s: proto.Marshal: %v", test.desc, err) + continue + } + if len(b) > 0 { + t.Errorf("%s: Encoding is non-empty: %q", test.desc, b) + } + } +} + +func TestRoundTripProto3(t *testing.T) { + m := &pb.Message{ + Name: "David", // (2 | 1<<3): 0x0a 0x05 "David" + Hilarity: pb.Message_PUNS, // (0 | 2<<3): 0x10 0x01 + HeightInCm: 178, // (0 | 3<<3): 0x18 0xb2 0x01 + Data: []byte("roboto"), // (2 | 4<<3): 0x20 0x06 "roboto" + ResultCount: 47, // (0 | 7<<3): 0x38 0x2f + TrueScotsman: true, // (0 | 8<<3): 0x40 0x01 + Score: 8.1, // (5 | 9<<3): 0x4d <8.1> + + Key: []uint64{1, 0xdeadbeef}, + Nested: &pb.Nested{ + Bunny: "Monty", + }, + } + t.Logf(" m: %v", m) + + b, err := proto.Marshal(m) + if err != nil { + t.Fatalf("proto.Marshal: %v", err) + } + t.Logf(" b: %q", b) + + m2 := new(pb.Message) + if err := proto.Unmarshal(b, m2); err != nil { + t.Fatalf("proto.Unmarshal: %v", err) + } + t.Logf("m2: %v", m2) + + if !proto.Equal(m, m2) { + t.Errorf("proto.Equal returned false:\n m: %v\nm2: %v", m, m2) + } +} + +func TestProto3SetDefaults(t *testing.T) { + in := &pb.Message{ + Terrain: map[string]*pb.Nested{ + "meadow": new(pb.Nested), + }, + Proto2Field: new(tpb.SubDefaults), + Proto2Value: map[string]*tpb.SubDefaults{ + "badlands": new(tpb.SubDefaults), + }, + } + + got := proto.Clone(in).(*pb.Message) + proto.SetDefaults(got) + + // There are no defaults in proto3. Everything should be the zero value, but + // we need to remember to set defaults for nested proto2 messages. + want := &pb.Message{ + Terrain: map[string]*pb.Nested{ + "meadow": new(pb.Nested), + }, + Proto2Field: &tpb.SubDefaults{N: proto.Int64(7)}, + Proto2Value: map[string]*tpb.SubDefaults{ + "badlands": &tpb.SubDefaults{N: proto.Int64(7)}, + }, + } + + if !proto.Equal(got, want) { + t.Errorf("with in = %v\nproto.SetDefaults(in) =>\ngot %v\nwant %v", in, got, want) + } +} diff --git a/vendor/github.com/golang/protobuf/proto/size2_test.go b/vendor/github.com/golang/protobuf/proto/size2_test.go new file mode 100644 index 000000000..a2729c39a --- /dev/null +++ b/vendor/github.com/golang/protobuf/proto/size2_test.go @@ -0,0 +1,63 @@ +// Go support for Protocol Buffers - Google's data interchange format +// +// Copyright 2012 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 proto + +import ( + "testing" +) + +// This is a separate file and package from size_test.go because that one uses +// generated messages and thus may not be in package proto without having a circular +// dependency, whereas this file tests unexported details of size.go. + +func TestVarintSize(t *testing.T) { + // Check the edge cases carefully. + testCases := []struct { + n uint64 + size int + }{ + {0, 1}, + {1, 1}, + {127, 1}, + {128, 2}, + {16383, 2}, + {16384, 3}, + {1<<63 - 1, 9}, + {1 << 63, 10}, + } + for _, tc := range testCases { + size := sizeVarint(tc.n) + if size != tc.size { + t.Errorf("sizeVarint(%d) = %d, want %d", tc.n, size, tc.size) + } + } +} diff --git a/vendor/github.com/golang/protobuf/proto/size_test.go b/vendor/github.com/golang/protobuf/proto/size_test.go new file mode 100644 index 000000000..af1034dc7 --- /dev/null +++ b/vendor/github.com/golang/protobuf/proto/size_test.go @@ -0,0 +1,164 @@ +// Go support for Protocol Buffers - Google's data interchange format +// +// Copyright 2012 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 proto_test + +import ( + "log" + "strings" + "testing" + + . "github.com/golang/protobuf/proto" + proto3pb "github.com/golang/protobuf/proto/proto3_proto" + pb "github.com/golang/protobuf/proto/testdata" +) + +var messageWithExtension1 = &pb.MyMessage{Count: Int32(7)} + +// messageWithExtension2 is in equal_test.go. +var messageWithExtension3 = &pb.MyMessage{Count: Int32(8)} + +func init() { + if err := SetExtension(messageWithExtension1, pb.E_Ext_More, &pb.Ext{Data: String("Abbott")}); err != nil { + log.Panicf("SetExtension: %v", err) + } + if err := SetExtension(messageWithExtension3, pb.E_Ext_More, &pb.Ext{Data: String("Costello")}); err != nil { + log.Panicf("SetExtension: %v", err) + } + + // Force messageWithExtension3 to have the extension encoded. + Marshal(messageWithExtension3) + +} + +var SizeTests = []struct { + desc string + pb Message +}{ + {"empty", &pb.OtherMessage{}}, + // Basic types. + {"bool", &pb.Defaults{F_Bool: Bool(true)}}, + {"int32", &pb.Defaults{F_Int32: Int32(12)}}, + {"negative int32", &pb.Defaults{F_Int32: Int32(-1)}}, + {"small int64", &pb.Defaults{F_Int64: Int64(1)}}, + {"big int64", &pb.Defaults{F_Int64: Int64(1 << 20)}}, + {"negative int64", &pb.Defaults{F_Int64: Int64(-1)}}, + {"fixed32", &pb.Defaults{F_Fixed32: Uint32(71)}}, + {"fixed64", &pb.Defaults{F_Fixed64: Uint64(72)}}, + {"uint32", &pb.Defaults{F_Uint32: Uint32(123)}}, + {"uint64", &pb.Defaults{F_Uint64: Uint64(124)}}, + {"float", &pb.Defaults{F_Float: Float32(12.6)}}, + {"double", &pb.Defaults{F_Double: Float64(13.9)}}, + {"string", &pb.Defaults{F_String: String("niles")}}, + {"bytes", &pb.Defaults{F_Bytes: []byte("wowsa")}}, + {"bytes, empty", &pb.Defaults{F_Bytes: []byte{}}}, + {"sint32", &pb.Defaults{F_Sint32: Int32(65)}}, + {"sint64", &pb.Defaults{F_Sint64: Int64(67)}}, + {"enum", &pb.Defaults{F_Enum: pb.Defaults_BLUE.Enum()}}, + // Repeated. + {"empty repeated bool", &pb.MoreRepeated{Bools: []bool{}}}, + {"repeated bool", &pb.MoreRepeated{Bools: []bool{false, true, true, false}}}, + {"packed repeated bool", &pb.MoreRepeated{BoolsPacked: []bool{false, true, true, false, true, true, true}}}, + {"repeated int32", &pb.MoreRepeated{Ints: []int32{1, 12203, 1729, -1}}}, + {"repeated int32 packed", &pb.MoreRepeated{IntsPacked: []int32{1, 12203, 1729}}}, + {"repeated int64 packed", &pb.MoreRepeated{Int64SPacked: []int64{ + // Need enough large numbers to verify that the header is counting the number of bytes + // for the field, not the number of elements. + 1 << 62, 1 << 62, 1 << 62, 1 << 62, 1 << 62, 1 << 62, 1 << 62, 1 << 62, 1 << 62, 1 << 62, + 1 << 62, 1 << 62, 1 << 62, 1 << 62, 1 << 62, 1 << 62, 1 << 62, 1 << 62, 1 << 62, 1 << 62, + }}}, + {"repeated string", &pb.MoreRepeated{Strings: []string{"r", "ken", "gri"}}}, + {"repeated fixed", &pb.MoreRepeated{Fixeds: []uint32{1, 2, 3, 4}}}, + // Nested. + {"nested", &pb.OldMessage{Nested: &pb.OldMessage_Nested{Name: String("whatever")}}}, + {"group", &pb.GroupOld{G: &pb.GroupOld_G{X: Int32(12345)}}}, + // Other things. + {"unrecognized", &pb.MoreRepeated{XXX_unrecognized: []byte{13<<3 | 0, 4}}}, + {"extension (unencoded)", messageWithExtension1}, + {"extension (encoded)", messageWithExtension3}, + // proto3 message + {"proto3 empty", &proto3pb.Message{}}, + {"proto3 bool", &proto3pb.Message{TrueScotsman: true}}, + {"proto3 int64", &proto3pb.Message{ResultCount: 1}}, + {"proto3 uint32", &proto3pb.Message{HeightInCm: 123}}, + {"proto3 float", &proto3pb.Message{Score: 12.6}}, + {"proto3 string", &proto3pb.Message{Name: "Snezana"}}, + {"proto3 bytes", &proto3pb.Message{Data: []byte("wowsa")}}, + {"proto3 bytes, empty", &proto3pb.Message{Data: []byte{}}}, + {"proto3 enum", &proto3pb.Message{Hilarity: proto3pb.Message_PUNS}}, + {"proto3 map field with empty bytes", &proto3pb.MessageWithMap{ByteMapping: map[bool][]byte{false: []byte{}}}}, + + {"map field", &pb.MessageWithMap{NameMapping: map[int32]string{1: "Rob", 7: "Andrew"}}}, + {"map field with message", &pb.MessageWithMap{MsgMapping: map[int64]*pb.FloatingPoint{0x7001: &pb.FloatingPoint{F: Float64(2.0)}}}}, + {"map field with bytes", &pb.MessageWithMap{ByteMapping: map[bool][]byte{true: []byte("this time for sure")}}}, + {"map field with empty bytes", &pb.MessageWithMap{ByteMapping: map[bool][]byte{true: []byte{}}}}, + + {"map field with big entry", &pb.MessageWithMap{NameMapping: map[int32]string{8: strings.Repeat("x", 125)}}}, + {"map field with big key and val", &pb.MessageWithMap{StrToStr: map[string]string{strings.Repeat("x", 70): strings.Repeat("y", 70)}}}, + {"map field with big numeric key", &pb.MessageWithMap{NameMapping: map[int32]string{0xf00d: "om nom nom"}}}, + + {"oneof not set", &pb.Oneof{}}, + {"oneof bool", &pb.Oneof{Union: &pb.Oneof_F_Bool{true}}}, + {"oneof zero int32", &pb.Oneof{Union: &pb.Oneof_F_Int32{0}}}, + {"oneof big int32", &pb.Oneof{Union: &pb.Oneof_F_Int32{1 << 20}}}, + {"oneof int64", &pb.Oneof{Union: &pb.Oneof_F_Int64{42}}}, + {"oneof fixed32", &pb.Oneof{Union: &pb.Oneof_F_Fixed32{43}}}, + {"oneof fixed64", &pb.Oneof{Union: &pb.Oneof_F_Fixed64{44}}}, + {"oneof uint32", &pb.Oneof{Union: &pb.Oneof_F_Uint32{45}}}, + {"oneof uint64", &pb.Oneof{Union: &pb.Oneof_F_Uint64{46}}}, + {"oneof float", &pb.Oneof{Union: &pb.Oneof_F_Float{47.1}}}, + {"oneof double", &pb.Oneof{Union: &pb.Oneof_F_Double{48.9}}}, + {"oneof string", &pb.Oneof{Union: &pb.Oneof_F_String{"Rhythmic Fman"}}}, + {"oneof bytes", &pb.Oneof{Union: &pb.Oneof_F_Bytes{[]byte("let go")}}}, + {"oneof sint32", &pb.Oneof{Union: &pb.Oneof_F_Sint32{50}}}, + {"oneof sint64", &pb.Oneof{Union: &pb.Oneof_F_Sint64{51}}}, + {"oneof enum", &pb.Oneof{Union: &pb.Oneof_F_Enum{pb.MyMessage_BLUE}}}, + {"message for oneof", &pb.GoTestField{Label: String("k"), Type: String("v")}}, + {"oneof message", &pb.Oneof{Union: &pb.Oneof_F_Message{&pb.GoTestField{Label: String("k"), Type: String("v")}}}}, + {"oneof group", &pb.Oneof{Union: &pb.Oneof_FGroup{&pb.Oneof_F_Group{X: Int32(52)}}}}, + {"oneof largest tag", &pb.Oneof{Union: &pb.Oneof_F_Largest_Tag{1}}}, + {"multiple oneofs", &pb.Oneof{Union: &pb.Oneof_F_Int32{1}, Tormato: &pb.Oneof_Value{2}}}, +} + +func TestSize(t *testing.T) { + for _, tc := range SizeTests { + size := Size(tc.pb) + b, err := Marshal(tc.pb) + if err != nil { + t.Errorf("%v: Marshal failed: %v", tc.desc, err) + continue + } + if size != len(b) { + t.Errorf("%v: Size(%v) = %d, want %d", tc.desc, tc.pb, size, len(b)) + t.Logf("%v: bytes: %#v", tc.desc, b) + } + } +} diff --git a/vendor/github.com/golang/protobuf/proto/testdata/Makefile b/vendor/github.com/golang/protobuf/proto/testdata/Makefile new file mode 100644 index 000000000..fc288628a --- /dev/null +++ b/vendor/github.com/golang/protobuf/proto/testdata/Makefile @@ -0,0 +1,50 @@ +# 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. + + +include ../../Make.protobuf + +all: regenerate + +regenerate: + rm -f test.pb.go + make test.pb.go + +# The following rules are just aids to development. Not needed for typical testing. + +diff: regenerate + git diff test.pb.go + +restore: + cp test.pb.go.golden test.pb.go + +preserve: + cp test.pb.go test.pb.go.golden diff --git a/vendor/github.com/golang/protobuf/proto/testdata/golden_test.go b/vendor/github.com/golang/protobuf/proto/testdata/golden_test.go new file mode 100644 index 000000000..7172d0e96 --- /dev/null +++ b/vendor/github.com/golang/protobuf/proto/testdata/golden_test.go @@ -0,0 +1,86 @@ +// Go support for Protocol Buffers - Google's data interchange format +// +// Copyright 2012 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. + +// Verify that the compiler output for test.proto is unchanged. + +package testdata + +import ( + "crypto/sha1" + "fmt" + "io/ioutil" + "os" + "os/exec" + "path/filepath" + "testing" +) + +// sum returns in string form (for easy comparison) the SHA-1 hash of the named file. +func sum(t *testing.T, name string) string { + data, err := ioutil.ReadFile(name) + if err != nil { + t.Fatal(err) + } + t.Logf("sum(%q): length is %d", name, len(data)) + hash := sha1.New() + _, err = hash.Write(data) + if err != nil { + t.Fatal(err) + } + return fmt.Sprintf("% x", hash.Sum(nil)) +} + +func run(t *testing.T, name string, args ...string) { + cmd := exec.Command(name, args...) + cmd.Stdin = os.Stdin + cmd.Stdout = os.Stdout + cmd.Stderr = os.Stderr + err := cmd.Run() + if err != nil { + t.Fatal(err) + } +} + +func TestGolden(t *testing.T) { + // Compute the original checksum. + goldenSum := sum(t, "test.pb.go") + // Run the proto compiler. + run(t, "protoc", "--go_out="+os.TempDir(), "test.proto") + newFile := filepath.Join(os.TempDir(), "test.pb.go") + defer os.Remove(newFile) + // Compute the new checksum. + newSum := sum(t, newFile) + // Verify + if newSum != goldenSum { + run(t, "diff", "-u", "test.pb.go", newFile) + t.Fatal("Code generated by protoc-gen-go has changed; update test.pb.go") + } +} diff --git a/vendor/github.com/golang/protobuf/proto/testdata/test.pb.go b/vendor/github.com/golang/protobuf/proto/testdata/test.pb.go new file mode 100644 index 000000000..c734a50cf --- /dev/null +++ b/vendor/github.com/golang/protobuf/proto/testdata/test.pb.go @@ -0,0 +1,4004 @@ +// Code generated by protoc-gen-go. +// source: test.proto +// DO NOT EDIT! + +/* +Package testdata is a generated protocol buffer package. + +It is generated from these files: + test.proto + +It has these top-level messages: + GoEnum + GoTestField + GoTest + GoSkipTest + NonPackedTest + PackedTest + MaxTag + OldMessage + NewMessage + InnerMessage + OtherMessage + RequiredInnerMessage + MyMessage + Ext + ComplexExtension + DefaultsMessage + MyMessageSet + Empty + MessageList + Strings + Defaults + SubDefaults + RepeatedEnum + MoreRepeated + GroupOld + GroupNew + FloatingPoint + MessageWithMap + Oneof + Communique +*/ +package testdata + +import proto "github.com/golang/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.ProtoPackageIsVersion2 // please upgrade the proto package + +type FOO int32 + +const ( + FOO_FOO1 FOO = 1 +) + +var FOO_name = map[int32]string{ + 1: "FOO1", +} +var FOO_value = map[string]int32{ + "FOO1": 1, +} + +func (x FOO) Enum() *FOO { + p := new(FOO) + *p = x + return p +} +func (x FOO) String() string { + return proto.EnumName(FOO_name, int32(x)) +} +func (x *FOO) UnmarshalJSON(data []byte) error { + value, err := proto.UnmarshalJSONEnum(FOO_value, data, "FOO") + if err != nil { + return err + } + *x = FOO(value) + return nil +} +func (FOO) EnumDescriptor() ([]byte, []int) { return fileDescriptor0, []int{0} } + +// An enum, for completeness. +type GoTest_KIND int32 + +const ( + GoTest_VOID GoTest_KIND = 0 + // Basic types + GoTest_BOOL GoTest_KIND = 1 + GoTest_BYTES GoTest_KIND = 2 + GoTest_FINGERPRINT GoTest_KIND = 3 + GoTest_FLOAT GoTest_KIND = 4 + GoTest_INT GoTest_KIND = 5 + GoTest_STRING GoTest_KIND = 6 + GoTest_TIME GoTest_KIND = 7 + // Groupings + GoTest_TUPLE GoTest_KIND = 8 + GoTest_ARRAY GoTest_KIND = 9 + GoTest_MAP GoTest_KIND = 10 + // Table types + GoTest_TABLE GoTest_KIND = 11 + // Functions + GoTest_FUNCTION GoTest_KIND = 12 +) + +var GoTest_KIND_name = map[int32]string{ + 0: "VOID", + 1: "BOOL", + 2: "BYTES", + 3: "FINGERPRINT", + 4: "FLOAT", + 5: "INT", + 6: "STRING", + 7: "TIME", + 8: "TUPLE", + 9: "ARRAY", + 10: "MAP", + 11: "TABLE", + 12: "FUNCTION", +} +var GoTest_KIND_value = map[string]int32{ + "VOID": 0, + "BOOL": 1, + "BYTES": 2, + "FINGERPRINT": 3, + "FLOAT": 4, + "INT": 5, + "STRING": 6, + "TIME": 7, + "TUPLE": 8, + "ARRAY": 9, + "MAP": 10, + "TABLE": 11, + "FUNCTION": 12, +} + +func (x GoTest_KIND) Enum() *GoTest_KIND { + p := new(GoTest_KIND) + *p = x + return p +} +func (x GoTest_KIND) String() string { + return proto.EnumName(GoTest_KIND_name, int32(x)) +} +func (x *GoTest_KIND) UnmarshalJSON(data []byte) error { + value, err := proto.UnmarshalJSONEnum(GoTest_KIND_value, data, "GoTest_KIND") + if err != nil { + return err + } + *x = GoTest_KIND(value) + return nil +} +func (GoTest_KIND) EnumDescriptor() ([]byte, []int) { return fileDescriptor0, []int{2, 0} } + +type MyMessage_Color int32 + +const ( + MyMessage_RED MyMessage_Color = 0 + MyMessage_GREEN MyMessage_Color = 1 + MyMessage_BLUE MyMessage_Color = 2 +) + +var MyMessage_Color_name = map[int32]string{ + 0: "RED", + 1: "GREEN", + 2: "BLUE", +} +var MyMessage_Color_value = map[string]int32{ + "RED": 0, + "GREEN": 1, + "BLUE": 2, +} + +func (x MyMessage_Color) Enum() *MyMessage_Color { + p := new(MyMessage_Color) + *p = x + return p +} +func (x MyMessage_Color) String() string { + return proto.EnumName(MyMessage_Color_name, int32(x)) +} +func (x *MyMessage_Color) UnmarshalJSON(data []byte) error { + value, err := proto.UnmarshalJSONEnum(MyMessage_Color_value, data, "MyMessage_Color") + if err != nil { + return err + } + *x = MyMessage_Color(value) + return nil +} +func (MyMessage_Color) EnumDescriptor() ([]byte, []int) { return fileDescriptor0, []int{12, 0} } + +type DefaultsMessage_DefaultsEnum int32 + +const ( + DefaultsMessage_ZERO DefaultsMessage_DefaultsEnum = 0 + DefaultsMessage_ONE DefaultsMessage_DefaultsEnum = 1 + DefaultsMessage_TWO DefaultsMessage_DefaultsEnum = 2 +) + +var DefaultsMessage_DefaultsEnum_name = map[int32]string{ + 0: "ZERO", + 1: "ONE", + 2: "TWO", +} +var DefaultsMessage_DefaultsEnum_value = map[string]int32{ + "ZERO": 0, + "ONE": 1, + "TWO": 2, +} + +func (x DefaultsMessage_DefaultsEnum) Enum() *DefaultsMessage_DefaultsEnum { + p := new(DefaultsMessage_DefaultsEnum) + *p = x + return p +} +func (x DefaultsMessage_DefaultsEnum) String() string { + return proto.EnumName(DefaultsMessage_DefaultsEnum_name, int32(x)) +} +func (x *DefaultsMessage_DefaultsEnum) UnmarshalJSON(data []byte) error { + value, err := proto.UnmarshalJSONEnum(DefaultsMessage_DefaultsEnum_value, data, "DefaultsMessage_DefaultsEnum") + if err != nil { + return err + } + *x = DefaultsMessage_DefaultsEnum(value) + return nil +} +func (DefaultsMessage_DefaultsEnum) EnumDescriptor() ([]byte, []int) { + return fileDescriptor0, []int{15, 0} +} + +type Defaults_Color int32 + +const ( + Defaults_RED Defaults_Color = 0 + Defaults_GREEN Defaults_Color = 1 + Defaults_BLUE Defaults_Color = 2 +) + +var Defaults_Color_name = map[int32]string{ + 0: "RED", + 1: "GREEN", + 2: "BLUE", +} +var Defaults_Color_value = map[string]int32{ + "RED": 0, + "GREEN": 1, + "BLUE": 2, +} + +func (x Defaults_Color) Enum() *Defaults_Color { + p := new(Defaults_Color) + *p = x + return p +} +func (x Defaults_Color) String() string { + return proto.EnumName(Defaults_Color_name, int32(x)) +} +func (x *Defaults_Color) UnmarshalJSON(data []byte) error { + value, err := proto.UnmarshalJSONEnum(Defaults_Color_value, data, "Defaults_Color") + if err != nil { + return err + } + *x = Defaults_Color(value) + return nil +} +func (Defaults_Color) EnumDescriptor() ([]byte, []int) { return fileDescriptor0, []int{20, 0} } + +type RepeatedEnum_Color int32 + +const ( + RepeatedEnum_RED RepeatedEnum_Color = 1 +) + +var RepeatedEnum_Color_name = map[int32]string{ + 1: "RED", +} +var RepeatedEnum_Color_value = map[string]int32{ + "RED": 1, +} + +func (x RepeatedEnum_Color) Enum() *RepeatedEnum_Color { + p := new(RepeatedEnum_Color) + *p = x + return p +} +func (x RepeatedEnum_Color) String() string { + return proto.EnumName(RepeatedEnum_Color_name, int32(x)) +} +func (x *RepeatedEnum_Color) UnmarshalJSON(data []byte) error { + value, err := proto.UnmarshalJSONEnum(RepeatedEnum_Color_value, data, "RepeatedEnum_Color") + if err != nil { + return err + } + *x = RepeatedEnum_Color(value) + return nil +} +func (RepeatedEnum_Color) EnumDescriptor() ([]byte, []int) { return fileDescriptor0, []int{22, 0} } + +type GoEnum struct { + Foo *FOO `protobuf:"varint,1,req,name=foo,enum=testdata.FOO" json:"foo,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *GoEnum) Reset() { *m = GoEnum{} } +func (m *GoEnum) String() string { return proto.CompactTextString(m) } +func (*GoEnum) ProtoMessage() {} +func (*GoEnum) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{0} } + +func (m *GoEnum) GetFoo() FOO { + if m != nil && m.Foo != nil { + return *m.Foo + } + return FOO_FOO1 +} + +type GoTestField struct { + Label *string `protobuf:"bytes,1,req,name=Label,json=label" json:"Label,omitempty"` + Type *string `protobuf:"bytes,2,req,name=Type,json=type" json:"Type,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *GoTestField) Reset() { *m = GoTestField{} } +func (m *GoTestField) String() string { return proto.CompactTextString(m) } +func (*GoTestField) ProtoMessage() {} +func (*GoTestField) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{1} } + +func (m *GoTestField) GetLabel() string { + if m != nil && m.Label != nil { + return *m.Label + } + return "" +} + +func (m *GoTestField) GetType() string { + if m != nil && m.Type != nil { + return *m.Type + } + return "" +} + +type GoTest struct { + // Some typical parameters + Kind *GoTest_KIND `protobuf:"varint,1,req,name=Kind,json=kind,enum=testdata.GoTest_KIND" json:"Kind,omitempty"` + Table *string `protobuf:"bytes,2,opt,name=Table,json=table" json:"Table,omitempty"` + Param *int32 `protobuf:"varint,3,opt,name=Param,json=param" json:"Param,omitempty"` + // Required, repeated and optional foreign fields. + RequiredField *GoTestField `protobuf:"bytes,4,req,name=RequiredField,json=requiredField" json:"RequiredField,omitempty"` + RepeatedField []*GoTestField `protobuf:"bytes,5,rep,name=RepeatedField,json=repeatedField" json:"RepeatedField,omitempty"` + OptionalField *GoTestField `protobuf:"bytes,6,opt,name=OptionalField,json=optionalField" json:"OptionalField,omitempty"` + // Required fields of all basic types + F_BoolRequired *bool `protobuf:"varint,10,req,name=F_Bool_required,json=fBoolRequired" json:"F_Bool_required,omitempty"` + F_Int32Required *int32 `protobuf:"varint,11,req,name=F_Int32_required,json=fInt32Required" json:"F_Int32_required,omitempty"` + F_Int64Required *int64 `protobuf:"varint,12,req,name=F_Int64_required,json=fInt64Required" json:"F_Int64_required,omitempty"` + F_Fixed32Required *uint32 `protobuf:"fixed32,13,req,name=F_Fixed32_required,json=fFixed32Required" json:"F_Fixed32_required,omitempty"` + F_Fixed64Required *uint64 `protobuf:"fixed64,14,req,name=F_Fixed64_required,json=fFixed64Required" json:"F_Fixed64_required,omitempty"` + F_Uint32Required *uint32 `protobuf:"varint,15,req,name=F_Uint32_required,json=fUint32Required" json:"F_Uint32_required,omitempty"` + F_Uint64Required *uint64 `protobuf:"varint,16,req,name=F_Uint64_required,json=fUint64Required" json:"F_Uint64_required,omitempty"` + F_FloatRequired *float32 `protobuf:"fixed32,17,req,name=F_Float_required,json=fFloatRequired" json:"F_Float_required,omitempty"` + F_DoubleRequired *float64 `protobuf:"fixed64,18,req,name=F_Double_required,json=fDoubleRequired" json:"F_Double_required,omitempty"` + F_StringRequired *string `protobuf:"bytes,19,req,name=F_String_required,json=fStringRequired" json:"F_String_required,omitempty"` + F_BytesRequired []byte `protobuf:"bytes,101,req,name=F_Bytes_required,json=fBytesRequired" json:"F_Bytes_required,omitempty"` + F_Sint32Required *int32 `protobuf:"zigzag32,102,req,name=F_Sint32_required,json=fSint32Required" json:"F_Sint32_required,omitempty"` + F_Sint64Required *int64 `protobuf:"zigzag64,103,req,name=F_Sint64_required,json=fSint64Required" json:"F_Sint64_required,omitempty"` + // Repeated fields of all basic types + F_BoolRepeated []bool `protobuf:"varint,20,rep,name=F_Bool_repeated,json=fBoolRepeated" json:"F_Bool_repeated,omitempty"` + F_Int32Repeated []int32 `protobuf:"varint,21,rep,name=F_Int32_repeated,json=fInt32Repeated" json:"F_Int32_repeated,omitempty"` + F_Int64Repeated []int64 `protobuf:"varint,22,rep,name=F_Int64_repeated,json=fInt64Repeated" json:"F_Int64_repeated,omitempty"` + F_Fixed32Repeated []uint32 `protobuf:"fixed32,23,rep,name=F_Fixed32_repeated,json=fFixed32Repeated" json:"F_Fixed32_repeated,omitempty"` + F_Fixed64Repeated []uint64 `protobuf:"fixed64,24,rep,name=F_Fixed64_repeated,json=fFixed64Repeated" json:"F_Fixed64_repeated,omitempty"` + F_Uint32Repeated []uint32 `protobuf:"varint,25,rep,name=F_Uint32_repeated,json=fUint32Repeated" json:"F_Uint32_repeated,omitempty"` + F_Uint64Repeated []uint64 `protobuf:"varint,26,rep,name=F_Uint64_repeated,json=fUint64Repeated" json:"F_Uint64_repeated,omitempty"` + F_FloatRepeated []float32 `protobuf:"fixed32,27,rep,name=F_Float_repeated,json=fFloatRepeated" json:"F_Float_repeated,omitempty"` + F_DoubleRepeated []float64 `protobuf:"fixed64,28,rep,name=F_Double_repeated,json=fDoubleRepeated" json:"F_Double_repeated,omitempty"` + F_StringRepeated []string `protobuf:"bytes,29,rep,name=F_String_repeated,json=fStringRepeated" json:"F_String_repeated,omitempty"` + F_BytesRepeated [][]byte `protobuf:"bytes,201,rep,name=F_Bytes_repeated,json=fBytesRepeated" json:"F_Bytes_repeated,omitempty"` + F_Sint32Repeated []int32 `protobuf:"zigzag32,202,rep,name=F_Sint32_repeated,json=fSint32Repeated" json:"F_Sint32_repeated,omitempty"` + F_Sint64Repeated []int64 `protobuf:"zigzag64,203,rep,name=F_Sint64_repeated,json=fSint64Repeated" json:"F_Sint64_repeated,omitempty"` + // Optional fields of all basic types + F_BoolOptional *bool `protobuf:"varint,30,opt,name=F_Bool_optional,json=fBoolOptional" json:"F_Bool_optional,omitempty"` + F_Int32Optional *int32 `protobuf:"varint,31,opt,name=F_Int32_optional,json=fInt32Optional" json:"F_Int32_optional,omitempty"` + F_Int64Optional *int64 `protobuf:"varint,32,opt,name=F_Int64_optional,json=fInt64Optional" json:"F_Int64_optional,omitempty"` + F_Fixed32Optional *uint32 `protobuf:"fixed32,33,opt,name=F_Fixed32_optional,json=fFixed32Optional" json:"F_Fixed32_optional,omitempty"` + F_Fixed64Optional *uint64 `protobuf:"fixed64,34,opt,name=F_Fixed64_optional,json=fFixed64Optional" json:"F_Fixed64_optional,omitempty"` + F_Uint32Optional *uint32 `protobuf:"varint,35,opt,name=F_Uint32_optional,json=fUint32Optional" json:"F_Uint32_optional,omitempty"` + F_Uint64Optional *uint64 `protobuf:"varint,36,opt,name=F_Uint64_optional,json=fUint64Optional" json:"F_Uint64_optional,omitempty"` + F_FloatOptional *float32 `protobuf:"fixed32,37,opt,name=F_Float_optional,json=fFloatOptional" json:"F_Float_optional,omitempty"` + F_DoubleOptional *float64 `protobuf:"fixed64,38,opt,name=F_Double_optional,json=fDoubleOptional" json:"F_Double_optional,omitempty"` + F_StringOptional *string `protobuf:"bytes,39,opt,name=F_String_optional,json=fStringOptional" json:"F_String_optional,omitempty"` + F_BytesOptional []byte `protobuf:"bytes,301,opt,name=F_Bytes_optional,json=fBytesOptional" json:"F_Bytes_optional,omitempty"` + F_Sint32Optional *int32 `protobuf:"zigzag32,302,opt,name=F_Sint32_optional,json=fSint32Optional" json:"F_Sint32_optional,omitempty"` + F_Sint64Optional *int64 `protobuf:"zigzag64,303,opt,name=F_Sint64_optional,json=fSint64Optional" json:"F_Sint64_optional,omitempty"` + // Default-valued fields of all basic types + F_BoolDefaulted *bool `protobuf:"varint,40,opt,name=F_Bool_defaulted,json=fBoolDefaulted,def=1" json:"F_Bool_defaulted,omitempty"` + F_Int32Defaulted *int32 `protobuf:"varint,41,opt,name=F_Int32_defaulted,json=fInt32Defaulted,def=32" json:"F_Int32_defaulted,omitempty"` + F_Int64Defaulted *int64 `protobuf:"varint,42,opt,name=F_Int64_defaulted,json=fInt64Defaulted,def=64" json:"F_Int64_defaulted,omitempty"` + F_Fixed32Defaulted *uint32 `protobuf:"fixed32,43,opt,name=F_Fixed32_defaulted,json=fFixed32Defaulted,def=320" json:"F_Fixed32_defaulted,omitempty"` + F_Fixed64Defaulted *uint64 `protobuf:"fixed64,44,opt,name=F_Fixed64_defaulted,json=fFixed64Defaulted,def=640" json:"F_Fixed64_defaulted,omitempty"` + F_Uint32Defaulted *uint32 `protobuf:"varint,45,opt,name=F_Uint32_defaulted,json=fUint32Defaulted,def=3200" json:"F_Uint32_defaulted,omitempty"` + F_Uint64Defaulted *uint64 `protobuf:"varint,46,opt,name=F_Uint64_defaulted,json=fUint64Defaulted,def=6400" json:"F_Uint64_defaulted,omitempty"` + F_FloatDefaulted *float32 `protobuf:"fixed32,47,opt,name=F_Float_defaulted,json=fFloatDefaulted,def=314159" json:"F_Float_defaulted,omitempty"` + F_DoubleDefaulted *float64 `protobuf:"fixed64,48,opt,name=F_Double_defaulted,json=fDoubleDefaulted,def=271828" json:"F_Double_defaulted,omitempty"` + F_StringDefaulted *string `protobuf:"bytes,49,opt,name=F_String_defaulted,json=fStringDefaulted,def=hello, \"world!\"\n" json:"F_String_defaulted,omitempty"` + F_BytesDefaulted []byte `protobuf:"bytes,401,opt,name=F_Bytes_defaulted,json=fBytesDefaulted,def=Bignose" json:"F_Bytes_defaulted,omitempty"` + F_Sint32Defaulted *int32 `protobuf:"zigzag32,402,opt,name=F_Sint32_defaulted,json=fSint32Defaulted,def=-32" json:"F_Sint32_defaulted,omitempty"` + F_Sint64Defaulted *int64 `protobuf:"zigzag64,403,opt,name=F_Sint64_defaulted,json=fSint64Defaulted,def=-64" json:"F_Sint64_defaulted,omitempty"` + // Packed repeated fields (no string or bytes). + F_BoolRepeatedPacked []bool `protobuf:"varint,50,rep,packed,name=F_Bool_repeated_packed,json=fBoolRepeatedPacked" json:"F_Bool_repeated_packed,omitempty"` + F_Int32RepeatedPacked []int32 `protobuf:"varint,51,rep,packed,name=F_Int32_repeated_packed,json=fInt32RepeatedPacked" json:"F_Int32_repeated_packed,omitempty"` + F_Int64RepeatedPacked []int64 `protobuf:"varint,52,rep,packed,name=F_Int64_repeated_packed,json=fInt64RepeatedPacked" json:"F_Int64_repeated_packed,omitempty"` + F_Fixed32RepeatedPacked []uint32 `protobuf:"fixed32,53,rep,packed,name=F_Fixed32_repeated_packed,json=fFixed32RepeatedPacked" json:"F_Fixed32_repeated_packed,omitempty"` + F_Fixed64RepeatedPacked []uint64 `protobuf:"fixed64,54,rep,packed,name=F_Fixed64_repeated_packed,json=fFixed64RepeatedPacked" json:"F_Fixed64_repeated_packed,omitempty"` + F_Uint32RepeatedPacked []uint32 `protobuf:"varint,55,rep,packed,name=F_Uint32_repeated_packed,json=fUint32RepeatedPacked" json:"F_Uint32_repeated_packed,omitempty"` + F_Uint64RepeatedPacked []uint64 `protobuf:"varint,56,rep,packed,name=F_Uint64_repeated_packed,json=fUint64RepeatedPacked" json:"F_Uint64_repeated_packed,omitempty"` + F_FloatRepeatedPacked []float32 `protobuf:"fixed32,57,rep,packed,name=F_Float_repeated_packed,json=fFloatRepeatedPacked" json:"F_Float_repeated_packed,omitempty"` + F_DoubleRepeatedPacked []float64 `protobuf:"fixed64,58,rep,packed,name=F_Double_repeated_packed,json=fDoubleRepeatedPacked" json:"F_Double_repeated_packed,omitempty"` + F_Sint32RepeatedPacked []int32 `protobuf:"zigzag32,502,rep,packed,name=F_Sint32_repeated_packed,json=fSint32RepeatedPacked" json:"F_Sint32_repeated_packed,omitempty"` + F_Sint64RepeatedPacked []int64 `protobuf:"zigzag64,503,rep,packed,name=F_Sint64_repeated_packed,json=fSint64RepeatedPacked" json:"F_Sint64_repeated_packed,omitempty"` + Requiredgroup *GoTest_RequiredGroup `protobuf:"group,70,req,name=RequiredGroup,json=requiredgroup" json:"requiredgroup,omitempty"` + Repeatedgroup []*GoTest_RepeatedGroup `protobuf:"group,80,rep,name=RepeatedGroup,json=repeatedgroup" json:"repeatedgroup,omitempty"` + Optionalgroup *GoTest_OptionalGroup `protobuf:"group,90,opt,name=OptionalGroup,json=optionalgroup" json:"optionalgroup,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *GoTest) Reset() { *m = GoTest{} } +func (m *GoTest) String() string { return proto.CompactTextString(m) } +func (*GoTest) ProtoMessage() {} +func (*GoTest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{2} } + +const Default_GoTest_F_BoolDefaulted bool = true +const Default_GoTest_F_Int32Defaulted int32 = 32 +const Default_GoTest_F_Int64Defaulted int64 = 64 +const Default_GoTest_F_Fixed32Defaulted uint32 = 320 +const Default_GoTest_F_Fixed64Defaulted uint64 = 640 +const Default_GoTest_F_Uint32Defaulted uint32 = 3200 +const Default_GoTest_F_Uint64Defaulted uint64 = 6400 +const Default_GoTest_F_FloatDefaulted float32 = 314159 +const Default_GoTest_F_DoubleDefaulted float64 = 271828 +const Default_GoTest_F_StringDefaulted string = "hello, \"world!\"\n" + +var Default_GoTest_F_BytesDefaulted []byte = []byte("Bignose") + +const Default_GoTest_F_Sint32Defaulted int32 = -32 +const Default_GoTest_F_Sint64Defaulted int64 = -64 + +func (m *GoTest) GetKind() GoTest_KIND { + if m != nil && m.Kind != nil { + return *m.Kind + } + return GoTest_VOID +} + +func (m *GoTest) GetTable() string { + if m != nil && m.Table != nil { + return *m.Table + } + return "" +} + +func (m *GoTest) GetParam() int32 { + if m != nil && m.Param != nil { + return *m.Param + } + return 0 +} + +func (m *GoTest) GetRequiredField() *GoTestField { + if m != nil { + return m.RequiredField + } + return nil +} + +func (m *GoTest) GetRepeatedField() []*GoTestField { + if m != nil { + return m.RepeatedField + } + return nil +} + +func (m *GoTest) GetOptionalField() *GoTestField { + if m != nil { + return m.OptionalField + } + return nil +} + +func (m *GoTest) GetF_BoolRequired() bool { + if m != nil && m.F_BoolRequired != nil { + return *m.F_BoolRequired + } + return false +} + +func (m *GoTest) GetF_Int32Required() int32 { + if m != nil && m.F_Int32Required != nil { + return *m.F_Int32Required + } + return 0 +} + +func (m *GoTest) GetF_Int64Required() int64 { + if m != nil && m.F_Int64Required != nil { + return *m.F_Int64Required + } + return 0 +} + +func (m *GoTest) GetF_Fixed32Required() uint32 { + if m != nil && m.F_Fixed32Required != nil { + return *m.F_Fixed32Required + } + return 0 +} + +func (m *GoTest) GetF_Fixed64Required() uint64 { + if m != nil && m.F_Fixed64Required != nil { + return *m.F_Fixed64Required + } + return 0 +} + +func (m *GoTest) GetF_Uint32Required() uint32 { + if m != nil && m.F_Uint32Required != nil { + return *m.F_Uint32Required + } + return 0 +} + +func (m *GoTest) GetF_Uint64Required() uint64 { + if m != nil && m.F_Uint64Required != nil { + return *m.F_Uint64Required + } + return 0 +} + +func (m *GoTest) GetF_FloatRequired() float32 { + if m != nil && m.F_FloatRequired != nil { + return *m.F_FloatRequired + } + return 0 +} + +func (m *GoTest) GetF_DoubleRequired() float64 { + if m != nil && m.F_DoubleRequired != nil { + return *m.F_DoubleRequired + } + return 0 +} + +func (m *GoTest) GetF_StringRequired() string { + if m != nil && m.F_StringRequired != nil { + return *m.F_StringRequired + } + return "" +} + +func (m *GoTest) GetF_BytesRequired() []byte { + if m != nil { + return m.F_BytesRequired + } + return nil +} + +func (m *GoTest) GetF_Sint32Required() int32 { + if m != nil && m.F_Sint32Required != nil { + return *m.F_Sint32Required + } + return 0 +} + +func (m *GoTest) GetF_Sint64Required() int64 { + if m != nil && m.F_Sint64Required != nil { + return *m.F_Sint64Required + } + return 0 +} + +func (m *GoTest) GetF_BoolRepeated() []bool { + if m != nil { + return m.F_BoolRepeated + } + return nil +} + +func (m *GoTest) GetF_Int32Repeated() []int32 { + if m != nil { + return m.F_Int32Repeated + } + return nil +} + +func (m *GoTest) GetF_Int64Repeated() []int64 { + if m != nil { + return m.F_Int64Repeated + } + return nil +} + +func (m *GoTest) GetF_Fixed32Repeated() []uint32 { + if m != nil { + return m.F_Fixed32Repeated + } + return nil +} + +func (m *GoTest) GetF_Fixed64Repeated() []uint64 { + if m != nil { + return m.F_Fixed64Repeated + } + return nil +} + +func (m *GoTest) GetF_Uint32Repeated() []uint32 { + if m != nil { + return m.F_Uint32Repeated + } + return nil +} + +func (m *GoTest) GetF_Uint64Repeated() []uint64 { + if m != nil { + return m.F_Uint64Repeated + } + return nil +} + +func (m *GoTest) GetF_FloatRepeated() []float32 { + if m != nil { + return m.F_FloatRepeated + } + return nil +} + +func (m *GoTest) GetF_DoubleRepeated() []float64 { + if m != nil { + return m.F_DoubleRepeated + } + return nil +} + +func (m *GoTest) GetF_StringRepeated() []string { + if m != nil { + return m.F_StringRepeated + } + return nil +} + +func (m *GoTest) GetF_BytesRepeated() [][]byte { + if m != nil { + return m.F_BytesRepeated + } + return nil +} + +func (m *GoTest) GetF_Sint32Repeated() []int32 { + if m != nil { + return m.F_Sint32Repeated + } + return nil +} + +func (m *GoTest) GetF_Sint64Repeated() []int64 { + if m != nil { + return m.F_Sint64Repeated + } + return nil +} + +func (m *GoTest) GetF_BoolOptional() bool { + if m != nil && m.F_BoolOptional != nil { + return *m.F_BoolOptional + } + return false +} + +func (m *GoTest) GetF_Int32Optional() int32 { + if m != nil && m.F_Int32Optional != nil { + return *m.F_Int32Optional + } + return 0 +} + +func (m *GoTest) GetF_Int64Optional() int64 { + if m != nil && m.F_Int64Optional != nil { + return *m.F_Int64Optional + } + return 0 +} + +func (m *GoTest) GetF_Fixed32Optional() uint32 { + if m != nil && m.F_Fixed32Optional != nil { + return *m.F_Fixed32Optional + } + return 0 +} + +func (m *GoTest) GetF_Fixed64Optional() uint64 { + if m != nil && m.F_Fixed64Optional != nil { + return *m.F_Fixed64Optional + } + return 0 +} + +func (m *GoTest) GetF_Uint32Optional() uint32 { + if m != nil && m.F_Uint32Optional != nil { + return *m.F_Uint32Optional + } + return 0 +} + +func (m *GoTest) GetF_Uint64Optional() uint64 { + if m != nil && m.F_Uint64Optional != nil { + return *m.F_Uint64Optional + } + return 0 +} + +func (m *GoTest) GetF_FloatOptional() float32 { + if m != nil && m.F_FloatOptional != nil { + return *m.F_FloatOptional + } + return 0 +} + +func (m *GoTest) GetF_DoubleOptional() float64 { + if m != nil && m.F_DoubleOptional != nil { + return *m.F_DoubleOptional + } + return 0 +} + +func (m *GoTest) GetF_StringOptional() string { + if m != nil && m.F_StringOptional != nil { + return *m.F_StringOptional + } + return "" +} + +func (m *GoTest) GetF_BytesOptional() []byte { + if m != nil { + return m.F_BytesOptional + } + return nil +} + +func (m *GoTest) GetF_Sint32Optional() int32 { + if m != nil && m.F_Sint32Optional != nil { + return *m.F_Sint32Optional + } + return 0 +} + +func (m *GoTest) GetF_Sint64Optional() int64 { + if m != nil && m.F_Sint64Optional != nil { + return *m.F_Sint64Optional + } + return 0 +} + +func (m *GoTest) GetF_BoolDefaulted() bool { + if m != nil && m.F_BoolDefaulted != nil { + return *m.F_BoolDefaulted + } + return Default_GoTest_F_BoolDefaulted +} + +func (m *GoTest) GetF_Int32Defaulted() int32 { + if m != nil && m.F_Int32Defaulted != nil { + return *m.F_Int32Defaulted + } + return Default_GoTest_F_Int32Defaulted +} + +func (m *GoTest) GetF_Int64Defaulted() int64 { + if m != nil && m.F_Int64Defaulted != nil { + return *m.F_Int64Defaulted + } + return Default_GoTest_F_Int64Defaulted +} + +func (m *GoTest) GetF_Fixed32Defaulted() uint32 { + if m != nil && m.F_Fixed32Defaulted != nil { + return *m.F_Fixed32Defaulted + } + return Default_GoTest_F_Fixed32Defaulted +} + +func (m *GoTest) GetF_Fixed64Defaulted() uint64 { + if m != nil && m.F_Fixed64Defaulted != nil { + return *m.F_Fixed64Defaulted + } + return Default_GoTest_F_Fixed64Defaulted +} + +func (m *GoTest) GetF_Uint32Defaulted() uint32 { + if m != nil && m.F_Uint32Defaulted != nil { + return *m.F_Uint32Defaulted + } + return Default_GoTest_F_Uint32Defaulted +} + +func (m *GoTest) GetF_Uint64Defaulted() uint64 { + if m != nil && m.F_Uint64Defaulted != nil { + return *m.F_Uint64Defaulted + } + return Default_GoTest_F_Uint64Defaulted +} + +func (m *GoTest) GetF_FloatDefaulted() float32 { + if m != nil && m.F_FloatDefaulted != nil { + return *m.F_FloatDefaulted + } + return Default_GoTest_F_FloatDefaulted +} + +func (m *GoTest) GetF_DoubleDefaulted() float64 { + if m != nil && m.F_DoubleDefaulted != nil { + return *m.F_DoubleDefaulted + } + return Default_GoTest_F_DoubleDefaulted +} + +func (m *GoTest) GetF_StringDefaulted() string { + if m != nil && m.F_StringDefaulted != nil { + return *m.F_StringDefaulted + } + return Default_GoTest_F_StringDefaulted +} + +func (m *GoTest) GetF_BytesDefaulted() []byte { + if m != nil && m.F_BytesDefaulted != nil { + return m.F_BytesDefaulted + } + return append([]byte(nil), Default_GoTest_F_BytesDefaulted...) +} + +func (m *GoTest) GetF_Sint32Defaulted() int32 { + if m != nil && m.F_Sint32Defaulted != nil { + return *m.F_Sint32Defaulted + } + return Default_GoTest_F_Sint32Defaulted +} + +func (m *GoTest) GetF_Sint64Defaulted() int64 { + if m != nil && m.F_Sint64Defaulted != nil { + return *m.F_Sint64Defaulted + } + return Default_GoTest_F_Sint64Defaulted +} + +func (m *GoTest) GetF_BoolRepeatedPacked() []bool { + if m != nil { + return m.F_BoolRepeatedPacked + } + return nil +} + +func (m *GoTest) GetF_Int32RepeatedPacked() []int32 { + if m != nil { + return m.F_Int32RepeatedPacked + } + return nil +} + +func (m *GoTest) GetF_Int64RepeatedPacked() []int64 { + if m != nil { + return m.F_Int64RepeatedPacked + } + return nil +} + +func (m *GoTest) GetF_Fixed32RepeatedPacked() []uint32 { + if m != nil { + return m.F_Fixed32RepeatedPacked + } + return nil +} + +func (m *GoTest) GetF_Fixed64RepeatedPacked() []uint64 { + if m != nil { + return m.F_Fixed64RepeatedPacked + } + return nil +} + +func (m *GoTest) GetF_Uint32RepeatedPacked() []uint32 { + if m != nil { + return m.F_Uint32RepeatedPacked + } + return nil +} + +func (m *GoTest) GetF_Uint64RepeatedPacked() []uint64 { + if m != nil { + return m.F_Uint64RepeatedPacked + } + return nil +} + +func (m *GoTest) GetF_FloatRepeatedPacked() []float32 { + if m != nil { + return m.F_FloatRepeatedPacked + } + return nil +} + +func (m *GoTest) GetF_DoubleRepeatedPacked() []float64 { + if m != nil { + return m.F_DoubleRepeatedPacked + } + return nil +} + +func (m *GoTest) GetF_Sint32RepeatedPacked() []int32 { + if m != nil { + return m.F_Sint32RepeatedPacked + } + return nil +} + +func (m *GoTest) GetF_Sint64RepeatedPacked() []int64 { + if m != nil { + return m.F_Sint64RepeatedPacked + } + return nil +} + +func (m *GoTest) GetRequiredgroup() *GoTest_RequiredGroup { + if m != nil { + return m.Requiredgroup + } + return nil +} + +func (m *GoTest) GetRepeatedgroup() []*GoTest_RepeatedGroup { + if m != nil { + return m.Repeatedgroup + } + return nil +} + +func (m *GoTest) GetOptionalgroup() *GoTest_OptionalGroup { + if m != nil { + return m.Optionalgroup + } + return nil +} + +// Required, repeated, and optional groups. +type GoTest_RequiredGroup struct { + RequiredField *string `protobuf:"bytes,71,req,name=RequiredField,json=requiredField" json:"RequiredField,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *GoTest_RequiredGroup) Reset() { *m = GoTest_RequiredGroup{} } +func (m *GoTest_RequiredGroup) String() string { return proto.CompactTextString(m) } +func (*GoTest_RequiredGroup) ProtoMessage() {} +func (*GoTest_RequiredGroup) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{2, 0} } + +func (m *GoTest_RequiredGroup) GetRequiredField() string { + if m != nil && m.RequiredField != nil { + return *m.RequiredField + } + return "" +} + +type GoTest_RepeatedGroup struct { + RequiredField *string `protobuf:"bytes,81,req,name=RequiredField,json=requiredField" json:"RequiredField,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *GoTest_RepeatedGroup) Reset() { *m = GoTest_RepeatedGroup{} } +func (m *GoTest_RepeatedGroup) String() string { return proto.CompactTextString(m) } +func (*GoTest_RepeatedGroup) ProtoMessage() {} +func (*GoTest_RepeatedGroup) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{2, 1} } + +func (m *GoTest_RepeatedGroup) GetRequiredField() string { + if m != nil && m.RequiredField != nil { + return *m.RequiredField + } + return "" +} + +type GoTest_OptionalGroup struct { + RequiredField *string `protobuf:"bytes,91,req,name=RequiredField,json=requiredField" json:"RequiredField,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *GoTest_OptionalGroup) Reset() { *m = GoTest_OptionalGroup{} } +func (m *GoTest_OptionalGroup) String() string { return proto.CompactTextString(m) } +func (*GoTest_OptionalGroup) ProtoMessage() {} +func (*GoTest_OptionalGroup) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{2, 2} } + +func (m *GoTest_OptionalGroup) GetRequiredField() string { + if m != nil && m.RequiredField != nil { + return *m.RequiredField + } + return "" +} + +// For testing skipping of unrecognized fields. +// Numbers are all big, larger than tag numbers in GoTestField, +// the message used in the corresponding test. +type GoSkipTest struct { + SkipInt32 *int32 `protobuf:"varint,11,req,name=skip_int32,json=skipInt32" json:"skip_int32,omitempty"` + SkipFixed32 *uint32 `protobuf:"fixed32,12,req,name=skip_fixed32,json=skipFixed32" json:"skip_fixed32,omitempty"` + SkipFixed64 *uint64 `protobuf:"fixed64,13,req,name=skip_fixed64,json=skipFixed64" json:"skip_fixed64,omitempty"` + SkipString *string `protobuf:"bytes,14,req,name=skip_string,json=skipString" json:"skip_string,omitempty"` + Skipgroup *GoSkipTest_SkipGroup `protobuf:"group,15,req,name=SkipGroup,json=skipgroup" json:"skipgroup,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *GoSkipTest) Reset() { *m = GoSkipTest{} } +func (m *GoSkipTest) String() string { return proto.CompactTextString(m) } +func (*GoSkipTest) ProtoMessage() {} +func (*GoSkipTest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{3} } + +func (m *GoSkipTest) GetSkipInt32() int32 { + if m != nil && m.SkipInt32 != nil { + return *m.SkipInt32 + } + return 0 +} + +func (m *GoSkipTest) GetSkipFixed32() uint32 { + if m != nil && m.SkipFixed32 != nil { + return *m.SkipFixed32 + } + return 0 +} + +func (m *GoSkipTest) GetSkipFixed64() uint64 { + if m != nil && m.SkipFixed64 != nil { + return *m.SkipFixed64 + } + return 0 +} + +func (m *GoSkipTest) GetSkipString() string { + if m != nil && m.SkipString != nil { + return *m.SkipString + } + return "" +} + +func (m *GoSkipTest) GetSkipgroup() *GoSkipTest_SkipGroup { + if m != nil { + return m.Skipgroup + } + return nil +} + +type GoSkipTest_SkipGroup struct { + GroupInt32 *int32 `protobuf:"varint,16,req,name=group_int32,json=groupInt32" json:"group_int32,omitempty"` + GroupString *string `protobuf:"bytes,17,req,name=group_string,json=groupString" json:"group_string,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *GoSkipTest_SkipGroup) Reset() { *m = GoSkipTest_SkipGroup{} } +func (m *GoSkipTest_SkipGroup) String() string { return proto.CompactTextString(m) } +func (*GoSkipTest_SkipGroup) ProtoMessage() {} +func (*GoSkipTest_SkipGroup) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{3, 0} } + +func (m *GoSkipTest_SkipGroup) GetGroupInt32() int32 { + if m != nil && m.GroupInt32 != nil { + return *m.GroupInt32 + } + return 0 +} + +func (m *GoSkipTest_SkipGroup) GetGroupString() string { + if m != nil && m.GroupString != nil { + return *m.GroupString + } + return "" +} + +// For testing packed/non-packed decoder switching. +// A serialized instance of one should be deserializable as the other. +type NonPackedTest struct { + A []int32 `protobuf:"varint,1,rep,name=a" json:"a,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *NonPackedTest) Reset() { *m = NonPackedTest{} } +func (m *NonPackedTest) String() string { return proto.CompactTextString(m) } +func (*NonPackedTest) ProtoMessage() {} +func (*NonPackedTest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{4} } + +func (m *NonPackedTest) GetA() []int32 { + if m != nil { + return m.A + } + return nil +} + +type PackedTest struct { + B []int32 `protobuf:"varint,1,rep,packed,name=b" json:"b,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *PackedTest) Reset() { *m = PackedTest{} } +func (m *PackedTest) String() string { return proto.CompactTextString(m) } +func (*PackedTest) ProtoMessage() {} +func (*PackedTest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{5} } + +func (m *PackedTest) GetB() []int32 { + if m != nil { + return m.B + } + return nil +} + +type MaxTag struct { + // Maximum possible tag number. + LastField *string `protobuf:"bytes,536870911,opt,name=last_field,json=lastField" json:"last_field,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *MaxTag) Reset() { *m = MaxTag{} } +func (m *MaxTag) String() string { return proto.CompactTextString(m) } +func (*MaxTag) ProtoMessage() {} +func (*MaxTag) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{6} } + +func (m *MaxTag) GetLastField() string { + if m != nil && m.LastField != nil { + return *m.LastField + } + return "" +} + +type OldMessage struct { + Nested *OldMessage_Nested `protobuf:"bytes,1,opt,name=nested" json:"nested,omitempty"` + Num *int32 `protobuf:"varint,2,opt,name=num" json:"num,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *OldMessage) Reset() { *m = OldMessage{} } +func (m *OldMessage) String() string { return proto.CompactTextString(m) } +func (*OldMessage) ProtoMessage() {} +func (*OldMessage) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{7} } + +func (m *OldMessage) GetNested() *OldMessage_Nested { + if m != nil { + return m.Nested + } + return nil +} + +func (m *OldMessage) GetNum() int32 { + if m != nil && m.Num != nil { + return *m.Num + } + return 0 +} + +type OldMessage_Nested struct { + Name *string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *OldMessage_Nested) Reset() { *m = OldMessage_Nested{} } +func (m *OldMessage_Nested) String() string { return proto.CompactTextString(m) } +func (*OldMessage_Nested) ProtoMessage() {} +func (*OldMessage_Nested) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{7, 0} } + +func (m *OldMessage_Nested) GetName() string { + if m != nil && m.Name != nil { + return *m.Name + } + return "" +} + +// NewMessage is wire compatible with OldMessage; +// imagine it as a future version. +type NewMessage struct { + Nested *NewMessage_Nested `protobuf:"bytes,1,opt,name=nested" json:"nested,omitempty"` + // This is an int32 in OldMessage. + Num *int64 `protobuf:"varint,2,opt,name=num" json:"num,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *NewMessage) Reset() { *m = NewMessage{} } +func (m *NewMessage) String() string { return proto.CompactTextString(m) } +func (*NewMessage) ProtoMessage() {} +func (*NewMessage) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{8} } + +func (m *NewMessage) GetNested() *NewMessage_Nested { + if m != nil { + return m.Nested + } + return nil +} + +func (m *NewMessage) GetNum() int64 { + if m != nil && m.Num != nil { + return *m.Num + } + return 0 +} + +type NewMessage_Nested struct { + Name *string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"` + FoodGroup *string `protobuf:"bytes,2,opt,name=food_group,json=foodGroup" json:"food_group,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *NewMessage_Nested) Reset() { *m = NewMessage_Nested{} } +func (m *NewMessage_Nested) String() string { return proto.CompactTextString(m) } +func (*NewMessage_Nested) ProtoMessage() {} +func (*NewMessage_Nested) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{8, 0} } + +func (m *NewMessage_Nested) GetName() string { + if m != nil && m.Name != nil { + return *m.Name + } + return "" +} + +func (m *NewMessage_Nested) GetFoodGroup() string { + if m != nil && m.FoodGroup != nil { + return *m.FoodGroup + } + return "" +} + +type InnerMessage struct { + Host *string `protobuf:"bytes,1,req,name=host" json:"host,omitempty"` + Port *int32 `protobuf:"varint,2,opt,name=port,def=4000" json:"port,omitempty"` + Connected *bool `protobuf:"varint,3,opt,name=connected" json:"connected,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *InnerMessage) Reset() { *m = InnerMessage{} } +func (m *InnerMessage) String() string { return proto.CompactTextString(m) } +func (*InnerMessage) ProtoMessage() {} +func (*InnerMessage) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{9} } + +const Default_InnerMessage_Port int32 = 4000 + +func (m *InnerMessage) GetHost() string { + if m != nil && m.Host != nil { + return *m.Host + } + return "" +} + +func (m *InnerMessage) GetPort() int32 { + if m != nil && m.Port != nil { + return *m.Port + } + return Default_InnerMessage_Port +} + +func (m *InnerMessage) GetConnected() bool { + if m != nil && m.Connected != nil { + return *m.Connected + } + return false +} + +type OtherMessage struct { + Key *int64 `protobuf:"varint,1,opt,name=key" json:"key,omitempty"` + Value []byte `protobuf:"bytes,2,opt,name=value" json:"value,omitempty"` + Weight *float32 `protobuf:"fixed32,3,opt,name=weight" json:"weight,omitempty"` + Inner *InnerMessage `protobuf:"bytes,4,opt,name=inner" json:"inner,omitempty"` + proto.XXX_InternalExtensions `json:"-"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *OtherMessage) Reset() { *m = OtherMessage{} } +func (m *OtherMessage) String() string { return proto.CompactTextString(m) } +func (*OtherMessage) ProtoMessage() {} +func (*OtherMessage) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{10} } + +var extRange_OtherMessage = []proto.ExtensionRange{ + {100, 536870911}, +} + +func (*OtherMessage) ExtensionRangeArray() []proto.ExtensionRange { + return extRange_OtherMessage +} + +func (m *OtherMessage) GetKey() int64 { + if m != nil && m.Key != nil { + return *m.Key + } + return 0 +} + +func (m *OtherMessage) GetValue() []byte { + if m != nil { + return m.Value + } + return nil +} + +func (m *OtherMessage) GetWeight() float32 { + if m != nil && m.Weight != nil { + return *m.Weight + } + return 0 +} + +func (m *OtherMessage) GetInner() *InnerMessage { + if m != nil { + return m.Inner + } + return nil +} + +type RequiredInnerMessage struct { + LeoFinallyWonAnOscar *InnerMessage `protobuf:"bytes,1,req,name=leo_finally_won_an_oscar,json=leoFinallyWonAnOscar" json:"leo_finally_won_an_oscar,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *RequiredInnerMessage) Reset() { *m = RequiredInnerMessage{} } +func (m *RequiredInnerMessage) String() string { return proto.CompactTextString(m) } +func (*RequiredInnerMessage) ProtoMessage() {} +func (*RequiredInnerMessage) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{11} } + +func (m *RequiredInnerMessage) GetLeoFinallyWonAnOscar() *InnerMessage { + if m != nil { + return m.LeoFinallyWonAnOscar + } + return nil +} + +type MyMessage struct { + Count *int32 `protobuf:"varint,1,req,name=count" json:"count,omitempty"` + Name *string `protobuf:"bytes,2,opt,name=name" json:"name,omitempty"` + Quote *string `protobuf:"bytes,3,opt,name=quote" json:"quote,omitempty"` + Pet []string `protobuf:"bytes,4,rep,name=pet" json:"pet,omitempty"` + Inner *InnerMessage `protobuf:"bytes,5,opt,name=inner" json:"inner,omitempty"` + Others []*OtherMessage `protobuf:"bytes,6,rep,name=others" json:"others,omitempty"` + WeMustGoDeeper *RequiredInnerMessage `protobuf:"bytes,13,opt,name=we_must_go_deeper,json=weMustGoDeeper" json:"we_must_go_deeper,omitempty"` + RepInner []*InnerMessage `protobuf:"bytes,12,rep,name=rep_inner,json=repInner" json:"rep_inner,omitempty"` + Bikeshed *MyMessage_Color `protobuf:"varint,7,opt,name=bikeshed,enum=testdata.MyMessage_Color" json:"bikeshed,omitempty"` + Somegroup *MyMessage_SomeGroup `protobuf:"group,8,opt,name=SomeGroup,json=somegroup" json:"somegroup,omitempty"` + // This field becomes [][]byte in the generated code. + RepBytes [][]byte `protobuf:"bytes,10,rep,name=rep_bytes,json=repBytes" json:"rep_bytes,omitempty"` + Bigfloat *float64 `protobuf:"fixed64,11,opt,name=bigfloat" json:"bigfloat,omitempty"` + proto.XXX_InternalExtensions `json:"-"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *MyMessage) Reset() { *m = MyMessage{} } +func (m *MyMessage) String() string { return proto.CompactTextString(m) } +func (*MyMessage) ProtoMessage() {} +func (*MyMessage) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{12} } + +var extRange_MyMessage = []proto.ExtensionRange{ + {100, 536870911}, +} + +func (*MyMessage) ExtensionRangeArray() []proto.ExtensionRange { + return extRange_MyMessage +} + +func (m *MyMessage) GetCount() int32 { + if m != nil && m.Count != nil { + return *m.Count + } + return 0 +} + +func (m *MyMessage) GetName() string { + if m != nil && m.Name != nil { + return *m.Name + } + return "" +} + +func (m *MyMessage) GetQuote() string { + if m != nil && m.Quote != nil { + return *m.Quote + } + return "" +} + +func (m *MyMessage) GetPet() []string { + if m != nil { + return m.Pet + } + return nil +} + +func (m *MyMessage) GetInner() *InnerMessage { + if m != nil { + return m.Inner + } + return nil +} + +func (m *MyMessage) GetOthers() []*OtherMessage { + if m != nil { + return m.Others + } + return nil +} + +func (m *MyMessage) GetWeMustGoDeeper() *RequiredInnerMessage { + if m != nil { + return m.WeMustGoDeeper + } + return nil +} + +func (m *MyMessage) GetRepInner() []*InnerMessage { + if m != nil { + return m.RepInner + } + return nil +} + +func (m *MyMessage) GetBikeshed() MyMessage_Color { + if m != nil && m.Bikeshed != nil { + return *m.Bikeshed + } + return MyMessage_RED +} + +func (m *MyMessage) GetSomegroup() *MyMessage_SomeGroup { + if m != nil { + return m.Somegroup + } + return nil +} + +func (m *MyMessage) GetRepBytes() [][]byte { + if m != nil { + return m.RepBytes + } + return nil +} + +func (m *MyMessage) GetBigfloat() float64 { + if m != nil && m.Bigfloat != nil { + return *m.Bigfloat + } + return 0 +} + +type MyMessage_SomeGroup struct { + GroupField *int32 `protobuf:"varint,9,opt,name=group_field,json=groupField" json:"group_field,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *MyMessage_SomeGroup) Reset() { *m = MyMessage_SomeGroup{} } +func (m *MyMessage_SomeGroup) String() string { return proto.CompactTextString(m) } +func (*MyMessage_SomeGroup) ProtoMessage() {} +func (*MyMessage_SomeGroup) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{12, 0} } + +func (m *MyMessage_SomeGroup) GetGroupField() int32 { + if m != nil && m.GroupField != nil { + return *m.GroupField + } + return 0 +} + +type Ext struct { + Data *string `protobuf:"bytes,1,opt,name=data" json:"data,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *Ext) Reset() { *m = Ext{} } +func (m *Ext) String() string { return proto.CompactTextString(m) } +func (*Ext) ProtoMessage() {} +func (*Ext) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{13} } + +func (m *Ext) GetData() string { + if m != nil && m.Data != nil { + return *m.Data + } + return "" +} + +var E_Ext_More = &proto.ExtensionDesc{ + ExtendedType: (*MyMessage)(nil), + ExtensionType: (*Ext)(nil), + Field: 103, + Name: "testdata.Ext.more", + Tag: "bytes,103,opt,name=more", +} + +var E_Ext_Text = &proto.ExtensionDesc{ + ExtendedType: (*MyMessage)(nil), + ExtensionType: (*string)(nil), + Field: 104, + Name: "testdata.Ext.text", + Tag: "bytes,104,opt,name=text", +} + +var E_Ext_Number = &proto.ExtensionDesc{ + ExtendedType: (*MyMessage)(nil), + ExtensionType: (*int32)(nil), + Field: 105, + Name: "testdata.Ext.number", + Tag: "varint,105,opt,name=number", +} + +type ComplexExtension struct { + First *int32 `protobuf:"varint,1,opt,name=first" json:"first,omitempty"` + Second *int32 `protobuf:"varint,2,opt,name=second" json:"second,omitempty"` + Third []int32 `protobuf:"varint,3,rep,name=third" json:"third,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *ComplexExtension) Reset() { *m = ComplexExtension{} } +func (m *ComplexExtension) String() string { return proto.CompactTextString(m) } +func (*ComplexExtension) ProtoMessage() {} +func (*ComplexExtension) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{14} } + +func (m *ComplexExtension) GetFirst() int32 { + if m != nil && m.First != nil { + return *m.First + } + return 0 +} + +func (m *ComplexExtension) GetSecond() int32 { + if m != nil && m.Second != nil { + return *m.Second + } + return 0 +} + +func (m *ComplexExtension) GetThird() []int32 { + if m != nil { + return m.Third + } + return nil +} + +type DefaultsMessage struct { + proto.XXX_InternalExtensions `json:"-"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *DefaultsMessage) Reset() { *m = DefaultsMessage{} } +func (m *DefaultsMessage) String() string { return proto.CompactTextString(m) } +func (*DefaultsMessage) ProtoMessage() {} +func (*DefaultsMessage) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{15} } + +var extRange_DefaultsMessage = []proto.ExtensionRange{ + {100, 536870911}, +} + +func (*DefaultsMessage) ExtensionRangeArray() []proto.ExtensionRange { + return extRange_DefaultsMessage +} + +type MyMessageSet struct { + proto.XXX_InternalExtensions `json:"-"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *MyMessageSet) Reset() { *m = MyMessageSet{} } +func (m *MyMessageSet) String() string { return proto.CompactTextString(m) } +func (*MyMessageSet) ProtoMessage() {} +func (*MyMessageSet) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{16} } + +func (m *MyMessageSet) Marshal() ([]byte, error) { + return proto.MarshalMessageSet(&m.XXX_InternalExtensions) +} +func (m *MyMessageSet) Unmarshal(buf []byte) error { + return proto.UnmarshalMessageSet(buf, &m.XXX_InternalExtensions) +} +func (m *MyMessageSet) MarshalJSON() ([]byte, error) { + return proto.MarshalMessageSetJSON(&m.XXX_InternalExtensions) +} +func (m *MyMessageSet) UnmarshalJSON(buf []byte) error { + return proto.UnmarshalMessageSetJSON(buf, &m.XXX_InternalExtensions) +} + +// ensure MyMessageSet satisfies proto.Marshaler and proto.Unmarshaler +var _ proto.Marshaler = (*MyMessageSet)(nil) +var _ proto.Unmarshaler = (*MyMessageSet)(nil) + +var extRange_MyMessageSet = []proto.ExtensionRange{ + {100, 2147483646}, +} + +func (*MyMessageSet) ExtensionRangeArray() []proto.ExtensionRange { + return extRange_MyMessageSet +} + +type Empty struct { + XXX_unrecognized []byte `json:"-"` +} + +func (m *Empty) Reset() { *m = Empty{} } +func (m *Empty) String() string { return proto.CompactTextString(m) } +func (*Empty) ProtoMessage() {} +func (*Empty) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{17} } + +type MessageList struct { + Message []*MessageList_Message `protobuf:"group,1,rep,name=Message,json=message" json:"message,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *MessageList) Reset() { *m = MessageList{} } +func (m *MessageList) String() string { return proto.CompactTextString(m) } +func (*MessageList) ProtoMessage() {} +func (*MessageList) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{18} } + +func (m *MessageList) GetMessage() []*MessageList_Message { + if m != nil { + return m.Message + } + return nil +} + +type MessageList_Message struct { + Name *string `protobuf:"bytes,2,req,name=name" json:"name,omitempty"` + Count *int32 `protobuf:"varint,3,req,name=count" json:"count,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *MessageList_Message) Reset() { *m = MessageList_Message{} } +func (m *MessageList_Message) String() string { return proto.CompactTextString(m) } +func (*MessageList_Message) ProtoMessage() {} +func (*MessageList_Message) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{18, 0} } + +func (m *MessageList_Message) GetName() string { + if m != nil && m.Name != nil { + return *m.Name + } + return "" +} + +func (m *MessageList_Message) GetCount() int32 { + if m != nil && m.Count != nil { + return *m.Count + } + return 0 +} + +type Strings struct { + StringField *string `protobuf:"bytes,1,opt,name=string_field,json=stringField" json:"string_field,omitempty"` + BytesField []byte `protobuf:"bytes,2,opt,name=bytes_field,json=bytesField" json:"bytes_field,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *Strings) Reset() { *m = Strings{} } +func (m *Strings) String() string { return proto.CompactTextString(m) } +func (*Strings) ProtoMessage() {} +func (*Strings) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{19} } + +func (m *Strings) GetStringField() string { + if m != nil && m.StringField != nil { + return *m.StringField + } + return "" +} + +func (m *Strings) GetBytesField() []byte { + if m != nil { + return m.BytesField + } + return nil +} + +type Defaults struct { + // Default-valued fields of all basic types. + // Same as GoTest, but copied here to make testing easier. + F_Bool *bool `protobuf:"varint,1,opt,name=F_Bool,json=fBool,def=1" json:"F_Bool,omitempty"` + F_Int32 *int32 `protobuf:"varint,2,opt,name=F_Int32,json=fInt32,def=32" json:"F_Int32,omitempty"` + F_Int64 *int64 `protobuf:"varint,3,opt,name=F_Int64,json=fInt64,def=64" json:"F_Int64,omitempty"` + F_Fixed32 *uint32 `protobuf:"fixed32,4,opt,name=F_Fixed32,json=fFixed32,def=320" json:"F_Fixed32,omitempty"` + F_Fixed64 *uint64 `protobuf:"fixed64,5,opt,name=F_Fixed64,json=fFixed64,def=640" json:"F_Fixed64,omitempty"` + F_Uint32 *uint32 `protobuf:"varint,6,opt,name=F_Uint32,json=fUint32,def=3200" json:"F_Uint32,omitempty"` + F_Uint64 *uint64 `protobuf:"varint,7,opt,name=F_Uint64,json=fUint64,def=6400" json:"F_Uint64,omitempty"` + F_Float *float32 `protobuf:"fixed32,8,opt,name=F_Float,json=fFloat,def=314159" json:"F_Float,omitempty"` + F_Double *float64 `protobuf:"fixed64,9,opt,name=F_Double,json=fDouble,def=271828" json:"F_Double,omitempty"` + F_String *string `protobuf:"bytes,10,opt,name=F_String,json=fString,def=hello, \"world!\"\n" json:"F_String,omitempty"` + F_Bytes []byte `protobuf:"bytes,11,opt,name=F_Bytes,json=fBytes,def=Bignose" json:"F_Bytes,omitempty"` + F_Sint32 *int32 `protobuf:"zigzag32,12,opt,name=F_Sint32,json=fSint32,def=-32" json:"F_Sint32,omitempty"` + F_Sint64 *int64 `protobuf:"zigzag64,13,opt,name=F_Sint64,json=fSint64,def=-64" json:"F_Sint64,omitempty"` + F_Enum *Defaults_Color `protobuf:"varint,14,opt,name=F_Enum,json=fEnum,enum=testdata.Defaults_Color,def=1" json:"F_Enum,omitempty"` + // More fields with crazy defaults. + F_Pinf *float32 `protobuf:"fixed32,15,opt,name=F_Pinf,json=fPinf,def=inf" json:"F_Pinf,omitempty"` + F_Ninf *float32 `protobuf:"fixed32,16,opt,name=F_Ninf,json=fNinf,def=-inf" json:"F_Ninf,omitempty"` + F_Nan *float32 `protobuf:"fixed32,17,opt,name=F_Nan,json=fNan,def=nan" json:"F_Nan,omitempty"` + // Sub-message. + Sub *SubDefaults `protobuf:"bytes,18,opt,name=sub" json:"sub,omitempty"` + // Redundant but explicit defaults. + StrZero *string `protobuf:"bytes,19,opt,name=str_zero,json=strZero,def=" json:"str_zero,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *Defaults) Reset() { *m = Defaults{} } +func (m *Defaults) String() string { return proto.CompactTextString(m) } +func (*Defaults) ProtoMessage() {} +func (*Defaults) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{20} } + +const Default_Defaults_F_Bool bool = true +const Default_Defaults_F_Int32 int32 = 32 +const Default_Defaults_F_Int64 int64 = 64 +const Default_Defaults_F_Fixed32 uint32 = 320 +const Default_Defaults_F_Fixed64 uint64 = 640 +const Default_Defaults_F_Uint32 uint32 = 3200 +const Default_Defaults_F_Uint64 uint64 = 6400 +const Default_Defaults_F_Float float32 = 314159 +const Default_Defaults_F_Double float64 = 271828 +const Default_Defaults_F_String string = "hello, \"world!\"\n" + +var Default_Defaults_F_Bytes []byte = []byte("Bignose") + +const Default_Defaults_F_Sint32 int32 = -32 +const Default_Defaults_F_Sint64 int64 = -64 +const Default_Defaults_F_Enum Defaults_Color = Defaults_GREEN + +var Default_Defaults_F_Pinf float32 = float32(math.Inf(1)) +var Default_Defaults_F_Ninf float32 = float32(math.Inf(-1)) +var Default_Defaults_F_Nan float32 = float32(math.NaN()) + +func (m *Defaults) GetF_Bool() bool { + if m != nil && m.F_Bool != nil { + return *m.F_Bool + } + return Default_Defaults_F_Bool +} + +func (m *Defaults) GetF_Int32() int32 { + if m != nil && m.F_Int32 != nil { + return *m.F_Int32 + } + return Default_Defaults_F_Int32 +} + +func (m *Defaults) GetF_Int64() int64 { + if m != nil && m.F_Int64 != nil { + return *m.F_Int64 + } + return Default_Defaults_F_Int64 +} + +func (m *Defaults) GetF_Fixed32() uint32 { + if m != nil && m.F_Fixed32 != nil { + return *m.F_Fixed32 + } + return Default_Defaults_F_Fixed32 +} + +func (m *Defaults) GetF_Fixed64() uint64 { + if m != nil && m.F_Fixed64 != nil { + return *m.F_Fixed64 + } + return Default_Defaults_F_Fixed64 +} + +func (m *Defaults) GetF_Uint32() uint32 { + if m != nil && m.F_Uint32 != nil { + return *m.F_Uint32 + } + return Default_Defaults_F_Uint32 +} + +func (m *Defaults) GetF_Uint64() uint64 { + if m != nil && m.F_Uint64 != nil { + return *m.F_Uint64 + } + return Default_Defaults_F_Uint64 +} + +func (m *Defaults) GetF_Float() float32 { + if m != nil && m.F_Float != nil { + return *m.F_Float + } + return Default_Defaults_F_Float +} + +func (m *Defaults) GetF_Double() float64 { + if m != nil && m.F_Double != nil { + return *m.F_Double + } + return Default_Defaults_F_Double +} + +func (m *Defaults) GetF_String() string { + if m != nil && m.F_String != nil { + return *m.F_String + } + return Default_Defaults_F_String +} + +func (m *Defaults) GetF_Bytes() []byte { + if m != nil && m.F_Bytes != nil { + return m.F_Bytes + } + return append([]byte(nil), Default_Defaults_F_Bytes...) +} + +func (m *Defaults) GetF_Sint32() int32 { + if m != nil && m.F_Sint32 != nil { + return *m.F_Sint32 + } + return Default_Defaults_F_Sint32 +} + +func (m *Defaults) GetF_Sint64() int64 { + if m != nil && m.F_Sint64 != nil { + return *m.F_Sint64 + } + return Default_Defaults_F_Sint64 +} + +func (m *Defaults) GetF_Enum() Defaults_Color { + if m != nil && m.F_Enum != nil { + return *m.F_Enum + } + return Default_Defaults_F_Enum +} + +func (m *Defaults) GetF_Pinf() float32 { + if m != nil && m.F_Pinf != nil { + return *m.F_Pinf + } + return Default_Defaults_F_Pinf +} + +func (m *Defaults) GetF_Ninf() float32 { + if m != nil && m.F_Ninf != nil { + return *m.F_Ninf + } + return Default_Defaults_F_Ninf +} + +func (m *Defaults) GetF_Nan() float32 { + if m != nil && m.F_Nan != nil { + return *m.F_Nan + } + return Default_Defaults_F_Nan +} + +func (m *Defaults) GetSub() *SubDefaults { + if m != nil { + return m.Sub + } + return nil +} + +func (m *Defaults) GetStrZero() string { + if m != nil && m.StrZero != nil { + return *m.StrZero + } + return "" +} + +type SubDefaults struct { + N *int64 `protobuf:"varint,1,opt,name=n,def=7" json:"n,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *SubDefaults) Reset() { *m = SubDefaults{} } +func (m *SubDefaults) String() string { return proto.CompactTextString(m) } +func (*SubDefaults) ProtoMessage() {} +func (*SubDefaults) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{21} } + +const Default_SubDefaults_N int64 = 7 + +func (m *SubDefaults) GetN() int64 { + if m != nil && m.N != nil { + return *m.N + } + return Default_SubDefaults_N +} + +type RepeatedEnum struct { + Color []RepeatedEnum_Color `protobuf:"varint,1,rep,name=color,enum=testdata.RepeatedEnum_Color" json:"color,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *RepeatedEnum) Reset() { *m = RepeatedEnum{} } +func (m *RepeatedEnum) String() string { return proto.CompactTextString(m) } +func (*RepeatedEnum) ProtoMessage() {} +func (*RepeatedEnum) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{22} } + +func (m *RepeatedEnum) GetColor() []RepeatedEnum_Color { + if m != nil { + return m.Color + } + return nil +} + +type MoreRepeated struct { + Bools []bool `protobuf:"varint,1,rep,name=bools" json:"bools,omitempty"` + BoolsPacked []bool `protobuf:"varint,2,rep,packed,name=bools_packed,json=boolsPacked" json:"bools_packed,omitempty"` + Ints []int32 `protobuf:"varint,3,rep,name=ints" json:"ints,omitempty"` + IntsPacked []int32 `protobuf:"varint,4,rep,packed,name=ints_packed,json=intsPacked" json:"ints_packed,omitempty"` + Int64SPacked []int64 `protobuf:"varint,7,rep,packed,name=int64s_packed,json=int64sPacked" json:"int64s_packed,omitempty"` + Strings []string `protobuf:"bytes,5,rep,name=strings" json:"strings,omitempty"` + Fixeds []uint32 `protobuf:"fixed32,6,rep,name=fixeds" json:"fixeds,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *MoreRepeated) Reset() { *m = MoreRepeated{} } +func (m *MoreRepeated) String() string { return proto.CompactTextString(m) } +func (*MoreRepeated) ProtoMessage() {} +func (*MoreRepeated) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{23} } + +func (m *MoreRepeated) GetBools() []bool { + if m != nil { + return m.Bools + } + return nil +} + +func (m *MoreRepeated) GetBoolsPacked() []bool { + if m != nil { + return m.BoolsPacked + } + return nil +} + +func (m *MoreRepeated) GetInts() []int32 { + if m != nil { + return m.Ints + } + return nil +} + +func (m *MoreRepeated) GetIntsPacked() []int32 { + if m != nil { + return m.IntsPacked + } + return nil +} + +func (m *MoreRepeated) GetInt64SPacked() []int64 { + if m != nil { + return m.Int64SPacked + } + return nil +} + +func (m *MoreRepeated) GetStrings() []string { + if m != nil { + return m.Strings + } + return nil +} + +func (m *MoreRepeated) GetFixeds() []uint32 { + if m != nil { + return m.Fixeds + } + return nil +} + +type GroupOld struct { + G *GroupOld_G `protobuf:"group,101,opt,name=G,json=g" json:"g,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *GroupOld) Reset() { *m = GroupOld{} } +func (m *GroupOld) String() string { return proto.CompactTextString(m) } +func (*GroupOld) ProtoMessage() {} +func (*GroupOld) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{24} } + +func (m *GroupOld) GetG() *GroupOld_G { + if m != nil { + return m.G + } + return nil +} + +type GroupOld_G struct { + X *int32 `protobuf:"varint,2,opt,name=x" json:"x,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *GroupOld_G) Reset() { *m = GroupOld_G{} } +func (m *GroupOld_G) String() string { return proto.CompactTextString(m) } +func (*GroupOld_G) ProtoMessage() {} +func (*GroupOld_G) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{24, 0} } + +func (m *GroupOld_G) GetX() int32 { + if m != nil && m.X != nil { + return *m.X + } + return 0 +} + +type GroupNew struct { + G *GroupNew_G `protobuf:"group,101,opt,name=G,json=g" json:"g,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *GroupNew) Reset() { *m = GroupNew{} } +func (m *GroupNew) String() string { return proto.CompactTextString(m) } +func (*GroupNew) ProtoMessage() {} +func (*GroupNew) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{25} } + +func (m *GroupNew) GetG() *GroupNew_G { + if m != nil { + return m.G + } + return nil +} + +type GroupNew_G struct { + X *int32 `protobuf:"varint,2,opt,name=x" json:"x,omitempty"` + Y *int32 `protobuf:"varint,3,opt,name=y" json:"y,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *GroupNew_G) Reset() { *m = GroupNew_G{} } +func (m *GroupNew_G) String() string { return proto.CompactTextString(m) } +func (*GroupNew_G) ProtoMessage() {} +func (*GroupNew_G) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{25, 0} } + +func (m *GroupNew_G) GetX() int32 { + if m != nil && m.X != nil { + return *m.X + } + return 0 +} + +func (m *GroupNew_G) GetY() int32 { + if m != nil && m.Y != nil { + return *m.Y + } + return 0 +} + +type FloatingPoint struct { + F *float64 `protobuf:"fixed64,1,req,name=f" json:"f,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *FloatingPoint) Reset() { *m = FloatingPoint{} } +func (m *FloatingPoint) String() string { return proto.CompactTextString(m) } +func (*FloatingPoint) ProtoMessage() {} +func (*FloatingPoint) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{26} } + +func (m *FloatingPoint) GetF() float64 { + if m != nil && m.F != nil { + return *m.F + } + return 0 +} + +type MessageWithMap struct { + NameMapping map[int32]string `protobuf:"bytes,1,rep,name=name_mapping,json=nameMapping" json:"name_mapping,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + MsgMapping map[int64]*FloatingPoint `protobuf:"bytes,2,rep,name=msg_mapping,json=msgMapping" json:"msg_mapping,omitempty" protobuf_key:"zigzag64,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + ByteMapping map[bool][]byte `protobuf:"bytes,3,rep,name=byte_mapping,json=byteMapping" json:"byte_mapping,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + StrToStr map[string]string `protobuf:"bytes,4,rep,name=str_to_str,json=strToStr" json:"str_to_str,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *MessageWithMap) Reset() { *m = MessageWithMap{} } +func (m *MessageWithMap) String() string { return proto.CompactTextString(m) } +func (*MessageWithMap) ProtoMessage() {} +func (*MessageWithMap) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{27} } + +func (m *MessageWithMap) GetNameMapping() map[int32]string { + if m != nil { + return m.NameMapping + } + return nil +} + +func (m *MessageWithMap) GetMsgMapping() map[int64]*FloatingPoint { + if m != nil { + return m.MsgMapping + } + return nil +} + +func (m *MessageWithMap) GetByteMapping() map[bool][]byte { + if m != nil { + return m.ByteMapping + } + return nil +} + +func (m *MessageWithMap) GetStrToStr() map[string]string { + if m != nil { + return m.StrToStr + } + return nil +} + +type Oneof struct { + // Types that are valid to be assigned to Union: + // *Oneof_F_Bool + // *Oneof_F_Int32 + // *Oneof_F_Int64 + // *Oneof_F_Fixed32 + // *Oneof_F_Fixed64 + // *Oneof_F_Uint32 + // *Oneof_F_Uint64 + // *Oneof_F_Float + // *Oneof_F_Double + // *Oneof_F_String + // *Oneof_F_Bytes + // *Oneof_F_Sint32 + // *Oneof_F_Sint64 + // *Oneof_F_Enum + // *Oneof_F_Message + // *Oneof_FGroup + // *Oneof_F_Largest_Tag + Union isOneof_Union `protobuf_oneof:"union"` + // Types that are valid to be assigned to Tormato: + // *Oneof_Value + Tormato isOneof_Tormato `protobuf_oneof:"tormato"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *Oneof) Reset() { *m = Oneof{} } +func (m *Oneof) String() string { return proto.CompactTextString(m) } +func (*Oneof) ProtoMessage() {} +func (*Oneof) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{28} } + +type isOneof_Union interface { + isOneof_Union() +} +type isOneof_Tormato interface { + isOneof_Tormato() +} + +type Oneof_F_Bool struct { + F_Bool bool `protobuf:"varint,1,opt,name=F_Bool,json=fBool,oneof"` +} +type Oneof_F_Int32 struct { + F_Int32 int32 `protobuf:"varint,2,opt,name=F_Int32,json=fInt32,oneof"` +} +type Oneof_F_Int64 struct { + F_Int64 int64 `protobuf:"varint,3,opt,name=F_Int64,json=fInt64,oneof"` +} +type Oneof_F_Fixed32 struct { + F_Fixed32 uint32 `protobuf:"fixed32,4,opt,name=F_Fixed32,json=fFixed32,oneof"` +} +type Oneof_F_Fixed64 struct { + F_Fixed64 uint64 `protobuf:"fixed64,5,opt,name=F_Fixed64,json=fFixed64,oneof"` +} +type Oneof_F_Uint32 struct { + F_Uint32 uint32 `protobuf:"varint,6,opt,name=F_Uint32,json=fUint32,oneof"` +} +type Oneof_F_Uint64 struct { + F_Uint64 uint64 `protobuf:"varint,7,opt,name=F_Uint64,json=fUint64,oneof"` +} +type Oneof_F_Float struct { + F_Float float32 `protobuf:"fixed32,8,opt,name=F_Float,json=fFloat,oneof"` +} +type Oneof_F_Double struct { + F_Double float64 `protobuf:"fixed64,9,opt,name=F_Double,json=fDouble,oneof"` +} +type Oneof_F_String struct { + F_String string `protobuf:"bytes,10,opt,name=F_String,json=fString,oneof"` +} +type Oneof_F_Bytes struct { + F_Bytes []byte `protobuf:"bytes,11,opt,name=F_Bytes,json=fBytes,oneof"` +} +type Oneof_F_Sint32 struct { + F_Sint32 int32 `protobuf:"zigzag32,12,opt,name=F_Sint32,json=fSint32,oneof"` +} +type Oneof_F_Sint64 struct { + F_Sint64 int64 `protobuf:"zigzag64,13,opt,name=F_Sint64,json=fSint64,oneof"` +} +type Oneof_F_Enum struct { + F_Enum MyMessage_Color `protobuf:"varint,14,opt,name=F_Enum,json=fEnum,enum=testdata.MyMessage_Color,oneof"` +} +type Oneof_F_Message struct { + F_Message *GoTestField `protobuf:"bytes,15,opt,name=F_Message,json=fMessage,oneof"` +} +type Oneof_FGroup struct { + FGroup *Oneof_F_Group `protobuf:"group,16,opt,name=F_Group,json=fGroup,oneof"` +} +type Oneof_F_Largest_Tag struct { + F_Largest_Tag int32 `protobuf:"varint,536870911,opt,name=F_Largest_Tag,json=fLargestTag,oneof"` +} +type Oneof_Value struct { + Value int32 `protobuf:"varint,100,opt,name=value,oneof"` +} + +func (*Oneof_F_Bool) isOneof_Union() {} +func (*Oneof_F_Int32) isOneof_Union() {} +func (*Oneof_F_Int64) isOneof_Union() {} +func (*Oneof_F_Fixed32) isOneof_Union() {} +func (*Oneof_F_Fixed64) isOneof_Union() {} +func (*Oneof_F_Uint32) isOneof_Union() {} +func (*Oneof_F_Uint64) isOneof_Union() {} +func (*Oneof_F_Float) isOneof_Union() {} +func (*Oneof_F_Double) isOneof_Union() {} +func (*Oneof_F_String) isOneof_Union() {} +func (*Oneof_F_Bytes) isOneof_Union() {} +func (*Oneof_F_Sint32) isOneof_Union() {} +func (*Oneof_F_Sint64) isOneof_Union() {} +func (*Oneof_F_Enum) isOneof_Union() {} +func (*Oneof_F_Message) isOneof_Union() {} +func (*Oneof_FGroup) isOneof_Union() {} +func (*Oneof_F_Largest_Tag) isOneof_Union() {} +func (*Oneof_Value) isOneof_Tormato() {} + +func (m *Oneof) GetUnion() isOneof_Union { + if m != nil { + return m.Union + } + return nil +} +func (m *Oneof) GetTormato() isOneof_Tormato { + if m != nil { + return m.Tormato + } + return nil +} + +func (m *Oneof) GetF_Bool() bool { + if x, ok := m.GetUnion().(*Oneof_F_Bool); ok { + return x.F_Bool + } + return false +} + +func (m *Oneof) GetF_Int32() int32 { + if x, ok := m.GetUnion().(*Oneof_F_Int32); ok { + return x.F_Int32 + } + return 0 +} + +func (m *Oneof) GetF_Int64() int64 { + if x, ok := m.GetUnion().(*Oneof_F_Int64); ok { + return x.F_Int64 + } + return 0 +} + +func (m *Oneof) GetF_Fixed32() uint32 { + if x, ok := m.GetUnion().(*Oneof_F_Fixed32); ok { + return x.F_Fixed32 + } + return 0 +} + +func (m *Oneof) GetF_Fixed64() uint64 { + if x, ok := m.GetUnion().(*Oneof_F_Fixed64); ok { + return x.F_Fixed64 + } + return 0 +} + +func (m *Oneof) GetF_Uint32() uint32 { + if x, ok := m.GetUnion().(*Oneof_F_Uint32); ok { + return x.F_Uint32 + } + return 0 +} + +func (m *Oneof) GetF_Uint64() uint64 { + if x, ok := m.GetUnion().(*Oneof_F_Uint64); ok { + return x.F_Uint64 + } + return 0 +} + +func (m *Oneof) GetF_Float() float32 { + if x, ok := m.GetUnion().(*Oneof_F_Float); ok { + return x.F_Float + } + return 0 +} + +func (m *Oneof) GetF_Double() float64 { + if x, ok := m.GetUnion().(*Oneof_F_Double); ok { + return x.F_Double + } + return 0 +} + +func (m *Oneof) GetF_String() string { + if x, ok := m.GetUnion().(*Oneof_F_String); ok { + return x.F_String + } + return "" +} + +func (m *Oneof) GetF_Bytes() []byte { + if x, ok := m.GetUnion().(*Oneof_F_Bytes); ok { + return x.F_Bytes + } + return nil +} + +func (m *Oneof) GetF_Sint32() int32 { + if x, ok := m.GetUnion().(*Oneof_F_Sint32); ok { + return x.F_Sint32 + } + return 0 +} + +func (m *Oneof) GetF_Sint64() int64 { + if x, ok := m.GetUnion().(*Oneof_F_Sint64); ok { + return x.F_Sint64 + } + return 0 +} + +func (m *Oneof) GetF_Enum() MyMessage_Color { + if x, ok := m.GetUnion().(*Oneof_F_Enum); ok { + return x.F_Enum + } + return MyMessage_RED +} + +func (m *Oneof) GetF_Message() *GoTestField { + if x, ok := m.GetUnion().(*Oneof_F_Message); ok { + return x.F_Message + } + return nil +} + +func (m *Oneof) GetFGroup() *Oneof_F_Group { + if x, ok := m.GetUnion().(*Oneof_FGroup); ok { + return x.FGroup + } + return nil +} + +func (m *Oneof) GetF_Largest_Tag() int32 { + if x, ok := m.GetUnion().(*Oneof_F_Largest_Tag); ok { + return x.F_Largest_Tag + } + return 0 +} + +func (m *Oneof) GetValue() int32 { + if x, ok := m.GetTormato().(*Oneof_Value); ok { + return x.Value + } + return 0 +} + +// XXX_OneofFuncs is for the internal use of the proto package. +func (*Oneof) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{}) { + return _Oneof_OneofMarshaler, _Oneof_OneofUnmarshaler, _Oneof_OneofSizer, []interface{}{ + (*Oneof_F_Bool)(nil), + (*Oneof_F_Int32)(nil), + (*Oneof_F_Int64)(nil), + (*Oneof_F_Fixed32)(nil), + (*Oneof_F_Fixed64)(nil), + (*Oneof_F_Uint32)(nil), + (*Oneof_F_Uint64)(nil), + (*Oneof_F_Float)(nil), + (*Oneof_F_Double)(nil), + (*Oneof_F_String)(nil), + (*Oneof_F_Bytes)(nil), + (*Oneof_F_Sint32)(nil), + (*Oneof_F_Sint64)(nil), + (*Oneof_F_Enum)(nil), + (*Oneof_F_Message)(nil), + (*Oneof_FGroup)(nil), + (*Oneof_F_Largest_Tag)(nil), + (*Oneof_Value)(nil), + } +} + +func _Oneof_OneofMarshaler(msg proto.Message, b *proto.Buffer) error { + m := msg.(*Oneof) + // union + switch x := m.Union.(type) { + case *Oneof_F_Bool: + t := uint64(0) + if x.F_Bool { + t = 1 + } + b.EncodeVarint(1<<3 | proto.WireVarint) + b.EncodeVarint(t) + case *Oneof_F_Int32: + b.EncodeVarint(2<<3 | proto.WireVarint) + b.EncodeVarint(uint64(x.F_Int32)) + case *Oneof_F_Int64: + b.EncodeVarint(3<<3 | proto.WireVarint) + b.EncodeVarint(uint64(x.F_Int64)) + case *Oneof_F_Fixed32: + b.EncodeVarint(4<<3 | proto.WireFixed32) + b.EncodeFixed32(uint64(x.F_Fixed32)) + case *Oneof_F_Fixed64: + b.EncodeVarint(5<<3 | proto.WireFixed64) + b.EncodeFixed64(uint64(x.F_Fixed64)) + case *Oneof_F_Uint32: + b.EncodeVarint(6<<3 | proto.WireVarint) + b.EncodeVarint(uint64(x.F_Uint32)) + case *Oneof_F_Uint64: + b.EncodeVarint(7<<3 | proto.WireVarint) + b.EncodeVarint(uint64(x.F_Uint64)) + case *Oneof_F_Float: + b.EncodeVarint(8<<3 | proto.WireFixed32) + b.EncodeFixed32(uint64(math.Float32bits(x.F_Float))) + case *Oneof_F_Double: + b.EncodeVarint(9<<3 | proto.WireFixed64) + b.EncodeFixed64(math.Float64bits(x.F_Double)) + case *Oneof_F_String: + b.EncodeVarint(10<<3 | proto.WireBytes) + b.EncodeStringBytes(x.F_String) + case *Oneof_F_Bytes: + b.EncodeVarint(11<<3 | proto.WireBytes) + b.EncodeRawBytes(x.F_Bytes) + case *Oneof_F_Sint32: + b.EncodeVarint(12<<3 | proto.WireVarint) + b.EncodeZigzag32(uint64(x.F_Sint32)) + case *Oneof_F_Sint64: + b.EncodeVarint(13<<3 | proto.WireVarint) + b.EncodeZigzag64(uint64(x.F_Sint64)) + case *Oneof_F_Enum: + b.EncodeVarint(14<<3 | proto.WireVarint) + b.EncodeVarint(uint64(x.F_Enum)) + case *Oneof_F_Message: + b.EncodeVarint(15<<3 | proto.WireBytes) + if err := b.EncodeMessage(x.F_Message); err != nil { + return err + } + case *Oneof_FGroup: + b.EncodeVarint(16<<3 | proto.WireStartGroup) + if err := b.Marshal(x.FGroup); err != nil { + return err + } + b.EncodeVarint(16<<3 | proto.WireEndGroup) + case *Oneof_F_Largest_Tag: + b.EncodeVarint(536870911<<3 | proto.WireVarint) + b.EncodeVarint(uint64(x.F_Largest_Tag)) + case nil: + default: + return fmt.Errorf("Oneof.Union has unexpected type %T", x) + } + // tormato + switch x := m.Tormato.(type) { + case *Oneof_Value: + b.EncodeVarint(100<<3 | proto.WireVarint) + b.EncodeVarint(uint64(x.Value)) + case nil: + default: + return fmt.Errorf("Oneof.Tormato has unexpected type %T", x) + } + return nil +} + +func _Oneof_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) { + m := msg.(*Oneof) + switch tag { + case 1: // union.F_Bool + if wire != proto.WireVarint { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeVarint() + m.Union = &Oneof_F_Bool{x != 0} + return true, err + case 2: // union.F_Int32 + if wire != proto.WireVarint { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeVarint() + m.Union = &Oneof_F_Int32{int32(x)} + return true, err + case 3: // union.F_Int64 + if wire != proto.WireVarint { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeVarint() + m.Union = &Oneof_F_Int64{int64(x)} + return true, err + case 4: // union.F_Fixed32 + if wire != proto.WireFixed32 { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeFixed32() + m.Union = &Oneof_F_Fixed32{uint32(x)} + return true, err + case 5: // union.F_Fixed64 + if wire != proto.WireFixed64 { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeFixed64() + m.Union = &Oneof_F_Fixed64{x} + return true, err + case 6: // union.F_Uint32 + if wire != proto.WireVarint { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeVarint() + m.Union = &Oneof_F_Uint32{uint32(x)} + return true, err + case 7: // union.F_Uint64 + if wire != proto.WireVarint { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeVarint() + m.Union = &Oneof_F_Uint64{x} + return true, err + case 8: // union.F_Float + if wire != proto.WireFixed32 { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeFixed32() + m.Union = &Oneof_F_Float{math.Float32frombits(uint32(x))} + return true, err + case 9: // union.F_Double + if wire != proto.WireFixed64 { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeFixed64() + m.Union = &Oneof_F_Double{math.Float64frombits(x)} + return true, err + case 10: // union.F_String + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeStringBytes() + m.Union = &Oneof_F_String{x} + return true, err + case 11: // union.F_Bytes + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeRawBytes(true) + m.Union = &Oneof_F_Bytes{x} + return true, err + case 12: // union.F_Sint32 + if wire != proto.WireVarint { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeZigzag32() + m.Union = &Oneof_F_Sint32{int32(x)} + return true, err + case 13: // union.F_Sint64 + if wire != proto.WireVarint { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeZigzag64() + m.Union = &Oneof_F_Sint64{int64(x)} + return true, err + case 14: // union.F_Enum + if wire != proto.WireVarint { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeVarint() + m.Union = &Oneof_F_Enum{MyMessage_Color(x)} + return true, err + case 15: // union.F_Message + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + msg := new(GoTestField) + err := b.DecodeMessage(msg) + m.Union = &Oneof_F_Message{msg} + return true, err + case 16: // union.f_group + if wire != proto.WireStartGroup { + return true, proto.ErrInternalBadWireType + } + msg := new(Oneof_F_Group) + err := b.DecodeGroup(msg) + m.Union = &Oneof_FGroup{msg} + return true, err + case 536870911: // union.F_Largest_Tag + if wire != proto.WireVarint { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeVarint() + m.Union = &Oneof_F_Largest_Tag{int32(x)} + return true, err + case 100: // tormato.value + if wire != proto.WireVarint { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeVarint() + m.Tormato = &Oneof_Value{int32(x)} + return true, err + default: + return false, nil + } +} + +func _Oneof_OneofSizer(msg proto.Message) (n int) { + m := msg.(*Oneof) + // union + switch x := m.Union.(type) { + case *Oneof_F_Bool: + n += proto.SizeVarint(1<<3 | proto.WireVarint) + n += 1 + case *Oneof_F_Int32: + n += proto.SizeVarint(2<<3 | proto.WireVarint) + n += proto.SizeVarint(uint64(x.F_Int32)) + case *Oneof_F_Int64: + n += proto.SizeVarint(3<<3 | proto.WireVarint) + n += proto.SizeVarint(uint64(x.F_Int64)) + case *Oneof_F_Fixed32: + n += proto.SizeVarint(4<<3 | proto.WireFixed32) + n += 4 + case *Oneof_F_Fixed64: + n += proto.SizeVarint(5<<3 | proto.WireFixed64) + n += 8 + case *Oneof_F_Uint32: + n += proto.SizeVarint(6<<3 | proto.WireVarint) + n += proto.SizeVarint(uint64(x.F_Uint32)) + case *Oneof_F_Uint64: + n += proto.SizeVarint(7<<3 | proto.WireVarint) + n += proto.SizeVarint(uint64(x.F_Uint64)) + case *Oneof_F_Float: + n += proto.SizeVarint(8<<3 | proto.WireFixed32) + n += 4 + case *Oneof_F_Double: + n += proto.SizeVarint(9<<3 | proto.WireFixed64) + n += 8 + case *Oneof_F_String: + n += proto.SizeVarint(10<<3 | proto.WireBytes) + n += proto.SizeVarint(uint64(len(x.F_String))) + n += len(x.F_String) + case *Oneof_F_Bytes: + n += proto.SizeVarint(11<<3 | proto.WireBytes) + n += proto.SizeVarint(uint64(len(x.F_Bytes))) + n += len(x.F_Bytes) + case *Oneof_F_Sint32: + n += proto.SizeVarint(12<<3 | proto.WireVarint) + n += proto.SizeVarint(uint64((uint32(x.F_Sint32) << 1) ^ uint32((int32(x.F_Sint32) >> 31)))) + case *Oneof_F_Sint64: + n += proto.SizeVarint(13<<3 | proto.WireVarint) + n += proto.SizeVarint(uint64(uint64(x.F_Sint64<<1) ^ uint64((int64(x.F_Sint64) >> 63)))) + case *Oneof_F_Enum: + n += proto.SizeVarint(14<<3 | proto.WireVarint) + n += proto.SizeVarint(uint64(x.F_Enum)) + case *Oneof_F_Message: + s := proto.Size(x.F_Message) + n += proto.SizeVarint(15<<3 | proto.WireBytes) + n += proto.SizeVarint(uint64(s)) + n += s + case *Oneof_FGroup: + n += proto.SizeVarint(16<<3 | proto.WireStartGroup) + n += proto.Size(x.FGroup) + n += proto.SizeVarint(16<<3 | proto.WireEndGroup) + case *Oneof_F_Largest_Tag: + n += proto.SizeVarint(536870911<<3 | proto.WireVarint) + n += proto.SizeVarint(uint64(x.F_Largest_Tag)) + case nil: + default: + panic(fmt.Sprintf("proto: unexpected type %T in oneof", x)) + } + // tormato + switch x := m.Tormato.(type) { + case *Oneof_Value: + n += proto.SizeVarint(100<<3 | proto.WireVarint) + n += proto.SizeVarint(uint64(x.Value)) + case nil: + default: + panic(fmt.Sprintf("proto: unexpected type %T in oneof", x)) + } + return n +} + +type Oneof_F_Group struct { + X *int32 `protobuf:"varint,17,opt,name=x" json:"x,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *Oneof_F_Group) Reset() { *m = Oneof_F_Group{} } +func (m *Oneof_F_Group) String() string { return proto.CompactTextString(m) } +func (*Oneof_F_Group) ProtoMessage() {} +func (*Oneof_F_Group) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{28, 0} } + +func (m *Oneof_F_Group) GetX() int32 { + if m != nil && m.X != nil { + return *m.X + } + return 0 +} + +type Communique struct { + MakeMeCry *bool `protobuf:"varint,1,opt,name=make_me_cry,json=makeMeCry" json:"make_me_cry,omitempty"` + // This is a oneof, called "union". + // + // Types that are valid to be assigned to Union: + // *Communique_Number + // *Communique_Name + // *Communique_Data + // *Communique_TempC + // *Communique_Col + // *Communique_Msg + Union isCommunique_Union `protobuf_oneof:"union"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *Communique) Reset() { *m = Communique{} } +func (m *Communique) String() string { return proto.CompactTextString(m) } +func (*Communique) ProtoMessage() {} +func (*Communique) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{29} } + +type isCommunique_Union interface { + isCommunique_Union() +} + +type Communique_Number struct { + Number int32 `protobuf:"varint,5,opt,name=number,oneof"` +} +type Communique_Name struct { + Name string `protobuf:"bytes,6,opt,name=name,oneof"` +} +type Communique_Data struct { + Data []byte `protobuf:"bytes,7,opt,name=data,oneof"` +} +type Communique_TempC struct { + TempC float64 `protobuf:"fixed64,8,opt,name=temp_c,json=tempC,oneof"` +} +type Communique_Col struct { + Col MyMessage_Color `protobuf:"varint,9,opt,name=col,enum=testdata.MyMessage_Color,oneof"` +} +type Communique_Msg struct { + Msg *Strings `protobuf:"bytes,10,opt,name=msg,oneof"` +} + +func (*Communique_Number) isCommunique_Union() {} +func (*Communique_Name) isCommunique_Union() {} +func (*Communique_Data) isCommunique_Union() {} +func (*Communique_TempC) isCommunique_Union() {} +func (*Communique_Col) isCommunique_Union() {} +func (*Communique_Msg) isCommunique_Union() {} + +func (m *Communique) GetUnion() isCommunique_Union { + if m != nil { + return m.Union + } + return nil +} + +func (m *Communique) GetMakeMeCry() bool { + if m != nil && m.MakeMeCry != nil { + return *m.MakeMeCry + } + return false +} + +func (m *Communique) GetNumber() int32 { + if x, ok := m.GetUnion().(*Communique_Number); ok { + return x.Number + } + return 0 +} + +func (m *Communique) GetName() string { + if x, ok := m.GetUnion().(*Communique_Name); ok { + return x.Name + } + return "" +} + +func (m *Communique) GetData() []byte { + if x, ok := m.GetUnion().(*Communique_Data); ok { + return x.Data + } + return nil +} + +func (m *Communique) GetTempC() float64 { + if x, ok := m.GetUnion().(*Communique_TempC); ok { + return x.TempC + } + return 0 +} + +func (m *Communique) GetCol() MyMessage_Color { + if x, ok := m.GetUnion().(*Communique_Col); ok { + return x.Col + } + return MyMessage_RED +} + +func (m *Communique) GetMsg() *Strings { + if x, ok := m.GetUnion().(*Communique_Msg); ok { + return x.Msg + } + return nil +} + +// XXX_OneofFuncs is for the internal use of the proto package. +func (*Communique) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{}) { + return _Communique_OneofMarshaler, _Communique_OneofUnmarshaler, _Communique_OneofSizer, []interface{}{ + (*Communique_Number)(nil), + (*Communique_Name)(nil), + (*Communique_Data)(nil), + (*Communique_TempC)(nil), + (*Communique_Col)(nil), + (*Communique_Msg)(nil), + } +} + +func _Communique_OneofMarshaler(msg proto.Message, b *proto.Buffer) error { + m := msg.(*Communique) + // union + switch x := m.Union.(type) { + case *Communique_Number: + b.EncodeVarint(5<<3 | proto.WireVarint) + b.EncodeVarint(uint64(x.Number)) + case *Communique_Name: + b.EncodeVarint(6<<3 | proto.WireBytes) + b.EncodeStringBytes(x.Name) + case *Communique_Data: + b.EncodeVarint(7<<3 | proto.WireBytes) + b.EncodeRawBytes(x.Data) + case *Communique_TempC: + b.EncodeVarint(8<<3 | proto.WireFixed64) + b.EncodeFixed64(math.Float64bits(x.TempC)) + case *Communique_Col: + b.EncodeVarint(9<<3 | proto.WireVarint) + b.EncodeVarint(uint64(x.Col)) + case *Communique_Msg: + b.EncodeVarint(10<<3 | proto.WireBytes) + if err := b.EncodeMessage(x.Msg); err != nil { + return err + } + case nil: + default: + return fmt.Errorf("Communique.Union has unexpected type %T", x) + } + return nil +} + +func _Communique_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) { + m := msg.(*Communique) + switch tag { + case 5: // union.number + if wire != proto.WireVarint { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeVarint() + m.Union = &Communique_Number{int32(x)} + return true, err + case 6: // union.name + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeStringBytes() + m.Union = &Communique_Name{x} + return true, err + case 7: // union.data + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeRawBytes(true) + m.Union = &Communique_Data{x} + return true, err + case 8: // union.temp_c + if wire != proto.WireFixed64 { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeFixed64() + m.Union = &Communique_TempC{math.Float64frombits(x)} + return true, err + case 9: // union.col + if wire != proto.WireVarint { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeVarint() + m.Union = &Communique_Col{MyMessage_Color(x)} + return true, err + case 10: // union.msg + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + msg := new(Strings) + err := b.DecodeMessage(msg) + m.Union = &Communique_Msg{msg} + return true, err + default: + return false, nil + } +} + +func _Communique_OneofSizer(msg proto.Message) (n int) { + m := msg.(*Communique) + // union + switch x := m.Union.(type) { + case *Communique_Number: + n += proto.SizeVarint(5<<3 | proto.WireVarint) + n += proto.SizeVarint(uint64(x.Number)) + case *Communique_Name: + n += proto.SizeVarint(6<<3 | proto.WireBytes) + n += proto.SizeVarint(uint64(len(x.Name))) + n += len(x.Name) + case *Communique_Data: + n += proto.SizeVarint(7<<3 | proto.WireBytes) + n += proto.SizeVarint(uint64(len(x.Data))) + n += len(x.Data) + case *Communique_TempC: + n += proto.SizeVarint(8<<3 | proto.WireFixed64) + n += 8 + case *Communique_Col: + n += proto.SizeVarint(9<<3 | proto.WireVarint) + n += proto.SizeVarint(uint64(x.Col)) + case *Communique_Msg: + s := proto.Size(x.Msg) + n += proto.SizeVarint(10<<3 | proto.WireBytes) + n += proto.SizeVarint(uint64(s)) + n += s + case nil: + default: + panic(fmt.Sprintf("proto: unexpected type %T in oneof", x)) + } + return n +} + +var E_Greeting = &proto.ExtensionDesc{ + ExtendedType: (*MyMessage)(nil), + ExtensionType: ([]string)(nil), + Field: 106, + Name: "testdata.greeting", + Tag: "bytes,106,rep,name=greeting", +} + +var E_Complex = &proto.ExtensionDesc{ + ExtendedType: (*OtherMessage)(nil), + ExtensionType: (*ComplexExtension)(nil), + Field: 200, + Name: "testdata.complex", + Tag: "bytes,200,opt,name=complex", +} + +var E_RComplex = &proto.ExtensionDesc{ + ExtendedType: (*OtherMessage)(nil), + ExtensionType: ([]*ComplexExtension)(nil), + Field: 201, + Name: "testdata.r_complex", + Tag: "bytes,201,rep,name=r_complex,json=rComplex", +} + +var E_NoDefaultDouble = &proto.ExtensionDesc{ + ExtendedType: (*DefaultsMessage)(nil), + ExtensionType: (*float64)(nil), + Field: 101, + Name: "testdata.no_default_double", + Tag: "fixed64,101,opt,name=no_default_double,json=noDefaultDouble", +} + +var E_NoDefaultFloat = &proto.ExtensionDesc{ + ExtendedType: (*DefaultsMessage)(nil), + ExtensionType: (*float32)(nil), + Field: 102, + Name: "testdata.no_default_float", + Tag: "fixed32,102,opt,name=no_default_float,json=noDefaultFloat", +} + +var E_NoDefaultInt32 = &proto.ExtensionDesc{ + ExtendedType: (*DefaultsMessage)(nil), + ExtensionType: (*int32)(nil), + Field: 103, + Name: "testdata.no_default_int32", + Tag: "varint,103,opt,name=no_default_int32,json=noDefaultInt32", +} + +var E_NoDefaultInt64 = &proto.ExtensionDesc{ + ExtendedType: (*DefaultsMessage)(nil), + ExtensionType: (*int64)(nil), + Field: 104, + Name: "testdata.no_default_int64", + Tag: "varint,104,opt,name=no_default_int64,json=noDefaultInt64", +} + +var E_NoDefaultUint32 = &proto.ExtensionDesc{ + ExtendedType: (*DefaultsMessage)(nil), + ExtensionType: (*uint32)(nil), + Field: 105, + Name: "testdata.no_default_uint32", + Tag: "varint,105,opt,name=no_default_uint32,json=noDefaultUint32", +} + +var E_NoDefaultUint64 = &proto.ExtensionDesc{ + ExtendedType: (*DefaultsMessage)(nil), + ExtensionType: (*uint64)(nil), + Field: 106, + Name: "testdata.no_default_uint64", + Tag: "varint,106,opt,name=no_default_uint64,json=noDefaultUint64", +} + +var E_NoDefaultSint32 = &proto.ExtensionDesc{ + ExtendedType: (*DefaultsMessage)(nil), + ExtensionType: (*int32)(nil), + Field: 107, + Name: "testdata.no_default_sint32", + Tag: "zigzag32,107,opt,name=no_default_sint32,json=noDefaultSint32", +} + +var E_NoDefaultSint64 = &proto.ExtensionDesc{ + ExtendedType: (*DefaultsMessage)(nil), + ExtensionType: (*int64)(nil), + Field: 108, + Name: "testdata.no_default_sint64", + Tag: "zigzag64,108,opt,name=no_default_sint64,json=noDefaultSint64", +} + +var E_NoDefaultFixed32 = &proto.ExtensionDesc{ + ExtendedType: (*DefaultsMessage)(nil), + ExtensionType: (*uint32)(nil), + Field: 109, + Name: "testdata.no_default_fixed32", + Tag: "fixed32,109,opt,name=no_default_fixed32,json=noDefaultFixed32", +} + +var E_NoDefaultFixed64 = &proto.ExtensionDesc{ + ExtendedType: (*DefaultsMessage)(nil), + ExtensionType: (*uint64)(nil), + Field: 110, + Name: "testdata.no_default_fixed64", + Tag: "fixed64,110,opt,name=no_default_fixed64,json=noDefaultFixed64", +} + +var E_NoDefaultSfixed32 = &proto.ExtensionDesc{ + ExtendedType: (*DefaultsMessage)(nil), + ExtensionType: (*int32)(nil), + Field: 111, + Name: "testdata.no_default_sfixed32", + Tag: "fixed32,111,opt,name=no_default_sfixed32,json=noDefaultSfixed32", +} + +var E_NoDefaultSfixed64 = &proto.ExtensionDesc{ + ExtendedType: (*DefaultsMessage)(nil), + ExtensionType: (*int64)(nil), + Field: 112, + Name: "testdata.no_default_sfixed64", + Tag: "fixed64,112,opt,name=no_default_sfixed64,json=noDefaultSfixed64", +} + +var E_NoDefaultBool = &proto.ExtensionDesc{ + ExtendedType: (*DefaultsMessage)(nil), + ExtensionType: (*bool)(nil), + Field: 113, + Name: "testdata.no_default_bool", + Tag: "varint,113,opt,name=no_default_bool,json=noDefaultBool", +} + +var E_NoDefaultString = &proto.ExtensionDesc{ + ExtendedType: (*DefaultsMessage)(nil), + ExtensionType: (*string)(nil), + Field: 114, + Name: "testdata.no_default_string", + Tag: "bytes,114,opt,name=no_default_string,json=noDefaultString", +} + +var E_NoDefaultBytes = &proto.ExtensionDesc{ + ExtendedType: (*DefaultsMessage)(nil), + ExtensionType: ([]byte)(nil), + Field: 115, + Name: "testdata.no_default_bytes", + Tag: "bytes,115,opt,name=no_default_bytes,json=noDefaultBytes", +} + +var E_NoDefaultEnum = &proto.ExtensionDesc{ + ExtendedType: (*DefaultsMessage)(nil), + ExtensionType: (*DefaultsMessage_DefaultsEnum)(nil), + Field: 116, + Name: "testdata.no_default_enum", + Tag: "varint,116,opt,name=no_default_enum,json=noDefaultEnum,enum=testdata.DefaultsMessage_DefaultsEnum", +} + +var E_DefaultDouble = &proto.ExtensionDesc{ + ExtendedType: (*DefaultsMessage)(nil), + ExtensionType: (*float64)(nil), + Field: 201, + Name: "testdata.default_double", + Tag: "fixed64,201,opt,name=default_double,json=defaultDouble,def=3.1415", +} + +var E_DefaultFloat = &proto.ExtensionDesc{ + ExtendedType: (*DefaultsMessage)(nil), + ExtensionType: (*float32)(nil), + Field: 202, + Name: "testdata.default_float", + Tag: "fixed32,202,opt,name=default_float,json=defaultFloat,def=3.14", +} + +var E_DefaultInt32 = &proto.ExtensionDesc{ + ExtendedType: (*DefaultsMessage)(nil), + ExtensionType: (*int32)(nil), + Field: 203, + Name: "testdata.default_int32", + Tag: "varint,203,opt,name=default_int32,json=defaultInt32,def=42", +} + +var E_DefaultInt64 = &proto.ExtensionDesc{ + ExtendedType: (*DefaultsMessage)(nil), + ExtensionType: (*int64)(nil), + Field: 204, + Name: "testdata.default_int64", + Tag: "varint,204,opt,name=default_int64,json=defaultInt64,def=43", +} + +var E_DefaultUint32 = &proto.ExtensionDesc{ + ExtendedType: (*DefaultsMessage)(nil), + ExtensionType: (*uint32)(nil), + Field: 205, + Name: "testdata.default_uint32", + Tag: "varint,205,opt,name=default_uint32,json=defaultUint32,def=44", +} + +var E_DefaultUint64 = &proto.ExtensionDesc{ + ExtendedType: (*DefaultsMessage)(nil), + ExtensionType: (*uint64)(nil), + Field: 206, + Name: "testdata.default_uint64", + Tag: "varint,206,opt,name=default_uint64,json=defaultUint64,def=45", +} + +var E_DefaultSint32 = &proto.ExtensionDesc{ + ExtendedType: (*DefaultsMessage)(nil), + ExtensionType: (*int32)(nil), + Field: 207, + Name: "testdata.default_sint32", + Tag: "zigzag32,207,opt,name=default_sint32,json=defaultSint32,def=46", +} + +var E_DefaultSint64 = &proto.ExtensionDesc{ + ExtendedType: (*DefaultsMessage)(nil), + ExtensionType: (*int64)(nil), + Field: 208, + Name: "testdata.default_sint64", + Tag: "zigzag64,208,opt,name=default_sint64,json=defaultSint64,def=47", +} + +var E_DefaultFixed32 = &proto.ExtensionDesc{ + ExtendedType: (*DefaultsMessage)(nil), + ExtensionType: (*uint32)(nil), + Field: 209, + Name: "testdata.default_fixed32", + Tag: "fixed32,209,opt,name=default_fixed32,json=defaultFixed32,def=48", +} + +var E_DefaultFixed64 = &proto.ExtensionDesc{ + ExtendedType: (*DefaultsMessage)(nil), + ExtensionType: (*uint64)(nil), + Field: 210, + Name: "testdata.default_fixed64", + Tag: "fixed64,210,opt,name=default_fixed64,json=defaultFixed64,def=49", +} + +var E_DefaultSfixed32 = &proto.ExtensionDesc{ + ExtendedType: (*DefaultsMessage)(nil), + ExtensionType: (*int32)(nil), + Field: 211, + Name: "testdata.default_sfixed32", + Tag: "fixed32,211,opt,name=default_sfixed32,json=defaultSfixed32,def=50", +} + +var E_DefaultSfixed64 = &proto.ExtensionDesc{ + ExtendedType: (*DefaultsMessage)(nil), + ExtensionType: (*int64)(nil), + Field: 212, + Name: "testdata.default_sfixed64", + Tag: "fixed64,212,opt,name=default_sfixed64,json=defaultSfixed64,def=51", +} + +var E_DefaultBool = &proto.ExtensionDesc{ + ExtendedType: (*DefaultsMessage)(nil), + ExtensionType: (*bool)(nil), + Field: 213, + Name: "testdata.default_bool", + Tag: "varint,213,opt,name=default_bool,json=defaultBool,def=1", +} + +var E_DefaultString = &proto.ExtensionDesc{ + ExtendedType: (*DefaultsMessage)(nil), + ExtensionType: (*string)(nil), + Field: 214, + Name: "testdata.default_string", + Tag: "bytes,214,opt,name=default_string,json=defaultString,def=Hello, string", +} + +var E_DefaultBytes = &proto.ExtensionDesc{ + ExtendedType: (*DefaultsMessage)(nil), + ExtensionType: ([]byte)(nil), + Field: 215, + Name: "testdata.default_bytes", + Tag: "bytes,215,opt,name=default_bytes,json=defaultBytes,def=Hello, bytes", +} + +var E_DefaultEnum = &proto.ExtensionDesc{ + ExtendedType: (*DefaultsMessage)(nil), + ExtensionType: (*DefaultsMessage_DefaultsEnum)(nil), + Field: 216, + Name: "testdata.default_enum", + Tag: "varint,216,opt,name=default_enum,json=defaultEnum,enum=testdata.DefaultsMessage_DefaultsEnum,def=1", +} + +var E_X201 = &proto.ExtensionDesc{ + ExtendedType: (*MyMessageSet)(nil), + ExtensionType: (*Empty)(nil), + Field: 201, + Name: "testdata.x201", + Tag: "bytes,201,opt,name=x201", +} + +var E_X202 = &proto.ExtensionDesc{ + ExtendedType: (*MyMessageSet)(nil), + ExtensionType: (*Empty)(nil), + Field: 202, + Name: "testdata.x202", + Tag: "bytes,202,opt,name=x202", +} + +var E_X203 = &proto.ExtensionDesc{ + ExtendedType: (*MyMessageSet)(nil), + ExtensionType: (*Empty)(nil), + Field: 203, + Name: "testdata.x203", + Tag: "bytes,203,opt,name=x203", +} + +var E_X204 = &proto.ExtensionDesc{ + ExtendedType: (*MyMessageSet)(nil), + ExtensionType: (*Empty)(nil), + Field: 204, + Name: "testdata.x204", + Tag: "bytes,204,opt,name=x204", +} + +var E_X205 = &proto.ExtensionDesc{ + ExtendedType: (*MyMessageSet)(nil), + ExtensionType: (*Empty)(nil), + Field: 205, + Name: "testdata.x205", + Tag: "bytes,205,opt,name=x205", +} + +var E_X206 = &proto.ExtensionDesc{ + ExtendedType: (*MyMessageSet)(nil), + ExtensionType: (*Empty)(nil), + Field: 206, + Name: "testdata.x206", + Tag: "bytes,206,opt,name=x206", +} + +var E_X207 = &proto.ExtensionDesc{ + ExtendedType: (*MyMessageSet)(nil), + ExtensionType: (*Empty)(nil), + Field: 207, + Name: "testdata.x207", + Tag: "bytes,207,opt,name=x207", +} + +var E_X208 = &proto.ExtensionDesc{ + ExtendedType: (*MyMessageSet)(nil), + ExtensionType: (*Empty)(nil), + Field: 208, + Name: "testdata.x208", + Tag: "bytes,208,opt,name=x208", +} + +var E_X209 = &proto.ExtensionDesc{ + ExtendedType: (*MyMessageSet)(nil), + ExtensionType: (*Empty)(nil), + Field: 209, + Name: "testdata.x209", + Tag: "bytes,209,opt,name=x209", +} + +var E_X210 = &proto.ExtensionDesc{ + ExtendedType: (*MyMessageSet)(nil), + ExtensionType: (*Empty)(nil), + Field: 210, + Name: "testdata.x210", + Tag: "bytes,210,opt,name=x210", +} + +var E_X211 = &proto.ExtensionDesc{ + ExtendedType: (*MyMessageSet)(nil), + ExtensionType: (*Empty)(nil), + Field: 211, + Name: "testdata.x211", + Tag: "bytes,211,opt,name=x211", +} + +var E_X212 = &proto.ExtensionDesc{ + ExtendedType: (*MyMessageSet)(nil), + ExtensionType: (*Empty)(nil), + Field: 212, + Name: "testdata.x212", + Tag: "bytes,212,opt,name=x212", +} + +var E_X213 = &proto.ExtensionDesc{ + ExtendedType: (*MyMessageSet)(nil), + ExtensionType: (*Empty)(nil), + Field: 213, + Name: "testdata.x213", + Tag: "bytes,213,opt,name=x213", +} + +var E_X214 = &proto.ExtensionDesc{ + ExtendedType: (*MyMessageSet)(nil), + ExtensionType: (*Empty)(nil), + Field: 214, + Name: "testdata.x214", + Tag: "bytes,214,opt,name=x214", +} + +var E_X215 = &proto.ExtensionDesc{ + ExtendedType: (*MyMessageSet)(nil), + ExtensionType: (*Empty)(nil), + Field: 215, + Name: "testdata.x215", + Tag: "bytes,215,opt,name=x215", +} + +var E_X216 = &proto.ExtensionDesc{ + ExtendedType: (*MyMessageSet)(nil), + ExtensionType: (*Empty)(nil), + Field: 216, + Name: "testdata.x216", + Tag: "bytes,216,opt,name=x216", +} + +var E_X217 = &proto.ExtensionDesc{ + ExtendedType: (*MyMessageSet)(nil), + ExtensionType: (*Empty)(nil), + Field: 217, + Name: "testdata.x217", + Tag: "bytes,217,opt,name=x217", +} + +var E_X218 = &proto.ExtensionDesc{ + ExtendedType: (*MyMessageSet)(nil), + ExtensionType: (*Empty)(nil), + Field: 218, + Name: "testdata.x218", + Tag: "bytes,218,opt,name=x218", +} + +var E_X219 = &proto.ExtensionDesc{ + ExtendedType: (*MyMessageSet)(nil), + ExtensionType: (*Empty)(nil), + Field: 219, + Name: "testdata.x219", + Tag: "bytes,219,opt,name=x219", +} + +var E_X220 = &proto.ExtensionDesc{ + ExtendedType: (*MyMessageSet)(nil), + ExtensionType: (*Empty)(nil), + Field: 220, + Name: "testdata.x220", + Tag: "bytes,220,opt,name=x220", +} + +var E_X221 = &proto.ExtensionDesc{ + ExtendedType: (*MyMessageSet)(nil), + ExtensionType: (*Empty)(nil), + Field: 221, + Name: "testdata.x221", + Tag: "bytes,221,opt,name=x221", +} + +var E_X222 = &proto.ExtensionDesc{ + ExtendedType: (*MyMessageSet)(nil), + ExtensionType: (*Empty)(nil), + Field: 222, + Name: "testdata.x222", + Tag: "bytes,222,opt,name=x222", +} + +var E_X223 = &proto.ExtensionDesc{ + ExtendedType: (*MyMessageSet)(nil), + ExtensionType: (*Empty)(nil), + Field: 223, + Name: "testdata.x223", + Tag: "bytes,223,opt,name=x223", +} + +var E_X224 = &proto.ExtensionDesc{ + ExtendedType: (*MyMessageSet)(nil), + ExtensionType: (*Empty)(nil), + Field: 224, + Name: "testdata.x224", + Tag: "bytes,224,opt,name=x224", +} + +var E_X225 = &proto.ExtensionDesc{ + ExtendedType: (*MyMessageSet)(nil), + ExtensionType: (*Empty)(nil), + Field: 225, + Name: "testdata.x225", + Tag: "bytes,225,opt,name=x225", +} + +var E_X226 = &proto.ExtensionDesc{ + ExtendedType: (*MyMessageSet)(nil), + ExtensionType: (*Empty)(nil), + Field: 226, + Name: "testdata.x226", + Tag: "bytes,226,opt,name=x226", +} + +var E_X227 = &proto.ExtensionDesc{ + ExtendedType: (*MyMessageSet)(nil), + ExtensionType: (*Empty)(nil), + Field: 227, + Name: "testdata.x227", + Tag: "bytes,227,opt,name=x227", +} + +var E_X228 = &proto.ExtensionDesc{ + ExtendedType: (*MyMessageSet)(nil), + ExtensionType: (*Empty)(nil), + Field: 228, + Name: "testdata.x228", + Tag: "bytes,228,opt,name=x228", +} + +var E_X229 = &proto.ExtensionDesc{ + ExtendedType: (*MyMessageSet)(nil), + ExtensionType: (*Empty)(nil), + Field: 229, + Name: "testdata.x229", + Tag: "bytes,229,opt,name=x229", +} + +var E_X230 = &proto.ExtensionDesc{ + ExtendedType: (*MyMessageSet)(nil), + ExtensionType: (*Empty)(nil), + Field: 230, + Name: "testdata.x230", + Tag: "bytes,230,opt,name=x230", +} + +var E_X231 = &proto.ExtensionDesc{ + ExtendedType: (*MyMessageSet)(nil), + ExtensionType: (*Empty)(nil), + Field: 231, + Name: "testdata.x231", + Tag: "bytes,231,opt,name=x231", +} + +var E_X232 = &proto.ExtensionDesc{ + ExtendedType: (*MyMessageSet)(nil), + ExtensionType: (*Empty)(nil), + Field: 232, + Name: "testdata.x232", + Tag: "bytes,232,opt,name=x232", +} + +var E_X233 = &proto.ExtensionDesc{ + ExtendedType: (*MyMessageSet)(nil), + ExtensionType: (*Empty)(nil), + Field: 233, + Name: "testdata.x233", + Tag: "bytes,233,opt,name=x233", +} + +var E_X234 = &proto.ExtensionDesc{ + ExtendedType: (*MyMessageSet)(nil), + ExtensionType: (*Empty)(nil), + Field: 234, + Name: "testdata.x234", + Tag: "bytes,234,opt,name=x234", +} + +var E_X235 = &proto.ExtensionDesc{ + ExtendedType: (*MyMessageSet)(nil), + ExtensionType: (*Empty)(nil), + Field: 235, + Name: "testdata.x235", + Tag: "bytes,235,opt,name=x235", +} + +var E_X236 = &proto.ExtensionDesc{ + ExtendedType: (*MyMessageSet)(nil), + ExtensionType: (*Empty)(nil), + Field: 236, + Name: "testdata.x236", + Tag: "bytes,236,opt,name=x236", +} + +var E_X237 = &proto.ExtensionDesc{ + ExtendedType: (*MyMessageSet)(nil), + ExtensionType: (*Empty)(nil), + Field: 237, + Name: "testdata.x237", + Tag: "bytes,237,opt,name=x237", +} + +var E_X238 = &proto.ExtensionDesc{ + ExtendedType: (*MyMessageSet)(nil), + ExtensionType: (*Empty)(nil), + Field: 238, + Name: "testdata.x238", + Tag: "bytes,238,opt,name=x238", +} + +var E_X239 = &proto.ExtensionDesc{ + ExtendedType: (*MyMessageSet)(nil), + ExtensionType: (*Empty)(nil), + Field: 239, + Name: "testdata.x239", + Tag: "bytes,239,opt,name=x239", +} + +var E_X240 = &proto.ExtensionDesc{ + ExtendedType: (*MyMessageSet)(nil), + ExtensionType: (*Empty)(nil), + Field: 240, + Name: "testdata.x240", + Tag: "bytes,240,opt,name=x240", +} + +var E_X241 = &proto.ExtensionDesc{ + ExtendedType: (*MyMessageSet)(nil), + ExtensionType: (*Empty)(nil), + Field: 241, + Name: "testdata.x241", + Tag: "bytes,241,opt,name=x241", +} + +var E_X242 = &proto.ExtensionDesc{ + ExtendedType: (*MyMessageSet)(nil), + ExtensionType: (*Empty)(nil), + Field: 242, + Name: "testdata.x242", + Tag: "bytes,242,opt,name=x242", +} + +var E_X243 = &proto.ExtensionDesc{ + ExtendedType: (*MyMessageSet)(nil), + ExtensionType: (*Empty)(nil), + Field: 243, + Name: "testdata.x243", + Tag: "bytes,243,opt,name=x243", +} + +var E_X244 = &proto.ExtensionDesc{ + ExtendedType: (*MyMessageSet)(nil), + ExtensionType: (*Empty)(nil), + Field: 244, + Name: "testdata.x244", + Tag: "bytes,244,opt,name=x244", +} + +var E_X245 = &proto.ExtensionDesc{ + ExtendedType: (*MyMessageSet)(nil), + ExtensionType: (*Empty)(nil), + Field: 245, + Name: "testdata.x245", + Tag: "bytes,245,opt,name=x245", +} + +var E_X246 = &proto.ExtensionDesc{ + ExtendedType: (*MyMessageSet)(nil), + ExtensionType: (*Empty)(nil), + Field: 246, + Name: "testdata.x246", + Tag: "bytes,246,opt,name=x246", +} + +var E_X247 = &proto.ExtensionDesc{ + ExtendedType: (*MyMessageSet)(nil), + ExtensionType: (*Empty)(nil), + Field: 247, + Name: "testdata.x247", + Tag: "bytes,247,opt,name=x247", +} + +var E_X248 = &proto.ExtensionDesc{ + ExtendedType: (*MyMessageSet)(nil), + ExtensionType: (*Empty)(nil), + Field: 248, + Name: "testdata.x248", + Tag: "bytes,248,opt,name=x248", +} + +var E_X249 = &proto.ExtensionDesc{ + ExtendedType: (*MyMessageSet)(nil), + ExtensionType: (*Empty)(nil), + Field: 249, + Name: "testdata.x249", + Tag: "bytes,249,opt,name=x249", +} + +var E_X250 = &proto.ExtensionDesc{ + ExtendedType: (*MyMessageSet)(nil), + ExtensionType: (*Empty)(nil), + Field: 250, + Name: "testdata.x250", + Tag: "bytes,250,opt,name=x250", +} + +func init() { + proto.RegisterType((*GoEnum)(nil), "testdata.GoEnum") + proto.RegisterType((*GoTestField)(nil), "testdata.GoTestField") + proto.RegisterType((*GoTest)(nil), "testdata.GoTest") + proto.RegisterType((*GoTest_RequiredGroup)(nil), "testdata.GoTest.RequiredGroup") + proto.RegisterType((*GoTest_RepeatedGroup)(nil), "testdata.GoTest.RepeatedGroup") + proto.RegisterType((*GoTest_OptionalGroup)(nil), "testdata.GoTest.OptionalGroup") + proto.RegisterType((*GoSkipTest)(nil), "testdata.GoSkipTest") + proto.RegisterType((*GoSkipTest_SkipGroup)(nil), "testdata.GoSkipTest.SkipGroup") + proto.RegisterType((*NonPackedTest)(nil), "testdata.NonPackedTest") + proto.RegisterType((*PackedTest)(nil), "testdata.PackedTest") + proto.RegisterType((*MaxTag)(nil), "testdata.MaxTag") + proto.RegisterType((*OldMessage)(nil), "testdata.OldMessage") + proto.RegisterType((*OldMessage_Nested)(nil), "testdata.OldMessage.Nested") + proto.RegisterType((*NewMessage)(nil), "testdata.NewMessage") + proto.RegisterType((*NewMessage_Nested)(nil), "testdata.NewMessage.Nested") + proto.RegisterType((*InnerMessage)(nil), "testdata.InnerMessage") + proto.RegisterType((*OtherMessage)(nil), "testdata.OtherMessage") + proto.RegisterType((*RequiredInnerMessage)(nil), "testdata.RequiredInnerMessage") + proto.RegisterType((*MyMessage)(nil), "testdata.MyMessage") + proto.RegisterType((*MyMessage_SomeGroup)(nil), "testdata.MyMessage.SomeGroup") + proto.RegisterType((*Ext)(nil), "testdata.Ext") + proto.RegisterType((*ComplexExtension)(nil), "testdata.ComplexExtension") + proto.RegisterType((*DefaultsMessage)(nil), "testdata.DefaultsMessage") + proto.RegisterType((*MyMessageSet)(nil), "testdata.MyMessageSet") + proto.RegisterType((*Empty)(nil), "testdata.Empty") + proto.RegisterType((*MessageList)(nil), "testdata.MessageList") + proto.RegisterType((*MessageList_Message)(nil), "testdata.MessageList.Message") + proto.RegisterType((*Strings)(nil), "testdata.Strings") + proto.RegisterType((*Defaults)(nil), "testdata.Defaults") + proto.RegisterType((*SubDefaults)(nil), "testdata.SubDefaults") + proto.RegisterType((*RepeatedEnum)(nil), "testdata.RepeatedEnum") + proto.RegisterType((*MoreRepeated)(nil), "testdata.MoreRepeated") + proto.RegisterType((*GroupOld)(nil), "testdata.GroupOld") + proto.RegisterType((*GroupOld_G)(nil), "testdata.GroupOld.G") + proto.RegisterType((*GroupNew)(nil), "testdata.GroupNew") + proto.RegisterType((*GroupNew_G)(nil), "testdata.GroupNew.G") + proto.RegisterType((*FloatingPoint)(nil), "testdata.FloatingPoint") + proto.RegisterType((*MessageWithMap)(nil), "testdata.MessageWithMap") + proto.RegisterType((*Oneof)(nil), "testdata.Oneof") + proto.RegisterType((*Oneof_F_Group)(nil), "testdata.Oneof.F_Group") + proto.RegisterType((*Communique)(nil), "testdata.Communique") + proto.RegisterEnum("testdata.FOO", FOO_name, FOO_value) + proto.RegisterEnum("testdata.GoTest_KIND", GoTest_KIND_name, GoTest_KIND_value) + proto.RegisterEnum("testdata.MyMessage_Color", MyMessage_Color_name, MyMessage_Color_value) + proto.RegisterEnum("testdata.DefaultsMessage_DefaultsEnum", DefaultsMessage_DefaultsEnum_name, DefaultsMessage_DefaultsEnum_value) + proto.RegisterEnum("testdata.Defaults_Color", Defaults_Color_name, Defaults_Color_value) + proto.RegisterEnum("testdata.RepeatedEnum_Color", RepeatedEnum_Color_name, RepeatedEnum_Color_value) + proto.RegisterExtension(E_Ext_More) + proto.RegisterExtension(E_Ext_Text) + proto.RegisterExtension(E_Ext_Number) + proto.RegisterExtension(E_Greeting) + proto.RegisterExtension(E_Complex) + proto.RegisterExtension(E_RComplex) + proto.RegisterExtension(E_NoDefaultDouble) + proto.RegisterExtension(E_NoDefaultFloat) + proto.RegisterExtension(E_NoDefaultInt32) + proto.RegisterExtension(E_NoDefaultInt64) + proto.RegisterExtension(E_NoDefaultUint32) + proto.RegisterExtension(E_NoDefaultUint64) + proto.RegisterExtension(E_NoDefaultSint32) + proto.RegisterExtension(E_NoDefaultSint64) + proto.RegisterExtension(E_NoDefaultFixed32) + proto.RegisterExtension(E_NoDefaultFixed64) + proto.RegisterExtension(E_NoDefaultSfixed32) + proto.RegisterExtension(E_NoDefaultSfixed64) + proto.RegisterExtension(E_NoDefaultBool) + proto.RegisterExtension(E_NoDefaultString) + proto.RegisterExtension(E_NoDefaultBytes) + proto.RegisterExtension(E_NoDefaultEnum) + proto.RegisterExtension(E_DefaultDouble) + proto.RegisterExtension(E_DefaultFloat) + proto.RegisterExtension(E_DefaultInt32) + proto.RegisterExtension(E_DefaultInt64) + proto.RegisterExtension(E_DefaultUint32) + proto.RegisterExtension(E_DefaultUint64) + proto.RegisterExtension(E_DefaultSint32) + proto.RegisterExtension(E_DefaultSint64) + proto.RegisterExtension(E_DefaultFixed32) + proto.RegisterExtension(E_DefaultFixed64) + proto.RegisterExtension(E_DefaultSfixed32) + proto.RegisterExtension(E_DefaultSfixed64) + proto.RegisterExtension(E_DefaultBool) + proto.RegisterExtension(E_DefaultString) + proto.RegisterExtension(E_DefaultBytes) + proto.RegisterExtension(E_DefaultEnum) + proto.RegisterExtension(E_X201) + proto.RegisterExtension(E_X202) + proto.RegisterExtension(E_X203) + proto.RegisterExtension(E_X204) + proto.RegisterExtension(E_X205) + proto.RegisterExtension(E_X206) + proto.RegisterExtension(E_X207) + proto.RegisterExtension(E_X208) + proto.RegisterExtension(E_X209) + proto.RegisterExtension(E_X210) + proto.RegisterExtension(E_X211) + proto.RegisterExtension(E_X212) + proto.RegisterExtension(E_X213) + proto.RegisterExtension(E_X214) + proto.RegisterExtension(E_X215) + proto.RegisterExtension(E_X216) + proto.RegisterExtension(E_X217) + proto.RegisterExtension(E_X218) + proto.RegisterExtension(E_X219) + proto.RegisterExtension(E_X220) + proto.RegisterExtension(E_X221) + proto.RegisterExtension(E_X222) + proto.RegisterExtension(E_X223) + proto.RegisterExtension(E_X224) + proto.RegisterExtension(E_X225) + proto.RegisterExtension(E_X226) + proto.RegisterExtension(E_X227) + proto.RegisterExtension(E_X228) + proto.RegisterExtension(E_X229) + proto.RegisterExtension(E_X230) + proto.RegisterExtension(E_X231) + proto.RegisterExtension(E_X232) + proto.RegisterExtension(E_X233) + proto.RegisterExtension(E_X234) + proto.RegisterExtension(E_X235) + proto.RegisterExtension(E_X236) + proto.RegisterExtension(E_X237) + proto.RegisterExtension(E_X238) + proto.RegisterExtension(E_X239) + proto.RegisterExtension(E_X240) + proto.RegisterExtension(E_X241) + proto.RegisterExtension(E_X242) + proto.RegisterExtension(E_X243) + proto.RegisterExtension(E_X244) + proto.RegisterExtension(E_X245) + proto.RegisterExtension(E_X246) + proto.RegisterExtension(E_X247) + proto.RegisterExtension(E_X248) + proto.RegisterExtension(E_X249) + proto.RegisterExtension(E_X250) +} + +func init() { proto.RegisterFile("test.proto", fileDescriptor0) } + +var fileDescriptor0 = []byte{ + // 4335 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0x94, 0x5a, 0x4b, 0x77, 0x1b, 0x47, + 0x76, 0x76, 0xe3, 0x8d, 0x02, 0x48, 0x80, 0x2d, 0x59, 0x82, 0xa8, 0x87, 0x65, 0xcc, 0xd8, 0x96, + 0x64, 0x9b, 0x43, 0x34, 0x40, 0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 0xaf, 0x01, 0x54, 0xd5, 0x8c, 0x8a, 0x75, + 0x35, 0xc3, 0xd8, 0xeb, 0x80, 0x55, 0x35, 0xc3, 0xd8, 0xdb, 0xaa, 0x66, 0x18, 0xfa, 0x91, 0x06, + 0x58, 0x45, 0x34, 0x0c, 0x7d, 0xd3, 0x27, 0x1a, 0xc6, 0x7e, 0x8c, 0x58, 0x55, 0x35, 0x41, 0xb0, + 0xba, 0x0a, 0x9f, 0x20, 0x58, 0x95, 0x0d, 0x83, 0x3d, 0xd9, 0x38, 0x21, 0xa8, 0x74, 0x03, 0x22, + 0x95, 0x23, 0x1b, 0x27, 0x86, 0xa9, 0xb2, 0x71, 0x81, 0xaf, 0x50, 0xa8, 0x65, 0xd9, 0x4c, 0x21, + 0x61, 0x74, 0x17, 0x79, 0x13, 0x90, 0xae, 0x6c, 0x5c, 0xa4, 0x4f, 0x36, 0x2e, 0xf6, 0x55, 0xc0, + 0x2a, 0xb2, 0x99, 0x81, 0x56, 0x2d, 0x97, 0x01, 0xad, 0xc8, 0xc6, 0x45, 0xab, 0xb2, 0x71, 0xc1, + 0x9f, 0x01, 0xb0, 0x27, 0x9b, 0x69, 0xac, 0x6a, 0xf8, 0xb3, 0x80, 0xf5, 0x64, 0xe3, 0x9f, 0x9d, + 0x94, 0x8d, 0x0b, 0x7d, 0x0d, 0xa0, 0xae, 0x6c, 0xfc, 0x56, 0x59, 0x36, 0x2e, 0xf4, 0x75, 0x80, + 0x7a, 0xb2, 0xf1, 0x63, 0x59, 0x36, 0x2e, 0xf6, 0x0d, 0xca, 0x6f, 0x8e, 0x6c, 0x5c, 0xac, 0x22, + 0x1b, 0x17, 0xfa, 0xdb, 0x98, 0x0b, 0x5d, 0xd9, 0xb8, 0x50, 0x55, 0x36, 0x2e, 0xf6, 0x77, 0x10, + 0xeb, 0xc9, 0x66, 0x1a, 0xac, 0xae, 0xc2, 0xef, 0x22, 0xd8, 0x93, 0x8d, 0x0b, 0x5e, 0x22, 0x27, + 0x50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x7a, 0x47, 0xaf, 0x96, 0x05, 0xf0, 0x25, 0x54, 0x1d, 0x75, + 0xc1, 0x11, 0xa4, 0x47, 0xff, 0x55, 0x3c, 0x87, 0xe5, 0xeb, 0xe9, 0xf5, 0x6e, 0x67, 0x60, 0x8f, + 0x2d, 0xf0, 0x95, 0x10, 0x81, 0x35, 0xd9, 0x0f, 0xae, 0xe3, 0xaf, 0x21, 0x6d, 0xa1, 0x1e, 0x7f, + 0x1b, 0x44, 0x51, 0x64, 0x85, 0xce, 0xe0, 0xf8, 0xd6, 0xf1, 0xd7, 0x91, 0xa3, 0x03, 0x07, 0x84, + 0x51, 0x64, 0xa1, 0x7a, 0x9c, 0x35, 0x71, 0x29, 0x90, 0x17, 0x9b, 0xc3, 0xd6, 0xe3, 0x27, 0xc0, + 0x33, 0x30, 0x3d, 0xae, 0xc7, 0x8a, 0x9a, 0x79, 0xc1, 0x97, 0x22, 0xf7, 0xa8, 0x5b, 0xbf, 0x27, + 0x2e, 0x07, 0x13, 0xa5, 0xc3, 0xac, 0x62, 0xbe, 0x24, 0xe6, 0x45, 0x7f, 0xce, 0x0c, 0x50, 0x95, + 0x00, 0xec, 0x50, 0x6b, 0x98, 0x40, 0x3d, 0xaa, 0x17, 0x89, 0x99, 0xfa, 0x53, 0xe2, 0xca, 0x74, + 0x2a, 0x75, 0xc8, 0x2b, 0x98, 0x51, 0x89, 0x7c, 0x29, 0x98, 0x55, 0xa7, 0xe8, 0x33, 0xc6, 0x5e, + 0xc5, 0x14, 0xab, 0xd2, 0xa7, 0x46, 0x7f, 0x47, 0x94, 0xa6, 0x92, 0xad, 0xc3, 0x5e, 0xc3, 0x9c, + 0x4b, 0xec, 0x97, 0x03, 0x79, 0x37, 0x48, 0x9e, 0x31, 0xf4, 0x5d, 0x4c, 0xc2, 0x0a, 0x79, 0x6a, + 0x64, 0x5a, 0x32, 0x7f, 0x3a, 0x76, 0xb8, 0xf7, 0x30, 0x2b, 0xf3, 0x92, 0xf9, 0x32, 0x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0x6c, + 0xee, 0xbd, 0x6c, 0x49, 0x99, 0x65, 0x28, 0xda, 0xa1, 0x81, 0xfc, 0xa2, 0xee, 0x37, 0x04, 0x1e, + 0x6d, 0x8b, 0x0b, 0xea, 0xc4, 0xce, 0xe1, 0x92, 0x0d, 0x96, 0x0a, 0xe6, 0x82, 0x37, 0x35, 0xe6, + 0xcc, 0x34, 0x15, 0xed, 0xd4, 0x10, 0x4c, 0x15, 0xa7, 0x4c, 0x81, 0x57, 0xf7, 0x45, 0x41, 0x31, + 0x75, 0x48, 0x19, 0x3a, 0xdc, 0xcc, 0x53, 0xf9, 0xbf, 0x36, 0xb8, 0x66, 0x30, 0xa3, 0x07, 0xdf, + 0x18, 0xe7, 0xb8, 0x70, 0x23, 0x23, 0xf9, 0x5d, 0xde, 0xf3, 0x85, 0x18, 0x81, 0x2d, 0x41, 0x95, + 0x76, 0x94, 0x95, 0xb1, 0xfc, 0x62, 0xef, 0xb9, 0x82, 0x84, 0x7a, 0xd7, 0x37, 0x1d, 0x0b, 0x93, + 0x5c, 0x84, 0x8d, 0x09, 0x45, 0xe4, 0xd7, 0x43, 0x01, 0x4b, 0xea, 0x55, 0x88, 0x32, 0x6d, 0x7c, + 0x84, 0x97, 0x30, 0x7f, 0xfe, 0x80, 0xf4, 0x91, 0x26, 0xeb, 0xe2, 0xea, 0x12, 0x96, 0xce, 0xe6, + 0xdc, 0x91, 0x2f, 0x2e, 0x6d, 0x88, 0xb9, 0x73, 0x07, 0xa5, 0x8f, 0x35, 0x59, 0x5d, 0xa2, 0x25, + 0x33, 0x7f, 0xe4, 0x8f, 0x4c, 0x73, 0xe7, 0x0e, 0x4b, 0x9f, 0x68, 0xf2, 0x2a, 0xa2, 0x66, 0xb8, + 0x46, 0x9c, 0xc8, 0x34, 0x77, 0xee, 0xb0, 0xf4, 0x15, 0x59, 0x3b, 0xc6, 0x6a, 0x55, 0xd5, 0x08, + 0xc5, 0x82, 0xf9, 0xf3, 0x87, 0xa5, 0xaf, 0x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 0x2d, 0x9c, 0x5d, 0x63, 0xad, 0xd5, 0xc2, 0xb5, 0xf6, + 0xef, 0x11, 0x6c, 0xd6, 0x5a, 0x2d, 0x5c, 0x6b, 0xff, 0x11, 0xc1, 0x66, 0xad, 0xd5, 0xc2, 0xb5, + 0xf6, 0x9f, 0x11, 0x6c, 0xd6, 0x5a, 0x2d, 0x5c, 0x6b, 0xff, 0x15, 0xc1, 0x66, 0xad, 0xd5, 0xc2, + 0xb5, 0xf6, 0xdf, 0x11, 0x6c, 0xd6, 0x5a, 0x2d, 0x5c, 0x6b, 0x3f, 0x8a, 0x60, 0xb3, 0xd6, 0x6a, + 0xe1, 0x5a, 0xfb, 0x71, 0x04, 0x9b, 0xb5, 0x56, 0x0b, 0xd7, 0xda, 0xff, 0x44, 0xb0, 0x59, 0x6b, + 0xb5, 0x70, 0xad, 0xfd, 0x6f, 0x04, 0x9b, 0xb5, 0xb6, 0x12, 0xae, 0xb5, 0xff, 0x0b, 0x67, 0xaf, + 0x2c, 0xff, 0x24, 0x00, 0x00, 0xff, 0xff, 0x81, 0x23, 0xc6, 0xe6, 0xc6, 0x38, 0x00, 0x00, +} diff --git a/vendor/github.com/golang/protobuf/proto/testdata/test.proto b/vendor/github.com/golang/protobuf/proto/testdata/test.proto new file mode 100644 index 000000000..f60711369 --- /dev/null +++ b/vendor/github.com/golang/protobuf/proto/testdata/test.proto @@ -0,0 +1,540 @@ +// 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. + +// A feature-rich test file for the protocol compiler and libraries. + +syntax = "proto2"; + +package testdata; + +enum FOO { FOO1 = 1; }; + +message GoEnum { + required FOO foo = 1; +} + +message GoTestField { + required string Label = 1; + required string Type = 2; +} + +message GoTest { + // An enum, for completeness. + enum KIND { + VOID = 0; + + // Basic types + BOOL = 1; + BYTES = 2; + FINGERPRINT = 3; + FLOAT = 4; + INT = 5; + STRING = 6; + TIME = 7; + + // Groupings + TUPLE = 8; + ARRAY = 9; + MAP = 10; + + // Table types + TABLE = 11; + + // Functions + FUNCTION = 12; // last tag + }; + + // Some typical parameters + required KIND Kind = 1; + optional string Table = 2; + optional int32 Param = 3; + + // Required, repeated and optional foreign fields. + required GoTestField RequiredField = 4; + repeated GoTestField RepeatedField = 5; + optional GoTestField OptionalField = 6; + + // Required fields of all basic types + required bool F_Bool_required = 10; + required int32 F_Int32_required = 11; + required int64 F_Int64_required = 12; + required fixed32 F_Fixed32_required = 13; + required fixed64 F_Fixed64_required = 14; + required uint32 F_Uint32_required = 15; + required uint64 F_Uint64_required = 16; + required float F_Float_required = 17; + required double F_Double_required = 18; + required string F_String_required = 19; + required bytes F_Bytes_required = 101; + required sint32 F_Sint32_required = 102; + required sint64 F_Sint64_required = 103; + + // Repeated fields of all basic types + repeated bool F_Bool_repeated = 20; + repeated int32 F_Int32_repeated = 21; + repeated int64 F_Int64_repeated = 22; + repeated fixed32 F_Fixed32_repeated = 23; + repeated fixed64 F_Fixed64_repeated = 24; + repeated uint32 F_Uint32_repeated = 25; + repeated uint64 F_Uint64_repeated = 26; + repeated float F_Float_repeated = 27; + repeated double F_Double_repeated = 28; + repeated string F_String_repeated = 29; + repeated bytes F_Bytes_repeated = 201; + repeated sint32 F_Sint32_repeated = 202; + repeated sint64 F_Sint64_repeated = 203; + + // Optional fields of all basic types + optional bool F_Bool_optional = 30; + optional int32 F_Int32_optional = 31; + optional int64 F_Int64_optional = 32; + optional fixed32 F_Fixed32_optional = 33; + optional fixed64 F_Fixed64_optional = 34; + optional uint32 F_Uint32_optional = 35; + optional uint64 F_Uint64_optional = 36; + optional float F_Float_optional = 37; + optional double F_Double_optional = 38; + optional string F_String_optional = 39; + optional bytes F_Bytes_optional = 301; + optional sint32 F_Sint32_optional = 302; + optional sint64 F_Sint64_optional = 303; + + // Default-valued fields of all basic types + optional bool F_Bool_defaulted = 40 [default=true]; + optional int32 F_Int32_defaulted = 41 [default=32]; + optional int64 F_Int64_defaulted = 42 [default=64]; + optional fixed32 F_Fixed32_defaulted = 43 [default=320]; + optional fixed64 F_Fixed64_defaulted = 44 [default=640]; + optional uint32 F_Uint32_defaulted = 45 [default=3200]; + optional uint64 F_Uint64_defaulted = 46 [default=6400]; + optional float F_Float_defaulted = 47 [default=314159.]; + optional double F_Double_defaulted = 48 [default=271828.]; + optional string F_String_defaulted = 49 [default="hello, \"world!\"\n"]; + optional bytes F_Bytes_defaulted = 401 [default="Bignose"]; + optional sint32 F_Sint32_defaulted = 402 [default = -32]; + optional sint64 F_Sint64_defaulted = 403 [default = -64]; + + // Packed repeated fields (no string or bytes). + repeated bool F_Bool_repeated_packed = 50 [packed=true]; + repeated int32 F_Int32_repeated_packed = 51 [packed=true]; + repeated int64 F_Int64_repeated_packed = 52 [packed=true]; + repeated fixed32 F_Fixed32_repeated_packed = 53 [packed=true]; + repeated fixed64 F_Fixed64_repeated_packed = 54 [packed=true]; + repeated uint32 F_Uint32_repeated_packed = 55 [packed=true]; + repeated uint64 F_Uint64_repeated_packed = 56 [packed=true]; + repeated float F_Float_repeated_packed = 57 [packed=true]; + repeated double F_Double_repeated_packed = 58 [packed=true]; + repeated sint32 F_Sint32_repeated_packed = 502 [packed=true]; + repeated sint64 F_Sint64_repeated_packed = 503 [packed=true]; + + // Required, repeated, and optional groups. + required group RequiredGroup = 70 { + required string RequiredField = 71; + }; + + repeated group RepeatedGroup = 80 { + required string RequiredField = 81; + }; + + optional group OptionalGroup = 90 { + required string RequiredField = 91; + }; +} + +// For testing skipping of unrecognized fields. +// Numbers are all big, larger than tag numbers in GoTestField, +// the message used in the corresponding test. +message GoSkipTest { + required int32 skip_int32 = 11; + required fixed32 skip_fixed32 = 12; + required fixed64 skip_fixed64 = 13; + required string skip_string = 14; + required group SkipGroup = 15 { + required int32 group_int32 = 16; + required string group_string = 17; + } +} + +// For testing packed/non-packed decoder switching. +// A serialized instance of one should be deserializable as the other. +message NonPackedTest { + repeated int32 a = 1; +} + +message PackedTest { + repeated int32 b = 1 [packed=true]; +} + +message MaxTag { + // Maximum possible tag number. + optional string last_field = 536870911; +} + +message OldMessage { + message Nested { + optional string name = 1; + } + optional Nested nested = 1; + + optional int32 num = 2; +} + +// NewMessage is wire compatible with OldMessage; +// imagine it as a future version. +message NewMessage { + message Nested { + optional string name = 1; + optional string food_group = 2; + } + optional Nested nested = 1; + + // This is an int32 in OldMessage. + optional int64 num = 2; +} + +// Smaller tests for ASCII formatting. + +message InnerMessage { + required string host = 1; + optional int32 port = 2 [default=4000]; + optional bool connected = 3; +} + +message OtherMessage { + optional int64 key = 1; + optional bytes value = 2; + optional float weight = 3; + optional InnerMessage inner = 4; + + extensions 100 to max; +} + +message RequiredInnerMessage { + required InnerMessage leo_finally_won_an_oscar = 1; +} + +message MyMessage { + required int32 count = 1; + optional string name = 2; + optional string quote = 3; + repeated string pet = 4; + optional InnerMessage inner = 5; + repeated OtherMessage others = 6; + optional RequiredInnerMessage we_must_go_deeper = 13; + repeated InnerMessage rep_inner = 12; + + enum Color { + RED = 0; + GREEN = 1; + BLUE = 2; + }; + optional Color bikeshed = 7; + + optional group SomeGroup = 8 { + optional int32 group_field = 9; + } + + // This field becomes [][]byte in the generated code. + repeated bytes rep_bytes = 10; + + optional double bigfloat = 11; + + extensions 100 to max; +} + +message Ext { + extend MyMessage { + optional Ext more = 103; + optional string text = 104; + optional int32 number = 105; + } + + optional string data = 1; +} + +extend MyMessage { + repeated string greeting = 106; +} + +message ComplexExtension { + optional int32 first = 1; + optional int32 second = 2; + repeated int32 third = 3; +} + +extend OtherMessage { + optional ComplexExtension complex = 200; + repeated ComplexExtension r_complex = 201; +} + +message DefaultsMessage { + enum DefaultsEnum { + ZERO = 0; + ONE = 1; + TWO = 2; + }; + extensions 100 to max; +} + +extend DefaultsMessage { + optional double no_default_double = 101; + optional float no_default_float = 102; + optional int32 no_default_int32 = 103; + optional int64 no_default_int64 = 104; + optional uint32 no_default_uint32 = 105; + optional uint64 no_default_uint64 = 106; + optional sint32 no_default_sint32 = 107; + optional sint64 no_default_sint64 = 108; + optional fixed32 no_default_fixed32 = 109; + optional fixed64 no_default_fixed64 = 110; + optional sfixed32 no_default_sfixed32 = 111; + optional sfixed64 no_default_sfixed64 = 112; + optional bool no_default_bool = 113; + optional string no_default_string = 114; + optional bytes no_default_bytes = 115; + optional DefaultsMessage.DefaultsEnum no_default_enum = 116; + + optional double default_double = 201 [default = 3.1415]; + optional float default_float = 202 [default = 3.14]; + optional int32 default_int32 = 203 [default = 42]; + optional int64 default_int64 = 204 [default = 43]; + optional uint32 default_uint32 = 205 [default = 44]; + optional uint64 default_uint64 = 206 [default = 45]; + optional sint32 default_sint32 = 207 [default = 46]; + optional sint64 default_sint64 = 208 [default = 47]; + optional fixed32 default_fixed32 = 209 [default = 48]; + optional fixed64 default_fixed64 = 210 [default = 49]; + optional sfixed32 default_sfixed32 = 211 [default = 50]; + optional sfixed64 default_sfixed64 = 212 [default = 51]; + optional bool default_bool = 213 [default = true]; + optional string default_string = 214 [default = "Hello, string"]; + optional bytes default_bytes = 215 [default = "Hello, bytes"]; + optional DefaultsMessage.DefaultsEnum default_enum = 216 [default = ONE]; +} + +message MyMessageSet { + option message_set_wire_format = true; + extensions 100 to max; +} + +message Empty { +} + +extend MyMessageSet { + optional Empty x201 = 201; + optional Empty x202 = 202; + optional Empty x203 = 203; + optional Empty x204 = 204; + optional Empty x205 = 205; + optional Empty x206 = 206; + optional Empty x207 = 207; + optional Empty x208 = 208; + optional Empty x209 = 209; + optional Empty x210 = 210; + optional Empty x211 = 211; + optional Empty x212 = 212; + optional Empty x213 = 213; + optional Empty x214 = 214; + optional Empty x215 = 215; + optional Empty x216 = 216; + optional Empty x217 = 217; + optional Empty x218 = 218; + optional Empty x219 = 219; + optional Empty x220 = 220; + optional Empty x221 = 221; + optional Empty x222 = 222; + optional Empty x223 = 223; + optional Empty x224 = 224; + optional Empty x225 = 225; + optional Empty x226 = 226; + optional Empty x227 = 227; + optional Empty x228 = 228; + optional Empty x229 = 229; + optional Empty x230 = 230; + optional Empty x231 = 231; + optional Empty x232 = 232; + optional Empty x233 = 233; + optional Empty x234 = 234; + optional Empty x235 = 235; + optional Empty x236 = 236; + optional Empty x237 = 237; + optional Empty x238 = 238; + optional Empty x239 = 239; + optional Empty x240 = 240; + optional Empty x241 = 241; + optional Empty x242 = 242; + optional Empty x243 = 243; + optional Empty x244 = 244; + optional Empty x245 = 245; + optional Empty x246 = 246; + optional Empty x247 = 247; + optional Empty x248 = 248; + optional Empty x249 = 249; + optional Empty x250 = 250; +} + +message MessageList { + repeated group Message = 1 { + required string name = 2; + required int32 count = 3; + } +} + +message Strings { + optional string string_field = 1; + optional bytes bytes_field = 2; +} + +message Defaults { + enum Color { + RED = 0; + GREEN = 1; + BLUE = 2; + } + + // Default-valued fields of all basic types. + // Same as GoTest, but copied here to make testing easier. + optional bool F_Bool = 1 [default=true]; + optional int32 F_Int32 = 2 [default=32]; + optional int64 F_Int64 = 3 [default=64]; + optional fixed32 F_Fixed32 = 4 [default=320]; + optional fixed64 F_Fixed64 = 5 [default=640]; + optional uint32 F_Uint32 = 6 [default=3200]; + optional uint64 F_Uint64 = 7 [default=6400]; + optional float F_Float = 8 [default=314159.]; + optional double F_Double = 9 [default=271828.]; + optional string F_String = 10 [default="hello, \"world!\"\n"]; + optional bytes F_Bytes = 11 [default="Bignose"]; + optional sint32 F_Sint32 = 12 [default=-32]; + optional sint64 F_Sint64 = 13 [default=-64]; + optional Color F_Enum = 14 [default=GREEN]; + + // More fields with crazy defaults. + optional float F_Pinf = 15 [default=inf]; + optional float F_Ninf = 16 [default=-inf]; + optional float F_Nan = 17 [default=nan]; + + // Sub-message. + optional SubDefaults sub = 18; + + // Redundant but explicit defaults. + optional string str_zero = 19 [default=""]; +} + +message SubDefaults { + optional int64 n = 1 [default=7]; +} + +message RepeatedEnum { + enum Color { + RED = 1; + } + repeated Color color = 1; +} + +message MoreRepeated { + repeated bool bools = 1; + repeated bool bools_packed = 2 [packed=true]; + repeated int32 ints = 3; + repeated int32 ints_packed = 4 [packed=true]; + repeated int64 int64s_packed = 7 [packed=true]; + repeated string strings = 5; + repeated fixed32 fixeds = 6; +} + +// GroupOld and GroupNew have the same wire format. +// GroupNew has a new field inside a group. + +message GroupOld { + optional group G = 101 { + optional int32 x = 2; + } +} + +message GroupNew { + optional group G = 101 { + optional int32 x = 2; + optional int32 y = 3; + } +} + +message FloatingPoint { + required double f = 1; +} + +message MessageWithMap { + map name_mapping = 1; + map msg_mapping = 2; + map byte_mapping = 3; + map str_to_str = 4; +} + +message Oneof { + oneof union { + bool F_Bool = 1; + int32 F_Int32 = 2; + int64 F_Int64 = 3; + fixed32 F_Fixed32 = 4; + fixed64 F_Fixed64 = 5; + uint32 F_Uint32 = 6; + uint64 F_Uint64 = 7; + float F_Float = 8; + double F_Double = 9; + string F_String = 10; + bytes F_Bytes = 11; + sint32 F_Sint32 = 12; + sint64 F_Sint64 = 13; + MyMessage.Color F_Enum = 14; + GoTestField F_Message = 15; + group F_Group = 16 { + optional int32 x = 17; + } + int32 F_Largest_Tag = 536870911; + } + + oneof tormato { + int32 value = 100; + } +} + +message Communique { + optional bool make_me_cry = 1; + + // This is a oneof, called "union". + oneof union { + int32 number = 5; + string name = 6; + bytes data = 7; + double temp_c = 8; + MyMessage.Color col = 9; + Strings msg = 10; + } +} diff --git a/vendor/github.com/golang/protobuf/proto/text_parser_test.go b/vendor/github.com/golang/protobuf/proto/text_parser_test.go new file mode 100644 index 000000000..f25d5b0b4 --- /dev/null +++ b/vendor/github.com/golang/protobuf/proto/text_parser_test.go @@ -0,0 +1,573 @@ +// 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. + +package proto_test + +import ( + "math" + "reflect" + "testing" + + . "github.com/golang/protobuf/proto" + proto3pb "github.com/golang/protobuf/proto/proto3_proto" + . "github.com/golang/protobuf/proto/testdata" +) + +type UnmarshalTextTest struct { + in string + err string // if "", no error expected + out *MyMessage +} + +func buildExtStructTest(text string) UnmarshalTextTest { + msg := &MyMessage{ + Count: Int32(42), + } + SetExtension(msg, E_Ext_More, &Ext{ + Data: String("Hello, world!"), + }) + return UnmarshalTextTest{in: text, out: msg} +} + +func buildExtDataTest(text string) UnmarshalTextTest { + msg := &MyMessage{ + Count: Int32(42), + } + SetExtension(msg, E_Ext_Text, String("Hello, world!")) + SetExtension(msg, E_Ext_Number, Int32(1729)) + return UnmarshalTextTest{in: text, out: msg} +} + +func buildExtRepStringTest(text string) UnmarshalTextTest { + msg := &MyMessage{ + Count: Int32(42), + } + if err := SetExtension(msg, E_Greeting, []string{"bula", "hola"}); err != nil { + panic(err) + } + return UnmarshalTextTest{in: text, out: msg} +} + +var unMarshalTextTests = []UnmarshalTextTest{ + // Basic + { + in: " count:42\n name:\"Dave\" ", + out: &MyMessage{ + Count: Int32(42), + Name: String("Dave"), + }, + }, + + // Empty quoted string + { + in: `count:42 name:""`, + out: &MyMessage{ + Count: Int32(42), + Name: String(""), + }, + }, + + // Quoted string concatenation with double quotes + { + in: `count:42 name: "My name is "` + "\n" + `"elsewhere"`, + out: &MyMessage{ + Count: Int32(42), + Name: String("My name is elsewhere"), + }, + }, + + // Quoted string concatenation with single quotes + { + in: "count:42 name: 'My name is '\n'elsewhere'", + out: &MyMessage{ + Count: Int32(42), + Name: String("My name is elsewhere"), + }, + }, + + // Quoted string concatenations with mixed quotes + { + in: "count:42 name: 'My name is '\n\"elsewhere\"", + out: &MyMessage{ + Count: Int32(42), + Name: String("My name is elsewhere"), + }, + }, + { + in: "count:42 name: \"My name is \"\n'elsewhere'", + out: &MyMessage{ + Count: Int32(42), + Name: String("My name is elsewhere"), + }, + }, + + // Quoted string with escaped apostrophe + { + in: `count:42 name: "HOLIDAY - New Year\'s Day"`, + out: &MyMessage{ + Count: Int32(42), + Name: String("HOLIDAY - New Year's Day"), + }, + }, + + // Quoted string with single quote + { + in: `count:42 name: 'Roger "The Ramster" Ramjet'`, + out: &MyMessage{ + Count: Int32(42), + Name: String(`Roger "The Ramster" Ramjet`), + }, + }, + + // Quoted string with all the accepted special characters from the C++ test + { + in: `count:42 name: ` + "\"\\\"A string with \\' characters \\n and \\r newlines and \\t tabs and \\001 slashes \\\\ and multiple spaces\"", + out: &MyMessage{ + Count: Int32(42), + Name: String("\"A string with ' characters \n and \r newlines and \t tabs and \001 slashes \\ and multiple spaces"), + }, + }, + + // Quoted string with quoted backslash + { + in: `count:42 name: "\\'xyz"`, + out: &MyMessage{ + Count: Int32(42), + Name: String(`\'xyz`), + }, + }, + + // Quoted string with UTF-8 bytes. + { + in: "count:42 name: '\303\277\302\201\xAB'", + out: &MyMessage{ + Count: Int32(42), + Name: String("\303\277\302\201\xAB"), + }, + }, + + // Bad quoted string + { + in: `inner: < host: "\0" >` + "\n", + err: `line 1.15: invalid quoted string "\0": \0 requires 2 following digits`, + }, + + // Number too large for int64 + { + in: "count: 1 others { key: 123456789012345678901 }", + err: "line 1.23: invalid int64: 123456789012345678901", + }, + + // Number too large for int32 + { + in: "count: 1234567890123", + err: "line 1.7: invalid int32: 1234567890123", + }, + + // Number in hexadecimal + { + in: "count: 0x2beef", + out: &MyMessage{ + Count: Int32(0x2beef), + }, + }, + + // Number in octal + { + in: "count: 024601", + out: &MyMessage{ + Count: Int32(024601), + }, + }, + + // Floating point number with "f" suffix + { + in: "count: 4 others:< weight: 17.0f >", + out: &MyMessage{ + Count: Int32(4), + Others: []*OtherMessage{ + { + Weight: Float32(17), + }, + }, + }, + }, + + // Floating point positive infinity + { + in: "count: 4 bigfloat: inf", + out: &MyMessage{ + Count: Int32(4), + Bigfloat: Float64(math.Inf(1)), + }, + }, + + // Floating point negative infinity + { + in: "count: 4 bigfloat: -inf", + out: &MyMessage{ + Count: Int32(4), + Bigfloat: Float64(math.Inf(-1)), + }, + }, + + // Number too large for float32 + { + in: "others:< weight: 12345678901234567890123456789012345678901234567890 >", + err: "line 1.17: invalid float32: 12345678901234567890123456789012345678901234567890", + }, + + // Number posing as a quoted string + { + in: `inner: < host: 12 >` + "\n", + err: `line 1.15: invalid string: 12`, + }, + + // Quoted string posing as int32 + { + in: `count: "12"`, + err: `line 1.7: invalid int32: "12"`, + }, + + // Quoted string posing a float32 + { + in: `others:< weight: "17.4" >`, + err: `line 1.17: invalid float32: "17.4"`, + }, + + // Enum + { + in: `count:42 bikeshed: BLUE`, + out: &MyMessage{ + Count: Int32(42), + Bikeshed: MyMessage_BLUE.Enum(), + }, + }, + + // Repeated field + { + in: `count:42 pet: "horsey" pet:"bunny"`, + out: &MyMessage{ + Count: Int32(42), + Pet: []string{"horsey", "bunny"}, + }, + }, + + // Repeated field with list notation + { + in: `count:42 pet: ["horsey", "bunny"]`, + out: &MyMessage{ + Count: Int32(42), + Pet: []string{"horsey", "bunny"}, + }, + }, + + // Repeated message with/without colon and <>/{} + { + in: `count:42 others:{} others{} others:<> others:{}`, + out: &MyMessage{ + Count: Int32(42), + Others: []*OtherMessage{ + {}, + {}, + {}, + {}, + }, + }, + }, + + // Missing colon for inner message + { + in: `count:42 inner < host: "cauchy.syd" >`, + out: &MyMessage{ + Count: Int32(42), + Inner: &InnerMessage{ + Host: String("cauchy.syd"), + }, + }, + }, + + // Missing colon for string field + { + in: `name "Dave"`, + err: `line 1.5: expected ':', found "\"Dave\""`, + }, + + // Missing colon for int32 field + { + in: `count 42`, + err: `line 1.6: expected ':', found "42"`, + }, + + // Missing required field + { + in: `name: "Pawel"`, + err: `proto: required field "testdata.MyMessage.count" not set`, + out: &MyMessage{ + Name: String("Pawel"), + }, + }, + + // Missing required field in a required submessage + { + in: `count: 42 we_must_go_deeper < leo_finally_won_an_oscar <> >`, + err: `proto: required field "testdata.InnerMessage.host" not set`, + out: &MyMessage{ + Count: Int32(42), + WeMustGoDeeper: &RequiredInnerMessage{LeoFinallyWonAnOscar: &InnerMessage{}}, + }, + }, + + // Repeated non-repeated field + { + in: `name: "Rob" name: "Russ"`, + err: `line 1.12: non-repeated field "name" was repeated`, + }, + + // Group + { + in: `count: 17 SomeGroup { group_field: 12 }`, + out: &MyMessage{ + Count: Int32(17), + Somegroup: &MyMessage_SomeGroup{ + GroupField: Int32(12), + }, + }, + }, + + // Semicolon between fields + { + in: `count:3;name:"Calvin"`, + out: &MyMessage{ + Count: Int32(3), + Name: String("Calvin"), + }, + }, + // Comma between fields + { + in: `count:4,name:"Ezekiel"`, + out: &MyMessage{ + Count: Int32(4), + Name: String("Ezekiel"), + }, + }, + + // Extension + buildExtStructTest(`count: 42 [testdata.Ext.more]:`), + buildExtStructTest(`count: 42 [testdata.Ext.more] {data:"Hello, world!"}`), + buildExtDataTest(`count: 42 [testdata.Ext.text]:"Hello, world!" [testdata.Ext.number]:1729`), + buildExtRepStringTest(`count: 42 [testdata.greeting]:"bula" [testdata.greeting]:"hola"`), + + // Big all-in-one + { + in: "count:42 # Meaning\n" + + `name:"Dave" ` + + `quote:"\"I didn't want to go.\"" ` + + `pet:"bunny" ` + + `pet:"kitty" ` + + `pet:"horsey" ` + + `inner:<` + + ` host:"footrest.syd" ` + + ` port:7001 ` + + ` connected:true ` + + `> ` + + `others:<` + + ` key:3735928559 ` + + ` value:"\x01A\a\f" ` + + `> ` + + `others:<` + + " weight:58.9 # Atomic weight of Co\n" + + ` inner:<` + + ` host:"lesha.mtv" ` + + ` port:8002 ` + + ` >` + + `>`, + out: &MyMessage{ + Count: Int32(42), + Name: String("Dave"), + Quote: String(`"I didn't want to go."`), + Pet: []string{"bunny", "kitty", "horsey"}, + Inner: &InnerMessage{ + Host: String("footrest.syd"), + Port: Int32(7001), + Connected: Bool(true), + }, + Others: []*OtherMessage{ + { + Key: Int64(3735928559), + Value: []byte{0x1, 'A', '\a', '\f'}, + }, + { + Weight: Float32(58.9), + Inner: &InnerMessage{ + Host: String("lesha.mtv"), + Port: Int32(8002), + }, + }, + }, + }, + }, +} + +func TestUnmarshalText(t *testing.T) { + for i, test := range unMarshalTextTests { + pb := new(MyMessage) + err := UnmarshalText(test.in, pb) + if test.err == "" { + // We don't expect failure. + if err != nil { + t.Errorf("Test %d: Unexpected error: %v", i, err) + } else if !reflect.DeepEqual(pb, test.out) { + t.Errorf("Test %d: Incorrect populated \nHave: %v\nWant: %v", + i, pb, test.out) + } + } else { + // We do expect failure. + if err == nil { + t.Errorf("Test %d: Didn't get expected error: %v", i, test.err) + } else if err.Error() != test.err { + t.Errorf("Test %d: Incorrect error.\nHave: %v\nWant: %v", + i, err.Error(), test.err) + } else if _, ok := err.(*RequiredNotSetError); ok && test.out != nil && !reflect.DeepEqual(pb, test.out) { + t.Errorf("Test %d: Incorrect populated \nHave: %v\nWant: %v", + i, pb, test.out) + } + } + } +} + +func TestUnmarshalTextCustomMessage(t *testing.T) { + msg := &textMessage{} + if err := UnmarshalText("custom", msg); err != nil { + t.Errorf("Unexpected error from custom unmarshal: %v", err) + } + if UnmarshalText("not custom", msg) == nil { + t.Errorf("Didn't get expected error from custom unmarshal") + } +} + +// Regression test; this caused a panic. +func TestRepeatedEnum(t *testing.T) { + pb := new(RepeatedEnum) + if err := UnmarshalText("color: RED", pb); err != nil { + t.Fatal(err) + } + exp := &RepeatedEnum{ + Color: []RepeatedEnum_Color{RepeatedEnum_RED}, + } + if !Equal(pb, exp) { + t.Errorf("Incorrect populated \nHave: %v\nWant: %v", pb, exp) + } +} + +func TestProto3TextParsing(t *testing.T) { + m := new(proto3pb.Message) + const in = `name: "Wallace" true_scotsman: true` + want := &proto3pb.Message{ + Name: "Wallace", + TrueScotsman: true, + } + if err := UnmarshalText(in, m); err != nil { + t.Fatal(err) + } + if !Equal(m, want) { + t.Errorf("\n got %v\nwant %v", m, want) + } +} + +func TestMapParsing(t *testing.T) { + m := new(MessageWithMap) + const in = `name_mapping: name_mapping:` + + `msg_mapping:,>` + // separating commas are okay + `msg_mapping>` + // no colon after "value" + `msg_mapping:>` + // omitted key + `msg_mapping:` + // omitted value + `byte_mapping:` + + `byte_mapping:<>` // omitted key and value + want := &MessageWithMap{ + NameMapping: map[int32]string{ + 1: "Beatles", + 1234: "Feist", + }, + MsgMapping: map[int64]*FloatingPoint{ + -4: {F: Float64(2.0)}, + -2: {F: Float64(4.0)}, + 0: {F: Float64(5.0)}, + 1: nil, + }, + ByteMapping: map[bool][]byte{ + false: nil, + true: []byte("so be it"), + }, + } + if err := UnmarshalText(in, m); err != nil { + t.Fatal(err) + } + if !Equal(m, want) { + t.Errorf("\n got %v\nwant %v", m, want) + } +} + +func TestOneofParsing(t *testing.T) { + const in = `name:"Shrek"` + m := new(Communique) + want := &Communique{Union: &Communique_Name{"Shrek"}} + if err := UnmarshalText(in, m); err != nil { + t.Fatal(err) + } + if !Equal(m, want) { + t.Errorf("\n got %v\nwant %v", m, want) + } +} + +var benchInput string + +func init() { + benchInput = "count: 4\n" + for i := 0; i < 1000; i++ { + benchInput += "pet: \"fido\"\n" + } + + // Check it is valid input. + pb := new(MyMessage) + err := UnmarshalText(benchInput, pb) + if err != nil { + panic("Bad benchmark input: " + err.Error()) + } +} + +func BenchmarkUnmarshalText(b *testing.B) { + pb := new(MyMessage) + for i := 0; i < b.N; i++ { + UnmarshalText(benchInput, pb) + } + b.SetBytes(int64(len(benchInput))) +} diff --git a/vendor/github.com/golang/protobuf/proto/text_test.go b/vendor/github.com/golang/protobuf/proto/text_test.go new file mode 100644 index 000000000..3eabacac8 --- /dev/null +++ b/vendor/github.com/golang/protobuf/proto/text_test.go @@ -0,0 +1,474 @@ +// 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. + +package proto_test + +import ( + "bytes" + "errors" + "io/ioutil" + "math" + "strings" + "testing" + + "github.com/golang/protobuf/proto" + + proto3pb "github.com/golang/protobuf/proto/proto3_proto" + pb "github.com/golang/protobuf/proto/testdata" +) + +// textMessage implements the methods that allow it to marshal and unmarshal +// itself as text. +type textMessage struct { +} + +func (*textMessage) MarshalText() ([]byte, error) { + return []byte("custom"), nil +} + +func (*textMessage) UnmarshalText(bytes []byte) error { + if string(bytes) != "custom" { + return errors.New("expected 'custom'") + } + return nil +} + +func (*textMessage) Reset() {} +func (*textMessage) String() string { return "" } +func (*textMessage) ProtoMessage() {} + +func newTestMessage() *pb.MyMessage { + msg := &pb.MyMessage{ + Count: proto.Int32(42), + Name: proto.String("Dave"), + Quote: proto.String(`"I didn't want to go."`), + Pet: []string{"bunny", "kitty", "horsey"}, + Inner: &pb.InnerMessage{ + Host: proto.String("footrest.syd"), + Port: proto.Int32(7001), + Connected: proto.Bool(true), + }, + Others: []*pb.OtherMessage{ + { + Key: proto.Int64(0xdeadbeef), + Value: []byte{1, 65, 7, 12}, + }, + { + Weight: proto.Float32(6.022), + Inner: &pb.InnerMessage{ + Host: proto.String("lesha.mtv"), + Port: proto.Int32(8002), + }, + }, + }, + Bikeshed: pb.MyMessage_BLUE.Enum(), + Somegroup: &pb.MyMessage_SomeGroup{ + GroupField: proto.Int32(8), + }, + // One normally wouldn't do this. + // This is an undeclared tag 13, as a varint (wire type 0) with value 4. + XXX_unrecognized: []byte{13<<3 | 0, 4}, + } + ext := &pb.Ext{ + Data: proto.String("Big gobs for big rats"), + } + if err := proto.SetExtension(msg, pb.E_Ext_More, ext); err != nil { + panic(err) + } + greetings := []string{"adg", "easy", "cow"} + if err := proto.SetExtension(msg, pb.E_Greeting, greetings); err != nil { + panic(err) + } + + // Add an unknown extension. We marshal a pb.Ext, and fake the ID. + b, err := proto.Marshal(&pb.Ext{Data: proto.String("3G skiing")}) + if err != nil { + panic(err) + } + b = append(proto.EncodeVarint(201<<3|proto.WireBytes), b...) + proto.SetRawExtension(msg, 201, b) + + // Extensions can be plain fields, too, so let's test that. + b = append(proto.EncodeVarint(202<<3|proto.WireVarint), 19) + proto.SetRawExtension(msg, 202, b) + + return msg +} + +const text = `count: 42 +name: "Dave" +quote: "\"I didn't want to go.\"" +pet: "bunny" +pet: "kitty" +pet: "horsey" +inner: < + host: "footrest.syd" + port: 7001 + connected: true +> +others: < + key: 3735928559 + value: "\001A\007\014" +> +others: < + weight: 6.022 + inner: < + host: "lesha.mtv" + port: 8002 + > +> +bikeshed: BLUE +SomeGroup { + group_field: 8 +} +/* 2 unknown bytes */ +13: 4 +[testdata.Ext.more]: < + data: "Big gobs for big rats" +> +[testdata.greeting]: "adg" +[testdata.greeting]: "easy" +[testdata.greeting]: "cow" +/* 13 unknown bytes */ +201: "\t3G skiing" +/* 3 unknown bytes */ +202: 19 +` + +func TestMarshalText(t *testing.T) { + buf := new(bytes.Buffer) + if err := proto.MarshalText(buf, newTestMessage()); err != nil { + t.Fatalf("proto.MarshalText: %v", err) + } + s := buf.String() + if s != text { + t.Errorf("Got:\n===\n%v===\nExpected:\n===\n%v===\n", s, text) + } +} + +func TestMarshalTextCustomMessage(t *testing.T) { + buf := new(bytes.Buffer) + if err := proto.MarshalText(buf, &textMessage{}); err != nil { + t.Fatalf("proto.MarshalText: %v", err) + } + s := buf.String() + if s != "custom" { + t.Errorf("Got %q, expected %q", s, "custom") + } +} +func TestMarshalTextNil(t *testing.T) { + want := "" + tests := []proto.Message{nil, (*pb.MyMessage)(nil)} + for i, test := range tests { + buf := new(bytes.Buffer) + if err := proto.MarshalText(buf, test); err != nil { + t.Fatal(err) + } + if got := buf.String(); got != want { + t.Errorf("%d: got %q want %q", i, got, want) + } + } +} + +func TestMarshalTextUnknownEnum(t *testing.T) { + // The Color enum only specifies values 0-2. + m := &pb.MyMessage{Bikeshed: pb.MyMessage_Color(3).Enum()} + got := m.String() + const want = `bikeshed:3 ` + if got != want { + t.Errorf("\n got %q\nwant %q", got, want) + } +} + +func TestTextOneof(t *testing.T) { + tests := []struct { + m proto.Message + want string + }{ + // zero message + {&pb.Communique{}, ``}, + // scalar field + {&pb.Communique{Union: &pb.Communique_Number{4}}, `number:4`}, + // message field + {&pb.Communique{Union: &pb.Communique_Msg{ + &pb.Strings{StringField: proto.String("why hello!")}, + }}, `msg:`}, + // bad oneof (should not panic) + {&pb.Communique{Union: &pb.Communique_Msg{nil}}, `msg:/* nil */`}, + } + for _, test := range tests { + got := strings.TrimSpace(test.m.String()) + if got != test.want { + t.Errorf("\n got %s\nwant %s", got, test.want) + } + } +} + +func BenchmarkMarshalTextBuffered(b *testing.B) { + buf := new(bytes.Buffer) + m := newTestMessage() + for i := 0; i < b.N; i++ { + buf.Reset() + proto.MarshalText(buf, m) + } +} + +func BenchmarkMarshalTextUnbuffered(b *testing.B) { + w := ioutil.Discard + m := newTestMessage() + for i := 0; i < b.N; i++ { + proto.MarshalText(w, m) + } +} + +func compact(src string) string { + // s/[ \n]+/ /g; s/ $//; + dst := make([]byte, len(src)) + space, comment := false, false + j := 0 + for i := 0; i < len(src); i++ { + if strings.HasPrefix(src[i:], "/*") { + comment = true + i++ + continue + } + if comment && strings.HasPrefix(src[i:], "*/") { + comment = false + i++ + continue + } + if comment { + continue + } + c := src[i] + if c == ' ' || c == '\n' { + space = true + continue + } + if j > 0 && (dst[j-1] == ':' || dst[j-1] == '<' || dst[j-1] == '{') { + space = false + } + if c == '{' { + space = false + } + if space { + dst[j] = ' ' + j++ + space = false + } + dst[j] = c + j++ + } + if space { + dst[j] = ' ' + j++ + } + return string(dst[0:j]) +} + +var compactText = compact(text) + +func TestCompactText(t *testing.T) { + s := proto.CompactTextString(newTestMessage()) + if s != compactText { + t.Errorf("Got:\n===\n%v===\nExpected:\n===\n%v\n===\n", s, compactText) + } +} + +func TestStringEscaping(t *testing.T) { + testCases := []struct { + in *pb.Strings + out string + }{ + { + // Test data from C++ test (TextFormatTest.StringEscape). + // Single divergence: we don't escape apostrophes. + &pb.Strings{StringField: proto.String("\"A string with ' characters \n and \r newlines and \t tabs and \001 slashes \\ and multiple spaces")}, + "string_field: \"\\\"A string with ' characters \\n and \\r newlines and \\t tabs and \\001 slashes \\\\ and multiple spaces\"\n", + }, + { + // Test data from the same C++ test. + &pb.Strings{StringField: proto.String("\350\260\267\346\255\214")}, + "string_field: \"\\350\\260\\267\\346\\255\\214\"\n", + }, + { + // Some UTF-8. + &pb.Strings{StringField: proto.String("\x00\x01\xff\x81")}, + `string_field: "\000\001\377\201"` + "\n", + }, + } + + for i, tc := range testCases { + var buf bytes.Buffer + if err := proto.MarshalText(&buf, tc.in); err != nil { + t.Errorf("proto.MarsalText: %v", err) + continue + } + s := buf.String() + if s != tc.out { + t.Errorf("#%d: Got:\n%s\nExpected:\n%s\n", i, s, tc.out) + continue + } + + // Check round-trip. + pb := new(pb.Strings) + if err := proto.UnmarshalText(s, pb); err != nil { + t.Errorf("#%d: UnmarshalText: %v", i, err) + continue + } + if !proto.Equal(pb, tc.in) { + t.Errorf("#%d: Round-trip failed:\nstart: %v\n end: %v", i, tc.in, pb) + } + } +} + +// A limitedWriter accepts some output before it fails. +// This is a proxy for something like a nearly-full or imminently-failing disk, +// or a network connection that is about to die. +type limitedWriter struct { + b bytes.Buffer + limit int +} + +var outOfSpace = errors.New("proto: insufficient space") + +func (w *limitedWriter) Write(p []byte) (n int, err error) { + var avail = w.limit - w.b.Len() + if avail <= 0 { + return 0, outOfSpace + } + if len(p) <= avail { + return w.b.Write(p) + } + n, _ = w.b.Write(p[:avail]) + return n, outOfSpace +} + +func TestMarshalTextFailing(t *testing.T) { + // Try lots of different sizes to exercise more error code-paths. + for lim := 0; lim < len(text); lim++ { + buf := new(limitedWriter) + buf.limit = lim + err := proto.MarshalText(buf, newTestMessage()) + // We expect a certain error, but also some partial results in the buffer. + if err != outOfSpace { + t.Errorf("Got:\n===\n%v===\nExpected:\n===\n%v===\n", err, outOfSpace) + } + s := buf.b.String() + x := text[:buf.limit] + if s != x { + t.Errorf("Got:\n===\n%v===\nExpected:\n===\n%v===\n", s, x) + } + } +} + +func TestFloats(t *testing.T) { + tests := []struct { + f float64 + want string + }{ + {0, "0"}, + {4.7, "4.7"}, + {math.Inf(1), "inf"}, + {math.Inf(-1), "-inf"}, + {math.NaN(), "nan"}, + } + for _, test := range tests { + msg := &pb.FloatingPoint{F: &test.f} + got := strings.TrimSpace(msg.String()) + want := `f:` + test.want + if got != want { + t.Errorf("f=%f: got %q, want %q", test.f, got, want) + } + } +} + +func TestRepeatedNilText(t *testing.T) { + m := &pb.MessageList{ + Message: []*pb.MessageList_Message{ + nil, + &pb.MessageList_Message{ + Name: proto.String("Horse"), + }, + nil, + }, + } + want := `Message +Message { + name: "Horse" +} +Message +` + if s := proto.MarshalTextString(m); s != want { + t.Errorf(" got: %s\nwant: %s", s, want) + } +} + +func TestProto3Text(t *testing.T) { + tests := []struct { + m proto.Message + want string + }{ + // zero message + {&proto3pb.Message{}, ``}, + // zero message except for an empty byte slice + {&proto3pb.Message{Data: []byte{}}, ``}, + // trivial case + {&proto3pb.Message{Name: "Rob", HeightInCm: 175}, `name:"Rob" height_in_cm:175`}, + // empty map + {&pb.MessageWithMap{}, ``}, + // non-empty map; map format is the same as a repeated struct, + // and they are sorted by key (numerically for numeric keys). + { + &pb.MessageWithMap{NameMapping: map[int32]string{ + -1: "Negatory", + 7: "Lucky", + 1234: "Feist", + 6345789: "Otis", + }}, + `name_mapping: ` + + `name_mapping: ` + + `name_mapping: ` + + `name_mapping:`, + }, + // map with nil value; not well-defined, but we shouldn't crash + { + &pb.MessageWithMap{MsgMapping: map[int64]*pb.FloatingPoint{7: nil}}, + `msg_mapping:`, + }, + } + for _, test := range tests { + got := strings.TrimSpace(test.m.String()) + if got != test.want { + t.Errorf("\n got %s\nwant %s", got, test.want) + } + } +} diff --git a/vendor/github.com/golang/protobuf/protoc-gen-go/Makefile b/vendor/github.com/golang/protobuf/protoc-gen-go/Makefile new file mode 100644 index 000000000..a42cc3717 --- /dev/null +++ b/vendor/github.com/golang/protobuf/protoc-gen-go/Makefile @@ -0,0 +1,33 @@ +# 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. + +test: + cd testdata && make test diff --git a/vendor/github.com/golang/protobuf/protoc-gen-go/descriptor/Makefile b/vendor/github.com/golang/protobuf/protoc-gen-go/descriptor/Makefile new file mode 100644 index 000000000..4942418e3 --- /dev/null +++ b/vendor/github.com/golang/protobuf/protoc-gen-go/descriptor/Makefile @@ -0,0 +1,39 @@ +# 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. + +# Not stored here, but descriptor.proto is in https://github.com/google/protobuf/ +# at src/google/protobuf/descriptor.proto +regenerate: + echo WARNING! THIS RULE IS PROBABLY NOT RIGHT FOR YOUR INSTALLATION + protoc --go_out=. -I$(HOME)/src/protobuf/src $(HOME)/src/protobuf/src/google/protobuf/descriptor.proto && \ + sed 's,^package google_protobuf,package descriptor,' google/protobuf/descriptor.pb.go > \ + $(GOPATH)/src/github.com/golang/protobuf/protoc-gen-go/descriptor/descriptor.pb.go && \ + rm -f google/protobuf/descriptor.pb.go diff --git a/vendor/github.com/golang/protobuf/protoc-gen-go/descriptor/descriptor.pb.go b/vendor/github.com/golang/protobuf/protoc-gen-go/descriptor/descriptor.pb.go new file mode 100644 index 000000000..9690d1dc7 --- /dev/null +++ b/vendor/github.com/golang/protobuf/protoc-gen-go/descriptor/descriptor.pb.go @@ -0,0 +1,2037 @@ +// Code generated by protoc-gen-go. +// source: google/protobuf/descriptor.proto +// DO NOT EDIT! + +/* +Package descriptor is a generated protocol buffer package. + +It is generated from these files: + google/protobuf/descriptor.proto + +It has these top-level messages: + FileDescriptorSet + FileDescriptorProto + DescriptorProto + FieldDescriptorProto + OneofDescriptorProto + EnumDescriptorProto + EnumValueDescriptorProto + ServiceDescriptorProto + MethodDescriptorProto + FileOptions + MessageOptions + FieldOptions + EnumOptions + EnumValueOptions + ServiceOptions + MethodOptions + UninterpretedOption + SourceCodeInfo + GeneratedCodeInfo +*/ +package descriptor + +import proto "github.com/golang/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.ProtoPackageIsVersion2 // 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 + 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 fileDescriptor0, []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 fileDescriptor0, []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 fileDescriptor0, []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 fileDescriptor0, []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 fileDescriptor0, []int{11, 1} } + +// 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 fileDescriptor0, []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 fileDescriptor0, []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 fileDescriptor0, []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 fileDescriptor0, []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 fileDescriptor0, []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 fileDescriptor0, []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"` + 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 fileDescriptor0, []int{4} } + +func (m *OneofDescriptorProto) GetName() string { + if m != nil && m.Name != nil { + return *m.Name + } + return "" +} + +// 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 fileDescriptor0, []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 fileDescriptor0, []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 fileDescriptor0, []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 fileDescriptor0, []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"` + // If set true, then the Java code generator will generate equals() and + // hashCode() methods for all messages defined in the .proto file. + // This increases generated code size, potentially substantially for large + // protos, which may harm a memory-constrained application. + // - In the full runtime this is a speed optimization, as the + // AbstractMessage base class includes reflection-based implementations of + // these methods. + // - In the lite runtime, setting this option changes the semantics of + // equals() and hashCode() to more closely match those of the full runtime; + // the generated methods compute their results based on field values rather + // than object identity. (Implementations should not assume that hashcodes + // will be consistent across runtimes or versions of the protocol compiler.) + JavaGenerateEqualsAndHash *bool `protobuf:"varint,20,opt,name=java_generate_equals_and_hash,json=javaGenerateEqualsAndHash,def=0" 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"` + // 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 fileDescriptor0, []int{9} } + +var extRange_FileOptions = []proto.ExtensionRange{ + {1000, 536870911}, +} + +func (*FileOptions) ExtensionRangeArray() []proto.ExtensionRange { + return extRange_FileOptions +} + +const Default_FileOptions_JavaMultipleFiles bool = false +const Default_FileOptions_JavaGenerateEqualsAndHash 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 Default_FileOptions_JavaGenerateEqualsAndHash +} + +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) 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 fileDescriptor0, []int{10} } + +var extRange_MessageOptions = []proto.ExtensionRange{ + {1000, 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 outher 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 fileDescriptor0, []int{11} } + +var extRange_FieldOptions = []proto.ExtensionRange{ + {1000, 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 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 fileDescriptor0, []int{12} } + +var extRange_EnumOptions = []proto.ExtensionRange{ + {1000, 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 fileDescriptor0, []int{13} } + +var extRange_EnumValueOptions = []proto.ExtensionRange{ + {1000, 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 fileDescriptor0, []int{14} } + +var extRange_ServiceOptions = []proto.ExtensionRange{ + {1000, 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"` + // 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 fileDescriptor0, []int{15} } + +var extRange_MethodOptions = []proto.ExtensionRange{ + {1000, 536870911}, +} + +func (*MethodOptions) ExtensionRangeArray() []proto.ExtensionRange { + return extRange_MethodOptions +} + +const Default_MethodOptions_Deprecated bool = false + +func (m *MethodOptions) GetDeprecated() bool { + if m != nil && m.Deprecated != nil { + return *m.Deprecated + } + return Default_MethodOptions_Deprecated +} + +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 fileDescriptor0, []int{16} } + +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 fileDescriptor0, []int{16, 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 fileDescriptor0, []int{17} } + +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 fileDescriptor0, []int{17, 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 fileDescriptor0, []int{18} } + +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 fileDescriptor0, []int{18, 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((*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) +} + +func init() { proto.RegisterFile("google/protobuf/descriptor.proto", fileDescriptor0) } + +var fileDescriptor0 = []byte{ + // 2247 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xcc, 0x59, 0x4f, 0x8f, 0xdb, 0xc6, + 0x15, 0xaf, 0xfe, 0xae, 0xf4, 0xa4, 0x95, 0xb8, 0xe3, 0x8d, 0x2d, 0x6f, 0xe2, 0xd8, 0x56, 0xec, + 0xd8, 0x71, 0x5a, 0x39, 0x70, 0x9b, 0xc4, 0xdd, 0x14, 0x29, 0xb4, 0x12, 0xbd, 0x91, 0x21, 0xad, + 0x54, 0x4a, 0x6a, 0x9d, 0x5c, 0x08, 0x2e, 0x35, 0xd2, 0xd2, 0xa6, 0x48, 0x95, 0xa4, 0x6c, 0x6f, + 0x4e, 0x05, 0x7a, 0xea, 0xb1, 0xb7, 0xa2, 0x2d, 0x7a, 0xc8, 0x25, 0x40, 0x3f, 0x40, 0x0f, 0xbd, + 0xf7, 0x5a, 0xa0, 0xf7, 0x1e, 0x0b, 0xb4, 0xdf, 0xa0, 0xd7, 0xbe, 0x99, 0x21, 0x29, 0x52, 0xa2, + 0xe2, 0x6d, 0x80, 0x34, 0xf5, 0xc5, 0x9a, 0x37, 0x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0x50, 0x4f, 0xc3, 0xde, 0x77, 0xb2, + 0x52, 0xca, 0xf3, 0xc7, 0xaa, 0x2b, 0x3e, 0xa0, 0xed, 0xcf, 0x07, 0xba, 0xf5, 0xbf, 0xa5, 0x60, + 0x2f, 0xe8, 0xa8, 0x27, 0x61, 0xb0, 0x7a, 0x00, 0x9a, 0x65, 0xd9, 0x5e, 0x34, 0x5c, 0x9b, 0x54, + 0xde, 0xd0, 0x6b, 0x34, 0x43, 0x25, 0x25, 0x62, 0xe0, 0x60, 0x0e, 0xb0, 0x9a, 0xd9, 0x1a, 0x36, + 0x4c, 0xee, 0xfe, 0x63, 0x31, 0xff, 0x8b, 0x83, 0xb8, 0x86, 0x81, 0x10, 0xb1, 0xd6, 0x9b, 0x3d, + 0x8c, 0x9d, 0xd2, 0x99, 0x61, 0xf9, 0x4f, 0x58, 0x62, 0x10, 0x3c, 0x8c, 0x65, 0xc3, 0x87, 0xb1, + 0xa3, 0x27, 0xd8, 0x5b, 0xdb, 0xf3, 0x75, 0x77, 0x8f, 0xa4, 0xb5, 0xab, 0xa0, 0xfb, 0x49, 0xea, + 0x33, 0x58, 0x35, 0x4a, 0x5f, 0xa4, 0x33, 0xc7, 0x83, 0xa3, 0x3f, 0xa6, 0x0f, 0x8e, 0x85, 0xde, + 0x20, 0x58, 0xa6, 0x42, 0xa7, 0x26, 0xd5, 0x99, 0xeb, 0xff, 0x09, 0x00, 0x00, 0xff, 0xff, 0x51, + 0xab, 0xa7, 0x9f, 0x56, 0x19, 0x00, 0x00, +} diff --git a/vendor/github.com/golang/protobuf/protoc-gen-go/doc.go b/vendor/github.com/golang/protobuf/protoc-gen-go/doc.go new file mode 100644 index 000000000..0d6055d61 --- /dev/null +++ b/vendor/github.com/golang/protobuf/protoc-gen-go/doc.go @@ -0,0 +1,51 @@ +// 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. + +/* + A plugin for the Google protocol buffer compiler to generate Go code. + Run it by building this program and putting it in your path with the name + protoc-gen-go + That word 'go' at the end becomes part of the option string set for the + protocol compiler, so once the protocol compiler (protoc) is installed + you can run + protoc --go_out=output_directory input_directory/file.proto + to generate Go bindings for the protocol defined by file.proto. + With that input, the output will be written to + output_directory/file.pb.go + + The generated code is documented in the package comment for + the library. + + See the README and documentation for protocol buffers to learn more: + https://developers.google.com/protocol-buffers/ + +*/ +package documentation diff --git a/vendor/github.com/golang/protobuf/protoc-gen-go/generator/Makefile b/vendor/github.com/golang/protobuf/protoc-gen-go/generator/Makefile new file mode 100644 index 000000000..b5715c357 --- /dev/null +++ b/vendor/github.com/golang/protobuf/protoc-gen-go/generator/Makefile @@ -0,0 +1,40 @@ +# 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. + +include $(GOROOT)/src/Make.inc + +TARG=github.com/golang/protobuf/compiler/generator +GOFILES=\ + generator.go\ + +DEPS=../descriptor ../plugin ../../proto + +include $(GOROOT)/src/Make.pkg diff --git a/vendor/github.com/golang/protobuf/protoc-gen-go/generator/generator.go b/vendor/github.com/golang/protobuf/protoc-gen-go/generator/generator.go new file mode 100644 index 000000000..095891c0b --- /dev/null +++ b/vendor/github.com/golang/protobuf/protoc-gen-go/generator/generator.go @@ -0,0 +1,2778 @@ +// 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. + +/* + The code generator for the plugin for the Google protocol buffer compiler. + It generates Go code from the protocol buffer description files read by the + main routine. +*/ +package generator + +import ( + "bufio" + "bytes" + "compress/gzip" + "fmt" + "go/parser" + "go/printer" + "go/token" + "log" + "os" + "path" + "strconv" + "strings" + "unicode" + "unicode/utf8" + + "github.com/golang/protobuf/proto" + + "github.com/golang/protobuf/protoc-gen-go/descriptor" + plugin "github.com/golang/protobuf/protoc-gen-go/plugin" +) + +// generatedCodeVersion indicates a version of the generated code. +// It is incremented whenever an incompatibility between the generated code and +// proto package is introduced; the generated code references +// a constant, proto.ProtoPackageIsVersionN (where N is generatedCodeVersion). +const generatedCodeVersion = 2 + +// A Plugin provides functionality to add to the output during Go code generation, +// such as to produce RPC stubs. +type Plugin interface { + // Name identifies the plugin. + Name() string + // Init is called once after data structures are built but before + // code generation begins. + Init(g *Generator) + // Generate produces the code generated by the plugin for this file, + // except for the imports, by calling the generator's methods P, In, and Out. + Generate(file *FileDescriptor) + // GenerateImports produces the import declarations for this file. + // It is called after Generate. + GenerateImports(file *FileDescriptor) +} + +var plugins []Plugin + +// RegisterPlugin installs a (second-order) plugin to be run when the Go output is generated. +// It is typically called during initialization. +func RegisterPlugin(p Plugin) { + plugins = append(plugins, p) +} + +// Each type we import as a protocol buffer (other than FileDescriptorProto) needs +// a pointer to the FileDescriptorProto that represents it. These types achieve that +// wrapping by placing each Proto inside a struct with the pointer to its File. The +// structs have the same names as their contents, with "Proto" removed. +// FileDescriptor is used to store the things that it points to. + +// The file and package name method are common to messages and enums. +type common struct { + file *descriptor.FileDescriptorProto // File this object comes from. +} + +// PackageName is name in the package clause in the generated file. +func (c *common) PackageName() string { return uniquePackageOf(c.file) } + +func (c *common) File() *descriptor.FileDescriptorProto { return c.file } + +func fileIsProto3(file *descriptor.FileDescriptorProto) bool { + return file.GetSyntax() == "proto3" +} + +func (c *common) proto3() bool { return fileIsProto3(c.file) } + +// Descriptor represents a protocol buffer message. +type Descriptor struct { + common + *descriptor.DescriptorProto + parent *Descriptor // The containing message, if any. + nested []*Descriptor // Inner messages, if any. + enums []*EnumDescriptor // Inner enums, if any. + ext []*ExtensionDescriptor // Extensions, if any. + typename []string // Cached typename vector. + index int // The index into the container, whether the file or another message. + path string // The SourceCodeInfo path as comma-separated integers. + group bool +} + +// TypeName returns the elements of the dotted type name. +// The package name is not part of this name. +func (d *Descriptor) TypeName() []string { + if d.typename != nil { + return d.typename + } + n := 0 + for parent := d; parent != nil; parent = parent.parent { + n++ + } + s := make([]string, n, n) + for parent := d; parent != nil; parent = parent.parent { + n-- + s[n] = parent.GetName() + } + d.typename = s + return s +} + +// EnumDescriptor describes an enum. If it's at top level, its parent will be nil. +// Otherwise it will be the descriptor of the message in which it is defined. +type EnumDescriptor struct { + common + *descriptor.EnumDescriptorProto + parent *Descriptor // The containing message, if any. + typename []string // Cached typename vector. + index int // The index into the container, whether the file or a message. + path string // The SourceCodeInfo path as comma-separated integers. +} + +// TypeName returns the elements of the dotted type name. +// The package name is not part of this name. +func (e *EnumDescriptor) TypeName() (s []string) { + if e.typename != nil { + return e.typename + } + name := e.GetName() + if e.parent == nil { + s = make([]string, 1) + } else { + pname := e.parent.TypeName() + s = make([]string, len(pname)+1) + copy(s, pname) + } + s[len(s)-1] = name + e.typename = s + return s +} + +// Everything but the last element of the full type name, CamelCased. +// The values of type Foo.Bar are call Foo_value1... not Foo_Bar_value1... . +func (e *EnumDescriptor) prefix() string { + if e.parent == nil { + // If the enum is not part of a message, the prefix is just the type name. + return CamelCase(*e.Name) + "_" + } + typeName := e.TypeName() + return CamelCaseSlice(typeName[0:len(typeName)-1]) + "_" +} + +// The integer value of the named constant in this enumerated type. +func (e *EnumDescriptor) integerValueAsString(name string) string { + for _, c := range e.Value { + if c.GetName() == name { + return fmt.Sprint(c.GetNumber()) + } + } + log.Fatal("cannot find value for enum constant") + return "" +} + +// ExtensionDescriptor describes an extension. If it's at top level, its parent will be nil. +// Otherwise it will be the descriptor of the message in which it is defined. +type ExtensionDescriptor struct { + common + *descriptor.FieldDescriptorProto + parent *Descriptor // The containing message, if any. +} + +// TypeName returns the elements of the dotted type name. +// The package name is not part of this name. +func (e *ExtensionDescriptor) TypeName() (s []string) { + name := e.GetName() + if e.parent == nil { + // top-level extension + s = make([]string, 1) + } else { + pname := e.parent.TypeName() + s = make([]string, len(pname)+1) + copy(s, pname) + } + s[len(s)-1] = name + return s +} + +// DescName returns the variable name used for the generated descriptor. +func (e *ExtensionDescriptor) DescName() string { + // The full type name. + typeName := e.TypeName() + // Each scope of the extension is individually CamelCased, and all are joined with "_" with an "E_" prefix. + for i, s := range typeName { + typeName[i] = CamelCase(s) + } + return "E_" + strings.Join(typeName, "_") +} + +// ImportedDescriptor describes a type that has been publicly imported from another file. +type ImportedDescriptor struct { + common + o Object +} + +func (id *ImportedDescriptor) TypeName() []string { return id.o.TypeName() } + +// FileDescriptor describes an protocol buffer descriptor file (.proto). +// It includes slices of all the messages and enums defined within it. +// Those slices are constructed by WrapTypes. +type FileDescriptor struct { + *descriptor.FileDescriptorProto + desc []*Descriptor // All the messages defined in this file. + enum []*EnumDescriptor // All the enums defined in this file. + ext []*ExtensionDescriptor // All the top-level extensions defined in this file. + imp []*ImportedDescriptor // All types defined in files publicly imported by this file. + + // Comments, stored as a map of path (comma-separated integers) to the comment. + comments map[string]*descriptor.SourceCodeInfo_Location + + // The full list of symbols that are exported, + // as a map from the exported object to its symbols. + // This is used for supporting public imports. + exported map[Object][]symbol + + index int // The index of this file in the list of files to generate code for + + proto3 bool // whether to generate proto3 code for this file +} + +// PackageName is the package name we'll use in the generated code to refer to this file. +func (d *FileDescriptor) PackageName() string { return uniquePackageOf(d.FileDescriptorProto) } + +// VarName is the variable name we'll use in the generated code to refer +// to the compressed bytes of this descriptor. It is not exported, so +// it is only valid inside the generated package. +func (d *FileDescriptor) VarName() string { return fmt.Sprintf("fileDescriptor%d", d.index) } + +// goPackageOption interprets the file's go_package option. +// If there is no go_package, it returns ("", "", false). +// If there's a simple name, it returns ("", pkg, true). +// If the option implies an import path, it returns (impPath, pkg, true). +func (d *FileDescriptor) goPackageOption() (impPath, pkg string, ok bool) { + pkg = d.GetOptions().GetGoPackage() + if pkg == "" { + return + } + ok = true + // The presence of a slash implies there's an import path. + slash := strings.LastIndex(pkg, "/") + if slash < 0 { + return + } + impPath, pkg = pkg, pkg[slash+1:] + // A semicolon-delimited suffix overrides the package name. + sc := strings.IndexByte(impPath, ';') + if sc < 0 { + return + } + impPath, pkg = impPath[:sc], impPath[sc+1:] + return +} + +// goPackageName returns the Go package name to use in the +// generated Go file. The result explicit reports whether the name +// came from an option go_package statement. If explicit is false, +// the name was derived from the protocol buffer's package statement +// or the input file name. +func (d *FileDescriptor) goPackageName() (name string, explicit bool) { + // Does the file have a "go_package" option? + if _, pkg, ok := d.goPackageOption(); ok { + return pkg, true + } + + // Does the file have a package clause? + if pkg := d.GetPackage(); pkg != "" { + return pkg, false + } + // Use the file base name. + return baseName(d.GetName()), false +} + +// goFileName returns the output name for the generated Go file. +func (d *FileDescriptor) goFileName() string { + name := *d.Name + if ext := path.Ext(name); ext == ".proto" || ext == ".protodevel" { + name = name[:len(name)-len(ext)] + } + name += ".pb.go" + + // Does the file have a "go_package" option? + // If it does, it may override the filename. + if impPath, _, ok := d.goPackageOption(); ok && impPath != "" { + // Replace the existing dirname with the declared import path. + _, name = path.Split(name) + name = path.Join(impPath, name) + return name + } + + return name +} + +func (d *FileDescriptor) addExport(obj Object, sym symbol) { + d.exported[obj] = append(d.exported[obj], sym) +} + +// symbol is an interface representing an exported Go symbol. +type symbol interface { + // GenerateAlias should generate an appropriate alias + // for the symbol from the named package. + GenerateAlias(g *Generator, pkg string) +} + +type messageSymbol struct { + sym string + hasExtensions, isMessageSet bool + hasOneof bool + getters []getterSymbol +} + +type getterSymbol struct { + name string + typ string + typeName string // canonical name in proto world; empty for proto.Message and similar + genType bool // whether typ contains a generated type (message/group/enum) +} + +func (ms *messageSymbol) GenerateAlias(g *Generator, pkg string) { + remoteSym := pkg + "." + ms.sym + + g.P("type ", ms.sym, " ", remoteSym) + g.P("func (m *", ms.sym, ") Reset() { (*", remoteSym, ")(m).Reset() }") + g.P("func (m *", ms.sym, ") String() string { return (*", remoteSym, ")(m).String() }") + g.P("func (*", ms.sym, ") ProtoMessage() {}") + if ms.hasExtensions { + g.P("func (*", ms.sym, ") ExtensionRangeArray() []", g.Pkg["proto"], ".ExtensionRange ", + "{ return (*", remoteSym, ")(nil).ExtensionRangeArray() }") + if ms.isMessageSet { + g.P("func (m *", ms.sym, ") Marshal() ([]byte, error) ", + "{ return (*", remoteSym, ")(m).Marshal() }") + g.P("func (m *", ms.sym, ") Unmarshal(buf []byte) error ", + "{ return (*", remoteSym, ")(m).Unmarshal(buf) }") + } + } + if ms.hasOneof { + // Oneofs and public imports do not mix well. + // We can make them work okay for the binary format, + // but they're going to break weirdly for text/JSON. + enc := "_" + ms.sym + "_OneofMarshaler" + dec := "_" + ms.sym + "_OneofUnmarshaler" + size := "_" + ms.sym + "_OneofSizer" + encSig := "(msg " + g.Pkg["proto"] + ".Message, b *" + g.Pkg["proto"] + ".Buffer) error" + decSig := "(msg " + g.Pkg["proto"] + ".Message, tag, wire int, b *" + g.Pkg["proto"] + ".Buffer) (bool, error)" + sizeSig := "(msg " + g.Pkg["proto"] + ".Message) int" + g.P("func (m *", ms.sym, ") XXX_OneofFuncs() (func", encSig, ", func", decSig, ", func", sizeSig, ", []interface{}) {") + g.P("return ", enc, ", ", dec, ", ", size, ", nil") + g.P("}") + + g.P("func ", enc, encSig, " {") + g.P("m := msg.(*", ms.sym, ")") + g.P("m0 := (*", remoteSym, ")(m)") + g.P("enc, _, _, _ := m0.XXX_OneofFuncs()") + g.P("return enc(m0, b)") + g.P("}") + + g.P("func ", dec, decSig, " {") + g.P("m := msg.(*", ms.sym, ")") + g.P("m0 := (*", remoteSym, ")(m)") + g.P("_, dec, _, _ := m0.XXX_OneofFuncs()") + g.P("return dec(m0, tag, wire, b)") + g.P("}") + + g.P("func ", size, sizeSig, " {") + g.P("m := msg.(*", ms.sym, ")") + g.P("m0 := (*", remoteSym, ")(m)") + g.P("_, _, size, _ := m0.XXX_OneofFuncs()") + g.P("return size(m0)") + g.P("}") + } + for _, get := range ms.getters { + + if get.typeName != "" { + g.RecordTypeUse(get.typeName) + } + typ := get.typ + val := "(*" + remoteSym + ")(m)." + get.name + "()" + if get.genType { + // typ will be "*pkg.T" (message/group) or "pkg.T" (enum) + // or "map[t]*pkg.T" (map to message/enum). + // The first two of those might have a "[]" prefix if it is repeated. + // Drop any package qualifier since we have hoisted the type into this package. + rep := strings.HasPrefix(typ, "[]") + if rep { + typ = typ[2:] + } + isMap := strings.HasPrefix(typ, "map[") + star := typ[0] == '*' + if !isMap { // map types handled lower down + typ = typ[strings.Index(typ, ".")+1:] + } + if star { + typ = "*" + typ + } + if rep { + // Go does not permit conversion between slice types where both + // element types are named. That means we need to generate a bit + // of code in this situation. + // typ is the element type. + // val is the expression to get the slice from the imported type. + + ctyp := typ // conversion type expression; "Foo" or "(*Foo)" + if star { + ctyp = "(" + typ + ")" + } + + g.P("func (m *", ms.sym, ") ", get.name, "() []", typ, " {") + g.In() + g.P("o := ", val) + g.P("if o == nil {") + g.In() + g.P("return nil") + g.Out() + g.P("}") + g.P("s := make([]", typ, ", len(o))") + g.P("for i, x := range o {") + g.In() + g.P("s[i] = ", ctyp, "(x)") + g.Out() + g.P("}") + g.P("return s") + g.Out() + g.P("}") + continue + } + if isMap { + // Split map[keyTyp]valTyp. + bra, ket := strings.Index(typ, "["), strings.Index(typ, "]") + keyTyp, valTyp := typ[bra+1:ket], typ[ket+1:] + // Drop any package qualifier. + // Only the value type may be foreign. + star := valTyp[0] == '*' + valTyp = valTyp[strings.Index(valTyp, ".")+1:] + if star { + valTyp = "*" + valTyp + } + + typ := "map[" + keyTyp + "]" + valTyp + g.P("func (m *", ms.sym, ") ", get.name, "() ", typ, " {") + g.P("o := ", val) + g.P("if o == nil { return nil }") + g.P("s := make(", typ, ", len(o))") + g.P("for k, v := range o {") + g.P("s[k] = (", valTyp, ")(v)") + g.P("}") + g.P("return s") + g.P("}") + continue + } + // Convert imported type into the forwarding type. + val = "(" + typ + ")(" + val + ")" + } + + g.P("func (m *", ms.sym, ") ", get.name, "() ", typ, " { return ", val, " }") + } + +} + +type enumSymbol struct { + name string + proto3 bool // Whether this came from a proto3 file. +} + +func (es enumSymbol) GenerateAlias(g *Generator, pkg string) { + s := es.name + g.P("type ", s, " ", pkg, ".", s) + g.P("var ", s, "_name = ", pkg, ".", s, "_name") + g.P("var ", s, "_value = ", pkg, ".", s, "_value") + g.P("func (x ", s, ") String() string { return (", pkg, ".", s, ")(x).String() }") + if !es.proto3 { + g.P("func (x ", s, ") Enum() *", s, "{ return (*", s, ")((", pkg, ".", s, ")(x).Enum()) }") + g.P("func (x *", s, ") UnmarshalJSON(data []byte) error { return (*", pkg, ".", s, ")(x).UnmarshalJSON(data) }") + } +} + +type constOrVarSymbol struct { + sym string + typ string // either "const" or "var" + cast string // if non-empty, a type cast is required (used for enums) +} + +func (cs constOrVarSymbol) GenerateAlias(g *Generator, pkg string) { + v := pkg + "." + cs.sym + if cs.cast != "" { + v = cs.cast + "(" + v + ")" + } + g.P(cs.typ, " ", cs.sym, " = ", v) +} + +// Object is an interface abstracting the abilities shared by enums, messages, extensions and imported objects. +type Object interface { + PackageName() string // The name we use in our output (a_b_c), possibly renamed for uniqueness. + TypeName() []string + File() *descriptor.FileDescriptorProto +} + +// Each package name we generate must be unique. The package we're generating +// gets its own name but every other package must have a unique name that does +// not conflict in the code we generate. These names are chosen globally (although +// they don't have to be, it simplifies things to do them globally). +func uniquePackageOf(fd *descriptor.FileDescriptorProto) string { + s, ok := uniquePackageName[fd] + if !ok { + log.Fatal("internal error: no package name defined for " + fd.GetName()) + } + return s +} + +// Generator is the type whose methods generate the output, stored in the associated response structure. +type Generator struct { + *bytes.Buffer + + Request *plugin.CodeGeneratorRequest // The input. + Response *plugin.CodeGeneratorResponse // The output. + + Param map[string]string // Command-line parameters. + PackageImportPath string // Go import path of the package we're generating code for + ImportPrefix string // String to prefix to imported package file names. + ImportMap map[string]string // Mapping from .proto file name to import path + + Pkg map[string]string // The names under which we import support packages + + packageName string // What we're calling ourselves. + allFiles []*FileDescriptor // All files in the tree + allFilesByName map[string]*FileDescriptor // All files by filename. + genFiles []*FileDescriptor // Those files we will generate output for. + file *FileDescriptor // The file we are compiling now. + usedPackages map[string]bool // Names of packages used in current file. + typeNameToObject map[string]Object // Key is a fully-qualified name in input syntax. + init []string // Lines to emit in the init function. + indent string + writeOutput bool +} + +// New creates a new generator and allocates the request and response protobufs. +func New() *Generator { + g := new(Generator) + g.Buffer = new(bytes.Buffer) + g.Request = new(plugin.CodeGeneratorRequest) + g.Response = new(plugin.CodeGeneratorResponse) + return g +} + +// Error reports a problem, including an error, and exits the program. +func (g *Generator) Error(err error, msgs ...string) { + s := strings.Join(msgs, " ") + ":" + err.Error() + log.Print("protoc-gen-go: error:", s) + os.Exit(1) +} + +// Fail reports a problem and exits the program. +func (g *Generator) Fail(msgs ...string) { + s := strings.Join(msgs, " ") + log.Print("protoc-gen-go: error:", s) + os.Exit(1) +} + +// CommandLineParameters breaks the comma-separated list of key=value pairs +// in the parameter (a member of the request protobuf) into a key/value map. +// It then sets file name mappings defined by those entries. +func (g *Generator) CommandLineParameters(parameter string) { + g.Param = make(map[string]string) + for _, p := range strings.Split(parameter, ",") { + if i := strings.Index(p, "="); i < 0 { + g.Param[p] = "" + } else { + g.Param[p[0:i]] = p[i+1:] + } + } + + g.ImportMap = make(map[string]string) + pluginList := "none" // Default list of plugin names to enable (empty means all). + for k, v := range g.Param { + switch k { + case "import_prefix": + g.ImportPrefix = v + case "import_path": + g.PackageImportPath = v + case "plugins": + pluginList = v + default: + if len(k) > 0 && k[0] == 'M' { + g.ImportMap[k[1:]] = v + } + } + } + + if pluginList != "" { + // Amend the set of plugins. + enabled := make(map[string]bool) + for _, name := range strings.Split(pluginList, "+") { + enabled[name] = true + } + var nplugins []Plugin + for _, p := range plugins { + if enabled[p.Name()] { + nplugins = append(nplugins, p) + } + } + plugins = nplugins + } +} + +// DefaultPackageName returns the package name printed for the object. +// If its file is in a different package, it returns the package name we're using for this file, plus ".". +// Otherwise it returns the empty string. +func (g *Generator) DefaultPackageName(obj Object) string { + pkg := obj.PackageName() + if pkg == g.packageName { + return "" + } + return pkg + "." +} + +// For each input file, the unique package name to use, underscored. +var uniquePackageName = make(map[*descriptor.FileDescriptorProto]string) + +// Package names already registered. Key is the name from the .proto file; +// value is the name that appears in the generated code. +var pkgNamesInUse = make(map[string]bool) + +// Create and remember a guaranteed unique package name for this file descriptor. +// Pkg is the candidate name. If f is nil, it's a builtin package like "proto" and +// has no file descriptor. +func RegisterUniquePackageName(pkg string, f *FileDescriptor) string { + // Convert dots to underscores before finding a unique alias. + pkg = strings.Map(badToUnderscore, pkg) + + for i, orig := 1, pkg; pkgNamesInUse[pkg]; i++ { + // It's a duplicate; must rename. + pkg = orig + strconv.Itoa(i) + } + // Install it. + pkgNamesInUse[pkg] = true + if f != nil { + uniquePackageName[f.FileDescriptorProto] = pkg + } + return pkg +} + +var isGoKeyword = map[string]bool{ + "break": true, + "case": true, + "chan": true, + "const": true, + "continue": true, + "default": true, + "else": true, + "defer": true, + "fallthrough": true, + "for": true, + "func": true, + "go": true, + "goto": true, + "if": true, + "import": true, + "interface": true, + "map": true, + "package": true, + "range": true, + "return": true, + "select": true, + "struct": true, + "switch": true, + "type": true, + "var": true, +} + +// defaultGoPackage returns the package name to use, +// derived from the import path of the package we're building code for. +func (g *Generator) defaultGoPackage() string { + p := g.PackageImportPath + if i := strings.LastIndex(p, "/"); i >= 0 { + p = p[i+1:] + } + if p == "" { + return "" + } + + p = strings.Map(badToUnderscore, p) + // Identifier must not be keyword: insert _. + if isGoKeyword[p] { + p = "_" + p + } + // Identifier must not begin with digit: insert _. + if r, _ := utf8.DecodeRuneInString(p); unicode.IsDigit(r) { + p = "_" + p + } + return p +} + +// SetPackageNames sets the package name for this run. +// The package name must agree across all files being generated. +// It also defines unique package names for all imported files. +func (g *Generator) SetPackageNames() { + // Register the name for this package. It will be the first name + // registered so is guaranteed to be unmodified. + pkg, explicit := g.genFiles[0].goPackageName() + + // Check all files for an explicit go_package option. + for _, f := range g.genFiles { + thisPkg, thisExplicit := f.goPackageName() + if thisExplicit { + if !explicit { + // Let this file's go_package option serve for all input files. + pkg, explicit = thisPkg, true + } else if thisPkg != pkg { + g.Fail("inconsistent package names:", thisPkg, pkg) + } + } + } + + // If we don't have an explicit go_package option but we have an + // import path, use that. + if !explicit { + p := g.defaultGoPackage() + if p != "" { + pkg, explicit = p, true + } + } + + // If there was no go_package and no import path to use, + // double-check that all the inputs have the same implicit + // Go package name. + if !explicit { + for _, f := range g.genFiles { + thisPkg, _ := f.goPackageName() + if thisPkg != pkg { + g.Fail("inconsistent package names:", thisPkg, pkg) + } + } + } + + g.packageName = RegisterUniquePackageName(pkg, g.genFiles[0]) + + // Register the support package names. They might collide with the + // name of a package we import. + g.Pkg = map[string]string{ + "fmt": RegisterUniquePackageName("fmt", nil), + "math": RegisterUniquePackageName("math", nil), + "proto": RegisterUniquePackageName("proto", nil), + } + +AllFiles: + for _, f := range g.allFiles { + for _, genf := range g.genFiles { + if f == genf { + // In this package already. + uniquePackageName[f.FileDescriptorProto] = g.packageName + continue AllFiles + } + } + // The file is a dependency, so we want to ignore its go_package option + // because that is only relevant for its specific generated output. + pkg := f.GetPackage() + if pkg == "" { + pkg = baseName(*f.Name) + } + RegisterUniquePackageName(pkg, f) + } +} + +// WrapTypes walks the incoming data, wrapping DescriptorProtos, EnumDescriptorProtos +// and FileDescriptorProtos into file-referenced objects within the Generator. +// It also creates the list of files to generate and so should be called before GenerateAllFiles. +func (g *Generator) WrapTypes() { + g.allFiles = make([]*FileDescriptor, 0, len(g.Request.ProtoFile)) + g.allFilesByName = make(map[string]*FileDescriptor, len(g.allFiles)) + for _, f := range g.Request.ProtoFile { + // We must wrap the descriptors before we wrap the enums + descs := wrapDescriptors(f) + g.buildNestedDescriptors(descs) + enums := wrapEnumDescriptors(f, descs) + g.buildNestedEnums(descs, enums) + exts := wrapExtensions(f) + fd := &FileDescriptor{ + FileDescriptorProto: f, + desc: descs, + enum: enums, + ext: exts, + exported: make(map[Object][]symbol), + proto3: fileIsProto3(f), + } + extractComments(fd) + g.allFiles = append(g.allFiles, fd) + g.allFilesByName[f.GetName()] = fd + } + for _, fd := range g.allFiles { + fd.imp = wrapImported(fd.FileDescriptorProto, g) + } + + g.genFiles = make([]*FileDescriptor, 0, len(g.Request.FileToGenerate)) + for _, fileName := range g.Request.FileToGenerate { + fd := g.allFilesByName[fileName] + if fd == nil { + g.Fail("could not find file named", fileName) + } + fd.index = len(g.genFiles) + g.genFiles = append(g.genFiles, fd) + } +} + +// Scan the descriptors in this file. For each one, build the slice of nested descriptors +func (g *Generator) buildNestedDescriptors(descs []*Descriptor) { + for _, desc := range descs { + if len(desc.NestedType) != 0 { + for _, nest := range descs { + if nest.parent == desc { + desc.nested = append(desc.nested, nest) + } + } + if len(desc.nested) != len(desc.NestedType) { + g.Fail("internal error: nesting failure for", desc.GetName()) + } + } + } +} + +func (g *Generator) buildNestedEnums(descs []*Descriptor, enums []*EnumDescriptor) { + for _, desc := range descs { + if len(desc.EnumType) != 0 { + for _, enum := range enums { + if enum.parent == desc { + desc.enums = append(desc.enums, enum) + } + } + if len(desc.enums) != len(desc.EnumType) { + g.Fail("internal error: enum nesting failure for", desc.GetName()) + } + } + } +} + +// Construct the Descriptor +func newDescriptor(desc *descriptor.DescriptorProto, parent *Descriptor, file *descriptor.FileDescriptorProto, index int) *Descriptor { + d := &Descriptor{ + common: common{file}, + DescriptorProto: desc, + parent: parent, + index: index, + } + if parent == nil { + d.path = fmt.Sprintf("%d,%d", messagePath, index) + } else { + d.path = fmt.Sprintf("%s,%d,%d", parent.path, messageMessagePath, index) + } + + // The only way to distinguish a group from a message is whether + // the containing message has a TYPE_GROUP field that matches. + if parent != nil { + parts := d.TypeName() + if file.Package != nil { + parts = append([]string{*file.Package}, parts...) + } + exp := "." + strings.Join(parts, ".") + for _, field := range parent.Field { + if field.GetType() == descriptor.FieldDescriptorProto_TYPE_GROUP && field.GetTypeName() == exp { + d.group = true + break + } + } + } + + for _, field := range desc.Extension { + d.ext = append(d.ext, &ExtensionDescriptor{common{file}, field, d}) + } + + return d +} + +// Return a slice of all the Descriptors defined within this file +func wrapDescriptors(file *descriptor.FileDescriptorProto) []*Descriptor { + sl := make([]*Descriptor, 0, len(file.MessageType)+10) + for i, desc := range file.MessageType { + sl = wrapThisDescriptor(sl, desc, nil, file, i) + } + return sl +} + +// Wrap this Descriptor, recursively +func wrapThisDescriptor(sl []*Descriptor, desc *descriptor.DescriptorProto, parent *Descriptor, file *descriptor.FileDescriptorProto, index int) []*Descriptor { + sl = append(sl, newDescriptor(desc, parent, file, index)) + me := sl[len(sl)-1] + for i, nested := range desc.NestedType { + sl = wrapThisDescriptor(sl, nested, me, file, i) + } + return sl +} + +// Construct the EnumDescriptor +func newEnumDescriptor(desc *descriptor.EnumDescriptorProto, parent *Descriptor, file *descriptor.FileDescriptorProto, index int) *EnumDescriptor { + ed := &EnumDescriptor{ + common: common{file}, + EnumDescriptorProto: desc, + parent: parent, + index: index, + } + if parent == nil { + ed.path = fmt.Sprintf("%d,%d", enumPath, index) + } else { + ed.path = fmt.Sprintf("%s,%d,%d", parent.path, messageEnumPath, index) + } + return ed +} + +// Return a slice of all the EnumDescriptors defined within this file +func wrapEnumDescriptors(file *descriptor.FileDescriptorProto, descs []*Descriptor) []*EnumDescriptor { + sl := make([]*EnumDescriptor, 0, len(file.EnumType)+10) + // Top-level enums. + for i, enum := range file.EnumType { + sl = append(sl, newEnumDescriptor(enum, nil, file, i)) + } + // Enums within messages. Enums within embedded messages appear in the outer-most message. + for _, nested := range descs { + for i, enum := range nested.EnumType { + sl = append(sl, newEnumDescriptor(enum, nested, file, i)) + } + } + return sl +} + +// Return a slice of all the top-level ExtensionDescriptors defined within this file. +func wrapExtensions(file *descriptor.FileDescriptorProto) []*ExtensionDescriptor { + var sl []*ExtensionDescriptor + for _, field := range file.Extension { + sl = append(sl, &ExtensionDescriptor{common{file}, field, nil}) + } + return sl +} + +// Return a slice of all the types that are publicly imported into this file. +func wrapImported(file *descriptor.FileDescriptorProto, g *Generator) (sl []*ImportedDescriptor) { + for _, index := range file.PublicDependency { + df := g.fileByName(file.Dependency[index]) + for _, d := range df.desc { + if d.GetOptions().GetMapEntry() { + continue + } + sl = append(sl, &ImportedDescriptor{common{file}, d}) + } + for _, e := range df.enum { + sl = append(sl, &ImportedDescriptor{common{file}, e}) + } + for _, ext := range df.ext { + sl = append(sl, &ImportedDescriptor{common{file}, ext}) + } + } + return +} + +func extractComments(file *FileDescriptor) { + file.comments = make(map[string]*descriptor.SourceCodeInfo_Location) + for _, loc := range file.GetSourceCodeInfo().GetLocation() { + if loc.LeadingComments == nil { + continue + } + var p []string + for _, n := range loc.Path { + p = append(p, strconv.Itoa(int(n))) + } + file.comments[strings.Join(p, ",")] = loc + } +} + +// BuildTypeNameMap builds the map from fully qualified type names to objects. +// The key names for the map come from the input data, which puts a period at the beginning. +// It should be called after SetPackageNames and before GenerateAllFiles. +func (g *Generator) BuildTypeNameMap() { + g.typeNameToObject = make(map[string]Object) + for _, f := range g.allFiles { + // The names in this loop are defined by the proto world, not us, so the + // package name may be empty. If so, the dotted package name of X will + // be ".X"; otherwise it will be ".pkg.X". + dottedPkg := "." + f.GetPackage() + if dottedPkg != "." { + dottedPkg += "." + } + for _, enum := range f.enum { + name := dottedPkg + dottedSlice(enum.TypeName()) + g.typeNameToObject[name] = enum + } + for _, desc := range f.desc { + name := dottedPkg + dottedSlice(desc.TypeName()) + g.typeNameToObject[name] = desc + } + } +} + +// ObjectNamed, given a fully-qualified input type name as it appears in the input data, +// returns the descriptor for the message or enum with that name. +func (g *Generator) ObjectNamed(typeName string) Object { + o, ok := g.typeNameToObject[typeName] + if !ok { + g.Fail("can't find object with type", typeName) + } + + // If the file of this object isn't a direct dependency of the current file, + // or in the current file, then this object has been publicly imported into + // a dependency of the current file. + // We should return the ImportedDescriptor object for it instead. + direct := *o.File().Name == *g.file.Name + if !direct { + for _, dep := range g.file.Dependency { + if *g.fileByName(dep).Name == *o.File().Name { + direct = true + break + } + } + } + if !direct { + found := false + Loop: + for _, dep := range g.file.Dependency { + df := g.fileByName(*g.fileByName(dep).Name) + for _, td := range df.imp { + if td.o == o { + // Found it! + o = td + found = true + break Loop + } + } + } + if !found { + log.Printf("protoc-gen-go: WARNING: failed finding publicly imported dependency for %v, used in %v", typeName, *g.file.Name) + } + } + + return o +} + +// P prints the arguments to the generated output. It handles strings and int32s, plus +// handling indirections because they may be *string, etc. +func (g *Generator) P(str ...interface{}) { + if !g.writeOutput { + return + } + g.WriteString(g.indent) + for _, v := range str { + switch s := v.(type) { + case string: + g.WriteString(s) + case *string: + g.WriteString(*s) + case bool: + fmt.Fprintf(g, "%t", s) + case *bool: + fmt.Fprintf(g, "%t", *s) + case int: + fmt.Fprintf(g, "%d", s) + case *int32: + fmt.Fprintf(g, "%d", *s) + case *int64: + fmt.Fprintf(g, "%d", *s) + case float64: + fmt.Fprintf(g, "%g", s) + case *float64: + fmt.Fprintf(g, "%g", *s) + default: + g.Fail(fmt.Sprintf("unknown type in printer: %T", v)) + } + } + g.WriteByte('\n') +} + +// addInitf stores the given statement to be printed inside the file's init function. +// The statement is given as a format specifier and arguments. +func (g *Generator) addInitf(stmt string, a ...interface{}) { + g.init = append(g.init, fmt.Sprintf(stmt, a...)) +} + +// In Indents the output one tab stop. +func (g *Generator) In() { g.indent += "\t" } + +// Out unindents the output one tab stop. +func (g *Generator) Out() { + if len(g.indent) > 0 { + g.indent = g.indent[1:] + } +} + +// GenerateAllFiles generates the output for all the files we're outputting. +func (g *Generator) GenerateAllFiles() { + // Initialize the plugins + for _, p := range plugins { + p.Init(g) + } + // Generate the output. The generator runs for every file, even the files + // that we don't generate output for, so that we can collate the full list + // of exported symbols to support public imports. + genFileMap := make(map[*FileDescriptor]bool, len(g.genFiles)) + for _, file := range g.genFiles { + genFileMap[file] = true + } + for _, file := range g.allFiles { + g.Reset() + g.writeOutput = genFileMap[file] + g.generate(file) + if !g.writeOutput { + continue + } + g.Response.File = append(g.Response.File, &plugin.CodeGeneratorResponse_File{ + Name: proto.String(file.goFileName()), + Content: proto.String(g.String()), + }) + } +} + +// Run all the plugins associated with the file. +func (g *Generator) runPlugins(file *FileDescriptor) { + for _, p := range plugins { + p.Generate(file) + } +} + +// FileOf return the FileDescriptor for this FileDescriptorProto. +func (g *Generator) FileOf(fd *descriptor.FileDescriptorProto) *FileDescriptor { + for _, file := range g.allFiles { + if file.FileDescriptorProto == fd { + return file + } + } + g.Fail("could not find file in table:", fd.GetName()) + return nil +} + +// Fill the response protocol buffer with the generated output for all the files we're +// supposed to generate. +func (g *Generator) generate(file *FileDescriptor) { + g.file = g.FileOf(file.FileDescriptorProto) + g.usedPackages = make(map[string]bool) + + if g.file.index == 0 { + // For one file in the package, assert version compatibility. + g.P("// This is a compile-time assertion to ensure that this generated file") + g.P("// is compatible with the proto package it is being compiled against.") + g.P("// A compilation error at this line likely means your copy of the") + g.P("// proto package needs to be updated.") + g.P("const _ = ", g.Pkg["proto"], ".ProtoPackageIsVersion", generatedCodeVersion, " // please upgrade the proto package") + g.P() + } + + for _, td := range g.file.imp { + g.generateImported(td) + } + for _, enum := range g.file.enum { + g.generateEnum(enum) + } + for _, desc := range g.file.desc { + // Don't generate virtual messages for maps. + if desc.GetOptions().GetMapEntry() { + continue + } + g.generateMessage(desc) + } + for _, ext := range g.file.ext { + g.generateExtension(ext) + } + g.generateInitFunction() + + // Run the plugins before the imports so we know which imports are necessary. + g.runPlugins(file) + + g.generateFileDescriptor(file) + + // Generate header and imports last, though they appear first in the output. + rem := g.Buffer + g.Buffer = new(bytes.Buffer) + g.generateHeader() + g.generateImports() + if !g.writeOutput { + return + } + g.Write(rem.Bytes()) + + // Reformat generated code. + fset := token.NewFileSet() + raw := g.Bytes() + ast, err := parser.ParseFile(fset, "", g, parser.ParseComments) + if err != nil { + // Print out the bad code with line numbers. + // This should never happen in practice, but it can while changing generated code, + // so consider this a debugging aid. + var src bytes.Buffer + s := bufio.NewScanner(bytes.NewReader(raw)) + for line := 1; s.Scan(); line++ { + fmt.Fprintf(&src, "%5d\t%s\n", line, s.Bytes()) + } + g.Fail("bad Go source code was generated:", err.Error(), "\n"+src.String()) + } + g.Reset() + err = (&printer.Config{Mode: printer.TabIndent | printer.UseSpaces, Tabwidth: 8}).Fprint(g, fset, ast) + if err != nil { + g.Fail("generated Go source code could not be reformatted:", err.Error()) + } +} + +// Generate the header, including package definition +func (g *Generator) generateHeader() { + g.P("// Code generated by protoc-gen-go.") + g.P("// source: ", g.file.Name) + g.P("// DO NOT EDIT!") + g.P() + + name := g.file.PackageName() + + if g.file.index == 0 { + // Generate package docs for the first file in the package. + g.P("/*") + g.P("Package ", name, " is a generated protocol buffer package.") + g.P() + if loc, ok := g.file.comments[strconv.Itoa(packagePath)]; ok { + // not using g.PrintComments because this is a /* */ comment block. + text := strings.TrimSuffix(loc.GetLeadingComments(), "\n") + for _, line := range strings.Split(text, "\n") { + line = strings.TrimPrefix(line, " ") + // ensure we don't escape from the block comment + line = strings.Replace(line, "*/", "* /", -1) + g.P(line) + } + g.P() + } + var topMsgs []string + g.P("It is generated from these files:") + for _, f := range g.genFiles { + g.P("\t", f.Name) + for _, msg := range f.desc { + if msg.parent != nil { + continue + } + topMsgs = append(topMsgs, CamelCaseSlice(msg.TypeName())) + } + } + g.P() + g.P("It has these top-level messages:") + for _, msg := range topMsgs { + g.P("\t", msg) + } + g.P("*/") + } + + g.P("package ", name) + g.P() +} + +// PrintComments prints any comments from the source .proto file. +// The path is a comma-separated list of integers. +// It returns an indication of whether any comments were printed. +// See descriptor.proto for its format. +func (g *Generator) PrintComments(path string) bool { + if !g.writeOutput { + return false + } + if loc, ok := g.file.comments[path]; ok { + text := strings.TrimSuffix(loc.GetLeadingComments(), "\n") + for _, line := range strings.Split(text, "\n") { + g.P("// ", strings.TrimPrefix(line, " ")) + } + return true + } + return false +} + +func (g *Generator) fileByName(filename string) *FileDescriptor { + return g.allFilesByName[filename] +} + +// weak returns whether the ith import of the current file is a weak import. +func (g *Generator) weak(i int32) bool { + for _, j := range g.file.WeakDependency { + if j == i { + return true + } + } + return false +} + +// Generate the imports +func (g *Generator) generateImports() { + // We almost always need a proto import. Rather than computing when we + // do, which is tricky when there's a plugin, just import it and + // reference it later. The same argument applies to the fmt and math packages. + g.P("import " + g.Pkg["proto"] + " " + strconv.Quote(g.ImportPrefix+"github.com/golang/protobuf/proto")) + g.P("import " + g.Pkg["fmt"] + ` "fmt"`) + g.P("import " + g.Pkg["math"] + ` "math"`) + for i, s := range g.file.Dependency { + fd := g.fileByName(s) + // Do not import our own package. + if fd.PackageName() == g.packageName { + continue + } + filename := fd.goFileName() + // By default, import path is the dirname of the Go filename. + importPath := path.Dir(filename) + if substitution, ok := g.ImportMap[s]; ok { + importPath = substitution + } + importPath = g.ImportPrefix + importPath + // Skip weak imports. + if g.weak(int32(i)) { + g.P("// skipping weak import ", fd.PackageName(), " ", strconv.Quote(importPath)) + continue + } + // We need to import all the dependencies, even if we don't reference them, + // because other code and tools depend on having the full transitive closure + // of protocol buffer types in the binary. + pname := fd.PackageName() + if _, ok := g.usedPackages[pname]; !ok { + pname = "_" + } + g.P("import ", pname, " ", strconv.Quote(importPath)) + } + g.P() + // TODO: may need to worry about uniqueness across plugins + for _, p := range plugins { + p.GenerateImports(g.file) + g.P() + } + g.P("// Reference imports to suppress errors if they are not otherwise used.") + g.P("var _ = ", g.Pkg["proto"], ".Marshal") + g.P("var _ = ", g.Pkg["fmt"], ".Errorf") + g.P("var _ = ", g.Pkg["math"], ".Inf") + g.P() +} + +func (g *Generator) generateImported(id *ImportedDescriptor) { + // Don't generate public import symbols for files that we are generating + // code for, since those symbols will already be in this package. + // We can't simply avoid creating the ImportedDescriptor objects, + // because g.genFiles isn't populated at that stage. + tn := id.TypeName() + sn := tn[len(tn)-1] + df := g.FileOf(id.o.File()) + filename := *df.Name + for _, fd := range g.genFiles { + if *fd.Name == filename { + g.P("// Ignoring public import of ", sn, " from ", filename) + g.P() + return + } + } + g.P("// ", sn, " from public import ", filename) + g.usedPackages[df.PackageName()] = true + + for _, sym := range df.exported[id.o] { + sym.GenerateAlias(g, df.PackageName()) + } + + g.P() +} + +// Generate the enum definitions for this EnumDescriptor. +func (g *Generator) generateEnum(enum *EnumDescriptor) { + // The full type name + typeName := enum.TypeName() + // The full type name, CamelCased. + ccTypeName := CamelCaseSlice(typeName) + ccPrefix := enum.prefix() + + g.PrintComments(enum.path) + g.P("type ", ccTypeName, " int32") + g.file.addExport(enum, enumSymbol{ccTypeName, enum.proto3()}) + g.P("const (") + g.In() + for i, e := range enum.Value { + g.PrintComments(fmt.Sprintf("%s,%d,%d", enum.path, enumValuePath, i)) + + name := ccPrefix + *e.Name + g.P(name, " ", ccTypeName, " = ", e.Number) + g.file.addExport(enum, constOrVarSymbol{name, "const", ccTypeName}) + } + g.Out() + g.P(")") + g.P("var ", ccTypeName, "_name = map[int32]string{") + g.In() + generated := make(map[int32]bool) // avoid duplicate values + for _, e := range enum.Value { + duplicate := "" + if _, present := generated[*e.Number]; present { + duplicate = "// Duplicate value: " + } + g.P(duplicate, e.Number, ": ", strconv.Quote(*e.Name), ",") + generated[*e.Number] = true + } + g.Out() + g.P("}") + g.P("var ", ccTypeName, "_value = map[string]int32{") + g.In() + for _, e := range enum.Value { + g.P(strconv.Quote(*e.Name), ": ", e.Number, ",") + } + g.Out() + g.P("}") + + if !enum.proto3() { + g.P("func (x ", ccTypeName, ") Enum() *", ccTypeName, " {") + g.In() + g.P("p := new(", ccTypeName, ")") + g.P("*p = x") + g.P("return p") + g.Out() + g.P("}") + } + + g.P("func (x ", ccTypeName, ") String() string {") + g.In() + g.P("return ", g.Pkg["proto"], ".EnumName(", ccTypeName, "_name, int32(x))") + g.Out() + g.P("}") + + if !enum.proto3() { + g.P("func (x *", ccTypeName, ") UnmarshalJSON(data []byte) error {") + g.In() + g.P("value, err := ", g.Pkg["proto"], ".UnmarshalJSONEnum(", ccTypeName, `_value, data, "`, ccTypeName, `")`) + g.P("if err != nil {") + g.In() + g.P("return err") + g.Out() + g.P("}") + g.P("*x = ", ccTypeName, "(value)") + g.P("return nil") + g.Out() + g.P("}") + } + + var indexes []string + for m := enum.parent; m != nil; m = m.parent { + // XXX: skip groups? + indexes = append([]string{strconv.Itoa(m.index)}, indexes...) + } + indexes = append(indexes, strconv.Itoa(enum.index)) + g.P("func (", ccTypeName, ") EnumDescriptor() ([]byte, []int) { return ", g.file.VarName(), ", []int{", strings.Join(indexes, ", "), "} }") + if enum.file.GetPackage() == "google.protobuf" && enum.GetName() == "NullValue" { + g.P("func (", ccTypeName, `) XXX_WellKnownType() string { return "`, enum.GetName(), `" }`) + } + + g.P() +} + +// The tag is a string like "varint,2,opt,name=fieldname,def=7" that +// identifies details of the field for the protocol buffer marshaling and unmarshaling +// code. The fields are: +// wire encoding +// protocol tag number +// opt,req,rep for optional, required, or repeated +// packed whether the encoding is "packed" (optional; repeated primitives only) +// name= the original declared name +// enum= the name of the enum type if it is an enum-typed field. +// proto3 if this field is in a proto3 message +// def= string representation of the default value, if any. +// The default value must be in a representation that can be used at run-time +// to generate the default value. Thus bools become 0 and 1, for instance. +func (g *Generator) goTag(message *Descriptor, field *descriptor.FieldDescriptorProto, wiretype string) string { + optrepreq := "" + switch { + case isOptional(field): + optrepreq = "opt" + case isRequired(field): + optrepreq = "req" + case isRepeated(field): + optrepreq = "rep" + } + var defaultValue string + if dv := field.DefaultValue; dv != nil { // set means an explicit default + defaultValue = *dv + // Some types need tweaking. + switch *field.Type { + case descriptor.FieldDescriptorProto_TYPE_BOOL: + if defaultValue == "true" { + defaultValue = "1" + } else { + defaultValue = "0" + } + case descriptor.FieldDescriptorProto_TYPE_STRING, + descriptor.FieldDescriptorProto_TYPE_BYTES: + // Nothing to do. Quoting is done for the whole tag. + case descriptor.FieldDescriptorProto_TYPE_ENUM: + // For enums we need to provide the integer constant. + obj := g.ObjectNamed(field.GetTypeName()) + if id, ok := obj.(*ImportedDescriptor); ok { + // It is an enum that was publicly imported. + // We need the underlying type. + obj = id.o + } + enum, ok := obj.(*EnumDescriptor) + if !ok { + log.Printf("obj is a %T", obj) + if id, ok := obj.(*ImportedDescriptor); ok { + log.Printf("id.o is a %T", id.o) + } + g.Fail("unknown enum type", CamelCaseSlice(obj.TypeName())) + } + defaultValue = enum.integerValueAsString(defaultValue) + } + defaultValue = ",def=" + defaultValue + } + enum := "" + if *field.Type == descriptor.FieldDescriptorProto_TYPE_ENUM { + // We avoid using obj.PackageName(), because we want to use the + // original (proto-world) package name. + obj := g.ObjectNamed(field.GetTypeName()) + if id, ok := obj.(*ImportedDescriptor); ok { + obj = id.o + } + enum = ",enum=" + if pkg := obj.File().GetPackage(); pkg != "" { + enum += pkg + "." + } + enum += CamelCaseSlice(obj.TypeName()) + } + packed := "" + if field.Options != nil && field.Options.GetPacked() { + packed = ",packed" + } + fieldName := field.GetName() + name := fieldName + if *field.Type == descriptor.FieldDescriptorProto_TYPE_GROUP { + // We must use the type name for groups instead of + // the field name to preserve capitalization. + // type_name in FieldDescriptorProto is fully-qualified, + // but we only want the local part. + name = *field.TypeName + if i := strings.LastIndex(name, "."); i >= 0 { + name = name[i+1:] + } + } + if json := field.GetJsonName(); json != "" && json != name { + // TODO: escaping might be needed, in which case + // perhaps this should be in its own "json" tag. + name += ",json=" + json + } + name = ",name=" + name + if message.proto3() { + // We only need the extra tag for []byte fields; + // no need to add noise for the others. + if *field.Type == descriptor.FieldDescriptorProto_TYPE_BYTES { + name += ",proto3" + } + + } + oneof := "" + if field.OneofIndex != nil { + oneof = ",oneof" + } + return strconv.Quote(fmt.Sprintf("%s,%d,%s%s%s%s%s%s", + wiretype, + field.GetNumber(), + optrepreq, + packed, + name, + enum, + oneof, + defaultValue)) +} + +func needsStar(typ descriptor.FieldDescriptorProto_Type) bool { + switch typ { + case descriptor.FieldDescriptorProto_TYPE_GROUP: + return false + case descriptor.FieldDescriptorProto_TYPE_MESSAGE: + return false + case descriptor.FieldDescriptorProto_TYPE_BYTES: + return false + } + return true +} + +// TypeName is the printed name appropriate for an item. If the object is in the current file, +// TypeName drops the package name and underscores the rest. +// Otherwise the object is from another package; and the result is the underscored +// package name followed by the item name. +// The result always has an initial capital. +func (g *Generator) TypeName(obj Object) string { + return g.DefaultPackageName(obj) + CamelCaseSlice(obj.TypeName()) +} + +// TypeNameWithPackage is like TypeName, but always includes the package +// name even if the object is in our own package. +func (g *Generator) TypeNameWithPackage(obj Object) string { + return obj.PackageName() + CamelCaseSlice(obj.TypeName()) +} + +// GoType returns a string representing the type name, and the wire type +func (g *Generator) GoType(message *Descriptor, field *descriptor.FieldDescriptorProto) (typ string, wire string) { + // TODO: Options. + switch *field.Type { + case descriptor.FieldDescriptorProto_TYPE_DOUBLE: + typ, wire = "float64", "fixed64" + case descriptor.FieldDescriptorProto_TYPE_FLOAT: + typ, wire = "float32", "fixed32" + case descriptor.FieldDescriptorProto_TYPE_INT64: + typ, wire = "int64", "varint" + case descriptor.FieldDescriptorProto_TYPE_UINT64: + typ, wire = "uint64", "varint" + case descriptor.FieldDescriptorProto_TYPE_INT32: + typ, wire = "int32", "varint" + case descriptor.FieldDescriptorProto_TYPE_UINT32: + typ, wire = "uint32", "varint" + case descriptor.FieldDescriptorProto_TYPE_FIXED64: + typ, wire = "uint64", "fixed64" + case descriptor.FieldDescriptorProto_TYPE_FIXED32: + typ, wire = "uint32", "fixed32" + case descriptor.FieldDescriptorProto_TYPE_BOOL: + typ, wire = "bool", "varint" + case descriptor.FieldDescriptorProto_TYPE_STRING: + typ, wire = "string", "bytes" + case descriptor.FieldDescriptorProto_TYPE_GROUP: + desc := g.ObjectNamed(field.GetTypeName()) + typ, wire = "*"+g.TypeName(desc), "group" + case descriptor.FieldDescriptorProto_TYPE_MESSAGE: + desc := g.ObjectNamed(field.GetTypeName()) + typ, wire = "*"+g.TypeName(desc), "bytes" + case descriptor.FieldDescriptorProto_TYPE_BYTES: + typ, wire = "[]byte", "bytes" + case descriptor.FieldDescriptorProto_TYPE_ENUM: + desc := g.ObjectNamed(field.GetTypeName()) + typ, wire = g.TypeName(desc), "varint" + case descriptor.FieldDescriptorProto_TYPE_SFIXED32: + typ, wire = "int32", "fixed32" + case descriptor.FieldDescriptorProto_TYPE_SFIXED64: + typ, wire = "int64", "fixed64" + case descriptor.FieldDescriptorProto_TYPE_SINT32: + typ, wire = "int32", "zigzag32" + case descriptor.FieldDescriptorProto_TYPE_SINT64: + typ, wire = "int64", "zigzag64" + default: + g.Fail("unknown type for", field.GetName()) + } + if isRepeated(field) { + typ = "[]" + typ + } else if message != nil && message.proto3() { + return + } else if field.OneofIndex != nil && message != nil { + return + } else if needsStar(*field.Type) { + typ = "*" + typ + } + return +} + +func (g *Generator) RecordTypeUse(t string) { + if obj, ok := g.typeNameToObject[t]; ok { + // Call ObjectNamed to get the true object to record the use. + obj = g.ObjectNamed(t) + g.usedPackages[obj.PackageName()] = true + } +} + +// Method names that may be generated. Fields with these names get an +// underscore appended. Any change to this set is a potential incompatible +// API change because it changes generated field names. +var methodNames = [...]string{ + "Reset", + "String", + "ProtoMessage", + "Marshal", + "Unmarshal", + "ExtensionRangeArray", + "ExtensionMap", + "Descriptor", +} + +// Names of messages in the `google.protobuf` package for which +// we will generate XXX_WellKnownType methods. +var wellKnownTypes = map[string]bool{ + "Any": true, + "Duration": true, + "Empty": true, + "Struct": true, + "Timestamp": true, + + "Value": true, + "ListValue": true, + "DoubleValue": true, + "FloatValue": true, + "Int64Value": true, + "UInt64Value": true, + "Int32Value": true, + "UInt32Value": true, + "BoolValue": true, + "StringValue": true, + "BytesValue": true, +} + +// Generate the type and default constant definitions for this Descriptor. +func (g *Generator) generateMessage(message *Descriptor) { + // The full type name + typeName := message.TypeName() + // The full type name, CamelCased. + ccTypeName := CamelCaseSlice(typeName) + + usedNames := make(map[string]bool) + for _, n := range methodNames { + usedNames[n] = true + } + fieldNames := make(map[*descriptor.FieldDescriptorProto]string) + fieldGetterNames := make(map[*descriptor.FieldDescriptorProto]string) + fieldTypes := make(map[*descriptor.FieldDescriptorProto]string) + mapFieldTypes := make(map[*descriptor.FieldDescriptorProto]string) + + oneofFieldName := make(map[int32]string) // indexed by oneof_index field of FieldDescriptorProto + oneofDisc := make(map[int32]string) // name of discriminator method + oneofTypeName := make(map[*descriptor.FieldDescriptorProto]string) // without star + oneofInsertPoints := make(map[int32]int) // oneof_index => offset of g.Buffer + + g.PrintComments(message.path) + g.P("type ", ccTypeName, " struct {") + g.In() + + // allocNames finds a conflict-free variation of the given strings, + // consistently mutating their suffixes. + // It returns the same number of strings. + allocNames := func(ns ...string) []string { + Loop: + for { + for _, n := range ns { + if usedNames[n] { + for i := range ns { + ns[i] += "_" + } + continue Loop + } + } + for _, n := range ns { + usedNames[n] = true + } + return ns + } + } + + for i, field := range message.Field { + // Allocate the getter and the field at the same time so name + // collisions create field/method consistent names. + // TODO: This allocation occurs based on the order of the fields + // in the proto file, meaning that a change in the field + // ordering can change generated Method/Field names. + base := CamelCase(*field.Name) + ns := allocNames(base, "Get"+base) + fieldName, fieldGetterName := ns[0], ns[1] + typename, wiretype := g.GoType(message, field) + jsonName := *field.Name + tag := fmt.Sprintf("protobuf:%s json:%q", g.goTag(message, field, wiretype), jsonName+",omitempty") + + fieldNames[field] = fieldName + fieldGetterNames[field] = fieldGetterName + + oneof := field.OneofIndex != nil + if oneof && oneofFieldName[*field.OneofIndex] == "" { + odp := message.OneofDecl[int(*field.OneofIndex)] + fname := allocNames(CamelCase(odp.GetName()))[0] + + // This is the first field of a oneof we haven't seen before. + // Generate the union field. + com := g.PrintComments(fmt.Sprintf("%s,%d,%d", message.path, messageOneofPath, *field.OneofIndex)) + if com { + g.P("//") + } + g.P("// Types that are valid to be assigned to ", fname, ":") + // Generate the rest of this comment later, + // when we've computed any disambiguation. + oneofInsertPoints[*field.OneofIndex] = g.Buffer.Len() + + dname := "is" + ccTypeName + "_" + fname + oneofFieldName[*field.OneofIndex] = fname + oneofDisc[*field.OneofIndex] = dname + tag := `protobuf_oneof:"` + odp.GetName() + `"` + g.P(fname, " ", dname, " `", tag, "`") + } + + if *field.Type == descriptor.FieldDescriptorProto_TYPE_MESSAGE { + desc := g.ObjectNamed(field.GetTypeName()) + if d, ok := desc.(*Descriptor); ok && d.GetOptions().GetMapEntry() { + // Figure out the Go types and tags for the key and value types. + keyField, valField := d.Field[0], d.Field[1] + keyType, keyWire := g.GoType(d, keyField) + valType, valWire := g.GoType(d, valField) + keyTag, valTag := g.goTag(d, keyField, keyWire), g.goTag(d, valField, valWire) + + // We don't use stars, except for message-typed values. + // Message and enum types are the only two possibly foreign types used in maps, + // so record their use. They are not permitted as map keys. + keyType = strings.TrimPrefix(keyType, "*") + switch *valField.Type { + case descriptor.FieldDescriptorProto_TYPE_ENUM: + valType = strings.TrimPrefix(valType, "*") + g.RecordTypeUse(valField.GetTypeName()) + case descriptor.FieldDescriptorProto_TYPE_MESSAGE: + g.RecordTypeUse(valField.GetTypeName()) + default: + valType = strings.TrimPrefix(valType, "*") + } + + typename = fmt.Sprintf("map[%s]%s", keyType, valType) + mapFieldTypes[field] = typename // record for the getter generation + + tag += fmt.Sprintf(" protobuf_key:%s protobuf_val:%s", keyTag, valTag) + } + } + + fieldTypes[field] = typename + + if oneof { + tname := ccTypeName + "_" + fieldName + // It is possible for this to collide with a message or enum + // nested in this message. Check for collisions. + for { + ok := true + for _, desc := range message.nested { + if CamelCaseSlice(desc.TypeName()) == tname { + ok = false + break + } + } + for _, enum := range message.enums { + if CamelCaseSlice(enum.TypeName()) == tname { + ok = false + break + } + } + if !ok { + tname += "_" + continue + } + break + } + + oneofTypeName[field] = tname + continue + } + + g.PrintComments(fmt.Sprintf("%s,%d,%d", message.path, messageFieldPath, i)) + g.P(fieldName, "\t", typename, "\t`", tag, "`") + g.RecordTypeUse(field.GetTypeName()) + } + if len(message.ExtensionRange) > 0 { + g.P(g.Pkg["proto"], ".XXX_InternalExtensions `json:\"-\"`") + } + if !message.proto3() { + g.P("XXX_unrecognized\t[]byte `json:\"-\"`") + } + g.Out() + g.P("}") + + // Update g.Buffer to list valid oneof types. + // We do this down here, after we've disambiguated the oneof type names. + // We go in reverse order of insertion point to avoid invalidating offsets. + for oi := int32(len(message.OneofDecl)); oi >= 0; oi-- { + ip := oneofInsertPoints[oi] + all := g.Buffer.Bytes() + rem := all[ip:] + g.Buffer = bytes.NewBuffer(all[:ip:ip]) // set cap so we don't scribble on rem + for _, field := range message.Field { + if field.OneofIndex == nil || *field.OneofIndex != oi { + continue + } + g.P("//\t*", oneofTypeName[field]) + } + g.Buffer.Write(rem) + } + + // Reset, String and ProtoMessage methods. + g.P("func (m *", ccTypeName, ") Reset() { *m = ", ccTypeName, "{} }") + g.P("func (m *", ccTypeName, ") String() string { return ", g.Pkg["proto"], ".CompactTextString(m) }") + g.P("func (*", ccTypeName, ") ProtoMessage() {}") + var indexes []string + for m := message; m != nil; m = m.parent { + indexes = append([]string{strconv.Itoa(m.index)}, indexes...) + } + g.P("func (*", ccTypeName, ") Descriptor() ([]byte, []int) { return ", g.file.VarName(), ", []int{", strings.Join(indexes, ", "), "} }") + // TODO: Revisit the decision to use a XXX_WellKnownType method + // if we change proto.MessageName to work with multiple equivalents. + if message.file.GetPackage() == "google.protobuf" && wellKnownTypes[message.GetName()] { + g.P("func (*", ccTypeName, `) XXX_WellKnownType() string { return "`, message.GetName(), `" }`) + } + + // Extension support methods + var hasExtensions, isMessageSet bool + if len(message.ExtensionRange) > 0 { + hasExtensions = true + // message_set_wire_format only makes sense when extensions are defined. + if opts := message.Options; opts != nil && opts.GetMessageSetWireFormat() { + isMessageSet = true + g.P() + g.P("func (m *", ccTypeName, ") Marshal() ([]byte, error) {") + g.In() + g.P("return ", g.Pkg["proto"], ".MarshalMessageSet(&m.XXX_InternalExtensions)") + g.Out() + g.P("}") + g.P("func (m *", ccTypeName, ") Unmarshal(buf []byte) error {") + g.In() + g.P("return ", g.Pkg["proto"], ".UnmarshalMessageSet(buf, &m.XXX_InternalExtensions)") + g.Out() + g.P("}") + g.P("func (m *", ccTypeName, ") MarshalJSON() ([]byte, error) {") + g.In() + g.P("return ", g.Pkg["proto"], ".MarshalMessageSetJSON(&m.XXX_InternalExtensions)") + g.Out() + g.P("}") + g.P("func (m *", ccTypeName, ") UnmarshalJSON(buf []byte) error {") + g.In() + g.P("return ", g.Pkg["proto"], ".UnmarshalMessageSetJSON(buf, &m.XXX_InternalExtensions)") + g.Out() + g.P("}") + g.P("// ensure ", ccTypeName, " satisfies proto.Marshaler and proto.Unmarshaler") + g.P("var _ ", g.Pkg["proto"], ".Marshaler = (*", ccTypeName, ")(nil)") + g.P("var _ ", g.Pkg["proto"], ".Unmarshaler = (*", ccTypeName, ")(nil)") + } + + g.P() + g.P("var extRange_", ccTypeName, " = []", g.Pkg["proto"], ".ExtensionRange{") + g.In() + for _, r := range message.ExtensionRange { + end := fmt.Sprint(*r.End - 1) // make range inclusive on both ends + g.P("{", r.Start, ", ", end, "},") + } + g.Out() + g.P("}") + g.P("func (*", ccTypeName, ") ExtensionRangeArray() []", g.Pkg["proto"], ".ExtensionRange {") + g.In() + g.P("return extRange_", ccTypeName) + g.Out() + g.P("}") + } + + // Default constants + defNames := make(map[*descriptor.FieldDescriptorProto]string) + for _, field := range message.Field { + def := field.GetDefaultValue() + if def == "" { + continue + } + fieldname := "Default_" + ccTypeName + "_" + CamelCase(*field.Name) + defNames[field] = fieldname + typename, _ := g.GoType(message, field) + if typename[0] == '*' { + typename = typename[1:] + } + kind := "const " + switch { + case typename == "bool": + case typename == "string": + def = strconv.Quote(def) + case typename == "[]byte": + def = "[]byte(" + strconv.Quote(def) + ")" + kind = "var " + case def == "inf", def == "-inf", def == "nan": + // These names are known to, and defined by, the protocol language. + switch def { + case "inf": + def = "math.Inf(1)" + case "-inf": + def = "math.Inf(-1)" + case "nan": + def = "math.NaN()" + } + if *field.Type == descriptor.FieldDescriptorProto_TYPE_FLOAT { + def = "float32(" + def + ")" + } + kind = "var " + case *field.Type == descriptor.FieldDescriptorProto_TYPE_ENUM: + // Must be an enum. Need to construct the prefixed name. + obj := g.ObjectNamed(field.GetTypeName()) + var enum *EnumDescriptor + if id, ok := obj.(*ImportedDescriptor); ok { + // The enum type has been publicly imported. + enum, _ = id.o.(*EnumDescriptor) + } else { + enum, _ = obj.(*EnumDescriptor) + } + if enum == nil { + log.Printf("don't know how to generate constant for %s", fieldname) + continue + } + def = g.DefaultPackageName(obj) + enum.prefix() + def + } + g.P(kind, fieldname, " ", typename, " = ", def) + g.file.addExport(message, constOrVarSymbol{fieldname, kind, ""}) + } + g.P() + + // Oneof per-field types, discriminants and getters. + // + // Generate unexported named types for the discriminant interfaces. + // We shouldn't have to do this, but there was (~19 Aug 2015) a compiler/linker bug + // that was triggered by using anonymous interfaces here. + // TODO: Revisit this and consider reverting back to anonymous interfaces. + for oi := range message.OneofDecl { + dname := oneofDisc[int32(oi)] + g.P("type ", dname, " interface { ", dname, "() }") + } + g.P() + for _, field := range message.Field { + if field.OneofIndex == nil { + continue + } + _, wiretype := g.GoType(message, field) + tag := "protobuf:" + g.goTag(message, field, wiretype) + g.P("type ", oneofTypeName[field], " struct{ ", fieldNames[field], " ", fieldTypes[field], " `", tag, "` }") + g.RecordTypeUse(field.GetTypeName()) + } + g.P() + for _, field := range message.Field { + if field.OneofIndex == nil { + continue + } + g.P("func (*", oneofTypeName[field], ") ", oneofDisc[*field.OneofIndex], "() {}") + } + g.P() + for oi := range message.OneofDecl { + fname := oneofFieldName[int32(oi)] + g.P("func (m *", ccTypeName, ") Get", fname, "() ", oneofDisc[int32(oi)], " {") + g.P("if m != nil { return m.", fname, " }") + g.P("return nil") + g.P("}") + } + g.P() + + // Field getters + var getters []getterSymbol + for _, field := range message.Field { + oneof := field.OneofIndex != nil + + fname := fieldNames[field] + typename, _ := g.GoType(message, field) + if t, ok := mapFieldTypes[field]; ok { + typename = t + } + mname := fieldGetterNames[field] + star := "" + if needsStar(*field.Type) && typename[0] == '*' { + typename = typename[1:] + star = "*" + } + + // In proto3, only generate getters for message fields and oneof fields. + if message.proto3() && *field.Type != descriptor.FieldDescriptorProto_TYPE_MESSAGE && !oneof { + continue + } + + // Only export getter symbols for basic types, + // and for messages and enums in the same package. + // Groups are not exported. + // Foreign types can't be hoisted through a public import because + // the importer may not already be importing the defining .proto. + // As an example, imagine we have an import tree like this: + // A.proto -> B.proto -> C.proto + // If A publicly imports B, we need to generate the getters from B in A's output, + // but if one such getter returns something from C then we cannot do that + // because A is not importing C already. + var getter, genType bool + switch *field.Type { + case descriptor.FieldDescriptorProto_TYPE_GROUP: + getter = false + case descriptor.FieldDescriptorProto_TYPE_MESSAGE, descriptor.FieldDescriptorProto_TYPE_ENUM: + // Only export getter if its return type is in this package. + getter = g.ObjectNamed(field.GetTypeName()).PackageName() == message.PackageName() + genType = true + default: + getter = true + } + if getter { + getters = append(getters, getterSymbol{ + name: mname, + typ: typename, + typeName: field.GetTypeName(), + genType: genType, + }) + } + + g.P("func (m *", ccTypeName, ") "+mname+"() "+typename+" {") + g.In() + def, hasDef := defNames[field] + typeDefaultIsNil := false // whether this field type's default value is a literal nil unless specified + switch *field.Type { + case descriptor.FieldDescriptorProto_TYPE_BYTES: + typeDefaultIsNil = !hasDef + case descriptor.FieldDescriptorProto_TYPE_GROUP, descriptor.FieldDescriptorProto_TYPE_MESSAGE: + typeDefaultIsNil = true + } + if isRepeated(field) { + typeDefaultIsNil = true + } + if typeDefaultIsNil && !oneof { + // A bytes field with no explicit default needs less generated code, + // as does a message or group field, or a repeated field. + g.P("if m != nil {") + g.In() + g.P("return m." + fname) + g.Out() + g.P("}") + g.P("return nil") + g.Out() + g.P("}") + g.P() + continue + } + if !oneof { + g.P("if m != nil && m." + fname + " != nil {") + g.In() + g.P("return " + star + "m." + fname) + g.Out() + g.P("}") + } else { + uname := oneofFieldName[*field.OneofIndex] + tname := oneofTypeName[field] + g.P("if x, ok := m.Get", uname, "().(*", tname, "); ok {") + g.P("return x.", fname) + g.P("}") + } + if hasDef { + if *field.Type != descriptor.FieldDescriptorProto_TYPE_BYTES { + g.P("return " + def) + } else { + // The default is a []byte var. + // Make a copy when returning it to be safe. + g.P("return append([]byte(nil), ", def, "...)") + } + } else { + switch *field.Type { + case descriptor.FieldDescriptorProto_TYPE_BOOL: + g.P("return false") + case descriptor.FieldDescriptorProto_TYPE_STRING: + g.P(`return ""`) + case descriptor.FieldDescriptorProto_TYPE_GROUP, + descriptor.FieldDescriptorProto_TYPE_MESSAGE, + descriptor.FieldDescriptorProto_TYPE_BYTES: + // This is only possible for oneof fields. + g.P("return nil") + case descriptor.FieldDescriptorProto_TYPE_ENUM: + // The default default for an enum is the first value in the enum, + // not zero. + obj := g.ObjectNamed(field.GetTypeName()) + var enum *EnumDescriptor + if id, ok := obj.(*ImportedDescriptor); ok { + // The enum type has been publicly imported. + enum, _ = id.o.(*EnumDescriptor) + } else { + enum, _ = obj.(*EnumDescriptor) + } + if enum == nil { + log.Printf("don't know how to generate getter for %s", field.GetName()) + continue + } + if len(enum.Value) == 0 { + g.P("return 0 // empty enum") + } else { + first := enum.Value[0].GetName() + g.P("return ", g.DefaultPackageName(obj)+enum.prefix()+first) + } + default: + g.P("return 0") + } + } + g.Out() + g.P("}") + g.P() + } + + if !message.group { + ms := &messageSymbol{ + sym: ccTypeName, + hasExtensions: hasExtensions, + isMessageSet: isMessageSet, + hasOneof: len(message.OneofDecl) > 0, + getters: getters, + } + g.file.addExport(message, ms) + } + + // Oneof functions + if len(message.OneofDecl) > 0 { + fieldWire := make(map[*descriptor.FieldDescriptorProto]string) + + // method + enc := "_" + ccTypeName + "_OneofMarshaler" + dec := "_" + ccTypeName + "_OneofUnmarshaler" + size := "_" + ccTypeName + "_OneofSizer" + encSig := "(msg " + g.Pkg["proto"] + ".Message, b *" + g.Pkg["proto"] + ".Buffer) error" + decSig := "(msg " + g.Pkg["proto"] + ".Message, tag, wire int, b *" + g.Pkg["proto"] + ".Buffer) (bool, error)" + sizeSig := "(msg " + g.Pkg["proto"] + ".Message) (n int)" + + g.P("// XXX_OneofFuncs is for the internal use of the proto package.") + g.P("func (*", ccTypeName, ") XXX_OneofFuncs() (func", encSig, ", func", decSig, ", func", sizeSig, ", []interface{}) {") + g.P("return ", enc, ", ", dec, ", ", size, ", []interface{}{") + for _, field := range message.Field { + if field.OneofIndex == nil { + continue + } + g.P("(*", oneofTypeName[field], ")(nil),") + } + g.P("}") + g.P("}") + g.P() + + // marshaler + g.P("func ", enc, encSig, " {") + g.P("m := msg.(*", ccTypeName, ")") + for oi, odp := range message.OneofDecl { + g.P("// ", odp.GetName()) + fname := oneofFieldName[int32(oi)] + g.P("switch x := m.", fname, ".(type) {") + for _, field := range message.Field { + if field.OneofIndex == nil || int(*field.OneofIndex) != oi { + continue + } + g.P("case *", oneofTypeName[field], ":") + var wire, pre, post string + val := "x." + fieldNames[field] // overridden for TYPE_BOOL + canFail := false // only TYPE_MESSAGE and TYPE_GROUP can fail + switch *field.Type { + case descriptor.FieldDescriptorProto_TYPE_DOUBLE: + wire = "WireFixed64" + pre = "b.EncodeFixed64(" + g.Pkg["math"] + ".Float64bits(" + post = "))" + case descriptor.FieldDescriptorProto_TYPE_FLOAT: + wire = "WireFixed32" + pre = "b.EncodeFixed32(uint64(" + g.Pkg["math"] + ".Float32bits(" + post = ")))" + case descriptor.FieldDescriptorProto_TYPE_INT64, + descriptor.FieldDescriptorProto_TYPE_UINT64: + wire = "WireVarint" + pre, post = "b.EncodeVarint(uint64(", "))" + case descriptor.FieldDescriptorProto_TYPE_INT32, + descriptor.FieldDescriptorProto_TYPE_UINT32, + descriptor.FieldDescriptorProto_TYPE_ENUM: + wire = "WireVarint" + pre, post = "b.EncodeVarint(uint64(", "))" + case descriptor.FieldDescriptorProto_TYPE_FIXED64, + descriptor.FieldDescriptorProto_TYPE_SFIXED64: + wire = "WireFixed64" + pre, post = "b.EncodeFixed64(uint64(", "))" + case descriptor.FieldDescriptorProto_TYPE_FIXED32, + descriptor.FieldDescriptorProto_TYPE_SFIXED32: + wire = "WireFixed32" + pre, post = "b.EncodeFixed32(uint64(", "))" + case descriptor.FieldDescriptorProto_TYPE_BOOL: + // bool needs special handling. + g.P("t := uint64(0)") + g.P("if ", val, " { t = 1 }") + val = "t" + wire = "WireVarint" + pre, post = "b.EncodeVarint(", ")" + case descriptor.FieldDescriptorProto_TYPE_STRING: + wire = "WireBytes" + pre, post = "b.EncodeStringBytes(", ")" + case descriptor.FieldDescriptorProto_TYPE_GROUP: + wire = "WireStartGroup" + pre, post = "b.Marshal(", ")" + canFail = true + case descriptor.FieldDescriptorProto_TYPE_MESSAGE: + wire = "WireBytes" + pre, post = "b.EncodeMessage(", ")" + canFail = true + case descriptor.FieldDescriptorProto_TYPE_BYTES: + wire = "WireBytes" + pre, post = "b.EncodeRawBytes(", ")" + case descriptor.FieldDescriptorProto_TYPE_SINT32: + wire = "WireVarint" + pre, post = "b.EncodeZigzag32(uint64(", "))" + case descriptor.FieldDescriptorProto_TYPE_SINT64: + wire = "WireVarint" + pre, post = "b.EncodeZigzag64(uint64(", "))" + default: + g.Fail("unhandled oneof field type ", field.Type.String()) + } + fieldWire[field] = wire + g.P("b.EncodeVarint(", field.Number, "<<3|", g.Pkg["proto"], ".", wire, ")") + if !canFail { + g.P(pre, val, post) + } else { + g.P("if err := ", pre, val, post, "; err != nil {") + g.P("return err") + g.P("}") + } + if *field.Type == descriptor.FieldDescriptorProto_TYPE_GROUP { + g.P("b.EncodeVarint(", field.Number, "<<3|", g.Pkg["proto"], ".WireEndGroup)") + } + } + g.P("case nil:") + g.P("default: return ", g.Pkg["fmt"], `.Errorf("`, ccTypeName, ".", fname, ` has unexpected type %T", x)`) + g.P("}") + } + g.P("return nil") + g.P("}") + g.P() + + // unmarshaler + g.P("func ", dec, decSig, " {") + g.P("m := msg.(*", ccTypeName, ")") + g.P("switch tag {") + for _, field := range message.Field { + if field.OneofIndex == nil { + continue + } + odp := message.OneofDecl[int(*field.OneofIndex)] + g.P("case ", field.Number, ": // ", odp.GetName(), ".", *field.Name) + g.P("if wire != ", g.Pkg["proto"], ".", fieldWire[field], " {") + g.P("return true, ", g.Pkg["proto"], ".ErrInternalBadWireType") + g.P("}") + lhs := "x, err" // overridden for TYPE_MESSAGE and TYPE_GROUP + var dec, cast, cast2 string + switch *field.Type { + case descriptor.FieldDescriptorProto_TYPE_DOUBLE: + dec, cast = "b.DecodeFixed64()", g.Pkg["math"]+".Float64frombits" + case descriptor.FieldDescriptorProto_TYPE_FLOAT: + dec, cast, cast2 = "b.DecodeFixed32()", "uint32", g.Pkg["math"]+".Float32frombits" + case descriptor.FieldDescriptorProto_TYPE_INT64: + dec, cast = "b.DecodeVarint()", "int64" + case descriptor.FieldDescriptorProto_TYPE_UINT64: + dec = "b.DecodeVarint()" + case descriptor.FieldDescriptorProto_TYPE_INT32: + dec, cast = "b.DecodeVarint()", "int32" + case descriptor.FieldDescriptorProto_TYPE_FIXED64: + dec = "b.DecodeFixed64()" + case descriptor.FieldDescriptorProto_TYPE_FIXED32: + dec, cast = "b.DecodeFixed32()", "uint32" + case descriptor.FieldDescriptorProto_TYPE_BOOL: + dec = "b.DecodeVarint()" + // handled specially below + case descriptor.FieldDescriptorProto_TYPE_STRING: + dec = "b.DecodeStringBytes()" + case descriptor.FieldDescriptorProto_TYPE_GROUP: + g.P("msg := new(", fieldTypes[field][1:], ")") // drop star + lhs = "err" + dec = "b.DecodeGroup(msg)" + // handled specially below + case descriptor.FieldDescriptorProto_TYPE_MESSAGE: + g.P("msg := new(", fieldTypes[field][1:], ")") // drop star + lhs = "err" + dec = "b.DecodeMessage(msg)" + // handled specially below + case descriptor.FieldDescriptorProto_TYPE_BYTES: + dec = "b.DecodeRawBytes(true)" + case descriptor.FieldDescriptorProto_TYPE_UINT32: + dec, cast = "b.DecodeVarint()", "uint32" + case descriptor.FieldDescriptorProto_TYPE_ENUM: + dec, cast = "b.DecodeVarint()", fieldTypes[field] + case descriptor.FieldDescriptorProto_TYPE_SFIXED32: + dec, cast = "b.DecodeFixed32()", "int32" + case descriptor.FieldDescriptorProto_TYPE_SFIXED64: + dec, cast = "b.DecodeFixed64()", "int64" + case descriptor.FieldDescriptorProto_TYPE_SINT32: + dec, cast = "b.DecodeZigzag32()", "int32" + case descriptor.FieldDescriptorProto_TYPE_SINT64: + dec, cast = "b.DecodeZigzag64()", "int64" + default: + g.Fail("unhandled oneof field type ", field.Type.String()) + } + g.P(lhs, " := ", dec) + val := "x" + if cast != "" { + val = cast + "(" + val + ")" + } + if cast2 != "" { + val = cast2 + "(" + val + ")" + } + switch *field.Type { + case descriptor.FieldDescriptorProto_TYPE_BOOL: + val += " != 0" + case descriptor.FieldDescriptorProto_TYPE_GROUP, + descriptor.FieldDescriptorProto_TYPE_MESSAGE: + val = "msg" + } + g.P("m.", oneofFieldName[*field.OneofIndex], " = &", oneofTypeName[field], "{", val, "}") + g.P("return true, err") + } + g.P("default: return false, nil") + g.P("}") + g.P("}") + g.P() + + // sizer + g.P("func ", size, sizeSig, " {") + g.P("m := msg.(*", ccTypeName, ")") + for oi, odp := range message.OneofDecl { + g.P("// ", odp.GetName()) + fname := oneofFieldName[int32(oi)] + g.P("switch x := m.", fname, ".(type) {") + for _, field := range message.Field { + if field.OneofIndex == nil || int(*field.OneofIndex) != oi { + continue + } + g.P("case *", oneofTypeName[field], ":") + val := "x." + fieldNames[field] + var wire, varint, fixed string + switch *field.Type { + case descriptor.FieldDescriptorProto_TYPE_DOUBLE: + wire = "WireFixed64" + fixed = "8" + case descriptor.FieldDescriptorProto_TYPE_FLOAT: + wire = "WireFixed32" + fixed = "4" + case descriptor.FieldDescriptorProto_TYPE_INT64, + descriptor.FieldDescriptorProto_TYPE_UINT64, + descriptor.FieldDescriptorProto_TYPE_INT32, + descriptor.FieldDescriptorProto_TYPE_UINT32, + descriptor.FieldDescriptorProto_TYPE_ENUM: + wire = "WireVarint" + varint = val + case descriptor.FieldDescriptorProto_TYPE_FIXED64, + descriptor.FieldDescriptorProto_TYPE_SFIXED64: + wire = "WireFixed64" + fixed = "8" + case descriptor.FieldDescriptorProto_TYPE_FIXED32, + descriptor.FieldDescriptorProto_TYPE_SFIXED32: + wire = "WireFixed32" + fixed = "4" + case descriptor.FieldDescriptorProto_TYPE_BOOL: + wire = "WireVarint" + fixed = "1" + case descriptor.FieldDescriptorProto_TYPE_STRING: + wire = "WireBytes" + fixed = "len(" + val + ")" + varint = fixed + case descriptor.FieldDescriptorProto_TYPE_GROUP: + wire = "WireStartGroup" + fixed = g.Pkg["proto"] + ".Size(" + val + ")" + case descriptor.FieldDescriptorProto_TYPE_MESSAGE: + wire = "WireBytes" + g.P("s := ", g.Pkg["proto"], ".Size(", val, ")") + fixed = "s" + varint = fixed + case descriptor.FieldDescriptorProto_TYPE_BYTES: + wire = "WireBytes" + fixed = "len(" + val + ")" + varint = fixed + case descriptor.FieldDescriptorProto_TYPE_SINT32: + wire = "WireVarint" + varint = "(uint32(" + val + ") << 1) ^ uint32((int32(" + val + ") >> 31))" + case descriptor.FieldDescriptorProto_TYPE_SINT64: + wire = "WireVarint" + varint = "uint64(" + val + " << 1) ^ uint64((int64(" + val + ") >> 63))" + default: + g.Fail("unhandled oneof field type ", field.Type.String()) + } + g.P("n += ", g.Pkg["proto"], ".SizeVarint(", field.Number, "<<3|", g.Pkg["proto"], ".", wire, ")") + if varint != "" { + g.P("n += ", g.Pkg["proto"], ".SizeVarint(uint64(", varint, "))") + } + if fixed != "" { + g.P("n += ", fixed) + } + if *field.Type == descriptor.FieldDescriptorProto_TYPE_GROUP { + g.P("n += ", g.Pkg["proto"], ".SizeVarint(", field.Number, "<<3|", g.Pkg["proto"], ".WireEndGroup)") + } + } + g.P("case nil:") + g.P("default:") + g.P("panic(", g.Pkg["fmt"], ".Sprintf(\"proto: unexpected type %T in oneof\", x))") + g.P("}") + } + g.P("return n") + g.P("}") + g.P() + } + + for _, ext := range message.ext { + g.generateExtension(ext) + } + + fullName := strings.Join(message.TypeName(), ".") + if g.file.Package != nil { + fullName = *g.file.Package + "." + fullName + } + + g.addInitf("%s.RegisterType((*%s)(nil), %q)", g.Pkg["proto"], ccTypeName, fullName) +} + +func (g *Generator) generateExtension(ext *ExtensionDescriptor) { + ccTypeName := ext.DescName() + + extObj := g.ObjectNamed(*ext.Extendee) + var extDesc *Descriptor + if id, ok := extObj.(*ImportedDescriptor); ok { + // This is extending a publicly imported message. + // We need the underlying type for goTag. + extDesc = id.o.(*Descriptor) + } else { + extDesc = extObj.(*Descriptor) + } + extendedType := "*" + g.TypeName(extObj) // always use the original + field := ext.FieldDescriptorProto + fieldType, wireType := g.GoType(ext.parent, field) + tag := g.goTag(extDesc, field, wireType) + g.RecordTypeUse(*ext.Extendee) + if n := ext.FieldDescriptorProto.TypeName; n != nil { + // foreign extension type + g.RecordTypeUse(*n) + } + + typeName := ext.TypeName() + + // Special case for proto2 message sets: If this extension is extending + // proto2_bridge.MessageSet, and its final name component is "message_set_extension", + // then drop that last component. + mset := false + if extendedType == "*proto2_bridge.MessageSet" && typeName[len(typeName)-1] == "message_set_extension" { + typeName = typeName[:len(typeName)-1] + mset = true + } + + // For text formatting, the package must be exactly what the .proto file declares, + // ignoring overrides such as the go_package option, and with no dot/underscore mapping. + extName := strings.Join(typeName, ".") + if g.file.Package != nil { + extName = *g.file.Package + "." + extName + } + + g.P("var ", ccTypeName, " = &", g.Pkg["proto"], ".ExtensionDesc{") + g.In() + g.P("ExtendedType: (", extendedType, ")(nil),") + g.P("ExtensionType: (", fieldType, ")(nil),") + g.P("Field: ", field.Number, ",") + g.P(`Name: "`, extName, `",`) + g.P("Tag: ", tag, ",") + + g.Out() + g.P("}") + g.P() + + if mset { + // Generate a bit more code to register with message_set.go. + g.addInitf("%s.RegisterMessageSetType((%s)(nil), %d, %q)", g.Pkg["proto"], fieldType, *field.Number, extName) + } + + g.file.addExport(ext, constOrVarSymbol{ccTypeName, "var", ""}) +} + +func (g *Generator) generateInitFunction() { + for _, enum := range g.file.enum { + g.generateEnumRegistration(enum) + } + for _, d := range g.file.desc { + for _, ext := range d.ext { + g.generateExtensionRegistration(ext) + } + } + for _, ext := range g.file.ext { + g.generateExtensionRegistration(ext) + } + if len(g.init) == 0 { + return + } + g.P("func init() {") + g.In() + for _, l := range g.init { + g.P(l) + } + g.Out() + g.P("}") + g.init = nil +} + +func (g *Generator) generateFileDescriptor(file *FileDescriptor) { + // Make a copy and trim source_code_info data. + // TODO: Trim this more when we know exactly what we need. + pb := proto.Clone(file.FileDescriptorProto).(*descriptor.FileDescriptorProto) + pb.SourceCodeInfo = nil + + b, err := proto.Marshal(pb) + if err != nil { + g.Fail(err.Error()) + } + + var buf bytes.Buffer + w, _ := gzip.NewWriterLevel(&buf, gzip.BestCompression) + w.Write(b) + w.Close() + b = buf.Bytes() + + v := file.VarName() + g.P() + g.P("func init() { ", g.Pkg["proto"], ".RegisterFile(", strconv.Quote(*file.Name), ", ", v, ") }") + g.P("var ", v, " = []byte{") + g.In() + g.P("// ", len(b), " bytes of a gzipped FileDescriptorProto") + for len(b) > 0 { + n := 16 + if n > len(b) { + n = len(b) + } + + s := "" + for _, c := range b[:n] { + s += fmt.Sprintf("0x%02x,", c) + } + g.P(s) + + b = b[n:] + } + g.Out() + g.P("}") +} + +func (g *Generator) generateEnumRegistration(enum *EnumDescriptor) { + // // We always print the full (proto-world) package name here. + pkg := enum.File().GetPackage() + if pkg != "" { + pkg += "." + } + // The full type name + typeName := enum.TypeName() + // The full type name, CamelCased. + ccTypeName := CamelCaseSlice(typeName) + g.addInitf("%s.RegisterEnum(%q, %[3]s_name, %[3]s_value)", g.Pkg["proto"], pkg+ccTypeName, ccTypeName) +} + +func (g *Generator) generateExtensionRegistration(ext *ExtensionDescriptor) { + g.addInitf("%s.RegisterExtension(%s)", g.Pkg["proto"], ext.DescName()) +} + +// And now lots of helper functions. + +// Is c an ASCII lower-case letter? +func isASCIILower(c byte) bool { + return 'a' <= c && c <= 'z' +} + +// Is c an ASCII digit? +func isASCIIDigit(c byte) bool { + return '0' <= c && c <= '9' +} + +// CamelCase returns the CamelCased name. +// If there is an interior underscore followed by a lower case letter, +// drop the underscore and convert the letter to upper case. +// There is a remote possibility of this rewrite causing a name collision, +// but it's so remote we're prepared to pretend it's nonexistent - since the +// C++ generator lowercases names, it's extremely unlikely to have two fields +// with different capitalizations. +// In short, _my_field_name_2 becomes XMyFieldName_2. +func CamelCase(s string) string { + if s == "" { + return "" + } + t := make([]byte, 0, 32) + i := 0 + if s[0] == '_' { + // Need a capital letter; drop the '_'. + t = append(t, 'X') + i++ + } + // Invariant: if the next letter is lower case, it must be converted + // to upper case. + // That is, we process a word at a time, where words are marked by _ or + // upper case letter. Digits are treated as words. + for ; i < len(s); i++ { + c := s[i] + if c == '_' && i+1 < len(s) && isASCIILower(s[i+1]) { + continue // Skip the underscore in s. + } + if isASCIIDigit(c) { + t = append(t, c) + continue + } + // Assume we have a letter now - if not, it's a bogus identifier. + // The next word is a sequence of characters that must start upper case. + if isASCIILower(c) { + c ^= ' ' // Make it a capital letter. + } + t = append(t, c) // Guaranteed not lower case. + // Accept lower case sequence that follows. + for i+1 < len(s) && isASCIILower(s[i+1]) { + i++ + t = append(t, s[i]) + } + } + return string(t) +} + +// CamelCaseSlice is like CamelCase, but the argument is a slice of strings to +// be joined with "_". +func CamelCaseSlice(elem []string) string { return CamelCase(strings.Join(elem, "_")) } + +// dottedSlice turns a sliced name into a dotted name. +func dottedSlice(elem []string) string { return strings.Join(elem, ".") } + +// Is this field optional? +func isOptional(field *descriptor.FieldDescriptorProto) bool { + return field.Label != nil && *field.Label == descriptor.FieldDescriptorProto_LABEL_OPTIONAL +} + +// Is this field required? +func isRequired(field *descriptor.FieldDescriptorProto) bool { + return field.Label != nil && *field.Label == descriptor.FieldDescriptorProto_LABEL_REQUIRED +} + +// Is this field repeated? +func isRepeated(field *descriptor.FieldDescriptorProto) bool { + return field.Label != nil && *field.Label == descriptor.FieldDescriptorProto_LABEL_REPEATED +} + +// badToUnderscore is the mapping function used to generate Go names from package names, +// which can be dotted in the input .proto file. It replaces non-identifier characters such as +// dot or dash with underscore. +func badToUnderscore(r rune) rune { + if unicode.IsLetter(r) || unicode.IsDigit(r) || r == '_' { + return r + } + return '_' +} + +// baseName returns the last path element of the name, with the last dotted suffix removed. +func baseName(name string) string { + // First, find the last element + if i := strings.LastIndex(name, "/"); i >= 0 { + name = name[i+1:] + } + // Now drop the suffix + if i := strings.LastIndex(name, "."); i >= 0 { + name = name[0:i] + } + return name +} + +// The SourceCodeInfo message describes the location of elements of a parsed +// .proto file by way of a "path", which is a sequence of integers that +// describe the route from a FileDescriptorProto to the relevant submessage. +// The path alternates between a field number of a repeated field, and an index +// into that repeated field. The constants below define the field numbers that +// are used. +// +// See descriptor.proto for more information about this. +const ( + // tag numbers in FileDescriptorProto + packagePath = 2 // package + messagePath = 4 // message_type + enumPath = 5 // enum_type + // tag numbers in DescriptorProto + messageFieldPath = 2 // field + messageMessagePath = 3 // nested_type + messageEnumPath = 4 // enum_type + messageOneofPath = 8 // oneof_decl + // tag numbers in EnumDescriptorProto + enumValuePath = 2 // value +) diff --git a/vendor/github.com/golang/protobuf/protoc-gen-go/generator/name_test.go b/vendor/github.com/golang/protobuf/protoc-gen-go/generator/name_test.go new file mode 100644 index 000000000..a5ebc8533 --- /dev/null +++ b/vendor/github.com/golang/protobuf/protoc-gen-go/generator/name_test.go @@ -0,0 +1,85 @@ +// Go support for Protocol Buffers - Google's data interchange format +// +// Copyright 2013 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 generator + +import ( + "testing" + + "github.com/golang/protobuf/protoc-gen-go/descriptor" +) + +func TestCamelCase(t *testing.T) { + tests := []struct { + in, want string + }{ + {"one", "One"}, + {"one_two", "OneTwo"}, + {"_my_field_name_2", "XMyFieldName_2"}, + {"Something_Capped", "Something_Capped"}, + {"my_Name", "My_Name"}, + {"OneTwo", "OneTwo"}, + {"_", "X"}, + {"_a_", "XA_"}, + } + for _, tc := range tests { + if got := CamelCase(tc.in); got != tc.want { + t.Errorf("CamelCase(%q) = %q, want %q", tc.in, got, tc.want) + } + } +} + +func TestGoPackageOption(t *testing.T) { + tests := []struct { + in string + impPath, pkg string + ok bool + }{ + {"", "", "", false}, + {"foo", "", "foo", true}, + {"github.com/golang/bar", "github.com/golang/bar", "bar", true}, + {"github.com/golang/bar;baz", "github.com/golang/bar", "baz", true}, + } + for _, tc := range tests { + d := &FileDescriptor{ + FileDescriptorProto: &descriptor.FileDescriptorProto{ + Options: &descriptor.FileOptions{ + GoPackage: &tc.in, + }, + }, + } + impPath, pkg, ok := d.goPackageOption() + if impPath != tc.impPath || pkg != tc.pkg || ok != tc.ok { + t.Errorf("go_package = %q => (%q, %q, %t), want (%q, %q, %t)", tc.in, + impPath, pkg, ok, tc.impPath, tc.pkg, tc.ok) + } + } +} diff --git a/vendor/github.com/golang/protobuf/protoc-gen-go/grpc/grpc.go b/vendor/github.com/golang/protobuf/protoc-gen-go/grpc/grpc.go new file mode 100644 index 000000000..291cbdb46 --- /dev/null +++ b/vendor/github.com/golang/protobuf/protoc-gen-go/grpc/grpc.go @@ -0,0 +1,462 @@ +// Go support for Protocol Buffers - Google's data interchange format +// +// Copyright 2015 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 grpc outputs gRPC service descriptions in Go code. +// It runs as a plugin for the Go protocol buffer compiler plugin. +// It is linked in to protoc-gen-go. +package grpc + +import ( + "fmt" + "path" + "strconv" + "strings" + + pb "github.com/golang/protobuf/protoc-gen-go/descriptor" + "github.com/golang/protobuf/protoc-gen-go/generator" +) + +// generatedCodeVersion indicates a version of the generated code. +// It is incremented whenever an incompatibility between the generated code and +// the grpc package is introduced; the generated code references +// a constant, grpc.SupportPackageIsVersionN (where N is generatedCodeVersion). +const generatedCodeVersion = 2 + +// Paths for packages used by code generated in this file, +// relative to the import_prefix of the generator.Generator. +const ( + contextPkgPath = "golang.org/x/net/context" + grpcPkgPath = "google.golang.org/grpc" +) + +func init() { + generator.RegisterPlugin(new(grpc)) +} + +// grpc is an implementation of the Go protocol buffer compiler's +// plugin architecture. It generates bindings for gRPC support. +type grpc struct { + gen *generator.Generator +} + +// Name returns the name of this plugin, "grpc". +func (g *grpc) Name() string { + return "grpc" +} + +// The names for packages imported in the generated code. +// They may vary from the final path component of the import path +// if the name is used by other packages. +var ( + contextPkg string + grpcPkg string +) + +// Init initializes the plugin. +func (g *grpc) Init(gen *generator.Generator) { + g.gen = gen + contextPkg = generator.RegisterUniquePackageName("context", nil) + grpcPkg = generator.RegisterUniquePackageName("grpc", nil) +} + +// Given a type name defined in a .proto, return its object. +// Also record that we're using it, to guarantee the associated import. +func (g *grpc) objectNamed(name string) generator.Object { + g.gen.RecordTypeUse(name) + return g.gen.ObjectNamed(name) +} + +// Given a type name defined in a .proto, return its name as we will print it. +func (g *grpc) typeName(str string) string { + return g.gen.TypeName(g.objectNamed(str)) +} + +// P forwards to g.gen.P. +func (g *grpc) P(args ...interface{}) { g.gen.P(args...) } + +// Generate generates code for the services in the given file. +func (g *grpc) Generate(file *generator.FileDescriptor) { + if len(file.FileDescriptorProto.Service) == 0 { + return + } + + g.P("// Reference imports to suppress errors if they are not otherwise used.") + g.P("var _ ", contextPkg, ".Context") + g.P("var _ ", grpcPkg, ".ClientConn") + g.P() + + // Assert version compatibility. + g.P("// This is a compile-time assertion to ensure that this generated file") + g.P("// is compatible with the grpc package it is being compiled against.") + g.P("const _ = ", grpcPkg, ".SupportPackageIsVersion", generatedCodeVersion) + g.P() + + for i, service := range file.FileDescriptorProto.Service { + g.generateService(file, service, i) + } +} + +// GenerateImports generates the import declaration for this file. +func (g *grpc) GenerateImports(file *generator.FileDescriptor) { + if len(file.FileDescriptorProto.Service) == 0 { + return + } + g.P("import (") + g.P(contextPkg, " ", strconv.Quote(path.Join(g.gen.ImportPrefix, contextPkgPath))) + g.P(grpcPkg, " ", strconv.Quote(path.Join(g.gen.ImportPrefix, grpcPkgPath))) + g.P(")") + g.P() +} + +// reservedClientName records whether a client name is reserved on the client side. +var reservedClientName = map[string]bool{ +// TODO: do we need any in gRPC? +} + +func unexport(s string) string { return strings.ToLower(s[:1]) + s[1:] } + +// generateService generates all the code for the named service. +func (g *grpc) generateService(file *generator.FileDescriptor, service *pb.ServiceDescriptorProto, index int) { + path := fmt.Sprintf("6,%d", index) // 6 means service. + + origServName := service.GetName() + fullServName := origServName + if pkg := file.GetPackage(); pkg != "" { + fullServName = pkg + "." + fullServName + } + servName := generator.CamelCase(origServName) + + g.P() + g.P("// Client API for ", servName, " service") + g.P() + + // Client interface. + g.P("type ", servName, "Client interface {") + for i, method := range service.Method { + g.gen.PrintComments(fmt.Sprintf("%s,2,%d", path, i)) // 2 means method in a service. + g.P(g.generateClientSignature(servName, method)) + } + g.P("}") + g.P() + + // Client structure. + g.P("type ", unexport(servName), "Client struct {") + g.P("cc *", grpcPkg, ".ClientConn") + g.P("}") + g.P() + + // NewClient factory. + g.P("func New", servName, "Client (cc *", grpcPkg, ".ClientConn) ", servName, "Client {") + g.P("return &", unexport(servName), "Client{cc}") + g.P("}") + g.P() + + var methodIndex, streamIndex int + serviceDescVar := "_" + servName + "_serviceDesc" + // Client method implementations. + for _, method := range service.Method { + var descExpr string + if !method.GetServerStreaming() && !method.GetClientStreaming() { + // Unary RPC method + descExpr = fmt.Sprintf("&%s.Methods[%d]", serviceDescVar, methodIndex) + methodIndex++ + } else { + // Streaming RPC method + descExpr = fmt.Sprintf("&%s.Streams[%d]", serviceDescVar, streamIndex) + streamIndex++ + } + g.generateClientMethod(servName, fullServName, serviceDescVar, method, descExpr) + } + + g.P("// Server API for ", servName, " service") + g.P() + + // Server interface. + serverType := servName + "Server" + g.P("type ", serverType, " interface {") + for i, method := range service.Method { + g.gen.PrintComments(fmt.Sprintf("%s,2,%d", path, i)) // 2 means method in a service. + g.P(g.generateServerSignature(servName, method)) + } + g.P("}") + g.P() + + // Server registration. + g.P("func Register", servName, "Server(s *", grpcPkg, ".Server, srv ", serverType, ") {") + g.P("s.RegisterService(&", serviceDescVar, `, srv)`) + g.P("}") + g.P() + + // Server handler implementations. + var handlerNames []string + for _, method := range service.Method { + hname := g.generateServerMethod(servName, fullServName, method) + handlerNames = append(handlerNames, hname) + } + + // Service descriptor. + g.P("var ", serviceDescVar, " = ", grpcPkg, ".ServiceDesc {") + g.P("ServiceName: ", strconv.Quote(fullServName), ",") + g.P("HandlerType: (*", serverType, ")(nil),") + g.P("Methods: []", grpcPkg, ".MethodDesc{") + for i, method := range service.Method { + if method.GetServerStreaming() || method.GetClientStreaming() { + continue + } + g.P("{") + g.P("MethodName: ", strconv.Quote(method.GetName()), ",") + g.P("Handler: ", handlerNames[i], ",") + g.P("},") + } + g.P("},") + g.P("Streams: []", grpcPkg, ".StreamDesc{") + for i, method := range service.Method { + if !method.GetServerStreaming() && !method.GetClientStreaming() { + continue + } + g.P("{") + g.P("StreamName: ", strconv.Quote(method.GetName()), ",") + g.P("Handler: ", handlerNames[i], ",") + if method.GetServerStreaming() { + g.P("ServerStreams: true,") + } + if method.GetClientStreaming() { + g.P("ClientStreams: true,") + } + g.P("},") + } + g.P("},") + g.P("}") + g.P() +} + +// generateClientSignature returns the client-side signature for a method. +func (g *grpc) generateClientSignature(servName string, method *pb.MethodDescriptorProto) string { + origMethName := method.GetName() + methName := generator.CamelCase(origMethName) + if reservedClientName[methName] { + methName += "_" + } + reqArg := ", in *" + g.typeName(method.GetInputType()) + if method.GetClientStreaming() { + reqArg = "" + } + respName := "*" + g.typeName(method.GetOutputType()) + if method.GetServerStreaming() || method.GetClientStreaming() { + respName = servName + "_" + generator.CamelCase(origMethName) + "Client" + } + return fmt.Sprintf("%s(ctx %s.Context%s, opts ...%s.CallOption) (%s, error)", methName, contextPkg, reqArg, grpcPkg, respName) +} + +func (g *grpc) generateClientMethod(servName, fullServName, serviceDescVar string, method *pb.MethodDescriptorProto, descExpr string) { + sname := fmt.Sprintf("/%s/%s", fullServName, method.GetName()) + methName := generator.CamelCase(method.GetName()) + inType := g.typeName(method.GetInputType()) + outType := g.typeName(method.GetOutputType()) + + g.P("func (c *", unexport(servName), "Client) ", g.generateClientSignature(servName, method), "{") + if !method.GetServerStreaming() && !method.GetClientStreaming() { + g.P("out := new(", outType, ")") + // TODO: Pass descExpr to Invoke. + g.P("err := ", grpcPkg, `.Invoke(ctx, "`, sname, `", in, out, c.cc, opts...)`) + g.P("if err != nil { return nil, err }") + g.P("return out, nil") + g.P("}") + g.P() + return + } + streamType := unexport(servName) + methName + "Client" + g.P("stream, err := ", grpcPkg, ".NewClientStream(ctx, ", descExpr, `, c.cc, "`, sname, `", opts...)`) + g.P("if err != nil { return nil, err }") + g.P("x := &", streamType, "{stream}") + if !method.GetClientStreaming() { + g.P("if err := x.ClientStream.SendMsg(in); err != nil { return nil, err }") + g.P("if err := x.ClientStream.CloseSend(); err != nil { return nil, err }") + } + g.P("return x, nil") + g.P("}") + g.P() + + genSend := method.GetClientStreaming() + genRecv := method.GetServerStreaming() + genCloseAndRecv := !method.GetServerStreaming() + + // Stream auxiliary types and methods. + g.P("type ", servName, "_", methName, "Client interface {") + if genSend { + g.P("Send(*", inType, ") error") + } + if genRecv { + g.P("Recv() (*", outType, ", error)") + } + if genCloseAndRecv { + g.P("CloseAndRecv() (*", outType, ", error)") + } + g.P(grpcPkg, ".ClientStream") + g.P("}") + g.P() + + g.P("type ", streamType, " struct {") + g.P(grpcPkg, ".ClientStream") + g.P("}") + g.P() + + if genSend { + g.P("func (x *", streamType, ") Send(m *", inType, ") error {") + g.P("return x.ClientStream.SendMsg(m)") + g.P("}") + g.P() + } + if genRecv { + g.P("func (x *", streamType, ") Recv() (*", outType, ", error) {") + g.P("m := new(", outType, ")") + g.P("if err := x.ClientStream.RecvMsg(m); err != nil { return nil, err }") + g.P("return m, nil") + g.P("}") + g.P() + } + if genCloseAndRecv { + g.P("func (x *", streamType, ") CloseAndRecv() (*", outType, ", error) {") + g.P("if err := x.ClientStream.CloseSend(); err != nil { return nil, err }") + g.P("m := new(", outType, ")") + g.P("if err := x.ClientStream.RecvMsg(m); err != nil { return nil, err }") + g.P("return m, nil") + g.P("}") + g.P() + } +} + +// generateServerSignature returns the server-side signature for a method. +func (g *grpc) generateServerSignature(servName string, method *pb.MethodDescriptorProto) string { + origMethName := method.GetName() + methName := generator.CamelCase(origMethName) + if reservedClientName[methName] { + methName += "_" + } + + var reqArgs []string + ret := "error" + if !method.GetServerStreaming() && !method.GetClientStreaming() { + reqArgs = append(reqArgs, contextPkg+".Context") + ret = "(*" + g.typeName(method.GetOutputType()) + ", error)" + } + if !method.GetClientStreaming() { + reqArgs = append(reqArgs, "*"+g.typeName(method.GetInputType())) + } + if method.GetServerStreaming() || method.GetClientStreaming() { + reqArgs = append(reqArgs, servName+"_"+generator.CamelCase(origMethName)+"Server") + } + + return methName + "(" + strings.Join(reqArgs, ", ") + ") " + ret +} + +func (g *grpc) generateServerMethod(servName, fullServName string, method *pb.MethodDescriptorProto) string { + methName := generator.CamelCase(method.GetName()) + hname := fmt.Sprintf("_%s_%s_Handler", servName, methName) + inType := g.typeName(method.GetInputType()) + outType := g.typeName(method.GetOutputType()) + + if !method.GetServerStreaming() && !method.GetClientStreaming() { + g.P("func ", hname, "(srv interface{}, ctx ", contextPkg, ".Context, dec func(interface{}) error, interceptor ", grpcPkg, ".UnaryServerInterceptor) (interface{}, error) {") + g.P("in := new(", inType, ")") + g.P("if err := dec(in); err != nil { return nil, err }") + g.P("if interceptor == nil { return srv.(", servName, "Server).", methName, "(ctx, in) }") + g.P("info := &", grpcPkg, ".UnaryServerInfo{") + g.P("Server: srv,") + g.P("FullMethod: ", strconv.Quote(fmt.Sprintf("/%s/%s", fullServName, methName)), ",") + g.P("}") + g.P("handler := func(ctx ", contextPkg, ".Context, req interface{}) (interface{}, error) {") + g.P("return srv.(", servName, "Server).", methName, "(ctx, req.(*", inType, "))") + g.P("}") + g.P("return interceptor(ctx, in, info, handler)") + g.P("}") + g.P() + return hname + } + streamType := unexport(servName) + methName + "Server" + g.P("func ", hname, "(srv interface{}, stream ", grpcPkg, ".ServerStream) error {") + if !method.GetClientStreaming() { + g.P("m := new(", inType, ")") + g.P("if err := stream.RecvMsg(m); err != nil { return err }") + g.P("return srv.(", servName, "Server).", methName, "(m, &", streamType, "{stream})") + } else { + g.P("return srv.(", servName, "Server).", methName, "(&", streamType, "{stream})") + } + g.P("}") + g.P() + + genSend := method.GetServerStreaming() + genSendAndClose := !method.GetServerStreaming() + genRecv := method.GetClientStreaming() + + // Stream auxiliary types and methods. + g.P("type ", servName, "_", methName, "Server interface {") + if genSend { + g.P("Send(*", outType, ") error") + } + if genSendAndClose { + g.P("SendAndClose(*", outType, ") error") + } + if genRecv { + g.P("Recv() (*", inType, ", error)") + } + g.P(grpcPkg, ".ServerStream") + g.P("}") + g.P() + + g.P("type ", streamType, " struct {") + g.P(grpcPkg, ".ServerStream") + g.P("}") + g.P() + + if genSend { + g.P("func (x *", streamType, ") Send(m *", outType, ") error {") + g.P("return x.ServerStream.SendMsg(m)") + g.P("}") + g.P() + } + if genSendAndClose { + g.P("func (x *", streamType, ") SendAndClose(m *", outType, ") error {") + g.P("return x.ServerStream.SendMsg(m)") + g.P("}") + g.P() + } + if genRecv { + g.P("func (x *", streamType, ") Recv() (*", inType, ", error) {") + g.P("m := new(", inType, ")") + g.P("if err := x.ServerStream.RecvMsg(m); err != nil { return nil, err }") + g.P("return m, nil") + g.P("}") + g.P() + } + + return hname +} diff --git a/vendor/github.com/golang/protobuf/protoc-gen-go/link_grpc.go b/vendor/github.com/golang/protobuf/protoc-gen-go/link_grpc.go new file mode 100644 index 000000000..532a55005 --- /dev/null +++ b/vendor/github.com/golang/protobuf/protoc-gen-go/link_grpc.go @@ -0,0 +1,34 @@ +// Go support for Protocol Buffers - Google's data interchange format +// +// Copyright 2015 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 main + +import _ "github.com/golang/protobuf/protoc-gen-go/grpc" diff --git a/vendor/github.com/golang/protobuf/protoc-gen-go/main.go b/vendor/github.com/golang/protobuf/protoc-gen-go/main.go new file mode 100644 index 000000000..8e2486de0 --- /dev/null +++ b/vendor/github.com/golang/protobuf/protoc-gen-go/main.go @@ -0,0 +1,98 @@ +// 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. + +// protoc-gen-go is a plugin for the Google protocol buffer compiler to generate +// Go code. Run it by building this program and putting it in your path with +// the name +// protoc-gen-go +// That word 'go' at the end becomes part of the option string set for the +// protocol compiler, so once the protocol compiler (protoc) is installed +// you can run +// protoc --go_out=output_directory input_directory/file.proto +// to generate Go bindings for the protocol defined by file.proto. +// With that input, the output will be written to +// output_directory/file.pb.go +// +// The generated code is documented in the package comment for +// the library. +// +// See the README and documentation for protocol buffers to learn more: +// https://developers.google.com/protocol-buffers/ +package main + +import ( + "io/ioutil" + "os" + + "github.com/golang/protobuf/proto" + "github.com/golang/protobuf/protoc-gen-go/generator" +) + +func main() { + // Begin by allocating a generator. The request and response structures are stored there + // so we can do error handling easily - the response structure contains the field to + // report failure. + g := generator.New() + + data, err := ioutil.ReadAll(os.Stdin) + if err != nil { + g.Error(err, "reading input") + } + + if err := proto.Unmarshal(data, g.Request); err != nil { + g.Error(err, "parsing input proto") + } + + if len(g.Request.FileToGenerate) == 0 { + g.Fail("no files to generate") + } + + g.CommandLineParameters(g.Request.GetParameter()) + + // Create a wrapped version of the Descriptors and EnumDescriptors that + // point to the file that defines them. + g.WrapTypes() + + g.SetPackageNames() + g.BuildTypeNameMap() + + g.GenerateAllFiles() + + // Send back the results. + data, err = proto.Marshal(g.Response) + if err != nil { + g.Error(err, "failed to marshal output proto") + } + _, err = os.Stdout.Write(data) + if err != nil { + g.Error(err, "failed to write output proto") + } +} diff --git a/vendor/github.com/golang/protobuf/protoc-gen-go/plugin/Makefile b/vendor/github.com/golang/protobuf/protoc-gen-go/plugin/Makefile new file mode 100644 index 000000000..eb41f20da --- /dev/null +++ b/vendor/github.com/golang/protobuf/protoc-gen-go/plugin/Makefile @@ -0,0 +1,45 @@ +# 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. + +# Not stored here, but plugin.proto is in https://github.com/google/protobuf/ +# at src/google/protobuf/compiler/plugin.proto +# Also we need to fix an import. +regenerate: + echo WARNING! THIS RULE IS PROBABLY NOT RIGHT FOR YOUR INSTALLATION + protoc --go_out=Mgoogle/protobuf/descriptor.proto=github.com/golang/protobuf/protoc-gen-go/descriptor:. \ + -I$(HOME)/src/protobuf/src $(HOME)/src/protobuf/src/google/protobuf/compiler/plugin.proto && \ + mv google/protobuf/compiler/plugin.pb.go $(GOPATH)/src/github.com/golang/protobuf/protoc-gen-go/plugin + +restore: + cp plugin.pb.golden plugin.pb.go + +preserve: + cp plugin.pb.go plugin.pb.golden diff --git a/vendor/github.com/golang/protobuf/protoc-gen-go/plugin/plugin.pb.go b/vendor/github.com/golang/protobuf/protoc-gen-go/plugin/plugin.pb.go new file mode 100644 index 000000000..7b0293467 --- /dev/null +++ b/vendor/github.com/golang/protobuf/protoc-gen-go/plugin/plugin.pb.go @@ -0,0 +1,229 @@ +// Code generated by protoc-gen-go. +// source: google/protobuf/compiler/plugin.proto +// DO NOT EDIT! + +/* +Package plugin_go is a generated protocol buffer package. + +It is generated from these files: + google/protobuf/compiler/plugin.proto + +It has these top-level messages: + CodeGeneratorRequest + CodeGeneratorResponse +*/ +package plugin_go + +import proto "github.com/golang/protobuf/proto" +import fmt "fmt" +import math "math" +import google_protobuf "github.com/golang/protobuf/protoc-gen-go/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.ProtoPackageIsVersion2 // please upgrade the proto package + +// An encoded CodeGeneratorRequest is written to the plugin's stdin. +type CodeGeneratorRequest struct { + // The .proto files that were explicitly listed on the command-line. The + // code generator should generate code only for these files. Each file's + // descriptor will be included in proto_file, below. + FileToGenerate []string `protobuf:"bytes,1,rep,name=file_to_generate,json=fileToGenerate" json:"file_to_generate,omitempty"` + // The generator parameter passed on the command-line. + Parameter *string `protobuf:"bytes,2,opt,name=parameter" json:"parameter,omitempty"` + // FileDescriptorProtos for all files in files_to_generate and everything + // they import. The files will appear in topological order, so each file + // appears before any file that imports it. + // + // protoc guarantees that all proto_files will be written after + // the fields above, even though this is not technically guaranteed by the + // protobuf wire format. This theoretically could allow a plugin to stream + // in the FileDescriptorProtos and handle them one by one rather than read + // the entire set into memory at once. However, as of this writing, this + // is not similarly optimized on protoc's end -- it will store all fields in + // memory at once before sending them to the plugin. + ProtoFile []*google_protobuf.FileDescriptorProto `protobuf:"bytes,15,rep,name=proto_file,json=protoFile" json:"proto_file,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *CodeGeneratorRequest) Reset() { *m = CodeGeneratorRequest{} } +func (m *CodeGeneratorRequest) String() string { return proto.CompactTextString(m) } +func (*CodeGeneratorRequest) ProtoMessage() {} +func (*CodeGeneratorRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{0} } + +func (m *CodeGeneratorRequest) GetFileToGenerate() []string { + if m != nil { + return m.FileToGenerate + } + return nil +} + +func (m *CodeGeneratorRequest) GetParameter() string { + if m != nil && m.Parameter != nil { + return *m.Parameter + } + return "" +} + +func (m *CodeGeneratorRequest) GetProtoFile() []*google_protobuf.FileDescriptorProto { + if m != nil { + return m.ProtoFile + } + return nil +} + +// The plugin writes an encoded CodeGeneratorResponse to stdout. +type CodeGeneratorResponse struct { + // Error message. If non-empty, code generation failed. The plugin process + // should exit with status code zero even if it reports an error in this way. + // + // This should be used to indicate errors in .proto files which prevent the + // code generator from generating correct code. Errors which indicate a + // problem in protoc itself -- such as the input CodeGeneratorRequest being + // unparseable -- should be reported by writing a message to stderr and + // exiting with a non-zero status code. + Error *string `protobuf:"bytes,1,opt,name=error" json:"error,omitempty"` + File []*CodeGeneratorResponse_File `protobuf:"bytes,15,rep,name=file" json:"file,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *CodeGeneratorResponse) Reset() { *m = CodeGeneratorResponse{} } +func (m *CodeGeneratorResponse) String() string { return proto.CompactTextString(m) } +func (*CodeGeneratorResponse) ProtoMessage() {} +func (*CodeGeneratorResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{1} } + +func (m *CodeGeneratorResponse) GetError() string { + if m != nil && m.Error != nil { + return *m.Error + } + return "" +} + +func (m *CodeGeneratorResponse) GetFile() []*CodeGeneratorResponse_File { + if m != nil { + return m.File + } + return nil +} + +// Represents a single generated file. +type CodeGeneratorResponse_File struct { + // The file name, relative to the output directory. The name must not + // contain "." or ".." components and must be relative, not be absolute (so, + // the file cannot lie outside the output directory). "/" must be used as + // the path separator, not "\". + // + // If the name is omitted, the content will be appended to the previous + // file. This allows the generator to break large files into small chunks, + // and allows the generated text to be streamed back to protoc so that large + // files need not reside completely in memory at one time. Note that as of + // this writing protoc does not optimize for this -- it will read the entire + // CodeGeneratorResponse before writing files to disk. + Name *string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"` + // If non-empty, indicates that the named file should already exist, and the + // content here is to be inserted into that file at a defined insertion + // point. This feature allows a code generator to extend the output + // produced by another code generator. The original generator may provide + // insertion points by placing special annotations in the file that look + // like: + // @@protoc_insertion_point(NAME) + // The annotation can have arbitrary text before and after it on the line, + // which allows it to be placed in a comment. NAME should be replaced with + // an identifier naming the point -- this is what other generators will use + // as the insertion_point. Code inserted at this point will be placed + // immediately above the line containing the insertion point (thus multiple + // insertions to the same point will come out in the order they were added). + // The double-@ is intended to make it unlikely that the generated code + // could contain things that look like insertion points by accident. + // + // For example, the C++ code generator places the following line in the + // .pb.h files that it generates: + // // @@protoc_insertion_point(namespace_scope) + // This line appears within the scope of the file's package namespace, but + // outside of any particular class. Another plugin can then specify the + // insertion_point "namespace_scope" to generate additional classes or + // other declarations that should be placed in this scope. + // + // Note that if the line containing the insertion point begins with + // whitespace, the same whitespace will be added to every line of the + // inserted text. This is useful for languages like Python, where + // indentation matters. In these languages, the insertion point comment + // should be indented the same amount as any inserted code will need to be + // in order to work correctly in that context. + // + // The code generator that generates the initial file and the one which + // inserts into it must both run as part of a single invocation of protoc. + // Code generators are executed in the order in which they appear on the + // command line. + // + // If |insertion_point| is present, |name| must also be present. + InsertionPoint *string `protobuf:"bytes,2,opt,name=insertion_point,json=insertionPoint" json:"insertion_point,omitempty"` + // The file contents. + Content *string `protobuf:"bytes,15,opt,name=content" json:"content,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *CodeGeneratorResponse_File) Reset() { *m = CodeGeneratorResponse_File{} } +func (m *CodeGeneratorResponse_File) String() string { return proto.CompactTextString(m) } +func (*CodeGeneratorResponse_File) ProtoMessage() {} +func (*CodeGeneratorResponse_File) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{1, 0} } + +func (m *CodeGeneratorResponse_File) GetName() string { + if m != nil && m.Name != nil { + return *m.Name + } + return "" +} + +func (m *CodeGeneratorResponse_File) GetInsertionPoint() string { + if m != nil && m.InsertionPoint != nil { + return *m.InsertionPoint + } + return "" +} + +func (m *CodeGeneratorResponse_File) GetContent() string { + if m != nil && m.Content != nil { + return *m.Content + } + return "" +} + +func init() { + proto.RegisterType((*CodeGeneratorRequest)(nil), "google.protobuf.compiler.CodeGeneratorRequest") + proto.RegisterType((*CodeGeneratorResponse)(nil), "google.protobuf.compiler.CodeGeneratorResponse") + proto.RegisterType((*CodeGeneratorResponse_File)(nil), "google.protobuf.compiler.CodeGeneratorResponse.File") +} + +func init() { proto.RegisterFile("google/protobuf/compiler/plugin.proto", fileDescriptor0) } + +var fileDescriptor0 = []byte{ + // 311 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0x74, 0x91, 0xd1, 0x4a, 0xfb, 0x30, + 0x14, 0xc6, 0xe9, 0xff, 0x3f, 0x91, 0x1d, 0x65, 0x93, 0x30, 0xa1, 0x8c, 0x5d, 0x94, 0xa1, 0xb8, + 0xab, 0x14, 0x44, 0xf0, 0x7e, 0x13, 0xf5, 0xb2, 0x14, 0xaf, 0x04, 0x29, 0xb5, 0x3b, 0x2b, 0x81, + 0x2e, 0x27, 0xa6, 0xe9, 0x13, 0xf9, 0x4e, 0x3e, 0x8f, 0x49, 0xda, 0x4e, 0x29, 0xee, 0xaa, 0x3d, + 0xdf, 0xf9, 0xe5, 0x3b, 0x5f, 0x72, 0xe0, 0xba, 0x24, 0x2a, 0x2b, 0x8c, 0x95, 0x26, 0x43, 0xef, + 0xcd, 0x2e, 0x2e, 0x68, 0xaf, 0x44, 0x85, 0x3a, 0x56, 0x55, 0x53, 0x0a, 0xc9, 0x7d, 0x83, 0x85, + 0x2d, 0xc6, 0x7b, 0x8c, 0xf7, 0xd8, 0x3c, 0x1a, 0x1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8b, + 0xf6, 0x0f, 0x52, 0xbf, 0x8e, 0xdb, 0xb5, 0x67, 0x25, 0x7d, 0x07, 0x00, 0x00, 0xff, 0xff, 0x83, + 0x7b, 0x5c, 0x7c, 0x1b, 0x02, 0x00, 0x00, +} diff --git a/vendor/github.com/golang/protobuf/protoc-gen-go/plugin/plugin.pb.golden b/vendor/github.com/golang/protobuf/protoc-gen-go/plugin/plugin.pb.golden new file mode 100644 index 000000000..8953d0ff8 --- /dev/null +++ b/vendor/github.com/golang/protobuf/protoc-gen-go/plugin/plugin.pb.golden @@ -0,0 +1,83 @@ +// Code generated by protoc-gen-go. +// source: google/protobuf/compiler/plugin.proto +// DO NOT EDIT! + +package google_protobuf_compiler + +import proto "github.com/golang/protobuf/proto" +import "math" +import google_protobuf "github.com/golang/protobuf/protoc-gen-go/descriptor" + +// Reference proto and math imports to suppress error if they are not otherwise used. +var _ = proto.GetString +var _ = math.Inf + +type CodeGeneratorRequest struct { + FileToGenerate []string `protobuf:"bytes,1,rep,name=file_to_generate" json:"file_to_generate,omitempty"` + Parameter *string `protobuf:"bytes,2,opt,name=parameter" json:"parameter,omitempty"` + ProtoFile []*google_protobuf.FileDescriptorProto `protobuf:"bytes,15,rep,name=proto_file" json:"proto_file,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (this *CodeGeneratorRequest) Reset() { *this = CodeGeneratorRequest{} } +func (this *CodeGeneratorRequest) String() string { return proto.CompactTextString(this) } +func (*CodeGeneratorRequest) ProtoMessage() {} + +func (this *CodeGeneratorRequest) GetParameter() string { + if this != nil && this.Parameter != nil { + return *this.Parameter + } + return "" +} + +type CodeGeneratorResponse struct { + Error *string `protobuf:"bytes,1,opt,name=error" json:"error,omitempty"` + File []*CodeGeneratorResponse_File `protobuf:"bytes,15,rep,name=file" json:"file,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (this *CodeGeneratorResponse) Reset() { *this = CodeGeneratorResponse{} } +func (this *CodeGeneratorResponse) String() string { return proto.CompactTextString(this) } +func (*CodeGeneratorResponse) ProtoMessage() {} + +func (this *CodeGeneratorResponse) GetError() string { + if this != nil && this.Error != nil { + return *this.Error + } + return "" +} + +type CodeGeneratorResponse_File struct { + Name *string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"` + InsertionPoint *string `protobuf:"bytes,2,opt,name=insertion_point" json:"insertion_point,omitempty"` + Content *string `protobuf:"bytes,15,opt,name=content" json:"content,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (this *CodeGeneratorResponse_File) Reset() { *this = CodeGeneratorResponse_File{} } +func (this *CodeGeneratorResponse_File) String() string { return proto.CompactTextString(this) } +func (*CodeGeneratorResponse_File) ProtoMessage() {} + +func (this *CodeGeneratorResponse_File) GetName() string { + if this != nil && this.Name != nil { + return *this.Name + } + return "" +} + +func (this *CodeGeneratorResponse_File) GetInsertionPoint() string { + if this != nil && this.InsertionPoint != nil { + return *this.InsertionPoint + } + return "" +} + +func (this *CodeGeneratorResponse_File) GetContent() string { + if this != nil && this.Content != nil { + return *this.Content + } + return "" +} + +func init() { +} diff --git a/vendor/github.com/golang/protobuf/protoc-gen-go/testdata/Makefile b/vendor/github.com/golang/protobuf/protoc-gen-go/testdata/Makefile new file mode 100644 index 000000000..a85cc5655 --- /dev/null +++ b/vendor/github.com/golang/protobuf/protoc-gen-go/testdata/Makefile @@ -0,0 +1,72 @@ +# 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. + +all: + @echo run make test + +include ../../Make.protobuf + +test: golden testbuild + +#test: golden testbuild extension_test +# ./extension_test +# @echo PASS + +my_test/test.pb.go: my_test/test.proto + protoc --go_out=Mmulti/multi1.proto=github.com/golang/protobuf/protoc-gen-go/testdata/multi:. $< + +golden: + make -B my_test/test.pb.go + sed -i '/return.*fileDescriptor/d' my_test/test.pb.go + sed -i '/^var fileDescriptor/,/^}/d' my_test/test.pb.go + gofmt -w my_test/test.pb.go + diff -w my_test/test.pb.go my_test/test.pb.go.golden + +nuke: clean + +testbuild: regenerate + go test + +regenerate: + # Invoke protoc once to generate three independent .pb.go files in the same package. + protoc --go_out=. multi/multi{1,2,3}.proto + +#extension_test: extension_test.$O +# $(LD) -L. -o $@ $< + +#multi.a: multi3.pb.$O multi2.pb.$O multi1.pb.$O +# rm -f multi.a +# $(QUOTED_GOBIN)/gopack grc $@ $< + +#test.pb.go: imp.pb.go +#multi1.pb.go: multi2.pb.go multi3.pb.go +#main.$O: imp.pb.$O test.pb.$O multi.a +#extension_test.$O: extension_base.pb.$O extension_extra.pb.$O extension_user.pb.$O diff --git a/vendor/github.com/golang/protobuf/protoc-gen-go/testdata/extension_base.proto b/vendor/github.com/golang/protobuf/protoc-gen-go/testdata/extension_base.proto new file mode 100644 index 000000000..94acfc1bc --- /dev/null +++ b/vendor/github.com/golang/protobuf/protoc-gen-go/testdata/extension_base.proto @@ -0,0 +1,46 @@ +// 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. + +syntax = "proto2"; + +package extension_base; + +message BaseMessage { + optional int32 height = 1; + extensions 4 to 9; + extensions 16 to max; +} + +// Another message that may be extended, using message_set_wire_format. +message OldStyleMessage { + option message_set_wire_format = true; + extensions 100 to max; +} diff --git a/vendor/github.com/golang/protobuf/protoc-gen-go/testdata/extension_extra.proto b/vendor/github.com/golang/protobuf/protoc-gen-go/testdata/extension_extra.proto new file mode 100644 index 000000000..fca7f600c --- /dev/null +++ b/vendor/github.com/golang/protobuf/protoc-gen-go/testdata/extension_extra.proto @@ -0,0 +1,38 @@ +// Go support for Protocol Buffers - Google's data interchange format +// +// Copyright 2011 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. + +syntax = "proto2"; + +package extension_extra; + +message ExtraMessage { + optional int32 width = 1; +} diff --git a/vendor/github.com/golang/protobuf/protoc-gen-go/testdata/extension_test.go b/vendor/github.com/golang/protobuf/protoc-gen-go/testdata/extension_test.go new file mode 100644 index 000000000..86e9c118a --- /dev/null +++ b/vendor/github.com/golang/protobuf/protoc-gen-go/testdata/extension_test.go @@ -0,0 +1,210 @@ +// 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. + +// Test that we can use protocol buffers that use extensions. + +package testdata + +/* + +import ( + "bytes" + "regexp" + "testing" + + "github.com/golang/protobuf/proto" + base "extension_base.pb" + user "extension_user.pb" +) + +func TestSingleFieldExtension(t *testing.T) { + bm := &base.BaseMessage{ + Height: proto.Int32(178), + } + + // Use extension within scope of another type. + vol := proto.Uint32(11) + err := proto.SetExtension(bm, user.E_LoudMessage_Volume, vol) + if err != nil { + t.Fatal("Failed setting extension:", err) + } + buf, err := proto.Marshal(bm) + if err != nil { + t.Fatal("Failed encoding message with extension:", err) + } + bm_new := new(base.BaseMessage) + if err := proto.Unmarshal(buf, bm_new); err != nil { + t.Fatal("Failed decoding message with extension:", err) + } + if !proto.HasExtension(bm_new, user.E_LoudMessage_Volume) { + t.Fatal("Decoded message didn't contain extension.") + } + vol_out, err := proto.GetExtension(bm_new, user.E_LoudMessage_Volume) + if err != nil { + t.Fatal("Failed getting extension:", err) + } + if v := vol_out.(*uint32); *v != *vol { + t.Errorf("vol_out = %v, expected %v", *v, *vol) + } + proto.ClearExtension(bm_new, user.E_LoudMessage_Volume) + if proto.HasExtension(bm_new, user.E_LoudMessage_Volume) { + t.Fatal("Failed clearing extension.") + } +} + +func TestMessageExtension(t *testing.T) { + bm := &base.BaseMessage{ + Height: proto.Int32(179), + } + + // Use extension that is itself a message. + um := &user.UserMessage{ + Name: proto.String("Dave"), + Rank: proto.String("Major"), + } + err := proto.SetExtension(bm, user.E_LoginMessage_UserMessage, um) + if err != nil { + t.Fatal("Failed setting extension:", err) + } + buf, err := proto.Marshal(bm) + if err != nil { + t.Fatal("Failed encoding message with extension:", err) + } + bm_new := new(base.BaseMessage) + if err := proto.Unmarshal(buf, bm_new); err != nil { + t.Fatal("Failed decoding message with extension:", err) + } + if !proto.HasExtension(bm_new, user.E_LoginMessage_UserMessage) { + t.Fatal("Decoded message didn't contain extension.") + } + um_out, err := proto.GetExtension(bm_new, user.E_LoginMessage_UserMessage) + if err != nil { + t.Fatal("Failed getting extension:", err) + } + if n := um_out.(*user.UserMessage).Name; *n != *um.Name { + t.Errorf("um_out.Name = %q, expected %q", *n, *um.Name) + } + if r := um_out.(*user.UserMessage).Rank; *r != *um.Rank { + t.Errorf("um_out.Rank = %q, expected %q", *r, *um.Rank) + } + proto.ClearExtension(bm_new, user.E_LoginMessage_UserMessage) + if proto.HasExtension(bm_new, user.E_LoginMessage_UserMessage) { + t.Fatal("Failed clearing extension.") + } +} + +func TestTopLevelExtension(t *testing.T) { + bm := &base.BaseMessage{ + Height: proto.Int32(179), + } + + width := proto.Int32(17) + err := proto.SetExtension(bm, user.E_Width, width) + if err != nil { + t.Fatal("Failed setting extension:", err) + } + buf, err := proto.Marshal(bm) + if err != nil { + t.Fatal("Failed encoding message with extension:", err) + } + bm_new := new(base.BaseMessage) + if err := proto.Unmarshal(buf, bm_new); err != nil { + t.Fatal("Failed decoding message with extension:", err) + } + if !proto.HasExtension(bm_new, user.E_Width) { + t.Fatal("Decoded message didn't contain extension.") + } + width_out, err := proto.GetExtension(bm_new, user.E_Width) + if err != nil { + t.Fatal("Failed getting extension:", err) + } + if w := width_out.(*int32); *w != *width { + t.Errorf("width_out = %v, expected %v", *w, *width) + } + proto.ClearExtension(bm_new, user.E_Width) + if proto.HasExtension(bm_new, user.E_Width) { + t.Fatal("Failed clearing extension.") + } +} + +func TestMessageSetWireFormat(t *testing.T) { + osm := new(base.OldStyleMessage) + osp := &user.OldStyleParcel{ + Name: proto.String("Dave"), + Height: proto.Int32(178), + } + + err := proto.SetExtension(osm, user.E_OldStyleParcel_MessageSetExtension, osp) + if err != nil { + t.Fatal("Failed setting extension:", err) + } + + buf, err := proto.Marshal(osm) + if err != nil { + t.Fatal("Failed encoding message:", err) + } + + // Data generated from Python implementation. + expected := []byte{ + 11, 16, 209, 15, 26, 9, 10, 4, 68, 97, 118, 101, 16, 178, 1, 12, + } + + if !bytes.Equal(expected, buf) { + t.Errorf("Encoding mismatch.\nwant %+v\n got %+v", expected, buf) + } + + // Check that it is restored correctly. + osm = new(base.OldStyleMessage) + if err := proto.Unmarshal(buf, osm); err != nil { + t.Fatal("Failed decoding message:", err) + } + osp_out, err := proto.GetExtension(osm, user.E_OldStyleParcel_MessageSetExtension) + if err != nil { + t.Fatal("Failed getting extension:", err) + } + osp = osp_out.(*user.OldStyleParcel) + if *osp.Name != "Dave" || *osp.Height != 178 { + t.Errorf("Retrieved extension from decoded message is not correct: %+v", osp) + } +} + +func main() { + // simpler than rigging up gotest + testing.Main(regexp.MatchString, []testing.InternalTest{ + {"TestSingleFieldExtension", TestSingleFieldExtension}, + {"TestMessageExtension", TestMessageExtension}, + {"TestTopLevelExtension", TestTopLevelExtension}, + }, + []testing.InternalBenchmark{}, + []testing.InternalExample{}) +} + +*/ diff --git a/vendor/github.com/golang/protobuf/protoc-gen-go/testdata/extension_user.proto b/vendor/github.com/golang/protobuf/protoc-gen-go/testdata/extension_user.proto new file mode 100644 index 000000000..ff65873dd --- /dev/null +++ b/vendor/github.com/golang/protobuf/protoc-gen-go/testdata/extension_user.proto @@ -0,0 +1,100 @@ +// 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. + +syntax = "proto2"; + +import "extension_base.proto"; +import "extension_extra.proto"; + +package extension_user; + +message UserMessage { + optional string name = 1; + optional string rank = 2; +} + +// Extend with a message +extend extension_base.BaseMessage { + optional UserMessage user_message = 5; +} + +// Extend with a foreign message +extend extension_base.BaseMessage { + optional extension_extra.ExtraMessage extra_message = 9; +} + +// Extend with some primitive types +extend extension_base.BaseMessage { + optional int32 width = 6; + optional int64 area = 7; +} + +// Extend inside the scope of another type +message LoudMessage { + extend extension_base.BaseMessage { + optional uint32 volume = 8; + } + extensions 100 to max; +} + +// Extend inside the scope of another type, using a message. +message LoginMessage { + extend extension_base.BaseMessage { + optional UserMessage user_message = 16; + } +} + +// Extend with a repeated field +extend extension_base.BaseMessage { + repeated Detail detail = 17; +} + +message Detail { + optional string color = 1; +} + +// An extension of an extension +message Announcement { + optional string words = 1; + extend LoudMessage { + optional Announcement loud_ext = 100; + } +} + +// Something that can be put in a message set. +message OldStyleParcel { + extend extension_base.OldStyleMessage { + optional OldStyleParcel message_set_extension = 2001; + } + + required string name = 1; + optional int32 height = 2; +} diff --git a/vendor/github.com/golang/protobuf/protoc-gen-go/testdata/grpc.proto b/vendor/github.com/golang/protobuf/protoc-gen-go/testdata/grpc.proto new file mode 100644 index 000000000..b8bc41acd --- /dev/null +++ b/vendor/github.com/golang/protobuf/protoc-gen-go/testdata/grpc.proto @@ -0,0 +1,59 @@ +// Go support for Protocol Buffers - Google's data interchange format +// +// Copyright 2015 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. + +syntax = "proto3"; + +package grpc.testing; + +message SimpleRequest { +} + +message SimpleResponse { +} + +message StreamMsg { +} + +message StreamMsg2 { +} + +service Test { + rpc UnaryCall(SimpleRequest) returns (SimpleResponse); + + // This RPC streams from the server only. + rpc Downstream(SimpleRequest) returns (stream StreamMsg); + + // This RPC streams from the client. + rpc Upstream(stream StreamMsg) returns (SimpleResponse); + + // This one streams in both directions. + rpc Bidi(stream StreamMsg) returns (stream StreamMsg2); +} diff --git a/vendor/github.com/golang/protobuf/protoc-gen-go/testdata/imp.pb.go.golden b/vendor/github.com/golang/protobuf/protoc-gen-go/testdata/imp.pb.go.golden new file mode 100644 index 000000000..784a4f865 --- /dev/null +++ b/vendor/github.com/golang/protobuf/protoc-gen-go/testdata/imp.pb.go.golden @@ -0,0 +1,113 @@ +// Code generated by protoc-gen-go. +// source: imp.proto +// DO NOT EDIT! + +package imp + +import proto "github.com/golang/protobuf/proto" +import "math" +import "os" +import imp1 "imp2.pb" + +// Reference proto & math imports to suppress error if they are not otherwise used. +var _ = proto.GetString +var _ = math.Inf + +// Types from public import imp2.proto +type PubliclyImportedMessage imp1.PubliclyImportedMessage + +func (this *PubliclyImportedMessage) Reset() { (*imp1.PubliclyImportedMessage)(this).Reset() } +func (this *PubliclyImportedMessage) String() string { + return (*imp1.PubliclyImportedMessage)(this).String() +} + +// PubliclyImportedMessage from public import imp.proto + +type ImportedMessage_Owner int32 + +const ( + ImportedMessage_DAVE ImportedMessage_Owner = 1 + ImportedMessage_MIKE ImportedMessage_Owner = 2 +) + +var ImportedMessage_Owner_name = map[int32]string{ + 1: "DAVE", + 2: "MIKE", +} +var ImportedMessage_Owner_value = map[string]int32{ + "DAVE": 1, + "MIKE": 2, +} + +// NewImportedMessage_Owner is deprecated. Use x.Enum() instead. +func NewImportedMessage_Owner(x ImportedMessage_Owner) *ImportedMessage_Owner { + e := ImportedMessage_Owner(x) + return &e +} +func (x ImportedMessage_Owner) Enum() *ImportedMessage_Owner { + p := new(ImportedMessage_Owner) + *p = x + return p +} +func (x ImportedMessage_Owner) String() string { + return proto.EnumName(ImportedMessage_Owner_name, int32(x)) +} + +type ImportedMessage struct { + Field *int64 `protobuf:"varint,1,req,name=field" json:"field,omitempty"` + XXX_extensions map[int32][]byte `json:",omitempty"` + XXX_unrecognized []byte `json:",omitempty"` +} + +func (this *ImportedMessage) Reset() { *this = ImportedMessage{} } +func (this *ImportedMessage) String() string { return proto.CompactTextString(this) } + +var extRange_ImportedMessage = []proto.ExtensionRange{ + proto.ExtensionRange{90, 100}, +} + +func (*ImportedMessage) ExtensionRangeArray() []proto.ExtensionRange { + return extRange_ImportedMessage +} +func (this *ImportedMessage) ExtensionMap() map[int32][]byte { + if this.XXX_extensions == nil { + this.XXX_extensions = make(map[int32][]byte) + } + return this.XXX_extensions +} + +type ImportedExtendable struct { + XXX_extensions map[int32][]byte `json:",omitempty"` + XXX_unrecognized []byte `json:",omitempty"` +} + +func (this *ImportedExtendable) Reset() { *this = ImportedExtendable{} } +func (this *ImportedExtendable) String() string { return proto.CompactTextString(this) } + +func (this *ImportedExtendable) Marshal() ([]byte, error) { + return proto.MarshalMessageSet(this.ExtensionMap()) +} +func (this *ImportedExtendable) Unmarshal(buf []byte) error { + return proto.UnmarshalMessageSet(buf, this.ExtensionMap()) +} +// ensure ImportedExtendable satisfies proto.Marshaler and proto.Unmarshaler +var _ proto.Marshaler = (*ImportedExtendable)(nil) +var _ proto.Unmarshaler = (*ImportedExtendable)(nil) + +var extRange_ImportedExtendable = []proto.ExtensionRange{ + proto.ExtensionRange{100, 536870911}, +} + +func (*ImportedExtendable) ExtensionRangeArray() []proto.ExtensionRange { + return extRange_ImportedExtendable +} +func (this *ImportedExtendable) ExtensionMap() map[int32][]byte { + if this.XXX_extensions == nil { + this.XXX_extensions = make(map[int32][]byte) + } + return this.XXX_extensions +} + +func init() { + proto.RegisterEnum("imp.ImportedMessage_Owner", ImportedMessage_Owner_name, ImportedMessage_Owner_value) +} diff --git a/vendor/github.com/golang/protobuf/protoc-gen-go/testdata/imp.proto b/vendor/github.com/golang/protobuf/protoc-gen-go/testdata/imp.proto new file mode 100644 index 000000000..156e078d1 --- /dev/null +++ b/vendor/github.com/golang/protobuf/protoc-gen-go/testdata/imp.proto @@ -0,0 +1,70 @@ +// 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. + +syntax = "proto2"; + +package imp; + +import "imp2.proto"; +import "imp3.proto"; + +message ImportedMessage { + required int64 field = 1; + + // The forwarded getters for these fields are fiddly to get right. + optional ImportedMessage2 local_msg = 2; + optional ForeignImportedMessage foreign_msg = 3; // in imp3.proto + optional Owner enum_field = 4; + oneof union { + int32 state = 9; + } + + repeated string name = 5; + repeated Owner boss = 6; + repeated ImportedMessage2 memo = 7; + + map msg_map = 8; + + enum Owner { + DAVE = 1; + MIKE = 2; + } + + extensions 90 to 100; +} + +message ImportedMessage2 { +} + +message ImportedExtendable { + option message_set_wire_format = true; + extensions 100 to max; +} diff --git a/vendor/github.com/golang/protobuf/protoc-gen-go/testdata/imp2.proto b/vendor/github.com/golang/protobuf/protoc-gen-go/testdata/imp2.proto new file mode 100644 index 000000000..3bb0632b2 --- /dev/null +++ b/vendor/github.com/golang/protobuf/protoc-gen-go/testdata/imp2.proto @@ -0,0 +1,43 @@ +// Go support for Protocol Buffers - Google's data interchange format +// +// Copyright 2011 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. + +syntax = "proto2"; + +package imp; + +message PubliclyImportedMessage { + optional int64 field = 1; +} + +enum PubliclyImportedEnum { + GLASSES = 1; + HAIR = 2; +} diff --git a/vendor/github.com/golang/protobuf/protoc-gen-go/testdata/imp3.proto b/vendor/github.com/golang/protobuf/protoc-gen-go/testdata/imp3.proto new file mode 100644 index 000000000..58fc7598b --- /dev/null +++ b/vendor/github.com/golang/protobuf/protoc-gen-go/testdata/imp3.proto @@ -0,0 +1,38 @@ +// Go support for Protocol Buffers - Google's data interchange format +// +// Copyright 2012 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. + +syntax = "proto2"; + +package imp; + +message ForeignImportedMessage { + optional string tuber = 1; +} diff --git a/vendor/github.com/golang/protobuf/protoc-gen-go/testdata/main_test.go b/vendor/github.com/golang/protobuf/protoc-gen-go/testdata/main_test.go new file mode 100644 index 000000000..f9b5ccf20 --- /dev/null +++ b/vendor/github.com/golang/protobuf/protoc-gen-go/testdata/main_test.go @@ -0,0 +1,46 @@ +// 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. + +// A simple binary to link together the protocol buffers in this test. + +package testdata + +import ( + "testing" + + mytestpb "./my_test" + multipb "github.com/golang/protobuf/protoc-gen-go/testdata/multi" +) + +func TestLink(t *testing.T) { + _ = &multipb.Multi1{} + _ = &mytestpb.Request{} +} diff --git a/vendor/github.com/golang/protobuf/protoc-gen-go/testdata/multi/multi1.proto b/vendor/github.com/golang/protobuf/protoc-gen-go/testdata/multi/multi1.proto new file mode 100644 index 000000000..0da6e0af4 --- /dev/null +++ b/vendor/github.com/golang/protobuf/protoc-gen-go/testdata/multi/multi1.proto @@ -0,0 +1,44 @@ +// 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. + +syntax = "proto2"; + +import "multi/multi2.proto"; +import "multi/multi3.proto"; + +package multitest; + +message Multi1 { + required Multi2 multi2 = 1; + optional Multi2.Color color = 2; + optional Multi3.HatType hat_type = 3; +} + diff --git a/vendor/github.com/golang/protobuf/protoc-gen-go/testdata/multi/multi2.proto b/vendor/github.com/golang/protobuf/protoc-gen-go/testdata/multi/multi2.proto new file mode 100644 index 000000000..e6bfc71b3 --- /dev/null +++ b/vendor/github.com/golang/protobuf/protoc-gen-go/testdata/multi/multi2.proto @@ -0,0 +1,46 @@ +// 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. + +syntax = "proto2"; + +package multitest; + +message Multi2 { + required int32 required_value = 1; + + enum Color { + BLUE = 1; + GREEN = 2; + RED = 3; + }; + optional Color color = 2; +} + diff --git a/vendor/github.com/golang/protobuf/protoc-gen-go/testdata/multi/multi3.proto b/vendor/github.com/golang/protobuf/protoc-gen-go/testdata/multi/multi3.proto new file mode 100644 index 000000000..146c255bd --- /dev/null +++ b/vendor/github.com/golang/protobuf/protoc-gen-go/testdata/multi/multi3.proto @@ -0,0 +1,43 @@ +// 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. + +syntax = "proto2"; + +package multitest; + +message Multi3 { + enum HatType { + FEDORA = 1; + FEZ = 2; + }; + optional HatType hat_type = 1; +} + diff --git a/vendor/github.com/golang/protobuf/protoc-gen-go/testdata/my_test/test.pb.go b/vendor/github.com/golang/protobuf/protoc-gen-go/testdata/my_test/test.pb.go new file mode 100644 index 000000000..997743beb --- /dev/null +++ b/vendor/github.com/golang/protobuf/protoc-gen-go/testdata/my_test/test.pb.go @@ -0,0 +1,882 @@ +// Code generated by protoc-gen-go. +// source: my_test/test.proto +// DO NOT EDIT! + +/* +Package my_test is a generated protocol buffer package. + +This package holds interesting messages. + +It is generated from these files: + my_test/test.proto + +It has these top-level messages: + Request + Reply + OtherBase + ReplyExtensions + OtherReplyExtensions + OldReply + Communique +*/ +package my_test + +import proto "github.com/golang/protobuf/proto" +import fmt "fmt" +import math "math" +import _ "github.com/golang/protobuf/protoc-gen-go/testdata/multi" + +// 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. +const _ = proto.ProtoPackageIsVersion1 + +type HatType int32 + +const ( + // deliberately skipping 0 + HatType_FEDORA HatType = 1 + HatType_FEZ HatType = 2 +) + +var HatType_name = map[int32]string{ + 1: "FEDORA", + 2: "FEZ", +} +var HatType_value = map[string]int32{ + "FEDORA": 1, + "FEZ": 2, +} + +func (x HatType) Enum() *HatType { + p := new(HatType) + *p = x + return p +} +func (x HatType) String() string { + return proto.EnumName(HatType_name, int32(x)) +} +func (x *HatType) UnmarshalJSON(data []byte) error { + value, err := proto.UnmarshalJSONEnum(HatType_value, data, "HatType") + if err != nil { + return err + } + *x = HatType(value) + return nil +} + +// This enum represents days of the week. +type Days int32 + +const ( + Days_MONDAY Days = 1 + Days_TUESDAY Days = 2 + Days_LUNDI Days = 1 +) + +var Days_name = map[int32]string{ + 1: "MONDAY", + 2: "TUESDAY", + // Duplicate value: 1: "LUNDI", +} +var Days_value = map[string]int32{ + "MONDAY": 1, + "TUESDAY": 2, + "LUNDI": 1, +} + +func (x Days) Enum() *Days { + p := new(Days) + *p = x + return p +} +func (x Days) String() string { + return proto.EnumName(Days_name, int32(x)) +} +func (x *Days) UnmarshalJSON(data []byte) error { + value, err := proto.UnmarshalJSONEnum(Days_value, data, "Days") + if err != nil { + return err + } + *x = Days(value) + return nil +} + +type Request_Color int32 + +const ( + Request_RED Request_Color = 0 + Request_GREEN Request_Color = 1 + Request_BLUE Request_Color = 2 +) + +var Request_Color_name = map[int32]string{ + 0: "RED", + 1: "GREEN", + 2: "BLUE", +} +var Request_Color_value = map[string]int32{ + "RED": 0, + "GREEN": 1, + "BLUE": 2, +} + +func (x Request_Color) Enum() *Request_Color { + p := new(Request_Color) + *p = x + return p +} +func (x Request_Color) String() string { + return proto.EnumName(Request_Color_name, int32(x)) +} +func (x *Request_Color) UnmarshalJSON(data []byte) error { + value, err := proto.UnmarshalJSONEnum(Request_Color_value, data, "Request_Color") + if err != nil { + return err + } + *x = Request_Color(value) + return nil +} + +type Reply_Entry_Game int32 + +const ( + Reply_Entry_FOOTBALL Reply_Entry_Game = 1 + Reply_Entry_TENNIS Reply_Entry_Game = 2 +) + +var Reply_Entry_Game_name = map[int32]string{ + 1: "FOOTBALL", + 2: "TENNIS", +} +var Reply_Entry_Game_value = map[string]int32{ + "FOOTBALL": 1, + "TENNIS": 2, +} + +func (x Reply_Entry_Game) Enum() *Reply_Entry_Game { + p := new(Reply_Entry_Game) + *p = x + return p +} +func (x Reply_Entry_Game) String() string { + return proto.EnumName(Reply_Entry_Game_name, int32(x)) +} +func (x *Reply_Entry_Game) UnmarshalJSON(data []byte) error { + value, err := proto.UnmarshalJSONEnum(Reply_Entry_Game_value, data, "Reply_Entry_Game") + if err != nil { + return err + } + *x = Reply_Entry_Game(value) + return nil +} + +// This is a message that might be sent somewhere. +type Request struct { + Key []int64 `protobuf:"varint,1,rep,name=key" json:"key,omitempty"` + // optional imp.ImportedMessage imported_message = 2; + Hue *Request_Color `protobuf:"varint,3,opt,name=hue,enum=my.test.Request_Color" json:"hue,omitempty"` + Hat *HatType `protobuf:"varint,4,opt,name=hat,enum=my.test.HatType,def=1" json:"hat,omitempty"` + // optional imp.ImportedMessage.Owner owner = 6; + Deadline *float32 `protobuf:"fixed32,7,opt,name=deadline,def=inf" json:"deadline,omitempty"` + Somegroup *Request_SomeGroup `protobuf:"group,8,opt,name=SomeGroup,json=somegroup" json:"somegroup,omitempty"` + // This is a map field. It will generate map[int32]string. + NameMapping map[int32]string `protobuf:"bytes,14,rep,name=name_mapping,json=nameMapping" json:"name_mapping,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + // This is a map field whose value type is a message. + MsgMapping map[int64]*Reply `protobuf:"bytes,15,rep,name=msg_mapping,json=msgMapping" json:"msg_mapping,omitempty" protobuf_key:"zigzag64,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + Reset_ *int32 `protobuf:"varint,12,opt,name=reset" json:"reset,omitempty"` + // This field should not conflict with any getters. + GetKey_ *string `protobuf:"bytes,16,opt,name=get_key,json=getKey" json:"get_key,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *Request) Reset() { *m = Request{} } +func (m *Request) String() string { return proto.CompactTextString(m) } +func (*Request) ProtoMessage() {} + +const Default_Request_Hat HatType = HatType_FEDORA + +var Default_Request_Deadline float32 = float32(math.Inf(1)) + +func (m *Request) GetKey() []int64 { + if m != nil { + return m.Key + } + return nil +} + +func (m *Request) GetHue() Request_Color { + if m != nil && m.Hue != nil { + return *m.Hue + } + return Request_RED +} + +func (m *Request) GetHat() HatType { + if m != nil && m.Hat != nil { + return *m.Hat + } + return Default_Request_Hat +} + +func (m *Request) GetDeadline() float32 { + if m != nil && m.Deadline != nil { + return *m.Deadline + } + return Default_Request_Deadline +} + +func (m *Request) GetSomegroup() *Request_SomeGroup { + if m != nil { + return m.Somegroup + } + return nil +} + +func (m *Request) GetNameMapping() map[int32]string { + if m != nil { + return m.NameMapping + } + return nil +} + +func (m *Request) GetMsgMapping() map[int64]*Reply { + if m != nil { + return m.MsgMapping + } + return nil +} + +func (m *Request) GetReset_() int32 { + if m != nil && m.Reset_ != nil { + return *m.Reset_ + } + return 0 +} + +func (m *Request) GetGetKey_() string { + if m != nil && m.GetKey_ != nil { + return *m.GetKey_ + } + return "" +} + +type Request_SomeGroup struct { + GroupField *int32 `protobuf:"varint,9,opt,name=group_field,json=groupField" json:"group_field,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *Request_SomeGroup) Reset() { *m = Request_SomeGroup{} } +func (m *Request_SomeGroup) String() string { return proto.CompactTextString(m) } +func (*Request_SomeGroup) ProtoMessage() {} + +func (m *Request_SomeGroup) GetGroupField() int32 { + if m != nil && m.GroupField != nil { + return *m.GroupField + } + return 0 +} + +type Reply struct { + Found []*Reply_Entry `protobuf:"bytes,1,rep,name=found" json:"found,omitempty"` + CompactKeys []int32 `protobuf:"varint,2,rep,packed,name=compact_keys,json=compactKeys" json:"compact_keys,omitempty"` + XXX_extensions map[int32]proto.Extension `json:"-"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *Reply) Reset() { *m = Reply{} } +func (m *Reply) String() string { return proto.CompactTextString(m) } +func (*Reply) ProtoMessage() {} + +var extRange_Reply = []proto.ExtensionRange{ + {100, 536870911}, +} + +func (*Reply) ExtensionRangeArray() []proto.ExtensionRange { + return extRange_Reply +} +func (m *Reply) ExtensionMap() map[int32]proto.Extension { + if m.XXX_extensions == nil { + m.XXX_extensions = make(map[int32]proto.Extension) + } + return m.XXX_extensions +} + +func (m *Reply) GetFound() []*Reply_Entry { + if m != nil { + return m.Found + } + return nil +} + +func (m *Reply) GetCompactKeys() []int32 { + if m != nil { + return m.CompactKeys + } + return nil +} + +type Reply_Entry struct { + KeyThatNeeds_1234Camel_CasIng *int64 `protobuf:"varint,1,req,name=key_that_needs_1234camel_CasIng,json=keyThatNeeds1234camelCasIng" json:"key_that_needs_1234camel_CasIng,omitempty"` + Value *int64 `protobuf:"varint,2,opt,name=value,def=7" json:"value,omitempty"` + XMyFieldName_2 *int64 `protobuf:"varint,3,opt,name=_my_field_name_2,json=myFieldName2" json:"_my_field_name_2,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *Reply_Entry) Reset() { *m = Reply_Entry{} } +func (m *Reply_Entry) String() string { return proto.CompactTextString(m) } +func (*Reply_Entry) ProtoMessage() {} + +const Default_Reply_Entry_Value int64 = 7 + +func (m *Reply_Entry) GetKeyThatNeeds_1234Camel_CasIng() int64 { + if m != nil && m.KeyThatNeeds_1234Camel_CasIng != nil { + return *m.KeyThatNeeds_1234Camel_CasIng + } + return 0 +} + +func (m *Reply_Entry) GetValue() int64 { + if m != nil && m.Value != nil { + return *m.Value + } + return Default_Reply_Entry_Value +} + +func (m *Reply_Entry) GetXMyFieldName_2() int64 { + if m != nil && m.XMyFieldName_2 != nil { + return *m.XMyFieldName_2 + } + return 0 +} + +type OtherBase struct { + Name *string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"` + XXX_extensions map[int32]proto.Extension `json:"-"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *OtherBase) Reset() { *m = OtherBase{} } +func (m *OtherBase) String() string { return proto.CompactTextString(m) } +func (*OtherBase) ProtoMessage() {} + +var extRange_OtherBase = []proto.ExtensionRange{ + {100, 536870911}, +} + +func (*OtherBase) ExtensionRangeArray() []proto.ExtensionRange { + return extRange_OtherBase +} +func (m *OtherBase) ExtensionMap() map[int32]proto.Extension { + if m.XXX_extensions == nil { + m.XXX_extensions = make(map[int32]proto.Extension) + } + return m.XXX_extensions +} + +func (m *OtherBase) GetName() string { + if m != nil && m.Name != nil { + return *m.Name + } + return "" +} + +type ReplyExtensions struct { + XXX_unrecognized []byte `json:"-"` +} + +func (m *ReplyExtensions) Reset() { *m = ReplyExtensions{} } +func (m *ReplyExtensions) String() string { return proto.CompactTextString(m) } +func (*ReplyExtensions) ProtoMessage() {} + +var E_ReplyExtensions_Time = &proto.ExtensionDesc{ + ExtendedType: (*Reply)(nil), + ExtensionType: (*float64)(nil), + Field: 101, + Name: "my.test.ReplyExtensions.time", + Tag: "fixed64,101,opt,name=time", +} + +var E_ReplyExtensions_Carrot = &proto.ExtensionDesc{ + ExtendedType: (*Reply)(nil), + ExtensionType: (*ReplyExtensions)(nil), + Field: 105, + Name: "my.test.ReplyExtensions.carrot", + Tag: "bytes,105,opt,name=carrot", +} + +var E_ReplyExtensions_Donut = &proto.ExtensionDesc{ + ExtendedType: (*OtherBase)(nil), + ExtensionType: (*ReplyExtensions)(nil), + Field: 101, + Name: "my.test.ReplyExtensions.donut", + Tag: "bytes,101,opt,name=donut", +} + +type OtherReplyExtensions struct { + Key *int32 `protobuf:"varint,1,opt,name=key" json:"key,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *OtherReplyExtensions) Reset() { *m = OtherReplyExtensions{} } +func (m *OtherReplyExtensions) String() string { return proto.CompactTextString(m) } +func (*OtherReplyExtensions) ProtoMessage() {} + +func (m *OtherReplyExtensions) GetKey() int32 { + if m != nil && m.Key != nil { + return *m.Key + } + return 0 +} + +type OldReply struct { + XXX_extensions map[int32]proto.Extension `json:"-"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *OldReply) Reset() { *m = OldReply{} } +func (m *OldReply) String() string { return proto.CompactTextString(m) } +func (*OldReply) ProtoMessage() {} + +func (m *OldReply) Marshal() ([]byte, error) { + return proto.MarshalMessageSet(m.ExtensionMap()) +} +func (m *OldReply) Unmarshal(buf []byte) error { + return proto.UnmarshalMessageSet(buf, m.ExtensionMap()) +} +func (m *OldReply) MarshalJSON() ([]byte, error) { + return proto.MarshalMessageSetJSON(m.XXX_extensions) +} +func (m *OldReply) UnmarshalJSON(buf []byte) error { + return proto.UnmarshalMessageSetJSON(buf, m.XXX_extensions) +} + +// ensure OldReply satisfies proto.Marshaler and proto.Unmarshaler +var _ proto.Marshaler = (*OldReply)(nil) +var _ proto.Unmarshaler = (*OldReply)(nil) + +var extRange_OldReply = []proto.ExtensionRange{ + {100, 2147483646}, +} + +func (*OldReply) ExtensionRangeArray() []proto.ExtensionRange { + return extRange_OldReply +} +func (m *OldReply) ExtensionMap() map[int32]proto.Extension { + if m.XXX_extensions == nil { + m.XXX_extensions = make(map[int32]proto.Extension) + } + return m.XXX_extensions +} + +type Communique struct { + MakeMeCry *bool `protobuf:"varint,1,opt,name=make_me_cry,json=makeMeCry" json:"make_me_cry,omitempty"` + // This is a oneof, called "union". + // + // Types that are valid to be assigned to Union: + // *Communique_Number + // *Communique_Name + // *Communique_Data + // *Communique_TempC + // *Communique_Height + // *Communique_Today + // *Communique_Maybe + // *Communique_Delta_ + // *Communique_Msg + // *Communique_Somegroup + Union isCommunique_Union `protobuf_oneof:"union"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *Communique) Reset() { *m = Communique{} } +func (m *Communique) String() string { return proto.CompactTextString(m) } +func (*Communique) ProtoMessage() {} + +type isCommunique_Union interface { + isCommunique_Union() +} + +type Communique_Number struct { + Number int32 `protobuf:"varint,5,opt,name=number,oneof"` +} +type Communique_Name struct { + Name string `protobuf:"bytes,6,opt,name=name,oneof"` +} +type Communique_Data struct { + Data []byte `protobuf:"bytes,7,opt,name=data,oneof"` +} +type Communique_TempC struct { + TempC float64 `protobuf:"fixed64,8,opt,name=temp_c,json=tempC,oneof"` +} +type Communique_Height struct { + Height float32 `protobuf:"fixed32,9,opt,name=height,oneof"` +} +type Communique_Today struct { + Today Days `protobuf:"varint,10,opt,name=today,enum=my.test.Days,oneof"` +} +type Communique_Maybe struct { + Maybe bool `protobuf:"varint,11,opt,name=maybe,oneof"` +} +type Communique_Delta_ struct { + Delta int32 `protobuf:"zigzag32,12,opt,name=delta,oneof"` +} +type Communique_Msg struct { + Msg *Reply `protobuf:"bytes,13,opt,name=msg,oneof"` +} +type Communique_Somegroup struct { + Somegroup *Communique_SomeGroup `protobuf:"group,14,opt,name=SomeGroup,json=somegroup,oneof"` +} + +func (*Communique_Number) isCommunique_Union() {} +func (*Communique_Name) isCommunique_Union() {} +func (*Communique_Data) isCommunique_Union() {} +func (*Communique_TempC) isCommunique_Union() {} +func (*Communique_Height) isCommunique_Union() {} +func (*Communique_Today) isCommunique_Union() {} +func (*Communique_Maybe) isCommunique_Union() {} +func (*Communique_Delta_) isCommunique_Union() {} +func (*Communique_Msg) isCommunique_Union() {} +func (*Communique_Somegroup) isCommunique_Union() {} + +func (m *Communique) GetUnion() isCommunique_Union { + if m != nil { + return m.Union + } + return nil +} + +func (m *Communique) GetMakeMeCry() bool { + if m != nil && m.MakeMeCry != nil { + return *m.MakeMeCry + } + return false +} + +func (m *Communique) GetNumber() int32 { + if x, ok := m.GetUnion().(*Communique_Number); ok { + return x.Number + } + return 0 +} + +func (m *Communique) GetName() string { + if x, ok := m.GetUnion().(*Communique_Name); ok { + return x.Name + } + return "" +} + +func (m *Communique) GetData() []byte { + if x, ok := m.GetUnion().(*Communique_Data); ok { + return x.Data + } + return nil +} + +func (m *Communique) GetTempC() float64 { + if x, ok := m.GetUnion().(*Communique_TempC); ok { + return x.TempC + } + return 0 +} + +func (m *Communique) GetHeight() float32 { + if x, ok := m.GetUnion().(*Communique_Height); ok { + return x.Height + } + return 0 +} + +func (m *Communique) GetToday() Days { + if x, ok := m.GetUnion().(*Communique_Today); ok { + return x.Today + } + return Days_MONDAY +} + +func (m *Communique) GetMaybe() bool { + if x, ok := m.GetUnion().(*Communique_Maybe); ok { + return x.Maybe + } + return false +} + +func (m *Communique) GetDelta() int32 { + if x, ok := m.GetUnion().(*Communique_Delta_); ok { + return x.Delta + } + return 0 +} + +func (m *Communique) GetMsg() *Reply { + if x, ok := m.GetUnion().(*Communique_Msg); ok { + return x.Msg + } + return nil +} + +func (m *Communique) GetSomegroup() *Communique_SomeGroup { + if x, ok := m.GetUnion().(*Communique_Somegroup); ok { + return x.Somegroup + } + return nil +} + +// XXX_OneofFuncs is for the internal use of the proto package. +func (*Communique) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{}) { + return _Communique_OneofMarshaler, _Communique_OneofUnmarshaler, _Communique_OneofSizer, []interface{}{ + (*Communique_Number)(nil), + (*Communique_Name)(nil), + (*Communique_Data)(nil), + (*Communique_TempC)(nil), + (*Communique_Height)(nil), + (*Communique_Today)(nil), + (*Communique_Maybe)(nil), + (*Communique_Delta_)(nil), + (*Communique_Msg)(nil), + (*Communique_Somegroup)(nil), + } +} + +func _Communique_OneofMarshaler(msg proto.Message, b *proto.Buffer) error { + m := msg.(*Communique) + // union + switch x := m.Union.(type) { + case *Communique_Number: + b.EncodeVarint(5<<3 | proto.WireVarint) + b.EncodeVarint(uint64(x.Number)) + case *Communique_Name: + b.EncodeVarint(6<<3 | proto.WireBytes) + b.EncodeStringBytes(x.Name) + case *Communique_Data: + b.EncodeVarint(7<<3 | proto.WireBytes) + b.EncodeRawBytes(x.Data) + case *Communique_TempC: + b.EncodeVarint(8<<3 | proto.WireFixed64) + b.EncodeFixed64(math.Float64bits(x.TempC)) + case *Communique_Height: + b.EncodeVarint(9<<3 | proto.WireFixed32) + b.EncodeFixed32(uint64(math.Float32bits(x.Height))) + case *Communique_Today: + b.EncodeVarint(10<<3 | proto.WireVarint) + b.EncodeVarint(uint64(x.Today)) + case *Communique_Maybe: + t := uint64(0) + if x.Maybe { + t = 1 + } + b.EncodeVarint(11<<3 | proto.WireVarint) + b.EncodeVarint(t) + case *Communique_Delta_: + b.EncodeVarint(12<<3 | proto.WireVarint) + b.EncodeZigzag32(uint64(x.Delta)) + case *Communique_Msg: + b.EncodeVarint(13<<3 | proto.WireBytes) + if err := b.EncodeMessage(x.Msg); err != nil { + return err + } + case *Communique_Somegroup: + b.EncodeVarint(14<<3 | proto.WireStartGroup) + if err := b.Marshal(x.Somegroup); err != nil { + return err + } + b.EncodeVarint(14<<3 | proto.WireEndGroup) + case nil: + default: + return fmt.Errorf("Communique.Union has unexpected type %T", x) + } + return nil +} + +func _Communique_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) { + m := msg.(*Communique) + switch tag { + case 5: // union.number + if wire != proto.WireVarint { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeVarint() + m.Union = &Communique_Number{int32(x)} + return true, err + case 6: // union.name + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeStringBytes() + m.Union = &Communique_Name{x} + return true, err + case 7: // union.data + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeRawBytes(true) + m.Union = &Communique_Data{x} + return true, err + case 8: // union.temp_c + if wire != proto.WireFixed64 { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeFixed64() + m.Union = &Communique_TempC{math.Float64frombits(x)} + return true, err + case 9: // union.height + if wire != proto.WireFixed32 { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeFixed32() + m.Union = &Communique_Height{math.Float32frombits(uint32(x))} + return true, err + case 10: // union.today + if wire != proto.WireVarint { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeVarint() + m.Union = &Communique_Today{Days(x)} + return true, err + case 11: // union.maybe + if wire != proto.WireVarint { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeVarint() + m.Union = &Communique_Maybe{x != 0} + return true, err + case 12: // union.delta + if wire != proto.WireVarint { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeZigzag32() + m.Union = &Communique_Delta_{int32(x)} + return true, err + case 13: // union.msg + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + msg := new(Reply) + err := b.DecodeMessage(msg) + m.Union = &Communique_Msg{msg} + return true, err + case 14: // union.somegroup + if wire != proto.WireStartGroup { + return true, proto.ErrInternalBadWireType + } + msg := new(Communique_SomeGroup) + err := b.DecodeGroup(msg) + m.Union = &Communique_Somegroup{msg} + return true, err + default: + return false, nil + } +} + +func _Communique_OneofSizer(msg proto.Message) (n int) { + m := msg.(*Communique) + // union + switch x := m.Union.(type) { + case *Communique_Number: + n += proto.SizeVarint(5<<3 | proto.WireVarint) + n += proto.SizeVarint(uint64(x.Number)) + case *Communique_Name: + n += proto.SizeVarint(6<<3 | proto.WireBytes) + n += proto.SizeVarint(uint64(len(x.Name))) + n += len(x.Name) + case *Communique_Data: + n += proto.SizeVarint(7<<3 | proto.WireBytes) + n += proto.SizeVarint(uint64(len(x.Data))) + n += len(x.Data) + case *Communique_TempC: + n += proto.SizeVarint(8<<3 | proto.WireFixed64) + n += 8 + case *Communique_Height: + n += proto.SizeVarint(9<<3 | proto.WireFixed32) + n += 4 + case *Communique_Today: + n += proto.SizeVarint(10<<3 | proto.WireVarint) + n += proto.SizeVarint(uint64(x.Today)) + case *Communique_Maybe: + n += proto.SizeVarint(11<<3 | proto.WireVarint) + n += 1 + case *Communique_Delta_: + n += proto.SizeVarint(12<<3 | proto.WireVarint) + n += proto.SizeVarint(uint64((uint32(x.Delta) << 1) ^ uint32((int32(x.Delta) >> 31)))) + case *Communique_Msg: + s := proto.Size(x.Msg) + n += proto.SizeVarint(13<<3 | proto.WireBytes) + n += proto.SizeVarint(uint64(s)) + n += s + case *Communique_Somegroup: + n += proto.SizeVarint(14<<3 | proto.WireStartGroup) + n += proto.Size(x.Somegroup) + n += proto.SizeVarint(14<<3 | proto.WireEndGroup) + case nil: + default: + panic(fmt.Sprintf("proto: unexpected type %T in oneof", x)) + } + return n +} + +type Communique_SomeGroup struct { + Member *string `protobuf:"bytes,15,opt,name=member" json:"member,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *Communique_SomeGroup) Reset() { *m = Communique_SomeGroup{} } +func (m *Communique_SomeGroup) String() string { return proto.CompactTextString(m) } +func (*Communique_SomeGroup) ProtoMessage() {} + +func (m *Communique_SomeGroup) GetMember() string { + if m != nil && m.Member != nil { + return *m.Member + } + return "" +} + +type Communique_Delta struct { + XXX_unrecognized []byte `json:"-"` +} + +func (m *Communique_Delta) Reset() { *m = Communique_Delta{} } +func (m *Communique_Delta) String() string { return proto.CompactTextString(m) } +func (*Communique_Delta) ProtoMessage() {} + +var E_Tag = &proto.ExtensionDesc{ + ExtendedType: (*Reply)(nil), + ExtensionType: (*string)(nil), + Field: 103, + Name: "my.test.tag", + Tag: "bytes,103,opt,name=tag", +} + +var E_Donut = &proto.ExtensionDesc{ + ExtendedType: (*Reply)(nil), + ExtensionType: (*OtherReplyExtensions)(nil), + Field: 106, + Name: "my.test.donut", + Tag: "bytes,106,opt,name=donut", +} + +func init() { + proto.RegisterType((*Request)(nil), "my.test.Request") + proto.RegisterType((*Request_SomeGroup)(nil), "my.test.Request.SomeGroup") + proto.RegisterType((*Reply)(nil), "my.test.Reply") + proto.RegisterType((*Reply_Entry)(nil), "my.test.Reply.Entry") + proto.RegisterType((*OtherBase)(nil), "my.test.OtherBase") + proto.RegisterType((*ReplyExtensions)(nil), "my.test.ReplyExtensions") + proto.RegisterType((*OtherReplyExtensions)(nil), "my.test.OtherReplyExtensions") + proto.RegisterType((*OldReply)(nil), "my.test.OldReply") + proto.RegisterType((*Communique)(nil), "my.test.Communique") + proto.RegisterType((*Communique_SomeGroup)(nil), "my.test.Communique.SomeGroup") + proto.RegisterType((*Communique_Delta)(nil), "my.test.Communique.Delta") + proto.RegisterEnum("my.test.HatType", HatType_name, HatType_value) + proto.RegisterEnum("my.test.Days", Days_name, Days_value) + proto.RegisterEnum("my.test.Request_Color", Request_Color_name, Request_Color_value) + proto.RegisterEnum("my.test.Reply_Entry_Game", Reply_Entry_Game_name, Reply_Entry_Game_value) + proto.RegisterExtension(E_ReplyExtensions_Time) + proto.RegisterExtension(E_ReplyExtensions_Carrot) + proto.RegisterExtension(E_ReplyExtensions_Donut) + proto.RegisterExtension(E_Tag) + proto.RegisterExtension(E_Donut) +} diff --git a/vendor/github.com/golang/protobuf/protoc-gen-go/testdata/my_test/test.pb.go.golden b/vendor/github.com/golang/protobuf/protoc-gen-go/testdata/my_test/test.pb.go.golden new file mode 100644 index 000000000..997743beb --- /dev/null +++ b/vendor/github.com/golang/protobuf/protoc-gen-go/testdata/my_test/test.pb.go.golden @@ -0,0 +1,882 @@ +// Code generated by protoc-gen-go. +// source: my_test/test.proto +// DO NOT EDIT! + +/* +Package my_test is a generated protocol buffer package. + +This package holds interesting messages. + +It is generated from these files: + my_test/test.proto + +It has these top-level messages: + Request + Reply + OtherBase + ReplyExtensions + OtherReplyExtensions + OldReply + Communique +*/ +package my_test + +import proto "github.com/golang/protobuf/proto" +import fmt "fmt" +import math "math" +import _ "github.com/golang/protobuf/protoc-gen-go/testdata/multi" + +// 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. +const _ = proto.ProtoPackageIsVersion1 + +type HatType int32 + +const ( + // deliberately skipping 0 + HatType_FEDORA HatType = 1 + HatType_FEZ HatType = 2 +) + +var HatType_name = map[int32]string{ + 1: "FEDORA", + 2: "FEZ", +} +var HatType_value = map[string]int32{ + "FEDORA": 1, + "FEZ": 2, +} + +func (x HatType) Enum() *HatType { + p := new(HatType) + *p = x + return p +} +func (x HatType) String() string { + return proto.EnumName(HatType_name, int32(x)) +} +func (x *HatType) UnmarshalJSON(data []byte) error { + value, err := proto.UnmarshalJSONEnum(HatType_value, data, "HatType") + if err != nil { + return err + } + *x = HatType(value) + return nil +} + +// This enum represents days of the week. +type Days int32 + +const ( + Days_MONDAY Days = 1 + Days_TUESDAY Days = 2 + Days_LUNDI Days = 1 +) + +var Days_name = map[int32]string{ + 1: "MONDAY", + 2: "TUESDAY", + // Duplicate value: 1: "LUNDI", +} +var Days_value = map[string]int32{ + "MONDAY": 1, + "TUESDAY": 2, + "LUNDI": 1, +} + +func (x Days) Enum() *Days { + p := new(Days) + *p = x + return p +} +func (x Days) String() string { + return proto.EnumName(Days_name, int32(x)) +} +func (x *Days) UnmarshalJSON(data []byte) error { + value, err := proto.UnmarshalJSONEnum(Days_value, data, "Days") + if err != nil { + return err + } + *x = Days(value) + return nil +} + +type Request_Color int32 + +const ( + Request_RED Request_Color = 0 + Request_GREEN Request_Color = 1 + Request_BLUE Request_Color = 2 +) + +var Request_Color_name = map[int32]string{ + 0: "RED", + 1: "GREEN", + 2: "BLUE", +} +var Request_Color_value = map[string]int32{ + "RED": 0, + "GREEN": 1, + "BLUE": 2, +} + +func (x Request_Color) Enum() *Request_Color { + p := new(Request_Color) + *p = x + return p +} +func (x Request_Color) String() string { + return proto.EnumName(Request_Color_name, int32(x)) +} +func (x *Request_Color) UnmarshalJSON(data []byte) error { + value, err := proto.UnmarshalJSONEnum(Request_Color_value, data, "Request_Color") + if err != nil { + return err + } + *x = Request_Color(value) + return nil +} + +type Reply_Entry_Game int32 + +const ( + Reply_Entry_FOOTBALL Reply_Entry_Game = 1 + Reply_Entry_TENNIS Reply_Entry_Game = 2 +) + +var Reply_Entry_Game_name = map[int32]string{ + 1: "FOOTBALL", + 2: "TENNIS", +} +var Reply_Entry_Game_value = map[string]int32{ + "FOOTBALL": 1, + "TENNIS": 2, +} + +func (x Reply_Entry_Game) Enum() *Reply_Entry_Game { + p := new(Reply_Entry_Game) + *p = x + return p +} +func (x Reply_Entry_Game) String() string { + return proto.EnumName(Reply_Entry_Game_name, int32(x)) +} +func (x *Reply_Entry_Game) UnmarshalJSON(data []byte) error { + value, err := proto.UnmarshalJSONEnum(Reply_Entry_Game_value, data, "Reply_Entry_Game") + if err != nil { + return err + } + *x = Reply_Entry_Game(value) + return nil +} + +// This is a message that might be sent somewhere. +type Request struct { + Key []int64 `protobuf:"varint,1,rep,name=key" json:"key,omitempty"` + // optional imp.ImportedMessage imported_message = 2; + Hue *Request_Color `protobuf:"varint,3,opt,name=hue,enum=my.test.Request_Color" json:"hue,omitempty"` + Hat *HatType `protobuf:"varint,4,opt,name=hat,enum=my.test.HatType,def=1" json:"hat,omitempty"` + // optional imp.ImportedMessage.Owner owner = 6; + Deadline *float32 `protobuf:"fixed32,7,opt,name=deadline,def=inf" json:"deadline,omitempty"` + Somegroup *Request_SomeGroup `protobuf:"group,8,opt,name=SomeGroup,json=somegroup" json:"somegroup,omitempty"` + // This is a map field. It will generate map[int32]string. + NameMapping map[int32]string `protobuf:"bytes,14,rep,name=name_mapping,json=nameMapping" json:"name_mapping,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + // This is a map field whose value type is a message. + MsgMapping map[int64]*Reply `protobuf:"bytes,15,rep,name=msg_mapping,json=msgMapping" json:"msg_mapping,omitempty" protobuf_key:"zigzag64,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + Reset_ *int32 `protobuf:"varint,12,opt,name=reset" json:"reset,omitempty"` + // This field should not conflict with any getters. + GetKey_ *string `protobuf:"bytes,16,opt,name=get_key,json=getKey" json:"get_key,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *Request) Reset() { *m = Request{} } +func (m *Request) String() string { return proto.CompactTextString(m) } +func (*Request) ProtoMessage() {} + +const Default_Request_Hat HatType = HatType_FEDORA + +var Default_Request_Deadline float32 = float32(math.Inf(1)) + +func (m *Request) GetKey() []int64 { + if m != nil { + return m.Key + } + return nil +} + +func (m *Request) GetHue() Request_Color { + if m != nil && m.Hue != nil { + return *m.Hue + } + return Request_RED +} + +func (m *Request) GetHat() HatType { + if m != nil && m.Hat != nil { + return *m.Hat + } + return Default_Request_Hat +} + +func (m *Request) GetDeadline() float32 { + if m != nil && m.Deadline != nil { + return *m.Deadline + } + return Default_Request_Deadline +} + +func (m *Request) GetSomegroup() *Request_SomeGroup { + if m != nil { + return m.Somegroup + } + return nil +} + +func (m *Request) GetNameMapping() map[int32]string { + if m != nil { + return m.NameMapping + } + return nil +} + +func (m *Request) GetMsgMapping() map[int64]*Reply { + if m != nil { + return m.MsgMapping + } + return nil +} + +func (m *Request) GetReset_() int32 { + if m != nil && m.Reset_ != nil { + return *m.Reset_ + } + return 0 +} + +func (m *Request) GetGetKey_() string { + if m != nil && m.GetKey_ != nil { + return *m.GetKey_ + } + return "" +} + +type Request_SomeGroup struct { + GroupField *int32 `protobuf:"varint,9,opt,name=group_field,json=groupField" json:"group_field,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *Request_SomeGroup) Reset() { *m = Request_SomeGroup{} } +func (m *Request_SomeGroup) String() string { return proto.CompactTextString(m) } +func (*Request_SomeGroup) ProtoMessage() {} + +func (m *Request_SomeGroup) GetGroupField() int32 { + if m != nil && m.GroupField != nil { + return *m.GroupField + } + return 0 +} + +type Reply struct { + Found []*Reply_Entry `protobuf:"bytes,1,rep,name=found" json:"found,omitempty"` + CompactKeys []int32 `protobuf:"varint,2,rep,packed,name=compact_keys,json=compactKeys" json:"compact_keys,omitempty"` + XXX_extensions map[int32]proto.Extension `json:"-"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *Reply) Reset() { *m = Reply{} } +func (m *Reply) String() string { return proto.CompactTextString(m) } +func (*Reply) ProtoMessage() {} + +var extRange_Reply = []proto.ExtensionRange{ + {100, 536870911}, +} + +func (*Reply) ExtensionRangeArray() []proto.ExtensionRange { + return extRange_Reply +} +func (m *Reply) ExtensionMap() map[int32]proto.Extension { + if m.XXX_extensions == nil { + m.XXX_extensions = make(map[int32]proto.Extension) + } + return m.XXX_extensions +} + +func (m *Reply) GetFound() []*Reply_Entry { + if m != nil { + return m.Found + } + return nil +} + +func (m *Reply) GetCompactKeys() []int32 { + if m != nil { + return m.CompactKeys + } + return nil +} + +type Reply_Entry struct { + KeyThatNeeds_1234Camel_CasIng *int64 `protobuf:"varint,1,req,name=key_that_needs_1234camel_CasIng,json=keyThatNeeds1234camelCasIng" json:"key_that_needs_1234camel_CasIng,omitempty"` + Value *int64 `protobuf:"varint,2,opt,name=value,def=7" json:"value,omitempty"` + XMyFieldName_2 *int64 `protobuf:"varint,3,opt,name=_my_field_name_2,json=myFieldName2" json:"_my_field_name_2,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *Reply_Entry) Reset() { *m = Reply_Entry{} } +func (m *Reply_Entry) String() string { return proto.CompactTextString(m) } +func (*Reply_Entry) ProtoMessage() {} + +const Default_Reply_Entry_Value int64 = 7 + +func (m *Reply_Entry) GetKeyThatNeeds_1234Camel_CasIng() int64 { + if m != nil && m.KeyThatNeeds_1234Camel_CasIng != nil { + return *m.KeyThatNeeds_1234Camel_CasIng + } + return 0 +} + +func (m *Reply_Entry) GetValue() int64 { + if m != nil && m.Value != nil { + return *m.Value + } + return Default_Reply_Entry_Value +} + +func (m *Reply_Entry) GetXMyFieldName_2() int64 { + if m != nil && m.XMyFieldName_2 != nil { + return *m.XMyFieldName_2 + } + return 0 +} + +type OtherBase struct { + Name *string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"` + XXX_extensions map[int32]proto.Extension `json:"-"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *OtherBase) Reset() { *m = OtherBase{} } +func (m *OtherBase) String() string { return proto.CompactTextString(m) } +func (*OtherBase) ProtoMessage() {} + +var extRange_OtherBase = []proto.ExtensionRange{ + {100, 536870911}, +} + +func (*OtherBase) ExtensionRangeArray() []proto.ExtensionRange { + return extRange_OtherBase +} +func (m *OtherBase) ExtensionMap() map[int32]proto.Extension { + if m.XXX_extensions == nil { + m.XXX_extensions = make(map[int32]proto.Extension) + } + return m.XXX_extensions +} + +func (m *OtherBase) GetName() string { + if m != nil && m.Name != nil { + return *m.Name + } + return "" +} + +type ReplyExtensions struct { + XXX_unrecognized []byte `json:"-"` +} + +func (m *ReplyExtensions) Reset() { *m = ReplyExtensions{} } +func (m *ReplyExtensions) String() string { return proto.CompactTextString(m) } +func (*ReplyExtensions) ProtoMessage() {} + +var E_ReplyExtensions_Time = &proto.ExtensionDesc{ + ExtendedType: (*Reply)(nil), + ExtensionType: (*float64)(nil), + Field: 101, + Name: "my.test.ReplyExtensions.time", + Tag: "fixed64,101,opt,name=time", +} + +var E_ReplyExtensions_Carrot = &proto.ExtensionDesc{ + ExtendedType: (*Reply)(nil), + ExtensionType: (*ReplyExtensions)(nil), + Field: 105, + Name: "my.test.ReplyExtensions.carrot", + Tag: "bytes,105,opt,name=carrot", +} + +var E_ReplyExtensions_Donut = &proto.ExtensionDesc{ + ExtendedType: (*OtherBase)(nil), + ExtensionType: (*ReplyExtensions)(nil), + Field: 101, + Name: "my.test.ReplyExtensions.donut", + Tag: "bytes,101,opt,name=donut", +} + +type OtherReplyExtensions struct { + Key *int32 `protobuf:"varint,1,opt,name=key" json:"key,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *OtherReplyExtensions) Reset() { *m = OtherReplyExtensions{} } +func (m *OtherReplyExtensions) String() string { return proto.CompactTextString(m) } +func (*OtherReplyExtensions) ProtoMessage() {} + +func (m *OtherReplyExtensions) GetKey() int32 { + if m != nil && m.Key != nil { + return *m.Key + } + return 0 +} + +type OldReply struct { + XXX_extensions map[int32]proto.Extension `json:"-"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *OldReply) Reset() { *m = OldReply{} } +func (m *OldReply) String() string { return proto.CompactTextString(m) } +func (*OldReply) ProtoMessage() {} + +func (m *OldReply) Marshal() ([]byte, error) { + return proto.MarshalMessageSet(m.ExtensionMap()) +} +func (m *OldReply) Unmarshal(buf []byte) error { + return proto.UnmarshalMessageSet(buf, m.ExtensionMap()) +} +func (m *OldReply) MarshalJSON() ([]byte, error) { + return proto.MarshalMessageSetJSON(m.XXX_extensions) +} +func (m *OldReply) UnmarshalJSON(buf []byte) error { + return proto.UnmarshalMessageSetJSON(buf, m.XXX_extensions) +} + +// ensure OldReply satisfies proto.Marshaler and proto.Unmarshaler +var _ proto.Marshaler = (*OldReply)(nil) +var _ proto.Unmarshaler = (*OldReply)(nil) + +var extRange_OldReply = []proto.ExtensionRange{ + {100, 2147483646}, +} + +func (*OldReply) ExtensionRangeArray() []proto.ExtensionRange { + return extRange_OldReply +} +func (m *OldReply) ExtensionMap() map[int32]proto.Extension { + if m.XXX_extensions == nil { + m.XXX_extensions = make(map[int32]proto.Extension) + } + return m.XXX_extensions +} + +type Communique struct { + MakeMeCry *bool `protobuf:"varint,1,opt,name=make_me_cry,json=makeMeCry" json:"make_me_cry,omitempty"` + // This is a oneof, called "union". + // + // Types that are valid to be assigned to Union: + // *Communique_Number + // *Communique_Name + // *Communique_Data + // *Communique_TempC + // *Communique_Height + // *Communique_Today + // *Communique_Maybe + // *Communique_Delta_ + // *Communique_Msg + // *Communique_Somegroup + Union isCommunique_Union `protobuf_oneof:"union"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *Communique) Reset() { *m = Communique{} } +func (m *Communique) String() string { return proto.CompactTextString(m) } +func (*Communique) ProtoMessage() {} + +type isCommunique_Union interface { + isCommunique_Union() +} + +type Communique_Number struct { + Number int32 `protobuf:"varint,5,opt,name=number,oneof"` +} +type Communique_Name struct { + Name string `protobuf:"bytes,6,opt,name=name,oneof"` +} +type Communique_Data struct { + Data []byte `protobuf:"bytes,7,opt,name=data,oneof"` +} +type Communique_TempC struct { + TempC float64 `protobuf:"fixed64,8,opt,name=temp_c,json=tempC,oneof"` +} +type Communique_Height struct { + Height float32 `protobuf:"fixed32,9,opt,name=height,oneof"` +} +type Communique_Today struct { + Today Days `protobuf:"varint,10,opt,name=today,enum=my.test.Days,oneof"` +} +type Communique_Maybe struct { + Maybe bool `protobuf:"varint,11,opt,name=maybe,oneof"` +} +type Communique_Delta_ struct { + Delta int32 `protobuf:"zigzag32,12,opt,name=delta,oneof"` +} +type Communique_Msg struct { + Msg *Reply `protobuf:"bytes,13,opt,name=msg,oneof"` +} +type Communique_Somegroup struct { + Somegroup *Communique_SomeGroup `protobuf:"group,14,opt,name=SomeGroup,json=somegroup,oneof"` +} + +func (*Communique_Number) isCommunique_Union() {} +func (*Communique_Name) isCommunique_Union() {} +func (*Communique_Data) isCommunique_Union() {} +func (*Communique_TempC) isCommunique_Union() {} +func (*Communique_Height) isCommunique_Union() {} +func (*Communique_Today) isCommunique_Union() {} +func (*Communique_Maybe) isCommunique_Union() {} +func (*Communique_Delta_) isCommunique_Union() {} +func (*Communique_Msg) isCommunique_Union() {} +func (*Communique_Somegroup) isCommunique_Union() {} + +func (m *Communique) GetUnion() isCommunique_Union { + if m != nil { + return m.Union + } + return nil +} + +func (m *Communique) GetMakeMeCry() bool { + if m != nil && m.MakeMeCry != nil { + return *m.MakeMeCry + } + return false +} + +func (m *Communique) GetNumber() int32 { + if x, ok := m.GetUnion().(*Communique_Number); ok { + return x.Number + } + return 0 +} + +func (m *Communique) GetName() string { + if x, ok := m.GetUnion().(*Communique_Name); ok { + return x.Name + } + return "" +} + +func (m *Communique) GetData() []byte { + if x, ok := m.GetUnion().(*Communique_Data); ok { + return x.Data + } + return nil +} + +func (m *Communique) GetTempC() float64 { + if x, ok := m.GetUnion().(*Communique_TempC); ok { + return x.TempC + } + return 0 +} + +func (m *Communique) GetHeight() float32 { + if x, ok := m.GetUnion().(*Communique_Height); ok { + return x.Height + } + return 0 +} + +func (m *Communique) GetToday() Days { + if x, ok := m.GetUnion().(*Communique_Today); ok { + return x.Today + } + return Days_MONDAY +} + +func (m *Communique) GetMaybe() bool { + if x, ok := m.GetUnion().(*Communique_Maybe); ok { + return x.Maybe + } + return false +} + +func (m *Communique) GetDelta() int32 { + if x, ok := m.GetUnion().(*Communique_Delta_); ok { + return x.Delta + } + return 0 +} + +func (m *Communique) GetMsg() *Reply { + if x, ok := m.GetUnion().(*Communique_Msg); ok { + return x.Msg + } + return nil +} + +func (m *Communique) GetSomegroup() *Communique_SomeGroup { + if x, ok := m.GetUnion().(*Communique_Somegroup); ok { + return x.Somegroup + } + return nil +} + +// XXX_OneofFuncs is for the internal use of the proto package. +func (*Communique) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{}) { + return _Communique_OneofMarshaler, _Communique_OneofUnmarshaler, _Communique_OneofSizer, []interface{}{ + (*Communique_Number)(nil), + (*Communique_Name)(nil), + (*Communique_Data)(nil), + (*Communique_TempC)(nil), + (*Communique_Height)(nil), + (*Communique_Today)(nil), + (*Communique_Maybe)(nil), + (*Communique_Delta_)(nil), + (*Communique_Msg)(nil), + (*Communique_Somegroup)(nil), + } +} + +func _Communique_OneofMarshaler(msg proto.Message, b *proto.Buffer) error { + m := msg.(*Communique) + // union + switch x := m.Union.(type) { + case *Communique_Number: + b.EncodeVarint(5<<3 | proto.WireVarint) + b.EncodeVarint(uint64(x.Number)) + case *Communique_Name: + b.EncodeVarint(6<<3 | proto.WireBytes) + b.EncodeStringBytes(x.Name) + case *Communique_Data: + b.EncodeVarint(7<<3 | proto.WireBytes) + b.EncodeRawBytes(x.Data) + case *Communique_TempC: + b.EncodeVarint(8<<3 | proto.WireFixed64) + b.EncodeFixed64(math.Float64bits(x.TempC)) + case *Communique_Height: + b.EncodeVarint(9<<3 | proto.WireFixed32) + b.EncodeFixed32(uint64(math.Float32bits(x.Height))) + case *Communique_Today: + b.EncodeVarint(10<<3 | proto.WireVarint) + b.EncodeVarint(uint64(x.Today)) + case *Communique_Maybe: + t := uint64(0) + if x.Maybe { + t = 1 + } + b.EncodeVarint(11<<3 | proto.WireVarint) + b.EncodeVarint(t) + case *Communique_Delta_: + b.EncodeVarint(12<<3 | proto.WireVarint) + b.EncodeZigzag32(uint64(x.Delta)) + case *Communique_Msg: + b.EncodeVarint(13<<3 | proto.WireBytes) + if err := b.EncodeMessage(x.Msg); err != nil { + return err + } + case *Communique_Somegroup: + b.EncodeVarint(14<<3 | proto.WireStartGroup) + if err := b.Marshal(x.Somegroup); err != nil { + return err + } + b.EncodeVarint(14<<3 | proto.WireEndGroup) + case nil: + default: + return fmt.Errorf("Communique.Union has unexpected type %T", x) + } + return nil +} + +func _Communique_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) { + m := msg.(*Communique) + switch tag { + case 5: // union.number + if wire != proto.WireVarint { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeVarint() + m.Union = &Communique_Number{int32(x)} + return true, err + case 6: // union.name + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeStringBytes() + m.Union = &Communique_Name{x} + return true, err + case 7: // union.data + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeRawBytes(true) + m.Union = &Communique_Data{x} + return true, err + case 8: // union.temp_c + if wire != proto.WireFixed64 { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeFixed64() + m.Union = &Communique_TempC{math.Float64frombits(x)} + return true, err + case 9: // union.height + if wire != proto.WireFixed32 { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeFixed32() + m.Union = &Communique_Height{math.Float32frombits(uint32(x))} + return true, err + case 10: // union.today + if wire != proto.WireVarint { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeVarint() + m.Union = &Communique_Today{Days(x)} + return true, err + case 11: // union.maybe + if wire != proto.WireVarint { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeVarint() + m.Union = &Communique_Maybe{x != 0} + return true, err + case 12: // union.delta + if wire != proto.WireVarint { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeZigzag32() + m.Union = &Communique_Delta_{int32(x)} + return true, err + case 13: // union.msg + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + msg := new(Reply) + err := b.DecodeMessage(msg) + m.Union = &Communique_Msg{msg} + return true, err + case 14: // union.somegroup + if wire != proto.WireStartGroup { + return true, proto.ErrInternalBadWireType + } + msg := new(Communique_SomeGroup) + err := b.DecodeGroup(msg) + m.Union = &Communique_Somegroup{msg} + return true, err + default: + return false, nil + } +} + +func _Communique_OneofSizer(msg proto.Message) (n int) { + m := msg.(*Communique) + // union + switch x := m.Union.(type) { + case *Communique_Number: + n += proto.SizeVarint(5<<3 | proto.WireVarint) + n += proto.SizeVarint(uint64(x.Number)) + case *Communique_Name: + n += proto.SizeVarint(6<<3 | proto.WireBytes) + n += proto.SizeVarint(uint64(len(x.Name))) + n += len(x.Name) + case *Communique_Data: + n += proto.SizeVarint(7<<3 | proto.WireBytes) + n += proto.SizeVarint(uint64(len(x.Data))) + n += len(x.Data) + case *Communique_TempC: + n += proto.SizeVarint(8<<3 | proto.WireFixed64) + n += 8 + case *Communique_Height: + n += proto.SizeVarint(9<<3 | proto.WireFixed32) + n += 4 + case *Communique_Today: + n += proto.SizeVarint(10<<3 | proto.WireVarint) + n += proto.SizeVarint(uint64(x.Today)) + case *Communique_Maybe: + n += proto.SizeVarint(11<<3 | proto.WireVarint) + n += 1 + case *Communique_Delta_: + n += proto.SizeVarint(12<<3 | proto.WireVarint) + n += proto.SizeVarint(uint64((uint32(x.Delta) << 1) ^ uint32((int32(x.Delta) >> 31)))) + case *Communique_Msg: + s := proto.Size(x.Msg) + n += proto.SizeVarint(13<<3 | proto.WireBytes) + n += proto.SizeVarint(uint64(s)) + n += s + case *Communique_Somegroup: + n += proto.SizeVarint(14<<3 | proto.WireStartGroup) + n += proto.Size(x.Somegroup) + n += proto.SizeVarint(14<<3 | proto.WireEndGroup) + case nil: + default: + panic(fmt.Sprintf("proto: unexpected type %T in oneof", x)) + } + return n +} + +type Communique_SomeGroup struct { + Member *string `protobuf:"bytes,15,opt,name=member" json:"member,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *Communique_SomeGroup) Reset() { *m = Communique_SomeGroup{} } +func (m *Communique_SomeGroup) String() string { return proto.CompactTextString(m) } +func (*Communique_SomeGroup) ProtoMessage() {} + +func (m *Communique_SomeGroup) GetMember() string { + if m != nil && m.Member != nil { + return *m.Member + } + return "" +} + +type Communique_Delta struct { + XXX_unrecognized []byte `json:"-"` +} + +func (m *Communique_Delta) Reset() { *m = Communique_Delta{} } +func (m *Communique_Delta) String() string { return proto.CompactTextString(m) } +func (*Communique_Delta) ProtoMessage() {} + +var E_Tag = &proto.ExtensionDesc{ + ExtendedType: (*Reply)(nil), + ExtensionType: (*string)(nil), + Field: 103, + Name: "my.test.tag", + Tag: "bytes,103,opt,name=tag", +} + +var E_Donut = &proto.ExtensionDesc{ + ExtendedType: (*Reply)(nil), + ExtensionType: (*OtherReplyExtensions)(nil), + Field: 106, + Name: "my.test.donut", + Tag: "bytes,106,opt,name=donut", +} + +func init() { + proto.RegisterType((*Request)(nil), "my.test.Request") + proto.RegisterType((*Request_SomeGroup)(nil), "my.test.Request.SomeGroup") + proto.RegisterType((*Reply)(nil), "my.test.Reply") + proto.RegisterType((*Reply_Entry)(nil), "my.test.Reply.Entry") + proto.RegisterType((*OtherBase)(nil), "my.test.OtherBase") + proto.RegisterType((*ReplyExtensions)(nil), "my.test.ReplyExtensions") + proto.RegisterType((*OtherReplyExtensions)(nil), "my.test.OtherReplyExtensions") + proto.RegisterType((*OldReply)(nil), "my.test.OldReply") + proto.RegisterType((*Communique)(nil), "my.test.Communique") + proto.RegisterType((*Communique_SomeGroup)(nil), "my.test.Communique.SomeGroup") + proto.RegisterType((*Communique_Delta)(nil), "my.test.Communique.Delta") + proto.RegisterEnum("my.test.HatType", HatType_name, HatType_value) + proto.RegisterEnum("my.test.Days", Days_name, Days_value) + proto.RegisterEnum("my.test.Request_Color", Request_Color_name, Request_Color_value) + proto.RegisterEnum("my.test.Reply_Entry_Game", Reply_Entry_Game_name, Reply_Entry_Game_value) + proto.RegisterExtension(E_ReplyExtensions_Time) + proto.RegisterExtension(E_ReplyExtensions_Carrot) + proto.RegisterExtension(E_ReplyExtensions_Donut) + proto.RegisterExtension(E_Tag) + proto.RegisterExtension(E_Donut) +} diff --git a/vendor/github.com/golang/protobuf/protoc-gen-go/testdata/my_test/test.proto b/vendor/github.com/golang/protobuf/protoc-gen-go/testdata/my_test/test.proto new file mode 100644 index 000000000..8e7094632 --- /dev/null +++ b/vendor/github.com/golang/protobuf/protoc-gen-go/testdata/my_test/test.proto @@ -0,0 +1,156 @@ +// 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. + +syntax = "proto2"; + +// This package holds interesting messages. +package my.test; // dotted package name + +//import "imp.proto"; +import "multi/multi1.proto"; // unused import + +enum HatType { + // deliberately skipping 0 + FEDORA = 1; + FEZ = 2; +} + +// This enum represents days of the week. +enum Days { + option allow_alias = true; + + MONDAY = 1; + TUESDAY = 2; + LUNDI = 1; // same value as MONDAY +} + +// This is a message that might be sent somewhere. +message Request { + enum Color { + RED = 0; + GREEN = 1; + BLUE = 2; + } + repeated int64 key = 1; +// optional imp.ImportedMessage imported_message = 2; + optional Color hue = 3; // no default + optional HatType hat = 4 [default=FEDORA]; +// optional imp.ImportedMessage.Owner owner = 6; + optional float deadline = 7 [default=inf]; + optional group SomeGroup = 8 { + optional int32 group_field = 9; + } + + // These foreign types are in imp2.proto, + // which is publicly imported by imp.proto. +// optional imp.PubliclyImportedMessage pub = 10; +// optional imp.PubliclyImportedEnum pub_enum = 13 [default=HAIR]; + + + // This is a map field. It will generate map[int32]string. + map name_mapping = 14; + // This is a map field whose value type is a message. + map msg_mapping = 15; + + optional int32 reset = 12; + // This field should not conflict with any getters. + optional string get_key = 16; +} + +message Reply { + message Entry { + required int64 key_that_needs_1234camel_CasIng = 1; + optional int64 value = 2 [default=7]; + optional int64 _my_field_name_2 = 3; + enum Game { + FOOTBALL = 1; + TENNIS = 2; + } + } + repeated Entry found = 1; + repeated int32 compact_keys = 2 [packed=true]; + extensions 100 to max; +} + +message OtherBase { + optional string name = 1; + extensions 100 to max; +} + +message ReplyExtensions { + extend Reply { + optional double time = 101; + optional ReplyExtensions carrot = 105; + } + extend OtherBase { + optional ReplyExtensions donut = 101; + } +} + +message OtherReplyExtensions { + optional int32 key = 1; +} + +// top-level extension +extend Reply { + optional string tag = 103; + optional OtherReplyExtensions donut = 106; +// optional imp.ImportedMessage elephant = 107; // extend with message from another file. +} + +message OldReply { + // Extensions will be encoded in MessageSet wire format. + option message_set_wire_format = true; + extensions 100 to max; +} + +message Communique { + optional bool make_me_cry = 1; + + // This is a oneof, called "union". + oneof union { + int32 number = 5; + string name = 6; + bytes data = 7; + double temp_c = 8; + float height = 9; + Days today = 10; + bool maybe = 11; + sint32 delta = 12; // name will conflict with Delta below + Reply msg = 13; + group SomeGroup = 14 { + optional string member = 15; + } + } + + message Delta {} +} + diff --git a/vendor/github.com/golang/protobuf/protoc-gen-go/testdata/proto3.proto b/vendor/github.com/golang/protobuf/protoc-gen-go/testdata/proto3.proto new file mode 100644 index 000000000..c994914e4 --- /dev/null +++ b/vendor/github.com/golang/protobuf/protoc-gen-go/testdata/proto3.proto @@ -0,0 +1,52 @@ +// Go support for Protocol Buffers - Google's data interchange format +// +// Copyright 2014 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. + +syntax = "proto3"; + +package proto3; + +message Request { + enum Flavour { + SWEET = 0; + SOUR = 1; + UMAMI = 2; + GOPHERLICIOUS = 3; + } + string name = 1; + repeated int64 key = 2; + Flavour taste = 3; + Book book = 4; +} + +message Book { + string title = 1; + bytes raw_data = 2; +} diff --git a/vendor/github.com/golang/protobuf/ptypes/any.go b/vendor/github.com/golang/protobuf/ptypes/any.go new file mode 100644 index 000000000..89e07ae19 --- /dev/null +++ b/vendor/github.com/golang/protobuf/ptypes/any.go @@ -0,0 +1,136 @@ +// 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 ptypes + +// This file implements functions to marshal proto.Message to/from +// google.protobuf.Any message. + +import ( + "fmt" + "reflect" + "strings" + + "github.com/golang/protobuf/proto" + "github.com/golang/protobuf/ptypes/any" +) + +const googleApis = "type.googleapis.com/" + +// AnyMessageName returns the name of the message contained in a google.protobuf.Any message. +// +// Note that regular type assertions should be done using the Is +// function. AnyMessageName is provided for less common use cases like filtering a +// sequence of Any messages based on a set of allowed message type names. +func AnyMessageName(any *any.Any) (string, error) { + slash := strings.LastIndex(any.TypeUrl, "/") + if slash < 0 { + return "", fmt.Errorf("message type url %q is invalid", any.TypeUrl) + } + return any.TypeUrl[slash+1:], nil +} + +// MarshalAny takes the protocol buffer and encodes it into google.protobuf.Any. +func MarshalAny(pb proto.Message) (*any.Any, error) { + value, err := proto.Marshal(pb) + if err != nil { + return nil, err + } + return &any.Any{TypeUrl: googleApis + proto.MessageName(pb), Value: value}, nil +} + +// DynamicAny is a value that can be passed to UnmarshalAny to automatically +// allocate a proto.Message for the type specified in a google.protobuf.Any +// message. The allocated message is stored in the embedded proto.Message. +// +// Example: +// +// var x ptypes.DynamicAny +// if err := ptypes.UnmarshalAny(a, &x); err != nil { ... } +// fmt.Printf("unmarshaled message: %v", x.Message) +type DynamicAny struct { + proto.Message +} + +// Empty returns a new proto.Message of the type specified in a +// google.protobuf.Any message. It returns an error if corresponding message +// type isn't linked in. +func Empty(any *any.Any) (proto.Message, error) { + aname, err := AnyMessageName(any) + if err != nil { + return nil, err + } + + t := proto.MessageType(aname) + if t == nil { + return nil, fmt.Errorf("any: message type %q isn't linked in", aname) + } + return reflect.New(t.Elem()).Interface().(proto.Message), nil +} + +// UnmarshalAny parses the protocol buffer representation in a google.protobuf.Any +// message and places the decoded result in pb. It returns an error if type of +// contents of Any message does not match type of pb message. +// +// pb can be a proto.Message, or a *DynamicAny. +func UnmarshalAny(any *any.Any, pb proto.Message) error { + if d, ok := pb.(*DynamicAny); ok { + if d.Message == nil { + var err error + d.Message, err = Empty(any) + if err != nil { + return err + } + } + return UnmarshalAny(any, d.Message) + } + + aname, err := AnyMessageName(any) + if err != nil { + return err + } + + mname := proto.MessageName(pb) + if aname != mname { + return fmt.Errorf("mismatched message type: got %q want %q", aname, mname) + } + return proto.Unmarshal(any.Value, pb) +} + +// Is returns true if any value contains a given message type. +func Is(any *any.Any, pb proto.Message) bool { + aname, err := AnyMessageName(any) + if err != nil { + return false + } + + return aname == proto.MessageName(pb) +} diff --git a/vendor/github.com/golang/protobuf/ptypes/any/any.pb.go b/vendor/github.com/golang/protobuf/ptypes/any/any.pb.go new file mode 100644 index 000000000..72490daf4 --- /dev/null +++ b/vendor/github.com/golang/protobuf/ptypes/any/any.pb.go @@ -0,0 +1,145 @@ +// Code generated by protoc-gen-go. +// source: github.com/golang/protobuf/ptypes/any/any.proto +// DO NOT EDIT! + +/* +Package any is a generated protocol buffer package. + +It is generated from these files: + github.com/golang/protobuf/ptypes/any/any.proto + +It has these top-level messages: + Any +*/ +package any + +import proto "github.com/golang/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.ProtoPackageIsVersion2 // please upgrade the proto package + +// `Any` contains an arbitrary serialized protocol buffer message along with a +// URL that describes the type of the serialized message. +// +// Protobuf library provides support to pack/unpack Any values in the form +// of utility functions or additional generated methods of the Any type. +// +// Example 1: Pack and unpack a message in C++. +// +// Foo foo = ...; +// Any any; +// any.PackFrom(foo); +// ... +// if (any.UnpackTo(&foo)) { +// ... +// } +// +// Example 2: Pack and unpack a message in Java. +// +// Foo foo = ...; +// Any any = Any.pack(foo); +// ... +// if (any.is(Foo.class)) { +// foo = any.unpack(Foo.class); +// } +// +// The pack methods provided by protobuf library will by default use +// 'type.googleapis.com/full.type.name' as the type URL and the unpack +// methods only use the fully qualified type name after the last '/' +// in the type URL, for example "foo.bar.com/x/y.z" will yield type +// name "y.z". +// +// +// JSON +// ==== +// The JSON representation of an `Any` value uses the regular +// representation of the deserialized, embedded message, with an +// additional field `@type` which contains the type URL. Example: +// +// package google.profile; +// message Person { +// string first_name = 1; +// string last_name = 2; +// } +// +// { +// "@type": "type.googleapis.com/google.profile.Person", +// "firstName": , +// "lastName": +// } +// +// If the embedded message type is well-known and has a custom JSON +// representation, that representation will be embedded adding a field +// `value` which holds the custom JSON in addition to the `@type` +// field. Example (for message [google.protobuf.Duration][]): +// +// { +// "@type": "type.googleapis.com/google.protobuf.Duration", +// "value": "1.212s" +// } +// +type Any struct { + // A URL/resource name whose content describes the type of the + // serialized protocol buffer message. + // + // For URLs which use the schema `http`, `https`, or no schema, the + // following restrictions and interpretations apply: + // + // * If no schema is provided, `https` is assumed. + // * The last segment of the URL's path must represent the fully + // qualified name of the type (as in `path/google.protobuf.Duration`). + // The name should be in a canonical form (e.g., leading "." is + // not accepted). + // * An HTTP GET on the URL must yield a [google.protobuf.Type][] + // value in binary format, or produce an error. + // * Applications are allowed to cache lookup results based on the + // URL, or have them precompiled into a binary to avoid any + // lookup. Therefore, binary compatibility needs to be preserved + // on changes to types. (Use versioned type names to manage + // breaking changes.) + // + // Schemas other than `http`, `https` (or the empty schema) might be + // used with implementation specific semantics. + // + TypeUrl string `protobuf:"bytes,1,opt,name=type_url,json=typeUrl" json:"type_url,omitempty"` + // Must be a valid serialized protocol buffer of the above specified type. + Value []byte `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"` +} + +func (m *Any) Reset() { *m = Any{} } +func (m *Any) String() string { return proto.CompactTextString(m) } +func (*Any) ProtoMessage() {} +func (*Any) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{0} } +func (*Any) XXX_WellKnownType() string { return "Any" } + +func init() { + proto.RegisterType((*Any)(nil), "google.protobuf.Any") +} + +func init() { proto.RegisterFile("github.com/golang/protobuf/ptypes/any/any.proto", fileDescriptor0) } + +var fileDescriptor0 = []byte{ + // 184 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xe2, 0xd2, 0x4f, 0xcf, 0x2c, 0xc9, + 0x28, 0x4d, 0xd2, 0x4b, 0xce, 0xcf, 0xd5, 0x4f, 0xcf, 0xcf, 0x49, 0xcc, 0x4b, 0xd7, 0x2f, 0x28, + 0xca, 0x2f, 0xc9, 0x4f, 0x2a, 0x4d, 0xd3, 0x2f, 0x28, 0xa9, 0x2c, 0x48, 0x2d, 0xd6, 0x4f, 0xcc, + 0xab, 0x04, 0x61, 0x3d, 0xb0, 0xb8, 0x10, 0x7f, 0x7a, 0x7e, 0x7e, 0x7a, 0x4e, 0xaa, 0x1e, 0x4c, + 0x95, 0x92, 0x19, 0x17, 0xb3, 0x63, 0x5e, 0xa5, 0x90, 0x24, 0x17, 0x07, 0x48, 0x79, 0x7c, 0x69, + 0x51, 0x8e, 0x04, 0xa3, 0x02, 0xa3, 0x06, 0x67, 0x10, 0x3b, 0x88, 0x1f, 0x5a, 0x94, 0x23, 0x24, + 0xc2, 0xc5, 0x5a, 0x96, 0x98, 0x53, 0x9a, 0x2a, 0xc1, 0x04, 0x14, 0xe7, 0x09, 0x82, 0x70, 0x9c, + 0x8a, 0xb8, 0x84, 0x81, 0x96, 0xea, 0xa1, 0x19, 0xe7, 0xc4, 0x01, 0x34, 0x2c, 0x00, 0xc4, 0x09, + 0x60, 0x8c, 0x52, 0x25, 0xca, 0x71, 0x0b, 0x18, 0x19, 0x17, 0x31, 0x31, 0xbb, 0x07, 0x38, 0xad, + 0x62, 0x92, 0x73, 0x87, 0x98, 0x16, 0x00, 0x55, 0xa5, 0x17, 0x9e, 0x9a, 0x93, 0xe3, 0x9d, 0x97, + 0x5f, 0x9e, 0x17, 0x02, 0x52, 0x9d, 0xc4, 0x06, 0xd6, 0x6e, 0x0c, 0x08, 0x00, 0x00, 0xff, 0xff, + 0xc6, 0x4d, 0x03, 0x23, 0xf6, 0x00, 0x00, 0x00, +} diff --git a/vendor/github.com/golang/protobuf/ptypes/any/any.proto b/vendor/github.com/golang/protobuf/ptypes/any/any.proto new file mode 100644 index 000000000..45db6ede3 --- /dev/null +++ b/vendor/github.com/golang/protobuf/ptypes/any/any.proto @@ -0,0 +1,130 @@ +// Protocol Buffers - Google's data interchange format +// Copyright 2008 Google Inc. All rights reserved. +// https://developers.google.com/protocol-buffers/ +// +// 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. + +syntax = "proto3"; + +package google.protobuf; + +option csharp_namespace = "Google.Protobuf.WellKnownTypes"; +option go_package = "github.com/golang/protobuf/ptypes/any"; +option java_package = "com.google.protobuf"; +option java_outer_classname = "AnyProto"; +option java_multiple_files = true; +option java_generate_equals_and_hash = true; +option objc_class_prefix = "GPB"; + +// `Any` contains an arbitrary serialized protocol buffer message along with a +// URL that describes the type of the serialized message. +// +// Protobuf library provides support to pack/unpack Any values in the form +// of utility functions or additional generated methods of the Any type. +// +// Example 1: Pack and unpack a message in C++. +// +// Foo foo = ...; +// Any any; +// any.PackFrom(foo); +// ... +// if (any.UnpackTo(&foo)) { +// ... +// } +// +// Example 2: Pack and unpack a message in Java. +// +// Foo foo = ...; +// Any any = Any.pack(foo); +// ... +// if (any.is(Foo.class)) { +// foo = any.unpack(Foo.class); +// } +// +// The pack methods provided by protobuf library will by default use +// 'type.googleapis.com/full.type.name' as the type URL and the unpack +// methods only use the fully qualified type name after the last '/' +// in the type URL, for example "foo.bar.com/x/y.z" will yield type +// name "y.z". +// +// +// JSON +// ==== +// The JSON representation of an `Any` value uses the regular +// representation of the deserialized, embedded message, with an +// additional field `@type` which contains the type URL. Example: +// +// package google.profile; +// message Person { +// string first_name = 1; +// string last_name = 2; +// } +// +// { +// "@type": "type.googleapis.com/google.profile.Person", +// "firstName": , +// "lastName": +// } +// +// If the embedded message type is well-known and has a custom JSON +// representation, that representation will be embedded adding a field +// `value` which holds the custom JSON in addition to the `@type` +// field. Example (for message [google.protobuf.Duration][]): +// +// { +// "@type": "type.googleapis.com/google.protobuf.Duration", +// "value": "1.212s" +// } +// +message Any { + // A URL/resource name whose content describes the type of the + // serialized protocol buffer message. + // + // For URLs which use the schema `http`, `https`, or no schema, the + // following restrictions and interpretations apply: + // + // * If no schema is provided, `https` is assumed. + // * The last segment of the URL's path must represent the fully + // qualified name of the type (as in `path/google.protobuf.Duration`). + // The name should be in a canonical form (e.g., leading "." is + // not accepted). + // * An HTTP GET on the URL must yield a [google.protobuf.Type][] + // value in binary format, or produce an error. + // * Applications are allowed to cache lookup results based on the + // URL, or have them precompiled into a binary to avoid any + // lookup. Therefore, binary compatibility needs to be preserved + // on changes to types. (Use versioned type names to manage + // breaking changes.) + // + // Schemas other than `http`, `https` (or the empty schema) might be + // used with implementation specific semantics. + // + string type_url = 1; + + // Must be a valid serialized protocol buffer of the above specified type. + bytes value = 2; +} diff --git a/vendor/github.com/golang/protobuf/ptypes/any_test.go b/vendor/github.com/golang/protobuf/ptypes/any_test.go new file mode 100644 index 000000000..ed675b489 --- /dev/null +++ b/vendor/github.com/golang/protobuf/ptypes/any_test.go @@ -0,0 +1,113 @@ +// 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 ptypes + +import ( + "testing" + + "github.com/golang/protobuf/proto" + pb "github.com/golang/protobuf/protoc-gen-go/descriptor" + "github.com/golang/protobuf/ptypes/any" +) + +func TestMarshalUnmarshal(t *testing.T) { + orig := &any.Any{Value: []byte("test")} + + packed, err := MarshalAny(orig) + if err != nil { + t.Errorf("MarshalAny(%+v): got: _, %v exp: _, nil", orig, err) + } + + unpacked := &any.Any{} + err = UnmarshalAny(packed, unpacked) + if err != nil || !proto.Equal(unpacked, orig) { + t.Errorf("got: %v, %+v; want nil, %+v", err, unpacked, orig) + } +} + +func TestIs(t *testing.T) { + a, err := MarshalAny(&pb.FileDescriptorProto{}) + if err != nil { + t.Fatal(err) + } + if Is(a, &pb.DescriptorProto{}) { + t.Error("FileDescriptorProto is not a DescriptorProto, but Is says it is") + } + if !Is(a, &pb.FileDescriptorProto{}) { + t.Error("FileDescriptorProto is indeed a FileDescriptorProto, but Is says it is not") + } +} + +func TestIsDifferentUrlPrefixes(t *testing.T) { + m := &pb.FileDescriptorProto{} + a := &any.Any{TypeUrl: "foo/bar/" + proto.MessageName(m)} + if !Is(a, m) { + t.Errorf("message with type url %q didn't satisfy Is for type %q", a.TypeUrl, proto.MessageName(m)) + } +} + +func TestUnmarshalDynamic(t *testing.T) { + want := &pb.FileDescriptorProto{Name: proto.String("foo")} + a, err := MarshalAny(want) + if err != nil { + t.Fatal(err) + } + var got DynamicAny + if err := UnmarshalAny(a, &got); err != nil { + t.Fatal(err) + } + if !proto.Equal(got.Message, want) { + t.Errorf("invalid result from UnmarshalAny, got %q want %q", got.Message, want) + } +} + +func TestEmpty(t *testing.T) { + want := &pb.FileDescriptorProto{} + a, err := MarshalAny(want) + if err != nil { + t.Fatal(err) + } + got, err := Empty(a) + if err != nil { + t.Fatal(err) + } + if !proto.Equal(got, want) { + t.Errorf("unequal empty message, got %q, want %q", got, want) + } + + // that's a valid type_url for a message which shouldn't be linked into this + // test binary. We want an error. + a.TypeUrl = "type.googleapis.com/google.protobuf.FieldMask" + if _, err := Empty(a); err == nil { + t.Errorf("got no error for an attempt to create a message of type %q, which shouldn't be linked in", a.TypeUrl) + } +} diff --git a/vendor/github.com/golang/protobuf/ptypes/doc.go b/vendor/github.com/golang/protobuf/ptypes/doc.go new file mode 100644 index 000000000..c0d595da7 --- /dev/null +++ b/vendor/github.com/golang/protobuf/ptypes/doc.go @@ -0,0 +1,35 @@ +// 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 ptypes contains code for interacting with well-known types. +*/ +package ptypes diff --git a/vendor/github.com/golang/protobuf/ptypes/duration.go b/vendor/github.com/golang/protobuf/ptypes/duration.go new file mode 100644 index 000000000..65cb0f8eb --- /dev/null +++ b/vendor/github.com/golang/protobuf/ptypes/duration.go @@ -0,0 +1,102 @@ +// 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 ptypes + +// This file implements conversions between google.protobuf.Duration +// and time.Duration. + +import ( + "errors" + "fmt" + "time" + + durpb "github.com/golang/protobuf/ptypes/duration" +) + +const ( + // Range of a durpb.Duration in seconds, as specified in + // google/protobuf/duration.proto. This is about 10,000 years in seconds. + maxSeconds = int64(10000 * 365.25 * 24 * 60 * 60) + minSeconds = -maxSeconds +) + +// validateDuration determines whether the durpb.Duration is valid according to the +// definition in google/protobuf/duration.proto. A valid durpb.Duration +// may still be too large to fit into a time.Duration (the range of durpb.Duration +// is about 10,000 years, and the range of time.Duration is about 290). +func validateDuration(d *durpb.Duration) error { + if d == nil { + return errors.New("duration: nil Duration") + } + if d.Seconds < minSeconds || d.Seconds > maxSeconds { + return fmt.Errorf("duration: %v: seconds out of range", d) + } + if d.Nanos <= -1e9 || d.Nanos >= 1e9 { + return fmt.Errorf("duration: %v: nanos out of range", d) + } + // Seconds and Nanos must have the same sign, unless d.Nanos is zero. + if (d.Seconds < 0 && d.Nanos > 0) || (d.Seconds > 0 && d.Nanos < 0) { + return fmt.Errorf("duration: %v: seconds and nanos have different signs", d) + } + return nil +} + +// Duration converts a durpb.Duration to a time.Duration. Duration +// returns an error if the durpb.Duration is invalid or is too large to be +// represented in a time.Duration. +func Duration(p *durpb.Duration) (time.Duration, error) { + if err := validateDuration(p); err != nil { + return 0, err + } + d := time.Duration(p.Seconds) * time.Second + if int64(d/time.Second) != p.Seconds { + return 0, fmt.Errorf("duration: %v is out of range for time.Duration", p) + } + if p.Nanos != 0 { + d += time.Duration(p.Nanos) + if (d < 0) != (p.Nanos < 0) { + return 0, fmt.Errorf("duration: %v is out of range for time.Duration", p) + } + } + return d, nil +} + +// DurationProto converts a time.Duration to a durpb.Duration. +func DurationProto(d time.Duration) *durpb.Duration { + nanos := d.Nanoseconds() + secs := nanos / 1e9 + nanos -= secs * 1e9 + return &durpb.Duration{ + Seconds: secs, + Nanos: int32(nanos), + } +} diff --git a/vendor/github.com/golang/protobuf/ptypes/duration/duration.pb.go b/vendor/github.com/golang/protobuf/ptypes/duration/duration.pb.go new file mode 100644 index 000000000..ee7d8b8ac --- /dev/null +++ b/vendor/github.com/golang/protobuf/ptypes/duration/duration.pb.go @@ -0,0 +1,114 @@ +// Code generated by protoc-gen-go. +// source: github.com/golang/protobuf/ptypes/duration/duration.proto +// DO NOT EDIT! + +/* +Package duration is a generated protocol buffer package. + +It is generated from these files: + github.com/golang/protobuf/ptypes/duration/duration.proto + +It has these top-level messages: + Duration +*/ +package duration + +import proto "github.com/golang/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.ProtoPackageIsVersion2 // please upgrade the proto package + +// A Duration represents a signed, fixed-length span of time represented +// as a count of seconds and fractions of seconds at nanosecond +// resolution. It is independent of any calendar and concepts like "day" +// or "month". It is related to Timestamp in that the difference between +// two Timestamp values is a Duration and it can be added or subtracted +// from a Timestamp. Range is approximately +-10,000 years. +// +// Example 1: Compute Duration from two Timestamps in pseudo code. +// +// Timestamp start = ...; +// Timestamp end = ...; +// Duration duration = ...; +// +// duration.seconds = end.seconds - start.seconds; +// duration.nanos = end.nanos - start.nanos; +// +// if (duration.seconds < 0 && duration.nanos > 0) { +// duration.seconds += 1; +// duration.nanos -= 1000000000; +// } else if (durations.seconds > 0 && duration.nanos < 0) { +// duration.seconds -= 1; +// duration.nanos += 1000000000; +// } +// +// Example 2: Compute Timestamp from Timestamp + Duration in pseudo code. +// +// Timestamp start = ...; +// Duration duration = ...; +// Timestamp end = ...; +// +// end.seconds = start.seconds + duration.seconds; +// end.nanos = start.nanos + duration.nanos; +// +// if (end.nanos < 0) { +// end.seconds -= 1; +// end.nanos += 1000000000; +// } else if (end.nanos >= 1000000000) { +// end.seconds += 1; +// end.nanos -= 1000000000; +// } +// +// +type Duration struct { + // Signed seconds of the span of time. Must be from -315,576,000,000 + // to +315,576,000,000 inclusive. + Seconds int64 `protobuf:"varint,1,opt,name=seconds" json:"seconds,omitempty"` + // Signed fractions of a second at nanosecond resolution of the span + // of time. Durations less than one second are represented with a 0 + // `seconds` field and a positive or negative `nanos` field. For durations + // of one second or more, a non-zero value for the `nanos` field must be + // of the same sign as the `seconds` field. Must be from -999,999,999 + // to +999,999,999 inclusive. + Nanos int32 `protobuf:"varint,2,opt,name=nanos" json:"nanos,omitempty"` +} + +func (m *Duration) Reset() { *m = Duration{} } +func (m *Duration) String() string { return proto.CompactTextString(m) } +func (*Duration) ProtoMessage() {} +func (*Duration) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{0} } +func (*Duration) XXX_WellKnownType() string { return "Duration" } + +func init() { + proto.RegisterType((*Duration)(nil), "google.protobuf.Duration") +} + +func init() { + proto.RegisterFile("github.com/golang/protobuf/ptypes/duration/duration.proto", fileDescriptor0) +} + +var fileDescriptor0 = []byte{ + // 187 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xe2, 0xb2, 0x4c, 0xcf, 0x2c, 0xc9, + 0x28, 0x4d, 0xd2, 0x4b, 0xce, 0xcf, 0xd5, 0x4f, 0xcf, 0xcf, 0x49, 0xcc, 0x4b, 0xd7, 0x2f, 0x28, + 0xca, 0x2f, 0xc9, 0x4f, 0x2a, 0x4d, 0xd3, 0x2f, 0x28, 0xa9, 0x2c, 0x48, 0x2d, 0xd6, 0x4f, 0x29, + 0x2d, 0x4a, 0x2c, 0xc9, 0xcc, 0xcf, 0x83, 0x33, 0xf4, 0xc0, 0x2a, 0x84, 0xf8, 0xd3, 0xf3, 0xf3, + 0xd3, 0x73, 0x52, 0xf5, 0x60, 0xea, 0x95, 0xac, 0xb8, 0x38, 0x5c, 0xa0, 0x4a, 0x84, 0x24, 0xb8, + 0xd8, 0x8b, 0x53, 0x93, 0xf3, 0xf3, 0x52, 0x8a, 0x25, 0x18, 0x15, 0x18, 0x35, 0x98, 0x83, 0x60, + 0x5c, 0x21, 0x11, 0x2e, 0xd6, 0xbc, 0xc4, 0xbc, 0xfc, 0x62, 0x09, 0x26, 0xa0, 0x38, 0x6b, 0x10, + 0x84, 0xe3, 0x54, 0xc3, 0x25, 0x0c, 0x74, 0x82, 0x1e, 0x9a, 0x91, 0x4e, 0xbc, 0x30, 0x03, 0x03, + 0x40, 0x22, 0x01, 0x8c, 0x51, 0x5a, 0xc4, 0xbb, 0x77, 0x01, 0x23, 0xe3, 0x22, 0x26, 0x66, 0xf7, + 0x00, 0xa7, 0x55, 0x4c, 0x72, 0xee, 0x10, 0x73, 0x03, 0xa0, 0x4a, 0xf5, 0xc2, 0x53, 0x73, 0x72, + 0xbc, 0xf3, 0xf2, 0xcb, 0xf3, 0x42, 0x40, 0x5a, 0x92, 0xd8, 0xc0, 0x66, 0x18, 0x03, 0x02, 0x00, + 0x00, 0xff, 0xff, 0x62, 0xfb, 0xb1, 0x51, 0x0e, 0x01, 0x00, 0x00, +} diff --git a/vendor/github.com/golang/protobuf/ptypes/duration/duration.proto b/vendor/github.com/golang/protobuf/ptypes/duration/duration.proto new file mode 100644 index 000000000..96c1796d6 --- /dev/null +++ b/vendor/github.com/golang/protobuf/ptypes/duration/duration.proto @@ -0,0 +1,98 @@ +// Protocol Buffers - Google's data interchange format +// Copyright 2008 Google Inc. All rights reserved. +// https://developers.google.com/protocol-buffers/ +// +// 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. + +syntax = "proto3"; + +package google.protobuf; + +option csharp_namespace = "Google.Protobuf.WellKnownTypes"; +option go_package = "github.com/golang/protobuf/ptypes/duration"; +option java_package = "com.google.protobuf"; +option java_outer_classname = "DurationProto"; +option java_multiple_files = true; +option java_generate_equals_and_hash = true; +option objc_class_prefix = "GPB"; + +// A Duration represents a signed, fixed-length span of time represented +// as a count of seconds and fractions of seconds at nanosecond +// resolution. It is independent of any calendar and concepts like "day" +// or "month". It is related to Timestamp in that the difference between +// two Timestamp values is a Duration and it can be added or subtracted +// from a Timestamp. Range is approximately +-10,000 years. +// +// Example 1: Compute Duration from two Timestamps in pseudo code. +// +// Timestamp start = ...; +// Timestamp end = ...; +// Duration duration = ...; +// +// duration.seconds = end.seconds - start.seconds; +// duration.nanos = end.nanos - start.nanos; +// +// if (duration.seconds < 0 && duration.nanos > 0) { +// duration.seconds += 1; +// duration.nanos -= 1000000000; +// } else if (durations.seconds > 0 && duration.nanos < 0) { +// duration.seconds -= 1; +// duration.nanos += 1000000000; +// } +// +// Example 2: Compute Timestamp from Timestamp + Duration in pseudo code. +// +// Timestamp start = ...; +// Duration duration = ...; +// Timestamp end = ...; +// +// end.seconds = start.seconds + duration.seconds; +// end.nanos = start.nanos + duration.nanos; +// +// if (end.nanos < 0) { +// end.seconds -= 1; +// end.nanos += 1000000000; +// } else if (end.nanos >= 1000000000) { +// end.seconds += 1; +// end.nanos -= 1000000000; +// } +// +// +message Duration { + + // Signed seconds of the span of time. Must be from -315,576,000,000 + // to +315,576,000,000 inclusive. + int64 seconds = 1; + + // Signed fractions of a second at nanosecond resolution of the span + // of time. Durations less than one second are represented with a 0 + // `seconds` field and a positive or negative `nanos` field. For durations + // of one second or more, a non-zero value for the `nanos` field must be + // of the same sign as the `seconds` field. Must be from -999,999,999 + // to +999,999,999 inclusive. + int32 nanos = 2; +} diff --git a/vendor/github.com/golang/protobuf/ptypes/duration_test.go b/vendor/github.com/golang/protobuf/ptypes/duration_test.go new file mode 100644 index 000000000..e761289f1 --- /dev/null +++ b/vendor/github.com/golang/protobuf/ptypes/duration_test.go @@ -0,0 +1,121 @@ +// 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 ptypes + +import ( + "math" + "testing" + "time" + + "github.com/golang/protobuf/proto" + durpb "github.com/golang/protobuf/ptypes/duration" +) + +const ( + minGoSeconds = math.MinInt64 / int64(1e9) + maxGoSeconds = math.MaxInt64 / int64(1e9) +) + +var durationTests = []struct { + proto *durpb.Duration + isValid bool + inRange bool + dur time.Duration +}{ + // The zero duration. + {&durpb.Duration{0, 0}, true, true, 0}, + // Some ordinary non-zero durations. + {&durpb.Duration{100, 0}, true, true, 100 * time.Second}, + {&durpb.Duration{-100, 0}, true, true, -100 * time.Second}, + {&durpb.Duration{100, 987}, true, true, 100*time.Second + 987}, + {&durpb.Duration{-100, -987}, true, true, -(100*time.Second + 987)}, + // The largest duration representable in Go. + {&durpb.Duration{maxGoSeconds, int32(math.MaxInt64 - 1e9*maxGoSeconds)}, true, true, math.MaxInt64}, + // The smallest duration representable in Go. + {&durpb.Duration{minGoSeconds, int32(math.MinInt64 - 1e9*minGoSeconds)}, true, true, math.MinInt64}, + {nil, false, false, 0}, + {&durpb.Duration{-100, 987}, false, false, 0}, + {&durpb.Duration{100, -987}, false, false, 0}, + {&durpb.Duration{math.MinInt64, 0}, false, false, 0}, + {&durpb.Duration{math.MaxInt64, 0}, false, false, 0}, + // The largest valid duration. + {&durpb.Duration{maxSeconds, 1e9 - 1}, true, false, 0}, + // The smallest valid duration. + {&durpb.Duration{minSeconds, -(1e9 - 1)}, true, false, 0}, + // The smallest invalid duration above the valid range. + {&durpb.Duration{maxSeconds + 1, 0}, false, false, 0}, + // The largest invalid duration below the valid range. + {&durpb.Duration{minSeconds - 1, -(1e9 - 1)}, false, false, 0}, + // One nanosecond past the largest duration representable in Go. + {&durpb.Duration{maxGoSeconds, int32(math.MaxInt64-1e9*maxGoSeconds) + 1}, true, false, 0}, + // One nanosecond past the smallest duration representable in Go. + {&durpb.Duration{minGoSeconds, int32(math.MinInt64-1e9*minGoSeconds) - 1}, true, false, 0}, + // One second past the largest duration representable in Go. + {&durpb.Duration{maxGoSeconds + 1, int32(math.MaxInt64 - 1e9*maxGoSeconds)}, true, false, 0}, + // One second past the smallest duration representable in Go. + {&durpb.Duration{minGoSeconds - 1, int32(math.MinInt64 - 1e9*minGoSeconds)}, true, false, 0}, +} + +func TestValidateDuration(t *testing.T) { + for _, test := range durationTests { + err := validateDuration(test.proto) + gotValid := (err == nil) + if gotValid != test.isValid { + t.Errorf("validateDuration(%v) = %t, want %t", test.proto, gotValid, test.isValid) + } + } +} + +func TestDuration(t *testing.T) { + for _, test := range durationTests { + got, err := Duration(test.proto) + gotOK := (err == nil) + wantOK := test.isValid && test.inRange + if gotOK != wantOK { + t.Errorf("Duration(%v) ok = %t, want %t", test.proto, gotOK, wantOK) + } + if err == nil && got != test.dur { + t.Errorf("Duration(%v) = %v, want %v", test.proto, got, test.dur) + } + } +} + +func TestDurationProto(t *testing.T) { + for _, test := range durationTests { + if test.isValid && test.inRange { + got := DurationProto(test.dur) + if !proto.Equal(got, test.proto) { + t.Errorf("DurationProto(%v) = %v, want %v", test.dur, got, test.proto) + } + } + } +} diff --git a/vendor/github.com/golang/protobuf/ptypes/empty/empty.pb.go b/vendor/github.com/golang/protobuf/ptypes/empty/empty.pb.go new file mode 100644 index 000000000..d49c09bc0 --- /dev/null +++ b/vendor/github.com/golang/protobuf/ptypes/empty/empty.pb.go @@ -0,0 +1,69 @@ +// Code generated by protoc-gen-go. +// source: github.com/golang/protobuf/ptypes/empty/empty.proto +// DO NOT EDIT! + +/* +Package empty is a generated protocol buffer package. + +It is generated from these files: + github.com/golang/protobuf/ptypes/empty/empty.proto + +It has these top-level messages: + Empty +*/ +package empty + +import proto "github.com/golang/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.ProtoPackageIsVersion2 // please upgrade the proto package + +// A generic empty message that you can re-use to avoid defining duplicated +// empty messages in your APIs. A typical example is to use it as the request +// or the response type of an API method. For instance: +// +// service Foo { +// rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); +// } +// +// The JSON representation for `Empty` is empty JSON object `{}`. +type Empty struct { +} + +func (m *Empty) Reset() { *m = Empty{} } +func (m *Empty) String() string { return proto.CompactTextString(m) } +func (*Empty) ProtoMessage() {} +func (*Empty) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{0} } +func (*Empty) XXX_WellKnownType() string { return "Empty" } + +func init() { + proto.RegisterType((*Empty)(nil), "google.protobuf.Empty") +} + +func init() { + proto.RegisterFile("github.com/golang/protobuf/ptypes/empty/empty.proto", fileDescriptor0) +} + +var fileDescriptor0 = []byte{ + // 148 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xe2, 0x32, 0x4e, 0xcf, 0x2c, 0xc9, + 0x28, 0x4d, 0xd2, 0x4b, 0xce, 0xcf, 0xd5, 0x4f, 0xcf, 0xcf, 0x49, 0xcc, 0x4b, 0xd7, 0x2f, 0x28, + 0xca, 0x2f, 0xc9, 0x4f, 0x2a, 0x4d, 0xd3, 0x2f, 0x28, 0xa9, 0x2c, 0x48, 0x2d, 0xd6, 0x4f, 0xcd, + 0x05, 0x32, 0x20, 0xa4, 0x1e, 0x58, 0x4e, 0x88, 0x3f, 0x3d, 0x3f, 0x3f, 0x3d, 0x27, 0x55, 0x0f, + 0xa6, 0x52, 0x89, 0x9d, 0x8b, 0xd5, 0x15, 0x24, 0xef, 0x54, 0xc9, 0x25, 0x0c, 0x34, 0x49, 0x0f, + 0x4d, 0xde, 0x89, 0x0b, 0x2c, 0x1b, 0x00, 0xe2, 0x06, 0x30, 0x46, 0xa9, 0x13, 0x69, 0xe7, 0x02, + 0x46, 0xc6, 0x1f, 0x8c, 0x8c, 0x8b, 0x98, 0x98, 0xdd, 0x03, 0x9c, 0x56, 0x31, 0xc9, 0xb9, 0x43, + 0x0c, 0x0d, 0x80, 0x2a, 0xd5, 0x0b, 0x4f, 0xcd, 0xc9, 0xf1, 0xce, 0xcb, 0x2f, 0xcf, 0x0b, 0x01, + 0x69, 0x49, 0x62, 0x03, 0x9b, 0x61, 0x0c, 0x08, 0x00, 0x00, 0xff, 0xff, 0x7f, 0xbb, 0xf4, 0x0e, + 0xd2, 0x00, 0x00, 0x00, +} diff --git a/vendor/github.com/golang/protobuf/ptypes/empty/empty.proto b/vendor/github.com/golang/protobuf/ptypes/empty/empty.proto new file mode 100644 index 000000000..37f4cd10e --- /dev/null +++ b/vendor/github.com/golang/protobuf/ptypes/empty/empty.proto @@ -0,0 +1,53 @@ +// Protocol Buffers - Google's data interchange format +// Copyright 2008 Google Inc. All rights reserved. +// https://developers.google.com/protocol-buffers/ +// +// 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. + +syntax = "proto3"; + +package google.protobuf; + +option csharp_namespace = "Google.Protobuf.WellKnownTypes"; +option go_package = "github.com/golang/protobuf/ptypes/empty"; +option java_package = "com.google.protobuf"; +option java_outer_classname = "EmptyProto"; +option java_multiple_files = true; +option java_generate_equals_and_hash = true; +option objc_class_prefix = "GPB"; +option cc_enable_arenas = true; + +// A generic empty message that you can re-use to avoid defining duplicated +// empty messages in your APIs. A typical example is to use it as the request +// or the response type of an API method. For instance: +// +// service Foo { +// rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); +// } +// +// The JSON representation for `Empty` is empty JSON object `{}`. +message Empty {} diff --git a/vendor/github.com/golang/protobuf/ptypes/regen.sh b/vendor/github.com/golang/protobuf/ptypes/regen.sh new file mode 100755 index 000000000..2a5b4e8bd --- /dev/null +++ b/vendor/github.com/golang/protobuf/ptypes/regen.sh @@ -0,0 +1,66 @@ +#!/bin/bash -e +# +# This script fetches and rebuilds the "well-known types" protocol buffers. +# To run this you will need protoc and goprotobuf installed; +# see https://github.com/golang/protobuf for instructions. +# You also need Go and Git installed. + +PKG=github.com/golang/protobuf/ptypes +UPSTREAM=https://github.com/google/protobuf +UPSTREAM_SUBDIR=src/google/protobuf +PROTO_FILES=' + any.proto + duration.proto + empty.proto + struct.proto + timestamp.proto + wrappers.proto +' + +function die() { + echo 1>&2 $* + exit 1 +} + +# Sanity check that the right tools are accessible. +for tool in go git protoc protoc-gen-go; do + q=$(which $tool) || die "didn't find $tool" + echo 1>&2 "$tool: $q" +done + +tmpdir=$(mktemp -d -t regen-wkt.XXXXXX) +trap 'rm -rf $tmpdir' EXIT + +echo -n 1>&2 "finding package dir... " +pkgdir=$(go list -f '{{.Dir}}' $PKG) +echo 1>&2 $pkgdir +base=$(echo $pkgdir | sed "s,/$PKG\$,,") +echo 1>&2 "base: $base" +cd $base + +echo 1>&2 "fetching latest protos... " +git clone -q $UPSTREAM $tmpdir +# Pass 1: build mapping from upstream filename to our filename. +declare -A filename_map +for f in $(cd $PKG && find * -name '*.proto'); do + echo -n 1>&2 "looking for latest version of $f... " + up=$(cd $tmpdir/$UPSTREAM_SUBDIR && find * -name $(basename $f) | grep -v /testdata/) + echo 1>&2 $up + if [ $(echo $up | wc -w) != "1" ]; then + die "not exactly one match" + fi + filename_map[$up]=$f +done +# Pass 2: copy files +for up in "${!filename_map[@]}"; do + f=${filename_map[$up]} + shortname=$(basename $f | sed 's,\.proto$,,') + cp $tmpdir/$UPSTREAM_SUBDIR/$up $PKG/$f +done + +# Run protoc once per package. +for dir in $(find $PKG -name '*.proto' | xargs dirname | sort | uniq); do + echo 1>&2 "* $dir" + protoc --go_out=. $dir/*.proto +done +echo 1>&2 "All OK" diff --git a/vendor/github.com/golang/protobuf/ptypes/struct/struct.pb.go b/vendor/github.com/golang/protobuf/ptypes/struct/struct.pb.go new file mode 100644 index 000000000..0b28e475e --- /dev/null +++ b/vendor/github.com/golang/protobuf/ptypes/struct/struct.pb.go @@ -0,0 +1,382 @@ +// Code generated by protoc-gen-go. +// source: github.com/golang/protobuf/ptypes/struct/struct.proto +// DO NOT EDIT! + +/* +Package structpb is a generated protocol buffer package. + +It is generated from these files: + github.com/golang/protobuf/ptypes/struct/struct.proto + +It has these top-level messages: + Struct + Value + ListValue +*/ +package structpb + +import proto "github.com/golang/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.ProtoPackageIsVersion2 // please upgrade the proto package + +// `NullValue` is a singleton enumeration to represent the null value for the +// `Value` type union. +// +// The JSON representation for `NullValue` is JSON `null`. +type NullValue int32 + +const ( + // Null value. + NullValue_NULL_VALUE NullValue = 0 +) + +var NullValue_name = map[int32]string{ + 0: "NULL_VALUE", +} +var NullValue_value = map[string]int32{ + "NULL_VALUE": 0, +} + +func (x NullValue) String() string { + return proto.EnumName(NullValue_name, int32(x)) +} +func (NullValue) EnumDescriptor() ([]byte, []int) { return fileDescriptor0, []int{0} } +func (NullValue) XXX_WellKnownType() string { return "NullValue" } + +// `Struct` represents a structured data value, consisting of fields +// which map to dynamically typed values. In some languages, `Struct` +// might be supported by a native representation. For example, in +// scripting languages like JS a struct is represented as an +// object. The details of that representation are described together +// with the proto support for the language. +// +// The JSON representation for `Struct` is JSON object. +type Struct struct { + // Unordered map of dynamically typed values. + Fields map[string]*Value `protobuf:"bytes,1,rep,name=fields" json:"fields,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` +} + +func (m *Struct) Reset() { *m = Struct{} } +func (m *Struct) String() string { return proto.CompactTextString(m) } +func (*Struct) ProtoMessage() {} +func (*Struct) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{0} } +func (*Struct) XXX_WellKnownType() string { return "Struct" } + +func (m *Struct) GetFields() map[string]*Value { + if m != nil { + return m.Fields + } + return nil +} + +// `Value` represents a dynamically typed value which can be either +// null, a number, a string, a boolean, a recursive struct value, or a +// list of values. A producer of value is expected to set one of that +// variants, absence of any variant indicates an error. +// +// The JSON representation for `Value` is JSON value. +type Value struct { + // The kind of value. + // + // Types that are valid to be assigned to Kind: + // *Value_NullValue + // *Value_NumberValue + // *Value_StringValue + // *Value_BoolValue + // *Value_StructValue + // *Value_ListValue + Kind isValue_Kind `protobuf_oneof:"kind"` +} + +func (m *Value) Reset() { *m = Value{} } +func (m *Value) String() string { return proto.CompactTextString(m) } +func (*Value) ProtoMessage() {} +func (*Value) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{1} } +func (*Value) XXX_WellKnownType() string { return "Value" } + +type isValue_Kind interface { + isValue_Kind() +} + +type Value_NullValue struct { + NullValue NullValue `protobuf:"varint,1,opt,name=null_value,json=nullValue,enum=google.protobuf.NullValue,oneof"` +} +type Value_NumberValue struct { + NumberValue float64 `protobuf:"fixed64,2,opt,name=number_value,json=numberValue,oneof"` +} +type Value_StringValue struct { + StringValue string `protobuf:"bytes,3,opt,name=string_value,json=stringValue,oneof"` +} +type Value_BoolValue struct { + BoolValue bool `protobuf:"varint,4,opt,name=bool_value,json=boolValue,oneof"` +} +type Value_StructValue struct { + StructValue *Struct `protobuf:"bytes,5,opt,name=struct_value,json=structValue,oneof"` +} +type Value_ListValue struct { + ListValue *ListValue `protobuf:"bytes,6,opt,name=list_value,json=listValue,oneof"` +} + +func (*Value_NullValue) isValue_Kind() {} +func (*Value_NumberValue) isValue_Kind() {} +func (*Value_StringValue) isValue_Kind() {} +func (*Value_BoolValue) isValue_Kind() {} +func (*Value_StructValue) isValue_Kind() {} +func (*Value_ListValue) isValue_Kind() {} + +func (m *Value) GetKind() isValue_Kind { + if m != nil { + return m.Kind + } + return nil +} + +func (m *Value) GetNullValue() NullValue { + if x, ok := m.GetKind().(*Value_NullValue); ok { + return x.NullValue + } + return NullValue_NULL_VALUE +} + +func (m *Value) GetNumberValue() float64 { + if x, ok := m.GetKind().(*Value_NumberValue); ok { + return x.NumberValue + } + return 0 +} + +func (m *Value) GetStringValue() string { + if x, ok := m.GetKind().(*Value_StringValue); ok { + return x.StringValue + } + return "" +} + +func (m *Value) GetBoolValue() bool { + if x, ok := m.GetKind().(*Value_BoolValue); ok { + return x.BoolValue + } + return false +} + +func (m *Value) GetStructValue() *Struct { + if x, ok := m.GetKind().(*Value_StructValue); ok { + return x.StructValue + } + return nil +} + +func (m *Value) GetListValue() *ListValue { + if x, ok := m.GetKind().(*Value_ListValue); ok { + return x.ListValue + } + return nil +} + +// XXX_OneofFuncs is for the internal use of the proto package. +func (*Value) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{}) { + return _Value_OneofMarshaler, _Value_OneofUnmarshaler, _Value_OneofSizer, []interface{}{ + (*Value_NullValue)(nil), + (*Value_NumberValue)(nil), + (*Value_StringValue)(nil), + (*Value_BoolValue)(nil), + (*Value_StructValue)(nil), + (*Value_ListValue)(nil), + } +} + +func _Value_OneofMarshaler(msg proto.Message, b *proto.Buffer) error { + m := msg.(*Value) + // kind + switch x := m.Kind.(type) { + case *Value_NullValue: + b.EncodeVarint(1<<3 | proto.WireVarint) + b.EncodeVarint(uint64(x.NullValue)) + case *Value_NumberValue: + b.EncodeVarint(2<<3 | proto.WireFixed64) + b.EncodeFixed64(math.Float64bits(x.NumberValue)) + case *Value_StringValue: + b.EncodeVarint(3<<3 | proto.WireBytes) + b.EncodeStringBytes(x.StringValue) + case *Value_BoolValue: + t := uint64(0) + if x.BoolValue { + t = 1 + } + b.EncodeVarint(4<<3 | proto.WireVarint) + b.EncodeVarint(t) + case *Value_StructValue: + b.EncodeVarint(5<<3 | proto.WireBytes) + if err := b.EncodeMessage(x.StructValue); err != nil { + return err + } + case *Value_ListValue: + b.EncodeVarint(6<<3 | proto.WireBytes) + if err := b.EncodeMessage(x.ListValue); err != nil { + return err + } + case nil: + default: + return fmt.Errorf("Value.Kind has unexpected type %T", x) + } + return nil +} + +func _Value_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) { + m := msg.(*Value) + switch tag { + case 1: // kind.null_value + if wire != proto.WireVarint { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeVarint() + m.Kind = &Value_NullValue{NullValue(x)} + return true, err + case 2: // kind.number_value + if wire != proto.WireFixed64 { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeFixed64() + m.Kind = &Value_NumberValue{math.Float64frombits(x)} + return true, err + case 3: // kind.string_value + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeStringBytes() + m.Kind = &Value_StringValue{x} + return true, err + case 4: // kind.bool_value + if wire != proto.WireVarint { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeVarint() + m.Kind = &Value_BoolValue{x != 0} + return true, err + case 5: // kind.struct_value + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + msg := new(Struct) + err := b.DecodeMessage(msg) + m.Kind = &Value_StructValue{msg} + return true, err + case 6: // kind.list_value + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + msg := new(ListValue) + err := b.DecodeMessage(msg) + m.Kind = &Value_ListValue{msg} + return true, err + default: + return false, nil + } +} + +func _Value_OneofSizer(msg proto.Message) (n int) { + m := msg.(*Value) + // kind + switch x := m.Kind.(type) { + case *Value_NullValue: + n += proto.SizeVarint(1<<3 | proto.WireVarint) + n += proto.SizeVarint(uint64(x.NullValue)) + case *Value_NumberValue: + n += proto.SizeVarint(2<<3 | proto.WireFixed64) + n += 8 + case *Value_StringValue: + n += proto.SizeVarint(3<<3 | proto.WireBytes) + n += proto.SizeVarint(uint64(len(x.StringValue))) + n += len(x.StringValue) + case *Value_BoolValue: + n += proto.SizeVarint(4<<3 | proto.WireVarint) + n += 1 + case *Value_StructValue: + s := proto.Size(x.StructValue) + n += proto.SizeVarint(5<<3 | proto.WireBytes) + n += proto.SizeVarint(uint64(s)) + n += s + case *Value_ListValue: + s := proto.Size(x.ListValue) + n += proto.SizeVarint(6<<3 | proto.WireBytes) + n += proto.SizeVarint(uint64(s)) + n += s + case nil: + default: + panic(fmt.Sprintf("proto: unexpected type %T in oneof", x)) + } + return n +} + +// `ListValue` is a wrapper around a repeated field of values. +// +// The JSON representation for `ListValue` is JSON array. +type ListValue struct { + // Repeated field of dynamically typed values. + Values []*Value `protobuf:"bytes,1,rep,name=values" json:"values,omitempty"` +} + +func (m *ListValue) Reset() { *m = ListValue{} } +func (m *ListValue) String() string { return proto.CompactTextString(m) } +func (*ListValue) ProtoMessage() {} +func (*ListValue) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{2} } +func (*ListValue) XXX_WellKnownType() string { return "ListValue" } + +func (m *ListValue) GetValues() []*Value { + if m != nil { + return m.Values + } + return nil +} + +func init() { + proto.RegisterType((*Struct)(nil), "google.protobuf.Struct") + proto.RegisterType((*Value)(nil), "google.protobuf.Value") + proto.RegisterType((*ListValue)(nil), "google.protobuf.ListValue") + proto.RegisterEnum("google.protobuf.NullValue", NullValue_name, NullValue_value) +} + +func init() { + proto.RegisterFile("github.com/golang/protobuf/ptypes/struct/struct.proto", fileDescriptor0) +} + +var fileDescriptor0 = []byte{ + // 412 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0x8c, 0x92, 0xcf, 0x8b, 0xd3, 0x40, + 0x14, 0xc7, 0x3b, 0x49, 0x1b, 0xcc, 0x8b, 0xd4, 0x12, 0x41, 0x4b, 0x05, 0x95, 0xf6, 0x52, 0x44, + 0x12, 0xac, 0x08, 0x62, 0xbd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 0x00, 0x00, 0xff, 0xff, 0xbc, 0xcf, 0x6d, 0x50, 0xfe, 0x02, 0x00, 0x00, +} diff --git a/vendor/github.com/golang/protobuf/ptypes/struct/struct.proto b/vendor/github.com/golang/protobuf/ptypes/struct/struct.proto new file mode 100644 index 000000000..beeba8118 --- /dev/null +++ b/vendor/github.com/golang/protobuf/ptypes/struct/struct.proto @@ -0,0 +1,96 @@ +// Protocol Buffers - Google's data interchange format +// Copyright 2008 Google Inc. All rights reserved. +// https://developers.google.com/protocol-buffers/ +// +// 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. + +syntax = "proto3"; + +package google.protobuf; + +option csharp_namespace = "Google.Protobuf.WellKnownTypes"; +option go_package = "github.com/golang/protobuf/ptypes/struct;structpb"; +option java_package = "com.google.protobuf"; +option java_outer_classname = "StructProto"; +option java_multiple_files = true; +option java_generate_equals_and_hash = true; +option objc_class_prefix = "GPB"; + + +// `Struct` represents a structured data value, consisting of fields +// which map to dynamically typed values. In some languages, `Struct` +// might be supported by a native representation. For example, in +// scripting languages like JS a struct is represented as an +// object. The details of that representation are described together +// with the proto support for the language. +// +// The JSON representation for `Struct` is JSON object. +message Struct { + // Unordered map of dynamically typed values. + map fields = 1; +} + +// `Value` represents a dynamically typed value which can be either +// null, a number, a string, a boolean, a recursive struct value, or a +// list of values. A producer of value is expected to set one of that +// variants, absence of any variant indicates an error. +// +// The JSON representation for `Value` is JSON value. +message Value { + // The kind of value. + oneof kind { + // Represents a null value. + NullValue null_value = 1; + // Represents a double value. + double number_value = 2; + // Represents a string value. + string string_value = 3; + // Represents a boolean value. + bool bool_value = 4; + // Represents a structured value. + Struct struct_value = 5; + // Represents a repeated `Value`. + ListValue list_value = 6; + } +} + +// `NullValue` is a singleton enumeration to represent the null value for the +// `Value` type union. +// +// The JSON representation for `NullValue` is JSON `null`. +enum NullValue { + // Null value. + NULL_VALUE = 0; +} + +// `ListValue` is a wrapper around a repeated field of values. +// +// The JSON representation for `ListValue` is JSON array. +message ListValue { + // Repeated field of dynamically typed values. + repeated Value values = 1; +} diff --git a/vendor/github.com/golang/protobuf/ptypes/timestamp.go b/vendor/github.com/golang/protobuf/ptypes/timestamp.go new file mode 100644 index 000000000..1b3657622 --- /dev/null +++ b/vendor/github.com/golang/protobuf/ptypes/timestamp.go @@ -0,0 +1,125 @@ +// 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 ptypes + +// This file implements operations on google.protobuf.Timestamp. + +import ( + "errors" + "fmt" + "time" + + tspb "github.com/golang/protobuf/ptypes/timestamp" +) + +const ( + // Seconds field of the earliest valid Timestamp. + // This is time.Date(1, 1, 1, 0, 0, 0, 0, time.UTC).Unix(). + minValidSeconds = -62135596800 + // Seconds field just after the latest valid Timestamp. + // This is time.Date(10000, 1, 1, 0, 0, 0, 0, time.UTC).Unix(). + maxValidSeconds = 253402300800 +) + +// validateTimestamp determines whether a Timestamp is valid. +// A valid timestamp represents a time in the range +// [0001-01-01, 10000-01-01) and has a Nanos field +// in the range [0, 1e9). +// +// If the Timestamp is valid, validateTimestamp returns nil. +// Otherwise, it returns an error that describes +// the problem. +// +// Every valid Timestamp can be represented by a time.Time, but the converse is not true. +func validateTimestamp(ts *tspb.Timestamp) error { + if ts == nil { + return errors.New("timestamp: nil Timestamp") + } + if ts.Seconds < minValidSeconds { + return fmt.Errorf("timestamp: %v before 0001-01-01", ts) + } + if ts.Seconds >= maxValidSeconds { + return fmt.Errorf("timestamp: %v after 10000-01-01", ts) + } + if ts.Nanos < 0 || ts.Nanos >= 1e9 { + return fmt.Errorf("timestamp: %v: nanos not in range [0, 1e9)", ts) + } + return nil +} + +// Timestamp converts a google.protobuf.Timestamp proto to a time.Time. +// It returns an error if the argument is invalid. +// +// Unlike most Go functions, if Timestamp returns an error, the first return value +// is not the zero time.Time. Instead, it is the value obtained from the +// time.Unix function when passed the contents of the Timestamp, in the UTC +// locale. This may or may not be a meaningful time; many invalid Timestamps +// do map to valid time.Times. +// +// A nil Timestamp returns an error. The first return value in that case is +// undefined. +func Timestamp(ts *tspb.Timestamp) (time.Time, error) { + // Don't return the zero value on error, because corresponds to a valid + // timestamp. Instead return whatever time.Unix gives us. + var t time.Time + if ts == nil { + t = time.Unix(0, 0).UTC() // treat nil like the empty Timestamp + } else { + t = time.Unix(ts.Seconds, int64(ts.Nanos)).UTC() + } + return t, validateTimestamp(ts) +} + +// TimestampProto converts the time.Time to a google.protobuf.Timestamp proto. +// It returns an error if the resulting Timestamp is invalid. +func TimestampProto(t time.Time) (*tspb.Timestamp, error) { + seconds := t.Unix() + nanos := int32(t.Sub(time.Unix(seconds, 0))) + ts := &tspb.Timestamp{ + Seconds: seconds, + Nanos: nanos, + } + if err := validateTimestamp(ts); err != nil { + return nil, err + } + return ts, nil +} + +// TimestampString returns the RFC 3339 string for valid Timestamps. For invalid +// Timestamps, it returns an error message in parentheses. +func TimestampString(ts *tspb.Timestamp) string { + t, err := Timestamp(ts) + if err != nil { + return fmt.Sprintf("(%v)", err) + } + return t.Format(time.RFC3339Nano) +} diff --git a/vendor/github.com/golang/protobuf/ptypes/timestamp/timestamp.pb.go b/vendor/github.com/golang/protobuf/ptypes/timestamp/timestamp.pb.go new file mode 100644 index 000000000..588348c33 --- /dev/null +++ b/vendor/github.com/golang/protobuf/ptypes/timestamp/timestamp.pb.go @@ -0,0 +1,126 @@ +// Code generated by protoc-gen-go. +// source: github.com/golang/protobuf/ptypes/timestamp/timestamp.proto +// DO NOT EDIT! + +/* +Package timestamp is a generated protocol buffer package. + +It is generated from these files: + github.com/golang/protobuf/ptypes/timestamp/timestamp.proto + +It has these top-level messages: + Timestamp +*/ +package timestamp + +import proto "github.com/golang/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.ProtoPackageIsVersion2 // please upgrade the proto package + +// A Timestamp represents a point in time independent of any time zone +// or calendar, represented as seconds and fractions of seconds at +// nanosecond resolution in UTC Epoch time. It is encoded using the +// Proleptic Gregorian Calendar which extends the Gregorian calendar +// backwards to year one. It is encoded assuming all minutes are 60 +// seconds long, i.e. leap seconds are "smeared" so that no leap second +// table is needed for interpretation. Range is from +// 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. +// By restricting to that range, we ensure that we can convert to +// and from RFC 3339 date strings. +// See [https://www.ietf.org/rfc/rfc3339.txt](https://www.ietf.org/rfc/rfc3339.txt). +// +// Example 1: Compute Timestamp from POSIX `time()`. +// +// Timestamp timestamp; +// timestamp.set_seconds(time(NULL)); +// timestamp.set_nanos(0); +// +// Example 2: Compute Timestamp from POSIX `gettimeofday()`. +// +// struct timeval tv; +// gettimeofday(&tv, NULL); +// +// Timestamp timestamp; +// timestamp.set_seconds(tv.tv_sec); +// timestamp.set_nanos(tv.tv_usec * 1000); +// +// Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. +// +// FILETIME ft; +// GetSystemTimeAsFileTime(&ft); +// UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; +// +// // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z +// // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. +// Timestamp timestamp; +// timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); +// timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); +// +// Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. +// +// long millis = System.currentTimeMillis(); +// +// Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) +// .setNanos((int) ((millis % 1000) * 1000000)).build(); +// +// +// Example 5: Compute Timestamp from current time in Python. +// +// now = time.time() +// seconds = int(now) +// nanos = int((now - seconds) * 10**9) +// timestamp = Timestamp(seconds=seconds, nanos=nanos) +// +// +type Timestamp struct { + // Represents seconds of UTC time since Unix epoch + // 1970-01-01T00:00:00Z. Must be from from 0001-01-01T00:00:00Z to + // 9999-12-31T23:59:59Z inclusive. + Seconds int64 `protobuf:"varint,1,opt,name=seconds" json:"seconds,omitempty"` + // Non-negative fractions of a second at nanosecond resolution. Negative + // second values with fractions must still have non-negative nanos values + // that count forward in time. Must be from 0 to 999,999,999 + // inclusive. + Nanos int32 `protobuf:"varint,2,opt,name=nanos" json:"nanos,omitempty"` +} + +func (m *Timestamp) Reset() { *m = Timestamp{} } +func (m *Timestamp) String() string { return proto.CompactTextString(m) } +func (*Timestamp) ProtoMessage() {} +func (*Timestamp) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{0} } +func (*Timestamp) XXX_WellKnownType() string { return "Timestamp" } + +func init() { + proto.RegisterType((*Timestamp)(nil), "google.protobuf.Timestamp") +} + +func init() { + proto.RegisterFile("github.com/golang/protobuf/ptypes/timestamp/timestamp.proto", fileDescriptor0) +} + +var fileDescriptor0 = []byte{ + // 192 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6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01, 0x00, 0x00, +} diff --git a/vendor/github.com/golang/protobuf/ptypes/timestamp/timestamp.proto b/vendor/github.com/golang/protobuf/ptypes/timestamp/timestamp.proto new file mode 100644 index 000000000..7992a8588 --- /dev/null +++ b/vendor/github.com/golang/protobuf/ptypes/timestamp/timestamp.proto @@ -0,0 +1,111 @@ +// Protocol Buffers - Google's data interchange format +// Copyright 2008 Google Inc. All rights reserved. +// https://developers.google.com/protocol-buffers/ +// +// 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. + +syntax = "proto3"; + +package google.protobuf; + +option csharp_namespace = "Google.Protobuf.WellKnownTypes"; +option cc_enable_arenas = true; +option go_package = "github.com/golang/protobuf/ptypes/timestamp"; +option java_package = "com.google.protobuf"; +option java_outer_classname = "TimestampProto"; +option java_multiple_files = true; +option java_generate_equals_and_hash = true; +option objc_class_prefix = "GPB"; + +// A Timestamp represents a point in time independent of any time zone +// or calendar, represented as seconds and fractions of seconds at +// nanosecond resolution in UTC Epoch time. It is encoded using the +// Proleptic Gregorian Calendar which extends the Gregorian calendar +// backwards to year one. It is encoded assuming all minutes are 60 +// seconds long, i.e. leap seconds are "smeared" so that no leap second +// table is needed for interpretation. Range is from +// 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. +// By restricting to that range, we ensure that we can convert to +// and from RFC 3339 date strings. +// See [https://www.ietf.org/rfc/rfc3339.txt](https://www.ietf.org/rfc/rfc3339.txt). +// +// Example 1: Compute Timestamp from POSIX `time()`. +// +// Timestamp timestamp; +// timestamp.set_seconds(time(NULL)); +// timestamp.set_nanos(0); +// +// Example 2: Compute Timestamp from POSIX `gettimeofday()`. +// +// struct timeval tv; +// gettimeofday(&tv, NULL); +// +// Timestamp timestamp; +// timestamp.set_seconds(tv.tv_sec); +// timestamp.set_nanos(tv.tv_usec * 1000); +// +// Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. +// +// FILETIME ft; +// GetSystemTimeAsFileTime(&ft); +// UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; +// +// // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z +// // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. +// Timestamp timestamp; +// timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); +// timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); +// +// Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. +// +// long millis = System.currentTimeMillis(); +// +// Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) +// .setNanos((int) ((millis % 1000) * 1000000)).build(); +// +// +// Example 5: Compute Timestamp from current time in Python. +// +// now = time.time() +// seconds = int(now) +// nanos = int((now - seconds) * 10**9) +// timestamp = Timestamp(seconds=seconds, nanos=nanos) +// +// +message Timestamp { + + // Represents seconds of UTC time since Unix epoch + // 1970-01-01T00:00:00Z. Must be from from 0001-01-01T00:00:00Z to + // 9999-12-31T23:59:59Z inclusive. + int64 seconds = 1; + + // Non-negative fractions of a second at nanosecond resolution. Negative + // second values with fractions must still have non-negative nanos values + // that count forward in time. Must be from 0 to 999,999,999 + // inclusive. + int32 nanos = 2; +} diff --git a/vendor/github.com/golang/protobuf/ptypes/timestamp_test.go b/vendor/github.com/golang/protobuf/ptypes/timestamp_test.go new file mode 100644 index 000000000..114a7f9fc --- /dev/null +++ b/vendor/github.com/golang/protobuf/ptypes/timestamp_test.go @@ -0,0 +1,138 @@ +// 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 ptypes + +import ( + "math" + "testing" + "time" + + "github.com/golang/protobuf/proto" + tspb "github.com/golang/protobuf/ptypes/timestamp" +) + +var tests = []struct { + ts *tspb.Timestamp + valid bool + t time.Time +}{ + // The timestamp representing the Unix epoch date. + {&tspb.Timestamp{0, 0}, true, utcDate(1970, 1, 1)}, + // The smallest representable timestamp. + {&tspb.Timestamp{math.MinInt64, math.MinInt32}, false, + time.Unix(math.MinInt64, math.MinInt32).UTC()}, + // The smallest representable timestamp with non-negative nanos. + {&tspb.Timestamp{math.MinInt64, 0}, false, time.Unix(math.MinInt64, 0).UTC()}, + // The earliest valid timestamp. + {&tspb.Timestamp{minValidSeconds, 0}, true, utcDate(1, 1, 1)}, + //"0001-01-01T00:00:00Z"}, + // The largest representable timestamp. + {&tspb.Timestamp{math.MaxInt64, math.MaxInt32}, false, + time.Unix(math.MaxInt64, math.MaxInt32).UTC()}, + // The largest representable timestamp with nanos in range. + {&tspb.Timestamp{math.MaxInt64, 1e9 - 1}, false, + time.Unix(math.MaxInt64, 1e9-1).UTC()}, + // The largest valid timestamp. + {&tspb.Timestamp{maxValidSeconds - 1, 1e9 - 1}, true, + time.Date(9999, 12, 31, 23, 59, 59, 1e9-1, time.UTC)}, + // The smallest invalid timestamp that is larger than the valid range. + {&tspb.Timestamp{maxValidSeconds, 0}, false, time.Unix(maxValidSeconds, 0).UTC()}, + // A date before the epoch. + {&tspb.Timestamp{-281836800, 0}, true, utcDate(1961, 1, 26)}, + // A date after the epoch. + {&tspb.Timestamp{1296000000, 0}, true, utcDate(2011, 1, 26)}, + // A date after the epoch, in the middle of the day. + {&tspb.Timestamp{1296012345, 940483}, true, + time.Date(2011, 1, 26, 3, 25, 45, 940483, time.UTC)}, +} + +func TestValidateTimestamp(t *testing.T) { + for _, s := range tests { + got := validateTimestamp(s.ts) + if (got == nil) != s.valid { + t.Errorf("validateTimestamp(%v) = %v, want %v", s.ts, got, s.valid) + } + } +} + +func TestTimestamp(t *testing.T) { + for _, s := range tests { + got, err := Timestamp(s.ts) + if (err == nil) != s.valid { + t.Errorf("Timestamp(%v) error = %v, but valid = %t", s.ts, err, s.valid) + } else if s.valid && got != s.t { + t.Errorf("Timestamp(%v) = %v, want %v", s.ts, got, s.t) + } + } + // Special case: a nil Timestamp is an error, but returns the 0 Unix time. + got, err := Timestamp(nil) + want := time.Unix(0, 0).UTC() + if got != want { + t.Errorf("Timestamp(nil) = %v, want %v", got, want) + } + if err == nil { + t.Errorf("Timestamp(nil) error = nil, expected error") + } +} + +func TestTimestampProto(t *testing.T) { + for _, s := range tests { + got, err := TimestampProto(s.t) + if (err == nil) != s.valid { + t.Errorf("TimestampProto(%v) error = %v, but valid = %t", s.t, err, s.valid) + } else if s.valid && !proto.Equal(got, s.ts) { + t.Errorf("TimestampProto(%v) = %v, want %v", s.t, got, s.ts) + } + } + // No corresponding special case here: no time.Time results in a nil Timestamp. +} + +func TestTimestampString(t *testing.T) { + for _, test := range []struct { + ts *tspb.Timestamp + want string + }{ + // Not much testing needed because presumably time.Format is + // well-tested. + {&tspb.Timestamp{0, 0}, "1970-01-01T00:00:00Z"}, + {&tspb.Timestamp{minValidSeconds - 1, 0}, "(timestamp: seconds:-62135596801 before 0001-01-01)"}, + } { + got := TimestampString(test.ts) + if got != test.want { + t.Errorf("TimestampString(%v) = %q, want %q", test.ts, got, test.want) + } + } +} + +func utcDate(year, month, day int) time.Time { + return time.Date(year, time.Month(month), day, 0, 0, 0, 0, time.UTC) +} diff --git a/vendor/github.com/golang/protobuf/ptypes/wrappers/wrappers.pb.go b/vendor/github.com/golang/protobuf/ptypes/wrappers/wrappers.pb.go new file mode 100644 index 000000000..bfc0a5b02 --- /dev/null +++ b/vendor/github.com/golang/protobuf/ptypes/wrappers/wrappers.pb.go @@ -0,0 +1,200 @@ +// Code generated by protoc-gen-go. +// source: github.com/golang/protobuf/ptypes/wrappers/wrappers.proto +// DO NOT EDIT! + +/* +Package wrappers is a generated protocol buffer package. + +It is generated from these files: + github.com/golang/protobuf/ptypes/wrappers/wrappers.proto + +It has these top-level messages: + DoubleValue + FloatValue + Int64Value + UInt64Value + Int32Value + UInt32Value + BoolValue + StringValue + BytesValue +*/ +package wrappers + +import proto "github.com/golang/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.ProtoPackageIsVersion2 // please upgrade the proto package + +// Wrapper message for `double`. +// +// The JSON representation for `DoubleValue` is JSON number. +type DoubleValue struct { + // The double value. + Value float64 `protobuf:"fixed64,1,opt,name=value" json:"value,omitempty"` +} + +func (m *DoubleValue) Reset() { *m = DoubleValue{} } +func (m *DoubleValue) String() string { return proto.CompactTextString(m) } +func (*DoubleValue) ProtoMessage() {} +func (*DoubleValue) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{0} } +func (*DoubleValue) XXX_WellKnownType() string { return "DoubleValue" } + +// Wrapper message for `float`. +// +// The JSON representation for `FloatValue` is JSON number. +type FloatValue struct { + // The float value. + Value float32 `protobuf:"fixed32,1,opt,name=value" json:"value,omitempty"` +} + +func (m *FloatValue) Reset() { *m = FloatValue{} } +func (m *FloatValue) String() string { return proto.CompactTextString(m) } +func (*FloatValue) ProtoMessage() {} +func (*FloatValue) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{1} } +func (*FloatValue) XXX_WellKnownType() string { return "FloatValue" } + +// Wrapper message for `int64`. +// +// The JSON representation for `Int64Value` is JSON string. +type Int64Value struct { + // The int64 value. + Value int64 `protobuf:"varint,1,opt,name=value" json:"value,omitempty"` +} + +func (m *Int64Value) Reset() { *m = Int64Value{} } +func (m *Int64Value) String() string { return proto.CompactTextString(m) } +func (*Int64Value) ProtoMessage() {} +func (*Int64Value) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{2} } +func (*Int64Value) XXX_WellKnownType() string { return "Int64Value" } + +// Wrapper message for `uint64`. +// +// The JSON representation for `UInt64Value` is JSON string. +type UInt64Value struct { + // The uint64 value. + Value uint64 `protobuf:"varint,1,opt,name=value" json:"value,omitempty"` +} + +func (m *UInt64Value) Reset() { *m = UInt64Value{} } +func (m *UInt64Value) String() string { return proto.CompactTextString(m) } +func (*UInt64Value) ProtoMessage() {} +func (*UInt64Value) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{3} } +func (*UInt64Value) XXX_WellKnownType() string { return "UInt64Value" } + +// Wrapper message for `int32`. +// +// The JSON representation for `Int32Value` is JSON number. +type Int32Value struct { + // The int32 value. + Value int32 `protobuf:"varint,1,opt,name=value" json:"value,omitempty"` +} + +func (m *Int32Value) Reset() { *m = Int32Value{} } +func (m *Int32Value) String() string { return proto.CompactTextString(m) } +func (*Int32Value) ProtoMessage() {} +func (*Int32Value) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{4} } +func (*Int32Value) XXX_WellKnownType() string { return "Int32Value" } + +// Wrapper message for `uint32`. +// +// The JSON representation for `UInt32Value` is JSON number. +type UInt32Value struct { + // The uint32 value. + Value uint32 `protobuf:"varint,1,opt,name=value" json:"value,omitempty"` +} + +func (m *UInt32Value) Reset() { *m = UInt32Value{} } +func (m *UInt32Value) String() string { return proto.CompactTextString(m) } +func (*UInt32Value) ProtoMessage() {} +func (*UInt32Value) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{5} } +func (*UInt32Value) XXX_WellKnownType() string { return "UInt32Value" } + +// Wrapper message for `bool`. +// +// The JSON representation for `BoolValue` is JSON `true` and `false`. +type BoolValue struct { + // The bool value. + Value bool `protobuf:"varint,1,opt,name=value" json:"value,omitempty"` +} + +func (m *BoolValue) Reset() { *m = BoolValue{} } +func (m *BoolValue) String() string { return proto.CompactTextString(m) } +func (*BoolValue) ProtoMessage() {} +func (*BoolValue) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{6} } +func (*BoolValue) XXX_WellKnownType() string { return "BoolValue" } + +// Wrapper message for `string`. +// +// The JSON representation for `StringValue` is JSON string. +type StringValue struct { + // The string value. + Value string `protobuf:"bytes,1,opt,name=value" json:"value,omitempty"` +} + +func (m *StringValue) Reset() { *m = StringValue{} } +func (m *StringValue) String() string { return proto.CompactTextString(m) } +func (*StringValue) ProtoMessage() {} +func (*StringValue) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{7} } +func (*StringValue) XXX_WellKnownType() string { return "StringValue" } + +// Wrapper message for `bytes`. +// +// The JSON representation for `BytesValue` is JSON string. +type BytesValue struct { + // The bytes value. + Value []byte `protobuf:"bytes,1,opt,name=value,proto3" json:"value,omitempty"` +} + +func (m *BytesValue) Reset() { *m = BytesValue{} } +func (m *BytesValue) String() string { return proto.CompactTextString(m) } +func (*BytesValue) ProtoMessage() {} +func (*BytesValue) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{8} } +func (*BytesValue) XXX_WellKnownType() string { return "BytesValue" } + +func init() { + proto.RegisterType((*DoubleValue)(nil), "google.protobuf.DoubleValue") + proto.RegisterType((*FloatValue)(nil), "google.protobuf.FloatValue") + proto.RegisterType((*Int64Value)(nil), "google.protobuf.Int64Value") + proto.RegisterType((*UInt64Value)(nil), "google.protobuf.UInt64Value") + proto.RegisterType((*Int32Value)(nil), "google.protobuf.Int32Value") + proto.RegisterType((*UInt32Value)(nil), "google.protobuf.UInt32Value") + proto.RegisterType((*BoolValue)(nil), "google.protobuf.BoolValue") + proto.RegisterType((*StringValue)(nil), "google.protobuf.StringValue") + proto.RegisterType((*BytesValue)(nil), "google.protobuf.BytesValue") +} + +func init() { + proto.RegisterFile("github.com/golang/protobuf/ptypes/wrappers/wrappers.proto", fileDescriptor0) +} + +var fileDescriptor0 = []byte{ + // 258 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xe2, 0xb2, 0x4c, 0xcf, 0x2c, 0xc9, + 0x28, 0x4d, 0xd2, 0x4b, 0xce, 0xcf, 0xd5, 0x4f, 0xcf, 0xcf, 0x49, 0xcc, 0x4b, 0xd7, 0x2f, 0x28, + 0xca, 0x2f, 0xc9, 0x4f, 0x2a, 0x4d, 0xd3, 0x2f, 0x28, 0xa9, 0x2c, 0x48, 0x2d, 0xd6, 0x2f, 0x2f, + 0x4a, 0x2c, 0x28, 0x48, 0x2d, 0x42, 0x30, 0xf4, 0xc0, 0x2a, 0x84, 0xf8, 0xd3, 0xf3, 0xf3, 0xd3, + 0x73, 0x52, 0xf5, 0x60, 0xea, 0x95, 0x94, 0xb9, 0xb8, 0x5d, 0xf2, 0x4b, 0x93, 0x72, 0x52, 0xc3, + 0x12, 0x73, 0x4a, 0x53, 0x85, 0x44, 0xb8, 0x58, 0xcb, 0x40, 0x0c, 0x09, 0x46, 0x05, 0x46, 0x0d, + 0xc6, 0x20, 0x08, 0x47, 0x49, 0x89, 0x8b, 0xcb, 0x2d, 0x27, 0x3f, 0xb1, 0x04, 0x8b, 0x1a, 0x26, + 0x24, 0x35, 0x9e, 0x79, 0x25, 0x66, 0x26, 0x58, 0xd4, 0x30, 0xc3, 0xd4, 0x00, 0x2d, 0x0b, 0xc5, + 0xa5, 0x88, 0x05, 0xd5, 0x20, 0x63, 0x23, 0x2c, 0x6a, 0x58, 0xd1, 0x0c, 0xc2, 0xaa, 0x88, 0x17, + 0xa6, 0x48, 0x91, 0x8b, 0xd3, 0x29, 0x3f, 0x3f, 0x07, 0x8b, 0x12, 0x0e, 0x24, 0x73, 0x82, 0x4b, + 0x8a, 0x32, 0xf3, 0xd2, 0xb1, 0x28, 0xe2, 0x44, 0x72, 0x90, 0x53, 0x65, 0x49, 0x6a, 0x31, 0x16, + 0x35, 0x3c, 0x50, 0x35, 0x4e, 0xf5, 0x5c, 0xc2, 0xc0, 0xd8, 0xd0, 0x43, 0x0b, 0x5d, 0x27, 0xde, + 0x70, 0x68, 0xf0, 0x07, 0x80, 0x44, 0x02, 0x18, 0xa3, 0xb4, 0x88, 0x8f, 0xba, 0x05, 0x8c, 0x8c, + 0x3f, 0x18, 0x19, 0x17, 0x31, 0x31, 0xbb, 0x07, 0x38, 0xad, 0x62, 0x92, 0x73, 0x87, 0x18, 0x1d, + 0x00, 0x55, 0xad, 0x17, 0x9e, 0x9a, 0x93, 0xe3, 0x9d, 0x97, 0x5f, 0x9e, 0x17, 0x02, 0xd2, 0x95, + 0xc4, 0x06, 0x36, 0xc6, 0x18, 0x10, 0x00, 0x00, 0xff, 0xff, 0xa9, 0xdf, 0x64, 0x4b, 0x1c, 0x02, + 0x00, 0x00, +} diff --git a/vendor/github.com/golang/protobuf/ptypes/wrappers/wrappers.proto b/vendor/github.com/golang/protobuf/ptypes/wrappers/wrappers.proto new file mode 100644 index 000000000..4828ad9ae --- /dev/null +++ b/vendor/github.com/golang/protobuf/ptypes/wrappers/wrappers.proto @@ -0,0 +1,119 @@ +// Protocol Buffers - Google's data interchange format +// Copyright 2008 Google Inc. All rights reserved. +// https://developers.google.com/protocol-buffers/ +// +// 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. + +// Wrappers for primitive (non-message) types. These types are useful +// for embedding primitives in the `google.protobuf.Any` type and for places +// where we need to distinguish between the absence of a primitive +// typed field and its default value. + +syntax = "proto3"; + +package google.protobuf; + +option csharp_namespace = "Google.Protobuf.WellKnownTypes"; +option cc_enable_arenas = true; +option go_package = "github.com/golang/protobuf/ptypes/wrappers"; +option java_package = "com.google.protobuf"; +option java_outer_classname = "WrappersProto"; +option java_multiple_files = true; +option java_generate_equals_and_hash = true; +option objc_class_prefix = "GPB"; + +// Wrapper message for `double`. +// +// The JSON representation for `DoubleValue` is JSON number. +message DoubleValue { + // The double value. + double value = 1; +} + +// Wrapper message for `float`. +// +// The JSON representation for `FloatValue` is JSON number. +message FloatValue { + // The float value. + float value = 1; +} + +// Wrapper message for `int64`. +// +// The JSON representation for `Int64Value` is JSON string. +message Int64Value { + // The int64 value. + int64 value = 1; +} + +// Wrapper message for `uint64`. +// +// The JSON representation for `UInt64Value` is JSON string. +message UInt64Value { + // The uint64 value. + uint64 value = 1; +} + +// Wrapper message for `int32`. +// +// The JSON representation for `Int32Value` is JSON number. +message Int32Value { + // The int32 value. + int32 value = 1; +} + +// Wrapper message for `uint32`. +// +// The JSON representation for `UInt32Value` is JSON number. +message UInt32Value { + // The uint32 value. + uint32 value = 1; +} + +// Wrapper message for `bool`. +// +// The JSON representation for `BoolValue` is JSON `true` and `false`. +message BoolValue { + // The bool value. + bool value = 1; +} + +// Wrapper message for `string`. +// +// The JSON representation for `StringValue` is JSON string. +message StringValue { + // The string value. + string value = 1; +} + +// Wrapper message for `bytes`. +// +// The JSON representation for `BytesValue` is JSON string. +message BytesValue { + // The bytes value. + bytes value = 1; +} diff --git a/vendor/github.com/gorhill/cronexpr/.gitrepo b/vendor/github.com/gorhill/cronexpr/.gitrepo new file mode 100644 index 000000000..ad35f87f1 --- /dev/null +++ b/vendor/github.com/gorhill/cronexpr/.gitrepo @@ -0,0 +1,11 @@ +; DO NOT EDIT (unless you know what you are doing) +; +; This subdirectory is a git "subrepo", and this file is maintained by the +; git-subrepo command. See https://github.com/git-commands/git-subrepo#readme +; +[subrepo] + remote = http://github.com/gorhill/cronexpr.git + branch = master + commit = f0984319b44273e83de132089ae42b1810f4933b + parent = 4541f50e7a0afae1905cb696be175cbfb9ea952b + cmdver = 0.3.0 diff --git a/vendor/github.com/gorhill/cronexpr/cronexpr/README.md b/vendor/github.com/gorhill/cronexpr/cronexpr/README.md new file mode 100644 index 000000000..685c278c9 --- /dev/null +++ b/vendor/github.com/gorhill/cronexpr/cronexpr/README.md @@ -0,0 +1,122 @@ +cronexpr: command-line utility +============================== + +A command-line utility written in Go to evaluate cron time expressions. + +It is based on the standalone Go library . + +## Install + + go get github.com/gorhill/cronexpr + go install github.com/gorhill/cronexpr + +## Usage + + cronexpr [options] "{cron expression}" + +## Options + +`-l`: + +Go-compliant time layout to use for outputting time value(s), see . + +Default is `"Mon, 02 Jan 2006 15:04:05 MST"` + +`-n`: + +Number of resulting time values to output. + +Default is 1. + +`-t`: + +Whole or partial RFC3339 time value (i.e. `2006-01-02T15:04:05Z07:00`) against which the cron expression is evaluated. Examples of valid values include (assuming EST time zone): + +`13` = 2013-01-01T00:00:00-05:00 +`2013` = 2013-01-01T00:00:00-05:00 +`2013-08` = 2013-08-01T00:00:00-05:00 +`2013-08-31` = 2013-08-31T00:00:00-05:00 +`2013-08-31T12` = 2013-08-31T12:00:00-05:00 +`2013-08-31T12:40` = 2013-08-31T12:40:00-05:00 +`2013-08-31T12:40:35` = 2013-08-31T12:40:35-05:00 +`2013-08-31T12:40:35-10:00` = 2013-08-31T12:40:35-10:00 + +Default time is current time, and default time zone is local time zone. + +## Examples + +#### Example 1 + +Midnight on December 31st of any year. + +Command: + + cronexpr -t="2013-08-31" -n=5 "0 0 31 12 *" + +Output (assuming computer is in EST time zone): + + # "0 0 31 12 *" + "2013-08-31T00:00:00-04:00" = + Tue, 31 Dec 2013 00:00:00 EST + Wed, 31 Dec 2014 00:00:00 EST + Thu, 31 Dec 2015 00:00:00 EST + Sat, 31 Dec 2016 00:00:00 EST + Sun, 31 Dec 2017 00:00:00 EST + +#### Example 2 + +2pm on February 29th of any year. + +Command: + + cronexpr -t=2000 -n=10 "0 14 29 2 *" + +Output (assuming computer is in EST time zone): + + # "0 14 29 2 *" + "2000-01-01T00:00:00-05:00" = + Tue, 29 Feb 2000 14:00:00 EST + Sun, 29 Feb 2004 14:00:00 EST + Fri, 29 Feb 2008 14:00:00 EST + Wed, 29 Feb 2012 14:00:00 EST + Mon, 29 Feb 2016 14:00:00 EST + Sat, 29 Feb 2020 14:00:00 EST + Thu, 29 Feb 2024 14:00:00 EST + Tue, 29 Feb 2028 14:00:00 EST + Sun, 29 Feb 2032 14:00:00 EST + Fri, 29 Feb 2036 14:00:00 EST + +#### Example 3 + +12pm on the work day closest to the 15th of March and every three month +thereafter. + +Command: + + cronexpr -t=2013-09-01 -n=5 "0 12 15W 3/3 *" + +Output (assuming computer is in EST time zone): + + # "0 12 15W 3/3 *" + "2013-09-01T00:00:00-04:00" = + Mon, 16 Sep 2013 12:00:00 EDT + Mon, 16 Dec 2013 12:00:00 EST + Fri, 14 Mar 2014 12:00:00 EDT + Mon, 16 Jun 2014 12:00:00 EDT + Mon, 15 Sep 2014 12:00:00 EDT + +#### Example 4 + +Midnight on the fifth Saturday of any month (twist: not all months have a 5th +specific day of week). + +Command: + + cronexpr -t=2013-09-02 -n 5 "0 0 * * 6#5" + +Output (assuming computer is in EST time zone): + + # "0 0 * * 6#5" + "2013-09-02T00:00:00-04:00" = + Sat, 30 Nov 2013 00:00:00 EST + Sat, 29 Mar 2014 00:00:00 EDT + Sat, 31 May 2014 00:00:00 EDT + Sat, 30 Aug 2014 00:00:00 EDT + Sat, 29 Nov 2014 00:00:00 EST + diff --git a/vendor/github.com/gorhill/cronexpr/cronexpr/main.go b/vendor/github.com/gorhill/cronexpr/cronexpr/main.go new file mode 100644 index 000000000..1d9abe5bc --- /dev/null +++ b/vendor/github.com/gorhill/cronexpr/cronexpr/main.go @@ -0,0 +1,111 @@ +/*! + * Copyright 2013 Raymond Hill + * + * Project: github.com/gorhill/cronexpr + * File: main.go + * Version: 1.0 + * License: GPL v3 see + * + */ + +package main + +/******************************************************************************/ + +import ( + "flag" + "fmt" + "os" + "time" + + "github.com/gorhill/cronexpr" +) + +/******************************************************************************/ + +var ( + usage = func() { + fmt.Fprintf(os.Stderr, "usage:\n %s [options] \"{cron expression}\"\noptions:\n", os.Args[0]) + flag.PrintDefaults() + } + inTimeStr string + outTimeCount uint + outTimeLayout string +) + +/******************************************************************************/ + +func main() { + var err error + + flag.Usage = usage + flag.StringVar(&inTimeStr, "t", "", `whole or partial RFC3339 time value (i.e. "2006-01-02T15:04:05Z07:00") against which the cron expression is evaluated, now if not present`) + flag.UintVar(&outTimeCount, "n", 1, `number of resulting time values to output`) + flag.StringVar(&outTimeLayout, "l", "Mon, 02 Jan 2006 15:04:05 MST", `Go-compliant time layout to use for outputting time value(s), see `) + flag.Parse() + + cronStr := flag.Arg(0) + if len(cronStr) == 0 { + flag.Usage() + return + } + + inTime := time.Now() + inTimeLayout := "" + timeStrLen := len(inTimeStr) + if timeStrLen == 2 { + inTimeLayout = "06" + } else if timeStrLen >= 4 { + inTimeLayout += "2006" + if timeStrLen >= 7 { + inTimeLayout += "-01" + if timeStrLen >= 10 { + inTimeLayout += "-02" + if timeStrLen >= 13 { + inTimeLayout += "T15" + if timeStrLen >= 16 { + inTimeLayout += ":04" + if timeStrLen >= 19 { + inTimeLayout += ":05" + if timeStrLen >= 20 { + inTimeLayout += "Z07:00" + } + } + } + } + } + } + } + + if len(inTimeLayout) > 0 { + // default to local time zone + if timeStrLen < 20 { + inTime, err = time.ParseInLocation(inTimeLayout, inTimeStr, time.Local) + } else { + inTime, err = time.Parse(inTimeLayout, inTimeStr) + } + if err != nil { + fmt.Fprintf(os.Stderr, "# error: unparseable time value: \"%s\"\n", inTimeStr) + os.Exit(1) + } + } + + expr, err := cronexpr.Parse(cronStr) + if err != nil { + fmt.Fprintf(os.Stderr, "# %s: %s\n", os.Args[0], err) + os.Exit(1) + } + + // Anything on the output which starts with '#' can be ignored if the caller + // is interested only in the time values. There is only one time + // value per line, and they are always in chronological ascending order. + fmt.Printf("# \"%s\" + \"%s\" =\n", cronStr, inTime.Format(time.RFC3339)) + + if outTimeCount < 1 { + outTimeCount = 1 + } + outTimes := expr.NextN(inTime, outTimeCount) + for _, outTime := range outTimes { + fmt.Println(outTime.Format(outTimeLayout)) + } +} diff --git a/vendor/github.com/gorhill/cronexpr/cronexpr_test.go b/vendor/github.com/gorhill/cronexpr/cronexpr_test.go new file mode 100644 index 000000000..b72917014 --- /dev/null +++ b/vendor/github.com/gorhill/cronexpr/cronexpr_test.go @@ -0,0 +1,321 @@ +/*! + * Copyright 2013 Raymond Hill + * + * Project: github.com/gorhill/cronexpr + * File: cronexpr_test.go + * Version: 1.0 + * License: pick the one which suits you best: + * GPL v3 see + * APL v2 see + * + */ + +package cronexpr_test + +/******************************************************************************/ + +import ( + "testing" + "time" + + "github.com/gorhill/cronexpr" +) + +/******************************************************************************/ + +type crontimes struct { + from string + next string +} + +type crontest struct { + expr string + layout string + times []crontimes +} + +var crontests = []crontest{ + // Seconds + { + "* * * * * * *", + "2006-01-02 15:04:05", + []crontimes{ + {"2013-01-01 00:00:00", "2013-01-01 00:00:01"}, + {"2013-01-01 00:00:59", "2013-01-01 00:01:00"}, + {"2013-01-01 00:59:59", "2013-01-01 01:00:00"}, + {"2013-01-01 23:59:59", "2013-01-02 00:00:00"}, + {"2013-02-28 23:59:59", "2013-03-01 00:00:00"}, + {"2016-02-28 23:59:59", "2016-02-29 00:00:00"}, + {"2012-12-31 23:59:59", "2013-01-01 00:00:00"}, + }, + }, + + // every 5 Second + { + "*/5 * * * * * *", + "2006-01-02 15:04:05", + []crontimes{ + {"2013-01-01 00:00:00", "2013-01-01 00:00:05"}, + {"2013-01-01 00:00:59", "2013-01-01 00:01:00"}, + {"2013-01-01 00:59:59", "2013-01-01 01:00:00"}, + {"2013-01-01 23:59:59", "2013-01-02 00:00:00"}, + {"2013-02-28 23:59:59", "2013-03-01 00:00:00"}, + {"2016-02-28 23:59:59", "2016-02-29 00:00:00"}, + {"2012-12-31 23:59:59", "2013-01-01 00:00:00"}, + }, + }, + + // Minutes + { + "* * * * *", + "2006-01-02 15:04:05", + []crontimes{ + {"2013-01-01 00:00:00", "2013-01-01 00:01:00"}, + {"2013-01-01 00:00:59", "2013-01-01 00:01:00"}, + {"2013-01-01 00:59:00", "2013-01-01 01:00:00"}, + {"2013-01-01 23:59:00", "2013-01-02 00:00:00"}, + {"2013-02-28 23:59:00", "2013-03-01 00:00:00"}, + {"2016-02-28 23:59:00", "2016-02-29 00:00:00"}, + {"2012-12-31 23:59:00", "2013-01-01 00:00:00"}, + }, + }, + + // Minutes with interval + { + "17-43/5 * * * *", + "2006-01-02 15:04:05", + []crontimes{ + {"2013-01-01 00:00:00", "2013-01-01 00:17:00"}, + {"2013-01-01 00:16:59", "2013-01-01 00:17:00"}, + {"2013-01-01 00:30:00", "2013-01-01 00:32:00"}, + {"2013-01-01 00:50:00", "2013-01-01 01:17:00"}, + {"2013-01-01 23:50:00", "2013-01-02 00:17:00"}, + {"2013-02-28 23:50:00", "2013-03-01 00:17:00"}, + {"2016-02-28 23:50:00", "2016-02-29 00:17:00"}, + {"2012-12-31 23:50:00", "2013-01-01 00:17:00"}, + }, + }, + + // Minutes interval, list + { + "15-30/4,55 * * * *", + "2006-01-02 15:04:05", + []crontimes{ + {"2013-01-01 00:00:00", "2013-01-01 00:15:00"}, + {"2013-01-01 00:16:00", "2013-01-01 00:19:00"}, + {"2013-01-01 00:30:00", "2013-01-01 00:55:00"}, + {"2013-01-01 00:55:00", "2013-01-01 01:15:00"}, + {"2013-01-01 23:55:00", "2013-01-02 00:15:00"}, + {"2013-02-28 23:55:00", "2013-03-01 00:15:00"}, + {"2016-02-28 23:55:00", "2016-02-29 00:15:00"}, + {"2012-12-31 23:54:00", "2012-12-31 23:55:00"}, + {"2012-12-31 23:55:00", "2013-01-01 00:15:00"}, + }, + }, + + // Days of week + { + "0 0 * * MON", + "Mon 2006-01-02 15:04", + []crontimes{ + {"2013-01-01 00:00:00", "Mon 2013-01-07 00:00"}, + {"2013-01-28 00:00:00", "Mon 2013-02-04 00:00"}, + {"2013-12-30 00:30:00", "Mon 2014-01-06 00:00"}, + }, + }, + { + "0 0 * * friday", + "Mon 2006-01-02 15:04", + []crontimes{ + {"2013-01-01 00:00:00", "Fri 2013-01-04 00:00"}, + {"2013-01-28 00:00:00", "Fri 2013-02-01 00:00"}, + {"2013-12-30 00:30:00", "Fri 2014-01-03 00:00"}, + }, + }, + { + "0 0 * * 6,7", + "Mon 2006-01-02 15:04", + []crontimes{ + {"2013-01-01 00:00:00", "Sat 2013-01-05 00:00"}, + {"2013-01-28 00:00:00", "Sat 2013-02-02 00:00"}, + {"2013-12-30 00:30:00", "Sat 2014-01-04 00:00"}, + }, + }, + + // Specific days of week + { + "0 0 * * 6#5", + "Mon 2006-01-02 15:04", + []crontimes{ + {"2013-09-02 00:00:00", "Sat 2013-11-30 00:00"}, + }, + }, + + // Work day of month + { + "0 0 14W * *", + "Mon 2006-01-02 15:04", + []crontimes{ + {"2013-03-31 00:00:00", "Mon 2013-04-15 00:00"}, + {"2013-08-31 00:00:00", "Fri 2013-09-13 00:00"}, + }, + }, + + // Work day of month -- end of month + { + "0 0 30W * *", + "Mon 2006-01-02 15:04", + []crontimes{ + {"2013-03-02 00:00:00", "Fri 2013-03-29 00:00"}, + {"2013-06-02 00:00:00", "Fri 2013-06-28 00:00"}, + {"2013-09-02 00:00:00", "Mon 2013-09-30 00:00"}, + {"2013-11-02 00:00:00", "Fri 2013-11-29 00:00"}, + }, + }, + + // Last day of month + { + "0 0 L * *", + "Mon 2006-01-02 15:04", + []crontimes{ + {"2013-09-02 00:00:00", "Mon 2013-09-30 00:00"}, + {"2014-01-01 00:00:00", "Fri 2014-01-31 00:00"}, + {"2014-02-01 00:00:00", "Fri 2014-02-28 00:00"}, + {"2016-02-15 00:00:00", "Mon 2016-02-29 00:00"}, + }, + }, + + // Last work day of month + { + "0 0 LW * *", + "Mon 2006-01-02 15:04", + []crontimes{ + {"2013-09-02 00:00:00", "Mon 2013-09-30 00:00"}, + {"2013-11-02 00:00:00", "Fri 2013-11-29 00:00"}, + {"2014-08-15 00:00:00", "Fri 2014-08-29 00:00"}, + }, + }, + + // TODO: more tests +} + +func TestExpressions(t *testing.T) { + for _, test := range crontests { + for _, times := range test.times { + from, _ := time.Parse("2006-01-02 15:04:05", times.from) + expr, err := cronexpr.Parse(test.expr) + if err != nil { + t.Errorf(`cronexpr.Parse("%s") returned "%s"`, test.expr, err.Error()) + } + next := expr.Next(from) + nextstr := next.Format(test.layout) + if nextstr != times.next { + t.Errorf(`("%s").Next("%s") = "%s", got "%s"`, test.expr, times.from, times.next, nextstr) + } + } + } +} + +/******************************************************************************/ + +func TestZero(t *testing.T) { + from, _ := time.Parse("2006-01-02", "2013-08-31") + next := cronexpr.MustParse("* * * * * 1980").Next(from) + if next.IsZero() == false { + t.Error(`("* * * * * 1980").Next("2013-08-31").IsZero() returned 'false', expected 'true'`) + } + + next = cronexpr.MustParse("* * * * * 2050").Next(from) + if next.IsZero() == true { + t.Error(`("* * * * * 2050").Next("2013-08-31").IsZero() returned 'true', expected 'false'`) + } + + next = cronexpr.MustParse("* * * * * 2099").Next(time.Time{}) + if next.IsZero() == false { + t.Error(`("* * * * * 2014").Next(time.Time{}).IsZero() returned 'true', expected 'false'`) + } +} + +/******************************************************************************/ + +func TestNextN(t *testing.T) { + expected := []string{ + "Sat, 30 Nov 2013 00:00:00", + "Sat, 29 Mar 2014 00:00:00", + "Sat, 31 May 2014 00:00:00", + "Sat, 30 Aug 2014 00:00:00", + "Sat, 29 Nov 2014 00:00:00", + } + from, _ := time.Parse("2006-01-02 15:04:05", "2013-09-02 08:44:30") + result := cronexpr.MustParse("0 0 * * 6#5").NextN(from, uint(len(expected))) + if len(result) != len(expected) { + t.Errorf(`MustParse("0 0 * * 6#5").NextN("2013-09-02 08:44:30", 5):\n"`) + t.Errorf(` Expected %d returned time values but got %d instead`, len(expected), len(result)) + } + for i, next := range result { + nextStr := next.Format("Mon, 2 Jan 2006 15:04:15") + if nextStr != expected[i] { + t.Errorf(`MustParse("0 0 * * 6#5").NextN("2013-09-02 08:44:30", 5):\n"`) + t.Errorf(` result[%d]: expected "%s" but got "%s"`, i, expected[i], nextStr) + } + } +} + +func TestNextN_every5min(t *testing.T) { + expected := []string{ + "Mon, 2 Sep 2013 08:45:00", + "Mon, 2 Sep 2013 08:50:00", + "Mon, 2 Sep 2013 08:55:00", + "Mon, 2 Sep 2013 09:00:00", + "Mon, 2 Sep 2013 09:05:00", + } + from, _ := time.Parse("2006-01-02 15:04:05", "2013-09-02 08:44:32") + result := cronexpr.MustParse("*/5 * * * *").NextN(from, uint(len(expected))) + if len(result) != len(expected) { + t.Errorf(`MustParse("*/5 * * * *").NextN("2013-09-02 08:44:30", 5):\n"`) + t.Errorf(` Expected %d returned time values but got %d instead`, len(expected), len(result)) + } + for i, next := range result { + nextStr := next.Format("Mon, 2 Jan 2006 15:04:05") + if nextStr != expected[i] { + t.Errorf(`MustParse("*/5 * * * *").NextN("2013-09-02 08:44:30", 5):\n"`) + t.Errorf(` result[%d]: expected "%s" but got "%s"`, i, expected[i], nextStr) + } + } +} + +/******************************************************************************/ + +var benchmarkExpressions = []string{ + "* * * * *", + "@hourly", + "@weekly", + "@yearly", + "30 3 15W 3/3 *", + "30 0 0 1-31/5 Oct-Dec * 2000,2006,2008,2013-2015", + "0 0 0 * Feb-Nov/2 thu#3 2000-2050", +} +var benchmarkExpressionsLen = len(benchmarkExpressions) + +func BenchmarkParse(b *testing.B) { + for i := 0; i < b.N; i++ { + _ = cronexpr.MustParse(benchmarkExpressions[i%benchmarkExpressionsLen]) + } +} + +func BenchmarkNext(b *testing.B) { + exprs := make([]*cronexpr.Expression, benchmarkExpressionsLen) + for i := 0; i < benchmarkExpressionsLen; i++ { + exprs[i] = cronexpr.MustParse(benchmarkExpressions[i]) + } + from := time.Now() + b.ResetTimer() + for i := 0; i < b.N; i++ { + expr := exprs[i%benchmarkExpressionsLen] + next := expr.Next(from) + next = expr.Next(next) + next = expr.Next(next) + next = expr.Next(next) + next = expr.Next(next) + } +} diff --git a/vendor/github.com/gorhill/cronexpr/example_test.go b/vendor/github.com/gorhill/cronexpr/example_test.go new file mode 100644 index 000000000..3dc27d069 --- /dev/null +++ b/vendor/github.com/gorhill/cronexpr/example_test.go @@ -0,0 +1,37 @@ +/*! + * Copyright 2013 Raymond Hill + * + * Project: github.com/gorhill/example_test.go + * File: example_test.go + * Version: 1.0 + * License: GPL v3 see + * + */ + +package cronexpr_test + +/******************************************************************************/ + +import ( + "fmt" + "time" + + "github.com/gorhill/cronexpr" +) + +/******************************************************************************/ + +// ExampleMustParse +func ExampleMustParse() { + t := time.Date(2013, time.August, 31, 0, 0, 0, 0, time.UTC) + nextTimes := cronexpr.MustParse("0 0 29 2 *").NextN(t, 5) + for i := range nextTimes { + fmt.Println(nextTimes[i].Format(time.RFC1123)) + // Output: + // Mon, 29 Feb 2016 00:00:00 UTC + // Sat, 29 Feb 2020 00:00:00 UTC + // Thu, 29 Feb 2024 00:00:00 UTC + // Tue, 29 Feb 2028 00:00:00 UTC + // Sun, 29 Feb 2032 00:00:00 UTC + } +} diff --git a/vendor/github.com/influxdata/influxdb/.dockerignore b/vendor/github.com/influxdata/influxdb/.dockerignore new file mode 100644 index 000000000..378eac25d --- /dev/null +++ b/vendor/github.com/influxdata/influxdb/.dockerignore @@ -0,0 +1 @@ +build diff --git a/vendor/github.com/influxdata/influxdb/.gitattributes b/vendor/github.com/influxdata/influxdb/.gitattributes new file mode 100644 index 000000000..a19ade077 --- /dev/null +++ b/vendor/github.com/influxdata/influxdb/.gitattributes @@ -0,0 +1 @@ +CHANGELOG.md merge=union diff --git a/vendor/github.com/influxdata/influxdb/.github/ISSUE_TEMPLATE.md b/vendor/github.com/influxdata/influxdb/.github/ISSUE_TEMPLATE.md new file mode 100644 index 000000000..178b09673 --- /dev/null +++ b/vendor/github.com/influxdata/influxdb/.github/ISSUE_TEMPLATE.md @@ -0,0 +1,39 @@ +### Directions +_GitHub Issues are reserved for actionable bug reports and feature requests._ +_General questions should be sent to the [InfluxDB mailing list](https://groups.google.com/forum/#!forum/influxdb)._ + +_Before opening an issue, search for similar bug reports or feature requests on GitHub Issues._ +_If no similar issue can be found, fill out either the "Bug Report" or the "Feature Request" section below. +_Erase the other section and everything on and above this line._ + +### Bug report + +__System info:__ [Include InfluxDB version, operating system name, and other relevant details] + +__Steps to reproduce:__ + +1. [First Step] +2. [Second Step] +3. [and so on...] + +__Expected behavior:__ [What you expected to happen] + +__Actual behavior:__ [What actually happened] + +__Additional info:__ [Include gist of relevant config, logs, etc.] + +*Please note, the quickest way to fix a bug is to open a Pull Request.* + + +### Feature Request + +Opening a feature request kicks off a discussion. +Requests may be closed if we're not actively planning to work on them. + +__Proposal:__ [Description of the feature] + +__Current behavior:__ [What currently happens] + +__Desired behavior:__ [What you would like to happen] + +__Use case:__ [Why is this important (helps with prioritizing requests)] diff --git a/vendor/github.com/influxdata/influxdb/.github/PULL_REQUEST_TEMPLATE.md b/vendor/github.com/influxdata/influxdb/.github/PULL_REQUEST_TEMPLATE.md new file mode 100644 index 000000000..c064d94c2 --- /dev/null +++ b/vendor/github.com/influxdata/influxdb/.github/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,9 @@ +###### Required for all non-trivial PRs +- [ ] Rebased/mergable +- [ ] Tests pass +- [ ] CHANGELOG.md updated +- [ ] Sign [CLA](https://influxdata.com/community/cla/) (if not already signed) + +###### Required only if applicable +_You can erase any checkboxes below this note if they are not applicable to your Pull Request._ +- [ ] [InfluxQL Spec](https://github.com/influxdata/influxdb/blob/master/influxql/README.md) updated diff --git a/vendor/github.com/influxdata/influxdb/.gitignore b/vendor/github.com/influxdata/influxdb/.gitignore new file mode 100644 index 000000000..8c5500397 --- /dev/null +++ b/vendor/github.com/influxdata/influxdb/.gitignore @@ -0,0 +1,79 @@ +*~ +src/ + +config.json +/bin/ + +TAGS + +# vim temp files +*.swp + +*.test +/query/a.out* +.DS_Store + +# ignore generated files. +cmd/influxd/version.go + +# executables + +influx_tsm +**/influx_tsm +!**/influx_tsm/ + +influx_stress +**/influx_stress +!**/influx_stress/ + +influxd +**/influxd +!**/influxd/ + +influx +**/influx +!**/influx/ + +influxdb +**/influxdb +!**/influxdb/ + +influx_inspect +**/influx_inspect +!**/influx_inspect/ + +/benchmark-tool +/main +/benchmark-storage +godef +gosym +gocode +inspect-raft + +# dependencies +out_rpm/ +packages/ + +# autconf +autom4te.cache/ +config.log +config.status + +# log file +influxdb.log +benchmark.log + +# config file +config.toml + +# test data files +integration/migration_data/ + +# goide project files +.idea + +# goconvey config files +*.goconvey + +// Ingnore SourceGraph directory +.srclib-store/ diff --git a/vendor/github.com/influxdata/influxdb/.gitrepo b/vendor/github.com/influxdata/influxdb/.gitrepo new file mode 100644 index 000000000..2a42e2692 --- /dev/null +++ b/vendor/github.com/influxdata/influxdb/.gitrepo @@ -0,0 +1,11 @@ +; DO NOT EDIT (unless you know what you are doing) +; +; This subdirectory is a git "subrepo", and this file is maintained by the +; git-subrepo command. See https://github.com/git-commands/git-subrepo#readme +; +[subrepo] + remote = http://github.com/influxdata/influxdb.git + branch = master + commit = c8e90fa4eea9bcc8c35df47834fa490834969733 + parent = a2b6f4a8c7f55ea9fc259e0f28498ef34f77b03c + cmdver = 0.3.0 diff --git a/vendor/github.com/influxdata/influxdb/.hooks/pre-commit b/vendor/github.com/influxdata/influxdb/.hooks/pre-commit new file mode 100755 index 000000000..6cf240bf6 --- /dev/null +++ b/vendor/github.com/influxdata/influxdb/.hooks/pre-commit @@ -0,0 +1,23 @@ +#!/usr/bin/env bash + +fmtcount=`git ls-files | grep '.go$' | xargs gofmt -l 2>&1 | wc -l` +if [ $fmtcount -gt 0 ]; then + echo "Some files aren't formatted, please run 'go fmt ./...' to format your source code before committing" + exit 1 +fi + +vetcount=`go tool vet ./ 2>&1 | wc -l` +if [ $vetcount -gt 0 ]; then + echo "Some files aren't passing vet heuristics, please run 'go vet ./...' to see the errors it flags and correct your source code before committing" + exit 1 +fi +exit 0 + +# Ensure FIXME lines are removed before commit. +fixme_lines=$(git diff --cached | grep ^+ | grep -v pre-commit | grep FIXME | sed 's_^+\s*__g') +if [ "$fixme_lines" != "" ]; then + echo "Please remove the following lines:" + echo -e "$fixme_lines" + exit 1 +fi + diff --git a/vendor/github.com/influxdata/influxdb/.mention-bot b/vendor/github.com/influxdata/influxdb/.mention-bot new file mode 100644 index 000000000..5f8689bb6 --- /dev/null +++ b/vendor/github.com/influxdata/influxdb/.mention-bot @@ -0,0 +1,6 @@ +{ + "maxReviewers": 3, + "fileBlacklist": ["CHANGELOG.md"], + "userBlacklist": ["pauldix", "toddboom", "aviau", "mark-rushakoff"], + "requiredOrgs": ["influxdata"] +} diff --git a/vendor/github.com/influxdata/influxdb/CHANGELOG.md b/vendor/github.com/influxdata/influxdb/CHANGELOG.md index 43f3fbe41..a08b02fb6 100644 --- a/vendor/github.com/influxdata/influxdb/CHANGELOG.md +++ b/vendor/github.com/influxdata/influxdb/CHANGELOG.md @@ -1,4 +1,4 @@ -## v1.0.0 [unreleased] +## v1.0.0-beta1 [2016-06-07] ### Release Notes @@ -21,6 +21,8 @@ - [#5906](https://github.com/influxdata/influxdb/issues/5906): Dynamically update the documentation link in the admin UI. - [#6686](https://github.com/influxdata/influxdb/pull/6686): Optimize timestamp run-length decoding - [#6713](https://github.com/influxdata/influxdb/pull/6713): Reduce allocations during query parsing. +- [#3733](https://github.com/influxdata/influxdb/issues/3733): Modify the default retention policy name and make it configurable. +- [#5655](https://github.com/influxdata/influxdb/issues/5655): Support specifying a retention policy for the graphite service. ### Bugfixes @@ -53,6 +55,8 @@ - [#6250](https://github.com/influxdata/influxdb/issues/6250): Slow startup time - [#6753](https://github.com/influxdata/influxdb/issues/6753): Prevent panic if there are no values. - [#6685](https://github.com/influxdata/influxdb/issues/6685): Batch SELECT INTO / CQ writes +- [#6756](https://github.com/influxdata/influxdb/issues/6756): Set X-Influxdb-Version header on every request (even 404 requests). +- [#6760](https://github.com/influxdata/influxdb/issues/6760): Prevent panic in concurrent auth cache write ## v0.13.0 [2016-05-12] diff --git a/vendor/github.com/influxdata/influxdb/client/example_test.go b/vendor/github.com/influxdata/influxdb/client/example_test.go new file mode 100644 index 000000000..f3753834a --- /dev/null +++ b/vendor/github.com/influxdata/influxdb/client/example_test.go @@ -0,0 +1,113 @@ +package client_test + +import ( + "fmt" + "log" + "math/rand" + "net/url" + "os" + "strconv" + "time" + + "github.com/influxdata/influxdb/client" +) + +func ExampleNewClient() { + host, err := url.Parse(fmt.Sprintf("http://%s:%d", "localhost", 8086)) + if err != nil { + log.Fatal(err) + } + + // NOTE: this assumes you've setup a user and have setup shell env variables, + // namely INFLUX_USER/INFLUX_PWD. If not just omit Username/Password below. + conf := client.Config{ + URL: *host, + Username: os.Getenv("INFLUX_USER"), + Password: os.Getenv("INFLUX_PWD"), + } + con, err := client.NewClient(conf) + if err != nil { + log.Fatal(err) + } + log.Println("Connection", con) +} + +func ExampleClient_Ping() { + host, err := url.Parse(fmt.Sprintf("http://%s:%d", "localhost", 8086)) + if err != nil { + log.Fatal(err) + } + con, err := client.NewClient(client.Config{URL: *host}) + if err != nil { + log.Fatal(err) + } + + dur, ver, err := con.Ping() + if err != nil { + log.Fatal(err) + } + log.Printf("Happy as a hippo! %v, %s", dur, ver) +} + +func ExampleClient_Query() { + host, err := url.Parse(fmt.Sprintf("http://%s:%d", "localhost", 8086)) + if err != nil { + log.Fatal(err) + } + con, err := client.NewClient(client.Config{URL: *host}) + if err != nil { + log.Fatal(err) + } + + q := client.Query{ + Command: "select count(value) from shapes", + Database: "square_holes", + } + if response, err := con.Query(q); err == nil && response.Error() == nil { + log.Println(response.Results) + } +} + +func ExampleClient_Write() { + host, err := url.Parse(fmt.Sprintf("http://%s:%d", "localhost", 8086)) + if err != nil { + log.Fatal(err) + } + con, err := client.NewClient(client.Config{URL: *host}) + if err != nil { + log.Fatal(err) + } + + var ( + shapes = []string{"circle", "rectangle", "square", "triangle"} + colors = []string{"red", "blue", "green"} + sampleSize = 1000 + pts = make([]client.Point, sampleSize) + ) + + rand.Seed(42) + for i := 0; i < sampleSize; i++ { + pts[i] = client.Point{ + Measurement: "shapes", + Tags: map[string]string{ + "color": strconv.Itoa(rand.Intn(len(colors))), + "shape": strconv.Itoa(rand.Intn(len(shapes))), + }, + Fields: map[string]interface{}{ + "value": rand.Intn(sampleSize), + }, + Time: time.Now(), + Precision: "s", + } + } + + bps := client.BatchPoints{ + Points: pts, + Database: "BumbeBeeTuna", + RetentionPolicy: "default", + } + _, err = con.Write(bps) + if err != nil { + log.Fatal(err) + } +} diff --git a/vendor/github.com/influxdata/influxdb/client/influxdb_test.go b/vendor/github.com/influxdata/influxdb/client/influxdb_test.go new file mode 100644 index 000000000..39349c19e --- /dev/null +++ b/vendor/github.com/influxdata/influxdb/client/influxdb_test.go @@ -0,0 +1,831 @@ +package client_test + +import ( + "crypto/tls" + "encoding/json" + "errors" + "fmt" + "io/ioutil" + "net/http" + "net/http/httptest" + "net/url" + "os" + "strings" + "testing" + "time" + + "github.com/influxdata/influxdb/client" +) + +func BenchmarkWrite(b *testing.B) { + ts := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + var data client.Response + w.WriteHeader(http.StatusNoContent) + _ = json.NewEncoder(w).Encode(data) + })) + defer ts.Close() + + u, _ := url.Parse(ts.URL) + config := client.Config{URL: *u} + c, err := client.NewClient(config) + if err != nil { + b.Fatalf("unexpected error. expected %v, actual %v", nil, err) + } + + bp := client.BatchPoints{ + Points: []client.Point{ + {Fields: map[string]interface{}{"value": 101}}}, + } + for i := 0; i < b.N; i++ { + r, err := c.Write(bp) + if err != nil { + b.Fatalf("unexpected error. expected %v, actual %v", nil, err) + } + if r != nil { + b.Fatalf("unexpected response. expected %v, actual %v", nil, r) + } + } +} + +func BenchmarkUnmarshalJSON2Tags(b *testing.B) { + var bp client.BatchPoints + data := []byte(` +{ + "database": "foo", + "retentionPolicy": "bar", + "points": [ + { + "name": "cpu", + "tags": { + "host": "server01", + "region": "us-east1" + }, + "time": 14244733039069373, + "precision": "n", + "fields": { + "value": 4541770385657154000 + } + } + ] +} +`) + + for i := 0; i < b.N; i++ { + if err := json.Unmarshal(data, &bp); err != nil { + b.Errorf("unable to unmarshal nanosecond data: %s", err.Error()) + } + b.SetBytes(int64(len(data))) + } +} + +func BenchmarkUnmarshalJSON10Tags(b *testing.B) { + var bp client.BatchPoints + data := []byte(` +{ + "database": "foo", + "retentionPolicy": "bar", + "points": [ + { + "name": "cpu", + "tags": { + "host": "server01", + "region": "us-east1", + "tag1": "value1", + "tag2": "value2", + "tag2": "value3", + "tag4": "value4", + "tag5": "value5", + "tag6": "value6", + "tag7": "value7", + "tag8": "value8" + }, + "time": 14244733039069373, + "precision": "n", + "fields": { + "value": 4541770385657154000 + } + } + ] +} +`) + + for i := 0; i < b.N; i++ { + if err := json.Unmarshal(data, &bp); err != nil { + b.Errorf("unable to unmarshal nanosecond data: %s", err.Error()) + } + b.SetBytes(int64(len(data))) + } +} + +func TestNewClient(t *testing.T) { + config := client.Config{} + _, err := client.NewClient(config) + if err != nil { + t.Fatalf("unexpected error. expected %v, actual %v", nil, err) + } +} + +func TestClient_Ping(t *testing.T) { + ts := emptyTestServer() + defer ts.Close() + + u, _ := url.Parse(ts.URL) + config := client.Config{URL: *u} + c, err := client.NewClient(config) + if err != nil { + t.Fatalf("unexpected error. expected %v, actual %v", nil, err) + } + d, version, err := c.Ping() + if err != nil { + t.Fatalf("unexpected error. expected %v, actual %v", nil, err) + } + if d.Nanoseconds() == 0 { + t.Fatalf("expected a duration greater than zero. actual %v", d.Nanoseconds()) + } + if version != "x.x" { + t.Fatalf("unexpected version. expected %s, actual %v", "x.x", version) + } +} + +func TestClient_Query(t *testing.T) { + ts := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + var data client.Response + w.WriteHeader(http.StatusOK) + _ = json.NewEncoder(w).Encode(data) + })) + defer ts.Close() + + u, _ := url.Parse(ts.URL) + config := client.Config{URL: *u} + c, err := client.NewClient(config) + if err != nil { + t.Fatalf("unexpected error. expected %v, actual %v", nil, err) + } + + query := client.Query{} + _, err = c.Query(query) + if err != nil { + t.Fatalf("unexpected error. expected %v, actual %v", nil, err) + } +} + +func TestClient_ChunkedQuery(t *testing.T) { + ts := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + var data client.Response + w.WriteHeader(http.StatusOK) + enc := json.NewEncoder(w) + _ = enc.Encode(data) + _ = enc.Encode(data) + })) + defer ts.Close() + + u, _ := url.Parse(ts.URL) + config := client.Config{URL: *u} + c, err := client.NewClient(config) + if err != nil { + t.Fatalf("unexpected error. expected %v, actual %v", nil, err) + } + + query := client.Query{Chunked: true} + _, err = c.Query(query) + if err != nil { + t.Fatalf("unexpected error. expected %v, actual %v", nil, err) + } +} + +func TestClient_BasicAuth(t *testing.T) { + ts := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + u, p, ok := r.BasicAuth() + + if !ok { + t.Errorf("basic auth error") + } + if u != "username" { + t.Errorf("unexpected username, expected %q, actual %q", "username", u) + } + if p != "password" { + t.Errorf("unexpected password, expected %q, actual %q", "password", p) + } + w.WriteHeader(http.StatusNoContent) + })) + defer ts.Close() + + u, _ := url.Parse(ts.URL) + u.User = url.UserPassword("username", "password") + config := client.Config{URL: *u, Username: "username", Password: "password"} + c, err := client.NewClient(config) + if err != nil { + t.Fatalf("unexpected error. expected %v, actual %v", nil, err) + } + + _, _, err = c.Ping() + if err != nil { + t.Fatalf("unexpected error. expected %v, actual %v", nil, err) + } +} + +func TestClient_Write(t *testing.T) { + ts := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + var data client.Response + w.WriteHeader(http.StatusNoContent) + _ = json.NewEncoder(w).Encode(data) + })) + defer ts.Close() + + u, _ := url.Parse(ts.URL) + config := client.Config{URL: *u} + c, err := client.NewClient(config) + if err != nil { + t.Fatalf("unexpected error. expected %v, actual %v", nil, err) + } + + bp := client.BatchPoints{} + r, err := c.Write(bp) + if err != nil { + t.Fatalf("unexpected error. expected %v, actual %v", nil, err) + } + if r != nil { + t.Fatalf("unexpected response. expected %v, actual %v", nil, r) + } +} + +func TestClient_UserAgent(t *testing.T) { + receivedUserAgent := "" + ts := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + receivedUserAgent = r.UserAgent() + + var data client.Response + w.WriteHeader(http.StatusOK) + _ = json.NewEncoder(w).Encode(data) + })) + defer ts.Close() + + _, err := http.Get(ts.URL) + if err != nil { + t.Fatalf("unexpected error. expected %v, actual %v", nil, err) + } + + tests := []struct { + name string + userAgent string + expected string + }{ + { + name: "Empty user agent", + userAgent: "", + expected: "InfluxDBClient", + }, + { + name: "Custom user agent", + userAgent: "Test Influx Client", + expected: "Test Influx Client", + }, + } + + for _, test := range tests { + u, _ := url.Parse(ts.URL) + config := client.Config{URL: *u, UserAgent: test.userAgent} + c, err := client.NewClient(config) + if err != nil { + t.Fatalf("unexpected error. expected %v, actual %v", nil, err) + } + + receivedUserAgent = "" + query := client.Query{} + _, err = c.Query(query) + if err != nil { + t.Fatalf("unexpected error. expected %v, actual %v", nil, err) + } + if !strings.HasPrefix(receivedUserAgent, test.expected) { + t.Fatalf("Unexpected user agent. expected %v, actual %v", test.expected, receivedUserAgent) + } + + receivedUserAgent = "" + bp := client.BatchPoints{} + _, err = c.Write(bp) + if err != nil { + t.Fatalf("unexpected error. expected %v, actual %v", nil, err) + } + if !strings.HasPrefix(receivedUserAgent, test.expected) { + t.Fatalf("Unexpected user agent. expected %v, actual %v", test.expected, receivedUserAgent) + } + + receivedUserAgent = "" + _, _, err = c.Ping() + if err != nil { + t.Fatalf("unexpected error. expected %v, actual %v", nil, err) + } + if receivedUserAgent != test.expected { + t.Fatalf("Unexpected user agent. expected %v, actual %v", test.expected, receivedUserAgent) + } + } +} + +func TestClient_Messages(t *testing.T) { + ts := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + w.WriteHeader(http.StatusOK) + w.Write([]byte(`{"results":[{"messages":[{"level":"warning","text":"deprecation test"}]}]}`)) + })) + defer ts.Close() + + u, _ := url.Parse(ts.URL) + config := client.Config{URL: *u} + c, err := client.NewClient(config) + if err != nil { + t.Fatalf("unexpected error. expected %v, actual %v", nil, err) + } + + query := client.Query{} + resp, err := c.Query(query) + if err != nil { + t.Fatalf("unexpected error. expected %v, actual %v", nil, err) + } + + if got, exp := len(resp.Results), 1; got != exp { + t.Fatalf("unexpected number of results. expected %v, actual %v", exp, got) + } + + r := resp.Results[0] + if got, exp := len(r.Messages), 1; got != exp { + t.Fatalf("unexpected number of messages. expected %v, actual %v", exp, got) + } + + m := r.Messages[0] + if got, exp := m.Level, "warning"; got != exp { + t.Errorf("unexpected message level. expected %v, actual %v", exp, got) + } + if got, exp := m.Text, "deprecation test"; got != exp { + t.Errorf("unexpected message text. expected %v, actual %v", exp, got) + } +} + +func TestPoint_UnmarshalEpoch(t *testing.T) { + now := time.Now() + tests := []struct { + name string + epoch int64 + precision string + expected time.Time + }{ + { + name: "nanoseconds", + epoch: now.UnixNano(), + precision: "n", + expected: now, + }, + { + name: "microseconds", + epoch: now.Round(time.Microsecond).UnixNano() / int64(time.Microsecond), + precision: "u", + expected: now.Round(time.Microsecond), + }, + { + name: "milliseconds", + epoch: now.Round(time.Millisecond).UnixNano() / int64(time.Millisecond), + precision: "ms", + expected: now.Round(time.Millisecond), + }, + { + name: "seconds", + epoch: now.Round(time.Second).UnixNano() / int64(time.Second), + precision: "s", + expected: now.Round(time.Second), + }, + { + name: "minutes", + epoch: now.Round(time.Minute).UnixNano() / int64(time.Minute), + precision: "m", + expected: now.Round(time.Minute), + }, + { + name: "hours", + epoch: now.Round(time.Hour).UnixNano() / int64(time.Hour), + precision: "h", + expected: now.Round(time.Hour), + }, + { + name: "max int64", + epoch: 9223372036854775807, + precision: "n", + expected: time.Unix(0, 9223372036854775807), + }, + { + name: "100 years from now", + epoch: now.Add(time.Hour * 24 * 365 * 100).UnixNano(), + precision: "n", + expected: now.Add(time.Hour * 24 * 365 * 100), + }, + } + + for _, test := range tests { + t.Logf("testing %q\n", test.name) + data := []byte(fmt.Sprintf(`{"time": %d, "precision":"%s"}`, test.epoch, test.precision)) + t.Logf("json: %s", string(data)) + var p client.Point + err := json.Unmarshal(data, &p) + if err != nil { + t.Fatalf("unexpected error. exptected: %v, actual: %v", nil, err) + } + if !p.Time.Equal(test.expected) { + t.Fatalf("Unexpected time. expected: %v, actual: %v", test.expected, p.Time) + } + } +} + +func TestPoint_UnmarshalRFC(t *testing.T) { + now := time.Now().UTC() + tests := []struct { + name string + rfc string + now time.Time + expected time.Time + }{ + { + name: "RFC3339Nano", + rfc: time.RFC3339Nano, + now: now, + expected: now, + }, + { + name: "RFC3339", + rfc: time.RFC3339, + now: now.Round(time.Second), + expected: now.Round(time.Second), + }, + } + + for _, test := range tests { + t.Logf("testing %q\n", test.name) + ts := test.now.Format(test.rfc) + data := []byte(fmt.Sprintf(`{"time": %q}`, ts)) + t.Logf("json: %s", string(data)) + var p client.Point + err := json.Unmarshal(data, &p) + if err != nil { + t.Fatalf("unexpected error. exptected: %v, actual: %v", nil, err) + } + if !p.Time.Equal(test.expected) { + t.Fatalf("Unexpected time. expected: %v, actual: %v", test.expected, p.Time) + } + } +} + +func TestPoint_MarshalOmitempty(t *testing.T) { + now := time.Now().UTC() + tests := []struct { + name string + point client.Point + now time.Time + expected string + }{ + { + name: "all empty", + point: client.Point{Measurement: "cpu", Fields: map[string]interface{}{"value": 1.1}}, + now: now, + expected: `{"measurement":"cpu","fields":{"value":1.1}}`, + }, + { + name: "with time", + point: client.Point{Measurement: "cpu", Fields: map[string]interface{}{"value": 1.1}, Time: now}, + now: now, + expected: fmt.Sprintf(`{"measurement":"cpu","time":"%s","fields":{"value":1.1}}`, now.Format(time.RFC3339Nano)), + }, + { + name: "with tags", + point: client.Point{Measurement: "cpu", Fields: map[string]interface{}{"value": 1.1}, Tags: map[string]string{"foo": "bar"}}, + now: now, + expected: `{"measurement":"cpu","tags":{"foo":"bar"},"fields":{"value":1.1}}`, + }, + { + name: "with precision", + point: client.Point{Measurement: "cpu", Fields: map[string]interface{}{"value": 1.1}, Precision: "ms"}, + now: now, + expected: `{"measurement":"cpu","fields":{"value":1.1},"precision":"ms"}`, + }, + } + + for _, test := range tests { + t.Logf("testing %q\n", test.name) + b, err := json.Marshal(&test.point) + if err != nil { + t.Fatalf("unexpected error. exptected: %v, actual: %v", nil, err) + } + if test.expected != string(b) { + t.Fatalf("Unexpected result. expected: %v, actual: %v", test.expected, string(b)) + } + } +} + +func TestEpochToTime(t *testing.T) { + now := time.Now() + + tests := []struct { + name string + epoch int64 + precision string + expected time.Time + }{ + {name: "nanoseconds", epoch: now.UnixNano(), precision: "n", expected: now}, + {name: "microseconds", epoch: now.Round(time.Microsecond).UnixNano() / int64(time.Microsecond), precision: "u", expected: now.Round(time.Microsecond)}, + {name: "milliseconds", epoch: now.Round(time.Millisecond).UnixNano() / int64(time.Millisecond), precision: "ms", expected: now.Round(time.Millisecond)}, + {name: "seconds", epoch: now.Round(time.Second).UnixNano() / int64(time.Second), precision: "s", expected: now.Round(time.Second)}, + {name: "minutes", epoch: now.Round(time.Minute).UnixNano() / int64(time.Minute), precision: "m", expected: now.Round(time.Minute)}, + {name: "hours", epoch: now.Round(time.Hour).UnixNano() / int64(time.Hour), precision: "h", expected: now.Round(time.Hour)}, + } + + for _, test := range tests { + t.Logf("testing %q\n", test.name) + tm, e := client.EpochToTime(test.epoch, test.precision) + if e != nil { + t.Fatalf("unexpected error: expected %v, actual: %v", nil, e) + } + if tm != test.expected { + t.Fatalf("unexpected time: expected %v, actual %v", test.expected, tm) + } + } +} + +// helper functions + +func emptyTestServer() *httptest.Server { + return httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + time.Sleep(50 * time.Millisecond) + w.Header().Set("X-Influxdb-Version", "x.x") + return + })) +} + +// Ensure that data with epoch times can be decoded. +func TestBatchPoints_Normal(t *testing.T) { + var bp client.BatchPoints + data := []byte(` +{ + "database": "foo", + "retentionPolicy": "bar", + "points": [ + { + "name": "cpu", + "tags": { + "host": "server01" + }, + "time": 14244733039069373, + "precision": "n", + "values": { + "value": 4541770385657154000 + } + }, + { + "name": "cpu", + "tags": { + "host": "server01" + }, + "time": 14244733039069380, + "precision": "n", + "values": { + "value": 7199311900554737000 + } + } + ] +} +`) + + if err := json.Unmarshal(data, &bp); err != nil { + t.Errorf("unable to unmarshal nanosecond data: %s", err.Error()) + } +} + +func TestClient_Timeout(t *testing.T) { + done := make(chan bool) + ts := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + <-done + })) + defer ts.Close() + defer func() { done <- true }() + u, _ := url.Parse(ts.URL) + config := client.Config{URL: *u, Timeout: 500 * time.Millisecond} + c, err := client.NewClient(config) + if err != nil { + t.Fatalf("unexpected error. expected %v, actual %v", nil, err) + } + query := client.Query{} + _, err = c.Query(query) + if err == nil { + t.Fatalf("unexpected success. expected timeout error") + } else if !strings.Contains(err.Error(), "request canceled") && + !strings.Contains(err.Error(), "use of closed network connection") { + t.Fatalf("unexpected error. expected 'request canceled' error, got %v", err) + } +} + +func TestClient_NoTimeout(t *testing.T) { + if testing.Short() { + t.Skip("skipping in short mode") + } + ts := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + time.Sleep(1 * time.Second) + var data client.Response + w.WriteHeader(http.StatusOK) + _ = json.NewEncoder(w).Encode(data) + })) + defer ts.Close() + + u, _ := url.Parse(ts.URL) + config := client.Config{URL: *u} + c, err := client.NewClient(config) + if err != nil { + t.Fatalf("unexpected error. expected %v, actual %v", nil, err) + } + + query := client.Query{} + _, err = c.Query(query) + if err != nil { + t.Fatalf("unexpected error. expected %v, actual %v", nil, err) + } +} + +func TestClient_WriteUint64(t *testing.T) { + ts := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + var data client.Response + w.WriteHeader(http.StatusNoContent) + _ = json.NewEncoder(w).Encode(data) + })) + defer ts.Close() + + u, _ := url.Parse(ts.URL) + config := client.Config{URL: *u} + c, err := client.NewClient(config) + if err != nil { + t.Fatalf("unexpected error. expected %v, actual %v", nil, err) + } + bp := client.BatchPoints{ + Points: []client.Point{ + { + Fields: map[string]interface{}{"value": uint64(10)}, + }, + }, + } + r, err := c.Write(bp) + if err == nil { + t.Fatalf("unexpected error. expected err, actual %v", err) + } + if r != nil { + t.Fatalf("unexpected response. expected %v, actual %v", nil, r) + } +} + +func TestClient_ParseConnectionString_IPv6(t *testing.T) { + path := "[fdf5:9ede:1875:0:a9ee:a600:8fe3:d495]:8086" + u, err := client.ParseConnectionString(path, false) + if err != nil { + t.Fatalf("unexpected error, expected %v, actual %v", nil, err) + } + if u.Host != path { + t.Fatalf("ipv6 parse failed, expected %s, actual %s", path, u.Host) + } +} + +func TestClient_CustomCertificates(t *testing.T) { + // generated with: + // openssl req -x509 -newkey rsa:2048 -keyout key.pem -out cert.pem -days 3650 -nodes -config influx.cnf + // influx.cnf: + // [req] + // distinguished_name = req_distinguished_name + // x509_extensions = v3_req + // prompt = no + // [req_distinguished_name] + // C = US + // ST = CA + // L = San Francisco + // O = InfluxDB + // CN = github.com/influxdata + // [v3_req] + // keyUsage = keyEncipherment, dataEncipherment + // extendedKeyUsage = serverAuth + // subjectAltName = @alt_names + // [alt_names] + // IP.1 = 127.0.0.1 + // + key := ` +-----BEGIN PRIVATE KEY----- +MIIEvQIBADANBgkqhkiG9w0BAQEFAASCBKcwggSjAgEAAoIBAQDLswqKJLxfhBRi +4qdj7+jpBxTAi4MewrcMPp+9YlbLke3F7w2DPrZVkYVeWmg8LyTPAigrXeadK6hv +qjRr05a7sMc5+ynivGbWUySWT+u17V85x6VR5TMIkJEOqpiIU8aYk0l+3UcrzVjS +1QZCUBoxVwAVaSR6AXTA8YrVXdk/AI3f22dYiBjFmV4LJJkGjTaCnlDKu54hMU1t +WTyFcoY9TBzZ1XA+ng5RQ/QADeL2PYrTW4s/mLI3jfKKD53EI4uM2FjW37ZfuxTa +mhCR7/lxM4COg9K70y5uebfqJvuoXAwXLOzVbdfF5b9fJFbL67kaK2tiMT3Wt39m +hXzclLTDAgMBAAECggEAK8mpElkjRUUXPMqMQSdpYe5rv5g973bb8n3jyMpC7i/I +dSwWM4hfmbVWfhnhHk7kErvb9raQxGiGJLrp2eP6Gw69RPGA54SodpoY21cCzHDi +b4FDQH+MoOKyy/xQHb4kitfejK70ha320huI5OhjOQgCtJeNh8yYVIGX3pX2BVyu +36UB9tfX1S5pbiHeih3vZGd322Muj/joNzIelnYRBnoO0xqvQ0S1Dk+dLCTHO0/m +u9AZN8c2TsRWZpJPMWwBv8LuABbE0e66/TSsrfklAn86ELCo44lZURDE7uPZ4pIH +FWtmf+nW5Hy6aPhy60E40MqotlejhWwB3ktY/m3JAQKBgQDuB4nhxzJA9lH9EaCt +byvJ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509KeyPair([]byte(cert), []byte(key)) + + if err != nil { + t.Fatalf("Received error: %v", err) + } + + server := httptest.NewUnstartedServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + var data client.Response + w.WriteHeader(http.StatusOK) + _ = json.NewEncoder(w).Encode(data) + })) + server.TLS = &tls.Config{Certificates: []tls.Certificate{cer}} + server.TLS.BuildNameToCertificate() + server.StartTLS() + defer server.Close() + + certFile, _ := ioutil.TempFile("", "influx-cert-") + certFile.WriteString(cert) + certFile.Close() + defer os.Remove(certFile.Name()) + + u, _ := url.Parse(server.URL) + + tests := []struct { + name string + unsafeSsl bool + expected error + }{ + {name: "validate certificates", unsafeSsl: false, expected: errors.New("error")}, + {name: "not validate certificates", unsafeSsl: true, expected: nil}, + } + + for _, test := range tests { + config := client.Config{URL: *u, UnsafeSsl: test.unsafeSsl} + c, err := client.NewClient(config) + if err != nil { + t.Fatalf("unexpected error. expected %v, actual %v", nil, err) + } + query := client.Query{} + _, err = c.Query(query) + + if (test.expected == nil) != (err == nil) { + t.Fatalf("%s: expected %v. got %v. unsafeSsl: %v", test.name, test.expected, err, test.unsafeSsl) + } + } +} + +func TestChunkedResponse(t *testing.T) { + s := `{"results":[{},{}]}{"results":[{}]}` + r := client.NewChunkedResponse(strings.NewReader(s)) + resp, err := r.NextResponse() + if err != nil { + t.Fatalf("unexpected error. expected %v, actual %v", nil, err) + } else if actual := len(resp.Results); actual != 2 { + t.Fatalf("unexpected number of results. expected %v, actual %v", 2, actual) + } + + resp, err = r.NextResponse() + if err != nil { + t.Fatalf("unexpected error. expected %v, actual %v", nil, err) + } else if actual := len(resp.Results); actual != 1 { + t.Fatalf("unexpected number of results. expected %v, actual %v", 1, actual) + } + + resp, err = r.NextResponse() + if err != nil { + t.Fatalf("unexpected error. expected %v, actual %v", nil, err) + } else if resp != nil { + t.Fatalf("unexpected response. expected %v, actual %v", nil, resp) + } +} diff --git a/vendor/github.com/influxdata/influxdb/client/v2/client_test.go b/vendor/github.com/influxdata/influxdb/client/v2/client_test.go new file mode 100644 index 000000000..d25bf9c59 --- /dev/null +++ b/vendor/github.com/influxdata/influxdb/client/v2/client_test.go @@ -0,0 +1,418 @@ +package client + +import ( + "encoding/json" + "net/http" + "net/http/httptest" + "reflect" + "strings" + "sync" + "testing" + "time" +) + +func TestUDPClient_Query(t *testing.T) { + config := UDPConfig{Addr: "localhost:8089"} + c, err := NewUDPClient(config) + if err != nil { + t.Errorf("unexpected error. expected %v, actual %v", nil, err) + } + defer c.Close() + query := Query{} + _, err = c.Query(query) + if err == nil { + t.Error("Querying UDP client should fail") + } +} + +func TestUDPClient_Ping(t *testing.T) { + config := UDPConfig{Addr: "localhost:8089"} + c, err := NewUDPClient(config) + if err != nil { + t.Errorf("unexpected error. expected %v, actual %v", nil, err) + } + defer c.Close() + + rtt, version, err := c.Ping(0) + if rtt != 0 || version != "" || err != nil { + t.Errorf("unexpected error. expected (%v, '%v', %v), actual (%v, '%v', %v)", 0, "", nil, rtt, version, err) + } +} + +func TestUDPClient_Write(t *testing.T) { + config := UDPConfig{Addr: "localhost:8089"} + c, err := NewUDPClient(config) + if err != nil { + t.Errorf("unexpected error. expected %v, actual %v", nil, err) + } + defer c.Close() + + bp, err := NewBatchPoints(BatchPointsConfig{}) + if err != nil { + t.Errorf("unexpected error. expected %v, actual %v", nil, err) + } + + fields := make(map[string]interface{}) + fields["value"] = 1.0 + pt, _ := NewPoint("cpu", make(map[string]string), fields) + bp.AddPoint(pt) + + err = c.Write(bp) + if err != nil { + t.Errorf("unexpected error. expected %v, actual %v", nil, err) + } +} + +func TestUDPClient_BadAddr(t *testing.T) { + config := UDPConfig{Addr: "foobar@wahoo"} + c, err := NewUDPClient(config) + if err == nil { + defer c.Close() + t.Error("Expected resolve error") + } +} + +func TestClient_Query(t *testing.T) { + ts := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + var data Response + w.WriteHeader(http.StatusOK) + _ = json.NewEncoder(w).Encode(data) + })) + defer ts.Close() + + config := HTTPConfig{Addr: ts.URL} + c, _ := NewHTTPClient(config) + defer c.Close() + + query := Query{} + _, err := c.Query(query) + if err != nil { + t.Errorf("unexpected error. expected %v, actual %v", nil, err) + } +} + +func TestClient_BasicAuth(t *testing.T) { + ts := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + u, p, ok := r.BasicAuth() + + if !ok { + t.Errorf("basic auth error") + } + if u != "username" { + t.Errorf("unexpected username, expected %q, actual %q", "username", u) + } + if p != "password" { + t.Errorf("unexpected password, expected %q, actual %q", "password", p) + } + var data Response + w.WriteHeader(http.StatusOK) + _ = json.NewEncoder(w).Encode(data) + })) + defer ts.Close() + + config := HTTPConfig{Addr: ts.URL, Username: "username", Password: "password"} + c, _ := NewHTTPClient(config) + defer c.Close() + + query := Query{} + _, err := c.Query(query) + if err != nil { + t.Errorf("unexpected error. expected %v, actual %v", nil, err) + } +} + +func TestClient_Ping(t *testing.T) { + ts := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + var data Response + w.WriteHeader(http.StatusNoContent) + _ = json.NewEncoder(w).Encode(data) + })) + defer ts.Close() + + config := HTTPConfig{Addr: ts.URL} + c, _ := NewHTTPClient(config) + defer c.Close() + + _, _, err := c.Ping(0) + if err != nil { + t.Errorf("unexpected error. expected %v, actual %v", nil, err) + } +} + +func TestClient_Concurrent_Use(t *testing.T) { + ts := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + w.WriteHeader(http.StatusOK) + w.Write([]byte(`{}`)) + })) + defer ts.Close() + + config := HTTPConfig{Addr: ts.URL} + c, _ := NewHTTPClient(config) + defer c.Close() + + var wg sync.WaitGroup + wg.Add(3) + n := 1000 + + go func() { + defer wg.Done() + bp, err := NewBatchPoints(BatchPointsConfig{}) + if err != nil { + t.Errorf("got error %v", err) + } + + for i := 0; i < n; i++ { + if err = c.Write(bp); err != nil { + t.Fatalf("got error %v", err) + } + } + }() + + go func() { + defer wg.Done() + var q Query + for i := 0; i < n; i++ { + if _, err := c.Query(q); err != nil { + t.Fatalf("got error %v", err) + } + } + }() + + go func() { + defer wg.Done() + for i := 0; i < n; i++ { + c.Ping(time.Second) + } + }() + wg.Wait() +} + +func TestClient_Write(t *testing.T) { + ts := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + var data Response + w.WriteHeader(http.StatusNoContent) + _ = json.NewEncoder(w).Encode(data) + })) + defer ts.Close() + + config := HTTPConfig{Addr: ts.URL} + c, _ := NewHTTPClient(config) + defer c.Close() + + bp, err := NewBatchPoints(BatchPointsConfig{}) + if err != nil { + t.Errorf("unexpected error. expected %v, actual %v", nil, err) + } + err = c.Write(bp) + if err != nil { + t.Errorf("unexpected error. expected %v, actual %v", nil, err) + } +} + +func TestClient_UserAgent(t *testing.T) { + receivedUserAgent := "" + ts := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + receivedUserAgent = r.UserAgent() + + var data Response + w.WriteHeader(http.StatusOK) + _ = json.NewEncoder(w).Encode(data) + })) + defer ts.Close() + + _, err := http.Get(ts.URL) + if err != nil { + t.Errorf("unexpected error. expected %v, actual %v", nil, err) + } + + tests := []struct { + name string + userAgent string + expected string + }{ + { + name: "Empty user agent", + userAgent: "", + expected: "InfluxDBClient", + }, + { + name: "Custom user agent", + userAgent: "Test Influx Client", + expected: "Test Influx Client", + }, + } + + for _, test := range tests { + + config := HTTPConfig{Addr: ts.URL, UserAgent: test.userAgent} + c, _ := NewHTTPClient(config) + defer c.Close() + + receivedUserAgent = "" + query := Query{} + _, err = c.Query(query) + if err != nil { + t.Errorf("unexpected error. expected %v, actual %v", nil, err) + } + if !strings.HasPrefix(receivedUserAgent, test.expected) { + t.Errorf("Unexpected user agent. expected %v, actual %v", test.expected, receivedUserAgent) + } + + receivedUserAgent = "" + bp, _ := NewBatchPoints(BatchPointsConfig{}) + err = c.Write(bp) + if err != nil { + t.Errorf("unexpected error. expected %v, actual %v", nil, err) + } + if !strings.HasPrefix(receivedUserAgent, test.expected) { + t.Errorf("Unexpected user agent. expected %v, actual %v", test.expected, receivedUserAgent) + } + + receivedUserAgent = "" + _, err := c.Query(query) + if err != nil { + t.Errorf("unexpected error. expected %v, actual %v", nil, err) + } + if receivedUserAgent != test.expected { + t.Errorf("Unexpected user agent. expected %v, actual %v", test.expected, receivedUserAgent) + } + } +} + +func TestClient_PointString(t *testing.T) { + const shortForm = "2006-Jan-02" + time1, _ := time.Parse(shortForm, "2013-Feb-03") + tags := map[string]string{"cpu": "cpu-total"} + fields := map[string]interface{}{"idle": 10.1, "system": 50.9, "user": 39.0} + p, _ := NewPoint("cpu_usage", tags, fields, time1) + + s := "cpu_usage,cpu=cpu-total idle=10.1,system=50.9,user=39 1359849600000000000" + if p.String() != s { + t.Errorf("Point String Error, got %s, expected %s", p.String(), s) + } + + s = "cpu_usage,cpu=cpu-total idle=10.1,system=50.9,user=39 1359849600000" + if p.PrecisionString("ms") != s { + t.Errorf("Point String Error, got %s, expected %s", + p.PrecisionString("ms"), s) + } +} + +func TestClient_PointWithoutTimeString(t *testing.T) { + tags := map[string]string{"cpu": "cpu-total"} + fields := map[string]interface{}{"idle": 10.1, "system": 50.9, "user": 39.0} + p, _ := NewPoint("cpu_usage", tags, fields) + + s := "cpu_usage,cpu=cpu-total idle=10.1,system=50.9,user=39" + if p.String() != s { + t.Errorf("Point String Error, got %s, expected %s", p.String(), s) + } + + if p.PrecisionString("ms") != s { + t.Errorf("Point String Error, got %s, expected %s", + p.PrecisionString("ms"), s) + } +} + +func TestClient_PointName(t *testing.T) { + tags := map[string]string{"cpu": "cpu-total"} + fields := map[string]interface{}{"idle": 10.1, "system": 50.9, "user": 39.0} + p, _ := NewPoint("cpu_usage", tags, fields) + + exp := "cpu_usage" + if p.Name() != exp { + t.Errorf("Error, got %s, expected %s", + p.Name(), exp) + } +} + +func TestClient_PointTags(t *testing.T) { + tags := map[string]string{"cpu": "cpu-total"} + fields := map[string]interface{}{"idle": 10.1, "system": 50.9, "user": 39.0} + p, _ := NewPoint("cpu_usage", tags, fields) + + if !reflect.DeepEqual(tags, p.Tags()) { + t.Errorf("Error, got %v, expected %v", + p.Tags(), tags) + } +} + +func TestClient_PointUnixNano(t *testing.T) { + const shortForm = "2006-Jan-02" + time1, _ := time.Parse(shortForm, "2013-Feb-03") + tags := map[string]string{"cpu": "cpu-total"} + fields := map[string]interface{}{"idle": 10.1, "system": 50.9, "user": 39.0} + p, _ := NewPoint("cpu_usage", tags, fields, time1) + + exp := int64(1359849600000000000) + if p.UnixNano() != exp { + t.Errorf("Error, got %d, expected %d", + p.UnixNano(), exp) + } +} + +func TestClient_PointFields(t *testing.T) { + tags := map[string]string{"cpu": "cpu-total"} + fields := map[string]interface{}{"idle": 10.1, "system": 50.9, "user": 39.0} + p, _ := NewPoint("cpu_usage", tags, fields) + + if !reflect.DeepEqual(fields, p.Fields()) { + t.Errorf("Error, got %v, expected %v", + p.Fields(), fields) + } +} + +func TestBatchPoints_PrecisionError(t *testing.T) { + _, err := NewBatchPoints(BatchPointsConfig{Precision: "foobar"}) + if err == nil { + t.Errorf("Precision: foobar should have errored") + } + + bp, _ := NewBatchPoints(BatchPointsConfig{Precision: "ns"}) + err = bp.SetPrecision("foobar") + if err == nil { + t.Errorf("Precision: foobar should have errored") + } +} + +func TestBatchPoints_SettersGetters(t *testing.T) { + bp, _ := NewBatchPoints(BatchPointsConfig{ + Precision: "ns", + Database: "db", + RetentionPolicy: "rp", + WriteConsistency: "wc", + }) + if bp.Precision() != "ns" { + t.Errorf("Expected: %s, got %s", bp.Precision(), "ns") + } + if bp.Database() != "db" { + t.Errorf("Expected: %s, got %s", bp.Database(), "db") + } + if bp.RetentionPolicy() != "rp" { + t.Errorf("Expected: %s, got %s", bp.RetentionPolicy(), "rp") + } + if bp.WriteConsistency() != "wc" { + t.Errorf("Expected: %s, got %s", bp.WriteConsistency(), "wc") + } + + bp.SetDatabase("db2") + bp.SetRetentionPolicy("rp2") + bp.SetWriteConsistency("wc2") + err := bp.SetPrecision("s") + if err != nil { + t.Errorf("Did not expect error: %s", err.Error()) + } + + if bp.Precision() != "s" { + t.Errorf("Expected: %s, got %s", bp.Precision(), "s") + } + if bp.Database() != "db2" { + t.Errorf("Expected: %s, got %s", bp.Database(), "db2") + } + if bp.RetentionPolicy() != "rp2" { + t.Errorf("Expected: %s, got %s", bp.RetentionPolicy(), "rp2") + } + if bp.WriteConsistency() != "wc2" { + t.Errorf("Expected: %s, got %s", bp.WriteConsistency(), "wc2") + } +} diff --git a/vendor/github.com/influxdata/influxdb/client/v2/example_test.go b/vendor/github.com/influxdata/influxdb/client/v2/example_test.go new file mode 100644 index 000000000..68bb24bc7 --- /dev/null +++ b/vendor/github.com/influxdata/influxdb/client/v2/example_test.go @@ -0,0 +1,265 @@ +package client_test + +import ( + "fmt" + "math/rand" + "os" + "time" + + "github.com/influxdata/influxdb/client/v2" +) + +// Create a new client +func ExampleClient() { + // NOTE: this assumes you've setup a user and have setup shell env variables, + // namely INFLUX_USER/INFLUX_PWD. If not just omit Username/Password below. + _, err := client.NewHTTPClient(client.HTTPConfig{ + Addr: "http://localhost:8086", + Username: os.Getenv("INFLUX_USER"), + Password: os.Getenv("INFLUX_PWD"), + }) + if err != nil { + fmt.Println("Error creating InfluxDB Client: ", err.Error()) + } +} + +// Write a point using the UDP client +func ExampleClient_uDP() { + // Make client + config := client.UDPConfig{Addr: "localhost:8089"} + c, err := client.NewUDPClient(config) + if err != nil { + fmt.Println("Error: ", err.Error()) + } + defer c.Close() + + // Create a new point batch + bp, _ := client.NewBatchPoints(client.BatchPointsConfig{ + Precision: "s", + }) + + // Create a point and add to batch + tags := map[string]string{"cpu": "cpu-total"} + fields := map[string]interface{}{ + "idle": 10.1, + "system": 53.3, + "user": 46.6, + } + pt, err := client.NewPoint("cpu_usage", tags, fields, time.Now()) + if err != nil { + fmt.Println("Error: ", err.Error()) + } + bp.AddPoint(pt) + + // Write the batch + c.Write(bp) +} + +// Ping the cluster using the HTTP client +func ExampleClient_Ping() { + // Make client + c, err := client.NewHTTPClient(client.HTTPConfig{ + Addr: "http://localhost:8086", + }) + if err != nil { + fmt.Println("Error creating InfluxDB Client: ", err.Error()) + } + defer c.Close() + + _, _, err = c.Ping(0) + if err != nil { + fmt.Println("Error pinging InfluxDB Cluster: ", err.Error()) + } +} + +// Write a point using the HTTP client +func ExampleClient_write() { + // Make client + c, err := client.NewHTTPClient(client.HTTPConfig{ + Addr: "http://localhost:8086", + }) + if err != nil { + fmt.Println("Error creating InfluxDB Client: ", err.Error()) + } + defer c.Close() + + // Create a new point batch + bp, _ := client.NewBatchPoints(client.BatchPointsConfig{ + Database: "BumbleBeeTuna", + Precision: "s", + }) + + // Create a point and add to batch + tags := map[string]string{"cpu": "cpu-total"} + fields := map[string]interface{}{ + "idle": 10.1, + "system": 53.3, + "user": 46.6, + } + pt, err := client.NewPoint("cpu_usage", tags, fields, time.Now()) + if err != nil { + fmt.Println("Error: ", err.Error()) + } + bp.AddPoint(pt) + + // Write the batch + c.Write(bp) +} + +// Create a batch and add a point +func ExampleBatchPoints() { + // Create a new point batch + bp, _ := client.NewBatchPoints(client.BatchPointsConfig{ + Database: "BumbleBeeTuna", + Precision: "s", + }) + + // Create a point and add to batch + tags := map[string]string{"cpu": "cpu-total"} + fields := map[string]interface{}{ + "idle": 10.1, + "system": 53.3, + "user": 46.6, + } + pt, err := client.NewPoint("cpu_usage", tags, fields, time.Now()) + if err != nil { + fmt.Println("Error: ", err.Error()) + } + bp.AddPoint(pt) +} + +// Using the BatchPoints setter functions +func ExampleBatchPoints_setters() { + // Create a new point batch + bp, _ := client.NewBatchPoints(client.BatchPointsConfig{}) + bp.SetDatabase("BumbleBeeTuna") + bp.SetPrecision("ms") + + // Create a point and add to batch + tags := map[string]string{"cpu": "cpu-total"} + fields := map[string]interface{}{ + "idle": 10.1, + "system": 53.3, + "user": 46.6, + } + pt, err := client.NewPoint("cpu_usage", tags, fields, time.Now()) + if err != nil { + fmt.Println("Error: ", err.Error()) + } + bp.AddPoint(pt) +} + +// Create a new point with a timestamp +func ExamplePoint() { + tags := map[string]string{"cpu": "cpu-total"} + fields := map[string]interface{}{ + "idle": 10.1, + "system": 53.3, + "user": 46.6, + } + pt, err := client.NewPoint("cpu_usage", tags, fields, time.Now()) + if err == nil { + fmt.Println("We created a point: ", pt.String()) + } +} + +// Create a new point without a timestamp +func ExamplePoint_withoutTime() { + tags := map[string]string{"cpu": "cpu-total"} + fields := map[string]interface{}{ + "idle": 10.1, + "system": 53.3, + "user": 46.6, + } + pt, err := client.NewPoint("cpu_usage", tags, fields) + if err == nil { + fmt.Println("We created a point w/o time: ", pt.String()) + } +} + +// Write 1000 points +func ExampleClient_write1000() { + sampleSize := 1000 + + // Make client + c, err := client.NewHTTPClient(client.HTTPConfig{ + Addr: "http://localhost:8086", + }) + if err != nil { + fmt.Println("Error creating InfluxDB Client: ", err.Error()) + } + defer c.Close() + + rand.Seed(42) + + bp, _ := client.NewBatchPoints(client.BatchPointsConfig{ + Database: "systemstats", + Precision: "us", + }) + + for i := 0; i < sampleSize; i++ { + regions := []string{"us-west1", "us-west2", "us-west3", "us-east1"} + tags := map[string]string{ + "cpu": "cpu-total", + "host": fmt.Sprintf("host%d", rand.Intn(1000)), + "region": regions[rand.Intn(len(regions))], + } + + idle := rand.Float64() * 100.0 + fields := map[string]interface{}{ + "idle": idle, + "busy": 100.0 - idle, + } + + pt, err := client.NewPoint( + "cpu_usage", + tags, + fields, + time.Now(), + ) + if err != nil { + println("Error:", err.Error()) + continue + } + bp.AddPoint(pt) + } + + err = c.Write(bp) + if err != nil { + fmt.Println("Error: ", err.Error()) + } +} + +// Make a Query +func ExampleClient_query() { + // Make client + c, err := client.NewHTTPClient(client.HTTPConfig{ + Addr: "http://localhost:8086", + }) + if err != nil { + fmt.Println("Error creating InfluxDB Client: ", err.Error()) + } + defer c.Close() + + q := client.NewQuery("SELECT count(value) FROM shapes", "square_holes", "ns") + if response, err := c.Query(q); err == nil && response.Error() == nil { + fmt.Println(response.Results) + } +} + +// Create a Database with a query +func ExampleClient_createDatabase() { + // Make client + c, err := client.NewHTTPClient(client.HTTPConfig{ + Addr: "http://localhost:8086", + }) + if err != nil { + fmt.Println("Error creating InfluxDB Client: ", err.Error()) + } + defer c.Close() + + q := client.NewQuery("CREATE DATABASE telegraf", "", "") + if response, err := c.Query(q); err == nil && response.Error() == nil { + fmt.Println(response.Results) + } +} diff --git a/vendor/github.com/influxdata/influxdb/cmd/influx/cli/cli.go b/vendor/github.com/influxdata/influxdb/cmd/influx/cli/cli.go new file mode 100644 index 000000000..a034ea954 --- /dev/null +++ b/vendor/github.com/influxdata/influxdb/cmd/influx/cli/cli.go @@ -0,0 +1,858 @@ +package cli // import "github.com/influxdata/influxdb/cmd/influx/cli" + +import ( + "bytes" + "encoding/csv" + "encoding/json" + "errors" + "fmt" + "io" + "net" + "net/url" + "os" + "os/signal" + "path/filepath" + "sort" + "strconv" + "strings" + "syscall" + "text/tabwriter" + + "github.com/influxdata/influxdb/client" + "github.com/influxdata/influxdb/importer/v8" + "github.com/influxdata/influxdb/models" + "github.com/peterh/liner" +) + +const ( + noTokenMsg = "Visit https://enterprise.influxdata.com to register for updates, InfluxDB server management, and monitoring.\n" +) + +// ErrBlankCommand is returned when a parsed command is empty. +var ErrBlankCommand = errors.New("empty input") + +// CommandLine holds CLI configuration and state +type CommandLine struct { + Client *client.Client + Line *liner.State + Host string + Port int + Username string + Password string + Database string + Ssl bool + UnsafeSsl bool + RetentionPolicy string + ClientVersion string + ServerVersion string + Pretty bool // controls pretty print for json + Format string // controls the output format. Valid values are json, csv, or column + Precision string + WriteConsistency string + Execute string + ShowVersion bool + Import bool + PPS int // Controls how many points per second the import will allow via throttling + Path string + Compressed bool + Chunked bool + Quit chan struct{} + IgnoreSignals bool // Ignore signals normally caught by this process (used primarily for testing) + osSignals chan os.Signal + historyFilePath string +} + +// New returns an instance of CommandLine +func New(version string) *CommandLine { + return &CommandLine{ + ClientVersion: version, + Quit: make(chan struct{}, 1), + osSignals: make(chan os.Signal, 1), + } +} + +// Run executes the CLI +func (c *CommandLine) Run() error { + if !c.IgnoreSignals { + // register OS signals for graceful termination + signal.Notify(c.osSignals, syscall.SIGINT, syscall.SIGTERM) + } + + var promptForPassword bool + // determine if they set the password flag but provided no value + for _, v := range os.Args { + v = strings.ToLower(v) + if (strings.HasPrefix(v, "-password") || strings.HasPrefix(v, "--password")) && c.Password == "" { + promptForPassword = true + break + } + } + + c.Line = liner.NewLiner() + defer c.Line.Close() + + c.Line.SetMultiLineMode(true) + + if promptForPassword { + p, e := c.Line.PasswordPrompt("password: ") + if e != nil { + fmt.Println("Unable to parse password.") + } else { + c.Password = p + } + } + + if err := c.Connect(""); err != nil { + return fmt.Errorf( + "Failed to connect to %s\nPlease check your connection settings and ensure 'influxd' is running.", + c.Client.Addr()) + } + + // Modify precision. + c.SetPrecision(c.Precision) + + if c.Execute == "" && !c.Import { + token, err := c.DatabaseToken() + if err != nil { + return fmt.Errorf("Failed to check token: %s", err.Error()) + } + if token == "" { + fmt.Printf(noTokenMsg) + } + fmt.Printf("Connected to %s version %s\n", c.Client.Addr(), c.ServerVersion) + } + + if c.Execute != "" { + // Make the non-interactive mode send everything through the CLI's parser + // the same way the interactive mode works + lines := strings.Split(c.Execute, "\n") + for _, line := range lines { + if err := c.ParseCommand(line); err != nil { + return err + } + } + + c.Line.Close() + return nil + } + + if c.Import { + path := net.JoinHostPort(c.Host, strconv.Itoa(c.Port)) + u, e := client.ParseConnectionString(path, c.Ssl) + if e != nil { + return e + } + + config := v8.NewConfig() + config.Username = c.Username + config.Password = c.Password + config.Precision = "ns" + config.WriteConsistency = "any" + config.Path = c.Path + config.Version = c.ClientVersion + config.URL = u + config.Compressed = c.Compressed + config.PPS = c.PPS + config.Precision = c.Precision + + i := v8.NewImporter(config) + if err := i.Import(); err != nil { + err = fmt.Errorf("ERROR: %s\n", err) + c.Line.Close() + return err + } + c.Line.Close() + return nil + } + + c.Version() + + // Only load/write history if HOME environment variable is set. + if homeDir := os.Getenv("HOME"); homeDir != "" { + // Attempt to load the history file. + c.historyFilePath = filepath.Join(homeDir, ".influx_history") + if historyFile, err := os.Open(c.historyFilePath); err == nil { + c.Line.ReadHistory(historyFile) + historyFile.Close() + } + } + + // read from prompt until exit is run + return c.mainLoop() +} + +// mainLoop runs the main prompt loop for the CLI. +func (c *CommandLine) mainLoop() error { + for { + select { + case <-c.osSignals: + c.exit() + return nil + case <-c.Quit: + c.exit() + return nil + default: + l, e := c.Line.Prompt("> ") + if e == io.EOF { + // Instead of die, register that someone exited the program gracefully + l = "exit" + } else if e != nil { + c.exit() + return e + } + if err := c.ParseCommand(l); err != ErrBlankCommand { + c.Line.AppendHistory(l) + c.saveHistory() + } + } + } +} + +// ParseCommand parses an instruction and calls related method, if any +func (c *CommandLine) ParseCommand(cmd string) error { + lcmd := strings.TrimSpace(strings.ToLower(cmd)) + tokens := strings.Fields(lcmd) + + if len(tokens) > 0 { + switch tokens[0] { + case "exit", "quit": + close(c.Quit) + case "gopher": + c.gopher() + case "connect": + return c.Connect(cmd) + case "auth": + c.SetAuth(cmd) + case "help": + c.help() + case "history": + c.history() + case "format": + c.SetFormat(cmd) + case "precision": + c.SetPrecision(cmd) + case "consistency": + c.SetWriteConsistency(cmd) + case "settings": + c.Settings() + case "pretty": + c.Pretty = !c.Pretty + if c.Pretty { + fmt.Println("Pretty print enabled") + } else { + fmt.Println("Pretty print disabled") + } + case "use": + c.use(cmd) + case "insert": + return c.Insert(cmd) + default: + return c.ExecuteQuery(cmd) + } + + return nil + } + return ErrBlankCommand +} + +// Connect connects client to a server +func (c *CommandLine) Connect(cmd string) error { + var cl *client.Client + var u url.URL + + // Remove the "connect" keyword if it exists + path := strings.TrimSpace(strings.Replace(cmd, "connect", "", -1)) + + // If they didn't provide a connection string, use the current settings + if path == "" { + path = net.JoinHostPort(c.Host, strconv.Itoa(c.Port)) + } + + var e error + u, e = client.ParseConnectionString(path, c.Ssl) + if e != nil { + return e + } + + config := client.NewConfig() + config.URL = u + config.Username = c.Username + config.Password = c.Password + config.UserAgent = "InfluxDBShell/" + c.ClientVersion + config.Precision = c.Precision + config.UnsafeSsl = c.UnsafeSsl + cl, err := client.NewClient(config) + if err != nil { + return fmt.Errorf("Could not create client %s", err) + } + c.Client = cl + + var v string + if _, v, e = c.Client.Ping(); e != nil { + return fmt.Errorf("Failed to connect to %s\n", c.Client.Addr()) + } + c.ServerVersion = v + + return nil +} + +// SetAuth sets client authentication credentials +func (c *CommandLine) SetAuth(cmd string) { + // If they pass in the entire command, we should parse it + // auth + args := strings.Fields(cmd) + if len(args) == 3 { + args = args[1:] + } else { + args = []string{} + } + + if len(args) == 2 { + c.Username = args[0] + c.Password = args[1] + } else { + u, e := c.Line.Prompt("username: ") + if e != nil { + fmt.Printf("Unable to process input: %s", e) + return + } + c.Username = strings.TrimSpace(u) + p, e := c.Line.PasswordPrompt("password: ") + if e != nil { + fmt.Printf("Unable to process input: %s", e) + return + } + c.Password = p + } + + // Update the client as well + c.Client.SetAuth(c.Username, c.Password) +} + +func (c *CommandLine) use(cmd string) { + args := strings.Split(strings.TrimSuffix(strings.TrimSpace(cmd), ";"), " ") + if len(args) != 2 { + fmt.Printf("Could not parse database name from %q.\n", cmd) + return + } + d := args[1] + + // validate if specified database exists + response, err := c.Client.Query(client.Query{Command: "SHOW DATABASES"}) + if err != nil { + fmt.Printf("ERR: %s\n", err) + return + } + + if err := response.Error(); err != nil { + fmt.Printf("ERR: %s\n", err) + return + } + + // verify the provided database exists + databaseExists := func() bool { + for _, result := range response.Results { + for _, row := range result.Series { + if row.Name == "databases" { + for _, values := range row.Values { + for _, database := range values { + if database == d { + return true + } + } + } + } + } + } + return false + }() + if databaseExists { + c.Database = d + fmt.Printf("Using database %s\n", d) + } else { + fmt.Printf("ERR: Database %s doesn't exist. Run SHOW DATABASES for a list of existing databases.\n", d) + } +} + +// SetPrecision sets client precision +func (c *CommandLine) SetPrecision(cmd string) { + // Remove the "precision" keyword if it exists + cmd = strings.TrimSpace(strings.Replace(cmd, "precision", "", -1)) + // normalize cmd + cmd = strings.ToLower(cmd) + + switch cmd { + case "h", "m", "s", "ms", "u", "ns": + c.Precision = cmd + c.Client.SetPrecision(c.Precision) + case "rfc3339": + c.Precision = "" + c.Client.SetPrecision(c.Precision) + default: + fmt.Printf("Unknown precision %q. Please use rfc3339, h, m, s, ms, u or ns.\n", cmd) + } +} + +// SetFormat sets output format +func (c *CommandLine) SetFormat(cmd string) { + // Remove the "format" keyword if it exists + cmd = strings.TrimSpace(strings.Replace(cmd, "format", "", -1)) + // normalize cmd + cmd = strings.ToLower(cmd) + + switch cmd { + case "json", "csv", "column": + c.Format = cmd + default: + fmt.Printf("Unknown format %q. Please use json, csv, or column.\n", cmd) + } +} + +// SetWriteConsistency sets cluster consistency level +func (c *CommandLine) SetWriteConsistency(cmd string) { + // Remove the "consistency" keyword if it exists + cmd = strings.TrimSpace(strings.Replace(cmd, "consistency", "", -1)) + // normalize cmd + cmd = strings.ToLower(cmd) + + _, err := models.ParseConsistencyLevel(cmd) + if err != nil { + fmt.Printf("Unknown consistency level %q. Please use any, one, quorum, or all.\n", cmd) + return + } + c.WriteConsistency = cmd +} + +// isWhitespace returns true if the rune is a space, tab, or newline. +func isWhitespace(ch rune) bool { return ch == ' ' || ch == '\t' || ch == '\n' } + +// isLetter returns true if the rune is a letter. +func isLetter(ch rune) bool { return (ch >= 'a' && ch <= 'z') || (ch >= 'A' && ch <= 'Z') } + +// isDigit returns true if the rune is a digit. +func isDigit(ch rune) bool { return (ch >= '0' && ch <= '9') } + +// isIdentFirstChar returns true if the rune can be used as the first char in an unquoted identifer. +func isIdentFirstChar(ch rune) bool { return isLetter(ch) || ch == '_' } + +// isIdentChar returns true if the rune can be used in an unquoted identifier. +func isNotIdentChar(ch rune) bool { return !(isLetter(ch) || isDigit(ch) || ch == '_') } + +func parseUnquotedIdentifier(stmt string) (string, string) { + if fields := strings.FieldsFunc(stmt, isNotIdentChar); len(fields) > 0 { + return fields[0], strings.TrimPrefix(stmt, fields[0]) + } + return "", stmt +} + +func parseDoubleQuotedIdentifier(stmt string) (string, string) { + escapeNext := false + fields := strings.FieldsFunc(stmt, func(ch rune) bool { + if ch == '\\' { + escapeNext = true + } else if ch == '"' { + if !escapeNext { + return true + } + escapeNext = false + } + return false + }) + if len(fields) > 0 { + return fields[0], strings.TrimPrefix(stmt, "\""+fields[0]+"\"") + } + return "", stmt +} + +func parseNextIdentifier(stmt string) (ident, remainder string) { + if len(stmt) > 0 { + switch { + case isWhitespace(rune(stmt[0])): + return parseNextIdentifier(stmt[1:]) + case isIdentFirstChar(rune(stmt[0])): + return parseUnquotedIdentifier(stmt) + case stmt[0] == '"': + return parseDoubleQuotedIdentifier(stmt) + } + } + return "", stmt +} + +func (c *CommandLine) parseInto(stmt string) string { + ident, stmt := parseNextIdentifier(stmt) + if strings.HasPrefix(stmt, ".") { + c.Database = ident + fmt.Printf("Using database %s\n", c.Database) + ident, stmt = parseNextIdentifier(stmt[1:]) + } + if strings.HasPrefix(stmt, " ") { + c.RetentionPolicy = ident + fmt.Printf("Using retention policy %s\n", c.RetentionPolicy) + return stmt[1:] + } + return stmt +} + +// Insert runs an INSERT statement +func (c *CommandLine) Insert(stmt string) error { + i, point := parseNextIdentifier(stmt) + if !strings.EqualFold(i, "insert") { + fmt.Printf("ERR: found %s, expected INSERT\n", i) + return nil + } + if i, r := parseNextIdentifier(point); strings.EqualFold(i, "into") { + point = c.parseInto(r) + } + _, err := c.Client.Write(client.BatchPoints{ + Points: []client.Point{ + client.Point{Raw: point}, + }, + Database: c.Database, + RetentionPolicy: c.RetentionPolicy, + Precision: c.Precision, + WriteConsistency: c.WriteConsistency, + }) + if err != nil { + fmt.Printf("ERR: %s\n", err) + if c.Database == "" { + fmt.Println("Note: error may be due to not setting a database or retention policy.") + fmt.Println(`Please set a database with the command "use " or`) + fmt.Println("INSERT INTO . ") + } + return err + } + return nil +} + +// query creates a query struct to be used with the client. +func (c *CommandLine) query(query string, database string) client.Query { + return client.Query{ + Command: query, + Database: database, + Chunked: true, + } +} + +// ExecuteQuery runs any query statement +func (c *CommandLine) ExecuteQuery(query string) error { + response, err := c.Client.Query(c.query(query, c.Database)) + if err != nil { + fmt.Printf("ERR: %s\n", err) + return err + } + c.FormatResponse(response, os.Stdout) + if err := response.Error(); err != nil { + fmt.Printf("ERR: %s\n", response.Error()) + if c.Database == "" { + fmt.Println("Warning: It is possible this error is due to not setting a database.") + fmt.Println(`Please set a database with the command "use ".`) + } + return err + } + return nil +} + +// DatabaseToken retrieves database token +func (c *CommandLine) DatabaseToken() (string, error) { + response, err := c.Client.Query(c.query("SHOW DIAGNOSTICS for 'registration'", "")) + if err != nil { + return "", err + } + if response.Error() != nil || len((*response).Results[0].Series) == 0 { + return "", nil + } + + // Look for position of "token" column. + for i, s := range (*response).Results[0].Series[0].Columns { + if s == "token" { + return (*response).Results[0].Series[0].Values[0][i].(string), nil + } + } + return "", nil +} + +// FormatResponse formats output to previsouly chosen format +func (c *CommandLine) FormatResponse(response *client.Response, w io.Writer) { + switch c.Format { + case "json": + c.writeJSON(response, w) + case "csv": + c.writeCSV(response, w) + case "column": + c.writeColumns(response, w) + default: + fmt.Fprintf(w, "Unknown output format %q.\n", c.Format) + } +} + +func (c *CommandLine) writeJSON(response *client.Response, w io.Writer) { + var data []byte + var err error + if c.Pretty { + data, err = json.MarshalIndent(response, "", " ") + } else { + data, err = json.Marshal(response) + } + if err != nil { + fmt.Fprintf(w, "Unable to parse json: %s\n", err) + return + } + fmt.Fprintln(w, string(data)) +} + +func (c *CommandLine) writeCSV(response *client.Response, w io.Writer) { + csvw := csv.NewWriter(w) + for _, result := range response.Results { + // Create a tabbed writer for each result as they won't always line up + rows := c.formatResults(result, "\t") + for _, r := range rows { + csvw.Write(strings.Split(r, "\t")) + } + csvw.Flush() + } +} + +func (c *CommandLine) writeColumns(response *client.Response, w io.Writer) { + // Create a tabbed writer for each result as they won't always line up + writer := new(tabwriter.Writer) + writer.Init(w, 0, 8, 1, '\t', 0) + + for _, result := range response.Results { + // Print out all messages first + for _, m := range result.Messages { + fmt.Fprintf(w, "%s: %s.\n", m.Level, m.Text) + } + csv := c.formatResults(result, "\t") + for _, r := range csv { + fmt.Fprintln(writer, r) + } + writer.Flush() + } +} + +// formatResults will behave differently if you are formatting for columns or csv +func (c *CommandLine) formatResults(result client.Result, separator string) []string { + rows := []string{} + // Create a tabbed writer for each result a they won't always line up + for i, row := range result.Series { + // gather tags + tags := []string{} + for k, v := range row.Tags { + tags = append(tags, fmt.Sprintf("%s=%s", k, v)) + sort.Strings(tags) + } + + columnNames := []string{} + + // Only put name/tags in a column if format is csv + if c.Format == "csv" { + if len(tags) > 0 { + columnNames = append([]string{"tags"}, columnNames...) + } + + if row.Name != "" { + columnNames = append([]string{"name"}, columnNames...) + } + } + + for _, column := range row.Columns { + columnNames = append(columnNames, column) + } + + // Output a line separator if we have more than one set or results and format is column + if i > 0 && c.Format == "column" { + rows = append(rows, "") + } + + // If we are column format, we break out the name/tag to seperate lines + if c.Format == "column" { + if row.Name != "" { + n := fmt.Sprintf("name: %s", row.Name) + rows = append(rows, n) + if len(tags) == 0 { + l := strings.Repeat("-", len(n)) + rows = append(rows, l) + } + } + if len(tags) > 0 { + t := fmt.Sprintf("tags: %s", (strings.Join(tags, ", "))) + rows = append(rows, t) + } + } + + rows = append(rows, strings.Join(columnNames, separator)) + + // if format is column, break tags to their own line/format + if c.Format == "column" && len(tags) > 0 { + lines := []string{} + for _, columnName := range columnNames { + lines = append(lines, strings.Repeat("-", len(columnName))) + } + rows = append(rows, strings.Join(lines, separator)) + } + + for _, v := range row.Values { + var values []string + if c.Format == "csv" { + if row.Name != "" { + values = append(values, row.Name) + } + if len(tags) > 0 { + values = append(values, strings.Join(tags, ",")) + } + } + + for _, vv := range v { + values = append(values, interfaceToString(vv)) + } + rows = append(rows, strings.Join(values, separator)) + } + // Outout a line separator if in column format + if c.Format == "column" { + rows = append(rows, "") + } + } + return rows +} + +func interfaceToString(v interface{}) string { + switch t := v.(type) { + case nil: + return "" + case bool: + return fmt.Sprintf("%v", v) + case int, int8, int16, int32, int64, uint, uint8, uint16, uint32, uint64, uintptr: + return fmt.Sprintf("%d", t) + case float32, float64: + return fmt.Sprintf("%v", t) + default: + return fmt.Sprintf("%v", t) + } +} + +// Settings prints current settings +func (c *CommandLine) Settings() { + w := new(tabwriter.Writer) + w.Init(os.Stdout, 0, 8, 1, '\t', 0) + if c.Port > 0 { + fmt.Fprintf(w, "Host\t%s:%d\n", c.Host, c.Port) + } else { + fmt.Fprintf(w, "Host\t%s\n", c.Host) + } + fmt.Fprintf(w, "Username\t%s\n", c.Username) + fmt.Fprintf(w, "Database\t%s\n", c.Database) + fmt.Fprintf(w, "Pretty\t%v\n", c.Pretty) + fmt.Fprintf(w, "Format\t%s\n", c.Format) + fmt.Fprintf(w, "Write Consistency\t%s\n", c.WriteConsistency) + fmt.Fprintln(w) + w.Flush() +} + +func (c *CommandLine) help() { + fmt.Println(`Usage: + connect connects to another node specified by host:port + auth prompts for username and password + pretty toggles pretty print for the json format + use sets current database + format specifies the format of the server responses: json, csv, or column + precision specifies the format of the timestamp: rfc3339, h, m, s, ms, u or ns + consistency sets write consistency level: any, one, quorum, or all + history displays command history + settings outputs the current settings for the shell + exit/quit/ctrl+d quits the influx shell + + show databases show database names + show series show series information + show measurements show measurement information + show tag keys show tag key information + show field keys show field key information + + A full list of influxql commands can be found at: + https://docs.influxdata.com/influxdb/latest/query_language/spec/ +`) +} + +func (c *CommandLine) history() { + var buf bytes.Buffer + c.Line.WriteHistory(&buf) + fmt.Print(buf.String()) +} + +func (c *CommandLine) saveHistory() { + if historyFile, err := os.Create(c.historyFilePath); err != nil { + fmt.Printf("There was an error writing history file: %s\n", err) + } else { + c.Line.WriteHistory(historyFile) + historyFile.Close() + } +} + +func (c *CommandLine) gopher() { + fmt.Println(` + .-::-::://:-::- .:/++/' + '://:-''/oo+//++o+/.://o- ./+: + .:-. '++- .o/ '+yydhy' o- + .:/. .h: :osoys .smMN- :/ + -/:.' s- /MMMymh. '/y/ s' + -+s:'''' d -mMMms// '-/o: + -/++/++/////:. o: '... s- :s. + :+-+s-' ':/' 's- /+ 'o: + '+-'o: /ydhsh. '//. '-o- o- + .y. o: .MMMdm+y ':+++:::/+:.' s: + .-h/ y- 'sdmds'h -+ydds:::-.' 'h. + .//-.d' o: '.' 'dsNMMMNh:.:++' :y + +y. 'd 's. .s:mddds: ++ o/ + 'N- odd 'o/. './o-s-' .---+++' o- + 'N' yNd .://:/:::::. -s -+/s/./s' 'o/' + so' .h '''' ////s: '+. .s +y' + os/-.y' 's' 'y::+ +d' + '.:o/ -+:-:.' so.---.' + o' 'd-.''/s' + .s' :y.''.y + -s mo:::' + :: yh + // '''' /M' + o+ .s///:/. 'N: + :+ /: -s' ho + 's- -/s/:+/.+h' +h + ys' ':' '-. -d + oh .h + /o .s + s. .h + -y .d + m/ -h + +d /o + 'N- y: + h: m. + s- -d + o- s+ + +- 'm' + s/ oo--. + y- /s ':+' + s' 'od--' .d: + -+ ':o: ':+-/+ + y- .:+- ' + //o- '.:+/. + .-:+/' ''-/+/. + ./:' ''.:o+/-' + .+o:/:/+-' ''.-+ooo/-' + o: -h///++////-. + /: .o/ + //+ 'y + ./sooy. + +`) +} + +// Version prints CLI version +func (c *CommandLine) Version() { + fmt.Println("InfluxDB shell version:", c.ClientVersion) +} + +func (c *CommandLine) exit() { + // write to history file + c.saveHistory() + // release line resources + c.Line.Close() + c.Line = nil +} diff --git a/vendor/github.com/influxdata/influxdb/cmd/influx/cli/cli_test.go b/vendor/github.com/influxdata/influxdb/cmd/influx/cli/cli_test.go new file mode 100644 index 000000000..bb5f39342 --- /dev/null +++ b/vendor/github.com/influxdata/influxdb/cmd/influx/cli/cli_test.go @@ -0,0 +1,514 @@ +package cli_test + +import ( + "bufio" + "bytes" + "io" + "net" + "net/http" + "net/http/httptest" + "net/url" + "strconv" + "strings" + "testing" + + "github.com/influxdata/influxdb/client" + "github.com/influxdata/influxdb/cmd/influx/cli" + "github.com/influxdata/influxdb/influxql" + "github.com/peterh/liner" +) + +const ( + CLIENT_VERSION = "y.y" + SERVER_VERSION = "x.x" +) + +func TestNewCLI(t *testing.T) { + t.Parallel() + c := cli.New(CLIENT_VERSION) + + if c == nil { + t.Fatal("CommandLine shouldn't be nil.") + } + + if c.ClientVersion != CLIENT_VERSION { + t.Fatalf("CommandLine version is %s but should be %s", c.ClientVersion, CLIENT_VERSION) + } +} + +func TestRunCLI(t *testing.T) { + t.Parallel() + ts := emptyTestServer() + defer ts.Close() + + u, _ := url.Parse(ts.URL) + h, p, _ := net.SplitHostPort(u.Host) + c := cli.New(CLIENT_VERSION) + c.Host = h + c.Port, _ = strconv.Atoi(p) + c.IgnoreSignals = true + go func() { + close(c.Quit) + }() + if err := c.Run(); err != nil { + t.Fatalf("Run failed with error: %s", err) + } +} + +func TestRunCLI_ExecuteInsert(t *testing.T) { + t.Parallel() + ts := emptyTestServer() + defer ts.Close() + + u, _ := url.Parse(ts.URL) + h, p, _ := net.SplitHostPort(u.Host) + c := cli.New(CLIENT_VERSION) + c.Host = h + c.Port, _ = strconv.Atoi(p) + c.Precision = "ms" + c.Execute = "INSERT sensor,floor=1 value=2" + c.IgnoreSignals = true + if err := c.Run(); err != nil { + t.Fatalf("Run failed with error: %s", err) + } +} + +func TestSetAuth(t *testing.T) { + t.Parallel() + c := cli.New(CLIENT_VERSION) + config := client.NewConfig() + client, _ := client.NewClient(config) + c.Client = client + u := "userx" + p := "pwdy" + c.SetAuth("auth " + u + " " + p) + + // validate CLI configuration + if c.Username != u { + t.Fatalf("Username is %s but should be %s", c.Username, u) + } + if c.Password != p { + t.Fatalf("Password is %s but should be %s", c.Password, p) + } +} + +func TestSetPrecision(t *testing.T) { + t.Parallel() + c := cli.New(CLIENT_VERSION) + config := client.NewConfig() + client, _ := client.NewClient(config) + c.Client = client + + // validate set non-default precision + p := "ns" + c.SetPrecision("precision " + p) + if c.Precision != p { + t.Fatalf("Precision is %s but should be %s", c.Precision, p) + } + + // validate set default precision which equals empty string + p = "rfc3339" + c.SetPrecision("precision " + p) + if c.Precision != "" { + t.Fatalf("Precision is %s but should be empty", c.Precision) + } +} + +func TestSetFormat(t *testing.T) { + t.Parallel() + c := cli.New(CLIENT_VERSION) + config := client.NewConfig() + client, _ := client.NewClient(config) + c.Client = client + + // validate set non-default format + f := "json" + c.SetFormat("format " + f) + if c.Format != f { + t.Fatalf("Format is %s but should be %s", c.Format, f) + } +} + +func TestSetWriteConsistency(t *testing.T) { + t.Parallel() + c := cli.New(CLIENT_VERSION) + config := client.NewConfig() + client, _ := client.NewClient(config) + c.Client = client + + // set valid write consistency + consistency := "all" + c.SetWriteConsistency("consistency " + consistency) + if c.WriteConsistency != consistency { + t.Fatalf("WriteConsistency is %s but should be %s", c.WriteConsistency, consistency) + } + + // set different valid write consistency and validate change + consistency = "quorum" + c.SetWriteConsistency("consistency " + consistency) + if c.WriteConsistency != consistency { + t.Fatalf("WriteConsistency is %s but should be %s", c.WriteConsistency, consistency) + } + + // set invalid write consistency and verify there was no change + invalidConsistency := "invalid_consistency" + c.SetWriteConsistency("consistency " + invalidConsistency) + if c.WriteConsistency == invalidConsistency { + t.Fatalf("WriteConsistency is %s but should be %s", c.WriteConsistency, consistency) + } +} + +func TestParseCommand_CommandsExist(t *testing.T) { + t.Parallel() + c, err := client.NewClient(client.Config{}) + if err != nil { + t.Fatalf("unexpected error %v", err) + } + + m := cli.CommandLine{Client: c, Line: liner.NewLiner()} + tests := []struct { + cmd string + }{ + {cmd: "gopher"}, + {cmd: "auth"}, + {cmd: "help"}, + {cmd: "format"}, + {cmd: "precision"}, + {cmd: "settings"}, + } + for _, test := range tests { + if err := m.ParseCommand(test.cmd); err != nil { + t.Fatalf(`Got error %v for command %q, expected nil`, err, test.cmd) + } + } +} + +func TestParseCommand_Connect(t *testing.T) { + t.Parallel() + ts := emptyTestServer() + defer ts.Close() + + u, _ := url.Parse(ts.URL) + cmd := "connect " + u.Host + c := cli.CommandLine{} + + // assert connection is established + if err := c.ParseCommand(cmd); err != nil { + t.Fatalf("There was an error while connecting to %v: %v", u.Path, err) + } + + // assert server version is populated + if c.ServerVersion != SERVER_VERSION { + t.Fatalf("Server version is %s but should be %s.", c.ServerVersion, SERVER_VERSION) + } +} + +func TestParseCommand_TogglePretty(t *testing.T) { + t.Parallel() + c := cli.CommandLine{} + if c.Pretty { + t.Fatalf(`Pretty should be false.`) + } + c.ParseCommand("pretty") + if !c.Pretty { + t.Fatalf(`Pretty should be true.`) + } + c.ParseCommand("pretty") + if c.Pretty { + t.Fatalf(`Pretty should be false.`) + } +} + +func TestParseCommand_Exit(t *testing.T) { + t.Parallel() + tests := []struct { + cmd string + }{ + {cmd: "exit"}, + {cmd: " exit"}, + {cmd: "exit "}, + {cmd: "Exit "}, + } + + for _, test := range tests { + c := cli.CommandLine{Quit: make(chan struct{}, 1)} + c.ParseCommand(test.cmd) + // channel should be closed + if _, ok := <-c.Quit; ok { + t.Fatalf(`Command "exit" failed for %q.`, test.cmd) + } + } +} + +func TestParseCommand_Quit(t *testing.T) { + t.Parallel() + tests := []struct { + cmd string + }{ + {cmd: "quit"}, + {cmd: " quit"}, + {cmd: "quit "}, + {cmd: "Quit "}, + } + + for _, test := range tests { + c := cli.CommandLine{Quit: make(chan struct{}, 1)} + c.ParseCommand(test.cmd) + // channel should be closed + if _, ok := <-c.Quit; ok { + t.Fatalf(`Command "quit" failed for %q.`, test.cmd) + } + } +} + +func TestParseCommand_Use(t *testing.T) { + t.Parallel() + ts := emptyTestServer() + defer ts.Close() + + u, _ := url.Parse(ts.URL) + config := client.Config{URL: *u} + c, err := client.NewClient(config) + if err != nil { + t.Fatalf("unexpected error. expected %v, actual %v", nil, err) + } + m := cli.CommandLine{Client: c} + + tests := []struct { + cmd string + }{ + {cmd: "use db"}, + {cmd: " use db"}, + {cmd: "use db "}, + {cmd: "use db;"}, + {cmd: "use db; "}, + {cmd: "Use db"}, + } + + for _, test := range tests { + if err := m.ParseCommand(test.cmd); err != nil { + t.Fatalf(`Got error %v for command %q, expected nil.`, err, test.cmd) + } + + if m.Database != "db" { + t.Fatalf(`Command "use" changed database to %q. Expected db`, m.Database) + } + } +} + +func TestParseCommand_Consistency(t *testing.T) { + t.Parallel() + c := cli.CommandLine{} + tests := []struct { + cmd string + }{ + {cmd: "consistency one"}, + {cmd: " consistency one"}, + {cmd: "consistency one "}, + {cmd: "consistency one;"}, + {cmd: "consistency one; "}, + {cmd: "Consistency one"}, + } + + for _, test := range tests { + if err := c.ParseCommand(test.cmd); err != nil { + t.Fatalf(`Got error %v for command %q, expected nil.`, err, test.cmd) + } + + if c.WriteConsistency != "one" { + t.Fatalf(`Command "consistency" changed consistency to %q. Expected one`, c.WriteConsistency) + } + } +} + +func TestParseCommand_Insert(t *testing.T) { + t.Parallel() + ts := emptyTestServer() + defer ts.Close() + + u, _ := url.Parse(ts.URL) + config := client.Config{URL: *u} + c, err := client.NewClient(config) + if err != nil { + t.Fatalf("unexpected error. expected %v, actual %v", nil, err) + } + m := cli.CommandLine{Client: c} + + tests := []struct { + cmd string + }{ + {cmd: "INSERT cpu,host=serverA,region=us-west value=1.0"}, + {cmd: " INSERT cpu,host=serverA,region=us-west value=1.0"}, + {cmd: "INSERT cpu,host=serverA,region=us-west value=1.0"}, + {cmd: "insert cpu,host=serverA,region=us-west value=1.0 "}, + {cmd: "insert"}, + {cmd: "Insert "}, + {cmd: "insert c"}, + {cmd: "insert int"}, + } + + for _, test := range tests { + if err := m.ParseCommand(test.cmd); err != nil { + t.Fatalf(`Got error %v for command %q, expected nil.`, err, test.cmd) + } + } +} + +func TestParseCommand_InsertInto(t *testing.T) { + t.Parallel() + ts := emptyTestServer() + defer ts.Close() + + u, _ := url.Parse(ts.URL) + config := client.Config{URL: *u} + c, err := client.NewClient(config) + if err != nil { + t.Fatalf("unexpected error. expected %v, actual %v", nil, err) + } + m := cli.CommandLine{Client: c} + + tests := []struct { + cmd, db, rp string + }{ + { + cmd: `INSERT INTO test cpu,host=serverA,region=us-west value=1.0`, + db: "", + rp: "test", + }, + { + cmd: ` INSERT INTO .test cpu,host=serverA,region=us-west value=1.0`, + db: "", + rp: "test", + }, + { + cmd: `INSERT INTO "test test" cpu,host=serverA,region=us-west value=1.0`, + db: "", + rp: "test test", + }, + { + cmd: `Insert iNTO test.test cpu,host=serverA,region=us-west value=1.0`, + db: "test", + rp: "test", + }, + { + cmd: `insert into "test test" cpu,host=serverA,region=us-west value=1.0`, + db: "test", + rp: "test test", + }, + { + cmd: `insert into "d b"."test test" cpu,host=serverA,region=us-west value=1.0`, + db: "d b", + rp: "test test", + }, + } + + for _, test := range tests { + if err := m.ParseCommand(test.cmd); err != nil { + t.Fatalf(`Got error %v for command %q, expected nil.`, err, test.cmd) + } + if m.Database != test.db { + t.Fatalf(`Command "insert into" db parsing failed, expected: %q, actual: %q`, test.db, m.Database) + } + if m.RetentionPolicy != test.rp { + t.Fatalf(`Command "insert into" rp parsing failed, expected: %q, actual: %q`, test.rp, m.RetentionPolicy) + } + } +} + +func TestParseCommand_History(t *testing.T) { + t.Parallel() + c := cli.CommandLine{Line: liner.NewLiner()} + defer c.Line.Close() + + // append one entry to history + c.Line.AppendHistory("abc") + + tests := []struct { + cmd string + }{ + {cmd: "history"}, + {cmd: " history"}, + {cmd: "history "}, + {cmd: "History "}, + } + + for _, test := range tests { + if err := c.ParseCommand(test.cmd); err != nil { + t.Fatalf(`Got error %v for command %q, expected nil.`, err, test.cmd) + } + } + + // buf size should be at least 1 + var buf bytes.Buffer + c.Line.WriteHistory(&buf) + if buf.Len() < 1 { + t.Fatal("History is borked") + } +} + +func TestParseCommand_HistoryWithBlankCommand(t *testing.T) { + t.Parallel() + c := cli.CommandLine{Line: liner.NewLiner()} + defer c.Line.Close() + + // append one entry to history + c.Line.AppendHistory("x") + + tests := []struct { + cmd string + err error + }{ + {cmd: "history"}, + {cmd: " history"}, + {cmd: "history "}, + {cmd: "", err: cli.ErrBlankCommand}, // shouldn't be persisted in history + {cmd: " ", err: cli.ErrBlankCommand}, // shouldn't be persisted in history + {cmd: " ", err: cli.ErrBlankCommand}, // shouldn't be persisted in history + } + + // a blank command will return cli.ErrBlankCommand. + for _, test := range tests { + if err := c.ParseCommand(test.cmd); err != test.err { + t.Errorf(`Got error %v for command %q, expected %v`, err, test.cmd, test.err) + } + } + + // buf shall not contain empty commands + var buf bytes.Buffer + c.Line.WriteHistory(&buf) + scanner := bufio.NewScanner(&buf) + for scanner.Scan() { + if strings.TrimSpace(scanner.Text()) == "" { + t.Fatal("Empty commands should not be persisted in history.") + } + } +} + +// helper methods + +func emptyTestServer() *httptest.Server { + return httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + w.Header().Set("X-Influxdb-Version", SERVER_VERSION) + + switch r.URL.Path { + case "/query": + values := r.URL.Query() + parser := influxql.NewParser(bytes.NewBufferString(values.Get("q"))) + q, err := parser.ParseQuery() + if err != nil { + w.WriteHeader(http.StatusInternalServerError) + return + } + stmt := q.Statements[0] + + switch stmt.(type) { + case *influxql.ShowDatabasesStatement: + io.WriteString(w, `{"results":[{"series":[{"name":"databases","columns":["name"],"values":[["db"]]}]}]}`) + case *influxql.ShowDiagnosticsStatement: + io.WriteString(w, `{"results":[{}]}`) + } + case "/write": + w.WriteHeader(http.StatusOK) + } + })) +} diff --git a/vendor/github.com/influxdata/influxdb/cmd/influx/main.go b/vendor/github.com/influxdata/influxdb/cmd/influx/main.go new file mode 100644 index 000000000..d182f2bf9 --- /dev/null +++ b/vendor/github.com/influxdata/influxdb/cmd/influx/main.go @@ -0,0 +1,116 @@ +package main + +import ( + "flag" + "fmt" + "os" + + "github.com/influxdata/influxdb/client" + "github.com/influxdata/influxdb/cmd/influx/cli" +) + +// These variables are populated via the Go linker. +var ( + version string +) + +const ( + // defaultFormat is the default format of the results when issuing queries + defaultFormat = "column" + + // defaultPrecision is the default timestamp format of the results when issuing queries + defaultPrecision = "ns" + + // defaultPPS is the default points per second that the import will throttle at + // by default it's 0, which means it will not throttle + defaultPPS = 0 +) + +func init() { + // If version is not set, make that clear. + if version == "" { + version = "unknown" + } +} + +func main() { + c := cli.New(version) + + fs := flag.NewFlagSet("InfluxDB shell version "+version, flag.ExitOnError) + fs.StringVar(&c.Host, "host", client.DefaultHost, "Influxdb host to connect to.") + fs.IntVar(&c.Port, "port", client.DefaultPort, "Influxdb port to connect to.") + fs.StringVar(&c.Username, "username", c.Username, "Username to connect to the server.") + fs.StringVar(&c.Password, "password", c.Password, `Password to connect to the server. Leaving blank will prompt for password (--password="").`) + fs.StringVar(&c.Database, "database", c.Database, "Database to connect to the server.") + fs.BoolVar(&c.Ssl, "ssl", false, "Use https for connecting to cluster.") + fs.BoolVar(&c.UnsafeSsl, "unsafeSsl", false, "Set this when connecting to the cluster using https and not use SSL verification.") + fs.StringVar(&c.Format, "format", defaultFormat, "Format specifies the format of the server responses: json, csv, or column.") + fs.StringVar(&c.Precision, "precision", defaultPrecision, "Precision specifies the format of the timestamp: rfc3339,h,m,s,ms,u or ns.") + fs.StringVar(&c.WriteConsistency, "consistency", "all", "Set write consistency level: any, one, quorum, or all.") + fs.BoolVar(&c.Pretty, "pretty", false, "Turns on pretty print for the json format.") + fs.StringVar(&c.Execute, "execute", c.Execute, "Execute command and quit.") + fs.BoolVar(&c.ShowVersion, "version", false, "Displays the InfluxDB version.") + fs.BoolVar(&c.Import, "import", false, "Import a previous database.") + fs.IntVar(&c.PPS, "pps", defaultPPS, "How many points per second the import will allow. By default it is zero and will not throttle importing.") + fs.StringVar(&c.Path, "path", "", "path to the file to import") + fs.BoolVar(&c.Compressed, "compressed", false, "set to true if the import file is compressed") + + // Define our own custom usage to print + fs.Usage = func() { + fmt.Println(`Usage of influx: + -version + Display the version and exit. + -host 'host name' + Host to connect to. + -port 'port #' + Port to connect to. + -database 'database name' + Database to connect to the server. + -password 'password' + Password to connect to the server. Leaving blank will prompt for password (--password ''). + -username 'username' + Username to connect to the server. + -ssl + Use https for requests. + -unsafeSsl + Set this when connecting to the cluster using https and not use SSL verification. + -execute 'command' + Execute command and quit. + -format 'json|csv|column' + Format specifies the format of the server responses: json, csv, or column. + -precision 'rfc3339|h|m|s|ms|u|ns' + Precision specifies the format of the timestamp: rfc3339, h, m, s, ms, u or ns. + -consistency 'any|one|quorum|all' + Set write consistency level: any, one, quorum, or all + -pretty + Turns on pretty print for the json format. + -import + Import a previous database export from file + -pps + How many points per second the import will allow. By default it is zero and will not throttle importing. + -path + Path to file to import + -compressed + Set to true if the import file is compressed + +Examples: + + # Use influx in a non-interactive mode to query the database "metrics" and pretty print json: + $ influx -database 'metrics' -execute 'select * from cpu' -format 'json' -pretty + + # Connect to a specific database on startup and set database context: + $ influx -database 'metrics' -host 'localhost' -port '8086' +`) + } + fs.Parse(os.Args[1:]) + + if c.ShowVersion { + c.Version() + os.Exit(0) + } + + if err := c.Run(); err != nil { + fmt.Fprintf(os.Stderr, "%s\n", err) + os.Exit(1) + } +} diff --git a/vendor/github.com/influxdata/influxdb/cmd/influx_inspect/export.go b/vendor/github.com/influxdata/influxdb/cmd/influx_inspect/export.go new file mode 100644 index 000000000..6b994e338 --- /dev/null +++ b/vendor/github.com/influxdata/influxdb/cmd/influx_inspect/export.go @@ -0,0 +1,92 @@ +package main + +import ( + "bufio" + "fmt" + "io/ioutil" + "os" + "path/filepath" + "strings" + + "github.com/influxdata/influxdb/tsdb/engine/tsm1" +) + +func cmdExport(path string) { + dataPath := filepath.Join(path, "data") + + // No need to do this in a loop + ext := fmt.Sprintf(".%s", tsm1.TSMFileExtension) + + // Get all TSM files by walking through the data dir + files := []string{} + err := filepath.Walk(dataPath, func(path string, f os.FileInfo, err error) error { + if err != nil { + return err + } + if filepath.Ext(path) == ext { + files = append(files, path) + } + return nil + }) + if err != nil { + panic(err) + } + + // Loop through each file and output all of the data + for _, f := range files { + file, err := os.OpenFile(f, os.O_RDONLY, 0600) + + relPath, _ := filepath.Rel(dataPath, f) + dirs := strings.Split(relPath, string(byte(os.PathSeparator))) + database := dirs[0] + fmt.Println("Opening", f, "in database", database) + temp, _ := ioutil.TempDir("/tmp", "influxdb") + + if err != nil { + fmt.Printf("%v", err) + os.Exit(1) + } + + reader, err := tsm1.NewTSMReader(file) + + if err != nil { + fmt.Printf("%v", err) + os.Exit(1) + } + + filename := temp + "/" + database + ".lp" + + of, _ := os.Create(filename) + defer of.Close() + w := bufio.NewWriter(of) + + fmt.Println("Writing", reader.KeyCount(), "series to", filename) + + for i := 0; i < reader.KeyCount(); i++ { + var pairs string + key, typ := reader.KeyAt(i) + values, _ := reader.ReadAll(key) + split := strings.Split(key, "#!~#") + measurement, field := split[0], split[1] + + for _, value := range values { + switch typ { + case tsm1.BlockFloat64: + pairs = field + "=" + fmt.Sprintf("%v", value.Value()) + case tsm1.BlockInteger: + pairs = field + "=" + fmt.Sprintf("%vi", value.Value()) + case tsm1.BlockBoolean: + pairs = field + "=" + fmt.Sprintf("%v", value.Value()) + case tsm1.BlockString: + pairs = field + "=" + fmt.Sprintf("\"%v\"", value.Value()) + default: + pairs = field + "=" + fmt.Sprintf("%v", value.Value()) + } + + fmt.Fprintln(w, measurement, pairs, value.UnixNano()) + } + + w.Flush() + } + } +} diff --git a/vendor/github.com/influxdata/influxdb/cmd/influx_inspect/info.go b/vendor/github.com/influxdata/influxdb/cmd/influx_inspect/info.go new file mode 100644 index 000000000..7c12abdb7 --- /dev/null +++ b/vendor/github.com/influxdata/influxdb/cmd/influx_inspect/info.go @@ -0,0 +1,100 @@ +package main + +import ( + "fmt" + "io/ioutil" + "log" + "os" + "path/filepath" + "sort" + "strings" + "text/tabwriter" + + "github.com/influxdata/influxdb/tsdb" +) + +func cmdInfo(path string) { + tstore := tsdb.NewStore(filepath.Join(path, "data")) + tstore.Logger = log.New(ioutil.Discard, "", log.LstdFlags) + tstore.EngineOptions.Config.Dir = filepath.Join(path, "data") + tstore.EngineOptions.Config.WALLoggingEnabled = false + tstore.EngineOptions.Config.WALDir = filepath.Join(path, "wal") + if err := tstore.Open(); err != nil { + fmt.Printf("Failed to open dir: %v\n", err) + os.Exit(1) + } + + size, err := tstore.DiskSize() + if err != nil { + fmt.Printf("Failed to determine disk usage: %v\n", err) + } + + // Summary stats + fmt.Printf("Shards: %d, Indexes: %d, Databases: %d, Disk Size: %d, Series: %d\n\n", + tstore.ShardN(), tstore.DatabaseIndexN(), len(tstore.Databases()), size, countSeries(tstore)) + + tw := tabwriter.NewWriter(os.Stdout, 16, 8, 0, '\t', 0) + + fmt.Fprintln(tw, strings.Join([]string{"Shard", "DB", "Measurement", "Tags [#K/#V]", "Fields [Name:Type]", "Series"}, "\t")) + + shardIDs := tstore.ShardIDs() + + databases := tstore.Databases() + sort.Strings(databases) + + for _, db := range databases { + index := tstore.DatabaseIndex(db) + measurements := index.Measurements() + sort.Sort(measurements) + for _, m := range measurements { + tags := m.TagKeys() + tagValues := 0 + for _, tag := range tags { + tagValues += len(m.TagValues(tag)) + } + fields := m.FieldNames() + sort.Strings(fields) + series := m.SeriesKeys() + sort.Strings(series) + sort.Sort(ShardIDs(shardIDs)) + + // Sample a point from each measurement to determine the field types + for _, shardID := range shardIDs { + shard := tstore.Shard(shardID) + codec := shard.FieldCodec(m.Name) + if codec == nil { + continue + } + for _, field := range codec.Fields() { + ft := fmt.Sprintf("%s:%s", field.Name, field.Type) + fmt.Fprintf(tw, "%d\t%s\t%s\t%d/%d\t%d [%s]\t%d\n", shardID, db, m.Name, len(tags), tagValues, + len(fields), ft, len(series)) + + } + + } + } + } + tw.Flush() +} + +func countSeries(tstore *tsdb.Store) int { + var count int + for _, shardID := range tstore.ShardIDs() { + shard := tstore.Shard(shardID) + cnt, err := shard.SeriesCount() + if err != nil { + fmt.Printf("series count failed: %v\n", err) + continue + } + count += cnt + } + return count +} + +// ShardIDs is a collection of UINT 64 that represent shard ids. +type ShardIDs []uint64 + +func (a ShardIDs) Len() int { return len(a) } +func (a ShardIDs) Less(i, j int) bool { return a[i] < a[j] } +func (a ShardIDs) Swap(i, j int) { a[i], a[j] = a[j], a[i] } diff --git a/vendor/github.com/influxdata/influxdb/cmd/influx_inspect/main.go b/vendor/github.com/influxdata/influxdb/cmd/influx_inspect/main.go new file mode 100644 index 000000000..fceb4b794 --- /dev/null +++ b/vendor/github.com/influxdata/influxdb/cmd/influx_inspect/main.go @@ -0,0 +1,154 @@ +package main + +import ( + "flag" + "fmt" + "os" + + _ "github.com/influxdata/influxdb/tsdb/engine" +) + +func usage() { + println(`Usage: influx_inspect [options] + +Displays detailed information about InfluxDB data files. +`) + + println(`Commands: + info - displays series meta-data for all shards. Default location [$HOME/.influxdb] + dumptsm - dumps low-level details about tsm1 files. + dumptsmdev - dumps low-level details about tsm1dev files.`) + println() +} + +func main() { + + flag.Usage = usage + flag.Parse() + + if len(flag.Args()) == 0 { + flag.Usage() + os.Exit(0) + } + + switch flag.Args()[0] { + case "info": + var path string + fs := flag.NewFlagSet("info", flag.ExitOnError) + fs.StringVar(&path, "dir", os.Getenv("HOME")+"/.influxdb", "Root storage path. [$HOME/.influxdb]") + + fs.Usage = func() { + println("Usage: influx_inspect info [options]\n\n Displays series meta-data for all shards..") + println() + println("Options:") + fs.PrintDefaults() + } + + if err := fs.Parse(flag.Args()[1:]); err != nil { + fmt.Printf("%v", err) + os.Exit(1) + } + cmdInfo(path) + case "dumptsm": + var dumpAll bool + opts := &tsdmDumpOpts{} + fs := flag.NewFlagSet("file", flag.ExitOnError) + fs.BoolVar(&opts.dumpIndex, "index", false, "Dump raw index data") + fs.BoolVar(&opts.dumpBlocks, "blocks", false, "Dump raw block data") + fs.BoolVar(&dumpAll, "all", false, "Dump all data. Caution: This may print a lot of information") + fs.StringVar(&opts.filterKey, "filter-key", "", "Only display index and block data match this key substring") + + fs.Usage = func() { + println("Usage: influx_inspect dumptsm [options] \n\n Dumps low-level details about tsm1 files.") + println() + println("Options:") + fs.PrintDefaults() + os.Exit(0) + } + + if err := fs.Parse(flag.Args()[1:]); err != nil { + fmt.Printf("%v", err) + os.Exit(1) + } + + if len(fs.Args()) == 0 || fs.Args()[0] == "" { + fmt.Printf("TSM file not specified\n\n") + fs.Usage() + fs.PrintDefaults() + os.Exit(1) + } + opts.path = fs.Args()[0] + opts.dumpBlocks = opts.dumpBlocks || dumpAll || opts.filterKey != "" + opts.dumpIndex = opts.dumpIndex || dumpAll || opts.filterKey != "" + cmdDumpTsm1(opts) + case "dumptsmdev": + var dumpAll bool + opts := &tsdmDumpOpts{} + fs := flag.NewFlagSet("file", flag.ExitOnError) + fs.BoolVar(&opts.dumpIndex, "index", false, "Dump raw index data") + fs.BoolVar(&opts.dumpBlocks, "blocks", false, "Dump raw block data") + fs.BoolVar(&dumpAll, "all", false, "Dump all data. Caution: This may print a lot of information") + fs.StringVar(&opts.filterKey, "filter-key", "", "Only display index and block data match this key substring") + + fs.Usage = func() { + println("Usage: influx_inspect dumptsm [options] \n\n Dumps low-level details about tsm1 files.") + println() + println("Options:") + fs.PrintDefaults() + os.Exit(0) + } + + if err := fs.Parse(flag.Args()[1:]); err != nil { + fmt.Printf("%v", err) + os.Exit(1) + } + + if len(fs.Args()) == 0 || fs.Args()[0] == "" { + fmt.Printf("TSM file not specified\n\n") + fs.Usage() + fs.PrintDefaults() + os.Exit(1) + } + opts.path = fs.Args()[0] + opts.dumpBlocks = opts.dumpBlocks || dumpAll || opts.filterKey != "" + opts.dumpIndex = opts.dumpIndex || dumpAll || opts.filterKey != "" + cmdDumpTsm1dev(opts) + case "verify": + var path string + fs := flag.NewFlagSet("verify", flag.ExitOnError) + fs.StringVar(&path, "dir", os.Getenv("HOME")+"/.influxdb", "Root storage path. [$HOME/.influxdb]") + + fs.Usage = func() { + println("Usage: influx_inspect verify [options]\n\n verifies the the checksum of shards") + println() + println("Options:") + fs.PrintDefaults() + } + + if err := fs.Parse(flag.Args()[1:]); err != nil { + fmt.Printf("%v", err) + os.Exit(1) + } + cmdVerify(path) + case "export": + var path string + fs := flag.NewFlagSet("export", flag.ExitOnError) + fs.StringVar(&path, "dir", os.Getenv("HOME")+"/.influxdb", "Root storage path. [$HOME/.influxdb]") + + fs.Usage = func() { + println("Usage: influx_inspect export [options]\n\n exports TSM files into InfluxDB line protocol format") + println() + println("Options:") + fs.PrintDefaults() + } + + if err := fs.Parse(flag.Args()[1:]); err != nil { + fmt.Printf("%v", err) + os.Exit(1) + } + cmdExport(path) + default: + flag.Usage() + os.Exit(1) + } +} diff --git a/vendor/github.com/influxdata/influxdb/cmd/influx_inspect/tsm.go b/vendor/github.com/influxdata/influxdb/cmd/influx_inspect/tsm.go new file mode 100644 index 000000000..84fbe8c25 --- /dev/null +++ b/vendor/github.com/influxdata/influxdb/cmd/influx_inspect/tsm.go @@ -0,0 +1,654 @@ +package main + +import ( + "encoding/binary" + "encoding/json" + "fmt" + "io/ioutil" + "os" + "path/filepath" + "strconv" + "strings" + "text/tabwriter" + "time" + + "github.com/golang/snappy" + "github.com/influxdata/influxdb/tsdb" + "github.com/influxdata/influxdb/tsdb/engine/tsm1" +) + +// these consts are for the old tsm format. They can be removed once we remove +// the inspection for the original tsm1 files. +const ( + //IDsFileExtension is the extension for the file that keeps the compressed map + // of keys to uint64 IDs. + IDsFileExtension = "ids" + + // FieldsFileExtension is the extension for the file that stores compressed field + // encoding data for this db + FieldsFileExtension = "fields" + + // SeriesFileExtension is the extension for the file that stores the compressed + // series metadata for series in this db + SeriesFileExtension = "series" +) + +type tsdmDumpOpts struct { + dumpIndex bool + dumpBlocks bool + filterKey string + path string +} + +type tsmIndex struct { + series int + offset int64 + minTime int64 + maxTime int64 + blocks []*block +} + +type block struct { + id uint64 + offset int64 +} + +type blockStats struct { + min, max int + counts [][]int +} + +func (b *blockStats) inc(typ int, enc byte) { + for len(b.counts) <= typ { + b.counts = append(b.counts, []int{}) + } + for len(b.counts[typ]) <= int(enc) { + b.counts[typ] = append(b.counts[typ], 0) + } + b.counts[typ][enc]++ +} + +func (b *blockStats) size(sz int) { + if b.min == 0 || sz < b.min { + b.min = sz + } + if b.min == 0 || sz > b.max { + b.max = sz + } +} + +var ( + fieldType = []string{ + "timestamp", "float", "int", "bool", "string", + } + blockTypes = []string{ + "float64", "int64", "bool", "string", + } + timeEnc = []string{ + "none", "s8b", "rle", + } + floatEnc = []string{ + "none", "gor", + } + intEnc = []string{ + "none", "s8b", "rle", + } + boolEnc = []string{ + "none", "bp", + } + stringEnc = []string{ + "none", "snpy", + } + encDescs = [][]string{ + timeEnc, floatEnc, intEnc, boolEnc, stringEnc, + } +) + +func readFields(path string) (map[string]*tsdb.MeasurementFields, error) { + fields := make(map[string]*tsdb.MeasurementFields) + + f, err := os.OpenFile(filepath.Join(path, FieldsFileExtension), os.O_RDONLY, 0666) + if os.IsNotExist(err) { + return fields, nil + } else if err != nil { + return nil, err + } + b, err := ioutil.ReadAll(f) + if err != nil { + return nil, err + } + + data, err := snappy.Decode(nil, b) + if err != nil { + return nil, err + } + + if err := json.Unmarshal(data, &fields); err != nil { + return nil, err + } + return fields, nil +} + +func readSeries(path string) (map[string]*tsdb.Series, error) { + series := make(map[string]*tsdb.Series) + + f, err := os.OpenFile(filepath.Join(path, SeriesFileExtension), os.O_RDONLY, 0666) + if os.IsNotExist(err) { + return series, nil + } else if err != nil { + return nil, err + } + defer f.Close() + b, err := ioutil.ReadAll(f) + if err != nil { + return nil, err + } + + data, err := snappy.Decode(nil, b) + if err != nil { + return nil, err + } + + if err := json.Unmarshal(data, &series); err != nil { + return nil, err + } + + return series, nil +} + +func readIds(path string) (map[string]uint64, error) { + f, err := os.OpenFile(filepath.Join(path, IDsFileExtension), os.O_RDONLY, 0666) + if os.IsNotExist(err) { + return nil, nil + } else if err != nil { + return nil, err + } + b, err := ioutil.ReadAll(f) + if err != nil { + return nil, err + } + + b, err = snappy.Decode(nil, b) + if err != nil { + return nil, err + } + + ids := make(map[string]uint64) + if b != nil { + if err := json.Unmarshal(b, &ids); err != nil { + return nil, err + } + } + return ids, err +} + +func readIndex(f *os.File) (*tsmIndex, error) { + // Get the file size + stat, err := f.Stat() + if err != nil { + return nil, err + } + + // Seek to the series count + f.Seek(-4, os.SEEK_END) + b := make([]byte, 8) + _, err = f.Read(b[:4]) + if err != nil { + return nil, err + } + + seriesCount := binary.BigEndian.Uint32(b) + + // Get the min time + f.Seek(-20, os.SEEK_END) + f.Read(b) + minTime := int64(binary.BigEndian.Uint64(b)) + + // Get max time + f.Seek(-12, os.SEEK_END) + f.Read(b) + maxTime := int64(binary.BigEndian.Uint64(b)) + + // Figure out where the index starts + indexStart := stat.Size() - int64(seriesCount*12+20) + + // Seek to the start of the index + f.Seek(indexStart, os.SEEK_SET) + count := int(seriesCount) + index := &tsmIndex{ + offset: indexStart, + minTime: minTime, + maxTime: maxTime, + series: count, + } + + if indexStart < 0 { + return nil, fmt.Errorf("index corrupt: offset=%d", indexStart) + } + + // Read the index entries + for i := 0; i < count; i++ { + f.Read(b) + id := binary.BigEndian.Uint64(b) + f.Read(b[:4]) + pos := binary.BigEndian.Uint32(b[:4]) + index.blocks = append(index.blocks, &block{id: id, offset: int64(pos)}) + } + + return index, nil +} + +func cmdDumpTsm1(opts *tsdmDumpOpts) { + var errors []error + + f, err := os.Open(opts.path) + if err != nil { + println(err.Error()) + os.Exit(1) + } + + // Get the file size + stat, err := f.Stat() + if err != nil { + println(err.Error()) + os.Exit(1) + } + + b := make([]byte, 8) + f.Read(b[:4]) + + // Verify magic number + if binary.BigEndian.Uint32(b[:4]) != 0x16D116D1 { + println("Not a tsm1 file.") + os.Exit(1) + } + + ids, err := readIds(filepath.Dir(opts.path)) + if err != nil { + println("Failed to read series:", err.Error()) + os.Exit(1) + } + + invIds := map[uint64]string{} + for k, v := range ids { + invIds[v] = k + } + + index, err := readIndex(f) + if err != nil { + println("Failed to readIndex:", err.Error()) + + // Create a stubbed out index so we can still try and read the block data directly + // w/o panicing ourselves. + index = &tsmIndex{ + minTime: 0, + maxTime: 0, + offset: stat.Size(), + } + } + + blockStats := &blockStats{} + + println("Summary:") + fmt.Printf(" File: %s\n", opts.path) + fmt.Printf(" Time Range: %s - %s\n", + time.Unix(0, index.minTime).UTC().Format(time.RFC3339Nano), + time.Unix(0, index.maxTime).UTC().Format(time.RFC3339Nano), + ) + fmt.Printf(" Duration: %s ", time.Unix(0, index.maxTime).Sub(time.Unix(0, index.minTime))) + fmt.Printf(" Series: %d ", index.series) + fmt.Printf(" File Size: %d\n", stat.Size()) + println() + + tw := tabwriter.NewWriter(os.Stdout, 8, 8, 1, '\t', 0) + fmt.Fprintln(tw, " "+strings.Join([]string{"Pos", "ID", "Ofs", "Key", "Field"}, "\t")) + for i, block := range index.blocks { + key := invIds[block.id] + split := strings.Split(key, "#!~#") + + // We dont' know know if we have fields so use an informative default + var measurement, field string = "UNKNOWN", "UNKNOWN" + + // We read some IDs from the ids file + if len(invIds) > 0 { + // Change the default to error until we know we have a valid key + measurement = "ERR" + field = "ERR" + + // Possible corruption? Try to read as much as we can and point to the problem. + if key == "" { + errors = append(errors, fmt.Errorf("index pos %d, field id: %d, missing key for id", i, block.id)) + } else if len(split) < 2 { + errors = append(errors, fmt.Errorf("index pos %d, field id: %d, key corrupt: got '%v'", i, block.id, key)) + } else { + measurement = split[0] + field = split[1] + } + } + + if opts.filterKey != "" && !strings.Contains(key, opts.filterKey) { + continue + } + fmt.Fprintln(tw, " "+strings.Join([]string{ + strconv.FormatInt(int64(i), 10), + strconv.FormatUint(block.id, 10), + strconv.FormatInt(int64(block.offset), 10), + measurement, + field, + }, "\t")) + } + + if opts.dumpIndex { + println("Index:") + tw.Flush() + println() + } + + tw = tabwriter.NewWriter(os.Stdout, 8, 8, 1, '\t', 0) + fmt.Fprintln(tw, " "+strings.Join([]string{"Blk", "Ofs", "Len", "ID", "Type", "Min Time", "Points", "Enc [T/V]", "Len [T/V]"}, "\t")) + + // Staring at 4 because the magic number is 4 bytes + i := int64(4) + var blockCount, pointCount, blockSize int64 + indexSize := stat.Size() - index.offset + + // Start at the beginning and read every block + for i < index.offset { + f.Seek(int64(i), 0) + + f.Read(b) + id := binary.BigEndian.Uint64(b) + f.Read(b[:4]) + length := binary.BigEndian.Uint32(b[:4]) + buf := make([]byte, length) + f.Read(buf) + + blockSize += int64(len(buf)) + 12 + + startTime := time.Unix(0, int64(binary.BigEndian.Uint64(buf[:8]))) + blockType := buf[8] + + encoded := buf[9:] + + cnt := tsm1.BlockCount(buf) + pointCount += int64(cnt) + + // Length of the timestamp block + tsLen, j := binary.Uvarint(encoded) + + // Unpack the timestamp bytes + ts := encoded[int(j) : int(j)+int(tsLen)] + + // Unpack the value bytes + values := encoded[int(j)+int(tsLen):] + + tsEncoding := timeEnc[int(ts[0]>>4)] + vEncoding := encDescs[int(blockType+1)][values[0]>>4] + + typeDesc := blockTypes[blockType] + + blockStats.inc(0, ts[0]>>4) + blockStats.inc(int(blockType+1), values[0]>>4) + blockStats.size(len(buf)) + + if opts.filterKey != "" && !strings.Contains(invIds[id], opts.filterKey) { + i += (12 + int64(length)) + blockCount++ + continue + } + + fmt.Fprintln(tw, " "+strings.Join([]string{ + strconv.FormatInt(blockCount, 10), + strconv.FormatInt(i, 10), + strconv.FormatInt(int64(len(buf)), 10), + strconv.FormatUint(id, 10), + typeDesc, + startTime.UTC().Format(time.RFC3339Nano), + strconv.FormatInt(int64(cnt), 10), + fmt.Sprintf("%s/%s", tsEncoding, vEncoding), + fmt.Sprintf("%d/%d", len(ts), len(values)), + }, "\t")) + + i += (12 + int64(length)) + blockCount++ + } + if opts.dumpBlocks { + println("Blocks:") + tw.Flush() + println() + } + + fmt.Printf("Statistics\n") + fmt.Printf(" Blocks:\n") + fmt.Printf(" Total: %d Size: %d Min: %d Max: %d Avg: %d\n", + blockCount, blockSize, blockStats.min, blockStats.max, blockSize/blockCount) + fmt.Printf(" Index:\n") + fmt.Printf(" Total: %d Size: %d\n", len(index.blocks), indexSize) + fmt.Printf(" Points:\n") + fmt.Printf(" Total: %d", pointCount) + println() + + println(" Encoding:") + for i, counts := range blockStats.counts { + if len(counts) == 0 { + continue + } + fmt.Printf(" %s: ", strings.Title(fieldType[i])) + for j, v := range counts { + fmt.Printf("\t%s: %d (%d%%) ", encDescs[i][j], v, int(float64(v)/float64(blockCount)*100)) + } + println() + } + fmt.Printf(" Compression:\n") + fmt.Printf(" Per block: %0.2f bytes/point\n", float64(blockSize)/float64(pointCount)) + fmt.Printf(" Total: %0.2f bytes/point\n", float64(stat.Size())/float64(pointCount)) + + if len(errors) > 0 { + println() + fmt.Printf("Errors (%d):\n", len(errors)) + for _, err := range errors { + fmt.Printf(" * %v\n", err) + } + println() + } +} + +func cmdDumpTsm1dev(opts *tsdmDumpOpts) { + var errors []error + + f, err := os.Open(opts.path) + if err != nil { + println(err.Error()) + os.Exit(1) + } + + // Get the file size + stat, err := f.Stat() + if err != nil { + println(err.Error()) + os.Exit(1) + } + b := make([]byte, 8) + + r, err := tsm1.NewTSMReader(f) + if err != nil { + println("Error opening TSM files: ", err.Error()) + os.Exit(1) + } + defer r.Close() + + minTime, maxTime := r.TimeRange() + keyCount := r.KeyCount() + + blockStats := &blockStats{} + + println("Summary:") + fmt.Printf(" File: %s\n", opts.path) + fmt.Printf(" Time Range: %s - %s\n", + time.Unix(0, minTime).UTC().Format(time.RFC3339Nano), + time.Unix(0, maxTime).UTC().Format(time.RFC3339Nano), + ) + fmt.Printf(" Duration: %s ", time.Unix(0, maxTime).Sub(time.Unix(0, minTime))) + fmt.Printf(" Series: %d ", keyCount) + fmt.Printf(" File Size: %d\n", stat.Size()) + println() + + tw := tabwriter.NewWriter(os.Stdout, 8, 8, 1, '\t', 0) + fmt.Fprintln(tw, " "+strings.Join([]string{"Pos", "Min Time", "Max Time", "Ofs", "Size", "Key", "Field"}, "\t")) + var pos int + for i := 0; i < keyCount; i++ { + key, _ := r.KeyAt(i) + for _, e := range r.Entries(key) { + pos++ + split := strings.Split(key, "#!~#") + + // We dont' know know if we have fields so use an informative default + var measurement, field string = "UNKNOWN", "UNKNOWN" + + // Possible corruption? Try to read as much as we can and point to the problem. + measurement = split[0] + field = split[1] + + if opts.filterKey != "" && !strings.Contains(key, opts.filterKey) { + continue + } + fmt.Fprintln(tw, " "+strings.Join([]string{ + strconv.FormatInt(int64(pos), 10), + time.Unix(0, e.MinTime).UTC().Format(time.RFC3339Nano), + time.Unix(0, e.MaxTime).UTC().Format(time.RFC3339Nano), + strconv.FormatInt(int64(e.Offset), 10), + strconv.FormatInt(int64(e.Size), 10), + measurement, + field, + }, "\t")) + } + } + + if opts.dumpIndex { + println("Index:") + tw.Flush() + println() + } + + tw = tabwriter.NewWriter(os.Stdout, 8, 8, 1, '\t', 0) + fmt.Fprintln(tw, " "+strings.Join([]string{"Blk", "Chk", "Ofs", "Len", "Type", "Min Time", "Points", "Enc [T/V]", "Len [T/V]"}, "\t")) + + // Starting at 5 because the magic number is 4 bytes + 1 byte version + i := int64(5) + var blockCount, pointCount, blockSize int64 + indexSize := r.IndexSize() + + // Start at the beginning and read every block + for j := 0; j < keyCount; j++ { + key, _ := r.KeyAt(j) + for _, e := range r.Entries(key) { + + f.Seek(int64(e.Offset), 0) + f.Read(b[:4]) + + chksum := binary.BigEndian.Uint32(b[:4]) + + buf := make([]byte, e.Size-4) + f.Read(buf) + + blockSize += int64(e.Size) + + blockType := buf[0] + + encoded := buf[1:] + + var v []tsm1.Value + v, err := tsm1.DecodeBlock(buf, v) + if err != nil { + fmt.Printf("error: %v\n", err.Error()) + os.Exit(1) + } + startTime := time.Unix(0, v[0].UnixNano()) + + pointCount += int64(len(v)) + + // Length of the timestamp block + tsLen, j := binary.Uvarint(encoded) + + // Unpack the timestamp bytes + ts := encoded[int(j) : int(j)+int(tsLen)] + + // Unpack the value bytes + values := encoded[int(j)+int(tsLen):] + + tsEncoding := timeEnc[int(ts[0]>>4)] + vEncoding := encDescs[int(blockType+1)][values[0]>>4] + + typeDesc := blockTypes[blockType] + + blockStats.inc(0, ts[0]>>4) + blockStats.inc(int(blockType+1), values[0]>>4) + blockStats.size(len(buf)) + + if opts.filterKey != "" && !strings.Contains(key, opts.filterKey) { + i += blockSize + blockCount++ + continue + } + + fmt.Fprintln(tw, " "+strings.Join([]string{ + strconv.FormatInt(blockCount, 10), + strconv.FormatUint(uint64(chksum), 10), + strconv.FormatInt(i, 10), + strconv.FormatInt(int64(len(buf)), 10), + typeDesc, + startTime.UTC().Format(time.RFC3339Nano), + strconv.FormatInt(int64(len(v)), 10), + fmt.Sprintf("%s/%s", tsEncoding, vEncoding), + fmt.Sprintf("%d/%d", len(ts), len(values)), + }, "\t")) + + i += blockSize + blockCount++ + } + } + + if opts.dumpBlocks { + println("Blocks:") + tw.Flush() + println() + } + + var blockSizeAvg int64 + if blockCount > 0 { + blockSizeAvg = blockSize / blockCount + } + fmt.Printf("Statistics\n") + fmt.Printf(" Blocks:\n") + fmt.Printf(" Total: %d Size: %d Min: %d Max: %d Avg: %d\n", + blockCount, blockSize, blockStats.min, blockStats.max, blockSizeAvg) + fmt.Printf(" Index:\n") + fmt.Printf(" Total: %d Size: %d\n", blockCount, indexSize) + fmt.Printf(" Points:\n") + fmt.Printf(" Total: %d", pointCount) + println() + + println(" Encoding:") + for i, counts := range blockStats.counts { + if len(counts) == 0 { + continue + } + fmt.Printf(" %s: ", strings.Title(fieldType[i])) + for j, v := range counts { + fmt.Printf("\t%s: %d (%d%%) ", encDescs[i][j], v, int(float64(v)/float64(blockCount)*100)) + } + println() + } + fmt.Printf(" Compression:\n") + fmt.Printf(" Per block: %0.2f bytes/point\n", float64(blockSize)/float64(pointCount)) + fmt.Printf(" Total: %0.2f bytes/point\n", float64(stat.Size())/float64(pointCount)) + + if len(errors) > 0 { + println() + fmt.Printf("Errors (%d):\n", len(errors)) + for _, err := range errors { + fmt.Printf(" * %v\n", err) + } + println() + } +} diff --git a/vendor/github.com/influxdata/influxdb/cmd/influx_inspect/verify.go b/vendor/github.com/influxdata/influxdb/cmd/influx_inspect/verify.go new file mode 100644 index 000000000..34aafe4e0 --- /dev/null +++ b/vendor/github.com/influxdata/influxdb/cmd/influx_inspect/verify.go @@ -0,0 +1,78 @@ +package main + +import ( + "fmt" + "hash/crc32" + "os" + "path/filepath" + "text/tabwriter" + "time" + + "github.com/influxdata/influxdb/tsdb/engine/tsm1" +) + +func cmdVerify(path string) { + start := time.Now() + dataPath := filepath.Join(path, "data") + + brokenBlocks := 0 + totalBlocks := 0 + + // No need to do this in a loop + ext := fmt.Sprintf(".%s", tsm1.TSMFileExtension) + + // Get all TSM files by walking through the data dir + files := []string{} + err := filepath.Walk(dataPath, func(path string, f os.FileInfo, err error) error { + if err != nil { + return err + } + if filepath.Ext(path) == ext { + files = append(files, path) + } + return nil + }) + if err != nil { + panic(err) + } + + tw := tabwriter.NewWriter(os.Stdout, 16, 8, 0, '\t', 0) + + // Verify the checksums of every block in every file + for _, f := range files { + file, err := os.OpenFile(f, os.O_RDONLY, 0600) + if err != nil { + fmt.Printf("%v", err) + os.Exit(1) + } + + reader, err := tsm1.NewTSMReader(file) + if err != nil { + fmt.Printf("%v", err) + os.Exit(1) + } + + blockItr := reader.BlockIterator() + brokenFileBlocks := 0 + count := 0 + for blockItr.Next() { + totalBlocks++ + key, _, _, checksum, buf, err := blockItr.Read() + if err != nil { + brokenBlocks++ + fmt.Fprintf(tw, "%s: could not get checksum for key %v block %d due to error: %q\n", f, key, count, err) + } else if expected := crc32.ChecksumIEEE(buf); checksum != expected { + brokenBlocks++ + fmt.Fprintf(tw, "%s: got %d but expected %d for key %v, block %d\n", f, checksum, expected, key, count) + } + count++ + } + if brokenFileBlocks == 0 { + fmt.Fprintf(tw, "%s: healthy\n", f) + } + reader.Close() + } + + fmt.Fprintf(tw, "Broken Blocks: %d / %d, in %vs\n", brokenBlocks, totalBlocks, time.Since(start).Seconds()) + tw.Flush() +} diff --git a/vendor/github.com/influxdata/influxdb/cmd/influx_stress/README.md b/vendor/github.com/influxdata/influxdb/cmd/influx_stress/README.md new file mode 100644 index 000000000..c4036331e --- /dev/null +++ b/vendor/github.com/influxdata/influxdb/cmd/influx_stress/README.md @@ -0,0 +1,43 @@ +# `influx_stress` + +If you run into any issues with this tool please mention @jackzampolin when you create an issue. + +## Ways to run + +### `influx_stress` +This runs a basic stress test with the [default config](https://github.com/influxdata/influxdb/blob/master/stress/stress.toml) For more information on the configuration file please see the default. + +### `influx_stress -config someConfig.toml` +This runs the stress test with a valid configuration file located at `someConfig.tom` + +### `influx_stress -v2 -config someConfig.iql` +This runs the stress test with a valid `v2` configuration file. For more information about the `v2` stress test see the [v2 stress README](https://github.com/influxdata/influxdb/blob/master/stress/v2/README.md). + +## Flags + +If flags are defined they overwrite the config from any file passed in. + +### `-addr` string +IP address and port of database where response times will persist (e.g., localhost:8086) + +`default` = "http://localhost:8086" + +### `-config` string +The relative path to the stress test configuration file. + +`default` = [config](https://github.com/influxdata/influxdb/blob/master/stress/stress.toml) + +### `-cpuprofile` filename +Writes the result of Go's cpu profile to filename + +`default` = no profiling + +### `-database` string +Name of database on `-addr` that `influx_stress` will persist write and query response times + +`default` = "stress" + +### `-tags` value +A comma separated list of tags to add to write and query response times. + +`default` = "" diff --git a/vendor/github.com/influxdata/influxdb/cmd/influx_stress/examples/template.toml b/vendor/github.com/influxdata/influxdb/cmd/influx_stress/examples/template.toml new file mode 100644 index 000000000..08be33995 --- /dev/null +++ b/vendor/github.com/influxdata/influxdb/cmd/influx_stress/examples/template.toml @@ -0,0 +1,92 @@ +# This section can be removed +[provision] + # The basic provisioner simply deletes and creates database. + # If `reset_database` is false, it will not attempt to delete the database + [provision.basic] + # If enabled the provisioner will actually run + enabled = true + # Address of the instance that is to be provisioned + address = "localhost:8086" + # Database the will be created/deleted + database = "stress" + # Attempt to delete database + reset_database = true + +# This section cannot be commented out +# To prevent writes set `enabled=false` +# in [write.influx_client.basic] +[write] + [write.point_generator] + # The basic point generator will generate points of the form + # `cpu,host=server-%v,location=us-west value=234 123456` + [write.point_generator.basic] + # number of points that will be written for each of the series + point_count = 100 + # number of series + series_count = 100000 + # How much time between each timestamp + tick = "10s" + # Randomize timestamp a bit (not functional) + jitter = true + # Precision of points that are being written + precision = "s" + # name of the measurement that will be written + measurement = "cpu" + # The date for the first point that is written into influx + start_date = "2006-Jan-02" + # Defines a tag for a series + [[write.point_generator.basic.tag]] + key = "host" + value = "server" + [[write.point_generator.basic.tag]] + key = "location" + value = "us-west" + # Defines a field for a series + [[write.point_generator.basic.field]] + key = "value" + value = "float64" # supported types: float64, int, bool + + + [write.influx_client] + [write.influx_client.basic] + # If enabled the writer will actually write + enabled = true + # Addresses is an array of the Influxdb instances + addresses = ["localhost:8086"] # stress_test_server runs on port 1234 + # Database that is being written to + database = "stress" + # Precision of points that are being written + precision = "s" + # Size of batches that are sent to db + batch_size = 10000 + # Interval between each batch + batch_interval = "0s" + # How many concurrent writers to the db + concurrency = 10 + # ssl enabled? + ssl = false + # format of points that are written to influxdb + format = "line_http" # line_udp (not supported yet), graphite_tcp (not supported yet), graphite_udp (not supported yet) + +# This section can be removed +[read] + [read.query_generator] + [read.query_generator.basic] + # Template of the query that will be ran against the instance + template = "SELECT count(value) FROM cpu where host='server-%v'" + # How many times the templated query will be ran + query_count = 250 + + [read.query_client] + [read.query_client.basic] + # if enabled the reader will actually read + enabled = true + # Address of the instance that will be queried + addresses = ["localhost:8086"] + # Database that will be queried + database = "stress" + # Interval bewteen queries + query_interval = "100ms" + # Number of concurrent queriers + concurrency = 1 + diff --git a/vendor/github.com/influxdata/influxdb/cmd/influx_stress/influx_stress.go b/vendor/github.com/influxdata/influxdb/cmd/influx_stress/influx_stress.go new file mode 100644 index 000000000..17a835628 --- /dev/null +++ b/vendor/github.com/influxdata/influxdb/cmd/influx_stress/influx_stress.go @@ -0,0 +1,70 @@ +package main + +import ( + "flag" + "fmt" + "log" + "os" + "runtime/pprof" + + "github.com/influxdata/influxdb/stress" + v2 "github.com/influxdata/influxdb/stress/v2" +) + +var ( + useV2 = flag.Bool("v2", false, "Use version 2 of stress tool") + config = flag.String("config", "", "The stress test file") + cpuprofile = flag.String("cpuprofile", "", "Write the cpu profile to `filename`") + db = flag.String("db", "", "target database within test system for write and query load") +) + +func main() { + o := stress.NewOutputConfig() + flag.Parse() + + if *cpuprofile != "" { + f, err := os.Create(*cpuprofile) + if err != nil { + fmt.Println(err) + return + } + pprof.StartCPUProfile(f) + defer pprof.StopCPUProfile() + } + + if *useV2 { + if *config != "" { + v2.RunStress(*config) + } else { + v2.RunStress("stress/v2/file.iql") + } + } else { + + c, err := stress.NewConfig(*config) + if err != nil { + log.Fatal(err) + return + } + + if *db != "" { + c.Provision.Basic.Database = *db + c.Write.InfluxClients.Basic.Database = *db + c.Read.QueryClients.Basic.Database = *db + } + + w := stress.NewWriter(&c.Write.PointGenerators.Basic, &c.Write.InfluxClients.Basic) + r := stress.NewQuerier(&c.Read.QueryGenerators.Basic, &c.Read.QueryClients.Basic) + s := stress.NewStressTest(&c.Provision.Basic, w, r) + + bw := stress.NewBroadcastChannel() + bw.Register(c.Write.InfluxClients.Basic.BasicWriteHandler) + bw.Register(o.HTTPHandler("write")) + + br := stress.NewBroadcastChannel() + br.Register(c.Read.QueryClients.Basic.BasicReadHandler) + br.Register(o.HTTPHandler("read")) + + s.Start(bw.Handle, br.Handle) + + } +} diff --git a/vendor/github.com/influxdata/influxdb/cmd/influx_tsm/README.md b/vendor/github.com/influxdata/influxdb/cmd/influx_tsm/README.md new file mode 100644 index 000000000..d63c152a2 --- /dev/null +++ b/vendor/github.com/influxdata/influxdb/cmd/influx_tsm/README.md @@ -0,0 +1,152 @@ +# Converting b1 and bz1 shards to tsm1 + +`influx_tsm` is a tool for converting b1 and bz1 shards to tsm1 +format. Converting shards to tsm1 format results in a very significant +reduction in disk usage, and significantly improved write-throughput, +when writing data into those shards. + +Conversion can be controlled on a database-by-database basis. By +default a database is backed up before it is converted, allowing you +to roll back any changes. Because of the backup process, ensure the +host system has at least as much free disk space as the disk space +consumed by the _data_ directory of your InfluxDB system. + +The tool automatically ignores tsm1 shards, and can be run +idempotently on any database. + +Conversion is an offline process, and the InfluxDB system must be +stopped during conversion. However the conversion process reads and +writes shards directly on disk and should be fast. + +## Steps + +Follow these steps to perform a conversion. + +* Identify the databases you wish to convert. You can convert one or more databases at a time. By default all databases are converted. +* Decide on parallel operation. By default the conversion operation peforms each operation in a serial manner. This minimizes load on the host system performing the conversion, but also takes the most time. If you wish to minimize the time conversion takes, enable parallel mode. Conversion will then perform as many operations as possible in parallel, but the process may place significant load on the host system (CPU, disk, and RAM, usage will all increase). +* Stop all write-traffic to your InfluxDB system. +* Restart the InfluxDB service and wait until all WAL data is flushed to disk -- this has completed when the system responds to queries. This is to ensure all data is present in shards. +* Stop the InfluxDB service. It should not be restarted until conversion is complete. +* Run conversion tool. Depending on the size of the data directory, this might be a lengthy operation. Consider running the conversion tool under a "screen" session to avoid any interruptions. +* Unless you ran the conversion tool as the same user as that which runs InfluxDB, then you may need to set the correct read-and-write permissions on the new tsm1 directories. +* Restart node and ensure data looks correct. +* If everything looks OK, you may then wish to remove or archive the backed-up databases. +* Restart write traffic. + +## Example session + +Below is an example session, showing a database being converted. + +``` +$ # Create a backup location that the `influxdb` user has full access to +$ mkdir -m 0777 /path/to/influxdb_backup +$ sudo -u influxdb influx_tsm -backup /path/to/influxdb_backup -parallel /var/lib/influxdb/data + +b1 and bz1 shard conversion. +----------------------------------- +Data directory is: /var/lib/influxdb/data +Backup directory is: /path/to/influxdb_backup +Databases specified: all +Database backups enabled: yes +Parallel mode enabled (GOMAXPROCS): yes (8) + + +Found 1 shards that will be converted. + +Database Retention Path Engine Size +_internal monitor /var/lib/influxdb/data/_internal/monitor/1 bz1 65536 + +These shards will be converted. Proceed? y/N: y +Conversion starting.... +Backing up 1 databases... +2016/01/28 12:23:43.699266 Backup of databse '_internal' started +2016/01/28 12:23:43.699883 Backing up file /var/lib/influxdb/data/_internal/monitor/1 +2016/01/28 12:23:43.700052 Database _internal backed up (851.776µs) +2016/01/28 12:23:43.700320 Starting conversion of shard: /var/lib/influxdb/data/_internal/monitor/1 +2016/01/28 12:23:43.706276 Conversion of /var/lib/influxdb/data/_internal/monitor/1 successful (6.040148ms) + +Summary statistics +======================================== +Databases converted: 1 +Shards converted: 1 +TSM files created: 1 +Points read: 369 +Points written: 369 +NaN filtered: 0 +Inf filtered: 0 +Points without fields filtered: 0 +Disk usage pre-conversion (bytes): 65536 +Disk usage post-conversion (bytes): 11000 +Reduction factor: 83% +Bytes per TSM point: 29.81 +Total conversion time: 7.330443ms + +$ # restart node, verify data +$ sudo rm -r /path/to/influxdb_backup +``` + +Note that the tool first lists the shards that will be converted, +before asking for confirmation. You can abort the conversion process +at this step if you just wish to see what would be converted, or if +the list of shards does not look correct. + +__WARNING:__ If you run the `influx_tsm` tool as a user other than the +`influxdb` user (or the user that the InfluxDB process runs under), +please make sure to verify the shard permissions are correct prior to +starting InfluxDB. If needed, shard permissions can be corrected with +the `chown` command. For example: + +``` +sudo chown -R influxdb:influxdb /var/lib/influxdb +``` + +## Rolling back a conversion + +After a successful backup (the message `Database XYZ backed up` was +logged), you have a duplicate of that database in the _backup_ +directory you provided on the command line. If, when checking your +data after a successful conversion, you notice things missing or +something just isn't right, you can "undo" the conversion: + +- Shut down your node (this is very important) +- Remove the database's directory from the influxdb `data` directory (default: `~/.influxdb/data/XYZ` for binary installations or `/var/lib/influxdb/data/XYZ` for packaged installations) +- Copy (to really make sure the shard is preserved) the database's directory from the backup directory you created into the `data` directory. + +Using the same directories as above, and assuming a database named `stats`: + +``` +$ sudo rm -r /var/lib/influxdb/data/stats +$ sudo cp -r /path/to/influxdb_backup/stats /var/lib/influxdb/data/ +$ # restart influxd node +``` + +#### How to avoid downtime when upgrading shards + +*Identify non-`tsm1` shards* + +Non-`tsm1` shards are files of the form: `data///`. + +`tsm1` shards are files of the form: `data////.tsm`. + +*Determine which `bz`/`bz1` shards are cold for writes* + +Run the `SHOW SHARDS` query to see the start and end dates for shards. +If the date range for a shard does not span the current time then the shard is said to be cold for writes. +This means that no new points are expected to be added to the shard. +The shard whose date range spans now is said to be hot for writes. +You can only safely convert cold shards without stopping the InfluxDB process. + +*Convert cold shards* + +1. Copy each of the cold shards you'd like to convert to a new directory with the structure `/tmp/data///`. +2. Run the `influx_tsm` tool on the copied files: +``` +influx_tsm -parallel /tmp/data/ +``` +3. Remove the existing cold `b1`/`bz1` shards from the production data directory. +4. Move the new `tsm1` shards into the original directory, overwriting the existing `b1`/`bz1` shards of the same name. Do this simultaneously with step 3 to avoid any query errors. +5. Wait an hour, a day, or a week (depending on your retention period) for any hot `b1`/`bz1` shards to become cold and repeat steps 1 through 4 on the newly cold shards. + +> **Note:** Any points written to the cold shards after making a copy will be lost when the `tsm1` shard overwrites the existing cold shard. +Nothing in InfluxDB will prevent writes to cold shards, they are merely unexpected, not impossible. +It is your responsibility to prevent writes to cold shards to prevent data loss. diff --git a/vendor/github.com/influxdata/influxdb/cmd/influx_tsm/b1/reader.go b/vendor/github.com/influxdata/influxdb/cmd/influx_tsm/b1/reader.go new file mode 100644 index 000000000..22f17769b --- /dev/null +++ b/vendor/github.com/influxdata/influxdb/cmd/influx_tsm/b1/reader.go @@ -0,0 +1,268 @@ +package b1 // import "github.com/influxdata/influxdb/cmd/influx_tsm/b1" + +import ( + "encoding/binary" + "math" + "sort" + "time" + + "github.com/boltdb/bolt" + "github.com/influxdata/influxdb/cmd/influx_tsm/stats" + "github.com/influxdata/influxdb/cmd/influx_tsm/tsdb" + "github.com/influxdata/influxdb/tsdb/engine/tsm1" +) + +const DefaultChunkSize int = 1000 + +var excludedBuckets = map[string]bool{ + "fields": true, + "meta": true, + "series": true, + "wal": true, +} + +// Reader is used to read all data from a b1 shard. +type Reader struct { + path string + db *bolt.DB + tx *bolt.Tx + + cursors []*cursor + currCursor int + + keyBuf string + values []tsm1.Value + valuePos int + + fields map[string]*tsdb.MeasurementFields + codecs map[string]*tsdb.FieldCodec + + stats *stats.Stats +} + +// NewReader returns a reader for the b1 shard at path. +func NewReader(path string, stats *stats.Stats, chunkSize int) *Reader { + r := &Reader{ + path: path, + fields: make(map[string]*tsdb.MeasurementFields), + codecs: make(map[string]*tsdb.FieldCodec), + stats: stats, + } + + if chunkSize <= 0 { + chunkSize = DefaultChunkSize + } + + r.values = make([]tsm1.Value, chunkSize) + + return r +} + +// Open opens the reader. +func (r *Reader) Open() error { + // Open underlying storage. + db, err := bolt.Open(r.path, 0666, &bolt.Options{Timeout: 1 * time.Second}) + if err != nil { + return err + } + r.db = db + + // Load fields. + if err := r.db.View(func(tx *bolt.Tx) error { + meta := tx.Bucket([]byte("fields")) + c := meta.Cursor() + + for k, v := c.First(); k != nil; k, v = c.Next() { + mf := &tsdb.MeasurementFields{} + if err := mf.UnmarshalBinary(v); err != nil { + return err + } + r.fields[string(k)] = mf + r.codecs[string(k)] = tsdb.NewFieldCodec(mf.Fields) + } + return nil + }); err != nil { + return err + } + + seriesSet := make(map[string]bool) + + // ignore series index and find all series in this shard + if err := r.db.View(func(tx *bolt.Tx) error { + tx.ForEach(func(name []byte, _ *bolt.Bucket) error { + key := string(name) + if !excludedBuckets[key] { + seriesSet[key] = true + } + return nil + }) + return nil + }); err != nil { + return err + } + + r.tx, err = r.db.Begin(false) + if err != nil { + return err + } + + // Create cursor for each field of each series. + for s := range seriesSet { + measurement := tsdb.MeasurementFromSeriesKey(s) + fields := r.fields[measurement] + if fields == nil { + r.stats.IncrFiltered() + continue + } + for _, f := range fields.Fields { + c := newCursor(r.tx, s, f.Name, r.codecs[measurement]) + c.SeekTo(0) + r.cursors = append(r.cursors, c) + } + } + sort.Sort(cursors(r.cursors)) + + return nil +} + +// Next returns whether any data remains to be read. It must be called before +// the next call to Read(). +func (r *Reader) Next() bool { + r.valuePos = 0 +OUTER: + for { + if r.currCursor >= len(r.cursors) { + // All cursors drained. No more data remains. + return false + } + + cc := r.cursors[r.currCursor] + r.keyBuf = tsm1.SeriesFieldKey(cc.series, cc.field) + + for { + k, v := cc.Next() + if k == -1 { + // Go to next cursor and try again. + r.currCursor++ + if r.valuePos == 0 { + // The previous cursor had no data. Instead of returning + // just go immediately to the next cursor. + continue OUTER + } + // There is some data available. Indicate that it should be read. + return true + } + + if f, ok := v.(float64); ok { + if math.IsInf(f, 0) { + r.stats.AddPointsRead(1) + r.stats.IncrInf() + continue + } + + if math.IsNaN(f) { + r.stats.AddPointsRead(1) + r.stats.IncrNaN() + continue + } + } + + r.values[r.valuePos] = tsm1.NewValue(k, v) + r.valuePos++ + + if r.valuePos >= len(r.values) { + return true + } + } + } +} + +// Read returns the next chunk of data in the shard, converted to tsm1 values. Data is +// emitted completely for every field, in every series, before the next field is processed. +// Data from Read() adheres to the requirements for writing to tsm1 shards +func (r *Reader) Read() (string, []tsm1.Value, error) { + return r.keyBuf, r.values[:r.valuePos], nil +} + +// Close closes the reader. +func (r *Reader) Close() error { + r.tx.Rollback() + return r.db.Close() +} + +// cursor provides ordered iteration across a series. +type cursor struct { + // Bolt cursor and readahead buffer. + cursor *bolt.Cursor + keyBuf int64 + valBuf interface{} + + series string + field string + dec *tsdb.FieldCodec +} + +// Cursor returns an iterator for a key over a single field. +func newCursor(tx *bolt.Tx, series string, field string, dec *tsdb.FieldCodec) *cursor { + cur := &cursor{ + keyBuf: -2, + series: series, + field: field, + dec: dec, + } + + // Retrieve series bucket. + b := tx.Bucket([]byte(series)) + if b != nil { + cur.cursor = b.Cursor() + } + + return cur +} + +// Seek moves the cursor to a position. +func (c *cursor) SeekTo(seek int64) { + var seekBytes [8]byte + binary.BigEndian.PutUint64(seekBytes[:], uint64(seek)) + k, v := c.cursor.Seek(seekBytes[:]) + c.keyBuf, c.valBuf = tsdb.DecodeKeyValue(c.field, c.dec, k, v) +} + +// Next returns the next key/value pair from the cursor. +func (c *cursor) Next() (key int64, value interface{}) { + for { + k, v := func() (int64, interface{}) { + if c.keyBuf != -2 { + k, v := c.keyBuf, c.valBuf + c.keyBuf = -2 + return k, v + } + + k, v := c.cursor.Next() + if k == nil { + return -1, nil + } + return tsdb.DecodeKeyValue(c.field, c.dec, k, v) + }() + + if k != -1 && v == nil { + // There is a point in the series at the next timestamp, + // but not for this cursor's field. Go to the next point. + continue + } + return k, v + } +} + +// Sort b1 cursors in correct order for writing to TSM files. + +type cursors []*cursor + +func (a cursors) Len() int { return len(a) } +func (a cursors) Swap(i, j int) { a[i], a[j] = a[j], a[i] } +func (a cursors) Less(i, j int) bool { + if a[i].series == a[j].series { + return a[i].field < a[j].field + } + return a[i].series < a[j].series +} diff --git a/vendor/github.com/influxdata/influxdb/cmd/influx_tsm/bz1/reader.go b/vendor/github.com/influxdata/influxdb/cmd/influx_tsm/bz1/reader.go new file mode 100644 index 000000000..eb65c29be --- /dev/null +++ b/vendor/github.com/influxdata/influxdb/cmd/influx_tsm/bz1/reader.go @@ -0,0 +1,370 @@ +package bz1 // import "github.com/influxdata/influxdb/cmd/influx_tsm/bz1" + +import ( + "bytes" + "encoding/binary" + "encoding/json" + "fmt" + "math" + "sort" + "time" + + "github.com/boltdb/bolt" + "github.com/golang/snappy" + "github.com/influxdata/influxdb/cmd/influx_tsm/stats" + "github.com/influxdata/influxdb/cmd/influx_tsm/tsdb" + "github.com/influxdata/influxdb/tsdb/engine/tsm1" +) + +// DefaultChunkSize is the size of chunks read from the bz1 shard +const DefaultChunkSize = 1000 + +// Reader is used to read all data from a bz1 shard. +type Reader struct { + path string + db *bolt.DB + tx *bolt.Tx + + cursors []*cursor + currCursor int + + keyBuf string + values []tsm1.Value + valuePos int + + fields map[string]*tsdb.MeasurementFields + codecs map[string]*tsdb.FieldCodec + + stats *stats.Stats +} + +// NewReader returns a reader for the bz1 shard at path. +func NewReader(path string, stats *stats.Stats, chunkSize int) *Reader { + r := &Reader{ + path: path, + fields: make(map[string]*tsdb.MeasurementFields), + codecs: make(map[string]*tsdb.FieldCodec), + stats: stats, + } + + if chunkSize <= 0 { + chunkSize = DefaultChunkSize + } + + r.values = make([]tsm1.Value, chunkSize) + + return r +} + +// Open opens the reader. +func (r *Reader) Open() error { + // Open underlying storage. + db, err := bolt.Open(r.path, 0666, &bolt.Options{Timeout: 1 * time.Second}) + if err != nil { + return err + } + r.db = db + + seriesSet := make(map[string]bool) + + if err := r.db.View(func(tx *bolt.Tx) error { + var data []byte + + meta := tx.Bucket([]byte("meta")) + if meta == nil { + // No data in this shard. + return nil + } + + pointsBucket := tx.Bucket([]byte("points")) + if pointsBucket == nil { + return nil + } + + if err := pointsBucket.ForEach(func(key, _ []byte) error { + seriesSet[string(key)] = true + return nil + }); err != nil { + return err + } + + buf := meta.Get([]byte("fields")) + if buf == nil { + // No data in this shard. + return nil + } + + data, err = snappy.Decode(nil, buf) + if err != nil { + return err + } + if err := json.Unmarshal(data, &r.fields); err != nil { + return err + } + return nil + }); err != nil { + return err + } + + // Build the codec for each measurement. + for k, v := range r.fields { + r.codecs[k] = tsdb.NewFieldCodec(v.Fields) + } + + r.tx, err = r.db.Begin(false) + if err != nil { + return err + } + + // Create cursor for each field of each series. + for s := range seriesSet { + measurement := tsdb.MeasurementFromSeriesKey(s) + fields := r.fields[measurement] + if fields == nil { + r.stats.IncrFiltered() + continue + } + for _, f := range fields.Fields { + c := newCursor(r.tx, s, f.Name, r.codecs[measurement]) + if c == nil { + continue + } + c.SeekTo(0) + r.cursors = append(r.cursors, c) + } + } + sort.Sort(cursors(r.cursors)) + + return nil +} + +// Next returns whether there is any more data to be read. +func (r *Reader) Next() bool { + r.valuePos = 0 +OUTER: + for { + if r.currCursor >= len(r.cursors) { + // All cursors drained. No more data remains. + return false + } + + cc := r.cursors[r.currCursor] + r.keyBuf = tsm1.SeriesFieldKey(cc.series, cc.field) + + for { + k, v := cc.Next() + if k == -1 { + // Go to next cursor and try again. + r.currCursor++ + if r.valuePos == 0 { + // The previous cursor had no data. Instead of returning + // just go immediately to the next cursor. + continue OUTER + } + // There is some data available. Indicate that it should be read. + return true + } + + if f, ok := v.(float64); ok { + if math.IsInf(f, 0) { + r.stats.AddPointsRead(1) + r.stats.IncrInf() + continue + } + + if math.IsNaN(f) { + r.stats.AddPointsRead(1) + r.stats.IncrNaN() + continue + } + } + + r.values[r.valuePos] = tsm1.NewValue(k, v) + r.valuePos++ + + if r.valuePos >= len(r.values) { + return true + } + } + } +} + +// Read returns the next chunk of data in the shard, converted to tsm1 values. Data is +// emitted completely for every field, in every series, before the next field is processed. +// Data from Read() adheres to the requirements for writing to tsm1 shards +func (r *Reader) Read() (string, []tsm1.Value, error) { + return r.keyBuf, r.values[:r.valuePos], nil +} + +// Close closes the reader. +func (r *Reader) Close() error { + r.tx.Rollback() + return r.db.Close() +} + +// cursor provides ordered iteration across a series. +type cursor struct { + cursor *bolt.Cursor + buf []byte // uncompressed buffer + off int // buffer offset + fieldIndices []int + index int + + series string + field string + dec *tsdb.FieldCodec + + keyBuf int64 + valBuf interface{} +} + +// newCursor returns an instance of a bz1 cursor. +func newCursor(tx *bolt.Tx, series string, field string, dec *tsdb.FieldCodec) *cursor { + // Retrieve points bucket. Ignore if there is no bucket. + b := tx.Bucket([]byte("points")).Bucket([]byte(series)) + if b == nil { + return nil + } + + return &cursor{ + cursor: b.Cursor(), + series: series, + field: field, + dec: dec, + keyBuf: -2, + } +} + +// Seek moves the cursor to a position. +func (c *cursor) SeekTo(seek int64) { + var seekBytes [8]byte + binary.BigEndian.PutUint64(seekBytes[:], uint64(seek)) + + // Move cursor to appropriate block and set to buffer. + k, v := c.cursor.Seek(seekBytes[:]) + if v == nil { // get the last block, it might have this time + _, v = c.cursor.Last() + } else if seek < int64(binary.BigEndian.Uint64(k)) { // the seek key is less than this block, go back one and check + _, v = c.cursor.Prev() + + // if the previous block max time is less than the seek value, reset to where we were originally + if v == nil || seek > int64(binary.BigEndian.Uint64(v[0:8])) { + _, v = c.cursor.Seek(seekBytes[:]) + } + } + c.setBuf(v) + + // Read current block up to seek position. + c.seekBuf(seekBytes[:]) + + // Return current entry. + c.keyBuf, c.valBuf = c.read() +} + +// seekBuf moves the cursor to a position within the current buffer. +func (c *cursor) seekBuf(seek []byte) (key, value []byte) { + for { + // Slice off the current entry. + buf := c.buf[c.off:] + + // Exit if current entry's timestamp is on or after the seek. + if len(buf) == 0 { + return + } + + if bytes.Compare(buf[0:8], seek) != -1 { + return + } + + c.off += entryHeaderSize + entryDataSize(buf) + } +} + +// Next returns the next key/value pair from the cursor. If there are no values +// remaining, -1 is returned. +func (c *cursor) Next() (int64, interface{}) { + for { + k, v := func() (int64, interface{}) { + if c.keyBuf != -2 { + k, v := c.keyBuf, c.valBuf + c.keyBuf = -2 + return k, v + } + + // Ignore if there is no buffer. + if len(c.buf) == 0 { + return -1, nil + } + + // Move forward to next entry. + c.off += entryHeaderSize + entryDataSize(c.buf[c.off:]) + + // If no items left then read first item from next block. + if c.off >= len(c.buf) { + _, v := c.cursor.Next() + c.setBuf(v) + } + + return c.read() + }() + + if k != -1 && v == nil { + // There is a point in the series at the next timestamp, + // but not for this cursor's field. Go to the next point. + continue + } + return k, v + } +} + +// setBuf saves a compressed block to the buffer. +func (c *cursor) setBuf(block []byte) { + // Clear if the block is empty. + if len(block) == 0 { + c.buf, c.off, c.fieldIndices, c.index = c.buf[0:0], 0, c.fieldIndices[0:0], 0 + return + } + + // Otherwise decode block into buffer. + // Skip over the first 8 bytes since they are the max timestamp. + buf, err := snappy.Decode(nil, block[8:]) + if err != nil { + c.buf = c.buf[0:0] + fmt.Printf("block decode error: %s\n", err) + } + + c.buf, c.off = buf, 0 +} + +// read reads the current key and value from the current block. +func (c *cursor) read() (key int64, value interface{}) { + // Return nil if the offset is at the end of the buffer. + if c.off >= len(c.buf) { + return -1, nil + } + + // Otherwise read the current entry. + buf := c.buf[c.off:] + dataSize := entryDataSize(buf) + + return tsdb.DecodeKeyValue(c.field, c.dec, buf[0:8], buf[entryHeaderSize:entryHeaderSize+dataSize]) +} + +// Sort bz1 cursors in correct order for writing to TSM files. + +type cursors []*cursor + +func (a cursors) Len() int { return len(a) } +func (a cursors) Swap(i, j int) { a[i], a[j] = a[j], a[i] } +func (a cursors) Less(i, j int) bool { + if a[i].series == a[j].series { + return a[i].field < a[j].field + } + return a[i].series < a[j].series +} + +// entryHeaderSize is the number of bytes required for the header. +const entryHeaderSize = 8 + 4 + +// entryDataSize returns the size of an entry's data field, in bytes. +func entryDataSize(v []byte) int { return int(binary.BigEndian.Uint32(v[8:12])) } diff --git a/vendor/github.com/influxdata/influxdb/cmd/influx_tsm/converter.go b/vendor/github.com/influxdata/influxdb/cmd/influx_tsm/converter.go new file mode 100644 index 000000000..3469af62b --- /dev/null +++ b/vendor/github.com/influxdata/influxdb/cmd/influx_tsm/converter.go @@ -0,0 +1,118 @@ +package main + +import ( + "fmt" + "os" + "path/filepath" + + "github.com/influxdata/influxdb/cmd/influx_tsm/stats" + "github.com/influxdata/influxdb/tsdb/engine/tsm1" +) + +const ( + maxBlocksPerKey = 65535 +) + +// KeyIterator is used to iterate over b* keys for conversion to tsm keys +type KeyIterator interface { + Next() bool + Read() (string, []tsm1.Value, error) +} + +// Converter encapsulates the logic for converting b*1 shards to tsm1 shards. +type Converter struct { + path string + maxTSMFileSize uint32 + sequence int + stats *stats.Stats +} + +// NewConverter returns a new instance of the Converter. +func NewConverter(path string, sz uint32, stats *stats.Stats) *Converter { + return &Converter{ + path: path, + maxTSMFileSize: sz, + stats: stats, + } +} + +// Process writes the data provided by iter to a tsm1 shard. +func (c *Converter) Process(iter KeyIterator) error { + // Ensure the tsm1 directory exists. + if err := os.MkdirAll(c.path, 0777); err != nil { + return err + } + + // Iterate until no more data remains. + var w tsm1.TSMWriter + var keyCount map[string]int + + for iter.Next() { + k, v, err := iter.Read() + if err != nil { + return err + } + + if w == nil { + w, err = c.nextTSMWriter() + if err != nil { + return err + } + keyCount = map[string]int{} + } + if err := w.Write(k, v); err != nil { + return err + } + keyCount[k]++ + + c.stats.AddPointsRead(len(v)) + c.stats.AddPointsWritten(len(v)) + + // If we have a max file size configured and we're over it, start a new TSM file. + if w.Size() > c.maxTSMFileSize || keyCount[k] == maxBlocksPerKey { + if err := w.WriteIndex(); err != nil && err != tsm1.ErrNoValues { + return err + } + + c.stats.AddTSMBytes(w.Size()) + + if err := w.Close(); err != nil { + return err + } + w = nil + } + } + + if w != nil { + if err := w.WriteIndex(); err != nil && err != tsm1.ErrNoValues { + return err + } + c.stats.AddTSMBytes(w.Size()) + + if err := w.Close(); err != nil { + return err + } + } + + return nil +} + +// nextTSMWriter returns the next TSMWriter for the Converter. +func (c *Converter) nextTSMWriter() (tsm1.TSMWriter, error) { + c.sequence++ + fileName := filepath.Join(c.path, fmt.Sprintf("%09d-%09d.%s", 1, c.sequence, tsm1.TSMFileExtension)) + + fd, err := os.OpenFile(fileName, os.O_CREATE|os.O_RDWR, 0666) + if err != nil { + return nil, err + } + + // Create the writer for the new TSM file. + w, err := tsm1.NewTSMWriter(fd) + if err != nil { + return nil, err + } + + c.stats.IncrTSMFileCount() + return w, nil +} diff --git a/vendor/github.com/influxdata/influxdb/cmd/influx_tsm/main.go b/vendor/github.com/influxdata/influxdb/cmd/influx_tsm/main.go new file mode 100644 index 000000000..ebe884acb --- /dev/null +++ b/vendor/github.com/influxdata/influxdb/cmd/influx_tsm/main.go @@ -0,0 +1,413 @@ +package main + +import ( + "bufio" + "errors" + "flag" + "fmt" + "io" + "io/ioutil" + "log" + "os" + "path/filepath" + "runtime" + "runtime/pprof" + "sort" + "strings" + "text/tabwriter" + "time" + + "net/http" + _ "net/http/pprof" + + "github.com/influxdata/influxdb/cmd/influx_tsm/b1" + "github.com/influxdata/influxdb/cmd/influx_tsm/bz1" + "github.com/influxdata/influxdb/cmd/influx_tsm/tsdb" +) + +// ShardReader reads b* shards and converts to tsm shards +type ShardReader interface { + KeyIterator + Open() error + Close() error +} + +const ( + tsmExt = "tsm" +) + +var description = ` +Convert a database from b1 or bz1 format to tsm1 format. + +This tool will backup the directories before conversion (if not disabled). +The backed-up files must be removed manually, generally after starting up the +node again to make sure all of data has been converted correctly. + +To restore a backup: + Shut down the node, remove the converted directory, and + copy the backed-up directory to the original location.` + +type options struct { + DataPath string + BackupPath string + DBs []string + DebugAddr string + TSMSize uint64 + Parallel bool + SkipBackup bool + UpdateInterval time.Duration + Yes bool + CpuFile string +} + +func (o *options) Parse() error { + fs := flag.NewFlagSet(os.Args[0], flag.ExitOnError) + + var dbs string + + fs.StringVar(&dbs, "dbs", "", "Comma-delimited list of databases to convert. Default is to convert all databases.") + fs.Uint64Var(&opts.TSMSize, "sz", maxTSMSz, "Maximum size of individual TSM files.") + fs.BoolVar(&opts.Parallel, "parallel", false, "Perform parallel conversion. (up to GOMAXPROCS shards at once)") + fs.BoolVar(&opts.SkipBackup, "nobackup", false, "Disable database backups. Not recommended.") + fs.StringVar(&opts.BackupPath, "backup", "", "The location to backup up the current databases. Must not be within the data directory.") + fs.StringVar(&opts.DebugAddr, "debug", "", "If set, http debugging endpoints will be enabled on the given address") + fs.DurationVar(&opts.UpdateInterval, "interval", 5*time.Second, "How often status updates are printed.") + fs.BoolVar(&opts.Yes, "y", false, "Don't ask, just convert") + fs.StringVar(&opts.CpuFile, "profile", "", "CPU Profile location") + fs.Usage = func() { + fmt.Fprintf(os.Stderr, "Usage: %v [options] \n", os.Args[0]) + fmt.Fprintf(os.Stderr, "%v\n\nOptions:\n", description) + fs.PrintDefaults() + fmt.Fprintf(os.Stderr, "\n") + } + + if err := fs.Parse(os.Args[1:]); err != nil { + return err + } + + if len(fs.Args()) < 1 { + return errors.New("no data directory specified") + } + var err error + if o.DataPath, err = filepath.Abs(fs.Args()[0]); err != nil { + return err + } + if o.DataPath, err = filepath.EvalSymlinks(filepath.Clean(o.DataPath)); err != nil { + return err + } + + if o.TSMSize > maxTSMSz { + return fmt.Errorf("bad TSM file size, maximum TSM file size is %d", maxTSMSz) + } + + // Check if specific databases were requested. + o.DBs = strings.Split(dbs, ",") + if len(o.DBs) == 1 && o.DBs[0] == "" { + o.DBs = nil + } + + if !o.SkipBackup { + if o.BackupPath == "" { + return errors.New("either -nobackup or -backup DIR must be set") + } + if o.BackupPath, err = filepath.Abs(o.BackupPath); err != nil { + return err + } + if o.BackupPath, err = filepath.EvalSymlinks(filepath.Clean(o.BackupPath)); err != nil { + if os.IsNotExist(err) { + return errors.New("backup directory must already exist") + } + return err + } + + if strings.HasPrefix(o.BackupPath, o.DataPath) { + fmt.Println(o.BackupPath, o.DataPath) + return errors.New("backup directory cannot be contained within data directory") + } + } + + if o.DebugAddr != "" { + log.Printf("Starting debugging server on http://%v", o.DebugAddr) + go func() { + log.Fatal(http.ListenAndServe(o.DebugAddr, nil)) + }() + } + + return nil +} + +var opts options + +const maxTSMSz uint64 = 2 * 1024 * 1024 * 1024 + +func init() { + log.SetOutput(os.Stderr) + log.SetFlags(log.Ldate | log.Ltime | log.Lmicroseconds) +} + +func main() { + if err := opts.Parse(); err != nil { + log.Fatal(err) + } + + // Determine the list of databases + dbs, err := ioutil.ReadDir(opts.DataPath) + if err != nil { + log.Fatalf("failed to access data directory at %v: %v\n", opts.DataPath, err) + } + fmt.Println() // Cleanly separate output from start of program. + + if opts.Parallel { + if !isEnvSet("GOMAXPROCS") { + // Only modify GOMAXPROCS if it wasn't set in the environment + // This means 'GOMAXPROCS=1 influx_tsm -parallel' will not actually + // run in parallel + runtime.GOMAXPROCS(runtime.NumCPU()) + } + } + + var badUser string + if opts.SkipBackup { + badUser = "(NOT RECOMMENDED)" + } + + // Dump summary of what is about to happen. + fmt.Println("b1 and bz1 shard conversion.") + fmt.Println("-----------------------------------") + fmt.Println("Data directory is: ", opts.DataPath) + if !opts.SkipBackup { + fmt.Println("Backup directory is: ", opts.BackupPath) + } + fmt.Println("Databases specified: ", allDBs(opts.DBs)) + fmt.Println("Database backups enabled: ", yesno(!opts.SkipBackup), badUser) + fmt.Printf("Parallel mode enabled (GOMAXPROCS): %s (%d)\n", yesno(opts.Parallel), runtime.GOMAXPROCS(0)) + fmt.Println() + + shards := collectShards(dbs) + + // Anything to convert? + fmt.Printf("\nFound %d shards that will be converted.\n", len(shards)) + if len(shards) == 0 { + fmt.Println("Nothing to do.") + return + } + + // Display list of convertible shards. + fmt.Println() + w := new(tabwriter.Writer) + w.Init(os.Stdout, 0, 8, 1, '\t', 0) + fmt.Fprintln(w, "Database\tRetention\tPath\tEngine\tSize") + for _, si := range shards { + fmt.Fprintf(w, "%v\t%v\t%v\t%v\t%d\n", si.Database, si.RetentionPolicy, si.FullPath(opts.DataPath), si.FormatAsString(), si.Size) + } + w.Flush() + + if !opts.Yes { + // Get confirmation from user. + fmt.Printf("\nThese shards will be converted. Proceed? y/N: ") + liner := bufio.NewReader(os.Stdin) + yn, err := liner.ReadString('\n') + if err != nil { + log.Fatalf("failed to read response: %v", err) + } + yn = strings.TrimRight(strings.ToLower(yn), "\n") + if yn != "y" { + log.Fatal("Conversion aborted.") + } + } + fmt.Println("Conversion starting....") + + if opts.CpuFile != "" { + f, err := os.Create(opts.CpuFile) + if err != nil { + log.Fatal(err) + } + if err = pprof.StartCPUProfile(f); err != nil { + log.Fatal(err) + } + defer pprof.StopCPUProfile() + } + + tr := newTracker(shards, opts) + + if err := tr.Run(); err != nil { + log.Fatalf("Error occurred preventing completion: %v\n", err) + } + + tr.PrintStats() +} + +func collectShards(dbs []os.FileInfo) tsdb.ShardInfos { + // Get the list of shards for conversion. + var shards tsdb.ShardInfos + for _, db := range dbs { + d := tsdb.NewDatabase(filepath.Join(opts.DataPath, db.Name())) + shs, err := d.Shards() + if err != nil { + log.Fatalf("Failed to access shards for database %v: %v\n", d.Name(), err) + } + shards = append(shards, shs...) + } + + sort.Sort(shards) + shards = shards.FilterFormat(tsdb.TSM1) + if len(dbs) > 0 { + shards = shards.ExclusiveDatabases(opts.DBs) + } + + return shards +} + +// backupDatabase backs up the database named db +func backupDatabase(db string) error { + copyFile := func(path string, info os.FileInfo, err error) error { + // Strip the DataPath from the path and replace with BackupPath. + toPath := strings.Replace(path, opts.DataPath, opts.BackupPath, 1) + + if info.IsDir() { + return os.MkdirAll(toPath, info.Mode()) + } + + in, err := os.Open(path) + if err != nil { + return err + } + defer in.Close() + + srcInfo, err := os.Stat(path) + if err != nil { + return err + } + + out, err := os.OpenFile(toPath, os.O_CREATE|os.O_WRONLY, info.Mode()) + if err != nil { + return err + } + defer out.Close() + + dstInfo, err := os.Stat(toPath) + if err != nil { + return err + } + + if dstInfo.Size() == srcInfo.Size() { + log.Printf("Backup file already found for %v with correct size, skipping.", path) + return nil + } + + if dstInfo.Size() > srcInfo.Size() { + log.Printf("Invalid backup file found for %v, replacing with good copy.", path) + if err := out.Truncate(0); err != nil { + return err + } + if _, err := out.Seek(0, os.SEEK_SET); err != nil { + return err + } + } + + if dstInfo.Size() > 0 { + log.Printf("Resuming backup of file %v, starting at %v bytes", path, dstInfo.Size()) + } + + off, err := out.Seek(0, os.SEEK_END) + if err != nil { + return err + } + if _, err := in.Seek(off, os.SEEK_SET); err != nil { + return err + } + + log.Printf("Backing up file %v", path) + + _, err = io.Copy(out, in) + + return err + } + + return filepath.Walk(filepath.Join(opts.DataPath, db), copyFile) +} + +// convertShard converts the shard in-place. +func convertShard(si *tsdb.ShardInfo, tr *tracker) error { + src := si.FullPath(opts.DataPath) + dst := fmt.Sprintf("%v.%v", src, tsmExt) + + var reader ShardReader + switch si.Format { + case tsdb.BZ1: + reader = bz1.NewReader(src, &tr.Stats, 0) + case tsdb.B1: + reader = b1.NewReader(src, &tr.Stats, 0) + default: + return fmt.Errorf("Unsupported shard format: %v", si.FormatAsString()) + } + + // Open the shard, and create a converter. + if err := reader.Open(); err != nil { + return fmt.Errorf("Failed to open %v for conversion: %v", src, err) + } + defer reader.Close() + converter := NewConverter(dst, uint32(opts.TSMSize), &tr.Stats) + + // Perform the conversion. + if err := converter.Process(reader); err != nil { + return fmt.Errorf("Conversion of %v failed: %v", src, err) + } + + // Delete source shard, and rename new tsm1 shard. + if err := reader.Close(); err != nil { + return fmt.Errorf("Conversion of %v failed due to close: %v", src, err) + } + + if err := os.RemoveAll(si.FullPath(opts.DataPath)); err != nil { + return fmt.Errorf("Deletion of %v failed: %v", src, err) + } + if err := os.Rename(dst, src); err != nil { + return fmt.Errorf("Rename of %v to %v failed: %v", dst, src, err) + } + + return nil +} + +// ParallelGroup allows the maximum parrallelism of a set of operations to be controlled. +type ParallelGroup chan struct{} + +// NewParallelGroup returns a group which allows n operations to run in parallel. A value of 0 +// means no operations will ever run. +func NewParallelGroup(n int) ParallelGroup { + return make(chan struct{}, n) +} + +// Do executes one operation of the ParallelGroup +func (p ParallelGroup) Do(f func()) { + p <- struct{}{} // acquire working slot + defer func() { <-p }() + + f() +} + +// yesno returns "yes" for true, "no" for false. +func yesno(b bool) string { + if b { + return "yes" + } + return "no" +} + +// allDBs returns "all" if all databases are requested for conversion. +func allDBs(dbs []string) string { + if dbs == nil { + return "all" + } + return fmt.Sprintf("%v", dbs) +} + +// isEnvSet checks to see if a variable was set in the environment +func isEnvSet(name string) bool { + for _, s := range os.Environ() { + if strings.SplitN(s, "=", 2)[0] == name { + return true + } + } + return false +} diff --git a/vendor/github.com/influxdata/influxdb/cmd/influx_tsm/stats/stats.go b/vendor/github.com/influxdata/influxdb/cmd/influx_tsm/stats/stats.go new file mode 100644 index 000000000..de1270ca2 --- /dev/null +++ b/vendor/github.com/influxdata/influxdb/cmd/influx_tsm/stats/stats.go @@ -0,0 +1,47 @@ +package stats + +import ( + "sync/atomic" + "time" +) + +// Stats are the statistics captured while converting non-TSM shards to TSM +type Stats struct { + NanFiltered uint64 + InfFiltered uint64 + FieldsFiltered uint64 + PointsWritten uint64 + PointsRead uint64 + TsmFilesCreated uint64 + TsmBytesWritten uint64 + CompletedShards uint64 + TotalTime time.Duration +} + +func (s *Stats) AddPointsRead(n int) { + atomic.AddUint64(&s.PointsRead, uint64(n)) +} + +func (s *Stats) AddPointsWritten(n int) { + atomic.AddUint64(&s.PointsWritten, uint64(n)) +} + +func (s *Stats) AddTSMBytes(n uint32) { + atomic.AddUint64(&s.TsmBytesWritten, uint64(n)) +} + +func (s *Stats) IncrTSMFileCount() { + atomic.AddUint64(&s.TsmFilesCreated, 1) +} + +func (s *Stats) IncrNaN() { + atomic.AddUint64(&s.NanFiltered, 1) +} + +func (s *Stats) IncrInf() { + atomic.AddUint64(&s.InfFiltered, 1) +} + +func (s *Stats) IncrFiltered() { + atomic.AddUint64(&s.FieldsFiltered, 1) +} diff --git a/vendor/github.com/influxdata/influxdb/cmd/influx_tsm/tracker.go b/vendor/github.com/influxdata/influxdb/cmd/influx_tsm/tracker.go new file mode 100644 index 000000000..9048aa764 --- /dev/null +++ b/vendor/github.com/influxdata/influxdb/cmd/influx_tsm/tracker.go @@ -0,0 +1,130 @@ +package main + +import ( + "fmt" + "log" + "runtime" + "sync" + "sync/atomic" + "time" + + "github.com/influxdata/influxdb/cmd/influx_tsm/stats" + "github.com/influxdata/influxdb/cmd/influx_tsm/tsdb" +) + +// tracker will orchestrate and track the conversions of non-TSM shards to TSM +type tracker struct { + Stats stats.Stats + + shards tsdb.ShardInfos + opts options + + pg ParallelGroup + wg sync.WaitGroup +} + +// newTracker will setup and return a clean tracker instance +func newTracker(shards tsdb.ShardInfos, opts options) *tracker { + t := &tracker{ + shards: shards, + opts: opts, + pg: NewParallelGroup(runtime.GOMAXPROCS(0)), + } + + return t +} + +func (t *tracker) Run() error { + conversionStart := time.Now() + + // Backup each directory. + if !opts.SkipBackup { + databases := t.shards.Databases() + fmt.Printf("Backing up %d databases...\n", len(databases)) + t.wg.Add(len(databases)) + for i := range databases { + db := databases[i] + go t.pg.Do(func() { + defer t.wg.Done() + + start := time.Now() + log.Printf("Backup of database '%v' started", db) + err := backupDatabase(db) + if err != nil { + log.Fatalf("Backup of database %v failed: %v\n", db, err) + } + log.Printf("Database %v backed up (%v)\n", db, time.Now().Sub(start)) + }) + } + t.wg.Wait() + } else { + fmt.Println("Database backup disabled.") + } + + t.wg.Add(len(t.shards)) + for i := range t.shards { + si := t.shards[i] + go t.pg.Do(func() { + defer func() { + atomic.AddUint64(&t.Stats.CompletedShards, 1) + t.wg.Done() + }() + + start := time.Now() + log.Printf("Starting conversion of shard: %v", si.FullPath(opts.DataPath)) + if err := convertShard(si, t); err != nil { + log.Fatalf("Failed to convert %v: %v\n", si.FullPath(opts.DataPath), err) + } + log.Printf("Conversion of %v successful (%v)\n", si.FullPath(opts.DataPath), time.Since(start)) + }) + } + + done := make(chan struct{}) + go func() { + t.wg.Wait() + close(done) + }() + +WAIT_LOOP: + for { + select { + case <-done: + break WAIT_LOOP + case <-time.After(opts.UpdateInterval): + t.StatusUpdate() + } + } + + t.Stats.TotalTime = time.Since(conversionStart) + + return nil +} + +func (t *tracker) StatusUpdate() { + shardCount := atomic.LoadUint64(&t.Stats.CompletedShards) + pointCount := atomic.LoadUint64(&t.Stats.PointsRead) + pointWritten := atomic.LoadUint64(&t.Stats.PointsWritten) + + log.Printf("Still Working: Completed Shards: %d/%d Points read/written: %d/%d", shardCount, len(t.shards), pointCount, pointWritten) +} + +func (t *tracker) PrintStats() { + preSize := t.shards.Size() + postSize := int64(t.Stats.TsmBytesWritten) + + fmt.Printf("\nSummary statistics\n========================================\n") + fmt.Printf("Databases converted: %d\n", len(t.shards.Databases())) + fmt.Printf("Shards converted: %d\n", len(t.shards)) + fmt.Printf("TSM files created: %d\n", t.Stats.TsmFilesCreated) + fmt.Printf("Points read: %d\n", t.Stats.PointsRead) + fmt.Printf("Points written: %d\n", t.Stats.PointsWritten) + fmt.Printf("NaN filtered: %d\n", t.Stats.NanFiltered) + fmt.Printf("Inf filtered: %d\n", t.Stats.InfFiltered) + fmt.Printf("Points without fields filtered: %d\n", t.Stats.FieldsFiltered) + fmt.Printf("Disk usage pre-conversion (bytes): %d\n", preSize) + fmt.Printf("Disk usage post-conversion (bytes): %d\n", postSize) + fmt.Printf("Reduction factor: %d%%\n", 100*(preSize-postSize)/preSize) + fmt.Printf("Bytes per TSM point: %.2f\n", float64(postSize)/float64(t.Stats.PointsWritten)) + fmt.Printf("Total conversion time: %v\n", t.Stats.TotalTime) + fmt.Println() +} diff --git a/vendor/github.com/influxdata/influxdb/cmd/influx_tsm/tsdb/codec.go b/vendor/github.com/influxdata/influxdb/cmd/influx_tsm/tsdb/codec.go new file mode 100644 index 000000000..4c3a7b614 --- /dev/null +++ b/vendor/github.com/influxdata/influxdb/cmd/influx_tsm/tsdb/codec.go @@ -0,0 +1,119 @@ +package tsdb + +import ( + "encoding/binary" + "errors" + "fmt" + "math" +) + +const ( + fieldFloat = 1 + fieldInteger = 2 + fieldBoolean = 3 + fieldString = 4 +) + +var ( + // ErrFieldNotFound is returned when a field cannot be found. + ErrFieldNotFound = errors.New("field not found") + + // ErrFieldUnmappedID is returned when the system is presented, during decode, with a field ID + // there is no mapping for. + ErrFieldUnmappedID = errors.New("field ID not mapped") +) + +// FieldCodec provides encoding and decoding functionality for the fields of a given +// Measurement. +type FieldCodec struct { + fieldsByID map[uint8]*Field + fieldsByName map[string]*Field +} + +// NewFieldCodec returns a FieldCodec for the given Measurement. Must be called with +// a RLock that protects the Measurement. +func NewFieldCodec(fields map[string]*Field) *FieldCodec { + fieldsByID := make(map[uint8]*Field, len(fields)) + fieldsByName := make(map[string]*Field, len(fields)) + for _, f := range fields { + fieldsByID[f.ID] = f + fieldsByName[f.Name] = f + } + return &FieldCodec{fieldsByID: fieldsByID, fieldsByName: fieldsByName} +} + +// FieldIDByName returns the ID for the given field. +func (f *FieldCodec) FieldIDByName(s string) (uint8, error) { + fi := f.fieldsByName[s] + if fi == nil { + return 0, ErrFieldNotFound + } + return fi.ID, nil +} + +// DecodeByID scans a byte slice for a field with the given ID, converts it to its +// expected type, and return that value. +func (f *FieldCodec) DecodeByID(targetID uint8, b []byte) (interface{}, error) { + var value interface{} + for { + if len(b) == 0 { + // No more bytes. + return nil, ErrFieldNotFound + } + + field := f.fieldsByID[b[0]] + if field == nil { + // This can happen, though is very unlikely. If this node receives encoded data, to be written + // to disk, and is queried for that data before its metastore is updated, there will be no field + // mapping for the data during decode. All this can happen because data is encoded by the node + // that first received the write request, not the node that actually writes the data to disk. + // So if this happens, the read must be aborted. + return nil, ErrFieldUnmappedID + } + + switch field.Type { + case fieldFloat: + if field.ID == targetID { + value = math.Float64frombits(binary.BigEndian.Uint64(b[1:9])) + } + b = b[9:] + case fieldInteger: + if field.ID == targetID { + value = int64(binary.BigEndian.Uint64(b[1:9])) + } + b = b[9:] + case fieldBoolean: + if field.ID == targetID { + value = b[1] == 1 + } + b = b[2:] + case fieldString: + length := binary.BigEndian.Uint16(b[1:3]) + if field.ID == targetID { + value = string(b[3 : 3+length]) + } + b = b[3+length:] + default: + panic(fmt.Sprintf("unsupported value type during decode by id: %T", field.Type)) + } + + if value != nil { + return value, nil + } + } +} + +// DecodeByName scans a byte slice for a field with the given name, converts it to its +// expected type, and return that value. +func (f *FieldCodec) DecodeByName(name string, b []byte) (interface{}, error) { + fi := f.FieldByName(name) + if fi == nil { + return 0, ErrFieldNotFound + } + return f.DecodeByID(fi.ID, b) +} + +// FieldByName returns the field by its name. It will return a nil if not found +func (f *FieldCodec) FieldByName(name string) *Field { + return f.fieldsByName[name] +} diff --git a/vendor/github.com/influxdata/influxdb/cmd/influx_tsm/tsdb/database.go b/vendor/github.com/influxdata/influxdb/cmd/influx_tsm/tsdb/database.go new file mode 100644 index 000000000..c276db08a --- /dev/null +++ b/vendor/github.com/influxdata/influxdb/cmd/influx_tsm/tsdb/database.go @@ -0,0 +1,239 @@ +package tsdb // import "github.com/influxdata/influxdb/cmd/influx_tsm/tsdb" + +import ( + "fmt" + "os" + "path" + "path/filepath" + "sort" + "time" + + "github.com/boltdb/bolt" + "github.com/influxdata/influxdb/pkg/slices" +) + +// Flags for differentiating between engines +const ( + B1 = iota + BZ1 + TSM1 +) + +// EngineFormat holds the flag for the engine +type EngineFormat int + +// String returns the string format of the engine. +func (e EngineFormat) String() string { + switch e { + case TSM1: + return "tsm1" + case B1: + return "b1" + case BZ1: + return "bz1" + default: + panic("unrecognized shard engine format") + } +} + +// ShardInfo is the description of a shard on disk. +type ShardInfo struct { + Database string + RetentionPolicy string + Path string + Format EngineFormat + Size int64 +} + +// FormatAsString returns the format of the shard as a string. +func (s *ShardInfo) FormatAsString() string { + return s.Format.String() +} + +// FullPath returns the full path to the shard, given the data directory root. +func (s *ShardInfo) FullPath(dataPath string) string { + return filepath.Join(dataPath, s.Database, s.RetentionPolicy, s.Path) +} + +// ShardInfos is an array of ShardInfo +type ShardInfos []*ShardInfo + +func (s ShardInfos) Len() int { return len(s) } +func (s ShardInfos) Swap(i, j int) { s[i], s[j] = s[j], s[i] } +func (s ShardInfos) Less(i, j int) bool { + if s[i].Database == s[j].Database { + if s[i].RetentionPolicy == s[j].RetentionPolicy { + return s[i].Path < s[i].Path + } + + return s[i].RetentionPolicy < s[j].RetentionPolicy + } + + return s[i].Database < s[j].Database +} + +// Databases returns the sorted unique set of databases for the shards. +func (s ShardInfos) Databases() []string { + dbm := make(map[string]bool) + for _, ss := range s { + dbm[ss.Database] = true + } + + var dbs []string + for k := range dbm { + dbs = append(dbs, k) + } + sort.Strings(dbs) + return dbs +} + +// FilterFormat returns a copy of the ShardInfos, with shards of the given +// format removed. +func (s ShardInfos) FilterFormat(fmt EngineFormat) ShardInfos { + var a ShardInfos + for _, si := range s { + if si.Format != fmt { + a = append(a, si) + } + } + return a +} + +// Size returns the space on disk consumed by the shards. +func (s ShardInfos) Size() int64 { + var sz int64 + for _, si := range s { + sz += si.Size + } + return sz +} + +// ExclusiveDatabases returns a copy of the ShardInfo, with shards associated +// with the given databases present. If the given set is empty, all databases +// are returned. +func (s ShardInfos) ExclusiveDatabases(exc []string) ShardInfos { + var a ShardInfos + + // Empty set? Return everything. + if len(exc) == 0 { + a = make(ShardInfos, len(s)) + copy(a, s) + return a + } + + for _, si := range s { + if slices.Exists(exc, si.Database) { + a = append(a, si) + } + } + return a +} + +// Database represents an entire database on disk. +type Database struct { + path string +} + +// NewDatabase creates a database instance using data at path. +func NewDatabase(path string) *Database { + return &Database{path: path} +} + +// Name returns the name of the database. +func (d *Database) Name() string { + return path.Base(d.path) +} + +// Path returns the path to the database. +func (d *Database) Path() string { + return d.path +} + +// Shards returns information for every shard in the database. +func (d *Database) Shards() ([]*ShardInfo, error) { + fd, err := os.Open(d.path) + if err != nil { + return nil, err + } + + // Get each retention policy. + rps, err := fd.Readdirnames(-1) + if err != nil { + return nil, err + } + + // Process each retention policy. + var shardInfos []*ShardInfo + for _, rp := range rps { + rpfd, err := os.Open(filepath.Join(d.path, rp)) + if err != nil { + return nil, err + } + + // Process each shard + shards, err := rpfd.Readdirnames(-1) + for _, sh := range shards { + fmt, sz, err := shardFormat(filepath.Join(d.path, rp, sh)) + if err != nil { + return nil, err + } + + si := &ShardInfo{ + Database: d.Name(), + RetentionPolicy: path.Base(rp), + Path: sh, + Format: fmt, + Size: sz, + } + shardInfos = append(shardInfos, si) + } + } + + sort.Sort(ShardInfos(shardInfos)) + return shardInfos, nil +} + +// shardFormat returns the format and size on disk of the shard at path. +func shardFormat(path string) (EngineFormat, int64, error) { + // If it's a directory then it's a tsm1 engine + fi, err := os.Stat(path) + if err != nil { + return 0, 0, err + } + if fi.Mode().IsDir() { + return TSM1, fi.Size(), nil + } + + // It must be a BoltDB-based engine. + db, err := bolt.Open(path, 0666, &bolt.Options{Timeout: 1 * time.Second}) + if err != nil { + return 0, 0, err + } + defer db.Close() + + var format EngineFormat + err = db.View(func(tx *bolt.Tx) error { + // Retrieve the meta bucket. + b := tx.Bucket([]byte("meta")) + + // If no format is specified then it must be an original b1 database. + if b == nil { + format = B1 + return nil + } + + // There is an actual format indicator. + switch f := string(b.Get([]byte("format"))); f { + case "b1", "v1": + format = B1 + case "bz1": + format = BZ1 + default: + return fmt.Errorf("unrecognized engine format: %s", f) + } + + return nil + }) + + return format, fi.Size(), err +} diff --git a/vendor/github.com/influxdata/influxdb/cmd/influx_tsm/tsdb/internal/meta.pb.go b/vendor/github.com/influxdata/influxdb/cmd/influx_tsm/tsdb/internal/meta.pb.go new file mode 100644 index 000000000..c580f4dba --- /dev/null +++ b/vendor/github.com/influxdata/influxdb/cmd/influx_tsm/tsdb/internal/meta.pb.go @@ -0,0 +1,122 @@ +// Code generated by protoc-gen-gogo. +// source: internal/meta.proto +// DO NOT EDIT! + +/* +Package internal is a generated protocol buffer package. + +It is generated from these files: + internal/meta.proto + +It has these top-level messages: + Series + Tag + MeasurementFields + Field +*/ +package internal + +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 + +type Series struct { + Key *string `protobuf:"bytes,1,req,name=Key" json:"Key,omitempty"` + Tags []*Tag `protobuf:"bytes,2,rep,name=Tags" json:"Tags,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *Series) Reset() { *m = Series{} } +func (m *Series) String() string { return proto.CompactTextString(m) } +func (*Series) ProtoMessage() {} + +func (m *Series) GetKey() string { + if m != nil && m.Key != nil { + return *m.Key + } + return "" +} + +func (m *Series) GetTags() []*Tag { + if m != nil { + return m.Tags + } + return nil +} + +type Tag struct { + Key *string `protobuf:"bytes,1,req,name=Key" json:"Key,omitempty"` + Value *string `protobuf:"bytes,2,req,name=Value" json:"Value,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *Tag) Reset() { *m = Tag{} } +func (m *Tag) String() string { return proto.CompactTextString(m) } +func (*Tag) ProtoMessage() {} + +func (m *Tag) GetKey() string { + if m != nil && m.Key != nil { + return *m.Key + } + return "" +} + +func (m *Tag) GetValue() string { + if m != nil && m.Value != nil { + return *m.Value + } + return "" +} + +type MeasurementFields struct { + Fields []*Field `protobuf:"bytes,1,rep,name=Fields" json:"Fields,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *MeasurementFields) Reset() { *m = MeasurementFields{} } +func (m *MeasurementFields) String() string { return proto.CompactTextString(m) } +func (*MeasurementFields) ProtoMessage() {} + +func (m *MeasurementFields) GetFields() []*Field { + if m != nil { + return m.Fields + } + return nil +} + +type Field struct { + ID *int32 `protobuf:"varint,1,req,name=ID" json:"ID,omitempty"` + Name *string `protobuf:"bytes,2,req,name=Name" json:"Name,omitempty"` + Type *int32 `protobuf:"varint,3,req,name=Type" json:"Type,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *Field) Reset() { *m = Field{} } +func (m *Field) String() string { return proto.CompactTextString(m) } +func (*Field) ProtoMessage() {} + +func (m *Field) GetID() int32 { + if m != nil && m.ID != nil { + return *m.ID + } + return 0 +} + +func (m *Field) GetName() string { + if m != nil && m.Name != nil { + return *m.Name + } + return "" +} + +func (m *Field) GetType() int32 { + if m != nil && m.Type != nil { + return *m.Type + } + return 0 +} diff --git a/vendor/github.com/influxdata/influxdb/cmd/influx_tsm/tsdb/types.go b/vendor/github.com/influxdata/influxdb/cmd/influx_tsm/tsdb/types.go new file mode 100644 index 000000000..c0d0010f3 --- /dev/null +++ b/vendor/github.com/influxdata/influxdb/cmd/influx_tsm/tsdb/types.go @@ -0,0 +1,60 @@ +package tsdb + +import ( + "encoding/binary" + "strings" + + "github.com/influxdata/influxdb/cmd/influx_tsm/tsdb/internal" + "github.com/influxdata/influxdb/influxql" + + "github.com/gogo/protobuf/proto" +) + +// Field represents an encoded field. +type Field struct { + ID uint8 `json:"id,omitempty"` + Name string `json:"name,omitempty"` + Type influxql.DataType `json:"type,omitempty"` +} + +// MeasurementFields is a mapping from measurements to its fields. +type MeasurementFields struct { + Fields map[string]*Field `json:"fields"` + Codec *FieldCodec +} + +// UnmarshalBinary decodes the object from a binary format. +func (m *MeasurementFields) UnmarshalBinary(buf []byte) error { + var pb internal.MeasurementFields + if err := proto.Unmarshal(buf, &pb); err != nil { + return err + } + m.Fields = make(map[string]*Field) + for _, f := range pb.Fields { + m.Fields[f.GetName()] = &Field{ID: uint8(f.GetID()), Name: f.GetName(), Type: influxql.DataType(f.GetType())} + } + return nil +} + +// Series represents a series in the shard. +type Series struct { + Key string + Tags map[string]string +} + +// MeasurementFromSeriesKey returns the Measurement name for a given series. +func MeasurementFromSeriesKey(key string) string { + return strings.SplitN(key, ",", 2)[0] +} + +// DecodeKeyValue decodes the key and value from bytes. +func DecodeKeyValue(field string, dec *FieldCodec, k, v []byte) (int64, interface{}) { + // Convert key to a timestamp. + key := int64(binary.BigEndian.Uint64(k[0:8])) + + decValue, err := dec.DecodeByName(field, v) + if err != nil { + return key, nil + } + return key, decValue +} diff --git a/vendor/github.com/influxdata/influxdb/cmd/influxd/backup/backup.go b/vendor/github.com/influxdata/influxdb/cmd/influxd/backup/backup.go new file mode 100644 index 000000000..7fd2a5d19 --- /dev/null +++ b/vendor/github.com/influxdata/influxdb/cmd/influxd/backup/backup.go @@ -0,0 +1,377 @@ +package backup + +import ( + "encoding/binary" + "encoding/json" + "errors" + "flag" + "fmt" + "io" + "io/ioutil" + "log" + "os" + "path/filepath" + "strconv" + "strings" + "time" + + "github.com/influxdata/influxdb/services/snapshotter" + "github.com/influxdata/influxdb/tcp" +) + +const ( + // Suffix is a suffix added to the backup while it's in-process. + Suffix = ".pending" + + // Metafile is the base name given to the metastore backups. + Metafile = "meta" + + // BackupFilePattern is the beginning of the pattern for a backup + // file. They follow the scheme ... + BackupFilePattern = "%s.%s.%05d" +) + +// Command represents the program execution for "influxd backup". +type Command struct { + // The logger passed to the ticker during execution. + Logger *log.Logger + + // Standard input/output, overridden for testing. + Stderr io.Writer + Stdout io.Writer + + host string + path string + database string +} + +// NewCommand returns a new instance of Command with default settings. +func NewCommand() *Command { + return &Command{ + Stderr: os.Stderr, + Stdout: os.Stdout, + } +} + +// Run executes the program. +func (cmd *Command) Run(args ...string) error { + // Set up logger. + cmd.Logger = log.New(cmd.Stderr, "", log.LstdFlags) + + // Parse command line arguments. + retentionPolicy, shardID, since, err := cmd.parseFlags(args) + if err != nil { + return err + } + + // based on the arguments passed in we only backup the minimum + if shardID != "" { + // always backup the metastore + if err := cmd.backupMetastore(); err != nil { + return err + } + err = cmd.backupShard(retentionPolicy, shardID, since) + } else if retentionPolicy != "" { + err = cmd.backupRetentionPolicy(retentionPolicy, since) + } else if cmd.database != "" { + err = cmd.backupDatabase(since) + } else { + err = cmd.backupMetastore() + } + + if err != nil { + cmd.Logger.Printf("backup failed: %v", err) + return err + } + + cmd.Logger.Println("backup complete") + + return nil +} + +// parseFlags parses and validates the command line arguments into a request object. +func (cmd *Command) parseFlags(args []string) (retentionPolicy, shardID string, since time.Time, err error) { + fs := flag.NewFlagSet("", flag.ContinueOnError) + + fs.StringVar(&cmd.host, "host", "localhost:8088", "") + fs.StringVar(&cmd.database, "database", "", "") + fs.StringVar(&retentionPolicy, "retention", "", "") + fs.StringVar(&shardID, "shard", "", "") + var sinceArg string + fs.StringVar(&sinceArg, "since", "", "") + + fs.SetOutput(cmd.Stderr) + fs.Usage = cmd.printUsage + + err = fs.Parse(args) + if err != nil { + return + } + if sinceArg != "" { + since, err = time.Parse(time.RFC3339, sinceArg) + if err != nil { + return + } + } + + // Ensure that only one arg is specified. + if fs.NArg() == 0 { + return "", "", time.Unix(0, 0), errors.New("backup destination path required") + } else if fs.NArg() != 1 { + return "", "", time.Unix(0, 0), errors.New("only one backup path allowed") + } + cmd.path = fs.Arg(0) + + err = os.MkdirAll(cmd.path, 0700) + + return +} + +// backupShard will write a tar archive of the passed in shard with any TSM files that have been +// created since the time passed in +func (cmd *Command) backupShard(retentionPolicy string, shardID string, since time.Time) error { + id, err := strconv.ParseUint(shardID, 10, 64) + if err != nil { + return err + } + + shardArchivePath, err := cmd.nextPath(filepath.Join(cmd.path, fmt.Sprintf(BackupFilePattern, cmd.database, retentionPolicy, id))) + if err != nil { + return err + } + + cmd.Logger.Printf("backing up db=%v rp=%v shard=%v to %s since %s", + cmd.database, retentionPolicy, shardID, shardArchivePath, since) + + req := &snapshotter.Request{ + Type: snapshotter.RequestShardBackup, + Database: cmd.database, + RetentionPolicy: retentionPolicy, + ShardID: id, + Since: since, + } + + // TODO: verify shard backup data + return cmd.downloadAndVerify(req, shardArchivePath, nil) +} + +// backupDatabase will request the database information from the server and then backup the metastore and +// every shard in every retention policy in the database. Each shard will be written to a separate tar. +func (cmd *Command) backupDatabase(since time.Time) error { + cmd.Logger.Printf("backing up db=%s since %s", cmd.database, since) + + req := &snapshotter.Request{ + Type: snapshotter.RequestDatabaseInfo, + Database: cmd.database, + } + + response, err := cmd.requestInfo(req) + if err != nil { + return err + } + + return cmd.backupResponsePaths(response, since) +} + +// backupRetentionPolicy will request the retention policy information from the server and then backup +// the metastore and every shard in the retention policy. Each shard will be written to a separate tar. +func (cmd *Command) backupRetentionPolicy(retentionPolicy string, since time.Time) error { + cmd.Logger.Printf("backing up rp=%s since %s", retentionPolicy, since) + + req := &snapshotter.Request{ + Type: snapshotter.RequestRetentionPolicyInfo, + Database: cmd.database, + RetentionPolicy: retentionPolicy, + } + + response, err := cmd.requestInfo(req) + if err != nil { + return err + } + + return cmd.backupResponsePaths(response, since) +} + +// backupResponsePaths will backup the metastore and all shard paths in the response struct +func (cmd *Command) backupResponsePaths(response *snapshotter.Response, since time.Time) error { + if err := cmd.backupMetastore(); err != nil { + return err + } + + // loop through the returned paths and back up each shard + for _, path := range response.Paths { + rp, id, err := retentionAndShardFromPath(path) + if err != nil { + return err + } + + if err := cmd.backupShard(rp, id, since); err != nil { + return err + } + } + + return nil +} + +// backupMetastore will backup the metastore on the host to the passed in path. Database and retention policy backups +// will force a backup of the metastore as well as requesting a specific shard backup from the command line +func (cmd *Command) backupMetastore() error { + metastoreArchivePath, err := cmd.nextPath(filepath.Join(cmd.path, Metafile)) + if err != nil { + return err + } + + cmd.Logger.Printf("backing up metastore to %s", metastoreArchivePath) + + req := &snapshotter.Request{ + Type: snapshotter.RequestMetastoreBackup, + } + + return cmd.downloadAndVerify(req, metastoreArchivePath, func(file string) error { + binData, err := ioutil.ReadFile(file) + if err != nil { + return err + } + + magic := binary.BigEndian.Uint64(binData[:8]) + if magic != snapshotter.BackupMagicHeader { + cmd.Logger.Println("Invalid metadata blob, ensure the metadata service is running (default port 8088)") + return errors.New("invalid metadata received") + } + + return nil + }) +} + +// nextPath returns the next file to write to. +func (cmd *Command) nextPath(path string) (string, error) { + // Iterate through incremental files until one is available. + for i := 0; ; i++ { + s := fmt.Sprintf(path+".%02d", i) + if _, err := os.Stat(s); os.IsNotExist(err) { + return s, nil + } else if err != nil { + return "", err + } + } +} + +// downloadAndVerify will download either the metastore or shard to a temp file and then +// rename it to a good backup file name after complete +func (cmd *Command) downloadAndVerify(req *snapshotter.Request, path string, validator func(string) error) error { + tmppath := path + Suffix + if err := cmd.download(req, tmppath); err != nil { + return err + } + + if validator != nil { + if err := validator(tmppath); err != nil { + if rmErr := os.Remove(tmppath); rmErr != nil { + cmd.Logger.Printf("Error cleaning up temporary file: %v", rmErr) + } + return err + } + } + + f, err := os.Stat(tmppath) + if err != nil { + return err + } + + // There was nothing downloaded, don't create an empty backup file. + if f.Size() == 0 { + return os.Remove(tmppath) + } + + // Rename temporary file to final path. + if err := os.Rename(tmppath, path); err != nil { + return fmt.Errorf("rename: %s", err) + } + + return nil +} + +// download downloads a snapshot of either the metastore or a shard from a host to a given path. +func (cmd *Command) download(req *snapshotter.Request, path string) error { + // Create local file to write to. + f, err := os.Create(path) + if err != nil { + return fmt.Errorf("open temp file: %s", err) + } + defer f.Close() + + // Connect to snapshotter service. + conn, err := tcp.Dial("tcp", cmd.host, snapshotter.MuxHeader) + if err != nil { + return err + } + defer conn.Close() + + // Write the request + if err := json.NewEncoder(conn).Encode(req); err != nil { + return fmt.Errorf("encode snapshot request: %s", err) + } + + // Read snapshot from the connection + if _, err := io.Copy(f, conn); err != nil { + return fmt.Errorf("copy backup to file: %s", err) + } + + return nil +} + +// requestInfo will request the database or retention policy information from the host +func (cmd *Command) requestInfo(request *snapshotter.Request) (*snapshotter.Response, error) { + // Connect to snapshotter service. + conn, err := tcp.Dial("tcp", cmd.host, snapshotter.MuxHeader) + if err != nil { + return nil, err + } + defer conn.Close() + + // Write the request + if err := json.NewEncoder(conn).Encode(request); err != nil { + return nil, fmt.Errorf("encode snapshot request: %s", err) + } + + // Read the response + var r snapshotter.Response + if err := json.NewDecoder(conn).Decode(&r); err != nil { + return nil, err + } + + return &r, nil +} + +// printUsage prints the usage message to STDERR. +func (cmd *Command) printUsage() { + fmt.Fprintf(cmd.Stdout, `usage: influxd backup [flags] PATH + +Backup downloads a snapshot of a data node and saves it to disk. + +Options: + -host + The host to connect to snapshot. Defaults to 127.0.0.1:8088. + -database + The database to backup. + -retention + Optional. The retention policy to backup. + -shard + Optional. The shard id to backup. If specified, retention is required. + -since <2015-12-24T08:12:23> + Optional. Do an incremental backup since the passed in RFC3339 + formatted time. + +`) +} + +// retentionAndShardFromPath will take the shard relative path and split it into the +// retention policy name and shard ID. The first part of the path should be the database name. +func retentionAndShardFromPath(path string) (retention, shard string, err error) { + a := strings.Split(path, string(filepath.Separator)) + if len(a) != 3 { + return "", "", fmt.Errorf("expected database, retention policy, and shard id in path: %s", path) + } + + return a[1], a[2], nil +} diff --git a/vendor/github.com/influxdata/influxdb/cmd/influxd/help/help.go b/vendor/github.com/influxdata/influxdb/cmd/influxd/help/help.go new file mode 100644 index 000000000..3f6bbfb08 --- /dev/null +++ b/vendor/github.com/influxdata/influxdb/cmd/influxd/help/help.go @@ -0,0 +1,46 @@ +package help + +import ( + "fmt" + "io" + "os" + "strings" +) + +// Command displays help for command-line sub-commands. +type Command struct { + Stdout io.Writer +} + +// NewCommand returns a new instance of Command. +func NewCommand() *Command { + return &Command{ + Stdout: os.Stdout, + } +} + +// Run executes the command. +func (cmd *Command) Run(args ...string) error { + fmt.Fprintln(cmd.Stdout, strings.TrimSpace(usage)) + return nil +} + +const usage = ` +Configure and start an InfluxDB server. + +Usage: + + influxd [[command] [arguments]] + +The commands are: + + backup downloads a snapshot of a data node and saves it to disk + config display the default configuration + restore uses a snapshot of a data node to rebuild a cluster + run run node with existing configuration + version displays the InfluxDB version + +"run" is the default command. + +Use "influxd help [command]" for more information about a command. +` diff --git a/vendor/github.com/influxdata/influxdb/cmd/influxd/main.go b/vendor/github.com/influxdata/influxdb/cmd/influxd/main.go new file mode 100644 index 000000000..eb463f2f2 --- /dev/null +++ b/vendor/github.com/influxdata/influxdb/cmd/influxd/main.go @@ -0,0 +1,203 @@ +package main + +import ( + "flag" + "fmt" + "io" + "log" + "math/rand" + "os" + "os/signal" + "strings" + "syscall" + "time" + + "github.com/influxdata/influxdb/cmd/influxd/backup" + "github.com/influxdata/influxdb/cmd/influxd/help" + "github.com/influxdata/influxdb/cmd/influxd/restore" + "github.com/influxdata/influxdb/cmd/influxd/run" +) + +// These variables are populated via the Go linker. +var ( + version string + commit string + branch string +) + +func init() { + // If commit, branch, or build time are not set, make that clear. + if version == "" { + version = "unknown" + } + if commit == "" { + commit = "unknown" + } + if branch == "" { + branch = "unknown" + } +} + +func main() { + rand.Seed(time.Now().UnixNano()) + + m := NewMain() + if err := m.Run(os.Args[1:]...); err != nil { + fmt.Fprintln(os.Stderr, err) + os.Exit(1) + } +} + +// Main represents the program execution. +type Main struct { + Logger *log.Logger + + Stdin io.Reader + Stdout io.Writer + Stderr io.Writer +} + +// NewMain return a new instance of Main. +func NewMain() *Main { + return &Main{ + Logger: log.New(os.Stderr, "[run] ", log.LstdFlags), + Stdin: os.Stdin, + Stdout: os.Stdout, + Stderr: os.Stderr, + } +} + +// Run determines and runs the command specified by the CLI args. +func (m *Main) Run(args ...string) error { + name, args := ParseCommandName(args) + + // Extract name from args. + switch name { + case "", "run": + cmd := run.NewCommand() + + // Tell the server the build details. + cmd.Version = version + cmd.Commit = commit + cmd.Branch = branch + + if err := cmd.Run(args...); err != nil { + return fmt.Errorf("run: %s", err) + } + + signalCh := make(chan os.Signal, 1) + signal.Notify(signalCh, os.Interrupt, syscall.SIGTERM) + m.Logger.Println("Listening for signals") + + // Block until one of the signals above is received + select { + case <-signalCh: + m.Logger.Println("Signal received, initializing clean shutdown...") + go func() { + cmd.Close() + }() + } + + // Block again until another signal is received, a shutdown timeout elapses, + // or the Command is gracefully closed + m.Logger.Println("Waiting for clean shutdown...") + select { + case <-signalCh: + m.Logger.Println("second signal received, initializing hard shutdown") + case <-time.After(time.Second * 30): + m.Logger.Println("time limit reached, initializing hard shutdown") + case <-cmd.Closed: + m.Logger.Println("server shutdown completed") + } + + // goodbye. + + case "backup": + name := backup.NewCommand() + if err := name.Run(args...); err != nil { + return fmt.Errorf("backup: %s", err) + } + case "restore": + name := restore.NewCommand() + if err := name.Run(args...); err != nil { + return fmt.Errorf("restore: %s", err) + } + case "config": + if err := run.NewPrintConfigCommand().Run(args...); err != nil { + return fmt.Errorf("config: %s", err) + } + case "version": + if err := NewVersionCommand().Run(args...); err != nil { + return fmt.Errorf("version: %s", err) + } + case "help": + if err := help.NewCommand().Run(args...); err != nil { + return fmt.Errorf("help: %s", err) + } + default: + return fmt.Errorf(`unknown command "%s"`+"\n"+`Run 'influxd help' for usage`+"\n\n", name) + } + + return nil +} + +// ParseCommandName extracts the command name and args from the args list. +func ParseCommandName(args []string) (string, []string) { + // Retrieve command name as first argument. + var name string + if len(args) > 0 && !strings.HasPrefix(args[0], "-") { + name = args[0] + } + + // Special case -h immediately following binary name + if len(args) > 0 && args[0] == "-h" { + name = "help" + } + + // If command is "help" and has an argument then rewrite args to use "-h". + if name == "help" && len(args) > 1 { + args[0], args[1] = args[1], "-h" + name = args[0] + } + + // If a named command is specified then return it with its arguments. + if name != "" { + return name, args[1:] + } + return "", args +} + +// VersionCommand represents the command executed by "influxd version". +type VersionCommand struct { + Stdout io.Writer + Stderr io.Writer +} + +// NewVersionCommand return a new instance of VersionCommand. +func NewVersionCommand() *VersionCommand { + return &VersionCommand{ + Stdout: os.Stdout, + Stderr: os.Stderr, + } +} + +// Run prints the current version and commit info. +func (cmd *VersionCommand) Run(args ...string) error { + // Parse flags in case -h is specified. + fs := flag.NewFlagSet("", flag.ContinueOnError) + fs.Usage = func() { fmt.Fprintln(cmd.Stderr, strings.TrimSpace(versionUsage)) } + if err := fs.Parse(args); err != nil { + return err + } + + // Print version info. + fmt.Fprintf(cmd.Stdout, "InfluxDB v%s (git: %s %s)\n", version, branch, commit) + + return nil +} + +var versionUsage = ` +usage: version + + version displays the InfluxDB version, build branch and git commit hash +` diff --git a/vendor/github.com/influxdata/influxdb/cmd/influxd/restore/restore.go b/vendor/github.com/influxdata/influxdb/cmd/influxd/restore/restore.go new file mode 100644 index 000000000..35f071146 --- /dev/null +++ b/vendor/github.com/influxdata/influxdb/cmd/influxd/restore/restore.go @@ -0,0 +1,387 @@ +package restore + +import ( + "archive/tar" + "bytes" + "encoding/binary" + "errors" + "flag" + "fmt" + "io" + "io/ioutil" + "net" + "os" + "path/filepath" + "strconv" + "sync" + + "github.com/influxdata/influxdb/cmd/influxd/backup" + "github.com/influxdata/influxdb/services/meta" + "github.com/influxdata/influxdb/services/snapshotter" +) + +// Command represents the program execution for "influxd restore". +type Command struct { + Stdout io.Writer + Stderr io.Writer + + backupFilesPath string + metadir string + datadir string + database string + retention string + shard string + + // TODO: when the new meta stuff is done this should not be exported or be gone + MetaConfig *meta.Config +} + +// NewCommand returns a new instance of Command with default settings. +func NewCommand() *Command { + return &Command{ + Stdout: os.Stdout, + Stderr: os.Stderr, + MetaConfig: meta.NewConfig(), + } +} + +// Run executes the program. +func (cmd *Command) Run(args ...string) error { + if err := cmd.parseFlags(args); err != nil { + return err + } + + if cmd.metadir != "" { + if err := cmd.unpackMeta(); err != nil { + return err + } + } + + if cmd.shard != "" { + return cmd.unpackShard(cmd.shard) + } else if cmd.retention != "" { + return cmd.unpackRetention() + } else if cmd.datadir != "" { + return cmd.unpackDatabase() + } + return nil +} + +// parseFlags parses and validates the command line arguments. +func (cmd *Command) parseFlags(args []string) error { + fs := flag.NewFlagSet("", flag.ContinueOnError) + fs.StringVar(&cmd.metadir, "metadir", "", "") + fs.StringVar(&cmd.datadir, "datadir", "", "") + fs.StringVar(&cmd.database, "database", "", "") + fs.StringVar(&cmd.retention, "retention", "", "") + fs.StringVar(&cmd.shard, "shard", "", "") + fs.SetOutput(cmd.Stdout) + fs.Usage = cmd.printUsage + if err := fs.Parse(args); err != nil { + return err + } + + cmd.MetaConfig = meta.NewConfig() + cmd.MetaConfig.Dir = cmd.metadir + + // Require output path. + cmd.backupFilesPath = fs.Arg(0) + if cmd.backupFilesPath == "" { + return fmt.Errorf("path with backup files required") + } + + // validate the arguments + if cmd.metadir == "" && cmd.database == "" { + return fmt.Errorf("-metadir or -database are required to restore") + } + + if cmd.database != "" && cmd.datadir == "" { + return fmt.Errorf("-datadir is required to restore") + } + + if cmd.shard != "" { + if cmd.database == "" { + return fmt.Errorf("-database is required to restore shard") + } + if cmd.retention == "" { + return fmt.Errorf("-retention is required to restore shard") + } + } else if cmd.retention != "" && cmd.database == "" { + return fmt.Errorf("-database is required to restore retention policy") + } + + return nil +} + +// unpackMeta reads the metadata from the backup directory and initializes a raft +// cluster and replaces the root metadata. +func (cmd *Command) unpackMeta() error { + // find the meta file + metaFiles, err := filepath.Glob(filepath.Join(cmd.backupFilesPath, backup.Metafile+".*")) + if err != nil { + return err + } + + if len(metaFiles) == 0 { + return fmt.Errorf("no metastore backups in %s", cmd.backupFilesPath) + } + + latest := metaFiles[len(metaFiles)-1] + + fmt.Fprintf(cmd.Stdout, "Using metastore snapshot: %v\n", latest) + // Read the metastore backup + f, err := os.Open(latest) + if err != nil { + return err + } + + var buf bytes.Buffer + if _, err := io.Copy(&buf, f); err != nil { + return fmt.Errorf("copy: %s", err) + } + + b := buf.Bytes() + var i int + + // Make sure the file is actually a meta store backup file + magic := binary.BigEndian.Uint64(b[:8]) + if magic != snapshotter.BackupMagicHeader { + return fmt.Errorf("invalid metadata file") + } + i += 8 + + // Size of the meta store bytes + length := int(binary.BigEndian.Uint64(b[i : i+8])) + i += 8 + metaBytes := b[i : i+length] + i += int(length) + + // Size of the node.json bytes + length = int(binary.BigEndian.Uint64(b[i : i+8])) + i += 8 + nodeBytes := b[i:] + + // Unpack into metadata. + var data meta.Data + if err := data.UnmarshalBinary(metaBytes); err != nil { + return fmt.Errorf("unmarshal: %s", err) + } + + // Copy meta config and remove peers so it starts in single mode. + c := cmd.MetaConfig + c.Dir = cmd.metadir + + // Create the meta dir + if os.MkdirAll(c.Dir, 0700); err != nil { + return err + } + + // Write node.json back to meta dir + if err := ioutil.WriteFile(filepath.Join(c.Dir, "node.json"), nodeBytes, 0655); err != nil { + return err + } + + client := meta.NewClient(c) + client.SetLogOutput(ioutil.Discard) + if err := client.Open(); err != nil { + return err + } + defer client.Close() + + // Force set the full metadata. + if err := client.SetData(&data); err != nil { + return fmt.Errorf("set data: %s", err) + } + + // remove the raft.db file if it exists + err = os.Remove(filepath.Join(cmd.metadir, "raft.db")) + if err != nil { + if os.IsNotExist(err) { + return nil + } + return err + } + + // remove the node.json file if it exists + err = os.Remove(filepath.Join(cmd.metadir, "node.json")) + if err != nil { + if os.IsNotExist(err) { + return nil + } + return err + } + + return nil +} + +// unpackShard will look for all backup files in the path matching this shard ID +// and restore them to the data dir +func (cmd *Command) unpackShard(shardID string) error { + // make sure the shard isn't already there so we don't clobber anything + restorePath := filepath.Join(cmd.datadir, cmd.database, cmd.retention, shardID) + if _, err := os.Stat(restorePath); err != nil && !os.IsNotExist(err) { + return fmt.Errorf("shard already present: %s", restorePath) + } + + id, err := strconv.ParseUint(shardID, 10, 64) + if err != nil { + return err + } + + // find the shard backup files + pat := filepath.Join(cmd.backupFilesPath, fmt.Sprintf(backup.BackupFilePattern, cmd.database, cmd.retention, id)) + return cmd.unpackFiles(pat + ".*") +} + +// unpackDatabase will look for all backup files in the path matching this database +// and restore them to the data dir +func (cmd *Command) unpackDatabase() error { + // make sure the shard isn't already there so we don't clobber anything + restorePath := filepath.Join(cmd.datadir, cmd.database) + if _, err := os.Stat(restorePath); err != nil && !os.IsNotExist(err) { + return fmt.Errorf("database already present: %s", restorePath) + } + + // find the database backup files + pat := filepath.Join(cmd.backupFilesPath, cmd.database) + return cmd.unpackFiles(pat + ".*") +} + +// unpackRetention will look for all backup files in the path matching this retention +// and restore them to the data dir +func (cmd *Command) unpackRetention() error { + // make sure the shard isn't already there so we don't clobber anything + restorePath := filepath.Join(cmd.datadir, cmd.database, cmd.retention) + if _, err := os.Stat(restorePath); err != nil && !os.IsNotExist(err) { + return fmt.Errorf("retention already present: %s", restorePath) + } + + // find the retention backup files + pat := filepath.Join(cmd.backupFilesPath, cmd.database) + return cmd.unpackFiles(fmt.Sprintf("%s.%s.*", pat, cmd.retention)) +} + +// unpackFiles will look for backup files matching the pattern and restore them to the data dir +func (cmd *Command) unpackFiles(pat string) error { + fmt.Printf("Restoring from backup %s\n", pat) + + backupFiles, err := filepath.Glob(pat) + if err != nil { + return err + } + + if len(backupFiles) == 0 { + return fmt.Errorf("no backup files for %s in %s", pat, cmd.backupFilesPath) + } + + for _, fn := range backupFiles { + if err := cmd.unpackTar(fn); err != nil { + return err + } + } + + return nil +} + +// unpackTar will restore a single tar archive to the data dir +func (cmd *Command) unpackTar(tarFile string) error { + f, err := os.Open(tarFile) + if err != nil { + return err + } + defer f.Close() + + tr := tar.NewReader(f) + + for { + hdr, err := tr.Next() + if err == io.EOF { + return nil + } else if err != nil { + return err + } + + if err := cmd.unpackFile(tr, hdr.Name); err != nil { + return err + } + } +} + +// unpackFile will copy the current file from the tar archive to the data dir +func (cmd *Command) unpackFile(tr *tar.Reader, fileName string) error { + fn := filepath.Join(cmd.datadir, fileName) + fmt.Printf("unpacking %s\n", fn) + + if err := os.MkdirAll(filepath.Dir(fn), 0777); err != nil { + return fmt.Errorf("error making restore dir: %s", err.Error()) + } + + ff, err := os.Create(fn) + if err != nil { + return err + } + defer ff.Close() + + if _, err := io.Copy(ff, tr); err != nil { + return err + } + + return nil +} + +// printUsage prints the usage message to STDERR. +func (cmd *Command) printUsage() { + fmt.Fprintf(cmd.Stdout, `usage: influxd restore [flags] PATH + +Restore uses backups from the PATH to restore the metastore, databases, +retention policies, or specific shards. The InfluxDB process must not be +running during restore. + +Options: + -metadir + Optional. If set the metastore will be recovered to the given path. + -datadir + Optional. If set the restore process will recover the specified + database, retention policy or shard to the given directory. + -database + Optional. Required if no metadir given. Will restore the database + TSM files. + -retention + Optional. If given, database is required. Will restore the retention policy's + TSM files. + -shard + Optional. If given, database and retention are required. Will restore the shard's + TSM files. + +`) +} + +type nopListener struct { + mu sync.Mutex + closing chan struct{} +} + +func newNopListener() *nopListener { + return &nopListener{closing: make(chan struct{})} +} + +func (ln *nopListener) Accept() (net.Conn, error) { + ln.mu.Lock() + defer ln.mu.Unlock() + + <-ln.closing + return nil, errors.New("listener closing") +} + +func (ln *nopListener) Close() error { + if ln.closing != nil { + close(ln.closing) + ln.mu.Lock() + defer ln.mu.Unlock() + + ln.closing = nil + } + return nil +} + +func (ln *nopListener) Addr() net.Addr { return &net.TCPAddr{} } diff --git a/vendor/github.com/influxdata/influxdb/cmd/influxd/run/backup_restore_test.go b/vendor/github.com/influxdata/influxdb/cmd/influxd/run/backup_restore_test.go new file mode 100644 index 000000000..17d69bb49 --- /dev/null +++ b/vendor/github.com/influxdata/influxdb/cmd/influxd/run/backup_restore_test.go @@ -0,0 +1,106 @@ +package run_test + +import ( + "io/ioutil" + "net" + "os" + "path/filepath" + "testing" + "time" + + "github.com/influxdata/influxdb/cmd/influxd/backup" + "github.com/influxdata/influxdb/cmd/influxd/restore" + "github.com/influxdata/influxdb/cmd/influxd/run" +) + +func TestServer_BackupAndRestore(t *testing.T) { + t.Skip("currently fails intermittently. See issue https://github.com/influxdata/influxdb/issues/6590") + config := NewConfig() + config.Data.Engine = "tsm1" + config.Data.Dir, _ = ioutil.TempDir("", "data_backup") + config.Meta.Dir, _ = ioutil.TempDir("", "meta_backup") + config.BindAddress = freePort() + + backupDir, _ := ioutil.TempDir("", "backup") + defer os.RemoveAll(backupDir) + + db := "mydb" + rp := "forever" + expected := `{"results":[{"series":[{"name":"myseries","columns":["time","host","value"],"values":[["1970-01-01T00:00:00.001Z","A",23]]}]}]}` + + // set the cache snapshot size low so that a single point will cause TSM file creation + config.Data.CacheSnapshotMemorySize = 1 + + func() { + s := OpenServer(config) + defer s.Close() + + if err := s.CreateDatabaseAndRetentionPolicy(db, newRetentionPolicyInfo(rp, 1, 0)); err != nil { + t.Fatal(err) + } + if err := s.MetaClient.SetDefaultRetentionPolicy(db, rp); err != nil { + t.Fatal(err) + } + + if _, err := s.Write(db, rp, "myseries,host=A value=23 1000000", nil); err != nil { + t.Fatalf("failed to write: %s", err) + } + + // wait for the snapshot to write + time.Sleep(time.Second) + + res, err := s.Query(`select * from "mydb"."forever"."myseries"`) + if err != nil { + t.Fatalf("error querying: %s", err.Error()) + } + if res != expected { + t.Fatalf("query results wrong:\n\texp: %s\n\tgot: %s", expected, res) + } + + // now backup + cmd := backup.NewCommand() + hostAddress, _ := run.DefaultHost(run.DefaultHostname, config.BindAddress) + if err := cmd.Run("-host", hostAddress, "-database", "mydb", backupDir); err != nil { + t.Fatalf("error backing up: %s, hostAddress: %s", err.Error(), hostAddress) + } + }() + + if _, err := os.Stat(config.Meta.Dir); err == nil || !os.IsNotExist(err) { + t.Fatalf("meta dir should be deleted") + } + + if _, err := os.Stat(config.Data.Dir); err == nil || !os.IsNotExist(err) { + t.Fatalf("meta dir should be deleted") + } + + // restore + cmd := restore.NewCommand() + + if err := cmd.Run("-metadir", config.Meta.Dir, "-datadir", config.Data.Dir, "-database", "mydb", backupDir); err != nil { + t.Fatalf("error restoring: %s", err.Error()) + } + + // Make sure node.json was restored + nodePath := filepath.Join(config.Meta.Dir, "node.json") + if _, err := os.Stat(nodePath); err != nil || os.IsNotExist(err) { + t.Fatalf("node.json should exist") + } + + // now open it up and verify we're good + s := OpenServer(config) + defer s.Close() + + res, err := s.Query(`select * from "mydb"."forever"."myseries"`) + if err != nil { + t.Fatalf("error querying: %s", err.Error()) + } + if res != expected { + t.Fatalf("query results wrong:\n\texp: %s\n\tgot: %s", expected, res) + } +} + +func freePort() string { + l, _ := net.Listen("tcp", "") + defer l.Close() + return l.Addr().String() +} diff --git a/vendor/github.com/influxdata/influxdb/cmd/influxd/run/command.go b/vendor/github.com/influxdata/influxdb/cmd/influxd/run/command.go new file mode 100644 index 000000000..0775cf5c9 --- /dev/null +++ b/vendor/github.com/influxdata/influxdb/cmd/influxd/run/command.go @@ -0,0 +1,264 @@ +package run + +import ( + "flag" + "fmt" + "io" + "io/ioutil" + "log" + "os" + "path/filepath" + "runtime" + "strconv" + "time" +) + +const logo = ` + 8888888 .d888 888 8888888b. 888888b. + 888 d88P" 888 888 "Y88b 888 "88b + 888 888 888 888 888 888 .88P + 888 88888b. 888888 888 888 888 888 888 888 888 8888888K. + 888 888 "88b 888 888 888 888 Y8bd8P' 888 888 888 "Y88b + 888 888 888 888 888 888 888 X88K 888 888 888 888 + 888 888 888 888 888 Y88b 888 .d8""8b. 888 .d88P 888 d88P + 8888888 888 888 888 888 "Y88888 888 888 8888888P" 8888888P" + +` + +// Command represents the command executed by "influxd run". +type Command struct { + Version string + Branch string + Commit string + BuildTime string + + closing chan struct{} + Closed chan struct{} + + Stdin io.Reader + Stdout io.Writer + Stderr io.Writer + + Server *Server +} + +// NewCommand return a new instance of Command. +func NewCommand() *Command { + return &Command{ + closing: make(chan struct{}), + Closed: make(chan struct{}), + Stdin: os.Stdin, + Stdout: os.Stdout, + Stderr: os.Stderr, + } +} + +// Run parses the config from args and runs the server. +func (cmd *Command) Run(args ...string) error { + // Parse the command line flags. + options, err := cmd.ParseFlags(args...) + if err != nil { + return err + } + + // Print sweet InfluxDB logo. + fmt.Print(logo) + + // Configure default logging. + log.SetPrefix("[run] ") + log.SetFlags(log.LstdFlags) + + // Set parallelism. + runtime.GOMAXPROCS(runtime.NumCPU()) + + // Mark start-up in log. + log.Printf("InfluxDB starting, version %s, branch %s, commit %s", + cmd.Version, cmd.Branch, cmd.Commit) + log.Printf("Go version %s, GOMAXPROCS set to %d", runtime.Version(), runtime.GOMAXPROCS(0)) + + // Write the PID file. + if err := cmd.writePIDFile(options.PIDFile); err != nil { + return fmt.Errorf("write pid file: %s", err) + } + + // Turn on block profiling to debug stuck databases + runtime.SetBlockProfileRate(int(1 * time.Second)) + + // Parse config + config, err := cmd.ParseConfig(options.GetConfigPath()) + if err != nil { + return fmt.Errorf("parse config: %s", err) + } + + // Apply any environment variables on top of the parsed config + if err := config.ApplyEnvOverrides(); err != nil { + return fmt.Errorf("apply env config: %v", err) + } + + if options.Hostname != "" { + config.Hostname = options.Hostname + } + + // Validate the configuration. + if err := config.Validate(); err != nil { + return fmt.Errorf("%s. To generate a valid configuration file run `influxd config > influxdb.generated.conf`", err) + } + + // Create server from config and start it. + buildInfo := &BuildInfo{ + Version: cmd.Version, + Commit: cmd.Commit, + Branch: cmd.Branch, + Time: cmd.BuildTime, + } + s, err := NewServer(config, buildInfo) + if err != nil { + return fmt.Errorf("create server: %s", err) + } + s.CPUProfile = options.CPUProfile + s.MemProfile = options.MemProfile + if err := s.Open(); err != nil { + return fmt.Errorf("open server: %s", err) + } + cmd.Server = s + + // Begin monitoring the server's error channel. + go cmd.monitorServerErrors() + + return nil +} + +// Close shuts down the server. +func (cmd *Command) Close() error { + defer close(cmd.Closed) + close(cmd.closing) + if cmd.Server != nil { + return cmd.Server.Close() + } + return nil +} + +func (cmd *Command) monitorServerErrors() { + logger := log.New(cmd.Stderr, "", log.LstdFlags) + for { + select { + case err := <-cmd.Server.Err(): + logger.Println(err) + case <-cmd.closing: + return + } + } +} + +// ParseFlags parses the command line flags from args and returns an options set. +func (cmd *Command) ParseFlags(args ...string) (Options, error) { + var options Options + fs := flag.NewFlagSet("", flag.ContinueOnError) + fs.StringVar(&options.ConfigPath, "config", "", "") + fs.StringVar(&options.PIDFile, "pidfile", "", "") + fs.StringVar(&options.Hostname, "hostname", "", "") + fs.StringVar(&options.CPUProfile, "cpuprofile", "", "") + fs.StringVar(&options.MemProfile, "memprofile", "", "") + fs.Usage = func() { fmt.Fprintln(cmd.Stderr, usage) } + if err := fs.Parse(args); err != nil { + return Options{}, err + } + return options, nil +} + +// writePIDFile writes the process ID to path. +func (cmd *Command) writePIDFile(path string) error { + // Ignore if path is not set. + if path == "" { + return nil + } + + // Ensure the required directory structure exists. + err := os.MkdirAll(filepath.Dir(path), 0777) + if err != nil { + return fmt.Errorf("mkdir: %s", err) + } + + // Retrieve the PID and write it. + pid := strconv.Itoa(os.Getpid()) + if err := ioutil.WriteFile(path, []byte(pid), 0666); err != nil { + return fmt.Errorf("write file: %s", err) + } + + return nil +} + +// ParseConfig parses the config at path. +// Returns a demo configuration if path is blank. +func (cmd *Command) ParseConfig(path string) (*Config, error) { + // Use demo configuration if no config path is specified. + if path == "" { + log.Println("no configuration provided, using default settings") + return NewDemoConfig() + } + + log.Printf("Using configuration at: %s\n", path) + + config := NewConfig() + if err := config.FromTomlFile(path); err != nil { + return nil, err + } + + return config, nil +} + +var usage = `usage: run [flags] + +run starts the InfluxDB server. If this is the first time running the command +then a new cluster will be initialized unless the -join argument is used. + + -config + Set the path to the configuration file. + + -hostname + Override the hostname, the 'hostname' configuration + option will be overridden. + + -pidfile + Write process ID to a file. + + -cpuprofile + Write CPU profiling information to a file. + + -memprofile + Write memory usage information to a file. +` + +// Options represents the command line options that can be parsed. +type Options struct { + ConfigPath string + PIDFile string + Hostname string + CPUProfile string + MemProfile string +} + +// GetConfigPath returns the config path from the options. +// It will return a path by searching in this order: +// 1. The CLI option in ConfigPath +// 2. The environment variable INFLUXDB_CONFIG_PATH +// 3. The first influxdb.conf file on the path: +// - ~/.influxdb +// - /etc/influxdb +func (opt *Options) GetConfigPath() string { + if opt.ConfigPath != "" { + return opt.ConfigPath + } else if envVar := os.Getenv("INFLUXDB_CONFIG_PATH"); envVar != "" { + return envVar + } + + for _, path := range []string{ + os.ExpandEnv("${HOME}/.influxdb/influxdb.conf"), + "/etc/influxdb/influxdb.conf", + } { + if _, err := os.Stat(path); err == nil { + return path + } + } + return "" +} diff --git a/vendor/github.com/influxdata/influxdb/cmd/influxd/run/config.go b/vendor/github.com/influxdata/influxdb/cmd/influxd/run/config.go new file mode 100644 index 000000000..7f80de338 --- /dev/null +++ b/vendor/github.com/influxdata/influxdb/cmd/influxd/run/config.go @@ -0,0 +1,291 @@ +package run + +import ( + "fmt" + "io/ioutil" + "log" + "os" + "os/user" + "path/filepath" + "reflect" + "regexp" + "strconv" + "strings" + "time" + + "github.com/BurntSushi/toml" + "github.com/influxdata/influxdb/coordinator" + "github.com/influxdata/influxdb/monitor" + "github.com/influxdata/influxdb/services/admin" + "github.com/influxdata/influxdb/services/collectd" + "github.com/influxdata/influxdb/services/continuous_querier" + "github.com/influxdata/influxdb/services/graphite" + "github.com/influxdata/influxdb/services/httpd" + "github.com/influxdata/influxdb/services/meta" + "github.com/influxdata/influxdb/services/opentsdb" + "github.com/influxdata/influxdb/services/precreator" + "github.com/influxdata/influxdb/services/retention" + "github.com/influxdata/influxdb/services/subscriber" + "github.com/influxdata/influxdb/services/udp" + "github.com/influxdata/influxdb/tsdb" +) + +const ( + // DefaultBindAddress is the default address for raft, cluster, snapshot, etc.. + DefaultBindAddress = ":8088" + + // DefaultHostname is the default hostname used if we are unable to determine + // the hostname from the system + DefaultHostname = "localhost" +) + +// Config represents the configuration format for the influxd binary. +type Config struct { + Meta *meta.Config `toml:"meta"` + Data tsdb.Config `toml:"data"` + Coordinator coordinator.Config `toml:"coordinator"` + Retention retention.Config `toml:"retention"` + Precreator precreator.Config `toml:"shard-precreation"` + + Admin admin.Config `toml:"admin"` + Monitor monitor.Config `toml:"monitor"` + Subscriber subscriber.Config `toml:"subscriber"` + HTTPD httpd.Config `toml:"http"` + GraphiteInputs []graphite.Config `toml:"graphite"` + CollectdInputs []collectd.Config `toml:"collectd"` + OpenTSDBInputs []opentsdb.Config `toml:"opentsdb"` + UDPInputs []udp.Config `toml:"udp"` + + ContinuousQuery continuous_querier.Config `toml:"continuous_queries"` + + // Server reporting + ReportingDisabled bool `toml:"reporting-disabled"` + + // BindAddress is the address that all TCP services use (Raft, Snapshot, Cluster, etc.) + BindAddress string `toml:"bind-address"` + + // Hostname is the hostname portion to use when registering local + // addresses. This hostname must be resolvable from other nodes. + Hostname string `toml:"hostname"` + + Join string `toml:"join"` +} + +// NewConfig returns an instance of Config with reasonable defaults. +func NewConfig() *Config { + c := &Config{} + c.Meta = meta.NewConfig() + c.Data = tsdb.NewConfig() + c.Coordinator = coordinator.NewConfig() + c.Precreator = precreator.NewConfig() + + c.Admin = admin.NewConfig() + c.Monitor = monitor.NewConfig() + c.Subscriber = subscriber.NewConfig() + c.HTTPD = httpd.NewConfig() + + c.GraphiteInputs = []graphite.Config{graphite.NewConfig()} + c.CollectdInputs = []collectd.Config{collectd.NewConfig()} + c.OpenTSDBInputs = []opentsdb.Config{opentsdb.NewConfig()} + c.UDPInputs = []udp.Config{udp.NewConfig()} + + c.ContinuousQuery = continuous_querier.NewConfig() + c.Retention = retention.NewConfig() + c.BindAddress = DefaultBindAddress + + return c +} + +// NewDemoConfig returns the config that runs when no config is specified. +func NewDemoConfig() (*Config, error) { + c := NewConfig() + + var homeDir string + // By default, store meta and data files in current users home directory + u, err := user.Current() + if err == nil { + homeDir = u.HomeDir + } else if os.Getenv("HOME") != "" { + homeDir = os.Getenv("HOME") + } else { + return nil, fmt.Errorf("failed to determine current user for storage") + } + + c.Meta.Dir = filepath.Join(homeDir, ".influxdb/meta") + c.Data.Dir = filepath.Join(homeDir, ".influxdb/data") + c.Data.WALDir = filepath.Join(homeDir, ".influxdb/wal") + + c.Admin.Enabled = true + + return c, nil +} + +// FromTomlFile loads the config from a TOML file. +func (c *Config) FromTomlFile(fpath string) error { + bs, err := ioutil.ReadFile(fpath) + if err != nil { + return err + } + return c.FromToml(string(bs)) +} + +// FromToml loads the config from TOML. +func (c *Config) FromToml(input string) error { + // Replace deprecated [cluster] with [coordinator] + re := regexp.MustCompile(`(?m)^\s*\[cluster\]`) + input = re.ReplaceAllStringFunc(input, func(in string) string { + in = strings.TrimSpace(in) + out := "[coordinator]" + log.Printf("deprecated config option %s replaced with %s; %s will not be supported in a future release\n", in, out, in) + return out + }) + + _, err := toml.Decode(input, c) + return err +} + +// Validate returns an error if the config is invalid. +func (c *Config) Validate() error { + if err := c.Meta.Validate(); err != nil { + return err + } + + if err := c.Data.Validate(); err != nil { + return err + } + + if err := c.Monitor.Validate(); err != nil { + return err + } + + if err := c.Subscriber.Validate(); err != nil { + return err + } + + for _, g := range c.GraphiteInputs { + if err := g.Validate(); err != nil { + return fmt.Errorf("invalid graphite config: %v", err) + } + } + + return nil +} + +// ApplyEnvOverrides apply the environment configuration on top of the config. +func (c *Config) ApplyEnvOverrides() error { + return c.applyEnvOverrides("INFLUXDB", reflect.ValueOf(c)) +} + +func (c *Config) applyEnvOverrides(prefix string, spec reflect.Value) error { + // If we have a pointer, dereference it + s := spec + if spec.Kind() == reflect.Ptr { + s = spec.Elem() + } + + // Make sure we have struct + if s.Kind() != reflect.Struct { + return nil + } + + typeOfSpec := s.Type() + for i := 0; i < s.NumField(); i++ { + f := s.Field(i) + // Get the toml tag to determine what env var name to use + configName := typeOfSpec.Field(i).Tag.Get("toml") + // Replace hyphens with underscores to avoid issues with shells + configName = strings.Replace(configName, "-", "_", -1) + fieldKey := typeOfSpec.Field(i).Name + + // Skip any fields that we cannot set + if f.CanSet() || f.Kind() == reflect.Slice { + + // Use the upper-case prefix and toml name for the env var + key := strings.ToUpper(configName) + if prefix != "" { + key = strings.ToUpper(fmt.Sprintf("%s_%s", prefix, configName)) + } + value := os.Getenv(key) + + // If the type is s slice, apply to each using the index as a suffix + // e.g. GRAPHITE_0 + if f.Kind() == reflect.Slice || f.Kind() == reflect.Array { + for i := 0; i < f.Len(); i++ { + if err := c.applyEnvOverrides(key, f.Index(i)); err != nil { + return err + } + if err := c.applyEnvOverrides(fmt.Sprintf("%s_%d", key, i), f.Index(i)); err != nil { + return err + } + } + continue + } + + // If it's a sub-config, recursively apply + if f.Kind() == reflect.Struct || f.Kind() == reflect.Ptr { + if err := c.applyEnvOverrides(key, f); err != nil { + return err + } + continue + } + + // Skip any fields we don't have a value to set + if value == "" { + continue + } + + switch f.Kind() { + case reflect.String: + f.SetString(value) + case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64: + + var intValue int64 + + // Handle toml.Duration + if f.Type().Name() == "Duration" { + dur, err := time.ParseDuration(value) + if err != nil { + return fmt.Errorf("failed to apply %v to %v using type %v and value '%v'", key, fieldKey, f.Type().String(), value) + } + intValue = dur.Nanoseconds() + } else { + var err error + intValue, err = strconv.ParseInt(value, 0, f.Type().Bits()) + if err != nil { + return fmt.Errorf("failed to apply %v to %v using type %v and value '%v'", key, fieldKey, f.Type().String(), value) + } + } + + f.SetInt(intValue) + case reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64: + var intValue uint64 + var err error + intValue, err = strconv.ParseUint(value, 0, f.Type().Bits()) + if err != nil { + return fmt.Errorf("failed to apply %v to %v using type %v and value '%v'", key, fieldKey, f.Type().String(), value) + } + + f.SetUint(intValue) + case reflect.Bool: + boolValue, err := strconv.ParseBool(value) + if err != nil { + return fmt.Errorf("failed to apply %v to %v using type %v and value '%v'", key, fieldKey, f.Type().String(), value) + + } + f.SetBool(boolValue) + case reflect.Float32, reflect.Float64: + floatValue, err := strconv.ParseFloat(value, f.Type().Bits()) + if err != nil { + return fmt.Errorf("failed to apply %v to %v using type %v and value '%v'", key, fieldKey, f.Type().String(), value) + + } + f.SetFloat(floatValue) + default: + if err := c.applyEnvOverrides(key, f); err != nil { + return err + } + } + } + } + return nil +} diff --git a/vendor/github.com/influxdata/influxdb/cmd/influxd/run/config_command.go b/vendor/github.com/influxdata/influxdb/cmd/influxd/run/config_command.go new file mode 100644 index 000000000..b96d03362 --- /dev/null +++ b/vendor/github.com/influxdata/influxdb/cmd/influxd/run/config_command.go @@ -0,0 +1,78 @@ +package run + +import ( + "flag" + "fmt" + "io" + "os" + + "github.com/BurntSushi/toml" +) + +// PrintConfigCommand represents the command executed by "influxd config". +type PrintConfigCommand struct { + Stdin io.Reader + Stdout io.Writer + Stderr io.Writer +} + +// NewPrintConfigCommand return a new instance of PrintConfigCommand. +func NewPrintConfigCommand() *PrintConfigCommand { + return &PrintConfigCommand{ + Stdin: os.Stdin, + Stdout: os.Stdout, + Stderr: os.Stderr, + } +} + +// Run parses and prints the current config loaded. +func (cmd *PrintConfigCommand) Run(args ...string) error { + // Parse command flags. + fs := flag.NewFlagSet("", flag.ContinueOnError) + configPath := fs.String("config", "", "") + fs.Usage = func() { fmt.Fprintln(cmd.Stderr, printConfigUsage) } + if err := fs.Parse(args); err != nil { + return err + } + + // Parse config from path. + opt := Options{ConfigPath: *configPath} + config, err := cmd.parseConfig(opt.GetConfigPath()) + if err != nil { + return fmt.Errorf("parse config: %s", err) + } + + // Apply any environment variables on top of the parsed config + if err := config.ApplyEnvOverrides(); err != nil { + return fmt.Errorf("apply env config: %v", err) + } + + // Validate the configuration. + if err := config.Validate(); err != nil { + return fmt.Errorf("%s. To generate a valid configuration file run `influxd config > influxdb.generated.conf`", err) + } + + toml.NewEncoder(cmd.Stdout).Encode(config) + fmt.Fprint(cmd.Stdout, "\n") + + return nil +} + +// ParseConfig parses the config at path. +// Returns a demo configuration if path is blank. +func (cmd *PrintConfigCommand) parseConfig(path string) (*Config, error) { + if path == "" { + return NewDemoConfig() + } + + config := NewConfig() + if err := config.FromTomlFile(path); err != nil { + return nil, err + } + return config, nil +} + +var printConfigUsage = `usage: config + + config displays the default configuration +` diff --git a/vendor/github.com/influxdata/influxdb/cmd/influxd/run/config_test.go b/vendor/github.com/influxdata/influxdb/cmd/influxd/run/config_test.go new file mode 100644 index 000000000..e54af025a --- /dev/null +++ b/vendor/github.com/influxdata/influxdb/cmd/influxd/run/config_test.go @@ -0,0 +1,261 @@ +package run_test + +import ( + "os" + "testing" + + "github.com/BurntSushi/toml" + "github.com/influxdata/influxdb/cmd/influxd/run" +) + +// Ensure the configuration can be parsed. +func TestConfig_Parse(t *testing.T) { + // Parse configuration. + var c run.Config + if err := c.FromToml(` +join = "foo:123,bar:456" + +[meta] +dir = "/tmp/meta" + +[data] +dir = "/tmp/data" + +[coordinator] + +[admin] +bind-address = ":8083" + +[http] +bind-address = ":8087" + +[[graphite]] +protocol = "udp" + +[[graphite]] +protocol = "tcp" + +[[collectd]] +bind-address = ":1000" + +[[collectd]] +bind-address = ":1010" + +[[opentsdb]] +bind-address = ":2000" + +[[opentsdb]] +bind-address = ":2010" + +[[opentsdb]] +bind-address = ":2020" + +[[udp]] +bind-address = ":4444" + +[monitoring] +enabled = true + +[subscriber] +enabled = true + +[continuous_queries] +enabled = true +`); err != nil { + t.Fatal(err) + } + + // Validate configuration. + if c.Meta.Dir != "/tmp/meta" { + t.Fatalf("unexpected meta dir: %s", c.Meta.Dir) + } else if c.Data.Dir != "/tmp/data" { + t.Fatalf("unexpected data dir: %s", c.Data.Dir) + } else if c.Admin.BindAddress != ":8083" { + t.Fatalf("unexpected admin bind address: %s", c.Admin.BindAddress) + } else if c.HTTPD.BindAddress != ":8087" { + t.Fatalf("unexpected api bind address: %s", c.HTTPD.BindAddress) + } else if len(c.GraphiteInputs) != 2 { + t.Fatalf("unexpected graphiteInputs count: %d", len(c.GraphiteInputs)) + } else if c.GraphiteInputs[0].Protocol != "udp" { + t.Fatalf("unexpected graphite protocol(0): %s", c.GraphiteInputs[0].Protocol) + } else if c.GraphiteInputs[1].Protocol != "tcp" { + t.Fatalf("unexpected graphite protocol(1): %s", c.GraphiteInputs[1].Protocol) + } else if c.CollectdInputs[0].BindAddress != ":1000" { + t.Fatalf("unexpected collectd bind address: %s", c.CollectdInputs[0].BindAddress) + } else if c.CollectdInputs[1].BindAddress != ":1010" { + t.Fatalf("unexpected collectd bind address: %s", c.CollectdInputs[1].BindAddress) + } else if c.OpenTSDBInputs[0].BindAddress != ":2000" { + t.Fatalf("unexpected opentsdb bind address: %s", c.OpenTSDBInputs[0].BindAddress) + } else if c.OpenTSDBInputs[1].BindAddress != ":2010" { + t.Fatalf("unexpected opentsdb bind address: %s", c.OpenTSDBInputs[1].BindAddress) + } else if c.OpenTSDBInputs[2].BindAddress != ":2020" { + t.Fatalf("unexpected opentsdb bind address: %s", c.OpenTSDBInputs[2].BindAddress) + } else if c.UDPInputs[0].BindAddress != ":4444" { + t.Fatalf("unexpected udp bind address: %s", c.UDPInputs[0].BindAddress) + } else if c.Subscriber.Enabled != true { + t.Fatalf("unexpected subscriber enabled: %v", c.Subscriber.Enabled) + } else if c.ContinuousQuery.Enabled != true { + t.Fatalf("unexpected continuous query enabled: %v", c.ContinuousQuery.Enabled) + } else if exp, got := "foo:123,bar:456", c.Join; exp != got { + t.Fatalf("unexpected join value: got %v, exp %v", got, exp) + } +} + +// Ensure the configuration can be parsed. +func TestConfig_Parse_EnvOverride(t *testing.T) { + // Parse configuration. + var c run.Config + if _, err := toml.Decode(` +[meta] +dir = "/tmp/meta" + +[data] +dir = "/tmp/data" + +[coordinator] + +[admin] +bind-address = ":8083" + +[http] +bind-address = ":8087" + +[[graphite]] +protocol = "udp" + +[[graphite]] +protocol = "tcp" + +[[collectd]] +bind-address = ":1000" + +[[collectd]] +bind-address = ":1010" + +[[opentsdb]] +bind-address = ":2000" + +[[opentsdb]] +bind-address = ":2010" + +[[udp]] +bind-address = ":4444" + +[[udp]] + +[monitoring] +enabled = true + +[continuous_queries] +enabled = true +`, &c); err != nil { + t.Fatal(err) + } + + if err := os.Setenv("INFLUXDB_UDP_BIND_ADDRESS", ":1234"); err != nil { + t.Fatalf("failed to set env var: %v", err) + } + + if err := os.Setenv("INFLUXDB_UDP_0_BIND_ADDRESS", ":5555"); err != nil { + t.Fatalf("failed to set env var: %v", err) + } + + if err := os.Setenv("INFLUXDB_GRAPHITE_1_PROTOCOL", "udp"); err != nil { + t.Fatalf("failed to set env var: %v", err) + } + + if err := os.Setenv("INFLUXDB_COLLECTD_1_BIND_ADDRESS", ":1020"); err != nil { + t.Fatalf("failed to set env var: %v", err) + } + + if err := os.Setenv("INFLUXDB_OPENTSDB_0_BIND_ADDRESS", ":2020"); err != nil { + t.Fatalf("failed to set env var: %v", err) + } + + // uint64 type + if err := os.Setenv("INFLUXDB_DATA_CACHE_MAX_MEMORY_SIZE", "1000"); err != nil { + t.Fatalf("failed to set env var: %v", err) + } + + if err := c.ApplyEnvOverrides(); err != nil { + t.Fatalf("failed to apply env overrides: %v", err) + } + + if c.UDPInputs[0].BindAddress != ":5555" { + t.Fatalf("unexpected udp bind address: %s", c.UDPInputs[0].BindAddress) + } + + if c.UDPInputs[1].BindAddress != ":1234" { + t.Fatalf("unexpected udp bind address: %s", c.UDPInputs[1].BindAddress) + } + + if c.GraphiteInputs[1].Protocol != "udp" { + t.Fatalf("unexpected graphite protocol: %s", c.GraphiteInputs[1].Protocol) + } + + if c.CollectdInputs[1].BindAddress != ":1020" { + t.Fatalf("unexpected collectd bind address: %s", c.CollectdInputs[1].BindAddress) + } + + if c.OpenTSDBInputs[0].BindAddress != ":2020" { + t.Fatalf("unexpected opentsdb bind address: %s", c.OpenTSDBInputs[0].BindAddress) + } + + if c.Data.CacheMaxMemorySize != 1000 { + t.Fatalf("unexpected cache max memory size: %v", c.Data.CacheMaxMemorySize) + } +} + +func TestConfig_ValidateNoServiceConfigured(t *testing.T) { + var c run.Config + if _, err := toml.Decode(` +[meta] +enabled = false + +[data] +enabled = false +`, &c); err != nil { + t.Fatal(err) + } + + if e := c.Validate(); e == nil { + t.Fatalf("got nil, expected error") + } +} + +func TestConfig_ValidateMonitorStore_MetaOnly(t *testing.T) { + c := run.NewConfig() + if _, err := toml.Decode(` +[monitor] +store-enabled = true + +[meta] +dir = "foo" + +[data] +enabled = false +`, &c); err != nil { + t.Fatal(err) + } + + if err := c.Validate(); err == nil { + t.Fatalf("got nil, expected error") + } +} + +func TestConfig_DeprecatedOptions(t *testing.T) { + // Parse configuration. + var c run.Config + if err := c.FromToml(` +[cluster] +max-select-point = 100 +`); err != nil { + t.Fatal(err) + } + + // Validate configuration. + if c.Coordinator.MaxSelectPointN != 100 { + t.Fatalf("unexpected coordinator max select points: %d", c.Coordinator.MaxSelectPointN) + + } +} diff --git a/vendor/github.com/influxdata/influxdb/cmd/influxd/run/server.go b/vendor/github.com/influxdata/influxdb/cmd/influxd/run/server.go new file mode 100644 index 000000000..c5271c00a --- /dev/null +++ b/vendor/github.com/influxdata/influxdb/cmd/influxd/run/server.go @@ -0,0 +1,522 @@ +package run + +import ( + "fmt" + "io" + "log" + "net" + "os" + "path/filepath" + "runtime" + "runtime/pprof" + "time" + + "github.com/influxdata/influxdb" + "github.com/influxdata/influxdb/coordinator" + "github.com/influxdata/influxdb/influxql" + "github.com/influxdata/influxdb/models" + "github.com/influxdata/influxdb/monitor" + "github.com/influxdata/influxdb/services/meta" + "github.com/influxdata/influxdb/services/snapshotter" + "github.com/influxdata/influxdb/services/subscriber" + "github.com/influxdata/influxdb/tcp" + "github.com/influxdata/influxdb/tsdb" + client "github.com/influxdata/usage-client/v1" + // Initialize the engine packages + _ "github.com/influxdata/influxdb/tsdb/engine" +) + +var startTime time.Time + +func init() { + startTime = time.Now().UTC() +} + +// BuildInfo represents the build details for the server code. +type BuildInfo struct { + Version string + Commit string + Branch string + Time string +} + +// Server represents a container for the metadata and storage data and services. +// It is built using a Config and it manages the startup and shutdown of all +// services in the proper order. +type Server struct { + buildInfo BuildInfo + + err chan error + closing chan struct{} + + BindAddress string + Listener net.Listener + + Logger *log.Logger + + MetaClient *meta.Client + + TSDBStore *tsdb.Store + QueryExecutor *influxql.QueryExecutor + PointsWriter *coordinator.PointsWriter + Subscriber *subscriber.Service + + Services []Service + + // These references are required for the tcp muxer. + SnapshotterService *snapshotter.Service + + Monitor *monitor.Monitor + + // Server reporting and registration + reportingDisabled bool + + // Profiling + CPUProfile string + MemProfile string + + // httpAPIAddr is the host:port combination for the main HTTP API for querying and writing data + httpAPIAddr string + + // httpUseTLS specifies if we should use a TLS connection to the http servers + httpUseTLS bool + + // tcpAddr is the host:port combination for the TCP listener that services mux onto + tcpAddr string + + config *Config + + // logOutput is the writer to which all services should be configured to + // write logs to after appension. + logOutput io.Writer +} + +// NewServer returns a new instance of Server built from a config. +func NewServer(c *Config, buildInfo *BuildInfo) (*Server, error) { + // We need to ensure that a meta directory always exists even if + // we don't start the meta store. node.json is always stored under + // the meta directory. + if err := os.MkdirAll(c.Meta.Dir, 0777); err != nil { + return nil, fmt.Errorf("mkdir all: %s", err) + } + + // 0.10-rc1 and prior would sometimes put the node.json at the root + // dir which breaks backup/restore and restarting nodes. This moves + // the file from the root so it's always under the meta dir. + oldPath := filepath.Join(filepath.Dir(c.Meta.Dir), "node.json") + newPath := filepath.Join(c.Meta.Dir, "node.json") + + if _, err := os.Stat(oldPath); err == nil { + if err := os.Rename(oldPath, newPath); err != nil { + return nil, err + } + } + + _, err := influxdb.LoadNode(c.Meta.Dir) + if err != nil { + if !os.IsNotExist(err) { + return nil, err + } + } + + if err := raftDBExists(c.Meta.Dir); err != nil { + return nil, err + } + + // In 0.10.0 bind-address got moved to the top level. Check + // The old location to keep things backwards compatible + bind := c.BindAddress + + s := &Server{ + buildInfo: *buildInfo, + err: make(chan error), + closing: make(chan struct{}), + + BindAddress: bind, + + Logger: log.New(os.Stderr, "", log.LstdFlags), + + MetaClient: meta.NewClient(c.Meta), + + Monitor: monitor.New(c.Monitor), + + reportingDisabled: c.ReportingDisabled, + + httpAPIAddr: c.HTTPD.BindAddress, + httpUseTLS: c.HTTPD.HTTPSEnabled, + tcpAddr: bind, + + config: c, + logOutput: os.Stderr, + } + + if err := s.MetaClient.Open(); err != nil { + return nil, err + } + + s.TSDBStore = tsdb.NewStore(c.Data.Dir) + s.TSDBStore.EngineOptions.Config = c.Data + + // Copy TSDB configuration. + s.TSDBStore.EngineOptions.EngineVersion = c.Data.Engine + + // Create the Subscriber service + s.Subscriber = subscriber.NewService(c.Subscriber) + + // Initialize points writer. + s.PointsWriter = coordinator.NewPointsWriter() + s.PointsWriter.WriteTimeout = time.Duration(c.Coordinator.WriteTimeout) + s.PointsWriter.TSDBStore = s.TSDBStore + s.PointsWriter.Subscriber = s.Subscriber + + // Initialize query executor. + s.QueryExecutor = influxql.NewQueryExecutor() + s.QueryExecutor.StatementExecutor = &coordinator.StatementExecutor{ + MetaClient: s.MetaClient, + TSDBStore: coordinator.LocalTSDBStore{Store: s.TSDBStore}, + Monitor: s.Monitor, + PointsWriter: s.PointsWriter, + MaxSelectPointN: c.Coordinator.MaxSelectPointN, + MaxSelectSeriesN: c.Coordinator.MaxSelectSeriesN, + MaxSelectBucketsN: c.Coordinator.MaxSelectBucketsN, + } + s.QueryExecutor.QueryTimeout = time.Duration(c.Coordinator.QueryTimeout) + s.QueryExecutor.LogQueriesAfter = time.Duration(c.Coordinator.LogQueriesAfter) + s.QueryExecutor.MaxConcurrentQueries = c.Coordinator.MaxConcurrentQueries + + // Initialize the monitor + s.Monitor.Version = s.buildInfo.Version + s.Monitor.Commit = s.buildInfo.Commit + s.Monitor.Branch = s.buildInfo.Branch + s.Monitor.BuildTime = s.buildInfo.Time + s.Monitor.PointsWriter = (*monitorPointsWriter)(s.PointsWriter) + return s, nil +} + +func (s *Server) appendSnapshotterService() { + srv := snapshotter.NewService() + srv.TSDBStore = s.TSDBStore + srv.MetaClient = s.MetaClient + s.Services = append(s.Services, srv) + s.SnapshotterService = srv +} + +// SetLogOutput sets the logger used for all messages. It must not be called +// after the Open method has been called. +func (s *Server) SetLogOutput(w io.Writer) { + s.Logger = log.New(os.Stderr, "", log.LstdFlags) + s.logOutput = w +} + +// Err returns an error channel that multiplexes all out of band errors received from all services. +func (s *Server) Err() <-chan error { return s.err } + +// Open opens the meta and data store and all services. +func (s *Server) Open() error { + // Start profiling, if set. + startProfile(s.CPUProfile, s.MemProfile) + + // Open shared TCP connection. + ln, err := net.Listen("tcp", s.BindAddress) + if err != nil { + return fmt.Errorf("listen: %s", err) + } + s.Listener = ln + + // Multiplex listener. + mux := tcp.NewMux() + go mux.Serve(ln) + + // Append services. + s.appendMonitorService() + s.appendPrecreatorService(s.config.Precreator) + s.appendSnapshotterService() + s.appendAdminService(s.config.Admin) + s.appendContinuousQueryService(s.config.ContinuousQuery) + s.appendHTTPDService(s.config.HTTPD) + s.appendRetentionPolicyService(s.config.Retention) + for _, i := range s.config.GraphiteInputs { + if err := s.appendGraphiteService(i); err != nil { + return err + } + } + for _, i := range s.config.CollectdInputs { + s.appendCollectdService(i) + } + for _, i := range s.config.OpenTSDBInputs { + if err := s.appendOpenTSDBService(i); err != nil { + return err + } + } + for _, i := range s.config.UDPInputs { + s.appendUDPService(i) + } + + s.Subscriber.MetaClient = s.MetaClient + s.Subscriber.MetaClient = s.MetaClient + s.PointsWriter.MetaClient = s.MetaClient + s.Monitor.MetaClient = s.MetaClient + + s.SnapshotterService.Listener = mux.Listen(snapshotter.MuxHeader) + + // Configure logging for all services and clients. + w := s.logOutput + s.MetaClient.SetLogOutput(w) + s.TSDBStore.SetLogOutput(w) + if s.config.Data.QueryLogEnabled { + s.QueryExecutor.SetLogOutput(w) + } + s.PointsWriter.SetLogOutput(w) + s.Subscriber.SetLogOutput(w) + for _, svc := range s.Services { + svc.SetLogOutput(w) + } + s.SnapshotterService.SetLogOutput(w) + s.Monitor.SetLogOutput(w) + + // Open TSDB store. + if err := s.TSDBStore.Open(); err != nil { + return fmt.Errorf("open tsdb store: %s", err) + } + + // Open the subcriber service + if err := s.Subscriber.Open(); err != nil { + return fmt.Errorf("open subscriber: %s", err) + } + + // Open the points writer service + if err := s.PointsWriter.Open(); err != nil { + return fmt.Errorf("open points writer: %s", err) + } + + for _, service := range s.Services { + if err := service.Open(); err != nil { + return fmt.Errorf("open service: %s", err) + } + } + + // Start the reporting service, if not disabled. + if !s.reportingDisabled { + go s.startServerReporting() + } + + return nil +} + +// Close shuts down the meta and data stores and all services. +func (s *Server) Close() error { + stopProfile() + + // Close the listener first to stop any new connections + if s.Listener != nil { + s.Listener.Close() + } + + // Close services to allow any inflight requests to complete + // and prevent new requests from being accepted. + for _, service := range s.Services { + service.Close() + } + + if s.PointsWriter != nil { + s.PointsWriter.Close() + } + + if s.QueryExecutor != nil { + s.QueryExecutor.Close() + } + + // Close the TSDBStore, no more reads or writes at this point + if s.TSDBStore != nil { + s.TSDBStore.Close() + } + + if s.Subscriber != nil { + s.Subscriber.Close() + } + + if s.MetaClient != nil { + s.MetaClient.Close() + } + + close(s.closing) + return nil +} + +// startServerReporting starts periodic server reporting. +func (s *Server) startServerReporting() { + s.reportServer() + + ticker := time.NewTicker(24 * time.Hour) + defer ticker.Stop() + for { + select { + case <-s.closing: + return + case <-ticker.C: + s.reportServer() + } + } +} + +// reportServer reports anonymous statistics about the system. +func (s *Server) reportServer() { + dis := s.MetaClient.Databases() + numDatabases := len(dis) + + numMeasurements := 0 + numSeries := 0 + + // Only needed in the case of a data node + if s.TSDBStore != nil { + for _, di := range dis { + d := s.TSDBStore.DatabaseIndex(di.Name) + if d == nil { + // No data in this store for this database. + continue + } + m, s := d.MeasurementSeriesCounts() + numMeasurements += m + numSeries += s + } + } + + clusterID := s.MetaClient.ClusterID() + cl := client.New("") + usage := client.Usage{ + Product: "influxdb", + Data: []client.UsageData{ + { + Values: client.Values{ + "os": runtime.GOOS, + "arch": runtime.GOARCH, + "version": s.buildInfo.Version, + "cluster_id": fmt.Sprintf("%v", clusterID), + "num_series": numSeries, + "num_measurements": numMeasurements, + "num_databases": numDatabases, + "uptime": time.Since(startTime).Seconds(), + }, + }, + }, + } + + s.Logger.Printf("Sending anonymous usage statistics to m.influxdb.com") + + go cl.Save(usage) +} + +// monitorErrorChan reads an error channel and resends it through the server. +func (s *Server) monitorErrorChan(ch <-chan error) { + for { + select { + case err, ok := <-ch: + if !ok { + return + } + s.err <- err + case <-s.closing: + return + } + } +} + +// HTTPAddr returns the HTTP address used by other nodes for HTTP queries and writes. +func (s *Server) HTTPAddr() string { + return s.remoteAddr(s.httpAPIAddr) +} + +// TCPAddr returns the TCP address used by other nodes for cluster communication. +func (s *Server) TCPAddr() string { + return s.remoteAddr(s.tcpAddr) +} + +// MetaServers returns the meta node HTTP addresses used by this server. +func (s *Server) MetaServers() []string { + return []string{s.HTTPAddr()} +} + +// Service represents a service attached to the server. +type Service interface { + SetLogOutput(w io.Writer) + Open() error + Close() error +} + +// prof stores the file locations of active profiles. +var prof struct { + cpu *os.File + mem *os.File +} + +// StartProfile initializes the cpu and memory profile, if specified. +func startProfile(cpuprofile, memprofile string) { + if cpuprofile != "" { + f, err := os.Create(cpuprofile) + if err != nil { + log.Fatalf("cpuprofile: %v", err) + } + log.Printf("writing CPU profile to: %s\n", cpuprofile) + prof.cpu = f + pprof.StartCPUProfile(prof.cpu) + } + + if memprofile != "" { + f, err := os.Create(memprofile) + if err != nil { + log.Fatalf("memprofile: %v", err) + } + log.Printf("writing mem profile to: %s\n", memprofile) + prof.mem = f + runtime.MemProfileRate = 4096 + } + +} + +// StopProfile closes the cpu and memory profiles if they are running. +func stopProfile() { + if prof.cpu != nil { + pprof.StopCPUProfile() + prof.cpu.Close() + log.Println("CPU profile stopped") + } + if prof.mem != nil { + pprof.Lookup("heap").WriteTo(prof.mem, 0) + prof.mem.Close() + log.Println("mem profile stopped") + } +} + +type tcpaddr struct{ host string } + +func (a *tcpaddr) Network() string { return "tcp" } +func (a *tcpaddr) String() string { return a.host } + +// monitorPointsWriter is a wrapper around `coordinator.PointsWriter` that helps +// to prevent a circular dependency between the `cluster` and `monitor` packages. +type monitorPointsWriter coordinator.PointsWriter + +func (pw *monitorPointsWriter) WritePoints(database, retentionPolicy string, points models.Points) error { + return (*coordinator.PointsWriter)(pw).WritePoints(database, retentionPolicy, models.ConsistencyLevelAny, points) +} + +func (s *Server) remoteAddr(addr string) string { + hostname := s.config.Hostname + remote, err := DefaultHost(hostname, addr) + if err != nil { + return addr + } + return remote +} + +func DefaultHost(hostname, addr string) (string, error) { + host, port, err := net.SplitHostPort(addr) + if err != nil { + return "", err + } + + if host == "" || host == "0.0.0.0" || host == "::" { + return net.JoinHostPort(hostname, port), nil + } + return addr, nil +} diff --git a/vendor/github.com/influxdata/influxdb/cmd/influxd/run/server_bench_test.go b/vendor/github.com/influxdata/influxdb/cmd/influxd/run/server_bench_test.go new file mode 100644 index 000000000..757d3af8f --- /dev/null +++ b/vendor/github.com/influxdata/influxdb/cmd/influxd/run/server_bench_test.go @@ -0,0 +1,90 @@ +package run_test + +import ( + "bytes" + "fmt" + "net/url" + "testing" +) + +func BenchmarkServer_Query_Count_1(b *testing.B) { + benchmarkServerQueryCount(b, 1) +} + +func BenchmarkServer_Query_Count_1K(b *testing.B) { + benchmarkServerQueryCount(b, 1000) +} + +func BenchmarkServer_Query_Count_100K(b *testing.B) { + benchmarkServerQueryCount(b, 100000) +} + +func BenchmarkServer_Query_Count_1M(b *testing.B) { + benchmarkServerQueryCount(b, 1000000) +} + +func benchmarkServerQueryCount(b *testing.B, pointN int) { + s := OpenDefaultServer(NewConfig()) + defer s.Close() + + // Write data into server. + var buf bytes.Buffer + for i := 0; i < pointN; i++ { + fmt.Fprintf(&buf, `cpu value=100 %d`, i+1) + if i != pointN-1 { + fmt.Fprint(&buf, "\n") + } + } + s.MustWrite("db0", "rp0", buf.String(), nil) + + // Query simple count from server. + b.ResetTimer() + b.ReportAllocs() + for i := 0; i < b.N; i++ { + if results, err := s.Query(`SELECT count(value) FROM db0.rp0.cpu`); err != nil { + b.Fatal(err) + } else if results != fmt.Sprintf(`{"results":[{"series":[{"name":"cpu","columns":["time","count"],"values":[["1970-01-01T00:00:00Z",%d]]}]}]}`, pointN) { + b.Fatalf("unexpected result: %s", results) + } + } +} + +func BenchmarkServer_ShowSeries_1(b *testing.B) { + benchmarkServerShowSeries(b, 1) +} + +func BenchmarkServer_ShowSeries_1K(b *testing.B) { + benchmarkServerShowSeries(b, 1000) +} + +func BenchmarkServer_ShowSeries_100K(b *testing.B) { + benchmarkServerShowSeries(b, 100000) +} + +func BenchmarkServer_ShowSeries_1M(b *testing.B) { + benchmarkServerShowSeries(b, 1000000) +} + +func benchmarkServerShowSeries(b *testing.B, pointN int) { + s := OpenDefaultServer(NewConfig()) + defer s.Close() + + // Write data into server. + var buf bytes.Buffer + for i := 0; i < pointN; i++ { + fmt.Fprintf(&buf, `cpu,host=server%d value=100 %d`, i, i+1) + if i != pointN-1 { + fmt.Fprint(&buf, "\n") + } + } + s.MustWrite("db0", "rp0", buf.String(), nil) + + // Query simple count from server. + b.ResetTimer() + b.ReportAllocs() + for i := 0; i < b.N; i++ { + if _, err := s.QueryWithParams(`SHOW SERIES`, url.Values{"db": {"db0"}}); err != nil { + b.Fatal(err) + } + } +} diff --git a/vendor/github.com/influxdata/influxdb/cmd/influxd/run/server_dataonly.go b/vendor/github.com/influxdata/influxdb/cmd/influxd/run/server_dataonly.go new file mode 100644 index 000000000..29f4e5987 --- /dev/null +++ b/vendor/github.com/influxdata/influxdb/cmd/influxd/run/server_dataonly.go @@ -0,0 +1,27 @@ +// +build dataonly + +package run + +import ( + "github.com/influxdata/influxdb/services/admin" + "github.com/influxdata/influxdb/services/collectd" + "github.com/influxdata/influxdb/services/continuous_querier" + "github.com/influxdata/influxdb/services/graphite" + "github.com/influxdata/influxdb/services/httpd" + "github.com/influxdata/influxdb/services/opentsdb" + "github.com/influxdata/influxdb/services/precreator" + "github.com/influxdata/influxdb/services/retention" + "github.com/influxdata/influxdb/services/udp" +) + +func (s *Server) appendAdminService(c admin.Config) {} +func (s *Server) appendCollectdService(c collectd.Config) {} +func (s *Server) appendContinuousQueryService(c continuous_querier.Config) {} +func (s *Server) appendGraphiteService(c graphite.Config) error { return nil } +func (s *Server) appendMonitorService() {} +func (s *Server) appendHTTPDService(c httpd.Config) {} +func (s *Server) appendOpenTSDBService(c opentsdb.Config) error { return nil } +func (s *Server) appendPrecreatorService(c precreator.Config) error { return nil } +func (s *Server) appendRetentionPolicyService(c retention.Config) {} +func (s *Server) appendUDPService(c udp.Config) {} +func raftDBExists(dir string) error { return nil } diff --git a/vendor/github.com/influxdata/influxdb/cmd/influxd/run/server_default.go b/vendor/github.com/influxdata/influxdb/cmd/influxd/run/server_default.go new file mode 100644 index 000000000..ef769ae98 --- /dev/null +++ b/vendor/github.com/influxdata/influxdb/cmd/influxd/run/server_default.go @@ -0,0 +1,149 @@ +// +build !dataonly + +package run + +import ( + "fmt" + "os" + "path/filepath" + + "github.com/influxdata/influxdb/services/admin" + "github.com/influxdata/influxdb/services/collectd" + "github.com/influxdata/influxdb/services/continuous_querier" + "github.com/influxdata/influxdb/services/graphite" + "github.com/influxdata/influxdb/services/httpd" + "github.com/influxdata/influxdb/services/meta" + "github.com/influxdata/influxdb/services/opentsdb" + "github.com/influxdata/influxdb/services/precreator" + "github.com/influxdata/influxdb/services/retention" + "github.com/influxdata/influxdb/services/udp" +) + +func (s *Server) appendMonitorService() { + s.Services = append(s.Services, s.Monitor) +} + +func (s *Server) appendRetentionPolicyService(c retention.Config) { + if !c.Enabled { + return + } + srv := retention.NewService(c) + srv.MetaClient = s.MetaClient + srv.TSDBStore = s.TSDBStore + s.Services = append(s.Services, srv) +} + +func (s *Server) appendAdminService(c admin.Config) { + if !c.Enabled { + return + } + c.Version = s.buildInfo.Version + srv := admin.NewService(c) + s.Services = append(s.Services, srv) +} + +func (s *Server) appendHTTPDService(c httpd.Config) { + if !c.Enabled { + return + } + srv := httpd.NewService(c) + srv.Handler.MetaClient = s.MetaClient + srv.Handler.QueryAuthorizer = meta.NewQueryAuthorizer(s.MetaClient) + srv.Handler.WriteAuthorizer = meta.NewWriteAuthorizer(s.MetaClient) + srv.Handler.QueryExecutor = s.QueryExecutor + srv.Handler.PointsWriter = s.PointsWriter + srv.Handler.Version = s.buildInfo.Version + + // If a ContinuousQuerier service has been started, attach it. + for _, srvc := range s.Services { + if cqsrvc, ok := srvc.(continuous_querier.ContinuousQuerier); ok { + srv.Handler.ContinuousQuerier = cqsrvc + } + } + + s.Services = append(s.Services, srv) +} + +func (s *Server) appendCollectdService(c collectd.Config) { + if !c.Enabled { + return + } + srv := collectd.NewService(c) + srv.MetaClient = s.MetaClient + srv.PointsWriter = s.PointsWriter + s.Services = append(s.Services, srv) +} + +func (s *Server) appendOpenTSDBService(c opentsdb.Config) error { + if !c.Enabled { + return nil + } + srv, err := opentsdb.NewService(c) + if err != nil { + return err + } + srv.PointsWriter = s.PointsWriter + srv.MetaClient = s.MetaClient + s.Services = append(s.Services, srv) + return nil +} + +func (s *Server) appendGraphiteService(c graphite.Config) error { + if !c.Enabled { + return nil + } + srv, err := graphite.NewService(c) + if err != nil { + return err + } + + srv.PointsWriter = s.PointsWriter + srv.MetaClient = s.MetaClient + srv.Monitor = s.Monitor + s.Services = append(s.Services, srv) + return nil +} + +func (s *Server) appendPrecreatorService(c precreator.Config) error { + if !c.Enabled { + return nil + } + srv, err := precreator.NewService(c) + if err != nil { + return err + } + + srv.MetaClient = s.MetaClient + s.Services = append(s.Services, srv) + return nil +} + +func (s *Server) appendUDPService(c udp.Config) { + if !c.Enabled { + return + } + srv := udp.NewService(c) + srv.PointsWriter = s.PointsWriter + srv.MetaClient = s.MetaClient + s.Services = append(s.Services, srv) +} + +func (s *Server) appendContinuousQueryService(c continuous_querier.Config) { + if !c.Enabled { + return + } + srv := continuous_querier.NewService(c) + srv.MetaClient = s.MetaClient + srv.QueryExecutor = s.QueryExecutor + s.Services = append(s.Services, srv) +} + +func raftDBExists(dir string) error { + // Check to see if there is a raft db, if so, error out with a message + // to downgrade, export, and then import the meta data + raftFile := filepath.Join(dir, "raft.db") + if _, err := os.Stat(raftFile); err == nil { + return fmt.Errorf("detected %s. To proceed, you'll need to either 1) downgrade to v0.11.x, export your metadata, upgrade to the current version again, and then import the metadata or 2) delete the file, which will effectively reset your database. For more assistance with the upgrade, see: https://docs.influxdata.com/influxdb/v0.12/administration/upgrading/", raftFile) + } + return nil +} diff --git a/vendor/github.com/influxdata/influxdb/cmd/influxd/run/server_helpers_test.go b/vendor/github.com/influxdata/influxdb/cmd/influxd/run/server_helpers_test.go new file mode 100644 index 000000000..31f795bc8 --- /dev/null +++ b/vendor/github.com/influxdata/influxdb/cmd/influxd/run/server_helpers_test.go @@ -0,0 +1,481 @@ +// This package is a set of convenience helpers and structs to make integration testing easier +package run_test + +import ( + "bytes" + "encoding/json" + "fmt" + "io" + "io/ioutil" + "math" + "net/http" + "net/url" + "os" + "regexp" + "strings" + "testing" + "time" + + "github.com/influxdata/influxdb/cmd/influxd/run" + "github.com/influxdata/influxdb/services/httpd" + "github.com/influxdata/influxdb/services/meta" + "github.com/influxdata/influxdb/toml" +) + +const emptyResults = `{"results":[{}]}` + +// Server represents a test wrapper for run.Server. +type Server struct { + *run.Server + Config *run.Config +} + +// NewServer returns a new instance of Server. +func NewServer(c *run.Config) *Server { + buildInfo := &run.BuildInfo{ + Version: "testServer", + Commit: "testCommit", + Branch: "testBranch", + } + srv, _ := run.NewServer(c, buildInfo) + s := Server{ + Server: srv, + Config: c, + } + return &s +} + +// OpenServer opens a test server. +func OpenServer(c *run.Config) *Server { + s := NewServer(c) + configureLogging(s) + if err := s.Open(); err != nil { + panic(err.Error()) + } + return s +} + +// OpenServerWithVersion opens a test server with a specific version. +func OpenServerWithVersion(c *run.Config, version string) *Server { + buildInfo := &run.BuildInfo{ + Version: version, + Commit: "", + Branch: "", + } + srv, _ := run.NewServer(c, buildInfo) + s := Server{ + Server: srv, + Config: c, + } + if err := s.Open(); err != nil { + panic(err.Error()) + } + configureLogging(&s) + + return &s +} + +// OpenDefaultServer opens a test server with a default database & retention policy. +func OpenDefaultServer(c *run.Config) *Server { + s := OpenServer(c) + if err := s.CreateDatabaseAndRetentionPolicy("db0", newRetentionPolicyInfo("rp0", 1, 0)); err != nil { + panic(err) + } + if err := s.MetaClient.SetDefaultRetentionPolicy("db0", "rp0"); err != nil { + panic(err) + } + return s +} + +// Close shuts down the server and removes all temporary paths. +func (s *Server) Close() { + if err := s.Server.Close(); err != nil { + panic(err.Error()) + } + if err := os.RemoveAll(s.Config.Meta.Dir); err != nil { + panic(err.Error()) + } + if err := os.RemoveAll(s.Config.Data.Dir); err != nil { + panic(err.Error()) + } +} + +// URL returns the base URL for the httpd endpoint. +func (s *Server) URL() string { + for _, service := range s.Services { + if service, ok := service.(*httpd.Service); ok { + return "http://" + service.Addr().String() + } + } + panic("httpd server not found in services") +} + +// CreateDatabaseAndRetentionPolicy will create the database and retention policy. +func (s *Server) CreateDatabaseAndRetentionPolicy(db string, rp *meta.RetentionPolicyInfo) error { + if _, err := s.MetaClient.CreateDatabase(db); err != nil { + return err + } else if _, err := s.MetaClient.CreateRetentionPolicy(db, rp); err != nil { + return err + } + return nil +} + +// Query executes a query against the server and returns the results. +func (s *Server) Query(query string) (results string, err error) { + return s.QueryWithParams(query, nil) +} + +// MustQuery executes a query against the server and returns the results. +func (s *Server) MustQuery(query string) string { + results, err := s.Query(query) + if err != nil { + panic(err) + } + return results +} + +// Query executes a query against the server and returns the results. +func (s *Server) QueryWithParams(query string, values url.Values) (results string, err error) { + var v url.Values + if values == nil { + v = url.Values{} + } else { + v, _ = url.ParseQuery(values.Encode()) + } + v.Set("q", query) + return s.HTTPPost(s.URL()+"/query?"+v.Encode(), nil) +} + +// MustQueryWithParams executes a query against the server and returns the results. +func (s *Server) MustQueryWithParams(query string, values url.Values) string { + results, err := s.QueryWithParams(query, values) + if err != nil { + panic(err) + } + return results +} + +// HTTPGet makes an HTTP GET request to the server and returns the response. +func (s *Server) HTTPGet(url string) (results string, err error) { + resp, err := http.Get(url) + if err != nil { + return "", err + } + body := string(MustReadAll(resp.Body)) + switch resp.StatusCode { + case http.StatusBadRequest: + if !expectPattern(".*error parsing query*.", body) { + return "", fmt.Errorf("unexpected status code: code=%d, body=%s", resp.StatusCode, body) + } + return body, nil + case http.StatusOK: + return body, nil + default: + return "", fmt.Errorf("unexpected status code: code=%d, body=%s", resp.StatusCode, body) + } +} + +// HTTPPost makes an HTTP POST request to the server and returns the response. +func (s *Server) HTTPPost(url string, content []byte) (results string, err error) { + buf := bytes.NewBuffer(content) + resp, err := http.Post(url, "application/json", buf) + if err != nil { + return "", err + } + body := string(MustReadAll(resp.Body)) + switch resp.StatusCode { + case http.StatusBadRequest: + if !expectPattern(".*error parsing query*.", body) { + return "", fmt.Errorf("unexpected status code: code=%d, body=%s", resp.StatusCode, body) + } + return body, nil + case http.StatusOK, http.StatusNoContent: + return body, nil + default: + return "", fmt.Errorf("unexpected status code: code=%d, body=%s", resp.StatusCode, body) + } +} + +// Write executes a write against the server and returns the results. +func (s *Server) Write(db, rp, body string, params url.Values) (results string, err error) { + if params == nil { + params = url.Values{} + } + if params.Get("db") == "" { + params.Set("db", db) + } + if params.Get("rp") == "" { + params.Set("rp", rp) + } + resp, err := http.Post(s.URL()+"/write?"+params.Encode(), "", strings.NewReader(body)) + if err != nil { + return "", err + } else if resp.StatusCode != http.StatusOK && resp.StatusCode != http.StatusNoContent { + return "", fmt.Errorf("invalid status code: code=%d, body=%s", resp.StatusCode, MustReadAll(resp.Body)) + } + return string(MustReadAll(resp.Body)), nil +} + +// MustWrite executes a write to the server. Panic on error. +func (s *Server) MustWrite(db, rp, body string, params url.Values) string { + results, err := s.Write(db, rp, body, params) + if err != nil { + panic(err) + } + return results +} + +// NewConfig returns the default config with temporary paths. +func NewConfig() *run.Config { + c := run.NewConfig() + c.BindAddress = "127.0.0.1:0" + c.ReportingDisabled = true + c.Coordinator.WriteTimeout = toml.Duration(30 * time.Second) + c.Meta.Dir = MustTempFile() + + if !testing.Verbose() { + c.Meta.LoggingEnabled = false + } + + c.Data.Dir = MustTempFile() + c.Data.WALDir = MustTempFile() + c.Data.WALLoggingEnabled = false + + c.HTTPD.Enabled = true + c.HTTPD.BindAddress = "127.0.0.1:0" + c.HTTPD.LogEnabled = testing.Verbose() + + c.Monitor.StoreEnabled = false + + return c +} + +func newRetentionPolicyInfo(name string, rf int, duration time.Duration) *meta.RetentionPolicyInfo { + return &meta.RetentionPolicyInfo{Name: name, ReplicaN: rf, Duration: duration} +} + +func maxFloat64() string { + maxFloat64, _ := json.Marshal(math.MaxFloat64) + return string(maxFloat64) +} + +func maxInt64() string { + maxInt64, _ := json.Marshal(^int64(0)) + return string(maxInt64) +} + +func now() time.Time { + return time.Now().UTC() +} + +func yesterday() time.Time { + return now().Add(-1 * time.Hour * 24) +} + +func mustParseTime(layout, value string) time.Time { + tm, err := time.Parse(layout, value) + if err != nil { + panic(err) + } + return tm +} + +// MustReadAll reads r. Panic on error. +func MustReadAll(r io.Reader) []byte { + b, err := ioutil.ReadAll(r) + if err != nil { + panic(err) + } + return b +} + +// MustTempFile returns a path to a temporary file. +func MustTempFile() string { + f, err := ioutil.TempFile("", "influxd-") + if err != nil { + panic(err) + } + f.Close() + os.Remove(f.Name()) + return f.Name() +} + +func expectPattern(exp, act string) bool { + re := regexp.MustCompile(exp) + if !re.MatchString(act) { + return false + } + return true +} + +type Query struct { + name string + command string + params url.Values + exp, act string + pattern bool + skip bool + repeat int + once bool +} + +// Execute runs the command and returns an err if it fails +func (q *Query) Execute(s *Server) (err error) { + if q.params == nil { + q.act, err = s.Query(q.command) + return + } + q.act, err = s.QueryWithParams(q.command, q.params) + return +} + +func (q *Query) success() bool { + if q.pattern { + return expectPattern(q.exp, q.act) + } + return q.exp == q.act +} + +func (q *Query) Error(err error) string { + return fmt.Sprintf("%s: %v", q.name, err) +} + +func (q *Query) failureMessage() string { + return fmt.Sprintf("%s: unexpected results\nquery: %s\nparams: %v\nexp: %s\nactual: %s\n", q.name, q.command, q.params, q.exp, q.act) +} + +type Write struct { + db string + rp string + data string +} + +func (w *Write) duplicate() *Write { + return &Write{ + db: w.db, + rp: w.rp, + data: w.data, + } +} + +type Writes []*Write + +func (a Writes) duplicate() Writes { + writes := make(Writes, 0, len(a)) + for _, w := range a { + writes = append(writes, w.duplicate()) + } + return writes +} + +type Tests map[string]Test + +type Test struct { + initialized bool + writes Writes + params url.Values + db string + rp string + exp string + queries []*Query +} + +func NewTest(db, rp string) Test { + return Test{ + db: db, + rp: rp, + } +} + +func (t Test) duplicate() Test { + test := Test{ + initialized: t.initialized, + writes: t.writes.duplicate(), + db: t.db, + rp: t.rp, + exp: t.exp, + queries: make([]*Query, len(t.queries)), + } + + if t.params != nil { + t.params = url.Values{} + for k, a := range t.params { + vals := make([]string, len(a)) + copy(vals, a) + test.params[k] = vals + } + } + copy(test.queries, t.queries) + return test +} + +func (t *Test) addQueries(q ...*Query) { + t.queries = append(t.queries, q...) +} + +func (t *Test) database() string { + if t.db != "" { + return t.db + } + return "db0" +} + +func (t *Test) retentionPolicy() string { + if t.rp != "" { + return t.rp + } + return "default" +} + +func (t *Test) init(s *Server) error { + if len(t.writes) == 0 || t.initialized { + return nil + } + if t.db == "" { + t.db = "db0" + } + if t.rp == "" { + t.rp = "rp0" + } + + if err := writeTestData(s, t); err != nil { + return err + } + + t.initialized = true + + return nil +} + +func writeTestData(s *Server, t *Test) error { + for i, w := range t.writes { + if w.db == "" { + w.db = t.database() + } + if w.rp == "" { + w.rp = t.retentionPolicy() + } + + if err := s.CreateDatabaseAndRetentionPolicy(w.db, newRetentionPolicyInfo(w.rp, 1, 0)); err != nil { + return err + } + if err := s.MetaClient.SetDefaultRetentionPolicy(w.db, w.rp); err != nil { + return err + } + + if res, err := s.Write(w.db, w.rp, w.data, t.params); err != nil { + return fmt.Errorf("write #%d: %s", i, err) + } else if t.exp != res { + return fmt.Errorf("unexpected results\nexp: %s\ngot: %s\n", t.exp, res) + } + } + + return nil +} + +func configureLogging(s *Server) { + // Set the logger to discard unless verbose is on + if !testing.Verbose() { + s.SetLogOutput(ioutil.Discard) + } +} diff --git a/vendor/github.com/influxdata/influxdb/cmd/influxd/run/server_suite_test.go b/vendor/github.com/influxdata/influxdb/cmd/influxd/run/server_suite_test.go new file mode 100644 index 000000000..16bcac249 --- /dev/null +++ b/vendor/github.com/influxdata/influxdb/cmd/influxd/run/server_suite_test.go @@ -0,0 +1,481 @@ +package run_test + +import ( + "fmt" + "net/url" + "strings" + "testing" + "time" +) + +var tests Tests + +// Load all shared tests +func init() { + tests = make(map[string]Test) + + tests["database_commands"] = Test{ + queries: []*Query{ + &Query{ + name: "create database should succeed", + command: `CREATE DATABASE db0`, + exp: `{"results":[{}]}`, + once: true, + }, + &Query{ + name: "create database with retention duration should succeed", + command: `CREATE DATABASE db0_r WITH DURATION 24h REPLICATION 2 NAME db0_r_policy`, + exp: `{"results":[{}]}`, + once: true, + }, + &Query{ + name: "create database should error with bad name", + command: `CREATE DATABASE 0xdb0`, + exp: `{"error":"error parsing query: found 0, expected identifier at line 1, char 17"}`, + }, + &Query{ + name: "create database with retention duration should error with bad retention duration", + command: `CREATE DATABASE db0 WITH DURATION xyz`, + exp: `{"error":"error parsing query: found xyz, expected duration at line 1, char 35"}`, + }, + &Query{ + name: "create database with retention replication should error with bad retention replication number", + command: `CREATE DATABASE db0 WITH REPLICATION xyz`, + exp: `{"error":"error parsing query: found xyz, expected integer at line 1, char 38"}`, + }, + &Query{ + name: "create database with retention name should error with missing retention name", + command: `CREATE DATABASE db0 WITH NAME`, + exp: `{"error":"error parsing query: found EOF, expected identifier at line 1, char 31"}`, + }, + &Query{ + name: "show database should succeed", + command: `SHOW DATABASES`, + exp: `{"results":[{"series":[{"name":"databases","columns":["name"],"values":[["db0"],["db0_r"]]}]}]}`, + }, + &Query{ + name: "create database should not error with existing database with IF NOT EXISTS", + command: `CREATE DATABASE IF NOT EXISTS db0`, + exp: `{"results":[{"messages":[{"level":"warning","text":"IF NOT EXISTS is deprecated as of v0.13.0 and will be removed in a future release"}]}]}`, + }, + &Query{ + name: "create database should create non-existing database with IF NOT EXISTS", + command: `CREATE DATABASE IF NOT EXISTS db1`, + exp: `{"results":[{"messages":[{"level":"warning","text":"IF NOT EXISTS is deprecated as of v0.13.0 and will be removed in a future release"}]}]}`, + }, + &Query{ + name: "create database with retention duration should error if retention policy is different with IF NOT EXISTS", + command: `CREATE DATABASE IF NOT EXISTS db1 WITH DURATION 24h`, + exp: `{"results":[{"error":"retention policy conflicts with an existing policy"}]}`, + }, + &Query{ + name: "create database should error IF NOT EXISTS with bad retention duration", + command: `CREATE DATABASE IF NOT EXISTS db1 WITH DURATION xyz`, + exp: `{"error":"error parsing query: found xyz, expected duration at line 1, char 49"}`, + }, + &Query{ + name: "show database should succeed", + command: `SHOW DATABASES`, + exp: `{"results":[{"series":[{"name":"databases","columns":["name"],"values":[["db0"],["db0_r"],["db1"]]}]}]}`, + }, + &Query{ + name: "drop database db0 should succeed", + command: `DROP DATABASE db0`, + exp: `{"results":[{}]}`, + once: true, + }, + &Query{ + name: "drop database db0_r should succeed", + command: `DROP DATABASE db0_r`, + exp: `{"results":[{}]}`, + once: true, + }, + &Query{ + name: "drop database db1 should succeed", + command: `DROP DATABASE db1`, + exp: `{"results":[{}]}`, + once: true, + }, + &Query{ + name: "drop database should not error if it does not exists", + command: `DROP DATABASE db1`, + exp: `{"results":[{}]}`, + }, + &Query{ + name: "drop database should not error with non-existing database db1 WITH IF EXISTS", + command: `DROP DATABASE IF EXISTS db1`, + exp: `{"results":[{"messages":[{"level":"warning","text":"IF EXISTS is deprecated as of v0.13.0 and will be removed in a future release"}]}]}`, + }, + &Query{ + name: "show database should have no results", + command: `SHOW DATABASES`, + exp: `{"results":[{"series":[{"name":"databases","columns":["name"]}]}]}`, + }, + &Query{ + name: "create database with shard group duration should succeed", + command: `CREATE DATABASE db0 WITH SHARD DURATION 61m`, + exp: `{"results":[{}]}`, + }, + &Query{ + name: "create database with shard group duration and duration should succeed", + command: `CREATE DATABASE db1 WITH DURATION 60m SHARD DURATION 30m`, + exp: `{"results":[{}]}`, + }, + }, + } + + tests["drop_and_recreate_database"] = Test{ + db: "db0", + rp: "rp0", + writes: Writes{ + &Write{data: fmt.Sprintf(`cpu,host=serverA,region=uswest val=23.2 %d`, mustParseTime(time.RFC3339Nano, "2000-01-01T00:00:00Z").UnixNano())}, + }, + queries: []*Query{ + &Query{ + name: "Drop database after data write", + command: `DROP DATABASE db0`, + exp: `{"results":[{}]}`, + once: true, + }, + &Query{ + name: "Recreate database", + command: `CREATE DATABASE db0`, + exp: `{"results":[{}]}`, + once: true, + }, + &Query{ + name: "Recreate retention policy", + command: `CREATE RETENTION POLICY rp0 ON db0 DURATION 365d REPLICATION 1 DEFAULT`, + exp: `{"results":[{}]}`, + once: true, + }, + &Query{ + name: "Show measurements after recreate", + command: `SHOW MEASUREMENTS`, + exp: `{"results":[{}]}`, + params: url.Values{"db": []string{"db0"}}, + }, + &Query{ + name: "Query data after recreate", + command: `SELECT * FROM cpu`, + exp: `{"results":[{}]}`, + params: url.Values{"db": []string{"db0"}}, + }, + }, + } + + tests["drop_database_isolated"] = Test{ + db: "db0", + rp: "rp0", + writes: Writes{ + &Write{data: fmt.Sprintf(`cpu,host=serverA,region=uswest val=23.2 %d`, mustParseTime(time.RFC3339Nano, "2000-01-01T00:00:00Z").UnixNano())}, + }, + queries: []*Query{ + &Query{ + name: "Query data from 1st database", + command: `SELECT * FROM cpu`, + exp: `{"results":[{"series":[{"name":"cpu","columns":["time","host","region","val"],"values":[["2000-01-01T00:00:00Z","serverA","uswest",23.2]]}]}]}`, + params: url.Values{"db": []string{"db0"}}, + }, + &Query{ + name: "Query data from 1st database with GROUP BY *", + command: `SELECT * FROM cpu GROUP BY *`, + exp: `{"results":[{"series":[{"name":"cpu","tags":{"host":"serverA","region":"uswest"},"columns":["time","val"],"values":[["2000-01-01T00:00:00Z",23.2]]}]}]}`, + params: url.Values{"db": []string{"db0"}}, + }, + &Query{ + name: "Drop other database", + command: `DROP DATABASE db1`, + once: true, + exp: `{"results":[{}]}`, + }, + &Query{ + name: "Query data from 1st database and ensure it's still there", + command: `SELECT * FROM cpu`, + exp: `{"results":[{"series":[{"name":"cpu","columns":["time","host","region","val"],"values":[["2000-01-01T00:00:00Z","serverA","uswest",23.2]]}]}]}`, + params: url.Values{"db": []string{"db0"}}, + }, + &Query{ + name: "Query data from 1st database and ensure it's still there with GROUP BY *", + command: `SELECT * FROM cpu GROUP BY *`, + exp: `{"results":[{"series":[{"name":"cpu","tags":{"host":"serverA","region":"uswest"},"columns":["time","val"],"values":[["2000-01-01T00:00:00Z",23.2]]}]}]}`, + params: url.Values{"db": []string{"db0"}}, + }, + }, + } + + tests["delete_series"] = Test{ + db: "db0", + rp: "rp0", + writes: Writes{ + &Write{data: fmt.Sprintf(`cpu,host=serverA,region=uswest val=23.2 %d`, mustParseTime(time.RFC3339Nano, "2000-01-01T00:00:00Z").UnixNano())}, + &Write{data: fmt.Sprintf(`cpu,host=serverA,region=uswest val=100 %d`, mustParseTime(time.RFC3339Nano, "2000-01-02T00:00:00Z").UnixNano())}, + &Write{data: fmt.Sprintf(`cpu,host=serverA,region=uswest val=200 %d`, mustParseTime(time.RFC3339Nano, "2000-01-03T00:00:00Z").UnixNano())}, + &Write{db: "db1", data: fmt.Sprintf(`cpu,host=serverA,region=uswest val=23.2 %d`, mustParseTime(time.RFC3339Nano, "2000-01-01T00:00:00Z").UnixNano())}, + }, + queries: []*Query{ + &Query{ + name: "Show series is present", + command: `SHOW SERIES`, + exp: `{"results":[{"series":[{"columns":["key"],"values":[["cpu,host=serverA,region=uswest"]]}]}]}`, + params: url.Values{"db": []string{"db0"}}, + }, + &Query{ + name: "Delete series", + command: `DELETE FROM cpu WHERE time < '2000-01-03T00:00:00Z'`, + exp: `{"results":[{}]}`, + params: url.Values{"db": []string{"db0"}}, + once: true, + }, + &Query{ + name: "Show series still exists", + command: `SHOW SERIES`, + exp: `{"results":[{"series":[{"columns":["key"],"values":[["cpu,host=serverA,region=uswest"]]}]}]}`, + params: url.Values{"db": []string{"db0"}}, + }, + &Query{ + name: "Make sure last point still exists", + command: `SELECT * FROM cpu`, + exp: `{"results":[{"series":[{"name":"cpu","columns":["time","host","region","val"],"values":[["2000-01-03T00:00:00Z","serverA","uswest",200]]}]}]}`, + params: url.Values{"db": []string{"db0"}}, + }, + &Query{ + name: "Make sure data wasn't deleted from other database.", + command: `SELECT * FROM cpu`, + exp: `{"results":[{"series":[{"name":"cpu","columns":["time","host","region","val"],"values":[["2000-01-01T00:00:00Z","serverA","uswest",23.2]]}]}]}`, + params: url.Values{"db": []string{"db1"}}, + }, + }, + } + + tests["drop_and_recreate_series"] = Test{ + db: "db0", + rp: "rp0", + writes: Writes{ + &Write{data: fmt.Sprintf(`cpu,host=serverA,region=uswest val=23.2 %d`, mustParseTime(time.RFC3339Nano, "2000-01-01T00:00:00Z").UnixNano())}, + &Write{db: "db1", data: fmt.Sprintf(`cpu,host=serverA,region=uswest val=23.2 %d`, mustParseTime(time.RFC3339Nano, "2000-01-01T00:00:00Z").UnixNano())}, + }, + queries: []*Query{ + &Query{ + name: "Show series is present", + command: `SHOW SERIES`, + exp: `{"results":[{"series":[{"columns":["key"],"values":[["cpu,host=serverA,region=uswest"]]}]}]}`, + params: url.Values{"db": []string{"db0"}}, + }, + &Query{ + name: "Drop series after data write", + command: `DROP SERIES FROM cpu`, + exp: `{"results":[{}]}`, + params: url.Values{"db": []string{"db0"}}, + once: true, + }, + &Query{ + name: "Show series is gone", + command: `SHOW SERIES`, + exp: `{"results":[{}]}`, + params: url.Values{"db": []string{"db0"}}, + }, + &Query{ + name: "Make sure data wasn't deleted from other database.", + command: `SELECT * FROM cpu`, + exp: `{"results":[{"series":[{"name":"cpu","columns":["time","host","region","val"],"values":[["2000-01-01T00:00:00Z","serverA","uswest",23.2]]}]}]}`, + params: url.Values{"db": []string{"db1"}}, + }, + }, + } + tests["drop_and_recreate_series_retest"] = Test{ + db: "db0", + rp: "rp0", + writes: Writes{ + &Write{data: fmt.Sprintf(`cpu,host=serverA,region=uswest val=23.2 %d`, mustParseTime(time.RFC3339Nano, "2000-01-01T00:00:00Z").UnixNano())}, + }, + queries: []*Query{ + &Query{ + name: "Show series is present again after re-write", + command: `SHOW SERIES`, + exp: `{"results":[{"series":[{"columns":["key"],"values":[["cpu,host=serverA,region=uswest"]]}]}]}`, + params: url.Values{"db": []string{"db0"}}, + }, + }, + } + + tests["drop_series_from_regex"] = Test{ + db: "db0", + rp: "rp0", + writes: Writes{ + &Write{data: strings.Join([]string{ + fmt.Sprintf(`a,host=serverA,region=uswest val=23.2 %d`, mustParseTime(time.RFC3339Nano, "2000-01-01T00:00:00Z").UnixNano()), + fmt.Sprintf(`aa,host=serverA,region=uswest val=23.2 %d`, mustParseTime(time.RFC3339Nano, "2000-01-01T00:00:00Z").UnixNano()), + fmt.Sprintf(`b,host=serverA,region=uswest val=23.2 %d`, mustParseTime(time.RFC3339Nano, "2000-01-01T00:00:00Z").UnixNano()), + fmt.Sprintf(`c,host=serverA,region=uswest val=30.2 %d`, mustParseTime(time.RFC3339Nano, "2000-01-01T00:00:00Z").UnixNano()), + }, "\n")}, + }, + queries: []*Query{ + &Query{ + name: "Show series is present", + command: `SHOW SERIES`, + exp: `{"results":[{"series":[{"columns":["key"],"values":[["a,host=serverA,region=uswest"],["aa,host=serverA,region=uswest"],["b,host=serverA,region=uswest"],["c,host=serverA,region=uswest"]]}]}]}`, + params: url.Values{"db": []string{"db0"}}, + }, + &Query{ + name: "Drop series after data write", + command: `DROP SERIES FROM /a.*/`, + exp: `{"results":[{}]}`, + params: url.Values{"db": []string{"db0"}}, + once: true, + }, + &Query{ + name: "Show series is gone", + command: `SHOW SERIES`, + exp: `{"results":[{"series":[{"columns":["key"],"values":[["b,host=serverA,region=uswest"],["c,host=serverA,region=uswest"]]}]}]}`, + params: url.Values{"db": []string{"db0"}}, + }, + &Query{ + name: "Drop series from regex that matches no measurements", + command: `DROP SERIES FROM /a.*/`, + exp: `{"results":[{}]}`, + params: url.Values{"db": []string{"db0"}}, + once: true, + }, + &Query{ + name: "make sure DROP SERIES doesn't delete anything when regex doesn't match", + command: `SHOW SERIES`, + exp: `{"results":[{"series":[{"columns":["key"],"values":[["b,host=serverA,region=uswest"],["c,host=serverA,region=uswest"]]}]}]}`, + params: url.Values{"db": []string{"db0"}}, + }, + &Query{ + name: "Drop series with WHERE field should error", + command: `DROP SERIES FROM c WHERE val > 50.0`, + exp: `{"results":[{"error":"fields not supported in WHERE clause during deletion"}]}`, + params: url.Values{"db": []string{"db0"}}, + }, + &Query{ + name: "make sure DROP SERIES with field in WHERE didn't delete data", + command: `SHOW SERIES`, + exp: `{"results":[{"series":[{"columns":["key"],"values":[["b,host=serverA,region=uswest"],["c,host=serverA,region=uswest"]]}]}]}`, + params: url.Values{"db": []string{"db0"}}, + }, + &Query{ + name: "Drop series with WHERE time should error", + command: `DROP SERIES FROM c WHERE time > now() - 1d`, + exp: `{"results":[{"error":"DROP SERIES doesn't support time in WHERE clause"}]}`, + params: url.Values{"db": []string{"db0"}}, + }, + }, + } + + tests["retention_policy_commands"] = Test{ + db: "db0", + queries: []*Query{ + &Query{ + name: "create retention policy should succeed", + command: `CREATE RETENTION POLICY rp0 ON db0 DURATION 1h REPLICATION 1`, + exp: `{"results":[{}]}`, + once: true, + }, + &Query{ + name: "show retention policy should succeed", + command: `SHOW RETENTION POLICIES ON db0`, + exp: `{"results":[{"series":[{"columns":["name","duration","shardGroupDuration","replicaN","default"],"values":[["rp0","1h0m0s","1h0m0s",1,false]]}]}]}`, + }, + &Query{ + name: "alter retention policy should succeed", + command: `ALTER RETENTION POLICY rp0 ON db0 DURATION 2h REPLICATION 3 DEFAULT`, + exp: `{"results":[{}]}`, + once: true, + }, + &Query{ + name: "show retention policy should have new altered information", + command: `SHOW RETENTION POLICIES ON db0`, + exp: `{"results":[{"series":[{"columns":["name","duration","shardGroupDuration","replicaN","default"],"values":[["rp0","2h0m0s","1h0m0s",3,true]]}]}]}`, + }, + &Query{ + name: "show retention policy should still show policy", + command: `SHOW RETENTION POLICIES ON db0`, + exp: `{"results":[{"series":[{"columns":["name","duration","shardGroupDuration","replicaN","default"],"values":[["rp0","2h0m0s","1h0m0s",3,true]]}]}]}`, + }, + &Query{ + name: "create a second non-default retention policy", + command: `CREATE RETENTION POLICY rp2 ON db0 DURATION 1h REPLICATION 1`, + exp: `{"results":[{}]}`, + once: true, + }, + &Query{ + name: "show retention policy should show both", + command: `SHOW RETENTION POLICIES ON db0`, + exp: `{"results":[{"series":[{"columns":["name","duration","shardGroupDuration","replicaN","default"],"values":[["rp0","2h0m0s","1h0m0s",3,true],["rp2","1h0m0s","1h0m0s",1,false]]}]}]}`, + }, + &Query{ + name: "dropping non-default retention policy succeed", + command: `DROP RETENTION POLICY rp2 ON db0`, + exp: `{"results":[{}]}`, + once: true, + }, + &Query{ + name: "create a third non-default retention policy", + command: `CREATE RETENTION POLICY rp3 ON db0 DURATION 1h REPLICATION 1 SHARD DURATION 30m`, + exp: `{"results":[{}]}`, + once: true, + }, + &Query{ + name: "show retention policy should show both with custom shard", + command: `SHOW RETENTION POLICIES ON db0`, + exp: `{"results":[{"series":[{"columns":["name","duration","shardGroupDuration","replicaN","default"],"values":[["rp0","2h0m0s","1h0m0s",3,true],["rp3","1h0m0s","30m0s",1,false]]}]}]}`, + }, + &Query{ + name: "dropping non-default custom shard retention policy succeed", + command: `DROP RETENTION POLICY rp3 ON db0`, + exp: `{"results":[{}]}`, + once: true, + }, + &Query{ + name: "show retention policy should show just default", + command: `SHOW RETENTION POLICIES ON db0`, + exp: `{"results":[{"series":[{"columns":["name","duration","shardGroupDuration","replicaN","default"],"values":[["rp0","2h0m0s","1h0m0s",3,true]]}]}]}`, + }, + &Query{ + name: "Ensure retention policy with unacceptable retention cannot be created", + command: `CREATE RETENTION POLICY rp4 ON db0 DURATION 1s REPLICATION 1`, + exp: `{"results":[{"error":"retention policy duration must be at least 1h0m0s"}]}`, + once: true, + }, + &Query{ + name: "Check error when deleting retention policy on non-existent database", + command: `DROP RETENTION POLICY rp1 ON mydatabase`, + exp: `{"results":[{}]}`, + }, + &Query{ + name: "Ensure retention policy for non existing db is not created", + command: `CREATE RETENTION POLICY rp0 ON nodb DURATION 1h REPLICATION 1`, + exp: `{"results":[{"error":"database not found: nodb"}]}`, + once: true, + }, + }, + } + + tests["retention_policy_auto_create"] = Test{ + queries: []*Query{ + &Query{ + name: "create database should succeed", + command: `CREATE DATABASE db0`, + exp: `{"results":[{}]}`, + once: true, + }, + &Query{ + name: "show retention policies should return auto-created policy", + command: `SHOW RETENTION POLICIES ON db0`, + exp: `{"results":[{"series":[{"columns":["name","duration","shardGroupDuration","replicaN","default"],"values":[["autogen","0","168h0m0s",1,true]]}]}]}`, + }, + }, + } + +} + +func (tests Tests) load(t *testing.T, key string) Test { + test, ok := tests[key] + if !ok { + t.Fatalf("no test %q", key) + } + + return test.duplicate() +} diff --git a/vendor/github.com/influxdata/influxdb/cmd/influxd/run/server_test.go b/vendor/github.com/influxdata/influxdb/cmd/influxd/run/server_test.go new file mode 100644 index 000000000..e86026640 --- /dev/null +++ b/vendor/github.com/influxdata/influxdb/cmd/influxd/run/server_test.go @@ -0,0 +1,6406 @@ +package run_test + +import ( + "fmt" + "net/http" + "net/url" + "strconv" + "strings" + "testing" + "time" + + "github.com/influxdata/influxdb/coordinator" + "github.com/influxdata/influxdb/models" +) + +// Ensure that HTTP responses include the InfluxDB version. +func TestServer_HTTPResponseVersion(t *testing.T) { + version := "v1234" + s := OpenServerWithVersion(NewConfig(), version) + defer s.Close() + + resp, _ := http.Get(s.URL() + "/query") + got := resp.Header.Get("X-Influxdb-Version") + if got != version { + t.Errorf("Server responded with incorrect version, exp %s, got %s", version, got) + } +} + +// Ensure the database commands work. +func TestServer_DatabaseCommands(t *testing.T) { + t.Parallel() + s := OpenServer(NewConfig()) + defer s.Close() + + test := tests.load(t, "database_commands") + + for _, query := range test.queries { + if query.skip { + t.Logf("SKIP:: %s", query.name) + continue + } + if err := query.Execute(s); err != nil { + t.Error(query.Error(err)) + } else if !query.success() { + t.Error(query.failureMessage()) + } + } +} + +func TestServer_Query_DropAndRecreateDatabase(t *testing.T) { + t.Parallel() + s := OpenServer(NewConfig()) + defer s.Close() + + test := tests.load(t, "drop_and_recreate_database") + + if err := s.CreateDatabaseAndRetentionPolicy(test.database(), newRetentionPolicyInfo(test.retentionPolicy(), 1, 0)); err != nil { + t.Fatal(err) + } + if err := s.MetaClient.SetDefaultRetentionPolicy(test.database(), test.retentionPolicy()); err != nil { + t.Fatal(err) + } + + for i, query := range test.queries { + if i == 0 { + if err := test.init(s); err != nil { + t.Fatalf("test init failed: %s", err) + } + } + if query.skip { + t.Logf("SKIP:: %s", query.name) + continue + } + if err := query.Execute(s); err != nil { + t.Error(query.Error(err)) + } else if !query.success() { + t.Error(query.failureMessage()) + } + } +} + +func TestServer_Query_DropDatabaseIsolated(t *testing.T) { + t.Parallel() + s := OpenServer(NewConfig()) + defer s.Close() + + test := tests.load(t, "drop_database_isolated") + + if err := s.CreateDatabaseAndRetentionPolicy(test.database(), newRetentionPolicyInfo(test.retentionPolicy(), 1, 0)); err != nil { + t.Fatal(err) + } + if err := s.MetaClient.SetDefaultRetentionPolicy(test.database(), test.retentionPolicy()); err != nil { + t.Fatal(err) + } + if err := s.CreateDatabaseAndRetentionPolicy("db1", newRetentionPolicyInfo("rp1", 1, 0)); err != nil { + t.Fatal(err) + } + + for i, query := range test.queries { + if i == 0 { + if err := test.init(s); err != nil { + t.Fatalf("test init failed: %s", err) + } + } + if query.skip { + t.Logf("SKIP:: %s", query.name) + continue + } + if err := query.Execute(s); err != nil { + t.Error(query.Error(err)) + } else if !query.success() { + t.Error(query.failureMessage()) + } + } +} + +func TestServer_Query_DeleteSeries(t *testing.T) { + t.Parallel() + s := OpenServer(NewConfig()) + defer s.Close() + + test := tests.load(t, "delete_series") + + if err := s.CreateDatabaseAndRetentionPolicy(test.database(), newRetentionPolicyInfo(test.retentionPolicy(), 1, 0)); err != nil { + t.Fatal(err) + } + if err := s.MetaClient.SetDefaultRetentionPolicy(test.database(), test.retentionPolicy()); err != nil { + t.Fatal(err) + } + + for i, query := range test.queries { + if i == 0 { + if err := test.init(s); err != nil { + t.Fatalf("test init failed: %s", err) + } + } + if query.skip { + t.Logf("SKIP:: %s", query.name) + continue + } + if err := query.Execute(s); err != nil { + t.Error(query.Error(err)) + } else if !query.success() { + t.Error(query.failureMessage()) + } + } +} + +func TestServer_Query_DropAndRecreateSeries(t *testing.T) { + t.Parallel() + s := OpenServer(NewConfig()) + defer s.Close() + + test := tests.load(t, "drop_and_recreate_series") + + if err := s.CreateDatabaseAndRetentionPolicy(test.database(), newRetentionPolicyInfo(test.retentionPolicy(), 1, 0)); err != nil { + t.Fatal(err) + } + if err := s.MetaClient.SetDefaultRetentionPolicy(test.database(), test.retentionPolicy()); err != nil { + t.Fatal(err) + } + + for i, query := range test.queries { + if i == 0 { + if err := test.init(s); err != nil { + t.Fatalf("test init failed: %s", err) + } + } + if query.skip { + t.Logf("SKIP:: %s", query.name) + continue + } + if err := query.Execute(s); err != nil { + t.Error(query.Error(err)) + } else if !query.success() { + t.Error(query.failureMessage()) + } + } + + // Re-write data and test again. + retest := tests.load(t, "drop_and_recreate_series_retest") + + for i, query := range retest.queries { + if i == 0 { + if err := retest.init(s); err != nil { + t.Fatalf("test init failed: %s", err) + } + } + if query.skip { + t.Logf("SKIP:: %s", query.name) + continue + } + if err := query.Execute(s); err != nil { + t.Error(query.Error(err)) + } else if !query.success() { + t.Error(query.failureMessage()) + } + } +} + +func TestServer_Query_DropSeriesFromRegex(t *testing.T) { + t.Parallel() + s := OpenServer(NewConfig()) + defer s.Close() + + test := tests.load(t, "drop_series_from_regex") + + if err := s.CreateDatabaseAndRetentionPolicy(test.database(), newRetentionPolicyInfo(test.retentionPolicy(), 1, 0)); err != nil { + t.Fatal(err) + } + if err := s.MetaClient.SetDefaultRetentionPolicy(test.database(), test.retentionPolicy()); err != nil { + t.Fatal(err) + } + + for i, query := range test.queries { + if i == 0 { + if err := test.init(s); err != nil { + t.Fatalf("test init failed: %s", err) + } + } + if query.skip { + t.Logf("SKIP:: %s", query.name) + continue + } + if err := query.Execute(s); err != nil { + t.Error(query.Error(err)) + } else if !query.success() { + t.Error(query.failureMessage()) + } + } +} + +// Ensure retention policy commands work. +func TestServer_RetentionPolicyCommands(t *testing.T) { + t.Parallel() + c := NewConfig() + c.Meta.RetentionAutoCreate = false + s := OpenServer(c) + defer s.Close() + + test := tests.load(t, "retention_policy_commands") + + // Create a database. + if _, err := s.MetaClient.CreateDatabase(test.database()); err != nil { + t.Fatal(err) + } + + for _, query := range test.queries { + if query.skip { + t.Logf("SKIP:: %s", query.name) + continue + } + if err := query.Execute(s); err != nil { + t.Error(query.Error(err)) + } else if !query.success() { + t.Error(query.failureMessage()) + } + } +} + +// Ensure the autocreation of retention policy works. +func TestServer_DatabaseRetentionPolicyAutoCreate(t *testing.T) { + t.Parallel() + s := OpenServer(NewConfig()) + defer s.Close() + + test := tests.load(t, "retention_policy_auto_create") + + for _, query := range test.queries { + if query.skip { + t.Logf("SKIP:: %s", query.name) + continue + } + if err := query.Execute(s); err != nil { + t.Error(query.Error(err)) + } else if !query.success() { + t.Error(query.failureMessage()) + } + } +} + +// Ensure user commands work. +func TestServer_UserCommands(t *testing.T) { + t.Parallel() + s := OpenServer(NewConfig()) + defer s.Close() + + // Create a database. + if _, err := s.MetaClient.CreateDatabase("db0"); err != nil { + t.Fatal(err) + } + + test := Test{ + queries: []*Query{ + &Query{ + name: "show users, no actual users", + command: `SHOW USERS`, + exp: `{"results":[{"series":[{"columns":["user","admin"]}]}]}`, + }, + &Query{ + name: `create user`, + command: "CREATE USER jdoe WITH PASSWORD '1337'", + exp: `{"results":[{}]}`, + }, + &Query{ + name: "show users, 1 existing user", + command: `SHOW USERS`, + exp: `{"results":[{"series":[{"columns":["user","admin"],"values":[["jdoe",false]]}]}]}`, + }, + &Query{ + name: "grant all priviledges to jdoe", + command: `GRANT ALL PRIVILEGES TO jdoe`, + exp: `{"results":[{}]}`, + }, + &Query{ + name: "show users, existing user as admin", + command: `SHOW USERS`, + exp: `{"results":[{"series":[{"columns":["user","admin"],"values":[["jdoe",true]]}]}]}`, + }, + &Query{ + name: "grant DB privileges to user", + command: `GRANT READ ON db0 TO jdoe`, + exp: `{"results":[{}]}`, + }, + &Query{ + name: "revoke all privileges", + command: `REVOKE ALL PRIVILEGES FROM jdoe`, + exp: `{"results":[{}]}`, + }, + &Query{ + name: "bad create user request", + command: `CREATE USER 0xBAD WITH PASSWORD pwd1337`, + exp: `{"error":"error parsing query: found 0, expected identifier at line 1, char 13"}`, + }, + &Query{ + name: "bad create user request, no name", + command: `CREATE USER WITH PASSWORD pwd1337`, + exp: `{"error":"error parsing query: found WITH, expected identifier at line 1, char 13"}`, + }, + &Query{ + name: "bad create user request, no password", + command: `CREATE USER jdoe`, + exp: `{"error":"error parsing query: found EOF, expected WITH at line 1, char 18"}`, + }, + &Query{ + name: "drop user", + command: `DROP USER jdoe`, + exp: `{"results":[{}]}`, + }, + &Query{ + name: "make sure user was dropped", + command: `SHOW USERS`, + exp: `{"results":[{"series":[{"columns":["user","admin"]}]}]}`, + }, + &Query{ + name: "delete non existing user", + command: `DROP USER noone`, + exp: `{"results":[{"error":"user not found"}]}`, + }, + }, + } + + for _, query := range test.queries { + if query.skip { + t.Logf("SKIP:: %s", query.name) + continue + } + if err := query.Execute(s); err != nil { + t.Error(fmt.Sprintf("command: %s - err: %s", query.command, query.Error(err))) + } else if !query.success() { + t.Error(query.failureMessage()) + } + } +} + +// Ensure the server can create a single point via line protocol with float type and read it back. +func TestServer_Write_LineProtocol_Float(t *testing.T) { + t.Parallel() + s := OpenServer(NewConfig()) + defer s.Close() + + if err := s.CreateDatabaseAndRetentionPolicy("db0", newRetentionPolicyInfo("rp0", 1, 1*time.Hour)); err != nil { + t.Fatal(err) + } + + now := now() + if res, err := s.Write("db0", "rp0", `cpu,host=server01 value=1.0 `+strconv.FormatInt(now.UnixNano(), 10), nil); err != nil { + t.Fatal(err) + } else if exp := ``; exp != res { + t.Fatalf("unexpected results\nexp: %s\ngot: %s\n", exp, res) + } + + // Verify the data was written. + if res, err := s.Query(`SELECT * FROM db0.rp0.cpu GROUP BY *`); err != nil { + t.Fatal(err) + } else if exp := fmt.Sprintf(`{"results":[{"series":[{"name":"cpu","tags":{"host":"server01"},"columns":["time","value"],"values":[["%s",1]]}]}]}`, now.Format(time.RFC3339Nano)); exp != res { + t.Fatalf("unexpected results\nexp: %s\ngot: %s\n", exp, res) + } +} + +// Ensure the server can create a single point via line protocol with bool type and read it back. +func TestServer_Write_LineProtocol_Bool(t *testing.T) { + t.Parallel() + s := OpenServer(NewConfig()) + defer s.Close() + + if err := s.CreateDatabaseAndRetentionPolicy("db0", newRetentionPolicyInfo("rp0", 1, 1*time.Hour)); err != nil { + t.Fatal(err) + } + + now := now() + if res, err := s.Write("db0", "rp0", `cpu,host=server01 value=true `+strconv.FormatInt(now.UnixNano(), 10), nil); err != nil { + t.Fatal(err) + } else if exp := ``; exp != res { + t.Fatalf("unexpected results\nexp: %s\ngot: %s\n", exp, res) + } + + // Verify the data was written. + if res, err := s.Query(`SELECT * FROM db0.rp0.cpu GROUP BY *`); err != nil { + t.Fatal(err) + } else if exp := fmt.Sprintf(`{"results":[{"series":[{"name":"cpu","tags":{"host":"server01"},"columns":["time","value"],"values":[["%s",true]]}]}]}`, now.Format(time.RFC3339Nano)); exp != res { + t.Fatalf("unexpected results\nexp: %s\ngot: %s\n", exp, res) + } +} + +// Ensure the server can create a single point via line protocol with string type and read it back. +func TestServer_Write_LineProtocol_String(t *testing.T) { + t.Parallel() + s := OpenServer(NewConfig()) + defer s.Close() + + if err := s.CreateDatabaseAndRetentionPolicy("db0", newRetentionPolicyInfo("rp0", 1, 1*time.Hour)); err != nil { + t.Fatal(err) + } + + now := now() + if res, err := s.Write("db0", "rp0", `cpu,host=server01 value="disk full" `+strconv.FormatInt(now.UnixNano(), 10), nil); err != nil { + t.Fatal(err) + } else if exp := ``; exp != res { + t.Fatalf("unexpected results\nexp: %s\ngot: %s\n", exp, res) + } + + // Verify the data was written. + if res, err := s.Query(`SELECT * FROM db0.rp0.cpu GROUP BY *`); err != nil { + t.Fatal(err) + } else if exp := fmt.Sprintf(`{"results":[{"series":[{"name":"cpu","tags":{"host":"server01"},"columns":["time","value"],"values":[["%s","disk full"]]}]}]}`, now.Format(time.RFC3339Nano)); exp != res { + t.Fatalf("unexpected results\nexp: %s\ngot: %s\n", exp, res) + } +} + +// Ensure the server can create a single point via line protocol with integer type and read it back. +func TestServer_Write_LineProtocol_Integer(t *testing.T) { + t.Parallel() + s := OpenServer(NewConfig()) + defer s.Close() + + if err := s.CreateDatabaseAndRetentionPolicy("db0", newRetentionPolicyInfo("rp0", 1, 1*time.Hour)); err != nil { + t.Fatal(err) + } + + now := now() + if res, err := s.Write("db0", "rp0", `cpu,host=server01 value=100 `+strconv.FormatInt(now.UnixNano(), 10), nil); err != nil { + t.Fatal(err) + } else if exp := ``; exp != res { + t.Fatalf("unexpected results\nexp: %s\ngot: %s\n", exp, res) + } + + // Verify the data was written. + if res, err := s.Query(`SELECT * FROM db0.rp0.cpu GROUP BY *`); err != nil { + t.Fatal(err) + } else if exp := fmt.Sprintf(`{"results":[{"series":[{"name":"cpu","tags":{"host":"server01"},"columns":["time","value"],"values":[["%s",100]]}]}]}`, now.Format(time.RFC3339Nano)); exp != res { + t.Fatalf("unexpected results\nexp: %s\ngot: %s\n", exp, res) + } +} + +// Ensure the server returns a partial write response when some points fail to parse. Also validate that +// the successfully parsed points can be queried. +func TestServer_Write_LineProtocol_Partial(t *testing.T) { + t.Parallel() + s := OpenServer(NewConfig()) + defer s.Close() + + if err := s.CreateDatabaseAndRetentionPolicy("db0", newRetentionPolicyInfo("rp0", 1, 1*time.Hour)); err != nil { + t.Fatal(err) + } + + now := now() + points := []string{ + "cpu,host=server01 value=100 " + strconv.FormatInt(now.UnixNano(), 10), + "cpu,host=server01 value=NaN " + strconv.FormatInt(now.UnixNano(), 20), + "cpu,host=server01 value=NaN " + strconv.FormatInt(now.UnixNano(), 30), + } + if res, err := s.Write("db0", "rp0", strings.Join(points, "\n"), nil); err == nil { + t.Fatal("expected error. got nil", err) + } else if exp := ``; exp != res { + t.Fatalf("unexpected results\nexp: %s\ngot: %s\n", exp, res) + } else if exp := "partial write"; !strings.Contains(err.Error(), exp) { + t.Fatalf("unexpected error: exp\nexp: %v\ngot: %v", exp, err) + } + + // Verify the data was written. + if res, err := s.Query(`SELECT * FROM db0.rp0.cpu GROUP BY *`); err != nil { + t.Fatal(err) + } else if exp := fmt.Sprintf(`{"results":[{"series":[{"name":"cpu","tags":{"host":"server01"},"columns":["time","value"],"values":[["%s",100]]}]}]}`, now.Format(time.RFC3339Nano)); exp != res { + t.Fatalf("unexpected results\nexp: %s\ngot: %s\n", exp, res) + } +} + +// Ensure the server can query with default databases (via param) and default retention policy +func TestServer_Query_DefaultDBAndRP(t *testing.T) { + t.Parallel() + s := OpenServer(NewConfig()) + defer s.Close() + + test := NewTest("db0", "rp0") + test.writes = Writes{ + &Write{data: fmt.Sprintf(`cpu value=1.0 %d`, mustParseTime(time.RFC3339Nano, "2000-01-01T01:00:00Z").UnixNano())}, + } + + test.addQueries([]*Query{ + &Query{ + name: "default db and rp", + params: url.Values{"db": []string{"db0"}}, + command: `SELECT * FROM cpu GROUP BY *`, + exp: `{"results":[{"series":[{"name":"cpu","columns":["time","value"],"values":[["2000-01-01T01:00:00Z",1]]}]}]}`, + }, + &Query{ + name: "default rp exists", + command: `show retention policies ON db0`, + exp: `{"results":[{"series":[{"columns":["name","duration","shardGroupDuration","replicaN","default"],"values":[["autogen","0","168h0m0s",1,false],["rp0","0","168h0m0s",1,true]]}]}]}`, + }, + &Query{ + name: "default rp", + command: `SELECT * FROM db0..cpu GROUP BY *`, + exp: `{"results":[{"series":[{"name":"cpu","columns":["time","value"],"values":[["2000-01-01T01:00:00Z",1]]}]}]}`, + }, + &Query{ + name: "default dp", + params: url.Values{"db": []string{"db0"}}, + command: `SELECT * FROM rp0.cpu GROUP BY *`, + exp: `{"results":[{"series":[{"name":"cpu","columns":["time","value"],"values":[["2000-01-01T01:00:00Z",1]]}]}]}`, + }, + }...) + + if err := test.init(s); err != nil { + t.Fatalf("test init failed: %s", err) + } + + for _, query := range test.queries { + if query.skip { + t.Logf("SKIP:: %s", query.name) + continue + } + if err := query.Execute(s); err != nil { + t.Error(query.Error(err)) + } else if !query.success() { + t.Error(query.failureMessage()) + } + } +} + +// Ensure the server can have a database with multiple measurements. +func TestServer_Query_Multiple_Measurements(t *testing.T) { + t.Parallel() + s := OpenServer(NewConfig()) + defer s.Close() + + // Make sure we do writes for measurements that will span across shards + writes := []string{ + fmt.Sprintf("cpu,host=server01 value=100,core=4 %d", mustParseTime(time.RFC3339Nano, "2000-01-01T00:00:00Z").UnixNano()), + fmt.Sprintf("cpu1,host=server02 value=50,core=2 %d", mustParseTime(time.RFC3339Nano, "2015-01-01T00:00:00Z").UnixNano()), + } + test := NewTest("db0", "rp0") + test.writes = Writes{ + &Write{data: strings.Join(writes, "\n")}, + } + + test.addQueries([]*Query{ + &Query{ + name: "measurement in one shard but not another shouldn't panic server", + command: `SELECT host,value FROM db0.rp0.cpu`, + exp: `{"results":[{"series":[{"name":"cpu","columns":["time","host","value"],"values":[["2000-01-01T00:00:00Z","server01",100]]}]}]}`, + }, + &Query{ + name: "measurement in one shard but not another shouldn't panic server", + command: `SELECT host,value FROM db0.rp0.cpu GROUP BY host`, + exp: `{"results":[{"series":[{"name":"cpu","tags":{"host":"server01"},"columns":["time","host","value"],"values":[["2000-01-01T00:00:00Z","server01",100]]}]}]}`, + }, + }...) + + if err := test.init(s); err != nil { + t.Fatalf("test init failed: %s", err) + } + + for _, query := range test.queries { + if query.skip { + t.Logf("SKIP:: %s", query.name) + continue + } + if err := query.Execute(s); err != nil { + t.Error(query.Error(err)) + } else if !query.success() { + t.Error(query.failureMessage()) + } + } +} + +// Ensure the server correctly supports data with identical tag values. +func TestServer_Query_IdenticalTagValues(t *testing.T) { + t.Parallel() + s := OpenServer(NewConfig()) + defer s.Close() + + writes := []string{ + fmt.Sprintf("cpu,t1=val1 value=1 %d", mustParseTime(time.RFC3339Nano, "2000-01-01T00:00:00Z").UnixNano()), + fmt.Sprintf("cpu,t2=val2 value=2 %d", mustParseTime(time.RFC3339Nano, "2000-01-01T00:01:00Z").UnixNano()), + fmt.Sprintf("cpu,t1=val2 value=3 %d", mustParseTime(time.RFC3339Nano, "2000-01-01T00:02:00Z").UnixNano()), + } + test := NewTest("db0", "rp0") + test.writes = Writes{ + &Write{data: strings.Join(writes, "\n")}, + } + + test.addQueries([]*Query{ + &Query{ + name: "measurements with identical tag values - SELECT *, no GROUP BY", + command: `SELECT * FROM db0.rp0.cpu GROUP BY *`, + exp: `{"results":[{"series":[{"name":"cpu","tags":{"t1":"","t2":"val2"},"columns":["time","value"],"values":[["2000-01-01T00:01:00Z",2]]},{"name":"cpu","tags":{"t1":"val1","t2":""},"columns":["time","value"],"values":[["2000-01-01T00:00:00Z",1]]},{"name":"cpu","tags":{"t1":"val2","t2":""},"columns":["time","value"],"values":[["2000-01-01T00:02:00Z",3]]}]}]}`, + }, + &Query{ + name: "measurements with identical tag values - SELECT *, with GROUP BY", + command: `SELECT value FROM db0.rp0.cpu GROUP BY t1,t2`, + exp: `{"results":[{"series":[{"name":"cpu","tags":{"t1":"","t2":"val2"},"columns":["time","value"],"values":[["2000-01-01T00:01:00Z",2]]},{"name":"cpu","tags":{"t1":"val1","t2":""},"columns":["time","value"],"values":[["2000-01-01T00:00:00Z",1]]},{"name":"cpu","tags":{"t1":"val2","t2":""},"columns":["time","value"],"values":[["2000-01-01T00:02:00Z",3]]}]}]}`, + }, + &Query{ + name: "measurements with identical tag values - SELECT value no GROUP BY", + command: `SELECT value FROM db0.rp0.cpu`, + exp: `{"results":[{"series":[{"name":"cpu","columns":["time","value"],"values":[["2000-01-01T00:00:00Z",1],["2000-01-01T00:01:00Z",2],["2000-01-01T00:02:00Z",3]]}]}]}`, + }, + }...) + + if err := test.init(s); err != nil { + t.Fatalf("test init failed: %s", err) + } + + for _, query := range test.queries { + if query.skip { + t.Logf("SKIP:: %s", query.name) + continue + } + if err := query.Execute(s); err != nil { + t.Error(query.Error(err)) + } else if !query.success() { + t.Error(query.failureMessage()) + } + } +} + +// Ensure the server can handle a query that involves accessing no shards. +func TestServer_Query_NoShards(t *testing.T) { + t.Parallel() + s := OpenServer(NewConfig()) + defer s.Close() + + now := now() + + test := NewTest("db0", "rp0") + test.writes = Writes{ + &Write{data: `cpu,host=server01 value=1 ` + strconv.FormatInt(now.UnixNano(), 10)}, + } + + test.addQueries([]*Query{ + &Query{ + name: "selecting value should succeed", + command: `SELECT value FROM db0.rp0.cpu WHERE time < now() - 1d`, + exp: `{"results":[{}]}`, + }, + }...) + + if err := test.init(s); err != nil { + t.Fatalf("test init failed: %s", err) + } + + for _, query := range test.queries { + if query.skip { + t.Logf("SKIP:: %s", query.name) + continue + } + if err := query.Execute(s); err != nil { + t.Error(query.Error(err)) + } else if !query.success() { + t.Error(query.failureMessage()) + } + } +} + +// Ensure the server can query a non-existent field +func TestServer_Query_NonExistent(t *testing.T) { + t.Parallel() + s := OpenServer(NewConfig()) + defer s.Close() + + now := now() + + test := NewTest("db0", "rp0") + test.writes = Writes{ + &Write{data: `cpu,host=server01 value=1 ` + strconv.FormatInt(now.UnixNano(), 10)}, + } + + test.addQueries([]*Query{ + &Query{ + name: "selecting value should succeed", + command: `SELECT value FROM db0.rp0.cpu`, + exp: fmt.Sprintf(`{"results":[{"series":[{"name":"cpu","columns":["time","value"],"values":[["%s",1]]}]}]}`, now.Format(time.RFC3339Nano)), + }, + &Query{ + name: "selecting non-existent should succeed", + command: `SELECT foo FROM db0.rp0.cpu`, + exp: `{"results":[{}]}`, + }, + }...) + + if err := test.init(s); err != nil { + t.Fatalf("test init failed: %s", err) + } + + for _, query := range test.queries { + if query.skip { + t.Logf("SKIP:: %s", query.name) + continue + } + if err := query.Execute(s); err != nil { + t.Error(query.Error(err)) + } else if !query.success() { + t.Error(query.failureMessage()) + } + } +} + +// Ensure the server can perform basic math +func TestServer_Query_Math(t *testing.T) { + t.Parallel() + s := OpenServer(NewConfig()) + defer s.Close() + + now := now() + writes := []string{ + "float value=42 " + strconv.FormatInt(now.UnixNano(), 10), + "integer value=42i " + strconv.FormatInt(now.UnixNano(), 10), + } + + test := NewTest("db", "rp") + test.writes = Writes{ + &Write{data: strings.Join(writes, "\n")}, + } + + test.addQueries([]*Query{ + &Query{ + name: "SELECT multiple of float value", + command: `SELECT value * 2 from db.rp.float`, + exp: fmt.Sprintf(`{"results":[{"series":[{"name":"float","columns":["time","value"],"values":[["%s",84]]}]}]}`, now.Format(time.RFC3339Nano)), + }, + &Query{ + name: "SELECT multiple of float value", + command: `SELECT 2 * value from db.rp.float`, + exp: fmt.Sprintf(`{"results":[{"series":[{"name":"float","columns":["time","value"],"values":[["%s",84]]}]}]}`, now.Format(time.RFC3339Nano)), + }, + &Query{ + name: "SELECT multiple of integer value", + command: `SELECT value * 2 from db.rp.integer`, + exp: fmt.Sprintf(`{"results":[{"series":[{"name":"integer","columns":["time","value"],"values":[["%s",84]]}]}]}`, now.Format(time.RFC3339Nano)), + }, + &Query{ + name: "SELECT float multiple of integer value", + command: `SELECT value * 2.0 from db.rp.integer`, + exp: fmt.Sprintf(`{"results":[{"series":[{"name":"integer","columns":["time","value"],"values":[["%s",84]]}]}]}`, now.Format(time.RFC3339Nano)), + }, + &Query{ + name: "SELECT square of float value", + command: `SELECT value * value from db.rp.float`, + exp: fmt.Sprintf(`{"results":[{"series":[{"name":"float","columns":["time","value_value"],"values":[["%s",1764]]}]}]}`, now.Format(time.RFC3339Nano)), + }, + &Query{ + name: "SELECT square of integer value", + command: `SELECT value * value from db.rp.integer`, + exp: fmt.Sprintf(`{"results":[{"series":[{"name":"integer","columns":["time","value_value"],"values":[["%s",1764]]}]}]}`, now.Format(time.RFC3339Nano)), + }, + &Query{ + name: "SELECT square of integer, float value", + command: `SELECT value * value,float from db.rp.integer`, + exp: fmt.Sprintf(`{"results":[{"series":[{"name":"integer","columns":["time","value_value","float"],"values":[["%s",1764,null]]}]}]}`, now.Format(time.RFC3339Nano)), + }, + &Query{ + name: "SELECT square of integer value with alias", + command: `SELECT value * value as square from db.rp.integer`, + exp: fmt.Sprintf(`{"results":[{"series":[{"name":"integer","columns":["time","square"],"values":[["%s",1764]]}]}]}`, now.Format(time.RFC3339Nano)), + }, + &Query{ + name: "SELECT sum of aggregates", + command: `SELECT max(value) + min(value) from db.rp.integer`, + exp: fmt.Sprintf(`{"results":[{"series":[{"name":"integer","columns":["time","max_min"],"values":[["1970-01-01T00:00:00Z",84]]}]}]}`), + }, + &Query{ + name: "SELECT square of enclosed integer value", + command: `SELECT ((value) * (value)) from db.rp.integer`, + exp: fmt.Sprintf(`{"results":[{"series":[{"name":"integer","columns":["time","value_value"],"values":[["%s",1764]]}]}]}`, now.Format(time.RFC3339Nano)), + }, + &Query{ + name: "SELECT square of enclosed integer value", + command: `SELECT (value * value) from db.rp.integer`, + exp: fmt.Sprintf(`{"results":[{"series":[{"name":"integer","columns":["time","value_value"],"values":[["%s",1764]]}]}]}`, now.Format(time.RFC3339Nano)), + }, + }...) + + if err := test.init(s); err != nil { + t.Fatalf("test init failed: %s", err) + } + + for _, query := range test.queries { + if query.skip { + t.Logf("SKIP:: %s", query.name) + continue + } + if err := query.Execute(s); err != nil { + t.Error(query.Error(err)) + } else if !query.success() { + t.Error(query.failureMessage()) + } + } +} + +// Ensure the server can query with the count aggregate function +func TestServer_Query_Count(t *testing.T) { + t.Parallel() + s := OpenServer(NewConfig()) + defer s.Close() + + now := now() + + test := NewTest("db0", "rp0") + writes := []string{ + `cpu,host=server01 value=1.0 ` + strconv.FormatInt(now.UnixNano(), 10), + `ram value1=1.0,value2=2.0 ` + strconv.FormatInt(now.UnixNano(), 10), + } + + test.writes = Writes{ + &Write{data: strings.Join(writes, "\n")}, + } + + hour_ago := now.Add(-time.Hour).UTC() + + test.addQueries([]*Query{ + &Query{ + name: "selecting count(value) should succeed", + command: `SELECT count(value) FROM db0.rp0.cpu`, + exp: `{"results":[{"series":[{"name":"cpu","columns":["time","count"],"values":[["1970-01-01T00:00:00Z",1]]}]}]}`, + }, + &Query{ + name: "selecting count(value) with where time should return result", + command: fmt.Sprintf(`SELECT count(value) FROM db0.rp0.cpu WHERE time >= '%s'`, hour_ago.Format(time.RFC3339Nano)), + exp: fmt.Sprintf(`{"results":[{"series":[{"name":"cpu","columns":["time","count"],"values":[["%s",1]]}]}]}`, hour_ago.Format(time.RFC3339Nano)), + }, + &Query{ + name: "selecting count(value) with filter that excludes all results should return 0", + command: fmt.Sprintf(`SELECT count(value) FROM db0.rp0.cpu WHERE value=100 AND time >= '%s'`, hour_ago.Format(time.RFC3339Nano)), + exp: `{"results":[{}]}`, + }, + &Query{ + name: "selecting count(value1) with matching filter against value2 should return correct result", + command: fmt.Sprintf(`SELECT count(value1) FROM db0.rp0.ram WHERE value2=2 AND time >= '%s'`, hour_ago.Format(time.RFC3339Nano)), + exp: fmt.Sprintf(`{"results":[{"series":[{"name":"ram","columns":["time","count"],"values":[["%s",1]]}]}]}`, hour_ago.Format(time.RFC3339Nano)), + }, + &Query{ + name: "selecting count(value1) with non-matching filter against value2 should return correct result", + command: fmt.Sprintf(`SELECT count(value1) FROM db0.rp0.ram WHERE value2=3 AND time >= '%s'`, hour_ago.Format(time.RFC3339Nano)), + exp: `{"results":[{}]}`, + }, + &Query{ + name: "selecting count(*) should error", + command: `SELECT count(*) FROM db0.rp0.cpu`, + exp: `{"error":"error parsing query: expected field argument in count()"}`, + }, + }...) + + if err := test.init(s); err != nil { + t.Fatalf("test init failed: %s", err) + } + + for _, query := range test.queries { + if query.skip { + t.Logf("SKIP:: %s", query.name) + continue + } + if err := query.Execute(s); err != nil { + t.Error(query.Error(err)) + } else if !query.success() { + t.Error(query.failureMessage()) + } + } +} + +// Ensure the server can query with Now(). +func TestServer_Query_Now(t *testing.T) { + t.Parallel() + s := OpenServer(NewConfig()) + defer s.Close() + + now := now() + + test := NewTest("db0", "rp0") + test.writes = Writes{ + &Write{data: `cpu,host=server01 value=1.0 ` + strconv.FormatInt(now.UnixNano(), 10)}, + } + + test.addQueries([]*Query{ + &Query{ + name: "where with time < now() should work", + command: `SELECT * FROM db0.rp0.cpu where time < now()`, + exp: fmt.Sprintf(`{"results":[{"series":[{"name":"cpu","columns":["time","host","value"],"values":[["%s","server01",1]]}]}]}`, now.Format(time.RFC3339Nano)), + }, + &Query{ + name: "where with time < now() and GROUP BY * should work", + command: `SELECT * FROM db0.rp0.cpu where time < now() GROUP BY *`, + exp: fmt.Sprintf(`{"results":[{"series":[{"name":"cpu","tags":{"host":"server01"},"columns":["time","value"],"values":[["%s",1]]}]}]}`, now.Format(time.RFC3339Nano)), + }, + &Query{ + name: "where with time > now() should return an empty result", + command: `SELECT * FROM db0.rp0.cpu where time > now()`, + exp: `{"results":[{}]}`, + }, + &Query{ + name: "where with time > now() with GROUP BY * should return an empty result", + command: `SELECT * FROM db0.rp0.cpu where time > now() GROUP BY *`, + exp: `{"results":[{}]}`, + }, + }...) + + if err := test.init(s); err != nil { + t.Fatalf("test init failed: %s", err) + } + + for _, query := range test.queries { + if query.skip { + t.Logf("SKIP:: %s", query.name) + continue + } + if err := query.Execute(s); err != nil { + t.Error(query.Error(err)) + } else if !query.success() { + t.Error(query.failureMessage()) + } + } +} + +// Ensure the server can query with epoch precisions. +func TestServer_Query_EpochPrecision(t *testing.T) { + t.Parallel() + s := OpenServer(NewConfig()) + defer s.Close() + + now := now() + + test := NewTest("db0", "rp0") + test.writes = Writes{ + &Write{data: `cpu,host=server01 value=1.0 ` + strconv.FormatInt(now.UnixNano(), 10)}, + } + + test.addQueries([]*Query{ + &Query{ + name: "nanosecond precision", + command: `SELECT * FROM db0.rp0.cpu GROUP BY *`, + params: url.Values{"epoch": []string{"n"}}, + exp: fmt.Sprintf(`{"results":[{"series":[{"name":"cpu","tags":{"host":"server01"},"columns":["time","value"],"values":[[%d,1]]}]}]}`, now.UnixNano()), + }, + &Query{ + name: "microsecond precision", + command: `SELECT * FROM db0.rp0.cpu GROUP BY *`, + params: url.Values{"epoch": []string{"u"}}, + exp: fmt.Sprintf(`{"results":[{"series":[{"name":"cpu","tags":{"host":"server01"},"columns":["time","value"],"values":[[%d,1]]}]}]}`, now.UnixNano()/int64(time.Microsecond)), + }, + &Query{ + name: "millisecond precision", + command: `SELECT * FROM db0.rp0.cpu GROUP BY *`, + params: url.Values{"epoch": []string{"ms"}}, + exp: fmt.Sprintf(`{"results":[{"series":[{"name":"cpu","tags":{"host":"server01"},"columns":["time","value"],"values":[[%d,1]]}]}]}`, now.UnixNano()/int64(time.Millisecond)), + }, + &Query{ + name: "second precision", + command: `SELECT * FROM db0.rp0.cpu GROUP BY *`, + params: url.Values{"epoch": []string{"s"}}, + exp: fmt.Sprintf(`{"results":[{"series":[{"name":"cpu","tags":{"host":"server01"},"columns":["time","value"],"values":[[%d,1]]}]}]}`, now.UnixNano()/int64(time.Second)), + }, + &Query{ + name: "minute precision", + command: `SELECT * FROM db0.rp0.cpu GROUP BY *`, + params: url.Values{"epoch": []string{"m"}}, + exp: fmt.Sprintf(`{"results":[{"series":[{"name":"cpu","tags":{"host":"server01"},"columns":["time","value"],"values":[[%d,1]]}]}]}`, now.UnixNano()/int64(time.Minute)), + }, + &Query{ + name: "hour precision", + command: `SELECT * FROM db0.rp0.cpu GROUP BY *`, + params: url.Values{"epoch": []string{"h"}}, + exp: fmt.Sprintf(`{"results":[{"series":[{"name":"cpu","tags":{"host":"server01"},"columns":["time","value"],"values":[[%d,1]]}]}]}`, now.UnixNano()/int64(time.Hour)), + }, + }...) + + if err := test.init(s); err != nil { + t.Fatalf("test init failed: %s", err) + } + + for _, query := range test.queries { + if query.skip { + t.Logf("SKIP:: %s", query.name) + continue + } + if err := query.Execute(s); err != nil { + t.Error(query.Error(err)) + } else if !query.success() { + t.Error(query.failureMessage()) + } + } +} + +// Ensure the server works with tag queries. +func TestServer_Query_Tags(t *testing.T) { + t.Parallel() + s := OpenServer(NewConfig()) + defer s.Close() + + now := now() + + writes := []string{ + fmt.Sprintf("cpu,host=server01 value=100,core=4 %d", now.UnixNano()), + fmt.Sprintf("cpu,host=server02 value=50,core=2 %d", now.Add(1).UnixNano()), + + fmt.Sprintf("cpu1,host=server01,region=us-west value=100 %d", mustParseTime(time.RFC3339Nano, "2015-02-28T01:03:36.703820946Z").UnixNano()), + fmt.Sprintf("cpu1,host=server02 value=200 %d", mustParseTime(time.RFC3339Nano, "2010-02-28T01:03:37.703820946Z").UnixNano()), + fmt.Sprintf("cpu1,host=server03 value=300 %d", mustParseTime(time.RFC3339Nano, "2012-02-28T01:03:38.703820946Z").UnixNano()), + + fmt.Sprintf("cpu2,host=server01 value=100 %d", mustParseTime(time.RFC3339Nano, "2015-02-28T01:03:36.703820946Z").UnixNano()), + fmt.Sprintf("cpu2 value=200 %d", mustParseTime(time.RFC3339Nano, "2012-02-28T01:03:38.703820946Z").UnixNano()), + + fmt.Sprintf("cpu3,company=acme01 value=100 %d", mustParseTime(time.RFC3339Nano, "2015-02-28T01:03:36.703820946Z").UnixNano()), + fmt.Sprintf("cpu3 value=200 %d", mustParseTime(time.RFC3339Nano, "2012-02-28T01:03:38.703820946Z").UnixNano()), + + fmt.Sprintf("status_code,url=http://www.example.com value=404 %d", mustParseTime(time.RFC3339Nano, "2015-07-22T08:13:54.929026672Z").UnixNano()), + fmt.Sprintf("status_code,url=https://influxdb.com value=418 %d", mustParseTime(time.RFC3339Nano, "2015-07-22T09:52:24.914395083Z").UnixNano()), + } + + test := NewTest("db0", "rp0") + test.writes = Writes{ + &Write{data: strings.Join(writes, "\n")}, + } + + test.addQueries([]*Query{ + &Query{ + name: "tag without field should return error", + command: `SELECT host FROM db0.rp0.cpu`, + exp: `{"results":[{"error":"statement must have at least one field in select clause"}]}`, + skip: true, // FIXME(benbjohnson): tags should stream as values + }, + &Query{ + name: "field with tag should succeed", + command: `SELECT host, value FROM db0.rp0.cpu`, + exp: fmt.Sprintf(`{"results":[{"series":[{"name":"cpu","columns":["time","host","value"],"values":[["%s","server01",100],["%s","server02",50]]}]}]}`, now.Format(time.RFC3339Nano), now.Add(1).Format(time.RFC3339Nano)), + }, + &Query{ + name: "field with tag and GROUP BY should succeed", + command: `SELECT host, value FROM db0.rp0.cpu GROUP BY host`, + exp: fmt.Sprintf(`{"results":[{"series":[{"name":"cpu","tags":{"host":"server01"},"columns":["time","host","value"],"values":[["%s","server01",100]]},{"name":"cpu","tags":{"host":"server02"},"columns":["time","host","value"],"values":[["%s","server02",50]]}]}]}`, now.Format(time.RFC3339Nano), now.Add(1).Format(time.RFC3339Nano)), + }, + &Query{ + name: "field with two tags should succeed", + command: `SELECT host, value, core FROM db0.rp0.cpu`, + exp: fmt.Sprintf(`{"results":[{"series":[{"name":"cpu","columns":["time","host","value","core"],"values":[["%s","server01",100,4],["%s","server02",50,2]]}]}]}`, now.Format(time.RFC3339Nano), now.Add(1).Format(time.RFC3339Nano)), + }, + &Query{ + name: "field with two tags and GROUP BY should succeed", + command: `SELECT host, value, core FROM db0.rp0.cpu GROUP BY host`, + exp: fmt.Sprintf(`{"results":[{"series":[{"name":"cpu","tags":{"host":"server01"},"columns":["time","host","value","core"],"values":[["%s","server01",100,4]]},{"name":"cpu","tags":{"host":"server02"},"columns":["time","host","value","core"],"values":[["%s","server02",50,2]]}]}]}`, now.Format(time.RFC3339Nano), now.Add(1).Format(time.RFC3339Nano)), + }, + &Query{ + name: "select * with tags should succeed", + command: `SELECT * FROM db0.rp0.cpu`, + exp: fmt.Sprintf(`{"results":[{"series":[{"name":"cpu","columns":["time","core","host","value"],"values":[["%s",4,"server01",100],["%s",2,"server02",50]]}]}]}`, now.Format(time.RFC3339Nano), now.Add(1).Format(time.RFC3339Nano)), + }, + &Query{ + name: "select * with tags with GROUP BY * should succeed", + command: `SELECT * FROM db0.rp0.cpu GROUP BY *`, + exp: fmt.Sprintf(`{"results":[{"series":[{"name":"cpu","tags":{"host":"server01"},"columns":["time","core","value"],"values":[["%s",4,100]]},{"name":"cpu","tags":{"host":"server02"},"columns":["time","core","value"],"values":[["%s",2,50]]}]}]}`, now.Format(time.RFC3339Nano), now.Add(1).Format(time.RFC3339Nano)), + }, + &Query{ + name: "group by tag", + command: `SELECT value FROM db0.rp0.cpu GROUP by host`, + exp: fmt.Sprintf(`{"results":[{"series":[{"name":"cpu","tags":{"host":"server01"},"columns":["time","value"],"values":[["%s",100]]},{"name":"cpu","tags":{"host":"server02"},"columns":["time","value"],"values":[["%s",50]]}]}]}`, now.Format(time.RFC3339Nano), now.Add(1).Format(time.RFC3339Nano)), + }, + &Query{ + name: "single field (EQ tag value1)", + command: `SELECT value FROM db0.rp0.cpu1 WHERE host = 'server01'`, + exp: `{"results":[{"series":[{"name":"cpu1","columns":["time","value"],"values":[["2015-02-28T01:03:36.703820946Z",100]]}]}]}`, + }, + &Query{ + name: "single field (2 EQ tags)", + command: `SELECT value FROM db0.rp0.cpu1 WHERE host = 'server01' AND region = 'us-west'`, + exp: `{"results":[{"series":[{"name":"cpu1","columns":["time","value"],"values":[["2015-02-28T01:03:36.703820946Z",100]]}]}]}`, + }, + &Query{ + name: "single field (OR different tags)", + command: `SELECT value FROM db0.rp0.cpu1 WHERE host = 'server03' OR region = 'us-west'`, + exp: `{"results":[{"series":[{"name":"cpu1","columns":["time","value"],"values":[["2012-02-28T01:03:38.703820946Z",300],["2015-02-28T01:03:36.703820946Z",100]]}]}]}`, + }, + &Query{ + name: "single field (OR with non-existent tag value)", + command: `SELECT value FROM db0.rp0.cpu1 WHERE host = 'server01' OR host = 'server66'`, + exp: `{"results":[{"series":[{"name":"cpu1","columns":["time","value"],"values":[["2015-02-28T01:03:36.703820946Z",100]]}]}]}`, + }, + &Query{ + name: "single field (OR with all tag values)", + command: `SELECT value FROM db0.rp0.cpu1 WHERE host = 'server01' OR host = 'server02' OR host = 'server03'`, + exp: `{"results":[{"series":[{"name":"cpu1","columns":["time","value"],"values":[["2010-02-28T01:03:37.703820946Z",200],["2012-02-28T01:03:38.703820946Z",300],["2015-02-28T01:03:36.703820946Z",100]]}]}]}`, + }, + &Query{ + name: "single field (1 EQ and 1 NEQ tag)", + command: `SELECT value FROM db0.rp0.cpu1 WHERE host = 'server01' AND region != 'us-west'`, + exp: `{"results":[{}]}`, + }, + &Query{ + name: "single field (EQ tag value2)", + command: `SELECT value FROM db0.rp0.cpu1 WHERE host = 'server02'`, + exp: `{"results":[{"series":[{"name":"cpu1","columns":["time","value"],"values":[["2010-02-28T01:03:37.703820946Z",200]]}]}]}`, + }, + &Query{ + name: "single field (NEQ tag value1)", + command: `SELECT value FROM db0.rp0.cpu1 WHERE host != 'server01'`, + exp: `{"results":[{"series":[{"name":"cpu1","columns":["time","value"],"values":[["2010-02-28T01:03:37.703820946Z",200],["2012-02-28T01:03:38.703820946Z",300]]}]}]}`, + }, + &Query{ + name: "single field (NEQ tag value1 AND NEQ tag value2)", + command: `SELECT value FROM db0.rp0.cpu1 WHERE host != 'server01' AND host != 'server02'`, + exp: `{"results":[{"series":[{"name":"cpu1","columns":["time","value"],"values":[["2012-02-28T01:03:38.703820946Z",300]]}]}]}`, + }, + &Query{ + name: "single field (NEQ tag value1 OR NEQ tag value2)", + command: `SELECT value FROM db0.rp0.cpu1 WHERE host != 'server01' OR host != 'server02'`, // Yes, this is always true, but that's the point. + exp: `{"results":[{"series":[{"name":"cpu1","columns":["time","value"],"values":[["2010-02-28T01:03:37.703820946Z",200],["2012-02-28T01:03:38.703820946Z",300],["2015-02-28T01:03:36.703820946Z",100]]}]}]}`, + }, + &Query{ + name: "single field (NEQ tag value1 AND NEQ tag value2 AND NEQ tag value3)", + command: `SELECT value FROM db0.rp0.cpu1 WHERE host != 'server01' AND host != 'server02' AND host != 'server03'`, + exp: `{"results":[{}]}`, + }, + &Query{ + name: "single field (NEQ tag value1, point without any tags)", + command: `SELECT value FROM db0.rp0.cpu2 WHERE host != 'server01'`, + exp: `{"results":[{"series":[{"name":"cpu2","columns":["time","value"],"values":[["2012-02-28T01:03:38.703820946Z",200]]}]}]}`, + }, + &Query{ + name: "single field (NEQ tag value1, point without any tags)", + command: `SELECT value FROM db0.rp0.cpu3 WHERE company !~ /acme01/`, + exp: `{"results":[{"series":[{"name":"cpu3","columns":["time","value"],"values":[["2012-02-28T01:03:38.703820946Z",200]]}]}]}`, + }, + &Query{ + name: "single field (regex tag match)", + command: `SELECT value FROM db0.rp0.cpu3 WHERE company =~ /acme01/`, + exp: `{"results":[{"series":[{"name":"cpu3","columns":["time","value"],"values":[["2015-02-28T01:03:36.703820946Z",100]]}]}]}`, + }, + &Query{ + name: "single field (regex tag match)", + command: `SELECT value FROM db0.rp0.cpu3 WHERE company !~ /acme[23]/`, + exp: `{"results":[{"series":[{"name":"cpu3","columns":["time","value"],"values":[["2012-02-28T01:03:38.703820946Z",200],["2015-02-28T01:03:36.703820946Z",100]]}]}]}`, + }, + &Query{ + name: "single field (regex tag match with escaping)", + command: `SELECT value FROM db0.rp0.status_code WHERE url !~ /https\:\/\/influxdb\.com/`, + exp: `{"results":[{"series":[{"name":"status_code","columns":["time","value"],"values":[["2015-07-22T08:13:54.929026672Z",404]]}]}]}`, + }, + &Query{ + name: "single field (regex tag match with escaping)", + command: `SELECT value FROM db0.rp0.status_code WHERE url =~ /https\:\/\/influxdb\.com/`, + exp: `{"results":[{"series":[{"name":"status_code","columns":["time","value"],"values":[["2015-07-22T09:52:24.914395083Z",418]]}]}]}`, + }, + }...) + + if err := test.init(s); err != nil { + t.Fatalf("test init failed: %s", err) + } + + for _, query := range test.queries { + if query.skip { + t.Logf("SKIP:: %s", query.name) + continue + } + if err := query.Execute(s); err != nil { + t.Error(query.Error(err)) + } else if !query.success() { + t.Error(query.failureMessage()) + } + } +} + +// Ensure the server correctly queries with an alias. +func TestServer_Query_Alias(t *testing.T) { + t.Parallel() + s := OpenServer(NewConfig()) + defer s.Close() + + writes := []string{ + fmt.Sprintf("cpu value=1i,steps=3i %d", mustParseTime(time.RFC3339Nano, "2000-01-01T00:00:00Z").UnixNano()), + fmt.Sprintf("cpu value=2i,steps=4i %d", mustParseTime(time.RFC3339Nano, "2000-01-01T00:01:00Z").UnixNano()), + } + test := NewTest("db0", "rp0") + test.writes = Writes{ + &Write{data: strings.Join(writes, "\n")}, + } + + test.addQueries([]*Query{ + &Query{ + name: "baseline query - SELECT * FROM db0.rp0.cpu", + command: `SELECT * FROM db0.rp0.cpu`, + exp: `{"results":[{"series":[{"name":"cpu","columns":["time","steps","value"],"values":[["2000-01-01T00:00:00Z",3,1],["2000-01-01T00:01:00Z",4,2]]}]}]}`, + }, + &Query{ + name: "basic query with alias - SELECT steps, value as v FROM db0.rp0.cpu", + command: `SELECT steps, value as v FROM db0.rp0.cpu`, + exp: `{"results":[{"series":[{"name":"cpu","columns":["time","steps","v"],"values":[["2000-01-01T00:00:00Z",3,1],["2000-01-01T00:01:00Z",4,2]]}]}]}`, + }, + &Query{ + name: "double aggregate sum - SELECT sum(value), sum(steps) FROM db0.rp0.cpu", + command: `SELECT sum(value), sum(steps) FROM db0.rp0.cpu`, + exp: `{"results":[{"series":[{"name":"cpu","columns":["time","sum","sum_1"],"values":[["1970-01-01T00:00:00Z",3,7]]}]}]}`, + }, + &Query{ + name: "double aggregate sum reverse order - SELECT sum(steps), sum(value) FROM db0.rp0.cpu", + command: `SELECT sum(steps), sum(value) FROM db0.rp0.cpu`, + exp: `{"results":[{"series":[{"name":"cpu","columns":["time","sum","sum_1"],"values":[["1970-01-01T00:00:00Z",7,3]]}]}]}`, + }, + &Query{ + name: "double aggregate sum with alias - SELECT sum(value) as sumv, sum(steps) as sums FROM db0.rp0.cpu", + command: `SELECT sum(value) as sumv, sum(steps) as sums FROM db0.rp0.cpu`, + exp: `{"results":[{"series":[{"name":"cpu","columns":["time","sumv","sums"],"values":[["1970-01-01T00:00:00Z",3,7]]}]}]}`, + }, + &Query{ + name: "double aggregate with same value - SELECT sum(value), mean(value) FROM db0.rp0.cpu", + command: `SELECT sum(value), mean(value) FROM db0.rp0.cpu`, + exp: `{"results":[{"series":[{"name":"cpu","columns":["time","sum","mean"],"values":[["1970-01-01T00:00:00Z",3,1.5]]}]}]}`, + }, + &Query{ + name: "double aggregate with same value and same alias - SELECT mean(value) as mv, max(value) as mv FROM db0.rp0.cpu", + command: `SELECT mean(value) as mv, max(value) as mv FROM db0.rp0.cpu`, + exp: `{"results":[{"series":[{"name":"cpu","columns":["time","mv","mv"],"values":[["1970-01-01T00:00:00Z",1.5,2]]}]}]}`, + }, + &Query{ + name: "double aggregate with non-existent field - SELECT mean(value), max(foo) FROM db0.rp0.cpu", + command: `SELECT mean(value), max(foo) FROM db0.rp0.cpu`, + exp: `{"results":[{"series":[{"name":"cpu","columns":["time","mean","max"],"values":[["1970-01-01T00:00:00Z",1.5,null]]}]}]}`, + }, + }...) + + if err := test.init(s); err != nil { + t.Fatalf("test init failed: %s", err) + } + + for _, query := range test.queries { + if query.skip { + t.Logf("SKIP:: %s", query.name) + continue + } + if err := query.Execute(s); err != nil { + t.Error(query.Error(err)) + } else if !query.success() { + t.Error(query.failureMessage()) + } + } +} + +// Ensure the server will succeed and error for common scenarios. +func TestServer_Query_Common(t *testing.T) { + t.Parallel() + s := OpenServer(NewConfig()) + defer s.Close() + + now := now() + + test := NewTest("db0", "rp0") + test.writes = Writes{ + &Write{data: fmt.Sprintf("cpu,host=server01 value=1 %s", strconv.FormatInt(now.UnixNano(), 10))}, + } + + test.addQueries([]*Query{ + &Query{ + name: "selecting a from a non-existent database should error", + command: `SELECT value FROM db1.rp0.cpu`, + exp: `{"results":[{"error":"database not found: db1"}]}`, + }, + &Query{ + name: "selecting a from a non-existent retention policy should error", + command: `SELECT value FROM db0.rp1.cpu`, + exp: `{"results":[{"error":"retention policy not found: rp1"}]}`, + }, + &Query{ + name: "selecting a valid measurement and field should succeed", + command: `SELECT value FROM db0.rp0.cpu`, + exp: fmt.Sprintf(`{"results":[{"series":[{"name":"cpu","columns":["time","value"],"values":[["%s",1]]}]}]}`, now.Format(time.RFC3339Nano)), + }, + &Query{ + name: "explicitly selecting time and a valid measurement and field should succeed", + command: `SELECT time,value FROM db0.rp0.cpu`, + exp: fmt.Sprintf(`{"results":[{"series":[{"name":"cpu","columns":["time","value"],"values":[["%s",1]]}]}]}`, now.Format(time.RFC3339Nano)), + }, + &Query{ + name: "selecting a measurement that doesn't exist should result in empty set", + command: `SELECT value FROM db0.rp0.idontexist`, + exp: `{"results":[{}]}`, + }, + &Query{ + name: "selecting a field that doesn't exist should result in empty set", + command: `SELECT idontexist FROM db0.rp0.cpu`, + exp: `{"results":[{}]}`, + }, + &Query{ + name: "selecting wildcard without specifying a database should error", + command: `SELECT * FROM cpu`, + exp: `{"results":[{"error":"database name required"}]}`, + }, + &Query{ + name: "selecting explicit field without specifying a database should error", + command: `SELECT value FROM cpu`, + exp: `{"results":[{"error":"database name required"}]}`, + }, + }...) + + if err := test.init(s); err != nil { + t.Fatalf("test init failed: %s", err) + } + + for _, query := range test.queries { + if query.skip { + t.Logf("SKIP:: %s", query.name) + continue + } + if err := query.Execute(s); err != nil { + t.Error(query.Error(err)) + } else if !query.success() { + t.Error(query.failureMessage()) + } + } +} + +// Ensure the server can query two points. +func TestServer_Query_SelectTwoPoints(t *testing.T) { + t.Parallel() + s := OpenServer(NewConfig()) + defer s.Close() + + now := now() + + test := NewTest("db0", "rp0") + test.writes = Writes{ + &Write{data: fmt.Sprintf("cpu value=100 %s\ncpu value=200 %s", strconv.FormatInt(now.UnixNano(), 10), strconv.FormatInt(now.Add(1).UnixNano(), 10))}, + } + + test.addQueries( + &Query{ + name: "selecting two points should result in two points", + command: `SELECT * FROM db0.rp0.cpu`, + exp: fmt.Sprintf(`{"results":[{"series":[{"name":"cpu","columns":["time","value"],"values":[["%s",100],["%s",200]]}]}]}`, now.Format(time.RFC3339Nano), now.Add(1).Format(time.RFC3339Nano)), + }, + &Query{ + name: "selecting two points with GROUP BY * should result in two points", + command: `SELECT * FROM db0.rp0.cpu GROUP BY *`, + exp: fmt.Sprintf(`{"results":[{"series":[{"name":"cpu","columns":["time","value"],"values":[["%s",100],["%s",200]]}]}]}`, now.Format(time.RFC3339Nano), now.Add(1).Format(time.RFC3339Nano)), + }, + ) + + for i, query := range test.queries { + if i == 0 { + if err := test.init(s); err != nil { + t.Fatalf("test init failed: %s", err) + } + } + if query.skip { + t.Logf("SKIP:: %s", query.name) + continue + } + if err := query.Execute(s); err != nil { + t.Error(query.Error(err)) + } else if !query.success() { + t.Error(query.failureMessage()) + } + } +} + +// Ensure the server can query two negative points. +func TestServer_Query_SelectTwoNegativePoints(t *testing.T) { + t.Parallel() + s := OpenServer(NewConfig()) + defer s.Close() + + now := now() + + test := NewTest("db0", "rp0") + test.writes = Writes{ + &Write{data: fmt.Sprintf("cpu value=-100 %s\ncpu value=-200 %s", strconv.FormatInt(now.UnixNano(), 10), strconv.FormatInt(now.Add(1).UnixNano(), 10))}, + } + + test.addQueries(&Query{ + name: "selecting two negative points should succeed", + command: `SELECT * FROM db0.rp0.cpu`, + exp: fmt.Sprintf(`{"results":[{"series":[{"name":"cpu","columns":["time","value"],"values":[["%s",-100],["%s",-200]]}]}]}`, now.Format(time.RFC3339Nano), now.Add(1).Format(time.RFC3339Nano)), + }) + + for i, query := range test.queries { + if i == 0 { + if err := test.init(s); err != nil { + t.Fatalf("test init failed: %s", err) + } + } + if query.skip { + t.Logf("SKIP:: %s", query.name) + continue + } + if err := query.Execute(s); err != nil { + t.Error(query.Error(err)) + } else if !query.success() { + t.Error(query.failureMessage()) + } + } +} + +// Ensure the server can query with relative time. +func TestServer_Query_SelectRelativeTime(t *testing.T) { + t.Parallel() + s := OpenServer(NewConfig()) + defer s.Close() + + now := now() + yesterday := yesterday() + + test := NewTest("db0", "rp0") + test.writes = Writes{ + &Write{data: fmt.Sprintf("cpu,host=server01 value=100 %s\ncpu,host=server01 value=200 %s", strconv.FormatInt(yesterday.UnixNano(), 10), strconv.FormatInt(now.UnixNano(), 10))}, + } + + test.addQueries([]*Query{ + &Query{ + name: "single point with time pre-calculated for past time queries yesterday", + command: `SELECT * FROM db0.rp0.cpu where time >= '` + yesterday.Add(-1*time.Minute).Format(time.RFC3339Nano) + `' GROUP BY *`, + exp: fmt.Sprintf(`{"results":[{"series":[{"name":"cpu","tags":{"host":"server01"},"columns":["time","value"],"values":[["%s",100],["%s",200]]}]}]}`, yesterday.Format(time.RFC3339Nano), now.Format(time.RFC3339Nano)), + }, + &Query{ + name: "single point with time pre-calculated for relative time queries now", + command: `SELECT * FROM db0.rp0.cpu where time >= now() - 1m GROUP BY *`, + exp: fmt.Sprintf(`{"results":[{"series":[{"name":"cpu","tags":{"host":"server01"},"columns":["time","value"],"values":[["%s",200]]}]}]}`, now.Format(time.RFC3339Nano)), + }, + }...) + + for i, query := range test.queries { + if i == 0 { + if err := test.init(s); err != nil { + t.Fatalf("test init failed: %s", err) + } + } + if query.skip { + t.Logf("SKIP:: %s", query.name) + continue + } + if err := query.Execute(s); err != nil { + t.Error(query.Error(err)) + } else if !query.success() { + t.Error(query.failureMessage()) + } + } +} + +// Ensure the server can handle various simple derivative queries. +func TestServer_Query_SelectRawDerivative(t *testing.T) { + t.Parallel() + s := OpenServer(NewConfig()) + defer s.Close() + + test := NewTest("db0", "rp0") + test.writes = Writes{ + &Write{data: fmt.Sprintf("cpu value=210 1278010021000000000\ncpu value=10 1278010022000000000")}, + } + + test.addQueries([]*Query{ + &Query{ + name: "calculate single derivate", + command: `SELECT derivative(value) from db0.rp0.cpu`, + exp: `{"results":[{"series":[{"name":"cpu","columns":["time","derivative"],"values":[["2010-07-01T18:47:02Z",-200]]}]}]}`, + }, + &Query{ + name: "calculate derivate with unit", + command: `SELECT derivative(value, 10s) from db0.rp0.cpu`, + exp: `{"results":[{"series":[{"name":"cpu","columns":["time","derivative"],"values":[["2010-07-01T18:47:02Z",-2000]]}]}]}`, + }, + }...) + + for i, query := range test.queries { + if i == 0 { + if err := test.init(s); err != nil { + t.Fatalf("test init failed: %s", err) + } + } + if query.skip { + t.Logf("SKIP:: %s", query.name) + continue + } + if err := query.Execute(s); err != nil { + t.Error(query.Error(err)) + } else if !query.success() { + t.Error(query.failureMessage()) + } + } +} + +// Ensure the server can handle various simple non_negative_derivative queries. +func TestServer_Query_SelectRawNonNegativeDerivative(t *testing.T) { + t.Parallel() + s := OpenServer(NewConfig()) + defer s.Close() + + test := NewTest("db0", "rp0") + test.writes = Writes{ + &Write{data: fmt.Sprintf(`cpu value=10 1278010021000000000 +cpu value=15 1278010022000000000 +cpu value=10 1278010023000000000 +cpu value=20 1278010024000000000 +`)}, + } + + test.addQueries([]*Query{ + &Query{ + name: "calculate single non_negative_derivative", + command: `SELECT non_negative_derivative(value) from db0.rp0.cpu`, + exp: `{"results":[{"series":[{"name":"cpu","columns":["time","non_negative_derivative"],"values":[["2010-07-01T18:47:02Z",5],["2010-07-01T18:47:04Z",10]]}]}]}`, + }, + &Query{ + name: "calculate single non_negative_derivative", + command: `SELECT non_negative_derivative(value, 10s) from db0.rp0.cpu`, + exp: `{"results":[{"series":[{"name":"cpu","columns":["time","non_negative_derivative"],"values":[["2010-07-01T18:47:02Z",50],["2010-07-01T18:47:04Z",100]]}]}]}`, + }, + }...) + + for i, query := range test.queries { + if i == 0 { + if err := test.init(s); err != nil { + t.Fatalf("test init failed: %s", err) + } + } + if query.skip { + t.Logf("SKIP:: %s", query.name) + continue + } + if err := query.Execute(s); err != nil { + t.Error(query.Error(err)) + } else if !query.success() { + t.Error(query.failureMessage()) + } + } +} + +// Ensure the server can handle various group by time derivative queries. +func TestServer_Query_SelectGroupByTimeDerivative(t *testing.T) { + t.Parallel() + s := OpenServer(NewConfig()) + defer s.Close() + + test := NewTest("db0", "rp0") + test.writes = Writes{ + &Write{data: fmt.Sprintf(`cpu value=10 1278010020000000000 +cpu value=15 1278010021000000000 +cpu value=20 1278010022000000000 +cpu value=25 1278010023000000000 +`)}, + } + + test.addQueries([]*Query{ + &Query{ + name: "calculate derivative of count with unit default (2s) group by time", + command: `SELECT derivative(count(value)) from db0.rp0.cpu where time >= '2010-07-01 18:47:00' and time <= '2010-07-01 18:47:03' group by time(2s)`, + exp: `{"results":[{"series":[{"name":"cpu","columns":["time","derivative"],"values":[["2010-07-01T18:47:00Z",2],["2010-07-01T18:47:02Z",0]]}]}]}`, + }, + &Query{ + name: "calculate derivative of count with unit 4s group by time", + command: `SELECT derivative(count(value), 4s) from db0.rp0.cpu where time >= '2010-07-01 18:47:00' and time <= '2010-07-01 18:47:03' group by time(2s)`, + exp: `{"results":[{"series":[{"name":"cpu","columns":["time","derivative"],"values":[["2010-07-01T18:47:00Z",4],["2010-07-01T18:47:02Z",0]]}]}]}`, + }, + &Query{ + name: "calculate derivative of mean with unit default (2s) group by time", + command: `SELECT derivative(mean(value)) from db0.rp0.cpu where time >= '2010-07-01 18:47:00' and time <= '2010-07-01 18:47:03' group by time(2s)`, + exp: `{"results":[{"series":[{"name":"cpu","columns":["time","derivative"],"values":[["2010-07-01T18:47:02Z",10]]}]}]}`, + }, + &Query{ + name: "calculate derivative of mean with unit 4s group by time", + command: `SELECT derivative(mean(value), 4s) from db0.rp0.cpu where time >= '2010-07-01 18:47:00' and time <= '2010-07-01 18:47:03' group by time(2s)`, + exp: `{"results":[{"series":[{"name":"cpu","columns":["time","derivative"],"values":[["2010-07-01T18:47:02Z",20]]}]}]}`, + }, + &Query{ + name: "calculate derivative of median with unit default (2s) group by time", + command: `SELECT derivative(median(value)) from db0.rp0.cpu where time >= '2010-07-01 18:47:00' and time <= '2010-07-01 18:47:03' group by time(2s)`, + exp: `{"results":[{"series":[{"name":"cpu","columns":["time","derivative"],"values":[["2010-07-01T18:47:02Z",10]]}]}]}`, + }, + &Query{ + name: "calculate derivative of median with unit 4s group by time", + command: `SELECT derivative(median(value), 4s) from db0.rp0.cpu where time >= '2010-07-01 18:47:00' and time <= '2010-07-01 18:47:03' group by time(2s)`, + exp: `{"results":[{"series":[{"name":"cpu","columns":["time","derivative"],"values":[["2010-07-01T18:47:02Z",20]]}]}]}`, + }, + &Query{ + name: "calculate derivative of sum with unit default (2s) group by time", + command: `SELECT derivative(sum(value)) from db0.rp0.cpu where time >= '2010-07-01 18:47:00' and time <= '2010-07-01 18:47:03' group by time(2s)`, + exp: `{"results":[{"series":[{"name":"cpu","columns":["time","derivative"],"values":[["2010-07-01T18:47:02Z",20]]}]}]}`, + }, + &Query{ + name: "calculate derivative of sum with unit 4s group by time", + command: `SELECT derivative(sum(value), 4s) from db0.rp0.cpu where time >= '2010-07-01 18:47:00' and time <= '2010-07-01 18:47:03' group by time(2s)`, + exp: `{"results":[{"series":[{"name":"cpu","columns":["time","derivative"],"values":[["2010-07-01T18:47:02Z",40]]}]}]}`, + }, + &Query{ + name: "calculate derivative of first with unit default (2s) group by time", + command: `SELECT derivative(first(value)) from db0.rp0.cpu where time >= '2010-07-01 18:47:00' and time <= '2010-07-01 18:47:03' group by time(2s)`, + exp: `{"results":[{"series":[{"name":"cpu","columns":["time","derivative"],"values":[["2010-07-01T18:47:02Z",10]]}]}]}`, + }, + &Query{ + name: "calculate derivative of first with unit 4s group by time", + command: `SELECT derivative(first(value), 4s) from db0.rp0.cpu where time >= '2010-07-01 18:47:00' and time <= '2010-07-01 18:47:03' group by time(2s)`, + exp: `{"results":[{"series":[{"name":"cpu","columns":["time","derivative"],"values":[["2010-07-01T18:47:02Z",20]]}]}]}`, + }, + &Query{ + name: "calculate derivative of last with unit default (2s) group by time", + command: `SELECT derivative(last(value)) from db0.rp0.cpu where time >= '2010-07-01 18:47:00' and time <= '2010-07-01 18:47:03' group by time(2s)`, + exp: `{"results":[{"series":[{"name":"cpu","columns":["time","derivative"],"values":[["2010-07-01T18:47:02Z",10]]}]}]}`, + }, + &Query{ + name: "calculate derivative of last with unit 4s group by time", + command: `SELECT derivative(last(value), 4s) from db0.rp0.cpu where time >= '2010-07-01 18:47:00' and time <= '2010-07-01 18:47:03' group by time(2s)`, + exp: `{"results":[{"series":[{"name":"cpu","columns":["time","derivative"],"values":[["2010-07-01T18:47:02Z",20]]}]}]}`, + }, + &Query{ + name: "calculate derivative of min with unit default (2s) group by time", + command: `SELECT derivative(min(value)) from db0.rp0.cpu where time >= '2010-07-01 18:47:00' and time <= '2010-07-01 18:47:03' group by time(2s)`, + exp: `{"results":[{"series":[{"name":"cpu","columns":["time","derivative"],"values":[["2010-07-01T18:47:02Z",10]]}]}]}`, + }, + &Query{ + name: "calculate derivative of min with unit 4s group by time", + command: `SELECT derivative(min(value), 4s) from db0.rp0.cpu where time >= '2010-07-01 18:47:00' and time <= '2010-07-01 18:47:03' group by time(2s)`, + exp: `{"results":[{"series":[{"name":"cpu","columns":["time","derivative"],"values":[["2010-07-01T18:47:02Z",20]]}]}]}`, + }, + &Query{ + name: "calculate derivative of max with unit default (2s) group by time", + command: `SELECT derivative(max(value)) from db0.rp0.cpu where time >= '2010-07-01 18:47:00' and time <= '2010-07-01 18:47:03' group by time(2s)`, + exp: `{"results":[{"series":[{"name":"cpu","columns":["time","derivative"],"values":[["2010-07-01T18:47:02Z",10]]}]}]}`, + }, + &Query{ + name: "calculate derivative of max with unit 4s group by time", + command: `SELECT derivative(max(value), 4s) from db0.rp0.cpu where time >= '2010-07-01 18:47:00' and time <= '2010-07-01 18:47:03' group by time(2s)`, + exp: `{"results":[{"series":[{"name":"cpu","columns":["time","derivative"],"values":[["2010-07-01T18:47:02Z",20]]}]}]}`, + }, + &Query{ + name: "calculate derivative of percentile with unit default (2s) group by time", + command: `SELECT derivative(percentile(value, 50)) from db0.rp0.cpu where time >= '2010-07-01 18:47:00' and time <= '2010-07-01 18:47:03' group by time(2s)`, + exp: `{"results":[{"series":[{"name":"cpu","columns":["time","derivative"],"values":[["2010-07-01T18:47:02Z",10]]}]}]}`, + }, + &Query{ + name: "calculate derivative of percentile with unit 4s group by time", + command: `SELECT derivative(percentile(value, 50), 4s) from db0.rp0.cpu where time >= '2010-07-01 18:47:00' and time <= '2010-07-01 18:47:03' group by time(2s)`, + exp: `{"results":[{"series":[{"name":"cpu","columns":["time","derivative"],"values":[["2010-07-01T18:47:02Z",20]]}]}]}`, + }, + }...) + + for i, query := range test.queries { + if i == 0 { + if err := test.init(s); err != nil { + t.Fatalf("test init failed: %s", err) + } + } + if query.skip { + t.Logf("SKIP:: %s", query.name) + continue + } + if err := query.Execute(s); err != nil { + t.Error(query.Error(err)) + } else if !query.success() { + t.Error(query.failureMessage()) + } + } +} + +// Ensure the server can handle various group by time derivative queries. +func TestServer_Query_SelectGroupByTimeDerivativeWithFill(t *testing.T) { + t.Parallel() + s := OpenServer(NewConfig()) + defer s.Close() + + test := NewTest("db0", "rp0") + test.writes = Writes{ + &Write{data: fmt.Sprintf(`cpu value=10 1278010020000000000 +cpu value=20 1278010021000000000 +`)}, + } + + test.addQueries([]*Query{ + &Query{ + name: "calculate derivative of count with unit default (2s) group by time with fill 0", + command: `SELECT derivative(count(value)) from db0.rp0.cpu where time >= '2010-07-01 18:47:00' and time <= '2010-07-01 18:47:03' group by time(2s) fill(0)`, + exp: `{"results":[{"series":[{"name":"cpu","columns":["time","derivative"],"values":[["2010-07-01T18:47:00Z",2],["2010-07-01T18:47:02Z",-2]]}]}]}`, + }, + &Query{ + name: "calculate derivative of count with unit 4s group by time with fill 0", + command: `SELECT derivative(count(value), 4s) from db0.rp0.cpu where time >= '2010-07-01 18:47:00' and time <= '2010-07-01 18:47:03' group by time(2s) fill(0)`, + exp: `{"results":[{"series":[{"name":"cpu","columns":["time","derivative"],"values":[["2010-07-01T18:47:00Z",4],["2010-07-01T18:47:02Z",-4]]}]}]}`, + }, + &Query{ + name: "calculate derivative of count with unit default (2s) group by time with fill previous", + command: `SELECT derivative(count(value)) from db0.rp0.cpu where time >= '2010-07-01 18:47:00' and time <= '2010-07-01 18:47:03' group by time(2s) fill(previous)`, + exp: `{"results":[{"series":[{"name":"cpu","columns":["time","derivative"],"values":[["2010-07-01T18:47:02Z",0]]}]}]}`, + }, + &Query{ + name: "calculate derivative of count with unit 4s group by time with fill previous", + command: `SELECT derivative(count(value), 4s) from db0.rp0.cpu where time >= '2010-07-01 18:47:00' and time <= '2010-07-01 18:47:03' group by time(2s) fill(previous)`, + exp: `{"results":[{"series":[{"name":"cpu","columns":["time","derivative"],"values":[["2010-07-01T18:47:02Z",0]]}]}]}`, + }, + &Query{ + name: "calculate derivative of mean with unit default (2s) group by time with fill 0", + command: `SELECT derivative(mean(value)) from db0.rp0.cpu where time >= '2010-07-01 18:47:00' and time <= '2010-07-01 18:47:03' group by time(2s) fill(0)`, + exp: `{"results":[{"series":[{"name":"cpu","columns":["time","derivative"],"values":[["2010-07-01T18:47:00Z",15],["2010-07-01T18:47:02Z",-15]]}]}]}`, + }, + &Query{ + name: "calculate derivative of mean with unit 4s group by time with fill 0", + command: `SELECT derivative(mean(value), 4s) from db0.rp0.cpu where time >= '2010-07-01 18:47:00' and time <= '2010-07-01 18:47:03' group by time(2s) fill(0)`, + exp: `{"results":[{"series":[{"name":"cpu","columns":["time","derivative"],"values":[["2010-07-01T18:47:00Z",30],["2010-07-01T18:47:02Z",-30]]}]}]}`, + }, + &Query{ + name: "calculate derivative of mean with unit default (2s) group by time with fill previous", + command: `SELECT derivative(mean(value)) from db0.rp0.cpu where time >= '2010-07-01 18:47:00' and time <= '2010-07-01 18:47:03' group by time(2s) fill(previous)`, + exp: `{"results":[{"series":[{"name":"cpu","columns":["time","derivative"],"values":[["2010-07-01T18:47:02Z",0]]}]}]}`, + }, + &Query{ + name: "calculate derivative of mean with unit 4s group by time with fill previous", + command: `SELECT derivative(mean(value), 4s) from db0.rp0.cpu where time >= '2010-07-01 18:47:00' and time <= '2010-07-01 18:47:03' group by time(2s) fill(previous)`, + exp: `{"results":[{"series":[{"name":"cpu","columns":["time","derivative"],"values":[["2010-07-01T18:47:02Z",0]]}]}]}`, + }, + &Query{ + name: "calculate derivative of median with unit default (2s) group by time with fill 0", + command: `SELECT derivative(median(value)) from db0.rp0.cpu where time >= '2010-07-01 18:47:00' and time <= '2010-07-01 18:47:03' group by time(2s) fill(0)`, + exp: `{"results":[{"series":[{"name":"cpu","columns":["time","derivative"],"values":[["2010-07-01T18:47:00Z",15],["2010-07-01T18:47:02Z",-15]]}]}]}`, + }, + &Query{ + name: "calculate derivative of median with unit 4s group by time with fill 0", + command: `SELECT derivative(median(value), 4s) from db0.rp0.cpu where time >= '2010-07-01 18:47:00' and time <= '2010-07-01 18:47:03' group by time(2s) fill(0)`, + exp: `{"results":[{"series":[{"name":"cpu","columns":["time","derivative"],"values":[["2010-07-01T18:47:00Z",30],["2010-07-01T18:47:02Z",-30]]}]}]}`, + }, + &Query{ + name: "calculate derivative of median with unit default (2s) group by time with fill previous", + command: `SELECT derivative(median(value)) from db0.rp0.cpu where time >= '2010-07-01 18:47:00' and time <= '2010-07-01 18:47:03' group by time(2s) fill(previous)`, + exp: `{"results":[{"series":[{"name":"cpu","columns":["time","derivative"],"values":[["2010-07-01T18:47:02Z",0]]}]}]}`, + }, + &Query{ + name: "calculate derivative of median with unit 4s group by time with fill previous", + command: `SELECT derivative(median(value), 4s) from db0.rp0.cpu where time >= '2010-07-01 18:47:00' and time <= '2010-07-01 18:47:03' group by time(2s) fill(previous)`, + exp: `{"results":[{"series":[{"name":"cpu","columns":["time","derivative"],"values":[["2010-07-01T18:47:02Z",0]]}]}]}`, + }, + &Query{ + name: "calculate derivative of sum with unit default (2s) group by time with fill 0", + command: `SELECT derivative(sum(value)) from db0.rp0.cpu where time >= '2010-07-01 18:47:00' and time <= '2010-07-01 18:47:03' group by time(2s) fill(0)`, + exp: `{"results":[{"series":[{"name":"cpu","columns":["time","derivative"],"values":[["2010-07-01T18:47:00Z",30],["2010-07-01T18:47:02Z",-30]]}]}]}`, + }, + &Query{ + name: "calculate derivative of sum with unit 4s group by time with fill 0", + command: `SELECT derivative(sum(value), 4s) from db0.rp0.cpu where time >= '2010-07-01 18:47:00' and time <= '2010-07-01 18:47:03' group by time(2s) fill(0)`, + exp: `{"results":[{"series":[{"name":"cpu","columns":["time","derivative"],"values":[["2010-07-01T18:47:00Z",60],["2010-07-01T18:47:02Z",-60]]}]}]}`, + }, + &Query{ + name: "calculate derivative of sum with unit default (2s) group by time with fill previous", + command: `SELECT derivative(sum(value)) from db0.rp0.cpu where time >= '2010-07-01 18:47:00' and time <= '2010-07-01 18:47:03' group by time(2s) fill(previous)`, + exp: `{"results":[{"series":[{"name":"cpu","columns":["time","derivative"],"values":[["2010-07-01T18:47:02Z",0]]}]}]}`, + }, + &Query{ + name: "calculate derivative of sum with unit 4s group by time with fill previous", + command: `SELECT derivative(sum(value), 4s) from db0.rp0.cpu where time >= '2010-07-01 18:47:00' and time <= '2010-07-01 18:47:03' group by time(2s) fill(previous)`, + exp: `{"results":[{"series":[{"name":"cpu","columns":["time","derivative"],"values":[["2010-07-01T18:47:02Z",0]]}]}]}`, + }, + &Query{ + name: "calculate derivative of first with unit default (2s) group by time with fill 0", + command: `SELECT derivative(first(value)) from db0.rp0.cpu where time >= '2010-07-01 18:47:00' and time <= '2010-07-01 18:47:03' group by time(2s) fill(0)`, + exp: `{"results":[{"series":[{"name":"cpu","columns":["time","derivative"],"values":[["2010-07-01T18:47:00Z",10],["2010-07-01T18:47:02Z",-10]]}]}]}`, + }, + &Query{ + name: "calculate derivative of first with unit 4s group by time with fill 0", + command: `SELECT derivative(first(value), 4s) from db0.rp0.cpu where time >= '2010-07-01 18:47:00' and time <= '2010-07-01 18:47:03' group by time(2s) fill(0)`, + exp: `{"results":[{"series":[{"name":"cpu","columns":["time","derivative"],"values":[["2010-07-01T18:47:00Z",20],["2010-07-01T18:47:02Z",-20]]}]}]}`, + }, + &Query{ + name: "calculate derivative of first with unit default (2s) group by time with fill previous", + command: `SELECT derivative(first(value)) from db0.rp0.cpu where time >= '2010-07-01 18:47:00' and time <= '2010-07-01 18:47:03' group by time(2s) fill(previous)`, + exp: `{"results":[{"series":[{"name":"cpu","columns":["time","derivative"],"values":[["2010-07-01T18:47:02Z",0]]}]}]}`, + }, + &Query{ + name: "calculate derivative of first with unit 4s group by time with fill previous", + command: `SELECT derivative(first(value), 4s) from db0.rp0.cpu where time >= '2010-07-01 18:47:00' and time <= '2010-07-01 18:47:03' group by time(2s) fill(previous)`, + exp: `{"results":[{"series":[{"name":"cpu","columns":["time","derivative"],"values":[["2010-07-01T18:47:02Z",0]]}]}]}`, + }, + &Query{ + name: "calculate derivative of last with unit default (2s) group by time with fill 0", + command: `SELECT derivative(last(value)) from db0.rp0.cpu where time >= '2010-07-01 18:47:00' and time <= '2010-07-01 18:47:03' group by time(2s) fill(0)`, + exp: `{"results":[{"series":[{"name":"cpu","columns":["time","derivative"],"values":[["2010-07-01T18:47:00Z",20],["2010-07-01T18:47:02Z",-20]]}]}]}`, + }, + &Query{ + name: "calculate derivative of last with unit 4s group by time with fill 0", + command: `SELECT derivative(last(value), 4s) from db0.rp0.cpu where time >= '2010-07-01 18:47:00' and time <= '2010-07-01 18:47:03' group by time(2s) fill(0)`, + exp: `{"results":[{"series":[{"name":"cpu","columns":["time","derivative"],"values":[["2010-07-01T18:47:00Z",40],["2010-07-01T18:47:02Z",-40]]}]}]}`, + }, + &Query{ + name: "calculate derivative of last with unit default (2s) group by time with fill previous", + command: `SELECT derivative(last(value)) from db0.rp0.cpu where time >= '2010-07-01 18:47:00' and time <= '2010-07-01 18:47:03' group by time(2s) fill(previous)`, + exp: `{"results":[{"series":[{"name":"cpu","columns":["time","derivative"],"values":[["2010-07-01T18:47:02Z",0]]}]}]}`, + }, + &Query{ + name: "calculate derivative of last with unit 4s group by time with fill previous", + command: `SELECT derivative(last(value), 4s) from db0.rp0.cpu where time >= '2010-07-01 18:47:00' and time <= '2010-07-01 18:47:03' group by time(2s) fill(previous)`, + exp: `{"results":[{"series":[{"name":"cpu","columns":["time","derivative"],"values":[["2010-07-01T18:47:02Z",0]]}]}]}`, + }, + &Query{ + name: "calculate derivative of min with unit default (2s) group by time with fill 0", + command: `SELECT derivative(min(value)) from db0.rp0.cpu where time >= '2010-07-01 18:47:00' and time <= '2010-07-01 18:47:03' group by time(2s) fill(0)`, + exp: `{"results":[{"series":[{"name":"cpu","columns":["time","derivative"],"values":[["2010-07-01T18:47:00Z",10],["2010-07-01T18:47:02Z",-10]]}]}]}`, + }, + &Query{ + name: "calculate derivative of min with unit 4s group by time with fill 0", + command: `SELECT derivative(min(value), 4s) from db0.rp0.cpu where time >= '2010-07-01 18:47:00' and time <= '2010-07-01 18:47:03' group by time(2s) fill(0)`, + exp: `{"results":[{"series":[{"name":"cpu","columns":["time","derivative"],"values":[["2010-07-01T18:47:00Z",20],["2010-07-01T18:47:02Z",-20]]}]}]}`, + }, + &Query{ + name: "calculate derivative of min with unit default (2s) group by time with fill previous", + command: `SELECT derivative(min(value)) from db0.rp0.cpu where time >= '2010-07-01 18:47:00' and time <= '2010-07-01 18:47:03' group by time(2s) fill(previous)`, + exp: `{"results":[{"series":[{"name":"cpu","columns":["time","derivative"],"values":[["2010-07-01T18:47:02Z",0]]}]}]}`, + }, + &Query{ + name: "calculate derivative of min with unit 4s group by time with fill previous", + command: `SELECT derivative(min(value), 4s) from db0.rp0.cpu where time >= '2010-07-01 18:47:00' and time <= '2010-07-01 18:47:03' group by time(2s) fill(previous)`, + exp: `{"results":[{"series":[{"name":"cpu","columns":["time","derivative"],"values":[["2010-07-01T18:47:02Z",0]]}]}]}`, + }, + &Query{ + name: "calculate derivative of max with unit default (2s) group by time with fill 0", + command: `SELECT derivative(max(value)) from db0.rp0.cpu where time >= '2010-07-01 18:47:00' and time <= '2010-07-01 18:47:03' group by time(2s) fill(0)`, + exp: `{"results":[{"series":[{"name":"cpu","columns":["time","derivative"],"values":[["2010-07-01T18:47:00Z",20],["2010-07-01T18:47:02Z",-20]]}]}]}`, + }, + &Query{ + name: "calculate derivative of max with unit 4s group by time with fill 0", + command: `SELECT derivative(max(value), 4s) from db0.rp0.cpu where time >= '2010-07-01 18:47:00' and time <= '2010-07-01 18:47:03' group by time(2s) fill(0)`, + exp: `{"results":[{"series":[{"name":"cpu","columns":["time","derivative"],"values":[["2010-07-01T18:47:00Z",40],["2010-07-01T18:47:02Z",-40]]}]}]}`, + }, + &Query{ + name: "calculate derivative of max with unit default (2s) group by time with fill previous", + command: `SELECT derivative(max(value)) from db0.rp0.cpu where time >= '2010-07-01 18:47:00' and time <= '2010-07-01 18:47:03' group by time(2s) fill(previous)`, + exp: `{"results":[{"series":[{"name":"cpu","columns":["time","derivative"],"values":[["2010-07-01T18:47:02Z",0]]}]}]}`, + }, + &Query{ + name: "calculate derivative of max with unit 4s group by time with fill previous", + command: `SELECT derivative(max(value), 4s) from db0.rp0.cpu where time >= '2010-07-01 18:47:00' and time <= '2010-07-01 18:47:03' group by time(2s) fill(previous)`, + exp: `{"results":[{"series":[{"name":"cpu","columns":["time","derivative"],"values":[["2010-07-01T18:47:02Z",0]]}]}]}`, + }, + &Query{ + name: "calculate derivative of percentile with unit default (2s) group by time with fill 0", + command: `SELECT derivative(percentile(value, 50)) from db0.rp0.cpu where time >= '2010-07-01 18:47:00' and time <= '2010-07-01 18:47:03' group by time(2s) fill(0)`, + exp: `{"results":[{"series":[{"name":"cpu","columns":["time","derivative"],"values":[["2010-07-01T18:47:00Z",10],["2010-07-01T18:47:02Z",-10]]}]}]}`, + }, + &Query{ + name: "calculate derivative of percentile with unit 4s group by time with fill 0", + command: `SELECT derivative(percentile(value, 50), 4s) from db0.rp0.cpu where time >= '2010-07-01 18:47:00' and time <= '2010-07-01 18:47:03' group by time(2s) fill(0)`, + exp: `{"results":[{"series":[{"name":"cpu","columns":["time","derivative"],"values":[["2010-07-01T18:47:00Z",20],["2010-07-01T18:47:02Z",-20]]}]}]}`, + }, + &Query{ + name: "calculate derivative of percentile with unit default (2s) group by time with fill previous", + command: `SELECT derivative(percentile(value, 50)) from db0.rp0.cpu where time >= '2010-07-01 18:47:00' and time <= '2010-07-01 18:47:03' group by time(2s) fill(previous)`, + exp: `{"results":[{"series":[{"name":"cpu","columns":["time","derivative"],"values":[["2010-07-01T18:47:02Z",0]]}]}]}`, + }, + &Query{ + name: "calculate derivative of percentile with unit 4s group by time with fill previous", + command: `SELECT derivative(percentile(value, 50), 4s) from db0.rp0.cpu where time >= '2010-07-01 18:47:00' and time <= '2010-07-01 18:47:03' group by time(2s) fill(previous)`, + exp: `{"results":[{"series":[{"name":"cpu","columns":["time","derivative"],"values":[["2010-07-01T18:47:02Z",0]]}]}]}`, + }, + }...) + + for i, query := range test.queries { + if i == 0 { + if err := test.init(s); err != nil { + t.Fatalf("test init failed: %s", err) + } + } + if query.skip { + t.Logf("SKIP:: %s", query.name) + continue + } + if err := query.Execute(s); err != nil { + t.Error(query.Error(err)) + } else if !query.success() { + t.Error(query.failureMessage()) + } + } +} + +// Ensure the server can handle various group by time difference queries. +func TestServer_Query_SelectGroupByTimeDifference(t *testing.T) { + t.Parallel() + s := OpenServer(NewConfig()) + defer s.Close() + + test := NewTest("db0", "rp0") + test.writes = Writes{ + &Write{data: fmt.Sprintf(`cpu value=10 1278010020000000000 +cpu value=15 1278010021000000000 +cpu value=20 1278010022000000000 +cpu value=25 1278010023000000000 +`)}, + } + + test.addQueries([]*Query{ + &Query{ + name: "calculate difference of count", + command: `SELECT difference(count(value)) from db0.rp0.cpu where time >= '2010-07-01 18:47:00' and time <= '2010-07-01 18:47:03' group by time(2s)`, + exp: `{"results":[{"series":[{"name":"cpu","columns":["time","difference"],"values":[["2010-07-01T18:47:00Z",2],["2010-07-01T18:47:02Z",0]]}]}]}`, + }, + &Query{ + name: "calculate difference of mean", + command: `SELECT difference(mean(value)) from db0.rp0.cpu where time >= '2010-07-01 18:47:00' and time <= '2010-07-01 18:47:03' group by time(2s)`, + exp: `{"results":[{"series":[{"name":"cpu","columns":["time","difference"],"values":[["2010-07-01T18:47:02Z",10]]}]}]}`, + }, + &Query{ + name: "calculate difference of median", + command: `SELECT difference(median(value)) from db0.rp0.cpu where time >= '2010-07-01 18:47:00' and time <= '2010-07-01 18:47:03' group by time(2s)`, + exp: `{"results":[{"series":[{"name":"cpu","columns":["time","difference"],"values":[["2010-07-01T18:47:02Z",10]]}]}]}`, + }, + &Query{ + name: "calculate difference of sum", + command: `SELECT difference(sum(value)) from db0.rp0.cpu where time >= '2010-07-01 18:47:00' and time <= '2010-07-01 18:47:03' group by time(2s)`, + exp: `{"results":[{"series":[{"name":"cpu","columns":["time","difference"],"values":[["2010-07-01T18:47:02Z",20]]}]}]}`, + }, + &Query{ + name: "calculate difference of first", + command: `SELECT difference(first(value)) from db0.rp0.cpu where time >= '2010-07-01 18:47:00' and time <= '2010-07-01 18:47:03' group by time(2s)`, + exp: `{"results":[{"series":[{"name":"cpu","columns":["time","difference"],"values":[["2010-07-01T18:47:02Z",10]]}]}]}`, + }, + &Query{ + name: "calculate difference of last", + command: `SELECT difference(last(value)) from db0.rp0.cpu where time >= '2010-07-01 18:47:00' and time <= '2010-07-01 18:47:03' group by time(2s)`, + exp: `{"results":[{"series":[{"name":"cpu","columns":["time","difference"],"values":[["2010-07-01T18:47:02Z",10]]}]}]}`, + }, + &Query{ + name: "calculate difference of min", + command: `SELECT difference(min(value)) from db0.rp0.cpu where time >= '2010-07-01 18:47:00' and time <= '2010-07-01 18:47:03' group by time(2s)`, + exp: `{"results":[{"series":[{"name":"cpu","columns":["time","difference"],"values":[["2010-07-01T18:47:02Z",10]]}]}]}`, + }, + &Query{ + name: "calculate difference of max", + command: `SELECT difference(max(value)) from db0.rp0.cpu where time >= '2010-07-01 18:47:00' and time <= '2010-07-01 18:47:03' group by time(2s)`, + exp: `{"results":[{"series":[{"name":"cpu","columns":["time","difference"],"values":[["2010-07-01T18:47:02Z",10]]}]}]}`, + }, + &Query{ + name: "calculate difference of percentile", + command: `SELECT difference(percentile(value, 50)) from db0.rp0.cpu where time >= '2010-07-01 18:47:00' and time <= '2010-07-01 18:47:03' group by time(2s)`, + exp: `{"results":[{"series":[{"name":"cpu","columns":["time","difference"],"values":[["2010-07-01T18:47:02Z",10]]}]}]}`, + }, + }...) + + for i, query := range test.queries { + if i == 0 { + if err := test.init(s); err != nil { + t.Fatalf("test init failed: %s", err) + } + } + if query.skip { + t.Logf("SKIP:: %s", query.name) + continue + } + if err := query.Execute(s); err != nil { + t.Error(query.Error(err)) + } else if !query.success() { + t.Error(query.failureMessage()) + } + } +} + +// Ensure the server can handle various group by time difference queries. +func TestServer_Query_SelectGroupByTimeDifferenceWithFill(t *testing.T) { + t.Parallel() + s := OpenServer(NewConfig()) + defer s.Close() + + test := NewTest("db0", "rp0") + test.writes = Writes{ + &Write{data: fmt.Sprintf(`cpu value=10 1278010020000000000 +cpu value=20 1278010021000000000 +`)}, + } + + test.addQueries([]*Query{ + &Query{ + name: "calculate difference of count with fill 0", + command: `SELECT difference(count(value)) from db0.rp0.cpu where time >= '2010-07-01 18:47:00' and time <= '2010-07-01 18:47:03' group by time(2s) fill(0)`, + exp: `{"results":[{"series":[{"name":"cpu","columns":["time","difference"],"values":[["2010-07-01T18:47:00Z",2],["2010-07-01T18:47:02Z",-2]]}]}]}`, + }, + &Query{ + name: "calculate difference of count with fill previous", + command: `SELECT difference(count(value)) from db0.rp0.cpu where time >= '2010-07-01 18:47:00' and time <= '2010-07-01 18:47:03' group by time(2s) fill(previous)`, + exp: `{"results":[{"series":[{"name":"cpu","columns":["time","difference"],"values":[["2010-07-01T18:47:02Z",0]]}]}]}`, + }, + &Query{ + name: "calculate difference of mean with fill 0", + command: `SELECT difference(mean(value)) from db0.rp0.cpu where time >= '2010-07-01 18:47:00' and time <= '2010-07-01 18:47:03' group by time(2s) fill(0)`, + exp: `{"results":[{"series":[{"name":"cpu","columns":["time","difference"],"values":[["2010-07-01T18:47:00Z",15],["2010-07-01T18:47:02Z",-15]]}]}]}`, + }, + &Query{ + name: "calculate difference of mean with fill previous", + command: `SELECT difference(mean(value)) from db0.rp0.cpu where time >= '2010-07-01 18:47:00' and time <= '2010-07-01 18:47:03' group by time(2s) fill(previous)`, + exp: `{"results":[{"series":[{"name":"cpu","columns":["time","difference"],"values":[["2010-07-01T18:47:02Z",0]]}]}]}`, + }, + &Query{ + name: "calculate difference of median with fill 0", + command: `SELECT difference(median(value)) from db0.rp0.cpu where time >= '2010-07-01 18:47:00' and time <= '2010-07-01 18:47:03' group by time(2s) fill(0)`, + exp: `{"results":[{"series":[{"name":"cpu","columns":["time","difference"],"values":[["2010-07-01T18:47:00Z",15],["2010-07-01T18:47:02Z",-15]]}]}]}`, + }, + &Query{ + name: "calculate difference of median with fill previous", + command: `SELECT difference(median(value)) from db0.rp0.cpu where time >= '2010-07-01 18:47:00' and time <= '2010-07-01 18:47:03' group by time(2s) fill(previous)`, + exp: `{"results":[{"series":[{"name":"cpu","columns":["time","difference"],"values":[["2010-07-01T18:47:02Z",0]]}]}]}`, + }, + &Query{ + name: "calculate difference of sum with fill 0", + command: `SELECT difference(sum(value)) from db0.rp0.cpu where time >= '2010-07-01 18:47:00' and time <= '2010-07-01 18:47:03' group by time(2s) fill(0)`, + exp: `{"results":[{"series":[{"name":"cpu","columns":["time","difference"],"values":[["2010-07-01T18:47:00Z",30],["2010-07-01T18:47:02Z",-30]]}]}]}`, + }, + &Query{ + name: "calculate difference of sum with fill previous", + command: `SELECT difference(sum(value)) from db0.rp0.cpu where time >= '2010-07-01 18:47:00' and time <= '2010-07-01 18:47:03' group by time(2s) fill(previous)`, + exp: `{"results":[{"series":[{"name":"cpu","columns":["time","difference"],"values":[["2010-07-01T18:47:02Z",0]]}]}]}`, + }, + &Query{ + name: "calculate difference of first with fill 0", + command: `SELECT difference(first(value)) from db0.rp0.cpu where time >= '2010-07-01 18:47:00' and time <= '2010-07-01 18:47:03' group by time(2s) fill(0)`, + exp: `{"results":[{"series":[{"name":"cpu","columns":["time","difference"],"values":[["2010-07-01T18:47:00Z",10],["2010-07-01T18:47:02Z",-10]]}]}]}`, + }, + &Query{ + name: "calculate difference of first with fill previous", + command: `SELECT difference(first(value)) from db0.rp0.cpu where time >= '2010-07-01 18:47:00' and time <= '2010-07-01 18:47:03' group by time(2s) fill(previous)`, + exp: `{"results":[{"series":[{"name":"cpu","columns":["time","difference"],"values":[["2010-07-01T18:47:02Z",0]]}]}]}`, + }, + &Query{ + name: "calculate difference of last with fill 0", + command: `SELECT difference(last(value)) from db0.rp0.cpu where time >= '2010-07-01 18:47:00' and time <= '2010-07-01 18:47:03' group by time(2s) fill(0)`, + exp: `{"results":[{"series":[{"name":"cpu","columns":["time","difference"],"values":[["2010-07-01T18:47:00Z",20],["2010-07-01T18:47:02Z",-20]]}]}]}`, + }, + &Query{ + name: "calculate difference of last with fill previous", + command: `SELECT difference(last(value)) from db0.rp0.cpu where time >= '2010-07-01 18:47:00' and time <= '2010-07-01 18:47:03' group by time(2s) fill(previous)`, + exp: `{"results":[{"series":[{"name":"cpu","columns":["time","difference"],"values":[["2010-07-01T18:47:02Z",0]]}]}]}`, + }, + &Query{ + name: "calculate difference of min with fill 0", + command: `SELECT difference(min(value)) from db0.rp0.cpu where time >= '2010-07-01 18:47:00' and time <= '2010-07-01 18:47:03' group by time(2s) fill(0)`, + exp: `{"results":[{"series":[{"name":"cpu","columns":["time","difference"],"values":[["2010-07-01T18:47:00Z",10],["2010-07-01T18:47:02Z",-10]]}]}]}`, + }, + &Query{ + name: "calculate difference of min with fill previous", + command: `SELECT difference(min(value)) from db0.rp0.cpu where time >= '2010-07-01 18:47:00' and time <= '2010-07-01 18:47:03' group by time(2s) fill(previous)`, + exp: `{"results":[{"series":[{"name":"cpu","columns":["time","difference"],"values":[["2010-07-01T18:47:02Z",0]]}]}]}`, + }, + &Query{ + name: "calculate difference of max with fill 0", + command: `SELECT difference(max(value)) from db0.rp0.cpu where time >= '2010-07-01 18:47:00' and time <= '2010-07-01 18:47:03' group by time(2s) fill(0)`, + exp: `{"results":[{"series":[{"name":"cpu","columns":["time","difference"],"values":[["2010-07-01T18:47:00Z",20],["2010-07-01T18:47:02Z",-20]]}]}]}`, + }, + &Query{ + name: "calculate difference of max with fill previous", + command: `SELECT difference(max(value)) from db0.rp0.cpu where time >= '2010-07-01 18:47:00' and time <= '2010-07-01 18:47:03' group by time(2s) fill(previous)`, + exp: `{"results":[{"series":[{"name":"cpu","columns":["time","difference"],"values":[["2010-07-01T18:47:02Z",0]]}]}]}`, + }, + &Query{ + name: "calculate difference of percentile with fill 0", + command: `SELECT difference(percentile(value, 50)) from db0.rp0.cpu where time >= '2010-07-01 18:47:00' and time <= '2010-07-01 18:47:03' group by time(2s) fill(0)`, + exp: `{"results":[{"series":[{"name":"cpu","columns":["time","difference"],"values":[["2010-07-01T18:47:00Z",10],["2010-07-01T18:47:02Z",-10]]}]}]}`, + }, + &Query{ + name: "calculate difference of percentile with fill previous", + command: `SELECT difference(percentile(value, 50)) from db0.rp0.cpu where time >= '2010-07-01 18:47:00' and time <= '2010-07-01 18:47:03' group by time(2s) fill(previous)`, + exp: `{"results":[{"series":[{"name":"cpu","columns":["time","difference"],"values":[["2010-07-01T18:47:02Z",0]]}]}]}`, + }, + }...) + + for i, query := range test.queries { + if i == 0 { + if err := test.init(s); err != nil { + t.Fatalf("test init failed: %s", err) + } + } + if query.skip { + t.Logf("SKIP:: %s", query.name) + continue + } + if err := query.Execute(s); err != nil { + t.Error(query.Error(err)) + } else if !query.success() { + t.Error(query.failureMessage()) + } + } +} + +// Ensure the server can handle various group by time moving average queries. +func TestServer_Query_SelectGroupByTimeMovingAverage(t *testing.T) { + t.Parallel() + s := OpenServer(NewConfig()) + defer s.Close() + + test := NewTest("db0", "rp0") + test.writes = Writes{ + &Write{data: fmt.Sprintf(`cpu value=10 1278010020000000000 +cpu value=15 1278010021000000000 +cpu value=20 1278010022000000000 +cpu value=25 1278010023000000000 +cpu value=30 1278010024000000000 +cpu value=35 1278010025000000000 +`)}, + } + + test.addQueries([]*Query{ + &Query{ + name: "calculate moving average of count", + command: `SELECT moving_average(count(value), 2) from db0.rp0.cpu where time >= '2010-07-01 18:47:00' and time <= '2010-07-01 18:47:05' group by time(2s)`, + exp: `{"results":[{"series":[{"name":"cpu","columns":["time","moving_average"],"values":[["2010-07-01T18:47:00Z",1],["2010-07-01T18:47:02Z",2],["2010-07-01T18:47:04Z",2]]}]}]}`, + }, + &Query{ + name: "calculate moving average of mean", + command: `SELECT moving_average(mean(value), 2) from db0.rp0.cpu where time >= '2010-07-01 18:47:00' and time <= '2010-07-01 18:47:05' group by time(2s)`, + exp: `{"results":[{"series":[{"name":"cpu","columns":["time","moving_average"],"values":[["2010-07-01T18:47:02Z",17.5],["2010-07-01T18:47:04Z",27.5]]}]}]}`, + }, + &Query{ + name: "calculate moving average of median", + command: `SELECT moving_average(median(value), 2) from db0.rp0.cpu where time >= '2010-07-01 18:47:00' and time <= '2010-07-01 18:47:05' group by time(2s)`, + exp: `{"results":[{"series":[{"name":"cpu","columns":["time","moving_average"],"values":[["2010-07-01T18:47:02Z",17.5],["2010-07-01T18:47:04Z",27.5]]}]}]}`, + }, + &Query{ + name: "calculate moving average of sum", + command: `SELECT moving_average(sum(value), 2) from db0.rp0.cpu where time >= '2010-07-01 18:47:00' and time <= '2010-07-01 18:47:05' group by time(2s)`, + exp: `{"results":[{"series":[{"name":"cpu","columns":["time","moving_average"],"values":[["2010-07-01T18:47:02Z",35],["2010-07-01T18:47:04Z",55]]}]}]}`, + }, + &Query{ + name: "calculate moving average of first", + command: `SELECT moving_average(first(value), 2) from db0.rp0.cpu where time >= '2010-07-01 18:47:00' and time <= '2010-07-01 18:47:05' group by time(2s)`, + exp: `{"results":[{"series":[{"name":"cpu","columns":["time","moving_average"],"values":[["2010-07-01T18:47:02Z",15],["2010-07-01T18:47:04Z",25]]}]}]}`, + }, + &Query{ + name: "calculate moving average of last", + command: `SELECT moving_average(last(value), 2) from db0.rp0.cpu where time >= '2010-07-01 18:47:00' and time <= '2010-07-01 18:47:05' group by time(2s)`, + exp: `{"results":[{"series":[{"name":"cpu","columns":["time","moving_average"],"values":[["2010-07-01T18:47:02Z",20],["2010-07-01T18:47:04Z",30]]}]}]}`, + }, + &Query{ + name: "calculate moving average of min", + command: `SELECT moving_average(min(value), 2) from db0.rp0.cpu where time >= '2010-07-01 18:47:00' and time <= '2010-07-01 18:47:05' group by time(2s)`, + exp: `{"results":[{"series":[{"name":"cpu","columns":["time","moving_average"],"values":[["2010-07-01T18:47:02Z",15],["2010-07-01T18:47:04Z",25]]}]}]}`, + }, + &Query{ + name: "calculate moving average of max", + command: `SELECT moving_average(max(value), 2) from db0.rp0.cpu where time >= '2010-07-01 18:47:00' and time <= '2010-07-01 18:47:05' group by time(2s)`, + exp: `{"results":[{"series":[{"name":"cpu","columns":["time","moving_average"],"values":[["2010-07-01T18:47:02Z",20],["2010-07-01T18:47:04Z",30]]}]}]}`, + }, + &Query{ + name: "calculate moving average of percentile", + command: `SELECT moving_average(percentile(value, 50), 2) from db0.rp0.cpu where time >= '2010-07-01 18:47:00' and time <= '2010-07-01 18:47:05' group by time(2s)`, + exp: `{"results":[{"series":[{"name":"cpu","columns":["time","moving_average"],"values":[["2010-07-01T18:47:02Z",15],["2010-07-01T18:47:04Z",25]]}]}]}`, + }, + }...) + + for i, query := range test.queries { + if i == 0 { + if err := test.init(s); err != nil { + t.Fatalf("test init failed: %s", err) + } + } + if query.skip { + t.Logf("SKIP:: %s", query.name) + continue + } + if err := query.Execute(s); err != nil { + t.Error(query.Error(err)) + } else if !query.success() { + t.Error(query.failureMessage()) + } + } +} + +// Ensure the server can handle various group by time moving average queries. +func TestServer_Query_SelectGroupByTimeMovingAverageWithFill(t *testing.T) { + t.Parallel() + s := OpenServer(NewConfig()) + defer s.Close() + + test := NewTest("db0", "rp0") + test.writes = Writes{ + &Write{data: fmt.Sprintf(`cpu value=10 1278010020000000000 +cpu value=15 1278010021000000000 +cpu value=30 1278010024000000000 +cpu value=35 1278010025000000000 +`)}, + } + + test.addQueries([]*Query{ + &Query{ + name: "calculate moving average of count with fill 0", + command: `SELECT moving_average(count(value), 2) from db0.rp0.cpu where time >= '2010-07-01 18:47:00' and time <= '2010-07-01 18:47:05' group by time(2s) fill(0)`, + exp: `{"results":[{"series":[{"name":"cpu","columns":["time","moving_average"],"values":[["2010-07-01T18:47:00Z",1],["2010-07-01T18:47:02Z",1],["2010-07-01T18:47:04Z",1]]}]}]}`, + }, + &Query{ + name: "calculate moving average of count with fill previous", + command: `SELECT moving_average(count(value), 2) from db0.rp0.cpu where time >= '2010-07-01 18:47:00' and time <= '2010-07-01 18:47:05' group by time(2s) fill(previous)`, + exp: `{"results":[{"series":[{"name":"cpu","columns":["time","moving_average"],"values":[["2010-07-01T18:47:02Z",2],["2010-07-01T18:47:04Z",2]]}]}]}`, + }, + &Query{ + name: "calculate moving average of mean with fill 0", + command: `SELECT moving_average(mean(value), 2) from db0.rp0.cpu where time >= '2010-07-01 18:47:00' and time <= '2010-07-01 18:47:05' group by time(2s) fill(0)`, + exp: `{"results":[{"series":[{"name":"cpu","columns":["time","moving_average"],"values":[["2010-07-01T18:47:00Z",6.25],["2010-07-01T18:47:02Z",6.25],["2010-07-01T18:47:04Z",16.25]]}]}]}`, + }, + &Query{ + name: "calculate moving average of mean with fill previous", + command: `SELECT moving_average(mean(value), 2) from db0.rp0.cpu where time >= '2010-07-01 18:47:00' and time <= '2010-07-01 18:47:05' group by time(2s) fill(previous)`, + exp: `{"results":[{"series":[{"name":"cpu","columns":["time","moving_average"],"values":[["2010-07-01T18:47:02Z",12.5],["2010-07-01T18:47:04Z",22.5]]}]}]}`, + }, + &Query{ + name: "calculate moving average of median with fill 0", + command: `SELECT moving_average(median(value), 2) from db0.rp0.cpu where time >= '2010-07-01 18:47:00' and time <= '2010-07-01 18:47:05' group by time(2s) fill(0)`, + exp: `{"results":[{"series":[{"name":"cpu","columns":["time","moving_average"],"values":[["2010-07-01T18:47:00Z",6.25],["2010-07-01T18:47:02Z",6.25],["2010-07-01T18:47:04Z",16.25]]}]}]}`, + }, + &Query{ + name: "calculate moving average of median with fill previous", + command: `SELECT moving_average(median(value), 2) from db0.rp0.cpu where time >= '2010-07-01 18:47:00' and time <= '2010-07-01 18:47:05' group by time(2s) fill(previous)`, + exp: `{"results":[{"series":[{"name":"cpu","columns":["time","moving_average"],"values":[["2010-07-01T18:47:02Z",12.5],["2010-07-01T18:47:04Z",22.5]]}]}]}`, + }, + &Query{ + name: "calculate moving average of sum with fill 0", + command: `SELECT moving_average(sum(value), 2) from db0.rp0.cpu where time >= '2010-07-01 18:47:00' and time <= '2010-07-01 18:47:05' group by time(2s) fill(0)`, + exp: `{"results":[{"series":[{"name":"cpu","columns":["time","moving_average"],"values":[["2010-07-01T18:47:00Z",12.5],["2010-07-01T18:47:02Z",12.5],["2010-07-01T18:47:04Z",32.5]]}]}]}`, + }, + &Query{ + name: "calculate moving average of sum with fill previous", + command: `SELECT moving_average(sum(value), 2) from db0.rp0.cpu where time >= '2010-07-01 18:47:00' and time <= '2010-07-01 18:47:05' group by time(2s) fill(previous)`, + exp: `{"results":[{"series":[{"name":"cpu","columns":["time","moving_average"],"values":[["2010-07-01T18:47:02Z",25],["2010-07-01T18:47:04Z",45]]}]}]}`, + }, + &Query{ + name: "calculate moving average of first with fill 0", + command: `SELECT moving_average(first(value), 2) from db0.rp0.cpu where time >= '2010-07-01 18:47:00' and time <= '2010-07-01 18:47:05' group by time(2s) fill(0)`, + exp: `{"results":[{"series":[{"name":"cpu","columns":["time","moving_average"],"values":[["2010-07-01T18:47:00Z",5],["2010-07-01T18:47:02Z",5],["2010-07-01T18:47:04Z",15]]}]}]}`, + }, + &Query{ + name: "calculate moving average of first with fill previous", + command: `SELECT moving_average(first(value), 2) from db0.rp0.cpu where time >= '2010-07-01 18:47:00' and time <= '2010-07-01 18:47:05' group by time(2s) fill(previous)`, + exp: `{"results":[{"series":[{"name":"cpu","columns":["time","moving_average"],"values":[["2010-07-01T18:47:02Z",10],["2010-07-01T18:47:04Z",20]]}]}]}`, + }, + &Query{ + name: "calculate moving average of last with fill 0", + command: `SELECT moving_average(last(value), 2) from db0.rp0.cpu where time >= '2010-07-01 18:47:00' and time <= '2010-07-01 18:47:05' group by time(2s) fill(0)`, + exp: `{"results":[{"series":[{"name":"cpu","columns":["time","moving_average"],"values":[["2010-07-01T18:47:00Z",7.5],["2010-07-01T18:47:02Z",7.5],["2010-07-01T18:47:04Z",17.5]]}]}]}`, + }, + &Query{ + name: "calculate moving average of last with fill previous", + command: `SELECT moving_average(last(value), 2) from db0.rp0.cpu where time >= '2010-07-01 18:47:00' and time <= '2010-07-01 18:47:05' group by time(2s) fill(previous)`, + exp: `{"results":[{"series":[{"name":"cpu","columns":["time","moving_average"],"values":[["2010-07-01T18:47:02Z",15],["2010-07-01T18:47:04Z",25]]}]}]}`, + }, + &Query{ + name: "calculate moving average of min with fill 0", + command: `SELECT moving_average(min(value), 2) from db0.rp0.cpu where time >= '2010-07-01 18:47:00' and time <= '2010-07-01 18:47:05' group by time(2s) fill(0)`, + exp: `{"results":[{"series":[{"name":"cpu","columns":["time","moving_average"],"values":[["2010-07-01T18:47:00Z",5],["2010-07-01T18:47:02Z",5],["2010-07-01T18:47:04Z",15]]}]}]}`, + }, + &Query{ + name: "calculate moving average of min with fill previous", + command: `SELECT moving_average(min(value), 2) from db0.rp0.cpu where time >= '2010-07-01 18:47:00' and time <= '2010-07-01 18:47:05' group by time(2s) fill(previous)`, + exp: `{"results":[{"series":[{"name":"cpu","columns":["time","moving_average"],"values":[["2010-07-01T18:47:02Z",10],["2010-07-01T18:47:04Z",20]]}]}]}`, + }, + &Query{ + name: "calculate moving average of max with fill 0", + command: `SELECT moving_average(max(value), 2) from db0.rp0.cpu where time >= '2010-07-01 18:47:00' and time <= '2010-07-01 18:47:05' group by time(2s) fill(0)`, + exp: `{"results":[{"series":[{"name":"cpu","columns":["time","moving_average"],"values":[["2010-07-01T18:47:00Z",7.5],["2010-07-01T18:47:02Z",7.5],["2010-07-01T18:47:04Z",17.5]]}]}]}`, + }, + &Query{ + name: "calculate moving average of max with fill previous", + command: `SELECT moving_average(max(value), 2) from db0.rp0.cpu where time >= '2010-07-01 18:47:00' and time <= '2010-07-01 18:47:05' group by time(2s) fill(previous)`, + exp: `{"results":[{"series":[{"name":"cpu","columns":["time","moving_average"],"values":[["2010-07-01T18:47:02Z",15],["2010-07-01T18:47:04Z",25]]}]}]}`, + }, + &Query{ + name: "calculate moving average of percentile with fill 0", + command: `SELECT moving_average(percentile(value, 50), 2) from db0.rp0.cpu where time >= '2010-07-01 18:47:00' and time <= '2010-07-01 18:47:05' group by time(2s) fill(0)`, + exp: `{"results":[{"series":[{"name":"cpu","columns":["time","moving_average"],"values":[["2010-07-01T18:47:00Z",5],["2010-07-01T18:47:02Z",5],["2010-07-01T18:47:04Z",15]]}]}]}`, + }, + &Query{ + name: "calculate moving average of percentile with fill previous", + command: `SELECT moving_average(percentile(value, 50), 2) from db0.rp0.cpu where time >= '2010-07-01 18:47:00' and time <= '2010-07-01 18:47:05' group by time(2s) fill(previous)`, + exp: `{"results":[{"series":[{"name":"cpu","columns":["time","moving_average"],"values":[["2010-07-01T18:47:02Z",10],["2010-07-01T18:47:04Z",20]]}]}]}`, + }, + }...) + + for i, query := range test.queries { + if i == 0 { + if err := test.init(s); err != nil { + t.Fatalf("test init failed: %s", err) + } + } + if query.skip { + t.Logf("SKIP:: %s", query.name) + continue + } + if err := query.Execute(s); err != nil { + t.Error(query.Error(err)) + } else if !query.success() { + t.Error(query.failureMessage()) + } + } +} + +// mergeMany ensures that when merging many series together and some of them have a different number +// of points than others in a group by interval the results are correct +func TestServer_Query_MergeMany(t *testing.T) { + t.Parallel() + s := OpenServer(NewConfig()) + defer s.Close() + + // set infinite retention policy as we are inserting data in the past and don't want retention policy enforcement to make this test racy + if err := s.CreateDatabaseAndRetentionPolicy("db0", newRetentionPolicyInfo("rp0", 1, 0)); err != nil { + t.Fatal(err) + } + + test := NewTest("db0", "rp0") + + writes := []string{} + for i := 1; i < 11; i++ { + for j := 1; j < 5+i%3; j++ { + data := fmt.Sprintf(`cpu,host=server_%d value=22 %d`, i, time.Unix(int64(j), int64(0)).UTC().UnixNano()) + writes = append(writes, data) + } + } + test.writes = Writes{ + &Write{data: strings.Join(writes, "\n")}, + } + + test.addQueries([]*Query{ + &Query{ + name: "GROUP by time", + command: `SELECT count(value) FROM db0.rp0.cpu WHERE time >= '1970-01-01T00:00:01Z' AND time <= '1970-01-01T00:00:06Z' GROUP BY time(1s)`, + exp: `{"results":[{"series":[{"name":"cpu","columns":["time","count"],"values":[["1970-01-01T00:00:01Z",10],["1970-01-01T00:00:02Z",10],["1970-01-01T00:00:03Z",10],["1970-01-01T00:00:04Z",10],["1970-01-01T00:00:05Z",7],["1970-01-01T00:00:06Z",3]]}]}]}`, + }, + &Query{ + skip: true, + name: "GROUP by tag - FIXME issue #2875", + command: `SELECT count(value) FROM db0.rp0.cpu where time >= '2000-01-01T00:00:00Z' and time <= '2000-01-01T02:00:00Z' group by host`, + exp: `{"results":[{"series":[{"name":"cpu","tags":{"host":"server01"},"columns":["time","count"],"values":[["2000-01-01T00:00:00Z",1]]},{"name":"cpu","tags":{"host":"server02"},"columns":["time","count"],"values":[["2000-01-01T00:00:00Z",1]]},{"name":"cpu","tags":{"host":"server03"},"columns":["time","count"],"values":[["2000-01-01T00:00:00Z",1]]}]}]}`, + }, + &Query{ + name: "GROUP by field", + command: `SELECT count(value) FROM db0.rp0.cpu group by value`, + exp: `{"results":[{"series":[{"name":"cpu","tags":{"value":""},"columns":["time","count"],"values":[["1970-01-01T00:00:00Z",50]]}]}]}`, + }, + }...) + + for i, query := range test.queries { + if i == 0 { + if err := test.init(s); err != nil { + t.Fatalf("test init failed: %s", err) + } + } + if query.skip { + t.Logf("SKIP:: %s", query.name) + continue + } + if err := query.Execute(s); err != nil { + t.Error(query.Error(err)) + } else if !query.success() { + t.Error(query.failureMessage()) + } + } +} + +func TestServer_Query_SLimitAndSOffset(t *testing.T) { + t.Parallel() + s := OpenServer(NewConfig()) + defer s.Close() + + // set infinite retention policy as we are inserting data in the past and don't want retention policy enforcement to make this test racy + if err := s.CreateDatabaseAndRetentionPolicy("db0", newRetentionPolicyInfo("rp0", 1, 0)); err != nil { + t.Fatal(err) + } + + test := NewTest("db0", "rp0") + + writes := []string{} + for i := 1; i < 10; i++ { + data := fmt.Sprintf(`cpu,region=us-east,host=server-%d value=%d %d`, i, i, time.Unix(int64(i), int64(0)).UnixNano()) + writes = append(writes, data) + } + test.writes = Writes{ + &Write{data: strings.Join(writes, "\n")}, + } + + test.addQueries([]*Query{ + &Query{ + name: "SLIMIT 2 SOFFSET 1", + command: `SELECT count(value) FROM db0.rp0.cpu GROUP BY * SLIMIT 2 SOFFSET 1`, + exp: `{"results":[{"series":[{"name":"cpu","tags":{"host":"server-2","region":"us-east"},"columns":["time","count"],"values":[["1970-01-01T00:00:00Z",1]]},{"name":"cpu","tags":{"host":"server-3","region":"us-east"},"columns":["time","count"],"values":[["1970-01-01T00:00:00Z",1]]}]}]}`, + }, + &Query{ + name: "SLIMIT 2 SOFFSET 3", + command: `SELECT count(value) FROM db0.rp0.cpu GROUP BY * SLIMIT 2 SOFFSET 3`, + exp: `{"results":[{"series":[{"name":"cpu","tags":{"host":"server-4","region":"us-east"},"columns":["time","count"],"values":[["1970-01-01T00:00:00Z",1]]},{"name":"cpu","tags":{"host":"server-5","region":"us-east"},"columns":["time","count"],"values":[["1970-01-01T00:00:00Z",1]]}]}]}`, + }, + &Query{ + name: "SLIMIT 3 SOFFSET 8", + command: `SELECT count(value) FROM db0.rp0.cpu GROUP BY * SLIMIT 3 SOFFSET 8`, + exp: `{"results":[{"series":[{"name":"cpu","tags":{"host":"server-9","region":"us-east"},"columns":["time","count"],"values":[["1970-01-01T00:00:00Z",1]]}]}]}`, + }, + }...) + + for i, query := range test.queries { + if i == 0 { + if err := test.init(s); err != nil { + t.Fatalf("test init failed: %s", err) + } + } + if query.skip { + t.Logf("SKIP:: %s", query.name) + continue + } + if err := query.Execute(s); err != nil { + t.Error(query.Error(err)) + } else if !query.success() { + t.Error(query.failureMessage()) + } + } +} + +func TestServer_Query_Regex(t *testing.T) { + t.Parallel() + s := OpenServer(NewConfig()) + defer s.Close() + + if err := s.CreateDatabaseAndRetentionPolicy("db0", newRetentionPolicyInfo("rp0", 1, 0)); err != nil { + t.Fatal(err) + } + if err := s.MetaClient.SetDefaultRetentionPolicy("db0", "rp0"); err != nil { + t.Fatal(err) + } + + writes := []string{ + fmt.Sprintf(`cpu1,host=server01 value=10 %d`, mustParseTime(time.RFC3339Nano, "2015-02-28T01:03:36.703820946Z").UnixNano()), + fmt.Sprintf(`cpu2,host=server01 value=20 %d`, mustParseTime(time.RFC3339Nano, "2015-02-28T01:03:36.703820946Z").UnixNano()), + fmt.Sprintf(`cpu3,host=server01 value=30 %d`, mustParseTime(time.RFC3339Nano, "2015-02-28T01:03:36.703820946Z").UnixNano()), + } + + test := NewTest("db0", "rp0") + test.writes = Writes{ + &Write{data: strings.Join(writes, "\n")}, + } + + test.addQueries([]*Query{ + &Query{ + name: "default db and rp", + command: `SELECT * FROM /cpu[13]/`, + params: url.Values{"db": []string{"db0"}}, + exp: `{"results":[{"series":[{"name":"cpu1","columns":["time","host","value"],"values":[["2015-02-28T01:03:36.703820946Z","server01",10]]},{"name":"cpu3","columns":["time","host","value"],"values":[["2015-02-28T01:03:36.703820946Z","server01",30]]}]}]}`, + }, + &Query{ + name: "default db and rp with GROUP BY *", + command: `SELECT * FROM /cpu[13]/ GROUP BY *`, + params: url.Values{"db": []string{"db0"}}, + exp: `{"results":[{"series":[{"name":"cpu1","tags":{"host":"server01"},"columns":["time","value"],"values":[["2015-02-28T01:03:36.703820946Z",10]]},{"name":"cpu3","tags":{"host":"server01"},"columns":["time","value"],"values":[["2015-02-28T01:03:36.703820946Z",30]]}]}]}`, + }, + &Query{ + name: "specifying db and rp", + command: `SELECT * FROM db0.rp0./cpu[13]/ GROUP BY *`, + exp: `{"results":[{"series":[{"name":"cpu1","tags":{"host":"server01"},"columns":["time","value"],"values":[["2015-02-28T01:03:36.703820946Z",10]]},{"name":"cpu3","tags":{"host":"server01"},"columns":["time","value"],"values":[["2015-02-28T01:03:36.703820946Z",30]]}]}]}`, + }, + &Query{ + name: "default db and specified rp", + command: `SELECT * FROM rp0./cpu[13]/ GROUP BY *`, + params: url.Values{"db": []string{"db0"}}, + exp: `{"results":[{"series":[{"name":"cpu1","tags":{"host":"server01"},"columns":["time","value"],"values":[["2015-02-28T01:03:36.703820946Z",10]]},{"name":"cpu3","tags":{"host":"server01"},"columns":["time","value"],"values":[["2015-02-28T01:03:36.703820946Z",30]]}]}]}`, + }, + &Query{ + name: "specified db and default rp", + command: `SELECT * FROM db0../cpu[13]/ GROUP BY *`, + exp: `{"results":[{"series":[{"name":"cpu1","tags":{"host":"server01"},"columns":["time","value"],"values":[["2015-02-28T01:03:36.703820946Z",10]]},{"name":"cpu3","tags":{"host":"server01"},"columns":["time","value"],"values":[["2015-02-28T01:03:36.703820946Z",30]]}]}]}`, + }, + }...) + + for i, query := range test.queries { + if i == 0 { + if err := test.init(s); err != nil { + t.Fatalf("test init failed: %s", err) + } + } + if query.skip { + t.Logf("SKIP:: %s", query.name) + continue + } + if err := query.Execute(s); err != nil { + t.Error(query.Error(err)) + } else if !query.success() { + t.Error(query.failureMessage()) + } + } +} + +func TestServer_Query_Aggregates_Int(t *testing.T) { + t.Parallel() + s := OpenDefaultServer(NewConfig()) + defer s.Close() + + test := NewTest("db0", "rp0") + test.writes = Writes{ + &Write{data: strings.Join([]string{ + fmt.Sprintf(`int value=45 %d`, mustParseTime(time.RFC3339Nano, "2000-01-01T00:00:00Z").UnixNano()), + }, "\n")}, + } + + test.addQueries([]*Query{ + // int64 + &Query{ + name: "stddev with just one point - int", + params: url.Values{"db": []string{"db0"}}, + command: `SELECT STDDEV(value) FROM int`, + exp: `{"results":[{"series":[{"name":"int","columns":["time","stddev"],"values":[["1970-01-01T00:00:00Z",null]]}]}]}`, + }, + }...) + + for i, query := range test.queries { + if i == 0 { + if err := test.init(s); err != nil { + t.Fatalf("test init failed: %s", err) + } + } + if query.skip { + t.Logf("SKIP:: %s", query.name) + continue + } + if err := query.Execute(s); err != nil { + t.Error(query.Error(err)) + } else if !query.success() { + t.Error(query.failureMessage()) + } + } +} + +func TestServer_Query_Aggregates_IntMax(t *testing.T) { + t.Parallel() + s := OpenDefaultServer(NewConfig()) + defer s.Close() + + test := NewTest("db0", "rp0") + test.writes = Writes{ + &Write{data: strings.Join([]string{ + fmt.Sprintf(`intmax value=%s %d`, maxInt64(), mustParseTime(time.RFC3339Nano, "2000-01-01T00:00:00Z").UnixNano()), + fmt.Sprintf(`intmax value=%s %d`, maxInt64(), mustParseTime(time.RFC3339Nano, "2000-01-01T01:00:00Z").UnixNano()), + }, "\n")}, + } + + test.addQueries([]*Query{ + &Query{ + name: "large mean and stddev - int", + params: url.Values{"db": []string{"db0"}}, + command: `SELECT MEAN(value), STDDEV(value) FROM intmax`, + exp: `{"results":[{"series":[{"name":"intmax","columns":["time","mean","stddev"],"values":[["1970-01-01T00:00:00Z",` + maxInt64() + `,0]]}]}]}`, + }, + }...) + + for i, query := range test.queries { + if i == 0 { + if err := test.init(s); err != nil { + t.Fatalf("test init failed: %s", err) + } + } + if query.skip { + t.Logf("SKIP:: %s", query.name) + continue + } + if err := query.Execute(s); err != nil { + t.Error(query.Error(err)) + } else if !query.success() { + t.Error(query.failureMessage()) + } + } +} + +func TestServer_Query_Aggregates_IntMany(t *testing.T) { + t.Parallel() + s := OpenDefaultServer(NewConfig()) + defer s.Close() + + test := NewTest("db0", "rp0") + test.writes = Writes{ + &Write{data: strings.Join([]string{ + fmt.Sprintf(`intmany,host=server01 value=2.0 %d`, mustParseTime(time.RFC3339Nano, "2000-01-01T00:00:00Z").UnixNano()), + fmt.Sprintf(`intmany,host=server02 value=4.0 %d`, mustParseTime(time.RFC3339Nano, "2000-01-01T00:00:10Z").UnixNano()), + fmt.Sprintf(`intmany,host=server03 value=4.0 %d`, mustParseTime(time.RFC3339Nano, "2000-01-01T00:00:20Z").UnixNano()), + fmt.Sprintf(`intmany,host=server04 value=4.0 %d`, mustParseTime(time.RFC3339Nano, "2000-01-01T00:00:30Z").UnixNano()), + fmt.Sprintf(`intmany,host=server05 value=5.0 %d`, mustParseTime(time.RFC3339Nano, "2000-01-01T00:00:40Z").UnixNano()), + fmt.Sprintf(`intmany,host=server06 value=5.0 %d`, mustParseTime(time.RFC3339Nano, "2000-01-01T00:00:50Z").UnixNano()), + fmt.Sprintf(`intmany,host=server07 value=7.0 %d`, mustParseTime(time.RFC3339Nano, "2000-01-01T00:01:00Z").UnixNano()), + fmt.Sprintf(`intmany,host=server08 value=9.0 %d`, mustParseTime(time.RFC3339Nano, "2000-01-01T00:01:10Z").UnixNano()), + }, "\n")}, + } + + test.addQueries([]*Query{ + &Query{ + name: "mean and stddev - int", + params: url.Values{"db": []string{"db0"}}, + command: `SELECT MEAN(value), STDDEV(value) FROM intmany WHERE time >= '2000-01-01' AND time < '2000-01-01T00:02:00Z' GROUP BY time(10m)`, + exp: `{"results":[{"series":[{"name":"intmany","columns":["time","mean","stddev"],"values":[["2000-01-01T00:00:00Z",5,2.138089935299395]]}]}]}`, + }, + &Query{ + name: "first - int", + params: url.Values{"db": []string{"db0"}}, + command: `SELECT FIRST(value) FROM intmany`, + exp: `{"results":[{"series":[{"name":"intmany","columns":["time","first"],"values":[["2000-01-01T00:00:00Z",2]]}]}]}`, + }, + &Query{ + name: "first - int - epoch ms", + params: url.Values{"db": []string{"db0"}, "epoch": []string{"ms"}}, + command: `SELECT FIRST(value) FROM intmany`, + exp: fmt.Sprintf(`{"results":[{"series":[{"name":"intmany","columns":["time","first"],"values":[[%d,2]]}]}]}`, mustParseTime(time.RFC3339Nano, "2000-01-01T00:00:00Z").UnixNano()/int64(time.Millisecond)), + }, + &Query{ + name: "last - int", + params: url.Values{"db": []string{"db0"}}, + command: `SELECT LAST(value) FROM intmany`, + exp: `{"results":[{"series":[{"name":"intmany","columns":["time","last"],"values":[["2000-01-01T00:01:10Z",9]]}]}]}`, + }, + &Query{ + name: "spread - int", + params: url.Values{"db": []string{"db0"}}, + command: `SELECT SPREAD(value) FROM intmany`, + exp: `{"results":[{"series":[{"name":"intmany","columns":["time","spread"],"values":[["1970-01-01T00:00:00Z",7]]}]}]}`, + }, + &Query{ + name: "median - even count - int", + params: url.Values{"db": []string{"db0"}}, + command: `SELECT MEDIAN(value) FROM intmany`, + exp: `{"results":[{"series":[{"name":"intmany","columns":["time","median"],"values":[["1970-01-01T00:00:00Z",4.5]]}]}]}`, + }, + &Query{ + name: "median - odd count - int", + params: url.Values{"db": []string{"db0"}}, + command: `SELECT MEDIAN(value) FROM intmany where time < '2000-01-01T00:01:10Z'`, + exp: `{"results":[{"series":[{"name":"intmany","columns":["time","median"],"values":[["1970-01-01T00:00:00Z",4]]}]}]}`, + }, + &Query{ + name: "distinct as call - int", + params: url.Values{"db": []string{"db0"}}, + command: `SELECT DISTINCT(value) FROM intmany`, + exp: `{"results":[{"series":[{"name":"intmany","columns":["time","distinct"],"values":[["1970-01-01T00:00:00Z",2],["1970-01-01T00:00:00Z",4],["1970-01-01T00:00:00Z",5],["1970-01-01T00:00:00Z",7],["1970-01-01T00:00:00Z",9]]}]}]}`, + }, + &Query{ + name: "distinct alt syntax - int", + params: url.Values{"db": []string{"db0"}}, + command: `SELECT DISTINCT value FROM intmany`, + exp: `{"results":[{"series":[{"name":"intmany","columns":["time","distinct"],"values":[["1970-01-01T00:00:00Z",2],["1970-01-01T00:00:00Z",4],["1970-01-01T00:00:00Z",5],["1970-01-01T00:00:00Z",7],["1970-01-01T00:00:00Z",9]]}]}]}`, + }, + &Query{ + name: "distinct select tag - int", + params: url.Values{"db": []string{"db0"}}, + command: `SELECT DISTINCT(host) FROM intmany`, + exp: `{"results":[{"error":"statement must have at least one field in select clause"}]}`, + skip: true, // FIXME(benbjohnson): should be allowed, need to stream tag values + }, + &Query{ + name: "distinct alt select tag - int", + params: url.Values{"db": []string{"db0"}}, + command: `SELECT DISTINCT host FROM intmany`, + exp: `{"results":[{"error":"statement must have at least one field in select clause"}]}`, + skip: true, // FIXME(benbjohnson): should be allowed, need to stream tag values + }, + &Query{ + name: "count distinct - int", + params: url.Values{"db": []string{"db0"}}, + command: `SELECT COUNT(DISTINCT value) FROM intmany`, + exp: `{"results":[{"series":[{"name":"intmany","columns":["time","count"],"values":[["1970-01-01T00:00:00Z",5]]}]}]}`, + }, + &Query{ + name: "count distinct as call - int", + params: url.Values{"db": []string{"db0"}}, + command: `SELECT COUNT(DISTINCT(value)) FROM intmany`, + exp: `{"results":[{"series":[{"name":"intmany","columns":["time","count"],"values":[["1970-01-01T00:00:00Z",5]]}]}]}`, + }, + &Query{ + name: "count distinct select tag - int", + params: url.Values{"db": []string{"db0"}}, + command: `SELECT COUNT(DISTINCT host) FROM intmany`, + exp: `{"results":[{"series":[{"name":"intmany","columns":["time","count"],"values":[["1970-01-01T00:00:00Z",0]]}]}]}`, + skip: true, // FIXME(benbjohnson): stream tag values + }, + &Query{ + name: "count distinct as call select tag - int", + params: url.Values{"db": []string{"db0"}}, + command: `SELECT COUNT(DISTINCT host) FROM intmany`, + exp: `{"results":[{"series":[{"name":"intmany","columns":["time","count"],"values":[["1970-01-01T00:00:00Z",0]]}]}]}`, + skip: true, // FIXME(benbjohnson): stream tag values + }, + }...) + + for i, query := range test.queries { + if i == 0 { + if err := test.init(s); err != nil { + t.Fatalf("test init failed: %s", err) + } + } + if query.skip { + t.Logf("SKIP:: %s", query.name) + continue + } + if err := query.Execute(s); err != nil { + t.Error(query.Error(err)) + } else if !query.success() { + t.Error(query.failureMessage()) + } + } +} + +func TestServer_Query_Aggregates_IntMany_GroupBy(t *testing.T) { + t.Parallel() + s := OpenDefaultServer(NewConfig()) + defer s.Close() + + test := NewTest("db0", "rp0") + test.writes = Writes{ + &Write{data: strings.Join([]string{ + fmt.Sprintf(`intmany,host=server01 value=2.0 %d`, mustParseTime(time.RFC3339Nano, "2000-01-01T00:00:00Z").UnixNano()), + fmt.Sprintf(`intmany,host=server02 value=4.0 %d`, mustParseTime(time.RFC3339Nano, "2000-01-01T00:00:10Z").UnixNano()), + fmt.Sprintf(`intmany,host=server03 value=4.0 %d`, mustParseTime(time.RFC3339Nano, "2000-01-01T00:00:20Z").UnixNano()), + fmt.Sprintf(`intmany,host=server04 value=4.0 %d`, mustParseTime(time.RFC3339Nano, "2000-01-01T00:00:30Z").UnixNano()), + fmt.Sprintf(`intmany,host=server05 value=5.0 %d`, mustParseTime(time.RFC3339Nano, "2000-01-01T00:00:40Z").UnixNano()), + fmt.Sprintf(`intmany,host=server06 value=5.0 %d`, mustParseTime(time.RFC3339Nano, "2000-01-01T00:00:50Z").UnixNano()), + fmt.Sprintf(`intmany,host=server07 value=7.0 %d`, mustParseTime(time.RFC3339Nano, "2000-01-01T00:01:00Z").UnixNano()), + fmt.Sprintf(`intmany,host=server08 value=9.0 %d`, mustParseTime(time.RFC3339Nano, "2000-01-01T00:01:10Z").UnixNano()), + }, "\n")}, + } + + test.addQueries([]*Query{ + &Query{ + name: "max order by time with time specified group by 10s", + params: url.Values{"db": []string{"db0"}}, + command: `SELECT time, max(value) FROM intmany where time >= '2000-01-01T00:00:00Z' AND time <= '2000-01-01T00:01:14Z' group by time(10s)`, + exp: `{"results":[{"series":[{"name":"intmany","columns":["time","max"],"values":[["2000-01-01T00:00:00Z",2],["2000-01-01T00:00:10Z",4],["2000-01-01T00:00:20Z",4],["2000-01-01T00:00:30Z",4],["2000-01-01T00:00:40Z",5],["2000-01-01T00:00:50Z",5],["2000-01-01T00:01:00Z",7],["2000-01-01T00:01:10Z",9]]}]}]}`, + }, + &Query{ + name: "max order by time without time specified group by 30s", + params: url.Values{"db": []string{"db0"}}, + command: `SELECT max(value) FROM intmany where time >= '2000-01-01T00:00:00Z' AND time <= '2000-01-01T00:01:14Z' group by time(30s)`, + exp: `{"results":[{"series":[{"name":"intmany","columns":["time","max"],"values":[["2000-01-01T00:00:00Z",4],["2000-01-01T00:00:30Z",5],["2000-01-01T00:01:00Z",9]]}]}]}`, + }, + &Query{ + name: "max order by time with time specified group by 30s", + params: url.Values{"db": []string{"db0"}}, + command: `SELECT time, max(value) FROM intmany where time >= '2000-01-01T00:00:00Z' AND time <= '2000-01-01T00:01:14Z' group by time(30s)`, + exp: `{"results":[{"series":[{"name":"intmany","columns":["time","max"],"values":[["2000-01-01T00:00:00Z",4],["2000-01-01T00:00:30Z",5],["2000-01-01T00:01:00Z",9]]}]}]}`, + }, + &Query{ + name: "min order by time without time specified group by 15s", + params: url.Values{"db": []string{"db0"}}, + command: `SELECT min(value) FROM intmany where time >= '2000-01-01T00:00:00Z' AND time <= '2000-01-01T00:01:14Z' group by time(15s)`, + exp: `{"results":[{"series":[{"name":"intmany","columns":["time","min"],"values":[["2000-01-01T00:00:00Z",2],["2000-01-01T00:00:15Z",4],["2000-01-01T00:00:30Z",4],["2000-01-01T00:00:45Z",5],["2000-01-01T00:01:00Z",7]]}]}]}`, + }, + &Query{ + name: "min order by time with time specified group by 15s", + params: url.Values{"db": []string{"db0"}}, + command: `SELECT time, min(value) FROM intmany where time >= '2000-01-01T00:00:00Z' AND time <= '2000-01-01T00:01:14Z' group by time(15s)`, + exp: `{"results":[{"series":[{"name":"intmany","columns":["time","min"],"values":[["2000-01-01T00:00:00Z",2],["2000-01-01T00:00:15Z",4],["2000-01-01T00:00:30Z",4],["2000-01-01T00:00:45Z",5],["2000-01-01T00:01:00Z",7]]}]}]}`, + }, + &Query{ + name: "first order by time without time specified group by 15s", + params: url.Values{"db": []string{"db0"}}, + command: `SELECT first(value) FROM intmany where time >= '2000-01-01T00:00:00Z' AND time <= '2000-01-01T00:01:14Z' group by time(15s)`, + exp: `{"results":[{"series":[{"name":"intmany","columns":["time","first"],"values":[["2000-01-01T00:00:00Z",2],["2000-01-01T00:00:15Z",4],["2000-01-01T00:00:30Z",4],["2000-01-01T00:00:45Z",5],["2000-01-01T00:01:00Z",7]]}]}]}`, + }, + &Query{ + name: "first order by time with time specified group by 15s", + params: url.Values{"db": []string{"db0"}}, + command: `SELECT time, first(value) FROM intmany where time >= '2000-01-01T00:00:00Z' AND time <= '2000-01-01T00:01:14Z' group by time(15s)`, + exp: `{"results":[{"series":[{"name":"intmany","columns":["time","first"],"values":[["2000-01-01T00:00:00Z",2],["2000-01-01T00:00:15Z",4],["2000-01-01T00:00:30Z",4],["2000-01-01T00:00:45Z",5],["2000-01-01T00:01:00Z",7]]}]}]}`, + }, + &Query{ + name: "last order by time without time specified group by 15s", + params: url.Values{"db": []string{"db0"}}, + command: `SELECT last(value) FROM intmany where time >= '2000-01-01T00:00:00Z' AND time <= '2000-01-01T00:01:14Z' group by time(15s)`, + exp: `{"results":[{"series":[{"name":"intmany","columns":["time","last"],"values":[["2000-01-01T00:00:00Z",4],["2000-01-01T00:00:15Z",4],["2000-01-01T00:00:30Z",5],["2000-01-01T00:00:45Z",5],["2000-01-01T00:01:00Z",9]]}]}]}`, + }, + &Query{ + name: "last order by time with time specified group by 15s", + params: url.Values{"db": []string{"db0"}}, + command: `SELECT time, last(value) FROM intmany where time >= '2000-01-01T00:00:00Z' AND time <= '2000-01-01T00:01:14Z' group by time(15s)`, + exp: `{"results":[{"series":[{"name":"intmany","columns":["time","last"],"values":[["2000-01-01T00:00:00Z",4],["2000-01-01T00:00:15Z",4],["2000-01-01T00:00:30Z",5],["2000-01-01T00:00:45Z",5],["2000-01-01T00:01:00Z",9]]}]}]}`, + }, + }...) + + for i, query := range test.queries { + if i == 0 { + if err := test.init(s); err != nil { + t.Fatalf("test init failed: %s", err) + } + } + if query.skip { + t.Logf("SKIP:: %s", query.name) + continue + } + if err := query.Execute(s); err != nil { + t.Error(query.Error(err)) + } else if !query.success() { + t.Error(query.failureMessage()) + } + } +} + +func TestServer_Query_Aggregates_IntMany_OrderByDesc(t *testing.T) { + t.Parallel() + s := OpenDefaultServer(NewConfig()) + defer s.Close() + + test := NewTest("db0", "rp0") + test.writes = Writes{ + &Write{data: strings.Join([]string{ + fmt.Sprintf(`intmany,host=server01 value=2.0 %d`, mustParseTime(time.RFC3339Nano, "2000-01-01T00:00:00Z").UnixNano()), + fmt.Sprintf(`intmany,host=server02 value=4.0 %d`, mustParseTime(time.RFC3339Nano, "2000-01-01T00:00:10Z").UnixNano()), + fmt.Sprintf(`intmany,host=server03 value=4.0 %d`, mustParseTime(time.RFC3339Nano, "2000-01-01T00:00:20Z").UnixNano()), + fmt.Sprintf(`intmany,host=server04 value=4.0 %d`, mustParseTime(time.RFC3339Nano, "2000-01-01T00:00:30Z").UnixNano()), + fmt.Sprintf(`intmany,host=server05 value=5.0 %d`, mustParseTime(time.RFC3339Nano, "2000-01-01T00:00:40Z").UnixNano()), + fmt.Sprintf(`intmany,host=server06 value=5.0 %d`, mustParseTime(time.RFC3339Nano, "2000-01-01T00:00:50Z").UnixNano()), + fmt.Sprintf(`intmany,host=server07 value=7.0 %d`, mustParseTime(time.RFC3339Nano, "2000-01-01T00:01:00Z").UnixNano()), + fmt.Sprintf(`intmany,host=server08 value=9.0 %d`, mustParseTime(time.RFC3339Nano, "2000-01-01T00:01:10Z").UnixNano()), + }, "\n")}, + } + + test.addQueries([]*Query{ + &Query{ + name: "aggregate order by time desc", + params: url.Values{"db": []string{"db0"}}, + command: `SELECT max(value) FROM intmany where time >= '2000-01-01T00:00:00Z' AND time <= '2000-01-01T00:01:00Z' group by time(10s) order by time desc`, + exp: `{"results":[{"series":[{"name":"intmany","columns":["time","max"],"values":[["2000-01-01T00:01:00Z",7],["2000-01-01T00:00:50Z",5],["2000-01-01T00:00:40Z",5],["2000-01-01T00:00:30Z",4],["2000-01-01T00:00:20Z",4],["2000-01-01T00:00:10Z",4],["2000-01-01T00:00:00Z",2]]}]}]}`, + }, + }...) + + for i, query := range test.queries { + if i == 0 { + if err := test.init(s); err != nil { + t.Fatalf("test init failed: %s", err) + } + } + if query.skip { + t.Logf("SKIP:: %s", query.name) + continue + } + if err := query.Execute(s); err != nil { + t.Error(query.Error(err)) + } else if !query.success() { + t.Error(query.failureMessage()) + } + } +} + +func TestServer_Query_Aggregates_IntOverlap(t *testing.T) { + t.Parallel() + s := OpenDefaultServer(NewConfig()) + defer s.Close() + + test := NewTest("db0", "rp0") + test.writes = Writes{ + &Write{data: strings.Join([]string{ + fmt.Sprintf(`intoverlap,region=us-east value=20 %d`, mustParseTime(time.RFC3339Nano, "2000-01-01T00:00:00Z").UnixNano()), + fmt.Sprintf(`intoverlap,region=us-east value=30 %d`, mustParseTime(time.RFC3339Nano, "2000-01-01T00:00:10Z").UnixNano()), + fmt.Sprintf(`intoverlap,region=us-west value=100 %d`, mustParseTime(time.RFC3339Nano, "2000-01-01T00:00:00Z").UnixNano()), + fmt.Sprintf(`intoverlap,region=us-east otherVal=20 %d`, mustParseTime(time.RFC3339Nano, "2000-01-01T00:00:03Z").UnixNano()), + }, "\n")}, + } + + test.addQueries([]*Query{ + /* &Query{ + name: "aggregation with no interval - int", + params: url.Values{"db": []string{"db0"}}, + command: `SELECT count(value) FROM intoverlap WHERE time = '2000-01-01 00:00:00'`, + exp: `{"results":[{"series":[{"name":"intoverlap","columns":["time","count"],"values":[["2000-01-01T00:00:00Z",2]]}]}]}`, + }, + &Query{ + name: "sum - int", + params: url.Values{"db": []string{"db0"}}, + command: `SELECT SUM(value) FROM intoverlap WHERE time >= '2000-01-01 00:00:05' AND time <= '2000-01-01T00:00:10Z' GROUP BY time(10s), region`, + exp: `{"results":[{"series":[{"name":"intoverlap","tags":{"region":"us-east"},"columns":["time","sum"],"values":[["2000-01-01T00:00:10Z",30]]}]}]}`, + }, + */&Query{ + name: "aggregation with a null field value - int", + params: url.Values{"db": []string{"db0"}}, + command: `SELECT SUM(value) FROM intoverlap GROUP BY region`, + exp: `{"results":[{"series":[{"name":"intoverlap","tags":{"region":"us-east"},"columns":["time","sum"],"values":[["1970-01-01T00:00:00Z",50]]},{"name":"intoverlap","tags":{"region":"us-west"},"columns":["time","sum"],"values":[["1970-01-01T00:00:00Z",100]]}]}]}`, + }, + &Query{ + name: "multiple aggregations - int", + params: url.Values{"db": []string{"db0"}}, + command: `SELECT SUM(value), MEAN(value) FROM intoverlap GROUP BY region`, + exp: `{"results":[{"series":[{"name":"intoverlap","tags":{"region":"us-east"},"columns":["time","sum","mean"],"values":[["1970-01-01T00:00:00Z",50,25]]},{"name":"intoverlap","tags":{"region":"us-west"},"columns":["time","sum","mean"],"values":[["1970-01-01T00:00:00Z",100,100]]}]}]}`, + }, + &Query{ + skip: true, + name: "multiple aggregations with division - int FIXME issue #2879", + params: url.Values{"db": []string{"db0"}}, + command: `SELECT sum(value), mean(value), sum(value) / mean(value) as div FROM intoverlap GROUP BY region`, + exp: `{"results":[{"series":[{"name":"intoverlap","tags":{"region":"us-east"},"columns":["time","sum","mean","div"],"values":[["1970-01-01T00:00:00Z",50,25,2]]},{"name":"intoverlap","tags":{"region":"us-west"},"columns":["time","div"],"values":[["1970-01-01T00:00:00Z",100,100,1]]}]}]}`, + }, + }...) + + for i, query := range test.queries { + if i == 0 { + if err := test.init(s); err != nil { + t.Fatalf("test init failed: %s", err) + } + } + if query.skip { + t.Logf("SKIP:: %s", query.name) + continue + } + if err := query.Execute(s); err != nil { + t.Error(query.Error(err)) + } else if !query.success() { + t.Error(query.failureMessage()) + } + } +} + +func TestServer_Query_Aggregates_FloatSingle(t *testing.T) { + t.Parallel() + s := OpenDefaultServer(NewConfig()) + defer s.Close() + + test := NewTest("db0", "rp0") + test.writes = Writes{ + &Write{data: strings.Join([]string{ + fmt.Sprintf(`floatsingle value=45.0 %d`, mustParseTime(time.RFC3339Nano, "2000-01-01T00:00:00Z").UnixNano()), + }, "\n")}, + } + + test.addQueries([]*Query{ + &Query{ + name: "stddev with just one point - float", + params: url.Values{"db": []string{"db0"}}, + command: `SELECT STDDEV(value) FROM floatsingle`, + exp: `{"results":[{"series":[{"name":"floatsingle","columns":["time","stddev"],"values":[["1970-01-01T00:00:00Z",null]]}]}]}`, + }, + }...) + + for i, query := range test.queries { + if i == 0 { + if err := test.init(s); err != nil { + t.Fatalf("test init failed: %s", err) + } + } + if query.skip { + t.Logf("SKIP:: %s", query.name) + continue + } + if err := query.Execute(s); err != nil { + t.Error(query.Error(err)) + } else if !query.success() { + t.Error(query.failureMessage()) + } + } +} + +func TestServer_Query_Aggregates_FloatMany(t *testing.T) { + t.Parallel() + s := OpenDefaultServer(NewConfig()) + defer s.Close() + + test := NewTest("db0", "rp0") + test.writes = Writes{ + &Write{data: strings.Join([]string{ + fmt.Sprintf(`floatmany,host=server01 value=2.0 %d`, mustParseTime(time.RFC3339Nano, "2000-01-01T00:00:00Z").UnixNano()), + fmt.Sprintf(`floatmany,host=server02 value=4.0 %d`, mustParseTime(time.RFC3339Nano, "2000-01-01T00:00:10Z").UnixNano()), + fmt.Sprintf(`floatmany,host=server03 value=4.0 %d`, mustParseTime(time.RFC3339Nano, "2000-01-01T00:00:20Z").UnixNano()), + fmt.Sprintf(`floatmany,host=server04 value=4.0 %d`, mustParseTime(time.RFC3339Nano, "2000-01-01T00:00:30Z").UnixNano()), + fmt.Sprintf(`floatmany,host=server05 value=5.0 %d`, mustParseTime(time.RFC3339Nano, "2000-01-01T00:00:40Z").UnixNano()), + fmt.Sprintf(`floatmany,host=server06 value=5.0 %d`, mustParseTime(time.RFC3339Nano, "2000-01-01T00:00:50Z").UnixNano()), + fmt.Sprintf(`floatmany,host=server07 value=7.0 %d`, mustParseTime(time.RFC3339Nano, "2000-01-01T00:01:00Z").UnixNano()), + fmt.Sprintf(`floatmany,host=server08 value=9.0 %d`, mustParseTime(time.RFC3339Nano, "2000-01-01T00:01:10Z").UnixNano()), + }, "\n")}, + } + + test.addQueries([]*Query{ + &Query{ + name: "mean and stddev - float", + params: url.Values{"db": []string{"db0"}}, + command: `SELECT MEAN(value), STDDEV(value) FROM floatmany WHERE time >= '2000-01-01' AND time < '2000-01-01T00:02:00Z' GROUP BY time(10m)`, + exp: `{"results":[{"series":[{"name":"floatmany","columns":["time","mean","stddev"],"values":[["2000-01-01T00:00:00Z",5,2.138089935299395]]}]}]}`, + }, + &Query{ + name: "first - float", + params: url.Values{"db": []string{"db0"}}, + command: `SELECT FIRST(value) FROM floatmany`, + exp: `{"results":[{"series":[{"name":"floatmany","columns":["time","first"],"values":[["2000-01-01T00:00:00Z",2]]}]}]}`, + }, + &Query{ + name: "last - float", + params: url.Values{"db": []string{"db0"}}, + command: `SELECT LAST(value) FROM floatmany`, + exp: `{"results":[{"series":[{"name":"floatmany","columns":["time","last"],"values":[["2000-01-01T00:01:10Z",9]]}]}]}`, + }, + &Query{ + name: "spread - float", + params: url.Values{"db": []string{"db0"}}, + command: `SELECT SPREAD(value) FROM floatmany`, + exp: `{"results":[{"series":[{"name":"floatmany","columns":["time","spread"],"values":[["1970-01-01T00:00:00Z",7]]}]}]}`, + }, + &Query{ + name: "median - even count - float", + params: url.Values{"db": []string{"db0"}}, + command: `SELECT MEDIAN(value) FROM floatmany`, + exp: `{"results":[{"series":[{"name":"floatmany","columns":["time","median"],"values":[["1970-01-01T00:00:00Z",4.5]]}]}]}`, + }, + &Query{ + name: "median - odd count - float", + params: url.Values{"db": []string{"db0"}}, + command: `SELECT MEDIAN(value) FROM floatmany where time < '2000-01-01T00:01:10Z'`, + exp: `{"results":[{"series":[{"name":"floatmany","columns":["time","median"],"values":[["1970-01-01T00:00:00Z",4]]}]}]}`, + }, + &Query{ + name: "distinct as call - float", + params: url.Values{"db": []string{"db0"}}, + command: `SELECT DISTINCT(value) FROM floatmany`, + exp: `{"results":[{"series":[{"name":"floatmany","columns":["time","distinct"],"values":[["1970-01-01T00:00:00Z",2],["1970-01-01T00:00:00Z",4],["1970-01-01T00:00:00Z",5],["1970-01-01T00:00:00Z",7],["1970-01-01T00:00:00Z",9]]}]}]}`, + }, + &Query{ + name: "distinct alt syntax - float", + params: url.Values{"db": []string{"db0"}}, + command: `SELECT DISTINCT value FROM floatmany`, + exp: `{"results":[{"series":[{"name":"floatmany","columns":["time","distinct"],"values":[["1970-01-01T00:00:00Z",2],["1970-01-01T00:00:00Z",4],["1970-01-01T00:00:00Z",5],["1970-01-01T00:00:00Z",7],["1970-01-01T00:00:00Z",9]]}]}]}`, + }, + &Query{ + name: "distinct select tag - float", + params: url.Values{"db": []string{"db0"}}, + command: `SELECT DISTINCT(host) FROM floatmany`, + exp: `{"results":[{"error":"statement must have at least one field in select clause"}]}`, + skip: true, // FIXME(benbjohnson): show be allowed, stream tag values + }, + &Query{ + name: "distinct alt select tag - float", + params: url.Values{"db": []string{"db0"}}, + command: `SELECT DISTINCT host FROM floatmany`, + exp: `{"results":[{"error":"statement must have at least one field in select clause"}]}`, + skip: true, // FIXME(benbjohnson): show be allowed, stream tag values + }, + &Query{ + name: "count distinct - float", + params: url.Values{"db": []string{"db0"}}, + command: `SELECT COUNT(DISTINCT value) FROM floatmany`, + exp: `{"results":[{"series":[{"name":"floatmany","columns":["time","count"],"values":[["1970-01-01T00:00:00Z",5]]}]}]}`, + }, + &Query{ + name: "count distinct as call - float", + params: url.Values{"db": []string{"db0"}}, + command: `SELECT COUNT(DISTINCT(value)) FROM floatmany`, + exp: `{"results":[{"series":[{"name":"floatmany","columns":["time","count"],"values":[["1970-01-01T00:00:00Z",5]]}]}]}`, + }, + &Query{ + name: "count distinct select tag - float", + params: url.Values{"db": []string{"db0"}}, + command: `SELECT COUNT(DISTINCT host) FROM floatmany`, + exp: `{"results":[{"series":[{"name":"floatmany","columns":["time","count"],"values":[["1970-01-01T00:00:00Z",0]]}]}]}`, + skip: true, // FIXME(benbjohnson): stream tag values + }, + &Query{ + name: "count distinct as call select tag - float", + params: url.Values{"db": []string{"db0"}}, + command: `SELECT COUNT(DISTINCT host) FROM floatmany`, + exp: `{"results":[{"series":[{"name":"floatmany","columns":["time","count"],"values":[["1970-01-01T00:00:00Z",0]]}]}]}`, + skip: true, // FIXME(benbjohnson): stream tag values + }, + }...) + + for i, query := range test.queries { + if i == 0 { + if err := test.init(s); err != nil { + t.Fatalf("test init failed: %s", err) + } + } + if query.skip { + t.Logf("SKIP:: %s", query.name) + continue + } + if err := query.Execute(s); err != nil { + t.Error(query.Error(err)) + } else if !query.success() { + t.Error(query.failureMessage()) + } + } +} + +func TestServer_Query_Aggregates_FloatOverlap(t *testing.T) { + t.Parallel() + s := OpenDefaultServer(NewConfig()) + defer s.Close() + + test := NewTest("db0", "rp0") + test.writes = Writes{ + &Write{data: strings.Join([]string{ + fmt.Sprintf(`floatoverlap,region=us-east value=20.0 %d`, mustParseTime(time.RFC3339Nano, "2000-01-01T00:00:00Z").UnixNano()), + fmt.Sprintf(`floatoverlap,region=us-east value=30.0 %d`, mustParseTime(time.RFC3339Nano, "2000-01-01T00:00:10Z").UnixNano()), + fmt.Sprintf(`floatoverlap,region=us-west value=100.0 %d`, mustParseTime(time.RFC3339Nano, "2000-01-01T00:00:00Z").UnixNano()), + fmt.Sprintf(`floatoverlap,region=us-east otherVal=20.0 %d`, mustParseTime(time.RFC3339Nano, "2000-01-01T00:00:03Z").UnixNano()), + }, "\n")}, + } + + test.addQueries([]*Query{ + &Query{ + name: "aggregation with no interval - float", + params: url.Values{"db": []string{"db0"}}, + command: `SELECT count(value) FROM floatoverlap WHERE time = '2000-01-01 00:00:00'`, + exp: `{"results":[{"series":[{"name":"floatoverlap","columns":["time","count"],"values":[["2000-01-01T00:00:00Z",2]]}]}]}`, + }, + &Query{ + name: "sum - float", + params: url.Values{"db": []string{"db0"}}, + command: `SELECT SUM(value) FROM floatoverlap WHERE time >= '2000-01-01 00:00:05' AND time <= '2000-01-01T00:00:10Z' GROUP BY time(10s), region`, + exp: `{"results":[{"series":[{"name":"floatoverlap","tags":{"region":"us-east"},"columns":["time","sum"],"values":[["2000-01-01T00:00:00Z",null],["2000-01-01T00:00:10Z",30]]}]}]}`, + }, + &Query{ + name: "aggregation with a null field value - float", + params: url.Values{"db": []string{"db0"}}, + command: `SELECT SUM(value) FROM floatoverlap GROUP BY region`, + exp: `{"results":[{"series":[{"name":"floatoverlap","tags":{"region":"us-east"},"columns":["time","sum"],"values":[["1970-01-01T00:00:00Z",50]]},{"name":"floatoverlap","tags":{"region":"us-west"},"columns":["time","sum"],"values":[["1970-01-01T00:00:00Z",100]]}]}]}`, + }, + &Query{ + name: "multiple aggregations - float", + params: url.Values{"db": []string{"db0"}}, + command: `SELECT SUM(value), MEAN(value) FROM floatoverlap GROUP BY region`, + exp: `{"results":[{"series":[{"name":"floatoverlap","tags":{"region":"us-east"},"columns":["time","sum","mean"],"values":[["1970-01-01T00:00:00Z",50,25]]},{"name":"floatoverlap","tags":{"region":"us-west"},"columns":["time","sum","mean"],"values":[["1970-01-01T00:00:00Z",100,100]]}]}]}`, + }, + &Query{ + name: "multiple aggregations with division - float", + params: url.Values{"db": []string{"db0"}}, + command: `SELECT sum(value) / mean(value) as div FROM floatoverlap GROUP BY region`, + exp: `{"results":[{"series":[{"name":"floatoverlap","tags":{"region":"us-east"},"columns":["time","div"],"values":[["1970-01-01T00:00:00Z",2]]},{"name":"floatoverlap","tags":{"region":"us-west"},"columns":["time","div"],"values":[["1970-01-01T00:00:00Z",1]]}]}]}`, + }, + }...) + + for i, query := range test.queries { + if i == 0 { + if err := test.init(s); err != nil { + t.Fatalf("test init failed: %s", err) + } + } + if query.skip { + t.Logf("SKIP:: %s", query.name) + continue + } + if err := query.Execute(s); err != nil { + t.Error(query.Error(err)) + } else if !query.success() { + t.Error(query.failureMessage()) + } + } +} + +func TestServer_Query_Aggregates_GroupByOffset(t *testing.T) { + t.Parallel() + s := OpenDefaultServer(NewConfig()) + defer s.Close() + + test := NewTest("db0", "rp0") + test.writes = Writes{ + &Write{data: strings.Join([]string{ + fmt.Sprintf(`offset,region=us-east,host=serverA value=20.0 %d`, mustParseTime(time.RFC3339Nano, "2000-01-01T00:00:00Z").UnixNano()), + fmt.Sprintf(`offset,region=us-east,host=serverB value=30.0 %d`, mustParseTime(time.RFC3339Nano, "2000-01-01T00:00:10Z").UnixNano()), + fmt.Sprintf(`offset,region=us-west,host=serverC value=100.0 %d`, mustParseTime(time.RFC3339Nano, "2000-01-01T00:00:00Z").UnixNano()), + }, "\n")}, + } + + test.addQueries([]*Query{ + &Query{ + name: "group by offset - standard", + params: url.Values{"db": []string{"db0"}}, + command: `SELECT sum(value) FROM "offset" WHERE time >= '1999-12-31T23:59:55Z' AND time < '2000-01-01T00:00:15Z' GROUP BY time(10s, 5s) FILL(0)`, + exp: `{"results":[{"series":[{"name":"offset","columns":["time","sum"],"values":[["1999-12-31T23:59:55Z",120],["2000-01-01T00:00:05Z",30]]}]}]}`, + }, + &Query{ + name: "group by offset - misaligned time", + params: url.Values{"db": []string{"db0"}}, + command: `SELECT sum(value) FROM "offset" WHERE time >= '2000-01-01T00:00:00Z' AND time < '2000-01-01T00:00:20Z' GROUP BY time(10s, 5s) FILL(0)`, + exp: `{"results":[{"series":[{"name":"offset","columns":["time","sum"],"values":[["1999-12-31T23:59:55Z",120],["2000-01-01T00:00:05Z",30],["2000-01-01T00:00:15Z",0]]}]}]}`, + }, + &Query{ + name: "group by offset - negative time", + params: url.Values{"db": []string{"db0"}}, + command: `SELECT sum(value) FROM "offset" WHERE time >= '1999-12-31T23:59:55Z' AND time < '2000-01-01T00:00:15Z' GROUP BY time(10s, -5s) FILL(0)`, + exp: `{"results":[{"series":[{"name":"offset","columns":["time","sum"],"values":[["1999-12-31T23:59:55Z",120],["2000-01-01T00:00:05Z",30]]}]}]}`, + }, + &Query{ + name: "group by offset - modulo", + params: url.Values{"db": []string{"db0"}}, + command: `SELECT sum(value) FROM "offset" WHERE time >= '1999-12-31T23:59:55Z' AND time < '2000-01-01T00:00:15Z' GROUP BY time(10s, 35s) FILL(0)`, + exp: `{"results":[{"series":[{"name":"offset","columns":["time","sum"],"values":[["1999-12-31T23:59:55Z",120],["2000-01-01T00:00:05Z",30]]}]}]}`, + }, + }...) + + for i, query := range test.queries { + if i == 0 { + if err := test.init(s); err != nil { + t.Fatalf("test init failed: %s", err) + } + } + if query.skip { + t.Logf("SKIP:: %s", query.name) + continue + } + if err := query.Execute(s); err != nil { + t.Error(query.Error(err)) + } else if !query.success() { + t.Error(query.failureMessage()) + } + } +} + +func TestServer_Query_Aggregates_Load(t *testing.T) { + t.Parallel() + s := OpenDefaultServer(NewConfig()) + defer s.Close() + + test := NewTest("db0", "rp0") + test.writes = Writes{ + &Write{data: strings.Join([]string{ + fmt.Sprintf(`load,region=us-east,host=serverA value=20.0 %d`, mustParseTime(time.RFC3339Nano, "2000-01-01T00:00:00Z").UnixNano()), + fmt.Sprintf(`load,region=us-east,host=serverB value=30.0 %d`, mustParseTime(time.RFC3339Nano, "2000-01-01T00:00:10Z").UnixNano()), + fmt.Sprintf(`load,region=us-west,host=serverC value=100.0 %d`, mustParseTime(time.RFC3339Nano, "2000-01-01T00:00:00Z").UnixNano()), + }, "\n")}, + } + + test.addQueries([]*Query{ + &Query{ + name: "group by multiple dimensions", + params: url.Values{"db": []string{"db0"}}, + command: `SELECT sum(value) FROM load GROUP BY region, host`, + exp: `{"results":[{"series":[{"name":"load","tags":{"host":"serverA","region":"us-east"},"columns":["time","sum"],"values":[["1970-01-01T00:00:00Z",20]]},{"name":"load","tags":{"host":"serverB","region":"us-east"},"columns":["time","sum"],"values":[["1970-01-01T00:00:00Z",30]]},{"name":"load","tags":{"host":"serverC","region":"us-west"},"columns":["time","sum"],"values":[["1970-01-01T00:00:00Z",100]]}]}]}`, + }, + &Query{ + name: "group by multiple dimensions", + params: url.Values{"db": []string{"db0"}}, + command: `SELECT sum(value)*2 FROM load`, + exp: `{"results":[{"series":[{"name":"load","columns":["time","sum"],"values":[["1970-01-01T00:00:00Z",300]]}]}]}`, + }, + &Query{ + name: "group by multiple dimensions", + params: url.Values{"db": []string{"db0"}}, + command: `SELECT sum(value)/2 FROM load`, + exp: `{"results":[{"series":[{"name":"load","columns":["time","sum"],"values":[["1970-01-01T00:00:00Z",75]]}]}]}`, + }, + }...) + + for i, query := range test.queries { + if i == 0 { + if err := test.init(s); err != nil { + t.Fatalf("test init failed: %s", err) + } + } + if query.skip { + t.Logf("SKIP:: %s", query.name) + continue + } + if err := query.Execute(s); err != nil { + t.Error(query.Error(err)) + } else if !query.success() { + t.Error(query.failureMessage()) + } + } +} + +func TestServer_Query_Aggregates_CPU(t *testing.T) { + t.Parallel() + s := OpenDefaultServer(NewConfig()) + defer s.Close() + + test := NewTest("db0", "rp0") + test.writes = Writes{ + &Write{data: strings.Join([]string{ + fmt.Sprintf(`cpu,region=uk,host=serverZ,service=redis value=20.0 %d`, mustParseTime(time.RFC3339Nano, "2000-01-01T00:00:03Z").UnixNano()), + fmt.Sprintf(`cpu,region=uk,host=serverZ,service=mysql value=30.0 %d`, mustParseTime(time.RFC3339Nano, "2000-01-01T00:00:03Z").UnixNano()), + }, "\n")}, + } + + test.addQueries([]*Query{ + &Query{ + name: "aggregation with WHERE and AND", + params: url.Values{"db": []string{"db0"}}, + command: `SELECT sum(value) FROM cpu WHERE region='uk' AND host='serverZ'`, + exp: `{"results":[{"series":[{"name":"cpu","columns":["time","sum"],"values":[["1970-01-01T00:00:00Z",50]]}]}]}`, + }, + }...) + + for i, query := range test.queries { + if i == 0 { + if err := test.init(s); err != nil { + t.Fatalf("test init failed: %s", err) + } + } + if query.skip { + t.Logf("SKIP:: %s", query.name) + continue + } + if err := query.Execute(s); err != nil { + t.Error(query.Error(err)) + } else if !query.success() { + t.Error(query.failureMessage()) + } + } +} + +func TestServer_Query_Aggregates_String(t *testing.T) { + t.Parallel() + s := OpenDefaultServer(NewConfig()) + defer s.Close() + + test := NewTest("db0", "rp0") + test.writes = Writes{ + &Write{data: strings.Join([]string{ + fmt.Sprintf(`stringdata value="first" %d`, mustParseTime(time.RFC3339Nano, "2000-01-01T00:00:03Z").UnixNano()), + fmt.Sprintf(`stringdata value="last" %d`, mustParseTime(time.RFC3339Nano, "2000-01-01T00:00:04Z").UnixNano()), + }, "\n")}, + } + + test.addQueries([]*Query{ + // strings + &Query{ + name: "STDDEV on string data - string", + params: url.Values{"db": []string{"db0"}}, + command: `SELECT STDDEV(value) FROM stringdata`, + exp: `{"results":[{"series":[{"name":"stringdata","columns":["time","stddev"],"values":[["1970-01-01T00:00:00Z",null]]}]}]}`, + skip: true, // FIXME(benbjohnson): allow non-float var ref expr in cursor iterator + }, + &Query{ + name: "MEAN on string data - string", + params: url.Values{"db": []string{"db0"}}, + command: `SELECT MEAN(value) FROM stringdata`, + exp: `{"results":[{"series":[{"name":"stringdata","columns":["time","mean"],"values":[["1970-01-01T00:00:00Z",0]]}]}]}`, + skip: true, // FIXME(benbjohnson): allow non-float var ref expr in cursor iterator + }, + &Query{ + name: "MEDIAN on string data - string", + params: url.Values{"db": []string{"db0"}}, + command: `SELECT MEDIAN(value) FROM stringdata`, + exp: `{"results":[{"series":[{"name":"stringdata","columns":["time","median"],"values":[["1970-01-01T00:00:00Z",null]]}]}]}`, + skip: true, // FIXME(benbjohnson): allow non-float var ref expr in cursor iterator + }, + &Query{ + name: "COUNT on string data - string", + params: url.Values{"db": []string{"db0"}}, + command: `SELECT COUNT(value) FROM stringdata`, + exp: `{"results":[{"series":[{"name":"stringdata","columns":["time","count"],"values":[["1970-01-01T00:00:00Z",2]]}]}]}`, + skip: true, // FIXME(benbjohnson): allow non-float var ref expr in cursor iterator + }, + &Query{ + name: "FIRST on string data - string", + params: url.Values{"db": []string{"db0"}}, + command: `SELECT FIRST(value) FROM stringdata`, + exp: `{"results":[{"series":[{"name":"stringdata","columns":["time","first"],"values":[["2000-01-01T00:00:03Z","first"]]}]}]}`, + skip: true, // FIXME(benbjohnson): allow non-float var ref expr in cursor iterator + }, + &Query{ + name: "LAST on string data - string", + params: url.Values{"db": []string{"db0"}}, + command: `SELECT LAST(value) FROM stringdata`, + exp: `{"results":[{"series":[{"name":"stringdata","columns":["time","last"],"values":[["2000-01-01T00:00:04Z","last"]]}]}]}`, + skip: true, // FIXME(benbjohnson): allow non-float var ref expr in cursor iterator + }, + }...) + + for i, query := range test.queries { + if i == 0 { + if err := test.init(s); err != nil { + t.Fatalf("test init failed: %s", err) + } + } + if query.skip { + t.Logf("SKIP:: %s", query.name) + continue + } + if err := query.Execute(s); err != nil { + t.Error(query.Error(err)) + } else if !query.success() { + t.Error(query.failureMessage()) + } + } +} + +func TestServer_Query_AggregateSelectors(t *testing.T) { + t.Parallel() + s := OpenServer(NewConfig()) + defer s.Close() + + if err := s.CreateDatabaseAndRetentionPolicy("db0", newRetentionPolicyInfo("rp0", 1, 0)); err != nil { + t.Fatal(err) + } + if err := s.MetaClient.SetDefaultRetentionPolicy("db0", "rp0"); err != nil { + t.Fatal(err) + } + + writes := []string{ + fmt.Sprintf(`network,host=server01,region=west,core=1 rx=10i,tx=20i,core=2i %d`, mustParseTime(time.RFC3339Nano, "2000-01-01T00:00:00Z").UnixNano()), + fmt.Sprintf(`network,host=server02,region=west,core=2 rx=40i,tx=50i,core=3i %d`, mustParseTime(time.RFC3339Nano, "2000-01-01T00:00:10Z").UnixNano()), + fmt.Sprintf(`network,host=server03,region=east,core=3 rx=40i,tx=55i,core=4i %d`, mustParseTime(time.RFC3339Nano, "2000-01-01T00:00:20Z").UnixNano()), + fmt.Sprintf(`network,host=server04,region=east,core=4 rx=40i,tx=60i,core=1i %d`, mustParseTime(time.RFC3339Nano, "2000-01-01T00:00:30Z").UnixNano()), + fmt.Sprintf(`network,host=server05,region=west,core=1 rx=50i,tx=70i,core=2i %d`, mustParseTime(time.RFC3339Nano, "2000-01-01T00:00:40Z").UnixNano()), + fmt.Sprintf(`network,host=server06,region=east,core=2 rx=50i,tx=40i,core=3i %d`, mustParseTime(time.RFC3339Nano, "2000-01-01T00:00:50Z").UnixNano()), + fmt.Sprintf(`network,host=server07,region=west,core=3 rx=70i,tx=30i,core=4i %d`, mustParseTime(time.RFC3339Nano, "2000-01-01T00:01:00Z").UnixNano()), + fmt.Sprintf(`network,host=server08,region=east,core=4 rx=90i,tx=10i,core=1i %d`, mustParseTime(time.RFC3339Nano, "2000-01-01T00:01:10Z").UnixNano()), + fmt.Sprintf(`network,host=server09,region=east,core=1 rx=5i,tx=4i,core=2i %d`, mustParseTime(time.RFC3339Nano, "2000-01-01T00:01:20Z").UnixNano()), + } + + test := NewTest("db0", "rp0") + test.writes = Writes{ + &Write{data: strings.Join(writes, "\n")}, + } + + test.addQueries([]*Query{ + &Query{ + name: "baseline", + params: url.Values{"db": []string{"db0"}}, + command: `SELECT * FROM network`, + exp: `{"results":[{"series":[{"name":"network","columns":["time","core","core_1","host","region","rx","tx"],"values":[["2000-01-01T00:00:00Z",2,"1","server01","west",10,20],["2000-01-01T00:00:10Z",3,"2","server02","west",40,50],["2000-01-01T00:00:20Z",4,"3","server03","east",40,55],["2000-01-01T00:00:30Z",1,"4","server04","east",40,60],["2000-01-01T00:00:40Z",2,"1","server05","west",50,70],["2000-01-01T00:00:50Z",3,"2","server06","east",50,40],["2000-01-01T00:01:00Z",4,"3","server07","west",70,30],["2000-01-01T00:01:10Z",1,"4","server08","east",90,10],["2000-01-01T00:01:20Z",2,"1","server09","east",5,4]]}]}]}`, + }, + &Query{ + name: "max - baseline 30s", + params: url.Values{"db": []string{"db0"}}, + command: `SELECT max(rx) FROM network where time >= '2000-01-01T00:00:00Z' AND time <= '2000-01-01T00:01:29Z' group by time(30s)`, + exp: `{"results":[{"series":[{"name":"network","columns":["time","max"],"values":[["2000-01-01T00:00:00Z",40],["2000-01-01T00:00:30Z",50],["2000-01-01T00:01:00Z",90]]}]}]}`, + }, + &Query{ + name: "max - baseline 30s - epoch ms", + params: url.Values{"db": []string{"db0"}, "epoch": []string{"ms"}}, + command: `SELECT max(rx) FROM network where time >= '2000-01-01T00:00:00Z' AND time <= '2000-01-01T00:01:29Z' group by time(30s)`, + exp: fmt.Sprintf( + `{"results":[{"series":[{"name":"network","columns":["time","max"],"values":[[%d,40],[%d,50],[%d,90]]}]}]}`, + mustParseTime(time.RFC3339Nano, "2000-01-01T00:00:00Z").UnixNano()/int64(time.Millisecond), + mustParseTime(time.RFC3339Nano, "2000-01-01T00:00:30Z").UnixNano()/int64(time.Millisecond), + mustParseTime(time.RFC3339Nano, "2000-01-01T00:01:00Z").UnixNano()/int64(time.Millisecond), + ), + }, + &Query{ + name: "max - tx", + params: url.Values{"db": []string{"db0"}}, + command: `SELECT tx, max(rx) FROM network where time >= '2000-01-01T00:00:00Z' AND time <= '2000-01-01T00:01:29Z' group by time(30s)`, + exp: `{"results":[{"series":[{"name":"network","columns":["time","tx","max"],"values":[["2000-01-01T00:00:00Z",50,40],["2000-01-01T00:00:30Z",70,50],["2000-01-01T00:01:00Z",10,90]]}]}]}`, + }, + &Query{ + name: "max - time", + params: url.Values{"db": []string{"db0"}}, + command: `SELECT time, max(rx) FROM network where time >= '2000-01-01T00:00:00Z' AND time <= '2000-01-01T00:01:29Z' group by time(30s)`, + exp: `{"results":[{"series":[{"name":"network","columns":["time","max"],"values":[["2000-01-01T00:00:00Z",40],["2000-01-01T00:00:30Z",50],["2000-01-01T00:01:00Z",90]]}]}]}`, + }, + &Query{ + name: "max - time and tx", + params: url.Values{"db": []string{"db0"}}, + command: `SELECT time, tx, max(rx) FROM network where time >= '2000-01-01T00:00:00Z' AND time <= '2000-01-01T00:01:29Z' group by time(30s)`, + exp: `{"results":[{"series":[{"name":"network","columns":["time","tx","max"],"values":[["2000-01-01T00:00:00Z",50,40],["2000-01-01T00:00:30Z",70,50],["2000-01-01T00:01:00Z",10,90]]}]}]}`, + }, + &Query{ + name: "min - baseline 30s", + params: url.Values{"db": []string{"db0"}}, + command: `SELECT min(rx) FROM network where time >= '2000-01-01T00:00:00Z' AND time <= '2000-01-01T00:01:29Z' group by time(30s)`, + exp: `{"results":[{"series":[{"name":"network","columns":["time","min"],"values":[["2000-01-01T00:00:00Z",10],["2000-01-01T00:00:30Z",40],["2000-01-01T00:01:00Z",5]]}]}]}`, + }, + &Query{ + name: "min - tx", + params: url.Values{"db": []string{"db0"}}, + command: `SELECT tx, min(rx) FROM network where time >= '2000-01-01T00:00:00Z' AND time <= '2000-01-01T00:01:29Z' group by time(30s)`, + exp: `{"results":[{"series":[{"name":"network","columns":["time","tx","min"],"values":[["2000-01-01T00:00:00Z",20,10],["2000-01-01T00:00:30Z",60,40],["2000-01-01T00:01:00Z",4,5]]}]}]}`, + }, + &Query{ + name: "min - time", + params: url.Values{"db": []string{"db0"}}, + command: `SELECT time, min(rx) FROM network where time >= '2000-01-01T00:00:00Z' AND time <= '2000-01-01T00:01:29Z' group by time(30s)`, + exp: `{"results":[{"series":[{"name":"network","columns":["time","min"],"values":[["2000-01-01T00:00:00Z",10],["2000-01-01T00:00:30Z",40],["2000-01-01T00:01:00Z",5]]}]}]}`, + }, + &Query{ + name: "min - time and tx", + params: url.Values{"db": []string{"db0"}}, + command: `SELECT time, tx, min(rx) FROM network where time >= '2000-01-01T00:00:00Z' AND time <= '2000-01-01T00:01:29Z' group by time(30s)`, + exp: `{"results":[{"series":[{"name":"network","columns":["time","tx","min"],"values":[["2000-01-01T00:00:00Z",20,10],["2000-01-01T00:00:30Z",60,40],["2000-01-01T00:01:00Z",4,5]]}]}]}`, + }, + &Query{ + name: "max,min - baseline 30s", + params: url.Values{"db": []string{"db0"}}, + command: `SELECT max(rx), min(rx) FROM network where time >= '2000-01-01T00:00:00Z' AND time <= '2000-01-01T00:01:29Z' group by time(30s)`, + exp: `{"results":[{"series":[{"name":"network","columns":["time","max","min"],"values":[["2000-01-01T00:00:00Z",40,10],["2000-01-01T00:00:30Z",50,40],["2000-01-01T00:01:00Z",90,5]]}]}]}`, + }, + &Query{ + name: "first - baseline 30s", + params: url.Values{"db": []string{"db0"}}, + command: `SELECT first(rx) FROM network where time >= '2000-01-01T00:00:00Z' AND time <= '2000-01-01T00:01:29Z' group by time(30s)`, + exp: `{"results":[{"series":[{"name":"network","columns":["time","first"],"values":[["2000-01-01T00:00:00Z",10],["2000-01-01T00:00:30Z",40],["2000-01-01T00:01:00Z",70]]}]}]}`, + }, + &Query{ + name: "first - tx", + params: url.Values{"db": []string{"db0"}}, + command: `SELECT time, tx, first(rx) FROM network where time >= '2000-01-01T00:00:00Z' AND time <= '2000-01-01T00:01:29Z' group by time(30s)`, + exp: `{"results":[{"series":[{"name":"network","columns":["time","tx","first"],"values":[["2000-01-01T00:00:00Z",20,10],["2000-01-01T00:00:30Z",60,40],["2000-01-01T00:01:00Z",30,70]]}]}]}`, + }, + &Query{ + name: "first - time", + params: url.Values{"db": []string{"db0"}}, + command: `SELECT time, first(rx) FROM network where time >= '2000-01-01T00:00:00Z' AND time <= '2000-01-01T00:01:29Z' group by time(30s)`, + exp: `{"results":[{"series":[{"name":"network","columns":["time","first"],"values":[["2000-01-01T00:00:00Z",10],["2000-01-01T00:00:30Z",40],["2000-01-01T00:01:00Z",70]]}]}]}`, + }, + &Query{ + name: "first - time and tx", + params: url.Values{"db": []string{"db0"}}, + command: `SELECT time, tx, first(rx) FROM network where time >= '2000-01-01T00:00:00Z' AND time <= '2000-01-01T00:01:29Z' group by time(30s)`, + exp: `{"results":[{"series":[{"name":"network","columns":["time","tx","first"],"values":[["2000-01-01T00:00:00Z",20,10],["2000-01-01T00:00:30Z",60,40],["2000-01-01T00:01:00Z",30,70]]}]}]}`, + }, + &Query{ + name: "last - baseline 30s", + params: url.Values{"db": []string{"db0"}}, + command: `SELECT last(rx) FROM network where time >= '2000-01-01T00:00:00Z' AND time <= '2000-01-01T00:01:29Z' group by time(30s)`, + exp: `{"results":[{"series":[{"name":"network","columns":["time","last"],"values":[["2000-01-01T00:00:00Z",40],["2000-01-01T00:00:30Z",50],["2000-01-01T00:01:00Z",5]]}]}]}`, + }, + &Query{ + name: "last - tx", + params: url.Values{"db": []string{"db0"}}, + command: `SELECT tx, last(rx) FROM network where time >= '2000-01-01T00:00:00Z' AND time <= '2000-01-01T00:01:29Z' group by time(30s)`, + exp: `{"results":[{"series":[{"name":"network","columns":["time","tx","last"],"values":[["2000-01-01T00:00:00Z",55,40],["2000-01-01T00:00:30Z",40,50],["2000-01-01T00:01:00Z",4,5]]}]}]}`, + }, + &Query{ + name: "last - time", + params: url.Values{"db": []string{"db0"}}, + command: `SELECT time, last(rx) FROM network where time >= '2000-01-01T00:00:00Z' AND time <= '2000-01-01T00:01:29Z' group by time(30s)`, + exp: `{"results":[{"series":[{"name":"network","columns":["time","last"],"values":[["2000-01-01T00:00:00Z",40],["2000-01-01T00:00:30Z",50],["2000-01-01T00:01:00Z",5]]}]}]}`, + }, + &Query{ + name: "last - time and tx", + params: url.Values{"db": []string{"db0"}}, + command: `SELECT time, tx, last(rx) FROM network where time >= '2000-01-01T00:00:00Z' AND time <= '2000-01-01T00:01:29Z' group by time(30s)`, + exp: `{"results":[{"series":[{"name":"network","columns":["time","tx","last"],"values":[["2000-01-01T00:00:00Z",55,40],["2000-01-01T00:00:30Z",40,50],["2000-01-01T00:01:00Z",4,5]]}]}]}`, + }, + &Query{ + name: "count - baseline 30s", + params: url.Values{"db": []string{"db0"}}, + command: `SELECT count(rx) FROM network where time >= '2000-01-01T00:00:00Z' AND time <= '2000-01-01T00:01:29Z' group by time(30s)`, + exp: `{"results":[{"series":[{"name":"network","columns":["time","count"],"values":[["2000-01-01T00:00:00Z",3],["2000-01-01T00:00:30Z",3],["2000-01-01T00:01:00Z",3]]}]}]}`, + }, + &Query{ + name: "count - time", + params: url.Values{"db": []string{"db0"}}, + command: `SELECT time, count(rx) FROM network where time >= '2000-01-01T00:00:00Z' AND time <= '2000-01-01T00:01:29Z' group by time(30s)`, + exp: `{"error":"error parsing query: mixing aggregate and non-aggregate queries is not supported"}`, + }, + &Query{ + name: "count - tx", + params: url.Values{"db": []string{"db0"}}, + command: `SELECT tx, count(rx) FROM network where time >= '2000-01-01T00:00:00Z' AND time <= '2000-01-01T00:01:29Z' group by time(30s)`, + exp: `{"error":"error parsing query: mixing aggregate and non-aggregate queries is not supported"}`, + }, + &Query{ + name: "distinct - baseline 30s", + params: url.Values{"db": []string{"db0"}}, + command: `SELECT distinct(rx) FROM network where time >= '2000-01-01T00:00:00Z' AND time <= '2000-01-01T00:01:29Z' group by time(30s)`, + exp: `{"results":[{"series":[{"name":"network","columns":["time","distinct"],"values":[["2000-01-01T00:00:00Z",10],["2000-01-01T00:00:00Z",40],["2000-01-01T00:00:30Z",40],["2000-01-01T00:00:30Z",50],["2000-01-01T00:01:00Z",70],["2000-01-01T00:01:00Z",90],["2000-01-01T00:01:00Z",5]]}]}]}`, + }, + &Query{ + name: "distinct - time", + params: url.Values{"db": []string{"db0"}}, + command: `SELECT time, distinct(rx) FROM network where time >= '2000-01-01T00:00:00Z' AND time <= '2000-01-01T00:01:29Z' group by time(30s)`, + exp: `{"error":"error parsing query: aggregate function distinct() can not be combined with other functions or fields"}`, + }, + &Query{ + name: "distinct - tx", + params: url.Values{"db": []string{"db0"}}, + command: `SELECT tx, distinct(rx) FROM network where time >= '2000-01-01T00:00:00Z' AND time <= '2000-01-01T00:01:29Z' group by time(30s)`, + exp: `{"error":"error parsing query: aggregate function distinct() can not be combined with other functions or fields"}`, + }, + &Query{ + name: "mean - baseline 30s", + params: url.Values{"db": []string{"db0"}}, + command: `SELECT mean(rx) FROM network where time >= '2000-01-01T00:00:00Z' AND time <= '2000-01-01T00:01:29Z' group by time(30s)`, + exp: `{"results":[{"series":[{"name":"network","columns":["time","mean"],"values":[["2000-01-01T00:00:00Z",30],["2000-01-01T00:00:30Z",46.666666666666664],["2000-01-01T00:01:00Z",55]]}]}]}`, + }, + &Query{ + name: "mean - time", + params: url.Values{"db": []string{"db0"}}, + command: `SELECT time, mean(rx) FROM network where time >= '2000-01-01T00:00:00Z' AND time <= '2000-01-01T00:01:29Z' group by time(30s)`, + exp: `{"error":"error parsing query: mixing aggregate and non-aggregate queries is not supported"}`, + }, + &Query{ + name: "mean - tx", + params: url.Values{"db": []string{"db0"}}, + command: `SELECT tx, mean(rx) FROM network where time >= '2000-01-01T00:00:00Z' AND time <= '2000-01-01T00:01:29Z' group by time(30s)`, + exp: `{"error":"error parsing query: mixing aggregate and non-aggregate queries is not supported"}`, + }, + &Query{ + name: "median - baseline 30s", + params: url.Values{"db": []string{"db0"}}, + command: `SELECT median(rx) FROM network where time >= '2000-01-01T00:00:00Z' AND time <= '2000-01-01T00:01:29Z' group by time(30s)`, + exp: `{"results":[{"series":[{"name":"network","columns":["time","median"],"values":[["2000-01-01T00:00:00Z",40],["2000-01-01T00:00:30Z",50],["2000-01-01T00:01:00Z",70]]}]}]}`, + }, + &Query{ + name: "median - time", + params: url.Values{"db": []string{"db0"}}, + command: `SELECT time, median(rx) FROM network where time >= '2000-01-01T00:00:00Z' AND time <= '2000-01-01T00:01:29Z' group by time(30s)`, + exp: `{"error":"error parsing query: mixing aggregate and non-aggregate queries is not supported"}`, + }, + &Query{ + name: "median - tx", + params: url.Values{"db": []string{"db0"}}, + command: `SELECT tx, median(rx) FROM network where time >= '2000-01-01T00:00:00Z' AND time <= '2000-01-01T00:01:29Z' group by time(30s)`, + exp: `{"error":"error parsing query: mixing aggregate and non-aggregate queries is not supported"}`, + }, + &Query{ + name: "spread - baseline 30s", + params: url.Values{"db": []string{"db0"}}, + command: `SELECT spread(rx) FROM network where time >= '2000-01-01T00:00:00Z' AND time <= '2000-01-01T00:01:29Z' group by time(30s)`, + exp: `{"results":[{"series":[{"name":"network","columns":["time","spread"],"values":[["2000-01-01T00:00:00Z",30],["2000-01-01T00:00:30Z",10],["2000-01-01T00:01:00Z",85]]}]}]}`, + }, + &Query{ + name: "spread - time", + params: url.Values{"db": []string{"db0"}}, + command: `SELECT time, spread(rx) FROM network where time >= '2000-01-01T00:00:00Z' AND time <= '2000-01-01T00:01:29Z' group by time(30s)`, + exp: `{"error":"error parsing query: mixing aggregate and non-aggregate queries is not supported"}`, + }, + &Query{ + name: "spread - tx", + params: url.Values{"db": []string{"db0"}}, + command: `SELECT tx, spread(rx) FROM network where time >= '2000-01-01T00:00:00Z' AND time <= '2000-01-01T00:01:29Z' group by time(30s)`, + exp: `{"error":"error parsing query: mixing aggregate and non-aggregate queries is not supported"}`, + }, + &Query{ + name: "stddev - baseline 30s", + params: url.Values{"db": []string{"db0"}}, + command: `SELECT stddev(rx) FROM network where time >= '2000-01-01T00:00:00Z' AND time <= '2000-01-01T00:01:29Z' group by time(30s)`, + exp: `{"results":[{"series":[{"name":"network","columns":["time","stddev"],"values":[["2000-01-01T00:00:00Z",17.320508075688775],["2000-01-01T00:00:30Z",5.773502691896258],["2000-01-01T00:01:00Z",44.44097208657794]]}]}]}`, + }, + &Query{ + name: "stddev - time", + params: url.Values{"db": []string{"db0"}}, + command: `SELECT time, stddev(rx) FROM network where time >= '2000-01-01T00:00:00Z' AND time <= '2000-01-01T00:01:29Z' group by time(30s)`, + exp: `{"error":"error parsing query: mixing aggregate and non-aggregate queries is not supported"}`, + }, + &Query{ + name: "stddev - tx", + params: url.Values{"db": []string{"db0"}}, + command: `SELECT tx, stddev(rx) FROM network where time >= '2000-01-01T00:00:00Z' AND time <= '2000-01-01T00:01:29Z' group by time(30s)`, + exp: `{"error":"error parsing query: mixing aggregate and non-aggregate queries is not supported"}`, + }, + &Query{ + name: "percentile - baseline 30s", + params: url.Values{"db": []string{"db0"}}, + command: `SELECT percentile(rx, 75) FROM network where time >= '2000-01-01T00:00:00Z' AND time <= '2000-01-01T00:01:29Z' group by time(30s)`, + exp: `{"results":[{"series":[{"name":"network","columns":["time","percentile"],"values":[["2000-01-01T00:00:00Z",40],["2000-01-01T00:00:30Z",50],["2000-01-01T00:01:00Z",70]]}]}]}`, + }, + &Query{ + name: "percentile - time", + params: url.Values{"db": []string{"db0"}}, + command: `SELECT time, percentile(rx, 75) FROM network where time >= '2000-01-01T00:00:00Z' AND time <= '2000-01-01T00:01:29Z' group by time(30s)`, + exp: `{"results":[{"series":[{"name":"network","columns":["time","percentile"],"values":[["2000-01-01T00:00:00Z",40],["2000-01-01T00:00:30Z",50],["2000-01-01T00:01:00Z",70]]}]}]}`, + }, + &Query{ + name: "percentile - tx", + params: url.Values{"db": []string{"db0"}}, + command: `SELECT tx, percentile(rx, 75) FROM network where time >= '2000-01-01T00:00:00Z' AND time <= '2000-01-01T00:01:29Z' group by time(30s)`, + exp: `{"results":[{"series":[{"name":"network","columns":["time","tx","percentile"],"values":[["2000-01-01T00:00:00Z",50,40],["2000-01-01T00:00:30Z",70,50],["2000-01-01T00:01:00Z",30,70]]}]}]}`, + }, + }...) + + for i, query := range test.queries { + if i == 0 { + if err := test.init(s); err != nil { + t.Fatalf("test init failed: %s", err) + } + } + if query.skip { + t.Logf("SKIP:: %s", query.name) + continue + } + + if err := query.Execute(s); err != nil { + t.Error(query.Error(err)) + } else if !query.success() { + t.Error(query.failureMessage()) + } + } +} + +func TestServer_Query_TopInt(t *testing.T) { + t.Parallel() + s := OpenServer(NewConfig()) + defer s.Close() + + if err := s.CreateDatabaseAndRetentionPolicy("db0", newRetentionPolicyInfo("rp0", 1, 0)); err != nil { + t.Fatal(err) + } + if err := s.MetaClient.SetDefaultRetentionPolicy("db0", "rp0"); err != nil { + t.Fatal(err) + } + + writes := []string{ + // cpu data with overlapping duplicate values + // hour 0 + fmt.Sprintf(`cpu,host=server01 value=2.0 %d`, mustParseTime(time.RFC3339Nano, "2000-01-01T00:00:00Z").UnixNano()), + fmt.Sprintf(`cpu,host=server02 value=3.0 %d`, mustParseTime(time.RFC3339Nano, "2000-01-01T00:00:10Z").UnixNano()), + fmt.Sprintf(`cpu,host=server03 value=4.0 %d`, mustParseTime(time.RFC3339Nano, "2000-01-01T00:00:20Z").UnixNano()), + // hour 1 + fmt.Sprintf(`cpu,host=server04 value=5.0 %d`, mustParseTime(time.RFC3339Nano, "2000-01-01T01:00:00Z").UnixNano()), + fmt.Sprintf(`cpu,host=server05 value=7.0 %d`, mustParseTime(time.RFC3339Nano, "2000-01-01T01:00:10Z").UnixNano()), + fmt.Sprintf(`cpu,host=server06 value=6.0 %d`, mustParseTime(time.RFC3339Nano, "2000-01-01T01:00:20Z").UnixNano()), + // hour 2 + fmt.Sprintf(`cpu,host=server07 value=7.0 %d`, mustParseTime(time.RFC3339Nano, "2000-01-01T02:00:00Z").UnixNano()), + fmt.Sprintf(`cpu,host=server08 value=9.0 %d`, mustParseTime(time.RFC3339Nano, "2000-01-01T02:00:10Z").UnixNano()), + + // memory data + // hour 0 + fmt.Sprintf(`memory,host=a,service=redis value=1000i %d`, mustParseTime(time.RFC3339Nano, "2000-01-01T00:00:00Z").UnixNano()), + fmt.Sprintf(`memory,host=b,service=mysql value=2000i %d`, mustParseTime(time.RFC3339Nano, "2000-01-01T00:00:00Z").UnixNano()), + fmt.Sprintf(`memory,host=b,service=redis value=1500i %d`, mustParseTime(time.RFC3339Nano, "2000-01-01T00:00:00Z").UnixNano()), + // hour 1 + fmt.Sprintf(`memory,host=a,service=redis value=1001i %d`, mustParseTime(time.RFC3339Nano, "2000-01-01T01:00:00Z").UnixNano()), + fmt.Sprintf(`memory,host=b,service=mysql value=2001i %d`, mustParseTime(time.RFC3339Nano, "2000-01-01T01:00:00Z").UnixNano()), + fmt.Sprintf(`memory,host=b,service=redis value=1501i %d`, mustParseTime(time.RFC3339Nano, "2000-01-01T01:00:00Z").UnixNano()), + // hour 2 + fmt.Sprintf(`memory,host=a,service=redis value=1002i %d`, mustParseTime(time.RFC3339Nano, "2000-01-01T02:00:00Z").UnixNano()), + fmt.Sprintf(`memory,host=b,service=mysql value=2002i %d`, mustParseTime(time.RFC3339Nano, "2000-01-01T02:00:00Z").UnixNano()), + fmt.Sprintf(`memory,host=b,service=redis value=1502i %d`, mustParseTime(time.RFC3339Nano, "2000-01-01T02:00:00Z").UnixNano()), + } + + test := NewTest("db0", "rp0") + test.writes = Writes{ + &Write{data: strings.Join(writes, "\n")}, + } + + test.addQueries([]*Query{ + &Query{ + name: "top - cpu", + params: url.Values{"db": []string{"db0"}}, + command: `SELECT TOP(value, 1) FROM cpu`, + exp: `{"results":[{"series":[{"name":"cpu","columns":["time","top"],"values":[["2000-01-01T02:00:10Z",9]]}]}]}`, + }, + &Query{ + name: "top - cpu - 2 values", + params: url.Values{"db": []string{"db0"}}, + command: `SELECT TOP(value, 2) FROM cpu`, + exp: `{"results":[{"series":[{"name":"cpu","columns":["time","top"],"values":[["2000-01-01T01:00:10Z",7],["2000-01-01T02:00:10Z",9]]}]}]}`, + }, + &Query{ + name: "top - cpu - 3 values - sorts on tie properly", + params: url.Values{"db": []string{"db0"}}, + command: `SELECT TOP(value, 3) FROM cpu`, + exp: `{"results":[{"series":[{"name":"cpu","columns":["time","top"],"values":[["2000-01-01T01:00:10Z",7],["2000-01-01T02:00:00Z",7],["2000-01-01T02:00:10Z",9]]}]}]}`, + }, + &Query{ + name: "top - cpu - with tag", + params: url.Values{"db": []string{"db0"}}, + command: `SELECT TOP(value, host, 2) FROM cpu`, + exp: `{"results":[{"series":[{"name":"cpu","columns":["time","top","host"],"values":[["2000-01-01T01:00:10Z",7,"server05"],["2000-01-01T02:00:10Z",9,"server08"]]}]}]}`, + }, + &Query{ + name: "top - cpu - 3 values with limit 2", + params: url.Values{"db": []string{"db0"}}, + command: `SELECT TOP(value, 3) FROM cpu limit 2`, + exp: `{"error":"error parsing query: limit (3) in top function can not be larger than the LIMIT (2) in the select statement"}`, + }, + &Query{ + name: "top - cpu - hourly", + params: url.Values{"db": []string{"db0"}}, + command: `SELECT TOP(value, 1) FROM cpu where time >= '2000-01-01T00:00:00Z' and time <= '2000-01-01T02:00:10Z' group by time(1h)`, + exp: `{"results":[{"series":[{"name":"cpu","columns":["time","top"],"values":[["2000-01-01T00:00:00Z",4],["2000-01-01T01:00:00Z",7],["2000-01-01T02:00:00Z",9]]}]}]}`, + }, + &Query{ + name: "top - cpu - 2 values hourly", + params: url.Values{"db": []string{"db0"}}, + command: `SELECT TOP(value, 2) FROM cpu where time >= '2000-01-01T00:00:00Z' and time <= '2000-01-01T02:00:10Z' group by time(1h)`, + exp: `{"results":[{"series":[{"name":"cpu","columns":["time","top"],"values":[["2000-01-01T00:00:00Z",4],["2000-01-01T00:00:00Z",3],["2000-01-01T01:00:00Z",7],["2000-01-01T01:00:00Z",6],["2000-01-01T02:00:00Z",9],["2000-01-01T02:00:00Z",7]]}]}]}`, + }, + &Query{ + name: "top - cpu - 3 values hourly - validates that a bucket can have less than limit if no values exist in that time bucket", + params: url.Values{"db": []string{"db0"}}, + command: `SELECT TOP(value, 3) FROM cpu where time >= '2000-01-01T00:00:00Z' and time <= '2000-01-01T02:00:10Z' group by time(1h)`, + exp: `{"results":[{"series":[{"name":"cpu","columns":["time","top"],"values":[["2000-01-01T00:00:00Z",4],["2000-01-01T00:00:00Z",3],["2000-01-01T00:00:00Z",2],["2000-01-01T01:00:00Z",7],["2000-01-01T01:00:00Z",6],["2000-01-01T01:00:00Z",5],["2000-01-01T02:00:00Z",9],["2000-01-01T02:00:00Z",7]]}]}]}`, + }, + &Query{ + name: "top - memory - 2 values, two tags", + params: url.Values{"db": []string{"db0"}}, + command: `SELECT TOP(value, 2), host, service FROM memory`, + exp: `{"results":[{"series":[{"name":"memory","columns":["time","top","host","service"],"values":[["2000-01-01T01:00:00Z",2001,"b","mysql"],["2000-01-01T02:00:00Z",2002,"b","mysql"]]}]}]}`, + }, + &Query{ + name: "top - memory - host tag with limit 2", + params: url.Values{"db": []string{"db0"}}, + command: `SELECT TOP(value, host, 2) FROM memory`, + exp: `{"results":[{"series":[{"name":"memory","columns":["time","top","host"],"values":[["2000-01-01T02:00:00Z",2002,"b"],["2000-01-01T02:00:00Z",1002,"a"]]}]}]}`, + }, + &Query{ + name: "top - memory - host tag with limit 2, service tag in select", + params: url.Values{"db": []string{"db0"}}, + command: `SELECT TOP(value, host, 2), service FROM memory`, + exp: `{"results":[{"series":[{"name":"memory","columns":["time","top","host","service"],"values":[["2000-01-01T02:00:00Z",2002,"b","mysql"],["2000-01-01T02:00:00Z",1002,"a","redis"]]}]}]}`, + }, + &Query{ + name: "top - memory - service tag with limit 2, host tag in select", + params: url.Values{"db": []string{"db0"}}, + command: `SELECT TOP(value, service, 2), host FROM memory`, + exp: `{"results":[{"series":[{"name":"memory","columns":["time","top","service","host"],"values":[["2000-01-01T02:00:00Z",2002,"mysql","b"],["2000-01-01T02:00:00Z",1502,"redis","b"]]}]}]}`, + }, + &Query{ + name: "top - memory - host and service tag with limit 2", + params: url.Values{"db": []string{"db0"}}, + command: `SELECT TOP(value, host, service, 2) FROM memory`, + exp: `{"results":[{"series":[{"name":"memory","columns":["time","top","host","service"],"values":[["2000-01-01T02:00:00Z",2002,"b","mysql"],["2000-01-01T02:00:00Z",1502,"b","redis"]]}]}]}`, + }, + &Query{ + name: "top - memory - host tag with limit 2 with service tag in select", + params: url.Values{"db": []string{"db0"}}, + command: `SELECT TOP(value, host, 2), service FROM memory`, + exp: `{"results":[{"series":[{"name":"memory","columns":["time","top","host","service"],"values":[["2000-01-01T02:00:00Z",2002,"b","mysql"],["2000-01-01T02:00:00Z",1002,"a","redis"]]}]}]}`, + }, + &Query{ + name: "top - memory - host and service tag with limit 3", + params: url.Values{"db": []string{"db0"}}, + command: `SELECT TOP(value, host, service, 3) FROM memory`, + exp: `{"results":[{"series":[{"name":"memory","columns":["time","top","host","service"],"values":[["2000-01-01T02:00:00Z",2002,"b","mysql"],["2000-01-01T02:00:00Z",1502,"b","redis"],["2000-01-01T02:00:00Z",1002,"a","redis"]]}]}]}`, + }, + + // TODO + // - Test that specifiying fields or tags in the function will rewrite the query to expand them to the fields + // - Test that a field can be used in the top function + // - Test that asking for a field will come back before a tag if they have the same name for a tag and a field + // - Test that `select top(value, host, 2)` when there is only one value for `host` it will only bring back one value + // - Test that `select top(value, host, 4) from foo where time > now() - 1d and time < now() group by time(1h)` and host is unique in some time buckets that it returns only the unique ones, and not always 4 values + + }...) + + for i, query := range test.queries { + if i == 0 { + if err := test.init(s); err != nil { + t.Fatalf("test init failed: %s", err) + } + } + if query.skip { + t.Logf("SKIP: %s", query.name) + continue + } + + if err := query.Execute(s); err != nil { + t.Error(query.Error(err)) + } else if !query.success() { + t.Error(query.failureMessage()) + } + } +} + +// Test various aggregates when different series only have data for the same timestamp. +func TestServer_Query_Aggregates_IdenticalTime(t *testing.T) { + t.Parallel() + s := OpenServer(NewConfig()) + defer s.Close() + + if err := s.CreateDatabaseAndRetentionPolicy("db0", newRetentionPolicyInfo("rp0", 1, 0)); err != nil { + t.Fatal(err) + } + if err := s.MetaClient.SetDefaultRetentionPolicy("db0", "rp0"); err != nil { + t.Fatal(err) + } + + writes := []string{ + fmt.Sprintf(`series,host=a value=1 %d`, mustParseTime(time.RFC3339Nano, "2000-01-01T00:00:00Z").UnixNano()), + fmt.Sprintf(`series,host=b value=2 %d`, mustParseTime(time.RFC3339Nano, "2000-01-01T00:00:00Z").UnixNano()), + fmt.Sprintf(`series,host=c value=3 %d`, mustParseTime(time.RFC3339Nano, "2000-01-01T00:00:00Z").UnixNano()), + fmt.Sprintf(`series,host=d value=4 %d`, mustParseTime(time.RFC3339Nano, "2000-01-01T00:00:00Z").UnixNano()), + fmt.Sprintf(`series,host=e value=5 %d`, mustParseTime(time.RFC3339Nano, "2000-01-01T00:00:00Z").UnixNano()), + fmt.Sprintf(`series,host=f value=5 %d`, mustParseTime(time.RFC3339Nano, "2000-01-01T00:00:00Z").UnixNano()), + fmt.Sprintf(`series,host=g value=5 %d`, mustParseTime(time.RFC3339Nano, "2000-01-01T00:00:00Z").UnixNano()), + fmt.Sprintf(`series,host=h value=5 %d`, mustParseTime(time.RFC3339Nano, "2000-01-01T00:00:00Z").UnixNano()), + fmt.Sprintf(`series,host=i value=5 %d`, mustParseTime(time.RFC3339Nano, "2000-01-01T00:00:00Z").UnixNano()), + } + + test := NewTest("db0", "rp0") + test.writes = Writes{ + &Write{data: strings.Join(writes, "\n")}, + } + + test.addQueries([]*Query{ + &Query{ + name: "last from multiple series with identical timestamp", + params: url.Values{"db": []string{"db0"}}, + command: `SELECT last(value) FROM "series"`, + exp: `{"results":[{"series":[{"name":"series","columns":["time","last"],"values":[["2000-01-01T00:00:00Z",5]]}]}]}`, + repeat: 100, + }, + &Query{ + name: "first from multiple series with identical timestamp", + params: url.Values{"db": []string{"db0"}}, + command: `SELECT first(value) FROM "series"`, + exp: `{"results":[{"series":[{"name":"series","columns":["time","first"],"values":[["2000-01-01T00:00:00Z",5]]}]}]}`, + repeat: 100, + }, + }...) + + for i, query := range test.queries { + if i == 0 { + if err := test.init(s); err != nil { + t.Fatalf("test init failed: %s", err) + } + } + if query.skip { + t.Logf("SKIP:: %s", query.name) + continue + } + for n := 0; n <= query.repeat; n++ { + if err := query.Execute(s); err != nil { + t.Error(query.Error(err)) + } else if !query.success() { + t.Error(query.failureMessage()) + } + } + } +} + +// This will test that when using a group by, that it observes the time you asked for +// but will only put the values in the bucket that match the time range +func TestServer_Query_GroupByTimeCutoffs(t *testing.T) { + t.Parallel() + s := OpenServer(NewConfig()) + defer s.Close() + + if err := s.CreateDatabaseAndRetentionPolicy("db0", newRetentionPolicyInfo("rp0", 1, 0)); err != nil { + t.Fatal(err) + } + if err := s.MetaClient.SetDefaultRetentionPolicy("db0", "rp0"); err != nil { + t.Fatal(err) + } + + writes := []string{ + fmt.Sprintf(`cpu value=1i %d`, mustParseTime(time.RFC3339Nano, "2000-01-01T00:00:00Z").UnixNano()), + fmt.Sprintf(`cpu value=2i %d`, mustParseTime(time.RFC3339Nano, "2000-01-01T00:00:01Z").UnixNano()), + fmt.Sprintf(`cpu value=3i %d`, mustParseTime(time.RFC3339Nano, "2000-01-01T00:00:05Z").UnixNano()), + fmt.Sprintf(`cpu value=4i %d`, mustParseTime(time.RFC3339Nano, "2000-01-01T00:00:08Z").UnixNano()), + fmt.Sprintf(`cpu value=5i %d`, mustParseTime(time.RFC3339Nano, "2000-01-01T00:00:09Z").UnixNano()), + fmt.Sprintf(`cpu value=6i %d`, mustParseTime(time.RFC3339Nano, "2000-01-01T00:00:10Z").UnixNano()), + } + test := NewTest("db0", "rp0") + test.writes = Writes{ + &Write{data: strings.Join(writes, "\n")}, + } + + test.addQueries([]*Query{ + &Query{ + name: "sum all time", + params: url.Values{"db": []string{"db0"}}, + command: `SELECT SUM(value) FROM cpu`, + exp: `{"results":[{"series":[{"name":"cpu","columns":["time","sum"],"values":[["1970-01-01T00:00:00Z",21]]}]}]}`, + }, + &Query{ + name: "sum all time grouped by time 5s", + params: url.Values{"db": []string{"db0"}}, + command: `SELECT SUM(value) FROM cpu where time >= '2000-01-01T00:00:00Z' and time <= '2000-01-01T00:00:10Z' group by time(5s)`, + exp: `{"results":[{"series":[{"name":"cpu","columns":["time","sum"],"values":[["2000-01-01T00:00:00Z",3],["2000-01-01T00:00:05Z",12],["2000-01-01T00:00:10Z",6]]}]}]}`, + }, + &Query{ + name: "sum all time grouped by time 5s missing first point", + params: url.Values{"db": []string{"db0"}}, + command: `SELECT SUM(value) FROM cpu where time >= '2000-01-01T00:00:01Z' and time <= '2000-01-01T00:00:10Z' group by time(5s)`, + exp: `{"results":[{"series":[{"name":"cpu","columns":["time","sum"],"values":[["2000-01-01T00:00:00Z",2],["2000-01-01T00:00:05Z",12],["2000-01-01T00:00:10Z",6]]}]}]}`, + }, + &Query{ + name: "sum all time grouped by time 5s missing first points (null for bucket)", + params: url.Values{"db": []string{"db0"}}, + command: `SELECT SUM(value) FROM cpu where time >= '2000-01-01T00:00:02Z' and time <= '2000-01-01T00:00:10Z' group by time(5s)`, + exp: `{"results":[{"series":[{"name":"cpu","columns":["time","sum"],"values":[["2000-01-01T00:00:00Z",null],["2000-01-01T00:00:05Z",12],["2000-01-01T00:00:10Z",6]]}]}]}`, + }, + &Query{ + name: "sum all time grouped by time 5s missing last point - 2 time intervals", + params: url.Values{"db": []string{"db0"}}, + command: `SELECT SUM(value) FROM cpu where time >= '2000-01-01T00:00:00Z' and time <= '2000-01-01T00:00:09Z' group by time(5s)`, + exp: `{"results":[{"series":[{"name":"cpu","columns":["time","sum"],"values":[["2000-01-01T00:00:00Z",3],["2000-01-01T00:00:05Z",12]]}]}]}`, + }, + &Query{ + name: "sum all time grouped by time 5s missing last 2 points - 2 time intervals", + params: url.Values{"db": []string{"db0"}}, + command: `SELECT SUM(value) FROM cpu where time >= '2000-01-01T00:00:00Z' and time <= '2000-01-01T00:00:08Z' group by time(5s)`, + exp: `{"results":[{"series":[{"name":"cpu","columns":["time","sum"],"values":[["2000-01-01T00:00:00Z",3],["2000-01-01T00:00:05Z",7]]}]}]}`, + }, + }...) + + for i, query := range test.queries { + if i == 0 { + if err := test.init(s); err != nil { + t.Fatalf("test init failed: %s", err) + } + } + if query.skip { + t.Logf("SKIP:: %s", query.name) + continue + } + if err := query.Execute(s); err != nil { + t.Error(query.Error(err)) + } else if !query.success() { + t.Error(query.failureMessage()) + } + } +} + +func TestServer_Write_Precision(t *testing.T) { + t.Parallel() + s := OpenServer(NewConfig()) + defer s.Close() + + if err := s.CreateDatabaseAndRetentionPolicy("db0", newRetentionPolicyInfo("rp0", 1, 0)); err != nil { + t.Fatal(err) + } + if err := s.MetaClient.SetDefaultRetentionPolicy("db0", "rp0"); err != nil { + t.Fatal(err) + } + + writes := []struct { + write string + params url.Values + }{ + { + write: fmt.Sprintf("cpu_n0_precision value=1 %d", mustParseTime(time.RFC3339Nano, "2000-01-01T12:34:56.789012345Z").UnixNano()), + }, + { + write: fmt.Sprintf("cpu_n1_precision value=1.1 %d", mustParseTime(time.RFC3339Nano, "2000-01-01T12:34:56.789012345Z").UnixNano()), + params: url.Values{"precision": []string{"n"}}, + }, + { + write: fmt.Sprintf("cpu_u_precision value=100 %d", mustParseTime(time.RFC3339Nano, "2000-01-01T12:34:56.789012345Z").Truncate(time.Microsecond).UnixNano()/int64(time.Microsecond)), + params: url.Values{"precision": []string{"u"}}, + }, + { + write: fmt.Sprintf("cpu_ms_precision value=200 %d", mustParseTime(time.RFC3339Nano, "2000-01-01T12:34:56.789012345Z").Truncate(time.Millisecond).UnixNano()/int64(time.Millisecond)), + params: url.Values{"precision": []string{"ms"}}, + }, + { + write: fmt.Sprintf("cpu_s_precision value=300 %d", mustParseTime(time.RFC3339Nano, "2000-01-01T12:34:56.789012345Z").Truncate(time.Second).UnixNano()/int64(time.Second)), + params: url.Values{"precision": []string{"s"}}, + }, + { + write: fmt.Sprintf("cpu_m_precision value=400 %d", mustParseTime(time.RFC3339Nano, "2000-01-01T12:34:56.789012345Z").Truncate(time.Minute).UnixNano()/int64(time.Minute)), + params: url.Values{"precision": []string{"m"}}, + }, + { + write: fmt.Sprintf("cpu_h_precision value=500 %d", mustParseTime(time.RFC3339Nano, "2000-01-01T12:34:56.789012345Z").Truncate(time.Hour).UnixNano()/int64(time.Hour)), + params: url.Values{"precision": []string{"h"}}, + }, + } + + test := NewTest("db0", "rp0") + + test.addQueries([]*Query{ + &Query{ + name: "point with nanosecond precision time - no precision specified on write", + command: `SELECT * FROM cpu_n0_precision`, + params: url.Values{"db": []string{"db0"}}, + exp: `{"results":[{"series":[{"name":"cpu_n0_precision","columns":["time","value"],"values":[["2000-01-01T12:34:56.789012345Z",1]]}]}]}`, + }, + &Query{ + name: "point with nanosecond precision time", + command: `SELECT * FROM cpu_n1_precision`, + params: url.Values{"db": []string{"db0"}}, + exp: `{"results":[{"series":[{"name":"cpu_n1_precision","columns":["time","value"],"values":[["2000-01-01T12:34:56.789012345Z",1.1]]}]}]}`, + }, + &Query{ + name: "point with microsecond precision time", + command: `SELECT * FROM cpu_u_precision`, + params: url.Values{"db": []string{"db0"}}, + exp: `{"results":[{"series":[{"name":"cpu_u_precision","columns":["time","value"],"values":[["2000-01-01T12:34:56.789012Z",100]]}]}]}`, + }, + &Query{ + name: "point with millisecond precision time", + command: `SELECT * FROM cpu_ms_precision`, + params: url.Values{"db": []string{"db0"}}, + exp: `{"results":[{"series":[{"name":"cpu_ms_precision","columns":["time","value"],"values":[["2000-01-01T12:34:56.789Z",200]]}]}]}`, + }, + &Query{ + name: "point with second precision time", + command: `SELECT * FROM cpu_s_precision`, + params: url.Values{"db": []string{"db0"}}, + exp: `{"results":[{"series":[{"name":"cpu_s_precision","columns":["time","value"],"values":[["2000-01-01T12:34:56Z",300]]}]}]}`, + }, + &Query{ + name: "point with minute precision time", + command: `SELECT * FROM cpu_m_precision`, + params: url.Values{"db": []string{"db0"}}, + exp: `{"results":[{"series":[{"name":"cpu_m_precision","columns":["time","value"],"values":[["2000-01-01T12:34:00Z",400]]}]}]}`, + }, + &Query{ + name: "point with hour precision time", + command: `SELECT * FROM cpu_h_precision`, + params: url.Values{"db": []string{"db0"}}, + exp: `{"results":[{"series":[{"name":"cpu_h_precision","columns":["time","value"],"values":[["2000-01-01T12:00:00Z",500]]}]}]}`, + }, + }...) + + // we are doing writes that require parameter changes, so we are fighting the test harness a little to make this happen properly + for _, w := range writes { + test.writes = Writes{ + &Write{data: w.write}, + } + test.params = w.params + test.initialized = false + if err := test.init(s); err != nil { + t.Fatalf("test init failed: %s", err) + } + } + + for _, query := range test.queries { + if query.skip { + t.Logf("SKIP:: %s", query.name) + continue + } + if err := query.Execute(s); err != nil { + t.Error(query.Error(err)) + } else if !query.success() { + t.Error(query.failureMessage()) + } + } +} + +func TestServer_Query_Wildcards(t *testing.T) { + t.Parallel() + s := OpenServer(NewConfig()) + defer s.Close() + + if err := s.CreateDatabaseAndRetentionPolicy("db0", newRetentionPolicyInfo("rp0", 1, 0)); err != nil { + t.Fatal(err) + } + if err := s.MetaClient.SetDefaultRetentionPolicy("db0", "rp0"); err != nil { + t.Fatal(err) + } + + writes := []string{ + fmt.Sprintf(`wildcard,region=us-east value=10 %d`, mustParseTime(time.RFC3339Nano, "2000-01-01T00:00:00Z").UnixNano()), + fmt.Sprintf(`wildcard,region=us-east valx=20 %d`, mustParseTime(time.RFC3339Nano, "2000-01-01T00:00:10Z").UnixNano()), + fmt.Sprintf(`wildcard,region=us-east value=30,valx=40 %d`, mustParseTime(time.RFC3339Nano, "2000-01-01T00:00:20Z").UnixNano()), + + fmt.Sprintf(`wgroup,region=us-east value=10.0 %d`, mustParseTime(time.RFC3339Nano, "2000-01-01T00:00:00Z").UnixNano()), + fmt.Sprintf(`wgroup,region=us-east value=20.0 %d`, mustParseTime(time.RFC3339Nano, "2000-01-01T00:00:10Z").UnixNano()), + fmt.Sprintf(`wgroup,region=us-west value=30.0 %d`, mustParseTime(time.RFC3339Nano, "2000-01-01T00:00:20Z").UnixNano()), + + fmt.Sprintf(`m1,region=us-east value=10.0 %d`, mustParseTime(time.RFC3339Nano, "2000-01-01T00:00:00Z").UnixNano()), + fmt.Sprintf(`m2,host=server01 field=20.0 %d`, mustParseTime(time.RFC3339Nano, "2000-01-01T00:00:01Z").UnixNano()), + } + + test := NewTest("db0", "rp0") + test.writes = Writes{ + &Write{data: strings.Join(writes, "\n")}, + } + + test.addQueries([]*Query{ + &Query{ + name: "wildcard", + params: url.Values{"db": []string{"db0"}}, + command: `SELECT * FROM wildcard`, + exp: `{"results":[{"series":[{"name":"wildcard","columns":["time","region","value","valx"],"values":[["2000-01-01T00:00:00Z","us-east",10,null],["2000-01-01T00:00:10Z","us-east",null,20],["2000-01-01T00:00:20Z","us-east",30,40]]}]}]}`, + }, + &Query{ + name: "wildcard with group by", + params: url.Values{"db": []string{"db0"}}, + command: `SELECT * FROM wildcard GROUP BY *`, + exp: `{"results":[{"series":[{"name":"wildcard","tags":{"region":"us-east"},"columns":["time","value","valx"],"values":[["2000-01-01T00:00:00Z",10,null],["2000-01-01T00:00:10Z",null,20],["2000-01-01T00:00:20Z",30,40]]}]}]}`, + }, + &Query{ + name: "GROUP BY queries", + params: url.Values{"db": []string{"db0"}}, + command: `SELECT mean(value) FROM wgroup GROUP BY *`, + exp: `{"results":[{"series":[{"name":"wgroup","tags":{"region":"us-east"},"columns":["time","mean"],"values":[["1970-01-01T00:00:00Z",15]]},{"name":"wgroup","tags":{"region":"us-west"},"columns":["time","mean"],"values":[["1970-01-01T00:00:00Z",30]]}]}]}`, + }, + &Query{ + name: "GROUP BY queries with time", + params: url.Values{"db": []string{"db0"}}, + command: `SELECT mean(value) FROM wgroup WHERE time >= '2000-01-01T00:00:00Z' AND time < '2000-01-01T00:01:00Z' GROUP BY *,TIME(1m)`, + exp: `{"results":[{"series":[{"name":"wgroup","tags":{"region":"us-east"},"columns":["time","mean"],"values":[["2000-01-01T00:00:00Z",15]]},{"name":"wgroup","tags":{"region":"us-west"},"columns":["time","mean"],"values":[["2000-01-01T00:00:00Z",30]]}]}]}`, + }, + &Query{ + name: "wildcard and field in select", + params: url.Values{"db": []string{"db0"}}, + command: `SELECT value, * FROM wildcard`, + exp: `{"results":[{"series":[{"name":"wildcard","columns":["time","value","region","value_1","valx"],"values":[["2000-01-01T00:00:00Z",10,"us-east",10,null],["2000-01-01T00:00:10Z",null,"us-east",null,20],["2000-01-01T00:00:20Z",30,"us-east",30,40]]}]}]}`, + }, + &Query{ + name: "field and wildcard in select", + params: url.Values{"db": []string{"db0"}}, + command: `SELECT value, * FROM wildcard`, + exp: `{"results":[{"series":[{"name":"wildcard","columns":["time","value","region","value_1","valx"],"values":[["2000-01-01T00:00:00Z",10,"us-east",10,null],["2000-01-01T00:00:10Z",null,"us-east",null,20],["2000-01-01T00:00:20Z",30,"us-east",30,40]]}]}]}`, + }, + &Query{ + name: "field and wildcard in group by", + params: url.Values{"db": []string{"db0"}}, + command: `SELECT * FROM wildcard GROUP BY region, *`, + exp: `{"results":[{"series":[{"name":"wildcard","tags":{"region":"us-east"},"columns":["time","value","valx"],"values":[["2000-01-01T00:00:00Z",10,null],["2000-01-01T00:00:10Z",null,20],["2000-01-01T00:00:20Z",30,40]]}]}]}`, + }, + &Query{ + name: "wildcard and field in group by", + params: url.Values{"db": []string{"db0"}}, + command: `SELECT * FROM wildcard GROUP BY *, region`, + exp: `{"results":[{"series":[{"name":"wildcard","tags":{"region":"us-east"},"columns":["time","value","valx"],"values":[["2000-01-01T00:00:00Z",10,null],["2000-01-01T00:00:10Z",null,20],["2000-01-01T00:00:20Z",30,40]]}]}]}`, + }, + &Query{ + name: "wildcard with multiple measurements", + params: url.Values{"db": []string{"db0"}}, + command: `SELECT * FROM m1, m2`, + exp: `{"results":[{"series":[{"name":"m1","columns":["time","field","host","region","value"],"values":[["2000-01-01T00:00:00Z",null,null,"us-east",10]]},{"name":"m2","columns":["time","field","host","region","value"],"values":[["2000-01-01T00:00:01Z",20,"server01",null,null]]}]}]}`, + }, + &Query{ + name: "wildcard with multiple measurements via regex", + params: url.Values{"db": []string{"db0"}}, + command: `SELECT * FROM /^m.*/`, + exp: `{"results":[{"series":[{"name":"m1","columns":["time","field","host","region","value"],"values":[["2000-01-01T00:00:00Z",null,null,"us-east",10]]},{"name":"m2","columns":["time","field","host","region","value"],"values":[["2000-01-01T00:00:01Z",20,"server01",null,null]]}]}]}`, + }, + &Query{ + name: "wildcard with multiple measurements via regex and limit", + params: url.Values{"db": []string{"db0"}}, + command: `SELECT * FROM db0../^m.*/ LIMIT 2`, + exp: `{"results":[{"series":[{"name":"m1","columns":["time","field","host","region","value"],"values":[["2000-01-01T00:00:00Z",null,null,"us-east",10]]},{"name":"m2","columns":["time","field","host","region","value"],"values":[["2000-01-01T00:00:01Z",20,"server01",null,null]]}]}]}`, + }, + }...) + + for i, query := range test.queries { + if i == 0 { + if err := test.init(s); err != nil { + t.Fatalf("test init failed: %s", err) + } + } + if query.skip { + t.Logf("SKIP:: %s", query.name) + continue + } + + if err := query.Execute(s); err != nil { + t.Error(query.Error(err)) + } else if !query.success() { + t.Error(query.failureMessage()) + } + } +} + +func TestServer_Query_WildcardExpansion(t *testing.T) { + t.Parallel() + s := OpenServer(NewConfig()) + defer s.Close() + + if err := s.CreateDatabaseAndRetentionPolicy("db0", newRetentionPolicyInfo("rp0", 1, 0)); err != nil { + t.Fatal(err) + } + if err := s.MetaClient.SetDefaultRetentionPolicy("db0", "rp0"); err != nil { + t.Fatal(err) + } + + writes := []string{ + fmt.Sprintf(`wildcard,region=us-east,host=A value=10,cpu=80 %d`, mustParseTime(time.RFC3339Nano, "2000-01-01T00:00:00Z").UnixNano()), + fmt.Sprintf(`wildcard,region=us-east,host=B value=20,cpu=90 %d`, mustParseTime(time.RFC3339Nano, "2000-01-01T00:00:10Z").UnixNano()), + fmt.Sprintf(`wildcard,region=us-west,host=B value=30,cpu=70 %d`, mustParseTime(time.RFC3339Nano, "2000-01-01T00:00:20Z").UnixNano()), + fmt.Sprintf(`wildcard,region=us-east,host=A value=40,cpu=60 %d`, mustParseTime(time.RFC3339Nano, "2000-01-01T00:00:30Z").UnixNano()), + + fmt.Sprintf(`dupnames,region=us-east,day=1 value=10,day=3i %d`, mustParseTime(time.RFC3339Nano, "2000-01-01T00:00:00Z").UnixNano()), + fmt.Sprintf(`dupnames,region=us-east,day=2 value=20,day=2i %d`, mustParseTime(time.RFC3339Nano, "2000-01-01T00:00:10Z").UnixNano()), + fmt.Sprintf(`dupnames,region=us-west,day=3 value=30,day=1i %d`, mustParseTime(time.RFC3339Nano, "2000-01-01T00:00:20Z").UnixNano()), + } + + test := NewTest("db0", "rp0") + test.writes = Writes{ + &Write{data: strings.Join(writes, "\n")}, + } + + test.addQueries([]*Query{ + &Query{ + name: "wildcard", + params: url.Values{"db": []string{"db0"}}, + command: `SELECT * FROM wildcard`, + exp: `{"results":[{"series":[{"name":"wildcard","columns":["time","cpu","host","region","value"],"values":[["2000-01-01T00:00:00Z",80,"A","us-east",10],["2000-01-01T00:00:10Z",90,"B","us-east",20],["2000-01-01T00:00:20Z",70,"B","us-west",30],["2000-01-01T00:00:30Z",60,"A","us-east",40]]}]}]}`, + }, + &Query{ + name: "no wildcard in select", + params: url.Values{"db": []string{"db0"}}, + command: `SELECT cpu, host, region, value FROM wildcard`, + exp: `{"results":[{"series":[{"name":"wildcard","columns":["time","cpu","host","region","value"],"values":[["2000-01-01T00:00:00Z",80,"A","us-east",10],["2000-01-01T00:00:10Z",90,"B","us-east",20],["2000-01-01T00:00:20Z",70,"B","us-west",30],["2000-01-01T00:00:30Z",60,"A","us-east",40]]}]}]}`, + }, + &Query{ + name: "no wildcard in select, preserve column order", + params: url.Values{"db": []string{"db0"}}, + command: `SELECT host, cpu, region, value FROM wildcard`, + exp: `{"results":[{"series":[{"name":"wildcard","columns":["time","host","cpu","region","value"],"values":[["2000-01-01T00:00:00Z","A",80,"us-east",10],["2000-01-01T00:00:10Z","B",90,"us-east",20],["2000-01-01T00:00:20Z","B",70,"us-west",30],["2000-01-01T00:00:30Z","A",60,"us-east",40]]}]}]}`, + }, + + &Query{ + name: "no wildcard with alias", + params: url.Values{"db": []string{"db0"}}, + command: `SELECT cpu as c, host as h, region, value FROM wildcard`, + exp: `{"results":[{"series":[{"name":"wildcard","columns":["time","c","h","region","value"],"values":[["2000-01-01T00:00:00Z",80,"A","us-east",10],["2000-01-01T00:00:10Z",90,"B","us-east",20],["2000-01-01T00:00:20Z",70,"B","us-west",30],["2000-01-01T00:00:30Z",60,"A","us-east",40]]}]}]}`, + }, + &Query{ + name: "duplicate tag and field key", + command: `SELECT * FROM dupnames`, + params: url.Values{"db": []string{"db0"}}, + exp: `{"results":[{"series":[{"name":"dupnames","columns":["time","day","day_1","region","value"],"values":[["2000-01-01T00:00:00Z",3,"1","us-east",10],["2000-01-01T00:00:10Z",2,"2","us-east",20],["2000-01-01T00:00:20Z",1,"3","us-west",30]]}]}]}`, + }, + }...) + + for i, query := range test.queries { + if i == 0 { + if err := test.init(s); err != nil { + t.Fatalf("test init failed: %s", err) + } + } + if query.skip { + t.Logf("SKIP:: %s", query.name) + continue + } + if err := query.Execute(s); err != nil { + t.Error(query.Error(err)) + } else if !query.success() { + t.Error(query.failureMessage()) + } + } +} + +func TestServer_Query_AcrossShardsAndFields(t *testing.T) { + t.Parallel() + s := OpenServer(NewConfig()) + defer s.Close() + + if err := s.CreateDatabaseAndRetentionPolicy("db0", newRetentionPolicyInfo("rp0", 1, 0)); err != nil { + t.Fatal(err) + } + if err := s.MetaClient.SetDefaultRetentionPolicy("db0", "rp0"); err != nil { + t.Fatal(err) + } + + writes := []string{ + fmt.Sprintf(`cpu load=100 %d`, mustParseTime(time.RFC3339Nano, "2000-01-01T00:00:00Z").UnixNano()), + fmt.Sprintf(`cpu load=200 %d`, mustParseTime(time.RFC3339Nano, "2010-01-01T00:00:00Z").UnixNano()), + fmt.Sprintf(`cpu core=4 %d`, mustParseTime(time.RFC3339Nano, "2015-01-01T00:00:00Z").UnixNano()), + } + + test := NewTest("db0", "rp0") + test.writes = Writes{ + &Write{data: strings.Join(writes, "\n")}, + } + + test.addQueries([]*Query{ + &Query{ + name: "two results for cpu", + params: url.Values{"db": []string{"db0"}}, + command: `SELECT load FROM cpu`, + exp: `{"results":[{"series":[{"name":"cpu","columns":["time","load"],"values":[["2000-01-01T00:00:00Z",100],["2010-01-01T00:00:00Z",200]]}]}]}`, + }, + &Query{ + name: "two results for cpu, multi-select", + params: url.Values{"db": []string{"db0"}}, + command: `SELECT core,load FROM cpu`, + exp: `{"results":[{"series":[{"name":"cpu","columns":["time","core","load"],"values":[["2000-01-01T00:00:00Z",null,100],["2010-01-01T00:00:00Z",null,200],["2015-01-01T00:00:00Z",4,null]]}]}]}`, + }, + &Query{ + name: "two results for cpu, wildcard select", + params: url.Values{"db": []string{"db0"}}, + command: `SELECT * FROM cpu`, + exp: `{"results":[{"series":[{"name":"cpu","columns":["time","core","load"],"values":[["2000-01-01T00:00:00Z",null,100],["2010-01-01T00:00:00Z",null,200],["2015-01-01T00:00:00Z",4,null]]}]}]}`, + }, + &Query{ + name: "one result for core", + params: url.Values{"db": []string{"db0"}}, + command: `SELECT core FROM cpu`, + exp: `{"results":[{"series":[{"name":"cpu","columns":["time","core"],"values":[["2015-01-01T00:00:00Z",4]]}]}]}`, + }, + &Query{ + name: "empty result set from non-existent field", + params: url.Values{"db": []string{"db0"}}, + command: `SELECT foo FROM cpu`, + exp: `{"results":[{}]}`, + }, + }...) + + for i, query := range test.queries { + if i == 0 { + if err := test.init(s); err != nil { + t.Fatalf("test init failed: %s", err) + } + } + if query.skip { + t.Logf("SKIP:: %s", query.name) + continue + } + if err := query.Execute(s); err != nil { + t.Error(query.Error(err)) + } else if !query.success() { + t.Error(query.failureMessage()) + } + } +} + +func TestServer_Query_Where_Fields(t *testing.T) { + t.Parallel() + s := OpenServer(NewConfig()) + defer s.Close() + + if err := s.CreateDatabaseAndRetentionPolicy("db0", newRetentionPolicyInfo("rp0", 1, 0)); err != nil { + t.Fatal(err) + } + if err := s.MetaClient.SetDefaultRetentionPolicy("db0", "rp0"); err != nil { + t.Fatal(err) + } + + writes := []string{ + fmt.Sprintf(`cpu alert_id="alert",tenant_id="tenant",_cust="johnson brothers" %d`, mustParseTime(time.RFC3339Nano, "2015-02-28T01:03:36.703820946Z").UnixNano()), + fmt.Sprintf(`cpu alert_id="alert",tenant_id="tenant",_cust="johnson brothers" %d`, mustParseTime(time.RFC3339Nano, "2015-02-28T01:03:36.703820946Z").UnixNano()), + + fmt.Sprintf(`cpu load=100.0,core=4 %d`, mustParseTime(time.RFC3339Nano, "2009-11-10T23:00:02Z").UnixNano()), + fmt.Sprintf(`cpu load=80.0,core=2 %d`, mustParseTime(time.RFC3339Nano, "2009-11-10T23:01:02Z").UnixNano()), + + fmt.Sprintf(`clicks local=true %d`, mustParseTime(time.RFC3339Nano, "2014-11-10T23:00:01Z").UnixNano()), + fmt.Sprintf(`clicks local=false %d`, mustParseTime(time.RFC3339Nano, "2014-11-10T23:00:02Z").UnixNano()), + } + + test := NewTest("db0", "rp0") + test.writes = Writes{ + &Write{data: strings.Join(writes, "\n")}, + } + + test.addQueries([]*Query{ + // non type specific + &Query{ + name: "missing measurement with group by", + params: url.Values{"db": []string{"db0"}}, + command: `SELECT load from missing group by *`, + exp: `{"results":[{}]}`, + }, + + // string + &Query{ + name: "single string field", + params: url.Values{"db": []string{"db0"}}, + command: `SELECT alert_id FROM cpu WHERE alert_id='alert'`, + exp: `{"results":[{"series":[{"name":"cpu","columns":["time","alert_id"],"values":[["2015-02-28T01:03:36.703820946Z","alert"]]}]}]}`, + }, + &Query{ + name: "string AND query, all fields in SELECT", + params: url.Values{"db": []string{"db0"}}, + command: `SELECT alert_id,tenant_id,_cust FROM cpu WHERE alert_id='alert' AND tenant_id='tenant'`, + exp: `{"results":[{"series":[{"name":"cpu","columns":["time","alert_id","tenant_id","_cust"],"values":[["2015-02-28T01:03:36.703820946Z","alert","tenant","johnson brothers"]]}]}]}`, + }, + &Query{ + name: "string AND query, all fields in SELECT, one in parenthesis", + params: url.Values{"db": []string{"db0"}}, + command: `SELECT alert_id,tenant_id FROM cpu WHERE alert_id='alert' AND (tenant_id='tenant')`, + exp: `{"results":[{"series":[{"name":"cpu","columns":["time","alert_id","tenant_id"],"values":[["2015-02-28T01:03:36.703820946Z","alert","tenant"]]}]}]}`, + }, + &Query{ + name: "string underscored field", + params: url.Values{"db": []string{"db0"}}, + command: `SELECT alert_id FROM cpu WHERE _cust='johnson brothers'`, + exp: `{"results":[{"series":[{"name":"cpu","columns":["time","alert_id"],"values":[["2015-02-28T01:03:36.703820946Z","alert"]]}]}]}`, + }, + &Query{ + name: "string no match", + params: url.Values{"db": []string{"db0"}}, + command: `SELECT alert_id FROM cpu WHERE _cust='acme'`, + exp: `{"results":[{}]}`, + }, + + // float64 + &Query{ + name: "float64 GT no match", + params: url.Values{"db": []string{"db0"}}, + command: `select load from cpu where load > 100`, + exp: `{"results":[{}]}`, + }, + &Query{ + name: "float64 GTE match one", + params: url.Values{"db": []string{"db0"}}, + command: `select load from cpu where load >= 100`, + exp: `{"results":[{"series":[{"name":"cpu","columns":["time","load"],"values":[["2009-11-10T23:00:02Z",100]]}]}]}`, + }, + &Query{ + name: "float64 EQ match upper bound", + params: url.Values{"db": []string{"db0"}}, + command: `select load from cpu where load = 100`, + exp: `{"results":[{"series":[{"name":"cpu","columns":["time","load"],"values":[["2009-11-10T23:00:02Z",100]]}]}]}`, + }, + &Query{ + name: "float64 LTE match two", + params: url.Values{"db": []string{"db0"}}, + command: `select load from cpu where load <= 100`, + exp: `{"results":[{"series":[{"name":"cpu","columns":["time","load"],"values":[["2009-11-10T23:00:02Z",100],["2009-11-10T23:01:02Z",80]]}]}]}`, + }, + &Query{ + name: "float64 GT match one", + params: url.Values{"db": []string{"db0"}}, + command: `select load from cpu where load > 99`, + exp: `{"results":[{"series":[{"name":"cpu","columns":["time","load"],"values":[["2009-11-10T23:00:02Z",100]]}]}]}`, + }, + &Query{ + name: "float64 EQ no match", + params: url.Values{"db": []string{"db0"}}, + command: `select load from cpu where load = 99`, + exp: `{"results":[{}]}`, + }, + &Query{ + name: "float64 LT match one", + params: url.Values{"db": []string{"db0"}}, + command: `select load from cpu where load < 99`, + exp: `{"results":[{"series":[{"name":"cpu","columns":["time","load"],"values":[["2009-11-10T23:01:02Z",80]]}]}]}`, + }, + &Query{ + name: "float64 LT no match", + params: url.Values{"db": []string{"db0"}}, + command: `select load from cpu where load < 80`, + exp: `{"results":[{}]}`, + }, + &Query{ + name: "float64 NE match one", + params: url.Values{"db": []string{"db0"}}, + command: `select load from cpu where load != 100`, + exp: `{"results":[{"series":[{"name":"cpu","columns":["time","load"],"values":[["2009-11-10T23:01:02Z",80]]}]}]}`, + }, + + // int64 + &Query{ + name: "int64 GT no match", + params: url.Values{"db": []string{"db0"}}, + command: `select core from cpu where core > 4`, + exp: `{"results":[{}]}`, + }, + &Query{ + name: "int64 GTE match one", + params: url.Values{"db": []string{"db0"}}, + command: `select core from cpu where core >= 4`, + exp: `{"results":[{"series":[{"name":"cpu","columns":["time","core"],"values":[["2009-11-10T23:00:02Z",4]]}]}]}`, + }, + &Query{ + name: "int64 EQ match upper bound", + params: url.Values{"db": []string{"db0"}}, + command: `select core from cpu where core = 4`, + exp: `{"results":[{"series":[{"name":"cpu","columns":["time","core"],"values":[["2009-11-10T23:00:02Z",4]]}]}]}`, + }, + &Query{ + name: "int64 LTE match two ", + params: url.Values{"db": []string{"db0"}}, + command: `select core from cpu where core <= 4`, + exp: `{"results":[{"series":[{"name":"cpu","columns":["time","core"],"values":[["2009-11-10T23:00:02Z",4],["2009-11-10T23:01:02Z",2]]}]}]}`, + }, + &Query{ + name: "int64 GT match one", + params: url.Values{"db": []string{"db0"}}, + command: `select core from cpu where core > 3`, + exp: `{"results":[{"series":[{"name":"cpu","columns":["time","core"],"values":[["2009-11-10T23:00:02Z",4]]}]}]}`, + }, + &Query{ + name: "int64 EQ no match", + params: url.Values{"db": []string{"db0"}}, + command: `select core from cpu where core = 3`, + exp: `{"results":[{}]}`, + }, + &Query{ + name: "int64 LT match one", + params: url.Values{"db": []string{"db0"}}, + command: `select core from cpu where core < 3`, + exp: `{"results":[{"series":[{"name":"cpu","columns":["time","core"],"values":[["2009-11-10T23:01:02Z",2]]}]}]}`, + }, + &Query{ + name: "int64 LT no match", + params: url.Values{"db": []string{"db0"}}, + command: `select core from cpu where core < 2`, + exp: `{"results":[{}]}`, + }, + &Query{ + name: "int64 NE match one", + params: url.Values{"db": []string{"db0"}}, + command: `select core from cpu where core != 4`, + exp: `{"results":[{"series":[{"name":"cpu","columns":["time","core"],"values":[["2009-11-10T23:01:02Z",2]]}]}]}`, + }, + + // bool + &Query{ + name: "bool EQ match true", + params: url.Values{"db": []string{"db0"}}, + command: `select local from clicks where local = true`, + exp: `{"results":[{"series":[{"name":"clicks","columns":["time","local"],"values":[["2014-11-10T23:00:01Z",true]]}]}]}`, + }, + &Query{ + name: "bool EQ match false", + params: url.Values{"db": []string{"db0"}}, + command: `select local from clicks where local = false`, + exp: `{"results":[{"series":[{"name":"clicks","columns":["time","local"],"values":[["2014-11-10T23:00:02Z",false]]}]}]}`, + }, + + &Query{ + name: "bool NE match one", + params: url.Values{"db": []string{"db0"}}, + command: `select local from clicks where local != true`, + exp: `{"results":[{"series":[{"name":"clicks","columns":["time","local"],"values":[["2014-11-10T23:00:02Z",false]]}]}]}`, + }, + }...) + + for i, query := range test.queries { + if i == 0 { + if err := test.init(s); err != nil { + t.Fatalf("test init failed: %s", err) + } + } + if query.skip { + t.Logf("SKIP:: %s", query.name) + continue + } + + if err := query.Execute(s); err != nil { + t.Error(query.Error(err)) + } else if !query.success() { + t.Error(query.failureMessage()) + } + } +} + +func TestServer_Query_Where_With_Tags(t *testing.T) { + t.Parallel() + s := OpenServer(NewConfig()) + defer s.Close() + + if err := s.CreateDatabaseAndRetentionPolicy("db0", newRetentionPolicyInfo("rp0", 1, 0)); err != nil { + t.Fatal(err) + } + if err := s.MetaClient.SetDefaultRetentionPolicy("db0", "rp0"); err != nil { + t.Fatal(err) + } + + writes := []string{ + fmt.Sprintf(`where_events,tennant=paul foo="bar" %d`, mustParseTime(time.RFC3339Nano, "2009-11-10T23:00:02Z").UnixNano()), + fmt.Sprintf(`where_events,tennant=paul foo="baz" %d`, mustParseTime(time.RFC3339Nano, "2009-11-10T23:00:03Z").UnixNano()), + fmt.Sprintf(`where_events,tennant=paul foo="bat" %d`, mustParseTime(time.RFC3339Nano, "2009-11-10T23:00:04Z").UnixNano()), + fmt.Sprintf(`where_events,tennant=todd foo="bar" %d`, mustParseTime(time.RFC3339Nano, "2009-11-10T23:00:05Z").UnixNano()), + fmt.Sprintf(`where_events,tennant=david foo="bap" %d`, mustParseTime(time.RFC3339Nano, "2009-11-10T23:00:06Z").UnixNano()), + } + + test := NewTest("db0", "rp0") + test.writes = Writes{ + &Write{data: strings.Join(writes, "\n")}, + } + + test.addQueries([]*Query{ + &Query{ + name: "tag field and time", + params: url.Values{"db": []string{"db0"}}, + command: `select foo from where_events where (tennant = 'paul' OR tennant = 'david') AND time > 1s AND (foo = 'bar' OR foo = 'baz' OR foo = 'bap')`, + exp: `{"results":[{"series":[{"name":"where_events","columns":["time","foo"],"values":[["2009-11-10T23:00:02Z","bar"],["2009-11-10T23:00:03Z","baz"],["2009-11-10T23:00:06Z","bap"]]}]}]}`, + }, + &Query{ + name: "tag or field", + params: url.Values{"db": []string{"db0"}}, + command: `select foo from where_events where tennant = 'paul' OR foo = 'bar'`, + exp: `{"results":[{"series":[{"name":"where_events","columns":["time","foo"],"values":[["2009-11-10T23:00:02Z","bar"],["2009-11-10T23:00:03Z","baz"],["2009-11-10T23:00:04Z","bat"],["2009-11-10T23:00:05Z","bar"]]}]}]}`, + }, + &Query{ + name: "non-existant tag and field", + params: url.Values{"db": []string{"db0"}}, + command: `select foo from where_events where tenant != 'paul' AND foo = 'bar'`, + exp: `{"results":[{"series":[{"name":"where_events","columns":["time","foo"],"values":[["2009-11-10T23:00:02Z","bar"],["2009-11-10T23:00:05Z","bar"]]}]}]}`, + }, + &Query{ + name: "non-existant tag or field", + params: url.Values{"db": []string{"db0"}}, + command: `select foo from where_events where tenant != 'paul' OR foo = 'bar'`, + exp: `{"results":[{"series":[{"name":"where_events","columns":["time","foo"],"values":[["2009-11-10T23:00:02Z","bar"],["2009-11-10T23:00:03Z","baz"],["2009-11-10T23:00:04Z","bat"],["2009-11-10T23:00:05Z","bar"],["2009-11-10T23:00:06Z","bap"]]}]}]}`, + }, + &Query{ + name: "where on tag that should be double quoted but isn't", + params: url.Values{"db": []string{"db0"}}, + command: `show series where data-center = 'foo'`, + exp: `{"results":[{"error":"invalid tag comparison operator"}]}`, + }, + &Query{ + name: "where comparing tag and field", + params: url.Values{"db": []string{"db0"}}, + command: `select foo from where_events where tennant != foo`, + exp: `{"results":[{"series":[{"name":"where_events","columns":["time","foo"],"values":[["2009-11-10T23:00:02Z","bar"],["2009-11-10T23:00:03Z","baz"],["2009-11-10T23:00:04Z","bat"],["2009-11-10T23:00:05Z","bar"],["2009-11-10T23:00:06Z","bap"]]}]}]}`, + }, + &Query{ + name: "where comparing tag and tag", + params: url.Values{"db": []string{"db0"}}, + command: `select foo from where_events where tennant = tennant`, + exp: `{"results":[{"series":[{"name":"where_events","columns":["time","foo"],"values":[["2009-11-10T23:00:02Z","bar"],["2009-11-10T23:00:03Z","baz"],["2009-11-10T23:00:04Z","bat"],["2009-11-10T23:00:05Z","bar"],["2009-11-10T23:00:06Z","bap"]]}]}]}`, + }, + }...) + + for i, query := range test.queries { + if i == 0 { + if err := test.init(s); err != nil { + t.Fatalf("test init failed: %s", err) + } + } + if query.skip { + t.Logf("SKIP:: %s", query.name) + continue + } + if err := query.Execute(s); err != nil { + t.Error(query.Error(err)) + } else if !query.success() { + t.Error(query.failureMessage()) + } + } +} + +func TestServer_Query_With_EmptyTags(t *testing.T) { + t.Parallel() + s := OpenServer(NewConfig()) + defer s.Close() + + if err := s.CreateDatabaseAndRetentionPolicy("db0", newRetentionPolicyInfo("rp0", 1, 0)); err != nil { + t.Fatal(err) + } + if err := s.MetaClient.SetDefaultRetentionPolicy("db0", "rp0"); err != nil { + t.Fatal(err) + } + + writes := []string{ + fmt.Sprintf(`cpu value=1 %d`, mustParseTime(time.RFC3339Nano, "2009-11-10T23:00:02Z").UnixNano()), + fmt.Sprintf(`cpu,host=server01 value=2 %d`, mustParseTime(time.RFC3339Nano, "2009-11-10T23:00:03Z").UnixNano()), + } + + test := NewTest("db0", "rp0") + test.writes = Writes{ + &Write{data: strings.Join(writes, "\n")}, + } + + test.addQueries([]*Query{ + &Query{ + name: "where empty tag", + params: url.Values{"db": []string{"db0"}}, + command: `select value from cpu where host = ''`, + exp: `{"results":[{"series":[{"name":"cpu","columns":["time","value"],"values":[["2009-11-10T23:00:02Z",1]]}]}]}`, + }, + &Query{ + name: "where not empty tag", + params: url.Values{"db": []string{"db0"}}, + command: `select value from cpu where host != ''`, + exp: `{"results":[{"series":[{"name":"cpu","columns":["time","value"],"values":[["2009-11-10T23:00:03Z",2]]}]}]}`, + }, + &Query{ + name: "where regex all", + params: url.Values{"db": []string{"db0"}}, + command: `select value from cpu where host =~ /.*/`, + exp: `{"results":[{"series":[{"name":"cpu","columns":["time","value"],"values":[["2009-11-10T23:00:02Z",1],["2009-11-10T23:00:03Z",2]]}]}]}`, + }, + &Query{ + name: "where regex none", + params: url.Values{"db": []string{"db0"}}, + command: `select value from cpu where host !~ /.*/`, + exp: `{"results":[{}]}`, + }, + &Query{ + name: "where regex at least one char", + params: url.Values{"db": []string{"db0"}}, + command: `select value from cpu where host =~ /.+/`, + exp: `{"results":[{"series":[{"name":"cpu","columns":["time","value"],"values":[["2009-11-10T23:00:03Z",2]]}]}]}`, + }, + &Query{ + name: "where regex not at least one char", + params: url.Values{"db": []string{"db0"}}, + command: `select value from cpu where host !~ /.+/`, + exp: `{"results":[{"series":[{"name":"cpu","columns":["time","value"],"values":[["2009-11-10T23:00:02Z",1]]}]}]}`, + }, + &Query{ + name: "group by empty tag", + params: url.Values{"db": []string{"db0"}}, + command: `select value from cpu group by host`, + exp: `{"results":[{"series":[{"name":"cpu","tags":{"host":""},"columns":["time","value"],"values":[["2009-11-10T23:00:02Z",1]]},{"name":"cpu","tags":{"host":"server01"},"columns":["time","value"],"values":[["2009-11-10T23:00:03Z",2]]}]}]}`, + }, + &Query{ + name: "group by missing tag", + params: url.Values{"db": []string{"db0"}}, + command: `select value from cpu group by region`, + exp: `{"results":[{"series":[{"name":"cpu","tags":{"region":""},"columns":["time","value"],"values":[["2009-11-10T23:00:02Z",1],["2009-11-10T23:00:03Z",2]]}]}]}`, + }, + }...) + + for i, query := range test.queries { + if i == 0 { + if err := test.init(s); err != nil { + t.Fatalf("test init failed: %s", err) + } + } + if query.skip { + t.Logf("SKIP:: %s", query.name) + continue + } + if err := query.Execute(s); err != nil { + t.Error(query.Error(err)) + } else if !query.success() { + t.Error(query.failureMessage()) + } + } +} + +func TestServer_Query_LimitAndOffset(t *testing.T) { + t.Parallel() + s := OpenServer(NewConfig()) + defer s.Close() + + if err := s.CreateDatabaseAndRetentionPolicy("db0", newRetentionPolicyInfo("rp0", 1, 0)); err != nil { + t.Fatal(err) + } + if err := s.MetaClient.SetDefaultRetentionPolicy("db0", "rp0"); err != nil { + t.Fatal(err) + } + + writes := []string{ + fmt.Sprintf(`limited,tennant=paul foo=2 %d`, mustParseTime(time.RFC3339Nano, "2009-11-10T23:00:02Z").UnixNano()), + fmt.Sprintf(`limited,tennant=paul foo=3 %d`, mustParseTime(time.RFC3339Nano, "2009-11-10T23:00:03Z").UnixNano()), + fmt.Sprintf(`limited,tennant=paul foo=4 %d`, mustParseTime(time.RFC3339Nano, "2009-11-10T23:00:04Z").UnixNano()), + fmt.Sprintf(`limited,tennant=todd foo=5 %d`, mustParseTime(time.RFC3339Nano, "2009-11-10T23:00:05Z").UnixNano()), + } + + test := NewTest("db0", "rp0") + test.writes = Writes{ + &Write{data: strings.Join(writes, "\n")}, + } + + test.addQueries([]*Query{ + &Query{ + name: "limit on points", + params: url.Values{"db": []string{"db0"}}, + command: `select foo from "limited" LIMIT 2`, + exp: `{"results":[{"series":[{"name":"limited","columns":["time","foo"],"values":[["2009-11-10T23:00:02Z",2],["2009-11-10T23:00:03Z",3]]}]}]}`, + }, + &Query{ + name: "limit higher than the number of data points", + params: url.Values{"db": []string{"db0"}}, + command: `select foo from "limited" LIMIT 20`, + exp: `{"results":[{"series":[{"name":"limited","columns":["time","foo"],"values":[["2009-11-10T23:00:02Z",2],["2009-11-10T23:00:03Z",3],["2009-11-10T23:00:04Z",4],["2009-11-10T23:00:05Z",5]]}]}]}`, + }, + &Query{ + name: "limit and offset", + params: url.Values{"db": []string{"db0"}}, + command: `select foo from "limited" LIMIT 2 OFFSET 1`, + exp: `{"results":[{"series":[{"name":"limited","columns":["time","foo"],"values":[["2009-11-10T23:00:03Z",3],["2009-11-10T23:00:04Z",4]]}]}]}`, + }, + &Query{ + name: "limit + offset equal to total number of points", + params: url.Values{"db": []string{"db0"}}, + command: `select foo from "limited" LIMIT 3 OFFSET 3`, + exp: `{"results":[{"series":[{"name":"limited","columns":["time","foo"],"values":[["2009-11-10T23:00:05Z",5]]}]}]}`, + }, + &Query{ + name: "limit - offset higher than number of points", + command: `select foo from "limited" LIMIT 2 OFFSET 20`, + exp: `{"results":[{}]}`, + params: url.Values{"db": []string{"db0"}}, + }, + &Query{ + name: "limit on points with group by time", + command: `select mean(foo) from "limited" WHERE time >= '2009-11-10T23:00:02Z' AND time < '2009-11-10T23:00:06Z' GROUP BY TIME(1s) LIMIT 2`, + exp: `{"results":[{"series":[{"name":"limited","columns":["time","mean"],"values":[["2009-11-10T23:00:02Z",2],["2009-11-10T23:00:03Z",3]]}]}]}`, + params: url.Values{"db": []string{"db0"}}, + }, + &Query{ + name: "limit higher than the number of data points with group by time", + command: `select mean(foo) from "limited" WHERE time >= '2009-11-10T23:00:02Z' AND time < '2009-11-10T23:00:06Z' GROUP BY TIME(1s) LIMIT 20`, + exp: `{"results":[{"series":[{"name":"limited","columns":["time","mean"],"values":[["2009-11-10T23:00:02Z",2],["2009-11-10T23:00:03Z",3],["2009-11-10T23:00:04Z",4],["2009-11-10T23:00:05Z",5]]}]}]}`, + params: url.Values{"db": []string{"db0"}}, + }, + &Query{ + name: "limit and offset with group by time", + command: `select mean(foo) from "limited" WHERE time >= '2009-11-10T23:00:02Z' AND time < '2009-11-10T23:00:06Z' GROUP BY TIME(1s) LIMIT 2 OFFSET 1`, + exp: `{"results":[{"series":[{"name":"limited","columns":["time","mean"],"values":[["2009-11-10T23:00:03Z",3],["2009-11-10T23:00:04Z",4]]}]}]}`, + params: url.Values{"db": []string{"db0"}}, + }, + &Query{ + name: "limit + offset equal to the number of points with group by time", + command: `select mean(foo) from "limited" WHERE time >= '2009-11-10T23:00:02Z' AND time < '2009-11-10T23:00:06Z' GROUP BY TIME(1s) LIMIT 3 OFFSET 3`, + exp: `{"results":[{"series":[{"name":"limited","columns":["time","mean"],"values":[["2009-11-10T23:00:05Z",5]]}]}]}`, + params: url.Values{"db": []string{"db0"}}, + }, + &Query{ + name: "limit - offset higher than number of points with group by time", + command: `select mean(foo) from "limited" WHERE time >= '2009-11-10T23:00:02Z' AND time < '2009-11-10T23:00:06Z' GROUP BY TIME(1s) LIMIT 2 OFFSET 20`, + exp: `{"results":[{}]}`, + params: url.Values{"db": []string{"db0"}}, + }, + &Query{ + name: "limit - group by tennant", + command: `select foo from "limited" group by tennant limit 1`, + exp: `{"results":[{"series":[{"name":"limited","tags":{"tennant":"paul"},"columns":["time","foo"],"values":[["2009-11-10T23:00:02Z",2]]},{"name":"limited","tags":{"tennant":"todd"},"columns":["time","foo"],"values":[["2009-11-10T23:00:05Z",5]]}]}]}`, + params: url.Values{"db": []string{"db0"}}, + }, + &Query{ + name: "limit and offset - group by tennant", + command: `select foo from "limited" group by tennant limit 1 offset 1`, + exp: `{"results":[{"series":[{"name":"limited","tags":{"tennant":"paul"},"columns":["time","foo"],"values":[["2009-11-10T23:00:03Z",3]]}]}]}`, + params: url.Values{"db": []string{"db0"}}, + }, + }...) + + for i, query := range test.queries { + if i == 0 { + if err := test.init(s); err != nil { + t.Fatalf("test init failed: %s", err) + } + } + if query.skip { + t.Logf("SKIP:: %s", query.name) + continue + } + if err := query.Execute(s); err != nil { + t.Error(query.Error(err)) + } else if !query.success() { + t.Error(query.failureMessage()) + } + } +} + +func TestServer_Query_Fill(t *testing.T) { + t.Parallel() + s := OpenServer(NewConfig()) + defer s.Close() + + if err := s.CreateDatabaseAndRetentionPolicy("db0", newRetentionPolicyInfo("rp0", 1, 0)); err != nil { + t.Fatal(err) + } + if err := s.MetaClient.SetDefaultRetentionPolicy("db0", "rp0"); err != nil { + t.Fatal(err) + } + + writes := []string{ + fmt.Sprintf(`fills val=3 %d`, mustParseTime(time.RFC3339Nano, "2009-11-10T23:00:02Z").UnixNano()), + fmt.Sprintf(`fills val=5 %d`, mustParseTime(time.RFC3339Nano, "2009-11-10T23:00:03Z").UnixNano()), + fmt.Sprintf(`fills val=4 %d`, mustParseTime(time.RFC3339Nano, "2009-11-10T23:00:06Z").UnixNano()), + fmt.Sprintf(`fills val=10 %d`, mustParseTime(time.RFC3339Nano, "2009-11-10T23:00:16Z").UnixNano()), + } + + test := NewTest("db0", "rp0") + test.writes = Writes{ + &Write{data: strings.Join(writes, "\n")}, + } + + test.addQueries([]*Query{ + &Query{ + name: "fill with value", + command: `select mean(val) from fills where time >= '2009-11-10T23:00:00Z' and time < '2009-11-10T23:00:20Z' group by time(5s) FILL(1)`, + exp: `{"results":[{"series":[{"name":"fills","columns":["time","mean"],"values":[["2009-11-10T23:00:00Z",4],["2009-11-10T23:00:05Z",4],["2009-11-10T23:00:10Z",1],["2009-11-10T23:00:15Z",10]]}]}]}`, + params: url.Values{"db": []string{"db0"}}, + }, + &Query{ + name: "fill with value, WHERE all values match condition", + command: `select mean(val) from fills where time >= '2009-11-10T23:00:00Z' and time < '2009-11-10T23:00:20Z' and val < 50 group by time(5s) FILL(1)`, + exp: `{"results":[{"series":[{"name":"fills","columns":["time","mean"],"values":[["2009-11-10T23:00:00Z",4],["2009-11-10T23:00:05Z",4],["2009-11-10T23:00:10Z",1],["2009-11-10T23:00:15Z",10]]}]}]}`, + params: url.Values{"db": []string{"db0"}}, + }, + &Query{ + name: "fill with value, WHERE no values match condition", + command: `select mean(val) from fills where time >= '2009-11-10T23:00:00Z' and time < '2009-11-10T23:00:20Z' and val > 50 group by time(5s) FILL(1)`, + exp: `{"results":[{}]}`, + params: url.Values{"db": []string{"db0"}}, + }, + &Query{ + name: "fill with previous", + command: `select mean(val) from fills where time >= '2009-11-10T23:00:00Z' and time < '2009-11-10T23:00:20Z' group by time(5s) FILL(previous)`, + exp: `{"results":[{"series":[{"name":"fills","columns":["time","mean"],"values":[["2009-11-10T23:00:00Z",4],["2009-11-10T23:00:05Z",4],["2009-11-10T23:00:10Z",4],["2009-11-10T23:00:15Z",10]]}]}]}`, + params: url.Values{"db": []string{"db0"}}, + }, + &Query{ + name: "fill with none, i.e. clear out nulls", + command: `select mean(val) from fills where time >= '2009-11-10T23:00:00Z' and time < '2009-11-10T23:00:20Z' group by time(5s) FILL(none)`, + exp: `{"results":[{"series":[{"name":"fills","columns":["time","mean"],"values":[["2009-11-10T23:00:00Z",4],["2009-11-10T23:00:05Z",4],["2009-11-10T23:00:15Z",10]]}]}]}`, + params: url.Values{"db": []string{"db0"}}, + }, + &Query{ + name: "fill defaults to null", + command: `select mean(val) from fills where time >= '2009-11-10T23:00:00Z' and time < '2009-11-10T23:00:20Z' group by time(5s)`, + exp: `{"results":[{"series":[{"name":"fills","columns":["time","mean"],"values":[["2009-11-10T23:00:00Z",4],["2009-11-10T23:00:05Z",4],["2009-11-10T23:00:10Z",null],["2009-11-10T23:00:15Z",10]]}]}]}`, + params: url.Values{"db": []string{"db0"}}, + }, + &Query{ + name: "fill defaults to 0 for count", + command: `select count(val) from fills where time >= '2009-11-10T23:00:00Z' and time < '2009-11-10T23:00:20Z' group by time(5s)`, + exp: `{"results":[{"series":[{"name":"fills","columns":["time","count"],"values":[["2009-11-10T23:00:00Z",2],["2009-11-10T23:00:05Z",1],["2009-11-10T23:00:10Z",0],["2009-11-10T23:00:15Z",1]]}]}]}`, + params: url.Values{"db": []string{"db0"}}, + }, + &Query{ + name: "fill none drops 0s for count", + command: `select count(val) from fills where time >= '2009-11-10T23:00:00Z' and time < '2009-11-10T23:00:20Z' group by time(5s) fill(none)`, + exp: `{"results":[{"series":[{"name":"fills","columns":["time","count"],"values":[["2009-11-10T23:00:00Z",2],["2009-11-10T23:00:05Z",1],["2009-11-10T23:00:15Z",1]]}]}]}`, + params: url.Values{"db": []string{"db0"}}, + }, + &Query{ + name: "fill previous overwrites 0s for count", + command: `select count(val) from fills where time >= '2009-11-10T23:00:00Z' and time < '2009-11-10T23:00:20Z' group by time(5s) fill(previous)`, + exp: `{"results":[{"series":[{"name":"fills","columns":["time","count"],"values":[["2009-11-10T23:00:00Z",2],["2009-11-10T23:00:05Z",1],["2009-11-10T23:00:10Z",1],["2009-11-10T23:00:15Z",1]]}]}]}`, + params: url.Values{"db": []string{"db0"}}, + }, + }...) + + for i, query := range test.queries { + if i == 0 { + if err := test.init(s); err != nil { + t.Fatalf("test init failed: %s", err) + } + } + if query.skip { + t.Logf("SKIP:: %s", query.name) + continue + } + if err := query.Execute(s); err != nil { + t.Error(query.Error(err)) + } else if !query.success() { + t.Error(query.failureMessage()) + } + } +} + +func TestServer_Query_Chunk(t *testing.T) { + t.Parallel() + s := OpenServer(NewConfig()) + defer s.Close() + + if err := s.CreateDatabaseAndRetentionPolicy("db0", newRetentionPolicyInfo("rp0", 1, 0)); err != nil { + t.Fatal(err) + } + if err := s.MetaClient.SetDefaultRetentionPolicy("db0", "rp0"); err != nil { + t.Fatal(err) + } + + writes := make([]string, 10001) // 10,000 is the default chunking size, even when no chunking requested. + expectedValues := make([]string, len(writes)) + for i := 0; i < len(writes); i++ { + writes[i] = fmt.Sprintf(`cpu value=%d %d`, i, time.Unix(0, int64(i)).UnixNano()) + expectedValues[i] = fmt.Sprintf(`["%s",%d]`, time.Unix(0, int64(i)).UTC().Format(time.RFC3339Nano), i) + } + expected := fmt.Sprintf(`{"results":[{"series":[{"name":"cpu","columns":["time","value"],"values":[%s]}]}]}`, strings.Join(expectedValues, ",")) + + test := NewTest("db0", "rp0") + test.writes = Writes{ + &Write{data: strings.Join(writes, "\n")}, + } + + test.addQueries([]*Query{ + &Query{ + name: "SELECT all values, no chunking", + command: `SELECT value FROM cpu`, + exp: expected, + params: url.Values{"db": []string{"db0"}}, + }, + }...) + + for i, query := range test.queries { + if i == 0 { + if err := test.init(s); err != nil { + t.Fatalf("test init failed: %s", err) + } + } + if query.skip { + t.Logf("SKIP:: %s", query.name) + continue + } + if err := query.Execute(s); err != nil { + t.Error(query.Error(err)) + } else if !query.success() { + t.Error(query.failureMessage()) + } + } +} + +func TestServer_Query_DropAndRecreateMeasurement(t *testing.T) { + t.Parallel() + s := OpenServer(NewConfig()) + defer s.Close() + + if err := s.CreateDatabaseAndRetentionPolicy("db0", newRetentionPolicyInfo("rp0", 1, 0)); err != nil { + t.Fatal(err) + } + if err := s.MetaClient.SetDefaultRetentionPolicy("db0", "rp0"); err != nil { + t.Fatal(err) + } + if err := s.CreateDatabaseAndRetentionPolicy("db1", newRetentionPolicyInfo("rp0", 1, 0)); err != nil { + t.Fatal(err) + } + if err := s.MetaClient.SetDefaultRetentionPolicy("db1", "rp0"); err != nil { + t.Fatal(err) + } + + writes := strings.Join([]string{ + fmt.Sprintf(`cpu,host=serverA,region=uswest val=23.2 %d`, mustParseTime(time.RFC3339Nano, "2000-01-01T00:00:00Z").UnixNano()), + fmt.Sprintf(`memory,host=serverB,region=uswest val=33.2 %d`, mustParseTime(time.RFC3339Nano, "2000-01-01T00:00:01Z").UnixNano()), + }, "\n") + + test := NewTest("db0", "rp0") + test.writes = Writes{ + &Write{data: writes}, + &Write{db: "db1", data: writes}, + } + + test.addQueries([]*Query{ + &Query{ + name: "verify cpu measurement exists in db1", + command: `SELECT * FROM cpu`, + exp: `{"results":[{"series":[{"name":"cpu","columns":["time","host","region","val"],"values":[["2000-01-01T00:00:00Z","serverA","uswest",23.2]]}]}]}`, + params: url.Values{"db": []string{"db1"}}, + }, + &Query{ + name: "Drop Measurement, series tags preserved tests", + command: `SHOW MEASUREMENTS`, + exp: `{"results":[{"series":[{"name":"measurements","columns":["name"],"values":[["cpu"],["memory"]]}]}]}`, + params: url.Values{"db": []string{"db0"}}, + }, + &Query{ + name: "show series", + command: `SHOW SERIES`, + exp: `{"results":[{"series":[{"columns":["key"],"values":[["cpu,host=serverA,region=uswest"],["memory,host=serverB,region=uswest"]]}]}]}`, + params: url.Values{"db": []string{"db0"}}, + }, + &Query{ + name: "ensure we can query for memory with both tags", + command: `SELECT * FROM memory where region='uswest' and host='serverB' GROUP BY *`, + exp: `{"results":[{"series":[{"name":"memory","tags":{"host":"serverB","region":"uswest"},"columns":["time","val"],"values":[["2000-01-01T00:00:01Z",33.2]]}]}]}`, + params: url.Values{"db": []string{"db0"}}, + }, + &Query{ + name: "drop measurement cpu", + command: `DROP MEASUREMENT cpu`, + exp: `{"results":[{}]}`, + params: url.Values{"db": []string{"db0"}}, + }, + &Query{ + name: "verify measurements in DB that we deleted a measurement from", + command: `SHOW MEASUREMENTS`, + exp: `{"results":[{"series":[{"name":"measurements","columns":["name"],"values":[["memory"]]}]}]}`, + params: url.Values{"db": []string{"db0"}}, + }, + &Query{ + name: "verify series", + command: `SHOW SERIES`, + exp: `{"results":[{"series":[{"columns":["key"],"values":[["memory,host=serverB,region=uswest"]]}]}]}`, + params: url.Values{"db": []string{"db0"}}, + }, + &Query{ + name: "verify cpu measurement is gone", + command: `SELECT * FROM cpu`, + exp: `{"results":[{}]}`, + params: url.Values{"db": []string{"db0"}}, + }, + &Query{ + name: "verify cpu measurement is NOT gone from other DB", + command: `SELECT * FROM cpu`, + exp: `{"results":[{"series":[{"name":"cpu","columns":["time","host","region","val"],"values":[["2000-01-01T00:00:00Z","serverA","uswest",23.2]]}]}]}`, + params: url.Values{"db": []string{"db1"}}, + }, + &Query{ + name: "verify selecting from a tag 'host' still works", + command: `SELECT * FROM memory where host='serverB' GROUP BY *`, + exp: `{"results":[{"series":[{"name":"memory","tags":{"host":"serverB","region":"uswest"},"columns":["time","val"],"values":[["2000-01-01T00:00:01Z",33.2]]}]}]}`, + params: url.Values{"db": []string{"db0"}}, + }, + &Query{ + name: "verify selecting from a tag 'region' still works", + command: `SELECT * FROM memory where region='uswest' GROUP BY *`, + exp: `{"results":[{"series":[{"name":"memory","tags":{"host":"serverB","region":"uswest"},"columns":["time","val"],"values":[["2000-01-01T00:00:01Z",33.2]]}]}]}`, + params: url.Values{"db": []string{"db0"}}, + }, + &Query{ + name: "verify selecting from a tag 'host' and 'region' still works", + command: `SELECT * FROM memory where region='uswest' and host='serverB' GROUP BY *`, + exp: `{"results":[{"series":[{"name":"memory","tags":{"host":"serverB","region":"uswest"},"columns":["time","val"],"values":[["2000-01-01T00:00:01Z",33.2]]}]}]}`, + params: url.Values{"db": []string{"db0"}}, + }, + &Query{ + name: "Drop non-existant measurement", + command: `DROP MEASUREMENT doesntexist`, + exp: `{"results":[{"error":"measurement not found: doesntexist"}]}`, + params: url.Values{"db": []string{"db0"}}, + }, + }...) + + // Test that re-inserting the measurement works fine. + for i, query := range test.queries { + if i == 0 { + if err := test.init(s); err != nil { + t.Fatalf("test init failed: %s", err) + } + } + if query.skip { + t.Logf("SKIP:: %s", query.name) + continue + } + if err := query.Execute(s); err != nil { + t.Error(query.Error(err)) + } else if !query.success() { + t.Error(query.failureMessage()) + } + } + + test = NewTest("db0", "rp0") + test.writes = Writes{ + &Write{data: writes}, + } + + test.addQueries([]*Query{ + &Query{ + name: "verify measurements after recreation", + command: `SHOW MEASUREMENTS`, + exp: `{"results":[{"series":[{"name":"measurements","columns":["name"],"values":[["cpu"],["memory"]]}]}]}`, + params: url.Values{"db": []string{"db0"}}, + }, + &Query{ + name: "verify cpu measurement has been re-inserted", + command: `SELECT * FROM cpu GROUP BY *`, + exp: `{"results":[{"series":[{"name":"cpu","tags":{"host":"serverA","region":"uswest"},"columns":["time","val"],"values":[["2000-01-01T00:00:00Z",23.2]]}]}]}`, + params: url.Values{"db": []string{"db0"}}, + }, + }...) + + for i, query := range test.queries { + if i == 0 { + if err := test.init(s); err != nil { + t.Fatalf("test init failed: %s", err) + } + } + if query.skip { + t.Logf("SKIP:: %s", query.name) + continue + } + if err := query.Execute(s); err != nil { + t.Error(query.Error(err)) + } else if !query.success() { + t.Error(query.failureMessage()) + } + } +} + +func TestServer_Query_ShowQueries_Future(t *testing.T) { + t.Parallel() + s := OpenServer(NewConfig()) + defer s.Close() + + if err := s.CreateDatabaseAndRetentionPolicy("db0", newRetentionPolicyInfo("rp0", 1, 0)); err != nil { + t.Fatal(err) + } + if err := s.MetaClient.SetDefaultRetentionPolicy("db0", "rp0"); err != nil { + t.Fatal(err) + } + + writes := []string{ + fmt.Sprintf(`cpu,host=server01 value=100 %d`, models.MaxNanoTime), + } + + test := NewTest("db0", "rp0") + test.writes = Writes{ + &Write{data: strings.Join(writes, "\n")}, + } + + test.addQueries([]*Query{ + &Query{ + name: `show measurements`, + command: "SHOW MEASUREMENTS", + exp: `{"results":[{"series":[{"name":"measurements","columns":["name"],"values":[["cpu"]]}]}]}`, + params: url.Values{"db": []string{"db0"}}, + }, + &Query{ + name: `show series`, + command: "SHOW SERIES", + exp: `{"results":[{"series":[{"columns":["key"],"values":[["cpu,host=server01"]]}]}]}`, + params: url.Values{"db": []string{"db0"}}, + }, + &Query{ + name: `show tag keys`, + command: "SHOW TAG KEYS FROM cpu", + exp: `{"results":[{"series":[{"name":"cpu","columns":["tagKey"],"values":[["host"]]}]}]}`, + params: url.Values{"db": []string{"db0"}}, + }, + &Query{ + name: `show tag values`, + command: "SHOW TAG VALUES WITH KEY = \"host\"", + exp: `{"results":[{"series":[{"name":"cpu","columns":["key","value"],"values":[["host","server01"]]}]}]}`, + params: url.Values{"db": []string{"db0"}}, + }, + &Query{ + name: `show field keys`, + command: "SHOW FIELD KEYS", + exp: `{"results":[{"series":[{"name":"cpu","columns":["fieldKey","fieldType"],"values":[["value","float"]]}]}]}`, + params: url.Values{"db": []string{"db0"}}, + }, + }...) + + for i, query := range test.queries { + if i == 0 { + if err := test.init(s); err != nil { + t.Fatalf("test init failed: %s", err) + } + } + if query.skip { + t.Logf("SKIP:: %s", query.name) + continue + } + if err := query.Execute(s); err != nil { + t.Error(query.Error(err)) + } else if !query.success() { + t.Error(query.failureMessage()) + } + } +} + +func TestServer_Query_ShowSeries(t *testing.T) { + t.Parallel() + s := OpenServer(NewConfig()) + defer s.Close() + + if err := s.CreateDatabaseAndRetentionPolicy("db0", newRetentionPolicyInfo("rp0", 1, 0)); err != nil { + t.Fatal(err) + } + if err := s.MetaClient.SetDefaultRetentionPolicy("db0", "rp0"); err != nil { + t.Fatal(err) + } + + writes := []string{ + fmt.Sprintf(`cpu,host=server01 value=100 %d`, mustParseTime(time.RFC3339Nano, "2009-11-10T23:00:01Z").UnixNano()), + fmt.Sprintf(`cpu,host=server01,region=uswest value=100 %d`, mustParseTime(time.RFC3339Nano, "2009-11-10T23:00:02Z").UnixNano()), + fmt.Sprintf(`cpu,host=server01,region=useast value=100 %d`, mustParseTime(time.RFC3339Nano, "2009-11-10T23:00:03Z").UnixNano()), + fmt.Sprintf(`cpu,host=server02,region=useast value=100 %d`, mustParseTime(time.RFC3339Nano, "2009-11-10T23:00:04Z").UnixNano()), + fmt.Sprintf(`gpu,host=server02,region=useast value=100 %d`, mustParseTime(time.RFC3339Nano, "2009-11-10T23:00:05Z").UnixNano()), + fmt.Sprintf(`gpu,host=server03,region=caeast value=100 %d`, mustParseTime(time.RFC3339Nano, "2009-11-10T23:00:06Z").UnixNano()), + fmt.Sprintf(`disk,host=server03,region=caeast value=100 %d`, mustParseTime(time.RFC3339Nano, "2009-11-10T23:00:07Z").UnixNano()), + } + + test := NewTest("db0", "rp0") + test.writes = Writes{ + &Write{data: strings.Join(writes, "\n")}, + } + + test.addQueries([]*Query{ + &Query{ + name: `show series`, + command: "SHOW SERIES", + exp: `{"results":[{"series":[{"columns":["key"],"values":[["cpu,host=server01"],["cpu,host=server01,region=useast"],["cpu,host=server01,region=uswest"],["cpu,host=server02,region=useast"],["disk,host=server03,region=caeast"],["gpu,host=server02,region=useast"],["gpu,host=server03,region=caeast"]]}]}]}`, + params: url.Values{"db": []string{"db0"}}, + }, + &Query{ + name: `show series from measurement`, + command: "SHOW SERIES FROM cpu", + exp: `{"results":[{"series":[{"columns":["key"],"values":[["cpu,host=server01"],["cpu,host=server01,region=useast"],["cpu,host=server01,region=uswest"],["cpu,host=server02,region=useast"]]}]}]}`, + params: url.Values{"db": []string{"db0"}}, + }, + &Query{ + name: `show series from regular expression`, + command: "SHOW SERIES FROM /[cg]pu/", + exp: `{"results":[{"series":[{"columns":["key"],"values":[["cpu,host=server01"],["cpu,host=server01,region=useast"],["cpu,host=server01,region=uswest"],["cpu,host=server02,region=useast"],["gpu,host=server02,region=useast"],["gpu,host=server03,region=caeast"]]}]}]}`, + params: url.Values{"db": []string{"db0"}}, + }, + &Query{ + name: `show series with where tag`, + command: "SHOW SERIES WHERE region = 'uswest'", + exp: `{"results":[{"series":[{"columns":["key"],"values":[["cpu,host=server01,region=uswest"]]}]}]}`, + params: url.Values{"db": []string{"db0"}}, + }, + &Query{ + name: `show series where tag matches regular expression`, + command: "SHOW SERIES WHERE region =~ /ca.*/", + exp: `{"results":[{"series":[{"columns":["key"],"values":[["disk,host=server03,region=caeast"],["gpu,host=server03,region=caeast"]]}]}]}`, + params: url.Values{"db": []string{"db0"}}, + }, + &Query{ + name: `show series`, + command: "SHOW SERIES WHERE host !~ /server0[12]/", + exp: `{"results":[{"series":[{"columns":["key"],"values":[["disk,host=server03,region=caeast"],["gpu,host=server03,region=caeast"]]}]}]}`, + params: url.Values{"db": []string{"db0"}}, + }, + &Query{ + name: `show series with from and where`, + command: "SHOW SERIES FROM cpu WHERE region = 'useast'", + exp: `{"results":[{"series":[{"columns":["key"],"values":[["cpu,host=server01,region=useast"],["cpu,host=server02,region=useast"]]}]}]}`, + params: url.Values{"db": []string{"db0"}}, + }, + &Query{ + name: `show series with WHERE time should fail`, + command: "SHOW SERIES WHERE time > now() - 1h", + exp: `{"results":[{"error":"SHOW SERIES doesn't support time in WHERE clause"}]}`, + params: url.Values{"db": []string{"db0"}}, + }, + &Query{ + name: `show series with WHERE field should fail`, + command: "SHOW SERIES WHERE value > 10.0", + exp: `{"results":[{"error":"invalid tag comparison operator"}]}`, + params: url.Values{"db": []string{"db0"}}, + }, + }...) + + for i, query := range test.queries { + if i == 0 { + if err := test.init(s); err != nil { + t.Fatalf("test init failed: %s", err) + } + } + if query.skip { + t.Logf("SKIP:: %s", query.name) + continue + } + if err := query.Execute(s); err != nil { + t.Error(query.Error(err)) + } else if !query.success() { + t.Error(query.failureMessage()) + } + } +} + +func TestServer_Query_ShowMeasurements(t *testing.T) { + t.Parallel() + s := OpenServer(NewConfig()) + defer s.Close() + + if err := s.CreateDatabaseAndRetentionPolicy("db0", newRetentionPolicyInfo("rp0", 1, 0)); err != nil { + t.Fatal(err) + } + if err := s.MetaClient.SetDefaultRetentionPolicy("db0", "rp0"); err != nil { + t.Fatal(err) + } + + writes := []string{ + fmt.Sprintf(`cpu,host=server01 value=100 %d`, mustParseTime(time.RFC3339Nano, "2009-11-10T23:00:00Z").UnixNano()), + fmt.Sprintf(`cpu,host=server01,region=uswest value=100 %d`, mustParseTime(time.RFC3339Nano, "2009-11-10T23:00:00Z").UnixNano()), + fmt.Sprintf(`cpu,host=server01,region=useast value=100 %d`, mustParseTime(time.RFC3339Nano, "2009-11-10T23:00:00Z").UnixNano()), + fmt.Sprintf(`cpu,host=server02,region=useast value=100 %d`, mustParseTime(time.RFC3339Nano, "2009-11-10T23:00:00Z").UnixNano()), + fmt.Sprintf(`gpu,host=server02,region=useast value=100 %d`, mustParseTime(time.RFC3339Nano, "2009-11-10T23:00:00Z").UnixNano()), + fmt.Sprintf(`gpu,host=server02,region=caeast value=100 %d`, mustParseTime(time.RFC3339Nano, "2009-11-10T23:00:00Z").UnixNano()), + fmt.Sprintf(`other,host=server03,region=caeast value=100 %d`, mustParseTime(time.RFC3339Nano, "2009-11-10T23:00:00Z").UnixNano()), + } + + test := NewTest("db0", "rp0") + test.writes = Writes{ + &Write{data: strings.Join(writes, "\n")}, + } + + test.addQueries([]*Query{ + &Query{ + name: `show measurements with limit 2`, + command: "SHOW MEASUREMENTS LIMIT 2", + exp: `{"results":[{"series":[{"name":"measurements","columns":["name"],"values":[["cpu"],["gpu"]]}]}]}`, + params: url.Values{"db": []string{"db0"}}, + }, + &Query{ + name: `show measurements using WITH`, + command: "SHOW MEASUREMENTS WITH MEASUREMENT = cpu", + exp: `{"results":[{"series":[{"name":"measurements","columns":["name"],"values":[["cpu"]]}]}]}`, + params: url.Values{"db": []string{"db0"}}, + }, + &Query{ + name: `show measurements using WITH and regex`, + command: "SHOW MEASUREMENTS WITH MEASUREMENT =~ /[cg]pu/", + exp: `{"results":[{"series":[{"name":"measurements","columns":["name"],"values":[["cpu"],["gpu"]]}]}]}`, + params: url.Values{"db": []string{"db0"}}, + }, + &Query{ + name: `show measurements using WITH and regex - no matches`, + command: "SHOW MEASUREMENTS WITH MEASUREMENT =~ /.*zzzzz.*/", + exp: `{"results":[{}]}`, + params: url.Values{"db": []string{"db0"}}, + }, + &Query{ + name: `show measurements where tag matches regular expression`, + command: "SHOW MEASUREMENTS WHERE region =~ /ca.*/", + exp: `{"results":[{"series":[{"name":"measurements","columns":["name"],"values":[["gpu"],["other"]]}]}]}`, + params: url.Values{"db": []string{"db0"}}, + }, + &Query{ + name: `show measurements where tag does not match a regular expression`, + command: "SHOW MEASUREMENTS WHERE region !~ /ca.*/", + exp: `{"results":[{"series":[{"name":"measurements","columns":["name"],"values":[["cpu"]]}]}]}`, + params: url.Values{"db": []string{"db0"}}, + }, + &Query{ + name: `show measurements with time in WHERE clauses errors`, + command: `SHOW MEASUREMENTS WHERE time > now() - 1h`, + exp: `{"results":[{"error":"SHOW MEASUREMENTS doesn't support time in WHERE clause"}]}`, + params: url.Values{"db": []string{"db0"}}, + }, + }...) + + for i, query := range test.queries { + if i == 0 { + if err := test.init(s); err != nil { + t.Fatalf("test init failed: %s", err) + } + } + if query.skip { + t.Logf("SKIP:: %s", query.name) + continue + } + if err := query.Execute(s); err != nil { + t.Error(query.Error(err)) + } else if !query.success() { + t.Error(query.failureMessage()) + } + } +} + +func TestServer_Query_ShowTagKeys(t *testing.T) { + t.Parallel() + s := OpenServer(NewConfig()) + defer s.Close() + + if err := s.CreateDatabaseAndRetentionPolicy("db0", newRetentionPolicyInfo("rp0", 1, 0)); err != nil { + t.Fatal(err) + } + if err := s.MetaClient.SetDefaultRetentionPolicy("db0", "rp0"); err != nil { + t.Fatal(err) + } + + writes := []string{ + fmt.Sprintf(`cpu,host=server01 value=100 %d`, mustParseTime(time.RFC3339Nano, "2009-11-10T23:00:00Z").UnixNano()), + fmt.Sprintf(`cpu,host=server01,region=uswest value=100 %d`, mustParseTime(time.RFC3339Nano, "2009-11-10T23:00:00Z").UnixNano()), + fmt.Sprintf(`cpu,host=server01,region=useast value=100 %d`, mustParseTime(time.RFC3339Nano, "2009-11-10T23:00:00Z").UnixNano()), + fmt.Sprintf(`cpu,host=server02,region=useast value=100 %d`, mustParseTime(time.RFC3339Nano, "2009-11-10T23:00:00Z").UnixNano()), + fmt.Sprintf(`gpu,host=server02,region=useast value=100 %d`, mustParseTime(time.RFC3339Nano, "2009-11-10T23:00:00Z").UnixNano()), + fmt.Sprintf(`gpu,host=server03,region=caeast value=100 %d`, mustParseTime(time.RFC3339Nano, "2009-11-10T23:00:00Z").UnixNano()), + fmt.Sprintf(`disk,host=server03,region=caeast value=100 %d`, mustParseTime(time.RFC3339Nano, "2009-11-10T23:00:00Z").UnixNano()), + } + + test := NewTest("db0", "rp0") + test.writes = Writes{ + &Write{data: strings.Join(writes, "\n")}, + } + + test.addQueries([]*Query{ + &Query{ + name: `show tag keys`, + command: "SHOW TAG KEYS", + exp: `{"results":[{"series":[{"name":"cpu","columns":["tagKey"],"values":[["host"],["region"]]},{"name":"disk","columns":["tagKey"],"values":[["host"],["region"]]},{"name":"gpu","columns":["tagKey"],"values":[["host"],["region"]]}]}]}`, + params: url.Values{"db": []string{"db0"}}, + }, + &Query{ + name: "show tag keys from", + command: "SHOW TAG KEYS FROM cpu", + exp: `{"results":[{"series":[{"name":"cpu","columns":["tagKey"],"values":[["host"],["region"]]}]}]}`, + params: url.Values{"db": []string{"db0"}}, + }, + &Query{ + name: "show tag keys from regex", + command: "SHOW TAG KEYS FROM /[cg]pu/", + exp: `{"results":[{"series":[{"name":"cpu","columns":["tagKey"],"values":[["host"],["region"]]},{"name":"gpu","columns":["tagKey"],"values":[["host"],["region"]]}]}]}`, + params: url.Values{"db": []string{"db0"}}, + }, + &Query{ + name: "show tag keys measurement not found", + command: "SHOW TAG KEYS FROM doesntexist", + exp: `{"results":[{}]}`, + params: url.Values{"db": []string{"db0"}}, + }, + &Query{ + name: "show tag keys with time in WHERE clause errors", + command: "SHOW TAG KEYS FROM cpu WHERE time > now() - 1h", + exp: `{"results":[{"error":"SHOW TAG KEYS doesn't support time in WHERE clause"}]}`, + params: url.Values{"db": []string{"db0"}}, + }, + &Query{ + name: "show tag values with key", + command: "SHOW TAG VALUES WITH KEY = host", + exp: `{"results":[{"series":[{"name":"cpu","columns":["key","value"],"values":[["host","server01"],["host","server02"]]},{"name":"disk","columns":["key","value"],"values":[["host","server03"]]},{"name":"gpu","columns":["key","value"],"values":[["host","server02"],["host","server03"]]}]}]}`, + params: url.Values{"db": []string{"db0"}}, + }, + &Query{ + name: `show tag values with key and where`, + command: `SHOW TAG VALUES FROM cpu WITH KEY = host WHERE region = 'uswest'`, + exp: `{"results":[{"series":[{"name":"cpu","columns":["key","value"],"values":[["host","server01"]]}]}]}`, + params: url.Values{"db": []string{"db0"}}, + }, + &Query{ + name: `show tag values with key and where matches the regular expression`, + command: `SHOW TAG VALUES WITH KEY = host WHERE region =~ /ca.*/`, + exp: `{"results":[{"series":[{"name":"disk","columns":["key","value"],"values":[["host","server03"]]},{"name":"gpu","columns":["key","value"],"values":[["host","server03"]]}]}]}`, + params: url.Values{"db": []string{"db0"}}, + }, + &Query{ + name: `show tag values with key and where does not match the regular expression`, + command: `SHOW TAG VALUES WITH KEY = region WHERE host !~ /server0[12]/`, + exp: `{"results":[{"series":[{"name":"disk","columns":["key","value"],"values":[["region","caeast"]]},{"name":"gpu","columns":["key","value"],"values":[["region","caeast"]]}]}]}`, + params: url.Values{"db": []string{"db0"}}, + }, + &Query{ + name: `show tag values with key and where partially matches the regular expression`, + command: `SHOW TAG VALUES WITH KEY = host WHERE region =~ /us/`, + exp: `{"results":[{"series":[{"name":"cpu","columns":["key","value"],"values":[["host","server01"],["host","server02"]]},{"name":"gpu","columns":["key","value"],"values":[["host","server02"]]}]}]}`, + params: url.Values{"db": []string{"db0"}}, + }, + &Query{ + name: `show tag values with key and where partially does not match the regular expression`, + command: `SHOW TAG VALUES WITH KEY = host WHERE region !~ /us/`, + exp: `{"results":[{"series":[{"name":"cpu","columns":["key","value"],"values":[["host","server01"]]},{"name":"disk","columns":["key","value"],"values":[["host","server03"]]},{"name":"gpu","columns":["key","value"],"values":[["host","server03"]]}]}]}`, + params: url.Values{"db": []string{"db0"}}, + }, + &Query{ + name: `show tag values with key in and where does not match the regular expression`, + command: `SHOW TAG VALUES FROM cpu WITH KEY IN (host, region) WHERE region = 'uswest'`, + exp: `{"results":[{"series":[{"name":"cpu","columns":["key","value"],"values":[["host","server01"],["region","uswest"]]}]}]}`, + params: url.Values{"db": []string{"db0"}}, + }, + &Query{ + name: `show tag values with key and measurement matches regular expression`, + command: `SHOW TAG VALUES FROM /[cg]pu/ WITH KEY = host`, + exp: `{"results":[{"series":[{"name":"cpu","columns":["key","value"],"values":[["host","server01"],["host","server02"]]},{"name":"gpu","columns":["key","value"],"values":[["host","server02"],["host","server03"]]}]}]}`, + params: url.Values{"db": []string{"db0"}}, + }, + &Query{ + name: `show tag values with key and time in WHERE clause should error`, + command: `SHOW TAG VALUES WITH KEY = host WHERE time > now() - 1h`, + exp: `{"results":[{"error":"SHOW TAG VALUES doesn't support time in WHERE clause"}]}`, + params: url.Values{"db": []string{"db0"}}, + }, + }...) + + for i, query := range test.queries { + if i == 0 { + if err := test.init(s); err != nil { + t.Fatalf("test init failed: %s", err) + } + } + if query.skip { + t.Logf("SKIP:: %s", query.name) + continue + } + if err := query.Execute(s); err != nil { + t.Error(query.Error(err)) + } else if !query.success() { + t.Error(query.failureMessage()) + } + } +} + +func TestServer_Query_ShowFieldKeys(t *testing.T) { + t.Parallel() + s := OpenServer(NewConfig()) + defer s.Close() + + if err := s.CreateDatabaseAndRetentionPolicy("db0", newRetentionPolicyInfo("rp0", 1, 0)); err != nil { + t.Fatal(err) + } + if err := s.MetaClient.SetDefaultRetentionPolicy("db0", "rp0"); err != nil { + t.Fatal(err) + } + + writes := []string{ + fmt.Sprintf(`cpu,host=server01 field1=100 %d`, mustParseTime(time.RFC3339Nano, "2009-11-10T23:00:00Z").UnixNano()), + fmt.Sprintf(`cpu,host=server01,region=uswest field1=200,field2=300,field3=400 %d`, mustParseTime(time.RFC3339Nano, "2009-11-10T23:00:00Z").UnixNano()), + fmt.Sprintf(`cpu,host=server01,region=useast field1=200,field2=300,field3=400 %d`, mustParseTime(time.RFC3339Nano, "2009-11-10T23:00:00Z").UnixNano()), + fmt.Sprintf(`cpu,host=server02,region=useast field1=200,field2=300,field3=400 %d`, mustParseTime(time.RFC3339Nano, "2009-11-10T23:00:00Z").UnixNano()), + fmt.Sprintf(`gpu,host=server01,region=useast field4=200,field5=300 %d`, mustParseTime(time.RFC3339Nano, "2009-11-10T23:00:00Z").UnixNano()), + fmt.Sprintf(`gpu,host=server03,region=caeast field6=200,field7=300 %d`, mustParseTime(time.RFC3339Nano, "2009-11-10T23:00:00Z").UnixNano()), + fmt.Sprintf(`disk,host=server03,region=caeast field8=200,field9=300 %d`, mustParseTime(time.RFC3339Nano, "2009-11-10T23:00:00Z").UnixNano()), + } + + test := NewTest("db0", "rp0") + test.writes = Writes{ + &Write{data: strings.Join(writes, "\n")}, + } + + test.addQueries([]*Query{ + &Query{ + name: `show field keys`, + command: `SHOW FIELD KEYS`, + exp: `{"results":[{"series":[{"name":"cpu","columns":["fieldKey","fieldType"],"values":[["field1","float"],["field2","float"],["field3","float"]]},{"name":"disk","columns":["fieldKey","fieldType"],"values":[["field8","float"],["field9","float"]]},{"name":"gpu","columns":["fieldKey","fieldType"],"values":[["field4","float"],["field5","float"],["field6","float"],["field7","float"]]}]}]}`, + params: url.Values{"db": []string{"db0"}}, + }, + &Query{ + name: `show field keys from measurement`, + command: `SHOW FIELD KEYS FROM cpu`, + exp: `{"results":[{"series":[{"name":"cpu","columns":["fieldKey","fieldType"],"values":[["field1","float"],["field2","float"],["field3","float"]]}]}]}`, + params: url.Values{"db": []string{"db0"}}, + }, + &Query{ + name: `show field keys measurement with regex`, + command: `SHOW FIELD KEYS FROM /[cg]pu/`, + exp: `{"results":[{"series":[{"name":"cpu","columns":["fieldKey","fieldType"],"values":[["field1","float"],["field2","float"],["field3","float"]]},{"name":"gpu","columns":["fieldKey","fieldType"],"values":[["field4","float"],["field5","float"],["field6","float"],["field7","float"]]}]}]}`, + params: url.Values{"db": []string{"db0"}}, + }, + }...) + + for i, query := range test.queries { + if i == 0 { + if err := test.init(s); err != nil { + t.Fatalf("test init failed: %s", err) + } + } + if query.skip { + t.Logf("SKIP:: %s", query.name) + continue + } + if err := query.Execute(s); err != nil { + t.Error(query.Error(err)) + } else if !query.success() { + t.Error(query.failureMessage()) + } + } +} + +func TestServer_ContinuousQuery(t *testing.T) { + t.Parallel() + s := OpenServer(NewConfig()) + defer s.Close() + + if err := s.CreateDatabaseAndRetentionPolicy("db0", newRetentionPolicyInfo("rp0", 1, 0)); err != nil { + t.Fatal(err) + } + if err := s.MetaClient.SetDefaultRetentionPolicy("db0", "rp0"); err != nil { + t.Fatal(err) + } + + runTest := func(test *Test, t *testing.T) { + for i, query := range test.queries { + if i == 0 { + if err := test.init(s); err != nil { + t.Fatalf("test init failed: %s", err) + } + } + if query.skip { + t.Logf("SKIP:: %s", query.name) + continue + } + if err := query.Execute(s); err != nil { + t.Error(query.Error(err)) + } else if !query.success() { + t.Error(query.failureMessage()) + } + } + } + + // Start times of CQ intervals. + interval0 := time.Now().Add(-time.Second).Round(time.Second * 5) + interval1 := interval0.Add(-time.Second * 5) + interval2 := interval0.Add(-time.Second * 10) + interval3 := interval0.Add(-time.Second * 15) + + writes := []string{ + // Point too far in the past for CQ to pick up. + fmt.Sprintf(`cpu,host=server01,region=uswest value=100 %d`, interval3.Add(time.Second).UnixNano()), + + // Points two intervals ago. + fmt.Sprintf(`cpu,host=server01 value=100 %d`, interval2.Add(time.Second).UnixNano()), + fmt.Sprintf(`cpu,host=server01,region=uswest value=100 %d`, interval2.Add(time.Second*2).UnixNano()), + fmt.Sprintf(`cpu,host=server01,region=useast value=100 %d`, interval2.Add(time.Second*3).UnixNano()), + + // Points one interval ago. + fmt.Sprintf(`gpu,host=server02,region=useast value=100 %d`, interval1.Add(time.Second).UnixNano()), + fmt.Sprintf(`gpu,host=server03,region=caeast value=100 %d`, interval1.Add(time.Second*2).UnixNano()), + + // Points in the current interval. + fmt.Sprintf(`gpu,host=server03,region=caeast value=100 %d`, interval0.Add(time.Second).UnixNano()), + fmt.Sprintf(`disk,host=server03,region=caeast value=100 %d`, interval0.Add(time.Second*2).UnixNano()), + } + + test := NewTest("db0", "rp0") + test.writes = Writes{ + &Write{data: strings.Join(writes, "\n")}, + } + test.addQueries([]*Query{ + &Query{ + name: `create another retention policy for CQ to write into`, + command: `CREATE RETENTION POLICY rp1 ON db0 DURATION 1h REPLICATION 1`, + exp: `{"results":[{}]}`, + }, + &Query{ + name: "create continuous query with backreference", + command: `CREATE CONTINUOUS QUERY "cq1" ON db0 BEGIN SELECT count(value) INTO "rp1".:MEASUREMENT FROM /[cg]pu/ GROUP BY time(5s) END`, + exp: `{"results":[{}]}`, + }, + &Query{ + name: `create another retention policy for CQ to write into`, + command: `CREATE RETENTION POLICY rp2 ON db0 DURATION 1h REPLICATION 1`, + exp: `{"results":[{}]}`, + }, + &Query{ + name: "create continuous query with backreference and group by time", + command: `CREATE CONTINUOUS QUERY "cq2" ON db0 BEGIN SELECT count(value) INTO "rp2".:MEASUREMENT FROM /[cg]pu/ GROUP BY time(5s), * END`, + exp: `{"results":[{}]}`, + }, + &Query{ + name: `show continuous queries`, + command: `SHOW CONTINUOUS QUERIES`, + exp: `{"results":[{"series":[{"name":"db0","columns":["name","query"],"values":[["cq1","CREATE CONTINUOUS QUERY cq1 ON db0 BEGIN SELECT count(value) INTO db0.rp1.:MEASUREMENT FROM db0.rp0./[cg]pu/ GROUP BY time(5s) END"],["cq2","CREATE CONTINUOUS QUERY cq2 ON db0 BEGIN SELECT count(value) INTO db0.rp2.:MEASUREMENT FROM db0.rp0./[cg]pu/ GROUP BY time(5s), * END"]]}]}]}`, + }, + }...) + + // Run first test to create CQs. + runTest(&test, t) + + // Trigger CQs to run. + u := fmt.Sprintf("%s/data/process_continuous_queries?time=%d", s.URL(), interval0.UnixNano()) + if _, err := s.HTTPPost(u, nil); err != nil { + t.Fatal(err) + } + + // Wait for CQs to run. TODO: fix this ugly hack + //time.Sleep(time.Second * 5) + + // Setup tests to check the CQ results. + test2 := NewTest("db0", "rp1") + test2.addQueries([]*Query{ + &Query{ + skip: true, + name: "check results of cq1", + command: `SELECT * FROM "rp1"./[cg]pu/`, + exp: `{"results":[{"series":[{"name":"cpu","columns":["time","count","host","region","value"],"values":[["` + interval2.UTC().Format(time.RFC3339Nano) + `",3,null,null,null]]},{"name":"gpu","columns":["time","count","host","region","value"],"values":[["` + interval1.UTC().Format(time.RFC3339Nano) + `",2,null,null,null],["` + interval0.UTC().Format(time.RFC3339Nano) + `",1,null,null,null]]}]}]}`, + params: url.Values{"db": []string{"db0"}}, + }, + // TODO: restore this test once this is fixed: https://github.com/influxdata/influxdb/issues/3968 + &Query{ + skip: true, + name: "check results of cq2", + command: `SELECT * FROM "rp2"./[cg]pu/`, + exp: `{"results":[{"series":[{"name":"cpu","columns":["time","count","host","region","value"],"values":[["` + interval2.UTC().Format(time.RFC3339Nano) + `",1,"server01","uswest",null],["` + interval2.UTC().Format(time.RFC3339Nano) + `",1,"server01","",null],["` + interval2.UTC().Format(time.RFC3339Nano) + `",1,"server01","useast",null]]},{"name":"gpu","columns":["time","count","host","region","value"],"values":[["` + interval1.UTC().Format(time.RFC3339Nano) + `",1,"server02","useast",null],["` + interval1.UTC().Format(time.RFC3339Nano) + `",1,"server03","caeast",null],["` + interval0.UTC().Format(time.RFC3339Nano) + `",1,"server03","caeast",null]]}]}]}`, + params: url.Values{"db": []string{"db0"}}, + }, + }...) + + // Run second test to check CQ results. + runTest(&test2, t) +} + +// Tests that a known CQ query with concurrent writes does not deadlock the server +func TestServer_ContinuousQuery_Deadlock(t *testing.T) { + + // Skip until #3517 & #3522 are merged + t.Skip("Skipping CQ deadlock test") + if testing.Short() { + t.Skip("skipping CQ deadlock test") + } + t.Parallel() + s := OpenServer(NewConfig()) + defer func() { + s.Close() + // Nil the server so our deadlock detector goroutine can determine if we completed writes + // without timing out + s.Server = nil + }() + + if err := s.CreateDatabaseAndRetentionPolicy("db0", newRetentionPolicyInfo("rp0", 1, 0)); err != nil { + t.Fatal(err) + } + if err := s.MetaClient.SetDefaultRetentionPolicy("db0", "rp0"); err != nil { + t.Fatal(err) + } + + test := NewTest("db0", "rp0") + + test.addQueries([]*Query{ + &Query{ + name: "create continuous query", + command: `CREATE CONTINUOUS QUERY "my.query" ON db0 BEGIN SELECT sum(visits) as visits INTO test_1m FROM myseries GROUP BY time(1m), host END`, + exp: `{"results":[{}]}`, + }, + }...) + + for i, query := range test.queries { + if i == 0 { + if err := test.init(s); err != nil { + t.Fatalf("test init failed: %s", err) + } + } + if query.skip { + t.Logf("SKIP:: %s", query.name) + continue + } + if err := query.Execute(s); err != nil { + t.Error(query.Error(err)) + } else if !query.success() { + t.Error(query.failureMessage()) + } + } + + // Deadlock detector. If the deadlock is fixed, this test should complete all the writes in ~2.5s seconds (with artifical delays + // added). After 10 seconds, if the server has not been closed then we hit the deadlock bug. + iterations := 0 + go func(s *Server) { + <-time.After(10 * time.Second) + + // If the server is not nil then the test is still running and stuck. We panic to avoid + // having the whole test suite hang indefinitely. + if s.Server != nil { + panic("possible deadlock. writes did not complete in time") + } + }(s) + + for { + + // After the second write, if the deadlock exists, we'll get a write timeout and + // all subsequent writes will timeout + if iterations > 5 { + break + } + writes := []string{} + for i := 0; i < 1000; i++ { + writes = append(writes, fmt.Sprintf(`myseries,host=host-%d visits=1i`, i)) + } + write := strings.Join(writes, "\n") + + if _, err := s.Write(test.db, test.rp, write, test.params); err != nil { + t.Fatal(err) + } + iterations += 1 + time.Sleep(500 * time.Millisecond) + } +} + +func TestServer_Query_EvilIdentifiers(t *testing.T) { + t.Parallel() + s := OpenServer(NewConfig()) + defer s.Close() + + if err := s.CreateDatabaseAndRetentionPolicy("db0", newRetentionPolicyInfo("rp0", 1, 0)); err != nil { + t.Fatal(err) + } + if err := s.MetaClient.SetDefaultRetentionPolicy("db0", "rp0"); err != nil { + t.Fatal(err) + } + + test := NewTest("db0", "rp0") + test.writes = Writes{ + &Write{data: fmt.Sprintf("cpu select=1,in-bytes=2 %d", mustParseTime(time.RFC3339Nano, "2000-01-01T00:00:00Z").UnixNano())}, + } + + test.addQueries([]*Query{ + &Query{ + name: `query evil identifiers`, + command: `SELECT "select", "in-bytes" FROM cpu`, + exp: `{"results":[{"series":[{"name":"cpu","columns":["time","select","in-bytes"],"values":[["2000-01-01T00:00:00Z",1,2]]}]}]}`, + params: url.Values{"db": []string{"db0"}}, + }, + }...) + + for i, query := range test.queries { + if i == 0 { + if err := test.init(s); err != nil { + t.Fatalf("test init failed: %s", err) + } + } + if query.skip { + t.Logf("SKIP:: %s", query.name) + continue + } + if err := query.Execute(s); err != nil { + t.Error(query.Error(err)) + } else if !query.success() { + t.Error(query.failureMessage()) + } + } +} + +func TestServer_Query_OrderByTime(t *testing.T) { + t.Parallel() + s := OpenServer(NewConfig()) + defer s.Close() + + if err := s.CreateDatabaseAndRetentionPolicy("db0", newRetentionPolicyInfo("rp0", 1, 0)); err != nil { + t.Fatal(err) + } + if err := s.MetaClient.SetDefaultRetentionPolicy("db0", "rp0"); err != nil { + t.Fatal(err) + } + + writes := []string{ + fmt.Sprintf(`cpu,host=server1 value=1 %d`, mustParseTime(time.RFC3339Nano, "2000-01-01T00:00:01Z").UnixNano()), + fmt.Sprintf(`cpu,host=server1 value=2 %d`, mustParseTime(time.RFC3339Nano, "2000-01-01T00:00:02Z").UnixNano()), + fmt.Sprintf(`cpu,host=server1 value=3 %d`, mustParseTime(time.RFC3339Nano, "2000-01-01T00:00:03Z").UnixNano()), + + fmt.Sprintf(`power,presence=true value=1 %d`, mustParseTime(time.RFC3339Nano, "2000-01-01T00:00:01Z").UnixNano()), + fmt.Sprintf(`power,presence=true value=2 %d`, mustParseTime(time.RFC3339Nano, "2000-01-01T00:00:02Z").UnixNano()), + fmt.Sprintf(`power,presence=true value=3 %d`, mustParseTime(time.RFC3339Nano, "2000-01-01T00:00:03Z").UnixNano()), + fmt.Sprintf(`power,presence=false value=4 %d`, mustParseTime(time.RFC3339Nano, "2000-01-01T00:00:04Z").UnixNano()), + } + + test := NewTest("db0", "rp0") + test.writes = Writes{ + &Write{data: strings.Join(writes, "\n")}, + } + + test.addQueries([]*Query{ + &Query{ + name: "order on points", + params: url.Values{"db": []string{"db0"}}, + command: `select value from "cpu" ORDER BY time DESC`, + exp: `{"results":[{"series":[{"name":"cpu","columns":["time","value"],"values":[["2000-01-01T00:00:03Z",3],["2000-01-01T00:00:02Z",2],["2000-01-01T00:00:01Z",1]]}]}]}`, + }, + + &Query{ + name: "order desc with tags", + params: url.Values{"db": []string{"db0"}}, + command: `select value from "power" ORDER BY time DESC`, + exp: `{"results":[{"series":[{"name":"power","columns":["time","value"],"values":[["2000-01-01T00:00:04Z",4],["2000-01-01T00:00:03Z",3],["2000-01-01T00:00:02Z",2],["2000-01-01T00:00:01Z",1]]}]}]}`, + }, + }...) + + for i, query := range test.queries { + if i == 0 { + if err := test.init(s); err != nil { + t.Fatalf("test init failed: %s", err) + } + } + if query.skip { + t.Logf("SKIP:: %s", query.name) + continue + } + if err := query.Execute(s); err != nil { + t.Error(query.Error(err)) + } else if !query.success() { + t.Error(query.failureMessage()) + } + } +} + +func TestServer_Query_FieldWithMultiplePeriods(t *testing.T) { + t.Parallel() + s := OpenServer(NewConfig()) + defer s.Close() + + if err := s.CreateDatabaseAndRetentionPolicy("db0", newRetentionPolicyInfo("rp0", 1, 0)); err != nil { + t.Fatal(err) + } + if err := s.MetaClient.SetDefaultRetentionPolicy("db0", "rp0"); err != nil { + t.Fatal(err) + } + + writes := []string{ + fmt.Sprintf(`cpu foo.bar.baz=1 %d`, mustParseTime(time.RFC3339Nano, "2000-01-01T00:00:00Z").UnixNano()), + } + + test := NewTest("db0", "rp0") + test.writes = Writes{ + &Write{data: strings.Join(writes, "\n")}, + } + + test.addQueries([]*Query{ + &Query{ + name: "baseline", + params: url.Values{"db": []string{"db0"}}, + command: `select * from cpu`, + exp: `{"results":[{"series":[{"name":"cpu","columns":["time","foo.bar.baz"],"values":[["2000-01-01T00:00:00Z",1]]}]}]}`, + }, + &Query{ + name: "select field with periods", + params: url.Values{"db": []string{"db0"}}, + command: `select "foo.bar.baz" from cpu`, + exp: `{"results":[{"series":[{"name":"cpu","columns":["time","foo.bar.baz"],"values":[["2000-01-01T00:00:00Z",1]]}]}]}`, + }, + }...) + + for i, query := range test.queries { + if i == 0 { + if err := test.init(s); err != nil { + t.Fatalf("test init failed: %s", err) + } + } + if query.skip { + t.Logf("SKIP:: %s", query.name) + continue + } + if err := query.Execute(s); err != nil { + t.Error(query.Error(err)) + } else if !query.success() { + t.Error(query.failureMessage()) + } + } +} + +func TestServer_Query_FieldWithMultiplePeriodsMeasurementPrefixMatch(t *testing.T) { + t.Parallel() + s := OpenServer(NewConfig()) + defer s.Close() + + if err := s.CreateDatabaseAndRetentionPolicy("db0", newRetentionPolicyInfo("rp0", 1, 0)); err != nil { + t.Fatal(err) + } + if err := s.MetaClient.SetDefaultRetentionPolicy("db0", "rp0"); err != nil { + t.Fatal(err) + } + + writes := []string{ + fmt.Sprintf(`foo foo.bar.baz=1 %d`, mustParseTime(time.RFC3339Nano, "2000-01-01T00:00:00Z").UnixNano()), + } + + test := NewTest("db0", "rp0") + test.writes = Writes{ + &Write{data: strings.Join(writes, "\n")}, + } + + test.addQueries([]*Query{ + &Query{ + name: "baseline", + params: url.Values{"db": []string{"db0"}}, + command: `select * from foo`, + exp: `{"results":[{"series":[{"name":"foo","columns":["time","foo.bar.baz"],"values":[["2000-01-01T00:00:00Z",1]]}]}]}`, + }, + &Query{ + name: "select field with periods", + params: url.Values{"db": []string{"db0"}}, + command: `select "foo.bar.baz" from foo`, + exp: `{"results":[{"series":[{"name":"foo","columns":["time","foo.bar.baz"],"values":[["2000-01-01T00:00:00Z",1]]}]}]}`, + }, + }...) + + for i, query := range test.queries { + if i == 0 { + if err := test.init(s); err != nil { + t.Fatalf("test init failed: %s", err) + } + } + if query.skip { + t.Logf("SKIP:: %s", query.name) + continue + } + if err := query.Execute(s); err != nil { + t.Error(query.Error(err)) + } else if !query.success() { + t.Error(query.failureMessage()) + } + } +} + +func TestServer_Query_IntoTarget(t *testing.T) { + t.Parallel() + s := OpenServer(NewConfig()) + defer s.Close() + + if err := s.CreateDatabaseAndRetentionPolicy("db0", newRetentionPolicyInfo("rp0", 1, 0)); err != nil { + t.Fatal(err) + } + if err := s.MetaClient.SetDefaultRetentionPolicy("db0", "rp0"); err != nil { + t.Fatal(err) + } + + writes := []string{ + fmt.Sprintf(`foo value=1 %d`, mustParseTime(time.RFC3339Nano, "2000-01-01T00:00:00Z").UnixNano()), + fmt.Sprintf(`foo value=2 %d`, mustParseTime(time.RFC3339Nano, "2000-01-01T00:00:10Z").UnixNano()), + fmt.Sprintf(`foo value=3 %d`, mustParseTime(time.RFC3339Nano, "2000-01-01T00:00:20Z").UnixNano()), + fmt.Sprintf(`foo value=4 %d`, mustParseTime(time.RFC3339Nano, "2000-01-01T00:00:30Z").UnixNano()), + fmt.Sprintf(`foo value=4,foobar=3 %d`, mustParseTime(time.RFC3339Nano, "2000-01-01T00:00:40Z").UnixNano()), + } + + test := NewTest("db0", "rp0") + test.writes = Writes{ + &Write{data: strings.Join(writes, "\n")}, + } + + test.addQueries([]*Query{ + &Query{ + name: "into", + params: url.Values{"db": []string{"db0"}}, + command: `SELECT * INTO baz FROM foo`, + exp: `{"results":[{"series":[{"name":"result","columns":["time","written"],"values":[["1970-01-01T00:00:00Z",5]]}]}]}`, + }, + &Query{ + name: "confirm results", + params: url.Values{"db": []string{"db0"}}, + command: `SELECT * FROM baz`, + exp: `{"results":[{"series":[{"name":"baz","columns":["time","foobar","value"],"values":[["2000-01-01T00:00:00Z",null,1],["2000-01-01T00:00:10Z",null,2],["2000-01-01T00:00:20Z",null,3],["2000-01-01T00:00:30Z",null,4],["2000-01-01T00:00:40Z",3,4]]}]}]}`, + }, + }...) + + if err := test.init(s); err != nil { + t.Fatalf("test init failed: %s", err) + } + + for _, query := range test.queries { + if query.skip { + t.Logf("SKIP:: %s", query.name) + continue + } + if err := query.Execute(s); err != nil { + t.Error(query.Error(err)) + } else if !query.success() { + t.Error(query.failureMessage()) + } + } +} + +// This test ensures that data is not duplicated with measurements +// of the same name. +func TestServer_Query_DuplicateMeasurements(t *testing.T) { + t.Parallel() + s := OpenDefaultServer(NewConfig()) + defer s.Close() + + // Create a second database. + if err := s.CreateDatabaseAndRetentionPolicy("db1", newRetentionPolicyInfo("rp0", 1, 0)); err != nil { + t.Fatal(err) + } + if err := s.MetaClient.SetDefaultRetentionPolicy("db1", "rp0"); err != nil { + t.Fatal(err) + } + + test := NewTest("db0", "rp0") + test.writes = Writes{ + &Write{data: fmt.Sprintf(`cpu value=1 %d`, mustParseTime(time.RFC3339Nano, "2000-01-01T00:00:00Z").UnixNano())}, + } + + if err := test.init(s); err != nil { + t.Fatalf("test init failed: %s", err) + } + + test = NewTest("db1", "rp0") + test.writes = Writes{ + &Write{data: fmt.Sprintf(`cpu value=2 %d`, mustParseTime(time.RFC3339Nano, "2000-01-01T00:00:10Z").UnixNano())}, + } + + if err := test.init(s); err != nil { + t.Fatalf("test init failed: %s", err) + } + + test.addQueries([]*Query{ + &Query{ + name: "select from both databases", + params: url.Values{"db": []string{"db0"}}, + command: `SELECT value FROM db0.rp0.cpu, db1.rp0.cpu`, + exp: `{"results":[{"series":[{"name":"cpu","columns":["time","value"],"values":[["2000-01-01T00:00:00Z",1],["2000-01-01T00:00:10Z",2]]}]}]}`, + }, + }...) + + for _, query := range test.queries { + if query.skip { + t.Logf("SKIP:: %s", query.name) + continue + } + if err := query.Execute(s); err != nil { + t.Error(query.Error(err)) + } else if !query.success() { + t.Error(query.failureMessage()) + } + } +} + +func TestServer_Query_LargeTimestamp(t *testing.T) { + t.Parallel() + s := OpenDefaultServer(NewConfig()) + defer s.Close() + + writes := []string{ + fmt.Sprintf(`cpu value=100 %d`, models.MaxNanoTime), + } + + test := NewTest("db0", "rp0") + test.writes = Writes{ + &Write{data: strings.Join(writes, "\n")}, + } + test.addQueries([]*Query{ + &Query{ + name: `select value at max nano time`, + params: url.Values{"db": []string{"db0"}}, + command: fmt.Sprintf(`SELECT value FROM cpu WHERE time <= %d`, models.MaxNanoTime), + exp: `{"results":[{"series":[{"name":"cpu","columns":["time","value"],"values":[["` + time.Unix(0, models.MaxNanoTime).UTC().Format(time.RFC3339Nano) + `",100]]}]}]}`, + }, + }...) + + if err := test.init(s); err != nil { + t.Fatalf("test init failed: %s", err) + } + + // Open a new server with the same configuration file. + // This is to ensure the meta data was marshaled correctly. + s2 := OpenServer(s.Config) + defer s2.Close() + + for _, query := range test.queries { + if query.skip { + t.Logf("SKIP:: %s", query.name) + continue + } + if err := query.Execute(s); err != nil { + t.Error(query.Error(err)) + } else if !query.success() { + t.Error(query.failureMessage()) + } + } +} + +// This test reproduced a data race with closing the +// Subscriber points channel while writes were in-flight in the PointsWriter. +func TestServer_ConcurrentPointsWriter_Subscriber(t *testing.T) { + t.Parallel() + s := OpenDefaultServer(NewConfig()) + defer s.Close() + + // goroutine to write points + done := make(chan struct{}) + go func() { + for { + select { + case <-done: + return + default: + wpr := &coordinator.WritePointsRequest{ + Database: "db0", + RetentionPolicy: "rp0", + } + s.PointsWriter.WritePoints(wpr.Database, wpr.RetentionPolicy, models.ConsistencyLevelAny, wpr.Points) + } + } + }() + + time.Sleep(10 * time.Millisecond) + + close(done) + // Race occurs on s.Close() +} + +// Ensure time in where clause is inclusive +func TestServer_WhereTimeInclusive(t *testing.T) { + t.Parallel() + s := OpenServer(NewConfig()) + defer s.Close() + + if err := s.CreateDatabaseAndRetentionPolicy("db0", newRetentionPolicyInfo("rp0", 1, 0)); err != nil { + t.Fatal(err) + } + if err := s.MetaClient.SetDefaultRetentionPolicy("db0", "rp0"); err != nil { + t.Fatal(err) + } + + writes := []string{ + fmt.Sprintf(`cpu value=1 %d`, mustParseTime(time.RFC3339Nano, "2000-01-01T00:00:01Z").UnixNano()), + fmt.Sprintf(`cpu value=2 %d`, mustParseTime(time.RFC3339Nano, "2000-01-01T00:00:02Z").UnixNano()), + fmt.Sprintf(`cpu value=3 %d`, mustParseTime(time.RFC3339Nano, "2000-01-01T00:00:03Z").UnixNano()), + } + + test := NewTest("db0", "rp0") + test.writes = Writes{ + &Write{data: strings.Join(writes, "\n")}, + } + + test.addQueries([]*Query{ + &Query{ + name: "all GTE/LTE", + params: url.Values{"db": []string{"db0"}}, + command: `SELECT * from cpu where time >= '2000-01-01T00:00:01Z' and time <= '2000-01-01T00:00:03Z'`, + exp: `{"results":[{"series":[{"name":"cpu","columns":["time","value"],"values":[["2000-01-01T00:00:01Z",1],["2000-01-01T00:00:02Z",2],["2000-01-01T00:00:03Z",3]]}]}]}`, + }, + &Query{ + name: "all GTE", + params: url.Values{"db": []string{"db0"}}, + command: `SELECT * from cpu where time >= '2000-01-01T00:00:01Z'`, + exp: `{"results":[{"series":[{"name":"cpu","columns":["time","value"],"values":[["2000-01-01T00:00:01Z",1],["2000-01-01T00:00:02Z",2],["2000-01-01T00:00:03Z",3]]}]}]}`, + }, + &Query{ + name: "all LTE", + params: url.Values{"db": []string{"db0"}}, + command: `SELECT * from cpu where time <= '2000-01-01T00:00:03Z'`, + exp: `{"results":[{"series":[{"name":"cpu","columns":["time","value"],"values":[["2000-01-01T00:00:01Z",1],["2000-01-01T00:00:02Z",2],["2000-01-01T00:00:03Z",3]]}]}]}`, + }, + &Query{ + name: "first GTE/LTE", + params: url.Values{"db": []string{"db0"}}, + command: `SELECT * from cpu where time >= '2000-01-01T00:00:01Z' and time <= '2000-01-01T00:00:01Z'`, + exp: `{"results":[{"series":[{"name":"cpu","columns":["time","value"],"values":[["2000-01-01T00:00:01Z",1]]}]}]}`, + }, + &Query{ + name: "last GTE/LTE", + params: url.Values{"db": []string{"db0"}}, + command: `SELECT * from cpu where time >= '2000-01-01T00:00:03Z' and time <= '2000-01-01T00:00:03Z'`, + exp: `{"results":[{"series":[{"name":"cpu","columns":["time","value"],"values":[["2000-01-01T00:00:03Z",3]]}]}]}`, + }, + &Query{ + name: "before GTE/LTE", + params: url.Values{"db": []string{"db0"}}, + command: `SELECT * from cpu where time <= '2000-01-01T00:00:00Z'`, + exp: `{"results":[{}]}`, + }, + &Query{ + name: "all GT/LT", + params: url.Values{"db": []string{"db0"}}, + command: `SELECT * from cpu where time > '2000-01-01T00:00:00Z' and time < '2000-01-01T00:00:04Z'`, + exp: `{"results":[{"series":[{"name":"cpu","columns":["time","value"],"values":[["2000-01-01T00:00:01Z",1],["2000-01-01T00:00:02Z",2],["2000-01-01T00:00:03Z",3]]}]}]}`, + }, + &Query{ + name: "first GT/LT", + params: url.Values{"db": []string{"db0"}}, + command: `SELECT * from cpu where time > '2000-01-01T00:00:00Z' and time < '2000-01-01T00:00:02Z'`, + exp: `{"results":[{"series":[{"name":"cpu","columns":["time","value"],"values":[["2000-01-01T00:00:01Z",1]]}]}]}`, + }, + &Query{ + name: "last GT/LT", + params: url.Values{"db": []string{"db0"}}, + command: `SELECT * from cpu where time > '2000-01-01T00:00:02Z' and time < '2000-01-01T00:00:04Z'`, + exp: `{"results":[{"series":[{"name":"cpu","columns":["time","value"],"values":[["2000-01-01T00:00:03Z",3]]}]}]}`, + }, + &Query{ + name: "all GT", + params: url.Values{"db": []string{"db0"}}, + command: `SELECT * from cpu where time > '2000-01-01T00:00:00Z'`, + exp: `{"results":[{"series":[{"name":"cpu","columns":["time","value"],"values":[["2000-01-01T00:00:01Z",1],["2000-01-01T00:00:02Z",2],["2000-01-01T00:00:03Z",3]]}]}]}`, + }, + &Query{ + name: "all LT", + params: url.Values{"db": []string{"db0"}}, + command: `SELECT * from cpu where time < '2000-01-01T00:00:04Z'`, + exp: `{"results":[{"series":[{"name":"cpu","columns":["time","value"],"values":[["2000-01-01T00:00:01Z",1],["2000-01-01T00:00:02Z",2],["2000-01-01T00:00:03Z",3]]}]}]}`, + }, + }...) + + if err := test.init(s); err != nil { + t.Fatalf("test init failed: %s", err) + } + + for _, query := range test.queries { + if query.skip { + t.Logf("SKIP:: %s", query.name) + continue + } + if err := query.Execute(s); err != nil { + t.Error(query.Error(err)) + } else if !query.success() { + t.Error(query.failureMessage()) + } + } +} diff --git a/vendor/github.com/influxdata/influxdb/cmd/influxd/run/server_test.md b/vendor/github.com/influxdata/influxdb/cmd/influxd/run/server_test.md new file mode 100644 index 000000000..8df37e333 --- /dev/null +++ b/vendor/github.com/influxdata/influxdb/cmd/influxd/run/server_test.md @@ -0,0 +1,150 @@ +# Server Integration Tests + +Currently, the file `server_test.go` has integration tests for single node scenarios. +At some point we'll need to add cluster tests, and may add them in a different file, or +rename `server_test.go` to `server_single_node_test.go` or something like that. + +## What is in a test? + +Each test is broken apart effectively into the following areas: + +- Write sample data +- Use cases for table driven test, that include a command (typically a query) and an expected result. + +When each test runs it does the following: + +- init: determines if there are any writes and if so, writes them to the in-memory database +- queries: iterate through each query, executing the command, and comparing the results to the expected result. + +## Idempotent - Allows for parallel tests + +Each test should be `idempotent`, meaning that its data will not be affected by other tests, or use cases within the table tests themselves. +This allows for parallel testing, keeping the test suite total execution time very low. + +### Basic sample test + +```go +// Ensure the server can have a database with multiple measurements. +func TestServer_Query_Multiple_Measurements(t *testing.T) { + t.Parallel() + s := OpenServer(NewConfig(), "") + defer s.Close() + + if err := s.CreateDatabaseAndRetentionPolicy("db0", newRetentionPolicyInfo("rp0", 1, 1*time.Hour)); err != nil { + t.Fatal(err) + } + + // Make sure we do writes for measurements that will span across shards + writes := []string{ + fmt.Sprintf("cpu,host=server01 value=100,core=4 %d", mustParseTime(time.RFC3339Nano, "2000-01-01T00:00:00Z").UnixNano()), + fmt.Sprintf("cpu1,host=server02 value=50,core=2 %d", mustParseTime(time.RFC3339Nano, "2015-01-01T00:00:00Z").UnixNano()), + } + test := NewTest("db0", "rp0") + test.write = strings.Join(writes, "\n") + + test.addQueries([]*Query{ + &Query{ + name: "measurement in one shard but not another shouldn't panic server", + command: `SELECT host,value FROM db0.rp0.cpu`, + exp: `{"results":[{"series":[{"name":"cpu","tags":{"host":"server01"},"columns":["time","value"],"values":[["2000-01-01T00:00:00Z",100]]}]}]}`, + }, + }...) + + if err := test.init(s); err != nil { + t.Fatalf("test init failed: %s", err) + } + + for _, query := range test.queries { + if query.skip { + t.Logf("SKIP:: %s", query.name) + continue + } + if err := query.Execute(s); err != nil { + t.Error(query.Error(err)) + } else if !query.success() { + t.Error(query.failureMessage()) + } + } +} +``` + +Let's break this down: + +In this test, we first tell it to run in parallel with the `t.Parallel()` call. + +We then open a new server with: + +```go +s := OpenServer(NewConfig(), "") +defer s.Close() +``` + +If needed, we create a database and default retention policy. This is usually needed +when inserting and querying data. This is not needed if you are testing commands like `CREATE DATABASE`, `SHOW DIAGNOSTICS`, etc. + +```go +if err := s.CreateDatabaseAndRetentionPolicy("db0", newRetentionPolicyInfo("rp0", 1, 1*time.Hour)); err != nil { + t.Fatal(err) +} +``` + +Next, set up the write data you need: + +```go +writes := []string{ + fmt.Sprintf("cpu,host=server01 value=100,core=4 %d", mustParseTime(time.RFC3339Nano, "2000-01-01T00:00:00Z").UnixNano()), + fmt.Sprintf("cpu1,host=server02 value=50,core=2 %d", mustParseTime(time.RFC3339Nano, "2015-01-01T00:00:00Z").UnixNano()), +} +``` +Create a new test with the database and retention policy: + +```go +test := NewTest("db0", "rp0") +``` + +Send in the writes: +```go +test.write = strings.Join(writes, "\n") +``` + +Add some queries (the second one is mocked out to show how to add more than one): + +```go +test.addQueries([]*Query{ + &Query{ + name: "measurement in one shard but not another shouldn't panic server", + command: `SELECT host,value FROM db0.rp0.cpu`, + exp: `{"results":[{"series":[{"name":"cpu","tags":{"host":"server01"},"columns":["time","value"],"values":[["2000-01-01T00:00:00Z",100]]}]}]}`, + }, + &Query{ + name: "another test here...", + command: `Some query command`, + exp: `the expected results`, + }, +}...) +``` + +The rest of the code is boilerplate execution code. It is purposefully not refactored out to a helper +to make sure the test failure reports the proper lines for debugging purposes. + +#### Running the tests + +To run the tests: + +```sh +go test ./cmd/influxd/run -parallel 500 -timeout 10s +``` + +#### Running a specific test + +```sh +go test ./cmd/influxd/run -parallel 500 -timeout 10s -run TestServer_Query_Fill +``` + +#### Verbose feedback + +By default, all logs are silenced when testing. If you pass in the `-v` flag, the test suite becomes verbose, and enables all logging in the system + +```sh +go test ./cmd/influxd/run -parallel 500 -timeout 10s -run TestServer_Query_Fill -v +``` diff --git a/vendor/github.com/influxdata/influxdb/coordinator/config.go b/vendor/github.com/influxdata/influxdb/coordinator/config.go new file mode 100644 index 000000000..add06d2e9 --- /dev/null +++ b/vendor/github.com/influxdata/influxdb/coordinator/config.go @@ -0,0 +1,47 @@ +package coordinator + +import ( + "time" + + "github.com/influxdata/influxdb/influxql" + "github.com/influxdata/influxdb/toml" +) + +const ( + // DefaultWriteTimeout is the default timeout for a complete write to succeed. + DefaultWriteTimeout = 10 * time.Second + + // DefaultMaxConcurrentQueries is the maximum number of running queries. + // A value of zero will make the maximum query limit unlimited. + DefaultMaxConcurrentQueries = 0 + + // DefaultMaxSelectPointN is the maximum number of points a SELECT can process. + // A value of zero will make the maximum point count unlimited. + DefaultMaxSelectPointN = 0 + + // DefaultMaxSelectSeriesN is the maximum number of series a SELECT can run. + // A value of zero will make the maximum series count unlimited. + DefaultMaxSelectSeriesN = 0 +) + +// Config represents the configuration for the clustering service. +type Config struct { + WriteTimeout toml.Duration `toml:"write-timeout"` + MaxConcurrentQueries int `toml:"max-concurrent-queries"` + QueryTimeout toml.Duration `toml:"query-timeout"` + LogQueriesAfter toml.Duration `toml:"log-queries-after"` + MaxSelectPointN int `toml:"max-select-point"` + MaxSelectSeriesN int `toml:"max-select-series"` + MaxSelectBucketsN int `toml:"max-select-buckets"` +} + +// NewConfig returns an instance of Config with defaults. +func NewConfig() Config { + return Config{ + WriteTimeout: toml.Duration(DefaultWriteTimeout), + QueryTimeout: toml.Duration(influxql.DefaultQueryTimeout), + MaxConcurrentQueries: DefaultMaxConcurrentQueries, + MaxSelectPointN: DefaultMaxSelectPointN, + MaxSelectSeriesN: DefaultMaxSelectSeriesN, + } +} diff --git a/vendor/github.com/influxdata/influxdb/coordinator/config_test.go b/vendor/github.com/influxdata/influxdb/coordinator/config_test.go new file mode 100644 index 000000000..2f2143673 --- /dev/null +++ b/vendor/github.com/influxdata/influxdb/coordinator/config_test.go @@ -0,0 +1,24 @@ +package coordinator_test + +import ( + "testing" + "time" + + "github.com/BurntSushi/toml" + "github.com/influxdata/influxdb/coordinator" +) + +func TestConfig_Parse(t *testing.T) { + // Parse configuration. + var c coordinator.Config + if _, err := toml.Decode(` +write-timeout = "20s" +`, &c); err != nil { + t.Fatal(err) + } + + // Validate configuration. + if time.Duration(c.WriteTimeout) != 20*time.Second { + t.Fatalf("unexpected write timeout s: %s", c.WriteTimeout) + } +} diff --git a/vendor/github.com/influxdata/influxdb/coordinator/meta_client.go b/vendor/github.com/influxdata/influxdb/coordinator/meta_client.go new file mode 100644 index 000000000..64ae32c22 --- /dev/null +++ b/vendor/github.com/influxdata/influxdb/coordinator/meta_client.go @@ -0,0 +1,36 @@ +package coordinator + +import ( + "time" + + "github.com/influxdata/influxdb/influxql" + "github.com/influxdata/influxdb/services/meta" +) + +// MetaClient is an interface for accessing meta data. +type MetaClient interface { + CreateContinuousQuery(database, name, query string) error + CreateDatabase(name string) (*meta.DatabaseInfo, error) + CreateDatabaseWithRetentionPolicy(name string, rpi *meta.RetentionPolicyInfo) (*meta.DatabaseInfo, error) + CreateRetentionPolicy(database string, rpi *meta.RetentionPolicyInfo) (*meta.RetentionPolicyInfo, error) + CreateSubscription(database, rp, name, mode string, destinations []string) error + CreateUser(name, password string, admin bool) (*meta.UserInfo, error) + Database(name string) *meta.DatabaseInfo + Databases() []meta.DatabaseInfo + DropShard(id uint64) error + DropContinuousQuery(database, name string) error + DropDatabase(name string) error + DropRetentionPolicy(database, name string) error + DropSubscription(database, rp, name string) error + DropUser(name string) error + RetentionPolicy(database, name string) (rpi *meta.RetentionPolicyInfo, err error) + SetAdminPrivilege(username string, admin bool) error + SetDefaultRetentionPolicy(database, name string) error + SetPrivilege(username, database string, p influxql.Privilege) error + ShardsByTimeRange(sources influxql.Sources, tmin, tmax time.Time) (a []meta.ShardInfo, err error) + UpdateRetentionPolicy(database, name string, rpu *meta.RetentionPolicyUpdate) error + UpdateUser(name, password string) error + UserPrivilege(username, database string) (*influxql.Privilege, error) + UserPrivileges(username string) (map[string]influxql.Privilege, error) + Users() []meta.UserInfo +} diff --git a/vendor/github.com/influxdata/influxdb/coordinator/meta_client_test.go b/vendor/github.com/influxdata/influxdb/coordinator/meta_client_test.go new file mode 100644 index 000000000..92ce94184 --- /dev/null +++ b/vendor/github.com/influxdata/influxdb/coordinator/meta_client_test.go @@ -0,0 +1,164 @@ +package coordinator_test + +import ( + "time" + + "github.com/influxdata/influxdb/influxql" + "github.com/influxdata/influxdb/services/meta" +) + +// MetaClient is a mockable implementation of cluster.MetaClient. +type MetaClient struct { + CreateContinuousQueryFn func(database, name, query string) error + CreateDatabaseFn func(name string) (*meta.DatabaseInfo, error) + CreateDatabaseWithRetentionPolicyFn func(name string, rpi *meta.RetentionPolicyInfo) (*meta.DatabaseInfo, error) + CreateRetentionPolicyFn func(database string, rpi *meta.RetentionPolicyInfo) (*meta.RetentionPolicyInfo, error) + CreateSubscriptionFn func(database, rp, name, mode string, destinations []string) error + CreateUserFn func(name, password string, admin bool) (*meta.UserInfo, error) + DatabaseFn func(name string) *meta.DatabaseInfo + DatabasesFn func() []meta.DatabaseInfo + DataNodeFn func(id uint64) (*meta.NodeInfo, error) + DataNodesFn func() ([]meta.NodeInfo, error) + DeleteDataNodeFn func(id uint64) error + DeleteMetaNodeFn func(id uint64) error + DropContinuousQueryFn func(database, name string) error + DropDatabaseFn func(name string) error + DropRetentionPolicyFn func(database, name string) error + DropSubscriptionFn func(database, rp, name string) error + DropShardFn func(id uint64) error + DropUserFn func(name string) error + MetaNodesFn func() ([]meta.NodeInfo, error) + RetentionPolicyFn func(database, name string) (rpi *meta.RetentionPolicyInfo, err error) + SetAdminPrivilegeFn func(username string, admin bool) error + SetDefaultRetentionPolicyFn func(database, name string) error + SetPrivilegeFn func(username, database string, p influxql.Privilege) error + ShardsByTimeRangeFn func(sources influxql.Sources, tmin, tmax time.Time) (a []meta.ShardInfo, err error) + UpdateRetentionPolicyFn func(database, name string, rpu *meta.RetentionPolicyUpdate) error + UpdateUserFn func(name, password string) error + UserPrivilegeFn func(username, database string) (*influxql.Privilege, error) + UserPrivilegesFn func(username string) (map[string]influxql.Privilege, error) + UsersFn func() []meta.UserInfo +} + +func (c *MetaClient) CreateContinuousQuery(database, name, query string) error { + return c.CreateContinuousQueryFn(database, name, query) +} + +func (c *MetaClient) CreateDatabase(name string) (*meta.DatabaseInfo, error) { + return c.CreateDatabaseFn(name) +} + +func (c *MetaClient) CreateDatabaseWithRetentionPolicy(name string, rpi *meta.RetentionPolicyInfo) (*meta.DatabaseInfo, error) { + return c.CreateDatabaseWithRetentionPolicyFn(name, rpi) +} + +func (c *MetaClient) CreateRetentionPolicy(database string, rpi *meta.RetentionPolicyInfo) (*meta.RetentionPolicyInfo, error) { + return c.CreateRetentionPolicyFn(database, rpi) +} +func (c *MetaClient) DropShard(id uint64) error { + return c.DropShardFn(id) +} + +func (c *MetaClient) CreateSubscription(database, rp, name, mode string, destinations []string) error { + return c.CreateSubscriptionFn(database, rp, name, mode, destinations) +} + +func (c *MetaClient) CreateUser(name, password string, admin bool) (*meta.UserInfo, error) { + return c.CreateUserFn(name, password, admin) +} + +func (c *MetaClient) Database(name string) *meta.DatabaseInfo { + return c.DatabaseFn(name) +} + +func (c *MetaClient) Databases() []meta.DatabaseInfo { + return c.DatabasesFn() +} + +func (c *MetaClient) DataNode(id uint64) (*meta.NodeInfo, error) { + return c.DataNodeFn(id) +} + +func (c *MetaClient) DataNodes() ([]meta.NodeInfo, error) { + return c.DataNodesFn() +} + +func (c *MetaClient) DeleteDataNode(id uint64) error { + return c.DeleteDataNodeFn(id) +} + +func (c *MetaClient) DeleteMetaNode(id uint64) error { + return c.DeleteMetaNodeFn(id) +} + +func (c *MetaClient) DropContinuousQuery(database, name string) error { + return c.DropContinuousQueryFn(database, name) +} + +func (c *MetaClient) DropDatabase(name string) error { + return c.DropDatabaseFn(name) +} + +func (c *MetaClient) DropRetentionPolicy(database, name string) error { + return c.DropRetentionPolicyFn(database, name) +} + +func (c *MetaClient) DropSubscription(database, rp, name string) error { + return c.DropSubscriptionFn(database, rp, name) +} + +func (c *MetaClient) DropUser(name string) error { + return c.DropUserFn(name) +} + +func (c *MetaClient) MetaNodes() ([]meta.NodeInfo, error) { + return c.MetaNodesFn() +} + +func (c *MetaClient) RetentionPolicy(database, name string) (rpi *meta.RetentionPolicyInfo, err error) { + return c.RetentionPolicyFn(database, name) +} + +func (c *MetaClient) SetAdminPrivilege(username string, admin bool) error { + return c.SetAdminPrivilegeFn(username, admin) +} + +func (c *MetaClient) SetDefaultRetentionPolicy(database, name string) error { + return c.SetDefaultRetentionPolicyFn(database, name) +} + +func (c *MetaClient) SetPrivilege(username, database string, p influxql.Privilege) error { + return c.SetPrivilegeFn(username, database, p) +} + +func (c *MetaClient) ShardsByTimeRange(sources influxql.Sources, tmin, tmax time.Time) (a []meta.ShardInfo, err error) { + return c.ShardsByTimeRangeFn(sources, tmin, tmax) +} + +func (c *MetaClient) UpdateRetentionPolicy(database, name string, rpu *meta.RetentionPolicyUpdate) error { + return c.UpdateRetentionPolicyFn(database, name, rpu) +} + +func (c *MetaClient) UpdateUser(name, password string) error { + return c.UpdateUserFn(name, password) +} + +func (c *MetaClient) UserPrivilege(username, database string) (*influxql.Privilege, error) { + return c.UserPrivilegeFn(username, database) +} + +func (c *MetaClient) UserPrivileges(username string) (map[string]influxql.Privilege, error) { + return c.UserPrivilegesFn(username) +} + +func (c *MetaClient) Users() []meta.UserInfo { + return c.UsersFn() +} + +// DefaultMetaClientDatabaseFn returns a single database (db0) with a retention policy. +func DefaultMetaClientDatabaseFn(name string) *meta.DatabaseInfo { + return &meta.DatabaseInfo{ + Name: DefaultDatabase, + DefaultRetentionPolicy: DefaultRetentionPolicy, + } +} diff --git a/vendor/github.com/influxdata/influxdb/coordinator/points_writer.go b/vendor/github.com/influxdata/influxdb/coordinator/points_writer.go new file mode 100644 index 000000000..30fe74fd2 --- /dev/null +++ b/vendor/github.com/influxdata/influxdb/coordinator/points_writer.go @@ -0,0 +1,299 @@ +package coordinator + +import ( + "errors" + "expvar" + "io" + "log" + "os" + "sync" + "time" + + "github.com/influxdata/influxdb" + "github.com/influxdata/influxdb/models" + "github.com/influxdata/influxdb/services/meta" + "github.com/influxdata/influxdb/tsdb" +) + +// The statistics generated by the "write" mdoule +const ( + statWriteReq = "req" + statPointWriteReq = "pointReq" + statPointWriteReqLocal = "pointReqLocal" + statPointWriteReqRemote = "pointReqRemote" + statWriteOK = "writeOk" + statWritePartial = "writePartial" + statWriteTimeout = "writeTimeout" + statWriteErr = "writeError" + statWritePointReqHH = "pointReqHH" + statSubWriteOK = "subWriteOk" + statSubWriteDrop = "subWriteDrop" +) + +var ( + // ErrTimeout is returned when a write times out. + ErrTimeout = errors.New("timeout") + + // ErrPartialWrite is returned when a write partially succeeds but does + // not meet the requested consistency level. + ErrPartialWrite = errors.New("partial write") + + // ErrWriteFailed is returned when no writes succeeded. + ErrWriteFailed = errors.New("write failed") +) + +// PointsWriter handles writes across multiple local and remote data nodes. +type PointsWriter struct { + mu sync.RWMutex + closing chan struct{} + WriteTimeout time.Duration + Logger *log.Logger + + Node *influxdb.Node + + MetaClient interface { + Database(name string) (di *meta.DatabaseInfo) + RetentionPolicy(database, policy string) (*meta.RetentionPolicyInfo, error) + CreateShardGroup(database, policy string, timestamp time.Time) (*meta.ShardGroupInfo, error) + ShardOwner(shardID uint64) (string, string, *meta.ShardGroupInfo) + } + + TSDBStore interface { + CreateShard(database, retentionPolicy string, shardID uint64, enabled bool) error + WriteToShard(shardID uint64, points []models.Point) error + } + + ShardWriter interface { + WriteShard(shardID, ownerID uint64, points []models.Point) error + } + + Subscriber interface { + Points() chan<- *WritePointsRequest + } + subPoints chan<- *WritePointsRequest + + statMap *expvar.Map +} + +// WritePointsRequest represents a request to write point data to the cluster +type WritePointsRequest struct { + Database string + RetentionPolicy string + Points []models.Point +} + +// AddPoint adds a point to the WritePointRequest with field key 'value' +func (w *WritePointsRequest) AddPoint(name string, value interface{}, timestamp time.Time, tags map[string]string) { + pt, err := models.NewPoint( + name, tags, map[string]interface{}{"value": value}, timestamp, + ) + if err != nil { + return + } + w.Points = append(w.Points, pt) +} + +// NewPointsWriter returns a new instance of PointsWriter for a node. +func NewPointsWriter() *PointsWriter { + return &PointsWriter{ + closing: make(chan struct{}), + WriteTimeout: DefaultWriteTimeout, + Logger: log.New(os.Stderr, "[write] ", log.LstdFlags), + statMap: influxdb.NewStatistics("write", "write", nil), + } +} + +// ShardMapping contains a mapping of a shards to a points. +type ShardMapping struct { + Points map[uint64][]models.Point // The points associated with a shard ID + Shards map[uint64]*meta.ShardInfo // The shards that have been mapped, keyed by shard ID +} + +// NewShardMapping creates an empty ShardMapping +func NewShardMapping() *ShardMapping { + return &ShardMapping{ + Points: map[uint64][]models.Point{}, + Shards: map[uint64]*meta.ShardInfo{}, + } +} + +// MapPoint maps a point to shard +func (s *ShardMapping) MapPoint(shardInfo *meta.ShardInfo, p models.Point) { + points, ok := s.Points[shardInfo.ID] + if !ok { + s.Points[shardInfo.ID] = []models.Point{p} + } else { + s.Points[shardInfo.ID] = append(points, p) + } + s.Shards[shardInfo.ID] = shardInfo +} + +// Open opens the communication channel with the point writer +func (w *PointsWriter) Open() error { + w.mu.Lock() + defer w.mu.Unlock() + w.closing = make(chan struct{}) + if w.Subscriber != nil { + w.subPoints = w.Subscriber.Points() + } + return nil +} + +// Close closes the communication channel with the point writer +func (w *PointsWriter) Close() error { + w.mu.Lock() + defer w.mu.Unlock() + if w.closing != nil { + close(w.closing) + } + if w.subPoints != nil { + // 'nil' channels always block so this makes the + // select statement in WritePoints hit its default case + // dropping any in-flight writes. + w.subPoints = nil + } + return nil +} + +// SetLogOutput sets the writer to which all logs are written. It must not be +// called after Open is called. +func (w *PointsWriter) SetLogOutput(lw io.Writer) { + w.Logger = log.New(lw, "[write] ", log.LstdFlags) +} + +// MapShards maps the points contained in wp to a ShardMapping. If a point +// maps to a shard group or shard that does not currently exist, it will be +// created before returning the mapping. +func (w *PointsWriter) MapShards(wp *WritePointsRequest) (*ShardMapping, error) { + + // holds the start time ranges for required shard groups + timeRanges := map[time.Time]*meta.ShardGroupInfo{} + + rp, err := w.MetaClient.RetentionPolicy(wp.Database, wp.RetentionPolicy) + if err != nil { + return nil, err + } + if rp == nil { + return nil, influxdb.ErrRetentionPolicyNotFound(wp.RetentionPolicy) + } + + for _, p := range wp.Points { + timeRanges[p.Time().Truncate(rp.ShardGroupDuration)] = nil + } + + // holds all the shard groups and shards that are required for writes + for t := range timeRanges { + sg, err := w.MetaClient.CreateShardGroup(wp.Database, wp.RetentionPolicy, t) + if err != nil { + return nil, err + } + timeRanges[t] = sg + } + + mapping := NewShardMapping() + for _, p := range wp.Points { + sg := timeRanges[p.Time().Truncate(rp.ShardGroupDuration)] + sh := sg.ShardFor(p.HashID()) + mapping.MapPoint(&sh, p) + } + return mapping, nil +} + +// WritePointsInto is a copy of WritePoints that uses a tsdb structure instead of +// a cluster structure for information. This is to avoid a circular dependency +func (w *PointsWriter) WritePointsInto(p *IntoWriteRequest) error { + return w.WritePoints(p.Database, p.RetentionPolicy, models.ConsistencyLevelOne, p.Points) +} + +// WritePoints writes across multiple local and remote data nodes according the consistency level. +func (w *PointsWriter) WritePoints(database, retentionPolicy string, consistencyLevel models.ConsistencyLevel, points []models.Point) error { + w.statMap.Add(statWriteReq, 1) + w.statMap.Add(statPointWriteReq, int64(len(points))) + + if retentionPolicy == "" { + db := w.MetaClient.Database(database) + if db == nil { + return influxdb.ErrDatabaseNotFound(database) + } + retentionPolicy = db.DefaultRetentionPolicy + } + + shardMappings, err := w.MapShards(&WritePointsRequest{Database: database, RetentionPolicy: retentionPolicy, Points: points}) + if err != nil { + return err + } + + // Write each shard in it's own goroutine and return as soon + // as one fails. + ch := make(chan error, len(shardMappings.Points)) + for shardID, points := range shardMappings.Points { + go func(shard *meta.ShardInfo, database, retentionPolicy string, points []models.Point) { + ch <- w.writeToShard(shard, database, retentionPolicy, points) + }(shardMappings.Shards[shardID], database, retentionPolicy, points) + } + + // Send points to subscriptions if possible. + ok := false + // We need to lock just in case the channel is about to be nil'ed + w.mu.RLock() + select { + case w.subPoints <- &WritePointsRequest{Database: database, RetentionPolicy: retentionPolicy, Points: points}: + ok = true + default: + } + w.mu.RUnlock() + if ok { + w.statMap.Add(statSubWriteOK, 1) + } else { + w.statMap.Add(statSubWriteDrop, 1) + } + + timeout := time.NewTimer(w.WriteTimeout) + defer timeout.Stop() + for range shardMappings.Points { + select { + case <-w.closing: + return ErrWriteFailed + case <-timeout.C: + w.statMap.Add(statWriteTimeout, 1) + // return timeout error to caller + return ErrTimeout + case err := <-ch: + if err != nil { + return err + } + } + } + return nil +} + +// writeToShards writes points to a shard. +func (w *PointsWriter) writeToShard(shard *meta.ShardInfo, database, retentionPolicy string, points []models.Point) error { + w.statMap.Add(statPointWriteReqLocal, int64(len(points))) + + err := w.TSDBStore.WriteToShard(shard.ID, points) + if err == nil { + w.statMap.Add(statWriteOK, 1) + return nil + } + + // If we've written to shard that should exist on the current node, but the store has + // not actually created this shard, tell it to create it and retry the write + if err == tsdb.ErrShardNotFound { + err = w.TSDBStore.CreateShard(database, retentionPolicy, shard.ID, true) + if err != nil { + w.Logger.Printf("write failed for shard %d: %v", shard.ID, err) + w.statMap.Add(statWriteErr, 1) + return err + } + } + err = w.TSDBStore.WriteToShard(shard.ID, points) + if err != nil { + w.Logger.Printf("write failed for shard %d: %v", shard.ID, err) + w.statMap.Add(statWriteErr, 1) + return err + } + + w.statMap.Add(statWriteOK, 1) + return nil +} diff --git a/vendor/github.com/influxdata/influxdb/coordinator/points_writer_test.go b/vendor/github.com/influxdata/influxdb/coordinator/points_writer_test.go new file mode 100644 index 000000000..a2fedaa29 --- /dev/null +++ b/vendor/github.com/influxdata/influxdb/coordinator/points_writer_test.go @@ -0,0 +1,513 @@ +package coordinator_test + +import ( + "fmt" + "reflect" + "sync" + "sync/atomic" + "testing" + "time" + + "github.com/influxdata/influxdb" + "github.com/influxdata/influxdb/coordinator" + "github.com/influxdata/influxdb/models" + "github.com/influxdata/influxdb/services/meta" +) + +// TODO(benbjohnson): Rewrite tests to use cluster_test.MetaClient. + +// Ensures the points writer maps a single point to a single shard. +func TestPointsWriter_MapShards_One(t *testing.T) { + ms := PointsWriterMetaClient{} + rp := NewRetentionPolicy("myp", time.Hour, 3) + + ms.NodeIDFn = func() uint64 { return 1 } + ms.RetentionPolicyFn = func(db, retentionPolicy string) (*meta.RetentionPolicyInfo, error) { + return rp, nil + } + + ms.CreateShardGroupIfNotExistsFn = func(database, policy string, timestamp time.Time) (*meta.ShardGroupInfo, error) { + return &rp.ShardGroups[0], nil + } + + c := coordinator.PointsWriter{MetaClient: ms} + pr := &coordinator.WritePointsRequest{ + Database: "mydb", + RetentionPolicy: "myrp", + } + pr.AddPoint("cpu", 1.0, time.Now(), nil) + + var ( + shardMappings *coordinator.ShardMapping + err error + ) + if shardMappings, err = c.MapShards(pr); err != nil { + t.Fatalf("unexpected an error: %v", err) + } + + if exp := 1; len(shardMappings.Points) != exp { + t.Errorf("MapShards() len mismatch. got %v, exp %v", len(shardMappings.Points), exp) + } +} + +// Ensures the points writer maps a multiple points across shard group boundaries. +func TestPointsWriter_MapShards_Multiple(t *testing.T) { + ms := PointsWriterMetaClient{} + rp := NewRetentionPolicy("myp", time.Hour, 3) + AttachShardGroupInfo(rp, []meta.ShardOwner{ + {NodeID: 1}, + {NodeID: 2}, + {NodeID: 3}, + }) + AttachShardGroupInfo(rp, []meta.ShardOwner{ + {NodeID: 1}, + {NodeID: 2}, + {NodeID: 3}, + }) + + ms.NodeIDFn = func() uint64 { return 1 } + ms.RetentionPolicyFn = func(db, retentionPolicy string) (*meta.RetentionPolicyInfo, error) { + return rp, nil + } + + ms.CreateShardGroupIfNotExistsFn = func(database, policy string, timestamp time.Time) (*meta.ShardGroupInfo, error) { + for i, sg := range rp.ShardGroups { + if timestamp.Equal(sg.StartTime) || timestamp.After(sg.StartTime) && timestamp.Before(sg.EndTime) { + return &rp.ShardGroups[i], nil + } + } + panic("should not get here") + } + + c := coordinator.PointsWriter{MetaClient: ms} + pr := &coordinator.WritePointsRequest{ + Database: "mydb", + RetentionPolicy: "myrp", + } + + // Three points that range over the shardGroup duration (1h) and should map to two + // distinct shards + pr.AddPoint("cpu", 1.0, time.Unix(0, 0), nil) + pr.AddPoint("cpu", 2.0, time.Unix(0, 0).Add(time.Hour), nil) + pr.AddPoint("cpu", 3.0, time.Unix(0, 0).Add(time.Hour+time.Second), nil) + + var ( + shardMappings *coordinator.ShardMapping + err error + ) + if shardMappings, err = c.MapShards(pr); err != nil { + t.Fatalf("unexpected an error: %v", err) + } + + if exp := 2; len(shardMappings.Points) != exp { + t.Errorf("MapShards() len mismatch. got %v, exp %v", len(shardMappings.Points), exp) + } + + for _, points := range shardMappings.Points { + // First shard shoud have 1 point w/ first point added + if len(points) == 1 && points[0].Time() != pr.Points[0].Time() { + t.Fatalf("MapShards() value mismatch. got %v, exp %v", points[0].Time(), pr.Points[0].Time()) + } + + // Second shard shoud have the last two points added + if len(points) == 2 && points[0].Time() != pr.Points[1].Time() { + t.Fatalf("MapShards() value mismatch. got %v, exp %v", points[0].Time(), pr.Points[1].Time()) + } + + if len(points) == 2 && points[1].Time() != pr.Points[2].Time() { + t.Fatalf("MapShards() value mismatch. got %v, exp %v", points[1].Time(), pr.Points[2].Time()) + } + } +} + +func TestPointsWriter_WritePoints(t *testing.T) { + tests := []struct { + name string + database string + retentionPolicy string + + // the responses returned by each shard write call. node ID 1 = pos 0 + err []error + expErr error + }{ + { + name: "write one success", + database: "mydb", + retentionPolicy: "myrp", + err: []error{nil, nil, nil}, + expErr: nil, + }, + + // Write to non-existent database + { + name: "write to non-existent database", + database: "doesnt_exist", + retentionPolicy: "", + err: []error{nil, nil, nil}, + expErr: fmt.Errorf("database not found: doesnt_exist"), + }, + } + + for _, test := range tests { + + pr := &coordinator.WritePointsRequest{ + Database: test.database, + RetentionPolicy: test.retentionPolicy, + } + + // Three points that range over the shardGroup duration (1h) and should map to two + // distinct shards + pr.AddPoint("cpu", 1.0, time.Unix(0, 0), nil) + pr.AddPoint("cpu", 2.0, time.Unix(0, 0).Add(time.Hour), nil) + pr.AddPoint("cpu", 3.0, time.Unix(0, 0).Add(time.Hour+time.Second), nil) + + // copy to prevent data race + theTest := test + sm := coordinator.NewShardMapping() + sm.MapPoint( + &meta.ShardInfo{ID: uint64(1), Owners: []meta.ShardOwner{ + {NodeID: 1}, + {NodeID: 2}, + {NodeID: 3}, + }}, + pr.Points[0]) + sm.MapPoint( + &meta.ShardInfo{ID: uint64(2), Owners: []meta.ShardOwner{ + {NodeID: 1}, + {NodeID: 2}, + {NodeID: 3}, + }}, + pr.Points[1]) + sm.MapPoint( + &meta.ShardInfo{ID: uint64(2), Owners: []meta.ShardOwner{ + {NodeID: 1}, + {NodeID: 2}, + {NodeID: 3}, + }}, + pr.Points[2]) + + // Local coordinator.Node ShardWriter + // lock on the write increment since these functions get called in parallel + var mu sync.Mutex + sw := &fakeShardWriter{ + ShardWriteFn: func(shardID, nodeID uint64, points []models.Point) error { + mu.Lock() + defer mu.Unlock() + return theTest.err[int(nodeID)-1] + }, + } + + store := &fakeStore{ + WriteFn: func(shardID uint64, points []models.Point) error { + mu.Lock() + defer mu.Unlock() + return theTest.err[0] + }, + } + + ms := NewPointsWriterMetaClient() + ms.DatabaseFn = func(database string) *meta.DatabaseInfo { + return nil + } + ms.NodeIDFn = func() uint64 { return 1 } + + subPoints := make(chan *coordinator.WritePointsRequest, 1) + sub := Subscriber{} + sub.PointsFn = func() chan<- *coordinator.WritePointsRequest { + return subPoints + } + + c := coordinator.NewPointsWriter() + c.MetaClient = ms + c.ShardWriter = sw + c.TSDBStore = store + c.Subscriber = sub + c.Node = &influxdb.Node{ID: 1} + + c.Open() + defer c.Close() + + err := c.WritePoints(pr.Database, pr.RetentionPolicy, models.ConsistencyLevelOne, pr.Points) + if err == nil && test.expErr != nil { + t.Errorf("PointsWriter.WritePoints(): '%s' error: got %v, exp %v", test.name, err, test.expErr) + } + + if err != nil && test.expErr == nil { + t.Errorf("PointsWriter.WritePoints(): '%s' error: got %v, exp %v", test.name, err, test.expErr) + } + if err != nil && test.expErr != nil && err.Error() != test.expErr.Error() { + t.Errorf("PointsWriter.WritePoints(): '%s' error: got %v, exp %v", test.name, err, test.expErr) + } + if test.expErr == nil { + select { + case p := <-subPoints: + if !reflect.DeepEqual(p, pr) { + t.Errorf("PointsWriter.WritePoints(): '%s' error: unexpected WritePointsRequest got %v, exp %v", test.name, p, pr) + } + default: + t.Errorf("PointsWriter.WritePoints(): '%s' error: Subscriber.Points not called", test.name) + } + } + } +} + +type fakePointsWriter struct { + WritePointsIntoFn func(*coordinator.IntoWriteRequest) error +} + +func (f *fakePointsWriter) WritePointsInto(req *coordinator.IntoWriteRequest) error { + return f.WritePointsIntoFn(req) +} + +func TestBufferedPointsWriter(t *testing.T) { + db := "db0" + rp := "rp0" + capacity := 10000 + + writePointsIntoCnt := 0 + pointsWritten := []models.Point{} + + reset := func() { + writePointsIntoCnt = 0 + pointsWritten = pointsWritten[:0] + } + + fakeWriter := &fakePointsWriter{ + WritePointsIntoFn: func(req *coordinator.IntoWriteRequest) error { + writePointsIntoCnt++ + pointsWritten = append(pointsWritten, req.Points...) + return nil + }, + } + + w := coordinator.NewBufferedPointsWriter(fakeWriter, db, rp, capacity) + + // Test that capacity and length are correct for new buffered writer. + if w.Cap() != capacity { + t.Fatalf("exp %d, got %d", capacity, w.Cap()) + } else if w.Len() != 0 { + t.Fatalf("exp %d, got %d", 0, w.Len()) + } + + // Test flushing an empty buffer. + if err := w.Flush(); err != nil { + t.Fatal(err) + } else if writePointsIntoCnt > 0 { + t.Fatalf("exp 0, got %d", writePointsIntoCnt) + } + + // Test writing zero points. + if err := w.WritePointsInto(&coordinator.IntoWriteRequest{ + Database: db, + RetentionPolicy: rp, + Points: []models.Point{}, + }); err != nil { + t.Fatal(err) + } else if writePointsIntoCnt > 0 { + t.Fatalf("exp 0, got %d", writePointsIntoCnt) + } else if w.Len() > 0 { + t.Fatalf("exp 0, got %d", w.Len()) + } + + // Test writing single large bunch of points points. + req := coordinator.WritePointsRequest{ + Database: db, + RetentionPolicy: rp, + } + + numPoints := int(float64(capacity) * 5.5) + for i := 0; i < numPoints; i++ { + req.AddPoint("cpu", float64(i), time.Unix(0, 0).Add(time.Duration(i)*time.Second), nil) + } + + r := coordinator.IntoWriteRequest(req) + if err := w.WritePointsInto(&r); err != nil { + t.Fatal(err) + } else if writePointsIntoCnt != 5 { + t.Fatalf("exp 5, got %d", writePointsIntoCnt) + } else if w.Len() != capacity/2 { + t.Fatalf("exp %d, got %d", capacity/2, w.Len()) + } else if len(pointsWritten) != numPoints-capacity/2 { + t.Fatalf("exp %d, got %d", numPoints-capacity/2, len(pointsWritten)) + } + + if err := w.Flush(); err != nil { + t.Fatal(err) + } else if writePointsIntoCnt != 6 { + t.Fatalf("exp 6, got %d", writePointsIntoCnt) + } else if w.Len() != 0 { + t.Fatalf("exp 0, got %d", w.Len()) + } else if len(pointsWritten) != numPoints { + t.Fatalf("exp %d, got %d", numPoints, len(pointsWritten)) + } else if !reflect.DeepEqual(r.Points, pointsWritten) { + t.Fatal("points don't match") + } + + reset() + + // Test writing points one at a time. + for i, _ := range r.Points { + if err := w.WritePointsInto(&coordinator.IntoWriteRequest{ + Database: db, + RetentionPolicy: rp, + Points: r.Points[i : i+1], + }); err != nil { + t.Fatal(err) + } + } + + if err := w.Flush(); err != nil { + t.Fatal(err) + } else if writePointsIntoCnt != 6 { + t.Fatalf("exp 6, got %d", writePointsIntoCnt) + } else if w.Len() != 0 { + t.Fatalf("exp 0, got %d", w.Len()) + } else if len(pointsWritten) != numPoints { + t.Fatalf("exp %d, got %d", numPoints, len(pointsWritten)) + } else if !reflect.DeepEqual(r.Points, pointsWritten) { + t.Fatal("points don't match") + } +} + +var shardID uint64 + +type fakeShardWriter struct { + ShardWriteFn func(shardID, nodeID uint64, points []models.Point) error +} + +func (f *fakeShardWriter) WriteShard(shardID, nodeID uint64, points []models.Point) error { + return f.ShardWriteFn(shardID, nodeID, points) +} + +type fakeStore struct { + WriteFn func(shardID uint64, points []models.Point) error + CreateShardfn func(database, retentionPolicy string, shardID uint64, enabled bool) error +} + +func (f *fakeStore) WriteToShard(shardID uint64, points []models.Point) error { + return f.WriteFn(shardID, points) +} + +func (f *fakeStore) CreateShard(database, retentionPolicy string, shardID uint64, enabled bool) error { + return f.CreateShardfn(database, retentionPolicy, shardID, enabled) +} + +func NewPointsWriterMetaClient() *PointsWriterMetaClient { + ms := &PointsWriterMetaClient{} + rp := NewRetentionPolicy("myp", time.Hour, 3) + AttachShardGroupInfo(rp, []meta.ShardOwner{ + {NodeID: 1}, + {NodeID: 2}, + {NodeID: 3}, + }) + AttachShardGroupInfo(rp, []meta.ShardOwner{ + {NodeID: 1}, + {NodeID: 2}, + {NodeID: 3}, + }) + + ms.RetentionPolicyFn = func(db, retentionPolicy string) (*meta.RetentionPolicyInfo, error) { + return rp, nil + } + + ms.CreateShardGroupIfNotExistsFn = func(database, policy string, timestamp time.Time) (*meta.ShardGroupInfo, error) { + for i, sg := range rp.ShardGroups { + if timestamp.Equal(sg.StartTime) || timestamp.After(sg.StartTime) && timestamp.Before(sg.EndTime) { + return &rp.ShardGroups[i], nil + } + } + panic("should not get here") + } + return ms +} + +type PointsWriterMetaClient struct { + NodeIDFn func() uint64 + RetentionPolicyFn func(database, name string) (*meta.RetentionPolicyInfo, error) + CreateShardGroupIfNotExistsFn func(database, policy string, timestamp time.Time) (*meta.ShardGroupInfo, error) + DatabaseFn func(database string) *meta.DatabaseInfo + ShardOwnerFn func(shardID uint64) (string, string, *meta.ShardGroupInfo) +} + +func (m PointsWriterMetaClient) NodeID() uint64 { return m.NodeIDFn() } + +func (m PointsWriterMetaClient) RetentionPolicy(database, name string) (*meta.RetentionPolicyInfo, error) { + return m.RetentionPolicyFn(database, name) +} + +func (m PointsWriterMetaClient) CreateShardGroup(database, policy string, timestamp time.Time) (*meta.ShardGroupInfo, error) { + return m.CreateShardGroupIfNotExistsFn(database, policy, timestamp) +} + +func (m PointsWriterMetaClient) Database(database string) *meta.DatabaseInfo { + return m.DatabaseFn(database) +} + +func (m PointsWriterMetaClient) ShardOwner(shardID uint64) (string, string, *meta.ShardGroupInfo) { + return m.ShardOwnerFn(shardID) +} + +type Subscriber struct { + PointsFn func() chan<- *coordinator.WritePointsRequest +} + +func (s Subscriber) Points() chan<- *coordinator.WritePointsRequest { + return s.PointsFn() +} + +func NewRetentionPolicy(name string, duration time.Duration, nodeCount int) *meta.RetentionPolicyInfo { + shards := []meta.ShardInfo{} + owners := []meta.ShardOwner{} + for i := 1; i <= nodeCount; i++ { + owners = append(owners, meta.ShardOwner{NodeID: uint64(i)}) + } + + // each node is fully replicated with each other + shards = append(shards, meta.ShardInfo{ + ID: nextShardID(), + Owners: owners, + }) + + rp := &meta.RetentionPolicyInfo{ + Name: "myrp", + ReplicaN: nodeCount, + Duration: duration, + ShardGroupDuration: duration, + ShardGroups: []meta.ShardGroupInfo{ + meta.ShardGroupInfo{ + ID: nextShardID(), + StartTime: time.Unix(0, 0), + EndTime: time.Unix(0, 0).Add(duration).Add(-1), + Shards: shards, + }, + }, + } + return rp +} + +func AttachShardGroupInfo(rp *meta.RetentionPolicyInfo, owners []meta.ShardOwner) { + var startTime, endTime time.Time + if len(rp.ShardGroups) == 0 { + startTime = time.Unix(0, 0) + } else { + startTime = rp.ShardGroups[len(rp.ShardGroups)-1].StartTime.Add(rp.ShardGroupDuration) + } + endTime = startTime.Add(rp.ShardGroupDuration).Add(-1) + + sh := meta.ShardGroupInfo{ + ID: uint64(len(rp.ShardGroups) + 1), + StartTime: startTime, + EndTime: endTime, + Shards: []meta.ShardInfo{ + meta.ShardInfo{ + ID: nextShardID(), + Owners: owners, + }, + }, + } + rp.ShardGroups = append(rp.ShardGroups, sh) +} + +func nextShardID() uint64 { + return atomic.AddUint64(&shardID, 1) +} diff --git a/vendor/github.com/influxdata/influxdb/coordinator/statement_executor.go b/vendor/github.com/influxdata/influxdb/coordinator/statement_executor.go new file mode 100644 index 000000000..e00aaa21d --- /dev/null +++ b/vendor/github.com/influxdata/influxdb/coordinator/statement_executor.go @@ -0,0 +1,1256 @@ +package coordinator + +import ( + "bytes" + "errors" + "fmt" + "io" + "sort" + "strconv" + "strings" + "time" + + "github.com/influxdata/influxdb" + "github.com/influxdata/influxdb/influxql" + "github.com/influxdata/influxdb/models" + "github.com/influxdata/influxdb/monitor" + "github.com/influxdata/influxdb/services/meta" + "github.com/influxdata/influxdb/tsdb" +) + +type pointsWriter interface { + WritePointsInto(*IntoWriteRequest) error +} + +// StatementExecutor executes a statement in the query. +type StatementExecutor struct { + MetaClient MetaClient + + // TSDB storage for local node. + TSDBStore TSDBStore + + // Holds monitoring data for SHOW STATS and SHOW DIAGNOSTICS. + Monitor *monitor.Monitor + + // Used for rewriting points back into system for SELECT INTO statements. + PointsWriter pointsWriter + + // Select statement limits + MaxSelectPointN int + MaxSelectSeriesN int + MaxSelectBucketsN int +} + +func (e *StatementExecutor) ExecuteStatement(stmt influxql.Statement, ctx *influxql.ExecutionContext) error { + // Select statements are handled separately so that they can be streamed. + if stmt, ok := stmt.(*influxql.SelectStatement); ok { + return e.executeSelectStatement(stmt, ctx) + } + + var rows models.Rows + var messages []*influxql.Message + var err error + switch stmt := stmt.(type) { + case *influxql.AlterRetentionPolicyStatement: + if ctx.ReadOnly { + messages = append(messages, influxql.ReadOnlyWarning(stmt.String())) + } + err = e.executeAlterRetentionPolicyStatement(stmt) + case *influxql.CreateContinuousQueryStatement: + if ctx.ReadOnly { + messages = append(messages, influxql.ReadOnlyWarning(stmt.String())) + } + err = e.executeCreateContinuousQueryStatement(stmt) + case *influxql.CreateDatabaseStatement: + if ctx.ReadOnly { + messages = append(messages, influxql.ReadOnlyWarning(stmt.String())) + } + if stmt.IfNotExists { + ctx.Log.Println("WARNING: IF NOT EXISTS is deprecated as of v0.13.0 and will be removed in a future release") + messages = append(messages, &influxql.Message{ + Level: influxql.WarningLevel, + Text: "IF NOT EXISTS is deprecated as of v0.13.0 and will be removed in a future release", + }) + } + err = e.executeCreateDatabaseStatement(stmt) + case *influxql.CreateRetentionPolicyStatement: + if ctx.ReadOnly { + messages = append(messages, influxql.ReadOnlyWarning(stmt.String())) + } + err = e.executeCreateRetentionPolicyStatement(stmt) + case *influxql.CreateSubscriptionStatement: + if ctx.ReadOnly { + messages = append(messages, influxql.ReadOnlyWarning(stmt.String())) + } + err = e.executeCreateSubscriptionStatement(stmt) + case *influxql.CreateUserStatement: + if ctx.ReadOnly { + messages = append(messages, influxql.ReadOnlyWarning(stmt.String())) + } + err = e.executeCreateUserStatement(stmt) + case *influxql.DeleteSeriesStatement: + err = e.executeDeleteSeriesStatement(stmt, ctx.Database) + case *influxql.DropContinuousQueryStatement: + if ctx.ReadOnly { + messages = append(messages, influxql.ReadOnlyWarning(stmt.String())) + } + err = e.executeDropContinuousQueryStatement(stmt) + case *influxql.DropDatabaseStatement: + if ctx.ReadOnly { + messages = append(messages, influxql.ReadOnlyWarning(stmt.String())) + } + if stmt.IfExists { + ctx.Log.Println("WARNING: IF EXISTS is deprecated as of v0.13.0 and will be removed in a future release") + messages = append(messages, &influxql.Message{ + Level: influxql.WarningLevel, + Text: "IF EXISTS is deprecated as of v0.13.0 and will be removed in a future release", + }) + } + err = e.executeDropDatabaseStatement(stmt) + case *influxql.DropMeasurementStatement: + if ctx.ReadOnly { + messages = append(messages, influxql.ReadOnlyWarning(stmt.String())) + } + err = e.executeDropMeasurementStatement(stmt, ctx.Database) + case *influxql.DropSeriesStatement: + if ctx.ReadOnly { + messages = append(messages, influxql.ReadOnlyWarning(stmt.String())) + } + err = e.executeDropSeriesStatement(stmt, ctx.Database) + case *influxql.DropRetentionPolicyStatement: + if ctx.ReadOnly { + messages = append(messages, influxql.ReadOnlyWarning(stmt.String())) + } + err = e.executeDropRetentionPolicyStatement(stmt) + case *influxql.DropShardStatement: + if ctx.ReadOnly { + messages = append(messages, influxql.ReadOnlyWarning(stmt.String())) + } + err = e.executeDropShardStatement(stmt) + case *influxql.DropSubscriptionStatement: + if ctx.ReadOnly { + messages = append(messages, influxql.ReadOnlyWarning(stmt.String())) + } + err = e.executeDropSubscriptionStatement(stmt) + case *influxql.DropUserStatement: + if ctx.ReadOnly { + messages = append(messages, influxql.ReadOnlyWarning(stmt.String())) + } + err = e.executeDropUserStatement(stmt) + case *influxql.GrantStatement: + if ctx.ReadOnly { + messages = append(messages, influxql.ReadOnlyWarning(stmt.String())) + } + err = e.executeGrantStatement(stmt) + case *influxql.GrantAdminStatement: + if ctx.ReadOnly { + messages = append(messages, influxql.ReadOnlyWarning(stmt.String())) + } + err = e.executeGrantAdminStatement(stmt) + case *influxql.RevokeStatement: + if ctx.ReadOnly { + messages = append(messages, influxql.ReadOnlyWarning(stmt.String())) + } + err = e.executeRevokeStatement(stmt) + case *influxql.RevokeAdminStatement: + if ctx.ReadOnly { + messages = append(messages, influxql.ReadOnlyWarning(stmt.String())) + } + err = e.executeRevokeAdminStatement(stmt) + case *influxql.ShowContinuousQueriesStatement: + rows, err = e.executeShowContinuousQueriesStatement(stmt) + case *influxql.ShowDatabasesStatement: + rows, err = e.executeShowDatabasesStatement(stmt) + case *influxql.ShowDiagnosticsStatement: + rows, err = e.executeShowDiagnosticsStatement(stmt) + case *influxql.ShowGrantsForUserStatement: + rows, err = e.executeShowGrantsForUserStatement(stmt) + case *influxql.ShowRetentionPoliciesStatement: + rows, err = e.executeShowRetentionPoliciesStatement(stmt) + case *influxql.ShowShardsStatement: + rows, err = e.executeShowShardsStatement(stmt) + case *influxql.ShowShardGroupsStatement: + rows, err = e.executeShowShardGroupsStatement(stmt) + case *influxql.ShowStatsStatement: + rows, err = e.executeShowStatsStatement(stmt) + case *influxql.ShowSubscriptionsStatement: + rows, err = e.executeShowSubscriptionsStatement(stmt) + case *influxql.ShowUsersStatement: + rows, err = e.executeShowUsersStatement(stmt) + case *influxql.SetPasswordUserStatement: + if ctx.ReadOnly { + messages = append(messages, influxql.ReadOnlyWarning(stmt.String())) + } + err = e.executeSetPasswordUserStatement(stmt) + default: + return influxql.ErrInvalidQuery + } + + if err != nil { + return err + } + + ctx.Results <- &influxql.Result{ + StatementID: ctx.StatementID, + Series: rows, + Messages: messages, + } + return nil +} + +func (e *StatementExecutor) executeAlterRetentionPolicyStatement(stmt *influxql.AlterRetentionPolicyStatement) error { + rpu := &meta.RetentionPolicyUpdate{ + Duration: stmt.Duration, + ReplicaN: stmt.Replication, + ShardGroupDuration: stmt.ShardGroupDuration, + } + + // Update the retention policy. + if err := e.MetaClient.UpdateRetentionPolicy(stmt.Database, stmt.Name, rpu); err != nil { + return err + } + + // If requested, set as default retention policy. + if stmt.Default { + if err := e.MetaClient.SetDefaultRetentionPolicy(stmt.Database, stmt.Name); err != nil { + return err + } + } + + return nil +} + +func (e *StatementExecutor) executeCreateContinuousQueryStatement(q *influxql.CreateContinuousQueryStatement) error { + // Verify that retention policies exist. + var err error + verifyRPFn := func(n influxql.Node) { + if err != nil { + return + } + switch m := n.(type) { + case *influxql.Measurement: + var rp *meta.RetentionPolicyInfo + if rp, err = e.MetaClient.RetentionPolicy(m.Database, m.RetentionPolicy); err != nil { + return + } else if rp == nil { + err = fmt.Errorf("%s: %s.%s", meta.ErrRetentionPolicyNotFound, m.Database, m.RetentionPolicy) + } + default: + return + } + } + + influxql.WalkFunc(q, verifyRPFn) + + if err != nil { + return err + } + + return e.MetaClient.CreateContinuousQuery(q.Database, q.Name, q.String()) +} + +func (e *StatementExecutor) executeCreateDatabaseStatement(stmt *influxql.CreateDatabaseStatement) error { + if !stmt.RetentionPolicyCreate { + _, err := e.MetaClient.CreateDatabase(stmt.Name) + return err + } + + rpi := meta.NewRetentionPolicyInfo(stmt.RetentionPolicyName) + rpi.Duration = stmt.RetentionPolicyDuration + rpi.ReplicaN = stmt.RetentionPolicyReplication + rpi.ShardGroupDuration = stmt.RetentionPolicyShardGroupDuration + _, err := e.MetaClient.CreateDatabaseWithRetentionPolicy(stmt.Name, rpi) + return err +} + +func (e *StatementExecutor) executeCreateRetentionPolicyStatement(stmt *influxql.CreateRetentionPolicyStatement) error { + rpi := meta.NewRetentionPolicyInfo(stmt.Name) + rpi.Duration = stmt.Duration + rpi.ReplicaN = stmt.Replication + rpi.ShardGroupDuration = stmt.ShardGroupDuration + + // Create new retention policy. + if _, err := e.MetaClient.CreateRetentionPolicy(stmt.Database, rpi); err != nil { + return err + } + + // If requested, set new policy as the default. + if stmt.Default { + if err := e.MetaClient.SetDefaultRetentionPolicy(stmt.Database, stmt.Name); err != nil { + return err + } + } + return nil +} + +func (e *StatementExecutor) executeCreateSubscriptionStatement(q *influxql.CreateSubscriptionStatement) error { + return e.MetaClient.CreateSubscription(q.Database, q.RetentionPolicy, q.Name, q.Mode, q.Destinations) +} + +func (e *StatementExecutor) executeCreateUserStatement(q *influxql.CreateUserStatement) error { + _, err := e.MetaClient.CreateUser(q.Name, q.Password, q.Admin) + return err +} + +func (e *StatementExecutor) executeDeleteSeriesStatement(stmt *influxql.DeleteSeriesStatement, database string) error { + if dbi := e.MetaClient.Database(database); dbi == nil { + return influxql.ErrDatabaseNotFound(database) + } + + // Convert "now()" to current time. + stmt.Condition = influxql.Reduce(stmt.Condition, &influxql.NowValuer{Now: time.Now().UTC()}) + + // Locally delete the series. + return e.TSDBStore.DeleteSeries(database, stmt.Sources, stmt.Condition) +} + +func (e *StatementExecutor) executeDropContinuousQueryStatement(q *influxql.DropContinuousQueryStatement) error { + return e.MetaClient.DropContinuousQuery(q.Database, q.Name) +} + +// executeDropDatabaseStatement drops a database from the cluster. +// It does not return an error if the database was not found on any of +// the nodes, or in the Meta store. +func (e *StatementExecutor) executeDropDatabaseStatement(stmt *influxql.DropDatabaseStatement) error { + // Locally delete the datababse. + if err := e.TSDBStore.DeleteDatabase(stmt.Name); err != nil { + return err + } + + // Remove the database from the Meta Store. + return e.MetaClient.DropDatabase(stmt.Name) +} + +func (e *StatementExecutor) executeDropMeasurementStatement(stmt *influxql.DropMeasurementStatement, database string) error { + if dbi := e.MetaClient.Database(database); dbi == nil { + return influxql.ErrDatabaseNotFound(database) + } + + // Locally drop the measurement + return e.TSDBStore.DeleteMeasurement(database, stmt.Name) +} + +func (e *StatementExecutor) executeDropSeriesStatement(stmt *influxql.DropSeriesStatement, database string) error { + if dbi := e.MetaClient.Database(database); dbi == nil { + return influxql.ErrDatabaseNotFound(database) + } + + // Check for time in WHERE clause (not supported). + if influxql.HasTimeExpr(stmt.Condition) { + return errors.New("DROP SERIES doesn't support time in WHERE clause") + } + + // Locally drop the series. + return e.TSDBStore.DeleteSeries(database, stmt.Sources, stmt.Condition) +} + +func (e *StatementExecutor) executeDropShardStatement(stmt *influxql.DropShardStatement) error { + // Locally delete the shard. + if err := e.TSDBStore.DeleteShard(stmt.ID); err != nil { + return err + } + + // Remove the shard reference from the Meta Store. + return e.MetaClient.DropShard(stmt.ID) +} + +func (e *StatementExecutor) executeDropRetentionPolicyStatement(stmt *influxql.DropRetentionPolicyStatement) error { + // Locally drop the retention policy. + if err := e.TSDBStore.DeleteRetentionPolicy(stmt.Database, stmt.Name); err != nil { + return err + } + + return e.MetaClient.DropRetentionPolicy(stmt.Database, stmt.Name) +} + +func (e *StatementExecutor) executeDropSubscriptionStatement(q *influxql.DropSubscriptionStatement) error { + return e.MetaClient.DropSubscription(q.Database, q.RetentionPolicy, q.Name) +} + +func (e *StatementExecutor) executeDropUserStatement(q *influxql.DropUserStatement) error { + return e.MetaClient.DropUser(q.Name) +} + +func (e *StatementExecutor) executeGrantStatement(stmt *influxql.GrantStatement) error { + return e.MetaClient.SetPrivilege(stmt.User, stmt.On, stmt.Privilege) +} + +func (e *StatementExecutor) executeGrantAdminStatement(stmt *influxql.GrantAdminStatement) error { + return e.MetaClient.SetAdminPrivilege(stmt.User, true) +} + +func (e *StatementExecutor) executeRevokeStatement(stmt *influxql.RevokeStatement) error { + priv := influxql.NoPrivileges + + // Revoking all privileges means there's no need to look at existing user privileges. + if stmt.Privilege != influxql.AllPrivileges { + p, err := e.MetaClient.UserPrivilege(stmt.User, stmt.On) + if err != nil { + return err + } + // Bit clear (AND NOT) the user's privilege with the revoked privilege. + priv = *p &^ stmt.Privilege + } + + return e.MetaClient.SetPrivilege(stmt.User, stmt.On, priv) +} + +func (e *StatementExecutor) executeRevokeAdminStatement(stmt *influxql.RevokeAdminStatement) error { + return e.MetaClient.SetAdminPrivilege(stmt.User, false) +} + +func (e *StatementExecutor) executeSetPasswordUserStatement(q *influxql.SetPasswordUserStatement) error { + return e.MetaClient.UpdateUser(q.Name, q.Password) +} + +func (e *StatementExecutor) executeSelectStatement(stmt *influxql.SelectStatement, ctx *influxql.ExecutionContext) error { + // Handle SHOW TAG VALUES separately so it can be optimized. + // https://github.com/influxdata/influxdb/issues/6233 + if source, ok := stmt.Sources[0].(*influxql.Measurement); ok && source.Name == "_tags" { + // Use the optimized version only if we have direct access to the database. + if store, ok := e.TSDBStore.(LocalTSDBStore); ok { + return e.executeShowTagValues(stmt, ctx, store) + } + } + + // It is important to "stamp" this time so that everywhere we evaluate `now()` in the statement is EXACTLY the same `now` + now := time.Now().UTC() + opt := influxql.SelectOptions{InterruptCh: ctx.InterruptCh} + + // Replace instances of "now()" with the current time, and check the resultant times. + nowValuer := influxql.NowValuer{Now: now} + stmt.Condition = influxql.Reduce(stmt.Condition, &nowValuer) + // Replace instances of "now()" with the current time in the dimensions. + for _, d := range stmt.Dimensions { + d.Expr = influxql.Reduce(d.Expr, &nowValuer) + } + + var err error + opt.MinTime, opt.MaxTime, err = influxql.TimeRange(stmt.Condition) + if err != nil { + return err + } + + if opt.MaxTime.IsZero() { + // In the case that we're executing a meta query where the user cannot + // specify a time condition, then we expand the default max time + // to the maximum possible value, to ensure that data where all points + // are in the future are returned. + if influxql.Sources(stmt.Sources).HasSystemSource() { + opt.MaxTime = time.Unix(0, influxql.MaxTime).UTC() + } else { + opt.MaxTime = now + } + } + if opt.MinTime.IsZero() { + opt.MinTime = time.Unix(0, 0) + } + + // Convert DISTINCT into a call. + stmt.RewriteDistinct() + + // Remove "time" from fields list. + stmt.RewriteTimeFields() + + // Create an iterator creator based on the shards in the cluster. + ic, err := e.iteratorCreator(stmt, &opt) + if err != nil { + return err + } + + // Expand regex sources to their actual source names. + if stmt.Sources.HasRegex() { + sources, err := ic.ExpandSources(stmt.Sources) + if err != nil { + return err + } + stmt.Sources = sources + } + + // Rewrite wildcards, if any exist. + tmp, err := stmt.RewriteFields(ic) + if err != nil { + return err + } + stmt = tmp + + if e.MaxSelectBucketsN > 0 && !stmt.IsRawQuery { + interval, err := stmt.GroupByInterval() + if err != nil { + return err + } + + if interval > 0 { + // Determine the start and end time matched to the interval (may not match the actual times). + min := opt.MinTime.Truncate(interval) + max := opt.MaxTime.Truncate(interval).Add(interval) + + // Determine the number of buckets by finding the time span and dividing by the interval. + buckets := int64(max.Sub(min)) / int64(interval) + if int(buckets) > e.MaxSelectBucketsN { + return fmt.Errorf("max select bucket count exceeded: %d buckets", buckets) + } + } + } + + // Create a set of iterators from a selection. + itrs, err := influxql.Select(stmt, ic, &opt) + if err != nil { + return err + } + + if e.MaxSelectPointN > 0 { + monitor := influxql.PointLimitMonitor(itrs, influxql.DefaultStatsInterval, e.MaxSelectPointN) + ctx.Query.Monitor(monitor) + } + + // Generate a row emitter from the iterator set. + em := influxql.NewEmitter(itrs, stmt.TimeAscending(), ctx.ChunkSize) + em.Columns = stmt.ColumnNames() + em.OmitTime = stmt.OmitTime + defer em.Close() + + // Calculate initial stats across all iterators. + stats := influxql.Iterators(itrs).Stats() + if e.MaxSelectSeriesN > 0 && stats.SeriesN > e.MaxSelectSeriesN { + return fmt.Errorf("max select series count exceeded: %d series", stats.SeriesN) + } + + // Emit rows to the results channel. + var writeN int64 + var emitted bool + + var pointsWriter *BufferedPointsWriter + if stmt.Target != nil { + pointsWriter = NewBufferedPointsWriter(e.PointsWriter, stmt.Target.Measurement.Database, stmt.Target.Measurement.RetentionPolicy, 10000) + } + + for { + row, err := em.Emit() + if err != nil { + return err + } else if row == nil { + // Check if the query was interrupted while emitting. + select { + case <-ctx.InterruptCh: + return influxql.ErrQueryInterrupted + default: + } + break + } + + // Write points back into system for INTO statements. + if stmt.Target != nil { + if err := e.writeInto(pointsWriter, stmt, row); err != nil { + return err + } + writeN += int64(len(row.Values)) + continue + } + + result := &influxql.Result{ + StatementID: ctx.StatementID, + Series: []*models.Row{row}, + } + + // Send results or exit if closing. + select { + case <-ctx.InterruptCh: + return influxql.ErrQueryInterrupted + case ctx.Results <- result: + } + + emitted = true + } + + // Flush remaing points and emit write count if an INTO statement. + if stmt.Target != nil { + if err := pointsWriter.Flush(); err != nil { + return err + } + + var messages []*influxql.Message + if ctx.ReadOnly { + messages = append(messages, influxql.ReadOnlyWarning(stmt.String())) + } + + ctx.Results <- &influxql.Result{ + StatementID: ctx.StatementID, + Messages: messages, + Series: []*models.Row{{ + Name: "result", + Columns: []string{"time", "written"}, + Values: [][]interface{}{{time.Unix(0, 0).UTC(), writeN}}, + }}, + } + return nil + } + + // Always emit at least one result. + if !emitted { + ctx.Results <- &influxql.Result{ + StatementID: ctx.StatementID, + Series: make([]*models.Row, 0), + } + } + + return nil +} + +// iteratorCreator returns a new instance of IteratorCreator based on stmt. +func (e *StatementExecutor) iteratorCreator(stmt *influxql.SelectStatement, opt *influxql.SelectOptions) (influxql.IteratorCreator, error) { + // Retrieve a list of shard IDs. + shards, err := e.MetaClient.ShardsByTimeRange(stmt.Sources, opt.MinTime, opt.MaxTime) + if err != nil { + return nil, err + } + return e.TSDBStore.IteratorCreator(shards) +} + +func (e *StatementExecutor) executeShowTagValues(stmt *influxql.SelectStatement, ctx *influxql.ExecutionContext, store LocalTSDBStore) error { + if stmt.Condition == nil { + return errors.New("a condition is required") + } + + source := stmt.Sources[0].(*influxql.Measurement) + index := store.DatabaseIndex(source.Database) + if index == nil { + ctx.Results <- &influxql.Result{StatementID: ctx.StatementID, Series: make([]*models.Row, 0)} + return nil + } + + measurementExpr := influxql.CloneExpr(stmt.Condition) + measurementExpr = influxql.Reduce(influxql.RewriteExpr(measurementExpr, func(e influxql.Expr) influxql.Expr { + switch e := e.(type) { + case *influxql.BinaryExpr: + switch e.Op { + case influxql.EQ, influxql.NEQ, influxql.EQREGEX, influxql.NEQREGEX: + tag, ok := e.LHS.(*influxql.VarRef) + if !ok || tag.Val != "_name" { + return nil + } + } + } + return e + }), nil) + + mms, ok, err := index.MeasurementsByExpr(measurementExpr) + if err != nil { + return err + } else if !ok { + mms = index.Measurements() + sort.Sort(mms) + } + + // If there are no measurements, return immediately. + if len(mms) == 0 { + ctx.Results <- &influxql.Result{StatementID: ctx.StatementID, Series: make([]*models.Row, 0)} + return nil + } + + filterExpr := influxql.CloneExpr(stmt.Condition) + filterExpr = influxql.Reduce(influxql.RewriteExpr(filterExpr, func(e influxql.Expr) influxql.Expr { + switch e := e.(type) { + case *influxql.BinaryExpr: + switch e.Op { + case influxql.EQ, influxql.NEQ, influxql.EQREGEX, influxql.NEQREGEX: + tag, ok := e.LHS.(*influxql.VarRef) + if !ok || strings.HasPrefix(tag.Val, "_") { + return nil + } + } + } + return e + }), nil) + + var emitted bool + columns := stmt.ColumnNames() + for _, mm := range mms { + ids, err := mm.SeriesIDsAllOrByExpr(filterExpr) + if err != nil { + return err + } + ss := mm.SeriesByIDSlice(ids) + + // Determine a list of keys from condition. + keySet, ok, err := mm.TagKeysByExpr(stmt.Condition) + if err != nil { + return err + } + + // Loop over all keys for each series. + m := make(map[keyValue]struct{}, len(ss)) + for _, series := range ss { + for key, value := range series.Tags { + if !ok { + // nop + } else if _, exists := keySet[key]; !exists { + continue + } + m[keyValue{key, value}] = struct{}{} + } + } + + // Move to next series if no key/values match. + if len(m) == 0 { + continue + } + + // Sort key/value set. + a := make([]keyValue, 0, len(m)) + for kv := range m { + a = append(a, kv) + } + sort.Sort(keyValues(a)) + + // Convert to result values. + slab := make([]interface{}, len(a)*2) + values := make([][]interface{}, len(a)) + for i, elem := range a { + slab[i*2], slab[i*2+1] = elem.key, elem.value + values[i] = slab[i*2 : i*2+2] + } + + // Send result to client. + ctx.Results <- &influxql.Result{ + StatementID: ctx.StatementID, + Series: []*models.Row{&models.Row{ + Name: mm.Name, + Columns: columns, + Values: values, + }}, + } + emitted = true + } + + // Always emit at least one row. + if !emitted { + ctx.Results <- &influxql.Result{StatementID: ctx.StatementID, Series: make([]*models.Row, 0)} + } + + return nil +} + +func (e *StatementExecutor) executeShowContinuousQueriesStatement(stmt *influxql.ShowContinuousQueriesStatement) (models.Rows, error) { + dis := e.MetaClient.Databases() + + rows := []*models.Row{} + for _, di := range dis { + row := &models.Row{Columns: []string{"name", "query"}, Name: di.Name} + for _, cqi := range di.ContinuousQueries { + row.Values = append(row.Values, []interface{}{cqi.Name, cqi.Query}) + } + rows = append(rows, row) + } + return rows, nil +} + +func (e *StatementExecutor) executeShowDatabasesStatement(q *influxql.ShowDatabasesStatement) (models.Rows, error) { + dis := e.MetaClient.Databases() + + row := &models.Row{Name: "databases", Columns: []string{"name"}} + for _, di := range dis { + row.Values = append(row.Values, []interface{}{di.Name}) + } + return []*models.Row{row}, nil +} + +func (e *StatementExecutor) executeShowDiagnosticsStatement(stmt *influxql.ShowDiagnosticsStatement) (models.Rows, error) { + diags, err := e.Monitor.Diagnostics() + if err != nil { + return nil, err + } + + // Get a sorted list of diagnostics keys. + sortedKeys := make([]string, 0, len(diags)) + for k := range diags { + sortedKeys = append(sortedKeys, k) + } + sort.Strings(sortedKeys) + + rows := make([]*models.Row, 0, len(diags)) + for _, k := range sortedKeys { + if stmt.Module != "" && k != stmt.Module { + continue + } + + row := &models.Row{Name: k} + + row.Columns = diags[k].Columns + row.Values = diags[k].Rows + rows = append(rows, row) + } + return rows, nil +} + +func (e *StatementExecutor) executeShowGrantsForUserStatement(q *influxql.ShowGrantsForUserStatement) (models.Rows, error) { + priv, err := e.MetaClient.UserPrivileges(q.Name) + if err != nil { + return nil, err + } + + row := &models.Row{Columns: []string{"database", "privilege"}} + for d, p := range priv { + row.Values = append(row.Values, []interface{}{d, p.String()}) + } + return []*models.Row{row}, nil +} + +func (e *StatementExecutor) executeShowRetentionPoliciesStatement(q *influxql.ShowRetentionPoliciesStatement) (models.Rows, error) { + di := e.MetaClient.Database(q.Database) + if di == nil { + return nil, influxdb.ErrDatabaseNotFound(q.Database) + } + + row := &models.Row{Columns: []string{"name", "duration", "shardGroupDuration", "replicaN", "default"}} + for _, rpi := range di.RetentionPolicies { + row.Values = append(row.Values, []interface{}{rpi.Name, rpi.Duration.String(), rpi.ShardGroupDuration.String(), rpi.ReplicaN, di.DefaultRetentionPolicy == rpi.Name}) + } + return []*models.Row{row}, nil +} + +func (e *StatementExecutor) executeShowShardsStatement(stmt *influxql.ShowShardsStatement) (models.Rows, error) { + dis := e.MetaClient.Databases() + + rows := []*models.Row{} + for _, di := range dis { + row := &models.Row{Columns: []string{"id", "database", "retention_policy", "shard_group", "start_time", "end_time", "expiry_time", "owners"}, Name: di.Name} + for _, rpi := range di.RetentionPolicies { + for _, sgi := range rpi.ShardGroups { + // Shards associated with deleted shard groups are effectively deleted. + // Don't list them. + if sgi.Deleted() { + continue + } + + for _, si := range sgi.Shards { + ownerIDs := make([]uint64, len(si.Owners)) + for i, owner := range si.Owners { + ownerIDs[i] = owner.NodeID + } + + row.Values = append(row.Values, []interface{}{ + si.ID, + di.Name, + rpi.Name, + sgi.ID, + sgi.StartTime.UTC().Format(time.RFC3339), + sgi.EndTime.UTC().Format(time.RFC3339), + sgi.EndTime.Add(rpi.Duration).UTC().Format(time.RFC3339), + joinUint64(ownerIDs), + }) + } + } + } + rows = append(rows, row) + } + return rows, nil +} + +func (e *StatementExecutor) executeShowShardGroupsStatement(stmt *influxql.ShowShardGroupsStatement) (models.Rows, error) { + dis := e.MetaClient.Databases() + + row := &models.Row{Columns: []string{"id", "database", "retention_policy", "start_time", "end_time", "expiry_time"}, Name: "shard groups"} + for _, di := range dis { + for _, rpi := range di.RetentionPolicies { + for _, sgi := range rpi.ShardGroups { + // Shards associated with deleted shard groups are effectively deleted. + // Don't list them. + if sgi.Deleted() { + continue + } + + row.Values = append(row.Values, []interface{}{ + sgi.ID, + di.Name, + rpi.Name, + sgi.StartTime.UTC().Format(time.RFC3339), + sgi.EndTime.UTC().Format(time.RFC3339), + sgi.EndTime.Add(rpi.Duration).UTC().Format(time.RFC3339), + }) + } + } + } + + return []*models.Row{row}, nil +} + +func (e *StatementExecutor) executeShowStatsStatement(stmt *influxql.ShowStatsStatement) (models.Rows, error) { + stats, err := e.Monitor.Statistics(nil) + if err != nil { + return nil, err + } + + var rows []*models.Row + for _, stat := range stats { + if stmt.Module != "" && stat.Name != stmt.Module { + continue + } + row := &models.Row{Name: stat.Name, Tags: stat.Tags} + + values := make([]interface{}, 0, len(stat.Values)) + for _, k := range stat.ValueNames() { + row.Columns = append(row.Columns, k) + values = append(values, stat.Values[k]) + } + row.Values = [][]interface{}{values} + rows = append(rows, row) + } + return rows, nil +} + +func (e *StatementExecutor) executeShowSubscriptionsStatement(stmt *influxql.ShowSubscriptionsStatement) (models.Rows, error) { + dis := e.MetaClient.Databases() + + rows := []*models.Row{} + for _, di := range dis { + row := &models.Row{Columns: []string{"retention_policy", "name", "mode", "destinations"}, Name: di.Name} + for _, rpi := range di.RetentionPolicies { + for _, si := range rpi.Subscriptions { + row.Values = append(row.Values, []interface{}{rpi.Name, si.Name, si.Mode, si.Destinations}) + } + } + if len(row.Values) > 0 { + rows = append(rows, row) + } + } + return rows, nil +} + +func (e *StatementExecutor) executeShowUsersStatement(q *influxql.ShowUsersStatement) (models.Rows, error) { + row := &models.Row{Columns: []string{"user", "admin"}} + for _, ui := range e.MetaClient.Users() { + row.Values = append(row.Values, []interface{}{ui.Name, ui.Admin}) + } + return []*models.Row{row}, nil +} + +type BufferedPointsWriter struct { + w pointsWriter + buf []models.Point + database string + retentionPolicy string +} + +func NewBufferedPointsWriter(w pointsWriter, database, retentionPolicy string, capacity int) *BufferedPointsWriter { + return &BufferedPointsWriter{ + w: w, + buf: make([]models.Point, 0, capacity), + database: database, + retentionPolicy: retentionPolicy, + } +} + +func (w *BufferedPointsWriter) WritePointsInto(req *IntoWriteRequest) error { + // Make sure we're buffering points only for the expected destination. + if req.Database != w.database || req.RetentionPolicy != w.retentionPolicy { + return fmt.Errorf("writer for %s.%s can't write into %s.%s", w.database, w.retentionPolicy, req.Database, req.RetentionPolicy) + } + + for i := 0; i < len(req.Points); { + // Get the available space in the buffer. + avail := cap(w.buf) - len(w.buf) + + // Calculate number of points to copy into the buffer. + n := len(req.Points[i:]) + if n > avail { + n = avail + } + + // Copy points into buffer. + w.buf = append(w.buf, req.Points[i:n+i]...) + + // Advance the index by number of points copied. + i += n + + // If buffer is full, flush points to underlying writer. + if len(w.buf) == cap(w.buf) { + if err := w.Flush(); err != nil { + return err + } + } + } + + return nil +} + +// Flush writes all buffered points to the underlying writer. +func (w *BufferedPointsWriter) Flush() error { + if len(w.buf) == 0 { + return nil + } + + if err := w.w.WritePointsInto(&IntoWriteRequest{ + Database: w.database, + RetentionPolicy: w.retentionPolicy, + Points: w.buf, + }); err != nil { + return err + } + + // Clear the buffer. + w.buf = w.buf[:0] + + return nil +} + +// Len returns the number of points buffered. +func (w *BufferedPointsWriter) Len() int { return len(w.buf) } + +// Cap returns the capacity (in points) of the buffer. +func (w *BufferedPointsWriter) Cap() int { return cap(w.buf) } + +func (e *StatementExecutor) writeInto(w pointsWriter, stmt *influxql.SelectStatement, row *models.Row) error { + if stmt.Target.Measurement.Database == "" { + return errNoDatabaseInTarget + } + + // It might seem a bit weird that this is where we do this, since we will have to + // convert rows back to points. The Executors (both aggregate and raw) are complex + // enough that changing them to write back to the DB is going to be clumsy + // + // it might seem weird to have the write be in the QueryExecutor, but the interweaving of + // limitedRowWriter and ExecuteAggregate/Raw makes it ridiculously hard to make sure that the + // results will be the same as when queried normally. + name := stmt.Target.Measurement.Name + if name == "" { + name = row.Name + } + + points, err := convertRowToPoints(name, row) + if err != nil { + return err + } + + if err := w.WritePointsInto(&IntoWriteRequest{ + Database: stmt.Target.Measurement.Database, + RetentionPolicy: stmt.Target.Measurement.RetentionPolicy, + Points: points, + }); err != nil { + return err + } + + return nil +} + +var errNoDatabaseInTarget = errors.New("no database in target") + +// convertRowToPoints will convert a query result Row into Points that can be written back in. +func convertRowToPoints(measurementName string, row *models.Row) ([]models.Point, error) { + // figure out which parts of the result are the time and which are the fields + timeIndex := -1 + fieldIndexes := make(map[string]int) + for i, c := range row.Columns { + if c == "time" { + timeIndex = i + } else { + fieldIndexes[c] = i + } + } + + if timeIndex == -1 { + return nil, errors.New("error finding time index in result") + } + + points := make([]models.Point, 0, len(row.Values)) + for _, v := range row.Values { + vals := make(map[string]interface{}) + for fieldName, fieldIndex := range fieldIndexes { + val := v[fieldIndex] + if val != nil { + vals[fieldName] = v[fieldIndex] + } + } + + p, err := models.NewPoint(measurementName, row.Tags, vals, v[timeIndex].(time.Time)) + if err != nil { + // Drop points that can't be stored + continue + } + + points = append(points, p) + } + + return points, nil +} + +// NormalizeStatement adds a default database and policy to the measurements in statement. +func (e *StatementExecutor) NormalizeStatement(stmt influxql.Statement, defaultDatabase string) (err error) { + influxql.WalkFunc(stmt, func(node influxql.Node) { + if err != nil { + return + } + switch node := node.(type) { + case *influxql.Measurement: + err = e.normalizeMeasurement(node, defaultDatabase) + } + }) + return +} + +func (e *StatementExecutor) normalizeMeasurement(m *influxql.Measurement, defaultDatabase string) error { + // Targets (measurements in an INTO clause) can have blank names, which means it will be + // the same as the measurement name it came from in the FROM clause. + if !m.IsTarget && m.Name == "" && m.Regex == nil { + return errors.New("invalid measurement") + } + + // Measurement does not have an explicit database? Insert default. + if m.Database == "" { + m.Database = defaultDatabase + } + + // The database must now be specified by this point. + if m.Database == "" { + return errors.New("database name required") + } + + // Find database. + di := e.MetaClient.Database(m.Database) + if di == nil { + return influxdb.ErrDatabaseNotFound(m.Database) + } + + // If no retention policy was specified, use the default. + if m.RetentionPolicy == "" { + if di.DefaultRetentionPolicy == "" { + return fmt.Errorf("default retention policy not set for: %s", di.Name) + } + m.RetentionPolicy = di.DefaultRetentionPolicy + } + + return nil +} + +// IntoWriteRequest is a partial copy of cluster.WriteRequest +type IntoWriteRequest struct { + Database string + RetentionPolicy string + Points []models.Point +} + +// TSDBStore is an interface for accessing the time series data store. +type TSDBStore interface { + CreateShard(database, policy string, shardID uint64, enabled bool) error + WriteToShard(shardID uint64, points []models.Point) error + + RestoreShard(id uint64, r io.Reader) error + BackupShard(id uint64, since time.Time, w io.Writer) error + + DeleteDatabase(name string) error + DeleteMeasurement(database, name string) error + DeleteRetentionPolicy(database, name string) error + DeleteSeries(database string, sources []influxql.Source, condition influxql.Expr) error + DeleteShard(id uint64) error + IteratorCreator(shards []meta.ShardInfo) (influxql.IteratorCreator, error) +} + +type LocalTSDBStore struct { + *tsdb.Store +} + +func (s LocalTSDBStore) IteratorCreator(shards []meta.ShardInfo) (influxql.IteratorCreator, error) { + shardIDs := make([]uint64, len(shards)) + for i, sh := range shards { + shardIDs[i] = sh.ID + } + return s.Store.IteratorCreator(shardIDs) +} + +// ShardIteratorCreator is an interface for creating an IteratorCreator to access a specific shard. +type ShardIteratorCreator interface { + ShardIteratorCreator(id uint64) influxql.IteratorCreator +} + +// joinUint64 returns a comma-delimited string of uint64 numbers. +func joinUint64(a []uint64) string { + var buf bytes.Buffer + for i, x := range a { + buf.WriteString(strconv.FormatUint(x, 10)) + if i < len(a)-1 { + buf.WriteRune(',') + } + } + return buf.String() +} + +// stringSet represents a set of strings. +type stringSet map[string]struct{} + +// newStringSet returns an empty stringSet. +func newStringSet() stringSet { + return make(map[string]struct{}) +} + +// add adds strings to the set. +func (s stringSet) add(ss ...string) { + for _, n := range ss { + s[n] = struct{}{} + } +} + +// contains returns whether the set contains the given string. +func (s stringSet) contains(ss string) bool { + _, ok := s[ss] + return ok +} + +// list returns the current elements in the set, in sorted order. +func (s stringSet) list() []string { + l := make([]string, 0, len(s)) + for k := range s { + l = append(l, k) + } + sort.Strings(l) + return l +} + +// union returns the union of this set and another. +func (s stringSet) union(o stringSet) stringSet { + ns := newStringSet() + for k := range s { + ns[k] = struct{}{} + } + for k := range o { + ns[k] = struct{}{} + } + return ns +} + +// intersect returns the intersection of this set and another. +func (s stringSet) intersect(o stringSet) stringSet { + shorter, longer := s, o + if len(longer) < len(shorter) { + shorter, longer = longer, shorter + } + + ns := newStringSet() + for k := range shorter { + if _, ok := longer[k]; ok { + ns[k] = struct{}{} + } + } + return ns +} + +type uint64Slice []uint64 + +func (a uint64Slice) Len() int { return len(a) } +func (a uint64Slice) Swap(i, j int) { a[i], a[j] = a[j], a[i] } +func (a uint64Slice) Less(i, j int) bool { return a[i] < a[j] } + +type keyValue struct { + key, value string +} + +type keyValues []keyValue + +func (a keyValues) Len() int { return len(a) } +func (a keyValues) Swap(i, j int) { a[i], a[j] = a[j], a[i] } +func (a keyValues) Less(i, j int) bool { + ki, kj := a[i].key, a[j].key + if ki == kj { + return a[i].value < a[j].value + } + return ki < kj +} diff --git a/vendor/github.com/influxdata/influxdb/coordinator/statement_executor_test.go b/vendor/github.com/influxdata/influxdb/coordinator/statement_executor_test.go new file mode 100644 index 000000000..a672c62cb --- /dev/null +++ b/vendor/github.com/influxdata/influxdb/coordinator/statement_executor_test.go @@ -0,0 +1,334 @@ +package coordinator_test + +import ( + "bytes" + "errors" + "io" + "log" + "os" + "reflect" + "testing" + "time" + + "github.com/davecgh/go-spew/spew" + "github.com/influxdata/influxdb/coordinator" + "github.com/influxdata/influxdb/influxql" + "github.com/influxdata/influxdb/models" + "github.com/influxdata/influxdb/services/meta" + "github.com/influxdata/influxdb/tsdb" +) + +const ( + // DefaultDatabase is the default database name used in tests. + DefaultDatabase = "db0" + + // DefaultRetentionPolicy is the default retention policy name used in tests. + DefaultRetentionPolicy = "rp0" +) + +// Ensure query executor can execute a simple SELECT statement. +func TestQueryExecutor_ExecuteQuery_SelectStatement(t *testing.T) { + e := DefaultQueryExecutor() + + // The meta client should return a single shard owned by the local node. + e.MetaClient.ShardsByTimeRangeFn = func(sources influxql.Sources, tmin, tmax time.Time) (a []meta.ShardInfo, err error) { + return []meta.ShardInfo{{ID: 100, Owners: []meta.ShardOwner{{NodeID: 0}}}}, nil + } + + // The TSDB store should return an IteratorCreator for shard. + // This IteratorCreator returns a single iterator with "value" in the aux fields. + e.TSDBStore.ShardIteratorCreatorFn = func(id uint64) influxql.IteratorCreator { + if id != 100 { + t.Fatalf("unexpected shard id: %d", id) + } + + var ic IteratorCreator + ic.CreateIteratorFn = func(opt influxql.IteratorOptions) (influxql.Iterator, error) { + return &FloatIterator{Points: []influxql.FloatPoint{ + {Name: "cpu", Time: int64(0 * time.Second), Aux: []interface{}{float64(100)}}, + {Name: "cpu", Time: int64(1 * time.Second), Aux: []interface{}{float64(200)}}, + }}, nil + } + ic.FieldDimensionsFn = func(sources influxql.Sources) (fields map[string]influxql.DataType, dimensions map[string]struct{}, err error) { + return map[string]influxql.DataType{"value": influxql.Float}, nil, nil + } + return &ic + } + + // Verify all results from the query. + if a := ReadAllResults(e.ExecuteQuery(`SELECT * FROM cpu`, "db0", 0)); !reflect.DeepEqual(a, []*influxql.Result{ + { + StatementID: 0, + Series: []*models.Row{{ + Name: "cpu", + Columns: []string{"time", "value"}, + Values: [][]interface{}{ + {time.Unix(0, 0).UTC(), float64(100)}, + {time.Unix(1, 0).UTC(), float64(200)}, + }, + }}, + }, + }) { + t.Fatalf("unexpected results: %s", spew.Sdump(a)) + } +} + +// Ensure query executor can enforce a maximum series selection count. +func TestQueryExecutor_ExecuteQuery_MaxSelectSeriesN(t *testing.T) { + e := DefaultQueryExecutor() + e.StatementExecutor.MaxSelectSeriesN = 3 + + // The meta client should return a two shards on the local node. + e.MetaClient.ShardsByTimeRangeFn = func(sources influxql.Sources, tmin, tmax time.Time) (a []meta.ShardInfo, err error) { + return []meta.ShardInfo{ + {ID: 100, Owners: []meta.ShardOwner{{NodeID: 0}}}, + {ID: 101, Owners: []meta.ShardOwner{{NodeID: 0}}}, + }, nil + } + + // This iterator creator returns an iterator that operates on 2 series. + // Reuse this iterator for both shards. This brings the total series count to 4. + var ic IteratorCreator + ic.CreateIteratorFn = func(opt influxql.IteratorOptions) (influxql.Iterator, error) { + return &FloatIterator{ + Points: []influxql.FloatPoint{{Name: "cpu", Time: int64(0 * time.Second), Aux: []interface{}{float64(100)}}}, + stats: influxql.IteratorStats{SeriesN: 2}, + }, nil + } + ic.FieldDimensionsFn = func(sources influxql.Sources) (fields map[string]influxql.DataType, dimensions map[string]struct{}, err error) { + return map[string]influxql.DataType{"value": influxql.Float}, nil, nil + } + e.TSDBStore.ShardIteratorCreatorFn = func(id uint64) influxql.IteratorCreator { return &ic } + + // Verify all results from the query. + if a := ReadAllResults(e.ExecuteQuery(`SELECT count(value) FROM cpu`, "db0", 0)); !reflect.DeepEqual(a, []*influxql.Result{ + { + StatementID: 0, + Err: errors.New("max select series count exceeded: 4 series"), + }, + }) { + t.Fatalf("unexpected results: %s", spew.Sdump(a)) + } +} + +// Ensure query executor can enforce a maximum bucket selection count. +func TestQueryExecutor_ExecuteQuery_MaxSelectBucketsN(t *testing.T) { + e := DefaultQueryExecutor() + e.StatementExecutor.MaxSelectBucketsN = 3 + + // The meta client should return a single shards on the local node. + e.MetaClient.ShardsByTimeRangeFn = func(sources influxql.Sources, tmin, tmax time.Time) (a []meta.ShardInfo, err error) { + return []meta.ShardInfo{ + {ID: 100, Owners: []meta.ShardOwner{{NodeID: 0}}}, + }, nil + } + + var ic IteratorCreator + ic.CreateIteratorFn = func(opt influxql.IteratorOptions) (influxql.Iterator, error) { + return &FloatIterator{ + Points: []influxql.FloatPoint{{Name: "cpu", Time: int64(0 * time.Second), Aux: []interface{}{float64(100)}}}, + }, nil + } + ic.FieldDimensionsFn = func(sources influxql.Sources) (fields map[string]influxql.DataType, dimensions map[string]struct{}, err error) { + return map[string]influxql.DataType{"value": influxql.Float}, nil, nil + } + e.TSDBStore.ShardIteratorCreatorFn = func(id uint64) influxql.IteratorCreator { return &ic } + + // Verify all results from the query. + if a := ReadAllResults(e.ExecuteQuery(`SELECT count(value) FROM cpu WHERE time >= '2000-01-01T00:00:05Z' AND time < '2000-01-01T00:00:35Z' GROUP BY time(10s)`, "db0", 0)); !reflect.DeepEqual(a, []*influxql.Result{ + { + StatementID: 0, + Err: errors.New("max select bucket count exceeded: 4 buckets"), + }, + }) { + t.Fatalf("unexpected results: %s", spew.Sdump(a)) + } +} + +// QueryExecutor is a test wrapper for coordinator.QueryExecutor. +type QueryExecutor struct { + *influxql.QueryExecutor + + MetaClient MetaClient + TSDBStore TSDBStore + StatementExecutor *coordinator.StatementExecutor + LogOutput bytes.Buffer +} + +// NewQueryExecutor returns a new instance of QueryExecutor. +// This query executor always has a node id of 0. +func NewQueryExecutor() *QueryExecutor { + e := &QueryExecutor{ + QueryExecutor: influxql.NewQueryExecutor(), + } + e.StatementExecutor = &coordinator.StatementExecutor{ + MetaClient: &e.MetaClient, + TSDBStore: &e.TSDBStore, + } + e.QueryExecutor.StatementExecutor = e.StatementExecutor + + var out io.Writer = &e.LogOutput + if testing.Verbose() { + out = io.MultiWriter(out, os.Stderr) + } + e.QueryExecutor.Logger = log.New(out, "[query] ", log.LstdFlags) + + return e +} + +// DefaultQueryExecutor returns a QueryExecutor with a database (db0) and retention policy (rp0). +func DefaultQueryExecutor() *QueryExecutor { + e := NewQueryExecutor() + e.MetaClient.DatabaseFn = DefaultMetaClientDatabaseFn + return e +} + +// ExecuteQuery parses query and executes against the database. +func (e *QueryExecutor) ExecuteQuery(query, database string, chunkSize int) <-chan *influxql.Result { + return e.QueryExecutor.ExecuteQuery(MustParseQuery(query), influxql.ExecutionOptions{ + Database: database, + ChunkSize: chunkSize, + }, make(chan struct{})) +} + +// TSDBStore is a mockable implementation of coordinator.TSDBStore. +type TSDBStore struct { + CreateShardFn func(database, policy string, shardID uint64, enabled bool) error + WriteToShardFn func(shardID uint64, points []models.Point) error + + RestoreShardFn func(id uint64, r io.Reader) error + BackupShardFn func(id uint64, since time.Time, w io.Writer) error + + DeleteDatabaseFn func(name string) error + DeleteMeasurementFn func(database, name string) error + DeleteRetentionPolicyFn func(database, name string) error + DeleteShardFn func(id uint64) error + DeleteSeriesFn func(database string, sources []influxql.Source, condition influxql.Expr) error + DatabaseIndexFn func(name string) *tsdb.DatabaseIndex + ShardIteratorCreatorFn func(id uint64) influxql.IteratorCreator +} + +func (s *TSDBStore) CreateShard(database, policy string, shardID uint64, enabled bool) error { + if s.CreateShardFn == nil { + return nil + } + return s.CreateShardFn(database, policy, shardID, enabled) +} + +func (s *TSDBStore) WriteToShard(shardID uint64, points []models.Point) error { + return s.WriteToShardFn(shardID, points) +} + +func (s *TSDBStore) RestoreShard(id uint64, r io.Reader) error { + return s.RestoreShardFn(id, r) +} + +func (s *TSDBStore) BackupShard(id uint64, since time.Time, w io.Writer) error { + return s.BackupShardFn(id, since, w) +} + +func (s *TSDBStore) DeleteDatabase(name string) error { + return s.DeleteDatabaseFn(name) +} + +func (s *TSDBStore) DeleteMeasurement(database, name string) error { + return s.DeleteMeasurementFn(database, name) +} + +func (s *TSDBStore) DeleteRetentionPolicy(database, name string) error { + return s.DeleteRetentionPolicyFn(database, name) +} + +func (s *TSDBStore) DeleteShard(id uint64) error { + return s.DeleteShardFn(id) +} + +func (s *TSDBStore) DeleteSeries(database string, sources []influxql.Source, condition influxql.Expr) error { + return s.DeleteSeriesFn(database, sources, condition) +} + +func (s *TSDBStore) IteratorCreator(shards []meta.ShardInfo) (influxql.IteratorCreator, error) { + // Generate iterators for each node. + ics := make([]influxql.IteratorCreator, 0) + if err := func() error { + for _, shard := range shards { + ic := s.ShardIteratorCreator(shard.ID) + if ic == nil { + continue + } + ics = append(ics, ic) + } + + return nil + }(); err != nil { + influxql.IteratorCreators(ics).Close() + return nil, err + } + + return influxql.IteratorCreators(ics), nil +} + +func (s *TSDBStore) ShardIteratorCreator(id uint64) influxql.IteratorCreator { + return s.ShardIteratorCreatorFn(id) +} + +func (s *TSDBStore) DatabaseIndex(name string) *tsdb.DatabaseIndex { + return s.DatabaseIndexFn(name) +} + +// MustParseQuery parses s into a query. Panic on error. +func MustParseQuery(s string) *influxql.Query { + q, err := influxql.ParseQuery(s) + if err != nil { + panic(err) + } + return q +} + +// ReadAllResults reads all results from c and returns as a slice. +func ReadAllResults(c <-chan *influxql.Result) []*influxql.Result { + var a []*influxql.Result + for result := range c { + a = append(a, result) + } + return a +} + +// IteratorCreator is a mockable implementation of IteratorCreator. +type IteratorCreator struct { + CreateIteratorFn func(opt influxql.IteratorOptions) (influxql.Iterator, error) + FieldDimensionsFn func(sources influxql.Sources) (fields map[string]influxql.DataType, dimensions map[string]struct{}, err error) + ExpandSourcesFn func(sources influxql.Sources) (influxql.Sources, error) +} + +func (ic *IteratorCreator) CreateIterator(opt influxql.IteratorOptions) (influxql.Iterator, error) { + return ic.CreateIteratorFn(opt) +} + +func (ic *IteratorCreator) FieldDimensions(sources influxql.Sources) (fields map[string]influxql.DataType, dimensions map[string]struct{}, err error) { + return ic.FieldDimensionsFn(sources) +} + +func (ic *IteratorCreator) ExpandSources(sources influxql.Sources) (influxql.Sources, error) { + return ic.ExpandSourcesFn(sources) +} + +// FloatIterator is a represents an iterator that reads from a slice. +type FloatIterator struct { + Points []influxql.FloatPoint + stats influxql.IteratorStats +} + +func (itr *FloatIterator) Stats() influxql.IteratorStats { return itr.stats } +func (itr *FloatIterator) Close() error { return nil } + +// Next returns the next value and shifts it off the beginning of the points slice. +func (itr *FloatIterator) Next() (*influxql.FloatPoint, error) { + if len(itr.Points) == 0 { + return nil, nil + } + + v := &itr.Points[0] + itr.Points = itr.Points[1:] + return v, nil +} diff --git a/vendor/github.com/influxdata/influxdb/etc/burn-in/.rvmrc b/vendor/github.com/influxdata/influxdb/etc/burn-in/.rvmrc new file mode 100644 index 000000000..a9c1a9ca3 --- /dev/null +++ b/vendor/github.com/influxdata/influxdb/etc/burn-in/.rvmrc @@ -0,0 +1 @@ +rvm use ruby-2.1.0@burn-in --create diff --git a/vendor/github.com/influxdata/influxdb/etc/burn-in/Gemfile b/vendor/github.com/influxdata/influxdb/etc/burn-in/Gemfile new file mode 100644 index 000000000..b1816e8b6 --- /dev/null +++ b/vendor/github.com/influxdata/influxdb/etc/burn-in/Gemfile @@ -0,0 +1,4 @@ +source 'https://rubygems.org' + +gem "colorize" +gem "influxdb" diff --git a/vendor/github.com/influxdata/influxdb/etc/burn-in/Gemfile.lock b/vendor/github.com/influxdata/influxdb/etc/burn-in/Gemfile.lock new file mode 100644 index 000000000..9e721c3a7 --- /dev/null +++ b/vendor/github.com/influxdata/influxdb/etc/burn-in/Gemfile.lock @@ -0,0 +1,14 @@ +GEM + remote: https://rubygems.org/ + specs: + colorize (0.6.0) + influxdb (0.0.16) + json + json (1.8.1) + +PLATFORMS + ruby + +DEPENDENCIES + colorize + influxdb diff --git a/vendor/github.com/influxdata/influxdb/etc/burn-in/burn-in.rb b/vendor/github.com/influxdata/influxdb/etc/burn-in/burn-in.rb new file mode 100644 index 000000000..1d44bc2c0 --- /dev/null +++ b/vendor/github.com/influxdata/influxdb/etc/burn-in/burn-in.rb @@ -0,0 +1,79 @@ +require "influxdb" +require "colorize" +require "benchmark" + +require_relative "log" +require_relative "random_gaussian" + +BATCH_SIZE = 10_000 + +Log.info "Starting burn-in suite" +master = InfluxDB::Client.new +master.delete_database("burn-in") rescue nil +master.create_database("burn-in") +master.create_database_user("burn-in", "user", "pass") + +master.database = "burn-in" +# master.query "select * from test1 into test2;" +# master.query "select count(value) from test1 group by time(1m) into test2;" + +influxdb = InfluxDB::Client.new "burn-in", username: "user", password: "pass" + +Log.success "Connected to server #{influxdb.host}:#{influxdb.port}" + +Log.log "Creating RandomGaussian(500, 25)" +gaussian = RandomGaussian.new(500, 25) +point_count = 0 + +while true + Log.log "Generating 10,000 points.." + points = [] + BATCH_SIZE.times do |n| + points << {value: gaussian.rand.to_i.abs} + end + point_count += points.length + + Log.info "Sending points to server.." + begin + st = Time.now + foo = influxdb.write_point("test1", points) + et = Time.now + Log.log foo.inspect + Log.log "#{et-st} seconds elapsed" + Log.success "Write successful." + rescue => e + Log.failure "Write failed:" + Log.log e + end + sleep 0.5 + + Log.info "Checking regular points" + st = Time.now + response = influxdb.query("select count(value) from test1;") + et = Time.now + + Log.log "#{et-st} seconds elapsed" + + response_count = response["test1"].first["count"] + if point_count == response_count + Log.success "Point counts match: #{point_count} == #{response_count}" + else + Log.failure "Point counts don't match: #{point_count} != #{response_count}" + end + + # Log.info "Checking continuous query points for test2" + # st = Time.now + # response = influxdb.query("select count(value) from test2;") + # et = Time.now + + # Log.log "#{et-st} seconds elapsed" + + # response_count = response["test2"].first["count"] + # if point_count == response_count + # Log.success "Point counts match: #{point_count} == #{response_count}" + # else + # Log.failure "Point counts don't match: #{point_count} != #{response_count}" + # end +end + + diff --git a/vendor/github.com/influxdata/influxdb/etc/burn-in/log.rb b/vendor/github.com/influxdata/influxdb/etc/burn-in/log.rb new file mode 100644 index 000000000..0f70d7633 --- /dev/null +++ b/vendor/github.com/influxdata/influxdb/etc/burn-in/log.rb @@ -0,0 +1,23 @@ +module Log + def self.info(msg) + print Time.now.strftime("%r") + " | " + puts msg.to_s.colorize(:yellow) + end + + def self.success(msg) + print Time.now.strftime("%r") + " | " + puts msg.to_s.colorize(:green) + end + + def self.failure(msg) + print Time.now.strftime("%r") + " | " + puts msg.to_s.colorize(:red) + end + + def self.log(msg) + print Time.now.strftime("%r") + " | " + puts msg.to_s + end +end + + diff --git a/vendor/github.com/influxdata/influxdb/etc/burn-in/random_gaussian.rb b/vendor/github.com/influxdata/influxdb/etc/burn-in/random_gaussian.rb new file mode 100644 index 000000000..51d6c3c04 --- /dev/null +++ b/vendor/github.com/influxdata/influxdb/etc/burn-in/random_gaussian.rb @@ -0,0 +1,31 @@ +class RandomGaussian + def initialize(mean, stddev, rand_helper = lambda { Kernel.rand }) + @rand_helper = rand_helper + @mean = mean + @stddev = stddev + @valid = false + @next = 0 + end + + def rand + if @valid then + @valid = false + return @next + else + @valid = true + x, y = self.class.gaussian(@mean, @stddev, @rand_helper) + @next = y + return x + end + end + + private + def self.gaussian(mean, stddev, rand) + theta = 2 * Math::PI * rand.call + rho = Math.sqrt(-2 * Math.log(1 - rand.call)) + scale = stddev * rho + x = mean + scale * Math.cos(theta) + y = mean + scale * Math.sin(theta) + return x, y + end +end diff --git a/vendor/github.com/influxdata/influxdb/etc/burn-in/random_points.rb b/vendor/github.com/influxdata/influxdb/etc/burn-in/random_points.rb new file mode 100644 index 000000000..93bc8314f --- /dev/null +++ b/vendor/github.com/influxdata/influxdb/etc/burn-in/random_points.rb @@ -0,0 +1,29 @@ +require "influxdb" + +ONE_WEEK_IN_SECONDS = 7*24*60*60 +NUM_POINTS = 10_000 +BATCHES = 100 + +master = InfluxDB::Client.new +master.delete_database("ctx") rescue nil +master.create_database("ctx") + +influxdb = InfluxDB::Client.new "ctx" +influxdb.time_precision = "s" + +names = ["foo", "bar", "baz", "quu", "qux"] + +st = Time.now +BATCHES.times do |m| + points = [] + + puts "Writing #{NUM_POINTS} points, time ##{m}.." + NUM_POINTS.times do |n| + timestamp = Time.now.to_i - rand(ONE_WEEK_IN_SECONDS) + points << {value: names.sample, time: timestamp} + end + + influxdb.write_point("ct1", points) +end +puts st +puts Time.now diff --git a/vendor/github.com/influxdata/influxdb/etc/config.sample.toml b/vendor/github.com/influxdata/influxdb/etc/config.sample.toml new file mode 100644 index 000000000..2f61c4197 --- /dev/null +++ b/vendor/github.com/influxdata/influxdb/etc/config.sample.toml @@ -0,0 +1,303 @@ +### Welcome to the InfluxDB configuration file. + +# Once every 24 hours InfluxDB will report anonymous data to m.influxdb.com +# The data includes raft id (random 8 bytes), os, arch, version, and metadata. +# We don't track ip addresses of servers reporting. This is only used +# to track the number of instances running and the versions, which +# is very helpful for us. +# Change this option to true to disable reporting. +reporting-disabled = false + +# we'll try to get the hostname automatically, but if it the os returns something +# that isn't resolvable by other servers in the cluster, use this option to +# manually set the hostname +# hostname = "localhost" + +### +### [meta] +### +### Controls the parameters for the Raft consensus group that stores metadata +### about the InfluxDB cluster. +### + +[meta] + # Where the metadata/raft database is stored + dir = "/var/lib/influxdb/meta" + + retention-autocreate = true + + # If log messages are printed for the meta service + logging-enabled = true + pprof-enabled = false + + # The default duration for leases. + lease-duration = "1m0s" + +### +### [data] +### +### Controls where the actual shard data for InfluxDB lives and how it is +### flushed from the WAL. "dir" may need to be changed to a suitable place +### for your system, but the WAL settings are an advanced configuration. The +### defaults should work for most systems. +### + +[data] + # Controls if this node holds time series data shards in the cluster + enabled = true + + dir = "/var/lib/influxdb/data" + + # These are the WAL settings for the storage engine >= 0.9.3 + wal-dir = "/var/lib/influxdb/wal" + wal-logging-enabled = true + data-logging-enabled = true + + # Whether queries should be logged before execution. Very useful for troubleshooting, but will + # log any sensitive data contained within a query. + # query-log-enabled = true + + # Settings for the TSM engine + + # CacheMaxMemorySize is the maximum size a shard's cache can + # reach before it starts rejecting writes. + # cache-max-memory-size = 524288000 + + # CacheSnapshotMemorySize is the size at which the engine will + # snapshot the cache and write it to a TSM file, freeing up memory + # cache-snapshot-memory-size = 26214400 + + # CacheSnapshotWriteColdDuration is the length of time at + # which the engine will snapshot the cache and write it to + # a new TSM file if the shard hasn't received writes or deletes + # cache-snapshot-write-cold-duration = "1h" + + # MinCompactionFileCount is the minimum number of TSM files + # that need to exist before a compaction cycle will run + # compact-min-file-count = 3 + + # CompactFullWriteColdDuration is the duration at which the engine + # will compact all TSM files in a shard if it hasn't received a + # write or delete + # compact-full-write-cold-duration = "24h" + + # MaxPointsPerBlock is the maximum number of points in an encoded + # block in a TSM file. Larger numbers may yield better compression + # but could incur a performance penalty when querying + # max-points-per-block = 1000 + +### +### [coordinator] +### +### Controls the clustering service configuration. +### + +[coordinator] + write-timeout = "10s" + max-concurrent-queries = 0 + query-timeout = "0" + log-queries-after = "0" + max-select-point = 0 + max-select-series = 0 + max-select-buckets = 0 + +### +### [retention] +### +### Controls the enforcement of retention policies for evicting old data. +### + +[retention] + enabled = true + check-interval = "30m" + +### +### [shard-precreation] +### +### Controls the precreation of shards, so they are available before data arrives. +### Only shards that, after creation, will have both a start- and end-time in the +### future, will ever be created. Shards are never precreated that would be wholly +### or partially in the past. + +[shard-precreation] + enabled = true + check-interval = "10m" + advance-period = "30m" + +### +### Controls the system self-monitoring, statistics and diagnostics. +### +### The internal database for monitoring data is created automatically if +### if it does not already exist. The target retention within this database +### is called 'monitor' and is also created with a retention period of 7 days +### and a replication factor of 1, if it does not exist. In all cases the +### this retention policy is configured as the default for the database. + +[monitor] + store-enabled = true # Whether to record statistics internally. + store-database = "_internal" # The destination database for recorded statistics + store-interval = "10s" # The interval at which to record statistics + +### +### [admin] +### +### Controls the availability of the built-in, web-based admin interface. If HTTPS is +### enabled for the admin interface, HTTPS must also be enabled on the [http] service. +### + +[admin] + enabled = true + bind-address = ":8083" + https-enabled = false + https-certificate = "/etc/ssl/influxdb.pem" + +### +### [http] +### +### Controls how the HTTP endpoints are configured. These are the primary +### mechanism for getting data into and out of InfluxDB. +### + +[http] + enabled = true + bind-address = ":8086" + auth-enabled = false + log-enabled = true + write-tracing = false + pprof-enabled = false + https-enabled = false + https-certificate = "/etc/ssl/influxdb.pem" + ### Use a separate private key location. + # https-private-key = "" + max-row-limit = 10000 + +### +### [subsciber] +### +### Controls the subscriptions, which can be used to fork a copy of all data +### received by the InfluxDB host. +### + +[subsciber] + enabled = true + http-timeout = "30s" + + +### +### [[graphite]] +### +### Controls one or many listeners for Graphite data. +### + +[[graphite]] + enabled = false + # database = "graphite" + # bind-address = ":2003" + # protocol = "tcp" + # consistency-level = "one" + + # These next lines control how batching works. You should have this enabled + # otherwise you could get dropped metrics or poor performance. Batching + # will buffer points in memory if you have many coming in. + + # batch-size = 5000 # will flush if this many points get buffered + # batch-pending = 10 # number of batches that may be pending in memory + # batch-timeout = "1s" # will flush at least this often even if we haven't hit buffer limit + # udp-read-buffer = 0 # UDP Read buffer size, 0 means OS default. UDP listener will fail if set above OS max. + + ### This string joins multiple matching 'measurement' values providing more control over the final measurement name. + # separator = "." + + ### Default tags that will be added to all metrics. These can be overridden at the template level + ### or by tags extracted from metric + # tags = ["region=us-east", "zone=1c"] + + ### Each template line requires a template pattern. It can have an optional + ### filter before the template and separated by spaces. It can also have optional extra + ### tags following the template. Multiple tags should be separated by commas and no spaces + ### similar to the line protocol format. There can be only one default template. + # templates = [ + # "*.app env.service.resource.measurement", + # # Default template + # "server.*", + # ] + +### +### [collectd] +### +### Controls one or many listeners for collectd data. +### + +[[collectd]] + enabled = false + # bind-address = "" + # database = "" + # typesdb = "" + + # These next lines control how batching works. You should have this enabled + # otherwise you could get dropped metrics or poor performance. Batching + # will buffer points in memory if you have many coming in. + + # batch-size = 1000 # will flush if this many points get buffered + # batch-pending = 5 # number of batches that may be pending in memory + # batch-timeout = "1s" # will flush at least this often even if we haven't hit buffer limit + # read-buffer = 0 # UDP Read buffer size, 0 means OS default. UDP listener will fail if set above OS max. + +### +### [opentsdb] +### +### Controls one or many listeners for OpenTSDB data. +### + +[[opentsdb]] + enabled = false + # bind-address = ":4242" + # database = "opentsdb" + # retention-policy = "" + # consistency-level = "one" + # tls-enabled = false + # certificate= "" + # log-point-errors = true # Log an error for every malformed point. + + # These next lines control how batching works. You should have this enabled + # otherwise you could get dropped metrics or poor performance. Only points + # metrics received over the telnet protocol undergo batching. + + # batch-size = 1000 # will flush if this many points get buffered + # batch-pending = 5 # number of batches that may be pending in memory + # batch-timeout = "1s" # will flush at least this often even if we haven't hit buffer limit + +### +### [[udp]] +### +### Controls the listeners for InfluxDB line protocol data via UDP. +### + +[[udp]] + enabled = false + # bind-address = "" + # database = "udp" + # retention-policy = "" + + # These next lines control how batching works. You should have this enabled + # otherwise you could get dropped metrics or poor performance. Batching + # will buffer points in memory if you have many coming in. + + # batch-size = 1000 # will flush if this many points get buffered + # batch-pending = 5 # number of batches that may be pending in memory + # batch-timeout = "1s" # will flush at least this often even if we haven't hit buffer limit + # read-buffer = 0 # UDP Read buffer size, 0 means OS default. UDP listener will fail if set above OS max. + + # set the expected UDP payload size; lower values tend to yield better performance, default is max UDP size 65536 + # udp-payload-size = 65536 + +### +### [continuous_queries] +### +### Controls how continuous queries are run within InfluxDB. +### + +[continuous_queries] + log-enabled = true + enabled = true + # run-interval = "1s" # interval for how often continuous queries will be checked if they need to run diff --git a/vendor/github.com/influxdata/influxdb/importer/README.md b/vendor/github.com/influxdata/influxdb/importer/README.md new file mode 100644 index 000000000..f5bbbc012 --- /dev/null +++ b/vendor/github.com/influxdata/influxdb/importer/README.md @@ -0,0 +1,193 @@ +# Import/Export + +## Exporting from 0.8.9 + +Version `0.8.9` of InfluxDB adds support to export your data to a format that can be imported into `0.9.3` and later. + +Note that `0.8.9` can be found here: + +``` +http://get.influxdb.org.s3.amazonaws.com/influxdb_0.8.9_amd64.deb +http://get.influxdb.org.s3.amazonaws.com/influxdb-0.8.9-1.x86_64.rpm +``` + +### Design + +`0.8.9` exports raw data to a flat file that includes two sections, `DDL` and `DML`. You can choose to export them independently (see below). + +The `DDL` section contains the sql commands to create databases and retention policies. the `DML` section is [line protocol](https://github.com/influxdata/influxdb/blob/master/tsdb/README.md) and can be directly posted to the [http endpoint](https://docs.influxdata.com/influxdb/v0.10/guides/writing_data) in `0.10`. Remember that batching is important and we don't recommend batch sizes over 5k without further testing. + +You need to specify a database and shard group when you export. + +To list out your shards, use the following http endpoint: + +`/cluster/shard_spaces` + +example: +```sh +http://username:password@localhost:8086/cluster/shard_spaces +``` + +Then, to export a database with then name "metrics" and a shard space with the name "default", issue the following curl command: + +```sh +curl -o export http://username:password@localhost:8086/export/metrics/default +``` + +Compression is supported, and will result in a significantly smaller file size. + +Use the following command for compression: +```sh +curl -o export.gz --compressed http://username:password@localhost:8086/export/metrics/default +``` + +You can also export just the `DDL` with this option: + +```sh +curl -o export.ddl http://username:password@localhost:8086/export/metrics/default?l=ddl +``` + +Or just the `DML` with this option: + +```sh +curl -o export.dml.gz --compressed http://username:password@localhost:8086/export/metrics/default?l=dml +``` + +### Assumptions + +- Series name mapping follows these [guidelines](https://docs.influxdata.com/influxdb/v0.8/advanced_topics/schema_design/) +- Database name will map directly from `0.8` to `0.10` +- Shard Spaces map to Retention Policies +- Shard Space Duration is ignored, as in `0.10` we determine shard size automatically +- Regex is used to match the correct series names and only exports that data for the database +- Duration becomes the new Retention Policy duration + +- Users are not migrated due to inability to get passwords. Anyone using users will need to manually set these back up in `0.10` + +### Upgrade Recommendations + +It's recommended that you upgrade to `0.9.3` or later first and have all your writes going there. Then, on the `0.8.X` instances, upgrade to `0.8.9`. + +It is important that when exporting you change your config to allow for the http endpoints not timing out. To do so, make this change in your config: + +```toml +# Configure the http api +[api] +read-timeout = "0s" +``` + +### Exceptions + +If a series can't be exported to tags based on the guidelines mentioned above, +we will insert the entire series name as the measurement name. You can either +allow that to import into the new InfluxDB instance, or you can do your own +data massage on it prior to importing it. + +For example, if you have the following series name: + +``` +metric.disk.c.host.server01.single +``` + +It will export as exactly thta as the measurement name and no tags: + +``` +metric.disk.c.host.server01.single +``` + +### Export Metrics + +When you export, you will now get comments inline in the `DML`: + +`# Found 999 Series for export` + +As well as count totals for each series exported: + +`# Series FOO - Points Exported: 999` + +With a total at the bottom: + +`# Points Exported: 999` + +You can grep the file that was exported at the end to get all the export metrics: + +`cat myexport | grep Exported` + +## Importing + +Version `0.9.3` of InfluxDB adds support to import your data from version `0.8.9`. + +## Caveats + +For the export/import to work, all requisites have to be met. For export, all series names in `0.8` should be in the following format: + +``` +.... +``` +for example: +``` +az.us-west-1.host.serverA.cpu +``` +or any number of tags +``` +building.2.temperature +``` + +Additionally, the fields need to have a consistent type (all float64, int64, etc) for every write in `0.8`. Otherwise they have the potential to fail writes in the import. +See below for more information. + +## Running the import command + + To import via the cli, you can specify the following command: + + ```sh + influx -import -path=metrics-default.gz -compressed + ``` + + If the file is not compressed you can issue it without the `-compressed` flag: + + ```sh + influx -import -path=metrics-default + ``` + + To redirect failed import lines to another file, run this command: + + ```sh + influx -import -path=metrics-default.gz -compressed > failures + ``` + + The import will use the line protocol in batches of 5,000 lines per batch when sending data to the server. + +### Throttiling the import + + If you need to throttle the import so the database has time to ingest, you can use the `-pps` flag. This will limit the points per second that will be sent to the server. + + ```sh + influx -import -path=metrics-default.gz -compressed -pps 50000 > failures + ``` + + Which is stating that you don't want MORE than 50,000 points per second to write to the database. Due to the processing that is taking place however, you will likely never get exactly 50,000 pps, more like 35,000 pps, etc. + +## Understanding the results of the import + +During the import, a status message will write out for every 100,000 points imported and report stats on the progress of the import: + +``` +2015/08/21 14:48:01 Processed 3100000 lines. Time elapsed: 56.740578415s. Points per second (PPS): 54634 +``` + + The batch will give some basic stats when finished: + + ```sh + 2015/07/29 23:15:20 Processed 2 commands + 2015/07/29 23:15:20 Processed 70207923 inserts + 2015/07/29 23:15:20 Failed 29785000 inserts + ``` + + Most inserts fail due to the following types of error: + + ```sh + 2015/07/29 22:18:28 error writing batch: write failed: field type conflict: input field "value" on measurement "metric" is type float64, already exists as type integer + ``` + + This is due to the fact that in `0.8` a field could get created and saved as int or float types for independent writes. In `0.9` and greater the field has to have a consistent type. diff --git a/vendor/github.com/influxdata/influxdb/importer/v8/importer.go b/vendor/github.com/influxdata/influxdb/importer/v8/importer.go new file mode 100644 index 000000000..774ec57c5 --- /dev/null +++ b/vendor/github.com/influxdata/influxdb/importer/v8/importer.go @@ -0,0 +1,248 @@ +package v8 // import "github.com/influxdata/influxdb/importer/v8" + +import ( + "bufio" + "compress/gzip" + "fmt" + "io" + "log" + "net/url" + "os" + "strings" + "time" + + "github.com/influxdata/influxdb/client" +) + +const batchSize = 5000 + +// Config is the config used to initialize a Importer importer +type Config struct { + Username string + Password string + URL url.URL + Precision string + WriteConsistency string + Path string + Version string + Compressed bool + PPS int +} + +// NewConfig returns an initialized *Config +func NewConfig() *Config { + return &Config{} +} + +// Importer is the importer used for importing 0.8 data +type Importer struct { + client *client.Client + database string + retentionPolicy string + config *Config + batch []string + totalInserts int + failedInserts int + totalCommands int + throttlePointsWritten int + lastWrite time.Time + throttle *time.Ticker +} + +// NewImporter will return an intialized Importer struct +func NewImporter(config *Config) *Importer { + return &Importer{ + config: config, + batch: make([]string, 0, batchSize), + } +} + +// Import processes the specified file in the Config and writes the data to the databases in chunks specified by batchSize +func (i *Importer) Import() error { + // Create a client and try to connect + config := client.NewConfig() + config.URL = i.config.URL + config.Username = i.config.Username + config.Password = i.config.Password + config.UserAgent = fmt.Sprintf("influxDB importer/%s", i.config.Version) + cl, err := client.NewClient(config) + if err != nil { + return fmt.Errorf("could not create client %s", err) + } + i.client = cl + if _, _, e := i.client.Ping(); e != nil { + return fmt.Errorf("failed to connect to %s\n", i.client.Addr()) + } + + // Validate args + if i.config.Path == "" { + return fmt.Errorf("file argument required") + } + + defer func() { + if i.totalInserts > 0 { + log.Printf("Processed %d commands\n", i.totalCommands) + log.Printf("Processed %d inserts\n", i.totalInserts) + log.Printf("Failed %d inserts\n", i.failedInserts) + } + }() + + // Open the file + f, err := os.Open(i.config.Path) + if err != nil { + return err + } + defer f.Close() + + var r io.Reader + + // If gzipped, wrap in a gzip reader + if i.config.Compressed { + gr, err := gzip.NewReader(f) + if err != nil { + return err + } + defer gr.Close() + // Set the reader to the gzip reader + r = gr + } else { + // Standard text file so our reader can just be the file + r = f + } + + // Get our reader + scanner := bufio.NewScanner(r) + + // Process the DDL + i.processDDL(scanner) + + // Set up our throttle channel. Since there is effectively no other activity at this point + // the smaller resolution gets us much closer to the requested PPS + i.throttle = time.NewTicker(time.Microsecond) + defer i.throttle.Stop() + + // Prime the last write + i.lastWrite = time.Now() + + // Process the DML + i.processDML(scanner) + + // Check if we had any errors scanning the file + if err := scanner.Err(); err != nil { + return fmt.Errorf("reading standard input: %s", err) + } + + return nil +} + +func (i *Importer) processDDL(scanner *bufio.Scanner) { + for scanner.Scan() { + line := scanner.Text() + // If we find the DML token, we are done with DDL + if strings.HasPrefix(line, "# DML") { + return + } + if strings.HasPrefix(line, "#") { + continue + } + // Skip blank lines + if strings.TrimSpace(line) == "" { + continue + } + i.queryExecutor(line) + } +} + +func (i *Importer) processDML(scanner *bufio.Scanner) { + start := time.Now() + for scanner.Scan() { + line := scanner.Text() + if strings.HasPrefix(line, "# CONTEXT-DATABASE:") { + i.database = strings.TrimSpace(strings.Split(line, ":")[1]) + } + if strings.HasPrefix(line, "# CONTEXT-RETENTION-POLICY:") { + i.retentionPolicy = strings.TrimSpace(strings.Split(line, ":")[1]) + } + if strings.HasPrefix(line, "#") { + continue + } + // Skip blank lines + if strings.TrimSpace(line) == "" { + continue + } + i.batchAccumulator(line, start) + } + // Call batchWrite one last time to flush anything out in the batch + i.batchWrite() +} + +func (i *Importer) execute(command string) { + response, err := i.client.Query(client.Query{Command: command, Database: i.database}) + if err != nil { + log.Printf("error: %s\n", err) + return + } + if err := response.Error(); err != nil { + log.Printf("error: %s\n", response.Error()) + } +} + +func (i *Importer) queryExecutor(command string) { + i.totalCommands++ + i.execute(command) +} + +func (i *Importer) batchAccumulator(line string, start time.Time) { + i.batch = append(i.batch, line) + if len(i.batch) == batchSize { + i.batchWrite() + i.batch = i.batch[:0] + // Give some status feedback every 100000 lines processed + processed := i.totalInserts + i.failedInserts + if processed%100000 == 0 { + since := time.Since(start) + pps := float64(processed) / since.Seconds() + log.Printf("Processed %d lines. Time elapsed: %s. Points per second (PPS): %d", processed, since.String(), int64(pps)) + } + } +} + +func (i *Importer) batchWrite() { + // Accumulate the batch size to see how many points we have written this second + i.throttlePointsWritten += len(i.batch) + + // Find out when we last wrote data + since := time.Since(i.lastWrite) + + // Check to see if we've exceeded our points per second for the current timeframe + var currentPPS int + if since.Seconds() > 0 { + currentPPS = int(float64(i.throttlePointsWritten) / since.Seconds()) + } else { + currentPPS = i.throttlePointsWritten + } + + // If our currentPPS is greater than the PPS specified, then we wait and retry + if int(currentPPS) > i.config.PPS && i.config.PPS != 0 { + // Wait for the next tick + <-i.throttle.C + + // Decrement the batch size back out as it is going to get called again + i.throttlePointsWritten -= len(i.batch) + i.batchWrite() + return + } + + _, e := i.client.WriteLineProtocol(strings.Join(i.batch, "\n"), i.database, i.retentionPolicy, i.config.Precision, i.config.WriteConsistency) + if e != nil { + log.Println("error writing batch: ", e) + // Output failed lines to STDOUT so users can capture lines that failed to import + fmt.Println(strings.Join(i.batch, "\n")) + i.failedInserts += len(i.batch) + } else { + i.totalInserts += len(i.batch) + } + i.throttlePointsWritten = 0 + i.lastWrite = time.Now() + return +} diff --git a/vendor/github.com/influxdata/influxdb/influxql/ast_test.go b/vendor/github.com/influxdata/influxdb/influxql/ast_test.go new file mode 100644 index 000000000..46e06a461 --- /dev/null +++ b/vendor/github.com/influxdata/influxdb/influxql/ast_test.go @@ -0,0 +1,1321 @@ +package influxql_test + +import ( + "fmt" + "reflect" + "strings" + "testing" + "time" + + "github.com/influxdata/influxdb/influxql" +) + +func BenchmarkQuery_String(b *testing.B) { + p := influxql.NewParser(strings.NewReader(`SELECT foo AS zoo, a AS b FROM bar WHERE value > 10 AND q = 'hello'`)) + q, _ := p.ParseStatement() + for i := 0; i < b.N; i++ { + _ = q.String() + } +} + +// Ensure a value's data type can be retrieved. +func TestInspectDataType(t *testing.T) { + for i, tt := range []struct { + v interface{} + typ influxql.DataType + }{ + {float64(100), influxql.Float}, + {int64(100), influxql.Integer}, + {int32(100), influxql.Integer}, + {100, influxql.Integer}, + {true, influxql.Boolean}, + {"string", influxql.String}, + {time.Now(), influxql.Time}, + {time.Second, influxql.Duration}, + {nil, influxql.Unknown}, + } { + if typ := influxql.InspectDataType(tt.v); tt.typ != typ { + t.Errorf("%d. %v (%s): unexpected type: %s", i, tt.v, tt.typ, typ) + continue + } + } +} + +func TestDataType_String(t *testing.T) { + for i, tt := range []struct { + typ influxql.DataType + v string + }{ + {influxql.Float, "float"}, + {influxql.Integer, "integer"}, + {influxql.Boolean, "boolean"}, + {influxql.String, "string"}, + {influxql.Time, "time"}, + {influxql.Duration, "duration"}, + {influxql.Tag, "tag"}, + {influxql.Unknown, "unknown"}, + } { + if v := tt.typ.String(); tt.v != v { + t.Errorf("%d. %v (%s): unexpected string: %s", i, tt.typ, tt.v, v) + } + } +} + +// Ensure the SELECT statement can extract substatements. +func TestSelectStatement_Substatement(t *testing.T) { + var tests = []struct { + stmt string + expr *influxql.VarRef + sub string + err string + }{ + // 0. Single series + { + stmt: `SELECT value FROM myseries WHERE value > 1`, + expr: &influxql.VarRef{Val: "value"}, + sub: `SELECT value FROM myseries WHERE value > 1`, + }, + + // 1. Simple join + { + stmt: `SELECT sum(aa.value) + sum(bb.value) FROM aa, bb`, + expr: &influxql.VarRef{Val: "aa.value"}, + sub: `SELECT "aa.value" FROM aa`, + }, + + // 2. Simple merge + { + stmt: `SELECT sum(aa.value) + sum(bb.value) FROM aa, bb`, + expr: &influxql.VarRef{Val: "bb.value"}, + sub: `SELECT "bb.value" FROM bb`, + }, + + // 3. Join with condition + { + stmt: `SELECT sum(aa.value) + sum(bb.value) FROM aa, bb WHERE aa.host = 'servera' AND bb.host = 'serverb'`, + expr: &influxql.VarRef{Val: "bb.value"}, + sub: `SELECT "bb.value" FROM bb WHERE "bb.host" = 'serverb'`, + }, + + // 4. Join with complex condition + { + stmt: `SELECT sum(aa.value) + sum(bb.value) FROM aa, bb WHERE aa.host = 'servera' AND (bb.host = 'serverb' OR bb.host = 'serverc') AND 1 = 2`, + expr: &influxql.VarRef{Val: "bb.value"}, + sub: `SELECT "bb.value" FROM bb WHERE ("bb.host" = 'serverb' OR "bb.host" = 'serverc') AND 1 = 2`, + }, + + // 5. 4 with different condition order + { + stmt: `SELECT sum(aa.value) + sum(bb.value) FROM aa, bb WHERE ((bb.host = 'serverb' OR bb.host = 'serverc') AND aa.host = 'servera') AND 1 = 2`, + expr: &influxql.VarRef{Val: "bb.value"}, + sub: `SELECT "bb.value" FROM bb WHERE (("bb.host" = 'serverb' OR "bb.host" = 'serverc')) AND 1 = 2`, + }, + } + + for i, tt := range tests { + // Parse statement. + stmt, err := influxql.NewParser(strings.NewReader(tt.stmt)).ParseStatement() + if err != nil { + t.Fatalf("invalid statement: %q: %s", tt.stmt, err) + } + + // Extract substatement. + sub, err := stmt.(*influxql.SelectStatement).Substatement(tt.expr) + if err != nil { + t.Errorf("%d. %q: unexpected error: %s", i, tt.stmt, err) + continue + } + if substr := sub.String(); tt.sub != substr { + t.Errorf("%d. %q: unexpected substatement:\n\nexp=%s\n\ngot=%s\n\n", i, tt.stmt, tt.sub, substr) + continue + } + } +} + +// Ensure the SELECT statement can extract GROUP BY interval. +func TestSelectStatement_GroupByInterval(t *testing.T) { + q := "SELECT sum(value) from foo where time < now() GROUP BY time(10m)" + stmt, err := influxql.NewParser(strings.NewReader(q)).ParseStatement() + if err != nil { + t.Fatalf("invalid statement: %q: %s", stmt, err) + } + + s := stmt.(*influxql.SelectStatement) + d, err := s.GroupByInterval() + if d != 10*time.Minute { + t.Fatalf("group by interval not equal:\nexp=%s\ngot=%s", 10*time.Minute, d) + } + if err != nil { + t.Fatalf("error parsing group by interval: %s", err.Error()) + } +} + +// Ensure the SELECT statement can have its start and end time set +func TestSelectStatement_SetTimeRange(t *testing.T) { + q := "SELECT sum(value) from foo where time < now() GROUP BY time(10m)" + stmt, err := influxql.NewParser(strings.NewReader(q)).ParseStatement() + if err != nil { + t.Fatalf("invalid statement: %q: %s", stmt, err) + } + + s := stmt.(*influxql.SelectStatement) + start := time.Now().Add(-20 * time.Hour).Round(time.Second).UTC() + end := time.Now().Add(10 * time.Hour).Round(time.Second).UTC() + s.SetTimeRange(start, end) + min, max := MustTimeRange(s.Condition) + + if min != start { + t.Fatalf("start time wasn't set properly.\n exp: %s\n got: %s", start, min) + } + // the end range is actually one nanosecond before the given one since end is exclusive + end = end.Add(-time.Nanosecond) + if max != end { + t.Fatalf("end time wasn't set properly.\n exp: %s\n got: %s", end, max) + } + + // ensure we can set a time on a select that already has one set + start = time.Now().Add(-20 * time.Hour).Round(time.Second).UTC() + end = time.Now().Add(10 * time.Hour).Round(time.Second).UTC() + q = fmt.Sprintf("SELECT sum(value) from foo WHERE time >= %ds and time <= %ds GROUP BY time(10m)", start.Unix(), end.Unix()) + stmt, err = influxql.NewParser(strings.NewReader(q)).ParseStatement() + if err != nil { + t.Fatalf("invalid statement: %q: %s", stmt, err) + } + + s = stmt.(*influxql.SelectStatement) + min, max = MustTimeRange(s.Condition) + if start != min || end != max { + t.Fatalf("start and end times weren't equal:\n exp: %s\n got: %s\n exp: %s\n got:%s\n", start, min, end, max) + } + + // update and ensure it saves it + start = time.Now().Add(-40 * time.Hour).Round(time.Second).UTC() + end = time.Now().Add(20 * time.Hour).Round(time.Second).UTC() + s.SetTimeRange(start, end) + min, max = MustTimeRange(s.Condition) + + // TODO: right now the SetTimeRange can't override the start time if it's more recent than what they're trying to set it to. + // shouldn't matter for our purposes with continuous queries, but fix this later + + if min != start { + t.Fatalf("start time wasn't set properly.\n exp: %s\n got: %s", start, min) + } + // the end range is actually one nanosecond before the given one since end is exclusive + end = end.Add(-time.Nanosecond) + if max != end { + t.Fatalf("end time wasn't set properly.\n exp: %s\n got: %s", end, max) + } + + // ensure that when we set a time range other where clause conditions are still there + q = "SELECT sum(value) from foo WHERE foo = 'bar' and time < now() GROUP BY time(10m)" + stmt, err = influxql.NewParser(strings.NewReader(q)).ParseStatement() + if err != nil { + t.Fatalf("invalid statement: %q: %s", stmt, err) + } + + s = stmt.(*influxql.SelectStatement) + + // update and ensure it saves it + start = time.Now().Add(-40 * time.Hour).Round(time.Second).UTC() + end = time.Now().Add(20 * time.Hour).Round(time.Second).UTC() + s.SetTimeRange(start, end) + min, max = MustTimeRange(s.Condition) + + if min != start { + t.Fatalf("start time wasn't set properly.\n exp: %s\n got: %s", start, min) + } + // the end range is actually one nanosecond before the given one since end is exclusive + end = end.Add(-time.Nanosecond) + if max != end { + t.Fatalf("end time wasn't set properly.\n exp: %s\n got: %s", end, max) + } + + // ensure the where clause is there + hasWhere := false + influxql.WalkFunc(s.Condition, func(n influxql.Node) { + if ex, ok := n.(*influxql.BinaryExpr); ok { + if lhs, ok := ex.LHS.(*influxql.VarRef); ok { + if lhs.Val == "foo" { + if rhs, ok := ex.RHS.(*influxql.StringLiteral); ok { + if rhs.Val == "bar" { + hasWhere = true + } + } + } + } + } + }) + if !hasWhere { + t.Fatal("set time range cleared out the where clause") + } +} + +// Ensure the idents from the select clause can come out +func TestSelect_NamesInSelect(t *testing.T) { + s := MustParseSelectStatement("select count(asdf), count(bar) from cpu") + a := s.NamesInSelect() + if !reflect.DeepEqual(a, []string{"asdf", "bar"}) { + t.Fatal("expected names asdf and bar") + } +} + +// Ensure the idents from the where clause can come out +func TestSelect_NamesInWhere(t *testing.T) { + s := MustParseSelectStatement("select * from cpu where time > 23s AND (asdf = 'jkl' OR (foo = 'bar' AND baz = 'bar'))") + a := s.NamesInWhere() + if !reflect.DeepEqual(a, []string{"time", "asdf", "foo", "baz"}) { + t.Fatalf("exp: time,asdf,foo,baz\ngot: %s\n", strings.Join(a, ",")) + } +} + +func TestSelectStatement_HasWildcard(t *testing.T) { + var tests = []struct { + stmt string + wildcard bool + }{ + // No wildcards + { + stmt: `SELECT value FROM cpu`, + wildcard: false, + }, + + // Query wildcard + { + stmt: `SELECT * FROM cpu`, + wildcard: true, + }, + + // No GROUP BY wildcards + { + stmt: `SELECT value FROM cpu GROUP BY host`, + wildcard: false, + }, + + // No GROUP BY wildcards, time only + { + stmt: `SELECT mean(value) FROM cpu where time < now() GROUP BY time(5ms)`, + wildcard: false, + }, + + // GROUP BY wildcard + { + stmt: `SELECT value FROM cpu GROUP BY *`, + wildcard: true, + }, + + // GROUP BY wildcard with time + { + stmt: `SELECT mean(value) FROM cpu where time < now() GROUP BY *,time(1m)`, + wildcard: true, + }, + + // GROUP BY wildcard with explicit + { + stmt: `SELECT value FROM cpu GROUP BY *,host`, + wildcard: true, + }, + + // GROUP BY multiple wildcards + { + stmt: `SELECT value FROM cpu GROUP BY *,*`, + wildcard: true, + }, + + // Combo + { + stmt: `SELECT * FROM cpu GROUP BY *`, + wildcard: true, + }, + } + + for i, tt := range tests { + // Parse statement. + stmt, err := influxql.NewParser(strings.NewReader(tt.stmt)).ParseStatement() + if err != nil { + t.Fatalf("invalid statement: %q: %s", tt.stmt, err) + } + + // Test wildcard detection. + if w := stmt.(*influxql.SelectStatement).HasWildcard(); tt.wildcard != w { + t.Errorf("%d. %q: unexpected wildcard detection:\n\nexp=%v\n\ngot=%v\n\n", i, tt.stmt, tt.wildcard, w) + continue + } + } +} + +// Test SELECT statement field rewrite. +func TestSelectStatement_RewriteFields(t *testing.T) { + var tests = []struct { + stmt string + rewrite string + }{ + // No wildcards + { + stmt: `SELECT value FROM cpu`, + rewrite: `SELECT value FROM cpu`, + }, + + // Query wildcard + { + stmt: `SELECT * FROM cpu`, + rewrite: `SELECT host::tag, region::tag, value1::float, value2::integer FROM cpu`, + }, + + // Parser fundamentally prohibits multiple query sources + + // Query wildcard with explicit + { + stmt: `SELECT *,value1 FROM cpu`, + rewrite: `SELECT host::tag, region::tag, value1::float, value2::integer, value1::float FROM cpu`, + }, + + // Query multiple wildcards + { + stmt: `SELECT *,* FROM cpu`, + rewrite: `SELECT host::tag, region::tag, value1::float, value2::integer, host::tag, region::tag, value1::float, value2::integer FROM cpu`, + }, + + // Query wildcards with group by + { + stmt: `SELECT * FROM cpu GROUP BY host`, + rewrite: `SELECT region::tag, value1::float, value2::integer FROM cpu GROUP BY host`, + }, + + // No GROUP BY wildcards + { + stmt: `SELECT value FROM cpu GROUP BY host`, + rewrite: `SELECT value FROM cpu GROUP BY host`, + }, + + // No GROUP BY wildcards, time only + { + stmt: `SELECT mean(value) FROM cpu where time < now() GROUP BY time(5ms)`, + rewrite: `SELECT mean(value) FROM cpu WHERE time < now() GROUP BY time(5ms)`, + }, + + // GROUP BY wildcard + { + stmt: `SELECT value FROM cpu GROUP BY *`, + rewrite: `SELECT value FROM cpu GROUP BY host, region`, + }, + + // GROUP BY wildcard with time + { + stmt: `SELECT mean(value) FROM cpu where time < now() GROUP BY *,time(1m)`, + rewrite: `SELECT mean(value) FROM cpu WHERE time < now() GROUP BY host, region, time(1m)`, + }, + + // GROUP BY wildcard with fill + { + stmt: `SELECT mean(value) FROM cpu where time < now() GROUP BY *,time(1m) fill(0)`, + rewrite: `SELECT mean(value) FROM cpu WHERE time < now() GROUP BY host, region, time(1m) fill(0)`, + }, + + // GROUP BY wildcard with explicit + { + stmt: `SELECT value FROM cpu GROUP BY *,host`, + rewrite: `SELECT value FROM cpu GROUP BY host, region, host`, + }, + + // GROUP BY multiple wildcards + { + stmt: `SELECT value FROM cpu GROUP BY *,*`, + rewrite: `SELECT value FROM cpu GROUP BY host, region, host, region`, + }, + + // Combo + { + stmt: `SELECT * FROM cpu GROUP BY *`, + rewrite: `SELECT value1::float, value2::integer FROM cpu GROUP BY host, region`, + }, + } + + for i, tt := range tests { + // Parse statement. + stmt, err := influxql.NewParser(strings.NewReader(tt.stmt)).ParseStatement() + if err != nil { + t.Fatalf("invalid statement: %q: %s", tt.stmt, err) + } + + var ic IteratorCreator + ic.FieldDimensionsFn = func(sources influxql.Sources) (fields map[string]influxql.DataType, dimensions map[string]struct{}, err error) { + fields = map[string]influxql.DataType{"value1": influxql.Float, "value2": influxql.Integer} + dimensions = map[string]struct{}{"host": struct{}{}, "region": struct{}{}} + return + } + + // Rewrite statement. + rw, err := stmt.(*influxql.SelectStatement).RewriteFields(&ic) + if err != nil { + t.Errorf("%d. %q: error: %s", i, tt.stmt, err) + } else if rw == nil { + t.Errorf("%d. %q: unexpected nil statement", i, tt.stmt) + } else if rw := rw.String(); tt.rewrite != rw { + t.Errorf("%d. %q: unexpected rewrite:\n\nexp=%s\n\ngot=%s\n\n", i, tt.stmt, tt.rewrite, rw) + } + } +} + +// Test SELECT statement time field rewrite. +func TestSelectStatement_RewriteTimeFields(t *testing.T) { + var tests = []struct { + s string + stmt influxql.Statement + }{ + { + s: `SELECT time, field1 FROM cpu`, + stmt: &influxql.SelectStatement{ + IsRawQuery: true, + Fields: []*influxql.Field{ + {Expr: &influxql.VarRef{Val: "field1"}}, + }, + Sources: []influxql.Source{ + &influxql.Measurement{Name: "cpu"}, + }, + }, + }, + { + s: `SELECT time AS timestamp, field1 FROM cpu`, + stmt: &influxql.SelectStatement{ + IsRawQuery: true, + Fields: []*influxql.Field{ + {Expr: &influxql.VarRef{Val: "field1"}}, + }, + Sources: []influxql.Source{ + &influxql.Measurement{Name: "cpu"}, + }, + TimeAlias: "timestamp", + }, + }, + } + + for i, tt := range tests { + // Parse statement. + stmt, err := influxql.NewParser(strings.NewReader(tt.s)).ParseStatement() + if err != nil { + t.Fatalf("invalid statement: %q: %s", tt.s, err) + } + + // Rewrite statement. + stmt.(*influxql.SelectStatement).RewriteTimeFields() + if !reflect.DeepEqual(tt.stmt, stmt) { + t.Logf("\n# %s\nexp=%s\ngot=%s\n", tt.s, mustMarshalJSON(tt.stmt), mustMarshalJSON(stmt)) + t.Logf("\nSQL exp=%s\nSQL got=%s\n", tt.stmt.String(), stmt.String()) + t.Errorf("%d. %q\n\nstmt mismatch:\n\nexp=%#v\n\ngot=%#v\n\n", i, tt.s, tt.stmt, stmt) + } + } +} + +// Ensure that the IsRawQuery flag gets set properly +func TestSelectStatement_IsRawQuerySet(t *testing.T) { + var tests = []struct { + stmt string + isRaw bool + }{ + { + stmt: "select * from foo", + isRaw: true, + }, + { + stmt: "select value1,value2 from foo", + isRaw: true, + }, + { + stmt: "select value1,value2 from foo, time(10m)", + isRaw: true, + }, + { + stmt: "select mean(value) from foo where time < now() group by time(5m)", + isRaw: false, + }, + { + stmt: "select mean(value) from foo group by bar", + isRaw: false, + }, + { + stmt: "select mean(value) from foo group by *", + isRaw: false, + }, + { + stmt: "select mean(value) from foo group by *", + isRaw: false, + }, + } + + for _, tt := range tests { + s := MustParseSelectStatement(tt.stmt) + if s.IsRawQuery != tt.isRaw { + t.Errorf("'%s', IsRawQuery should be %v", tt.stmt, tt.isRaw) + } + } +} + +func TestSelectStatement_HasDerivative(t *testing.T) { + var tests = []struct { + stmt string + derivative bool + }{ + // No derivatives + { + stmt: `SELECT value FROM cpu`, + derivative: false, + }, + + // Query derivative + { + stmt: `SELECT derivative(value) FROM cpu`, + derivative: true, + }, + + // No GROUP BY time only + { + stmt: `SELECT mean(value) FROM cpu where time < now() GROUP BY time(5ms)`, + derivative: false, + }, + + // No GROUP BY derivatives, time only + { + stmt: `SELECT derivative(mean(value)) FROM cpu where time < now() GROUP BY time(5ms)`, + derivative: true, + }, + + { + stmt: `SELECT value FROM cpu`, + derivative: false, + }, + + // Query derivative + { + stmt: `SELECT non_negative_derivative(value) FROM cpu`, + derivative: true, + }, + + // No GROUP BY derivatives, time only + { + stmt: `SELECT non_negative_derivative(mean(value)) FROM cpu where time < now() GROUP BY time(5ms)`, + derivative: true, + }, + + // Invalid derivative function name + { + stmt: `SELECT typoDerivative(value) FROM cpu where time < now()`, + derivative: false, + }, + } + + for i, tt := range tests { + // Parse statement. + t.Logf("index: %d, statement: %s", i, tt.stmt) + stmt, err := influxql.NewParser(strings.NewReader(tt.stmt)).ParseStatement() + if err != nil { + t.Fatalf("invalid statement: %q: %s", tt.stmt, err) + } + + // Test derivative detection. + if d := stmt.(*influxql.SelectStatement).HasDerivative(); tt.derivative != d { + t.Errorf("%d. %q: unexpected derivative detection:\n\nexp=%v\n\ngot=%v\n\n", i, tt.stmt, tt.derivative, d) + continue + } + } +} + +func TestSelectStatement_IsSimpleDerivative(t *testing.T) { + var tests = []struct { + stmt string + derivative bool + }{ + // No derivatives + { + stmt: `SELECT value FROM cpu`, + derivative: false, + }, + + // Query derivative + { + stmt: `SELECT derivative(value) FROM cpu`, + derivative: true, + }, + + // Query derivative + { + stmt: `SELECT non_negative_derivative(value) FROM cpu`, + derivative: true, + }, + + // No GROUP BY time only + { + stmt: `SELECT mean(value) FROM cpu where time < now() GROUP BY time(5ms)`, + derivative: false, + }, + + // No GROUP BY derivatives, time only + { + stmt: `SELECT non_negative_derivative(mean(value)) FROM cpu where time < now() GROUP BY time(5ms)`, + derivative: false, + }, + + // Invalid derivative function name + { + stmt: `SELECT typoDerivative(value) FROM cpu where time < now()`, + derivative: false, + }, + } + + for i, tt := range tests { + // Parse statement. + t.Logf("index: %d, statement: %s", i, tt.stmt) + stmt, err := influxql.NewParser(strings.NewReader(tt.stmt)).ParseStatement() + if err != nil { + t.Fatalf("invalid statement: %q: %s", tt.stmt, err) + } + + // Test derivative detection. + if d := stmt.(*influxql.SelectStatement).IsSimpleDerivative(); tt.derivative != d { + t.Errorf("%d. %q: unexpected derivative detection:\n\nexp=%v\n\ngot=%v\n\n", i, tt.stmt, tt.derivative, d) + continue + } + } +} + +// Ensure binary expression names can be evaluated. +func TestBinaryExprName(t *testing.T) { + for i, tt := range []struct { + expr string + name string + }{ + {expr: `value + 1`, name: `value`}, + {expr: `"user" / total`, name: `user_total`}, + {expr: `("user" + total) / total`, name: `user_total_total`}, + } { + expr := influxql.MustParseExpr(tt.expr) + switch expr := expr.(type) { + case *influxql.BinaryExpr: + name := influxql.BinaryExprName(expr) + if name != tt.name { + t.Errorf("%d. unexpected name %s, got %s", i, name, tt.name) + } + default: + t.Errorf("%d. unexpected expr type: %T", i, expr) + } + } +} + +// Ensure the time range of an expression can be extracted. +func TestTimeRange(t *testing.T) { + for i, tt := range []struct { + expr string + min, max, err string + }{ + // LHS VarRef + {expr: `time > '2000-01-01 00:00:00'`, min: `2000-01-01T00:00:00.000000001Z`, max: `0001-01-01T00:00:00Z`}, + {expr: `time >= '2000-01-01 00:00:00'`, min: `2000-01-01T00:00:00Z`, max: `0001-01-01T00:00:00Z`}, + {expr: `time < '2000-01-01 00:00:00'`, min: `0001-01-01T00:00:00Z`, max: `1999-12-31T23:59:59.999999999Z`}, + {expr: `time <= '2000-01-01 00:00:00'`, min: `0001-01-01T00:00:00Z`, max: `2000-01-01T00:00:00Z`}, + + // RHS VarRef + {expr: `'2000-01-01 00:00:00' > time`, min: `0001-01-01T00:00:00Z`, max: `1999-12-31T23:59:59.999999999Z`}, + {expr: `'2000-01-01 00:00:00' >= time`, min: `0001-01-01T00:00:00Z`, max: `2000-01-01T00:00:00Z`}, + {expr: `'2000-01-01 00:00:00' < time`, min: `2000-01-01T00:00:00.000000001Z`, max: `0001-01-01T00:00:00Z`}, + {expr: `'2000-01-01 00:00:00' <= time`, min: `2000-01-01T00:00:00Z`, max: `0001-01-01T00:00:00Z`}, + + // number literal + {expr: `time < 10`, min: `0001-01-01T00:00:00Z`, max: `1970-01-01T00:00:00.000000009Z`}, + {expr: `time < 10i`, min: `0001-01-01T00:00:00Z`, max: `1970-01-01T00:00:00.000000009Z`}, + + // Equality + {expr: `time = '2000-01-01 00:00:00'`, min: `2000-01-01T00:00:00Z`, max: `2000-01-01T00:00:00.000000001Z`}, + + // Multiple time expressions. + {expr: `time >= '2000-01-01 00:00:00' AND time < '2000-01-02 00:00:00'`, min: `2000-01-01T00:00:00Z`, max: `2000-01-01T23:59:59.999999999Z`}, + + // Min/max crossover + {expr: `time >= '2000-01-01 00:00:00' AND time <= '1999-01-01 00:00:00'`, min: `2000-01-01T00:00:00Z`, max: `1999-01-01T00:00:00Z`}, + + // Absolute time + {expr: `time = 1388534400s`, min: `2014-01-01T00:00:00Z`, max: `2014-01-01T00:00:00.000000001Z`}, + + // Non-comparative expressions. + {expr: `time`, min: `0001-01-01T00:00:00Z`, max: `0001-01-01T00:00:00Z`}, + {expr: `time + 2`, min: `0001-01-01T00:00:00Z`, max: `0001-01-01T00:00:00Z`}, + {expr: `time - '2000-01-01 00:00:00'`, min: `0001-01-01T00:00:00Z`, max: `0001-01-01T00:00:00Z`}, + {expr: `time AND '2000-01-01 00:00:00'`, min: `0001-01-01T00:00:00Z`, max: `0001-01-01T00:00:00Z`}, + + // Invalid time expressions. + {expr: `time > "2000-01-01 00:00:00"`, min: `0001-01-01T00:00:00Z`, max: `0001-01-01T00:00:00Z`, err: `invalid operation: time and *influxql.VarRef are not compatible`}, + {expr: `time > '2262-04-11 23:47:17'`, min: `0001-01-01T00:00:00Z`, max: `0001-01-01T00:00:00Z`, err: `time 2262-04-11T23:47:17Z overflows time literal`}, + {expr: `time > '1677-09-20 19:12:43'`, min: `0001-01-01T00:00:00Z`, max: `0001-01-01T00:00:00Z`, err: `time 1677-09-20T19:12:43Z underflows time literal`}, + } { + // Extract time range. + expr := MustParseExpr(tt.expr) + min, max, err := influxql.TimeRange(expr) + + // Compare with expected min/max. + if min := min.Format(time.RFC3339Nano); tt.min != min { + t.Errorf("%d. %s: unexpected min:\n\nexp=%s\n\ngot=%s\n\n", i, tt.expr, tt.min, min) + continue + } + if max := max.Format(time.RFC3339Nano); tt.max != max { + t.Errorf("%d. %s: unexpected max:\n\nexp=%s\n\ngot=%s\n\n", i, tt.expr, tt.max, max) + continue + } + if (err != nil && err.Error() != tt.err) || (err == nil && tt.err != "") { + t.Errorf("%d. %s: unexpected error:\n\nexp=%s\n\ngot=%s\n\n", i, tt.expr, tt.err, err) + } + } +} + +// Ensure that we see if a where clause has only time limitations +func TestOnlyTimeExpr(t *testing.T) { + var tests = []struct { + stmt string + exp bool + }{ + { + stmt: `SELECT value FROM myseries WHERE value > 1`, + exp: false, + }, + { + stmt: `SELECT value FROM foo WHERE time >= '2000-01-01T00:00:05Z'`, + exp: true, + }, + { + stmt: `SELECT value FROM foo WHERE time >= '2000-01-01T00:00:05Z' AND time < '2000-01-01T00:00:05Z'`, + exp: true, + }, + { + stmt: `SELECT value FROM foo WHERE time >= '2000-01-01T00:00:05Z' AND asdf = 'bar'`, + exp: false, + }, + { + stmt: `SELECT value FROM foo WHERE asdf = 'jkl' AND (time >= '2000-01-01T00:00:05Z' AND time < '2000-01-01T00:00:05Z')`, + exp: false, + }, + } + + for i, tt := range tests { + // Parse statement. + stmt, err := influxql.NewParser(strings.NewReader(tt.stmt)).ParseStatement() + if err != nil { + t.Fatalf("invalid statement: %q: %s", tt.stmt, err) + } + if influxql.OnlyTimeExpr(stmt.(*influxql.SelectStatement).Condition) != tt.exp { + t.Fatalf("%d. expected statement to return only time dimension to be %t: %s", i, tt.exp, tt.stmt) + } + } +} + +// Ensure an AST node can be rewritten. +func TestRewrite(t *testing.T) { + expr := MustParseExpr(`time > 1 OR foo = 2`) + + // Flip LHS & RHS in all binary expressions. + act := influxql.RewriteFunc(expr, func(n influxql.Node) influxql.Node { + switch n := n.(type) { + case *influxql.BinaryExpr: + return &influxql.BinaryExpr{Op: n.Op, LHS: n.RHS, RHS: n.LHS} + default: + return n + } + }) + + // Verify that everything is flipped. + if act := act.String(); act != `2 = foo OR 1 > time` { + t.Fatalf("unexpected result: %s", act) + } +} + +// Ensure an Expr can be rewritten handling nils. +func TestRewriteExpr(t *testing.T) { + expr := MustParseExpr(`(time > 1 AND time < 10) OR foo = 2`) + + // Remove all time expressions. + act := influxql.RewriteExpr(expr, func(e influxql.Expr) influxql.Expr { + switch e := e.(type) { + case *influxql.BinaryExpr: + if lhs, ok := e.LHS.(*influxql.VarRef); ok && lhs.Val == "time" { + return nil + } + } + return e + }) + + // Verify that everything is flipped. + if act := act.String(); act != `foo = 2` { + t.Fatalf("unexpected result: %s", act) + } +} + +// Ensure that the String() value of a statement is parseable +func TestParseString(t *testing.T) { + var tests = []struct { + stmt string + }{ + { + stmt: `SELECT "cpu load" FROM myseries`, + }, + { + stmt: `SELECT "cpu load" FROM "my series"`, + }, + { + stmt: `SELECT "cpu\"load" FROM myseries`, + }, + { + stmt: `SELECT "cpu'load" FROM myseries`, + }, + { + stmt: `SELECT "cpu load" FROM "my\"series"`, + }, + { + stmt: `SELECT "field with spaces" FROM "\"ugly\" db"."\"ugly\" rp"."\"ugly\" measurement"`, + }, + { + stmt: `SELECT * FROM myseries`, + }, + { + stmt: `DROP DATABASE "!"`, + }, + { + stmt: `DROP RETENTION POLICY "my rp" ON "a database"`, + }, + { + stmt: `CREATE RETENTION POLICY "my rp" ON "a database" DURATION 1d REPLICATION 1`, + }, + { + stmt: `ALTER RETENTION POLICY "my rp" ON "a database" DEFAULT`, + }, + { + stmt: `SHOW RETENTION POLICIES ON "a database"`, + }, + { + stmt: `SHOW TAG VALUES WITH KEY IN ("a long name", short)`, + }, + { + stmt: `DROP CONTINUOUS QUERY "my query" ON "my database"`, + }, + // See issues https://github.com/influxdata/influxdb/issues/1647 + // and https://github.com/influxdata/influxdb/issues/4404 + //{ + // stmt: `DELETE FROM "my db"."my rp"."my measurement"`, + //}, + { + stmt: `DROP SUBSCRIPTION "ugly \"subscription\" name" ON "\"my\" db"."\"my\" rp"`, + }, + { + stmt: `CREATE SUBSCRIPTION "ugly \"subscription\" name" ON "\"my\" db"."\"my\" rp" DESTINATIONS ALL 'my host', 'my other host'`, + }, + { + stmt: `SHOW MEASUREMENTS WITH MEASUREMENT =~ /foo/`, + }, + { + stmt: `SHOW MEASUREMENTS WITH MEASUREMENT = "and/or"`, + }, + { + stmt: `DROP USER "user with spaces"`, + }, + { + stmt: `GRANT ALL PRIVILEGES ON "db with spaces" TO "user with spaces"`, + }, + { + stmt: `GRANT ALL PRIVILEGES TO "user with spaces"`, + }, + { + stmt: `SHOW GRANTS FOR "user with spaces"`, + }, + { + stmt: `REVOKE ALL PRIVILEGES ON "db with spaces" FROM "user with spaces"`, + }, + { + stmt: `REVOKE ALL PRIVILEGES FROM "user with spaces"`, + }, + { + stmt: `CREATE DATABASE "db with spaces"`, + }, + } + + for _, tt := range tests { + // Parse statement. + stmt, err := influxql.NewParser(strings.NewReader(tt.stmt)).ParseStatement() + if err != nil { + t.Fatalf("invalid statement: %q: %s", tt.stmt, err) + } + + stmtCopy, err := influxql.NewParser(strings.NewReader(stmt.String())).ParseStatement() + if err != nil { + t.Fatalf("failed to parse string: %v\norig: %v\ngot: %v", err, tt.stmt, stmt.String()) + } + + if !reflect.DeepEqual(stmt, stmtCopy) { + t.Fatalf("statement changed after stringifying and re-parsing:\noriginal : %v\nre-parsed: %v\n", tt.stmt, stmtCopy.String()) + } + } +} + +// Ensure an expression can be reduced. +func TestEval(t *testing.T) { + for i, tt := range []struct { + in string + out interface{} + data map[string]interface{} + }{ + // Number literals. + {in: `1 + 2`, out: int64(3)}, + {in: `(foo*2) + ( (4/2) + (3 * 5) - 0.5 )`, out: float64(26.5), data: map[string]interface{}{"foo": float64(5)}}, + {in: `foo / 2`, out: float64(2), data: map[string]interface{}{"foo": float64(4)}}, + {in: `4 = 4`, out: true}, + {in: `4 <> 4`, out: false}, + {in: `6 > 4`, out: true}, + {in: `4 >= 4`, out: true}, + {in: `4 < 6`, out: true}, + {in: `4 <= 4`, out: true}, + {in: `4 AND 5`, out: nil}, + {in: `0 = 'test'`, out: false}, + {in: `1.0 = 1`, out: true}, + {in: `1.2 = 1`, out: false}, + + // Boolean literals. + {in: `true AND false`, out: false}, + {in: `true OR false`, out: true}, + {in: `false = 4`, out: false}, + + // String literals. + {in: `'foo' = 'bar'`, out: false}, + {in: `'foo' = 'foo'`, out: true}, + {in: `'' = 4`, out: false}, + + // Regex literals. + {in: `'foo' =~ /f.*/`, out: true}, + {in: `'foo' =~ /b.*/`, out: false}, + {in: `'foo' !~ /f.*/`, out: false}, + {in: `'foo' !~ /b.*/`, out: true}, + + // Variable references. + {in: `foo`, out: "bar", data: map[string]interface{}{"foo": "bar"}}, + {in: `foo = 'bar'`, out: true, data: map[string]interface{}{"foo": "bar"}}, + {in: `foo = 'bar'`, out: nil, data: map[string]interface{}{"foo": nil}}, + {in: `foo <> 'bar'`, out: true, data: map[string]interface{}{"foo": "xxx"}}, + {in: `foo =~ /b.*/`, out: true, data: map[string]interface{}{"foo": "bar"}}, + {in: `foo !~ /b.*/`, out: false, data: map[string]interface{}{"foo": "bar"}}, + } { + // Evaluate expression. + out := influxql.Eval(MustParseExpr(tt.in), tt.data) + + // Compare with expected output. + if !reflect.DeepEqual(tt.out, out) { + t.Errorf("%d. %s: unexpected output:\n\nexp=%#v\n\ngot=%#v\n\n", i, tt.in, tt.out, out) + continue + } + } +} + +// Ensure an expression can be reduced. +func TestReduce(t *testing.T) { + now := mustParseTime("2000-01-01T00:00:00Z") + + for i, tt := range []struct { + in string + out string + data Valuer + }{ + // Number literals. + {in: `1 + 2`, out: `3`}, + {in: `(foo*2) + ( (4/2) + (3 * 5) - 0.5 )`, out: `(foo * 2) + 16.500`}, + {in: `foo(bar(2 + 3), 4)`, out: `foo(bar(5), 4)`}, + {in: `4 / 0`, out: `0.000`}, + {in: `1 / 2`, out: `0.500`}, + {in: `4 = 4`, out: `true`}, + {in: `4 <> 4`, out: `false`}, + {in: `6 > 4`, out: `true`}, + {in: `4 >= 4`, out: `true`}, + {in: `4 < 6`, out: `true`}, + {in: `4 <= 4`, out: `true`}, + {in: `4 AND 5`, out: `4 AND 5`}, + + // Boolean literals. + {in: `true AND false`, out: `false`}, + {in: `true OR false`, out: `true`}, + {in: `true OR (foo = bar AND 1 > 2)`, out: `true`}, + {in: `(foo = bar AND 1 > 2) OR true`, out: `true`}, + {in: `false OR (foo = bar AND 1 > 2)`, out: `false`}, + {in: `(foo = bar AND 1 > 2) OR false`, out: `false`}, + {in: `true = false`, out: `false`}, + {in: `true <> false`, out: `true`}, + {in: `true + false`, out: `true + false`}, + + // Time literals. + {in: `now() + 2h`, out: `'2000-01-01T02:00:00Z'`, data: map[string]interface{}{"now()": now}}, + {in: `now() / 2h`, out: `'2000-01-01T00:00:00Z' / 2h`, data: map[string]interface{}{"now()": now}}, + {in: `4µ + now()`, out: `'2000-01-01T00:00:00.000004Z'`, data: map[string]interface{}{"now()": now}}, + {in: `now() = now()`, out: `true`, data: map[string]interface{}{"now()": now}}, + {in: `now() <> now()`, out: `false`, data: map[string]interface{}{"now()": now}}, + {in: `now() < now() + 1h`, out: `true`, data: map[string]interface{}{"now()": now}}, + {in: `now() <= now() + 1h`, out: `true`, data: map[string]interface{}{"now()": now}}, + {in: `now() >= now() - 1h`, out: `true`, data: map[string]interface{}{"now()": now}}, + {in: `now() > now() - 1h`, out: `true`, data: map[string]interface{}{"now()": now}}, + {in: `now() - (now() - 60s)`, out: `1m`, data: map[string]interface{}{"now()": now}}, + {in: `now() AND now()`, out: `'2000-01-01T00:00:00Z' AND '2000-01-01T00:00:00Z'`, data: map[string]interface{}{"now()": now}}, + {in: `now()`, out: `now()`}, + {in: `946684800000000000 + 2h`, out: `'2000-01-01T02:00:00Z'`}, + + // Duration literals. + {in: `10m + 1h - 60s`, out: `69m`}, + {in: `(10m / 2) * 5`, out: `25m`}, + {in: `60s = 1m`, out: `true`}, + {in: `60s <> 1m`, out: `false`}, + {in: `60s < 1h`, out: `true`}, + {in: `60s <= 1h`, out: `true`}, + {in: `60s > 12s`, out: `true`}, + {in: `60s >= 1m`, out: `true`}, + {in: `60s AND 1m`, out: `1m AND 1m`}, + {in: `60m / 0`, out: `0s`}, + {in: `60m + 50`, out: `1h + 50`}, + + // String literals. + {in: `'foo' + 'bar'`, out: `'foobar'`}, + + // Variable references. + {in: `foo`, out: `'bar'`, data: map[string]interface{}{"foo": "bar"}}, + {in: `foo = 'bar'`, out: `true`, data: map[string]interface{}{"foo": "bar"}}, + {in: `foo = 'bar'`, out: `false`, data: map[string]interface{}{"foo": nil}}, + {in: `foo <> 'bar'`, out: `false`, data: map[string]interface{}{"foo": nil}}, + } { + // Fold expression. + expr := influxql.Reduce(MustParseExpr(tt.in), tt.data) + + // Compare with expected output. + if out := expr.String(); tt.out != out { + t.Errorf("%d. %s: unexpected expr:\n\nexp=%s\n\ngot=%s\n\n", i, tt.in, tt.out, out) + continue + } + } +} + +func Test_fieldsNames(t *testing.T) { + for _, test := range []struct { + in []string + out []string + alias []string + }{ + { //case: binary expr(valRef) + in: []string{"value+value"}, + out: []string{"value", "value"}, + alias: []string{"value_value"}, + }, + { //case: binary expr + valRef + in: []string{"value+value", "temperature"}, + out: []string{"value", "value", "temperature"}, + alias: []string{"value_value", "temperature"}, + }, + { //case: aggregate expr + in: []string{"mean(value)"}, + out: []string{"mean"}, + alias: []string{"mean"}, + }, + { //case: binary expr(aggregate expr) + in: []string{"mean(value) + max(value)"}, + out: []string{"value", "value"}, + alias: []string{"mean_max"}, + }, + { //case: binary expr(aggregate expr) + valRef + in: []string{"mean(value) + max(value)", "temperature"}, + out: []string{"value", "value", "temperature"}, + alias: []string{"mean_max", "temperature"}, + }, + { //case: mixed aggregate and varRef + in: []string{"mean(value) + temperature"}, + out: []string{"value", "temperature"}, + alias: []string{"mean_temperature"}, + }, + { //case: ParenExpr(varRef) + in: []string{"(value)"}, + out: []string{"value"}, + alias: []string{"value"}, + }, + { //case: ParenExpr(varRef + varRef) + in: []string{"(value + value)"}, + out: []string{"value", "value"}, + alias: []string{"value_value"}, + }, + { //case: ParenExpr(aggregate) + in: []string{"(mean(value))"}, + out: []string{"value"}, + alias: []string{"mean"}, + }, + { //case: ParenExpr(aggregate + aggregate) + in: []string{"(mean(value) + max(value))"}, + out: []string{"value", "value"}, + alias: []string{"mean_max"}, + }, + } { + fields := influxql.Fields{} + for _, s := range test.in { + expr := MustParseExpr(s) + fields = append(fields, &influxql.Field{Expr: expr}) + } + got := fields.Names() + if !reflect.DeepEqual(got, test.out) { + t.Errorf("get fields name:\nexp=%v\ngot=%v\n", test.out, got) + } + alias := fields.AliasNames() + if !reflect.DeepEqual(alias, test.alias) { + t.Errorf("get fields alias name:\nexp=%v\ngot=%v\n", test.alias, alias) + } + } + +} + +func TestSelect_ColumnNames(t *testing.T) { + for i, tt := range []struct { + stmt *influxql.SelectStatement + columns []string + }{ + { + stmt: &influxql.SelectStatement{ + Fields: influxql.Fields([]*influxql.Field{ + {Expr: &influxql.VarRef{Val: "value"}}, + }), + }, + columns: []string{"time", "value"}, + }, + { + stmt: &influxql.SelectStatement{ + Fields: influxql.Fields([]*influxql.Field{ + {Expr: &influxql.VarRef{Val: "value"}}, + {Expr: &influxql.VarRef{Val: "value"}}, + {Expr: &influxql.VarRef{Val: "value_1"}}, + }), + }, + columns: []string{"time", "value", "value_1", "value_1_1"}, + }, + { + stmt: &influxql.SelectStatement{ + Fields: influxql.Fields([]*influxql.Field{ + {Expr: &influxql.VarRef{Val: "value"}}, + {Expr: &influxql.VarRef{Val: "value_1"}}, + {Expr: &influxql.VarRef{Val: "value"}}, + }), + }, + columns: []string{"time", "value", "value_1", "value_2"}, + }, + { + stmt: &influxql.SelectStatement{ + Fields: influxql.Fields([]*influxql.Field{ + {Expr: &influxql.VarRef{Val: "value"}}, + {Expr: &influxql.VarRef{Val: "total"}, Alias: "value"}, + {Expr: &influxql.VarRef{Val: "value"}}, + }), + }, + columns: []string{"time", "value_1", "value", "value_2"}, + }, + { + stmt: &influxql.SelectStatement{ + Fields: influxql.Fields([]*influxql.Field{ + {Expr: &influxql.VarRef{Val: "value"}}, + }), + TimeAlias: "timestamp", + }, + columns: []string{"timestamp", "value"}, + }, + } { + columns := tt.stmt.ColumnNames() + if !reflect.DeepEqual(columns, tt.columns) { + t.Errorf("%d. expected %s, got %s", i, tt.columns, columns) + } + } +} + +func TestSelect_Privileges(t *testing.T) { + stmt := &influxql.SelectStatement{ + Target: &influxql.Target{ + Measurement: &influxql.Measurement{Database: "db2"}, + }, + Sources: []influxql.Source{ + &influxql.Measurement{Database: "db0"}, + &influxql.Measurement{Database: "db1"}, + }, + } + + exp := influxql.ExecutionPrivileges{ + influxql.ExecutionPrivilege{Name: "db0", Privilege: influxql.ReadPrivilege}, + influxql.ExecutionPrivilege{Name: "db1", Privilege: influxql.ReadPrivilege}, + influxql.ExecutionPrivilege{Name: "db2", Privilege: influxql.WritePrivilege}, + } + + got, err := stmt.RequiredPrivileges() + if err != nil { + t.Fatal(err) + } + + if !reflect.DeepEqual(exp, got) { + t.Errorf("exp: %v, got: %v", exp, got) + } +} + +func TestSources_Names(t *testing.T) { + sources := influxql.Sources([]influxql.Source{ + &influxql.Measurement{ + Name: "cpu", + }, + &influxql.Measurement{ + Name: "mem", + }, + }) + + names := sources.Names() + if names[0] != "cpu" { + t.Errorf("expected cpu, got %s", names[0]) + } + if names[1] != "mem" { + t.Errorf("expected mem, got %s", names[1]) + } +} + +func TestSources_HasSystemSource(t *testing.T) { + sources := influxql.Sources([]influxql.Source{ + &influxql.Measurement{ + Name: "_measurements", + }, + }) + + ok := sources.HasSystemSource() + if !ok { + t.Errorf("expected to find a system source, found none") + } + + sources = influxql.Sources([]influxql.Source{ + &influxql.Measurement{ + Name: "cpu", + }, + }) + + ok = sources.HasSystemSource() + if ok { + t.Errorf("expected to find no system source, found one") + } +} + +// Valuer represents a simple wrapper around a map to implement the influxql.Valuer interface. +type Valuer map[string]interface{} + +// Value returns the value and existence of a key. +func (o Valuer) Value(key string) (v interface{}, ok bool) { + v, ok = o[key] + return +} + +// MustTimeRange will parse a time range. Panic on error. +func MustTimeRange(expr influxql.Expr) (min, max time.Time) { + min, max, err := influxql.TimeRange(expr) + if err != nil { + panic(err) + } + return min, max +} + +// mustParseTime parses an IS0-8601 string. Panic on error. +func mustParseTime(s string) time.Time { + t, err := time.Parse(time.RFC3339, s) + if err != nil { + panic(err.Error()) + } + return t +} diff --git a/vendor/github.com/influxdata/influxdb/influxql/call_iterator_test.go b/vendor/github.com/influxdata/influxdb/influxql/call_iterator_test.go new file mode 100644 index 000000000..28802b76d --- /dev/null +++ b/vendor/github.com/influxdata/influxdb/influxql/call_iterator_test.go @@ -0,0 +1,750 @@ +package influxql_test + +import ( + "testing" + "time" + + "github.com/davecgh/go-spew/spew" + "github.com/influxdata/influxdb/influxql" + "github.com/influxdata/influxdb/pkg/deep" +) + +// Ensure that a float iterator can be created for a count() call. +func TestCallIterator_Count_Float(t *testing.T) { + itr, _ := influxql.NewCallIterator( + &FloatIterator{Points: []influxql.FloatPoint{ + {Name: "cpu", Time: 0, Value: 15, Tags: ParseTags("region=us-east,host=hostA")}, + {Name: "cpu", Time: 1, Value: 11, Tags: ParseTags("region=us-west,host=hostB")}, + {Name: "cpu", Time: 2, Value: 10, Tags: ParseTags("region=us-east,host=hostA")}, + {Name: "cpu", Time: 1, Value: 10, Tags: ParseTags("region=us-west,host=hostA")}, + + {Name: "cpu", Time: 5, Value: 20, Tags: ParseTags("region=us-east,host=hostA")}, + + {Name: "cpu", Time: 23, Value: 8, Tags: ParseTags("region=us-west,host=hostB")}, + {Name: "mem", Time: 23, Value: 10, Tags: ParseTags("region=us-west,host=hostB")}, + }}, + influxql.IteratorOptions{ + Expr: MustParseExpr(`count("value")`), + Dimensions: []string{"host"}, + Interval: influxql.Interval{Duration: 5 * time.Nanosecond}, + }, + ) + + if a, err := Iterators([]influxql.Iterator{itr}).ReadAll(); err != nil { + t.Fatalf("unexpected error: %s", err) + } else if !deep.Equal(a, [][]influxql.Point{ + {&influxql.IntegerPoint{Name: "cpu", Time: 0, Value: 3, Tags: ParseTags("host=hostA"), Aggregated: 3}}, + {&influxql.IntegerPoint{Name: "cpu", Time: 0, Value: 1, Tags: ParseTags("host=hostB"), Aggregated: 1}}, + {&influxql.IntegerPoint{Name: "cpu", Time: 5, Value: 1, Tags: ParseTags("host=hostA"), Aggregated: 1}}, + {&influxql.IntegerPoint{Name: "cpu", Time: 20, Value: 1, Tags: ParseTags("host=hostB"), Aggregated: 1}}, + {&influxql.IntegerPoint{Name: "mem", Time: 20, Value: 1, Tags: ParseTags("host=hostB"), Aggregated: 1}}, + }) { + t.Fatalf("unexpected points: %s", spew.Sdump(a)) + } +} + +// Ensure that an integer iterator can be created for a count() call. +func TestCallIterator_Count_Integer(t *testing.T) { + itr, _ := influxql.NewCallIterator( + &IntegerIterator{Points: []influxql.IntegerPoint{ + {Name: "cpu", Time: 0, Value: 15, Tags: ParseTags("region=us-east,host=hostA")}, + {Name: "cpu", Time: 1, Value: 11, Tags: ParseTags("region=us-west,host=hostB")}, + {Name: "cpu", Time: 2, Value: 10, Tags: ParseTags("region=us-east,host=hostA")}, + {Name: "cpu", Time: 1, Value: 10, Tags: ParseTags("region=us-west,host=hostA")}, + + {Name: "cpu", Time: 5, Value: 20, Tags: ParseTags("region=us-east,host=hostA")}, + + {Name: "cpu", Time: 23, Value: 8, Tags: ParseTags("region=us-west,host=hostB")}, + {Name: "mem", Time: 23, Value: 10, Tags: ParseTags("region=us-west,host=hostB")}, + }}, + influxql.IteratorOptions{ + Expr: MustParseExpr(`count("value")`), + Dimensions: []string{"host"}, + Interval: influxql.Interval{Duration: 5 * time.Nanosecond}, + }, + ) + + if a, err := Iterators([]influxql.Iterator{itr}).ReadAll(); err != nil { + t.Fatalf("unexpected error: %s", err) + } else if !deep.Equal(a, [][]influxql.Point{ + {&influxql.IntegerPoint{Name: "cpu", Time: 0, Value: 3, Tags: ParseTags("host=hostA"), Aggregated: 3}}, + {&influxql.IntegerPoint{Name: "cpu", Time: 0, Value: 1, Tags: ParseTags("host=hostB"), Aggregated: 1}}, + {&influxql.IntegerPoint{Name: "cpu", Time: 5, Value: 1, Tags: ParseTags("host=hostA"), Aggregated: 1}}, + {&influxql.IntegerPoint{Name: "cpu", Time: 20, Value: 1, Tags: ParseTags("host=hostB"), Aggregated: 1}}, + {&influxql.IntegerPoint{Name: "mem", Time: 20, Value: 1, Tags: ParseTags("host=hostB"), Aggregated: 1}}, + }) { + t.Fatalf("unexpected points: %s", spew.Sdump(a)) + } +} + +// Ensure that a string iterator can be created for a count() call. +func TestCallIterator_Count_String(t *testing.T) { + itr, _ := influxql.NewCallIterator( + &StringIterator{Points: []influxql.StringPoint{ + {Name: "cpu", Time: 0, Value: "d", Tags: ParseTags("region=us-east,host=hostA")}, + {Name: "cpu", Time: 1, Value: "c", Tags: ParseTags("region=us-west,host=hostB")}, + {Name: "cpu", Time: 2, Value: "b", Tags: ParseTags("region=us-east,host=hostA")}, + {Name: "cpu", Time: 1, Value: "b", Tags: ParseTags("region=us-west,host=hostA")}, + + {Name: "cpu", Time: 5, Value: "e", Tags: ParseTags("region=us-east,host=hostA")}, + + {Name: "cpu", Time: 23, Value: "a", Tags: ParseTags("region=us-west,host=hostB")}, + {Name: "mem", Time: 23, Value: "b", Tags: ParseTags("region=us-west,host=hostB")}, + }}, + influxql.IteratorOptions{ + Expr: MustParseExpr(`count("value")`), + Dimensions: []string{"host"}, + Interval: influxql.Interval{Duration: 5 * time.Nanosecond}, + }, + ) + + if a, err := Iterators([]influxql.Iterator{itr}).ReadAll(); err != nil { + t.Fatalf("unexpected error: %s", err) + } else if !deep.Equal(a, [][]influxql.Point{ + {&influxql.IntegerPoint{Name: "cpu", Time: 0, Value: 3, Tags: ParseTags("host=hostA"), Aggregated: 3}}, + {&influxql.IntegerPoint{Name: "cpu", Time: 0, Value: 1, Tags: ParseTags("host=hostB"), Aggregated: 1}}, + {&influxql.IntegerPoint{Name: "cpu", Time: 5, Value: 1, Tags: ParseTags("host=hostA"), Aggregated: 1}}, + {&influxql.IntegerPoint{Name: "cpu", Time: 20, Value: 1, Tags: ParseTags("host=hostB"), Aggregated: 1}}, + {&influxql.IntegerPoint{Name: "mem", Time: 20, Value: 1, Tags: ParseTags("host=hostB"), Aggregated: 1}}, + }) { + t.Fatalf("unexpected points: %s", spew.Sdump(a)) + } +} + +// Ensure that a boolean iterator can be created for a count() call. +func TestCallIterator_Count_Boolean(t *testing.T) { + itr, _ := influxql.NewCallIterator( + &BooleanIterator{Points: []influxql.BooleanPoint{ + {Name: "cpu", Time: 0, Value: true, Tags: ParseTags("region=us-east,host=hostA")}, + {Name: "cpu", Time: 1, Value: true, Tags: ParseTags("region=us-west,host=hostB")}, + {Name: "cpu", Time: 2, Value: false, Tags: ParseTags("region=us-east,host=hostA")}, + {Name: "cpu", Time: 1, Value: true, Tags: ParseTags("region=us-west,host=hostA")}, + + {Name: "cpu", Time: 5, Value: false, Tags: ParseTags("region=us-east,host=hostA")}, + + {Name: "cpu", Time: 23, Value: false, Tags: ParseTags("region=us-west,host=hostB")}, + {Name: "mem", Time: 23, Value: true, Tags: ParseTags("region=us-west,host=hostB")}, + }}, + influxql.IteratorOptions{ + Expr: MustParseExpr(`count("value")`), + Dimensions: []string{"host"}, + Interval: influxql.Interval{Duration: 5 * time.Nanosecond}, + }, + ) + + if a, err := Iterators([]influxql.Iterator{itr}).ReadAll(); err != nil { + t.Fatalf("unexpected error: %s", err) + } else if !deep.Equal(a, [][]influxql.Point{ + {&influxql.IntegerPoint{Name: "cpu", Time: 0, Value: 3, Tags: ParseTags("host=hostA"), Aggregated: 3}}, + {&influxql.IntegerPoint{Name: "cpu", Time: 0, Value: 1, Tags: ParseTags("host=hostB"), Aggregated: 1}}, + {&influxql.IntegerPoint{Name: "cpu", Time: 5, Value: 1, Tags: ParseTags("host=hostA"), Aggregated: 1}}, + {&influxql.IntegerPoint{Name: "cpu", Time: 20, Value: 1, Tags: ParseTags("host=hostB"), Aggregated: 1}}, + {&influxql.IntegerPoint{Name: "mem", Time: 20, Value: 1, Tags: ParseTags("host=hostB"), Aggregated: 1}}, + }) { + t.Fatalf("unexpected points: %s", spew.Sdump(a)) + } +} + +// Ensure that a float iterator can be created for a min() call. +func TestCallIterator_Min_Float(t *testing.T) { + itr, _ := influxql.NewCallIterator( + &FloatIterator{Points: []influxql.FloatPoint{ + {Time: 0, Value: 15, Tags: ParseTags("region=us-east,host=hostA")}, + {Time: 1, Value: 11, Tags: ParseTags("region=us-west,host=hostB")}, + {Time: 2, Value: 10, Tags: ParseTags("region=us-east,host=hostA")}, + {Time: 4, Value: 12, Tags: ParseTags("region=us-east,host=hostA")}, + {Time: 1, Value: 10, Tags: ParseTags("region=us-west,host=hostA")}, + + {Time: 5, Value: 20, Tags: ParseTags("region=us-east,host=hostA")}, + + {Time: 23, Value: 8, Tags: ParseTags("region=us-west,host=hostB")}, + }}, + influxql.IteratorOptions{ + Expr: MustParseExpr(`min("value")`), + Dimensions: []string{"host"}, + Interval: influxql.Interval{Duration: 5 * time.Nanosecond}, + }, + ) + + if a, err := Iterators([]influxql.Iterator{itr}).ReadAll(); err != nil { + t.Fatalf("unexpected error: %s", err) + } else if !deep.Equal(a, [][]influxql.Point{ + {&influxql.FloatPoint{Time: 1, Value: 10, Tags: ParseTags("host=hostA"), Aggregated: 4}}, + {&influxql.FloatPoint{Time: 1, Value: 11, Tags: ParseTags("host=hostB"), Aggregated: 1}}, + {&influxql.FloatPoint{Time: 5, Value: 20, Tags: ParseTags("host=hostA"), Aggregated: 1}}, + {&influxql.FloatPoint{Time: 23, Value: 8, Tags: ParseTags("host=hostB"), Aggregated: 1}}, + }) { + t.Fatalf("unexpected points: %s", spew.Sdump(a)) + } +} + +// Ensure that a integer iterator can be created for a min() call. +func TestCallIterator_Min_Integer(t *testing.T) { + itr, _ := influxql.NewCallIterator( + &IntegerIterator{Points: []influxql.IntegerPoint{ + {Time: 0, Value: 15, Tags: ParseTags("region=us-east,host=hostA")}, + {Time: 1, Value: 11, Tags: ParseTags("region=us-west,host=hostB")}, + {Time: 2, Value: 10, Tags: ParseTags("region=us-east,host=hostA")}, + {Time: 4, Value: 12, Tags: ParseTags("region=us-east,host=hostA")}, + {Time: 1, Value: 10, Tags: ParseTags("region=us-west,host=hostA")}, + + {Time: 5, Value: 20, Tags: ParseTags("region=us-east,host=hostA")}, + + {Time: 23, Value: 8, Tags: ParseTags("region=us-west,host=hostB")}, + }}, + influxql.IteratorOptions{ + Expr: MustParseExpr(`min("value")`), + Dimensions: []string{"host"}, + Interval: influxql.Interval{Duration: 5 * time.Nanosecond}, + }, + ) + + if a, err := Iterators([]influxql.Iterator{itr}).ReadAll(); err != nil { + t.Fatalf("unexpected error: %s", err) + } else if !deep.Equal(a, [][]influxql.Point{ + {&influxql.IntegerPoint{Time: 1, Value: 10, Tags: ParseTags("host=hostA"), Aggregated: 4}}, + {&influxql.IntegerPoint{Time: 1, Value: 11, Tags: ParseTags("host=hostB"), Aggregated: 1}}, + {&influxql.IntegerPoint{Time: 5, Value: 20, Tags: ParseTags("host=hostA"), Aggregated: 1}}, + {&influxql.IntegerPoint{Time: 23, Value: 8, Tags: ParseTags("host=hostB"), Aggregated: 1}}, + }) { + t.Fatalf("unexpected points: %s", spew.Sdump(a)) + } +} + +// Ensure that a boolean iterator can be created for a min() call. +func TestCallIterator_Min_Boolean(t *testing.T) { + itr, _ := influxql.NewCallIterator( + &BooleanIterator{Points: []influxql.BooleanPoint{ + {Time: 0, Value: true, Tags: ParseTags("region=us-east,host=hostA")}, + {Time: 1, Value: false, Tags: ParseTags("region=us-west,host=hostB")}, + {Time: 2, Value: false, Tags: ParseTags("region=us-east,host=hostA")}, + {Time: 1, Value: true, Tags: ParseTags("region=us-west,host=hostA")}, + + {Time: 5, Value: false, Tags: ParseTags("region=us-east,host=hostA")}, + + {Time: 23, Value: true, Tags: ParseTags("region=us-west,host=hostB")}, + }}, + influxql.IteratorOptions{ + Expr: MustParseExpr(`min("value")`), + Dimensions: []string{"host"}, + Interval: influxql.Interval{Duration: 5 * time.Nanosecond}, + }, + ) + + if a, err := Iterators([]influxql.Iterator{itr}).ReadAll(); err != nil { + t.Fatalf("unexpected error: %s", err) + } else if !deep.Equal(a, [][]influxql.Point{ + {&influxql.BooleanPoint{Time: 2, Value: false, Tags: ParseTags("host=hostA"), Aggregated: 3}}, + {&influxql.BooleanPoint{Time: 1, Value: false, Tags: ParseTags("host=hostB"), Aggregated: 1}}, + {&influxql.BooleanPoint{Time: 5, Value: false, Tags: ParseTags("host=hostA"), Aggregated: 1}}, + {&influxql.BooleanPoint{Time: 23, Value: true, Tags: ParseTags("host=hostB"), Aggregated: 1}}, + }) { + t.Fatalf("unexpected points: %s", spew.Sdump(a)) + } +} + +// Ensure that a float iterator can be created for a max() call. +func TestCallIterator_Max_Float(t *testing.T) { + itr, _ := influxql.NewCallIterator( + &FloatIterator{Points: []influxql.FloatPoint{ + {Time: 0, Value: 15, Tags: ParseTags("region=us-east,host=hostA")}, + {Time: 1, Value: 11, Tags: ParseTags("region=us-west,host=hostB")}, + {Time: 2, Value: 10, Tags: ParseTags("region=us-east,host=hostA")}, + {Time: 1, Value: 10, Tags: ParseTags("region=us-west,host=hostA")}, + + {Time: 5, Value: 20, Tags: ParseTags("region=us-east,host=hostA")}, + + {Time: 23, Value: 8, Tags: ParseTags("region=us-west,host=hostB")}, + }}, + influxql.IteratorOptions{ + Expr: MustParseExpr(`max("value")`), + Dimensions: []string{"host"}, + Interval: influxql.Interval{Duration: 5 * time.Nanosecond}, + }, + ) + + if a, err := Iterators([]influxql.Iterator{itr}).ReadAll(); err != nil { + t.Fatalf("unexpected error: %s", err) + } else if !deep.Equal(a, [][]influxql.Point{ + {&influxql.FloatPoint{Time: 0, Value: 15, Tags: ParseTags("host=hostA"), Aggregated: 3}}, + {&influxql.FloatPoint{Time: 1, Value: 11, Tags: ParseTags("host=hostB"), Aggregated: 1}}, + {&influxql.FloatPoint{Time: 5, Value: 20, Tags: ParseTags("host=hostA"), Aggregated: 1}}, + {&influxql.FloatPoint{Time: 23, Value: 8, Tags: ParseTags("host=hostB"), Aggregated: 1}}, + }) { + t.Fatalf("unexpected points: %s", spew.Sdump(a)) + } +} + +// Ensure that a integer iterator can be created for a max() call. +func TestCallIterator_Max_Integer(t *testing.T) { + itr, _ := influxql.NewCallIterator( + &IntegerIterator{Points: []influxql.IntegerPoint{ + {Time: 0, Value: 15, Tags: ParseTags("region=us-east,host=hostA")}, + {Time: 1, Value: 11, Tags: ParseTags("region=us-west,host=hostB")}, + {Time: 2, Value: 10, Tags: ParseTags("region=us-east,host=hostA")}, + {Time: 1, Value: 10, Tags: ParseTags("region=us-west,host=hostA")}, + + {Time: 5, Value: 20, Tags: ParseTags("region=us-east,host=hostA")}, + + {Time: 23, Value: 8, Tags: ParseTags("region=us-west,host=hostB")}, + }}, + influxql.IteratorOptions{ + Expr: MustParseExpr(`max("value")`), + Dimensions: []string{"host"}, + Interval: influxql.Interval{Duration: 5 * time.Nanosecond}, + }, + ) + + if a, err := Iterators([]influxql.Iterator{itr}).ReadAll(); err != nil { + t.Fatalf("unexpected error: %s", err) + } else if !deep.Equal(a, [][]influxql.Point{ + {&influxql.IntegerPoint{Time: 0, Value: 15, Tags: ParseTags("host=hostA"), Aggregated: 3}}, + {&influxql.IntegerPoint{Time: 1, Value: 11, Tags: ParseTags("host=hostB"), Aggregated: 1}}, + {&influxql.IntegerPoint{Time: 5, Value: 20, Tags: ParseTags("host=hostA"), Aggregated: 1}}, + {&influxql.IntegerPoint{Time: 23, Value: 8, Tags: ParseTags("host=hostB"), Aggregated: 1}}, + }) { + t.Fatalf("unexpected points: %s", spew.Sdump(a)) + } +} + +// Ensure that a boolean iterator can be created for a max() call. +func TestCallIterator_Max_Boolean(t *testing.T) { + itr, _ := influxql.NewCallIterator( + &BooleanIterator{Points: []influxql.BooleanPoint{ + {Time: 0, Value: true, Tags: ParseTags("region=us-east,host=hostA")}, + {Time: 1, Value: false, Tags: ParseTags("region=us-west,host=hostB")}, + {Time: 2, Value: false, Tags: ParseTags("region=us-east,host=hostA")}, + {Time: 1, Value: true, Tags: ParseTags("region=us-west,host=hostA")}, + + {Time: 5, Value: false, Tags: ParseTags("region=us-east,host=hostA")}, + + {Time: 23, Value: true, Tags: ParseTags("region=us-west,host=hostB")}, + }}, + influxql.IteratorOptions{ + Expr: MustParseExpr(`max("value")`), + Dimensions: []string{"host"}, + Interval: influxql.Interval{Duration: 5 * time.Nanosecond}, + }, + ) + + if a, err := Iterators([]influxql.Iterator{itr}).ReadAll(); err != nil { + t.Fatalf("unexpected error: %s", err) + } else if !deep.Equal(a, [][]influxql.Point{ + {&influxql.BooleanPoint{Time: 0, Value: true, Tags: ParseTags("host=hostA"), Aggregated: 3}}, + {&influxql.BooleanPoint{Time: 1, Value: false, Tags: ParseTags("host=hostB"), Aggregated: 1}}, + {&influxql.BooleanPoint{Time: 5, Value: false, Tags: ParseTags("host=hostA"), Aggregated: 1}}, + {&influxql.BooleanPoint{Time: 23, Value: true, Tags: ParseTags("host=hostB"), Aggregated: 1}}, + }) { + t.Fatalf("unexpected points: %s", spew.Sdump(a)) + } +} + +// Ensure that a float iterator can be created for a sum() call. +func TestCallIterator_Sum_Float(t *testing.T) { + itr, _ := influxql.NewCallIterator( + &FloatIterator{Points: []influxql.FloatPoint{ + {Time: 0, Value: 15, Tags: ParseTags("region=us-east,host=hostA")}, + {Time: 1, Value: 11, Tags: ParseTags("region=us-west,host=hostB")}, + {Time: 2, Value: 10, Tags: ParseTags("region=us-east,host=hostA")}, + {Time: 1, Value: 10, Tags: ParseTags("region=us-west,host=hostA")}, + + {Time: 5, Value: 20, Tags: ParseTags("region=us-east,host=hostA")}, + + {Time: 23, Value: 8, Tags: ParseTags("region=us-west,host=hostB")}, + }}, + influxql.IteratorOptions{ + Expr: MustParseExpr(`sum("value")`), + Dimensions: []string{"host"}, + Interval: influxql.Interval{Duration: 5 * time.Nanosecond}, + }, + ) + + if a, err := Iterators([]influxql.Iterator{itr}).ReadAll(); err != nil { + t.Fatalf("unexpected error: %s", err) + } else if !deep.Equal(a, [][]influxql.Point{ + {&influxql.FloatPoint{Time: 0, Value: 35, Tags: ParseTags("host=hostA"), Aggregated: 3}}, + {&influxql.FloatPoint{Time: 0, Value: 11, Tags: ParseTags("host=hostB"), Aggregated: 1}}, + {&influxql.FloatPoint{Time: 5, Value: 20, Tags: ParseTags("host=hostA"), Aggregated: 1}}, + {&influxql.FloatPoint{Time: 20, Value: 8, Tags: ParseTags("host=hostB"), Aggregated: 1}}, + }) { + t.Fatalf("unexpected points: %s", spew.Sdump(a)) + } +} + +// Ensure that an integer iterator can be created for a sum() call. +func TestCallIterator_Sum_Integer(t *testing.T) { + itr, _ := influxql.NewCallIterator( + &IntegerIterator{Points: []influxql.IntegerPoint{ + {Time: 0, Value: 15, Tags: ParseTags("region=us-east,host=hostA")}, + {Time: 1, Value: 11, Tags: ParseTags("region=us-west,host=hostB")}, + {Time: 2, Value: 10, Tags: ParseTags("region=us-east,host=hostA")}, + {Time: 1, Value: 10, Tags: ParseTags("region=us-west,host=hostA")}, + + {Time: 5, Value: 20, Tags: ParseTags("region=us-east,host=hostA")}, + + {Time: 23, Value: 8, Tags: ParseTags("region=us-west,host=hostB")}, + }}, + influxql.IteratorOptions{ + Expr: MustParseExpr(`sum("value")`), + Dimensions: []string{"host"}, + Interval: influxql.Interval{Duration: 5 * time.Nanosecond}, + }, + ) + + if a, err := Iterators([]influxql.Iterator{itr}).ReadAll(); err != nil { + t.Fatalf("unexpected error: %s", err) + } else if !deep.Equal(a, [][]influxql.Point{ + {&influxql.IntegerPoint{Time: 0, Value: 35, Tags: ParseTags("host=hostA"), Aggregated: 3}}, + {&influxql.IntegerPoint{Time: 0, Value: 11, Tags: ParseTags("host=hostB"), Aggregated: 1}}, + {&influxql.IntegerPoint{Time: 5, Value: 20, Tags: ParseTags("host=hostA"), Aggregated: 1}}, + {&influxql.IntegerPoint{Time: 20, Value: 8, Tags: ParseTags("host=hostB"), Aggregated: 1}}, + }) { + t.Fatalf("unexpected points: %s", spew.Sdump(a)) + } +} + +// Ensure that a float iterator can be created for a first() call. +func TestCallIterator_First_Float(t *testing.T) { + itr, _ := influxql.NewCallIterator( + &FloatIterator{Points: []influxql.FloatPoint{ + {Time: 1, Value: 11, Tags: ParseTags("region=us-west,host=hostB")}, + {Time: 2, Value: 10, Tags: ParseTags("region=us-east,host=hostA")}, + {Time: 0, Value: 15, Tags: ParseTags("region=us-east,host=hostA")}, + {Time: 1, Value: 10, Tags: ParseTags("region=us-west,host=hostA")}, + + {Time: 6, Value: 20, Tags: ParseTags("region=us-east,host=hostA")}, + + {Time: 23, Value: 8, Tags: ParseTags("region=us-west,host=hostB")}, + }}, + influxql.IteratorOptions{ + Expr: MustParseExpr(`first("value")`), + Dimensions: []string{"host"}, + Interval: influxql.Interval{Duration: 5 * time.Nanosecond}, + }, + ) + + if a, err := Iterators([]influxql.Iterator{itr}).ReadAll(); err != nil { + t.Fatalf("unexpected error: %s", err) + } else if !deep.Equal(a, [][]influxql.Point{ + {&influxql.FloatPoint{Time: 0, Value: 15, Tags: ParseTags("host=hostA"), Aggregated: 3}}, + {&influxql.FloatPoint{Time: 1, Value: 11, Tags: ParseTags("host=hostB"), Aggregated: 1}}, + {&influxql.FloatPoint{Time: 6, Value: 20, Tags: ParseTags("host=hostA"), Aggregated: 1}}, + {&influxql.FloatPoint{Time: 23, Value: 8, Tags: ParseTags("host=hostB"), Aggregated: 1}}, + }) { + t.Fatalf("unexpected points: %s", spew.Sdump(a)) + } +} + +// Ensure that an integer iterator can be created for a first() call. +func TestCallIterator_First_Integer(t *testing.T) { + itr, _ := influxql.NewCallIterator( + &IntegerIterator{Points: []influxql.IntegerPoint{ + {Time: 1, Value: 11, Tags: ParseTags("region=us-west,host=hostB")}, + {Time: 2, Value: 10, Tags: ParseTags("region=us-east,host=hostA")}, + {Time: 0, Value: 15, Tags: ParseTags("region=us-east,host=hostA")}, + {Time: 1, Value: 10, Tags: ParseTags("region=us-west,host=hostA")}, + + {Time: 6, Value: 20, Tags: ParseTags("region=us-east,host=hostA")}, + + {Time: 23, Value: 8, Tags: ParseTags("region=us-west,host=hostB")}, + }}, + influxql.IteratorOptions{ + Expr: MustParseExpr(`first("value")`), + Dimensions: []string{"host"}, + Interval: influxql.Interval{Duration: 5 * time.Nanosecond}, + }, + ) + + if a, err := Iterators([]influxql.Iterator{itr}).ReadAll(); err != nil { + t.Fatalf("unexpected error: %s", err) + } else if !deep.Equal(a, [][]influxql.Point{ + {&influxql.IntegerPoint{Time: 0, Value: 15, Tags: ParseTags("host=hostA"), Aggregated: 3}}, + {&influxql.IntegerPoint{Time: 1, Value: 11, Tags: ParseTags("host=hostB"), Aggregated: 1}}, + {&influxql.IntegerPoint{Time: 6, Value: 20, Tags: ParseTags("host=hostA"), Aggregated: 1}}, + {&influxql.IntegerPoint{Time: 23, Value: 8, Tags: ParseTags("host=hostB"), Aggregated: 1}}, + }) { + t.Fatalf("unexpected points: %s", spew.Sdump(a)) + } +} + +// Ensure that a string iterator can be created for a first() call. +func TestCallIterator_First_String(t *testing.T) { + itr, _ := influxql.NewCallIterator( + &StringIterator{Points: []influxql.StringPoint{ + {Time: 1, Value: "c", Tags: ParseTags("region=us-west,host=hostB")}, + {Time: 2, Value: "b", Tags: ParseTags("region=us-east,host=hostA")}, + {Time: 0, Value: "d", Tags: ParseTags("region=us-east,host=hostA")}, + {Time: 1, Value: "b", Tags: ParseTags("region=us-west,host=hostA")}, + + {Time: 6, Value: "e", Tags: ParseTags("region=us-east,host=hostA")}, + + {Time: 23, Value: "a", Tags: ParseTags("region=us-west,host=hostB")}, + }}, + influxql.IteratorOptions{ + Expr: MustParseExpr(`first("value")`), + Dimensions: []string{"host"}, + Interval: influxql.Interval{Duration: 5 * time.Nanosecond}, + }, + ) + + if a, err := Iterators([]influxql.Iterator{itr}).ReadAll(); err != nil { + t.Fatalf("unexpected error: %s", err) + } else if !deep.Equal(a, [][]influxql.Point{ + {&influxql.StringPoint{Time: 0, Value: "d", Tags: ParseTags("host=hostA"), Aggregated: 3}}, + {&influxql.StringPoint{Time: 1, Value: "c", Tags: ParseTags("host=hostB"), Aggregated: 1}}, + {&influxql.StringPoint{Time: 6, Value: "e", Tags: ParseTags("host=hostA"), Aggregated: 1}}, + {&influxql.StringPoint{Time: 23, Value: "a", Tags: ParseTags("host=hostB"), Aggregated: 1}}, + }) { + t.Fatalf("unexpected points: %s", spew.Sdump(a)) + } +} + +// Ensure that a boolean iterator can be created for a first() call. +func TestCallIterator_First_Boolean(t *testing.T) { + itr, _ := influxql.NewCallIterator( + &BooleanIterator{Points: []influxql.BooleanPoint{ + {Time: 1, Value: true, Tags: ParseTags("region=us-west,host=hostB")}, + {Time: 2, Value: false, Tags: ParseTags("region=us-east,host=hostA")}, + {Time: 0, Value: true, Tags: ParseTags("region=us-east,host=hostA")}, + {Time: 1, Value: false, Tags: ParseTags("region=us-west,host=hostA")}, + + {Time: 6, Value: false, Tags: ParseTags("region=us-east,host=hostA")}, + + {Time: 23, Value: false, Tags: ParseTags("region=us-west,host=hostB")}, + }}, + influxql.IteratorOptions{ + Expr: MustParseExpr(`first("value")`), + Dimensions: []string{"host"}, + Interval: influxql.Interval{Duration: 5 * time.Nanosecond}, + }, + ) + + if a, err := Iterators([]influxql.Iterator{itr}).ReadAll(); err != nil { + t.Fatalf("unexpected error: %s", err) + } else if !deep.Equal(a, [][]influxql.Point{ + {&influxql.BooleanPoint{Time: 0, Value: true, Tags: ParseTags("host=hostA"), Aggregated: 3}}, + {&influxql.BooleanPoint{Time: 1, Value: true, Tags: ParseTags("host=hostB"), Aggregated: 1}}, + {&influxql.BooleanPoint{Time: 6, Value: false, Tags: ParseTags("host=hostA"), Aggregated: 1}}, + {&influxql.BooleanPoint{Time: 23, Value: false, Tags: ParseTags("host=hostB"), Aggregated: 1}}, + }) { + t.Fatalf("unexpected points: %s", spew.Sdump(a)) + } +} + +// Ensure that a float iterator can be created for a last() call. +func TestCallIterator_Last_Float(t *testing.T) { + itr, _ := influxql.NewCallIterator( + &FloatIterator{Points: []influxql.FloatPoint{ + {Time: 1, Value: 11, Tags: ParseTags("region=us-west,host=hostB")}, + {Time: 2, Value: 10, Tags: ParseTags("region=us-east,host=hostA")}, + {Time: 0, Value: 15, Tags: ParseTags("region=us-east,host=hostA")}, + {Time: 1, Value: 10, Tags: ParseTags("region=us-west,host=hostA")}, + + {Time: 6, Value: 20, Tags: ParseTags("region=us-east,host=hostA")}, + + {Time: 23, Value: 8, Tags: ParseTags("region=us-west,host=hostB")}, + }}, + influxql.IteratorOptions{ + Expr: MustParseExpr(`last("value")`), + Dimensions: []string{"host"}, + Interval: influxql.Interval{Duration: 5 * time.Nanosecond}, + }, + ) + + if a, err := Iterators([]influxql.Iterator{itr}).ReadAll(); err != nil { + t.Fatalf("unexpected error: %s", err) + } else if !deep.Equal(a, [][]influxql.Point{ + {&influxql.FloatPoint{Time: 2, Value: 10, Tags: ParseTags("host=hostA"), Aggregated: 3}}, + {&influxql.FloatPoint{Time: 1, Value: 11, Tags: ParseTags("host=hostB"), Aggregated: 1}}, + {&influxql.FloatPoint{Time: 6, Value: 20, Tags: ParseTags("host=hostA"), Aggregated: 1}}, + {&influxql.FloatPoint{Time: 23, Value: 8, Tags: ParseTags("host=hostB"), Aggregated: 1}}, + }) { + t.Fatalf("unexpected points: %s", spew.Sdump(a)) + } +} + +// Ensure that an integer iterator can be created for a last() call. +func TestCallIterator_Last_Integer(t *testing.T) { + itr, _ := influxql.NewCallIterator( + &IntegerIterator{Points: []influxql.IntegerPoint{ + {Time: 1, Value: 11, Tags: ParseTags("region=us-west,host=hostB")}, + {Time: 2, Value: 10, Tags: ParseTags("region=us-east,host=hostA")}, + {Time: 0, Value: 15, Tags: ParseTags("region=us-east,host=hostA")}, + {Time: 1, Value: 10, Tags: ParseTags("region=us-west,host=hostA")}, + + {Time: 6, Value: 20, Tags: ParseTags("region=us-east,host=hostA")}, + + {Time: 23, Value: 8, Tags: ParseTags("region=us-west,host=hostB")}, + }}, + influxql.IteratorOptions{ + Expr: MustParseExpr(`last("value")`), + Dimensions: []string{"host"}, + Interval: influxql.Interval{Duration: 5 * time.Nanosecond}, + }, + ) + + if a, err := Iterators([]influxql.Iterator{itr}).ReadAll(); err != nil { + t.Fatalf("unexpected error: %s", err) + } else if !deep.Equal(a, [][]influxql.Point{ + {&influxql.IntegerPoint{Time: 2, Value: 10, Tags: ParseTags("host=hostA"), Aggregated: 3}}, + {&influxql.IntegerPoint{Time: 1, Value: 11, Tags: ParseTags("host=hostB"), Aggregated: 1}}, + {&influxql.IntegerPoint{Time: 6, Value: 20, Tags: ParseTags("host=hostA"), Aggregated: 1}}, + {&influxql.IntegerPoint{Time: 23, Value: 8, Tags: ParseTags("host=hostB"), Aggregated: 1}}, + }) { + t.Fatalf("unexpected points: %s", spew.Sdump(a)) + } +} + +// Ensure that a string iterator can be created for a last() call. +func TestCallIterator_Last_String(t *testing.T) { + itr, _ := influxql.NewCallIterator( + &StringIterator{Points: []influxql.StringPoint{ + {Time: 1, Value: "c", Tags: ParseTags("region=us-west,host=hostB")}, + {Time: 2, Value: "b", Tags: ParseTags("region=us-east,host=hostA")}, + {Time: 0, Value: "d", Tags: ParseTags("region=us-east,host=hostA")}, + {Time: 1, Value: "b", Tags: ParseTags("region=us-west,host=hostA")}, + + {Time: 6, Value: "e", Tags: ParseTags("region=us-east,host=hostA")}, + + {Time: 23, Value: "a", Tags: ParseTags("region=us-west,host=hostB")}, + }}, + influxql.IteratorOptions{ + Expr: MustParseExpr(`last("value")`), + Dimensions: []string{"host"}, + Interval: influxql.Interval{Duration: 5 * time.Nanosecond}, + }, + ) + + if a, err := Iterators([]influxql.Iterator{itr}).ReadAll(); err != nil { + t.Fatalf("unexpected error: %s", err) + } else if !deep.Equal(a, [][]influxql.Point{ + {&influxql.StringPoint{Time: 2, Value: "b", Tags: ParseTags("host=hostA"), Aggregated: 3}}, + {&influxql.StringPoint{Time: 1, Value: "c", Tags: ParseTags("host=hostB"), Aggregated: 1}}, + {&influxql.StringPoint{Time: 6, Value: "e", Tags: ParseTags("host=hostA"), Aggregated: 1}}, + {&influxql.StringPoint{Time: 23, Value: "a", Tags: ParseTags("host=hostB"), Aggregated: 1}}, + }) { + t.Fatalf("unexpected points: %s", spew.Sdump(a)) + } +} + +// Ensure that a boolean iterator can be created for a last() call. +func TestCallIterator_Last_Boolean(t *testing.T) { + itr, _ := influxql.NewCallIterator( + &BooleanIterator{Points: []influxql.BooleanPoint{ + {Time: 1, Value: true, Tags: ParseTags("region=us-west,host=hostB")}, + {Time: 2, Value: false, Tags: ParseTags("region=us-east,host=hostA")}, + {Time: 0, Value: true, Tags: ParseTags("region=us-east,host=hostA")}, + {Time: 1, Value: false, Tags: ParseTags("region=us-west,host=hostA")}, + + {Time: 6, Value: false, Tags: ParseTags("region=us-east,host=hostA")}, + + {Time: 23, Value: false, Tags: ParseTags("region=us-west,host=hostB")}, + }}, + influxql.IteratorOptions{ + Expr: MustParseExpr(`last("value")`), + Dimensions: []string{"host"}, + Interval: influxql.Interval{Duration: 5 * time.Nanosecond}, + }, + ) + + if a, err := Iterators([]influxql.Iterator{itr}).ReadAll(); err != nil { + t.Fatalf("unexpected error: %s", err) + } else if !deep.Equal(a, [][]influxql.Point{ + {&influxql.BooleanPoint{Time: 2, Value: false, Tags: ParseTags("host=hostA"), Aggregated: 3}}, + {&influxql.BooleanPoint{Time: 1, Value: true, Tags: ParseTags("host=hostB"), Aggregated: 1}}, + {&influxql.BooleanPoint{Time: 6, Value: false, Tags: ParseTags("host=hostA"), Aggregated: 1}}, + {&influxql.BooleanPoint{Time: 23, Value: false, Tags: ParseTags("host=hostB"), Aggregated: 1}}, + }) { + t.Fatalf("unexpected points: %s", spew.Sdump(a)) + } +} + +func TestNewCallIterator_UnsupportedExprName(t *testing.T) { + _, err := influxql.NewCallIterator( + &FloatIterator{}, + influxql.IteratorOptions{ + Expr: MustParseExpr(`foobar("value")`), + }, + ) + + if err == nil || err.Error() != "unsupported function call: foobar" { + t.Errorf("unexpected error: %s", err) + } +} + +func BenchmarkCountIterator_1K(b *testing.B) { benchmarkCountIterator(b, 1000) } +func BenchmarkCountIterator_100K(b *testing.B) { benchmarkCountIterator(b, 100000) } +func BenchmarkCountIterator_1M(b *testing.B) { benchmarkCountIterator(b, 1000000) } + +func benchmarkCountIterator(b *testing.B, pointN int) { + benchmarkCallIterator(b, influxql.IteratorOptions{ + Expr: MustParseExpr("count(value)"), + StartTime: influxql.MinTime, + EndTime: influxql.MaxTime, + }, pointN) +} + +func benchmarkCallIterator(b *testing.B, opt influxql.IteratorOptions, pointN int) { + b.ReportAllocs() + + for i := 0; i < b.N; i++ { + // Create a lightweight point generator. + p := influxql.FloatPoint{Name: "cpu", Value: 100} + input := FloatPointGenerator{ + N: pointN, + Fn: func(i int) *influxql.FloatPoint { return &p }, + } + + // Execute call against input. + itr, err := influxql.NewCallIterator(&input, opt) + if err != nil { + b.Fatal(err) + } + influxql.DrainIterator(itr) + } +} + +func BenchmarkDistinctIterator_1K(b *testing.B) { benchmarkDistinctIterator(b, 1000) } +func BenchmarkDistinctIterator_100K(b *testing.B) { benchmarkDistinctIterator(b, 100000) } +func BenchmarkDistinctIterator_1M(b *testing.B) { benchmarkDistinctIterator(b, 1000000) } + +func benchmarkDistinctIterator(b *testing.B, pointN int) { + b.ReportAllocs() + + for i := 0; i < b.N; i++ { + // Create a lightweight point generator. + p := influxql.FloatPoint{Name: "cpu"} + input := FloatPointGenerator{ + N: pointN, + Fn: func(i int) *influxql.FloatPoint { + p.Value = float64(i % 10) + return &p + }, + } + + // Execute call against input. + itr, err := influxql.NewDistinctIterator(&input, influxql.IteratorOptions{}) + if err != nil { + b.Fatal(err) + } + influxql.DrainIterator(itr) + } +} + +type FloatPointGenerator struct { + i int + N int + Fn func(i int) *influxql.FloatPoint +} + +func (g *FloatPointGenerator) Close() error { return nil } +func (g *FloatPointGenerator) Stats() influxql.IteratorStats { return influxql.IteratorStats{} } + +func (g *FloatPointGenerator) Next() (*influxql.FloatPoint, error) { + if g.i == g.N { + return nil, nil + } + p := g.Fn(g.i) + g.i++ + return p, nil +} diff --git a/vendor/github.com/influxdata/influxdb/influxql/emitter_test.go b/vendor/github.com/influxdata/influxdb/influxql/emitter_test.go new file mode 100644 index 000000000..8340a3fed --- /dev/null +++ b/vendor/github.com/influxdata/influxdb/influxql/emitter_test.go @@ -0,0 +1,124 @@ +package influxql_test + +import ( + "testing" + "time" + + "github.com/davecgh/go-spew/spew" + "github.com/influxdata/influxdb/influxql" + "github.com/influxdata/influxdb/models" + "github.com/influxdata/influxdb/pkg/deep" +) + +// Ensure the emitter can group iterators together into rows. +func TestEmitter_Emit(t *testing.T) { + // Build an emitter that pulls from two iterators. + e := influxql.NewEmitter([]influxql.Iterator{ + &FloatIterator{Points: []influxql.FloatPoint{ + {Name: "cpu", Tags: ParseTags("region=west"), Time: 0, Value: 1}, + {Name: "cpu", Tags: ParseTags("region=west"), Time: 1, Value: 2}, + }}, + &FloatIterator{Points: []influxql.FloatPoint{ + {Name: "cpu", Tags: ParseTags("region=west"), Time: 1, Value: 4}, + {Name: "cpu", Tags: ParseTags("region=north"), Time: 0, Value: 4}, + {Name: "mem", Time: 4, Value: 5}, + }}, + }, true, 0) + e.Columns = []string{"col1", "col2"} + + // Verify the cpu region=west is emitted first. + if row, err := e.Emit(); err != nil { + t.Fatalf("unexpected error(0): %s", err) + } else if !deep.Equal(row, &models.Row{ + Name: "cpu", + Tags: map[string]string{"region": "west"}, + Columns: []string{"col1", "col2"}, + Values: [][]interface{}{ + {time.Unix(0, 0).UTC(), float64(1), nil}, + {time.Unix(0, 1).UTC(), float64(2), float64(4)}, + }, + }) { + t.Fatalf("unexpected row(0): %s", spew.Sdump(row)) + } + + // Verify the cpu region=north is emitted next. + if row, err := e.Emit(); err != nil { + t.Fatalf("unexpected error(1): %s", err) + } else if !deep.Equal(row, &models.Row{ + Name: "cpu", + Tags: map[string]string{"region": "north"}, + Columns: []string{"col1", "col2"}, + Values: [][]interface{}{ + {time.Unix(0, 0).UTC(), nil, float64(4)}, + }, + }) { + t.Fatalf("unexpected row(1): %s", spew.Sdump(row)) + } + + // Verify the mem series is emitted last. + if row, err := e.Emit(); err != nil { + t.Fatalf("unexpected error(2): %s", err) + } else if !deep.Equal(row, &models.Row{ + Name: "mem", + Columns: []string{"col1", "col2"}, + Values: [][]interface{}{ + {time.Unix(0, 4).UTC(), nil, float64(5)}, + }, + }) { + t.Fatalf("unexpected row(2): %s", spew.Sdump(row)) + } + + // Verify EOF. + if row, err := e.Emit(); err != nil { + t.Fatalf("unexpected error(eof): %s", err) + } else if row != nil { + t.Fatalf("unexpected eof: %s", spew.Sdump(row)) + } +} + +// Ensure the emitter will limit the chunked output from a series. +func TestEmitter_ChunkSize(t *testing.T) { + // Build an emitter that pulls from one iterator with multiple points in the same series. + e := influxql.NewEmitter([]influxql.Iterator{ + &FloatIterator{Points: []influxql.FloatPoint{ + {Name: "cpu", Tags: ParseTags("region=west"), Time: 0, Value: 1}, + {Name: "cpu", Tags: ParseTags("region=west"), Time: 1, Value: 2}, + }}, + }, true, 1) + e.Columns = []string{"col1"} + + // Verify the cpu region=west is emitted first. + if row, err := e.Emit(); err != nil { + t.Fatalf("unexpected error(0): %s", err) + } else if !deep.Equal(row, &models.Row{ + Name: "cpu", + Tags: map[string]string{"region": "west"}, + Columns: []string{"col1"}, + Values: [][]interface{}{ + {time.Unix(0, 0).UTC(), float64(1)}, + }, + }) { + t.Fatalf("unexpected row(0): %s", spew.Sdump(row)) + } + + // Verify the cpu region=north is emitted next. + if row, err := e.Emit(); err != nil { + t.Fatalf("unexpected error(1): %s", err) + } else if !deep.Equal(row, &models.Row{ + Name: "cpu", + Tags: map[string]string{"region": "west"}, + Columns: []string{"col1"}, + Values: [][]interface{}{ + {time.Unix(0, 1).UTC(), float64(2)}, + }, + }) { + t.Fatalf("unexpected row(1): %s", spew.Sdump(row)) + } + + // Verify EOF. + if row, err := e.Emit(); err != nil { + t.Fatalf("unexpected error(eof): %s", err) + } else if row != nil { + t.Fatalf("unexpected eof: %s", spew.Sdump(row)) + } +} diff --git a/vendor/github.com/influxdata/influxdb/influxql/functions_test.go b/vendor/github.com/influxdata/influxdb/influxql/functions_test.go new file mode 100644 index 000000000..cc2b91f00 --- /dev/null +++ b/vendor/github.com/influxdata/influxdb/influxql/functions_test.go @@ -0,0 +1,386 @@ +package influxql_test + +import ( + "math" + "testing" + "time" + + "github.com/influxdata/influxdb/influxql" +) + +func almostEqual(got, exp float64) bool { + return math.Abs(got-exp) < 1e-5 && !math.IsNaN(got) +} + +func TestHoltWinters_AusTourists(t *testing.T) { + hw := influxql.NewFloatHoltWintersReducer(10, 4, false, 1) + // Dataset from http://www.inside-r.org/packages/cran/fpp/docs/austourists + austourists := []influxql.FloatPoint{ + {Time: 1, Value: 30.052513}, + {Time: 2, Value: 19.148496}, + {Time: 3, Value: 25.317692}, + {Time: 4, Value: 27.591437}, + {Time: 5, Value: 32.076456}, + {Time: 6, Value: 23.487961}, + {Time: 7, Value: 28.47594}, + {Time: 8, Value: 35.123753}, + {Time: 9, Value: 36.838485}, + {Time: 10, Value: 25.007017}, + {Time: 11, Value: 30.72223}, + {Time: 12, Value: 28.693759}, + {Time: 13, Value: 36.640986}, + {Time: 14, Value: 23.824609}, + {Time: 15, Value: 29.311683}, + {Time: 16, Value: 31.770309}, + {Time: 17, Value: 35.177877}, + {Time: 18, Value: 19.775244}, + {Time: 19, Value: 29.60175}, + {Time: 20, Value: 34.538842}, + {Time: 21, Value: 41.273599}, + {Time: 22, Value: 26.655862}, + {Time: 23, Value: 28.279859}, + {Time: 24, Value: 35.191153}, + {Time: 25, Value: 41.727458}, + {Time: 26, Value: 24.04185}, + {Time: 27, Value: 32.328103}, + {Time: 28, Value: 37.328708}, + {Time: 29, Value: 46.213153}, + {Time: 30, Value: 29.346326}, + {Time: 31, Value: 36.48291}, + {Time: 32, Value: 42.977719}, + {Time: 33, Value: 48.901525}, + {Time: 34, Value: 31.180221}, + {Time: 35, Value: 37.717881}, + {Time: 36, Value: 40.420211}, + {Time: 37, Value: 51.206863}, + {Time: 38, Value: 31.887228}, + {Time: 39, Value: 40.978263}, + {Time: 40, Value: 43.772491}, + {Time: 41, Value: 55.558567}, + {Time: 42, Value: 33.850915}, + {Time: 43, Value: 42.076383}, + {Time: 44, Value: 45.642292}, + {Time: 45, Value: 59.76678}, + {Time: 46, Value: 35.191877}, + {Time: 47, Value: 44.319737}, + {Time: 48, Value: 47.913736}, + } + + for _, p := range austourists { + hw.AggregateFloat(&p) + } + points := hw.Emit() + + forecasted := []influxql.FloatPoint{ + {Time: 49, Value: 51.85064132137853}, + {Time: 50, Value: 43.26055282315273}, + {Time: 51, Value: 41.827258044814464}, + {Time: 52, Value: 54.3990354591749}, + {Time: 53, Value: 54.62334472770803}, + {Time: 54, Value: 45.57155693625209}, + {Time: 55, Value: 44.06051240252263}, + {Time: 56, Value: 57.30029870759433}, + {Time: 57, Value: 57.53591513519172}, + {Time: 58, Value: 47.999008139396096}, + } + + if exp, got := len(forecasted), len(points); exp != got { + t.Fatalf("unexpected number of points emitted: got %d exp %d", got, exp) + } + + for i := range forecasted { + if exp, got := forecasted[i].Time, points[i].Time; got != exp { + t.Errorf("unexpected time on points[%d] got %v exp %v", i, got, exp) + } + if exp, got := forecasted[i].Value, points[i].Value; !almostEqual(got, exp) { + t.Errorf("unexpected value on points[%d] got %v exp %v", i, got, exp) + } + } +} + +func TestHoltWinters_AusTourists_Missing(t *testing.T) { + hw := influxql.NewFloatHoltWintersReducer(10, 4, false, 1) + // Dataset from http://www.inside-r.org/packages/cran/fpp/docs/austourists + austourists := []influxql.FloatPoint{ + {Time: 1, Value: 30.052513}, + {Time: 3, Value: 25.317692}, + {Time: 4, Value: 27.591437}, + {Time: 5, Value: 32.076456}, + {Time: 6, Value: 23.487961}, + {Time: 7, Value: 28.47594}, + {Time: 9, Value: 36.838485}, + {Time: 10, Value: 25.007017}, + {Time: 11, Value: 30.72223}, + {Time: 12, Value: 28.693759}, + {Time: 13, Value: 36.640986}, + {Time: 14, Value: 23.824609}, + {Time: 15, Value: 29.311683}, + {Time: 16, Value: 31.770309}, + {Time: 17, Value: 35.177877}, + {Time: 19, Value: 29.60175}, + {Time: 20, Value: 34.538842}, + {Time: 21, Value: 41.273599}, + {Time: 22, Value: 26.655862}, + {Time: 23, Value: 28.279859}, + {Time: 24, Value: 35.191153}, + {Time: 25, Value: 41.727458}, + {Time: 26, Value: 24.04185}, + {Time: 27, Value: 32.328103}, + {Time: 28, Value: 37.328708}, + {Time: 30, Value: 29.346326}, + {Time: 31, Value: 36.48291}, + {Time: 32, Value: 42.977719}, + {Time: 34, Value: 31.180221}, + {Time: 35, Value: 37.717881}, + {Time: 36, Value: 40.420211}, + {Time: 37, Value: 51.206863}, + {Time: 38, Value: 31.887228}, + {Time: 41, Value: 55.558567}, + {Time: 42, Value: 33.850915}, + {Time: 43, Value: 42.076383}, + {Time: 44, Value: 45.642292}, + {Time: 45, Value: 59.76678}, + {Time: 46, Value: 35.191877}, + {Time: 47, Value: 44.319737}, + {Time: 48, Value: 47.913736}, + } + + for _, p := range austourists { + hw.AggregateFloat(&p) + } + points := hw.Emit() + + forecasted := []influxql.FloatPoint{ + {Time: 49, Value: 54.84533610387743}, + {Time: 50, Value: 41.19329421863249}, + {Time: 51, Value: 45.71673175112451}, + {Time: 52, Value: 56.05759298805955}, + {Time: 53, Value: 59.32337460282217}, + {Time: 54, Value: 44.75280096850461}, + {Time: 55, Value: 49.98865098113751}, + {Time: 56, Value: 61.86084934967605}, + {Time: 57, Value: 65.95805633454883}, + {Time: 58, Value: 50.1502170480547}, + } + + if exp, got := len(forecasted), len(points); exp != got { + t.Fatalf("unexpected number of points emitted: got %d exp %d", got, exp) + } + + for i := range forecasted { + if exp, got := forecasted[i].Time, points[i].Time; got != exp { + t.Errorf("unexpected time on points[%d] got %v exp %v", i, got, exp) + } + if exp, got := forecasted[i].Value, points[i].Value; !almostEqual(got, exp) { + t.Errorf("unexpected value on points[%d] got %v exp %v", i, got, exp) + } + } +} + +func TestHoltWinters_USPopulation(t *testing.T) { + series := []influxql.FloatPoint{ + {Time: 1, Value: 3.93}, + {Time: 2, Value: 5.31}, + {Time: 3, Value: 7.24}, + {Time: 4, Value: 9.64}, + {Time: 5, Value: 12.90}, + {Time: 6, Value: 17.10}, + {Time: 7, Value: 23.20}, + {Time: 8, Value: 31.40}, + {Time: 9, Value: 39.80}, + {Time: 10, Value: 50.20}, + {Time: 11, Value: 62.90}, + {Time: 12, Value: 76.00}, + {Time: 13, Value: 92.00}, + {Time: 14, Value: 105.70}, + {Time: 15, Value: 122.80}, + {Time: 16, Value: 131.70}, + {Time: 17, Value: 151.30}, + {Time: 18, Value: 179.30}, + {Time: 19, Value: 203.20}, + } + hw := influxql.NewFloatHoltWintersReducer(10, 0, true, 1) + for _, p := range series { + hw.AggregateFloat(&p) + } + points := hw.Emit() + + forecasted := []influxql.FloatPoint{ + {Time: 1, Value: 3.93}, + {Time: 2, Value: 4.957405463559748}, + {Time: 3, Value: 7.012210102535647}, + {Time: 4, Value: 10.099589257439924}, + {Time: 5, Value: 14.229926188104242}, + {Time: 6, Value: 19.418878968703797}, + {Time: 7, Value: 25.68749172281409}, + {Time: 8, Value: 33.062351305731305}, + {Time: 9, Value: 41.575791076125206}, + {Time: 10, Value: 51.26614395589263}, + {Time: 11, Value: 62.178047564264595}, + {Time: 12, Value: 74.36280483872488}, + {Time: 13, Value: 87.87880423073163}, + {Time: 14, Value: 102.79200429905801}, + {Time: 15, Value: 119.17648832929542}, + {Time: 16, Value: 137.11509549747296}, + {Time: 17, Value: 156.70013608313175}, + {Time: 18, Value: 178.03419933863566}, + {Time: 19, Value: 201.23106385518594}, + {Time: 20, Value: 226.4167216525905}, + {Time: 21, Value: 253.73052878285205}, + {Time: 22, Value: 283.32649700397553}, + {Time: 23, Value: 315.37474308085984}, + {Time: 24, Value: 350.06311454009256}, + {Time: 25, Value: 387.59901328556873}, + {Time: 26, Value: 428.21144141893404}, + {Time: 27, Value: 472.1532969569147}, + {Time: 28, Value: 519.7039509590035}, + {Time: 29, Value: 571.1721419458248}, + } + + if exp, got := len(forecasted), len(points); exp != got { + t.Fatalf("unexpected number of points emitted: got %d exp %d", got, exp) + } + for i := range forecasted { + if exp, got := forecasted[i].Time, points[i].Time; got != exp { + t.Errorf("unexpected time on points[%d] got %v exp %v", i, got, exp) + } + if exp, got := forecasted[i].Value, points[i].Value; !almostEqual(got, exp) { + t.Errorf("unexpected value on points[%d] got %v exp %v", i, got, exp) + } + } +} + +func TestHoltWinters_USPopulation_Missing(t *testing.T) { + series := []influxql.FloatPoint{ + {Time: 1, Value: 3.93}, + {Time: 2, Value: 5.31}, + {Time: 3, Value: 7.24}, + {Time: 4, Value: 9.64}, + {Time: 5, Value: 12.90}, + {Time: 6, Value: 17.10}, + {Time: 7, Value: 23.20}, + {Time: 8, Value: 31.40}, + {Time: 10, Value: 50.20}, + {Time: 11, Value: 62.90}, + {Time: 12, Value: 76.00}, + {Time: 13, Value: 92.00}, + {Time: 15, Value: 122.80}, + {Time: 16, Value: 131.70}, + {Time: 17, Value: 151.30}, + {Time: 19, Value: 203.20}, + } + hw := influxql.NewFloatHoltWintersReducer(10, 0, true, 1) + for _, p := range series { + hw.AggregateFloat(&p) + } + points := hw.Emit() + + forecasted := []influxql.FloatPoint{ + {Time: 1, Value: 3.93}, + {Time: 2, Value: 4.8931364428135105}, + {Time: 3, Value: 6.962653629047061}, + {Time: 4, Value: 10.056207765903274}, + {Time: 5, Value: 14.18435088129532}, + {Time: 6, Value: 19.362939306110846}, + {Time: 7, Value: 25.613247940326584}, + {Time: 8, Value: 32.96213087008264}, + {Time: 9, Value: 41.442230043017204}, + {Time: 10, Value: 51.09223428526052}, + {Time: 11, Value: 61.95719155158485}, + {Time: 12, Value: 74.08887794968567}, + {Time: 13, Value: 87.54622778052787}, + {Time: 14, Value: 102.39582960014131}, + {Time: 15, Value: 118.7124941463221}, + {Time: 16, Value: 136.57990089987464}, + {Time: 17, Value: 156.09133107941278}, + {Time: 18, Value: 177.35049601833734}, + {Time: 19, Value: 200.472471161683}, + {Time: 20, Value: 225.58474737097785}, + {Time: 21, Value: 252.82841286206823}, + {Time: 22, Value: 282.35948095261017}, + {Time: 23, Value: 314.3503808953992}, + {Time: 24, Value: 348.99163145856954}, + {Time: 25, Value: 386.49371962730555}, + {Time: 26, Value: 427.08920989407727}, + {Time: 27, Value: 471.0351131332573}, + {Time: 28, Value: 518.615548088049}, + {Time: 29, Value: 570.1447331101863}, + } + + if exp, got := len(forecasted), len(points); exp != got { + t.Fatalf("unexpected number of points emitted: got %d exp %d", got, exp) + } + for i := range forecasted { + if exp, got := forecasted[i].Time, points[i].Time; got != exp { + t.Errorf("unexpected time on points[%d] got %v exp %v", i, got, exp) + } + if exp, got := forecasted[i].Value, points[i].Value; !almostEqual(got, exp) { + t.Errorf("unexpected value on points[%d] got %v exp %v", i, got, exp) + } + } +} +func TestHoltWinters_RoundTime(t *testing.T) { + maxTime := time.Unix(0, influxql.MaxTime).Round(time.Second).UnixNano() + data := []influxql.FloatPoint{ + {Time: maxTime - int64(5*time.Second), Value: 1}, + {Time: maxTime - int64(4*time.Second+103*time.Millisecond), Value: 10}, + {Time: maxTime - int64(3*time.Second+223*time.Millisecond), Value: 2}, + {Time: maxTime - int64(2*time.Second+481*time.Millisecond), Value: 11}, + } + hw := influxql.NewFloatHoltWintersReducer(2, 2, true, time.Second) + for _, p := range data { + hw.AggregateFloat(&p) + } + points := hw.Emit() + + forecasted := []influxql.FloatPoint{ + {Time: maxTime - int64(5*time.Second), Value: 1}, + {Time: maxTime - int64(4*time.Second), Value: 10.006729104838234}, + {Time: maxTime - int64(3*time.Second), Value: 1.998341814469269}, + {Time: maxTime - int64(2*time.Second), Value: 10.997858830631172}, + {Time: maxTime - int64(1*time.Second), Value: 4.085860238030013}, + {Time: maxTime - int64(0*time.Second), Value: 11.35713604403339}, + } + + if exp, got := len(forecasted), len(points); exp != got { + t.Fatalf("unexpected number of points emitted: got %d exp %d", got, exp) + } + for i := range forecasted { + if exp, got := forecasted[i].Time, points[i].Time; got != exp { + t.Errorf("unexpected time on points[%d] got %v exp %v", i, got, exp) + } + if exp, got := forecasted[i].Value, points[i].Value; !almostEqual(got, exp) { + t.Errorf("unexpected value on points[%d] got %v exp %v", i, got, exp) + } + } +} + +func TestHoltWinters_MaxTime(t *testing.T) { + data := []influxql.FloatPoint{ + {Time: influxql.MaxTime - 1, Value: 1}, + {Time: influxql.MaxTime, Value: 2}, + } + hw := influxql.NewFloatHoltWintersReducer(1, 0, true, 1) + for _, p := range data { + hw.AggregateFloat(&p) + } + points := hw.Emit() + + forecasted := []influxql.FloatPoint{ + {Time: influxql.MaxTime - 1, Value: 1}, + {Time: influxql.MaxTime, Value: 2.001516944066403}, + {Time: influxql.MaxTime + 1, Value: 2.5365248972488343}, + } + + if exp, got := len(forecasted), len(points); exp != got { + t.Fatalf("unexpected number of points emitted: got %d exp %d", got, exp) + } + for i := range forecasted { + if exp, got := forecasted[i].Time, points[i].Time; got != exp { + t.Errorf("unexpected time on points[%d] got %v exp %v", i, got, exp) + } + if exp, got := forecasted[i].Value, points[i].Value; !almostEqual(got, exp) { + t.Errorf("unexpected value on points[%d] got %v exp %v", i, got, exp) + } + } +} diff --git a/vendor/github.com/influxdata/influxdb/influxql/internal/internal.pb.go b/vendor/github.com/influxdata/influxdb/influxql/internal/internal.pb.go index 2f8fa3979..a6f2c4b30 100644 --- a/vendor/github.com/influxdata/influxdb/influxql/internal/internal.pb.go +++ b/vendor/github.com/influxdata/influxdb/influxql/internal/internal.pb.go @@ -16,8 +16,6 @@ It has these top-level messages: Measurement Interval IteratorStats - Series - SeriesList VarRef */ package influxql @@ -431,54 +429,6 @@ func (m *IteratorStats) GetPointN() int64 { return 0 } -type Series struct { - Name *string `protobuf:"bytes,1,opt,name=Name" json:"Name,omitempty"` - Tags []byte `protobuf:"bytes,2,opt,name=Tags" json:"Tags,omitempty"` - Aux []uint32 `protobuf:"varint,3,rep,name=Aux" json:"Aux,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *Series) Reset() { *m = Series{} } -func (m *Series) String() string { return proto.CompactTextString(m) } -func (*Series) ProtoMessage() {} - -func (m *Series) GetName() string { - if m != nil && m.Name != nil { - return *m.Name - } - return "" -} - -func (m *Series) GetTags() []byte { - if m != nil { - return m.Tags - } - return nil -} - -func (m *Series) GetAux() []uint32 { - if m != nil { - return m.Aux - } - return nil -} - -type SeriesList struct { - Items []*Series `protobuf:"bytes,1,rep,name=Items" json:"Items,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *SeriesList) Reset() { *m = SeriesList{} } -func (m *SeriesList) String() string { return proto.CompactTextString(m) } -func (*SeriesList) ProtoMessage() {} - -func (m *SeriesList) GetItems() []*Series { - if m != nil { - return m.Items - } - return nil -} - type VarRef struct { Val *string `protobuf:"bytes,1,req,name=Val" json:"Val,omitempty"` Type *int32 `protobuf:"varint,2,opt,name=Type" json:"Type,omitempty"` @@ -511,7 +461,5 @@ func init() { proto.RegisterType((*Measurement)(nil), "influxql.Measurement") proto.RegisterType((*Interval)(nil), "influxql.Interval") proto.RegisterType((*IteratorStats)(nil), "influxql.IteratorStats") - proto.RegisterType((*Series)(nil), "influxql.Series") - proto.RegisterType((*SeriesList)(nil), "influxql.SeriesList") proto.RegisterType((*VarRef)(nil), "influxql.VarRef") } diff --git a/vendor/github.com/influxdata/influxdb/influxql/internal/internal.proto b/vendor/github.com/influxdata/influxdb/influxql/internal/internal.proto index 9e72f1727..5f15c9358 100644 --- a/vendor/github.com/influxdata/influxdb/influxql/internal/internal.proto +++ b/vendor/github.com/influxdata/influxdb/influxql/internal/internal.proto @@ -66,16 +66,6 @@ message IteratorStats { optional int64 PointN = 2; } -message Series { - optional string Name = 1; - optional bytes Tags = 2; - repeated uint32 Aux = 3; -} - -message SeriesList { - repeated Series Items = 1; -} - message VarRef { required string Val = 1; optional int32 Type = 2; diff --git a/vendor/github.com/influxdata/influxdb/influxql/iterator.gen.go b/vendor/github.com/influxdata/influxdb/influxql/iterator.gen.go index fecd45546..36671a4ca 100644 --- a/vendor/github.com/influxdata/influxdb/influxql/iterator.gen.go +++ b/vendor/github.com/influxdata/influxdb/influxql/iterator.gen.go @@ -750,6 +750,58 @@ func (itr *floatInterruptIterator) Next() (*FloatPoint, error) { return itr.input.Next() } +// floatCloseInterruptIterator represents a float implementation of CloseInterruptIterator. +type floatCloseInterruptIterator struct { + input FloatIterator + closing <-chan struct{} + done chan struct{} + once sync.Once +} + +func newFloatCloseInterruptIterator(input FloatIterator, closing <-chan struct{}) *floatCloseInterruptIterator { + itr := &floatCloseInterruptIterator{ + input: input, + closing: closing, + done: make(chan struct{}), + } + go itr.monitor() + return itr +} + +func (itr *floatCloseInterruptIterator) monitor() { + select { + case <-itr.closing: + itr.Close() + case <-itr.done: + } +} + +func (itr *floatCloseInterruptIterator) Stats() IteratorStats { + return itr.input.Stats() +} + +func (itr *floatCloseInterruptIterator) Close() error { + itr.once.Do(func() { + close(itr.done) + itr.input.Close() + }) + return nil +} + +func (itr *floatCloseInterruptIterator) Next() (*FloatPoint, error) { + p, err := itr.input.Next() + if err != nil { + // Check if the iterator was closed. + select { + case <-itr.done: + return nil, nil + default: + return nil, err + } + } + return p, nil +} + // auxFloatPoint represents a combination of a point and an error for the AuxIterator. type auxFloatPoint struct { point *FloatPoint @@ -2756,6 +2808,58 @@ func (itr *integerInterruptIterator) Next() (*IntegerPoint, error) { return itr.input.Next() } +// integerCloseInterruptIterator represents a integer implementation of CloseInterruptIterator. +type integerCloseInterruptIterator struct { + input IntegerIterator + closing <-chan struct{} + done chan struct{} + once sync.Once +} + +func newIntegerCloseInterruptIterator(input IntegerIterator, closing <-chan struct{}) *integerCloseInterruptIterator { + itr := &integerCloseInterruptIterator{ + input: input, + closing: closing, + done: make(chan struct{}), + } + go itr.monitor() + return itr +} + +func (itr *integerCloseInterruptIterator) monitor() { + select { + case <-itr.closing: + itr.Close() + case <-itr.done: + } +} + +func (itr *integerCloseInterruptIterator) Stats() IteratorStats { + return itr.input.Stats() +} + +func (itr *integerCloseInterruptIterator) Close() error { + itr.once.Do(func() { + close(itr.done) + itr.input.Close() + }) + return nil +} + +func (itr *integerCloseInterruptIterator) Next() (*IntegerPoint, error) { + p, err := itr.input.Next() + if err != nil { + // Check if the iterator was closed. + select { + case <-itr.done: + return nil, nil + default: + return nil, err + } + } + return p, nil +} + // auxIntegerPoint represents a combination of a point and an error for the AuxIterator. type auxIntegerPoint struct { point *IntegerPoint @@ -4759,6 +4863,58 @@ func (itr *stringInterruptIterator) Next() (*StringPoint, error) { return itr.input.Next() } +// stringCloseInterruptIterator represents a string implementation of CloseInterruptIterator. +type stringCloseInterruptIterator struct { + input StringIterator + closing <-chan struct{} + done chan struct{} + once sync.Once +} + +func newStringCloseInterruptIterator(input StringIterator, closing <-chan struct{}) *stringCloseInterruptIterator { + itr := &stringCloseInterruptIterator{ + input: input, + closing: closing, + done: make(chan struct{}), + } + go itr.monitor() + return itr +} + +func (itr *stringCloseInterruptIterator) monitor() { + select { + case <-itr.closing: + itr.Close() + case <-itr.done: + } +} + +func (itr *stringCloseInterruptIterator) Stats() IteratorStats { + return itr.input.Stats() +} + +func (itr *stringCloseInterruptIterator) Close() error { + itr.once.Do(func() { + close(itr.done) + itr.input.Close() + }) + return nil +} + +func (itr *stringCloseInterruptIterator) Next() (*StringPoint, error) { + p, err := itr.input.Next() + if err != nil { + // Check if the iterator was closed. + select { + case <-itr.done: + return nil, nil + default: + return nil, err + } + } + return p, nil +} + // auxStringPoint represents a combination of a point and an error for the AuxIterator. type auxStringPoint struct { point *StringPoint @@ -6762,6 +6918,58 @@ func (itr *booleanInterruptIterator) Next() (*BooleanPoint, error) { return itr.input.Next() } +// booleanCloseInterruptIterator represents a boolean implementation of CloseInterruptIterator. +type booleanCloseInterruptIterator struct { + input BooleanIterator + closing <-chan struct{} + done chan struct{} + once sync.Once +} + +func newBooleanCloseInterruptIterator(input BooleanIterator, closing <-chan struct{}) *booleanCloseInterruptIterator { + itr := &booleanCloseInterruptIterator{ + input: input, + closing: closing, + done: make(chan struct{}), + } + go itr.monitor() + return itr +} + +func (itr *booleanCloseInterruptIterator) monitor() { + select { + case <-itr.closing: + itr.Close() + case <-itr.done: + } +} + +func (itr *booleanCloseInterruptIterator) Stats() IteratorStats { + return itr.input.Stats() +} + +func (itr *booleanCloseInterruptIterator) Close() error { + itr.once.Do(func() { + close(itr.done) + itr.input.Close() + }) + return nil +} + +func (itr *booleanCloseInterruptIterator) Next() (*BooleanPoint, error) { + p, err := itr.input.Next() + if err != nil { + // Check if the iterator was closed. + select { + case <-itr.done: + return nil, nil + default: + return nil, err + } + } + return p, nil +} + // auxBooleanPoint represents a combination of a point and an error for the AuxIterator. type auxBooleanPoint struct { point *BooleanPoint diff --git a/vendor/github.com/influxdata/influxdb/influxql/iterator.gen.go.tmpl b/vendor/github.com/influxdata/influxdb/influxql/iterator.gen.go.tmpl index 7273d5c83..2786c6e25 100644 --- a/vendor/github.com/influxdata/influxdb/influxql/iterator.gen.go.tmpl +++ b/vendor/github.com/influxdata/influxdb/influxql/iterator.gen.go.tmpl @@ -478,7 +478,7 @@ func (itr *{{$k.name}}ParallelIterator) monitor() { for { // Read next point. p, err := itr.input.Next() - + select { case <-itr.closing: return @@ -748,6 +748,58 @@ func (itr *{{$k.name}}InterruptIterator) Next() (*{{$k.Name}}Point, error) { return itr.input.Next() } +// {{$k.name}}CloseInterruptIterator represents a {{$k.name}} implementation of CloseInterruptIterator. +type {{$k.name}}CloseInterruptIterator struct { + input {{$k.Name}}Iterator + closing <-chan struct{} + done chan struct{} + once sync.Once +} + +func new{{$k.Name}}CloseInterruptIterator(input {{$k.Name}}Iterator, closing <-chan struct{}) *{{$k.name}}CloseInterruptIterator { + itr := &{{$k.name}}CloseInterruptIterator{ + input: input, + closing: closing, + done: make(chan struct{}), + } + go itr.monitor() + return itr +} + +func (itr *{{$k.name}}CloseInterruptIterator) monitor() { + select { + case <-itr.closing: + itr.Close() + case <-itr.done: + } +} + +func (itr *{{$k.name}}CloseInterruptIterator) Stats() IteratorStats { + return itr.input.Stats() +} + +func (itr *{{$k.name}}CloseInterruptIterator) Close() error { + itr.once.Do(func() { + close(itr.done) + itr.input.Close() + }) + return nil +} + +func (itr *{{$k.name}}CloseInterruptIterator) Next() (*{{$k.Name}}Point, error) { + p, err := itr.input.Next() + if err != nil { + // Check if the iterator was closed. + select { + case <-itr.done: + return nil, nil + default: + return nil, err + } + } + return p, nil +} + // aux{{$k.Name}}Point represents a combination of a point and an error for the AuxIterator. type aux{{$k.Name}}Point struct { point *{{$k.Name}}Point diff --git a/vendor/github.com/influxdata/influxdb/influxql/iterator.go b/vendor/github.com/influxdata/influxdb/influxql/iterator.go index 92dcb1f69..b2beedfed 100644 --- a/vendor/github.com/influxdata/influxdb/influxql/iterator.go +++ b/vendor/github.com/influxdata/influxdb/influxql/iterator.go @@ -336,7 +336,24 @@ func NewInterruptIterator(input Iterator, closing <-chan struct{}) Iterator { case BooleanIterator: return newBooleanInterruptIterator(input, closing) default: - panic(fmt.Sprintf("unsupported fill iterator type: %T", input)) + panic(fmt.Sprintf("unsupported interrupt iterator type: %T", input)) + } +} + +// NewCloseInterruptIterator returns an iterator that will invoke the Close() method on an +// iterator when a channel has been closed. +func NewCloseInterruptIterator(input Iterator, closing <-chan struct{}) Iterator { + switch input := input.(type) { + case FloatIterator: + return newFloatCloseInterruptIterator(input, closing) + case IntegerIterator: + return newIntegerCloseInterruptIterator(input, closing) + case StringIterator: + return newStringCloseInterruptIterator(input, closing) + case BooleanIterator: + return newBooleanCloseInterruptIterator(input, closing) + default: + panic(fmt.Sprintf("unsupported close iterator iterator type: %T", input)) } } @@ -551,18 +568,18 @@ func DrainIterators(itrs []Iterator) { } // NewReaderIterator returns an iterator that streams from a reader. -func NewReaderIterator(r io.Reader, typ DataType, stats IteratorStats) (Iterator, error) { +func NewReaderIterator(r io.Reader, typ DataType, stats IteratorStats) Iterator { switch typ { case Float: - return newFloatReaderIterator(r, stats), nil + return newFloatReaderIterator(r, stats) case Integer: - return newIntegerReaderIterator(r, stats), nil + return newIntegerReaderIterator(r, stats) case String: - return newStringReaderIterator(r, stats), nil + return newStringReaderIterator(r, stats) case Boolean: - return newBooleanReaderIterator(r, stats), nil + return newBooleanReaderIterator(r, stats) default: - return &nilFloatIterator{}, nil + return &nilFloatIterator{} } } @@ -1007,110 +1024,6 @@ func (v *selectInfo) Visit(n Node) Visitor { return v } -// Series represents a series that will be returned by the iterator. -type Series struct { - Name string - Tags Tags - Aux []DataType -} - -// ID is a single string that combines the name and tags id for the series. -func (s *Series) ID() string { - return s.Name + "\x00" + s.Tags.ID() -} - -// Combine combines two series with the same name and tags. -// It will promote auxiliary iterator types to the highest type. -func (s *Series) Combine(other *Series) { - for i, t := range s.Aux { - if other.Aux[i] == Unknown { - continue - } - - if t == Unknown || other.Aux[i] < t { - s.Aux[i] = other.Aux[i] - } - } -} - -func encodeSeries(s Series) *internal.Series { - aux := make([]uint32, len(s.Aux)) - for i := range s.Aux { - aux[i] = uint32(s.Aux[i]) - } - - return &internal.Series{ - Name: proto.String(s.Name), - Tags: encodeTags(s.Tags.KeyValues()), - Aux: aux, - } -} - -func decodeSeries(pb *internal.Series) Series { - var aux []DataType - if len(pb.GetAux()) > 0 { - aux = make([]DataType, len(pb.GetAux())) - for i := range pb.GetAux() { - aux[i] = DataType(pb.GetAux()[i]) - } - } - - return Series{ - Name: pb.GetName(), - Tags: newTagsID(string(pb.GetTags())), - Aux: aux, - } -} - -// SeriesList is a list of series that will be returned by an iterator. -type SeriesList []Series - -func (a SeriesList) Len() int { return len(a) } -func (a SeriesList) Swap(i, j int) { a[i], a[j] = a[j], a[i] } - -func (a SeriesList) Less(i, j int) bool { - if a[i].Name != a[j].Name { - return a[i].Name < a[j].Name - } - return a[i].Tags.ID() < a[j].Tags.ID() -} - -// MarshalBinary encodes list into a binary format. -func (a SeriesList) MarshalBinary() ([]byte, error) { - return proto.Marshal(encodeSeriesList(a)) -} - -// UnmarshalBinary decodes from a binary format. -func (a *SeriesList) UnmarshalBinary(buf []byte) error { - var pb internal.SeriesList - if err := proto.Unmarshal(buf, &pb); err != nil { - return err - } - - (*a) = decodeSeriesList(&pb) - - return nil -} - -func encodeSeriesList(a SeriesList) *internal.SeriesList { - pb := make([]*internal.Series, len(a)) - for i := range a { - pb[i] = encodeSeries(a[i]) - } - - return &internal.SeriesList{ - Items: pb, - } -} - -func decodeSeriesList(pb *internal.SeriesList) SeriesList { - a := make([]Series, len(pb.GetItems())) - for i := range pb.GetItems() { - a[i] = decodeSeries(pb.GetItems()[i]) - } - return SeriesList(a) -} - // Interval represents a repeating interval for a query. type Interval struct { Duration time.Duration diff --git a/vendor/github.com/influxdata/influxdb/influxql/iterator_test.go b/vendor/github.com/influxdata/influxdb/influxql/iterator_test.go new file mode 100644 index 000000000..3f6aa93d9 --- /dev/null +++ b/vendor/github.com/influxdata/influxdb/influxql/iterator_test.go @@ -0,0 +1,1213 @@ +package influxql_test + +import ( + "bytes" + "fmt" + "math" + "math/rand" + "reflect" + "regexp" + "testing" + "time" + + "github.com/davecgh/go-spew/spew" + "github.com/influxdata/influxdb/influxql" + "github.com/influxdata/influxdb/pkg/deep" +) + +// Ensure that a set of iterators can be merged together, sorted by window and name/tag. +func TestMergeIterator_Float(t *testing.T) { + inputs := []*FloatIterator{ + {Points: []influxql.FloatPoint{ + {Name: "cpu", Tags: ParseTags("host=A"), Time: 0, Value: 1}, + {Name: "cpu", Tags: ParseTags("host=A"), Time: 12, Value: 3}, + {Name: "cpu", Tags: ParseTags("host=A"), Time: 30, Value: 4}, + {Name: "cpu", Tags: ParseTags("host=B"), Time: 1, Value: 2}, + {Name: "mem", Tags: ParseTags("host=B"), Time: 11, Value: 8}, + }}, + {Points: []influxql.FloatPoint{ + {Name: "cpu", Tags: ParseTags("host=A"), Time: 20, Value: 7}, + {Name: "cpu", Tags: ParseTags("host=B"), Time: 11, Value: 5}, + {Name: "cpu", Tags: ParseTags("host=B"), Time: 13, Value: 6}, + {Name: "mem", Tags: ParseTags("host=A"), Time: 25, Value: 9}, + }}, + {Points: []influxql.FloatPoint{}}, + {Points: []influxql.FloatPoint{}}, + } + + itr := influxql.NewMergeIterator(FloatIterators(inputs), influxql.IteratorOptions{ + Interval: influxql.Interval{ + Duration: 10 * time.Nanosecond, + }, + Ascending: true, + }) + if a, err := Iterators([]influxql.Iterator{itr}).ReadAll(); err != nil { + t.Fatalf("unexpected error: %s", err) + } else if !deep.Equal(a, [][]influxql.Point{ + {&influxql.FloatPoint{Name: "cpu", Tags: ParseTags("host=A"), Time: 0, Value: 1}}, + {&influxql.FloatPoint{Name: "cpu", Tags: ParseTags("host=A"), Time: 12, Value: 3}}, + {&influxql.FloatPoint{Name: "cpu", Tags: ParseTags("host=A"), Time: 20, Value: 7}}, + {&influxql.FloatPoint{Name: "cpu", Tags: ParseTags("host=A"), Time: 30, Value: 4}}, + {&influxql.FloatPoint{Name: "cpu", Tags: ParseTags("host=B"), Time: 1, Value: 2}}, + {&influxql.FloatPoint{Name: "cpu", Tags: ParseTags("host=B"), Time: 11, Value: 5}}, + {&influxql.FloatPoint{Name: "cpu", Tags: ParseTags("host=B"), Time: 13, Value: 6}}, + {&influxql.FloatPoint{Name: "mem", Tags: ParseTags("host=A"), Time: 25, Value: 9}}, + {&influxql.FloatPoint{Name: "mem", Tags: ParseTags("host=B"), Time: 11, Value: 8}}, + }) { + t.Errorf("unexpected points: %s", spew.Sdump(a)) + } + + for i, input := range inputs { + if !input.Closed { + t.Errorf("iterator %d not closed", i) + } + } +} + +// Ensure that a set of iterators can be merged together, sorted by window and name/tag. +func TestMergeIterator_Integer(t *testing.T) { + inputs := []*IntegerIterator{ + {Points: []influxql.IntegerPoint{ + {Name: "cpu", Tags: ParseTags("host=A"), Time: 0, Value: 1}, + {Name: "cpu", Tags: ParseTags("host=A"), Time: 12, Value: 3}, + {Name: "cpu", Tags: ParseTags("host=A"), Time: 30, Value: 4}, + {Name: "cpu", Tags: ParseTags("host=B"), Time: 1, Value: 2}, + {Name: "mem", Tags: ParseTags("host=B"), Time: 11, Value: 8}, + }}, + {Points: []influxql.IntegerPoint{ + {Name: "cpu", Tags: ParseTags("host=A"), Time: 20, Value: 7}, + {Name: "cpu", Tags: ParseTags("host=B"), Time: 11, Value: 5}, + {Name: "cpu", Tags: ParseTags("host=B"), Time: 13, Value: 6}, + {Name: "mem", Tags: ParseTags("host=A"), Time: 25, Value: 9}, + }}, + {Points: []influxql.IntegerPoint{}}, + } + itr := influxql.NewMergeIterator(IntegerIterators(inputs), influxql.IteratorOptions{ + Interval: influxql.Interval{ + Duration: 10 * time.Nanosecond, + }, + Ascending: true, + }) + + if a, err := Iterators([]influxql.Iterator{itr}).ReadAll(); err != nil { + t.Fatalf("unexpected error: %s", err) + } else if !deep.Equal(a, [][]influxql.Point{ + {&influxql.IntegerPoint{Name: "cpu", Tags: ParseTags("host=A"), Time: 0, Value: 1}}, + {&influxql.IntegerPoint{Name: "cpu", Tags: ParseTags("host=A"), Time: 12, Value: 3}}, + {&influxql.IntegerPoint{Name: "cpu", Tags: ParseTags("host=A"), Time: 20, Value: 7}}, + {&influxql.IntegerPoint{Name: "cpu", Tags: ParseTags("host=A"), Time: 30, Value: 4}}, + {&influxql.IntegerPoint{Name: "cpu", Tags: ParseTags("host=B"), Time: 1, Value: 2}}, + {&influxql.IntegerPoint{Name: "cpu", Tags: ParseTags("host=B"), Time: 11, Value: 5}}, + {&influxql.IntegerPoint{Name: "cpu", Tags: ParseTags("host=B"), Time: 13, Value: 6}}, + {&influxql.IntegerPoint{Name: "mem", Tags: ParseTags("host=A"), Time: 25, Value: 9}}, + {&influxql.IntegerPoint{Name: "mem", Tags: ParseTags("host=B"), Time: 11, Value: 8}}, + }) { + t.Errorf("unexpected points: %s", spew.Sdump(a)) + } + + for i, input := range inputs { + if !input.Closed { + t.Errorf("iterator %d not closed", i) + } + } +} + +// Ensure that a set of iterators can be merged together, sorted by window and name/tag. +func TestMergeIterator_String(t *testing.T) { + inputs := []*StringIterator{ + {Points: []influxql.StringPoint{ + {Name: "cpu", Tags: ParseTags("host=A"), Time: 0, Value: "a"}, + {Name: "cpu", Tags: ParseTags("host=A"), Time: 12, Value: "c"}, + {Name: "cpu", Tags: ParseTags("host=A"), Time: 30, Value: "d"}, + {Name: "cpu", Tags: ParseTags("host=B"), Time: 1, Value: "b"}, + {Name: "mem", Tags: ParseTags("host=B"), Time: 11, Value: "h"}, + }}, + {Points: []influxql.StringPoint{ + {Name: "cpu", Tags: ParseTags("host=A"), Time: 20, Value: "g"}, + {Name: "cpu", Tags: ParseTags("host=B"), Time: 11, Value: "e"}, + {Name: "cpu", Tags: ParseTags("host=B"), Time: 13, Value: "f"}, + {Name: "mem", Tags: ParseTags("host=A"), Time: 25, Value: "i"}, + }}, + {Points: []influxql.StringPoint{}}, + } + itr := influxql.NewMergeIterator(StringIterators(inputs), influxql.IteratorOptions{ + Interval: influxql.Interval{ + Duration: 10 * time.Nanosecond, + }, + Ascending: true, + }) + + if a, err := Iterators([]influxql.Iterator{itr}).ReadAll(); err != nil { + t.Fatalf("unexpected error: %s", err) + } else if !deep.Equal(a, [][]influxql.Point{ + {&influxql.StringPoint{Name: "cpu", Tags: ParseTags("host=A"), Time: 0, Value: "a"}}, + {&influxql.StringPoint{Name: "cpu", Tags: ParseTags("host=A"), Time: 12, Value: "c"}}, + {&influxql.StringPoint{Name: "cpu", Tags: ParseTags("host=A"), Time: 20, Value: "g"}}, + {&influxql.StringPoint{Name: "cpu", Tags: ParseTags("host=A"), Time: 30, Value: "d"}}, + {&influxql.StringPoint{Name: "cpu", Tags: ParseTags("host=B"), Time: 1, Value: "b"}}, + {&influxql.StringPoint{Name: "cpu", Tags: ParseTags("host=B"), Time: 11, Value: "e"}}, + {&influxql.StringPoint{Name: "cpu", Tags: ParseTags("host=B"), Time: 13, Value: "f"}}, + {&influxql.StringPoint{Name: "mem", Tags: ParseTags("host=A"), Time: 25, Value: "i"}}, + {&influxql.StringPoint{Name: "mem", Tags: ParseTags("host=B"), Time: 11, Value: "h"}}, + }) { + t.Errorf("unexpected points: %s", spew.Sdump(a)) + } + + for i, input := range inputs { + if !input.Closed { + t.Errorf("iterator %d not closed", i) + } + } +} + +// Ensure that a set of iterators can be merged together, sorted by window and name/tag. +func TestMergeIterator_Boolean(t *testing.T) { + inputs := []*BooleanIterator{ + {Points: []influxql.BooleanPoint{ + {Name: "cpu", Tags: ParseTags("host=A"), Time: 0, Value: true}, + {Name: "cpu", Tags: ParseTags("host=A"), Time: 12, Value: true}, + {Name: "cpu", Tags: ParseTags("host=A"), Time: 30, Value: false}, + {Name: "cpu", Tags: ParseTags("host=B"), Time: 1, Value: false}, + {Name: "mem", Tags: ParseTags("host=B"), Time: 11, Value: true}, + }}, + {Points: []influxql.BooleanPoint{ + {Name: "cpu", Tags: ParseTags("host=A"), Time: 20, Value: true}, + {Name: "cpu", Tags: ParseTags("host=B"), Time: 11, Value: true}, + {Name: "cpu", Tags: ParseTags("host=B"), Time: 13, Value: false}, + {Name: "mem", Tags: ParseTags("host=A"), Time: 25, Value: false}, + }}, + {Points: []influxql.BooleanPoint{}}, + } + itr := influxql.NewMergeIterator(BooleanIterators(inputs), influxql.IteratorOptions{ + Interval: influxql.Interval{ + Duration: 10 * time.Nanosecond, + }, + Ascending: true, + }) + + if a, err := Iterators([]influxql.Iterator{itr}).ReadAll(); err != nil { + t.Fatalf("unexpected error: %s", err) + } else if !deep.Equal(a, [][]influxql.Point{ + {&influxql.BooleanPoint{Name: "cpu", Tags: ParseTags("host=A"), Time: 0, Value: true}}, + {&influxql.BooleanPoint{Name: "cpu", Tags: ParseTags("host=A"), Time: 12, Value: true}}, + {&influxql.BooleanPoint{Name: "cpu", Tags: ParseTags("host=A"), Time: 20, Value: true}}, + {&influxql.BooleanPoint{Name: "cpu", Tags: ParseTags("host=A"), Time: 30, Value: false}}, + {&influxql.BooleanPoint{Name: "cpu", Tags: ParseTags("host=B"), Time: 1, Value: false}}, + {&influxql.BooleanPoint{Name: "cpu", Tags: ParseTags("host=B"), Time: 11, Value: true}}, + {&influxql.BooleanPoint{Name: "cpu", Tags: ParseTags("host=B"), Time: 13, Value: false}}, + {&influxql.BooleanPoint{Name: "mem", Tags: ParseTags("host=A"), Time: 25, Value: false}}, + {&influxql.BooleanPoint{Name: "mem", Tags: ParseTags("host=B"), Time: 11, Value: true}}, + }) { + t.Errorf("unexpected points: %s", spew.Sdump(a)) + } + + for i, input := range inputs { + if !input.Closed { + t.Errorf("iterator %d not closed", i) + } + } +} + +func TestMergeIterator_Nil(t *testing.T) { + itr := influxql.NewMergeIterator([]influxql.Iterator{nil}, influxql.IteratorOptions{}) + if itr != nil { + t.Fatalf("unexpected iterator: %#v", itr) + } +} + +func TestMergeIterator_Cast_Float(t *testing.T) { + inputs := []influxql.Iterator{ + &IntegerIterator{Points: []influxql.IntegerPoint{ + {Name: "cpu", Tags: ParseTags("host=A"), Time: 0, Value: 1}, + {Name: "cpu", Tags: ParseTags("host=A"), Time: 12, Value: 3}, + {Name: "cpu", Tags: ParseTags("host=A"), Time: 30, Value: 4}, + {Name: "cpu", Tags: ParseTags("host=B"), Time: 1, Value: 2}, + {Name: "mem", Tags: ParseTags("host=B"), Time: 11, Value: 8}, + }}, + &FloatIterator{Points: []influxql.FloatPoint{ + {Name: "cpu", Tags: ParseTags("host=A"), Time: 20, Value: 7}, + {Name: "cpu", Tags: ParseTags("host=B"), Time: 11, Value: 5}, + {Name: "cpu", Tags: ParseTags("host=B"), Time: 13, Value: 6}, + {Name: "mem", Tags: ParseTags("host=A"), Time: 25, Value: 9}, + }}, + } + + itr := influxql.NewMergeIterator(inputs, influxql.IteratorOptions{ + Interval: influxql.Interval{ + Duration: 10 * time.Nanosecond, + }, + Ascending: true, + }) + if a, err := Iterators([]influxql.Iterator{itr}).ReadAll(); err != nil { + t.Fatalf("unexpected error: %s", err) + } else if !deep.Equal(a, [][]influxql.Point{ + {&influxql.FloatPoint{Name: "cpu", Tags: ParseTags("host=A"), Time: 0, Value: 1}}, + {&influxql.FloatPoint{Name: "cpu", Tags: ParseTags("host=A"), Time: 12, Value: 3}}, + {&influxql.FloatPoint{Name: "cpu", Tags: ParseTags("host=A"), Time: 20, Value: 7}}, + {&influxql.FloatPoint{Name: "cpu", Tags: ParseTags("host=A"), Time: 30, Value: 4}}, + {&influxql.FloatPoint{Name: "cpu", Tags: ParseTags("host=B"), Time: 1, Value: 2}}, + {&influxql.FloatPoint{Name: "cpu", Tags: ParseTags("host=B"), Time: 11, Value: 5}}, + {&influxql.FloatPoint{Name: "cpu", Tags: ParseTags("host=B"), Time: 13, Value: 6}}, + {&influxql.FloatPoint{Name: "mem", Tags: ParseTags("host=A"), Time: 25, Value: 9}}, + {&influxql.FloatPoint{Name: "mem", Tags: ParseTags("host=B"), Time: 11, Value: 8}}, + }) { + t.Errorf("unexpected points: %s", spew.Sdump(a)) + } + + for i, input := range inputs { + switch input := input.(type) { + case *FloatIterator: + if !input.Closed { + t.Errorf("iterator %d not closed", i) + } + case *IntegerIterator: + if !input.Closed { + t.Errorf("iterator %d not closed", i) + } + } + } +} + +// Ensure that a set of iterators can be merged together, sorted by name/tag. +func TestSortedMergeIterator_Float(t *testing.T) { + inputs := []*FloatIterator{ + {Points: []influxql.FloatPoint{ + {Name: "cpu", Tags: ParseTags("host=A"), Time: 0, Value: 1}, + {Name: "cpu", Tags: ParseTags("host=A"), Time: 12, Value: 3}, + {Name: "cpu", Tags: ParseTags("host=A"), Time: 30, Value: 4}, + {Name: "cpu", Tags: ParseTags("host=B"), Time: 1, Value: 2}, + {Name: "mem", Tags: ParseTags("host=B"), Time: 4, Value: 8}, + }}, + {Points: []influxql.FloatPoint{ + {Name: "cpu", Tags: ParseTags("host=A"), Time: 20, Value: 7}, + {Name: "cpu", Tags: ParseTags("host=B"), Time: 11, Value: 5}, + {Name: "cpu", Tags: ParseTags("host=B"), Time: 13, Value: 6}, + {Name: "mem", Tags: ParseTags("host=A"), Time: 25, Value: 9}, + }}, + {Points: []influxql.FloatPoint{}}, + } + itr := influxql.NewSortedMergeIterator(FloatIterators(inputs), influxql.IteratorOptions{ + Interval: influxql.Interval{ + Duration: 10 * time.Nanosecond, + }, + Ascending: true, + }) + if a, err := Iterators([]influxql.Iterator{itr}).ReadAll(); err != nil { + t.Fatalf("unexpected error: %s", err) + } else if !deep.Equal(a, [][]influxql.Point{ + {&influxql.FloatPoint{Name: "cpu", Tags: ParseTags("host=A"), Time: 0, Value: 1}}, + {&influxql.FloatPoint{Name: "cpu", Tags: ParseTags("host=A"), Time: 12, Value: 3}}, + {&influxql.FloatPoint{Name: "cpu", Tags: ParseTags("host=A"), Time: 20, Value: 7}}, + {&influxql.FloatPoint{Name: "cpu", Tags: ParseTags("host=A"), Time: 30, Value: 4}}, + {&influxql.FloatPoint{Name: "cpu", Tags: ParseTags("host=B"), Time: 1, Value: 2}}, + {&influxql.FloatPoint{Name: "cpu", Tags: ParseTags("host=B"), Time: 11, Value: 5}}, + {&influxql.FloatPoint{Name: "cpu", Tags: ParseTags("host=B"), Time: 13, Value: 6}}, + {&influxql.FloatPoint{Name: "mem", Tags: ParseTags("host=A"), Time: 25, Value: 9}}, + {&influxql.FloatPoint{Name: "mem", Tags: ParseTags("host=B"), Time: 4, Value: 8}}, + }) { + t.Errorf("unexpected points: %s", spew.Sdump(a)) + } + + for i, input := range inputs { + if !input.Closed { + t.Errorf("iterator %d not closed", i) + } + } +} + +// Ensure that a set of iterators can be merged together, sorted by name/tag. +func TestSortedMergeIterator_Integer(t *testing.T) { + inputs := []*IntegerIterator{ + {Points: []influxql.IntegerPoint{ + {Name: "cpu", Tags: ParseTags("host=A"), Time: 0, Value: 1}, + {Name: "cpu", Tags: ParseTags("host=A"), Time: 12, Value: 3}, + {Name: "cpu", Tags: ParseTags("host=A"), Time: 30, Value: 4}, + {Name: "cpu", Tags: ParseTags("host=B"), Time: 1, Value: 2}, + {Name: "mem", Tags: ParseTags("host=B"), Time: 4, Value: 8}, + }}, + {Points: []influxql.IntegerPoint{ + {Name: "cpu", Tags: ParseTags("host=A"), Time: 20, Value: 7}, + {Name: "cpu", Tags: ParseTags("host=B"), Time: 11, Value: 5}, + {Name: "cpu", Tags: ParseTags("host=B"), Time: 13, Value: 6}, + {Name: "mem", Tags: ParseTags("host=A"), Time: 25, Value: 9}, + }}, + {Points: []influxql.IntegerPoint{}}, + } + itr := influxql.NewSortedMergeIterator(IntegerIterators(inputs), influxql.IteratorOptions{ + Interval: influxql.Interval{ + Duration: 10 * time.Nanosecond, + }, + Ascending: true, + }) + if a, err := Iterators([]influxql.Iterator{itr}).ReadAll(); err != nil { + t.Fatalf("unexpected error: %s", err) + } else if !deep.Equal(a, [][]influxql.Point{ + {&influxql.IntegerPoint{Name: "cpu", Tags: ParseTags("host=A"), Time: 0, Value: 1}}, + {&influxql.IntegerPoint{Name: "cpu", Tags: ParseTags("host=A"), Time: 12, Value: 3}}, + {&influxql.IntegerPoint{Name: "cpu", Tags: ParseTags("host=A"), Time: 20, Value: 7}}, + {&influxql.IntegerPoint{Name: "cpu", Tags: ParseTags("host=A"), Time: 30, Value: 4}}, + {&influxql.IntegerPoint{Name: "cpu", Tags: ParseTags("host=B"), Time: 1, Value: 2}}, + {&influxql.IntegerPoint{Name: "cpu", Tags: ParseTags("host=B"), Time: 11, Value: 5}}, + {&influxql.IntegerPoint{Name: "cpu", Tags: ParseTags("host=B"), Time: 13, Value: 6}}, + {&influxql.IntegerPoint{Name: "mem", Tags: ParseTags("host=A"), Time: 25, Value: 9}}, + {&influxql.IntegerPoint{Name: "mem", Tags: ParseTags("host=B"), Time: 4, Value: 8}}, + }) { + t.Errorf("unexpected points: %s", spew.Sdump(a)) + } + + for i, input := range inputs { + if !input.Closed { + t.Errorf("iterator %d not closed", i) + } + } +} + +// Ensure that a set of iterators can be merged together, sorted by name/tag. +func TestSortedMergeIterator_String(t *testing.T) { + inputs := []*StringIterator{ + {Points: []influxql.StringPoint{ + {Name: "cpu", Tags: ParseTags("host=A"), Time: 0, Value: "a"}, + {Name: "cpu", Tags: ParseTags("host=A"), Time: 12, Value: "c"}, + {Name: "cpu", Tags: ParseTags("host=A"), Time: 30, Value: "d"}, + {Name: "cpu", Tags: ParseTags("host=B"), Time: 1, Value: "b"}, + {Name: "mem", Tags: ParseTags("host=B"), Time: 4, Value: "h"}, + }}, + {Points: []influxql.StringPoint{ + {Name: "cpu", Tags: ParseTags("host=A"), Time: 20, Value: "g"}, + {Name: "cpu", Tags: ParseTags("host=B"), Time: 11, Value: "e"}, + {Name: "cpu", Tags: ParseTags("host=B"), Time: 13, Value: "f"}, + {Name: "mem", Tags: ParseTags("host=A"), Time: 25, Value: "i"}, + }}, + {Points: []influxql.StringPoint{}}, + } + itr := influxql.NewSortedMergeIterator(StringIterators(inputs), influxql.IteratorOptions{ + Interval: influxql.Interval{ + Duration: 10 * time.Nanosecond, + }, + Ascending: true, + }) + if a, err := Iterators([]influxql.Iterator{itr}).ReadAll(); err != nil { + t.Fatalf("unexpected error: %s", err) + } else if !deep.Equal(a, [][]influxql.Point{ + {&influxql.StringPoint{Name: "cpu", Tags: ParseTags("host=A"), Time: 0, Value: "a"}}, + {&influxql.StringPoint{Name: "cpu", Tags: ParseTags("host=A"), Time: 12, Value: "c"}}, + {&influxql.StringPoint{Name: "cpu", Tags: ParseTags("host=A"), Time: 20, Value: "g"}}, + {&influxql.StringPoint{Name: "cpu", Tags: ParseTags("host=A"), Time: 30, Value: "d"}}, + {&influxql.StringPoint{Name: "cpu", Tags: ParseTags("host=B"), Time: 1, Value: "b"}}, + {&influxql.StringPoint{Name: "cpu", Tags: ParseTags("host=B"), Time: 11, Value: "e"}}, + {&influxql.StringPoint{Name: "cpu", Tags: ParseTags("host=B"), Time: 13, Value: "f"}}, + {&influxql.StringPoint{Name: "mem", Tags: ParseTags("host=A"), Time: 25, Value: "i"}}, + {&influxql.StringPoint{Name: "mem", Tags: ParseTags("host=B"), Time: 4, Value: "h"}}, + }) { + t.Errorf("unexpected points: %s", spew.Sdump(a)) + } + + for i, input := range inputs { + if !input.Closed { + t.Errorf("iterator %d not closed", i) + } + } +} + +// Ensure that a set of iterators can be merged together, sorted by name/tag. +func TestSortedMergeIterator_Boolean(t *testing.T) { + inputs := []*BooleanIterator{ + {Points: []influxql.BooleanPoint{ + {Name: "cpu", Tags: ParseTags("host=A"), Time: 0, Value: true}, + {Name: "cpu", Tags: ParseTags("host=A"), Time: 12, Value: true}, + {Name: "cpu", Tags: ParseTags("host=A"), Time: 30, Value: false}, + {Name: "cpu", Tags: ParseTags("host=B"), Time: 1, Value: false}, + {Name: "mem", Tags: ParseTags("host=B"), Time: 4, Value: true}, + }}, + {Points: []influxql.BooleanPoint{ + {Name: "cpu", Tags: ParseTags("host=A"), Time: 20, Value: true}, + {Name: "cpu", Tags: ParseTags("host=B"), Time: 11, Value: true}, + {Name: "cpu", Tags: ParseTags("host=B"), Time: 13, Value: false}, + {Name: "mem", Tags: ParseTags("host=A"), Time: 25, Value: true}, + }}, + {Points: []influxql.BooleanPoint{}}, + } + itr := influxql.NewSortedMergeIterator(BooleanIterators(inputs), influxql.IteratorOptions{ + Interval: influxql.Interval{ + Duration: 10 * time.Nanosecond, + }, + Ascending: true, + }) + if a, err := Iterators([]influxql.Iterator{itr}).ReadAll(); err != nil { + t.Fatalf("unexpected error: %s", err) + } else if !deep.Equal(a, [][]influxql.Point{ + {&influxql.BooleanPoint{Name: "cpu", Tags: ParseTags("host=A"), Time: 0, Value: true}}, + {&influxql.BooleanPoint{Name: "cpu", Tags: ParseTags("host=A"), Time: 12, Value: true}}, + {&influxql.BooleanPoint{Name: "cpu", Tags: ParseTags("host=A"), Time: 20, Value: true}}, + {&influxql.BooleanPoint{Name: "cpu", Tags: ParseTags("host=A"), Time: 30, Value: false}}, + {&influxql.BooleanPoint{Name: "cpu", Tags: ParseTags("host=B"), Time: 1, Value: false}}, + {&influxql.BooleanPoint{Name: "cpu", Tags: ParseTags("host=B"), Time: 11, Value: true}}, + {&influxql.BooleanPoint{Name: "cpu", Tags: ParseTags("host=B"), Time: 13, Value: false}}, + {&influxql.BooleanPoint{Name: "mem", Tags: ParseTags("host=A"), Time: 25, Value: true}}, + {&influxql.BooleanPoint{Name: "mem", Tags: ParseTags("host=B"), Time: 4, Value: true}}, + }) { + t.Errorf("unexpected points: %s", spew.Sdump(a)) + } + + for i, input := range inputs { + if !input.Closed { + t.Errorf("iterator %d not closed", i) + } + } +} + +func TestSortedMergeIterator_Nil(t *testing.T) { + itr := influxql.NewSortedMergeIterator([]influxql.Iterator{nil}, influxql.IteratorOptions{}) + if itr != nil { + t.Fatalf("unexpected iterator: %#v", itr) + } +} + +func TestSortedMergeIterator_Cast_Float(t *testing.T) { + inputs := []influxql.Iterator{ + &IntegerIterator{Points: []influxql.IntegerPoint{ + {Name: "cpu", Tags: ParseTags("host=A"), Time: 0, Value: 1}, + {Name: "cpu", Tags: ParseTags("host=A"), Time: 12, Value: 3}, + {Name: "cpu", Tags: ParseTags("host=A"), Time: 30, Value: 4}, + {Name: "cpu", Tags: ParseTags("host=B"), Time: 1, Value: 2}, + {Name: "mem", Tags: ParseTags("host=B"), Time: 4, Value: 8}, + }}, + &FloatIterator{Points: []influxql.FloatPoint{ + {Name: "cpu", Tags: ParseTags("host=A"), Time: 20, Value: 7}, + {Name: "cpu", Tags: ParseTags("host=B"), Time: 11, Value: 5}, + {Name: "cpu", Tags: ParseTags("host=B"), Time: 13, Value: 6}, + {Name: "mem", Tags: ParseTags("host=A"), Time: 25, Value: 9}, + }}, + } + + itr := influxql.NewSortedMergeIterator(inputs, influxql.IteratorOptions{ + Interval: influxql.Interval{ + Duration: 10 * time.Nanosecond, + }, + Ascending: true, + }) + if a, err := Iterators([]influxql.Iterator{itr}).ReadAll(); err != nil { + t.Fatalf("unexpected error: %s", err) + } else if !deep.Equal(a, [][]influxql.Point{ + {&influxql.FloatPoint{Name: "cpu", Tags: ParseTags("host=A"), Time: 0, Value: 1}}, + {&influxql.FloatPoint{Name: "cpu", Tags: ParseTags("host=A"), Time: 12, Value: 3}}, + {&influxql.FloatPoint{Name: "cpu", Tags: ParseTags("host=A"), Time: 20, Value: 7}}, + {&influxql.FloatPoint{Name: "cpu", Tags: ParseTags("host=A"), Time: 30, Value: 4}}, + {&influxql.FloatPoint{Name: "cpu", Tags: ParseTags("host=B"), Time: 1, Value: 2}}, + {&influxql.FloatPoint{Name: "cpu", Tags: ParseTags("host=B"), Time: 11, Value: 5}}, + {&influxql.FloatPoint{Name: "cpu", Tags: ParseTags("host=B"), Time: 13, Value: 6}}, + {&influxql.FloatPoint{Name: "mem", Tags: ParseTags("host=A"), Time: 25, Value: 9}}, + {&influxql.FloatPoint{Name: "mem", Tags: ParseTags("host=B"), Time: 4, Value: 8}}, + }) { + t.Errorf("unexpected points: %s", spew.Sdump(a)) + } + + for i, input := range inputs { + switch input := input.(type) { + case *FloatIterator: + if !input.Closed { + t.Errorf("iterator %d not closed", i) + } + case *IntegerIterator: + if !input.Closed { + t.Errorf("iterator %d not closed", i) + } + } + } +} + +// Ensure limit iterators work with limit and offset. +func TestLimitIterator_Float(t *testing.T) { + input := &FloatIterator{Points: []influxql.FloatPoint{ + {Name: "cpu", Time: 0, Value: 1}, + {Name: "cpu", Time: 5, Value: 3}, + {Name: "cpu", Time: 10, Value: 5}, + {Name: "mem", Time: 5, Value: 3}, + {Name: "mem", Time: 7, Value: 8}, + }} + + itr := influxql.NewLimitIterator(input, influxql.IteratorOptions{ + Limit: 1, + Offset: 1, + }) + + if a, err := Iterators([]influxql.Iterator{itr}).ReadAll(); err != nil { + t.Fatalf("unexpected error: %s", err) + } else if !deep.Equal(a, [][]influxql.Point{ + {&influxql.FloatPoint{Name: "cpu", Time: 5, Value: 3}}, + {&influxql.FloatPoint{Name: "mem", Time: 7, Value: 8}}, + }) { + t.Fatalf("unexpected points: %s", spew.Sdump(a)) + } + + if !input.Closed { + t.Error("iterator not closed") + } +} + +// Ensure limit iterators work with limit and offset. +func TestLimitIterator_Integer(t *testing.T) { + input := &IntegerIterator{Points: []influxql.IntegerPoint{ + {Name: "cpu", Time: 0, Value: 1}, + {Name: "cpu", Time: 5, Value: 3}, + {Name: "cpu", Time: 10, Value: 5}, + {Name: "mem", Time: 5, Value: 3}, + {Name: "mem", Time: 7, Value: 8}, + }} + + itr := influxql.NewLimitIterator(input, influxql.IteratorOptions{ + Limit: 1, + Offset: 1, + }) + + if a, err := Iterators([]influxql.Iterator{itr}).ReadAll(); err != nil { + t.Fatalf("unexpected error: %s", err) + } else if !deep.Equal(a, [][]influxql.Point{ + {&influxql.IntegerPoint{Name: "cpu", Time: 5, Value: 3}}, + {&influxql.IntegerPoint{Name: "mem", Time: 7, Value: 8}}, + }) { + t.Fatalf("unexpected points: %s", spew.Sdump(a)) + } + + if !input.Closed { + t.Error("iterator not closed") + } +} + +// Ensure limit iterators work with limit and offset. +func TestLimitIterator_String(t *testing.T) { + input := &StringIterator{Points: []influxql.StringPoint{ + {Name: "cpu", Time: 0, Value: "a"}, + {Name: "cpu", Time: 5, Value: "b"}, + {Name: "cpu", Time: 10, Value: "c"}, + {Name: "mem", Time: 5, Value: "d"}, + {Name: "mem", Time: 7, Value: "e"}, + }} + + itr := influxql.NewLimitIterator(input, influxql.IteratorOptions{ + Limit: 1, + Offset: 1, + }) + + if a, err := Iterators([]influxql.Iterator{itr}).ReadAll(); err != nil { + t.Fatalf("unexpected error: %s", err) + } else if !deep.Equal(a, [][]influxql.Point{ + {&influxql.StringPoint{Name: "cpu", Time: 5, Value: "b"}}, + {&influxql.StringPoint{Name: "mem", Time: 7, Value: "e"}}, + }) { + t.Fatalf("unexpected points: %s", spew.Sdump(a)) + } + + if !input.Closed { + t.Error("iterator not closed") + } +} + +// Ensure limit iterators work with limit and offset. +func TestLimitIterator_Boolean(t *testing.T) { + input := &BooleanIterator{Points: []influxql.BooleanPoint{ + {Name: "cpu", Time: 0, Value: true}, + {Name: "cpu", Time: 5, Value: false}, + {Name: "cpu", Time: 10, Value: true}, + {Name: "mem", Time: 5, Value: false}, + {Name: "mem", Time: 7, Value: true}, + }} + + itr := influxql.NewLimitIterator(input, influxql.IteratorOptions{ + Limit: 1, + Offset: 1, + }) + + if a, err := Iterators([]influxql.Iterator{itr}).ReadAll(); err != nil { + t.Fatalf("unexpected error: %s", err) + } else if !deep.Equal(a, [][]influxql.Point{ + {&influxql.BooleanPoint{Name: "cpu", Time: 5, Value: false}}, + {&influxql.BooleanPoint{Name: "mem", Time: 7, Value: true}}, + }) { + t.Fatalf("unexpected points: %s", spew.Sdump(a)) + } + + if !input.Closed { + t.Error("iterator not closed") + } +} + +// Ensure auxilary iterators can be created for auxilary fields. +func TestFloatAuxIterator(t *testing.T) { + itr := influxql.NewAuxIterator( + &FloatIterator{Points: []influxql.FloatPoint{ + {Time: 0, Value: 1, Aux: []interface{}{float64(100), float64(200)}}, + {Time: 1, Value: 2, Aux: []interface{}{float64(500), math.NaN()}}, + }}, + influxql.IteratorOptions{Aux: []influxql.VarRef{{Val: "f0", Type: influxql.Float}, {Val: "f1", Type: influxql.Float}}}, + ) + + itrs := []influxql.Iterator{ + itr, + itr.Iterator("f0", influxql.Unknown), + itr.Iterator("f1", influxql.Unknown), + itr.Iterator("f0", influxql.Unknown), + } + itr.Start() + + if a, err := Iterators(itrs).ReadAll(); err != nil { + t.Fatalf("unexpected error: %s", err) + } else if !deep.Equal(a, [][]influxql.Point{ + { + &influxql.FloatPoint{Time: 0, Value: 1, Aux: []interface{}{float64(100), float64(200)}}, + &influxql.FloatPoint{Time: 0, Value: float64(100)}, + &influxql.FloatPoint{Time: 0, Value: float64(200)}, + &influxql.FloatPoint{Time: 0, Value: float64(100)}, + }, + { + &influxql.FloatPoint{Time: 1, Value: 2, Aux: []interface{}{float64(500), math.NaN()}}, + &influxql.FloatPoint{Time: 1, Value: float64(500)}, + &influxql.FloatPoint{Time: 1, Value: math.NaN()}, + &influxql.FloatPoint{Time: 1, Value: float64(500)}, + }, + }) { + t.Fatalf("unexpected points: %s", spew.Sdump(a)) + } +} + +// Ensure limit iterator returns a subset of points. +func TestLimitIterator(t *testing.T) { + itr := influxql.NewLimitIterator( + &FloatIterator{Points: []influxql.FloatPoint{ + {Time: 0, Value: 0}, + {Time: 1, Value: 1}, + {Time: 2, Value: 2}, + {Time: 3, Value: 3}, + }}, + influxql.IteratorOptions{ + Limit: 2, + Offset: 1, + StartTime: influxql.MinTime, + EndTime: influxql.MaxTime, + }, + ) + + if a, err := (Iterators{itr}).ReadAll(); err != nil { + t.Fatalf("unexpected error: %s", err) + } else if !deep.Equal(a, [][]influxql.Point{ + {&influxql.FloatPoint{Time: 1, Value: 1}}, + {&influxql.FloatPoint{Time: 2, Value: 2}}, + }) { + t.Fatalf("unexpected points: %s", spew.Sdump(a)) + } +} + +// Iterators is a test wrapper for iterators. +type Iterators []influxql.Iterator + +// Next returns the next value from each iterator. +// Returns nil if any iterator returns a nil. +func (itrs Iterators) Next() ([]influxql.Point, error) { + a := make([]influxql.Point, len(itrs)) + for i, itr := range itrs { + switch itr := itr.(type) { + case influxql.FloatIterator: + fp, err := itr.Next() + if fp == nil || err != nil { + return nil, err + } + a[i] = fp + case influxql.IntegerIterator: + ip, err := itr.Next() + if ip == nil || err != nil { + return nil, err + } + a[i] = ip + case influxql.StringIterator: + sp, err := itr.Next() + if sp == nil || err != nil { + return nil, err + } + a[i] = sp + case influxql.BooleanIterator: + bp, err := itr.Next() + if bp == nil || err != nil { + return nil, err + } + a[i] = bp + default: + panic(fmt.Sprintf("iterator type not supported: %T", itr)) + } + } + return a, nil +} + +// ReadAll reads all points from all iterators. +func (itrs Iterators) ReadAll() ([][]influxql.Point, error) { + var a [][]influxql.Point + + // Read from every iterator until a nil is encountered. + for { + points, err := itrs.Next() + if err != nil { + return nil, err + } else if points == nil { + break + } + a = append(a, influxql.Points(points).Clone()) + } + + // Close all iterators. + influxql.Iterators(itrs).Close() + + return a, nil +} + +func TestIteratorOptions_Window_Interval(t *testing.T) { + opt := influxql.IteratorOptions{ + Interval: influxql.Interval{ + Duration: 10, + }, + } + + start, end := opt.Window(4) + if start != 0 { + t.Errorf("expected start to be 0, got %d", start) + } + if end != 10 { + t.Errorf("expected end to be 10, got %d", end) + } +} + +func TestIteratorOptions_Window_Offset(t *testing.T) { + opt := influxql.IteratorOptions{ + Interval: influxql.Interval{ + Duration: 10, + Offset: 8, + }, + } + + start, end := opt.Window(14) + if start != 8 { + t.Errorf("expected start to be 8, got %d", start) + } + if end != 18 { + t.Errorf("expected end to be 18, got %d", end) + } +} + +func TestIteratorOptions_Window_Default(t *testing.T) { + opt := influxql.IteratorOptions{ + StartTime: 0, + EndTime: 60, + } + + start, end := opt.Window(34) + if start != 0 { + t.Errorf("expected start to be 0, got %d", start) + } + if end != 61 { + t.Errorf("expected end to be 61, got %d", end) + } +} + +func TestIteratorOptions_SeekTime_Ascending(t *testing.T) { + opt := influxql.IteratorOptions{ + StartTime: 30, + EndTime: 60, + Ascending: true, + } + + time := opt.SeekTime() + if time != 30 { + t.Errorf("expected time to be 30, got %d", time) + } +} + +func TestIteratorOptions_SeekTime_Descending(t *testing.T) { + opt := influxql.IteratorOptions{ + StartTime: 30, + EndTime: 60, + Ascending: false, + } + + time := opt.SeekTime() + if time != 60 { + t.Errorf("expected time to be 60, got %d", time) + } +} + +func TestIteratorOptions_MergeSorted(t *testing.T) { + opt := influxql.IteratorOptions{} + sorted := opt.MergeSorted() + if !sorted { + t.Error("expected no expression to be sorted, got unsorted") + } + + opt.Expr = &influxql.VarRef{} + sorted = opt.MergeSorted() + if !sorted { + t.Error("expected expression with varref to be sorted, got unsorted") + } + + opt.Expr = &influxql.Call{} + sorted = opt.MergeSorted() + if sorted { + t.Error("expected expression without varref to be unsorted, got sorted") + } +} + +func TestIteratorOptions_DerivativeInterval_Default(t *testing.T) { + opt := influxql.IteratorOptions{} + expected := influxql.Interval{Duration: time.Second} + actual := opt.DerivativeInterval() + if actual != expected { + t.Errorf("expected derivative interval to be %v, got %v", expected, actual) + } +} + +func TestIteratorOptions_DerivativeInterval_GroupBy(t *testing.T) { + opt := influxql.IteratorOptions{ + Interval: influxql.Interval{ + Duration: 10, + Offset: 2, + }, + } + expected := influxql.Interval{Duration: 10} + actual := opt.DerivativeInterval() + if actual != expected { + t.Errorf("expected derivative interval to be %v, got %v", expected, actual) + } +} + +func TestIteratorOptions_DerivativeInterval_Call(t *testing.T) { + opt := influxql.IteratorOptions{ + Expr: &influxql.Call{ + Name: "mean", + Args: []influxql.Expr{ + &influxql.VarRef{Val: "value"}, + &influxql.DurationLiteral{Val: 2 * time.Second}, + }, + }, + Interval: influxql.Interval{ + Duration: 10, + Offset: 2, + }, + } + expected := influxql.Interval{Duration: 2 * time.Second} + actual := opt.DerivativeInterval() + if actual != expected { + t.Errorf("expected derivative interval to be %v, got %v", expected, actual) + } +} + +func TestIteratorOptions_ElapsedInterval_Default(t *testing.T) { + opt := influxql.IteratorOptions{} + expected := influxql.Interval{Duration: time.Nanosecond} + actual := opt.ElapsedInterval() + if actual != expected { + t.Errorf("expected elapsed interval to be %v, got %v", expected, actual) + } +} + +func TestIteratorOptions_ElapsedInterval_GroupBy(t *testing.T) { + opt := influxql.IteratorOptions{ + Interval: influxql.Interval{ + Duration: 10, + Offset: 2, + }, + } + expected := influxql.Interval{Duration: time.Nanosecond} + actual := opt.ElapsedInterval() + if actual != expected { + t.Errorf("expected elapsed interval to be %v, got %v", expected, actual) + } +} + +func TestIteratorOptions_ElapsedInterval_Call(t *testing.T) { + opt := influxql.IteratorOptions{ + Expr: &influxql.Call{ + Name: "mean", + Args: []influxql.Expr{ + &influxql.VarRef{Val: "value"}, + &influxql.DurationLiteral{Val: 2 * time.Second}, + }, + }, + Interval: influxql.Interval{ + Duration: 10, + Offset: 2, + }, + } + expected := influxql.Interval{Duration: 2 * time.Second} + actual := opt.ElapsedInterval() + if actual != expected { + t.Errorf("expected elapsed interval to be %v, got %v", expected, actual) + } +} + +// Ensure iterator options can be marshaled to and from a binary format. +func TestIteratorOptions_MarshalBinary(t *testing.T) { + opt := &influxql.IteratorOptions{ + Expr: MustParseExpr("count(value)"), + Aux: []influxql.VarRef{{Val: "a"}, {Val: "b"}, {Val: "c"}}, + Sources: []influxql.Source{ + &influxql.Measurement{Database: "db0", RetentionPolicy: "rp0", Name: "mm0"}, + }, + Interval: influxql.Interval{ + Duration: 1 * time.Hour, + Offset: 20 * time.Minute, + }, + Dimensions: []string{"region", "host"}, + Fill: influxql.NumberFill, + FillValue: float64(100), + Condition: MustParseExpr(`foo = 'bar'`), + StartTime: 1000, + EndTime: 2000, + Ascending: true, + Limit: 100, + Offset: 200, + SLimit: 300, + SOffset: 400, + Dedupe: true, + } + + // Marshal to binary. + buf, err := opt.MarshalBinary() + if err != nil { + t.Fatal(err) + } + + // Unmarshal back to an object. + var other influxql.IteratorOptions + if err := other.UnmarshalBinary(buf); err != nil { + t.Fatal(err) + } else if !reflect.DeepEqual(&other, opt) { + t.Fatalf("unexpected options: %s", spew.Sdump(other)) + } +} + +// Ensure iterator options with a regex measurement can be marshaled. +func TestIteratorOptions_MarshalBinary_Measurement_Regex(t *testing.T) { + opt := &influxql.IteratorOptions{ + Sources: []influxql.Source{ + &influxql.Measurement{Database: "db1", RetentionPolicy: "rp2", Regex: &influxql.RegexLiteral{Val: regexp.MustCompile(`series.+`)}}, + }, + } + + // Marshal to binary. + buf, err := opt.MarshalBinary() + if err != nil { + t.Fatal(err) + } + + // Unmarshal back to an object. + var other influxql.IteratorOptions + if err := other.UnmarshalBinary(buf); err != nil { + t.Fatal(err) + } else if v := other.Sources[0].(*influxql.Measurement).Regex.Val.String(); v != `/series.+/` { + t.Fatalf("unexpected measurement regex: %s", v) + } +} + +// Ensure iterator can be encoded and decoded over a byte stream. +func TestIterator_EncodeDecode(t *testing.T) { + var buf bytes.Buffer + + // Create an iterator with several points & stats. + itr := &FloatIterator{ + Points: []influxql.FloatPoint{ + {Name: "cpu", Tags: ParseTags("host=A"), Time: 0, Value: 0}, + {Name: "mem", Tags: ParseTags("host=B"), Time: 1, Value: 10}, + }, + stats: influxql.IteratorStats{ + SeriesN: 2, + PointN: 0, + }, + } + + // Encode to the buffer. + enc := influxql.NewIteratorEncoder(&buf) + enc.StatsInterval = 100 * time.Millisecond + if err := enc.EncodeIterator(itr); err != nil { + t.Fatal(err) + } + + // Decode from the buffer. + dec := influxql.NewReaderIterator(&buf, influxql.Float, itr.Stats()) + + // Initial stats should exist immediately. + fdec := dec.(influxql.FloatIterator) + if stats := fdec.Stats(); !reflect.DeepEqual(stats, influxql.IteratorStats{SeriesN: 2, PointN: 0}) { + t.Fatalf("unexpected stats(initial): %#v", stats) + } + + // Read both points. + if p, err := fdec.Next(); err != nil { + t.Fatalf("unexpected error(0): %#v", err) + } else if !reflect.DeepEqual(p, &influxql.FloatPoint{Name: "cpu", Tags: ParseTags("host=A"), Time: 0, Value: 0}) { + t.Fatalf("unexpected point(0); %#v", p) + } + if p, err := fdec.Next(); err != nil { + t.Fatalf("unexpected error(1): %#v", err) + } else if !reflect.DeepEqual(p, &influxql.FloatPoint{Name: "mem", Tags: ParseTags("host=B"), Time: 1, Value: 10}) { + t.Fatalf("unexpected point(1); %#v", p) + } + if p, err := fdec.Next(); err != nil { + t.Fatalf("unexpected error(eof): %#v", err) + } else if p != nil { + t.Fatalf("unexpected point(eof); %#v", p) + } +} + +// IteratorCreator is a mockable implementation of SelectStatementExecutor.IteratorCreator. +type IteratorCreator struct { + CreateIteratorFn func(opt influxql.IteratorOptions) (influxql.Iterator, error) + FieldDimensionsFn func(sources influxql.Sources) (fields map[string]influxql.DataType, dimensions map[string]struct{}, err error) + ExpandSourcesFn func(sources influxql.Sources) (influxql.Sources, error) +} + +func (ic *IteratorCreator) CreateIterator(opt influxql.IteratorOptions) (influxql.Iterator, error) { + return ic.CreateIteratorFn(opt) +} + +func (ic *IteratorCreator) FieldDimensions(sources influxql.Sources) (fields map[string]influxql.DataType, dimensions map[string]struct{}, err error) { + return ic.FieldDimensionsFn(sources) +} + +func (ic *IteratorCreator) ExpandSources(sources influxql.Sources) (influxql.Sources, error) { + return ic.ExpandSourcesFn(sources) +} + +// Test implementation of influxql.FloatIterator +type FloatIterator struct { + Points []influxql.FloatPoint + Closed bool + stats influxql.IteratorStats +} + +func (itr *FloatIterator) Stats() influxql.IteratorStats { return itr.stats } +func (itr *FloatIterator) Close() error { itr.Closed = true; return nil } + +// Next returns the next value and shifts it off the beginning of the points slice. +func (itr *FloatIterator) Next() (*influxql.FloatPoint, error) { + if len(itr.Points) == 0 || itr.Closed { + return nil, nil + } + + v := &itr.Points[0] + itr.Points = itr.Points[1:] + return v, nil +} + +func FloatIterators(inputs []*FloatIterator) []influxql.Iterator { + itrs := make([]influxql.Iterator, len(inputs)) + for i := range itrs { + itrs[i] = influxql.Iterator(inputs[i]) + } + return itrs +} + +// GenerateFloatIterator creates a FloatIterator with random data. +func GenerateFloatIterator(rand *rand.Rand, valueN int) *FloatIterator { + const interval = 10 * time.Second + + itr := &FloatIterator{ + Points: make([]influxql.FloatPoint, valueN), + } + + for i := 0; i < valueN; i++ { + // Generate incrementing timestamp with some jitter (1s). + jitter := (rand.Int63n(2) * int64(time.Second)) + timestamp := int64(i)*int64(10*time.Second) + jitter + + itr.Points[i] = influxql.FloatPoint{ + Name: "cpu", + Time: timestamp, + Value: rand.Float64(), + } + } + + return itr +} + +// Test implementation of influxql.IntegerIterator +type IntegerIterator struct { + Points []influxql.IntegerPoint + Closed bool + stats influxql.IteratorStats +} + +func (itr *IntegerIterator) Stats() influxql.IteratorStats { return itr.stats } +func (itr *IntegerIterator) Close() error { itr.Closed = true; return nil } + +// Next returns the next value and shifts it off the beginning of the points slice. +func (itr *IntegerIterator) Next() (*influxql.IntegerPoint, error) { + if len(itr.Points) == 0 || itr.Closed { + return nil, nil + } + + v := &itr.Points[0] + itr.Points = itr.Points[1:] + return v, nil +} + +func IntegerIterators(inputs []*IntegerIterator) []influxql.Iterator { + itrs := make([]influxql.Iterator, len(inputs)) + for i := range itrs { + itrs[i] = influxql.Iterator(inputs[i]) + } + return itrs +} + +// Test implementation of influxql.StringIterator +type StringIterator struct { + Points []influxql.StringPoint + Closed bool + stats influxql.IteratorStats +} + +func (itr *StringIterator) Stats() influxql.IteratorStats { return itr.stats } +func (itr *StringIterator) Close() error { itr.Closed = true; return nil } + +// Next returns the next value and shifts it off the beginning of the points slice. +func (itr *StringIterator) Next() (*influxql.StringPoint, error) { + if len(itr.Points) == 0 || itr.Closed { + return nil, nil + } + + v := &itr.Points[0] + itr.Points = itr.Points[1:] + return v, nil +} + +func StringIterators(inputs []*StringIterator) []influxql.Iterator { + itrs := make([]influxql.Iterator, len(inputs)) + for i := range itrs { + itrs[i] = influxql.Iterator(inputs[i]) + } + return itrs +} + +// Test implementation of influxql.BooleanIterator +type BooleanIterator struct { + Points []influxql.BooleanPoint + Closed bool + stats influxql.IteratorStats +} + +func (itr *BooleanIterator) Stats() influxql.IteratorStats { return itr.stats } +func (itr *BooleanIterator) Close() error { itr.Closed = true; return nil } + +// Next returns the next value and shifts it off the beginning of the points slice. +func (itr *BooleanIterator) Next() (*influxql.BooleanPoint, error) { + if len(itr.Points) == 0 || itr.Closed { + return nil, nil + } + + v := &itr.Points[0] + itr.Points = itr.Points[1:] + return v, nil +} + +func BooleanIterators(inputs []*BooleanIterator) []influxql.Iterator { + itrs := make([]influxql.Iterator, len(inputs)) + for i := range itrs { + itrs[i] = influxql.Iterator(inputs[i]) + } + return itrs +} diff --git a/vendor/github.com/influxdata/influxdb/influxql/neldermead/neldermead_test.go b/vendor/github.com/influxdata/influxdb/influxql/neldermead/neldermead_test.go new file mode 100644 index 000000000..12d2681c5 --- /dev/null +++ b/vendor/github.com/influxdata/influxdb/influxql/neldermead/neldermead_test.go @@ -0,0 +1,64 @@ +package neldermead_test + +import ( + "math" + "testing" + + "github.com/influxdata/influxdb/influxql/neldermead" +) + +func round(num float64, precision float64) float64 { + rnum := num * math.Pow(10, precision) + var tnum float64 + if rnum < 0 { + tnum = math.Floor(rnum - 0.5) + } else { + tnum = math.Floor(rnum + 0.5) + } + rnum = tnum / math.Pow(10, precision) + return rnum +} + +func almostEqual(a, b, e float64) bool { + return math.Abs(a-b) < e +} + +func Test_Optimize(t *testing.T) { + + constraints := func(x []float64) { + for i := range x { + x[i] = round(x[i], 5) + } + } + // 100*(b-a^2)^2 + (1-a)^2 + // + // Obvious global minimum at (a,b) = (1,1) + // + // Useful visualization: + // https://www.wolframalpha.com/input/?i=minimize(100*(b-a%5E2)%5E2+%2B+(1-a)%5E2) + f := func(x []float64) float64 { + constraints(x) + // a = x[0] + // b = x[1] + return 100*(x[1]-x[0]*x[0])*(x[1]-x[0]*x[0]) + (1.0-x[0])*(1.0-x[0]) + } + + start := []float64{-1.2, 1.0} + + opt := neldermead.New() + epsilon := 1e-5 + min, parameters := opt.Optimize(f, start, epsilon, 1) + + if !almostEqual(min, 0, epsilon) { + t.Errorf("unexpected min: got %f exp 0", min) + } + + if !almostEqual(parameters[0], 1, 1e-2) { + t.Errorf("unexpected parameters[0]: got %f exp 1", parameters[0]) + } + + if !almostEqual(parameters[1], 1, 1e-2) { + t.Errorf("unexpected parameters[1]: got %f exp 1", parameters[1]) + } + +} diff --git a/vendor/github.com/influxdata/influxdb/influxql/parser.go b/vendor/github.com/influxdata/influxdb/influxql/parser.go index 7d9e5a5b5..c86edbf23 100644 --- a/vendor/github.com/influxdata/influxdb/influxql/parser.go +++ b/vendor/github.com/influxdata/influxdb/influxql/parser.go @@ -1573,16 +1573,14 @@ func (p *Parser) parseCreateDatabaseStatement() (*CreateDatabaseStatement, error } // Look for "NAME" - var rpName string = "default" // default is default if err := p.parseTokens([]Token{NAME}); err != nil { p.unscan() } else { - rpName, err = p.parseIdent() + stmt.RetentionPolicyName, err = p.parseIdent() if err != nil { return nil, err } } - stmt.RetentionPolicyName = rpName } else { p.unscan() } diff --git a/vendor/github.com/influxdata/influxdb/influxql/parser_test.go b/vendor/github.com/influxdata/influxdb/influxql/parser_test.go new file mode 100644 index 000000000..a8cedacbf --- /dev/null +++ b/vendor/github.com/influxdata/influxdb/influxql/parser_test.go @@ -0,0 +1,2874 @@ +package influxql_test + +import ( + "encoding/json" + "fmt" + "reflect" + "regexp" + "strings" + "testing" + "time" + + "github.com/influxdata/influxdb/influxql" +) + +// Ensure the parser can parse a multi-statement query. +func TestParser_ParseQuery(t *testing.T) { + s := `SELECT a FROM b; SELECT c FROM d` + q, err := influxql.NewParser(strings.NewReader(s)).ParseQuery() + if err != nil { + t.Fatalf("unexpected error: %s", err) + } else if len(q.Statements) != 2 { + t.Fatalf("unexpected statement count: %d", len(q.Statements)) + } +} + +func TestParser_ParseQuery_TrailingSemicolon(t *testing.T) { + s := `SELECT value FROM cpu;` + q, err := influxql.NewParser(strings.NewReader(s)).ParseQuery() + if err != nil { + t.Fatalf("unexpected error: %s", err) + } else if len(q.Statements) != 1 { + t.Fatalf("unexpected statement count: %d", len(q.Statements)) + } +} + +// Ensure the parser can parse an empty query. +func TestParser_ParseQuery_Empty(t *testing.T) { + q, err := influxql.NewParser(strings.NewReader(``)).ParseQuery() + if err != nil { + t.Fatalf("unexpected error: %s", err) + } else if len(q.Statements) != 0 { + t.Fatalf("unexpected statement count: %d", len(q.Statements)) + } +} + +// Ensure the parser can return an error from an malformed statement. +func TestParser_ParseQuery_ParseError(t *testing.T) { + _, err := influxql.NewParser(strings.NewReader(`SELECT`)).ParseQuery() + if err == nil || err.Error() != `found EOF, expected identifier, string, number, bool at line 1, char 8` { + t.Fatalf("unexpected error: %s", err) + } +} + +func TestParser_ParseQuery_NoSemicolon(t *testing.T) { + _, err := influxql.NewParser(strings.NewReader(`CREATE DATABASE foo CREATE DATABASE bar`)).ParseQuery() + if err == nil || err.Error() != `found CREATE, expected ; at line 1, char 21` { + t.Fatalf("unexpected error: %s", err) + } +} + +// Ensure the parser can parse strings into Statement ASTs. +func TestParser_ParseStatement(t *testing.T) { + // For use in various tests. + now := time.Now() + + var tests = []struct { + skip bool + s string + params map[string]interface{} + stmt influxql.Statement + err string + }{ + // SELECT * statement + { + s: `SELECT * FROM myseries`, + stmt: &influxql.SelectStatement{ + IsRawQuery: true, + Fields: []*influxql.Field{ + {Expr: &influxql.Wildcard{}}, + }, + Sources: []influxql.Source{&influxql.Measurement{Name: "myseries"}}, + }, + }, + { + s: `SELECT * FROM myseries GROUP BY *`, + stmt: &influxql.SelectStatement{ + IsRawQuery: true, + Fields: []*influxql.Field{ + {Expr: &influxql.Wildcard{}}, + }, + Sources: []influxql.Source{&influxql.Measurement{Name: "myseries"}}, + Dimensions: []*influxql.Dimension{{Expr: &influxql.Wildcard{}}}, + }, + }, + { + s: `SELECT field1, * FROM myseries GROUP BY *`, + stmt: &influxql.SelectStatement{ + IsRawQuery: true, + Fields: []*influxql.Field{ + {Expr: &influxql.VarRef{Val: "field1"}}, + {Expr: &influxql.Wildcard{}}, + }, + Sources: []influxql.Source{&influxql.Measurement{Name: "myseries"}}, + Dimensions: []*influxql.Dimension{{Expr: &influxql.Wildcard{}}}, + }, + }, + { + s: `SELECT *, field1 FROM myseries GROUP BY *`, + stmt: &influxql.SelectStatement{ + IsRawQuery: true, + Fields: []*influxql.Field{ + {Expr: &influxql.Wildcard{}}, + {Expr: &influxql.VarRef{Val: "field1"}}, + }, + Sources: []influxql.Source{&influxql.Measurement{Name: "myseries"}}, + Dimensions: []*influxql.Dimension{{Expr: &influxql.Wildcard{}}}, + }, + }, + + // SELECT statement + { + s: fmt.Sprintf(`SELECT mean(field1), sum(field2) ,count(field3) AS field_x FROM myseries WHERE host = 'hosta.influxdb.org' and time > '%s' GROUP BY time(10h) ORDER BY DESC LIMIT 20 OFFSET 10;`, now.UTC().Format(time.RFC3339Nano)), + stmt: &influxql.SelectStatement{ + IsRawQuery: false, + Fields: []*influxql.Field{ + {Expr: &influxql.Call{Name: "mean", Args: []influxql.Expr{&influxql.VarRef{Val: "field1"}}}}, + {Expr: &influxql.Call{Name: "sum", Args: []influxql.Expr{&influxql.VarRef{Val: "field2"}}}}, + {Expr: &influxql.Call{Name: "count", Args: []influxql.Expr{&influxql.VarRef{Val: "field3"}}}, Alias: "field_x"}, + }, + Sources: []influxql.Source{&influxql.Measurement{Name: "myseries"}}, + Condition: &influxql.BinaryExpr{ + Op: influxql.AND, + LHS: &influxql.BinaryExpr{ + Op: influxql.EQ, + LHS: &influxql.VarRef{Val: "host"}, + RHS: &influxql.StringLiteral{Val: "hosta.influxdb.org"}, + }, + RHS: &influxql.BinaryExpr{ + Op: influxql.GT, + LHS: &influxql.VarRef{Val: "time"}, + RHS: &influxql.StringLiteral{Val: now.UTC().Format(time.RFC3339Nano)}, + }, + }, + Dimensions: []*influxql.Dimension{{Expr: &influxql.Call{Name: "time", Args: []influxql.Expr{&influxql.DurationLiteral{Val: 10 * time.Hour}}}}}, + SortFields: []*influxql.SortField{ + {Ascending: false}, + }, + Limit: 20, + Offset: 10, + }, + }, + { + s: `SELECT "foo.bar.baz" AS foo FROM myseries`, + stmt: &influxql.SelectStatement{ + IsRawQuery: true, + Fields: []*influxql.Field{ + {Expr: &influxql.VarRef{Val: "foo.bar.baz"}, Alias: "foo"}, + }, + Sources: []influxql.Source{&influxql.Measurement{Name: "myseries"}}, + }, + }, + { + s: `SELECT "foo.bar.baz" AS foo FROM foo`, + stmt: &influxql.SelectStatement{ + IsRawQuery: true, + Fields: []*influxql.Field{ + {Expr: &influxql.VarRef{Val: "foo.bar.baz"}, Alias: "foo"}, + }, + Sources: []influxql.Source{&influxql.Measurement{Name: "foo"}}, + }, + }, + + // derivative + { + s: `SELECT derivative(field1, 1h) FROM myseries;`, + stmt: &influxql.SelectStatement{ + IsRawQuery: false, + Fields: []*influxql.Field{ + {Expr: &influxql.Call{Name: "derivative", Args: []influxql.Expr{&influxql.VarRef{Val: "field1"}, &influxql.DurationLiteral{Val: time.Hour}}}}, + }, + Sources: []influxql.Source{&influxql.Measurement{Name: "myseries"}}, + }, + }, + + { + s: fmt.Sprintf(`SELECT derivative(field1, 1h) FROM myseries WHERE time > '%s'`, now.UTC().Format(time.RFC3339Nano)), + stmt: &influxql.SelectStatement{ + IsRawQuery: false, + Fields: []*influxql.Field{ + {Expr: &influxql.Call{Name: "derivative", Args: []influxql.Expr{&influxql.VarRef{Val: "field1"}, &influxql.DurationLiteral{Val: time.Hour}}}}, + }, + Sources: []influxql.Source{&influxql.Measurement{Name: "myseries"}}, + Condition: &influxql.BinaryExpr{ + Op: influxql.GT, + LHS: &influxql.VarRef{Val: "time"}, + RHS: &influxql.StringLiteral{Val: now.UTC().Format(time.RFC3339Nano)}, + }, + }, + }, + + { + s: `SELECT derivative(field1, 1h) / derivative(field2, 1h) FROM myseries`, + stmt: &influxql.SelectStatement{ + IsRawQuery: false, + Fields: []*influxql.Field{ + { + Expr: &influxql.BinaryExpr{ + LHS: &influxql.Call{ + Name: "derivative", + Args: []influxql.Expr{ + &influxql.VarRef{Val: "field1"}, + &influxql.DurationLiteral{Val: time.Hour}, + }, + }, + RHS: &influxql.Call{ + Name: "derivative", + Args: []influxql.Expr{ + &influxql.VarRef{Val: "field2"}, + &influxql.DurationLiteral{Val: time.Hour}, + }, + }, + Op: influxql.DIV, + }, + }, + }, + Sources: []influxql.Source{ + &influxql.Measurement{Name: "myseries"}, + }, + }, + }, + + // difference + { + s: `SELECT difference(field1) FROM myseries;`, + stmt: &influxql.SelectStatement{ + IsRawQuery: false, + Fields: []*influxql.Field{ + {Expr: &influxql.Call{Name: "difference", Args: []influxql.Expr{&influxql.VarRef{Val: "field1"}}}}, + }, + Sources: []influxql.Source{&influxql.Measurement{Name: "myseries"}}, + }, + }, + + { + s: fmt.Sprintf(`SELECT difference(max(field1)) FROM myseries WHERE time > '%s' GROUP BY time(1m)`, now.UTC().Format(time.RFC3339Nano)), + stmt: &influxql.SelectStatement{ + IsRawQuery: false, + Fields: []*influxql.Field{ + { + Expr: &influxql.Call{ + Name: "difference", + Args: []influxql.Expr{ + &influxql.Call{ + Name: "max", + Args: []influxql.Expr{ + &influxql.VarRef{Val: "field1"}, + }, + }, + }, + }, + }, + }, + Sources: []influxql.Source{&influxql.Measurement{Name: "myseries"}}, + Dimensions: []*influxql.Dimension{ + { + Expr: &influxql.Call{ + Name: "time", + Args: []influxql.Expr{ + &influxql.DurationLiteral{Val: time.Minute}, + }, + }, + }, + }, + Condition: &influxql.BinaryExpr{ + Op: influxql.GT, + LHS: &influxql.VarRef{Val: "time"}, + RHS: &influxql.StringLiteral{Val: now.UTC().Format(time.RFC3339Nano)}, + }, + }, + }, + + // moving_average + { + s: `SELECT moving_average(field1, 3) FROM myseries;`, + stmt: &influxql.SelectStatement{ + IsRawQuery: false, + Fields: []*influxql.Field{ + {Expr: &influxql.Call{Name: "moving_average", Args: []influxql.Expr{&influxql.VarRef{Val: "field1"}, &influxql.IntegerLiteral{Val: 3}}}}, + }, + Sources: []influxql.Source{&influxql.Measurement{Name: "myseries"}}, + }, + }, + + { + s: fmt.Sprintf(`SELECT moving_average(max(field1), 3) FROM myseries WHERE time > '%s' GROUP BY time(1m)`, now.UTC().Format(time.RFC3339Nano)), + stmt: &influxql.SelectStatement{ + IsRawQuery: false, + Fields: []*influxql.Field{ + { + Expr: &influxql.Call{ + Name: "moving_average", + Args: []influxql.Expr{ + &influxql.Call{ + Name: "max", + Args: []influxql.Expr{ + &influxql.VarRef{Val: "field1"}, + }, + }, + &influxql.IntegerLiteral{Val: 3}, + }, + }, + }, + }, + Sources: []influxql.Source{&influxql.Measurement{Name: "myseries"}}, + Dimensions: []*influxql.Dimension{ + { + Expr: &influxql.Call{ + Name: "time", + Args: []influxql.Expr{ + &influxql.DurationLiteral{Val: time.Minute}, + }, + }, + }, + }, + Condition: &influxql.BinaryExpr{ + Op: influxql.GT, + LHS: &influxql.VarRef{Val: "time"}, + RHS: &influxql.StringLiteral{Val: now.UTC().Format(time.RFC3339Nano)}, + }, + }, + }, + // holt_winters + { + s: fmt.Sprintf(`SELECT holt_winters(first(field1), 3, 1) FROM myseries WHERE time > '%s' GROUP BY time(1h);`, now.UTC().Format(time.RFC3339Nano)), + stmt: &influxql.SelectStatement{ + IsRawQuery: false, + Fields: []*influxql.Field{ + {Expr: &influxql.Call{ + Name: "holt_winters", + Args: []influxql.Expr{ + &influxql.Call{ + Name: "first", + Args: []influxql.Expr{ + &influxql.VarRef{Val: "field1"}, + }, + }, + &influxql.IntegerLiteral{Val: 3}, + &influxql.IntegerLiteral{Val: 1}, + }, + }}, + }, + Dimensions: []*influxql.Dimension{ + { + Expr: &influxql.Call{ + Name: "time", + Args: []influxql.Expr{ + &influxql.DurationLiteral{Val: 1 * time.Hour}, + }, + }, + }, + }, + Sources: []influxql.Source{&influxql.Measurement{Name: "myseries"}}, + Condition: &influxql.BinaryExpr{ + Op: influxql.GT, + LHS: &influxql.VarRef{Val: "time"}, + RHS: &influxql.StringLiteral{Val: now.UTC().Format(time.RFC3339Nano)}, + }, + }, + }, + + { + s: fmt.Sprintf(`SELECT holt_winters_with_fit(first(field1), 3, 1) FROM myseries WHERE time > '%s' GROUP BY time(1h);`, now.UTC().Format(time.RFC3339Nano)), + stmt: &influxql.SelectStatement{ + IsRawQuery: false, + Fields: []*influxql.Field{ + {Expr: &influxql.Call{ + Name: "holt_winters_with_fit", + Args: []influxql.Expr{ + &influxql.Call{ + Name: "first", + Args: []influxql.Expr{ + &influxql.VarRef{Val: "field1"}, + }, + }, + &influxql.IntegerLiteral{Val: 3}, + &influxql.IntegerLiteral{Val: 1}, + }}}, + }, + Dimensions: []*influxql.Dimension{ + { + Expr: &influxql.Call{ + Name: "time", + Args: []influxql.Expr{ + &influxql.DurationLiteral{Val: 1 * time.Hour}, + }, + }, + }, + }, + Sources: []influxql.Source{&influxql.Measurement{Name: "myseries"}}, + Condition: &influxql.BinaryExpr{ + Op: influxql.GT, + LHS: &influxql.VarRef{Val: "time"}, + RHS: &influxql.StringLiteral{Val: now.UTC().Format(time.RFC3339Nano)}, + }, + }, + }, + { + s: fmt.Sprintf(`SELECT holt_winters(max(field1), 4, 5) FROM myseries WHERE time > '%s' GROUP BY time(1m)`, now.UTC().Format(time.RFC3339Nano)), + stmt: &influxql.SelectStatement{ + IsRawQuery: false, + Fields: []*influxql.Field{ + { + Expr: &influxql.Call{ + Name: "holt_winters", + Args: []influxql.Expr{ + &influxql.Call{ + Name: "max", + Args: []influxql.Expr{ + &influxql.VarRef{Val: "field1"}, + }, + }, + &influxql.IntegerLiteral{Val: 4}, + &influxql.IntegerLiteral{Val: 5}, + }, + }, + }, + }, + Sources: []influxql.Source{&influxql.Measurement{Name: "myseries"}}, + Dimensions: []*influxql.Dimension{ + { + Expr: &influxql.Call{ + Name: "time", + Args: []influxql.Expr{ + &influxql.DurationLiteral{Val: time.Minute}, + }, + }, + }, + }, + Condition: &influxql.BinaryExpr{ + Op: influxql.GT, + LHS: &influxql.VarRef{Val: "time"}, + RHS: &influxql.StringLiteral{Val: now.UTC().Format(time.RFC3339Nano)}, + }, + }, + }, + + { + s: fmt.Sprintf(`SELECT holt_winters_with_fit(max(field1), 4, 5) FROM myseries WHERE time > '%s' GROUP BY time(1m)`, now.UTC().Format(time.RFC3339Nano)), + stmt: &influxql.SelectStatement{ + IsRawQuery: false, + Fields: []*influxql.Field{ + { + Expr: &influxql.Call{ + Name: "holt_winters_with_fit", + Args: []influxql.Expr{ + &influxql.Call{ + Name: "max", + Args: []influxql.Expr{ + &influxql.VarRef{Val: "field1"}, + }, + }, + &influxql.IntegerLiteral{Val: 4}, + &influxql.IntegerLiteral{Val: 5}, + }, + }, + }, + }, + Sources: []influxql.Source{&influxql.Measurement{Name: "myseries"}}, + Dimensions: []*influxql.Dimension{ + { + Expr: &influxql.Call{ + Name: "time", + Args: []influxql.Expr{ + &influxql.DurationLiteral{Val: time.Minute}, + }, + }, + }, + }, + Condition: &influxql.BinaryExpr{ + Op: influxql.GT, + LHS: &influxql.VarRef{Val: "time"}, + RHS: &influxql.StringLiteral{Val: now.UTC().Format(time.RFC3339Nano)}, + }, + }, + }, + + // SELECT statement (lowercase) + { + s: `select my_field from myseries`, + stmt: &influxql.SelectStatement{ + IsRawQuery: true, + Fields: []*influxql.Field{{Expr: &influxql.VarRef{Val: "my_field"}}}, + Sources: []influxql.Source{&influxql.Measurement{Name: "myseries"}}, + }, + }, + + // SELECT statement (lowercase) with quoted field + { + s: `select 'my_field' from myseries`, + stmt: &influxql.SelectStatement{ + IsRawQuery: true, + Fields: []*influxql.Field{{Expr: &influxql.StringLiteral{Val: "my_field"}}}, + Sources: []influxql.Source{&influxql.Measurement{Name: "myseries"}}, + }, + }, + + // SELECT statement with multiple ORDER BY fields + { + skip: true, + s: `SELECT field1 FROM myseries ORDER BY ASC, field1, field2 DESC LIMIT 10`, + stmt: &influxql.SelectStatement{ + IsRawQuery: true, + Fields: []*influxql.Field{{Expr: &influxql.VarRef{Val: "field1"}}}, + Sources: []influxql.Source{&influxql.Measurement{Name: "myseries"}}, + SortFields: []*influxql.SortField{ + {Ascending: true}, + {Name: "field1"}, + {Name: "field2"}, + }, + Limit: 10, + }, + }, + + // SELECT statement with SLIMIT and SOFFSET + { + s: `SELECT field1 FROM myseries SLIMIT 10 SOFFSET 5`, + stmt: &influxql.SelectStatement{ + IsRawQuery: true, + Fields: []*influxql.Field{{Expr: &influxql.VarRef{Val: "field1"}}}, + Sources: []influxql.Source{&influxql.Measurement{Name: "myseries"}}, + SLimit: 10, + SOffset: 5, + }, + }, + + // SELECT * FROM cpu WHERE host = 'serverC' AND region =~ /.*west.*/ + { + s: `SELECT * FROM cpu WHERE host = 'serverC' AND region =~ /.*west.*/`, + stmt: &influxql.SelectStatement{ + IsRawQuery: true, + Fields: []*influxql.Field{{Expr: &influxql.Wildcard{}}}, + Sources: []influxql.Source{&influxql.Measurement{Name: "cpu"}}, + Condition: &influxql.BinaryExpr{ + Op: influxql.AND, + LHS: &influxql.BinaryExpr{ + Op: influxql.EQ, + LHS: &influxql.VarRef{Val: "host"}, + RHS: &influxql.StringLiteral{Val: "serverC"}, + }, + RHS: &influxql.BinaryExpr{ + Op: influxql.EQREGEX, + LHS: &influxql.VarRef{Val: "region"}, + RHS: &influxql.RegexLiteral{Val: regexp.MustCompile(".*west.*")}, + }, + }, + }, + }, + + // select percentile statements + { + s: `select percentile("field1", 2.0) from cpu`, + stmt: &influxql.SelectStatement{ + IsRawQuery: false, + Fields: []*influxql.Field{ + {Expr: &influxql.Call{Name: "percentile", Args: []influxql.Expr{&influxql.VarRef{Val: "field1"}, &influxql.NumberLiteral{Val: 2.0}}}}, + }, + Sources: []influxql.Source{&influxql.Measurement{Name: "cpu"}}, + }, + }, + + { + s: `select percentile("field1", 2.0), field2 from cpu`, + stmt: &influxql.SelectStatement{ + IsRawQuery: false, + Fields: []*influxql.Field{ + {Expr: &influxql.Call{Name: "percentile", Args: []influxql.Expr{&influxql.VarRef{Val: "field1"}, &influxql.NumberLiteral{Val: 2.0}}}}, + {Expr: &influxql.VarRef{Val: "field2"}}, + }, + Sources: []influxql.Source{&influxql.Measurement{Name: "cpu"}}, + }, + }, + + // select top statements + { + s: `select top("field1", 2) from cpu`, + stmt: &influxql.SelectStatement{ + IsRawQuery: false, + Fields: []*influxql.Field{ + {Expr: &influxql.Call{Name: "top", Args: []influxql.Expr{&influxql.VarRef{Val: "field1"}, &influxql.IntegerLiteral{Val: 2}}}}, + }, + Sources: []influxql.Source{&influxql.Measurement{Name: "cpu"}}, + }, + }, + + { + s: `select top(field1, 2) from cpu`, + stmt: &influxql.SelectStatement{ + IsRawQuery: false, + Fields: []*influxql.Field{ + {Expr: &influxql.Call{Name: "top", Args: []influxql.Expr{&influxql.VarRef{Val: "field1"}, &influxql.IntegerLiteral{Val: 2}}}}, + }, + Sources: []influxql.Source{&influxql.Measurement{Name: "cpu"}}, + }, + }, + + { + s: `select top(field1, 2), tag1 from cpu`, + stmt: &influxql.SelectStatement{ + IsRawQuery: false, + Fields: []*influxql.Field{ + {Expr: &influxql.Call{Name: "top", Args: []influxql.Expr{&influxql.VarRef{Val: "field1"}, &influxql.IntegerLiteral{Val: 2}}}}, + {Expr: &influxql.VarRef{Val: "tag1"}}, + }, + Sources: []influxql.Source{&influxql.Measurement{Name: "cpu"}}, + }, + }, + + { + s: `select top(field1, tag1, 2), tag1 from cpu`, + stmt: &influxql.SelectStatement{ + IsRawQuery: false, + Fields: []*influxql.Field{ + {Expr: &influxql.Call{Name: "top", Args: []influxql.Expr{&influxql.VarRef{Val: "field1"}, &influxql.VarRef{Val: "tag1"}, &influxql.IntegerLiteral{Val: 2}}}}, + {Expr: &influxql.VarRef{Val: "tag1"}}, + }, + Sources: []influxql.Source{&influxql.Measurement{Name: "cpu"}}, + }, + }, + + // select distinct statements + { + s: `select distinct(field1) from cpu`, + stmt: &influxql.SelectStatement{ + IsRawQuery: false, + Fields: []*influxql.Field{ + {Expr: &influxql.Call{Name: "distinct", Args: []influxql.Expr{&influxql.VarRef{Val: "field1"}}}}, + }, + Sources: []influxql.Source{&influxql.Measurement{Name: "cpu"}}, + }, + }, + + { + s: `select distinct field2 from network`, + stmt: &influxql.SelectStatement{ + IsRawQuery: true, + Fields: []*influxql.Field{ + {Expr: &influxql.Distinct{Val: "field2"}}, + }, + Sources: []influxql.Source{&influxql.Measurement{Name: "network"}}, + }, + }, + + { + s: `select count(distinct field3) from metrics`, + stmt: &influxql.SelectStatement{ + IsRawQuery: false, + Fields: []*influxql.Field{ + {Expr: &influxql.Call{Name: "count", Args: []influxql.Expr{&influxql.Distinct{Val: "field3"}}}}, + }, + Sources: []influxql.Source{&influxql.Measurement{Name: "metrics"}}, + }, + }, + + { + s: `select count(distinct field3), sum(field4) from metrics`, + stmt: &influxql.SelectStatement{ + IsRawQuery: false, + Fields: []*influxql.Field{ + {Expr: &influxql.Call{Name: "count", Args: []influxql.Expr{&influxql.Distinct{Val: "field3"}}}}, + {Expr: &influxql.Call{Name: "sum", Args: []influxql.Expr{&influxql.VarRef{Val: "field4"}}}}, + }, + Sources: []influxql.Source{&influxql.Measurement{Name: "metrics"}}, + }, + }, + + { + s: `select count(distinct(field3)), sum(field4) from metrics`, + stmt: &influxql.SelectStatement{ + IsRawQuery: false, + Fields: []*influxql.Field{ + {Expr: &influxql.Call{Name: "count", Args: []influxql.Expr{&influxql.Call{Name: "distinct", Args: []influxql.Expr{&influxql.VarRef{Val: "field3"}}}}}}, + {Expr: &influxql.Call{Name: "sum", Args: []influxql.Expr{&influxql.VarRef{Val: "field4"}}}}, + }, + Sources: []influxql.Source{&influxql.Measurement{Name: "metrics"}}, + }, + }, + + // SELECT * FROM WHERE time + { + s: fmt.Sprintf(`SELECT * FROM cpu WHERE time > '%s'`, now.UTC().Format(time.RFC3339Nano)), + stmt: &influxql.SelectStatement{ + IsRawQuery: true, + Fields: []*influxql.Field{{Expr: &influxql.Wildcard{}}}, + Sources: []influxql.Source{&influxql.Measurement{Name: "cpu"}}, + Condition: &influxql.BinaryExpr{ + Op: influxql.GT, + LHS: &influxql.VarRef{Val: "time"}, + RHS: &influxql.StringLiteral{Val: now.UTC().Format(time.RFC3339Nano)}, + }, + }, + }, + + // SELECT * FROM WHERE field comparisons + { + s: `SELECT * FROM cpu WHERE load > 100`, + stmt: &influxql.SelectStatement{ + IsRawQuery: true, + Fields: []*influxql.Field{{Expr: &influxql.Wildcard{}}}, + Sources: []influxql.Source{&influxql.Measurement{Name: "cpu"}}, + Condition: &influxql.BinaryExpr{ + Op: influxql.GT, + LHS: &influxql.VarRef{Val: "load"}, + RHS: &influxql.IntegerLiteral{Val: 100}, + }, + }, + }, + { + s: `SELECT * FROM cpu WHERE load >= 100`, + stmt: &influxql.SelectStatement{ + IsRawQuery: true, + Fields: []*influxql.Field{{Expr: &influxql.Wildcard{}}}, + Sources: []influxql.Source{&influxql.Measurement{Name: "cpu"}}, + Condition: &influxql.BinaryExpr{ + Op: influxql.GTE, + LHS: &influxql.VarRef{Val: "load"}, + RHS: &influxql.IntegerLiteral{Val: 100}, + }, + }, + }, + { + s: `SELECT * FROM cpu WHERE load = 100`, + stmt: &influxql.SelectStatement{ + IsRawQuery: true, + Fields: []*influxql.Field{{Expr: &influxql.Wildcard{}}}, + Sources: []influxql.Source{&influxql.Measurement{Name: "cpu"}}, + Condition: &influxql.BinaryExpr{ + Op: influxql.EQ, + LHS: &influxql.VarRef{Val: "load"}, + RHS: &influxql.IntegerLiteral{Val: 100}, + }, + }, + }, + { + s: `SELECT * FROM cpu WHERE load <= 100`, + stmt: &influxql.SelectStatement{ + IsRawQuery: true, + Fields: []*influxql.Field{{Expr: &influxql.Wildcard{}}}, + Sources: []influxql.Source{&influxql.Measurement{Name: "cpu"}}, + Condition: &influxql.BinaryExpr{ + Op: influxql.LTE, + LHS: &influxql.VarRef{Val: "load"}, + RHS: &influxql.IntegerLiteral{Val: 100}, + }, + }, + }, + { + s: `SELECT * FROM cpu WHERE load < 100`, + stmt: &influxql.SelectStatement{ + IsRawQuery: true, + Fields: []*influxql.Field{{Expr: &influxql.Wildcard{}}}, + Sources: []influxql.Source{&influxql.Measurement{Name: "cpu"}}, + Condition: &influxql.BinaryExpr{ + Op: influxql.LT, + LHS: &influxql.VarRef{Val: "load"}, + RHS: &influxql.IntegerLiteral{Val: 100}, + }, + }, + }, + { + s: `SELECT * FROM cpu WHERE load != 100`, + stmt: &influxql.SelectStatement{ + IsRawQuery: true, + Fields: []*influxql.Field{{Expr: &influxql.Wildcard{}}}, + Sources: []influxql.Source{&influxql.Measurement{Name: "cpu"}}, + Condition: &influxql.BinaryExpr{ + Op: influxql.NEQ, + LHS: &influxql.VarRef{Val: "load"}, + RHS: &influxql.IntegerLiteral{Val: 100}, + }, + }, + }, + + // SELECT * FROM // + { + s: `SELECT * FROM /cpu.*/`, + stmt: &influxql.SelectStatement{ + IsRawQuery: true, + Fields: []*influxql.Field{{Expr: &influxql.Wildcard{}}}, + Sources: []influxql.Source{&influxql.Measurement{ + Regex: &influxql.RegexLiteral{Val: regexp.MustCompile("cpu.*")}}, + }, + }, + }, + + // SELECT * FROM "db"."rp".// + { + s: `SELECT * FROM "db"."rp"./cpu.*/`, + stmt: &influxql.SelectStatement{ + IsRawQuery: true, + Fields: []*influxql.Field{{Expr: &influxql.Wildcard{}}}, + Sources: []influxql.Source{&influxql.Measurement{ + Database: `db`, + RetentionPolicy: `rp`, + Regex: &influxql.RegexLiteral{Val: regexp.MustCompile("cpu.*")}}, + }, + }, + }, + + // SELECT * FROM "db"..// + { + s: `SELECT * FROM "db"../cpu.*/`, + stmt: &influxql.SelectStatement{ + IsRawQuery: true, + Fields: []*influxql.Field{{Expr: &influxql.Wildcard{}}}, + Sources: []influxql.Source{&influxql.Measurement{ + Database: `db`, + Regex: &influxql.RegexLiteral{Val: regexp.MustCompile("cpu.*")}}, + }, + }, + }, + + // SELECT * FROM "rp".// + { + s: `SELECT * FROM "rp"./cpu.*/`, + stmt: &influxql.SelectStatement{ + IsRawQuery: true, + Fields: []*influxql.Field{{Expr: &influxql.Wildcard{}}}, + Sources: []influxql.Source{&influxql.Measurement{ + RetentionPolicy: `rp`, + Regex: &influxql.RegexLiteral{Val: regexp.MustCompile("cpu.*")}}, + }, + }, + }, + + // SELECT statement with group by + { + s: `SELECT sum(value) FROM "kbps" WHERE time > now() - 120s AND deliveryservice='steam-dns' and cachegroup = 'total' GROUP BY time(60s)`, + stmt: &influxql.SelectStatement{ + IsRawQuery: false, + Fields: []*influxql.Field{ + {Expr: &influxql.Call{Name: "sum", Args: []influxql.Expr{&influxql.VarRef{Val: "value"}}}}, + }, + Sources: []influxql.Source{&influxql.Measurement{Name: "kbps"}}, + Dimensions: []*influxql.Dimension{{Expr: &influxql.Call{Name: "time", Args: []influxql.Expr{&influxql.DurationLiteral{Val: 60 * time.Second}}}}}, + Condition: &influxql.BinaryExpr{ // 1 + Op: influxql.AND, + LHS: &influxql.BinaryExpr{ // 2 + Op: influxql.AND, + LHS: &influxql.BinaryExpr{ //3 + Op: influxql.GT, + LHS: &influxql.VarRef{Val: "time"}, + RHS: &influxql.BinaryExpr{ + Op: influxql.SUB, + LHS: &influxql.Call{Name: "now"}, + RHS: &influxql.DurationLiteral{Val: mustParseDuration("120s")}, + }, + }, + RHS: &influxql.BinaryExpr{ + Op: influxql.EQ, + LHS: &influxql.VarRef{Val: "deliveryservice"}, + RHS: &influxql.StringLiteral{Val: "steam-dns"}, + }, + }, + RHS: &influxql.BinaryExpr{ + Op: influxql.EQ, + LHS: &influxql.VarRef{Val: "cachegroup"}, + RHS: &influxql.StringLiteral{Val: "total"}, + }, + }, + }, + }, + + // SELECT statement with fill + { + s: fmt.Sprintf(`SELECT mean(value) FROM cpu where time < '%s' GROUP BY time(5m) fill(1)`, now.UTC().Format(time.RFC3339Nano)), + stmt: &influxql.SelectStatement{ + Fields: []*influxql.Field{{ + Expr: &influxql.Call{ + Name: "mean", + Args: []influxql.Expr{&influxql.VarRef{Val: "value"}}}}}, + Sources: []influxql.Source{&influxql.Measurement{Name: "cpu"}}, + Condition: &influxql.BinaryExpr{ + Op: influxql.LT, + LHS: &influxql.VarRef{Val: "time"}, + RHS: &influxql.StringLiteral{Val: now.UTC().Format(time.RFC3339Nano)}, + }, + Dimensions: []*influxql.Dimension{{Expr: &influxql.Call{Name: "time", Args: []influxql.Expr{&influxql.DurationLiteral{Val: 5 * time.Minute}}}}}, + Fill: influxql.NumberFill, + FillValue: int64(1), + }, + }, + + // SELECT statement with FILL(none) -- check case insensitivity + { + s: fmt.Sprintf(`SELECT mean(value) FROM cpu where time < '%s' GROUP BY time(5m) FILL(none)`, now.UTC().Format(time.RFC3339Nano)), + stmt: &influxql.SelectStatement{ + Fields: []*influxql.Field{{ + Expr: &influxql.Call{ + Name: "mean", + Args: []influxql.Expr{&influxql.VarRef{Val: "value"}}}}}, + Sources: []influxql.Source{&influxql.Measurement{Name: "cpu"}}, + Condition: &influxql.BinaryExpr{ + Op: influxql.LT, + LHS: &influxql.VarRef{Val: "time"}, + RHS: &influxql.StringLiteral{Val: now.UTC().Format(time.RFC3339Nano)}, + }, + Dimensions: []*influxql.Dimension{{Expr: &influxql.Call{Name: "time", Args: []influxql.Expr{&influxql.DurationLiteral{Val: 5 * time.Minute}}}}}, + Fill: influxql.NoFill, + }, + }, + + // SELECT statement with previous fill + { + s: fmt.Sprintf(`SELECT mean(value) FROM cpu where time < '%s' GROUP BY time(5m) FILL(previous)`, now.UTC().Format(time.RFC3339Nano)), + stmt: &influxql.SelectStatement{ + Fields: []*influxql.Field{{ + Expr: &influxql.Call{ + Name: "mean", + Args: []influxql.Expr{&influxql.VarRef{Val: "value"}}}}}, + Sources: []influxql.Source{&influxql.Measurement{Name: "cpu"}}, + Condition: &influxql.BinaryExpr{ + Op: influxql.LT, + LHS: &influxql.VarRef{Val: "time"}, + RHS: &influxql.StringLiteral{Val: now.UTC().Format(time.RFC3339Nano)}, + }, + Dimensions: []*influxql.Dimension{{Expr: &influxql.Call{Name: "time", Args: []influxql.Expr{&influxql.DurationLiteral{Val: 5 * time.Minute}}}}}, + Fill: influxql.PreviousFill, + }, + }, + + // SELECT casts + { + s: `SELECT field1::float, field2::integer, field3::string, field4::boolean, field5::field, tag1::tag FROM cpu`, + stmt: &influxql.SelectStatement{ + IsRawQuery: true, + Fields: []*influxql.Field{ + { + Expr: &influxql.VarRef{ + Val: "field1", + Type: influxql.Float, + }, + }, + { + Expr: &influxql.VarRef{ + Val: "field2", + Type: influxql.Integer, + }, + }, + { + Expr: &influxql.VarRef{ + Val: "field3", + Type: influxql.String, + }, + }, + { + Expr: &influxql.VarRef{ + Val: "field4", + Type: influxql.Boolean, + }, + }, + { + Expr: &influxql.VarRef{ + Val: "field5", + Type: influxql.AnyField, + }, + }, + { + Expr: &influxql.VarRef{ + Val: "tag1", + Type: influxql.Tag, + }, + }, + }, + Sources: []influxql.Source{&influxql.Measurement{Name: "cpu"}}, + }, + }, + + // SELECT statement with a bound parameter + { + s: `SELECT value FROM cpu WHERE value > $value`, + params: map[string]interface{}{ + "value": int64(2), + }, + stmt: &influxql.SelectStatement{ + IsRawQuery: true, + Fields: []*influxql.Field{{ + Expr: &influxql.VarRef{Val: "value"}}}, + Sources: []influxql.Source{&influxql.Measurement{Name: "cpu"}}, + Condition: &influxql.BinaryExpr{ + Op: influxql.GT, + LHS: &influxql.VarRef{Val: "value"}, + RHS: &influxql.IntegerLiteral{Val: 2}, + }, + }, + }, + + // See issues https://github.com/influxdata/influxdb/issues/1647 + // and https://github.com/influxdata/influxdb/issues/4404 + // DELETE statement + //{ + // s: `DELETE FROM myseries WHERE host = 'hosta.influxdb.org'`, + // stmt: &influxql.DeleteStatement{ + // Source: &influxql.Measurement{Name: "myseries"}, + // Condition: &influxql.BinaryExpr{ + // Op: influxql.EQ, + // LHS: &influxql.VarRef{Val: "host"}, + // RHS: &influxql.StringLiteral{Val: "hosta.influxdb.org"}, + // }, + // }, + //}, + + // SHOW GRANTS + { + s: `SHOW GRANTS FOR jdoe`, + stmt: &influxql.ShowGrantsForUserStatement{Name: "jdoe"}, + }, + + // SHOW DATABASES + { + s: `SHOW DATABASES`, + stmt: &influxql.ShowDatabasesStatement{}, + }, + + // SHOW SERIES statement + { + s: `SHOW SERIES`, + stmt: &influxql.ShowSeriesStatement{}, + }, + + // SHOW SERIES FROM + { + s: `SHOW SERIES FROM cpu`, + stmt: &influxql.ShowSeriesStatement{ + Sources: []influxql.Source{&influxql.Measurement{Name: "cpu"}}, + }, + }, + + // SHOW SERIES FROM // + { + s: `SHOW SERIES FROM /[cg]pu/`, + stmt: &influxql.ShowSeriesStatement{ + Sources: []influxql.Source{ + &influxql.Measurement{ + Regex: &influxql.RegexLiteral{Val: regexp.MustCompile(`[cg]pu`)}, + }, + }, + }, + }, + + // SHOW SERIES with OFFSET 0 + { + s: `SHOW SERIES OFFSET 0`, + stmt: &influxql.ShowSeriesStatement{Offset: 0}, + }, + + // SHOW SERIES with LIMIT 2 OFFSET 0 + { + s: `SHOW SERIES LIMIT 2 OFFSET 0`, + stmt: &influxql.ShowSeriesStatement{Offset: 0, Limit: 2}, + }, + + // SHOW SERIES WHERE with ORDER BY and LIMIT + { + skip: true, + s: `SHOW SERIES WHERE region = 'order by desc' ORDER BY DESC, field1, field2 DESC LIMIT 10`, + stmt: &influxql.ShowSeriesStatement{ + Condition: &influxql.BinaryExpr{ + Op: influxql.EQ, + LHS: &influxql.VarRef{Val: "region"}, + RHS: &influxql.StringLiteral{Val: "order by desc"}, + }, + SortFields: []*influxql.SortField{ + &influxql.SortField{Ascending: false}, + &influxql.SortField{Name: "field1", Ascending: true}, + &influxql.SortField{Name: "field2"}, + }, + Limit: 10, + }, + }, + + // SHOW MEASUREMENTS WHERE with ORDER BY and LIMIT + { + skip: true, + s: `SHOW MEASUREMENTS WHERE region = 'uswest' ORDER BY ASC, field1, field2 DESC LIMIT 10`, + stmt: &influxql.ShowMeasurementsStatement{ + Condition: &influxql.BinaryExpr{ + Op: influxql.EQ, + LHS: &influxql.VarRef{Val: "region"}, + RHS: &influxql.StringLiteral{Val: "uswest"}, + }, + SortFields: []*influxql.SortField{ + {Ascending: true}, + {Name: "field1"}, + {Name: "field2"}, + }, + Limit: 10, + }, + }, + + // SHOW MEASUREMENTS WITH MEASUREMENT = cpu + { + s: `SHOW MEASUREMENTS WITH MEASUREMENT = cpu`, + stmt: &influxql.ShowMeasurementsStatement{ + Source: &influxql.Measurement{Name: "cpu"}, + }, + }, + + // SHOW MEASUREMENTS WITH MEASUREMENT =~ /regex/ + { + s: `SHOW MEASUREMENTS WITH MEASUREMENT =~ /[cg]pu/`, + stmt: &influxql.ShowMeasurementsStatement{ + Source: &influxql.Measurement{ + Regex: &influxql.RegexLiteral{Val: regexp.MustCompile(`[cg]pu`)}, + }, + }, + }, + + // SHOW QUERIES + { + s: `SHOW QUERIES`, + stmt: &influxql.ShowQueriesStatement{}, + }, + + // KILL QUERY 4 + { + s: `KILL QUERY 4`, + stmt: &influxql.KillQueryStatement{ + QueryID: 4, + }, + }, + + // SHOW RETENTION POLICIES + { + s: `SHOW RETENTION POLICIES ON mydb`, + stmt: &influxql.ShowRetentionPoliciesStatement{ + Database: "mydb", + }, + }, + + // SHOW TAG KEYS + { + s: `SHOW TAG KEYS FROM src`, + stmt: &influxql.ShowTagKeysStatement{ + Sources: []influxql.Source{&influxql.Measurement{Name: "src"}}, + }, + }, + + // SHOW TAG KEYS with LIMIT + { + s: `SHOW TAG KEYS FROM src LIMIT 2`, + stmt: &influxql.ShowTagKeysStatement{ + Sources: []influxql.Source{&influxql.Measurement{Name: "src"}}, + Limit: 2, + }, + }, + + // SHOW TAG KEYS with OFFSET + { + s: `SHOW TAG KEYS FROM src OFFSET 1`, + stmt: &influxql.ShowTagKeysStatement{ + Sources: []influxql.Source{&influxql.Measurement{Name: "src"}}, + Offset: 1, + }, + }, + + // SHOW TAG KEYS with LIMIT and OFFSET + { + s: `SHOW TAG KEYS FROM src LIMIT 2 OFFSET 1`, + stmt: &influxql.ShowTagKeysStatement{ + Sources: []influxql.Source{&influxql.Measurement{Name: "src"}}, + Limit: 2, + Offset: 1, + }, + }, + + // SHOW TAG KEYS with SLIMIT + { + s: `SHOW TAG KEYS FROM src SLIMIT 2`, + stmt: &influxql.ShowTagKeysStatement{ + Sources: []influxql.Source{&influxql.Measurement{Name: "src"}}, + SLimit: 2, + }, + }, + + // SHOW TAG KEYS with SOFFSET + { + s: `SHOW TAG KEYS FROM src SOFFSET 1`, + stmt: &influxql.ShowTagKeysStatement{ + Sources: []influxql.Source{&influxql.Measurement{Name: "src"}}, + SOffset: 1, + }, + }, + + // SHOW TAG KEYS with SLIMIT and SOFFSET + { + s: `SHOW TAG KEYS FROM src SLIMIT 2 SOFFSET 1`, + stmt: &influxql.ShowTagKeysStatement{ + Sources: []influxql.Source{&influxql.Measurement{Name: "src"}}, + SLimit: 2, + SOffset: 1, + }, + }, + + // SHOW TAG KEYS with LIMIT, OFFSET, SLIMIT, and SOFFSET + { + s: `SHOW TAG KEYS FROM src LIMIT 4 OFFSET 3 SLIMIT 2 SOFFSET 1`, + stmt: &influxql.ShowTagKeysStatement{ + Sources: []influxql.Source{&influxql.Measurement{Name: "src"}}, + Limit: 4, + Offset: 3, + SLimit: 2, + SOffset: 1, + }, + }, + + // SHOW TAG KEYS FROM // + { + s: `SHOW TAG KEYS FROM /[cg]pu/`, + stmt: &influxql.ShowTagKeysStatement{ + Sources: []influxql.Source{ + &influxql.Measurement{ + Regex: &influxql.RegexLiteral{Val: regexp.MustCompile(`[cg]pu`)}, + }, + }, + }, + }, + + // SHOW TAG KEYS + { + skip: true, + s: `SHOW TAG KEYS FROM src WHERE region = 'uswest' ORDER BY ASC, field1, field2 DESC LIMIT 10`, + stmt: &influxql.ShowTagKeysStatement{ + Sources: []influxql.Source{&influxql.Measurement{Name: "src"}}, + Condition: &influxql.BinaryExpr{ + Op: influxql.EQ, + LHS: &influxql.VarRef{Val: "region"}, + RHS: &influxql.StringLiteral{Val: "uswest"}, + }, + SortFields: []*influxql.SortField{ + {Ascending: true}, + {Name: "field1"}, + {Name: "field2"}, + }, + Limit: 10, + }, + }, + + // SHOW TAG VALUES FROM ... WITH KEY = ... + { + skip: true, + s: `SHOW TAG VALUES FROM src WITH KEY = region WHERE region = 'uswest' ORDER BY ASC, field1, field2 DESC LIMIT 10`, + stmt: &influxql.ShowTagValuesStatement{ + Sources: []influxql.Source{&influxql.Measurement{Name: "src"}}, + TagKeys: []string{"region"}, + Condition: &influxql.BinaryExpr{ + Op: influxql.EQ, + LHS: &influxql.VarRef{Val: "region"}, + RHS: &influxql.StringLiteral{Val: "uswest"}, + }, + SortFields: []*influxql.SortField{ + {Ascending: true}, + {Name: "field1"}, + {Name: "field2"}, + }, + Limit: 10, + }, + }, + + // SHOW TAG VALUES FROM ... WITH KEY IN... + { + s: `SHOW TAG VALUES FROM cpu WITH KEY IN (region, host) WHERE region = 'uswest'`, + stmt: &influxql.ShowTagValuesStatement{ + Sources: []influxql.Source{&influxql.Measurement{Name: "cpu"}}, + TagKeys: []string{"region", "host"}, + Condition: &influxql.BinaryExpr{ + Op: influxql.EQ, + LHS: &influxql.VarRef{Val: "region"}, + RHS: &influxql.StringLiteral{Val: "uswest"}, + }, + }, + }, + + // SHOW TAG VALUES ... AND TAG KEY = + { + s: `SHOW TAG VALUES FROM cpu WITH KEY IN (region,service,host)WHERE region = 'uswest'`, + stmt: &influxql.ShowTagValuesStatement{ + Sources: []influxql.Source{&influxql.Measurement{Name: "cpu"}}, + TagKeys: []string{"region", "service", "host"}, + Condition: &influxql.BinaryExpr{ + Op: influxql.EQ, + LHS: &influxql.VarRef{Val: "region"}, + RHS: &influxql.StringLiteral{Val: "uswest"}, + }, + }, + }, + + // SHOW TAG VALUES WITH KEY = ... + { + s: `SHOW TAG VALUES WITH KEY = host WHERE region = 'uswest'`, + stmt: &influxql.ShowTagValuesStatement{ + TagKeys: []string{"host"}, + Condition: &influxql.BinaryExpr{ + Op: influxql.EQ, + LHS: &influxql.VarRef{Val: "region"}, + RHS: &influxql.StringLiteral{Val: "uswest"}, + }, + }, + }, + + // SHOW TAG VALUES FROM // WITH KEY = ... + { + s: `SHOW TAG VALUES FROM /[cg]pu/ WITH KEY = host`, + stmt: &influxql.ShowTagValuesStatement{ + Sources: []influxql.Source{ + &influxql.Measurement{ + Regex: &influxql.RegexLiteral{Val: regexp.MustCompile(`[cg]pu`)}, + }, + }, + TagKeys: []string{"host"}, + }, + }, + + // SHOW TAG VALUES WITH KEY = "..." + { + s: `SHOW TAG VALUES WITH KEY = "host" WHERE region = 'uswest'`, + stmt: &influxql.ShowTagValuesStatement{ + TagKeys: []string{`host`}, + Condition: &influxql.BinaryExpr{ + Op: influxql.EQ, + LHS: &influxql.VarRef{Val: "region"}, + RHS: &influxql.StringLiteral{Val: "uswest"}, + }, + }, + }, + + // SHOW USERS + { + s: `SHOW USERS`, + stmt: &influxql.ShowUsersStatement{}, + }, + + // SHOW FIELD KEYS + { + skip: true, + s: `SHOW FIELD KEYS FROM src ORDER BY ASC, field1, field2 DESC LIMIT 10`, + stmt: &influxql.ShowFieldKeysStatement{ + Sources: []influxql.Source{&influxql.Measurement{Name: "src"}}, + SortFields: []*influxql.SortField{ + {Ascending: true}, + {Name: "field1"}, + {Name: "field2"}, + }, + Limit: 10, + }, + }, + { + s: `SHOW FIELD KEYS FROM /[cg]pu/`, + stmt: &influxql.ShowFieldKeysStatement{ + Sources: []influxql.Source{ + &influxql.Measurement{ + Regex: &influxql.RegexLiteral{Val: regexp.MustCompile(`[cg]pu`)}, + }, + }, + }, + }, + + // DELETE statement + { + s: `DELETE FROM src`, + stmt: &influxql.DeleteSeriesStatement{Sources: []influxql.Source{&influxql.Measurement{Name: "src"}}}, + }, + { + s: `DELETE WHERE host = 'hosta.influxdb.org'`, + stmt: &influxql.DeleteSeriesStatement{ + Condition: &influxql.BinaryExpr{ + Op: influxql.EQ, + LHS: &influxql.VarRef{Val: "host"}, + RHS: &influxql.StringLiteral{Val: "hosta.influxdb.org"}, + }, + }, + }, + { + s: `DELETE FROM src WHERE host = 'hosta.influxdb.org'`, + stmt: &influxql.DeleteSeriesStatement{ + Sources: []influxql.Source{&influxql.Measurement{Name: "src"}}, + Condition: &influxql.BinaryExpr{ + Op: influxql.EQ, + LHS: &influxql.VarRef{Val: "host"}, + RHS: &influxql.StringLiteral{Val: "hosta.influxdb.org"}, + }, + }, + }, + + // DROP SERIES statement + { + s: `DROP SERIES FROM src`, + stmt: &influxql.DropSeriesStatement{Sources: []influxql.Source{&influxql.Measurement{Name: "src"}}}, + }, + { + s: `DROP SERIES WHERE host = 'hosta.influxdb.org'`, + stmt: &influxql.DropSeriesStatement{ + Condition: &influxql.BinaryExpr{ + Op: influxql.EQ, + LHS: &influxql.VarRef{Val: "host"}, + RHS: &influxql.StringLiteral{Val: "hosta.influxdb.org"}, + }, + }, + }, + { + s: `DROP SERIES FROM src WHERE host = 'hosta.influxdb.org'`, + stmt: &influxql.DropSeriesStatement{ + Sources: []influxql.Source{&influxql.Measurement{Name: "src"}}, + Condition: &influxql.BinaryExpr{ + Op: influxql.EQ, + LHS: &influxql.VarRef{Val: "host"}, + RHS: &influxql.StringLiteral{Val: "hosta.influxdb.org"}, + }, + }, + }, + + // SHOW CONTINUOUS QUERIES statement + { + s: `SHOW CONTINUOUS QUERIES`, + stmt: &influxql.ShowContinuousQueriesStatement{}, + }, + + // CREATE CONTINUOUS QUERY ... INTO + { + s: `CREATE CONTINUOUS QUERY myquery ON testdb RESAMPLE EVERY 1m FOR 1h BEGIN SELECT count(field1) INTO measure1 FROM myseries GROUP BY time(5m) END`, + stmt: &influxql.CreateContinuousQueryStatement{ + Name: "myquery", + Database: "testdb", + Source: &influxql.SelectStatement{ + Fields: []*influxql.Field{{Expr: &influxql.Call{Name: "count", Args: []influxql.Expr{&influxql.VarRef{Val: "field1"}}}}}, + Target: &influxql.Target{Measurement: &influxql.Measurement{Name: "measure1", IsTarget: true}}, + Sources: []influxql.Source{&influxql.Measurement{Name: "myseries"}}, + Dimensions: []*influxql.Dimension{ + { + Expr: &influxql.Call{ + Name: "time", + Args: []influxql.Expr{ + &influxql.DurationLiteral{Val: 5 * time.Minute}, + }, + }, + }, + }, + }, + ResampleEvery: time.Minute, + ResampleFor: time.Hour, + }, + }, + + { + s: `CREATE CONTINUOUS QUERY myquery ON testdb RESAMPLE FOR 1h BEGIN SELECT count(field1) INTO measure1 FROM myseries GROUP BY time(5m) END`, + stmt: &influxql.CreateContinuousQueryStatement{ + Name: "myquery", + Database: "testdb", + Source: &influxql.SelectStatement{ + Fields: []*influxql.Field{{Expr: &influxql.Call{Name: "count", Args: []influxql.Expr{&influxql.VarRef{Val: "field1"}}}}}, + Target: &influxql.Target{Measurement: &influxql.Measurement{Name: "measure1", IsTarget: true}}, + Sources: []influxql.Source{&influxql.Measurement{Name: "myseries"}}, + Dimensions: []*influxql.Dimension{ + { + Expr: &influxql.Call{ + Name: "time", + Args: []influxql.Expr{ + &influxql.DurationLiteral{Val: 5 * time.Minute}, + }, + }, + }, + }, + }, + ResampleFor: time.Hour, + }, + }, + + { + s: `CREATE CONTINUOUS QUERY myquery ON testdb RESAMPLE EVERY 1m BEGIN SELECT count(field1) INTO measure1 FROM myseries GROUP BY time(5m) END`, + stmt: &influxql.CreateContinuousQueryStatement{ + Name: "myquery", + Database: "testdb", + Source: &influxql.SelectStatement{ + Fields: []*influxql.Field{{Expr: &influxql.Call{Name: "count", Args: []influxql.Expr{&influxql.VarRef{Val: "field1"}}}}}, + Target: &influxql.Target{Measurement: &influxql.Measurement{Name: "measure1", IsTarget: true}}, + Sources: []influxql.Source{&influxql.Measurement{Name: "myseries"}}, + Dimensions: []*influxql.Dimension{ + { + Expr: &influxql.Call{ + Name: "time", + Args: []influxql.Expr{ + &influxql.DurationLiteral{Val: 5 * time.Minute}, + }, + }, + }, + }, + }, + ResampleEvery: time.Minute, + }, + }, + + { + s: `create continuous query "this.is-a.test" on segments begin select * into measure1 from cpu_load_short end`, + stmt: &influxql.CreateContinuousQueryStatement{ + Name: "this.is-a.test", + Database: "segments", + Source: &influxql.SelectStatement{ + IsRawQuery: true, + Fields: []*influxql.Field{{Expr: &influxql.Wildcard{}}}, + Target: &influxql.Target{Measurement: &influxql.Measurement{Name: "measure1", IsTarget: true}}, + Sources: []influxql.Source{&influxql.Measurement{Name: "cpu_load_short"}}, + }, + }, + }, + + // CREATE CONTINUOUS QUERY ... INTO . + { + s: `CREATE CONTINUOUS QUERY myquery ON testdb BEGIN SELECT count(field1) INTO "1h.policy1"."cpu.load" FROM myseries GROUP BY time(5m) END`, + stmt: &influxql.CreateContinuousQueryStatement{ + Name: "myquery", + Database: "testdb", + Source: &influxql.SelectStatement{ + Fields: []*influxql.Field{{Expr: &influxql.Call{Name: "count", Args: []influxql.Expr{&influxql.VarRef{Val: "field1"}}}}}, + Target: &influxql.Target{ + Measurement: &influxql.Measurement{RetentionPolicy: "1h.policy1", Name: "cpu.load", IsTarget: true}, + }, + Sources: []influxql.Source{&influxql.Measurement{Name: "myseries"}}, + Dimensions: []*influxql.Dimension{ + { + Expr: &influxql.Call{ + Name: "time", + Args: []influxql.Expr{ + &influxql.DurationLiteral{Val: 5 * time.Minute}, + }, + }, + }, + }, + }, + }, + }, + + // CREATE CONTINUOUS QUERY for non-aggregate SELECT stmts + { + s: `CREATE CONTINUOUS QUERY myquery ON testdb BEGIN SELECT value INTO "policy1"."value" FROM myseries END`, + stmt: &influxql.CreateContinuousQueryStatement{ + Name: "myquery", + Database: "testdb", + Source: &influxql.SelectStatement{ + IsRawQuery: true, + Fields: []*influxql.Field{{Expr: &influxql.VarRef{Val: "value"}}}, + Target: &influxql.Target{ + Measurement: &influxql.Measurement{RetentionPolicy: "policy1", Name: "value", IsTarget: true}, + }, + Sources: []influxql.Source{&influxql.Measurement{Name: "myseries"}}, + }, + }, + }, + + // CREATE CONTINUOUS QUERY for non-aggregate SELECT stmts with multiple values + { + s: `CREATE CONTINUOUS QUERY myquery ON testdb BEGIN SELECT transmit_rx, transmit_tx INTO "policy1"."network" FROM myseries END`, + stmt: &influxql.CreateContinuousQueryStatement{ + Name: "myquery", + Database: "testdb", + Source: &influxql.SelectStatement{ + IsRawQuery: true, + Fields: []*influxql.Field{{Expr: &influxql.VarRef{Val: "transmit_rx"}}, + {Expr: &influxql.VarRef{Val: "transmit_tx"}}}, + Target: &influxql.Target{ + Measurement: &influxql.Measurement{RetentionPolicy: "policy1", Name: "network", IsTarget: true}, + }, + Sources: []influxql.Source{&influxql.Measurement{Name: "myseries"}}, + }, + }, + }, + + // CREATE CONTINUOUS QUERY with backreference measurement name + { + s: `CREATE CONTINUOUS QUERY myquery ON testdb BEGIN SELECT mean(value) INTO "policy1".:measurement FROM /^[a-z]+.*/ GROUP BY time(1m) END`, + stmt: &influxql.CreateContinuousQueryStatement{ + Name: "myquery", + Database: "testdb", + Source: &influxql.SelectStatement{ + Fields: []*influxql.Field{{Expr: &influxql.Call{Name: "mean", Args: []influxql.Expr{&influxql.VarRef{Val: "value"}}}}}, + Target: &influxql.Target{ + Measurement: &influxql.Measurement{RetentionPolicy: "policy1", IsTarget: true}, + }, + Sources: []influxql.Source{&influxql.Measurement{Regex: &influxql.RegexLiteral{Val: regexp.MustCompile(`^[a-z]+.*`)}}}, + Dimensions: []*influxql.Dimension{ + { + Expr: &influxql.Call{ + Name: "time", + Args: []influxql.Expr{ + &influxql.DurationLiteral{Val: 1 * time.Minute}, + }, + }, + }, + }, + }, + }, + }, + + // CREATE DATABASE statement + { + s: `CREATE DATABASE testdb`, + stmt: &influxql.CreateDatabaseStatement{ + Name: "testdb", + IfNotExists: false, + RetentionPolicyCreate: false, + }, + }, + { + s: `CREATE DATABASE IF NOT EXISTS testdb`, + stmt: &influxql.CreateDatabaseStatement{ + Name: "testdb", + IfNotExists: true, + RetentionPolicyCreate: false, + }, + }, + { + s: `CREATE DATABASE testdb WITH DURATION 24h`, + stmt: &influxql.CreateDatabaseStatement{ + Name: "testdb", + IfNotExists: false, + RetentionPolicyCreate: true, + RetentionPolicyDuration: 24 * time.Hour, + RetentionPolicyReplication: 1, + }, + }, + { + s: `CREATE DATABASE testdb WITH SHARD DURATION 30m`, + stmt: &influxql.CreateDatabaseStatement{ + Name: "testdb", + IfNotExists: false, + RetentionPolicyCreate: true, + RetentionPolicyDuration: 0, + RetentionPolicyReplication: 1, + RetentionPolicyShardGroupDuration: 30 * time.Minute, + }, + }, + { + s: `CREATE DATABASE IF NOT EXISTS testdb WITH DURATION 24h`, + stmt: &influxql.CreateDatabaseStatement{ + Name: "testdb", + IfNotExists: true, + RetentionPolicyCreate: true, + RetentionPolicyDuration: 24 * time.Hour, + RetentionPolicyReplication: 1, + }, + }, + { + s: `CREATE DATABASE testdb WITH REPLICATION 2`, + stmt: &influxql.CreateDatabaseStatement{ + Name: "testdb", + IfNotExists: false, + RetentionPolicyCreate: true, + RetentionPolicyDuration: 0, + RetentionPolicyReplication: 2, + }, + }, + { + s: `CREATE DATABASE IF NOT EXISTS testdb WITH REPLICATION 2`, + stmt: &influxql.CreateDatabaseStatement{ + Name: "testdb", + IfNotExists: true, + RetentionPolicyCreate: true, + RetentionPolicyDuration: 0, + RetentionPolicyReplication: 2, + }, + }, + { + s: `CREATE DATABASE testdb WITH NAME test_name`, + stmt: &influxql.CreateDatabaseStatement{ + Name: "testdb", + IfNotExists: false, + RetentionPolicyCreate: true, + RetentionPolicyDuration: 0, + RetentionPolicyReplication: 1, + RetentionPolicyName: "test_name", + }, + }, + { + s: `CREATE DATABASE IF NOT EXISTS testdb WITH NAME test_name`, + stmt: &influxql.CreateDatabaseStatement{ + Name: "testdb", + IfNotExists: true, + RetentionPolicyCreate: true, + RetentionPolicyDuration: 0, + RetentionPolicyReplication: 1, + RetentionPolicyName: "test_name", + }, + }, + { + s: `CREATE DATABASE testdb WITH DURATION 24h REPLICATION 2 NAME test_name`, + stmt: &influxql.CreateDatabaseStatement{ + Name: "testdb", + IfNotExists: false, + RetentionPolicyCreate: true, + RetentionPolicyDuration: 24 * time.Hour, + RetentionPolicyReplication: 2, + RetentionPolicyName: "test_name", + }, + }, + { + s: `CREATE DATABASE IF NOT EXISTS testdb WITH DURATION 24h REPLICATION 2 NAME test_name`, + stmt: &influxql.CreateDatabaseStatement{ + Name: "testdb", + IfNotExists: true, + RetentionPolicyCreate: true, + RetentionPolicyDuration: 24 * time.Hour, + RetentionPolicyReplication: 2, + RetentionPolicyName: "test_name", + }, + }, + { + s: `CREATE DATABASE testdb WITH DURATION 24h REPLICATION 2 SHARD DURATION 10m NAME test_name `, + stmt: &influxql.CreateDatabaseStatement{ + Name: "testdb", + IfNotExists: false, + RetentionPolicyCreate: true, + RetentionPolicyDuration: 24 * time.Hour, + RetentionPolicyReplication: 2, + RetentionPolicyName: "test_name", + RetentionPolicyShardGroupDuration: 10 * time.Minute, + }, + }, + { + s: `CREATE DATABASE IF NOT EXISTS testdb WITH DURATION 24h REPLICATION 2 SHARD DURATION 10m NAME test_name`, + stmt: &influxql.CreateDatabaseStatement{ + Name: "testdb", + IfNotExists: true, + RetentionPolicyCreate: true, + RetentionPolicyDuration: 24 * time.Hour, + RetentionPolicyReplication: 2, + RetentionPolicyName: "test_name", + RetentionPolicyShardGroupDuration: 10 * time.Minute, + }, + }, + + // CREATE USER statement + { + s: `CREATE USER testuser WITH PASSWORD 'pwd1337'`, + stmt: &influxql.CreateUserStatement{ + Name: "testuser", + Password: "pwd1337", + }, + }, + + // CREATE USER ... WITH ALL PRIVILEGES + { + s: `CREATE USER testuser WITH PASSWORD 'pwd1337' WITH ALL PRIVILEGES`, + stmt: &influxql.CreateUserStatement{ + Name: "testuser", + Password: "pwd1337", + Admin: true, + }, + }, + + // SET PASSWORD FOR USER + { + s: `SET PASSWORD FOR testuser = 'pwd1337'`, + stmt: &influxql.SetPasswordUserStatement{ + Name: "testuser", + Password: "pwd1337", + }, + }, + + // DROP CONTINUOUS QUERY statement + { + s: `DROP CONTINUOUS QUERY myquery ON foo`, + stmt: &influxql.DropContinuousQueryStatement{Name: "myquery", Database: "foo"}, + }, + + // DROP DATABASE statement + { + s: `DROP DATABASE testdb`, + stmt: &influxql.DropDatabaseStatement{ + Name: "testdb", + IfExists: false, + }, + }, + { + s: `DROP DATABASE IF EXISTS testdb`, + stmt: &influxql.DropDatabaseStatement{ + Name: "testdb", + IfExists: true, + }, + }, + + // DROP MEASUREMENT statement + { + s: `DROP MEASUREMENT cpu`, + stmt: &influxql.DropMeasurementStatement{Name: "cpu"}, + }, + + // DROP RETENTION POLICY + { + s: `DROP RETENTION POLICY "1h.cpu" ON mydb`, + stmt: &influxql.DropRetentionPolicyStatement{ + Name: `1h.cpu`, + Database: `mydb`, + }, + }, + + // DROP USER statement + { + s: `DROP USER jdoe`, + stmt: &influxql.DropUserStatement{Name: "jdoe"}, + }, + + // GRANT READ + { + s: `GRANT READ ON testdb TO jdoe`, + stmt: &influxql.GrantStatement{ + Privilege: influxql.ReadPrivilege, + On: "testdb", + User: "jdoe", + }, + }, + + // GRANT WRITE + { + s: `GRANT WRITE ON testdb TO jdoe`, + stmt: &influxql.GrantStatement{ + Privilege: influxql.WritePrivilege, + On: "testdb", + User: "jdoe", + }, + }, + + // GRANT ALL + { + s: `GRANT ALL ON testdb TO jdoe`, + stmt: &influxql.GrantStatement{ + Privilege: influxql.AllPrivileges, + On: "testdb", + User: "jdoe", + }, + }, + + // GRANT ALL PRIVILEGES + { + s: `GRANT ALL PRIVILEGES ON testdb TO jdoe`, + stmt: &influxql.GrantStatement{ + Privilege: influxql.AllPrivileges, + On: "testdb", + User: "jdoe", + }, + }, + + // GRANT ALL admin privilege + { + s: `GRANT ALL TO jdoe`, + stmt: &influxql.GrantAdminStatement{ + User: "jdoe", + }, + }, + + // GRANT ALL PRVILEGES admin privilege + { + s: `GRANT ALL PRIVILEGES TO jdoe`, + stmt: &influxql.GrantAdminStatement{ + User: "jdoe", + }, + }, + + // REVOKE READ + { + s: `REVOKE READ on testdb FROM jdoe`, + stmt: &influxql.RevokeStatement{ + Privilege: influxql.ReadPrivilege, + On: "testdb", + User: "jdoe", + }, + }, + + // REVOKE WRITE + { + s: `REVOKE WRITE ON testdb FROM jdoe`, + stmt: &influxql.RevokeStatement{ + Privilege: influxql.WritePrivilege, + On: "testdb", + User: "jdoe", + }, + }, + + // REVOKE ALL + { + s: `REVOKE ALL ON testdb FROM jdoe`, + stmt: &influxql.RevokeStatement{ + Privilege: influxql.AllPrivileges, + On: "testdb", + User: "jdoe", + }, + }, + + // REVOKE ALL PRIVILEGES + { + s: `REVOKE ALL PRIVILEGES ON testdb FROM jdoe`, + stmt: &influxql.RevokeStatement{ + Privilege: influxql.AllPrivileges, + On: "testdb", + User: "jdoe", + }, + }, + + // REVOKE ALL admin privilege + { + s: `REVOKE ALL FROM jdoe`, + stmt: &influxql.RevokeAdminStatement{ + User: "jdoe", + }, + }, + + // REVOKE ALL PRIVILEGES admin privilege + { + s: `REVOKE ALL PRIVILEGES FROM jdoe`, + stmt: &influxql.RevokeAdminStatement{ + User: "jdoe", + }, + }, + + // CREATE RETENTION POLICY + { + s: `CREATE RETENTION POLICY policy1 ON testdb DURATION 1h REPLICATION 2`, + stmt: &influxql.CreateRetentionPolicyStatement{ + Name: "policy1", + Database: "testdb", + Duration: time.Hour, + Replication: 2, + }, + }, + + // CREATE RETENTION POLICY with infinite retention + { + s: `CREATE RETENTION POLICY policy1 ON testdb DURATION INF REPLICATION 2`, + stmt: &influxql.CreateRetentionPolicyStatement{ + Name: "policy1", + Database: "testdb", + Duration: 0, + Replication: 2, + }, + }, + + // CREATE RETENTION POLICY ... DEFAULT + { + s: `CREATE RETENTION POLICY policy1 ON testdb DURATION 2m REPLICATION 4 DEFAULT`, + stmt: &influxql.CreateRetentionPolicyStatement{ + Name: "policy1", + Database: "testdb", + Duration: 2 * time.Minute, + Replication: 4, + Default: true, + }, + }, + // CREATE RETENTION POLICY + { + s: `CREATE RETENTION POLICY policy1 ON testdb DURATION 1h REPLICATION 2 SHARD DURATION 30m`, + stmt: &influxql.CreateRetentionPolicyStatement{ + Name: "policy1", + Database: "testdb", + Duration: time.Hour, + Replication: 2, + ShardGroupDuration: 30 * time.Minute, + }, + }, + + // ALTER RETENTION POLICY + { + s: `ALTER RETENTION POLICY policy1 ON testdb DURATION 1m REPLICATION 4 DEFAULT`, + stmt: newAlterRetentionPolicyStatement("policy1", "testdb", time.Minute, -1, 4, true), + }, + + // ALTER RETENTION POLICY with options in reverse order + { + s: `ALTER RETENTION POLICY policy1 ON testdb DEFAULT REPLICATION 4 DURATION 1m`, + stmt: newAlterRetentionPolicyStatement("policy1", "testdb", time.Minute, -1, 4, true), + }, + + // ALTER RETENTION POLICY with infinite retention + { + s: `ALTER RETENTION POLICY policy1 ON testdb DEFAULT REPLICATION 4 DURATION INF`, + stmt: newAlterRetentionPolicyStatement("policy1", "testdb", 0, -1, 4, true), + }, + + // ALTER RETENTION POLICY without optional DURATION + { + s: `ALTER RETENTION POLICY policy1 ON testdb DEFAULT REPLICATION 4`, + stmt: newAlterRetentionPolicyStatement("policy1", "testdb", -1, -1, 4, true), + }, + + // ALTER RETENTION POLICY without optional REPLICATION + { + s: `ALTER RETENTION POLICY policy1 ON testdb DEFAULT`, + stmt: newAlterRetentionPolicyStatement("policy1", "testdb", -1, -1, -1, true), + }, + + // ALTER RETENTION POLICY without optional DEFAULT + { + s: `ALTER RETENTION POLICY policy1 ON testdb REPLICATION 4`, + stmt: newAlterRetentionPolicyStatement("policy1", "testdb", -1, -1, 4, false), + }, + // ALTER default retention policy unquoted + { + s: `ALTER RETENTION POLICY default ON testdb REPLICATION 4`, + stmt: newAlterRetentionPolicyStatement("default", "testdb", -1, -1, 4, false), + }, + // ALTER RETENTION POLICY with SHARD duration + { + s: `ALTER RETENTION POLICY policy1 ON testdb REPLICATION 4 SHARD DURATION 10m`, + stmt: newAlterRetentionPolicyStatement("policy1", "testdb", -1, 10*time.Minute, 4, false), + }, + + // SHOW STATS + { + s: `SHOW STATS`, + stmt: &influxql.ShowStatsStatement{ + Module: "", + }, + }, + { + s: `SHOW STATS FOR 'cluster'`, + stmt: &influxql.ShowStatsStatement{ + Module: "cluster", + }, + }, + + // SHOW SHARD GROUPS + { + s: `SHOW SHARD GROUPS`, + stmt: &influxql.ShowShardGroupsStatement{}, + }, + + // SHOW SHARDS + { + s: `SHOW SHARDS`, + stmt: &influxql.ShowShardsStatement{}, + }, + + // SHOW DIAGNOSTICS + { + s: `SHOW DIAGNOSTICS`, + stmt: &influxql.ShowDiagnosticsStatement{}, + }, + { + s: `SHOW DIAGNOSTICS FOR 'build'`, + stmt: &influxql.ShowDiagnosticsStatement{ + Module: "build", + }, + }, + + // CREATE SUBSCRIPTION + { + s: `CREATE SUBSCRIPTION "name" ON "db"."rp" DESTINATIONS ANY 'udp://host1:9093', 'udp://host2:9093'`, + stmt: &influxql.CreateSubscriptionStatement{ + Name: "name", + Database: "db", + RetentionPolicy: "rp", + Destinations: []string{"udp://host1:9093", "udp://host2:9093"}, + Mode: "ANY", + }, + }, + + // DROP SUBSCRIPTION + { + s: `DROP SUBSCRIPTION "name" ON "db"."rp"`, + stmt: &influxql.DropSubscriptionStatement{ + Name: "name", + Database: "db", + RetentionPolicy: "rp", + }, + }, + + // SHOW SUBSCRIPTIONS + { + s: `SHOW SUBSCRIPTIONS`, + stmt: &influxql.ShowSubscriptionsStatement{}, + }, + + // Errors + {s: ``, err: `found EOF, expected SELECT, DELETE, SHOW, CREATE, DROP, GRANT, REVOKE, ALTER, SET, KILL at line 1, char 1`}, + {s: `SELECT`, err: `found EOF, expected identifier, string, number, bool at line 1, char 8`}, + {s: `SELECT time FROM myseries`, err: `at least 1 non-time field must be queried`}, + {s: `blah blah`, err: `found blah, expected SELECT, DELETE, SHOW, CREATE, DROP, GRANT, REVOKE, ALTER, SET, KILL at line 1, char 1`}, + {s: `SELECT field1 X`, err: `found X, expected FROM at line 1, char 15`}, + {s: `SELECT field1 FROM "series" WHERE X +;`, err: `found ;, expected identifier, string, number, bool at line 1, char 38`}, + {s: `SELECT field1 FROM myseries GROUP`, err: `found EOF, expected BY at line 1, char 35`}, + {s: `SELECT field1 FROM myseries LIMIT`, err: `found EOF, expected integer at line 1, char 35`}, + {s: `SELECT field1 FROM myseries LIMIT 10.5`, err: `found 10.5, expected integer at line 1, char 35`}, + {s: `SELECT count(max(value)) FROM myseries`, err: `expected field argument in count()`}, + {s: `SELECT count(distinct('value')) FROM myseries`, err: `expected field argument in distinct()`}, + {s: `SELECT distinct('value') FROM myseries`, err: `expected field argument in distinct()`}, + {s: `SELECT min(max(value)) FROM myseries`, err: `expected field argument in min()`}, + {s: `SELECT min(distinct(value)) FROM myseries`, err: `expected field argument in min()`}, + {s: `SELECT max(max(value)) FROM myseries`, err: `expected field argument in max()`}, + {s: `SELECT sum(max(value)) FROM myseries`, err: `expected field argument in sum()`}, + {s: `SELECT first(max(value)) FROM myseries`, err: `expected field argument in first()`}, + {s: `SELECT last(max(value)) FROM myseries`, err: `expected field argument in last()`}, + {s: `SELECT mean(max(value)) FROM myseries`, err: `expected field argument in mean()`}, + {s: `SELECT median(max(value)) FROM myseries`, err: `expected field argument in median()`}, + {s: `SELECT stddev(max(value)) FROM myseries`, err: `expected field argument in stddev()`}, + {s: `SELECT spread(max(value)) FROM myseries`, err: `expected field argument in spread()`}, + {s: `SELECT top() FROM myseries`, err: `invalid number of arguments for top, expected at least 2, got 0`}, + {s: `SELECT top(field1) FROM myseries`, err: `invalid number of arguments for top, expected at least 2, got 1`}, + {s: `SELECT top(field1,foo) FROM myseries`, err: `expected integer as last argument in top(), found foo`}, + {s: `SELECT top(field1,host,'server',foo) FROM myseries`, err: `expected integer as last argument in top(), found foo`}, + {s: `SELECT top(field1,5,'server',2) FROM myseries`, err: `only fields or tags are allowed in top(), found 5`}, + {s: `SELECT top(field1,max(foo),'server',2) FROM myseries`, err: `only fields or tags are allowed in top(), found max(foo)`}, + {s: `SELECT top(value, 10) + count(value) FROM myseries`, err: `cannot use top() inside of a binary expression`}, + {s: `SELECT top(max(value), 10) FROM myseries`, err: `only fields or tags are allowed in top(), found max(value)`}, + {s: `SELECT bottom() FROM myseries`, err: `invalid number of arguments for bottom, expected at least 2, got 0`}, + {s: `SELECT bottom(field1) FROM myseries`, err: `invalid number of arguments for bottom, expected at least 2, got 1`}, + {s: `SELECT bottom(field1,foo) FROM myseries`, err: `expected integer as last argument in bottom(), found foo`}, + {s: `SELECT bottom(field1,host,'server',foo) FROM myseries`, err: `expected integer as last argument in bottom(), found foo`}, + {s: `SELECT bottom(field1,5,'server',2) FROM myseries`, err: `only fields or tags are allowed in bottom(), found 5`}, + {s: `SELECT bottom(field1,max(foo),'server',2) FROM myseries`, err: `only fields or tags are allowed in bottom(), found max(foo)`}, + {s: `SELECT bottom(value, 10) + count(value) FROM myseries`, err: `cannot use bottom() inside of a binary expression`}, + {s: `SELECT bottom(max(value), 10) FROM myseries`, err: `only fields or tags are allowed in bottom(), found max(value)`}, + {s: `SELECT percentile() FROM myseries`, err: `invalid number of arguments for percentile, expected 2, got 0`}, + {s: `SELECT percentile(field1) FROM myseries`, err: `invalid number of arguments for percentile, expected 2, got 1`}, + {s: `SELECT percentile(field1, foo) FROM myseries`, err: `expected float argument in percentile()`}, + {s: `SELECT percentile(max(field1), 75) FROM myseries`, err: `expected field argument in percentile()`}, + {s: `SELECT field1 FROM myseries OFFSET`, err: `found EOF, expected integer at line 1, char 36`}, + {s: `SELECT field1 FROM myseries OFFSET 10.5`, err: `found 10.5, expected integer at line 1, char 36`}, + {s: `SELECT field1 FROM myseries ORDER`, err: `found EOF, expected BY at line 1, char 35`}, + {s: `SELECT field1 FROM myseries ORDER BY`, err: `found EOF, expected identifier, ASC, DESC at line 1, char 38`}, + {s: `SELECT field1 FROM myseries ORDER BY /`, err: `found /, expected identifier, ASC, DESC at line 1, char 38`}, + {s: `SELECT field1 FROM myseries ORDER BY 1`, err: `found 1, expected identifier, ASC, DESC at line 1, char 38`}, + {s: `SELECT field1 FROM myseries ORDER BY time ASC,`, err: `found EOF, expected identifier at line 1, char 47`}, + {s: `SELECT field1 FROM myseries ORDER BY time, field1`, err: `only ORDER BY time supported at this time`}, + {s: `SELECT field1 AS`, err: `found EOF, expected identifier at line 1, char 18`}, + {s: `SELECT field1 FROM foo group by time(1s)`, err: `GROUP BY requires at least one aggregate function`}, + {s: `SELECT count(value), value FROM foo`, err: `mixing aggregate and non-aggregate queries is not supported`}, + {s: `SELECT count(value)/10, value FROM foo`, err: `mixing aggregate and non-aggregate queries is not supported`}, + {s: `SELECT count(value) FROM foo group by time(1s)`, err: `aggregate functions with GROUP BY time require a WHERE time clause`}, + {s: `SELECT count(value) FROM foo group by time(1s) where host = 'hosta.influxdb.org'`, err: `aggregate functions with GROUP BY time require a WHERE time clause`}, + {s: `SELECT count(value) FROM foo group by time`, err: `time() is a function and expects at least one argument`}, + {s: `SELECT count(value) FROM foo group by 'time'`, err: `only time and tag dimensions allowed`}, + {s: `SELECT count(value) FROM foo where time > now() and time < now() group by time()`, err: `time dimension expected 1 or 2 arguments`}, + {s: `SELECT count(value) FROM foo where time > now() and time < now() group by time(b)`, err: `time dimension must have duration argument`}, + {s: `SELECT count(value) FROM foo where time > now() and time < now() group by time(1s), time(2s)`, err: `multiple time dimensions not allowed`}, + {s: `SELECT count(value) FROM foo where time > now() and time < now() group by time(1s, b)`, err: `time dimension offset must be duration or now()`}, + {s: `SELECT field1 FROM 12`, err: `found 12, expected identifier at line 1, char 20`}, + {s: `SELECT 1000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 FROM myseries`, err: `unable to parse integer at line 1, char 8`}, + {s: `SELECT 10.5h FROM myseries`, err: `found h, expected FROM at line 1, char 12`}, + {s: `SELECT distinct(field1), sum(field1) FROM myseries`, err: `aggregate function distinct() can not be combined with other functions or fields`}, + {s: `SELECT distinct(field1), field2 FROM myseries`, err: `aggregate function distinct() can not be combined with other functions or fields`}, + {s: `SELECT distinct(field1, field2) FROM myseries`, err: `distinct function can only have one argument`}, + {s: `SELECT distinct() FROM myseries`, err: `distinct function requires at least one argument`}, + {s: `SELECT distinct FROM myseries`, err: `found FROM, expected identifier at line 1, char 17`}, + {s: `SELECT distinct field1, field2 FROM myseries`, err: `aggregate function distinct() can not be combined with other functions or fields`}, + {s: `SELECT count(distinct) FROM myseries`, err: `found ), expected (, identifier at line 1, char 22`}, + {s: `SELECT count(distinct field1, field2) FROM myseries`, err: `count(distinct ) can only have one argument`}, + {s: `select count(distinct(too, many, arguments)) from myseries`, err: `count(distinct ) can only have one argument`}, + {s: `select count() from myseries`, err: `invalid number of arguments for count, expected 1, got 0`}, + {s: `SELECT derivative(), field1 FROM myseries`, err: `mixing aggregate and non-aggregate queries is not supported`}, + {s: `select derivative() from myseries`, err: `invalid number of arguments for derivative, expected at least 1 but no more than 2, got 0`}, + {s: `select derivative(mean(value), 1h, 3) from myseries`, err: `invalid number of arguments for derivative, expected at least 1 but no more than 2, got 3`}, + {s: `SELECT derivative(value) FROM myseries group by time(1h)`, err: `aggregate function required inside the call to derivative`}, + {s: `SELECT derivative(top(value)) FROM myseries where time < now() and time > now() - 1d group by time(1h)`, err: `invalid number of arguments for top, expected at least 2, got 1`}, + {s: `SELECT derivative(bottom(value)) FROM myseries where time < now() and time > now() - 1d group by time(1h)`, err: `invalid number of arguments for bottom, expected at least 2, got 1`}, + {s: `SELECT derivative(max()) FROM myseries where time < now() and time > now() - 1d group by time(1h)`, err: `invalid number of arguments for max, expected 1, got 0`}, + {s: `SELECT derivative(percentile(value)) FROM myseries where time < now() and time > now() - 1d group by time(1h)`, err: `invalid number of arguments for percentile, expected 2, got 1`}, + {s: `SELECT derivative(mean(value), 1h) FROM myseries where time < now() and time > now() - 1d`, err: `derivative aggregate requires a GROUP BY interval`}, + {s: `SELECT non_negative_derivative(), field1 FROM myseries`, err: `mixing aggregate and non-aggregate queries is not supported`}, + {s: `select non_negative_derivative() from myseries`, err: `invalid number of arguments for non_negative_derivative, expected at least 1 but no more than 2, got 0`}, + {s: `select non_negative_derivative(mean(value), 1h, 3) from myseries`, err: `invalid number of arguments for non_negative_derivative, expected at least 1 but no more than 2, got 3`}, + {s: `SELECT non_negative_derivative(value) FROM myseries group by time(1h)`, err: `aggregate function required inside the call to non_negative_derivative`}, + {s: `SELECT non_negative_derivative(top(value)) FROM myseries where time < now() and time > now() - 1d group by time(1h)`, err: `invalid number of arguments for top, expected at least 2, got 1`}, + {s: `SELECT non_negative_derivative(bottom(value)) FROM myseries where time < now() and time > now() - 1d group by time(1h)`, err: `invalid number of arguments for bottom, expected at least 2, got 1`}, + {s: `SELECT non_negative_derivative(max()) FROM myseries where time < now() and time > now() - 1d group by time(1h)`, err: `invalid number of arguments for max, expected 1, got 0`}, + {s: `SELECT non_negative_derivative(mean(value), 1h) FROM myseries where time < now() and time > now() - 1d`, err: `non_negative_derivative aggregate requires a GROUP BY interval`}, + {s: `SELECT non_negative_derivative(percentile(value)) FROM myseries where time < now() and time > now() - 1d group by time(1h)`, err: `invalid number of arguments for percentile, expected 2, got 1`}, + {s: `SELECT difference(), field1 FROM myseries`, err: `mixing aggregate and non-aggregate queries is not supported`}, + {s: `SELECT difference() from myseries`, err: `invalid number of arguments for difference, expected 1, got 0`}, + {s: `SELECT difference(value) FROM myseries group by time(1h)`, err: `aggregate function required inside the call to difference`}, + {s: `SELECT difference(top(value)) FROM myseries where time < now() and time > now() - 1d group by time(1h)`, err: `invalid number of arguments for top, expected at least 2, got 1`}, + {s: `SELECT difference(bottom(value)) FROM myseries where time < now() and time > now() - 1d group by time(1h)`, err: `invalid number of arguments for bottom, expected at least 2, got 1`}, + {s: `SELECT difference(max()) FROM myseries where time < now() and time > now() - 1d group by time(1h)`, err: `invalid number of arguments for max, expected 1, got 0`}, + {s: `SELECT difference(percentile(value)) FROM myseries where time < now() and time > now() - 1d group by time(1h)`, err: `invalid number of arguments for percentile, expected 2, got 1`}, + {s: `SELECT difference(mean(value)) FROM myseries where time < now() and time > now() - 1d`, err: `difference aggregate requires a GROUP BY interval`}, + {s: `SELECT moving_average(), field1 FROM myseries`, err: `mixing aggregate and non-aggregate queries is not supported`}, + {s: `SELECT moving_average() from myseries`, err: `invalid number of arguments for moving_average, expected 2, got 0`}, + {s: `SELECT moving_average(value) FROM myseries`, err: `invalid number of arguments for moving_average, expected 2, got 1`}, + {s: `SELECT moving_average(value, 2) FROM myseries group by time(1h)`, err: `aggregate function required inside the call to moving_average`}, + {s: `SELECT moving_average(top(value), 2) FROM myseries where time < now() and time > now() - 1d group by time(1h)`, err: `invalid number of arguments for top, expected at least 2, got 1`}, + {s: `SELECT moving_average(bottom(value), 2) FROM myseries where time < now() and time > now() - 1d group by time(1h)`, err: `invalid number of arguments for bottom, expected at least 2, got 1`}, + {s: `SELECT moving_average(max(), 2) FROM myseries where time < now() and time > now() - 1d group by time(1h)`, err: `invalid number of arguments for max, expected 1, got 0`}, + {s: `SELECT moving_average(percentile(value), 2) FROM myseries where time < now() and time > now() - 1d group by time(1h)`, err: `invalid number of arguments for percentile, expected 2, got 1`}, + {s: `SELECT moving_average(mean(value), 2) FROM myseries where time < now() and time > now() - 1d`, err: `moving_average aggregate requires a GROUP BY interval`}, + {s: `SELECT holt_winters(value) FROM myseries where time < now() and time > now() - 1d`, err: `invalid number of arguments for holt_winters, expected 3, got 1`}, + {s: `SELECT holt_winters(value, 10, 2) FROM myseries where time < now() and time > now() - 1d`, err: `must use aggregate function with holt_winters`}, + {s: `SELECT holt_winters(min(value), 10, 2) FROM myseries where time < now() and time > now() - 1d`, err: `holt_winters aggregate requires a GROUP BY interval`}, + {s: `SELECT holt_winters(min(value), 0, 2) FROM myseries where time < now() and time > now() - 1d GROUP BY time(1d)`, err: `second arg to holt_winters must be greater than 0, got 0`}, + {s: `SELECT holt_winters(min(value), false, 2) FROM myseries where time < now() and time > now() - 1d GROUP BY time(1d)`, err: `expected integer argument as second arg in holt_winters`}, + {s: `SELECT holt_winters(min(value), 10, 'string') FROM myseries where time < now() and time > now() - 1d GROUP BY time(1d)`, err: `expected integer argument as third arg in holt_winters`}, + {s: `SELECT field1 from myseries WHERE host =~ 'asd' LIMIT 1`, err: `found asd, expected regex at line 1, char 42`}, + {s: `SELECT value > 2 FROM cpu`, err: `invalid operator > in SELECT clause at line 1, char 8; operator is intended for WHERE clause`}, + {s: `SELECT value = 2 FROM cpu`, err: `invalid operator = in SELECT clause at line 1, char 8; operator is intended for WHERE clause`}, + {s: `SELECT s =~ /foo/ FROM cpu`, err: `invalid operator =~ in SELECT clause at line 1, char 8; operator is intended for WHERE clause`}, + {s: `SELECT mean(value) + value FROM cpu WHERE time < now() and time > now() - 1h GROUP BY time(10m)`, err: `binary expressions cannot mix aggregates and raw fields`}, + // TODO: Remove this restriction in the future: https://github.com/influxdata/influxdb/issues/5968 + {s: `SELECT mean(cpu_total - cpu_idle) FROM cpu`, err: `expected field argument in mean()`}, + {s: `SELECT derivative(mean(cpu_total - cpu_idle), 1s) FROM cpu WHERE time < now() AND time > now() - 1d GROUP BY time(1h)`, err: `expected field argument in mean()`}, + // TODO: The error message will change when math is allowed inside an aggregate: https://github.com/influxdata/influxdb/pull/5990#issuecomment-195565870 + {s: `SELECT count(foo + sum(bar)) FROM cpu`, err: `expected field argument in count()`}, + {s: `SELECT (count(foo + sum(bar))) FROM cpu`, err: `expected field argument in count()`}, + {s: `SELECT sum(value) + count(foo + sum(bar)) FROM cpu`, err: `binary expressions cannot mix aggregates and raw fields`}, + // See issues https://github.com/influxdata/influxdb/issues/1647 + // and https://github.com/influxdata/influxdb/issues/4404 + //{s: `DELETE`, err: `found EOF, expected FROM at line 1, char 8`}, + //{s: `DELETE FROM`, err: `found EOF, expected identifier at line 1, char 13`}, + //{s: `DELETE FROM myseries WHERE`, err: `found EOF, expected identifier, string, number, bool at line 1, char 28`}, + {s: `DELETE`, err: `found EOF, expected FROM, WHERE at line 1, char 8`}, + {s: `DELETE FROM`, err: `found EOF, expected identifier at line 1, char 13`}, + {s: `DELETE FROM myseries WHERE`, err: `found EOF, expected identifier, string, number, bool at line 1, char 28`}, + {s: `DROP MEASUREMENT`, err: `found EOF, expected identifier at line 1, char 18`}, + {s: `DROP SERIES`, err: `found EOF, expected FROM, WHERE at line 1, char 13`}, + {s: `DROP SERIES FROM`, err: `found EOF, expected identifier at line 1, char 18`}, + {s: `DROP SERIES FROM src WHERE`, err: `found EOF, expected identifier, string, number, bool at line 1, char 28`}, + {s: `SHOW CONTINUOUS`, err: `found EOF, expected QUERIES at line 1, char 17`}, + {s: `SHOW RETENTION`, err: `found EOF, expected POLICIES at line 1, char 16`}, + {s: `SHOW RETENTION ON`, err: `found ON, expected POLICIES at line 1, char 16`}, + {s: `SHOW RETENTION POLICIES`, err: `found EOF, expected ON at line 1, char 25`}, + {s: `SHOW RETENTION POLICIES mydb`, err: `found mydb, expected ON at line 1, char 25`}, + {s: `SHOW RETENTION POLICIES ON`, err: `found EOF, expected identifier at line 1, char 28`}, + {s: `SHOW SHARD`, err: `found EOF, expected GROUPS at line 1, char 12`}, + {s: `SHOW FOO`, err: `found FOO, expected CONTINUOUS, DATABASES, DIAGNOSTICS, FIELD, GRANTS, MEASUREMENTS, QUERIES, RETENTION, SERIES, SHARD, SHARDS, STATS, SUBSCRIPTIONS, TAG, USERS at line 1, char 6`}, + {s: `SHOW STATS FOR`, err: `found EOF, expected string at line 1, char 16`}, + {s: `SHOW DIAGNOSTICS FOR`, err: `found EOF, expected string at line 1, char 22`}, + {s: `SHOW GRANTS`, err: `found EOF, expected FOR at line 1, char 13`}, + {s: `SHOW GRANTS FOR`, err: `found EOF, expected identifier at line 1, char 17`}, + {s: `DROP CONTINUOUS`, err: `found EOF, expected QUERY at line 1, char 17`}, + {s: `DROP CONTINUOUS QUERY`, err: `found EOF, expected identifier at line 1, char 23`}, + {s: `DROP CONTINUOUS QUERY myquery`, err: `found EOF, expected ON at line 1, char 31`}, + {s: `DROP CONTINUOUS QUERY myquery ON`, err: `found EOF, expected identifier at line 1, char 34`}, + {s: `CREATE CONTINUOUS`, err: `found EOF, expected QUERY at line 1, char 19`}, + {s: `CREATE CONTINUOUS QUERY`, err: `found EOF, expected identifier at line 1, char 25`}, + {s: `CREATE CONTINUOUS QUERY cq ON db RESAMPLE FOR 5s BEGIN SELECT mean(value) INTO cpu_mean FROM cpu GROUP BY time(10s) END`, err: `FOR duration must be >= GROUP BY time duration: must be a minimum of 10s, got 5s`}, + {s: `CREATE CONTINUOUS QUERY cq ON db RESAMPLE EVERY 10s FOR 5s BEGIN SELECT mean(value) INTO cpu_mean FROM cpu GROUP BY time(5s) END`, err: `FOR duration must be >= GROUP BY time duration: must be a minimum of 10s, got 5s`}, + {s: `DROP FOO`, err: `found FOO, expected CONTINUOUS, MEASUREMENT, RETENTION, SERIES, SHARD, SUBSCRIPTION, USER at line 1, char 6`}, + {s: `CREATE FOO`, err: `found FOO, expected CONTINUOUS, DATABASE, USER, RETENTION, SUBSCRIPTION at line 1, char 8`}, + {s: `CREATE DATABASE`, err: `found EOF, expected identifier at line 1, char 17`}, + {s: `CREATE DATABASE "testdb" WITH`, err: `found EOF, expected DURATION, NAME, REPLICATION, SHARD at line 1, char 31`}, + {s: `CREATE DATABASE "testdb" WITH DURATION`, err: `found EOF, expected duration at line 1, char 40`}, + {s: `CREATE DATABASE "testdb" WITH REPLICATION`, err: `found EOF, expected integer at line 1, char 43`}, + {s: `CREATE DATABASE "testdb" WITH NAME`, err: `found EOF, expected identifier at line 1, char 36`}, + {s: `CREATE DATABASE "testdb" WITH SHARD`, err: `found EOF, expected DURATION at line 1, char 37`}, + {s: `CREATE DATABASE IF`, err: `found EOF, expected NOT at line 1, char 20`}, + {s: `CREATE DATABASE IF NOT`, err: `found EOF, expected EXISTS at line 1, char 24`}, + {s: `CREATE DATABASE IF NOT EXISTS`, err: `found EOF, expected identifier at line 1, char 31`}, + {s: `CREATE DATABASE IF NOT EXISTS "testdb" WITH`, err: `found EOF, expected DURATION, NAME, REPLICATION, SHARD at line 1, char 45`}, + {s: `CREATE DATABASE IF NOT EXISTS "testdb" WITH DURATION`, err: `found EOF, expected duration at line 1, char 54`}, + {s: `CREATE DATABASE IF NOT EXISTS "testdb" WITH REPLICATION`, err: `found EOF, expected integer at line 1, char 57`}, + {s: `CREATE DATABASE IF NOT EXISTS "testdb" WITH NAME`, err: `found EOF, expected identifier at line 1, char 50`}, + {s: `DROP DATABASE`, err: `found EOF, expected identifier at line 1, char 15`}, + {s: `DROP DATABASE IF`, err: `found EOF, expected EXISTS at line 1, char 18`}, + {s: `DROP DATABASE IF EXISTS`, err: `found EOF, expected identifier at line 1, char 25`}, + {s: `DROP RETENTION`, err: `found EOF, expected POLICY at line 1, char 16`}, + {s: `DROP RETENTION POLICY`, err: `found EOF, expected identifier at line 1, char 23`}, + {s: `DROP RETENTION POLICY "1h.cpu"`, err: `found EOF, expected ON at line 1, char 31`}, + {s: `DROP RETENTION POLICY "1h.cpu" ON`, err: `found EOF, expected identifier at line 1, char 35`}, + {s: `DROP USER`, err: `found EOF, expected identifier at line 1, char 11`}, + {s: `DROP SUBSCRIPTION`, err: `found EOF, expected identifier at line 1, char 19`}, + {s: `DROP SUBSCRIPTION "name"`, err: `found EOF, expected ON at line 1, char 25`}, + {s: `DROP SUBSCRIPTION "name" ON `, err: `found EOF, expected identifier at line 1, char 30`}, + {s: `DROP SUBSCRIPTION "name" ON "db"`, err: `found EOF, expected . at line 1, char 33`}, + {s: `DROP SUBSCRIPTION "name" ON "db".`, err: `found EOF, expected identifier at line 1, char 34`}, + {s: `CREATE USER testuser`, err: `found EOF, expected WITH at line 1, char 22`}, + {s: `CREATE USER testuser WITH`, err: `found EOF, expected PASSWORD at line 1, char 27`}, + {s: `CREATE USER testuser WITH PASSWORD`, err: `found EOF, expected string at line 1, char 36`}, + {s: `CREATE USER testuser WITH PASSWORD 'pwd' WITH`, err: `found EOF, expected ALL at line 1, char 47`}, + {s: `CREATE USER testuser WITH PASSWORD 'pwd' WITH ALL`, err: `found EOF, expected PRIVILEGES at line 1, char 51`}, + {s: `CREATE SUBSCRIPTION`, err: `found EOF, expected identifier at line 1, char 21`}, + {s: `CREATE SUBSCRIPTION "name"`, err: `found EOF, expected ON at line 1, char 27`}, + {s: `CREATE SUBSCRIPTION "name" ON `, err: `found EOF, expected identifier at line 1, char 32`}, + {s: `CREATE SUBSCRIPTION "name" ON "db"`, err: `found EOF, expected . at line 1, char 35`}, + {s: `CREATE SUBSCRIPTION "name" ON "db".`, err: `found EOF, expected identifier at line 1, char 36`}, + {s: `CREATE SUBSCRIPTION "name" ON "db"."rp"`, err: `found EOF, expected DESTINATIONS at line 1, char 40`}, + {s: `CREATE SUBSCRIPTION "name" ON "db"."rp" DESTINATIONS`, err: `found EOF, expected ALL, ANY at line 1, char 54`}, + {s: `CREATE SUBSCRIPTION "name" ON "db"."rp" DESTINATIONS ALL `, err: `found EOF, expected string at line 1, char 59`}, + {s: `GRANT`, err: `found EOF, expected READ, WRITE, ALL [PRIVILEGES] at line 1, char 7`}, + {s: `GRANT BOGUS`, err: `found BOGUS, expected READ, WRITE, ALL [PRIVILEGES] at line 1, char 7`}, + {s: `GRANT READ`, err: `found EOF, expected ON at line 1, char 12`}, + {s: `GRANT READ FROM`, err: `found FROM, expected ON at line 1, char 12`}, + {s: `GRANT READ ON`, err: `found EOF, expected identifier at line 1, char 15`}, + {s: `GRANT READ ON TO`, err: `found TO, expected identifier at line 1, char 15`}, + {s: `GRANT READ ON testdb`, err: `found EOF, expected TO at line 1, char 22`}, + {s: `GRANT READ ON testdb TO`, err: `found EOF, expected identifier at line 1, char 25`}, + {s: `GRANT READ TO`, err: `found TO, expected ON at line 1, char 12`}, + {s: `GRANT WRITE`, err: `found EOF, expected ON at line 1, char 13`}, + {s: `GRANT WRITE FROM`, err: `found FROM, expected ON at line 1, char 13`}, + {s: `GRANT WRITE ON`, err: `found EOF, expected identifier at line 1, char 16`}, + {s: `GRANT WRITE ON TO`, err: `found TO, expected identifier at line 1, char 16`}, + {s: `GRANT WRITE ON testdb`, err: `found EOF, expected TO at line 1, char 23`}, + {s: `GRANT WRITE ON testdb TO`, err: `found EOF, expected identifier at line 1, char 26`}, + {s: `GRANT WRITE TO`, err: `found TO, expected ON at line 1, char 13`}, + {s: `GRANT ALL`, err: `found EOF, expected ON, TO at line 1, char 11`}, + {s: `GRANT ALL PRIVILEGES`, err: `found EOF, expected ON, TO at line 1, char 22`}, + {s: `GRANT ALL FROM`, err: `found FROM, expected ON, TO at line 1, char 11`}, + {s: `GRANT ALL PRIVILEGES FROM`, err: `found FROM, expected ON, TO at line 1, char 22`}, + {s: `GRANT ALL ON`, err: `found EOF, expected identifier at line 1, char 14`}, + {s: `GRANT ALL PRIVILEGES ON`, err: `found EOF, expected identifier at line 1, char 25`}, + {s: `GRANT ALL ON TO`, err: `found TO, expected identifier at line 1, char 14`}, + {s: `GRANT ALL PRIVILEGES ON TO`, err: `found TO, expected identifier at line 1, char 25`}, + {s: `GRANT ALL ON testdb`, err: `found EOF, expected TO at line 1, char 21`}, + {s: `GRANT ALL PRIVILEGES ON testdb`, err: `found EOF, expected TO at line 1, char 32`}, + {s: `GRANT ALL ON testdb FROM`, err: `found FROM, expected TO at line 1, char 21`}, + {s: `GRANT ALL PRIVILEGES ON testdb FROM`, err: `found FROM, expected TO at line 1, char 32`}, + {s: `GRANT ALL ON testdb TO`, err: `found EOF, expected identifier at line 1, char 24`}, + {s: `GRANT ALL PRIVILEGES ON testdb TO`, err: `found EOF, expected identifier at line 1, char 35`}, + {s: `GRANT ALL TO`, err: `found EOF, expected identifier at line 1, char 14`}, + {s: `GRANT ALL PRIVILEGES TO`, err: `found EOF, expected identifier at line 1, char 25`}, + {s: `KILL`, err: `found EOF, expected QUERY at line 1, char 6`}, + {s: `KILL QUERY 10s`, err: `found 10s, expected integer at line 1, char 12`}, + {s: `REVOKE`, err: `found EOF, expected READ, WRITE, ALL [PRIVILEGES] at line 1, char 8`}, + {s: `REVOKE BOGUS`, err: `found BOGUS, expected READ, WRITE, ALL [PRIVILEGES] at line 1, char 8`}, + {s: `REVOKE READ`, err: `found EOF, expected ON at line 1, char 13`}, + {s: `REVOKE READ TO`, err: `found TO, expected ON at line 1, char 13`}, + {s: `REVOKE READ ON`, err: `found EOF, expected identifier at line 1, char 16`}, + {s: `REVOKE READ ON FROM`, err: `found FROM, expected identifier at line 1, char 16`}, + {s: `REVOKE READ ON testdb`, err: `found EOF, expected FROM at line 1, char 23`}, + {s: `REVOKE READ ON testdb FROM`, err: `found EOF, expected identifier at line 1, char 28`}, + {s: `REVOKE READ FROM`, err: `found FROM, expected ON at line 1, char 13`}, + {s: `REVOKE WRITE`, err: `found EOF, expected ON at line 1, char 14`}, + {s: `REVOKE WRITE TO`, err: `found TO, expected ON at line 1, char 14`}, + {s: `REVOKE WRITE ON`, err: `found EOF, expected identifier at line 1, char 17`}, + {s: `REVOKE WRITE ON FROM`, err: `found FROM, expected identifier at line 1, char 17`}, + {s: `REVOKE WRITE ON testdb`, err: `found EOF, expected FROM at line 1, char 24`}, + {s: `REVOKE WRITE ON testdb FROM`, err: `found EOF, expected identifier at line 1, char 29`}, + {s: `REVOKE WRITE FROM`, err: `found FROM, expected ON at line 1, char 14`}, + {s: `REVOKE ALL`, err: `found EOF, expected ON, FROM at line 1, char 12`}, + {s: `REVOKE ALL PRIVILEGES`, err: `found EOF, expected ON, FROM at line 1, char 23`}, + {s: `REVOKE ALL TO`, err: `found TO, expected ON, FROM at line 1, char 12`}, + {s: `REVOKE ALL PRIVILEGES TO`, err: `found TO, expected ON, FROM at line 1, char 23`}, + {s: `REVOKE ALL ON`, err: `found EOF, expected identifier at line 1, char 15`}, + {s: `REVOKE ALL PRIVILEGES ON`, err: `found EOF, expected identifier at line 1, char 26`}, + {s: `REVOKE ALL ON FROM`, err: `found FROM, expected identifier at line 1, char 15`}, + {s: `REVOKE ALL PRIVILEGES ON FROM`, err: `found FROM, expected identifier at line 1, char 26`}, + {s: `REVOKE ALL ON testdb`, err: `found EOF, expected FROM at line 1, char 22`}, + {s: `REVOKE ALL PRIVILEGES ON testdb`, err: `found EOF, expected FROM at line 1, char 33`}, + {s: `REVOKE ALL ON testdb TO`, err: `found TO, expected FROM at line 1, char 22`}, + {s: `REVOKE ALL PRIVILEGES ON testdb TO`, err: `found TO, expected FROM at line 1, char 33`}, + {s: `REVOKE ALL ON testdb FROM`, err: `found EOF, expected identifier at line 1, char 27`}, + {s: `REVOKE ALL PRIVILEGES ON testdb FROM`, err: `found EOF, expected identifier at line 1, char 38`}, + {s: `REVOKE ALL FROM`, err: `found EOF, expected identifier at line 1, char 17`}, + {s: `REVOKE ALL PRIVILEGES FROM`, err: `found EOF, expected identifier at line 1, char 28`}, + {s: `CREATE RETENTION`, err: `found EOF, expected POLICY at line 1, char 18`}, + {s: `CREATE RETENTION POLICY`, err: `found EOF, expected identifier at line 1, char 25`}, + {s: `CREATE RETENTION POLICY policy1`, err: `found EOF, expected ON at line 1, char 33`}, + {s: `CREATE RETENTION POLICY policy1 ON`, err: `found EOF, expected identifier at line 1, char 36`}, + {s: `CREATE RETENTION POLICY policy1 ON testdb`, err: `found EOF, expected DURATION at line 1, char 43`}, + {s: `CREATE RETENTION POLICY policy1 ON testdb DURATION`, err: `found EOF, expected duration at line 1, char 52`}, + {s: `CREATE RETENTION POLICY policy1 ON testdb DURATION bad`, err: `found bad, expected duration at line 1, char 52`}, + {s: `CREATE RETENTION POLICY policy1 ON testdb DURATION 1h`, err: `found EOF, expected REPLICATION at line 1, char 54`}, + {s: `CREATE RETENTION POLICY policy1 ON testdb DURATION 1h REPLICATION`, err: `found EOF, expected integer at line 1, char 67`}, + {s: `CREATE RETENTION POLICY policy1 ON testdb DURATION 1h REPLICATION 3.14`, err: `found 3.14, expected integer at line 1, char 67`}, + {s: `CREATE RETENTION POLICY policy1 ON testdb DURATION 1h REPLICATION 0`, err: `invalid value 0: must be 1 <= n <= 2147483647 at line 1, char 67`}, + {s: `CREATE RETENTION POLICY policy1 ON testdb DURATION 1h REPLICATION bad`, err: `found bad, expected integer at line 1, char 67`}, + {s: `ALTER`, err: `found EOF, expected RETENTION at line 1, char 7`}, + {s: `ALTER RETENTION`, err: `found EOF, expected POLICY at line 1, char 17`}, + {s: `ALTER RETENTION POLICY`, err: `found EOF, expected identifier at line 1, char 24`}, + {s: `ALTER RETENTION POLICY policy1`, err: `found EOF, expected ON at line 1, char 32`}, {s: `ALTER RETENTION POLICY policy1 ON`, err: `found EOF, expected identifier at line 1, char 35`}, + {s: `ALTER RETENTION POLICY policy1 ON testdb`, err: `found EOF, expected DURATION, REPLICATION, SHARD, DEFAULT at line 1, char 42`}, + {s: `SET`, err: `found EOF, expected PASSWORD at line 1, char 5`}, + {s: `SET PASSWORD`, err: `found EOF, expected FOR at line 1, char 14`}, + {s: `SET PASSWORD something`, err: `found something, expected FOR at line 1, char 14`}, + {s: `SET PASSWORD FOR`, err: `found EOF, expected identifier at line 1, char 18`}, + {s: `SET PASSWORD FOR dejan`, err: `found EOF, expected = at line 1, char 24`}, + {s: `SET PASSWORD FOR dejan =`, err: `found EOF, expected string at line 1, char 25`}, + {s: `SET PASSWORD FOR dejan = bla`, err: `found bla, expected string at line 1, char 26`}, + } + + for i, tt := range tests { + if tt.skip { + continue + } + p := influxql.NewParser(strings.NewReader(tt.s)) + if tt.params != nil { + p.SetParams(tt.params) + } + stmt, err := p.ParseStatement() + + // We are memoizing a field so for testing we need to... + if s, ok := tt.stmt.(*influxql.SelectStatement); ok { + s.GroupByInterval() + } else if st, ok := stmt.(*influxql.CreateContinuousQueryStatement); ok { // if it's a CQ, there is a non-exported field that gets memoized during parsing that needs to be set + if st != nil && st.Source != nil { + tt.stmt.(*influxql.CreateContinuousQueryStatement).Source.GroupByInterval() + } + } + + if !reflect.DeepEqual(tt.err, errstring(err)) { + t.Errorf("%d. %q: error mismatch:\n exp=%s\n got=%s\n\n", i, tt.s, tt.err, err) + } else if tt.err == "" && !reflect.DeepEqual(tt.stmt, stmt) { + t.Logf("\n# %s\nexp=%s\ngot=%s\n", tt.s, mustMarshalJSON(tt.stmt), mustMarshalJSON(stmt)) + t.Logf("\nSQL exp=%s\nSQL got=%s\n", tt.stmt.String(), stmt.String()) + t.Errorf("%d. %q\n\nstmt mismatch:\n\nexp=%#v\n\ngot=%#v\n\n", i, tt.s, tt.stmt, stmt) + } + } +} + +// Ensure the parser can parse expressions into an AST. +func TestParser_ParseExpr(t *testing.T) { + var tests = []struct { + s string + expr influxql.Expr + err string + }{ + // Primitives + {s: `100.0`, expr: &influxql.NumberLiteral{Val: 100}}, + {s: `100`, expr: &influxql.IntegerLiteral{Val: 100}}, + {s: `'foo bar'`, expr: &influxql.StringLiteral{Val: "foo bar"}}, + {s: `true`, expr: &influxql.BooleanLiteral{Val: true}}, + {s: `false`, expr: &influxql.BooleanLiteral{Val: false}}, + {s: `my_ident`, expr: &influxql.VarRef{Val: "my_ident"}}, + {s: `'2000-01-01 00:00:00'`, expr: &influxql.StringLiteral{Val: "2000-01-01 00:00:00"}}, + {s: `'2000-01-01'`, expr: &influxql.StringLiteral{Val: "2000-01-01"}}, + + // Simple binary expression + { + s: `1 + 2`, + expr: &influxql.BinaryExpr{ + Op: influxql.ADD, + LHS: &influxql.IntegerLiteral{Val: 1}, + RHS: &influxql.IntegerLiteral{Val: 2}, + }, + }, + + // Binary expression with LHS precedence + { + s: `1 * 2 + 3`, + expr: &influxql.BinaryExpr{ + Op: influxql.ADD, + LHS: &influxql.BinaryExpr{ + Op: influxql.MUL, + LHS: &influxql.IntegerLiteral{Val: 1}, + RHS: &influxql.IntegerLiteral{Val: 2}, + }, + RHS: &influxql.IntegerLiteral{Val: 3}, + }, + }, + + // Binary expression with RHS precedence + { + s: `1 + 2 * 3`, + expr: &influxql.BinaryExpr{ + Op: influxql.ADD, + LHS: &influxql.IntegerLiteral{Val: 1}, + RHS: &influxql.BinaryExpr{ + Op: influxql.MUL, + LHS: &influxql.IntegerLiteral{Val: 2}, + RHS: &influxql.IntegerLiteral{Val: 3}, + }, + }, + }, + + // Binary expression with LHS paren group. + { + s: `(1 + 2) * 3`, + expr: &influxql.BinaryExpr{ + Op: influxql.MUL, + LHS: &influxql.ParenExpr{ + Expr: &influxql.BinaryExpr{ + Op: influxql.ADD, + LHS: &influxql.IntegerLiteral{Val: 1}, + RHS: &influxql.IntegerLiteral{Val: 2}, + }, + }, + RHS: &influxql.IntegerLiteral{Val: 3}, + }, + }, + + // Binary expression with no precedence, tests left associativity. + { + s: `1 * 2 * 3`, + expr: &influxql.BinaryExpr{ + Op: influxql.MUL, + LHS: &influxql.BinaryExpr{ + Op: influxql.MUL, + LHS: &influxql.IntegerLiteral{Val: 1}, + RHS: &influxql.IntegerLiteral{Val: 2}, + }, + RHS: &influxql.IntegerLiteral{Val: 3}, + }, + }, + + // Binary expression with regex. + { + s: `region =~ /us.*/`, + expr: &influxql.BinaryExpr{ + Op: influxql.EQREGEX, + LHS: &influxql.VarRef{Val: "region"}, + RHS: &influxql.RegexLiteral{Val: regexp.MustCompile(`us.*`)}, + }, + }, + + // Binary expression with quoted '/' regex. + { + s: `url =~ /http\:\/\/www\.example\.com/`, + expr: &influxql.BinaryExpr{ + Op: influxql.EQREGEX, + LHS: &influxql.VarRef{Val: "url"}, + RHS: &influxql.RegexLiteral{Val: regexp.MustCompile(`http\://www\.example\.com`)}, + }, + }, + + // Complex binary expression. + { + s: `value + 3 < 30 AND 1 + 2 OR true`, + expr: &influxql.BinaryExpr{ + Op: influxql.OR, + LHS: &influxql.BinaryExpr{ + Op: influxql.AND, + LHS: &influxql.BinaryExpr{ + Op: influxql.LT, + LHS: &influxql.BinaryExpr{ + Op: influxql.ADD, + LHS: &influxql.VarRef{Val: "value"}, + RHS: &influxql.IntegerLiteral{Val: 3}, + }, + RHS: &influxql.IntegerLiteral{Val: 30}, + }, + RHS: &influxql.BinaryExpr{ + Op: influxql.ADD, + LHS: &influxql.IntegerLiteral{Val: 1}, + RHS: &influxql.IntegerLiteral{Val: 2}, + }, + }, + RHS: &influxql.BooleanLiteral{Val: true}, + }, + }, + + // Complex binary expression. + { + s: `time > now() - 1d AND time < now() + 1d`, + expr: &influxql.BinaryExpr{ + Op: influxql.AND, + LHS: &influxql.BinaryExpr{ + Op: influxql.GT, + LHS: &influxql.VarRef{Val: "time"}, + RHS: &influxql.BinaryExpr{ + Op: influxql.SUB, + LHS: &influxql.Call{Name: "now"}, + RHS: &influxql.DurationLiteral{Val: mustParseDuration("1d")}, + }, + }, + RHS: &influxql.BinaryExpr{ + Op: influxql.LT, + LHS: &influxql.VarRef{Val: "time"}, + RHS: &influxql.BinaryExpr{ + Op: influxql.ADD, + LHS: &influxql.Call{Name: "now"}, + RHS: &influxql.DurationLiteral{Val: mustParseDuration("1d")}, + }, + }, + }, + }, + + // Function call (empty) + { + s: `my_func()`, + expr: &influxql.Call{ + Name: "my_func", + }, + }, + + // Function call (multi-arg) + { + s: `my_func(1, 2 + 3)`, + expr: &influxql.Call{ + Name: "my_func", + Args: []influxql.Expr{ + &influxql.IntegerLiteral{Val: 1}, + &influxql.BinaryExpr{ + Op: influxql.ADD, + LHS: &influxql.IntegerLiteral{Val: 2}, + RHS: &influxql.IntegerLiteral{Val: 3}, + }, + }, + }, + }, + } + + for i, tt := range tests { + expr, err := influxql.NewParser(strings.NewReader(tt.s)).ParseExpr() + if !reflect.DeepEqual(tt.err, errstring(err)) { + t.Errorf("%d. %q: error mismatch:\n exp=%s\n got=%s\n\n", i, tt.s, tt.err, err) + } else if tt.err == "" && !reflect.DeepEqual(tt.expr, expr) { + t.Errorf("%d. %q\n\nexpr mismatch:\n\nexp=%#v\n\ngot=%#v\n\n", i, tt.s, tt.expr, expr) + } + } +} + +// Ensure a time duration can be parsed. +func TestParseDuration(t *testing.T) { + var tests = []struct { + s string + d time.Duration + err string + }{ + {s: `10u`, d: 10 * time.Microsecond}, + {s: `10µ`, d: 10 * time.Microsecond}, + {s: `15ms`, d: 15 * time.Millisecond}, + {s: `100s`, d: 100 * time.Second}, + {s: `2m`, d: 2 * time.Minute}, + {s: `2h`, d: 2 * time.Hour}, + {s: `2d`, d: 2 * 24 * time.Hour}, + {s: `2w`, d: 2 * 7 * 24 * time.Hour}, + + {s: ``, err: "invalid duration"}, + {s: `3`, err: "invalid duration"}, + {s: `1000`, err: "invalid duration"}, + {s: `w`, err: "invalid duration"}, + {s: `ms`, err: "invalid duration"}, + {s: `1.2w`, err: "invalid duration"}, + {s: `10x`, err: "invalid duration"}, + } + + for i, tt := range tests { + d, err := influxql.ParseDuration(tt.s) + if !reflect.DeepEqual(tt.err, errstring(err)) { + t.Errorf("%d. %q: error mismatch:\n exp=%s\n got=%s\n\n", i, tt.s, tt.err, err) + } else if tt.d != d { + t.Errorf("%d. %q\n\nduration mismatch:\n\nexp=%#v\n\ngot=%#v\n\n", i, tt.s, tt.d, d) + } + } +} + +// Ensure a time duration can be formatted. +func TestFormatDuration(t *testing.T) { + var tests = []struct { + d time.Duration + s string + }{ + {d: 3 * time.Microsecond, s: `3u`}, + {d: 1001 * time.Microsecond, s: `1001u`}, + {d: 15 * time.Millisecond, s: `15ms`}, + {d: 100 * time.Second, s: `100s`}, + {d: 2 * time.Minute, s: `2m`}, + {d: 2 * time.Hour, s: `2h`}, + {d: 2 * 24 * time.Hour, s: `2d`}, + {d: 2 * 7 * 24 * time.Hour, s: `2w`}, + } + + for i, tt := range tests { + s := influxql.FormatDuration(tt.d) + if tt.s != s { + t.Errorf("%d. %v: mismatch: %s != %s", i, tt.d, tt.s, s) + } + } +} + +// Ensure a string can be quoted. +func TestQuote(t *testing.T) { + for i, tt := range []struct { + in string + out string + }{ + {``, `''`}, + {`foo`, `'foo'`}, + {"foo\nbar", `'foo\nbar'`}, + {`foo bar\\`, `'foo bar\\\\'`}, + {`'foo'`, `'\'foo\''`}, + } { + if out := influxql.QuoteString(tt.in); tt.out != out { + t.Errorf("%d. %s: mismatch: %s != %s", i, tt.in, tt.out, out) + } + } +} + +// Ensure an identifier's segments can be quoted. +func TestQuoteIdent(t *testing.T) { + for i, tt := range []struct { + ident []string + s string + }{ + {[]string{``}, ``}, + {[]string{`select`}, `"select"`}, + {[]string{`in-bytes`}, `"in-bytes"`}, + {[]string{`foo`, `bar`}, `"foo".bar`}, + {[]string{`foo`, ``, `bar`}, `"foo"..bar`}, + {[]string{`foo bar`, `baz`}, `"foo bar".baz`}, + {[]string{`foo.bar`, `baz`}, `"foo.bar".baz`}, + {[]string{`foo.bar`, `rp`, `baz`}, `"foo.bar"."rp".baz`}, + {[]string{`foo.bar`, `rp`, `1baz`}, `"foo.bar"."rp"."1baz"`}, + } { + if s := influxql.QuoteIdent(tt.ident...); tt.s != s { + t.Errorf("%d. %s: mismatch: %s != %s", i, tt.ident, tt.s, s) + } + } +} + +// Ensure DeleteSeriesStatement can convert to a string +func TestDeleteSeriesStatement_String(t *testing.T) { + var tests = []struct { + s string + stmt influxql.Statement + }{ + { + s: `DELETE FROM src`, + stmt: &influxql.DeleteSeriesStatement{Sources: []influxql.Source{&influxql.Measurement{Name: "src"}}}, + }, + { + s: `DELETE FROM src WHERE host = 'hosta.influxdb.org'`, + stmt: &influxql.DeleteSeriesStatement{ + Sources: []influxql.Source{&influxql.Measurement{Name: "src"}}, + Condition: &influxql.BinaryExpr{ + Op: influxql.EQ, + LHS: &influxql.VarRef{Val: "host"}, + RHS: &influxql.StringLiteral{Val: "hosta.influxdb.org"}, + }, + }, + }, + { + s: `DELETE FROM src WHERE host = 'hosta.influxdb.org'`, + stmt: &influxql.DeleteSeriesStatement{ + Sources: []influxql.Source{&influxql.Measurement{Name: "src"}}, + Condition: &influxql.BinaryExpr{ + Op: influxql.EQ, + LHS: &influxql.VarRef{Val: "host"}, + RHS: &influxql.StringLiteral{Val: "hosta.influxdb.org"}, + }, + }, + }, + { + s: `DELETE WHERE host = 'hosta.influxdb.org'`, + stmt: &influxql.DeleteSeriesStatement{ + Condition: &influxql.BinaryExpr{ + Op: influxql.EQ, + LHS: &influxql.VarRef{Val: "host"}, + RHS: &influxql.StringLiteral{Val: "hosta.influxdb.org"}, + }, + }, + }, + } + + for _, test := range tests { + s := test.stmt.String() + if s != test.s { + t.Errorf("error rendering string. expected %s, actual: %s", test.s, s) + } + } +} + +// Ensure DropSeriesStatement can convert to a string +func TestDropSeriesStatement_String(t *testing.T) { + var tests = []struct { + s string + stmt influxql.Statement + }{ + { + s: `DROP SERIES FROM src`, + stmt: &influxql.DropSeriesStatement{Sources: []influxql.Source{&influxql.Measurement{Name: "src"}}}, + }, + { + s: `DROP SERIES FROM src WHERE host = 'hosta.influxdb.org'`, + stmt: &influxql.DropSeriesStatement{ + Sources: []influxql.Source{&influxql.Measurement{Name: "src"}}, + Condition: &influxql.BinaryExpr{ + Op: influxql.EQ, + LHS: &influxql.VarRef{Val: "host"}, + RHS: &influxql.StringLiteral{Val: "hosta.influxdb.org"}, + }, + }, + }, + { + s: `DROP SERIES FROM src WHERE host = 'hosta.influxdb.org'`, + stmt: &influxql.DropSeriesStatement{ + Sources: []influxql.Source{&influxql.Measurement{Name: "src"}}, + Condition: &influxql.BinaryExpr{ + Op: influxql.EQ, + LHS: &influxql.VarRef{Val: "host"}, + RHS: &influxql.StringLiteral{Val: "hosta.influxdb.org"}, + }, + }, + }, + { + s: `DROP SERIES WHERE host = 'hosta.influxdb.org'`, + stmt: &influxql.DropSeriesStatement{ + Condition: &influxql.BinaryExpr{ + Op: influxql.EQ, + LHS: &influxql.VarRef{Val: "host"}, + RHS: &influxql.StringLiteral{Val: "hosta.influxdb.org"}, + }, + }, + }, + } + + for _, test := range tests { + s := test.stmt.String() + if s != test.s { + t.Errorf("error rendering string. expected %s, actual: %s", test.s, s) + } + } +} + +func BenchmarkParserParseStatement(b *testing.B) { + b.ReportAllocs() + s := `SELECT "field" FROM "series" WHERE value > 10` + for i := 0; i < b.N; i++ { + if stmt, err := influxql.NewParser(strings.NewReader(s)).ParseStatement(); err != nil { + b.Fatalf("unexpected error: %s", err) + } else if stmt == nil { + b.Fatalf("expected statement: %s", stmt) + } + } + b.SetBytes(int64(len(s))) +} + +// MustParseSelectStatement parses a select statement. Panic on error. +func MustParseSelectStatement(s string) *influxql.SelectStatement { + stmt, err := influxql.NewParser(strings.NewReader(s)).ParseStatement() + if err != nil { + panic(err) + } + return stmt.(*influxql.SelectStatement) +} + +// MustParseExpr parses an expression. Panic on error. +func MustParseExpr(s string) influxql.Expr { + expr, err := influxql.NewParser(strings.NewReader(s)).ParseExpr() + if err != nil { + panic(err) + } + return expr +} + +// errstring converts an error to its string representation. +func errstring(err error) string { + if err != nil { + return err.Error() + } + return "" +} + +// newAlterRetentionPolicyStatement creates an initialized AlterRetentionPolicyStatement. +func newAlterRetentionPolicyStatement(name string, DB string, d, sd time.Duration, replication int, dfault bool) *influxql.AlterRetentionPolicyStatement { + stmt := &influxql.AlterRetentionPolicyStatement{ + Name: name, + Database: DB, + Default: dfault, + } + + if d > -1 { + stmt.Duration = &d + } + + if sd > -1 { + stmt.ShardGroupDuration = &sd + } + + if replication > -1 { + stmt.Replication = &replication + } + + return stmt +} + +// mustMarshalJSON encodes a value to JSON. +func mustMarshalJSON(v interface{}) []byte { + b, err := json.Marshal(v) + if err != nil { + panic(err) + } + return b +} + +func mustParseDuration(s string) time.Duration { + d, err := influxql.ParseDuration(s) + if err != nil { + panic(err) + } + return d +} diff --git a/vendor/github.com/influxdata/influxdb/influxql/point_test.go b/vendor/github.com/influxdata/influxdb/influxql/point_test.go new file mode 100644 index 000000000..2b2b3fa8d --- /dev/null +++ b/vendor/github.com/influxdata/influxdb/influxql/point_test.go @@ -0,0 +1,187 @@ +package influxql_test + +import ( + "reflect" + "strings" + "testing" + + "github.com/davecgh/go-spew/spew" + "github.com/influxdata/influxdb/influxql" + "github.com/influxdata/influxdb/pkg/deep" +) + +func TestPoint_Clone_Float(t *testing.T) { + p := &influxql.FloatPoint{ + Name: "cpu", + Tags: ParseTags("host=server01"), + Time: 5, + Value: 2, + Aux: []interface{}{float64(45)}, + } + c := p.Clone() + if p == c { + t.Errorf("clone has the same address as the original: %v == %v", p, c) + } + if !deep.Equal(p, c) { + t.Errorf("mismatched point: %s", spew.Sdump(c)) + } + if &p.Aux[0] == &c.Aux[0] { + t.Errorf("aux values share the same address: %v == %v", p.Aux, c.Aux) + } else if !deep.Equal(p.Aux, c.Aux) { + t.Errorf("mismatched aux fields: %v != %v", p.Aux, c.Aux) + } +} + +func TestPoint_Clone_Integer(t *testing.T) { + p := &influxql.IntegerPoint{ + Name: "cpu", + Tags: ParseTags("host=server01"), + Time: 5, + Value: 2, + Aux: []interface{}{float64(45)}, + } + c := p.Clone() + if p == c { + t.Errorf("clone has the same address as the original: %v == %v", p, c) + } + if !deep.Equal(p, c) { + t.Errorf("mismatched point: %s", spew.Sdump(c)) + } + if &p.Aux[0] == &c.Aux[0] { + t.Errorf("aux values share the same address: %v == %v", p.Aux, c.Aux) + } else if !deep.Equal(p.Aux, c.Aux) { + t.Errorf("mismatched aux fields: %v != %v", p.Aux, c.Aux) + } +} + +func TestPoint_Clone_String(t *testing.T) { + p := &influxql.StringPoint{ + Name: "cpu", + Tags: ParseTags("host=server01"), + Time: 5, + Value: "clone", + Aux: []interface{}{float64(45)}, + } + c := p.Clone() + if p == c { + t.Errorf("clone has the same address as the original: %v == %v", p, c) + } + if !deep.Equal(p, c) { + t.Errorf("mismatched point: %s", spew.Sdump(c)) + } + if &p.Aux[0] == &c.Aux[0] { + t.Errorf("aux values share the same address: %v == %v", p.Aux, c.Aux) + } else if !deep.Equal(p.Aux, c.Aux) { + t.Errorf("mismatched aux fields: %v != %v", p.Aux, c.Aux) + } +} + +func TestPoint_Clone_Boolean(t *testing.T) { + p := &influxql.BooleanPoint{ + Name: "cpu", + Tags: ParseTags("host=server01"), + Time: 5, + Value: true, + Aux: []interface{}{float64(45)}, + } + c := p.Clone() + if p == c { + t.Errorf("clone has the same address as the original: %v == %v", p, c) + } + if !deep.Equal(p, c) { + t.Errorf("mismatched point: %s", spew.Sdump(c)) + } + if &p.Aux[0] == &c.Aux[0] { + t.Errorf("aux values share the same address: %v == %v", p.Aux, c.Aux) + } else if !deep.Equal(p.Aux, c.Aux) { + t.Errorf("mismatched aux fields: %v != %v", p.Aux, c.Aux) + } +} + +func TestPoint_Clone_Nil(t *testing.T) { + var fp *influxql.FloatPoint + if p := fp.Clone(); p != nil { + t.Errorf("expected nil, got %v", p) + } + + var ip *influxql.IntegerPoint + if p := ip.Clone(); p != nil { + t.Errorf("expected nil, got %v", p) + } + + var sp *influxql.StringPoint + if p := sp.Clone(); p != nil { + t.Errorf("expected nil, got %v", p) + } + + var bp *influxql.BooleanPoint + if p := bp.Clone(); p != nil { + t.Errorf("expected nil, got %v", p) + } +} + +// TestPoint_Fields ensures that no additional fields are added to the point structs. +// This struct is very sensitive and can effect performance unless handled carefully. +// To avoid the struct becoming a dumping ground for every function that needs to store +// miscellaneous information, this test is meant to ensure that new fields don't slip +// into the struct. +func TestPoint_Fields(t *testing.T) { + allowedFields := map[string]bool{ + "Name": true, + "Tags": true, + "Time": true, + "Nil": true, + "Value": true, + "Aux": true, + "Aggregated": true, + } + + for _, typ := range []reflect.Type{ + reflect.TypeOf(influxql.FloatPoint{}), + reflect.TypeOf(influxql.IntegerPoint{}), + reflect.TypeOf(influxql.StringPoint{}), + reflect.TypeOf(influxql.BooleanPoint{}), + } { + f, ok := typ.FieldByNameFunc(func(name string) bool { + return !allowedFields[name] + }) + if ok { + t.Errorf("found an unallowed field in %s: %s %s", typ, f.Name, f.Type) + } + } +} + +// Ensure that tags can return a unique id. +func TestTags_ID(t *testing.T) { + tags := influxql.NewTags(map[string]string{"foo": "bar", "baz": "bat"}) + if id := tags.ID(); id != "baz\x00foo\x00bat\x00bar" { + t.Fatalf("unexpected id: %q", id) + } +} + +// Ensure that a subset can be created from a tag set. +func TestTags_Subset(t *testing.T) { + tags := influxql.NewTags(map[string]string{"a": "0", "b": "1", "c": "2"}) + subset := tags.Subset([]string{"b", "c", "d"}) + if keys := subset.Keys(); !reflect.DeepEqual(keys, []string{"b", "c", "d"}) { + t.Fatalf("unexpected keys: %+v", keys) + } else if v := subset.Value("a"); v != "" { + t.Fatalf("unexpected 'a' value: %s", v) + } else if v := subset.Value("b"); v != "1" { + t.Fatalf("unexpected 'b' value: %s", v) + } else if v := subset.Value("c"); v != "2" { + t.Fatalf("unexpected 'c' value: %s", v) + } else if v := subset.Value("d"); v != "" { + t.Fatalf("unexpected 'd' value: %s", v) + } +} + +// ParseTags returns an instance of Tags for a comma-delimited list of key/values. +func ParseTags(s string) influxql.Tags { + m := make(map[string]string) + for _, kv := range strings.Split(s, ",") { + a := strings.Split(kv, "=") + m[a[0]] = a[1] + } + return influxql.NewTags(m) +} diff --git a/vendor/github.com/influxdata/influxdb/influxql/query_executor.go b/vendor/github.com/influxdata/influxdb/influxql/query_executor.go index 012e6dd1c..afe5123f9 100644 --- a/vendor/github.com/influxdata/influxdb/influxql/query_executor.go +++ b/vendor/github.com/influxdata/influxdb/influxql/query_executor.go @@ -60,6 +60,18 @@ func ErrDatabaseNotFound(name string) error { return fmt.Errorf("database not fo // ErrMeasurementNotFound returns a measurement not found error for the given measurement name. func ErrMeasurementNotFound(name string) error { return fmt.Errorf("measurement not found: %s", name) } +// ExecutionOptions contains the options for executing a query. +type ExecutionOptions struct { + // The database the query is running against. + Database string + + // The requested maximum number of points to return in each result. + ChunkSize int + + // If this query is being executed in a read-only context. + ReadOnly bool +} + // ExecutionContext contains state that the query is currently executing with. type ExecutionContext struct { // The statement ID of the executing query. @@ -74,20 +86,14 @@ type ExecutionContext struct { // Output channel where results and errors should be sent. Results chan *Result - // The database the query is running against. - Database string - - // The requested maximum number of points to return in each result. - ChunkSize int - - // If this query is being executed in a read-only context. - ReadOnly bool - // Hold the query executor's logger. Log *log.Logger // A channel that is closed when the query is interrupted. InterruptCh <-chan struct{} + + // Options used to start this query. + ExecutionOptions } // StatementExecutor executes a statement within the QueryExecutor. @@ -162,13 +168,13 @@ func (e *QueryExecutor) SetLogOutput(w io.Writer) { } // ExecuteQuery executes each statement within a query. -func (e *QueryExecutor) ExecuteQuery(query *Query, database string, chunkSize int, readonly bool, closing chan struct{}) <-chan *Result { +func (e *QueryExecutor) ExecuteQuery(query *Query, opt ExecutionOptions, closing chan struct{}) <-chan *Result { results := make(chan *Result) - go e.executeQuery(query, database, chunkSize, readonly, closing, results) + go e.executeQuery(query, opt, closing, results) return results } -func (e *QueryExecutor) executeQuery(query *Query, database string, chunkSize int, readonly bool, closing <-chan struct{}, results chan *Result) { +func (e *QueryExecutor) executeQuery(query *Query, opt ExecutionOptions, closing <-chan struct{}, results chan *Result) { defer close(results) defer e.recover(query, results) @@ -178,7 +184,7 @@ func (e *QueryExecutor) executeQuery(query *Query, database string, chunkSize in e.statMap.Add(statQueryExecutionDuration, time.Since(start).Nanoseconds()) }(time.Now()) - qid, task, err := e.attachQuery(query, database, closing) + qid, task, err := e.attachQuery(query, opt.Database, closing) if err != nil { results <- &Result{Err: err} return @@ -187,14 +193,12 @@ func (e *QueryExecutor) executeQuery(query *Query, database string, chunkSize in // Setup the execution context that will be used when executing statements. ctx := ExecutionContext{ - QueryID: qid, - Query: task, - Results: results, - Database: database, - ChunkSize: chunkSize, - ReadOnly: readonly, - Log: e.Logger, - InterruptCh: task.closing, + QueryID: qid, + Query: task, + Results: results, + Log: e.Logger, + InterruptCh: task.closing, + ExecutionOptions: opt, } var i int @@ -204,7 +208,7 @@ loop: stmt := query.Statements[i] // If a default database wasn't passed in by the caller, check the statement. - defaultDB := database + defaultDB := opt.Database if defaultDB == "" { if s, ok := stmt.(HasDefaultDatabase); ok { defaultDB = s.DefaultDatabase() diff --git a/vendor/github.com/influxdata/influxdb/influxql/query_executor_test.go b/vendor/github.com/influxdata/influxdb/influxql/query_executor_test.go new file mode 100644 index 000000000..9c605dadf --- /dev/null +++ b/vendor/github.com/influxdata/influxdb/influxql/query_executor_test.go @@ -0,0 +1,280 @@ +package influxql_test + +import ( + "errors" + "fmt" + "testing" + "time" + + "github.com/influxdata/influxdb/influxql" +) + +var errUnexpected = errors.New("unexpected error") + +type StatementExecutor struct { + ExecuteStatementFn func(stmt influxql.Statement, ctx *influxql.ExecutionContext) error +} + +func (e *StatementExecutor) ExecuteStatement(stmt influxql.Statement, ctx *influxql.ExecutionContext) error { + return e.ExecuteStatementFn(stmt, ctx) +} + +func (e *StatementExecutor) NormalizeStatement(stmt influxql.Statement, database string) error { + return nil +} + +func TestQueryExecutor_AttachQuery(t *testing.T) { + q, err := influxql.ParseQuery(`SELECT count(value) FROM cpu`) + if err != nil { + t.Fatal(err) + } + + e := influxql.NewQueryExecutor() + e.StatementExecutor = &StatementExecutor{ + ExecuteStatementFn: func(stmt influxql.Statement, ctx *influxql.ExecutionContext) error { + if ctx.QueryID != 1 { + t.Errorf("incorrect query id: exp=1 got=%d", ctx.QueryID) + } + return nil + }, + } + + discardOutput(e.ExecuteQuery(q, influxql.ExecutionOptions{}, nil)) +} + +func TestQueryExecutor_KillQuery(t *testing.T) { + q, err := influxql.ParseQuery(`SELECT count(value) FROM cpu`) + if err != nil { + t.Fatal(err) + } + + qid := make(chan uint64) + + e := influxql.NewQueryExecutor() + e.StatementExecutor = &StatementExecutor{ + ExecuteStatementFn: func(stmt influxql.Statement, ctx *influxql.ExecutionContext) error { + qid <- ctx.QueryID + select { + case <-ctx.InterruptCh: + return influxql.ErrQueryInterrupted + case <-time.After(100 * time.Millisecond): + t.Error("killing the query did not close the channel after 100 milliseconds") + return errUnexpected + } + }, + } + + results := e.ExecuteQuery(q, influxql.ExecutionOptions{}, nil) + q, err = influxql.ParseQuery(fmt.Sprintf("KILL QUERY %d", <-qid)) + if err != nil { + t.Fatal(err) + } + discardOutput(e.ExecuteQuery(q, influxql.ExecutionOptions{}, nil)) + + result := <-results + if result.Err != influxql.ErrQueryInterrupted { + t.Errorf("unexpected error: %s", result.Err) + } +} + +func TestQueryExecutor_Interrupt(t *testing.T) { + q, err := influxql.ParseQuery(`SELECT count(value) FROM cpu`) + if err != nil { + t.Fatal(err) + } + + e := influxql.NewQueryExecutor() + e.StatementExecutor = &StatementExecutor{ + ExecuteStatementFn: func(stmt influxql.Statement, ctx *influxql.ExecutionContext) error { + select { + case <-ctx.InterruptCh: + return influxql.ErrQueryInterrupted + case <-time.After(100 * time.Millisecond): + t.Error("killing the query did not close the channel after 100 milliseconds") + return errUnexpected + } + }, + } + + closing := make(chan struct{}) + results := e.ExecuteQuery(q, influxql.ExecutionOptions{}, closing) + close(closing) + result := <-results + if result.Err != influxql.ErrQueryInterrupted { + t.Errorf("unexpected error: %s", result.Err) + } +} + +func TestQueryExecutor_ShowQueries(t *testing.T) { + q, err := influxql.ParseQuery(`SELECT count(value) FROM cpu`) + if err != nil { + t.Fatal(err) + } + + e := influxql.NewQueryExecutor() + e.StatementExecutor = &StatementExecutor{ + ExecuteStatementFn: func(stmt influxql.Statement, ctx *influxql.ExecutionContext) error { + t.Errorf("unexpected statement: %s", stmt) + return errUnexpected + }, + } + + q, err = influxql.ParseQuery(`SHOW QUERIES`) + if err != nil { + t.Fatal(err) + } + + results := e.ExecuteQuery(q, influxql.ExecutionOptions{}, nil) + result := <-results + if len(result.Series) != 1 { + t.Errorf("expected %d rows, got %d", 1, len(result.Series)) + } + if result.Err != nil { + t.Errorf("unexpected error: %s", result.Err) + } +} + +func TestQueryExecutor_Limit_Timeout(t *testing.T) { + q, err := influxql.ParseQuery(`SELECT count(value) FROM cpu`) + if err != nil { + t.Fatal(err) + } + + e := influxql.NewQueryExecutor() + e.StatementExecutor = &StatementExecutor{ + ExecuteStatementFn: func(stmt influxql.Statement, ctx *influxql.ExecutionContext) error { + select { + case <-ctx.InterruptCh: + return influxql.ErrQueryInterrupted + case <-time.After(time.Second): + t.Errorf("timeout has not killed the query") + return errUnexpected + } + }, + } + e.QueryTimeout = time.Nanosecond + + results := e.ExecuteQuery(q, influxql.ExecutionOptions{}, nil) + result := <-results + if result.Err != influxql.ErrQueryTimeoutReached { + t.Errorf("unexpected error: %s", result.Err) + } +} + +func TestQueryExecutor_Limit_ConcurrentQueries(t *testing.T) { + q, err := influxql.ParseQuery(`SELECT count(value) FROM cpu`) + if err != nil { + t.Fatal(err) + } + + qid := make(chan uint64) + + e := influxql.NewQueryExecutor() + e.StatementExecutor = &StatementExecutor{ + ExecuteStatementFn: func(stmt influxql.Statement, ctx *influxql.ExecutionContext) error { + qid <- ctx.QueryID + <-ctx.InterruptCh + return influxql.ErrQueryInterrupted + }, + } + e.MaxConcurrentQueries = 1 + defer e.Close() + + // Start first query and wait for it to be executing. + go discardOutput(e.ExecuteQuery(q, influxql.ExecutionOptions{}, nil)) + <-qid + + // Start second query and expect for it to fail. + results := e.ExecuteQuery(q, influxql.ExecutionOptions{}, nil) + + select { + case result := <-results: + if len(result.Series) != 0 { + t.Errorf("expected %d rows, got %d", 0, len(result.Series)) + } + if result.Err != influxql.ErrMaxConcurrentQueriesReached { + t.Errorf("unexpected error: %s", result.Err) + } + case <-qid: + t.Errorf("unexpected statement execution for the second query") + } +} + +func TestQueryExecutor_Close(t *testing.T) { + q, err := influxql.ParseQuery(`SELECT count(value) FROM cpu`) + if err != nil { + t.Fatal(err) + } + + ch1 := make(chan struct{}) + ch2 := make(chan struct{}) + + e := influxql.NewQueryExecutor() + e.StatementExecutor = &StatementExecutor{ + ExecuteStatementFn: func(stmt influxql.Statement, ctx *influxql.ExecutionContext) error { + close(ch1) + <-ctx.InterruptCh + close(ch2) + return influxql.ErrQueryInterrupted + }, + } + + results := e.ExecuteQuery(q, influxql.ExecutionOptions{}, nil) + go func(results <-chan *influxql.Result) { + result := <-results + if result.Err != influxql.ErrQueryEngineShutdown { + t.Errorf("unexpected error: %s", result.Err) + } + }(results) + + // Wait for the statement to start executing. + <-ch1 + + // Close the query executor. + e.Close() + + // Check that the statement gets interrupted and finishes. + select { + case <-ch2: + case <-time.After(100 * time.Millisecond): + t.Error("closing the query manager did not kill the query after 100 milliseconds") + } + + results = e.ExecuteQuery(q, influxql.ExecutionOptions{}, nil) + result := <-results + if len(result.Series) != 0 { + t.Errorf("expected %d rows, got %d", 0, len(result.Series)) + } + if result.Err != influxql.ErrQueryEngineShutdown { + t.Errorf("unexpected error: %s", result.Err) + } +} + +func TestQueryExecutor_Panic(t *testing.T) { + q, err := influxql.ParseQuery(`SELECT count(value) FROM cpu`) + if err != nil { + t.Fatal(err) + } + + e := influxql.NewQueryExecutor() + e.StatementExecutor = &StatementExecutor{ + ExecuteStatementFn: func(stmt influxql.Statement, ctx *influxql.ExecutionContext) error { + panic("test error") + }, + } + + results := e.ExecuteQuery(q, influxql.ExecutionOptions{}, nil) + result := <-results + if len(result.Series) != 0 { + t.Errorf("expected %d rows, got %d", 0, len(result.Series)) + } + if result.Err == nil || result.Err.Error() != "SELECT count(value) FROM cpu [panic:test error]" { + t.Errorf("unexpected error: %s", result.Err) + } +} + +func discardOutput(results <-chan *influxql.Result) { + for range results { + // Read all results and discard. + } +} diff --git a/vendor/github.com/influxdata/influxdb/influxql/sanitize_test.go b/vendor/github.com/influxdata/influxdb/influxql/sanitize_test.go new file mode 100644 index 000000000..b2c17c786 --- /dev/null +++ b/vendor/github.com/influxdata/influxdb/influxql/sanitize_test.go @@ -0,0 +1,49 @@ +package influxql_test + +import ( + "testing" + + "github.com/influxdata/influxdb/influxql" +) + +func TestSanitize(t *testing.T) { + var tests = []struct { + s string + stmt string + }{ + // Proper statements that should be redacted. + { + s: `create user "admin" with password 'admin'`, + stmt: `create user "admin" with password [REDACTED]`, + }, + { + s: `set password for "admin" = 'admin'`, + stmt: `set password for "admin" = [REDACTED]`, + }, + + // Common invalid statements that should still be redacted. + { + s: `create user "admin" with password "admin"`, + stmt: `create user "admin" with password [REDACTED]`, + }, + { + s: `set password for "admin" = "admin"`, + stmt: `set password for "admin" = [REDACTED]`, + }, + } + + for i, tt := range tests { + stmt := influxql.Sanitize(tt.s) + if tt.stmt != stmt { + t.Errorf("%d. %q\n\nsanitize mismatch:\n\nexp=%#v\n\ngot=%#v\n\n", i, tt.s, tt.stmt, stmt) + } + } +} + +func BenchmarkSanitize(b *testing.B) { + b.ReportAllocs() + q := `create user "admin" with password 'admin'; set password for "admin" = 'admin'` + for i := 0; i < b.N; i++ { + influxql.Sanitize(q) + } +} diff --git a/vendor/github.com/influxdata/influxdb/influxql/scanner_test.go b/vendor/github.com/influxdata/influxdb/influxql/scanner_test.go new file mode 100644 index 000000000..7404908d2 --- /dev/null +++ b/vendor/github.com/influxdata/influxdb/influxql/scanner_test.go @@ -0,0 +1,300 @@ +package influxql_test + +import ( + "reflect" + "strings" + "testing" + + "github.com/influxdata/influxdb/influxql" +) + +// Ensure the scanner can scan tokens correctly. +func TestScanner_Scan(t *testing.T) { + var tests = []struct { + s string + tok influxql.Token + lit string + pos influxql.Pos + }{ + // Special tokens (EOF, ILLEGAL, WS) + {s: ``, tok: influxql.EOF}, + {s: `#`, tok: influxql.ILLEGAL, lit: `#`}, + {s: ` `, tok: influxql.WS, lit: " "}, + {s: "\t", tok: influxql.WS, lit: "\t"}, + {s: "\n", tok: influxql.WS, lit: "\n"}, + {s: "\r", tok: influxql.WS, lit: "\n"}, + {s: "\r\n", tok: influxql.WS, lit: "\n"}, + {s: "\rX", tok: influxql.WS, lit: "\n"}, + {s: "\n\r", tok: influxql.WS, lit: "\n\n"}, + {s: " \n\t \r\n\t", tok: influxql.WS, lit: " \n\t \n\t"}, + {s: " foo", tok: influxql.WS, lit: " "}, + + // Numeric operators + {s: `+`, tok: influxql.ADD}, + {s: `-`, tok: influxql.SUB}, + {s: `*`, tok: influxql.MUL}, + {s: `/`, tok: influxql.DIV}, + + // Logical operators + {s: `AND`, tok: influxql.AND}, + {s: `and`, tok: influxql.AND}, + {s: `OR`, tok: influxql.OR}, + {s: `or`, tok: influxql.OR}, + + {s: `=`, tok: influxql.EQ}, + {s: `<>`, tok: influxql.NEQ}, + {s: `! `, tok: influxql.ILLEGAL, lit: "!"}, + {s: `<`, tok: influxql.LT}, + {s: `<=`, tok: influxql.LTE}, + {s: `>`, tok: influxql.GT}, + {s: `>=`, tok: influxql.GTE}, + + // Misc tokens + {s: `(`, tok: influxql.LPAREN}, + {s: `)`, tok: influxql.RPAREN}, + {s: `,`, tok: influxql.COMMA}, + {s: `;`, tok: influxql.SEMICOLON}, + {s: `.`, tok: influxql.DOT}, + {s: `=~`, tok: influxql.EQREGEX}, + {s: `!~`, tok: influxql.NEQREGEX}, + {s: `:`, tok: influxql.COLON}, + {s: `::`, tok: influxql.DOUBLECOLON}, + + // Identifiers + {s: `foo`, tok: influxql.IDENT, lit: `foo`}, + {s: `_foo`, tok: influxql.IDENT, lit: `_foo`}, + {s: `Zx12_3U_-`, tok: influxql.IDENT, lit: `Zx12_3U_`}, + {s: `"foo"`, tok: influxql.IDENT, lit: `foo`}, + {s: `"foo\\bar"`, tok: influxql.IDENT, lit: `foo\bar`}, + {s: `"foo\bar"`, tok: influxql.BADESCAPE, lit: `\b`, pos: influxql.Pos{Line: 0, Char: 5}}, + {s: `"foo\"bar\""`, tok: influxql.IDENT, lit: `foo"bar"`}, + {s: `test"`, tok: influxql.BADSTRING, lit: "", pos: influxql.Pos{Line: 0, Char: 3}}, + {s: `"test`, tok: influxql.BADSTRING, lit: `test`}, + {s: `$host`, tok: influxql.BOUNDPARAM, lit: `host`}, + {s: `$"host param"`, tok: influxql.BOUNDPARAM, lit: `host param`}, + + {s: `true`, tok: influxql.TRUE}, + {s: `false`, tok: influxql.FALSE}, + + // Strings + {s: `'testing 123!'`, tok: influxql.STRING, lit: `testing 123!`}, + {s: `'foo\nbar'`, tok: influxql.STRING, lit: "foo\nbar"}, + {s: `'foo\\bar'`, tok: influxql.STRING, lit: "foo\\bar"}, + {s: `'test`, tok: influxql.BADSTRING, lit: `test`}, + {s: "'test\nfoo", tok: influxql.BADSTRING, lit: `test`}, + {s: `'test\g'`, tok: influxql.BADESCAPE, lit: `\g`, pos: influxql.Pos{Line: 0, Char: 6}}, + + // Numbers + {s: `100`, tok: influxql.INTEGER, lit: `100`}, + {s: `-100`, tok: influxql.INTEGER, lit: `-100`}, + {s: `100.23`, tok: influxql.NUMBER, lit: `100.23`}, + {s: `+100.23`, tok: influxql.NUMBER, lit: `+100.23`}, + {s: `-100.23`, tok: influxql.NUMBER, lit: `-100.23`}, + {s: `-100.`, tok: influxql.NUMBER, lit: `-100`}, + {s: `.23`, tok: influxql.NUMBER, lit: `.23`}, + {s: `+.23`, tok: influxql.NUMBER, lit: `+.23`}, + {s: `-.23`, tok: influxql.NUMBER, lit: `-.23`}, + //{s: `.`, tok: influxql.ILLEGAL, lit: `.`}, + {s: `-.`, tok: influxql.SUB, lit: ``}, + {s: `+.`, tok: influxql.ADD, lit: ``}, + {s: `10.3s`, tok: influxql.NUMBER, lit: `10.3`}, + + // Durations + {s: `10u`, tok: influxql.DURATIONVAL, lit: `10u`}, + {s: `10µ`, tok: influxql.DURATIONVAL, lit: `10µ`}, + {s: `10ms`, tok: influxql.DURATIONVAL, lit: `10ms`}, + {s: `-1s`, tok: influxql.DURATIONVAL, lit: `-1s`}, + {s: `10m`, tok: influxql.DURATIONVAL, lit: `10m`}, + {s: `10h`, tok: influxql.DURATIONVAL, lit: `10h`}, + {s: `10d`, tok: influxql.DURATIONVAL, lit: `10d`}, + {s: `10w`, tok: influxql.DURATIONVAL, lit: `10w`}, + {s: `10x`, tok: influxql.INTEGER, lit: `10`}, // non-duration unit + + // Keywords + {s: `ALL`, tok: influxql.ALL}, + {s: `ALTER`, tok: influxql.ALTER}, + {s: `AS`, tok: influxql.AS}, + {s: `ASC`, tok: influxql.ASC}, + {s: `BEGIN`, tok: influxql.BEGIN}, + {s: `BY`, tok: influxql.BY}, + {s: `CREATE`, tok: influxql.CREATE}, + {s: `CONTINUOUS`, tok: influxql.CONTINUOUS}, + {s: `DATABASE`, tok: influxql.DATABASE}, + {s: `DATABASES`, tok: influxql.DATABASES}, + {s: `DEFAULT`, tok: influxql.DEFAULT}, + {s: `DELETE`, tok: influxql.DELETE}, + {s: `DESC`, tok: influxql.DESC}, + {s: `DROP`, tok: influxql.DROP}, + {s: `DURATION`, tok: influxql.DURATION}, + {s: `END`, tok: influxql.END}, + {s: `EVERY`, tok: influxql.EVERY}, + {s: `EXISTS`, tok: influxql.EXISTS}, + {s: `EXPLAIN`, tok: influxql.EXPLAIN}, + {s: `FIELD`, tok: influxql.FIELD}, + {s: `FROM`, tok: influxql.FROM}, + {s: `GRANT`, tok: influxql.GRANT}, + {s: `GROUP`, tok: influxql.GROUP}, + {s: `GROUPS`, tok: influxql.GROUPS}, + {s: `IF`, tok: influxql.IF}, + {s: `INSERT`, tok: influxql.INSERT}, + {s: `INTO`, tok: influxql.INTO}, + {s: `KEY`, tok: influxql.KEY}, + {s: `KEYS`, tok: influxql.KEYS}, + {s: `KILL`, tok: influxql.KILL}, + {s: `LIMIT`, tok: influxql.LIMIT}, + {s: `SHOW`, tok: influxql.SHOW}, + {s: `SHARD`, tok: influxql.SHARD}, + {s: `SHARDS`, tok: influxql.SHARDS}, + {s: `MEASUREMENT`, tok: influxql.MEASUREMENT}, + {s: `MEASUREMENTS`, tok: influxql.MEASUREMENTS}, + {s: `NOT`, tok: influxql.NOT}, + {s: `OFFSET`, tok: influxql.OFFSET}, + {s: `ON`, tok: influxql.ON}, + {s: `ORDER`, tok: influxql.ORDER}, + {s: `PASSWORD`, tok: influxql.PASSWORD}, + {s: `POLICY`, tok: influxql.POLICY}, + {s: `POLICIES`, tok: influxql.POLICIES}, + {s: `PRIVILEGES`, tok: influxql.PRIVILEGES}, + {s: `QUERIES`, tok: influxql.QUERIES}, + {s: `QUERY`, tok: influxql.QUERY}, + {s: `READ`, tok: influxql.READ}, + {s: `REPLICATION`, tok: influxql.REPLICATION}, + {s: `RESAMPLE`, tok: influxql.RESAMPLE}, + {s: `RETENTION`, tok: influxql.RETENTION}, + {s: `REVOKE`, tok: influxql.REVOKE}, + {s: `SELECT`, tok: influxql.SELECT}, + {s: `SERIES`, tok: influxql.SERIES}, + {s: `TAG`, tok: influxql.TAG}, + {s: `TO`, tok: influxql.TO}, + {s: `USER`, tok: influxql.USER}, + {s: `USERS`, tok: influxql.USERS}, + {s: `VALUES`, tok: influxql.VALUES}, + {s: `WHERE`, tok: influxql.WHERE}, + {s: `WITH`, tok: influxql.WITH}, + {s: `WRITE`, tok: influxql.WRITE}, + {s: `explain`, tok: influxql.EXPLAIN}, // case insensitive + {s: `seLECT`, tok: influxql.SELECT}, // case insensitive + } + + for i, tt := range tests { + s := influxql.NewScanner(strings.NewReader(tt.s)) + tok, pos, lit := s.Scan() + if tt.tok != tok { + t.Errorf("%d. %q token mismatch: exp=%q got=%q <%q>", i, tt.s, tt.tok, tok, lit) + } else if tt.pos.Line != pos.Line || tt.pos.Char != pos.Char { + t.Errorf("%d. %q pos mismatch: exp=%#v got=%#v", i, tt.s, tt.pos, pos) + } else if tt.lit != lit { + t.Errorf("%d. %q literal mismatch: exp=%q got=%q", i, tt.s, tt.lit, lit) + } + } +} + +// Ensure the scanner can scan a series of tokens correctly. +func TestScanner_Scan_Multi(t *testing.T) { + type result struct { + tok influxql.Token + pos influxql.Pos + lit string + } + exp := []result{ + {tok: influxql.SELECT, pos: influxql.Pos{Line: 0, Char: 0}, lit: ""}, + {tok: influxql.WS, pos: influxql.Pos{Line: 0, Char: 6}, lit: " "}, + {tok: influxql.IDENT, pos: influxql.Pos{Line: 0, Char: 7}, lit: "value"}, + {tok: influxql.WS, pos: influxql.Pos{Line: 0, Char: 12}, lit: " "}, + {tok: influxql.FROM, pos: influxql.Pos{Line: 0, Char: 13}, lit: ""}, + {tok: influxql.WS, pos: influxql.Pos{Line: 0, Char: 17}, lit: " "}, + {tok: influxql.IDENT, pos: influxql.Pos{Line: 0, Char: 18}, lit: "myseries"}, + {tok: influxql.WS, pos: influxql.Pos{Line: 0, Char: 26}, lit: " "}, + {tok: influxql.WHERE, pos: influxql.Pos{Line: 0, Char: 27}, lit: ""}, + {tok: influxql.WS, pos: influxql.Pos{Line: 0, Char: 32}, lit: " "}, + {tok: influxql.IDENT, pos: influxql.Pos{Line: 0, Char: 33}, lit: "a"}, + {tok: influxql.WS, pos: influxql.Pos{Line: 0, Char: 34}, lit: " "}, + {tok: influxql.EQ, pos: influxql.Pos{Line: 0, Char: 35}, lit: ""}, + {tok: influxql.WS, pos: influxql.Pos{Line: 0, Char: 36}, lit: " "}, + {tok: influxql.STRING, pos: influxql.Pos{Line: 0, Char: 36}, lit: "b"}, + {tok: influxql.EOF, pos: influxql.Pos{Line: 0, Char: 40}, lit: ""}, + } + + // Create a scanner. + v := `SELECT value from myseries WHERE a = 'b'` + s := influxql.NewScanner(strings.NewReader(v)) + + // Continually scan until we reach the end. + var act []result + for { + tok, pos, lit := s.Scan() + act = append(act, result{tok, pos, lit}) + if tok == influxql.EOF { + break + } + } + + // Verify the token counts match. + if len(exp) != len(act) { + t.Fatalf("token count mismatch: exp=%d, got=%d", len(exp), len(act)) + } + + // Verify each token matches. + for i := range exp { + if !reflect.DeepEqual(exp[i], act[i]) { + t.Fatalf("%d. token mismatch:\n\nexp=%#v\n\ngot=%#v", i, exp[i], act[i]) + } + } +} + +// Ensure the library can correctly scan strings. +func TestScanString(t *testing.T) { + var tests = []struct { + in string + out string + err string + }{ + {in: `""`, out: ``}, + {in: `"foo bar"`, out: `foo bar`}, + {in: `'foo bar'`, out: `foo bar`}, + {in: `"foo\nbar"`, out: "foo\nbar"}, + {in: `"foo\\bar"`, out: `foo\bar`}, + {in: `"foo\"bar"`, out: `foo"bar`}, + {in: `'foo\'bar'`, out: `foo'bar`}, + + {in: `"foo` + "\n", out: `foo`, err: "bad string"}, // newline in string + {in: `"foo`, out: `foo`, err: "bad string"}, // unclosed quotes + {in: `"foo\xbar"`, out: `\x`, err: "bad escape"}, // invalid escape + } + + for i, tt := range tests { + out, err := influxql.ScanString(strings.NewReader(tt.in)) + if tt.err != errstring(err) { + t.Errorf("%d. %s: error: exp=%s, got=%s", i, tt.in, tt.err, err) + } else if tt.out != out { + t.Errorf("%d. %s: out: exp=%s, got=%s", i, tt.in, tt.out, out) + } + } +} + +// Test scanning regex +func TestScanRegex(t *testing.T) { + var tests = []struct { + in string + tok influxql.Token + lit string + err string + }{ + {in: `/^payments\./`, tok: influxql.REGEX, lit: `^payments\.`}, + {in: `/foo\/bar/`, tok: influxql.REGEX, lit: `foo/bar`}, + {in: `/foo\\/bar/`, tok: influxql.REGEX, lit: `foo\/bar`}, + {in: `/foo\\bar/`, tok: influxql.REGEX, lit: `foo\\bar`}, + {in: `/http\:\/\/www\.example\.com/`, tok: influxql.REGEX, lit: `http\://www\.example\.com`}, + } + + for i, tt := range tests { + s := influxql.NewScanner(strings.NewReader(tt.in)) + tok, _, lit := s.ScanRegex() + if tok != tt.tok { + t.Errorf("%d. %s: error:\n\texp=%s\n\tgot=%s\n", i, tt.in, tt.tok.String(), tok.String()) + } + if lit != tt.lit { + t.Errorf("%d. %s: error:\n\texp=%s\n\tgot=%s\n", i, tt.in, tt.lit, lit) + } + } +} diff --git a/vendor/github.com/influxdata/influxdb/influxql/select_test.go b/vendor/github.com/influxdata/influxdb/influxql/select_test.go new file mode 100644 index 000000000..0d0343f47 --- /dev/null +++ b/vendor/github.com/influxdata/influxdb/influxql/select_test.go @@ -0,0 +1,2431 @@ +package influxql_test + +import ( + "fmt" + "reflect" + "testing" + "time" + + "github.com/davecgh/go-spew/spew" + "github.com/influxdata/influxdb/influxql" + "github.com/influxdata/influxdb/pkg/deep" +) + +// Second represents a helper for type converting durations. +const Second = int64(time.Second) + +// Ensure a SELECT min() query can be executed. +func TestSelect_Min(t *testing.T) { + var ic IteratorCreator + ic.CreateIteratorFn = func(opt influxql.IteratorOptions) (influxql.Iterator, error) { + if !reflect.DeepEqual(opt.Expr, MustParseExpr(`min(value)`)) { + t.Fatalf("unexpected expr: %s", spew.Sdump(opt.Expr)) + } + + return influxql.NewCallIterator(&FloatIterator{Points: []influxql.FloatPoint{ + {Name: "cpu", Tags: ParseTags("region=west,host=A"), Time: 0 * Second, Value: 20}, + {Name: "cpu", Tags: ParseTags("region=west,host=B"), Time: 5 * Second, Value: 10}, + {Name: "cpu", Tags: ParseTags("region=east,host=A"), Time: 9 * Second, Value: 19}, + {Name: "cpu", Tags: ParseTags("region=east,host=A"), Time: 10 * Second, Value: 2}, + {Name: "cpu", Tags: ParseTags("region=west,host=A"), Time: 11 * Second, Value: 3}, + {Name: "cpu", Tags: ParseTags("region=west,host=A"), Time: 31 * Second, Value: 100}, + }}, opt) + } + + // Execute selection. + itrs, err := influxql.Select(MustParseSelectStatement(`SELECT min(value) FROM cpu WHERE time >= '1970-01-01T00:00:00Z' AND time < '1970-01-02T00:00:00Z' GROUP BY time(10s), host fill(none)`), &ic, nil) + if err != nil { + t.Fatal(err) + } else if a, err := Iterators(itrs).ReadAll(); err != nil { + t.Fatalf("unexpected point: %s", err) + } else if !deep.Equal(a, [][]influxql.Point{ + {&influxql.FloatPoint{Name: "cpu", Tags: ParseTags("host=A"), Time: 0 * Second, Value: 19, Aggregated: 2}}, + {&influxql.FloatPoint{Name: "cpu", Tags: ParseTags("host=B"), Time: 0 * Second, Value: 10, Aggregated: 1}}, + {&influxql.FloatPoint{Name: "cpu", Tags: ParseTags("host=A"), Time: 10 * Second, Value: 2, Aggregated: 2}}, + {&influxql.FloatPoint{Name: "cpu", Tags: ParseTags("host=A"), Time: 30 * Second, Value: 100, Aggregated: 1}}, + }) { + t.Fatalf("unexpected points: %s", spew.Sdump(a)) + } +} + +// Ensure a SELECT distinct() query can be executed. +func TestSelect_Distinct_Float(t *testing.T) { + var ic IteratorCreator + ic.CreateIteratorFn = func(opt influxql.IteratorOptions) (influxql.Iterator, error) { + return &FloatIterator{Points: []influxql.FloatPoint{ + {Name: "cpu", Tags: ParseTags("region=west,host=A"), Time: 0 * Second, Value: 20}, + {Name: "cpu", Tags: ParseTags("region=west,host=A"), Time: 1 * Second, Value: 19}, + {Name: "cpu", Tags: ParseTags("region=west,host=B"), Time: 5 * Second, Value: 10}, + {Name: "cpu", Tags: ParseTags("region=east,host=A"), Time: 9 * Second, Value: 19}, + {Name: "cpu", Tags: ParseTags("region=east,host=A"), Time: 10 * Second, Value: 2}, + {Name: "cpu", Tags: ParseTags("region=east,host=A"), Time: 11 * Second, Value: 2}, + {Name: "cpu", Tags: ParseTags("region=east,host=A"), Time: 12 * Second, Value: 2}, + }}, nil + } + + // Execute selection. + itrs, err := influxql.Select(MustParseSelectStatement(`SELECT distinct(value) FROM cpu WHERE time >= '1970-01-01T00:00:00Z' AND time < '1970-01-02T00:00:00Z' GROUP BY time(10s), host fill(none)`), &ic, nil) + if err != nil { + t.Fatal(err) + } else if a, err := Iterators(itrs).ReadAll(); err != nil { + t.Fatalf("unexpected point: %s", err) + } else if !deep.Equal(a, [][]influxql.Point{ + {&influxql.FloatPoint{Name: "cpu", Tags: ParseTags("host=A"), Time: 0 * Second, Value: 20}}, + {&influxql.FloatPoint{Name: "cpu", Tags: ParseTags("host=A"), Time: 0 * Second, Value: 19}}, + {&influxql.FloatPoint{Name: "cpu", Tags: ParseTags("host=B"), Time: 0 * Second, Value: 10}}, + {&influxql.FloatPoint{Name: "cpu", Tags: ParseTags("host=A"), Time: 10 * Second, Value: 2}}, + }) { + t.Fatalf("unexpected points: %s", spew.Sdump(a)) + } +} + +// Ensure a SELECT distinct() query can be executed. +func TestSelect_Distinct_Integer(t *testing.T) { + var ic IteratorCreator + ic.CreateIteratorFn = func(opt influxql.IteratorOptions) (influxql.Iterator, error) { + return &IntegerIterator{Points: []influxql.IntegerPoint{ + {Name: "cpu", Tags: ParseTags("region=west,host=A"), Time: 0 * Second, Value: 20}, + {Name: "cpu", Tags: ParseTags("region=west,host=A"), Time: 1 * Second, Value: 19}, + {Name: "cpu", Tags: ParseTags("region=west,host=B"), Time: 5 * Second, Value: 10}, + {Name: "cpu", Tags: ParseTags("region=east,host=A"), Time: 9 * Second, Value: 19}, + {Name: "cpu", Tags: ParseTags("region=east,host=A"), Time: 10 * Second, Value: 2}, + {Name: "cpu", Tags: ParseTags("region=east,host=A"), Time: 11 * Second, Value: 2}, + {Name: "cpu", Tags: ParseTags("region=east,host=A"), Time: 12 * Second, Value: 2}, + }}, nil + } + + // Execute selection. + itrs, err := influxql.Select(MustParseSelectStatement(`SELECT distinct(value) FROM cpu WHERE time >= '1970-01-01T00:00:00Z' AND time < '1970-01-02T00:00:00Z' GROUP BY time(10s), host fill(none)`), &ic, nil) + if err != nil { + t.Fatal(err) + } else if a, err := Iterators(itrs).ReadAll(); err != nil { + t.Fatalf("unexpected point: %s", err) + } else if !deep.Equal(a, [][]influxql.Point{ + {&influxql.IntegerPoint{Name: "cpu", Tags: ParseTags("host=A"), Time: 0 * Second, Value: 20}}, + {&influxql.IntegerPoint{Name: "cpu", Tags: ParseTags("host=A"), Time: 0 * Second, Value: 19}}, + {&influxql.IntegerPoint{Name: "cpu", Tags: ParseTags("host=B"), Time: 0 * Second, Value: 10}}, + {&influxql.IntegerPoint{Name: "cpu", Tags: ParseTags("host=A"), Time: 10 * Second, Value: 2}}, + }) { + t.Fatalf("unexpected points: %s", spew.Sdump(a)) + } +} + +// Ensure a SELECT distinct() query can be executed. +func TestSelect_Distinct_String(t *testing.T) { + var ic IteratorCreator + ic.CreateIteratorFn = func(opt influxql.IteratorOptions) (influxql.Iterator, error) { + return &StringIterator{Points: []influxql.StringPoint{ + {Name: "cpu", Tags: ParseTags("region=west,host=A"), Time: 0 * Second, Value: "a"}, + {Name: "cpu", Tags: ParseTags("region=west,host=A"), Time: 1 * Second, Value: "b"}, + {Name: "cpu", Tags: ParseTags("region=west,host=B"), Time: 5 * Second, Value: "c"}, + {Name: "cpu", Tags: ParseTags("region=east,host=A"), Time: 9 * Second, Value: "b"}, + {Name: "cpu", Tags: ParseTags("region=east,host=A"), Time: 10 * Second, Value: "d"}, + {Name: "cpu", Tags: ParseTags("region=east,host=A"), Time: 11 * Second, Value: "d"}, + {Name: "cpu", Tags: ParseTags("region=east,host=A"), Time: 12 * Second, Value: "d"}, + }}, nil + } + + // Execute selection. + itrs, err := influxql.Select(MustParseSelectStatement(`SELECT distinct(value) FROM cpu WHERE time >= '1970-01-01T00:00:00Z' AND time < '1970-01-02T00:00:00Z' GROUP BY time(10s), host fill(none)`), &ic, nil) + if err != nil { + t.Fatal(err) + } else if a, err := Iterators(itrs).ReadAll(); err != nil { + t.Fatalf("unexpected point: %s", err) + } else if !deep.Equal(a, [][]influxql.Point{ + {&influxql.StringPoint{Name: "cpu", Tags: ParseTags("host=A"), Time: 0 * Second, Value: "a"}}, + {&influxql.StringPoint{Name: "cpu", Tags: ParseTags("host=A"), Time: 0 * Second, Value: "b"}}, + {&influxql.StringPoint{Name: "cpu", Tags: ParseTags("host=B"), Time: 0 * Second, Value: "c"}}, + {&influxql.StringPoint{Name: "cpu", Tags: ParseTags("host=A"), Time: 10 * Second, Value: "d"}}, + }) { + t.Fatalf("unexpected points: %s", spew.Sdump(a)) + } +} + +// Ensure a SELECT distinct() query can be executed. +func TestSelect_Distinct_Boolean(t *testing.T) { + var ic IteratorCreator + ic.CreateIteratorFn = func(opt influxql.IteratorOptions) (influxql.Iterator, error) { + return &BooleanIterator{Points: []influxql.BooleanPoint{ + {Name: "cpu", Tags: ParseTags("region=west,host=A"), Time: 0 * Second, Value: true}, + {Name: "cpu", Tags: ParseTags("region=west,host=A"), Time: 1 * Second, Value: false}, + {Name: "cpu", Tags: ParseTags("region=west,host=B"), Time: 5 * Second, Value: false}, + {Name: "cpu", Tags: ParseTags("region=east,host=A"), Time: 9 * Second, Value: true}, + {Name: "cpu", Tags: ParseTags("region=east,host=A"), Time: 10 * Second, Value: false}, + {Name: "cpu", Tags: ParseTags("region=east,host=A"), Time: 11 * Second, Value: false}, + {Name: "cpu", Tags: ParseTags("region=east,host=A"), Time: 12 * Second, Value: true}, + }}, nil + } + + // Execute selection. + itrs, err := influxql.Select(MustParseSelectStatement(`SELECT distinct(value) FROM cpu WHERE time >= '1970-01-01T00:00:00Z' AND time < '1970-01-02T00:00:00Z' GROUP BY time(10s), host fill(none)`), &ic, nil) + if err != nil { + t.Fatal(err) + } else if a, err := Iterators(itrs).ReadAll(); err != nil { + t.Fatalf("unexpected point: %s", err) + } else if !deep.Equal(a, [][]influxql.Point{ + {&influxql.BooleanPoint{Name: "cpu", Tags: ParseTags("host=A"), Time: 0 * Second, Value: true}}, + {&influxql.BooleanPoint{Name: "cpu", Tags: ParseTags("host=A"), Time: 0 * Second, Value: false}}, + {&influxql.BooleanPoint{Name: "cpu", Tags: ParseTags("host=B"), Time: 0 * Second, Value: false}}, + {&influxql.BooleanPoint{Name: "cpu", Tags: ParseTags("host=A"), Time: 10 * Second, Value: false}}, + {&influxql.BooleanPoint{Name: "cpu", Tags: ParseTags("host=A"), Time: 10 * Second, Value: true}}, + }) { + t.Errorf("unexpected points: %s", spew.Sdump(a)) + } +} + +// Ensure a SELECT mean() query can be executed. +func TestSelect_Mean_Float(t *testing.T) { + var ic IteratorCreator + ic.CreateIteratorFn = func(opt influxql.IteratorOptions) (influxql.Iterator, error) { + return influxql.NewCallIterator(&FloatIterator{Points: []influxql.FloatPoint{ + {Name: "cpu", Tags: ParseTags("region=west,host=A"), Time: 0 * Second, Value: 20}, + {Name: "cpu", Tags: ParseTags("region=west,host=B"), Time: 5 * Second, Value: 10}, + {Name: "cpu", Tags: ParseTags("region=east,host=A"), Time: 9 * Second, Value: 19}, + {Name: "cpu", Tags: ParseTags("region=east,host=A"), Time: 10 * Second, Value: 2}, + {Name: "cpu", Tags: ParseTags("region=west,host=A"), Time: 11 * Second, Value: 3}, + {Name: "cpu", Tags: ParseTags("region=west,host=A"), Time: 31 * Second, Value: 100}, + + {Name: "cpu", Tags: ParseTags("region=west,host=B"), Time: 50 * Second, Value: 1}, + {Name: "cpu", Tags: ParseTags("region=west,host=B"), Time: 51 * Second, Value: 2}, + {Name: "cpu", Tags: ParseTags("region=west,host=B"), Time: 52 * Second, Value: 4}, + {Name: "cpu", Tags: ParseTags("region=west,host=B"), Time: 53 * Second, Value: 4}, + {Name: "cpu", Tags: ParseTags("region=west,host=B"), Time: 53 * Second, Value: 5}, + }}, opt) + } + + // Execute selection. + itrs, err := influxql.Select(MustParseSelectStatement(`SELECT mean(value) FROM cpu WHERE time >= '1970-01-01T00:00:00Z' AND time < '1970-01-02T00:00:00Z' GROUP BY time(10s), host fill(none)`), &ic, nil) + if err != nil { + t.Fatal(err) + } else if a, err := Iterators(itrs).ReadAll(); err != nil { + t.Fatalf("unexpected point: %s", err) + } else if !deep.Equal(a, [][]influxql.Point{ + {&influxql.FloatPoint{Name: "cpu", Tags: ParseTags("host=A"), Time: 0 * Second, Value: 19.5, Aggregated: 2}}, + {&influxql.FloatPoint{Name: "cpu", Tags: ParseTags("host=B"), Time: 0 * Second, Value: 10, Aggregated: 1}}, + {&influxql.FloatPoint{Name: "cpu", Tags: ParseTags("host=A"), Time: 10 * Second, Value: 2.5, Aggregated: 2}}, + {&influxql.FloatPoint{Name: "cpu", Tags: ParseTags("host=A"), Time: 30 * Second, Value: 100, Aggregated: 1}}, + {&influxql.FloatPoint{Name: "cpu", Tags: ParseTags("host=B"), Time: 50 * Second, Value: 3.2, Aggregated: 5}}, + }) { + t.Fatalf("unexpected points: %s", spew.Sdump(a)) + } +} + +// Ensure a SELECT mean() query can be executed. +func TestSelect_Mean_Integer(t *testing.T) { + var ic IteratorCreator + ic.CreateIteratorFn = func(opt influxql.IteratorOptions) (influxql.Iterator, error) { + return influxql.NewCallIterator(&IntegerIterator{Points: []influxql.IntegerPoint{ + {Name: "cpu", Tags: ParseTags("region=west,host=A"), Time: 0 * Second, Value: 20}, + {Name: "cpu", Tags: ParseTags("region=west,host=B"), Time: 5 * Second, Value: 10}, + {Name: "cpu", Tags: ParseTags("region=east,host=A"), Time: 9 * Second, Value: 19}, + {Name: "cpu", Tags: ParseTags("region=east,host=A"), Time: 10 * Second, Value: 2}, + {Name: "cpu", Tags: ParseTags("region=west,host=A"), Time: 11 * Second, Value: 3}, + {Name: "cpu", Tags: ParseTags("region=west,host=A"), Time: 31 * Second, Value: 100}, + + {Name: "cpu", Tags: ParseTags("region=west,host=B"), Time: 50 * Second, Value: 1}, + {Name: "cpu", Tags: ParseTags("region=west,host=B"), Time: 51 * Second, Value: 2}, + {Name: "cpu", Tags: ParseTags("region=west,host=B"), Time: 52 * Second, Value: 4}, + {Name: "cpu", Tags: ParseTags("region=west,host=B"), Time: 53 * Second, Value: 4}, + {Name: "cpu", Tags: ParseTags("region=west,host=B"), Time: 53 * Second, Value: 5}, + }}, opt) + } + + // Execute selection. + itrs, err := influxql.Select(MustParseSelectStatement(`SELECT mean(value) FROM cpu WHERE time >= '1970-01-01T00:00:00Z' AND time < '1970-01-02T00:00:00Z' GROUP BY time(10s), host fill(none)`), &ic, nil) + if err != nil { + t.Fatal(err) + } else if a, err := Iterators(itrs).ReadAll(); err != nil { + t.Fatalf("unexpected error: %s", err) + } else if !deep.Equal(a, [][]influxql.Point{ + {&influxql.FloatPoint{Name: "cpu", Tags: ParseTags("host=A"), Time: 0 * Second, Value: 19.5, Aggregated: 2}}, + {&influxql.FloatPoint{Name: "cpu", Tags: ParseTags("host=B"), Time: 0 * Second, Value: 10, Aggregated: 1}}, + {&influxql.FloatPoint{Name: "cpu", Tags: ParseTags("host=A"), Time: 10 * Second, Value: 2.5, Aggregated: 2}}, + {&influxql.FloatPoint{Name: "cpu", Tags: ParseTags("host=A"), Time: 30 * Second, Value: 100, Aggregated: 1}}, + {&influxql.FloatPoint{Name: "cpu", Tags: ParseTags("host=B"), Time: 50 * Second, Value: 3.2, Aggregated: 5}}, + }) { + t.Fatalf("unexpected points: %s", spew.Sdump(a)) + } +} + +// Ensure a SELECT mean() query cannot be executed on strings. +func TestSelect_Mean_String(t *testing.T) { + var ic IteratorCreator + ic.CreateIteratorFn = func(opt influxql.IteratorOptions) (influxql.Iterator, error) { + return influxql.NewCallIterator(&StringIterator{}, opt) + } + + // Execute selection. + itrs, err := influxql.Select(MustParseSelectStatement(`SELECT mean(value) FROM cpu WHERE time >= '1970-01-01T00:00:00Z' AND time < '1970-01-02T00:00:00Z' GROUP BY time(10s), host fill(none)`), &ic, nil) + if err == nil || err.Error() != "unsupported mean iterator type: *influxql_test.StringIterator" { + t.Errorf("unexpected error: %s", err) + } + + if itrs != nil { + influxql.Iterators(itrs).Close() + } +} + +// Ensure a SELECT mean() query cannot be executed on booleans. +func TestSelect_Mean_Boolean(t *testing.T) { + var ic IteratorCreator + ic.CreateIteratorFn = func(opt influxql.IteratorOptions) (influxql.Iterator, error) { + return influxql.NewCallIterator(&BooleanIterator{}, opt) + } + + // Execute selection. + itrs, err := influxql.Select(MustParseSelectStatement(`SELECT mean(value) FROM cpu WHERE time >= '1970-01-01T00:00:00Z' AND time < '1970-01-02T00:00:00Z' GROUP BY time(10s), host fill(none)`), &ic, nil) + if err == nil || err.Error() != "unsupported mean iterator type: *influxql_test.BooleanIterator" { + t.Errorf("unexpected error: %s", err) + } + + if itrs != nil { + influxql.Iterators(itrs).Close() + } +} + +// Ensure a SELECT median() query can be executed. +func TestSelect_Median_Float(t *testing.T) { + var ic IteratorCreator + ic.CreateIteratorFn = func(opt influxql.IteratorOptions) (influxql.Iterator, error) { + return &FloatIterator{Points: []influxql.FloatPoint{ + {Name: "cpu", Tags: ParseTags("region=west,host=A"), Time: 0 * Second, Value: 20}, + {Name: "cpu", Tags: ParseTags("region=west,host=B"), Time: 5 * Second, Value: 10}, + {Name: "cpu", Tags: ParseTags("region=east,host=A"), Time: 9 * Second, Value: 19}, + {Name: "cpu", Tags: ParseTags("region=east,host=A"), Time: 10 * Second, Value: 2}, + {Name: "cpu", Tags: ParseTags("region=west,host=A"), Time: 11 * Second, Value: 3}, + {Name: "cpu", Tags: ParseTags("region=west,host=A"), Time: 31 * Second, Value: 100}, + + {Name: "cpu", Tags: ParseTags("region=west,host=B"), Time: 50 * Second, Value: 1}, + {Name: "cpu", Tags: ParseTags("region=west,host=B"), Time: 51 * Second, Value: 2}, + {Name: "cpu", Tags: ParseTags("region=west,host=B"), Time: 52 * Second, Value: 3}, + {Name: "cpu", Tags: ParseTags("region=west,host=B"), Time: 53 * Second, Value: 4}, + {Name: "cpu", Tags: ParseTags("region=west,host=B"), Time: 53 * Second, Value: 5}, + }}, nil + } + + // Execute selection. + itrs, err := influxql.Select(MustParseSelectStatement(`SELECT median(value) FROM cpu WHERE time >= '1970-01-01T00:00:00Z' AND time < '1970-01-02T00:00:00Z' GROUP BY time(10s), host fill(none)`), &ic, nil) + if err != nil { + t.Fatal(err) + } else if a, err := Iterators(itrs).ReadAll(); err != nil { + t.Fatalf("unexpected error: %s", err) + } else if !deep.Equal(a, [][]influxql.Point{ + {&influxql.FloatPoint{Name: "cpu", Tags: ParseTags("host=A"), Time: 0 * Second, Value: 19.5}}, + {&influxql.FloatPoint{Name: "cpu", Tags: ParseTags("host=B"), Time: 0 * Second, Value: 10}}, + {&influxql.FloatPoint{Name: "cpu", Tags: ParseTags("host=A"), Time: 10 * Second, Value: 2.5}}, + {&influxql.FloatPoint{Name: "cpu", Tags: ParseTags("host=A"), Time: 30 * Second, Value: 100}}, + {&influxql.FloatPoint{Name: "cpu", Tags: ParseTags("host=B"), Time: 50 * Second, Value: 3}}, + }) { + t.Fatalf("unexpected points: %s", spew.Sdump(a)) + } +} + +// Ensure a SELECT median() query can be executed. +func TestSelect_Median_Integer(t *testing.T) { + var ic IteratorCreator + ic.CreateIteratorFn = func(opt influxql.IteratorOptions) (influxql.Iterator, error) { + return &IntegerIterator{Points: []influxql.IntegerPoint{ + {Name: "cpu", Tags: ParseTags("region=west,host=A"), Time: 0 * Second, Value: 20}, + {Name: "cpu", Tags: ParseTags("region=west,host=B"), Time: 5 * Second, Value: 10}, + {Name: "cpu", Tags: ParseTags("region=east,host=A"), Time: 9 * Second, Value: 19}, + {Name: "cpu", Tags: ParseTags("region=east,host=A"), Time: 10 * Second, Value: 2}, + {Name: "cpu", Tags: ParseTags("region=west,host=A"), Time: 11 * Second, Value: 3}, + {Name: "cpu", Tags: ParseTags("region=west,host=A"), Time: 31 * Second, Value: 100}, + + {Name: "cpu", Tags: ParseTags("region=west,host=B"), Time: 50 * Second, Value: 1}, + {Name: "cpu", Tags: ParseTags("region=west,host=B"), Time: 51 * Second, Value: 2}, + {Name: "cpu", Tags: ParseTags("region=west,host=B"), Time: 52 * Second, Value: 3}, + {Name: "cpu", Tags: ParseTags("region=west,host=B"), Time: 53 * Second, Value: 4}, + {Name: "cpu", Tags: ParseTags("region=west,host=B"), Time: 53 * Second, Value: 5}, + }}, nil + } + + // Execute selection. + itrs, err := influxql.Select(MustParseSelectStatement(`SELECT median(value) FROM cpu WHERE time >= '1970-01-01T00:00:00Z' AND time < '1970-01-02T00:00:00Z' GROUP BY time(10s), host fill(none)`), &ic, nil) + if err != nil { + t.Fatal(err) + } else if a, err := Iterators(itrs).ReadAll(); err != nil { + t.Fatalf("unexpected error: %s", err) + } else if !deep.Equal(a, [][]influxql.Point{ + {&influxql.FloatPoint{Name: "cpu", Tags: ParseTags("host=A"), Time: 0 * Second, Value: 19.5}}, + {&influxql.FloatPoint{Name: "cpu", Tags: ParseTags("host=B"), Time: 0 * Second, Value: 10}}, + {&influxql.FloatPoint{Name: "cpu", Tags: ParseTags("host=A"), Time: 10 * Second, Value: 2.5}}, + {&influxql.FloatPoint{Name: "cpu", Tags: ParseTags("host=A"), Time: 30 * Second, Value: 100}}, + {&influxql.FloatPoint{Name: "cpu", Tags: ParseTags("host=B"), Time: 50 * Second, Value: 3}}, + }) { + t.Fatalf("unexpected points: %s", spew.Sdump(a)) + } +} + +// Ensure a SELECT median() query cannot be executed on strings. +func TestSelect_Median_String(t *testing.T) { + var ic IteratorCreator + ic.CreateIteratorFn = func(opt influxql.IteratorOptions) (influxql.Iterator, error) { + return &StringIterator{}, nil + } + + // Execute selection. + itrs, err := influxql.Select(MustParseSelectStatement(`SELECT median(value) FROM cpu WHERE time >= '1970-01-01T00:00:00Z' AND time < '1970-01-02T00:00:00Z' GROUP BY time(10s), host fill(none)`), &ic, nil) + if err == nil || err.Error() != "unsupported median iterator type: *influxql_test.StringIterator" { + t.Errorf("unexpected error: %s", err) + } + + if itrs != nil { + influxql.Iterators(itrs).Close() + } +} + +// Ensure a SELECT median() query cannot be executed on booleans. +func TestSelect_Median_Boolean(t *testing.T) { + var ic IteratorCreator + ic.CreateIteratorFn = func(opt influxql.IteratorOptions) (influxql.Iterator, error) { + return &BooleanIterator{}, nil + } + + // Execute selection. + itrs, err := influxql.Select(MustParseSelectStatement(`SELECT median(value) FROM cpu WHERE time >= '1970-01-01T00:00:00Z' AND time < '1970-01-02T00:00:00Z' GROUP BY time(10s), host fill(none)`), &ic, nil) + if err == nil || err.Error() != "unsupported median iterator type: *influxql_test.BooleanIterator" { + t.Errorf("unexpected error: %s", err) + } + + if itrs != nil { + influxql.Iterators(itrs).Close() + } +} + +// Ensure a SELECT top() query can be executed. +func TestSelect_Top_NoTags_Float(t *testing.T) { + var ic IteratorCreator + ic.CreateIteratorFn = func(opt influxql.IteratorOptions) (influxql.Iterator, error) { + return &FloatIterator{Points: []influxql.FloatPoint{ + {Name: "cpu", Tags: ParseTags("region=west,host=A"), Time: 0 * Second, Value: 20}, + {Name: "cpu", Tags: ParseTags("region=west,host=B"), Time: 5 * Second, Value: 10}, + {Name: "cpu", Tags: ParseTags("region=east,host=A"), Time: 9 * Second, Value: 19}, + {Name: "cpu", Tags: ParseTags("region=east,host=A"), Time: 10 * Second, Value: 2}, + {Name: "cpu", Tags: ParseTags("region=west,host=A"), Time: 11 * Second, Value: 3}, + {Name: "cpu", Tags: ParseTags("region=west,host=A"), Time: 31 * Second, Value: 100}, + + {Name: "cpu", Tags: ParseTags("region=west,host=B"), Time: 50 * Second, Value: 1}, + {Name: "cpu", Tags: ParseTags("region=west,host=B"), Time: 51 * Second, Value: 2}, + {Name: "cpu", Tags: ParseTags("region=west,host=B"), Time: 52 * Second, Value: 3}, + {Name: "cpu", Tags: ParseTags("region=west,host=B"), Time: 53 * Second, Value: 4}, + {Name: "cpu", Tags: ParseTags("region=west,host=B"), Time: 53 * Second, Value: 5}, + }}, nil + } + + // Execute selection. + itrs, err := influxql.Select(MustParseSelectStatement(`SELECT top(value, 2) FROM cpu WHERE time >= '1970-01-01T00:00:00Z' AND time < '1970-01-02T00:00:00Z' GROUP BY time(30s), host fill(none)`), &ic, nil) + if err != nil { + t.Fatal(err) + } else if a, err := Iterators(itrs).ReadAll(); err != nil { + t.Fatalf("unexpected error: %s", err) + } else if !deep.Equal(a, [][]influxql.Point{ + {&influxql.FloatPoint{Name: "cpu", Tags: ParseTags("host=A"), Time: 0 * Second, Value: 20}}, + {&influxql.FloatPoint{Name: "cpu", Tags: ParseTags("host=A"), Time: 0 * Second, Value: 19}}, + {&influxql.FloatPoint{Name: "cpu", Tags: ParseTags("host=B"), Time: 0 * Second, Value: 10}}, + {&influxql.FloatPoint{Name: "cpu", Tags: ParseTags("host=A"), Time: 30 * Second, Value: 100}}, + {&influxql.FloatPoint{Name: "cpu", Tags: ParseTags("host=B"), Time: 30 * Second, Value: 5}}, + {&influxql.FloatPoint{Name: "cpu", Tags: ParseTags("host=B"), Time: 30 * Second, Value: 4}}, + }) { + t.Fatalf("unexpected points: %s", spew.Sdump(a)) + } +} + +// Ensure a SELECT top() query can be executed. +func TestSelect_Top_NoTags_Integer(t *testing.T) { + var ic IteratorCreator + ic.CreateIteratorFn = func(opt influxql.IteratorOptions) (influxql.Iterator, error) { + return &IntegerIterator{Points: []influxql.IntegerPoint{ + {Name: "cpu", Tags: ParseTags("region=west,host=A"), Time: 0 * Second, Value: 20}, + {Name: "cpu", Tags: ParseTags("region=west,host=B"), Time: 5 * Second, Value: 10}, + {Name: "cpu", Tags: ParseTags("region=east,host=A"), Time: 9 * Second, Value: 19}, + {Name: "cpu", Tags: ParseTags("region=east,host=A"), Time: 10 * Second, Value: 2}, + {Name: "cpu", Tags: ParseTags("region=west,host=A"), Time: 11 * Second, Value: 3}, + {Name: "cpu", Tags: ParseTags("region=west,host=A"), Time: 31 * Second, Value: 100}, + + {Name: "cpu", Tags: ParseTags("region=west,host=B"), Time: 50 * Second, Value: 1}, + {Name: "cpu", Tags: ParseTags("region=west,host=B"), Time: 51 * Second, Value: 2}, + {Name: "cpu", Tags: ParseTags("region=west,host=B"), Time: 52 * Second, Value: 3}, + {Name: "cpu", Tags: ParseTags("region=west,host=B"), Time: 53 * Second, Value: 4}, + {Name: "cpu", Tags: ParseTags("region=west,host=B"), Time: 53 * Second, Value: 5}, + }}, nil + } + + // Execute selection. + itrs, err := influxql.Select(MustParseSelectStatement(`SELECT top(value, 2) FROM cpu WHERE time >= '1970-01-01T00:00:00Z' AND time < '1970-01-02T00:00:00Z' GROUP BY time(30s), host fill(none)`), &ic, nil) + if err != nil { + t.Fatal(err) + } else if a, err := Iterators(itrs).ReadAll(); err != nil { + t.Fatalf("unexpected error: %s", err) + } else if !deep.Equal(a, [][]influxql.Point{ + {&influxql.IntegerPoint{Name: "cpu", Tags: ParseTags("host=A"), Time: 0 * Second, Value: 20}}, + {&influxql.IntegerPoint{Name: "cpu", Tags: ParseTags("host=A"), Time: 0 * Second, Value: 19}}, + {&influxql.IntegerPoint{Name: "cpu", Tags: ParseTags("host=B"), Time: 0 * Second, Value: 10}}, + {&influxql.IntegerPoint{Name: "cpu", Tags: ParseTags("host=A"), Time: 30 * Second, Value: 100}}, + {&influxql.IntegerPoint{Name: "cpu", Tags: ParseTags("host=B"), Time: 30 * Second, Value: 5}}, + {&influxql.IntegerPoint{Name: "cpu", Tags: ParseTags("host=B"), Time: 30 * Second, Value: 4}}, + }) { + t.Fatalf("unexpected points: %s", spew.Sdump(a)) + } +} + +// Ensure a SELECT top() query can be executed with tags. +func TestSelect_Top_Tags_Float(t *testing.T) { + var ic IteratorCreator + ic.CreateIteratorFn = func(opt influxql.IteratorOptions) (influxql.Iterator, error) { + return &FloatIterator{Points: []influxql.FloatPoint{ + {Name: "cpu", Tags: ParseTags("region=west,host=A"), Time: 0 * Second, Value: 20, Aux: []interface{}{"A"}}, + {Name: "cpu", Tags: ParseTags("region=west,host=B"), Time: 5 * Second, Value: 10, Aux: []interface{}{"B"}}, + {Name: "cpu", Tags: ParseTags("region=east,host=A"), Time: 9 * Second, Value: 19, Aux: []interface{}{"A"}}, + {Name: "cpu", Tags: ParseTags("region=east,host=A"), Time: 10 * Second, Value: 2, Aux: []interface{}{"A"}}, + {Name: "cpu", Tags: ParseTags("region=west,host=A"), Time: 11 * Second, Value: 3, Aux: []interface{}{"A"}}, + {Name: "cpu", Tags: ParseTags("region=west,host=A"), Time: 31 * Second, Value: 100, Aux: []interface{}{"A"}}, + + {Name: "cpu", Tags: ParseTags("region=west,host=B"), Time: 50 * Second, Value: 1, Aux: []interface{}{"B"}}, + {Name: "cpu", Tags: ParseTags("region=west,host=B"), Time: 51 * Second, Value: 2, Aux: []interface{}{"B"}}, + {Name: "cpu", Tags: ParseTags("region=west,host=B"), Time: 52 * Second, Value: 3, Aux: []interface{}{"B"}}, + {Name: "cpu", Tags: ParseTags("region=west,host=B"), Time: 53 * Second, Value: 4, Aux: []interface{}{"B"}}, + {Name: "cpu", Tags: ParseTags("region=west,host=B"), Time: 53 * Second, Value: 5, Aux: []interface{}{"B"}}, + }}, nil + } + + // Execute selection. + itrs, err := influxql.Select(MustParseSelectStatement(`SELECT top(value::float, host::tag, 2) FROM cpu WHERE time >= '1970-01-01T00:00:00Z' AND time < '1970-01-02T00:00:00Z' GROUP BY time(30s) fill(none)`), &ic, nil) + if err != nil { + t.Fatal(err) + } else if a, err := Iterators(itrs).ReadAll(); err != nil { + t.Fatalf("unexpected error: %s", err) + } else if !deep.Equal(a, [][]influxql.Point{ + { + &influxql.FloatPoint{Name: "cpu", Time: 0 * Second, Value: 20, Aux: []interface{}{"A"}}, + &influxql.StringPoint{Name: "cpu", Time: 0 * Second, Value: "A"}, + }, + { + &influxql.FloatPoint{Name: "cpu", Time: 0 * Second, Value: 10, Aux: []interface{}{"B"}}, + &influxql.StringPoint{Name: "cpu", Time: 0 * Second, Value: "B"}, + }, + { + &influxql.FloatPoint{Name: "cpu", Time: 30 * Second, Value: 100, Aux: []interface{}{"A"}}, + &influxql.StringPoint{Name: "cpu", Time: 30 * Second, Value: "A"}, + }, + { + &influxql.FloatPoint{Name: "cpu", Time: 30 * Second, Value: 5, Aux: []interface{}{"B"}}, + &influxql.StringPoint{Name: "cpu", Time: 30 * Second, Value: "B"}, + }, + }) { + t.Fatalf("unexpected points: %s", spew.Sdump(a)) + } +} + +// Ensure a SELECT top() query can be executed with tags. +func TestSelect_Top_Tags_Integer(t *testing.T) { + var ic IteratorCreator + ic.CreateIteratorFn = func(opt influxql.IteratorOptions) (influxql.Iterator, error) { + return &IntegerIterator{Points: []influxql.IntegerPoint{ + {Name: "cpu", Tags: ParseTags("region=west,host=A"), Time: 0 * Second, Value: 20, Aux: []interface{}{"A"}}, + {Name: "cpu", Tags: ParseTags("region=west,host=B"), Time: 5 * Second, Value: 10, Aux: []interface{}{"B"}}, + {Name: "cpu", Tags: ParseTags("region=east,host=A"), Time: 9 * Second, Value: 19, Aux: []interface{}{"A"}}, + {Name: "cpu", Tags: ParseTags("region=east,host=A"), Time: 10 * Second, Value: 2, Aux: []interface{}{"A"}}, + {Name: "cpu", Tags: ParseTags("region=west,host=A"), Time: 11 * Second, Value: 3, Aux: []interface{}{"A"}}, + {Name: "cpu", Tags: ParseTags("region=west,host=A"), Time: 31 * Second, Value: 100, Aux: []interface{}{"A"}}, + + {Name: "cpu", Tags: ParseTags("region=west,host=B"), Time: 50 * Second, Value: 1, Aux: []interface{}{"B"}}, + {Name: "cpu", Tags: ParseTags("region=west,host=B"), Time: 51 * Second, Value: 2, Aux: []interface{}{"B"}}, + {Name: "cpu", Tags: ParseTags("region=west,host=B"), Time: 52 * Second, Value: 3, Aux: []interface{}{"B"}}, + {Name: "cpu", Tags: ParseTags("region=west,host=B"), Time: 53 * Second, Value: 4, Aux: []interface{}{"B"}}, + {Name: "cpu", Tags: ParseTags("region=west,host=B"), Time: 53 * Second, Value: 5, Aux: []interface{}{"B"}}, + }}, nil + } + + // Execute selection. + itrs, err := influxql.Select(MustParseSelectStatement(`SELECT top(value::integer, host::tag, 2) FROM cpu WHERE time >= '1970-01-01T00:00:00Z' AND time < '1970-01-02T00:00:00Z' GROUP BY time(30s) fill(none)`), &ic, nil) + if err != nil { + t.Fatal(err) + } else if a, err := Iterators(itrs).ReadAll(); err != nil { + t.Fatalf("unexpected error: %s", err) + } else if !deep.Equal(a, [][]influxql.Point{ + { + &influxql.IntegerPoint{Name: "cpu", Time: 0 * Second, Value: 20, Aux: []interface{}{"A"}}, + &influxql.StringPoint{Name: "cpu", Time: 0 * Second, Value: "A"}, + }, + { + &influxql.IntegerPoint{Name: "cpu", Time: 0 * Second, Value: 10, Aux: []interface{}{"B"}}, + &influxql.StringPoint{Name: "cpu", Time: 0 * Second, Value: "B"}, + }, + { + &influxql.IntegerPoint{Name: "cpu", Time: 30 * Second, Value: 100, Aux: []interface{}{"A"}}, + &influxql.StringPoint{Name: "cpu", Time: 30 * Second, Value: "A"}, + }, + { + &influxql.IntegerPoint{Name: "cpu", Time: 30 * Second, Value: 5, Aux: []interface{}{"B"}}, + &influxql.StringPoint{Name: "cpu", Time: 30 * Second, Value: "B"}, + }, + }) { + t.Fatalf("unexpected points: %s", spew.Sdump(a)) + } +} + +// Ensure a SELECT top() query can be executed with tags and group by. +func TestSelect_Top_GroupByTags_Float(t *testing.T) { + var ic IteratorCreator + ic.CreateIteratorFn = func(opt influxql.IteratorOptions) (influxql.Iterator, error) { + return &FloatIterator{Points: []influxql.FloatPoint{ + {Name: "cpu", Tags: ParseTags("region=west,host=A"), Time: 0 * Second, Value: 20, Aux: []interface{}{"A"}}, + {Name: "cpu", Tags: ParseTags("region=west,host=B"), Time: 5 * Second, Value: 10, Aux: []interface{}{"B"}}, + {Name: "cpu", Tags: ParseTags("region=east,host=A"), Time: 9 * Second, Value: 19, Aux: []interface{}{"A"}}, + {Name: "cpu", Tags: ParseTags("region=east,host=A"), Time: 10 * Second, Value: 2, Aux: []interface{}{"A"}}, + {Name: "cpu", Tags: ParseTags("region=west,host=A"), Time: 11 * Second, Value: 3, Aux: []interface{}{"A"}}, + {Name: "cpu", Tags: ParseTags("region=west,host=A"), Time: 31 * Second, Value: 100, Aux: []interface{}{"A"}}, + + {Name: "cpu", Tags: ParseTags("region=west,host=B"), Time: 50 * Second, Value: 1, Aux: []interface{}{"B"}}, + {Name: "cpu", Tags: ParseTags("region=west,host=B"), Time: 51 * Second, Value: 2, Aux: []interface{}{"B"}}, + {Name: "cpu", Tags: ParseTags("region=west,host=B"), Time: 52 * Second, Value: 3, Aux: []interface{}{"B"}}, + {Name: "cpu", Tags: ParseTags("region=west,host=B"), Time: 53 * Second, Value: 4, Aux: []interface{}{"B"}}, + {Name: "cpu", Tags: ParseTags("region=west,host=B"), Time: 53 * Second, Value: 5, Aux: []interface{}{"B"}}, + }}, nil + } + + // Execute selection. + itrs, err := influxql.Select(MustParseSelectStatement(`SELECT top(value::float, host::tag, 1) FROM cpu WHERE time >= '1970-01-01T00:00:00Z' AND time < '1970-01-02T00:00:00Z' GROUP BY region, time(30s) fill(none)`), &ic, nil) + if err != nil { + t.Fatal(err) + } else if a, err := Iterators(itrs).ReadAll(); err != nil { + t.Fatalf("unexpected error: %s", err) + } else if !deep.Equal(a, [][]influxql.Point{ + { + &influxql.FloatPoint{Name: "cpu", Tags: ParseTags("region=east"), Time: 0 * Second, Value: 19, Aux: []interface{}{"A"}}, + &influxql.StringPoint{Name: "cpu", Tags: ParseTags("region=east"), Time: 0 * Second, Value: "A"}, + }, + { + &influxql.FloatPoint{Name: "cpu", Tags: ParseTags("region=west"), Time: 0 * Second, Value: 20, Aux: []interface{}{"A"}}, + &influxql.StringPoint{Name: "cpu", Tags: ParseTags("region=west"), Time: 0 * Second, Value: "A"}, + }, + { + &influxql.FloatPoint{Name: "cpu", Tags: ParseTags("region=west"), Time: 30 * Second, Value: 100, Aux: []interface{}{"A"}}, + &influxql.StringPoint{Name: "cpu", Tags: ParseTags("region=west"), Time: 30 * Second, Value: "A"}, + }, + }) { + t.Fatalf("unexpected points: %s", spew.Sdump(a)) + } +} + +// Ensure a SELECT top() query can be executed with tags and group by. +func TestSelect_Top_GroupByTags_Integer(t *testing.T) { + var ic IteratorCreator + ic.CreateIteratorFn = func(opt influxql.IteratorOptions) (influxql.Iterator, error) { + return &IntegerIterator{Points: []influxql.IntegerPoint{ + {Name: "cpu", Tags: ParseTags("region=west,host=A"), Time: 0 * Second, Value: 20, Aux: []interface{}{"A"}}, + {Name: "cpu", Tags: ParseTags("region=west,host=B"), Time: 5 * Second, Value: 10, Aux: []interface{}{"B"}}, + {Name: "cpu", Tags: ParseTags("region=east,host=A"), Time: 9 * Second, Value: 19, Aux: []interface{}{"A"}}, + {Name: "cpu", Tags: ParseTags("region=east,host=A"), Time: 10 * Second, Value: 2, Aux: []interface{}{"A"}}, + {Name: "cpu", Tags: ParseTags("region=west,host=A"), Time: 11 * Second, Value: 3, Aux: []interface{}{"A"}}, + {Name: "cpu", Tags: ParseTags("region=west,host=A"), Time: 31 * Second, Value: 100, Aux: []interface{}{"A"}}, + + {Name: "cpu", Tags: ParseTags("region=west,host=B"), Time: 50 * Second, Value: 1, Aux: []interface{}{"B"}}, + {Name: "cpu", Tags: ParseTags("region=west,host=B"), Time: 51 * Second, Value: 2, Aux: []interface{}{"B"}}, + {Name: "cpu", Tags: ParseTags("region=west,host=B"), Time: 52 * Second, Value: 3, Aux: []interface{}{"B"}}, + {Name: "cpu", Tags: ParseTags("region=west,host=B"), Time: 53 * Second, Value: 4, Aux: []interface{}{"B"}}, + {Name: "cpu", Tags: ParseTags("region=west,host=B"), Time: 53 * Second, Value: 5, Aux: []interface{}{"B"}}, + }}, nil + } + + // Execute selection. + itrs, err := influxql.Select(MustParseSelectStatement(`SELECT top(value::integer, host::tag, 1) FROM cpu WHERE time >= '1970-01-01T00:00:00Z' AND time < '1970-01-02T00:00:00Z' GROUP BY region, time(30s) fill(none)`), &ic, nil) + if err != nil { + t.Fatal(err) + } else if a, err := Iterators(itrs).ReadAll(); err != nil { + t.Fatalf("unexpected error: %s", err) + } else if !deep.Equal(a, [][]influxql.Point{ + { + &influxql.IntegerPoint{Name: "cpu", Tags: ParseTags("region=east"), Time: 0 * Second, Value: 19, Aux: []interface{}{"A"}}, + &influxql.StringPoint{Name: "cpu", Tags: ParseTags("region=east"), Time: 0 * Second, Value: "A"}, + }, + { + &influxql.IntegerPoint{Name: "cpu", Tags: ParseTags("region=west"), Time: 0 * Second, Value: 20, Aux: []interface{}{"A"}}, + &influxql.StringPoint{Name: "cpu", Tags: ParseTags("region=west"), Time: 0 * Second, Value: "A"}, + }, + { + &influxql.IntegerPoint{Name: "cpu", Tags: ParseTags("region=west"), Time: 30 * Second, Value: 100, Aux: []interface{}{"A"}}, + &influxql.StringPoint{Name: "cpu", Tags: ParseTags("region=west"), Time: 30 * Second, Value: "A"}, + }, + }) { + t.Fatalf("unexpected points: %s", spew.Sdump(a)) + } +} + +// Ensure a SELECT bottom() query can be executed. +func TestSelect_Bottom_NoTags_Float(t *testing.T) { + var ic IteratorCreator + ic.CreateIteratorFn = func(opt influxql.IteratorOptions) (influxql.Iterator, error) { + return &FloatIterator{Points: []influxql.FloatPoint{ + {Name: "cpu", Tags: ParseTags("region=west,host=A"), Time: 0 * Second, Value: 20}, + {Name: "cpu", Tags: ParseTags("region=west,host=B"), Time: 5 * Second, Value: 10}, + {Name: "cpu", Tags: ParseTags("region=east,host=A"), Time: 9 * Second, Value: 19}, + {Name: "cpu", Tags: ParseTags("region=east,host=A"), Time: 10 * Second, Value: 2}, + {Name: "cpu", Tags: ParseTags("region=west,host=A"), Time: 11 * Second, Value: 3}, + {Name: "cpu", Tags: ParseTags("region=west,host=A"), Time: 31 * Second, Value: 100}, + + {Name: "cpu", Tags: ParseTags("region=west,host=B"), Time: 50 * Second, Value: 1}, + {Name: "cpu", Tags: ParseTags("region=west,host=B"), Time: 51 * Second, Value: 2}, + {Name: "cpu", Tags: ParseTags("region=west,host=B"), Time: 52 * Second, Value: 3}, + {Name: "cpu", Tags: ParseTags("region=west,host=B"), Time: 53 * Second, Value: 4}, + {Name: "cpu", Tags: ParseTags("region=west,host=B"), Time: 53 * Second, Value: 5}, + }}, nil + } + + // Execute selection. + itrs, err := influxql.Select(MustParseSelectStatement(`SELECT bottom(value::float, 2) FROM cpu WHERE time >= '1970-01-01T00:00:00Z' AND time < '1970-01-02T00:00:00Z' GROUP BY time(30s), host fill(none)`), &ic, nil) + if err != nil { + t.Fatal(err) + } else if a, err := Iterators(itrs).ReadAll(); err != nil { + t.Fatalf("unexpected error: %s", err) + } else if !deep.Equal(a, [][]influxql.Point{ + {&influxql.FloatPoint{Name: "cpu", Tags: ParseTags("host=A"), Time: 0 * Second, Value: 2}}, + {&influxql.FloatPoint{Name: "cpu", Tags: ParseTags("host=A"), Time: 0 * Second, Value: 3}}, + {&influxql.FloatPoint{Name: "cpu", Tags: ParseTags("host=B"), Time: 0 * Second, Value: 10}}, + {&influxql.FloatPoint{Name: "cpu", Tags: ParseTags("host=A"), Time: 30 * Second, Value: 100}}, + {&influxql.FloatPoint{Name: "cpu", Tags: ParseTags("host=B"), Time: 30 * Second, Value: 1}}, + {&influxql.FloatPoint{Name: "cpu", Tags: ParseTags("host=B"), Time: 30 * Second, Value: 2}}, + }) { + t.Fatalf("unexpected points: %s", spew.Sdump(a)) + } +} + +// Ensure a SELECT bottom() query can be executed. +func TestSelect_Bottom_NoTags_Integer(t *testing.T) { + var ic IteratorCreator + ic.CreateIteratorFn = func(opt influxql.IteratorOptions) (influxql.Iterator, error) { + return &IntegerIterator{Points: []influxql.IntegerPoint{ + {Name: "cpu", Tags: ParseTags("region=west,host=A"), Time: 0 * Second, Value: 20}, + {Name: "cpu", Tags: ParseTags("region=west,host=B"), Time: 5 * Second, Value: 10}, + {Name: "cpu", Tags: ParseTags("region=east,host=A"), Time: 9 * Second, Value: 19}, + {Name: "cpu", Tags: ParseTags("region=east,host=A"), Time: 10 * Second, Value: 2}, + {Name: "cpu", Tags: ParseTags("region=west,host=A"), Time: 11 * Second, Value: 3}, + {Name: "cpu", Tags: ParseTags("region=west,host=A"), Time: 31 * Second, Value: 100}, + + {Name: "cpu", Tags: ParseTags("region=west,host=B"), Time: 50 * Second, Value: 1}, + {Name: "cpu", Tags: ParseTags("region=west,host=B"), Time: 51 * Second, Value: 2}, + {Name: "cpu", Tags: ParseTags("region=west,host=B"), Time: 52 * Second, Value: 3}, + {Name: "cpu", Tags: ParseTags("region=west,host=B"), Time: 53 * Second, Value: 4}, + {Name: "cpu", Tags: ParseTags("region=west,host=B"), Time: 53 * Second, Value: 5}, + }}, nil + } + + // Execute selection. + itrs, err := influxql.Select(MustParseSelectStatement(`SELECT bottom(value::integer, 2) FROM cpu WHERE time >= '1970-01-01T00:00:00Z' AND time < '1970-01-02T00:00:00Z' GROUP BY time(30s), host fill(none)`), &ic, nil) + if err != nil { + t.Fatal(err) + } else if a, err := Iterators(itrs).ReadAll(); err != nil { + t.Fatalf("unexpected error: %s", err) + } else if !deep.Equal(a, [][]influxql.Point{ + {&influxql.IntegerPoint{Name: "cpu", Tags: ParseTags("host=A"), Time: 0 * Second, Value: 2}}, + {&influxql.IntegerPoint{Name: "cpu", Tags: ParseTags("host=A"), Time: 0 * Second, Value: 3}}, + {&influxql.IntegerPoint{Name: "cpu", Tags: ParseTags("host=B"), Time: 0 * Second, Value: 10}}, + {&influxql.IntegerPoint{Name: "cpu", Tags: ParseTags("host=A"), Time: 30 * Second, Value: 100}}, + {&influxql.IntegerPoint{Name: "cpu", Tags: ParseTags("host=B"), Time: 30 * Second, Value: 1}}, + {&influxql.IntegerPoint{Name: "cpu", Tags: ParseTags("host=B"), Time: 30 * Second, Value: 2}}, + }) { + t.Fatalf("unexpected points: %s", spew.Sdump(a)) + } +} + +// Ensure a SELECT bottom() query can be executed with tags. +func TestSelect_Bottom_Tags_Float(t *testing.T) { + var ic IteratorCreator + ic.CreateIteratorFn = func(opt influxql.IteratorOptions) (influxql.Iterator, error) { + return &FloatIterator{Points: []influxql.FloatPoint{ + {Name: "cpu", Tags: ParseTags("region=west,host=A"), Time: 0 * Second, Value: 20, Aux: []interface{}{"A"}}, + {Name: "cpu", Tags: ParseTags("region=west,host=B"), Time: 5 * Second, Value: 10, Aux: []interface{}{"B"}}, + {Name: "cpu", Tags: ParseTags("region=east,host=A"), Time: 9 * Second, Value: 19, Aux: []interface{}{"A"}}, + {Name: "cpu", Tags: ParseTags("region=east,host=A"), Time: 10 * Second, Value: 2, Aux: []interface{}{"A"}}, + {Name: "cpu", Tags: ParseTags("region=west,host=A"), Time: 11 * Second, Value: 3, Aux: []interface{}{"A"}}, + {Name: "cpu", Tags: ParseTags("region=west,host=A"), Time: 31 * Second, Value: 100, Aux: []interface{}{"A"}}, + + {Name: "cpu", Tags: ParseTags("region=west,host=B"), Time: 50 * Second, Value: 1, Aux: []interface{}{"B"}}, + {Name: "cpu", Tags: ParseTags("region=west,host=B"), Time: 51 * Second, Value: 2, Aux: []interface{}{"B"}}, + {Name: "cpu", Tags: ParseTags("region=west,host=B"), Time: 52 * Second, Value: 3, Aux: []interface{}{"B"}}, + {Name: "cpu", Tags: ParseTags("region=west,host=B"), Time: 53 * Second, Value: 4, Aux: []interface{}{"B"}}, + {Name: "cpu", Tags: ParseTags("region=west,host=B"), Time: 53 * Second, Value: 5, Aux: []interface{}{"B"}}, + }}, nil + } + + // Execute selection. + itrs, err := influxql.Select(MustParseSelectStatement(`SELECT bottom(value::float, host::tag, 2) FROM cpu WHERE time >= '1970-01-01T00:00:00Z' AND time < '1970-01-02T00:00:00Z' GROUP BY time(30s) fill(none)`), &ic, nil) + if err != nil { + t.Fatal(err) + } else if a, err := Iterators(itrs).ReadAll(); err != nil { + t.Fatalf("unexpected error: %s", err) + } else if !deep.Equal(a, [][]influxql.Point{ + { + &influxql.FloatPoint{Name: "cpu", Time: 0 * Second, Value: 2, Aux: []interface{}{"A"}}, + &influxql.StringPoint{Name: "cpu", Time: 0 * Second, Value: "A"}, + }, + { + &influxql.FloatPoint{Name: "cpu", Time: 0 * Second, Value: 10, Aux: []interface{}{"B"}}, + &influxql.StringPoint{Name: "cpu", Time: 0 * Second, Value: "B"}, + }, + { + &influxql.FloatPoint{Name: "cpu", Time: 30 * Second, Value: 1, Aux: []interface{}{"B"}}, + &influxql.StringPoint{Name: "cpu", Time: 30 * Second, Value: "B"}, + }, + { + &influxql.FloatPoint{Name: "cpu", Time: 30 * Second, Value: 100, Aux: []interface{}{"A"}}, + &influxql.StringPoint{Name: "cpu", Time: 30 * Second, Value: "A"}, + }, + }) { + t.Fatalf("unexpected points: %s", spew.Sdump(a)) + } +} + +// Ensure a SELECT bottom() query can be executed with tags. +func TestSelect_Bottom_Tags_Integer(t *testing.T) { + var ic IteratorCreator + ic.CreateIteratorFn = func(opt influxql.IteratorOptions) (influxql.Iterator, error) { + return &IntegerIterator{Points: []influxql.IntegerPoint{ + {Name: "cpu", Tags: ParseTags("region=west,host=A"), Time: 0 * Second, Value: 20, Aux: []interface{}{"A"}}, + {Name: "cpu", Tags: ParseTags("region=west,host=B"), Time: 5 * Second, Value: 10, Aux: []interface{}{"B"}}, + {Name: "cpu", Tags: ParseTags("region=east,host=A"), Time: 9 * Second, Value: 19, Aux: []interface{}{"A"}}, + {Name: "cpu", Tags: ParseTags("region=east,host=A"), Time: 10 * Second, Value: 2, Aux: []interface{}{"A"}}, + {Name: "cpu", Tags: ParseTags("region=west,host=A"), Time: 11 * Second, Value: 3, Aux: []interface{}{"A"}}, + {Name: "cpu", Tags: ParseTags("region=west,host=A"), Time: 31 * Second, Value: 100, Aux: []interface{}{"A"}}, + + {Name: "cpu", Tags: ParseTags("region=west,host=B"), Time: 50 * Second, Value: 1, Aux: []interface{}{"B"}}, + {Name: "cpu", Tags: ParseTags("region=west,host=B"), Time: 51 * Second, Value: 2, Aux: []interface{}{"B"}}, + {Name: "cpu", Tags: ParseTags("region=west,host=B"), Time: 52 * Second, Value: 3, Aux: []interface{}{"B"}}, + {Name: "cpu", Tags: ParseTags("region=west,host=B"), Time: 53 * Second, Value: 4, Aux: []interface{}{"B"}}, + {Name: "cpu", Tags: ParseTags("region=west,host=B"), Time: 53 * Second, Value: 5, Aux: []interface{}{"B"}}, + }}, nil + } + + // Execute selection. + itrs, err := influxql.Select(MustParseSelectStatement(`SELECT bottom(value::integer, host::tag, 2) FROM cpu WHERE time >= '1970-01-01T00:00:00Z' AND time < '1970-01-02T00:00:00Z' GROUP BY time(30s) fill(none)`), &ic, nil) + if err != nil { + t.Fatal(err) + } else if a, err := Iterators(itrs).ReadAll(); err != nil { + t.Fatalf("unexpected error: %s", err) + } else if !deep.Equal(a, [][]influxql.Point{ + { + &influxql.IntegerPoint{Name: "cpu", Time: 0 * Second, Value: 2, Aux: []interface{}{"A"}}, + &influxql.StringPoint{Name: "cpu", Time: 0 * Second, Value: "A"}, + }, + { + &influxql.IntegerPoint{Name: "cpu", Time: 0 * Second, Value: 10, Aux: []interface{}{"B"}}, + &influxql.StringPoint{Name: "cpu", Time: 0 * Second, Value: "B"}, + }, + { + &influxql.IntegerPoint{Name: "cpu", Time: 30 * Second, Value: 1, Aux: []interface{}{"B"}}, + &influxql.StringPoint{Name: "cpu", Time: 30 * Second, Value: "B"}, + }, + { + &influxql.IntegerPoint{Name: "cpu", Time: 30 * Second, Value: 100, Aux: []interface{}{"A"}}, + &influxql.StringPoint{Name: "cpu", Time: 30 * Second, Value: "A"}, + }, + }) { + t.Fatalf("unexpected points: %s", spew.Sdump(a)) + } +} + +// Ensure a SELECT bottom() query can be executed with tags and group by. +func TestSelect_Bottom_GroupByTags_Float(t *testing.T) { + var ic IteratorCreator + ic.CreateIteratorFn = func(opt influxql.IteratorOptions) (influxql.Iterator, error) { + return &FloatIterator{Points: []influxql.FloatPoint{ + {Name: "cpu", Tags: ParseTags("region=west,host=A"), Time: 0 * Second, Value: 20, Aux: []interface{}{"A"}}, + {Name: "cpu", Tags: ParseTags("region=west,host=B"), Time: 5 * Second, Value: 10, Aux: []interface{}{"B"}}, + {Name: "cpu", Tags: ParseTags("region=east,host=A"), Time: 9 * Second, Value: 19, Aux: []interface{}{"A"}}, + {Name: "cpu", Tags: ParseTags("region=east,host=A"), Time: 10 * Second, Value: 2, Aux: []interface{}{"A"}}, + {Name: "cpu", Tags: ParseTags("region=west,host=A"), Time: 11 * Second, Value: 3, Aux: []interface{}{"A"}}, + {Name: "cpu", Tags: ParseTags("region=west,host=A"), Time: 31 * Second, Value: 100, Aux: []interface{}{"A"}}, + + {Name: "cpu", Tags: ParseTags("region=west,host=B"), Time: 50 * Second, Value: 1, Aux: []interface{}{"B"}}, + {Name: "cpu", Tags: ParseTags("region=west,host=B"), Time: 51 * Second, Value: 2, Aux: []interface{}{"B"}}, + {Name: "cpu", Tags: ParseTags("region=west,host=B"), Time: 52 * Second, Value: 3, Aux: []interface{}{"B"}}, + {Name: "cpu", Tags: ParseTags("region=west,host=B"), Time: 53 * Second, Value: 4, Aux: []interface{}{"B"}}, + {Name: "cpu", Tags: ParseTags("region=west,host=B"), Time: 53 * Second, Value: 5, Aux: []interface{}{"B"}}, + }}, nil + } + + // Execute selection. + itrs, err := influxql.Select(MustParseSelectStatement(`SELECT bottom(value::float, host::tag, 1) FROM cpu WHERE time >= '1970-01-01T00:00:00Z' AND time < '1970-01-02T00:00:00Z' GROUP BY region, time(30s) fill(none)`), &ic, nil) + if err != nil { + t.Fatal(err) + } else if a, err := Iterators(itrs).ReadAll(); err != nil { + t.Fatalf("unexpected error: %s", err) + } else if !deep.Equal(a, [][]influxql.Point{ + { + &influxql.FloatPoint{Name: "cpu", Tags: ParseTags("region=east"), Time: 0 * Second, Value: 2, Aux: []interface{}{"A"}}, + &influxql.StringPoint{Name: "cpu", Tags: ParseTags("region=east"), Time: 0 * Second, Value: "A"}, + }, + { + &influxql.FloatPoint{Name: "cpu", Tags: ParseTags("region=west"), Time: 0 * Second, Value: 3, Aux: []interface{}{"A"}}, + &influxql.StringPoint{Name: "cpu", Tags: ParseTags("region=west"), Time: 0 * Second, Value: "A"}, + }, + { + &influxql.FloatPoint{Name: "cpu", Tags: ParseTags("region=west"), Time: 30 * Second, Value: 1, Aux: []interface{}{"B"}}, + &influxql.StringPoint{Name: "cpu", Tags: ParseTags("region=west"), Time: 30 * Second, Value: "B"}, + }, + }) { + t.Fatalf("unexpected points: %s", spew.Sdump(a)) + } +} + +// Ensure a SELECT bottom() query can be executed with tags and group by. +func TestSelect_Bottom_GroupByTags_Integer(t *testing.T) { + var ic IteratorCreator + ic.CreateIteratorFn = func(opt influxql.IteratorOptions) (influxql.Iterator, error) { + return &IntegerIterator{Points: []influxql.IntegerPoint{ + {Name: "cpu", Tags: ParseTags("region=west,host=A"), Time: 0 * Second, Value: 20, Aux: []interface{}{"A"}}, + {Name: "cpu", Tags: ParseTags("region=west,host=B"), Time: 5 * Second, Value: 10, Aux: []interface{}{"B"}}, + {Name: "cpu", Tags: ParseTags("region=east,host=A"), Time: 9 * Second, Value: 19, Aux: []interface{}{"A"}}, + {Name: "cpu", Tags: ParseTags("region=east,host=A"), Time: 10 * Second, Value: 2, Aux: []interface{}{"A"}}, + {Name: "cpu", Tags: ParseTags("region=west,host=A"), Time: 11 * Second, Value: 3, Aux: []interface{}{"A"}}, + {Name: "cpu", Tags: ParseTags("region=west,host=A"), Time: 31 * Second, Value: 100, Aux: []interface{}{"A"}}, + + {Name: "cpu", Tags: ParseTags("region=west,host=B"), Time: 50 * Second, Value: 1, Aux: []interface{}{"B"}}, + {Name: "cpu", Tags: ParseTags("region=west,host=B"), Time: 51 * Second, Value: 2, Aux: []interface{}{"B"}}, + {Name: "cpu", Tags: ParseTags("region=west,host=B"), Time: 52 * Second, Value: 3, Aux: []interface{}{"B"}}, + {Name: "cpu", Tags: ParseTags("region=west,host=B"), Time: 53 * Second, Value: 4, Aux: []interface{}{"B"}}, + {Name: "cpu", Tags: ParseTags("region=west,host=B"), Time: 53 * Second, Value: 5, Aux: []interface{}{"B"}}, + }}, nil + } + + // Execute selection. + itrs, err := influxql.Select(MustParseSelectStatement(`SELECT bottom(value::float, host::tag, 1) FROM cpu WHERE time >= '1970-01-01T00:00:00Z' AND time < '1970-01-02T00:00:00Z' GROUP BY region, time(30s) fill(none)`), &ic, nil) + if err != nil { + t.Fatal(err) + } else if a, err := Iterators(itrs).ReadAll(); err != nil { + t.Fatalf("unexpected error: %s", err) + } else if !deep.Equal(a, [][]influxql.Point{ + { + &influxql.IntegerPoint{Name: "cpu", Tags: ParseTags("region=east"), Time: 0 * Second, Value: 2, Aux: []interface{}{"A"}}, + &influxql.StringPoint{Name: "cpu", Tags: ParseTags("region=east"), Time: 0 * Second, Value: "A"}, + }, + { + &influxql.IntegerPoint{Name: "cpu", Tags: ParseTags("region=west"), Time: 0 * Second, Value: 3, Aux: []interface{}{"A"}}, + &influxql.StringPoint{Name: "cpu", Tags: ParseTags("region=west"), Time: 0 * Second, Value: "A"}, + }, + { + &influxql.IntegerPoint{Name: "cpu", Tags: ParseTags("region=west"), Time: 30 * Second, Value: 1, Aux: []interface{}{"B"}}, + &influxql.StringPoint{Name: "cpu", Tags: ParseTags("region=west"), Time: 30 * Second, Value: "B"}, + }, + }) { + t.Fatalf("unexpected points: %s", spew.Sdump(a)) + } +} + +// Ensure a SELECT query with a fill(null) statement can be executed. +func TestSelect_Fill_Null_Float(t *testing.T) { + var ic IteratorCreator + ic.CreateIteratorFn = func(opt influxql.IteratorOptions) (influxql.Iterator, error) { + return influxql.NewCallIterator(&FloatIterator{Points: []influxql.FloatPoint{ + {Name: "cpu", Tags: ParseTags("host=A"), Time: 12 * Second, Value: 2}, + }}, opt) + } + + // Execute selection. + itrs, err := influxql.Select(MustParseSelectStatement(`SELECT mean(value) FROM cpu WHERE time >= '1970-01-01T00:00:00Z' AND time < '1970-01-01T00:01:00Z' GROUP BY host, time(10s) fill(null)`), &ic, nil) + if err != nil { + t.Fatal(err) + } else if a, err := Iterators(itrs).ReadAll(); err != nil { + t.Fatalf("unexpected error: %s", err) + } else if !deep.Equal(a, [][]influxql.Point{ + {&influxql.FloatPoint{Name: "cpu", Tags: ParseTags("host=A"), Time: 0 * Second, Nil: true}}, + {&influxql.FloatPoint{Name: "cpu", Tags: ParseTags("host=A"), Time: 10 * Second, Value: 2, Aggregated: 1}}, + {&influxql.FloatPoint{Name: "cpu", Tags: ParseTags("host=A"), Time: 20 * Second, Nil: true}}, + {&influxql.FloatPoint{Name: "cpu", Tags: ParseTags("host=A"), Time: 30 * Second, Nil: true}}, + {&influxql.FloatPoint{Name: "cpu", Tags: ParseTags("host=A"), Time: 40 * Second, Nil: true}}, + {&influxql.FloatPoint{Name: "cpu", Tags: ParseTags("host=A"), Time: 50 * Second, Nil: true}}, + }) { + t.Fatalf("unexpected points: %s", spew.Sdump(a)) + } +} + +// Ensure a SELECT query with a fill() statement can be executed. +func TestSelect_Fill_Number_Float(t *testing.T) { + var ic IteratorCreator + ic.CreateIteratorFn = func(opt influxql.IteratorOptions) (influxql.Iterator, error) { + return influxql.NewCallIterator(&FloatIterator{Points: []influxql.FloatPoint{ + {Name: "cpu", Tags: ParseTags("host=A"), Time: 12 * Second, Value: 2}, + }}, opt) + } + + // Execute selection. + itrs, err := influxql.Select(MustParseSelectStatement(`SELECT mean(value) FROM cpu WHERE time >= '1970-01-01T00:00:00Z' AND time < '1970-01-01T00:01:00Z' GROUP BY host, time(10s) fill(1)`), &ic, nil) + if err != nil { + t.Fatal(err) + } else if a, err := Iterators(itrs).ReadAll(); err != nil { + t.Fatalf("unexpected error: %s", err) + } else if !deep.Equal(a, [][]influxql.Point{ + {&influxql.FloatPoint{Name: "cpu", Tags: ParseTags("host=A"), Time: 0 * Second, Value: 1}}, + {&influxql.FloatPoint{Name: "cpu", Tags: ParseTags("host=A"), Time: 10 * Second, Value: 2, Aggregated: 1}}, + {&influxql.FloatPoint{Name: "cpu", Tags: ParseTags("host=A"), Time: 20 * Second, Value: 1}}, + {&influxql.FloatPoint{Name: "cpu", Tags: ParseTags("host=A"), Time: 30 * Second, Value: 1}}, + {&influxql.FloatPoint{Name: "cpu", Tags: ParseTags("host=A"), Time: 40 * Second, Value: 1}}, + {&influxql.FloatPoint{Name: "cpu", Tags: ParseTags("host=A"), Time: 50 * Second, Value: 1}}, + }) { + t.Fatalf("unexpected points: %s", spew.Sdump(a)) + } +} + +// Ensure a SELECT query with a fill(previous) statement can be executed. +func TestSelect_Fill_Previous_Float(t *testing.T) { + var ic IteratorCreator + ic.CreateIteratorFn = func(opt influxql.IteratorOptions) (influxql.Iterator, error) { + return influxql.NewCallIterator(&FloatIterator{Points: []influxql.FloatPoint{ + {Name: "cpu", Tags: ParseTags("host=A"), Time: 12 * Second, Value: 2}, + }}, opt) + } + + // Execute selection. + itrs, err := influxql.Select(MustParseSelectStatement(`SELECT mean(value) FROM cpu WHERE time >= '1970-01-01T00:00:00Z' AND time < '1970-01-01T00:01:00Z' GROUP BY host, time(10s) fill(previous)`), &ic, nil) + if err != nil { + t.Fatal(err) + } else if a, err := Iterators(itrs).ReadAll(); err != nil { + t.Fatalf("unexpected error: %s", err) + } else if !deep.Equal(a, [][]influxql.Point{ + {&influxql.FloatPoint{Name: "cpu", Tags: ParseTags("host=A"), Time: 0 * Second, Nil: true}}, + {&influxql.FloatPoint{Name: "cpu", Tags: ParseTags("host=A"), Time: 10 * Second, Value: 2, Aggregated: 1}}, + {&influxql.FloatPoint{Name: "cpu", Tags: ParseTags("host=A"), Time: 20 * Second, Value: 2}}, + {&influxql.FloatPoint{Name: "cpu", Tags: ParseTags("host=A"), Time: 30 * Second, Value: 2}}, + {&influxql.FloatPoint{Name: "cpu", Tags: ParseTags("host=A"), Time: 40 * Second, Value: 2}}, + {&influxql.FloatPoint{Name: "cpu", Tags: ParseTags("host=A"), Time: 50 * Second, Value: 2}}, + }) { + t.Fatalf("unexpected points: %s", spew.Sdump(a)) + } +} + +// Ensure a SELECT stddev() query can be executed. +func TestSelect_Stddev_Float(t *testing.T) { + var ic IteratorCreator + ic.CreateIteratorFn = func(opt influxql.IteratorOptions) (influxql.Iterator, error) { + return &FloatIterator{Points: []influxql.FloatPoint{ + {Name: "cpu", Tags: ParseTags("region=west,host=A"), Time: 0 * Second, Value: 20}, + {Name: "cpu", Tags: ParseTags("region=west,host=B"), Time: 5 * Second, Value: 10}, + {Name: "cpu", Tags: ParseTags("region=east,host=A"), Time: 9 * Second, Value: 19}, + {Name: "cpu", Tags: ParseTags("region=east,host=A"), Time: 10 * Second, Value: 2}, + {Name: "cpu", Tags: ParseTags("region=west,host=A"), Time: 11 * Second, Value: 3}, + {Name: "cpu", Tags: ParseTags("region=west,host=A"), Time: 31 * Second, Value: 100}, + + {Name: "cpu", Tags: ParseTags("region=west,host=B"), Time: 50 * Second, Value: 1}, + {Name: "cpu", Tags: ParseTags("region=west,host=B"), Time: 51 * Second, Value: 2}, + {Name: "cpu", Tags: ParseTags("region=west,host=B"), Time: 52 * Second, Value: 3}, + {Name: "cpu", Tags: ParseTags("region=west,host=B"), Time: 53 * Second, Value: 4}, + {Name: "cpu", Tags: ParseTags("region=west,host=B"), Time: 53 * Second, Value: 5}, + }}, nil + } + + // Execute selection. + itrs, err := influxql.Select(MustParseSelectStatement(`SELECT stddev(value) FROM cpu WHERE time >= '1970-01-01T00:00:00Z' AND time < '1970-01-02T00:00:00Z' GROUP BY time(10s), host fill(none)`), &ic, nil) + if err != nil { + t.Fatal(err) + } else if a, err := Iterators(itrs).ReadAll(); err != nil { + t.Fatalf("unexpected error: %s", err) + } else if !deep.Equal(a, [][]influxql.Point{ + {&influxql.FloatPoint{Name: "cpu", Tags: ParseTags("host=A"), Time: 0 * Second, Value: 0.7071067811865476}}, + {&influxql.FloatPoint{Name: "cpu", Tags: ParseTags("host=B"), Time: 0 * Second, Nil: true}}, + {&influxql.FloatPoint{Name: "cpu", Tags: ParseTags("host=A"), Time: 10 * Second, Value: 0.7071067811865476}}, + {&influxql.FloatPoint{Name: "cpu", Tags: ParseTags("host=A"), Time: 30 * Second, Nil: true}}, + {&influxql.FloatPoint{Name: "cpu", Tags: ParseTags("host=B"), Time: 50 * Second, Value: 1.5811388300841898}}, + }) { + t.Fatalf("unexpected points: %s", spew.Sdump(a)) + } +} + +// Ensure a SELECT stddev() query can be executed. +func TestSelect_Stddev_Integer(t *testing.T) { + var ic IteratorCreator + ic.CreateIteratorFn = func(opt influxql.IteratorOptions) (influxql.Iterator, error) { + return &IntegerIterator{Points: []influxql.IntegerPoint{ + {Name: "cpu", Tags: ParseTags("region=west,host=A"), Time: 0 * Second, Value: 20}, + {Name: "cpu", Tags: ParseTags("region=west,host=B"), Time: 5 * Second, Value: 10}, + {Name: "cpu", Tags: ParseTags("region=east,host=A"), Time: 9 * Second, Value: 19}, + {Name: "cpu", Tags: ParseTags("region=east,host=A"), Time: 10 * Second, Value: 2}, + {Name: "cpu", Tags: ParseTags("region=west,host=A"), Time: 11 * Second, Value: 3}, + {Name: "cpu", Tags: ParseTags("region=west,host=A"), Time: 31 * Second, Value: 100}, + + {Name: "cpu", Tags: ParseTags("region=west,host=B"), Time: 50 * Second, Value: 1}, + {Name: "cpu", Tags: ParseTags("region=west,host=B"), Time: 51 * Second, Value: 2}, + {Name: "cpu", Tags: ParseTags("region=west,host=B"), Time: 52 * Second, Value: 3}, + {Name: "cpu", Tags: ParseTags("region=west,host=B"), Time: 53 * Second, Value: 4}, + {Name: "cpu", Tags: ParseTags("region=west,host=B"), Time: 53 * Second, Value: 5}, + }}, nil + } + + // Execute selection. + itrs, err := influxql.Select(MustParseSelectStatement(`SELECT stddev(value) FROM cpu WHERE time >= '1970-01-01T00:00:00Z' AND time < '1970-01-02T00:00:00Z' GROUP BY time(10s), host fill(none)`), &ic, nil) + if err != nil { + t.Fatal(err) + } else if a, err := Iterators(itrs).ReadAll(); err != nil { + t.Fatalf("unexpected error: %s", err) + } else if !deep.Equal(a, [][]influxql.Point{ + {&influxql.FloatPoint{Name: "cpu", Tags: ParseTags("host=A"), Time: 0 * Second, Value: 0.7071067811865476}}, + {&influxql.FloatPoint{Name: "cpu", Tags: ParseTags("host=B"), Time: 0 * Second, Nil: true}}, + {&influxql.FloatPoint{Name: "cpu", Tags: ParseTags("host=A"), Time: 10 * Second, Value: 0.7071067811865476}}, + {&influxql.FloatPoint{Name: "cpu", Tags: ParseTags("host=A"), Time: 30 * Second, Nil: true}}, + {&influxql.FloatPoint{Name: "cpu", Tags: ParseTags("host=B"), Time: 50 * Second, Value: 1.5811388300841898}}, + }) { + t.Fatalf("unexpected points: %s", spew.Sdump(a)) + } +} + +// Ensure a SELECT stddev() query can be executed. +func TestSelect_Stddev_String(t *testing.T) { + var ic IteratorCreator + ic.CreateIteratorFn = func(opt influxql.IteratorOptions) (influxql.Iterator, error) { + return &StringIterator{Points: []influxql.StringPoint{ + {Name: "cpu", Tags: ParseTags("region=west,host=A"), Time: 0 * Second, Value: "a"}, + {Name: "cpu", Tags: ParseTags("region=west,host=B"), Time: 5 * Second, Value: "b"}, + {Name: "cpu", Tags: ParseTags("region=east,host=A"), Time: 9 * Second, Value: "c"}, + {Name: "cpu", Tags: ParseTags("region=east,host=A"), Time: 10 * Second, Value: "d"}, + {Name: "cpu", Tags: ParseTags("region=west,host=A"), Time: 11 * Second, Value: "e"}, + {Name: "cpu", Tags: ParseTags("region=west,host=A"), Time: 31 * Second, Value: "f"}, + + {Name: "cpu", Tags: ParseTags("region=west,host=B"), Time: 50 * Second, Value: "g"}, + {Name: "cpu", Tags: ParseTags("region=west,host=B"), Time: 51 * Second, Value: "h"}, + {Name: "cpu", Tags: ParseTags("region=west,host=B"), Time: 52 * Second, Value: "i"}, + {Name: "cpu", Tags: ParseTags("region=west,host=B"), Time: 53 * Second, Value: "j"}, + {Name: "cpu", Tags: ParseTags("region=west,host=B"), Time: 53 * Second, Value: "k"}, + }}, nil + } + + // Execute selection. + itrs, err := influxql.Select(MustParseSelectStatement(`SELECT stddev(value) FROM cpu WHERE time >= '1970-01-01T00:00:00Z' AND time < '1970-01-02T00:00:00Z' GROUP BY time(10s), host fill(none)`), &ic, nil) + if err != nil { + t.Fatal(err) + } else if a, err := Iterators(itrs).ReadAll(); err != nil { + t.Fatalf("unexpected error: %s", err) + } else if !deep.Equal(a, [][]influxql.Point{ + {&influxql.StringPoint{Name: "cpu", Tags: ParseTags("host=A"), Time: 0 * Second, Value: ""}}, + {&influxql.StringPoint{Name: "cpu", Tags: ParseTags("host=B"), Time: 0 * Second, Value: ""}}, + {&influxql.StringPoint{Name: "cpu", Tags: ParseTags("host=A"), Time: 10 * Second, Value: ""}}, + {&influxql.StringPoint{Name: "cpu", Tags: ParseTags("host=A"), Time: 30 * Second, Value: ""}}, + {&influxql.StringPoint{Name: "cpu", Tags: ParseTags("host=B"), Time: 50 * Second, Value: ""}}, + }) { + t.Fatalf("unexpected points: %s", spew.Sdump(a)) + } +} + +// Ensure a SELECT spread() query can be executed. +func TestSelect_Spread_Float(t *testing.T) { + var ic IteratorCreator + ic.CreateIteratorFn = func(opt influxql.IteratorOptions) (influxql.Iterator, error) { + return &FloatIterator{Points: []influxql.FloatPoint{ + {Name: "cpu", Tags: ParseTags("region=west,host=A"), Time: 0 * Second, Value: 20}, + {Name: "cpu", Tags: ParseTags("region=west,host=B"), Time: 5 * Second, Value: 10}, + {Name: "cpu", Tags: ParseTags("region=east,host=A"), Time: 9 * Second, Value: 19}, + {Name: "cpu", Tags: ParseTags("region=east,host=A"), Time: 10 * Second, Value: 2}, + {Name: "cpu", Tags: ParseTags("region=west,host=A"), Time: 11 * Second, Value: 3}, + {Name: "cpu", Tags: ParseTags("region=west,host=A"), Time: 31 * Second, Value: 100}, + + {Name: "cpu", Tags: ParseTags("region=west,host=B"), Time: 50 * Second, Value: 1}, + {Name: "cpu", Tags: ParseTags("region=west,host=B"), Time: 51 * Second, Value: 2}, + {Name: "cpu", Tags: ParseTags("region=west,host=B"), Time: 52 * Second, Value: 3}, + {Name: "cpu", Tags: ParseTags("region=west,host=B"), Time: 53 * Second, Value: 4}, + {Name: "cpu", Tags: ParseTags("region=west,host=B"), Time: 53 * Second, Value: 5}, + }}, nil + } + + // Execute selection. + itrs, err := influxql.Select(MustParseSelectStatement(`SELECT spread(value) FROM cpu WHERE time >= '1970-01-01T00:00:00Z' AND time < '1970-01-02T00:00:00Z' GROUP BY time(10s), host fill(none)`), &ic, nil) + if err != nil { + t.Fatal(err) + } else if a, err := Iterators(itrs).ReadAll(); err != nil { + t.Fatalf("unexpected error: %s", err) + } else if !deep.Equal(a, [][]influxql.Point{ + {&influxql.FloatPoint{Name: "cpu", Tags: ParseTags("host=A"), Time: 0 * Second, Value: 1}}, + {&influxql.FloatPoint{Name: "cpu", Tags: ParseTags("host=B"), Time: 0 * Second, Value: 0}}, + {&influxql.FloatPoint{Name: "cpu", Tags: ParseTags("host=A"), Time: 10 * Second, Value: 1}}, + {&influxql.FloatPoint{Name: "cpu", Tags: ParseTags("host=A"), Time: 30 * Second, Value: 0}}, + {&influxql.FloatPoint{Name: "cpu", Tags: ParseTags("host=B"), Time: 50 * Second, Value: 4}}, + }) { + t.Fatalf("unexpected points: %s", spew.Sdump(a)) + } +} + +// Ensure a SELECT spread() query can be executed. +func TestSelect_Spread_Integer(t *testing.T) { + var ic IteratorCreator + ic.CreateIteratorFn = func(opt influxql.IteratorOptions) (influxql.Iterator, error) { + return &IntegerIterator{Points: []influxql.IntegerPoint{ + {Name: "cpu", Tags: ParseTags("region=west,host=A"), Time: 0 * Second, Value: 20}, + {Name: "cpu", Tags: ParseTags("region=west,host=B"), Time: 5 * Second, Value: 10}, + {Name: "cpu", Tags: ParseTags("region=east,host=A"), Time: 9 * Second, Value: 19}, + {Name: "cpu", Tags: ParseTags("region=east,host=A"), Time: 10 * Second, Value: 2}, + {Name: "cpu", Tags: ParseTags("region=west,host=A"), Time: 11 * Second, Value: 3}, + {Name: "cpu", Tags: ParseTags("region=west,host=A"), Time: 31 * Second, Value: 100}, + + {Name: "cpu", Tags: ParseTags("region=west,host=B"), Time: 50 * Second, Value: 1}, + {Name: "cpu", Tags: ParseTags("region=west,host=B"), Time: 51 * Second, Value: 2}, + {Name: "cpu", Tags: ParseTags("region=west,host=B"), Time: 52 * Second, Value: 3}, + {Name: "cpu", Tags: ParseTags("region=west,host=B"), Time: 53 * Second, Value: 4}, + {Name: "cpu", Tags: ParseTags("region=west,host=B"), Time: 53 * Second, Value: 5}, + }}, nil + } + + // Execute selection. + itrs, err := influxql.Select(MustParseSelectStatement(`SELECT spread(value) FROM cpu WHERE time >= '1970-01-01T00:00:00Z' AND time < '1970-01-02T00:00:00Z' GROUP BY time(10s), host fill(none)`), &ic, nil) + if err != nil { + t.Fatal(err) + } else if a, err := Iterators(itrs).ReadAll(); err != nil { + t.Fatalf("unexpected error: %s", err) + } else if !deep.Equal(a, [][]influxql.Point{ + {&influxql.IntegerPoint{Name: "cpu", Tags: ParseTags("host=A"), Time: 0 * Second, Value: 1}}, + {&influxql.IntegerPoint{Name: "cpu", Tags: ParseTags("host=B"), Time: 0 * Second, Value: 0}}, + {&influxql.IntegerPoint{Name: "cpu", Tags: ParseTags("host=A"), Time: 10 * Second, Value: 1}}, + {&influxql.IntegerPoint{Name: "cpu", Tags: ParseTags("host=A"), Time: 30 * Second, Value: 0}}, + {&influxql.IntegerPoint{Name: "cpu", Tags: ParseTags("host=B"), Time: 50 * Second, Value: 4}}, + }) { + t.Fatalf("unexpected points: %s", spew.Sdump(a)) + } +} + +// Ensure a SELECT percentile() query can be executed. +func TestSelect_Percentile_Float(t *testing.T) { + var ic IteratorCreator + ic.CreateIteratorFn = func(opt influxql.IteratorOptions) (influxql.Iterator, error) { + return &FloatIterator{Points: []influxql.FloatPoint{ + {Name: "cpu", Tags: ParseTags("region=west,host=A"), Time: 0 * Second, Value: 20}, + {Name: "cpu", Tags: ParseTags("region=west,host=B"), Time: 5 * Second, Value: 10}, + {Name: "cpu", Tags: ParseTags("region=east,host=A"), Time: 9 * Second, Value: 19}, + {Name: "cpu", Tags: ParseTags("region=east,host=A"), Time: 10 * Second, Value: 2}, + {Name: "cpu", Tags: ParseTags("region=west,host=A"), Time: 11 * Second, Value: 3}, + {Name: "cpu", Tags: ParseTags("region=west,host=A"), Time: 31 * Second, Value: 100}, + + {Name: "cpu", Tags: ParseTags("region=west,host=B"), Time: 50 * Second, Value: 10}, + {Name: "cpu", Tags: ParseTags("region=west,host=B"), Time: 51 * Second, Value: 9}, + {Name: "cpu", Tags: ParseTags("region=west,host=B"), Time: 52 * Second, Value: 8}, + {Name: "cpu", Tags: ParseTags("region=west,host=B"), Time: 53 * Second, Value: 7}, + {Name: "cpu", Tags: ParseTags("region=west,host=B"), Time: 54 * Second, Value: 6}, + {Name: "cpu", Tags: ParseTags("region=west,host=B"), Time: 55 * Second, Value: 5}, + {Name: "cpu", Tags: ParseTags("region=west,host=B"), Time: 56 * Second, Value: 4}, + {Name: "cpu", Tags: ParseTags("region=west,host=B"), Time: 57 * Second, Value: 3}, + {Name: "cpu", Tags: ParseTags("region=west,host=B"), Time: 58 * Second, Value: 2}, + {Name: "cpu", Tags: ParseTags("region=west,host=B"), Time: 59 * Second, Value: 1}, + }}, nil + } + + // Execute selection. + itrs, err := influxql.Select(MustParseSelectStatement(`SELECT percentile(value, 90) FROM cpu WHERE time >= '1970-01-01T00:00:00Z' AND time < '1970-01-02T00:00:00Z' GROUP BY time(10s), host fill(none)`), &ic, nil) + if err != nil { + t.Fatal(err) + } else if a, err := Iterators(itrs).ReadAll(); err != nil { + t.Fatalf("unexpected error: %s", err) + } else if !deep.Equal(a, [][]influxql.Point{ + {&influxql.FloatPoint{Name: "cpu", Tags: ParseTags("host=A"), Time: 0 * Second, Value: 20}}, + {&influxql.FloatPoint{Name: "cpu", Tags: ParseTags("host=B"), Time: 0 * Second, Value: 10}}, + {&influxql.FloatPoint{Name: "cpu", Tags: ParseTags("host=A"), Time: 10 * Second, Value: 3}}, + {&influxql.FloatPoint{Name: "cpu", Tags: ParseTags("host=A"), Time: 30 * Second, Value: 100}}, + {&influxql.FloatPoint{Name: "cpu", Tags: ParseTags("host=B"), Time: 50 * Second, Value: 9}}, + }) { + t.Fatalf("unexpected points: %s", spew.Sdump(a)) + } +} + +// Ensure a SELECT percentile() query can be executed. +func TestSelect_Percentile_Integer(t *testing.T) { + var ic IteratorCreator + ic.CreateIteratorFn = func(opt influxql.IteratorOptions) (influxql.Iterator, error) { + return &IntegerIterator{Points: []influxql.IntegerPoint{ + {Name: "cpu", Tags: ParseTags("region=west,host=A"), Time: 0 * Second, Value: 20}, + {Name: "cpu", Tags: ParseTags("region=west,host=B"), Time: 5 * Second, Value: 10}, + {Name: "cpu", Tags: ParseTags("region=east,host=A"), Time: 9 * Second, Value: 19}, + {Name: "cpu", Tags: ParseTags("region=east,host=A"), Time: 10 * Second, Value: 2}, + {Name: "cpu", Tags: ParseTags("region=west,host=A"), Time: 11 * Second, Value: 3}, + {Name: "cpu", Tags: ParseTags("region=west,host=A"), Time: 31 * Second, Value: 100}, + + {Name: "cpu", Tags: ParseTags("region=west,host=B"), Time: 50 * Second, Value: 10}, + {Name: "cpu", Tags: ParseTags("region=west,host=B"), Time: 51 * Second, Value: 9}, + {Name: "cpu", Tags: ParseTags("region=west,host=B"), Time: 52 * Second, Value: 8}, + {Name: "cpu", Tags: ParseTags("region=west,host=B"), Time: 53 * Second, Value: 7}, + {Name: "cpu", Tags: ParseTags("region=west,host=B"), Time: 54 * Second, Value: 6}, + {Name: "cpu", Tags: ParseTags("region=west,host=B"), Time: 55 * Second, Value: 5}, + {Name: "cpu", Tags: ParseTags("region=west,host=B"), Time: 56 * Second, Value: 4}, + {Name: "cpu", Tags: ParseTags("region=west,host=B"), Time: 57 * Second, Value: 3}, + {Name: "cpu", Tags: ParseTags("region=west,host=B"), Time: 58 * Second, Value: 2}, + {Name: "cpu", Tags: ParseTags("region=west,host=B"), Time: 59 * Second, Value: 1}, + }}, nil + } + + // Execute selection. + itrs, err := influxql.Select(MustParseSelectStatement(`SELECT percentile(value, 90) FROM cpu WHERE time >= '1970-01-01T00:00:00Z' AND time < '1970-01-02T00:00:00Z' GROUP BY time(10s), host fill(none)`), &ic, nil) + if err != nil { + t.Fatal(err) + } else if a, err := Iterators(itrs).ReadAll(); err != nil { + t.Fatalf("unexpected error: %s", err) + } else if !deep.Equal(a, [][]influxql.Point{ + {&influxql.IntegerPoint{Name: "cpu", Tags: ParseTags("host=A"), Time: 0 * Second, Value: 20}}, + {&influxql.IntegerPoint{Name: "cpu", Tags: ParseTags("host=B"), Time: 0 * Second, Value: 10}}, + {&influxql.IntegerPoint{Name: "cpu", Tags: ParseTags("host=A"), Time: 10 * Second, Value: 3}}, + {&influxql.IntegerPoint{Name: "cpu", Tags: ParseTags("host=A"), Time: 30 * Second, Value: 100}}, + {&influxql.IntegerPoint{Name: "cpu", Tags: ParseTags("host=B"), Time: 50 * Second, Value: 9}}, + }) { + t.Fatalf("unexpected points: %s", spew.Sdump(a)) + } +} + +// Ensure a simple raw SELECT statement can be executed. +func TestSelect_Raw(t *testing.T) { + // Mock two iterators -- one for each value in the query. + var ic IteratorCreator + ic.CreateIteratorFn = func(opt influxql.IteratorOptions) (influxql.Iterator, error) { + if !reflect.DeepEqual(opt.Aux, []influxql.VarRef{{Val: "v1", Type: influxql.Float}, {Val: "v2", Type: influxql.Float}}) { + t.Fatalf("unexpected options: %s", spew.Sdump(opt.Expr)) + + } + return &FloatIterator{Points: []influxql.FloatPoint{ + {Time: 0, Aux: []interface{}{float64(1), nil}}, + {Time: 1, Aux: []interface{}{nil, float64(2)}}, + {Time: 5, Aux: []interface{}{float64(3), float64(4)}}, + }}, nil + } + + // Execute selection. + itrs, err := influxql.Select(MustParseSelectStatement(`SELECT v1::float, v2::float FROM cpu`), &ic, nil) + if err != nil { + t.Fatal(err) + } else if a, err := Iterators(itrs).ReadAll(); err != nil { + t.Fatalf("unexpected error: %s", err) + } else if !deep.Equal(a, [][]influxql.Point{ + { + &influxql.FloatPoint{Time: 0, Value: 1}, + &influxql.FloatPoint{Time: 0, Nil: true}, + }, + { + &influxql.FloatPoint{Time: 1, Nil: true}, + &influxql.FloatPoint{Time: 1, Value: 2}, + }, + { + &influxql.FloatPoint{Time: 5, Value: 3}, + &influxql.FloatPoint{Time: 5, Value: 4}, + }, + }) { + t.Fatalf("unexpected points: %s", spew.Sdump(a)) + } +} + +// Ensure a SELECT binary expr queries can be executed as floats. +func TestSelect_BinaryExpr_Float(t *testing.T) { + var ic IteratorCreator + ic.CreateIteratorFn = func(opt influxql.IteratorOptions) (influxql.Iterator, error) { + makeAuxFields := func(value float64) []interface{} { + aux := make([]interface{}, len(opt.Aux)) + for i := range aux { + aux[i] = value + } + return aux + } + return &FloatIterator{Points: []influxql.FloatPoint{ + {Name: "cpu", Time: 0 * Second, Value: 20, Aux: makeAuxFields(20)}, + {Name: "cpu", Time: 5 * Second, Value: 10, Aux: makeAuxFields(10)}, + {Name: "cpu", Time: 9 * Second, Value: 19, Aux: makeAuxFields(19)}, + }}, nil + } + ic.FieldDimensionsFn = func(sources influxql.Sources) (map[string]influxql.DataType, map[string]struct{}, error) { + return map[string]influxql.DataType{"value": influxql.Float}, nil, nil + } + + for _, test := range []struct { + Name string + Statement string + Points [][]influxql.Point + }{ + { + Name: "rhs binary add number", + Statement: `SELECT value + 2.0 FROM cpu`, + Points: [][]influxql.Point{ + {&influxql.FloatPoint{Name: "cpu", Time: 0 * Second, Value: 22}}, + {&influxql.FloatPoint{Name: "cpu", Time: 5 * Second, Value: 12}}, + {&influxql.FloatPoint{Name: "cpu", Time: 9 * Second, Value: 21}}, + }, + }, + { + Name: "rhs binary add integer", + Statement: `SELECT value + 2 FROM cpu`, + Points: [][]influxql.Point{ + {&influxql.FloatPoint{Name: "cpu", Time: 0 * Second, Value: 22}}, + {&influxql.FloatPoint{Name: "cpu", Time: 5 * Second, Value: 12}}, + {&influxql.FloatPoint{Name: "cpu", Time: 9 * Second, Value: 21}}, + }, + }, + { + Name: "lhs binary add number", + Statement: `SELECT 2.0 + value FROM cpu`, + Points: [][]influxql.Point{ + {&influxql.FloatPoint{Name: "cpu", Time: 0 * Second, Value: 22}}, + {&influxql.FloatPoint{Name: "cpu", Time: 5 * Second, Value: 12}}, + {&influxql.FloatPoint{Name: "cpu", Time: 9 * Second, Value: 21}}, + }, + }, + { + Name: "lhs binary add integer", + Statement: `SELECT 2 + value FROM cpu`, + Points: [][]influxql.Point{ + {&influxql.FloatPoint{Name: "cpu", Time: 0 * Second, Value: 22}}, + {&influxql.FloatPoint{Name: "cpu", Time: 5 * Second, Value: 12}}, + {&influxql.FloatPoint{Name: "cpu", Time: 9 * Second, Value: 21}}, + }, + }, + { + Name: "two variable binary add", + Statement: `SELECT value + value FROM cpu`, + Points: [][]influxql.Point{ + {&influxql.FloatPoint{Name: "cpu", Time: 0 * Second, Value: 40}}, + {&influxql.FloatPoint{Name: "cpu", Time: 5 * Second, Value: 20}}, + {&influxql.FloatPoint{Name: "cpu", Time: 9 * Second, Value: 38}}, + }, + }, + { + Name: "rhs binary multiply number", + Statement: `SELECT value * 2.0 FROM cpu`, + Points: [][]influxql.Point{ + {&influxql.FloatPoint{Name: "cpu", Time: 0 * Second, Value: 40}}, + {&influxql.FloatPoint{Name: "cpu", Time: 5 * Second, Value: 20}}, + {&influxql.FloatPoint{Name: "cpu", Time: 9 * Second, Value: 38}}, + }, + }, + { + Name: "rhs binary multiply integer", + Statement: `SELECT value * 2 FROM cpu`, + Points: [][]influxql.Point{ + {&influxql.FloatPoint{Name: "cpu", Time: 0 * Second, Value: 40}}, + {&influxql.FloatPoint{Name: "cpu", Time: 5 * Second, Value: 20}}, + {&influxql.FloatPoint{Name: "cpu", Time: 9 * Second, Value: 38}}, + }, + }, + { + Name: "lhs binary multiply number", + Statement: `SELECT 2.0 * value FROM cpu`, + Points: [][]influxql.Point{ + {&influxql.FloatPoint{Name: "cpu", Time: 0 * Second, Value: 40}}, + {&influxql.FloatPoint{Name: "cpu", Time: 5 * Second, Value: 20}}, + {&influxql.FloatPoint{Name: "cpu", Time: 9 * Second, Value: 38}}, + }, + }, + { + Name: "lhs binary multiply integer", + Statement: `SELECT 2 * value FROM cpu`, + Points: [][]influxql.Point{ + {&influxql.FloatPoint{Name: "cpu", Time: 0 * Second, Value: 40}}, + {&influxql.FloatPoint{Name: "cpu", Time: 5 * Second, Value: 20}}, + {&influxql.FloatPoint{Name: "cpu", Time: 9 * Second, Value: 38}}, + }, + }, + { + Name: "two variable binary multiply", + Statement: `SELECT value * value FROM cpu`, + Points: [][]influxql.Point{ + {&influxql.FloatPoint{Name: "cpu", Time: 0 * Second, Value: 400}}, + {&influxql.FloatPoint{Name: "cpu", Time: 5 * Second, Value: 100}}, + {&influxql.FloatPoint{Name: "cpu", Time: 9 * Second, Value: 361}}, + }, + }, + { + Name: "rhs binary subtract number", + Statement: `SELECT value - 2.0 FROM cpu`, + Points: [][]influxql.Point{ + {&influxql.FloatPoint{Name: "cpu", Time: 0 * Second, Value: 18}}, + {&influxql.FloatPoint{Name: "cpu", Time: 5 * Second, Value: 8}}, + {&influxql.FloatPoint{Name: "cpu", Time: 9 * Second, Value: 17}}, + }, + }, + { + Name: "rhs binary subtract integer", + Statement: `SELECT value - 2 FROM cpu`, + Points: [][]influxql.Point{ + {&influxql.FloatPoint{Name: "cpu", Time: 0 * Second, Value: 18}}, + {&influxql.FloatPoint{Name: "cpu", Time: 5 * Second, Value: 8}}, + {&influxql.FloatPoint{Name: "cpu", Time: 9 * Second, Value: 17}}, + }, + }, + { + Name: "lhs binary subtract number", + Statement: `SELECT 2.0 - value FROM cpu`, + Points: [][]influxql.Point{ + {&influxql.FloatPoint{Name: "cpu", Time: 0 * Second, Value: -18}}, + {&influxql.FloatPoint{Name: "cpu", Time: 5 * Second, Value: -8}}, + {&influxql.FloatPoint{Name: "cpu", Time: 9 * Second, Value: -17}}, + }, + }, + { + Name: "lhs binary subtract integer", + Statement: `SELECT 2 - value FROM cpu`, + Points: [][]influxql.Point{ + {&influxql.FloatPoint{Name: "cpu", Time: 0 * Second, Value: -18}}, + {&influxql.FloatPoint{Name: "cpu", Time: 5 * Second, Value: -8}}, + {&influxql.FloatPoint{Name: "cpu", Time: 9 * Second, Value: -17}}, + }, + }, + { + Name: "two variable binary subtract", + Statement: `SELECT value - value FROM cpu`, + Points: [][]influxql.Point{ + {&influxql.FloatPoint{Name: "cpu", Time: 0 * Second, Value: 0}}, + {&influxql.FloatPoint{Name: "cpu", Time: 5 * Second, Value: 0}}, + {&influxql.FloatPoint{Name: "cpu", Time: 9 * Second, Value: 0}}, + }, + }, + { + Name: "rhs binary division number", + Statement: `SELECT value / 2.0 FROM cpu`, + Points: [][]influxql.Point{ + {&influxql.FloatPoint{Name: "cpu", Time: 0 * Second, Value: 10}}, + {&influxql.FloatPoint{Name: "cpu", Time: 5 * Second, Value: 5}}, + {&influxql.FloatPoint{Name: "cpu", Time: 9 * Second, Value: float64(19) / 2}}, + }, + }, + { + Name: "rhs binary division integer", + Statement: `SELECT value / 2 FROM cpu`, + Points: [][]influxql.Point{ + {&influxql.FloatPoint{Name: "cpu", Time: 0 * Second, Value: 10}}, + {&influxql.FloatPoint{Name: "cpu", Time: 5 * Second, Value: 5}}, + {&influxql.FloatPoint{Name: "cpu", Time: 9 * Second, Value: float64(19) / 2}}, + }, + }, + { + Name: "lhs binary division number", + Statement: `SELECT 38.0 / value FROM cpu`, + Points: [][]influxql.Point{ + {&influxql.FloatPoint{Name: "cpu", Time: 0 * Second, Value: 1.9}}, + {&influxql.FloatPoint{Name: "cpu", Time: 5 * Second, Value: 3.8}}, + {&influxql.FloatPoint{Name: "cpu", Time: 9 * Second, Value: 2}}, + }, + }, + { + Name: "lhs binary division integer", + Statement: `SELECT 38 / value FROM cpu`, + Points: [][]influxql.Point{ + {&influxql.FloatPoint{Name: "cpu", Time: 0 * Second, Value: 1.9}}, + {&influxql.FloatPoint{Name: "cpu", Time: 5 * Second, Value: 3.8}}, + {&influxql.FloatPoint{Name: "cpu", Time: 9 * Second, Value: 2}}, + }, + }, + { + Name: "two variable binary division", + Statement: `SELECT value / value FROM cpu`, + Points: [][]influxql.Point{ + {&influxql.FloatPoint{Name: "cpu", Time: 0 * Second, Value: 1}}, + {&influxql.FloatPoint{Name: "cpu", Time: 5 * Second, Value: 1}}, + {&influxql.FloatPoint{Name: "cpu", Time: 9 * Second, Value: 1}}, + }, + }, + } { + stmt, err := MustParseSelectStatement(test.Statement).RewriteFields(&ic) + if err != nil { + t.Errorf("%s: rewrite error: %s", test.Name, err) + } + + itrs, err := influxql.Select(stmt, &ic, nil) + if err != nil { + t.Errorf("%s: parse error: %s", test.Name, err) + } else if a, err := Iterators(itrs).ReadAll(); err != nil { + t.Fatalf("%s: unexpected error: %s", test.Name, err) + } else if !deep.Equal(a, test.Points) { + t.Errorf("%s: unexpected points: %s", test.Name, spew.Sdump(a)) + } + } +} + +// Ensure a SELECT binary expr queries can be executed as integers. +func TestSelect_BinaryExpr_Integer(t *testing.T) { + var ic IteratorCreator + ic.CreateIteratorFn = func(opt influxql.IteratorOptions) (influxql.Iterator, error) { + makeAuxFields := func(value int64) []interface{} { + aux := make([]interface{}, len(opt.Aux)) + for i := range aux { + aux[i] = value + } + return aux + } + return &IntegerIterator{Points: []influxql.IntegerPoint{ + {Name: "cpu", Time: 0 * Second, Value: 20, Aux: makeAuxFields(20)}, + {Name: "cpu", Time: 5 * Second, Value: 10, Aux: makeAuxFields(10)}, + {Name: "cpu", Time: 9 * Second, Value: 19, Aux: makeAuxFields(19)}, + }}, nil + } + ic.FieldDimensionsFn = func(sources influxql.Sources) (map[string]influxql.DataType, map[string]struct{}, error) { + return map[string]influxql.DataType{"value": influxql.Integer}, nil, nil + } + + for _, test := range []struct { + Name string + Statement string + Points [][]influxql.Point + }{ + { + Name: "rhs binary add number", + Statement: `SELECT value + 2.0 FROM cpu`, + Points: [][]influxql.Point{ + {&influxql.FloatPoint{Name: "cpu", Time: 0 * Second, Value: 22}}, + {&influxql.FloatPoint{Name: "cpu", Time: 5 * Second, Value: 12}}, + {&influxql.FloatPoint{Name: "cpu", Time: 9 * Second, Value: 21}}, + }, + }, + { + Name: "rhs binary add integer", + Statement: `SELECT value + 2 FROM cpu`, + Points: [][]influxql.Point{ + {&influxql.IntegerPoint{Name: "cpu", Time: 0 * Second, Value: 22}}, + {&influxql.IntegerPoint{Name: "cpu", Time: 5 * Second, Value: 12}}, + {&influxql.IntegerPoint{Name: "cpu", Time: 9 * Second, Value: 21}}, + }, + }, + { + Name: "lhs binary add number", + Statement: `SELECT 2.0 + value FROM cpu`, + Points: [][]influxql.Point{ + {&influxql.FloatPoint{Name: "cpu", Time: 0 * Second, Value: 22}}, + {&influxql.FloatPoint{Name: "cpu", Time: 5 * Second, Value: 12}}, + {&influxql.FloatPoint{Name: "cpu", Time: 9 * Second, Value: 21}}, + }, + }, + { + Name: "lhs binary add integer", + Statement: `SELECT 2 + value FROM cpu`, + Points: [][]influxql.Point{ + {&influxql.IntegerPoint{Name: "cpu", Time: 0 * Second, Value: 22}}, + {&influxql.IntegerPoint{Name: "cpu", Time: 5 * Second, Value: 12}}, + {&influxql.IntegerPoint{Name: "cpu", Time: 9 * Second, Value: 21}}, + }, + }, + { + Name: "two variable binary add", + Statement: `SELECT value + value FROM cpu`, + Points: [][]influxql.Point{ + {&influxql.IntegerPoint{Name: "cpu", Time: 0 * Second, Value: 40}}, + {&influxql.IntegerPoint{Name: "cpu", Time: 5 * Second, Value: 20}}, + {&influxql.IntegerPoint{Name: "cpu", Time: 9 * Second, Value: 38}}, + }, + }, + { + Name: "rhs binary multiply number", + Statement: `SELECT value * 2.0 FROM cpu`, + Points: [][]influxql.Point{ + {&influxql.FloatPoint{Name: "cpu", Time: 0 * Second, Value: 40}}, + {&influxql.FloatPoint{Name: "cpu", Time: 5 * Second, Value: 20}}, + {&influxql.FloatPoint{Name: "cpu", Time: 9 * Second, Value: 38}}, + }, + }, + { + Name: "rhs binary multiply integer", + Statement: `SELECT value * 2 FROM cpu`, + Points: [][]influxql.Point{ + {&influxql.IntegerPoint{Name: "cpu", Time: 0 * Second, Value: 40}}, + {&influxql.IntegerPoint{Name: "cpu", Time: 5 * Second, Value: 20}}, + {&influxql.IntegerPoint{Name: "cpu", Time: 9 * Second, Value: 38}}, + }, + }, + { + Name: "lhs binary multiply number", + Statement: `SELECT 2.0 * value FROM cpu`, + Points: [][]influxql.Point{ + {&influxql.FloatPoint{Name: "cpu", Time: 0 * Second, Value: 40}}, + {&influxql.FloatPoint{Name: "cpu", Time: 5 * Second, Value: 20}}, + {&influxql.FloatPoint{Name: "cpu", Time: 9 * Second, Value: 38}}, + }, + }, + { + Name: "lhs binary multiply integer", + Statement: `SELECT 2 * value FROM cpu`, + Points: [][]influxql.Point{ + {&influxql.IntegerPoint{Name: "cpu", Time: 0 * Second, Value: 40}}, + {&influxql.IntegerPoint{Name: "cpu", Time: 5 * Second, Value: 20}}, + {&influxql.IntegerPoint{Name: "cpu", Time: 9 * Second, Value: 38}}, + }, + }, + { + Name: "two variable binary multiply", + Statement: `SELECT value * value FROM cpu`, + Points: [][]influxql.Point{ + {&influxql.IntegerPoint{Name: "cpu", Time: 0 * Second, Value: 400}}, + {&influxql.IntegerPoint{Name: "cpu", Time: 5 * Second, Value: 100}}, + {&influxql.IntegerPoint{Name: "cpu", Time: 9 * Second, Value: 361}}, + }, + }, + { + Name: "rhs binary subtract number", + Statement: `SELECT value - 2.0 FROM cpu`, + Points: [][]influxql.Point{ + {&influxql.FloatPoint{Name: "cpu", Time: 0 * Second, Value: 18}}, + {&influxql.FloatPoint{Name: "cpu", Time: 5 * Second, Value: 8}}, + {&influxql.FloatPoint{Name: "cpu", Time: 9 * Second, Value: 17}}, + }, + }, + { + Name: "rhs binary subtract integer", + Statement: `SELECT value - 2 FROM cpu`, + Points: [][]influxql.Point{ + {&influxql.IntegerPoint{Name: "cpu", Time: 0 * Second, Value: 18}}, + {&influxql.IntegerPoint{Name: "cpu", Time: 5 * Second, Value: 8}}, + {&influxql.IntegerPoint{Name: "cpu", Time: 9 * Second, Value: 17}}, + }, + }, + { + Name: "lhs binary subtract number", + Statement: `SELECT 2.0 - value FROM cpu`, + Points: [][]influxql.Point{ + {&influxql.FloatPoint{Name: "cpu", Time: 0 * Second, Value: -18}}, + {&influxql.FloatPoint{Name: "cpu", Time: 5 * Second, Value: -8}}, + {&influxql.FloatPoint{Name: "cpu", Time: 9 * Second, Value: -17}}, + }, + }, + { + Name: "lhs binary subtract integer", + Statement: `SELECT 2 - value FROM cpu`, + Points: [][]influxql.Point{ + {&influxql.IntegerPoint{Name: "cpu", Time: 0 * Second, Value: -18}}, + {&influxql.IntegerPoint{Name: "cpu", Time: 5 * Second, Value: -8}}, + {&influxql.IntegerPoint{Name: "cpu", Time: 9 * Second, Value: -17}}, + }, + }, + { + Name: "two variable binary subtract", + Statement: `SELECT value - value FROM cpu`, + Points: [][]influxql.Point{ + {&influxql.IntegerPoint{Name: "cpu", Time: 0 * Second, Value: 0}}, + {&influxql.IntegerPoint{Name: "cpu", Time: 5 * Second, Value: 0}}, + {&influxql.IntegerPoint{Name: "cpu", Time: 9 * Second, Value: 0}}, + }, + }, + { + Name: "rhs binary division number", + Statement: `SELECT value / 2.0 FROM cpu`, + Points: [][]influxql.Point{ + {&influxql.FloatPoint{Name: "cpu", Time: 0 * Second, Value: 10}}, + {&influxql.FloatPoint{Name: "cpu", Time: 5 * Second, Value: 5}}, + {&influxql.FloatPoint{Name: "cpu", Time: 9 * Second, Value: 9.5}}, + }, + }, + { + Name: "rhs binary division integer", + Statement: `SELECT value / 2 FROM cpu`, + Points: [][]influxql.Point{ + {&influxql.FloatPoint{Name: "cpu", Time: 0 * Second, Value: 10}}, + {&influxql.FloatPoint{Name: "cpu", Time: 5 * Second, Value: 5}}, + {&influxql.FloatPoint{Name: "cpu", Time: 9 * Second, Value: float64(19) / 2}}, + }, + }, + { + Name: "lhs binary division number", + Statement: `SELECT 38.0 / value FROM cpu`, + Points: [][]influxql.Point{ + {&influxql.FloatPoint{Name: "cpu", Time: 0 * Second, Value: 1.9}}, + {&influxql.FloatPoint{Name: "cpu", Time: 5 * Second, Value: 3.8}}, + {&influxql.FloatPoint{Name: "cpu", Time: 9 * Second, Value: 2.0}}, + }, + }, + { + Name: "lhs binary division integer", + Statement: `SELECT 38 / value FROM cpu`, + Points: [][]influxql.Point{ + {&influxql.FloatPoint{Name: "cpu", Time: 0 * Second, Value: 1.9}}, + {&influxql.FloatPoint{Name: "cpu", Time: 5 * Second, Value: 3.8}}, + {&influxql.FloatPoint{Name: "cpu", Time: 9 * Second, Value: 2}}, + }, + }, + { + Name: "two variable binary division", + Statement: `SELECT value / value FROM cpu`, + Points: [][]influxql.Point{ + {&influxql.FloatPoint{Name: "cpu", Time: 0 * Second, Value: 1}}, + {&influxql.FloatPoint{Name: "cpu", Time: 5 * Second, Value: 1}}, + {&influxql.FloatPoint{Name: "cpu", Time: 9 * Second, Value: 1}}, + }, + }, + } { + stmt, err := MustParseSelectStatement(test.Statement).RewriteFields(&ic) + if err != nil { + t.Errorf("%s: rewrite error: %s", test.Name, err) + } + + itrs, err := influxql.Select(stmt, &ic, nil) + if err != nil { + t.Errorf("%s: parse error: %s", test.Name, err) + } else if a, err := Iterators(itrs).ReadAll(); err != nil { + t.Fatalf("%s: unexpected error: %s", test.Name, err) + } else if !deep.Equal(a, test.Points) { + t.Errorf("%s: unexpected points: %s", test.Name, spew.Sdump(a)) + } + } +} + +// Ensure a SELECT binary expr queries can be executed on mixed iterators. +func TestSelect_BinaryExpr_Mixed(t *testing.T) { + var ic IteratorCreator + ic.CreateIteratorFn = func(opt influxql.IteratorOptions) (influxql.Iterator, error) { + return &IntegerIterator{Points: []influxql.IntegerPoint{ + {Name: "cpu", Time: 0 * Second, Value: 20, Aux: []interface{}{float64(20), int64(10)}}, + {Name: "cpu", Time: 5 * Second, Value: 10, Aux: []interface{}{float64(10), int64(15)}}, + {Name: "cpu", Time: 9 * Second, Value: 19, Aux: []interface{}{float64(19), int64(5)}}, + }}, nil + } + ic.FieldDimensionsFn = func(sources influxql.Sources) (map[string]influxql.DataType, map[string]struct{}, error) { + return map[string]influxql.DataType{ + "total": influxql.Float, + "value": influxql.Integer, + }, nil, nil + } + + for _, test := range []struct { + Name string + Statement string + Points [][]influxql.Point + }{ + { + Name: "mixed binary add", + Statement: `SELECT total + value FROM cpu`, + Points: [][]influxql.Point{ + {&influxql.FloatPoint{Name: "cpu", Time: 0 * Second, Value: 30}}, + {&influxql.FloatPoint{Name: "cpu", Time: 5 * Second, Value: 25}}, + {&influxql.FloatPoint{Name: "cpu", Time: 9 * Second, Value: 24}}, + }, + }, + { + Name: "mixed binary subtract", + Statement: `SELECT total - value FROM cpu`, + Points: [][]influxql.Point{ + {&influxql.FloatPoint{Name: "cpu", Time: 0 * Second, Value: 10}}, + {&influxql.FloatPoint{Name: "cpu", Time: 5 * Second, Value: -5}}, + {&influxql.FloatPoint{Name: "cpu", Time: 9 * Second, Value: 14}}, + }, + }, + { + Name: "mixed binary multiply", + Statement: `SELECT total * value FROM cpu`, + Points: [][]influxql.Point{ + {&influxql.FloatPoint{Name: "cpu", Time: 0 * Second, Value: 200}}, + {&influxql.FloatPoint{Name: "cpu", Time: 5 * Second, Value: 150}}, + {&influxql.FloatPoint{Name: "cpu", Time: 9 * Second, Value: 95}}, + }, + }, + { + Name: "mixed binary division", + Statement: `SELECT total / value FROM cpu`, + Points: [][]influxql.Point{ + {&influxql.FloatPoint{Name: "cpu", Time: 0 * Second, Value: 2}}, + {&influxql.FloatPoint{Name: "cpu", Time: 5 * Second, Value: float64(10) / float64(15)}}, + {&influxql.FloatPoint{Name: "cpu", Time: 9 * Second, Value: float64(19) / float64(5)}}, + }, + }, + } { + stmt, err := MustParseSelectStatement(test.Statement).RewriteFields(&ic) + if err != nil { + t.Errorf("%s: rewrite error: %s", test.Name, err) + } + + itrs, err := influxql.Select(stmt, &ic, nil) + if err != nil { + t.Errorf("%s: parse error: %s", test.Name, err) + } else if a, err := Iterators(itrs).ReadAll(); err != nil { + t.Fatalf("%s: unexpected error: %s", test.Name, err) + } else if !deep.Equal(a, test.Points) { + t.Errorf("%s: unexpected points: %s", test.Name, spew.Sdump(a)) + } + } +} + +// Ensure a SELECT binary expr with nil values can be executed. +// Nil values may be present when a field is missing from one iterator, +// but not the other. +func TestSelect_BinaryExpr_NilValues(t *testing.T) { + var ic IteratorCreator + ic.CreateIteratorFn = func(opt influxql.IteratorOptions) (influxql.Iterator, error) { + return &FloatIterator{Points: []influxql.FloatPoint{ + {Name: "cpu", Time: 0 * Second, Value: 20, Aux: []interface{}{float64(20), nil}}, + {Name: "cpu", Time: 5 * Second, Value: 10, Aux: []interface{}{float64(10), float64(15)}}, + {Name: "cpu", Time: 9 * Second, Value: 19, Aux: []interface{}{nil, float64(5)}}, + }}, nil + } + ic.FieldDimensionsFn = func(sources influxql.Sources) (map[string]influxql.DataType, map[string]struct{}, error) { + return map[string]influxql.DataType{ + "total": influxql.Float, + "value": influxql.Float, + }, nil, nil + } + + for _, test := range []struct { + Name string + Statement string + Points [][]influxql.Point + }{ + { + Name: "nil binary add", + Statement: `SELECT total + value FROM cpu`, + Points: [][]influxql.Point{ + {&influxql.FloatPoint{Name: "cpu", Time: 0 * Second, Nil: true}}, + {&influxql.FloatPoint{Name: "cpu", Time: 5 * Second, Value: 25}}, + {&influxql.FloatPoint{Name: "cpu", Time: 9 * Second, Nil: true}}, + }, + }, + { + Name: "nil binary subtract", + Statement: `SELECT total - value FROM cpu`, + Points: [][]influxql.Point{ + {&influxql.FloatPoint{Name: "cpu", Time: 0 * Second, Nil: true}}, + {&influxql.FloatPoint{Name: "cpu", Time: 5 * Second, Value: -5}}, + {&influxql.FloatPoint{Name: "cpu", Time: 9 * Second, Nil: true}}, + }, + }, + { + Name: "nil binary multiply", + Statement: `SELECT total * value FROM cpu`, + Points: [][]influxql.Point{ + {&influxql.FloatPoint{Name: "cpu", Time: 0 * Second, Nil: true}}, + {&influxql.FloatPoint{Name: "cpu", Time: 5 * Second, Value: 150}}, + {&influxql.FloatPoint{Name: "cpu", Time: 9 * Second, Nil: true}}, + }, + }, + { + Name: "nil binary division", + Statement: `SELECT total / value FROM cpu`, + Points: [][]influxql.Point{ + {&influxql.FloatPoint{Name: "cpu", Time: 0 * Second, Nil: true}}, + {&influxql.FloatPoint{Name: "cpu", Time: 5 * Second, Value: float64(10) / float64(15)}}, + {&influxql.FloatPoint{Name: "cpu", Time: 9 * Second, Nil: true}}, + }, + }, + } { + stmt, err := MustParseSelectStatement(test.Statement).RewriteFields(&ic) + if err != nil { + t.Errorf("%s: rewrite error: %s", test.Name, err) + } + + itrs, err := influxql.Select(stmt, &ic, nil) + if err != nil { + t.Errorf("%s: parse error: %s", test.Name, err) + } else if a, err := Iterators(itrs).ReadAll(); err != nil { + t.Fatalf("%s: unexpected error: %s", test.Name, err) + } else if !deep.Equal(a, test.Points) { + t.Errorf("%s: unexpected points: %s", test.Name, spew.Sdump(a)) + } + } +} + +// Ensure a SELECT (...) query can be executed. +func TestSelect_ParenExpr(t *testing.T) { + var ic IteratorCreator + ic.CreateIteratorFn = func(opt influxql.IteratorOptions) (influxql.Iterator, error) { + if !reflect.DeepEqual(opt.Expr, MustParseExpr(`min(value)`)) { + t.Fatalf("unexpected expr: %s", spew.Sdump(opt.Expr)) + } + + return influxql.NewCallIterator(&FloatIterator{Points: []influxql.FloatPoint{ + {Name: "cpu", Tags: ParseTags("region=west,host=A"), Time: 0 * Second, Value: 20}, + {Name: "cpu", Tags: ParseTags("region=west,host=B"), Time: 5 * Second, Value: 10}, + {Name: "cpu", Tags: ParseTags("region=east,host=A"), Time: 9 * Second, Value: 19}, + {Name: "cpu", Tags: ParseTags("region=east,host=A"), Time: 10 * Second, Value: 2}, + {Name: "cpu", Tags: ParseTags("region=west,host=A"), Time: 11 * Second, Value: 3}, + {Name: "cpu", Tags: ParseTags("region=west,host=A"), Time: 31 * Second, Value: 100}, + }}, opt) + } + + // Execute selection. + itrs, err := influxql.Select(MustParseSelectStatement(`SELECT (min(value)) FROM cpu WHERE time >= '1970-01-01T00:00:00Z' AND time < '1970-01-02T00:00:00Z' GROUP BY time(10s), host fill(none)`), &ic, nil) + if err != nil { + t.Fatal(err) + } else if a, err := Iterators(itrs).ReadAll(); err != nil { + t.Fatalf("unexpected error: %s", err) + } else if !deep.Equal(a, [][]influxql.Point{ + {&influxql.FloatPoint{Name: "cpu", Tags: ParseTags("host=A"), Time: 0 * Second, Value: 19, Aggregated: 2}}, + {&influxql.FloatPoint{Name: "cpu", Tags: ParseTags("host=B"), Time: 0 * Second, Value: 10, Aggregated: 1}}, + {&influxql.FloatPoint{Name: "cpu", Tags: ParseTags("host=A"), Time: 10 * Second, Value: 2, Aggregated: 2}}, + {&influxql.FloatPoint{Name: "cpu", Tags: ParseTags("host=A"), Time: 30 * Second, Value: 100, Aggregated: 1}}, + }) { + t.Fatalf("unexpected points: %s", spew.Sdump(a)) + } + + ic.CreateIteratorFn = func(opt influxql.IteratorOptions) (influxql.Iterator, error) { + return &FloatIterator{Points: []influxql.FloatPoint{ + {Name: "cpu", Tags: ParseTags("region=west,host=A"), Time: 0 * Second, Value: 20}, + {Name: "cpu", Tags: ParseTags("region=west,host=A"), Time: 1 * Second, Value: 19}, + {Name: "cpu", Tags: ParseTags("region=west,host=B"), Time: 5 * Second, Value: 10}, + {Name: "cpu", Tags: ParseTags("region=east,host=A"), Time: 9 * Second, Value: 19}, + {Name: "cpu", Tags: ParseTags("region=east,host=A"), Time: 10 * Second, Value: 2}, + {Name: "cpu", Tags: ParseTags("region=east,host=A"), Time: 11 * Second, Value: 2}, + {Name: "cpu", Tags: ParseTags("region=east,host=A"), Time: 12 * Second, Value: 2}, + }}, nil + } + + // Execute selection. + itrs, err = influxql.Select(MustParseSelectStatement(`SELECT (distinct(value)) FROM cpu WHERE time >= '1970-01-01T00:00:00Z' AND time < '1970-01-02T00:00:00Z' GROUP BY time(10s), host fill(none)`), &ic, nil) + if err != nil { + t.Fatal(err) + } else if a, err := Iterators(itrs).ReadAll(); err != nil { + t.Fatalf("unexpected error: %s", err) + } else if !deep.Equal(a, [][]influxql.Point{ + {&influxql.FloatPoint{Name: "cpu", Tags: ParseTags("host=A"), Time: 0 * Second, Value: 20}}, + {&influxql.FloatPoint{Name: "cpu", Tags: ParseTags("host=A"), Time: 0 * Second, Value: 19}}, + {&influxql.FloatPoint{Name: "cpu", Tags: ParseTags("host=B"), Time: 0 * Second, Value: 10}}, + {&influxql.FloatPoint{Name: "cpu", Tags: ParseTags("host=A"), Time: 10 * Second, Value: 2}}, + }) { + t.Fatalf("unexpected points: %s", spew.Sdump(a)) + } +} + +func TestSelect_Derivative_Float(t *testing.T) { + var ic IteratorCreator + ic.CreateIteratorFn = func(opt influxql.IteratorOptions) (influxql.Iterator, error) { + return &FloatIterator{Points: []influxql.FloatPoint{ + {Name: "cpu", Time: 0 * Second, Value: 20}, + {Name: "cpu", Time: 4 * Second, Value: 10}, + {Name: "cpu", Time: 8 * Second, Value: 19}, + {Name: "cpu", Time: 12 * Second, Value: 3}, + }}, nil + } + + // Execute selection. + itrs, err := influxql.Select(MustParseSelectStatement(`SELECT derivative(value, 1s) FROM cpu WHERE time >= '1970-01-01T00:00:00Z' AND time < '1970-01-01T00:00:16Z'`), &ic, nil) + if err != nil { + t.Fatal(err) + } else if a, err := Iterators(itrs).ReadAll(); err != nil { + t.Fatalf("unexpected error: %s", err) + } else if !deep.Equal(a, [][]influxql.Point{ + {&influxql.FloatPoint{Name: "cpu", Time: 4 * Second, Value: -2.5}}, + {&influxql.FloatPoint{Name: "cpu", Time: 8 * Second, Value: 2.25}}, + {&influxql.FloatPoint{Name: "cpu", Time: 12 * Second, Value: -4}}, + }) { + t.Fatalf("unexpected points: %s", spew.Sdump(a)) + } +} + +func TestSelect_Derivative_Integer(t *testing.T) { + var ic IteratorCreator + ic.CreateIteratorFn = func(opt influxql.IteratorOptions) (influxql.Iterator, error) { + return &IntegerIterator{Points: []influxql.IntegerPoint{ + {Name: "cpu", Time: 0 * Second, Value: 20}, + {Name: "cpu", Time: 4 * Second, Value: 10}, + {Name: "cpu", Time: 8 * Second, Value: 19}, + {Name: "cpu", Time: 12 * Second, Value: 3}, + }}, nil + } + + // Execute selection. + itrs, err := influxql.Select(MustParseSelectStatement(`SELECT derivative(value, 1s) FROM cpu WHERE time >= '1970-01-01T00:00:00Z' AND time < '1970-01-01T00:00:16Z'`), &ic, nil) + if err != nil { + t.Fatal(err) + } else if a, err := Iterators(itrs).ReadAll(); err != nil { + t.Fatalf("unexpected error: %s", err) + } else if !deep.Equal(a, [][]influxql.Point{ + {&influxql.FloatPoint{Name: "cpu", Time: 4 * Second, Value: -2.5}}, + {&influxql.FloatPoint{Name: "cpu", Time: 8 * Second, Value: 2.25}}, + {&influxql.FloatPoint{Name: "cpu", Time: 12 * Second, Value: -4}}, + }) { + t.Fatalf("unexpected points: %s", spew.Sdump(a)) + } +} + +func TestSelect_Derivative_Desc_Float(t *testing.T) { + var ic IteratorCreator + ic.CreateIteratorFn = func(opt influxql.IteratorOptions) (influxql.Iterator, error) { + return &FloatIterator{Points: []influxql.FloatPoint{ + {Name: "cpu", Time: 12 * Second, Value: 3}, + {Name: "cpu", Time: 8 * Second, Value: 19}, + {Name: "cpu", Time: 4 * Second, Value: 10}, + {Name: "cpu", Time: 0 * Second, Value: 20}, + }}, nil + } + + // Execute selection. + itrs, err := influxql.Select(MustParseSelectStatement(`SELECT derivative(value, 1s) FROM cpu WHERE time >= '1970-01-01T00:00:00Z' AND time < '1970-01-01T00:00:16Z' ORDER BY desc`), &ic, nil) + if err != nil { + t.Fatal(err) + } else if a, err := Iterators(itrs).ReadAll(); err != nil { + t.Errorf("unexpected error: %s", err) + } else if !deep.Equal(a, [][]influxql.Point{ + {&influxql.FloatPoint{Name: "cpu", Time: 8 * Second, Value: 4}}, + {&influxql.FloatPoint{Name: "cpu", Time: 4 * Second, Value: -2.25}}, + {&influxql.FloatPoint{Name: "cpu", Time: 0 * Second, Value: 2.5}}, + }) { + t.Fatalf("unexpected points: %s", spew.Sdump(a)) + } +} + +func TestSelect_Derivative_Desc_Integer(t *testing.T) { + var ic IteratorCreator + ic.CreateIteratorFn = func(opt influxql.IteratorOptions) (influxql.Iterator, error) { + return &IntegerIterator{Points: []influxql.IntegerPoint{ + {Name: "cpu", Time: 12 * Second, Value: 3}, + {Name: "cpu", Time: 8 * Second, Value: 19}, + {Name: "cpu", Time: 4 * Second, Value: 10}, + {Name: "cpu", Time: 0 * Second, Value: 20}, + }}, nil + } + + // Execute selection. + itrs, err := influxql.Select(MustParseSelectStatement(`SELECT derivative(value, 1s) FROM cpu WHERE time >= '1970-01-01T00:00:00Z' AND time < '1970-01-01T00:00:16Z' ORDER BY desc`), &ic, nil) + if err != nil { + t.Fatal(err) + } else if a, err := Iterators(itrs).ReadAll(); err != nil { + t.Errorf("unexpected error: %s", err) + } else if !deep.Equal(a, [][]influxql.Point{ + {&influxql.FloatPoint{Name: "cpu", Time: 8 * Second, Value: 4}}, + {&influxql.FloatPoint{Name: "cpu", Time: 4 * Second, Value: -2.25}}, + {&influxql.FloatPoint{Name: "cpu", Time: 0 * Second, Value: 2.5}}, + }) { + t.Fatalf("unexpected points: %s", spew.Sdump(a)) + } +} + +func TestSelect_Difference_Float(t *testing.T) { + var ic IteratorCreator + ic.CreateIteratorFn = func(opt influxql.IteratorOptions) (influxql.Iterator, error) { + return &FloatIterator{Points: []influxql.FloatPoint{ + {Name: "cpu", Time: 0 * Second, Value: 20}, + {Name: "cpu", Time: 4 * Second, Value: 10}, + {Name: "cpu", Time: 8 * Second, Value: 19}, + {Name: "cpu", Time: 12 * Second, Value: 3}, + }}, nil + } + + // Execute selection. + itrs, err := influxql.Select(MustParseSelectStatement(`SELECT difference(value) FROM cpu WHERE time >= '1970-01-01T00:00:00Z' AND time < '1970-01-01T00:00:16Z'`), &ic, nil) + if err != nil { + t.Fatal(err) + } else if a, err := Iterators(itrs).ReadAll(); err != nil { + t.Fatalf("unexpected error: %s", err) + } else if !deep.Equal(a, [][]influxql.Point{ + {&influxql.FloatPoint{Name: "cpu", Time: 4 * Second, Value: -10}}, + {&influxql.FloatPoint{Name: "cpu", Time: 8 * Second, Value: 9}}, + {&influxql.FloatPoint{Name: "cpu", Time: 12 * Second, Value: -16}}, + }) { + t.Fatalf("unexpected points: %s", spew.Sdump(a)) + } +} + +func TestSelect_Difference_Integer(t *testing.T) { + var ic IteratorCreator + ic.CreateIteratorFn = func(opt influxql.IteratorOptions) (influxql.Iterator, error) { + return &IntegerIterator{Points: []influxql.IntegerPoint{ + {Name: "cpu", Time: 0 * Second, Value: 20}, + {Name: "cpu", Time: 4 * Second, Value: 10}, + {Name: "cpu", Time: 8 * Second, Value: 19}, + {Name: "cpu", Time: 12 * Second, Value: 3}, + }}, nil + } + + // Execute selection. + itrs, err := influxql.Select(MustParseSelectStatement(`SELECT difference(value) FROM cpu WHERE time >= '1970-01-01T00:00:00Z' AND time < '1970-01-01T00:00:16Z'`), &ic, nil) + if err != nil { + t.Fatal(err) + } else if a, err := Iterators(itrs).ReadAll(); err != nil { + t.Fatalf("unexpected error: %s", err) + } else if !deep.Equal(a, [][]influxql.Point{ + {&influxql.IntegerPoint{Name: "cpu", Time: 4 * Second, Value: -10}}, + {&influxql.IntegerPoint{Name: "cpu", Time: 8 * Second, Value: 9}}, + {&influxql.IntegerPoint{Name: "cpu", Time: 12 * Second, Value: -16}}, + }) { + t.Fatalf("unexpected points: %s", spew.Sdump(a)) + } +} + +func TestSelect_Elapsed_Float(t *testing.T) { + var ic IteratorCreator + ic.CreateIteratorFn = func(opt influxql.IteratorOptions) (influxql.Iterator, error) { + return &FloatIterator{Points: []influxql.FloatPoint{ + {Name: "cpu", Time: 0 * Second, Value: 20}, + {Name: "cpu", Time: 4 * Second, Value: 10}, + {Name: "cpu", Time: 8 * Second, Value: 19}, + {Name: "cpu", Time: 11 * Second, Value: 3}, + }}, nil + } + + // Execute selection. + itrs, err := influxql.Select(MustParseSelectStatement(`SELECT elapsed(value, 1s) FROM cpu WHERE time >= '1970-01-01T00:00:00Z' AND time < '1970-01-01T00:00:16Z'`), &ic, nil) + if err != nil { + t.Fatal(err) + } else if a, err := Iterators(itrs).ReadAll(); err != nil { + t.Fatalf("unexpected error: %s", err) + } else if !deep.Equal(a, [][]influxql.Point{ + {&influxql.IntegerPoint{Name: "cpu", Time: 4 * Second, Value: 4}}, + {&influxql.IntegerPoint{Name: "cpu", Time: 8 * Second, Value: 4}}, + {&influxql.IntegerPoint{Name: "cpu", Time: 11 * Second, Value: 3}}, + }) { + t.Fatalf("unexpected points: %s", spew.Sdump(a)) + } +} + +func TestSelect_Elapsed_Integer(t *testing.T) { + var ic IteratorCreator + ic.CreateIteratorFn = func(opt influxql.IteratorOptions) (influxql.Iterator, error) { + return &IntegerIterator{Points: []influxql.IntegerPoint{ + {Name: "cpu", Time: 0 * Second, Value: 20}, + {Name: "cpu", Time: 4 * Second, Value: 10}, + {Name: "cpu", Time: 8 * Second, Value: 19}, + {Name: "cpu", Time: 11 * Second, Value: 3}, + }}, nil + } + + // Execute selection. + itrs, err := influxql.Select(MustParseSelectStatement(`SELECT elapsed(value, 1s) FROM cpu WHERE time >= '1970-01-01T00:00:00Z' AND time < '1970-01-01T00:00:16Z'`), &ic, nil) + if err != nil { + t.Fatal(err) + } else if a, err := Iterators(itrs).ReadAll(); err != nil { + t.Fatalf("unexpected error: %s", err) + } else if !deep.Equal(a, [][]influxql.Point{ + {&influxql.IntegerPoint{Name: "cpu", Time: 4 * Second, Value: 4}}, + {&influxql.IntegerPoint{Name: "cpu", Time: 8 * Second, Value: 4}}, + {&influxql.IntegerPoint{Name: "cpu", Time: 11 * Second, Value: 3}}, + }) { + t.Fatalf("unexpected points: %s", spew.Sdump(a)) + } +} + +func TestSelect_Elapsed_String(t *testing.T) { + var ic IteratorCreator + ic.CreateIteratorFn = func(opt influxql.IteratorOptions) (influxql.Iterator, error) { + return &StringIterator{Points: []influxql.StringPoint{ + {Name: "cpu", Time: 0 * Second, Value: "a"}, + {Name: "cpu", Time: 4 * Second, Value: "b"}, + {Name: "cpu", Time: 8 * Second, Value: "c"}, + {Name: "cpu", Time: 11 * Second, Value: "d"}, + }}, nil + } + + // Execute selection. + itrs, err := influxql.Select(MustParseSelectStatement(`SELECT elapsed(value, 1s) FROM cpu WHERE time >= '1970-01-01T00:00:00Z' AND time < '1970-01-01T00:00:16Z'`), &ic, nil) + if err != nil { + t.Fatal(err) + } else if a, err := Iterators(itrs).ReadAll(); err != nil { + t.Fatalf("unexpected error: %s", err) + } else if !deep.Equal(a, [][]influxql.Point{ + {&influxql.IntegerPoint{Name: "cpu", Time: 4 * Second, Value: 4}}, + {&influxql.IntegerPoint{Name: "cpu", Time: 8 * Second, Value: 4}}, + {&influxql.IntegerPoint{Name: "cpu", Time: 11 * Second, Value: 3}}, + }) { + t.Fatalf("unexpected points: %s", spew.Sdump(a)) + } +} + +func TestSelect_Elapsed_Boolean(t *testing.T) { + var ic IteratorCreator + ic.CreateIteratorFn = func(opt influxql.IteratorOptions) (influxql.Iterator, error) { + return &BooleanIterator{Points: []influxql.BooleanPoint{ + {Name: "cpu", Time: 0 * Second, Value: true}, + {Name: "cpu", Time: 4 * Second, Value: false}, + {Name: "cpu", Time: 8 * Second, Value: false}, + {Name: "cpu", Time: 11 * Second, Value: true}, + }}, nil + } + + // Execute selection. + itrs, err := influxql.Select(MustParseSelectStatement(`SELECT elapsed(value, 1s) FROM cpu WHERE time >= '1970-01-01T00:00:00Z' AND time < '1970-01-01T00:00:16Z'`), &ic, nil) + if err != nil { + t.Fatal(err) + } else if a, err := Iterators(itrs).ReadAll(); err != nil { + t.Fatalf("unexpected error: %s", err) + } else if !deep.Equal(a, [][]influxql.Point{ + {&influxql.IntegerPoint{Name: "cpu", Time: 4 * Second, Value: 4}}, + {&influxql.IntegerPoint{Name: "cpu", Time: 8 * Second, Value: 4}}, + {&influxql.IntegerPoint{Name: "cpu", Time: 11 * Second, Value: 3}}, + }) { + t.Fatalf("unexpected points: %s", spew.Sdump(a)) + } +} + +func TestSelect_MovingAverage_Float(t *testing.T) { + var ic IteratorCreator + ic.CreateIteratorFn = func(opt influxql.IteratorOptions) (influxql.Iterator, error) { + return &FloatIterator{Points: []influxql.FloatPoint{ + {Name: "cpu", Time: 0 * Second, Value: 20}, + {Name: "cpu", Time: 4 * Second, Value: 10}, + {Name: "cpu", Time: 8 * Second, Value: 19}, + {Name: "cpu", Time: 12 * Second, Value: 3}, + }}, nil + } + + // Execute selection. + itrs, err := influxql.Select(MustParseSelectStatement(`SELECT moving_average(value, 2) FROM cpu WHERE time >= '1970-01-01T00:00:00Z' AND time < '1970-01-01T00:00:16Z'`), &ic, nil) + if err != nil { + t.Fatal(err) + } else if a, err := Iterators(itrs).ReadAll(); err != nil { + t.Fatalf("unexpected error: %s", err) + } else if !deep.Equal(a, [][]influxql.Point{ + {&influxql.FloatPoint{Name: "cpu", Time: 4 * Second, Value: 15, Aggregated: 2}}, + {&influxql.FloatPoint{Name: "cpu", Time: 8 * Second, Value: 14.5, Aggregated: 2}}, + {&influxql.FloatPoint{Name: "cpu", Time: 12 * Second, Value: 11, Aggregated: 2}}, + }) { + t.Fatalf("unexpected points: %s", spew.Sdump(a)) + } +} + +func TestSelect_MovingAverage_Integer(t *testing.T) { + var ic IteratorCreator + ic.CreateIteratorFn = func(opt influxql.IteratorOptions) (influxql.Iterator, error) { + return &IntegerIterator{Points: []influxql.IntegerPoint{ + {Name: "cpu", Time: 0 * Second, Value: 20}, + {Name: "cpu", Time: 4 * Second, Value: 10}, + {Name: "cpu", Time: 8 * Second, Value: 19}, + {Name: "cpu", Time: 12 * Second, Value: 3}, + }}, nil + } + + // Execute selection. + itrs, err := influxql.Select(MustParseSelectStatement(`SELECT moving_average(value, 2) FROM cpu WHERE time >= '1970-01-01T00:00:00Z' AND time < '1970-01-01T00:00:16Z'`), &ic, nil) + if err != nil { + t.Fatal(err) + } else if a, err := Iterators(itrs).ReadAll(); err != nil { + t.Fatalf("unexpected error: %s", err) + } else if !deep.Equal(a, [][]influxql.Point{ + {&influxql.FloatPoint{Name: "cpu", Time: 4 * Second, Value: 15, Aggregated: 2}}, + {&influxql.FloatPoint{Name: "cpu", Time: 8 * Second, Value: 14.5, Aggregated: 2}}, + {&influxql.FloatPoint{Name: "cpu", Time: 12 * Second, Value: 11, Aggregated: 2}}, + }) { + t.Fatalf("unexpected points: %s", spew.Sdump(a)) + } +} + +func TestSelect_HoltWinters_GroupBy_Agg(t *testing.T) { + var ic IteratorCreator + ic.CreateIteratorFn = func(opt influxql.IteratorOptions) (influxql.Iterator, error) { + return influxql.NewCallIterator(&FloatIterator{Points: []influxql.FloatPoint{ + {Name: "cpu", Time: 10 * Second, Value: 4}, + {Name: "cpu", Time: 11 * Second, Value: 6}, + + {Name: "cpu", Time: 12 * Second, Value: 9}, + {Name: "cpu", Time: 13 * Second, Value: 11}, + + {Name: "cpu", Time: 14 * Second, Value: 5}, + {Name: "cpu", Time: 15 * Second, Value: 7}, + + {Name: "cpu", Time: 16 * Second, Value: 10}, + {Name: "cpu", Time: 17 * Second, Value: 12}, + + {Name: "cpu", Time: 18 * Second, Value: 6}, + {Name: "cpu", Time: 19 * Second, Value: 8}, + }}, opt) + } + + // Execute selection. + itrs, err := influxql.Select(MustParseSelectStatement(`SELECT holt_winters(mean(value), 2, 2) FROM cpu WHERE time >= '1970-01-01T00:00:10Z' AND time < '1970-01-01T00:00:20Z' GROUP BY time(2s)`), &ic, nil) + if err != nil { + t.Fatal(err) + } else if a, err := Iterators(itrs).ReadAll(); err != nil { + t.Fatalf("unexpected error: %s", err) + } else if !deep.Equal(a, [][]influxql.Point{ + {&influxql.FloatPoint{Name: "cpu", Time: 20 * Second, Value: 11.960623419918432}}, + {&influxql.FloatPoint{Name: "cpu", Time: 22 * Second, Value: 7.953140268154609}}, + }) { + t.Fatalf("unexpected points: %s", spew.Sdump(a)) + } +} + +func TestSelect_UnsupportedCall(t *testing.T) { + var ic IteratorCreator + ic.CreateIteratorFn = func(opt influxql.IteratorOptions) (influxql.Iterator, error) { + return &FloatIterator{}, nil + } + + _, err := influxql.Select(MustParseSelectStatement(`SELECT foobar(value) FROM cpu`), &ic, nil) + if err == nil || err.Error() != "unsupported call: foobar" { + t.Errorf("unexpected error: %s", err) + } +} + +func TestSelect_InvalidQueries(t *testing.T) { + var ic IteratorCreator + ic.CreateIteratorFn = func(opt influxql.IteratorOptions) (influxql.Iterator, error) { + return &FloatIterator{}, nil + } + + tests := []struct { + q string + err string + }{ + { + q: `SELECT foobar(value) FROM cpu`, + err: `unsupported call: foobar`, + }, + { + q: `SELECT 'value' FROM cpu`, + err: `invalid expression type: *influxql.StringLiteral`, + }, + { + q: `SELECT 'value', value FROM cpu`, + err: `invalid expression type: *influxql.StringLiteral`, + }, + } + + for i, tt := range tests { + itrs, err := influxql.Select(MustParseSelectStatement(tt.q), &ic, nil) + if err == nil || err.Error() != tt.err { + t.Errorf("%d. expected error '%s', got '%s'", i, tt.err, err) + } + influxql.Iterators(itrs).Close() + } +} + +func BenchmarkSelect_Raw_1K(b *testing.B) { benchmarkSelectRaw(b, 1000) } +func BenchmarkSelect_Raw_100K(b *testing.B) { benchmarkSelectRaw(b, 1000000) } + +func benchmarkSelectRaw(b *testing.B, pointN int) { + benchmarkSelect(b, MustParseSelectStatement(`SELECT fval FROM cpu`), NewRawBenchmarkIteratorCreator(pointN)) +} + +func benchmarkSelect(b *testing.B, stmt *influxql.SelectStatement, ic influxql.IteratorCreator) { + b.ReportAllocs() + + for i := 0; i < b.N; i++ { + itrs, err := influxql.Select(stmt, ic, nil) + if err != nil { + b.Fatal(err) + } + influxql.DrainIterators(itrs) + } +} + +// NewRawBenchmarkIteratorCreator returns a new mock iterator creator with generated fields. +func NewRawBenchmarkIteratorCreator(pointN int) *IteratorCreator { + var ic IteratorCreator + ic.CreateIteratorFn = func(opt influxql.IteratorOptions) (influxql.Iterator, error) { + if opt.Expr != nil { + panic("unexpected expression") + } + + p := influxql.FloatPoint{ + Name: "cpu", + Aux: make([]interface{}, len(opt.Aux)), + } + + for i := range opt.Aux { + switch opt.Aux[i].Val { + case "fval": + p.Aux[i] = float64(100) + default: + panic("unknown iterator expr: " + opt.Expr.String()) + } + } + + return &FloatPointGenerator{N: pointN, Fn: func(i int) *influxql.FloatPoint { + p.Time = int64(time.Duration(i) * (10 * time.Second)) + return &p + }}, nil + } + return &ic +} + +func benchmarkSelectDedupe(b *testing.B, seriesN, pointsPerSeries int) { + stmt := MustParseSelectStatement(`SELECT sval::string FROM cpu`) + stmt.Dedupe = true + + var ic IteratorCreator + ic.CreateIteratorFn = func(opt influxql.IteratorOptions) (influxql.Iterator, error) { + if opt.Expr != nil { + panic("unexpected expression") + } + + p := influxql.FloatPoint{ + Name: "tags", + Aux: []interface{}{nil}, + } + + return &FloatPointGenerator{N: seriesN * pointsPerSeries, Fn: func(i int) *influxql.FloatPoint { + p.Aux[0] = fmt.Sprintf("server%d", i%seriesN) + return &p + }}, nil + } + + b.ResetTimer() + benchmarkSelect(b, stmt, &ic) +} + +func BenchmarkSelect_Dedupe_1K(b *testing.B) { benchmarkSelectDedupe(b, 1000, 100) } diff --git a/vendor/github.com/influxdata/influxdb/influxql/statement_rewriter_test.go b/vendor/github.com/influxdata/influxdb/influxql/statement_rewriter_test.go new file mode 100644 index 000000000..7251f0ff6 --- /dev/null +++ b/vendor/github.com/influxdata/influxdb/influxql/statement_rewriter_test.go @@ -0,0 +1,133 @@ +package influxql_test + +import ( + "testing" + + "github.com/influxdata/influxdb/influxql" +) + +func TestRewriteStatement(t *testing.T) { + tests := []struct { + stmt string + s string + }{ + { + stmt: `SHOW FIELD KEYS`, + s: `SELECT fieldKey, fieldType FROM _fieldKeys`, + }, + { + stmt: `SHOW FIELD KEYS FROM cpu`, + s: `SELECT fieldKey, fieldType FROM _fieldKeys WHERE _name = 'cpu'`, + }, + { + stmt: `SHOW FIELD KEYS FROM /c.*/`, + s: `SELECT fieldKey, fieldType FROM _fieldKeys WHERE _name =~ /c.*/`, + }, + { + stmt: `SHOW FIELD KEYS FROM mydb.myrp2.cpu`, + s: `SELECT fieldKey, fieldType FROM mydb.myrp2._fieldKeys WHERE _name = 'cpu'`, + }, + { + stmt: `SHOW FIELD KEYS FROM mydb.myrp2./c.*/`, + s: `SELECT fieldKey, fieldType FROM mydb.myrp2._fieldKeys WHERE _name =~ /c.*/`, + }, + { + stmt: `SHOW MEASUREMENTS`, + s: `SELECT _name AS "name" FROM _measurements`, + }, + { + stmt: `SHOW MEASUREMENTS WITH MEASUREMENT = cpu`, + s: `SELECT _name AS "name" FROM _measurements WHERE _name = 'cpu'`, + }, + { + stmt: `SHOW MEASUREMENTS WITH MEASUREMENT =~ /c.*/`, + s: `SELECT _name AS "name" FROM _measurements WHERE _name =~ /c.*/`, + }, + { + stmt: `SHOW MEASUREMENTS WHERE region = 'uswest'`, + s: `SELECT _name AS "name" FROM _measurements WHERE region = 'uswest'`, + }, + { + stmt: `SHOW MEASUREMENTS WITH MEASUREMENT = cpu WHERE region = 'uswest'`, + s: `SELECT _name AS "name" FROM _measurements WHERE (_name = 'cpu') AND (region = 'uswest')`, + }, + { + stmt: `SHOW SERIES`, + s: `SELECT "key" FROM _series`, + }, + { + stmt: `SHOW SERIES FROM cpu`, + s: `SELECT "key" FROM _series WHERE _name = 'cpu'`, + }, + { + stmt: `SHOW SERIES FROM mydb.myrp1.cpu`, + s: `SELECT "key" FROM mydb.myrp1._series WHERE _name = 'cpu'`, + }, + { + stmt: `SHOW SERIES FROM mydb.myrp1./c.*/`, + s: `SELECT "key" FROM mydb.myrp1._series WHERE _name =~ /c.*/`, + }, + { + stmt: `SHOW TAG KEYS`, + s: `SELECT tagKey FROM _tagKeys`, + }, + { + stmt: `SHOW TAG KEYS FROM cpu`, + s: `SELECT tagKey FROM _tagKeys WHERE _name = 'cpu'`, + }, + { + stmt: `SHOW TAG KEYS FROM /c.*/`, + s: `SELECT tagKey FROM _tagKeys WHERE _name =~ /c.*/`, + }, + { + stmt: `SHOW TAG KEYS FROM cpu WHERE region = 'uswest'`, + s: `SELECT tagKey FROM _tagKeys WHERE (_name = 'cpu') AND (region = 'uswest')`, + }, + { + stmt: `SHOW TAG KEYS FROM mydb.myrp1.cpu`, + s: `SELECT tagKey FROM mydb.myrp1._tagKeys WHERE _name = 'cpu'`, + }, + { + stmt: `SHOW TAG KEYS FROM mydb.myrp1./c.*/`, + s: `SELECT tagKey FROM mydb.myrp1._tagKeys WHERE _name =~ /c.*/`, + }, + { + stmt: `SHOW TAG KEYS FROM mydb.myrp1.cpu WHERE region = 'uswest'`, + s: `SELECT tagKey FROM mydb.myrp1._tagKeys WHERE (_name = 'cpu') AND (region = 'uswest')`, + }, + { + stmt: `SHOW TAG VALUES WITH KEY = region`, + s: `SELECT _tagKey AS "key", value FROM _tags WHERE _tagKey = 'region'`, + }, + { + stmt: `SHOW TAG VALUES FROM cpu WITH KEY = region`, + s: `SELECT _tagKey AS "key", value FROM _tags WHERE (_name = 'cpu') AND (_tagKey = 'region')`, + }, + { + stmt: `SHOW TAG VALUES FROM cpu WITH KEY IN (region, host)`, + s: `SELECT _tagKey AS "key", value FROM _tags WHERE (_name = 'cpu') AND (_tagKey = 'region' OR _tagKey = 'host')`, + }, + { + stmt: `SHOW TAG VALUES FROM mydb.myrp1.cpu WITH KEY IN (region, host)`, + s: `SELECT _tagKey AS "key", value FROM mydb.myrp1._tags WHERE (_name = 'cpu') AND (_tagKey = 'region' OR _tagKey = 'host')`, + }, + { + stmt: `SELECT value FROM cpu`, + s: `SELECT value FROM cpu`, + }, + } + + for _, test := range tests { + stmt, err := influxql.ParseStatement(test.stmt) + if err != nil { + t.Errorf("error parsing statement: %s", err) + } else { + stmt, err = influxql.RewriteStatement(stmt) + if err != nil { + t.Errorf("error rewriting statement: %s", err) + } else if s := stmt.String(); s != test.s { + t.Errorf("error rendering string. expected %s, actual: %s", test.s, s) + } + } + } +} diff --git a/vendor/github.com/influxdata/influxdb/models/points_test.go b/vendor/github.com/influxdata/influxdb/models/points_test.go new file mode 100644 index 000000000..60c109799 --- /dev/null +++ b/vendor/github.com/influxdata/influxdb/models/points_test.go @@ -0,0 +1,1848 @@ +package models_test + +import ( + "bytes" + "fmt" + "math" + "math/rand" + "reflect" + "strconv" + "strings" + "testing" + "time" + + "github.com/influxdata/influxdb/models" +) + +var ( + tags = models.Tags{"foo": "bar", "apple": "orange", "host": "serverA", "region": "uswest"} + maxFloat64 = strconv.FormatFloat(math.MaxFloat64, 'f', 1, 64) + minFloat64 = strconv.FormatFloat(-math.MaxFloat64, 'f', 1, 64) +) + +func TestMarshal(t *testing.T) { + got := tags.HashKey() + if exp := ",apple=orange,foo=bar,host=serverA,region=uswest"; string(got) != exp { + t.Log("got: ", string(got)) + t.Log("exp: ", exp) + t.Error("invalid match") + } +} + +func BenchmarkMarshal(b *testing.B) { + for i := 0; i < b.N; i++ { + tags.HashKey() + } +} + +func BenchmarkParsePointNoTags(b *testing.B) { + line := `cpu value=1i 1000000000` + for i := 0; i < b.N; i++ { + models.ParsePoints([]byte(line)) + b.SetBytes(int64(len(line))) + } +} + +func BenchmarkParsePointWithPrecisionN(b *testing.B) { + line := `cpu value=1i 1000000000` + defaultTime := time.Now().UTC() + for i := 0; i < b.N; i++ { + models.ParsePointsWithPrecision([]byte(line), defaultTime, "n") + b.SetBytes(int64(len(line))) + } +} + +func BenchmarkParsePointWithPrecisionU(b *testing.B) { + line := `cpu value=1i 1000000000` + defaultTime := time.Now().UTC() + for i := 0; i < b.N; i++ { + models.ParsePointsWithPrecision([]byte(line), defaultTime, "u") + b.SetBytes(int64(len(line))) + } +} + +func BenchmarkParsePointsTagsSorted2(b *testing.B) { + line := `cpu,host=serverA,region=us-west value=1i 1000000000` + for i := 0; i < b.N; i++ { + models.ParsePoints([]byte(line)) + b.SetBytes(int64(len(line))) + } +} + +func BenchmarkParsePointsTagsSorted5(b *testing.B) { + line := `cpu,env=prod,host=serverA,region=us-west,target=servers,zone=1c value=1i 1000000000` + for i := 0; i < b.N; i++ { + models.ParsePoints([]byte(line)) + b.SetBytes(int64(len(line))) + } +} + +func BenchmarkParsePointsTagsSorted10(b *testing.B) { + line := `cpu,env=prod,host=serverA,region=us-west,tag1=value1,tag2=value2,tag3=value3,tag4=value4,tag5=value5,target=servers,zone=1c value=1i 1000000000` + for i := 0; i < b.N; i++ { + models.ParsePoints([]byte(line)) + b.SetBytes(int64(len(line))) + } +} + +func BenchmarkParsePointsTagsUnSorted2(b *testing.B) { + line := `cpu,region=us-west,host=serverA value=1i 1000000000` + for i := 0; i < b.N; i++ { + pt, _ := models.ParsePoints([]byte(line)) + b.SetBytes(int64(len(line))) + pt[0].Key() + } +} + +func BenchmarkParsePointsTagsUnSorted5(b *testing.B) { + line := `cpu,region=us-west,host=serverA,env=prod,target=servers,zone=1c value=1i 1000000000` + for i := 0; i < b.N; i++ { + pt, _ := models.ParsePoints([]byte(line)) + b.SetBytes(int64(len(line))) + pt[0].Key() + } +} + +func BenchmarkParsePointsTagsUnSorted10(b *testing.B) { + line := `cpu,region=us-west,host=serverA,env=prod,target=servers,zone=1c,tag1=value1,tag2=value2,tag3=value3,tag4=value4,tag5=value5 value=1i 1000000000` + for i := 0; i < b.N; i++ { + pt, _ := models.ParsePoints([]byte(line)) + b.SetBytes(int64(len(line))) + pt[0].Key() + } +} + +func BenchmarkParseKey(b *testing.B) { + line := `cpu,region=us-west,host=serverA,env=prod,target=servers,zone=1c,tag1=value1,tag2=value2,tag3=value3,tag4=value4,tag5=value5` + for i := 0; i < b.N; i++ { + models.ParseKey(line) + } +} + +// TestPoint wraps a models.Point but also makes available the raw +// arguments to the Point. +// +// This is useful for ensuring that comparisons between results of +// operations on Points match the expected input data to the Point, +// since models.Point does not expose the raw input data (e.g., tags) +// via its API. +type TestPoint struct { + RawFields models.Fields + RawTags models.Tags + RawTime time.Time + models.Point +} + +// NewTestPoint returns a new TestPoint. +// +// NewTestPoint panics if it is not a valid models.Point. +func NewTestPoint(name string, tags models.Tags, fields models.Fields, time time.Time) TestPoint { + return TestPoint{ + RawTags: tags, + RawFields: fields, + RawTime: time, + Point: models.MustNewPoint(name, tags, fields, time), + } +} + +func test(t *testing.T, line string, point TestPoint) { + pts, err := models.ParsePointsWithPrecision([]byte(line), time.Unix(0, 0), "n") + if err != nil { + t.Fatalf(`ParsePoints("%s") mismatch. got %v, exp nil`, line, err) + } + + if exp := 1; len(pts) != exp { + t.Fatalf(`ParsePoints("%s") len mismatch. got %d, exp %d`, line, len(pts), exp) + } + + if exp := point.Key(); !bytes.Equal(pts[0].Key(), exp) { + t.Errorf("ParsePoints(\"%s\") key mismatch.\ngot %v\nexp %v", line, string(pts[0].Key()), string(exp)) + } + + if exp := len(point.Tags()); len(pts[0].Tags()) != exp { + t.Errorf(`ParsePoints("%s") tags mismatch. got %v, exp %v`, line, pts[0].Tags(), exp) + } + + for tag, value := range pts[0].Tags() { + if value != point.RawTags[tag] { + t.Errorf(`ParsePoints("%s") tags mismatch. got %v, exp %v`, line, value, point.RawTags[tag]) + } + } + + for name, value := range point.RawFields { + val := pts[0].Fields()[name] + expfval, ok := val.(float64) + + if ok && math.IsNaN(expfval) { + gotfval, ok := value.(float64) + if ok && !math.IsNaN(gotfval) { + t.Errorf(`ParsePoints("%s") field '%s' mismatch. exp NaN`, line, name) + } + } else if !reflect.DeepEqual(pts[0].Fields()[name], value) { + t.Errorf(`ParsePoints("%s") field '%s' mismatch. got %[3]v (%[3]T), exp %[4]v (%[4]T)`, line, name, pts[0].Fields()[name], value) + } + } + + if !pts[0].Time().Equal(point.Time()) { + t.Errorf(`ParsePoints("%s") time mismatch. got %v, exp %v`, line, pts[0].Time(), point.Time()) + } + + if !strings.HasPrefix(pts[0].String(), line) { + t.Errorf("ParsePoints string mismatch.\ngot: %v\nexp: %v", pts[0].String(), line) + } +} + +func TestParsePointNoValue(t *testing.T) { + pts, err := models.ParsePointsString("") + if err != nil { + t.Errorf(`ParsePoints("%s") mismatch. got %v, exp nil`, "", err) + } + + if exp := 0; len(pts) != exp { + t.Errorf(`ParsePoints("%s") len mismatch. got %v, exp %v`, "", len(pts), exp) + } +} + +func TestParsePointWhitespaceValue(t *testing.T) { + pts, err := models.ParsePointsString(" ") + if err != nil { + t.Errorf(`ParsePoints("%s") mismatch. got %v, exp nil`, "", err) + } + + if exp := 0; len(pts) != exp { + t.Errorf(`ParsePoints("%s") len mismatch. got %v, exp %v`, "", len(pts), exp) + } +} + +func TestParsePointNoFields(t *testing.T) { + expectedSuffix := "missing fields" + examples := []string{ + "cpu_load_short,host=server01,region=us-west", + "cpu", + "cpu,host==", + "=", + } + + for i, example := range examples { + _, err := models.ParsePointsString(example) + if err == nil { + t.Errorf(`[Example %d] ParsePoints("%s") mismatch. got nil, exp error`, i, example) + } else if !strings.HasSuffix(err.Error(), expectedSuffix) { + t.Errorf(`[Example %d] ParsePoints("%s") mismatch. got %q, exp suffix %q`, i, example, err, expectedSuffix) + } + } +} + +func TestParsePointNoTimestamp(t *testing.T) { + test(t, "cpu value=1", NewTestPoint("cpu", nil, models.Fields{"value": 1.0}, time.Unix(0, 0))) +} + +func TestParsePointMissingQuote(t *testing.T) { + expectedSuffix := "unbalanced quotes" + examples := []string{ + `cpu,host=serverA value="test`, + `cpu,host=serverA value="test""`, + } + + for i, example := range examples { + _, err := models.ParsePointsString(example) + if err == nil { + t.Errorf(`[Example %d] ParsePoints("%s") mismatch. got nil, exp error`, i, example) + } else if !strings.HasSuffix(err.Error(), expectedSuffix) { + t.Errorf(`[Example %d] ParsePoints("%s") mismatch. got %q, exp suffix %q`, i, example, err, expectedSuffix) + } + } +} + +func TestParsePointMissingTagKey(t *testing.T) { + expectedSuffix := "missing tag key" + examples := []string{ + `cpu, value=1`, + `cpu,`, + `cpu,,,`, + `cpu,host=serverA,=us-east value=1i`, + `cpu,host=serverAa\,,=us-east value=1i`, + `cpu,host=serverA\,,=us-east value=1i`, + `cpu, =serverA value=1i`, + } + + for i, example := range examples { + _, err := models.ParsePointsString(example) + if err == nil { + t.Errorf(`[Example %d] ParsePoints("%s") mismatch. got nil, exp error`, i, example) + } else if !strings.HasSuffix(err.Error(), expectedSuffix) { + t.Errorf(`[Example %d] ParsePoints("%s") mismatch. got %q, exp suffix %q`, i, example, err, expectedSuffix) + } + } + + _, err := models.ParsePointsString(`cpu,host=serverA,\ =us-east value=1i`) + if err != nil { + t.Errorf(`ParsePoints("%s") mismatch. got %v, exp nil`, `cpu,host=serverA,\ =us-east value=1i`, err) + } +} + +func TestParsePointMissingTagValue(t *testing.T) { + expectedSuffix := "missing tag value" + examples := []string{ + `cpu,host`, + `cpu,host,`, + `cpu,host=`, + `cpu,host value=1i`, + `cpu,host=serverA,region value=1i`, + `cpu,host=serverA,region= value=1i`, + `cpu,host=serverA,region=,zone=us-west value=1i`, + } + + for i, example := range examples { + _, err := models.ParsePointsString(example) + if err == nil { + t.Errorf(`[Example %d] ParsePoints("%s") mismatch. got nil, exp error`, i, example) + } else if !strings.HasSuffix(err.Error(), expectedSuffix) { + t.Errorf(`[Example %d] ParsePoints("%s") mismatch. got %q, exp suffix %q`, i, example, err, expectedSuffix) + } + } +} + +func TestParsePointInvalidTagFormat(t *testing.T) { + expectedSuffix := "invalid tag format" + examples := []string{ + `cpu,host=f=o,`, + `cpu,host=f\==o,`, + } + + for i, example := range examples { + _, err := models.ParsePointsString(example) + if err == nil { + t.Errorf(`[Example %d] ParsePoints("%s") mismatch. got nil, exp error`, i, example) + } else if !strings.HasSuffix(err.Error(), expectedSuffix) { + t.Errorf(`[Example %d] ParsePoints("%s") mismatch. got %q, exp suffix %q`, i, example, err, expectedSuffix) + } + } +} + +func TestParsePointMissingFieldName(t *testing.T) { + _, err := models.ParsePointsString(`cpu,host=serverA,region=us-west =`) + if err == nil { + t.Errorf(`ParsePoints("%s") mismatch. got nil, exp error`, `cpu,host=serverA,region=us-west =`) + } + + _, err = models.ParsePointsString(`cpu,host=serverA,region=us-west =123i`) + if err == nil { + t.Errorf(`ParsePoints("%s") mismatch. got nil, exp error`, `cpu,host=serverA,region=us-west =123i`) + } + + _, err = models.ParsePointsString(`cpu,host=serverA,region=us-west a\ =123i`) + if err != nil { + t.Errorf(`ParsePoints("%s") mismatch. got nil, exp error`, `cpu,host=serverA,region=us-west a\ =123i`) + } + _, err = models.ParsePointsString(`cpu,host=serverA,region=us-west value=123i,=456i`) + if err == nil { + t.Errorf(`ParsePoints("%s") mismatch. got nil, exp error`, `cpu,host=serverA,region=us-west value=123i,=456i`) + } +} + +func TestParsePointMissingFieldValue(t *testing.T) { + _, err := models.ParsePointsString(`cpu,host=serverA,region=us-west value=`) + if err == nil { + t.Errorf(`ParsePoints("%s") mismatch. got nil, exp error`, `cpu,host=serverA,region=us-west value=`) + } + + _, err = models.ParsePointsString(`cpu,host=serverA,region=us-west value= 1000000000i`) + if err == nil { + t.Errorf(`ParsePoints("%s") mismatch. got nil, exp error`, `cpu,host=serverA,region=us-west value= 1000000000i`) + } + + _, err = models.ParsePointsString(`cpu,host=serverA,region=us-west value=,value2=1i`) + if err == nil { + t.Errorf(`ParsePoints("%s") mismatch. got nil, exp error`, `cpu,host=serverA,region=us-west value=,value2=1i`) + } + + _, err = models.ParsePointsString(`cpu,host=server01,region=us-west 1434055562000000000i`) + if err == nil { + t.Errorf(`ParsePoints("%s") mismatch. got nil, exp error`, `cpu,host=server01,region=us-west 1434055562000000000i`) + } + + _, err = models.ParsePointsString(`cpu,host=server01,region=us-west value=1i,b`) + if err == nil { + t.Errorf(`ParsePoints("%s") mismatch. got nil, exp error`, `cpu,host=server01,region=us-west value=1i,b`) + } +} + +func TestParsePointBadNumber(t *testing.T) { + for _, tt := range []string{ + "cpu v=- ", + "cpu v=-i ", + "cpu v=-. ", + "cpu v=. ", + "cpu v=1.0i ", + "cpu v=1ii ", + "cpu v=1a ", + "cpu v=-e-e-e ", + "cpu v=42+3 ", + "cpu v= ", + } { + _, err := models.ParsePointsString(tt) + if err == nil { + t.Errorf("Point %q should be invalid", tt) + } + } +} + +func TestParsePointMaxInt64(t *testing.T) { + // out of range + _, err := models.ParsePointsString(`cpu,host=serverA,region=us-west value=9223372036854775808i`) + exp := `unable to parse 'cpu,host=serverA,region=us-west value=9223372036854775808i': unable to parse integer 9223372036854775808: strconv.ParseInt: parsing "9223372036854775808": value out of range` + if err == nil || (err != nil && err.Error() != exp) { + t.Fatalf("Error mismatch:\nexp: %s\ngot: %v", exp, err) + } + + // max int + p, err := models.ParsePointsString(`cpu,host=serverA,region=us-west value=9223372036854775807i`) + if err != nil { + t.Fatalf(`ParsePoints("%s") mismatch. got %v, exp nil`, `cpu,host=serverA,region=us-west value=9223372036854775807i`, err) + } + if exp, got := int64(9223372036854775807), p[0].Fields()["value"].(int64); exp != got { + t.Fatalf("ParsePoints Value mismatch. \nexp: %v\ngot: %v", exp, got) + } + + // leading zeros + _, err = models.ParsePointsString(`cpu,host=serverA,region=us-west value=0009223372036854775807i`) + if err != nil { + t.Fatalf(`ParsePoints("%s") mismatch. got %v, exp nil`, `cpu,host=serverA,region=us-west value=0009223372036854775807i`, err) + } +} + +func TestParsePointMinInt64(t *testing.T) { + // out of range + _, err := models.ParsePointsString(`cpu,host=serverA,region=us-west value=-9223372036854775809i`) + if err == nil { + t.Errorf(`ParsePoints("%s") mismatch. got nil, exp error`, `cpu,host=serverA,region=us-west value=-9223372036854775809i`) + } + + // min int + _, err = models.ParsePointsString(`cpu,host=serverA,region=us-west value=-9223372036854775808i`) + if err != nil { + t.Errorf(`ParsePoints("%s") mismatch. got %v, exp nil`, `cpu,host=serverA,region=us-west value=-9223372036854775808i`, err) + } + + // leading zeros + _, err = models.ParsePointsString(`cpu,host=serverA,region=us-west value=-0009223372036854775808i`) + if err != nil { + t.Errorf(`ParsePoints("%s") mismatch. got %v, exp nil`, `cpu,host=serverA,region=us-west value=-0009223372036854775808i`, err) + } +} + +func TestParsePointMaxFloat64(t *testing.T) { + // out of range + _, err := models.ParsePointsString(fmt.Sprintf(`cpu,host=serverA,region=us-west value=%s`, "1"+string(maxFloat64))) + if err == nil { + t.Errorf(`ParsePoints("%s") mismatch. got nil, exp error`, `cpu,host=serverA,region=us-west value=...`) + } + + // max float + _, err = models.ParsePointsString(fmt.Sprintf(`cpu,host=serverA,region=us-west value=%s`, string(maxFloat64))) + if err != nil { + t.Errorf(`ParsePoints("%s") mismatch. got %v, exp nil`, `cpu,host=serverA,region=us-west value=9223372036854775807`, err) + } + + // leading zeros + _, err = models.ParsePointsString(fmt.Sprintf(`cpu,host=serverA,region=us-west value=%s`, "0000"+string(maxFloat64))) + if err != nil { + t.Errorf(`ParsePoints("%s") mismatch. got %v, exp nil`, `cpu,host=serverA,region=us-west value=0009223372036854775807`, err) + } +} + +func TestParsePointMinFloat64(t *testing.T) { + // out of range + _, err := models.ParsePointsString(fmt.Sprintf(`cpu,host=serverA,region=us-west value=%s`, "-1"+string(minFloat64)[1:])) + if err == nil { + t.Errorf(`ParsePoints("%s") mismatch. got nil, exp error`, `cpu,host=serverA,region=us-west value=...`) + } + + // min float + _, err = models.ParsePointsString(fmt.Sprintf(`cpu,host=serverA,region=us-west value=%s`, string(minFloat64))) + if err != nil { + t.Errorf(`ParsePoints("%s") mismatch. got %v, exp nil`, `cpu,host=serverA,region=us-west value=...`, err) + } + + // leading zeros + _, err = models.ParsePointsString(fmt.Sprintf(`cpu,host=serverA,region=us-west value=%s`, "-0000000"+string(minFloat64)[1:])) + if err != nil { + t.Errorf(`ParsePoints("%s") mismatch. got %v, exp nil`, `cpu,host=serverA,region=us-west value=...`, err) + } +} + +func TestParsePointNumberNonNumeric(t *testing.T) { + _, err := models.ParsePointsString(`cpu,host=serverA,region=us-west value=.1a`) + if err == nil { + t.Errorf(`ParsePoints("%s") mismatch. got nil, exp error`, `cpu,host=serverA,region=us-west value=.1a`) + } +} + +func TestParsePointNegativeWrongPlace(t *testing.T) { + _, err := models.ParsePointsString(`cpu,host=serverA,region=us-west value=0.-1`) + if err == nil { + t.Errorf(`ParsePoints("%s") mismatch. got nil, exp error`, `cpu,host=serverA,region=us-west value=0.-1`) + } +} + +func TestParsePointOnlyNegativeSign(t *testing.T) { + _, err := models.ParsePointsString(`cpu,host=serverA,region=us-west value=-`) + if err == nil { + t.Errorf(`ParsePoints("%s") mismatch. got nil, exp error`, `cpu,host=serverA,region=us-west value=-`) + } +} + +func TestParsePointFloatMultipleDecimals(t *testing.T) { + _, err := models.ParsePointsString(`cpu,host=serverA,region=us-west value=1.1.1`) + if err == nil { + t.Errorf(`ParsePoints("%s") mismatch. got nil, exp error`, `cpu,host=serverA,region=us-west value=1.1.1`) + } +} + +func TestParsePointInteger(t *testing.T) { + _, err := models.ParsePointsString(`cpu,host=serverA,region=us-west value=1i`) + if err != nil { + t.Errorf(`ParsePoints("%s") mismatch. got %v, exp nil`, `cpu,host=serverA,region=us-west value=1i`, err) + } +} + +func TestParsePointNegativeInteger(t *testing.T) { + _, err := models.ParsePointsString(`cpu,host=serverA,region=us-west value=-1i`) + if err != nil { + t.Errorf(`ParsePoints("%s") mismatch. got %v, exp nil`, `cpu,host=serverA,region=us-west value=-1i`, err) + } +} + +func TestParsePointNegativeFloat(t *testing.T) { + _, err := models.ParsePointsString(`cpu,host=serverA,region=us-west value=-1.0`) + if err != nil { + t.Errorf(`ParsePoints("%s") mismatch. got %v, exp nil`, `cpu,host=serverA,region=us-west value=-1.0`, err) + } +} + +func TestParsePointFloatNoLeadingDigit(t *testing.T) { + _, err := models.ParsePointsString(`cpu,host=serverA,region=us-west value=.1`) + if err != nil { + t.Errorf(`ParsePoints("%s") mismatch. got %v, exp nil`, `cpu,host=serverA,region=us-west value=-1.0`, err) + } +} + +func TestParsePointFloatScientific(t *testing.T) { + _, err := models.ParsePointsString(`cpu,host=serverA,region=us-west value=1.0e4`) + if err != nil { + t.Errorf(`ParsePoints("%s") mismatch. got %v, exp nil`, `cpu,host=serverA,region=us-west value=1.0e4`, err) + } + + pts, err := models.ParsePointsString(`cpu,host=serverA,region=us-west value=1e4`) + if err != nil { + t.Errorf(`ParsePoints("%s") mismatch. got %v, exp nil`, `cpu,host=serverA,region=us-west value=1.0e4`, err) + } + + if pts[0].Fields()["value"] != 1e4 { + t.Errorf(`ParsePoints("%s") mismatch. got %v, exp nil`, `cpu,host=serverA,region=us-west value=1e4`, err) + } +} + +func TestParsePointFloatScientificUpper(t *testing.T) { + _, err := models.ParsePointsString(`cpu,host=serverA,region=us-west value=1.0E4`) + if err != nil { + t.Errorf(`ParsePoints("%s") mismatch. got %v, exp nil`, `cpu,host=serverA,region=us-west value=1.0E4`, err) + } + + pts, err := models.ParsePointsString(`cpu,host=serverA,region=us-west value=1E4`) + if err != nil { + t.Errorf(`ParsePoints("%s") mismatch. got %v, exp nil`, `cpu,host=serverA,region=us-west value=1.0E4`, err) + } + + if pts[0].Fields()["value"] != 1e4 { + t.Errorf(`ParsePoints("%s") mismatch. got %v, exp nil`, `cpu,host=serverA,region=us-west value=1E4`, err) + } +} + +func TestParsePointFloatScientificDecimal(t *testing.T) { + _, err := models.ParsePointsString(`cpu,host=serverA,region=us-west value=1.0e-4`) + if err != nil { + t.Errorf(`ParsePoints("%s") mismatch. got %v, exp nil`, `cpu,host=serverA,region=us-west value=1.0e-4`, err) + } +} + +func TestParsePointFloatNegativeScientific(t *testing.T) { + _, err := models.ParsePointsString(`cpu,host=serverA,region=us-west value=-1.0e-4`) + if err != nil { + t.Errorf(`ParsePoints("%s") mismatch. got %v, exp nil`, `cpu,host=serverA,region=us-west value=-1.0e-4`, err) + } +} + +func TestParsePointBooleanInvalid(t *testing.T) { + _, err := models.ParsePointsString(`cpu,host=serverA,region=us-west value=a`) + if err == nil { + t.Errorf(`ParsePoints("%s") mismatch. got nil, exp error`, `cpu,host=serverA,region=us-west value=a`) + } +} + +func TestParsePointScientificIntInvalid(t *testing.T) { + _, err := models.ParsePointsString(`cpu,host=serverA,region=us-west value=9ie10`) + if err == nil { + t.Errorf(`ParsePoints("%s") mismatch. got nil, exp error`, `cpu,host=serverA,region=us-west value=9ie10`) + } + + _, err = models.ParsePointsString(`cpu,host=serverA,region=us-west value=9e10i`) + if err == nil { + t.Errorf(`ParsePoints("%s") mismatch. got nil, exp error`, `cpu,host=serverA,region=us-west value=9e10i`) + } +} + +func TestParsePointWhitespace(t *testing.T) { + examples := []string{ + `cpu value=1.0 1257894000000000000`, + `cpu value=1.0 1257894000000000000`, + `cpu value=1.0 1257894000000000000`, + `cpu value=1.0 1257894000000000000 `, + `cpu value=1.0 1257894000000000000 +`, + `cpu value=1.0 1257894000000000000 +`, + } + + expPoint := NewTestPoint("cpu", models.Tags{}, models.Fields{"value": 1.0}, time.Unix(0, 1257894000000000000)) + for i, example := range examples { + pts, err := models.ParsePoints([]byte(example)) + if err != nil { + t.Fatalf(`[Example %d] ParsePoints("%s") error. got %v, exp nil`, i, example, err) + } + + if got, exp := len(pts), 1; got != exp { + t.Fatalf("[Example %d] got %d points, expected %d", i, got, exp) + } + + if got, exp := pts[0].Name(), expPoint.Name(); got != exp { + t.Fatalf("[Example %d] got %v measurement, expected %v", i, got, exp) + } + + if got, exp := len(pts[0].Fields()), len(expPoint.Fields()); got != exp { + t.Fatalf("[Example %d] got %d fields, expected %d", i, got, exp) + } + + if got, exp := pts[0].Fields()["value"], expPoint.Fields()["value"]; got != exp { + t.Fatalf(`[Example %d] got %v for field "value", expected %v`, i, got, exp) + } + + if got, exp := pts[0].Time().UnixNano(), expPoint.Time().UnixNano(); got != exp { + t.Fatalf(`[Example %d] got %d time, expected %d`, i, got, exp) + } + } +} + +func TestParsePointUnescape(t *testing.T) { + // commas in measurement name + test(t, `foo\,bar value=1i`, + NewTestPoint( + "foo,bar", // comma in the name + models.Tags{}, + models.Fields{ + "value": int64(1), + }, + time.Unix(0, 0))) + + // comma in measurement name with tags + test(t, `cpu\,main,regions=east value=1.0`, + NewTestPoint( + "cpu,main", // comma in the name + models.Tags{ + "regions": "east", + }, + models.Fields{ + "value": 1.0, + }, + time.Unix(0, 0))) + + // spaces in measurement name + test(t, `cpu\ load,region=east value=1.0`, + NewTestPoint( + "cpu load", // space in the name + models.Tags{ + "region": "east", + }, + models.Fields{ + "value": 1.0, + }, + time.Unix(0, 0))) + + // equals in measurement name + test(t, `cpu\=load,region=east value=1.0`, + NewTestPoint( + `cpu\=load`, // backslash is literal + models.Tags{ + "region": "east", + }, + models.Fields{ + "value": 1.0, + }, + time.Unix(0, 0))) + + // equals in measurement name + test(t, `cpu=load,region=east value=1.0`, + NewTestPoint( + `cpu=load`, // literal equals is fine in measurement name + models.Tags{ + "region": "east", + }, + models.Fields{ + "value": 1.0, + }, + time.Unix(0, 0))) + + // commas in tag names + test(t, `cpu,region\,zone=east value=1.0`, + NewTestPoint("cpu", + models.Tags{ + "region,zone": "east", // comma in the tag key + }, + models.Fields{ + "value": 1.0, + }, + time.Unix(0, 0))) + + // spaces in tag name + test(t, `cpu,region\ zone=east value=1.0`, + NewTestPoint("cpu", + models.Tags{ + "region zone": "east", // space in the tag name + }, + models.Fields{ + "value": 1.0, + }, + time.Unix(0, 0))) + + // backslash with escaped equals in tag name + test(t, `cpu,reg\\=ion=east value=1.0`, + NewTestPoint("cpu", + models.Tags{ + `reg\=ion`: "east", + }, + models.Fields{ + "value": 1.0, + }, + time.Unix(0, 0))) + + // space is tag name + test(t, `cpu,\ =east value=1.0`, + NewTestPoint("cpu", + models.Tags{ + " ": "east", // tag name is single space + }, + models.Fields{ + "value": 1.0, + }, + time.Unix(0, 0))) + + // commas in tag values + test(t, `cpu,regions=east\,west value=1.0`, + NewTestPoint("cpu", + models.Tags{ + "regions": "east,west", // comma in the tag value + }, + models.Fields{ + "value": 1.0, + }, + time.Unix(0, 0))) + + // backslash literal followed by escaped space + test(t, `cpu,regions=\\ east value=1.0`, + NewTestPoint( + "cpu", + models.Tags{ + "regions": `\ east`, + }, + models.Fields{ + "value": 1.0, + }, + time.Unix(0, 0))) + + // backslash literal followed by escaped space + test(t, `cpu,regions=eas\\ t value=1.0`, + NewTestPoint( + "cpu", + models.Tags{ + "regions": `eas\ t`, + }, + models.Fields{ + "value": 1.0, + }, + time.Unix(0, 0))) + + // backslash literal followed by trailing space + test(t, `cpu,regions=east\\ value=1.0`, + NewTestPoint( + "cpu", + models.Tags{ + "regions": `east\ `, + }, + models.Fields{ + "value": 1.0, + }, + time.Unix(0, 0))) + + // spaces in tag values + test(t, `cpu,regions=east\ west value=1.0`, + NewTestPoint("cpu", + models.Tags{ + "regions": "east west", // comma in the tag value + }, + models.Fields{ + "value": 1.0, + }, + time.Unix(0, 0))) + + // commas in field keys + test(t, `cpu,regions=east value\,ms=1.0`, + NewTestPoint("cpu", + models.Tags{ + "regions": "east", + }, + models.Fields{ + "value,ms": 1.0, // comma in the field keys + }, + time.Unix(0, 0))) + + // spaces in field keys + test(t, `cpu,regions=east value\ ms=1.0`, + NewTestPoint("cpu", + models.Tags{ + "regions": "east", + }, + models.Fields{ + "value ms": 1.0, // comma in the field keys + }, + time.Unix(0, 0))) + + // tag with no value + test(t, `cpu,regions=east value="1"`, + NewTestPoint("cpu", + models.Tags{ + "regions": "east", + "foobar": "", + }, + models.Fields{ + "value": "1", + }, + time.Unix(0, 0))) + + // commas in field values + test(t, `cpu,regions=east value="1,0"`, + NewTestPoint("cpu", + models.Tags{ + "regions": "east", + }, + models.Fields{ + "value": "1,0", // comma in the field value + }, + time.Unix(0, 0))) + + // random character escaped + test(t, `cpu,regions=eas\t value=1.0`, + NewTestPoint( + "cpu", + models.Tags{ + "regions": "eas\\t", + }, + models.Fields{ + "value": 1.0, + }, + time.Unix(0, 0))) + + // backslash literal followed by escaped characters + test(t, `cpu,regions=\\,\,\=east value=1.0`, + NewTestPoint( + "cpu", + models.Tags{ + "regions": `\,,=east`, + }, + models.Fields{ + "value": 1.0, + }, + time.Unix(0, 0))) + + // field keys using escape char. + test(t, `cpu \a=1i`, + NewTestPoint( + "cpu", + models.Tags{}, + models.Fields{ + "\\a": int64(1), // Left as parsed since it's not a known escape sequence. + }, + time.Unix(0, 0))) + + // measurement, tag and tag value with equals + test(t, `cpu=load,equals\=foo=tag\=value value=1i`, + NewTestPoint( + "cpu=load", // Not escaped + models.Tags{ + "equals=foo": "tag=value", // Tag and value unescaped + }, + models.Fields{ + "value": int64(1), + }, + time.Unix(0, 0))) + +} + +func TestParsePointWithTags(t *testing.T) { + test(t, + "cpu,host=serverA,region=us-east value=1.0 1000000000", + NewTestPoint("cpu", + models.Tags{"host": "serverA", "region": "us-east"}, + models.Fields{"value": 1.0}, time.Unix(1, 0))) +} + +func TestParsPointWithDuplicateTags(t *testing.T) { + _, err := models.ParsePoints([]byte(`cpu,host=serverA,host=serverB value=1i 1000000000`)) + if err == nil { + t.Fatalf(`ParsePoint() expected error. got nil`) + } +} + +func TestParsePointWithStringField(t *testing.T) { + test(t, `cpu,host=serverA,region=us-east value=1.0,str="foo",str2="bar" 1000000000`, + NewTestPoint("cpu", + models.Tags{ + "host": "serverA", + "region": "us-east", + }, + models.Fields{ + "value": 1.0, + "str": "foo", + "str2": "bar", + }, + time.Unix(1, 0)), + ) + + test(t, `cpu,host=serverA,region=us-east str="foo \" bar" 1000000000`, + NewTestPoint("cpu", + models.Tags{ + "host": "serverA", + "region": "us-east", + }, + models.Fields{ + "str": `foo " bar`, + }, + time.Unix(1, 0)), + ) + +} + +func TestParsePointWithStringWithSpaces(t *testing.T) { + test(t, `cpu,host=serverA,region=us-east value=1.0,str="foo bar" 1000000000`, + NewTestPoint( + "cpu", + models.Tags{ + "host": "serverA", + "region": "us-east", + }, + models.Fields{ + "value": 1.0, + "str": "foo bar", // spaces in string value + }, + time.Unix(1, 0)), + ) +} + +func TestParsePointWithStringWithNewline(t *testing.T) { + test(t, "cpu,host=serverA,region=us-east value=1.0,str=\"foo\nbar\" 1000000000", + NewTestPoint( + "cpu", + models.Tags{ + "host": "serverA", + "region": "us-east", + }, + models.Fields{ + "value": 1.0, + "str": "foo\nbar", // newline in string value + }, + time.Unix(1, 0)), + ) +} + +func TestParsePointWithStringWithCommas(t *testing.T) { + // escaped comma + test(t, `cpu,host=serverA,region=us-east value=1.0,str="foo\,bar" 1000000000`, + NewTestPoint( + "cpu", + models.Tags{ + "host": "serverA", + "region": "us-east", + }, + models.Fields{ + "value": 1.0, + "str": `foo\,bar`, // commas in string value + }, + time.Unix(1, 0)), + ) + + // non-escaped comma + test(t, `cpu,host=serverA,region=us-east value=1.0,str="foo,bar" 1000000000`, + NewTestPoint( + "cpu", + models.Tags{ + "host": "serverA", + "region": "us-east", + }, + models.Fields{ + "value": 1.0, + "str": "foo,bar", // commas in string value + }, + time.Unix(1, 0)), + ) +} + +func TestParsePointQuotedMeasurement(t *testing.T) { + // non-escaped comma + test(t, `"cpu",host=serverA,region=us-east value=1.0 1000000000`, + NewTestPoint( + `"cpu"`, + models.Tags{ + "host": "serverA", + "region": "us-east", + }, + models.Fields{ + "value": 1.0, + }, + time.Unix(1, 0)), + ) +} + +func TestParsePointQuotedTags(t *testing.T) { + test(t, `cpu,"host"="serverA",region=us-east value=1.0 1000000000`, + NewTestPoint( + "cpu", + models.Tags{ + `"host"`: `"serverA"`, + "region": "us-east", + }, + models.Fields{ + "value": 1.0, + }, + time.Unix(1, 0)), + ) +} + +func TestParsePointsUnbalancedQuotedTags(t *testing.T) { + pts, err := models.ParsePointsString("baz,mytag=\"a x=1 1441103862125\nbaz,mytag=a z=1 1441103862126") + if err != nil { + t.Fatalf("ParsePoints failed: %v", err) + } + + if exp := 2; len(pts) != exp { + t.Fatalf("ParsePoints count mismatch. got %v, exp %v", len(pts), exp) + } + + // Expected " in the tag value + exp := models.MustNewPoint("baz", models.Tags{"mytag": `"a`}, + models.Fields{"x": float64(1)}, time.Unix(0, 1441103862125)) + + if pts[0].String() != exp.String() { + t.Errorf("Point mismatch:\ngot: %v\nexp: %v", pts[0].String(), exp.String()) + } + + // Expected two points to ensure we did not overscan the line + exp = models.MustNewPoint("baz", models.Tags{"mytag": `a`}, + models.Fields{"z": float64(1)}, time.Unix(0, 1441103862126)) + + if pts[1].String() != exp.String() { + t.Errorf("Point mismatch:\ngot: %v\nexp: %v", pts[1].String(), exp.String()) + } + +} + +func TestParsePointEscapedStringsAndCommas(t *testing.T) { + // non-escaped comma and quotes + test(t, `cpu,host=serverA,region=us-east value="{Hello\"{,}\" World}" 1000000000`, + NewTestPoint( + "cpu", + models.Tags{ + "host": "serverA", + "region": "us-east", + }, + models.Fields{ + "value": `{Hello"{,}" World}`, + }, + time.Unix(1, 0)), + ) + + // escaped comma and quotes + test(t, `cpu,host=serverA,region=us-east value="{Hello\"{\,}\" World}" 1000000000`, + NewTestPoint( + "cpu", + models.Tags{ + "host": "serverA", + "region": "us-east", + }, + models.Fields{ + "value": `{Hello"{\,}" World}`, + }, + time.Unix(1, 0)), + ) +} + +func TestParsePointWithStringWithEquals(t *testing.T) { + test(t, `cpu,host=serverA,region=us-east str="foo=bar",value=1.0 1000000000`, + NewTestPoint( + "cpu", + models.Tags{ + "host": "serverA", + "region": "us-east", + }, + models.Fields{ + "value": 1.0, + "str": "foo=bar", // spaces in string value + }, + time.Unix(1, 0)), + ) +} + +func TestParsePointWithStringWithBackslash(t *testing.T) { + test(t, `cpu value="test\\\"" 1000000000`, + NewTestPoint( + "cpu", + models.Tags{}, + models.Fields{ + "value": `test\"`, + }, + time.Unix(1, 0)), + ) + + test(t, `cpu value="test\\" 1000000000`, + NewTestPoint( + "cpu", + models.Tags{}, + models.Fields{ + "value": `test\`, + }, + time.Unix(1, 0)), + ) + + test(t, `cpu value="test\\\"" 1000000000`, + NewTestPoint( + "cpu", + models.Tags{}, + models.Fields{ + "value": `test\"`, + }, + time.Unix(1, 0)), + ) + + test(t, `cpu value="test\"" 1000000000`, + NewTestPoint( + "cpu", + models.Tags{}, + models.Fields{ + "value": `test"`, + }, + time.Unix(1, 0)), + ) +} + +func TestParsePointWithBoolField(t *testing.T) { + test(t, `cpu,host=serverA,region=us-east true=true,t=t,T=T,TRUE=TRUE,True=True,false=false,f=f,F=F,FALSE=FALSE,False=False 1000000000`, + NewTestPoint( + "cpu", + models.Tags{ + "host": "serverA", + "region": "us-east", + }, + models.Fields{ + "t": true, + "T": true, + "true": true, + "True": true, + "TRUE": true, + "f": false, + "F": false, + "false": false, + "False": false, + "FALSE": false, + }, + time.Unix(1, 0)), + ) +} + +func TestParsePointUnicodeString(t *testing.T) { + test(t, `cpu,host=serverA,region=us-east value="wè" 1000000000`, + NewTestPoint( + "cpu", + models.Tags{ + "host": "serverA", + "region": "us-east", + }, + models.Fields{ + "value": "wè", + }, + time.Unix(1, 0)), + ) +} + +func TestParsePointNegativeTimestamp(t *testing.T) { + test(t, `cpu value=1 -1`, + NewTestPoint( + "cpu", + models.Tags{}, + models.Fields{ + "value": 1.0, + }, + time.Unix(0, -1)), + ) +} + +func TestParsePointMaxTimestamp(t *testing.T) { + test(t, `cpu value=1 9223372036854775807`, + NewTestPoint( + "cpu", + models.Tags{}, + models.Fields{ + "value": 1.0, + }, + time.Unix(0, models.MaxNanoTime)), + ) +} + +func TestParsePointMinTimestamp(t *testing.T) { + test(t, `cpu value=1 -9223372036854775808`, + NewTestPoint( + "cpu", + models.Tags{}, + models.Fields{ + "value": 1.0, + }, + time.Unix(0, models.MinNanoTime)), + ) +} + +func TestParsePointInvalidTimestamp(t *testing.T) { + examples := []string{ + "cpu value=1 9223372036854775808", + "cpu value=1 -92233720368547758078", + "cpu value=1 -", + "cpu value=1 -/", + "cpu value=1 -1?", + "cpu value=1 1-", + "cpu value=1 9223372036854775807 12", + } + + for i, example := range examples { + _, err := models.ParsePointsString(example) + if err == nil { + t.Fatalf("[Example %d] ParsePoints failed: %v", i, err) + } + } +} + +func TestNewPointFloatWithoutDecimal(t *testing.T) { + test(t, `cpu value=1 1000000000`, + NewTestPoint( + "cpu", + models.Tags{}, + models.Fields{ + "value": 1.0, + }, + time.Unix(1, 0)), + ) +} +func TestNewPointNegativeFloat(t *testing.T) { + test(t, `cpu value=-0.64 1000000000`, + NewTestPoint( + "cpu", + models.Tags{}, + models.Fields{ + "value": -0.64, + }, + time.Unix(1, 0)), + ) +} + +func TestNewPointFloatNoDecimal(t *testing.T) { + test(t, `cpu value=1. 1000000000`, + NewTestPoint( + "cpu", + models.Tags{}, + models.Fields{ + "value": 1.0, + }, + time.Unix(1, 0)), + ) +} + +func TestNewPointFloatScientific(t *testing.T) { + test(t, `cpu value=6.632243e+06 1000000000`, + NewTestPoint( + "cpu", + models.Tags{}, + models.Fields{ + "value": float64(6632243), + }, + time.Unix(1, 0)), + ) +} + +func TestNewPointLargeInteger(t *testing.T) { + test(t, `cpu value=6632243i 1000000000`, + NewTestPoint( + "cpu", + models.Tags{}, + models.Fields{ + "value": int64(6632243), // if incorrectly encoded as a float, it would show up as 6.632243e+06 + }, + time.Unix(1, 0)), + ) +} + +func TestParsePointNaN(t *testing.T) { + _, err := models.ParsePointsString("cpu value=NaN 1000000000") + if err == nil { + t.Fatalf("ParsePoints expected error, got nil") + } + + _, err = models.ParsePointsString("cpu value=nAn 1000000000") + if err == nil { + t.Fatalf("ParsePoints expected error, got nil") + } + + _, err = models.ParsePointsString("cpu value=NaN") + if err == nil { + t.Fatalf("ParsePoints expected error, got nil") + } +} + +func TestNewPointLargeNumberOfTags(t *testing.T) { + tags := "" + for i := 0; i < 255; i++ { + tags += fmt.Sprintf(",tag%d=value%d", i, i) + } + + pt, err := models.ParsePointsString(fmt.Sprintf("cpu%s value=1", tags)) + if err != nil { + t.Fatalf("ParsePoints() with max tags failed: %v", err) + } + + if len(pt[0].Tags()) != 255 { + t.Fatalf("expected %d tags, got %d", 255, len(pt[0].Tags())) + } +} + +func TestParsePointIntsFloats(t *testing.T) { + pts, err := models.ParsePoints([]byte(`cpu,host=serverA,region=us-east int=10i,float=11.0,float2=12.1 1000000000`)) + if err != nil { + t.Fatalf(`ParsePoints() failed. got %s`, err) + } + + if exp := 1; len(pts) != exp { + t.Errorf("ParsePoint() len mismatch: got %v, exp %v", len(pts), exp) + } + pt := pts[0] + + if _, ok := pt.Fields()["int"].(int64); !ok { + t.Errorf("ParsePoint() int field mismatch: got %T, exp %T", pt.Fields()["int"], int64(10)) + } + + if _, ok := pt.Fields()["float"].(float64); !ok { + t.Errorf("ParsePoint() float field mismatch: got %T, exp %T", pt.Fields()["float64"], float64(11.0)) + } + + if _, ok := pt.Fields()["float2"].(float64); !ok { + t.Errorf("ParsePoint() float field mismatch: got %T, exp %T", pt.Fields()["float64"], float64(12.1)) + } +} + +func TestParsePointKeyUnsorted(t *testing.T) { + pts, err := models.ParsePoints([]byte("cpu,last=1,first=2 value=1i")) + if err != nil { + t.Fatalf(`ParsePoints() failed. got %s`, err) + } + + if exp := 1; len(pts) != exp { + t.Errorf("ParsePoint() len mismatch: got %v, exp %v", len(pts), exp) + } + pt := pts[0] + + if exp := "cpu,first=2,last=1"; string(pt.Key()) != exp { + t.Errorf("ParsePoint key not sorted. got %v, exp %v", string(pt.Key()), exp) + } +} + +func TestParsePointToString(t *testing.T) { + line := `cpu,host=serverA,region=us-east bool=false,float=11,float2=12.123,int=10i,str="string val" 1000000000` + pts, err := models.ParsePoints([]byte(line)) + if err != nil { + t.Fatalf(`ParsePoints() failed. got %s`, err) + } + if exp := 1; len(pts) != exp { + t.Errorf("ParsePoint() len mismatch: got %v, exp %v", len(pts), exp) + } + pt := pts[0] + + got := pt.String() + if line != got { + t.Errorf("ParsePoint() to string mismatch:\n got %v\n exp %v", got, line) + } + + pt = models.MustNewPoint("cpu", models.Tags{"host": "serverA", "region": "us-east"}, + models.Fields{"int": 10, "float": float64(11.0), "float2": float64(12.123), "bool": false, "str": "string val"}, + time.Unix(1, 0)) + + got = pt.String() + if line != got { + t.Errorf("NewPoint() to string mismatch:\n got %v\n exp %v", got, line) + } +} + +func TestParsePointsWithPrecision(t *testing.T) { + tests := []struct { + name string + line string + precision string + exp string + }{ + { + name: "nanosecond by default", + line: `cpu,host=serverA,region=us-east value=1.0 946730096789012345`, + precision: "", + exp: "cpu,host=serverA,region=us-east value=1.0 946730096789012345", + }, + { + name: "nanosecond", + line: `cpu,host=serverA,region=us-east value=1.0 946730096789012345`, + precision: "n", + exp: "cpu,host=serverA,region=us-east value=1.0 946730096789012345", + }, + { + name: "microsecond", + line: `cpu,host=serverA,region=us-east value=1.0 946730096789012`, + precision: "u", + exp: "cpu,host=serverA,region=us-east value=1.0 946730096789012000", + }, + { + name: "millisecond", + line: `cpu,host=serverA,region=us-east value=1.0 946730096789`, + precision: "ms", + exp: "cpu,host=serverA,region=us-east value=1.0 946730096789000000", + }, + { + name: "second", + line: `cpu,host=serverA,region=us-east value=1.0 946730096`, + precision: "s", + exp: "cpu,host=serverA,region=us-east value=1.0 946730096000000000", + }, + { + name: "minute", + line: `cpu,host=serverA,region=us-east value=1.0 15778834`, + precision: "m", + exp: "cpu,host=serverA,region=us-east value=1.0 946730040000000000", + }, + { + name: "hour", + line: `cpu,host=serverA,region=us-east value=1.0 262980`, + precision: "h", + exp: "cpu,host=serverA,region=us-east value=1.0 946728000000000000", + }, + } + for _, test := range tests { + pts, err := models.ParsePointsWithPrecision([]byte(test.line), time.Now().UTC(), test.precision) + if err != nil { + t.Fatalf(`%s: ParsePoints() failed. got %s`, test.name, err) + } + if exp := 1; len(pts) != exp { + t.Errorf("%s: ParsePoint() len mismatch: got %v, exp %v", test.name, len(pts), exp) + } + pt := pts[0] + + got := pt.String() + if got != test.exp { + t.Errorf("%s: ParsePoint() to string mismatch:\n got %v\n exp %v", test.name, got, test.exp) + } + } +} + +func TestParsePointsWithPrecisionNoTime(t *testing.T) { + line := `cpu,host=serverA,region=us-east value=1.0` + tm, _ := time.Parse(time.RFC3339Nano, "2000-01-01T12:34:56.789012345Z") + tests := []struct { + name string + precision string + exp string + }{ + { + name: "no precision", + precision: "", + exp: "cpu,host=serverA,region=us-east value=1.0 946730096789012345", + }, + { + name: "nanosecond precision", + precision: "n", + exp: "cpu,host=serverA,region=us-east value=1.0 946730096789012345", + }, + { + name: "microsecond precision", + precision: "u", + exp: "cpu,host=serverA,region=us-east value=1.0 946730096789012000", + }, + { + name: "millisecond precision", + precision: "ms", + exp: "cpu,host=serverA,region=us-east value=1.0 946730096789000000", + }, + { + name: "second precision", + precision: "s", + exp: "cpu,host=serverA,region=us-east value=1.0 946730096000000000", + }, + { + name: "minute precision", + precision: "m", + exp: "cpu,host=serverA,region=us-east value=1.0 946730040000000000", + }, + { + name: "hour precision", + precision: "h", + exp: "cpu,host=serverA,region=us-east value=1.0 946728000000000000", + }, + } + + for _, test := range tests { + pts, err := models.ParsePointsWithPrecision([]byte(line), tm, test.precision) + if err != nil { + t.Fatalf(`%s: ParsePoints() failed. got %s`, test.name, err) + } + if exp := 1; len(pts) != exp { + t.Errorf("%s: ParsePoint() len mismatch: got %v, exp %v", test.name, len(pts), exp) + } + pt := pts[0] + + got := pt.String() + if got != test.exp { + t.Errorf("%s: ParsePoint() to string mismatch:\n got %v\n exp %v", test.name, got, test.exp) + } + } +} + +func TestParsePointsWithPrecisionComments(t *testing.T) { + tests := []struct { + name string + batch string + exp string + lenPoints int + }{ + { + name: "comment only", + batch: `# comment only`, + exp: "cpu,host=serverA,region=us-east value=1.0 946730096789012345", + lenPoints: 0, + }, + { + name: "point with comment above", + batch: `# a point is below +cpu,host=serverA,region=us-east value=1.0 946730096789012345`, + exp: "cpu,host=serverA,region=us-east value=1.0 946730096789012345", + lenPoints: 1, + }, + { + name: "point with comment below", + batch: `cpu,host=serverA,region=us-east value=1.0 946730096789012345 +# end of points`, + exp: "cpu,host=serverA,region=us-east value=1.0 946730096789012345", + lenPoints: 1, + }, + { + name: "indented comment", + batch: ` # a point is below +cpu,host=serverA,region=us-east value=1.0 946730096789012345`, + exp: "cpu,host=serverA,region=us-east value=1.0 946730096789012345", + lenPoints: 1, + }, + } + for _, test := range tests { + pts, err := models.ParsePointsWithPrecision([]byte(test.batch), time.Now().UTC(), "") + if err != nil { + t.Fatalf(`%s: ParsePoints() failed. got %s`, test.name, err) + } + pointsLength := len(pts) + if exp := test.lenPoints; pointsLength != exp { + t.Errorf("%s: ParsePoint() len mismatch: got %v, exp %v", test.name, pointsLength, exp) + } + + if pointsLength > 0 { + pt := pts[0] + + got := pt.String() + if got != test.exp { + t.Errorf("%s: ParsePoint() to string mismatch:\n got %v\n exp %v", test.name, got, test.exp) + } + } + } +} + +func TestNewPointEscaped(t *testing.T) { + // commas + pt := models.MustNewPoint("cpu,main", models.Tags{"tag,bar": "value"}, models.Fields{"name,bar": 1.0}, time.Unix(0, 0)) + if exp := `cpu\,main,tag\,bar=value name\,bar=1 0`; pt.String() != exp { + t.Errorf("NewPoint().String() mismatch.\ngot %v\nexp %v", pt.String(), exp) + } + + // spaces + pt = models.MustNewPoint("cpu main", models.Tags{"tag bar": "value"}, models.Fields{"name bar": 1.0}, time.Unix(0, 0)) + if exp := `cpu\ main,tag\ bar=value name\ bar=1 0`; pt.String() != exp { + t.Errorf("NewPoint().String() mismatch.\ngot %v\nexp %v", pt.String(), exp) + } + + // equals + pt = models.MustNewPoint("cpu=main", models.Tags{"tag=bar": "value=foo"}, models.Fields{"name=bar": 1.0}, time.Unix(0, 0)) + if exp := `cpu=main,tag\=bar=value\=foo name\=bar=1 0`; pt.String() != exp { + t.Errorf("NewPoint().String() mismatch.\ngot %v\nexp %v", pt.String(), exp) + } +} + +func TestNewPointWithoutField(t *testing.T) { + _, err := models.NewPoint("cpu", models.Tags{"tag": "bar"}, models.Fields{}, time.Unix(0, 0)) + if err == nil { + t.Fatalf(`NewPoint() expected error. got nil`) + } +} + +func TestNewPointUnhandledType(t *testing.T) { + // nil value + pt := models.MustNewPoint("cpu", nil, models.Fields{"value": nil}, time.Unix(0, 0)) + if exp := `cpu value= 0`; pt.String() != exp { + t.Errorf("NewPoint().String() mismatch.\ngot %v\nexp %v", pt.String(), exp) + } + + // unsupported type gets stored as string + now := time.Unix(0, 0).UTC() + pt = models.MustNewPoint("cpu", nil, models.Fields{"value": now}, time.Unix(0, 0)) + if exp := `cpu value="1970-01-01 00:00:00 +0000 UTC" 0`; pt.String() != exp { + t.Errorf("NewPoint().String() mismatch.\ngot %v\nexp %v", pt.String(), exp) + } + + if exp := "1970-01-01 00:00:00 +0000 UTC"; pt.Fields()["value"] != exp { + t.Errorf("NewPoint().String() mismatch.\ngot %v\nexp %v", pt.String(), exp) + } +} + +func TestMakeKeyEscaped(t *testing.T) { + if exp, got := `cpu\ load`, models.MakeKey([]byte(`cpu\ load`), models.Tags{}); string(got) != exp { + t.Errorf("MakeKey() mismatch.\ngot %v\nexp %v", got, exp) + } + + if exp, got := `cpu\ load`, models.MakeKey([]byte(`cpu load`), models.Tags{}); string(got) != exp { + t.Errorf("MakeKey() mismatch.\ngot %v\nexp %v", got, exp) + } + + if exp, got := `cpu\,load`, models.MakeKey([]byte(`cpu\,load`), models.Tags{}); string(got) != exp { + t.Errorf("MakeKey() mismatch.\ngot %v\nexp %v", got, exp) + } + + if exp, got := `cpu\,load`, models.MakeKey([]byte(`cpu,load`), models.Tags{}); string(got) != exp { + t.Errorf("MakeKey() mismatch.\ngot %v\nexp %v", got, exp) + } + +} + +func TestPrecisionString(t *testing.T) { + tags := map[string]interface{}{"value": float64(1)} + tm, _ := time.Parse(time.RFC3339Nano, "2000-01-01T12:34:56.789012345Z") + tests := []struct { + name string + precision string + exp string + }{ + { + name: "no precision", + precision: "", + exp: "cpu value=1 946730096789012345", + }, + { + name: "nanosecond precision", + precision: "ns", + exp: "cpu value=1 946730096789012345", + }, + { + name: "microsecond precision", + precision: "u", + exp: "cpu value=1 946730096789012", + }, + { + name: "millisecond precision", + precision: "ms", + exp: "cpu value=1 946730096789", + }, + { + name: "second precision", + precision: "s", + exp: "cpu value=1 946730096", + }, + { + name: "minute precision", + precision: "m", + exp: "cpu value=1 15778834", + }, + { + name: "hour precision", + precision: "h", + exp: "cpu value=1 262980", + }, + } + + for _, test := range tests { + pt := models.MustNewPoint("cpu", nil, tags, tm) + act := pt.PrecisionString(test.precision) + + if act != test.exp { + t.Errorf("%s: PrecisionString() mismatch:\n actual: %v\n exp: %v", + test.name, act, test.exp) + } + } +} + +func TestRoundedString(t *testing.T) { + tags := map[string]interface{}{"value": float64(1)} + tm, _ := time.Parse(time.RFC3339Nano, "2000-01-01T12:34:56.789012345Z") + tests := []struct { + name string + precision time.Duration + exp string + }{ + { + name: "no precision", + precision: time.Duration(0), + exp: "cpu value=1 946730096789012345", + }, + { + name: "nanosecond precision", + precision: time.Nanosecond, + exp: "cpu value=1 946730096789012345", + }, + { + name: "microsecond precision", + precision: time.Microsecond, + exp: "cpu value=1 946730096789012000", + }, + { + name: "millisecond precision", + precision: time.Millisecond, + exp: "cpu value=1 946730096789000000", + }, + { + name: "second precision", + precision: time.Second, + exp: "cpu value=1 946730097000000000", + }, + { + name: "minute precision", + precision: time.Minute, + exp: "cpu value=1 946730100000000000", + }, + { + name: "hour precision", + precision: time.Hour, + exp: "cpu value=1 946731600000000000", + }, + } + + for _, test := range tests { + pt := models.MustNewPoint("cpu", nil, tags, tm) + act := pt.RoundedString(test.precision) + + if act != test.exp { + t.Errorf("%s: RoundedString() mismatch:\n actual: %v\n exp: %v", + test.name, act, test.exp) + } + } +} + +func TestParsePointsStringWithExtraBuffer(t *testing.T) { + b := make([]byte, 70*5000) + buf := bytes.NewBuffer(b) + key := "cpu,host=A,region=uswest" + buf.WriteString(fmt.Sprintf("%s value=%.3f 1\n", key, rand.Float64())) + + points, err := models.ParsePointsString(buf.String()) + if err != nil { + t.Fatalf("failed to write points: %s", err.Error()) + } + + pointKey := string(points[0].Key()) + + if len(key) != len(pointKey) { + t.Fatalf("expected length of both keys are same but got %d and %d", len(key), len(pointKey)) + } + + if key != pointKey { + t.Fatalf("expected both keys are same but got %s and %s", key, pointKey) + } +} + +func TestParsePointsQuotesInFieldKey(t *testing.T) { + buf := `cpu "a=1 +cpu value=2 1` + points, err := models.ParsePointsString(buf) + if err != nil { + t.Fatalf("failed to write points: %s", err.Error()) + } + + pointFields := points[0].Fields() + value, ok := pointFields["\"a"] + if !ok { + t.Fatalf("expected to parse field '\"a'") + } + + if value != float64(1) { + t.Fatalf("expected field value to be 1, got %v", value) + } + + // The following input should not parse + buf = `cpu "\, '= "\ v=1.0` + _, err = models.ParsePointsString(buf) + if err == nil { + t.Fatalf("expected parsing failure but got no error") + } +} + +func TestParsePointsQuotesInTags(t *testing.T) { + buf := `t159,label=hey\ "ya a=1i,value=0i +t159,label=another a=2i,value=1i 1` + points, err := models.ParsePointsString(buf) + if err != nil { + t.Fatalf("failed to write points: %s", err.Error()) + } + + if len(points) != 2 { + t.Fatalf("expected 2 points, got %d", len(points)) + } +} + +func TestNewPointsWithBytesWithCorruptData(t *testing.T) { + corrupted := []byte{0, 0, 0, 3, 102, 111, 111, 0, 0, 0, 4, 61, 34, 65, 34, 1, 0, 0, 0, 14, 206, 86, 119, 24, 32, 72, 233, 168, 2, 148} + p, err := models.NewPointFromBytes(corrupted) + if p != nil || err == nil { + t.Fatalf("NewPointFromBytes: got: (%v, %v), expected: (nil, error)", p, err) + } +} + +func TestNewPointsRejectsEmptyFieldNames(t *testing.T) { + if _, err := models.NewPoint("foo", nil, models.Fields{"": 1}, time.Now()); err == nil { + t.Fatalf("new point with empty field name. got: nil, expected: error") + } +} + +func TestNewPointsRejectsMaxKey(t *testing.T) { + var key string + for i := 0; i < 65536; i++ { + key += "a" + } + + if _, err := models.NewPoint(key, nil, models.Fields{"value": 1}, time.Now()); err == nil { + t.Fatalf("new point with max key. got: nil, expected: error") + } + + if _, err := models.ParsePointsString(fmt.Sprintf("%v value=1", key)); err == nil { + t.Fatalf("parse point with max key. got: nil, expected: error") + } +} diff --git a/vendor/github.com/influxdata/influxdb/monitor/config_test.go b/vendor/github.com/influxdata/influxdb/monitor/config_test.go new file mode 100644 index 000000000..e0b55988d --- /dev/null +++ b/vendor/github.com/influxdata/influxdb/monitor/config_test.go @@ -0,0 +1,30 @@ +package monitor_test + +import ( + "testing" + "time" + + "github.com/BurntSushi/toml" + "github.com/influxdata/influxdb/monitor" +) + +func TestConfig_Parse(t *testing.T) { + // Parse configuration. + var c monitor.Config + if _, err := toml.Decode(` +store-enabled=true +store-database="the_db" +store-interval="10m" +`, &c); err != nil { + t.Fatal(err) + } + + // Validate configuration. + if !c.StoreEnabled { + t.Fatalf("unexpected store-enabled: %v", c.StoreEnabled) + } else if c.StoreDatabase != "the_db" { + t.Fatalf("unexpected store-database: %s", c.StoreDatabase) + } else if time.Duration(c.StoreInterval) != 10*time.Minute { + t.Fatalf("unexpected store-interval: %s", c.StoreInterval) + } +} diff --git a/vendor/github.com/influxdata/influxdb/monitor/service.go b/vendor/github.com/influxdata/influxdb/monitor/service.go index 2a43f98cc..9acae874a 100644 --- a/vendor/github.com/influxdata/influxdb/monitor/service.go +++ b/vendor/github.com/influxdata/influxdb/monitor/service.go @@ -12,7 +12,6 @@ import ( "sync" "time" - "github.com/influxdata/influxdb" "github.com/influxdata/influxdb/models" "github.com/influxdata/influxdb/monitor/diagnostics" "github.com/influxdata/influxdb/services/meta" @@ -51,10 +50,8 @@ type Monitor struct { storeInterval time.Duration MetaClient interface { - CreateDatabase(name string) (*meta.DatabaseInfo, error) - CreateRetentionPolicy(database string, rpi *meta.RetentionPolicyInfo) (*meta.RetentionPolicyInfo, error) - SetDefaultRetentionPolicy(database, name string) error - DropRetentionPolicy(database, name string) error + CreateDatabaseWithRetentionPolicy(name string, rpi *meta.RetentionPolicyInfo) (*meta.DatabaseInfo, error) + Database(name string) *meta.DatabaseInfo } // Writer for pushing stats back into the database. @@ -335,31 +332,16 @@ func (m *Monitor) createInternalStorage() { return } - if _, err := m.MetaClient.CreateDatabase(m.storeDatabase); err != nil { - m.Logger.Printf("failed to create database '%s', failed to create storage: %s", - m.storeDatabase, err.Error()) - return - } - - rpi := meta.NewRetentionPolicyInfo(MonitorRetentionPolicy) - rpi.Duration = MonitorRetentionPolicyDuration - rpi.ReplicaN = 1 - if _, err := m.MetaClient.CreateRetentionPolicy(m.storeDatabase, rpi); err != nil { - m.Logger.Printf("failed to create retention policy '%s', failed to create internal storage: %s", - rpi.Name, err.Error()) - return - } + if di := m.MetaClient.Database(m.storeDatabase); di == nil { + rpi := meta.NewRetentionPolicyInfo(MonitorRetentionPolicy) + rpi.Duration = MonitorRetentionPolicyDuration + rpi.ReplicaN = 1 - if err := m.MetaClient.SetDefaultRetentionPolicy(m.storeDatabase, rpi.Name); err != nil { - m.Logger.Printf("failed to set default retention policy on '%s', failed to create internal storage: %s", - m.storeDatabase, err.Error()) - return - } - - err := m.MetaClient.DropRetentionPolicy(m.storeDatabase, "default") - if err != nil && err.Error() != influxdb.ErrRetentionPolicyNotFound("default").Error() { - m.Logger.Printf("failed to delete retention policy 'default', failed to created internal storage: %s", err.Error()) - return + if _, err := m.MetaClient.CreateDatabaseWithRetentionPolicy(m.storeDatabase, rpi); err != nil { + m.Logger.Printf("failed to create database '%s', failed to create storage: %s", + m.storeDatabase, err.Error()) + return + } } // Mark storage creation complete. diff --git a/vendor/github.com/influxdata/influxdb/pkg/deep/equal.go b/vendor/github.com/influxdata/influxdb/pkg/deep/equal.go new file mode 100644 index 000000000..3fa7b4d4f --- /dev/null +++ b/vendor/github.com/influxdata/influxdb/pkg/deep/equal.go @@ -0,0 +1,184 @@ +// Copyright 2009 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// License. +// +// 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 deep // import "github.com/influxdata/influxdb/pkg/deep" + +import ( + "fmt" + "math" + "reflect" +) + +// Equal is a copy of reflect.DeepEqual except that it treats NaN == NaN as true. +func Equal(a1, a2 interface{}) bool { + if a1 == nil || a2 == nil { + return a1 == a2 + } + v1 := reflect.ValueOf(a1) + v2 := reflect.ValueOf(a2) + if v1.Type() != v2.Type() { + return false + } + return deepValueEqual(v1, v2, make(map[visit]bool), 0) +} + +// Tests for deep equality using reflected types. The map argument tracks +// comparisons that have already been seen, which allows short circuiting on +// recursive types. +func deepValueEqual(v1, v2 reflect.Value, visited map[visit]bool, depth int) bool { + if !v1.IsValid() || !v2.IsValid() { + return v1.IsValid() == v2.IsValid() + } + if v1.Type() != v2.Type() { + return false + } + + // if depth > 10 { panic("deepValueEqual") } // for debugging + hard := func(k reflect.Kind) bool { + switch k { + case reflect.Array, reflect.Map, reflect.Slice, reflect.Struct: + return true + } + return false + } + + if v1.CanAddr() && v2.CanAddr() && hard(v1.Kind()) { + addr1 := v1.UnsafeAddr() + addr2 := v2.UnsafeAddr() + if addr1 > addr2 { + // Canonicalize order to reduce number of entries in visited. + addr1, addr2 = addr2, addr1 + } + + // Short circuit if references are identical ... + if addr1 == addr2 { + return true + } + + // ... or already seen + typ := v1.Type() + v := visit{addr1, addr2, typ} + if visited[v] { + return true + } + + // Remember for later. + visited[v] = true + } + + switch v1.Kind() { + case reflect.Array: + for i := 0; i < v1.Len(); i++ { + if !deepValueEqual(v1.Index(i), v2.Index(i), visited, depth+1) { + return false + } + } + return true + case reflect.Slice: + if v1.IsNil() != v2.IsNil() { + return false + } + if v1.Len() != v2.Len() { + return false + } + if v1.Pointer() == v2.Pointer() { + return true + } + for i := 0; i < v1.Len(); i++ { + if !deepValueEqual(v1.Index(i), v2.Index(i), visited, depth+1) { + return false + } + } + return true + case reflect.Interface: + if v1.IsNil() || v2.IsNil() { + return v1.IsNil() == v2.IsNil() + } + return deepValueEqual(v1.Elem(), v2.Elem(), visited, depth+1) + case reflect.Ptr: + return deepValueEqual(v1.Elem(), v2.Elem(), visited, depth+1) + case reflect.Struct: + for i, n := 0, v1.NumField(); i < n; i++ { + if !deepValueEqual(v1.Field(i), v2.Field(i), visited, depth+1) { + return false + } + } + return true + case reflect.Map: + if v1.IsNil() != v2.IsNil() { + return false + } + if v1.Len() != v2.Len() { + return false + } + if v1.Pointer() == v2.Pointer() { + return true + } + for _, k := range v1.MapKeys() { + if !deepValueEqual(v1.MapIndex(k), v2.MapIndex(k), visited, depth+1) { + return false + } + } + return true + case reflect.Func: + if v1.IsNil() && v2.IsNil() { + return true + } + // Can't do better than this: + return false + case reflect.String: + return v1.String() == v2.String() + case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64: + return v1.Int() == v2.Int() + case reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64: + return v1.Uint() == v2.Uint() + case reflect.Float32, reflect.Float64: + // Special handling for floats so that NaN == NaN is true. + f1, f2 := v1.Float(), v2.Float() + if math.IsNaN(f1) && math.IsNaN(f2) { + return true + } + return f1 == f2 + case reflect.Bool: + return v1.Bool() == v2.Bool() + default: + panic(fmt.Sprintf("cannot compare type: %s", v1.Kind().String())) + } +} + +// During deepValueEqual, must keep track of checks that are +// in progress. The comparison algorithm assumes that all +// checks in progress are true when it reencounters them. +// Visited comparisons are stored in a map indexed by visit. +type visit struct { + a1 uintptr + a2 uintptr + typ reflect.Type +} diff --git a/vendor/github.com/influxdata/influxdb/pkg/escape/bytes_test.go b/vendor/github.com/influxdata/influxdb/pkg/escape/bytes_test.go new file mode 100644 index 000000000..118ea9668 --- /dev/null +++ b/vendor/github.com/influxdata/influxdb/pkg/escape/bytes_test.go @@ -0,0 +1,45 @@ +package escape + +import ( + "reflect" + "testing" +) + +func TestUnescape(t *testing.T) { + tests := []struct { + in []byte + out []byte + }{ + { + []byte(nil), + []byte(nil), + }, + + { + []byte(""), + []byte(nil), + }, + + { + []byte("\\,\\\"\\ \\="), + []byte(",\" ="), + }, + + { + []byte("\\\\"), + []byte("\\\\"), + }, + + { + []byte("plain and simple"), + []byte("plain and simple"), + }, + } + + for ii, tt := range tests { + got := Unescape(tt.in) + if !reflect.DeepEqual(got, tt.out) { + t.Errorf("[%d] Unescape(%#v) = %#v, expected %#v", ii, string(tt.in), string(got), string(tt.out)) + } + } +} diff --git a/vendor/github.com/influxdata/influxdb/pkg/slices/strings.go b/vendor/github.com/influxdata/influxdb/pkg/slices/strings.go new file mode 100644 index 000000000..cd1a04060 --- /dev/null +++ b/vendor/github.com/influxdata/influxdb/pkg/slices/strings.go @@ -0,0 +1,40 @@ +package slices // import "github.com/influxdata/influxdb/pkg/slices" + +import "strings" + +// Union combines two string sets +func Union(setA, setB []string, ignoreCase bool) []string { + for _, b := range setB { + if ignoreCase { + if !ExistsIgnoreCase(setA, b) { + setA = append(setA, b) + } + continue + } + if !Exists(setA, b) { + setA = append(setA, b) + } + } + return setA +} + +// Exists checks if a string is in a set +func Exists(set []string, find string) bool { + for _, s := range set { + if s == find { + return true + } + } + return false +} + +// ExistsIgnoreCase checks if a string is in a set but ignores its case +func ExistsIgnoreCase(set []string, find string) bool { + find = strings.ToLower(find) + for _, s := range set { + if strings.ToLower(s) == find { + return true + } + } + return false +} diff --git a/vendor/github.com/influxdata/influxdb/scripts/influxdb.service b/vendor/github.com/influxdata/influxdb/scripts/influxdb.service new file mode 100644 index 000000000..23df5638d --- /dev/null +++ b/vendor/github.com/influxdata/influxdb/scripts/influxdb.service @@ -0,0 +1,21 @@ +# If you modify this, please also make sure to edit init.sh + +[Unit] +Description=InfluxDB is an open-source, distributed, time series database +Documentation=https://docs.influxdata.com/influxdb/ +After=network-online.target + +[Service] +User=influxdb +Group=influxdb +LimitNOFILE=65536 +Environment='STDOUT=/dev/null' +Environment='STDERR=/var/log/influxdb/influxd.log' +EnvironmentFile=-/etc/default/influxdb +ExecStart=/bin/sh -c "/usr/bin/influxd -config /etc/influxdb/influxdb.conf ${INFLUXD_OPTS} >>${STDOUT} 2>>${STDERR}" +KillMode=control-group +Restart=on-failure + +[Install] +WantedBy=multi-user.target +Alias=influxd.service diff --git a/vendor/github.com/influxdata/influxdb/scripts/init.sh b/vendor/github.com/influxdata/influxdb/scripts/init.sh new file mode 100755 index 000000000..e45ae6ee3 --- /dev/null +++ b/vendor/github.com/influxdata/influxdb/scripts/init.sh @@ -0,0 +1,242 @@ +#!/usr/bin/env bash + +### BEGIN INIT INFO +# Provides: influxd +# Required-Start: $all +# Required-Stop: $remote_fs $syslog +# Default-Start: 2 3 4 5 +# Default-Stop: 0 1 6 +# Short-Description: Start influxd at boot time +### END INIT INFO + +# If you modify this, please make sure to also edit influxdb.service +# this init script supports three different variations: +# 1. New lsb that define start-stop-daemon +# 2. Old lsb that don't have start-stop-daemon but define, log, pidofproc and killproc +# 3. Centos installations without lsb-core installed +# +# In the third case we have to define our own functions which are very dumb +# and expect the args to be positioned correctly. + +# Command-line options that can be set in /etc/default/influxdb. These will override +# any config file values. Example: "-join http://1.2.3.4:8086" +DEFAULT=/etc/default/influxdb + +# Daemon options +INFLUXD_OPTS= + +# Process name ( For display ) +NAME=influxdb + +# User and group +USER=influxdb +GROUP=influxdb + +# Daemon name, where is the actual executable +# If the daemon is not there, then exit. +DAEMON=/usr/bin/influxd +[ -x $DAEMON ] || exit 5 + +# Configuration file +CONFIG=/etc/influxdb/influxdb.conf + +# PID file for the daemon +PIDFILE=/var/run/influxdb/influxd.pid +PIDDIR=`dirname $PIDFILE` +if [ ! -d "$PIDDIR" ]; then + mkdir -p $PIDDIR + chown $USER:$GROUP $PIDDIR +fi + +# Max open files +OPEN_FILE_LIMIT=65536 + +if [ -r /lib/lsb/init-functions ]; then + source /lib/lsb/init-functions +fi + +# Logging +if [ -z "$STDOUT" ]; then + STDOUT=/dev/null +fi + +if [ ! -f "$STDOUT" ]; then + mkdir -p $(dirname $STDOUT) +fi + +if [ -z "$STDERR" ]; then + STDERR=/var/log/influxdb/influxd.log +fi + +if [ ! -f "$STDERR" ]; then + mkdir -p $(dirname $STDERR) +fi + +# Overwrite init script variables with /etc/default/influxdb values +if [ -r $DEFAULT ]; then + source $DEFAULT +fi + +function pidofproc() { + if [ $# -ne 3 ]; then + echo "Expected three arguments, e.g. $0 -p pidfile daemon-name" + fi + + PID=`pgrep -f $3` + local PIDFILE=`cat $2` + + if [ "x$PIDFILE" == "x" ]; then + return 1 + fi + + if [ "x$PID" != "x" -a "$PIDFILE" == "$PID" ]; then + return 0 + fi + + return 1 +} + +function killproc() { + if [ $# -ne 3 ]; then + echo "Expected three arguments, e.g. $0 -p pidfile signal" + fi + + PID=`cat $2` + + /bin/kill -s $3 $PID + while true; do + pidof `basename $DAEMON` >/dev/null + if [ $? -ne 0 ]; then + return 0 + fi + + sleep 1 + n=$(expr $n + 1) + if [ $n -eq 30 ]; then + /bin/kill -s SIGKILL $PID + return 0 + fi + done +} + +function log_failure_msg() { + echo "$@" "[ FAILED ]" +} + +function log_success_msg() { + echo "$@" "[ OK ]" +} + +function start() { + # Check if config file exist + if [ ! -r $CONFIG ]; then + log_failure_msg "config file doesn't exist (or you don't have permission to view)" + exit 4 + fi + + # Checked the PID file exists and check the actual status of process + if [ -e $PIDFILE ]; then + PID="$(pgrep -f $PIDFILE)" + if test -n "$PID" && kill -0 "$PID" &>/dev/null; then + # If the status is SUCCESS then don't need to start again. + log_failure_msg "$NAME process is running" + exit 0 # Exit + fi + # if PID file does not exist, check if writable + else + su -s /bin/sh -c "touch $PIDFILE" $USER > /dev/null 2>&1 + if [ $? -ne 0 ]; then + log_failure_msg "$PIDFILE not writable, check permissions" + exit 5 + fi + fi + + # Bump the file limits, before launching the daemon. These will carry over to + # launched processes. + ulimit -n $OPEN_FILE_LIMIT + if [ $? -ne 0 ]; then + log_failure_msg "set open file limit to $OPEN_FILE_LIMIT" + exit 1 + fi + + log_success_msg "Starting the process" "$NAME" + if which start-stop-daemon > /dev/null 2>&1; then + start-stop-daemon --chuid $GROUP:$USER --start --quiet --pidfile $PIDFILE --exec $DAEMON -- -pidfile $PIDFILE -config $CONFIG $INFLUXD_OPTS >>$STDOUT 2>>$STDERR & + else + su -s /bin/sh -c "nohup $DAEMON -pidfile $PIDFILE -config $CONFIG $INFLUXD_OPTS >>$STDOUT 2>>$STDERR &" $USER + fi + log_success_msg "$NAME process was started" +} + +function stop() { + # Stop the daemon. + if [ -e $PIDFILE ]; then + PID="$(pgrep -f $PIDFILE)" + if test -n "$PID" && kill -0 "$PID" &>/dev/null; then + if killproc -p $PIDFILE SIGTERM && /bin/rm -rf $PIDFILE; then + log_success_msg "$NAME process was stopped" + else + log_failure_msg "$NAME failed to stop service" + fi + fi + else + log_failure_msg "$NAME process is not running" + fi +} + +function restart() { + # Restart the daemon. + PID="$(pgrep -f $PIDFILE)" + stop + while test -n "$PID" && test -d "/proc/$PID" &>/dev/null + do + echo "Process $PID is still running..." + sleep 1 + done + start +} + +function status() { + # Check the status of the process. + if [ -e $PIDFILE ]; then + PID="$(pgrep -f $PIDFILE)" + if test -n "$PID" && test -d "/proc/$PID" &>/dev/null; then + log_success_msg "$NAME Process is running" + exit 0 + else + log_failure_msg "$NAME Process is not running" + exit 1 + fi + else + log_failure_msg "$NAME Process is not running" + exit 3 + fi +} + +case $1 in + start) + start + ;; + + stop) + stop + ;; + + restart) + restart + ;; + + status) + status + ;; + + version) + $DAEMON version + ;; + + *) + # For invalid arguments, print the usage message. + echo "Usage: $0 {start|stop|restart|status|version}" + exit 2 + ;; +esac diff --git a/vendor/github.com/influxdata/influxdb/scripts/logrotate b/vendor/github.com/influxdata/influxdb/scripts/logrotate new file mode 100644 index 000000000..de410d48c --- /dev/null +++ b/vendor/github.com/influxdata/influxdb/scripts/logrotate @@ -0,0 +1,8 @@ +/var/log/influxdb/influxd.log { + daily + rotate 7 + missingok + dateext + copytruncate + compress +} diff --git a/vendor/github.com/influxdata/influxdb/scripts/post-install.sh b/vendor/github.com/influxdata/influxdb/scripts/post-install.sh new file mode 100644 index 000000000..e77cc3d36 --- /dev/null +++ b/vendor/github.com/influxdata/influxdb/scripts/post-install.sh @@ -0,0 +1,73 @@ +#!/bin/bash + +BIN_DIR=/usr/bin +DATA_DIR=/var/lib/influxdb +LOG_DIR=/var/log/influxdb +SCRIPT_DIR=/usr/lib/influxdb/scripts +LOGROTATE_DIR=/etc/logrotate.d + +function install_init { + cp -f $SCRIPT_DIR/init.sh /etc/init.d/influxdb + chmod +x /etc/init.d/influxdb +} + +function install_systemd { + cp -f $SCRIPT_DIR/influxdb.service /lib/systemd/system/influxdb.service + systemctl enable influxdb +} + +function install_update_rcd { + update-rc.d influxdb defaults +} + +function install_chkconfig { + chkconfig --add influxdb +} + +id influxdb &>/dev/null +if [[ $? -ne 0 ]]; then + useradd --system -U -M influxdb -s /bin/false -d $DATA_DIR +fi + +chown -R -L influxdb:influxdb $DATA_DIR +chown -R -L influxdb:influxdb $LOG_DIR + +# Add defaults file, if it doesn't exist +if [[ ! -f /etc/default/influxdb ]]; then + touch /etc/default/influxdb +fi + +# Remove legacy symlink, if it exists +if [[ -L /etc/init.d/influxdb ]]; then + rm -f /etc/init.d/influxdb +fi + +# Distribution-specific logic +if [[ -f /etc/redhat-release ]]; then + # RHEL-variant logic + which systemctl &>/dev/null + if [[ $? -eq 0 ]]; then + install_systemd + else + # Assuming sysv + install_init + install_chkconfig + fi +elif [[ -f /etc/debian_version ]]; then + # Debian/Ubuntu logic + which systemctl &>/dev/null + if [[ $? -eq 0 ]]; then + install_systemd + else + # Assuming sysv + install_init + install_update_rcd + fi +elif [[ -f /etc/os-release ]]; then + source /etc/os-release + if [[ $ID = "amzn" ]]; then + # Amazon Linux logic + install_init + install_chkconfig + fi +fi diff --git a/vendor/github.com/influxdata/influxdb/scripts/post-uninstall.sh b/vendor/github.com/influxdata/influxdb/scripts/post-uninstall.sh new file mode 100644 index 000000000..36dd6dfb7 --- /dev/null +++ b/vendor/github.com/influxdata/influxdb/scripts/post-uninstall.sh @@ -0,0 +1,56 @@ +#!/bin/bash + +function disable_systemd { + systemctl disable influxdb + rm -f /lib/systemd/system/influxdb.service +} + +function disable_update_rcd { + update-rc.d -f influxdb remove + rm -f /etc/init.d/influxdb +} + +function disable_chkconfig { + chkconfig --del influxdb + rm -f /etc/init.d/influxdb +} + +if [[ -f /etc/redhat-release ]]; then + # RHEL-variant logic + if [[ "$1" = "0" ]]; then + # InfluxDB is no longer installed, remove from init system + rm -f /etc/default/influxdb + + which systemctl &>/dev/null + if [[ $? -eq 0 ]]; then + disable_systemd + else + # Assuming sysv + disable_chkconfig + fi + fi +elif [[ -f /etc/lsb-release ]]; then + # Debian/Ubuntu logic + if [[ "$1" != "upgrade" ]]; then + # Remove/purge + rm -f /etc/default/influxdb + + which systemctl &>/dev/null + if [[ $? -eq 0 ]]; then + disable_systemd + else + # Assuming sysv + disable_update_rcd + fi + fi +elif [[ -f /etc/os-release ]]; then + source /etc/os-release + if [[ $ID = "amzn" ]]; then + # Amazon Linux logic + if [[ "$1" = "0" ]]; then + # InfluxDB is no longer installed, remove from init system + rm -f /etc/default/influxdb + disable_chkconfig + fi + fi +fi diff --git a/vendor/github.com/influxdata/influxdb/scripts/pre-install.sh b/vendor/github.com/influxdata/influxdb/scripts/pre-install.sh new file mode 100755 index 000000000..d57ff0f71 --- /dev/null +++ b/vendor/github.com/influxdata/influxdb/scripts/pre-install.sh @@ -0,0 +1,16 @@ +#!/bin/bash + +if [[ -d /etc/opt/influxdb ]]; then + # Legacy configuration found + if [[ ! -d /etc/influxdb ]]; then + # New configuration does not exist, move legacy configuration to new location + echo -e "Please note, InfluxDB's configuration is now located at '/etc/influxdb' (previously '/etc/opt/influxdb')." + mv -vn /etc/opt/influxdb /etc/influxdb + + if [[ -f /etc/influxdb/influxdb.conf ]]; then + backup_name="influxdb.conf.$(date +%s).backup" + echo "A backup of your current configuration can be found at: /etc/influxdb/$backup_name" + cp -a /etc/influxdb/influxdb.conf /etc/influxdb/$backup_name + fi + fi +fi diff --git a/vendor/github.com/influxdata/influxdb/services/admin/README.md b/vendor/github.com/influxdata/influxdb/services/admin/README.md new file mode 100644 index 000000000..cd8944151 --- /dev/null +++ b/vendor/github.com/influxdata/influxdb/services/admin/README.md @@ -0,0 +1,23 @@ +# InfluxDB Admin Interface + +This is the built-in admin interface that ships with InfluxDB. The service is intended to have little overhead and minimal preprocessing steps. + +## How it works + +Static assets, located in the `assets` directory, are embedded in the `influxd` binary and served from memory using a simple fileserver. + +The admin UI itself uses [React](https://github.com/facebook/react) for the user interface to interact directly with the InfluxDB API, usually running on port `8086`. + +## Building + +The only step required to bundle the admin UI with InfluxDB is to create a compressed file system using `statik` as follows: + +``` +go get github.com/rakyll/statik # make sure $GOPATH/bin is listed in your PATH +cd $GOPATH/src/github.com/influxdata/influxdb +go generate github.com/influxdata/influxdb/services/admin +``` + +The `go generate ./...` command will run `statik` to generate the `statik/statik.go` file. The generated `go` file will embed the admin interface assets into the InfluxDB binary. + +This step should be run before submitting any pull requests which include modifications to admin interface assets. diff --git a/vendor/github.com/influxdata/influxdb/services/admin/admin.go b/vendor/github.com/influxdata/influxdb/services/admin/admin.go new file mode 100644 index 000000000..128f2d16f --- /dev/null +++ b/vendor/github.com/influxdata/influxdb/services/admin/admin.go @@ -0,0 +1,4 @@ +package admin // import "github.com/influxdata/influxdb/services/admin" + +//go:generate statik -src=assets +//go:generate go fmt statik/statik.go diff --git a/vendor/github.com/influxdata/influxdb/services/admin/assets/README.md b/vendor/github.com/influxdata/influxdb/services/admin/assets/README.md new file mode 100644 index 000000000..3047d1633 --- /dev/null +++ b/vendor/github.com/influxdata/influxdb/services/admin/assets/README.md @@ -0,0 +1,4 @@ +Please note that these files are embedded into the `influxd` binary using the +[statik](https://github.com/rakyll/statik) tool. `go generate` needs to be run +whenever there are changes made to files in this directory. See the admin +interface readme for more information. diff --git a/vendor/github.com/influxdata/influxdb/services/admin/assets/css/admin.css b/vendor/github.com/influxdata/influxdb/services/admin/assets/css/admin.css new file mode 100644 index 000000000..aaab04c9b --- /dev/null +++ b/vendor/github.com/influxdata/influxdb/services/admin/assets/css/admin.css @@ -0,0 +1,87 @@ +body { + padding-top: 70px; + /* Required padding for .navbar-fixed-top. Remove if using .navbar-static-top. Change if height of navigation changes. */ +} + +html, +body { + height: 100%; + /* The html and body elements cannot have any padding or margin. */ +} + +code { + display: block; +} + +#settings { + display: none; +} + +#settings form > div { + margin-right: 20px; +} + +#settings form input#port { + width: 80px; +} + +#settings form label { + padding-right: 5px; +} + +div#content { + margin-bottom: -10px; +} + +div#table h2 { + color: #999; + margin-top: -8px; + font-size: 16px +} + +textarea#content-data { + font-family: "Courier New"; + height: 200px; +} + +div#query-alerts { + margin-top: 30px; +} + +div#modal-error, div#modal-success, div#query-error, div#query-success { + display: none; +} + +/* Wrapper for page content to push down footer */ +#wrap { + min-height: 100%; + height: auto !important; + height: 100%; + /* Negative indent footer by it's height */ + margin: 0 auto -60px; +} + +/* Set the fixed height of the footer here */ +#push, +#footer { + height: 60px; +} +#footer { + background-color: #f5f5f5; + border-top: 1px solid #dfdfdf; +} + +#footer p { + margin: 20px 0; +} + +/* Lastly, apply responsive CSS fixes as necessary */ +@media (max-width: 767px) { + #footer { + margin-left: -20px; + margin-right: -20px; + padding-left: 20px; + padding-right: 20px; + } +} + diff --git a/vendor/github.com/influxdata/influxdb/services/admin/assets/css/bootstrap.css b/vendor/github.com/influxdata/influxdb/services/admin/assets/css/bootstrap.css new file mode 100644 index 000000000..fb15e3d69 --- /dev/null +++ b/vendor/github.com/influxdata/influxdb/services/admin/assets/css/bootstrap.css @@ -0,0 +1,6584 @@ +/*! + * Bootstrap v3.3.4 (http://getbootstrap.com) + * Copyright 2011-2015 Twitter, Inc. + * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) + */ + +/*! normalize.css v3.0.2 | MIT License | git.io/normalize */ +html { + font-family: sans-serif; + -webkit-text-size-adjust: 100%; + -ms-text-size-adjust: 100%; +} +body { + margin: 0; +} +article, +aside, +details, +figcaption, +figure, +footer, +header, +hgroup, +main, +menu, +nav, +section, +summary { + display: block; +} +audio, +canvas, +progress, +video { + display: inline-block; + vertical-align: baseline; +} +audio:not([controls]) { + display: none; + height: 0; +} +[hidden], +template { + display: none; +} +a { + background-color: transparent; +} +a:active, +a:hover { + outline: 0; +} +abbr[title] { + border-bottom: 1px dotted; +} +b, +strong { + font-weight: bold; +} +dfn { + font-style: italic; +} +h1 { + margin: .67em 0; + font-size: 2em; +} +mark { + color: #000; + background: #ff0; +} +small { + font-size: 80%; +} +sub, +sup { + position: relative; + font-size: 75%; + line-height: 0; + vertical-align: baseline; +} +sup { + top: -.5em; +} +sub { + bottom: -.25em; +} +img { + border: 0; +} +svg:not(:root) { + overflow: hidden; +} +figure { + margin: 1em 40px; +} +hr { + height: 0; + -webkit-box-sizing: content-box; + -moz-box-sizing: content-box; + box-sizing: content-box; +} +pre { + overflow: auto; +} +code, +kbd, +pre, +samp { + font-family: monospace, monospace; + font-size: 1em; +} +button, +input, +optgroup, +select, +textarea { + margin: 0; + font: inherit; + color: inherit; +} +button { + overflow: visible; +} +button, +select { + text-transform: none; +} +button, +html input[type="button"], +input[type="reset"], +input[type="submit"] { + -webkit-appearance: button; + cursor: pointer; +} +button[disabled], +html input[disabled] { + cursor: default; +} +button::-moz-focus-inner, +input::-moz-focus-inner { + padding: 0; + border: 0; +} +input { + line-height: normal; +} +input[type="checkbox"], +input[type="radio"] { + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; + padding: 0; +} +input[type="number"]::-webkit-inner-spin-button, +input[type="number"]::-webkit-outer-spin-button { + height: auto; +} +input[type="search"] { + -webkit-box-sizing: content-box; + -moz-box-sizing: content-box; + box-sizing: content-box; + -webkit-appearance: textfield; +} +input[type="search"]::-webkit-search-cancel-button, +input[type="search"]::-webkit-search-decoration { + -webkit-appearance: none; +} +fieldset { + padding: .35em .625em .75em; + margin: 0 2px; + border: 1px solid #c0c0c0; +} +legend { + padding: 0; + border: 0; +} +textarea { + overflow: auto; +} +optgroup { + font-weight: bold; +} +table { + border-spacing: 0; + border-collapse: collapse; +} +td, +th { + padding: 0; +} +/*! Source: https://github.com/h5bp/html5-boilerplate/blob/master/src/css/main.css */ +@media print { + *, + *:before, + *:after { + color: #000 !important; + text-shadow: none !important; + background: transparent !important; + -webkit-box-shadow: none !important; + box-shadow: none !important; + } + a, + a:visited { + text-decoration: underline; + } + a[href]:after { + content: " (" attr(href) ")"; + } + abbr[title]:after { + content: " (" attr(title) ")"; + } + a[href^="#"]:after, + a[href^="javascript:"]:after { + content: ""; + } + pre, + blockquote { + border: 1px solid #999; + + page-break-inside: avoid; + } + thead { + display: table-header-group; + } + tr, + img { + page-break-inside: avoid; + } + img { + max-width: 100% !important; + } + p, + h2, + h3 { + orphans: 3; + widows: 3; + } + h2, + h3 { + page-break-after: avoid; + } + select { + background: #fff !important; + } + .navbar { + display: none; + } + .btn > .caret, + .dropup > .btn > .caret { + border-top-color: #000 !important; + } + .label { + border: 1px solid #000; + } + .table { + border-collapse: collapse !important; + } + .table td, + .table th { + background-color: #fff !important; + } + .table-bordered th, + .table-bordered td { + border: 1px solid #ddd !important; + } +} +@font-face { + font-family: 'Glyphicons Halflings'; + + src: url('../fonts/glyphicons-halflings-regular.eot'); + src: url('../fonts/glyphicons-halflings-regular.eot?#iefix') format('embedded-opentype'), url('../fonts/glyphicons-halflings-regular.woff2') format('woff2'), url('../fonts/glyphicons-halflings-regular.woff') format('woff'), url('../fonts/glyphicons-halflings-regular.ttf') format('truetype'), url('../fonts/glyphicons-halflings-regular.svg#glyphicons_halflingsregular') format('svg'); +} +.glyphicon { + position: relative; + top: 1px; + display: inline-block; + font-family: 'Glyphicons Halflings'; + font-style: normal; + font-weight: normal; + line-height: 1; + + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; +} +.glyphicon-asterisk:before { + content: "\2a"; +} +.glyphicon-plus:before { + content: "\2b"; +} +.glyphicon-euro:before, +.glyphicon-eur:before { + content: "\20ac"; +} +.glyphicon-minus:before { + content: "\2212"; +} +.glyphicon-cloud:before { + content: "\2601"; +} +.glyphicon-envelope:before { + content: "\2709"; +} +.glyphicon-pencil:before { + content: "\270f"; +} +.glyphicon-glass:before { + content: "\e001"; +} +.glyphicon-music:before { + content: "\e002"; +} +.glyphicon-search:before { + content: "\e003"; +} +.glyphicon-heart:before { + content: "\e005"; +} +.glyphicon-star:before { + content: "\e006"; +} +.glyphicon-star-empty:before { + content: "\e007"; +} +.glyphicon-user:before { + content: "\e008"; +} +.glyphicon-film:before { + content: "\e009"; +} +.glyphicon-th-large:before { + content: "\e010"; +} +.glyphicon-th:before { + content: "\e011"; +} +.glyphicon-th-list:before { + content: "\e012"; +} +.glyphicon-ok:before { + content: "\e013"; +} +.glyphicon-remove:before { + content: "\e014"; +} +.glyphicon-zoom-in:before { + content: "\e015"; +} +.glyphicon-zoom-out:before { + content: "\e016"; +} +.glyphicon-off:before { + content: "\e017"; +} +.glyphicon-signal:before { + content: "\e018"; +} +.glyphicon-cog:before { + content: "\e019"; +} +.glyphicon-trash:before { + content: "\e020"; +} +.glyphicon-home:before { + content: "\e021"; +} +.glyphicon-file:before { + content: "\e022"; +} +.glyphicon-time:before { + content: "\e023"; +} +.glyphicon-road:before { + content: "\e024"; +} +.glyphicon-download-alt:before { + content: "\e025"; +} +.glyphicon-download:before { + content: "\e026"; +} +.glyphicon-upload:before { + content: "\e027"; +} +.glyphicon-inbox:before { + content: "\e028"; +} +.glyphicon-play-circle:before { + content: "\e029"; +} +.glyphicon-repeat:before { + content: "\e030"; +} +.glyphicon-refresh:before { + content: "\e031"; +} +.glyphicon-list-alt:before { + content: "\e032"; +} +.glyphicon-lock:before { + content: "\e033"; +} +.glyphicon-flag:before { + content: "\e034"; +} +.glyphicon-headphones:before { + content: "\e035"; +} +.glyphicon-volume-off:before { + content: "\e036"; +} +.glyphicon-volume-down:before { + content: "\e037"; +} +.glyphicon-volume-up:before { + content: "\e038"; +} +.glyphicon-qrcode:before { + content: "\e039"; +} +.glyphicon-barcode:before { + content: "\e040"; +} +.glyphicon-tag:before { + content: "\e041"; +} +.glyphicon-tags:before { + content: "\e042"; +} +.glyphicon-book:before { + content: "\e043"; +} +.glyphicon-bookmark:before { + content: "\e044"; +} +.glyphicon-print:before { + content: "\e045"; +} +.glyphicon-camera:before { + content: "\e046"; +} +.glyphicon-font:before { + content: "\e047"; +} +.glyphicon-bold:before { + content: "\e048"; +} +.glyphicon-italic:before { + content: "\e049"; +} +.glyphicon-text-height:before { + content: "\e050"; +} +.glyphicon-text-width:before { + content: "\e051"; +} +.glyphicon-align-left:before { + content: "\e052"; +} +.glyphicon-align-center:before { + content: "\e053"; +} +.glyphicon-align-right:before { + content: "\e054"; +} +.glyphicon-align-justify:before { + content: "\e055"; +} +.glyphicon-list:before { + content: "\e056"; +} +.glyphicon-indent-left:before { + content: "\e057"; +} +.glyphicon-indent-right:before { + content: "\e058"; +} +.glyphicon-facetime-video:before { + content: "\e059"; +} +.glyphicon-picture:before { + content: "\e060"; +} +.glyphicon-map-marker:before { + content: "\e062"; +} +.glyphicon-adjust:before { + content: "\e063"; +} +.glyphicon-tint:before { + content: "\e064"; +} +.glyphicon-edit:before { + content: "\e065"; +} +.glyphicon-share:before { + content: "\e066"; +} +.glyphicon-check:before { + content: "\e067"; +} +.glyphicon-move:before { + content: "\e068"; +} +.glyphicon-step-backward:before { + content: "\e069"; +} +.glyphicon-fast-backward:before { + content: "\e070"; +} +.glyphicon-backward:before { + content: "\e071"; +} +.glyphicon-play:before { + content: "\e072"; +} +.glyphicon-pause:before { + content: "\e073"; +} +.glyphicon-stop:before { + content: "\e074"; +} +.glyphicon-forward:before { + content: "\e075"; +} +.glyphicon-fast-forward:before { + content: "\e076"; +} +.glyphicon-step-forward:before { + content: "\e077"; +} +.glyphicon-eject:before { + content: "\e078"; +} +.glyphicon-chevron-left:before { + content: "\e079"; +} +.glyphicon-chevron-right:before { + content: "\e080"; +} +.glyphicon-plus-sign:before { + content: "\e081"; +} +.glyphicon-minus-sign:before { + content: "\e082"; +} +.glyphicon-remove-sign:before { + content: "\e083"; +} +.glyphicon-ok-sign:before { + content: "\e084"; +} +.glyphicon-question-sign:before { + content: "\e085"; +} +.glyphicon-info-sign:before { + content: "\e086"; +} +.glyphicon-screenshot:before { + content: "\e087"; +} +.glyphicon-remove-circle:before { + content: "\e088"; +} +.glyphicon-ok-circle:before { + content: "\e089"; +} +.glyphicon-ban-circle:before { + content: "\e090"; +} +.glyphicon-arrow-left:before { + content: "\e091"; +} +.glyphicon-arrow-right:before { + content: "\e092"; +} +.glyphicon-arrow-up:before { + content: "\e093"; +} +.glyphicon-arrow-down:before { + content: "\e094"; +} +.glyphicon-share-alt:before { + content: "\e095"; +} +.glyphicon-resize-full:before { + content: "\e096"; +} +.glyphicon-resize-small:before { + content: "\e097"; +} +.glyphicon-exclamation-sign:before { + content: "\e101"; +} +.glyphicon-gift:before { + content: "\e102"; +} +.glyphicon-leaf:before { + content: "\e103"; +} +.glyphicon-fire:before { + content: "\e104"; +} +.glyphicon-eye-open:before { + content: "\e105"; +} +.glyphicon-eye-close:before { + content: "\e106"; +} +.glyphicon-warning-sign:before { + content: "\e107"; +} +.glyphicon-plane:before { + content: "\e108"; +} +.glyphicon-calendar:before { + content: "\e109"; +} +.glyphicon-random:before { + content: "\e110"; +} +.glyphicon-comment:before { + content: "\e111"; +} +.glyphicon-magnet:before { + content: "\e112"; +} +.glyphicon-chevron-up:before { + content: "\e113"; +} +.glyphicon-chevron-down:before { + content: "\e114"; +} +.glyphicon-retweet:before { + content: "\e115"; +} +.glyphicon-shopping-cart:before { + content: "\e116"; +} +.glyphicon-folder-close:before { + content: "\e117"; +} +.glyphicon-folder-open:before { + content: "\e118"; +} +.glyphicon-resize-vertical:before { + content: "\e119"; +} +.glyphicon-resize-horizontal:before { + content: "\e120"; +} +.glyphicon-hdd:before { + content: "\e121"; +} +.glyphicon-bullhorn:before { + content: "\e122"; +} +.glyphicon-bell:before { + content: "\e123"; +} +.glyphicon-certificate:before { + content: "\e124"; +} +.glyphicon-thumbs-up:before { + content: "\e125"; +} +.glyphicon-thumbs-down:before { + content: "\e126"; +} +.glyphicon-hand-right:before { + content: "\e127"; +} +.glyphicon-hand-left:before { + content: "\e128"; +} +.glyphicon-hand-up:before { + content: "\e129"; +} +.glyphicon-hand-down:before { + content: "\e130"; +} +.glyphicon-circle-arrow-right:before { + content: "\e131"; +} +.glyphicon-circle-arrow-left:before { + content: "\e132"; +} +.glyphicon-circle-arrow-up:before { + content: "\e133"; +} +.glyphicon-circle-arrow-down:before { + content: "\e134"; +} +.glyphicon-globe:before { + content: "\e135"; +} +.glyphicon-wrench:before { + content: "\e136"; +} +.glyphicon-tasks:before { + content: "\e137"; +} +.glyphicon-filter:before { + content: "\e138"; +} +.glyphicon-briefcase:before { + content: "\e139"; +} +.glyphicon-fullscreen:before { + content: "\e140"; +} +.glyphicon-dashboard:before { + content: "\e141"; +} +.glyphicon-paperclip:before { + content: "\e142"; +} +.glyphicon-heart-empty:before { + content: "\e143"; +} +.glyphicon-link:before { + content: "\e144"; +} +.glyphicon-phone:before { + content: "\e145"; +} +.glyphicon-pushpin:before { + content: "\e146"; +} +.glyphicon-usd:before { + content: "\e148"; +} +.glyphicon-gbp:before { + content: "\e149"; +} +.glyphicon-sort:before { + content: "\e150"; +} +.glyphicon-sort-by-alphabet:before { + content: "\e151"; +} +.glyphicon-sort-by-alphabet-alt:before { + content: "\e152"; +} +.glyphicon-sort-by-order:before { + content: "\e153"; +} +.glyphicon-sort-by-order-alt:before { + content: "\e154"; +} +.glyphicon-sort-by-attributes:before { + content: "\e155"; +} +.glyphicon-sort-by-attributes-alt:before { + content: "\e156"; +} +.glyphicon-unchecked:before { + content: "\e157"; +} +.glyphicon-expand:before { + content: "\e158"; +} +.glyphicon-collapse-down:before { + content: "\e159"; +} +.glyphicon-collapse-up:before { + content: "\e160"; +} +.glyphicon-log-in:before { + content: "\e161"; +} +.glyphicon-flash:before { + content: "\e162"; +} +.glyphicon-log-out:before { + content: "\e163"; +} +.glyphicon-new-window:before { + content: "\e164"; +} +.glyphicon-record:before { + content: "\e165"; +} +.glyphicon-save:before { + content: "\e166"; +} +.glyphicon-open:before { + content: "\e167"; +} +.glyphicon-saved:before { + content: "\e168"; +} +.glyphicon-import:before { + content: "\e169"; +} +.glyphicon-export:before { + content: "\e170"; +} +.glyphicon-send:before { + content: "\e171"; +} +.glyphicon-floppy-disk:before { + content: "\e172"; +} +.glyphicon-floppy-saved:before { + content: "\e173"; +} +.glyphicon-floppy-remove:before { + content: "\e174"; +} +.glyphicon-floppy-save:before { + content: "\e175"; +} +.glyphicon-floppy-open:before { + content: "\e176"; +} +.glyphicon-credit-card:before { + content: "\e177"; +} +.glyphicon-transfer:before { + content: "\e178"; +} +.glyphicon-cutlery:before { + content: "\e179"; +} +.glyphicon-header:before { + content: "\e180"; +} +.glyphicon-compressed:before { + content: "\e181"; +} +.glyphicon-earphone:before { + content: "\e182"; +} +.glyphicon-phone-alt:before { + content: "\e183"; +} +.glyphicon-tower:before { + content: "\e184"; +} +.glyphicon-stats:before { + content: "\e185"; +} +.glyphicon-sd-video:before { + content: "\e186"; +} +.glyphicon-hd-video:before { + content: "\e187"; +} +.glyphicon-subtitles:before { + content: "\e188"; +} +.glyphicon-sound-stereo:before { + content: "\e189"; +} +.glyphicon-sound-dolby:before { + content: "\e190"; +} +.glyphicon-sound-5-1:before { + content: "\e191"; +} +.glyphicon-sound-6-1:before { + content: "\e192"; +} +.glyphicon-sound-7-1:before { + content: "\e193"; +} +.glyphicon-copyright-mark:before { + content: "\e194"; +} +.glyphicon-registration-mark:before { + content: "\e195"; +} +.glyphicon-cloud-download:before { + content: "\e197"; +} +.glyphicon-cloud-upload:before { + content: "\e198"; +} +.glyphicon-tree-conifer:before { + content: "\e199"; +} +.glyphicon-tree-deciduous:before { + content: "\e200"; +} +.glyphicon-cd:before { + content: "\e201"; +} +.glyphicon-save-file:before { + content: "\e202"; +} +.glyphicon-open-file:before { + content: "\e203"; +} +.glyphicon-level-up:before { + content: "\e204"; +} +.glyphicon-copy:before { + content: "\e205"; +} +.glyphicon-paste:before { + content: "\e206"; +} +.glyphicon-alert:before { + content: "\e209"; +} +.glyphicon-equalizer:before { + content: "\e210"; +} +.glyphicon-king:before { + content: "\e211"; +} +.glyphicon-queen:before { + content: "\e212"; +} +.glyphicon-pawn:before { + content: "\e213"; +} +.glyphicon-bishop:before { + content: "\e214"; +} +.glyphicon-knight:before { + content: "\e215"; +} +.glyphicon-baby-formula:before { + content: "\e216"; +} +.glyphicon-tent:before { + content: "\26fa"; +} +.glyphicon-blackboard:before { + content: "\e218"; +} +.glyphicon-bed:before { + content: "\e219"; +} +.glyphicon-apple:before { + content: "\f8ff"; +} +.glyphicon-erase:before { + content: "\e221"; +} +.glyphicon-hourglass:before { + content: "\231b"; +} +.glyphicon-lamp:before { + content: "\e223"; +} +.glyphicon-duplicate:before { + content: "\e224"; +} +.glyphicon-piggy-bank:before { + content: "\e225"; +} +.glyphicon-scissors:before { + content: "\e226"; +} +.glyphicon-bitcoin:before { + content: "\e227"; +} +.glyphicon-btc:before { + content: "\e227"; +} +.glyphicon-xbt:before { + content: "\e227"; +} +.glyphicon-yen:before { + content: "\00a5"; +} +.glyphicon-jpy:before { + content: "\00a5"; +} +.glyphicon-ruble:before { + content: "\20bd"; +} +.glyphicon-rub:before { + content: "\20bd"; +} +.glyphicon-scale:before { + content: "\e230"; +} +.glyphicon-ice-lolly:before { + content: "\e231"; +} +.glyphicon-ice-lolly-tasted:before { + content: "\e232"; +} +.glyphicon-education:before { + content: "\e233"; +} +.glyphicon-option-horizontal:before { + content: "\e234"; +} +.glyphicon-option-vertical:before { + content: "\e235"; +} +.glyphicon-menu-hamburger:before { + content: "\e236"; +} +.glyphicon-modal-window:before { + content: "\e237"; +} +.glyphicon-oil:before { + content: "\e238"; +} +.glyphicon-grain:before { + content: "\e239"; +} +.glyphicon-sunglasses:before { + content: "\e240"; +} +.glyphicon-text-size:before { + content: "\e241"; +} +.glyphicon-text-color:before { + content: "\e242"; +} +.glyphicon-text-background:before { + content: "\e243"; +} +.glyphicon-object-align-top:before { + content: "\e244"; +} +.glyphicon-object-align-bottom:before { + content: "\e245"; +} +.glyphicon-object-align-horizontal:before { + content: "\e246"; +} +.glyphicon-object-align-left:before { + content: "\e247"; +} +.glyphicon-object-align-vertical:before { + content: "\e248"; +} +.glyphicon-object-align-right:before { + content: "\e249"; +} +.glyphicon-triangle-right:before { + content: "\e250"; +} +.glyphicon-triangle-left:before { + content: "\e251"; +} +.glyphicon-triangle-bottom:before { + content: "\e252"; +} +.glyphicon-triangle-top:before { + content: "\e253"; +} +.glyphicon-console:before { + content: "\e254"; +} +.glyphicon-superscript:before { + content: "\e255"; +} +.glyphicon-subscript:before { + content: "\e256"; +} +.glyphicon-menu-left:before { + content: "\e257"; +} +.glyphicon-menu-right:before { + content: "\e258"; +} +.glyphicon-menu-down:before { + content: "\e259"; +} +.glyphicon-menu-up:before { + content: "\e260"; +} +* { + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; +} +*:before, +*:after { + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; +} +html { + font-size: 10px; + + -webkit-tap-highlight-color: rgba(0, 0, 0, 0); +} +body { + font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; + font-size: 14px; + line-height: 1.42857143; + color: #333; + background-color: #fff; +} +input, +button, +select, +textarea { + font-family: inherit; + font-size: inherit; + line-height: inherit; +} +a { + color: #337ab7; + text-decoration: none; +} +a:hover, +a:focus { + color: #23527c; + text-decoration: underline; +} +a:focus { + outline: thin dotted; + outline: 5px auto -webkit-focus-ring-color; + outline-offset: -2px; +} +figure { + margin: 0; +} +img { + vertical-align: middle; +} +.img-responsive, +.thumbnail > img, +.thumbnail a > img, +.carousel-inner > .item > img, +.carousel-inner > .item > a > img { + display: block; + max-width: 100%; + height: auto; +} +.img-rounded { + border-radius: 6px; +} +.img-thumbnail { + display: inline-block; + max-width: 100%; + height: auto; + padding: 4px; + line-height: 1.42857143; + background-color: #fff; + border: 1px solid #ddd; + border-radius: 4px; + -webkit-transition: all .2s ease-in-out; + -o-transition: all .2s ease-in-out; + transition: all .2s ease-in-out; +} +.img-circle { + border-radius: 50%; +} +hr { + margin-top: 20px; + margin-bottom: 20px; + border: 0; + border-top: 1px solid #eee; +} +.sr-only { + position: absolute; + width: 1px; + height: 1px; + padding: 0; + margin: -1px; + overflow: hidden; + clip: rect(0, 0, 0, 0); + border: 0; +} +.sr-only-focusable:active, +.sr-only-focusable:focus { + position: static; + width: auto; + height: auto; + margin: 0; + overflow: visible; + clip: auto; +} +[role="button"] { + cursor: pointer; +} +h1, +h2, +h3, +h4, +h5, +h6, +.h1, +.h2, +.h3, +.h4, +.h5, +.h6 { + font-family: inherit; + font-weight: 500; + line-height: 1.1; + color: inherit; +} +h1 small, +h2 small, +h3 small, +h4 small, +h5 small, +h6 small, +.h1 small, +.h2 small, +.h3 small, +.h4 small, +.h5 small, +.h6 small, +h1 .small, +h2 .small, +h3 .small, +h4 .small, +h5 .small, +h6 .small, +.h1 .small, +.h2 .small, +.h3 .small, +.h4 .small, +.h5 .small, +.h6 .small { + font-weight: normal; + line-height: 1; + color: #777; +} +h1, +.h1, +h2, +.h2, +h3, +.h3 { + margin-top: 20px; + margin-bottom: 10px; +} +h1 small, +.h1 small, +h2 small, +.h2 small, +h3 small, +.h3 small, +h1 .small, +.h1 .small, +h2 .small, +.h2 .small, +h3 .small, +.h3 .small { + font-size: 65%; +} +h4, +.h4, +h5, +.h5, +h6, +.h6 { + margin-top: 10px; + margin-bottom: 10px; +} +h4 small, +.h4 small, +h5 small, +.h5 small, +h6 small, +.h6 small, +h4 .small, +.h4 .small, +h5 .small, +.h5 .small, +h6 .small, +.h6 .small { + font-size: 75%; +} +h1, +.h1 { + font-size: 36px; +} +h2, +.h2 { + font-size: 30px; +} +h3, +.h3 { + font-size: 24px; +} +h4, +.h4 { + font-size: 18px; +} +h5, +.h5 { + font-size: 14px; +} +h6, +.h6 { + font-size: 12px; +} +p { + margin: 0 0 10px; +} +.lead { + margin-bottom: 20px; + font-size: 16px; + font-weight: 300; + line-height: 1.4; +} +@media (min-width: 768px) { + .lead { + font-size: 21px; + } +} +small, +.small { + font-size: 85%; +} +mark, +.mark { + padding: .2em; + background-color: #fcf8e3; +} +.text-left { + text-align: left; +} +.text-right { + text-align: right; +} +.text-center { + text-align: center; +} +.text-justify { + text-align: justify; +} +.text-nowrap { + white-space: nowrap; +} +.text-lowercase { + text-transform: lowercase; +} +.text-uppercase { + text-transform: uppercase; +} +.text-capitalize { + text-transform: capitalize; +} +.text-muted { + color: #777; +} +.text-primary { + color: #337ab7; +} +a.text-primary:hover { + color: #286090; +} +.text-success { + color: #3c763d; +} +a.text-success:hover { + color: #2b542c; +} +.text-info { + color: #31708f; +} +a.text-info:hover { + color: #245269; +} +.text-warning { + color: #8a6d3b; +} +a.text-warning:hover { + color: #66512c; +} +.text-danger { + color: #a94442; +} +a.text-danger:hover { + color: #843534; +} +.bg-primary { + color: #fff; + background-color: #337ab7; +} +a.bg-primary:hover { + background-color: #286090; +} +.bg-success { + background-color: #dff0d8; +} +a.bg-success:hover { + background-color: #c1e2b3; +} +.bg-info { + background-color: #d9edf7; +} +a.bg-info:hover { + background-color: #afd9ee; +} +.bg-warning { + background-color: #fcf8e3; +} +a.bg-warning:hover { + background-color: #f7ecb5; +} +.bg-danger { + background-color: #f2dede; +} +a.bg-danger:hover { + background-color: #e4b9b9; +} +.page-header { + padding-bottom: 9px; + margin: 40px 0 20px; + border-bottom: 1px solid #eee; +} +ul, +ol { + margin-top: 0; + margin-bottom: 10px; +} +ul ul, +ol ul, +ul ol, +ol ol { + margin-bottom: 0; +} +.list-unstyled { + padding-left: 0; + list-style: none; +} +.list-inline { + padding-left: 0; + margin-left: -5px; + list-style: none; +} +.list-inline > li { + display: inline-block; + padding-right: 5px; + padding-left: 5px; +} +dl { + margin-top: 0; + margin-bottom: 20px; +} +dt, +dd { + line-height: 1.42857143; +} +dt { + font-weight: bold; +} +dd { + margin-left: 0; +} +@media (min-width: 768px) { + .dl-horizontal dt { + float: left; + width: 160px; + overflow: hidden; + clear: left; + text-align: right; + text-overflow: ellipsis; + white-space: nowrap; + } + .dl-horizontal dd { + margin-left: 180px; + } +} +abbr[title], +abbr[data-original-title] { + cursor: help; + border-bottom: 1px dotted #777; +} +.initialism { + font-size: 90%; + text-transform: uppercase; +} +blockquote { + padding: 10px 20px; + margin: 0 0 20px; + font-size: 17.5px; + border-left: 5px solid #eee; +} +blockquote p:last-child, +blockquote ul:last-child, +blockquote ol:last-child { + margin-bottom: 0; +} +blockquote footer, +blockquote small, +blockquote .small { + display: block; + font-size: 80%; + line-height: 1.42857143; + color: #777; +} +blockquote footer:before, +blockquote small:before, +blockquote .small:before { + content: '\2014 \00A0'; +} +.blockquote-reverse, +blockquote.pull-right { + padding-right: 15px; + padding-left: 0; + text-align: right; + border-right: 5px solid #eee; + border-left: 0; +} +.blockquote-reverse footer:before, +blockquote.pull-right footer:before, +.blockquote-reverse small:before, +blockquote.pull-right small:before, +.blockquote-reverse .small:before, +blockquote.pull-right .small:before { + content: ''; +} +.blockquote-reverse footer:after, +blockquote.pull-right footer:after, +.blockquote-reverse small:after, +blockquote.pull-right small:after, +.blockquote-reverse .small:after, +blockquote.pull-right .small:after { + content: '\00A0 \2014'; +} +address { + margin-bottom: 20px; + font-style: normal; + line-height: 1.42857143; +} +code, +kbd, +pre, +samp { + font-family: Menlo, Monaco, Consolas, "Courier New", monospace; +} +code { + padding: 2px 4px; + font-size: 90%; + color: #c7254e; + background-color: #f9f2f4; + border-radius: 4px; +} +kbd { + padding: 2px 4px; + font-size: 90%; + color: #fff; + background-color: #333; + border-radius: 3px; + -webkit-box-shadow: inset 0 -1px 0 rgba(0, 0, 0, .25); + box-shadow: inset 0 -1px 0 rgba(0, 0, 0, .25); +} +kbd kbd { + padding: 0; + font-size: 100%; + font-weight: bold; + -webkit-box-shadow: none; + box-shadow: none; +} +pre { + display: block; + padding: 9.5px; + margin: 0 0 10px; + font-size: 13px; + line-height: 1.42857143; + color: #333; + word-break: break-all; + word-wrap: break-word; + background-color: #f5f5f5; + border: 1px solid #ccc; + border-radius: 4px; +} +pre code { + padding: 0; + font-size: inherit; + color: inherit; + white-space: pre-wrap; + background-color: transparent; + border-radius: 0; +} +.pre-scrollable { + max-height: 340px; + overflow-y: scroll; +} +.container { + padding-right: 15px; + padding-left: 15px; + margin-right: auto; + margin-left: auto; +} +@media (min-width: 768px) { + .container { + width: 750px; + } +} +@media (min-width: 992px) { + .container { + width: 970px; + } +} +@media (min-width: 1200px) { + .container { + width: 1170px; + } +} +.container-fluid { + padding-right: 15px; + padding-left: 15px; + margin-right: auto; + margin-left: auto; +} +.row { + margin-right: -15px; + margin-left: -15px; +} +.col-xs-1, .col-sm-1, .col-md-1, .col-lg-1, .col-xs-2, .col-sm-2, .col-md-2, .col-lg-2, .col-xs-3, .col-sm-3, .col-md-3, .col-lg-3, .col-xs-4, .col-sm-4, .col-md-4, .col-lg-4, .col-xs-5, .col-sm-5, .col-md-5, .col-lg-5, .col-xs-6, .col-sm-6, .col-md-6, .col-lg-6, .col-xs-7, .col-sm-7, .col-md-7, .col-lg-7, .col-xs-8, .col-sm-8, .col-md-8, .col-lg-8, .col-xs-9, .col-sm-9, .col-md-9, .col-lg-9, .col-xs-10, .col-sm-10, .col-md-10, .col-lg-10, .col-xs-11, .col-sm-11, .col-md-11, .col-lg-11, .col-xs-12, .col-sm-12, .col-md-12, .col-lg-12 { + position: relative; + min-height: 1px; + padding-right: 15px; + padding-left: 15px; +} +.col-xs-1, .col-xs-2, .col-xs-3, .col-xs-4, .col-xs-5, .col-xs-6, .col-xs-7, .col-xs-8, .col-xs-9, .col-xs-10, .col-xs-11, .col-xs-12 { + float: left; +} +.col-xs-12 { + width: 100%; +} +.col-xs-11 { + width: 91.66666667%; +} +.col-xs-10 { + width: 83.33333333%; +} +.col-xs-9 { + width: 75%; +} +.col-xs-8 { + width: 66.66666667%; +} +.col-xs-7 { + width: 58.33333333%; +} +.col-xs-6 { + width: 50%; +} +.col-xs-5 { + width: 41.66666667%; +} +.col-xs-4 { + width: 33.33333333%; +} +.col-xs-3 { + width: 25%; +} +.col-xs-2 { + width: 16.66666667%; +} +.col-xs-1 { + width: 8.33333333%; +} +.col-xs-pull-12 { + right: 100%; +} +.col-xs-pull-11 { + right: 91.66666667%; +} +.col-xs-pull-10 { + right: 83.33333333%; +} +.col-xs-pull-9 { + right: 75%; +} +.col-xs-pull-8 { + right: 66.66666667%; +} +.col-xs-pull-7 { + right: 58.33333333%; +} +.col-xs-pull-6 { + right: 50%; +} +.col-xs-pull-5 { + right: 41.66666667%; +} +.col-xs-pull-4 { + right: 33.33333333%; +} +.col-xs-pull-3 { + right: 25%; +} +.col-xs-pull-2 { + right: 16.66666667%; +} +.col-xs-pull-1 { + right: 8.33333333%; +} +.col-xs-pull-0 { + right: auto; +} +.col-xs-push-12 { + left: 100%; +} +.col-xs-push-11 { + left: 91.66666667%; +} +.col-xs-push-10 { + left: 83.33333333%; +} +.col-xs-push-9 { + left: 75%; +} +.col-xs-push-8 { + left: 66.66666667%; +} +.col-xs-push-7 { + left: 58.33333333%; +} +.col-xs-push-6 { + left: 50%; +} +.col-xs-push-5 { + left: 41.66666667%; +} +.col-xs-push-4 { + left: 33.33333333%; +} +.col-xs-push-3 { + left: 25%; +} +.col-xs-push-2 { + left: 16.66666667%; +} +.col-xs-push-1 { + left: 8.33333333%; +} +.col-xs-push-0 { + left: auto; +} +.col-xs-offset-12 { + margin-left: 100%; +} +.col-xs-offset-11 { + margin-left: 91.66666667%; +} +.col-xs-offset-10 { + margin-left: 83.33333333%; +} +.col-xs-offset-9 { + margin-left: 75%; +} +.col-xs-offset-8 { + margin-left: 66.66666667%; +} +.col-xs-offset-7 { + margin-left: 58.33333333%; +} +.col-xs-offset-6 { + margin-left: 50%; +} +.col-xs-offset-5 { + margin-left: 41.66666667%; +} +.col-xs-offset-4 { + margin-left: 33.33333333%; +} +.col-xs-offset-3 { + margin-left: 25%; +} +.col-xs-offset-2 { + margin-left: 16.66666667%; +} +.col-xs-offset-1 { + margin-left: 8.33333333%; +} +.col-xs-offset-0 { + margin-left: 0; +} +@media (min-width: 768px) { + .col-sm-1, .col-sm-2, .col-sm-3, .col-sm-4, .col-sm-5, .col-sm-6, .col-sm-7, .col-sm-8, .col-sm-9, .col-sm-10, .col-sm-11, .col-sm-12 { + float: left; + } + .col-sm-12 { + width: 100%; + } + .col-sm-11 { + width: 91.66666667%; + } + .col-sm-10 { + width: 83.33333333%; + } + .col-sm-9 { + width: 75%; + } + .col-sm-8 { + width: 66.66666667%; + } + .col-sm-7 { + width: 58.33333333%; + } + .col-sm-6 { + width: 50%; + } + .col-sm-5 { + width: 41.66666667%; + } + .col-sm-4 { + width: 33.33333333%; + } + .col-sm-3 { + width: 25%; + } + .col-sm-2 { + width: 16.66666667%; + } + .col-sm-1 { + width: 8.33333333%; + } + .col-sm-pull-12 { + right: 100%; + } + .col-sm-pull-11 { + right: 91.66666667%; + } + .col-sm-pull-10 { + right: 83.33333333%; + } + .col-sm-pull-9 { + right: 75%; + } + .col-sm-pull-8 { + right: 66.66666667%; + } + .col-sm-pull-7 { + right: 58.33333333%; + } + .col-sm-pull-6 { + right: 50%; + } + .col-sm-pull-5 { + right: 41.66666667%; + } + .col-sm-pull-4 { + right: 33.33333333%; + } + .col-sm-pull-3 { + right: 25%; + } + .col-sm-pull-2 { + right: 16.66666667%; + } + .col-sm-pull-1 { + right: 8.33333333%; + } + .col-sm-pull-0 { + right: auto; + } + .col-sm-push-12 { + left: 100%; + } + .col-sm-push-11 { + left: 91.66666667%; + } + .col-sm-push-10 { + left: 83.33333333%; + } + .col-sm-push-9 { + left: 75%; + } + .col-sm-push-8 { + left: 66.66666667%; + } + .col-sm-push-7 { + left: 58.33333333%; + } + .col-sm-push-6 { + left: 50%; + } + .col-sm-push-5 { + left: 41.66666667%; + } + .col-sm-push-4 { + left: 33.33333333%; + } + .col-sm-push-3 { + left: 25%; + } + .col-sm-push-2 { + left: 16.66666667%; + } + .col-sm-push-1 { + left: 8.33333333%; + } + .col-sm-push-0 { + left: auto; + } + .col-sm-offset-12 { + margin-left: 100%; + } + .col-sm-offset-11 { + margin-left: 91.66666667%; + } + .col-sm-offset-10 { + margin-left: 83.33333333%; + } + .col-sm-offset-9 { + margin-left: 75%; + } + .col-sm-offset-8 { + margin-left: 66.66666667%; + } + .col-sm-offset-7 { + margin-left: 58.33333333%; + } + .col-sm-offset-6 { + margin-left: 50%; + } + .col-sm-offset-5 { + margin-left: 41.66666667%; + } + .col-sm-offset-4 { + margin-left: 33.33333333%; + } + .col-sm-offset-3 { + margin-left: 25%; + } + .col-sm-offset-2 { + margin-left: 16.66666667%; + } + .col-sm-offset-1 { + margin-left: 8.33333333%; + } + .col-sm-offset-0 { + margin-left: 0; + } +} +@media (min-width: 992px) { + .col-md-1, .col-md-2, .col-md-3, .col-md-4, .col-md-5, .col-md-6, .col-md-7, .col-md-8, .col-md-9, .col-md-10, .col-md-11, .col-md-12 { + float: left; + } + .col-md-12 { + width: 100%; + } + .col-md-11 { + width: 91.66666667%; + } + .col-md-10 { + width: 83.33333333%; + } + .col-md-9 { + width: 75%; + } + .col-md-8 { + width: 66.66666667%; + } + .col-md-7 { + width: 58.33333333%; + } + .col-md-6 { + width: 50%; + } + .col-md-5 { + width: 41.66666667%; + } + .col-md-4 { + width: 33.33333333%; + } + .col-md-3 { + width: 25%; + } + .col-md-2 { + width: 16.66666667%; + } + .col-md-1 { + width: 8.33333333%; + } + .col-md-pull-12 { + right: 100%; + } + .col-md-pull-11 { + right: 91.66666667%; + } + .col-md-pull-10 { + right: 83.33333333%; + } + .col-md-pull-9 { + right: 75%; + } + .col-md-pull-8 { + right: 66.66666667%; + } + .col-md-pull-7 { + right: 58.33333333%; + } + .col-md-pull-6 { + right: 50%; + } + .col-md-pull-5 { + right: 41.66666667%; + } + .col-md-pull-4 { + right: 33.33333333%; + } + .col-md-pull-3 { + right: 25%; + } + .col-md-pull-2 { + right: 16.66666667%; + } + .col-md-pull-1 { + right: 8.33333333%; + } + .col-md-pull-0 { + right: auto; + } + .col-md-push-12 { + left: 100%; + } + .col-md-push-11 { + left: 91.66666667%; + } + .col-md-push-10 { + left: 83.33333333%; + } + .col-md-push-9 { + left: 75%; + } + .col-md-push-8 { + left: 66.66666667%; + } + .col-md-push-7 { + left: 58.33333333%; + } + .col-md-push-6 { + left: 50%; + } + .col-md-push-5 { + left: 41.66666667%; + } + .col-md-push-4 { + left: 33.33333333%; + } + .col-md-push-3 { + left: 25%; + } + .col-md-push-2 { + left: 16.66666667%; + } + .col-md-push-1 { + left: 8.33333333%; + } + .col-md-push-0 { + left: auto; + } + .col-md-offset-12 { + margin-left: 100%; + } + .col-md-offset-11 { + margin-left: 91.66666667%; + } + .col-md-offset-10 { + margin-left: 83.33333333%; + } + .col-md-offset-9 { + margin-left: 75%; + } + .col-md-offset-8 { + margin-left: 66.66666667%; + } + .col-md-offset-7 { + margin-left: 58.33333333%; + } + .col-md-offset-6 { + margin-left: 50%; + } + .col-md-offset-5 { + margin-left: 41.66666667%; + } + .col-md-offset-4 { + margin-left: 33.33333333%; + } + .col-md-offset-3 { + margin-left: 25%; + } + .col-md-offset-2 { + margin-left: 16.66666667%; + } + .col-md-offset-1 { + margin-left: 8.33333333%; + } + .col-md-offset-0 { + margin-left: 0; + } +} +@media (min-width: 1200px) { + .col-lg-1, .col-lg-2, .col-lg-3, .col-lg-4, .col-lg-5, .col-lg-6, .col-lg-7, .col-lg-8, .col-lg-9, .col-lg-10, .col-lg-11, .col-lg-12 { + float: left; + } + .col-lg-12 { + width: 100%; + } + .col-lg-11 { + width: 91.66666667%; + } + .col-lg-10 { + width: 83.33333333%; + } + .col-lg-9 { + width: 75%; + } + .col-lg-8 { + width: 66.66666667%; + } + .col-lg-7 { + width: 58.33333333%; + } + .col-lg-6 { + width: 50%; + } + .col-lg-5 { + width: 41.66666667%; + } + .col-lg-4 { + width: 33.33333333%; + } + .col-lg-3 { + width: 25%; + } + .col-lg-2 { + width: 16.66666667%; + } + .col-lg-1 { + width: 8.33333333%; + } + .col-lg-pull-12 { + right: 100%; + } + .col-lg-pull-11 { + right: 91.66666667%; + } + .col-lg-pull-10 { + right: 83.33333333%; + } + .col-lg-pull-9 { + right: 75%; + } + .col-lg-pull-8 { + right: 66.66666667%; + } + .col-lg-pull-7 { + right: 58.33333333%; + } + .col-lg-pull-6 { + right: 50%; + } + .col-lg-pull-5 { + right: 41.66666667%; + } + .col-lg-pull-4 { + right: 33.33333333%; + } + .col-lg-pull-3 { + right: 25%; + } + .col-lg-pull-2 { + right: 16.66666667%; + } + .col-lg-pull-1 { + right: 8.33333333%; + } + .col-lg-pull-0 { + right: auto; + } + .col-lg-push-12 { + left: 100%; + } + .col-lg-push-11 { + left: 91.66666667%; + } + .col-lg-push-10 { + left: 83.33333333%; + } + .col-lg-push-9 { + left: 75%; + } + .col-lg-push-8 { + left: 66.66666667%; + } + .col-lg-push-7 { + left: 58.33333333%; + } + .col-lg-push-6 { + left: 50%; + } + .col-lg-push-5 { + left: 41.66666667%; + } + .col-lg-push-4 { + left: 33.33333333%; + } + .col-lg-push-3 { + left: 25%; + } + .col-lg-push-2 { + left: 16.66666667%; + } + .col-lg-push-1 { + left: 8.33333333%; + } + .col-lg-push-0 { + left: auto; + } + .col-lg-offset-12 { + margin-left: 100%; + } + .col-lg-offset-11 { + margin-left: 91.66666667%; + } + .col-lg-offset-10 { + margin-left: 83.33333333%; + } + .col-lg-offset-9 { + margin-left: 75%; + } + .col-lg-offset-8 { + margin-left: 66.66666667%; + } + .col-lg-offset-7 { + margin-left: 58.33333333%; + } + .col-lg-offset-6 { + margin-left: 50%; + } + .col-lg-offset-5 { + margin-left: 41.66666667%; + } + .col-lg-offset-4 { + margin-left: 33.33333333%; + } + .col-lg-offset-3 { + margin-left: 25%; + } + .col-lg-offset-2 { + margin-left: 16.66666667%; + } + .col-lg-offset-1 { + margin-left: 8.33333333%; + } + .col-lg-offset-0 { + margin-left: 0; + } +} +table { + background-color: transparent; +} +caption { + padding-top: 8px; + padding-bottom: 8px; + color: #777; + text-align: left; +} +th { + text-align: left; +} +.table { + width: 100%; + max-width: 100%; + margin-bottom: 20px; +} +.table > thead > tr > th, +.table > tbody > tr > th, +.table > tfoot > tr > th, +.table > thead > tr > td, +.table > tbody > tr > td, +.table > tfoot > tr > td { + padding: 8px; + line-height: 1.42857143; + vertical-align: top; + border-top: 1px solid #ddd; +} +.table > thead > tr > th { + vertical-align: bottom; + border-bottom: 2px solid #ddd; +} +.table > caption + thead > tr:first-child > th, +.table > colgroup + thead > tr:first-child > th, +.table > thead:first-child > tr:first-child > th, +.table > caption + thead > tr:first-child > td, +.table > colgroup + thead > tr:first-child > td, +.table > thead:first-child > tr:first-child > td { + border-top: 0; +} +.table > tbody + tbody { + border-top: 2px solid #ddd; +} +.table .table { + background-color: #fff; +} +.table-condensed > thead > tr > th, +.table-condensed > tbody > tr > th, +.table-condensed > tfoot > tr > th, +.table-condensed > thead > tr > td, +.table-condensed > tbody > tr > td, +.table-condensed > tfoot > tr > td { + padding: 5px; +} +.table-bordered { + border: 1px solid #ddd; +} +.table-bordered > thead > tr > th, +.table-bordered > tbody > tr > th, +.table-bordered > tfoot > tr > th, +.table-bordered > thead > tr > td, +.table-bordered > tbody > tr > td, +.table-bordered > tfoot > tr > td { + border: 1px solid #ddd; +} +.table-bordered > thead > tr > th, +.table-bordered > thead > tr > td { + border-bottom-width: 2px; +} +.table-striped > tbody > tr:nth-of-type(odd) { + background-color: #f9f9f9; +} +.table-hover > tbody > tr:hover { + background-color: #f5f5f5; +} +table col[class*="col-"] { + position: static; + display: table-column; + float: none; +} +table td[class*="col-"], +table th[class*="col-"] { + position: static; + display: table-cell; + float: none; +} +.table > thead > tr > td.active, +.table > tbody > tr > td.active, +.table > tfoot > tr > td.active, +.table > thead > tr > th.active, +.table > tbody > tr > th.active, +.table > tfoot > tr > th.active, +.table > thead > tr.active > td, +.table > tbody > tr.active > td, +.table > tfoot > tr.active > td, +.table > thead > tr.active > th, +.table > tbody > tr.active > th, +.table > tfoot > tr.active > th { + background-color: #f5f5f5; +} +.table-hover > tbody > tr > td.active:hover, +.table-hover > tbody > tr > th.active:hover, +.table-hover > tbody > tr.active:hover > td, +.table-hover > tbody > tr:hover > .active, +.table-hover > tbody > tr.active:hover > th { + background-color: #e8e8e8; +} +.table > thead > tr > td.success, +.table > tbody > tr > td.success, +.table > tfoot > tr > td.success, +.table > thead > tr > th.success, +.table > tbody > tr > th.success, +.table > tfoot > tr > th.success, +.table > thead > tr.success > td, +.table > tbody > tr.success > td, +.table > tfoot > tr.success > td, +.table > thead > tr.success > th, +.table > tbody > tr.success > th, +.table > tfoot > tr.success > th { + background-color: #dff0d8; +} +.table-hover > tbody > tr > td.success:hover, +.table-hover > tbody > tr > th.success:hover, +.table-hover > tbody > tr.success:hover > td, +.table-hover > tbody > tr:hover > .success, +.table-hover > tbody > tr.success:hover > th { + background-color: #d0e9c6; +} +.table > thead > tr > td.info, +.table > tbody > tr > td.info, +.table > tfoot > tr > td.info, +.table > thead > tr > th.info, +.table > tbody > tr > th.info, +.table > tfoot > tr > th.info, +.table > thead > tr.info > td, +.table > tbody > tr.info > td, +.table > tfoot > tr.info > td, +.table > thead > tr.info > th, +.table > tbody > tr.info > th, +.table > tfoot > tr.info > th { + background-color: #d9edf7; +} +.table-hover > tbody > tr > td.info:hover, +.table-hover > tbody > tr > th.info:hover, +.table-hover > tbody > tr.info:hover > td, +.table-hover > tbody > tr:hover > .info, +.table-hover > tbody > tr.info:hover > th { + background-color: #c4e3f3; +} +.table > thead > tr > td.warning, +.table > tbody > tr > td.warning, +.table > tfoot > tr > td.warning, +.table > thead > tr > th.warning, +.table > tbody > tr > th.warning, +.table > tfoot > tr > th.warning, +.table > thead > tr.warning > td, +.table > tbody > tr.warning > td, +.table > tfoot > tr.warning > td, +.table > thead > tr.warning > th, +.table > tbody > tr.warning > th, +.table > tfoot > tr.warning > th { + background-color: #fcf8e3; +} +.table-hover > tbody > tr > td.warning:hover, +.table-hover > tbody > tr > th.warning:hover, +.table-hover > tbody > tr.warning:hover > td, +.table-hover > tbody > tr:hover > .warning, +.table-hover > tbody > tr.warning:hover > th { + background-color: #faf2cc; +} +.table > thead > tr > td.danger, +.table > tbody > tr > td.danger, +.table > tfoot > tr > td.danger, +.table > thead > tr > th.danger, +.table > tbody > tr > th.danger, +.table > tfoot > tr > th.danger, +.table > thead > tr.danger > td, +.table > tbody > tr.danger > td, +.table > tfoot > tr.danger > td, +.table > thead > tr.danger > th, +.table > tbody > tr.danger > th, +.table > tfoot > tr.danger > th { + background-color: #f2dede; +} +.table-hover > tbody > tr > td.danger:hover, +.table-hover > tbody > tr > th.danger:hover, +.table-hover > tbody > tr.danger:hover > td, +.table-hover > tbody > tr:hover > .danger, +.table-hover > tbody > tr.danger:hover > th { + background-color: #ebcccc; +} +.table-responsive { + min-height: .01%; + overflow-x: auto; +} +@media screen and (max-width: 767px) { + .table-responsive { + width: 100%; + margin-bottom: 15px; + overflow-y: hidden; + -ms-overflow-style: -ms-autohiding-scrollbar; + border: 1px solid #ddd; + } + .table-responsive > .table { + margin-bottom: 0; + } + .table-responsive > .table > thead > tr > th, + .table-responsive > .table > tbody > tr > th, + .table-responsive > .table > tfoot > tr > th, + .table-responsive > .table > thead > tr > td, + .table-responsive > .table > tbody > tr > td, + .table-responsive > .table > tfoot > tr > td { + white-space: nowrap; + } + .table-responsive > .table-bordered { + border: 0; + } + .table-responsive > .table-bordered > thead > tr > th:first-child, + .table-responsive > .table-bordered > tbody > tr > th:first-child, + .table-responsive > .table-bordered > tfoot > tr > th:first-child, + .table-responsive > .table-bordered > thead > tr > td:first-child, + .table-responsive > .table-bordered > tbody > tr > td:first-child, + .table-responsive > .table-bordered > tfoot > tr > td:first-child { + border-left: 0; + } + .table-responsive > .table-bordered > thead > tr > th:last-child, + .table-responsive > .table-bordered > tbody > tr > th:last-child, + .table-responsive > .table-bordered > tfoot > tr > th:last-child, + .table-responsive > .table-bordered > thead > tr > td:last-child, + .table-responsive > .table-bordered > tbody > tr > td:last-child, + .table-responsive > .table-bordered > tfoot > tr > td:last-child { + border-right: 0; + } + .table-responsive > .table-bordered > tbody > tr:last-child > th, + .table-responsive > .table-bordered > tfoot > tr:last-child > th, + .table-responsive > .table-bordered > tbody > tr:last-child > td, + .table-responsive > .table-bordered > tfoot > tr:last-child > td { + border-bottom: 0; + } +} +fieldset { + min-width: 0; + padding: 0; + margin: 0; + border: 0; +} +legend { + display: block; + width: 100%; + padding: 0; + margin-bottom: 20px; + font-size: 21px; + line-height: inherit; + color: #333; + border: 0; + border-bottom: 1px solid #e5e5e5; +} +label { + display: inline-block; + max-width: 100%; + margin-bottom: 5px; + font-weight: bold; +} +input[type="search"] { + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; +} +input[type="radio"], +input[type="checkbox"] { + margin: 4px 0 0; + margin-top: 1px \9; + line-height: normal; +} +input[type="file"] { + display: block; +} +input[type="range"] { + display: block; + width: 100%; +} +select[multiple], +select[size] { + height: auto; +} +input[type="file"]:focus, +input[type="radio"]:focus, +input[type="checkbox"]:focus { + outline: thin dotted; + outline: 5px auto -webkit-focus-ring-color; + outline-offset: -2px; +} +output { + display: block; + padding-top: 7px; + font-size: 14px; + line-height: 1.42857143; + color: #555; +} +.form-control { + display: block; + width: 100%; + height: 34px; + padding: 6px 12px; + font-size: 14px; + line-height: 1.42857143; + color: #555; + background-color: #fff; + background-image: none; + border: 1px solid #ccc; + border-radius: 4px; + -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075); + box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075); + -webkit-transition: border-color ease-in-out .15s, -webkit-box-shadow ease-in-out .15s; + -o-transition: border-color ease-in-out .15s, box-shadow ease-in-out .15s; + transition: border-color ease-in-out .15s, box-shadow ease-in-out .15s; +} +.form-control:focus { + border-color: #66afe9; + outline: 0; + -webkit-box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(102, 175, 233, .6); + box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(102, 175, 233, .6); +} +.form-control::-moz-placeholder { + color: #999; + opacity: 1; +} +.form-control:-ms-input-placeholder { + color: #999; +} +.form-control::-webkit-input-placeholder { + color: #999; +} +.form-control[disabled], +.form-control[readonly], +fieldset[disabled] .form-control { + background-color: #eee; + opacity: 1; +} +.form-control[disabled], +fieldset[disabled] .form-control { + cursor: not-allowed; +} +textarea.form-control { + height: auto; +} +input[type="search"] { + -webkit-appearance: none; +} +@media screen and (-webkit-min-device-pixel-ratio: 0) { + input[type="date"], + input[type="time"], + input[type="datetime-local"], + input[type="month"] { + line-height: 34px; + } + input[type="date"].input-sm, + input[type="time"].input-sm, + input[type="datetime-local"].input-sm, + input[type="month"].input-sm, + .input-group-sm input[type="date"], + .input-group-sm input[type="time"], + .input-group-sm input[type="datetime-local"], + .input-group-sm input[type="month"] { + line-height: 30px; + } + input[type="date"].input-lg, + input[type="time"].input-lg, + input[type="datetime-local"].input-lg, + input[type="month"].input-lg, + .input-group-lg input[type="date"], + .input-group-lg input[type="time"], + .input-group-lg input[type="datetime-local"], + .input-group-lg input[type="month"] { + line-height: 46px; + } +} +.form-group { + margin-bottom: 15px; +} +.radio, +.checkbox { + position: relative; + display: block; + margin-top: 10px; + margin-bottom: 10px; +} +.radio label, +.checkbox label { + min-height: 20px; + padding-left: 20px; + margin-bottom: 0; + font-weight: normal; + cursor: pointer; +} +.radio input[type="radio"], +.radio-inline input[type="radio"], +.checkbox input[type="checkbox"], +.checkbox-inline input[type="checkbox"] { + position: absolute; + margin-top: 4px \9; + margin-left: -20px; +} +.radio + .radio, +.checkbox + .checkbox { + margin-top: -5px; +} +.radio-inline, +.checkbox-inline { + position: relative; + display: inline-block; + padding-left: 20px; + margin-bottom: 0; + font-weight: normal; + vertical-align: middle; + cursor: pointer; +} +.radio-inline + .radio-inline, +.checkbox-inline + .checkbox-inline { + margin-top: 0; + margin-left: 10px; +} +input[type="radio"][disabled], +input[type="checkbox"][disabled], +input[type="radio"].disabled, +input[type="checkbox"].disabled, +fieldset[disabled] input[type="radio"], +fieldset[disabled] input[type="checkbox"] { + cursor: not-allowed; +} +.radio-inline.disabled, +.checkbox-inline.disabled, +fieldset[disabled] .radio-inline, +fieldset[disabled] .checkbox-inline { + cursor: not-allowed; +} +.radio.disabled label, +.checkbox.disabled label, +fieldset[disabled] .radio label, +fieldset[disabled] .checkbox label { + cursor: not-allowed; +} +.form-control-static { + min-height: 34px; + padding-top: 7px; + padding-bottom: 7px; + margin-bottom: 0; +} +.form-control-static.input-lg, +.form-control-static.input-sm { + padding-right: 0; + padding-left: 0; +} +.input-sm { + height: 30px; + padding: 5px 10px; + font-size: 12px; + line-height: 1.5; + border-radius: 3px; +} +select.input-sm { + height: 30px; + line-height: 30px; +} +textarea.input-sm, +select[multiple].input-sm { + height: auto; +} +.form-group-sm .form-control { + height: 30px; + padding: 5px 10px; + font-size: 12px; + line-height: 1.5; + border-radius: 3px; +} +select.form-group-sm .form-control { + height: 30px; + line-height: 30px; +} +textarea.form-group-sm .form-control, +select[multiple].form-group-sm .form-control { + height: auto; +} +.form-group-sm .form-control-static { + height: 30px; + min-height: 32px; + padding: 5px 10px; + font-size: 12px; + line-height: 1.5; +} +.input-lg { + height: 46px; + padding: 10px 16px; + font-size: 18px; + line-height: 1.3333333; + border-radius: 6px; +} +select.input-lg { + height: 46px; + line-height: 46px; +} +textarea.input-lg, +select[multiple].input-lg { + height: auto; +} +.form-group-lg .form-control { + height: 46px; + padding: 10px 16px; + font-size: 18px; + line-height: 1.3333333; + border-radius: 6px; +} +select.form-group-lg .form-control { + height: 46px; + line-height: 46px; +} +textarea.form-group-lg .form-control, +select[multiple].form-group-lg .form-control { + height: auto; +} +.form-group-lg .form-control-static { + height: 46px; + min-height: 38px; + padding: 10px 16px; + font-size: 18px; + line-height: 1.3333333; +} +.has-feedback { + position: relative; +} +.has-feedback .form-control { + padding-right: 42.5px; +} +.form-control-feedback { + position: absolute; + top: 0; + right: 0; + z-index: 2; + display: block; + width: 34px; + height: 34px; + line-height: 34px; + text-align: center; + pointer-events: none; +} +.input-lg + .form-control-feedback { + width: 46px; + height: 46px; + line-height: 46px; +} +.input-sm + .form-control-feedback { + width: 30px; + height: 30px; + line-height: 30px; +} +.has-success .help-block, +.has-success .control-label, +.has-success .radio, +.has-success .checkbox, +.has-success .radio-inline, +.has-success .checkbox-inline, +.has-success.radio label, +.has-success.checkbox label, +.has-success.radio-inline label, +.has-success.checkbox-inline label { + color: #3c763d; +} +.has-success .form-control { + border-color: #3c763d; + -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075); + box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075); +} +.has-success .form-control:focus { + border-color: #2b542c; + -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075), 0 0 6px #67b168; + box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075), 0 0 6px #67b168; +} +.has-success .input-group-addon { + color: #3c763d; + background-color: #dff0d8; + border-color: #3c763d; +} +.has-success .form-control-feedback { + color: #3c763d; +} +.has-warning .help-block, +.has-warning .control-label, +.has-warning .radio, +.has-warning .checkbox, +.has-warning .radio-inline, +.has-warning .checkbox-inline, +.has-warning.radio label, +.has-warning.checkbox label, +.has-warning.radio-inline label, +.has-warning.checkbox-inline label { + color: #8a6d3b; +} +.has-warning .form-control { + border-color: #8a6d3b; + -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075); + box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075); +} +.has-warning .form-control:focus { + border-color: #66512c; + -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075), 0 0 6px #c0a16b; + box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075), 0 0 6px #c0a16b; +} +.has-warning .input-group-addon { + color: #8a6d3b; + background-color: #fcf8e3; + border-color: #8a6d3b; +} +.has-warning .form-control-feedback { + color: #8a6d3b; +} +.has-error .help-block, +.has-error .control-label, +.has-error .radio, +.has-error .checkbox, +.has-error .radio-inline, +.has-error .checkbox-inline, +.has-error.radio label, +.has-error.checkbox label, +.has-error.radio-inline label, +.has-error.checkbox-inline label { + color: #a94442; +} +.has-error .form-control { + border-color: #a94442; + -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075); + box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075); +} +.has-error .form-control:focus { + border-color: #843534; + -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075), 0 0 6px #ce8483; + box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075), 0 0 6px #ce8483; +} +.has-error .input-group-addon { + color: #a94442; + background-color: #f2dede; + border-color: #a94442; +} +.has-error .form-control-feedback { + color: #a94442; +} +.has-feedback label ~ .form-control-feedback { + top: 25px; +} +.has-feedback label.sr-only ~ .form-control-feedback { + top: 0; +} +.help-block { + display: block; + margin-top: 5px; + margin-bottom: 10px; + color: #737373; +} +@media (min-width: 768px) { + .form-inline .form-group { + display: inline-block; + margin-bottom: 0; + vertical-align: middle; + } + .form-inline .form-control { + display: inline-block; + width: auto; + vertical-align: middle; + } + .form-inline .form-control-static { + display: inline-block; + } + .form-inline .input-group { + display: inline-table; + vertical-align: middle; + } + .form-inline .input-group .input-group-addon, + .form-inline .input-group .input-group-btn, + .form-inline .input-group .form-control { + width: auto; + } + .form-inline .input-group > .form-control { + width: 100%; + } + .form-inline .control-label { + margin-bottom: 0; + vertical-align: middle; + } + .form-inline .radio, + .form-inline .checkbox { + display: inline-block; + margin-top: 0; + margin-bottom: 0; + vertical-align: middle; + } + .form-inline .radio label, + .form-inline .checkbox label { + padding-left: 0; + } + .form-inline .radio input[type="radio"], + .form-inline .checkbox input[type="checkbox"] { + position: relative; + margin-left: 0; + } + .form-inline .has-feedback .form-control-feedback { + top: 0; + } +} +.form-horizontal .radio, +.form-horizontal .checkbox, +.form-horizontal .radio-inline, +.form-horizontal .checkbox-inline { + padding-top: 7px; + margin-top: 0; + margin-bottom: 0; +} +.form-horizontal .radio, +.form-horizontal .checkbox { + min-height: 27px; +} +.form-horizontal .form-group { + margin-right: -15px; + margin-left: -15px; +} +@media (min-width: 768px) { + .form-horizontal .control-label { + padding-top: 7px; + margin-bottom: 0; + text-align: right; + } +} +.form-horizontal .has-feedback .form-control-feedback { + right: 15px; +} +@media (min-width: 768px) { + .form-horizontal .form-group-lg .control-label { + padding-top: 14.333333px; + } +} +@media (min-width: 768px) { + .form-horizontal .form-group-sm .control-label { + padding-top: 6px; + } +} +.btn { + display: inline-block; + padding: 6px 12px; + margin-bottom: 0; + font-size: 14px; + font-weight: normal; + line-height: 1.42857143; + text-align: center; + white-space: nowrap; + vertical-align: middle; + -ms-touch-action: manipulation; + touch-action: manipulation; + cursor: pointer; + -webkit-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; + background-image: none; + border: 1px solid transparent; + border-radius: 4px; +} +.btn:focus, +.btn:active:focus, +.btn.active:focus, +.btn.focus, +.btn:active.focus, +.btn.active.focus { + outline: thin dotted; + outline: 5px auto -webkit-focus-ring-color; + outline-offset: -2px; +} +.btn:hover, +.btn:focus, +.btn.focus { + color: #333; + text-decoration: none; +} +.btn:active, +.btn.active { + background-image: none; + outline: 0; + -webkit-box-shadow: inset 0 3px 5px rgba(0, 0, 0, .125); + box-shadow: inset 0 3px 5px rgba(0, 0, 0, .125); +} +.btn.disabled, +.btn[disabled], +fieldset[disabled] .btn { + pointer-events: none; + cursor: not-allowed; + filter: alpha(opacity=65); + -webkit-box-shadow: none; + box-shadow: none; + opacity: .65; +} +.btn-default { + color: #333; + background-color: #fff; + border-color: #ccc; +} +.btn-default:hover, +.btn-default:focus, +.btn-default.focus, +.btn-default:active, +.btn-default.active, +.open > .dropdown-toggle.btn-default { + color: #333; + background-color: #e6e6e6; + border-color: #adadad; +} +.btn-default:active, +.btn-default.active, +.open > .dropdown-toggle.btn-default { + background-image: none; +} +.btn-default.disabled, +.btn-default[disabled], +fieldset[disabled] .btn-default, +.btn-default.disabled:hover, +.btn-default[disabled]:hover, +fieldset[disabled] .btn-default:hover, +.btn-default.disabled:focus, +.btn-default[disabled]:focus, +fieldset[disabled] .btn-default:focus, +.btn-default.disabled.focus, +.btn-default[disabled].focus, +fieldset[disabled] .btn-default.focus, +.btn-default.disabled:active, +.btn-default[disabled]:active, +fieldset[disabled] .btn-default:active, +.btn-default.disabled.active, +.btn-default[disabled].active, +fieldset[disabled] .btn-default.active { + background-color: #fff; + border-color: #ccc; +} +.btn-default .badge { + color: #fff; + background-color: #333; +} +.btn-primary { + color: #fff; + background-color: #337ab7; + border-color: #2e6da4; +} +.btn-primary:hover, +.btn-primary:focus, +.btn-primary.focus, +.btn-primary:active, +.btn-primary.active, +.open > .dropdown-toggle.btn-primary { + color: #fff; + background-color: #286090; + border-color: #204d74; +} +.btn-primary:active, +.btn-primary.active, +.open > .dropdown-toggle.btn-primary { + background-image: none; +} +.btn-primary.disabled, +.btn-primary[disabled], +fieldset[disabled] .btn-primary, +.btn-primary.disabled:hover, +.btn-primary[disabled]:hover, +fieldset[disabled] .btn-primary:hover, +.btn-primary.disabled:focus, +.btn-primary[disabled]:focus, +fieldset[disabled] .btn-primary:focus, +.btn-primary.disabled.focus, +.btn-primary[disabled].focus, +fieldset[disabled] .btn-primary.focus, +.btn-primary.disabled:active, +.btn-primary[disabled]:active, +fieldset[disabled] .btn-primary:active, +.btn-primary.disabled.active, +.btn-primary[disabled].active, +fieldset[disabled] .btn-primary.active { + background-color: #337ab7; + border-color: #2e6da4; +} +.btn-primary .badge { + color: #337ab7; + background-color: #fff; +} +.btn-success { + color: #fff; + background-color: #5cb85c; + border-color: #4cae4c; +} +.btn-success:hover, +.btn-success:focus, +.btn-success.focus, +.btn-success:active, +.btn-success.active, +.open > .dropdown-toggle.btn-success { + color: #fff; + background-color: #449d44; + border-color: #398439; +} +.btn-success:active, +.btn-success.active, +.open > .dropdown-toggle.btn-success { + background-image: none; +} +.btn-success.disabled, +.btn-success[disabled], +fieldset[disabled] .btn-success, +.btn-success.disabled:hover, +.btn-success[disabled]:hover, +fieldset[disabled] .btn-success:hover, +.btn-success.disabled:focus, +.btn-success[disabled]:focus, +fieldset[disabled] .btn-success:focus, +.btn-success.disabled.focus, +.btn-success[disabled].focus, +fieldset[disabled] .btn-success.focus, +.btn-success.disabled:active, +.btn-success[disabled]:active, +fieldset[disabled] .btn-success:active, +.btn-success.disabled.active, +.btn-success[disabled].active, +fieldset[disabled] .btn-success.active { + background-color: #5cb85c; + border-color: #4cae4c; +} +.btn-success .badge { + color: #5cb85c; + background-color: #fff; +} +.btn-info { + color: #fff; + background-color: #5bc0de; + border-color: #46b8da; +} +.btn-info:hover, +.btn-info:focus, +.btn-info.focus, +.btn-info:active, +.btn-info.active, +.open > .dropdown-toggle.btn-info { + color: #fff; + background-color: #31b0d5; + border-color: #269abc; +} +.btn-info:active, +.btn-info.active, +.open > .dropdown-toggle.btn-info { + background-image: none; +} +.btn-info.disabled, +.btn-info[disabled], +fieldset[disabled] .btn-info, +.btn-info.disabled:hover, +.btn-info[disabled]:hover, +fieldset[disabled] .btn-info:hover, +.btn-info.disabled:focus, +.btn-info[disabled]:focus, +fieldset[disabled] .btn-info:focus, +.btn-info.disabled.focus, +.btn-info[disabled].focus, +fieldset[disabled] .btn-info.focus, +.btn-info.disabled:active, +.btn-info[disabled]:active, +fieldset[disabled] .btn-info:active, +.btn-info.disabled.active, +.btn-info[disabled].active, +fieldset[disabled] .btn-info.active { + background-color: #5bc0de; + border-color: #46b8da; +} +.btn-info .badge { + color: #5bc0de; + background-color: #fff; +} +.btn-warning { + color: #fff; + background-color: #f0ad4e; + border-color: #eea236; +} +.btn-warning:hover, +.btn-warning:focus, +.btn-warning.focus, +.btn-warning:active, +.btn-warning.active, +.open > .dropdown-toggle.btn-warning { + color: #fff; + background-color: #ec971f; + border-color: #d58512; +} +.btn-warning:active, +.btn-warning.active, +.open > .dropdown-toggle.btn-warning { + background-image: none; +} +.btn-warning.disabled, +.btn-warning[disabled], +fieldset[disabled] .btn-warning, +.btn-warning.disabled:hover, +.btn-warning[disabled]:hover, +fieldset[disabled] .btn-warning:hover, +.btn-warning.disabled:focus, +.btn-warning[disabled]:focus, +fieldset[disabled] .btn-warning:focus, +.btn-warning.disabled.focus, +.btn-warning[disabled].focus, +fieldset[disabled] .btn-warning.focus, +.btn-warning.disabled:active, +.btn-warning[disabled]:active, +fieldset[disabled] .btn-warning:active, +.btn-warning.disabled.active, +.btn-warning[disabled].active, +fieldset[disabled] .btn-warning.active { + background-color: #f0ad4e; + border-color: #eea236; +} +.btn-warning .badge { + color: #f0ad4e; + background-color: #fff; +} +.btn-danger { + color: #fff; + background-color: #d9534f; + border-color: #d43f3a; +} +.btn-danger:hover, +.btn-danger:focus, +.btn-danger.focus, +.btn-danger:active, +.btn-danger.active, +.open > .dropdown-toggle.btn-danger { + color: #fff; + background-color: #c9302c; + border-color: #ac2925; +} +.btn-danger:active, +.btn-danger.active, +.open > .dropdown-toggle.btn-danger { + background-image: none; +} +.btn-danger.disabled, +.btn-danger[disabled], +fieldset[disabled] .btn-danger, +.btn-danger.disabled:hover, +.btn-danger[disabled]:hover, +fieldset[disabled] .btn-danger:hover, +.btn-danger.disabled:focus, +.btn-danger[disabled]:focus, +fieldset[disabled] .btn-danger:focus, +.btn-danger.disabled.focus, +.btn-danger[disabled].focus, +fieldset[disabled] .btn-danger.focus, +.btn-danger.disabled:active, +.btn-danger[disabled]:active, +fieldset[disabled] .btn-danger:active, +.btn-danger.disabled.active, +.btn-danger[disabled].active, +fieldset[disabled] .btn-danger.active { + background-color: #d9534f; + border-color: #d43f3a; +} +.btn-danger .badge { + color: #d9534f; + background-color: #fff; +} +.btn-link { + font-weight: normal; + color: #337ab7; + border-radius: 0; +} +.btn-link, +.btn-link:active, +.btn-link.active, +.btn-link[disabled], +fieldset[disabled] .btn-link { + background-color: transparent; + -webkit-box-shadow: none; + box-shadow: none; +} +.btn-link, +.btn-link:hover, +.btn-link:focus, +.btn-link:active { + border-color: transparent; +} +.btn-link:hover, +.btn-link:focus { + color: #23527c; + text-decoration: underline; + background-color: transparent; +} +.btn-link[disabled]:hover, +fieldset[disabled] .btn-link:hover, +.btn-link[disabled]:focus, +fieldset[disabled] .btn-link:focus { + color: #777; + text-decoration: none; +} +.btn-lg, +.btn-group-lg > .btn { + padding: 10px 16px; + font-size: 18px; + line-height: 1.3333333; + border-radius: 6px; +} +.btn-sm, +.btn-group-sm > .btn { + padding: 5px 10px; + font-size: 12px; + line-height: 1.5; + border-radius: 3px; +} +.btn-xs, +.btn-group-xs > .btn { + padding: 1px 5px; + font-size: 12px; + line-height: 1.5; + border-radius: 3px; +} +.btn-block { + display: block; + width: 100%; +} +.btn-block + .btn-block { + margin-top: 5px; +} +input[type="submit"].btn-block, +input[type="reset"].btn-block, +input[type="button"].btn-block { + width: 100%; +} +.fade { + opacity: 0; + -webkit-transition: opacity .15s linear; + -o-transition: opacity .15s linear; + transition: opacity .15s linear; +} +.fade.in { + opacity: 1; +} +.collapse { + display: none; +} +.collapse.in { + display: block; +} +tr.collapse.in { + display: table-row; +} +tbody.collapse.in { + display: table-row-group; +} +.collapsing { + position: relative; + height: 0; + overflow: hidden; + -webkit-transition-timing-function: ease; + -o-transition-timing-function: ease; + transition-timing-function: ease; + -webkit-transition-duration: .35s; + -o-transition-duration: .35s; + transition-duration: .35s; + -webkit-transition-property: height, visibility; + -o-transition-property: height, visibility; + transition-property: height, visibility; +} +.caret { + display: inline-block; + width: 0; + height: 0; + margin-left: 2px; + vertical-align: middle; + border-top: 4px dashed; + border-right: 4px solid transparent; + border-left: 4px solid transparent; +} +.dropup, +.dropdown { + position: relative; +} +.dropdown-toggle:focus { + outline: 0; +} +.dropdown-menu { + position: absolute; + top: 100%; + left: 0; + z-index: 1000; + display: none; + float: left; + min-width: 160px; + padding: 5px 0; + margin: 2px 0 0; + font-size: 14px; + text-align: left; + list-style: none; + background-color: #fff; + -webkit-background-clip: padding-box; + background-clip: padding-box; + border: 1px solid #ccc; + border: 1px solid rgba(0, 0, 0, .15); + border-radius: 4px; + -webkit-box-shadow: 0 6px 12px rgba(0, 0, 0, .175); + box-shadow: 0 6px 12px rgba(0, 0, 0, .175); +} +.dropdown-menu.pull-right { + right: 0; + left: auto; +} +.dropdown-menu .divider { + height: 1px; + margin: 9px 0; + overflow: hidden; + background-color: #e5e5e5; +} +.dropdown-menu > li > a { + display: block; + padding: 3px 20px; + clear: both; + font-weight: normal; + line-height: 1.42857143; + color: #333; + white-space: nowrap; +} +.dropdown-menu > li > a:hover, +.dropdown-menu > li > a:focus { + color: #262626; + text-decoration: none; + background-color: #f5f5f5; +} +.dropdown-menu > .active > a, +.dropdown-menu > .active > a:hover, +.dropdown-menu > .active > a:focus { + color: #fff; + text-decoration: none; + background-color: #337ab7; + outline: 0; +} +.dropdown-menu > .disabled > a, +.dropdown-menu > .disabled > a:hover, +.dropdown-menu > .disabled > a:focus { + color: #777; +} +.dropdown-menu > .disabled > a:hover, +.dropdown-menu > .disabled > a:focus { + text-decoration: none; + cursor: not-allowed; + background-color: transparent; + background-image: none; + filter: progid:DXImageTransform.Microsoft.gradient(enabled = false); +} +.open > .dropdown-menu { + display: block; +} +.open > a { + outline: 0; +} +.dropdown-menu-right { + right: 0; + left: auto; +} +.dropdown-menu-left { + right: auto; + left: 0; +} +.dropdown-header { + display: block; + padding: 3px 20px; + font-size: 12px; + line-height: 1.42857143; + color: #777; + white-space: nowrap; +} +.dropdown-backdrop { + position: fixed; + top: 0; + right: 0; + bottom: 0; + left: 0; + z-index: 990; +} +.pull-right > .dropdown-menu { + right: 0; + left: auto; +} +.dropup .caret, +.navbar-fixed-bottom .dropdown .caret { + content: ""; + border-top: 0; + border-bottom: 4px solid; +} +.dropup .dropdown-menu, +.navbar-fixed-bottom .dropdown .dropdown-menu { + top: auto; + bottom: 100%; + margin-bottom: 2px; +} +@media (min-width: 768px) { + .navbar-right .dropdown-menu { + right: 0; + left: auto; + } + .navbar-right .dropdown-menu-left { + right: auto; + left: 0; + } +} +.btn-group, +.btn-group-vertical { + position: relative; + display: inline-block; + vertical-align: middle; +} +.btn-group > .btn, +.btn-group-vertical > .btn { + position: relative; + float: left; +} +.btn-group > .btn:hover, +.btn-group-vertical > .btn:hover, +.btn-group > .btn:focus, +.btn-group-vertical > .btn:focus, +.btn-group > .btn:active, +.btn-group-vertical > .btn:active, +.btn-group > .btn.active, +.btn-group-vertical > .btn.active { + z-index: 2; +} +.btn-group .btn + .btn, +.btn-group .btn + .btn-group, +.btn-group .btn-group + .btn, +.btn-group .btn-group + .btn-group { + margin-left: -1px; +} +.btn-toolbar { + margin-left: -5px; +} +.btn-toolbar .btn-group, +.btn-toolbar .input-group { + float: left; +} +.btn-toolbar > .btn, +.btn-toolbar > .btn-group, +.btn-toolbar > .input-group { + margin-left: 5px; +} +.btn-group > .btn:not(:first-child):not(:last-child):not(.dropdown-toggle) { + border-radius: 0; +} +.btn-group > .btn:first-child { + margin-left: 0; +} +.btn-group > .btn:first-child:not(:last-child):not(.dropdown-toggle) { + border-top-right-radius: 0; + border-bottom-right-radius: 0; +} +.btn-group > .btn:last-child:not(:first-child), +.btn-group > .dropdown-toggle:not(:first-child) { + border-top-left-radius: 0; + border-bottom-left-radius: 0; +} +.btn-group > .btn-group { + float: left; +} +.btn-group > .btn-group:not(:first-child):not(:last-child) > .btn { + border-radius: 0; +} +.btn-group > .btn-group:first-child:not(:last-child) > .btn:last-child, +.btn-group > .btn-group:first-child:not(:last-child) > .dropdown-toggle { + border-top-right-radius: 0; + border-bottom-right-radius: 0; +} +.btn-group > .btn-group:last-child:not(:first-child) > .btn:first-child { + border-top-left-radius: 0; + border-bottom-left-radius: 0; +} +.btn-group .dropdown-toggle:active, +.btn-group.open .dropdown-toggle { + outline: 0; +} +.btn-group > .btn + .dropdown-toggle { + padding-right: 8px; + padding-left: 8px; +} +.btn-group > .btn-lg + .dropdown-toggle { + padding-right: 12px; + padding-left: 12px; +} +.btn-group.open .dropdown-toggle { + -webkit-box-shadow: inset 0 3px 5px rgba(0, 0, 0, .125); + box-shadow: inset 0 3px 5px rgba(0, 0, 0, .125); +} +.btn-group.open .dropdown-toggle.btn-link { + -webkit-box-shadow: none; + box-shadow: none; +} +.btn .caret { + margin-left: 0; +} +.btn-lg .caret { + border-width: 5px 5px 0; + border-bottom-width: 0; +} +.dropup .btn-lg .caret { + border-width: 0 5px 5px; +} +.btn-group-vertical > .btn, +.btn-group-vertical > .btn-group, +.btn-group-vertical > .btn-group > .btn { + display: block; + float: none; + width: 100%; + max-width: 100%; +} +.btn-group-vertical > .btn-group > .btn { + float: none; +} +.btn-group-vertical > .btn + .btn, +.btn-group-vertical > .btn + .btn-group, +.btn-group-vertical > .btn-group + .btn, +.btn-group-vertical > .btn-group + .btn-group { + margin-top: -1px; + margin-left: 0; +} +.btn-group-vertical > .btn:not(:first-child):not(:last-child) { + border-radius: 0; +} +.btn-group-vertical > .btn:first-child:not(:last-child) { + border-top-right-radius: 4px; + border-bottom-right-radius: 0; + border-bottom-left-radius: 0; +} +.btn-group-vertical > .btn:last-child:not(:first-child) { + border-top-left-radius: 0; + border-top-right-radius: 0; + border-bottom-left-radius: 4px; +} +.btn-group-vertical > .btn-group:not(:first-child):not(:last-child) > .btn { + border-radius: 0; +} +.btn-group-vertical > .btn-group:first-child:not(:last-child) > .btn:last-child, +.btn-group-vertical > .btn-group:first-child:not(:last-child) > .dropdown-toggle { + border-bottom-right-radius: 0; + border-bottom-left-radius: 0; +} +.btn-group-vertical > .btn-group:last-child:not(:first-child) > .btn:first-child { + border-top-left-radius: 0; + border-top-right-radius: 0; +} +.btn-group-justified { + display: table; + width: 100%; + table-layout: fixed; + border-collapse: separate; +} +.btn-group-justified > .btn, +.btn-group-justified > .btn-group { + display: table-cell; + float: none; + width: 1%; +} +.btn-group-justified > .btn-group .btn { + width: 100%; +} +.btn-group-justified > .btn-group .dropdown-menu { + left: auto; +} +[data-toggle="buttons"] > .btn input[type="radio"], +[data-toggle="buttons"] > .btn-group > .btn input[type="radio"], +[data-toggle="buttons"] > .btn input[type="checkbox"], +[data-toggle="buttons"] > .btn-group > .btn input[type="checkbox"] { + position: absolute; + clip: rect(0, 0, 0, 0); + pointer-events: none; +} +.input-group { + position: relative; + display: table; + border-collapse: separate; +} +.input-group[class*="col-"] { + float: none; + padding-right: 0; + padding-left: 0; +} +.input-group .form-control { + position: relative; + z-index: 2; + float: left; + width: 100%; + margin-bottom: 0; +} +.input-group-lg > .form-control, +.input-group-lg > .input-group-addon, +.input-group-lg > .input-group-btn > .btn { + height: 46px; + padding: 10px 16px; + font-size: 18px; + line-height: 1.3333333; + border-radius: 6px; +} +select.input-group-lg > .form-control, +select.input-group-lg > .input-group-addon, +select.input-group-lg > .input-group-btn > .btn { + height: 46px; + line-height: 46px; +} +textarea.input-group-lg > .form-control, +textarea.input-group-lg > .input-group-addon, +textarea.input-group-lg > .input-group-btn > .btn, +select[multiple].input-group-lg > .form-control, +select[multiple].input-group-lg > .input-group-addon, +select[multiple].input-group-lg > .input-group-btn > .btn { + height: auto; +} +.input-group-sm > .form-control, +.input-group-sm > .input-group-addon, +.input-group-sm > .input-group-btn > .btn { + height: 30px; + padding: 5px 10px; + font-size: 12px; + line-height: 1.5; + border-radius: 3px; +} +select.input-group-sm > .form-control, +select.input-group-sm > .input-group-addon, +select.input-group-sm > .input-group-btn > .btn { + height: 30px; + line-height: 30px; +} +textarea.input-group-sm > .form-control, +textarea.input-group-sm > .input-group-addon, +textarea.input-group-sm > .input-group-btn > .btn, +select[multiple].input-group-sm > .form-control, +select[multiple].input-group-sm > .input-group-addon, +select[multiple].input-group-sm > .input-group-btn > .btn { + height: auto; +} +.input-group-addon, +.input-group-btn, +.input-group .form-control { + display: table-cell; +} +.input-group-addon:not(:first-child):not(:last-child), +.input-group-btn:not(:first-child):not(:last-child), +.input-group .form-control:not(:first-child):not(:last-child) { + border-radius: 0; +} +.input-group-addon, +.input-group-btn { + width: 1%; + white-space: nowrap; + vertical-align: middle; +} +.input-group-addon { + padding: 6px 12px; + font-size: 14px; + font-weight: normal; + line-height: 1; + color: #555; + text-align: center; + background-color: #eee; + border: 1px solid #ccc; + border-radius: 4px; +} +.input-group-addon.input-sm { + padding: 5px 10px; + font-size: 12px; + border-radius: 3px; +} +.input-group-addon.input-lg { + padding: 10px 16px; + font-size: 18px; + border-radius: 6px; +} +.input-group-addon input[type="radio"], +.input-group-addon input[type="checkbox"] { + margin-top: 0; +} +.input-group .form-control:first-child, +.input-group-addon:first-child, +.input-group-btn:first-child > .btn, +.input-group-btn:first-child > .btn-group > .btn, +.input-group-btn:first-child > .dropdown-toggle, +.input-group-btn:last-child > .btn:not(:last-child):not(.dropdown-toggle), +.input-group-btn:last-child > .btn-group:not(:last-child) > .btn { + border-top-right-radius: 0; + border-bottom-right-radius: 0; +} +.input-group-addon:first-child { + border-right: 0; +} +.input-group .form-control:last-child, +.input-group-addon:last-child, +.input-group-btn:last-child > .btn, +.input-group-btn:last-child > .btn-group > .btn, +.input-group-btn:last-child > .dropdown-toggle, +.input-group-btn:first-child > .btn:not(:first-child), +.input-group-btn:first-child > .btn-group:not(:first-child) > .btn { + border-top-left-radius: 0; + border-bottom-left-radius: 0; +} +.input-group-addon:last-child { + border-left: 0; +} +.input-group-btn { + position: relative; + font-size: 0; + white-space: nowrap; +} +.input-group-btn > .btn { + position: relative; +} +.input-group-btn > .btn + .btn { + margin-left: -1px; +} +.input-group-btn > .btn:hover, +.input-group-btn > .btn:focus, +.input-group-btn > .btn:active { + z-index: 2; +} +.input-group-btn:first-child > .btn, +.input-group-btn:first-child > .btn-group { + margin-right: -1px; +} +.input-group-btn:last-child > .btn, +.input-group-btn:last-child > .btn-group { + margin-left: -1px; +} +.nav { + padding-left: 0; + margin-bottom: 0; + list-style: none; +} +.nav > li { + position: relative; + display: block; +} +.nav > li > a { + position: relative; + display: block; + padding: 10px 15px; +} +.nav > li > a:hover, +.nav > li > a:focus { + text-decoration: none; + background-color: #eee; +} +.nav > li.disabled > a { + color: #777; +} +.nav > li.disabled > a:hover, +.nav > li.disabled > a:focus { + color: #777; + text-decoration: none; + cursor: not-allowed; + background-color: transparent; +} +.nav .open > a, +.nav .open > a:hover, +.nav .open > a:focus { + background-color: #eee; + border-color: #337ab7; +} +.nav .nav-divider { + height: 1px; + margin: 9px 0; + overflow: hidden; + background-color: #e5e5e5; +} +.nav > li > a > img { + max-width: none; +} +.nav-tabs { + border-bottom: 1px solid #ddd; +} +.nav-tabs > li { + float: left; + margin-bottom: -1px; +} +.nav-tabs > li > a { + margin-right: 2px; + line-height: 1.42857143; + border: 1px solid transparent; + border-radius: 4px 4px 0 0; +} +.nav-tabs > li > a:hover { + border-color: #eee #eee #ddd; +} +.nav-tabs > li.active > a, +.nav-tabs > li.active > a:hover, +.nav-tabs > li.active > a:focus { + color: #555; + cursor: default; + background-color: #fff; + border: 1px solid #ddd; + border-bottom-color: transparent; +} +.nav-tabs.nav-justified { + width: 100%; + border-bottom: 0; +} +.nav-tabs.nav-justified > li { + float: none; +} +.nav-tabs.nav-justified > li > a { + margin-bottom: 5px; + text-align: center; +} +.nav-tabs.nav-justified > .dropdown .dropdown-menu { + top: auto; + left: auto; +} +@media (min-width: 768px) { + .nav-tabs.nav-justified > li { + display: table-cell; + width: 1%; + } + .nav-tabs.nav-justified > li > a { + margin-bottom: 0; + } +} +.nav-tabs.nav-justified > li > a { + margin-right: 0; + border-radius: 4px; +} +.nav-tabs.nav-justified > .active > a, +.nav-tabs.nav-justified > .active > a:hover, +.nav-tabs.nav-justified > .active > a:focus { + border: 1px solid #ddd; +} +@media (min-width: 768px) { + .nav-tabs.nav-justified > li > a { + border-bottom: 1px solid #ddd; + border-radius: 4px 4px 0 0; + } + .nav-tabs.nav-justified > .active > a, + .nav-tabs.nav-justified > .active > a:hover, + .nav-tabs.nav-justified > .active > a:focus { + border-bottom-color: #fff; + } +} +.nav-pills > li { + float: left; +} +.nav-pills > li > a { + border-radius: 4px; +} +.nav-pills > li + li { + margin-left: 2px; +} +.nav-pills > li.active > a, +.nav-pills > li.active > a:hover, +.nav-pills > li.active > a:focus { + color: #fff; + background-color: #337ab7; +} +.nav-stacked > li { + float: none; +} +.nav-stacked > li + li { + margin-top: 2px; + margin-left: 0; +} +.nav-justified { + width: 100%; +} +.nav-justified > li { + float: none; +} +.nav-justified > li > a { + margin-bottom: 5px; + text-align: center; +} +.nav-justified > .dropdown .dropdown-menu { + top: auto; + left: auto; +} +@media (min-width: 768px) { + .nav-justified > li { + display: table-cell; + width: 1%; + } + .nav-justified > li > a { + margin-bottom: 0; + } +} +.nav-tabs-justified { + border-bottom: 0; +} +.nav-tabs-justified > li > a { + margin-right: 0; + border-radius: 4px; +} +.nav-tabs-justified > .active > a, +.nav-tabs-justified > .active > a:hover, +.nav-tabs-justified > .active > a:focus { + border: 1px solid #ddd; +} +@media (min-width: 768px) { + .nav-tabs-justified > li > a { + border-bottom: 1px solid #ddd; + border-radius: 4px 4px 0 0; + } + .nav-tabs-justified > .active > a, + .nav-tabs-justified > .active > a:hover, + .nav-tabs-justified > .active > a:focus { + border-bottom-color: #fff; + } +} +.tab-content > .tab-pane { + display: none; +} +.tab-content > .active { + display: block; +} +.nav-tabs .dropdown-menu { + margin-top: -1px; + border-top-left-radius: 0; + border-top-right-radius: 0; +} +.navbar { + position: relative; + min-height: 50px; + margin-bottom: 20px; + border: 1px solid transparent; +} +@media (min-width: 768px) { + .navbar { + border-radius: 4px; + } +} +@media (min-width: 768px) { + .navbar-header { + float: left; + } +} +.navbar-collapse { + padding-right: 15px; + padding-left: 15px; + overflow-x: visible; + -webkit-overflow-scrolling: touch; + border-top: 1px solid transparent; + -webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, .1); + box-shadow: inset 0 1px 0 rgba(255, 255, 255, .1); +} +.navbar-collapse.in { + overflow-y: auto; +} +@media (min-width: 768px) { + .navbar-collapse { + width: auto; + border-top: 0; + -webkit-box-shadow: none; + box-shadow: none; + } + .navbar-collapse.collapse { + display: block !important; + height: auto !important; + padding-bottom: 0; + overflow: visible !important; + } + .navbar-collapse.in { + overflow-y: visible; + } + .navbar-fixed-top .navbar-collapse, + .navbar-static-top .navbar-collapse, + .navbar-fixed-bottom .navbar-collapse { + padding-right: 0; + padding-left: 0; + } +} +.navbar-fixed-top .navbar-collapse, +.navbar-fixed-bottom .navbar-collapse { + max-height: 340px; +} +@media (max-device-width: 480px) and (orientation: landscape) { + .navbar-fixed-top .navbar-collapse, + .navbar-fixed-bottom .navbar-collapse { + max-height: 200px; + } +} +.container > .navbar-header, +.container-fluid > .navbar-header, +.container > .navbar-collapse, +.container-fluid > .navbar-collapse { + margin-right: -15px; + margin-left: -15px; +} +@media (min-width: 768px) { + .container > .navbar-header, + .container-fluid > .navbar-header, + .container > .navbar-collapse, + .container-fluid > .navbar-collapse { + margin-right: 0; + margin-left: 0; + } +} +.navbar-static-top { + z-index: 1000; + border-width: 0 0 1px; +} +@media (min-width: 768px) { + .navbar-static-top { + border-radius: 0; + } +} +.navbar-fixed-top, +.navbar-fixed-bottom { + position: fixed; + right: 0; + left: 0; + z-index: 1030; +} +@media (min-width: 768px) { + .navbar-fixed-top, + .navbar-fixed-bottom { + border-radius: 0; + } +} +.navbar-fixed-top { + top: 0; + border-width: 0 0 1px; +} +.navbar-fixed-bottom { + bottom: 0; + margin-bottom: 0; + border-width: 1px 0 0; +} +.navbar-brand { + float: left; + height: 50px; + padding: 15px 15px; + font-size: 18px; + line-height: 20px; +} +.navbar-brand:hover, +.navbar-brand:focus { + text-decoration: none; +} +.navbar-brand > img { + display: block; +} +@media (min-width: 768px) { + .navbar > .container .navbar-brand, + .navbar > .container-fluid .navbar-brand { + margin-left: -15px; + } +} +.navbar-toggle { + position: relative; + float: right; + padding: 9px 10px; + margin-top: 8px; + margin-right: 15px; + margin-bottom: 8px; + background-color: transparent; + background-image: none; + border: 1px solid transparent; + border-radius: 4px; +} +.navbar-toggle:focus { + outline: 0; +} +.navbar-toggle .icon-bar { + display: block; + width: 22px; + height: 2px; + border-radius: 1px; +} +.navbar-toggle .icon-bar + .icon-bar { + margin-top: 4px; +} +@media (min-width: 768px) { + .navbar-toggle { + display: none; + } +} +.navbar-nav { + margin: 7.5px -15px; +} +.navbar-nav > li > a { + padding-top: 10px; + padding-bottom: 10px; + line-height: 20px; +} +@media (max-width: 767px) { + .navbar-nav .open .dropdown-menu { + position: static; + float: none; + width: auto; + margin-top: 0; + background-color: transparent; + border: 0; + -webkit-box-shadow: none; + box-shadow: none; + } + .navbar-nav .open .dropdown-menu > li > a, + .navbar-nav .open .dropdown-menu .dropdown-header { + padding: 5px 15px 5px 25px; + } + .navbar-nav .open .dropdown-menu > li > a { + line-height: 20px; + } + .navbar-nav .open .dropdown-menu > li > a:hover, + .navbar-nav .open .dropdown-menu > li > a:focus { + background-image: none; + } +} +@media (min-width: 768px) { + .navbar-nav { + float: left; + margin: 0; + } + .navbar-nav > li { + float: left; + } + .navbar-nav > li > a { + padding-top: 15px; + padding-bottom: 15px; + } +} +.navbar-form { + padding: 10px 15px; + margin-top: 8px; + margin-right: -15px; + margin-bottom: 8px; + margin-left: -15px; + border-top: 1px solid transparent; + border-bottom: 1px solid transparent; + -webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, .1), 0 1px 0 rgba(255, 255, 255, .1); + box-shadow: inset 0 1px 0 rgba(255, 255, 255, .1), 0 1px 0 rgba(255, 255, 255, .1); +} +@media (min-width: 768px) { + .navbar-form .form-group { + display: inline-block; + margin-bottom: 0; + vertical-align: middle; + } + .navbar-form .form-control { + display: inline-block; + width: auto; + vertical-align: middle; + } + .navbar-form .form-control-static { + display: inline-block; + } + .navbar-form .input-group { + display: inline-table; + vertical-align: middle; + } + .navbar-form .input-group .input-group-addon, + .navbar-form .input-group .input-group-btn, + .navbar-form .input-group .form-control { + width: auto; + } + .navbar-form .input-group > .form-control { + width: 100%; + } + .navbar-form .control-label { + margin-bottom: 0; + vertical-align: middle; + } + .navbar-form .radio, + .navbar-form .checkbox { + display: inline-block; + margin-top: 0; + margin-bottom: 0; + vertical-align: middle; + } + .navbar-form .radio label, + .navbar-form .checkbox label { + padding-left: 0; + } + .navbar-form .radio input[type="radio"], + .navbar-form .checkbox input[type="checkbox"] { + position: relative; + margin-left: 0; + } + .navbar-form .has-feedback .form-control-feedback { + top: 0; + } +} +@media (max-width: 767px) { + .navbar-form .form-group { + margin-bottom: 5px; + } + .navbar-form .form-group:last-child { + margin-bottom: 0; + } +} +@media (min-width: 768px) { + .navbar-form { + width: auto; + padding-top: 0; + padding-bottom: 0; + margin-right: 0; + margin-left: 0; + border: 0; + -webkit-box-shadow: none; + box-shadow: none; + } +} +.navbar-nav > li > .dropdown-menu { + margin-top: 0; + border-top-left-radius: 0; + border-top-right-radius: 0; +} +.navbar-fixed-bottom .navbar-nav > li > .dropdown-menu { + margin-bottom: 0; + border-top-left-radius: 4px; + border-top-right-radius: 4px; + border-bottom-right-radius: 0; + border-bottom-left-radius: 0; +} +.navbar-btn { + margin-top: 8px; + margin-bottom: 8px; +} +.navbar-btn.btn-sm { + margin-top: 10px; + margin-bottom: 10px; +} +.navbar-btn.btn-xs { + margin-top: 14px; + margin-bottom: 14px; +} +.navbar-text { + margin-top: 15px; + margin-bottom: 15px; +} +@media (min-width: 768px) { + .navbar-text { + float: left; + margin-right: 15px; + margin-left: 15px; + } +} +@media (min-width: 768px) { + .navbar-left { + float: left !important; + } + .navbar-right { + float: right !important; + margin-right: -15px; + } + .navbar-right ~ .navbar-right { + margin-right: 0; + } +} +.navbar-default { + background-color: #f8f8f8; + border-color: #e7e7e7; +} +.navbar-default .navbar-brand { + color: #777; +} +.navbar-default .navbar-brand:hover, +.navbar-default .navbar-brand:focus { + color: #5e5e5e; + background-color: transparent; +} +.navbar-default .navbar-text { + color: #777; +} +.navbar-default .navbar-nav > li > a { + color: #777; +} +.navbar-default .navbar-nav > li > a:hover, +.navbar-default .navbar-nav > li > a:focus { + color: #333; + background-color: transparent; +} +.navbar-default .navbar-nav > .active > a, +.navbar-default .navbar-nav > .active > a:hover, +.navbar-default .navbar-nav > .active > a:focus { + color: #555; + background-color: #e7e7e7; +} +.navbar-default .navbar-nav > .disabled > a, +.navbar-default .navbar-nav > .disabled > a:hover, +.navbar-default .navbar-nav > .disabled > a:focus { + color: #ccc; + background-color: transparent; +} +.navbar-default .navbar-toggle { + border-color: #ddd; +} +.navbar-default .navbar-toggle:hover, +.navbar-default .navbar-toggle:focus { + background-color: #ddd; +} +.navbar-default .navbar-toggle .icon-bar { + background-color: #888; +} +.navbar-default .navbar-collapse, +.navbar-default .navbar-form { + border-color: #e7e7e7; +} +.navbar-default .navbar-nav > .open > a, +.navbar-default .navbar-nav > .open > a:hover, +.navbar-default .navbar-nav > .open > a:focus { + color: #555; + background-color: #e7e7e7; +} +@media (max-width: 767px) { + .navbar-default .navbar-nav .open .dropdown-menu > li > a { + color: #777; + } + .navbar-default .navbar-nav .open .dropdown-menu > li > a:hover, + .navbar-default .navbar-nav .open .dropdown-menu > li > a:focus { + color: #333; + background-color: transparent; + } + .navbar-default .navbar-nav .open .dropdown-menu > .active > a, + .navbar-default .navbar-nav .open .dropdown-menu > .active > a:hover, + .navbar-default .navbar-nav .open .dropdown-menu > .active > a:focus { + color: #555; + background-color: #e7e7e7; + } + .navbar-default .navbar-nav .open .dropdown-menu > .disabled > a, + .navbar-default .navbar-nav .open .dropdown-menu > .disabled > a:hover, + .navbar-default .navbar-nav .open .dropdown-menu > .disabled > a:focus { + color: #ccc; + background-color: transparent; + } +} +.navbar-default .navbar-link { + color: #777; +} +.navbar-default .navbar-link:hover { + color: #333; +} +.navbar-default .btn-link { + color: #777; +} +.navbar-default .btn-link:hover, +.navbar-default .btn-link:focus { + color: #333; +} +.navbar-default .btn-link[disabled]:hover, +fieldset[disabled] .navbar-default .btn-link:hover, +.navbar-default .btn-link[disabled]:focus, +fieldset[disabled] .navbar-default .btn-link:focus { + color: #ccc; +} +.navbar-inverse { + background-color: #222; + border-color: #080808; +} +.navbar-inverse .navbar-brand { + color: #9d9d9d; +} +.navbar-inverse .navbar-brand:hover, +.navbar-inverse .navbar-brand:focus { + color: #fff; + background-color: transparent; +} +.navbar-inverse .navbar-text { + color: #9d9d9d; +} +.navbar-inverse .navbar-nav > li > a { + color: #9d9d9d; +} +.navbar-inverse .navbar-nav > li > a:hover, +.navbar-inverse .navbar-nav > li > a:focus { + color: #fff; + background-color: transparent; +} +.navbar-inverse .navbar-nav > .active > a, +.navbar-inverse .navbar-nav > .active > a:hover, +.navbar-inverse .navbar-nav > .active > a:focus { + color: #fff; + background-color: #080808; +} +.navbar-inverse .navbar-nav > .disabled > a, +.navbar-inverse .navbar-nav > .disabled > a:hover, +.navbar-inverse .navbar-nav > .disabled > a:focus { + color: #444; + background-color: transparent; +} +.navbar-inverse .navbar-toggle { + border-color: #333; +} +.navbar-inverse .navbar-toggle:hover, +.navbar-inverse .navbar-toggle:focus { + background-color: #333; +} +.navbar-inverse .navbar-toggle .icon-bar { + background-color: #fff; +} +.navbar-inverse .navbar-collapse, +.navbar-inverse .navbar-form { + border-color: #101010; +} +.navbar-inverse .navbar-nav > .open > a, +.navbar-inverse .navbar-nav > .open > a:hover, +.navbar-inverse .navbar-nav > .open > a:focus { + color: #fff; + background-color: #080808; +} +@media (max-width: 767px) { + .navbar-inverse .navbar-nav .open .dropdown-menu > .dropdown-header { + border-color: #080808; + } + .navbar-inverse .navbar-nav .open .dropdown-menu .divider { + background-color: #080808; + } + .navbar-inverse .navbar-nav .open .dropdown-menu > li > a { + color: #9d9d9d; + } + .navbar-inverse .navbar-nav .open .dropdown-menu > li > a:hover, + .navbar-inverse .navbar-nav .open .dropdown-menu > li > a:focus { + color: #fff; + background-color: transparent; + } + .navbar-inverse .navbar-nav .open .dropdown-menu > .active > a, + .navbar-inverse .navbar-nav .open .dropdown-menu > .active > a:hover, + .navbar-inverse .navbar-nav .open .dropdown-menu > .active > a:focus { + color: #fff; + background-color: #080808; + } + .navbar-inverse .navbar-nav .open .dropdown-menu > .disabled > a, + .navbar-inverse .navbar-nav .open .dropdown-menu > .disabled > a:hover, + .navbar-inverse .navbar-nav .open .dropdown-menu > .disabled > a:focus { + color: #444; + background-color: transparent; + } +} +.navbar-inverse .navbar-link { + color: #9d9d9d; +} +.navbar-inverse .navbar-link:hover { + color: #fff; +} +.navbar-inverse .btn-link { + color: #9d9d9d; +} +.navbar-inverse .btn-link:hover, +.navbar-inverse .btn-link:focus { + color: #fff; +} +.navbar-inverse .btn-link[disabled]:hover, +fieldset[disabled] .navbar-inverse .btn-link:hover, +.navbar-inverse .btn-link[disabled]:focus, +fieldset[disabled] .navbar-inverse .btn-link:focus { + color: #444; +} +.breadcrumb { + padding: 8px 15px; + margin-bottom: 20px; + list-style: none; + background-color: #f5f5f5; + border-radius: 4px; +} +.breadcrumb > li { + display: inline-block; +} +.breadcrumb > li + li:before { + padding: 0 5px; + color: #ccc; + content: "/\00a0"; +} +.breadcrumb > .active { + color: #777; +} +.pagination { + display: inline-block; + padding-left: 0; + margin: 20px 0; + border-radius: 4px; +} +.pagination > li { + display: inline; +} +.pagination > li > a, +.pagination > li > span { + position: relative; + float: left; + padding: 6px 12px; + margin-left: -1px; + line-height: 1.42857143; + color: #337ab7; + text-decoration: none; + background-color: #fff; + border: 1px solid #ddd; +} +.pagination > li:first-child > a, +.pagination > li:first-child > span { + margin-left: 0; + border-top-left-radius: 4px; + border-bottom-left-radius: 4px; +} +.pagination > li:last-child > a, +.pagination > li:last-child > span { + border-top-right-radius: 4px; + border-bottom-right-radius: 4px; +} +.pagination > li > a:hover, +.pagination > li > span:hover, +.pagination > li > a:focus, +.pagination > li > span:focus { + color: #23527c; + background-color: #eee; + border-color: #ddd; +} +.pagination > .active > a, +.pagination > .active > span, +.pagination > .active > a:hover, +.pagination > .active > span:hover, +.pagination > .active > a:focus, +.pagination > .active > span:focus { + z-index: 2; + color: #fff; + cursor: default; + background-color: #337ab7; + border-color: #337ab7; +} +.pagination > .disabled > span, +.pagination > .disabled > span:hover, +.pagination > .disabled > span:focus, +.pagination > .disabled > a, +.pagination > .disabled > a:hover, +.pagination > .disabled > a:focus { + color: #777; + cursor: not-allowed; + background-color: #fff; + border-color: #ddd; +} +.pagination-lg > li > a, +.pagination-lg > li > span { + padding: 10px 16px; + font-size: 18px; +} +.pagination-lg > li:first-child > a, +.pagination-lg > li:first-child > span { + border-top-left-radius: 6px; + border-bottom-left-radius: 6px; +} +.pagination-lg > li:last-child > a, +.pagination-lg > li:last-child > span { + border-top-right-radius: 6px; + border-bottom-right-radius: 6px; +} +.pagination-sm > li > a, +.pagination-sm > li > span { + padding: 5px 10px; + font-size: 12px; +} +.pagination-sm > li:first-child > a, +.pagination-sm > li:first-child > span { + border-top-left-radius: 3px; + border-bottom-left-radius: 3px; +} +.pagination-sm > li:last-child > a, +.pagination-sm > li:last-child > span { + border-top-right-radius: 3px; + border-bottom-right-radius: 3px; +} +.pager { + padding-left: 0; + margin: 20px 0; + text-align: center; + list-style: none; +} +.pager li { + display: inline; +} +.pager li > a, +.pager li > span { + display: inline-block; + padding: 5px 14px; + background-color: #fff; + border: 1px solid #ddd; + border-radius: 15px; +} +.pager li > a:hover, +.pager li > a:focus { + text-decoration: none; + background-color: #eee; +} +.pager .next > a, +.pager .next > span { + float: right; +} +.pager .previous > a, +.pager .previous > span { + float: left; +} +.pager .disabled > a, +.pager .disabled > a:hover, +.pager .disabled > a:focus, +.pager .disabled > span { + color: #777; + cursor: not-allowed; + background-color: #fff; +} +.label { + display: inline; + padding: .2em .6em .3em; + font-size: 75%; + font-weight: bold; + line-height: 1; + color: #fff; + text-align: center; + white-space: nowrap; + vertical-align: baseline; + border-radius: .25em; +} +a.label:hover, +a.label:focus { + color: #fff; + text-decoration: none; + cursor: pointer; +} +.label:empty { + display: none; +} +.btn .label { + position: relative; + top: -1px; +} +.label-default { + background-color: #777; +} +.label-default[href]:hover, +.label-default[href]:focus { + background-color: #5e5e5e; +} +.label-primary { + background-color: #337ab7; +} +.label-primary[href]:hover, +.label-primary[href]:focus { + background-color: #286090; +} +.label-success { + background-color: #5cb85c; +} +.label-success[href]:hover, +.label-success[href]:focus { + background-color: #449d44; +} +.label-info { + background-color: #5bc0de; +} +.label-info[href]:hover, +.label-info[href]:focus { + background-color: #31b0d5; +} +.label-warning { + background-color: #f0ad4e; +} +.label-warning[href]:hover, +.label-warning[href]:focus { + background-color: #ec971f; +} +.label-danger { + background-color: #d9534f; +} +.label-danger[href]:hover, +.label-danger[href]:focus { + background-color: #c9302c; +} +.badge { + display: inline-block; + min-width: 10px; + padding: 3px 7px; + font-size: 12px; + font-weight: bold; + line-height: 1; + color: #fff; + text-align: center; + white-space: nowrap; + vertical-align: baseline; + background-color: #777; + border-radius: 10px; +} +.badge:empty { + display: none; +} +.btn .badge { + position: relative; + top: -1px; +} +.btn-xs .badge, +.btn-group-xs > .btn .badge { + top: 0; + padding: 1px 5px; +} +a.badge:hover, +a.badge:focus { + color: #fff; + text-decoration: none; + cursor: pointer; +} +.list-group-item.active > .badge, +.nav-pills > .active > a > .badge { + color: #337ab7; + background-color: #fff; +} +.list-group-item > .badge { + float: right; +} +.list-group-item > .badge + .badge { + margin-right: 5px; +} +.nav-pills > li > a > .badge { + margin-left: 3px; +} +.jumbotron { + padding: 30px 15px; + margin-bottom: 30px; + color: inherit; + background-color: #eee; +} +.jumbotron h1, +.jumbotron .h1 { + color: inherit; +} +.jumbotron p { + margin-bottom: 15px; + font-size: 21px; + font-weight: 200; +} +.jumbotron > hr { + border-top-color: #d5d5d5; +} +.container .jumbotron, +.container-fluid .jumbotron { + border-radius: 6px; +} +.jumbotron .container { + max-width: 100%; +} +@media screen and (min-width: 768px) { + .jumbotron { + padding: 48px 0; + } + .container .jumbotron, + .container-fluid .jumbotron { + padding-right: 60px; + padding-left: 60px; + } + .jumbotron h1, + .jumbotron .h1 { + font-size: 63px; + } +} +.thumbnail { + display: block; + padding: 4px; + margin-bottom: 20px; + line-height: 1.42857143; + background-color: #fff; + border: 1px solid #ddd; + border-radius: 4px; + -webkit-transition: border .2s ease-in-out; + -o-transition: border .2s ease-in-out; + transition: border .2s ease-in-out; +} +.thumbnail > img, +.thumbnail a > img { + margin-right: auto; + margin-left: auto; +} +a.thumbnail:hover, +a.thumbnail:focus, +a.thumbnail.active { + border-color: #337ab7; +} +.thumbnail .caption { + padding: 9px; + color: #333; +} +.alert { + padding: 15px; + margin-bottom: 20px; + border: 1px solid transparent; + border-radius: 4px; +} +.alert h4 { + margin-top: 0; + color: inherit; +} +.alert .alert-link { + font-weight: bold; +} +.alert > p, +.alert > ul { + margin-bottom: 0; +} +.alert > p + p { + margin-top: 5px; +} +.alert-dismissable, +.alert-dismissible { + padding-right: 35px; +} +.alert-dismissable .close, +.alert-dismissible .close { + position: relative; + top: -2px; + right: -21px; + color: inherit; +} +.alert-success { + color: #3c763d; + background-color: #dff0d8; + border-color: #d6e9c6; +} +.alert-success hr { + border-top-color: #c9e2b3; +} +.alert-success .alert-link { + color: #2b542c; +} +.alert-info { + color: #31708f; + background-color: #d9edf7; + border-color: #bce8f1; +} +.alert-info hr { + border-top-color: #a6e1ec; +} +.alert-info .alert-link { + color: #245269; +} +.alert-warning { + color: #8a6d3b; + background-color: #fcf8e3; + border-color: #faebcc; +} +.alert-warning hr { + border-top-color: #f7e1b5; +} +.alert-warning .alert-link { + color: #66512c; +} +.alert-danger { + color: #a94442; + background-color: #f2dede; + border-color: #ebccd1; +} +.alert-danger hr { + border-top-color: #e4b9c0; +} +.alert-danger .alert-link { + color: #843534; +} +@-webkit-keyframes progress-bar-stripes { + from { + background-position: 40px 0; + } + to { + background-position: 0 0; + } +} +@-o-keyframes progress-bar-stripes { + from { + background-position: 40px 0; + } + to { + background-position: 0 0; + } +} +@keyframes progress-bar-stripes { + from { + background-position: 40px 0; + } + to { + background-position: 0 0; + } +} +.progress { + height: 20px; + margin-bottom: 20px; + overflow: hidden; + background-color: #f5f5f5; + border-radius: 4px; + -webkit-box-shadow: inset 0 1px 2px rgba(0, 0, 0, .1); + box-shadow: inset 0 1px 2px rgba(0, 0, 0, .1); +} +.progress-bar { + float: left; + width: 0; + height: 100%; + font-size: 12px; + line-height: 20px; + color: #fff; + text-align: center; + background-color: #337ab7; + -webkit-box-shadow: inset 0 -1px 0 rgba(0, 0, 0, .15); + box-shadow: inset 0 -1px 0 rgba(0, 0, 0, .15); + -webkit-transition: width .6s ease; + -o-transition: width .6s ease; + transition: width .6s ease; +} +.progress-striped .progress-bar, +.progress-bar-striped { + background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent); + background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent); + background-image: linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent); + -webkit-background-size: 40px 40px; + background-size: 40px 40px; +} +.progress.active .progress-bar, +.progress-bar.active { + -webkit-animation: progress-bar-stripes 2s linear infinite; + -o-animation: progress-bar-stripes 2s linear infinite; + animation: progress-bar-stripes 2s linear infinite; +} +.progress-bar-success { + background-color: #5cb85c; +} +.progress-striped .progress-bar-success { + background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent); + background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent); + background-image: linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent); +} +.progress-bar-info { + background-color: #5bc0de; +} +.progress-striped .progress-bar-info { + background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent); + background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent); + background-image: linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent); +} +.progress-bar-warning { + background-color: #f0ad4e; +} +.progress-striped .progress-bar-warning { + background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent); + background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent); + background-image: linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent); +} +.progress-bar-danger { + background-color: #d9534f; +} +.progress-striped .progress-bar-danger { + background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent); + background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent); + background-image: linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent); +} +.media { + margin-top: 15px; +} +.media:first-child { + margin-top: 0; +} +.media, +.media-body { + overflow: hidden; + zoom: 1; +} +.media-body { + width: 10000px; +} +.media-object { + display: block; +} +.media-right, +.media > .pull-right { + padding-left: 10px; +} +.media-left, +.media > .pull-left { + padding-right: 10px; +} +.media-left, +.media-right, +.media-body { + display: table-cell; + vertical-align: top; +} +.media-middle { + vertical-align: middle; +} +.media-bottom { + vertical-align: bottom; +} +.media-heading { + margin-top: 0; + margin-bottom: 5px; +} +.media-list { + padding-left: 0; + list-style: none; +} +.list-group { + padding-left: 0; + margin-bottom: 20px; +} +.list-group-item { + position: relative; + display: block; + padding: 10px 15px; + margin-bottom: -1px; + background-color: #fff; + border: 1px solid #ddd; +} +.list-group-item:first-child { + border-top-left-radius: 4px; + border-top-right-radius: 4px; +} +.list-group-item:last-child { + margin-bottom: 0; + border-bottom-right-radius: 4px; + border-bottom-left-radius: 4px; +} +a.list-group-item { + color: #555; +} +a.list-group-item .list-group-item-heading { + color: #333; +} +a.list-group-item:hover, +a.list-group-item:focus { + color: #555; + text-decoration: none; + background-color: #f5f5f5; +} +.list-group-item.disabled, +.list-group-item.disabled:hover, +.list-group-item.disabled:focus { + color: #777; + cursor: not-allowed; + background-color: #eee; +} +.list-group-item.disabled .list-group-item-heading, +.list-group-item.disabled:hover .list-group-item-heading, +.list-group-item.disabled:focus .list-group-item-heading { + color: inherit; +} +.list-group-item.disabled .list-group-item-text, +.list-group-item.disabled:hover .list-group-item-text, +.list-group-item.disabled:focus .list-group-item-text { + color: #777; +} +.list-group-item.active, +.list-group-item.active:hover, +.list-group-item.active:focus { + z-index: 2; + color: #fff; + background-color: #337ab7; + border-color: #337ab7; +} +.list-group-item.active .list-group-item-heading, +.list-group-item.active:hover .list-group-item-heading, +.list-group-item.active:focus .list-group-item-heading, +.list-group-item.active .list-group-item-heading > small, +.list-group-item.active:hover .list-group-item-heading > small, +.list-group-item.active:focus .list-group-item-heading > small, +.list-group-item.active .list-group-item-heading > .small, +.list-group-item.active:hover .list-group-item-heading > .small, +.list-group-item.active:focus .list-group-item-heading > .small { + color: inherit; +} +.list-group-item.active .list-group-item-text, +.list-group-item.active:hover .list-group-item-text, +.list-group-item.active:focus .list-group-item-text { + color: #c7ddef; +} +.list-group-item-success { + color: #3c763d; + background-color: #dff0d8; +} +a.list-group-item-success { + color: #3c763d; +} +a.list-group-item-success .list-group-item-heading { + color: inherit; +} +a.list-group-item-success:hover, +a.list-group-item-success:focus { + color: #3c763d; + background-color: #d0e9c6; +} +a.list-group-item-success.active, +a.list-group-item-success.active:hover, +a.list-group-item-success.active:focus { + color: #fff; + background-color: #3c763d; + border-color: #3c763d; +} +.list-group-item-info { + color: #31708f; + background-color: #d9edf7; +} +a.list-group-item-info { + color: #31708f; +} +a.list-group-item-info .list-group-item-heading { + color: inherit; +} +a.list-group-item-info:hover, +a.list-group-item-info:focus { + color: #31708f; + background-color: #c4e3f3; +} +a.list-group-item-info.active, +a.list-group-item-info.active:hover, +a.list-group-item-info.active:focus { + color: #fff; + background-color: #31708f; + border-color: #31708f; +} +.list-group-item-warning { + color: #8a6d3b; + background-color: #fcf8e3; +} +a.list-group-item-warning { + color: #8a6d3b; +} +a.list-group-item-warning .list-group-item-heading { + color: inherit; +} +a.list-group-item-warning:hover, +a.list-group-item-warning:focus { + color: #8a6d3b; + background-color: #faf2cc; +} +a.list-group-item-warning.active, +a.list-group-item-warning.active:hover, +a.list-group-item-warning.active:focus { + color: #fff; + background-color: #8a6d3b; + border-color: #8a6d3b; +} +.list-group-item-danger { + color: #a94442; + background-color: #f2dede; +} +a.list-group-item-danger { + color: #a94442; +} +a.list-group-item-danger .list-group-item-heading { + color: inherit; +} +a.list-group-item-danger:hover, +a.list-group-item-danger:focus { + color: #a94442; + background-color: #ebcccc; +} +a.list-group-item-danger.active, +a.list-group-item-danger.active:hover, +a.list-group-item-danger.active:focus { + color: #fff; + background-color: #a94442; + border-color: #a94442; +} +.list-group-item-heading { + margin-top: 0; + margin-bottom: 5px; +} +.list-group-item-text { + margin-bottom: 0; + line-height: 1.3; +} +.panel { + margin-bottom: 20px; + background-color: #fff; + border: 1px solid transparent; + border-radius: 4px; + -webkit-box-shadow: 0 1px 1px rgba(0, 0, 0, .05); + box-shadow: 0 1px 1px rgba(0, 0, 0, .05); +} +.panel-body { + padding: 15px; +} +.panel-heading { + padding: 10px 15px; + border-bottom: 1px solid transparent; + border-top-left-radius: 3px; + border-top-right-radius: 3px; +} +.panel-heading > .dropdown .dropdown-toggle { + color: inherit; +} +.panel-title { + margin-top: 0; + margin-bottom: 0; + font-size: 16px; + color: inherit; +} +.panel-title > a, +.panel-title > small, +.panel-title > .small, +.panel-title > small > a, +.panel-title > .small > a { + color: inherit; +} +.panel-footer { + padding: 10px 15px; + background-color: #f5f5f5; + border-top: 1px solid #ddd; + border-bottom-right-radius: 3px; + border-bottom-left-radius: 3px; +} +.panel > .list-group, +.panel > .panel-collapse > .list-group { + margin-bottom: 0; +} +.panel > .list-group .list-group-item, +.panel > .panel-collapse > .list-group .list-group-item { + border-width: 1px 0; + border-radius: 0; +} +.panel > .list-group:first-child .list-group-item:first-child, +.panel > .panel-collapse > .list-group:first-child .list-group-item:first-child { + border-top: 0; + border-top-left-radius: 3px; + border-top-right-radius: 3px; +} +.panel > .list-group:last-child .list-group-item:last-child, +.panel > .panel-collapse > .list-group:last-child .list-group-item:last-child { + border-bottom: 0; + border-bottom-right-radius: 3px; + border-bottom-left-radius: 3px; +} +.panel-heading + .list-group .list-group-item:first-child { + border-top-width: 0; +} +.list-group + .panel-footer { + border-top-width: 0; +} +.panel > .table, +.panel > .table-responsive > .table, +.panel > .panel-collapse > .table { + margin-bottom: 0; +} +.panel > .table caption, +.panel > .table-responsive > .table caption, +.panel > .panel-collapse > .table caption { + padding-right: 15px; + padding-left: 15px; +} +.panel > .table:first-child, +.panel > .table-responsive:first-child > .table:first-child { + border-top-left-radius: 3px; + border-top-right-radius: 3px; +} +.panel > .table:first-child > thead:first-child > tr:first-child, +.panel > .table-responsive:first-child > .table:first-child > thead:first-child > tr:first-child, +.panel > .table:first-child > tbody:first-child > tr:first-child, +.panel > .table-responsive:first-child > .table:first-child > tbody:first-child > tr:first-child { + border-top-left-radius: 3px; + border-top-right-radius: 3px; +} +.panel > .table:first-child > thead:first-child > tr:first-child td:first-child, +.panel > .table-responsive:first-child > .table:first-child > thead:first-child > tr:first-child td:first-child, +.panel > .table:first-child > tbody:first-child > tr:first-child td:first-child, +.panel > .table-responsive:first-child > .table:first-child > tbody:first-child > tr:first-child td:first-child, +.panel > .table:first-child > thead:first-child > tr:first-child th:first-child, +.panel > .table-responsive:first-child > .table:first-child > thead:first-child > tr:first-child th:first-child, +.panel > .table:first-child > tbody:first-child > tr:first-child th:first-child, +.panel > .table-responsive:first-child > .table:first-child > tbody:first-child > tr:first-child th:first-child { + border-top-left-radius: 3px; +} +.panel > .table:first-child > thead:first-child > tr:first-child td:last-child, +.panel > .table-responsive:first-child > .table:first-child > thead:first-child > tr:first-child td:last-child, +.panel > .table:first-child > tbody:first-child > tr:first-child td:last-child, +.panel > .table-responsive:first-child > .table:first-child > tbody:first-child > tr:first-child td:last-child, +.panel > .table:first-child > thead:first-child > tr:first-child th:last-child, +.panel > .table-responsive:first-child > .table:first-child > thead:first-child > tr:first-child th:last-child, +.panel > .table:first-child > tbody:first-child > tr:first-child th:last-child, +.panel > .table-responsive:first-child > .table:first-child > tbody:first-child > tr:first-child th:last-child { + border-top-right-radius: 3px; +} +.panel > .table:last-child, +.panel > .table-responsive:last-child > .table:last-child { + border-bottom-right-radius: 3px; + border-bottom-left-radius: 3px; +} +.panel > .table:last-child > tbody:last-child > tr:last-child, +.panel > .table-responsive:last-child > .table:last-child > tbody:last-child > tr:last-child, +.panel > .table:last-child > tfoot:last-child > tr:last-child, +.panel > .table-responsive:last-child > .table:last-child > tfoot:last-child > tr:last-child { + border-bottom-right-radius: 3px; + border-bottom-left-radius: 3px; +} +.panel > .table:last-child > tbody:last-child > tr:last-child td:first-child, +.panel > .table-responsive:last-child > .table:last-child > tbody:last-child > tr:last-child td:first-child, +.panel > .table:last-child > tfoot:last-child > tr:last-child td:first-child, +.panel > .table-responsive:last-child > .table:last-child > tfoot:last-child > tr:last-child td:first-child, +.panel > .table:last-child > tbody:last-child > tr:last-child th:first-child, +.panel > .table-responsive:last-child > .table:last-child > tbody:last-child > tr:last-child th:first-child, +.panel > .table:last-child > tfoot:last-child > tr:last-child th:first-child, +.panel > .table-responsive:last-child > .table:last-child > tfoot:last-child > tr:last-child th:first-child { + border-bottom-left-radius: 3px; +} +.panel > .table:last-child > tbody:last-child > tr:last-child td:last-child, +.panel > .table-responsive:last-child > .table:last-child > tbody:last-child > tr:last-child td:last-child, +.panel > .table:last-child > tfoot:last-child > tr:last-child td:last-child, +.panel > .table-responsive:last-child > .table:last-child > tfoot:last-child > tr:last-child td:last-child, +.panel > .table:last-child > tbody:last-child > tr:last-child th:last-child, +.panel > .table-responsive:last-child > .table:last-child > tbody:last-child > tr:last-child th:last-child, +.panel > .table:last-child > tfoot:last-child > tr:last-child th:last-child, +.panel > .table-responsive:last-child > .table:last-child > tfoot:last-child > tr:last-child th:last-child { + border-bottom-right-radius: 3px; +} +.panel > .panel-body + .table, +.panel > .panel-body + .table-responsive, +.panel > .table + .panel-body, +.panel > .table-responsive + .panel-body { + border-top: 1px solid #ddd; +} +.panel > .table > tbody:first-child > tr:first-child th, +.panel > .table > tbody:first-child > tr:first-child td { + border-top: 0; +} +.panel > .table-bordered, +.panel > .table-responsive > .table-bordered { + border: 0; +} +.panel > .table-bordered > thead > tr > th:first-child, +.panel > .table-responsive > .table-bordered > thead > tr > th:first-child, +.panel > .table-bordered > tbody > tr > th:first-child, +.panel > .table-responsive > .table-bordered > tbody > tr > th:first-child, +.panel > .table-bordered > tfoot > tr > th:first-child, +.panel > .table-responsive > .table-bordered > tfoot > tr > th:first-child, +.panel > .table-bordered > thead > tr > td:first-child, +.panel > .table-responsive > .table-bordered > thead > tr > td:first-child, +.panel > .table-bordered > tbody > tr > td:first-child, +.panel > .table-responsive > .table-bordered > tbody > tr > td:first-child, +.panel > .table-bordered > tfoot > tr > td:first-child, +.panel > .table-responsive > .table-bordered > tfoot > tr > td:first-child { + border-left: 0; +} +.panel > .table-bordered > thead > tr > th:last-child, +.panel > .table-responsive > .table-bordered > thead > tr > th:last-child, +.panel > .table-bordered > tbody > tr > th:last-child, +.panel > .table-responsive > .table-bordered > tbody > tr > th:last-child, +.panel > .table-bordered > tfoot > tr > th:last-child, +.panel > .table-responsive > .table-bordered > tfoot > tr > th:last-child, +.panel > .table-bordered > thead > tr > td:last-child, +.panel > .table-responsive > .table-bordered > thead > tr > td:last-child, +.panel > .table-bordered > tbody > tr > td:last-child, +.panel > .table-responsive > .table-bordered > tbody > tr > td:last-child, +.panel > .table-bordered > tfoot > tr > td:last-child, +.panel > .table-responsive > .table-bordered > tfoot > tr > td:last-child { + border-right: 0; +} +.panel > .table-bordered > thead > tr:first-child > td, +.panel > .table-responsive > .table-bordered > thead > tr:first-child > td, +.panel > .table-bordered > tbody > tr:first-child > td, +.panel > .table-responsive > .table-bordered > tbody > tr:first-child > td, +.panel > .table-bordered > thead > tr:first-child > th, +.panel > .table-responsive > .table-bordered > thead > tr:first-child > th, +.panel > .table-bordered > tbody > tr:first-child > th, +.panel > .table-responsive > .table-bordered > tbody > tr:first-child > th { + border-bottom: 0; +} +.panel > .table-bordered > tbody > tr:last-child > td, +.panel > .table-responsive > .table-bordered > tbody > tr:last-child > td, +.panel > .table-bordered > tfoot > tr:last-child > td, +.panel > .table-responsive > .table-bordered > tfoot > tr:last-child > td, +.panel > .table-bordered > tbody > tr:last-child > th, +.panel > .table-responsive > .table-bordered > tbody > tr:last-child > th, +.panel > .table-bordered > tfoot > tr:last-child > th, +.panel > .table-responsive > .table-bordered > tfoot > tr:last-child > th { + border-bottom: 0; +} +.panel > .table-responsive { + margin-bottom: 0; + border: 0; +} +.panel-group { + margin-bottom: 20px; +} +.panel-group .panel { + margin-bottom: 0; + border-radius: 4px; +} +.panel-group .panel + .panel { + margin-top: 5px; +} +.panel-group .panel-heading { + border-bottom: 0; +} +.panel-group .panel-heading + .panel-collapse > .panel-body, +.panel-group .panel-heading + .panel-collapse > .list-group { + border-top: 1px solid #ddd; +} +.panel-group .panel-footer { + border-top: 0; +} +.panel-group .panel-footer + .panel-collapse .panel-body { + border-bottom: 1px solid #ddd; +} +.panel-default { + border-color: #ddd; +} +.panel-default > .panel-heading { + color: #333; + background-color: #f5f5f5; + border-color: #ddd; +} +.panel-default > .panel-heading + .panel-collapse > .panel-body { + border-top-color: #ddd; +} +.panel-default > .panel-heading .badge { + color: #f5f5f5; + background-color: #333; +} +.panel-default > .panel-footer + .panel-collapse > .panel-body { + border-bottom-color: #ddd; +} +.panel-primary { + border-color: #337ab7; +} +.panel-primary > .panel-heading { + color: #fff; + background-color: #337ab7; + border-color: #337ab7; +} +.panel-primary > .panel-heading + .panel-collapse > .panel-body { + border-top-color: #337ab7; +} +.panel-primary > .panel-heading .badge { + color: #337ab7; + background-color: #fff; +} +.panel-primary > .panel-footer + .panel-collapse > .panel-body { + border-bottom-color: #337ab7; +} +.panel-success { + border-color: #d6e9c6; +} +.panel-success > .panel-heading { + color: #3c763d; + background-color: #dff0d8; + border-color: #d6e9c6; +} +.panel-success > .panel-heading + .panel-collapse > .panel-body { + border-top-color: #d6e9c6; +} +.panel-success > .panel-heading .badge { + color: #dff0d8; + background-color: #3c763d; +} +.panel-success > .panel-footer + .panel-collapse > .panel-body { + border-bottom-color: #d6e9c6; +} +.panel-info { + border-color: #bce8f1; +} +.panel-info > .panel-heading { + color: #31708f; + background-color: #d9edf7; + border-color: #bce8f1; +} +.panel-info > .panel-heading + .panel-collapse > .panel-body { + border-top-color: #bce8f1; +} +.panel-info > .panel-heading .badge { + color: #d9edf7; + background-color: #31708f; +} +.panel-info > .panel-footer + .panel-collapse > .panel-body { + border-bottom-color: #bce8f1; +} +.panel-warning { + border-color: #faebcc; +} +.panel-warning > .panel-heading { + color: #8a6d3b; + background-color: #fcf8e3; + border-color: #faebcc; +} +.panel-warning > .panel-heading + .panel-collapse > .panel-body { + border-top-color: #faebcc; +} +.panel-warning > .panel-heading .badge { + color: #fcf8e3; + background-color: #8a6d3b; +} +.panel-warning > .panel-footer + .panel-collapse > .panel-body { + border-bottom-color: #faebcc; +} +.panel-danger { + border-color: #ebccd1; +} +.panel-danger > .panel-heading { + color: #a94442; + background-color: #f2dede; + border-color: #ebccd1; +} +.panel-danger > .panel-heading + .panel-collapse > .panel-body { + border-top-color: #ebccd1; +} +.panel-danger > .panel-heading .badge { + color: #f2dede; + background-color: #a94442; +} +.panel-danger > .panel-footer + .panel-collapse > .panel-body { + border-bottom-color: #ebccd1; +} +.embed-responsive { + position: relative; + display: block; + height: 0; + padding: 0; + overflow: hidden; +} +.embed-responsive .embed-responsive-item, +.embed-responsive iframe, +.embed-responsive embed, +.embed-responsive object, +.embed-responsive video { + position: absolute; + top: 0; + bottom: 0; + left: 0; + width: 100%; + height: 100%; + border: 0; +} +.embed-responsive-16by9 { + padding-bottom: 56.25%; +} +.embed-responsive-4by3 { + padding-bottom: 75%; +} +.well { + min-height: 20px; + padding: 19px; + margin-bottom: 20px; + background-color: #f5f5f5; + border: 1px solid #e3e3e3; + border-radius: 4px; + -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, .05); + box-shadow: inset 0 1px 1px rgba(0, 0, 0, .05); +} +.well blockquote { + border-color: #ddd; + border-color: rgba(0, 0, 0, .15); +} +.well-lg { + padding: 24px; + border-radius: 6px; +} +.well-sm { + padding: 9px; + border-radius: 3px; +} +.close { + float: right; + font-size: 21px; + font-weight: bold; + line-height: 1; + color: #000; + text-shadow: 0 1px 0 #fff; + filter: alpha(opacity=20); + opacity: .2; +} +.close:hover, +.close:focus { + color: #000; + text-decoration: none; + cursor: pointer; + filter: alpha(opacity=50); + opacity: .5; +} +button.close { + -webkit-appearance: none; + padding: 0; + cursor: pointer; + background: transparent; + border: 0; +} +.modal-open { + overflow: hidden; +} +.modal { + position: fixed; + top: 0; + right: 0; + bottom: 0; + left: 0; + z-index: 1050; + display: none; + overflow: hidden; + -webkit-overflow-scrolling: touch; + outline: 0; +} +.modal.fade .modal-dialog { + -webkit-transition: -webkit-transform .3s ease-out; + -o-transition: -o-transform .3s ease-out; + transition: transform .3s ease-out; + -webkit-transform: translate(0, -25%); + -ms-transform: translate(0, -25%); + -o-transform: translate(0, -25%); + transform: translate(0, -25%); +} +.modal.in .modal-dialog { + -webkit-transform: translate(0, 0); + -ms-transform: translate(0, 0); + -o-transform: translate(0, 0); + transform: translate(0, 0); +} +.modal-open .modal { + overflow-x: hidden; + overflow-y: auto; +} +.modal-dialog { + position: relative; + width: auto; + margin: 10px; +} +.modal-content { + position: relative; + background-color: #fff; + -webkit-background-clip: padding-box; + background-clip: padding-box; + border: 1px solid #999; + border: 1px solid rgba(0, 0, 0, .2); + border-radius: 6px; + outline: 0; + -webkit-box-shadow: 0 3px 9px rgba(0, 0, 0, .5); + box-shadow: 0 3px 9px rgba(0, 0, 0, .5); +} +.modal-backdrop { + position: fixed; + top: 0; + right: 0; + bottom: 0; + left: 0; + z-index: 1040; + background-color: #000; +} +.modal-backdrop.fade { + filter: alpha(opacity=0); + opacity: 0; +} +.modal-backdrop.in { + filter: alpha(opacity=50); + opacity: .5; +} +.modal-header { + min-height: 16.42857143px; + padding: 15px; + border-bottom: 1px solid #e5e5e5; +} +.modal-header .close { + margin-top: -2px; +} +.modal-title { + margin: 0; + line-height: 1.42857143; +} +.modal-body { + position: relative; + padding: 15px; +} +.modal-footer { + padding: 15px; + text-align: right; + border-top: 1px solid #e5e5e5; +} +.modal-footer .btn + .btn { + margin-bottom: 0; + margin-left: 5px; +} +.modal-footer .btn-group .btn + .btn { + margin-left: -1px; +} +.modal-footer .btn-block + .btn-block { + margin-left: 0; +} +.modal-scrollbar-measure { + position: absolute; + top: -9999px; + width: 50px; + height: 50px; + overflow: scroll; +} +@media (min-width: 768px) { + .modal-dialog { + width: 600px; + margin: 30px auto; + } + .modal-content { + -webkit-box-shadow: 0 5px 15px rgba(0, 0, 0, .5); + box-shadow: 0 5px 15px rgba(0, 0, 0, .5); + } + .modal-sm { + width: 300px; + } +} +@media (min-width: 992px) { + .modal-lg { + width: 900px; + } +} +.tooltip { + position: absolute; + z-index: 1070; + display: block; + font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; + font-size: 12px; + font-weight: normal; + line-height: 1.4; + filter: alpha(opacity=0); + opacity: 0; +} +.tooltip.in { + filter: alpha(opacity=90); + opacity: .9; +} +.tooltip.top { + padding: 5px 0; + margin-top: -3px; +} +.tooltip.right { + padding: 0 5px; + margin-left: 3px; +} +.tooltip.bottom { + padding: 5px 0; + margin-top: 3px; +} +.tooltip.left { + padding: 0 5px; + margin-left: -3px; +} +.tooltip-inner { + max-width: 200px; + padding: 3px 8px; + color: #fff; + text-align: center; + text-decoration: none; + background-color: #000; + border-radius: 4px; +} +.tooltip-arrow { + position: absolute; + width: 0; + height: 0; + border-color: transparent; + border-style: solid; +} +.tooltip.top .tooltip-arrow { + bottom: 0; + left: 50%; + margin-left: -5px; + border-width: 5px 5px 0; + border-top-color: #000; +} +.tooltip.top-left .tooltip-arrow { + right: 5px; + bottom: 0; + margin-bottom: -5px; + border-width: 5px 5px 0; + border-top-color: #000; +} +.tooltip.top-right .tooltip-arrow { + bottom: 0; + left: 5px; + margin-bottom: -5px; + border-width: 5px 5px 0; + border-top-color: #000; +} +.tooltip.right .tooltip-arrow { + top: 50%; + left: 0; + margin-top: -5px; + border-width: 5px 5px 5px 0; + border-right-color: #000; +} +.tooltip.left .tooltip-arrow { + top: 50%; + right: 0; + margin-top: -5px; + border-width: 5px 0 5px 5px; + border-left-color: #000; +} +.tooltip.bottom .tooltip-arrow { + top: 0; + left: 50%; + margin-left: -5px; + border-width: 0 5px 5px; + border-bottom-color: #000; +} +.tooltip.bottom-left .tooltip-arrow { + top: 0; + right: 5px; + margin-top: -5px; + border-width: 0 5px 5px; + border-bottom-color: #000; +} +.tooltip.bottom-right .tooltip-arrow { + top: 0; + left: 5px; + margin-top: -5px; + border-width: 0 5px 5px; + border-bottom-color: #000; +} +.popover { + position: absolute; + top: 0; + left: 0; + z-index: 1060; + display: none; + max-width: 276px; + padding: 1px; + font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; + font-size: 14px; + font-weight: normal; + line-height: 1.42857143; + text-align: left; + white-space: normal; + background-color: #fff; + -webkit-background-clip: padding-box; + background-clip: padding-box; + border: 1px solid #ccc; + border: 1px solid rgba(0, 0, 0, .2); + border-radius: 6px; + -webkit-box-shadow: 0 5px 10px rgba(0, 0, 0, .2); + box-shadow: 0 5px 10px rgba(0, 0, 0, .2); +} +.popover.top { + margin-top: -10px; +} +.popover.right { + margin-left: 10px; +} +.popover.bottom { + margin-top: 10px; +} +.popover.left { + margin-left: -10px; +} +.popover-title { + padding: 8px 14px; + margin: 0; + font-size: 14px; + background-color: #f7f7f7; + border-bottom: 1px solid #ebebeb; + border-radius: 5px 5px 0 0; +} +.popover-content { + padding: 9px 14px; +} +.popover > .arrow, +.popover > .arrow:after { + position: absolute; + display: block; + width: 0; + height: 0; + border-color: transparent; + border-style: solid; +} +.popover > .arrow { + border-width: 11px; +} +.popover > .arrow:after { + content: ""; + border-width: 10px; +} +.popover.top > .arrow { + bottom: -11px; + left: 50%; + margin-left: -11px; + border-top-color: #999; + border-top-color: rgba(0, 0, 0, .25); + border-bottom-width: 0; +} +.popover.top > .arrow:after { + bottom: 1px; + margin-left: -10px; + content: " "; + border-top-color: #fff; + border-bottom-width: 0; +} +.popover.right > .arrow { + top: 50%; + left: -11px; + margin-top: -11px; + border-right-color: #999; + border-right-color: rgba(0, 0, 0, .25); + border-left-width: 0; +} +.popover.right > .arrow:after { + bottom: -10px; + left: 1px; + content: " "; + border-right-color: #fff; + border-left-width: 0; +} +.popover.bottom > .arrow { + top: -11px; + left: 50%; + margin-left: -11px; + border-top-width: 0; + border-bottom-color: #999; + border-bottom-color: rgba(0, 0, 0, .25); +} +.popover.bottom > .arrow:after { + top: 1px; + margin-left: -10px; + content: " "; + border-top-width: 0; + border-bottom-color: #fff; +} +.popover.left > .arrow { + top: 50%; + right: -11px; + margin-top: -11px; + border-right-width: 0; + border-left-color: #999; + border-left-color: rgba(0, 0, 0, .25); +} +.popover.left > .arrow:after { + right: 1px; + bottom: -10px; + content: " "; + border-right-width: 0; + border-left-color: #fff; +} +.carousel { + position: relative; +} +.carousel-inner { + position: relative; + width: 100%; + overflow: hidden; +} +.carousel-inner > .item { + position: relative; + display: none; + -webkit-transition: .6s ease-in-out left; + -o-transition: .6s ease-in-out left; + transition: .6s ease-in-out left; +} +.carousel-inner > .item > img, +.carousel-inner > .item > a > img { + line-height: 1; +} +@media all and (transform-3d), (-webkit-transform-3d) { + .carousel-inner > .item { + -webkit-transition: -webkit-transform .6s ease-in-out; + -o-transition: -o-transform .6s ease-in-out; + transition: transform .6s ease-in-out; + + -webkit-backface-visibility: hidden; + backface-visibility: hidden; + -webkit-perspective: 1000; + perspective: 1000; + } + .carousel-inner > .item.next, + .carousel-inner > .item.active.right { + left: 0; + -webkit-transform: translate3d(100%, 0, 0); + transform: translate3d(100%, 0, 0); + } + .carousel-inner > .item.prev, + .carousel-inner > .item.active.left { + left: 0; + -webkit-transform: translate3d(-100%, 0, 0); + transform: translate3d(-100%, 0, 0); + } + .carousel-inner > .item.next.left, + .carousel-inner > .item.prev.right, + .carousel-inner > .item.active { + left: 0; + -webkit-transform: translate3d(0, 0, 0); + transform: translate3d(0, 0, 0); + } +} +.carousel-inner > .active, +.carousel-inner > .next, +.carousel-inner > .prev { + display: block; +} +.carousel-inner > .active { + left: 0; +} +.carousel-inner > .next, +.carousel-inner > .prev { + position: absolute; + top: 0; + width: 100%; +} +.carousel-inner > .next { + left: 100%; +} +.carousel-inner > .prev { + left: -100%; +} +.carousel-inner > .next.left, +.carousel-inner > .prev.right { + left: 0; +} +.carousel-inner > .active.left { + left: -100%; +} +.carousel-inner > .active.right { + left: 100%; +} +.carousel-control { + position: absolute; + top: 0; + bottom: 0; + left: 0; + width: 15%; + font-size: 20px; + color: #fff; + text-align: center; + text-shadow: 0 1px 2px rgba(0, 0, 0, .6); + filter: alpha(opacity=50); + opacity: .5; +} +.carousel-control.left { + background-image: -webkit-linear-gradient(left, rgba(0, 0, 0, .5) 0%, rgba(0, 0, 0, .0001) 100%); + background-image: -o-linear-gradient(left, rgba(0, 0, 0, .5) 0%, rgba(0, 0, 0, .0001) 100%); + background-image: -webkit-gradient(linear, left top, right top, from(rgba(0, 0, 0, .5)), to(rgba(0, 0, 0, .0001))); + background-image: linear-gradient(to right, rgba(0, 0, 0, .5) 0%, rgba(0, 0, 0, .0001) 100%); + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#80000000', endColorstr='#00000000', GradientType=1); + background-repeat: repeat-x; +} +.carousel-control.right { + right: 0; + left: auto; + background-image: -webkit-linear-gradient(left, rgba(0, 0, 0, .0001) 0%, rgba(0, 0, 0, .5) 100%); + background-image: -o-linear-gradient(left, rgba(0, 0, 0, .0001) 0%, rgba(0, 0, 0, .5) 100%); + background-image: -webkit-gradient(linear, left top, right top, from(rgba(0, 0, 0, .0001)), to(rgba(0, 0, 0, .5))); + background-image: linear-gradient(to right, rgba(0, 0, 0, .0001) 0%, rgba(0, 0, 0, .5) 100%); + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#00000000', endColorstr='#80000000', GradientType=1); + background-repeat: repeat-x; +} +.carousel-control:hover, +.carousel-control:focus { + color: #fff; + text-decoration: none; + filter: alpha(opacity=90); + outline: 0; + opacity: .9; +} +.carousel-control .icon-prev, +.carousel-control .icon-next, +.carousel-control .glyphicon-chevron-left, +.carousel-control .glyphicon-chevron-right { + position: absolute; + top: 50%; + z-index: 5; + display: inline-block; +} +.carousel-control .icon-prev, +.carousel-control .glyphicon-chevron-left { + left: 50%; + margin-left: -10px; +} +.carousel-control .icon-next, +.carousel-control .glyphicon-chevron-right { + right: 50%; + margin-right: -10px; +} +.carousel-control .icon-prev, +.carousel-control .icon-next { + width: 20px; + height: 20px; + margin-top: -10px; + font-family: serif; + line-height: 1; +} +.carousel-control .icon-prev:before { + content: '\2039'; +} +.carousel-control .icon-next:before { + content: '\203a'; +} +.carousel-indicators { + position: absolute; + bottom: 10px; + left: 50%; + z-index: 15; + width: 60%; + padding-left: 0; + margin-left: -30%; + text-align: center; + list-style: none; +} +.carousel-indicators li { + display: inline-block; + width: 10px; + height: 10px; + margin: 1px; + text-indent: -999px; + cursor: pointer; + background-color: #000 \9; + background-color: rgba(0, 0, 0, 0); + border: 1px solid #fff; + border-radius: 10px; +} +.carousel-indicators .active { + width: 12px; + height: 12px; + margin: 0; + background-color: #fff; +} +.carousel-caption { + position: absolute; + right: 15%; + bottom: 20px; + left: 15%; + z-index: 10; + padding-top: 20px; + padding-bottom: 20px; + color: #fff; + text-align: center; + text-shadow: 0 1px 2px rgba(0, 0, 0, .6); +} +.carousel-caption .btn { + text-shadow: none; +} +@media screen and (min-width: 768px) { + .carousel-control .glyphicon-chevron-left, + .carousel-control .glyphicon-chevron-right, + .carousel-control .icon-prev, + .carousel-control .icon-next { + width: 30px; + height: 30px; + margin-top: -15px; + font-size: 30px; + } + .carousel-control .glyphicon-chevron-left, + .carousel-control .icon-prev { + margin-left: -15px; + } + .carousel-control .glyphicon-chevron-right, + .carousel-control .icon-next { + margin-right: -15px; + } + .carousel-caption { + right: 20%; + left: 20%; + padding-bottom: 30px; + } + .carousel-indicators { + bottom: 20px; + } +} +.clearfix:before, +.clearfix:after, +.dl-horizontal dd:before, +.dl-horizontal dd:after, +.container:before, +.container:after, +.container-fluid:before, +.container-fluid:after, +.row:before, +.row:after, +.form-horizontal .form-group:before, +.form-horizontal .form-group:after, +.btn-toolbar:before, +.btn-toolbar:after, +.btn-group-vertical > .btn-group:before, +.btn-group-vertical > .btn-group:after, +.nav:before, +.nav:after, +.navbar:before, +.navbar:after, +.navbar-header:before, +.navbar-header:after, +.navbar-collapse:before, +.navbar-collapse:after, +.pager:before, +.pager:after, +.panel-body:before, +.panel-body:after, +.modal-footer:before, +.modal-footer:after { + display: table; + content: " "; +} +.clearfix:after, +.dl-horizontal dd:after, +.container:after, +.container-fluid:after, +.row:after, +.form-horizontal .form-group:after, +.btn-toolbar:after, +.btn-group-vertical > .btn-group:after, +.nav:after, +.navbar:after, +.navbar-header:after, +.navbar-collapse:after, +.pager:after, +.panel-body:after, +.modal-footer:after { + clear: both; +} +.center-block { + display: block; + margin-right: auto; + margin-left: auto; +} +.pull-right { + float: right !important; +} +.pull-left { + float: left !important; +} +.hide { + display: none !important; +} +.show { + display: block !important; +} +.invisible { + visibility: hidden; +} +.text-hide { + font: 0/0 a; + color: transparent; + text-shadow: none; + background-color: transparent; + border: 0; +} +.hidden { + display: none !important; +} +.affix { + position: fixed; +} +@-ms-viewport { + width: device-width; +} +.visible-xs, +.visible-sm, +.visible-md, +.visible-lg { + display: none !important; +} +.visible-xs-block, +.visible-xs-inline, +.visible-xs-inline-block, +.visible-sm-block, +.visible-sm-inline, +.visible-sm-inline-block, +.visible-md-block, +.visible-md-inline, +.visible-md-inline-block, +.visible-lg-block, +.visible-lg-inline, +.visible-lg-inline-block { + display: none !important; +} +@media (max-width: 767px) { + .visible-xs { + display: block !important; + } + table.visible-xs { + display: table; + } + tr.visible-xs { + display: table-row !important; + } + th.visible-xs, + td.visible-xs { + display: table-cell !important; + } +} +@media (max-width: 767px) { + .visible-xs-block { + display: block !important; + } +} +@media (max-width: 767px) { + .visible-xs-inline { + display: inline !important; + } +} +@media (max-width: 767px) { + .visible-xs-inline-block { + display: inline-block !important; + } +} +@media (min-width: 768px) and (max-width: 991px) { + .visible-sm { + display: block !important; + } + table.visible-sm { + display: table; + } + tr.visible-sm { + display: table-row !important; + } + th.visible-sm, + td.visible-sm { + display: table-cell !important; + } +} +@media (min-width: 768px) and (max-width: 991px) { + .visible-sm-block { + display: block !important; + } +} +@media (min-width: 768px) and (max-width: 991px) { + .visible-sm-inline { + display: inline !important; + } +} +@media (min-width: 768px) and (max-width: 991px) { + .visible-sm-inline-block { + display: inline-block !important; + } +} +@media (min-width: 992px) and (max-width: 1199px) { + .visible-md { + display: block !important; + } + table.visible-md { + display: table; + } + tr.visible-md { + display: table-row !important; + } + th.visible-md, + td.visible-md { + display: table-cell !important; + } +} +@media (min-width: 992px) and (max-width: 1199px) { + .visible-md-block { + display: block !important; + } +} +@media (min-width: 992px) and (max-width: 1199px) { + .visible-md-inline { + display: inline !important; + } +} +@media (min-width: 992px) and (max-width: 1199px) { + .visible-md-inline-block { + display: inline-block !important; + } +} +@media (min-width: 1200px) { + .visible-lg { + display: block !important; + } + table.visible-lg { + display: table; + } + tr.visible-lg { + display: table-row !important; + } + th.visible-lg, + td.visible-lg { + display: table-cell !important; + } +} +@media (min-width: 1200px) { + .visible-lg-block { + display: block !important; + } +} +@media (min-width: 1200px) { + .visible-lg-inline { + display: inline !important; + } +} +@media (min-width: 1200px) { + .visible-lg-inline-block { + display: inline-block !important; + } +} +@media (max-width: 767px) { + .hidden-xs { + display: none !important; + } +} +@media (min-width: 768px) and (max-width: 991px) { + .hidden-sm { + display: none !important; + } +} +@media (min-width: 992px) and (max-width: 1199px) { + .hidden-md { + display: none !important; + } +} +@media (min-width: 1200px) { + .hidden-lg { + display: none !important; + } +} +.visible-print { + display: none !important; +} +@media print { + .visible-print { + display: block !important; + } + table.visible-print { + display: table; + } + tr.visible-print { + display: table-row !important; + } + th.visible-print, + td.visible-print { + display: table-cell !important; + } +} +.visible-print-block { + display: none !important; +} +@media print { + .visible-print-block { + display: block !important; + } +} +.visible-print-inline { + display: none !important; +} +@media print { + .visible-print-inline { + display: inline !important; + } +} +.visible-print-inline-block { + display: none !important; +} +@media print { + .visible-print-inline-block { + display: inline-block !important; + } +} +@media print { + .hidden-print { + display: none !important; + } +} +/*# sourceMappingURL=bootstrap.css.map */ diff --git a/vendor/github.com/influxdata/influxdb/services/admin/assets/css/dropdowns-enhancement.css b/vendor/github.com/influxdata/influxdb/services/admin/assets/css/dropdowns-enhancement.css new file mode 100644 index 000000000..3816a7da1 --- /dev/null +++ b/vendor/github.com/influxdata/influxdb/services/admin/assets/css/dropdowns-enhancement.css @@ -0,0 +1,294 @@ +.dropdown-menu > li > label { + display: block; + padding: 3px 20px; + clear: both; + font-weight: normal; + line-height: 1.42857143; + color: #333333; + white-space: nowrap; +} +.dropdown-menu > li > label:hover, +.dropdown-menu > li > label:focus { + text-decoration: none; + color: #262626; + background-color: #f5f5f5; +} +.dropdown-menu > li > input:checked ~ label, +.dropdown-menu > li > input:checked ~ label:hover, +.dropdown-menu > li > input:checked ~ label:focus, +.dropdown-menu > .active > label, +.dropdown-menu > .active > label:hover, +.dropdown-menu > .active > label:focus { + color: #ffffff; + text-decoration: none; + outline: 0; + background-color: #428bca; +} +.dropdown-menu > li > input[disabled] ~ label, +.dropdown-menu > li > input[disabled] ~ label:hover, +.dropdown-menu > li > input[disabled] ~ label:focus, +.dropdown-menu > .disabled > label, +.dropdown-menu > .disabled > label:hover, +.dropdown-menu > .disabled > label:focus { + color: #999999; +} +.dropdown-menu > li > input[disabled] ~ label:hover, +.dropdown-menu > li > input[disabled] ~ label:focus, +.dropdown-menu > .disabled > label:hover, +.dropdown-menu > .disabled > label:focus { + text-decoration: none; + background-color: transparent; + background-image: none; + filter: progid:DXImageTransform.Microsoft.gradient(enabled = false); + cursor: not-allowed; +} +.dropdown-menu > li > label { + margin-bottom: 0; + cursor: pointer; +} +.dropdown-menu > li > input[type="radio"], +.dropdown-menu > li > input[type="checkbox"] { + display: none; + position: absolute; + top: -9999em; + left: -9999em; +} +.dropdown-menu > li > label:focus, +.dropdown-menu > li > input:focus ~ label { + outline: thin dotted; + outline: 5px auto -webkit-focus-ring-color; + outline-offset: -2px; +} +.dropdown-menu.pull-right { + right: 0; + left: auto; +} +.dropdown-menu.pull-top { + bottom: 100%; + top: auto; + margin: 0 0 2px; + -webkit-box-shadow: 0 -6px 12px rgba(0, 0, 0, 0.175); + box-shadow: 0 -6px 12px rgba(0, 0, 0, 0.175); +} +.dropdown-menu.pull-center { + right: 50%; + left: auto; +} +.dropdown-menu.pull-middle { + right: 100%; + margin: 0 2px 0 0; + box-shadow: -5px 0 10px rgba(0, 0, 0, 0.2); + left: auto; +} +.dropdown-menu.pull-middle.pull-right { + right: auto; + left: 100%; + margin: 0 0 0 2px; + box-shadow: 5px 0 10px rgba(0, 0, 0, 0.2); +} +.dropdown-menu.pull-middle.pull-center { + right: 50%; + margin: 0; + box-shadow: 0 0 10px rgba(0, 0, 0, 0.2); +} +.dropdown-menu.bullet { + margin-top: 8px; +} +.dropdown-menu.bullet:before { + width: 0; + height: 0; + content: ''; + display: inline-block; + position: absolute; + border-color: transparent; + border-style: solid; + -webkit-transform: rotate(360deg); + border-width: 0 7px 7px; + border-bottom-color: #cccccc; + border-bottom-color: rgba(0, 0, 0, 0.15); + top: -7px; + left: 9px; +} +.dropdown-menu.bullet:after { + width: 0; + height: 0; + content: ''; + display: inline-block; + position: absolute; + border-color: transparent; + border-style: solid; + -webkit-transform: rotate(360deg); + border-width: 0 6px 6px; + border-bottom-color: #ffffff; + top: -6px; + left: 10px; +} +.dropdown-menu.bullet.pull-right:before { + left: auto; + right: 9px; +} +.dropdown-menu.bullet.pull-right:after { + left: auto; + right: 10px; +} +.dropdown-menu.bullet.pull-top { + margin-top: 0; + margin-bottom: 8px; +} +.dropdown-menu.bullet.pull-top:before { + top: auto; + bottom: -7px; + border-bottom-width: 0; + border-top-width: 7px; + border-top-color: #cccccc; + border-top-color: rgba(0, 0, 0, 0.15); +} +.dropdown-menu.bullet.pull-top:after { + top: auto; + bottom: -6px; + border-bottom: none; + border-top-width: 6px; + border-top-color: #ffffff; +} +.dropdown-menu.bullet.pull-center:before { + left: auto; + right: 50%; + margin-right: -7px; +} +.dropdown-menu.bullet.pull-center:after { + left: auto; + right: 50%; + margin-right: -6px; +} +.dropdown-menu.bullet.pull-middle { + margin-right: 8px; +} +.dropdown-menu.bullet.pull-middle:before { + top: 50%; + left: 100%; + right: auto; + margin-top: -7px; + border-right-width: 0; + border-bottom-color: transparent; + border-top-width: 7px; + border-left-color: #cccccc; + border-left-color: rgba(0, 0, 0, 0.15); +} +.dropdown-menu.bullet.pull-middle:after { + top: 50%; + left: 100%; + right: auto; + margin-top: -6px; + border-right-width: 0; + border-bottom-color: transparent; + border-top-width: 6px; + border-left-color: #ffffff; +} +.dropdown-menu.bullet.pull-middle.pull-right { + margin-right: 0; + margin-left: 8px; +} +.dropdown-menu.bullet.pull-middle.pull-right:before { + left: -7px; + border-left-width: 0; + border-right-width: 7px; + border-right-color: #cccccc; + border-right-color: rgba(0, 0, 0, 0.15); +} +.dropdown-menu.bullet.pull-middle.pull-right:after { + left: -6px; + border-left-width: 0; + border-right-width: 6px; + border-right-color: #ffffff; +} +.dropdown-menu.bullet.pull-middle.pull-center { + margin-left: 0; + margin-right: 0; +} +.dropdown-menu.bullet.pull-middle.pull-center:before { + border: none; + display: none; +} +.dropdown-menu.bullet.pull-middle.pull-center:after { + border: none; + display: none; +} +.dropdown-submenu { + position: relative; +} +.dropdown-submenu > .dropdown-menu { + top: 0; + left: 100%; + margin-top: -6px; + margin-left: -1px; + border-top-left-radius: 0; +} +.dropdown-submenu > a:before { + display: block; + float: right; + width: 0; + height: 0; + content: ""; + margin-top: 6px; + margin-right: -8px; + border-width: 4px 0 4px 4px; + border-style: solid; + border-left-style: dashed; + border-top-color: transparent; + border-bottom-color: transparent; +} +@media (max-width: 767px) { + .navbar-nav .dropdown-submenu > a:before { + margin-top: 8px; + border-color: inherit; + border-style: solid; + border-width: 4px 4px 0; + border-left-color: transparent; + border-right-color: transparent; + } + .navbar-nav .dropdown-submenu > a { + padding-left: 40px; + } + .navbar-nav > .open > .dropdown-menu > .dropdown-submenu > .dropdown-menu > li > a, + .navbar-nav > .open > .dropdown-menu > .dropdown-submenu > .dropdown-menu > li > label { + padding-left: 35px; + } + .navbar-nav > .open > .dropdown-menu > .dropdown-submenu > .dropdown-menu > li > .dropdown-menu > li > a, + .navbar-nav > .open > .dropdown-menu > .dropdown-submenu > .dropdown-menu > li > .dropdown-menu > li > label { + padding-left: 45px; + } + .navbar-nav > .open > .dropdown-menu > .dropdown-submenu > .dropdown-menu > li > .dropdown-menu > li > .dropdown-menu > li > a, + .navbar-nav > .open > .dropdown-menu > .dropdown-submenu > .dropdown-menu > li > .dropdown-menu > li > .dropdown-menu > li > label { + padding-left: 55px; + } + .navbar-nav > .open > .dropdown-menu > .dropdown-submenu > .dropdown-menu > li > .dropdown-menu > li > .dropdown-menu > li > .dropdown-menu > li > a, + .navbar-nav > .open > .dropdown-menu > .dropdown-submenu > .dropdown-menu > li > .dropdown-menu > li > .dropdown-menu > li > .dropdown-menu > li > label { + padding-left: 65px; + } + .navbar-nav > .open > .dropdown-menu > .dropdown-submenu > .dropdown-menu > li > .dropdown-menu > li > .dropdown-menu > li > .dropdown-menu > li > .dropdown-menu > li > a, + .navbar-nav > .open > .dropdown-menu > .dropdown-submenu > .dropdown-menu > li > .dropdown-menu > li > .dropdown-menu > li > .dropdown-menu > li > .dropdown-menu > li > label { + padding-left: 75px; + } +} +.navbar-default .navbar-nav .open > .dropdown-menu > .dropdown-submenu.open > a, +.navbar-default .navbar-nav .open > .dropdown-menu > .dropdown-submenu.open > a:hover, +.navbar-default .navbar-nav .open > .dropdown-menu > .dropdown-submenu.open > a:focus { + background-color: #e7e7e7; + color: #555555; +} +@media (max-width: 767px) { + .navbar-default .navbar-nav .open > .dropdown-menu > .dropdown-submenu.open > a:before { + border-top-color: #555555; + } +} +.navbar-inverse .navbar-nav .open > .dropdown-menu > .dropdown-submenu.open > a, +.navbar-inverse .navbar-nav .open > .dropdown-menu > .dropdown-submenu.open > a:hover, +.navbar-inverse .navbar-nav .open > .dropdown-menu > .dropdown-submenu.open > a:focus { + background-color: #080808; + color: #ffffff; +} +@media (max-width: 767px) { + .navbar-inverse .navbar-nav .open > .dropdown-menu > .dropdown-submenu.open > a:before { + border-top-color: #ffffff; + } +} diff --git a/vendor/github.com/influxdata/influxdb/services/admin/assets/fonts/glyphicons-halflings-regular.eot b/vendor/github.com/influxdata/influxdb/services/admin/assets/fonts/glyphicons-halflings-regular.eot new file mode 100644 index 0000000000000000000000000000000000000000..b93a4953fff68df523aa7656497ee339d6026d64 GIT binary patch literal 20127 zcma%hV{j!vx9y2-`@~L8?1^pLwlPU2wr$&<*tR|KBoo`2;LUg6eW-eW-tKDb)vH%` z^`A!Vd<6hNSRMcX|Cb;E|1qflDggj6Kmr)xA10^t-vIc3*Z+F{r%|K(GyE^?|I{=9 zNq`(c8=wS`0!RZy0g3{M(8^tv41d}oRU?8#IBFtJy*9zAN5dcxqGlMZGL>GG%R#)4J zDJ2;)4*E1pyHia%>lMv3X7Q`UoFyoB@|x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Dqr0ZMTr?4uG_Nqs6f%S0g?h`1vO5fo=5S&u#wI2d4+3hWiolEU!=3_oFo zfie?+4W#`;1dd#X@g9Yj<53S<6OB!TM8w8})7k-$&q5(smc%;r z(BlXkTp`C47+%4JA{2X}MIaPbVF!35P#p;u7+fR*46{T+LR8+j25oduCfDzDv6R-hU{TVVo9fz?^N3ShMt!t0NsH)pB zRK8-S{Dn*y3b|k^*?_B70<2gHt==l7c&cT>r`C#{S}J2;s#d{M)ncW(#Y$C*lByLQ z&?+{dR7*gpdT~(1;M(FfF==3z`^eW)=5a9RqvF-)2?S-(G zhS;p(u~_qBum*q}On@$#08}ynd0+spzyVco0%G6;<-i5&016cV5UKzhQ~)fX03|>L z8ej+HzzgVr6_5ZUpa4HW0Ca!=r1%*}Oo;2no&Zz8DfR)L!@r<5 z2viSZpmvo5XqXyAz{Ms7`7kX>fnr1gi4X~7KpznRT0{Xc5Cfz@43PjBMBoH@z_{~( z(Wd}IPJ9hH+%)Fc)0!hrV+(A;76rhtI|YHbEDeERV~Ya>SQg^IvlazFkSK(KG9&{q zkPIR~EeQaaBmwA<20}mBO?)N$(z1@p)5?%}rM| zGF()~Z&Kx@OIDRI$d0T8;JX@vj3^2%pd_+@l9~a4lntZ;AvUIjqIZbuNTR6@hNJoV zk4F;ut)LN4ARuyn2M6F~eg-e#UH%2P;8uPGFW^vq1vj8mdIayFOZo(tphk8C7hpT~ z1Fv8?b_LNR3QD9J+!v=p%}# + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/vendor/github.com/influxdata/influxdb/services/admin/assets/fonts/glyphicons-halflings-regular.ttf b/vendor/github.com/influxdata/influxdb/services/admin/assets/fonts/glyphicons-halflings-regular.ttf new file mode 100644 index 0000000000000000000000000000000000000000..1413fc609ab6f21774de0cb7e01360095584f65b GIT binary patch literal 45404 zcmd?Sd0-pWwLh*qi$?oCk~i6sWlOeWJC3|4juU5JNSu9hSVACzERcmjLV&P^utNzg zIE4Kr1=5g!SxTX#Ern9_%4&01rlrW`Z!56xXTGQR4C z3vR~wXq>NDx$c~e?;ia3YjJ*$!C>69a?2$lLyhpI!CFfJsP=|`8@K0|bbMpWwVUEygg0=0x_)HeHpGSJagJNLA3c!$EuOV>j$wi! zbo{vZ(s8tl>@!?}dmNHXo)ABy7ohD7_1G-P@SdJWT8*oeyBVYVW9*vn}&VI4q++W;Z+uz=QTK}^C75!`aFYCX# zf7fC2;o`%!huaTNJAB&VWrx=szU=VLhwnbT`vc<#<`4WI6n_x@AofA~2d90o?1L3w z9!I|#P*NQ)$#9aASijuw>JRld^-t)Zhmy|i-`Iam|IWkguaMR%lhi4p~cX-9& zjfbx}yz}s`4-6>D^+6FzihR)Y!GsUy=_MWi_v7y#KmYi-{iZ+s@ekkq!@Wxz!~BQwiI&ti z>hC&iBe2m(dpNVvSbZe3DVgl(dxHt-k@{xv;&`^c8GJY%&^LpM;}7)B;5Qg5J^E${ z7z~k8eWOucjX6)7q1a%EVtmnND8cclz8R1=X4W@D8IDeUGXxEWe&p>Z*voO0u_2!! zj3dT(Ki+4E;uykKi*yr?w6!BW2FD55PD6SMj`OfBLwXL5EA-9KjpMo4*5Eqs^>4&> z8PezAcn!9jk-h-Oo!E9EjX8W6@EkTHeI<@AY{f|5fMW<-Ez-z)xCvW3()Z#x0oydB zzm4MzY^NdpIF9qMp-jU;99LjlgY@@s+=z`}_%V*xV7nRV*Kwrx-i`FzI0BZ#yOI8# z!SDeNA5b6u9!Imj89v0(g$;dT_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lXu#6xSMh%3^5c*}oM6DQGY#(a^@z<&D zF(43I9e&5`h|A$5!+UFuOH0>F3$shBV4`0#M4RSB8=6F0ZgIbq<2LQ$Hh^(kAJu=! zt8ZGXTacD{(3W{V1$j_{Jc)Ka7t6u}ho`4kF+4@t_0!mCBn z)}o%eA}L)_L?=jw6BIfll7tb3n}?*yLt&XADa=rW>qz=_6s9ziOd5sXjil>FVFx3r zf>Feewk0v#W9>Gp4GacTRr>Sd2T6dWi-{YX`v!D)kCWzG5xQB=?es5ON(%nkwUhNl zV>@xkWWWv*N+{e$(SrExvN6BXzU(Hxlx27{VYHf+LpIbTO+Yu(ltMk<;)3A(LU@ytVYFkYvTa79idMtUFhfxx?P!)2F`prNWW#Fub#l>N2s@nh&n_ zA4{#}|AIs9|A4P0ZF%fy=hDN!t#ifH<)4u2kirK~JUpjQ-J+~cXOZI&dIts;P}UeXslP6zKvpEKSN-$y>kJ^nw2tC9bv zo(|lT@?vZ!{_l|d^8Yh)eEBh*5ABh+Lzjw+?V)o z#P-W7361>E(Y4;@`sv;VKn G`u_lkUM?>H literal 0 HcmV?d00001 diff --git a/vendor/github.com/influxdata/influxdb/services/admin/assets/fonts/glyphicons-halflings-regular.woff2 b/vendor/github.com/influxdata/influxdb/services/admin/assets/fonts/glyphicons-halflings-regular.woff2 new file mode 100644 index 0000000000000000000000000000000000000000..64539b54c3751a6d9adb44c8e3a45ba5a73b77f0 GIT binary patch literal 18028 zcmV(~K+nH-Pew8T0RR9107h&84*&oF0I^&E07eM_0Rl|`00000000000000000000 z0000#Mn+Uk92y`7U;vDA2m}!b3WBL5f#qcZHUcCAhI9*rFaQJ~1&1OBl~F%;WnyLq z8)b|&?3j;$^FW}&KmNW53flIFARDZ7_Wz%hpoWaWlgHTHEHf()GI0&dMi#DFPaEt6 zCO)z0v0~C~q&0zBj^;=tv8q{$8JxX)>_`b}WQGgXi46R*CHJ}6r+;}OrvwA{_SY+o zK)H-vy{l!P`+NG*`*x6^PGgHH4!dsolgU4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T_*aj<618qQ7mD#k2ZFGou&69;=2 z1j7=Su8k}{L*h&mfs7jg^PN&9C1Z@U!p6gXk&-7xM~{X`nqH#aGO`;Xy_zbz^rYacIq0AH%4!Oh93TzJ820%ur)8OyeS@K?sF1V(iFO z37Nnqj1z#1{|v7=_CX`lQA|$<1gtuNMHGNJYp1D_k;WQk-b+T6VmUK(x=bWviOZ~T z|4e%SpuaWLWD?qN2%`S*`P;BQBw(B__wTD6epvGdJ+>DBq2oVlf&F*lz+#avb4)3P1c^Mf#olQheVvZ|Z5 z>xXfgmv!5Z^SYn+_x}K5B%G^sRwiez&z9|f!E!#oJlT2kCOV0000$L_|bHBqAarB4TD{W@grX1CUr72@caw0faEd7-K|4L_|cawbojjHdpd6 zI6~Iv5J?-Q4*&oF000000FV;^004t70Z6Qk1Xl{X9oJ{sRC2(cs?- literal 0 HcmV?d00001 diff --git a/vendor/github.com/influxdata/influxdb/services/admin/assets/img/influxdb-light400.png b/vendor/github.com/influxdata/influxdb/services/admin/assets/img/influxdb-light400.png new file mode 100644 index 0000000000000000000000000000000000000000..c5cef420ae3a36e21d5519fc19f582bd7cccaaa6 GIT binary patch literal 19775 zcmV)rK$*XZP)^^(%?LF&LK}A3iMNvA^dkHNhBqXHwWc%)X=gck|AV78# zFo8M0-z8)+_s*S}JLiASxu*ztV=?|h>O}2Ih!_S@jG_PAp%4zz&qdU}rdEa4PBtfk zgY}p*sW+mH8dTX`kV&RseAJolo;1_BR2 zt@8eKxVk{Anhc}v-*n(U0+%o4*CdlnGRY(Zh?f+?Pp~@1v2@<2Z45@IMk3CrgVQ5o ze?=|k>@7e^QDqc@4PQX1h$dipRen`6$t06Z=R1H1!dtKqco0}THo7Zr>6wfKo$`-A zd#K&oJqZsl--|^%a)Ds|D+D;3=57!*PI~VuFs%r*e%gw`aQCbvkT(ljV%B<)cZNi|G zNWkjg-lOH$C6i1t$#i}Kh!!4CJPaD71nZ;&pJ(KuS9&yV?-q}(MYYJSvf+)<-JsJb zF?-(;n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CHvLqpQwe1|AIy(5Rg2uXh$v<9V|lIs9ADWjq(8EVW#vkJF9l1xS?%`8?K0I1Nd?kmJ)O$XP^ZERyPu zsFWP1!3A_UV29&0vgFq-lT0$n)OrDAKh#R>uc*VJYAXiEhoDbv2<}|84ZW@%hAxpo zSe#oa?PXloKMjd`CDtCXptQ;YsHLgqHu5?L(U?SuGRY*9Oft0^09gZ_+EHFqsac#` zhQ1L7yg#Z7u3fMd{XSWNPT@h=R#=G%9pmu$fOIL|e?fMMR1gZGM&9%;lwX-lGRY*< z`3WF(P$=GpQhDF2zwg74gfI+`GGfm3e)w`nF7}qz;OcHkn9(@_aT)=i?JvR1&Dlo_ zOT8k$E}3MKNv87`KzQ@xQJ8c$R8-W3UNL6_-X7Z(qmm==%%DF@2o%~yyt5-8_y4ww zy|37NYF&d#3T2W>CYfY9j{t@bAHwb$`Qx@j_>t>>a0vjH+j~Zkj(%5u zPT;{+-|X_Ml1V0+WRd~oC> literal 0 HcmV?d00001 diff --git a/vendor/github.com/influxdata/influxdb/services/admin/assets/index.html b/vendor/github.com/influxdata/influxdb/services/admin/assets/index.html new file mode 100644 index 000000000..e9b0357c3 --- /dev/null +++ b/vendor/github.com/influxdata/influxdb/services/admin/assets/index.html @@ -0,0 +1,222 @@ + + + + + + + + + + InfluxDB - Admin Interface + + + + + + + + + +
+ + + + + +
+ + +
+
+
+

Connection Settings

+
+
+
+
+ + +
+ +
+ + +
+ +
+ + +
+ +
+ + +
+ +
+ +
+
+ +
+
+
+
+
+ +
+
+
+
+
+
+ + +
+
+
+
+
+
+
+ +
+
+ +
+
+
+
+
+
+
+
+ +
+
+
+ +
+
+
+ + + + + + + + + + + + + + + + + diff --git a/vendor/github.com/influxdata/influxdb/services/admin/assets/js/admin.js b/vendor/github.com/influxdata/influxdb/services/admin/assets/js/admin.js new file mode 100644 index 000000000..9f5b305a3 --- /dev/null +++ b/vendor/github.com/influxdata/influxdb/services/admin/assets/js/admin.js @@ -0,0 +1,521 @@ +// allow the user to store recent queries for quick retrieval +var recentQueries = []; +var queryPointer = null; + +// keep track of the databases that exist on the server +var availableDatabases = []; +var currentlySelectedDatabase = null; + +// connection settings for the server, with sensible defaults +var connectionSettings = { + hostname: (window.location.hostname ? window.location.hostname: "localhost"), + port: "8086", + username: "", + password: "", + ssl: ('https:' == window.location.protocol ? true : false) +} + +var connectionString = function() { + var protocol = (connectionSettings.ssl ? "https" : "http"); + var host = connectionSettings.hostname + ":" + connectionSettings.port; + + if (connectionSettings.username !== "") { + $.ajaxSetup({ + headers: { + 'Authorization': "Basic " + btoa(connectionSettings.username + ":" + connectionSettings.password) + } + }); + } + + return protocol + "://" + host; +} + +var getSeriesFromJSON = function(data) { + var results = []; + data.results.forEach(function(result) { + if (result.series) { + result.series.forEach(function(s) { + results.push(s); + }); + } + }); + return results.length > 0 ? results : null; +} + +// gets settings from the browser's localStorage and sets defaults if they aren't found +var loadSettings = function() { + var cs = localStorage.getItem("connectionSettings"); + + if (cs != null) { connectionSettings = JSON.parse(cs); } + + document.getElementById('hostname').value = connectionSettings.hostname; + document.getElementById('port').value = connectionSettings.port; + document.getElementById('username').value = connectionSettings.username; + document.getElementById('password').value = connectionSettings.password; + document.getElementById('ssl').checked = connectionSettings.ssl; + + getClientVersion(); + getDatabases(); +} + +var updateSettings = function() { + var hostname = document.getElementById('hostname').value; + var port = document.getElementById('port').value; + var username = document.getElementById('username').value; + var password = document.getElementById('password').value; + var ssl = document.getElementById('ssl').checked; + + if (hostname == "") { hostname = "localhost"; } + + if (port == "") { port = "8086"; } + + connectionSettings.hostname = hostname; + connectionSettings.port = port; + connectionSettings.username = username; + connectionSettings.password = password; + connectionSettings.ssl = ssl; + + localStorage.setItem("connectionSettings", JSON.stringify(connectionSettings)); + + getDatabases(); +} + +var showSettings = function() { + $("#settings").show(); + $("input#query").prop('disabled', true); +} + +var hideSettings = function() { + $("#settings").hide(); + $("input#query").prop('disabled', false); +} + +// hide errors within the Write Data modal +var hideModalError = function() { + $("div#modal-error").empty().hide(); +} + +// show errors within the Write Data modal +var showModalError = function(message) { + hideModalSuccess(); + + $("div#modal-error").html("

" + message + "

").show(); +} + +// hide success messages within the Write Data modal +var hideModalSuccess = function() { + $("div#modal-success").empty().hide(); +} + +// show success messages within the Write Data modal +var showModalSuccess = function(message) { + hideModalError(); + + $("div#modal-success").html("

" + message + "

").show(); +} + +// hide errors from queries +var hideQueryError = function() { + $("div#query-error").empty().hide(); +} + +// show errors from queries +var showQueryError = function(message) { + hideQuerySuccess(); + + $("div#query-error").html("

" + message + "

").show(); +} + +// hide success messages from queries +var hideQuerySuccess = function() { + $("div#query-success").empty().hide(); +} + +// show success messages from queries +var showQuerySuccess = function(message) { + hideQueryError(); + + $("div#query-success").html("

" + message + "

").show(); +} + +// hide warning from database lookup +var hideDatabaseWarning = function() { + $("div#database-warning").empty().hide(); +} + +// show warning from database lookup +var showDatabaseWarning = function(message) { + $("div#database-warning").html("

" + message + "

").show(); +} + +// clear out the results table +var clearResults = function() { + $("div#table").empty(); +} + +// handle submissions of the query bar +var handleSubmit = function(e) { + var queryElement = document.getElementById('query'); + var q = queryElement.value; + + clearResults(); + hideQueryError(); + hideQuerySuccess(); + + if (q == "") { return }; + + var query = $.get(connectionString() + "/query", {q: q, db: currentlySelectedDatabase}, function() { + }); + + recentQueries.push(q); + queryPointer = recentQueries.length - 1; + + query.fail(handleRequestError); + + query.done(function (data) { + var firstRow = data.results[0]; + if (firstRow.error) { + showQueryError("Server returned error: " + firstRow.error); + return + } + + var series = getSeriesFromJSON(data); + + if (series == null) { + showQuerySuccess("Success! (no results to display)"); + getDatabases(); + return + } + + hideDatabaseWarning(); + React.render( + React.createElement(DataTable, {series: series}), + document.getElementById('table') + ); + }); + + if (e != null) { e.preventDefault(); } + return false; +}; + +var handleRequestError = function(e) { + var errorText = e.status + " " + e.statusText; + showDatabaseWarning("Unable to fetch list of databases."); + + if ("responseText" in e) { + try { errorText = "Server returned error: " + JSON.parse(e.responseText).error; } catch(e) {} + } + + if (e.status == 400) { + hideSettings(); + } else if (e.status == 401) { + if (errorText.indexOf("error authorizing query") > -1) { + hideSettings(); + $("input#query").val("CREATE USER WITH PASSWORD '' WITH ALL PRIVILEGES").focus(); + } else { + showSettings(); + $("input#username").focus(); + } + } else { + showSettings(); + $("input#hostname").focus(); + showDatabaseWarning("Hint: the InfluxDB API runs on port 8086 by default"); + errorText = e.status + " " + e.statusText + " - Could not connect to " + connectionString(); + } + showQueryError(errorText); +}; + +var handleKeypress = function(e) { + var queryElement = document.getElementById('query'); + + // Enable/Disable the generate permalink button + if(queryElement.value == "" && !$("#generate-query-url").hasClass("disabled")) { + $("#generate-query-url").addClass("disabled"); + } else { + $("#generate-query-url").removeClass("disabled"); + } + + // key press == enter + if (e.keyCode == 13) { + e.preventDefault(); + handleSubmit(); + return false; + } + + // if we don't have any recent queries, ignore the arrow keys + if (recentQueries.length == 0 ) { return } + + // key press == up arrow + if (e.keyCode == 38) { + clearResults() + hideQuerySuccess() + hideQueryError() + + // TODO: stash the current query, if there is one? + if (queryPointer == recentQueries.length - 1) { + // this is buggy. + //recentQueries.push(queryElement.value); + //queryPointer = recentQueries.length - 1; + } + + if (queryPointer != null && queryPointer > 0) { + queryPointer -= 1; + queryElement.value = recentQueries[queryPointer]; + } + } + + // key press == down arrow + if (e.keyCode == 40) { + if (queryPointer != null && queryPointer < recentQueries.length - 1) { + queryPointer += 1; + queryElement.value = recentQueries[queryPointer]; + } + } +}; + +var QueryError = React.createClass({ + render: function() { + return React.createElement("div", {className: "alert alert-danger"}, this.props.message) + } +}); + +var stringifyTags = function(tags) { + var tagStrings = []; + + for(var index in tags) { + tagStrings.push(index + ":" + tags[index]); + } + + return tagStrings.join(", "); +} + +var DataTable = React.createClass({ + render: function() { + var tables = this.props.series.map(function(series) { + return React.createElement("div", null, + React.createElement("h1", null, series.name), + React.createElement("h2", null, stringifyTags(series.tags)), + React.createElement("table", {className: "table"}, + React.createElement(TableHeader, {data: series.columns}), + React.createElement(TableBody, {data: series}) + ) + ); + }); + + return React.createElement("div", null, tables); + } +}); + +var TableHeader = React.createClass({ + render: function() { + var headers = this.props.data.map(function(column) { + return React.createElement("th", null, column); + }); + + return React.createElement("tr", null, headers); + } +}); + +var TableBody = React.createClass({ + render: function() { + if (this.props.data.values) { + var tableRows = this.props.data.values.map(function (row) { + return React.createElement(TableRow, {data: row}); + }); + } + + return React.createElement("tbody", null, tableRows); + } +}); + +var TableRow = React.createClass({ + render: function() { + var tableData = this.props.data.map(function (data, index) { + if (index == 0) { + return React.createElement("td", {className: "timestamp"}, null, data); + } else { + return React.createElement("td", null, pretty(data)); + } + }); + + return React.createElement("tr", null, tableData); + } +}); + +var pretty = function(val) { + if (typeof val == 'string') { + return "\"" + val + "\""; + } else if (typeof val == 'boolean' ){ + return val.toString(); + } else { + return val; + } +} + +var getClientVersion = function () { + var query = $.get(window.location.origin + "/"); + + query.fail(handleRequestError); + + query.done(function (data, status, xhr) { + var version = xhr.getResponseHeader('X-InfluxDB-Version'); + if (version.indexOf("unknown") == -1) { + version = 'v' + version; + console.log('got client version '+version); + $('#influxdb-doc-link').attr('href', 'https://docs.influxdata.com/influxdb/'+version+'/introduction/getting_started/'); + } + $('.influxdb-client-version').html(version); + }); +} + +var chooseDatabase = function (databaseName) { + currentlySelectedDatabase = databaseName; + document.getElementById("content-current-database").innerHTML = currentlySelectedDatabase; +} + +var getDatabases = function () { + var q = "SHOW DATABASES"; + var query = $.get(connectionString() + "/query", {q: q, db: currentlySelectedDatabase}); + + query.fail(handleRequestError); + + query.done(function (data, status, xhr) { + // Set version of the InfluxDB server + var version = xhr.getResponseHeader('X-InfluxDB-Version'); + if (version.indexOf("unknown") == -1) { + version = "v" + version; + } + $('.influxdb-version').html(version); + + hideSettings(); + hideDatabaseWarning(); + + var firstRow = data.results[0]; + if (firstRow.error) { + showDatabaseWarning(firstRow.error); + return; + } + + var series = getSeriesFromJSON(data); + var values = series[0].values; + + if ((values == null) || (values.length == 0)) { + availableDatabases = []; + updateDatabaseList(); + + showDatabaseWarning("No databases found.") + } else { + availableDatabases = values.map(function(value) { + return value[0]; + }).sort(); + + if (currentlySelectedDatabase == null) { + chooseDatabase(availableDatabases[0]); + } else if (availableDatabases.indexOf(currentlySelectedDatabase) == -1) { + chooseDatabase(availableDatabases[0]); + } + updateDatabaseList(); + } + }); +} + +var updateDatabaseList = function() { + var databaseList = $("ul#content-database-list"); + + databaseList.empty(); + availableDatabases.forEach(function(database) { + var li = $("
  • " + database + "
  • "); + databaseList.append(li); + }); + + if (availableDatabases.length == 0) { + document.getElementById("content-current-database").innerHTML = "…"; + } +} + +var generateQueryURL = function() { + var q = document.getElementById('query').value; + + var query = connectionString() + "/query?"; + var queryParams = {q: q, db: currentlySelectedDatabase}; + query += $.param(queryParams); + + var textarea = $("#query-url"); + textarea.val(query); +} + +// when the page is ready, start everything up +$(document).ready(function () { + loadSettings(); + + // bind to the settings cog in the navbar + $("#action-settings").click(function (e) { + $("#settings").toggle(); + }); + + // bind to the save button in the settings form + $("#form-settings").submit(function (e) { + updateSettings(); + }); + + // bind to the items in the query template dropdown + $("ul#action-template label").click(function (e) { + var el = $(e.target); + $("input#query").val(el.data("query")).focus(); + }); + + $("ul#content-database-list").on("click", function(e) { + if (e.target.tagName != "A") { return; } + + chooseDatabase(e.target.innerHTML); + e.preventDefault(); + }) + + // load the Write Data modal + $("button#action-send").click(function (e) { + var data = $("textarea#content-data").val(); + + var startTime = new Date().getTime(); + var write = $.post(connectionString() + "/write?db=" + currentlySelectedDatabase, data, function() { + }); + + write.fail(function (e) { + if (e.status == 400) { + showModalError("Failed to write: " + e.responseText) + } + else { + showModalError("Failed to contact server: " + e.statusText) + } + }); + + write.done(function (data) { + var endTime = new Date().getTime(); + var elapsed = endTime - startTime; + showModalSuccess("Write succeeded. (" + elapsed + "ms)"); + }); + + }); + + // Enable auto select of the text in modal + $('#queryURLModal').on('shown.bs.modal', function () { + var textarea = $("#query-url"); + textarea.focus(); + textarea.select(); + }); + + //bind to the generate permalink button + $("#generate-query-url").click(function (e) { + generateQueryURL(); + }); + + // handle submit actions on the query bar + var form = document.getElementById('query-form'); + form.addEventListener("submit", handleSubmit); + + // handle keypresses on the query bar so we can get arrow keys and enter + var query = document.getElementById('query'); + query.addEventListener("keydown", handleKeypress); + + // make sure we start out with the query bar in focus + document.getElementById('query').focus(); +}) diff --git a/vendor/github.com/influxdata/influxdb/services/admin/assets/js/vendor/bootstrap-3.3.5.min.js b/vendor/github.com/influxdata/influxdb/services/admin/assets/js/vendor/bootstrap-3.3.5.min.js new file mode 100644 index 000000000..133aeecb9 --- /dev/null +++ b/vendor/github.com/influxdata/influxdb/services/admin/assets/js/vendor/bootstrap-3.3.5.min.js @@ -0,0 +1,7 @@ +/*! + * Bootstrap v3.3.5 (http://getbootstrap.com) + * Copyright 2011-2015 Twitter, Inc. + * Licensed under the MIT license + */ +if("undefined"==typeof jQuery)throw new Error("Bootstrap's JavaScript requires jQuery");+function(a){"use strict";var b=a.fn.jquery.split(" ")[0].split(".");if(b[0]<2&&b[1]<9||1==b[0]&&9==b[1]&&b[2]<1)throw new Error("Bootstrap's JavaScript requires jQuery version 1.9.1 or higher")}(jQuery),+function(a){"use strict";function b(){var a=document.createElement("bootstrap"),b={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"};for(var c in b)if(void 0!==a.style[c])return{end:b[c]};return!1}a.fn.emulateTransitionEnd=function(b){var c=!1,d=this;a(this).one("bsTransitionEnd",function(){c=!0});var e=function(){c||a(d).trigger(a.support.transition.end)};return setTimeout(e,b),this},a(function(){a.support.transition=b(),a.support.transition&&(a.event.special.bsTransitionEnd={bindType:a.support.transition.end,delegateType:a.support.transition.end,handle:function(b){return a(b.target).is(this)?b.handleObj.handler.apply(this,arguments):void 0}})})}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var c=a(this),e=c.data("bs.alert");e||c.data("bs.alert",e=new d(this)),"string"==typeof b&&e[b].call(c)})}var c='[data-dismiss="alert"]',d=function(b){a(b).on("click",c,this.close)};d.VERSION="3.3.5",d.TRANSITION_DURATION=150,d.prototype.close=function(b){function c(){g.detach().trigger("closed.bs.alert").remove()}var e=a(this),f=e.attr("data-target");f||(f=e.attr("href"),f=f&&f.replace(/.*(?=#[^\s]*$)/,""));var g=a(f);b&&b.preventDefault(),g.length||(g=e.closest(".alert")),g.trigger(b=a.Event("close.bs.alert")),b.isDefaultPrevented()||(g.removeClass("in"),a.support.transition&&g.hasClass("fade")?g.one("bsTransitionEnd",c).emulateTransitionEnd(d.TRANSITION_DURATION):c())};var e=a.fn.alert;a.fn.alert=b,a.fn.alert.Constructor=d,a.fn.alert.noConflict=function(){return a.fn.alert=e,this},a(document).on("click.bs.alert.data-api",c,d.prototype.close)}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.button"),f="object"==typeof b&&b;e||d.data("bs.button",e=new c(this,f)),"toggle"==b?e.toggle():b&&e.setState(b)})}var c=function(b,d){this.$element=a(b),this.options=a.extend({},c.DEFAULTS,d),this.isLoading=!1};c.VERSION="3.3.5",c.DEFAULTS={loadingText:"loading..."},c.prototype.setState=function(b){var c="disabled",d=this.$element,e=d.is("input")?"val":"html",f=d.data();b+="Text",null==f.resetText&&d.data("resetText",d[e]()),setTimeout(a.proxy(function(){d[e](null==f[b]?this.options[b]:f[b]),"loadingText"==b?(this.isLoading=!0,d.addClass(c).attr(c,c)):this.isLoading&&(this.isLoading=!1,d.removeClass(c).removeAttr(c))},this),0)},c.prototype.toggle=function(){var a=!0,b=this.$element.closest('[data-toggle="buttons"]');if(b.length){var c=this.$element.find("input");"radio"==c.prop("type")?(c.prop("checked")&&(a=!1),b.find(".active").removeClass("active"),this.$element.addClass("active")):"checkbox"==c.prop("type")&&(c.prop("checked")!==this.$element.hasClass("active")&&(a=!1),this.$element.toggleClass("active")),c.prop("checked",this.$element.hasClass("active")),a&&c.trigger("change")}else this.$element.attr("aria-pressed",!this.$element.hasClass("active")),this.$element.toggleClass("active")};var d=a.fn.button;a.fn.button=b,a.fn.button.Constructor=c,a.fn.button.noConflict=function(){return a.fn.button=d,this},a(document).on("click.bs.button.data-api",'[data-toggle^="button"]',function(c){var d=a(c.target);d.hasClass("btn")||(d=d.closest(".btn")),b.call(d,"toggle"),a(c.target).is('input[type="radio"]')||a(c.target).is('input[type="checkbox"]')||c.preventDefault()}).on("focus.bs.button.data-api blur.bs.button.data-api",'[data-toggle^="button"]',function(b){a(b.target).closest(".btn").toggleClass("focus",/^focus(in)?$/.test(b.type))})}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.carousel"),f=a.extend({},c.DEFAULTS,d.data(),"object"==typeof b&&b),g="string"==typeof b?b:f.slide;e||d.data("bs.carousel",e=new c(this,f)),"number"==typeof b?e.to(b):g?e[g]():f.interval&&e.pause().cycle()})}var c=function(b,c){this.$element=a(b),this.$indicators=this.$element.find(".carousel-indicators"),this.options=c,this.paused=null,this.sliding=null,this.interval=null,this.$active=null,this.$items=null,this.options.keyboard&&this.$element.on("keydown.bs.carousel",a.proxy(this.keydown,this)),"hover"==this.options.pause&&!("ontouchstart"in document.documentElement)&&this.$element.on("mouseenter.bs.carousel",a.proxy(this.pause,this)).on("mouseleave.bs.carousel",a.proxy(this.cycle,this))};c.VERSION="3.3.5",c.TRANSITION_DURATION=600,c.DEFAULTS={interval:5e3,pause:"hover",wrap:!0,keyboard:!0},c.prototype.keydown=function(a){if(!/input|textarea/i.test(a.target.tagName)){switch(a.which){case 37:this.prev();break;case 39:this.next();break;default:return}a.preventDefault()}},c.prototype.cycle=function(b){return b||(this.paused=!1),this.interval&&clearInterval(this.interval),this.options.interval&&!this.paused&&(this.interval=setInterval(a.proxy(this.next,this),this.options.interval)),this},c.prototype.getItemIndex=function(a){return this.$items=a.parent().children(".item"),this.$items.index(a||this.$active)},c.prototype.getItemForDirection=function(a,b){var c=this.getItemIndex(b),d="prev"==a&&0===c||"next"==a&&c==this.$items.length-1;if(d&&!this.options.wrap)return b;var e="prev"==a?-1:1,f=(c+e)%this.$items.length;return this.$items.eq(f)},c.prototype.to=function(a){var b=this,c=this.getItemIndex(this.$active=this.$element.find(".item.active"));return a>this.$items.length-1||0>a?void 0:this.sliding?this.$element.one("slid.bs.carousel",function(){b.to(a)}):c==a?this.pause().cycle():this.slide(a>c?"next":"prev",this.$items.eq(a))},c.prototype.pause=function(b){return b||(this.paused=!0),this.$element.find(".next, .prev").length&&a.support.transition&&(this.$element.trigger(a.support.transition.end),this.cycle(!0)),this.interval=clearInterval(this.interval),this},c.prototype.next=function(){return this.sliding?void 0:this.slide("next")},c.prototype.prev=function(){return this.sliding?void 0:this.slide("prev")},c.prototype.slide=function(b,d){var e=this.$element.find(".item.active"),f=d||this.getItemForDirection(b,e),g=this.interval,h="next"==b?"left":"right",i=this;if(f.hasClass("active"))return this.sliding=!1;var j=f[0],k=a.Event("slide.bs.carousel",{relatedTarget:j,direction:h});if(this.$element.trigger(k),!k.isDefaultPrevented()){if(this.sliding=!0,g&&this.pause(),this.$indicators.length){this.$indicators.find(".active").removeClass("active");var l=a(this.$indicators.children()[this.getItemIndex(f)]);l&&l.addClass("active")}var m=a.Event("slid.bs.carousel",{relatedTarget:j,direction:h});return a.support.transition&&this.$element.hasClass("slide")?(f.addClass(b),f[0].offsetWidth,e.addClass(h),f.addClass(h),e.one("bsTransitionEnd",function(){f.removeClass([b,h].join(" ")).addClass("active"),e.removeClass(["active",h].join(" ")),i.sliding=!1,setTimeout(function(){i.$element.trigger(m)},0)}).emulateTransitionEnd(c.TRANSITION_DURATION)):(e.removeClass("active"),f.addClass("active"),this.sliding=!1,this.$element.trigger(m)),g&&this.cycle(),this}};var d=a.fn.carousel;a.fn.carousel=b,a.fn.carousel.Constructor=c,a.fn.carousel.noConflict=function(){return a.fn.carousel=d,this};var e=function(c){var d,e=a(this),f=a(e.attr("data-target")||(d=e.attr("href"))&&d.replace(/.*(?=#[^\s]+$)/,""));if(f.hasClass("carousel")){var g=a.extend({},f.data(),e.data()),h=e.attr("data-slide-to");h&&(g.interval=!1),b.call(f,g),h&&f.data("bs.carousel").to(h),c.preventDefault()}};a(document).on("click.bs.carousel.data-api","[data-slide]",e).on("click.bs.carousel.data-api","[data-slide-to]",e),a(window).on("load",function(){a('[data-ride="carousel"]').each(function(){var c=a(this);b.call(c,c.data())})})}(jQuery),+function(a){"use strict";function b(b){var c,d=b.attr("data-target")||(c=b.attr("href"))&&c.replace(/.*(?=#[^\s]+$)/,"");return a(d)}function c(b){return this.each(function(){var c=a(this),e=c.data("bs.collapse"),f=a.extend({},d.DEFAULTS,c.data(),"object"==typeof b&&b);!e&&f.toggle&&/show|hide/.test(b)&&(f.toggle=!1),e||c.data("bs.collapse",e=new d(this,f)),"string"==typeof b&&e[b]()})}var d=function(b,c){this.$element=a(b),this.options=a.extend({},d.DEFAULTS,c),this.$trigger=a('[data-toggle="collapse"][href="#'+b.id+'"],[data-toggle="collapse"][data-target="#'+b.id+'"]'),this.transitioning=null,this.options.parent?this.$parent=this.getParent():this.addAriaAndCollapsedClass(this.$element,this.$trigger),this.options.toggle&&this.toggle()};d.VERSION="3.3.5",d.TRANSITION_DURATION=350,d.DEFAULTS={toggle:!0},d.prototype.dimension=function(){var a=this.$element.hasClass("width");return a?"width":"height"},d.prototype.show=function(){if(!this.transitioning&&!this.$element.hasClass("in")){var b,e=this.$parent&&this.$parent.children(".panel").children(".in, .collapsing");if(!(e&&e.length&&(b=e.data("bs.collapse"),b&&b.transitioning))){var f=a.Event("show.bs.collapse");if(this.$element.trigger(f),!f.isDefaultPrevented()){e&&e.length&&(c.call(e,"hide"),b||e.data("bs.collapse",null));var g=this.dimension();this.$element.removeClass("collapse").addClass("collapsing")[g](0).attr("aria-expanded",!0),this.$trigger.removeClass("collapsed").attr("aria-expanded",!0),this.transitioning=1;var h=function(){this.$element.removeClass("collapsing").addClass("collapse in")[g](""),this.transitioning=0,this.$element.trigger("shown.bs.collapse")};if(!a.support.transition)return h.call(this);var i=a.camelCase(["scroll",g].join("-"));this.$element.one("bsTransitionEnd",a.proxy(h,this)).emulateTransitionEnd(d.TRANSITION_DURATION)[g](this.$element[0][i])}}}},d.prototype.hide=function(){if(!this.transitioning&&this.$element.hasClass("in")){var b=a.Event("hide.bs.collapse");if(this.$element.trigger(b),!b.isDefaultPrevented()){var c=this.dimension();this.$element[c](this.$element[c]())[0].offsetHeight,this.$element.addClass("collapsing").removeClass("collapse in").attr("aria-expanded",!1),this.$trigger.addClass("collapsed").attr("aria-expanded",!1),this.transitioning=1;var e=function(){this.transitioning=0,this.$element.removeClass("collapsing").addClass("collapse").trigger("hidden.bs.collapse")};return a.support.transition?void this.$element[c](0).one("bsTransitionEnd",a.proxy(e,this)).emulateTransitionEnd(d.TRANSITION_DURATION):e.call(this)}}},d.prototype.toggle=function(){this[this.$element.hasClass("in")?"hide":"show"]()},d.prototype.getParent=function(){return a(this.options.parent).find('[data-toggle="collapse"][data-parent="'+this.options.parent+'"]').each(a.proxy(function(c,d){var e=a(d);this.addAriaAndCollapsedClass(b(e),e)},this)).end()},d.prototype.addAriaAndCollapsedClass=function(a,b){var c=a.hasClass("in");a.attr("aria-expanded",c),b.toggleClass("collapsed",!c).attr("aria-expanded",c)};var e=a.fn.collapse;a.fn.collapse=c,a.fn.collapse.Constructor=d,a.fn.collapse.noConflict=function(){return a.fn.collapse=e,this},a(document).on("click.bs.collapse.data-api",'[data-toggle="collapse"]',function(d){var e=a(this);e.attr("data-target")||d.preventDefault();var f=b(e),g=f.data("bs.collapse"),h=g?"toggle":e.data();c.call(f,h)})}(jQuery),+function(a){"use strict";function b(b){var c=b.attr("data-target");c||(c=b.attr("href"),c=c&&/#[A-Za-z]/.test(c)&&c.replace(/.*(?=#[^\s]*$)/,""));var d=c&&a(c);return d&&d.length?d:b.parent()}function c(c){c&&3===c.which||(a(e).remove(),a(f).each(function(){var d=a(this),e=b(d),f={relatedTarget:this};e.hasClass("open")&&(c&&"click"==c.type&&/input|textarea/i.test(c.target.tagName)&&a.contains(e[0],c.target)||(e.trigger(c=a.Event("hide.bs.dropdown",f)),c.isDefaultPrevented()||(d.attr("aria-expanded","false"),e.removeClass("open").trigger("hidden.bs.dropdown",f))))}))}function d(b){return this.each(function(){var c=a(this),d=c.data("bs.dropdown");d||c.data("bs.dropdown",d=new g(this)),"string"==typeof b&&d[b].call(c)})}var e=".dropdown-backdrop",f='[data-toggle="dropdown"]',g=function(b){a(b).on("click.bs.dropdown",this.toggle)};g.VERSION="3.3.5",g.prototype.toggle=function(d){var e=a(this);if(!e.is(".disabled, :disabled")){var f=b(e),g=f.hasClass("open");if(c(),!g){"ontouchstart"in document.documentElement&&!f.closest(".navbar-nav").length&&a(document.createElement("div")).addClass("dropdown-backdrop").insertAfter(a(this)).on("click",c);var h={relatedTarget:this};if(f.trigger(d=a.Event("show.bs.dropdown",h)),d.isDefaultPrevented())return;e.trigger("focus").attr("aria-expanded","true"),f.toggleClass("open").trigger("shown.bs.dropdown",h)}return!1}},g.prototype.keydown=function(c){if(/(38|40|27|32)/.test(c.which)&&!/input|textarea/i.test(c.target.tagName)){var d=a(this);if(c.preventDefault(),c.stopPropagation(),!d.is(".disabled, :disabled")){var e=b(d),g=e.hasClass("open");if(!g&&27!=c.which||g&&27==c.which)return 27==c.which&&e.find(f).trigger("focus"),d.trigger("click");var h=" li:not(.disabled):visible a",i=e.find(".dropdown-menu"+h);if(i.length){var j=i.index(c.target);38==c.which&&j>0&&j--,40==c.which&&jdocument.documentElement.clientHeight;this.$element.css({paddingLeft:!this.bodyIsOverflowing&&a?this.scrollbarWidth:"",paddingRight:this.bodyIsOverflowing&&!a?this.scrollbarWidth:""})},c.prototype.resetAdjustments=function(){this.$element.css({paddingLeft:"",paddingRight:""})},c.prototype.checkScrollbar=function(){var a=window.innerWidth;if(!a){var b=document.documentElement.getBoundingClientRect();a=b.right-Math.abs(b.left)}this.bodyIsOverflowing=document.body.clientWidth
    ',trigger:"hover focus",title:"",delay:0,html:!1,container:!1,viewport:{selector:"body",padding:0}},c.prototype.init=function(b,c,d){if(this.enabled=!0,this.type=b,this.$element=a(c),this.options=this.getOptions(d),this.$viewport=this.options.viewport&&a(a.isFunction(this.options.viewport)?this.options.viewport.call(this,this.$element):this.options.viewport.selector||this.options.viewport),this.inState={click:!1,hover:!1,focus:!1},this.$element[0]instanceof document.constructor&&!this.options.selector)throw new Error("`selector` option must be specified when initializing "+this.type+" on the window.document object!");for(var e=this.options.trigger.split(" "),f=e.length;f--;){var g=e[f];if("click"==g)this.$element.on("click."+this.type,this.options.selector,a.proxy(this.toggle,this));else if("manual"!=g){var h="hover"==g?"mouseenter":"focusin",i="hover"==g?"mouseleave":"focusout";this.$element.on(h+"."+this.type,this.options.selector,a.proxy(this.enter,this)),this.$element.on(i+"."+this.type,this.options.selector,a.proxy(this.leave,this))}}this.options.selector?this._options=a.extend({},this.options,{trigger:"manual",selector:""}):this.fixTitle()},c.prototype.getDefaults=function(){return c.DEFAULTS},c.prototype.getOptions=function(b){return b=a.extend({},this.getDefaults(),this.$element.data(),b),b.delay&&"number"==typeof b.delay&&(b.delay={show:b.delay,hide:b.delay}),b},c.prototype.getDelegateOptions=function(){var b={},c=this.getDefaults();return this._options&&a.each(this._options,function(a,d){c[a]!=d&&(b[a]=d)}),b},c.prototype.enter=function(b){var c=b instanceof this.constructor?b:a(b.currentTarget).data("bs."+this.type);return c||(c=new this.constructor(b.currentTarget,this.getDelegateOptions()),a(b.currentTarget).data("bs."+this.type,c)),b instanceof a.Event&&(c.inState["focusin"==b.type?"focus":"hover"]=!0),c.tip().hasClass("in")||"in"==c.hoverState?void(c.hoverState="in"):(clearTimeout(c.timeout),c.hoverState="in",c.options.delay&&c.options.delay.show?void(c.timeout=setTimeout(function(){"in"==c.hoverState&&c.show()},c.options.delay.show)):c.show())},c.prototype.isInStateTrue=function(){for(var a in this.inState)if(this.inState[a])return!0;return!1},c.prototype.leave=function(b){var c=b instanceof this.constructor?b:a(b.currentTarget).data("bs."+this.type);return c||(c=new this.constructor(b.currentTarget,this.getDelegateOptions()),a(b.currentTarget).data("bs."+this.type,c)),b instanceof a.Event&&(c.inState["focusout"==b.type?"focus":"hover"]=!1),c.isInStateTrue()?void 0:(clearTimeout(c.timeout),c.hoverState="out",c.options.delay&&c.options.delay.hide?void(c.timeout=setTimeout(function(){"out"==c.hoverState&&c.hide()},c.options.delay.hide)):c.hide())},c.prototype.show=function(){var b=a.Event("show.bs."+this.type);if(this.hasContent()&&this.enabled){this.$element.trigger(b);var d=a.contains(this.$element[0].ownerDocument.documentElement,this.$element[0]);if(b.isDefaultPrevented()||!d)return;var e=this,f=this.tip(),g=this.getUID(this.type);this.setContent(),f.attr("id",g),this.$element.attr("aria-describedby",g),this.options.animation&&f.addClass("fade");var h="function"==typeof this.options.placement?this.options.placement.call(this,f[0],this.$element[0]):this.options.placement,i=/\s?auto?\s?/i,j=i.test(h);j&&(h=h.replace(i,"")||"top"),f.detach().css({top:0,left:0,display:"block"}).addClass(h).data("bs."+this.type,this),this.options.container?f.appendTo(this.options.container):f.insertAfter(this.$element),this.$element.trigger("inserted.bs."+this.type);var k=this.getPosition(),l=f[0].offsetWidth,m=f[0].offsetHeight;if(j){var n=h,o=this.getPosition(this.$viewport);h="bottom"==h&&k.bottom+m>o.bottom?"top":"top"==h&&k.top-mo.width?"left":"left"==h&&k.left-lg.top+g.height&&(e.top=g.top+g.height-i)}else{var j=b.left-f,k=b.left+f+c;jg.right&&(e.left=g.left+g.width-k)}return e},c.prototype.getTitle=function(){var a,b=this.$element,c=this.options;return a=b.attr("data-original-title")||("function"==typeof c.title?c.title.call(b[0]):c.title)},c.prototype.getUID=function(a){do a+=~~(1e6*Math.random());while(document.getElementById(a));return a},c.prototype.tip=function(){if(!this.$tip&&(this.$tip=a(this.options.template),1!=this.$tip.length))throw new Error(this.type+" `template` option must consist of exactly 1 top-level element!");return this.$tip},c.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".tooltip-arrow")},c.prototype.enable=function(){this.enabled=!0},c.prototype.disable=function(){this.enabled=!1},c.prototype.toggleEnabled=function(){this.enabled=!this.enabled},c.prototype.toggle=function(b){var c=this;b&&(c=a(b.currentTarget).data("bs."+this.type),c||(c=new this.constructor(b.currentTarget,this.getDelegateOptions()),a(b.currentTarget).data("bs."+this.type,c))),b?(c.inState.click=!c.inState.click,c.isInStateTrue()?c.enter(c):c.leave(c)):c.tip().hasClass("in")?c.leave(c):c.enter(c)},c.prototype.destroy=function(){var a=this;clearTimeout(this.timeout),this.hide(function(){a.$element.off("."+a.type).removeData("bs."+a.type),a.$tip&&a.$tip.detach(),a.$tip=null,a.$arrow=null,a.$viewport=null})};var d=a.fn.tooltip;a.fn.tooltip=b,a.fn.tooltip.Constructor=c,a.fn.tooltip.noConflict=function(){return a.fn.tooltip=d,this}}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.popover"),f="object"==typeof b&&b;(e||!/destroy|hide/.test(b))&&(e||d.data("bs.popover",e=new c(this,f)),"string"==typeof b&&e[b]())})}var c=function(a,b){this.init("popover",a,b)};if(!a.fn.tooltip)throw new Error("Popover requires tooltip.js");c.VERSION="3.3.5",c.DEFAULTS=a.extend({},a.fn.tooltip.Constructor.DEFAULTS,{placement:"right",trigger:"click",content:"",template:''}),c.prototype=a.extend({},a.fn.tooltip.Constructor.prototype),c.prototype.constructor=c,c.prototype.getDefaults=function(){return c.DEFAULTS},c.prototype.setContent=function(){var a=this.tip(),b=this.getTitle(),c=this.getContent();a.find(".popover-title")[this.options.html?"html":"text"](b),a.find(".popover-content").children().detach().end()[this.options.html?"string"==typeof c?"html":"append":"text"](c),a.removeClass("fade top bottom left right in"),a.find(".popover-title").html()||a.find(".popover-title").hide()},c.prototype.hasContent=function(){return this.getTitle()||this.getContent()},c.prototype.getContent=function(){var a=this.$element,b=this.options;return a.attr("data-content")||("function"==typeof b.content?b.content.call(a[0]):b.content)},c.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".arrow")};var d=a.fn.popover;a.fn.popover=b,a.fn.popover.Constructor=c,a.fn.popover.noConflict=function(){return a.fn.popover=d,this}}(jQuery),+function(a){"use strict";function b(c,d){this.$body=a(document.body),this.$scrollElement=a(a(c).is(document.body)?window:c),this.options=a.extend({},b.DEFAULTS,d),this.selector=(this.options.target||"")+" .nav li > a",this.offsets=[],this.targets=[],this.activeTarget=null,this.scrollHeight=0,this.$scrollElement.on("scroll.bs.scrollspy",a.proxy(this.process,this)),this.refresh(),this.process()}function c(c){return this.each(function(){var d=a(this),e=d.data("bs.scrollspy"),f="object"==typeof c&&c;e||d.data("bs.scrollspy",e=new b(this,f)),"string"==typeof c&&e[c]()})}b.VERSION="3.3.5",b.DEFAULTS={offset:10},b.prototype.getScrollHeight=function(){return this.$scrollElement[0].scrollHeight||Math.max(this.$body[0].scrollHeight,document.documentElement.scrollHeight)},b.prototype.refresh=function(){var b=this,c="offset",d=0;this.offsets=[],this.targets=[],this.scrollHeight=this.getScrollHeight(),a.isWindow(this.$scrollElement[0])||(c="position",d=this.$scrollElement.scrollTop()),this.$body.find(this.selector).map(function(){var b=a(this),e=b.data("target")||b.attr("href"),f=/^#./.test(e)&&a(e);return f&&f.length&&f.is(":visible")&&[[f[c]().top+d,e]]||null}).sort(function(a,b){return a[0]-b[0]}).each(function(){b.offsets.push(this[0]),b.targets.push(this[1])})},b.prototype.process=function(){var a,b=this.$scrollElement.scrollTop()+this.options.offset,c=this.getScrollHeight(),d=this.options.offset+c-this.$scrollElement.height(),e=this.offsets,f=this.targets,g=this.activeTarget;if(this.scrollHeight!=c&&this.refresh(),b>=d)return g!=(a=f[f.length-1])&&this.activate(a);if(g&&b=e[a]&&(void 0===e[a+1]||b .dropdown-menu > .active").removeClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded",!1),b.addClass("active").find('[data-toggle="tab"]').attr("aria-expanded",!0),h?(b[0].offsetWidth,b.addClass("in")):b.removeClass("fade"),b.parent(".dropdown-menu").length&&b.closest("li.dropdown").addClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded",!0),e&&e()}var g=d.find("> .active"),h=e&&a.support.transition&&(g.length&&g.hasClass("fade")||!!d.find("> .fade").length);g.length&&h?g.one("bsTransitionEnd",f).emulateTransitionEnd(c.TRANSITION_DURATION):f(),g.removeClass("in")};var d=a.fn.tab;a.fn.tab=b,a.fn.tab.Constructor=c,a.fn.tab.noConflict=function(){return a.fn.tab=d,this};var e=function(c){c.preventDefault(),b.call(a(this),"show")};a(document).on("click.bs.tab.data-api",'[data-toggle="tab"]',e).on("click.bs.tab.data-api",'[data-toggle="pill"]',e)}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.affix"),f="object"==typeof b&&b;e||d.data("bs.affix",e=new c(this,f)),"string"==typeof b&&e[b]()})}var c=function(b,d){this.options=a.extend({},c.DEFAULTS,d),this.$target=a(this.options.target).on("scroll.bs.affix.data-api",a.proxy(this.checkPosition,this)).on("click.bs.affix.data-api",a.proxy(this.checkPositionWithEventLoop,this)),this.$element=a(b),this.affixed=null,this.unpin=null,this.pinnedOffset=null,this.checkPosition()};c.VERSION="3.3.5",c.RESET="affix affix-top affix-bottom",c.DEFAULTS={offset:0,target:window},c.prototype.getState=function(a,b,c,d){var e=this.$target.scrollTop(),f=this.$element.offset(),g=this.$target.height();if(null!=c&&"top"==this.affixed)return c>e?"top":!1;if("bottom"==this.affixed)return null!=c?e+this.unpin<=f.top?!1:"bottom":a-d>=e+g?!1:"bottom";var h=null==this.affixed,i=h?e:f.top,j=h?g:b;return null!=c&&c>=e?"top":null!=d&&i+j>=a-d?"bottom":!1},c.prototype.getPinnedOffset=function(){if(this.pinnedOffset)return this.pinnedOffset;this.$element.removeClass(c.RESET).addClass("affix");var a=this.$target.scrollTop(),b=this.$element.offset();return this.pinnedOffset=b.top-a},c.prototype.checkPositionWithEventLoop=function(){setTimeout(a.proxy(this.checkPosition,this),1)},c.prototype.checkPosition=function(){if(this.$element.is(":visible")){var b=this.$element.height(),d=this.options.offset,e=d.top,f=d.bottom,g=Math.max(a(document).height(),a(document.body).height());"object"!=typeof d&&(f=e=d),"function"==typeof e&&(e=d.top(this.$element)),"function"==typeof f&&(f=d.bottom(this.$element));var h=this.getState(g,b,e,f);if(this.affixed!=h){null!=this.unpin&&this.$element.css("top","");var i="affix"+(h?"-"+h:""),j=a.Event(i+".bs.affix");if(this.$element.trigger(j),j.isDefaultPrevented())return;this.affixed=h,this.unpin="bottom"==h?this.getPinnedOffset():null,this.$element.removeClass(c.RESET).addClass(i).trigger(i.replace("affix","affixed")+".bs.affix")}"bottom"==h&&this.$element.offset({top:g-b-f})}};var d=a.fn.affix;a.fn.affix=b,a.fn.affix.Constructor=c,a.fn.affix.noConflict=function(){return a.fn.affix=d,this},a(window).on("load",function(){a('[data-spy="affix"]').each(function(){var c=a(this),d=c.data();d.offset=d.offset||{},null!=d.offsetBottom&&(d.offset.bottom=d.offsetBottom),null!=d.offsetTop&&(d.offset.top=d.offsetTop),b.call(c,d)})})}(jQuery); \ No newline at end of file diff --git a/vendor/github.com/influxdata/influxdb/services/admin/assets/js/vendor/jquery-2.1.4.min.js b/vendor/github.com/influxdata/influxdb/services/admin/assets/js/vendor/jquery-2.1.4.min.js new file mode 100644 index 000000000..49990d6e1 --- /dev/null +++ b/vendor/github.com/influxdata/influxdb/services/admin/assets/js/vendor/jquery-2.1.4.min.js @@ -0,0 +1,4 @@ +/*! jQuery v2.1.4 | (c) 2005, 2015 jQuery Foundation, Inc. | jquery.org/license */ +!function(a,b){"object"==typeof module&&"object"==typeof module.exports?module.exports=a.document?b(a,!0):function(a){if(!a.document)throw new Error("jQuery requires a window with a document");return b(a)}:b(a)}("undefined"!=typeof window?window:this,function(a,b){var c=[],d=c.slice,e=c.concat,f=c.push,g=c.indexOf,h={},i=h.toString,j=h.hasOwnProperty,k={},l=a.document,m="2.1.4",n=function(a,b){return new n.fn.init(a,b)},o=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,p=/^-ms-/,q=/-([\da-z])/gi,r=function(a,b){return b.toUpperCase()};n.fn=n.prototype={jquery:m,constructor:n,selector:"",length:0,toArray:function(){return d.call(this)},get:function(a){return null!=a?0>a?this[a+this.length]:this[a]:d.call(this)},pushStack:function(a){var b=n.merge(this.constructor(),a);return b.prevObject=this,b.context=this.context,b},each:function(a,b){return n.each(this,a,b)},map:function(a){return this.pushStack(n.map(this,function(b,c){return a.call(b,c,b)}))},slice:function(){return this.pushStack(d.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(a){var b=this.length,c=+a+(0>a?b:0);return this.pushStack(c>=0&&b>c?[this[c]]:[])},end:function(){return this.prevObject||this.constructor(null)},push:f,sort:c.sort,splice:c.splice},n.extend=n.fn.extend=function(){var a,b,c,d,e,f,g=arguments[0]||{},h=1,i=arguments.length,j=!1;for("boolean"==typeof g&&(j=g,g=arguments[h]||{},h++),"object"==typeof g||n.isFunction(g)||(g={}),h===i&&(g=this,h--);i>h;h++)if(null!=(a=arguments[h]))for(b in a)c=g[b],d=a[b],g!==d&&(j&&d&&(n.isPlainObject(d)||(e=n.isArray(d)))?(e?(e=!1,f=c&&n.isArray(c)?c:[]):f=c&&n.isPlainObject(c)?c:{},g[b]=n.extend(j,f,d)):void 0!==d&&(g[b]=d));return g},n.extend({expando:"jQuery"+(m+Math.random()).replace(/\D/g,""),isReady:!0,error:function(a){throw new Error(a)},noop:function(){},isFunction:function(a){return"function"===n.type(a)},isArray:Array.isArray,isWindow:function(a){return null!=a&&a===a.window},isNumeric:function(a){return!n.isArray(a)&&a-parseFloat(a)+1>=0},isPlainObject:function(a){return"object"!==n.type(a)||a.nodeType||n.isWindow(a)?!1:a.constructor&&!j.call(a.constructor.prototype,"isPrototypeOf")?!1:!0},isEmptyObject:function(a){var b;for(b in a)return!1;return!0},type:function(a){return null==a?a+"":"object"==typeof a||"function"==typeof a?h[i.call(a)]||"object":typeof a},globalEval:function(a){var b,c=eval;a=n.trim(a),a&&(1===a.indexOf("use strict")?(b=l.createElement("script"),b.text=a,l.head.appendChild(b).parentNode.removeChild(b)):c(a))},camelCase:function(a){return a.replace(p,"ms-").replace(q,r)},nodeName:function(a,b){return a.nodeName&&a.nodeName.toLowerCase()===b.toLowerCase()},each:function(a,b,c){var d,e=0,f=a.length,g=s(a);if(c){if(g){for(;f>e;e++)if(d=b.apply(a[e],c),d===!1)break}else for(e in a)if(d=b.apply(a[e],c),d===!1)break}else if(g){for(;f>e;e++)if(d=b.call(a[e],e,a[e]),d===!1)break}else for(e in a)if(d=b.call(a[e],e,a[e]),d===!1)break;return a},trim:function(a){return null==a?"":(a+"").replace(o,"")},makeArray:function(a,b){var c=b||[];return null!=a&&(s(Object(a))?n.merge(c,"string"==typeof a?[a]:a):f.call(c,a)),c},inArray:function(a,b,c){return null==b?-1:g.call(b,a,c)},merge:function(a,b){for(var c=+b.length,d=0,e=a.length;c>d;d++)a[e++]=b[d];return a.length=e,a},grep:function(a,b,c){for(var d,e=[],f=0,g=a.length,h=!c;g>f;f++)d=!b(a[f],f),d!==h&&e.push(a[f]);return e},map:function(a,b,c){var d,f=0,g=a.length,h=s(a),i=[];if(h)for(;g>f;f++)d=b(a[f],f,c),null!=d&&i.push(d);else for(f in a)d=b(a[f],f,c),null!=d&&i.push(d);return e.apply([],i)},guid:1,proxy:function(a,b){var c,e,f;return"string"==typeof b&&(c=a[b],b=a,a=c),n.isFunction(a)?(e=d.call(arguments,2),f=function(){return a.apply(b||this,e.concat(d.call(arguments)))},f.guid=a.guid=a.guid||n.guid++,f):void 0},now:Date.now,support:k}),n.each("Boolean Number String Function Array Date RegExp Object Error".split(" "),function(a,b){h["[object "+b+"]"]=b.toLowerCase()});function s(a){var b="length"in a&&a.length,c=n.type(a);return"function"===c||n.isWindow(a)?!1:1===a.nodeType&&b?!0:"array"===c||0===b||"number"==typeof b&&b>0&&b-1 in a}var t=function(a){var b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u="sizzle"+1*new Date,v=a.document,w=0,x=0,y=ha(),z=ha(),A=ha(),B=function(a,b){return a===b&&(l=!0),0},C=1<<31,D={}.hasOwnProperty,E=[],F=E.pop,G=E.push,H=E.push,I=E.slice,J=function(a,b){for(var c=0,d=a.length;d>c;c++)if(a[c]===b)return c;return-1},K="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",L="[\\x20\\t\\r\\n\\f]",M="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",N=M.replace("w","w#"),O="\\["+L+"*("+M+")(?:"+L+"*([*^$|!~]?=)"+L+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+N+"))|)"+L+"*\\]",P=":("+M+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+O+")*)|.*)\\)|)",Q=new RegExp(L+"+","g"),R=new RegExp("^"+L+"+|((?:^|[^\\\\])(?:\\\\.)*)"+L+"+$","g"),S=new RegExp("^"+L+"*,"+L+"*"),T=new RegExp("^"+L+"*([>+~]|"+L+")"+L+"*"),U=new RegExp("="+L+"*([^\\]'\"]*?)"+L+"*\\]","g"),V=new RegExp(P),W=new RegExp("^"+N+"$"),X={ID:new RegExp("^#("+M+")"),CLASS:new RegExp("^\\.("+M+")"),TAG:new RegExp("^("+M.replace("w","w*")+")"),ATTR:new RegExp("^"+O),PSEUDO:new RegExp("^"+P),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+L+"*(even|odd|(([+-]|)(\\d*)n|)"+L+"*(?:([+-]|)"+L+"*(\\d+)|))"+L+"*\\)|)","i"),bool:new RegExp("^(?:"+K+")$","i"),needsContext:new RegExp("^"+L+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+L+"*((?:-\\d)?\\d*)"+L+"*\\)|)(?=[^-]|$)","i")},Y=/^(?:input|select|textarea|button)$/i,Z=/^h\d$/i,$=/^[^{]+\{\s*\[native \w/,_=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,aa=/[+~]/,ba=/'|\\/g,ca=new RegExp("\\\\([\\da-f]{1,6}"+L+"?|("+L+")|.)","ig"),da=function(a,b,c){var d="0x"+b-65536;return d!==d||c?b:0>d?String.fromCharCode(d+65536):String.fromCharCode(d>>10|55296,1023&d|56320)},ea=function(){m()};try{H.apply(E=I.call(v.childNodes),v.childNodes),E[v.childNodes.length].nodeType}catch(fa){H={apply:E.length?function(a,b){G.apply(a,I.call(b))}:function(a,b){var c=a.length,d=0;while(a[c++]=b[d++]);a.length=c-1}}}function ga(a,b,d,e){var f,h,j,k,l,o,r,s,w,x;if((b?b.ownerDocument||b:v)!==n&&m(b),b=b||n,d=d||[],k=b.nodeType,"string"!=typeof a||!a||1!==k&&9!==k&&11!==k)return d;if(!e&&p){if(11!==k&&(f=_.exec(a)))if(j=f[1]){if(9===k){if(h=b.getElementById(j),!h||!h.parentNode)return d;if(h.id===j)return d.push(h),d}else if(b.ownerDocument&&(h=b.ownerDocument.getElementById(j))&&t(b,h)&&h.id===j)return d.push(h),d}else{if(f[2])return H.apply(d,b.getElementsByTagName(a)),d;if((j=f[3])&&c.getElementsByClassName)return H.apply(d,b.getElementsByClassName(j)),d}if(c.qsa&&(!q||!q.test(a))){if(s=r=u,w=b,x=1!==k&&a,1===k&&"object"!==b.nodeName.toLowerCase()){o=g(a),(r=b.getAttribute("id"))?s=r.replace(ba,"\\$&"):b.setAttribute("id",s),s="[id='"+s+"'] ",l=o.length;while(l--)o[l]=s+ra(o[l]);w=aa.test(a)&&pa(b.parentNode)||b,x=o.join(",")}if(x)try{return H.apply(d,w.querySelectorAll(x)),d}catch(y){}finally{r||b.removeAttribute("id")}}}return i(a.replace(R,"$1"),b,d,e)}function ha(){var a=[];function b(c,e){return a.push(c+" ")>d.cacheLength&&delete b[a.shift()],b[c+" "]=e}return b}function ia(a){return a[u]=!0,a}function ja(a){var b=n.createElement("div");try{return!!a(b)}catch(c){return!1}finally{b.parentNode&&b.parentNode.removeChild(b),b=null}}function ka(a,b){var c=a.split("|"),e=a.length;while(e--)d.attrHandle[c[e]]=b}function la(a,b){var c=b&&a,d=c&&1===a.nodeType&&1===b.nodeType&&(~b.sourceIndex||C)-(~a.sourceIndex||C);if(d)return d;if(c)while(c=c.nextSibling)if(c===b)return-1;return a?1:-1}function ma(a){return function(b){var c=b.nodeName.toLowerCase();return"input"===c&&b.type===a}}function na(a){return function(b){var c=b.nodeName.toLowerCase();return("input"===c||"button"===c)&&b.type===a}}function oa(a){return ia(function(b){return b=+b,ia(function(c,d){var e,f=a([],c.length,b),g=f.length;while(g--)c[e=f[g]]&&(c[e]=!(d[e]=c[e]))})})}function pa(a){return a&&"undefined"!=typeof a.getElementsByTagName&&a}c=ga.support={},f=ga.isXML=function(a){var b=a&&(a.ownerDocument||a).documentElement;return b?"HTML"!==b.nodeName:!1},m=ga.setDocument=function(a){var b,e,g=a?a.ownerDocument||a:v;return g!==n&&9===g.nodeType&&g.documentElement?(n=g,o=g.documentElement,e=g.defaultView,e&&e!==e.top&&(e.addEventListener?e.addEventListener("unload",ea,!1):e.attachEvent&&e.attachEvent("onunload",ea)),p=!f(g),c.attributes=ja(function(a){return a.className="i",!a.getAttribute("className")}),c.getElementsByTagName=ja(function(a){return a.appendChild(g.createComment("")),!a.getElementsByTagName("*").length}),c.getElementsByClassName=$.test(g.getElementsByClassName),c.getById=ja(function(a){return o.appendChild(a).id=u,!g.getElementsByName||!g.getElementsByName(u).length}),c.getById?(d.find.ID=function(a,b){if("undefined"!=typeof b.getElementById&&p){var c=b.getElementById(a);return c&&c.parentNode?[c]:[]}},d.filter.ID=function(a){var b=a.replace(ca,da);return function(a){return a.getAttribute("id")===b}}):(delete d.find.ID,d.filter.ID=function(a){var b=a.replace(ca,da);return function(a){var c="undefined"!=typeof a.getAttributeNode&&a.getAttributeNode("id");return c&&c.value===b}}),d.find.TAG=c.getElementsByTagName?function(a,b){return"undefined"!=typeof b.getElementsByTagName?b.getElementsByTagName(a):c.qsa?b.querySelectorAll(a):void 0}:function(a,b){var c,d=[],e=0,f=b.getElementsByTagName(a);if("*"===a){while(c=f[e++])1===c.nodeType&&d.push(c);return d}return f},d.find.CLASS=c.getElementsByClassName&&function(a,b){return p?b.getElementsByClassName(a):void 0},r=[],q=[],(c.qsa=$.test(g.querySelectorAll))&&(ja(function(a){o.appendChild(a).innerHTML="",a.querySelectorAll("[msallowcapture^='']").length&&q.push("[*^$]="+L+"*(?:''|\"\")"),a.querySelectorAll("[selected]").length||q.push("\\["+L+"*(?:value|"+K+")"),a.querySelectorAll("[id~="+u+"-]").length||q.push("~="),a.querySelectorAll(":checked").length||q.push(":checked"),a.querySelectorAll("a#"+u+"+*").length||q.push(".#.+[+~]")}),ja(function(a){var b=g.createElement("input");b.setAttribute("type","hidden"),a.appendChild(b).setAttribute("name","D"),a.querySelectorAll("[name=d]").length&&q.push("name"+L+"*[*^$|!~]?="),a.querySelectorAll(":enabled").length||q.push(":enabled",":disabled"),a.querySelectorAll("*,:x"),q.push(",.*:")})),(c.matchesSelector=$.test(s=o.matches||o.webkitMatchesSelector||o.mozMatchesSelector||o.oMatchesSelector||o.msMatchesSelector))&&ja(function(a){c.disconnectedMatch=s.call(a,"div"),s.call(a,"[s!='']:x"),r.push("!=",P)}),q=q.length&&new RegExp(q.join("|")),r=r.length&&new RegExp(r.join("|")),b=$.test(o.compareDocumentPosition),t=b||$.test(o.contains)?function(a,b){var c=9===a.nodeType?a.documentElement:a,d=b&&b.parentNode;return a===d||!(!d||1!==d.nodeType||!(c.contains?c.contains(d):a.compareDocumentPosition&&16&a.compareDocumentPosition(d)))}:function(a,b){if(b)while(b=b.parentNode)if(b===a)return!0;return!1},B=b?function(a,b){if(a===b)return l=!0,0;var d=!a.compareDocumentPosition-!b.compareDocumentPosition;return d?d:(d=(a.ownerDocument||a)===(b.ownerDocument||b)?a.compareDocumentPosition(b):1,1&d||!c.sortDetached&&b.compareDocumentPosition(a)===d?a===g||a.ownerDocument===v&&t(v,a)?-1:b===g||b.ownerDocument===v&&t(v,b)?1:k?J(k,a)-J(k,b):0:4&d?-1:1)}:function(a,b){if(a===b)return l=!0,0;var c,d=0,e=a.parentNode,f=b.parentNode,h=[a],i=[b];if(!e||!f)return a===g?-1:b===g?1:e?-1:f?1:k?J(k,a)-J(k,b):0;if(e===f)return la(a,b);c=a;while(c=c.parentNode)h.unshift(c);c=b;while(c=c.parentNode)i.unshift(c);while(h[d]===i[d])d++;return d?la(h[d],i[d]):h[d]===v?-1:i[d]===v?1:0},g):n},ga.matches=function(a,b){return ga(a,null,null,b)},ga.matchesSelector=function(a,b){if((a.ownerDocument||a)!==n&&m(a),b=b.replace(U,"='$1']"),!(!c.matchesSelector||!p||r&&r.test(b)||q&&q.test(b)))try{var d=s.call(a,b);if(d||c.disconnectedMatch||a.document&&11!==a.document.nodeType)return d}catch(e){}return ga(b,n,null,[a]).length>0},ga.contains=function(a,b){return(a.ownerDocument||a)!==n&&m(a),t(a,b)},ga.attr=function(a,b){(a.ownerDocument||a)!==n&&m(a);var e=d.attrHandle[b.toLowerCase()],f=e&&D.call(d.attrHandle,b.toLowerCase())?e(a,b,!p):void 0;return void 0!==f?f:c.attributes||!p?a.getAttribute(b):(f=a.getAttributeNode(b))&&f.specified?f.value:null},ga.error=function(a){throw new Error("Syntax error, unrecognized expression: "+a)},ga.uniqueSort=function(a){var b,d=[],e=0,f=0;if(l=!c.detectDuplicates,k=!c.sortStable&&a.slice(0),a.sort(B),l){while(b=a[f++])b===a[f]&&(e=d.push(f));while(e--)a.splice(d[e],1)}return k=null,a},e=ga.getText=function(a){var b,c="",d=0,f=a.nodeType;if(f){if(1===f||9===f||11===f){if("string"==typeof a.textContent)return a.textContent;for(a=a.firstChild;a;a=a.nextSibling)c+=e(a)}else if(3===f||4===f)return a.nodeValue}else while(b=a[d++])c+=e(b);return c},d=ga.selectors={cacheLength:50,createPseudo:ia,match:X,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(a){return a[1]=a[1].replace(ca,da),a[3]=(a[3]||a[4]||a[5]||"").replace(ca,da),"~="===a[2]&&(a[3]=" "+a[3]+" "),a.slice(0,4)},CHILD:function(a){return a[1]=a[1].toLowerCase(),"nth"===a[1].slice(0,3)?(a[3]||ga.error(a[0]),a[4]=+(a[4]?a[5]+(a[6]||1):2*("even"===a[3]||"odd"===a[3])),a[5]=+(a[7]+a[8]||"odd"===a[3])):a[3]&&ga.error(a[0]),a},PSEUDO:function(a){var b,c=!a[6]&&a[2];return X.CHILD.test(a[0])?null:(a[3]?a[2]=a[4]||a[5]||"":c&&V.test(c)&&(b=g(c,!0))&&(b=c.indexOf(")",c.length-b)-c.length)&&(a[0]=a[0].slice(0,b),a[2]=c.slice(0,b)),a.slice(0,3))}},filter:{TAG:function(a){var b=a.replace(ca,da).toLowerCase();return"*"===a?function(){return!0}:function(a){return a.nodeName&&a.nodeName.toLowerCase()===b}},CLASS:function(a){var b=y[a+" "];return b||(b=new RegExp("(^|"+L+")"+a+"("+L+"|$)"))&&y(a,function(a){return b.test("string"==typeof a.className&&a.className||"undefined"!=typeof a.getAttribute&&a.getAttribute("class")||"")})},ATTR:function(a,b,c){return function(d){var e=ga.attr(d,a);return null==e?"!="===b:b?(e+="","="===b?e===c:"!="===b?e!==c:"^="===b?c&&0===e.indexOf(c):"*="===b?c&&e.indexOf(c)>-1:"$="===b?c&&e.slice(-c.length)===c:"~="===b?(" "+e.replace(Q," ")+" ").indexOf(c)>-1:"|="===b?e===c||e.slice(0,c.length+1)===c+"-":!1):!0}},CHILD:function(a,b,c,d,e){var f="nth"!==a.slice(0,3),g="last"!==a.slice(-4),h="of-type"===b;return 1===d&&0===e?function(a){return!!a.parentNode}:function(b,c,i){var j,k,l,m,n,o,p=f!==g?"nextSibling":"previousSibling",q=b.parentNode,r=h&&b.nodeName.toLowerCase(),s=!i&&!h;if(q){if(f){while(p){l=b;while(l=l[p])if(h?l.nodeName.toLowerCase()===r:1===l.nodeType)return!1;o=p="only"===a&&!o&&"nextSibling"}return!0}if(o=[g?q.firstChild:q.lastChild],g&&s){k=q[u]||(q[u]={}),j=k[a]||[],n=j[0]===w&&j[1],m=j[0]===w&&j[2],l=n&&q.childNodes[n];while(l=++n&&l&&l[p]||(m=n=0)||o.pop())if(1===l.nodeType&&++m&&l===b){k[a]=[w,n,m];break}}else if(s&&(j=(b[u]||(b[u]={}))[a])&&j[0]===w)m=j[1];else while(l=++n&&l&&l[p]||(m=n=0)||o.pop())if((h?l.nodeName.toLowerCase()===r:1===l.nodeType)&&++m&&(s&&((l[u]||(l[u]={}))[a]=[w,m]),l===b))break;return m-=e,m===d||m%d===0&&m/d>=0}}},PSEUDO:function(a,b){var c,e=d.pseudos[a]||d.setFilters[a.toLowerCase()]||ga.error("unsupported pseudo: "+a);return e[u]?e(b):e.length>1?(c=[a,a,"",b],d.setFilters.hasOwnProperty(a.toLowerCase())?ia(function(a,c){var d,f=e(a,b),g=f.length;while(g--)d=J(a,f[g]),a[d]=!(c[d]=f[g])}):function(a){return e(a,0,c)}):e}},pseudos:{not:ia(function(a){var b=[],c=[],d=h(a.replace(R,"$1"));return d[u]?ia(function(a,b,c,e){var f,g=d(a,null,e,[]),h=a.length;while(h--)(f=g[h])&&(a[h]=!(b[h]=f))}):function(a,e,f){return b[0]=a,d(b,null,f,c),b[0]=null,!c.pop()}}),has:ia(function(a){return function(b){return ga(a,b).length>0}}),contains:ia(function(a){return a=a.replace(ca,da),function(b){return(b.textContent||b.innerText||e(b)).indexOf(a)>-1}}),lang:ia(function(a){return W.test(a||"")||ga.error("unsupported lang: "+a),a=a.replace(ca,da).toLowerCase(),function(b){var c;do if(c=p?b.lang:b.getAttribute("xml:lang")||b.getAttribute("lang"))return c=c.toLowerCase(),c===a||0===c.indexOf(a+"-");while((b=b.parentNode)&&1===b.nodeType);return!1}}),target:function(b){var c=a.location&&a.location.hash;return c&&c.slice(1)===b.id},root:function(a){return a===o},focus:function(a){return a===n.activeElement&&(!n.hasFocus||n.hasFocus())&&!!(a.type||a.href||~a.tabIndex)},enabled:function(a){return a.disabled===!1},disabled:function(a){return a.disabled===!0},checked:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&!!a.checked||"option"===b&&!!a.selected},selected:function(a){return a.parentNode&&a.parentNode.selectedIndex,a.selected===!0},empty:function(a){for(a=a.firstChild;a;a=a.nextSibling)if(a.nodeType<6)return!1;return!0},parent:function(a){return!d.pseudos.empty(a)},header:function(a){return Z.test(a.nodeName)},input:function(a){return Y.test(a.nodeName)},button:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&"button"===a.type||"button"===b},text:function(a){var b;return"input"===a.nodeName.toLowerCase()&&"text"===a.type&&(null==(b=a.getAttribute("type"))||"text"===b.toLowerCase())},first:oa(function(){return[0]}),last:oa(function(a,b){return[b-1]}),eq:oa(function(a,b,c){return[0>c?c+b:c]}),even:oa(function(a,b){for(var c=0;b>c;c+=2)a.push(c);return a}),odd:oa(function(a,b){for(var c=1;b>c;c+=2)a.push(c);return a}),lt:oa(function(a,b,c){for(var d=0>c?c+b:c;--d>=0;)a.push(d);return a}),gt:oa(function(a,b,c){for(var d=0>c?c+b:c;++db;b++)d+=a[b].value;return d}function sa(a,b,c){var d=b.dir,e=c&&"parentNode"===d,f=x++;return b.first?function(b,c,f){while(b=b[d])if(1===b.nodeType||e)return a(b,c,f)}:function(b,c,g){var h,i,j=[w,f];if(g){while(b=b[d])if((1===b.nodeType||e)&&a(b,c,g))return!0}else while(b=b[d])if(1===b.nodeType||e){if(i=b[u]||(b[u]={}),(h=i[d])&&h[0]===w&&h[1]===f)return j[2]=h[2];if(i[d]=j,j[2]=a(b,c,g))return!0}}}function ta(a){return a.length>1?function(b,c,d){var e=a.length;while(e--)if(!a[e](b,c,d))return!1;return!0}:a[0]}function ua(a,b,c){for(var d=0,e=b.length;e>d;d++)ga(a,b[d],c);return c}function va(a,b,c,d,e){for(var f,g=[],h=0,i=a.length,j=null!=b;i>h;h++)(f=a[h])&&(!c||c(f,d,e))&&(g.push(f),j&&b.push(h));return g}function wa(a,b,c,d,e,f){return d&&!d[u]&&(d=wa(d)),e&&!e[u]&&(e=wa(e,f)),ia(function(f,g,h,i){var j,k,l,m=[],n=[],o=g.length,p=f||ua(b||"*",h.nodeType?[h]:h,[]),q=!a||!f&&b?p:va(p,m,a,h,i),r=c?e||(f?a:o||d)?[]:g:q;if(c&&c(q,r,h,i),d){j=va(r,n),d(j,[],h,i),k=j.length;while(k--)(l=j[k])&&(r[n[k]]=!(q[n[k]]=l))}if(f){if(e||a){if(e){j=[],k=r.length;while(k--)(l=r[k])&&j.push(q[k]=l);e(null,r=[],j,i)}k=r.length;while(k--)(l=r[k])&&(j=e?J(f,l):m[k])>-1&&(f[j]=!(g[j]=l))}}else r=va(r===g?r.splice(o,r.length):r),e?e(null,g,r,i):H.apply(g,r)})}function xa(a){for(var b,c,e,f=a.length,g=d.relative[a[0].type],h=g||d.relative[" "],i=g?1:0,k=sa(function(a){return a===b},h,!0),l=sa(function(a){return J(b,a)>-1},h,!0),m=[function(a,c,d){var e=!g&&(d||c!==j)||((b=c).nodeType?k(a,c,d):l(a,c,d));return b=null,e}];f>i;i++)if(c=d.relative[a[i].type])m=[sa(ta(m),c)];else{if(c=d.filter[a[i].type].apply(null,a[i].matches),c[u]){for(e=++i;f>e;e++)if(d.relative[a[e].type])break;return wa(i>1&&ta(m),i>1&&ra(a.slice(0,i-1).concat({value:" "===a[i-2].type?"*":""})).replace(R,"$1"),c,e>i&&xa(a.slice(i,e)),f>e&&xa(a=a.slice(e)),f>e&&ra(a))}m.push(c)}return ta(m)}function ya(a,b){var c=b.length>0,e=a.length>0,f=function(f,g,h,i,k){var l,m,o,p=0,q="0",r=f&&[],s=[],t=j,u=f||e&&d.find.TAG("*",k),v=w+=null==t?1:Math.random()||.1,x=u.length;for(k&&(j=g!==n&&g);q!==x&&null!=(l=u[q]);q++){if(e&&l){m=0;while(o=a[m++])if(o(l,g,h)){i.push(l);break}k&&(w=v)}c&&((l=!o&&l)&&p--,f&&r.push(l))}if(p+=q,c&&q!==p){m=0;while(o=b[m++])o(r,s,g,h);if(f){if(p>0)while(q--)r[q]||s[q]||(s[q]=F.call(i));s=va(s)}H.apply(i,s),k&&!f&&s.length>0&&p+b.length>1&&ga.uniqueSort(i)}return k&&(w=v,j=t),r};return c?ia(f):f}return h=ga.compile=function(a,b){var c,d=[],e=[],f=A[a+" "];if(!f){b||(b=g(a)),c=b.length;while(c--)f=xa(b[c]),f[u]?d.push(f):e.push(f);f=A(a,ya(e,d)),f.selector=a}return f},i=ga.select=function(a,b,e,f){var i,j,k,l,m,n="function"==typeof a&&a,o=!f&&g(a=n.selector||a);if(e=e||[],1===o.length){if(j=o[0]=o[0].slice(0),j.length>2&&"ID"===(k=j[0]).type&&c.getById&&9===b.nodeType&&p&&d.relative[j[1].type]){if(b=(d.find.ID(k.matches[0].replace(ca,da),b)||[])[0],!b)return e;n&&(b=b.parentNode),a=a.slice(j.shift().value.length)}i=X.needsContext.test(a)?0:j.length;while(i--){if(k=j[i],d.relative[l=k.type])break;if((m=d.find[l])&&(f=m(k.matches[0].replace(ca,da),aa.test(j[0].type)&&pa(b.parentNode)||b))){if(j.splice(i,1),a=f.length&&ra(j),!a)return H.apply(e,f),e;break}}}return(n||h(a,o))(f,b,!p,e,aa.test(a)&&pa(b.parentNode)||b),e},c.sortStable=u.split("").sort(B).join("")===u,c.detectDuplicates=!!l,m(),c.sortDetached=ja(function(a){return 1&a.compareDocumentPosition(n.createElement("div"))}),ja(function(a){return a.innerHTML="","#"===a.firstChild.getAttribute("href")})||ka("type|href|height|width",function(a,b,c){return c?void 0:a.getAttribute(b,"type"===b.toLowerCase()?1:2)}),c.attributes&&ja(function(a){return a.innerHTML="",a.firstChild.setAttribute("value",""),""===a.firstChild.getAttribute("value")})||ka("value",function(a,b,c){return c||"input"!==a.nodeName.toLowerCase()?void 0:a.defaultValue}),ja(function(a){return null==a.getAttribute("disabled")})||ka(K,function(a,b,c){var d;return c?void 0:a[b]===!0?b.toLowerCase():(d=a.getAttributeNode(b))&&d.specified?d.value:null}),ga}(a);n.find=t,n.expr=t.selectors,n.expr[":"]=n.expr.pseudos,n.unique=t.uniqueSort,n.text=t.getText,n.isXMLDoc=t.isXML,n.contains=t.contains;var u=n.expr.match.needsContext,v=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,w=/^.[^:#\[\.,]*$/;function x(a,b,c){if(n.isFunction(b))return n.grep(a,function(a,d){return!!b.call(a,d,a)!==c});if(b.nodeType)return n.grep(a,function(a){return a===b!==c});if("string"==typeof b){if(w.test(b))return n.filter(b,a,c);b=n.filter(b,a)}return n.grep(a,function(a){return g.call(b,a)>=0!==c})}n.filter=function(a,b,c){var d=b[0];return c&&(a=":not("+a+")"),1===b.length&&1===d.nodeType?n.find.matchesSelector(d,a)?[d]:[]:n.find.matches(a,n.grep(b,function(a){return 1===a.nodeType}))},n.fn.extend({find:function(a){var b,c=this.length,d=[],e=this;if("string"!=typeof a)return this.pushStack(n(a).filter(function(){for(b=0;c>b;b++)if(n.contains(e[b],this))return!0}));for(b=0;c>b;b++)n.find(a,e[b],d);return d=this.pushStack(c>1?n.unique(d):d),d.selector=this.selector?this.selector+" "+a:a,d},filter:function(a){return this.pushStack(x(this,a||[],!1))},not:function(a){return this.pushStack(x(this,a||[],!0))},is:function(a){return!!x(this,"string"==typeof a&&u.test(a)?n(a):a||[],!1).length}});var y,z=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/,A=n.fn.init=function(a,b){var c,d;if(!a)return this;if("string"==typeof a){if(c="<"===a[0]&&">"===a[a.length-1]&&a.length>=3?[null,a,null]:z.exec(a),!c||!c[1]&&b)return!b||b.jquery?(b||y).find(a):this.constructor(b).find(a);if(c[1]){if(b=b instanceof n?b[0]:b,n.merge(this,n.parseHTML(c[1],b&&b.nodeType?b.ownerDocument||b:l,!0)),v.test(c[1])&&n.isPlainObject(b))for(c in b)n.isFunction(this[c])?this[c](b[c]):this.attr(c,b[c]);return this}return d=l.getElementById(c[2]),d&&d.parentNode&&(this.length=1,this[0]=d),this.context=l,this.selector=a,this}return a.nodeType?(this.context=this[0]=a,this.length=1,this):n.isFunction(a)?"undefined"!=typeof y.ready?y.ready(a):a(n):(void 0!==a.selector&&(this.selector=a.selector,this.context=a.context),n.makeArray(a,this))};A.prototype=n.fn,y=n(l);var B=/^(?:parents|prev(?:Until|All))/,C={children:!0,contents:!0,next:!0,prev:!0};n.extend({dir:function(a,b,c){var d=[],e=void 0!==c;while((a=a[b])&&9!==a.nodeType)if(1===a.nodeType){if(e&&n(a).is(c))break;d.push(a)}return d},sibling:function(a,b){for(var c=[];a;a=a.nextSibling)1===a.nodeType&&a!==b&&c.push(a);return c}}),n.fn.extend({has:function(a){var b=n(a,this),c=b.length;return this.filter(function(){for(var a=0;c>a;a++)if(n.contains(this,b[a]))return!0})},closest:function(a,b){for(var c,d=0,e=this.length,f=[],g=u.test(a)||"string"!=typeof a?n(a,b||this.context):0;e>d;d++)for(c=this[d];c&&c!==b;c=c.parentNode)if(c.nodeType<11&&(g?g.index(c)>-1:1===c.nodeType&&n.find.matchesSelector(c,a))){f.push(c);break}return this.pushStack(f.length>1?n.unique(f):f)},index:function(a){return a?"string"==typeof a?g.call(n(a),this[0]):g.call(this,a.jquery?a[0]:a):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(a,b){return this.pushStack(n.unique(n.merge(this.get(),n(a,b))))},addBack:function(a){return this.add(null==a?this.prevObject:this.prevObject.filter(a))}});function D(a,b){while((a=a[b])&&1!==a.nodeType);return a}n.each({parent:function(a){var b=a.parentNode;return b&&11!==b.nodeType?b:null},parents:function(a){return n.dir(a,"parentNode")},parentsUntil:function(a,b,c){return n.dir(a,"parentNode",c)},next:function(a){return D(a,"nextSibling")},prev:function(a){return D(a,"previousSibling")},nextAll:function(a){return n.dir(a,"nextSibling")},prevAll:function(a){return n.dir(a,"previousSibling")},nextUntil:function(a,b,c){return n.dir(a,"nextSibling",c)},prevUntil:function(a,b,c){return n.dir(a,"previousSibling",c)},siblings:function(a){return n.sibling((a.parentNode||{}).firstChild,a)},children:function(a){return n.sibling(a.firstChild)},contents:function(a){return a.contentDocument||n.merge([],a.childNodes)}},function(a,b){n.fn[a]=function(c,d){var e=n.map(this,b,c);return"Until"!==a.slice(-5)&&(d=c),d&&"string"==typeof d&&(e=n.filter(d,e)),this.length>1&&(C[a]||n.unique(e),B.test(a)&&e.reverse()),this.pushStack(e)}});var E=/\S+/g,F={};function G(a){var b=F[a]={};return n.each(a.match(E)||[],function(a,c){b[c]=!0}),b}n.Callbacks=function(a){a="string"==typeof a?F[a]||G(a):n.extend({},a);var b,c,d,e,f,g,h=[],i=!a.once&&[],j=function(l){for(b=a.memory&&l,c=!0,g=e||0,e=0,f=h.length,d=!0;h&&f>g;g++)if(h[g].apply(l[0],l[1])===!1&&a.stopOnFalse){b=!1;break}d=!1,h&&(i?i.length&&j(i.shift()):b?h=[]:k.disable())},k={add:function(){if(h){var c=h.length;!function g(b){n.each(b,function(b,c){var d=n.type(c);"function"===d?a.unique&&k.has(c)||h.push(c):c&&c.length&&"string"!==d&&g(c)})}(arguments),d?f=h.length:b&&(e=c,j(b))}return this},remove:function(){return h&&n.each(arguments,function(a,b){var c;while((c=n.inArray(b,h,c))>-1)h.splice(c,1),d&&(f>=c&&f--,g>=c&&g--)}),this},has:function(a){return a?n.inArray(a,h)>-1:!(!h||!h.length)},empty:function(){return h=[],f=0,this},disable:function(){return h=i=b=void 0,this},disabled:function(){return!h},lock:function(){return i=void 0,b||k.disable(),this},locked:function(){return!i},fireWith:function(a,b){return!h||c&&!i||(b=b||[],b=[a,b.slice?b.slice():b],d?i.push(b):j(b)),this},fire:function(){return k.fireWith(this,arguments),this},fired:function(){return!!c}};return k},n.extend({Deferred:function(a){var b=[["resolve","done",n.Callbacks("once memory"),"resolved"],["reject","fail",n.Callbacks("once memory"),"rejected"],["notify","progress",n.Callbacks("memory")]],c="pending",d={state:function(){return c},always:function(){return e.done(arguments).fail(arguments),this},then:function(){var a=arguments;return n.Deferred(function(c){n.each(b,function(b,f){var g=n.isFunction(a[b])&&a[b];e[f[1]](function(){var a=g&&g.apply(this,arguments);a&&n.isFunction(a.promise)?a.promise().done(c.resolve).fail(c.reject).progress(c.notify):c[f[0]+"With"](this===d?c.promise():this,g?[a]:arguments)})}),a=null}).promise()},promise:function(a){return null!=a?n.extend(a,d):d}},e={};return d.pipe=d.then,n.each(b,function(a,f){var g=f[2],h=f[3];d[f[1]]=g.add,h&&g.add(function(){c=h},b[1^a][2].disable,b[2][2].lock),e[f[0]]=function(){return e[f[0]+"With"](this===e?d:this,arguments),this},e[f[0]+"With"]=g.fireWith}),d.promise(e),a&&a.call(e,e),e},when:function(a){var b=0,c=d.call(arguments),e=c.length,f=1!==e||a&&n.isFunction(a.promise)?e:0,g=1===f?a:n.Deferred(),h=function(a,b,c){return function(e){b[a]=this,c[a]=arguments.length>1?d.call(arguments):e,c===i?g.notifyWith(b,c):--f||g.resolveWith(b,c)}},i,j,k;if(e>1)for(i=new Array(e),j=new Array(e),k=new Array(e);e>b;b++)c[b]&&n.isFunction(c[b].promise)?c[b].promise().done(h(b,k,c)).fail(g.reject).progress(h(b,j,i)):--f;return f||g.resolveWith(k,c),g.promise()}});var H;n.fn.ready=function(a){return n.ready.promise().done(a),this},n.extend({isReady:!1,readyWait:1,holdReady:function(a){a?n.readyWait++:n.ready(!0)},ready:function(a){(a===!0?--n.readyWait:n.isReady)||(n.isReady=!0,a!==!0&&--n.readyWait>0||(H.resolveWith(l,[n]),n.fn.triggerHandler&&(n(l).triggerHandler("ready"),n(l).off("ready"))))}});function I(){l.removeEventListener("DOMContentLoaded",I,!1),a.removeEventListener("load",I,!1),n.ready()}n.ready.promise=function(b){return H||(H=n.Deferred(),"complete"===l.readyState?setTimeout(n.ready):(l.addEventListener("DOMContentLoaded",I,!1),a.addEventListener("load",I,!1))),H.promise(b)},n.ready.promise();var J=n.access=function(a,b,c,d,e,f,g){var h=0,i=a.length,j=null==c;if("object"===n.type(c)){e=!0;for(h in c)n.access(a,b,h,c[h],!0,f,g)}else if(void 0!==d&&(e=!0,n.isFunction(d)||(g=!0),j&&(g?(b.call(a,d),b=null):(j=b,b=function(a,b,c){return j.call(n(a),c)})),b))for(;i>h;h++)b(a[h],c,g?d:d.call(a[h],h,b(a[h],c)));return e?a:j?b.call(a):i?b(a[0],c):f};n.acceptData=function(a){return 1===a.nodeType||9===a.nodeType||!+a.nodeType};function K(){Object.defineProperty(this.cache={},0,{get:function(){return{}}}),this.expando=n.expando+K.uid++}K.uid=1,K.accepts=n.acceptData,K.prototype={key:function(a){if(!K.accepts(a))return 0;var b={},c=a[this.expando];if(!c){c=K.uid++;try{b[this.expando]={value:c},Object.defineProperties(a,b)}catch(d){b[this.expando]=c,n.extend(a,b)}}return this.cache[c]||(this.cache[c]={}),c},set:function(a,b,c){var d,e=this.key(a),f=this.cache[e];if("string"==typeof b)f[b]=c;else if(n.isEmptyObject(f))n.extend(this.cache[e],b);else for(d in b)f[d]=b[d];return f},get:function(a,b){var c=this.cache[this.key(a)];return void 0===b?c:c[b]},access:function(a,b,c){var d;return void 0===b||b&&"string"==typeof b&&void 0===c?(d=this.get(a,b),void 0!==d?d:this.get(a,n.camelCase(b))):(this.set(a,b,c),void 0!==c?c:b)},remove:function(a,b){var c,d,e,f=this.key(a),g=this.cache[f];if(void 0===b)this.cache[f]={};else{n.isArray(b)?d=b.concat(b.map(n.camelCase)):(e=n.camelCase(b),b in g?d=[b,e]:(d=e,d=d in g?[d]:d.match(E)||[])),c=d.length;while(c--)delete g[d[c]]}},hasData:function(a){return!n.isEmptyObject(this.cache[a[this.expando]]||{})},discard:function(a){a[this.expando]&&delete this.cache[a[this.expando]]}};var L=new K,M=new K,N=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,O=/([A-Z])/g;function P(a,b,c){var d;if(void 0===c&&1===a.nodeType)if(d="data-"+b.replace(O,"-$1").toLowerCase(),c=a.getAttribute(d),"string"==typeof c){try{c="true"===c?!0:"false"===c?!1:"null"===c?null:+c+""===c?+c:N.test(c)?n.parseJSON(c):c}catch(e){}M.set(a,b,c)}else c=void 0;return c}n.extend({hasData:function(a){return M.hasData(a)||L.hasData(a)},data:function(a,b,c){ +return M.access(a,b,c)},removeData:function(a,b){M.remove(a,b)},_data:function(a,b,c){return L.access(a,b,c)},_removeData:function(a,b){L.remove(a,b)}}),n.fn.extend({data:function(a,b){var c,d,e,f=this[0],g=f&&f.attributes;if(void 0===a){if(this.length&&(e=M.get(f),1===f.nodeType&&!L.get(f,"hasDataAttrs"))){c=g.length;while(c--)g[c]&&(d=g[c].name,0===d.indexOf("data-")&&(d=n.camelCase(d.slice(5)),P(f,d,e[d])));L.set(f,"hasDataAttrs",!0)}return e}return"object"==typeof a?this.each(function(){M.set(this,a)}):J(this,function(b){var c,d=n.camelCase(a);if(f&&void 0===b){if(c=M.get(f,a),void 0!==c)return c;if(c=M.get(f,d),void 0!==c)return c;if(c=P(f,d,void 0),void 0!==c)return c}else this.each(function(){var c=M.get(this,d);M.set(this,d,b),-1!==a.indexOf("-")&&void 0!==c&&M.set(this,a,b)})},null,b,arguments.length>1,null,!0)},removeData:function(a){return this.each(function(){M.remove(this,a)})}}),n.extend({queue:function(a,b,c){var d;return a?(b=(b||"fx")+"queue",d=L.get(a,b),c&&(!d||n.isArray(c)?d=L.access(a,b,n.makeArray(c)):d.push(c)),d||[]):void 0},dequeue:function(a,b){b=b||"fx";var c=n.queue(a,b),d=c.length,e=c.shift(),f=n._queueHooks(a,b),g=function(){n.dequeue(a,b)};"inprogress"===e&&(e=c.shift(),d--),e&&("fx"===b&&c.unshift("inprogress"),delete f.stop,e.call(a,g,f)),!d&&f&&f.empty.fire()},_queueHooks:function(a,b){var c=b+"queueHooks";return L.get(a,c)||L.access(a,c,{empty:n.Callbacks("once memory").add(function(){L.remove(a,[b+"queue",c])})})}}),n.fn.extend({queue:function(a,b){var c=2;return"string"!=typeof a&&(b=a,a="fx",c--),arguments.lengthx",k.noCloneChecked=!!b.cloneNode(!0).lastChild.defaultValue}();var U="undefined";k.focusinBubbles="onfocusin"in a;var V=/^key/,W=/^(?:mouse|pointer|contextmenu)|click/,X=/^(?:focusinfocus|focusoutblur)$/,Y=/^([^.]*)(?:\.(.+)|)$/;function Z(){return!0}function $(){return!1}function _(){try{return l.activeElement}catch(a){}}n.event={global:{},add:function(a,b,c,d,e){var f,g,h,i,j,k,l,m,o,p,q,r=L.get(a);if(r){c.handler&&(f=c,c=f.handler,e=f.selector),c.guid||(c.guid=n.guid++),(i=r.events)||(i=r.events={}),(g=r.handle)||(g=r.handle=function(b){return typeof n!==U&&n.event.triggered!==b.type?n.event.dispatch.apply(a,arguments):void 0}),b=(b||"").match(E)||[""],j=b.length;while(j--)h=Y.exec(b[j])||[],o=q=h[1],p=(h[2]||"").split(".").sort(),o&&(l=n.event.special[o]||{},o=(e?l.delegateType:l.bindType)||o,l=n.event.special[o]||{},k=n.extend({type:o,origType:q,data:d,handler:c,guid:c.guid,selector:e,needsContext:e&&n.expr.match.needsContext.test(e),namespace:p.join(".")},f),(m=i[o])||(m=i[o]=[],m.delegateCount=0,l.setup&&l.setup.call(a,d,p,g)!==!1||a.addEventListener&&a.addEventListener(o,g,!1)),l.add&&(l.add.call(a,k),k.handler.guid||(k.handler.guid=c.guid)),e?m.splice(m.delegateCount++,0,k):m.push(k),n.event.global[o]=!0)}},remove:function(a,b,c,d,e){var f,g,h,i,j,k,l,m,o,p,q,r=L.hasData(a)&&L.get(a);if(r&&(i=r.events)){b=(b||"").match(E)||[""],j=b.length;while(j--)if(h=Y.exec(b[j])||[],o=q=h[1],p=(h[2]||"").split(".").sort(),o){l=n.event.special[o]||{},o=(d?l.delegateType:l.bindType)||o,m=i[o]||[],h=h[2]&&new RegExp("(^|\\.)"+p.join("\\.(?:.*\\.|)")+"(\\.|$)"),g=f=m.length;while(f--)k=m[f],!e&&q!==k.origType||c&&c.guid!==k.guid||h&&!h.test(k.namespace)||d&&d!==k.selector&&("**"!==d||!k.selector)||(m.splice(f,1),k.selector&&m.delegateCount--,l.remove&&l.remove.call(a,k));g&&!m.length&&(l.teardown&&l.teardown.call(a,p,r.handle)!==!1||n.removeEvent(a,o,r.handle),delete i[o])}else for(o in i)n.event.remove(a,o+b[j],c,d,!0);n.isEmptyObject(i)&&(delete r.handle,L.remove(a,"events"))}},trigger:function(b,c,d,e){var f,g,h,i,k,m,o,p=[d||l],q=j.call(b,"type")?b.type:b,r=j.call(b,"namespace")?b.namespace.split("."):[];if(g=h=d=d||l,3!==d.nodeType&&8!==d.nodeType&&!X.test(q+n.event.triggered)&&(q.indexOf(".")>=0&&(r=q.split("."),q=r.shift(),r.sort()),k=q.indexOf(":")<0&&"on"+q,b=b[n.expando]?b:new n.Event(q,"object"==typeof b&&b),b.isTrigger=e?2:3,b.namespace=r.join("."),b.namespace_re=b.namespace?new RegExp("(^|\\.)"+r.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,b.result=void 0,b.target||(b.target=d),c=null==c?[b]:n.makeArray(c,[b]),o=n.event.special[q]||{},e||!o.trigger||o.trigger.apply(d,c)!==!1)){if(!e&&!o.noBubble&&!n.isWindow(d)){for(i=o.delegateType||q,X.test(i+q)||(g=g.parentNode);g;g=g.parentNode)p.push(g),h=g;h===(d.ownerDocument||l)&&p.push(h.defaultView||h.parentWindow||a)}f=0;while((g=p[f++])&&!b.isPropagationStopped())b.type=f>1?i:o.bindType||q,m=(L.get(g,"events")||{})[b.type]&&L.get(g,"handle"),m&&m.apply(g,c),m=k&&g[k],m&&m.apply&&n.acceptData(g)&&(b.result=m.apply(g,c),b.result===!1&&b.preventDefault());return b.type=q,e||b.isDefaultPrevented()||o._default&&o._default.apply(p.pop(),c)!==!1||!n.acceptData(d)||k&&n.isFunction(d[q])&&!n.isWindow(d)&&(h=d[k],h&&(d[k]=null),n.event.triggered=q,d[q](),n.event.triggered=void 0,h&&(d[k]=h)),b.result}},dispatch:function(a){a=n.event.fix(a);var b,c,e,f,g,h=[],i=d.call(arguments),j=(L.get(this,"events")||{})[a.type]||[],k=n.event.special[a.type]||{};if(i[0]=a,a.delegateTarget=this,!k.preDispatch||k.preDispatch.call(this,a)!==!1){h=n.event.handlers.call(this,a,j),b=0;while((f=h[b++])&&!a.isPropagationStopped()){a.currentTarget=f.elem,c=0;while((g=f.handlers[c++])&&!a.isImmediatePropagationStopped())(!a.namespace_re||a.namespace_re.test(g.namespace))&&(a.handleObj=g,a.data=g.data,e=((n.event.special[g.origType]||{}).handle||g.handler).apply(f.elem,i),void 0!==e&&(a.result=e)===!1&&(a.preventDefault(),a.stopPropagation()))}return k.postDispatch&&k.postDispatch.call(this,a),a.result}},handlers:function(a,b){var c,d,e,f,g=[],h=b.delegateCount,i=a.target;if(h&&i.nodeType&&(!a.button||"click"!==a.type))for(;i!==this;i=i.parentNode||this)if(i.disabled!==!0||"click"!==a.type){for(d=[],c=0;h>c;c++)f=b[c],e=f.selector+" ",void 0===d[e]&&(d[e]=f.needsContext?n(e,this).index(i)>=0:n.find(e,this,null,[i]).length),d[e]&&d.push(f);d.length&&g.push({elem:i,handlers:d})}return h]*)\/>/gi,ba=/<([\w:]+)/,ca=/<|&#?\w+;/,da=/<(?:script|style|link)/i,ea=/checked\s*(?:[^=]|=\s*.checked.)/i,fa=/^$|\/(?:java|ecma)script/i,ga=/^true\/(.*)/,ha=/^\s*\s*$/g,ia={option:[1,""],thead:[1,"","
    "],col:[2,"","
    "],tr:[2,"","
    "],td:[3,"","
    "],_default:[0,"",""]};ia.optgroup=ia.option,ia.tbody=ia.tfoot=ia.colgroup=ia.caption=ia.thead,ia.th=ia.td;function ja(a,b){return n.nodeName(a,"table")&&n.nodeName(11!==b.nodeType?b:b.firstChild,"tr")?a.getElementsByTagName("tbody")[0]||a.appendChild(a.ownerDocument.createElement("tbody")):a}function ka(a){return a.type=(null!==a.getAttribute("type"))+"/"+a.type,a}function la(a){var b=ga.exec(a.type);return b?a.type=b[1]:a.removeAttribute("type"),a}function ma(a,b){for(var c=0,d=a.length;d>c;c++)L.set(a[c],"globalEval",!b||L.get(b[c],"globalEval"))}function na(a,b){var c,d,e,f,g,h,i,j;if(1===b.nodeType){if(L.hasData(a)&&(f=L.access(a),g=L.set(b,f),j=f.events)){delete g.handle,g.events={};for(e in j)for(c=0,d=j[e].length;d>c;c++)n.event.add(b,e,j[e][c])}M.hasData(a)&&(h=M.access(a),i=n.extend({},h),M.set(b,i))}}function oa(a,b){var c=a.getElementsByTagName?a.getElementsByTagName(b||"*"):a.querySelectorAll?a.querySelectorAll(b||"*"):[];return void 0===b||b&&n.nodeName(a,b)?n.merge([a],c):c}function pa(a,b){var c=b.nodeName.toLowerCase();"input"===c&&T.test(a.type)?b.checked=a.checked:("input"===c||"textarea"===c)&&(b.defaultValue=a.defaultValue)}n.extend({clone:function(a,b,c){var d,e,f,g,h=a.cloneNode(!0),i=n.contains(a.ownerDocument,a);if(!(k.noCloneChecked||1!==a.nodeType&&11!==a.nodeType||n.isXMLDoc(a)))for(g=oa(h),f=oa(a),d=0,e=f.length;e>d;d++)pa(f[d],g[d]);if(b)if(c)for(f=f||oa(a),g=g||oa(h),d=0,e=f.length;e>d;d++)na(f[d],g[d]);else na(a,h);return g=oa(h,"script"),g.length>0&&ma(g,!i&&oa(a,"script")),h},buildFragment:function(a,b,c,d){for(var e,f,g,h,i,j,k=b.createDocumentFragment(),l=[],m=0,o=a.length;o>m;m++)if(e=a[m],e||0===e)if("object"===n.type(e))n.merge(l,e.nodeType?[e]:e);else if(ca.test(e)){f=f||k.appendChild(b.createElement("div")),g=(ba.exec(e)||["",""])[1].toLowerCase(),h=ia[g]||ia._default,f.innerHTML=h[1]+e.replace(aa,"<$1>")+h[2],j=h[0];while(j--)f=f.lastChild;n.merge(l,f.childNodes),f=k.firstChild,f.textContent=""}else l.push(b.createTextNode(e));k.textContent="",m=0;while(e=l[m++])if((!d||-1===n.inArray(e,d))&&(i=n.contains(e.ownerDocument,e),f=oa(k.appendChild(e),"script"),i&&ma(f),c)){j=0;while(e=f[j++])fa.test(e.type||"")&&c.push(e)}return k},cleanData:function(a){for(var b,c,d,e,f=n.event.special,g=0;void 0!==(c=a[g]);g++){if(n.acceptData(c)&&(e=c[L.expando],e&&(b=L.cache[e]))){if(b.events)for(d in b.events)f[d]?n.event.remove(c,d):n.removeEvent(c,d,b.handle);L.cache[e]&&delete L.cache[e]}delete M.cache[c[M.expando]]}}}),n.fn.extend({text:function(a){return J(this,function(a){return void 0===a?n.text(this):this.empty().each(function(){(1===this.nodeType||11===this.nodeType||9===this.nodeType)&&(this.textContent=a)})},null,a,arguments.length)},append:function(){return this.domManip(arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=ja(this,a);b.appendChild(a)}})},prepend:function(){return this.domManip(arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=ja(this,a);b.insertBefore(a,b.firstChild)}})},before:function(){return this.domManip(arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this)})},after:function(){return this.domManip(arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this.nextSibling)})},remove:function(a,b){for(var c,d=a?n.filter(a,this):this,e=0;null!=(c=d[e]);e++)b||1!==c.nodeType||n.cleanData(oa(c)),c.parentNode&&(b&&n.contains(c.ownerDocument,c)&&ma(oa(c,"script")),c.parentNode.removeChild(c));return this},empty:function(){for(var a,b=0;null!=(a=this[b]);b++)1===a.nodeType&&(n.cleanData(oa(a,!1)),a.textContent="");return this},clone:function(a,b){return a=null==a?!1:a,b=null==b?a:b,this.map(function(){return n.clone(this,a,b)})},html:function(a){return J(this,function(a){var b=this[0]||{},c=0,d=this.length;if(void 0===a&&1===b.nodeType)return b.innerHTML;if("string"==typeof a&&!da.test(a)&&!ia[(ba.exec(a)||["",""])[1].toLowerCase()]){a=a.replace(aa,"<$1>");try{for(;d>c;c++)b=this[c]||{},1===b.nodeType&&(n.cleanData(oa(b,!1)),b.innerHTML=a);b=0}catch(e){}}b&&this.empty().append(a)},null,a,arguments.length)},replaceWith:function(){var a=arguments[0];return this.domManip(arguments,function(b){a=this.parentNode,n.cleanData(oa(this)),a&&a.replaceChild(b,this)}),a&&(a.length||a.nodeType)?this:this.remove()},detach:function(a){return this.remove(a,!0)},domManip:function(a,b){a=e.apply([],a);var c,d,f,g,h,i,j=0,l=this.length,m=this,o=l-1,p=a[0],q=n.isFunction(p);if(q||l>1&&"string"==typeof p&&!k.checkClone&&ea.test(p))return this.each(function(c){var d=m.eq(c);q&&(a[0]=p.call(this,c,d.html())),d.domManip(a,b)});if(l&&(c=n.buildFragment(a,this[0].ownerDocument,!1,this),d=c.firstChild,1===c.childNodes.length&&(c=d),d)){for(f=n.map(oa(c,"script"),ka),g=f.length;l>j;j++)h=c,j!==o&&(h=n.clone(h,!0,!0),g&&n.merge(f,oa(h,"script"))),b.call(this[j],h,j);if(g)for(i=f[f.length-1].ownerDocument,n.map(f,la),j=0;g>j;j++)h=f[j],fa.test(h.type||"")&&!L.access(h,"globalEval")&&n.contains(i,h)&&(h.src?n._evalUrl&&n._evalUrl(h.src):n.globalEval(h.textContent.replace(ha,"")))}return this}}),n.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(a,b){n.fn[a]=function(a){for(var c,d=[],e=n(a),g=e.length-1,h=0;g>=h;h++)c=h===g?this:this.clone(!0),n(e[h])[b](c),f.apply(d,c.get());return this.pushStack(d)}});var qa,ra={};function sa(b,c){var d,e=n(c.createElement(b)).appendTo(c.body),f=a.getDefaultComputedStyle&&(d=a.getDefaultComputedStyle(e[0]))?d.display:n.css(e[0],"display");return e.detach(),f}function ta(a){var b=l,c=ra[a];return c||(c=sa(a,b),"none"!==c&&c||(qa=(qa||n("